From 4976c363cb47c7a6f77d280cca3b19676e9256a5 Mon Sep 17 00:00:00 2001 From: crackfoo Date: Wed, 8 Mar 2017 13:15:15 -0400 Subject: [PATCH 001/576] stratum: add support for ARC 12.1 & superblocks --- stratum/coinbase.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index bb78eee99..c47257d6e 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -245,6 +245,49 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); return; } + + if(strcmp(coind->symbol, "ARC") == 0) // Dash 12.1 + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; // addresses count + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_started"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_started"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "goldminenode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } else if(coind->hasmasternodes) /* OLD DASH style */ { From ab7a45bb4e5957e5571b3bdd05d82b079d63c3d0 Mon Sep 17 00:00:00 2001 From: crackfoo Date: Wed, 8 Mar 2017 13:44:17 -0400 Subject: [PATCH 002/576] Update coinbase.cpp --- stratum/coinbase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index c47257d6e..08f7243b6 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -246,14 +246,14 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - if(strcmp(coind->symbol, "ARC") == 0) // Dash 12.1 + else if(strcmp(coind->symbol, "ARC") == 0) { char script_dests[2048] = { 0 }; char script_payee[128] = { 0 }; - char payees[4]; // addresses count + char payees[4]; int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_started"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_started"); + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); json_value* superblock = json_get_array(json_result, "superblock"); json_value* masternode = json_get_object(json_result, "goldminenode"); if(superblocks_enabled && superblock) { From 71b33d2570c0b9b4d118489d99bb47cebc95083f Mon Sep 17 00:00:00 2001 From: crackfoo Date: Mon, 27 Mar 2017 09:52:09 -0300 Subject: [PATCH 003/576] exchange: added livecoin min trading --- web/yaamp/core/trading/livecoin_trading.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/yaamp/core/trading/livecoin_trading.php b/web/yaamp/core/trading/livecoin_trading.php index 920bf39be..3e744a650 100644 --- a/web/yaamp/core/trading/livecoin_trading.php +++ b/web/yaamp/core/trading/livecoin_trading.php @@ -100,6 +100,7 @@ function doLiveCoinTrading($quick = false) if ($quick) { $flushall = false; } + $min_btc_trade = exchange_get($exchange, 'trade_min_btc', 0.0001); // upgrade orders $coins = getdbolist('db_coins', "enable=1 AND IFNULL(dontsell,0)=0 AND id IN (SELECT DISTINCT coinid FROM markets WHERE name='livecoin')"); From beea7e08011b3103e2ba779b9801334d5eceaa05 Mon Sep 17 00:00:00 2001 From: crackfoo Date: Sat, 10 Feb 2018 15:06:09 -0400 Subject: [PATCH 004/576] yiimp: improve block checks --- web/yaamp/core/backend/blocks.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/yaamp/core/backend/blocks.php b/web/yaamp/core/backend/blocks.php index 7625e1add..d569f90a6 100644 --- a/web/yaamp/core/backend/blocks.php +++ b/web/yaamp/core/backend/blocks.php @@ -48,7 +48,7 @@ function BackendBlockNew($coin, $db_block) else // immature $earning->status = 0; - $ucoin = getdbo('db_coins', $user->coinid); + $ucoin = (object) dborow("SELECT algo,symbol FROM coins WHERE id=:id", array(':id'=>$user->coinid)); if(!YAAMP_ALLOW_EXCHANGE && $ucoin && $ucoin->algo != $coin->algo) { debuglog($coin->symbol.": invalid earning for {$user->username}, user coin is {$ucoin->symbol}"); $earning->status = -1; @@ -57,8 +57,7 @@ function BackendBlockNew($coin, $db_block) if (!$earning->save()) debuglog(__FUNCTION__.": Unable to insert earning!"); - $user->last_earning = time(); - $user->save(); + dborun('UPDATE accounts SET last_earning=:time WHERE id=:id', array(':id'=>$user->id, ':time'=>time())); } $delay = time() - 5*60; From c102cb4837cc1371a7b9adee38ce206551c79e3b Mon Sep 17 00:00:00 2001 From: crackfoo Date: Wed, 16 May 2018 13:56:55 -0300 Subject: [PATCH 005/576] trading: get email if a previous tx is late Commented out by default to avoid unnecessary emails --- web/yaamp/core/backend/sell.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/yaamp/core/backend/sell.php b/web/yaamp/core/backend/sell.php index 7fba09b3c..9dfdb4301 100644 --- a/web/yaamp/core/backend/sell.php +++ b/web/yaamp/core/backend/sell.php @@ -40,6 +40,7 @@ function sellCoinToExchange($coin) if($market->lastsent != null && $market->lastsent > $market->lasttraded) { +// mail(YAAMP_ADMIN_EMAIL, "Late Transaction", "A previous transaction for $coin->name to $market->name has not been recieved."); // debuglog("*** not sending $coin->name to $market->name. last tx is late ***"); return; } From 2d4d4c46c524a442b0dc6bdac7fc2934b72fe767 Mon Sep 17 00:00:00 2001 From: crackfoo Date: Wed, 6 Jun 2018 10:03:27 -0300 Subject: [PATCH 006/576] explorer: support for DUO multialgo --- web/yaamp/modules/explorer/util.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/modules/explorer/util.php b/web/yaamp/modules/explorer/util.php index 39ce81fb0..ed7db0736 100644 --- a/web/yaamp/modules/explorer/util.php +++ b/web/yaamp/modules/explorer/util.php @@ -160,6 +160,9 @@ function versionToAlgo($coin, $version) $algos['DGC'] = array( 0=>'scrypt', 1=>'sha256', 2=>'x11' ); + $algos['DUO'] = array( + 0=>'sha256', 1=>'scrypt' + ); $algos['J'] = array( 2 =>'sha256', 3=>'x11', 4=>'x13', 5=>'x15', 6=>'scrypt', 7 =>'nist5', 8 =>'myr-gr', 9=>'penta', 10=>'whirlpool', From b2f06c0582a8859bd67834cc077386d818668922 Mon Sep 17 00:00:00 2001 From: cryptopool-builders <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 6 Sep 2018 20:17:08 -0400 Subject: [PATCH 007/576] Update README.md --- README.md | 149 +++++++++--------------------------------------------- 1 file changed, 23 insertions(+), 126 deletions(-) diff --git a/README.md b/README.md index 99c19e84d..916f0ea50 100644 --- a/README.md +++ b/README.md @@ -1,133 +1,30 @@ -[![Build Status](https://travis-ci.org/tpruvot/yiimp.svg?branch=next)](https://travis-ci.org/tpruvot/yiimp) +### Welcome to the cryptopool.builders github! +### This fork of YiiMP is designed to work with our Ultimate Crypto-Server Installer program. +Trying to install this on a server not built by our installer will cause headaches, frustrations, and screaming loudly at your monitor. -#yiimp - yaamp fork +## Changes to this fork include but not limited to: -Required: +``` +- File structure - +$STORAGE_ROOT/yiimp/site/web +$STORAGE_ROOT/yiimp/site/stratum (Only on single server installs) +$STORAGE_ROOT/yiimp/site/configuration +$STORAGE_ROOT/yiimp/site/crons +$STORAGE_ROOT/yiimp/site/log +$STORAGE_ROOT/yiimp/starts - linux, mysql, php, memcached, a webserver (lighttpd or nginx recommended) +- Site Files- +Updated various files to work with new file structure +``` -Config for nginx: +## Donations for continued support of this script are welcomed at: +* BTC 33XUK3hzZxmAPBgh2JMmMuVVSCAtpK9eQX +* BCH qp75x65svsuntmxze38sxqp47h4fqqgfyge5fgegah +* ETH 0xF2654882a26C3a226eEFF02E652D3aFFA1Bb682A +* LTC MTWpEuaLyj5AnvKxCKFh9fDbgsdNJgaECx - location / { - try_files $uri @rewrite; - } - - location @rewrite { - rewrite ^/(.*)$ /index.php?r=$1; - } - - location ~ \.php$ { - fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_index index.php; - include fastcgi_params; - } - - -If you use apache, it should be something like that (already set in web/.htaccess): - - RewriteEngine on - - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*) index.php?r=$1 [QSA] - - -If you use lighttpd, use the following config: - - $HTTP["host"] =~ "yiimp.ccminer.org" { - server.document-root = "/var/yaamp/web" - url.rewrite-if-not-file = ( - "^(.*)/([0-9]+)$" => "index.php?r=$1&id=$2", - "^(.*)\?(.*)" => "index.php?r=$1&$2", - "^(.*)" => "index.php?r=$1", - "." => "index.php" - ) - - url.access-deny = ( "~", ".dat", ".log" ) - } - - -For the database, import the initial dump present in the sql/ folder - -Then, apply the migration scripts to be in sync with the current git, they are sorted by date of change. - -Your database need at least 2 users, one for the web site (php) and one for the stratum connections (password set in config/algo.conf). - - - -The recommended install folder for the stratum engine is /var/stratum. Copy all the .conf files, run.sh, the stratum binary and the blocknotify binary to this folder. - -Some scripts are expecting the web folder to be /var/web. You can use directory symlinks... - - -Add your exchange API public and secret keys in these two separated files: - - /etc/yiimp/keys.php - fixed path in code - web/serverconfig.php - use sample as base... - -You can find sample config files in web/serverconfig.sample.php and web/keys.sample.php - -This web application includes some command line tools, add bin/ folder to your path and type "yiimp" to list them, "yiimp checkup" can help to test your initial setup. -Future scripts and maybe the "cron" jobs will then use this yiic console interface. - -You need at least three backend shells (in screen) running these scripts: - - web/main.sh - web/loop2.sh - web/block.sh - -Start one stratum per algo using the run.sh script with the algo as parameter. For example, for x11: - - run.sh x11 - -Edit each .conf file with proper values. - -Look at rc.local, it starts all three backend shells and all stratum processes. Copy it to the /etc folder so that all screen shells are started at boot up. - -All your coin's config files need to blocknotify their corresponding stratum using something like: - - blocknotify=blocknotify yaamp.com:port coinid %s - -On the website, go to http://server.com/site/adminRights to login as admin. You have to change it to something different in the code (web/yaamp/modules/site/SiteController.php). A real admin login may be added later, but you can setup a password authentification with your web server, sample for lighttpd: - - htpasswd -c /etc/yiimp/admin.htpasswd - -and in the lighttpd config file: - - # Admin access - $HTTP["url"] =~ "^/site/adminRights" { - auth.backend = "htpasswd" - auth.backend.htpasswd.userfile = "/etc/yiimp/admin.htpasswd" - auth.require = ( - "/" => ( - "method" => "basic", - "realm" => "Yiimp Administration", - "require" => "valid-user" - ) - ) - } - -And finally remove the IP filter check in SiteController.php - - - -There are logs generated in the /var/stratum folder and /var/log/stratum/debug.log for the php log. - -More instructions coming as needed. - - -There a lot of unused code in the php branch. Lot come from other projects I worked on and I've been lazy to clean it up before to integrate it to yaamp. It's mostly based on the Yii framework which implements a lightweight MVC. - - http://www.yiiframework.com/ - - -Credits: - -Thanks to globalzon to have released the initial Yaamp source code. - --- - -You can support this project donating to tpruvot : - -BTC : 1Auhps1mHZQpoX4mCcVL8odU81VakZQ6dR +## Credits: +* Thanks to tpruvot for the yiimp release +* Thanks to mailinabox for the installer idea From b450b2b8332820044073e1816e62c8619d79a667 Mon Sep 17 00:00:00 2001 From: cryptopool-builders <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 6 Sep 2018 20:32:01 -0400 Subject: [PATCH 008/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 127 ++++++++++++++++----------- 1 file changed, 77 insertions(+), 50 deletions(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index 3507ca47d..1b1c6605f 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -112,11 +112,6 @@ echo CUFHtml::activeTextField($coin, 'errors', array('maxlength'=>200,'readonly'=>'readonly','style'=>'width: 600px;')); echo CUFHtml::closeCtrlHolder(); -echo CUFHtml::openActiveCtrlHolder($coin, 'specifications'); -echo CUFHtml::activeLabelEx($coin, 'specifications'); -echo CUFHtml::activeTextArea($coin, 'specifications', array('maxlength'=>2048,'lines'=>5,'class'=>'tweetnews-input','style'=>'width: 600px;')); -echo CUFHtml::closeCtrlHolder(); - echo ""; ////////////////////////////////////////////////////////////////////////////////////////// @@ -271,24 +266,6 @@ } -//echo CUFHtml::openActiveCtrlHolder($coin, 'marketid'); -//echo CUFHtml::activeLabelEx($coin, 'marketid'); -//echo CUFHtml::activeTextField($coin, 'marketid', array('maxlength'=>20,'style'=>'width: 120px;')); -//echo "

Required on cryptsy ?

"; -//echo CUFHtml::closeCtrlHolder(); - -//echo CUFHtml::openActiveCtrlHolder($coin, 'deposit_address'); -//echo CUFHtml::activeLabelEx($coin, 'deposit_address'); -//echo CUFHtml::activeTextField($coin, 'deposit_address', array('maxlength'=>20)); -//echo "

For donations or exchange withdraws ?

"; -//echo CUFHtml::closeCtrlHolder(); - -//echo CUFHtml::openActiveCtrlHolder($coin, 'deposit_minimum'); -//echo CUFHtml::activeLabelEx($coin, 'deposit_minimum'); -//echo CUFHtml::activeTextField($coin, 'deposit_minimum', array('maxlength'=>20,'style'=>'width: 120px;')); -//echo "

Unused

"; -//echo CUFHtml::closeCtrlHolder(); - echo ''; ////////////////////////////////////////////////////////////////////////////////////////// @@ -301,11 +278,22 @@ echo '

Daemon process name

'; echo CUFHtml::closeCtrlHolder(); +if(empty($coin->program)){ echo CUFHtml::openActiveCtrlHolder($coin, 'conf_folder'); echo CUFHtml::activeLabelEx($coin, 'conf_folder'); -echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

Generally close to the process name (.bitcoin)

'; -echo CUFHtml::closeCtrlHolder(); +echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>228,'readonly'=>'readonly')); +echo '

Field will update on process name save

'; +echo CUFHtml::closeCtrlHolder();} + +else +if(empty($coin->conf_folder)){ +$program = rtrim($coin->program,'d'); +$coin->conf_folder = "/home/crypto-data/wallets/.$program"; +echo CUFHtml::openActiveCtrlHolder($coin, 'conf_folder'); +echo CUFHtml::activeLabelEx($coin, 'conf_folder'); +echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>228,'readonly'=>'readonly')); +echo '

Field will update on process name save

'; +echo CUFHtml::closeCtrlHolder();} echo CUFHtml::openActiveCtrlHolder($coin, 'rpchost'); echo CUFHtml::activeLabelEx($coin, 'rpchost'); @@ -377,39 +365,81 @@ echo '

Wallet account to use

'; echo CUFHtml::closeCtrlHolder(); +echo CUFHtml::openActiveCtrlHolder($coin, 'specifications'); +echo CUFHtml::activeLabelEx($coin, 'specifications'); +echo CUFHtml::activeTextArea($coin, 'specifications', array('maxlength'=>1048,'lines'=>35,'style'=>'width: 200px;')); +echo '

Max 35 limit

'; +echo CUFHtml::closeCtrlHolder(); + if ($coin->id) { + if(empty($coin->program)){ echo CHtml::tag("hr"); - echo "Sample config:"; + echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; +} +else { + $program = rtrim($coin->program,'d'); + echo CHtml::tag("hr"); + echo "Autogenerated config:\n"; echo CHtml::opentag("pre"); - $port = getAlgoPort($coin->algo); - echo "rpcuser={$coin->rpcuser}\n"; - echo "rpcpassword={$coin->rpcpasswd}\n"; - echo "rpcport={$coin->rpcport}\n"; - echo "rpcthreads=8\n"; - echo "rpcallowip=127.0.0.1\n"; - echo "# onlynet=ipv4\n"; - echo "maxconnections=12\n"; - echo "daemon=1\n"; - echo "gen=0\n"; - echo "\n"; - echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; - echo "blocknotify=blocknotify ".YAAMP_STRATUM_URL.":$port {$coin->id} %s\n"; - echo CHtml::closetag("pre"); - + echo "mkdir -p {$coin->conf_folder}\n"; + $port = getAlgoPort($coin->algo); + echo "echo '\n"; + echo " \n"; + echo "rpcuser={$coin->rpcuser}\n"; + echo "rpcpassword={$coin->rpcpasswd}\n"; + echo "rpcport={$coin->rpcport}\n"; + echo "rpcthreads=8\n"; + echo "rpcallowip=127.0.0.1\n"; + echo "# onlynet=ipv4\n"; + echo "maxconnections=12\n"; + echo "daemon=1\n"; + echo "gen=0\n"; + if(empty($coin->specifications)){ + echo "\n"; + } + else { + echo "{$coin->specifications}\n"; + echo "\n"; + } + echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; + echo "blocknotify=/var/stratum/blocknotify 127.0.0.1:$port {$coin->id} %s\n"; + echo " \n"; + echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; + echo CHtml::closetag("pre"); + echo CHtml::tag("hr"); - echo "Miner command line:"; + echo "Add coin to system startup:"; echo CHtml::opentag("pre"); - echo "-a {$coin->algo} "; - echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' '; - echo "-u {$coin->master_wallet} "; - echo "-p c={$coin->symbol} "; + echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; echo "\n"; + echo '

add -reindex if coin fails to start.

'; echo CHtml::closetag("pre"); + + echo CHtml::tag("hr"); + echo "Helpful Daemon Commands:"; + echo CHtml::opentag("pre"); + echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n"; + echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; + echo "Or if your coin has a cli file...\n"; + echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; + echo "sudo nano {$coin->conf_folder}/$program.conf\n"; + echo CHtml::closetag("pre"); + + echo CHtml::tag("hr"); + echo "Miner command line:"; + echo CHtml::opentag("pre"); + echo "-a {$coin->algo} "; + echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' '; + echo "-u {$coin->master_wallet} "; + echo "-p c={$coin->symbol} "; + echo "\n"; + echo CHtml::closetag("pre");} } echo ""; + ////////////////////////////////////////////////////////////////////////////////////////// echo '
'; @@ -452,6 +482,3 @@ echo CUFHtml::closeTag('fieldset'); showSubmitButton($update? 'Save': 'Create'); echo CUFHtml::endForm(); - - - From 9168c3c6feeebdbcd1a110026e909eeaf0b1b356 Mon Sep 17 00:00:00 2001 From: cryptopool-builders <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 6 Sep 2018 20:33:30 -0400 Subject: [PATCH 009/576] Update index.php --- web/yaamp/modules/site/index.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/web/yaamp/modules/site/index.php b/web/yaamp/modules/site/index.php index a1888b8ce..b29754513 100644 --- a/web/yaamp/modules/site/index.php +++ b/web/yaamp/modules/site/index.php @@ -33,8 +33,10 @@
    -
  • YiiMP is a pool management solution based on the Yii Framework.
  • -
  • This fork was based on the yaamp source code and is now an open source project.
  • +
  • Welcome to your new mining pool, domain Mining Pool!
  • +
  • This installation was completed using the Ultimate Crypto-Server Setup Installer.
  • +
  • Any edits to this page should be made to, /home/crypto-data/yiimp/site/web/yaamp/modules/site/index.php
  • +
  •  
  • No registration is required, we do payouts in the currency you mine. Use your wallet address as the username.
  •  
  • Payouts are made automatically every for all balances above , or on Sunday.
  • @@ -100,10 +102,7 @@

- - - - + - -

- +

Open source Project

'; + 'Built with Ultimate Crypto-Server Setup Installer

'; echo '
'; } From 7463a87062142dd50a54c6bc13fe5ac83c6f82af Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 3 Nov 2018 00:29:12 -0400 Subject: [PATCH 080/576] Update index.php --- web/yaamp/modules/site/index.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/yaamp/modules/site/index.php b/web/yaamp/modules/site/index.php index b29754513..db359ec88 100644 --- a/web/yaamp/modules/site/index.php +++ b/web/yaamp/modules/site/index.php @@ -100,10 +100,19 @@
+ +
+
SUPPORT
+
+ +

      -
      SUPPORT
      +
      domain Support
        @@ -172,3 +203,25 @@ function pool_history_refresh() + From c892549af1753eeec1a6b6243dcecdd96d342649 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 19 Nov 2018 15:18:57 -0500 Subject: [PATCH 091/576] Update main.css --- web/yaamp/ui/css/main.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/web/yaamp/ui/css/main.css b/web/yaamp/ui/css/main.css index 747860ee9..0737f4933 100644 --- a/web/yaamp/ui/css/main.css +++ b/web/yaamp/ui/css/main.css @@ -225,3 +225,21 @@ hr color: blue; } + +.social-icons { + text-align: center; + } +.social-icons li { + display:inline-block; + list-style-type:none; + -webkit-user-select:none; + -moz-user-select:none; + } +.social-icons li a { + border-bottom: none; + } +.social-icons li img { + width:70px; + height:70px; + margin-right: 20px; +} From 8a0261930e4c4e2dc04dd7b50b69eb26478c780b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 19 Nov 2018 15:37:53 -0500 Subject: [PATCH 092/576] Update index.php --- web/yaamp/modules/site/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/index.php b/web/yaamp/modules/site/index.php index 85b13fd47..bb6ac02b4 100644 --- a/web/yaamp/modules/site/index.php +++ b/web/yaamp/modules/site/index.php @@ -144,7 +144,7 @@

      - +
      From 7e9deb0ea21e03b3ef827484980442ffce403206 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 19 Nov 2018 15:45:13 -0500 Subject: [PATCH 093/576] Add files via upload --- web/images/Facebook.png | Bin 0 -> 1892 bytes web/images/Github.png | Bin 0 -> 2824 bytes web/images/Twitter.png | Bin 0 -> 2574 bytes web/images/YouTube.png | Bin 0 -> 1907 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 web/images/Facebook.png create mode 100644 web/images/Github.png create mode 100644 web/images/Twitter.png create mode 100644 web/images/YouTube.png diff --git a/web/images/Facebook.png b/web/images/Facebook.png new file mode 100644 index 0000000000000000000000000000000000000000..7f49bbf5ae0f75f80583f718bf7b9879bac54902 GIT binary patch literal 1892 zcmV-q2b=hbP)OtprZ*? z(1nH$1tcDTbaW&SfZz?j>>Fgo10-~zA`bu}5mYpU3M!zXf+B*7?wcEK7L-k9?1|^c z_Bqlh3yWapo^yYE?Xi6UI1L{rfB*mp0B{v^Ha^tx@$pvhQ3|d?aFzMnqpxK!2(CW= zyEpp!;NYNZo2@(x$SwvSTTFC`uO!jui-ge)MDYv(q)+-T6HcGSjBkeo&>=wtV(35s z$&pT;y&qgvg;1V0C{?tA>m(3E9|D-2^a6YNVG5x=iB$22qC+5t0R*5<{1Fph5N2b* zLTKbs2p))cTL@l`$gf*U{6rxHBB(4yySqMh~^DdkbEM#21+OUEwx5EQCzb zf}aujMEVoRA7W?=wu#*lfW7`dF7$wZ(Fm^JX+{GtMe-@fpBXrw&!T@&Nvp-|r$jy# zdbc273S^^Owwd_?2p*&wd|Wy(yweG?)g{}`TmkUdz6m~KqscZjuLcNioQSW2LoH|p zH9^go2mtc6qslhTzW_kKSt9T?lV1n61F z6G@&1@{8iD$%Aozx}bLP`m7y8e@60&^fQp335K?34l*kOX<`TM-Rw|e4$@BnJbifv z4swA?+$HH=O!6u0JR$VwsvcO5GmRYg)v%^6@)s8u#m2^lSXo(dim}JXM{#p=Bi`QL zbkzgINhR?JpmWGaaE=4P^CAZ5&@1-^&5fF+g17m0PnXq3i$ATx1)d$?{_;2$V7l$ zc)zhxAo6V^nNA?QKfuSwhj@8;5wEYWQyVw)^Yg>z7GY^=X?SHF1;p2mCGiBn+p;)4 z+ef5R%a%T6KrLPZHF$C$fD&;Swp~qB1lV_#_|MNzadC0+mr#R29QNbZ096;srx1U7 zdTImtksSIV;or&Pk39eU{9L@hzgtrbhP`?o76HmGdjIwHwa(eOyr3LM0M2dRK*ZnQ z-`n_TY7u}}`W9Uiz}?-Qt&dh@PNgHjmW$!vlA=$ja5{(l|2^KP0#FufYiq-C{=&k- z#Q*>G>sKD@fR?NPoNNB56n;B9J7RTp)wD+}siXks1R(4E#yp09xEZ>-uy+cDmRU0U!k=fE-Q){l)mZ0uVp~m^MS0 z2aN9`0s%M{0gwV5j{pz=A^-${2oNrS0VtdeIi4~e$Oxbh3TH!(r;PvMcFq-#tW?6c z(7U?2l3En9xw&cjqL4@d^n_*0!pS3}mU78@Es<~VvalX%0Jnh}z;W~=1(5Y|=0I|o z#H}x@6u>_3hX5desRHQ1Ue=+fA^_9@_Ms~+06vN888)*9&(ls93!4n;z;4!HDwn=$ z&H(Jm|DgilQ>f4tG#`Vo6UCy|1GHd2;}ObXlmJd(KjU!{TL8SrESf^*q93+TuuKFX z{DB>fMI?7J0zffnXz?dAl#dhuzes>6V4(NQ93?BeD!73tV4U|iWPVUe0Ehy1dcR5p zKoqdh`;`QMC}5xWt4074L0xE^CA55V<}7UR%p8eC1i+~2x?5eFHkb^}Hc;k9SpdAS zP|H*?y@=6nx1Edx^vv|^8c!$b#97em#raFT%fyqwj$(N#{FYU6|12qBR1nr+_uQZs zhy2(AU=egwh8sX)XoSu8Cnf;KZ-LpuEYW8UV#AyD4)`#lThs%Yb zYTakzJ9#AD2my?VfdsHGzNVTBIrjEeaGgZ$%mD$+-bW~NbjW)2@XSNGURFan=L9e& z1`@y)3!;=lsu=B?M0@Xb)9l(o0BXI35~qqXf4iiRItJo<-l8}98fPg0)&U1cLI3~+ e062^P1sDLAQf7D9{xx~0^szgr;tDq)96?2cQxORX(m+LFK?N0imYHD8 zdOb6{d*_aKuC#Jqo4q^d%ze#kK?JF^EQBTq1PBrc5TvTIIFB#&`0?Yl_@fbDOYyZT zf2_XOkx_gN<=2Pm`v(sm4Cbw^qB#J2IsRCaKsV%7rVQl;VhmzZoCE^UgWi&W<8#@u zIv_v~gow$|3j`<+boA`?_}VZq<E`YBkXrp(s&HN`o{309i$EymYcSQ=?>XmFee+eLS`~85Ywd~6_ z^e+a86$kJe0mDM16UPLb-dKPDe&Mnq+mt^60{DKBV4+~}w?mF!ZidioHlu#OKVTOF z$cQxrd^Cd6afb~7WX}33;6f_5iWo?W3IKmu{4Vl@JfBujE?&u7F|6eTAD|xu@SRA~ z_7VeUSpWuhLV4F=P$)5=cL8$v@*rTqLfW=d(j!aoVRk+R)6Xg%sM`!9+b#{;_XYej zXU>QV7cPiPmoABO=gx_3^zqnux zj*pMU(a}+2B^U~@sh4H}WU2QNH{h>dzn%b3DImhzw{JNTVaH_3d1L@StH93{@E#Ds zC?GU(0S~!=4|5Fgi!}AN0s_|S^@Id)4NL+;V6|PC1>n;A0eG|7OaeTPf4^XD8g z2W=}*^QHGAWxId>K3ni1&<#4O^pb%U$Zr8S^!}??uZr8ZZ+lgldHM3Cc>n%Adn=%0 z0a^ikbAis#-LVyzx!OpF09yfkZ%MF~ivV(4mPP>ITM{%RhSnBf-BrLh58#iJz+qsx zo`(P%E>gXAyDjET@J^2E7MU0>WSIY!3j*A|dske%cyZ?6q40w1%a&3djJ&if%AaF8AX%bqC#NH;71Xu5tsZJZw8t8#1>5kQ#9 zug80DT2Gz^{P^#ola8OiapOiZtV~=j1eX7&{UVxT{+Gq?;t!eJym>PLO}F>Ie*HT0 zZ!lPd#s)Cz(jBnDy#P~PZ{EC_dGDP&ceDqlbo4Jl>S;5Gr&)kCO3l<*zKJQGB>)U{ zc^kpKxJ)L1n2ZMET^-CR0Hz(?EP&Mi>-f)k69@0SYLW($6@TETF`Qa8!8;SDg$QYT;$^C+aRHwKT4yl;{GX{GcRaiOKoW}THU|KOl!GzlYP*Hl?3?z9^0GoQg4?W8!qIWsAkwyTL6RT`S&UB}Y`$ho5klGYM?BrE^(1Oe4S{l?$*5emKt{w$Tl3Kl@l`q|fgnc`Kqs3Z)us*RA_mCw@@Q;MV+qj3mXyQmO99%r6sd>^}oafkYH z|C@M*^U1W+#j+}aJ!&g3O|Xa(BtWC7ojOd?EStv0J!Pe64toDoENiAdqf9H1)!-lj zdZgM)Mz<03EF>vo5sED#%kcl11dyjtjVQI8wQUNvk%3Qt^5n_swl8Jo*<}Q24z`9F zWt}KCYcQxosVM->Y9K`WYDqPGvs#pyMub`a%S5Ll!FMq5lZoLh0(7ahh1t#Od1_My zxBz4Ya0wvB)2B~Q?}dc`Ik10V5yh&a(p^XE8oSm6h)u^(5RMHf!B*?jdJ6J!xPtN6 z0aidA_cq?(#C7&eD}r}&AVZ0vwFQ9eQENSGy*=`LWCf}q1EAGjerjhhE+>0A-p^nr zb~*$g4+bFs4<>$E!@(8YyLT@kLt3s*yy|u;_;?3LL>%d)^15dRZ3{=o#Q{X!jh2<) zS7l{b1^|#p@NC<8et5RS**;pw$LUT9+jU_Dl>dD8?3q?Ws(_G#&)3zt#NNNF^M_gl zkjshoT)mBQ2fpkN;Lz-!`hMMW15GA{IM*WQTowGS& zV^c6WJ{}FLZ~Mh%ru&f7bc zl~Dm6KxeuIOfT;JZ7Kq=I!Qc;*@@w{S-@mKxEb1=kLkAo-kon>F5F z8Udv22nVBuK~7~TF|d{>uLkmfsdphBaN_q@rcL&wvH)rZaXa8aF73SF7eW9@f!lkSQd`cAz^A;9-M@4HF#{~Pr!I{GqkxmSLp_aDrEn=jC zoq!d8@Jk^;Ab~&Nmqvgw66^%*3i0`+1=vy9+Q%^g;(`5uqjj`jswIsm-a;N&h!Mn4 zEYg#a%<~6jKZsal@5e3%ty(PdH5w_!x ztqQn>WO}{MvaL!HK#~C9Kb%t{sC5;)w$r!fo&a-71eUuy#qXi!CC0tI6JOm~J97jAI@_ zRHVXbs6YvViYk5q;`AVLpWvD&xQX%rF;sL(0~LrwP|;v2sFE~vNY{dj?#^*$z;e9y z{>*&y&F*)k)g~c0yK~NbfAg0rL8FmM6Nmr=A^<^Cu~f&G+S}V(*SC(oTKZZuKepfJ z!AM_2^YyX){>hUkM|Eqfqy}WS^=;h{-7%L>49x{$9BEOUi2&$H-!O#Z-VXdY5Wpb> zp~Y}00`NyVdiJKidId~5HQ*`+`g*R#Fcbk)C%t8Q`BMVZ?!#5=!a8U%j6?v%iQhKF zw^ZC186oU&6hb1zH(Lk^Bl7z-C4Qz5vFf;}0Ut=R?#Fx>P0R zl!$x;dY^>+TtFLrGHn*W0Q8IW^zB^((mR(xTfH-F7q0+JZoe;lmd3tm!}wwV{oo+J zCmcG#K*t1I(O3W>-#L1wP5BEz$d5||sbli{LcVtqIE@JshvfGp;3ES{#{)J3Fgfcx z;e{0UTnr>74#;n-^CFMr`LsZ}c(rQ9Fs(>FNIwwrgJ9hDhJ#>1AO?1%yc-T3!vVbu zFvFJz!T}3(%T7s8N|Fz=b1J5vRXng9_Uo~&`ZcJzwEfpsP$d|ych5=!b{QBffwCJ{a+rE?pWEfAi+e zN}u!j^XCiifzQVKfp{ydgM$N~E+m%~$YTLED0)8{1|ooO{qp5Y5c0d-uDW{lYUR(m zb?esn^Y9+{JS*;Lx8XT{uzM>EstVw#@5V=Pg+>DI-@iY;Q;Xo?!-r1Dw}2JNvLpx| zKYaK=@mfz82_Riy{wX$H8V6dFfCvzPQNdatD!hIBR{i+#gW^wh42R_epw9Q?AxW{O zK_voM9|(Ywe48!6;vnYm{P#DjxPTs&|D6Sh0FC4`FuZf;4hiuv`yd|x>4*ss3?k-1 zFz6BB@bAJ|0Off9Nkc<><8Ww?kvsDLbhi2S)+rWxkHtq4c`ikNn! zRzsysnguH;WW1eSf_ltq6HCKvD@6-tduF_E%mwrO233=KNqJd z2mfETA_fAHDL@EFrChlNU*x0b2O>X{)2uYGLoEO_P}v@d{|5o!LXLfUdOE(l&Kjx! z&lvc5I&1|1eEj(FcNw?}?8qEG3&OIO9lxLMmDFy4n*fp-0U&%ukV&5~^f3bHOJME=(FtIrM&uSFc`q{d~j-Nd4@1e1m#_CbzQ$KtAyU6**fEu;o&L z7qs#SfV={TydDJ})cuhk*HHwBHyB_oZxBchJAQ8cG<;^rN}X#E4gVI#5{DQ7gxkp& z)=$?B0rP+UF#wasX@UjF6$6li;oN#}=_fa^5C8%{PF1@mSvWRF$6_jVT~TzwNMi-S zBvq=li<{n4h>ZZ?0Q)5eZ2s8^zy^eM5&`$vCgu205CKNc zVvh-6(YRIsSqs269%j&BoR)^xHQ3<11&@glk`0nf_N|6kyC)>r^e zty&NLq*$!Ud5+&AK)4JsjKT%L=LuMP4g-xWUoR| z2&R>L&d+>a!!U0U$VvcK1Q;kn593%10P)OCePjmYhmRNRtLM>)Tu1s zo*>K!a9l(HM_k_m)&My+F1vLrs)lxJHtJ{L?)MjQnq~wGXZm)={f&?+qVZu7LXeNx zg!^ER!CBVnV)NDoU{9HCu5SdwvAoO0MiFJqK4OxHW;17=C$zM{XKZsM9;Amb`Idb2 z{K%@5nbqC7dj;?9?fs{iY!YpkeOKMbw+fJoMmTM4q|N_dWh?+N2w?@#v+W+c_8xL% z(C+aUQ&n<`LseD)&wUBNZsIWMM?p5XAz+Y>9lat6_OdusrCfk<12`ABU@zuYdsxPiW^ct~+k*h3cVrpi75^KN$)i`d6!;h8r7eHRu0 z*iq+)50IsVc6TpW1)B+AXHR@xW()wP9VFWw!*H+hg4B`WOgXUtp{&3>OdjDjD|@iP z8|S6jp?iN33lPK#EQ%Yf*{=Kk0={}bkb73JSyZ?y?aM#%FLI20nbX5DU%M^s%n}&& zD|84#nRNkM(#~vAn47`^FcS+8rLEcFu*`(sw1Uz`(&nrJzfzXDlmJYSA+CUt=`Rxa zxv&7roIlIR!ei-Z->W4} zDBi*xMu}4srC5{?Ba`PJ`Tj#B`vjU7!2$&-8!rahXq9TOCbEqpP1Wk2k^!W7K-=7N zQQ>3d0%o{`4HFlLOZa2*x2lZlv9|zI)&MVxxoa}B=)4VsUxfz>kvA7I5Vl-ai~AREB}%n7g$fZzt7_XM922e8cr>;r(XMMknFf`}y{Bd{PM+b(ZeW{rQQXQq2* zy5EypvqmiL>G!&-y1Hgs2mk;8003NsXX8y>US5{ur65~Qwj%#{^f?Fyvi14jz0v2> z)6*^lkUp~W@={`=3*2;~&y9r9m7;io0L+tKX2R*3Pq;fIfDQ>lilGAm=p&tG_K9p2 z1ygPs448HuuHu5MgA~I60#GOZoQcngY-7MesHaf~9*B2a z2wsZFuUSg`R3S(a)F6QIn!S;NXg-P6LpAB#f|nriIVQd=+(w6mFmOfyypC@;VD44i zLN$pzf|tOo|BnMb;5+KF{WNI}JcHzuk8fviJ)cDW;Mi1(*)v3biOGk_5AG6eRF`Nl!XqMfK2 zLq8(h>6eL~?(Xgm zn+v$VzaKV3*qQgbnngk2iHRN_9UVDC{z&X}&xUXkWff2{LH_3ErgIS*-LoMPR6+@W z_xrU5f8^_3B>$@jXbf}*gUqF}1t{w7+5Y~%^J_IjV^9nufU@q{Z(F1v1~di+tbm#Y z;7Z@T&K|9;tqH)`Smc@0z!spSyGOPpc``H>B^3b_L5p=Lst5q3-u9sY0YCtY1;9n0 zR)O;Hz;teX7iRzU^|ffX+YrJOZl?*r%6)&@l5MqG;^yYYWg&dycFDCBz~kfNux)K^ z4L4;ROGXug2*3%9gh2HNB!uPVWhcjB$@LWg6=*y?Jq?9G&2k|Wf(XF5+P}}w&tZWE ziNSIqq#ObXfeJby00%*_09EeT zvU@rCPN5}GJR6iN*xTE)Dj=MEPy_;)LA)zTA_%}y;voRXiH88h-%>0h-sSSNX#$`i zAqV2E#2|~F0D2fN`&R(-1fV?*Na)pRsf3}i=mr)5pG5Vd zvo~*VZ(!csSiH*I{T3dddReQ>X^I zt$^)SxAQ>vZeaEg=A9_Es3^3lyLVJ|>!Jwgp6T8VU@nJ?1kf_kLmCK!uTD)IbgzcU zU&vvQ*TvJjf{i>ch?hmjj=nViJM(@aNIk%XFmzHF4GaZEqreESi;s+pMZXY402Dy{ zFA^vdL$WAZ@E2q$zwpT*evse-sL$vArl#cBmQE z9|6JQE*|Sx;KkiL852F&L>1Y`vo;4yTx-_-d9o{78Q0}I;%$)cbb@H)S%`-?nNcf=V(5&@2-osYhV zDan&)3@{}opc^_6*g%>G8k+-Ceqm Date: Mon, 19 Nov 2018 18:11:24 -0500 Subject: [PATCH 094/576] Update index.php --- web/yaamp/modules/site/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/yaamp/modules/site/index.php b/web/yaamp/modules/site/index.php index bb6ac02b4..f3fb3b692 100644 --- a/web/yaamp/modules/site/index.php +++ b/web/yaamp/modules/site/index.php @@ -136,13 +136,13 @@
      domain Support
      -

      From f1cbec4979f591555c910ec4af17e5159428df63 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sun, 25 Nov 2018 02:06:19 -0500 Subject: [PATCH 095/576] changes --- web/images/Facebook.png | Bin 1892 -> 1951 bytes web/images/Github.png | Bin 2824 -> 2922 bytes web/images/Twitter.png | Bin 2574 -> 2675 bytes web/images/YouTube.png | Bin 1907 -> 1931 bytes web/yaamp/modules/site/index.php | 3 ++- 5 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/images/Facebook.png b/web/images/Facebook.png index 7f49bbf5ae0f75f80583f718bf7b9879bac54902..8751f5ff23be5134640d5bb17dabd85668ec742f 100644 GIT binary patch delta 1899 zcmV-x2bB2a4xbN@Nq<2}L_t(|+U#9TXk1kkzV8uQXcHJ{gvNzVKm}b*)Qv7W$yN{& zyAvccy67@ltKf8@>lEB{VKYH+A+(uQb(fh4T^TaqLbQuaH@0AefmRo;yk~O8gmmW3 zy>IS&@BVxrJf=xQ^4|Hr^K;L=@7`DdK_i90*Nm% z@v9~#kUzk{7Hkv0BLI8-7hLE8&tpqoH}i}JQI6zOj^A}~JYPir zU@fl}bDR_TROlUod?k>L4%uez3qU?dO@8bJFuXGfvVYYc+s<79@YsGEe5S@W+t9rl zK;AeJUjv6m(3CYn-I)jg@{Oa$Hnm>>Am1$!#D>Xlfc(rwV6-NP43b|%!IvATb=h124H^#l%EXWPtp#IBD`=oS!eKUA#1H$1t9fd?I}pn*o1B+>aqaDL zP>k*W+!J^19f*gI{xVe$5GQMyM*x#UJ|e&Q)%BoVxAy5>QzA$;G>lVvzY&nxA^!|o0xOz9Vu%Cks%DS!MSc81ZGaIP4tbfObPH#Xb0&Jq{cLKw=tIP=i-tTV| zh~fQVM}ZjLA9fT_i2$qcerKb=#J7!9I)U(hiN}9F6^Fk*9yD#nHE!lEUl=sE2urWO zD6fUWqkuTsu_T=Ucw3gBXZwisZ|)w*&p(uYo?5(wPp%6a1W+LkleVjw6am&lCH~nz z|9^@vZ@2#^)L{^Z-Ly48EkyDu#8Z#n1M(+w7$=1PAdA1D=Tpx2r5H?l^*kv8R73Rs zTi-q~IXh%2*4|S%b^M2`yYSt_0h`Asd5BZ4l(?DQuGNO zPG^w+PsjUI0IK4>Yp)HOJqs_)jr{+s^MA88)&Wgb0R-3ldHCp9`DZ`7u{;ofW2oq) zfZzn6>iy*P4wA1ffV}pmu?fGTMA7FE?E5C{aQ0m1@mfWVKrauDtgcgaDo#KO3y;GXd4?0nfWT4!1Q2)%fB+ByCJLYr3a7*H{Xh%RR}nxL6i$cPOBZatwdc5<3B@D7{`~#K zpHY1wWaFcE3ihpauvVr~v{;ccK7_ zKF%D-4x_k@Rh0tx=lu`>1Ta0})l?A{jQT1RmZ_pcex>(X=Pz!eR z24lI5b#n&bPySC70G~pIuAuwqC!HuZX+1y__H!PI98MCz4(#VVc2Wy~_kWm0Q^;L( zllBQ#i2#IKu%ok>$eoG+Pz*X+{HYA(CklXHBtR5!(EC-6l2u(5yoD&>ocC|3{GgHm z5C#17ew_$_DBz*@YY6~Rz(4QTjQ}KqhA=ow==tW%McAOn9EnT>z^I$L+dKCTf){{c z8)$Q*EdX9vXk@C`v$J`$J%68`-QejYtuzaIqcnescbPa6*ip=;!f#P0_fL}oh6Q0A zcDDxgG~}li0E?idGu!|&!&cIKe`W$;+!UBCED~MjAT^?C?|=^@Iz&BCNZwx>x7ahU z2ryhhyaqmU$J(^y8xg>np&^RGe2c!eiC<)Fk05zN&1v%ypjLOWt$&RmGJSWlCfF8% z9y*-^nv#5@k=FPwVSIy4aAiOFnFs(PaEJWN1aL+Ks0qyE{LBjMDC@hIH38KF+u$*E zwV!Dujq-R3KCp0Cpjo7fK9BR;S^uG2wu(|1+?XN1s@9~%Lrg~9TA-POC^3xGvH}(UC~G#eQ`Q((HVY?vlIaD lfP*6;00062g2jIV3;=!?Xq+<9O7H*x002ovPDHLkV1gl!b+-Tj delta 1840 zcmV-02haGQ59AJzNq+`OL_t(|+U#AuP9r@O^^B0HSf!w&2~^O9h7JWJ9)NUoBoBb# z4ZiFfWW@s{bfF>-03s1oG=vH&prL{yf{N~&8*UbqO=j$g=g0Or(kKgyVCJ54e|+t+ zeE~QPA0~hR00;nZ6>~N|)ba80R`5{@u0n8?`P-wfWiSY?K7aqaH~RYE;Gk=ptvn0J zE(RZ4OmvB_B+=)KgwYK|@eBc^Px>wsPM^h$Z-)fXAwdLU=s*C;kxrhyA6!+1P@Xm@ zRkVWZBoIR%0+^lj0(<#k3ZXrTRPl$RLm-9$1fWj*5ffh!W@ErYXyj1{9*B2a2wslJ zuUks|L?HwssDDEM-(&V>4yySqMh~^DdkbEM#21+OUEwx5EQCzbf}aujMEVoRA7W?= zwu#*lfW7`dF7$wZ(Fm^JX+{GtMe-@fpBXrw&!T@&Nvp-|r$jy#dbc273S^^Owwd_? z2p*&wd|Wy(yweG?)g{}`TmkUdz6m~KqscZjuLcNioPUU~f5 z&A$LZzF8vhHIrWl`H71_Yfa#3B)^J+FEvo>xRo0L@R;=yyrhb49TQ2O2J(yItI30L ze!8G`@%pSCLw`o{iS#p&p9zMxXAUwe0%>9g?cMB9Vh++z0X%(q1`cw8O57#sUQF^S z>^vd#=YOgmSdKG|9QW0*rY`aq7Z=6G#)eo~S#gT7$Hzx;b8{o!-rjW81H?%s@d%)E z$VcSw?d>`3y6tvbmk44F4gHwjuLb1!u0yj8l)3R0y}vFruHJPm?5ALZqH3$yS0JDA z%pvNn+~ZKCH=q&$j!^X*fzjJl`UC*)w>Jv-@PB@{qks?ZcRLEmM1Wm*zp+su@@*rT zP9VHLz{kgjczJmdudlCD8#nXw^TXyAVQFb;cx4?0#Mh1`@dUuzvN%24N2F8BmOf=b zEnWgOcyb_s5^)%|T}@O3*msrq&(BYBadGjNP=i4n_T$z7RTs&p5Py1lY6JO^9Qq;Q z-+#&Ck39eU{9L@hzgtrbhP`?o76HmGdjIwHwa(eOyr3LM0M2dRK*ZnQ-`n_TY7u}} z`W9Uiz}?-Qt&dh@PNgHjmW$!vlA=$ja5{(l|2^KP0#FufYiq-C{=&k-#Q*>G>sKD@ zfR?NPoNNB56n;B9J7RTp)wD+}siXks1b-mw{p9rqk}ofSwDzVkSpcSD61P6QUo8cU zCVLD;Nk#ye`V9fi_!*3Xi~!1@*;@R1E+)ggF-;lGgJ@&GOOD z$l&4OL27xJDepZxAplz3LF@W-Kz6#=6agRwB!C=F1pUSMy8;kE0+=>KmOAva+t)eFRK*5 zKJSMBAb_a?=)qprp{F7M)B*OPD}OBjK8flXHnRrL(@qx)n+)o}Zq{Hbm%eJw0PM;C zp#tDjsL&NOAA_(H#iG^&v|vBu5z1kd08U^(<8cyO0KCU6nnLEHAGS}hOavhOfgO!S zBzH0bKrv`&@h3Bsj}!pENPs9{p!drhB`dosxPd5OocA|meo#sPhyr$czkf;uKoqdh z`;`QMC}5xWt4074L0xE^CA55V<}7UR%p8eC1i+~2x?5eFHkb^}Hc;k9SpdASP|H*? zy@=6nx1Edx^vv|^8c!$b#97em#raFT%fyqwj$(N#{FYU6|12qBR1nr+_uQZshy2(A zU=egwh8sX)XoSu8Cnf;KZ-0T=!Yt8e4r0Tb^$z$jqFdAhndJTTX^TD6iU6Y(#1-(7 zIx4f0uSEbqhK48#(=GbCI)0J1J%WN8YR#ID0J*x0ZLI~K?z;YSOehd38WbHP{#j`3=^HD6 zA3~@HABPU4h2ipg)qmBy)(e0|K;$1;DumH{6^*#dx2zX{r9#Lh@wpbjm=JbZ2&Nrs z-Dl!Ec_iKl0gQ=(1h6l@rkV>m_V!kAokZ=-0Rhb3M<{c2$a?hf%tN_eRzo@G1TZEB z62KM4jfy)* zc3!*Iw{K_Wz4y($ee)$R+g;dw-<#iWzJK$NF)v=cc=6)JOMek1=*EW{nEZZ_zm)ma zi?{OQ@V$yO_*IvG&xG%1Mqiuu1aJ@RKK?Q&fiBA{OR38X#F*x!nDqpp2YpBaj@LfR z>VN<>5Q3AT<_VA;=;+z|_*Ky`<B22hQgunw|Y$5~>fj{1*z(*2+lVIEvU@2#xav++wkv)vqt}O%> zf$x>T53yoPO%kC|7y`&VeyRZGUdJtr*r+1}7JB_58R&WWzfAD!Fr_sJ2*HPsKbgaP z-bVdkn5x7a5P?4^!S^O#-6afD1c)U9@GJb~tOs99(0^8EW!vSK05Z3q@^~7{lx)NN zxd5&>fUkHAQ;{ln2P3&5fCoQ6BnUkC#U?>1W$?#6_?b#2?U*1)5&Vh|_{aoR!>Tg` zka_-Dj|-{nOruT^qyT;&f4SiEd~!jtXj{^XVJRW_0Nq#k?1*T4iGj5s5Cc2Dwr@|$ z5(9b{Ab*E+PkIcTkYUrIqW0m?{`=7-+fkG zum-0u&#@Er--VTMP=L**%q)N`LmqMs_{!_gap2dH-uLw7yR3TtmWxCs@9mDi84^|+^L+?jqe_(fCt|~J}&&-O9!F4O3 zVgZIc`1%5!p}S=(&~e$F3IRqv__-y)Xd(j0ZCT15{M?eDEHN~;0Q+nOeBA(kD+w$H zhWnBbpkgD{n|Nyr>o&nNrCFlZkXQ^?#DAFoAsYnvXzymF-h%2|^}AcFe)GN<$wOsu zWlxDrPgDRgCUD~79Wh{p!KXNZZX2Ik#lHUePwFOpyl?LZ7k@qd$xl)L7&jO+K&>f8 z@o=fgiTWK`aG4kB7J64WXp>b>!~JmIrF%C8!^S8}t2`g#0SoCNu&n74fOO{$fPZ#i zx7t8f)Hprf!zuurI3l20xA^zX=HIQoH>%Lo4*1r8hfXS%YyXZH#qct5wGdc-s7wGk z)0Z>~Ll08zxvd~ZfdL}GM5D0*jJW3hZa-ji{=aYGPWsoc5`f}5_RWosgFX0t6$0QH z@vQhwLg@phQ8S3!S%5)G?V4lx>VJbND!m7Qp)PMC_%1G;2_QP7fp}I6a|(cIRW%D3 zpzi%e6ARBgppyoY6@Oq7RRh0n5v~uL=RkG5`}_?&wThp%ZkYXoEB}fs)Ne)1BUhnmej-t_pO6 zj#;)r+F~sRfdA9=bG|NawleWk*24GYcKsV4rP2Y7f zSx{{s4GR~$uz`db^X@LsQPU!#ZszD&B8#sMw zE-?t$nvHUi1@47=CVwSg(q~VD06j6$Vui*HG(;pEl|EsG@6j{YMR0`$mF<>O;k(#| z1*?HECok=ty>U-e__l9eo7$4D<}T!4m?B^l-D7J7eMEK9mRBTFj~*We&Q)BpAeccI#dCoY&TBuVn!vrj!tQUZ(-mk7Q;>iI8LoCe0*Hb+p~4uq8}am;)-wySYrMDXO|Yg3kv~q zq)}uEPZLWc-LI^*4rb`M^+FPWKj4C_woyO25YX=wZDwq@_q&#u~Q)cc`(?_ zl^=@2PrHU|p4Ib;AVXBHPQ2>2E%aienfG&>gTsEt7ZZO2;^zaep z$no*W|KF|tD9XdA5K`^9B?fdZ-F0!(suA5U1SWUkY2isme4vDC%Gew=Tq`D!9Q*c0 z;#s$t@q1v`CK=$}6SI^Y-K(g^d;c&M0h~HX+>73c;l?q*vVd^Jx4S#0-voSP0!R|n zbbrzfFPX_i+<1Rx1dwu=Sr{$!vJ{U>42&g6s)0OU>Vl64toZ$H?IwFtS%7c`@vz5( zT!xc^p9%pa38sBeNFMY}r}0CnZ4ki~swVYEUew|)+19B@khXR_CYWLt&Kxd?R5|#m zTG}8BEjC zm%!It1U?r8SVjgAU>|D^F!egz+pGLK-f3qJPk`iggaK(CY-bO%GL@ULk;fO30L#b# z0t`w*lnGo#xNj2n-kYYZ+Ia%#)i@T)(p3z|kINdaqrsM@yU&F0ZRhM>ym;~A#fuj& dY019=3;-$>B(S|*F;oBm002ovPDHLkV1fw`QSkr( delta 2780 zcmV<23M2LE7Kj#*NPh~dNklKt*9e1r>XinPAL%Ju|y|=Z<%-v~pgX zy*ua3ea&k@1gW$vgeC|C2oeYoq^hzwk1zH3@#D4lqY+t}R3kfnSoqw?wt2CyC(1 zEz}(5@t*?ti6m_y+ho2ifb8{;WS|%1U)hbX9ZG8u5rPjNf8b$0@1lOtrYbSlh`>jn z_b!01C1|5}vd#P_K>Q*b@yDwQq<2LM+Uk{TJAVlvbAS8&fTy+W%Qo~c28b00@EZZc zLZlPN1e@MifB=5svLV})KLG;xevx3IVDPs?j$dwu&}=rNe!o9p7X!$MH3WP#g3@t^ z4FP1%`YPZ;Dz}OlNQw#oe_8x4@`OB}R!}Zp$y+h3U&;Ipu$k(r5#g899lCQsi|1Q3L`zAhr{`}X^J%|T@NxO6l;6uuH`SRri zaC|DjZ3Tq*`0-;x2z<_4YPe|G``HP4_qA)+#DA45SCZaclz>3^zqnuxj*pMU(a}+2 zB^U~@sh4H}WU2QNH{h>dzn%b3DImhzw{JNTVaH_3d1L@StH93{@E#DsC?GU(0S~!= z4|5Fgi!}AN0s_|S^@Id)4NL+;V6|PC1>n;A0eG|7OaeTPf4^XD8g2W=}*^QHGA zWq-SW|2|vrAK2(8E@YVhmJ0&hy?a+&ynlFc=HH?4g6qqdFXHFVpGnPraglD{OEo5d z3j;>8(o^Vm{``6I;ll^&CjGD3Y##Od{o_=yBAR0Um&Nbm51HJ&c{2e`xA(t({W|k+Fj$1f z1~BT<9k9W@08?FW-n^N4@0~k$v<0Gr^)gQZzkIuZtgS}}m2vH+%m7V7!j z#b!aN%e1y8JP{wj_fc181mHZsze;UU3(a3GncPz-5TIf*xlkk!pyJ{U0k{nS&5N$i z2w++r;PhX0K$>Ykq!Y! zjy<<2miRyb8yyJ?M?*F)z~-f~`iCk#is@p;ACpWC!#evsJsBWiemy2+ zQcW4d^YGlf8&TukU7G(a0w7x4pmGCYH z|C@M*^U1W+#j+}aJ!&g3O|Xa(BtWC7ojOd?EStv0J!Pe64u5+8R4i+zKBG)4kk#NI z0eYm`N=CO4^DHDOV-boiAm?HoV9HVwvmBPfAZwX>9#Lr=GkQgX%4oA z8D*U)Hfu1bL#ZhM&1xV-`)Wxwe6w1VnMQUnBY z1-JlY1#k%<#(&eNPfzcKg#bCQe_#>Cs-n_eN9!89)&z)6$50TC4Jg4@>(hD)@^QF= z@z?=YKppos-r&S__Dm~+cXA*@iJ`Rxfb3CgJ!`!^@_b|ksvrZP)n0yTXD}`&dpX|E zU?z4t1RxIvApj31ept_b}IOI2Y*LI9OM*WQT zowGS&V^c6WJ{}FLZ~Mh%ru z&f7bcl~Dm6KxeuIOfT;JZ7Kq=I!Qc;*@@w{S%1J}K)4y&osa3a0pFSck_0`IbR$S< zvYR#DUm5|V><9;=g+WebC^4{>D6aC!A}b=4jdcWVv_iF46WK1LEGFaqQb|@ z1*EuymW&I6OZa2*H}j0@v9|yd)&MVxxqoZDfPK;ibr;|}vj8apBCNr3#ehE%1=jSv zCBPUFw&Rbj3b=)2dcDrFtx6F)<+jIFYH`p{rD`a#aMF zAOi@nCJE6Xa20CbB<#I6psd;j0+`hn8q!s)${#ljT*pZK8Mio8-@DG)g9IsD7D5vQ i0t5*J2vSw~CBOiMKqIh2zE_O^00000 ziAv@;YgLI&E8KxF6bWZxAcz{;gg}7yd^hI?%g_5b zkN;l(pLAuM80X&eedm9jmnRr~4Ue0E1;AhdF!~jPS$wF;YkyD1kCoKCTGIYr*mDKmf}S zgcQRv3&0%d=-E^9Dn&5mwgFdBk=KG0LzM-Pobh+gZpvP#%th}z+v<5kg`PxxZZAxDNOn$mV;Atkm%;Xyvf!3HHr;+>;2Yl9m(s6~1 z094L;lXlq~TdAQJ zv-dM-A~H8##NJ;P{Wp6zO(;Yy73U(5&w*bC1Hvf#1I+X@`KON!iem>oacp?Ne_yM= z5?ed}iMt!GC-K8OuCRzRv?T87`M^;(IZYt5x}>utiNU4OqOgQf3&``2$o-M#;Z&ksAx zI`BLoA0jY}j`Ib&xqwkBc{%*^_mZg7n*DUI0#8QB@5-guBmJ|2FpUtTX>bdjTz`g+ z*uxeUq+7E@epfEN4(7igEROnZMKJ9M3}FqBYbS-yv@c4}zx2y9+i7k=aT?kJjM==q zyN{z4L|_3BNWp(6$rQqtdUXM*pGC7Dic^n*|6kkKiA^9}0)&86N|$ReMgFCqpSdEx zBd49BDyvhyQ4&Q1#qE(nE{_X2_J8e%Fa1~DSwqr{!}0wT$qE2iTzkG(22L8;2hly! zN4OVQ81%em0+NU>g(!xq1Gt>@2~%#85C~vhnP3P5@q;Y^K#XOx1)nfznKbHA==}ju z>@f+%2&gHX^2g)%_fzlh$Zfk8us-o4AOdDOD3>yfARi_MuwDU#=|^6C*9yMjA*FgA`%_nEs$D7x?L{0W+OA2I$l{PhX3y zgNOylhY^5v#H|FT1#oK)D}Y@=LI4Q-C{^urW4%t-!jVaYF_k*2xb^TQ3!tX}{@NxR zDJOPukLfHQYu;0ci~t(v%ztGq_@m_in-_|Zs)b@yFl!=+x?ZqvT|i?%m?aThm#&Qk z5JLo*Ig|F7U`@?)U;)H*2be*#cyBwkDdP3}+vM-DodBF4Yl?DkFa;bFMZWs!sh=jM z$s*uh3HtvQZrc^zacb3=>pT7C>><)~{CY;)Qn&xJH!L12|quR_C852|3TD3jlbQ}O}`M1b-zrj1jq1t99L z&^G;%1+Yr-2@nsUI)4Z;P#IyveVAU)U@8LuI?cXZp&V$z9pJ)xg7=59!`P6&T-k? z;+Xxbe{7PS=-Giw5mf-I6a@g{&wsq%iOCPhN6$}Lm9k?@*MGGIC$ByETM*eKdUx6P zKC2r@wm8vrPFAT)^M53c1pq28tN?m83O@+$3Wo>$l|n8@27@#-r2|xzZolj$fCWp%P`x;<6PjPsh;jCkPDMxgxUL_II7b8k0h}G zz??92QdqESHh(5gLI^JXdn54}g-pwMehBVFQVU@1xR@Zqx4Csoqp6Q`>b%{GPo+~iX^|B*aFzL0`1^u1n&*{JBK4Hh%+<{ zf;Tqb_?tsvtv<-l@PgFPheky?H_*Bj=!Re%z|S6}D1V0cc}=~0XD`l3QN_+`?++UU z2ACDQN05*x4Ea4;neCKE>Lz;sY}gNncCN~t%yIkDkNl$?BOmAVaKr)yZfBCfsNabw z{~=CzJHQ zl3H1Xp$?;55?m|_i@M75S4{sQD|4^agJ6LImyLS^Z8Tzod}{(wBB;ribAktux&du- zPDh20lnZF%62?_rz%Jpf$)8R#sz=@eG+6^YDCVy5%%a^kIN^ePXBMDMfCy_)=riJL zLVsgTKeYmA5JFiHT6bXB+|PwwxY0KPP$B^NGZ_^^u&!b@?)0t93m~IHAW1xF0W=9= zTnV9=GUBU>_+^U3r$PWtVt@dq#O_dYo^Wrk$ZJ88o{FMZD$it5b%ar69b9J*HI>S( zx=Q8xP5@0}fB?pnAc_`TMO9tcdvC>N)jy5}5UsXQRIXxF{kRyxb=1Y%af{X9z3ZHv o!O#wmn}7wtU;!}t75@t`0AB!2Ccig5qyPW_07*qoM6N<$g6pZ;8vp-NPh{iNkl1gr7@b{3q5}C!P|-M4q{3;aKna41Dt-at z^dNGd;F>46iSht3RCGxL6^KMo(O@d5k~DNk*Mf@f&T(eIa=iBb%zX3B?sufsCLuVx zbIyE!^Oq_?qmfDzhyVm406|l+RL7Uv+uK{$w~oGA`dTwTwtwH}!AM_2^YyX){>hUk zM|Eqfqy}WS^=;h{-7%L>49x{$9BEOUi2&$H-!O#Z-VXdY5Wpb>p~Y}00`NyVdiJKi zdId~5HQ*`+`g*R#Fcbk)C%t8Q`BMVZ?!#5=!a8U%j6?v%iQhKFw^ZC186oU&6hb1z zH(Lk^Bl7z-C4YXV5VQ#TB7i?R`#ytcK1BAg6}q;N1SGy?h~H4n#-R~H5Vw#9A|Irm z3i)G<+rqR-y)A(0_5YYaPjC@C`g%rb4H81~;o}b?%;!VY54uz(=9Gwh1bUx@{9HgA zeKKtpzX0@$^z`jr1JXN}KwG^tZ5OWqOm4p~e3r((X@A4`VgUW%AigIYI>A841Y6Nq z03qKwdZtbJ3qZ(^O9ZK7^7}%*cM&*^2@;3o_axvW14_pOHUcm?>pS6v6!%;VBqa{W zZ>#enkL3BZK)HCeYQ-?ENIpnE5b}dy-1dfpU_l@TcBH%;4jsb*y$dkImj}WD3v|m) zNl!|W4}Y_BDyE-RJg{757`dzq*cbBI#RK~!7C=(IdZmVG$=)yEiNf5Z1$%#AHE;HA zOlTJ^6(U$KQYd{$2h0^-F#G_Kjme2(J3h zEI?Cx|H{gWT3%jOH*VaR`+FxRC+h3huj6}BQGa<7P;M)*B)$J4K=|FecYpWxJim|Y z=g*(&&6_t1Nd@t@Z{HsOz9#|XwgL&4-j7B>BffwCJ{a+rE?pWEfAi+eN}u!j^XCii zfzQVKfp{ydgM$N~E+m%~$YTLED0)8{1|ooO{qp5Y5c0d-uDW{lYUR(mb?esn^Y9+{ zJbx?hX}94yez1Eh45|v?sqe-|aD_$!?%%&ZzEg|f;lqbc$hUwM$+9E}9zT5eK=E2n z7YQI;VE!pKT^a{klYj^ifKkC(A1b_k`&Rw<@q^+|bqt5)1fb6MhFSRV+0 zl6;#jz~Uh0@cj2TtGIw3mH(Xuhyab`Gk-9=bLS2T@i6-!9{}ly2@nh-=0Py%5#aFe z!dU?2c>m+akLUh7f~D85UymEnb?<-l=uxn&1MdU!Ap+0HoG&oX1*~z&%i$tGlxsgd z9edQ2{JC7F3(`Ll0h=D)27NBxSJcBEFY27k!4 ztK!y)7-YYB0rPUtTeDgEdVr7*&d1i2La$hj(vK1I=;Kk8ma)#82EWQ zYy|*({P^*A8Mq4U$Q(Wk!m^hgzki?ZmDFy4n*fp-0U&%ukV&5~^f3bHOJME=(FtIrM&uSFc`q{d~j-Nd4@1e1m#_CbzQ$KtAyU6**fEu;o&L7qs#S zfV={TydDJ})cuhk*HHwBHyB_oZxBchJAQ8cG<;^rN}X#E4gVI#5{DQ7gn!$~7}ihM z4FU6i{xJZP#%Y2D$Q1*SgW=qIZ|NsDun+(OKTcJ7m zuvZY{!L3mq0Sq}s(cB9u)2=Jz7B@~}fY8U8PXk4vSmq1(Si$TPvwyfv^C~4|uR>7> zrj>in&wO6PFmDjZN&r>_7$`yy<5&v-@ytzsCZ|htqQxG!H?TWvVdW222fN(VsVv~0 zAj}AGTtomzT;BrL068`;yLBt7hIVT<>Sy8Z_ZM-RW&{go`gX?sjgTs$@nI1{kdN4e z`(Tg3S=Q-d^VS7mPk)(hu5SdwvAoO0MiFJqK4OxHW;17=C$zM{XKZsM9;Amb`Idb2 z{K%@5nbqC7dj;?9?fs{iY!YpkeOKMbw+fJoMmTM4q|N_dWh?+N2w?@#v+W+c_8xL% z(C+aUQ&n<`LseD)&wUBNZsIWMM?p5XAz+Y>9lat6_OdusrGH$2aRWFPxZ|s*hYI8t zA@AP*%rVsFf3=DQ0Ctt9lfvxa3CgGtLP-BUNjyd&V;RrS!JVoq0HhHA`V0nPUeVhi z23P~ity?BdeVJolI0t|8(!bm;z_@|Fs(46oQP@Kk?54^-0P}8l6^q!%XW^MP|9ux0 z0N7FIhYygYgnxE-FIWYe31DYWd|hS?0Hz%z+a1GjuknJ^k>N}^u>hg0z&uPI;WjIK zu)!PWrP-l-e-R51#0o5m8?4!``~CvHdOwhRRd%;hN0o0G?J=MU=Aa~ka0`+Aou&LS(81f zEP$Os+!a2^(XC3p69G)5h7uIg27N~^KFHYy5&D4!RsE45U)*Kd+6fZZPp4x7%pU3q zPhK$4lIR!ei-Z z->W4}DBi*xMu}4srC5{?Ba`PJ`Tj#B`vjU7!2$&-8!rahXq9TOCbEqpP1Wk2k^!W7 zK-=7NQQ>3d0%o{`4HFlLOZa2*x2lZlv9|zI)_(vmin(htv*^4HmP3#q%mT~^5Md44 z4I}@vH?f zC4>zlgid6{4-N5$9Ep!Y08?Us05;Y6P;-lMZy)IExh6e|qF16KgsCH}8S4-_dpI+x z+*xs`RIYIXm=Xg7uxR0000FbJ diff --git a/web/images/YouTube.png b/web/images/YouTube.png index 76ac5275cff0c90003b735f53d9fc9b13cee0d91..3d28a07ab7c3453d0b47183d080d3c6afbcb00e8 100644 GIT binary patch delta 1879 zcmV-d2dMb-4vPrI&&XZLgA(9(t>M zFSSfhg@SzwxDYB+XdovU3cba0@ZHKijiqaQh@h9|6kk$kp`g@FNhuATzy88Tkyg8_ zojBeShy-Lw(d#si;!tACJFJ zgOMsj{(3O}{_4+<`>xq4bb#!t`e-oGH7+_a_anQ;278m7Td_^CorB4|SZXLI&F3!-@wvxg1SYYU-4;wwyiGw>Td z7J`vsAu>chk^Tha$B1pgHgVenaIgQG13lnXbX3`q^ai0I`838KmT*3AV*OxEYKb`# zBA)`iM<72H$VQLYX5|-vYDi0c9Cohe!xy- z<|fM6``dwk*}G*zHS1Dwn1Or*ehvnNSv`_S2HgNTo>_G-`w_w{IS@n z%|cjTWERkpApea|*1U_*sLetmXyp9ii-2sPyN@LuJx}rgb=@_4 z>wo69_j5HN8`Sd%psBm}yB6u^o%slOfovXtGkvQ%YxMfHcLPAo7FFgnwFhYEu8}K? zJSDP4BZ~m)pv5`Vvj_mG-tM6W0YCur1t4`djU)uu-mS(oZX+Lh|LE3s@W!+ZNqBkkXDk2@gpeu*@D}HV@ciJOw?hDgpoH-3&bM)lK(PV@ z;3;U9K(hrB0wr`p06s>^OIPB|or{j_UQXUAbO9941`&Vd=2uDtOU|@u@}LL=Fn@!1 z%G~uKV+jKAlz0fhbK)U@;4~GBh`;#0zv*ey1VBMT1;jgvQ5pfzIkE0C!`6R|H`CIdecCrg0mkRSMu< z?}q>&fSCdqz+Udp0FnftJq|E*b$^8#Oyz3&J)1CL=DLhf>);+2enm*{J9*axh|gW3V#+kFNn*c z3&&8o|CL1r&?dD~ z03d?$kgrVu=R|;*pqMdVTYw$vuD!{uVn?EVt)4WLXazr5NXLJ$SdaVKn86 zp)#ROmf?e_TaF50e6FICH+{=_0XQlID~Y#S024xJvJlGlsP&ME@7YLvDFiSf1`@z} zaJto8vADN)RoPdhmtxT?3`z)IN2s%RFg<%X=BeDk)Ktzp0Z>ecfdtTCLDU3>iXj)e zd#^9KY6k&iTU)5{P*LX}*D?$pqu^}cVle(5Zz%xI0k4Nc000C4c#Ho97y$L@oZvl~ RTyp>b002ovPDHLkV1lQfZA$4vn06hm;)1M$6vF@lP$&MJiO-2_W57bFr%?zVh<95EUW&-CSxWp=AxII_ zAb|0jy^(@wK7WbTLpAB#f|nriIVQd=+(w6mFmOfyypC@;VD44iLN$pzf|tOo|BnMb z;5+KF{WNI}JcHzuk8fviJ)cDW;Mi1(*)v3biOGk_5AG6AUm3IaZ3psZmtH3Hyu{w;Vhii0@v1YQi}=jG)W*7?Rk$)cU88ACrJ`9wN0e92%q z_RK+IK_G4HAh(|!3e16d7r5+hldC8{{C+2YtI%5z<*m{{%N=Amx-S4?(Pno3%I|(A2vhS znfJPyMM2<+i5?yu9XUh(NbGdahHw&P6;Lrj{^sVUa}gTdvmp^wLJ5HP`?UstB^3b_L5p=Lst5q3-u9sY0YCtY1;9n0R)O;Hz;teX z7iRzU^|ffX+YrJOZl?*r%6)&@l5MqG;^yYYWg&dycFDCBz~kfNux)K^4L4;ROGXug z2*3%9gh2HNB!uPVWhcjB$@LWg6=*y?J%0^_K+SR?6oLrAx!S+a&(C3j28qFPA>@MQ z0i4802v=8ELov7j2w;W~?(Xh}LLm150XPaO-lQA?34sbaApi$Ku>e)>*s^;$`A(rF zP&^xyE7;rHvnn8*d{6`em_fWNNg@cqQQ{#0$BBmk#NSdZBHrclv}ppMAR!0ht$)NI zhydt0vJ!~55`8CK06lf=x~W%j0X^F+z~SK`m>zTc5Bwm00*o|`yl`bV5R_i7%%%*0P_T(Jq}3d)oH1Op|R)&766|_^`f&kZ*Om4 z-rQKc%sO3cUPVwxXOF1F3Xf`y-+v#d88f-`ReeUBpu$VnVQ36`$^zh1s0O;NfbCVc z^Fa4*VD=B@ohY`bD72}&cT{!jq6p}o>D~=sE{BT*&@$0O8VG~0PE8ziuZGB9$YGGz z#nZcjjXW=imqo{pzBK}kpZj4Fta!H01iM=pv-XrT*BDoSEKCeWl8`nf*gyW>^S)y5n(?+ zvjUh15J?Dm$B2IsF@NUtGb?~ELa52hnFDTNSY9uQuce_gUYbUR-NL!0LKr<)QBTU; zr(OV-3L%xmr&<6LLMXEkvX(#SGx41?5}yeHOo)L5a3cP0Fy&G_+nchrBm{*{cTxZoVjuyOSP%sRuA

    - +
    domain Support
    @@ -141,6 +141,7 @@
  • +

From 191ad269430af8a7ccefc66a9a7524311b348b15 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 25 Nov 2018 19:01:04 -0500 Subject: [PATCH 096/576] Add files via upload --- web/images/discord.png | Bin 0 -> 17685 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 web/images/discord.png diff --git a/web/images/discord.png b/web/images/discord.png new file mode 100644 index 0000000000000000000000000000000000000000..70bdf1781e5780202c052ca2ea7749b0ecbbc5a3 GIT binary patch literal 17685 zcmb?j^(qPH7e-MFauqSVE+` zYwvUU{tXX5h_8F^%$Yf7&di)M?;%=GN1cL{g%kh)iiaA=Cjfv4{TB})A%cD#`u#Zv z0OZU=q>6#x)K-gc5Zg*{u5Qs(swVwOeO;%|-*Zp4y3WeHpPw^F*e2gw^HtJ)mc7?g zSS@6hO7z;>H+1$XK%lZssZkM;WxYc$a5IUXmBgqbcauI8u38zMd4|I=CBX%5CJP@7 z+#6gu2oia(8FZ^HIA_v#PQsQ165;>-2T}R^!*c6-C9Y}75&Yi(LZLy+#yDGvEuu(7$s@^=q%<9h!N?M>5!c z`aM)yQsx*u#YSh~c9(?zG4ZR@Se9M=wUe%U*$fF7Q48ARNg%Fv?^6Ii-E4*l}&$ac$T1 z?BkMN;*hu9TB5}nb5(xbu|2F;JBD_bgG^B9bctECEMrbhY0KhP>qiSKH}TZt z>=A9zo03-;F$vuC86!CW1Y7?>`lA$=Krxqq_<$(|4HJeO-d;aquMtV_5wQJ>J1+2y zkrDtNM3MX3Ra&ZXgxGzYv;4$-c0>^9H4@vU4Q6Co0f3%$XU`euup|!EyiW;|KNgyl zCJ^0lbhU&`#7uDu6{<@FAUdyY$YcuSnLVU!T-)Lc@snIC7-t#uGpvkLocYalvi}1H z=)H|1YLH1i2Klr1Bm%kvliHpuI}qzY6Le~##xW+<@J5#&K%`;ToIMifR>9}}hb$A> zZ{#wW-MmMN%O71}U$~?;o#n%T$k2cG4NZ5JP)aTVHitDU)I$9S{h{nKEmK1UVBm+_ zzI!(a0DiGbwX+hJ05vx+q37Q}ZSt=UYm3rk%%eW&-U1LD%vs0Se8@28jTG@BKL%)5 zsLEWSzLuuQ>^~#~dSP%0sq8(Ju}q7U*|Fa1(%0f6&R=vctmez`fKZs2M~otq%oP~( zxn(wzkU{B#pZd%p=xGqq{90EEXk-7a4GIQyI}eY{`NPAL(ik)XR}SN}zBnCXI{Dau zd6o|u%iGr*!lZi|DJC{--%L>%2O7WRBMANP_S|1(>TA~NmaOh=v}S^C8iS|cN9kTx zrW-)6?H7&>j6&*Ol;?fUDxJ2C=nP9$k7iIujR-)yobsJw*a!WXA)~O}Rd04tn-9<4 z>t2iBcUL0?&;tgjZgAFb%B&NSI8i7`nEe$}=hOm+$IWa^~x6ytfD^v|ywyv0KXMBZ$9e2+snaKy%O&|zM!f9)w=NdMvO#Jg9C z;==&q1zLMo`IAHQ?b$;`BInNLdnD##+JkY42g;qj_&`_2dd@tCFZH;aID$4p(i-Lp zZ>Asgv$2Wa7g2)){N|?)r{&|4xOa_fS$14%LhBK2YtYV|5xcx#P6xPL(Y?Qm)clb$ zEjHxM=#TR1xx%S?U<@k>jB91p5%g?aE48UmB|l=uE1r}m0pz&l=1_$$0ggt;Ja-OE z+eWm@=Xy_F9SHD4Lu{CES9>*}G{8n(y4Q?p4Vb_4KU)EB+Xvjm=e5pvz;8TM zJJVEC0+^mix1$oXkN=5_!BhW4v}sY&;PF3}(%vqTxI)E#Zh6l{PNTVRvhWUaP!9$u z0e)_^!Yiz`t}@(GP9fK+8GNj!7K%n~BoI7QHeHgYfgLofC&L0SGKlxU+wsa zXAux(a)Mk5mDqoHUye&r&7i8z!Gq5BY`E;yq4FS_G#B{w%cCxPFDLGE%TIDkbXr7u zs3qiT2k=xvsp)htIDe1KRg;^d(-ODB^SaM=?D7dom>bu?!L+rkXSw$~6$gmCdLaK1 zR}XL_M*fx=7hDDt@gs%W8UbC%r+J2RA!wLKxm=^u=YoiCA%(sRhCR(2!DTQ-!$`qa zkXvbs-InWqCwz{tLf17pQ4)?%za0$vdXFgl1R~MgCXBlt(1!bv#LSf_CDq%~xMnE1 z%4NOU-^;K4E|BRf%tL7z`xnFG(q~GW6ew651qzu=s2_jyhViLE0Yy9=euez61aIhY zEM^T%G?`N9;ewt98MUQDu7)B8;C(Q2i1}RD5=#!Cdmn`Qw)P!@$r1>GpaZbXCE)$( zJP+K`g6_9j$}vWpo2zdRR1w-b3!0~)v8q;RiO-b zg+rrx|Mf;yKY2QGVABU%?@?X?B{`jtovmFM_;O5Y#bw`zY*YbP?s>R!BGp~EHFgoD zD*W7{OsfI=`Bv^?4OnNgm581IPpyJUG^ScQ)*CUZj}gq)%>HS?5Oe%Qkl`oY!0SGP z!H#6Y@5)=8Y&(Ie5TnKUMU?k#uH{St-K^6)ufu*n$vVbRYX*w$wW}ffwJ*y}QfqYM z%jC}dAK@p(KkS0;iuzHSA8}T{Y&NCLZ#Si!9o^MN8D`{)hXV5 zbL#%NtG8H|$DxS*`hV}1Q1O9Mc`Lu@Nn)ZPKhY&I_vqdP8ci6Bs!-rsEBOt@E?Sj# znxv17Yw1B1G&E$aU~xJA6CX8X)RSBMn}Mhikb(0hvU9N$EQ-3gr5YaoIAsqEyXKv= z1jckYH-ZTgD%^|UQQF$k{(>4(DCAP`Nm+7XW^78WDDK|t@XOLu&K(py^;qZnHM#m_ zxj%{Q}qcYwwV7x*$8GBgs%|DV#2L6d<594GpXr(X4 zBnJ7Xhe}&n3((4c(Yw?ydlBUw;8(PKg^SBgRMTWN?rnROk z@$?ku{enH01OKD4zqD$RZ2R!bz5VxzDvH@ZoJtn{X=)Fe@!SjdJ|f>+sY!3VM-EQk z^1zEY!I)%0)9;Pu>GEgVq{MZT+bbAd-9V+FUK*M_8qisUVx7Zi^nl|LarwuFr`rh` zRjE{RaO=)Rl%Ydy!4C_1sxs`p!@2Uxg9J3w=&4oZg#$g6W!8BP7npNx=(#*_H91^a zGT-K0(%QS6ydbe#P|$4)K_NR=d%(s67)#?E0;U-}idmE1RZ&L@#b4W|SY`mJNuNF# zzyChyHw}%ZAkMgS4d?mDBs@;%0@I!f*%oa)s*jcDoJ_UQ+9l8DxWzzF&EHsP zE9>urM6|}GYrvyteR3bWN`3YE(KLe^lAHn89H!p@9oahKd52rrLol352@c=enTDxs zgP$^Koy;F!j8inNmHWP;Ony^Tf6syyf(Svq%@vI zs6?uJa9Y$N7A0IhEW5|>sECV#!ozju(DZDV2foL*itnX+ZEcT7rw>57dzTR38)vy? z6lH5T8dXC99L4_K5%qzCm|#%5hh8ijjjM zP&BdUx~B6tC3DM#yz=LIZl3I8R5v0N`s%>>#D-o5d8_AQ=a2S|R0IrCr+=dX5Ln3{ zb31>P{QeaRjqb!8j^R}Zi`~)(Inn8sqWE~wS3YIz{Z2*dXo_liW4d@NamX>*+5egEu+nX zRbEgg4+>g-8}UREj;zg7CRLHkKG2bz9GbMsFV%pW52>oiW*_**8cM$0t`$i(B=wOGqX`c#7t~POLz7E-S1T1LM60c4-xgRpe=Hls=QiR`{ThC@C-`pxbzr$ zwCK|J<1|JTLvCKVFPbMYYa&@z(0_DplAf&goNVC+TDA?n7lK5Ow`l0PPJjpNv z>9a{EH_Yv^n6I(J+t8Qp3I7p&S#oZDM3AIkxGXPn98)hE!zM4Xf9aCMI~b#7N!^ko zuxA`_b6#Qv@9)X1vIEX$$VS;Yz4v?zPMi>v+01QFXY=c3NJy~zWK=7t6>OD%p_-KX z04^v)Bq?kd-^m&4V z8vlJ!*xOhNfA_C=4}rMkksy2PG4R503!_u%8M2-O3PPlj@BYQUoZ+^nkT~s!1e!)! z$@yC5A64{zuZ2s$gG?y!W?S%o)+^Mdk1Y!emEOQ;51w1!7c0fsjQ%-F->|x}B7dA`tSIG*-Sezt|ikVCNy^(Z`lqk)lr{3T1ssj9) z;|B+r^uZE=&7Jm>h&N%MHzJIcIypUkeLv6EQt0_P}#cey8$!HJ}rV zCjUGip?rKY$i(C>#-a`XnM3CuKuY({b4As38hNvvYydXzE9NFy9ln+FYHQrJxSvn7 zMW||lFzI})latt81krazM|y9y3pM9Nbe|1P_m61jNc8xhGRyXjq!mk&^4?wFBmb0!7OZiK^6@{TCAUrWF2k6rjn z2siUN+7XHhv-Tw}cPrwfMr|ezIPjl^GJ^g#%&Qf;f@ge0X1zL@ec;9A(X?u}^noPR z^w_Tz-xbuW9!&?Nkt?O8APuT{$vHG%GW9>I&?!^@JePn%=9%4ZJ12b6icN-pHybV~ z&KX5wHeWELUy>`k8v6KdDkWp3@mB_7OR!^gv-q8uWGnoM!kVZu8NEZC4w!+XV*0)N zZ2^0eyz}h)I^{R?(aE$Ww~dVb2ecfYpKN-Afi3P%67NRDYtM~3V*S6~k-n@Vh2 z0*nfl+6Upe<&(58EoK5`C+fCa`8|${JKEv4ej^hyZSjp8wc{shPTsnekYzdH zO$H6(I-222i0#~RNjhM>_1~c-DTgH`2bultR7F-rHu`<)Y;pYv=J;y=fY6|`m%BS& ze`FUE$4#8C?%M4f9AX@(m6{uiP_H!xe_RH8ZfrEow3{ef*v|FMCxk`xguDKHeokcd z(lX%bU$>^-f~@uu^;X8GxA}<5rS{zqcPFbI>_Bc~76;mUL0$Q;^p0DzFLL%QZv{=r z@}=z$jKj+u>Ij{0?7Q#&j^k}#?2PCkt#(j~$y5;a$mj9vx##H^!ZBRLM<7Wf+M3*S z+Ef-ey47UyP@5}Mh{!9To-@}q5CpSNQ@+){Q?-0SG1s$V!xFHRFcXD+L7MP(wpmb? zm5USQLSnDAnf)xdy*Z_!WwJcre#N|}SPvDJ2^5_ACMcNgZD*^*EoAp*+zVuXjamAE zs!AnEEsGsrUb!mSAzs-V*Zn#BsVZIp*~k`d)lVE=!rFW{?VFekpV;l&M6n`+R@eFI z(W<*~K|fFA=i-(R-?7`%AQF^`ezul<7NVGuqsKN#R8B|KbO+VG{*27x-XL3OyYSx` z)GZT(rwYB3VN(L_cY9kEXO4JrGOaf?Y)PztSWqWdTt4bJBl(OOh2kfx3c04MH`rL( z{_5qKZ0)P|^)PU9y?{WlG0|sV*h*Sa)Nj|U!O=}Yfn{X|*It9!!&n=SrTG6e|60Nw z_u1BNm|bPfH5^SI58XsO7GnP;2T#q&X$Q|{@fF$%U1ECoDcTnweBxx6-<*H`EO&)Q z$oyg|JtwRiH1(}(w3edn9+snPyT@ftcWGKQf@4HmuhrXYhO{0{E5Ws|6g&CERcvui zNgX}WAp#|=vQx~>w^w)Yt+)QpCwH1dDeTjqDRP=CajlNrJl?_X{vmW&?iH7DpaRCrD1P_Q^!8d& z8`$*l<0wYJ#x-`Hw?p6jABNog-N1*u-M=-R^U>bJO(*0emVnxFx%2D%>SE*9;HC+O zKPJZ6f%i_RU|Z~LT=ZAtfDUUptZerD{T}K)LT&nnr>e+`U%>211dknEaDANpzGQn{ zOVAuO@w(@kha30sFMC24pKsuwvobHAd#E$}ny zZcpshKqiGf{kB*A&rja%r6IsommCcnWpbw9MQku_fuQh(#|8E8fVb>;L-$xF9_rz^ zA4I+QFvFl3m=!6}D1s8H!#@}rnARN~(`J~gQ1a6Nn1q!02Kt7j>rl$dC1WXutPle+ zSLTm#oARN_!I|UNcYe{*=T^M`4b{3l+P*n?7UI@(wM9uc<;|tsM3yVn;8TmSYpM#V z7Od5-1XhP4l)fLLu+J6DYy@w|cd9Sq2kaw;O5Ho(C@iIKVpY))o z!Gda^5zHu^&>gHlYs>zy+V}C>j3Pk^_C7z)1)#T4@JJp9T`&0dA67x)lYt&Ic1`N} z&%2$$11PMo)!bm9zl$4hbjT6ZuC`LBPh{EX`)1MLPx2*4ONht+!LzWIr0 zP1&CWQz9ik44B?M4fDJDw&6=FWXd<}`5!{1ei2prX3E^rl1YfPS)zB)oZkF~Vj4J; z@k`C&6$M|X2>UFMoxme+2r7E|F# z(?x(62(bDCBW?exqyLAwqi@53z>7nSx=^0OQDhj(OxgX3?WI;y*9M957fvukiNv7L z!cj@A4UDrXBQNLukYq;wLKZ97as}m=DbLgf?O2KKlK9G9XHyPU_(%cBTd<^6cc!oh z5*=d(OT!)q0lhi`U0WzV68po}E6kw>NW3to3Fp(L<3amex&~1*^@gdaCpJkmC%jPG zFnKmTB-If66ZMt{1%q>d?ee|?LveG~ZQEFZkHmlgPg>9gF&C~MFISM^p|M~VF)%WH zUn*~T_$ZPPjry2boAyHO$D@u(6WTo)=$ab3MCAK0)VTdV_#AOb<}f|9LB)E%c9eE( zImt#x$%M2A40-=T?I&SzG#NE`Um+N_5SLub*QyV_7^D96!qJzGi3|7I2ju?rV=Huh z3q*yzQ0w`}OF)E1Rc6Y@x~Z+2%$Fu5fY6=T^^N3rX7)rcYGy86mxlw{LR`OmX#Q-m zv{wsvBb2l4iw(sk#CxL2sX=Qq(f81Pl!IFJsfHXws%gH5$xQyNM9Hbi{$s+xt z>POUOrX!p8eD=@$lqIleW&Ub9rD(5Hl2#Iks+Fo*0XGVKKlrJ298IGssKJVQTZ+B7 z&Mt(&hV88#LbPNPVZiJG7kI9dLdb0x-eP%7tq_rc8Bdcq?cTUlgQjkv1NzI9%hbcj(9`0@z9Xc; z8gppA_akJ~9T3pVN}{6E)4}0GD_Pyrk@7r~{7a28r~hHZx+w568FTBC({ytrHEhrL zSHUFG;MEq!07dq!8}$KQv^DpjlLU=%a+%XXGMoq;aROSdH)#xw^B(5cz2|}`w10Zo z9h%%P+I|WgYaLm^@>?Pz4J;VTc{C80a&!P$$St=%N5ep3MD(3AU_PfVj3pzX>dZs>K6<$i*= z^rr|_&4Ou|41NtF3RTq__1yG=6Lu;)-PQ^(ntzU9cXEMcE?~0Liq?v>BT3PyKjszT zxkZJ`j;23@?^xm;x?2|&u-~l2TjZ2BJEk$<9mM>;Ah;Ll8^D zx-IyZzFz>-EW>&!tk=(*z)<)dooaw6jR+U+aVy*psr1-z9hTc&roTrX%8WD=b`a$= zM_lG@|7}1Tel-RJ0;6Jjfbv^KP7R)%dk{zOaaZmlCkv8fi;s)qZ3@vvrmcq(Fns7m zVjZ2~XM2EljO?M%nl&_`!WoT9B(AJ#`1n;`ob$J_zz+9{m9a`YAkqDmo+Ynb!BYkQCD6 zF7T4|mxPyc0*iRDdv#m$SBD?s%lfUh`wkt#U5oTrnj``%1%Hk;RCyN)ZeEB)VBNvN)<4g9Q6k!GP zbg4R2&!2>>#l9E^3&$O! zVzcu+e2&xd1;f|$%xP?xoO=Fl&m}X*s9je0Li>UM9zHP-!n&;yitXnwR-468z z*0Cf^#xH1c-`}ce291MbtpbePQOdF7sy6M|e$_5^#p3QJkCLq4)s%?m@4kH;CPyfR zQPeGch`!uPtA?{-3fV9IB!K6?7MKttBa`fI3eLA_C-t0Vk4V`G{@S5m)?3sh^kQR_ zh#z=8)_>Rgb;PL~vt=Si$eF6*wH$DtbL=Tg^Aa4Pe;t!EkhUFL1HqBF0&YdCQ&p6& z$G;~>i#v^FQokt2x#X?Mr}16o^s8U@MwvNO-IoN0wQM^|1H&hKG{qN-=#3ixbL(i}qbPxB7R^H~l9ip8!+74;+~aaM zhBXbH!Y631##vmsY8G0^+OpdP0R!ttPYttYS+=oeB8g-J4wq)fZvw@#YSSRz4?RhQ z%K;Bb{I|Dj7LFPi(O2>2t>(>2V6gYXhut2mw*{1~ZMS>b2D{zi9>UBq4AM^h9svGK zFsIl9-PBXN0r?U0SPiqlQ`26= z@}gs-;Q)G?T4KE9>pTC#ZwV6nGS>()u{>H z!%=z8GBneAt#}#@m?tYRt}QTbBFalJU3=Hnc8Rh!Ge!+D(8>o%DXbRV}@FY z(XW_B{~K5$6~;S6-GABPV7N4IoTTmno3D1d;<%`yuK2xY>Ko4b{iLTl`s!C&tyU>^>9}Pf7PCR5zkY|Jh(iAc?pH|;((QpSW$4fq z=bc}`W$1jA8*JXx8YNjE{AA;#-rx9Ip!QdR(D$|4o!J>M!v@NUt1t;Fz%YKFq@5yX zaOd{1jLmRRZAjuq-5XI{*+$>Kw-ZH?8c!uA-8q}5o_mJq6#b|PXnp9WxuPb=0g!G) zF@9%6F(m${t$piQ#?x1@onrQ3sM?84vOjQLf!21DgXu98h#Cdn<|E(pwJ;ugY2d8K zu8=-~Jw&#N=n#<4wj0)txfUOgJ_`pq!dXRF?Wxbr#8D}xn4e0-9gL`PZ@UAZTB6Y# zlF?VCQY_IfX>8dw*suNgp=12zJdFz;#~$}lf<~@J2ZlOn|C{m2LTJW4X+C07-mTEi z{?3HGtq6jOkx^eFA;<~!-0tb75k%p$t-s;xf3EevRr2!sDqT@#uDj~GyeJ(hqgV*Y z^S${J5lZ^YsLHd;E=V zZg=$%65jo+O2gw53#NyeY%ofmO@BqOsn!!i(9~RJJ-O|!k z=XW~EN*5AQs(mRP>fhNDmbRQ;a+|e6Zs$ki?M2pvK%lX(NCyAyo)g+tHWL%mhTYrG z^n_v%wC5`I|B$?yWW%Y{ZZU;n-i`dD!|ItVjq#t7wvD4*>k|`RZ=}~rTyG!Tx%TvT zrQEw!AVycjLNn+=C0TAklU5gTD2lsv6VQvM6l~s0l&=4;_D{o;Z}RMOFz*YO#Q`1Q zvk2ZfZcxBDFPGsyxjVeJ4 z#=M@%Jexl1R5zpC2VpNl+Jh)c^!=RoE?3=MUA zV>bV5G3O^+}% zn&p3;fAnluPk$BWwZ{U##{^|^-&M0(Bv9#dI9|AM1$Ps1a*`4ZXh`)DN4xEnq-)iC{?HVS?KjE1I5i%tmvBuF2)rWp zRBQX5(w@@Xz#-P7?YZp6x-jthb!KflYguX8x_@F774YHq$!dXbG!tV_!5LD4v*ufL zTuyq%se^s}a6qn??uQI9Nf~@Q_*UP!aHl-yT`k^DRXLd0f;m*Db4K@dN?MYMiwp~g z7Ds!x?l#Y>1 z^iR~+Ze!q?tK##9vx|SPn#}#}Ro!f?zLRsL-f=c(wq(^(P0XTY6FJWI*Io}RzDd9{FdA&5En^MFpc(Pk_|i-;#RQ>_K}2CAa5H?K>=SRu9SJZyY}1^ z_IPpVp~jJqwqrp4jPhd?QQIL_JuWt{gBj@LOsWR{%;1@9G;5v_12oJmnt^;bJQkFE zvq|VsohoxHzg6SNI6#&jc3K9n5i|9-WX{%bn%g*ZgZm$oPyM_Id`ptmQR?OIAF>~! zqm`{)gpT7Acpc)+=%8rkpUlrVwiX*LzNg+FA1@j0p;8AF%%I}?@ezi3Anzx06UI`W z-cC+&nE`WTGFjjay+KBv13=GA(Dhc|Ywua3Pg<8Wo=c0;$ObplIo;wZE9F~{RtxHK z#25!&2}h=%^8D+r%^>moSfV9Y`rs4fIB!1}$t-=<`M)>93M8KGlz@b}qz4snjj;J{ zE}Q6ZL+V^wi3WCZ?&(DB*>`lPL&RE*oUt?bp%Btz z#FENgWL6&-%w&+8dU#3Wx_mra#wK_3`v_1S*&w#(%SOX2e=7z;{K4D@Fp$Gz{aqqh zWu2$tD!QlMe7C|gwZ5vDw;9zc`WrBXt+_XDy&zZB_>UWS)B1asoAK{#n__BD8Cl@}6H=utjE+M5wtRWJsM%s2(ZL z;S?zS#rba0o`cH=?c4(vFxj&VDvq+#+IfvkYvdnnNIL&XH^tT}pGxxa#VBITI!~gN z)h^7yB8sv&COY!-;=5lC9C9k(YOMIea%-P!{DB~qvPlEwf_IB*>s?k_jls=#jFC2E zJbOLnfxEj$Bddbr#YZbSb#V~IIW|ER2SY$uNgZgY^H=Mo71&@ze$n2j1^Gr@w0Wb} zr8wTjxv=rgQXf0Nt>TEQ^_4#tfkMmoLYw7F$}Y^3P=MI&GuJWg9omlrIc6tc8hTof z+^9i8RN|hbYJwLv%3z$)r^#B%(sLj%UU1`X@tN<_>LiVoy(_S*XK@Vw!6TT`QYrVJ zGtWU4Z>lM|AVm`@w=Jy0+#{%#8LeEjlw?z;l^xh2(`;&d_m%$1PK_h$$ARfR%)`LZ zw@<{JosZjC(-Nt`z(Xr0r^kqkPe^wC9VMv$V`3D__JXI;{=uqT6XII|ZGMp3o zbmooe?c@)b#WXbjmMS|1T-l-K= z@Fc79mWcx5vXXj1Cc{3}gM9f}RDa9saiy89d72JbS(COLW3N{71nP!HW&vo^?A zGItF`kjkeYf}m%S@|c7yk^M!@A%7A#U4j+-nYA4y$JXAkymAX6s927Py|{~+@0$?t z<>;q#G(O%=9Kg10eG!Z%PZ~J50KFePVwgQdJAm_pKIv>-OQ+j#Y}B zVD)=~l}b9<=2_uj&-ceyStk{y#;K+8V}qfmi~|#=jLH^Jgo1#A_5rU58pXzRsd`iu z8amf##2v7>9i^&;O>fS|!^3Bq@9bz4y}GI*^tZQbDt4sxaRq{b$ErKuKV@Xug*F&V zmPGK@UG3Bs;sx+TdoGlu3k^G}Z*b?H{MXwT9~=vM>tbypMyDRj<`Z7*;2yM7_*O>Y zsOEl=MT`?XKKHNLK-NazwewkYiz6z zIq*cx>7TZKMD1aQ-1RM>q_Y0^>lbP~=g!%lc9)0qcU!}7O=+!dDG39sS3zU1D90qA z(D5|g!}Lwt=rl|)+QZ$vR-kTW{Y_Z4!(iWl(zsQJyk3va4SOQW3O~ID-$|(U_WAkx zJVx&{kQ&fvReIp&e zlN+I3r#XCK%MTc9pb{N5*;|;^I zk|!&FWCr54Q->nnK!wL!-&L!p<{lhb1@gaDL&sudE0*II|KONnne$gRl~zNAAjOGe3~Ff>Sh~`sUT~{_ z`Jkd!6>;IUCkRwFmJUvz*5#%VfkheKe03^K9iIdAN>l^3q7;l zU)pQ>$0g4wx)YSzWzHRp>LvVLsLyF^VooGE#c!WJt@A}*z?_%QXUY@X+Fyd6sE2E= z|HH6DurcTWk$D*hRh(D5K+|aji>EbrGEcI5Si>E6qpQOO_Ed|*gSRri5mJ!`QW0SD z6`J;yGv;O6LFHHK5#ubPo0K><=etA@99+cXvtz2@(L0OiL^AB42Qqk<+Cy=1LHWF-$^_lMjea@Bz34v_3&v09rIzboP#!LLw?B9=OkNPO z!AJOp)y|%PjDc@}6h138o$}B#0<3oQ*~PkMGG|6ByO>h%O%=>5^W7_}$4(GmQA>-M zASNamu4ZX|j_s8yCp&Uwp z?AzV6$%%$Sshdx}`4YUR+iRja_<_<n<{TJIA5NJ^LEAh1cX%CS$NR{ zN>}3vx7U>=u@ya;Q4O{+PseFh{LD@Mrt30uQ*n3K6%h?#P2TNo67vUQz7YfnqKi#+ zG6g+W{SKEkJDpvxnutPD#BcWOvp6%W?(DdP#)0ggiV7f1Pfe}5 zGR~L-aC*vbLLcA#f^*(;Nqo$va96>2AI7zI@BYw5^z+k`9+#=@@#iU?$BA>T! zN%wqbpJ5du%=a?oMW@Wp@48Zbv)OMlI-0QRaeVPMP~g1H5`Q()Ah>6c-v6Uvew~cz z9%|d4s9vnzN58Xd{TC66FQTj9vB_1r{yt0sLQmh+47^7ZKTsAXZHCmzHd4kBQ+XDf zrcvIT@)ct_f%jVt6yf-VaU(^UiBI-b*vbF?;>jNJ{P!g3N*yT@xZag>f-52JUH!Fp%EUK-zwB3CM`H^J1TLGrIGnEdMr<**YZ$O0TXB$USme`w5dM-;1H@_3bCI01=hutun@y!x9yIE)A&8d7n2vn?is1=PG;G}l4_{zdb zj$0~hl5kHIw2_NYqD^ol4ar$5B*tLZrNVlGX3iZ71-!DOp<66k&A|83clOkg34AI-p%hN7=6?c>`BnM z53M>{;mq&xF_AbM>b$TIU_=W;425EDtdtmSG{?dj9n=xw^Ry83^^?hl!Q(}E659?& zU#6ux@;x-d%|H1^`=W81(*o||j07L%UMy-}LfB@fc%}dF7%!v|5zWH(0itxz7ZcGY zB(?d$kFMdHq-+UKLrL#LM>iU>g$e^-xn+tQ*Vz8U8V4F%=*zTmS12DnGnokp-H&p- z$pzuXA43O9w7=4^3WQ}=J4RVlhYfGIg%_%daEq@oq@>=M=G@drZ_dxP$ zC+PKX)R`e-DnsYX^>;djxcE(aQdSQ&?c|dU#~sD?Yo2mv|8hJA+!m;&@vc8w`})|( zkOTN|No?&{{?3mMQoB9tbcGFcG`!dlD1JnSH-f{`xj{n8G70K$`wA3U|F5O%F0IG) zv)osxsM_pTsJ?BIT~4S$M^uFm8sp0JD5pv^q3CBw_V~S+&j2)dt`5J0x2Y+BVDI*M+omZQ2#J zE9AHTV@U{g3Y27661QKEQ#W-`J}U2;pO%zKxC=54T|bkl9lO$h#JpA-W_}ZSO`3MD zE3YqL+xalz1pC#YnK4=!f(>^;E67JmHay6N>GU5!B;f;VnZ7vwj z>n*4Z|0J<<8TeCwd*`tjlT>9Kh=umrW18Zv96gcV8*mAOLBEmfxtY*C|EUAvk(0?h zPVVIXKp}Jkr?2%k(LJxObE2?t%{6)JS=4jBlkmC4=UT6Cs;B|+(lLL=&*4ELq(S_t z$ChwNFYfeXUDLuSR;8SLJ-txXu>A@MwthW8(o#-Ez|VKboKJ4^&uCp=$U$68{(c3M z4|M5okb>0D0vI6CDrJpWbO?FFKXJhyKwX5;Z3z5kKvRx%^j3(T0o2%NCDY=4{TTv# zsef#$?c9)vr!w@FWd{rp+S=lQ1UO5;jGTA&E>S(b=!wLGEB);pJ!-vdlWwqh!A8gGUqn3GkFQjdVRQhi zM~Noa{YRk`~h~VTe?!%d>_BD34 zg`wBC_v!+E{x_g3@d^LX*F87sYAJ^0f|rOEX|Q9C+Q?6>YW<->DTavR+tPhsxJgMw zk2G*d#CX1}A3Aub<`$~5|Fh`$B$;)LlISLq{OS>y-{S2z9Ky#VgGlfba#3odgdxd~ zYB0~W&#zr6b0y3p?pmhF#7bFenvQQ1qtFk&&jn zm5nVCKXppVo4G>fV|yYlq|k?l&K;t~i7gp4%(=fMVGwLVm#=Z18BJZeyH^*l&N=HN z$|H^t=OlPCrkujNc|iUMo#sn7Fe%Z23skcVeJfVdeHHY2fz2-TerI#bj_%VpZy?1a z7x5zF_|!O16+%PO5n-e>2X5(ue{&L@0?BxU5xrJ7pthC|FftnAt5Rjh9P2(#1h?9s zZ>VGoJhbeDA(RY<4zOmZ-|B&*x*FS{t|Xc#4ptAA4B^9<9{12r|RP?9I96`+yk zl+tw%-;o(Aeu=W!o%4Al0a`Y(iwcw1->YLY{{ZsgqlZZC6*FdL*duh|VitDzKOY5r zF6$dkvg$vbGr=DkBzm7NUmmu~IQ}S`ib-A;=ZB}Zd7+>_nj{a}#I90eCK&8lul}fo zRjI~AATt+DUeK4s>Wi{+Xq!fJPcRXWK3X_|sf*9K0lYT)6FO^R_^afKo_4-0UZ zp8;fbrgq@jZv!KrR$WaWExS-v@~!m{jF6-D zA2m*pLQM$hmD4r!4K^(PmgCT-NszMQ=!i4%+#INiyt1|{y$~$@xIqzz1oWh`nfx!?B|131 z@>UlzXVM(_zfBA-g0C6if()k3nEU}QsY~nA_B!KRO+^#pp=lQ>SIf1>{G~-#ⅇL(+`Ch@fJYfm& z3vl@7pKV)pDd0Y25Lf=4+v6+sW{^J4@eHK`k`;A%CX%lx5mm34!rmp`!SvA)H?W_qu=vC87(eJc4A>4WC~YWgF4`!+QzXwQDHyu$ zXi+4!>Ci`UAqurKyWAUsdinjCm`0C7epU3<<&Ovne z4f`iNl@Gk!hUv}c@ zZovHDy8$4cM-?{SvviRK%N3I>+CL*tr(DmD&-RmROW=-R@+v-nOzv4!;N&mgz8o8g zE(;JI@=gO%3znn2a~18zQwvL!FRq>7nJx5p2$*=BvhYZM zfVs5K)co-)F!JOKxZZm{hu$es2kOfY9ZdYIoKsT!vu|g|nA%_rvir-vNM*+KC133( z#z&kSh_V5|`6;5}UpADdfcKwDTTKB2t?^9r%@cYw} z&lQorWhIrRX0d50&!?%bEuD4o>LSV5o51>Ck%j$5%nD#ha&|-XsY%y%6&;=xJ?&JV z{`#%%p-bk>2YT`SDdBI^<-6tU+B)?5_J)Y9Ve-1}Y{d)A%l&|Ta zhDKKBoA27Icm3PCX4hx;)RS+LpL)LT+>{cgZM^C5R+s5<^G+-~HTl|&O)25Yk(csx z{G*b!Cv97(s Date: Sun, 25 Nov 2018 21:15:23 -0500 Subject: [PATCH 097/576] Add files via upload --- web/favicon.ico | Bin 30240 -> 15406 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/web/favicon.ico b/web/favicon.ico index d9e97b32534e60ffc54deeb5dd1ec056dcd252c3..9b073e6a77f9412a90ed7a3178373d65010931f2 100644 GIT binary patch literal 15406 zcmeHO_jgstwZ2*J{Q=1j?|1+7R`OCD$1z@ceu;636UQlbFvbNi*kFonijnCC8Dr6e zF;!Gi3<3cHBq7vMK@uvc_uhN&o$u{$U(MB(xB>(cChvLHIy&dfoinp%&z@brJ+fGS zWcfGCkAG~D`xBOh|8B8Nu~;lmJYjwR=}#;ccd7gJuZMpBPm3kyKP;A?N*nn^zOdHI z&0#5T%|UWah+bu_S;(l1M0n|06f`9vuF@Ab$}Zrtw>zS)2O{*EH?CdsM5w1C_ zHek!zHg^B)bYQR_NpaEW>g>S2tfEZ4CrtBR4|l<06= zQ`yzuj)20WD9Fvys=TZWRJRwxH*Y`M+gefGQf!)zd2ep5M{Z`i{+^kZEbEwzOR_Gt z)m7;4?;rC!^Fw=U3ySh{^|dfBTlra4UxJSIHZ(UiDz8mjNB0(Klb@ZTKbd<@Mk-1Q z^HEV&d{_RpwlpIzD_!^(gZkPUq$S2{KU~v+`=Gt2yBlT2g(w#K8yo77nVO{ElXv4O z?5DG%0~smS^=fLUAJ6C7HY~swF%cn1PfkGa)yo)fA6=cDD9X!GJ`4=pd)*unNPgan zZw{5hI4Y@Uo{(#*T+~lv71C$jn|Ikivd;GVm(S)JJ-@N)9knxcdlMGGFaH2sjb4hI z4Oh8Xc#o;LjMZT;+Uizae;&U1`|)|`?^PeI4SyMnH@%1%ulx?j_kV+x3uj^dl6i8? z$NHu7G5c>X$X(v$nHP1O(?{=_;Z+~*jC&uvd_^zrlrj0tqIG%uuqfc?(#~4GtiI`$cxJiC^FD05`3|DWz2F@A zH~o#g3%%w8mo>}O1|Hk91H3MuJ*l>l>#cQSpSVVxzss7Xw(%dA2kyYmzE%{sq$8s~ zO6*#$b>H2?wmG7o`>?*V9GUgeC~i(iOLv|0<*4Ntb<()3HCyG;E#Pw;jBrw3`xP8S zLe(|oG{ow<=QhM4u{r>(=h_^NUImwPa}ZSIZndl98q_f@*ZqAkfBLIfFyl2uCV1nm zSx=6*+|I05UZp1`=pNwyn&@)w_#xfD>^EQhE2sJI;-Am|27%re(O6$+8;(8(OC^1h z2`H2Ymc-a7&~BKLB=7Y5dV70JmEKE>3Q*lqB)anb5%mx9(%RDi>elw&CiR_KnwxCh z()3kkech>`qcIPMcwbfb~ zdm~JJP1Azo7pi;&1BPX#VF4|LH@TlALf8UT2OYLuk4ca|6-g!APYnJf!}k zf6tN-6Ny&){U`IU9-1S6uc@j4{n4hzM)8r`aeHu()el{`rYxLKo9G`SgOvY-=tx`t zrd@AO4|qLnp`T5CPQ800G!OxzXE`3%fravQ>*fvHFlKyP#X~+Y)}ZWDpK~n69DEP* zy`(+o2>(qS#fpjAZ;r^WEGyCVZ)<6>{Y?3b7oB8^(G%uDKK^BKK#qbC-eL0??<+B{5JZVuD&*e7N0_5RR9VFe@v|n)A+8iIYpn- z1!E@8%))10B@#ROi!Yy5AEPlHe`8!pf4itT6=f}1iro-{C3X^7=85aM9*T!B&ZaK( zz2Kp~GUEl>&nstz2GLc-EQmEH#YO3JLQI6#2TPmC;A^-f{#0#sC5O~A>ic=q{)`W&{Yf!|l?!L%gV+D4SU2Opw_bi$ zp10!-d3M{mS?gCx8^)_EBt|@ac(0DhKT2o1GnNa^vnOG`(#-hEo_=C3ELQqmusP}t z#eTNL%uu|Gzp?$&pl7t7-SN^-`bKTPHRf%!^wgoIx&oxZ(79@nJilS3na{-N$=7%O z{2ZpgI7R6vb|2tL_CT)XUvJL&)Y4*EIYbM6PR zeS;I6S1eLLam75rj7|*4p@x3uQ79XW1Ae8s4B}g-WnDq9x4^N*JlpSN;On5iPc@Ar(;9pUqHN%vO)f@zCKmz zUc=h3m#|ytTqC&eLct!5{O=KYXZ<3PsTCprtvN34S@vO1Klkjre|k=Qv!XHSpZ?Mm zOq=?&%0IEw6K=b7-#CA^2p_%qD%O5H7w1nMG3-ZeN2&1cBZ>FFRs4%Gl2GY~>&2(x zEf|2WVA!m?QFc-9Aw?$yEAy8^ zZIbIDUKw!Z0$N*}6|eL-dO-7P)TyC<-WrRs4RaXGw{ib67s$HkuwYy~?T$5qF*CpO zf3?sGGdIXwT&LK!(e`e#=gskG3yG5vr<2!l6*eEdJ%HZ+F3sy+EpS6X(NWMIvu~Zx zcssod1?-PlO|0aPgNlv|Mt4Yav&8F|AARVdqyzFIru?#C_aEa(q7%N0mmEmqR>6wn zHOE0rnd{Xcm|;tIt=cQvEMCp>UMKs2xHmC<`W6|rkvJ9aj8iwAaWH8K+*4Ny{XP$k ztK5Z6`V)DTotudHAHRUNKX?)|*Zoqjc{`uRmZ0~r?#%1>+H)4RT$p3M&d#K0-!ZA#H z*}y~>qdO`!P_ISjtM03zPgGN>~ZCSS&GH*gUa$!(Q!f8yy{b( z7yYn3TQ+Fj=s1+|8L@K~;@Ev-oH5V_lk|t!$yKkj=Fh{Vj^$C5g2rUEQ5=i=m-zGO^B$z1{+PjGJ9=Bx-wrHvmzda1*3T84 zBL7)(-iL*Igx@@hLLI5+dSo!>4ZJtGnA>4#mfUJ_f%Od7B#~|F zw!L-uY!+=O^Dd)v9HgIk&gd9}J|<~rvFe`^eI~y1sQ4ct_>sxMlK<3`j`&YMf_X#x z!nVvUkniNb!Jw)u%4J^GHMGvo{;P?7z9sp-iqc~3l=6S(=ziJ1*8N~cBLBn1t~HI) ziOf5)-hJ;*6i8ks(A!JjFAMH=`Roa6-gszzOkWdyZ)=nDijtFMq5kxdyoFg0GZyJ5 zuT4(J)VGVgQLcF2lIJvOzt{)YgWuTi7xT?T-zh7`-=WNg1zdF~KM`^+p|gFYP9GQ? z(6wS84RSVwxlH;XW=~8st&aM;Jvc0(%-hmVb$4~@94ON)V>>K?_N^4=h8&2tqz zZ^5%o>4^!#?^Mly)AleAZgSwHKP=E!&-U8WM?Li@W!-*k^GsijcB!_iQvDy=1MWed zq2`^1^wTfmd0zXHD!Tvsrl0h1?^*r05-`8-$o}#?v+*y@90GkV3O-`qzW;lR=%4)T zOo#T1{5SrMp|mhpFrp!!-_(7d_p$aP<%fPz>aDmD)9mQ0LGED70g-iJP7>=#tgJ~W8o9_ zeLsq4`jVShEkV5KSDquG?L8!UHs1?pRA!>&tkd!jX6PC56p<_LZO+-mLXU#RyN%H# z=lfhYuGF(HiE{oSCOky!ftQ}UW*o*G#DVQ!f%-NsDoo>h`cIF8KIOdn`g#@1q+TUW zJiBZ3C*#B1tTdGV3*<~_3wQ>NXVS9Llhs${|JPJVzVTn7koUC1JVSQ%qKDcyp6MAK tqdm@ZA+6;l#j*#2B`(iwl-SbG|*%OBnwSO$w-#aL=hyJKypw-G9r?piK0Xm0R>44Vj`&I)MOM8 z6cm)45s)A`*!@;{wrA{n{(H{d``ml~H{Kh&#`wmpuxhSv&NXY*N>vbqfKU*;As`II zdklhfz`ms9-;N6eAjk=v!(e_priUPUI{+Zz^iJT`3NHw{VQhGuhLW8U+)8soSL+mf z6$Y9N2+J!4jzCa&>Yn$8AlfDvh&GRc3qUV)LQDOOU&glwfytbv!L#*S=X^F?xWu~R z9=(6Yum93oE+tDk1Wheh)?nCZpJ8kElHc{^=Te?aT}z+&Gn$qZ`HKVbi?^p-&8*v! zSR!o)NUun;ayU$tiw)iu{d{{PMd$u?ouj?WPpkHhfBaSz{P=0rrM{ydRlL=d^5zQ* z3!fA&jcyS_>i4S4p(u?UV__!B|8EE-1j81E@C;e6%xNfvB3%yYXVJcdf><5uAxT=O z#eQ{aWu>@xD$C)Oijj7WFk;U3WbYzbF(sA(zXuH=ZEtK{p~D%lcx{^^%tj`qaaoeB zw9>7cgJr>+>tA~v5X%&dNCA4cn+!PG1{nhq{50fFTFiwPhlZhZZJtV(5E3HI`-L-+1kR0H1dgoNYVvAX&MfkdVHo z3i3QPn*BQE&GXqP+XN|tHA5&%bI);QFiQSV+m6k{hYyJ$xGwOFC0;DTQZ#7if>gi~ zIf$Oxk z8a2@|V2Eu>0rOMRwEP`ANDWoYh~))ob)Awwq~Ccn6h+0Qse#rSE6k6x1$>rWCUOlQlSmj7h- zO64A;jLeo_T01XFuOXLz>Phv7uj>{&K?EjC%~TbnZPjt(W6d=WT(1LfMW^Lg(&CAT zl}jrwg9q18JQr>hE^sf-&wl`1Z1C%zI1WWRnq;&VNK2NM?@xzYMpTF|d7oc2)*Bre z9u5}ZnTonnX{q%ZjiLxc>OuD#Wx5EK;#+M{9V)buM!S<<^MdM0?v8sLL-Pbj+YJ>i>~^%+d$ErDBc^Fk*(eOMS0)wV zhs1wMGtxd_aO9S54N%DRI6vR|y31HiX)29MCx=+g3{dggE+Ec zae9L+GK_Z^~7KXDr) z@s}2M7{FCs;XIDsuQKWP?|(^LiOg=#o#!!IM~(^Xt8#4l3(rvJF6`d@dX*iRve%Q5 zUhkx3YeI#)e7~GzoB2$mM~>!ItI?dxUvlhA6q?IV?4gF=I5ouLa}Pq@+o9;Kx`3Ne zbW+rl0nlE@v~<0Em~w#R+-f*;nD$}F+J9LBabZ%GrDb0oEyZx7dDp&VJ8n|ptjs2I zyNpx>8EXig>>Z*VlY%;arqVq8t^0zs>D1be&C%9y_fW2DnhXpp6_e-BAZ_o@9I0?8 z=6Pks@~R5w{fM?p3Q{Fjm7mBsN9`nv#3K)cY4bt(m**jZ2yQfH=M0k@u5cmsYn7^{ zD05<9dbk#r8A(nh%4ufIosZx~t+aV%Mdk*#JH85qT(Mb9stM$>CByt(k<&FtFsN2ybTNpHH3jjSkAS;H1kj4eRB6RIrQ zdpQfct-#1+x50xRr~6dU5gK6$%#khh$VFta;L;uA*Fup=eJ?L|5Sk_9E_!Mr6gefw z-l6iE+$39!vnQKyq~8$WIUvD>#_cIHeWS^H-6k0qCm*EH{)4W%9@{2F%JLin4;4GU z9@{lopudQ7CP%ipv^0+s1Mi|J5p>Uxd zJG<-~>Rrp;l+V5@!PYGOQ_r33Y)EFFu-U0ak)@`IS6V9{V5Zjy09zp&2gjbk z{@|^SSia|#m;vA#LJgmpFW|ff#G_s1_Ufou#1~842FYw2OesQDI92g%#Zn*Cf{$@NHzQs&Z*~ z+g4ouWdpWaY93VC#qph>HkKzX33jXV{ln3z0A1fp1PpYQg(`fJv z{?rh9UeoieI7M(ubT>~V<{2U}@o4h-qorEs{al(#c3#wqjt01g-2Fmn?-Xq6`8~2PRR1@zd@lq4r6`QK} zsOKVaoej(3^x*( zo4Z|(1{E)ASc$P**q%l8mn=Q!Ms?dLAsjJ| z_G?S~W&HAs>~_JKx@nfLx!C$bW!$-2Z!X9+c}!PAF&Y^5(BpoHLx|n*Yw5k1H0wBYc=^ zbZ@oQ*@K!qo{2XkFhIRB-p~jOaE}H_)3E;G*J<(GsNzFsX@{I|znNm+Ztb=REMdkn zBi@rhU+^o6hXf!`s?cjPUv4xa^BQ(L@R8=U1vleA_S?%f>ZZjzLn zuNom8Z85T~+T&&>d;JlUW0=k)Q@q~aPXB!1wpRB|{wom_j{+HWeHUyybxJ#pGha(x zdm8@!;YCZ#OjVK+&ml{accr&~? z5Z%m`?Qfb2Z0+rH1=>#Lok~a4+}t(B8bWV1BX^!RV1o@Ya!NYjwRe)&b|^IK zUNgRmdR@!RraG{ef(OH{F0EVGlji#2y(8h=DGKj8O*O!I8IS_oIcfW zV;Nv1yZ?-wz_>oWI%~k@P;l;1eld1hC=VZdz5Lgh1q6oD@}ESVs=lSOr@BluOwv zh&p7VPX|?6E{Q{19fL(gUG9L?JVz#vwe!~)PteqgoH7eFU`Z*Ila!s0CVzE(d;}3L zrlN!vz|GL?Oj8N0v2Wa35@_F_S&r!0u6NWx%NR7>7SJztXrmqSYCBZ1+REXzI3Pt$ zLt`*VjF%t5k2hWS+WS^szUcAz)ZynA<+So6etb(+3*xS$b%%tEGMn4m+g%gxi899) z4VGC&s&OOzMD7tG~uaNottsa`1BC`@z9j&Fi$F zuiQDunsV{M#*(0@A%)xRrk+%3G%vd<(e#S*;wl#vnk(CKVG;b50jjDK9JG8VxgTZ znBGlqJz}t0c<^xfM!#+?`50T>;Cx{Cm_Ncj5^Fv~BPog3#ztcceXrS;iu1d+C<6KB}#@+)(OiMs#Xd z)E~YgUX!7Dl0Gua^(+DtITp>~j(^}gqWG=!aaIU>;O64JHE&63lC0gn$HkX>^Y7Kf zU)pZ@K9((ous`o<5l1tZ?2f-&mvt*g_tDI!Fi`Ekc`I`*q=L>UI2iTOzQXvijIHFe zh`FGAoA-Gv_pjRo<-jGj`170W3(@iD$L+b~Qjx;&|YFuRGAs8_6} z8{y?_Q_nlqu)DF~5?gqjI0c@}<7&Gm%7pDnpB<><vaf8eit_MIX*P+((6TTKPVSnVkJPW2O{)OdA@J zb?eY}c6?=;4w+R}a-F#R&3W49j#I9J!`o5rIf0EyG4R`3-kkzfv*1+ z?*LVjHpbb{Q`8Rocsr(-3=%lSbad6Ta`6mT&}RvO4lJVxuU7=AtiJH1HR>sEJcNi%t*4vgbGcP>kp)Gk8=@i+=JZv%4HsTVFS*cHY zJ3nyE!e}mQQBL^kgYdcB_jkT%M3xFuhU`mBk@(Ss38CB#!kBm5q*^5{%T^NksIR57 z)wd4}uyO^=Jj0M$~d#S*JUiAWgrXn-u(RSNJOt~abVXr1(pKwf~`F1;Tp61e%0%~W*mK* z>ALOL`?eC<658srN@6?5BS~v~@qvr%m1Mbl_SmVdSRuVqd2+-(c`R@%QZ|Ex%7srTc@sJkMwj?^R$)HZux`d6mz80jn>M>l{fj-4x!o;PLt zCNCydeE`K%VsP*ig(8k0SN?{h<23D40rEFVr@Y+vlPg|S*hDRqEv|6&Un7HNHgXte zqUNb-V?yg^lM}?2=URG0k0C2pd(c5!R&hU~92oHi$j10RHixCSLvaDCs*LubZGj}D zVI-|JvP1m2X{@i=R(hp4s@Ir+@0x^ES8wP(++Xsok8R@$6kYeZSG`=v;XCYOI=2uf z6+~FeY6JC5y6VggMj_8G*?yVY&}Sv0RHOSd@+B_)h3zgrAJ3Y~dMg~-C=5;;zaE7s znMNq7L&%b6_`V&=mz86K&eg3FHW%lsHkxG#mzTd&r#3J`WX2P!-f8KB7O!MuQ(rm= z8+?2`llrJOC1Yz@)6BcV*>A%p5|Q1kkNQq&N2!zM>z*)ZVZ3KWPoEzqMQ)q$j4vVL z(mT`D6-8WF_T$Iorq=!!rxJHp+qe^}UiS`Ec<~k1e1F^1f2d7eu-AW!Pt9)yqobn( zUW)Wp-Cs&wG;Jmy^?voabLY-=E~$tNQ+^y_Ur=ud>OAE1hk;cIb>Q zthjw+7)5qgX z!kc!E)Ok`0E4xE5{mLLblP$nL>_UgPN7`H6JLru%QD~P1oNRA0n?hm&GSHMS{iQfss_f{onj+um-sAvir$mCkB_9k zjji32m?a7SbS3c>CuL`>P!9!?{(kfW)|bX&Ne3k%uI9vbb6sRDNnW*~cKP(Y;py3Dyjx&M0@MliXEkE-FPncT`-Tj!g%0(` zs}*qBj(m-zA8RRQc`6W{Bma1Q*E_hWC~>W_!CNBx+_q-H?1Z=Ps4vk+BdQobY{ZAs zPsz7^G_BvZzjUm&u5OeL;pE1hd)a+7nzD@8iJZI}3hG zpoJS95o_%?9u?ij6UqAI%v0`Os_^gtvhV=NULSQWoZQo@FZQvu7`~?Q#VT_Vzi-2W zGE_mKByZA96>NEHEO4)aY^JXfS)`w&*zV}FF83az?WrOZbHcY^yL`3tO;G0IBwJWOB902VEH$<~D>*?GmQLci(46|>d6A*`XWIE0 zh(0Q^LT8zI6))?D#3^E$yTn%PrDtdug{&ob(&D{$ju4zj`4eV78mKx_@t{&IuTU&i zFRKn+8+4=Th+}iuCT!J@u8TG%e<;whHPi4kw-Csbo@rooazRKMys92Iq*nO8&veda zgyw!vq{w-jmD6`DCaQm&38JkxwKcEqB42EH(c+z*6M8;>N#uxGXX2#G39Pzt+U#k` zieQ2@DF*F*2Ul9JGj6Cmm-$gQ=Vra%IC3-o2?c?ioV>)}+v&V6CXya*;aHTpHk9^T z$6k>B+_#s&sTh8pJEY=k{Ui-l;g9on2ja8P3z(*?Ey?T`q!9i^*Wy*jPzt^_D%P6j zUaFjp>Gltz%w#vLqC%oDp+$q=Pge|wB_B|TwA=V1&d-4QcymuBp4nA_Ju2U1bo<7- zK>(?8WaV_LXIlS6pjEKvkhP|S-{aM}5f`%4Q5eu-lu4MI;*G?VcOTkse#02;`kYMkZnBc<7H)zU3qH=`p8M zH%(2*%uthb%3Z{nY@ZJq7FmBU8){Z8&P4gOk3+ii6=B2`YmG2zvD@CwT=UyJxn7{C z?c&8rKDym1UmUo##8xYD@8nzACiQ5;M{RaX#G3a@$e#5U#SQZV58GmW1|unVt4MCz zAvPLOsuSHsv|2AHjY-02)v2*b25e?8`?^Vz-HOa~pRY_N`sBD6vm7C7StV)+*naj} zS;>^zpEKqm1RfXT742wjqEn0W2;Cbz8Y01?wVr>GBvB8A+|ZCL3hx0~%3M3>H{Iq? zkX%vS87cB6QbaTWp<$gpL%Onq^rL~Ee1u|35fpmGcClHxtQ{5w$c-l4g5VE&{ir8n z0`xY*GL+`C5YTNLE! zjo1tEs$-^<#4q?$Rc9)r#}3O+#It3)m(XWvW(z|0Ve~CuN?(7zk@f2kN4Fg3?kwF$DC=)$Wz9GHQH?wrhVy z@+OhPhxFaCZ<(l!192eJ5QKFspo|CLZb_yR>%md1nlTJ#c z8>o1~@`hi#axvTasHL#EnN|8C$wn=N8F_>Z;==mUVy!<+N^(>uTH;x<6t3TV@r6*? zTINPgM>n}lSXy3b=S!5y$SF7wNpICFQyI%6Or6xCJ`!r}f?!UDAb0N=pE*=*tNZnyG*rp zP!SoUt z>O_QWJh0;onO1h4=`#-@ z6Gxw1p=dtCLqU%W-SxDg7CuLPK}vFLCd4p4Me=OfaG{D_{;2sOoZ*7jSo>$?x|N8B z!WKuCY%nO&G`kVpet_ufYRFRNqjXbuy=-K;wYLcAA;AC=)i?ugdyBR17}IQW-afJl zeZhN?m95`sGlT~e6wTN3zvpUfWZ969C9pm!kRE%Mn2C=Hzq!XEYyt+JI=Ex$fl}oU zHzSh2(}wJSyrZ!4fz|bT1MzxQ-aE#XzA!Y=&k##ZN*!-IE4%dQc3G3>x+S8=*yXE> zJo^1`i_ecRo8@EIhxgjBuTgQCb?1Ukf=SNMBaWXL(fSbCH}3VIcTTt#YhiqM7iAXa?oP)IWGiOpo`H;*9H?O*LOk zB>FW)Q5~crZZ{tupe=Tsec-pp9ehBfsPd4O%T~s7-kT={U(vp|!&z>y1S<5rLt>$t z^1I}(pHdqIEsKWi5Dg!mc^)thJ-ZQ>b|6U;rJ9B9qJoMj`OPYoWA)`LE;bZ#)!}Y_ z^DBi`+!awp@3=vs9zFE|oS02oI&yu@rFJ%S63&{|F`5Rg*XMW) z8f4!{QB=F>hdw%2%!!4=AaXQu&)yc_kSetL;yUf*M;0Bs!7|AZT=yG3Wyg({=2A}_ zq%;(!UR}r?nSWqPUv5M}k<_^2PKa~R`v!E2FPBR6=}WP5gWGb?YZe1mBEFkPbl$!= z@ZDl-@&jEE<>v;Pn4PVhG&XgcbH>lPU(xZw1kwLHDhjKR8x&D zQn^asmUt3h_Q2e1%#RBvrd&Auz9Uf0i0oP(V+G;J7MEamt>su+F)jK7>)rdVM|ny_+8$n?aJ#nac!=HH$BsyEi@MDe)WKjLH!0(-Wj zp*u^JMC0(MVLy4aLB)vn3-PcpDUVL%f%}w5{^~1cwF{b(YTIm&`VFg1Ugml`Jv)NU z{?Uf)6ghWy{6Ly1@1Unfz&9tJ+w&_7hYIp+=O3nfD!eWbS)FKQP zs#hmmz~DvirD8iP?y(B_HDxbnWZ-6Eu5TCfy498QFUZ3sf;^E~3QSl7G=w`v^EvFS z*^d!&&+!*3tidx`wniE0n`}=%9(k9g#_jJrc8@k1%nmDrswy9vQ~*`)rLH!q!89Em zu5|Qk@8}y~Wkv`@am$B_l;TrN@R(ftT7;#49c&?lXy?VIOK^?Tr@)7CQm4`MN zc$T`CbRL6!vGu#_hWx#UC85zDshWOs>3bzR?-K1MkEufVY8picPfp*GLv0q-iEe|p zJ}q7AxMrNe+BUGJhF$G?JaqpOo!()F8(L$RCd^V~`6iub((dZzEzufyaUOO5zO%2- z$H&(VSx?O+TzmovBZZ+fl;pS=OUD$vjTfR9})VIWkw(D~CrPgx{>n)1sX7?MXIlL<*&$ki@OB_9W;tlu9M@jW$i>@O=Xz{Bmh`KJX z$V_zI%3EzC3`3>*oJjdY=>X(&N%`9Rn=_cmq#HMG)Q+4UNq249B6|wG^|aW%xl%z{ zKRvsg&XNqt+;BU}sb-B|x@5_t``Bmd3R!`#gSyAtP)SI|N-5JX06i;_?A34Z%xkKd zziw~N>v_!#t>}5*^A8TJ`2-tgTeCXv`AuMAky6q<{!9OD~>FJ1I0Yo z;}@#E#^R~`eysS{_&77r3cnPQZ@88wzk`0(#n6f$Qz&2wyFb3yl#1v(!t7!+w##$l zqSlAZB_DD|Svia|QPG!(m_~H6w;|rqq^>MdHTjKC+no`k`ayDn zHJa?{0e#;9v)r9(3xA!$^gOnT}o#3l_$0CGBw7?UK6vniO!Gi_bz7}iu!vu^wl zLc$^OwSg*7$8)8fKcDg})9naW;6z`Y@h=zn<5(E`s7Ifa60Eth%dT-hOyRICz1+&# z-~geWx-p_EG;#r`NU^lS*JVOl5a%`z)QyPYfmjfkB59@wV;(G(VrX4B_x?62WPk32 zWuT9mob`wJhi%^#{CE?WHmp3;()BTq+%tGEQz&P#I@>Ax7uex%-Scmg!^|ZR0=jNB z2cj;>4^WMs%f#=$KUp3ykb&r`tIq@L$w;1_jUMjq>t4Hbb*rIvHgd9yN4JI|;)ls~ z`&bFV9YE2u=3Kqpvs()8l_{q^6SFM+6>p~2a$g;#yDKC~=X5_sU+|9p+v)FV>!%*7 zV@p0xzV9FWIG~07zQIDd`t&&uQ)>~w_CO2!hZE4N?tC!f}xhlfYM2ow6Az9s} zv7+_T{>Hkg2eyx1)X$S@Dm}11tQ_w=J(!CwdJ%fC%#AyKkJG%Rd7MQmB&gnaqit*; z!DX?AIC{W5c--G=88=3XE?Z7CP0l>67p6agaOoO6i}^{6(*MbOR-73s=LIRYf5W#e znD#~ElN8UHH_O?U?M6p~MyXcH72_H<8A9sN+qIB#6KdNIC;2G*9aYadY9QLecEgIj zNyx_X(WxgJk@QlPTvHPr(M1|K`rS#@uyd!Bd{LLOhzCRmpME3^CXifLtb0$D19@}i z@EVIV+p!Ytv33~`fk;-v}f{pQJFC1o8Jl?Wz?0|Eo(d4hQ9y;LDDRqW1&f6j0< zf}5;3+p$Ub!7=2EONwy_e`!{ZB zYcGeZZVIB)`@>&pYah95PCljqCRCzFYlUcO8J;1U<{@TZo}|n7eIY;S+j3qfb(_w3 za|nM*Vf6b2XNzDSdgldmhMs!_%TB5l_OM-ZWS{k9E3IB9y4fG~W9N(hZ)(KLw4FNV0BKc9M1$@`hefW9X3MeP7y_ILcOYLU+E6 zqMcMD#FWS5$M9^(LN|9{L|oeFBYKU705bJxI^4OBKhU%EV7Y@Ff>k87L$jcWjES5y z${$*r$Sr*UrsAKFY;!=qt-<2n6tCV2XQ)CBo>Z^T__}TKj9fV?k#5@my~8R(gUZIY zpYQNV&+FXP^hkO!goVBahho9a$eA>-zTrvX!nG%7loA3YvX6+_7vNvX$GRvKU)m2P z8&d;{*AOBs#tN0(GUdn{;_{z zoz;DRD#ng=;q;R;?#|BhvM1?CMeS~>KwNoU_t3ASV9wK5D(R5hV073GOHn@>SN#e2Scdy21p2#i#VG zB=9D_hcjJV2f2FHG{p2>tYPd(Y$jfo9+E)4)e~Y`gdL%n?nHiCK=Zg4^IVHt?uEM)u91 zm}W_)j-rf6MM;-8vcEQ>=hsNYR?%NHAO$d0Fsy;z;eh0!n9QRACD|N3=WK2?x27k} zSy5=n*1H%L(2a%L_6Ja8kS*0GI-FJC+81MRxIVM_N|c(j<7ISg%Y;SVsmle%!WlGQ z$m{mRyU}ODU8ej!#!p8W`7h*_)3G3=)P=eCaxV)Z3gVN@YXdgG>L*o_F?Y!B;WK6y zEs_+EsJa=wBmzy(?eq9G%0=9gddad)YnDq^*k|U&Muql!skc-&r)q+d4I`u+&mOru z2^McHg30IidU?`eo+QbWTiGYnD_N3Qn8l$Xs``f-nHt7 z4dz5bxUKld0qQA*5%2_>-LwJ8wqR@#V0SGxMihY&=oi$QoCoiP`ba z{upHOgLNWW$`J&C`H{OLZ)exqzl2c?tI9EFQ9Y_^IJt&0x4>L8(Kd)EkByk6va>n{i1m37_Pi~lmM?`{g>S%f+E zI%QPj4X}DN+^Oj{jZu&|dp@6-`W6|Q5h2Caew>;t3PE)W8hcT>>W$D11ikH(w2rSn zyBxjO=>ZnmiX||fyDAq~awYGSB3PDOQhw%0yn^8c9<5h8+!waLcd0j@vXx?@kHV>? zUZ<9DLX0u;$8h1s#ZFWx;zV(A>4fj< zJqFPv>^M6i@35Y`AhEdv)(g_q#C+8-X0V=ZEWwasGkNmF3D-rS!ya$&ERffO{N!sJ z>+6f{7o__I7;gBi?NTtg8I_u=oEB!HJ$dpZXQsLfH&eg7wBP5Ii<7Cfko(jShcJbH zPb3eOA%yd!!%<9!2U*2zSsg%q8svKA%9YR@W7eBrWbF^# z?Yv{*|9mvMUr7%($YhMUu@HeGAM$ zbAVOfj$ldQ;k+Z4dUhm>IJZuM8X%*4)~HK5hh=)AL%eqJQ^$*H*QuAn?cLKk4KD|| z&yf_5p)k5AKNs-;(8}xz~~jcdWAv^4_Ow6Z9^(D)(*!?8Iy?{ zIGUtYtI%$ZeMIl)V$Z50epgQntSn9k%k2s;f4N;rz~7uHaSN=m6z3MZtEV}A#sBrG zCnt3l#j7{ImlcbKqykF_{(wf zU_xyEFbYDmAWF_*H7iW%1*H%WeK2+l1Je1LT5w2wQ>=Fp;-cWU91L~6$+ z*Fo`vlu<_w%4Y1kr`_yY85~z$j>|i*Mm$}sc*gy4UVdTbx){!5MLkPme)o0UwS$mh zlKdFP65VWOy-7V~tj-L9K|U&)Df*mSmoS^osNnoBmt?6Qirms&k72>wd1J||+V2w# z!mKjdl(y$^-sS91M~;D-v5!NvgS}jIp{C-6u`uU>EYoKn-+!aOYao0Ap9v9 zq8zodZ?Veop|Q2BFNH1+ZZz0^&T0SJ8AH))5?C+D8+=q$(D=Bu^qh#d>% znwqzM{+_&Y$L>U(a8qikqeGzk`b5EEfmw)koJx%00SGf-+!%?K)A{Vjn6|{D#a1s~ zdmKceMkIa&)fXGac|?msbHE23@Zvz%QvV{|(YFJaCf=>h+KGL2B^#4DGD6`p{qW_E zU5QH1z?{R;O^nhBNWo4lKZ7snPPAR7y73Zb&Z{S|Q8~OINIgk7QcOLIk*9llfw9%K zZmodZ&CKOfdmef2tIe0UNLvO>1gh-BLzC#W&Q841;LGAx3;n#(RH$w7{st0%nICn< zAZ(E>Mu)xcX~%ekC`z4|o*%8w%TJ|ltWk1a3Qfh5s~i=ZW3vCH;4Vvi{rP@tIf70! z_nBwh7v|!tme~b1W>j28ot4f*THygSTH3T%nj%m<&tpyGmV^;WRI!a!j3f(G#u8|C z4Z%>uoi*|o5rt=aHXSFfd07l7J@+{FcC6)G=7|N#hj2w#q2?sEB*LZk)a-bT;USlG zUMg)!;phfsV>9OY2*!!x=q?5kb3~eLM5zoQ1@#hXn+%+rIu}yDwV1hv%`4_D6>5X4JsdXH zLnDd)HLnf*#qEhTOcUMFfX~~P?7^VKU?)SeB=xaWVHP#f#jj?}PobE|(xmuiO#61D z7EeJG%Nmt>T{Q z0eLo>Hw#NS30|Nl?9KN;W;a`aYO#|c5dA3djij6ja9AB2-APujh*FM zujDxJX;=QvluPUOG(Dz0`yrRS^XG`T%uq13PGTdYBk|IV6wBW(e8B|$offz9Nx}8d z!9n@S@A4wh{?Jr6Z|F$&EcP`^PaGOm*&nYFrb9No$o^rnIL(@1sh$C1w#%(^O{nbiblE1fPytH>M$>UCI?e3(*BS}Xs&l+NYrrFlfmLbjWowR&=c93>z7q12+w?VH8k=XAjc zg-SfNzI8_~eOcx=Isd>OMKHCXlZ=RpBAsxt(>d1bw(oDeAYL!D$a#ikCb>??uJ_QvMi^K=>^Vg(ly131?$-=p-PnUs64@t{DiW)z%Lo5O(!f$d9oZo`4v#_vC zgY=)kea+zhBA_Q7=(`O7+jSiv5CHax5r7;3TrOZl?WZk&s$78I;4*}{!|`EFMn;xM zM@NSTT&Do9U2bk};(r%F&mPb>1N63|P^gC>AF#vWHxJQ!}G zg_aN@&G87Kz?F~q=pqLp+n$Y}bClx`^Z%tEa2*7{-~SYU!1XTdpI_iTB23i05lXaf zY$Q6i^%M24-z8qG86dj&c@R6Y?1=$3%0yuS9-^F_91%>b5wBmr{_|b~0|VmMuV0B^ zeEsLKg@wh>;|muq{9X62Jbo_$|1W@ZB)|y(xGw)w{DJRNfBBzJN|bOs_Xg3l{w2Yt zsfFOs(oImg>_fazHBC5^R!cZ0`#0ah>3`!-0Q`UY7w{(ldk8Rp_&VTEfb9YN|E2%o zcOBpy2A~B%^KbCK1?Ptm;3Hzw{Rqa@S%7~D!Lp&2U{PO9kTdfjnm?H&nB`3n6l|hl zUlRT-|J%236Q4ePN+>8OAVfq&5WzP53rkHWMl+CHv~{7KjR9#`|AJ= zcK{IpGJrp|0i9?0j*1X8UI!AjO2Y`p%Wo2OE8>8>K@hh-K@imoBP#n05srBe5#(J5 ziITRT2|^~l1Su6qVpUZY!NbGjCl9#pfsd`Nt$)V9rKRP68vgsJ5Ny4K?kAB`q zK|%2x5Vi$?`xAfa-38J^+&ma*fn$+` z6t@~63ZL#L3K;Yg`E=We=PezH7cXA?KXB>NC1QDbIdOV=nh5M7f{!16rg3(5Ccb?6 z@@KvEt6lp zwx0la69kQ5?w<(!Cx3!?@5%VjItQ+2;Fy5%YkzQX@Mm2F*FUqfvwy!nFfc&$^YbHM zz`K!?lXD$#@dr=>_|wnsFFUv~m<}OrIije!CP6?=nh1`6atF@_feXV=Lk%faB+jJ?2m;bWO{LhR7{s3yZ zcVWN4`hWT7@5kJ{1Rm8K0>8nhzx$v6WIquj>>I+J8H4{?QJ=n+Eu@^I!S%kNEueX<%Q#$6$oe}nrkTR>h+ z05!ko@ZZ^o`2+6#;9V;N_)~(|{~wE)U!4C@f;`axaNG1}e8U|6U4WP=1>-c_V0?)b z@c&=u{(D;hXBpu8I)EQAf4CfA{E>Z7&y0Zni8XjnkpujX$NKMi{;Pe!7Xfe#aLxd7 z{9o}0*VX}Q0CyWUHa05IKm5Py?|)?nd=1!u0uTW(1%SuDA^}1G90Ak;Z}1=CzqY?T z@RtYv^1xpn_{#%-d4TwHgP=by@dzRjq~8YbTUg@3z!EHBSB63m0hVB-cpsLa=lV;6 z<;T zK{Z(Z9b%$4I{<&sA4~@G&X2)d`YX`4ssN}2`(@zV3((Ka25AxjVgNz_+yG7k z!1L2E7ua8aq(27pYrsNdAMKayw7`1?>*<-_c^)TsV}GP%SJlt-9=xH)YJ6P9{TX;HmWPx zO4{`mejCKSe*ob@fbXl63H+P%Hf6<34qrEUhF_=Q&=LCTjaG^TtLeZ4HnQ1lD!<)s zCyue>3kOtOT%6P=UYi5bR)FJ3DHFK0`sX-yQo}nZ>9LF7(B4;0QODRR3j5tun6FT8 zZ!bYxRJmqnXQ`>FiE3(URGkhsmid7AVHBhf0ckah7=Lz&jcPv{rIzRvJ@R>!DxVyK zCOSuXj(XL0I{wDSMhXN18$=lpB5@4{KC zJv~Z}!zZaO{1a95e@&+R^0f8$dcA~?O4G!|1kKFM5Of##QVQOlMPD8it z>FH6=Pfku!BobjC1>%1J*ylbx<+B&#m(0fFg-7;6U#=&!Jx{HpyuDS^a9GQ+Ko{}% z^;2J8pN7uPPAVuUAiv+Qo@;M!CvF4oKViEC;P~%~3EFTad{%j5TZ3dGbJaP`2WT2( zkeBYQSe{f{^r`1T%5A@@u?Ti<1HN5mPbq;95!DA%<;S$_dVCYF zCzNeSW}n+Z%HL0twVIM$PdtaU1`&`dz>4=>qI0nIR-(NdImY<&3*zRxVE2YKcJ>8a z8Niyf3B&{!5Ic5*|6l2B;OE%mD6s07HtPK&H2O09?&}lVbgjqWF9R;5^8@$VuXxsm zFxF(Dzgh7)UyCo`mw`^;Rq(wFybZhvc+lo)$CkD5-70gd1#adRSc)^~{?6Ubp^0Y~ z5vEwcc*U4o+Gb)u4#<;v9h*5nAR#Uzq5OSpLk(kaSZ4vDjTFg>#?1m`AQq>n_|JMR z82z78*5*4lY}%N4cV@;0Gq4@7Wn`?+L7#sQ-ZN6pG0`_}M7Qk5eDDP31z+I3;5*8+Apr+nxuX9;gD}fm1)pP}AN-STVhk9E zKfF#wOR_b4i1S$NMdIQ1W)U5(6OY0M-W`O|XcU+)sWvzdxKF^}xUth%U=40-a0>7A zr(%D2Lfl`zQ(&$uFdrBAk8C0s3<{UarLI*1cL?Ku+^=cgk^fB9`_Bv4*<+&I|C!j) z@}78M=q1tB)g|yn2@wi~L|a>%7#J83sQ=@rOWZhODJyC!9qACc9*4+rox%F5??tok zj2IjoRLgdEcdP3=olfT>-a9L_ieKNcR+Zj`y8XuWlX7c?;=Ur}q9+6&>w)&W1pPYc zoJr2M^lN!dSo3AH#+8N7f1vHF6S-r@29pKasB~Pjq2or`-*F!tfc_j;?^s#=)?ko# u!^Svp1-Oi|VT`}o`aCzwek@M9fEaHSEwc=mSx136%(fVdl0LS&Zrwi=+`yp# From fd6a22ebddc3562b618d11502df46da722fac6d0 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 28 Nov 2018 15:17:34 -0500 Subject: [PATCH 098/576] Add files via upload --- web/images/cancel.png | Bin 0 -> 929 bytes web/images/ok.png | Bin 0 -> 925 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 web/images/cancel.png create mode 100644 web/images/ok.png diff --git a/web/images/cancel.png b/web/images/cancel.png new file mode 100644 index 0000000000000000000000000000000000000000..81cd2d0c526eb8ffe94195752341b8b1c1df30f4 GIT binary patch literal 929 zcmV;S177@zP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D12#!SK~!i%?U~DN z(?Ar4BW??J+*ZH~utG{^2vVhpaj96aB;vM%Ev$=R!2*eNO)HhlBcLKx6eJ!4C=URX z4FOc*Br2e0IA?k+h2)IwiS0>|{7at{%QNTv$DVk`<4UPgrLs#mn|ph+vffqlF0j%K z#0TI<7|7oU{_X~H-JF9q*jC@K?4j<{Q-7{@5)3YcN_+u>+J!I>8`!tkkS8ddKXn?_ zqoI;dfnS_C7cd4CvWzh)e6fNncde_$cg{>k+8CSCo%m&uNs zIu}kKgGuKb7t}NDpMf|+w$cl49}{d!h$XU>PG*L6nWWCwb^rEF{v3m83w^kA9O$K| z>c`1mvfz)qzy)FfBY)nkX}!Izw;tT%+YEtiur2m+ETTpB;)RPW7(N?ZkTD|jkrIlC z%tvx50t)z)Y5~{}#91x?NB`E1e+(H}iWoI-1jiU-w5^Svs!FnHmst`soo(2R4HuE7 zO)6%^9kOW`jQ$7EQe12`TG=zuh_c|ghcWYaEsd*TBm zz!ovAEanlISjnbcPS1Y^Qv_c5QNf+aWFA0oWYeyE3K$tSC@9KH0ss9F!aoYzIRVx@ z-iguSl%)tI-jPkapnw&&a}2C`G8%V|ixp3r$LMaJ$ds5Tn|7HEDy}nw_oYNo6J*ma zTFias0*tX67jr0R+~R_;L`5W+kBEwJF^_~wJS2O`!tFk%`2dU*{6e$k^g@GzMcpzN zY&wWVvXx%=B8?LVAJ8L8e%+j_A0}IF3eU-_Y*3HD@M)5r$pn9%CtP4JDEWwNOs<`+ zMX|~zC=kqvA5O?dHkr*`CDyn^MF7L*Wp10hk#M8c&t{ic)Q!eIN}Inzb><2rYL6$* zOuM7xB}!AQ%p*1sOHPxW1)QYts&CHB9HQ|4L^E~^_{f=y1N-3ezAAcc*P00000NkvXXu0mjf DaaNzi literal 0 HcmV?d00001 diff --git a/web/images/ok.png b/web/images/ok.png new file mode 100644 index 0000000000000000000000000000000000000000..304c35eb8e62f3cf12c4911b9decb87796a802e6 GIT binary patch literal 925 zcmV;O17iG%P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D12RcOK~!i%?U}u6 z6hRoq55EdKzbf^w5QA3fB)Au64(?EsMnSD@)L?U6&O%U3AjbR!G3=}{(JEklU}IFQ z{c22Nt%98Ivw07~-aB`*yR&Pv5By+ryYs%!eC*8Zq*kd?rTl6=Z|$E98|Q*Z-LFR~ z42=F*H~J@C|B0b%`t3t}kDkG^?RI+~7yo}!kvdK09+0{3^+@+pVe~hYod_GJI9z$E zzpNjp)_g{-`CBxX0>mH|5R=0fD>6Ps>_}$vK)twy*qp|{Xq+FSBui3qpHPmcXBKZA zoSZ(N;+8Mdd>^A%z4SyG!^Q@N6Whq9AZ$!afy+f*W;^LL zvD`dCLuXqKS{|64w9&`dmb=h>Qoy3PwlO9C4yYmL*_NBI!cw8!izmIwk zKiwAZ!%MIhoMd~Wg(Y4JR0MtVZ+nkphE$@%_J#|atazUy1o2JMJiy=AH>L-kr6K*r zX#+^+&nF8Pfz3RAm!1byi7~cm7j+eFiRA#k$YMUm=oz+Y7d>Re!k)-%9vHpCHtnKr zq7M(Dum^IPk5TX0rd?D^`jV0g4>D}-PLkhzJQHoRO}kv@e@u6-27H(Y@WwXna;X5! zyBhIj9ynEC)DXfP?P};w_og@Vz-b8KMUe{c#idn!n~yPilWp2X6$r(`32c>s@j}c4 zr)f0BLT0N(A?AsTk-En=?ZTmxRM>`8iM{wT9}_mtvQ4|<&0M6uiUBOxD&f<-^JWgB zVbqa=3?o?yT;pAkp3R1uWqYHA<35-5AW8q_^={tiU#UK5AgaKE7;FUnSxCB<9W}?c z+=UNmEF5ycGEqM+EH{s`t#q0+`l=kXJOa~bv7KzH8?`6}E(N2Xu#N1((IN#}6%!N* z<-|Wu*hW6#pq0krx|pZ{=-pfMcDUOY4qD4O>{4^%Z^jRBTK@{d#uci_mYh60h#9=N z)Z{e9il^B5EQ{R$v`C@VgZ1DDhc8dOVt1(ZK8xmtuv+UR$ Date: Wed, 28 Nov 2018 15:18:14 -0500 Subject: [PATCH 099/576] Update index.php --- web/yaamp/modules/site/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/index.php b/web/yaamp/modules/site/index.php index 2a739255e..0618ddca2 100644 --- a/web/yaamp/modules/site/index.php +++ b/web/yaamp/modules/site/index.php @@ -141,7 +141,7 @@
  • -
  • +

  • From 37d21d7c5ebd90e746e1c0f5a39ad1a77bc40a77 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 28 Nov 2018 15:21:34 -0500 Subject: [PATCH 100/576] Update current_results.php --- .../modules/site/results/current_results.php | 266 ++++++++++-------- 1 file changed, 152 insertions(+), 114 deletions(-) diff --git a/web/yaamp/modules/site/results/current_results.php b/web/yaamp/modules/site/results/current_results.php index c24a925bb..f90c91d2e 100644 --- a/web/yaamp/modules/site/results/current_results.php +++ b/web/yaamp/modules/site/results/current_results.php @@ -1,184 +1,222 @@ getState('yaamp-algo'); - echo "
    "; echo "
    Pool Status
    "; echo "
    "; - showTableSorter('maintable1', "{ - tableClass: 'dataGrid2', - textExtraction: { - 4: function(node, table, n) { return $(node).attr('data'); }, - 8: function(node, table, n) { return $(node).attr('data'); } - } + tableClass: 'dataGrid2', + textExtraction: { + 4: function(node, table, n) { return $(node).attr('data'); }, + 8: function(node, table, n) { return $(node).attr('data'); } + } }"); - echo << -Algo -Port -Coins -Miners -Hashrate -Fees** -Current
    Estimate +Coins +Auto Exchanged +Port +Symbol +Miners +Pool HashRate +Network Hashrate +Fees** + -24 Hours
    Estimated -24 Hours
    Actual*** + +24 Hours
    Actual*** END; - $best_algo = ''; $best_norm = 0; - $algos = array(); -foreach(yaamp_get_algos() as $algo) -{ - $algo_norm = yaamp_get_algo_norm($algo); - - $price = controller()->memcache->get_database_scalar("current_price-$algo", - "select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $norm = $price*$algo_norm; - $norm = take_yaamp_fee($norm, $algo); - $algos[] = array($norm, $algo); - if($norm > $best_norm) +foreach(yaamp_get_algos() as $algo) { + $algo_norm = yaamp_get_algo_norm($algo); + $price = controller()->memcache->get_database_scalar("current_price-$algo", "select price from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $norm = $price * $algo_norm; + $norm = take_yaamp_fee($norm, $algo); + $algos[] = array( + $norm, + $algo + ); + if ($norm > $best_norm) + { $best_norm = $norm; $best_algo = $algo; + } } -} function cmp($a, $b) -{ + { return $a[0] < $b[0]; -} + } usort($algos, 'cmp'); - $total_coins = 0; $total_miners = 0; - $showestimates = false; - echo ""; + foreach($algos as $item) -{ + { $norm = $item[0]; $algo = $item[1]; - $coinsym = ''; - $coins = getdbocount('db_coins', "enable and visible and auto_ready and algo=:algo", array(':algo'=>$algo)); - if ($coins == 1) { + $coins = getdbocount('db_coins', "enable and visible and auto_ready and algo=:algo", array( + ':algo' => $algo + )); + if ($coins == 2) + { + // If we only mine one coin, show it... - $coin = getdbosql('db_coins', "enable and visible and auto_ready and algo=:algo", array(':algo'=>$algo)); + + $coin = getdbosql('db_coins', "enable and visible and auto_ready and algo=:algo", array( + ':algo' => $algo + )); $coinsym = empty($coin->symbol2) ? $coin->symbol : $coin->symbol2; - $coinsym = ''.$coinsym.''; - } + $coinsym = '' . $coinsym . ''; + } if (!$coins) continue; - - $workers = getdbocount('db_workers', "algo=:algo", array(':algo'=>$algo)); - - $hashrate = controller()->memcache->get_database_scalar("current_hashrate-$algo", - "select hashrate from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $hashrate_sfx = $hashrate? Itoa2($hashrate).'h/s': '-'; - - $price = controller()->memcache->get_database_scalar("current_price-$algo", - "select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - - $price = $price? mbitcoinvaluetoa(take_yaamp_fee($price, $algo)): '-'; + $workers = getdbocount('db_workers', "algo=:algo", array( + ':algo' => $algo + )); + $hashrate = controller()->memcache->get_database_scalar("current_hashrate-$algo", "select hashrate from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $hashrate_sfx = $hashrate ? Itoa2($hashrate) . 'h/s' : '-'; + $price = controller()->memcache->get_database_scalar("current_price-$algo", "select price from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $price = $price ? mbitcoinvaluetoa(take_yaamp_fee($price, $algo)) : '-'; $norm = mbitcoinvaluetoa($norm); - - $t = time() - 24*60*60; - - $avgprice = controller()->memcache->get_database_scalar("current_avgprice-$algo", - "select avg(price) from hashrate where algo=:algo and time>$t", array(':algo'=>$algo)); - $avgprice = $avgprice? mbitcoinvaluetoa(take_yaamp_fee($avgprice, $algo)): '-'; - - $total1 = controller()->memcache->get_database_scalar("current_total-$algo", - "SELECT SUM(amount*price) AS total FROM blocks WHERE time>$t AND algo=:algo AND NOT category IN ('orphan','stake','generated')", - array(':algo'=>$algo) - ); - - $hashrate1 = controller()->memcache->get_database_scalar("current_hashrate1-$algo", - "select avg(hashrate) from hashrate where time>$t and algo=:algo", array(':algo'=>$algo)); - + $t = time() - 24 * 60 * 60; + $avgprice = controller()->memcache->get_database_scalar("current_avgprice-$algo", "select avg(price) from hashrate where algo=:algo and time>$t", array( + ':algo' => $algo + )); + $avgprice = $avgprice ? mbitcoinvaluetoa(take_yaamp_fee($avgprice, $algo)) : '-'; + $total1 = controller()->memcache->get_database_scalar("current_total-$algo", "SELECT SUM(amount*price) AS total FROM blocks WHERE time>$t AND algo=:algo AND NOT category IN ('orphan','stake','generated')", array( + ':algo' => $algo + )); + $hashrate1 = controller()->memcache->get_database_scalar("current_hashrate1-$algo", "select avg(hashrate) from hashrate where time>$t and algo=:algo", array( + ':algo' => $algo + )); $algo_unit_factor = yaamp_algo_mBTC_factor($algo); - $btcmhday1 = $hashrate1 != 0? mbitcoinvaluetoa($total1 / $hashrate1 * 1000000 * 1000 * $algo_unit_factor): ''; - + $btcmhday1 = $hashrate1 != 0 ? mbitcoinvaluetoa($total1 / $hashrate1 * 1000000 * 1000 * $algo_unit_factor) : ''; $fees = yaamp_fee($algo); $port = getAlgoPort($algo); - if($defaultalgo == $algo) - echo ""; - else - echo ""; - - echo "$algo"; - echo "$port"; - echo "".($coins==1 ? $coinsym : $coins).""; - echo "$workers"; - echo ''.$hashrate_sfx.''; - echo "{$fees}%"; - - if($algo == $best_algo) - echo ''.$price.'*'; - else if($norm>0) - echo ''.$price.''; - - else - echo ''.$price.''; - echo ''.$avgprice.''; - - if($algo == $best_algo) - echo ''.$btcmhday1.'*'; - else - echo ''.$btcmhday1.''; - + if ($defaultalgo == $algo) echo ""; + else echo ""; + echo "$algo"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ''; + echo ''; + echo ""; + echo ""; + if ($algo == $best_algo) echo '' . $price . '*'; + else + if ($norm > 0) echo '' . $price . ''; + else echo ''; + echo ''; + if ($algo == $best_algo) echo '' . $btcmhday1 . '*'; + else echo '' . $btcmhday1 . ''; + echo ""; + if ($coins > 0) + { + $list = getdbolist('db_coins', "enable and visible and auto_ready and algo=:algo order by index_avg desc", array( + ':algo' => $algo + )); + + + foreach($list as $coin) + { + $name = substr($coin->name, 0, 18); + $symbol = $coin->getOfficialSymbol(); + echo " $name "; + $port_count = getdbocount('db_stratums', "algo=:algo and symbol=:symbol", array( + ':algo' => $algo, + ':symbol' => $symbol + )); + $port_db = getdbosql('db_stratums', "algo=:algo and symbol=:symbol", array( + ':algo' => $algo, + ':symbol' => $symbol + )); + + $dontsell = $coin->dontsell; + if ($dontsell == 1) + echo ""; + else + echo ""; + + + if ($port_count == 1) echo "" . $port_db->port . ""; + else echo "$port"; + echo "$symbol"; + if ($port_count == 1) echo "" . $port_db->workers . ""; + else echo "$workers"; + $pool_hash = yaamp_coin_rate($coin->id); + $pool_hash_sfx = $pool_hash ? Itoa2($pool_hash) . 'h/s' : ''; + echo "$pool_hash_sfx"; + $pool_hash_sfx = $pool_hash? Itoa2($pool_hash).'h/s': ''; + $min_ttf = $coin->network_ttf>0? min($coin->actual_ttf, $coin->network_ttf): $coin->actual_ttf; + $network_hash = $coin->difficulty * 0x100000000 / ($min_ttf? $min_ttf: 60); + $network_hash = $network_hash? Itoa2($network_hash).'h/s': ''; + echo "$network_hash"; + echo "{$fees}%"; + $btcmhd = yaamp_profitability($coin); + $btcmhd = mbitcoinvaluetoa($btcmhd); + echo "$btcmhd"; echo ""; + } + } - $total_coins += $coins; - $total_miners += $workers; -} + $total_coins+= $coins; + $total_miners+= $workers; + } echo ""; -if($defaultalgo == 'all') - echo ""; -else - echo ""; - +if ($defaultalgo == 'all') echo ""; + else echo ""; echo "all"; echo ""; -echo "$total_coins"; -echo "$total_miners"; +echo ""; +echo "$total_coins"; +echo "$total_miners"; echo ""; echo ""; echo ''; echo ''; echo ""; +echo ""; echo ""; - echo ""; - echo '

     * values in mBTC/MH/day, per GH for sha & blake algos

    '; - -echo "

    "; +echo "
    "; ?> - + - - + From 366e340b8b4cf8bb2a4980b212636f28350bdb35 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 28 Nov 2018 15:23:24 -0500 Subject: [PATCH 101/576] Update index.php --- web/yaamp/modules/site/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/index.php b/web/yaamp/modules/site/index.php index 0618ddca2..8c18194bb 100644 --- a/web/yaamp/modules/site/index.php +++ b/web/yaamp/modules/site/index.php @@ -141,7 +141,7 @@
  • -
  • +

  • From 69cf43a1eba83ee7fc06b0f3eec725d8bdc91a3d Mon Sep 17 00:00:00 2001 From: cryptopool Date: Wed, 28 Nov 2018 22:38:27 -0500 Subject: [PATCH 102/576] Update yiimp --- bin/yiimp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/yiimp b/bin/yiimp index 269115bfe..86076d19f 100755 --- a/bin/yiimp +++ b/bin/yiimp @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ROOTDIR=/data/yiimp DIR=`pwd` From f493dba259ac9ce433fc774547028aa84eaf44b2 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 30 Nov 2018 21:48:12 -0500 Subject: [PATCH 103/576] Update coinbase.cpp --- stratum/coinbase.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index c6f734ad1..a79a3c6e5 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -285,6 +285,50 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + + else if (strcmp(coind->symbol, "IFX") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; +} else if(strcmp(coind->symbol, "SECI") == 0) { char script_payee[512] = { 0 }; From 2bc3d86c4f1d6b2e0ce7f7a30bd48cd93bfdffea Mon Sep 17 00:00:00 2001 From: greaseman <40420516+greaseman@users.noreply.github.com> Date: Thu, 27 Dec 2018 12:10:54 -0500 Subject: [PATCH 104/576] Update Coinbase for GTM,AGM,CRDS --- stratum/coinbase.cpp | 138 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 134 insertions(+), 4 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index a79a3c6e5..e094a36b7 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -285,7 +285,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - + else if (strcmp(coind->symbol, "IFX") == 0) { char payees[4]; @@ -328,8 +328,141 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available / 100000000 * coind->reward_mul; return; +} +// add GTM +if (strcmp(coind->symbol, "GTM") == 0) +{ +char payees[4]; +int npayees = 1; +char script_dests[4096] = { 0 }; +// +json_value* founderreward = json_get_array(json_result, "founderreward"); +if (founderreward) +{ + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } +} +json_value* masternode = json_get_object(json_result, "masternode"); +bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); +if (masternode_enabled && masternode) +{ + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } +} +sprintf(payees, "%02x", npayees); +strcat(templ->coinb2, payees); +strcat(templ->coinb2, script_dests); +job_pack_tx(coind, templ->coinb2, available, NULL); +strcat(templ->coinb2, "00000000"); // locktime +coind->reward = (double)available / 100000000 * coind->reward_mul; +return; +} + +// add AGM +if (strcmp(coind->symbol, "AGM") == 0) +{ +char payees[4]; +int npayees = 1; +char script_dests[4096] = { 0 }; +// +json_value* founderreward = json_get_array(json_result, "founderreward"); +if (founderreward) +{ + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } +} +json_value* masternode = json_get_object(json_result, "masternode"); +bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); +if (masternode_enabled && masternode) +{ + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } +} +sprintf(payees, "%02x", npayees); +strcat(templ->coinb2, payees); +strcat(templ->coinb2, script_dests); +job_pack_tx(coind, templ->coinb2, available, NULL); +strcat(templ->coinb2, "00000000"); // locktime +coind->reward = (double)available / 100000000 * coind->reward_mul; +return; } + // add CRDS +if (strcmp(coind->symbol, "CRDS") == 0) +{ +char payees[4]; +int npayees = 1; +char script_dests[4096] = { 0 }; +// +json_value* founderreward = json_get_array(json_result, "founderreward"); +if (founderreward) +{ + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } +} +json_value* masternode = json_get_object(json_result, "masternode"); +bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); +if (masternode_enabled && masternode) +{ + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } +} +sprintf(payees, "%02x", npayees); +strcat(templ->coinb2, payees); +strcat(templ->coinb2, script_dests); +job_pack_tx(coind, templ->coinb2, available, NULL); +strcat(templ->coinb2, "00000000"); // locktime +coind->reward = (double)available / 100000000 * coind->reward_mul; +return; +} else if(strcmp(coind->symbol, "SECI") == 0) { char script_payee[512] = { 0 }; char payees[1]; @@ -710,6 +843,3 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } - - - From 119b50a2eeaabb44531a8b247cba1e7052d87ee1 Mon Sep 17 00:00:00 2001 From: greaseman <40420516+greaseman@users.noreply.github.com> Date: Thu, 27 Dec 2018 12:26:42 -0500 Subject: [PATCH 105/576] add x21s support --- stratum/algos/makefile | 2 +- stratum/algos/x21s.c | 188 +++++++++++++++++++++++++++++ stratum/algos/x21s.h | 16 +++ stratum/config.sample/x21s.conf | 15 +++ stratum/stratum.cpp | 3 +- stratum/stratum.h | 1 + web/yaamp/core/functions/yaamp.php | 3 + 7 files changed, 226 insertions(+), 2 deletions(-) create mode 100644 stratum/algos/x21s.c create mode 100644 stratum/algos/x21s.h create mode 100644 stratum/config.sample/x21s.conf diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 61999a4b9..f34ed30cc 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -20,7 +20,7 @@ SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c Sponge.c allium.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ argon2a.c blake2/blake2b.c ar2/argon2.c ar2/core.c ar2/encoding.c ar2/opt.c ar2/thread.c ar2/ar2-scrypt-jane.c \ hive.c pomelo.c hex.c argon2d-dyn.c \ - phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c lbk3.c + phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x21s.c lbk3.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) OUTPUT=libalgos.a diff --git a/stratum/algos/x21s.c b/stratum/algos/x21s.c new file mode 100644 index 000000000..269826a5e --- /dev/null +++ b/stratum/algos/x21s.c @@ -0,0 +1,188 @@ +#include +#include +#include + #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gost.h" +#include "Lyra2.h" +#include "common.h" + enum Algo { + BLAKE = 0, + BMW, + GROESTL, + JH, + KECCAK, + SKEIN, + LUFFA, + CUBEHASH, + SHAVITE, + SIMD, + ECHO, + HAMSI, + FUGUE, + SHABAL, + WHIRLPOOL, + SHA512, + HASH_FUNC_COUNT +}; +static void getAlgoString(const uint8_t* prevblock, char *output) +{ + strcpy(output, "0123456789ABCDEF"); + for(int i = 0; i < 16; i++){ + uint8_t b = (15 - i) >> 1; // 16 ascii hex chars, reversed + uint8_t algoDigit = (i & 1) ? prevblock[b] & 0xF : prevblock[b] >> 4; + int offset = algoDigit; + // insert the nth character at the front + char oldVal = output[offset]; + for(int j=offset; j-->0;) { + output[j+1] = output[j]; + } + output[0] = oldVal; + } +} + void x21s_hash(const char* input, char* output, uint32_t len) { + uint32_t hash[64/4]; + char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_skein512_context ctx_skein; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_haval256_5_context ctx_haval; + sph_tiger_context ctx_tiger; + sph_gost512_context ctx_gost; + sph_sha256_context ctx_sha; + void *in = (void*) input; + int size = len; + getAlgoString(&input[4], hashOrder); + for (int i = 0; i < 16; i++) + { + const char elem = hashOrder[i]; + const uint8_t algo = elem >= 'A' ? elem - 'A' + 10 : elem - '0'; + switch (algo) { + case BLAKE: + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, in, size); + sph_blake512_close(&ctx_blake, hash); + break; + case BMW: + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, in, size); + sph_bmw512_close(&ctx_bmw, hash); + break; + case GROESTL: + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, in, size); + sph_groestl512_close(&ctx_groestl, hash); + break; + case SKEIN: + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, in, size); + sph_skein512_close(&ctx_skein, hash); + break; + case JH: + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, in, size); + sph_jh512_close(&ctx_jh, hash); + break; + case KECCAK: + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, in, size); + sph_keccak512_close(&ctx_keccak, hash); + break; + case LUFFA: + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, in, size); + sph_luffa512_close(&ctx_luffa, hash); + break; + case CUBEHASH: + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, in, size); + sph_cubehash512_close(&ctx_cubehash, hash); + break; + case SHAVITE: + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, in, size); + sph_shavite512_close(&ctx_shavite, hash); + break; + case SIMD: + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, in, size); + sph_simd512_close(&ctx_simd, hash); + break; + case ECHO: + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, in, size); + sph_echo512_close(&ctx_echo, hash); + break; + case HAMSI: + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, in, size); + sph_hamsi512_close(&ctx_hamsi, hash); + break; + case FUGUE: + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, in, size); + sph_fugue512_close(&ctx_fugue, hash); + break; + case SHABAL: + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, in, size); + sph_shabal512_close(&ctx_shabal, hash); + break; + case WHIRLPOOL: + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, in, size); + sph_whirlpool_close(&ctx_whirlpool, hash); + break; + case SHA512: + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) in, size); + sph_sha512_close(&ctx_sha512,(void*) hash); + break; + } + in = (void*) hash; + size = 64; + } + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval,(const void*) hash, 64); + sph_haval256_5_close(&ctx_haval,hash); + sph_tiger_init(&ctx_tiger); + sph_tiger (&ctx_tiger, (const void*) hash, 64); + sph_tiger_close(&ctx_tiger, (void*) hash); + LYRA2((void*) hash, 32, (const void*) hash, 32, (const void*) hash, 32, 1, 4, 4); + sph_gost512_init(&ctx_gost); + sph_gost512 (&ctx_gost, (const void*) hash, 64); + sph_gost512_close(&ctx_gost, (void*) hash); + sph_sha256_init(&ctx_sha); + sph_sha256 (&ctx_sha, (const void*) hash, 64); + sph_sha256_close(&ctx_sha, (void*) hash); + memcpy(output, hash, 32); +} diff --git a/stratum/algos/x21s.h b/stratum/algos/x21s.h new file mode 100644 index 000000000..2f26a7ea3 --- /dev/null +++ b/stratum/algos/x21s.h @@ -0,0 +1,16 @@ +#ifndef X21S_H +#define X21S_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x21s_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/config.sample/x21s.conf b/stratum/config.sample/x21s.conf new file mode 100644 index 000000000..f961a8899 --- /dev/null +++ b/stratum/config.sample/x21s.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 3224 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = x21s +difficulty = 1 +max_ttf = 1000000000 diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 0dc6a3abc..b708a403a 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -122,6 +122,7 @@ YAAMP_ALGO g_algos[] = {"x14", x14_hash, 1, 0, 0}, {"x15", x15_hash, 1, 0, 0}, {"x17", x17_hash, 1, 0, 0}, + {"x21s", x21s_hash, 0x100, 0, 0}, {"x22i", x22i_hash, 1, 0, 0}, {"x11evo", x11evo_hash, 1, 0, 0}, @@ -164,7 +165,7 @@ YAAMP_ALGO g_algos[] = {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, {"keccakc", keccak256_hash, 0x100, 0, 0}, {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, - + {"phi", phi_hash, 1, 0, 0}, {"phi2", phi2_hash, 0x100, 0, 0}, diff --git a/stratum/stratum.h b/stratum/stratum.h index 636141af5..bf347fdae 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -158,6 +158,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/x16r.h" #include "algos/x16s.h" #include "algos/x17.h" +#include "algos/x21s.h" #include "algos/x22i.h" #include "algos/xevan.h" #include "algos/hmq17.h" diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index aaf31000a..8d019a8be 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -50,6 +50,7 @@ function yaamp_get_algos() 'x16r', 'x16s', 'x17', + 'x21s', 'x22i', 'xevan', 'groestl', // dmd-gr -m 256 (deprecated) @@ -159,6 +160,7 @@ function getAlgoColors($algo) 'x16r' => '#f0b080', 'x16s' => '#f0b080', 'x17' => '#f0b0a0', + 'x21s' => '#f0b0a0', 'x22i' => '#f0a090', 'xevan' => '#f0b0a0', 'allium' => '#80a0d0', @@ -241,6 +243,7 @@ function getAlgoPort($algo) 'x16r' => 3636, 'x16s' => 3663, 'x17' => 3737, + 'x21s' => 3224, 'x22i' => 3223, 'aergo' => 3691, 'xevan' => 3739, From 1f7e04ebd7d1cb5981d99cfe3e47bcb528949caf Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:04:42 -0500 Subject: [PATCH 106/576] Create lyra2vc0ban.c --- stratum/algos/lyra2vc0ban.c | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 stratum/algos/lyra2vc0ban.c diff --git a/stratum/algos/lyra2vc0ban.c b/stratum/algos/lyra2vc0ban.c new file mode 100644 index 000000000..3a22405d0 --- /dev/null +++ b/stratum/algos/lyra2vc0ban.c @@ -0,0 +1,51 @@ +#include +#include +#include +#include +#include "../sha3/sph_blake.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_keccak.h" +#include "../sha3/sph_skein.h" +#include "../sha3/sph_bmw.h" +#include "Lyra2.h" + +void lyra2vc0ban_hash(const char* input, char* output, uint32_t len) +{ + uint32_t hashA[8], hashB[8]; + + sph_blake256_context ctx_blake; + sph_keccak256_context ctx_keccak; + sph_skein256_context ctx_skein; + sph_bmw256_context ctx_bmw; + sph_cubehash256_context ctx_cube; + + sph_blake256_set_rounds(14); + + sph_blake256_init(&ctx_blake); + sph_blake256(&ctx_blake, input, len); + sph_blake256_close(&ctx_blake, hashA); + + sph_cubehash256_init(&ctx_cube); + sph_cubehash256(&ctx_cube, hashA, 32); + sph_cubehash256_close(&ctx_cube, hashB); + + sph_cubehash256_init(&ctx_cube); + sph_cubehash256(&ctx_cube, hashB, 32); + sph_cubehash256_close(&ctx_cube, hashA); + + LYRA2(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); + + sph_skein256_init(&ctx_skein); + sph_skein256(&ctx_skein, hashB, 32); + sph_skein256_close(&ctx_skein, hashA); + + sph_keccak256_init(&ctx_keccak); + sph_keccak256(&ctx_keccak, hashA, 32); + sph_keccak256_close(&ctx_keccak, hashB); + + sph_bmw256_init(&ctx_bmw); + sph_bmw256(&ctx_bmw, hashB, 32); + sph_bmw256_close(&ctx_bmw, hashA); + + memcpy(output, hashA, 32); +} From b05818b58fe635d59ca7640bc5115999e326e414 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:05:03 -0500 Subject: [PATCH 107/576] Create lyra2vc0ban.h --- stratum/algos/lyra2vc0ban.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/lyra2vc0ban.h diff --git a/stratum/algos/lyra2vc0ban.h b/stratum/algos/lyra2vc0ban.h new file mode 100644 index 000000000..fc2f2db99 --- /dev/null +++ b/stratum/algos/lyra2vc0ban.h @@ -0,0 +1,16 @@ +#ifndef LYRA2VC0BAN_H +#define LYRA2VC0BAN_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void lyra2vc0ban_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From 3e99d29109ab3b0e3d4cce07c45424139d71b228 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:06:08 -0500 Subject: [PATCH 108/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 7476b4953..d5d9d6503 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,7 +8,7 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c Sponge.c allium.c \ +SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c sm3.c x14.c x15.c x17.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ From 61da070679f499f299da372f678a9692b631d882 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:07:13 -0500 Subject: [PATCH 109/576] Update stratum.cpp --- stratum/stratum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index d65edb1c5..bc1d77d98 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -142,7 +142,7 @@ YAAMP_ALGO g_algos[] = {"lyra2", lyra2re_hash, 0x80, 0, 0}, {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, {"lyra2z", lyra2z_hash, 0x100, 0, 0}, - + {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, {"bastion", bastion_hash, 1, 0 }, {"blake", blake_hash, 1, 0 }, {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, From fb8f785fd1ddb6e25d99c861dfe023211ffe7d93 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:07:48 -0500 Subject: [PATCH 110/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 6dfbdc19f..85f45af77 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -171,6 +171,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/lyra2re.h" #include "algos/lyra2v2.h" #include "algos/lyra2z.h" +#include "algos/lyra2vc0ban.h" #include "algos/blake.h" #include "algos/blakecoin.h" #include "algos/blake2b.h" From 0d93c0bf314a18e40c207d4e978f4f06099f5d87 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:09:23 -0500 Subject: [PATCH 111/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 038f2ed8c..b4265a2e0 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -34,6 +34,7 @@ function yaamp_get_algos() 'lyra2', 'lyra2v2', 'lyra2z', + 'lyra2vc0ban', 'neoscrypt', 'nist5', 'penta', @@ -196,6 +197,7 @@ function getAlgoColors($algo) 'lyra2' => '#80a0f0', 'lyra2v2' => '#80c0f0', 'lyra2z' => '#80b0f0', + 'lyra2vc0ban' => '#80c0f0', 'phi' => '#a0a0e0', 'phi2' => '#a0a0e0', 'polytimos' => '#dedefe', @@ -265,6 +267,7 @@ function getAlgoPort($algo) 'lyra2' => 4433, 'lyra2v2' => 4533, 'lyra2z' => 4553, + 'lyra2vc0ban' => 4563, 'jha' => 4633, 'qubit' => 4733, 'zr5' => 4833, From f61a5c15abbdc2191f5747a35300abce47bae082 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:13:08 -0500 Subject: [PATCH 112/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index d5d9d6503..4fee42013 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -9,7 +9,7 @@ CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2vc0ban.c Sponge.c allium.c \ - c11.c x11.c x12.c x13.c hsr14.c sm3.c x14.c x15.c x17.c \ + c11.c x11.c x12.c x13.c hsr14.c sm3.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ From a5901cb2ab3214119628efa4cc822bc41e4455ca Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:13:43 -0500 Subject: [PATCH 113/576] Create x18.c --- stratum/algos/x18.c | 123 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 stratum/algos/x18.c diff --git a/stratum/algos/x18.c b/stratum/algos/x18.c new file mode 100644 index 000000000..5387e4923 --- /dev/null +++ b/stratum/algos/x18.c @@ -0,0 +1,123 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _ALIGN(x) __attribute__ ((aligned(x))) + +void x18_hash(const char* input, char* output, uint32_t len) +{ + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_skein512_context ctx_skein; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha2; + sph_haval256_5_context ctx_haval; + sph_gost512_context ctx_gost; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t _ALIGN(64) hashA[16], hashB[16]; + + sph_blake512_init(&ctx_blake); + sph_blake512 (&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, hashA); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512 (&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512 (&ctx_groestl, hashB, 64); + sph_groestl512_close(&ctx_groestl, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512 (&ctx_skein, hashA, 64); + sph_skein512_close (&ctx_skein, hashB); + + sph_jh512_init(&ctx_jh); + sph_jh512 (&ctx_jh, hashB, 64); + sph_jh512_close(&ctx_jh, hashA); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512 (&ctx_keccak, hashA, 64); + sph_keccak512_close(&ctx_keccak, hashB); + + sph_luffa512_init (&ctx_luffa); + sph_luffa512 (&ctx_luffa, hashB, 64); + sph_luffa512_close (&ctx_luffa, hashA); + + sph_cubehash512_init (&ctx_cubehash); + sph_cubehash512 (&ctx_cubehash, hashA, 64); + sph_cubehash512_close(&ctx_cubehash, hashB); + + sph_shavite512_init (&ctx_shavite); + sph_shavite512 (&ctx_shavite, hashB, 64); + sph_shavite512_close(&ctx_shavite, hashA); + + sph_simd512_init (&ctx_simd); + sph_simd512 (&ctx_simd, hashA, 64); + sph_simd512_close(&ctx_simd, hashB); + + sph_echo512_init (&ctx_echo); + sph_echo512 (&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_hamsi512_init (&ctx_hamsi); + sph_hamsi512 (&ctx_hamsi, hashA, 64); + sph_hamsi512_close(&ctx_hamsi, hashB); + + sph_fugue512_init (&ctx_fugue); + sph_fugue512 (&ctx_fugue, hashB, 64); + sph_fugue512_close(&ctx_fugue, hashA); + + sph_shabal512_init (&ctx_shabal); + sph_shabal512 (&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_whirlpool_init (&ctx_whirlpool); + sph_whirlpool (&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_sha512_init (&ctx_sha2); + sph_sha512 (&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_haval256_5_init (&ctx_haval); + sph_haval256_5 (&ctx_haval, hashB, 64); + sph_haval256_5_close(&ctx_haval, hashA); + + sph_gost512_init (&ctx_gost); + sph_gost512 (&ctx_gost, hashA, 64); + sph_gost512_close(&ctx_gost, hashB); + + memcpy(output, hashB, 32); +} From 5e062399263adc0989558788b8a879fd06008e2e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:14:07 -0500 Subject: [PATCH 114/576] Create x18.h --- stratum/algos/x18.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/x18.h diff --git a/stratum/algos/x18.h b/stratum/algos/x18.h new file mode 100644 index 000000000..1a97b3ccb --- /dev/null +++ b/stratum/algos/x18.h @@ -0,0 +1,16 @@ +#ifndef X18_H +#define X18_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x18_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From 57c8511551f09dfd5cda0ec75254437e00e02bfa Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:14:33 -0500 Subject: [PATCH 115/576] Create x18.conf --- stratum/config.sample/x18.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/x18.conf diff --git a/stratum/config.sample/x18.conf b/stratum/config.sample/x18.conf new file mode 100644 index 000000000..37ce6af02 --- /dev/null +++ b/stratum/config.sample/x18.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 3738 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = x18 +difficulty = 0.008 +max_ttf = 50000 From bd36e2215622f970220f4b35c67cf89600ac96e0 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:15:16 -0500 Subject: [PATCH 116/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index bc1d77d98..e5535bcec 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -122,6 +122,7 @@ YAAMP_ALGO g_algos[] = {"x14", x14_hash, 1, 0, 0}, {"x15", x15_hash, 1, 0, 0}, {"x17", x17_hash, 1, 0, 0}, + {"x18", x18_hash, 1, 0, 0}, {"x21s", x21s_hash, 0x100, 0, 0}, {"x22i", x22i_hash, 1, 0, 0}, From d50084efa767dba03da0ab55aa24a576cb7edd12 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:15:43 -0500 Subject: [PATCH 117/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 85f45af77..c331958d2 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -158,6 +158,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/x16r.h" #include "algos/x16s.h" #include "algos/x17.h" +#include "algos/x18.h" #include "algos/x21s.h" #include "algos/x22i.h" #include "algos/xevan.h" From cb47b114db9323f58b9b82124666836efcbe377b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:17:06 -0500 Subject: [PATCH 118/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index b4265a2e0..adf08711e 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -52,6 +52,7 @@ function yaamp_get_algos() 'x16r', 'x16s', 'x17', + 'x18', 'x21s', 'x22i', 'xevan', @@ -164,6 +165,7 @@ function getAlgoColors($algo) 'x16r' => '#f0b080', 'x16s' => '#f0b080', 'x17' => '#f0b0a0', + 'x18' => '#f0b0a0', 'x21s' => '#f0b0a0', 'x22i' => '#f0a090', 'xevan' => '#f0b0a0', @@ -249,6 +251,7 @@ function getAlgoPort($algo) 'x16r' => 3636, 'x16s' => 3663, 'x17' => 3737, + 'x18' => 3738, 'x21s' => 3224, 'x22i' => 3223, 'aergo' => 3691, From 3b7babdd9551eadeefeeab3be315a6f17dc783da Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:23:35 -0500 Subject: [PATCH 119/576] Create sph_gost.c --- stratum/sha3/sph_gost.c | 1101 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 1101 insertions(+) create mode 100644 stratum/sha3/sph_gost.c diff --git a/stratum/sha3/sph_gost.c b/stratum/sha3/sph_gost.c new file mode 100644 index 000000000..389ef0034 --- /dev/null +++ b/stratum/sha3/sph_gost.c @@ -0,0 +1,1101 @@ +/* $Id: gost.c 259 2011-07-19 22:11:27Z tp $ */ +/* + * GOST R 34.11-2012 implementation. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @author Thomas Pornin + */ + +//#include +//#include + +#include +#include +#include +#include + +#include "sph_gost.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +#ifdef _MSC_VER +#pragma warning (disable: 4146) +#endif + +//-------------------------------------------------------------------------------------------- +// +// stribog implementation +// +//-------------------------------------------------------------------------------------------- + + +// Tables for function F +const unsigned long long T[8][256] = { + { + 0xE6F87E5C5B711FD0,0x258377800924FA16,0xC849E07E852EA4A8,0x5B4686A18F06C16A, + 0x0B32E9A2D77B416E,0xABDA37A467815C66,0xF61796A81A686676,0xF5DC0B706391954B, + 0x4862F38DB7E64BF1,0xFF5C629A68BD85C5,0xCB827DA6FCD75795,0x66D36DAF69B9F089, + 0x356C9F74483D83B0,0x7CBCECB1238C99A1,0x36A702AC31C4708D,0x9EB6A8D02FBCDFD6, + 0x8B19FA51E5B3AE37,0x9CCFB5408A127D0B,0xBC0C78B508208F5A,0xE533E3842288ECED, + 0xCEC2C7D377C15FD2,0xEC7817B6505D0F5E,0xB94CC2C08336871D,0x8C205DB4CB0B04AD, + 0x763C855B28A0892F,0x588D1B79F6FF3257,0x3FECF69E4311933E,0x0FC0D39F803A18C9, + 0xEE010A26F5F3AD83,0x10EFE8F4411979A6,0x5DCDA10C7DE93A10,0x4A1BEE1D1248E92C, + 0x53BFF2DB21847339,0xB4F50CCFA6A23D09,0x5FB4BC9CD84798CD,0xE88A2D8B071C56F9, + 0x7F7771695A756A9C,0xC5F02E71A0BA1EBC,0xA663F9AB4215E672,0x2EB19E22DE5FBB78, + 0x0DB9CE0F2594BA14,0x82520E6397664D84,0x2F031E6A0208EA98,0x5C7F2144A1BE6BF0, + 0x7A37CB1CD16362DB,0x83E08E2B4B311C64,0xCF70479BAB960E32,0x856BA986B9DEE71E, + 0xB5478C877AF56CE9,0xB8FE42885F61D6FD,0x1BDD0156966238C8,0x622157923EF8A92E, + 0xFC97FF42114476F8,0x9D7D350856452CEB,0x4C90C9B0E0A71256,0x2308502DFBCB016C, + 0x2D7A03FAA7A64845,0xF46E8B38BFC6C4AB,0xBDBEF8FDD477DEBA,0x3AAC4CEBC8079B79, + 0xF09CB105E8879D0C,0x27FA6A10AC8A58CB,0x8960E7C1401D0CEA,0x1A6F811E4A356928, + 0x90C4FB0773D196FF,0x43501A2F609D0A9F,0xF7A516E0C63F3796,0x1CE4A6B3B8DA9252, + 0x1324752C38E08A9B,0xA5A864733BEC154F,0x2BF124575549B33F,0xD766DB15440DC5C7, + 0xA7D179E39E42B792,0xDADF151A61997FD3,0x86A0345EC0271423,0x38D5517B6DA939A4, + 0x6518F077104003B4,0x02791D90A5AEA2DD,0x88D267899C4A5D0A,0x930F66DF0A2865C2, + 0x4EE9D4204509B08B,0x325538916685292A,0x412907BFC533A842,0xB27E2B62544DC673, + 0x6C5304456295E007,0x5AF406E95351908A,0x1F2F3B6BC123616F,0xC37B09DC5255E5C6, + 0x3967D133B1FE6844,0x298839C7F0E711E2,0x409B87F71964F9A2,0xE938ADC3DB4B0719, + 0x0C0B4E47F9C3EBF4,0x5534D576D36B8843,0x4610A05AEB8B02D8,0x20C3CDF58232F251, + 0x6DE1840DBEC2B1E7,0xA0E8DE06B0FA1D08,0x7B854B540D34333B,0x42E29A67BCCA5B7F, + 0xD8A6088AC437DD0E,0xC63BB3A9D943ED81,0x21714DBD5E65A3B1,0x6761EDE7B5EEA169, + 0x2431F7C8D573ABF6,0xD51FC685E1A3671A,0x5E063CD40410C92D,0x283AB98F2CB04002, + 0x8FEBC06CB2F2F790,0x17D64F116FA1D33C,0xE07359F1A99EE4AA,0x784ED68C74CDC006, + 0x6E2A19D5C73B42DA,0x8712B4161C7045C3,0x371582E4ED93216D,0xACE390414939F6FC, + 0x7EC5F12186223B7C,0xC0B094042BAC16FB,0xF9D745379A527EBF,0x737C3F2EA3B68168, + 0x33E7B8D9BAD278CA,0xA9A32A34C22FFEBB,0xE48163CCFEDFBD0D,0x8E5940246EA5A670, + 0x51C6EF4B842AD1E4,0x22BAD065279C508C,0xD91488C218608CEE,0x319EA5491F7CDA17, + 0xD394E128134C9C60,0x094BF43272D5E3B3,0x9BF612A5A4AAD791,0xCCBBDA43D26FFD0F, + 0x34DE1F3C946AD250,0x4F5B5468995EE16B,0xDF9FAF6FEA8F7794,0x2648EA5870DD092B, + 0xBFC7E56D71D97C67,0xDDE6B2FF4F21D549,0x3C276B463AE86003,0x91767B4FAF86C71F, + 0x68A13E7835D4B9A0,0xB68C115F030C9FD4,0x141DD2C916582001,0x983D8F7DDD5324AC, + 0x64AA703FCC175254,0xC2C989948E02B426,0x3E5E76D69F46C2DE,0x50746F03587D8004, + 0x45DB3D829272F1E5,0x60584A029B560BF3,0xFBAE58A73FFCDC62,0xA15A5E4E6CAD4CE8, + 0x4BA96E55CE1FB8CC,0x08F9747AAE82B253,0xC102144CF7FB471B,0x9F042898F3EB8E36, + 0x068B27ADF2EFFB7A,0xEDCA97FE8C0A5EBE,0x778E0513F4F7D8CF,0x302C2501C32B8BF7, + 0x8D92DDFC175C554D,0xF865C57F46052F5F,0xEAF3301BA2B2F424,0xAA68B7ECBBD60D86, + 0x998F0F350104754C,0x0000000000000000,0xF12E314D34D0CCEC,0x710522BE061823B5, + 0xAF280D9930C005C1,0x97FD5CE25D693C65,0x19A41CC633CC9A15,0x95844172F8C79EB8, + 0xDC5432B7937684A9,0x9436C13A2490CF58,0x802B13F332C8EF59,0xC442AE397CED4F5C, + 0xFA1CD8EFE3AB8D82,0xF2E5AC954D293FD1,0x6AD823E8907A1B7D,0x4D2249F83CF043B6, + 0x03CB9DD879F9F33D,0xDE2D2F2736D82674,0x2A43A41F891EE2DF,0x6F98999D1B6C133A, + 0xD4AD46CD3DF436FA,0xBB35DF50269825C0,0x964FDCAA813E6D85,0xEB41B0537EE5A5C4, + 0x0540BA758B160847,0xA41AE43BE7BB44AF,0xE3B8C429D0671797,0x819993BBEE9FBEB9, + 0xAE9A8DD1EC975421,0xF3572CDD917E6E31,0x6393D7DAE2AFF8CE,0x47A2201237DC5338, + 0xA32343DEC903EE35,0x79FC56C4A89A91E6,0x01B28048DC5751E0,0x1296F564E4B7DB7B, + 0x75F7188351597A12,0xDB6D9552BDCE2E33,0x1E9DBB231D74308F,0x520D7293FDD322D9, + 0xE20A44610C304677,0xFEEEE2D2B4EAD425,0xCA30FDEE20800675,0x61EACA4A47015A13, + 0xE74AFE1487264E30,0x2CC883B27BF119A5,0x1664CF59B3F682DC,0xA811AA7C1E78AF5B, + 0x1D5626FB648DC3B2,0xB73E9117DF5BCE34,0xD05F7CF06AB56F5D,0xFD257F0ACD132718, + 0x574DC8E676C52A9E,0x0739A7E52EB8AA9A,0x5486553E0F3CD9A3,0x56FF48AEAA927B7E, + 0xBE756525AD8E2D87,0x7D0E6CF9FFDBC841,0x3B1ECCA31450CA99,0x6913BE30E983E840, + 0xAD511009956EA71C,0xB1B5B6BA2DB4354E,0x4469BDCA4E25A005,0x15AF5281CA0F71E1, + 0x744598CB8D0E2BF2,0x593F9B312AA863B7,0xEFB38A6E29A4FC63,0x6B6AA3A04C2D4A9D, + 0x3D95EB0EE6BF31E3,0xA291C3961554BFD5,0x18169C8EEF9BCBF5,0x115D68BC9D4E2846, + 0xBA875F18FACF7420,0xD1EDFCB8B6E23EBD,0xB00736F2F1E364AE,0x84D929CE6589B6FE, + 0x70B7A2F6DA4F7255,0x0E7253D75C6D4929,0x04F23A3D574159A7,0x0A8069EA0B2C108E, + 0x49D073C56BB11A11,0x8AAB7A1939E4FFD7,0xCD095A0B0E38ACEF,0xC9FB60365979F548, + 0x92BDE697D67F3422,0xC78933E10514BC61,0xE1C1D9B975C9B54A,0xD2266160CF1BCD80, + 0x9A4492ED78FD8671,0xB3CCAB2A881A9793,0x72CEBF667FE1D088,0xD6D45B5D985A9427 + }, + { + 0xC811A8058C3F55DE,0x65F5B43196B50619,0xF74F96B1D6706E43,0x859D1E8BCB43D336, + 0x5AAB8A85CCFA3D84,0xF9C7BF99C295FCFD,0xA21FD5A1DE4B630F,0xCDB3EF763B8B456D, + 0x803F59F87CF7C385,0xB27C73BE5F31913C,0x98E3AC6633B04821,0xBF61674C26B8F818, + 0x0FFBC995C4C130C8,0xAAA0862010761A98,0x6057F342210116AA,0xF63C760C0654CC35, + 0x2DDB45CC667D9042,0xBCF45A964BD40382,0x68E8A0C3EF3C6F3D,0xA7BD92D269FF73BC, + 0x290AE20201ED2287,0xB7DE34CDE885818F,0xD901EEA7DD61059B,0xD6FA273219A03553, + 0xD56F1AE874CCCEC9,0xEA31245C2E83F554,0x7034555DA07BE499,0xCE26D2AC56E7BEF7, + 0xFD161857A5054E38,0x6A0E7DA4527436D1,0x5BD86A381CDE9FF2,0xCAF7756231770C32, + 0xB09AAED9E279C8D0,0x5DEF1091C60674DB,0x111046A2515E5045,0x23536CE4729802FC, + 0xC50CBCF7F5B63CFA,0x73A16887CD171F03,0x7D2941AFD9F28DBD,0x3F5E3EB45A4F3B9D, + 0x84EEFE361B677140,0x3DB8E3D3E7076271,0x1A3A28F9F20FD248,0x7EBC7C75B49E7627, + 0x74E5F293C7EB565C,0x18DCF59E4F478BA4,0x0C6EF44FA9ADCB52,0xC699812D98DAC760, + 0x788B06DC6E469D0E,0xFC65F8EA7521EC4E,0x30A5F7219E8E0B55,0x2BEC3F65BCA57B6B, + 0xDDD04969BAF1B75E,0x99904CDBE394EA57,0x14B201D1E6EA40F6,0xBBB0C08241284ADD, + 0x50F20463BF8F1DFF,0xE8D7F93B93CBACB8,0x4D8CB68E477C86E8,0xC1DD1B3992268E3F, + 0x7C5AA11209D62FCB,0x2F3D98ABDB35C9AE,0x671369562BFD5FF5,0x15C1E16C36CEE280, + 0x1D7EB2EDF8F39B17,0xDA94D37DB00DFE01,0x877BC3EC760B8ADA,0xCB8495DFE153AE44, + 0x05A24773B7B410B3,0x12857B783C32ABDF,0x8EB770D06812513B,0x536739B9D2E3E665, + 0x584D57E271B26468,0xD789C78FC9849725,0xA935BBFA7D1AE102,0x8B1537A3DFA64188, + 0xD0CD5D9BC378DE7A,0x4AC82C9A4D80CFB7,0x42777F1B83BDB620,0x72D2883A1D33BD75, + 0x5E7A2D4BAB6A8F41,0xF4DAAB6BBB1C95D9,0x905CFFE7FD8D31B6,0x83AA6422119B381F, + 0xC0AEFB8442022C49,0xA0F908C663033AE3,0xA428AF0804938826,0xADE41C341A8A53C7, + 0xAE7121EE77E6A85D,0xC47F5C4A25929E8C,0xB538E9AA55CDD863,0x06377AA9DAD8EB29, + 0xA18AE87BB3279895,0x6EDFDA6A35E48414,0x6B7D9D19825094A7,0xD41CFA55A4E86CBF, + 0xE5CAEDC9EA42C59C,0xA36C351C0E6FC179,0x5181E4DE6FABBF89,0xFFF0C530184D17D4, + 0x9D41EB1584045892,0x1C0D525028D73961,0xF178EC180CA8856A,0x9A0571018EF811CD, + 0x4091A27C3EF5EFCC,0x19AF15239F6329D2,0x347450EFF91EB990,0xE11B4A078DD27759, + 0xB9561DE5FC601331,0x912F1F5A2DA993C0,0x1654DCB65BA2191A,0x3E2DDE098A6B99EB, + 0x8A66D71E0F82E3FE,0x8C51ADB7D55A08D7,0x4533E50F8941FF7F,0x02E6DD67BD4859EC, + 0xE068AABA5DF6D52F,0xC24826E3FF4A75A5,0x6C39070D88ACDDF8,0x6486548C4691A46F, + 0xD1BEBD26135C7C0C,0xB30F93038F15334A,0x82D9849FC1BF9A69,0x9C320BA85420FAE4, + 0xFA528243AFF90767,0x9ED4D6CFE968A308,0xB825FD582C44B147,0x9B7691BC5EDCB3BB, + 0xC7EA619048FE6516,0x1063A61F817AF233,0x47D538683409A693,0x63C2CE984C6DED30, + 0x2A9FDFD86C81D91D,0x7B1E3B06032A6694,0x666089EBFBD9FD83,0x0A598EE67375207B, + 0x07449A140AFC495F,0x2CA8A571B6593234,0x1F986F8A45BBC2FB,0x381AA4A050B372C2, + 0x5423A3ADD81FAF3A,0x17273C0B8B86BB6C,0xFE83258DC869B5A2,0x287902BFD1C980F1, + 0xF5A94BD66B3837AF,0x88800A79B2CABA12,0x55504310083B0D4C,0xDF36940E07B9EEB2, + 0x04D1A7CE6790B2C5,0x612413FFF125B4DC,0x26F12B97C52C124F,0x86082351A62F28AC, + 0xEF93632F9937E5E7,0x3507B052293A1BE6,0xE72C30AE570A9C70,0xD3586041AE1425E0, + 0xDE4574B3D79D4CC4,0x92BA228040C5685A,0xF00B0CA5DC8C271C,0xBE1287F1F69C5A6E, + 0xF39E317FB1E0DC86,0x495D114020EC342D,0x699B407E3F18CD4B,0xDCA3A9D46AD51528, + 0x0D1D14F279896924,0x0000000000000000,0x593EB75FA196C61E,0x2E4E78160B116BD8, + 0x6D4AE7B058887F8E,0xE65FD013872E3E06,0x7A6DDBBBD30EC4E2,0xAC97FC89CAAEF1B1, + 0x09CCB33C1E19DBE1,0x89F3EAC462EE1864,0x7770CF49AA87ADC6,0x56C57ECA6557F6D6, + 0x03953DDA6D6CFB9A,0x36928D884456E07C,0x1EEB8F37959F608D,0x31D6179C4EAAA923, + 0x6FAC3AD7E5C02662,0x43049FA653991456,0xABD3669DC052B8EE,0xAF02C153A7C20A2B, + 0x3CCB036E3723C007,0x93C9C23D90E1CA2C,0xC33BC65E2F6ED7D3,0x4CFF56339758249E, + 0xB1E94E64325D6AA6,0x37E16D359472420A,0x79F8E661BE623F78,0x5214D90402C74413, + 0x482EF1FDF0C8965B,0x13F69BC5EC1609A9,0x0E88292814E592BE,0x4E198B542A107D72, + 0xCCC00FCBEBAFE71B,0x1B49C844222B703E,0x2564164DA840E9D5,0x20C6513E1FF4F966, + 0xBAC3203F910CE8AB,0xF2EDD1C261C47EF0,0x814CB945ACD361F3,0x95FEB8944A392105, + 0x5C9CF02C1622D6AD,0x971865F3F77178E9,0xBD87BA2B9BF0A1F4,0x444005B259655D09, + 0xED75BE48247FBC0B,0x7596122E17CFF42A,0xB44B091785E97A15,0x966B854E2755DA9F, + 0xEEE0839249134791,0x32432A4623C652B9,0xA8465B47AD3E4374,0xF8B45F2412B15E8B, + 0x2417F6F078644BA3,0xFB2162FE7FDDA511,0x4BBBCC279DA46DC1,0x0173E0BDD024A276, + 0x22208C59A2BCA08A,0x8FC4906DB836F34D,0xE4B90D743A6667EA,0x7147B5E0705F46EF, + 0x2782CB2A1508B039,0xEC065EF5F45B1E7D,0x21B5B183CFD05B10,0xDBE733C060295C77, + 0x9FA73672394C017E,0xCF55321186C31C81,0xD8720E1A0D45A7ED,0x3B8F997A3DDF8958, + 0x3AFC79C7EDFB2B2E,0xE9A4198643EF0ECE,0x5F09CDF67B4E2D37,0x4F6A6BE9FA34DF04, + 0xB6ADD47038A123F9,0x8D224D0A057EAAA1,0xC96248B85C1BF7A8,0xE3FD9760309A2EB5, + 0x0B2A6E5BA351820D,0xEB42C4E1FEA75722,0x948D58299A1D8373,0x7FCF9CC864BAD451, + 0xA55B4FB5D4B72A50,0x08BF5381CE3D7997,0x46A6D8D5E42D04E5,0xD22B80FC7E308796, + 0x57B69E77B57354A0,0x3969441D8097D0B4,0x3330CAFBF3E2F0CF,0xE28E77DDE0BE8CC3, + 0x62B12E259C494F46,0xA6CE726FB9DBD1CA,0x41E242C1EED14DBA,0x76032FF47AA30FB0 + }, + { + 0x45B268A93ACDE4CC,0xAF7F0BE884549D08,0x048354B3C1468263,0x925435C2C80EFED2, + 0xEE4E37F27FDFFBA7,0x167A33920C60F14D,0xFB123B52EA03E584,0x4A0CAB53FDBB9007, + 0x9DEAF6380F788A19,0xCB48EC558F0CB32A,0xB59DC4B2D6FEF7E0,0xDCDBCA22F4F3ECB6, + 0x11DF5813549A9C40,0xE33FDEDF568ACED3,0xA0C1C8124322E9C3,0x07A56B8158FA6D0D, + 0x77279579B1E1F3DD,0xD9B18B74422AC004,0xB8EC2D9FFFABC294,0xF4ACF8A82D75914F, + 0x7BBF69B1EF2B6878,0xC4F62FAF487AC7E1,0x76CE809CC67E5D0C,0x6711D88F92E4C14C, + 0x627B99D9243DEDFE,0x234AA5C3DFB68B51,0x909B1F15262DBF6D,0x4F66EA054B62BCB5, + 0x1AE2CF5A52AA6AE8,0xBEA053FBD0CE0148,0xED6808C0E66314C9,0x43FE16CD15A82710, + 0xCD049231A06970F6,0xE7BC8A6C97CC4CB0,0x337CE835FCB3B9C0,0x65DEF2587CC780F3, + 0x52214EDE4132BB50,0x95F15E4390F493DF,0x870839625DD2E0F1,0x41313C1AFB8B66AF, + 0x91720AF051B211BC,0x477D427ED4EEA573,0x2E3B4CEEF6E3BE25,0x82627834EB0BCC43, + 0x9C03E3DD78E724C8,0x2877328AD9867DF9,0x14B51945E243B0F2,0x574B0F88F7EB97E2, + 0x88B6FA989AA4943A,0x19C4F068CB168586,0x50EE6409AF11FAEF,0x7DF317D5C04EABA4, + 0x7A567C5498B4C6A9,0xB6BBFB804F42188E,0x3CC22BCF3BC5CD0B,0xD04336EAAA397713, + 0xF02FAC1BEC33132C,0x2506DBA7F0D3488D,0xD7E65D6BF2C31A1E,0x5EB9B2161FF820F5, + 0x842E0650C46E0F9F,0x716BEB1D9E843001,0xA933758CAB315ED4,0x3FE414FDA2792265, + 0x27C9F1701EF00932,0x73A4C1CA70A771BE,0x94184BA6E76B3D0E,0x40D829FF8C14C87E, + 0x0FBEC3FAC77674CB,0x3616A9634A6A9572,0x8F139119C25EF937,0xF545ED4D5AEA3F9E, + 0xE802499650BA387B,0x6437E7BD0B582E22,0xE6559F89E053E261,0x80AD52E305288DFC, + 0x6DC55A23E34B9935,0xDE14E0F51AD0AD09,0xC6390578A659865E,0x96D7617109487CB1, + 0xE2D6CB3A21156002,0x01E915E5779FAED1,0xADB0213F6A77DCB7,0x9880B76EB9A1A6AB, + 0x5D9F8D248644CF9B,0xFD5E4536C5662658,0xF1C6B9FE9BACBDFD,0xEACD6341BE9979C4, + 0xEFA7221708405576,0x510771ECD88E543E,0xC2BA51CB671F043D,0x0AD482AC71AF5879, + 0xFE787A045CDAC936,0xB238AF338E049AED,0xBD866CC94972EE26,0x615DA6EBBD810290, + 0x3295FDD08B2C1711,0xF834046073BF0AEA,0xF3099329758FFC42,0x1CAEB13E7DCFA934, + 0xBA2307481188832B,0x24EFCE42874CE65C,0x0E57D61FB0E9DA1A,0xB3D1BAD6F99B343C, + 0xC0757B1C893C4582,0x2B510DB8403A9297,0x5C7698C1F1DB614A,0x3E0D0118D5E68CB4, + 0xD60F488E855CB4CF,0xAE961E0DF3CB33D9,0x3A8E55AB14A00ED7,0x42170328623789C1, + 0x838B6DD19C946292,0x895FEF7DED3B3AEB,0xCFCBB8E64E4A3149,0x064C7E642F65C3DC, + 0x3D2B3E2A4C5A63DA,0x5BD3F340A9210C47,0xB474D157A1615931,0xAC5934DA1DE87266, + 0x6EE365117AF7765B,0xC86ED36716B05C44,0x9BA6885C201D49C5,0xB905387A88346C45, + 0x131072C4BAB9DDFF,0xBF49461EA751AF99,0xD52977BC1CE05BA1,0xB0F785E46027DB52, + 0x546D30BA6E57788C,0x305AD707650F56AE,0xC987C682612FF295,0xA5AB8944F5FBC571, + 0x7ED528E759F244CA,0x8DDCBBCE2C7DB888,0xAA154ABE328DB1BA,0x1E619BE993ECE88B, + 0x09F2BD9EE813B717,0x7401AA4B285D1CB3,0x21858F143195CAEE,0x48C381841398D1B8, + 0xFCB750D3B2F98889,0x39A86A998D1CE1B9,0x1F888E0CE473465A,0x7899568376978716, + 0x02CF2AD7EE2341BF,0x85C713B5B3F1A14E,0xFF916FE12B4567E7,0x7C1A0230B7D10575, + 0x0C98FCC85ECA9BA5,0xA3E7F720DA9E06AD,0x6A6031A2BBB1F438,0x973E74947ED7D260, + 0x2CF4663918C0FF9A,0x5F50A7F368678E24,0x34D983B4A449D4CD,0x68AF1B755592B587, + 0x7F3C3D022E6DEA1B,0xABFC5F5B45121F6B,0x0D71E92D29553574,0xDFFDF5106D4F03D8, + 0x081BA87B9F8C19C6,0xDB7EA1A3AC0981BB,0xBBCA12AD66172DFA,0x79704366010829C7, + 0x179326777BFF5F9C,0x0000000000000000,0xEB2476A4C906D715,0x724DD42F0738DF6F, + 0xB752EE6538DDB65F,0x37FFBC863DF53BA3,0x8EFA84FCB5C157E6,0xE9EB5C73272596AA, + 0x1B0BDABF2535C439,0x86E12C872A4D4E20,0x9969A28BCE3E087A,0xFAFB2EB79D9C4B55, + 0x056A4156B6D92CB2,0x5A3AE6A5DEBEA296,0x22A3B026A8292580,0x53C85B3B36AD1581, + 0xB11E900117B87583,0xC51F3A4A3FE56930,0xE019E1EDCF3621BD,0xEC811D2591FCBA18, + 0x445B7D4C4D524A1D,0xA8DA6069DCAEF005,0x58F5CC72309DE329,0xD4C062596B7FF570, + 0xCE22AD0339D59F98,0x591CD99747024DF8,0x8B90C5AA03187B54,0xF663D27FC356D0F0, + 0xD8589E9135B56ED5,0x35309651D3D67A1C,0x12F96721CD26732E,0xD28C1C3D441A36AC, + 0x492A946164077F69,0x2D1D73DC6F5F514B,0x6F0A70F40D68D88A,0x60B4B30ECA1EAC41, + 0xD36509D83385987D,0x0B3D97490630F6A8,0x9ECCC90A96C46577,0xA20EE2C5AD01A87C, + 0xE49AB55E0E70A3DE,0xA4429CA182646BA0,0xDA97B446DB962F6A,0xCCED87D4D7F6DE27, + 0x2AB8185D37A53C46,0x9F25DCEFE15BCBA6,0xC19C6EF9FEA3EB53,0xA764A3931BD884CE, + 0x2FD2590B817C10F4,0x56A21A6D80743933,0xE573A0BB79EF0D0F,0x155C0CA095DC1E23, + 0x6C2C4FC694D437E4,0x10364DF623053291,0xDD32DFC7836C4267,0x03263F3299BCEF6E, + 0x66F8CD6AE57B6F9D,0x8C35AE2B5BE21659,0x31B3C2E21290F87F,0x93BD2027BF915003, + 0x69460E90220D1B56,0x299E276FAE19D328,0x63928C3C53A2432F,0x7082FEF8E91B9ED0, + 0xBC6F792C3EED40F7,0x4C40D537D2DE53DB,0x75E8BFAE5FC2B262,0x4DA9C0D2A541FD0A, + 0x4E8FFFE03CFD1264,0x2620E495696FA7E3,0xE1F0F408B8A98F6C,0xD1AA230FDDA6D9C2, + 0xC7D0109DD1C6288F,0x8A79D04F7487D585,0x4694579BA3710BA2,0x38417F7CFA834F68, + 0x1D47A4DB0A5007E5,0x206C9AF1460A643F,0xA128DDF734BD4712,0x8144470672B7232D, + 0xF2E086CC02105293,0x182DE58DBC892B57,0xCAA1F9B0F8931DFB,0x6B892447CC2E5AE9, + 0xF9DD11850420A43B,0x4BE5BEB68A243ED6,0x5584255F19C8D65D,0x3B67404E633FA006, + 0xA68DB6766C472A1F,0xF78AC79AB4C97E21,0xC353442E1080AAEC,0x9A4F9DB95782E714 + }, + { + 0x05BA7BC82C9B3220,0x31A54665F8B65E4F,0xB1B651F77547F4D4,0x8BFA0D857BA46682, + 0x85A96C5AA16A98BB,0x990FAEF908EB79C9,0xA15E37A247F4A62D,0x76857DCD5D27741E, + 0xF8C50B800A1820BC,0xBE65DCB201F7A2B4,0x666D1B986F9426E7,0x4CC921BF53C4E648, + 0x95410A0F93D9CA42,0x20CDCCAA647BA4EF,0x429A4060890A1871,0x0C4EA4F69B32B38B, + 0xCCDA362DDE354CD3,0x96DC23BC7C5B2FA9,0xC309BB68AA851AB3,0xD26131A73648E013, + 0x021DC52941FC4DB2,0xCD5ADAB7704BE48A,0xA77965D984ED71E6,0x32386FD61734BBA4, + 0xE82D6DD538AB7245,0x5C2147EA6177B4B1,0x5DA1AB70CF091CE8,0xAC907FCE72B8BDFF, + 0x57C85DFD972278A8,0xA4E44C6A6B6F940D,0x3851995B4F1FDFE4,0x62578CCAED71BC9E, + 0xD9882BB0C01D2C0A,0x917B9D5D113C503B,0xA2C31E11A87643C6,0xE463C923A399C1CE, + 0xF71686C57EA876DC,0x87B4A973E096D509,0xAF0D567D9D3A5814,0xB40C2A3F59DCC6F4, + 0x3602F88495D121DD,0xD3E1DD3D9836484A,0xF945E71AA46688E5,0x7518547EB2A591F5, + 0x9366587450C01D89,0x9EA81018658C065B,0x4F54080CBC4603A3,0x2D0384C65137BF3D, + 0xDC325078EC861E2A,0xEA30A8FC79573FF7,0x214D2030CA050CB6,0x65F0322B8016C30C, + 0x69BE96DD1B247087,0xDB95EE9981E161B8,0xD1FC1814D9CA05F8,0x820ED2BBCC0DE729, + 0x63D76050430F14C7,0x3BCCB0E8A09D3A0F,0x8E40764D573F54A2,0x39D175C1E16177BD, + 0x12F5A37C734F1F4B,0xAB37C12F1FDFC26D,0x5648B167395CD0F1,0x6C04ED1537BF42A7, + 0xED97161D14304065,0x7D6C67DAAB72B807,0xEC17FA87BA4EE83C,0xDFAF79CB0304FBC1, + 0x733F060571BC463E,0x78D61C1287E98A27,0xD07CF48E77B4ADA1,0xB9C262536C90DD26, + 0xE2449B5860801605,0x8FC09AD7F941FCFB,0xFAD8CEA94BE46D0E,0xA343F28B0608EB9F, + 0x9B126BD04917347B,0x9A92874AE7699C22,0x1B017C42C4E69EE0,0x3A4C5C720EE39256, + 0x4B6E9F5E3EA399DA,0x6BA353F45AD83D35,0xE7FEE0904C1B2425,0x22D009832587E95D, + 0x842980C00F1430E2,0xC6B3C0A0861E2893,0x087433A419D729F2,0x341F3DADD42D6C6F, + 0xEE0A3FAEFBB2A58E,0x4AEE73C490DD3183,0xAAB72DB5B1A16A34,0xA92A04065E238FDF, + 0x7B4B35A1686B6FCC,0x6A23BF6EF4A6956C,0x191CB96B851AD352,0x55D598D4D6DE351A, + 0xC9604DE5F2AE7EF3,0x1CA6C2A3A981E172,0xDE2F9551AD7A5398,0x3025AAFF56C8F616, + 0x15521D9D1E2860D9,0x506FE31CFA45073A,0x189C55F12B647B0B,0x0180EC9AAE7EA859, + 0x7CEC8B40050C105E,0x2350E5198BF94104,0xEF8AD33455CC0DD7,0x07A7BEE16D677F92, + 0xE5E325B90DE76997,0x5A061591A26E637A,0xB611EF1618208B46,0x09F4DF3EB7A981AB, + 0x1EBB078AE87DACC0,0xB791038CB65E231F,0x0FD38D4574B05660,0x67EDF702C1EA8EBE, + 0xBA5F4BE0831238CD,0xE3C477C2CEFEBE5C,0x0DCE486C354C1BD2,0x8C5DB36416C31910, + 0x26EA9ED1A7627324,0x039D29B3EF82E5EB,0x9F28FC82CBF2AE02,0xA8AAE89CF05D2786, + 0x431AACFA2774B028,0xCF471F9E31B7A938,0x581BD0B8E3922EC8,0xBC78199B400BEF06, + 0x90FB71C7BF42F862,0x1F3BEB1046030499,0x683E7A47B55AD8DE,0x988F4263A695D190, + 0xD808C72A6E638453,0x0627527BC319D7CB,0xEBB04466D72997AE,0xE67E0C0AE2658C7C, + 0x14D2F107B056C880,0x7122C32C30400B8C,0x8A7AE11FD5DACEDB,0xA0DEDB38E98A0E74, + 0xAD109354DCC615A6,0x0BE91A17F655CC19,0x8DDD5FFEB8BDB149,0xBFE53028AF890AED, + 0xD65BA6F5B4AD7A6A,0x7956F0882997227E,0x10E8665532B352F9,0x0E5361DFDACEFE39, + 0xCEC7F3049FC90161,0xFF62B561677F5F2E,0x975CCF26D22587F0,0x51EF0F86543BAF63, + 0x2F1E41EF10CBF28F,0x52722635BBB94A88,0xAE8DBAE73344F04D,0x410769D36688FD9A, + 0xB3AB94DE34BBB966,0x801317928DF1AA9B,0xA564A0F0C5113C54,0xF131D4BEBDB1A117, + 0x7F71A2F3EA8EF5B5,0x40878549C8F655C3,0x7EF14E6944F05DEC,0xD44663DCF55137D8, + 0xF2ACFD0D523344FC,0x0000000000000000,0x5FBC6E598EF5515A,0x16CF342EF1AA8532, + 0xB036BD6DDB395C8D,0x13754FE6DD31B712,0xBBDFA77A2D6C9094,0x89E7C8AC3A582B30, + 0x3C6B0E09CDFA459D,0xC4AE0589C7E26521,0x49735A777F5FD468,0xCAFD64561D2C9B18, + 0xDA1502032F9FC9E1,0x8867243694268369,0x3782141E3BAF8984,0x9CB5D53124704BE9, + 0xD7DB4A6F1AD3D233,0xA6F989432A93D9BF,0x9D3539AB8A0EE3B0,0x53F2CAAF15C7E2D1, + 0x6E19283C76430F15,0x3DEBE2936384EDC4,0x5E3C82C3208BF903,0x33B8834CB94A13FD, + 0x6470DEB12E686B55,0x359FD1377A53C436,0x61CAA57902F35975,0x043A975282E59A79, + 0xFD7F70482683129C,0xC52EE913699CCD78,0x28B9FF0E7DAC8D1D,0x5455744E78A09D43, + 0xCB7D88CCB3523341,0x44BD121B4A13CFBA,0x4D49CD25FDBA4E11,0x3E76CB208C06082F, + 0x3FF627BA2278A076,0xC28957F204FBB2EA,0x453DFE81E46D67E3,0x94C1E6953DA7621B, + 0x2C83685CFF491764,0xF32C1197FC4DECA5,0x2B24D6BD922E68F6,0xB22B78449AC5113F, + 0x48F3B6EDD1217C31,0x2E9EAD75BEB55AD6,0x174FD8B45FD42D6B,0x4ED4E4961238ABFA, + 0x92E6B4EEFEBEB5D0,0x46A0D7320BEF8208,0x47203BA8A5912A51,0x24F75BF8E69E3E96, + 0xF0B1382413CF094E,0xFEE259FBC901F777,0x276A724B091CDB7D,0xBDF8F501EE75475F, + 0x599B3C224DEC8691,0x6D84018F99C1EAFE,0x7498B8E41CDB39AC,0xE0595E71217C5BB7, + 0x2AA43A273C50C0AF,0xF50B43EC3F543B6E,0x838E3E2162734F70,0xC09492DB4507FF58, + 0x72BFEA9FDFC2EE67,0x11688ACF9CCDFAA0,0x1A8190D86A9836B9,0x7ACBD93BC615C795, + 0xC7332C3A286080CA,0x863445E94EE87D50,0xF6966A5FD0D6DE85,0xE9AD814F96D5DA1C, + 0x70A22FB69E3EA3D5,0x0A69F68D582B6440,0xB8428EC9C2EE757F,0x604A49E3AC8DF12C, + 0x5B86F90B0C10CB23,0xE1D9B2EB8F02F3EE,0x29391394D3D22544,0xC8E0A17F5CD0D6AA, + 0xB58CC6A5F7A26EAD,0x8193FB08238F02C2,0xD5C68F465B2F9F81,0xFCFF9CD288FDBAC5, + 0x77059157F359DC47,0x1D262E3907FF492B,0xFB582233E59AC557,0xDDB2BCE242F8B673, + 0x2577B76248E096CF,0x6F99C4A6D83DA74C,0xC1147E41EB795701,0xF48BAF76912A9337 + }, + { + 0x3EF29D249B2C0A19,0xE9E16322B6F8622F,0x5536994047757F7A,0x9F4D56D5A47B0B33, + 0x822567466AA1174C,0xB8F5057DEB082FB2,0xCC48C10BF4475F53,0x373088D4275DEC3A, + 0x968F4325180AED10,0x173D232CF7016151,0xAE4ED09F946FCC13,0xFD4B4741C4539873, + 0x1B5B3F0DD9933765,0x2FFCB0967B644052,0xE02376D20A89840C,0xA3AE3A70329B18D7, + 0x419CBD2335DE8526,0xFAFEBF115B7C3199,0x0397074F85AA9B0D,0xC58AD4FB4836B970, + 0xBEC60BE3FC4104A8,0x1EFF36DC4B708772,0x131FDC33ED8453B6,0x0844E33E341764D3, + 0x0FF11B6EAB38CD39,0x64351F0A7761B85A,0x3B5694F509CFBA0E,0x30857084B87245D0, + 0x47AFB3BD2297AE3C,0xF2BA5C2F6F6B554A,0x74BDC4761F4F70E1,0xCFDFC64471EDC45E, + 0xE610784C1DC0AF16,0x7ACA29D63C113F28,0x2DED411776A859AF,0xAC5F211E99A3D5EE, + 0xD484F949A87EF33B,0x3CE36CA596E013E4,0xD120F0983A9D432C,0x6BC40464DC597563, + 0x69D5F5E5D1956C9E,0x9AE95F043698BB24,0xC9ECC8DA66A4EF44,0xD69508C8A5B2EAC6, + 0xC40C2235C0503B80,0x38C193BA8C652103,0x1CEEC75D46BC9E8F,0xD331011937515AD1, + 0xD8E2E56886ECA50F,0xB137108D5779C991,0x709F3B6905CA4206,0x4FEB50831680CAEF, + 0xEC456AF3241BD238,0x58D673AFE181ABBE,0x242F54E7CAD9BF8C,0x0211F1810DCC19FD, + 0x90BC4DBB0F43C60A,0x9518446A9DA0761D,0xA1BFCBF13F57012A,0x2BDE4F8961E172B5, + 0x27B853A84F732481,0xB0B1E643DF1F4B61,0x18CC38425C39AC68,0xD2B7F7D7BF37D821, + 0x3103864A3014C720,0x14AA246372ABFA5C,0x6E600DB54EBAC574,0x394765740403A3F3, + 0x09C215F0BC71E623,0x2A58B947E987F045,0x7B4CDF18B477BDD8,0x9709B5EB906C6FE0, + 0x73083C268060D90B,0xFEDC400E41F9037E,0x284948C6E44BE9B8,0x728ECAE808065BFB, + 0x06330E9E17492B1A,0x5950856169E7294E,0xBAE4F4FCE6C4364F,0xCA7BCF95E30E7449, + 0x7D7FD186A33E96C2,0x52836110D85AD690,0x4DFAA1021B4CD312,0x913ABB75872544FA, + 0xDD46ECB9140F1518,0x3D659A6B1E869114,0xC23F2CABD719109A,0xD713FE062DD46836, + 0xD0A60656B2FBC1DC,0x221C5A79DD909496,0xEFD26DBCA1B14935,0x0E77EDA0235E4FC9, + 0xCBFD395B6B68F6B9,0x0DE0EAEFA6F4D4C4,0x0422FF1F1A8532E7,0xF969B85EDED6AA94, + 0x7F6E2007AEF28F3F,0x3AD0623B81A938FE,0x6624EE8B7AADA1A7,0xB682E8DDC856607B, + 0xA78CC56F281E2A30,0xC79B257A45FAA08D,0x5B4174E0642B30B3,0x5F638BFF7EAE0254, + 0x4BC9AF9C0C05F808,0xCE59308AF98B46AE,0x8FC58DA9CC55C388,0x803496C7676D0EB1, + 0xF33CAAE1E70DD7BA,0xBB6202326EA2B4BF,0xD5020F87201871CB,0x9D5CA754A9B712CE, + 0x841669D87DE83C56,0x8A6184785EB6739F,0x420BBA6CB0741E2B,0xF12D5B60EAC1CE47, + 0x76AC35F71283691C,0x2C6BB7D9FECEDB5F,0xFCCDB18F4C351A83,0x1F79C012C3160582, + 0xF0ABADAE62A74CB7,0xE1A5801C82EF06FC,0x67A21845F2CB2357,0x5114665F5DF04D9D, + 0xBF40FD2D74278658,0xA0393D3FB73183DA,0x05A409D192E3B017,0xA9FB28CF0B4065F9, + 0x25A9A22942BF3D7C,0xDB75E22703463E02,0xB326E10C5AB5D06C,0xE7968E8295A62DE6, + 0xB973F3B3636EAD42,0xDF571D3819C30CE5,0xEE549B7229D7CBC5,0x12992AFD65E2D146, + 0xF8EF4E9056B02864,0xB7041E134030E28B,0xC02EDD2ADAD50967,0x932B4AF48AE95D07, + 0x6FE6FB7BC6DC4784,0x239AACB755F61666,0x401A4BEDBDB807D6,0x485EA8D389AF6305, + 0xA41BC220ADB4B13D,0x753B32B89729F211,0x997E584BB3322029,0x1D683193CEDA1C7F, + 0xFF5AB6C0C99F818E,0x16BBD5E27F67E3A1,0xA59D34EE25D233CD,0x98F8AE853B54A2D9, + 0x6DF70AFACB105E79,0x795D2E99B9BBA425,0x8E437B6744334178,0x0186F6CE886682F0, + 0xEBF092A3BB347BD2,0xBCD7FA62F18D1D55,0xADD9D7D011C5571E,0x0BD3E471B1BDFFDE, + 0xAA6C2F808EEAFEF4,0x5EE57D31F6C880A4,0xF50FA47FF044FCA0,0x1ADDC9C351F5B595, + 0xEA76646D3352F922,0x0000000000000000,0x85909F16F58EBEA6,0x46294573AAF12CCC, + 0x0A5512BF39DB7D2E,0x78DBD85731DD26D5,0x29CFBE086C2D6B48,0x218B5D36583A0F9B, + 0x152CD2ADFACD78AC,0x83A39188E2C795BC,0xC3B9DA655F7F926A,0x9ECBA01B2C1D89C3, + 0x07B5F8509F2FA9EA,0x7EE8D6C926940DCF,0x36B67E1AAF3B6ECA,0x86079859702425AB, + 0xFB7849DFD31AB369,0x4C7C57CC932A51E2,0xD96413A60E8A27FF,0x263EA566C715A671, + 0x6C71FC344376DC89,0x4A4F595284637AF8,0xDAF314E98B20BCF2,0x572768C14AB96687, + 0x1088DB7C682EC8BB,0x887075F9537A6A62,0x2E7A4658F302C2A2,0x619116DBE582084D, + 0xA87DDE018326E709,0xDCC01A779C6997E8,0xEDC39C3DAC7D50C8,0xA60A33A1A078A8C0, + 0xC1A82BE452B38B97,0x3F746BEA134A88E9,0xA228CCBEBAFD9A27,0xABEAD94E068C7C04, + 0xF48952B178227E50,0x5CF48CB0FB049959,0x6017E0156DE48ABD,0x4438B4F2A73D3531, + 0x8C528AE649FF5885,0xB515EF924DFCFB76,0x0C661C212E925634,0xB493195CC59A7986, + 0x9CDA519A21D1903E,0x32948105B5BE5C2D,0x194ACE8CD45F2E98,0x438D4CA238129CDB, + 0x9B6FA9CABEFE39D4,0x81B26009EF0B8C41,0xDED1EBF691A58E15,0x4E6DA64D9EE6481F, + 0x54B06F8ECF13FD8A,0x49D85E1D01C9E1F5,0xAFC826511C094EE3,0xF698A33075EE67AD, + 0x5AC7822EEC4DB243,0x8DD47C28C199DA75,0x89F68337DB1CE892,0xCDCE37C57C21DDA3, + 0x530597DE503C5460,0x6A42F2AA543FF793,0x5D727A7E73621BA9,0xE232875307459DF1, + 0x56A19E0FC2DFE477,0xC61DD3B4CD9C227D,0xE5877F03986A341B,0x949EB2A415C6F4ED, + 0x6206119460289340,0x6380E75AE84E11B0,0x8BE772B6D6D0F16F,0x50929091D596CF6D, + 0xE86795EC3E9EE0DF,0x7CF927482B581432,0xC86A3E14EEC26DB4,0x7119CDA78DACC0F6, + 0xE40189CD100CB6EB,0x92ADBC3A028FDFF7,0xB2A017C2D2D3529C,0x200DABF8D05C8D6B, + 0x34A78F9BA2F77737,0xE3B4719D8F231F01,0x45BE423C2F5BB7C1,0xF71E55FEFD88E55D, + 0x6853032B59F3EE6E,0x65B3E9C4FF073AAA,0x772AC3399AE5EBEC,0x87816E97F842A75B, + 0x110E2DB2E0484A4B,0x331277CB3DD8DEDD,0xBD510CAC79EB9FA5,0x352179552A91F5C7 + }, + { + 0x8AB0A96846E06A6D,0x43C7E80B4BF0B33A,0x08C9B3546B161EE5,0x39F1C235EBA990BE, + 0xC1BEF2376606C7B2,0x2C209233614569AA,0xEB01523B6FC3289A,0x946953AB935ACEDD, + 0x272838F63E13340E,0x8B0455ECA12BA052,0x77A1B2C4978FF8A2,0xA55122CA13E54086, + 0x2276135862D3F1CD,0xDB8DDFDE08B76CFE,0x5D1E12C89E4A178A,0x0E56816B03969867, + 0xEE5F79953303ED59,0xAFED748BAB78D71D,0x6D929F2DF93E53EE,0xF5D8A8F8BA798C2A, + 0xF619B1698E39CF6B,0x95DDAF2F749104E2,0xEC2A9C80E0886427,0xCE5C8FD8825B95EA, + 0xC4E0D9993AC60271,0x4699C3A5173076F9,0x3D1B151F50A29F42,0x9ED505EA2BC75946, + 0x34665ACFDC7F4B98,0x61B1FB53292342F7,0xC721C0080E864130,0x8693CD1696FD7B74, + 0x872731927136B14B,0xD3446C8A63A1721B,0x669A35E8A6680E4A,0xCAB658F239509A16, + 0xA4E5DE4EF42E8AB9,0x37A7435EE83F08D9,0x134E6239E26C7F96,0x82791A3C2DF67488, + 0x3F6EF00A8329163C,0x8E5A7E42FDEB6591,0x5CAAEE4C7981DDB5,0x19F234785AF1E80D, + 0x255DDDE3ED98BD70,0x50898A32A99CCCAC,0x28CA4519DA4E6656,0xAE59880F4CB31D22, + 0x0D9798FA37D6DB26,0x32F968F0B4FFCD1A,0xA00F09644F258545,0xFA3AD5175E24DE72, + 0xF46C547C5DB24615,0x713E80FBFF0F7E20,0x7843CF2B73D2AAFA,0xBD17EA36AEDF62B4, + 0xFD111BACD16F92CF,0x4ABAA7DBC72D67E0,0xB3416B5DAD49FAD3,0xBCA316B24914A88B, + 0x15D150068AECF914,0xE27C1DEBE31EFC40,0x4FE48C759BEDA223,0x7EDCFD141B522C78, + 0x4E5070F17C26681C,0xE696CAC15815F3BC,0x35D2A64B3BB481A7,0x800CFF29FE7DFDF6, + 0x1ED9FAC3D5BAA4B0,0x6C2663A91EF599D1,0x03C1199134404341,0xF7AD4DED69F20554, + 0xCD9D9649B61BD6AB,0xC8C3BDE7EADB1368,0xD131899FB02AFB65,0x1D18E352E1FAE7F1, + 0xDA39235AEF7CA6C1,0xA1BBF5E0A8EE4F7A,0x91377805CF9A0B1E,0x3138716180BF8E5B, + 0xD9F83ACBDB3CE580,0x0275E515D38B897E,0x472D3F21F0FBBCC6,0x2D946EB7868EA395, + 0xBA3C248D21942E09,0xE7223645BFDE3983,0xFF64FEB902E41BB1,0xC97741630D10D957, + 0xC3CB1722B58D4ECC,0xA27AEC719CAE0C3B,0x99FECB51A48C15FB,0x1465AC826D27332B, + 0xE1BD047AD75EBF01,0x79F733AF941960C5,0x672EC96C41A3C475,0xC27FEBA6524684F3, + 0x64EFD0FD75E38734,0xED9E60040743AE18,0xFB8E2993B9EF144D,0x38453EB10C625A81, + 0x6978480742355C12,0x48CF42CE14A6EE9E,0x1CAC1FD606312DCE,0x7B82D6BA4792E9BB, + 0x9D141C7B1F871A07,0x5616B80DC11C4A2E,0xB849C198F21FA777,0x7CA91801C8D9A506, + 0xB1348E487EC273AD,0x41B20D1E987B3A44,0x7460AB55A3CFBBE3,0x84E628034576F20A, + 0x1B87D16D897A6173,0x0FE27DEFE45D5258,0x83CDE6B8CA3DBEB7,0x0C23647ED01D1119, + 0x7A362A3EA0592384,0xB61F40F3F1893F10,0x75D457D1440471DC,0x4558DA34237035B8, + 0xDCA6116587FC2043,0x8D9B67D3C9AB26D0,0x2B0B5C88EE0E2517,0x6FE77A382AB5DA90, + 0x269CC472D9D8FE31,0x63C41E46FAA8CB89,0xB7ABBC771642F52F,0x7D1DE4852F126F39, + 0xA8C6BA3024339BA0,0x600507D7CEE888C8,0x8FEE82C61A20AFAE,0x57A2448926D78011, + 0xFCA5E72836A458F0,0x072BCEBB8F4B4CBD,0x497BBE4AF36D24A1,0x3CAFE99BB769557D, + 0x12FA9EBD05A7B5A9,0xE8C04BAA5B836BDB,0x4273148FAC3B7905,0x908384812851C121, + 0xE557D3506C55B0FD,0x72FF996ACB4F3D61,0x3EDA0C8E64E2DC03,0xF0868356E6B949E9, + 0x04EAD72ABB0B0FFC,0x17A4B5135967706A,0xE3C8E16F04D5367F,0xF84F30028DAF570C, + 0x1846C8FCBD3A2232,0x5B8120F7F6CA9108,0xD46FA231ECEA3EA6,0x334D947453340725, + 0x58403966C28AD249,0xBED6F3A79A9F21F5,0x68CCB483A5FE962D,0xD085751B57E1315A, + 0xFED0023DE52FD18E,0x4B0E5B5F20E6ADDF,0x1A332DE96EB1AB4C,0xA3CE10F57B65C604, + 0x108F7BA8D62C3CD7,0xAB07A3A11073D8E1,0x6B0DAD1291BED56C,0xF2F366433532C097, + 0x2E557726B2CEE0D4,0x0000000000000000,0xCB02A476DE9B5029,0xE4E32FD48B9E7AC2, + 0x734B65EE2C84F75E,0x6E5386BCCD7E10AF,0x01B4FC84E7CBCA3F,0xCFE8735C65905FD5, + 0x3613BFDA0FF4C2E6,0x113B872C31E7F6E8,0x2FE18BA255052AEB,0xE974B72EBC48A1E4, + 0x0ABC5641B89D979B,0xB46AA5E62202B66E,0x44EC26B0C4BBFF87,0xA6903B5B27A503C7, + 0x7F680190FC99E647,0x97A84A3AA71A8D9C,0xDD12EDE16037EA7C,0xC554251DDD0DC84E, + 0x88C54C7D956BE313,0x4D91696048662B5D,0xB08072CC9909B992,0xB5DE5962C5C97C51, + 0x81B803AD19B637C9,0xB2F597D94A8230EC,0x0B08AAC55F565DA4,0xF1327FD2017283D6, + 0xAD98919E78F35E63,0x6AB9519676751F53,0x24E921670A53774F,0xB9FD3D1C15D46D48, + 0x92F66194FBDA485F,0x5A35DC7311015B37,0xDED3F4705477A93D,0xC00A0EB381CD0D8D, + 0xBB88D809C65FE436,0x16104997BEACBA55,0x21B70AC95693B28C,0x59F4C5E225411876, + 0xD5DB5EB50B21F499,0x55D7A19CF55C096F,0xA97246B4C3F8519F,0x8552D487A2BD3835, + 0x54635D181297C350,0x23C2EFDC85183BF2,0x9F61F96ECC0C9379,0x534893A39DDC8FED, + 0x5EDF0B59AA0A54CB,0xAC2C6D1A9F38945C,0xD7AEBBA0D8AA7DE7,0x2ABFA00C09C5EF28, + 0xD84CC64F3CF72FBF,0x2003F64DB15878B3,0xA724C7DFC06EC9F8,0x069F323F68808682, + 0xCC296ACD51D01C94,0x055E2BAE5CC0C5C3,0x6270E2C21D6301B6,0x3B842720382219C0, + 0xD2F0900E846AB824,0x52FC6F277A1745D2,0xC6953C8CE94D8B0F,0xE009F8FE3095753E, + 0x655B2C7992284D0B,0x984A37D54347DFC4,0xEAB5AEBF8808E2A5,0x9A3FD2C090CC56BA, + 0x9CA0E0FFF84CD038,0x4C2595E4AFADE162,0xDF6708F4B3BC6302,0xBF620F237D54EBCA, + 0x93429D101C118260,0x097D4FD08CDDD4DA,0x8C2F9B572E60ECEF,0x708A7C7F18C4B41F, + 0x3A30DBA4DFE9D3FF,0x4006F19A7FB0F07B,0x5F6BF7DD4DC19EF4,0x1F6D064732716E8F, + 0xF9FBCC866A649D33,0x308C8DE567744464,0x8971B0F972A0292C,0xD61A47243F61B7D8, + 0xEFEB8511D4C82766,0x961CB6BE40D147A3,0xAAB35F25F7B812DE,0x76154E407044329D, + 0x513D76B64E570693,0xF3479AC7D2F90AA8,0x9B8B2E4477079C85,0x297EB99D3D85AC69 + }, + { + 0x7E37E62DFC7D40C3,0x776F25A4EE939E5B,0xE045C850DD8FB5AD,0x86ED5BA711FF1952, + 0xE91D0BD9CF616B35,0x37E0AB256E408FFB,0x9607F6C031025A7A,0x0B02F5E116D23C9D, + 0xF3D8486BFB50650C,0x621CFF27C40875F5,0x7D40CB71FA5FD34A,0x6DAA6616DAA29062, + 0x9F5F354923EC84E2,0xEC847C3DC507C3B3,0x025A3668043CE205,0xA8BF9E6C4DAC0B19, + 0xFA808BE2E9BEBB94,0xB5B99C5277C74FA3,0x78D9BC95F0397BCC,0xE332E50CDBAD2624, + 0xC74FCE129332797E,0x1729ECEB2EA709AB,0xC2D6B9F69954D1F8,0x5D898CBFBAB8551A, + 0x859A76FB17DD8ADB,0x1BE85886362F7FB5,0xF6413F8FF136CD8A,0xD3110FA5BBB7E35C, + 0x0A2FEED514CC4D11,0xE83010EDCD7F1AB9,0xA1E75DE55F42D581,0xEEDE4A55C13B21B6, + 0xF2F5535FF94E1480,0x0CC1B46D1888761E,0xBCE15FDB6529913B,0x2D25E8975A7181C2, + 0x71817F1CE2D7A554,0x2E52C5CB5C53124B,0xF9F7A6BEEF9C281D,0x9E722E7D21F2F56E, + 0xCE170D9B81DCA7E6,0x0E9B82051CB4941B,0x1E712F623C49D733,0x21E45CFA42F9F7DC, + 0xCB8E7A7F8BBA0F60,0x8E98831A010FB646,0x474CCF0D8E895B23,0xA99285584FB27A95, + 0x8CC2B57205335443,0x42D5B8E984EFF3A5,0x012D1B34021E718C,0x57A6626AAE74180B, + 0xFF19FC06E3D81312,0x35BA9D4D6A7C6DFE,0xC9D44C178F86ED65,0x506523E6A02E5288, + 0x03772D5C06229389,0x8B01F4FE0B691EC0,0xF8DABD8AED825991,0x4C4E3AEC985B67BE, + 0xB10DF0827FBF96A9,0x6A69279AD4F8DAE1,0xE78689DCD3D5FF2E,0x812E1A2B1FA553D1, + 0xFBAD90D6EBA0CA18,0x1AC543B234310E39,0x1604F7DF2CB97827,0xA6241C6951189F02, + 0x753513CCEAAF7C5E,0x64F2A59FC84C4EFA,0x247D2B1E489F5F5A,0xDB64D718AB474C48, + 0x79F4A7A1F2270A40,0x1573DA832A9BEBAE,0x3497867968621C72,0x514838D2A2302304, + 0xF0AF6537FD72F685,0x1D06023E3A6B44BA,0x678588C3CE6EDD73,0x66A893F7CC70ACFF, + 0xD4D24E29B5EDA9DF,0x3856321470EA6A6C,0x07C3418C0E5A4A83,0x2BCBB22F5635BACD, + 0x04B46CD00878D90A,0x06EE5AB80C443B0F,0x3B211F4876C8F9E5,0x0958C38912EEDE98, + 0xD14B39CDBF8B0159,0x397B292072F41BE0,0x87C0409313E168DE,0xAD26E98847CAA39F, + 0x4E140C849C6785BB,0xD5FF551DB7F3D853,0xA0CA46D15D5CA40D,0xCD6020C787FE346F, + 0x84B76DCF15C3FB57,0xDEFDA0FCA121E4CE,0x4B8D7B6096012D3D,0x9AC642AD298A2C64, + 0x0875D8BD10F0AF14,0xB357C6EA7B8374AC,0x4D6321D89A451632,0xEDA96709C719B23F, + 0xF76C24BBF328BC06,0xC662D526912C08F2,0x3CE25EC47892B366,0xB978283F6F4F39BD, + 0xC08C8F9E9D6833FD,0x4F3917B09E79F437,0x593DE06FB2C08C10,0xD6887841B1D14BDA, + 0x19B26EEE32139DB0,0xB494876675D93E2F,0x825937771987C058,0x90E9AC783D466175, + 0xF1827E03FF6C8709,0x945DC0A8353EB87F,0x4516F9658AB5B926,0x3F9573987EB020EF, + 0xB855330B6D514831,0x2AE6A91B542BCB41,0x6331E413C6160479,0x408F8E8180D311A0, + 0xEFF35161C325503A,0xD06622F9BD9570D5,0x8876D9A20D4B8D49,0xA5533135573A0C8B, + 0xE168D364DF91C421,0xF41B09E7F50A2F8F,0x12B09B0F24C1A12D,0xDA49CC2CA9593DC4, + 0x1F5C34563E57A6BF,0x54D14F36A8568B82,0xAF7CDFE043F6419A,0xEA6A2685C943F8BC, + 0xE5DCBFB4D7E91D2B,0xB27ADDDE799D0520,0x6B443CAED6E6AB6D,0x7BAE91C9F61BE845, + 0x3EB868AC7CAE5163,0x11C7B65322E332A4,0xD23C1491B9A992D0,0x8FB5982E0311C7CA, + 0x70AC6428E0C9D4D8,0x895BC2960F55FCC5,0x76423E90EC8DEFD7,0x6FF0507EDE9E7267, + 0x3DCF45F07A8CC2EA,0x4AA06054941F5CB1,0x5810FB5BB0DEFD9C,0x5EFEA1E3BC9AC693, + 0x6EDD4B4ADC8003EB,0x741808F8E8B10DD2,0x145EC1B728859A22,0x28BC9F7350172944, + 0x270A06424EBDCCD3,0x972AEDF4331C2BF6,0x059977E40A66A886,0x2550302A4A812ED6, + 0xDD8A8DA0A7037747,0xC515F87A970E9B7B,0x3023EAA9601AC578,0xB7E3AA3A73FBADA6, + 0x0FB699311EAAE597,0x0000000000000000,0x310EF19D6204B4F4,0x229371A644DB6455, + 0x0DECAF591A960792,0x5CA4978BB8A62496,0x1C2B190A38753536,0x41A295B582CD602C, + 0x3279DCC16426277D,0xC1A194AA9F764271,0x139D803B26DFD0A1,0xAE51C4D441E83016, + 0xD813FA44AD65DFC1,0xAC0BF2BC45D4D213,0x23BE6A9246C515D9,0x49D74D08923DCF38, + 0x9D05032127D066E7,0x2F7FDEFF5E4D63C7,0xA47E2A0155247D07,0x99B16FF12FA8BFED, + 0x4661D4398C972AAF,0xDFD0BBC8A33F9542,0xDCA79694A51D06CB,0xB020EBB67DA1E725, + 0xBA0F0563696DAA34,0xE4F1A480D5F76CA7,0xC438E34E9510EAF7,0x939E81243B64F2FC, + 0x8DEFAE46072D25CF,0x2C08F3A3586FF04E,0xD7A56375B3CF3A56,0x20C947CE40E78650, + 0x43F8A3DD86F18229,0x568B795EAC6A6987,0x8003011F1DBB225D,0xF53612D3F7145E03, + 0x189F75DA300DEC3C,0x9570DB9C3720C9F3,0xBB221E576B73DBB8,0x72F65240E4F536DD, + 0x443BE25188ABC8AA,0xE21FFE38D9B357A8,0xFD43CA6EE7E4F117,0xCAA3614B89A47EEC, + 0xFE34E732E1C6629E,0x83742C431B99B1D4,0xCF3A16AF83C2D66A,0xAAE5A8044990E91C, + 0x26271D764CA3BD5F,0x91C4B74C3F5810F9,0x7C6DD045F841A2C6,0x7F1AFD19FE63314F, + 0xC8F957238D989CE9,0xA709075D5306EE8E,0x55FC5402AA48FA0E,0x48FA563C9023BEB4, + 0x65DFBEABCA523F76,0x6C877D22D8BCE1EE,0xCC4D3BF385E045E3,0xBEBB69B36115733E, + 0x10EAAD6720FD4328,0xB6CEB10E71E5DC2A,0xBDCC44EF6737E0B7,0x523F158EA412B08D, + 0x989C74C52DB6CE61,0x9BEB59992B945DE8,0x8A2CEFCA09776F4C,0xA3BD6B8D5B7E3784, + 0xEB473DB1CB5D8930,0xC3FBA2C29B4AA074,0x9C28181525CE176B,0x683311F2D0C438E4, + 0x5FD3BAD7BE84B71F,0xFC6ED15AE5FA809B,0x36CDB0116C5EFE77,0x29918447520958C8, + 0xA29070B959604608,0x53120EBAA60CC101,0x3A0C047C74D68869,0x691E0AC6D2DA4968, + 0x73DB4974E6EB4751,0x7A838AFDF40599C9,0x5A4ACD33B4E21F99,0x6046C94FC03497F0, + 0xE6AB92E8D1CB8EA2,0x3354C7F5663856F1,0xD93EE170AF7BAE4D,0x616BD27BC22AE67C, + 0x92B39A10397A8370,0xABC8B3304B8E9890,0xBF967287630B02B2,0x5B67D607B6FC6E15 + }, + { + 0xD031C397CE553FE6,0x16BA5B01B006B525,0xA89BADE6296E70C8,0x6A1F525D77D3435B, + 0x6E103570573DFA0B,0x660EFB2A17FC95AB,0x76327A9E97634BF6,0x4BAD9D6462458BF5, + 0xF1830CAEDBC3F748,0xC5C8F542669131FF,0x95044A1CDC48B0CB,0x892962DF3CF8B866, + 0xB0B9E208E930C135,0xA14FB3F0611A767C,0x8D2605F21C160136,0xD6B71922FECC549E, + 0x37089438A5907D8B,0x0B5DA38E5803D49C,0x5A5BCC9CEA6F3CBC,0xEDAE246D3B73FFE5, + 0xD2B87E0FDE22EDCE,0x5E54ABB1CA8185EC,0x1DE7F88FE80561B9,0xAD5E1A870135A08C, + 0x2F2ADBD665CECC76,0x5780B5A782F58358,0x3EDC8A2EEDE47B3F,0xC9D95C3506BEE70F, + 0x83BE111D6C4E05EE,0xA603B90959367410,0x103C81B4809FDE5D,0x2C69B6027D0C774A, + 0x399080D7D5C87953,0x09D41E16487406B4,0xCDD63B1826505E5F,0xF99DC2F49B0298E8, + 0x9CD0540A943CB67F,0xBCA84B7F891F17C5,0x723D1DB3B78DF2A6,0x78AA6E71E73B4F2E, + 0x1433E699A071670D,0x84F21BE454620782,0x98DF3327B4D20F2F,0xF049DCE2D3769E5C, + 0xDB6C60199656EB7A,0x648746B2078B4783,0x32CD23598DCBADCF,0x1EA4955BF0C7DA85, + 0xE9A143401B9D46B5,0xFD92A5D9BBEC21B8,0xC8138C790E0B8E1B,0x2EE00B9A6D7BA562, + 0xF85712B893B7F1FC,0xEB28FED80BEA949D,0x564A65EB8A40EA4C,0x6C9988E8474A2823, + 0x4535898B121D8F2D,0xABD8C03231ACCBF4,0xBA2E91CAB9867CBD,0x7960BE3DEF8E263A, + 0x0C11A977602FD6F0,0xCB50E1AD16C93527,0xEAE22E94035FFD89,0x2866D12F5DE2CE1A, + 0xFF1B1841AB9BF390,0x9F9339DE8CFE0D43,0x964727C8C48A0BF7,0x524502C6AAAE531C, + 0x9B9C5EF3AC10B413,0x4FA2FA4942AB32A5,0x3F165A62E551122B,0xC74148DA76E6E3D7, + 0x924840E5E464B2A7,0xD372AE43D69784DA,0x233B72A105E11A86,0xA48A04914941A638, + 0xB4B68525C9DE7865,0xDDEABAACA6CF8002,0x0A9773C250B6BD88,0xC284FFBB5EBD3393, + 0x8BA0DF472C8F6A4E,0x2AEF6CB74D951C32,0x427983722A318D41,0x73F7CDFFBF389BB2, + 0x074C0AF9382C026C,0x8A6A0F0B243A035A,0x6FDAE53C5F88931F,0xC68B98967E538AC3, + 0x44FF59C71AA8E639,0xE2FCE0CE439E9229,0xA20CDE2479D8CD40,0x19E89FA2C8EBD8E9, + 0xF446BBCFF398270C,0x43B3533E2284E455,0xD82F0DCD8E945046,0x51066F12B26CE820, + 0xE73957AF6BC5426D,0x081ECE5A40C16FA0,0x3B193D4FC5BFAB7B,0x7FE66488DF174D42, + 0x0E9814EF705804D8,0x8137AC857C39D7C6,0xB1733244E185A821,0x695C3F896F11F867, + 0xF6CF0657E3EFF524,0x1AABF276D02963D5,0x2DA3664E75B91E5E,0x0289BD981077D228, + 0x90C1FD7DF413608F,0x3C5537B6FD93A917,0xAA12107E3919A2E0,0x0686DAB530996B78, + 0xDAA6B0559EE3826E,0xC34E2FF756085A87,0x6D5358A44FFF4137,0xFC587595B35948AC, + 0x7CA5095CC7D5F67E,0xFB147F6C8B754AC0,0xBFEB26AB91DDACF9,0x6896EFC567A49173, + 0xCA9A31E11E7C5C33,0xBBE44186B13315A9,0x0DDB793B689ABFE4,0x70B4A02BA7FA208E, + 0xE47A3A7B7307F951,0x8CECD5BE14A36822,0xEEED49B923B144D9,0x17708B4DB8B3DC31, + 0x6088219F2765FED3,0xB3FA8FDCF1F27A09,0x910B2D31FCA6099B,0x0F52C4A378ED6DCC, + 0x50CCBF5EBAD98134,0x6BD582117F662A4F,0x94CE9A50D4FDD9DF,0x2B25BCFB45207526, + 0x67C42B661F49FCBF,0x492420FC723259DD,0x03436DD418C2BB3C,0x1F6E4517F872B391, + 0xA08563BC69AF1F68,0xD43EA4BAEEBB86B6,0x01CAD04C08B56914,0xAC94CACB0980C998, + 0x54C3D8739A373864,0x26FEC5C02DBACAC2,0xDEA9D778BE0D3B3E,0x040F672D20EEB950, + 0xE5B0EA377BB29045,0xF30AB136CBB42560,0x62019C0737122CFB,0xE86B930C13282FA1, + 0xCC1CEB542EE5374B,0x538FD28AA21B3A08,0x1B61223AD89C0AC1,0x36C24474AD25149F, + 0x7A23D3E9F74C9D06,0xBE21F6E79968C5ED,0xCF5F868036278C77,0xF705D61BEB5A9C30, + 0x4D2B47D152DCE08D,0x5F9E7BFDC234ECF8,0x247778583DCD18EA,0x867BA67C4415D5AA, + 0x4CE1979D5A698999,0x0000000000000000,0xEC64F42133C696F1,0xB57C5569C16B1171, + 0xC1C7926F467F88AF,0x654D96FE0F3E2E97,0x15F936D5A8C40E19,0xB8A72C52A9F1AE95, + 0xA9517DAA21DB19DC,0x58D27104FA18EE94,0x5918A148F2AD8780,0x5CDD1629DAF657C4, + 0x8274C15164FB6CFA,0xD1FB13DBC6E056F2,0x7D6FD910CF609F6A,0xB63F38BDD9A9AA4D, + 0x3D9FE7FAF526C003,0x74BBC706871499DE,0xDF630734B6B8522A,0x3AD3ED03CD0AC26F, + 0xFADEAF2083C023D4,0xC00D42234ECAE1BB,0x8538CBA85CD76E96,0xC402250E6E2458EB, + 0x47BC3413026A5D05,0xAFD7A71F114272A4,0x978DF784CC3F62E3,0xB96DFC1EA144C781, + 0x21B2CF391596C8AE,0x318E4E8D950916F3,0xCE9556CC3E92E563,0x385A509BDD7D1047, + 0x358129A0B5E7AFA3,0xE6F387E363702B79,0xE0755D5653E94001,0x7BE903A5FFF9F412, + 0x12B53C2C90E80C75,0x3307F315857EC4DB,0x8FAFB86A0C61D31E,0xD9E5DD8186213952, + 0x77F8AAD29FD622E2,0x25BDA814357871FE,0x7571174A8FA1F0CA,0x137FEC60985D6561, + 0x30449EC19DBC7FE7,0xA540D4DD41F4CF2C,0xDC206AE0AE7AE916,0x5B911CD0E2DA55A8, + 0xB2305F90F947131D,0x344BF9ECBD52C6B7,0x5D17C665D2433ED0,0x18224FEEC05EB1FD, + 0x9E59E992844B6457,0x9A568EBFA4A5DD07,0xA3C60E68716DA454,0x7E2CB4C4D7A22456, + 0x87B176304CA0BCBE,0x413AEEA632F3367D,0x9915E36BBC67663B,0x40F03EEA3A465F69, + 0x1C2D28C3E0B008AD,0x4E682A054A1E5BB1,0x05C5B761285BD044,0xE1BF8D1A5B5C2915, + 0xF2C0617AC3014C74,0xB7F5E8F1D11CC359,0x63CB4C4B3FA745EF,0x9D1A84469C89DF6B, + 0xE33630824B2BFB3D,0xD5F474F6E60EEFA2,0xF58C6B83FB2D4E18,0x4676E45F0ADF3411, + 0x20781F751D23A1BA,0xBD629B3381AA7ED1,0xAE1D775319F71BB0,0xFED1C80DA32E9A84, + 0x5509083F92825170,0x29AC01635557A70E,0xA7C9694551831D04,0x8E65682604D4BA0A, + 0x11F651F8882AB749,0xD77DC96EF6793D8A,0xEF2799F52B042DCD,0x48EEF0B07A8730C9, + 0x22F1A2ED0D547392,0x6142F1D32FD097C7,0x4A674D286AF0E2E1,0x80FD7CC9748CBED2, + 0x717E7067AF4F499A,0x938290A9ECD1DBB3,0x88E3B293344DD172,0x2734158C250FA3D6 + } +}; + +// Constant values for KeySchedule function +const unsigned char C[12][64] = { + { + 0xB1,0x08,0x5B,0xDA,0x1E,0xCA,0xDA,0xE9,0xEB,0xCB,0x2F,0x81,0xC0,0x65,0x7C,0x1F, + 0x2F,0x6A,0x76,0x43,0x2E,0x45,0xD0,0x16,0x71,0x4E,0xB8,0x8D,0x75,0x85,0xC4,0xFC, + 0x4B,0x7C,0xE0,0x91,0x92,0x67,0x69,0x01,0xA2,0x42,0x2A,0x08,0xA4,0x60,0xD3,0x15, + 0x05,0x76,0x74,0x36,0xCC,0x74,0x4D,0x23,0xDD,0x80,0x65,0x59,0xF2,0xA6,0x45,0x07 + }, + { + 0x6F,0xA3,0xB5,0x8A,0xA9,0x9D,0x2F,0x1A,0x4F,0xE3,0x9D,0x46,0x0F,0x70,0xB5,0xD7, + 0xF3,0xFE,0xEA,0x72,0x0A,0x23,0x2B,0x98,0x61,0xD5,0x5E,0x0F,0x16,0xB5,0x01,0x31, + 0x9A,0xB5,0x17,0x6B,0x12,0xD6,0x99,0x58,0x5C,0xB5,0x61,0xC2,0xDB,0x0A,0xA7,0xCA, + 0x55,0xDD,0xA2,0x1B,0xD7,0xCB,0xCD,0x56,0xE6,0x79,0x04,0x70,0x21,0xB1,0x9B,0xB7 + }, + { + 0xF5,0x74,0xDC,0xAC,0x2B,0xCE,0x2F,0xC7,0x0A,0x39,0xFC,0x28,0x6A,0x3D,0x84,0x35, + 0x06,0xF1,0x5E,0x5F,0x52,0x9C,0x1F,0x8B,0xF2,0xEA,0x75,0x14,0xB1,0x29,0x7B,0x7B, + 0xD3,0xE2,0x0F,0xE4,0x90,0x35,0x9E,0xB1,0xC1,0xC9,0x3A,0x37,0x60,0x62,0xDB,0x09, + 0xC2,0xB6,0xF4,0x43,0x86,0x7A,0xDB,0x31,0x99,0x1E,0x96,0xF5,0x0A,0xBA,0x0A,0xB2 + }, + { + 0xEF,0x1F,0xDF,0xB3,0xE8,0x15,0x66,0xD2,0xF9,0x48,0xE1,0xA0,0x5D,0x71,0xE4,0xDD, + 0x48,0x8E,0x85,0x7E,0x33,0x5C,0x3C,0x7D,0x9D,0x72,0x1C,0xAD,0x68,0x5E,0x35,0x3F, + 0xA9,0xD7,0x2C,0x82,0xED,0x03,0xD6,0x75,0xD8,0xB7,0x13,0x33,0x93,0x52,0x03,0xBE, + 0x34,0x53,0xEA,0xA1,0x93,0xE8,0x37,0xF1,0x22,0x0C,0xBE,0xBC,0x84,0xE3,0xD1,0x2E + }, + { + 0x4B,0xEA,0x6B,0xAC,0xAD,0x47,0x47,0x99,0x9A,0x3F,0x41,0x0C,0x6C,0xA9,0x23,0x63, + 0x7F,0x15,0x1C,0x1F,0x16,0x86,0x10,0x4A,0x35,0x9E,0x35,0xD7,0x80,0x0F,0xFF,0xBD, + 0xBF,0xCD,0x17,0x47,0x25,0x3A,0xF5,0xA3,0xDF,0xFF,0x00,0xB7,0x23,0x27,0x1A,0x16, + 0x7A,0x56,0xA2,0x7E,0xA9,0xEA,0x63,0xF5,0x60,0x17,0x58,0xFD,0x7C,0x6C,0xFE,0x57 + }, + { + 0xAE,0x4F,0xAE,0xAE,0x1D,0x3A,0xD3,0xD9,0x6F,0xA4,0xC3,0x3B,0x7A,0x30,0x39,0xC0, + 0x2D,0x66,0xC4,0xF9,0x51,0x42,0xA4,0x6C,0x18,0x7F,0x9A,0xB4,0x9A,0xF0,0x8E,0xC6, + 0xCF,0xFA,0xA6,0xB7,0x1C,0x9A,0xB7,0xB4,0x0A,0xF2,0x1F,0x66,0xC2,0xBE,0xC6,0xB6, + 0xBF,0x71,0xC5,0x72,0x36,0x90,0x4F,0x35,0xFA,0x68,0x40,0x7A,0x46,0x64,0x7D,0x6E + }, + { + 0xF4,0xC7,0x0E,0x16,0xEE,0xAA,0xC5,0xEC,0x51,0xAC,0x86,0xFE,0xBF,0x24,0x09,0x54, + 0x39,0x9E,0xC6,0xC7,0xE6,0xBF,0x87,0xC9,0xD3,0x47,0x3E,0x33,0x19,0x7A,0x93,0xC9, + 0x09,0x92,0xAB,0xC5,0x2D,0x82,0x2C,0x37,0x06,0x47,0x69,0x83,0x28,0x4A,0x05,0x04, + 0x35,0x17,0x45,0x4C,0xA2,0x3C,0x4A,0xF3,0x88,0x86,0x56,0x4D,0x3A,0x14,0xD4,0x93 + }, + { + 0x9B,0x1F,0x5B,0x42,0x4D,0x93,0xC9,0xA7,0x03,0xE7,0xAA,0x02,0x0C,0x6E,0x41,0x41, + 0x4E,0xB7,0xF8,0x71,0x9C,0x36,0xDE,0x1E,0x89,0xB4,0x44,0x3B,0x4D,0xDB,0xC4,0x9A, + 0xF4,0x89,0x2B,0xCB,0x92,0x9B,0x06,0x90,0x69,0xD1,0x8D,0x2B,0xD1,0xA5,0xC4,0x2F, + 0x36,0xAC,0xC2,0x35,0x59,0x51,0xA8,0xD9,0xA4,0x7F,0x0D,0xD4,0xBF,0x02,0xE7,0x1E + }, + { + 0x37,0x8F,0x5A,0x54,0x16,0x31,0x22,0x9B,0x94,0x4C,0x9A,0xD8,0xEC,0x16,0x5F,0xDE, + 0x3A,0x7D,0x3A,0x1B,0x25,0x89,0x42,0x24,0x3C,0xD9,0x55,0xB7,0xE0,0x0D,0x09,0x84, + 0x80,0x0A,0x44,0x0B,0xDB,0xB2,0xCE,0xB1,0x7B,0x2B,0x8A,0x9A,0xA6,0x07,0x9C,0x54, + 0x0E,0x38,0xDC,0x92,0xCB,0x1F,0x2A,0x60,0x72,0x61,0x44,0x51,0x83,0x23,0x5A,0xDB + }, + { + 0xAB,0xBE,0xDE,0xA6,0x80,0x05,0x6F,0x52,0x38,0x2A,0xE5,0x48,0xB2,0xE4,0xF3,0xF3, + 0x89,0x41,0xE7,0x1C,0xFF,0x8A,0x78,0xDB,0x1F,0xFF,0xE1,0x8A,0x1B,0x33,0x61,0x03, + 0x9F,0xE7,0x67,0x02,0xAF,0x69,0x33,0x4B,0x7A,0x1E,0x6C,0x30,0x3B,0x76,0x52,0xF4, + 0x36,0x98,0xFA,0xD1,0x15,0x3B,0xB6,0xC3,0x74,0xB4,0xC7,0xFB,0x98,0x45,0x9C,0xED + }, + { + 0x7B,0xCD,0x9E,0xD0,0xEF,0xC8,0x89,0xFB,0x30,0x02,0xC6,0xCD,0x63,0x5A,0xFE,0x94, + 0xD8,0xFA,0x6B,0xBB,0xEB,0xAB,0x07,0x61,0x20,0x01,0x80,0x21,0x14,0x84,0x66,0x79, + 0x8A,0x1D,0x71,0xEF,0xEA,0x48,0xB9,0xCA,0xEF,0xBA,0xCD,0x1D,0x7D,0x47,0x6E,0x98, + 0xDE,0xA2,0x59,0x4A,0xC0,0x6F,0xD8,0x5D,0x6B,0xCA,0xA4,0xCD,0x81,0xF3,0x2D,0x1B + }, + { + 0x37,0x8E,0xE7,0x67,0xF1,0x16,0x31,0xBA,0xD2,0x13,0x80,0xB0,0x04,0x49,0xB1,0x7A, + 0xCD,0xA4,0x3C,0x32,0xBC,0xDF,0x1D,0x77,0xF8,0x20,0x12,0xD4,0x30,0x21,0x9F,0x9B, + 0x5D,0x80,0xEF,0x9D,0x18,0x91,0xCC,0x86,0xE7,0x1D,0xA4,0xAA,0x88,0xE1,0x28,0x52, + 0xFA,0xF4,0x17,0xD5,0xD9,0xB2,0x1B,0x99,0x48,0xBC,0x92,0x4A,0xF1,0x1B,0xD7,0x20 + } +}; + + +void AddModulo512(const void *a,const void *b,void *c) +{ + const unsigned char *A=a, *B=b; + unsigned char *C=c; + int t = 0; +#ifdef FULL_UNROLL +#define ADDBYTE_8(i) t = A[i] + B[i] + (t >> 8); C[i] = t & 0xFF; + + ADDBYTE_8(63) + ADDBYTE_8(62) + ADDBYTE_8(61) + ADDBYTE_8(60) + ADDBYTE_8(59) + ADDBYTE_8(58) + ADDBYTE_8(57) + ADDBYTE_8(56) + ADDBYTE_8(55) + ADDBYTE_8(54) + ADDBYTE_8(53) + ADDBYTE_8(52) + ADDBYTE_8(51) + ADDBYTE_8(50) + ADDBYTE_8(49) + ADDBYTE_8(48) + ADDBYTE_8(47) + ADDBYTE_8(46) + ADDBYTE_8(45) + ADDBYTE_8(44) + ADDBYTE_8(43) + ADDBYTE_8(42) + ADDBYTE_8(41) + ADDBYTE_8(40) + ADDBYTE_8(39) + ADDBYTE_8(38) + ADDBYTE_8(37) + ADDBYTE_8(36) + ADDBYTE_8(35) + ADDBYTE_8(34) + ADDBYTE_8(33) + ADDBYTE_8(32) + ADDBYTE_8(31) + ADDBYTE_8(30) + ADDBYTE_8(29) + ADDBYTE_8(28) + ADDBYTE_8(27) + ADDBYTE_8(26) + ADDBYTE_8(25) + ADDBYTE_8(24) + ADDBYTE_8(23) + ADDBYTE_8(22) + ADDBYTE_8(21) + ADDBYTE_8(20) + ADDBYTE_8(19) + ADDBYTE_8(18) + ADDBYTE_8(17) + ADDBYTE_8(16) + ADDBYTE_8(15) + ADDBYTE_8(14) + ADDBYTE_8(13) + ADDBYTE_8(12) + ADDBYTE_8(11) + ADDBYTE_8(10) + ADDBYTE_8(9) + ADDBYTE_8(8) + ADDBYTE_8(7) + ADDBYTE_8(6) + ADDBYTE_8(5) + ADDBYTE_8(4) + ADDBYTE_8(3) + ADDBYTE_8(2) + ADDBYTE_8(1) + ADDBYTE_8(0) + +#else + int i = 0; + + for(i=63;i>=0;i--) + { + t = A[i] + B[i] + (t >> 8); + C[i] = t & 0xFF; + } +#endif +} + +void AddXor512(const void *a,const void *b,void *c) +{ + const unsigned long long *A=a, *B=b; + unsigned long long *C=c; +#ifdef FULL_UNROLL + C[0] = A[0] ^ B[0]; + C[1] = A[1] ^ B[1]; + C[2] = A[2] ^ B[2]; + C[3] = A[3] ^ B[3]; + C[4] = A[4] ^ B[4]; + C[5] = A[5] ^ B[5]; + C[6] = A[6] ^ B[6]; + C[7] = A[7] ^ B[7]; +#else + int i = 0; + + for(i=0;i<8;i++) + { + C[i] = A[i] ^ B[i]; + } +#endif +} + +void F(unsigned char *state) +{ + unsigned long long return_state[8]; + register unsigned long long r = 0; + r ^= T[0][state[56]]; + r ^= T[1][state[48]]; + r ^= T[2][state[40]]; + r ^= T[3][state[32]]; + r ^= T[4][state[24]]; + r ^= T[5][state[16]]; + r ^= T[6][state[8]]; + r ^= T[7][state[0]]; + return_state[0] = r; + r = 0; + + r ^= T[0][state[57]]; + r ^= T[1][state[49]]; + r ^= T[2][state[41]]; + r ^= T[3][state[33]]; + r ^= T[4][state[25]]; + r ^= T[5][state[17]]; + r ^= T[6][state[9]]; + r ^= T[7][state[1]]; + return_state[1] = r; + r = 0; + + r ^= T[0][state[58]]; + r ^= T[1][state[50]]; + r ^= T[2][state[42]]; + r ^= T[3][state[34]]; + r ^= T[4][state[26]]; + r ^= T[5][state[18]]; + r ^= T[6][state[10]]; + r ^= T[7][state[2]]; + return_state[2] = r; + r = 0; + + r ^= T[0][state[59]]; + r ^= T[1][state[51]]; + r ^= T[2][state[43]]; + r ^= T[3][state[35]]; + r ^= T[4][state[27]]; + r ^= T[5][state[19]]; + r ^= T[6][state[11]]; + r ^= T[7][state[3]]; + return_state[3] = r; + r = 0; + + r ^= T[0][state[60]]; + r ^= T[1][state[52]]; + r ^= T[2][state[44]]; + r ^= T[3][state[36]]; + r ^= T[4][state[28]]; + r ^= T[5][state[20]]; + r ^= T[6][state[12]]; + r ^= T[7][state[4]]; + return_state[4] = r; + r = 0; + + r ^= T[0][state[61]]; + r ^= T[1][state[53]]; + r ^= T[2][state[45]]; + r ^= T[3][state[37]]; + r ^= T[4][state[29]]; + r ^= T[5][state[21]]; + r ^= T[6][state[13]]; + r ^= T[7][state[5]]; + return_state[5] = r; + r = 0; + + r ^= T[0][state[62]]; + r ^= T[1][state[54]]; + r ^= T[2][state[46]]; + r ^= T[3][state[38]]; + r ^= T[4][state[30]]; + r ^= T[5][state[22]]; + r ^= T[6][state[14]]; + r ^= T[7][state[6]]; + return_state[6] = r; + r = 0; + + r ^= T[0][state[63]]; + r ^= T[1][state[55]]; + r ^= T[2][state[47]]; + r ^= T[3][state[39]]; + r ^= T[4][state[31]]; + r ^= T[5][state[23]]; + r ^= T[6][state[15]]; + r ^= T[7][state[7]]; + return_state[7] = r; + + memcpy(state,(unsigned char*)return_state,64); +} + +#define KeySchedule(K,i) AddXor512(K,C[i],K); F(K); + +void E(unsigned char *K,const unsigned char *m, unsigned char *state) +{ +#ifdef FULL_UNROLL + AddXor512(m,K,state); + + F(state); + KeySchedule(K,0); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,1); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,2); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,3); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,4); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,5); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,6); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,7); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,8); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,9); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,10); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,11); + AddXor512(state,K,state); +#else + int i = 0; + + AddXor512(m,K,state); + + for(i=0;i<12;i++) + { + F(state); + KeySchedule(K,i); + AddXor512(state,K,state); + } +#endif +} + +static void g_N(const unsigned char *N,unsigned char *h,const unsigned char *m) +{ + unsigned char t[64], K[64]; + + AddXor512(N,h,K); + + F(K); + + E(K,m,t); + + AddXor512(t,h,t); + AddXor512(t,m,h); +} + +static void hash_X(unsigned char *IV,const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char v512[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00 + }; + unsigned char v0[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char Sigma[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char N[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char m[64], *hash = IV; + unsigned long long len = length; + + // Stage 2 + while (len >= 512) + { + memcpy(m, message + len/8 - 63 - ( (len & 0x7) == 0 ), 64); + + g_N(N,hash,m); + AddModulo512(N,v512,N); + AddModulo512(Sigma,m,Sigma); + len -= 512; + } + + memset(m,0,64); + memcpy(m + 63 - len/8 + ( (len & 0x7) == 0 ), message, len/8 + 1 - ( (len & 0x7) == 0 )); + + // Stage 3 + m[ 63 - len/8 ] |= (1 << (len & 0x7)); + + g_N(N,hash,m); + v512[63] = len & 0xFF; + v512[62] = len >> 8; + AddModulo512(N,v512,N); + + AddModulo512(Sigma,m,Sigma); + + g_N(v0,hash,N); + g_N(v0,hash,Sigma); + + memcpy(out, hash, 64); +} + +static void hash_512(const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char IV[64] = + { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + + hash_X(IV,message,length,out); +} + +static void hash_256(const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char IV[64] = + { + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 + }; + unsigned char hash[64]; + + hash_X(IV,message,length,hash); + + memcpy(out,hash,32); +} + + + + + +/* see sph_gost.h */ +void +sph_gost256_init(void *cc) +{ + //gost_init(cc, 256); +} + +/* see sph_gost.h */ +void +sph_gost256(void *cc, const void *data, size_t len) +{ + hash_256(data, len * 8, cc); +} + +/* see sph_gost.h */ +void +sph_gost256_close(void *cc, void *dst) +{ + //sph_gost256_addbits_and_close(cc, 0, 0, dst); + memcpy(dst, cc, 32); +} + +/* see sph_gost.h */ +void +sph_gost256_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + //gost_close32(cc, ub, n, dst); +} + +/* see sph_gost.h */ +void sph_gost512_init(void *cc) +{ + //gost_init(cc, 512); +} + +/* see sph_gost.h */ +void sph_gost512(void *cc, const void *data, size_t len) +{ + hash_512(data, len * 8, cc); +} + +/* see sph_gost.h */ +void sph_gost512_close(void *cc, void *dst) +{ + //sph_gost512_addbits_and_close(cc, 0, 0, dst); + memcpy(dst, cc, 64); +} + +/* see sph_gost.h */ +void +sph_gost512_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + //gost_close64(cc, ub, n, dst); +} + + +#ifdef __cplusplus +} +#endif From 5b7de2c628d03d97f73d8ccf2ec5bf3996d97dc2 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:23:55 -0500 Subject: [PATCH 120/576] Create sph_gost.h --- stratum/sha3/sph_gost.h | 185 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 stratum/sha3/sph_gost.h diff --git a/stratum/sha3/sph_gost.h b/stratum/sha3/sph_gost.h new file mode 100644 index 000000000..c0a4ab750 --- /dev/null +++ b/stratum/sha3/sph_gost.h @@ -0,0 +1,185 @@ +/* $Id: sph_gost.h 216 2010-06-08 09:46:57Z tp $ */ +/** + * GOST interface. This is the interface for GOST R 12 with the + * recommended parameters for SHA-3, with output lengths 256 + * and 512 bits. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @file sph_gost.h + * @author ivan + */ + +#ifndef SPH_GOST_H__ +#define SPH_GOST_H__ + +#ifdef __cplusplus +extern "C"{ +#endif + +#include +#include "sph_types.h" + +/** + * Output size (in bits) for GOST-256. + */ +#define SPH_SIZE_gost256 256 + +/** + * Output size (in bits) for GOST-512. + */ +#define SPH_SIZE_gost512 512 + +/** + * This structure is a context for Keccak computations: it contains the + * intermediate values and some data from the last entered block. Once a + * GOST computation has been performed, the context can be reused for + * another computation. + * + * The contents of this structure are private. A running GOST computation + * can be cloned by copying the context (e.g. with a simple + * memcpy()). + */ + +/** + * This structure is a context for Gost-256 computations. + */ + +typedef struct { +#ifndef DOXYGEN_IGNORE + unsigned char buf[32]; /* first field, for alignment */ + size_t ptr; + sph_u32 V[3][8]; +#endif +} sph_gost256_context; + +/** + * This structure is a context for Gost-512 computations. + */ +typedef struct { +#ifndef DOXYGEN_IGNORE + unsigned char buf[64]; /* first field, for alignment */ + size_t ptr; + sph_u32 V[5][8]; +#endif +} sph_gost512_context; + + +/** + * Initialize a GOST-256 context. This process performs no memory allocation. + * + * @param cc the GOST-256 context (pointer to a + * sph_gost256_context) + */ +void sph_gost256_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the Gost-256 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void sph_gost256(void *cc, const void *data, size_t len); + +/** + * Terminate the current GOST-256 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (32 bytes). The context is automatically + * reinitialized. + * + * @param cc the GOST-256 context + * @param dst the destination buffer + */ +void sph_gost256_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (32 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the GOST-256 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void sph_gost256_addbits_and_close( + void *cc, unsigned ub, unsigned n, void *dst); + +/** + * Initialize a Gost-512 context. This process performs no memory allocation. + * + * @param cc the GOST-512 context (pointer to a + * sph_gost512_context) + */ +void sph_gost512_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the GOST-512 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void sph_gost512(void *cc, const void *data, size_t len); + +/** + * Terminate the current GOST-512 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (64 bytes). The context is automatically + * reinitialized. + * + * @param cc the GOST-512 context + * @param dst the destination buffer + */ +void sph_gost512_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (64 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the GOST-512 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void sph_gost512_addbits_and_close( + void *cc, unsigned ub, unsigned n, void *dst); + +#ifdef __cplusplus +} +#endif + +#endif From e44d93a5ff2816f31046c8c5da9ac2ca0f98bab4 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:24:20 -0500 Subject: [PATCH 121/576] Create sph_panama.c --- stratum/sha3/sph_panama.c | 301 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 stratum/sha3/sph_panama.c diff --git a/stratum/sha3/sph_panama.c b/stratum/sha3/sph_panama.c new file mode 100644 index 000000000..5dcab208c --- /dev/null +++ b/stratum/sha3/sph_panama.c @@ -0,0 +1,301 @@ +/* $Id: panama.c 216 2010-06-08 09:46:57Z tp $ */ +/* + * PANAMA implementation. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @author Thomas Pornin + */ + #include +#include + #include "sph_panama.h" + #define LVAR17(b) sph_u32 \ + b ## 0, b ## 1, b ## 2, b ## 3, b ## 4, b ## 5, \ + b ## 6, b ## 7, b ## 8, b ## 9, b ## 10, b ## 11, \ + b ## 12, b ## 13, b ## 14, b ## 15, b ## 16; + #define LVARS \ + LVAR17(a) \ + LVAR17(g) \ + LVAR17(p) \ + LVAR17(t) + #define M17(macro) do { \ + macro( 0, 1, 2, 4); \ + macro( 1, 2, 3, 5); \ + macro( 2, 3, 4, 6); \ + macro( 3, 4, 5, 7); \ + macro( 4, 5, 6, 8); \ + macro( 5, 6, 7, 9); \ + macro( 6, 7, 8, 10); \ + macro( 7, 8, 9, 11); \ + macro( 8, 9, 10, 12); \ + macro( 9, 10, 11, 13); \ + macro(10, 11, 12, 14); \ + macro(11, 12, 13, 15); \ + macro(12, 13, 14, 16); \ + macro(13, 14, 15, 0); \ + macro(14, 15, 16, 1); \ + macro(15, 16, 0, 2); \ + macro(16, 0, 1, 3); \ + } while (0) + #define BUPDATE1(n0, n2) do { \ + sc->buffer[ptr24][n0] ^= sc->buffer[ptr31][n2]; \ + sc->buffer[ptr31][n2] ^= INW1(n2); \ + } while (0) + #define BUPDATE do { \ + BUPDATE1(0, 2); \ + BUPDATE1(1, 3); \ + BUPDATE1(2, 4); \ + BUPDATE1(3, 5); \ + BUPDATE1(4, 6); \ + BUPDATE1(5, 7); \ + BUPDATE1(6, 0); \ + BUPDATE1(7, 1); \ + } while (0) + #define RSTATE(n0, n1, n2, n4) (a ## n0 = sc->state[n0]) + #define WSTATE(n0, n1, n2, n4) (sc->state[n0] = a ## n0) + #define GAMMA(n0, n1, n2, n4) \ + (g ## n0 = a ## n0 ^ (a ## n1 | SPH_T32(~a ## n2))) + #define PI_ALL do { \ + p0 = g0; \ + p1 = SPH_ROTL32( g7, 1); \ + p2 = SPH_ROTL32(g14, 3); \ + p3 = SPH_ROTL32( g4, 6); \ + p4 = SPH_ROTL32(g11, 10); \ + p5 = SPH_ROTL32( g1, 15); \ + p6 = SPH_ROTL32( g8, 21); \ + p7 = SPH_ROTL32(g15, 28); \ + p8 = SPH_ROTL32( g5, 4); \ + p9 = SPH_ROTL32(g12, 13); \ + p10 = SPH_ROTL32( g2, 23); \ + p11 = SPH_ROTL32( g9, 2); \ + p12 = SPH_ROTL32(g16, 14); \ + p13 = SPH_ROTL32( g6, 27); \ + p14 = SPH_ROTL32(g13, 9); \ + p15 = SPH_ROTL32( g3, 24); \ + p16 = SPH_ROTL32(g10, 8); \ + } while (0) + #define THETA(n0, n1, n2, n4) \ + (t ## n0 = p ## n0 ^ p ## n1 ^ p ## n4) + #define SIGMA_ALL do { \ + a0 = t0 ^ 1; \ + a1 = t1 ^ INW2(0); \ + a2 = t2 ^ INW2(1); \ + a3 = t3 ^ INW2(2); \ + a4 = t4 ^ INW2(3); \ + a5 = t5 ^ INW2(4); \ + a6 = t6 ^ INW2(5); \ + a7 = t7 ^ INW2(6); \ + a8 = t8 ^ INW2(7); \ + a9 = t9 ^ sc->buffer[ptr16][0]; \ + a10 = t10 ^ sc->buffer[ptr16][1]; \ + a11 = t11 ^ sc->buffer[ptr16][2]; \ + a12 = t12 ^ sc->buffer[ptr16][3]; \ + a13 = t13 ^ sc->buffer[ptr16][4]; \ + a14 = t14 ^ sc->buffer[ptr16][5]; \ + a15 = t15 ^ sc->buffer[ptr16][6]; \ + a16 = t16 ^ sc->buffer[ptr16][7]; \ + } while (0) + #define PANAMA_STEP do { \ + unsigned ptr16, ptr24, ptr31; \ + \ + ptr24 = (ptr0 - 8) & 31; \ + ptr31 = (ptr0 - 1) & 31; \ + BUPDATE; \ + M17(GAMMA); \ + PI_ALL; \ + M17(THETA); \ + ptr16 = ptr0 ^ 16; \ + SIGMA_ALL; \ + ptr0 = ptr31; \ + } while (0) + /* + * These macros are used to compute + */ +#define INC0 1 +#define INC1 2 +#define INC2 3 +#define INC3 4 +#define INC4 5 +#define INC5 6 +#define INC6 7 +#define INC7 8 + /* + * Push data by blocks of 32 bytes. "pbuf" must be 32-bit aligned. Each + * iteration processes 32 data bytes; "num" contains the number of + * iterations. + */ +static void +panama_push(sph_panama_context *sc, const unsigned char *pbuf, size_t num) +{ + LVARS + unsigned ptr0; +#if SPH_LITTLE_FAST +#define INW1(i) sph_dec32le_aligned(pbuf + 4 * (i)) +#else + sph_u32 X_var[8]; +#define INW1(i) X_var[i] +#endif +#define INW2(i) INW1(i) + M17(RSTATE); + ptr0 = sc->buffer_ptr; + while (num -- > 0) { +#if !SPH_LITTLE_FAST + int i; + for (i = 0; i < 8; i ++) + X_var[i] = sph_dec32le_aligned(pbuf + 4 * (i)); +#endif + PANAMA_STEP; + pbuf = (const unsigned char *)pbuf + 32; + } + M17(WSTATE); + sc->buffer_ptr = ptr0; + #undef INW1 +#undef INW2 +} + /* + * Perform the "pull" operation repeatedly ("num" times). The hash output + * will be extracted from the state afterwards. + */ +static void +panama_pull(sph_panama_context *sc, unsigned num) +{ + LVARS + unsigned ptr0; +#define INW1(i) INW_H1(INC ## i) +#define INW_H1(i) INW_H2(i) +#define INW_H2(i) a ## i +#define INW2(i) sc->buffer[ptr4][i] + M17(RSTATE); + ptr0 = sc->buffer_ptr; + while (num -- > 0) { + unsigned ptr4; + ptr4 = (ptr0 + 4) & 31; + PANAMA_STEP; + } + M17(WSTATE); + #undef INW1 +#undef INW_H1 +#undef INW_H2 +#undef INW2 +} + /* see sph_panama.h */ +void +sph_panama_init(void *cc) +{ + sph_panama_context *sc; + sc = cc; + /* + * This is not completely conformant, but "it will work + * everywhere". Initial state consists of zeroes everywhere. + * Conceptually, the sph_u32 type may have padding bits which + * must not be set to 0; but such an architecture remains to + * be seen. + */ + sc->data_ptr = 0; + memset(sc->buffer, 0, sizeof sc->buffer); + sc->buffer_ptr = 0; + memset(sc->state, 0, sizeof sc->state); +} + #ifdef SPH_UPTR +static void +panama_short(void *cc, const void *data, size_t len) +#else +void +sph_panama(void *cc, const void *data, size_t len) +#endif +{ + sph_panama_context *sc; + unsigned current; + sc = cc; + current = sc->data_ptr; + while (len > 0) { + unsigned clen; + clen = (sizeof sc->data) - current; + if (clen > len) + clen = len; + memcpy(sc->data + current, data, clen); + data = (const unsigned char *)data + clen; + len -= clen; + current += clen; + if (current == sizeof sc->data) { + current = 0; + panama_push(sc, sc->data, 1); + } + } + sc->data_ptr = current; +} + #ifdef SPH_UPTR +/* see sph_panama.h */ +void +sph_panama(void *cc, const void *data, size_t len) +{ + sph_panama_context *sc; + unsigned current; + size_t rlen; + if (len < (2 * sizeof sc->data)) { + panama_short(cc, data, len); + return; + } + sc = cc; + current = sc->data_ptr; + if (current > 0) { + unsigned t; + t = (sizeof sc->data) - current; + panama_short(sc, data, t); + data = (const unsigned char *)data + t; + len -= t; + } +#if !SPH_UNALIGNED + if (((SPH_UPTR)data & 3) != 0) { + panama_short(sc, data, len); + return; + } +#endif + panama_push(sc, data, len >> 5); + rlen = len & 31; + if (rlen > 0) + memcpy(sc->data, + (const unsigned char *)data + len - rlen, rlen); + sc->data_ptr = rlen; +} +#endif + /* see sph_panama.h */ +void +sph_panama_close(void *cc, void *dst) +{ + sph_panama_context *sc; + unsigned current; + int i; + sc = cc; + current = sc->data_ptr; + sc->data[current ++] = 0x01; + memset(sc->data + current, 0, (sizeof sc->data) - current); + panama_push(sc, sc->data, 1); + panama_pull(sc, 32); + for (i = 0; i < 8; i ++) + sph_enc32le((unsigned char *)dst + 4 * i, sc->state[i + 9]); + sph_panama_init(sc); +} From 6a8eb309c65ee6f6309a6ca20e65a9507a0deea8 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:24:40 -0500 Subject: [PATCH 122/576] Create sph_panama.h --- stratum/sha3/sph_panama.h | 108 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 stratum/sha3/sph_panama.h diff --git a/stratum/sha3/sph_panama.h b/stratum/sha3/sph_panama.h new file mode 100644 index 000000000..ab44cece8 --- /dev/null +++ b/stratum/sha3/sph_panama.h @@ -0,0 +1,108 @@ +/* $Id: sph_panama.h 154 2010-04-26 17:00:24Z tp $ */ +/** + * PANAMA interface. + * + * PANAMA has been published in: J. Daemen and C. Clapp, "Fast Hashing + * and Stream Encryption with PANAMA", Fast Software Encryption - + * FSE'98, LNCS 1372, Springer (1998), pp. 60--74. + * + * PANAMA is not fully defined with regards to endianness and related + * topics. This implementation follows strict little-endian conventions: + *
      + *
    • Each 32-byte input block is split into eight 32-bit words, the + * first (leftmost) word being numbered 0.
    • + *
    • Each such 32-bit word is decoded from memory in little-endian + * convention.
    • + *
    • The additional padding bit equal to "1" is added by considering + * the least significant bit in a byte to come first; practically, this + * means that a single byte of value 0x01 is appended to the (byte-oriented) + * message, and then 0 to 31 bytes of value 0x00.
    • + *
    • The output consists of eight 32-bit words; the word numbered 0 is + * written first (in leftmost position) and it is encoded in little-endian + * convention. + *
    + * With these conventions, PANAMA is sometimes known as "PANAMA-LE". The + * PANAMA reference implementation uses our conventions for input, but + * prescribes no convention for output. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @file sph_panama.h + * @author Thomas Pornin + */ + #ifndef SPH_PANAMA_H__ +#define SPH_PANAMA_H__ + #include +#include "sph_types.h" + /** + * Output size (in bits) for PANAMA. + */ +#define SPH_SIZE_panama 256 + /** + * This structure is a context for PANAMA computations: it contains the + * intermediate values and some data from the last entered block. Once + * a PANAMA computation has been performed, the context can be reused for + * another computation. + * + * The contents of this structure are private. A running PANAMA computation + * can be cloned by copying the context (e.g. with a simple + * memcpy()). + */ +typedef struct { +#ifndef DOXYGEN_IGNORE + unsigned char data[32]; /* first field, for alignment */ + unsigned data_ptr; + sph_u32 buffer[32][8]; + unsigned buffer_ptr; + sph_u32 state[17]; +#endif +} sph_panama_context; + /** + * Initialize a PANAMA context. This process performs no memory allocation. + * + * @param cc the PANAMA context (pointer to a sph_panama_context) + */ +void sph_panama_init(void *cc); + /** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the PANAMA context + * @param data the input data + * @param len the input data length (in bytes) + */ +void sph_panama(void *cc, const void *data, size_t len); + /** + * Terminate the current PANAMA computation and output the result into the + * provided buffer. The destination buffer must be wide enough to + * accomodate the result (32 bytes). The context is automatically + * reinitialized. + * + * @param cc the PANAMA context + * @param dst the destination buffer + */ +void sph_panama_close(void *cc, void *dst); + #endif From a0d0ede5a389ba664751ba6d5f23b83225cba296 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:24:58 -0500 Subject: [PATCH 123/576] Create sph_radiogatun.c --- stratum/sha3/sph_radiogatun.c | 907 ++++++++++++++++++++++++++++++++++ 1 file changed, 907 insertions(+) create mode 100644 stratum/sha3/sph_radiogatun.c diff --git a/stratum/sha3/sph_radiogatun.c b/stratum/sha3/sph_radiogatun.c new file mode 100644 index 000000000..b5f2771e7 --- /dev/null +++ b/stratum/sha3/sph_radiogatun.c @@ -0,0 +1,907 @@ +/* $Id: radiogatun.c 226 2010-06-16 17:28:08Z tp $ */ +/* + * RadioGatun implementation. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @author Thomas Pornin + */ + #include +#include + #include "sph_radiogatun.h" + #if SPH_SMALL_FOOTPRINT && !defined SPH_SMALL_FOOTPRINT_RADIOGATUN +#define SPH_SMALL_FOOTPRINT_RADIOGATUN 1 +#endif + /* ======================================================================= */ +/* + * The core macros. We want to unroll 13 successive rounds so that the + * belt rotation becomes pure routing, solved at compilation time, with + * no unnecessary copying. We also wish all state variables to be + * independant local variables, so that the C compiler becomes free to + * map these on registers at it sees fit. This requires some heavy + * preprocessor trickeries, including a full addition macro modulo 13. + * + * These macros are size-independent. Some macros must be defined before + * use: + * WT evaluates to the type for a word (32-bit or 64-bit) + * T truncates a value to the proper word size + * ROR(x, n) right rotation of a word x, with explicit modular + * reduction of the rotation count n by the word size + * INW(i, j) input word j (0, 1, or 2) of block i (0 to 12) + * + * For INW, the input buffer is pointed to by "buf" which has type + * "const unsigned char *". + */ + #define MUL19(action) do { \ + action(0); \ + action(1); \ + action(2); \ + action(3); \ + action(4); \ + action(5); \ + action(6); \ + action(7); \ + action(8); \ + action(9); \ + action(10); \ + action(11); \ + action(12); \ + action(13); \ + action(14); \ + action(15); \ + action(16); \ + action(17); \ + action(18); \ + } while (0) + #define DECL19(b) b ## 0, b ## 1, b ## 2, b ## 3, b ## 4, b ## 5, \ + b ## 6, b ## 7, b ## 8, b ## 9, b ## 10, b ## 11, \ + b ## 12, b ## 13, b ## 14, b ## 15, b ## 16, \ + b ## 17, b ## 18 + #define M19_T7(i) M19_T7_(i) +#define M19_T7_(i) M19_T7_ ## i +#define M19_T7_0 0 +#define M19_T7_1 7 +#define M19_T7_2 14 +#define M19_T7_3 2 +#define M19_T7_4 9 +#define M19_T7_5 16 +#define M19_T7_6 4 +#define M19_T7_7 11 +#define M19_T7_8 18 +#define M19_T7_9 6 +#define M19_T7_10 13 +#define M19_T7_11 1 +#define M19_T7_12 8 +#define M19_T7_13 15 +#define M19_T7_14 3 +#define M19_T7_15 10 +#define M19_T7_16 17 +#define M19_T7_17 5 +#define M19_T7_18 12 + #define M19_A1(i) M19_A1_(i) +#define M19_A1_(i) M19_A1_ ## i +#define M19_A1_0 1 +#define M19_A1_1 2 +#define M19_A1_2 3 +#define M19_A1_3 4 +#define M19_A1_4 5 +#define M19_A1_5 6 +#define M19_A1_6 7 +#define M19_A1_7 8 +#define M19_A1_8 9 +#define M19_A1_9 10 +#define M19_A1_10 11 +#define M19_A1_11 12 +#define M19_A1_12 13 +#define M19_A1_13 14 +#define M19_A1_14 15 +#define M19_A1_15 16 +#define M19_A1_16 17 +#define M19_A1_17 18 +#define M19_A1_18 0 + #define M19_A2(i) M19_A2_(i) +#define M19_A2_(i) M19_A2_ ## i +#define M19_A2_0 2 +#define M19_A2_1 3 +#define M19_A2_2 4 +#define M19_A2_3 5 +#define M19_A2_4 6 +#define M19_A2_5 7 +#define M19_A2_6 8 +#define M19_A2_7 9 +#define M19_A2_8 10 +#define M19_A2_9 11 +#define M19_A2_10 12 +#define M19_A2_11 13 +#define M19_A2_12 14 +#define M19_A2_13 15 +#define M19_A2_14 16 +#define M19_A2_15 17 +#define M19_A2_16 18 +#define M19_A2_17 0 +#define M19_A2_18 1 + #define M19_A4(i) M19_A4_(i) +#define M19_A4_(i) M19_A4_ ## i +#define M19_A4_0 4 +#define M19_A4_1 5 +#define M19_A4_2 6 +#define M19_A4_3 7 +#define M19_A4_4 8 +#define M19_A4_5 9 +#define M19_A4_6 10 +#define M19_A4_7 11 +#define M19_A4_8 12 +#define M19_A4_9 13 +#define M19_A4_10 14 +#define M19_A4_11 15 +#define M19_A4_12 16 +#define M19_A4_13 17 +#define M19_A4_14 18 +#define M19_A4_15 0 +#define M19_A4_16 1 +#define M19_A4_17 2 +#define M19_A4_18 3 + #define ACC_a(i) ACC_a_(i) +#define ACC_a_(i) a ## i +#define ACC_atmp(i) ACC_atmp_(i) +#define ACC_atmp_(i) atmp ## i + #define MILL1(i) (atmp ## i = a ## i ^ T(ACC_a(M19_A1(i)) \ + | ~ACC_a(M19_A2(i)))) +#define MILL2(i) (a ## i = ROR(ACC_atmp(M19_T7(i)), ((i * (i + 1)) >> 1))) +#define MILL3(i) (atmp ## i = a ## i ^ ACC_a(M19_A1(i)) ^ ACC_a(M19_A4(i))) +#define MILL4(i) (a ## i = atmp ## i ^ (i == 0)) + #define MILL do { \ + WT DECL19(atmp); \ + MUL19(MILL1); \ + MUL19(MILL2); \ + MUL19(MILL3); \ + MUL19(MILL4); \ + } while (0) + #define DECL13(b) b ## 0 ## _0, b ## 0 ## _1, b ## 0 ## _2, \ + b ## 1 ## _0, b ## 1 ## _1, b ## 1 ## _2, \ + b ## 2 ## _0, b ## 2 ## _1, b ## 2 ## _2, \ + b ## 3 ## _0, b ## 3 ## _1, b ## 3 ## _2, \ + b ## 4 ## _0, b ## 4 ## _1, b ## 4 ## _2, \ + b ## 5 ## _0, b ## 5 ## _1, b ## 5 ## _2, \ + b ## 6 ## _0, b ## 6 ## _1, b ## 6 ## _2, \ + b ## 7 ## _0, b ## 7 ## _1, b ## 7 ## _2, \ + b ## 8 ## _0, b ## 8 ## _1, b ## 8 ## _2, \ + b ## 9 ## _0, b ## 9 ## _1, b ## 9 ## _2, \ + b ## 10 ## _0, b ## 10 ## _1, b ## 10 ## _2, \ + b ## 11 ## _0, b ## 11 ## _1, b ## 11 ## _2, \ + b ## 12 ## _0, b ## 12 ## _1, b ## 12 ## _2 + #define M13_A(i, j) M13_A_(i, j) +#define M13_A_(i, j) M13_A_ ## i ## _ ## j +#define M13_A_0_0 0 +#define M13_A_0_1 1 +#define M13_A_0_2 2 +#define M13_A_0_3 3 +#define M13_A_0_4 4 +#define M13_A_0_5 5 +#define M13_A_0_6 6 +#define M13_A_0_7 7 +#define M13_A_0_8 8 +#define M13_A_0_9 9 +#define M13_A_0_10 10 +#define M13_A_0_11 11 +#define M13_A_0_12 12 +#define M13_A_1_0 1 +#define M13_A_1_1 2 +#define M13_A_1_2 3 +#define M13_A_1_3 4 +#define M13_A_1_4 5 +#define M13_A_1_5 6 +#define M13_A_1_6 7 +#define M13_A_1_7 8 +#define M13_A_1_8 9 +#define M13_A_1_9 10 +#define M13_A_1_10 11 +#define M13_A_1_11 12 +#define M13_A_1_12 0 +#define M13_A_2_0 2 +#define M13_A_2_1 3 +#define M13_A_2_2 4 +#define M13_A_2_3 5 +#define M13_A_2_4 6 +#define M13_A_2_5 7 +#define M13_A_2_6 8 +#define M13_A_2_7 9 +#define M13_A_2_8 10 +#define M13_A_2_9 11 +#define M13_A_2_10 12 +#define M13_A_2_11 0 +#define M13_A_2_12 1 +#define M13_A_3_0 3 +#define M13_A_3_1 4 +#define M13_A_3_2 5 +#define M13_A_3_3 6 +#define M13_A_3_4 7 +#define M13_A_3_5 8 +#define M13_A_3_6 9 +#define M13_A_3_7 10 +#define M13_A_3_8 11 +#define M13_A_3_9 12 +#define M13_A_3_10 0 +#define M13_A_3_11 1 +#define M13_A_3_12 2 +#define M13_A_4_0 4 +#define M13_A_4_1 5 +#define M13_A_4_2 6 +#define M13_A_4_3 7 +#define M13_A_4_4 8 +#define M13_A_4_5 9 +#define M13_A_4_6 10 +#define M13_A_4_7 11 +#define M13_A_4_8 12 +#define M13_A_4_9 0 +#define M13_A_4_10 1 +#define M13_A_4_11 2 +#define M13_A_4_12 3 +#define M13_A_5_0 5 +#define M13_A_5_1 6 +#define M13_A_5_2 7 +#define M13_A_5_3 8 +#define M13_A_5_4 9 +#define M13_A_5_5 10 +#define M13_A_5_6 11 +#define M13_A_5_7 12 +#define M13_A_5_8 0 +#define M13_A_5_9 1 +#define M13_A_5_10 2 +#define M13_A_5_11 3 +#define M13_A_5_12 4 +#define M13_A_6_0 6 +#define M13_A_6_1 7 +#define M13_A_6_2 8 +#define M13_A_6_3 9 +#define M13_A_6_4 10 +#define M13_A_6_5 11 +#define M13_A_6_6 12 +#define M13_A_6_7 0 +#define M13_A_6_8 1 +#define M13_A_6_9 2 +#define M13_A_6_10 3 +#define M13_A_6_11 4 +#define M13_A_6_12 5 +#define M13_A_7_0 7 +#define M13_A_7_1 8 +#define M13_A_7_2 9 +#define M13_A_7_3 10 +#define M13_A_7_4 11 +#define M13_A_7_5 12 +#define M13_A_7_6 0 +#define M13_A_7_7 1 +#define M13_A_7_8 2 +#define M13_A_7_9 3 +#define M13_A_7_10 4 +#define M13_A_7_11 5 +#define M13_A_7_12 6 +#define M13_A_8_0 8 +#define M13_A_8_1 9 +#define M13_A_8_2 10 +#define M13_A_8_3 11 +#define M13_A_8_4 12 +#define M13_A_8_5 0 +#define M13_A_8_6 1 +#define M13_A_8_7 2 +#define M13_A_8_8 3 +#define M13_A_8_9 4 +#define M13_A_8_10 5 +#define M13_A_8_11 6 +#define M13_A_8_12 7 +#define M13_A_9_0 9 +#define M13_A_9_1 10 +#define M13_A_9_2 11 +#define M13_A_9_3 12 +#define M13_A_9_4 0 +#define M13_A_9_5 1 +#define M13_A_9_6 2 +#define M13_A_9_7 3 +#define M13_A_9_8 4 +#define M13_A_9_9 5 +#define M13_A_9_10 6 +#define M13_A_9_11 7 +#define M13_A_9_12 8 +#define M13_A_10_0 10 +#define M13_A_10_1 11 +#define M13_A_10_2 12 +#define M13_A_10_3 0 +#define M13_A_10_4 1 +#define M13_A_10_5 2 +#define M13_A_10_6 3 +#define M13_A_10_7 4 +#define M13_A_10_8 5 +#define M13_A_10_9 6 +#define M13_A_10_10 7 +#define M13_A_10_11 8 +#define M13_A_10_12 9 +#define M13_A_11_0 11 +#define M13_A_11_1 12 +#define M13_A_11_2 0 +#define M13_A_11_3 1 +#define M13_A_11_4 2 +#define M13_A_11_5 3 +#define M13_A_11_6 4 +#define M13_A_11_7 5 +#define M13_A_11_8 6 +#define M13_A_11_9 7 +#define M13_A_11_10 8 +#define M13_A_11_11 9 +#define M13_A_11_12 10 +#define M13_A_12_0 12 +#define M13_A_12_1 0 +#define M13_A_12_2 1 +#define M13_A_12_3 2 +#define M13_A_12_4 3 +#define M13_A_12_5 4 +#define M13_A_12_6 5 +#define M13_A_12_7 6 +#define M13_A_12_8 7 +#define M13_A_12_9 8 +#define M13_A_12_10 9 +#define M13_A_12_11 10 +#define M13_A_12_12 11 + #define M13_N(i) M13_N_(i) +#define M13_N_(i) M13_N_ ## i +#define M13_N_0 12 +#define M13_N_1 11 +#define M13_N_2 10 +#define M13_N_3 9 +#define M13_N_4 8 +#define M13_N_5 7 +#define M13_N_6 6 +#define M13_N_7 5 +#define M13_N_8 4 +#define M13_N_9 3 +#define M13_N_10 2 +#define M13_N_11 1 +#define M13_N_12 0 + #define ACC_b(i, k) ACC_b_(i, k) +#define ACC_b_(i, k) b ## i ## _ ## k + #define ROUND_ELT(k, s) do { \ + if ((bj += 3) == 39) \ + bj = 0; \ + sc->b[bj + s] ^= a ## k; \ + } while (0) + #define ROUND_SF(j) do { \ + size_t bj = (j) * 3; \ + ROUND_ELT(1, 0); \ + ROUND_ELT(2, 1); \ + ROUND_ELT(3, 2); \ + ROUND_ELT(4, 0); \ + ROUND_ELT(5, 1); \ + ROUND_ELT(6, 2); \ + ROUND_ELT(7, 0); \ + ROUND_ELT(8, 1); \ + ROUND_ELT(9, 2); \ + ROUND_ELT(10, 0); \ + ROUND_ELT(11, 1); \ + ROUND_ELT(12, 2); \ + MILL; \ + bj = (j) * 3; \ + a ## 13 ^= sc->b[bj + 0]; \ + a ## 14 ^= sc->b[bj + 1]; \ + a ## 15 ^= sc->b[bj + 2]; \ + } while (0) + #define INPUT_SF(j, p0, p1, p2) do { \ + size_t bj = ((j) + 1) * 3; \ + if (bj == 39) \ + bj = 0; \ + sc->b[bj + 0] ^= (p0); \ + sc->b[bj + 1] ^= (p1); \ + sc->b[bj + 2] ^= (p2); \ + a16 ^= (p0); \ + a17 ^= (p1); \ + a18 ^= (p2); \ + } while (0) + #if SPH_SMALL_FOOTPRINT_RADIOGATUN + #define ROUND ROUND_SF +#define INPUT INPUT_SF + #else + /* + * Round function R, on base j. The value j is such that B[0] is actually + * b[j] after the initial rotation. On the 13-round macro, j has the + * successive values 12, 11, 10... 1, 0. + */ +#define ROUND(j) do { \ + ACC_b(M13_A(1, j), 0) ^= a ## 1; \ + ACC_b(M13_A(2, j), 1) ^= a ## 2; \ + ACC_b(M13_A(3, j), 2) ^= a ## 3; \ + ACC_b(M13_A(4, j), 0) ^= a ## 4; \ + ACC_b(M13_A(5, j), 1) ^= a ## 5; \ + ACC_b(M13_A(6, j), 2) ^= a ## 6; \ + ACC_b(M13_A(7, j), 0) ^= a ## 7; \ + ACC_b(M13_A(8, j), 1) ^= a ## 8; \ + ACC_b(M13_A(9, j), 2) ^= a ## 9; \ + ACC_b(M13_A(10, j), 0) ^= a ## 10; \ + ACC_b(M13_A(11, j), 1) ^= a ## 11; \ + ACC_b(M13_A(12, j), 2) ^= a ## 12; \ + MILL; \ + a ## 13 ^= ACC_b(j, 0); \ + a ## 14 ^= ACC_b(j, 1); \ + a ## 15 ^= ACC_b(j, 2); \ + } while (0) + #define INPUT(j, p0, p1, p2) do { \ + ACC_b(M13_A(1, j), 0) ^= (p0); \ + ACC_b(M13_A(1, j), 1) ^= (p1); \ + ACC_b(M13_A(1, j), 2) ^= (p2); \ + a16 ^= (p0); \ + a17 ^= (p1); \ + a18 ^= (p2); \ + } while (0) + #endif + #define MUL13(action) do { \ + action(0); \ + action(1); \ + action(2); \ + action(3); \ + action(4); \ + action(5); \ + action(6); \ + action(7); \ + action(8); \ + action(9); \ + action(10); \ + action(11); \ + action(12); \ + } while (0) + #define MILL_READ_ELT(i) do { \ + a ## i = sc->a[i]; \ + } while (0) + #define MILL_WRITE_ELT(i) do { \ + sc->a[i] = a ## i; \ + } while (0) + #define STATE_READ_SF do { \ + MUL19(MILL_READ_ELT); \ + } while (0) + #define STATE_WRITE_SF do { \ + MUL19(MILL_WRITE_ELT); \ + } while (0) + #define PUSH13_SF do { \ + WT DECL19(a); \ + const unsigned char *buf; \ + \ + buf = data; \ + STATE_READ_SF; \ + while (len >= sizeof sc->data) { \ + size_t mk; \ + for (mk = 13; mk > 0; mk --) { \ + WT p0 = INW(0, 0); \ + WT p1 = INW(0, 1); \ + WT p2 = INW(0, 2); \ + INPUT_SF(mk - 1, p0, p1, p2); \ + ROUND_SF(mk - 1); \ + buf += (sizeof sc->data) / 13; \ + len -= (sizeof sc->data) / 13; \ + } \ + } \ + STATE_WRITE_SF; \ + return len; \ + } while (0) + #if SPH_SMALL_FOOTPRINT_RADIOGATUN + #define STATE_READ STATE_READ_SF +#define STATE_WRITE STATE_WRITE_SF +#define PUSH13 PUSH13_SF + #else + #define BELT_READ_ELT(i) do { \ + b ## i ## _0 = sc->b[3 * i + 0]; \ + b ## i ## _1 = sc->b[3 * i + 1]; \ + b ## i ## _2 = sc->b[3 * i + 2]; \ + } while (0) + #define BELT_WRITE_ELT(i) do { \ + sc->b[3 * i + 0] = b ## i ## _0; \ + sc->b[3 * i + 1] = b ## i ## _1; \ + sc->b[3 * i + 2] = b ## i ## _2; \ + } while (0) + #define STATE_READ do { \ + MUL13(BELT_READ_ELT); \ + MUL19(MILL_READ_ELT); \ + } while (0) + #define STATE_WRITE do { \ + MUL13(BELT_WRITE_ELT); \ + MUL19(MILL_WRITE_ELT); \ + } while (0) + /* + * Input data by chunks of 13*3 blocks. This is the body of the + * radiogatun32_push13() and radiogatun64_push13() functions. + */ +#define PUSH13 do { \ + WT DECL19(a), DECL13(b); \ + const unsigned char *buf; \ + \ + buf = data; \ + STATE_READ; \ + while (len >= sizeof sc->data) { \ + WT p0, p1, p2; \ + MUL13(PUSH13_ELT); \ + buf += sizeof sc->data; \ + len -= sizeof sc->data; \ + } \ + STATE_WRITE; \ + return len; \ + } while (0) + #define PUSH13_ELT(k) do { \ + p0 = INW(k, 0); \ + p1 = INW(k, 1); \ + p2 = INW(k, 2); \ + INPUT(M13_N(k), p0, p1, p2); \ + ROUND(M13_N(k)); \ + } while (0) + #endif + #define BLANK13_SF do { \ + size_t mk = 13; \ + while (mk -- > 0) \ + ROUND_SF(mk); \ + } while (0) + #define BLANK1_SF do { \ + WT tmp0, tmp1, tmp2; \ + ROUND_SF(12); \ + tmp0 = sc->b[36]; \ + tmp1 = sc->b[37]; \ + tmp2 = sc->b[38]; \ + memmove(sc->b + 3, sc->b, 36 * sizeof sc->b[0]); \ + sc->b[0] = tmp0; \ + sc->b[1] = tmp1; \ + sc->b[2] = tmp2; \ + } while (0) + #if SPH_SMALL_FOOTPRINT_RADIOGATUN + #define BLANK13 BLANK13_SF +#define BLANK1 BLANK1_SF + #else + /* + * Run 13 blank rounds. This macro expects the "a" and "b" state variables + * to be alread declared. + */ +#define BLANK13 MUL13(BLANK13_ELT) + #define BLANK13_ELT(k) ROUND(M13_N(k)) + #define MUL12(action) do { \ + action(0); \ + action(1); \ + action(2); \ + action(3); \ + action(4); \ + action(5); \ + action(6); \ + action(7); \ + action(8); \ + action(9); \ + action(10); \ + action(11); \ + } while (0) + /* + * Run a single blank round, and physically rotate the belt. This is used + * for the last blank rounds, and the output rounds. This macro expects the + * "a" abd "b" state variables to be already declared. + */ +#define BLANK1 do { \ + WT tmp0, tmp1, tmp2; \ + ROUND(12); \ + tmp0 = b0_0; \ + tmp1 = b0_1; \ + tmp2 = b0_2; \ + MUL12(BLANK1_ELT); \ + b1_0 = tmp0; \ + b1_1 = tmp1; \ + b1_2 = tmp2; \ + } while (0) + #define BLANK1_ELT(i) do { \ + ACC_b(M13_A(M13_N(i), 1), 0) = ACC_b(M13_N(i), 0); \ + ACC_b(M13_A(M13_N(i), 1), 1) = ACC_b(M13_N(i), 1); \ + ACC_b(M13_A(M13_N(i), 1), 2) = ACC_b(M13_N(i), 2); \ + } while (0) + #endif + #define NO_TOKEN + /* + * Perform padding, then blank rounds, then output some words. This is + * the body of sph_radiogatun32_close() and sph_radiogatun64_close(). + */ +#define CLOSE_SF(width) CLOSE_GEN(width, \ + NO_TOKEN, STATE_READ_SF, BLANK1_SF, BLANK13_SF) + #if SPH_SMALL_FOOTPRINT_RADIOGATUN +#define CLOSE CLOSE_SF +#else +#define CLOSE(width) CLOSE_GEN(width, \ + WT DECL13(b);, STATE_READ, BLANK1, BLANK13) +#endif + #define CLOSE_GEN(width, WTb13, state_read, blank1, blank13) do { \ + unsigned ptr, num; \ + unsigned char *out; \ + WT DECL19(a); \ + WTb13 \ + \ + ptr = sc->data_ptr; \ + sc->data[ptr ++] = 0x01; \ + memset(sc->data + ptr, 0, (sizeof sc->data) - ptr); \ + radiogatun ## width ## _push13(sc, sc->data, sizeof sc->data); \ + \ + num = 17; \ + for (;;) { \ + ptr += 3 * (width >> 3); \ + if (ptr > sizeof sc->data) \ + break; \ + num --; \ + } \ + \ + state_read; \ + if (num >= 13) { \ + blank13; \ + num -= 13; \ + } \ + while (num -- > 0) \ + blank1; \ + \ + num = 0; \ + out = dst; \ + for (;;) { \ + OUTW(out, a1); \ + out += width >> 3; \ + OUTW(out, a2); \ + out += width >> 3; \ + num += 2 * (width >> 3); \ + if (num >= 32) \ + break; \ + blank1; \ + } \ + INIT; \ + } while (0) + /* + * Initialize context structure. + */ +#if SPH_LITTLE_ENDIAN || SPH_BIG_ENDIAN + #define INIT do { \ + memset(sc->a, 0, sizeof sc->a); \ + memset(sc->b, 0, sizeof sc->b); \ + sc->data_ptr = 0; \ + } while (0) + #else + #define INIT do { \ + size_t u; \ + for (u = 0; u < 19; u ++) \ + sc->a[u] = 0; \ + for (u = 0; u < 39; u ++) \ + sc->b[u] = 0; \ + sc->data_ptr = 0; \ + } while (0) + #endif + /* ======================================================================= */ +/* + * RadioGatun[32]. + */ + #if !SPH_NO_RG32 + #undef WT +#define WT sph_u32 +#undef T +#define T SPH_T32 +#undef ROR +#define ROR(x, n) SPH_T32(((x) << ((32 - (n)) & 31)) | ((x) >> ((n) & 31))) +#undef INW +#define INW(i, j) sph_dec32le_aligned(buf + (4 * (3 * (i) + (j)))) +#undef OUTW +#define OUTW(b, v) sph_enc32le(b, v) + /* + * Insert data by big chunks of 13*12 = 156 bytes. Returned value is the + * number of remaining bytes (between 0 and 155). This method assumes that + * the input data is suitably aligned. + */ +static size_t +radiogatun32_push13(sph_radiogatun32_context *sc, const void *data, size_t len) +{ + PUSH13; +} + /* see sph_radiogatun.h */ +void +sph_radiogatun32_init(void *cc) +{ + sph_radiogatun32_context *sc; + sc = cc; + INIT; +} + #ifdef SPH_UPTR +static void +radiogatun32_short(void *cc, const void *data, size_t len) +#else +/* see sph_radiogatun.h */ +void +sph_radiogatun32(void *cc, const void *data, size_t len) +#endif +{ + sph_radiogatun32_context *sc; + unsigned ptr; + sc = cc; + ptr = sc->data_ptr; + while (len > 0) { + size_t clen; + clen = (sizeof sc->data) - ptr; + if (clen > len) + clen = len; + memcpy(sc->data + ptr, data, clen); + data = (const unsigned char *)data + clen; + len -= clen; + ptr += clen; + if (ptr == sizeof sc->data) { + radiogatun32_push13(sc, sc->data, sizeof sc->data); + ptr = 0; + } + } + sc->data_ptr = ptr; +} + #ifdef SPH_UPTR +/* see sph_radiogatun.h */ +void +sph_radiogatun32(void *cc, const void *data, size_t len) +{ + sph_radiogatun32_context *sc; + unsigned ptr; + size_t rlen; + if (len < (2 * sizeof sc->data)) { + radiogatun32_short(cc, data, len); + return; + } + sc = cc; + ptr = sc->data_ptr; + if (ptr > 0) { + unsigned t; + t = (sizeof sc->data) - ptr; + radiogatun32_short(sc, data, t); + data = (const unsigned char *)data + t; + len -= t; + } +#if !SPH_UNALIGNED + if (((SPH_UPTR)data & 3) != 0) { + radiogatun32_short(sc, data, len); + return; + } +#endif + rlen = radiogatun32_push13(sc, data, len); + memcpy(sc->data, (const unsigned char *)data + len - rlen, rlen); + sc->data_ptr = rlen; +} +#endif + /* see sph_radiogatun.h */ +void +sph_radiogatun32_close(void *cc, void *dst) +{ + sph_radiogatun32_context *sc; + sc = cc; + CLOSE(32); +} + #endif + /* ======================================================================= */ +/* + * RadioGatun[64]. Compiled only if a 64-bit or more type is available. + */ + #if SPH_64 + #if !SPH_NO_RG64 + #undef WT +#define WT sph_u64 +#undef T +#define T SPH_T64 +#undef ROR +#define ROR(x, n) SPH_T64(((x) << ((64 - (n)) & 63)) | ((x) >> ((n) & 63))) +#undef INW +#define INW(i, j) sph_dec64le_aligned(buf + (8 * (3 * (i) + (j)))) +#undef OUTW +#define OUTW(b, v) sph_enc64le(b, v) + /* + * On 32-bit x86, register pressure is such that using the small + * footprint version is a net gain (x2 speed), because that variant + * uses fewer local variables. + */ +#if SPH_I386_MSVC || SPH_I386_GCC || defined __i386__ +#undef PUSH13 +#define PUSH13 PUSH13_SF +#undef CLOSE +#define CLOSE CLOSE_SF +#endif + /* + * Insert data by big chunks of 13*24 = 312 bytes. Returned value is the + * number of remaining bytes (between 0 and 311). This method assumes that + * the input data is suitably aligned. + */ +static size_t +radiogatun64_push13(sph_radiogatun64_context *sc, const void *data, size_t len) +{ + PUSH13; +} + /* see sph_radiogatun.h */ +void +sph_radiogatun64_init(void *cc) +{ + sph_radiogatun64_context *sc; + sc = cc; + INIT; +} + #ifdef SPH_UPTR +static void +radiogatun64_short(void *cc, const void *data, size_t len) +#else +/* see sph_radiogatun.h */ +void +sph_radiogatun64(void *cc, const void *data, size_t len) +#endif +{ + sph_radiogatun64_context *sc; + unsigned ptr; + sc = cc; + ptr = sc->data_ptr; + while (len > 0) { + size_t clen; + clen = (sizeof sc->data) - ptr; + if (clen > len) + clen = len; + memcpy(sc->data + ptr, data, clen); + data = (const unsigned char *)data + clen; + len -= clen; + ptr += clen; + if (ptr == sizeof sc->data) { + radiogatun64_push13(sc, sc->data, sizeof sc->data); + ptr = 0; + } + } + sc->data_ptr = ptr; +} + #ifdef SPH_UPTR +/* see sph_radiogatun.h */ +void +sph_radiogatun64(void *cc, const void *data, size_t len) +{ + sph_radiogatun64_context *sc; + unsigned ptr; + size_t rlen; + if (len < (2 * sizeof sc->data)) { + radiogatun64_short(cc, data, len); + return; + } + sc = cc; + ptr = sc->data_ptr; + if (ptr > 0) { + unsigned t; + t = (sizeof sc->data) - ptr; + radiogatun64_short(sc, data, t); + data = (const unsigned char *)data + t; + len -= t; + } +#if !SPH_UNALIGNED + if (((SPH_UPTR)data & 7) != 0) { + radiogatun64_short(sc, data, len); + return; + } +#endif + rlen = radiogatun64_push13(sc, data, len); + memcpy(sc->data, (const unsigned char *)data + len - rlen, rlen); + sc->data_ptr = rlen; +} +#endif + /* see sph_radiogatun.h */ +void +sph_radiogatun64_close(void *cc, void *dst) +{ + sph_radiogatun64_context *sc; + sc = cc; + CLOSE(64); +} + #endif + #endif From 7030efdd18c4f66ee056cd98ef89e8015d2d56be Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:25:18 -0500 Subject: [PATCH 124/576] Create sph_radiogatun.h --- stratum/sha3/sph_radiogatun.h | 171 ++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 stratum/sha3/sph_radiogatun.h diff --git a/stratum/sha3/sph_radiogatun.h b/stratum/sha3/sph_radiogatun.h new file mode 100644 index 000000000..b4e53494a --- /dev/null +++ b/stratum/sha3/sph_radiogatun.h @@ -0,0 +1,171 @@ +/* $Id: sph_radiogatun.h 226 2010-06-16 17:28:08Z tp $ */ +/** + * RadioGatun interface. + * + * RadioGatun has been published in: G. Bertoni, J. Daemen, M. Peeters + * and G. Van Assche, "RadioGatun, a belt-and-mill hash function", + * presented at the Second Cryptographic Hash Workshop, Santa Barbara, + * August 24-25, 2006. The main Web site, containing that article, the + * reference code and some test vectors, appears to be currently located + * at the following URL: http://radiogatun.noekeon.org/ + * + * The presentation article does not specify endianness or padding. The + * reference code uses the following conventions, which we also apply + * here: + *
      + *
    • The input message is an integral number of sequences of three + * words. Each word is either a 32-bit of 64-bit word (depending on + * the version of RadioGatun).
    • + *
    • Input bytes are decoded into words using little-endian + * convention.
    • + *
    • Padding consists of a single bit of value 1, using little-endian + * convention within bytes (i.e. for a byte-oriented input, a single + * byte of value 0x01 is appended), then enough bits of value 0 to finish + * the current block.
    • + *
    • Output consists of 256 bits. Successive output words are encoded + * with little-endian convention.
    • + *
    + * These conventions are very close to those we use for PANAMA, which is + * a close ancestor or RadioGatun. + * + * RadioGatun is actually a family of functions, depending on some + * internal parameters. We implement here two functions, with a "belt + * length" of 13, a "belt width" of 3, and a "mill length" of 19. The + * RadioGatun[32] version uses 32-bit words, while the RadioGatun[64] + * variant uses 64-bit words. + * + * Strictly speaking, the name "RadioGatun" should use an acute accent + * on the "u", which we omitted here to keep strict ASCII-compatibility + * of this file. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @file sph_radiogatun.h + * @author Thomas Pornin + */ + #ifndef SPH_RADIOGATUN_H__ +#define SPH_RADIOGATUN_H__ + #include +#include "sph_types.h" + /** + * Output size (in bits) for RadioGatun[32]. + */ +#define SPH_SIZE_radiogatun32 256 + /** + * This structure is a context for RadioGatun[32] computations: it + * contains intermediate values and some data from the last entered + * block. Once a RadioGatun[32] computation has been performed, the + * context can be reused for another computation. + * + * The contents of this structure are private. A running RadioGatun[32] + * computation can be cloned by copying the context (e.g. with a + * simple memcpy()). + */ +typedef struct { +#ifndef DOXYGEN_IGNORE + unsigned char data[156]; /* first field, for alignment */ + unsigned data_ptr; + sph_u32 a[19], b[39]; +#endif +} sph_radiogatun32_context; + /** + * Initialize a RadioGatun[32] context. This process performs no + * memory allocation. + * + * @param cc the RadioGatun[32] context (pointer to a + * sph_radiogatun32_context) + */ +void sph_radiogatun32_init(void *cc); + /** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the RadioGatun[32] context + * @param data the input data + * @param len the input data length (in bytes) + */ +void sph_radiogatun32(void *cc, const void *data, size_t len); + /** + * Terminate the current RadioGatun[32] computation and output the + * result into the provided buffer. The destination buffer must be wide + * enough to accomodate the result (32 bytes). The context is + * automatically reinitialized. + * + * @param cc the RadioGatun[32] context + * @param dst the destination buffer + */ +void sph_radiogatun32_close(void *cc, void *dst); + #if SPH_64 + /** + * Output size (in bits) for RadioGatun[64]. + */ +#define SPH_SIZE_radiogatun64 256 + /** + * This structure is a context for RadioGatun[64] computations: it + * contains intermediate values and some data from the last entered + * block. Once a RadioGatun[64] computation has been performed, the + * context can be reused for another computation. + * + * The contents of this structure are private. A running RadioGatun[64] + * computation can be cloned by copying the context (e.g. with a + * simple memcpy()). + */ +typedef struct { +#ifndef DOXYGEN_IGNORE + unsigned char data[312]; /* first field, for alignment */ + unsigned data_ptr; + sph_u64 a[19], b[39]; +#endif +} sph_radiogatun64_context; + /** + * Initialize a RadioGatun[64] context. This process performs no + * memory allocation. + * + * @param cc the RadioGatun[64] context (pointer to a + * sph_radiogatun64_context) + */ +void sph_radiogatun64_init(void *cc); + /** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the RadioGatun[64] context + * @param data the input data + * @param len the input data length (in bytes) + */ +void sph_radiogatun64(void *cc, const void *data, size_t len); + /** + * Terminate the current RadioGatun[64] computation and output the + * result into the provided buffer. The destination buffer must be wide + * enough to accomodate the result (32 bytes). The context is + * automatically reinitialized. + * + * @param cc the RadioGatun[64] context + * @param dst the destination buffer + */ +void sph_radiogatun64_close(void *cc, void *dst); + #endif + #endif From 36c9359bffd693baeda76bfabe0e3d5d0514aa8d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:25:56 -0500 Subject: [PATCH 125/576] Create sph_sm3.c --- stratum/sha3/sph_sm3.c | 226 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 stratum/sha3/sph_sm3.c diff --git a/stratum/sha3/sph_sm3.c b/stratum/sha3/sph_sm3.c new file mode 100644 index 000000000..e5c580568 --- /dev/null +++ b/stratum/sha3/sph_sm3.c @@ -0,0 +1,226 @@ +/* ==================================================================== + * Copyright (c) 2014 - 2017 The GmSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the GmSSL Project. + * (http://gmssl.org/)" + * + * 4. The name "GmSSL Project" must not be used to endorse or promote + * products derived from this software without prior written + * permission. For written permission, please contact + * guanzhi1980@gmail.com. + * + * 5. Products derived from this software may not be called "GmSSL" + * nor may "GmSSL" appear in their names without prior written + * permission of the GmSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the GmSSL Project + * (http://gmssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE GmSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 GmSSL PROJECT OR + * ITS 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 +#include "sph_sm3.h" + +void sm3_init(sm3_ctx_t *ctx) +{ + ctx->digest[0] = 0x7380166F; + ctx->digest[1] = 0x4914B2B9; + ctx->digest[2] = 0x172442D7; + ctx->digest[3] = 0xDA8A0600; + ctx->digest[4] = 0xA96F30BC; + ctx->digest[5] = 0x163138AA; + ctx->digest[6] = 0xE38DEE4D; + ctx->digest[7] = 0xB0FB0E4E; + + ctx->nblocks = 0; + ctx->num = 0; +} + +void +sph_sm3(void *cc, const void *data, size_t len) +{ + sm3_update(cc, data, len); +} + +void sm3_update(sm3_ctx_t *ctx, const unsigned char* data, size_t data_len) +{ + if (ctx->num) { + unsigned int left = SM3_BLOCK_SIZE - ctx->num; + if (data_len < left) { + memcpy(ctx->block + ctx->num, data, data_len); + ctx->num += data_len; + return; + } else { + memcpy(ctx->block + ctx->num, data, left); + sm3_compress(ctx->digest, ctx->block); + ctx->nblocks++; + data += left; + data_len -= left; + } + } + while (data_len >= SM3_BLOCK_SIZE) { + sm3_compress(ctx->digest, data); + ctx->nblocks++; + data += SM3_BLOCK_SIZE; + data_len -= SM3_BLOCK_SIZE; + } + ctx->num = data_len; + if (data_len) { + memcpy(ctx->block, data, data_len); + } +} + +void +sph_sm3_close(void *cc, void *dst) +{ + sm3_final(cc, dst); + memset(cc, 0, sizeof(sm3_ctx_t)); +} + +void sm3_final(sm3_ctx_t *ctx, unsigned char *digest) +{ + int i; + uint32_t *pdigest = (uint32_t *)digest; + uint32_t *count = (uint32_t *)(ctx->block + SM3_BLOCK_SIZE - 8); + + ctx->block[ctx->num] = 0x80; + + if (ctx->num + 9 <= SM3_BLOCK_SIZE) { + memset(ctx->block + ctx->num + 1, 0, SM3_BLOCK_SIZE - ctx->num - 9); + } else { + memset(ctx->block + ctx->num + 1, 0, SM3_BLOCK_SIZE - ctx->num - 1); + sm3_compress(ctx->digest, ctx->block); + memset(ctx->block, 0, SM3_BLOCK_SIZE - 8); + } + + count[0] = cpu_to_be32((ctx->nblocks) >> 23); + count[1] = cpu_to_be32((ctx->nblocks << 9) + (ctx->num << 3)); + + sm3_compress(ctx->digest, ctx->block); + for (i = 0; i < sizeof(ctx->digest)/sizeof(ctx->digest[0]); i++) { + pdigest[i] = cpu_to_be32(ctx->digest[i]); + } +} + +#define ROTATELEFT(X,n) (((X)<<(n)) | ((X)>>(32-(n)))) + +#define P0(x) ((x) ^ ROTATELEFT((x),9) ^ ROTATELEFT((x),17)) +#define P1(x) ((x) ^ ROTATELEFT((x),15) ^ ROTATELEFT((x),23)) + +#define FF0(x,y,z) ( (x) ^ (y) ^ (z)) +#define FF1(x,y,z) (((x) & (y)) | ( (x) & (z)) | ( (y) & (z))) + +#define GG0(x,y,z) ( (x) ^ (y) ^ (z)) +#define GG1(x,y,z) (((x) & (y)) | ( (~(x)) & (z)) ) + + +void sm3_compress(uint32_t digest[8], const unsigned char block[64]) +{ + int j; + uint32_t W[68], W1[64]; + const uint32_t *pblock = (const uint32_t *)block; + + uint32_t A = digest[0]; + uint32_t B = digest[1]; + uint32_t C = digest[2]; + uint32_t D = digest[3]; + uint32_t E = digest[4]; + uint32_t F = digest[5]; + uint32_t G = digest[6]; + uint32_t H = digest[7]; + uint32_t SS1,SS2,TT1,TT2,T[64]; + + for (j = 0; j < 16; j++) { + W[j] = cpu_to_be32(pblock[j]); + } + for (j = 16; j < 68; j++) { + W[j] = P1( W[j-16] ^ W[j-9] ^ ROTATELEFT(W[j-3],15)) ^ ROTATELEFT(W[j - 13],7 ) ^ W[j-6];; + } + for( j = 0; j < 64; j++) { + W1[j] = W[j] ^ W[j+4]; + } + + for(j =0; j < 16; j++) { + + T[j] = 0x79CC4519; + SS1 = ROTATELEFT((ROTATELEFT(A,12) + E + ROTATELEFT(T[j],j)), 7); + SS2 = SS1 ^ ROTATELEFT(A,12); + TT1 = FF0(A,B,C) + D + SS2 + W1[j]; + TT2 = GG0(E,F,G) + H + SS1 + W[j]; + D = C; + C = ROTATELEFT(B,9); + B = A; + A = TT1; + H = G; + G = ROTATELEFT(F,19); + F = E; + E = P0(TT2); + } + + for(j =16; j < 64; j++) { + + T[j] = 0x7A879D8A; + SS1 = ROTATELEFT((ROTATELEFT(A,12) + E + ROTATELEFT(T[j],j)), 7); + SS2 = SS1 ^ ROTATELEFT(A,12); + TT1 = FF1(A,B,C) + D + SS2 + W1[j]; + TT2 = GG1(E,F,G) + H + SS1 + W[j]; + D = C; + C = ROTATELEFT(B,9); + B = A; + A = TT1; + H = G; + G = ROTATELEFT(F,19); + F = E; + E = P0(TT2); + } + + digest[0] ^= A; + digest[1] ^= B; + digest[2] ^= C; + digest[3] ^= D; + digest[4] ^= E; + digest[5] ^= F; + digest[6] ^= G; + digest[7] ^= H; +} + +void sm3(const unsigned char *msg, size_t msglen, + unsigned char dgst[SM3_DIGEST_LENGTH]) +{ + sm3_ctx_t ctx; + + sm3_init(&ctx); + sm3_update(&ctx, msg, msglen); + sm3_final(&ctx, dgst); + + memset(&ctx, 0, sizeof(sm3_ctx_t)); +} From 43b688d39f8a0f099002638e3d04396c2748e1a9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:26:14 -0500 Subject: [PATCH 126/576] Create sph_sm3.h --- stratum/sha3/sph_sm3.h | 120 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 stratum/sha3/sph_sm3.h diff --git a/stratum/sha3/sph_sm3.h b/stratum/sha3/sph_sm3.h new file mode 100644 index 000000000..eab61d363 --- /dev/null +++ b/stratum/sha3/sph_sm3.h @@ -0,0 +1,120 @@ +/* ==================================================================== + * Copyright (c) 2014 - 2016 The GmSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the GmSSL Project. + * (http://gmssl.org/)" + * + * 4. The name "GmSSL Project" must not be used to endorse or promote + * products derived from this software without prior written + * permission. For written permission, please contact + * guanzhi1980@gmail.com. + * + * 5. Products derived from this software may not be called "GmSSL" + * nor may "GmSSL" appear in their names without prior written + * permission of the GmSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the GmSSL Project + * (http://gmssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE GmSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 GmSSL PROJECT OR + * ITS 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. + * ==================================================================== + */ + +#ifndef SPH_SM3_H +#define SPH_SM3_H + +#define SM3_DIGEST_LENGTH 32 +#define SM3_BLOCK_SIZE 64 +#define SM3_CBLOCK (SM3_BLOCK_SIZE) +#define SM3_HMAC_SIZE (SM3_DIGEST_LENGTH) + + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef struct { + uint32_t digest[8]; + int nblocks; + unsigned char block[64]; + int num; +} sm3_ctx_t; + +void sm3_init(sm3_ctx_t *ctx); +void sm3_update(sm3_ctx_t *ctx, const unsigned char* data, size_t data_len); +void sm3_final(sm3_ctx_t *ctx, unsigned char digest[SM3_DIGEST_LENGTH]); +void sm3_compress(uint32_t digest[8], const unsigned char block[SM3_BLOCK_SIZE]); +void sm3(const unsigned char *data, size_t datalen, + unsigned char digest[SM3_DIGEST_LENGTH]); + +void sph_sm3(void *cc, const void *data, size_t len); +void sph_sm3_close(void *cc, void *dst); + +typedef struct { + sm3_ctx_t sm3_ctx; + unsigned char key[SM3_BLOCK_SIZE]; +} sm3_hmac_ctx_t; + +void sm3_hmac_init(sm3_hmac_ctx_t *ctx, const unsigned char *key, size_t key_len); +void sm3_hmac_update(sm3_hmac_ctx_t *ctx, const unsigned char *data, size_t data_len); +void sm3_hmac_final(sm3_hmac_ctx_t *ctx, unsigned char mac[SM3_HMAC_SIZE]); +void sm3_hmac(const unsigned char *data, size_t data_len, + const unsigned char *key, size_t key_len, unsigned char mac[SM3_HMAC_SIZE]); + +#ifdef CPU_BIGENDIAN + +#define cpu_to_be16(v) (v) +#define cpu_to_be32(v) (v) +#define be16_to_cpu(v) (v) +#define be32_to_cpu(v) (v) + +#else + +#define cpu_to_le16(v) (v) +#define cpu_to_le32(v) (v) +#define le16_to_cpu(v) (v) +#define le32_to_cpu(v) (v) + +#define cpu_to_be16(v) (((v)<< 8) | ((v)>>8)) +#define cpu_to_be32(v) (((v)>>24) | (((v)>>8)&0xff00) | (((v)<<8)&0xff0000) | ((v)<<24)) +#define be16_to_cpu(v) cpu_to_be16(v) +#define be32_to_cpu(v) cpu_to_be32(v) + +#endif + +#ifdef __cplusplus +} +#endif +#endif From 1bc3e98e0482ee25c539b7e068359c0004383eff Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:26:40 -0500 Subject: [PATCH 127/576] Create sph_streebog.c --- stratum/sha3/sph_streebog.c | 1045 +++++++++++++++++++++++++++++++++++ 1 file changed, 1045 insertions(+) create mode 100644 stratum/sha3/sph_streebog.c diff --git a/stratum/sha3/sph_streebog.c b/stratum/sha3/sph_streebog.c new file mode 100644 index 000000000..dbae4e54b --- /dev/null +++ b/stratum/sha3/sph_streebog.c @@ -0,0 +1,1045 @@ +/* Streebog GOST hash function for sib algo SibCoin */ + +#include +#include +#include +#include + +#include "sph_streebog.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +#ifdef _MSC_VER +#pragma warning (disable: 4146) +#endif + +//-------------------------------------------------------------------------------------------- +// +// Streebog 512 implementation +// +//-------------------------------------------------------------------------------------------- + + +// Tables for function F +static const sph_u64 TG[8][256] = {{ + 0xE6F87E5C5B711FD0,0x258377800924FA16,0xC849E07E852EA4A8,0x5B4686A18F06C16A, + 0x0B32E9A2D77B416E,0xABDA37A467815C66,0xF61796A81A686676,0xF5DC0B706391954B, + 0x4862F38DB7E64BF1,0xFF5C629A68BD85C5,0xCB827DA6FCD75795,0x66D36DAF69B9F089, + 0x356C9F74483D83B0,0x7CBCECB1238C99A1,0x36A702AC31C4708D,0x9EB6A8D02FBCDFD6, + 0x8B19FA51E5B3AE37,0x9CCFB5408A127D0B,0xBC0C78B508208F5A,0xE533E3842288ECED, + 0xCEC2C7D377C15FD2,0xEC7817B6505D0F5E,0xB94CC2C08336871D,0x8C205DB4CB0B04AD, + 0x763C855B28A0892F,0x588D1B79F6FF3257,0x3FECF69E4311933E,0x0FC0D39F803A18C9, + 0xEE010A26F5F3AD83,0x10EFE8F4411979A6,0x5DCDA10C7DE93A10,0x4A1BEE1D1248E92C, + 0x53BFF2DB21847339,0xB4F50CCFA6A23D09,0x5FB4BC9CD84798CD,0xE88A2D8B071C56F9, + 0x7F7771695A756A9C,0xC5F02E71A0BA1EBC,0xA663F9AB4215E672,0x2EB19E22DE5FBB78, + 0x0DB9CE0F2594BA14,0x82520E6397664D84,0x2F031E6A0208EA98,0x5C7F2144A1BE6BF0, + 0x7A37CB1CD16362DB,0x83E08E2B4B311C64,0xCF70479BAB960E32,0x856BA986B9DEE71E, + 0xB5478C877AF56CE9,0xB8FE42885F61D6FD,0x1BDD0156966238C8,0x622157923EF8A92E, + 0xFC97FF42114476F8,0x9D7D350856452CEB,0x4C90C9B0E0A71256,0x2308502DFBCB016C, + 0x2D7A03FAA7A64845,0xF46E8B38BFC6C4AB,0xBDBEF8FDD477DEBA,0x3AAC4CEBC8079B79, + 0xF09CB105E8879D0C,0x27FA6A10AC8A58CB,0x8960E7C1401D0CEA,0x1A6F811E4A356928, + 0x90C4FB0773D196FF,0x43501A2F609D0A9F,0xF7A516E0C63F3796,0x1CE4A6B3B8DA9252, + 0x1324752C38E08A9B,0xA5A864733BEC154F,0x2BF124575549B33F,0xD766DB15440DC5C7, + 0xA7D179E39E42B792,0xDADF151A61997FD3,0x86A0345EC0271423,0x38D5517B6DA939A4, + 0x6518F077104003B4,0x02791D90A5AEA2DD,0x88D267899C4A5D0A,0x930F66DF0A2865C2, + 0x4EE9D4204509B08B,0x325538916685292A,0x412907BFC533A842,0xB27E2B62544DC673, + 0x6C5304456295E007,0x5AF406E95351908A,0x1F2F3B6BC123616F,0xC37B09DC5255E5C6, + 0x3967D133B1FE6844,0x298839C7F0E711E2,0x409B87F71964F9A2,0xE938ADC3DB4B0719, + 0x0C0B4E47F9C3EBF4,0x5534D576D36B8843,0x4610A05AEB8B02D8,0x20C3CDF58232F251, + 0x6DE1840DBEC2B1E7,0xA0E8DE06B0FA1D08,0x7B854B540D34333B,0x42E29A67BCCA5B7F, + 0xD8A6088AC437DD0E,0xC63BB3A9D943ED81,0x21714DBD5E65A3B1,0x6761EDE7B5EEA169, + 0x2431F7C8D573ABF6,0xD51FC685E1A3671A,0x5E063CD40410C92D,0x283AB98F2CB04002, + 0x8FEBC06CB2F2F790,0x17D64F116FA1D33C,0xE07359F1A99EE4AA,0x784ED68C74CDC006, + 0x6E2A19D5C73B42DA,0x8712B4161C7045C3,0x371582E4ED93216D,0xACE390414939F6FC, + 0x7EC5F12186223B7C,0xC0B094042BAC16FB,0xF9D745379A527EBF,0x737C3F2EA3B68168, + 0x33E7B8D9BAD278CA,0xA9A32A34C22FFEBB,0xE48163CCFEDFBD0D,0x8E5940246EA5A670, + 0x51C6EF4B842AD1E4,0x22BAD065279C508C,0xD91488C218608CEE,0x319EA5491F7CDA17, + 0xD394E128134C9C60,0x094BF43272D5E3B3,0x9BF612A5A4AAD791,0xCCBBDA43D26FFD0F, + 0x34DE1F3C946AD250,0x4F5B5468995EE16B,0xDF9FAF6FEA8F7794,0x2648EA5870DD092B, + 0xBFC7E56D71D97C67,0xDDE6B2FF4F21D549,0x3C276B463AE86003,0x91767B4FAF86C71F, + 0x68A13E7835D4B9A0,0xB68C115F030C9FD4,0x141DD2C916582001,0x983D8F7DDD5324AC, + 0x64AA703FCC175254,0xC2C989948E02B426,0x3E5E76D69F46C2DE,0x50746F03587D8004, + 0x45DB3D829272F1E5,0x60584A029B560BF3,0xFBAE58A73FFCDC62,0xA15A5E4E6CAD4CE8, + 0x4BA96E55CE1FB8CC,0x08F9747AAE82B253,0xC102144CF7FB471B,0x9F042898F3EB8E36, + 0x068B27ADF2EFFB7A,0xEDCA97FE8C0A5EBE,0x778E0513F4F7D8CF,0x302C2501C32B8BF7, + 0x8D92DDFC175C554D,0xF865C57F46052F5F,0xEAF3301BA2B2F424,0xAA68B7ECBBD60D86, + 0x998F0F350104754C,0x0000000000000000,0xF12E314D34D0CCEC,0x710522BE061823B5, + 0xAF280D9930C005C1,0x97FD5CE25D693C65,0x19A41CC633CC9A15,0x95844172F8C79EB8, + 0xDC5432B7937684A9,0x9436C13A2490CF58,0x802B13F332C8EF59,0xC442AE397CED4F5C, + 0xFA1CD8EFE3AB8D82,0xF2E5AC954D293FD1,0x6AD823E8907A1B7D,0x4D2249F83CF043B6, + 0x03CB9DD879F9F33D,0xDE2D2F2736D82674,0x2A43A41F891EE2DF,0x6F98999D1B6C133A, + 0xD4AD46CD3DF436FA,0xBB35DF50269825C0,0x964FDCAA813E6D85,0xEB41B0537EE5A5C4, + 0x0540BA758B160847,0xA41AE43BE7BB44AF,0xE3B8C429D0671797,0x819993BBEE9FBEB9, + 0xAE9A8DD1EC975421,0xF3572CDD917E6E31,0x6393D7DAE2AFF8CE,0x47A2201237DC5338, + 0xA32343DEC903EE35,0x79FC56C4A89A91E6,0x01B28048DC5751E0,0x1296F564E4B7DB7B, + 0x75F7188351597A12,0xDB6D9552BDCE2E33,0x1E9DBB231D74308F,0x520D7293FDD322D9, + 0xE20A44610C304677,0xFEEEE2D2B4EAD425,0xCA30FDEE20800675,0x61EACA4A47015A13, + 0xE74AFE1487264E30,0x2CC883B27BF119A5,0x1664CF59B3F682DC,0xA811AA7C1E78AF5B, + 0x1D5626FB648DC3B2,0xB73E9117DF5BCE34,0xD05F7CF06AB56F5D,0xFD257F0ACD132718, + 0x574DC8E676C52A9E,0x0739A7E52EB8AA9A,0x5486553E0F3CD9A3,0x56FF48AEAA927B7E, + 0xBE756525AD8E2D87,0x7D0E6CF9FFDBC841,0x3B1ECCA31450CA99,0x6913BE30E983E840, + 0xAD511009956EA71C,0xB1B5B6BA2DB4354E,0x4469BDCA4E25A005,0x15AF5281CA0F71E1, + 0x744598CB8D0E2BF2,0x593F9B312AA863B7,0xEFB38A6E29A4FC63,0x6B6AA3A04C2D4A9D, + 0x3D95EB0EE6BF31E3,0xA291C3961554BFD5,0x18169C8EEF9BCBF5,0x115D68BC9D4E2846, + 0xBA875F18FACF7420,0xD1EDFCB8B6E23EBD,0xB00736F2F1E364AE,0x84D929CE6589B6FE, + 0x70B7A2F6DA4F7255,0x0E7253D75C6D4929,0x04F23A3D574159A7,0x0A8069EA0B2C108E, + 0x49D073C56BB11A11,0x8AAB7A1939E4FFD7,0xCD095A0B0E38ACEF,0xC9FB60365979F548, + 0x92BDE697D67F3422,0xC78933E10514BC61,0xE1C1D9B975C9B54A,0xD2266160CF1BCD80, + 0x9A4492ED78FD8671,0xB3CCAB2A881A9793,0x72CEBF667FE1D088,0xD6D45B5D985A9427 +},{ + 0xC811A8058C3F55DE,0x65F5B43196B50619,0xF74F96B1D6706E43,0x859D1E8BCB43D336, + 0x5AAB8A85CCFA3D84,0xF9C7BF99C295FCFD,0xA21FD5A1DE4B630F,0xCDB3EF763B8B456D, + 0x803F59F87CF7C385,0xB27C73BE5F31913C,0x98E3AC6633B04821,0xBF61674C26B8F818, + 0x0FFBC995C4C130C8,0xAAA0862010761A98,0x6057F342210116AA,0xF63C760C0654CC35, + 0x2DDB45CC667D9042,0xBCF45A964BD40382,0x68E8A0C3EF3C6F3D,0xA7BD92D269FF73BC, + 0x290AE20201ED2287,0xB7DE34CDE885818F,0xD901EEA7DD61059B,0xD6FA273219A03553, + 0xD56F1AE874CCCEC9,0xEA31245C2E83F554,0x7034555DA07BE499,0xCE26D2AC56E7BEF7, + 0xFD161857A5054E38,0x6A0E7DA4527436D1,0x5BD86A381CDE9FF2,0xCAF7756231770C32, + 0xB09AAED9E279C8D0,0x5DEF1091C60674DB,0x111046A2515E5045,0x23536CE4729802FC, + 0xC50CBCF7F5B63CFA,0x73A16887CD171F03,0x7D2941AFD9F28DBD,0x3F5E3EB45A4F3B9D, + 0x84EEFE361B677140,0x3DB8E3D3E7076271,0x1A3A28F9F20FD248,0x7EBC7C75B49E7627, + 0x74E5F293C7EB565C,0x18DCF59E4F478BA4,0x0C6EF44FA9ADCB52,0xC699812D98DAC760, + 0x788B06DC6E469D0E,0xFC65F8EA7521EC4E,0x30A5F7219E8E0B55,0x2BEC3F65BCA57B6B, + 0xDDD04969BAF1B75E,0x99904CDBE394EA57,0x14B201D1E6EA40F6,0xBBB0C08241284ADD, + 0x50F20463BF8F1DFF,0xE8D7F93B93CBACB8,0x4D8CB68E477C86E8,0xC1DD1B3992268E3F, + 0x7C5AA11209D62FCB,0x2F3D98ABDB35C9AE,0x671369562BFD5FF5,0x15C1E16C36CEE280, + 0x1D7EB2EDF8F39B17,0xDA94D37DB00DFE01,0x877BC3EC760B8ADA,0xCB8495DFE153AE44, + 0x05A24773B7B410B3,0x12857B783C32ABDF,0x8EB770D06812513B,0x536739B9D2E3E665, + 0x584D57E271B26468,0xD789C78FC9849725,0xA935BBFA7D1AE102,0x8B1537A3DFA64188, + 0xD0CD5D9BC378DE7A,0x4AC82C9A4D80CFB7,0x42777F1B83BDB620,0x72D2883A1D33BD75, + 0x5E7A2D4BAB6A8F41,0xF4DAAB6BBB1C95D9,0x905CFFE7FD8D31B6,0x83AA6422119B381F, + 0xC0AEFB8442022C49,0xA0F908C663033AE3,0xA428AF0804938826,0xADE41C341A8A53C7, + 0xAE7121EE77E6A85D,0xC47F5C4A25929E8C,0xB538E9AA55CDD863,0x06377AA9DAD8EB29, + 0xA18AE87BB3279895,0x6EDFDA6A35E48414,0x6B7D9D19825094A7,0xD41CFA55A4E86CBF, + 0xE5CAEDC9EA42C59C,0xA36C351C0E6FC179,0x5181E4DE6FABBF89,0xFFF0C530184D17D4, + 0x9D41EB1584045892,0x1C0D525028D73961,0xF178EC180CA8856A,0x9A0571018EF811CD, + 0x4091A27C3EF5EFCC,0x19AF15239F6329D2,0x347450EFF91EB990,0xE11B4A078DD27759, + 0xB9561DE5FC601331,0x912F1F5A2DA993C0,0x1654DCB65BA2191A,0x3E2DDE098A6B99EB, + 0x8A66D71E0F82E3FE,0x8C51ADB7D55A08D7,0x4533E50F8941FF7F,0x02E6DD67BD4859EC, + 0xE068AABA5DF6D52F,0xC24826E3FF4A75A5,0x6C39070D88ACDDF8,0x6486548C4691A46F, + 0xD1BEBD26135C7C0C,0xB30F93038F15334A,0x82D9849FC1BF9A69,0x9C320BA85420FAE4, + 0xFA528243AFF90767,0x9ED4D6CFE968A308,0xB825FD582C44B147,0x9B7691BC5EDCB3BB, + 0xC7EA619048FE6516,0x1063A61F817AF233,0x47D538683409A693,0x63C2CE984C6DED30, + 0x2A9FDFD86C81D91D,0x7B1E3B06032A6694,0x666089EBFBD9FD83,0x0A598EE67375207B, + 0x07449A140AFC495F,0x2CA8A571B6593234,0x1F986F8A45BBC2FB,0x381AA4A050B372C2, + 0x5423A3ADD81FAF3A,0x17273C0B8B86BB6C,0xFE83258DC869B5A2,0x287902BFD1C980F1, + 0xF5A94BD66B3837AF,0x88800A79B2CABA12,0x55504310083B0D4C,0xDF36940E07B9EEB2, + 0x04D1A7CE6790B2C5,0x612413FFF125B4DC,0x26F12B97C52C124F,0x86082351A62F28AC, + 0xEF93632F9937E5E7,0x3507B052293A1BE6,0xE72C30AE570A9C70,0xD3586041AE1425E0, + 0xDE4574B3D79D4CC4,0x92BA228040C5685A,0xF00B0CA5DC8C271C,0xBE1287F1F69C5A6E, + 0xF39E317FB1E0DC86,0x495D114020EC342D,0x699B407E3F18CD4B,0xDCA3A9D46AD51528, + 0x0D1D14F279896924,0x0000000000000000,0x593EB75FA196C61E,0x2E4E78160B116BD8, + 0x6D4AE7B058887F8E,0xE65FD013872E3E06,0x7A6DDBBBD30EC4E2,0xAC97FC89CAAEF1B1, + 0x09CCB33C1E19DBE1,0x89F3EAC462EE1864,0x7770CF49AA87ADC6,0x56C57ECA6557F6D6, + 0x03953DDA6D6CFB9A,0x36928D884456E07C,0x1EEB8F37959F608D,0x31D6179C4EAAA923, + 0x6FAC3AD7E5C02662,0x43049FA653991456,0xABD3669DC052B8EE,0xAF02C153A7C20A2B, + 0x3CCB036E3723C007,0x93C9C23D90E1CA2C,0xC33BC65E2F6ED7D3,0x4CFF56339758249E, + 0xB1E94E64325D6AA6,0x37E16D359472420A,0x79F8E661BE623F78,0x5214D90402C74413, + 0x482EF1FDF0C8965B,0x13F69BC5EC1609A9,0x0E88292814E592BE,0x4E198B542A107D72, + 0xCCC00FCBEBAFE71B,0x1B49C844222B703E,0x2564164DA840E9D5,0x20C6513E1FF4F966, + 0xBAC3203F910CE8AB,0xF2EDD1C261C47EF0,0x814CB945ACD361F3,0x95FEB8944A392105, + 0x5C9CF02C1622D6AD,0x971865F3F77178E9,0xBD87BA2B9BF0A1F4,0x444005B259655D09, + 0xED75BE48247FBC0B,0x7596122E17CFF42A,0xB44B091785E97A15,0x966B854E2755DA9F, + 0xEEE0839249134791,0x32432A4623C652B9,0xA8465B47AD3E4374,0xF8B45F2412B15E8B, + 0x2417F6F078644BA3,0xFB2162FE7FDDA511,0x4BBBCC279DA46DC1,0x0173E0BDD024A276, + 0x22208C59A2BCA08A,0x8FC4906DB836F34D,0xE4B90D743A6667EA,0x7147B5E0705F46EF, + 0x2782CB2A1508B039,0xEC065EF5F45B1E7D,0x21B5B183CFD05B10,0xDBE733C060295C77, + 0x9FA73672394C017E,0xCF55321186C31C81,0xD8720E1A0D45A7ED,0x3B8F997A3DDF8958, + 0x3AFC79C7EDFB2B2E,0xE9A4198643EF0ECE,0x5F09CDF67B4E2D37,0x4F6A6BE9FA34DF04, + 0xB6ADD47038A123F9,0x8D224D0A057EAAA1,0xC96248B85C1BF7A8,0xE3FD9760309A2EB5, + 0x0B2A6E5BA351820D,0xEB42C4E1FEA75722,0x948D58299A1D8373,0x7FCF9CC864BAD451, + 0xA55B4FB5D4B72A50,0x08BF5381CE3D7997,0x46A6D8D5E42D04E5,0xD22B80FC7E308796, + 0x57B69E77B57354A0,0x3969441D8097D0B4,0x3330CAFBF3E2F0CF,0xE28E77DDE0BE8CC3, + 0x62B12E259C494F46,0xA6CE726FB9DBD1CA,0x41E242C1EED14DBA,0x76032FF47AA30FB0 +},{ + 0x45B268A93ACDE4CC,0xAF7F0BE884549D08,0x048354B3C1468263,0x925435C2C80EFED2, + 0xEE4E37F27FDFFBA7,0x167A33920C60F14D,0xFB123B52EA03E584,0x4A0CAB53FDBB9007, + 0x9DEAF6380F788A19,0xCB48EC558F0CB32A,0xB59DC4B2D6FEF7E0,0xDCDBCA22F4F3ECB6, + 0x11DF5813549A9C40,0xE33FDEDF568ACED3,0xA0C1C8124322E9C3,0x07A56B8158FA6D0D, + 0x77279579B1E1F3DD,0xD9B18B74422AC004,0xB8EC2D9FFFABC294,0xF4ACF8A82D75914F, + 0x7BBF69B1EF2B6878,0xC4F62FAF487AC7E1,0x76CE809CC67E5D0C,0x6711D88F92E4C14C, + 0x627B99D9243DEDFE,0x234AA5C3DFB68B51,0x909B1F15262DBF6D,0x4F66EA054B62BCB5, + 0x1AE2CF5A52AA6AE8,0xBEA053FBD0CE0148,0xED6808C0E66314C9,0x43FE16CD15A82710, + 0xCD049231A06970F6,0xE7BC8A6C97CC4CB0,0x337CE835FCB3B9C0,0x65DEF2587CC780F3, + 0x52214EDE4132BB50,0x95F15E4390F493DF,0x870839625DD2E0F1,0x41313C1AFB8B66AF, + 0x91720AF051B211BC,0x477D427ED4EEA573,0x2E3B4CEEF6E3BE25,0x82627834EB0BCC43, + 0x9C03E3DD78E724C8,0x2877328AD9867DF9,0x14B51945E243B0F2,0x574B0F88F7EB97E2, + 0x88B6FA989AA4943A,0x19C4F068CB168586,0x50EE6409AF11FAEF,0x7DF317D5C04EABA4, + 0x7A567C5498B4C6A9,0xB6BBFB804F42188E,0x3CC22BCF3BC5CD0B,0xD04336EAAA397713, + 0xF02FAC1BEC33132C,0x2506DBA7F0D3488D,0xD7E65D6BF2C31A1E,0x5EB9B2161FF820F5, + 0x842E0650C46E0F9F,0x716BEB1D9E843001,0xA933758CAB315ED4,0x3FE414FDA2792265, + 0x27C9F1701EF00932,0x73A4C1CA70A771BE,0x94184BA6E76B3D0E,0x40D829FF8C14C87E, + 0x0FBEC3FAC77674CB,0x3616A9634A6A9572,0x8F139119C25EF937,0xF545ED4D5AEA3F9E, + 0xE802499650BA387B,0x6437E7BD0B582E22,0xE6559F89E053E261,0x80AD52E305288DFC, + 0x6DC55A23E34B9935,0xDE14E0F51AD0AD09,0xC6390578A659865E,0x96D7617109487CB1, + 0xE2D6CB3A21156002,0x01E915E5779FAED1,0xADB0213F6A77DCB7,0x9880B76EB9A1A6AB, + 0x5D9F8D248644CF9B,0xFD5E4536C5662658,0xF1C6B9FE9BACBDFD,0xEACD6341BE9979C4, + 0xEFA7221708405576,0x510771ECD88E543E,0xC2BA51CB671F043D,0x0AD482AC71AF5879, + 0xFE787A045CDAC936,0xB238AF338E049AED,0xBD866CC94972EE26,0x615DA6EBBD810290, + 0x3295FDD08B2C1711,0xF834046073BF0AEA,0xF3099329758FFC42,0x1CAEB13E7DCFA934, + 0xBA2307481188832B,0x24EFCE42874CE65C,0x0E57D61FB0E9DA1A,0xB3D1BAD6F99B343C, + 0xC0757B1C893C4582,0x2B510DB8403A9297,0x5C7698C1F1DB614A,0x3E0D0118D5E68CB4, + 0xD60F488E855CB4CF,0xAE961E0DF3CB33D9,0x3A8E55AB14A00ED7,0x42170328623789C1, + 0x838B6DD19C946292,0x895FEF7DED3B3AEB,0xCFCBB8E64E4A3149,0x064C7E642F65C3DC, + 0x3D2B3E2A4C5A63DA,0x5BD3F340A9210C47,0xB474D157A1615931,0xAC5934DA1DE87266, + 0x6EE365117AF7765B,0xC86ED36716B05C44,0x9BA6885C201D49C5,0xB905387A88346C45, + 0x131072C4BAB9DDFF,0xBF49461EA751AF99,0xD52977BC1CE05BA1,0xB0F785E46027DB52, + 0x546D30BA6E57788C,0x305AD707650F56AE,0xC987C682612FF295,0xA5AB8944F5FBC571, + 0x7ED528E759F244CA,0x8DDCBBCE2C7DB888,0xAA154ABE328DB1BA,0x1E619BE993ECE88B, + 0x09F2BD9EE813B717,0x7401AA4B285D1CB3,0x21858F143195CAEE,0x48C381841398D1B8, + 0xFCB750D3B2F98889,0x39A86A998D1CE1B9,0x1F888E0CE473465A,0x7899568376978716, + 0x02CF2AD7EE2341BF,0x85C713B5B3F1A14E,0xFF916FE12B4567E7,0x7C1A0230B7D10575, + 0x0C98FCC85ECA9BA5,0xA3E7F720DA9E06AD,0x6A6031A2BBB1F438,0x973E74947ED7D260, + 0x2CF4663918C0FF9A,0x5F50A7F368678E24,0x34D983B4A449D4CD,0x68AF1B755592B587, + 0x7F3C3D022E6DEA1B,0xABFC5F5B45121F6B,0x0D71E92D29553574,0xDFFDF5106D4F03D8, + 0x081BA87B9F8C19C6,0xDB7EA1A3AC0981BB,0xBBCA12AD66172DFA,0x79704366010829C7, + 0x179326777BFF5F9C,0x0000000000000000,0xEB2476A4C906D715,0x724DD42F0738DF6F, + 0xB752EE6538DDB65F,0x37FFBC863DF53BA3,0x8EFA84FCB5C157E6,0xE9EB5C73272596AA, + 0x1B0BDABF2535C439,0x86E12C872A4D4E20,0x9969A28BCE3E087A,0xFAFB2EB79D9C4B55, + 0x056A4156B6D92CB2,0x5A3AE6A5DEBEA296,0x22A3B026A8292580,0x53C85B3B36AD1581, + 0xB11E900117B87583,0xC51F3A4A3FE56930,0xE019E1EDCF3621BD,0xEC811D2591FCBA18, + 0x445B7D4C4D524A1D,0xA8DA6069DCAEF005,0x58F5CC72309DE329,0xD4C062596B7FF570, + 0xCE22AD0339D59F98,0x591CD99747024DF8,0x8B90C5AA03187B54,0xF663D27FC356D0F0, + 0xD8589E9135B56ED5,0x35309651D3D67A1C,0x12F96721CD26732E,0xD28C1C3D441A36AC, + 0x492A946164077F69,0x2D1D73DC6F5F514B,0x6F0A70F40D68D88A,0x60B4B30ECA1EAC41, + 0xD36509D83385987D,0x0B3D97490630F6A8,0x9ECCC90A96C46577,0xA20EE2C5AD01A87C, + 0xE49AB55E0E70A3DE,0xA4429CA182646BA0,0xDA97B446DB962F6A,0xCCED87D4D7F6DE27, + 0x2AB8185D37A53C46,0x9F25DCEFE15BCBA6,0xC19C6EF9FEA3EB53,0xA764A3931BD884CE, + 0x2FD2590B817C10F4,0x56A21A6D80743933,0xE573A0BB79EF0D0F,0x155C0CA095DC1E23, + 0x6C2C4FC694D437E4,0x10364DF623053291,0xDD32DFC7836C4267,0x03263F3299BCEF6E, + 0x66F8CD6AE57B6F9D,0x8C35AE2B5BE21659,0x31B3C2E21290F87F,0x93BD2027BF915003, + 0x69460E90220D1B56,0x299E276FAE19D328,0x63928C3C53A2432F,0x7082FEF8E91B9ED0, + 0xBC6F792C3EED40F7,0x4C40D537D2DE53DB,0x75E8BFAE5FC2B262,0x4DA9C0D2A541FD0A, + 0x4E8FFFE03CFD1264,0x2620E495696FA7E3,0xE1F0F408B8A98F6C,0xD1AA230FDDA6D9C2, + 0xC7D0109DD1C6288F,0x8A79D04F7487D585,0x4694579BA3710BA2,0x38417F7CFA834F68, + 0x1D47A4DB0A5007E5,0x206C9AF1460A643F,0xA128DDF734BD4712,0x8144470672B7232D, + 0xF2E086CC02105293,0x182DE58DBC892B57,0xCAA1F9B0F8931DFB,0x6B892447CC2E5AE9, + 0xF9DD11850420A43B,0x4BE5BEB68A243ED6,0x5584255F19C8D65D,0x3B67404E633FA006, + 0xA68DB6766C472A1F,0xF78AC79AB4C97E21,0xC353442E1080AAEC,0x9A4F9DB95782E714 +},{ + 0x05BA7BC82C9B3220,0x31A54665F8B65E4F,0xB1B651F77547F4D4,0x8BFA0D857BA46682, + 0x85A96C5AA16A98BB,0x990FAEF908EB79C9,0xA15E37A247F4A62D,0x76857DCD5D27741E, + 0xF8C50B800A1820BC,0xBE65DCB201F7A2B4,0x666D1B986F9426E7,0x4CC921BF53C4E648, + 0x95410A0F93D9CA42,0x20CDCCAA647BA4EF,0x429A4060890A1871,0x0C4EA4F69B32B38B, + 0xCCDA362DDE354CD3,0x96DC23BC7C5B2FA9,0xC309BB68AA851AB3,0xD26131A73648E013, + 0x021DC52941FC4DB2,0xCD5ADAB7704BE48A,0xA77965D984ED71E6,0x32386FD61734BBA4, + 0xE82D6DD538AB7245,0x5C2147EA6177B4B1,0x5DA1AB70CF091CE8,0xAC907FCE72B8BDFF, + 0x57C85DFD972278A8,0xA4E44C6A6B6F940D,0x3851995B4F1FDFE4,0x62578CCAED71BC9E, + 0xD9882BB0C01D2C0A,0x917B9D5D113C503B,0xA2C31E11A87643C6,0xE463C923A399C1CE, + 0xF71686C57EA876DC,0x87B4A973E096D509,0xAF0D567D9D3A5814,0xB40C2A3F59DCC6F4, + 0x3602F88495D121DD,0xD3E1DD3D9836484A,0xF945E71AA46688E5,0x7518547EB2A591F5, + 0x9366587450C01D89,0x9EA81018658C065B,0x4F54080CBC4603A3,0x2D0384C65137BF3D, + 0xDC325078EC861E2A,0xEA30A8FC79573FF7,0x214D2030CA050CB6,0x65F0322B8016C30C, + 0x69BE96DD1B247087,0xDB95EE9981E161B8,0xD1FC1814D9CA05F8,0x820ED2BBCC0DE729, + 0x63D76050430F14C7,0x3BCCB0E8A09D3A0F,0x8E40764D573F54A2,0x39D175C1E16177BD, + 0x12F5A37C734F1F4B,0xAB37C12F1FDFC26D,0x5648B167395CD0F1,0x6C04ED1537BF42A7, + 0xED97161D14304065,0x7D6C67DAAB72B807,0xEC17FA87BA4EE83C,0xDFAF79CB0304FBC1, + 0x733F060571BC463E,0x78D61C1287E98A27,0xD07CF48E77B4ADA1,0xB9C262536C90DD26, + 0xE2449B5860801605,0x8FC09AD7F941FCFB,0xFAD8CEA94BE46D0E,0xA343F28B0608EB9F, + 0x9B126BD04917347B,0x9A92874AE7699C22,0x1B017C42C4E69EE0,0x3A4C5C720EE39256, + 0x4B6E9F5E3EA399DA,0x6BA353F45AD83D35,0xE7FEE0904C1B2425,0x22D009832587E95D, + 0x842980C00F1430E2,0xC6B3C0A0861E2893,0x087433A419D729F2,0x341F3DADD42D6C6F, + 0xEE0A3FAEFBB2A58E,0x4AEE73C490DD3183,0xAAB72DB5B1A16A34,0xA92A04065E238FDF, + 0x7B4B35A1686B6FCC,0x6A23BF6EF4A6956C,0x191CB96B851AD352,0x55D598D4D6DE351A, + 0xC9604DE5F2AE7EF3,0x1CA6C2A3A981E172,0xDE2F9551AD7A5398,0x3025AAFF56C8F616, + 0x15521D9D1E2860D9,0x506FE31CFA45073A,0x189C55F12B647B0B,0x0180EC9AAE7EA859, + 0x7CEC8B40050C105E,0x2350E5198BF94104,0xEF8AD33455CC0DD7,0x07A7BEE16D677F92, + 0xE5E325B90DE76997,0x5A061591A26E637A,0xB611EF1618208B46,0x09F4DF3EB7A981AB, + 0x1EBB078AE87DACC0,0xB791038CB65E231F,0x0FD38D4574B05660,0x67EDF702C1EA8EBE, + 0xBA5F4BE0831238CD,0xE3C477C2CEFEBE5C,0x0DCE486C354C1BD2,0x8C5DB36416C31910, + 0x26EA9ED1A7627324,0x039D29B3EF82E5EB,0x9F28FC82CBF2AE02,0xA8AAE89CF05D2786, + 0x431AACFA2774B028,0xCF471F9E31B7A938,0x581BD0B8E3922EC8,0xBC78199B400BEF06, + 0x90FB71C7BF42F862,0x1F3BEB1046030499,0x683E7A47B55AD8DE,0x988F4263A695D190, + 0xD808C72A6E638453,0x0627527BC319D7CB,0xEBB04466D72997AE,0xE67E0C0AE2658C7C, + 0x14D2F107B056C880,0x7122C32C30400B8C,0x8A7AE11FD5DACEDB,0xA0DEDB38E98A0E74, + 0xAD109354DCC615A6,0x0BE91A17F655CC19,0x8DDD5FFEB8BDB149,0xBFE53028AF890AED, + 0xD65BA6F5B4AD7A6A,0x7956F0882997227E,0x10E8665532B352F9,0x0E5361DFDACEFE39, + 0xCEC7F3049FC90161,0xFF62B561677F5F2E,0x975CCF26D22587F0,0x51EF0F86543BAF63, + 0x2F1E41EF10CBF28F,0x52722635BBB94A88,0xAE8DBAE73344F04D,0x410769D36688FD9A, + 0xB3AB94DE34BBB966,0x801317928DF1AA9B,0xA564A0F0C5113C54,0xF131D4BEBDB1A117, + 0x7F71A2F3EA8EF5B5,0x40878549C8F655C3,0x7EF14E6944F05DEC,0xD44663DCF55137D8, + 0xF2ACFD0D523344FC,0x0000000000000000,0x5FBC6E598EF5515A,0x16CF342EF1AA8532, + 0xB036BD6DDB395C8D,0x13754FE6DD31B712,0xBBDFA77A2D6C9094,0x89E7C8AC3A582B30, + 0x3C6B0E09CDFA459D,0xC4AE0589C7E26521,0x49735A777F5FD468,0xCAFD64561D2C9B18, + 0xDA1502032F9FC9E1,0x8867243694268369,0x3782141E3BAF8984,0x9CB5D53124704BE9, + 0xD7DB4A6F1AD3D233,0xA6F989432A93D9BF,0x9D3539AB8A0EE3B0,0x53F2CAAF15C7E2D1, + 0x6E19283C76430F15,0x3DEBE2936384EDC4,0x5E3C82C3208BF903,0x33B8834CB94A13FD, + 0x6470DEB12E686B55,0x359FD1377A53C436,0x61CAA57902F35975,0x043A975282E59A79, + 0xFD7F70482683129C,0xC52EE913699CCD78,0x28B9FF0E7DAC8D1D,0x5455744E78A09D43, + 0xCB7D88CCB3523341,0x44BD121B4A13CFBA,0x4D49CD25FDBA4E11,0x3E76CB208C06082F, + 0x3FF627BA2278A076,0xC28957F204FBB2EA,0x453DFE81E46D67E3,0x94C1E6953DA7621B, + 0x2C83685CFF491764,0xF32C1197FC4DECA5,0x2B24D6BD922E68F6,0xB22B78449AC5113F, + 0x48F3B6EDD1217C31,0x2E9EAD75BEB55AD6,0x174FD8B45FD42D6B,0x4ED4E4961238ABFA, + 0x92E6B4EEFEBEB5D0,0x46A0D7320BEF8208,0x47203BA8A5912A51,0x24F75BF8E69E3E96, + 0xF0B1382413CF094E,0xFEE259FBC901F777,0x276A724B091CDB7D,0xBDF8F501EE75475F, + 0x599B3C224DEC8691,0x6D84018F99C1EAFE,0x7498B8E41CDB39AC,0xE0595E71217C5BB7, + 0x2AA43A273C50C0AF,0xF50B43EC3F543B6E,0x838E3E2162734F70,0xC09492DB4507FF58, + 0x72BFEA9FDFC2EE67,0x11688ACF9CCDFAA0,0x1A8190D86A9836B9,0x7ACBD93BC615C795, + 0xC7332C3A286080CA,0x863445E94EE87D50,0xF6966A5FD0D6DE85,0xE9AD814F96D5DA1C, + 0x70A22FB69E3EA3D5,0x0A69F68D582B6440,0xB8428EC9C2EE757F,0x604A49E3AC8DF12C, + 0x5B86F90B0C10CB23,0xE1D9B2EB8F02F3EE,0x29391394D3D22544,0xC8E0A17F5CD0D6AA, + 0xB58CC6A5F7A26EAD,0x8193FB08238F02C2,0xD5C68F465B2F9F81,0xFCFF9CD288FDBAC5, + 0x77059157F359DC47,0x1D262E3907FF492B,0xFB582233E59AC557,0xDDB2BCE242F8B673, + 0x2577B76248E096CF,0x6F99C4A6D83DA74C,0xC1147E41EB795701,0xF48BAF76912A9337 +},{ + 0x3EF29D249B2C0A19,0xE9E16322B6F8622F,0x5536994047757F7A,0x9F4D56D5A47B0B33, + 0x822567466AA1174C,0xB8F5057DEB082FB2,0xCC48C10BF4475F53,0x373088D4275DEC3A, + 0x968F4325180AED10,0x173D232CF7016151,0xAE4ED09F946FCC13,0xFD4B4741C4539873, + 0x1B5B3F0DD9933765,0x2FFCB0967B644052,0xE02376D20A89840C,0xA3AE3A70329B18D7, + 0x419CBD2335DE8526,0xFAFEBF115B7C3199,0x0397074F85AA9B0D,0xC58AD4FB4836B970, + 0xBEC60BE3FC4104A8,0x1EFF36DC4B708772,0x131FDC33ED8453B6,0x0844E33E341764D3, + 0x0FF11B6EAB38CD39,0x64351F0A7761B85A,0x3B5694F509CFBA0E,0x30857084B87245D0, + 0x47AFB3BD2297AE3C,0xF2BA5C2F6F6B554A,0x74BDC4761F4F70E1,0xCFDFC64471EDC45E, + 0xE610784C1DC0AF16,0x7ACA29D63C113F28,0x2DED411776A859AF,0xAC5F211E99A3D5EE, + 0xD484F949A87EF33B,0x3CE36CA596E013E4,0xD120F0983A9D432C,0x6BC40464DC597563, + 0x69D5F5E5D1956C9E,0x9AE95F043698BB24,0xC9ECC8DA66A4EF44,0xD69508C8A5B2EAC6, + 0xC40C2235C0503B80,0x38C193BA8C652103,0x1CEEC75D46BC9E8F,0xD331011937515AD1, + 0xD8E2E56886ECA50F,0xB137108D5779C991,0x709F3B6905CA4206,0x4FEB50831680CAEF, + 0xEC456AF3241BD238,0x58D673AFE181ABBE,0x242F54E7CAD9BF8C,0x0211F1810DCC19FD, + 0x90BC4DBB0F43C60A,0x9518446A9DA0761D,0xA1BFCBF13F57012A,0x2BDE4F8961E172B5, + 0x27B853A84F732481,0xB0B1E643DF1F4B61,0x18CC38425C39AC68,0xD2B7F7D7BF37D821, + 0x3103864A3014C720,0x14AA246372ABFA5C,0x6E600DB54EBAC574,0x394765740403A3F3, + 0x09C215F0BC71E623,0x2A58B947E987F045,0x7B4CDF18B477BDD8,0x9709B5EB906C6FE0, + 0x73083C268060D90B,0xFEDC400E41F9037E,0x284948C6E44BE9B8,0x728ECAE808065BFB, + 0x06330E9E17492B1A,0x5950856169E7294E,0xBAE4F4FCE6C4364F,0xCA7BCF95E30E7449, + 0x7D7FD186A33E96C2,0x52836110D85AD690,0x4DFAA1021B4CD312,0x913ABB75872544FA, + 0xDD46ECB9140F1518,0x3D659A6B1E869114,0xC23F2CABD719109A,0xD713FE062DD46836, + 0xD0A60656B2FBC1DC,0x221C5A79DD909496,0xEFD26DBCA1B14935,0x0E77EDA0235E4FC9, + 0xCBFD395B6B68F6B9,0x0DE0EAEFA6F4D4C4,0x0422FF1F1A8532E7,0xF969B85EDED6AA94, + 0x7F6E2007AEF28F3F,0x3AD0623B81A938FE,0x6624EE8B7AADA1A7,0xB682E8DDC856607B, + 0xA78CC56F281E2A30,0xC79B257A45FAA08D,0x5B4174E0642B30B3,0x5F638BFF7EAE0254, + 0x4BC9AF9C0C05F808,0xCE59308AF98B46AE,0x8FC58DA9CC55C388,0x803496C7676D0EB1, + 0xF33CAAE1E70DD7BA,0xBB6202326EA2B4BF,0xD5020F87201871CB,0x9D5CA754A9B712CE, + 0x841669D87DE83C56,0x8A6184785EB6739F,0x420BBA6CB0741E2B,0xF12D5B60EAC1CE47, + 0x76AC35F71283691C,0x2C6BB7D9FECEDB5F,0xFCCDB18F4C351A83,0x1F79C012C3160582, + 0xF0ABADAE62A74CB7,0xE1A5801C82EF06FC,0x67A21845F2CB2357,0x5114665F5DF04D9D, + 0xBF40FD2D74278658,0xA0393D3FB73183DA,0x05A409D192E3B017,0xA9FB28CF0B4065F9, + 0x25A9A22942BF3D7C,0xDB75E22703463E02,0xB326E10C5AB5D06C,0xE7968E8295A62DE6, + 0xB973F3B3636EAD42,0xDF571D3819C30CE5,0xEE549B7229D7CBC5,0x12992AFD65E2D146, + 0xF8EF4E9056B02864,0xB7041E134030E28B,0xC02EDD2ADAD50967,0x932B4AF48AE95D07, + 0x6FE6FB7BC6DC4784,0x239AACB755F61666,0x401A4BEDBDB807D6,0x485EA8D389AF6305, + 0xA41BC220ADB4B13D,0x753B32B89729F211,0x997E584BB3322029,0x1D683193CEDA1C7F, + 0xFF5AB6C0C99F818E,0x16BBD5E27F67E3A1,0xA59D34EE25D233CD,0x98F8AE853B54A2D9, + 0x6DF70AFACB105E79,0x795D2E99B9BBA425,0x8E437B6744334178,0x0186F6CE886682F0, + 0xEBF092A3BB347BD2,0xBCD7FA62F18D1D55,0xADD9D7D011C5571E,0x0BD3E471B1BDFFDE, + 0xAA6C2F808EEAFEF4,0x5EE57D31F6C880A4,0xF50FA47FF044FCA0,0x1ADDC9C351F5B595, + 0xEA76646D3352F922,0x0000000000000000,0x85909F16F58EBEA6,0x46294573AAF12CCC, + 0x0A5512BF39DB7D2E,0x78DBD85731DD26D5,0x29CFBE086C2D6B48,0x218B5D36583A0F9B, + 0x152CD2ADFACD78AC,0x83A39188E2C795BC,0xC3B9DA655F7F926A,0x9ECBA01B2C1D89C3, + 0x07B5F8509F2FA9EA,0x7EE8D6C926940DCF,0x36B67E1AAF3B6ECA,0x86079859702425AB, + 0xFB7849DFD31AB369,0x4C7C57CC932A51E2,0xD96413A60E8A27FF,0x263EA566C715A671, + 0x6C71FC344376DC89,0x4A4F595284637AF8,0xDAF314E98B20BCF2,0x572768C14AB96687, + 0x1088DB7C682EC8BB,0x887075F9537A6A62,0x2E7A4658F302C2A2,0x619116DBE582084D, + 0xA87DDE018326E709,0xDCC01A779C6997E8,0xEDC39C3DAC7D50C8,0xA60A33A1A078A8C0, + 0xC1A82BE452B38B97,0x3F746BEA134A88E9,0xA228CCBEBAFD9A27,0xABEAD94E068C7C04, + 0xF48952B178227E50,0x5CF48CB0FB049959,0x6017E0156DE48ABD,0x4438B4F2A73D3531, + 0x8C528AE649FF5885,0xB515EF924DFCFB76,0x0C661C212E925634,0xB493195CC59A7986, + 0x9CDA519A21D1903E,0x32948105B5BE5C2D,0x194ACE8CD45F2E98,0x438D4CA238129CDB, + 0x9B6FA9CABEFE39D4,0x81B26009EF0B8C41,0xDED1EBF691A58E15,0x4E6DA64D9EE6481F, + 0x54B06F8ECF13FD8A,0x49D85E1D01C9E1F5,0xAFC826511C094EE3,0xF698A33075EE67AD, + 0x5AC7822EEC4DB243,0x8DD47C28C199DA75,0x89F68337DB1CE892,0xCDCE37C57C21DDA3, + 0x530597DE503C5460,0x6A42F2AA543FF793,0x5D727A7E73621BA9,0xE232875307459DF1, + 0x56A19E0FC2DFE477,0xC61DD3B4CD9C227D,0xE5877F03986A341B,0x949EB2A415C6F4ED, + 0x6206119460289340,0x6380E75AE84E11B0,0x8BE772B6D6D0F16F,0x50929091D596CF6D, + 0xE86795EC3E9EE0DF,0x7CF927482B581432,0xC86A3E14EEC26DB4,0x7119CDA78DACC0F6, + 0xE40189CD100CB6EB,0x92ADBC3A028FDFF7,0xB2A017C2D2D3529C,0x200DABF8D05C8D6B, + 0x34A78F9BA2F77737,0xE3B4719D8F231F01,0x45BE423C2F5BB7C1,0xF71E55FEFD88E55D, + 0x6853032B59F3EE6E,0x65B3E9C4FF073AAA,0x772AC3399AE5EBEC,0x87816E97F842A75B, + 0x110E2DB2E0484A4B,0x331277CB3DD8DEDD,0xBD510CAC79EB9FA5,0x352179552A91F5C7 +},{ + 0x8AB0A96846E06A6D,0x43C7E80B4BF0B33A,0x08C9B3546B161EE5,0x39F1C235EBA990BE, + 0xC1BEF2376606C7B2,0x2C209233614569AA,0xEB01523B6FC3289A,0x946953AB935ACEDD, + 0x272838F63E13340E,0x8B0455ECA12BA052,0x77A1B2C4978FF8A2,0xA55122CA13E54086, + 0x2276135862D3F1CD,0xDB8DDFDE08B76CFE,0x5D1E12C89E4A178A,0x0E56816B03969867, + 0xEE5F79953303ED59,0xAFED748BAB78D71D,0x6D929F2DF93E53EE,0xF5D8A8F8BA798C2A, + 0xF619B1698E39CF6B,0x95DDAF2F749104E2,0xEC2A9C80E0886427,0xCE5C8FD8825B95EA, + 0xC4E0D9993AC60271,0x4699C3A5173076F9,0x3D1B151F50A29F42,0x9ED505EA2BC75946, + 0x34665ACFDC7F4B98,0x61B1FB53292342F7,0xC721C0080E864130,0x8693CD1696FD7B74, + 0x872731927136B14B,0xD3446C8A63A1721B,0x669A35E8A6680E4A,0xCAB658F239509A16, + 0xA4E5DE4EF42E8AB9,0x37A7435EE83F08D9,0x134E6239E26C7F96,0x82791A3C2DF67488, + 0x3F6EF00A8329163C,0x8E5A7E42FDEB6591,0x5CAAEE4C7981DDB5,0x19F234785AF1E80D, + 0x255DDDE3ED98BD70,0x50898A32A99CCCAC,0x28CA4519DA4E6656,0xAE59880F4CB31D22, + 0x0D9798FA37D6DB26,0x32F968F0B4FFCD1A,0xA00F09644F258545,0xFA3AD5175E24DE72, + 0xF46C547C5DB24615,0x713E80FBFF0F7E20,0x7843CF2B73D2AAFA,0xBD17EA36AEDF62B4, + 0xFD111BACD16F92CF,0x4ABAA7DBC72D67E0,0xB3416B5DAD49FAD3,0xBCA316B24914A88B, + 0x15D150068AECF914,0xE27C1DEBE31EFC40,0x4FE48C759BEDA223,0x7EDCFD141B522C78, + 0x4E5070F17C26681C,0xE696CAC15815F3BC,0x35D2A64B3BB481A7,0x800CFF29FE7DFDF6, + 0x1ED9FAC3D5BAA4B0,0x6C2663A91EF599D1,0x03C1199134404341,0xF7AD4DED69F20554, + 0xCD9D9649B61BD6AB,0xC8C3BDE7EADB1368,0xD131899FB02AFB65,0x1D18E352E1FAE7F1, + 0xDA39235AEF7CA6C1,0xA1BBF5E0A8EE4F7A,0x91377805CF9A0B1E,0x3138716180BF8E5B, + 0xD9F83ACBDB3CE580,0x0275E515D38B897E,0x472D3F21F0FBBCC6,0x2D946EB7868EA395, + 0xBA3C248D21942E09,0xE7223645BFDE3983,0xFF64FEB902E41BB1,0xC97741630D10D957, + 0xC3CB1722B58D4ECC,0xA27AEC719CAE0C3B,0x99FECB51A48C15FB,0x1465AC826D27332B, + 0xE1BD047AD75EBF01,0x79F733AF941960C5,0x672EC96C41A3C475,0xC27FEBA6524684F3, + 0x64EFD0FD75E38734,0xED9E60040743AE18,0xFB8E2993B9EF144D,0x38453EB10C625A81, + 0x6978480742355C12,0x48CF42CE14A6EE9E,0x1CAC1FD606312DCE,0x7B82D6BA4792E9BB, + 0x9D141C7B1F871A07,0x5616B80DC11C4A2E,0xB849C198F21FA777,0x7CA91801C8D9A506, + 0xB1348E487EC273AD,0x41B20D1E987B3A44,0x7460AB55A3CFBBE3,0x84E628034576F20A, + 0x1B87D16D897A6173,0x0FE27DEFE45D5258,0x83CDE6B8CA3DBEB7,0x0C23647ED01D1119, + 0x7A362A3EA0592384,0xB61F40F3F1893F10,0x75D457D1440471DC,0x4558DA34237035B8, + 0xDCA6116587FC2043,0x8D9B67D3C9AB26D0,0x2B0B5C88EE0E2517,0x6FE77A382AB5DA90, + 0x269CC472D9D8FE31,0x63C41E46FAA8CB89,0xB7ABBC771642F52F,0x7D1DE4852F126F39, + 0xA8C6BA3024339BA0,0x600507D7CEE888C8,0x8FEE82C61A20AFAE,0x57A2448926D78011, + 0xFCA5E72836A458F0,0x072BCEBB8F4B4CBD,0x497BBE4AF36D24A1,0x3CAFE99BB769557D, + 0x12FA9EBD05A7B5A9,0xE8C04BAA5B836BDB,0x4273148FAC3B7905,0x908384812851C121, + 0xE557D3506C55B0FD,0x72FF996ACB4F3D61,0x3EDA0C8E64E2DC03,0xF0868356E6B949E9, + 0x04EAD72ABB0B0FFC,0x17A4B5135967706A,0xE3C8E16F04D5367F,0xF84F30028DAF570C, + 0x1846C8FCBD3A2232,0x5B8120F7F6CA9108,0xD46FA231ECEA3EA6,0x334D947453340725, + 0x58403966C28AD249,0xBED6F3A79A9F21F5,0x68CCB483A5FE962D,0xD085751B57E1315A, + 0xFED0023DE52FD18E,0x4B0E5B5F20E6ADDF,0x1A332DE96EB1AB4C,0xA3CE10F57B65C604, + 0x108F7BA8D62C3CD7,0xAB07A3A11073D8E1,0x6B0DAD1291BED56C,0xF2F366433532C097, + 0x2E557726B2CEE0D4,0x0000000000000000,0xCB02A476DE9B5029,0xE4E32FD48B9E7AC2, + 0x734B65EE2C84F75E,0x6E5386BCCD7E10AF,0x01B4FC84E7CBCA3F,0xCFE8735C65905FD5, + 0x3613BFDA0FF4C2E6,0x113B872C31E7F6E8,0x2FE18BA255052AEB,0xE974B72EBC48A1E4, + 0x0ABC5641B89D979B,0xB46AA5E62202B66E,0x44EC26B0C4BBFF87,0xA6903B5B27A503C7, + 0x7F680190FC99E647,0x97A84A3AA71A8D9C,0xDD12EDE16037EA7C,0xC554251DDD0DC84E, + 0x88C54C7D956BE313,0x4D91696048662B5D,0xB08072CC9909B992,0xB5DE5962C5C97C51, + 0x81B803AD19B637C9,0xB2F597D94A8230EC,0x0B08AAC55F565DA4,0xF1327FD2017283D6, + 0xAD98919E78F35E63,0x6AB9519676751F53,0x24E921670A53774F,0xB9FD3D1C15D46D48, + 0x92F66194FBDA485F,0x5A35DC7311015B37,0xDED3F4705477A93D,0xC00A0EB381CD0D8D, + 0xBB88D809C65FE436,0x16104997BEACBA55,0x21B70AC95693B28C,0x59F4C5E225411876, + 0xD5DB5EB50B21F499,0x55D7A19CF55C096F,0xA97246B4C3F8519F,0x8552D487A2BD3835, + 0x54635D181297C350,0x23C2EFDC85183BF2,0x9F61F96ECC0C9379,0x534893A39DDC8FED, + 0x5EDF0B59AA0A54CB,0xAC2C6D1A9F38945C,0xD7AEBBA0D8AA7DE7,0x2ABFA00C09C5EF28, + 0xD84CC64F3CF72FBF,0x2003F64DB15878B3,0xA724C7DFC06EC9F8,0x069F323F68808682, + 0xCC296ACD51D01C94,0x055E2BAE5CC0C5C3,0x6270E2C21D6301B6,0x3B842720382219C0, + 0xD2F0900E846AB824,0x52FC6F277A1745D2,0xC6953C8CE94D8B0F,0xE009F8FE3095753E, + 0x655B2C7992284D0B,0x984A37D54347DFC4,0xEAB5AEBF8808E2A5,0x9A3FD2C090CC56BA, + 0x9CA0E0FFF84CD038,0x4C2595E4AFADE162,0xDF6708F4B3BC6302,0xBF620F237D54EBCA, + 0x93429D101C118260,0x097D4FD08CDDD4DA,0x8C2F9B572E60ECEF,0x708A7C7F18C4B41F, + 0x3A30DBA4DFE9D3FF,0x4006F19A7FB0F07B,0x5F6BF7DD4DC19EF4,0x1F6D064732716E8F, + 0xF9FBCC866A649D33,0x308C8DE567744464,0x8971B0F972A0292C,0xD61A47243F61B7D8, + 0xEFEB8511D4C82766,0x961CB6BE40D147A3,0xAAB35F25F7B812DE,0x76154E407044329D, + 0x513D76B64E570693,0xF3479AC7D2F90AA8,0x9B8B2E4477079C85,0x297EB99D3D85AC69 +},{ + 0x7E37E62DFC7D40C3,0x776F25A4EE939E5B,0xE045C850DD8FB5AD,0x86ED5BA711FF1952, + 0xE91D0BD9CF616B35,0x37E0AB256E408FFB,0x9607F6C031025A7A,0x0B02F5E116D23C9D, + 0xF3D8486BFB50650C,0x621CFF27C40875F5,0x7D40CB71FA5FD34A,0x6DAA6616DAA29062, + 0x9F5F354923EC84E2,0xEC847C3DC507C3B3,0x025A3668043CE205,0xA8BF9E6C4DAC0B19, + 0xFA808BE2E9BEBB94,0xB5B99C5277C74FA3,0x78D9BC95F0397BCC,0xE332E50CDBAD2624, + 0xC74FCE129332797E,0x1729ECEB2EA709AB,0xC2D6B9F69954D1F8,0x5D898CBFBAB8551A, + 0x859A76FB17DD8ADB,0x1BE85886362F7FB5,0xF6413F8FF136CD8A,0xD3110FA5BBB7E35C, + 0x0A2FEED514CC4D11,0xE83010EDCD7F1AB9,0xA1E75DE55F42D581,0xEEDE4A55C13B21B6, + 0xF2F5535FF94E1480,0x0CC1B46D1888761E,0xBCE15FDB6529913B,0x2D25E8975A7181C2, + 0x71817F1CE2D7A554,0x2E52C5CB5C53124B,0xF9F7A6BEEF9C281D,0x9E722E7D21F2F56E, + 0xCE170D9B81DCA7E6,0x0E9B82051CB4941B,0x1E712F623C49D733,0x21E45CFA42F9F7DC, + 0xCB8E7A7F8BBA0F60,0x8E98831A010FB646,0x474CCF0D8E895B23,0xA99285584FB27A95, + 0x8CC2B57205335443,0x42D5B8E984EFF3A5,0x012D1B34021E718C,0x57A6626AAE74180B, + 0xFF19FC06E3D81312,0x35BA9D4D6A7C6DFE,0xC9D44C178F86ED65,0x506523E6A02E5288, + 0x03772D5C06229389,0x8B01F4FE0B691EC0,0xF8DABD8AED825991,0x4C4E3AEC985B67BE, + 0xB10DF0827FBF96A9,0x6A69279AD4F8DAE1,0xE78689DCD3D5FF2E,0x812E1A2B1FA553D1, + 0xFBAD90D6EBA0CA18,0x1AC543B234310E39,0x1604F7DF2CB97827,0xA6241C6951189F02, + 0x753513CCEAAF7C5E,0x64F2A59FC84C4EFA,0x247D2B1E489F5F5A,0xDB64D718AB474C48, + 0x79F4A7A1F2270A40,0x1573DA832A9BEBAE,0x3497867968621C72,0x514838D2A2302304, + 0xF0AF6537FD72F685,0x1D06023E3A6B44BA,0x678588C3CE6EDD73,0x66A893F7CC70ACFF, + 0xD4D24E29B5EDA9DF,0x3856321470EA6A6C,0x07C3418C0E5A4A83,0x2BCBB22F5635BACD, + 0x04B46CD00878D90A,0x06EE5AB80C443B0F,0x3B211F4876C8F9E5,0x0958C38912EEDE98, + 0xD14B39CDBF8B0159,0x397B292072F41BE0,0x87C0409313E168DE,0xAD26E98847CAA39F, + 0x4E140C849C6785BB,0xD5FF551DB7F3D853,0xA0CA46D15D5CA40D,0xCD6020C787FE346F, + 0x84B76DCF15C3FB57,0xDEFDA0FCA121E4CE,0x4B8D7B6096012D3D,0x9AC642AD298A2C64, + 0x0875D8BD10F0AF14,0xB357C6EA7B8374AC,0x4D6321D89A451632,0xEDA96709C719B23F, + 0xF76C24BBF328BC06,0xC662D526912C08F2,0x3CE25EC47892B366,0xB978283F6F4F39BD, + 0xC08C8F9E9D6833FD,0x4F3917B09E79F437,0x593DE06FB2C08C10,0xD6887841B1D14BDA, + 0x19B26EEE32139DB0,0xB494876675D93E2F,0x825937771987C058,0x90E9AC783D466175, + 0xF1827E03FF6C8709,0x945DC0A8353EB87F,0x4516F9658AB5B926,0x3F9573987EB020EF, + 0xB855330B6D514831,0x2AE6A91B542BCB41,0x6331E413C6160479,0x408F8E8180D311A0, + 0xEFF35161C325503A,0xD06622F9BD9570D5,0x8876D9A20D4B8D49,0xA5533135573A0C8B, + 0xE168D364DF91C421,0xF41B09E7F50A2F8F,0x12B09B0F24C1A12D,0xDA49CC2CA9593DC4, + 0x1F5C34563E57A6BF,0x54D14F36A8568B82,0xAF7CDFE043F6419A,0xEA6A2685C943F8BC, + 0xE5DCBFB4D7E91D2B,0xB27ADDDE799D0520,0x6B443CAED6E6AB6D,0x7BAE91C9F61BE845, + 0x3EB868AC7CAE5163,0x11C7B65322E332A4,0xD23C1491B9A992D0,0x8FB5982E0311C7CA, + 0x70AC6428E0C9D4D8,0x895BC2960F55FCC5,0x76423E90EC8DEFD7,0x6FF0507EDE9E7267, + 0x3DCF45F07A8CC2EA,0x4AA06054941F5CB1,0x5810FB5BB0DEFD9C,0x5EFEA1E3BC9AC693, + 0x6EDD4B4ADC8003EB,0x741808F8E8B10DD2,0x145EC1B728859A22,0x28BC9F7350172944, + 0x270A06424EBDCCD3,0x972AEDF4331C2BF6,0x059977E40A66A886,0x2550302A4A812ED6, + 0xDD8A8DA0A7037747,0xC515F87A970E9B7B,0x3023EAA9601AC578,0xB7E3AA3A73FBADA6, + 0x0FB699311EAAE597,0x0000000000000000,0x310EF19D6204B4F4,0x229371A644DB6455, + 0x0DECAF591A960792,0x5CA4978BB8A62496,0x1C2B190A38753536,0x41A295B582CD602C, + 0x3279DCC16426277D,0xC1A194AA9F764271,0x139D803B26DFD0A1,0xAE51C4D441E83016, + 0xD813FA44AD65DFC1,0xAC0BF2BC45D4D213,0x23BE6A9246C515D9,0x49D74D08923DCF38, + 0x9D05032127D066E7,0x2F7FDEFF5E4D63C7,0xA47E2A0155247D07,0x99B16FF12FA8BFED, + 0x4661D4398C972AAF,0xDFD0BBC8A33F9542,0xDCA79694A51D06CB,0xB020EBB67DA1E725, + 0xBA0F0563696DAA34,0xE4F1A480D5F76CA7,0xC438E34E9510EAF7,0x939E81243B64F2FC, + 0x8DEFAE46072D25CF,0x2C08F3A3586FF04E,0xD7A56375B3CF3A56,0x20C947CE40E78650, + 0x43F8A3DD86F18229,0x568B795EAC6A6987,0x8003011F1DBB225D,0xF53612D3F7145E03, + 0x189F75DA300DEC3C,0x9570DB9C3720C9F3,0xBB221E576B73DBB8,0x72F65240E4F536DD, + 0x443BE25188ABC8AA,0xE21FFE38D9B357A8,0xFD43CA6EE7E4F117,0xCAA3614B89A47EEC, + 0xFE34E732E1C6629E,0x83742C431B99B1D4,0xCF3A16AF83C2D66A,0xAAE5A8044990E91C, + 0x26271D764CA3BD5F,0x91C4B74C3F5810F9,0x7C6DD045F841A2C6,0x7F1AFD19FE63314F, + 0xC8F957238D989CE9,0xA709075D5306EE8E,0x55FC5402AA48FA0E,0x48FA563C9023BEB4, + 0x65DFBEABCA523F76,0x6C877D22D8BCE1EE,0xCC4D3BF385E045E3,0xBEBB69B36115733E, + 0x10EAAD6720FD4328,0xB6CEB10E71E5DC2A,0xBDCC44EF6737E0B7,0x523F158EA412B08D, + 0x989C74C52DB6CE61,0x9BEB59992B945DE8,0x8A2CEFCA09776F4C,0xA3BD6B8D5B7E3784, + 0xEB473DB1CB5D8930,0xC3FBA2C29B4AA074,0x9C28181525CE176B,0x683311F2D0C438E4, + 0x5FD3BAD7BE84B71F,0xFC6ED15AE5FA809B,0x36CDB0116C5EFE77,0x29918447520958C8, + 0xA29070B959604608,0x53120EBAA60CC101,0x3A0C047C74D68869,0x691E0AC6D2DA4968, + 0x73DB4974E6EB4751,0x7A838AFDF40599C9,0x5A4ACD33B4E21F99,0x6046C94FC03497F0, + 0xE6AB92E8D1CB8EA2,0x3354C7F5663856F1,0xD93EE170AF7BAE4D,0x616BD27BC22AE67C, + 0x92B39A10397A8370,0xABC8B3304B8E9890,0xBF967287630B02B2,0x5B67D607B6FC6E15 +},{ + 0xD031C397CE553FE6,0x16BA5B01B006B525,0xA89BADE6296E70C8,0x6A1F525D77D3435B, + 0x6E103570573DFA0B,0x660EFB2A17FC95AB,0x76327A9E97634BF6,0x4BAD9D6462458BF5, + 0xF1830CAEDBC3F748,0xC5C8F542669131FF,0x95044A1CDC48B0CB,0x892962DF3CF8B866, + 0xB0B9E208E930C135,0xA14FB3F0611A767C,0x8D2605F21C160136,0xD6B71922FECC549E, + 0x37089438A5907D8B,0x0B5DA38E5803D49C,0x5A5BCC9CEA6F3CBC,0xEDAE246D3B73FFE5, + 0xD2B87E0FDE22EDCE,0x5E54ABB1CA8185EC,0x1DE7F88FE80561B9,0xAD5E1A870135A08C, + 0x2F2ADBD665CECC76,0x5780B5A782F58358,0x3EDC8A2EEDE47B3F,0xC9D95C3506BEE70F, + 0x83BE111D6C4E05EE,0xA603B90959367410,0x103C81B4809FDE5D,0x2C69B6027D0C774A, + 0x399080D7D5C87953,0x09D41E16487406B4,0xCDD63B1826505E5F,0xF99DC2F49B0298E8, + 0x9CD0540A943CB67F,0xBCA84B7F891F17C5,0x723D1DB3B78DF2A6,0x78AA6E71E73B4F2E, + 0x1433E699A071670D,0x84F21BE454620782,0x98DF3327B4D20F2F,0xF049DCE2D3769E5C, + 0xDB6C60199656EB7A,0x648746B2078B4783,0x32CD23598DCBADCF,0x1EA4955BF0C7DA85, + 0xE9A143401B9D46B5,0xFD92A5D9BBEC21B8,0xC8138C790E0B8E1B,0x2EE00B9A6D7BA562, + 0xF85712B893B7F1FC,0xEB28FED80BEA949D,0x564A65EB8A40EA4C,0x6C9988E8474A2823, + 0x4535898B121D8F2D,0xABD8C03231ACCBF4,0xBA2E91CAB9867CBD,0x7960BE3DEF8E263A, + 0x0C11A977602FD6F0,0xCB50E1AD16C93527,0xEAE22E94035FFD89,0x2866D12F5DE2CE1A, + 0xFF1B1841AB9BF390,0x9F9339DE8CFE0D43,0x964727C8C48A0BF7,0x524502C6AAAE531C, + 0x9B9C5EF3AC10B413,0x4FA2FA4942AB32A5,0x3F165A62E551122B,0xC74148DA76E6E3D7, + 0x924840E5E464B2A7,0xD372AE43D69784DA,0x233B72A105E11A86,0xA48A04914941A638, + 0xB4B68525C9DE7865,0xDDEABAACA6CF8002,0x0A9773C250B6BD88,0xC284FFBB5EBD3393, + 0x8BA0DF472C8F6A4E,0x2AEF6CB74D951C32,0x427983722A318D41,0x73F7CDFFBF389BB2, + 0x074C0AF9382C026C,0x8A6A0F0B243A035A,0x6FDAE53C5F88931F,0xC68B98967E538AC3, + 0x44FF59C71AA8E639,0xE2FCE0CE439E9229,0xA20CDE2479D8CD40,0x19E89FA2C8EBD8E9, + 0xF446BBCFF398270C,0x43B3533E2284E455,0xD82F0DCD8E945046,0x51066F12B26CE820, + 0xE73957AF6BC5426D,0x081ECE5A40C16FA0,0x3B193D4FC5BFAB7B,0x7FE66488DF174D42, + 0x0E9814EF705804D8,0x8137AC857C39D7C6,0xB1733244E185A821,0x695C3F896F11F867, + 0xF6CF0657E3EFF524,0x1AABF276D02963D5,0x2DA3664E75B91E5E,0x0289BD981077D228, + 0x90C1FD7DF413608F,0x3C5537B6FD93A917,0xAA12107E3919A2E0,0x0686DAB530996B78, + 0xDAA6B0559EE3826E,0xC34E2FF756085A87,0x6D5358A44FFF4137,0xFC587595B35948AC, + 0x7CA5095CC7D5F67E,0xFB147F6C8B754AC0,0xBFEB26AB91DDACF9,0x6896EFC567A49173, + 0xCA9A31E11E7C5C33,0xBBE44186B13315A9,0x0DDB793B689ABFE4,0x70B4A02BA7FA208E, + 0xE47A3A7B7307F951,0x8CECD5BE14A36822,0xEEED49B923B144D9,0x17708B4DB8B3DC31, + 0x6088219F2765FED3,0xB3FA8FDCF1F27A09,0x910B2D31FCA6099B,0x0F52C4A378ED6DCC, + 0x50CCBF5EBAD98134,0x6BD582117F662A4F,0x94CE9A50D4FDD9DF,0x2B25BCFB45207526, + 0x67C42B661F49FCBF,0x492420FC723259DD,0x03436DD418C2BB3C,0x1F6E4517F872B391, + 0xA08563BC69AF1F68,0xD43EA4BAEEBB86B6,0x01CAD04C08B56914,0xAC94CACB0980C998, + 0x54C3D8739A373864,0x26FEC5C02DBACAC2,0xDEA9D778BE0D3B3E,0x040F672D20EEB950, + 0xE5B0EA377BB29045,0xF30AB136CBB42560,0x62019C0737122CFB,0xE86B930C13282FA1, + 0xCC1CEB542EE5374B,0x538FD28AA21B3A08,0x1B61223AD89C0AC1,0x36C24474AD25149F, + 0x7A23D3E9F74C9D06,0xBE21F6E79968C5ED,0xCF5F868036278C77,0xF705D61BEB5A9C30, + 0x4D2B47D152DCE08D,0x5F9E7BFDC234ECF8,0x247778583DCD18EA,0x867BA67C4415D5AA, + 0x4CE1979D5A698999,0x0000000000000000,0xEC64F42133C696F1,0xB57C5569C16B1171, + 0xC1C7926F467F88AF,0x654D96FE0F3E2E97,0x15F936D5A8C40E19,0xB8A72C52A9F1AE95, + 0xA9517DAA21DB19DC,0x58D27104FA18EE94,0x5918A148F2AD8780,0x5CDD1629DAF657C4, + 0x8274C15164FB6CFA,0xD1FB13DBC6E056F2,0x7D6FD910CF609F6A,0xB63F38BDD9A9AA4D, + 0x3D9FE7FAF526C003,0x74BBC706871499DE,0xDF630734B6B8522A,0x3AD3ED03CD0AC26F, + 0xFADEAF2083C023D4,0xC00D42234ECAE1BB,0x8538CBA85CD76E96,0xC402250E6E2458EB, + 0x47BC3413026A5D05,0xAFD7A71F114272A4,0x978DF784CC3F62E3,0xB96DFC1EA144C781, + 0x21B2CF391596C8AE,0x318E4E8D950916F3,0xCE9556CC3E92E563,0x385A509BDD7D1047, + 0x358129A0B5E7AFA3,0xE6F387E363702B79,0xE0755D5653E94001,0x7BE903A5FFF9F412, + 0x12B53C2C90E80C75,0x3307F315857EC4DB,0x8FAFB86A0C61D31E,0xD9E5DD8186213952, + 0x77F8AAD29FD622E2,0x25BDA814357871FE,0x7571174A8FA1F0CA,0x137FEC60985D6561, + 0x30449EC19DBC7FE7,0xA540D4DD41F4CF2C,0xDC206AE0AE7AE916,0x5B911CD0E2DA55A8, + 0xB2305F90F947131D,0x344BF9ECBD52C6B7,0x5D17C665D2433ED0,0x18224FEEC05EB1FD, + 0x9E59E992844B6457,0x9A568EBFA4A5DD07,0xA3C60E68716DA454,0x7E2CB4C4D7A22456, + 0x87B176304CA0BCBE,0x413AEEA632F3367D,0x9915E36BBC67663B,0x40F03EEA3A465F69, + 0x1C2D28C3E0B008AD,0x4E682A054A1E5BB1,0x05C5B761285BD044,0xE1BF8D1A5B5C2915, + 0xF2C0617AC3014C74,0xB7F5E8F1D11CC359,0x63CB4C4B3FA745EF,0x9D1A84469C89DF6B, + 0xE33630824B2BFB3D,0xD5F474F6E60EEFA2,0xF58C6B83FB2D4E18,0x4676E45F0ADF3411, + 0x20781F751D23A1BA,0xBD629B3381AA7ED1,0xAE1D775319F71BB0,0xFED1C80DA32E9A84, + 0x5509083F92825170,0x29AC01635557A70E,0xA7C9694551831D04,0x8E65682604D4BA0A, + 0x11F651F8882AB749,0xD77DC96EF6793D8A,0xEF2799F52B042DCD,0x48EEF0B07A8730C9, + 0x22F1A2ED0D547392,0x6142F1D32FD097C7,0x4A674D286AF0E2E1,0x80FD7CC9748CBED2, + 0x717E7067AF4F499A,0x938290A9ECD1DBB3,0x88E3B293344DD172,0x2734158C250FA3D6 +}}; + +// Constant values for KeySchedule function +const unsigned char C[12][64] = {{ + 0xB1,0x08,0x5B,0xDA,0x1E,0xCA,0xDA,0xE9,0xEB,0xCB,0x2F,0x81,0xC0,0x65,0x7C,0x1F, + 0x2F,0x6A,0x76,0x43,0x2E,0x45,0xD0,0x16,0x71,0x4E,0xB8,0x8D,0x75,0x85,0xC4,0xFC, + 0x4B,0x7C,0xE0,0x91,0x92,0x67,0x69,0x01,0xA2,0x42,0x2A,0x08,0xA4,0x60,0xD3,0x15, + 0x05,0x76,0x74,0x36,0xCC,0x74,0x4D,0x23,0xDD,0x80,0x65,0x59,0xF2,0xA6,0x45,0x07 +},{ + 0x6F,0xA3,0xB5,0x8A,0xA9,0x9D,0x2F,0x1A,0x4F,0xE3,0x9D,0x46,0x0F,0x70,0xB5,0xD7, + 0xF3,0xFE,0xEA,0x72,0x0A,0x23,0x2B,0x98,0x61,0xD5,0x5E,0x0F,0x16,0xB5,0x01,0x31, + 0x9A,0xB5,0x17,0x6B,0x12,0xD6,0x99,0x58,0x5C,0xB5,0x61,0xC2,0xDB,0x0A,0xA7,0xCA, + 0x55,0xDD,0xA2,0x1B,0xD7,0xCB,0xCD,0x56,0xE6,0x79,0x04,0x70,0x21,0xB1,0x9B,0xB7 +},{ + 0xF5,0x74,0xDC,0xAC,0x2B,0xCE,0x2F,0xC7,0x0A,0x39,0xFC,0x28,0x6A,0x3D,0x84,0x35, + 0x06,0xF1,0x5E,0x5F,0x52,0x9C,0x1F,0x8B,0xF2,0xEA,0x75,0x14,0xB1,0x29,0x7B,0x7B, + 0xD3,0xE2,0x0F,0xE4,0x90,0x35,0x9E,0xB1,0xC1,0xC9,0x3A,0x37,0x60,0x62,0xDB,0x09, + 0xC2,0xB6,0xF4,0x43,0x86,0x7A,0xDB,0x31,0x99,0x1E,0x96,0xF5,0x0A,0xBA,0x0A,0xB2 +},{ + 0xEF,0x1F,0xDF,0xB3,0xE8,0x15,0x66,0xD2,0xF9,0x48,0xE1,0xA0,0x5D,0x71,0xE4,0xDD, + 0x48,0x8E,0x85,0x7E,0x33,0x5C,0x3C,0x7D,0x9D,0x72,0x1C,0xAD,0x68,0x5E,0x35,0x3F, + 0xA9,0xD7,0x2C,0x82,0xED,0x03,0xD6,0x75,0xD8,0xB7,0x13,0x33,0x93,0x52,0x03,0xBE, + 0x34,0x53,0xEA,0xA1,0x93,0xE8,0x37,0xF1,0x22,0x0C,0xBE,0xBC,0x84,0xE3,0xD1,0x2E +},{ + 0x4B,0xEA,0x6B,0xAC,0xAD,0x47,0x47,0x99,0x9A,0x3F,0x41,0x0C,0x6C,0xA9,0x23,0x63, + 0x7F,0x15,0x1C,0x1F,0x16,0x86,0x10,0x4A,0x35,0x9E,0x35,0xD7,0x80,0x0F,0xFF,0xBD, + 0xBF,0xCD,0x17,0x47,0x25,0x3A,0xF5,0xA3,0xDF,0xFF,0x00,0xB7,0x23,0x27,0x1A,0x16, + 0x7A,0x56,0xA2,0x7E,0xA9,0xEA,0x63,0xF5,0x60,0x17,0x58,0xFD,0x7C,0x6C,0xFE,0x57 +},{ + 0xAE,0x4F,0xAE,0xAE,0x1D,0x3A,0xD3,0xD9,0x6F,0xA4,0xC3,0x3B,0x7A,0x30,0x39,0xC0, + 0x2D,0x66,0xC4,0xF9,0x51,0x42,0xA4,0x6C,0x18,0x7F,0x9A,0xB4,0x9A,0xF0,0x8E,0xC6, + 0xCF,0xFA,0xA6,0xB7,0x1C,0x9A,0xB7,0xB4,0x0A,0xF2,0x1F,0x66,0xC2,0xBE,0xC6,0xB6, + 0xBF,0x71,0xC5,0x72,0x36,0x90,0x4F,0x35,0xFA,0x68,0x40,0x7A,0x46,0x64,0x7D,0x6E +},{ + 0xF4,0xC7,0x0E,0x16,0xEE,0xAA,0xC5,0xEC,0x51,0xAC,0x86,0xFE,0xBF,0x24,0x09,0x54, + 0x39,0x9E,0xC6,0xC7,0xE6,0xBF,0x87,0xC9,0xD3,0x47,0x3E,0x33,0x19,0x7A,0x93,0xC9, + 0x09,0x92,0xAB,0xC5,0x2D,0x82,0x2C,0x37,0x06,0x47,0x69,0x83,0x28,0x4A,0x05,0x04, + 0x35,0x17,0x45,0x4C,0xA2,0x3C,0x4A,0xF3,0x88,0x86,0x56,0x4D,0x3A,0x14,0xD4,0x93 +},{ + 0x9B,0x1F,0x5B,0x42,0x4D,0x93,0xC9,0xA7,0x03,0xE7,0xAA,0x02,0x0C,0x6E,0x41,0x41, + 0x4E,0xB7,0xF8,0x71,0x9C,0x36,0xDE,0x1E,0x89,0xB4,0x44,0x3B,0x4D,0xDB,0xC4,0x9A, + 0xF4,0x89,0x2B,0xCB,0x92,0x9B,0x06,0x90,0x69,0xD1,0x8D,0x2B,0xD1,0xA5,0xC4,0x2F, + 0x36,0xAC,0xC2,0x35,0x59,0x51,0xA8,0xD9,0xA4,0x7F,0x0D,0xD4,0xBF,0x02,0xE7,0x1E +},{ + 0x37,0x8F,0x5A,0x54,0x16,0x31,0x22,0x9B,0x94,0x4C,0x9A,0xD8,0xEC,0x16,0x5F,0xDE, + 0x3A,0x7D,0x3A,0x1B,0x25,0x89,0x42,0x24,0x3C,0xD9,0x55,0xB7,0xE0,0x0D,0x09,0x84, + 0x80,0x0A,0x44,0x0B,0xDB,0xB2,0xCE,0xB1,0x7B,0x2B,0x8A,0x9A,0xA6,0x07,0x9C,0x54, + 0x0E,0x38,0xDC,0x92,0xCB,0x1F,0x2A,0x60,0x72,0x61,0x44,0x51,0x83,0x23,0x5A,0xDB +},{ + 0xAB,0xBE,0xDE,0xA6,0x80,0x05,0x6F,0x52,0x38,0x2A,0xE5,0x48,0xB2,0xE4,0xF3,0xF3, + 0x89,0x41,0xE7,0x1C,0xFF,0x8A,0x78,0xDB,0x1F,0xFF,0xE1,0x8A,0x1B,0x33,0x61,0x03, + 0x9F,0xE7,0x67,0x02,0xAF,0x69,0x33,0x4B,0x7A,0x1E,0x6C,0x30,0x3B,0x76,0x52,0xF4, + 0x36,0x98,0xFA,0xD1,0x15,0x3B,0xB6,0xC3,0x74,0xB4,0xC7,0xFB,0x98,0x45,0x9C,0xED +},{ + 0x7B,0xCD,0x9E,0xD0,0xEF,0xC8,0x89,0xFB,0x30,0x02,0xC6,0xCD,0x63,0x5A,0xFE,0x94, + 0xD8,0xFA,0x6B,0xBB,0xEB,0xAB,0x07,0x61,0x20,0x01,0x80,0x21,0x14,0x84,0x66,0x79, + 0x8A,0x1D,0x71,0xEF,0xEA,0x48,0xB9,0xCA,0xEF,0xBA,0xCD,0x1D,0x7D,0x47,0x6E,0x98, + 0xDE,0xA2,0x59,0x4A,0xC0,0x6F,0xD8,0x5D,0x6B,0xCA,0xA4,0xCD,0x81,0xF3,0x2D,0x1B +},{ + 0x37,0x8E,0xE7,0x67,0xF1,0x16,0x31,0xBA,0xD2,0x13,0x80,0xB0,0x04,0x49,0xB1,0x7A, + 0xCD,0xA4,0x3C,0x32,0xBC,0xDF,0x1D,0x77,0xF8,0x20,0x12,0xD4,0x30,0x21,0x9F,0x9B, + 0x5D,0x80,0xEF,0x9D,0x18,0x91,0xCC,0x86,0xE7,0x1D,0xA4,0xAA,0x88,0xE1,0x28,0x52, + 0xFA,0xF4,0x17,0xD5,0xD9,0xB2,0x1B,0x99,0x48,0xBC,0x92,0x4A,0xF1,0x1B,0xD7,0x20 +}}; + + +static void AddModulo512(const void *a,const void *b,void *c) +{ + const unsigned char *A=a, *B=b; + unsigned char *C=c; + int t = 0; +#ifdef FULL_UNROLL +#define ADDBYTE_8(i) t = A[i] + B[i] + (t >> 8); C[i] = t & 0xFF; + + ADDBYTE_8(63) + ADDBYTE_8(62) + ADDBYTE_8(61) + ADDBYTE_8(60) + ADDBYTE_8(59) + ADDBYTE_8(58) + ADDBYTE_8(57) + ADDBYTE_8(56) + ADDBYTE_8(55) + ADDBYTE_8(54) + ADDBYTE_8(53) + ADDBYTE_8(52) + ADDBYTE_8(51) + ADDBYTE_8(50) + ADDBYTE_8(49) + ADDBYTE_8(48) + ADDBYTE_8(47) + ADDBYTE_8(46) + ADDBYTE_8(45) + ADDBYTE_8(44) + ADDBYTE_8(43) + ADDBYTE_8(42) + ADDBYTE_8(41) + ADDBYTE_8(40) + ADDBYTE_8(39) + ADDBYTE_8(38) + ADDBYTE_8(37) + ADDBYTE_8(36) + ADDBYTE_8(35) + ADDBYTE_8(34) + ADDBYTE_8(33) + ADDBYTE_8(32) + ADDBYTE_8(31) + ADDBYTE_8(30) + ADDBYTE_8(29) + ADDBYTE_8(28) + ADDBYTE_8(27) + ADDBYTE_8(26) + ADDBYTE_8(25) + ADDBYTE_8(24) + ADDBYTE_8(23) + ADDBYTE_8(22) + ADDBYTE_8(21) + ADDBYTE_8(20) + ADDBYTE_8(19) + ADDBYTE_8(18) + ADDBYTE_8(17) + ADDBYTE_8(16) + ADDBYTE_8(15) + ADDBYTE_8(14) + ADDBYTE_8(13) + ADDBYTE_8(12) + ADDBYTE_8(11) + ADDBYTE_8(10) + ADDBYTE_8(9) + ADDBYTE_8(8) + ADDBYTE_8(7) + ADDBYTE_8(6) + ADDBYTE_8(5) + ADDBYTE_8(4) + ADDBYTE_8(3) + ADDBYTE_8(2) + ADDBYTE_8(1) + ADDBYTE_8(0) + +#else + int i = 0; + + for(i=63;i>=0;i--) + { + t = A[i] + B[i] + (t >> 8); + C[i] = t & 0xFF; + } +#endif +} + +static void AddXor512(const void *a,const void *b,void *c) +{ + const unsigned long long *A=a, *B=b; + unsigned long long *C=c; +#ifdef FULL_UNROLL + C[0] = A[0] ^ B[0]; + C[1] = A[1] ^ B[1]; + C[2] = A[2] ^ B[2]; + C[3] = A[3] ^ B[3]; + C[4] = A[4] ^ B[4]; + C[5] = A[5] ^ B[5]; + C[6] = A[6] ^ B[6]; + C[7] = A[7] ^ B[7]; +#else + int i = 0; + + for(i=0; i<8; i++) { + C[i] = A[i] ^ B[i]; + } +#endif +} + +static void F(unsigned char *state) +{ + unsigned long long return_state[8]; + register unsigned long long r = 0; + r ^= TG[0][state[56]]; + r ^= TG[1][state[48]]; + r ^= TG[2][state[40]]; + r ^= TG[3][state[32]]; + r ^= TG[4][state[24]]; + r ^= TG[5][state[16]]; + r ^= TG[6][state[8]]; + r ^= TG[7][state[0]]; + return_state[0] = r; + r = 0; + + r ^= TG[0][state[57]]; + r ^= TG[1][state[49]]; + r ^= TG[2][state[41]]; + r ^= TG[3][state[33]]; + r ^= TG[4][state[25]]; + r ^= TG[5][state[17]]; + r ^= TG[6][state[9]]; + r ^= TG[7][state[1]]; + return_state[1] = r; + r = 0; + + r ^= TG[0][state[58]]; + r ^= TG[1][state[50]]; + r ^= TG[2][state[42]]; + r ^= TG[3][state[34]]; + r ^= TG[4][state[26]]; + r ^= TG[5][state[18]]; + r ^= TG[6][state[10]]; + r ^= TG[7][state[2]]; + return_state[2] = r; + r = 0; + + r ^= TG[0][state[59]]; + r ^= TG[1][state[51]]; + r ^= TG[2][state[43]]; + r ^= TG[3][state[35]]; + r ^= TG[4][state[27]]; + r ^= TG[5][state[19]]; + r ^= TG[6][state[11]]; + r ^= TG[7][state[3]]; + return_state[3] = r; + r = 0; + + r ^= TG[0][state[60]]; + r ^= TG[1][state[52]]; + r ^= TG[2][state[44]]; + r ^= TG[3][state[36]]; + r ^= TG[4][state[28]]; + r ^= TG[5][state[20]]; + r ^= TG[6][state[12]]; + r ^= TG[7][state[4]]; + return_state[4] = r; + r = 0; + + r ^= TG[0][state[61]]; + r ^= TG[1][state[53]]; + r ^= TG[2][state[45]]; + r ^= TG[3][state[37]]; + r ^= TG[4][state[29]]; + r ^= TG[5][state[21]]; + r ^= TG[6][state[13]]; + r ^= TG[7][state[5]]; + return_state[5] = r; + r = 0; + + r ^= TG[0][state[62]]; + r ^= TG[1][state[54]]; + r ^= TG[2][state[46]]; + r ^= TG[3][state[38]]; + r ^= TG[4][state[30]]; + r ^= TG[5][state[22]]; + r ^= TG[6][state[14]]; + r ^= TG[7][state[6]]; + return_state[6] = r; + r = 0; + + r ^= TG[0][state[63]]; + r ^= TG[1][state[55]]; + r ^= TG[2][state[47]]; + r ^= TG[3][state[39]]; + r ^= TG[4][state[31]]; + r ^= TG[5][state[23]]; + r ^= TG[6][state[15]]; + r ^= TG[7][state[7]]; + return_state[7] = r; + + memcpy(state,(unsigned char*)return_state,64); +} + +#define KeySchedule(K,i) AddXor512(K,C[i],K); F(K); + +static void E(unsigned char *K,const unsigned char *m, unsigned char *state) +{ +#ifdef FULL_UNROLL + AddXor512(m,K,state); + + F(state); + KeySchedule(K,0); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,1); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,2); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,3); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,4); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,5); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,6); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,7); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,8); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,9); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,10); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,11); + AddXor512(state,K,state); +#else + int i = 0; + + AddXor512(m,K,state); + + for(i=0;i<12;i++) { + F(state); + KeySchedule(K,i); + AddXor512(state,K,state); + } +#endif +} + +static void g_N(const unsigned char *N,unsigned char *h,const unsigned char *m) +{ + unsigned char t[64], K[64]; + + AddXor512(N,h,K); + + F(K); + + E(K,m,t); + + AddXor512(t,h,t); + AddXor512(t,m,h); +} + +static void hash_X(unsigned char *IV,const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char v512[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00 + }; + unsigned char v0[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char Sigma[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char N[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char m[64], *hash = IV; + unsigned long long len = length; + + // Stage 2 + while (len >= 512) + { + memcpy(m, message + len/8 - 63 - ( (len & 0x7) == 0 ), 64); + + g_N(N,hash,m); + AddModulo512(N,v512,N); + AddModulo512(Sigma,m,Sigma); + len -= 512; + } + + memset(m,0,64); + memcpy(m + 63 - len/8 + ( (len & 0x7) == 0 ), message, len/8 + 1 - ( (len & 0x7) == 0 )); + + // Stage 3 + m[ 63 - len/8 ] |= (1 << (len & 0x7)); + + g_N(N,hash,m); + v512[63] = len & 0xFF; + v512[62] = (unsigned char) (len >> 8); + AddModulo512(N,v512,N); + + AddModulo512(Sigma,m,Sigma); + + g_N(v0,hash,N); + g_N(v0,hash,Sigma); + + memcpy(out, hash, 64); +} + +static void hash_512(const unsigned char *message, unsigned long long length, unsigned char *out) +{ + unsigned char IV[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + + hash_X(IV,message,length,out); +} + +static void hash_256(const unsigned char *message, unsigned long long length, unsigned char *out) +{ + unsigned char IV[64] = { + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 + }; + unsigned char hash[64]; + + hash_X(IV,message,length,hash); + + memcpy(out,hash,32); +} + + + + + +/* see sph_gost.h */ +void +sph_gost256_init(void *cc) +{ + //gost_init(cc, 256); +} + +/* see sph_gost.h */ +void +sph_gost256(void *cc, const void *data, size_t len) +{ + hash_256(data, 8*len, cc); +} + +/* see sph_gost.h */ +void +sph_gost256_close(void *cc, void *dst) +{ + //sph_gost256_addbits_and_close(cc, 0, 0, dst); + memcpy(dst, cc, 32); +} + +/* see sph_gost.h */ +void +sph_gost256_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + //gost_close32(cc, ub, n, dst); +} + +/* see sph_gost.h */ +void +sph_gost512_init(void *cc) +{ + //gost_init(cc, 512); +} + +/* see sph_gost.h */ +void +sph_gost512(void *cc, const void *data, size_t len) +{ + hash_512(data, 8*len, cc); +} + +/* see sph_gost.h */ +void +sph_gost512_close(void *cc, void *dst) +{ + //sph_gost512_addbits_and_close(cc, 0, 0, dst); + memcpy(dst, cc, 64); +} + +/* see sph_gost.h */ +void +sph_gost512_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + //gost_close64(cc, ub, n, dst); +} + + +#ifdef __cplusplus +} +#endif From 3f007652bbf003d42b6466a5b3940b4b7d1f9f92 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:27:03 -0500 Subject: [PATCH 128/576] Create sph_streebog.h --- stratum/sha3/sph_streebog.h | 185 ++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 stratum/sha3/sph_streebog.h diff --git a/stratum/sha3/sph_streebog.h b/stratum/sha3/sph_streebog.h new file mode 100644 index 000000000..aa8f69d0d --- /dev/null +++ b/stratum/sha3/sph_streebog.h @@ -0,0 +1,185 @@ +/* $Id: sph_gost.h 216 2010-06-08 09:46:57Z tp $ */ +/** + * GOST interface. This is the interface for GOST R 12 with the + * recommended parameters for SHA-3, with output lengths 256 + * and 512 bits. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @file sph_gost.h + * @author Mish + */ + +#ifndef SPH_GOST_H__ +#define SPH_GOST_H__ + +#ifdef __cplusplus +extern "C"{ +#endif + +#include +#include "sph_types.h" + +/** + * Output size (in bits) for GOST-256. + */ +#define SPH_SIZE_gost256 256 + +/** + * Output size (in bits) for GOST-512. + */ +#define SPH_SIZE_gost512 512 + +/** + * This structure is a context for Keccak computations: it contains the + * intermediate values and some data from the last entered block. Once a + * GOST computation has been performed, the context can be reused for + * another computation. + * + * The contents of this structure are private. A running GOST computation + * can be cloned by copying the context (e.g. with a simple + * memcpy()). + */ + +/** + * This structure is a context for Gost-256 computations. + */ + +typedef struct { +#ifndef DOXYGEN_IGNORE + unsigned char buf[32]; /* first field, for alignment */ + size_t ptr; + sph_u32 V[3][8]; +#endif +} sph_gost256_context; + +/** + * This structure is a context for Gost-512 computations. + */ +typedef struct { +#ifndef DOXYGEN_IGNORE + unsigned char buf[64]; /* first field, for alignment */ + size_t ptr; + sph_u32 V[5][8]; +#endif +} sph_gost512_context; + + +/** + * Initialize a GOST-256 context. This process performs no memory allocation. + * + * @param cc the GOST-256 context (pointer to a + * sph_gost256_context) + */ +void sph_gost256_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the Gost-256 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void sph_gost256(void *cc, const void *data, size_t len); + +/** + * Terminate the current GOST-256 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (32 bytes). The context is automatically + * reinitialized. + * + * @param cc the GOST-256 context + * @param dst the destination buffer + */ +void sph_gost256_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (32 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the GOST-256 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void sph_gost256_addbits_and_close( + void *cc, unsigned ub, unsigned n, void *dst); + +/** + * Initialize a Gost-512 context. This process performs no memory allocation. + * + * @param cc the GOST-512 context (pointer to a + * sph_gost512_context) + */ +void sph_gost512_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the GOST-512 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void sph_gost512(void *cc, const void *data, size_t len); + +/** + * Terminate the current GOST-512 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (64 bytes). The context is automatically + * reinitialized. + * + * @param cc the GOST-512 context + * @param dst the destination buffer + */ +void sph_gost512_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (64 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the GOST-512 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void sph_gost512_addbits_and_close( + void *cc, unsigned ub, unsigned n, void *dst); + +#ifdef __cplusplus +} +#endif + +#endif From 5ef48237514caafabeae6c7e9d15d8f7f1a46493 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:32:32 -0500 Subject: [PATCH 129/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 4fee42013..92202d1d6 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -20,7 +20,7 @@ SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2vc0ban.c Sponge.c al a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ argon2a.c blake2/blake2b.c ar2/argon2.c ar2/core.c ar2/encoding.c ar2/opt.c ar2/thread.c ar2/ar2-scrypt-jane.c \ hive.c pomelo.c hex.c argon2d-dyn.c \ - phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x21s.c lbk3.c + phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) OUTPUT=libalgos.a From 6cd0d7f912e2f442ad3d72536db44bb2ccbf0d62 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:33:17 -0500 Subject: [PATCH 130/576] Create x20r.c --- stratum/algos/x20r.c | 217 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 stratum/algos/x20r.c diff --git a/stratum/algos/x20r.c b/stratum/algos/x20r.c new file mode 100644 index 000000000..fa5a02d9a --- /dev/null +++ b/stratum/algos/x20r.c @@ -0,0 +1,217 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _ALIGN(x) __attribute__ ((aligned(x))) + + enum Algo { + BLAKE = 0, + BMW, + GROESTL, + JH, + KECCAK, + SKEIN, + LUFFA, + CUBEHASH, + SHAVITE, + SIMD, + ECHO, + HAMSI, + FUGUE, + SHABAL, + WHIRLPOOL, + SHA512, + HAVAL, // 256-bits output + GOST, + RADIOGATUN, // 256-bits output + PANAMA, // 256-bits output + HASH_FUNC_COUNT +}; + +static __thread uint32_t s_ntime = UINT32_MAX; +static __thread char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; + +static void getAlgoString(const uint8_t* prevblock, char *output) +{ + char *sptr = output; + + for (int j = 0; j < HASH_FUNC_COUNT; j++) { + char b = (19 - j) >> 1; // 16 ascii hex chars, reversed + uint8_t algoDigit = (j & 1) ? prevblock[b] & 0xF : prevblock[b] >> 4; + if (algoDigit >= 10) + sprintf(sptr, "%c", 'A' + (algoDigit - 10)); + else + sprintf(sptr, "%u", (uint32_t) algoDigit); + sptr++; + } + *sptr = '\0'; +} + +void x20r_hash(const char* input, char* output, uint32_t len) +{ + uint32_t _ALIGN(128) hash[64/4]; + + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_haval256_5_context ctx_haval; + sph_gost512_context ctx_gost; + sph_radiogatun64_context ctx_radiogatun; + sph_panama_context ctx_panama; + + void *in = (void*) input; + int size = len; + + if (s_ntime == UINT32_MAX) { + const uint8_t* in8 = (uint8_t*) input; + getAlgoString(&in8[4], hashOrder); + } + + for (int i = 0; i < 20; i++) + { + const char elem = hashOrder[i]; + const uint8_t algo = elem >= 'A' ? elem - 'A' + 10 : elem - '0'; + + switch (algo) { + case BLAKE: + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, in, size); + sph_blake512_close(&ctx_blake, hash); + break; + case BMW: + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, in, size); + sph_bmw512_close(&ctx_bmw, hash); + break; + case GROESTL: + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, in, size); + sph_groestl512_close(&ctx_groestl, hash); + break; + case SKEIN: + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, in, size); + sph_skein512_close(&ctx_skein, hash); + break; + case JH: + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, in, size); + sph_jh512_close(&ctx_jh, hash); + break; + case KECCAK: + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, in, size); + sph_keccak512_close(&ctx_keccak, hash); + break; + case LUFFA: + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, in, size); + sph_luffa512_close(&ctx_luffa, hash); + break; + case CUBEHASH: + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, in, size); + sph_cubehash512_close(&ctx_cubehash, hash); + break; + case SHAVITE: + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, in, size); + sph_shavite512_close(&ctx_shavite, hash); + break; + case SIMD: + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, in, size); + sph_simd512_close(&ctx_simd, hash); + break; + case ECHO: + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, in, size); + sph_echo512_close(&ctx_echo, hash); + break; + case HAMSI: + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, in, size); + sph_hamsi512_close(&ctx_hamsi, hash); + break; + case FUGUE: + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, in, size); + sph_fugue512_close(&ctx_fugue, hash); + break; + case SHABAL: + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, in, size); + sph_shabal512_close(&ctx_shabal, hash); + break; + case WHIRLPOOL: + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, in, size); + sph_whirlpool_close(&ctx_whirlpool, hash); + break; + case SHA512: + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) in, size); + sph_sha512_close(&ctx_sha512,(void*) hash); + break; + case HAVAL: + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, in, size); + sph_haval256_5_close(&ctx_haval, hash); + memset(&hash[8], 0, 32); + break; + case GOST: + sph_gost512_init(&ctx_gost); + sph_gost512(&ctx_gost, in, size); + sph_gost512_close(&ctx_gost, hash); + break; + case RADIOGATUN: + sph_radiogatun64_init(&ctx_radiogatun); + sph_radiogatun64(&ctx_radiogatun, in, size); + sph_radiogatun64_close(&ctx_radiogatun, hash); + memset(&hash[8], 0, 32); + break; + case PANAMA: + sph_panama_init(&ctx_panama); + sph_panama(&ctx_panama, in, size); + sph_panama_close(&ctx_panama, hash); + memset(&hash[8], 0, 32); + break; + } + in = (void*) hash; + size = 64; + } + memcpy(output, hash, 32); +} From f03d8da5db898e3a9f3eb2dec19f430a13480f58 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:33:50 -0500 Subject: [PATCH 131/576] Create x20r.conf --- stratum/config.sample/x20r.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/x20r.conf diff --git a/stratum/config.sample/x20r.conf b/stratum/config.sample/x20r.conf new file mode 100644 index 000000000..4452b5010 --- /dev/null +++ b/stratum/config.sample/x20r.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 4300 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = x20r +difficulty = 0.5 +max_ttf = 50000 From f294d2e1dc79e7c8006d32ccb3ae748efd7ef811 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:34:23 -0500 Subject: [PATCH 132/576] Update makefile --- stratum/sha3/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/sha3/makefile b/stratum/sha3/makefile index 6c917993b..fe4f8f481 100644 --- a/stratum/sha3/makefile +++ b/stratum/sha3/makefile @@ -6,7 +6,7 @@ LDFLAGS=-O2 SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c \ - sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c \ + sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ blake2s.c blake2b.c OBJECTS=$(SOURCES:.c=.o) From 2f9a1ca1017c14205e36539cee6bbbf1539e74e3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:35:32 -0500 Subject: [PATCH 133/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index e5535bcec..9e896884a 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -123,6 +123,7 @@ YAAMP_ALGO g_algos[] = {"x15", x15_hash, 1, 0, 0}, {"x17", x17_hash, 1, 0, 0}, {"x18", x18_hash, 1, 0, 0}, + {"x20r", x20r_hash, 0x100, 0, 0}, {"x21s", x21s_hash, 0x100, 0, 0}, {"x22i", x22i_hash, 1, 0, 0}, From 3dbfb96a4c1582da2db57279548ccdf132e11cd9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:36:16 -0500 Subject: [PATCH 134/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index c331958d2..e9e6e348f 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -159,6 +159,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/x16s.h" #include "algos/x17.h" #include "algos/x18.h" +include "algos/x20r.h" #include "algos/x21s.h" #include "algos/x22i.h" #include "algos/xevan.h" From 246408e96872c7d438ff9142e2b7e0287ff2e26f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:37:25 -0500 Subject: [PATCH 135/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index adf08711e..348321182 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -53,6 +53,7 @@ function yaamp_get_algos() 'x16s', 'x17', 'x18', + 'x20r', 'x21s', 'x22i', 'xevan', @@ -166,6 +167,7 @@ function getAlgoColors($algo) 'x16s' => '#f0b080', 'x17' => '#f0b0a0', 'x18' => '#f0b0a0', + 'x20r' => '#f0b0a0', 'x21s' => '#f0b0a0', 'x22i' => '#f0a090', 'xevan' => '#f0b0a0', @@ -252,6 +254,7 @@ function getAlgoPort($algo) 'x16s' => 3663, 'x17' => 3737, 'x18' => 3738, + 'x20r' => 4300, 'x21s' => 3224, 'x22i' => 3223, 'aergo' => 3691, From 6f326658cd1553bdedc9fe1aab97f8213f43084c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:39:16 -0500 Subject: [PATCH 136/576] Create x20r.h --- stratum/algos/x20r.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/x20r.h diff --git a/stratum/algos/x20r.h b/stratum/algos/x20r.h new file mode 100644 index 000000000..6f75b7fb9 --- /dev/null +++ b/stratum/algos/x20r.h @@ -0,0 +1,16 @@ +#ifndef X20R_H +#define X20R_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x20r_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From f81c69702446fb25473ec4e46347c3717a6b97a4 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 5 Jan 2019 04:47:15 -0500 Subject: [PATCH 137/576] Update stratum.h --- stratum/stratum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.h b/stratum/stratum.h index e9e6e348f..02c3ee9b8 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -159,7 +159,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/x16s.h" #include "algos/x17.h" #include "algos/x18.h" -include "algos/x20r.h" +#include "algos/x20r.h" #include "algos/x21s.h" #include "algos/x22i.h" #include "algos/xevan.h" From cb5c1ebc96be0089d81e4f9e3754c1d4ba39f077 Mon Sep 17 00:00:00 2001 From: Jan <34112129+itsmylife44@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:04:09 +0100 Subject: [PATCH 138/576] fix blocknotify in coinform --- web/yaamp/modules/site/coin_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index b0a4e4dc1..f842555ec 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -402,7 +402,7 @@ echo "\n"; } echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; - echo "blocknotify=/var/stratum/blocknotify 127.0.0.1:$port {$coin->id} %s\n"; + echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n"; echo " \n"; echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; echo CHtml::closetag("pre"); From 281f449728d02dd97fa7f7db97e80509bdaea7b7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:03:42 -0500 Subject: [PATCH 139/576] Create blake2-impl.h --- stratum/algos/blake2-impl.h | 189 ++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 stratum/algos/blake2-impl.h diff --git a/stratum/algos/blake2-impl.h b/stratum/algos/blake2-impl.h new file mode 100644 index 000000000..a43380b1f --- /dev/null +++ b/stratum/algos/blake2-impl.h @@ -0,0 +1,189 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef PORTABLE_BLAKE2_IMPL_H +#define PORTABLE_BLAKE2_IMPL_H + +#include +#include + +#if defined(_MSC_VER) +#define BLAKE2_INLINE __inline +#elif defined(__GNUC__) || defined(__clang__) +#define BLAKE2_INLINE __inline__ +#else +#define BLAKE2_INLINE +#endif + +/* Argon2 Team - Begin Code */ +/* + Not an exhaustive list, but should cover the majority of modern platforms + Additionally, the code will always be correct---this is only a performance + tweak. +*/ +#if (defined(__BYTE_ORDER__) && \ + (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) || \ + defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \ + defined(__AARCH64EL__) || defined(__amd64__) || defined(__i386__) || \ + defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ + defined(_M_ARM) +#define NATIVE_LITTLE_ENDIAN +#endif +/* Argon2 Team - End Code */ + + + +static BLAKE2_INLINE uint16_t load16( const void *src ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + uint16_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = ( const uint8_t * )src; + return (( uint16_t )( p[0] ) << 0) | + (( uint16_t )( p[1] ) << 8) ; +#endif +} + +static BLAKE2_INLINE void store16( void *dst, uint16_t w ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = ( uint8_t * )dst; + *p++ = ( uint8_t )w; w >>= 8; + *p++ = ( uint8_t )w; +#endif +} + +static BLAKE2_INLINE uint32_t load32(const void *src) { +#if defined(NATIVE_LITTLE_ENDIAN) + uint32_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = (const uint8_t *)src; + uint32_t w = *p++; + w |= (uint32_t)(*p++) << 8; + w |= (uint32_t)(*p++) << 16; + w |= (uint32_t)(*p++) << 24; + return w; +#endif +} + +static BLAKE2_INLINE uint64_t load64(const void *src) { +#if defined(NATIVE_LITTLE_ENDIAN) + uint64_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = (const uint8_t *)src; + uint64_t w = *p++; + w |= (uint64_t)(*p++) << 8; + w |= (uint64_t)(*p++) << 16; + w |= (uint64_t)(*p++) << 24; + w |= (uint64_t)(*p++) << 32; + w |= (uint64_t)(*p++) << 40; + w |= (uint64_t)(*p++) << 48; + w |= (uint64_t)(*p++) << 56; + return w; +#endif +} + +static BLAKE2_INLINE void store32(void *dst, uint32_t w) { +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +#endif +} + +static BLAKE2_INLINE void store64(void *dst, uint64_t w) { +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +#endif +} + +static BLAKE2_INLINE uint64_t load48(const void *src) { + const uint8_t *p = (const uint8_t *)src; + uint64_t w = *p++; + w |= (uint64_t)(*p++) << 8; + w |= (uint64_t)(*p++) << 16; + w |= (uint64_t)(*p++) << 24; + w |= (uint64_t)(*p++) << 32; + w |= (uint64_t)(*p++) << 40; + return w; +} + +static BLAKE2_INLINE void store48(void *dst, uint64_t w) { + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +} + +static BLAKE2_INLINE uint32_t rotr32(const uint32_t w, const unsigned c) { + return (w >> c) | (w << (32 - c)); +} + +static BLAKE2_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) { + return (w >> c) | (w << (64 - c)); +} + +/* prevents compiler optimizing out memset() */ +static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) +{ + static void *(*const volatile memset_v)(void *, int, size_t) = &memset; + memset_v(v, 0, n); +} + +void clear_internal_memory(void *v, size_t n); + +#endif From 0bde8864fa5fe6941d08505cf0a9ac490c53c554 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:04:10 -0500 Subject: [PATCH 140/576] Delete blake2-impl.h --- stratum/algos/blake2-impl.h | 189 ------------------------------------ 1 file changed, 189 deletions(-) delete mode 100644 stratum/algos/blake2-impl.h diff --git a/stratum/algos/blake2-impl.h b/stratum/algos/blake2-impl.h deleted file mode 100644 index a43380b1f..000000000 --- a/stratum/algos/blake2-impl.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Argon2 reference source code package - reference C implementations - * - * Copyright 2015 - * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves - * - * You may use this work under the terms of a Creative Commons CC0 1.0 - * License/Waiver or the Apache Public License 2.0, at your option. The terms of - * these licenses can be found at: - * - * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - * - * You should have received a copy of both of these licenses along with this - * software. If not, they may be obtained at the above URLs. - */ - -#ifndef PORTABLE_BLAKE2_IMPL_H -#define PORTABLE_BLAKE2_IMPL_H - -#include -#include - -#if defined(_MSC_VER) -#define BLAKE2_INLINE __inline -#elif defined(__GNUC__) || defined(__clang__) -#define BLAKE2_INLINE __inline__ -#else -#define BLAKE2_INLINE -#endif - -/* Argon2 Team - Begin Code */ -/* - Not an exhaustive list, but should cover the majority of modern platforms - Additionally, the code will always be correct---this is only a performance - tweak. -*/ -#if (defined(__BYTE_ORDER__) && \ - (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) || \ - defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \ - defined(__AARCH64EL__) || defined(__amd64__) || defined(__i386__) || \ - defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ - defined(_M_ARM) -#define NATIVE_LITTLE_ENDIAN -#endif -/* Argon2 Team - End Code */ - - - -static BLAKE2_INLINE uint16_t load16( const void *src ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - uint16_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = ( const uint8_t * )src; - return (( uint16_t )( p[0] ) << 0) | - (( uint16_t )( p[1] ) << 8) ; -#endif -} - -static BLAKE2_INLINE void store16( void *dst, uint16_t w ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = ( uint8_t * )dst; - *p++ = ( uint8_t )w; w >>= 8; - *p++ = ( uint8_t )w; -#endif -} - -static BLAKE2_INLINE uint32_t load32(const void *src) { -#if defined(NATIVE_LITTLE_ENDIAN) - uint32_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = (const uint8_t *)src; - uint32_t w = *p++; - w |= (uint32_t)(*p++) << 8; - w |= (uint32_t)(*p++) << 16; - w |= (uint32_t)(*p++) << 24; - return w; -#endif -} - -static BLAKE2_INLINE uint64_t load64(const void *src) { -#if defined(NATIVE_LITTLE_ENDIAN) - uint64_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = (const uint8_t *)src; - uint64_t w = *p++; - w |= (uint64_t)(*p++) << 8; - w |= (uint64_t)(*p++) << 16; - w |= (uint64_t)(*p++) << 24; - w |= (uint64_t)(*p++) << 32; - w |= (uint64_t)(*p++) << 40; - w |= (uint64_t)(*p++) << 48; - w |= (uint64_t)(*p++) << 56; - return w; -#endif -} - -static BLAKE2_INLINE void store32(void *dst, uint32_t w) { -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = (uint8_t *)dst; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; -#endif -} - -static BLAKE2_INLINE void store64(void *dst, uint64_t w) { -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = (uint8_t *)dst; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; -#endif -} - -static BLAKE2_INLINE uint64_t load48(const void *src) { - const uint8_t *p = (const uint8_t *)src; - uint64_t w = *p++; - w |= (uint64_t)(*p++) << 8; - w |= (uint64_t)(*p++) << 16; - w |= (uint64_t)(*p++) << 24; - w |= (uint64_t)(*p++) << 32; - w |= (uint64_t)(*p++) << 40; - return w; -} - -static BLAKE2_INLINE void store48(void *dst, uint64_t w) { - uint8_t *p = (uint8_t *)dst; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; -} - -static BLAKE2_INLINE uint32_t rotr32(const uint32_t w, const unsigned c) { - return (w >> c) | (w << (32 - c)); -} - -static BLAKE2_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) { - return (w >> c) | (w << (64 - c)); -} - -/* prevents compiler optimizing out memset() */ -static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) -{ - static void *(*const volatile memset_v)(void *, int, size_t) = &memset; - memset_v(v, 0, n); -} - -void clear_internal_memory(void *v, size_t n); - -#endif From cad7972026a0fe15575d28710dc540374050b1ff Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:06:07 -0500 Subject: [PATCH 141/576] Update blake2-impl.h --- stratum/algos/blake2/blake2-impl.h | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/stratum/algos/blake2/blake2-impl.h b/stratum/algos/blake2/blake2-impl.h index 241f0beb3..a43380b1f 100644 --- a/stratum/algos/blake2/blake2-impl.h +++ b/stratum/algos/blake2/blake2-impl.h @@ -45,6 +45,32 @@ #endif /* Argon2 Team - End Code */ + + +static BLAKE2_INLINE uint16_t load16( const void *src ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + uint16_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = ( const uint8_t * )src; + return (( uint16_t )( p[0] ) << 0) | + (( uint16_t )( p[1] ) << 8) ; +#endif +} + +static BLAKE2_INLINE void store16( void *dst, uint16_t w ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = ( uint8_t * )dst; + *p++ = ( uint8_t )w; w >>= 8; + *p++ = ( uint8_t )w; +#endif +} + static BLAKE2_INLINE uint32_t load32(const void *src) { #if defined(NATIVE_LITTLE_ENDIAN) uint32_t w; @@ -151,6 +177,13 @@ static BLAKE2_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) { return (w >> c) | (w << (64 - c)); } +/* prevents compiler optimizing out memset() */ +static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) +{ + static void *(*const volatile memset_v)(void *, int, size_t) = &memset; + memset_v(v, 0, n); +} + void clear_internal_memory(void *v, size_t n); #endif From b117cf52fc5c0a085168d76b330dbf47003e9217 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:06:57 -0500 Subject: [PATCH 142/576] Update blake2.h --- stratum/algos/blake2/blake2.h | 243 ++++++++++++++++++++++++---------- 1 file changed, 172 insertions(+), 71 deletions(-) diff --git a/stratum/algos/blake2/blake2.h b/stratum/algos/blake2/blake2.h index 12533d1e7..6a26f5f25 100644 --- a/stratum/algos/blake2/blake2.h +++ b/stratum/algos/blake2/blake2.h @@ -1,88 +1,189 @@ /* - * Argon2 reference source code package - reference C implementations - * - * Copyright 2015 - * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves - * - * You may use this work under the terms of a Creative Commons CC0 1.0 - * License/Waiver or the Apache Public License 2.0, at your option. The terms of - * these licenses can be found at: - * - * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - * - * You should have received a copy of both of these licenses along with this - * software. If not, they may be obtained at the above URLs. - */ - -#ifndef PORTABLE_BLAKE2_H -#define PORTABLE_BLAKE2_H + BLAKE2 reference source code package - reference C implementations + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ +#ifndef BLAKE2_H +#define BLAKE2_H #include #include -#include + +#if defined(_MSC_VER) +#define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop)) +#else +#define BLAKE2_PACKED(x) x __attribute__((packed)) +#endif #if defined(__cplusplus) extern "C" { #endif -enum blake2b_constant { + enum blake2s_constant + { + BLAKE2S_BLOCKBYTES = 64, + BLAKE2S_OUTBYTES = 32, + BLAKE2S_KEYBYTES = 32, + BLAKE2S_SALTBYTES = 8, + BLAKE2S_PERSONALBYTES = 8 + }; + + enum blake2b_constant + { BLAKE2B_BLOCKBYTES = 128, - BLAKE2B_OUTBYTES = 64, - BLAKE2B_KEYBYTES = 64, - BLAKE2B_SALTBYTES = 16, + BLAKE2B_OUTBYTES = 64, + BLAKE2B_KEYBYTES = 64, + BLAKE2B_SALTBYTES = 16, BLAKE2B_PERSONALBYTES = 16 -}; - -#pragma pack(push, 1) -typedef struct __blake2b_param { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint64_t node_offset; /* 16 */ - uint8_t node_depth; /* 17 */ - uint8_t inner_length; /* 18 */ - uint8_t reserved[14]; /* 32 */ - uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ - uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ -} blake2b_param; -#pragma pack(pop) - -typedef struct __blake2b_state { + }; + + typedef struct blake2s_state__ + { + uint32_t h[8]; + uint32_t t[2]; + uint32_t f[2]; + uint8_t buf[BLAKE2S_BLOCKBYTES]; + size_t buflen; + size_t outlen; + uint8_t last_node; + } blake2s_state; + + typedef struct blake2b_state__ + { uint64_t h[8]; uint64_t t[2]; uint64_t f[2]; - uint8_t buf[BLAKE2B_BLOCKBYTES]; - unsigned buflen; - unsigned outlen; - uint8_t last_node; -} blake2b_state; - -/* Ensure param structs have not been wrongly padded */ -/* Poor man's static_assert */ -enum { - blake2_size_check_0 = 1 / !!(CHAR_BIT == 8), - blake2_size_check_2 = - 1 / !!(sizeof(blake2b_param) == sizeof(uint64_t) * CHAR_BIT) -}; - -/* Streaming API */ -int blake2b_init(blake2b_state *S, size_t outlen); -int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, - size_t keylen); -int blake2b_init_param(blake2b_state *S, const blake2b_param *P); -int blake2b_update(blake2b_state *S, const void *in, size_t inlen); -int blake2b_final(blake2b_state *S, void *out, size_t outlen); - -/* Simple API */ -int blake2b(void *out, size_t outlen, const void *in, size_t inlen, - const void *key, size_t keylen); - -/* Argon2 Team - Begin Code */ -int blake2b_long(void *out, size_t outlen, const void *in, size_t inlen); -/* Argon2 Team - End Code */ + uint8_t buf[BLAKE2B_BLOCKBYTES]; + size_t buflen; + size_t outlen; + uint8_t last_node; + } blake2b_state; + + typedef struct blake2sp_state__ + { + blake2s_state S[8][1]; + blake2s_state R[1]; + uint8_t buf[8 * BLAKE2S_BLOCKBYTES]; + size_t buflen; + size_t outlen; + } blake2sp_state; + + typedef struct blake2bp_state__ + { + blake2b_state S[4][1]; + blake2b_state R[1]; + uint8_t buf[4 * BLAKE2B_BLOCKBYTES]; + size_t buflen; + size_t outlen; + } blake2bp_state; + + + BLAKE2_PACKED(struct blake2s_param__ + { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint16_t xof_length; /* 14 */ + uint8_t node_depth; /* 15 */ + uint8_t inner_length; /* 16 */ + /* uint8_t reserved[0]; */ + uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ + uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ + }); + + typedef struct blake2s_param__ blake2s_param; + + BLAKE2_PACKED(struct blake2b_param__ + { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint32_t xof_length; /* 16 */ + uint8_t node_depth; /* 17 */ + uint8_t inner_length; /* 18 */ + uint8_t reserved[14]; /* 32 */ + uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ + uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ + }); + + typedef struct blake2b_param__ blake2b_param; + + typedef struct blake2xs_state__ + { + blake2s_state S[1]; + blake2s_param P[1]; + } blake2xs_state; + + typedef struct blake2xb_state__ + { + blake2b_state S[1]; + blake2b_param P[1]; + } blake2xb_state; + + /* Padded structs result in a compile-time error */ + enum { + BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES), + BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) + }; + + /* Streaming API */ + int blake2s_init( blake2s_state *S, size_t outlen ); + int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); + int blake2s_update( blake2s_state *S, const void *in, size_t inlen ); + int blake2s_final( blake2s_state *S, void *out, size_t outlen ); + + int blake2b_init( blake2b_state *S, size_t outlen ); + int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); + int blake2b_update( blake2b_state *S, const void *in, size_t inlen ); + int blake2b_final( blake2b_state *S, void *out, size_t outlen ); + + int blake2sp_init( blake2sp_state *S, size_t outlen ); + int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2sp_update( blake2sp_state *S, const void *in, size_t inlen ); + int blake2sp_final( blake2sp_state *S, void *out, size_t outlen ); + + int blake2bp_init( blake2bp_state *S, size_t outlen ); + int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2bp_update( blake2bp_state *S, const void *in, size_t inlen ); + int blake2bp_final( blake2bp_state *S, void *out, size_t outlen ); + + /* Variable output length API */ + int blake2xs_init( blake2xs_state *S, const size_t outlen ); + int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, size_t keylen ); + int blake2xs_update( blake2xs_state *S, const void *in, size_t inlen ); + int blake2xs_final(blake2xs_state *S, void *out, size_t outlen); + + int blake2xb_init( blake2xb_state *S, const size_t outlen ); + int blake2xb_init_key( blake2xb_state *S, const size_t outlen, const void *key, size_t keylen ); + int blake2xb_update( blake2xb_state *S, const void *in, size_t inlen ); + int blake2xb_final(blake2xb_state *S, void *out, size_t outlen); + + /* Simple API */ + int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + int blake2sp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2bp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + int blake2xs( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2xb( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + /* This is simply an alias for blake2b */ + int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); #if defined(__cplusplus) } From e57b140a3b532905a04ec2cc02a1d6e8766dedef Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:07:53 -0500 Subject: [PATCH 143/576] Create blake2s.c --- stratum/algos/blake2/blake2s.c | 364 +++++++++++++++++++++++++++++++++ 1 file changed, 364 insertions(+) create mode 100644 stratum/algos/blake2/blake2s.c diff --git a/stratum/algos/blake2/blake2s.c b/stratum/algos/blake2/blake2s.c new file mode 100644 index 000000000..21f860026 --- /dev/null +++ b/stratum/algos/blake2/blake2s.c @@ -0,0 +1,364 @@ +/* + BLAKE2 reference source code package - reference C implementations + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ + +#include +#include +#include + +#include "blake2.h" +#include "blake2-impl.h" + +static const uint32_t blake2s_IV[8] = +{ + 0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL, + 0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL +}; + +static const uint8_t blake2s_sigma[10][16] = +{ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , + { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } , + { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } , + { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } , + { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } , + { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } , + { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } , + { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } , + { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } , + { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } , +}; + +static void blake2s_set_lastnode( blake2s_state *S ) +{ + S->f[1] = (uint32_t)-1; +} + +/* Some helper functions, not necessarily useful */ +static int blake2s_is_lastblock( const blake2s_state *S ) +{ + return S->f[0] != 0; +} + +static void blake2s_set_lastblock( blake2s_state *S ) +{ + if( S->last_node ) blake2s_set_lastnode( S ); + + S->f[0] = (uint32_t)-1; +} + +static void blake2s_increment_counter( blake2s_state *S, const uint32_t inc ) +{ + S->t[0] += inc; + S->t[1] += ( S->t[0] < inc ); +} + +static void blake2s_init0( blake2s_state *S ) +{ + size_t i; + memset( S, 0, sizeof( blake2s_state ) ); + + for( i = 0; i < 8; ++i ) S->h[i] = blake2s_IV[i]; +} + +/* init2 xors IV with input parameter block */ +int blake2s_init_param( blake2s_state *S, const blake2s_param *P ) +{ + const unsigned char *p = ( const unsigned char * )( P ); + size_t i; + + blake2s_init0( S ); + + /* IV XOR ParamBlock */ + for( i = 0; i < 8; ++i ) + S->h[i] ^= load32( &p[i * 4] ); + + S->outlen = P->digest_length; + return 0; +} + + +/* Sequential blake2s initialization */ +int blake2s_init( blake2s_state *S, size_t outlen ) +{ + blake2s_param P[1]; + + /* Move interval verification here? */ + if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; + + P->digest_length = (uint8_t)outlen; + P->key_length = 0; + P->fanout = 1; + P->depth = 1; + store32( &P->leaf_length, 0 ); + store32( &P->node_offset, 0 ); + store16( &P->xof_length, 0 ); + P->node_depth = 0; + P->inner_length = 0; + /* memset(P->reserved, 0, sizeof(P->reserved) ); */ + memset( P->salt, 0, sizeof( P->salt ) ); + memset( P->personal, 0, sizeof( P->personal ) ); + return blake2s_init_param( S, P ); +} + +int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ) +{ + blake2s_param P[1]; + + if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; + + if ( !key || !keylen || keylen > BLAKE2S_KEYBYTES ) return -1; + + P->digest_length = (uint8_t)outlen; + P->key_length = (uint8_t)keylen; + P->fanout = 1; + P->depth = 1; + store32( &P->leaf_length, 0 ); + store32( &P->node_offset, 0 ); + store16( &P->xof_length, 0 ); + P->node_depth = 0; + P->inner_length = 0; + /* memset(P->reserved, 0, sizeof(P->reserved) ); */ + memset( P->salt, 0, sizeof( P->salt ) ); + memset( P->personal, 0, sizeof( P->personal ) ); + + if( blake2s_init_param( S, P ) < 0 ) return -1; + + { + uint8_t block[BLAKE2S_BLOCKBYTES]; + memset( block, 0, BLAKE2S_BLOCKBYTES ); + memcpy( block, key, keylen ); + blake2s_update( S, block, BLAKE2S_BLOCKBYTES ); + secure_zero_memory( block, BLAKE2S_BLOCKBYTES ); /* Burn the key from stack */ + } + return 0; +} + +#define G(r,i,a,b,c,d) \ + do { \ + a = a + b + m[blake2s_sigma[r][2*i+0]]; \ + d = rotr32(d ^ a, 16); \ + c = c + d; \ + b = rotr32(b ^ c, 12); \ + a = a + b + m[blake2s_sigma[r][2*i+1]]; \ + d = rotr32(d ^ a, 8); \ + c = c + d; \ + b = rotr32(b ^ c, 7); \ + } while(0) + +#define ROUND(r) \ + do { \ + G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \ + G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \ + G(r,2,v[ 2],v[ 6],v[10],v[14]); \ + G(r,3,v[ 3],v[ 7],v[11],v[15]); \ + G(r,4,v[ 0],v[ 5],v[10],v[15]); \ + G(r,5,v[ 1],v[ 6],v[11],v[12]); \ + G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \ + G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \ + } while(0) + +static void blake2s_compress( blake2s_state *S, const uint8_t in[BLAKE2S_BLOCKBYTES] ) +{ + uint32_t m[16]; + uint32_t v[16]; + size_t i; + + for( i = 0; i < 16; ++i ) { + m[i] = load32( in + i * sizeof( m[i] ) ); + } + + for( i = 0; i < 8; ++i ) { + v[i] = S->h[i]; + } + + v[ 8] = blake2s_IV[0]; + v[ 9] = blake2s_IV[1]; + v[10] = blake2s_IV[2]; + v[11] = blake2s_IV[3]; + v[12] = S->t[0] ^ blake2s_IV[4]; + v[13] = S->t[1] ^ blake2s_IV[5]; + v[14] = S->f[0] ^ blake2s_IV[6]; + v[15] = S->f[1] ^ blake2s_IV[7]; + + ROUND( 0 ); + ROUND( 1 ); + ROUND( 2 ); + ROUND( 3 ); + ROUND( 4 ); + ROUND( 5 ); + ROUND( 6 ); + ROUND( 7 ); + ROUND( 8 ); + ROUND( 9 ); + + for( i = 0; i < 8; ++i ) { + S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; + } +} + +#undef G +#undef ROUND + +int blake2s_update( blake2s_state *S, const void *pin, size_t inlen ) +{ + const unsigned char * in = (const unsigned char *)pin; + if( inlen > 0 ) + { + size_t left = S->buflen; + size_t fill = BLAKE2S_BLOCKBYTES - left; + if( inlen > fill ) + { + S->buflen = 0; + memcpy( S->buf + left, in, fill ); /* Fill buffer */ + blake2s_increment_counter( S, BLAKE2S_BLOCKBYTES ); + blake2s_compress( S, S->buf ); /* Compress */ + in += fill; inlen -= fill; + while(inlen > BLAKE2S_BLOCKBYTES) { + blake2s_increment_counter(S, BLAKE2S_BLOCKBYTES); + blake2s_compress( S, in ); + in += BLAKE2S_BLOCKBYTES; + inlen -= BLAKE2S_BLOCKBYTES; + } + } + memcpy( S->buf + S->buflen, in, inlen ); + S->buflen += inlen; + } + return 0; +} + +int blake2s_final( blake2s_state *S, void *out, size_t outlen ) +{ + uint8_t buffer[BLAKE2S_OUTBYTES] = {0}; + size_t i; + + if( out == NULL || outlen < S->outlen ) + return -1; + + if( blake2s_is_lastblock( S ) ) + return -1; + + blake2s_increment_counter( S, ( uint32_t )S->buflen ); + blake2s_set_lastblock( S ); + memset( S->buf + S->buflen, 0, BLAKE2S_BLOCKBYTES - S->buflen ); /* Padding */ + blake2s_compress( S, S->buf ); + + for( i = 0; i < 8; ++i ) /* Output full hash to temp buffer */ + store32( buffer + sizeof( S->h[i] ) * i, S->h[i] ); + + memcpy( out, buffer, outlen ); + secure_zero_memory(buffer, sizeof(buffer)); + return 0; +} + +int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ) +{ + blake2s_state S[1]; + + /* Verify parameters */ + if ( NULL == in && inlen > 0 ) return -1; + + if ( NULL == out ) return -1; + + if ( NULL == key && keylen > 0) return -1; + + if( !outlen || outlen > BLAKE2S_OUTBYTES ) return -1; + + if( keylen > BLAKE2S_KEYBYTES ) return -1; + + if( keylen > 0 ) + { + if( blake2s_init_key( S, outlen, key, keylen ) < 0 ) return -1; + } + else + { + if( blake2s_init( S, outlen ) < 0 ) return -1; + } + + blake2s_update( S, ( const uint8_t * )in, inlen ); + blake2s_final( S, out, outlen ); + return 0; +} + +#if defined(SUPERCOP) +int crypto_hash( unsigned char *out, unsigned char *in, unsigned long long inlen ) +{ + return blake2s( out, BLAKE2S_OUTBYTES, in, inlen, NULL, 0 ); +} +#endif + +#if defined(BLAKE2S_SELFTEST) +#include +#include "blake2-kat.h" +int main( void ) +{ + uint8_t key[BLAKE2S_KEYBYTES]; + uint8_t buf[BLAKE2_KAT_LENGTH]; + size_t i, step; + + for( i = 0; i < BLAKE2S_KEYBYTES; ++i ) + key[i] = ( uint8_t )i; + + for( i = 0; i < BLAKE2_KAT_LENGTH; ++i ) + buf[i] = ( uint8_t )i; + + /* Test simple API */ + for( i = 0; i < BLAKE2_KAT_LENGTH; ++i ) + { + uint8_t hash[BLAKE2S_OUTBYTES]; + blake2s( hash, BLAKE2S_OUTBYTES, buf, i, key, BLAKE2S_KEYBYTES ); + + if( 0 != memcmp( hash, blake2s_keyed_kat[i], BLAKE2S_OUTBYTES ) ) + { + goto fail; + } + } + + /* Test streaming API */ + for(step = 1; step < BLAKE2S_BLOCKBYTES; ++step) { + for (i = 0; i < BLAKE2_KAT_LENGTH; ++i) { + uint8_t hash[BLAKE2S_OUTBYTES]; + blake2s_state S; + uint8_t * p = buf; + size_t mlen = i; + int err = 0; + + if( (err = blake2s_init_key(&S, BLAKE2S_OUTBYTES, key, BLAKE2S_KEYBYTES)) < 0 ) { + goto fail; + } + + while (mlen >= step) { + if ( (err = blake2s_update(&S, p, step)) < 0 ) { + goto fail; + } + mlen -= step; + p += step; + } + if ( (err = blake2s_update(&S, p, mlen)) < 0) { + goto fail; + } + if ( (err = blake2s_final(&S, hash, BLAKE2S_OUTBYTES)) < 0) { + goto fail; + } + + if (0 != memcmp(hash, blake2s_keyed_kat[i], BLAKE2S_OUTBYTES)) { + goto fail; + } + } + } + + puts( "ok" ); + return 0; +fail: + puts("error"); + return -1; +} +#endif From 5f87fb034f49eff903d8713bde7ee94f0f60e9a7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:08:23 -0500 Subject: [PATCH 144/576] Create dedal.c --- stratum/algos/dedal.c | 187 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 stratum/algos/dedal.c diff --git a/stratum/algos/dedal.c b/stratum/algos/dedal.c new file mode 100644 index 000000000..640ac9ba4 --- /dev/null +++ b/stratum/algos/dedal.c @@ -0,0 +1,187 @@ +#include +#include +#include + +#include "dedal.h" +#include "../sha3/sph_blake.h" +#include "../sha3/sph_bmw.h" +#include "../sha3/sph_groestl.h" +#include "../sha3/sph_jh.h" +#include "../sha3/sph_keccak.h" +#include "../sha3/sph_skein.h" +#include "../sha3/sph_luffa.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_shavite.h" +#include "../sha3/sph_simd.h" +#include "../sha3/sph_echo.h" +#include "../sha3/sph_hamsi.h" +#include "../sha3/sph_fugue.h" +#include "../sha3/sph_shabal.h" +#include "../sha3/sph_whirlpool.h" +#include "../sha3/sph_sha2.h" + +const uint8_t Kspeed[16] = { + 200, // BLAKE + 236, // BMW + 252, // SKEIN + 224, // KECCAK + 240, // SHA512 + 230, // SHABAL + 79, // WHIRLPOOL + 78, // LUFFA + 89, // CUBEHASH + 62, // SHAVITE + 59, // FUGUE + 119, // JH + 62, // HAMSI + 52, // ECHO + 22, // SIMD + 47 // GROESTL +}; + +static void get_hash_order(const uint32_t* prevblock, uint8_t* output, uint8_t* hashrounds) +{ + uint8_t* ord = output; + uint8_t hr = 0; + uint8_t* data = (uint8_t*)prevblock; + uint16_t tspeed = 0; + + for (uint8_t i = 0; i < 6; i++) { + ord[i] = data[i] % 16; + ord[i + 6] = data[i+1] >> 4; + tspeed += Kspeed[ord[i]] + Kspeed[ord[i + 6]]; + } + hr = tspeed + 920 >> 7; + + int8_t c = hr - 12; + for (uint8_t i = 0; i < c ; i++) { + if (i < 15) { + uint8_t j = i >> 1; + ord[i + 12] = (i & 1) ? data[j] % 6 : data[j] % 5; + } else { + ord[i + 12] = data[i - 15] % 4; + } + } + *hashrounds = hr; +} + +void dedal_hash(const char* input, char* output, uint32_t len) +{ + + unsigned char hash[128]; + + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_skein512_context ctx_skein; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + + const void *in = input; + int size = len; + uint32_t *in32 = (uint32_t*) input; + uint8_t hashorder[32] = {}; + uint8_t hashrounds = 0; + + get_hash_order(&in32[1], hashorder, &hashrounds); + + for (int i = 0; i < hashrounds; i++) + { + switch (hashorder[i]) + { + case 0: + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, in, size); + sph_blake512_close(&ctx_blake, hash); + break; + case 1: + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, in, size); + sph_bmw512_close(&ctx_bmw, hash); + break; + case 2: + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, in, size); + sph_skein512_close(&ctx_skein, hash); + break; + case 3: + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, in, size); + sph_keccak512_close(&ctx_keccak, hash); + break; + case 4: + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512, in, size); + sph_sha512_close(&ctx_sha512, hash); + break; + case 5: + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, in, size); + sph_shabal512_close(&ctx_shabal, hash); + break; + case 6: + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, in, size); + sph_whirlpool_close(&ctx_whirlpool, hash); + break; + case 7: + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, in, size); + sph_luffa512_close(&ctx_luffa, hash); + break; + case 8: + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, in, size); + sph_cubehash512_close(&ctx_cubehash, hash); + break; + case 9: + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, in, size); + sph_shavite512_close(&ctx_shavite, hash); + break; + case 10: + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, in, size); + sph_fugue512_close(&ctx_fugue, hash); + break; + case 11: + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, in, size); + sph_jh512_close(&ctx_jh, hash); + break; + case 12: + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, in, size); + sph_hamsi512_close(&ctx_hamsi, hash); + break; + case 13: + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, in, size); + sph_echo512_close(&ctx_echo, hash); + break; + case 14: + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, in, size); + sph_simd512_close(&ctx_simd, hash); + break; + case 15: + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, in, size); + sph_groestl512_close(&ctx_groestl, hash); + break; + } + in = (void*)hash; + size = 64; + } + memcpy(output, hash, 32); +} From 5057fc968baa6ddb6edc2cb1df6a2157ce04ac9d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:09:13 -0500 Subject: [PATCH 145/576] Create dedal.h --- stratum/algos/dedal.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/dedal.h diff --git a/stratum/algos/dedal.h b/stratum/algos/dedal.h new file mode 100644 index 000000000..a3238f6ba --- /dev/null +++ b/stratum/algos/dedal.h @@ -0,0 +1,16 @@ +#ifndef DEDALHASH_H +#define DEDALHASH_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void dedal_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif // DEDALHASH_H From 2a92f25fdad93391f6107131a570ffce662cb73c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:09:58 -0500 Subject: [PATCH 146/576] Create gltalgos.c --- stratum/algos/gltalgos.c | 470 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 470 insertions(+) create mode 100644 stratum/algos/gltalgos.c diff --git a/stratum/algos/gltalgos.c b/stratum/algos/gltalgos.c new file mode 100644 index 000000000..dc25f2b3f --- /dev/null +++ b/stratum/algos/gltalgos.c @@ -0,0 +1,470 @@ +#include "gltalgos.h" +#include +#include +#include +#include + +#include "blake2/blake2.h" + +#include "../sha3/sph_blake.h" +#include "../sha3/sph_bmw.h" +#include "../sha3/sph_groestl.h" +#include "../sha3/sph_jh.h" +#include "../sha3/sph_keccak.h" +#include "../sha3/sph_skein.h" +#include "../sha3/sph_luffa.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_shavite.h" +#include "../sha3/sph_simd.h" +#include "../sha3/sph_echo.h" +#include "../sha3/sph_hamsi.h" +#include "../sha3/sph_fugue.h" +#include "../sha3/sph_shabal.h" +#include "../sha3/sph_whirlpool.h" +#include "../sha3/sph_sha2.h" +#include "../sha3/sph_haval.h" +#include "../sha3/sph_gost.h" + + +void pawelhash_hash(const char* input, char* output, uint32_t len) +{ + sph_fugue512_context ctx_fugue; + sph_sha512_context ctx_sha2; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa; + sph_whirlpool_context ctx_whirlpool; + sph_shabal512_context ctx_shabal; + sph_echo512_context ctx_echo; + sph_groestl512_context ctx_groestl; + sph_haval256_5_context ctx_haval; + sph_bmw512_context ctx_bmw; + sph_gost512_context ctx_gost; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, input, len); + sph_fugue512_close(&ctx_fugue, hashA); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashB, 64); + sph_skein512_close(&ctx_skein, hashA); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashA, 64); + sph_jh512_close(&ctx_jh, hashB); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, hashB, 64); + sph_keccak512_close(&ctx_keccak, hashA); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hashA, 64); + sph_luffa512_close(&ctx_luffa, hashB); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, hashA, 64); + sph_groestl512_close(&ctx_groestl, hashB); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashB, 64); + sph_haval256_5_close(&ctx_haval, hashA); + + memset(&hashA[8], 0, 32); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, hashA, 64); + sph_fugue512_close(&ctx_fugue, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_gost512_init(&ctx_gost); + sph_gost512(&ctx_gost, hashA, 64); + sph_gost512_close(&ctx_gost, hashB); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashB, 64); + sph_shabal512_close(&ctx_shabal, hashA); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashA, 64); + sph_whirlpool_close(&ctx_whirlpool, hashB); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512 (&ctx_groestl, hashB, 64); + sph_groestl512_close(&ctx_groestl, hashA); + + memcpy(output, hashA, 32); +} + +void jeonghash_hash(const char* input, char* output, uint32_t len) +{ + sph_simd512_context ctx_simd; + sph_hamsi512_context ctx_hamsi; + sph_shabal512_context ctx_shabal; + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_sha512_context ctx_sha2; + sph_whirlpool_context ctx_whirlpool; + sph_skein512_context ctx_skein; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, input, len); + sph_simd512_close(&ctx_simd, hashA); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hashA, 64); + sph_hamsi512_close(&ctx_hamsi, hashB); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashB, 64); + sph_shabal512_close(&ctx_shabal, hashA); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashA, 64); + sph_blake512_close(&ctx_blake, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashA, 64); + sph_skein512_close(&ctx_skein, hashB); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashB, 64); + sph_skein512_close(&ctx_skein, hashA); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashA, 64); + sph_whirlpool_close(&ctx_whirlpool, hashB); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashB, 64); + sph_sha512_close(&ctx_sha2, hashA); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashB, 64); + sph_blake512_close(&ctx_blake, hashA); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hashB, 64); + sph_hamsi512_close(&ctx_hamsi, hashA); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, hashA, 64); + sph_simd512_close(&ctx_simd, hashB); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, hashB, 64); + sph_simd512_close(&ctx_simd, hashA); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hashA, 64); + sph_hamsi512_close(&ctx_hamsi, hashB); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashB, 64); + sph_shabal512_close(&ctx_shabal, hashA); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashA, 64); + sph_blake512_close(&ctx_blake, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashA, 64); + sph_skein512_close(&ctx_skein, hashB); + + memcpy(output, hashB, 32); +} + +void astralhash_hash(const char* input, char* output, uint32_t len) +{ + sph_luffa512_context ctx_luffa; + sph_skein512_context ctx_skein; + sph_echo512_context ctx_echo; + sph_whirlpool_context ctx_whirlpool; + sph_bmw512_context ctx_bmw; + sph_blake512_context ctx_blake; + sph_shavite512_context ctx_shavite; + sph_fugue512_context ctx_fugue; + sph_hamsi512_context ctx_hamsi; + sph_haval256_5_context ctx_haval; + sph_sha512_context ctx_sha2; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, input, len); + sph_luffa512_close(&ctx_luffa, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashA, 64); + sph_skein512_close(&ctx_skein, hashB); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashA, 64); + sph_whirlpool_close(&ctx_whirlpool, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashA, 64); + sph_blake512_close(&ctx_blake, hashB); + + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, hashB, 64); + sph_shavite512_close(&ctx_shavite, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashA, 64); + sph_skein512_close(&ctx_skein, hashB); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, hashA, 64); + sph_fugue512_close(&ctx_fugue, hashB); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hashB, 64); + sph_hamsi512_close(&ctx_hamsi, hashA); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashA, 64); + sph_haval256_5_close(&ctx_haval, hashB); + + memset(&hashB[8], 0, 32); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashB, 64); + sph_sha512_close(&ctx_sha2, hashA); + + memcpy(output, hashA, 32); +} + +void padihash_hash(const char* input, char* output, uint32_t len) +{ + sph_sha512_context ctx_sha2; + sph_jh512_context ctx_jh; + sph_luffa512_context ctx_luffa; + sph_echo512_context ctx_echo; + sph_bmw512_context ctx_bmw; + sph_haval256_5_context ctx_haval; + sph_cubehash512_context ctx_cubehash; + sph_shabal512_context ctx_shabal; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, input, len); + sph_sha512_close(&ctx_sha2, hashA); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashA, 64); + sph_jh512_close(&ctx_jh, hashB); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hashB, 64); + sph_luffa512_close(&ctx_luffa, hashA); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashA, 64); + sph_echo512_close(&ctx_echo, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashA, 64); + sph_haval256_5_close(&ctx_haval, hashB); + + memset(&hashB[8], 0, 32); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, hashB, 64); + sph_cubehash512_close(&ctx_cubehash, hashA); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashB, 64); + sph_sha512_close(&ctx_sha2, hashA); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashA, 64); + sph_jh512_close(&ctx_jh, hashB); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hashB, 64); + sph_luffa512_close(&ctx_luffa, hashA); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashA, 64); + sph_echo512_close(&ctx_echo, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashA, 64); + sph_haval256_5_close(&ctx_haval, hashB); + + memset(&hashB[8], 0, 32); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, hashB, 64); + sph_cubehash512_close(&ctx_cubehash, hashA); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashB, 64); + sph_shabal512_close(&ctx_shabal, hashA); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, hashA, 64); + sph_cubehash512_close(&ctx_cubehash, hashB); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashB, 64); + sph_haval256_5_close(&ctx_haval, hashA); + + memset(&hashA[8], 0, 32); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hashA, 64); + sph_luffa512_close(&ctx_luffa, hashB); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashB, 64); + sph_jh512_close(&ctx_jh, hashA); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashB, 64); + sph_jh512_close(&ctx_jh, hashA); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + memcpy(output, hashB, 32); +} + +void globalhash_hash(const char* input, char* output, uint32_t len) +{ + sph_gost512_context ctx_gost; + sph_blake512_context ctx_blake; + blake2b_state ctx_blake2b[1]; + blake2s_state ctx_blake2s[1]; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16], finalhash[8]; // finalhash is a 256 unsigned integer + + sph_gost512_init(&ctx_gost); + sph_gost512 (&ctx_gost, input, len); + sph_gost512_close(&ctx_gost, hashA); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashA, 64); + sph_blake512_close(&ctx_blake, hashB); + + blake2b_init( ctx_blake2b, BLAKE2B_OUTBYTES ); + blake2b_update( ctx_blake2b, hashB, 64 ); + blake2b_final( ctx_blake2b, hashA, BLAKE2B_OUTBYTES ); + + blake2s_init( ctx_blake2s, BLAKE2S_OUTBYTES ); + blake2s_update( ctx_blake2s, hashA, 64); + blake2s_final( ctx_blake2s, finalhash, BLAKE2S_OUTBYTES ); + + memcpy(output, finalhash, 32); +} From a83f9b88ce3958dc917263c5864298006f288f2b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:10:35 -0500 Subject: [PATCH 147/576] Create gltalgos.h --- stratum/algos/gltalgos.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 stratum/algos/gltalgos.h diff --git a/stratum/algos/gltalgos.h b/stratum/algos/gltalgos.h new file mode 100644 index 000000000..ff6e3c992 --- /dev/null +++ b/stratum/algos/gltalgos.h @@ -0,0 +1,20 @@ +#ifndef GLTALGOS_H +#define GLTALGOS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void pawelhash_hash(const char* input, char* output, uint32_t len); +void astralhash_hash(const char* input, char* output, uint32_t len); +void jeonghash_hash(const char* input, char* output, uint32_t len); +void padihash_hash(const char* input, char* output, uint32_t len); +void globalhash_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From ff5c1bf3b557e14e3ab2793a723c4222b00e0c9a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:11:31 -0500 Subject: [PATCH 148/576] Create insecure_memzero.h --- stratum/algos/insecure_memzero.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 stratum/algos/insecure_memzero.h diff --git a/stratum/algos/insecure_memzero.h b/stratum/algos/insecure_memzero.h new file mode 100644 index 000000000..5a0ba75c4 --- /dev/null +++ b/stratum/algos/insecure_memzero.h @@ -0,0 +1 @@ +#define insecure_memzero(buf, len) /* empty */ From 2a76d473dc5a1f3dfd7f7e03df6e1818858a9135 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:15:31 -0500 Subject: [PATCH 149/576] Update makefile --- stratum/algos/makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 92202d1d6..7ef5dd7d9 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -20,7 +20,8 @@ SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2vc0ban.c Sponge.c al a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ argon2a.c blake2/blake2b.c ar2/argon2.c ar2/core.c ar2/encoding.c ar2/opt.c ar2/thread.c ar2/ar2-scrypt-jane.c \ hive.c pomelo.c hex.c argon2d-dyn.c \ - phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c + phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ + yespower.c yespower-opt.c sha256-P.c dedal.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) OUTPUT=libalgos.a From 4508a0cf494fea865a2bce99ee7cebac3559c9cb Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:15:51 -0500 Subject: [PATCH 150/576] Create pipehash.c --- stratum/algos/pipehash.c | 188 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 stratum/algos/pipehash.c diff --git a/stratum/algos/pipehash.c b/stratum/algos/pipehash.c new file mode 100644 index 000000000..728e6c3f5 --- /dev/null +++ b/stratum/algos/pipehash.c @@ -0,0 +1,188 @@ +/* + * pipehash cryptographic hash function + * + * Copyright (c) 2018, uou pipe developer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include "sha256.h" +#include +#include +//#include "sph_blake.h" +//#include "sph_groestl.h" +#include +#include +#include "pipehash.h" +#include +#include + + +void shift_left(unsigned char *data, unsigned int shift){ + unsigned char a[32]; + memcpy(a,data,32); + + memset(data,0,32); + + int k = shift / 8; + shift = shift % 8; + for (int i = 0; i < 32; i++) + { + if (i+k+1 < 32 && shift != 0) + data[i+k+1] |= (a[i] >> (8-shift)); + if (i+k < 32) + data[i+k] |= (a[i] << shift); + } +} + +void shift_right(unsigned char *data, unsigned int shift){ + unsigned char a[32]; + memcpy(a,data,32); + + memset(data,0,32); + + int k = shift / 8;//How bytes to shift + shift = shift % 8; //How bits to shift in current byte + for (int i = 0; i < 32; i++) + { + if (i-k-1 >= 0 && shift != 0) + data[i-k-1] |= (a[i] << (8-shift)); + if (i-k >= 0) + data[i-k] |= (a[i] >> shift); + } +} + +void or_op(unsigned char *data,int val){ + data[0] |= (int)val; +} + +int and_result_not_equ_zero(unsigned char *in1,unsigned char *in2){ + for (int i = 0; i < 32; i++){ + if(in1[i]&in2[i]) + return 1; + } + return 0; +} + + +/* Combine stop 64-bits from each hash into a single hash */ +void combine_hashes(unsigned char* hash1, unsigned char* hash2, unsigned char* hash3, unsigned char* hash4,unsigned char* output) +{ + unsigned char mask[32]; + memset(mask,0,32);mask[31]=0x80; + + unsigned char hash[4][32]; + memcpy(hash[0],hash1,32); + memcpy(hash[1],hash2,32); + memcpy(hash[2],hash3,32); + memcpy(hash[3],hash4,32); + + + /* Transpose first 64 bits of each hash into final */ + unsigned char final[32]={0}; + for (unsigned int i = 0; i < 64; i++) { + for (unsigned int j = 0; j < 4; j++) { + shift_left(final,1); + if (and_result_not_equ_zero(hash[j] , mask)) + or_op(final,1); + } + shift_right(mask,1); + } + + memcpy(output,final,32); +} + +/* Combines top 64-bits from each hash into a single hash */ +static void cpu_combine_hashes(uint32_t *out, const uint32_t *hash1, const uint32_t *hash2, const uint32_t *hash3, const uint32_t *hash4) +{ + const uint32_t *hash[4] = { hash1, hash2, hash3, hash4 }; + int bits; + unsigned int i; + uint32_t mask; + unsigned int k; + + /* Transpose first 64 bits of each hash into out */ + memset(out, 0, 32); + bits = 0; + for (i = 7; i >= 6; i--) { + for (mask = 0x80000000; mask; mask >>= 1) { + for (k = 0; k < 4; k++) { + out[(255 - bits) / 32] <<= 1; + if ((hash[k][i] & mask) != 0) + out[(255 - bits) / 32] |= 1; + bits++; + } + } + } +} + +void pipe_hash(const char *input,char *output,unsigned int len) +{ + unsigned char hash1[32]; + HEFTY1(input, len , hash1); + + /* HEFTY1 is new, so take an extra security measure to eliminate + * the possiblity of collisions: + * + * Hash(x) = SHA256(x + HEFTY1(x)) + * + * N.B. '+' is concatenation. + */ + unsigned char hash2[32]; + SHA256_CTX ctx; + SHA256_Init(&ctx); + SHA256_Update(&ctx,input,len); + SHA256_Update(&ctx, hash1, 32); + SHA256_Final(hash2, &ctx); + + /* Additional security: Do not rely on a single cryptographic hash + * function. Instead, combine the outputs of 4 of the most secure + * cryptographic hash functions-- SHA256, KECCAK512, GROESTL512 + * and BLAKE512. + */ + + unsigned char hash3[64]; + sph_keccak512_context keccakCtx; + sph_keccak512_init(&keccakCtx); + sph_keccak512(&keccakCtx,input,len); + sph_keccak512(&keccakCtx, hash1, 32); + sph_keccak512_close(&keccakCtx, (void *)hash3); + + unsigned char hash4[64]; + sph_groestl512_context groestlCtx; + sph_groestl512_init(&groestlCtx); + sph_groestl512(&groestlCtx,input,len); + sph_groestl512(&groestlCtx, hash1, 32); + sph_groestl512_close(&groestlCtx, (void *)hash4); + + unsigned char hash5[64]; + sph_blake512_context blakeCtx; + sph_blake512_init(&blakeCtx); + sph_blake512(&blakeCtx,input,len); + sph_blake512(&blakeCtx, hash1, 32); + sph_blake512_close(&blakeCtx, (void *)hash5); + + cpu_combine_hashes(output,hash2, hash3, hash4, hash5); +} From 44488c98ed82e78d2b319e9e0c525dc53a0e6551 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:16:40 -0500 Subject: [PATCH 151/576] Create pipehash.h --- stratum/algos/pipehash.h | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 stratum/algos/pipehash.h diff --git a/stratum/algos/pipehash.h b/stratum/algos/pipehash.h new file mode 100644 index 000000000..3d9db3d14 --- /dev/null +++ b/stratum/algos/pipehash.h @@ -0,0 +1,50 @@ +/* + * PIPEHASH cryptographic hash function + * + * Copyright (c) 2018, UOU PIPE Developers + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +#ifndef __PIPEHASH_H__ +#define __PIPEHASH_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef WIN32 +#include +#endif + +#include + +void pipe_hash(const char *input,char *output,unsigned int len); +#ifdef __cplusplus +} +#endif + +#endif /* __PIPEHASH_H__ */ From 21288e05fe4bb06135bb5e50829740d7f6b25a3e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:17:29 -0500 Subject: [PATCH 152/576] Create sha256-P.c --- stratum/algos/sha256-P.c | 646 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 646 insertions(+) create mode 100644 stratum/algos/sha256-P.c diff --git a/stratum/algos/sha256-P.c b/stratum/algos/sha256-P.c new file mode 100644 index 000000000..bd14b171e --- /dev/null +++ b/stratum/algos/sha256-P.c @@ -0,0 +1,646 @@ +/*- + * Copyright 2005-2016 Colin Percival + * Copyright 2016-2018 Alexander Peslyak + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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 +#include +#include + +#include "insecure_memzero.h" +#include "sysendian_yp.h" + +#include "sha256-P.h" + +#ifdef __ICC +/* Miscompile with icc 14.0.0 (at least), so don't use restrict there */ +#define restrict +#elif __STDC_VERSION__ >= 199901L +/* Have restrict */ +#elif defined(__GNUC__) +#define restrict __restrict +#else +#define restrict +#endif + +/* + * Encode a length len*2 vector of (uint32_t) into a length len*8 vector of + * (uint8_t) in big-endian form. + */ +static void +be32enc_vect(uint8_t * dst, const uint32_t * src, size_t len) +{ + + /* Encode vector, two words at a time. */ + do { + be32enc(&dst[0], src[0]); + be32enc(&dst[4], src[1]); + src += 2; + dst += 8; + } while (--len); +} + +/* + * Decode a big-endian length len*8 vector of (uint8_t) into a length + * len*2 vector of (uint32_t). + */ +static void +be32dec_vect(uint32_t * dst, const uint8_t * src, size_t len) +{ + + /* Decode vector, two words at a time. */ + do { + dst[0] = be32dec(&src[0]); + dst[1] = be32dec(&src[4]); + src += 8; + dst += 2; + } while (--len); +} + +/* SHA256 round constants. */ +static const uint32_t Krnd[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +/* Elementary functions used by SHA256 */ +#define Ch(x, y, z) ((x & (y ^ z)) ^ z) +#define Maj(x, y, z) ((x & (y | z)) | (y & z)) +#define SHR(x, n) (x >> n) +#define ROTR(x, n) ((x >> n) | (x << (32 - n))) +#define S0(x) (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22)) +#define S1(x) (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25)) +#define s0(x) (ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3)) +#define s1(x) (ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10)) + +/* SHA256 round function */ +#define RND(a, b, c, d, e, f, g, h, k) \ + h += S1(e) + Ch(e, f, g) + k; \ + d += h; \ + h += S0(a) + Maj(a, b, c); + +/* Adjusted round function for rotating state */ +#define RNDr(S, W, i, ii) \ + RND(S[(64 - i) % 8], S[(65 - i) % 8], \ + S[(66 - i) % 8], S[(67 - i) % 8], \ + S[(68 - i) % 8], S[(69 - i) % 8], \ + S[(70 - i) % 8], S[(71 - i) % 8], \ + W[i + ii] + Krnd[i + ii]) + +/* Message schedule computation */ +#define MSCH(W, ii, i) \ + W[i + ii + 16] = s1(W[i + ii + 14]) + W[i + ii + 9] + s0(W[i + ii + 1]) + W[i + ii] + +/* + * SHA256 block compression function. The 256-bit state is transformed via + * the 512-bit input block to produce a new state. + */ +static void +SHA256_Transform(uint32_t state[static restrict 8], + const uint8_t block[static restrict 64], + uint32_t W[static restrict 64], uint32_t S[static restrict 8]) +{ + int i; + + /* 1. Prepare the first part of the message schedule W. */ + be32dec_vect(W, block, 8); + + /* 2. Initialize working variables. */ + memcpy(S, state, 32); + + /* 3. Mix. */ + for (i = 0; i < 64; i += 16) { + RNDr(S, W, 0, i); + RNDr(S, W, 1, i); + RNDr(S, W, 2, i); + RNDr(S, W, 3, i); + RNDr(S, W, 4, i); + RNDr(S, W, 5, i); + RNDr(S, W, 6, i); + RNDr(S, W, 7, i); + RNDr(S, W, 8, i); + RNDr(S, W, 9, i); + RNDr(S, W, 10, i); + RNDr(S, W, 11, i); + RNDr(S, W, 12, i); + RNDr(S, W, 13, i); + RNDr(S, W, 14, i); + RNDr(S, W, 15, i); + + if (i == 48) + break; + MSCH(W, 0, i); + MSCH(W, 1, i); + MSCH(W, 2, i); + MSCH(W, 3, i); + MSCH(W, 4, i); + MSCH(W, 5, i); + MSCH(W, 6, i); + MSCH(W, 7, i); + MSCH(W, 8, i); + MSCH(W, 9, i); + MSCH(W, 10, i); + MSCH(W, 11, i); + MSCH(W, 12, i); + MSCH(W, 13, i); + MSCH(W, 14, i); + MSCH(W, 15, i); + } + + /* 4. Mix local working variables into global state. */ + state[0] += S[0]; + state[1] += S[1]; + state[2] += S[2]; + state[3] += S[3]; + state[4] += S[4]; + state[5] += S[5]; + state[6] += S[6]; + state[7] += S[7]; +} + +static const uint8_t PAD[64] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* Add padding and terminating bit-count. */ +static void +SHA256_Pad(SHA256_CTX * ctx, uint32_t tmp32[static restrict 72]) +{ + size_t r; + + /* Figure out how many bytes we have buffered. */ + r = (ctx->count >> 3) & 0x3f; + + /* Pad to 56 mod 64, transforming if we finish a block en route. */ + if (r < 56) { + /* Pad to 56 mod 64. */ + memcpy(&ctx->buf[r], PAD, 56 - r); + } else { + /* Finish the current block and mix. */ + memcpy(&ctx->buf[r], PAD, 64 - r); + SHA256_Transform(ctx->state, ctx->buf, &tmp32[0], &tmp32[64]); + + /* The start of the final block is all zeroes. */ + memset(&ctx->buf[0], 0, 56); + } + + /* Add the terminating bit-count. */ + be64enc(&ctx->buf[56], ctx->count); + + /* Mix in the final block. */ + SHA256_Transform(ctx->state, ctx->buf, &tmp32[0], &tmp32[64]); +} + +/* Magic initialization constants. */ +static const uint32_t initial_state[8] = { + 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, + 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 +}; + +/** + * SHA256_Init(ctx): + * Initialize the SHA256 context ${ctx}. + */ +void +SHA256_Init(SHA256_CTX * ctx) +{ + + /* Zero bits processed so far. */ + ctx->count = 0; + + /* Initialize state. */ + memcpy(ctx->state, initial_state, sizeof(initial_state)); +} + +/** + * SHA256_Update(ctx, in, len): + * Input ${len} bytes from ${in} into the SHA256 context ${ctx}. + */ +static void +_SHA256_Update(SHA256_CTX * ctx, const void * in, size_t len, + uint32_t tmp32[static restrict 72]) +{ + uint32_t r; + const uint8_t * src = in; + + /* Return immediately if we have nothing to do. */ + if (len == 0) + return; + + /* Number of bytes left in the buffer from previous updates. */ + r = (ctx->count >> 3) & 0x3f; + + /* Update number of bits. */ + ctx->count += (uint64_t)(len) << 3; + + /* Handle the case where we don't need to perform any transforms. */ + if (len < 64 - r) { + memcpy(&ctx->buf[r], src, len); + return; + } + + /* Finish the current block. */ + memcpy(&ctx->buf[r], src, 64 - r); + SHA256_Transform(ctx->state, ctx->buf, &tmp32[0], &tmp32[64]); + src += 64 - r; + len -= 64 - r; + + /* Perform complete blocks. */ + while (len >= 64) { + SHA256_Transform(ctx->state, src, &tmp32[0], &tmp32[64]); + src += 64; + len -= 64; + } + + /* Copy left over data into buffer. */ + memcpy(ctx->buf, src, len); +} + +/* Wrapper function for intermediate-values sanitization. */ +void +SHA256_Update(SHA256_CTX * ctx, const void * in, size_t len) +{ + uint32_t tmp32[72]; + + /* Call the real function. */ + _SHA256_Update(ctx, in, len, tmp32); + + /* Clean the stack. */ + insecure_memzero(tmp32, 288); +} + +/** + * SHA256_Final(digest, ctx): + * Output the SHA256 hash of the data input to the context ${ctx} into the + * buffer ${digest}. + */ +static void +_SHA256_Final(uint8_t digest[32], SHA256_CTX * ctx, + uint32_t tmp32[static restrict 72]) +{ + + /* Add padding. */ + SHA256_Pad(ctx, tmp32); + + /* Write the hash. */ + be32enc_vect(digest, ctx->state, 4); +} + +/* Wrapper function for intermediate-values sanitization. */ +void +SHA256_Final(uint8_t digest[32], SHA256_CTX * ctx) +{ + uint32_t tmp32[72]; + + /* Call the real function. */ + _SHA256_Final(digest, ctx, tmp32); + + /* Clear the context state. */ + insecure_memzero(ctx, sizeof(SHA256_CTX)); + + /* Clean the stack. */ + insecure_memzero(tmp32, 288); +} + +/** + * SHA256_Buf(in, len, digest): + * Compute the SHA256 hash of ${len} bytes from ${in} and write it to ${digest}. + */ +void +SHA256_Buf(const void * in, size_t len, uint8_t digest[32]) +{ + SHA256_CTX ctx; + uint32_t tmp32[72]; + + SHA256_Init(&ctx); + _SHA256_Update(&ctx, in, len, tmp32); + _SHA256_Final(digest, &ctx, tmp32); + + /* Clean the stack. */ + insecure_memzero(&ctx, sizeof(SHA256_CTX)); + insecure_memzero(tmp32, 288); +} + +/** + * HMAC_SHA256_Init(ctx, K, Klen): + * Initialize the HMAC-SHA256 context ${ctx} with ${Klen} bytes of key from + * ${K}. + */ +static void +_HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen, + uint32_t tmp32[static restrict 72], uint8_t pad[static restrict 64], + uint8_t khash[static restrict 32]) +{ + const uint8_t * K = _K; + size_t i; + + /* If Klen > 64, the key is really SHA256(K). */ + if (Klen > 64) { + SHA256_Init(&ctx->ictx); + _SHA256_Update(&ctx->ictx, K, Klen, tmp32); + _SHA256_Final(khash, &ctx->ictx, tmp32); + K = khash; + Klen = 32; + } + + /* Inner SHA256 operation is SHA256(K xor [block of 0x36] || data). */ + SHA256_Init(&ctx->ictx); + memset(pad, 0x36, 64); + for (i = 0; i < Klen; i++) + pad[i] ^= K[i]; + _SHA256_Update(&ctx->ictx, pad, 64, tmp32); + + /* Outer SHA256 operation is SHA256(K xor [block of 0x5c] || hash). */ + SHA256_Init(&ctx->octx); + memset(pad, 0x5c, 64); + for (i = 0; i < Klen; i++) + pad[i] ^= K[i]; + _SHA256_Update(&ctx->octx, pad, 64, tmp32); +} + +/* Wrapper function for intermediate-values sanitization. */ +void +HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen) +{ + uint32_t tmp32[72]; + uint8_t pad[64]; + uint8_t khash[32]; + + /* Call the real function. */ + _HMAC_SHA256_Init(ctx, _K, Klen, tmp32, pad, khash); + + /* Clean the stack. */ + insecure_memzero(tmp32, 288); + insecure_memzero(khash, 32); + insecure_memzero(pad, 64); +} + +/** + * HMAC_SHA256_Update(ctx, in, len): + * Input ${len} bytes from ${in} into the HMAC-SHA256 context ${ctx}. + */ +static void +_HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void * in, size_t len, + uint32_t tmp32[static restrict 72]) +{ + + /* Feed data to the inner SHA256 operation. */ + _SHA256_Update(&ctx->ictx, in, len, tmp32); +} + +/* Wrapper function for intermediate-values sanitization. */ +void +HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void * in, size_t len) +{ + uint32_t tmp32[72]; + + /* Call the real function. */ + _HMAC_SHA256_Update(ctx, in, len, tmp32); + + /* Clean the stack. */ + insecure_memzero(tmp32, 288); +} + +/** + * HMAC_SHA256_Final(digest, ctx): + * Output the HMAC-SHA256 of the data input to the context ${ctx} into the + * buffer ${digest}. + */ +static void +_HMAC_SHA256_Final(uint8_t digest[32], HMAC_SHA256_CTX * ctx, + uint32_t tmp32[static restrict 72], uint8_t ihash[static restrict 32]) +{ + + /* Finish the inner SHA256 operation. */ + _SHA256_Final(ihash, &ctx->ictx, tmp32); + + /* Feed the inner hash to the outer SHA256 operation. */ + _SHA256_Update(&ctx->octx, ihash, 32, tmp32); + + /* Finish the outer SHA256 operation. */ + _SHA256_Final(digest, &ctx->octx, tmp32); +} + +/* Wrapper function for intermediate-values sanitization. */ +void +HMAC_SHA256_Final(uint8_t digest[32], HMAC_SHA256_CTX * ctx) +{ + uint32_t tmp32[72]; + uint8_t ihash[32]; + + /* Call the real function. */ + _HMAC_SHA256_Final(digest, ctx, tmp32, ihash); + + /* Clean the stack. */ + insecure_memzero(tmp32, 288); + insecure_memzero(ihash, 32); +} + +/** + * HMAC_SHA256_Buf(K, Klen, in, len, digest): + * Compute the HMAC-SHA256 of ${len} bytes from ${in} using the key ${K} of + * length ${Klen}, and write the result to ${digest}. + */ +void +HMAC_SHA256_Buf(const void * K, size_t Klen, const void * in, size_t len, + uint8_t digest[32]) +{ + HMAC_SHA256_CTX ctx; + uint32_t tmp32[72]; + uint8_t tmp8[96]; + + _HMAC_SHA256_Init(&ctx, K, Klen, tmp32, &tmp8[0], &tmp8[64]); + _HMAC_SHA256_Update(&ctx, in, len, tmp32); + _HMAC_SHA256_Final(digest, &ctx, tmp32, &tmp8[0]); + + /* Clean the stack. */ + insecure_memzero(&ctx, sizeof(HMAC_SHA256_CTX)); + insecure_memzero(tmp32, 288); + insecure_memzero(tmp8, 96); +} + +/* Add padding and terminating bit-count, but don't invoke Transform yet. */ +static int +SHA256_Pad_Almost(SHA256_CTX * ctx, uint8_t len[static restrict 8], + uint32_t tmp32[static restrict 72]) +{ + uint32_t r; + + r = (ctx->count >> 3) & 0x3f; + if (r >= 56) + return -1; + + /* + * Convert length to a vector of bytes -- we do this now rather + * than later because the length will change after we pad. + */ + be64enc(len, ctx->count); + + /* Add 1--56 bytes so that the resulting length is 56 mod 64. */ + _SHA256_Update(ctx, PAD, 56 - r, tmp32); + + /* Add the terminating bit-count. */ + ctx->buf[63] = len[7]; + _SHA256_Update(ctx, len, 7, tmp32); + + return 0; +} + +/** + * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): + * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and + * write the output to buf. The value dkLen must be at most 32 * (2^32 - 1). + */ +void +YESPOWER_PBKDF2_SHA256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt, + size_t saltlen, uint64_t c, uint8_t * buf, size_t dkLen) +{ + HMAC_SHA256_CTX Phctx, PShctx, hctx; + uint32_t tmp32[72]; + union { + uint8_t tmp8[96]; + uint32_t state[8]; + } u; + size_t i; + uint8_t ivec[4]; + uint8_t U[32]; + uint8_t T[32]; + uint64_t j; + int k; + size_t clen; + + /* Sanity-check. */ + assert(dkLen <= 32 * (size_t)(UINT32_MAX)); + + if (c == 1 && (dkLen & 31) == 0 && (saltlen & 63) <= 51) { + uint32_t oldcount; + uint8_t * ivecp; + + /* Compute HMAC state after processing P and S. */ + _HMAC_SHA256_Init(&hctx, passwd, passwdlen, + tmp32, &u.tmp8[0], &u.tmp8[64]); + _HMAC_SHA256_Update(&hctx, salt, saltlen, tmp32); + + /* Prepare ictx padding. */ + oldcount = hctx.ictx.count & (0x3f << 3); + _HMAC_SHA256_Update(&hctx, "\0\0\0", 4, tmp32); + if ((hctx.ictx.count & (0x3f << 3)) < oldcount || + SHA256_Pad_Almost(&hctx.ictx, u.tmp8, tmp32)) + goto generic; /* Can't happen due to saltlen check */ + ivecp = hctx.ictx.buf + (oldcount >> 3); + + /* Prepare octx padding. */ + hctx.octx.count += 32 << 3; + SHA256_Pad_Almost(&hctx.octx, u.tmp8, tmp32); + + /* Iterate through the blocks. */ + for (i = 0; i * 32 < dkLen; i++) { + /* Generate INT(i + 1). */ + be32enc(ivecp, (uint32_t)(i + 1)); + + /* Compute U_1 = PRF(P, S || INT(i)). */ + memcpy(u.state, hctx.ictx.state, sizeof(u.state)); + SHA256_Transform(u.state, hctx.ictx.buf, + &tmp32[0], &tmp32[64]); + be32enc_vect(hctx.octx.buf, u.state, 4); + memcpy(u.state, hctx.octx.state, sizeof(u.state)); + SHA256_Transform(u.state, hctx.octx.buf, + &tmp32[0], &tmp32[64]); + be32enc_vect(&buf[i * 32], u.state, 4); + } + + goto cleanup; + } + +generic: + /* Compute HMAC state after processing P. */ + _HMAC_SHA256_Init(&Phctx, passwd, passwdlen, + tmp32, &u.tmp8[0], &u.tmp8[64]); + + /* Compute HMAC state after processing P and S. */ + memcpy(&PShctx, &Phctx, sizeof(HMAC_SHA256_CTX)); + _HMAC_SHA256_Update(&PShctx, salt, saltlen, tmp32); + + /* Iterate through the blocks. */ + for (i = 0; i * 32 < dkLen; i++) { + /* Generate INT(i + 1). */ + be32enc(ivec, (uint32_t)(i + 1)); + + /* Compute U_1 = PRF(P, S || INT(i)). */ + memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX)); + _HMAC_SHA256_Update(&hctx, ivec, 4, tmp32); + _HMAC_SHA256_Final(T, &hctx, tmp32, u.tmp8); + + if (c > 1) { + /* T_i = U_1 ... */ + memcpy(U, T, 32); + + for (j = 2; j <= c; j++) { + /* Compute U_j. */ + memcpy(&hctx, &Phctx, sizeof(HMAC_SHA256_CTX)); + _HMAC_SHA256_Update(&hctx, U, 32, tmp32); + _HMAC_SHA256_Final(U, &hctx, tmp32, u.tmp8); + + /* ... xor U_j ... */ + for (k = 0; k < 32; k++) + T[k] ^= U[k]; + } + } + + /* Copy as many bytes as necessary into buf. */ + clen = dkLen - i * 32; + if (clen > 32) + clen = 32; + memcpy(&buf[i * 32], T, clen); + } + + /* Clean the stack. */ + insecure_memzero(&Phctx, sizeof(HMAC_SHA256_CTX)); + insecure_memzero(&PShctx, sizeof(HMAC_SHA256_CTX)); + insecure_memzero(U, 32); + insecure_memzero(T, 32); + +cleanup: + insecure_memzero(&hctx, sizeof(HMAC_SHA256_CTX)); + insecure_memzero(tmp32, 288); + insecure_memzero(&u, sizeof(u)); +} From 5b55621fc5dde1a642fa1fbb9cd0f12a74edb0e2 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:18:14 -0500 Subject: [PATCH 153/576] Create sha256-P.h --- stratum/algos/sha256-P.h | 129 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 stratum/algos/sha256-P.h diff --git a/stratum/algos/sha256-P.h b/stratum/algos/sha256-P.h new file mode 100644 index 000000000..17e491412 --- /dev/null +++ b/stratum/algos/sha256-P.h @@ -0,0 +1,129 @@ +/*- + * Copyright 2005-2016 Colin Percival + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + */ + +#ifndef _SHA256_H_ +#define _SHA256_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Use #defines in order to avoid namespace collisions with anyone else's + * SHA256 code (e.g., the code in OpenSSL). + */ +#define SHA256_Init libcperciva_SHA256_Init +#define SHA256_Update libcperciva_SHA256_Update +#define SHA256_Final libcperciva_SHA256_Final +#define SHA256_Buf libcperciva_SHA256_Buf +#define SHA256_CTX libcperciva_SHA256_CTX +#define HMAC_SHA256_Init libcperciva_HMAC_SHA256_Init +#define HMAC_SHA256_Update libcperciva_HMAC_SHA256_Update +#define HMAC_SHA256_Final libcperciva_HMAC_SHA256_Final +#define HMAC_SHA256_Buf libcperciva_HMAC_SHA256_Buf +#define HMAC_SHA256_CTX libcperciva_HMAC_SHA256_CTX + +/* Context structure for SHA256 operations. */ +typedef struct { + uint32_t state[8]; + uint64_t count; + uint8_t buf[64]; +} SHA256_CTX; + +/** + * SHA256_Init(ctx): + * Initialize the SHA256 context ${ctx}. + */ +void SHA256_Init(SHA256_CTX *); + +/** + * SHA256_Update(ctx, in, len): + * Input ${len} bytes from ${in} into the SHA256 context ${ctx}. + */ +void SHA256_Update(SHA256_CTX *, const void *, size_t); + +/** + * SHA256_Final(digest, ctx): + * Output the SHA256 hash of the data input to the context ${ctx} into the + * buffer ${digest}. + */ +void SHA256_Final(uint8_t[32], SHA256_CTX *); + +/** + * SHA256_Buf(in, len, digest): + * Compute the SHA256 hash of ${len} bytes from ${in} and write it to ${digest}. + */ +void SHA256_Buf(const void *, size_t, uint8_t[32]); + +/* Context structure for HMAC-SHA256 operations. */ +typedef struct { + SHA256_CTX ictx; + SHA256_CTX octx; +} HMAC_SHA256_CTX; + +/** + * HMAC_SHA256_Init(ctx, K, Klen): + * Initialize the HMAC-SHA256 context ${ctx} with ${Klen} bytes of key from + * ${K}. + */ +void HMAC_SHA256_Init(HMAC_SHA256_CTX *, const void *, size_t); + +/** + * HMAC_SHA256_Update(ctx, in, len): + * Input ${len} bytes from ${in} into the HMAC-SHA256 context ${ctx}. + */ +void HMAC_SHA256_Update(HMAC_SHA256_CTX *, const void *, size_t); + +/** + * HMAC_SHA256_Final(digest, ctx): + * Output the HMAC-SHA256 of the data input to the context ${ctx} into the + * buffer ${digest}. + */ +void HMAC_SHA256_Final(uint8_t[32], HMAC_SHA256_CTX *); + +/** + * HMAC_SHA256_Buf(K, Klen, in, len, digest): + * Compute the HMAC-SHA256 of ${len} bytes from ${in} using the key ${K} of + * length ${Klen}, and write the result to ${digest}. + */ +void HMAC_SHA256_Buf(const void *, size_t, const void *, size_t, uint8_t[32]); + +/** + * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): + * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and + * write the output to buf. The value dkLen must be at most 32 * (2^32 - 1). + */ +void YESPOWER_PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t, + uint64_t, uint8_t *, size_t); + +#ifdef __cplusplus +} +#endif + +#endif /* !_SHA256_H_ */ From dbd3589a4a0505607b94a98e319e283ed077316c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:18:37 -0500 Subject: [PATCH 154/576] Create sysendian_yp.h --- stratum/algos/sysendian_yp.h | 94 ++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 stratum/algos/sysendian_yp.h diff --git a/stratum/algos/sysendian_yp.h b/stratum/algos/sysendian_yp.h new file mode 100644 index 000000000..52c1fe73b --- /dev/null +++ b/stratum/algos/sysendian_yp.h @@ -0,0 +1,94 @@ +/*- + * Copyright 2007-2014 Colin Percival + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + */ + +#ifndef _SYSENDIAN_H_ +#define _SYSENDIAN_H_ + +#include + +/* Avoid namespace collisions with BSD . */ +#define be32dec libcperciva_be32dec +#define be32enc libcperciva_be32enc +#define be64enc libcperciva_be64enc +#define le32dec libcperciva_le32dec +#define le32enc libcperciva_le32enc + +static inline uint32_t +be32dec(const void * pp) +{ + const uint8_t * p = (uint8_t const *)pp; + + return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + + ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); +} + +static inline void +be32enc(void * pp, uint32_t x) +{ + uint8_t * p = (uint8_t *)pp; + + p[3] = x & 0xff; + p[2] = (x >> 8) & 0xff; + p[1] = (x >> 16) & 0xff; + p[0] = (x >> 24) & 0xff; +} + +static inline void +be64enc(void * pp, uint64_t x) +{ + uint8_t * p = (uint8_t *)pp; + + p[7] = x & 0xff; + p[6] = (x >> 8) & 0xff; + p[5] = (x >> 16) & 0xff; + p[4] = (x >> 24) & 0xff; + p[3] = (x >> 32) & 0xff; + p[2] = (x >> 40) & 0xff; + p[1] = (x >> 48) & 0xff; + p[0] = (x >> 56) & 0xff; +} + +static inline uint32_t +le32dec(const void * pp) +{ + const uint8_t * p = (uint8_t const *)pp; + + return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) + + ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24)); +} + +static inline void +le32enc(void * pp, uint32_t x) +{ + uint8_t * p = (uint8_t *)pp; + + p[0] = x & 0xff; + p[1] = (x >> 8) & 0xff; + p[2] = (x >> 16) & 0xff; + p[3] = (x >> 24) & 0xff; +} + +#endif /* !_SYSENDIAN_H_ */ From 09786a5831468c8b6028787ca5ada6b23b2ed68a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:19:43 -0500 Subject: [PATCH 155/576] Create yespower-opt.c --- stratum/algos/yespower-opt.c | 1147 ++++++++++++++++++++++++++++++++++ 1 file changed, 1147 insertions(+) create mode 100644 stratum/algos/yespower-opt.c diff --git a/stratum/algos/yespower-opt.c b/stratum/algos/yespower-opt.c new file mode 100644 index 000000000..265481eae --- /dev/null +++ b/stratum/algos/yespower-opt.c @@ -0,0 +1,1147 @@ +/*- + * Copyright 2009 Colin Percival + * Copyright 2012-2018 Alexander Peslyak + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + * + * This is a proof-of-work focused fork of yescrypt, including optimized and + * cut-down implementation of the obsolete yescrypt 0.5 (based off its first + * submission to PHC back in 2014) and a new proof-of-work specific variation + * known as yespower 1.0. The former is intended as an upgrade for + * cryptocurrencies that already use yescrypt 0.5 and the latter may be used + * as a further upgrade (hard fork) by those and other cryptocurrencies. The + * version of algorithm to use is requested through parameters, allowing for + * both algorithms to co-exist in client and miner implementations (such as in + * preparation for a hard-fork). + */ + +#ifndef _YESPOWER_OPT_C_PASS_ +#define _YESPOWER_OPT_C_PASS_ 1 +#endif + +#if _YESPOWER_OPT_C_PASS_ == 1 +/* + * AVX and especially XOP speed up Salsa20 a lot, but needlessly result in + * extra instruction prefixes for pwxform (which we make more use of). While + * no slowdown from the prefixes is generally observed on AMD CPUs supporting + * XOP, some slowdown is sometimes observed on Intel CPUs with AVX. + */ +#ifdef __XOP__ +#warning "Note: XOP is enabled. That's great." +#elif defined(__AVX__) +#warning "Note: AVX is enabled. That's OK." +#elif defined(__SSE2__) +#warning "Note: AVX and XOP are not enabled. That's OK." +#elif defined(__x86_64__) || defined(__i386__) +#warning "SSE2 not enabled. Expect poor performance." +#else +#warning "Note: building generic code for non-x86. That's OK." +#endif + +/* + * The SSE4 code version has fewer instructions than the generic SSE2 version, + * but all of the instructions are SIMD, thereby wasting the scalar execution + * units. Thus, the generic SSE2 version below actually runs faster on some + * CPUs due to its balanced mix of SIMD and scalar instructions. + */ +#undef USE_SSE4_FOR_32BIT + +#ifdef __SSE2__ +/* + * GCC before 4.9 would by default unnecessarily use store/load (without + * SSE4.1) or (V)PEXTR (with SSE4.1 or AVX) instead of simply (V)MOV. + * This was tracked as GCC bug 54349. + * "-mtune=corei7" works around this, but is only supported for GCC 4.6+. + * We use inline asm for pre-4.6 GCC, further down this file. + */ +#if __GNUC__ == 4 && __GNUC_MINOR__ >= 6 && __GNUC_MINOR__ < 9 && \ + !defined(__clang__) && !defined(__ICC) +#pragma GCC target ("tune=corei7") +#endif +#include +#ifdef __XOP__ +#include +#endif +#elif defined(__SSE__) +#include +#endif + +#include +#include +#include +#include + +#include "insecure_memzero.h" +#include "sha256-P.h" +#include "sysendian_yp.h" + +#include "yespower.h" + +#include "yespower-platform.c" + +#if __STDC_VERSION__ >= 199901L +/* Have restrict */ +#elif defined(__GNUC__) +#define restrict __restrict +#else +#define restrict +#endif + +#ifdef __GNUC__ +#define unlikely(exp) __builtin_expect(exp, 0) +#else +#define unlikely(exp) (exp) +#endif + +#ifdef __SSE__ +#define PREFETCH(x, hint) _mm_prefetch((const char *)(x), (hint)); +#else +#undef PREFETCH +#endif + +typedef union { + uint32_t w[16]; + uint64_t d[8]; +#ifdef __SSE2__ + __m128i q[4]; +#endif +} salsa20_blk_t; + +static inline void salsa20_simd_shuffle(const salsa20_blk_t *Bin, + salsa20_blk_t *Bout) +{ +#define COMBINE(out, in1, in2) \ + Bout->d[out] = Bin->w[in1 * 2] | ((uint64_t)Bin->w[in2 * 2 + 1] << 32); + COMBINE(0, 0, 2) + COMBINE(1, 5, 7) + COMBINE(2, 2, 4) + COMBINE(3, 7, 1) + COMBINE(4, 4, 6) + COMBINE(5, 1, 3) + COMBINE(6, 6, 0) + COMBINE(7, 3, 5) +#undef COMBINE +} + +static inline void salsa20_simd_unshuffle(const salsa20_blk_t *Bin, + salsa20_blk_t *Bout) +{ +#define UNCOMBINE(out, in1, in2) \ + Bout->w[out * 2] = Bin->d[in1]; \ + Bout->w[out * 2 + 1] = Bin->d[in2] >> 32; + UNCOMBINE(0, 0, 6) + UNCOMBINE(1, 5, 3) + UNCOMBINE(2, 2, 0) + UNCOMBINE(3, 7, 5) + UNCOMBINE(4, 4, 2) + UNCOMBINE(5, 1, 7) + UNCOMBINE(6, 6, 4) + UNCOMBINE(7, 3, 1) +#undef UNCOMBINE +} + +#ifdef __SSE2__ +#define DECL_X \ + __m128i X0, X1, X2, X3; +#define DECL_Y \ + __m128i Y0, Y1, Y2, Y3; +#define READ_X(in) \ + X0 = (in).q[0]; X1 = (in).q[1]; X2 = (in).q[2]; X3 = (in).q[3]; +#define WRITE_X(out) \ + (out).q[0] = X0; (out).q[1] = X1; (out).q[2] = X2; (out).q[3] = X3; + +#ifdef __XOP__ +#define ARX(out, in1, in2, s) \ + out = _mm_xor_si128(out, _mm_roti_epi32(_mm_add_epi32(in1, in2), s)); +#else +#define ARX(out, in1, in2, s) { \ + __m128i tmp = _mm_add_epi32(in1, in2); \ + out = _mm_xor_si128(out, _mm_slli_epi32(tmp, s)); \ + out = _mm_xor_si128(out, _mm_srli_epi32(tmp, 32 - s)); \ +} +#endif + +#define SALSA20_2ROUNDS \ + /* Operate on "columns" */ \ + ARX(X1, X0, X3, 7) \ + ARX(X2, X1, X0, 9) \ + ARX(X3, X2, X1, 13) \ + ARX(X0, X3, X2, 18) \ + /* Rearrange data */ \ + X1 = _mm_shuffle_epi32(X1, 0x93); \ + X2 = _mm_shuffle_epi32(X2, 0x4E); \ + X3 = _mm_shuffle_epi32(X3, 0x39); \ + /* Operate on "rows" */ \ + ARX(X3, X0, X1, 7) \ + ARX(X2, X3, X0, 9) \ + ARX(X1, X2, X3, 13) \ + ARX(X0, X1, X2, 18) \ + /* Rearrange data */ \ + X1 = _mm_shuffle_epi32(X1, 0x39); \ + X2 = _mm_shuffle_epi32(X2, 0x4E); \ + X3 = _mm_shuffle_epi32(X3, 0x93); + +/** + * Apply the Salsa20 core to the block provided in (X0 ... X3). + */ +#define SALSA20_wrapper(out, rounds) { \ + __m128i Z0 = X0, Z1 = X1, Z2 = X2, Z3 = X3; \ + rounds \ + (out).q[0] = X0 = _mm_add_epi32(X0, Z0); \ + (out).q[1] = X1 = _mm_add_epi32(X1, Z1); \ + (out).q[2] = X2 = _mm_add_epi32(X2, Z2); \ + (out).q[3] = X3 = _mm_add_epi32(X3, Z3); \ +} + +/** + * Apply the Salsa20/2 core to the block provided in X. + */ +#define SALSA20_2(out) \ + SALSA20_wrapper(out, SALSA20_2ROUNDS) + +#define SALSA20_8ROUNDS \ + SALSA20_2ROUNDS SALSA20_2ROUNDS SALSA20_2ROUNDS SALSA20_2ROUNDS + +/** + * Apply the Salsa20/8 core to the block provided in X. + */ +#define SALSA20_8(out) \ + SALSA20_wrapper(out, SALSA20_8ROUNDS) + +#define XOR_X(in) \ + X0 = _mm_xor_si128(X0, (in).q[0]); \ + X1 = _mm_xor_si128(X1, (in).q[1]); \ + X2 = _mm_xor_si128(X2, (in).q[2]); \ + X3 = _mm_xor_si128(X3, (in).q[3]); + +#define XOR_X_2(in1, in2) \ + X0 = _mm_xor_si128((in1).q[0], (in2).q[0]); \ + X1 = _mm_xor_si128((in1).q[1], (in2).q[1]); \ + X2 = _mm_xor_si128((in1).q[2], (in2).q[2]); \ + X3 = _mm_xor_si128((in1).q[3], (in2).q[3]); + +#define XOR_X_WRITE_XOR_Y_2(out, in) \ + (out).q[0] = Y0 = _mm_xor_si128((out).q[0], (in).q[0]); \ + (out).q[1] = Y1 = _mm_xor_si128((out).q[1], (in).q[1]); \ + (out).q[2] = Y2 = _mm_xor_si128((out).q[2], (in).q[2]); \ + (out).q[3] = Y3 = _mm_xor_si128((out).q[3], (in).q[3]); \ + X0 = _mm_xor_si128(X0, Y0); \ + X1 = _mm_xor_si128(X1, Y1); \ + X2 = _mm_xor_si128(X2, Y2); \ + X3 = _mm_xor_si128(X3, Y3); + +#define INTEGERIFY _mm_cvtsi128_si32(X0) + +#else /* !defined(__SSE2__) */ + +#define DECL_X \ + salsa20_blk_t X; +#define DECL_Y \ + salsa20_blk_t Y; + +#define COPY(out, in) \ + (out).d[0] = (in).d[0]; \ + (out).d[1] = (in).d[1]; \ + (out).d[2] = (in).d[2]; \ + (out).d[3] = (in).d[3]; \ + (out).d[4] = (in).d[4]; \ + (out).d[5] = (in).d[5]; \ + (out).d[6] = (in).d[6]; \ + (out).d[7] = (in).d[7]; + +#define READ_X(in) COPY(X, in) +#define WRITE_X(out) COPY(out, X) + +/** + * salsa20(B): + * Apply the Salsa20 core to the provided block. + */ +static inline void salsa20(salsa20_blk_t *restrict B, + salsa20_blk_t *restrict Bout, uint32_t doublerounds) +{ + salsa20_blk_t X; +#define x X.w + + salsa20_simd_unshuffle(B, &X); + + do { +#define R(a,b) (((a) << (b)) | ((a) >> (32 - (b)))) + /* Operate on columns */ + x[ 4] ^= R(x[ 0]+x[12], 7); x[ 8] ^= R(x[ 4]+x[ 0], 9); + x[12] ^= R(x[ 8]+x[ 4],13); x[ 0] ^= R(x[12]+x[ 8],18); + + x[ 9] ^= R(x[ 5]+x[ 1], 7); x[13] ^= R(x[ 9]+x[ 5], 9); + x[ 1] ^= R(x[13]+x[ 9],13); x[ 5] ^= R(x[ 1]+x[13],18); + + x[14] ^= R(x[10]+x[ 6], 7); x[ 2] ^= R(x[14]+x[10], 9); + x[ 6] ^= R(x[ 2]+x[14],13); x[10] ^= R(x[ 6]+x[ 2],18); + + x[ 3] ^= R(x[15]+x[11], 7); x[ 7] ^= R(x[ 3]+x[15], 9); + x[11] ^= R(x[ 7]+x[ 3],13); x[15] ^= R(x[11]+x[ 7],18); + + /* Operate on rows */ + x[ 1] ^= R(x[ 0]+x[ 3], 7); x[ 2] ^= R(x[ 1]+x[ 0], 9); + x[ 3] ^= R(x[ 2]+x[ 1],13); x[ 0] ^= R(x[ 3]+x[ 2],18); + + x[ 6] ^= R(x[ 5]+x[ 4], 7); x[ 7] ^= R(x[ 6]+x[ 5], 9); + x[ 4] ^= R(x[ 7]+x[ 6],13); x[ 5] ^= R(x[ 4]+x[ 7],18); + + x[11] ^= R(x[10]+x[ 9], 7); x[ 8] ^= R(x[11]+x[10], 9); + x[ 9] ^= R(x[ 8]+x[11],13); x[10] ^= R(x[ 9]+x[ 8],18); + + x[12] ^= R(x[15]+x[14], 7); x[13] ^= R(x[12]+x[15], 9); + x[14] ^= R(x[13]+x[12],13); x[15] ^= R(x[14]+x[13],18); +#undef R + } while (--doublerounds); +#undef x + + { + uint32_t i; + salsa20_simd_shuffle(&X, Bout); + for (i = 0; i < 16; i += 4) { + B->w[i] = Bout->w[i] += B->w[i]; + B->w[i + 1] = Bout->w[i + 1] += B->w[i + 1]; + B->w[i + 2] = Bout->w[i + 2] += B->w[i + 2]; + B->w[i + 3] = Bout->w[i + 3] += B->w[i + 3]; + } + } +} + +/** + * Apply the Salsa20/2 core to the block provided in X. + */ +#define SALSA20_2(out) \ + salsa20(&X, &out, 1); + +/** + * Apply the Salsa20/8 core to the block provided in X. + */ +#define SALSA20_8(out) \ + salsa20(&X, &out, 4); + +#define XOR(out, in1, in2) \ + (out).d[0] = (in1).d[0] ^ (in2).d[0]; \ + (out).d[1] = (in1).d[1] ^ (in2).d[1]; \ + (out).d[2] = (in1).d[2] ^ (in2).d[2]; \ + (out).d[3] = (in1).d[3] ^ (in2).d[3]; \ + (out).d[4] = (in1).d[4] ^ (in2).d[4]; \ + (out).d[5] = (in1).d[5] ^ (in2).d[5]; \ + (out).d[6] = (in1).d[6] ^ (in2).d[6]; \ + (out).d[7] = (in1).d[7] ^ (in2).d[7]; + +#define XOR_X(in) XOR(X, X, in) +#define XOR_X_2(in1, in2) XOR(X, in1, in2) +#define XOR_X_WRITE_XOR_Y_2(out, in) \ + XOR(Y, out, in) \ + COPY(out, Y) \ + XOR(X, X, Y) + +#define INTEGERIFY (uint32_t)X.d[0] +#endif + +/** + * Apply the Salsa20 core to the block provided in X ^ in. + */ +#define SALSA20_XOR_MEM(in, out) \ + XOR_X(in) \ + SALSA20(out) + +#define SALSA20 SALSA20_8 +#else /* pass 2 */ +#undef SALSA20 +#define SALSA20 SALSA20_2 +#endif + +/** + * blockmix_salsa(Bin, Bout): + * Compute Bout = BlockMix_{salsa20, 1}(Bin). The input Bin must be 128 + * bytes in length; the output Bout must also be the same size. + */ +static inline void blockmix_salsa(const salsa20_blk_t *restrict Bin, + salsa20_blk_t *restrict Bout) +{ + DECL_X + + READ_X(Bin[1]) + SALSA20_XOR_MEM(Bin[0], Bout[0]) + SALSA20_XOR_MEM(Bin[1], Bout[1]) +} + +static inline uint32_t blockmix_salsa_xor(const salsa20_blk_t *restrict Bin1, + const salsa20_blk_t *restrict Bin2, salsa20_blk_t *restrict Bout) +{ + DECL_X + + XOR_X_2(Bin1[1], Bin2[1]) + XOR_X(Bin1[0]) + SALSA20_XOR_MEM(Bin2[0], Bout[0]) + XOR_X(Bin1[1]) + SALSA20_XOR_MEM(Bin2[1], Bout[1]) + + return INTEGERIFY; +} + +#if _YESPOWER_OPT_C_PASS_ == 1 +/* This is tunable, but it is part of what defines a yespower version */ +/* Version 0.5 */ +#define Swidth_0_5 8 +/* Version 1.0 */ +#define Swidth_1_0 11 + +/* Not tunable in this implementation, hard-coded in a few places */ +#define PWXsimple 2 +#define PWXgather 4 + +/* Derived value. Not tunable on its own. */ +#define PWXbytes (PWXgather * PWXsimple * 8) + +/* (Maybe-)runtime derived values. Not tunable on their own. */ +#define Swidth_to_Sbytes1(Swidth) ((1 << (Swidth)) * PWXsimple * 8) +#define Swidth_to_Smask(Swidth) (((1 << (Swidth)) - 1) * PWXsimple * 8) +#define Smask_to_Smask2(Smask) (((uint64_t)(Smask) << 32) | (Smask)) + +/* These should be compile-time derived */ +#define Smask2_0_5 Smask_to_Smask2(Swidth_to_Smask(Swidth_0_5)) +#define Smask2_1_0 Smask_to_Smask2(Swidth_to_Smask(Swidth_1_0)) + +typedef struct { + uint8_t *S0, *S1, *S2; + size_t w; + uint32_t Sbytes; +} pwxform_ctx_t; + +#define DECL_SMASK2REG /* empty */ +#define MAYBE_MEMORY_BARRIER /* empty */ + +#ifdef __SSE2__ +/* + * (V)PSRLDQ and (V)PSHUFD have higher throughput than (V)PSRLQ on some CPUs + * starting with Sandy Bridge. Additionally, PSHUFD uses separate source and + * destination registers, whereas the shifts would require an extra move + * instruction for our code when building without AVX. Unfortunately, PSHUFD + * is much slower on Conroe (4 cycles latency vs. 1 cycle latency for PSRLQ) + * and somewhat slower on some non-Intel CPUs (luckily not including AMD + * Bulldozer and Piledriver). + */ +#ifdef __AVX__ +#define HI32(X) \ + _mm_srli_si128((X), 4) +#elif 1 /* As an option, check for __SSE4_1__ here not to hurt Conroe */ +#define HI32(X) \ + _mm_shuffle_epi32((X), _MM_SHUFFLE(2,3,0,1)) +#else +#define HI32(X) \ + _mm_srli_epi64((X), 32) +#endif + +#if defined(__x86_64__) && \ + __GNUC__ == 4 && __GNUC_MINOR__ < 6 && !defined(__ICC) +#ifdef __AVX__ +#define MOVQ "vmovq" +#else +/* "movq" would be more correct, but "movd" is supported by older binutils + * due to an error in AMD's spec for x86-64. */ +#define MOVQ "movd" +#endif +#define EXTRACT64(X) ({ \ + uint64_t result; \ + __asm__(MOVQ " %1, %0" : "=r" (result) : "x" (X)); \ + result; \ +}) +#elif defined(__x86_64__) && !defined(_MSC_VER) && !defined(__OPEN64__) +/* MSVC and Open64 had bugs */ +#define EXTRACT64(X) _mm_cvtsi128_si64(X) +#elif defined(__x86_64__) && defined(__SSE4_1__) +/* No known bugs for this intrinsic */ +#include +#define EXTRACT64(X) _mm_extract_epi64((X), 0) +#elif defined(USE_SSE4_FOR_32BIT) && defined(__SSE4_1__) +/* 32-bit */ +#include +#if 0 +/* This is currently unused by the code below, which instead uses these two + * intrinsics explicitly when (!defined(__x86_64__) && defined(__SSE4_1__)) */ +#define EXTRACT64(X) \ + ((uint64_t)(uint32_t)_mm_cvtsi128_si32(X) | \ + ((uint64_t)(uint32_t)_mm_extract_epi32((X), 1) << 32)) +#endif +#else +/* 32-bit or compilers with known past bugs in _mm_cvtsi128_si64() */ +#define EXTRACT64(X) \ + ((uint64_t)(uint32_t)_mm_cvtsi128_si32(X) | \ + ((uint64_t)(uint32_t)_mm_cvtsi128_si32(HI32(X)) << 32)) +#endif + +#if defined(__x86_64__) && (defined(__AVX__) || !defined(__GNUC__)) +/* 64-bit with AVX */ +/* Force use of 64-bit AND instead of two 32-bit ANDs */ +#undef DECL_SMASK2REG +#if defined(__GNUC__) && !defined(__ICC) +#define DECL_SMASK2REG uint64_t Smask2reg = Smask2; +/* Force use of lower-numbered registers to reduce number of prefixes, relying + * on out-of-order execution and register renaming. */ +#define FORCE_REGALLOC_1 \ + __asm__("" : "=a" (x), "+d" (Smask2reg), "+S" (S0), "+D" (S1)); +#define FORCE_REGALLOC_2 \ + __asm__("" : : "c" (lo)); +#else +static volatile uint64_t Smask2var = Smask2; +#define DECL_SMASK2REG uint64_t Smask2reg = Smask2var; +#define FORCE_REGALLOC_1 /* empty */ +#define FORCE_REGALLOC_2 /* empty */ +#endif +#define PWXFORM_SIMD(X) { \ + uint64_t x; \ + FORCE_REGALLOC_1 \ + uint32_t lo = x = EXTRACT64(X) & Smask2reg; \ + FORCE_REGALLOC_2 \ + uint32_t hi = x >> 32; \ + X = _mm_mul_epu32(HI32(X), X); \ + X = _mm_add_epi64(X, *(__m128i *)(S0 + lo)); \ + X = _mm_xor_si128(X, *(__m128i *)(S1 + hi)); \ +} +#elif defined(__x86_64__) +/* 64-bit without AVX. This relies on out-of-order execution and register + * renaming. It may actually be fastest on CPUs with AVX(2) as well - e.g., + * it runs great on Haswell. */ +#warning "Note: using x86-64 inline assembly for pwxform. That's great." +#undef MAYBE_MEMORY_BARRIER +#define MAYBE_MEMORY_BARRIER \ + __asm__("" : : : "memory"); +#define PWXFORM_SIMD(X) { \ + __m128i H; \ + __asm__( \ + "movd %0, %%rax\n\t" \ + "pshufd $0xb1, %0, %1\n\t" \ + "andq %2, %%rax\n\t" \ + "pmuludq %1, %0\n\t" \ + "movl %%eax, %%ecx\n\t" \ + "shrq $0x20, %%rax\n\t" \ + "paddq (%3,%%rcx), %0\n\t" \ + "pxor (%4,%%rax), %0\n\t" \ + : "+x" (X), "=x" (H) \ + : "d" (Smask2), "S" (S0), "D" (S1) \ + : "cc", "ax", "cx"); \ +} +#elif defined(USE_SSE4_FOR_32BIT) && defined(__SSE4_1__) +/* 32-bit with SSE4.1 */ +#define PWXFORM_SIMD(X) { \ + __m128i x = _mm_and_si128(X, _mm_set1_epi64x(Smask2)); \ + __m128i s0 = *(__m128i *)(S0 + (uint32_t)_mm_cvtsi128_si32(x)); \ + __m128i s1 = *(__m128i *)(S1 + (uint32_t)_mm_extract_epi32(x, 1)); \ + X = _mm_mul_epu32(HI32(X), X); \ + X = _mm_add_epi64(X, s0); \ + X = _mm_xor_si128(X, s1); \ +} +#else +/* 32-bit without SSE4.1 */ +#define PWXFORM_SIMD(X) { \ + uint64_t x = EXTRACT64(X) & Smask2; \ + __m128i s0 = *(__m128i *)(S0 + (uint32_t)x); \ + __m128i s1 = *(__m128i *)(S1 + (x >> 32)); \ + X = _mm_mul_epu32(HI32(X), X); \ + X = _mm_add_epi64(X, s0); \ + X = _mm_xor_si128(X, s1); \ +} +#endif + +#define PWXFORM_SIMD_WRITE(X, Sw) \ + PWXFORM_SIMD(X) \ + MAYBE_MEMORY_BARRIER \ + *(__m128i *)(Sw + w) = X; \ + MAYBE_MEMORY_BARRIER + +#define PWXFORM_ROUND \ + PWXFORM_SIMD(X0) \ + PWXFORM_SIMD(X1) \ + PWXFORM_SIMD(X2) \ + PWXFORM_SIMD(X3) + +#define PWXFORM_ROUND_WRITE4 \ + PWXFORM_SIMD_WRITE(X0, S0) \ + PWXFORM_SIMD_WRITE(X1, S1) \ + w += 16; \ + PWXFORM_SIMD_WRITE(X2, S0) \ + PWXFORM_SIMD_WRITE(X3, S1) \ + w += 16; + +#define PWXFORM_ROUND_WRITE2 \ + PWXFORM_SIMD_WRITE(X0, S0) \ + PWXFORM_SIMD_WRITE(X1, S1) \ + w += 16; \ + PWXFORM_SIMD(X2) \ + PWXFORM_SIMD(X3) + +#else /* !defined(__SSE2__) */ + +#define PWXFORM_SIMD(x0, x1) { \ + uint64_t x = x0 & Smask2; \ + uint64_t *p0 = (uint64_t *)(S0 + (uint32_t)x); \ + uint64_t *p1 = (uint64_t *)(S1 + (x >> 32)); \ + x0 = ((x0 >> 32) * (uint32_t)x0 + p0[0]) ^ p1[0]; \ + x1 = ((x1 >> 32) * (uint32_t)x1 + p0[1]) ^ p1[1]; \ +} + +#define PWXFORM_SIMD_WRITE(x0, x1, Sw) \ + PWXFORM_SIMD(x0, x1) \ + ((uint64_t *)(Sw + w))[0] = x0; \ + ((uint64_t *)(Sw + w))[1] = x1; + +#define PWXFORM_ROUND \ + PWXFORM_SIMD(X.d[0], X.d[1]) \ + PWXFORM_SIMD(X.d[2], X.d[3]) \ + PWXFORM_SIMD(X.d[4], X.d[5]) \ + PWXFORM_SIMD(X.d[6], X.d[7]) + +#define PWXFORM_ROUND_WRITE4 \ + PWXFORM_SIMD_WRITE(X.d[0], X.d[1], S0) \ + PWXFORM_SIMD_WRITE(X.d[2], X.d[3], S1) \ + w += 16; \ + PWXFORM_SIMD_WRITE(X.d[4], X.d[5], S0) \ + PWXFORM_SIMD_WRITE(X.d[6], X.d[7], S1) \ + w += 16; + +#define PWXFORM_ROUND_WRITE2 \ + PWXFORM_SIMD_WRITE(X.d[0], X.d[1], S0) \ + PWXFORM_SIMD_WRITE(X.d[2], X.d[3], S1) \ + w += 16; \ + PWXFORM_SIMD(X.d[4], X.d[5]) \ + PWXFORM_SIMD(X.d[6], X.d[7]) +#endif + +#define PWXFORM \ + PWXFORM_ROUND PWXFORM_ROUND PWXFORM_ROUND \ + PWXFORM_ROUND PWXFORM_ROUND PWXFORM_ROUND + +#define Smask2 Smask2_0_5 + +#else /* pass 2 */ + +#undef PWXFORM +#define PWXFORM \ + PWXFORM_ROUND_WRITE4 PWXFORM_ROUND_WRITE2 PWXFORM_ROUND_WRITE2 \ + w &= Smask2; \ + { \ + uint8_t *Stmp = S2; \ + S2 = S1; \ + S1 = S0; \ + S0 = Stmp; \ + } + +#undef Smask2 +#define Smask2 Smask2_1_0 + +#endif + +/** + * blockmix_pwxform(Bin, Bout, r, S): + * Compute Bout = BlockMix_pwxform{salsa20, r, S}(Bin). The input Bin must + * be 128r bytes in length; the output Bout must also be the same size. + */ +static void blockmix(const salsa20_blk_t *restrict Bin, + salsa20_blk_t *restrict Bout, size_t r, pwxform_ctx_t *restrict ctx) +{ + if (unlikely(!ctx)) { + blockmix_salsa(Bin, Bout); + return; + } + + uint8_t *S0 = ctx->S0, *S1 = ctx->S1; +#if _YESPOWER_OPT_C_PASS_ > 1 + uint8_t *S2 = ctx->S2; + size_t w = ctx->w; +#endif + size_t i; + DECL_X + + /* Convert count of 128-byte blocks to max index of 64-byte block */ + r = r * 2 - 1; + + READ_X(Bin[r]) + + DECL_SMASK2REG + + i = 0; + do { + XOR_X(Bin[i]) + PWXFORM + if (unlikely(i >= r)) + break; + WRITE_X(Bout[i]) + i++; + } while (1); + +#if _YESPOWER_OPT_C_PASS_ > 1 + ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; + ctx->w = w; +#endif + + SALSA20(Bout[i]) +} + +static uint32_t blockmix_xor(const salsa20_blk_t *restrict Bin1, + const salsa20_blk_t *restrict Bin2, salsa20_blk_t *restrict Bout, + size_t r, pwxform_ctx_t *restrict ctx) +{ + if (unlikely(!ctx)) + return blockmix_salsa_xor(Bin1, Bin2, Bout); + + uint8_t *S0 = ctx->S0, *S1 = ctx->S1; +#if _YESPOWER_OPT_C_PASS_ > 1 + uint8_t *S2 = ctx->S2; + size_t w = ctx->w; +#endif + size_t i; + DECL_X + + /* Convert count of 128-byte blocks to max index of 64-byte block */ + r = r * 2 - 1; + +#ifdef PREFETCH + PREFETCH(&Bin2[r], _MM_HINT_T0) + for (i = 0; i < r; i++) { + PREFETCH(&Bin2[i], _MM_HINT_T0) + } +#endif + + XOR_X_2(Bin1[r], Bin2[r]) + + DECL_SMASK2REG + + i = 0; + r--; + do { + XOR_X(Bin1[i]) + XOR_X(Bin2[i]) + PWXFORM + WRITE_X(Bout[i]) + + XOR_X(Bin1[i + 1]) + XOR_X(Bin2[i + 1]) + PWXFORM + + if (unlikely(i >= r)) + break; + + WRITE_X(Bout[i + 1]) + + i += 2; + } while (1); + i++; + +#if _YESPOWER_OPT_C_PASS_ > 1 + ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; + ctx->w = w; +#endif + + SALSA20(Bout[i]) + + return INTEGERIFY; +} + +static uint32_t blockmix_xor_save(salsa20_blk_t *restrict Bin1out, + salsa20_blk_t *restrict Bin2, + size_t r, pwxform_ctx_t *restrict ctx) +{ + uint8_t *S0 = ctx->S0, *S1 = ctx->S1; +#if _YESPOWER_OPT_C_PASS_ > 1 + uint8_t *S2 = ctx->S2; + size_t w = ctx->w; +#endif + size_t i; + DECL_X + DECL_Y + + /* Convert count of 128-byte blocks to max index of 64-byte block */ + r = r * 2 - 1; + +#ifdef PREFETCH + PREFETCH(&Bin2[r], _MM_HINT_T0) + for (i = 0; i < r; i++) { + PREFETCH(&Bin2[i], _MM_HINT_T0) + } +#endif + + XOR_X_2(Bin1out[r], Bin2[r]) + + DECL_SMASK2REG + + i = 0; + r--; + do { + XOR_X_WRITE_XOR_Y_2(Bin2[i], Bin1out[i]) + PWXFORM + WRITE_X(Bin1out[i]) + + XOR_X_WRITE_XOR_Y_2(Bin2[i + 1], Bin1out[i + 1]) + PWXFORM + + if (unlikely(i >= r)) + break; + + WRITE_X(Bin1out[i + 1]) + + i += 2; + } while (1); + i++; + +#if _YESPOWER_OPT_C_PASS_ > 1 + ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; + ctx->w = w; +#endif + + SALSA20(Bin1out[i]) + + return INTEGERIFY; +} + +#if _YESPOWER_OPT_C_PASS_ == 1 +/** + * integerify(B, r): + * Return the result of parsing B_{2r-1} as a little-endian integer. + */ +static inline uint32_t integerify(const salsa20_blk_t *B, size_t r) +{ +/* + * Our 64-bit words are in host byte order, which is why we don't just read + * w[0] here (would be wrong on big-endian). Also, our 32-bit words are + * SIMD-shuffled, but we only care about the least significant 32 bits anyway. + */ + return (uint32_t)B[2 * r - 1].d[0]; +} +#endif + +/** + * smix1(B, r, N, V, XY, S): + * Compute first loop of B = SMix_r(B, N). The input B must be 128r bytes in + * length; the temporary storage V must be 128rN bytes in length; the temporary + * storage XY must be 128r+64 bytes in length. N must be even and at least 4. + * The array V must be aligned to a multiple of 64 bytes, and arrays B and XY + * to a multiple of at least 16 bytes. + */ +static void smix1(uint8_t *B, size_t r, uint32_t N, + salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) +{ + size_t s = 2 * r; + salsa20_blk_t *X = V, *Y = &V[s], *V_j; + uint32_t i, j, n; + +#if _YESPOWER_OPT_C_PASS_ == 1 + for (i = 0; i < 2 * r; i++) { +#else + for (i = 0; i < 2; i++) { +#endif + const salsa20_blk_t *src = (salsa20_blk_t *)&B[i * 64]; + salsa20_blk_t *tmp = Y; + salsa20_blk_t *dst = &X[i]; + size_t k; + for (k = 0; k < 16; k++) + tmp->w[k] = le32dec(&src->w[k]); + salsa20_simd_shuffle(tmp, dst); + } + +#if _YESPOWER_OPT_C_PASS_ > 1 + for (i = 1; i < r; i++) + blockmix(&X[(i - 1) * 2], &X[i * 2], 1, ctx); +#endif + + blockmix(X, Y, r, ctx); + X = Y + s; + blockmix(Y, X, r, ctx); + j = integerify(X, r); + + for (n = 2; n < N; n <<= 1) { + uint32_t m = (n < N / 2) ? n : (N - 1 - n); + for (i = 1; i < m; i += 2) { + Y = X + s; + j &= n - 1; + j += i - 1; + V_j = &V[j * s]; + j = blockmix_xor(X, V_j, Y, r, ctx); + j &= n - 1; + j += i; + V_j = &V[j * s]; + X = Y + s; + j = blockmix_xor(Y, V_j, X, r, ctx); + } + } + n >>= 1; + + j &= n - 1; + j += N - 2 - n; + V_j = &V[j * s]; + Y = X + s; + j = blockmix_xor(X, V_j, Y, r, ctx); + j &= n - 1; + j += N - 1 - n; + V_j = &V[j * s]; + blockmix_xor(Y, V_j, XY, r, ctx); + + for (i = 0; i < 2 * r; i++) { + const salsa20_blk_t *src = &XY[i]; + salsa20_blk_t *tmp = &XY[s]; + salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 64]; + size_t k; + for (k = 0; k < 16; k++) + le32enc(&tmp->w[k], src->w[k]); + salsa20_simd_unshuffle(tmp, dst); + } +} + +/** + * smix2(B, r, N, Nloop, V, XY, S): + * Compute second loop of B = SMix_r(B, N). The input B must be 128r bytes in + * length; the temporary storage V must be 128rN bytes in length; the temporary + * storage XY must be 256r bytes in length. N must be a power of 2 and at + * least 2. Nloop must be even. The array V must be aligned to a multiple of + * 64 bytes, and arrays B and XY to a multiple of at least 16 bytes. + */ +static void smix2(uint8_t *B, size_t r, uint32_t N, uint32_t Nloop, + salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) +{ + size_t s = 2 * r; + salsa20_blk_t *X = XY, *Y = &XY[s]; + uint32_t i, j; + + for (i = 0; i < 2 * r; i++) { + const salsa20_blk_t *src = (salsa20_blk_t *)&B[i * 64]; + salsa20_blk_t *tmp = Y; + salsa20_blk_t *dst = &X[i]; + size_t k; + for (k = 0; k < 16; k++) + tmp->w[k] = le32dec(&src->w[k]); + salsa20_simd_shuffle(tmp, dst); + } + + j = integerify(X, r) & (N - 1); + +#if _YESPOWER_OPT_C_PASS_ == 1 + if (Nloop > 2) { +#endif + do { + salsa20_blk_t *V_j = &V[j * s]; + j = blockmix_xor_save(X, V_j, r, ctx) & (N - 1); + V_j = &V[j * s]; + j = blockmix_xor_save(X, V_j, r, ctx) & (N - 1); + } while (Nloop -= 2); +#if _YESPOWER_OPT_C_PASS_ == 1 + } else { + do { + const salsa20_blk_t * V_j = &V[j * s]; + j = blockmix_xor(X, V_j, Y, r, ctx) & (N - 1); + V_j = &V[j * s]; + j = blockmix_xor(Y, V_j, X, r, ctx) & (N - 1); + } while (Nloop -= 2); + } +#endif + + for (i = 0; i < 2 * r; i++) { + const salsa20_blk_t *src = &X[i]; + salsa20_blk_t *tmp = Y; + salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 64]; + size_t k; + for (k = 0; k < 16; k++) + le32enc(&tmp->w[k], src->w[k]); + salsa20_simd_unshuffle(tmp, dst); + } +} + +/** + * smix(B, r, N, V, XY, S): + * Compute B = SMix_r(B, N). The input B must be 128rp bytes in length; the + * temporary storage V must be 128rN bytes in length; the temporary storage + * XY must be 256r bytes in length. N must be a power of 2 and at least 16. + * The array V must be aligned to a multiple of 64 bytes, and arrays B and XY + * to a multiple of at least 16 bytes (aligning them to 64 bytes as well saves + * cache lines, but it might also result in cache bank conflicts). + */ +static void smix(uint8_t *B, size_t r, uint32_t N, + salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) +{ +#if _YESPOWER_OPT_C_PASS_ == 1 + uint32_t Nloop_all = (N + 2) / 3; /* 1/3, round up */ + uint32_t Nloop_rw = Nloop_all; + + Nloop_all++; Nloop_all &= ~(uint32_t)1; /* round up to even */ + Nloop_rw &= ~(uint32_t)1; /* round down to even */ +#else + uint32_t Nloop_rw = (N + 2) / 3; /* 1/3, round up */ + Nloop_rw++; Nloop_rw &= ~(uint32_t)1; /* round up to even */ +#endif + + smix1(B, 1, ctx->Sbytes / 128, (salsa20_blk_t *)ctx->S0, XY, NULL); + smix1(B, r, N, V, XY, ctx); + smix2(B, r, N, Nloop_rw /* must be > 2 */, V, XY, ctx); +#if _YESPOWER_OPT_C_PASS_ == 1 + if (Nloop_all > Nloop_rw) + smix2(B, r, N, 2, V, XY, ctx); +#endif +} + +#if _YESPOWER_OPT_C_PASS_ == 1 +#undef _YESPOWER_OPT_C_PASS_ +#define _YESPOWER_OPT_C_PASS_ 2 +#define blockmix_salsa blockmix_salsa_1_0 +#define blockmix_salsa_xor blockmix_salsa_xor_1_0 +#define blockmix blockmix_1_0 +#define blockmix_xor blockmix_xor_1_0 +#define blockmix_xor_save blockmix_xor_save_1_0 +#define smix1 smix1_1_0 +#define smix2 smix2_1_0 +#define smix smix_1_0 +#include "yespower-opt.c" +#undef smix + +/** + * yespower(local, src, srclen, params, dst): + * Compute yespower(src[0 .. srclen - 1], N, r), to be checked for "< target". + * local is the thread-local data structure, allowing to preserve and reuse a + * memory allocation across calls, thereby reducing its overhead. + * + * Return 0 on success; or -1 on error. + */ +int yespower(yespower_local_t *local, + const uint8_t *src, size_t srclen, + const yespower_params_t *params, + yespower_binary_t *dst) +{ + yespower_version_t version = params->version; + uint32_t N = params->N; + uint32_t r = params->r; + const uint8_t *pers = params->pers; + size_t perslen = params->perslen; + uint32_t Swidth; + size_t B_size, V_size, XY_size, need; + uint8_t *B, *S; + salsa20_blk_t *V, *XY; + pwxform_ctx_t ctx; + uint8_t sha256[32]; + + /* Sanity-check parameters */ + if ((version != YESPOWER_0_5 && version != YESPOWER_1_0) || + N < 1024 || N > 512 * 1024 || r < 8 || r > 32 || + (N & (N - 1)) != 0 || + (!pers && perslen)) { + errno = EINVAL; + return -1; + } + + /* Allocate memory */ + B_size = (size_t)128 * r; + V_size = B_size * N; + if (version == YESPOWER_0_5) { + XY_size = B_size * 2; + Swidth = Swidth_0_5; + ctx.Sbytes = 2 * Swidth_to_Sbytes1(Swidth); + } else { + XY_size = B_size + 64; + Swidth = Swidth_1_0; + ctx.Sbytes = 3 * Swidth_to_Sbytes1(Swidth); + } + need = B_size + V_size + XY_size + ctx.Sbytes; + if (local->aligned_size < need) { + if (free_region(local)) + return -1; + if (!alloc_region(local, need)) + return -1; + } + B = (uint8_t *)local->aligned; + V = (salsa20_blk_t *)((uint8_t *)B + B_size); + XY = (salsa20_blk_t *)((uint8_t *)V + V_size); + S = (uint8_t *)XY + XY_size; + ctx.S0 = S; + ctx.S1 = S + Swidth_to_Sbytes1(Swidth); + + SHA256_Buf(src, srclen, sha256); + + if (version == YESPOWER_0_5) { + YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), src, srclen, 1, + B, B_size); + memcpy(sha256, B, sizeof(sha256)); + smix(B, r, N, V, XY, &ctx); + YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), B, B_size, 1, + (uint8_t *)dst, sizeof(*dst)); + + if (pers) { + HMAC_SHA256_Buf(dst, sizeof(*dst), pers, perslen, + sha256); + SHA256_Buf(sha256, sizeof(sha256), (uint8_t *)dst); + } + } else { + ctx.S2 = S + 2 * Swidth_to_Sbytes1(Swidth); + ctx.w = 0; + + if (pers) { + src = pers; + srclen = perslen; + } else { + srclen = 0; + } + + YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), src, srclen, 1, B, 128); + memcpy(sha256, B, sizeof(sha256)); + smix_1_0(B, r, N, V, XY, &ctx); + HMAC_SHA256_Buf(B + B_size - 64, 64, + sha256, sizeof(sha256), (uint8_t *)dst); + } + + /* Success! */ + return 0; +} + +/** + * yespower_tls(src, srclen, params, dst): + * Compute yespower(src[0 .. srclen - 1], N, r), to be checked for "< target". + * The memory allocation is maintained internally using thread-local storage. + * + * Return 0 on success; or -1 on error. + */ +int yespower_tls(const uint8_t *src, size_t srclen, + const yespower_params_t *params, yespower_binary_t *dst) +{ + static __thread int initialized = 0; + static __thread yespower_local_t local; + + if (!initialized) { + if (yespower_init_local(&local)) + return -1; + initialized = 1; + } + + return yespower(&local, src, srclen, params, dst); +} + +int yespower_init_local(yespower_local_t *local) +{ + init_region(local); + return 0; +} + +int yespower_free_local(yespower_local_t *local) +{ + return free_region(local); +} +#endif From 087cd923f70d3bab9d55559e79833f689cae33e5 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:20:01 -0500 Subject: [PATCH 156/576] Create yespower-platform.c --- stratum/algos/yespower-platform.c | 107 ++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 stratum/algos/yespower-platform.c diff --git a/stratum/algos/yespower-platform.c b/stratum/algos/yespower-platform.c new file mode 100644 index 000000000..2b1a03f0f --- /dev/null +++ b/stratum/algos/yespower-platform.c @@ -0,0 +1,107 @@ +/*- + * Copyright 2013-2018 Alexander Peslyak + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + */ + +#ifdef __unix__ +#include +#endif + +#define HUGEPAGE_THRESHOLD (12 * 1024 * 1024) + +#ifdef __x86_64__ +#define HUGEPAGE_SIZE (2 * 1024 * 1024) +#else +#undef HUGEPAGE_SIZE +#endif + +static void *alloc_region(yespower_region_t *region, size_t size) +{ + size_t base_size = size; + uint8_t *base, *aligned; +#ifdef MAP_ANON + int flags = +#ifdef MAP_NOCORE + MAP_NOCORE | +#endif + MAP_ANON | MAP_PRIVATE; +#if defined(MAP_HUGETLB) && defined(HUGEPAGE_SIZE) + size_t new_size = size; + const size_t hugepage_mask = (size_t)HUGEPAGE_SIZE - 1; + if (size >= HUGEPAGE_THRESHOLD && size + hugepage_mask >= size) { + flags |= MAP_HUGETLB; +/* + * Linux's munmap() fails on MAP_HUGETLB mappings if size is not a multiple of + * huge page size, so let's round up to huge page size here. + */ + new_size = size + hugepage_mask; + new_size &= ~hugepage_mask; + } + base = mmap(NULL, new_size, PROT_READ | PROT_WRITE, flags, -1, 0); + if (base != MAP_FAILED) { + base_size = new_size; + } else if (flags & MAP_HUGETLB) { + flags &= ~MAP_HUGETLB; + base = mmap(NULL, size, PROT_READ | PROT_WRITE, flags, -1, 0); + } + +#else + base = mmap(NULL, size, PROT_READ | PROT_WRITE, flags, -1, 0); +#endif + if (base == MAP_FAILED) + base = NULL; + aligned = base; +#elif defined(HAVE_POSIX_MEMALIGN) + if ((errno = posix_memalign((void **)&base, 64, size)) != 0) + base = NULL; + aligned = base; +#else + base = aligned = NULL; + if (size + 63 < size) { + errno = ENOMEM; + } else if ((base = malloc(size + 63)) != NULL) { + aligned = base + 63; + aligned -= (uintptr_t)aligned & 63; + } +#endif + region->base = base; + region->aligned = aligned; + region->base_size = base ? base_size : 0; + region->aligned_size = base ? size : 0; + return aligned; +} + +static inline void init_region(yespower_region_t *region) +{ + region->base = region->aligned = NULL; + region->base_size = region->aligned_size = 0; +} + +static int free_region(yespower_region_t *region) +{ + if (region->base) { +#ifdef MAP_ANON + if (munmap(region->base, region->base_size)) + return -1; +#else + free(region->base); +#endif + } + init_region(region); + return 0; +} From 43641ed4c01dbc3fb47bb18ba266d33cff267f96 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:20:22 -0500 Subject: [PATCH 157/576] Create yespower.c --- stratum/algos/yespower.c | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 stratum/algos/yespower.c diff --git a/stratum/algos/yespower.c b/stratum/algos/yespower.c new file mode 100644 index 000000000..59e6a7cea --- /dev/null +++ b/stratum/algos/yespower.c @@ -0,0 +1,55 @@ +#include "yespower-opt.c" + +static const yespower_params_t yespower_0_5_R8 = {YESPOWER_0_5, 2048, 8, "Client Key", 10}; +static const yespower_params_t yespower_0_5_R16 = {YESPOWER_0_5, 4096, 16, "Client Key", 10}; +static const yespower_params_t yespower_0_5_R24 = {YESPOWER_0_5, 4096, 24, "Jagaricoin", 10}; +static const yespower_params_t yespower_0_5_R32 = {YESPOWER_0_5, 4096, 32, "WaviBanana", 10}; +// WARNING DO NOT USE THIS IN yespower_hash YET. For later HF to yespower 1.0 +// TODO Find HF solution using unixtime or blockheight(recommended) + +/* +Parameter selection for yespower 1.0. +For new uses of yespower, set the requested version to the highest +supported, and set N*r to the highest you can reasonably afford in terms +of proof verification time (which might in turn be determined by desired +share rate per mining pool server), using one of the following options: +1 MiB: N = 1024, r = 8 +2 MiB: N = 2048, r = 8 (current bitzeny-yescrypt0.5) +4 MiB: N = 1024, r = 32 +8 MiB: N = 2048, r = 32 (recommended settings) +16 MiB: N = 4096, r = 32 (It might increase resistance against future GPUs) +and so on for higher N keeping r=32. +You may also set the personalization string to your liking, but that is +not required (you can set its pointer to NULL and its length to 0). Its +support is provided mostly for compatibility with existing modifications +of yescrypt 0.5. +*/ + +// solardiz recommended yespower 1.0 settings of at least N=2048 r=32 (8 MiB) +static const yespower_params_t yespower_1_0 = {YESPOWER_1_0, 2048, 32, NULL, 0}; + +void yespowerR8_hash(const char *input, char *output, uint32_t len) +{ + if (yespower_tls(input, 80, &yespower_0_5_R8, (yespower_binary_t *)output)) + abort(); +} +void yespowerR16_hash(const char *input, char *output, uint32_t len) +{ + if (yespower_tls(input, 80, &yespower_0_5_R16, (yespower_binary_t *)output)) + abort(); +} +void yespowerR24_hash(const char *input, char *output, uint32_t len) +{ + if (yespower_tls(input, 80, &yespower_0_5_R24, (yespower_binary_t *)output)) + abort(); +} +void yespowerR32_hash(const char *input, char *output, uint32_t len) +{ + if (yespower_tls(input, 80, &yespower_0_5_R32, (yespower_binary_t *)output)) + abort(); +} +void yespower_hash(const char *input, char *output, uint32_t len) +{ + if (yespower_tls(input, 80, &yespower_1_0, (yespower_binary_t *)output)) + abort(); +} From 8b067c156170e46cdedffeda900fcacaad9d21fa Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:20:40 -0500 Subject: [PATCH 158/576] Create yespower.h --- stratum/algos/yespower.h | 136 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 stratum/algos/yespower.h diff --git a/stratum/algos/yespower.h b/stratum/algos/yespower.h new file mode 100644 index 000000000..d484a01ee --- /dev/null +++ b/stratum/algos/yespower.h @@ -0,0 +1,136 @@ +/*- + * Copyright 2009 Colin Percival + * Copyright 2013-2018 Alexander Peslyak + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ +#ifndef _YESPOWER_H_ +#define _YESPOWER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include /* for size_t */ + +void yespower_hash( const char *input, char *output, uint32_t len); +void yespowerR8_hash( const char *input, char *output, uint32_t len); +void yespowerR16_hash( const char *input, char *output, uint32_t len); +void yespowerR24_hash( const char *input, char *output, uint32_t len); +void yespowerR32_hash( const char *input, char *output, uint32_t len); + +/** + * Internal type used by the memory allocator. Please do not use it directly. + * Use yespower_local_t instead. + */ +typedef struct { + void *base, *aligned; + size_t base_size, aligned_size; +} yespower_region_t; + +/** + * Type for thread-local (RAM) data structure. + */ +typedef yespower_region_t yespower_local_t; + +/* + * Type for yespower algorithm version numbers. + */ +typedef enum { YESPOWER_0_5 = 5, YESPOWER_1_0 = 10 } yespower_version_t; + +/** + * yespower parameters combined into one struct. + */ +typedef struct { + yespower_version_t version; + uint32_t N, r; + const uint8_t *pers; + size_t perslen; +} yespower_params_t; + +/** + * A 256-bit yespower hash. + */ +typedef struct { + unsigned char uc[32]; +} yespower_binary_t; + +/** + * yespower_init_local(local): + * Initialize the thread-local (RAM) data structure. Actual memory allocation + * is currently fully postponed until a call to yespower(). + * + * Return 0 on success; or -1 on error. + * + * MT-safe as long as local is local to the thread. + */ +extern int yespower_init_local(yespower_local_t *local); + +/** + * yespower_free_local(local): + * Free memory that may have been allocated for an initialized thread-local + * (RAM) data structure. + * + * Return 0 on success; or -1 on error. + * + * MT-safe as long as local is local to the thread. + */ +extern int yespower_free_local(yespower_local_t *local); + +/** + * yespower(local, src, srclen, params, dst): + * Compute yespower(src[0 .. srclen - 1], N, r), to be checked for "< target". + * local is the thread-local data structure, allowing to preserve and reuse a + * memory allocation across calls, thereby reducing processing overhead. + * + * Return 0 on success; or -1 on error. + * + * local must be initialized with yespower_init_local(). + * + * MT-safe as long as local and dst are local to the thread. + */ +extern int yespower(yespower_local_t *local, + const uint8_t *src, size_t srclen, + const yespower_params_t *params, yespower_binary_t *dst); + +/** + * yespower_tls(src, srclen, params, dst): + * Compute yespower(src[0 .. srclen - 1], N, r), to be checked for "< target". + * The memory allocation is maintained internally using thread-local storage. + * + * Return 0 on success; or -1 on error. + * + * MT-safe as long as dst is local to the thread. + */ +extern int yespower_tls(const uint8_t *src, size_t srclen, + const yespower_params_t *params, yespower_binary_t *dst); + +#ifdef __cplusplus +} +#endif + +#endif /* !_YESPOWER_H_ */ From 9ff0b41902713e7c776c5a3711f31b09295f052b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:21:07 -0500 Subject: [PATCH 159/576] Update coinbase.cpp --- stratum/coinbase.cpp | 483 +++++++++++++++++++++++++------------------ 1 file changed, 284 insertions(+), 199 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index e094a36b7..f56773be7 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -226,34 +226,100 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); } - else if(strcmp(coind->symbol, "STAK") == 0) { - char script_payee[512] = { 0 }; + + else if(strcmp(coind->symbol, "BZX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "bznode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "04"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "03"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); + job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); + + base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); + job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); + + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char script_treasury[128] = { 0 }; char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + json_value* masternode = json_get_object(json_result, "masternode"); + json_value* treasury = json_get_object(json_result, "treasury"); + bool treasury_enabled = true; + if(treasury_enabled && treasury) { + const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); + memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); + json_int_t amount = json_get_int(treasury, "amount"); + if (scriptPubKey && amount) { + npayees++; + available -= amount; + job_pack_tx(coind, script_dests, amount, script_treasury); + //debuglog("%s treasury %u\n", coind->symbol, amount); + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "SECI") == 0) { + char script_payee[512] = { 0 }; + char payees[1]; int npayees = (templ->has_segwit_txs) ? 2 : 1; bool masternode_payments = json_get_bool(json_result, "masternode_payments"); bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - - if (masternodes_enabled && masternode_payments) { + if (masternodes_enabled && masternode_payments) { const char *payee = json_get_string(json_result, "payee"); json_int_t amount = json_get_int(json_result, "payee_amount"); if (payee && amount) ++npayees; } - - //treasury 5% @ 10 STAK per block - json_int_t charity_amount = 50000000; - //testnet - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - switch (templ->height % 4) { - case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); - break; - case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); - break; - case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); - break; - case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); - break; - } + //mainnet + json_int_t charity_amount = 50000000; + sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); + //testnet + //json_int_t charity_amount = 50000000; + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); ++npayees; available -= charity_amount; base58_decode(coind->charity_address, script_payee); @@ -281,206 +347,160 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available / 100000000 * coind->reward_mul; + coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - - else if (strcmp(coind->symbol, "IFX") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) + else if (strcmp(coind->symbol,"XZX") == 0) { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + + json_value* subsidyreward = json_get_array(json_result, "subsidy"); + if (subsidyreward) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); + const char *payee = json_get_string(subsidyreward, "address"); + json_int_t amount = json_get_int(subsidyreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } } - } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) + } + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; } + else if(strcmp(coind->symbol, "HXX") == 0) { + char script_payee[1024]; - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; -} -// add GTM -if (strcmp(coind->symbol, "GTM") == 0) -{ -char payees[4]; -int npayees = 1; -char script_dests[4096] = { 0 }; -// -json_value* founderreward = json_get_array(json_result, "founderreward"); -if (founderreward) -{ - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } -} -json_value* masternode = json_get_object(json_result, "masternode"); -bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); -if (masternode_enabled && masternode) -{ - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } -} -sprintf(payees, "%02x", npayees); -strcat(templ->coinb2, payees); -strcat(templ->coinb2, script_dests); -job_pack_tx(coind, templ->coinb2, available, NULL); -strcat(templ->coinb2, "00000000"); // locktime -coind->reward = (double)available / 100000000 * coind->reward_mul; -return; -} + bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "xnode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); -// add AGM -if (strcmp(coind->symbol, "AGM") == 0) -{ -char payees[4]; -int npayees = 1; -char script_dests[4096] = { 0 }; -// -json_value* founderreward = json_get_array(json_result, "founderreward"); -if (founderreward) -{ - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } -} -json_value* masternode = json_get_object(json_result, "masternode"); -bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); -if (masternode_enabled && masternode) -{ - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } -} -sprintf(payees, "%02x", npayees); -strcat(templ->coinb2, payees); -strcat(templ->coinb2, script_dests); -job_pack_tx(coind, templ->coinb2, available, NULL); -strcat(templ->coinb2, "00000000"); // locktime -coind->reward = (double)available / 100000000 * coind->reward_mul; -return; -} + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "05"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } - // add CRDS -if (strcmp(coind->symbol, "CRDS") == 0) -{ -char payees[4]; -int npayees = 1; -char script_dests[4096] = { 0 }; -// -json_value* founderreward = json_get_array(json_result, "founderreward"); -if (founderreward) -{ - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } -} -json_value* masternode = json_get_object(json_result, "masternode"); -bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); -if (masternode_enabled && masternode) -{ - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } -} -sprintf(payees, "%02x", npayees); -strcat(templ->coinb2, payees); -strcat(templ->coinb2, script_dests); -job_pack_tx(coind, templ->coinb2, available, NULL); -strcat(templ->coinb2, "00000000"); // locktime -coind->reward = (double)available / 100000000 * coind->reward_mul; -return; -} - else if(strcmp(coind->symbol, "SECI") == 0) { + + base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); + job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "STAK") == 0) { char script_payee[512] = { 0 }; - char payees[1]; + char payees[4]; int npayees = (templ->has_segwit_txs) ? 2 : 1; bool masternode_payments = json_get_bool(json_result, "masternode_payments"); bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { + + if (masternodes_enabled && masternode_payments) { const char *payee = json_get_string(json_result, "payee"); json_int_t amount = json_get_int(json_result, "payee_amount"); if (payee && amount) ++npayees; } - //mainnet - json_int_t charity_amount = 50000000; - sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + + //treasury 5% @ 10 STAK per block + json_int_t charity_amount = 50000000; + //testnet + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + switch (templ->height % 4) { + case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); + break; + case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); + break; + case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); + break; + case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); + break; + } ++npayees; available -= charity_amount; base58_decode(coind->charity_address, script_payee); @@ -508,9 +528,72 @@ return; } job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; + + coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. + else if (strcmp(coind->symbol, "SMART") == 0) { + char script_payee[512] = { 0 }; + char payees[5]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //treasury 5000 * (143500/Blockheight) per block + int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); + json_int_t charity_amount = coinvalue * 0.95; + int blockRotation = templ->height - 95 * (templ->height/95); + if (blockRotation >= 0 && blockRotation <= 7) { + sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); + } + if (blockRotation >= 8 && blockRotation <= 15) { + sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); + } + if (blockRotation >= 16 && blockRotation <= 23) { + sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); + } + if (blockRotation >= 24 && blockRotation <= 38) { + sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); + } + if (blockRotation >= 39 && blockRotation <= 94) { + sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) @@ -843,3 +926,5 @@ return; // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } + + From 4539d9bbbe5f1a2f198668da9636fcc5d989598e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:23:04 -0500 Subject: [PATCH 160/576] Create astralhash.conf --- stratum/config.sample/astralhash.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/astralhash.conf diff --git a/stratum/config.sample/astralhash.conf b/stratum/config.sample/astralhash.conf new file mode 100644 index 000000000..649eecfdc --- /dev/null +++ b/stratum/config.sample/astralhash.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 8640 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = astralhash +difficulty = 0.25 +max_ttf = 4000000 From 32e2d0f26e10dde8e5c92088961b7ad18bbc8c63 Mon Sep 17 00:00:00 2001 From: Jan <34112129+itsmylife44@users.noreply.github.com> Date: Mon, 7 Jan 2019 02:23:12 +0100 Subject: [PATCH 161/576] Add the API in the "difficulty" parameter on "/api /currencies" page --- web/yaamp/modules/api/ApiController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/modules/api/ApiController.php b/web/yaamp/modules/api/ApiController.php index 7505700ab..55791e18a 100644 --- a/web/yaamp/modules/api/ApiController.php +++ b/web/yaamp/modules/api/ApiController.php @@ -161,12 +161,15 @@ public function actionCurrencies() $btcmhd = yaamp_profitability($coin); $btcmhd = mbitcoinvaluetoa($btcmhd); + + $difficulty = Itoa2($coin->difficulty, 3); $data[$symbol] = array( 'algo' => $coin->algo, 'port' => getAlgoPort($coin->algo), 'name' => $coin->name, 'height' => (int) $coin->block_height, + 'difficulty' => $difficulty, 'workers' => $workers, 'shares' => (int) arraySafeVal($shares,'shares'), 'hashrate' => round($factor * $algo_hashrate), From a83b08841134c11aaa2b10750ac410553b85b12d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:23:24 -0500 Subject: [PATCH 162/576] Create dedal.conf --- stratum/config.sample/dedal.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/dedal.conf diff --git a/stratum/config.sample/dedal.conf b/stratum/config.sample/dedal.conf new file mode 100644 index 000000000..b3e12c674 --- /dev/null +++ b/stratum/config.sample/dedal.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 3538 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = dedal +difficulty = 0.25 +max_ttf = 200000000000000 From 2cd5662ac1fd407b7b6bedf7a156c7e7717c0711 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:23:44 -0500 Subject: [PATCH 163/576] Create jeonghash.conf --- stratum/config.sample/jeonghash.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/jeonghash.conf diff --git a/stratum/config.sample/jeonghash.conf b/stratum/config.sample/jeonghash.conf new file mode 100644 index 000000000..18f28dc22 --- /dev/null +++ b/stratum/config.sample/jeonghash.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 8660 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = jeonghash +difficulty = 0.25 +max_ttf = 4000000 From e6fd7023dc0c0bc3f023ba337be61299ececf2ce Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:24:01 -0500 Subject: [PATCH 164/576] Create pawelhash.conf --- stratum/config.sample/pawelhash.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/pawelhash.conf diff --git a/stratum/config.sample/pawelhash.conf b/stratum/config.sample/pawelhash.conf new file mode 100644 index 000000000..e3b1e4119 --- /dev/null +++ b/stratum/config.sample/pawelhash.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 8680 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = pawelhash +difficulty = 0.25 +max_ttf = 4000000 From 47083548983a3f37817715e168bb293699a91c09 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:24:19 -0500 Subject: [PATCH 165/576] Create pipe.conf --- stratum/config.sample/pipe.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/pipe.conf diff --git a/stratum/config.sample/pipe.conf b/stratum/config.sample/pipe.conf new file mode 100644 index 000000000..26e253990 --- /dev/null +++ b/stratum/config.sample/pipe.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 9393 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = pipe +difficulty = 0.125 +max_ttf = 50000 From f4ec9c2dbff6d536edf287724804262330e33791 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:24:35 -0500 Subject: [PATCH 166/576] Create sonoa.conf --- stratum/config.sample/sonoa.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/sonoa.conf diff --git a/stratum/config.sample/sonoa.conf b/stratum/config.sample/sonoa.conf new file mode 100644 index 000000000..10575484f --- /dev/null +++ b/stratum/config.sample/sonoa.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 8733 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = sonoa +difficulty = 0.5 +max_ttf = 50000 From e90fcd1bb55aa748795bc356c3fe31d37b1b1d51 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:25:41 -0500 Subject: [PATCH 167/576] Create yespower.conf --- stratum/config.sample/yespower.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/yespower.conf diff --git a/stratum/config.sample/yespower.conf b/stratum/config.sample/yespower.conf new file mode 100644 index 000000000..00d4d86dc --- /dev/null +++ b/stratum/config.sample/yespower.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 6234 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = yespower +difficulty = 1 +max_ttf = 400000000 From e0545a3df1c393b0829078f18b7b99d4d28289f9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:25:56 -0500 Subject: [PATCH 168/576] Create yespowerR16.conf --- stratum/config.sample/yespowerR16.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/yespowerR16.conf diff --git a/stratum/config.sample/yespowerR16.conf b/stratum/config.sample/yespowerR16.conf new file mode 100644 index 000000000..3729e89dc --- /dev/null +++ b/stratum/config.sample/yespowerR16.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 6236 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = yespowerR16 +difficulty = 1 +max_ttf = 400000000 From 657d0ed9f22eba1f85138fc2975ace1b81834cef Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:26:12 -0500 Subject: [PATCH 169/576] Create yespowerR24.conf --- stratum/config.sample/yespowerR24.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/yespowerR24.conf diff --git a/stratum/config.sample/yespowerR24.conf b/stratum/config.sample/yespowerR24.conf new file mode 100644 index 000000000..d82601dcd --- /dev/null +++ b/stratum/config.sample/yespowerR24.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 6237 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = yespowerR24 +difficulty = 1 +max_ttf = 400000000 From 5f2750877ae0115b46c3ece90050b42651bc933b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:26:27 -0500 Subject: [PATCH 170/576] Create yespowerR32.conf --- stratum/config.sample/yespowerR32.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/yespowerR32.conf diff --git a/stratum/config.sample/yespowerR32.conf b/stratum/config.sample/yespowerR32.conf new file mode 100644 index 000000000..64efba690 --- /dev/null +++ b/stratum/config.sample/yespowerR32.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 6238 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = yespowerR32 +difficulty = 1 +max_ttf = 400000000 From 97ab78bcd09d045fea02cc7b273a9fe0ae04cb23 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:26:45 -0500 Subject: [PATCH 171/576] Create yespowerR8.conf --- stratum/config.sample/yespowerR8.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/yespowerR8.conf diff --git a/stratum/config.sample/yespowerR8.conf b/stratum/config.sample/yespowerR8.conf new file mode 100644 index 000000000..75d133a4d --- /dev/null +++ b/stratum/config.sample/yespowerR8.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 6235 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = yespowerR8 +difficulty = 1 +max_ttf = 400000000 From 392d6e024e07804e065ba47402951aa9b4050d62 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:30:02 -0500 Subject: [PATCH 172/576] Update stratum.cpp --- stratum/stratum.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 9e896884a..521c814a9 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -127,6 +127,8 @@ YAAMP_ALGO g_algos[] = {"x21s", x21s_hash, 0x100, 0, 0}, {"x22i", x22i_hash, 1, 0, 0}, + {"pipe", pipe_hash, 1,0,0}, + {"x11evo", x11evo_hash, 1, 0, 0}, {"xevan", xevan_hash, 0x100, 0, 0}, @@ -154,6 +156,7 @@ YAAMP_ALGO g_algos[] = {"decred", decred_hash, 1, 0 }, {"deep", deep_hash, 1, 0, 0}, + {"dedal", dedal_hash, 0x100, 0, 0}, {"fresh", fresh_hash, 0x100, 0, 0}, {"quark", quark_hash, 1, 0, 0}, {"nist5", nist5_hash, 1, 0, 0}, @@ -184,6 +187,11 @@ YAAMP_ALGO g_algos[] = {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, + {"yespower", yespower_hash, 0x10000, 0, 0 }, + {"yespowerR8", yespowerR8_hash, 0x10000, 0, 0 }, + {"yespowerR16", yespowerR16_hash, 0x10000, 0, 0 }, + {"yespowerR24", yespowerR24_hash, 0x10000, 0, 0 }, + {"yespowerR32", yespowerR32_hash, 0x10000, 0, 0 }, {"zr5", zr5_hash, 1, 0, 0}, {"a5a", a5a_hash, 0x10000, 0, 0}, @@ -205,6 +213,9 @@ YAAMP_ALGO g_algos[] = {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, + {"astralhash", astralhash_hash, 0x100, 0, 0}, + {"jeonghash", jeonghash_hash, 0x100, 0, 0}, + {"pawelhash", pawelhash_hash, 0x100, 0, 0}, {"", NULL, 0, 0}, }; From 773e56b76b8c0b3de5347413d6d75b3d97dead3c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:31:16 -0500 Subject: [PATCH 173/576] Update stratum.h --- stratum/stratum.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 02c3ee9b8..0519c006b 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -192,6 +192,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/bastion.h" #include "algos/bmw.h" #include "algos/deep.h" +#include "algos/dedal.h" #include "algos/lbk3.h" #include "algos/lbry.h" #include "algos/luffa.h" @@ -201,6 +202,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/whirlpoolx.h" #include "algos/skein2.h" #include "algos/yescrypt.h" +#include "algos/yespower.h" #include "algos/zr5.h" #include "algos/hive.h" #include "algos/sib.h" @@ -218,3 +220,5 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/hex.h" #include "algos/argon2d-dyn.h" #include "algos/exosis.h" +#include "algos/pipehash.h" +#include "algos/gltalgos.h" From 9e7b9e4ecd5a3eb2e9dce440fafe6b410a883d03 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 20:40:08 -0500 Subject: [PATCH 174/576] Update stratum.cpp --- stratum/stratum.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 521c814a9..06ad4ad68 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -213,9 +213,7 @@ YAAMP_ALGO g_algos[] = {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, - {"astralhash", astralhash_hash, 0x100, 0, 0}, - {"jeonghash", jeonghash_hash, 0x100, 0, 0}, - {"pawelhash", pawelhash_hash, 0x100, 0, 0}, + {"", NULL, 0, 0}, }; From 1e7fd756d8d6025131f2486e0a300a0b49577b14 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 21:02:39 -0500 Subject: [PATCH 175/576] Create keys.sample.php --- web/keys.sample.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 web/keys.sample.php diff --git a/web/keys.sample.php b/web/keys.sample.php new file mode 100644 index 000000000..d32780d19 --- /dev/null +++ b/web/keys.sample.php @@ -0,0 +1,23 @@ +'); +/* Keys required to create/cancel orders and access your balances/deposit addresses */ +define('EXCH_BITTREX_SECRET', ''); +define('EXCH_BITSTAMP_SECRET',''); +define('EXCH_BINANCE_SECRET', ''); +define('EXCH_BLEUTRADE_SECRET', ''); +define('EXCH_BTER_SECRET', ''); +define('EXCH_CCEX_SECRET', ''); +define('EXCH_CEXIO_SECRET', ''); +define('EXCH_COINMARKETS_PASS', ''); +define('EXCH_CRYPTOPIA_SECRET', ''); +define('EXCH_EMPOEX_SECKEY', ''); +define('EXCH_HITBTC_SECRET', ''); +define('EXCH_KRAKEN_SECRET',''); +define('EXCH_KUCOIN_SECRET', ''); +define('EXCH_LIVECOIN_SECRET', ''); +define('EXCH_NOVA_SECRET',''); +define('EXCH_POLONIEX_SECRET', ''); +define('EXCH_STOCKSEXCHANGE_SECRET', ''); +define('EXCH_YOBIT_SECRET', ''); From 93433ec6d43a8e4b9aa76b318523154035a06b48 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 6 Jan 2019 21:04:30 -0500 Subject: [PATCH 176/576] Update keys.sample.php --- web/keys.sample.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/keys.sample.php b/web/keys.sample.php index d32780d19..f1943043e 100644 --- a/web/keys.sample.php +++ b/web/keys.sample.php @@ -1,7 +1,9 @@ '); + /* Keys required to create/cancel orders and access your balances/deposit addresses */ define('EXCH_BITTREX_SECRET', ''); define('EXCH_BITSTAMP_SECRET',''); @@ -21,3 +23,4 @@ define('EXCH_POLONIEX_SECRET', ''); define('EXCH_STOCKSEXCHANGE_SECRET', ''); define('EXCH_YOBIT_SECRET', ''); +define('EXCH_ZEBITEX_SECRET', ''); From 58c3343f9b9c3b8f64947ce840b20a5599153efe Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 7 Jan 2019 17:20:16 -0500 Subject: [PATCH 177/576] Update db.cpp --- stratum/db.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stratum/db.cpp b/stratum/db.cpp index f8c513cd8..295947754 100644 --- a/stratum/db.cpp +++ b/stratum/db.cpp @@ -207,6 +207,8 @@ void db_update_coinds(YAAMP_DB *db) YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, atoi(row[0])); if(!coind) { + if (!strlen(g_stratum_coin_include) || (strlen(g_stratum_coin_include) && strstr(g_stratum_coin_include, row[20]))) + { coind = new YAAMP_COIND; memset(coind, 0, sizeof(YAAMP_COIND)); @@ -214,6 +216,9 @@ void db_update_coinds(YAAMP_DB *db) coind->newblock = true; coind->id = atoi(row[0]); coind->aux.coind = coind; + } + else + continue; } else coind->newcoind = false; From 1188bd94c4533888f62cd384d1e3424383649624 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 26 Jan 2019 14:04:18 +0300 Subject: [PATCH 178/576] `masternode` is an array now --- stratum/coinbase.cpp | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 9bf0a2bd3..eded5520d 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -411,19 +411,37 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } } } - if (masternode_enabled && masternode) { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount && started) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (masternode_enabled && masternode && started) { + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i++) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + } } } sprintf(payees, "%02x", npayees); From 1f67daf4e7a74fd371ab271a41dc7e70825232a9 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 26 Jan 2019 14:05:05 +0300 Subject: [PATCH 179/576] When `coinbase_payload` is specified it must be a coinbase special tx --- stratum/coinbase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index eded5520d..0cc10e049 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -93,6 +93,9 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char eversion1[32] = "01000000"; if(coind->txmessage) strcpy(eversion1, "02000000"); + const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); + if(coinbase_payload && strlen(coinbase_payload) > 0) + strcpy(eversion1, "03000500"); char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); From a06d0688ffaff74fab245a89d115abd5318288b8 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 26 Jan 2019 14:05:21 +0300 Subject: [PATCH 180/576] Serialize `coinbase_payload` into coinbase tx --- stratum/coinbase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 0cc10e049..89a10af09 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -453,6 +453,9 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * strcat(templ->coinb2, script_dests); job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime + if(coinbase_payload && strlen(coinbase_payload) > 0) + strcat(templ->coinb2, coinbase_payload); + coind->reward = (double)available/100000000*coind->reward_mul; //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); From b3b2d8ea271ccf675be6fba9ddf503477823f1c7 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 26 Jan 2019 14:47:52 +0300 Subject: [PATCH 181/576] Use `script` instead of `payee` if available This allows both p2pkh and p2psh in mn payouts and superblocks --- stratum/coinbase.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 89a10af09..6aefca9a3 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -27,6 +27,19 @@ static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char strcat(data, coinb2_part); } +static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + encode_tx_value(evalue, amount); + sprintf(coinb2_part, "%s", script); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) { int ol = strlen(data); @@ -400,8 +413,14 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if(superblocks_enabled && superblock) { for(int i = 0; i < superblock->u.array.length; i++) { const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + const char *script = json_get_string(superblock->u.array.values[i], "script"); json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { npayees++; available -= amount; base58_decode(payee, script_payee); @@ -419,8 +438,14 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (json_is_array(masternode)) { for(int i = 0; i < masternode->u.array.length; i++) { const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + const char *script = json_get_string(masternode->u.array.values[i], "script"); json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (payee && amount) { + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { npayees++; available -= amount; base58_decode(payee, script_payee); From 68f24b0ac64ae1b8c46fcfc087cd928331c6672d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 19:21:51 -0500 Subject: [PATCH 182/576] Update coinbase.cpp --- stratum/coinbase.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index b8066e180..de0e477f4 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -392,7 +392,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "RITO") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0))||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; @@ -471,7 +471,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available/100000000*coind->reward_mul; return; - } + } else if(strcmp(coind->symbol, "STAK") == 0) { char script_payee[512] = { 0 }; @@ -832,7 +832,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); return; } - + else if(strcmp(coind->symbol, "ARC") == 0) { char script_dests[2048] = { 0 }; @@ -969,5 +969,3 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } - - From 4907c7abe0a9bc095a7970f66fe0124e2867a355 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:16:57 -0500 Subject: [PATCH 183/576] Update Lyra2.c --- stratum/algos/Lyra2.c | 174 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 1 deletion(-) diff --git a/stratum/algos/Lyra2.c b/stratum/algos/Lyra2.c index dbcc3fa6b..a2016be8f 100644 --- a/stratum/algos/Lyra2.c +++ b/stratum/algos/Lyra2.c @@ -44,7 +44,7 @@ * * @return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation) */ -int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int64_t nRows, const int16_t nCols) +int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols) { //============================= Basic variables ============================// int64_t row = 2; //index of row to be processed @@ -212,3 +212,175 @@ int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *sa return 0; } + +int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols) +{ + //============================= Basic variables ============================// + int64_t row = 2; //index of row to be processed + int64_t prev = 1; //index of prev (last row ever computed/modified) + int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) + int64_t tau; //Time Loop iterator + int64_t step = 1; //Visitation step (used during Setup and Wandering phases) + int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) + int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 + int64_t i; //auxiliary iteration counter + int64_t v64; // 64bit var for memcpy + uint64_t instance = 0; + //==========================================================================/ + + //========== Initializing the Memory Matrix and pointers to it =============// + //Tries to allocate enough space for the whole memory matrix + + const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; + const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; + const int64_t BLOCK_LEN = BLOCK_LEN_BLAKE2_SAFE_INT64; + + size_t sz = (size_t)ROW_LEN_BYTES * nRows; + uint64_t *wholeMatrix = malloc(sz); + if (wholeMatrix == NULL) { + return -1; + } + memset(wholeMatrix, 0, sz); + + //Allocates pointers to each row of the matrix + uint64_t **memMatrix = malloc(sizeof(uint64_t*) * nRows); + if (memMatrix == NULL) { + return -1; + } + //Places the pointers in the correct positions + uint64_t *ptrWord = wholeMatrix; + for (i = 0; i < nRows; i++) { + memMatrix[i] = ptrWord; + ptrWord += ROW_LEN_INT64; + } + //==========================================================================/ + + //============= Getting the password + salt + basil padded with 10*1 ===============// + //OBS.:The memory matrix will temporarily hold the password: not for saving memory, + //but this ensures that the password copied locally will be overwritten as soon as possible + + //First, we clean enough blocks for the password, salt, basil and padding + int64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof(uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; + + byte *ptrByte = (byte*) wholeMatrix; + + //Prepends the password + memcpy(ptrByte, pwd, pwdlen); + ptrByte += pwdlen; + + //Concatenates the salt + memcpy(ptrByte, salt, saltlen); + ptrByte += saltlen; + + memset(ptrByte, 0, (size_t) (nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - (saltlen + pwdlen))); + + //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface + memcpy(ptrByte, &kLen, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = pwdlen; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = saltlen; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = timeCost; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = nRows; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = nCols; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + + //Now comes the padding + *ptrByte = 0x80; //first byte of padding: right after the password + ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix + ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block + *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block + //==========================================================================/ + + //======================= Initializing the Sponge State ====================// + //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) + uint64_t state[16]; + initState(state); + //==========================================================================/ + + //================================ Setup Phase =============================// + //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits + ptrWord = wholeMatrix; + for (i = 0; i < nBlocksInput; i++) { + absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) + ptrWord += BLOCK_LEN; //goes to next block of pad(pwd || salt || basil) + } + + //Initializes M[0] and M[1] + reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here + + reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); + + do { + //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) + + reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //updates the value of row* (deterministically picked during Setup)) + rowa = (rowa + step) & (window - 1); + //update prev: it now points to the last row ever computed + prev = row; + //updates row: goes to the next row to be computed + row++; + + //Checks if all rows in the window where visited. + if (rowa == 0) { + step = window + gap; //changes the step: approximately doubles its value + window *= 2; //doubles the size of the re-visitation window + gap = -gap; //inverts the modifier to the step + } + + } while (row < nRows); + //==========================================================================/ + + //============================ Wandering Phase =============================// + row = 0; //Resets the visitation to the first row of the memory matrix + for (tau = 1; tau <= timeCost; tau++) { + //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 + step = ((tau & 1) == 0) ? -1 : (nRows >> 1) - 1; + do { + //Selects a pseudorandom index row* + //------------------------------------------------------------------------------------------ + instance = state[instance & 0xF]; + rowa = state[instance & 0xF] & (unsigned int)(nRows-1); + + //rowa = state[0] & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + //rowa = state[0] % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] + reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //update prev: it now points to the last row ever computed + prev = row; + + //updates row: goes to the next row to be computed + //------------------------------------------------------------------------------------------ + row = (row + step) & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + //row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + } while (row != 0); + } + + //============================ Wrap-up Phase ===============================// + //Absorbs the last block of the memory matrix + absorbBlock(state, memMatrix[rowa]); + + //Squeezes the key + squeeze(state, K, (unsigned int) kLen); + + //========================= Freeing the memory =============================// + free(memMatrix); + free(wholeMatrix); + + return 0; +} From 2ab23eb169367baf7761ce9757981ad7dce2c45d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:17:26 -0500 Subject: [PATCH 184/576] Update Lyra2.h --- stratum/algos/Lyra2.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stratum/algos/Lyra2.h b/stratum/algos/Lyra2.h index e25432a1a..a6aa87a21 100644 --- a/stratum/algos/Lyra2.h +++ b/stratum/algos/Lyra2.h @@ -37,6 +37,8 @@ typedef unsigned char byte; #define BLOCK_LEN_BYTES (BLOCK_LEN_INT64 * 8) //Block length, in bytes #endif -int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int64_t nRows, const int16_t nCols); +int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols); + +int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols); #endif /* LYRA2_H_ */ From 8ccbfdd61e85bdeb57fd5b778ea31811fe63ddd9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:17:54 -0500 Subject: [PATCH 185/576] Create lyra2v3.c --- stratum/algos/lyra2v3.c | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 stratum/algos/lyra2v3.c diff --git a/stratum/algos/lyra2v3.c b/stratum/algos/lyra2v3.c new file mode 100644 index 000000000..2dd27625e --- /dev/null +++ b/stratum/algos/lyra2v3.c @@ -0,0 +1,67 @@ +/*- + * Copyright(or left) 2019 YiiMP + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ + +#include +#include +#include +#include + +#include "../sha3/sph_blake.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_bmw.h" + +#include "Lyra2.h" + +void lyra2v3_hash(const char* input, char* output, uint32_t len) +{ + uint32_t hash[8], hashB[8]; + + sph_blake256_context ctx_blake; + sph_cubehash256_context ctx_cubehash; + sph_bmw256_context ctx_bmw; + + sph_blake256_set_rounds(14); + + sph_blake256_init(&ctx_blake); + sph_blake256(&ctx_blake, input, len); /* 80 */ + sph_blake256_close(&ctx_blake, hash); + + LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); + + sph_cubehash256_init(&ctx_cubehash); + sph_cubehash256(&ctx_cubehash, hashB, 32); + sph_cubehash256_close(&ctx_cubehash, hash); + + LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); + + sph_bmw256_init(&ctx_bmw); + sph_bmw256(&ctx_bmw, hashB, 32); + sph_bmw256_close(&ctx_bmw, hash); + + memcpy(output, hash, 32); +} From 10484da4274ee8ba59837e6f56dcb47f727e0d8c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:18:13 -0500 Subject: [PATCH 186/576] Create lyra2v3.h --- stratum/algos/lyra2v3.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/lyra2v3.h diff --git a/stratum/algos/lyra2v3.h b/stratum/algos/lyra2v3.h new file mode 100644 index 000000000..8cb341de7 --- /dev/null +++ b/stratum/algos/lyra2v3.h @@ -0,0 +1,16 @@ +#ifndef LYRA2V3_H +#define LYRA2V3_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void lyra2v3_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From a01348604bba06525ec104eaf6ba6b8fc01b3b0c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:18:52 -0500 Subject: [PATCH 187/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 7ef5dd7d9..dd9456bd0 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,7 +8,7 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2vc0ban.c Sponge.c allium.c \ +SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c sm3.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ From 2ab0fb16758be23455c1b7978713632a495a10f1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:19:38 -0500 Subject: [PATCH 188/576] Update lyra2.conf --- stratum/config.sample/lyra2.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/config.sample/lyra2.conf b/stratum/config.sample/lyra2.conf index d2f73617f..0faa798e0 100644 --- a/stratum/config.sample/lyra2.conf +++ b/stratum/config.sample/lyra2.conf @@ -1,6 +1,6 @@ [TCP] server = yaamp.com -port = 4433 +port = 4432 password = tu8tu5 [SQL] From 39661150cb914c3a24cc9ea08b8222212f07514a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:19:55 -0500 Subject: [PATCH 189/576] Create lyra2v3.conf --- stratum/config.sample/lyra2v3.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/lyra2v3.conf diff --git a/stratum/config.sample/lyra2v3.conf b/stratum/config.sample/lyra2v3.conf new file mode 100644 index 000000000..fdd0ff827 --- /dev/null +++ b/stratum/config.sample/lyra2v3.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 4433 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = lyra2v3 +difficulty = 1 +max_ttf = 40000 From 0bda5cd4b3d95fc9b5b3e7da944e3acf8f8aed7a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:20:36 -0500 Subject: [PATCH 190/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 06ad4ad68..4d899b309 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -145,6 +145,7 @@ YAAMP_ALGO g_algos[] = {"allium", allium_hash, 0x100, 0, 0}, {"lyra2", lyra2re_hash, 0x80, 0, 0}, {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, + {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, {"lyra2z", lyra2z_hash, 0x100, 0, 0}, {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, {"bastion", bastion_hash, 1, 0 }, From 4e1e038b6ba83000807e8518278ac20deb51485a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:21:08 -0500 Subject: [PATCH 191/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 0519c006b..213c25384 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -174,6 +174,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/lyra2v2.h" #include "algos/lyra2z.h" #include "algos/lyra2vc0ban.h" +#include "algos/lyra2v3.h" #include "algos/blake.h" #include "algos/blakecoin.h" #include "algos/blake2b.h" From 95210de51d7ef8c8a58ce19488ccc7c2c1aea74e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:22:31 -0500 Subject: [PATCH 192/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 348321182..33cd3c6a4 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -35,6 +35,7 @@ function yaamp_get_algos() 'lyra2v2', 'lyra2z', 'lyra2vc0ban', + 'lyra2v3', 'neoscrypt', 'nist5', 'penta', @@ -202,6 +203,7 @@ function getAlgoColors($algo) 'lyra2v2' => '#80c0f0', 'lyra2z' => '#80b0f0', 'lyra2vc0ban' => '#80c0f0', + 'lyra2v3' => '#80a0f0', 'phi' => '#a0a0e0', 'phi2' => '#a0a0e0', 'polytimos' => '#dedefe', @@ -270,10 +272,11 @@ function getAlgoPort($algo) 'scryptn' => 4333, 'allium' => 4443, 'lbk3' => 5522, - 'lyra2' => 4433, + 'lyra2' => 4432, 'lyra2v2' => 4533, 'lyra2z' => 4553, 'lyra2vc0ban' => 4563, + 'lyra2v3' => 4433, 'jha' => 4633, 'qubit' => 4733, 'zr5' => 4833, From c926b8bc8c91a03f9d07b20c670f56a92792c550 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:26:10 -0500 Subject: [PATCH 193/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index de0e477f4..efdd5a3a5 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -392,7 +392,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "RITO") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0))||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From 4c702656dd0e8a0b0904b1a32bd6ec9f1ae62f7e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:40:28 -0500 Subject: [PATCH 194/576] Update yespower-opt.c --- stratum/algos/yespower-opt.c | 1632 +++++++++++++++------------------- 1 file changed, 729 insertions(+), 903 deletions(-) diff --git a/stratum/algos/yespower-opt.c b/stratum/algos/yespower-opt.c index 265481eae..c81e7a237 100644 --- a/stratum/algos/yespower-opt.c +++ b/stratum/algos/yespower-opt.c @@ -1,6 +1,6 @@ /*- * Copyright 2009 Colin Percival - * Copyright 2012-2018 Alexander Peslyak + * Copyright 2013,2014 Alexander Peslyak * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,112 +26,62 @@ * * This file was originally written by Colin Percival as part of the Tarsnap * online backup system. - * - * This is a proof-of-work focused fork of yescrypt, including optimized and - * cut-down implementation of the obsolete yescrypt 0.5 (based off its first - * submission to PHC back in 2014) and a new proof-of-work specific variation - * known as yespower 1.0. The former is intended as an upgrade for - * cryptocurrencies that already use yescrypt 0.5 and the latter may be used - * as a further upgrade (hard fork) by those and other cryptocurrencies. The - * version of algorithm to use is requested through parameters, allowing for - * both algorithms to co-exist in client and miner implementations (such as in - * preparation for a hard-fork). - */ - -#ifndef _YESPOWER_OPT_C_PASS_ -#define _YESPOWER_OPT_C_PASS_ 1 -#endif - -#if _YESPOWER_OPT_C_PASS_ == 1 -/* - * AVX and especially XOP speed up Salsa20 a lot, but needlessly result in - * extra instruction prefixes for pwxform (which we make more use of). While - * no slowdown from the prefixes is generally observed on AMD CPUs supporting - * XOP, some slowdown is sometimes observed on Intel CPUs with AVX. - */ -#ifdef __XOP__ -#warning "Note: XOP is enabled. That's great." -#elif defined(__AVX__) -#warning "Note: AVX is enabled. That's OK." -#elif defined(__SSE2__) -#warning "Note: AVX and XOP are not enabled. That's OK." -#elif defined(__x86_64__) || defined(__i386__) -#warning "SSE2 not enabled. Expect poor performance." -#else -#warning "Note: building generic code for non-x86. That's OK." -#endif - -/* - * The SSE4 code version has fewer instructions than the generic SSE2 version, - * but all of the instructions are SIMD, thereby wasting the scalar execution - * units. Thus, the generic SSE2 version below actually runs faster on some - * CPUs due to its balanced mix of SIMD and scalar instructions. */ -#undef USE_SSE4_FOR_32BIT - -#ifdef __SSE2__ -/* - * GCC before 4.9 would by default unnecessarily use store/load (without - * SSE4.1) or (V)PEXTR (with SSE4.1 or AVX) instead of simply (V)MOV. - * This was tracked as GCC bug 54349. - * "-mtune=corei7" works around this, but is only supported for GCC 4.6+. - * We use inline asm for pre-4.6 GCC, further down this file. - */ -#if __GNUC__ == 4 && __GNUC_MINOR__ >= 6 && __GNUC_MINOR__ < 9 && \ - !defined(__clang__) && !defined(__ICC) -#pragma GCC target ("tune=corei7") -#endif -#include -#ifdef __XOP__ -#include -#endif -#elif defined(__SSE__) -#include -#endif #include #include #include -#include -#include "insecure_memzero.h" -#include "sha256-P.h" -#include "sysendian_yp.h" +#include "sha256_Y.h" +#include "sysendian.h" -#include "yespower.h" +#include "yescrypt-platform.c" -#include "yespower-platform.c" +static inline uint32_t +le32dec(const void *pp) +{ + const uint8_t *p = (uint8_t const *)pp; -#if __STDC_VERSION__ >= 199901L -/* Have restrict */ -#elif defined(__GNUC__) -#define restrict __restrict -#else -#define restrict -#endif + return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) + + ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24)); +} -#ifdef __GNUC__ -#define unlikely(exp) __builtin_expect(exp, 0) -#else -#define unlikely(exp) (exp) -#endif +static inline void +le32enc(void *pp, uint32_t x) +{ + uint8_t * p = (uint8_t *)pp; -#ifdef __SSE__ -#define PREFETCH(x, hint) _mm_prefetch((const char *)(x), (hint)); -#else -#undef PREFETCH -#endif + p[0] = x & 0xff; + p[1] = (x >> 8) & 0xff; + p[2] = (x >> 16) & 0xff; + p[3] = (x >> 24) & 0xff; +} + +static inline void +blkcpy(uint64_t * dest, const uint64_t * src, size_t count) +{ + do { + *dest++ = *src++; *dest++ = *src++; + *dest++ = *src++; *dest++ = *src++; + } while (count -= 4); +} + +static inline void +blkxor(uint64_t * dest, const uint64_t * src, size_t count) +{ + do { + *dest++ ^= *src++; *dest++ ^= *src++; + *dest++ ^= *src++; *dest++ ^= *src++; + } while (count -= 4); +} typedef union { uint32_t w[16]; uint64_t d[8]; -#ifdef __SSE2__ - __m128i q[4]; -#endif } salsa20_blk_t; -static inline void salsa20_simd_shuffle(const salsa20_blk_t *Bin, - salsa20_blk_t *Bout) +static inline void +salsa20_simd_shuffle(const salsa20_blk_t * Bin, salsa20_blk_t * Bout) { #define COMBINE(out, in1, in2) \ Bout->d[out] = Bin->w[in1 * 2] | ((uint64_t)Bin->w[in2 * 2 + 1] << 32); @@ -146,148 +96,37 @@ static inline void salsa20_simd_shuffle(const salsa20_blk_t *Bin, #undef COMBINE } -static inline void salsa20_simd_unshuffle(const salsa20_blk_t *Bin, - salsa20_blk_t *Bout) +static inline void +salsa20_simd_unshuffle(const salsa20_blk_t * Bin, salsa20_blk_t * Bout) { -#define UNCOMBINE(out, in1, in2) \ +#define COMBINE(out, in1, in2) \ Bout->w[out * 2] = Bin->d[in1]; \ Bout->w[out * 2 + 1] = Bin->d[in2] >> 32; - UNCOMBINE(0, 0, 6) - UNCOMBINE(1, 5, 3) - UNCOMBINE(2, 2, 0) - UNCOMBINE(3, 7, 5) - UNCOMBINE(4, 4, 2) - UNCOMBINE(5, 1, 7) - UNCOMBINE(6, 6, 4) - UNCOMBINE(7, 3, 1) -#undef UNCOMBINE -} - -#ifdef __SSE2__ -#define DECL_X \ - __m128i X0, X1, X2, X3; -#define DECL_Y \ - __m128i Y0, Y1, Y2, Y3; -#define READ_X(in) \ - X0 = (in).q[0]; X1 = (in).q[1]; X2 = (in).q[2]; X3 = (in).q[3]; -#define WRITE_X(out) \ - (out).q[0] = X0; (out).q[1] = X1; (out).q[2] = X2; (out).q[3] = X3; - -#ifdef __XOP__ -#define ARX(out, in1, in2, s) \ - out = _mm_xor_si128(out, _mm_roti_epi32(_mm_add_epi32(in1, in2), s)); -#else -#define ARX(out, in1, in2, s) { \ - __m128i tmp = _mm_add_epi32(in1, in2); \ - out = _mm_xor_si128(out, _mm_slli_epi32(tmp, s)); \ - out = _mm_xor_si128(out, _mm_srli_epi32(tmp, 32 - s)); \ -} -#endif - -#define SALSA20_2ROUNDS \ - /* Operate on "columns" */ \ - ARX(X1, X0, X3, 7) \ - ARX(X2, X1, X0, 9) \ - ARX(X3, X2, X1, 13) \ - ARX(X0, X3, X2, 18) \ - /* Rearrange data */ \ - X1 = _mm_shuffle_epi32(X1, 0x93); \ - X2 = _mm_shuffle_epi32(X2, 0x4E); \ - X3 = _mm_shuffle_epi32(X3, 0x39); \ - /* Operate on "rows" */ \ - ARX(X3, X0, X1, 7) \ - ARX(X2, X3, X0, 9) \ - ARX(X1, X2, X3, 13) \ - ARX(X0, X1, X2, 18) \ - /* Rearrange data */ \ - X1 = _mm_shuffle_epi32(X1, 0x39); \ - X2 = _mm_shuffle_epi32(X2, 0x4E); \ - X3 = _mm_shuffle_epi32(X3, 0x93); - -/** - * Apply the Salsa20 core to the block provided in (X0 ... X3). - */ -#define SALSA20_wrapper(out, rounds) { \ - __m128i Z0 = X0, Z1 = X1, Z2 = X2, Z3 = X3; \ - rounds \ - (out).q[0] = X0 = _mm_add_epi32(X0, Z0); \ - (out).q[1] = X1 = _mm_add_epi32(X1, Z1); \ - (out).q[2] = X2 = _mm_add_epi32(X2, Z2); \ - (out).q[3] = X3 = _mm_add_epi32(X3, Z3); \ + COMBINE(0, 0, 6) + COMBINE(1, 5, 3) + COMBINE(2, 2, 0) + COMBINE(3, 7, 5) + COMBINE(4, 4, 2) + COMBINE(5, 1, 7) + COMBINE(6, 6, 4) + COMBINE(7, 3, 1) +#undef COMBINE } /** - * Apply the Salsa20/2 core to the block provided in X. + * salsa20_8(B): + * Apply the salsa20/8 core to the provided block. */ -#define SALSA20_2(out) \ - SALSA20_wrapper(out, SALSA20_2ROUNDS) - -#define SALSA20_8ROUNDS \ - SALSA20_2ROUNDS SALSA20_2ROUNDS SALSA20_2ROUNDS SALSA20_2ROUNDS - -/** - * Apply the Salsa20/8 core to the block provided in X. - */ -#define SALSA20_8(out) \ - SALSA20_wrapper(out, SALSA20_8ROUNDS) - -#define XOR_X(in) \ - X0 = _mm_xor_si128(X0, (in).q[0]); \ - X1 = _mm_xor_si128(X1, (in).q[1]); \ - X2 = _mm_xor_si128(X2, (in).q[2]); \ - X3 = _mm_xor_si128(X3, (in).q[3]); - -#define XOR_X_2(in1, in2) \ - X0 = _mm_xor_si128((in1).q[0], (in2).q[0]); \ - X1 = _mm_xor_si128((in1).q[1], (in2).q[1]); \ - X2 = _mm_xor_si128((in1).q[2], (in2).q[2]); \ - X3 = _mm_xor_si128((in1).q[3], (in2).q[3]); - -#define XOR_X_WRITE_XOR_Y_2(out, in) \ - (out).q[0] = Y0 = _mm_xor_si128((out).q[0], (in).q[0]); \ - (out).q[1] = Y1 = _mm_xor_si128((out).q[1], (in).q[1]); \ - (out).q[2] = Y2 = _mm_xor_si128((out).q[2], (in).q[2]); \ - (out).q[3] = Y3 = _mm_xor_si128((out).q[3], (in).q[3]); \ - X0 = _mm_xor_si128(X0, Y0); \ - X1 = _mm_xor_si128(X1, Y1); \ - X2 = _mm_xor_si128(X2, Y2); \ - X3 = _mm_xor_si128(X3, Y3); - -#define INTEGERIFY _mm_cvtsi128_si32(X0) - -#else /* !defined(__SSE2__) */ - -#define DECL_X \ - salsa20_blk_t X; -#define DECL_Y \ - salsa20_blk_t Y; - -#define COPY(out, in) \ - (out).d[0] = (in).d[0]; \ - (out).d[1] = (in).d[1]; \ - (out).d[2] = (in).d[2]; \ - (out).d[3] = (in).d[3]; \ - (out).d[4] = (in).d[4]; \ - (out).d[5] = (in).d[5]; \ - (out).d[6] = (in).d[6]; \ - (out).d[7] = (in).d[7]; - -#define READ_X(in) COPY(X, in) -#define WRITE_X(out) COPY(out, X) - -/** - * salsa20(B): - * Apply the Salsa20 core to the provided block. - */ -static inline void salsa20(salsa20_blk_t *restrict B, - salsa20_blk_t *restrict Bout, uint32_t doublerounds) +static void +salsa20_8(uint64_t B[8]) { + size_t i; salsa20_blk_t X; #define x X.w - salsa20_simd_unshuffle(B, &X); + salsa20_simd_unshuffle((const salsa20_blk_t *)B, &X); - do { + for (i = 0; i < 8; i += 2) { #define R(a,b) (((a) << (b)) | ((a) >> (32 - (b)))) /* Operate on columns */ x[ 4] ^= R(x[ 0]+x[12], 7); x[ 8] ^= R(x[ 4]+x[ 0], 9); @@ -315,596 +154,346 @@ static inline void salsa20(salsa20_blk_t *restrict B, x[12] ^= R(x[15]+x[14], 7); x[13] ^= R(x[12]+x[15], 9); x[14] ^= R(x[13]+x[12],13); x[15] ^= R(x[14]+x[13],18); #undef R - } while (--doublerounds); + } #undef x { - uint32_t i; - salsa20_simd_shuffle(&X, Bout); + salsa20_blk_t Y; + salsa20_simd_shuffle(&X, &Y); for (i = 0; i < 16; i += 4) { - B->w[i] = Bout->w[i] += B->w[i]; - B->w[i + 1] = Bout->w[i + 1] += B->w[i + 1]; - B->w[i + 2] = Bout->w[i + 2] += B->w[i + 2]; - B->w[i + 3] = Bout->w[i + 3] += B->w[i + 3]; + ((salsa20_blk_t *)B)->w[i] += Y.w[i]; + ((salsa20_blk_t *)B)->w[i + 1] += Y.w[i + 1]; + ((salsa20_blk_t *)B)->w[i + 2] += Y.w[i + 2]; + ((salsa20_blk_t *)B)->w[i + 3] += Y.w[i + 3]; } } } /** - * Apply the Salsa20/2 core to the block provided in X. - */ -#define SALSA20_2(out) \ - salsa20(&X, &out, 1); - -/** - * Apply the Salsa20/8 core to the block provided in X. - */ -#define SALSA20_8(out) \ - salsa20(&X, &out, 4); - -#define XOR(out, in1, in2) \ - (out).d[0] = (in1).d[0] ^ (in2).d[0]; \ - (out).d[1] = (in1).d[1] ^ (in2).d[1]; \ - (out).d[2] = (in1).d[2] ^ (in2).d[2]; \ - (out).d[3] = (in1).d[3] ^ (in2).d[3]; \ - (out).d[4] = (in1).d[4] ^ (in2).d[4]; \ - (out).d[5] = (in1).d[5] ^ (in2).d[5]; \ - (out).d[6] = (in1).d[6] ^ (in2).d[6]; \ - (out).d[7] = (in1).d[7] ^ (in2).d[7]; - -#define XOR_X(in) XOR(X, X, in) -#define XOR_X_2(in1, in2) XOR(X, in1, in2) -#define XOR_X_WRITE_XOR_Y_2(out, in) \ - XOR(Y, out, in) \ - COPY(out, Y) \ - XOR(X, X, Y) - -#define INTEGERIFY (uint32_t)X.d[0] -#endif - -/** - * Apply the Salsa20 core to the block provided in X ^ in. - */ -#define SALSA20_XOR_MEM(in, out) \ - XOR_X(in) \ - SALSA20(out) - -#define SALSA20 SALSA20_8 -#else /* pass 2 */ -#undef SALSA20 -#define SALSA20 SALSA20_2 -#endif - -/** - * blockmix_salsa(Bin, Bout): - * Compute Bout = BlockMix_{salsa20, 1}(Bin). The input Bin must be 128 - * bytes in length; the output Bout must also be the same size. + * blockmix_salsa8(Bin, Bout, X, r): + * Compute Bout = BlockMix_{salsa20/8, r}(Bin). The input Bin must be 128r + * bytes in length; the output Bout must also be the same size. The + * temporary space X must be 64 bytes. */ -static inline void blockmix_salsa(const salsa20_blk_t *restrict Bin, - salsa20_blk_t *restrict Bout) +static void +blockmix_salsa8(const uint64_t * Bin, uint64_t * Bout, uint64_t * X, size_t r) { - DECL_X - - READ_X(Bin[1]) - SALSA20_XOR_MEM(Bin[0], Bout[0]) - SALSA20_XOR_MEM(Bin[1], Bout[1]) -} - -static inline uint32_t blockmix_salsa_xor(const salsa20_blk_t *restrict Bin1, - const salsa20_blk_t *restrict Bin2, salsa20_blk_t *restrict Bout) -{ - DECL_X - - XOR_X_2(Bin1[1], Bin2[1]) - XOR_X(Bin1[0]) - SALSA20_XOR_MEM(Bin2[0], Bout[0]) - XOR_X(Bin1[1]) - SALSA20_XOR_MEM(Bin2[1], Bout[1]) + size_t i; - return INTEGERIFY; -} + /* 1: X <-- B_{2r - 1} */ + blkcpy(X, &Bin[(2 * r - 1) * 8], 8); -#if _YESPOWER_OPT_C_PASS_ == 1 -/* This is tunable, but it is part of what defines a yespower version */ -/* Version 0.5 */ -#define Swidth_0_5 8 -/* Version 1.0 */ -#define Swidth_1_0 11 + /* 2: for i = 0 to 2r - 1 do */ + for (i = 0; i < 2 * r; i += 2) { + /* 3: X <-- H(X \xor B_i) */ + blkxor(X, &Bin[i * 8], 8); + salsa20_8(X); -/* Not tunable in this implementation, hard-coded in a few places */ -#define PWXsimple 2 -#define PWXgather 4 + /* 4: Y_i <-- X */ + /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ + blkcpy(&Bout[i * 4], X, 8); -/* Derived value. Not tunable on its own. */ -#define PWXbytes (PWXgather * PWXsimple * 8) + /* 3: X <-- H(X \xor B_i) */ + blkxor(X, &Bin[i * 8 + 8], 8); + salsa20_8(X); -/* (Maybe-)runtime derived values. Not tunable on their own. */ -#define Swidth_to_Sbytes1(Swidth) ((1 << (Swidth)) * PWXsimple * 8) -#define Swidth_to_Smask(Swidth) (((1 << (Swidth)) - 1) * PWXsimple * 8) -#define Smask_to_Smask2(Smask) (((uint64_t)(Smask) << 32) | (Smask)) + /* 4: Y_i <-- X */ + /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ + blkcpy(&Bout[i * 4 + r * 8], X, 8); + } +} -/* These should be compile-time derived */ -#define Smask2_0_5 Smask_to_Smask2(Swidth_to_Smask(Swidth_0_5)) -#define Smask2_1_0 Smask_to_Smask2(Swidth_to_Smask(Swidth_1_0)) +/* These are tunable */ +#define S_BITS 8 +#define S_SIMD 2 +#define S_P 4 +#define S_ROUNDS 6 -typedef struct { - uint8_t *S0, *S1, *S2; - size_t w; - uint32_t Sbytes; -} pwxform_ctx_t; +/* Number of S-boxes. Not tunable, hard-coded in a few places. */ +#define S_N 2 -#define DECL_SMASK2REG /* empty */ -#define MAYBE_MEMORY_BARRIER /* empty */ +/* Derived values. Not tunable on their own. */ +#define S_SIZE1 (1 << S_BITS) +#define S_MASK ((S_SIZE1 - 1) * S_SIMD * 8) +#define S_MASK2 (((uint64_t)S_MASK << 32) | S_MASK) +#define S_SIZE_ALL (S_N * S_SIZE1 * S_SIMD) +#define S_P_SIZE (S_P * S_SIMD) +#define S_MIN_R ((S_P * S_SIMD + 15) / 16) -#ifdef __SSE2__ -/* - * (V)PSRLDQ and (V)PSHUFD have higher throughput than (V)PSRLQ on some CPUs - * starting with Sandy Bridge. Additionally, PSHUFD uses separate source and - * destination registers, whereas the shifts would require an extra move - * instruction for our code when building without AVX. Unfortunately, PSHUFD - * is much slower on Conroe (4 cycles latency vs. 1 cycle latency for PSRLQ) - * and somewhat slower on some non-Intel CPUs (luckily not including AMD - * Bulldozer and Piledriver). +/** + * pwxform(B): + * Transform the provided block using the provided S-boxes. */ -#ifdef __AVX__ -#define HI32(X) \ - _mm_srli_si128((X), 4) -#elif 1 /* As an option, check for __SSE4_1__ here not to hurt Conroe */ -#define HI32(X) \ - _mm_shuffle_epi32((X), _MM_SHUFFLE(2,3,0,1)) -#else -#define HI32(X) \ - _mm_srli_epi64((X), 32) -#endif - -#if defined(__x86_64__) && \ - __GNUC__ == 4 && __GNUC_MINOR__ < 6 && !defined(__ICC) -#ifdef __AVX__ -#define MOVQ "vmovq" -#else -/* "movq" would be more correct, but "movd" is supported by older binutils - * due to an error in AMD's spec for x86-64. */ -#define MOVQ "movd" -#endif -#define EXTRACT64(X) ({ \ - uint64_t result; \ - __asm__(MOVQ " %1, %0" : "=r" (result) : "x" (X)); \ - result; \ -}) -#elif defined(__x86_64__) && !defined(_MSC_VER) && !defined(__OPEN64__) -/* MSVC and Open64 had bugs */ -#define EXTRACT64(X) _mm_cvtsi128_si64(X) -#elif defined(__x86_64__) && defined(__SSE4_1__) -/* No known bugs for this intrinsic */ -#include -#define EXTRACT64(X) _mm_extract_epi64((X), 0) -#elif defined(USE_SSE4_FOR_32BIT) && defined(__SSE4_1__) -/* 32-bit */ -#include -#if 0 -/* This is currently unused by the code below, which instead uses these two - * intrinsics explicitly when (!defined(__x86_64__) && defined(__SSE4_1__)) */ -#define EXTRACT64(X) \ - ((uint64_t)(uint32_t)_mm_cvtsi128_si32(X) | \ - ((uint64_t)(uint32_t)_mm_extract_epi32((X), 1) << 32)) -#endif -#else -/* 32-bit or compilers with known past bugs in _mm_cvtsi128_si64() */ -#define EXTRACT64(X) \ - ((uint64_t)(uint32_t)_mm_cvtsi128_si32(X) | \ - ((uint64_t)(uint32_t)_mm_cvtsi128_si32(HI32(X)) << 32)) +static void +block_pwxform(uint64_t * B, const uint64_t * S) +{ + uint64_t (*X)[S_SIMD] = (uint64_t (*)[S_SIMD])B; + const uint8_t *S0 = (const uint8_t *)S; + const uint8_t *S1 = (const uint8_t *)(S + S_SIZE1 * S_SIMD); + size_t i, j; +#if S_SIMD > 2 + size_t k; #endif -#if defined(__x86_64__) && (defined(__AVX__) || !defined(__GNUC__)) -/* 64-bit with AVX */ -/* Force use of 64-bit AND instead of two 32-bit ANDs */ -#undef DECL_SMASK2REG -#if defined(__GNUC__) && !defined(__ICC) -#define DECL_SMASK2REG uint64_t Smask2reg = Smask2; -/* Force use of lower-numbered registers to reduce number of prefixes, relying - * on out-of-order execution and register renaming. */ -#define FORCE_REGALLOC_1 \ - __asm__("" : "=a" (x), "+d" (Smask2reg), "+S" (S0), "+D" (S1)); -#define FORCE_REGALLOC_2 \ - __asm__("" : : "c" (lo)); -#else -static volatile uint64_t Smask2var = Smask2; -#define DECL_SMASK2REG uint64_t Smask2reg = Smask2var; -#define FORCE_REGALLOC_1 /* empty */ -#define FORCE_REGALLOC_2 /* empty */ -#endif -#define PWXFORM_SIMD(X) { \ - uint64_t x; \ - FORCE_REGALLOC_1 \ - uint32_t lo = x = EXTRACT64(X) & Smask2reg; \ - FORCE_REGALLOC_2 \ - uint32_t hi = x >> 32; \ - X = _mm_mul_epu32(HI32(X), X); \ - X = _mm_add_epi64(X, *(__m128i *)(S0 + lo)); \ - X = _mm_xor_si128(X, *(__m128i *)(S1 + hi)); \ -} -#elif defined(__x86_64__) -/* 64-bit without AVX. This relies on out-of-order execution and register - * renaming. It may actually be fastest on CPUs with AVX(2) as well - e.g., - * it runs great on Haswell. */ -#warning "Note: using x86-64 inline assembly for pwxform. That's great." -#undef MAYBE_MEMORY_BARRIER -#define MAYBE_MEMORY_BARRIER \ - __asm__("" : : : "memory"); -#define PWXFORM_SIMD(X) { \ - __m128i H; \ - __asm__( \ - "movd %0, %%rax\n\t" \ - "pshufd $0xb1, %0, %1\n\t" \ - "andq %2, %%rax\n\t" \ - "pmuludq %1, %0\n\t" \ - "movl %%eax, %%ecx\n\t" \ - "shrq $0x20, %%rax\n\t" \ - "paddq (%3,%%rcx), %0\n\t" \ - "pxor (%4,%%rax), %0\n\t" \ - : "+x" (X), "=x" (H) \ - : "d" (Smask2), "S" (S0), "D" (S1) \ - : "cc", "ax", "cx"); \ -} -#elif defined(USE_SSE4_FOR_32BIT) && defined(__SSE4_1__) -/* 32-bit with SSE4.1 */ -#define PWXFORM_SIMD(X) { \ - __m128i x = _mm_and_si128(X, _mm_set1_epi64x(Smask2)); \ - __m128i s0 = *(__m128i *)(S0 + (uint32_t)_mm_cvtsi128_si32(x)); \ - __m128i s1 = *(__m128i *)(S1 + (uint32_t)_mm_extract_epi32(x, 1)); \ - X = _mm_mul_epu32(HI32(X), X); \ - X = _mm_add_epi64(X, s0); \ - X = _mm_xor_si128(X, s1); \ -} -#else -/* 32-bit without SSE4.1 */ -#define PWXFORM_SIMD(X) { \ - uint64_t x = EXTRACT64(X) & Smask2; \ - __m128i s0 = *(__m128i *)(S0 + (uint32_t)x); \ - __m128i s1 = *(__m128i *)(S1 + (x >> 32)); \ - X = _mm_mul_epu32(HI32(X), X); \ - X = _mm_add_epi64(X, s0); \ - X = _mm_xor_si128(X, s1); \ -} + for (j = 0; j < S_P; j++) { + uint64_t *Xj = X[j]; + uint64_t x0 = Xj[0]; +#if S_SIMD > 1 + uint64_t x1 = Xj[1]; #endif -#define PWXFORM_SIMD_WRITE(X, Sw) \ - PWXFORM_SIMD(X) \ - MAYBE_MEMORY_BARRIER \ - *(__m128i *)(Sw + w) = X; \ - MAYBE_MEMORY_BARRIER - -#define PWXFORM_ROUND \ - PWXFORM_SIMD(X0) \ - PWXFORM_SIMD(X1) \ - PWXFORM_SIMD(X2) \ - PWXFORM_SIMD(X3) - -#define PWXFORM_ROUND_WRITE4 \ - PWXFORM_SIMD_WRITE(X0, S0) \ - PWXFORM_SIMD_WRITE(X1, S1) \ - w += 16; \ - PWXFORM_SIMD_WRITE(X2, S0) \ - PWXFORM_SIMD_WRITE(X3, S1) \ - w += 16; - -#define PWXFORM_ROUND_WRITE2 \ - PWXFORM_SIMD_WRITE(X0, S0) \ - PWXFORM_SIMD_WRITE(X1, S1) \ - w += 16; \ - PWXFORM_SIMD(X2) \ - PWXFORM_SIMD(X3) - -#else /* !defined(__SSE2__) */ - -#define PWXFORM_SIMD(x0, x1) { \ - uint64_t x = x0 & Smask2; \ - uint64_t *p0 = (uint64_t *)(S0 + (uint32_t)x); \ - uint64_t *p1 = (uint64_t *)(S1 + (x >> 32)); \ - x0 = ((x0 >> 32) * (uint32_t)x0 + p0[0]) ^ p1[0]; \ - x1 = ((x1 >> 32) * (uint32_t)x1 + p0[1]) ^ p1[1]; \ -} + for (i = 0; i < S_ROUNDS; i++) { + uint64_t x = x0 & S_MASK2; + const uint64_t *p0, *p1; -#define PWXFORM_SIMD_WRITE(x0, x1, Sw) \ - PWXFORM_SIMD(x0, x1) \ - ((uint64_t *)(Sw + w))[0] = x0; \ - ((uint64_t *)(Sw + w))[1] = x1; - -#define PWXFORM_ROUND \ - PWXFORM_SIMD(X.d[0], X.d[1]) \ - PWXFORM_SIMD(X.d[2], X.d[3]) \ - PWXFORM_SIMD(X.d[4], X.d[5]) \ - PWXFORM_SIMD(X.d[6], X.d[7]) - -#define PWXFORM_ROUND_WRITE4 \ - PWXFORM_SIMD_WRITE(X.d[0], X.d[1], S0) \ - PWXFORM_SIMD_WRITE(X.d[2], X.d[3], S1) \ - w += 16; \ - PWXFORM_SIMD_WRITE(X.d[4], X.d[5], S0) \ - PWXFORM_SIMD_WRITE(X.d[6], X.d[7], S1) \ - w += 16; - -#define PWXFORM_ROUND_WRITE2 \ - PWXFORM_SIMD_WRITE(X.d[0], X.d[1], S0) \ - PWXFORM_SIMD_WRITE(X.d[2], X.d[3], S1) \ - w += 16; \ - PWXFORM_SIMD(X.d[4], X.d[5]) \ - PWXFORM_SIMD(X.d[6], X.d[7]) -#endif + p0 = (const uint64_t *)(S0 + (uint32_t)x); + p1 = (const uint64_t *)(S1 + (x >> 32)); -#define PWXFORM \ - PWXFORM_ROUND PWXFORM_ROUND PWXFORM_ROUND \ - PWXFORM_ROUND PWXFORM_ROUND PWXFORM_ROUND + x0 = (uint64_t)(x0 >> 32) * (uint32_t)x0; + x0 += p0[0]; + x0 ^= p1[0]; -#define Smask2 Smask2_0_5 +#if S_SIMD > 1 + x1 = (uint64_t)(x1 >> 32) * (uint32_t)x1; + x1 += p0[1]; + x1 ^= p1[1]; +#endif -#else /* pass 2 */ +#if S_SIMD > 2 + for (k = 2; k < S_SIMD; k++) { + x = Xj[k]; -#undef PWXFORM -#define PWXFORM \ - PWXFORM_ROUND_WRITE4 PWXFORM_ROUND_WRITE2 PWXFORM_ROUND_WRITE2 \ - w &= Smask2; \ - { \ - uint8_t *Stmp = S2; \ - S2 = S1; \ - S1 = S0; \ - S0 = Stmp; \ - } + x = (uint64_t)(x >> 32) * (uint32_t)x; + x += p0[k]; + x ^= p1[k]; -#undef Smask2 -#define Smask2 Smask2_1_0 + Xj[k] = x; + } +#endif + } + Xj[0] = x0; +#if S_SIMD > 1 + Xj[1] = x1; #endif + } +} /** - * blockmix_pwxform(Bin, Bout, r, S): - * Compute Bout = BlockMix_pwxform{salsa20, r, S}(Bin). The input Bin must + * blockmix_pwxform(Bin, Bout, S, r): + * Compute Bout = BlockMix_pwxform{salsa20/8, S, r}(Bin). The input Bin must * be 128r bytes in length; the output Bout must also be the same size. + * + * S lacks const qualifier to match blockmix_salsa8()'s prototype, which we + * need to refer to both functions via the same function pointers. */ -static void blockmix(const salsa20_blk_t *restrict Bin, - salsa20_blk_t *restrict Bout, size_t r, pwxform_ctx_t *restrict ctx) +static void +blockmix_pwxform(const uint64_t * Bin, uint64_t * Bout, uint64_t * S, size_t r) { - if (unlikely(!ctx)) { - blockmix_salsa(Bin, Bout); - return; - } + size_t r1, r2, i; - uint8_t *S0 = ctx->S0, *S1 = ctx->S1; -#if _YESPOWER_OPT_C_PASS_ > 1 - uint8_t *S2 = ctx->S2; - size_t w = ctx->w; -#endif - size_t i; - DECL_X + /* Convert 128-byte blocks to (S_P_SIZE * 64-bit) blocks */ + r1 = r * 128 / (S_P_SIZE * 8); - /* Convert count of 128-byte blocks to max index of 64-byte block */ - r = r * 2 - 1; + /* X <-- B_{r1 - 1} */ + blkcpy(Bout, &Bin[(r1 - 1) * S_P_SIZE], S_P_SIZE); - READ_X(Bin[r]) + /* X <-- X \xor B_i */ + blkxor(Bout, Bin, S_P_SIZE); - DECL_SMASK2REG + /* X <-- H'(X) */ + /* B'_i <-- X */ + block_pwxform(Bout, S); - i = 0; - do { - XOR_X(Bin[i]) - PWXFORM - if (unlikely(i >= r)) - break; - WRITE_X(Bout[i]) - i++; - } while (1); - -#if _YESPOWER_OPT_C_PASS_ > 1 - ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; - ctx->w = w; -#endif + /* for i = 0 to r1 - 1 do */ + for (i = 1; i < r1; i++) { + /* X <-- X \xor B_i */ + blkcpy(&Bout[i * S_P_SIZE], &Bout[(i - 1) * S_P_SIZE], + S_P_SIZE); + blkxor(&Bout[i * S_P_SIZE], &Bin[i * S_P_SIZE], S_P_SIZE); - SALSA20(Bout[i]) -} + /* X <-- H'(X) */ + /* B'_i <-- X */ + block_pwxform(&Bout[i * S_P_SIZE], S); + } -static uint32_t blockmix_xor(const salsa20_blk_t *restrict Bin1, - const salsa20_blk_t *restrict Bin2, salsa20_blk_t *restrict Bout, - size_t r, pwxform_ctx_t *restrict ctx) -{ - if (unlikely(!ctx)) - return blockmix_salsa_xor(Bin1, Bin2, Bout); + /* Handle partial blocks */ + if (i * S_P_SIZE < r * 16) + blkcpy(&Bout[i * S_P_SIZE], &Bin[i * S_P_SIZE], + r * 16 - i * S_P_SIZE); - uint8_t *S0 = ctx->S0, *S1 = ctx->S1; -#if _YESPOWER_OPT_C_PASS_ > 1 - uint8_t *S2 = ctx->S2; - size_t w = ctx->w; -#endif - size_t i; - DECL_X + i = (r1 - 1) * S_P_SIZE / 8; + /* Convert 128-byte blocks to 64-byte blocks */ + r2 = r * 2; - /* Convert count of 128-byte blocks to max index of 64-byte block */ - r = r * 2 - 1; + /* B'_i <-- H(B'_i) */ + salsa20_8(&Bout[i * 8]); + i++; -#ifdef PREFETCH - PREFETCH(&Bin2[r], _MM_HINT_T0) - for (i = 0; i < r; i++) { - PREFETCH(&Bin2[i], _MM_HINT_T0) + for (; i < r2; i++) { + /* B'_i <-- H(B'_i \xor B'_{i-1}) */ + blkxor(&Bout[i * 8], &Bout[(i - 1) * 8], 8); + salsa20_8(&Bout[i * 8]); } -#endif - - XOR_X_2(Bin1[r], Bin2[r]) +} - DECL_SMASK2REG +/** + * integerify(B, r): + * Return the result of parsing B_{2r-1} as a little-endian integer. + */ +static inline uint64_t +integerify(const uint64_t * B, size_t r) +{ +/* + * Our 64-bit words are in host byte order, and word 6 holds the second 32-bit + * word of B_{2r-1} due to SIMD shuffling. The 64-bit value we return is also + * in host byte order, as it should be. + */ + const uint64_t * X = &B[(2 * r - 1) * 8]; + uint32_t lo = X[0]; + uint32_t hi = X[6] >> 32; + return ((uint64_t)hi << 32) + lo; +} - i = 0; - r--; - do { - XOR_X(Bin1[i]) - XOR_X(Bin2[i]) - PWXFORM - WRITE_X(Bout[i]) +/** + * smix1(B, r, N, flags, V, NROM, shared, XY, S): + * Compute first loop of B = SMix_r(B, N). The input B must be 128r bytes in + * length; the temporary storage V must be 128rN bytes in length; the temporary + * storage XY must be 256r + 64 bytes in length. The value N must be even and + * no smaller than 2. + */ +static void +smix1(uint64_t * B, size_t r, uint64_t N, yescrypt_flags_t flags, + uint64_t * V, uint64_t NROM, const yescrypt_shared_t * shared, + uint64_t * XY, uint64_t * S) +{ + void (*blockmix)(const uint64_t *, uint64_t *, uint64_t *, size_t) = + (S ? blockmix_pwxform : blockmix_salsa8); + const uint64_t * VROM = shared->shared1.aligned; + uint32_t VROM_mask = shared->mask1; + size_t s = 16 * r; + uint64_t * X = V; + uint64_t * Y = &XY[s]; + uint64_t * Z = S ? S : &XY[2 * s]; + uint64_t n, i, j; + size_t k; + + /* 1: X <-- B */ + /* 3: V_i <-- X */ + for (i = 0; i < 2 * r; i++) { + const salsa20_blk_t *src = (const salsa20_blk_t *)&B[i * 8]; + salsa20_blk_t *tmp = (salsa20_blk_t *)Y; + salsa20_blk_t *dst = (salsa20_blk_t *)&X[i * 8]; + for (k = 0; k < 16; k++) + tmp->w[k] = le32dec(&src->w[k]); + salsa20_simd_shuffle(tmp, dst); + } - XOR_X(Bin1[i + 1]) - XOR_X(Bin2[i + 1]) - PWXFORM + /* 4: X <-- H(X) */ + /* 3: V_i <-- X */ + blockmix(X, Y, Z, r); + blkcpy(&V[s], Y, s); - if (unlikely(i >= r)) - break; + X = XY; - WRITE_X(Bout[i + 1]) + if (NROM && (VROM_mask & 1)) { + if ((1 & VROM_mask) == 1) { + /* j <-- Integerify(X) mod NROM */ + j = integerify(Y, r) & (NROM - 1); - i += 2; - } while (1); - i++; + /* X <-- H(X \xor VROM_j) */ + blkxor(Y, &VROM[j * s], s); + } -#if _YESPOWER_OPT_C_PASS_ > 1 - ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; - ctx->w = w; -#endif + blockmix(Y, X, Z, r); - SALSA20(Bout[i]) + /* 2: for i = 0 to N - 1 do */ + for (n = 1, i = 2; i < N; i += 2) { + /* 3: V_i <-- X */ + blkcpy(&V[i * s], X, s); - return INTEGERIFY; -} + if ((i & (i - 1)) == 0) + n <<= 1; -static uint32_t blockmix_xor_save(salsa20_blk_t *restrict Bin1out, - salsa20_blk_t *restrict Bin2, - size_t r, pwxform_ctx_t *restrict ctx) -{ - uint8_t *S0 = ctx->S0, *S1 = ctx->S1; -#if _YESPOWER_OPT_C_PASS_ > 1 - uint8_t *S2 = ctx->S2; - size_t w = ctx->w; -#endif - size_t i; - DECL_X - DECL_Y + /* j <-- Wrap(Integerify(X), i) */ + j = integerify(X, r) & (n - 1); + j += i - n; - /* Convert count of 128-byte blocks to max index of 64-byte block */ - r = r * 2 - 1; + /* X <-- X \xor V_j */ + blkxor(X, &V[j * s], s); -#ifdef PREFETCH - PREFETCH(&Bin2[r], _MM_HINT_T0) - for (i = 0; i < r; i++) { - PREFETCH(&Bin2[i], _MM_HINT_T0) - } -#endif + /* 4: X <-- H(X) */ + blockmix(X, Y, Z, r); - XOR_X_2(Bin1out[r], Bin2[r]) + /* 3: V_i <-- X */ + blkcpy(&V[(i + 1) * s], Y, s); - DECL_SMASK2REG + j = integerify(Y, r); + if (((i + 1) & VROM_mask) == 1) { + /* j <-- Integerify(X) mod NROM */ + j &= NROM - 1; - i = 0; - r--; - do { - XOR_X_WRITE_XOR_Y_2(Bin2[i], Bin1out[i]) - PWXFORM - WRITE_X(Bin1out[i]) + /* X <-- H(X \xor VROM_j) */ + blkxor(Y, &VROM[j * s], s); + } else { + /* j <-- Wrap(Integerify(X), i) */ + j &= n - 1; + j += i + 1 - n; - XOR_X_WRITE_XOR_Y_2(Bin2[i + 1], Bin1out[i + 1]) - PWXFORM + /* X <-- H(X \xor V_j) */ + blkxor(Y, &V[j * s], s); + } - if (unlikely(i >= r)) - break; + blockmix(Y, X, Z, r); + } + } else { + yescrypt_flags_t rw = flags & YESCRYPT_RW; - WRITE_X(Bin1out[i + 1]) + /* 4: X <-- H(X) */ + blockmix(Y, X, Z, r); - i += 2; - } while (1); - i++; + /* 2: for i = 0 to N - 1 do */ + for (n = 1, i = 2; i < N; i += 2) { + /* 3: V_i <-- X */ + blkcpy(&V[i * s], X, s); -#if _YESPOWER_OPT_C_PASS_ > 1 - ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; - ctx->w = w; -#endif + if (rw) { + if ((i & (i - 1)) == 0) + n <<= 1; - SALSA20(Bin1out[i]) + /* j <-- Wrap(Integerify(X), i) */ + j = integerify(X, r) & (n - 1); + j += i - n; - return INTEGERIFY; -} + /* X <-- X \xor V_j */ + blkxor(X, &V[j * s], s); + } -#if _YESPOWER_OPT_C_PASS_ == 1 -/** - * integerify(B, r): - * Return the result of parsing B_{2r-1} as a little-endian integer. - */ -static inline uint32_t integerify(const salsa20_blk_t *B, size_t r) -{ -/* - * Our 64-bit words are in host byte order, which is why we don't just read - * w[0] here (would be wrong on big-endian). Also, our 32-bit words are - * SIMD-shuffled, but we only care about the least significant 32 bits anyway. - */ - return (uint32_t)B[2 * r - 1].d[0]; -} -#endif + /* 4: X <-- H(X) */ + blockmix(X, Y, Z, r); -/** - * smix1(B, r, N, V, XY, S): - * Compute first loop of B = SMix_r(B, N). The input B must be 128r bytes in - * length; the temporary storage V must be 128rN bytes in length; the temporary - * storage XY must be 128r+64 bytes in length. N must be even and at least 4. - * The array V must be aligned to a multiple of 64 bytes, and arrays B and XY - * to a multiple of at least 16 bytes. - */ -static void smix1(uint8_t *B, size_t r, uint32_t N, - salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) -{ - size_t s = 2 * r; - salsa20_blk_t *X = V, *Y = &V[s], *V_j; - uint32_t i, j, n; + /* 3: V_i <-- X */ + blkcpy(&V[(i + 1) * s], Y, s); -#if _YESPOWER_OPT_C_PASS_ == 1 - for (i = 0; i < 2 * r; i++) { -#else - for (i = 0; i < 2; i++) { -#endif - const salsa20_blk_t *src = (salsa20_blk_t *)&B[i * 64]; - salsa20_blk_t *tmp = Y; - salsa20_blk_t *dst = &X[i]; - size_t k; - for (k = 0; k < 16; k++) - tmp->w[k] = le32dec(&src->w[k]); - salsa20_simd_shuffle(tmp, dst); - } + if (rw) { + /* j <-- Wrap(Integerify(X), i) */ + j = integerify(Y, r) & (n - 1); + j += (i + 1) - n; -#if _YESPOWER_OPT_C_PASS_ > 1 - for (i = 1; i < r; i++) - blockmix(&X[(i - 1) * 2], &X[i * 2], 1, ctx); -#endif + /* X <-- X \xor V_j */ + blkxor(Y, &V[j * s], s); + } - blockmix(X, Y, r, ctx); - X = Y + s; - blockmix(Y, X, r, ctx); - j = integerify(X, r); - - for (n = 2; n < N; n <<= 1) { - uint32_t m = (n < N / 2) ? n : (N - 1 - n); - for (i = 1; i < m; i += 2) { - Y = X + s; - j &= n - 1; - j += i - 1; - V_j = &V[j * s]; - j = blockmix_xor(X, V_j, Y, r, ctx); - j &= n - 1; - j += i; - V_j = &V[j * s]; - X = Y + s; - j = blockmix_xor(Y, V_j, X, r, ctx); + /* 4: X <-- H(X) */ + blockmix(Y, X, Z, r); } } - n >>= 1; - - j &= n - 1; - j += N - 2 - n; - V_j = &V[j * s]; - Y = X + s; - j = blockmix_xor(X, V_j, Y, r, ctx); - j &= n - 1; - j += N - 1 - n; - V_j = &V[j * s]; - blockmix_xor(Y, V_j, XY, r, ctx); + /* B' <-- X */ for (i = 0; i < 2 * r; i++) { - const salsa20_blk_t *src = &XY[i]; - salsa20_blk_t *tmp = &XY[s]; - salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 64]; - size_t k; + const salsa20_blk_t *src = (const salsa20_blk_t *)&X[i * 8]; + salsa20_blk_t *tmp = (salsa20_blk_t *)Y; + salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 8]; for (k = 0; k < 16; k++) le32enc(&tmp->w[k], src->w[k]); salsa20_simd_unshuffle(tmp, dst); @@ -912,57 +501,107 @@ static void smix1(uint8_t *B, size_t r, uint32_t N, } /** - * smix2(B, r, N, Nloop, V, XY, S): + * smix2(B, r, N, Nloop, flags, V, NROM, shared, XY, S): * Compute second loop of B = SMix_r(B, N). The input B must be 128r bytes in * length; the temporary storage V must be 128rN bytes in length; the temporary - * storage XY must be 256r bytes in length. N must be a power of 2 and at - * least 2. Nloop must be even. The array V must be aligned to a multiple of - * 64 bytes, and arrays B and XY to a multiple of at least 16 bytes. + * storage XY must be 256r + 64 bytes in length. The value N must be a + * power of 2 greater than 1. The value Nloop must be even. */ -static void smix2(uint8_t *B, size_t r, uint32_t N, uint32_t Nloop, - salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) +static void +smix2(uint64_t * B, size_t r, uint64_t N, uint64_t Nloop, + yescrypt_flags_t flags, + uint64_t * V, uint64_t NROM, const yescrypt_shared_t * shared, + uint64_t * XY, uint64_t * S) { - size_t s = 2 * r; - salsa20_blk_t *X = XY, *Y = &XY[s]; - uint32_t i, j; + void (*blockmix)(const uint64_t *, uint64_t *, uint64_t *, size_t) = + (S ? blockmix_pwxform : blockmix_salsa8); + const uint64_t * VROM = shared->shared1.aligned; + uint32_t VROM_mask = shared->mask1 | 1; + size_t s = 16 * r; + yescrypt_flags_t rw = flags & YESCRYPT_RW; + uint64_t * X = XY; + uint64_t * Y = &XY[s]; + uint64_t * Z = S ? S : &XY[2 * s]; + uint64_t i, j; + size_t k; + + if (Nloop == 0) + return; + /* X <-- B' */ for (i = 0; i < 2 * r; i++) { - const salsa20_blk_t *src = (salsa20_blk_t *)&B[i * 64]; - salsa20_blk_t *tmp = Y; - salsa20_blk_t *dst = &X[i]; - size_t k; + const salsa20_blk_t *src = (const salsa20_blk_t *)&B[i * 8]; + salsa20_blk_t *tmp = (salsa20_blk_t *)Y; + salsa20_blk_t *dst = (salsa20_blk_t *)&X[i * 8]; for (k = 0; k < 16; k++) tmp->w[k] = le32dec(&src->w[k]); salsa20_simd_shuffle(tmp, dst); } - j = integerify(X, r) & (N - 1); - -#if _YESPOWER_OPT_C_PASS_ == 1 - if (Nloop > 2) { -#endif - do { - salsa20_blk_t *V_j = &V[j * s]; - j = blockmix_xor_save(X, V_j, r, ctx) & (N - 1); - V_j = &V[j * s]; - j = blockmix_xor_save(X, V_j, r, ctx) & (N - 1); - } while (Nloop -= 2); -#if _YESPOWER_OPT_C_PASS_ == 1 + if (NROM) { + /* 6: for i = 0 to N - 1 do */ + for (i = 0; i < Nloop; i += 2) { + /* 7: j <-- Integerify(X) mod N */ + j = integerify(X, r) & (N - 1); + + /* 8: X <-- H(X \xor V_j) */ + blkxor(X, &V[j * s], s); + /* V_j <-- Xprev \xor V_j */ + if (rw) + blkcpy(&V[j * s], X, s); + blockmix(X, Y, Z, r); + + j = integerify(Y, r); + if (((i + 1) & VROM_mask) == 1) { + /* j <-- Integerify(X) mod NROM */ + j &= NROM - 1; + + /* X <-- H(X \xor VROM_j) */ + blkxor(Y, &VROM[j * s], s); + } else { + /* 7: j <-- Integerify(X) mod N */ + j &= N - 1; + + /* 8: X <-- H(X \xor V_j) */ + blkxor(Y, &V[j * s], s); + /* V_j <-- Xprev \xor V_j */ + if (rw) + blkcpy(&V[j * s], Y, s); + } + + blockmix(Y, X, Z, r); + } } else { + /* 6: for i = 0 to N - 1 do */ + i = Nloop / 2; do { - const salsa20_blk_t * V_j = &V[j * s]; - j = blockmix_xor(X, V_j, Y, r, ctx) & (N - 1); - V_j = &V[j * s]; - j = blockmix_xor(Y, V_j, X, r, ctx) & (N - 1); - } while (Nloop -= 2); + /* 7: j <-- Integerify(X) mod N */ + j = integerify(X, r) & (N - 1); + + /* 8: X <-- H(X \xor V_j) */ + blkxor(X, &V[j * s], s); + /* V_j <-- Xprev \xor V_j */ + if (rw) + blkcpy(&V[j * s], X, s); + blockmix(X, Y, Z, r); + + /* 7: j <-- Integerify(X) mod N */ + j = integerify(Y, r) & (N - 1); + + /* 8: X <-- H(X \xor V_j) */ + blkxor(Y, &V[j * s], s); + /* V_j <-- Xprev \xor V_j */ + if (rw) + blkcpy(&V[j * s], Y, s); + blockmix(Y, X, Z, r); + } while (--i); } -#endif + /* 10: B' <-- X */ for (i = 0; i < 2 * r; i++) { - const salsa20_blk_t *src = &X[i]; - salsa20_blk_t *tmp = Y; - salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 64]; - size_t k; + const salsa20_blk_t *src = (const salsa20_blk_t *)&X[i * 8]; + salsa20_blk_t *tmp = (salsa20_blk_t *)Y; + salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 8]; for (k = 0; k < 16; k++) le32enc(&tmp->w[k], src->w[k]); salsa20_simd_unshuffle(tmp, dst); @@ -970,178 +609,365 @@ static void smix2(uint8_t *B, size_t r, uint32_t N, uint32_t Nloop, } /** - * smix(B, r, N, V, XY, S): + * p2floor(x): + * Largest power of 2 not greater than argument. + */ +static uint64_t +p2floor(uint64_t x) +{ + uint64_t y; + while ((y = x & (x - 1))) + x = y; + return x; +} + +/** + * smix(B, r, N, p, t, flags, V, NROM, shared, XY, S): * Compute B = SMix_r(B, N). The input B must be 128rp bytes in length; the * temporary storage V must be 128rN bytes in length; the temporary storage - * XY must be 256r bytes in length. N must be a power of 2 and at least 16. - * The array V must be aligned to a multiple of 64 bytes, and arrays B and XY - * to a multiple of at least 16 bytes (aligning them to 64 bytes as well saves - * cache lines, but it might also result in cache bank conflicts). + * XY must be 256r+64 or (256r+64)*p bytes in length (the larger size is + * required with OpenMP-enabled builds). The value N must be a power of 2 + * greater than 1. */ -static void smix(uint8_t *B, size_t r, uint32_t N, - salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) +static void +smix(uint64_t * B, size_t r, uint64_t N, uint32_t p, uint32_t t, + yescrypt_flags_t flags, + uint64_t * V, uint64_t NROM, const yescrypt_shared_t * shared, + uint64_t * XY, uint64_t * S) { -#if _YESPOWER_OPT_C_PASS_ == 1 - uint32_t Nloop_all = (N + 2) / 3; /* 1/3, round up */ - uint32_t Nloop_rw = Nloop_all; + size_t s = 16 * r; + uint64_t Nchunk = N / p, Nloop_all, Nloop_rw; + uint32_t i; + + Nloop_all = Nchunk; + if (flags & YESCRYPT_RW) { + if (t <= 1) { + if (t) + Nloop_all *= 2; /* 2/3 */ + Nloop_all = (Nloop_all + 2) / 3; /* 1/3, round up */ + } else { + Nloop_all *= t - 1; + } + } else if (t) { + if (t == 1) + Nloop_all += (Nloop_all + 1) / 2; /* 1.5, round up */ + Nloop_all *= t; + } + + Nloop_rw = 0; + if (flags & __YESCRYPT_INIT_SHARED) + Nloop_rw = Nloop_all; + else if (flags & YESCRYPT_RW) + Nloop_rw = Nloop_all / p; - Nloop_all++; Nloop_all &= ~(uint32_t)1; /* round up to even */ - Nloop_rw &= ~(uint32_t)1; /* round down to even */ + Nchunk &= ~(uint64_t)1; /* round down to even */ + Nloop_all++; Nloop_all &= ~(uint64_t)1; /* round up to even */ + Nloop_rw &= ~(uint64_t)1; /* round down to even */ + +#ifdef _OPENMP +#pragma omp parallel if (p > 1) default(none) private(i) shared(B, r, N, p, flags, V, NROM, shared, XY, S, s, Nchunk, Nloop_all, Nloop_rw) + { +#pragma omp for +#endif + for (i = 0; i < p; i++) { + uint64_t Vchunk = i * Nchunk; + uint64_t * Bp = &B[i * s]; + uint64_t * Vp = &V[Vchunk * s]; +#ifdef _OPENMP + uint64_t * XYp = &XY[i * (2 * s + 8)]; #else - uint32_t Nloop_rw = (N + 2) / 3; /* 1/3, round up */ - Nloop_rw++; Nloop_rw &= ~(uint32_t)1; /* round up to even */ -#endif + uint64_t * XYp = XY; +#endif + uint64_t Np = (i < p - 1) ? Nchunk : (N - Vchunk); + uint64_t * Sp = S ? &S[i * S_SIZE_ALL] : S; + if (Sp) + smix1(Bp, 1, S_SIZE_ALL / 16, + flags & ~YESCRYPT_PWXFORM, + Sp, NROM, shared, XYp, NULL); + if (!(flags & __YESCRYPT_INIT_SHARED_2)) + smix1(Bp, r, Np, flags, Vp, NROM, shared, XYp, Sp); + smix2(Bp, r, p2floor(Np), Nloop_rw, flags, Vp, + NROM, shared, XYp, Sp); + } - smix1(B, 1, ctx->Sbytes / 128, (salsa20_blk_t *)ctx->S0, XY, NULL); - smix1(B, r, N, V, XY, ctx); - smix2(B, r, N, Nloop_rw /* must be > 2 */, V, XY, ctx); -#if _YESPOWER_OPT_C_PASS_ == 1 - if (Nloop_all > Nloop_rw) - smix2(B, r, N, 2, V, XY, ctx); + if (Nloop_all > Nloop_rw) { +#ifdef _OPENMP +#pragma omp for +#endif + for (i = 0; i < p; i++) { + uint64_t * Bp = &B[i * s]; +#ifdef _OPENMP + uint64_t * XYp = &XY[i * (2 * s + 8)]; +#else + uint64_t * XYp = XY; +#endif + uint64_t * Sp = S ? &S[i * S_SIZE_ALL] : S; + smix2(Bp, r, N, Nloop_all - Nloop_rw, + flags & ~YESCRYPT_RW, V, NROM, shared, XYp, Sp); + } + } +#ifdef _OPENMP + } #endif } -#if _YESPOWER_OPT_C_PASS_ == 1 -#undef _YESPOWER_OPT_C_PASS_ -#define _YESPOWER_OPT_C_PASS_ 2 -#define blockmix_salsa blockmix_salsa_1_0 -#define blockmix_salsa_xor blockmix_salsa_xor_1_0 -#define blockmix blockmix_1_0 -#define blockmix_xor blockmix_xor_1_0 -#define blockmix_xor_save blockmix_xor_save_1_0 -#define smix1 smix1_1_0 -#define smix2 smix2_1_0 -#define smix smix_1_0 -#include "yespower-opt.c" -#undef smix - /** - * yespower(local, src, srclen, params, dst): - * Compute yespower(src[0 .. srclen - 1], N, r), to be checked for "< target". - * local is the thread-local data structure, allowing to preserve and reuse a - * memory allocation across calls, thereby reducing its overhead. + * yescrypt_kdf(shared, local, passwd, passwdlen, salt, saltlen, + * N, r, p, t, flags, buf, buflen): + * Compute scrypt(passwd[0 .. passwdlen - 1], salt[0 .. saltlen - 1], N, r, + * p, buflen), or a revision of scrypt as requested by flags and shared, and + * write the result into buf. The parameters r, p, and buflen must satisfy + * r * p < 2^30 and buflen <= (2^32 - 1) * 32. The parameter N must be a power + * of 2 greater than 1. + * + * t controls computation time while not affecting peak memory usage. shared + * and flags may request special modes as described in yescrypt.h. local is + * the thread-local data structure, allowing to preserve and reuse a memory + * allocation across calls, thereby reducing its overhead. * * Return 0 on success; or -1 on error. */ -int yespower(yespower_local_t *local, - const uint8_t *src, size_t srclen, - const yespower_params_t *params, - yespower_binary_t *dst) +int +yescrypt_kdf(const yescrypt_shared_t * shared, yescrypt_local_t * local, + const uint8_t * passwd, size_t passwdlen, + const uint8_t * salt, size_t saltlen, + uint64_t N, uint32_t r, uint32_t p, uint32_t t, yescrypt_flags_t flags, + uint8_t * buf, size_t buflen) { - yespower_version_t version = params->version; - uint32_t N = params->N; - uint32_t r = params->r; - const uint8_t *pers = params->pers; - size_t perslen = params->perslen; - uint32_t Swidth; + yescrypt_region_t tmp; + uint64_t NROM; size_t B_size, V_size, XY_size, need; - uint8_t *B, *S; - salsa20_blk_t *V, *XY; - pwxform_ctx_t ctx; - uint8_t sha256[32]; + uint64_t * B, * V, * XY, * S; + uint64_t sha256[4]; + + /* + * YESCRYPT_PARALLEL_SMIX is a no-op at p = 1 for its intended purpose, + * so don't let it have side-effects. Without this adjustment, it'd + * enable the SHA-256 password pre-hashing and output post-hashing, + * because any deviation from classic scrypt implies those. + */ + if (p == 1) + flags &= ~YESCRYPT_PARALLEL_SMIX; /* Sanity-check parameters */ - if ((version != YESPOWER_0_5 && version != YESPOWER_1_0) || - N < 1024 || N > 512 * 1024 || r < 8 || r > 32 || - (N & (N - 1)) != 0 || - (!pers && perslen)) { + if (flags & ~YESCRYPT_KNOWN_FLAGS) { + errno = EINVAL; + return -1; + } +#if SIZE_MAX > UINT32_MAX + if (buflen > (((uint64_t)(1) << 32) - 1) * 32) { + errno = EFBIG; + return -1; + } +#endif + if ((uint64_t)(r) * (uint64_t)(p) >= (1 << 30)) { + errno = EFBIG; + return -1; + } + if (((N & (N - 1)) != 0) || (N <= 1) || (r < 1) || (p < 1)) { + errno = EINVAL; + return -1; + } + if ((flags & YESCRYPT_PARALLEL_SMIX) && (N / p <= 1)) { + errno = EINVAL; + return -1; + } +#if S_MIN_R > 1 + if ((flags & YESCRYPT_PWXFORM) && (r < S_MIN_R)) { errno = EINVAL; return -1; } +#endif + if ((p > SIZE_MAX / ((size_t)256 * r + 64)) || +#if SIZE_MAX / 256 <= UINT32_MAX + (r > SIZE_MAX / 256) || +#endif + (N > SIZE_MAX / 128 / r)) { + errno = ENOMEM; + return -1; + } + if (N > UINT64_MAX / ((uint64_t)t + 1)) { + errno = EFBIG; + return -1; + } +#ifdef _OPENMP + if (!(flags & YESCRYPT_PARALLEL_SMIX) && + (N > SIZE_MAX / 128 / (r * p))) { + errno = ENOMEM; + return -1; + } +#endif + if ((flags & YESCRYPT_PWXFORM) && +#ifndef _OPENMP + (flags & YESCRYPT_PARALLEL_SMIX) && +#endif + p > SIZE_MAX / (S_SIZE_ALL * sizeof(*S))) { + errno = ENOMEM; + return -1; + } + + NROM = 0; + if (shared->shared1.aligned) { + NROM = shared->shared1.aligned_size / ((size_t)128 * r); + if (((NROM & (NROM - 1)) != 0) || (NROM <= 1) || + !(flags & YESCRYPT_RW)) { + errno = EINVAL; + return -1; + } + } /* Allocate memory */ - B_size = (size_t)128 * r; - V_size = B_size * N; - if (version == YESPOWER_0_5) { - XY_size = B_size * 2; - Swidth = Swidth_0_5; - ctx.Sbytes = 2 * Swidth_to_Sbytes1(Swidth); - } else { - XY_size = B_size + 64; - Swidth = Swidth_1_0; - ctx.Sbytes = 3 * Swidth_to_Sbytes1(Swidth); + V = NULL; + V_size = (size_t)128 * r * N; +#ifdef _OPENMP + if (!(flags & YESCRYPT_PARALLEL_SMIX)) + V_size *= p; +#endif + need = V_size; + if (flags & __YESCRYPT_INIT_SHARED) { + if (local->aligned_size < need) { + if (local->base || local->aligned || + local->base_size || local->aligned_size) { + errno = EINVAL; + return -1; + } + if (!alloc_region(local, need)) + return -1; + } + V = (uint64_t *)local->aligned; + need = 0; } - need = B_size + V_size + XY_size + ctx.Sbytes; - if (local->aligned_size < need) { - if (free_region(local)) - return -1; - if (!alloc_region(local, need)) - return -1; + B_size = (size_t)128 * r * p; + need += B_size; + if (need < B_size) { + errno = ENOMEM; + return -1; + } + XY_size = (size_t)256 * r + 64; +#ifdef _OPENMP + XY_size *= p; +#endif + need += XY_size; + if (need < XY_size) { + errno = ENOMEM; + return -1; } - B = (uint8_t *)local->aligned; - V = (salsa20_blk_t *)((uint8_t *)B + B_size); - XY = (salsa20_blk_t *)((uint8_t *)V + V_size); - S = (uint8_t *)XY + XY_size; - ctx.S0 = S; - ctx.S1 = S + Swidth_to_Sbytes1(Swidth); - - SHA256_Buf(src, srclen, sha256); - - if (version == YESPOWER_0_5) { - YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), src, srclen, 1, - B, B_size); - memcpy(sha256, B, sizeof(sha256)); - smix(B, r, N, V, XY, &ctx); - YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), B, B_size, 1, - (uint8_t *)dst, sizeof(*dst)); - - if (pers) { - HMAC_SHA256_Buf(dst, sizeof(*dst), pers, perslen, - sha256); - SHA256_Buf(sha256, sizeof(sha256), (uint8_t *)dst); + if (flags & YESCRYPT_PWXFORM) { + size_t S_size = S_SIZE_ALL * sizeof(*S); +#ifdef _OPENMP + S_size *= p; +#else + if (flags & YESCRYPT_PARALLEL_SMIX) + S_size *= p; +#endif + need += S_size; + if (need < S_size) { + errno = ENOMEM; + return -1; } + } + if (flags & __YESCRYPT_INIT_SHARED) { + if (!alloc_region(&tmp, need)) + return -1; + B = (uint64_t *)tmp.aligned; + XY = (uint64_t *)((uint8_t *)B + B_size); } else { - ctx.S2 = S + 2 * Swidth_to_Sbytes1(Swidth); - ctx.w = 0; - - if (pers) { - src = pers; - srclen = perslen; - } else { - srclen = 0; + init_region(&tmp); + if (local->aligned_size < need) { + if (free_region(local)) + return -1; + if (!alloc_region(local, need)) + return -1; } - - YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), src, srclen, 1, B, 128); - memcpy(sha256, B, sizeof(sha256)); - smix_1_0(B, r, N, V, XY, &ctx); - HMAC_SHA256_Buf(B + B_size - 64, 64, - sha256, sizeof(sha256), (uint8_t *)dst); + B = (uint64_t *)local->aligned; + V = (uint64_t *)((uint8_t *)B + B_size); + XY = (uint64_t *)((uint8_t *)V + V_size); + } + S = NULL; + if (flags & YESCRYPT_PWXFORM) + S = (uint64_t *)((uint8_t *)XY + XY_size); + + if (t || flags) { + SHA256_CTX_Y ctx; + SHA256_Init_Y(&ctx); + SHA256_Update_Y(&ctx, passwd, passwdlen); + SHA256_Final_Y((uint8_t *)sha256, &ctx); + passwd = (uint8_t *)sha256; + passwdlen = sizeof(sha256); } - /* Success! */ - return 0; -} + /* 1: (B_0 ... B_{p-1}) <-- PBKDF2(P, S, 1, p * MFLen) */ + PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, 1, + (uint8_t *)B, B_size); -/** - * yespower_tls(src, srclen, params, dst): - * Compute yespower(src[0 .. srclen - 1], N, r), to be checked for "< target". - * The memory allocation is maintained internally using thread-local storage. - * - * Return 0 on success; or -1 on error. - */ -int yespower_tls(const uint8_t *src, size_t srclen, - const yespower_params_t *params, yespower_binary_t *dst) -{ - static __thread int initialized = 0; - static __thread yespower_local_t local; + if (t || flags) + blkcpy(sha256, B, sizeof(sha256) / sizeof(sha256[0])); - if (!initialized) { - if (yespower_init_local(&local)) - return -1; - initialized = 1; + if (p == 1 || (flags & YESCRYPT_PARALLEL_SMIX)) { + smix(B, r, N, p, t, flags, V, NROM, shared, XY, S); + } else { + uint32_t i; + + /* 2: for i = 0 to p - 1 do */ +#ifdef _OPENMP +#pragma omp parallel for default(none) private(i) shared(B, r, N, p, t, flags, V, NROM, shared, XY, S) +#endif + for (i = 0; i < p; i++) { + /* 3: B_i <-- MF(B_i, N) */ +#ifdef _OPENMP + smix(&B[(size_t)16 * r * i], r, N, 1, t, flags, + &V[(size_t)16 * r * i * N], + NROM, shared, + &XY[((size_t)32 * r + 8) * i], + S ? &S[S_SIZE_ALL * i] : S); +#else + smix(&B[(size_t)16 * r * i], r, N, 1, t, flags, V, + NROM, shared, XY, S); +#endif + } } - return yespower(&local, src, srclen, params, dst); -} + /* 5: DK <-- PBKDF2(P, B, 1, dkLen) */ + PBKDF2_SHA256(passwd, passwdlen, (uint8_t *)B, B_size, 1, buf, buflen); + + /* + * Except when computing classic scrypt, allow all computation so far + * to be performed on the client. The final steps below match those of + * SCRAM (RFC 5802), so that an extension of SCRAM (with the steps so + * far in place of SCRAM's use of PBKDF2 and with SHA-256 in place of + * SCRAM's use of SHA-1) would be usable with yescrypt hashes. + */ + if ((t || flags) && buflen == sizeof(sha256)) { + /* Compute ClientKey */ + { + HMAC_SHA256_CTX_Y ctx; + HMAC_SHA256_Init_Y(&ctx, buf, buflen); + if (r == 32) { // yescryptR32 + HMAC_SHA256_Update_Y(&ctx, "WaviBanana", 10); + } else + if (r == 16) { // yescryptR16 + HMAC_SHA256_Update_Y(&ctx, "Client Key", 10); + } else + if (r == 8) { // yescryptR8 + HMAC_SHA256_Update_Y(&ctx, "Client Key", 10); + } + else { // yescrypt + HMAC_SHA256_Update_Y(&ctx, salt, saltlen); + } + HMAC_SHA256_Final_Y((uint8_t *)sha256, &ctx); + } + /* Compute StoredKey */ + { + SHA256_CTX_Y ctx; + SHA256_Init_Y(&ctx); + SHA256_Update_Y(&ctx, (uint8_t *)sha256, sizeof(sha256)); + SHA256_Final_Y(buf, &ctx); + } + } -int yespower_init_local(yespower_local_t *local) -{ - init_region(local); - return 0; -} + if (free_region(&tmp)) + return -1; -int yespower_free_local(yespower_local_t *local) -{ - return free_region(local); + /* Success! */ + return 0; } -#endif From f391e68c3734cb613d72b754bb390178c2f937c1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:40:58 -0500 Subject: [PATCH 195/576] Update yescrypt.c --- stratum/algos/yescrypt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stratum/algos/yescrypt.c b/stratum/algos/yescrypt.c index 2959dfa4b..42aecf64d 100644 --- a/stratum/algos/yescrypt.c +++ b/stratum/algos/yescrypt.c @@ -355,12 +355,17 @@ void yescrypt_hash(const char *input, char *output, uint32_t len) yescrypt_bsty((uint8_t*)input, len, (uint8_t*)input, len, 2048, 8, 1, (uint8_t*)output, 32); } +void yescryptR8_hash(const char *input, char *output, uint32_t len) +{ + yescrypt_bsty((uint8_t*)input, len, (uint8_t*)input, len, 2048, 8, 1, (uint8_t*)output, 32); +} + void yescryptR16_hash(const char *input, char *output, uint32_t len) { - yescrypt_bsty((uint8_t*)input, len, (uint8_t*)input, len, 4096, 16, 1, (uint8_t*)output, 32); + yescrypt_bsty((uint8_t*)input, len, (uint8_t*)input, len, 4096, 16, 1, (uint8_t*)output, 32); } void yescryptR32_hash(const char *input, char *output, uint32_t len) { - yescrypt_bsty((uint8_t*)input, len, (uint8_t*)input, len, 4096, 32, 1, (uint8_t*)output, 32); + yescrypt_bsty((uint8_t*)input, len, (uint8_t*)input, len, 4096, 32, 1, (uint8_t*)output, 32); } From cbf8b6b0d182ccd6990c661ec48e08ee5553221e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:41:25 -0500 Subject: [PATCH 196/576] Update yescrypt.h --- stratum/algos/yescrypt.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/algos/yescrypt.h b/stratum/algos/yescrypt.h index 8e87c7bee..7fb880d6c 100644 --- a/stratum/algos/yescrypt.h +++ b/stratum/algos/yescrypt.h @@ -39,6 +39,7 @@ extern "C" { #include /* for size_t */ void yescrypt_hash(const char* input, char* output, uint32_t len); +void yescryptR8_hash(const char* input, char* output, uint32_t len); void yescryptR16_hash(const char* input, char* output, uint32_t len); void yescryptR32_hash(const char* input, char* output, uint32_t len); From 5b1ddafdfeee3681fdc678d9320d72e5b3d61e7e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:41:54 -0500 Subject: [PATCH 197/576] Create yescryptR8.conf --- stratum/config.sample/yescryptR8.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/yescryptR8.conf diff --git a/stratum/config.sample/yescryptR8.conf b/stratum/config.sample/yescryptR8.conf new file mode 100644 index 000000000..1eb06f324 --- /dev/null +++ b/stratum/config.sample/yescryptR8.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 6353 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = yescryptR8 +difficulty = 2 +max_ttf = 400000000 From c2ae9d35de230d9a49f801e59cb6cc508dfdcf61 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:43:49 -0500 Subject: [PATCH 198/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 33cd3c6a4..5555fd9b1 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -77,6 +77,7 @@ function yaamp_get_algos() 'vitalium', 'yescrypt', 'yescryptR16', + 'yescryptR8', 'yescryptR32', 'whirlpool', 'zr5', @@ -136,6 +137,7 @@ function yaamp_get_algo_norm($algo) 'whirlpool' => 1.0, 'yescrypt' => 1.0, 'yescryptR16' => 1.0, + 'yescryptR8' => 1.0, 'yescryptR32' => 1.0, 'zr5' => 1.0, ); @@ -221,6 +223,7 @@ function getAlgoColors($algo) 'whirlpool' => '#d0e0e0', 'yescrypt' => '#e0d0e0', 'yescryptR16' => '#e2d0e2', + 'yescryptR8' => '#e0d0e0', 'yescryptR32' => '#e2d0d2', 'zr5' => '#d0b0d0', @@ -306,6 +309,7 @@ function getAlgoPort($algo) 'vitalium' => 3233, 'yescrypt' => 6233, 'yescryptR16' => 6333, + 'yescryptR8' => 6353, 'yescryptR32' => 6343, 'bastion' => 6433, 'hsr' => 7433, From 0acd0a65f9cb505c13229752427d0bccaeb4c870 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:44:38 -0500 Subject: [PATCH 199/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 4d899b309..5fb0e83d5 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -186,6 +186,7 @@ YAAMP_ALGO g_algos[] = {"rainforest", rainforest_hash, 0x100, 0, 0}, {"skein2", skein2_hash, 1, 0, 0}, {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, + {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, {"yespower", yespower_hash, 0x10000, 0, 0 }, From 5b7dc1e0e1d54dfbf6e7476603b98810456d38ab Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:49:00 -0500 Subject: [PATCH 200/576] Create Lyra2-zz.c --- stratum/algos/Lyra2-zz.c | 214 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 stratum/algos/Lyra2-zz.c diff --git a/stratum/algos/Lyra2-zz.c b/stratum/algos/Lyra2-zz.c new file mode 100644 index 000000000..caa5bfe58 --- /dev/null +++ b/stratum/algos/Lyra2-zz.c @@ -0,0 +1,214 @@ +/** + * Implementation of the Lyra2 Password Hashing Scheme (PHS). + * + * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. + * + * This software is hereby placed in the public domain. + * + * 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 +#include +#include +#include + +#include "Lyra2-zz.h" +#include "Sponge.h" + +/** + * Executes Lyra2 based on the G function from Blake2b. This version supports salts and passwords + * whose combined length is smaller than the size of the memory matrix, (i.e., (nRows x nCols x b) bits, + * where "b" is the underlying sponge's bitrate). In this implementation, the "basil" is composed by all + * integer parameters (treated as type "unsigned int") in the order they are provided, plus the value + * of nCols, (i.e., basil = kLen || pwdlen || saltlen || timeCost || nRows || nCols). + * + * @param K The derived key to be output by the algorithm + * @param kLen Desired key length + * @param pwd User password + * @param pwdlen Password length + * @param salt Salt + * @param saltlen Salt length + * @param timeCost Parameter to determine the processing time (T) + * @param nRows Number or rows of the memory matrix (R) + * @param nCols Number of columns of the memory matrix (C) + * + * @return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation) + */ +int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols) { + + //============================= Basic variables ============================// + int64_t row = 2; //index of row to be processed + int64_t prev = 1; //index of prev (last row ever computed/modified) + int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) + int64_t tau; //Time Loop iterator + int64_t step = 1; //Visitation step (used during Setup and Wandering phases) + int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) + int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 + int64_t i; //auxiliary iteration counter + //==========================================================================/ + + //========== Initializing the Memory Matrix and pointers to it =============// + //Tries to allocate enough space for the whole memory matrix + + + const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; + const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; + + i = (int64_t) ((int64_t) nRows * (int64_t) ROW_LEN_BYTES); + uint64_t *wholeMatrix = malloc(i); + if (wholeMatrix == NULL) { + return -1; + } + memset(wholeMatrix, 0, i); + + //Allocates pointers to each row of the matrix + uint64_t **memMatrix = malloc(nRows * sizeof (uint64_t*)); + if (memMatrix == NULL) { + return -1; + } + //Places the pointers in the correct positions + uint64_t *ptrWord = wholeMatrix; + for (i = 0; i < nRows; i++) { + memMatrix[i] = ptrWord; + ptrWord += ROW_LEN_INT64; + } + //==========================================================================/ + + //============= Getting the password + salt + basil padded with 10*1 ===============// + //OBS.:The memory matrix will temporarily hold the password: not for saving memory, + //but this ensures that the password copied locally will be overwritten as soon as possible + + //First, we clean enough blocks for the password, salt, basil and padding + uint64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof (uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; + byte *ptrByte = (byte*) wholeMatrix; + memset(ptrByte, 0, nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES); + + //Prepends the password + memcpy(ptrByte, pwd, pwdlen); + ptrByte += pwdlen; + + //Concatenates the salt + memcpy(ptrByte, salt, saltlen); + ptrByte += saltlen; + + //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface + memcpy(ptrByte, &kLen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &pwdlen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &saltlen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &timeCost, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &nRows, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &nCols, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + + //Now comes the padding + *ptrByte = 0x80; //first byte of padding: right after the password + ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix + ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block + *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block + //==========================================================================/ + + //======================= Initializing the Sponge State ====================// + //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) + uint64_t *state = malloc(16 * sizeof (uint64_t)); + if (state == NULL) { + return -1; + } + initState(state); + //==========================================================================/ + + //================================ Setup Phase =============================// + //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits + ptrWord = wholeMatrix; + for (i = 0; i < nBlocksInput; i++) { + absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) + ptrWord += BLOCK_LEN_BLAKE2_SAFE_INT64; //goes to next block of pad(pwd || salt || basil) + } + + //Initializes M[0] and M[1] + reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here + reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); + + do { + //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) + reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + + //updates the value of row* (deterministically picked during Setup)) + rowa = (rowa + step) & (window - 1); + //update prev: it now points to the last row ever computed + prev = row; + //updates row: goes to the next row to be computed + row++; + + //Checks if all rows in the window where visited. + if (rowa == 0) { + step = window + gap; //changes the step: approximately doubles its value + window *= 2; //doubles the size of the re-visitation window + gap = -gap; //inverts the modifier to the step + } + + } while (row < nRows); + //==========================================================================/ + + //============================ Wandering Phase =============================// + row = 0; //Resets the visitation to the first row of the memory matrix + for (tau = 1; tau <= timeCost; tau++) { + //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 + step = (tau % 2 == 0) ? -1 : nRows / 2 - 1; + do { + //Selects a pseudorandom index row* + //------------------------------------------------------------------------------------------ + //rowa = ((unsigned int)state[0]) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + rowa = ((uint64_t) (state[0])) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] + reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //update prev: it now points to the last row ever computed + prev = row; + + //updates row: goes to the next row to be computed + //------------------------------------------------------------------------------------------ + //row = (row + step) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + } while (row != 0); + } + //==========================================================================/ + + //============================ Wrap-up Phase ===============================// + //Absorbs the last block of the memory matrix + absorbBlock(state, memMatrix[rowa]); + + //Squeezes the key + squeeze(state, K, kLen); + //==========================================================================/ + + //========================= Freeing the memory =============================// + free(memMatrix); + free(wholeMatrix); + + //Wiping out the sponge's internal state before freeing it + memset(state, 0, 16 * sizeof (uint64_t)); + free(state); + //==========================================================================/ + + return 0; +} From a30e179d05173b8d5354d75166cb632da7d519e6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:49:23 -0500 Subject: [PATCH 201/576] Create Lyra2-zz.h --- stratum/algos/Lyra2-zz.h | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 stratum/algos/Lyra2-zz.h diff --git a/stratum/algos/Lyra2-zz.h b/stratum/algos/Lyra2-zz.h new file mode 100644 index 000000000..d6d79e96a --- /dev/null +++ b/stratum/algos/Lyra2-zz.h @@ -0,0 +1,55 @@ +/** + * Header file for the Lyra2 Password Hashing Scheme (PHS). + * + * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. + * + * This software is hereby placed in the public domain. + * + * 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. + */ +#ifndef LYRA2ZZ_H_ +#define LYRA2ZZ_H_ + +#include + +typedef unsigned char byte; + +//Block length required so Blake2's Initialization Vector (IV) is not overwritten (THIS SHOULD NOT BE MODIFIED) +#define BLOCK_LEN_BLAKE2_SAFE_INT64 12 //768 bits (=96 bytes, =12 uint64_t) +#define BLOCK_LEN_BLAKE2_SAFE_BYTES (BLOCK_LEN_BLAKE2_SAFE_INT64 * 8) //same as above, in bytes + +#define LYRA2ZZ_BLOCK_HEADER_LEN_BYTES 112 +#define LYRA2ZZ_BLOCK_HEADER_NONCE_OFFSET 19 /* 19 * 4 bytes */ + +#define LYRA2ZZ_BLOCK_HEADER_UINT32_LEN 32 + +#ifdef BLOCK_LEN_BITS + #define BLOCK_LEN_INT64 (BLOCK_LEN_BITS/64) //Block length: 1024 bits (=128 bytes, =16 uint64_t) + #define BLOCK_LEN_BYTES (BLOCK_LEN_BITS/8) //Block length, in bytes +#else //default block length: 1024 bits + #define BLOCK_LEN_INT64 16 //Block length: 1024 bits (=128 bytes, =16 uint64_t) + #define BLOCK_LEN_BYTES (BLOCK_LEN_INT64 * 8) //Block length, in bytes +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols); + +#ifdef __cplusplus +} + +#endif + +#endif /* LYRA2_H_ */ From 8436e28fddcd5e52576352d0d77fdf994a7154e0 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:49:48 -0500 Subject: [PATCH 202/576] Create lyra2zz.c --- stratum/algos/lyra2zz.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 stratum/algos/lyra2zz.c diff --git a/stratum/algos/lyra2zz.c b/stratum/algos/lyra2zz.c new file mode 100644 index 000000000..cc9b7a9df --- /dev/null +++ b/stratum/algos/lyra2zz.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include + +#include "lyra2zz.h" + +#include + +#define _ALIGN(x) __attribute__ ((aligned(x))) + +extern uint64_t lyra2z_height; + +void lyra2zz_hash(const char* input, char* output, uint32_t len) +{ + sph_blake256_context ctx_blake; + + uint32_t hashA[8], hashB[8]; + + sph_blake256_init(&ctx_blake); + sph_blake256 (&ctx_blake, input, 112); + sph_blake256_close (&ctx_blake, hashA); + + LYRA2ZZ(hashB, 32, hashA, 32, hashA, 32, 8, 8, 8); + + memcpy(output, hashB, 32); +} From 8db623a93d54d73fb22d9da120dd3ef28f60751f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:50:05 -0500 Subject: [PATCH 203/576] Create lyra2zz.h --- stratum/algos/lyra2zz.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/lyra2zz.h diff --git a/stratum/algos/lyra2zz.h b/stratum/algos/lyra2zz.h new file mode 100644 index 000000000..ad524ec5e --- /dev/null +++ b/stratum/algos/lyra2zz.h @@ -0,0 +1,16 @@ +#ifndef LYRA2ZZ_H +#define LYRA2ZZ_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void lyra2zz_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From c6cdfc04f077c459d3380f502b90d8961776a2df Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:50:53 -0500 Subject: [PATCH 204/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index dd9456bd0..24fc5275b 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,7 +8,7 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2vc0ban.c Sponge.c allium.c \ +SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c sm3.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ From b94296bbe895a0541be1a101034e7f5bf8e00f4d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:51:12 -0500 Subject: [PATCH 205/576] Create lyra2zz.conf --- stratum/config.sample/lyra2zz.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/lyra2zz.conf diff --git a/stratum/config.sample/lyra2zz.conf b/stratum/config.sample/lyra2zz.conf new file mode 100644 index 000000000..67d0c34ce --- /dev/null +++ b/stratum/config.sample/lyra2zz.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 4556 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = lyra2zz +difficulty = 1 +max_ttf = 40000 From 32b1c6469cb21aa6bccc2f6629f1e65b0b6c06c8 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:52:20 -0500 Subject: [PATCH 206/576] Update db.cpp --- stratum/db.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/db.cpp b/stratum/db.cpp index 295947754..4ba7b75f1 100644 --- a/stratum/db.cpp +++ b/stratum/db.cpp @@ -327,6 +327,7 @@ void db_update_coinds(YAAMP_DB *db) if (strcmp(coind->symbol, "FLAX") == 0) coind->oldmasternodes = true; if (strcmp(coind->symbol, "ITZ") == 0) coind->oldmasternodes = true; if (strcmp(coind->symbol, "J") == 0 || strcmp(coind->symbol2, "J") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "LAX") == 0) coind->oldmasternodes = true; if (strcmp(coind->symbol, "MAG") == 0) coind->oldmasternodes = true; if (strcmp(coind->symbol, "PBS") == 0) coind->oldmasternodes = true; if (strcmp(coind->symbol, "URALS") == 0) coind->oldmasternodes = true; From 19b6113daacf57d1a2bb9d0b52cf30ebf267a89e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:52:55 -0500 Subject: [PATCH 207/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 5fb0e83d5..22b6b18b3 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -147,6 +147,7 @@ YAAMP_ALGO g_algos[] = {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, {"lyra2z", lyra2z_hash, 0x100, 0, 0}, + {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, {"bastion", bastion_hash, 1, 0 }, {"blake", blake_hash, 1, 0 }, From 46ed66f48630105619619112a4a8dcbee812c56c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:53:21 -0500 Subject: [PATCH 208/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 213c25384..2ade59a11 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -175,6 +175,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/lyra2z.h" #include "algos/lyra2vc0ban.h" #include "algos/lyra2v3.h" +#include "algos/lyra2zz.h" #include "algos/blake.h" #include "algos/blakecoin.h" #include "algos/blake2b.h" From 493aa6e1a36e1e7aec1582f9f5406373ca9943f7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:54:07 -0500 Subject: [PATCH 209/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 5555fd9b1..f5eb22d6a 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -36,6 +36,7 @@ function yaamp_get_algos() 'lyra2z', 'lyra2vc0ban', 'lyra2v3', + 'lyra2zz', 'neoscrypt', 'nist5', 'penta', @@ -205,6 +206,7 @@ function getAlgoColors($algo) 'lyra2v2' => '#80c0f0', 'lyra2z' => '#80b0f0', 'lyra2vc0ban' => '#80c0f0', + 'lyra2zz' => '#80b0f0', 'lyra2v3' => '#80a0f0', 'phi' => '#a0a0e0', 'phi2' => '#a0a0e0', @@ -280,6 +282,7 @@ function getAlgoPort($algo) 'lyra2z' => 4553, 'lyra2vc0ban' => 4563, 'lyra2v3' => 4433, + 'lyra2zz' => 4556, 'jha' => 4633, 'qubit' => 4733, 'zr5' => 4833, From 1b2410ce432bd38e5b8aeb8aaf345084cbb5e86f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 22:58:38 -0500 Subject: [PATCH 210/576] Update yescrypt-opt.c --- stratum/algos/yescrypt-opt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stratum/algos/yescrypt-opt.c b/stratum/algos/yescrypt-opt.c index c96190bab..c81e7a237 100644 --- a/stratum/algos/yescrypt-opt.c +++ b/stratum/algos/yescrypt-opt.c @@ -947,6 +947,9 @@ yescrypt_kdf(const yescrypt_shared_t * shared, yescrypt_local_t * local, } else if (r == 16) { // yescryptR16 HMAC_SHA256_Update_Y(&ctx, "Client Key", 10); + } else + if (r == 8) { // yescryptR8 + HMAC_SHA256_Update_Y(&ctx, "Client Key", 10); } else { // yescrypt HMAC_SHA256_Update_Y(&ctx, salt, saltlen); From f763ab6438f233a120573f3b69604e1e6137dead Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:01:52 -0500 Subject: [PATCH 211/576] Update yespower-opt.c --- stratum/algos/yespower-opt.c | 1632 +++++++++++++++++++--------------- 1 file changed, 903 insertions(+), 729 deletions(-) diff --git a/stratum/algos/yespower-opt.c b/stratum/algos/yespower-opt.c index c81e7a237..265481eae 100644 --- a/stratum/algos/yespower-opt.c +++ b/stratum/algos/yespower-opt.c @@ -1,6 +1,6 @@ /*- * Copyright 2009 Colin Percival - * Copyright 2013,2014 Alexander Peslyak + * Copyright 2012-2018 Alexander Peslyak * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,62 +26,112 @@ * * This file was originally written by Colin Percival as part of the Tarsnap * online backup system. + * + * This is a proof-of-work focused fork of yescrypt, including optimized and + * cut-down implementation of the obsolete yescrypt 0.5 (based off its first + * submission to PHC back in 2014) and a new proof-of-work specific variation + * known as yespower 1.0. The former is intended as an upgrade for + * cryptocurrencies that already use yescrypt 0.5 and the latter may be used + * as a further upgrade (hard fork) by those and other cryptocurrencies. The + * version of algorithm to use is requested through parameters, allowing for + * both algorithms to co-exist in client and miner implementations (such as in + * preparation for a hard-fork). + */ + +#ifndef _YESPOWER_OPT_C_PASS_ +#define _YESPOWER_OPT_C_PASS_ 1 +#endif + +#if _YESPOWER_OPT_C_PASS_ == 1 +/* + * AVX and especially XOP speed up Salsa20 a lot, but needlessly result in + * extra instruction prefixes for pwxform (which we make more use of). While + * no slowdown from the prefixes is generally observed on AMD CPUs supporting + * XOP, some slowdown is sometimes observed on Intel CPUs with AVX. + */ +#ifdef __XOP__ +#warning "Note: XOP is enabled. That's great." +#elif defined(__AVX__) +#warning "Note: AVX is enabled. That's OK." +#elif defined(__SSE2__) +#warning "Note: AVX and XOP are not enabled. That's OK." +#elif defined(__x86_64__) || defined(__i386__) +#warning "SSE2 not enabled. Expect poor performance." +#else +#warning "Note: building generic code for non-x86. That's OK." +#endif + +/* + * The SSE4 code version has fewer instructions than the generic SSE2 version, + * but all of the instructions are SIMD, thereby wasting the scalar execution + * units. Thus, the generic SSE2 version below actually runs faster on some + * CPUs due to its balanced mix of SIMD and scalar instructions. */ +#undef USE_SSE4_FOR_32BIT + +#ifdef __SSE2__ +/* + * GCC before 4.9 would by default unnecessarily use store/load (without + * SSE4.1) or (V)PEXTR (with SSE4.1 or AVX) instead of simply (V)MOV. + * This was tracked as GCC bug 54349. + * "-mtune=corei7" works around this, but is only supported for GCC 4.6+. + * We use inline asm for pre-4.6 GCC, further down this file. + */ +#if __GNUC__ == 4 && __GNUC_MINOR__ >= 6 && __GNUC_MINOR__ < 9 && \ + !defined(__clang__) && !defined(__ICC) +#pragma GCC target ("tune=corei7") +#endif +#include +#ifdef __XOP__ +#include +#endif +#elif defined(__SSE__) +#include +#endif #include #include #include +#include -#include "sha256_Y.h" -#include "sysendian.h" +#include "insecure_memzero.h" +#include "sha256-P.h" +#include "sysendian_yp.h" -#include "yescrypt-platform.c" +#include "yespower.h" -static inline uint32_t -le32dec(const void *pp) -{ - const uint8_t *p = (uint8_t const *)pp; +#include "yespower-platform.c" - return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) + - ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24)); -} - -static inline void -le32enc(void *pp, uint32_t x) -{ - uint8_t * p = (uint8_t *)pp; - - p[0] = x & 0xff; - p[1] = (x >> 8) & 0xff; - p[2] = (x >> 16) & 0xff; - p[3] = (x >> 24) & 0xff; -} +#if __STDC_VERSION__ >= 199901L +/* Have restrict */ +#elif defined(__GNUC__) +#define restrict __restrict +#else +#define restrict +#endif -static inline void -blkcpy(uint64_t * dest, const uint64_t * src, size_t count) -{ - do { - *dest++ = *src++; *dest++ = *src++; - *dest++ = *src++; *dest++ = *src++; - } while (count -= 4); -} +#ifdef __GNUC__ +#define unlikely(exp) __builtin_expect(exp, 0) +#else +#define unlikely(exp) (exp) +#endif -static inline void -blkxor(uint64_t * dest, const uint64_t * src, size_t count) -{ - do { - *dest++ ^= *src++; *dest++ ^= *src++; - *dest++ ^= *src++; *dest++ ^= *src++; - } while (count -= 4); -} +#ifdef __SSE__ +#define PREFETCH(x, hint) _mm_prefetch((const char *)(x), (hint)); +#else +#undef PREFETCH +#endif typedef union { uint32_t w[16]; uint64_t d[8]; +#ifdef __SSE2__ + __m128i q[4]; +#endif } salsa20_blk_t; -static inline void -salsa20_simd_shuffle(const salsa20_blk_t * Bin, salsa20_blk_t * Bout) +static inline void salsa20_simd_shuffle(const salsa20_blk_t *Bin, + salsa20_blk_t *Bout) { #define COMBINE(out, in1, in2) \ Bout->d[out] = Bin->w[in1 * 2] | ((uint64_t)Bin->w[in2 * 2 + 1] << 32); @@ -96,37 +146,148 @@ salsa20_simd_shuffle(const salsa20_blk_t * Bin, salsa20_blk_t * Bout) #undef COMBINE } -static inline void -salsa20_simd_unshuffle(const salsa20_blk_t * Bin, salsa20_blk_t * Bout) +static inline void salsa20_simd_unshuffle(const salsa20_blk_t *Bin, + salsa20_blk_t *Bout) { -#define COMBINE(out, in1, in2) \ +#define UNCOMBINE(out, in1, in2) \ Bout->w[out * 2] = Bin->d[in1]; \ Bout->w[out * 2 + 1] = Bin->d[in2] >> 32; - COMBINE(0, 0, 6) - COMBINE(1, 5, 3) - COMBINE(2, 2, 0) - COMBINE(3, 7, 5) - COMBINE(4, 4, 2) - COMBINE(5, 1, 7) - COMBINE(6, 6, 4) - COMBINE(7, 3, 1) -#undef COMBINE + UNCOMBINE(0, 0, 6) + UNCOMBINE(1, 5, 3) + UNCOMBINE(2, 2, 0) + UNCOMBINE(3, 7, 5) + UNCOMBINE(4, 4, 2) + UNCOMBINE(5, 1, 7) + UNCOMBINE(6, 6, 4) + UNCOMBINE(7, 3, 1) +#undef UNCOMBINE +} + +#ifdef __SSE2__ +#define DECL_X \ + __m128i X0, X1, X2, X3; +#define DECL_Y \ + __m128i Y0, Y1, Y2, Y3; +#define READ_X(in) \ + X0 = (in).q[0]; X1 = (in).q[1]; X2 = (in).q[2]; X3 = (in).q[3]; +#define WRITE_X(out) \ + (out).q[0] = X0; (out).q[1] = X1; (out).q[2] = X2; (out).q[3] = X3; + +#ifdef __XOP__ +#define ARX(out, in1, in2, s) \ + out = _mm_xor_si128(out, _mm_roti_epi32(_mm_add_epi32(in1, in2), s)); +#else +#define ARX(out, in1, in2, s) { \ + __m128i tmp = _mm_add_epi32(in1, in2); \ + out = _mm_xor_si128(out, _mm_slli_epi32(tmp, s)); \ + out = _mm_xor_si128(out, _mm_srli_epi32(tmp, 32 - s)); \ +} +#endif + +#define SALSA20_2ROUNDS \ + /* Operate on "columns" */ \ + ARX(X1, X0, X3, 7) \ + ARX(X2, X1, X0, 9) \ + ARX(X3, X2, X1, 13) \ + ARX(X0, X3, X2, 18) \ + /* Rearrange data */ \ + X1 = _mm_shuffle_epi32(X1, 0x93); \ + X2 = _mm_shuffle_epi32(X2, 0x4E); \ + X3 = _mm_shuffle_epi32(X3, 0x39); \ + /* Operate on "rows" */ \ + ARX(X3, X0, X1, 7) \ + ARX(X2, X3, X0, 9) \ + ARX(X1, X2, X3, 13) \ + ARX(X0, X1, X2, 18) \ + /* Rearrange data */ \ + X1 = _mm_shuffle_epi32(X1, 0x39); \ + X2 = _mm_shuffle_epi32(X2, 0x4E); \ + X3 = _mm_shuffle_epi32(X3, 0x93); + +/** + * Apply the Salsa20 core to the block provided in (X0 ... X3). + */ +#define SALSA20_wrapper(out, rounds) { \ + __m128i Z0 = X0, Z1 = X1, Z2 = X2, Z3 = X3; \ + rounds \ + (out).q[0] = X0 = _mm_add_epi32(X0, Z0); \ + (out).q[1] = X1 = _mm_add_epi32(X1, Z1); \ + (out).q[2] = X2 = _mm_add_epi32(X2, Z2); \ + (out).q[3] = X3 = _mm_add_epi32(X3, Z3); \ } /** - * salsa20_8(B): - * Apply the salsa20/8 core to the provided block. + * Apply the Salsa20/2 core to the block provided in X. */ -static void -salsa20_8(uint64_t B[8]) +#define SALSA20_2(out) \ + SALSA20_wrapper(out, SALSA20_2ROUNDS) + +#define SALSA20_8ROUNDS \ + SALSA20_2ROUNDS SALSA20_2ROUNDS SALSA20_2ROUNDS SALSA20_2ROUNDS + +/** + * Apply the Salsa20/8 core to the block provided in X. + */ +#define SALSA20_8(out) \ + SALSA20_wrapper(out, SALSA20_8ROUNDS) + +#define XOR_X(in) \ + X0 = _mm_xor_si128(X0, (in).q[0]); \ + X1 = _mm_xor_si128(X1, (in).q[1]); \ + X2 = _mm_xor_si128(X2, (in).q[2]); \ + X3 = _mm_xor_si128(X3, (in).q[3]); + +#define XOR_X_2(in1, in2) \ + X0 = _mm_xor_si128((in1).q[0], (in2).q[0]); \ + X1 = _mm_xor_si128((in1).q[1], (in2).q[1]); \ + X2 = _mm_xor_si128((in1).q[2], (in2).q[2]); \ + X3 = _mm_xor_si128((in1).q[3], (in2).q[3]); + +#define XOR_X_WRITE_XOR_Y_2(out, in) \ + (out).q[0] = Y0 = _mm_xor_si128((out).q[0], (in).q[0]); \ + (out).q[1] = Y1 = _mm_xor_si128((out).q[1], (in).q[1]); \ + (out).q[2] = Y2 = _mm_xor_si128((out).q[2], (in).q[2]); \ + (out).q[3] = Y3 = _mm_xor_si128((out).q[3], (in).q[3]); \ + X0 = _mm_xor_si128(X0, Y0); \ + X1 = _mm_xor_si128(X1, Y1); \ + X2 = _mm_xor_si128(X2, Y2); \ + X3 = _mm_xor_si128(X3, Y3); + +#define INTEGERIFY _mm_cvtsi128_si32(X0) + +#else /* !defined(__SSE2__) */ + +#define DECL_X \ + salsa20_blk_t X; +#define DECL_Y \ + salsa20_blk_t Y; + +#define COPY(out, in) \ + (out).d[0] = (in).d[0]; \ + (out).d[1] = (in).d[1]; \ + (out).d[2] = (in).d[2]; \ + (out).d[3] = (in).d[3]; \ + (out).d[4] = (in).d[4]; \ + (out).d[5] = (in).d[5]; \ + (out).d[6] = (in).d[6]; \ + (out).d[7] = (in).d[7]; + +#define READ_X(in) COPY(X, in) +#define WRITE_X(out) COPY(out, X) + +/** + * salsa20(B): + * Apply the Salsa20 core to the provided block. + */ +static inline void salsa20(salsa20_blk_t *restrict B, + salsa20_blk_t *restrict Bout, uint32_t doublerounds) { - size_t i; salsa20_blk_t X; #define x X.w - salsa20_simd_unshuffle((const salsa20_blk_t *)B, &X); + salsa20_simd_unshuffle(B, &X); - for (i = 0; i < 8; i += 2) { + do { #define R(a,b) (((a) << (b)) | ((a) >> (32 - (b)))) /* Operate on columns */ x[ 4] ^= R(x[ 0]+x[12], 7); x[ 8] ^= R(x[ 4]+x[ 0], 9); @@ -154,346 +315,596 @@ salsa20_8(uint64_t B[8]) x[12] ^= R(x[15]+x[14], 7); x[13] ^= R(x[12]+x[15], 9); x[14] ^= R(x[13]+x[12],13); x[15] ^= R(x[14]+x[13],18); #undef R - } + } while (--doublerounds); #undef x { - salsa20_blk_t Y; - salsa20_simd_shuffle(&X, &Y); + uint32_t i; + salsa20_simd_shuffle(&X, Bout); for (i = 0; i < 16; i += 4) { - ((salsa20_blk_t *)B)->w[i] += Y.w[i]; - ((salsa20_blk_t *)B)->w[i + 1] += Y.w[i + 1]; - ((salsa20_blk_t *)B)->w[i + 2] += Y.w[i + 2]; - ((salsa20_blk_t *)B)->w[i + 3] += Y.w[i + 3]; + B->w[i] = Bout->w[i] += B->w[i]; + B->w[i + 1] = Bout->w[i + 1] += B->w[i + 1]; + B->w[i + 2] = Bout->w[i + 2] += B->w[i + 2]; + B->w[i + 3] = Bout->w[i + 3] += B->w[i + 3]; } } } /** - * blockmix_salsa8(Bin, Bout, X, r): - * Compute Bout = BlockMix_{salsa20/8, r}(Bin). The input Bin must be 128r - * bytes in length; the output Bout must also be the same size. The - * temporary space X must be 64 bytes. + * Apply the Salsa20/2 core to the block provided in X. */ -static void -blockmix_salsa8(const uint64_t * Bin, uint64_t * Bout, uint64_t * X, size_t r) -{ - size_t i; +#define SALSA20_2(out) \ + salsa20(&X, &out, 1); - /* 1: X <-- B_{2r - 1} */ - blkcpy(X, &Bin[(2 * r - 1) * 8], 8); +/** + * Apply the Salsa20/8 core to the block provided in X. + */ +#define SALSA20_8(out) \ + salsa20(&X, &out, 4); + +#define XOR(out, in1, in2) \ + (out).d[0] = (in1).d[0] ^ (in2).d[0]; \ + (out).d[1] = (in1).d[1] ^ (in2).d[1]; \ + (out).d[2] = (in1).d[2] ^ (in2).d[2]; \ + (out).d[3] = (in1).d[3] ^ (in2).d[3]; \ + (out).d[4] = (in1).d[4] ^ (in2).d[4]; \ + (out).d[5] = (in1).d[5] ^ (in2).d[5]; \ + (out).d[6] = (in1).d[6] ^ (in2).d[6]; \ + (out).d[7] = (in1).d[7] ^ (in2).d[7]; + +#define XOR_X(in) XOR(X, X, in) +#define XOR_X_2(in1, in2) XOR(X, in1, in2) +#define XOR_X_WRITE_XOR_Y_2(out, in) \ + XOR(Y, out, in) \ + COPY(out, Y) \ + XOR(X, X, Y) + +#define INTEGERIFY (uint32_t)X.d[0] +#endif - /* 2: for i = 0 to 2r - 1 do */ - for (i = 0; i < 2 * r; i += 2) { - /* 3: X <-- H(X \xor B_i) */ - blkxor(X, &Bin[i * 8], 8); - salsa20_8(X); +/** + * Apply the Salsa20 core to the block provided in X ^ in. + */ +#define SALSA20_XOR_MEM(in, out) \ + XOR_X(in) \ + SALSA20(out) + +#define SALSA20 SALSA20_8 +#else /* pass 2 */ +#undef SALSA20 +#define SALSA20 SALSA20_2 +#endif - /* 4: Y_i <-- X */ - /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ - blkcpy(&Bout[i * 4], X, 8); +/** + * blockmix_salsa(Bin, Bout): + * Compute Bout = BlockMix_{salsa20, 1}(Bin). The input Bin must be 128 + * bytes in length; the output Bout must also be the same size. + */ +static inline void blockmix_salsa(const salsa20_blk_t *restrict Bin, + salsa20_blk_t *restrict Bout) +{ + DECL_X - /* 3: X <-- H(X \xor B_i) */ - blkxor(X, &Bin[i * 8 + 8], 8); - salsa20_8(X); + READ_X(Bin[1]) + SALSA20_XOR_MEM(Bin[0], Bout[0]) + SALSA20_XOR_MEM(Bin[1], Bout[1]) +} - /* 4: Y_i <-- X */ - /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ - blkcpy(&Bout[i * 4 + r * 8], X, 8); - } +static inline uint32_t blockmix_salsa_xor(const salsa20_blk_t *restrict Bin1, + const salsa20_blk_t *restrict Bin2, salsa20_blk_t *restrict Bout) +{ + DECL_X + + XOR_X_2(Bin1[1], Bin2[1]) + XOR_X(Bin1[0]) + SALSA20_XOR_MEM(Bin2[0], Bout[0]) + XOR_X(Bin1[1]) + SALSA20_XOR_MEM(Bin2[1], Bout[1]) + + return INTEGERIFY; } -/* These are tunable */ -#define S_BITS 8 -#define S_SIMD 2 -#define S_P 4 -#define S_ROUNDS 6 +#if _YESPOWER_OPT_C_PASS_ == 1 +/* This is tunable, but it is part of what defines a yespower version */ +/* Version 0.5 */ +#define Swidth_0_5 8 +/* Version 1.0 */ +#define Swidth_1_0 11 -/* Number of S-boxes. Not tunable, hard-coded in a few places. */ -#define S_N 2 +/* Not tunable in this implementation, hard-coded in a few places */ +#define PWXsimple 2 +#define PWXgather 4 -/* Derived values. Not tunable on their own. */ -#define S_SIZE1 (1 << S_BITS) -#define S_MASK ((S_SIZE1 - 1) * S_SIMD * 8) -#define S_MASK2 (((uint64_t)S_MASK << 32) | S_MASK) -#define S_SIZE_ALL (S_N * S_SIZE1 * S_SIMD) -#define S_P_SIZE (S_P * S_SIMD) -#define S_MIN_R ((S_P * S_SIMD + 15) / 16) +/* Derived value. Not tunable on its own. */ +#define PWXbytes (PWXgather * PWXsimple * 8) -/** - * pwxform(B): - * Transform the provided block using the provided S-boxes. +/* (Maybe-)runtime derived values. Not tunable on their own. */ +#define Swidth_to_Sbytes1(Swidth) ((1 << (Swidth)) * PWXsimple * 8) +#define Swidth_to_Smask(Swidth) (((1 << (Swidth)) - 1) * PWXsimple * 8) +#define Smask_to_Smask2(Smask) (((uint64_t)(Smask) << 32) | (Smask)) + +/* These should be compile-time derived */ +#define Smask2_0_5 Smask_to_Smask2(Swidth_to_Smask(Swidth_0_5)) +#define Smask2_1_0 Smask_to_Smask2(Swidth_to_Smask(Swidth_1_0)) + +typedef struct { + uint8_t *S0, *S1, *S2; + size_t w; + uint32_t Sbytes; +} pwxform_ctx_t; + +#define DECL_SMASK2REG /* empty */ +#define MAYBE_MEMORY_BARRIER /* empty */ + +#ifdef __SSE2__ +/* + * (V)PSRLDQ and (V)PSHUFD have higher throughput than (V)PSRLQ on some CPUs + * starting with Sandy Bridge. Additionally, PSHUFD uses separate source and + * destination registers, whereas the shifts would require an extra move + * instruction for our code when building without AVX. Unfortunately, PSHUFD + * is much slower on Conroe (4 cycles latency vs. 1 cycle latency for PSRLQ) + * and somewhat slower on some non-Intel CPUs (luckily not including AMD + * Bulldozer and Piledriver). */ -static void -block_pwxform(uint64_t * B, const uint64_t * S) -{ - uint64_t (*X)[S_SIMD] = (uint64_t (*)[S_SIMD])B; - const uint8_t *S0 = (const uint8_t *)S; - const uint8_t *S1 = (const uint8_t *)(S + S_SIZE1 * S_SIMD); - size_t i, j; -#if S_SIMD > 2 - size_t k; +#ifdef __AVX__ +#define HI32(X) \ + _mm_srli_si128((X), 4) +#elif 1 /* As an option, check for __SSE4_1__ here not to hurt Conroe */ +#define HI32(X) \ + _mm_shuffle_epi32((X), _MM_SHUFFLE(2,3,0,1)) +#else +#define HI32(X) \ + _mm_srli_epi64((X), 32) #endif - for (j = 0; j < S_P; j++) { - uint64_t *Xj = X[j]; - uint64_t x0 = Xj[0]; -#if S_SIMD > 1 - uint64_t x1 = Xj[1]; +#if defined(__x86_64__) && \ + __GNUC__ == 4 && __GNUC_MINOR__ < 6 && !defined(__ICC) +#ifdef __AVX__ +#define MOVQ "vmovq" +#else +/* "movq" would be more correct, but "movd" is supported by older binutils + * due to an error in AMD's spec for x86-64. */ +#define MOVQ "movd" +#endif +#define EXTRACT64(X) ({ \ + uint64_t result; \ + __asm__(MOVQ " %1, %0" : "=r" (result) : "x" (X)); \ + result; \ +}) +#elif defined(__x86_64__) && !defined(_MSC_VER) && !defined(__OPEN64__) +/* MSVC and Open64 had bugs */ +#define EXTRACT64(X) _mm_cvtsi128_si64(X) +#elif defined(__x86_64__) && defined(__SSE4_1__) +/* No known bugs for this intrinsic */ +#include +#define EXTRACT64(X) _mm_extract_epi64((X), 0) +#elif defined(USE_SSE4_FOR_32BIT) && defined(__SSE4_1__) +/* 32-bit */ +#include +#if 0 +/* This is currently unused by the code below, which instead uses these two + * intrinsics explicitly when (!defined(__x86_64__) && defined(__SSE4_1__)) */ +#define EXTRACT64(X) \ + ((uint64_t)(uint32_t)_mm_cvtsi128_si32(X) | \ + ((uint64_t)(uint32_t)_mm_extract_epi32((X), 1) << 32)) +#endif +#else +/* 32-bit or compilers with known past bugs in _mm_cvtsi128_si64() */ +#define EXTRACT64(X) \ + ((uint64_t)(uint32_t)_mm_cvtsi128_si32(X) | \ + ((uint64_t)(uint32_t)_mm_cvtsi128_si32(HI32(X)) << 32)) #endif - for (i = 0; i < S_ROUNDS; i++) { - uint64_t x = x0 & S_MASK2; - const uint64_t *p0, *p1; - - p0 = (const uint64_t *)(S0 + (uint32_t)x); - p1 = (const uint64_t *)(S1 + (x >> 32)); +#if defined(__x86_64__) && (defined(__AVX__) || !defined(__GNUC__)) +/* 64-bit with AVX */ +/* Force use of 64-bit AND instead of two 32-bit ANDs */ +#undef DECL_SMASK2REG +#if defined(__GNUC__) && !defined(__ICC) +#define DECL_SMASK2REG uint64_t Smask2reg = Smask2; +/* Force use of lower-numbered registers to reduce number of prefixes, relying + * on out-of-order execution and register renaming. */ +#define FORCE_REGALLOC_1 \ + __asm__("" : "=a" (x), "+d" (Smask2reg), "+S" (S0), "+D" (S1)); +#define FORCE_REGALLOC_2 \ + __asm__("" : : "c" (lo)); +#else +static volatile uint64_t Smask2var = Smask2; +#define DECL_SMASK2REG uint64_t Smask2reg = Smask2var; +#define FORCE_REGALLOC_1 /* empty */ +#define FORCE_REGALLOC_2 /* empty */ +#endif +#define PWXFORM_SIMD(X) { \ + uint64_t x; \ + FORCE_REGALLOC_1 \ + uint32_t lo = x = EXTRACT64(X) & Smask2reg; \ + FORCE_REGALLOC_2 \ + uint32_t hi = x >> 32; \ + X = _mm_mul_epu32(HI32(X), X); \ + X = _mm_add_epi64(X, *(__m128i *)(S0 + lo)); \ + X = _mm_xor_si128(X, *(__m128i *)(S1 + hi)); \ +} +#elif defined(__x86_64__) +/* 64-bit without AVX. This relies on out-of-order execution and register + * renaming. It may actually be fastest on CPUs with AVX(2) as well - e.g., + * it runs great on Haswell. */ +#warning "Note: using x86-64 inline assembly for pwxform. That's great." +#undef MAYBE_MEMORY_BARRIER +#define MAYBE_MEMORY_BARRIER \ + __asm__("" : : : "memory"); +#define PWXFORM_SIMD(X) { \ + __m128i H; \ + __asm__( \ + "movd %0, %%rax\n\t" \ + "pshufd $0xb1, %0, %1\n\t" \ + "andq %2, %%rax\n\t" \ + "pmuludq %1, %0\n\t" \ + "movl %%eax, %%ecx\n\t" \ + "shrq $0x20, %%rax\n\t" \ + "paddq (%3,%%rcx), %0\n\t" \ + "pxor (%4,%%rax), %0\n\t" \ + : "+x" (X), "=x" (H) \ + : "d" (Smask2), "S" (S0), "D" (S1) \ + : "cc", "ax", "cx"); \ +} +#elif defined(USE_SSE4_FOR_32BIT) && defined(__SSE4_1__) +/* 32-bit with SSE4.1 */ +#define PWXFORM_SIMD(X) { \ + __m128i x = _mm_and_si128(X, _mm_set1_epi64x(Smask2)); \ + __m128i s0 = *(__m128i *)(S0 + (uint32_t)_mm_cvtsi128_si32(x)); \ + __m128i s1 = *(__m128i *)(S1 + (uint32_t)_mm_extract_epi32(x, 1)); \ + X = _mm_mul_epu32(HI32(X), X); \ + X = _mm_add_epi64(X, s0); \ + X = _mm_xor_si128(X, s1); \ +} +#else +/* 32-bit without SSE4.1 */ +#define PWXFORM_SIMD(X) { \ + uint64_t x = EXTRACT64(X) & Smask2; \ + __m128i s0 = *(__m128i *)(S0 + (uint32_t)x); \ + __m128i s1 = *(__m128i *)(S1 + (x >> 32)); \ + X = _mm_mul_epu32(HI32(X), X); \ + X = _mm_add_epi64(X, s0); \ + X = _mm_xor_si128(X, s1); \ +} +#endif - x0 = (uint64_t)(x0 >> 32) * (uint32_t)x0; - x0 += p0[0]; - x0 ^= p1[0]; +#define PWXFORM_SIMD_WRITE(X, Sw) \ + PWXFORM_SIMD(X) \ + MAYBE_MEMORY_BARRIER \ + *(__m128i *)(Sw + w) = X; \ + MAYBE_MEMORY_BARRIER + +#define PWXFORM_ROUND \ + PWXFORM_SIMD(X0) \ + PWXFORM_SIMD(X1) \ + PWXFORM_SIMD(X2) \ + PWXFORM_SIMD(X3) + +#define PWXFORM_ROUND_WRITE4 \ + PWXFORM_SIMD_WRITE(X0, S0) \ + PWXFORM_SIMD_WRITE(X1, S1) \ + w += 16; \ + PWXFORM_SIMD_WRITE(X2, S0) \ + PWXFORM_SIMD_WRITE(X3, S1) \ + w += 16; + +#define PWXFORM_ROUND_WRITE2 \ + PWXFORM_SIMD_WRITE(X0, S0) \ + PWXFORM_SIMD_WRITE(X1, S1) \ + w += 16; \ + PWXFORM_SIMD(X2) \ + PWXFORM_SIMD(X3) + +#else /* !defined(__SSE2__) */ + +#define PWXFORM_SIMD(x0, x1) { \ + uint64_t x = x0 & Smask2; \ + uint64_t *p0 = (uint64_t *)(S0 + (uint32_t)x); \ + uint64_t *p1 = (uint64_t *)(S1 + (x >> 32)); \ + x0 = ((x0 >> 32) * (uint32_t)x0 + p0[0]) ^ p1[0]; \ + x1 = ((x1 >> 32) * (uint32_t)x1 + p0[1]) ^ p1[1]; \ +} -#if S_SIMD > 1 - x1 = (uint64_t)(x1 >> 32) * (uint32_t)x1; - x1 += p0[1]; - x1 ^= p1[1]; +#define PWXFORM_SIMD_WRITE(x0, x1, Sw) \ + PWXFORM_SIMD(x0, x1) \ + ((uint64_t *)(Sw + w))[0] = x0; \ + ((uint64_t *)(Sw + w))[1] = x1; + +#define PWXFORM_ROUND \ + PWXFORM_SIMD(X.d[0], X.d[1]) \ + PWXFORM_SIMD(X.d[2], X.d[3]) \ + PWXFORM_SIMD(X.d[4], X.d[5]) \ + PWXFORM_SIMD(X.d[6], X.d[7]) + +#define PWXFORM_ROUND_WRITE4 \ + PWXFORM_SIMD_WRITE(X.d[0], X.d[1], S0) \ + PWXFORM_SIMD_WRITE(X.d[2], X.d[3], S1) \ + w += 16; \ + PWXFORM_SIMD_WRITE(X.d[4], X.d[5], S0) \ + PWXFORM_SIMD_WRITE(X.d[6], X.d[7], S1) \ + w += 16; + +#define PWXFORM_ROUND_WRITE2 \ + PWXFORM_SIMD_WRITE(X.d[0], X.d[1], S0) \ + PWXFORM_SIMD_WRITE(X.d[2], X.d[3], S1) \ + w += 16; \ + PWXFORM_SIMD(X.d[4], X.d[5]) \ + PWXFORM_SIMD(X.d[6], X.d[7]) #endif -#if S_SIMD > 2 - for (k = 2; k < S_SIMD; k++) { - x = Xj[k]; +#define PWXFORM \ + PWXFORM_ROUND PWXFORM_ROUND PWXFORM_ROUND \ + PWXFORM_ROUND PWXFORM_ROUND PWXFORM_ROUND - x = (uint64_t)(x >> 32) * (uint32_t)x; - x += p0[k]; - x ^= p1[k]; +#define Smask2 Smask2_0_5 - Xj[k] = x; - } -#endif - } +#else /* pass 2 */ - Xj[0] = x0; -#if S_SIMD > 1 - Xj[1] = x1; -#endif +#undef PWXFORM +#define PWXFORM \ + PWXFORM_ROUND_WRITE4 PWXFORM_ROUND_WRITE2 PWXFORM_ROUND_WRITE2 \ + w &= Smask2; \ + { \ + uint8_t *Stmp = S2; \ + S2 = S1; \ + S1 = S0; \ + S0 = Stmp; \ } -} + +#undef Smask2 +#define Smask2 Smask2_1_0 + +#endif /** - * blockmix_pwxform(Bin, Bout, S, r): - * Compute Bout = BlockMix_pwxform{salsa20/8, S, r}(Bin). The input Bin must + * blockmix_pwxform(Bin, Bout, r, S): + * Compute Bout = BlockMix_pwxform{salsa20, r, S}(Bin). The input Bin must * be 128r bytes in length; the output Bout must also be the same size. - * - * S lacks const qualifier to match blockmix_salsa8()'s prototype, which we - * need to refer to both functions via the same function pointers. */ -static void -blockmix_pwxform(const uint64_t * Bin, uint64_t * Bout, uint64_t * S, size_t r) +static void blockmix(const salsa20_blk_t *restrict Bin, + salsa20_blk_t *restrict Bout, size_t r, pwxform_ctx_t *restrict ctx) { - size_t r1, r2, i; + if (unlikely(!ctx)) { + blockmix_salsa(Bin, Bout); + return; + } - /* Convert 128-byte blocks to (S_P_SIZE * 64-bit) blocks */ - r1 = r * 128 / (S_P_SIZE * 8); + uint8_t *S0 = ctx->S0, *S1 = ctx->S1; +#if _YESPOWER_OPT_C_PASS_ > 1 + uint8_t *S2 = ctx->S2; + size_t w = ctx->w; +#endif + size_t i; + DECL_X - /* X <-- B_{r1 - 1} */ - blkcpy(Bout, &Bin[(r1 - 1) * S_P_SIZE], S_P_SIZE); + /* Convert count of 128-byte blocks to max index of 64-byte block */ + r = r * 2 - 1; - /* X <-- X \xor B_i */ - blkxor(Bout, Bin, S_P_SIZE); + READ_X(Bin[r]) - /* X <-- H'(X) */ - /* B'_i <-- X */ - block_pwxform(Bout, S); + DECL_SMASK2REG - /* for i = 0 to r1 - 1 do */ - for (i = 1; i < r1; i++) { - /* X <-- X \xor B_i */ - blkcpy(&Bout[i * S_P_SIZE], &Bout[(i - 1) * S_P_SIZE], - S_P_SIZE); - blkxor(&Bout[i * S_P_SIZE], &Bin[i * S_P_SIZE], S_P_SIZE); + i = 0; + do { + XOR_X(Bin[i]) + PWXFORM + if (unlikely(i >= r)) + break; + WRITE_X(Bout[i]) + i++; + } while (1); + +#if _YESPOWER_OPT_C_PASS_ > 1 + ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; + ctx->w = w; +#endif - /* X <-- H'(X) */ - /* B'_i <-- X */ - block_pwxform(&Bout[i * S_P_SIZE], S); - } + SALSA20(Bout[i]) +} - /* Handle partial blocks */ - if (i * S_P_SIZE < r * 16) - blkcpy(&Bout[i * S_P_SIZE], &Bin[i * S_P_SIZE], - r * 16 - i * S_P_SIZE); +static uint32_t blockmix_xor(const salsa20_blk_t *restrict Bin1, + const salsa20_blk_t *restrict Bin2, salsa20_blk_t *restrict Bout, + size_t r, pwxform_ctx_t *restrict ctx) +{ + if (unlikely(!ctx)) + return blockmix_salsa_xor(Bin1, Bin2, Bout); - i = (r1 - 1) * S_P_SIZE / 8; - /* Convert 128-byte blocks to 64-byte blocks */ - r2 = r * 2; + uint8_t *S0 = ctx->S0, *S1 = ctx->S1; +#if _YESPOWER_OPT_C_PASS_ > 1 + uint8_t *S2 = ctx->S2; + size_t w = ctx->w; +#endif + size_t i; + DECL_X - /* B'_i <-- H(B'_i) */ - salsa20_8(&Bout[i * 8]); - i++; + /* Convert count of 128-byte blocks to max index of 64-byte block */ + r = r * 2 - 1; - for (; i < r2; i++) { - /* B'_i <-- H(B'_i \xor B'_{i-1}) */ - blkxor(&Bout[i * 8], &Bout[(i - 1) * 8], 8); - salsa20_8(&Bout[i * 8]); +#ifdef PREFETCH + PREFETCH(&Bin2[r], _MM_HINT_T0) + for (i = 0; i < r; i++) { + PREFETCH(&Bin2[i], _MM_HINT_T0) } -} +#endif -/** - * integerify(B, r): - * Return the result of parsing B_{2r-1} as a little-endian integer. - */ -static inline uint64_t -integerify(const uint64_t * B, size_t r) -{ -/* - * Our 64-bit words are in host byte order, and word 6 holds the second 32-bit - * word of B_{2r-1} due to SIMD shuffling. The 64-bit value we return is also - * in host byte order, as it should be. - */ - const uint64_t * X = &B[(2 * r - 1) * 8]; - uint32_t lo = X[0]; - uint32_t hi = X[6] >> 32; - return ((uint64_t)hi << 32) + lo; -} + XOR_X_2(Bin1[r], Bin2[r]) -/** - * smix1(B, r, N, flags, V, NROM, shared, XY, S): - * Compute first loop of B = SMix_r(B, N). The input B must be 128r bytes in - * length; the temporary storage V must be 128rN bytes in length; the temporary - * storage XY must be 256r + 64 bytes in length. The value N must be even and - * no smaller than 2. - */ -static void -smix1(uint64_t * B, size_t r, uint64_t N, yescrypt_flags_t flags, - uint64_t * V, uint64_t NROM, const yescrypt_shared_t * shared, - uint64_t * XY, uint64_t * S) -{ - void (*blockmix)(const uint64_t *, uint64_t *, uint64_t *, size_t) = - (S ? blockmix_pwxform : blockmix_salsa8); - const uint64_t * VROM = shared->shared1.aligned; - uint32_t VROM_mask = shared->mask1; - size_t s = 16 * r; - uint64_t * X = V; - uint64_t * Y = &XY[s]; - uint64_t * Z = S ? S : &XY[2 * s]; - uint64_t n, i, j; - size_t k; - - /* 1: X <-- B */ - /* 3: V_i <-- X */ - for (i = 0; i < 2 * r; i++) { - const salsa20_blk_t *src = (const salsa20_blk_t *)&B[i * 8]; - salsa20_blk_t *tmp = (salsa20_blk_t *)Y; - salsa20_blk_t *dst = (salsa20_blk_t *)&X[i * 8]; - for (k = 0; k < 16; k++) - tmp->w[k] = le32dec(&src->w[k]); - salsa20_simd_shuffle(tmp, dst); - } + DECL_SMASK2REG - /* 4: X <-- H(X) */ - /* 3: V_i <-- X */ - blockmix(X, Y, Z, r); - blkcpy(&V[s], Y, s); + i = 0; + r--; + do { + XOR_X(Bin1[i]) + XOR_X(Bin2[i]) + PWXFORM + WRITE_X(Bout[i]) - X = XY; + XOR_X(Bin1[i + 1]) + XOR_X(Bin2[i + 1]) + PWXFORM - if (NROM && (VROM_mask & 1)) { - if ((1 & VROM_mask) == 1) { - /* j <-- Integerify(X) mod NROM */ - j = integerify(Y, r) & (NROM - 1); + if (unlikely(i >= r)) + break; - /* X <-- H(X \xor VROM_j) */ - blkxor(Y, &VROM[j * s], s); - } + WRITE_X(Bout[i + 1]) - blockmix(Y, X, Z, r); + i += 2; + } while (1); + i++; - /* 2: for i = 0 to N - 1 do */ - for (n = 1, i = 2; i < N; i += 2) { - /* 3: V_i <-- X */ - blkcpy(&V[i * s], X, s); +#if _YESPOWER_OPT_C_PASS_ > 1 + ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; + ctx->w = w; +#endif - if ((i & (i - 1)) == 0) - n <<= 1; + SALSA20(Bout[i]) - /* j <-- Wrap(Integerify(X), i) */ - j = integerify(X, r) & (n - 1); - j += i - n; + return INTEGERIFY; +} - /* X <-- X \xor V_j */ - blkxor(X, &V[j * s], s); +static uint32_t blockmix_xor_save(salsa20_blk_t *restrict Bin1out, + salsa20_blk_t *restrict Bin2, + size_t r, pwxform_ctx_t *restrict ctx) +{ + uint8_t *S0 = ctx->S0, *S1 = ctx->S1; +#if _YESPOWER_OPT_C_PASS_ > 1 + uint8_t *S2 = ctx->S2; + size_t w = ctx->w; +#endif + size_t i; + DECL_X + DECL_Y - /* 4: X <-- H(X) */ - blockmix(X, Y, Z, r); + /* Convert count of 128-byte blocks to max index of 64-byte block */ + r = r * 2 - 1; - /* 3: V_i <-- X */ - blkcpy(&V[(i + 1) * s], Y, s); +#ifdef PREFETCH + PREFETCH(&Bin2[r], _MM_HINT_T0) + for (i = 0; i < r; i++) { + PREFETCH(&Bin2[i], _MM_HINT_T0) + } +#endif - j = integerify(Y, r); - if (((i + 1) & VROM_mask) == 1) { - /* j <-- Integerify(X) mod NROM */ - j &= NROM - 1; + XOR_X_2(Bin1out[r], Bin2[r]) - /* X <-- H(X \xor VROM_j) */ - blkxor(Y, &VROM[j * s], s); - } else { - /* j <-- Wrap(Integerify(X), i) */ - j &= n - 1; - j += i + 1 - n; + DECL_SMASK2REG - /* X <-- H(X \xor V_j) */ - blkxor(Y, &V[j * s], s); - } + i = 0; + r--; + do { + XOR_X_WRITE_XOR_Y_2(Bin2[i], Bin1out[i]) + PWXFORM + WRITE_X(Bin1out[i]) - blockmix(Y, X, Z, r); - } - } else { - yescrypt_flags_t rw = flags & YESCRYPT_RW; + XOR_X_WRITE_XOR_Y_2(Bin2[i + 1], Bin1out[i + 1]) + PWXFORM - /* 4: X <-- H(X) */ - blockmix(Y, X, Z, r); + if (unlikely(i >= r)) + break; - /* 2: for i = 0 to N - 1 do */ - for (n = 1, i = 2; i < N; i += 2) { - /* 3: V_i <-- X */ - blkcpy(&V[i * s], X, s); + WRITE_X(Bin1out[i + 1]) - if (rw) { - if ((i & (i - 1)) == 0) - n <<= 1; + i += 2; + } while (1); + i++; - /* j <-- Wrap(Integerify(X), i) */ - j = integerify(X, r) & (n - 1); - j += i - n; +#if _YESPOWER_OPT_C_PASS_ > 1 + ctx->S0 = S0; ctx->S1 = S1; ctx->S2 = S2; + ctx->w = w; +#endif - /* X <-- X \xor V_j */ - blkxor(X, &V[j * s], s); - } + SALSA20(Bin1out[i]) - /* 4: X <-- H(X) */ - blockmix(X, Y, Z, r); + return INTEGERIFY; +} - /* 3: V_i <-- X */ - blkcpy(&V[(i + 1) * s], Y, s); +#if _YESPOWER_OPT_C_PASS_ == 1 +/** + * integerify(B, r): + * Return the result of parsing B_{2r-1} as a little-endian integer. + */ +static inline uint32_t integerify(const salsa20_blk_t *B, size_t r) +{ +/* + * Our 64-bit words are in host byte order, which is why we don't just read + * w[0] here (would be wrong on big-endian). Also, our 32-bit words are + * SIMD-shuffled, but we only care about the least significant 32 bits anyway. + */ + return (uint32_t)B[2 * r - 1].d[0]; +} +#endif - if (rw) { - /* j <-- Wrap(Integerify(X), i) */ - j = integerify(Y, r) & (n - 1); - j += (i + 1) - n; +/** + * smix1(B, r, N, V, XY, S): + * Compute first loop of B = SMix_r(B, N). The input B must be 128r bytes in + * length; the temporary storage V must be 128rN bytes in length; the temporary + * storage XY must be 128r+64 bytes in length. N must be even and at least 4. + * The array V must be aligned to a multiple of 64 bytes, and arrays B and XY + * to a multiple of at least 16 bytes. + */ +static void smix1(uint8_t *B, size_t r, uint32_t N, + salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) +{ + size_t s = 2 * r; + salsa20_blk_t *X = V, *Y = &V[s], *V_j; + uint32_t i, j, n; - /* X <-- X \xor V_j */ - blkxor(Y, &V[j * s], s); - } +#if _YESPOWER_OPT_C_PASS_ == 1 + for (i = 0; i < 2 * r; i++) { +#else + for (i = 0; i < 2; i++) { +#endif + const salsa20_blk_t *src = (salsa20_blk_t *)&B[i * 64]; + salsa20_blk_t *tmp = Y; + salsa20_blk_t *dst = &X[i]; + size_t k; + for (k = 0; k < 16; k++) + tmp->w[k] = le32dec(&src->w[k]); + salsa20_simd_shuffle(tmp, dst); + } - /* 4: X <-- H(X) */ - blockmix(Y, X, Z, r); +#if _YESPOWER_OPT_C_PASS_ > 1 + for (i = 1; i < r; i++) + blockmix(&X[(i - 1) * 2], &X[i * 2], 1, ctx); +#endif + + blockmix(X, Y, r, ctx); + X = Y + s; + blockmix(Y, X, r, ctx); + j = integerify(X, r); + + for (n = 2; n < N; n <<= 1) { + uint32_t m = (n < N / 2) ? n : (N - 1 - n); + for (i = 1; i < m; i += 2) { + Y = X + s; + j &= n - 1; + j += i - 1; + V_j = &V[j * s]; + j = blockmix_xor(X, V_j, Y, r, ctx); + j &= n - 1; + j += i; + V_j = &V[j * s]; + X = Y + s; + j = blockmix_xor(Y, V_j, X, r, ctx); } } + n >>= 1; + + j &= n - 1; + j += N - 2 - n; + V_j = &V[j * s]; + Y = X + s; + j = blockmix_xor(X, V_j, Y, r, ctx); + j &= n - 1; + j += N - 1 - n; + V_j = &V[j * s]; + blockmix_xor(Y, V_j, XY, r, ctx); - /* B' <-- X */ for (i = 0; i < 2 * r; i++) { - const salsa20_blk_t *src = (const salsa20_blk_t *)&X[i * 8]; - salsa20_blk_t *tmp = (salsa20_blk_t *)Y; - salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 8]; + const salsa20_blk_t *src = &XY[i]; + salsa20_blk_t *tmp = &XY[s]; + salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 64]; + size_t k; for (k = 0; k < 16; k++) le32enc(&tmp->w[k], src->w[k]); salsa20_simd_unshuffle(tmp, dst); @@ -501,107 +912,57 @@ smix1(uint64_t * B, size_t r, uint64_t N, yescrypt_flags_t flags, } /** - * smix2(B, r, N, Nloop, flags, V, NROM, shared, XY, S): + * smix2(B, r, N, Nloop, V, XY, S): * Compute second loop of B = SMix_r(B, N). The input B must be 128r bytes in * length; the temporary storage V must be 128rN bytes in length; the temporary - * storage XY must be 256r + 64 bytes in length. The value N must be a - * power of 2 greater than 1. The value Nloop must be even. + * storage XY must be 256r bytes in length. N must be a power of 2 and at + * least 2. Nloop must be even. The array V must be aligned to a multiple of + * 64 bytes, and arrays B and XY to a multiple of at least 16 bytes. */ -static void -smix2(uint64_t * B, size_t r, uint64_t N, uint64_t Nloop, - yescrypt_flags_t flags, - uint64_t * V, uint64_t NROM, const yescrypt_shared_t * shared, - uint64_t * XY, uint64_t * S) +static void smix2(uint8_t *B, size_t r, uint32_t N, uint32_t Nloop, + salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) { - void (*blockmix)(const uint64_t *, uint64_t *, uint64_t *, size_t) = - (S ? blockmix_pwxform : blockmix_salsa8); - const uint64_t * VROM = shared->shared1.aligned; - uint32_t VROM_mask = shared->mask1 | 1; - size_t s = 16 * r; - yescrypt_flags_t rw = flags & YESCRYPT_RW; - uint64_t * X = XY; - uint64_t * Y = &XY[s]; - uint64_t * Z = S ? S : &XY[2 * s]; - uint64_t i, j; - size_t k; - - if (Nloop == 0) - return; + size_t s = 2 * r; + salsa20_blk_t *X = XY, *Y = &XY[s]; + uint32_t i, j; - /* X <-- B' */ for (i = 0; i < 2 * r; i++) { - const salsa20_blk_t *src = (const salsa20_blk_t *)&B[i * 8]; - salsa20_blk_t *tmp = (salsa20_blk_t *)Y; - salsa20_blk_t *dst = (salsa20_blk_t *)&X[i * 8]; + const salsa20_blk_t *src = (salsa20_blk_t *)&B[i * 64]; + salsa20_blk_t *tmp = Y; + salsa20_blk_t *dst = &X[i]; + size_t k; for (k = 0; k < 16; k++) tmp->w[k] = le32dec(&src->w[k]); salsa20_simd_shuffle(tmp, dst); } - if (NROM) { - /* 6: for i = 0 to N - 1 do */ - for (i = 0; i < Nloop; i += 2) { - /* 7: j <-- Integerify(X) mod N */ - j = integerify(X, r) & (N - 1); - - /* 8: X <-- H(X \xor V_j) */ - blkxor(X, &V[j * s], s); - /* V_j <-- Xprev \xor V_j */ - if (rw) - blkcpy(&V[j * s], X, s); - blockmix(X, Y, Z, r); - - j = integerify(Y, r); - if (((i + 1) & VROM_mask) == 1) { - /* j <-- Integerify(X) mod NROM */ - j &= NROM - 1; - - /* X <-- H(X \xor VROM_j) */ - blkxor(Y, &VROM[j * s], s); - } else { - /* 7: j <-- Integerify(X) mod N */ - j &= N - 1; - - /* 8: X <-- H(X \xor V_j) */ - blkxor(Y, &V[j * s], s); - /* V_j <-- Xprev \xor V_j */ - if (rw) - blkcpy(&V[j * s], Y, s); - } - - blockmix(Y, X, Z, r); - } + j = integerify(X, r) & (N - 1); + +#if _YESPOWER_OPT_C_PASS_ == 1 + if (Nloop > 2) { +#endif + do { + salsa20_blk_t *V_j = &V[j * s]; + j = blockmix_xor_save(X, V_j, r, ctx) & (N - 1); + V_j = &V[j * s]; + j = blockmix_xor_save(X, V_j, r, ctx) & (N - 1); + } while (Nloop -= 2); +#if _YESPOWER_OPT_C_PASS_ == 1 } else { - /* 6: for i = 0 to N - 1 do */ - i = Nloop / 2; do { - /* 7: j <-- Integerify(X) mod N */ - j = integerify(X, r) & (N - 1); - - /* 8: X <-- H(X \xor V_j) */ - blkxor(X, &V[j * s], s); - /* V_j <-- Xprev \xor V_j */ - if (rw) - blkcpy(&V[j * s], X, s); - blockmix(X, Y, Z, r); - - /* 7: j <-- Integerify(X) mod N */ - j = integerify(Y, r) & (N - 1); - - /* 8: X <-- H(X \xor V_j) */ - blkxor(Y, &V[j * s], s); - /* V_j <-- Xprev \xor V_j */ - if (rw) - blkcpy(&V[j * s], Y, s); - blockmix(Y, X, Z, r); - } while (--i); + const salsa20_blk_t * V_j = &V[j * s]; + j = blockmix_xor(X, V_j, Y, r, ctx) & (N - 1); + V_j = &V[j * s]; + j = blockmix_xor(Y, V_j, X, r, ctx) & (N - 1); + } while (Nloop -= 2); } +#endif - /* 10: B' <-- X */ for (i = 0; i < 2 * r; i++) { - const salsa20_blk_t *src = (const salsa20_blk_t *)&X[i * 8]; - salsa20_blk_t *tmp = (salsa20_blk_t *)Y; - salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 8]; + const salsa20_blk_t *src = &X[i]; + salsa20_blk_t *tmp = Y; + salsa20_blk_t *dst = (salsa20_blk_t *)&B[i * 64]; + size_t k; for (k = 0; k < 16; k++) le32enc(&tmp->w[k], src->w[k]); salsa20_simd_unshuffle(tmp, dst); @@ -609,365 +970,178 @@ smix2(uint64_t * B, size_t r, uint64_t N, uint64_t Nloop, } /** - * p2floor(x): - * Largest power of 2 not greater than argument. - */ -static uint64_t -p2floor(uint64_t x) -{ - uint64_t y; - while ((y = x & (x - 1))) - x = y; - return x; -} - -/** - * smix(B, r, N, p, t, flags, V, NROM, shared, XY, S): + * smix(B, r, N, V, XY, S): * Compute B = SMix_r(B, N). The input B must be 128rp bytes in length; the * temporary storage V must be 128rN bytes in length; the temporary storage - * XY must be 256r+64 or (256r+64)*p bytes in length (the larger size is - * required with OpenMP-enabled builds). The value N must be a power of 2 - * greater than 1. + * XY must be 256r bytes in length. N must be a power of 2 and at least 16. + * The array V must be aligned to a multiple of 64 bytes, and arrays B and XY + * to a multiple of at least 16 bytes (aligning them to 64 bytes as well saves + * cache lines, but it might also result in cache bank conflicts). */ -static void -smix(uint64_t * B, size_t r, uint64_t N, uint32_t p, uint32_t t, - yescrypt_flags_t flags, - uint64_t * V, uint64_t NROM, const yescrypt_shared_t * shared, - uint64_t * XY, uint64_t * S) +static void smix(uint8_t *B, size_t r, uint32_t N, + salsa20_blk_t *V, salsa20_blk_t *XY, pwxform_ctx_t *ctx) { - size_t s = 16 * r; - uint64_t Nchunk = N / p, Nloop_all, Nloop_rw; - uint32_t i; - - Nloop_all = Nchunk; - if (flags & YESCRYPT_RW) { - if (t <= 1) { - if (t) - Nloop_all *= 2; /* 2/3 */ - Nloop_all = (Nloop_all + 2) / 3; /* 1/3, round up */ - } else { - Nloop_all *= t - 1; - } - } else if (t) { - if (t == 1) - Nloop_all += (Nloop_all + 1) / 2; /* 1.5, round up */ - Nloop_all *= t; - } - - Nloop_rw = 0; - if (flags & __YESCRYPT_INIT_SHARED) - Nloop_rw = Nloop_all; - else if (flags & YESCRYPT_RW) - Nloop_rw = Nloop_all / p; +#if _YESPOWER_OPT_C_PASS_ == 1 + uint32_t Nloop_all = (N + 2) / 3; /* 1/3, round up */ + uint32_t Nloop_rw = Nloop_all; - Nchunk &= ~(uint64_t)1; /* round down to even */ - Nloop_all++; Nloop_all &= ~(uint64_t)1; /* round up to even */ - Nloop_rw &= ~(uint64_t)1; /* round down to even */ - -#ifdef _OPENMP -#pragma omp parallel if (p > 1) default(none) private(i) shared(B, r, N, p, flags, V, NROM, shared, XY, S, s, Nchunk, Nloop_all, Nloop_rw) - { -#pragma omp for -#endif - for (i = 0; i < p; i++) { - uint64_t Vchunk = i * Nchunk; - uint64_t * Bp = &B[i * s]; - uint64_t * Vp = &V[Vchunk * s]; -#ifdef _OPENMP - uint64_t * XYp = &XY[i * (2 * s + 8)]; + Nloop_all++; Nloop_all &= ~(uint32_t)1; /* round up to even */ + Nloop_rw &= ~(uint32_t)1; /* round down to even */ #else - uint64_t * XYp = XY; -#endif - uint64_t Np = (i < p - 1) ? Nchunk : (N - Vchunk); - uint64_t * Sp = S ? &S[i * S_SIZE_ALL] : S; - if (Sp) - smix1(Bp, 1, S_SIZE_ALL / 16, - flags & ~YESCRYPT_PWXFORM, - Sp, NROM, shared, XYp, NULL); - if (!(flags & __YESCRYPT_INIT_SHARED_2)) - smix1(Bp, r, Np, flags, Vp, NROM, shared, XYp, Sp); - smix2(Bp, r, p2floor(Np), Nloop_rw, flags, Vp, - NROM, shared, XYp, Sp); - } - - if (Nloop_all > Nloop_rw) { -#ifdef _OPENMP -#pragma omp for + uint32_t Nloop_rw = (N + 2) / 3; /* 1/3, round up */ + Nloop_rw++; Nloop_rw &= ~(uint32_t)1; /* round up to even */ #endif - for (i = 0; i < p; i++) { - uint64_t * Bp = &B[i * s]; -#ifdef _OPENMP - uint64_t * XYp = &XY[i * (2 * s + 8)]; -#else - uint64_t * XYp = XY; -#endif - uint64_t * Sp = S ? &S[i * S_SIZE_ALL] : S; - smix2(Bp, r, N, Nloop_all - Nloop_rw, - flags & ~YESCRYPT_RW, V, NROM, shared, XYp, Sp); - } - } -#ifdef _OPENMP - } + + smix1(B, 1, ctx->Sbytes / 128, (salsa20_blk_t *)ctx->S0, XY, NULL); + smix1(B, r, N, V, XY, ctx); + smix2(B, r, N, Nloop_rw /* must be > 2 */, V, XY, ctx); +#if _YESPOWER_OPT_C_PASS_ == 1 + if (Nloop_all > Nloop_rw) + smix2(B, r, N, 2, V, XY, ctx); #endif } +#if _YESPOWER_OPT_C_PASS_ == 1 +#undef _YESPOWER_OPT_C_PASS_ +#define _YESPOWER_OPT_C_PASS_ 2 +#define blockmix_salsa blockmix_salsa_1_0 +#define blockmix_salsa_xor blockmix_salsa_xor_1_0 +#define blockmix blockmix_1_0 +#define blockmix_xor blockmix_xor_1_0 +#define blockmix_xor_save blockmix_xor_save_1_0 +#define smix1 smix1_1_0 +#define smix2 smix2_1_0 +#define smix smix_1_0 +#include "yespower-opt.c" +#undef smix + /** - * yescrypt_kdf(shared, local, passwd, passwdlen, salt, saltlen, - * N, r, p, t, flags, buf, buflen): - * Compute scrypt(passwd[0 .. passwdlen - 1], salt[0 .. saltlen - 1], N, r, - * p, buflen), or a revision of scrypt as requested by flags and shared, and - * write the result into buf. The parameters r, p, and buflen must satisfy - * r * p < 2^30 and buflen <= (2^32 - 1) * 32. The parameter N must be a power - * of 2 greater than 1. - * - * t controls computation time while not affecting peak memory usage. shared - * and flags may request special modes as described in yescrypt.h. local is - * the thread-local data structure, allowing to preserve and reuse a memory - * allocation across calls, thereby reducing its overhead. + * yespower(local, src, srclen, params, dst): + * Compute yespower(src[0 .. srclen - 1], N, r), to be checked for "< target". + * local is the thread-local data structure, allowing to preserve and reuse a + * memory allocation across calls, thereby reducing its overhead. * * Return 0 on success; or -1 on error. */ -int -yescrypt_kdf(const yescrypt_shared_t * shared, yescrypt_local_t * local, - const uint8_t * passwd, size_t passwdlen, - const uint8_t * salt, size_t saltlen, - uint64_t N, uint32_t r, uint32_t p, uint32_t t, yescrypt_flags_t flags, - uint8_t * buf, size_t buflen) +int yespower(yespower_local_t *local, + const uint8_t *src, size_t srclen, + const yespower_params_t *params, + yespower_binary_t *dst) { - yescrypt_region_t tmp; - uint64_t NROM; + yespower_version_t version = params->version; + uint32_t N = params->N; + uint32_t r = params->r; + const uint8_t *pers = params->pers; + size_t perslen = params->perslen; + uint32_t Swidth; size_t B_size, V_size, XY_size, need; - uint64_t * B, * V, * XY, * S; - uint64_t sha256[4]; - - /* - * YESCRYPT_PARALLEL_SMIX is a no-op at p = 1 for its intended purpose, - * so don't let it have side-effects. Without this adjustment, it'd - * enable the SHA-256 password pre-hashing and output post-hashing, - * because any deviation from classic scrypt implies those. - */ - if (p == 1) - flags &= ~YESCRYPT_PARALLEL_SMIX; + uint8_t *B, *S; + salsa20_blk_t *V, *XY; + pwxform_ctx_t ctx; + uint8_t sha256[32]; /* Sanity-check parameters */ - if (flags & ~YESCRYPT_KNOWN_FLAGS) { - errno = EINVAL; - return -1; - } -#if SIZE_MAX > UINT32_MAX - if (buflen > (((uint64_t)(1) << 32) - 1) * 32) { - errno = EFBIG; - return -1; - } -#endif - if ((uint64_t)(r) * (uint64_t)(p) >= (1 << 30)) { - errno = EFBIG; - return -1; - } - if (((N & (N - 1)) != 0) || (N <= 1) || (r < 1) || (p < 1)) { - errno = EINVAL; - return -1; - } - if ((flags & YESCRYPT_PARALLEL_SMIX) && (N / p <= 1)) { - errno = EINVAL; - return -1; - } -#if S_MIN_R > 1 - if ((flags & YESCRYPT_PWXFORM) && (r < S_MIN_R)) { + if ((version != YESPOWER_0_5 && version != YESPOWER_1_0) || + N < 1024 || N > 512 * 1024 || r < 8 || r > 32 || + (N & (N - 1)) != 0 || + (!pers && perslen)) { errno = EINVAL; return -1; } -#endif - if ((p > SIZE_MAX / ((size_t)256 * r + 64)) || -#if SIZE_MAX / 256 <= UINT32_MAX - (r > SIZE_MAX / 256) || -#endif - (N > SIZE_MAX / 128 / r)) { - errno = ENOMEM; - return -1; - } - if (N > UINT64_MAX / ((uint64_t)t + 1)) { - errno = EFBIG; - return -1; - } -#ifdef _OPENMP - if (!(flags & YESCRYPT_PARALLEL_SMIX) && - (N > SIZE_MAX / 128 / (r * p))) { - errno = ENOMEM; - return -1; - } -#endif - if ((flags & YESCRYPT_PWXFORM) && -#ifndef _OPENMP - (flags & YESCRYPT_PARALLEL_SMIX) && -#endif - p > SIZE_MAX / (S_SIZE_ALL * sizeof(*S))) { - errno = ENOMEM; - return -1; - } - - NROM = 0; - if (shared->shared1.aligned) { - NROM = shared->shared1.aligned_size / ((size_t)128 * r); - if (((NROM & (NROM - 1)) != 0) || (NROM <= 1) || - !(flags & YESCRYPT_RW)) { - errno = EINVAL; - return -1; - } - } /* Allocate memory */ - V = NULL; - V_size = (size_t)128 * r * N; -#ifdef _OPENMP - if (!(flags & YESCRYPT_PARALLEL_SMIX)) - V_size *= p; -#endif - need = V_size; - if (flags & __YESCRYPT_INIT_SHARED) { - if (local->aligned_size < need) { - if (local->base || local->aligned || - local->base_size || local->aligned_size) { - errno = EINVAL; - return -1; - } - if (!alloc_region(local, need)) - return -1; - } - V = (uint64_t *)local->aligned; - need = 0; - } - B_size = (size_t)128 * r * p; - need += B_size; - if (need < B_size) { - errno = ENOMEM; - return -1; - } - XY_size = (size_t)256 * r + 64; -#ifdef _OPENMP - XY_size *= p; -#endif - need += XY_size; - if (need < XY_size) { - errno = ENOMEM; - return -1; + B_size = (size_t)128 * r; + V_size = B_size * N; + if (version == YESPOWER_0_5) { + XY_size = B_size * 2; + Swidth = Swidth_0_5; + ctx.Sbytes = 2 * Swidth_to_Sbytes1(Swidth); + } else { + XY_size = B_size + 64; + Swidth = Swidth_1_0; + ctx.Sbytes = 3 * Swidth_to_Sbytes1(Swidth); } - if (flags & YESCRYPT_PWXFORM) { - size_t S_size = S_SIZE_ALL * sizeof(*S); -#ifdef _OPENMP - S_size *= p; -#else - if (flags & YESCRYPT_PARALLEL_SMIX) - S_size *= p; -#endif - need += S_size; - if (need < S_size) { - errno = ENOMEM; + need = B_size + V_size + XY_size + ctx.Sbytes; + if (local->aligned_size < need) { + if (free_region(local)) return -1; - } - } - if (flags & __YESCRYPT_INIT_SHARED) { - if (!alloc_region(&tmp, need)) + if (!alloc_region(local, need)) return -1; - B = (uint64_t *)tmp.aligned; - XY = (uint64_t *)((uint8_t *)B + B_size); - } else { - init_region(&tmp); - if (local->aligned_size < need) { - if (free_region(local)) - return -1; - if (!alloc_region(local, need)) - return -1; - } - B = (uint64_t *)local->aligned; - V = (uint64_t *)((uint8_t *)B + B_size); - XY = (uint64_t *)((uint8_t *)V + V_size); } - S = NULL; - if (flags & YESCRYPT_PWXFORM) - S = (uint64_t *)((uint8_t *)XY + XY_size); - - if (t || flags) { - SHA256_CTX_Y ctx; - SHA256_Init_Y(&ctx); - SHA256_Update_Y(&ctx, passwd, passwdlen); - SHA256_Final_Y((uint8_t *)sha256, &ctx); - passwd = (uint8_t *)sha256; - passwdlen = sizeof(sha256); - } - - /* 1: (B_0 ... B_{p-1}) <-- PBKDF2(P, S, 1, p * MFLen) */ - PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, 1, - (uint8_t *)B, B_size); - - if (t || flags) - blkcpy(sha256, B, sizeof(sha256) / sizeof(sha256[0])); - - if (p == 1 || (flags & YESCRYPT_PARALLEL_SMIX)) { - smix(B, r, N, p, t, flags, V, NROM, shared, XY, S); + B = (uint8_t *)local->aligned; + V = (salsa20_blk_t *)((uint8_t *)B + B_size); + XY = (salsa20_blk_t *)((uint8_t *)V + V_size); + S = (uint8_t *)XY + XY_size; + ctx.S0 = S; + ctx.S1 = S + Swidth_to_Sbytes1(Swidth); + + SHA256_Buf(src, srclen, sha256); + + if (version == YESPOWER_0_5) { + YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), src, srclen, 1, + B, B_size); + memcpy(sha256, B, sizeof(sha256)); + smix(B, r, N, V, XY, &ctx); + YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), B, B_size, 1, + (uint8_t *)dst, sizeof(*dst)); + + if (pers) { + HMAC_SHA256_Buf(dst, sizeof(*dst), pers, perslen, + sha256); + SHA256_Buf(sha256, sizeof(sha256), (uint8_t *)dst); + } } else { - uint32_t i; + ctx.S2 = S + 2 * Swidth_to_Sbytes1(Swidth); + ctx.w = 0; - /* 2: for i = 0 to p - 1 do */ -#ifdef _OPENMP -#pragma omp parallel for default(none) private(i) shared(B, r, N, p, t, flags, V, NROM, shared, XY, S) -#endif - for (i = 0; i < p; i++) { - /* 3: B_i <-- MF(B_i, N) */ -#ifdef _OPENMP - smix(&B[(size_t)16 * r * i], r, N, 1, t, flags, - &V[(size_t)16 * r * i * N], - NROM, shared, - &XY[((size_t)32 * r + 8) * i], - S ? &S[S_SIZE_ALL * i] : S); -#else - smix(&B[(size_t)16 * r * i], r, N, 1, t, flags, V, - NROM, shared, XY, S); -#endif + if (pers) { + src = pers; + srclen = perslen; + } else { + srclen = 0; } + + YESPOWER_PBKDF2_SHA256(sha256, sizeof(sha256), src, srclen, 1, B, 128); + memcpy(sha256, B, sizeof(sha256)); + smix_1_0(B, r, N, V, XY, &ctx); + HMAC_SHA256_Buf(B + B_size - 64, 64, + sha256, sizeof(sha256), (uint8_t *)dst); } - /* 5: DK <-- PBKDF2(P, B, 1, dkLen) */ - PBKDF2_SHA256(passwd, passwdlen, (uint8_t *)B, B_size, 1, buf, buflen); - - /* - * Except when computing classic scrypt, allow all computation so far - * to be performed on the client. The final steps below match those of - * SCRAM (RFC 5802), so that an extension of SCRAM (with the steps so - * far in place of SCRAM's use of PBKDF2 and with SHA-256 in place of - * SCRAM's use of SHA-1) would be usable with yescrypt hashes. - */ - if ((t || flags) && buflen == sizeof(sha256)) { - /* Compute ClientKey */ - { - HMAC_SHA256_CTX_Y ctx; - HMAC_SHA256_Init_Y(&ctx, buf, buflen); - if (r == 32) { // yescryptR32 - HMAC_SHA256_Update_Y(&ctx, "WaviBanana", 10); - } else - if (r == 16) { // yescryptR16 - HMAC_SHA256_Update_Y(&ctx, "Client Key", 10); - } else - if (r == 8) { // yescryptR8 - HMAC_SHA256_Update_Y(&ctx, "Client Key", 10); - } - else { // yescrypt - HMAC_SHA256_Update_Y(&ctx, salt, saltlen); - } - HMAC_SHA256_Final_Y((uint8_t *)sha256, &ctx); - } - /* Compute StoredKey */ - { - SHA256_CTX_Y ctx; - SHA256_Init_Y(&ctx); - SHA256_Update_Y(&ctx, (uint8_t *)sha256, sizeof(sha256)); - SHA256_Final_Y(buf, &ctx); - } + /* Success! */ + return 0; +} + +/** + * yespower_tls(src, srclen, params, dst): + * Compute yespower(src[0 .. srclen - 1], N, r), to be checked for "< target". + * The memory allocation is maintained internally using thread-local storage. + * + * Return 0 on success; or -1 on error. + */ +int yespower_tls(const uint8_t *src, size_t srclen, + const yespower_params_t *params, yespower_binary_t *dst) +{ + static __thread int initialized = 0; + static __thread yespower_local_t local; + + if (!initialized) { + if (yespower_init_local(&local)) + return -1; + initialized = 1; } - if (free_region(&tmp)) - return -1; + return yespower(&local, src, srclen, params, dst); +} - /* Success! */ +int yespower_init_local(yespower_local_t *local) +{ + init_region(local); return 0; } + +int yespower_free_local(yespower_local_t *local) +{ + return free_region(local); +} +#endif From b7b1638ee302ac79d2e9551bd5d8166bfb15af66 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:20:03 -0500 Subject: [PATCH 212/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 24fc5275b..631024133 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -13,7 +13,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ - bitcore.c timetravel.c x11evo.c x16r.c x16s.c xevan.c bastion.c hmq17.c sonoa.c \ + bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ From d3788087585078f7c46a1c771300283210918ec3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:20:21 -0500 Subject: [PATCH 213/576] Create x16rt.c --- stratum/algos/x16rt.c | 207 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 stratum/algos/x16rt.c diff --git a/stratum/algos/x16rt.c b/stratum/algos/x16rt.c new file mode 100644 index 000000000..f9c048e78 --- /dev/null +++ b/stratum/algos/x16rt.c @@ -0,0 +1,207 @@ +/* x16rt implementation 2018 by ocminer */ + +#include "x16rt.h" +#include +#include +#include +#include + +#include "sha3/sph_blake.h" +#include "sha3/sph_bmw.h" +#include "sha3/sph_groestl.h" +#include "sha3/sph_jh.h" +#include "sha3/sph_keccak.h" +#include "sha3/sph_skein.h" +#include "sha3/sph_luffa.h" +#include "sha3/sph_cubehash.h" +#include "sha3/sph_shavite.h" +#include "sha3/sph_simd.h" +#include "sha3/sph_echo.h" +#include "sha3/sph_hamsi.h" +#include "sha3/sph_fugue.h" +#include "sha3/sph_shabal.h" +#include "sha3/sph_whirlpool.h" +#include "sha3/sph_sha2.h" + +#define TIME_MASK 0xffffff80 + + +enum Algo { + BLAKE = 0, + BMW, + GROESTL, + JH, + KECCAK, + SKEIN, + LUFFA, + CUBEHASH, + SHAVITE, + SIMD, + ECHO, + HAMSI, + FUGUE, + SHABAL, + WHIRLPOOL, + SHA512, + HASH_FUNC_COUNT +}; + +static __thread uint32_t s_ntime = UINT32_MAX; +static __thread char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; + +static void getAlgoString(const uint8_t* timeHash, char *output) +{ + char *sptr = output; + uint8_t* data = (uint8_t*)timeHash; + + for (int j = 0; j < HASH_FUNC_COUNT; j++) { + uint8_t b = (15 - j) >> 1; // 16 first ascii hex chars (lsb in uint256) + uint8_t algoDigit = (j & 1) ? data[b] & 0xF : data[b] >> 4; + if (algoDigit >= 10) + sprintf(sptr, "%c", 'A' + (algoDigit - 10)); + else + sprintf(sptr, "%u", (uint32_t) algoDigit); + sptr++; + } + *sptr = '\0'; +} + +static void getTimeHash(const uint32_t timeStamp, void* timeHash) +{ + int32_t maskedTime = timeStamp & TIME_MASK; + + sha256d((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); +} + +void x16rt_hash(const char* input, char* output, uint32_t len) +{ + uint32_t hash[64/4]; + + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa1; + sph_cubehash512_context ctx_cubehash1; + sph_shavite512_context ctx_shavite1; + sph_simd512_context ctx_simd1; + sph_echo512_context ctx_echo1; + sph_hamsi512_context ctx_hamsi1; + sph_fugue512_context ctx_fugue1; + sph_shabal512_context ctx_shabal1; + sph_whirlpool_context ctx_whirlpool1; + sph_sha512_context ctx_sha512; + + void *in = (void*) input; + int size = 80; +/* + if (s_ntime == UINT32_MAX) { + const uint8_t* in8 = (uint8_t*) input; + getAlgoString(&in8[4], hashOrder); + } +*/ + + uint32_t *in32 = (uint32_t*) input; + uint32_t ntime = in32[17]; + +// uint32_t _ALIGN(64) timeHash[8]; + uint32_t timeHash[64/4]; + getTimeHash(ntime, &timeHash); + getAlgoString(&timeHash[0], hashOrder); + + + for (int i = 0; i < 16; i++) + { + const char elem = hashOrder[i]; + const uint8_t algo = elem >= 'A' ? elem - 'A' + 10 : elem - '0'; + + switch (algo) { + case BLAKE: + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, in, size); + sph_blake512_close(&ctx_blake, hash); + break; + case BMW: + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, in, size); + sph_bmw512_close(&ctx_bmw, hash); + break; + case GROESTL: + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, in, size); + sph_groestl512_close(&ctx_groestl, hash); + break; + case SKEIN: + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, in, size); + sph_skein512_close(&ctx_skein, hash); + break; + case JH: + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, in, size); + sph_jh512_close(&ctx_jh, hash); + break; + case KECCAK: + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, in, size); + sph_keccak512_close(&ctx_keccak, hash); + break; + case LUFFA: + sph_luffa512_init(&ctx_luffa1); + sph_luffa512(&ctx_luffa1, in, size); + sph_luffa512_close(&ctx_luffa1, hash); + break; + case CUBEHASH: + sph_cubehash512_init(&ctx_cubehash1); + sph_cubehash512(&ctx_cubehash1, in, size); + sph_cubehash512_close(&ctx_cubehash1, hash); + break; + case SHAVITE: + sph_shavite512_init(&ctx_shavite1); + sph_shavite512(&ctx_shavite1, in, size); + sph_shavite512_close(&ctx_shavite1, hash); + break; + case SIMD: + sph_simd512_init(&ctx_simd1); + sph_simd512(&ctx_simd1, in, size); + sph_simd512_close(&ctx_simd1, hash); + break; + case ECHO: + sph_echo512_init(&ctx_echo1); + sph_echo512(&ctx_echo1, in, size); + sph_echo512_close(&ctx_echo1, hash); + break; + case HAMSI: + sph_hamsi512_init(&ctx_hamsi1); + sph_hamsi512(&ctx_hamsi1, in, size); + sph_hamsi512_close(&ctx_hamsi1, hash); + break; + case FUGUE: + sph_fugue512_init(&ctx_fugue1); + sph_fugue512(&ctx_fugue1, in, size); + sph_fugue512_close(&ctx_fugue1, hash); + break; + case SHABAL: + sph_shabal512_init(&ctx_shabal1); + sph_shabal512(&ctx_shabal1, in, size); + sph_shabal512_close(&ctx_shabal1, hash); + break; + case WHIRLPOOL: + sph_whirlpool_init(&ctx_whirlpool1); + sph_whirlpool(&ctx_whirlpool1, in, size); + sph_whirlpool_close(&ctx_whirlpool1, hash); + break; + case SHA512: + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) in, size); + sph_sha512_close(&ctx_sha512,(void*) hash); + break; + } + in = (void*) hash; + size = 64; + } + memcpy(output, hash, 32); +} + From 05980885f85c9317b91423fec1d3848a7baa8178 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:20:41 -0500 Subject: [PATCH 214/576] Create x16rt.h --- stratum/algos/x16rt.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/x16rt.h diff --git a/stratum/algos/x16rt.h b/stratum/algos/x16rt.h new file mode 100644 index 000000000..742678bb5 --- /dev/null +++ b/stratum/algos/x16rt.h @@ -0,0 +1,16 @@ +#ifndef X16RT_H +#define X16RT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x16rt_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From 523c74960a4b2917e431609fe354d2fbc8b30aaa Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:21:06 -0500 Subject: [PATCH 215/576] Create x16rt.conf --- stratum/config.sample/x16rt.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/x16rt.conf diff --git a/stratum/config.sample/x16rt.conf b/stratum/config.sample/x16rt.conf new file mode 100644 index 000000000..3088d462d --- /dev/null +++ b/stratum/config.sample/x16rt.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 7220 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = x16rt +difficulty = 0.25 +max_ttf = 50000 From 67e74a2418aede65fb3dfa75561e4ad6da44a58f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:21:29 -0500 Subject: [PATCH 216/576] Update makefile --- stratum/sha3/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/sha3/makefile b/stratum/sha3/makefile index fe4f8f481..4b0df93ba 100644 --- a/stratum/sha3/makefile +++ b/stratum/sha3/makefile @@ -7,7 +7,7 @@ LDFLAGS=-O2 SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c \ sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ - blake2s.c blake2b.c + blake2s.c blake2b.c sha2.c OBJECTS=$(SOURCES:.c=.o) OUTPUT=libhash.a From 07cbe54db5fcc980f3a6b51a6a585045301f4a31 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:21:44 -0500 Subject: [PATCH 217/576] Create sha2.c --- stratum/sha3/sha2.c | 560 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 560 insertions(+) create mode 100644 stratum/sha3/sha2.c diff --git a/stratum/sha3/sha2.c b/stratum/sha3/sha2.c new file mode 100644 index 000000000..9126dc33b --- /dev/null +++ b/stratum/sha3/sha2.c @@ -0,0 +1,560 @@ +/* + * Copyright 2011 ArtForz + * Copyright 2011-2013 pooler + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. See COPYING for more details. + */ + +#include +#include + +#if defined(__arm__) && defined(__APCS_32__) +#define EXTERN_SHA256 +#endif + +static const uint32_t sha256_h[8] = { + 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 +}; + +static const uint32_t sha256_k[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +void sha256_init(uint32_t *state) +{ + memcpy(state, sha256_h, 32); +} + +/* to quiet strict compiler warning */ +uint32_t swab32(uint32_t i); +//uint32_t be32dec(uint32_t *i); +//uint32_t be32enc(uint32_t *j, uint32_t i); + +static __inline uint32_t +be32dec(const void *pp) +{ + const uint8_t *p = (uint8_t const *)pp; + + return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + + ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); +} + +static __inline void +be32enc(void *pp, uint32_t x) +{ + uint8_t * p = (uint8_t *)pp; + + p[3] = x & 0xff; + p[2] = (x >> 8) & 0xff; + p[1] = (x >> 16) & 0xff; + p[0] = (x >> 24) & 0xff; +} + +/* Elementary functions used by SHA256 */ +#define Ch(x, y, z) ((x & (y ^ z)) ^ z) +#define Maj(x, y, z) ((x & (y | z)) | (y & z)) +#define ROTR(x, n) ((x >> n) | (x << (32 - n))) +#define S0(x) (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22)) +#define S1(x) (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25)) +#define s0(x) (ROTR(x, 7) ^ ROTR(x, 18) ^ (x >> 3)) +#define s1(x) (ROTR(x, 17) ^ ROTR(x, 19) ^ (x >> 10)) + +/* SHA256 round function */ +#define RND(a, b, c, d, e, f, g, h, k) \ + do { \ + t0 = h + S1(e) + Ch(e, f, g) + k; \ + t1 = S0(a) + Maj(a, b, c); \ + d += t0; \ + h = t0 + t1; \ + } while (0) + +/* Adjusted round function for rotating state */ +#define RNDr(S, W, i) \ + RND(S[(64 - i) & 7], S[(65 - i) & 7], \ + S[(66 - i) & 7], S[(67 - i) & 7], \ + S[(68 - i) & 7], S[(69 - i) & 7], \ + S[(70 - i) & 7], S[(71 - i) & 7], \ + W[i] + sha256_k[i]) + +#ifndef EXTERN_SHA256 + +/* + * SHA256 block compression function. The 256-bit state is transformed via + * the 512-bit input block to produce a new state. + */ +void sha256_transform(uint32_t *state, const uint32_t *block, int swap) +{ + uint32_t W[64]; + uint32_t S[8]; + uint32_t t0, t1; + int i; + + /* 1. Prepare message schedule W. */ + if (swap) { + for (i = 0; i < 16; i++) + W[i] = swab32(block[i]); + } else + memcpy(W, block, 64); + for (i = 16; i < 64; i += 2) { + W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; + W[i+1] = s1(W[i - 1]) + W[i - 6] + s0(W[i - 14]) + W[i - 15]; + } + + /* 2. Initialize working variables. */ + memcpy(S, state, 32); + + /* 3. Mix. */ + RNDr(S, W, 0); + RNDr(S, W, 1); + RNDr(S, W, 2); + RNDr(S, W, 3); + RNDr(S, W, 4); + RNDr(S, W, 5); + RNDr(S, W, 6); + RNDr(S, W, 7); + RNDr(S, W, 8); + RNDr(S, W, 9); + RNDr(S, W, 10); + RNDr(S, W, 11); + RNDr(S, W, 12); + RNDr(S, W, 13); + RNDr(S, W, 14); + RNDr(S, W, 15); + RNDr(S, W, 16); + RNDr(S, W, 17); + RNDr(S, W, 18); + RNDr(S, W, 19); + RNDr(S, W, 20); + RNDr(S, W, 21); + RNDr(S, W, 22); + RNDr(S, W, 23); + RNDr(S, W, 24); + RNDr(S, W, 25); + RNDr(S, W, 26); + RNDr(S, W, 27); + RNDr(S, W, 28); + RNDr(S, W, 29); + RNDr(S, W, 30); + RNDr(S, W, 31); + RNDr(S, W, 32); + RNDr(S, W, 33); + RNDr(S, W, 34); + RNDr(S, W, 35); + RNDr(S, W, 36); + RNDr(S, W, 37); + RNDr(S, W, 38); + RNDr(S, W, 39); + RNDr(S, W, 40); + RNDr(S, W, 41); + RNDr(S, W, 42); + RNDr(S, W, 43); + RNDr(S, W, 44); + RNDr(S, W, 45); + RNDr(S, W, 46); + RNDr(S, W, 47); + RNDr(S, W, 48); + RNDr(S, W, 49); + RNDr(S, W, 50); + RNDr(S, W, 51); + RNDr(S, W, 52); + RNDr(S, W, 53); + RNDr(S, W, 54); + RNDr(S, W, 55); + RNDr(S, W, 56); + RNDr(S, W, 57); + RNDr(S, W, 58); + RNDr(S, W, 59); + RNDr(S, W, 60); + RNDr(S, W, 61); + RNDr(S, W, 62); + RNDr(S, W, 63); + + /* 4. Mix local working variables into global state */ + for (i = 0; i < 8; i++) + state[i] += S[i]; +} + +#endif /* EXTERN_SHA256 */ + + +static const uint32_t sha256d_hash1[16] = { + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x80000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000100 +}; + +/* +static void sha256d_80_swap(uint32_t *hash, const uint32_t *data) +{ + uint32_t S[16]; + int i; + + sha256_init(S); + sha256_transform(S, data, 0); + sha256_transform(S, data + 16, 0); + memcpy(S + 8, sha256d_hash1 + 8, 32); + sha256_init(hash); + sha256_transform(hash, S, 0); + for (i = 0; i < 8; i++) + hash[i] = swab32(hash[i]); +} +*/ + +void sha256d(unsigned char *hash, const unsigned char *data, int len) +{ + uint32_t S[16], T[16]; + int i, r; + + sha256_init(S); + for (r = len; r > -9; r -= 64) { + if (r < 64) + memset(T, 0, 64); + memcpy(T, data + len - r, r > 64 ? 64 : (r < 0 ? 0 : r)); + if (r >= 0 && r < 64) + ((unsigned char *)T)[r] = 0x80; + for (i = 0; i < 16; i++) + T[i] = be32dec(T + i); + if (r < 56) + T[15] = 8 * len; + sha256_transform(S, T, 0); + } + memcpy(S + 8, sha256d_hash1 + 8, 32); + sha256_init(T); + sha256_transform(T, S, 0); + for (i = 0; i < 8; i++) + be32enc((uint32_t *)hash + i, T[i]); +} + +/* +static inline void sha256d_preextend(uint32_t *W) +{ + W[16] = s1(W[14]) + W[ 9] + s0(W[ 1]) + W[ 0]; + W[17] = s1(W[15]) + W[10] + s0(W[ 2]) + W[ 1]; + W[18] = s1(W[16]) + W[11] + W[ 2]; + W[19] = s1(W[17]) + W[12] + s0(W[ 4]); + W[20] = W[13] + s0(W[ 5]) + W[ 4]; + W[21] = W[14] + s0(W[ 6]) + W[ 5]; + W[22] = W[15] + s0(W[ 7]) + W[ 6]; + W[23] = W[16] + s0(W[ 8]) + W[ 7]; + W[24] = W[17] + s0(W[ 9]) + W[ 8]; + W[25] = s0(W[10]) + W[ 9]; + W[26] = s0(W[11]) + W[10]; + W[27] = s0(W[12]) + W[11]; + W[28] = s0(W[13]) + W[12]; + W[29] = s0(W[14]) + W[13]; + W[30] = s0(W[15]) + W[14]; + W[31] = s0(W[16]) + W[15]; +} +*/ + +/* +static inline void sha256d_prehash(uint32_t *S, const uint32_t *W) +{ + uint32_t t0, t1; + RNDr(S, W, 0); + RNDr(S, W, 1); + RNDr(S, W, 2); +} +*/ + +#ifdef EXTERN_SHA256 + +void sha256d_ms(uint32_t *hash, uint32_t *W, + const uint32_t *midstate, const uint32_t *prehash); + +#else + +/* +static inline void sha256d_ms(uint32_t *hash, uint32_t *W, + const uint32_t *midstate, const uint32_t *prehash) +{ + uint32_t S[64]; + uint32_t t0, t1; + int i; + + S[18] = W[18]; + S[19] = W[19]; + S[20] = W[20]; + S[22] = W[22]; + S[23] = W[23]; + S[24] = W[24]; + S[30] = W[30]; + S[31] = W[31]; + + W[18] += s0(W[3]); + W[19] += W[3]; + W[20] += s1(W[18]); + W[21] = s1(W[19]); + W[22] += s1(W[20]); + W[23] += s1(W[21]); + W[24] += s1(W[22]); + W[25] = s1(W[23]) + W[18]; + W[26] = s1(W[24]) + W[19]; + W[27] = s1(W[25]) + W[20]; + W[28] = s1(W[26]) + W[21]; + W[29] = s1(W[27]) + W[22]; + W[30] += s1(W[28]) + W[23]; + W[31] += s1(W[29]) + W[24]; + for (i = 32; i < 64; i += 2) { + W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; + W[i+1] = s1(W[i - 1]) + W[i - 6] + s0(W[i - 14]) + W[i - 15]; + } + + memcpy(S, prehash, 32); + + RNDr(S, W, 3); + RNDr(S, W, 4); + RNDr(S, W, 5); + RNDr(S, W, 6); + RNDr(S, W, 7); + RNDr(S, W, 8); + RNDr(S, W, 9); + RNDr(S, W, 10); + RNDr(S, W, 11); + RNDr(S, W, 12); + RNDr(S, W, 13); + RNDr(S, W, 14); + RNDr(S, W, 15); + RNDr(S, W, 16); + RNDr(S, W, 17); + RNDr(S, W, 18); + RNDr(S, W, 19); + RNDr(S, W, 20); + RNDr(S, W, 21); + RNDr(S, W, 22); + RNDr(S, W, 23); + RNDr(S, W, 24); + RNDr(S, W, 25); + RNDr(S, W, 26); + RNDr(S, W, 27); + RNDr(S, W, 28); + RNDr(S, W, 29); + RNDr(S, W, 30); + RNDr(S, W, 31); + RNDr(S, W, 32); + RNDr(S, W, 33); + RNDr(S, W, 34); + RNDr(S, W, 35); + RNDr(S, W, 36); + RNDr(S, W, 37); + RNDr(S, W, 38); + RNDr(S, W, 39); + RNDr(S, W, 40); + RNDr(S, W, 41); + RNDr(S, W, 42); + RNDr(S, W, 43); + RNDr(S, W, 44); + RNDr(S, W, 45); + RNDr(S, W, 46); + RNDr(S, W, 47); + RNDr(S, W, 48); + RNDr(S, W, 49); + RNDr(S, W, 50); + RNDr(S, W, 51); + RNDr(S, W, 52); + RNDr(S, W, 53); + RNDr(S, W, 54); + RNDr(S, W, 55); + RNDr(S, W, 56); + RNDr(S, W, 57); + RNDr(S, W, 58); + RNDr(S, W, 59); + RNDr(S, W, 60); + RNDr(S, W, 61); + RNDr(S, W, 62); + RNDr(S, W, 63); + + for (i = 0; i < 8; i++) + S[i] += midstate[i]; + + W[18] = S[18]; + W[19] = S[19]; + W[20] = S[20]; + W[22] = S[22]; + W[23] = S[23]; + W[24] = S[24]; + W[30] = S[30]; + W[31] = S[31]; + + memcpy(S + 8, sha256d_hash1 + 8, 32); + S[16] = s1(sha256d_hash1[14]) + sha256d_hash1[ 9] + s0(S[ 1]) + S[ 0]; + S[17] = s1(sha256d_hash1[15]) + sha256d_hash1[10] + s0(S[ 2]) + S[ 1]; + S[18] = s1(S[16]) + sha256d_hash1[11] + s0(S[ 3]) + S[ 2]; + S[19] = s1(S[17]) + sha256d_hash1[12] + s0(S[ 4]) + S[ 3]; + S[20] = s1(S[18]) + sha256d_hash1[13] + s0(S[ 5]) + S[ 4]; + S[21] = s1(S[19]) + sha256d_hash1[14] + s0(S[ 6]) + S[ 5]; + S[22] = s1(S[20]) + sha256d_hash1[15] + s0(S[ 7]) + S[ 6]; + S[23] = s1(S[21]) + S[16] + s0(sha256d_hash1[ 8]) + S[ 7]; + S[24] = s1(S[22]) + S[17] + s0(sha256d_hash1[ 9]) + sha256d_hash1[ 8]; + S[25] = s1(S[23]) + S[18] + s0(sha256d_hash1[10]) + sha256d_hash1[ 9]; + S[26] = s1(S[24]) + S[19] + s0(sha256d_hash1[11]) + sha256d_hash1[10]; + S[27] = s1(S[25]) + S[20] + s0(sha256d_hash1[12]) + sha256d_hash1[11]; + S[28] = s1(S[26]) + S[21] + s0(sha256d_hash1[13]) + sha256d_hash1[12]; + S[29] = s1(S[27]) + S[22] + s0(sha256d_hash1[14]) + sha256d_hash1[13]; + S[30] = s1(S[28]) + S[23] + s0(sha256d_hash1[15]) + sha256d_hash1[14]; + S[31] = s1(S[29]) + S[24] + s0(S[16]) + sha256d_hash1[15]; + for (i = 32; i < 60; i += 2) { + S[i] = s1(S[i - 2]) + S[i - 7] + s0(S[i - 15]) + S[i - 16]; + S[i+1] = s1(S[i - 1]) + S[i - 6] + s0(S[i - 14]) + S[i - 15]; + } + S[60] = s1(S[58]) + S[53] + s0(S[45]) + S[44]; + + sha256_init(hash); + + RNDr(hash, S, 0); + RNDr(hash, S, 1); + RNDr(hash, S, 2); + RNDr(hash, S, 3); + RNDr(hash, S, 4); + RNDr(hash, S, 5); + RNDr(hash, S, 6); + RNDr(hash, S, 7); + RNDr(hash, S, 8); + RNDr(hash, S, 9); + RNDr(hash, S, 10); + RNDr(hash, S, 11); + RNDr(hash, S, 12); + RNDr(hash, S, 13); + RNDr(hash, S, 14); + RNDr(hash, S, 15); + RNDr(hash, S, 16); + RNDr(hash, S, 17); + RNDr(hash, S, 18); + RNDr(hash, S, 19); + RNDr(hash, S, 20); + RNDr(hash, S, 21); + RNDr(hash, S, 22); + RNDr(hash, S, 23); + RNDr(hash, S, 24); + RNDr(hash, S, 25); + RNDr(hash, S, 26); + RNDr(hash, S, 27); + RNDr(hash, S, 28); + RNDr(hash, S, 29); + RNDr(hash, S, 30); + RNDr(hash, S, 31); + RNDr(hash, S, 32); + RNDr(hash, S, 33); + RNDr(hash, S, 34); + RNDr(hash, S, 35); + RNDr(hash, S, 36); + RNDr(hash, S, 37); + RNDr(hash, S, 38); + RNDr(hash, S, 39); + RNDr(hash, S, 40); + RNDr(hash, S, 41); + RNDr(hash, S, 42); + RNDr(hash, S, 43); + RNDr(hash, S, 44); + RNDr(hash, S, 45); + RNDr(hash, S, 46); + RNDr(hash, S, 47); + RNDr(hash, S, 48); + RNDr(hash, S, 49); + RNDr(hash, S, 50); + RNDr(hash, S, 51); + RNDr(hash, S, 52); + RNDr(hash, S, 53); + RNDr(hash, S, 54); + RNDr(hash, S, 55); + RNDr(hash, S, 56); + + hash[2] += hash[6] + S1(hash[3]) + Ch(hash[3], hash[4], hash[5]) + + S[57] + sha256_k[57]; + hash[1] += hash[5] + S1(hash[2]) + Ch(hash[2], hash[3], hash[4]) + + S[58] + sha256_k[58]; + hash[0] += hash[4] + S1(hash[1]) + Ch(hash[1], hash[2], hash[3]) + + S[59] + sha256_k[59]; + hash[7] += hash[3] + S1(hash[0]) + Ch(hash[0], hash[1], hash[2]) + + S[60] + sha256_k[60] + + sha256_h[7]; +} +*/ + +#endif /* EXTERN_SHA256 */ + +#if HAVE_SHA256_4WAY + +void sha256d_ms_4way(uint32_t *hash, uint32_t *data, + const uint32_t *midstate, const uint32_t *prehash); + +static inline int scanhash_sha256d_4way(int thr_id, uint32_t *pdata, + const uint32_t *ptarget, uint32_t max_nonce, unsigned long *hashes_done) +{ + uint32_t data[4 * 64] __attribute__((aligned(128))); + uint32_t hash[4 * 8] __attribute__((aligned(32))); + uint32_t midstate[4 * 8] __attribute__((aligned(32))); + uint32_t prehash[4 * 8] __attribute__((aligned(32))); + uint32_t n = pdata[19] - 1; + const uint32_t first_nonce = pdata[19]; + const uint32_t Htarg = ptarget[7]; + int i, j; + + memcpy(data, pdata + 16, 64); + sha256d_preextend(data); + for (i = 31; i >= 0; i--) + for (j = 0; j < 4; j++) + data[i * 4 + j] = data[i]; + + sha256_init(midstate); + sha256_transform(midstate, pdata, 0); + memcpy(prehash, midstate, 32); + sha256d_prehash(prehash, pdata + 16); + for (i = 7; i >= 0; i--) { + for (j = 0; j < 4; j++) { + midstate[i * 4 + j] = midstate[i]; + prehash[i * 4 + j] = prehash[i]; + } + } + + do { + for (i = 0; i < 4; i++) + data[4 * 3 + i] = ++n; + + sha256d_ms_4way(hash, data, midstate, prehash); + + for (i = 0; i < 4; i++) { + if (swab32(hash[4 * 7 + i]) <= Htarg) { + pdata[19] = data[4 * 3 + i]; + sha256d_80_swap(hash, pdata); + if (fulltest(hash, ptarget)) { + *hashes_done = n - first_nonce + 1; + return 1; + } + } + } + } while (n < max_nonce && !work_restart[thr_id].restart); + + *hashes_done = n - first_nonce + 1; + pdata[19] = n; + return 0; +} + +#endif /* HAVE_SHA256_4WAY */ + +#if HAVE_SHA256_8WAY + +void sha256d_ms_8way(uint32_t *hash, uint32_t *data, + const uint32_t *midstate, const uint32_t *prehash); + +#endif /* HAVE_SHA256_8WAY */ From aded6ae049c506482916daf5ae8ec51028121f85 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:22:21 -0500 Subject: [PATCH 218/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 22b6b18b3..fd67df8a5 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -134,6 +134,7 @@ YAAMP_ALGO g_algos[] = {"x16r", x16r_hash, 0x100, 0, 0}, {"x16s", x16s_hash, 0x100, 0, 0}, + {"x16rt", x16rt_hash, 0x100, 0, 0}, {"timetravel", timetravel_hash, 0x100, 0, 0}, {"bitcore", timetravel10_hash, 0x100, 0, 0}, {"exosis", exosis_hash, 0x100, 0, 0}, From 68272f708690b8ae608fc0759d27f2aa2d1e4a35 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:22:58 -0500 Subject: [PATCH 219/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 2ade59a11..bd579b04f 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -156,6 +156,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/x14.h" #include "algos/x15.h" #include "algos/x16r.h" +#include "algos/x16rt.h" #include "algos/x16s.h" #include "algos/x17.h" #include "algos/x18.h" From 089897041a5ee43f0444da508325e13f90bb41d6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:23:50 -0500 Subject: [PATCH 220/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index f5eb22d6a..0b7dac692 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -53,6 +53,7 @@ function yaamp_get_algos() 'x15', 'x16r', 'x16s', + 'x16rt', 'x17', 'x18', 'x20r', @@ -169,6 +170,7 @@ function getAlgoColors($algo) 'x15' => '#f0b080', 'x16r' => '#f0b080', 'x16s' => '#f0b080', + 'x16rt' => '#f0b080', 'x17' => '#f0b0a0', 'x18' => '#f0b0a0', 'x20r' => '#f0b0a0', @@ -259,6 +261,7 @@ function getAlgoPort($algo) 'x15' => 3733, 'x16r' => 3636, 'x16s' => 3663, + 'x16rt' => 7220, 'x17' => 3737, 'x18' => 3738, 'x20r' => 4300, From b6d3ff2c2ebe5cc68b55b388d1943d74dcf6d65c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Feb 2019 23:34:50 -0500 Subject: [PATCH 221/576] Update sha2.c --- stratum/sha3/sha2.c | 869 ++++++++++++++++++++------------------------ 1 file changed, 392 insertions(+), 477 deletions(-) diff --git a/stratum/sha3/sha2.c b/stratum/sha3/sha2.c index 9126dc33b..1989dd1bb 100644 --- a/stratum/sha3/sha2.c +++ b/stratum/sha3/sha2.c @@ -15,58 +15,61 @@ #define EXTERN_SHA256 #endif -static const uint32_t sha256_h[8] = { - 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, - 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 -}; - -static const uint32_t sha256_k[64] = { - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -}; +#define bswap_32(x) ((((x) << 24) & 0xff000000u) | (((x) << 8) & 0x00ff0000u) \ + | (((x) >> 8) & 0x0000ff00u) | (((x) >> 24) & 0x000000ffu)) -void sha256_init(uint32_t *state) +static inline uint32_t swab32(uint32_t v) { - memcpy(state, sha256_h, 32); + return bswap_32(v); } -/* to quiet strict compiler warning */ -uint32_t swab32(uint32_t i); -//uint32_t be32dec(uint32_t *i); -//uint32_t be32enc(uint32_t *j, uint32_t i); - -static __inline uint32_t -be32dec(const void *pp) +#if !HAVE_DECL_BE32ENC +static inline void be32enc(void *pp, uint32_t x) { - const uint8_t *p = (uint8_t const *)pp; - - return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + - ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); + uint8_t *p = (uint8_t *)pp; + p[3] = x & 0xff; + p[2] = (x >> 8) & 0xff; + p[1] = (x >> 16) & 0xff; + p[0] = (x >> 24) & 0xff; } +#endif -static __inline void -be32enc(void *pp, uint32_t x) +#if !HAVE_DECL_BE32DEC +static inline uint32_t be32dec(const void *pp) { - uint8_t * p = (uint8_t *)pp; + const uint8_t *p = (uint8_t const *)pp; + return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + + ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); +} +#endif + +static const uint32_t sha256_h[8] = { + 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 +}; + +static const uint32_t sha256_k[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; - p[3] = x & 0xff; - p[2] = (x >> 8) & 0xff; - p[1] = (x >> 16) & 0xff; - p[0] = (x >> 24) & 0xff; +void sha256_init(uint32_t *state) +{ + memcpy(state, sha256_h, 32); } /* Elementary functions used by SHA256 */ @@ -80,20 +83,20 @@ be32enc(void *pp, uint32_t x) /* SHA256 round function */ #define RND(a, b, c, d, e, f, g, h, k) \ - do { \ - t0 = h + S1(e) + Ch(e, f, g) + k; \ - t1 = S0(a) + Maj(a, b, c); \ - d += t0; \ - h = t0 + t1; \ - } while (0) + do { \ + t0 = h + S1(e) + Ch(e, f, g) + k; \ + t1 = S0(a) + Maj(a, b, c); \ + d += t0; \ + h = t0 + t1; \ + } while (0) /* Adjusted round function for rotating state */ #define RNDr(S, W, i) \ - RND(S[(64 - i) & 7], S[(65 - i) & 7], \ - S[(66 - i) & 7], S[(67 - i) & 7], \ - S[(68 - i) & 7], S[(69 - i) & 7], \ - S[(70 - i) & 7], S[(71 - i) & 7], \ - W[i] + sha256_k[i]) + RND(S[(64 - i) % 8], S[(65 - i) % 8], \ + S[(66 - i) % 8], S[(67 - i) % 8], \ + S[(68 - i) % 8], S[(69 - i) % 8], \ + S[(70 - i) % 8], S[(71 - i) % 8], \ + W[i] + sha256_k[i]) #ifndef EXTERN_SHA256 @@ -103,458 +106,370 @@ be32enc(void *pp, uint32_t x) */ void sha256_transform(uint32_t *state, const uint32_t *block, int swap) { - uint32_t W[64]; - uint32_t S[8]; - uint32_t t0, t1; - int i; - - /* 1. Prepare message schedule W. */ - if (swap) { - for (i = 0; i < 16; i++) - W[i] = swab32(block[i]); - } else - memcpy(W, block, 64); - for (i = 16; i < 64; i += 2) { - W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; - W[i+1] = s1(W[i - 1]) + W[i - 6] + s0(W[i - 14]) + W[i - 15]; - } - - /* 2. Initialize working variables. */ - memcpy(S, state, 32); - - /* 3. Mix. */ - RNDr(S, W, 0); - RNDr(S, W, 1); - RNDr(S, W, 2); - RNDr(S, W, 3); - RNDr(S, W, 4); - RNDr(S, W, 5); - RNDr(S, W, 6); - RNDr(S, W, 7); - RNDr(S, W, 8); - RNDr(S, W, 9); - RNDr(S, W, 10); - RNDr(S, W, 11); - RNDr(S, W, 12); - RNDr(S, W, 13); - RNDr(S, W, 14); - RNDr(S, W, 15); - RNDr(S, W, 16); - RNDr(S, W, 17); - RNDr(S, W, 18); - RNDr(S, W, 19); - RNDr(S, W, 20); - RNDr(S, W, 21); - RNDr(S, W, 22); - RNDr(S, W, 23); - RNDr(S, W, 24); - RNDr(S, W, 25); - RNDr(S, W, 26); - RNDr(S, W, 27); - RNDr(S, W, 28); - RNDr(S, W, 29); - RNDr(S, W, 30); - RNDr(S, W, 31); - RNDr(S, W, 32); - RNDr(S, W, 33); - RNDr(S, W, 34); - RNDr(S, W, 35); - RNDr(S, W, 36); - RNDr(S, W, 37); - RNDr(S, W, 38); - RNDr(S, W, 39); - RNDr(S, W, 40); - RNDr(S, W, 41); - RNDr(S, W, 42); - RNDr(S, W, 43); - RNDr(S, W, 44); - RNDr(S, W, 45); - RNDr(S, W, 46); - RNDr(S, W, 47); - RNDr(S, W, 48); - RNDr(S, W, 49); - RNDr(S, W, 50); - RNDr(S, W, 51); - RNDr(S, W, 52); - RNDr(S, W, 53); - RNDr(S, W, 54); - RNDr(S, W, 55); - RNDr(S, W, 56); - RNDr(S, W, 57); - RNDr(S, W, 58); - RNDr(S, W, 59); - RNDr(S, W, 60); - RNDr(S, W, 61); - RNDr(S, W, 62); - RNDr(S, W, 63); - - /* 4. Mix local working variables into global state */ - for (i = 0; i < 8; i++) - state[i] += S[i]; + uint32_t W[64]; + uint32_t S[8]; + uint32_t t0, t1; + int i; + + /* 1. Prepare message schedule W. */ + if (swap) { + for (i = 0; i < 16; i++) + W[i] = swab32(block[i]); + } else + memcpy(W, block, 64); + for (i = 16; i < 64; i += 2) { + W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; + W[i+1] = s1(W[i - 1]) + W[i - 6] + s0(W[i - 14]) + W[i - 15]; + } + + /* 2. Initialize working variables. */ + memcpy(S, state, 32); + + /* 3. Mix. */ + RNDr(S, W, 0); + RNDr(S, W, 1); + RNDr(S, W, 2); + RNDr(S, W, 3); + RNDr(S, W, 4); + RNDr(S, W, 5); + RNDr(S, W, 6); + RNDr(S, W, 7); + RNDr(S, W, 8); + RNDr(S, W, 9); + RNDr(S, W, 10); + RNDr(S, W, 11); + RNDr(S, W, 12); + RNDr(S, W, 13); + RNDr(S, W, 14); + RNDr(S, W, 15); + RNDr(S, W, 16); + RNDr(S, W, 17); + RNDr(S, W, 18); + RNDr(S, W, 19); + RNDr(S, W, 20); + RNDr(S, W, 21); + RNDr(S, W, 22); + RNDr(S, W, 23); + RNDr(S, W, 24); + RNDr(S, W, 25); + RNDr(S, W, 26); + RNDr(S, W, 27); + RNDr(S, W, 28); + RNDr(S, W, 29); + RNDr(S, W, 30); + RNDr(S, W, 31); + RNDr(S, W, 32); + RNDr(S, W, 33); + RNDr(S, W, 34); + RNDr(S, W, 35); + RNDr(S, W, 36); + RNDr(S, W, 37); + RNDr(S, W, 38); + RNDr(S, W, 39); + RNDr(S, W, 40); + RNDr(S, W, 41); + RNDr(S, W, 42); + RNDr(S, W, 43); + RNDr(S, W, 44); + RNDr(S, W, 45); + RNDr(S, W, 46); + RNDr(S, W, 47); + RNDr(S, W, 48); + RNDr(S, W, 49); + RNDr(S, W, 50); + RNDr(S, W, 51); + RNDr(S, W, 52); + RNDr(S, W, 53); + RNDr(S, W, 54); + RNDr(S, W, 55); + RNDr(S, W, 56); + RNDr(S, W, 57); + RNDr(S, W, 58); + RNDr(S, W, 59); + RNDr(S, W, 60); + RNDr(S, W, 61); + RNDr(S, W, 62); + RNDr(S, W, 63); + + /* 4. Mix local working variables into global state */ + for (i = 0; i < 8; i++) + state[i] += S[i]; } #endif /* EXTERN_SHA256 */ static const uint32_t sha256d_hash1[16] = { - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x80000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000100 + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x80000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000100 }; -/* -static void sha256d_80_swap(uint32_t *hash, const uint32_t *data) -{ - uint32_t S[16]; - int i; - - sha256_init(S); - sha256_transform(S, data, 0); - sha256_transform(S, data + 16, 0); - memcpy(S + 8, sha256d_hash1 + 8, 32); - sha256_init(hash); - sha256_transform(hash, S, 0); - for (i = 0; i < 8; i++) - hash[i] = swab32(hash[i]); -} -*/ void sha256d(unsigned char *hash, const unsigned char *data, int len) { - uint32_t S[16], T[16]; - int i, r; - - sha256_init(S); - for (r = len; r > -9; r -= 64) { - if (r < 64) - memset(T, 0, 64); - memcpy(T, data + len - r, r > 64 ? 64 : (r < 0 ? 0 : r)); - if (r >= 0 && r < 64) - ((unsigned char *)T)[r] = 0x80; - for (i = 0; i < 16; i++) - T[i] = be32dec(T + i); - if (r < 56) - T[15] = 8 * len; - sha256_transform(S, T, 0); - } - memcpy(S + 8, sha256d_hash1 + 8, 32); - sha256_init(T); - sha256_transform(T, S, 0); - for (i = 0; i < 8; i++) - be32enc((uint32_t *)hash + i, T[i]); + uint32_t S[16], T[16]; + int i, r; + + sha256_init(S); + for (r = len; r > -9; r -= 64) { + if (r < 64) + memset(T, 0, 64); + memcpy(T, data + len - r, r > 64 ? 64 : (r < 0 ? 0 : r)); + if (r >= 0 && r < 64) + ((unsigned char *)T)[r] = 0x80; + for (i = 0; i < 16; i++) + T[i] = be32dec(T + i); + if (r < 56) + T[15] = 8 * len; + sha256_transform(S, T, 0); + } + memcpy(S + 8, sha256d_hash1 + 8, 32); + sha256_init(T); + sha256_transform(T, S, 0); + for (i = 0; i < 8; i++) + be32enc((uint32_t *)hash + i, T[i]); } -/* static inline void sha256d_preextend(uint32_t *W) { - W[16] = s1(W[14]) + W[ 9] + s0(W[ 1]) + W[ 0]; - W[17] = s1(W[15]) + W[10] + s0(W[ 2]) + W[ 1]; - W[18] = s1(W[16]) + W[11] + W[ 2]; - W[19] = s1(W[17]) + W[12] + s0(W[ 4]); - W[20] = W[13] + s0(W[ 5]) + W[ 4]; - W[21] = W[14] + s0(W[ 6]) + W[ 5]; - W[22] = W[15] + s0(W[ 7]) + W[ 6]; - W[23] = W[16] + s0(W[ 8]) + W[ 7]; - W[24] = W[17] + s0(W[ 9]) + W[ 8]; - W[25] = s0(W[10]) + W[ 9]; - W[26] = s0(W[11]) + W[10]; - W[27] = s0(W[12]) + W[11]; - W[28] = s0(W[13]) + W[12]; - W[29] = s0(W[14]) + W[13]; - W[30] = s0(W[15]) + W[14]; - W[31] = s0(W[16]) + W[15]; + W[16] = s1(W[14]) + W[ 9] + s0(W[ 1]) + W[ 0]; + W[17] = s1(W[15]) + W[10] + s0(W[ 2]) + W[ 1]; + W[18] = s1(W[16]) + W[11] + W[ 2]; + W[19] = s1(W[17]) + W[12] + s0(W[ 4]); + W[20] = W[13] + s0(W[ 5]) + W[ 4]; + W[21] = W[14] + s0(W[ 6]) + W[ 5]; + W[22] = W[15] + s0(W[ 7]) + W[ 6]; + W[23] = W[16] + s0(W[ 8]) + W[ 7]; + W[24] = W[17] + s0(W[ 9]) + W[ 8]; + W[25] = s0(W[10]) + W[ 9]; + W[26] = s0(W[11]) + W[10]; + W[27] = s0(W[12]) + W[11]; + W[28] = s0(W[13]) + W[12]; + W[29] = s0(W[14]) + W[13]; + W[30] = s0(W[15]) + W[14]; + W[31] = s0(W[16]) + W[15]; } -*/ -/* static inline void sha256d_prehash(uint32_t *S, const uint32_t *W) { - uint32_t t0, t1; - RNDr(S, W, 0); - RNDr(S, W, 1); - RNDr(S, W, 2); + uint32_t t0, t1; + RNDr(S, W, 0); + RNDr(S, W, 1); + RNDr(S, W, 2); } -*/ #ifdef EXTERN_SHA256 void sha256d_ms(uint32_t *hash, uint32_t *W, - const uint32_t *midstate, const uint32_t *prehash); + const uint32_t *midstate, const uint32_t *prehash); #else -/* static inline void sha256d_ms(uint32_t *hash, uint32_t *W, - const uint32_t *midstate, const uint32_t *prehash) + const uint32_t *midstate, const uint32_t *prehash) { - uint32_t S[64]; - uint32_t t0, t1; - int i; - - S[18] = W[18]; - S[19] = W[19]; - S[20] = W[20]; - S[22] = W[22]; - S[23] = W[23]; - S[24] = W[24]; - S[30] = W[30]; - S[31] = W[31]; - - W[18] += s0(W[3]); - W[19] += W[3]; - W[20] += s1(W[18]); - W[21] = s1(W[19]); - W[22] += s1(W[20]); - W[23] += s1(W[21]); - W[24] += s1(W[22]); - W[25] = s1(W[23]) + W[18]; - W[26] = s1(W[24]) + W[19]; - W[27] = s1(W[25]) + W[20]; - W[28] = s1(W[26]) + W[21]; - W[29] = s1(W[27]) + W[22]; - W[30] += s1(W[28]) + W[23]; - W[31] += s1(W[29]) + W[24]; - for (i = 32; i < 64; i += 2) { - W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; - W[i+1] = s1(W[i - 1]) + W[i - 6] + s0(W[i - 14]) + W[i - 15]; - } - - memcpy(S, prehash, 32); - - RNDr(S, W, 3); - RNDr(S, W, 4); - RNDr(S, W, 5); - RNDr(S, W, 6); - RNDr(S, W, 7); - RNDr(S, W, 8); - RNDr(S, W, 9); - RNDr(S, W, 10); - RNDr(S, W, 11); - RNDr(S, W, 12); - RNDr(S, W, 13); - RNDr(S, W, 14); - RNDr(S, W, 15); - RNDr(S, W, 16); - RNDr(S, W, 17); - RNDr(S, W, 18); - RNDr(S, W, 19); - RNDr(S, W, 20); - RNDr(S, W, 21); - RNDr(S, W, 22); - RNDr(S, W, 23); - RNDr(S, W, 24); - RNDr(S, W, 25); - RNDr(S, W, 26); - RNDr(S, W, 27); - RNDr(S, W, 28); - RNDr(S, W, 29); - RNDr(S, W, 30); - RNDr(S, W, 31); - RNDr(S, W, 32); - RNDr(S, W, 33); - RNDr(S, W, 34); - RNDr(S, W, 35); - RNDr(S, W, 36); - RNDr(S, W, 37); - RNDr(S, W, 38); - RNDr(S, W, 39); - RNDr(S, W, 40); - RNDr(S, W, 41); - RNDr(S, W, 42); - RNDr(S, W, 43); - RNDr(S, W, 44); - RNDr(S, W, 45); - RNDr(S, W, 46); - RNDr(S, W, 47); - RNDr(S, W, 48); - RNDr(S, W, 49); - RNDr(S, W, 50); - RNDr(S, W, 51); - RNDr(S, W, 52); - RNDr(S, W, 53); - RNDr(S, W, 54); - RNDr(S, W, 55); - RNDr(S, W, 56); - RNDr(S, W, 57); - RNDr(S, W, 58); - RNDr(S, W, 59); - RNDr(S, W, 60); - RNDr(S, W, 61); - RNDr(S, W, 62); - RNDr(S, W, 63); - - for (i = 0; i < 8; i++) - S[i] += midstate[i]; - - W[18] = S[18]; - W[19] = S[19]; - W[20] = S[20]; - W[22] = S[22]; - W[23] = S[23]; - W[24] = S[24]; - W[30] = S[30]; - W[31] = S[31]; - - memcpy(S + 8, sha256d_hash1 + 8, 32); - S[16] = s1(sha256d_hash1[14]) + sha256d_hash1[ 9] + s0(S[ 1]) + S[ 0]; - S[17] = s1(sha256d_hash1[15]) + sha256d_hash1[10] + s0(S[ 2]) + S[ 1]; - S[18] = s1(S[16]) + sha256d_hash1[11] + s0(S[ 3]) + S[ 2]; - S[19] = s1(S[17]) + sha256d_hash1[12] + s0(S[ 4]) + S[ 3]; - S[20] = s1(S[18]) + sha256d_hash1[13] + s0(S[ 5]) + S[ 4]; - S[21] = s1(S[19]) + sha256d_hash1[14] + s0(S[ 6]) + S[ 5]; - S[22] = s1(S[20]) + sha256d_hash1[15] + s0(S[ 7]) + S[ 6]; - S[23] = s1(S[21]) + S[16] + s0(sha256d_hash1[ 8]) + S[ 7]; - S[24] = s1(S[22]) + S[17] + s0(sha256d_hash1[ 9]) + sha256d_hash1[ 8]; - S[25] = s1(S[23]) + S[18] + s0(sha256d_hash1[10]) + sha256d_hash1[ 9]; - S[26] = s1(S[24]) + S[19] + s0(sha256d_hash1[11]) + sha256d_hash1[10]; - S[27] = s1(S[25]) + S[20] + s0(sha256d_hash1[12]) + sha256d_hash1[11]; - S[28] = s1(S[26]) + S[21] + s0(sha256d_hash1[13]) + sha256d_hash1[12]; - S[29] = s1(S[27]) + S[22] + s0(sha256d_hash1[14]) + sha256d_hash1[13]; - S[30] = s1(S[28]) + S[23] + s0(sha256d_hash1[15]) + sha256d_hash1[14]; - S[31] = s1(S[29]) + S[24] + s0(S[16]) + sha256d_hash1[15]; - for (i = 32; i < 60; i += 2) { - S[i] = s1(S[i - 2]) + S[i - 7] + s0(S[i - 15]) + S[i - 16]; - S[i+1] = s1(S[i - 1]) + S[i - 6] + s0(S[i - 14]) + S[i - 15]; - } - S[60] = s1(S[58]) + S[53] + s0(S[45]) + S[44]; - - sha256_init(hash); - - RNDr(hash, S, 0); - RNDr(hash, S, 1); - RNDr(hash, S, 2); - RNDr(hash, S, 3); - RNDr(hash, S, 4); - RNDr(hash, S, 5); - RNDr(hash, S, 6); - RNDr(hash, S, 7); - RNDr(hash, S, 8); - RNDr(hash, S, 9); - RNDr(hash, S, 10); - RNDr(hash, S, 11); - RNDr(hash, S, 12); - RNDr(hash, S, 13); - RNDr(hash, S, 14); - RNDr(hash, S, 15); - RNDr(hash, S, 16); - RNDr(hash, S, 17); - RNDr(hash, S, 18); - RNDr(hash, S, 19); - RNDr(hash, S, 20); - RNDr(hash, S, 21); - RNDr(hash, S, 22); - RNDr(hash, S, 23); - RNDr(hash, S, 24); - RNDr(hash, S, 25); - RNDr(hash, S, 26); - RNDr(hash, S, 27); - RNDr(hash, S, 28); - RNDr(hash, S, 29); - RNDr(hash, S, 30); - RNDr(hash, S, 31); - RNDr(hash, S, 32); - RNDr(hash, S, 33); - RNDr(hash, S, 34); - RNDr(hash, S, 35); - RNDr(hash, S, 36); - RNDr(hash, S, 37); - RNDr(hash, S, 38); - RNDr(hash, S, 39); - RNDr(hash, S, 40); - RNDr(hash, S, 41); - RNDr(hash, S, 42); - RNDr(hash, S, 43); - RNDr(hash, S, 44); - RNDr(hash, S, 45); - RNDr(hash, S, 46); - RNDr(hash, S, 47); - RNDr(hash, S, 48); - RNDr(hash, S, 49); - RNDr(hash, S, 50); - RNDr(hash, S, 51); - RNDr(hash, S, 52); - RNDr(hash, S, 53); - RNDr(hash, S, 54); - RNDr(hash, S, 55); - RNDr(hash, S, 56); - - hash[2] += hash[6] + S1(hash[3]) + Ch(hash[3], hash[4], hash[5]) - + S[57] + sha256_k[57]; - hash[1] += hash[5] + S1(hash[2]) + Ch(hash[2], hash[3], hash[4]) - + S[58] + sha256_k[58]; - hash[0] += hash[4] + S1(hash[1]) + Ch(hash[1], hash[2], hash[3]) - + S[59] + sha256_k[59]; - hash[7] += hash[3] + S1(hash[0]) + Ch(hash[0], hash[1], hash[2]) - + S[60] + sha256_k[60] - + sha256_h[7]; + uint32_t S[64]; + uint32_t t0, t1; + int i; + + S[18] = W[18]; + S[19] = W[19]; + S[20] = W[20]; + S[22] = W[22]; + S[23] = W[23]; + S[24] = W[24]; + S[30] = W[30]; + S[31] = W[31]; + + W[18] += s0(W[3]); + W[19] += W[3]; + W[20] += s1(W[18]); + W[21] = s1(W[19]); + W[22] += s1(W[20]); + W[23] += s1(W[21]); + W[24] += s1(W[22]); + W[25] = s1(W[23]) + W[18]; + W[26] = s1(W[24]) + W[19]; + W[27] = s1(W[25]) + W[20]; + W[28] = s1(W[26]) + W[21]; + W[29] = s1(W[27]) + W[22]; + W[30] += s1(W[28]) + W[23]; + W[31] += s1(W[29]) + W[24]; + for (i = 32; i < 64; i += 2) { + W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; + W[i+1] = s1(W[i - 1]) + W[i - 6] + s0(W[i - 14]) + W[i - 15]; + } + + memcpy(S, prehash, 32); + + RNDr(S, W, 3); + RNDr(S, W, 4); + RNDr(S, W, 5); + RNDr(S, W, 6); + RNDr(S, W, 7); + RNDr(S, W, 8); + RNDr(S, W, 9); + RNDr(S, W, 10); + RNDr(S, W, 11); + RNDr(S, W, 12); + RNDr(S, W, 13); + RNDr(S, W, 14); + RNDr(S, W, 15); + RNDr(S, W, 16); + RNDr(S, W, 17); + RNDr(S, W, 18); + RNDr(S, W, 19); + RNDr(S, W, 20); + RNDr(S, W, 21); + RNDr(S, W, 22); + RNDr(S, W, 23); + RNDr(S, W, 24); + RNDr(S, W, 25); + RNDr(S, W, 26); + RNDr(S, W, 27); + RNDr(S, W, 28); + RNDr(S, W, 29); + RNDr(S, W, 30); + RNDr(S, W, 31); + RNDr(S, W, 32); + RNDr(S, W, 33); + RNDr(S, W, 34); + RNDr(S, W, 35); + RNDr(S, W, 36); + RNDr(S, W, 37); + RNDr(S, W, 38); + RNDr(S, W, 39); + RNDr(S, W, 40); + RNDr(S, W, 41); + RNDr(S, W, 42); + RNDr(S, W, 43); + RNDr(S, W, 44); + RNDr(S, W, 45); + RNDr(S, W, 46); + RNDr(S, W, 47); + RNDr(S, W, 48); + RNDr(S, W, 49); + RNDr(S, W, 50); + RNDr(S, W, 51); + RNDr(S, W, 52); + RNDr(S, W, 53); + RNDr(S, W, 54); + RNDr(S, W, 55); + RNDr(S, W, 56); + RNDr(S, W, 57); + RNDr(S, W, 58); + RNDr(S, W, 59); + RNDr(S, W, 60); + RNDr(S, W, 61); + RNDr(S, W, 62); + RNDr(S, W, 63); + + for (i = 0; i < 8; i++) + S[i] += midstate[i]; + + W[18] = S[18]; + W[19] = S[19]; + W[20] = S[20]; + W[22] = S[22]; + W[23] = S[23]; + W[24] = S[24]; + W[30] = S[30]; + W[31] = S[31]; + + memcpy(S + 8, sha256d_hash1 + 8, 32); + S[16] = s1(sha256d_hash1[14]) + sha256d_hash1[ 9] + s0(S[ 1]) + S[ 0]; + S[17] = s1(sha256d_hash1[15]) + sha256d_hash1[10] + s0(S[ 2]) + S[ 1]; + S[18] = s1(S[16]) + sha256d_hash1[11] + s0(S[ 3]) + S[ 2]; + S[19] = s1(S[17]) + sha256d_hash1[12] + s0(S[ 4]) + S[ 3]; + S[20] = s1(S[18]) + sha256d_hash1[13] + s0(S[ 5]) + S[ 4]; + S[21] = s1(S[19]) + sha256d_hash1[14] + s0(S[ 6]) + S[ 5]; + S[22] = s1(S[20]) + sha256d_hash1[15] + s0(S[ 7]) + S[ 6]; + S[23] = s1(S[21]) + S[16] + s0(sha256d_hash1[ 8]) + S[ 7]; + S[24] = s1(S[22]) + S[17] + s0(sha256d_hash1[ 9]) + sha256d_hash1[ 8]; + S[25] = s1(S[23]) + S[18] + s0(sha256d_hash1[10]) + sha256d_hash1[ 9]; + S[26] = s1(S[24]) + S[19] + s0(sha256d_hash1[11]) + sha256d_hash1[10]; + S[27] = s1(S[25]) + S[20] + s0(sha256d_hash1[12]) + sha256d_hash1[11]; + S[28] = s1(S[26]) + S[21] + s0(sha256d_hash1[13]) + sha256d_hash1[12]; + S[29] = s1(S[27]) + S[22] + s0(sha256d_hash1[14]) + sha256d_hash1[13]; + S[30] = s1(S[28]) + S[23] + s0(sha256d_hash1[15]) + sha256d_hash1[14]; + S[31] = s1(S[29]) + S[24] + s0(S[16]) + sha256d_hash1[15]; + for (i = 32; i < 60; i += 2) { + S[i] = s1(S[i - 2]) + S[i - 7] + s0(S[i - 15]) + S[i - 16]; + S[i+1] = s1(S[i - 1]) + S[i - 6] + s0(S[i - 14]) + S[i - 15]; + } + S[60] = s1(S[58]) + S[53] + s0(S[45]) + S[44]; + + sha256_init(hash); + + RNDr(hash, S, 0); + RNDr(hash, S, 1); + RNDr(hash, S, 2); + RNDr(hash, S, 3); + RNDr(hash, S, 4); + RNDr(hash, S, 5); + RNDr(hash, S, 6); + RNDr(hash, S, 7); + RNDr(hash, S, 8); + RNDr(hash, S, 9); + RNDr(hash, S, 10); + RNDr(hash, S, 11); + RNDr(hash, S, 12); + RNDr(hash, S, 13); + RNDr(hash, S, 14); + RNDr(hash, S, 15); + RNDr(hash, S, 16); + RNDr(hash, S, 17); + RNDr(hash, S, 18); + RNDr(hash, S, 19); + RNDr(hash, S, 20); + RNDr(hash, S, 21); + RNDr(hash, S, 22); + RNDr(hash, S, 23); + RNDr(hash, S, 24); + RNDr(hash, S, 25); + RNDr(hash, S, 26); + RNDr(hash, S, 27); + RNDr(hash, S, 28); + RNDr(hash, S, 29); + RNDr(hash, S, 30); + RNDr(hash, S, 31); + RNDr(hash, S, 32); + RNDr(hash, S, 33); + RNDr(hash, S, 34); + RNDr(hash, S, 35); + RNDr(hash, S, 36); + RNDr(hash, S, 37); + RNDr(hash, S, 38); + RNDr(hash, S, 39); + RNDr(hash, S, 40); + RNDr(hash, S, 41); + RNDr(hash, S, 42); + RNDr(hash, S, 43); + RNDr(hash, S, 44); + RNDr(hash, S, 45); + RNDr(hash, S, 46); + RNDr(hash, S, 47); + RNDr(hash, S, 48); + RNDr(hash, S, 49); + RNDr(hash, S, 50); + RNDr(hash, S, 51); + RNDr(hash, S, 52); + RNDr(hash, S, 53); + RNDr(hash, S, 54); + RNDr(hash, S, 55); + RNDr(hash, S, 56); + + hash[2] += hash[6] + S1(hash[3]) + Ch(hash[3], hash[4], hash[5]) + + S[57] + sha256_k[57]; + hash[1] += hash[5] + S1(hash[2]) + Ch(hash[2], hash[3], hash[4]) + + S[58] + sha256_k[58]; + hash[0] += hash[4] + S1(hash[1]) + Ch(hash[1], hash[2], hash[3]) + + S[59] + sha256_k[59]; + hash[7] += hash[3] + S1(hash[0]) + Ch(hash[0], hash[1], hash[2]) + + S[60] + sha256_k[60] + + sha256_h[7]; } -*/ #endif /* EXTERN_SHA256 */ - -#if HAVE_SHA256_4WAY - -void sha256d_ms_4way(uint32_t *hash, uint32_t *data, - const uint32_t *midstate, const uint32_t *prehash); - -static inline int scanhash_sha256d_4way(int thr_id, uint32_t *pdata, - const uint32_t *ptarget, uint32_t max_nonce, unsigned long *hashes_done) -{ - uint32_t data[4 * 64] __attribute__((aligned(128))); - uint32_t hash[4 * 8] __attribute__((aligned(32))); - uint32_t midstate[4 * 8] __attribute__((aligned(32))); - uint32_t prehash[4 * 8] __attribute__((aligned(32))); - uint32_t n = pdata[19] - 1; - const uint32_t first_nonce = pdata[19]; - const uint32_t Htarg = ptarget[7]; - int i, j; - - memcpy(data, pdata + 16, 64); - sha256d_preextend(data); - for (i = 31; i >= 0; i--) - for (j = 0; j < 4; j++) - data[i * 4 + j] = data[i]; - - sha256_init(midstate); - sha256_transform(midstate, pdata, 0); - memcpy(prehash, midstate, 32); - sha256d_prehash(prehash, pdata + 16); - for (i = 7; i >= 0; i--) { - for (j = 0; j < 4; j++) { - midstate[i * 4 + j] = midstate[i]; - prehash[i * 4 + j] = prehash[i]; - } - } - - do { - for (i = 0; i < 4; i++) - data[4 * 3 + i] = ++n; - - sha256d_ms_4way(hash, data, midstate, prehash); - - for (i = 0; i < 4; i++) { - if (swab32(hash[4 * 7 + i]) <= Htarg) { - pdata[19] = data[4 * 3 + i]; - sha256d_80_swap(hash, pdata); - if (fulltest(hash, ptarget)) { - *hashes_done = n - first_nonce + 1; - return 1; - } - } - } - } while (n < max_nonce && !work_restart[thr_id].restart); - - *hashes_done = n - first_nonce + 1; - pdata[19] = n; - return 0; -} - -#endif /* HAVE_SHA256_4WAY */ - -#if HAVE_SHA256_8WAY - -void sha256d_ms_8way(uint32_t *hash, uint32_t *data, - const uint32_t *midstate, const uint32_t *prehash); - -#endif /* HAVE_SHA256_8WAY */ From b8e463caed242c18e376837c74d5259ec28ab185 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 08:25:04 -0500 Subject: [PATCH 222/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index efdd5a3a5..0b9e5eff0 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -392,7 +392,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "MXT") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From 68911f5207e63281b413e843f875ef6db13bd612 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 08:29:20 -0500 Subject: [PATCH 223/576] Update coinbase.cpp --- stratum/coinbase.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 0b9e5eff0..e5bc0cd6f 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -392,7 +392,49 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "MXT") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if (strcmp(coind->symbol,"MXT") == 0) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + + json_value* subsidyreward = json_get_array(json_result, "subsidy"); + if (subsidyreward) + { + const char *payee = json_get_string(subsidyreward, "address"); + json_int_t amount = json_get_int(subsidyreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + + } + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From b4ee47128bdb90f8c512cdf8739a80de0c3d8c6a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 08:41:23 -0500 Subject: [PATCH 224/576] Update coinbase.cpp --- stratum/coinbase.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index e5bc0cd6f..393062849 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -392,48 +392,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if (strcmp(coind->symbol,"MXT") == 0) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - - json_value* subsidyreward = json_get_array(json_result, "subsidy"); - if (subsidyreward) - { - const char *payee = json_get_string(subsidyreward, "address"); - json_int_t amount = json_get_int(subsidyreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; From a7c49865ed1f80ef3d561576411fac71d2872970 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 09:14:50 -0500 Subject: [PATCH 225/576] Update coinbase.cpp --- stratum/coinbase.cpp | 86 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 393062849..871a2d16d 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -260,6 +260,92 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } + + else if(strcmp(coind->symbol, "TUX") == 0) { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "donation_payee"); + if(payee != NULL){ + sprintf(coind->charity_address, "%s", payee); + } else { + sprintf(coind->charity_address, "%s", ""); + } + + if(strlen(coind->charity_address) > 0){ + char script_payee[1024]; + char charity_payee[256] = { 0 }; + sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "donation_amount"); + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + debuglog("pack tx %s\n", coinb2_part); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + } + + // 2 txs are required on these coins, one for foundation (dev fees) + if(coind->charity_percent && !coind->hasmasternodes) + { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + if (charity_amount <= 0) + charity_amount = (available * coind->charity_percent) / 100; + + available -= charity_amount; + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) { char script_dests[2048] = { 0 }; From c88cb890425d6dad4f41d2e2d60d15f788a598d4 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 09:15:55 -0500 Subject: [PATCH 226/576] Update serverconfig.sample.php --- web/serverconfig.sample.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/serverconfig.sample.php b/web/serverconfig.sample.php index ade3b20a3..a38069ce2 100644 --- a/web/serverconfig.sample.php +++ b/web/serverconfig.sample.php @@ -56,6 +56,7 @@ define('EXCH_COINMARKETS_USER', ''); define('EXCH_COINMARKETS_PIN', ''); define('EXCH_CREX24_KEY', ''); +define('EXCH_CRYPTOBRIDGE_ID', ''); define('EXCH_BINANCE_KEY', ''); define('EXCH_BITSTAMP_ID',''); define('EXCH_BITSTAMP_KEY',''); From 63279b35efb7d32558c93595527188fa66e930d5 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 09:16:27 -0500 Subject: [PATCH 227/576] Create cryptobridge_trading.php --- .../core/trading/cryptobridge_trading.php | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 web/yaamp/core/trading/cryptobridge_trading.php diff --git a/web/yaamp/core/trading/cryptobridge_trading.php b/web/yaamp/core/trading/cryptobridge_trading.php new file mode 100644 index 000000000..48d936d57 --- /dev/null +++ b/web/yaamp/core/trading/cryptobridge_trading.php @@ -0,0 +1,75 @@ +balance = 0; + $savebalance->onsell = 0; + $savebalance->save(); + } + + foreach($balances as $asset => $balance) + { + $parts = explode('.', $asset); + $symbol = arraySafeVal($parts,1); + if (empty($symbol) || $parts[0] != 'BRIDGE') continue; + + if ($symbol == 'BTC') { + if (is_object($savebalance)) { + $savebalance->balance = arraySafeVal($balance,'balance',0); + $savebalance->onsell = arraySafeVal($balance,'orders',0); + $savebalance->save(); + } + continue; + } + + if ($updatebalances) { + // store available balance in market table + $coins = getdbolist('db_coins', "symbol=:symbol OR symbol2=:symbol", + array(':symbol'=>$symbol) + ); + if (empty($coins)) continue; + foreach ($coins as $coin) { + $market = getdbosql('db_markets', "coinid=:coinid AND name='$exchange'", array(':coinid'=>$coin->id)); + if (!$market) continue; + $market->balance = arraySafeVal($balance,'balance',0); + $market->ontrade = arraySafeVal($balance,'orders',0); + $market->balancetime = time(); + $market->save(); + } + } + } + + if (!YAAMP_ALLOW_EXCHANGE) return; + + // more could be done i guess +} From d55c96e7d9032e51f1857a3e0cb6f737d18751f6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 09:17:23 -0500 Subject: [PATCH 228/576] Update trading.php --- web/yaamp/core/trading/trading.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/yaamp/core/trading/trading.php b/web/yaamp/core/trading/trading.php index 8844a5971..2f9e4d23b 100644 --- a/web/yaamp/core/trading/trading.php +++ b/web/yaamp/core/trading/trading.php @@ -11,6 +11,7 @@ require_once('alcurex_trading.php'); require_once('coinsmarkets_trading.php'); require_once('crex24_trading.php'); +require_once('cryptobridge_trading.php'); require_once('cryptopia_trading.php'); require_once('hitbtc_trading.php'); require_once('kucoin_trading.php'); @@ -97,6 +98,7 @@ function runExchange($exchangeName=false) break; case 'cryptobridge': + doCryptobridgeTrading(true); updateCryptoBridgeMarkets(); break; From 10d456911f3dfb0402c3b87cc944baf5c7a1f1e3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 09:17:54 -0500 Subject: [PATCH 229/576] Update defaultconfig.php --- web/yaamp/defaultconfig.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/yaamp/defaultconfig.php b/web/yaamp/defaultconfig.php index 2e66fd2a0..8afbe3f9d 100644 --- a/web/yaamp/defaultconfig.php +++ b/web/yaamp/defaultconfig.php @@ -36,6 +36,7 @@ if (!defined('EXCH_CEXIO_ID')) define('EXCH_CEXIO_ID', ''); if (!defined('EXCH_CEXIO_KEY')) define('EXCH_CEXIO_KEY', ''); if (!defined('EXCH_CREX24_KEY')) define('EXCH_CREX24_KEY', ''); +if (!defined('EXCH_CRYPTOBRIDGE_ID')) define('EXCH_CRYPTOBRIDGE_ID', ''); if (!defined('EXCH_CRYPTOPIA_KEY')) define('EXCH_CRYPTOPIA_KEY', ''); if (!defined('EXCH_HITBTC_KEY')) define('EXCH_HITBTC_KEY', ''); if (!defined('EXCH_POLONIEX_KEY')) define('EXCH_POLONIEX_KEY', ''); From 9ba8bee41a2616d543d6f1f492b4e97c79b896c0 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 09:18:28 -0500 Subject: [PATCH 230/576] Update CronjobController.php --- web/yaamp/modules/thread/CronjobController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/yaamp/modules/thread/CronjobController.php b/web/yaamp/modules/thread/CronjobController.php index c3bab1847..f6c2233e8 100644 --- a/web/yaamp/modules/thread/CronjobController.php +++ b/web/yaamp/modules/thread/CronjobController.php @@ -144,6 +144,7 @@ public function actionRun() doCCexTrading(); doBterTrading(); doBleutradeTrading(); + doCryptobridgeTrading(); doKuCoinTrading(); doNovaTrading(); doYobitTrading(); From 1a035752e2500caedf905f476718d4cf437b9e76 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Feb 2019 12:28:52 -0500 Subject: [PATCH 231/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 871a2d16d..9966e887d 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -479,7 +479,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From 53236df0e868a8a279996ac2bcb9bcdb59a433f4 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 6 Feb 2019 23:53:24 +0300 Subject: [PATCH 232/576] Add coinbase_payload size --- stratum/coinbase.cpp | 6 +++++- stratum/util.cpp | 20 ++++++++++++++++++++ stratum/util.h | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 6aefca9a3..2184d1c38 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -478,8 +478,12 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * strcat(templ->coinb2, script_dests); job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - if(coinbase_payload && strlen(coinbase_payload) > 0) + if(coinbase_payload && strlen(coinbase_payload) > 0) { + char coinbase_payload_size[18]; + ser_compactsize((unsigned int)(strlen(coinbase_payload_size) >> 1), coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload_size); strcat(templ->coinb2, coinbase_payload); + } coind->reward = (double)available/100000000*coind->reward_mul; //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); diff --git a/stratum/util.cpp b/stratum/util.cpp index 92f284a80..3687d86da 100644 --- a/stratum/util.cpp +++ b/stratum/util.cpp @@ -479,6 +479,26 @@ void ser_number(int n, char *a) // printf("ser_number %d, %s\n", n, a); } +void ser_compactsize(uint64_t nSize, char *a) +{ + if (nSize < 253) + { + sprintf(a, "%02lx", nSize); + } + else if (nSize <= (unsigned short)-1) + { + sprintf(a, "%02x%04lx", 253, nSize); + } + else if (nSize <= (unsigned int)-1) + { + sprintf(a, "%02x%08lx", 254, nSize); + } + else + { + sprintf(a, "%02x%016lx", 255, nSize); + } +} + void ser_string_be(const char *input, char *output, int len) { for(int i=0; i Date: Sat, 9 Feb 2019 18:26:53 -0500 Subject: [PATCH 233/576] Create blake2-impl.h --- stratum/algos/crypto/blake2-impl.h | 160 +++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 stratum/algos/crypto/blake2-impl.h diff --git a/stratum/algos/crypto/blake2-impl.h b/stratum/algos/crypto/blake2-impl.h new file mode 100644 index 000000000..5dff7fc7a --- /dev/null +++ b/stratum/algos/crypto/blake2-impl.h @@ -0,0 +1,160 @@ +/* + BLAKE2 reference source code package - reference C implementations + + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ +#ifndef BLAKE2_IMPL_H +#define BLAKE2_IMPL_H + +#include +#include + +#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) + #if defined(_MSC_VER) + #define BLAKE2_INLINE __inline + #elif defined(__GNUC__) + #define BLAKE2_INLINE __inline__ + #else + #define BLAKE2_INLINE + #endif +#else + #define BLAKE2_INLINE inline +#endif + +static BLAKE2_INLINE uint32_t load32( const void *src ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + uint32_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = ( const uint8_t * )src; + return (( uint32_t )( p[0] ) << 0) | + (( uint32_t )( p[1] ) << 8) | + (( uint32_t )( p[2] ) << 16) | + (( uint32_t )( p[3] ) << 24) ; +#endif +} + +static BLAKE2_INLINE uint64_t load64( const void *src ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + uint64_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = ( const uint8_t * )src; + return (( uint64_t )( p[0] ) << 0) | + (( uint64_t )( p[1] ) << 8) | + (( uint64_t )( p[2] ) << 16) | + (( uint64_t )( p[3] ) << 24) | + (( uint64_t )( p[4] ) << 32) | + (( uint64_t )( p[5] ) << 40) | + (( uint64_t )( p[6] ) << 48) | + (( uint64_t )( p[7] ) << 56) ; +#endif +} + +static BLAKE2_INLINE uint16_t load16( const void *src ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + uint16_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = ( const uint8_t * )src; + return (( uint16_t )( p[0] ) << 0) | + (( uint16_t )( p[1] ) << 8) ; +#endif +} + +static BLAKE2_INLINE void store16( void *dst, uint16_t w ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = ( uint8_t * )dst; + *p++ = ( uint8_t )w; w >>= 8; + *p++ = ( uint8_t )w; +#endif +} + +static BLAKE2_INLINE void store32( void *dst, uint32_t w ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = ( uint8_t * )dst; + p[0] = (uint8_t)(w >> 0); + p[1] = (uint8_t)(w >> 8); + p[2] = (uint8_t)(w >> 16); + p[3] = (uint8_t)(w >> 24); +#endif +} + +static BLAKE2_INLINE void store64( void *dst, uint64_t w ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = ( uint8_t * )dst; + p[0] = (uint8_t)(w >> 0); + p[1] = (uint8_t)(w >> 8); + p[2] = (uint8_t)(w >> 16); + p[3] = (uint8_t)(w >> 24); + p[4] = (uint8_t)(w >> 32); + p[5] = (uint8_t)(w >> 40); + p[6] = (uint8_t)(w >> 48); + p[7] = (uint8_t)(w >> 56); +#endif +} + +static BLAKE2_INLINE uint64_t load48( const void *src ) +{ + const uint8_t *p = ( const uint8_t * )src; + return (( uint64_t )( p[0] ) << 0) | + (( uint64_t )( p[1] ) << 8) | + (( uint64_t )( p[2] ) << 16) | + (( uint64_t )( p[3] ) << 24) | + (( uint64_t )( p[4] ) << 32) | + (( uint64_t )( p[5] ) << 40) ; +} + +static BLAKE2_INLINE void store48( void *dst, uint64_t w ) +{ + uint8_t *p = ( uint8_t * )dst; + p[0] = (uint8_t)(w >> 0); + p[1] = (uint8_t)(w >> 8); + p[2] = (uint8_t)(w >> 16); + p[3] = (uint8_t)(w >> 24); + p[4] = (uint8_t)(w >> 32); + p[5] = (uint8_t)(w >> 40); +} + +static BLAKE2_INLINE uint32_t rotr32( const uint32_t w, const unsigned c ) +{ + return ( w >> c ) | ( w << ( 32 - c ) ); +} + +static BLAKE2_INLINE uint64_t rotr64( const uint64_t w, const unsigned c ) +{ + return ( w >> c ) | ( w << ( 64 - c ) ); +} + +/* prevents compiler optimizing out memset() */ +static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) +{ + static void *(*const volatile memset_v)(void *, int, size_t) = &memset; + memset_v(v, 0, n); +} + +#endif From 1b2b8bb5bfa49c3e916e9193406103044deb5e77 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:27:17 -0500 Subject: [PATCH 234/576] Create blake2.h --- stratum/algos/crypto/blake2.h | 195 ++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 stratum/algos/crypto/blake2.h diff --git a/stratum/algos/crypto/blake2.h b/stratum/algos/crypto/blake2.h new file mode 100644 index 000000000..ad62f260e --- /dev/null +++ b/stratum/algos/crypto/blake2.h @@ -0,0 +1,195 @@ +/* + BLAKE2 reference source code package - reference C implementations + + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ +#ifndef BLAKE2_H +#define BLAKE2_H + +#include +#include + +#if defined(_MSC_VER) +#define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop)) +#else +#define BLAKE2_PACKED(x) x __attribute__((packed)) +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + + enum blake2s_constant + { + BLAKE2S_BLOCKBYTES = 64, + BLAKE2S_OUTBYTES = 32, + BLAKE2S_KEYBYTES = 32, + BLAKE2S_SALTBYTES = 8, + BLAKE2S_PERSONALBYTES = 8 + }; + + enum blake2b_constant + { + BLAKE2B_BLOCKBYTES = 128, + BLAKE2B_OUTBYTES = 64, + BLAKE2B_KEYBYTES = 64, + BLAKE2B_SALTBYTES = 16, + BLAKE2B_PERSONALBYTES = 16 + }; + + typedef struct blake2s_state__ + { + uint32_t h[8]; + uint32_t t[2]; + uint32_t f[2]; + uint8_t buf[BLAKE2S_BLOCKBYTES]; + size_t buflen; + size_t outlen; + uint8_t last_node; + } blake2s_state; + + typedef struct blake2b_state__ + { + uint64_t h[8]; + uint64_t t[2]; + uint64_t f[2]; + uint8_t buf[BLAKE2B_BLOCKBYTES]; + size_t buflen; + size_t outlen; + uint8_t last_node; + } blake2b_state; + + typedef struct blake2sp_state__ + { + blake2s_state S[8][1]; + blake2s_state R[1]; + uint8_t buf[8 * BLAKE2S_BLOCKBYTES]; + size_t buflen; + size_t outlen; + } blake2sp_state; + + typedef struct blake2bp_state__ + { + blake2b_state S[4][1]; + blake2b_state R[1]; + uint8_t buf[4 * BLAKE2B_BLOCKBYTES]; + size_t buflen; + size_t outlen; + } blake2bp_state; + + + BLAKE2_PACKED(struct blake2s_param__ + { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint16_t xof_length; /* 14 */ + uint8_t node_depth; /* 15 */ + uint8_t inner_length; /* 16 */ + /* uint8_t reserved[0]; */ + uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ + uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ + }); + + typedef struct blake2s_param__ blake2s_param; + + BLAKE2_PACKED(struct blake2b_param__ + { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint32_t xof_length; /* 16 */ + uint8_t node_depth; /* 17 */ + uint8_t inner_length; /* 18 */ + uint8_t reserved[14]; /* 32 */ + uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ + uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ + }); + + typedef struct blake2b_param__ blake2b_param; + + typedef struct blake2xs_state__ + { + blake2s_state S[1]; + blake2s_param P[1]; + } blake2xs_state; + + typedef struct blake2xb_state__ + { + blake2b_state S[1]; + blake2b_param P[1]; + } blake2xb_state; + + /* Padded structs result in a compile-time error */ + enum { + BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES), + BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) + }; + + /* Streaming API */ + int blake2s_init( blake2s_state *S, size_t outlen ); + int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); + int blake2s_update( blake2s_state *S, const void *in, size_t inlen ); + int blake2s_final( blake2s_state *S, void *out, size_t outlen ); + + int blake2b_init( blake2b_state *S, size_t outlen ); + int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); + int blake2b_update( blake2b_state *S, const void *in, size_t inlen ); + int blake2b_final( blake2b_state *S, void *out, size_t outlen ); + + int blake2sp_init( blake2sp_state *S, size_t outlen ); + int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2sp_update( blake2sp_state *S, const void *in, size_t inlen ); + int blake2sp_final( blake2sp_state *S, void *out, size_t outlen ); + + int blake2bp_init( blake2bp_state *S, size_t outlen ); + int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2bp_update( blake2bp_state *S, const void *in, size_t inlen ); + int blake2bp_final( blake2bp_state *S, void *out, size_t outlen ); + + /* Variable output length API */ + int blake2xs_init( blake2xs_state *S, const size_t outlen ); + int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, size_t keylen ); + int blake2xs_update( blake2xs_state *S, const void *in, size_t inlen ); + int blake2xs_final(blake2xs_state *S, void *out, size_t outlen); + + int blake2xb_init( blake2xb_state *S, const size_t outlen ); + int blake2xb_init_key( blake2xb_state *S, const size_t outlen, const void *key, size_t keylen ); + int blake2xb_update( blake2xb_state *S, const void *in, size_t inlen ); + int blake2xb_final(blake2xb_state *S, void *out, size_t outlen); + + /* Simple API */ + int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + int blake2sp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2bp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + int blake2xs( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2xb( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + /* This is simply an alias for blake2b */ + int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + +#if defined(__cplusplus) +} +#endif + +#endif From 0d75b09b9a2b220b352aaec963c7f0021000be8f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:27:40 -0500 Subject: [PATCH 235/576] Create blake2b-ref.c --- stratum/algos/crypto/blake2b-ref.c | 379 +++++++++++++++++++++++++++++ 1 file changed, 379 insertions(+) create mode 100644 stratum/algos/crypto/blake2b-ref.c diff --git a/stratum/algos/crypto/blake2b-ref.c b/stratum/algos/crypto/blake2b-ref.c new file mode 100644 index 000000000..cd38b1ba0 --- /dev/null +++ b/stratum/algos/crypto/blake2b-ref.c @@ -0,0 +1,379 @@ +/* + BLAKE2 reference source code package - reference C implementations + + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ + +#include +#include +#include + +#include "blake2.h" +#include "blake2-impl.h" + +static const uint64_t blake2b_IV[8] = +{ + 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, + 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, + 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, + 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL +}; + +static const uint8_t blake2b_sigma[12][16] = +{ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , + { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } , + { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } , + { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } , + { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } , + { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } , + { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } , + { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } , + { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } , + { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } , + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , + { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } +}; + + +static void blake2b_set_lastnode( blake2b_state *S ) +{ + S->f[1] = (uint64_t)-1; +} + +/* Some helper functions, not necessarily useful */ +static int blake2b_is_lastblock( const blake2b_state *S ) +{ + return S->f[0] != 0; +} + +static void blake2b_set_lastblock( blake2b_state *S ) +{ + if( S->last_node ) blake2b_set_lastnode( S ); + + S->f[0] = (uint64_t)-1; +} + +static void blake2b_increment_counter( blake2b_state *S, const uint64_t inc ) +{ + S->t[0] += inc; + S->t[1] += ( S->t[0] < inc ); +} + +static void blake2b_init0( blake2b_state *S ) +{ + size_t i; + memset( S, 0, sizeof( blake2b_state ) ); + + for( i = 0; i < 8; ++i ) S->h[i] = blake2b_IV[i]; +} + +/* init xors IV with input parameter block */ +int blake2b_init_param( blake2b_state *S, const blake2b_param *P ) +{ + const uint8_t *p = ( const uint8_t * )( P ); + size_t i; + + blake2b_init0( S ); + + /* IV XOR ParamBlock */ + for( i = 0; i < 8; ++i ) + S->h[i] ^= load64( p + sizeof( S->h[i] ) * i ); + + S->outlen = P->digest_length; + return 0; +} + + + +int blake2b_init( blake2b_state *S, size_t outlen ) +{ + blake2b_param P[1]; + + if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; + + P->digest_length = (uint8_t)outlen; + P->key_length = 0; + P->fanout = 1; + P->depth = 1; + store32( &P->leaf_length, 0 ); + store32( &P->node_offset, 0 ); + store32( &P->xof_length, 0 ); + P->node_depth = 0; + P->inner_length = 0; + memset( P->reserved, 0, sizeof( P->reserved ) ); + memset( P->salt, 0, sizeof( P->salt ) ); + memset( P->personal, 0, sizeof( P->personal ) ); + return blake2b_init_param( S, P ); +} + + +int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ) +{ + blake2b_param P[1]; + + if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; + + if ( !key || !keylen || keylen > BLAKE2B_KEYBYTES ) return -1; + + P->digest_length = (uint8_t)outlen; + P->key_length = (uint8_t)keylen; + P->fanout = 1; + P->depth = 1; + store32( &P->leaf_length, 0 ); + store32( &P->node_offset, 0 ); + store32( &P->xof_length, 0 ); + P->node_depth = 0; + P->inner_length = 0; + memset( P->reserved, 0, sizeof( P->reserved ) ); + memset( P->salt, 0, sizeof( P->salt ) ); + memset( P->personal, 0, sizeof( P->personal ) ); + + if( blake2b_init_param( S, P ) < 0 ) return -1; + + { + uint8_t block[BLAKE2B_BLOCKBYTES]; + memset( block, 0, BLAKE2B_BLOCKBYTES ); + memcpy( block, key, keylen ); + blake2b_update( S, block, BLAKE2B_BLOCKBYTES ); + secure_zero_memory( block, BLAKE2B_BLOCKBYTES ); /* Burn the key from stack */ + } + return 0; +} + +#define G(r,i,a,b,c,d) \ + do { \ + a = a + b + m[blake2b_sigma[r][2*i+0]]; \ + d = rotr64(d ^ a, 32); \ + c = c + d; \ + b = rotr64(b ^ c, 24); \ + a = a + b + m[blake2b_sigma[r][2*i+1]]; \ + d = rotr64(d ^ a, 16); \ + c = c + d; \ + b = rotr64(b ^ c, 63); \ + } while(0) + +#define ROUND(r) \ + do { \ + G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \ + G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \ + G(r,2,v[ 2],v[ 6],v[10],v[14]); \ + G(r,3,v[ 3],v[ 7],v[11],v[15]); \ + G(r,4,v[ 0],v[ 5],v[10],v[15]); \ + G(r,5,v[ 1],v[ 6],v[11],v[12]); \ + G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \ + G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \ + } while(0) + +static void blake2b_compress( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ) +{ + uint64_t m[16]; + uint64_t v[16]; + size_t i; + + for( i = 0; i < 16; ++i ) { + m[i] = load64( block + i * sizeof( m[i] ) ); + } + + for( i = 0; i < 8; ++i ) { + v[i] = S->h[i]; + } + + v[ 8] = blake2b_IV[0]; + v[ 9] = blake2b_IV[1]; + v[10] = blake2b_IV[2]; + v[11] = blake2b_IV[3]; + v[12] = blake2b_IV[4] ^ S->t[0]; + v[13] = blake2b_IV[5] ^ S->t[1]; + v[14] = blake2b_IV[6] ^ S->f[0]; + v[15] = blake2b_IV[7] ^ S->f[1]; + + ROUND( 0 ); + ROUND( 1 ); + ROUND( 2 ); + ROUND( 3 ); + ROUND( 4 ); + ROUND( 5 ); + ROUND( 6 ); + ROUND( 7 ); + ROUND( 8 ); + ROUND( 9 ); + ROUND( 10 ); + ROUND( 11 ); + + for( i = 0; i < 8; ++i ) { + S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; + } +} + +#undef G +#undef ROUND + +int blake2b_update( blake2b_state *S, const void *pin, size_t inlen ) +{ + const unsigned char * in = (const unsigned char *)pin; + if( inlen > 0 ) + { + size_t left = S->buflen; + size_t fill = BLAKE2B_BLOCKBYTES - left; + if( inlen > fill ) + { + S->buflen = 0; + memcpy( S->buf + left, in, fill ); /* Fill buffer */ + blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES ); + blake2b_compress( S, S->buf ); /* Compress */ + in += fill; inlen -= fill; + while(inlen > BLAKE2B_BLOCKBYTES) { + blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); + blake2b_compress( S, in ); + in += BLAKE2B_BLOCKBYTES; + inlen -= BLAKE2B_BLOCKBYTES; + } + } + memcpy( S->buf + S->buflen, in, inlen ); + S->buflen += inlen; + } + return 0; +} + +int blake2b_final( blake2b_state *S, void *out, size_t outlen ) +{ + uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; + size_t i; + + if( out == NULL || outlen < S->outlen ) + return -1; + + if( blake2b_is_lastblock( S ) ) + return -1; + + blake2b_increment_counter( S, S->buflen ); + blake2b_set_lastblock( S ); + memset( S->buf + S->buflen, 0, BLAKE2B_BLOCKBYTES - S->buflen ); /* Padding */ + blake2b_compress( S, S->buf ); + + for( i = 0; i < 8; ++i ) /* Output full hash to temp buffer */ + store64( buffer + sizeof( S->h[i] ) * i, S->h[i] ); + + memcpy( out, buffer, S->outlen ); + secure_zero_memory(buffer, sizeof(buffer)); + return 0; +} + +/* inlen, at least, should be uint64_t. Others can be size_t. */ +int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ) +{ + blake2b_state S[1]; + + /* Verify parameters */ + if ( NULL == in && inlen > 0 ) return -1; + + if ( NULL == out ) return -1; + + if( NULL == key && keylen > 0 ) return -1; + + if( !outlen || outlen > BLAKE2B_OUTBYTES ) return -1; + + if( keylen > BLAKE2B_KEYBYTES ) return -1; + + if( keylen > 0 ) + { + if( blake2b_init_key( S, outlen, key, keylen ) < 0 ) return -1; + } + else + { + if( blake2b_init( S, outlen ) < 0 ) return -1; + } + + blake2b_update( S, ( const uint8_t * )in, inlen ); + blake2b_final( S, out, outlen ); + return 0; +} + +int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ) { + return blake2b(out, outlen, in, inlen, key, keylen); +} + +#if defined(SUPERCOP) +int crypto_hash( unsigned char *out, unsigned char *in, unsigned long long inlen ) +{ + return blake2b( out, BLAKE2B_OUTBYTES, in, inlen, NULL, 0 ); +} +#endif + +#if defined(BLAKE2B_SELFTEST) +#include +#include "blake2-kat.h" +int main( void ) +{ + uint8_t key[BLAKE2B_KEYBYTES]; + uint8_t buf[BLAKE2_KAT_LENGTH]; + size_t i, step; + + for( i = 0; i < BLAKE2B_KEYBYTES; ++i ) + key[i] = ( uint8_t )i; + + for( i = 0; i < BLAKE2_KAT_LENGTH; ++i ) + buf[i] = ( uint8_t )i; + + /* Test simple API */ + for( i = 0; i < BLAKE2_KAT_LENGTH; ++i ) + { + uint8_t hash[BLAKE2B_OUTBYTES]; + blake2b( hash, BLAKE2B_OUTBYTES, buf, i, key, BLAKE2B_KEYBYTES ); + + if( 0 != memcmp( hash, blake2b_keyed_kat[i], BLAKE2B_OUTBYTES ) ) + { + goto fail; + } + } + + /* Test streaming API */ + for(step = 1; step < BLAKE2B_BLOCKBYTES; ++step) { + for (i = 0; i < BLAKE2_KAT_LENGTH; ++i) { + uint8_t hash[BLAKE2B_OUTBYTES]; + blake2b_state S; + uint8_t * p = buf; + size_t mlen = i; + int err = 0; + + if( (err = blake2b_init_key(&S, BLAKE2B_OUTBYTES, key, BLAKE2B_KEYBYTES)) < 0 ) { + goto fail; + } + + while (mlen >= step) { + if ( (err = blake2b_update(&S, p, step)) < 0 ) { + goto fail; + } + mlen -= step; + p += step; + } + if ( (err = blake2b_update(&S, p, mlen)) < 0) { + goto fail; + } + if ( (err = blake2b_final(&S, hash, BLAKE2B_OUTBYTES)) < 0) { + goto fail; + } + + if (0 != memcmp(hash, blake2b_keyed_kat[i], BLAKE2B_OUTBYTES)) { + goto fail; + } + } + } + + puts( "ok" ); + return 0; +fail: + puts("error"); + return -1; +} +#endif From ea76df6fa32b33cc10e8087062082725ffeb8a94 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:28:09 -0500 Subject: [PATCH 236/576] Create portable_endian.h --- stratum/algos/crypto/portable_endian.h | 118 +++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 stratum/algos/crypto/portable_endian.h diff --git a/stratum/algos/crypto/portable_endian.h b/stratum/algos/crypto/portable_endian.h new file mode 100644 index 000000000..e89694a44 --- /dev/null +++ b/stratum/algos/crypto/portable_endian.h @@ -0,0 +1,118 @@ +// "License": Public Domain +// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. +// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to +// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it +// an example on how to get the endian conversion functions on different platforms. + +#ifndef PORTABLE_ENDIAN_H__ +#define PORTABLE_ENDIAN_H__ + +#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) + +# define __WINDOWS__ + +#endif + +#if defined(__linux__) || defined(__CYGWIN__) + +# include + +#elif defined(__APPLE__) + +# include + +# define htobe16(x) OSSwapHostToBigInt16(x) +# define htole16(x) OSSwapHostToLittleInt16(x) +# define be16toh(x) OSSwapBigToHostInt16(x) +# define le16toh(x) OSSwapLittleToHostInt16(x) + +# define htobe32(x) OSSwapHostToBigInt32(x) +# define htole32(x) OSSwapHostToLittleInt32(x) +# define be32toh(x) OSSwapBigToHostInt32(x) +# define le32toh(x) OSSwapLittleToHostInt32(x) + +# define htobe64(x) OSSwapHostToBigInt64(x) +# define htole64(x) OSSwapHostToLittleInt64(x) +# define be64toh(x) OSSwapBigToHostInt64(x) +# define le64toh(x) OSSwapLittleToHostInt64(x) + +# define __BYTE_ORDER BYTE_ORDER +# define __BIG_ENDIAN BIG_ENDIAN +# define __LITTLE_ENDIAN LITTLE_ENDIAN +# define __PDP_ENDIAN PDP_ENDIAN + +#elif defined(__OpenBSD__) + +# include + +#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) + +# include + +# define be16toh(x) betoh16(x) +# define le16toh(x) letoh16(x) + +# define be32toh(x) betoh32(x) +# define le32toh(x) letoh32(x) + +# define be64toh(x) betoh64(x) +# define le64toh(x) letoh64(x) + +#elif defined(__WINDOWS__) + +# include +# include + +# if BYTE_ORDER == LITTLE_ENDIAN + +# define htobe16(x) htons(x) +# define htole16(x) (x) +# define be16toh(x) ntohs(x) +# define le16toh(x) (x) + +# define htobe32(x) htonl(x) +# define htole32(x) (x) +# define be32toh(x) ntohl(x) +# define le32toh(x) (x) + +# define htobe64(x) htonll(x) +# define htole64(x) (x) +# define be64toh(x) ntohll(x) +# define le64toh(x) (x) + +# elif BYTE_ORDER == BIG_ENDIAN + + /* that would be xbox 360 */ +# define htobe16(x) (x) +# define htole16(x) __builtin_bswap16(x) +# define be16toh(x) (x) +# define le16toh(x) __builtin_bswap16(x) + +# define htobe32(x) (x) +# define htole32(x) __builtin_bswap32(x) +# define be32toh(x) (x) +# define le32toh(x) __builtin_bswap32(x) + +# define htobe64(x) (x) +# define htole64(x) __builtin_bswap64(x) +# define be64toh(x) (x) +# define le64toh(x) __builtin_bswap64(x) + +# else + +# error byte order not supported + +# endif + +# define __BYTE_ORDER BYTE_ORDER +# define __BIG_ENDIAN BIG_ENDIAN +# define __LITTLE_ENDIAN LITTLE_ENDIAN +# define __PDP_ENDIAN PDP_ENDIAN + +#else + +# error platform not supported + +#endif + +#endif From 21fe745ef1efad2bdad151f6553d08d15fedfea9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:28:39 -0500 Subject: [PATCH 237/576] Create siphash.cuh --- stratum/algos/crypto/siphash.cuh | 94 ++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 stratum/algos/crypto/siphash.cuh diff --git a/stratum/algos/crypto/siphash.cuh b/stratum/algos/crypto/siphash.cuh new file mode 100644 index 000000000..67fc2f5ec --- /dev/null +++ b/stratum/algos/crypto/siphash.cuh @@ -0,0 +1,94 @@ +#pragma once + +#if (__CUDA_ARCH__ >= 320) // make rotate-left use funnel shifter, 3% speed gain +typedef uint2 sip64; + +static __device__ __forceinline__ sip64 operator^ (uint2 a, uint2 b) { + return make_uint2(a.x ^ b.x, a.y ^ b.y); +} +static __device__ __forceinline__ void operator^= (uint2 &a, uint2 b) { + a.x ^= b.x, a.y ^= b.y; +} +static __device__ __forceinline__ void operator+= (uint2 &a, uint2 b) { + asm("{\n\tadd.cc.u32 %0,%2,%4;\n\taddc.u32 %1,%3,%5;\n\t}\n\t" + : "=r"(a.x), "=r"(a.y) : "r"(a.x), "r"(a.y), "r"(b.x), "r"(b.y)); +} + +__inline__ __device__ sip64 rotl(const sip64 a, const int offset) { + sip64 result; + if (offset >= 32) { + asm("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(result.x) : "r"(a.x), "r"(a.y), "r"(offset)); + asm("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(result.y) : "r"(a.y), "r"(a.x), "r"(offset)); + } else { + asm("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(result.x) : "r"(a.y), "r"(a.x), "r"(offset)); + asm("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(result.y) : "r"(a.x), "r"(a.y), "r"(offset)); + } + return result; +} +__device__ __forceinline__ sip64 vectorize(const uint64_t x) { + uint2 result; + asm("mov.b64 {%0,%1},%2; \n\t" : "=r"(result.x), "=r"(result.y) : "l"(x)); + return result; +} +__device__ __forceinline__ uint64_t devectorize(sip64 x) { + uint64_t result; + asm("mov.b64 %0,{%1,%2}; \n\t" : "=l"(result) : "r"(x.x), "r"(x.y)); + return result; +} + +#else + +typedef uint64_t sip64; + +__inline__ __device__ sip64 rotl(const sip64 a, const int offset) { + return (a << offset) | (a >> (64 - offset)); +} +__device__ __forceinline__ sip64 vectorize(const uint64_t x) { + return x; +} +__device__ __forceinline__ uint64_t devectorize(sip64 x) { + return x; +} + +#endif + +class diphash_state { +public: + sip64 v0; + sip64 v1; + sip64 v2; + sip64 v3; + + __device__ diphash_state(const siphash_keys &sk) { + v0 = vectorize(sk.k0); v1 = vectorize(sk.k1); v2 = vectorize(sk.k2); v3 = vectorize(sk.k3); + } + __device__ uint64_t xor_lanes() { + return devectorize((v0 ^ v1) ^ (v2 ^ v3)); + } + __device__ void xor_with(const diphash_state &x) { + v0 ^= x.v0; + v1 ^= x.v1; + v2 ^= x.v2; + v3 ^= x.v3; + } + __device__ void dip_round() { + v0 += v1; v2 += v3; v1 = rotl(v1,13); + v3 = rotl(v3,16); v1 ^= v0; v3 ^= v2; + v0 = rotl(v0,32); v2 += v1; v0 += v3; + v1 = rotl(v1,17); v3 = rotl(v3,21); + v1 ^= v2; v3 ^= v0; v2 = rotl(v2,32); + } + __device__ void hash24(const uint64_t nonce) { + v3 ^= vectorize(nonce); + dip_round(); dip_round(); + v0 ^= vectorize(nonce); + v2 ^= vectorize(0xff); + dip_round(); dip_round(); dip_round(); dip_round(); + } +}; + +__device__ uint64_t dipnode(const siphash_keys &sip_keys, const uint32_t nonce, const int uorv) { + diphash_state v(sip_keys); + v.hash24((nonce << 1) | uorv); + return v.xor_lanes() & EDGEMASK; +} From 941f774980057d82ba9be7d88ddff7950601b6bd Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:29:07 -0500 Subject: [PATCH 238/576] Create siphash.hpp --- stratum/algos/crypto/siphash.hpp | 69 ++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 stratum/algos/crypto/siphash.hpp diff --git a/stratum/algos/crypto/siphash.hpp b/stratum/algos/crypto/siphash.hpp new file mode 100644 index 000000000..0974e5fea --- /dev/null +++ b/stratum/algos/crypto/siphash.hpp @@ -0,0 +1,69 @@ +#pragma once + +#include // for types uint32_t,uint64_t +#include "portable_endian.h" // for htole32/64 + +// generalize siphash by using a quadruple of 64-bit keys, +class siphash_keys { +public: + uint64_t k0; + uint64_t k1; + uint64_t k2; + uint64_t k3; + + void setkeys(const char *keybuf); + + uint64_t siphash24(const uint64_t nonce) const; +}; + +class siphash_state { +public: + uint64_t v0; + uint64_t v1; + uint64_t v2; + uint64_t v3; + + siphash_state(const siphash_keys &sk) { + v0 = sk.k0; v1 = sk.k1; v2 = sk.k2; v3 = sk.k3; + } + uint64_t xor_lanes() { + return (v0 ^ v1) ^ (v2 ^ v3); + } + void xor_with(const siphash_state &x) { + v0 ^= x.v0; + v1 ^= x.v1; + v2 ^= x.v2; + v3 ^= x.v3; + } + static uint64_t rotl(uint64_t x, uint64_t b) { + return (x << b) | (x >> (64 - b)); + } + void sip_round() { + v0 += v1; v2 += v3; v1 = rotl(v1,13); + v3 = rotl(v3,16); v1 ^= v0; v3 ^= v2; + v0 = rotl(v0,32); v2 += v1; v0 += v3; + v1 = rotl(v1,17); v3 = rotl(v3,21); + v1 ^= v2; v3 ^= v0; v2 = rotl(v2,32); + } + void hash24(const uint64_t nonce) { + v3 ^= nonce; + sip_round(); sip_round(); + v0 ^= nonce; + v2 ^= 0xff; + sip_round(); sip_round(); sip_round(); sip_round(); + } +}; + +// set siphash keys from 32 byte char array +void siphash_keys::setkeys(const char *keybuf) { + k0 = htole64(((uint64_t *)keybuf)[0]); + k1 = htole64(((uint64_t *)keybuf)[1]); + k2 = htole64(((uint64_t *)keybuf)[2]); + k3 = htole64(((uint64_t *)keybuf)[3]); +} + +uint64_t siphash_keys::siphash24(const uint64_t nonce) const { + siphash_state v(*this); + v.hash24(nonce); + return v.xor_lanes(); +} From b28b1c1f2927951d8c330357903d0000f112c89b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:29:35 -0500 Subject: [PATCH 239/576] Create siphashxN.h --- stratum/algos/crypto/siphashxN.h | 212 +++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 stratum/algos/crypto/siphashxN.h diff --git a/stratum/algos/crypto/siphashxN.h b/stratum/algos/crypto/siphashxN.h new file mode 100644 index 000000000..36dc889f7 --- /dev/null +++ b/stratum/algos/crypto/siphashxN.h @@ -0,0 +1,212 @@ +#ifndef INCLUDE_SIPHASHXN_H +#define INCLUDE_SIPHASHXN_H +#include // for _mm256_* intrinsics + +#ifdef __AVX2__ + +#define ADD(a, b) _mm256_add_epi64(a, b) +#define XOR(a, b) _mm256_xor_si256(a, b) +#define ROTATE16 _mm256_set_epi64x(0x0D0C0B0A09080F0EULL,0x0504030201000706ULL, \ + 0x0D0C0B0A09080F0EULL, 0x0504030201000706ULL) +#define ROT13(x) _mm256_or_si256(_mm256_slli_epi64(x,13),_mm256_srli_epi64(x,51)) +#define ROT16(x) _mm256_shuffle_epi8((x), ROTATE16) +#define ROT17(x) _mm256_or_si256(_mm256_slli_epi64(x,17),_mm256_srli_epi64(x,47)) +#define ROT21(x) _mm256_or_si256(_mm256_slli_epi64(x,21),_mm256_srli_epi64(x,43)) +#define ROT32(x) _mm256_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) + +#elif defined __SSE2__ + +#define ADD(a, b) _mm_add_epi64(a, b) +#define XOR(a, b) _mm_xor_si128(a, b) +#define ROT13(x) _mm_or_si128(_mm_slli_epi64(x,13),_mm_srli_epi64(x,51)) +#define ROT16(x) _mm_shufflehi_epi16(_mm_shufflelo_epi16(x, _MM_SHUFFLE(2,1,0,3)), _MM_SHUFFLE(2,1,0,3)) +#define ROT17(x) _mm_or_si128(_mm_slli_epi64(x,17),_mm_srli_epi64(x,47)) +#define ROT21(x) _mm_or_si128(_mm_slli_epi64(x,21),_mm_srli_epi64(x,43)) +#define ROT32(x) _mm_shuffle_epi32 (x, _MM_SHUFFLE(2,3,0,1)) + +#endif + +#define SIPROUNDXN \ + do { \ + v0 = ADD(v0,v1); v2 = ADD(v2,v3); v1 = ROT13(v1); \ + v3 = ROT16(v3); v1 = XOR(v1,v0); v3 = XOR(v3,v2); \ + v0 = ROT32(v0); v2 = ADD(v2,v1); v0 = ADD(v0,v3); \ + v1 = ROT17(v1); v3 = ROT21(v3); \ + v1 = XOR(v1,v2); v3 = XOR(v3,v0); v2 = ROT32(v2); \ + } while(0) + +#define SIPROUNDX2N \ + do { \ + v0 = ADD(v0,v1); v4 = ADD(v4,v5); \ + v2 = ADD(v2,v3); v6 = ADD(v6,v7); \ + v1 = ROT13(v1); v5 = ROT13(v5); \ + v3 = ROT16(v3); v7 = ROT16(v7); \ + v1 = XOR(v1,v0); v5 = XOR(v5,v4); \ + v3 = XOR(v3,v2); v7 = XOR(v7,v6); \ + v0 = ROT32(v0); v4 = ROT32(v4); \ + v2 = ADD(v2,v1); v6 = ADD(v6,v5); \ + v0 = ADD(v0,v3); v4 = ADD(v4,v7); \ + v1 = ROT17(v1); v5 = ROT17(v5); \ + v3 = ROT21(v3); v7 = ROT21(v7); \ + v1 = XOR(v1,v2); v5 = XOR(v5,v6); \ + v3 = XOR(v3,v0); v7 = XOR(v7,v4); \ + v2 = ROT32(v2); v6 = ROT32(v6); \ + } while(0) + +#define SIPROUNDX4N \ + do { \ + v0 = ADD(v0,v1); v4 = ADD(v4,v5); v8 = ADD(v8,v9); vC = ADD(vC,vD); \ + v2 = ADD(v2,v3); v6 = ADD(v6,v7); vA = ADD(vA,vB); vE = ADD(vE,vF); \ + v1 = ROT13(v1); v5 = ROT13(v5); v9 = ROT13(v9); vD = ROT13(vD); \ + v3 = ROT16(v3); v7 = ROT16(v7); vB = ROT16(vB); vF = ROT16(vF); \ + v1 = XOR(v1,v0); v5 = XOR(v5,v4); v9 = XOR(v9,v8); vD = XOR(vD,vC); \ + v3 = XOR(v3,v2); v7 = XOR(v7,v6); vB = XOR(vB,vA); vF = XOR(vF,vE); \ + v0 = ROT32(v0); v4 = ROT32(v4); v8 = ROT32(v8); vC = ROT32(vC); \ + v2 = ADD(v2,v1); v6 = ADD(v6,v5); vA = ADD(vA,v9); vE = ADD(vE,vD); \ + v0 = ADD(v0,v3); v4 = ADD(v4,v7); v8 = ADD(v8,vB); vC = ADD(vC,vF); \ + v1 = ROT17(v1); v5 = ROT17(v5); v9 = ROT17(v9); vD = ROT17(vD); \ + v3 = ROT21(v3); v7 = ROT21(v7); vB = ROT21(vB); vF = ROT21(vF); \ + v1 = XOR(v1,v2); v5 = XOR(v5,v6); v9 = XOR(v9,vA); vD = XOR(vD,vE); \ + v3 = XOR(v3,v0); v7 = XOR(v7,v4); vB = XOR(vB,v8); vF = XOR(vF,vC); \ + v2 = ROT32(v2); v6 = ROT32(v6); vA = ROT32(vA); vE = ROT32(vE); \ + } while(0) + +#ifdef __AVX2__ + +// 4-way sipHash-2-4 specialized to precomputed key and 8 byte nonces +void siphash24x4(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { + const __m256i packet = _mm256_load_si256((__m256i *)indices); + __m256i v0 = _mm256_set1_epi64x(keys->k0); + __m256i v1 = _mm256_set1_epi64x(keys->k1); + __m256i v2 = _mm256_set1_epi64x(keys->k2); + __m256i v3 = _mm256_set1_epi64x(keys->k3); + + v3 = XOR(v3,packet); + SIPROUNDXN; SIPROUNDXN; + v0 = XOR(v0,packet); + v2 = XOR(v2,_mm256_set1_epi64x(0xffLL)); + SIPROUNDXN; SIPROUNDXN; SIPROUNDXN; SIPROUNDXN; + _mm256_store_si256((__m256i *)hashes, XOR(XOR(v0,v1),XOR(v2,v3))); +} + +// 8-way sipHash-2-4 specialized to precomputed key and 8 byte nonces +void siphash24x8(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { + const __m256i packet0 = _mm256_load_si256((__m256i *)indices); + const __m256i packet4 = _mm256_load_si256((__m256i *)(indices+4)); + __m256i v0, v1, v2, v3, v4, v5, v6, v7; + v7 = v3 = _mm256_set1_epi64x(keys->k3); + v4 = v0 = _mm256_set1_epi64x(keys->k0); + v5 = v1 = _mm256_set1_epi64x(keys->k1); + v6 = v2 = _mm256_set1_epi64x(keys->k2); + + v3 = XOR(v3,packet0); v7 = XOR(v7,packet4); + SIPROUNDX2N; SIPROUNDX2N; + v0 = XOR(v0,packet0); v4 = XOR(v4,packet4); + v2 = XOR(v2,_mm256_set1_epi64x(0xffLL)); + v6 = XOR(v6,_mm256_set1_epi64x(0xffLL)); + SIPROUNDX2N; SIPROUNDX2N; SIPROUNDX2N; SIPROUNDX2N; + _mm256_store_si256((__m256i *)hashes, XOR(XOR(v0,v1),XOR(v2,v3))); + _mm256_store_si256((__m256i *)(hashes+4), XOR(XOR(v4,v5),XOR(v6,v7))); +} + +// 16-way sipHash-2-4 specialized to precomputed key and 8 byte nonces +void siphash24x16(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { + const __m256i packet0 = _mm256_load_si256((__m256i *)indices); + const __m256i packet4 = _mm256_load_si256((__m256i *)(indices+4)); + const __m256i packet8 = _mm256_load_si256((__m256i *)(indices+8)); + const __m256i packetC = _mm256_load_si256((__m256i *)(indices+12)); + __m256i v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, vA, vB, vC, vD, vE, vF; + vF = vB = v7 = v3 = _mm256_set1_epi64x(keys->k3); + vC = v8 = v4 = v0 = _mm256_set1_epi64x(keys->k0); + vD = v9 = v5 = v1 = _mm256_set1_epi64x(keys->k1); + vE = vA = v6 = v2 = _mm256_set1_epi64x(keys->k2); + + v3 = XOR(v3,packet0); v7 = XOR(v7,packet4); vB = XOR(vB,packet8); vF = XOR(vF,packetC); + SIPROUNDX4N; SIPROUNDX4N; + v0 = XOR(v0,packet0); v4 = XOR(v4,packet4); v8 = XOR(v8,packet8); vC = XOR(vC,packetC); + v2 = XOR(v2,_mm256_set1_epi64x(0xffLL)); + v6 = XOR(v6,_mm256_set1_epi64x(0xffLL)); + vA = XOR(vA,_mm256_set1_epi64x(0xffLL)); + vE = XOR(vE,_mm256_set1_epi64x(0xffLL)); + SIPROUNDX4N; SIPROUNDX4N; SIPROUNDX4N; SIPROUNDX4N; + _mm256_store_si256((__m256i *) hashes , XOR(XOR(v0,v1),XOR(v2,v3))); + _mm256_store_si256((__m256i *)(hashes+ 4), XOR(XOR(v4,v5),XOR(v6,v7))); + _mm256_store_si256((__m256i *)(hashes+ 8), XOR(XOR(v8,v9),XOR(vA,vB))); + _mm256_store_si256((__m256i *)(hashes+12), XOR(XOR(vC,vD),XOR(vE,vF))); +} + +#elif defined __SSE2__ + +// 2-way sipHash-2-4 specialized to precomputed key and 8 byte nonces +void siphash24x2(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { + __m128i v0, v1, v2, v3, mi; + v0 = _mm_set1_epi64x(keys->k0); + v1 = _mm_set1_epi64x(keys->k1); + v2 = _mm_set1_epi64x(keys->k2); + v3 = _mm_set1_epi64x(keys->k3); + mi = _mm_load_si128((__m128i *)indices); + + v3 = XOR (v3, mi); + SIPROUNDXN; SIPROUNDXN; + v0 = XOR (v0, mi); + + v2 = XOR (v2, _mm_set1_epi64x(0xffLL)); + SIPROUNDXN; SIPROUNDXN; SIPROUNDXN; SIPROUNDXN; + mi = XOR(XOR(v0,v1),XOR(v2,v3)); + + _mm_store_si128((__m128i *)hashes, mi); +} + +// 4-way sipHash-2-4 specialized to precomputed key and 8 byte nonces +void siphash24x4(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { + __m128i v0, v1, v2, v3, mi, v4, v5, v6, v7, m2; + v4 = v0 = _mm_set1_epi64x(keys->k0); + v5 = v1 = _mm_set1_epi64x(keys->k1); + v6 = v2 = _mm_set1_epi64x(keys->k2); + v7 = v3 = _mm_set1_epi64x(keys->k3); + + mi = _mm_load_si128((__m128i *)indices); + m2 = _mm_load_si128((__m128i *)(indices + 2)); + + v3 = XOR (v3, mi); + v7 = XOR (v7, m2); + SIPROUNDX2N; SIPROUNDX2N; + v0 = XOR (v0, mi); + v4 = XOR (v4, m2); + + v2 = XOR (v2, _mm_set1_epi64x(0xffLL)); + v6 = XOR (v6, _mm_set1_epi64x(0xffLL)); + SIPROUNDX2N; SIPROUNDX2N; SIPROUNDX2N; SIPROUNDX2N; + mi = XOR(XOR(v0,v1),XOR(v2,v3)); + m2 = XOR(XOR(v4,v5),XOR(v6,v7)); + + _mm_store_si128((__m128i *)hashes, mi); + _mm_store_si128((__m128i *)(hashes + 2),m2); +} +#endif + +#ifndef NSIPHASH +// how many siphash24 to compute in parallel +// currently 1, 2, 4, 8 are supported, but +// more than 1 requires the use of sse2 or avx2 +// more than 4 requires the use of avx2 +#define NSIPHASH 1 +#endif + +void siphash24xN(const siphash_keys *keys, const uint64_t *indices, uint64_t * hashes) { +#if NSIPHASH == 1 + *hashes = keys->siphash24(*indices); +#elif NSIPHASH == 2 + siphash24x2(keys, indices, hashes); +#elif NSIPHASH == 4 + siphash24x4(keys, indices, hashes); +#elif NSIPHASH == 8 + siphash24x8(keys, indices, hashes); +#elif NSIPHASH == 16 + siphash24x16(keys, indices, hashes); +#else +#error not implemented +#endif +} + +#endif // ifdef INCLUDE_SIPHASHXN_H From db3ddde78aebed41c655ad02cdff6511c3bd341a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:30:08 -0500 Subject: [PATCH 240/576] Create cuckoo.c --- stratum/algos/cuckoo.c | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 stratum/algos/cuckoo.c diff --git a/stratum/algos/cuckoo.c b/stratum/algos/cuckoo.c new file mode 100644 index 000000000..439b212d6 --- /dev/null +++ b/stratum/algos/cuckoo.c @@ -0,0 +1,58 @@ +// Cuckoo Cycle, a memory-hard proof-of-work +// Copyright (c) 2013-2016 John Tromp + +#include "cuckoo.h" +#include // for SCNx64 macro +#include // printf/scanf +#include // exit +#include // getopt +#include // d'uh + +// arbitrary length of header hashed into siphash key +#define HEADERLEN 80 + +int main(int argc, char **argv) { + const char *header = ""; + int nonce = 0; + int c; + while ((c = getopt (argc, argv, "h:n:")) != -1) { + switch (c) { + case 'h': + header = optarg; + break; + case 'n': + nonce = atoi(optarg); + break; + } + } + char headernonce[HEADERLEN]; + u32 hdrlen = strlen(header); + memcpy(headernonce, header, hdrlen); + memset(headernonce+hdrlen, 0, sizeof(headernonce)-hdrlen); + ((u32 *)headernonce)[HEADERLEN/sizeof(u32)-1] = htole32(nonce); + siphash_keys keys; + setheader(headernonce, sizeof(headernonce), &keys); + printf("Verifying size %d proof for cuckoo%d(\"%s\",%d)\n", + PROOFSIZE, EDGEBITS+1, header, nonce); + for (int nsols=0; scanf(" Solution") == 0; nsols++) { + word_t nonces[PROOFSIZE]; + for (int n = 0; n < PROOFSIZE; n++) { + uint64_t nonce; + int nscan = scanf(" %" SCNx64, &nonce); + assert(nscan == 1); + nonces[n] = nonce; + } + int pow_rc = verify(nonces, &keys); + if (pow_rc == POW_OK) { + printf("Verified with cyclehash "); + unsigned char cyclehash[32]; + blake2b((void *)cyclehash, sizeof(cyclehash), (const void *)nonces, sizeof(nonces), 0, 0); + for (int i=0; i<32; i++) + printf("%02x", cyclehash[i]); + printf("\n"); + } else { + printf("FAILED due to %s\n", errstr[pow_rc]); + } + } + return 0; +} From 65c1e1fb1ec6dea7d9e90921f57eb56d6b42231f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:30:37 -0500 Subject: [PATCH 241/576] Create cuckoo.h --- stratum/algos/cuckoo.h | 208 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 stratum/algos/cuckoo.h diff --git a/stratum/algos/cuckoo.h b/stratum/algos/cuckoo.h new file mode 100644 index 000000000..c3f90aad4 --- /dev/null +++ b/stratum/algos/cuckoo.h @@ -0,0 +1,208 @@ +// Cuckoo Cycle, a memory-hard proof-of-work +// Copyright (c) 2013-2017 John Tromp + +#include // for types uint32_t,uint64_t +#include // for functions strlen, memset +#include +#include +#include +#include +#include "../crypto/blake2.h" +#include "../crypto/siphash.hpp" + +#ifdef SIPHASH_COMPAT +#include +#endif + +// proof-of-work parameters +#ifndef EDGEBITS +// the main parameter is the 2-log of the graph size, +// which is the size in bits of the node identifiers +#define EDGEBITS 29 +#endif +#ifndef PROOFSIZE +// the next most important parameter is the (even) length +// of the cycle to be found. a minimum of 12 is recommended +#define PROOFSIZE 42 +#endif + +// save some keystrokes since i'm a lazy typer +typedef uint32_t u32; +typedef uint64_t u64; + +#ifndef MAX_SOLS +#define MAX_SOLS 4 +#endif + +#if EDGEBITS > 30 +typedef uint64_t word_t; +#elif EDGEBITS > 14 +typedef u32 word_t; +#else // if EDGEBITS <= 14 +typedef uint16_t word_t; +#endif + +// number of edges +#define NEDGES ((word_t)1 << EDGEBITS) +// used to mask siphash output +#define EDGEMASK ((word_t)NEDGES - 1) + +// Common Solver parameters, to return to caller +struct SolverParams { + u32 nthreads = 0; + u32 ntrims = 0; + bool showcycle; + bool allrounds; + bool mutate_nonce = 1; + bool cpuload = 1; + + // Common cuda params + u32 device = 0; + + // Cuda-lean specific params + u32 blocks = 0; + u32 tpb = 0; + + // Cuda-mean specific params + u32 expand = 0; + u32 genablocks = 0; + u32 genatpb = 0; + u32 genbtpb = 0; + u32 trimtpb = 0; + u32 tailtpb = 0; + u32 recoverblocks = 0; + u32 recovertpb = 0; +}; + +// Solutions result structs to be instantiated by caller, +// and filled by solver if desired +struct Solution { + u64 nonce = 0; + u64 proof[PROOFSIZE]; +}; + +struct SolverSolutions { + u32 edge_bits = 0; + u32 num_sols = 0; + Solution sols[MAX_SOLS]; +}; + +#define MAX_NAME_LEN 256 + +// last error reason, to be picked up by stats +// to be returned to caller +char LAST_ERROR_REASON[MAX_NAME_LEN]; + +// Solver statistics, to be instantiated by caller +// and filled by solver if desired +struct SolverStats { + u32 device_id = 0; + u32 edge_bits = 0; + char plugin_name[MAX_NAME_LEN]; // will be filled in caller-side + char device_name[MAX_NAME_LEN]; + bool has_errored = false; + char error_reason[MAX_NAME_LEN]; + u32 iterations = 0; + u64 last_start_time = 0; + u64 last_end_time = 0; + u64 last_solution_time = 0; +}; + +// generate edge endpoint in cuckoo graph without partition bit +word_t sipnode(siphash_keys *keys, word_t edge, u32 uorv) { + return keys->siphash24(2*edge + uorv) & EDGEMASK; +} + +enum verify_code { POW_OK, POW_HEADER_LENGTH, POW_TOO_BIG, POW_TOO_SMALL, POW_NON_MATCHING, POW_BRANCH, POW_DEAD_END, POW_SHORT_CYCLE}; +const char *errstr[] = { "OK", "wrong header length", "edge too big", "edges not ascending", "endpoints don't match up", "branch in cycle", "cycle dead ends", "cycle too short"}; + +// verify that edges are ascending and form a cycle in header-generated graph +int verify(word_t edges[PROOFSIZE], siphash_keys *keys) { + word_t uvs[2*PROOFSIZE]; + word_t xor0 = 0, xor1 = 0; + for (u32 n = 0; n < PROOFSIZE; n++) { + if (edges[n] > EDGEMASK) + return POW_TOO_BIG; + if (n && edges[n] <= edges[n-1]) + return POW_TOO_SMALL; + xor0 ^= uvs[2*n ] = sipnode(keys, edges[n], 0); + xor1 ^= uvs[2*n+1] = sipnode(keys, edges[n], 1); + } + if (xor0|xor1) // optional check for obviously bad proofs + return POW_NON_MATCHING; + u32 n = 0, i = 0, j; + do { // follow cycle + for (u32 k = j = i; (k = (k+2) % (2*PROOFSIZE)) != i; ) { + if (uvs[k] == uvs[i]) { // find other edge endpoint identical to one at i + if (j != i) // already found one before + return POW_BRANCH; + j = k; + } + } + if (j == i) return POW_DEAD_END; // no matching endpoint + i = j^1; + n++; + } while (i != 0); // must cycle back to start or we would have found branch + return n == PROOFSIZE ? POW_OK : POW_SHORT_CYCLE; +} + +// convenience function for extracting siphash keys from header +void setheader(const char *header, const u32 headerlen, siphash_keys *keys) { + char hdrkey[32]; + // SHA256((unsigned char *)header, headerlen, (unsigned char *)hdrkey); + blake2b((void *)hdrkey, sizeof(hdrkey), (const void *)header, headerlen, 0, 0); +#ifdef SIPHASH_COMPAT + u64 *k = (u64 *)hdrkey; + u64 k0 = k[0]; + u64 k1 = k[1]; + printf("k0 k1 %lx %lx\n", k0, k1); + k[0] = k0 ^ 0x736f6d6570736575ULL; + k[1] = k1 ^ 0x646f72616e646f6dULL; + k[2] = k0 ^ 0x6c7967656e657261ULL; + k[3] = k1 ^ 0x7465646279746573ULL; +#endif + keys->setkeys(hdrkey); +} + +// edge endpoint in cuckoo graph with partition bit +word_t sipnode_(siphash_keys *keys, word_t edge, u32 uorv) { + return sipnode(keys, edge, uorv) << 1 | uorv; +} + +u64 timestamp() { + using namespace std::chrono; + high_resolution_clock::time_point now = high_resolution_clock::now(); + auto dn = now.time_since_epoch(); + return dn.count(); +} + +///////////////////////////////////////////////////////////////// +// Declarations to make it easier for callers to link as required +///////////////////////////////////////////////////////////////// + +#ifndef C_CALL_CONVENTION +#define C_CALL_CONVENTION 0 +#endif + +// convention to prepend to called functions +#if C_CALL_CONVENTION +#define CALL_CONVENTION extern "C" +#else +#define CALL_CONVENTION +#endif + +// Ability to squash printf output at compile time, if desired +#ifndef SQUASH_OUTPUT +#define SQUASH_OUTPUT 0 +#endif + +void print_log(const char *fmt, ...) { + if (SQUASH_OUTPUT) return; + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} +////////////////////////////////////////////////////////////////// +// END caller QOL +////////////////////////////////////////////////////////////////// From 0f6d1c607c7e5785dbf573e38584dc9f4dfc35e5 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:33:29 -0500 Subject: [PATCH 242/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 631024133..8cee96e0b 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -15,7 +15,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ - scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ + scrypt.c scryptn.c sha256.c sha256t.c sha256q.c cuckoo.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ argon2a.c blake2/blake2b.c ar2/argon2.c ar2/core.c ar2/encoding.c ar2/opt.c ar2/thread.c ar2/ar2-scrypt-jane.c \ From 4ffaa6bf5bbf695a251f2d64fa3f019484b43c5f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:34:03 -0500 Subject: [PATCH 243/576] Create cuckoo.conf --- stratum/config.sample/cuckoo.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/cuckoo.conf diff --git a/stratum/config.sample/cuckoo.conf b/stratum/config.sample/cuckoo.conf new file mode 100644 index 000000000..705abb22b --- /dev/null +++ b/stratum/config.sample/cuckoo.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 8633 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = cuckoo +difficulty = 0.25 +max_ttf = 4000000 From 6cd9ba5f58c8433c86004d9cff52523bd3e31c6d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:34:48 -0500 Subject: [PATCH 244/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index fd67df8a5..2c10eb407 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -211,6 +211,7 @@ YAAMP_ALGO g_algos[] = {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x + {"cuckoo", cuckoo_hash, 1, 0, 0}, {"sib", sib_hash, 1, 0, 0}, From f1d6db864cf2f1212bdf0601751e47f7a3c24bbd Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:35:16 -0500 Subject: [PATCH 245/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index bd579b04f..f917aa655 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -188,6 +188,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/keccak.h" #include "algos/sha256t.h" #include "algos/sha256q.h" +#include "algos/cuckoo.h" #include "algos/skunk.h" #include "algos/timetravel.h" #include "algos/bitcore.h" From f2b779bc1ba3ec8174bb0052fd493f78cd4884d2 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Feb 2019 18:36:38 -0500 Subject: [PATCH 246/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 0b7dac692..8114ce8fc 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -19,6 +19,7 @@ function yaamp_get_algos() 'blakecoin', 'blake2s', 'blake2b', + 'cuckoo', 'decred', 'deep', 'exosis', @@ -98,6 +99,7 @@ function yaamp_algo_mBTC_factor($algo) case 'blakecoin': case 'blake2s': case 'blake2b': + case 'cuckoo': case 'decred': case 'keccak': case 'keccakc': @@ -160,6 +162,7 @@ function getAlgoColors($algo) 'neoscrypt' => '#a0d0f0', 'scryptn' => '#d0d0d0', 'c11' => '#a0a0d0', + 'cuckoo' => '#9696dd', 'decred' => '#f0f0f0', 'deep' => '#e0ffff', 'x11' => '#f0f0a0', @@ -247,6 +250,7 @@ function getAlgoPort($algo) 'sha256' => 3333, 'sha256t' => 3339, 'sha256q' => 3337, + 'cuckoo' => 8633, 'lbry' => 3334, 'scrypt' => 3433, 'timetravel' => 3555, From 68bdff05eb8281b5eb2cba9c62a6b4c81f8758bd Mon Sep 17 00:00:00 2001 From: cryptopool Date: Tue, 12 Feb 2019 13:45:36 -0500 Subject: [PATCH 247/576] removed bad algo removed bad algo --- stratum/algos/crypto/blake2-impl.h | 160 ----------- stratum/algos/crypto/blake2.h | 195 ------------- stratum/algos/crypto/blake2b-ref.c | 379 ------------------------- stratum/algos/crypto/portable_endian.h | 118 -------- stratum/algos/crypto/siphash.cuh | 94 ------ stratum/algos/crypto/siphash.hpp | 69 ----- stratum/algos/crypto/siphashxN.h | 212 -------------- stratum/algos/cuckoo.c | 58 ---- stratum/algos/cuckoo.h | 208 -------------- stratum/algos/makefile | 2 +- stratum/config.sample/cuckoo.conf | 15 - stratum/stratum.cpp | 1 - stratum/stratum.h | 1 - 13 files changed, 1 insertion(+), 1511 deletions(-) delete mode 100644 stratum/algos/crypto/blake2-impl.h delete mode 100644 stratum/algos/crypto/blake2.h delete mode 100644 stratum/algos/crypto/blake2b-ref.c delete mode 100644 stratum/algos/crypto/portable_endian.h delete mode 100644 stratum/algos/crypto/siphash.cuh delete mode 100644 stratum/algos/crypto/siphash.hpp delete mode 100644 stratum/algos/crypto/siphashxN.h delete mode 100644 stratum/algos/cuckoo.c delete mode 100644 stratum/algos/cuckoo.h delete mode 100644 stratum/config.sample/cuckoo.conf diff --git a/stratum/algos/crypto/blake2-impl.h b/stratum/algos/crypto/blake2-impl.h deleted file mode 100644 index 5dff7fc7a..000000000 --- a/stratum/algos/crypto/blake2-impl.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - BLAKE2 reference source code package - reference C implementations - - Copyright 2012, Samuel Neves . You may use this under the - terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at - your option. The terms of these licenses can be found at: - - - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - - OpenSSL license : https://www.openssl.org/source/license.html - - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - - More information about the BLAKE2 hash function can be found at - https://blake2.net. -*/ -#ifndef BLAKE2_IMPL_H -#define BLAKE2_IMPL_H - -#include -#include - -#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) - #if defined(_MSC_VER) - #define BLAKE2_INLINE __inline - #elif defined(__GNUC__) - #define BLAKE2_INLINE __inline__ - #else - #define BLAKE2_INLINE - #endif -#else - #define BLAKE2_INLINE inline -#endif - -static BLAKE2_INLINE uint32_t load32( const void *src ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - uint32_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = ( const uint8_t * )src; - return (( uint32_t )( p[0] ) << 0) | - (( uint32_t )( p[1] ) << 8) | - (( uint32_t )( p[2] ) << 16) | - (( uint32_t )( p[3] ) << 24) ; -#endif -} - -static BLAKE2_INLINE uint64_t load64( const void *src ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - uint64_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = ( const uint8_t * )src; - return (( uint64_t )( p[0] ) << 0) | - (( uint64_t )( p[1] ) << 8) | - (( uint64_t )( p[2] ) << 16) | - (( uint64_t )( p[3] ) << 24) | - (( uint64_t )( p[4] ) << 32) | - (( uint64_t )( p[5] ) << 40) | - (( uint64_t )( p[6] ) << 48) | - (( uint64_t )( p[7] ) << 56) ; -#endif -} - -static BLAKE2_INLINE uint16_t load16( const void *src ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - uint16_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = ( const uint8_t * )src; - return (( uint16_t )( p[0] ) << 0) | - (( uint16_t )( p[1] ) << 8) ; -#endif -} - -static BLAKE2_INLINE void store16( void *dst, uint16_t w ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = ( uint8_t * )dst; - *p++ = ( uint8_t )w; w >>= 8; - *p++ = ( uint8_t )w; -#endif -} - -static BLAKE2_INLINE void store32( void *dst, uint32_t w ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = ( uint8_t * )dst; - p[0] = (uint8_t)(w >> 0); - p[1] = (uint8_t)(w >> 8); - p[2] = (uint8_t)(w >> 16); - p[3] = (uint8_t)(w >> 24); -#endif -} - -static BLAKE2_INLINE void store64( void *dst, uint64_t w ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = ( uint8_t * )dst; - p[0] = (uint8_t)(w >> 0); - p[1] = (uint8_t)(w >> 8); - p[2] = (uint8_t)(w >> 16); - p[3] = (uint8_t)(w >> 24); - p[4] = (uint8_t)(w >> 32); - p[5] = (uint8_t)(w >> 40); - p[6] = (uint8_t)(w >> 48); - p[7] = (uint8_t)(w >> 56); -#endif -} - -static BLAKE2_INLINE uint64_t load48( const void *src ) -{ - const uint8_t *p = ( const uint8_t * )src; - return (( uint64_t )( p[0] ) << 0) | - (( uint64_t )( p[1] ) << 8) | - (( uint64_t )( p[2] ) << 16) | - (( uint64_t )( p[3] ) << 24) | - (( uint64_t )( p[4] ) << 32) | - (( uint64_t )( p[5] ) << 40) ; -} - -static BLAKE2_INLINE void store48( void *dst, uint64_t w ) -{ - uint8_t *p = ( uint8_t * )dst; - p[0] = (uint8_t)(w >> 0); - p[1] = (uint8_t)(w >> 8); - p[2] = (uint8_t)(w >> 16); - p[3] = (uint8_t)(w >> 24); - p[4] = (uint8_t)(w >> 32); - p[5] = (uint8_t)(w >> 40); -} - -static BLAKE2_INLINE uint32_t rotr32( const uint32_t w, const unsigned c ) -{ - return ( w >> c ) | ( w << ( 32 - c ) ); -} - -static BLAKE2_INLINE uint64_t rotr64( const uint64_t w, const unsigned c ) -{ - return ( w >> c ) | ( w << ( 64 - c ) ); -} - -/* prevents compiler optimizing out memset() */ -static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) -{ - static void *(*const volatile memset_v)(void *, int, size_t) = &memset; - memset_v(v, 0, n); -} - -#endif diff --git a/stratum/algos/crypto/blake2.h b/stratum/algos/crypto/blake2.h deleted file mode 100644 index ad62f260e..000000000 --- a/stratum/algos/crypto/blake2.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - BLAKE2 reference source code package - reference C implementations - - Copyright 2012, Samuel Neves . You may use this under the - terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at - your option. The terms of these licenses can be found at: - - - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - - OpenSSL license : https://www.openssl.org/source/license.html - - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - - More information about the BLAKE2 hash function can be found at - https://blake2.net. -*/ -#ifndef BLAKE2_H -#define BLAKE2_H - -#include -#include - -#if defined(_MSC_VER) -#define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop)) -#else -#define BLAKE2_PACKED(x) x __attribute__((packed)) -#endif - -#if defined(__cplusplus) -extern "C" { -#endif - - enum blake2s_constant - { - BLAKE2S_BLOCKBYTES = 64, - BLAKE2S_OUTBYTES = 32, - BLAKE2S_KEYBYTES = 32, - BLAKE2S_SALTBYTES = 8, - BLAKE2S_PERSONALBYTES = 8 - }; - - enum blake2b_constant - { - BLAKE2B_BLOCKBYTES = 128, - BLAKE2B_OUTBYTES = 64, - BLAKE2B_KEYBYTES = 64, - BLAKE2B_SALTBYTES = 16, - BLAKE2B_PERSONALBYTES = 16 - }; - - typedef struct blake2s_state__ - { - uint32_t h[8]; - uint32_t t[2]; - uint32_t f[2]; - uint8_t buf[BLAKE2S_BLOCKBYTES]; - size_t buflen; - size_t outlen; - uint8_t last_node; - } blake2s_state; - - typedef struct blake2b_state__ - { - uint64_t h[8]; - uint64_t t[2]; - uint64_t f[2]; - uint8_t buf[BLAKE2B_BLOCKBYTES]; - size_t buflen; - size_t outlen; - uint8_t last_node; - } blake2b_state; - - typedef struct blake2sp_state__ - { - blake2s_state S[8][1]; - blake2s_state R[1]; - uint8_t buf[8 * BLAKE2S_BLOCKBYTES]; - size_t buflen; - size_t outlen; - } blake2sp_state; - - typedef struct blake2bp_state__ - { - blake2b_state S[4][1]; - blake2b_state R[1]; - uint8_t buf[4 * BLAKE2B_BLOCKBYTES]; - size_t buflen; - size_t outlen; - } blake2bp_state; - - - BLAKE2_PACKED(struct blake2s_param__ - { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint32_t node_offset; /* 12 */ - uint16_t xof_length; /* 14 */ - uint8_t node_depth; /* 15 */ - uint8_t inner_length; /* 16 */ - /* uint8_t reserved[0]; */ - uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ - uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ - }); - - typedef struct blake2s_param__ blake2s_param; - - BLAKE2_PACKED(struct blake2b_param__ - { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint32_t node_offset; /* 12 */ - uint32_t xof_length; /* 16 */ - uint8_t node_depth; /* 17 */ - uint8_t inner_length; /* 18 */ - uint8_t reserved[14]; /* 32 */ - uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ - uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ - }); - - typedef struct blake2b_param__ blake2b_param; - - typedef struct blake2xs_state__ - { - blake2s_state S[1]; - blake2s_param P[1]; - } blake2xs_state; - - typedef struct blake2xb_state__ - { - blake2b_state S[1]; - blake2b_param P[1]; - } blake2xb_state; - - /* Padded structs result in a compile-time error */ - enum { - BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES), - BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) - }; - - /* Streaming API */ - int blake2s_init( blake2s_state *S, size_t outlen ); - int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); - int blake2s_update( blake2s_state *S, const void *in, size_t inlen ); - int blake2s_final( blake2s_state *S, void *out, size_t outlen ); - - int blake2b_init( blake2b_state *S, size_t outlen ); - int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); - int blake2b_update( blake2b_state *S, const void *in, size_t inlen ); - int blake2b_final( blake2b_state *S, void *out, size_t outlen ); - - int blake2sp_init( blake2sp_state *S, size_t outlen ); - int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2sp_update( blake2sp_state *S, const void *in, size_t inlen ); - int blake2sp_final( blake2sp_state *S, void *out, size_t outlen ); - - int blake2bp_init( blake2bp_state *S, size_t outlen ); - int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2bp_update( blake2bp_state *S, const void *in, size_t inlen ); - int blake2bp_final( blake2bp_state *S, void *out, size_t outlen ); - - /* Variable output length API */ - int blake2xs_init( blake2xs_state *S, const size_t outlen ); - int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, size_t keylen ); - int blake2xs_update( blake2xs_state *S, const void *in, size_t inlen ); - int blake2xs_final(blake2xs_state *S, void *out, size_t outlen); - - int blake2xb_init( blake2xb_state *S, const size_t outlen ); - int blake2xb_init_key( blake2xb_state *S, const size_t outlen, const void *key, size_t keylen ); - int blake2xb_update( blake2xb_state *S, const void *in, size_t inlen ); - int blake2xb_final(blake2xb_state *S, void *out, size_t outlen); - - /* Simple API */ - int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - int blake2sp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2bp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - int blake2xs( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2xb( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - /* This is simply an alias for blake2b */ - int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/stratum/algos/crypto/blake2b-ref.c b/stratum/algos/crypto/blake2b-ref.c deleted file mode 100644 index cd38b1ba0..000000000 --- a/stratum/algos/crypto/blake2b-ref.c +++ /dev/null @@ -1,379 +0,0 @@ -/* - BLAKE2 reference source code package - reference C implementations - - Copyright 2012, Samuel Neves . You may use this under the - terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at - your option. The terms of these licenses can be found at: - - - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - - OpenSSL license : https://www.openssl.org/source/license.html - - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - - More information about the BLAKE2 hash function can be found at - https://blake2.net. -*/ - -#include -#include -#include - -#include "blake2.h" -#include "blake2-impl.h" - -static const uint64_t blake2b_IV[8] = -{ - 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, - 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, - 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, - 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL -}; - -static const uint8_t blake2b_sigma[12][16] = -{ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , - { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } , - { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } , - { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } , - { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } , - { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } , - { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } , - { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } , - { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } , - { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } , - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , - { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } -}; - - -static void blake2b_set_lastnode( blake2b_state *S ) -{ - S->f[1] = (uint64_t)-1; -} - -/* Some helper functions, not necessarily useful */ -static int blake2b_is_lastblock( const blake2b_state *S ) -{ - return S->f[0] != 0; -} - -static void blake2b_set_lastblock( blake2b_state *S ) -{ - if( S->last_node ) blake2b_set_lastnode( S ); - - S->f[0] = (uint64_t)-1; -} - -static void blake2b_increment_counter( blake2b_state *S, const uint64_t inc ) -{ - S->t[0] += inc; - S->t[1] += ( S->t[0] < inc ); -} - -static void blake2b_init0( blake2b_state *S ) -{ - size_t i; - memset( S, 0, sizeof( blake2b_state ) ); - - for( i = 0; i < 8; ++i ) S->h[i] = blake2b_IV[i]; -} - -/* init xors IV with input parameter block */ -int blake2b_init_param( blake2b_state *S, const blake2b_param *P ) -{ - const uint8_t *p = ( const uint8_t * )( P ); - size_t i; - - blake2b_init0( S ); - - /* IV XOR ParamBlock */ - for( i = 0; i < 8; ++i ) - S->h[i] ^= load64( p + sizeof( S->h[i] ) * i ); - - S->outlen = P->digest_length; - return 0; -} - - - -int blake2b_init( blake2b_state *S, size_t outlen ) -{ - blake2b_param P[1]; - - if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; - - P->digest_length = (uint8_t)outlen; - P->key_length = 0; - P->fanout = 1; - P->depth = 1; - store32( &P->leaf_length, 0 ); - store32( &P->node_offset, 0 ); - store32( &P->xof_length, 0 ); - P->node_depth = 0; - P->inner_length = 0; - memset( P->reserved, 0, sizeof( P->reserved ) ); - memset( P->salt, 0, sizeof( P->salt ) ); - memset( P->personal, 0, sizeof( P->personal ) ); - return blake2b_init_param( S, P ); -} - - -int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ) -{ - blake2b_param P[1]; - - if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; - - if ( !key || !keylen || keylen > BLAKE2B_KEYBYTES ) return -1; - - P->digest_length = (uint8_t)outlen; - P->key_length = (uint8_t)keylen; - P->fanout = 1; - P->depth = 1; - store32( &P->leaf_length, 0 ); - store32( &P->node_offset, 0 ); - store32( &P->xof_length, 0 ); - P->node_depth = 0; - P->inner_length = 0; - memset( P->reserved, 0, sizeof( P->reserved ) ); - memset( P->salt, 0, sizeof( P->salt ) ); - memset( P->personal, 0, sizeof( P->personal ) ); - - if( blake2b_init_param( S, P ) < 0 ) return -1; - - { - uint8_t block[BLAKE2B_BLOCKBYTES]; - memset( block, 0, BLAKE2B_BLOCKBYTES ); - memcpy( block, key, keylen ); - blake2b_update( S, block, BLAKE2B_BLOCKBYTES ); - secure_zero_memory( block, BLAKE2B_BLOCKBYTES ); /* Burn the key from stack */ - } - return 0; -} - -#define G(r,i,a,b,c,d) \ - do { \ - a = a + b + m[blake2b_sigma[r][2*i+0]]; \ - d = rotr64(d ^ a, 32); \ - c = c + d; \ - b = rotr64(b ^ c, 24); \ - a = a + b + m[blake2b_sigma[r][2*i+1]]; \ - d = rotr64(d ^ a, 16); \ - c = c + d; \ - b = rotr64(b ^ c, 63); \ - } while(0) - -#define ROUND(r) \ - do { \ - G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \ - G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \ - G(r,2,v[ 2],v[ 6],v[10],v[14]); \ - G(r,3,v[ 3],v[ 7],v[11],v[15]); \ - G(r,4,v[ 0],v[ 5],v[10],v[15]); \ - G(r,5,v[ 1],v[ 6],v[11],v[12]); \ - G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \ - G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \ - } while(0) - -static void blake2b_compress( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ) -{ - uint64_t m[16]; - uint64_t v[16]; - size_t i; - - for( i = 0; i < 16; ++i ) { - m[i] = load64( block + i * sizeof( m[i] ) ); - } - - for( i = 0; i < 8; ++i ) { - v[i] = S->h[i]; - } - - v[ 8] = blake2b_IV[0]; - v[ 9] = blake2b_IV[1]; - v[10] = blake2b_IV[2]; - v[11] = blake2b_IV[3]; - v[12] = blake2b_IV[4] ^ S->t[0]; - v[13] = blake2b_IV[5] ^ S->t[1]; - v[14] = blake2b_IV[6] ^ S->f[0]; - v[15] = blake2b_IV[7] ^ S->f[1]; - - ROUND( 0 ); - ROUND( 1 ); - ROUND( 2 ); - ROUND( 3 ); - ROUND( 4 ); - ROUND( 5 ); - ROUND( 6 ); - ROUND( 7 ); - ROUND( 8 ); - ROUND( 9 ); - ROUND( 10 ); - ROUND( 11 ); - - for( i = 0; i < 8; ++i ) { - S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; - } -} - -#undef G -#undef ROUND - -int blake2b_update( blake2b_state *S, const void *pin, size_t inlen ) -{ - const unsigned char * in = (const unsigned char *)pin; - if( inlen > 0 ) - { - size_t left = S->buflen; - size_t fill = BLAKE2B_BLOCKBYTES - left; - if( inlen > fill ) - { - S->buflen = 0; - memcpy( S->buf + left, in, fill ); /* Fill buffer */ - blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES ); - blake2b_compress( S, S->buf ); /* Compress */ - in += fill; inlen -= fill; - while(inlen > BLAKE2B_BLOCKBYTES) { - blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); - blake2b_compress( S, in ); - in += BLAKE2B_BLOCKBYTES; - inlen -= BLAKE2B_BLOCKBYTES; - } - } - memcpy( S->buf + S->buflen, in, inlen ); - S->buflen += inlen; - } - return 0; -} - -int blake2b_final( blake2b_state *S, void *out, size_t outlen ) -{ - uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; - size_t i; - - if( out == NULL || outlen < S->outlen ) - return -1; - - if( blake2b_is_lastblock( S ) ) - return -1; - - blake2b_increment_counter( S, S->buflen ); - blake2b_set_lastblock( S ); - memset( S->buf + S->buflen, 0, BLAKE2B_BLOCKBYTES - S->buflen ); /* Padding */ - blake2b_compress( S, S->buf ); - - for( i = 0; i < 8; ++i ) /* Output full hash to temp buffer */ - store64( buffer + sizeof( S->h[i] ) * i, S->h[i] ); - - memcpy( out, buffer, S->outlen ); - secure_zero_memory(buffer, sizeof(buffer)); - return 0; -} - -/* inlen, at least, should be uint64_t. Others can be size_t. */ -int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ) -{ - blake2b_state S[1]; - - /* Verify parameters */ - if ( NULL == in && inlen > 0 ) return -1; - - if ( NULL == out ) return -1; - - if( NULL == key && keylen > 0 ) return -1; - - if( !outlen || outlen > BLAKE2B_OUTBYTES ) return -1; - - if( keylen > BLAKE2B_KEYBYTES ) return -1; - - if( keylen > 0 ) - { - if( blake2b_init_key( S, outlen, key, keylen ) < 0 ) return -1; - } - else - { - if( blake2b_init( S, outlen ) < 0 ) return -1; - } - - blake2b_update( S, ( const uint8_t * )in, inlen ); - blake2b_final( S, out, outlen ); - return 0; -} - -int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ) { - return blake2b(out, outlen, in, inlen, key, keylen); -} - -#if defined(SUPERCOP) -int crypto_hash( unsigned char *out, unsigned char *in, unsigned long long inlen ) -{ - return blake2b( out, BLAKE2B_OUTBYTES, in, inlen, NULL, 0 ); -} -#endif - -#if defined(BLAKE2B_SELFTEST) -#include -#include "blake2-kat.h" -int main( void ) -{ - uint8_t key[BLAKE2B_KEYBYTES]; - uint8_t buf[BLAKE2_KAT_LENGTH]; - size_t i, step; - - for( i = 0; i < BLAKE2B_KEYBYTES; ++i ) - key[i] = ( uint8_t )i; - - for( i = 0; i < BLAKE2_KAT_LENGTH; ++i ) - buf[i] = ( uint8_t )i; - - /* Test simple API */ - for( i = 0; i < BLAKE2_KAT_LENGTH; ++i ) - { - uint8_t hash[BLAKE2B_OUTBYTES]; - blake2b( hash, BLAKE2B_OUTBYTES, buf, i, key, BLAKE2B_KEYBYTES ); - - if( 0 != memcmp( hash, blake2b_keyed_kat[i], BLAKE2B_OUTBYTES ) ) - { - goto fail; - } - } - - /* Test streaming API */ - for(step = 1; step < BLAKE2B_BLOCKBYTES; ++step) { - for (i = 0; i < BLAKE2_KAT_LENGTH; ++i) { - uint8_t hash[BLAKE2B_OUTBYTES]; - blake2b_state S; - uint8_t * p = buf; - size_t mlen = i; - int err = 0; - - if( (err = blake2b_init_key(&S, BLAKE2B_OUTBYTES, key, BLAKE2B_KEYBYTES)) < 0 ) { - goto fail; - } - - while (mlen >= step) { - if ( (err = blake2b_update(&S, p, step)) < 0 ) { - goto fail; - } - mlen -= step; - p += step; - } - if ( (err = blake2b_update(&S, p, mlen)) < 0) { - goto fail; - } - if ( (err = blake2b_final(&S, hash, BLAKE2B_OUTBYTES)) < 0) { - goto fail; - } - - if (0 != memcmp(hash, blake2b_keyed_kat[i], BLAKE2B_OUTBYTES)) { - goto fail; - } - } - } - - puts( "ok" ); - return 0; -fail: - puts("error"); - return -1; -} -#endif diff --git a/stratum/algos/crypto/portable_endian.h b/stratum/algos/crypto/portable_endian.h deleted file mode 100644 index e89694a44..000000000 --- a/stratum/algos/crypto/portable_endian.h +++ /dev/null @@ -1,118 +0,0 @@ -// "License": Public Domain -// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. -// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to -// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it -// an example on how to get the endian conversion functions on different platforms. - -#ifndef PORTABLE_ENDIAN_H__ -#define PORTABLE_ENDIAN_H__ - -#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) - -# define __WINDOWS__ - -#endif - -#if defined(__linux__) || defined(__CYGWIN__) - -# include - -#elif defined(__APPLE__) - -# include - -# define htobe16(x) OSSwapHostToBigInt16(x) -# define htole16(x) OSSwapHostToLittleInt16(x) -# define be16toh(x) OSSwapBigToHostInt16(x) -# define le16toh(x) OSSwapLittleToHostInt16(x) - -# define htobe32(x) OSSwapHostToBigInt32(x) -# define htole32(x) OSSwapHostToLittleInt32(x) -# define be32toh(x) OSSwapBigToHostInt32(x) -# define le32toh(x) OSSwapLittleToHostInt32(x) - -# define htobe64(x) OSSwapHostToBigInt64(x) -# define htole64(x) OSSwapHostToLittleInt64(x) -# define be64toh(x) OSSwapBigToHostInt64(x) -# define le64toh(x) OSSwapLittleToHostInt64(x) - -# define __BYTE_ORDER BYTE_ORDER -# define __BIG_ENDIAN BIG_ENDIAN -# define __LITTLE_ENDIAN LITTLE_ENDIAN -# define __PDP_ENDIAN PDP_ENDIAN - -#elif defined(__OpenBSD__) - -# include - -#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) - -# include - -# define be16toh(x) betoh16(x) -# define le16toh(x) letoh16(x) - -# define be32toh(x) betoh32(x) -# define le32toh(x) letoh32(x) - -# define be64toh(x) betoh64(x) -# define le64toh(x) letoh64(x) - -#elif defined(__WINDOWS__) - -# include -# include - -# if BYTE_ORDER == LITTLE_ENDIAN - -# define htobe16(x) htons(x) -# define htole16(x) (x) -# define be16toh(x) ntohs(x) -# define le16toh(x) (x) - -# define htobe32(x) htonl(x) -# define htole32(x) (x) -# define be32toh(x) ntohl(x) -# define le32toh(x) (x) - -# define htobe64(x) htonll(x) -# define htole64(x) (x) -# define be64toh(x) ntohll(x) -# define le64toh(x) (x) - -# elif BYTE_ORDER == BIG_ENDIAN - - /* that would be xbox 360 */ -# define htobe16(x) (x) -# define htole16(x) __builtin_bswap16(x) -# define be16toh(x) (x) -# define le16toh(x) __builtin_bswap16(x) - -# define htobe32(x) (x) -# define htole32(x) __builtin_bswap32(x) -# define be32toh(x) (x) -# define le32toh(x) __builtin_bswap32(x) - -# define htobe64(x) (x) -# define htole64(x) __builtin_bswap64(x) -# define be64toh(x) (x) -# define le64toh(x) __builtin_bswap64(x) - -# else - -# error byte order not supported - -# endif - -# define __BYTE_ORDER BYTE_ORDER -# define __BIG_ENDIAN BIG_ENDIAN -# define __LITTLE_ENDIAN LITTLE_ENDIAN -# define __PDP_ENDIAN PDP_ENDIAN - -#else - -# error platform not supported - -#endif - -#endif diff --git a/stratum/algos/crypto/siphash.cuh b/stratum/algos/crypto/siphash.cuh deleted file mode 100644 index 67fc2f5ec..000000000 --- a/stratum/algos/crypto/siphash.cuh +++ /dev/null @@ -1,94 +0,0 @@ -#pragma once - -#if (__CUDA_ARCH__ >= 320) // make rotate-left use funnel shifter, 3% speed gain -typedef uint2 sip64; - -static __device__ __forceinline__ sip64 operator^ (uint2 a, uint2 b) { - return make_uint2(a.x ^ b.x, a.y ^ b.y); -} -static __device__ __forceinline__ void operator^= (uint2 &a, uint2 b) { - a.x ^= b.x, a.y ^= b.y; -} -static __device__ __forceinline__ void operator+= (uint2 &a, uint2 b) { - asm("{\n\tadd.cc.u32 %0,%2,%4;\n\taddc.u32 %1,%3,%5;\n\t}\n\t" - : "=r"(a.x), "=r"(a.y) : "r"(a.x), "r"(a.y), "r"(b.x), "r"(b.y)); -} - -__inline__ __device__ sip64 rotl(const sip64 a, const int offset) { - sip64 result; - if (offset >= 32) { - asm("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(result.x) : "r"(a.x), "r"(a.y), "r"(offset)); - asm("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(result.y) : "r"(a.y), "r"(a.x), "r"(offset)); - } else { - asm("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(result.x) : "r"(a.y), "r"(a.x), "r"(offset)); - asm("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(result.y) : "r"(a.x), "r"(a.y), "r"(offset)); - } - return result; -} -__device__ __forceinline__ sip64 vectorize(const uint64_t x) { - uint2 result; - asm("mov.b64 {%0,%1},%2; \n\t" : "=r"(result.x), "=r"(result.y) : "l"(x)); - return result; -} -__device__ __forceinline__ uint64_t devectorize(sip64 x) { - uint64_t result; - asm("mov.b64 %0,{%1,%2}; \n\t" : "=l"(result) : "r"(x.x), "r"(x.y)); - return result; -} - -#else - -typedef uint64_t sip64; - -__inline__ __device__ sip64 rotl(const sip64 a, const int offset) { - return (a << offset) | (a >> (64 - offset)); -} -__device__ __forceinline__ sip64 vectorize(const uint64_t x) { - return x; -} -__device__ __forceinline__ uint64_t devectorize(sip64 x) { - return x; -} - -#endif - -class diphash_state { -public: - sip64 v0; - sip64 v1; - sip64 v2; - sip64 v3; - - __device__ diphash_state(const siphash_keys &sk) { - v0 = vectorize(sk.k0); v1 = vectorize(sk.k1); v2 = vectorize(sk.k2); v3 = vectorize(sk.k3); - } - __device__ uint64_t xor_lanes() { - return devectorize((v0 ^ v1) ^ (v2 ^ v3)); - } - __device__ void xor_with(const diphash_state &x) { - v0 ^= x.v0; - v1 ^= x.v1; - v2 ^= x.v2; - v3 ^= x.v3; - } - __device__ void dip_round() { - v0 += v1; v2 += v3; v1 = rotl(v1,13); - v3 = rotl(v3,16); v1 ^= v0; v3 ^= v2; - v0 = rotl(v0,32); v2 += v1; v0 += v3; - v1 = rotl(v1,17); v3 = rotl(v3,21); - v1 ^= v2; v3 ^= v0; v2 = rotl(v2,32); - } - __device__ void hash24(const uint64_t nonce) { - v3 ^= vectorize(nonce); - dip_round(); dip_round(); - v0 ^= vectorize(nonce); - v2 ^= vectorize(0xff); - dip_round(); dip_round(); dip_round(); dip_round(); - } -}; - -__device__ uint64_t dipnode(const siphash_keys &sip_keys, const uint32_t nonce, const int uorv) { - diphash_state v(sip_keys); - v.hash24((nonce << 1) | uorv); - return v.xor_lanes() & EDGEMASK; -} diff --git a/stratum/algos/crypto/siphash.hpp b/stratum/algos/crypto/siphash.hpp deleted file mode 100644 index 0974e5fea..000000000 --- a/stratum/algos/crypto/siphash.hpp +++ /dev/null @@ -1,69 +0,0 @@ -#pragma once - -#include // for types uint32_t,uint64_t -#include "portable_endian.h" // for htole32/64 - -// generalize siphash by using a quadruple of 64-bit keys, -class siphash_keys { -public: - uint64_t k0; - uint64_t k1; - uint64_t k2; - uint64_t k3; - - void setkeys(const char *keybuf); - - uint64_t siphash24(const uint64_t nonce) const; -}; - -class siphash_state { -public: - uint64_t v0; - uint64_t v1; - uint64_t v2; - uint64_t v3; - - siphash_state(const siphash_keys &sk) { - v0 = sk.k0; v1 = sk.k1; v2 = sk.k2; v3 = sk.k3; - } - uint64_t xor_lanes() { - return (v0 ^ v1) ^ (v2 ^ v3); - } - void xor_with(const siphash_state &x) { - v0 ^= x.v0; - v1 ^= x.v1; - v2 ^= x.v2; - v3 ^= x.v3; - } - static uint64_t rotl(uint64_t x, uint64_t b) { - return (x << b) | (x >> (64 - b)); - } - void sip_round() { - v0 += v1; v2 += v3; v1 = rotl(v1,13); - v3 = rotl(v3,16); v1 ^= v0; v3 ^= v2; - v0 = rotl(v0,32); v2 += v1; v0 += v3; - v1 = rotl(v1,17); v3 = rotl(v3,21); - v1 ^= v2; v3 ^= v0; v2 = rotl(v2,32); - } - void hash24(const uint64_t nonce) { - v3 ^= nonce; - sip_round(); sip_round(); - v0 ^= nonce; - v2 ^= 0xff; - sip_round(); sip_round(); sip_round(); sip_round(); - } -}; - -// set siphash keys from 32 byte char array -void siphash_keys::setkeys(const char *keybuf) { - k0 = htole64(((uint64_t *)keybuf)[0]); - k1 = htole64(((uint64_t *)keybuf)[1]); - k2 = htole64(((uint64_t *)keybuf)[2]); - k3 = htole64(((uint64_t *)keybuf)[3]); -} - -uint64_t siphash_keys::siphash24(const uint64_t nonce) const { - siphash_state v(*this); - v.hash24(nonce); - return v.xor_lanes(); -} diff --git a/stratum/algos/crypto/siphashxN.h b/stratum/algos/crypto/siphashxN.h deleted file mode 100644 index 36dc889f7..000000000 --- a/stratum/algos/crypto/siphashxN.h +++ /dev/null @@ -1,212 +0,0 @@ -#ifndef INCLUDE_SIPHASHXN_H -#define INCLUDE_SIPHASHXN_H -#include // for _mm256_* intrinsics - -#ifdef __AVX2__ - -#define ADD(a, b) _mm256_add_epi64(a, b) -#define XOR(a, b) _mm256_xor_si256(a, b) -#define ROTATE16 _mm256_set_epi64x(0x0D0C0B0A09080F0EULL,0x0504030201000706ULL, \ - 0x0D0C0B0A09080F0EULL, 0x0504030201000706ULL) -#define ROT13(x) _mm256_or_si256(_mm256_slli_epi64(x,13),_mm256_srli_epi64(x,51)) -#define ROT16(x) _mm256_shuffle_epi8((x), ROTATE16) -#define ROT17(x) _mm256_or_si256(_mm256_slli_epi64(x,17),_mm256_srli_epi64(x,47)) -#define ROT21(x) _mm256_or_si256(_mm256_slli_epi64(x,21),_mm256_srli_epi64(x,43)) -#define ROT32(x) _mm256_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) - -#elif defined __SSE2__ - -#define ADD(a, b) _mm_add_epi64(a, b) -#define XOR(a, b) _mm_xor_si128(a, b) -#define ROT13(x) _mm_or_si128(_mm_slli_epi64(x,13),_mm_srli_epi64(x,51)) -#define ROT16(x) _mm_shufflehi_epi16(_mm_shufflelo_epi16(x, _MM_SHUFFLE(2,1,0,3)), _MM_SHUFFLE(2,1,0,3)) -#define ROT17(x) _mm_or_si128(_mm_slli_epi64(x,17),_mm_srli_epi64(x,47)) -#define ROT21(x) _mm_or_si128(_mm_slli_epi64(x,21),_mm_srli_epi64(x,43)) -#define ROT32(x) _mm_shuffle_epi32 (x, _MM_SHUFFLE(2,3,0,1)) - -#endif - -#define SIPROUNDXN \ - do { \ - v0 = ADD(v0,v1); v2 = ADD(v2,v3); v1 = ROT13(v1); \ - v3 = ROT16(v3); v1 = XOR(v1,v0); v3 = XOR(v3,v2); \ - v0 = ROT32(v0); v2 = ADD(v2,v1); v0 = ADD(v0,v3); \ - v1 = ROT17(v1); v3 = ROT21(v3); \ - v1 = XOR(v1,v2); v3 = XOR(v3,v0); v2 = ROT32(v2); \ - } while(0) - -#define SIPROUNDX2N \ - do { \ - v0 = ADD(v0,v1); v4 = ADD(v4,v5); \ - v2 = ADD(v2,v3); v6 = ADD(v6,v7); \ - v1 = ROT13(v1); v5 = ROT13(v5); \ - v3 = ROT16(v3); v7 = ROT16(v7); \ - v1 = XOR(v1,v0); v5 = XOR(v5,v4); \ - v3 = XOR(v3,v2); v7 = XOR(v7,v6); \ - v0 = ROT32(v0); v4 = ROT32(v4); \ - v2 = ADD(v2,v1); v6 = ADD(v6,v5); \ - v0 = ADD(v0,v3); v4 = ADD(v4,v7); \ - v1 = ROT17(v1); v5 = ROT17(v5); \ - v3 = ROT21(v3); v7 = ROT21(v7); \ - v1 = XOR(v1,v2); v5 = XOR(v5,v6); \ - v3 = XOR(v3,v0); v7 = XOR(v7,v4); \ - v2 = ROT32(v2); v6 = ROT32(v6); \ - } while(0) - -#define SIPROUNDX4N \ - do { \ - v0 = ADD(v0,v1); v4 = ADD(v4,v5); v8 = ADD(v8,v9); vC = ADD(vC,vD); \ - v2 = ADD(v2,v3); v6 = ADD(v6,v7); vA = ADD(vA,vB); vE = ADD(vE,vF); \ - v1 = ROT13(v1); v5 = ROT13(v5); v9 = ROT13(v9); vD = ROT13(vD); \ - v3 = ROT16(v3); v7 = ROT16(v7); vB = ROT16(vB); vF = ROT16(vF); \ - v1 = XOR(v1,v0); v5 = XOR(v5,v4); v9 = XOR(v9,v8); vD = XOR(vD,vC); \ - v3 = XOR(v3,v2); v7 = XOR(v7,v6); vB = XOR(vB,vA); vF = XOR(vF,vE); \ - v0 = ROT32(v0); v4 = ROT32(v4); v8 = ROT32(v8); vC = ROT32(vC); \ - v2 = ADD(v2,v1); v6 = ADD(v6,v5); vA = ADD(vA,v9); vE = ADD(vE,vD); \ - v0 = ADD(v0,v3); v4 = ADD(v4,v7); v8 = ADD(v8,vB); vC = ADD(vC,vF); \ - v1 = ROT17(v1); v5 = ROT17(v5); v9 = ROT17(v9); vD = ROT17(vD); \ - v3 = ROT21(v3); v7 = ROT21(v7); vB = ROT21(vB); vF = ROT21(vF); \ - v1 = XOR(v1,v2); v5 = XOR(v5,v6); v9 = XOR(v9,vA); vD = XOR(vD,vE); \ - v3 = XOR(v3,v0); v7 = XOR(v7,v4); vB = XOR(vB,v8); vF = XOR(vF,vC); \ - v2 = ROT32(v2); v6 = ROT32(v6); vA = ROT32(vA); vE = ROT32(vE); \ - } while(0) - -#ifdef __AVX2__ - -// 4-way sipHash-2-4 specialized to precomputed key and 8 byte nonces -void siphash24x4(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { - const __m256i packet = _mm256_load_si256((__m256i *)indices); - __m256i v0 = _mm256_set1_epi64x(keys->k0); - __m256i v1 = _mm256_set1_epi64x(keys->k1); - __m256i v2 = _mm256_set1_epi64x(keys->k2); - __m256i v3 = _mm256_set1_epi64x(keys->k3); - - v3 = XOR(v3,packet); - SIPROUNDXN; SIPROUNDXN; - v0 = XOR(v0,packet); - v2 = XOR(v2,_mm256_set1_epi64x(0xffLL)); - SIPROUNDXN; SIPROUNDXN; SIPROUNDXN; SIPROUNDXN; - _mm256_store_si256((__m256i *)hashes, XOR(XOR(v0,v1),XOR(v2,v3))); -} - -// 8-way sipHash-2-4 specialized to precomputed key and 8 byte nonces -void siphash24x8(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { - const __m256i packet0 = _mm256_load_si256((__m256i *)indices); - const __m256i packet4 = _mm256_load_si256((__m256i *)(indices+4)); - __m256i v0, v1, v2, v3, v4, v5, v6, v7; - v7 = v3 = _mm256_set1_epi64x(keys->k3); - v4 = v0 = _mm256_set1_epi64x(keys->k0); - v5 = v1 = _mm256_set1_epi64x(keys->k1); - v6 = v2 = _mm256_set1_epi64x(keys->k2); - - v3 = XOR(v3,packet0); v7 = XOR(v7,packet4); - SIPROUNDX2N; SIPROUNDX2N; - v0 = XOR(v0,packet0); v4 = XOR(v4,packet4); - v2 = XOR(v2,_mm256_set1_epi64x(0xffLL)); - v6 = XOR(v6,_mm256_set1_epi64x(0xffLL)); - SIPROUNDX2N; SIPROUNDX2N; SIPROUNDX2N; SIPROUNDX2N; - _mm256_store_si256((__m256i *)hashes, XOR(XOR(v0,v1),XOR(v2,v3))); - _mm256_store_si256((__m256i *)(hashes+4), XOR(XOR(v4,v5),XOR(v6,v7))); -} - -// 16-way sipHash-2-4 specialized to precomputed key and 8 byte nonces -void siphash24x16(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { - const __m256i packet0 = _mm256_load_si256((__m256i *)indices); - const __m256i packet4 = _mm256_load_si256((__m256i *)(indices+4)); - const __m256i packet8 = _mm256_load_si256((__m256i *)(indices+8)); - const __m256i packetC = _mm256_load_si256((__m256i *)(indices+12)); - __m256i v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, vA, vB, vC, vD, vE, vF; - vF = vB = v7 = v3 = _mm256_set1_epi64x(keys->k3); - vC = v8 = v4 = v0 = _mm256_set1_epi64x(keys->k0); - vD = v9 = v5 = v1 = _mm256_set1_epi64x(keys->k1); - vE = vA = v6 = v2 = _mm256_set1_epi64x(keys->k2); - - v3 = XOR(v3,packet0); v7 = XOR(v7,packet4); vB = XOR(vB,packet8); vF = XOR(vF,packetC); - SIPROUNDX4N; SIPROUNDX4N; - v0 = XOR(v0,packet0); v4 = XOR(v4,packet4); v8 = XOR(v8,packet8); vC = XOR(vC,packetC); - v2 = XOR(v2,_mm256_set1_epi64x(0xffLL)); - v6 = XOR(v6,_mm256_set1_epi64x(0xffLL)); - vA = XOR(vA,_mm256_set1_epi64x(0xffLL)); - vE = XOR(vE,_mm256_set1_epi64x(0xffLL)); - SIPROUNDX4N; SIPROUNDX4N; SIPROUNDX4N; SIPROUNDX4N; - _mm256_store_si256((__m256i *) hashes , XOR(XOR(v0,v1),XOR(v2,v3))); - _mm256_store_si256((__m256i *)(hashes+ 4), XOR(XOR(v4,v5),XOR(v6,v7))); - _mm256_store_si256((__m256i *)(hashes+ 8), XOR(XOR(v8,v9),XOR(vA,vB))); - _mm256_store_si256((__m256i *)(hashes+12), XOR(XOR(vC,vD),XOR(vE,vF))); -} - -#elif defined __SSE2__ - -// 2-way sipHash-2-4 specialized to precomputed key and 8 byte nonces -void siphash24x2(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { - __m128i v0, v1, v2, v3, mi; - v0 = _mm_set1_epi64x(keys->k0); - v1 = _mm_set1_epi64x(keys->k1); - v2 = _mm_set1_epi64x(keys->k2); - v3 = _mm_set1_epi64x(keys->k3); - mi = _mm_load_si128((__m128i *)indices); - - v3 = XOR (v3, mi); - SIPROUNDXN; SIPROUNDXN; - v0 = XOR (v0, mi); - - v2 = XOR (v2, _mm_set1_epi64x(0xffLL)); - SIPROUNDXN; SIPROUNDXN; SIPROUNDXN; SIPROUNDXN; - mi = XOR(XOR(v0,v1),XOR(v2,v3)); - - _mm_store_si128((__m128i *)hashes, mi); -} - -// 4-way sipHash-2-4 specialized to precomputed key and 8 byte nonces -void siphash24x4(const siphash_keys *keys, const uint64_t *indices, uint64_t *hashes) { - __m128i v0, v1, v2, v3, mi, v4, v5, v6, v7, m2; - v4 = v0 = _mm_set1_epi64x(keys->k0); - v5 = v1 = _mm_set1_epi64x(keys->k1); - v6 = v2 = _mm_set1_epi64x(keys->k2); - v7 = v3 = _mm_set1_epi64x(keys->k3); - - mi = _mm_load_si128((__m128i *)indices); - m2 = _mm_load_si128((__m128i *)(indices + 2)); - - v3 = XOR (v3, mi); - v7 = XOR (v7, m2); - SIPROUNDX2N; SIPROUNDX2N; - v0 = XOR (v0, mi); - v4 = XOR (v4, m2); - - v2 = XOR (v2, _mm_set1_epi64x(0xffLL)); - v6 = XOR (v6, _mm_set1_epi64x(0xffLL)); - SIPROUNDX2N; SIPROUNDX2N; SIPROUNDX2N; SIPROUNDX2N; - mi = XOR(XOR(v0,v1),XOR(v2,v3)); - m2 = XOR(XOR(v4,v5),XOR(v6,v7)); - - _mm_store_si128((__m128i *)hashes, mi); - _mm_store_si128((__m128i *)(hashes + 2),m2); -} -#endif - -#ifndef NSIPHASH -// how many siphash24 to compute in parallel -// currently 1, 2, 4, 8 are supported, but -// more than 1 requires the use of sse2 or avx2 -// more than 4 requires the use of avx2 -#define NSIPHASH 1 -#endif - -void siphash24xN(const siphash_keys *keys, const uint64_t *indices, uint64_t * hashes) { -#if NSIPHASH == 1 - *hashes = keys->siphash24(*indices); -#elif NSIPHASH == 2 - siphash24x2(keys, indices, hashes); -#elif NSIPHASH == 4 - siphash24x4(keys, indices, hashes); -#elif NSIPHASH == 8 - siphash24x8(keys, indices, hashes); -#elif NSIPHASH == 16 - siphash24x16(keys, indices, hashes); -#else -#error not implemented -#endif -} - -#endif // ifdef INCLUDE_SIPHASHXN_H diff --git a/stratum/algos/cuckoo.c b/stratum/algos/cuckoo.c deleted file mode 100644 index 439b212d6..000000000 --- a/stratum/algos/cuckoo.c +++ /dev/null @@ -1,58 +0,0 @@ -// Cuckoo Cycle, a memory-hard proof-of-work -// Copyright (c) 2013-2016 John Tromp - -#include "cuckoo.h" -#include // for SCNx64 macro -#include // printf/scanf -#include // exit -#include // getopt -#include // d'uh - -// arbitrary length of header hashed into siphash key -#define HEADERLEN 80 - -int main(int argc, char **argv) { - const char *header = ""; - int nonce = 0; - int c; - while ((c = getopt (argc, argv, "h:n:")) != -1) { - switch (c) { - case 'h': - header = optarg; - break; - case 'n': - nonce = atoi(optarg); - break; - } - } - char headernonce[HEADERLEN]; - u32 hdrlen = strlen(header); - memcpy(headernonce, header, hdrlen); - memset(headernonce+hdrlen, 0, sizeof(headernonce)-hdrlen); - ((u32 *)headernonce)[HEADERLEN/sizeof(u32)-1] = htole32(nonce); - siphash_keys keys; - setheader(headernonce, sizeof(headernonce), &keys); - printf("Verifying size %d proof for cuckoo%d(\"%s\",%d)\n", - PROOFSIZE, EDGEBITS+1, header, nonce); - for (int nsols=0; scanf(" Solution") == 0; nsols++) { - word_t nonces[PROOFSIZE]; - for (int n = 0; n < PROOFSIZE; n++) { - uint64_t nonce; - int nscan = scanf(" %" SCNx64, &nonce); - assert(nscan == 1); - nonces[n] = nonce; - } - int pow_rc = verify(nonces, &keys); - if (pow_rc == POW_OK) { - printf("Verified with cyclehash "); - unsigned char cyclehash[32]; - blake2b((void *)cyclehash, sizeof(cyclehash), (const void *)nonces, sizeof(nonces), 0, 0); - for (int i=0; i<32; i++) - printf("%02x", cyclehash[i]); - printf("\n"); - } else { - printf("FAILED due to %s\n", errstr[pow_rc]); - } - } - return 0; -} diff --git a/stratum/algos/cuckoo.h b/stratum/algos/cuckoo.h deleted file mode 100644 index c3f90aad4..000000000 --- a/stratum/algos/cuckoo.h +++ /dev/null @@ -1,208 +0,0 @@ -// Cuckoo Cycle, a memory-hard proof-of-work -// Copyright (c) 2013-2017 John Tromp - -#include // for types uint32_t,uint64_t -#include // for functions strlen, memset -#include -#include -#include -#include -#include "../crypto/blake2.h" -#include "../crypto/siphash.hpp" - -#ifdef SIPHASH_COMPAT -#include -#endif - -// proof-of-work parameters -#ifndef EDGEBITS -// the main parameter is the 2-log of the graph size, -// which is the size in bits of the node identifiers -#define EDGEBITS 29 -#endif -#ifndef PROOFSIZE -// the next most important parameter is the (even) length -// of the cycle to be found. a minimum of 12 is recommended -#define PROOFSIZE 42 -#endif - -// save some keystrokes since i'm a lazy typer -typedef uint32_t u32; -typedef uint64_t u64; - -#ifndef MAX_SOLS -#define MAX_SOLS 4 -#endif - -#if EDGEBITS > 30 -typedef uint64_t word_t; -#elif EDGEBITS > 14 -typedef u32 word_t; -#else // if EDGEBITS <= 14 -typedef uint16_t word_t; -#endif - -// number of edges -#define NEDGES ((word_t)1 << EDGEBITS) -// used to mask siphash output -#define EDGEMASK ((word_t)NEDGES - 1) - -// Common Solver parameters, to return to caller -struct SolverParams { - u32 nthreads = 0; - u32 ntrims = 0; - bool showcycle; - bool allrounds; - bool mutate_nonce = 1; - bool cpuload = 1; - - // Common cuda params - u32 device = 0; - - // Cuda-lean specific params - u32 blocks = 0; - u32 tpb = 0; - - // Cuda-mean specific params - u32 expand = 0; - u32 genablocks = 0; - u32 genatpb = 0; - u32 genbtpb = 0; - u32 trimtpb = 0; - u32 tailtpb = 0; - u32 recoverblocks = 0; - u32 recovertpb = 0; -}; - -// Solutions result structs to be instantiated by caller, -// and filled by solver if desired -struct Solution { - u64 nonce = 0; - u64 proof[PROOFSIZE]; -}; - -struct SolverSolutions { - u32 edge_bits = 0; - u32 num_sols = 0; - Solution sols[MAX_SOLS]; -}; - -#define MAX_NAME_LEN 256 - -// last error reason, to be picked up by stats -// to be returned to caller -char LAST_ERROR_REASON[MAX_NAME_LEN]; - -// Solver statistics, to be instantiated by caller -// and filled by solver if desired -struct SolverStats { - u32 device_id = 0; - u32 edge_bits = 0; - char plugin_name[MAX_NAME_LEN]; // will be filled in caller-side - char device_name[MAX_NAME_LEN]; - bool has_errored = false; - char error_reason[MAX_NAME_LEN]; - u32 iterations = 0; - u64 last_start_time = 0; - u64 last_end_time = 0; - u64 last_solution_time = 0; -}; - -// generate edge endpoint in cuckoo graph without partition bit -word_t sipnode(siphash_keys *keys, word_t edge, u32 uorv) { - return keys->siphash24(2*edge + uorv) & EDGEMASK; -} - -enum verify_code { POW_OK, POW_HEADER_LENGTH, POW_TOO_BIG, POW_TOO_SMALL, POW_NON_MATCHING, POW_BRANCH, POW_DEAD_END, POW_SHORT_CYCLE}; -const char *errstr[] = { "OK", "wrong header length", "edge too big", "edges not ascending", "endpoints don't match up", "branch in cycle", "cycle dead ends", "cycle too short"}; - -// verify that edges are ascending and form a cycle in header-generated graph -int verify(word_t edges[PROOFSIZE], siphash_keys *keys) { - word_t uvs[2*PROOFSIZE]; - word_t xor0 = 0, xor1 = 0; - for (u32 n = 0; n < PROOFSIZE; n++) { - if (edges[n] > EDGEMASK) - return POW_TOO_BIG; - if (n && edges[n] <= edges[n-1]) - return POW_TOO_SMALL; - xor0 ^= uvs[2*n ] = sipnode(keys, edges[n], 0); - xor1 ^= uvs[2*n+1] = sipnode(keys, edges[n], 1); - } - if (xor0|xor1) // optional check for obviously bad proofs - return POW_NON_MATCHING; - u32 n = 0, i = 0, j; - do { // follow cycle - for (u32 k = j = i; (k = (k+2) % (2*PROOFSIZE)) != i; ) { - if (uvs[k] == uvs[i]) { // find other edge endpoint identical to one at i - if (j != i) // already found one before - return POW_BRANCH; - j = k; - } - } - if (j == i) return POW_DEAD_END; // no matching endpoint - i = j^1; - n++; - } while (i != 0); // must cycle back to start or we would have found branch - return n == PROOFSIZE ? POW_OK : POW_SHORT_CYCLE; -} - -// convenience function for extracting siphash keys from header -void setheader(const char *header, const u32 headerlen, siphash_keys *keys) { - char hdrkey[32]; - // SHA256((unsigned char *)header, headerlen, (unsigned char *)hdrkey); - blake2b((void *)hdrkey, sizeof(hdrkey), (const void *)header, headerlen, 0, 0); -#ifdef SIPHASH_COMPAT - u64 *k = (u64 *)hdrkey; - u64 k0 = k[0]; - u64 k1 = k[1]; - printf("k0 k1 %lx %lx\n", k0, k1); - k[0] = k0 ^ 0x736f6d6570736575ULL; - k[1] = k1 ^ 0x646f72616e646f6dULL; - k[2] = k0 ^ 0x6c7967656e657261ULL; - k[3] = k1 ^ 0x7465646279746573ULL; -#endif - keys->setkeys(hdrkey); -} - -// edge endpoint in cuckoo graph with partition bit -word_t sipnode_(siphash_keys *keys, word_t edge, u32 uorv) { - return sipnode(keys, edge, uorv) << 1 | uorv; -} - -u64 timestamp() { - using namespace std::chrono; - high_resolution_clock::time_point now = high_resolution_clock::now(); - auto dn = now.time_since_epoch(); - return dn.count(); -} - -///////////////////////////////////////////////////////////////// -// Declarations to make it easier for callers to link as required -///////////////////////////////////////////////////////////////// - -#ifndef C_CALL_CONVENTION -#define C_CALL_CONVENTION 0 -#endif - -// convention to prepend to called functions -#if C_CALL_CONVENTION -#define CALL_CONVENTION extern "C" -#else -#define CALL_CONVENTION -#endif - -// Ability to squash printf output at compile time, if desired -#ifndef SQUASH_OUTPUT -#define SQUASH_OUTPUT 0 -#endif - -void print_log(const char *fmt, ...) { - if (SQUASH_OUTPUT) return; - va_list args; - va_start(args, fmt); - vprintf(fmt, args); - va_end(args); -} -////////////////////////////////////////////////////////////////// -// END caller QOL -////////////////////////////////////////////////////////////////// diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 8cee96e0b..631024133 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -15,7 +15,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ - scrypt.c scryptn.c sha256.c sha256t.c sha256q.c cuckoo.c \ + scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ argon2a.c blake2/blake2b.c ar2/argon2.c ar2/core.c ar2/encoding.c ar2/opt.c ar2/thread.c ar2/ar2-scrypt-jane.c \ diff --git a/stratum/config.sample/cuckoo.conf b/stratum/config.sample/cuckoo.conf deleted file mode 100644 index 705abb22b..000000000 --- a/stratum/config.sample/cuckoo.conf +++ /dev/null @@ -1,15 +0,0 @@ -[TCP] -server = yaamp.com -port = 8633 -password = tu8tu5 - -[SQL] -host = yaampdb -database = yaamp -username = root -password = patofpaq - -[STRATUM] -algo = cuckoo -difficulty = 0.25 -max_ttf = 4000000 diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 2c10eb407..fd67df8a5 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -211,7 +211,6 @@ YAAMP_ALGO g_algos[] = {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x - {"cuckoo", cuckoo_hash, 1, 0, 0}, {"sib", sib_hash, 1, 0, 0}, diff --git a/stratum/stratum.h b/stratum/stratum.h index f917aa655..bd579b04f 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -188,7 +188,6 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/keccak.h" #include "algos/sha256t.h" #include "algos/sha256q.h" -#include "algos/cuckoo.h" #include "algos/skunk.h" #include "algos/timetravel.h" #include "algos/bitcore.h" From 68176b2789a6bb13a1b7bba4baea16d0c8db3c3c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 12 Feb 2019 14:07:05 -0500 Subject: [PATCH 248/576] Update .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index ca18306c6..1e46f13e7 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,7 @@ web/assets/ .idea/* web/yaamp/.idea/ *.0 +web/keys.sample.php +web/yaamp/modules/site/coin_form.php +web/yaamp/modules/site/index.php +web/yaamp/modules/site/results/current_results.php From 8b8844b24ddc67b5e860e1987b39255f64087398 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 12 Feb 2019 17:23:50 -0500 Subject: [PATCH 249/576] Update client.cpp --- stratum/client.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stratum/client.cpp b/stratum/client.cpp index 3c2bd94ca..6b8c31ece 100644 --- a/stratum/client.cpp +++ b/stratum/client.cpp @@ -48,8 +48,11 @@ bool client_subscribe(YAAMP_CLIENT *client, json_value *json_params) if (json_params->u.array.values[0]->u.string.ptr) strncpy(client->version, json_params->u.array.values[0]->u.string.ptr, 1023); - if(strstr(client->version, "NiceHash") || strstr(client->version, "proxy") || strstr(client->version, "/3.")) - client->reconnectable = false; + if (strstr(client->version, "NiceHash")) + client->difficulty_actual = g_stratum_nicehash_difficulty; + + if(strstr(client->version, "proxy") || strstr(client->version, "/3.")) + client->reconnectable = false; if(strstr(client->version, "ccminer")) client->stats = true; if(strstr(client->version, "cpuminer-multi")) client->stats = true; From 4d0c755eafc0a9b2e24477945810920df99e59ec Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 12 Feb 2019 17:26:51 -0500 Subject: [PATCH 250/576] Update stratum.cpp --- stratum/stratum.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index fd67df8a5..045c0d6ca 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -30,6 +30,7 @@ char g_stratum_coin_exclude[256]; char g_stratum_algo[256]; double g_stratum_difficulty; +double g_stratum_nicehash_difficulty; double g_stratum_min_diff; double g_stratum_max_diff; @@ -281,6 +282,7 @@ int main(int argc, char **argv) strcpy(g_stratum_algo, iniparser_getstring(ini, "STRATUM:algo", NULL)); g_stratum_difficulty = iniparser_getdouble(ini, "STRATUM:difficulty", 16); + g_stratum_nicehash_difficulty = iniparser_getdouble(ini, "STRATUM:nicehash", 16); g_stratum_min_diff = iniparser_getdouble(ini, "STRATUM:diff_min", g_stratum_difficulty/2); g_stratum_max_diff = iniparser_getdouble(ini, "STRATUM:diff_max", g_stratum_difficulty*8192); From 7b41ab0db347bf7383d2f9ae99c5196b51569d80 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 12 Feb 2019 17:37:31 -0500 Subject: [PATCH 251/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index bd579b04f..4288eb62d 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -83,6 +83,7 @@ extern char g_stratum_algo[256]; extern double g_stratum_difficulty; extern double g_stratum_min_diff; extern double g_stratum_max_diff; +extern double g_stratum_nicehash_difficulty; extern int g_stratum_max_cons; extern int g_stratum_max_ttf; From 9b09daee13a3576a9fbbc0273ee1cd1ed588d982 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 12 Feb 2019 18:47:52 -0500 Subject: [PATCH 252/576] Update stratum.cpp --- stratum/stratum.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 045c0d6ca..6e6d5a9cd 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -31,6 +31,8 @@ char g_stratum_coin_exclude[256]; char g_stratum_algo[256]; double g_stratum_difficulty; double g_stratum_nicehash_difficulty; +double g_stratum_nicehash_min_diff; +double g_stratum_nicehash_max_diff; double g_stratum_min_diff; double g_stratum_max_diff; @@ -285,6 +287,8 @@ int main(int argc, char **argv) g_stratum_nicehash_difficulty = iniparser_getdouble(ini, "STRATUM:nicehash", 16); g_stratum_min_diff = iniparser_getdouble(ini, "STRATUM:diff_min", g_stratum_difficulty/2); g_stratum_max_diff = iniparser_getdouble(ini, "STRATUM:diff_max", g_stratum_difficulty*8192); + g_stratum_nicehash_min_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_min", g_stratum_nicehash_difficulty/2); + g_stratum_nicehash_max_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_max", g_stratum_nicehash_difficulty*8192); g_stratum_max_cons = iniparser_getint(ini, "STRATUM:max_cons", 5000); g_stratum_max_ttf = iniparser_getint(ini, "STRATUM:max_ttf", 0x70000000); From feae548de20d4525d59583fbe10fae5a2f066e94 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 12 Feb 2019 18:48:45 -0500 Subject: [PATCH 253/576] Update stratum.h --- stratum/stratum.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 4288eb62d..b5174c2ed 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -84,6 +84,8 @@ extern double g_stratum_difficulty; extern double g_stratum_min_diff; extern double g_stratum_max_diff; extern double g_stratum_nicehash_difficulty; +extern double g_stratum_nicehash_min_diff; +extern double g_stratum_nicehash_max_diff; extern int g_stratum_max_cons; extern int g_stratum_max_ttf; From c4dfb17294d50ff98ce5dee12b58f47318d200dc Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:02:23 -0500 Subject: [PATCH 254/576] Update x16rt.c --- stratum/algos/x16rt.c | 167 +++++++++++++++++++++--------------------- 1 file changed, 85 insertions(+), 82 deletions(-) diff --git a/stratum/algos/x16rt.c b/stratum/algos/x16rt.c index f9c048e78..5e63f605d 100644 --- a/stratum/algos/x16rt.c +++ b/stratum/algos/x16rt.c @@ -1,30 +1,26 @@ -/* x16rt implementation 2018 by ocminer */ - -#include "x16rt.h" +#include #include -#include #include -#include - -#include "sha3/sph_blake.h" -#include "sha3/sph_bmw.h" -#include "sha3/sph_groestl.h" -#include "sha3/sph_jh.h" -#include "sha3/sph_keccak.h" -#include "sha3/sph_skein.h" -#include "sha3/sph_luffa.h" -#include "sha3/sph_cubehash.h" -#include "sha3/sph_shavite.h" -#include "sha3/sph_simd.h" -#include "sha3/sph_echo.h" -#include "sha3/sph_hamsi.h" -#include "sha3/sph_fugue.h" -#include "sha3/sph_shabal.h" -#include "sha3/sph_whirlpool.h" -#include "sha3/sph_sha2.h" - -#define TIME_MASK 0xffffff80 +#include "sha256.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common.h" enum Algo { BLAKE = 0, @@ -46,17 +42,18 @@ enum Algo { HASH_FUNC_COUNT }; -static __thread uint32_t s_ntime = UINT32_MAX; -static __thread char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; +uint32_t s_ntime = UINT32_MAX; +#define TIME_MASK 0xffffff80 -static void getAlgoString(const uint8_t* timeHash, char *output) +static void getAlgoString(const uint32_t* timeHash, char *output) { char *sptr = output; uint8_t* data = (uint8_t*)timeHash; - for (int j = 0; j < HASH_FUNC_COUNT; j++) { - uint8_t b = (15 - j) >> 1; // 16 first ascii hex chars (lsb in uint256) + for (uint8_t j = 0; j < HASH_FUNC_COUNT; j++) { + uint8_t b = (15 - j) >> 1; // 16 ascii hex chars, reversed uint8_t algoDigit = (j & 1) ? data[b] & 0xF : data[b] >> 4; + if (algoDigit >= 10) sprintf(sptr, "%c", 'A' + (algoDigit - 10)); else @@ -66,16 +63,32 @@ static void getAlgoString(const uint8_t* timeHash, char *output) *sptr = '\0'; } -static void getTimeHash(const uint32_t timeStamp, void* timeHash) +static void doubleSha(unsigned char* input, unsigned char* output, uint32_t len) { - int32_t maskedTime = timeStamp & TIME_MASK; + unsigned char hash[32]; + + SHA256_CTX ctx_sha256; + SHA256_Init(&ctx_sha256); + SHA256_Update(&ctx_sha256, input, len); + SHA256_Final(input, &ctx_sha256); - sha256d((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); + SHA256_Init(&ctx_sha256); + SHA256_Update(&ctx_sha256, input, 32); + SHA256_Final(hash, &ctx_sha256); + + memcpy(output, hash, 32); +} + +static void getTimeHash(const uint32_t timeStamp, void* timeHash) +{ + int32_t maskedTime = timeStamp & TIME_MASK; + doubleSha((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); } void x16rt_hash(const char* input, char* output, uint32_t len) { - uint32_t hash[64/4]; + unsigned char hash[128]; + char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; sph_blake512_context ctx_blake; sph_bmw512_context ctx_bmw; @@ -83,35 +96,26 @@ void x16rt_hash(const char* input, char* output, uint32_t len) sph_skein512_context ctx_skein; sph_jh512_context ctx_jh; sph_keccak512_context ctx_keccak; - sph_luffa512_context ctx_luffa1; - sph_cubehash512_context ctx_cubehash1; - sph_shavite512_context ctx_shavite1; - sph_simd512_context ctx_simd1; - sph_echo512_context ctx_echo1; - sph_hamsi512_context ctx_hamsi1; - sph_fugue512_context ctx_fugue1; - sph_shabal512_context ctx_shabal1; - sph_whirlpool_context ctx_whirlpool1; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; sph_sha512_context ctx_sha512; void *in = (void*) input; int size = 80; -/* - if (s_ntime == UINT32_MAX) { - const uint8_t* in8 = (uint8_t*) input; - getAlgoString(&in8[4], hashOrder); - } -*/ - - uint32_t *in32 = (uint32_t*) input; - uint32_t ntime = in32[17]; -// uint32_t _ALIGN(64) timeHash[8]; - uint32_t timeHash[64/4]; + uint32_t *in32 = (uint32_t*) input; + uint32_t ntime = in32[17]; + uint32_t timeHash[8]; getTimeHash(ntime, &timeHash); getAlgoString(&timeHash[0], hashOrder); - for (int i = 0; i < 16; i++) { const char elem = hashOrder[i]; @@ -149,49 +153,49 @@ void x16rt_hash(const char* input, char* output, uint32_t len) sph_keccak512_close(&ctx_keccak, hash); break; case LUFFA: - sph_luffa512_init(&ctx_luffa1); - sph_luffa512(&ctx_luffa1, in, size); - sph_luffa512_close(&ctx_luffa1, hash); + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, in, size); + sph_luffa512_close(&ctx_luffa, hash); break; case CUBEHASH: - sph_cubehash512_init(&ctx_cubehash1); - sph_cubehash512(&ctx_cubehash1, in, size); - sph_cubehash512_close(&ctx_cubehash1, hash); + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, in, size); + sph_cubehash512_close(&ctx_cubehash, hash); break; case SHAVITE: - sph_shavite512_init(&ctx_shavite1); - sph_shavite512(&ctx_shavite1, in, size); - sph_shavite512_close(&ctx_shavite1, hash); + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, in, size); + sph_shavite512_close(&ctx_shavite, hash); break; case SIMD: - sph_simd512_init(&ctx_simd1); - sph_simd512(&ctx_simd1, in, size); - sph_simd512_close(&ctx_simd1, hash); + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, in, size); + sph_simd512_close(&ctx_simd, hash); break; case ECHO: - sph_echo512_init(&ctx_echo1); - sph_echo512(&ctx_echo1, in, size); - sph_echo512_close(&ctx_echo1, hash); + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, in, size); + sph_echo512_close(&ctx_echo, hash); break; case HAMSI: - sph_hamsi512_init(&ctx_hamsi1); - sph_hamsi512(&ctx_hamsi1, in, size); - sph_hamsi512_close(&ctx_hamsi1, hash); + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, in, size); + sph_hamsi512_close(&ctx_hamsi, hash); break; case FUGUE: - sph_fugue512_init(&ctx_fugue1); - sph_fugue512(&ctx_fugue1, in, size); - sph_fugue512_close(&ctx_fugue1, hash); + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, in, size); + sph_fugue512_close(&ctx_fugue, hash); break; case SHABAL: - sph_shabal512_init(&ctx_shabal1); - sph_shabal512(&ctx_shabal1, in, size); - sph_shabal512_close(&ctx_shabal1, hash); + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, in, size); + sph_shabal512_close(&ctx_shabal, hash); break; case WHIRLPOOL: - sph_whirlpool_init(&ctx_whirlpool1); - sph_whirlpool(&ctx_whirlpool1, in, size); - sph_whirlpool_close(&ctx_whirlpool1, hash); + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, in, size); + sph_whirlpool_close(&ctx_whirlpool, hash); break; case SHA512: sph_sha512_init(&ctx_sha512); @@ -204,4 +208,3 @@ void x16rt_hash(const char* input, char* output, uint32_t len) } memcpy(output, hash, 32); } - From 975158e74a79d99d461697f254736bbd072149cd Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:05:15 -0500 Subject: [PATCH 255/576] Update x16rt.c --- stratum/algos/x16rt.c | 76 +++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/stratum/algos/x16rt.c b/stratum/algos/x16rt.c index 5e63f605d..0c327fc72 100644 --- a/stratum/algos/x16rt.c +++ b/stratum/algos/x16rt.c @@ -22,6 +22,8 @@ #include "common.h" +#define TIME_MASK 0xffffff80 + enum Algo { BLAKE = 0, BMW, @@ -42,47 +44,65 @@ enum Algo { HASH_FUNC_COUNT }; -uint32_t s_ntime = UINT32_MAX; -#define TIME_MASK 0xffffff80 +static const char* algo_strings[] = { + "blake", + "bmw512", + "groestl", + "jh512", + "keccak", + "skein", + "luffa", + "cube", + "shavite", + "simd", + "echo", + "hamsi", + "fugue", + "shabal", + "whirlpool", + "sha512", + NULL +}; static void getAlgoString(const uint32_t* timeHash, char *output) { - char *sptr = output; - uint8_t* data = (uint8_t*)timeHash; - - for (uint8_t j = 0; j < HASH_FUNC_COUNT; j++) { - uint8_t b = (15 - j) >> 1; // 16 ascii hex chars, reversed - uint8_t algoDigit = (j & 1) ? data[b] & 0xF : data[b] >> 4; - - if (algoDigit >= 10) - sprintf(sptr, "%c", 'A' + (algoDigit - 10)); - else - sprintf(sptr, "%u", (uint32_t) algoDigit); - sptr++; - } - *sptr = '\0'; + char *sptr = output; + uint8_t* data = (uint8_t*)timeHash; + + for (uint8_t j = 0; j < HASH_FUNC_COUNT; j++) { + uint8_t b = (15 - j) >> 1; // 16 ascii hex chars, reversed + uint8_t algoDigit = (j & 1) ? data[b] & 0xF : data[b] >> 4; + + if (algoDigit >= 10) + sprintf(sptr, "%c", 'A' + (algoDigit - 10)); + else + sprintf(sptr, "%u", (uint32_t) algoDigit); + sptr++; + } + *sptr = '\0'; } -static void doubleSha(unsigned char* input, unsigned char* output, uint32_t len) +static void doubleSha(unsigned char* output, unsigned char* input, uint32_t len) { - unsigned char hash[32]; + unsigned char hash[32]; - SHA256_CTX ctx_sha256; - SHA256_Init(&ctx_sha256); - SHA256_Update(&ctx_sha256, input, len); - SHA256_Final(input, &ctx_sha256); + SHA256_CTX ctx_sha256; + SHA256_Init(&ctx_sha256); + SHA256_Update(&ctx_sha256, input, len); + SHA256_Final(input, &ctx_sha256); - SHA256_Init(&ctx_sha256); - SHA256_Update(&ctx_sha256, input, 32); - SHA256_Final(hash, &ctx_sha256); + SHA256_Init(&ctx_sha256); + SHA256_Update(&ctx_sha256, input, 32); + SHA256_Final(hash, &ctx_sha256); - memcpy(output, hash, 32); + memcpy(output, hash, 32); } static void getTimeHash(const uint32_t timeStamp, void* timeHash) { - int32_t maskedTime = timeStamp & TIME_MASK; - doubleSha((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); + int32_t maskedTime = timeStamp & TIME_MASK; + + doubleSha((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); } void x16rt_hash(const char* input, char* output, uint32_t len) From 3e46f2867799d42fe8263ad1b4b3a76b053fa315 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:12:20 -0500 Subject: [PATCH 256/576] Update client_submit.cpp --- stratum/client_submit.cpp | 61 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 055c349e7..25367dc91 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -31,6 +31,67 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); #endif + + // build veildatahash + if (!strcmp(g_stratum_algo, "x16rt")) + { + char merklerootbyteswap[128]; + memcpy(merklerootbyteswap,merkleroot.c_str(),64); + + char merklerootswap[128]; + memset(merklerootswap,0,128); + string_be(merklerootbyteswap,merklerootswap); + + sprintf(veildatahash, "%s%s%s%s%s%s%s%s%s%s%s%s",merklerootswap,merklerootswap,"04","0a00000000000000",templ->veil_accum10,"6400000000000000",templ->veil_accum100,"e803000000000000",templ->veil_accum1000,"1027000000000000",templ->veil_accum10000,templ->veil_pofn); + //printf("veildatahash: %s\n", veildatahash); + + char veildatahash_bin[258]; + memset(veildatahash_bin,0,258); + binlify((unsigned char*)veildatahash_bin, veildatahash); + + //for (int i=0; i < 257; i++) + // printf("%02hhx",veildatahash_bin[i]); + //printf("\n"); + + char veilshahash[65]; + memset(veilshahash,0,65); + YAAMP_HASH_FUNCTION veildata_hash = sha256_double_hash_hex; + veildata_hash((char *)veildatahash_bin,veilshahash,257); + + //printf("%s\n",veilshahash); + + char veilshahashswap[128]; + memset(veilshahashswap,0,128); + string_be(veilshahash,veilshahashswap); + + char veilsha_be[128]; + memset(veilsha_be,0,128); + ser_string_be(veilshahashswap,veilsha_be,8); + + printf("veilhash: %s\n",veilshahashswap); + + // build blockheader + sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, veilsha_be, ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); + } + + binlify(submitvalues->header_bin, submitvalues->header_be); + +// printf("%s\n", submitvalues->header_be); + int header_len = strlen(submitvalues->header)/2; + g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); + + hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); + string_be(submitvalues->hash_hex, submitvalues->hash_be); + + printf("blkhdr : %s\n", submitvalues->header_be); + printf("powhash : %s\n",submitvalues->hash_be); + printf("\n"); +} + +///////////////////////////////////////////////////////////////////////////////// + + if (!strcmp(g_stratum_algo, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); From 677cbe25c2866fa633414471e60757ed4136e031 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:16:15 -0500 Subject: [PATCH 257/576] Update client_submit.cpp --- stratum/client_submit.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 25367dc91..6d91ec9cc 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -359,6 +359,7 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL } else { + printf("block: %s\n", block_hex); debuglog("*** REJECTED :( %s block %d %d txs\n", coind->name, templ->height, templ->txcount); rejectlog("REJECTED %s block %d\n", coind->symbol, templ->height); if (g_debuglog_hash) { From 51986a18ccbc9ecb4f4fdddd19892c56ea71200e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:24:14 -0500 Subject: [PATCH 258/576] Update coind_template.cpp --- stratum/coind_template.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/stratum/coind_template.cpp b/stratum/coind_template.cpp index 33ecc6259..c21178c5f 100644 --- a/stratum/coind_template.cpp +++ b/stratum/coind_template.cpp @@ -230,6 +230,7 @@ static void decred_fix_template(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, j YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind) { + debuglog("stratum gbt refresh\n"); if(coind->usememorypool) return coind_create_template_memorypool(coind); @@ -307,6 +308,24 @@ YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind) strcpy(templ->prevhash_hex, prev ? prev : ""); const char *flags = json_get_string(json_coinbaseaux, "flags"); strcpy(templ->flags, flags ? flags : ""); + + ///////////////////////////////////////////////////////////////////////////veil//// + + strcpy(templ->veil_pofn,json_get_string(json_result, "proofoffullnodehash")); + if (templ->veil_pofn) + { + json_value *json_accumhashes = json_get_array(json_result, "accumulatorhashes"); + if(json_accumhashes) + { + strcpy(templ->veil_accum10,json_get_string(json_accumhashes,"10")); + strcpy(templ->veil_accum100,json_get_string(json_accumhashes,"100")); + strcpy(templ->veil_accum1000,json_get_string(json_accumhashes,"1000")); + strcpy(templ->veil_accum10000,json_get_string(json_accumhashes,"10000")); + } + + } + + ////veil////////////////////////////////////////////////////////////////////////// // LBC Claim Tree (with wallet gbt patch) const char *claim = json_get_string(json_result, "claimtrie"); @@ -513,6 +532,7 @@ bool coind_create_job(YAAMP_COIND *coind, bool force) CommonLock(&coind->mutex); YAAMP_JOB_TEMPLATE *templ; + templ = coind_create_template(coind); // DCR gbt block header is not compatible with getwork submit, so... From d249a4752c4e1cb27ce20a4032b484a288c33b65 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:24:53 -0500 Subject: [PATCH 259/576] Update job.h --- stratum/job.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stratum/job.h b/stratum/job.h index aef4bdbe1..71c369f75 100644 --- a/stratum/job.h +++ b/stratum/job.h @@ -59,6 +59,12 @@ struct YAAMP_JOB_TEMPLATE bool has_filtered_txs; int filtered_txs_fee; + char veil_accum10[128]; + char veil_accum100[128]; + char veil_accum1000[128]; + char veil_accum10000[128]; + char veil_pofn[128]; + int auxs_size; YAAMP_COIND_AUX *auxs[MAX_AUXS]; }; From c37eb77f8adbc6aa3ce2f51ba6be2d506196e947 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:25:34 -0500 Subject: [PATCH 260/576] Update job_send.cpp --- stratum/job_send.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stratum/job_send.cpp b/stratum/job_send.cpp index 5af3c7272..0c1ea5687 100644 --- a/stratum/job_send.cpp +++ b/stratum/job_send.cpp @@ -29,7 +29,14 @@ static void job_mining_notify_buffer(YAAMP_JOB *job, char *buffer) job->id, templ->prevhash_be, templ->extradata_be, templ->coinb1, templ->coinb2, templ->txmerkles, templ->version, templ->nbits, templ->ntime); return; - } + }else if (!strcmp(g_stratum_algo, "x16rt")) { + sprintf(buffer, "{\"id\":null,\"method\":\"mining.notify\",\"params\":[" + "\"%x\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",[%s],\"%s\",\"%s\",\"%s\",true]}\n", + job->id, templ->prevhash_be, templ->veil_accum10, templ->veil_accum100, templ->veil_accum1000, templ->veil_accum10000, templ->veil_pofn, + templ->coinb1, templ->coinb2, templ->txmerkles, templ->version, templ->nbits, templ->ntime); + printf("%s\n",buffer); + return; + } // standard stratum sprintf(buffer, "{\"id\":null,\"method\":\"mining.notify\",\"params\":[\"%x\",\"%s\",\"%s\",\"%s\",[%s],\"%s\",\"%s\",\"%s\",true]}\n", From 3b64cdf860426be409966e07de3046570efaa180 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:30:57 -0500 Subject: [PATCH 261/576] Update client_submit.cpp --- stratum/client_submit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 6d91ec9cc..0e5120ec9 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -92,7 +92,7 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem ///////////////////////////////////////////////////////////////////////////////// - if (!strcmp(g_stratum_algo, "lbry")) { + elseif (!strcmp(g_stratum_algo, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); From 611569afd46f9b9d4b14aa8338c027d92c7f561c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:33:13 -0500 Subject: [PATCH 262/576] Update client_submit.cpp --- stratum/client_submit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 0e5120ec9..82e8095e7 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -92,7 +92,7 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem ///////////////////////////////////////////////////////////////////////////////// - elseif (!strcmp(g_stratum_algo, "lbry")) { + else if (!strcmp(g_stratum_algo, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); From a3f8c509eb017cdc981efa49ffe0a7498fa9a64b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:38:19 -0500 Subject: [PATCH 263/576] Update client_submit.cpp --- stratum/client_submit.cpp | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 82e8095e7..ba9bc1bf5 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -74,25 +74,8 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, veilsha_be, ntime, templ->nbits, nonce); ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); } - - binlify(submitvalues->header_bin, submitvalues->header_be); - -// printf("%s\n", submitvalues->header_be); - int header_len = strlen(submitvalues->header)/2; - g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); - - hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); - string_be(submitvalues->hash_hex, submitvalues->hash_be); - - printf("blkhdr : %s\n", submitvalues->header_be); - printf("powhash : %s\n",submitvalues->hash_be); - printf("\n"); -} - -///////////////////////////////////////////////////////////////////////////////// - - else if (!strcmp(g_stratum_algo, "lbry")) { + else if (!strcmp(g_stratum_algo, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); @@ -114,9 +97,14 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); string_be(submitvalues->hash_hex, submitvalues->hash_be); + + printf("blkhdr : %s\n", submitvalues->header_be); + printf("powhash : %s\n",submitvalues->hash_be); + printf("\n"); } -///////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// + static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *out, const char *ntime, const char *nonce, const char *nonce2, const char *vote, bool usegetwork) From a50a928af0100183a2ab8559293d9702918b9bbe Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Feb 2019 22:45:32 -0500 Subject: [PATCH 264/576] Update client_submit.cpp --- stratum/client_submit.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index ba9bc1bf5..9623583b6 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -18,6 +18,9 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem char doublehash[128]; memset(doublehash, 0, 128); + + char veildatahash[1024]; + memset(veildatahash, 0, 1024); // some (old) wallet/algos need a simple SHA256 (blakecoin, whirlcoin, groestlcoin...) YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; From 836736b8eeb90adf02848eff47c4e0479fe5b67f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 01:44:20 -0500 Subject: [PATCH 265/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 9966e887d..1e1c1d313 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -479,7 +479,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "FOX") == 0)|| (strcmp(coind->symbol, "GTM") == 0)|| (strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From c8c729e10f16d7f06ad6c90dba1fe5577d8e1daa Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 01:48:47 -0500 Subject: [PATCH 266/576] Update client_submit.cpp --- stratum/client_submit.cpp | 57 ++------------------------------------- 1 file changed, 2 insertions(+), 55 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 9623583b6..055c349e7 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -18,9 +18,6 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem char doublehash[128]; memset(doublehash, 0, 128); - - char veildatahash[1024]; - memset(veildatahash, 0, 1024); // some (old) wallet/algos need a simple SHA256 (blakecoin, whirlcoin, groestlcoin...) YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; @@ -34,51 +31,7 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); #endif - - // build veildatahash - if (!strcmp(g_stratum_algo, "x16rt")) - { - char merklerootbyteswap[128]; - memcpy(merklerootbyteswap,merkleroot.c_str(),64); - - char merklerootswap[128]; - memset(merklerootswap,0,128); - string_be(merklerootbyteswap,merklerootswap); - - sprintf(veildatahash, "%s%s%s%s%s%s%s%s%s%s%s%s",merklerootswap,merklerootswap,"04","0a00000000000000",templ->veil_accum10,"6400000000000000",templ->veil_accum100,"e803000000000000",templ->veil_accum1000,"1027000000000000",templ->veil_accum10000,templ->veil_pofn); - //printf("veildatahash: %s\n", veildatahash); - - char veildatahash_bin[258]; - memset(veildatahash_bin,0,258); - binlify((unsigned char*)veildatahash_bin, veildatahash); - - //for (int i=0; i < 257; i++) - // printf("%02hhx",veildatahash_bin[i]); - //printf("\n"); - - char veilshahash[65]; - memset(veilshahash,0,65); - YAAMP_HASH_FUNCTION veildata_hash = sha256_double_hash_hex; - veildata_hash((char *)veildatahash_bin,veilshahash,257); - - //printf("%s\n",veilshahash); - - char veilshahashswap[128]; - memset(veilshahashswap,0,128); - string_be(veilshahash,veilshahashswap); - - char veilsha_be[128]; - memset(veilsha_be,0,128); - ser_string_be(veilshahashswap,veilsha_be,8); - - printf("veilhash: %s\n",veilshahashswap); - - // build blockheader - sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, veilsha_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); - } - - else if (!strcmp(g_stratum_algo, "lbry")) { + if (!strcmp(g_stratum_algo, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); @@ -100,14 +53,9 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); string_be(submitvalues->hash_hex, submitvalues->hash_be); - - printf("blkhdr : %s\n", submitvalues->header_be); - printf("powhash : %s\n",submitvalues->hash_be); - printf("\n"); } -///////////////////////////////////////////////////////////////////////////////// - +///////////////////////////////////////////// static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *out, const char *ntime, const char *nonce, const char *nonce2, const char *vote, bool usegetwork) @@ -350,7 +298,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL } else { - printf("block: %s\n", block_hex); debuglog("*** REJECTED :( %s block %d %d txs\n", coind->name, templ->height, templ->txcount); rejectlog("REJECTED %s block %d\n", coind->symbol, templ->height); if (g_debuglog_hash) { From 39b02a4a4743553cb37a729fb794a8bce36c4f9f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 01:49:18 -0500 Subject: [PATCH 267/576] Update coinbase.cpp --- stratum/coinbase.cpp | 451 +++---------------------------------------- 1 file changed, 32 insertions(+), 419 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 1e1c1d313..c6f734ad1 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -226,186 +226,34 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); } - - else if(strcmp(coind->symbol, "BZX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "bznode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "04"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "03"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); - job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); - - base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); - job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); - - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "TUX") == 0) { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "donation_payee"); - if(payee != NULL){ - sprintf(coind->charity_address, "%s", payee); - } else { - sprintf(coind->charity_address, "%s", ""); - } - - if(strlen(coind->charity_address) > 0){ - char script_payee[1024]; - char charity_payee[256] = { 0 }; - sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "donation_amount"); - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - debuglog("pack tx %s\n", coinb2_part); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - } - - // 2 txs are required on these coins, one for foundation (dev fees) - if(coind->charity_percent && !coind->hasmasternodes) - { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - if (charity_amount <= 0) - charity_amount = (available * coind->charity_percent) / 100; - - available -= charity_amount; - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - - else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char script_treasury[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - json_value* masternode = json_get_object(json_result, "masternode"); - json_value* treasury = json_get_object(json_result, "treasury"); - bool treasury_enabled = true; - if(treasury_enabled && treasury) { - const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); - memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); - json_int_t amount = json_get_int(treasury, "amount"); - if (scriptPubKey && amount) { - npayees++; - available -= amount; - job_pack_tx(coind, script_dests, amount, script_treasury); - //debuglog("%s treasury %u\n", coind->symbol, amount); - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "SECI") == 0) { + else if(strcmp(coind->symbol, "STAK") == 0) { char script_payee[512] = { 0 }; - char payees[1]; + char payees[4]; int npayees = (templ->has_segwit_txs) ? 2 : 1; bool masternode_payments = json_get_bool(json_result, "masternode_payments"); bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { + + if (masternodes_enabled && masternode_payments) { const char *payee = json_get_string(json_result, "payee"); json_int_t amount = json_get_int(json_result, "payee_amount"); if (payee && amount) ++npayees; } - //mainnet - json_int_t charity_amount = 50000000; - sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + + //treasury 5% @ 10 STAK per block + json_int_t charity_amount = 50000000; + //testnet + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + switch (templ->height % 4) { + case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); + break; + case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); + break; + case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); + break; + case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); + break; + } ++npayees; available -= charity_amount; base58_decode(coind->charity_address, script_payee); @@ -433,161 +281,29 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - else if (strcmp(coind->symbol,"XZX") == 0) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - json_value* subsidyreward = json_get_array(json_result, "subsidy"); - if (subsidyreward) - { - const char *payee = json_get_string(subsidyreward, "address"); - json_int_t amount = json_get_int(subsidyreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available / 100000000 * coind->reward_mul; return; - } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "FOX") == 0)|| (strcmp(coind->symbol, "GTM") == 0)|| (strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - else if(strcmp(coind->symbol, "HXX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "xnode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "05"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - - base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); - job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "STAK") == 0) { + else if(strcmp(coind->symbol, "SECI") == 0) { char script_payee[512] = { 0 }; - char payees[4]; + char payees[1]; int npayees = (templ->has_segwit_txs) ? 2 : 1; bool masternode_payments = json_get_bool(json_result, "masternode_payments"); bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - - if (masternodes_enabled && masternode_payments) { + if (masternodes_enabled && masternode_payments) { const char *payee = json_get_string(json_result, "payee"); json_int_t amount = json_get_int(json_result, "payee_amount"); if (payee && amount) ++npayees; } - - //treasury 5% @ 10 STAK per block - json_int_t charity_amount = 50000000; - //testnet - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - switch (templ->height % 4) { - case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); - break; - case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); - break; - case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); - break; - case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); - break; - } + //mainnet + json_int_t charity_amount = 50000000; + sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); + //testnet + //json_int_t charity_amount = 50000000; + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); ++npayees; available -= charity_amount; base58_decode(coind->charity_address, script_payee); @@ -615,72 +331,9 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available / 100000000 * coind->reward_mul; + coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. - else if (strcmp(coind->symbol, "SMART") == 0) { - char script_payee[512] = { 0 }; - char payees[5]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //treasury 5000 * (143500/Blockheight) per block - int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); - json_int_t charity_amount = coinvalue * 0.95; - int blockRotation = templ->height - 95 * (templ->height/95); - if (blockRotation >= 0 && blockRotation <= 7) { - sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); - } - if (blockRotation >= 8 && blockRotation <= 15) { - sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); - } - if (blockRotation >= 16 && blockRotation <= 23) { - sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); - } - if (blockRotation >= 24 && blockRotation <= 38) { - sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); - } - if (blockRotation >= 39 && blockRotation <= 94) { - sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) @@ -920,49 +573,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if(strcmp(coind->symbol, "ARC") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "goldminenode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ { @@ -1056,3 +666,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } + + + From 6beec5050996770fde7c4a40b26de699c72a2eab Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 01:49:42 -0500 Subject: [PATCH 268/576] Update coind_template.cpp --- stratum/coind_template.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/stratum/coind_template.cpp b/stratum/coind_template.cpp index c21178c5f..33ecc6259 100644 --- a/stratum/coind_template.cpp +++ b/stratum/coind_template.cpp @@ -230,7 +230,6 @@ static void decred_fix_template(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, j YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind) { - debuglog("stratum gbt refresh\n"); if(coind->usememorypool) return coind_create_template_memorypool(coind); @@ -308,24 +307,6 @@ YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind) strcpy(templ->prevhash_hex, prev ? prev : ""); const char *flags = json_get_string(json_coinbaseaux, "flags"); strcpy(templ->flags, flags ? flags : ""); - - ///////////////////////////////////////////////////////////////////////////veil//// - - strcpy(templ->veil_pofn,json_get_string(json_result, "proofoffullnodehash")); - if (templ->veil_pofn) - { - json_value *json_accumhashes = json_get_array(json_result, "accumulatorhashes"); - if(json_accumhashes) - { - strcpy(templ->veil_accum10,json_get_string(json_accumhashes,"10")); - strcpy(templ->veil_accum100,json_get_string(json_accumhashes,"100")); - strcpy(templ->veil_accum1000,json_get_string(json_accumhashes,"1000")); - strcpy(templ->veil_accum10000,json_get_string(json_accumhashes,"10000")); - } - - } - - ////veil////////////////////////////////////////////////////////////////////////// // LBC Claim Tree (with wallet gbt patch) const char *claim = json_get_string(json_result, "claimtrie"); @@ -532,7 +513,6 @@ bool coind_create_job(YAAMP_COIND *coind, bool force) CommonLock(&coind->mutex); YAAMP_JOB_TEMPLATE *templ; - templ = coind_create_template(coind); // DCR gbt block header is not compatible with getwork submit, so... From a9a2b6c7b2c3ae68beee91c4606303cd814708ff Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 01:50:07 -0500 Subject: [PATCH 269/576] Update job.h --- stratum/job.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/stratum/job.h b/stratum/job.h index 71c369f75..aef4bdbe1 100644 --- a/stratum/job.h +++ b/stratum/job.h @@ -59,12 +59,6 @@ struct YAAMP_JOB_TEMPLATE bool has_filtered_txs; int filtered_txs_fee; - char veil_accum10[128]; - char veil_accum100[128]; - char veil_accum1000[128]; - char veil_accum10000[128]; - char veil_pofn[128]; - int auxs_size; YAAMP_COIND_AUX *auxs[MAX_AUXS]; }; From 55c46f30749cdf1ae264ab9943a36f22a3051d1f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 01:50:31 -0500 Subject: [PATCH 270/576] Update job_send.cpp --- stratum/job_send.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/stratum/job_send.cpp b/stratum/job_send.cpp index 0c1ea5687..5af3c7272 100644 --- a/stratum/job_send.cpp +++ b/stratum/job_send.cpp @@ -29,14 +29,7 @@ static void job_mining_notify_buffer(YAAMP_JOB *job, char *buffer) job->id, templ->prevhash_be, templ->extradata_be, templ->coinb1, templ->coinb2, templ->txmerkles, templ->version, templ->nbits, templ->ntime); return; - }else if (!strcmp(g_stratum_algo, "x16rt")) { - sprintf(buffer, "{\"id\":null,\"method\":\"mining.notify\",\"params\":[" - "\"%x\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",[%s],\"%s\",\"%s\",\"%s\",true]}\n", - job->id, templ->prevhash_be, templ->veil_accum10, templ->veil_accum100, templ->veil_accum1000, templ->veil_accum10000, templ->veil_pofn, - templ->coinb1, templ->coinb2, templ->txmerkles, templ->version, templ->nbits, templ->ntime); - printf("%s\n",buffer); - return; - } + } // standard stratum sprintf(buffer, "{\"id\":null,\"method\":\"mining.notify\",\"params\":[\"%x\",\"%s\",\"%s\",\"%s\",[%s],\"%s\",\"%s\",\"%s\",true]}\n", From 447d52c15aa3d81e01cfed8d3b7581b43ccf852f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 01:54:55 -0500 Subject: [PATCH 271/576] Update coinbase.cpp --- stratum/coinbase.cpp | 451 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 419 insertions(+), 32 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index c6f734ad1..28643d5dc 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -226,34 +226,186 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); } - else if(strcmp(coind->symbol, "STAK") == 0) { - char script_payee[512] = { 0 }; + + else if(strcmp(coind->symbol, "BZX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "bznode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "04"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "03"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); + job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); + + base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); + job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); + + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "TUX") == 0) { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "donation_payee"); + if(payee != NULL){ + sprintf(coind->charity_address, "%s", payee); + } else { + sprintf(coind->charity_address, "%s", ""); + } + + if(strlen(coind->charity_address) > 0){ + char script_payee[1024]; + char charity_payee[256] = { 0 }; + sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "donation_amount"); + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + debuglog("pack tx %s\n", coinb2_part); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + } + + // 2 txs are required on these coins, one for foundation (dev fees) + if(coind->charity_percent && !coind->hasmasternodes) + { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + if (charity_amount <= 0) + charity_amount = (available * coind->charity_percent) / 100; + + available -= charity_amount; + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + + else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char script_treasury[128] = { 0 }; char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + json_value* masternode = json_get_object(json_result, "masternode"); + json_value* treasury = json_get_object(json_result, "treasury"); + bool treasury_enabled = true; + if(treasury_enabled && treasury) { + const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); + memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); + json_int_t amount = json_get_int(treasury, "amount"); + if (scriptPubKey && amount) { + npayees++; + available -= amount; + job_pack_tx(coind, script_dests, amount, script_treasury); + //debuglog("%s treasury %u\n", coind->symbol, amount); + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "SECI") == 0) { + char script_payee[512] = { 0 }; + char payees[1]; int npayees = (templ->has_segwit_txs) ? 2 : 1; bool masternode_payments = json_get_bool(json_result, "masternode_payments"); bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - - if (masternodes_enabled && masternode_payments) { + if (masternodes_enabled && masternode_payments) { const char *payee = json_get_string(json_result, "payee"); json_int_t amount = json_get_int(json_result, "payee_amount"); if (payee && amount) ++npayees; } - - //treasury 5% @ 10 STAK per block - json_int_t charity_amount = 50000000; - //testnet - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - switch (templ->height % 4) { - case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); - break; - case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); - break; - case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); - break; - case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); - break; - } + //mainnet + json_int_t charity_amount = 50000000; + sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); + //testnet + //json_int_t charity_amount = 50000000; + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); ++npayees; available -= charity_amount; base58_decode(coind->charity_address, script_payee); @@ -281,29 +433,161 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + else if (strcmp(coind->symbol,"XZX") == 0) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + json_value* subsidyreward = json_get_array(json_result, "subsidy"); + if (subsidyreward) + { + const char *payee = json_get_string(subsidyreward, "address"); + json_int_t amount = json_get_int(subsidyreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available / 100000000 * coind->reward_mul; return; + } - else if(strcmp(coind->symbol, "SECI") == 0) { + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "FOX") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + else if(strcmp(coind->symbol, "HXX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "xnode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "05"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + + base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); + job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "STAK") == 0) { char script_payee[512] = { 0 }; - char payees[1]; + char payees[4]; int npayees = (templ->has_segwit_txs) ? 2 : 1; bool masternode_payments = json_get_bool(json_result, "masternode_payments"); bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { + + if (masternodes_enabled && masternode_payments) { const char *payee = json_get_string(json_result, "payee"); json_int_t amount = json_get_int(json_result, "payee_amount"); if (payee && amount) ++npayees; } - //mainnet - json_int_t charity_amount = 50000000; - sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + + //treasury 5% @ 10 STAK per block + json_int_t charity_amount = 50000000; + //testnet + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + switch (templ->height % 4) { + case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); + break; + case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); + break; + case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); + break; + case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); + break; + } ++npayees; available -= charity_amount; base58_decode(coind->charity_address, script_payee); @@ -331,9 +615,72 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; + + coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. + else if (strcmp(coind->symbol, "SMART") == 0) { + char script_payee[512] = { 0 }; + char payees[5]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //treasury 5000 * (143500/Blockheight) per block + int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); + json_int_t charity_amount = coinvalue * 0.95; + int blockRotation = templ->height - 95 * (templ->height/95); + if (blockRotation >= 0 && blockRotation <= 7) { + sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); + } + if (blockRotation >= 8 && blockRotation <= 15) { + sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); + } + if (blockRotation >= 16 && blockRotation <= 23) { + sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); + } + if (blockRotation >= 24 && blockRotation <= 38) { + sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); + } + if (blockRotation >= 39 && blockRotation <= 94) { + sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) @@ -573,6 +920,49 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } + else if(strcmp(coind->symbol, "ARC") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "goldminenode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ { @@ -666,6 +1056,3 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } - - - From b75399872ed0d475a8ee960ff5a001062e3e40f5 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 02:00:08 -0500 Subject: [PATCH 272/576] Update coinbase.cpp --- stratum/coinbase.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 28643d5dc..253b76edb 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -477,9 +477,52 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; + } + + else if (strcmp(coind->symbol,"FOX") == 0) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + + json_value* subsidyreward = json_get_array(json_result, "subsidy"); + if (subsidyreward) + { + const char *payee = json_get_string(subsidyreward, "address"); + json_int_t amount = json_get_int(subsidyreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "FOX") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From b5838f0a2575ab77891b44226fc6596eeeada700 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 02:24:37 -0500 Subject: [PATCH 273/576] Update client_submit.cpp --- stratum/client_submit.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 055c349e7..61e840999 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -249,6 +249,16 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL else snprintf(block_hex, block_size, "%s", hex); } + + if(g_current_algo->name && !strcmp("FOX", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } bool b = coind_submit(coind, block_hex); if(b) From 58f3a23e43a953c307616a93764ef61f74e2a668 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 16 Feb 2019 02:25:42 -0500 Subject: [PATCH 274/576] Update coinbase.cpp --- stratum/coinbase.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 253b76edb..9966e887d 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -477,49 +477,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; - } - - else if (strcmp(coind->symbol,"FOX") == 0) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - - json_value* subsidyreward = json_get_array(json_result, "subsidy"); - if (subsidyreward) - { - const char *payee = json_get_string(subsidyreward, "address"); - json_int_t amount = json_get_int(subsidyreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) From 6e300783fc8f8cb180099c9dc8ff5faea9b78fb7 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sun, 17 Feb 2019 21:07:27 -0500 Subject: [PATCH 275/576] update update --- stratum/algos/blake2/blake2-impl.h | 33 -- stratum/algos/blake2/blake2-impl.h.bak | 189 ++++++++ stratum/algos/blake2/blake2.h | 243 +++------- stratum/algos/blake2/blake2.h.bak | 192 ++++++++ stratum/algos/blake2/blake2b.c | 368 ++++++-------- stratum/algos/blake2/blake2b.c.bak | 390 +++++++++++++++ stratum/algos/blake2/blamka-round-opt.h | 9 +- stratum/algos/blake2/blamka-round-opt.h.bak | 476 +++++++++++++++++++ stratum/algos/blake2/blamka-round-ref.h | 6 +- stratum/algos/blake2/blamka-round-ref.h.bak | 56 +++ stratum/algos/makefile | 5 +- stratum/algos/makefile.bak | 47 ++ stratum/stratum.cpp | 3 +- stratum/stratum.cpp.bak | 500 ++++++++++++++++++++ stratum/stratum.h | 3 +- stratum/stratum.h.bak | 230 +++++++++ 16 files changed, 2303 insertions(+), 447 deletions(-) create mode 100644 stratum/algos/blake2/blake2-impl.h.bak create mode 100644 stratum/algos/blake2/blake2.h.bak create mode 100644 stratum/algos/blake2/blake2b.c.bak create mode 100644 stratum/algos/blake2/blamka-round-opt.h.bak create mode 100644 stratum/algos/blake2/blamka-round-ref.h.bak create mode 100644 stratum/algos/makefile.bak create mode 100644 stratum/stratum.cpp.bak create mode 100644 stratum/stratum.h.bak diff --git a/stratum/algos/blake2/blake2-impl.h b/stratum/algos/blake2/blake2-impl.h index a43380b1f..241f0beb3 100644 --- a/stratum/algos/blake2/blake2-impl.h +++ b/stratum/algos/blake2/blake2-impl.h @@ -45,32 +45,6 @@ #endif /* Argon2 Team - End Code */ - - -static BLAKE2_INLINE uint16_t load16( const void *src ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - uint16_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = ( const uint8_t * )src; - return (( uint16_t )( p[0] ) << 0) | - (( uint16_t )( p[1] ) << 8) ; -#endif -} - -static BLAKE2_INLINE void store16( void *dst, uint16_t w ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = ( uint8_t * )dst; - *p++ = ( uint8_t )w; w >>= 8; - *p++ = ( uint8_t )w; -#endif -} - static BLAKE2_INLINE uint32_t load32(const void *src) { #if defined(NATIVE_LITTLE_ENDIAN) uint32_t w; @@ -177,13 +151,6 @@ static BLAKE2_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) { return (w >> c) | (w << (64 - c)); } -/* prevents compiler optimizing out memset() */ -static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) -{ - static void *(*const volatile memset_v)(void *, int, size_t) = &memset; - memset_v(v, 0, n); -} - void clear_internal_memory(void *v, size_t n); #endif diff --git a/stratum/algos/blake2/blake2-impl.h.bak b/stratum/algos/blake2/blake2-impl.h.bak new file mode 100644 index 000000000..a43380b1f --- /dev/null +++ b/stratum/algos/blake2/blake2-impl.h.bak @@ -0,0 +1,189 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef PORTABLE_BLAKE2_IMPL_H +#define PORTABLE_BLAKE2_IMPL_H + +#include +#include + +#if defined(_MSC_VER) +#define BLAKE2_INLINE __inline +#elif defined(__GNUC__) || defined(__clang__) +#define BLAKE2_INLINE __inline__ +#else +#define BLAKE2_INLINE +#endif + +/* Argon2 Team - Begin Code */ +/* + Not an exhaustive list, but should cover the majority of modern platforms + Additionally, the code will always be correct---this is only a performance + tweak. +*/ +#if (defined(__BYTE_ORDER__) && \ + (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) || \ + defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \ + defined(__AARCH64EL__) || defined(__amd64__) || defined(__i386__) || \ + defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ + defined(_M_ARM) +#define NATIVE_LITTLE_ENDIAN +#endif +/* Argon2 Team - End Code */ + + + +static BLAKE2_INLINE uint16_t load16( const void *src ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + uint16_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = ( const uint8_t * )src; + return (( uint16_t )( p[0] ) << 0) | + (( uint16_t )( p[1] ) << 8) ; +#endif +} + +static BLAKE2_INLINE void store16( void *dst, uint16_t w ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = ( uint8_t * )dst; + *p++ = ( uint8_t )w; w >>= 8; + *p++ = ( uint8_t )w; +#endif +} + +static BLAKE2_INLINE uint32_t load32(const void *src) { +#if defined(NATIVE_LITTLE_ENDIAN) + uint32_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = (const uint8_t *)src; + uint32_t w = *p++; + w |= (uint32_t)(*p++) << 8; + w |= (uint32_t)(*p++) << 16; + w |= (uint32_t)(*p++) << 24; + return w; +#endif +} + +static BLAKE2_INLINE uint64_t load64(const void *src) { +#if defined(NATIVE_LITTLE_ENDIAN) + uint64_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = (const uint8_t *)src; + uint64_t w = *p++; + w |= (uint64_t)(*p++) << 8; + w |= (uint64_t)(*p++) << 16; + w |= (uint64_t)(*p++) << 24; + w |= (uint64_t)(*p++) << 32; + w |= (uint64_t)(*p++) << 40; + w |= (uint64_t)(*p++) << 48; + w |= (uint64_t)(*p++) << 56; + return w; +#endif +} + +static BLAKE2_INLINE void store32(void *dst, uint32_t w) { +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +#endif +} + +static BLAKE2_INLINE void store64(void *dst, uint64_t w) { +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +#endif +} + +static BLAKE2_INLINE uint64_t load48(const void *src) { + const uint8_t *p = (const uint8_t *)src; + uint64_t w = *p++; + w |= (uint64_t)(*p++) << 8; + w |= (uint64_t)(*p++) << 16; + w |= (uint64_t)(*p++) << 24; + w |= (uint64_t)(*p++) << 32; + w |= (uint64_t)(*p++) << 40; + return w; +} + +static BLAKE2_INLINE void store48(void *dst, uint64_t w) { + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +} + +static BLAKE2_INLINE uint32_t rotr32(const uint32_t w, const unsigned c) { + return (w >> c) | (w << (32 - c)); +} + +static BLAKE2_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) { + return (w >> c) | (w << (64 - c)); +} + +/* prevents compiler optimizing out memset() */ +static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) +{ + static void *(*const volatile memset_v)(void *, int, size_t) = &memset; + memset_v(v, 0, n); +} + +void clear_internal_memory(void *v, size_t n); + +#endif diff --git a/stratum/algos/blake2/blake2.h b/stratum/algos/blake2/blake2.h index 6a26f5f25..a452f33ee 100644 --- a/stratum/algos/blake2/blake2.h +++ b/stratum/algos/blake2/blake2.h @@ -1,189 +1,88 @@ /* - BLAKE2 reference source code package - reference C implementations - Copyright 2012, Samuel Neves . You may use this under the - terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at - your option. The terms of these licenses can be found at: - - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - - OpenSSL license : https://www.openssl.org/source/license.html - - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - More information about the BLAKE2 hash function can be found at - https://blake2.net. -*/ -#ifndef BLAKE2_H -#define BLAKE2_H + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef PORTABLE_BLAKE2_H +#define PORTABLE_BLAKE2_H #include #include - -#if defined(_MSC_VER) -#define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop)) -#else -#define BLAKE2_PACKED(x) x __attribute__((packed)) -#endif +#include #if defined(__cplusplus) extern "C" { #endif - enum blake2s_constant - { - BLAKE2S_BLOCKBYTES = 64, - BLAKE2S_OUTBYTES = 32, - BLAKE2S_KEYBYTES = 32, - BLAKE2S_SALTBYTES = 8, - BLAKE2S_PERSONALBYTES = 8 - }; - - enum blake2b_constant - { +enum blake2b_constant { BLAKE2B_BLOCKBYTES = 128, - BLAKE2B_OUTBYTES = 64, - BLAKE2B_KEYBYTES = 64, - BLAKE2B_SALTBYTES = 16, + BLAKE2B_OUTBYTES = 64, + BLAKE2B_KEYBYTES = 64, + BLAKE2B_SALTBYTES = 16, BLAKE2B_PERSONALBYTES = 16 - }; - - typedef struct blake2s_state__ - { - uint32_t h[8]; - uint32_t t[2]; - uint32_t f[2]; - uint8_t buf[BLAKE2S_BLOCKBYTES]; - size_t buflen; - size_t outlen; - uint8_t last_node; - } blake2s_state; - - typedef struct blake2b_state__ - { +}; + +#pragma pack(push, 1) +typedef struct __blake2b_param { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint64_t node_offset; /* 16 */ + uint8_t node_depth; /* 17 */ + uint8_t inner_length; /* 18 */ + uint8_t reserved[14]; /* 32 */ + uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ + uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ +} blake2b_param; +#pragma pack(pop) + +typedef struct __blake2b_state { uint64_t h[8]; uint64_t t[2]; uint64_t f[2]; - uint8_t buf[BLAKE2B_BLOCKBYTES]; - size_t buflen; - size_t outlen; - uint8_t last_node; - } blake2b_state; - - typedef struct blake2sp_state__ - { - blake2s_state S[8][1]; - blake2s_state R[1]; - uint8_t buf[8 * BLAKE2S_BLOCKBYTES]; - size_t buflen; - size_t outlen; - } blake2sp_state; - - typedef struct blake2bp_state__ - { - blake2b_state S[4][1]; - blake2b_state R[1]; - uint8_t buf[4 * BLAKE2B_BLOCKBYTES]; - size_t buflen; - size_t outlen; - } blake2bp_state; - - - BLAKE2_PACKED(struct blake2s_param__ - { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint32_t node_offset; /* 12 */ - uint16_t xof_length; /* 14 */ - uint8_t node_depth; /* 15 */ - uint8_t inner_length; /* 16 */ - /* uint8_t reserved[0]; */ - uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ - uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ - }); - - typedef struct blake2s_param__ blake2s_param; - - BLAKE2_PACKED(struct blake2b_param__ - { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint32_t node_offset; /* 12 */ - uint32_t xof_length; /* 16 */ - uint8_t node_depth; /* 17 */ - uint8_t inner_length; /* 18 */ - uint8_t reserved[14]; /* 32 */ - uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ - uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ - }); - - typedef struct blake2b_param__ blake2b_param; - - typedef struct blake2xs_state__ - { - blake2s_state S[1]; - blake2s_param P[1]; - } blake2xs_state; - - typedef struct blake2xb_state__ - { - blake2b_state S[1]; - blake2b_param P[1]; - } blake2xb_state; - - /* Padded structs result in a compile-time error */ - enum { - BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES), - BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) - }; - - /* Streaming API */ - int blake2s_init( blake2s_state *S, size_t outlen ); - int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); - int blake2s_update( blake2s_state *S, const void *in, size_t inlen ); - int blake2s_final( blake2s_state *S, void *out, size_t outlen ); - - int blake2b_init( blake2b_state *S, size_t outlen ); - int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); - int blake2b_update( blake2b_state *S, const void *in, size_t inlen ); - int blake2b_final( blake2b_state *S, void *out, size_t outlen ); - - int blake2sp_init( blake2sp_state *S, size_t outlen ); - int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2sp_update( blake2sp_state *S, const void *in, size_t inlen ); - int blake2sp_final( blake2sp_state *S, void *out, size_t outlen ); - - int blake2bp_init( blake2bp_state *S, size_t outlen ); - int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2bp_update( blake2bp_state *S, const void *in, size_t inlen ); - int blake2bp_final( blake2bp_state *S, void *out, size_t outlen ); - - /* Variable output length API */ - int blake2xs_init( blake2xs_state *S, const size_t outlen ); - int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, size_t keylen ); - int blake2xs_update( blake2xs_state *S, const void *in, size_t inlen ); - int blake2xs_final(blake2xs_state *S, void *out, size_t outlen); - - int blake2xb_init( blake2xb_state *S, const size_t outlen ); - int blake2xb_init_key( blake2xb_state *S, const size_t outlen, const void *key, size_t keylen ); - int blake2xb_update( blake2xb_state *S, const void *in, size_t inlen ); - int blake2xb_final(blake2xb_state *S, void *out, size_t outlen); - - /* Simple API */ - int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - int blake2sp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2bp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - int blake2xs( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2xb( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - /* This is simply an alias for blake2b */ - int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + uint8_t buf[BLAKE2B_BLOCKBYTES]; + unsigned buflen; + unsigned outlen; + uint8_t last_node; +} blake2b_state; + +/* Ensure param structs have not been wrongly padded */ +/* Poor man's static_assert */ +enum { + blake2_size_check_0 = 1 / !!(CHAR_BIT == 8), + blake2_size_check_2 = + 1 / !!(sizeof(blake2b_param) == sizeof(uint64_t) * CHAR_BIT) +}; + +/* Streaming API */ +int blake2b_init(blake2b_state *S, size_t outlen); +int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, + size_t keylen); +int blake2b_init_param(blake2b_state *S, const blake2b_param *P); +int blake2b_update(blake2b_state *S, const void *in, size_t inlen); +int blake2b_final(blake2b_state *S, void *out, size_t outlen); + +/* Simple API */ +int blake2b(void *out, size_t outlen, const void *in, size_t inlen, + const void *key, size_t keylen); + +/* Argon2 Team - Begin Code */ +int blake2b_long(void *out, size_t outlen, const void *in, size_t inlen); +/* Argon2 Team - End Code */ #if defined(__cplusplus) } diff --git a/stratum/algos/blake2/blake2.h.bak b/stratum/algos/blake2/blake2.h.bak new file mode 100644 index 000000000..6a26f5f25 --- /dev/null +++ b/stratum/algos/blake2/blake2.h.bak @@ -0,0 +1,192 @@ +/* + BLAKE2 reference source code package - reference C implementations + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ +#ifndef BLAKE2_H +#define BLAKE2_H + +#include +#include + +#if defined(_MSC_VER) +#define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop)) +#else +#define BLAKE2_PACKED(x) x __attribute__((packed)) +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + + enum blake2s_constant + { + BLAKE2S_BLOCKBYTES = 64, + BLAKE2S_OUTBYTES = 32, + BLAKE2S_KEYBYTES = 32, + BLAKE2S_SALTBYTES = 8, + BLAKE2S_PERSONALBYTES = 8 + }; + + enum blake2b_constant + { + BLAKE2B_BLOCKBYTES = 128, + BLAKE2B_OUTBYTES = 64, + BLAKE2B_KEYBYTES = 64, + BLAKE2B_SALTBYTES = 16, + BLAKE2B_PERSONALBYTES = 16 + }; + + typedef struct blake2s_state__ + { + uint32_t h[8]; + uint32_t t[2]; + uint32_t f[2]; + uint8_t buf[BLAKE2S_BLOCKBYTES]; + size_t buflen; + size_t outlen; + uint8_t last_node; + } blake2s_state; + + typedef struct blake2b_state__ + { + uint64_t h[8]; + uint64_t t[2]; + uint64_t f[2]; + uint8_t buf[BLAKE2B_BLOCKBYTES]; + size_t buflen; + size_t outlen; + uint8_t last_node; + } blake2b_state; + + typedef struct blake2sp_state__ + { + blake2s_state S[8][1]; + blake2s_state R[1]; + uint8_t buf[8 * BLAKE2S_BLOCKBYTES]; + size_t buflen; + size_t outlen; + } blake2sp_state; + + typedef struct blake2bp_state__ + { + blake2b_state S[4][1]; + blake2b_state R[1]; + uint8_t buf[4 * BLAKE2B_BLOCKBYTES]; + size_t buflen; + size_t outlen; + } blake2bp_state; + + + BLAKE2_PACKED(struct blake2s_param__ + { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint16_t xof_length; /* 14 */ + uint8_t node_depth; /* 15 */ + uint8_t inner_length; /* 16 */ + /* uint8_t reserved[0]; */ + uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ + uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ + }); + + typedef struct blake2s_param__ blake2s_param; + + BLAKE2_PACKED(struct blake2b_param__ + { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint32_t xof_length; /* 16 */ + uint8_t node_depth; /* 17 */ + uint8_t inner_length; /* 18 */ + uint8_t reserved[14]; /* 32 */ + uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ + uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ + }); + + typedef struct blake2b_param__ blake2b_param; + + typedef struct blake2xs_state__ + { + blake2s_state S[1]; + blake2s_param P[1]; + } blake2xs_state; + + typedef struct blake2xb_state__ + { + blake2b_state S[1]; + blake2b_param P[1]; + } blake2xb_state; + + /* Padded structs result in a compile-time error */ + enum { + BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES), + BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) + }; + + /* Streaming API */ + int blake2s_init( blake2s_state *S, size_t outlen ); + int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); + int blake2s_update( blake2s_state *S, const void *in, size_t inlen ); + int blake2s_final( blake2s_state *S, void *out, size_t outlen ); + + int blake2b_init( blake2b_state *S, size_t outlen ); + int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); + int blake2b_update( blake2b_state *S, const void *in, size_t inlen ); + int blake2b_final( blake2b_state *S, void *out, size_t outlen ); + + int blake2sp_init( blake2sp_state *S, size_t outlen ); + int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2sp_update( blake2sp_state *S, const void *in, size_t inlen ); + int blake2sp_final( blake2sp_state *S, void *out, size_t outlen ); + + int blake2bp_init( blake2bp_state *S, size_t outlen ); + int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2bp_update( blake2bp_state *S, const void *in, size_t inlen ); + int blake2bp_final( blake2bp_state *S, void *out, size_t outlen ); + + /* Variable output length API */ + int blake2xs_init( blake2xs_state *S, const size_t outlen ); + int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, size_t keylen ); + int blake2xs_update( blake2xs_state *S, const void *in, size_t inlen ); + int blake2xs_final(blake2xs_state *S, void *out, size_t outlen); + + int blake2xb_init( blake2xb_state *S, const size_t outlen ); + int blake2xb_init_key( blake2xb_state *S, const size_t outlen, const void *key, size_t keylen ); + int blake2xb_update( blake2xb_state *S, const void *in, size_t inlen ); + int blake2xb_final(blake2xb_state *S, void *out, size_t outlen); + + /* Simple API */ + int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + int blake2sp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2bp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + int blake2xs( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2xb( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + /* This is simply an alias for blake2b */ + int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/stratum/algos/blake2/blake2b.c b/stratum/algos/blake2/blake2b.c index ca05df598..43a6ae71b 100644 --- a/stratum/algos/blake2/blake2b.c +++ b/stratum/algos/blake2/blake2b.c @@ -18,7 +18,6 @@ #include #include #include - #include "blake2.h" #include "blake2-impl.h" @@ -28,40 +27,20 @@ static const uint64_t blake2b_IV[8] = { UINT64_C(0x510e527fade682d1), UINT64_C(0x9b05688c2b3e6c1f), UINT64_C(0x1f83d9abfb41bd6b), UINT64_C(0x5be0cd19137e2179)}; -static const unsigned int blake2b_sigma[12][16] = { - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, - {11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4}, - {7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8}, - {9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13}, - {2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9}, - {12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11}, - {13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10}, - {6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5}, - {10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0}, - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, -}; - static BLAKE2_INLINE void blake2b_set_lastnode(blake2b_state *S) { S->f[1] = (uint64_t)-1; } static BLAKE2_INLINE void blake2b_set_lastblock(blake2b_state *S) { - if (S->last_node) { - blake2b_set_lastnode(S); - } S->f[0] = (uint64_t)-1; } -static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, - uint64_t inc) { +static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, uint64_t inc) { S->t[0] += inc; S->t[1] += (S->t[0] < inc); } static BLAKE2_INLINE void blake2b_invalidate_state(blake2b_state *S) { - clear_internal_memory(S, sizeof(*S)); /* wipe */ blake2b_set_lastblock(S); /* invalidate for further use */ } @@ -73,16 +52,9 @@ static BLAKE2_INLINE void blake2b_init0(blake2b_state *S) { int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { const unsigned char *p = (const unsigned char *)P; unsigned int i; - - if (NULL == P || NULL == S) { - return -1; - } - blake2b_init0(S); - /* IV XOR Parameter Block */ - for (i = 0; i < 8; ++i) { + for (i = 0; i < 8; ++i) S->h[i] ^= load64(&p[i * sizeof(S->h[i])]); - } S->outlen = P->digest_length; return 0; } @@ -90,17 +62,6 @@ int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { /* Sequential blake2b initialization */ int blake2b_init(blake2b_state *S, size_t outlen) { blake2b_param P; - - if (S == NULL) { - return -1; - } - - if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { - blake2b_invalidate_state(S); - return -1; - } - - /* Setup Parameter Block for unkeyed BLAKE2 */ P.digest_length = (uint8_t)outlen; P.key_length = 0; P.fanout = 1; @@ -112,29 +73,11 @@ int blake2b_init(blake2b_state *S, size_t outlen) { memset(P.reserved, 0, sizeof(P.reserved)); memset(P.salt, 0, sizeof(P.salt)); memset(P.personal, 0, sizeof(P.personal)); - return blake2b_init_param(S, &P); } -int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, - size_t keylen) { +int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, size_t keylen) { blake2b_param P; - - if (S == NULL) { - return -1; - } - - if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { - blake2b_invalidate_state(S); - return -1; - } - - if ((key == 0) || (keylen == 0) || (keylen > BLAKE2B_KEYBYTES)) { - blake2b_invalidate_state(S); - return -1; - } - - /* Setup Parameter Block for keyed BLAKE2 */ P.digest_length = (uint8_t)outlen; P.key_length = (uint8_t)keylen; P.fanout = 1; @@ -143,23 +86,9 @@ int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, P.node_offset = 0; P.node_depth = 0; P.inner_length = 0; - memset(P.reserved, 0, sizeof(P.reserved)); - memset(P.salt, 0, sizeof(P.salt)); - memset(P.personal, 0, sizeof(P.personal)); - - if (blake2b_init_param(S, &P) < 0) { - blake2b_invalidate_state(S); - return -1; - } - - { - uint8_t block[BLAKE2B_BLOCKBYTES]; - memset(block, 0, BLAKE2B_BLOCKBYTES); - memcpy(block, key, keylen); - blake2b_update(S, block, BLAKE2B_BLOCKBYTES); - /* Burn the key from stack */ - clear_internal_memory(block, BLAKE2B_BLOCKBYTES); - } + uint8_t block[BLAKE2B_BLOCKBYTES]; + memcpy(block, key, keylen); + blake2b_update(S, block, BLAKE2B_BLOCKBYTES); return 0; } @@ -168,78 +97,134 @@ static void blake2b_compress(blake2b_state *S, const uint8_t *block) { uint64_t v[16]; unsigned int i, r; - for (i = 0; i < 16; ++i) { + for (i = 0; i < 16; ++i) m[i] = load64(block + i * sizeof(m[i])); - } - - for (i = 0; i < 8; ++i) { - v[i] = S->h[i]; - } - - v[8] = blake2b_IV[0]; - v[9] = blake2b_IV[1]; - v[10] = blake2b_IV[2]; - v[11] = blake2b_IV[3]; - v[12] = blake2b_IV[4] ^ S->t[0]; - v[13] = blake2b_IV[5] ^ S->t[1]; - v[14] = blake2b_IV[6] ^ S->f[0]; - v[15] = blake2b_IV[7] ^ S->f[1]; - -#define G(r, i, a, b, c, d) \ - do { \ - a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \ - d = rotr64(d ^ a, 32); \ - c = c + d; \ - b = rotr64(b ^ c, 24); \ - a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \ - d = rotr64(d ^ a, 16); \ - c = c + d; \ - b = rotr64(b ^ c, 63); \ - } while ((void)0, 0) -#define ROUND(r) \ - do { \ - G(r, 0, v[0], v[4], v[8], v[12]); \ - G(r, 1, v[1], v[5], v[9], v[13]); \ - G(r, 2, v[2], v[6], v[10], v[14]); \ - G(r, 3, v[3], v[7], v[11], v[15]); \ - G(r, 4, v[0], v[5], v[10], v[15]); \ - G(r, 5, v[1], v[6], v[11], v[12]); \ - G(r, 6, v[2], v[7], v[8], v[13]); \ - G(r, 7, v[3], v[4], v[9], v[14]); \ - } while ((void)0, 0) - - for (r = 0; r < 12; ++r) { - ROUND(r); - } - - for (i = 0; i < 8; ++i) { - S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; - } - -#undef G -#undef ROUND + v[0] = S->h[0]; + v[1] = S->h[1]; + v[2] = S->h[2]; + v[3] = S->h[3]; + v[4] = S->h[4]; + v[5] = S->h[5]; + v[6] = S->h[6]; + v[7] = S->h[7]; + v[8] = 0x6a09e667f3bcc908; + v[9] = 0xbb67ae8584caa73b; + v[10] = 0x3c6ef372fe94f82b; + v[11] = 0xa54ff53a5f1d36f1; + v[12] = 0x510e527fade682d1 ^ S->t[0]; + v[13] = 0x9b05688c2b3e6c1f ^ S->t[1]; + v[14] = 0x1f83d9abfb41bd6b ^ S->f[0]; + v[15] = 0x5be0cd19137e2179 ^ S->f[1]; + v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[1];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[2];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[7];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[8];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[9];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[13];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[14];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[14];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[9];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[15];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[0];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[2];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[11];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[11];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[8];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[12];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[0];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[2];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[15];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[10];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[14];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[3];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[6];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[1];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[9];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[4];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[7];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[9];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[1];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[13];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[12];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[11];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[14];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[2];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[6];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[5];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[4];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[0];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[8];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[9];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[5];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[7];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[2];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[10];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[15];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[14];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[12];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[6];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[8];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[13];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[2];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[12];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[6];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[10];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[0];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[11];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[8];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[3];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[4];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[13];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[7];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[5];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[15];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[14];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[1];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[9];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[12];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[5];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[1];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[15];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[14];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[13];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[4];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[10];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[0];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[7];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[6];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[3];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[9];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[2];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[8];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[11];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[13];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[11];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[7];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[14];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[12];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[1];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[3];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[9];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[5];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[0];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[15];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[4];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[8];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[6];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[2];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[10];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[6];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[15];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[14];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[9];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[11];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[3];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[0];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[8];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[2];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[13];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[7];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[1];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[4];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[10];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[2];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[7];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[6];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[1];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[5];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[15];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[11];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[9];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[14];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[3];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[13];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[0];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[1];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[2];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[7];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[8];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[9];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[13];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[14];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[14];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[9];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[15];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[0];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[2];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[11];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + S->h[0] = S->h[0] ^ v[0] ^ v[8]; + S->h[1] = S->h[1] ^ v[1] ^ v[9]; + S->h[2] = S->h[2] ^ v[2] ^ v[10]; + S->h[3] = S->h[3] ^ v[3] ^ v[11]; + S->h[4] = S->h[4] ^ v[4] ^ v[12]; + S->h[5] = S->h[5] ^ v[5] ^ v[13]; + S->h[6] = S->h[6] ^ v[6] ^ v[14]; + S->h[7] = S->h[7] ^ v[7] ^ v[15]; } int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { const uint8_t *pin = (const uint8_t *)in; - - if (inlen == 0) { - return 0; - } - - /* Sanity check */ - if (S == NULL || in == NULL) { - return -1; - } - - /* Is this a reused state? */ - if (S->f[0] != 0) { - return -1; - } - if (S->buflen + inlen > BLAKE2B_BLOCKBYTES) { - /* Complete current block */ size_t left = S->buflen; size_t fill = BLAKE2B_BLOCKBYTES - left; memcpy(&S->buf[left], pin, fill); @@ -248,7 +233,6 @@ int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { S->buflen = 0; inlen -= fill; pin += fill; - /* Avoid buffer copies when possible */ while (inlen > BLAKE2B_BLOCKBYTES) { blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); blake2b_compress(S, pin); @@ -264,127 +248,59 @@ int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { int blake2b_final(blake2b_state *S, void *out, size_t outlen) { uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; unsigned int i; - - /* Sanity checks */ - if (S == NULL || out == NULL || outlen < S->outlen) { - return -1; - } - - /* Is this a reused state? */ - if (S->f[0] != 0) { - return -1; - } - blake2b_increment_counter(S, S->buflen); blake2b_set_lastblock(S); memset(&S->buf[S->buflen], 0, BLAKE2B_BLOCKBYTES - S->buflen); /* Padding */ blake2b_compress(S, S->buf); - - for (i = 0; i < 8; ++i) { /* Output full hash to temp buffer */ + for (i = 0; i < 8; ++i) store64(buffer + sizeof(S->h[i]) * i, S->h[i]); - } - memcpy(out, buffer, S->outlen); - clear_internal_memory(buffer, sizeof(buffer)); - clear_internal_memory(S->buf, sizeof(S->buf)); - clear_internal_memory(S->h, sizeof(S->h)); return 0; } -int blake2b(void *out, size_t outlen, const void *in, size_t inlen, - const void *key, size_t keylen) { +int blake2b(void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen) { blake2b_state S; int ret = -1; - - /* Verify parameters */ - if (NULL == in && inlen > 0) { - goto fail; - } - - if (NULL == out || outlen == 0 || outlen > BLAKE2B_OUTBYTES) { - goto fail; - } - - if ((NULL == key && keylen > 0) || keylen > BLAKE2B_KEYBYTES) { - goto fail; - } - - if (keylen > 0) { - if (blake2b_init_key(&S, outlen, key, keylen) < 0) { - goto fail; - } - } else { - if (blake2b_init(&S, outlen) < 0) { - goto fail; - } - } - - if (blake2b_update(&S, in, inlen) < 0) { - goto fail; - } - ret = blake2b_final(&S, out, outlen); - -fail: - clear_internal_memory(&S, sizeof(S)); - return ret; + blake2b_init(&S, outlen); + blake2b_update(&S, in, inlen); + blake2b_final(&S, out, outlen); } -/* Argon2 Team - Begin Code */ int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { uint8_t *out = (uint8_t *)pout; blake2b_state blake_state; uint8_t outlen_bytes[sizeof(uint32_t)] = {0}; int ret = -1; - - if (outlen > UINT32_MAX) { - goto fail; - } - - /* Ensure little-endian byte order! */ store32(outlen_bytes, (uint32_t)outlen); -#define TRY(statement) \ - do { \ - ret = statement; \ - if (ret < 0) { \ - goto fail; \ - } \ - } while ((void)0, 0) - if (outlen <= BLAKE2B_OUTBYTES) { - TRY(blake2b_init(&blake_state, outlen)); - TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); - TRY(blake2b_update(&blake_state, in, inlen)); - TRY(blake2b_final(&blake_state, out, outlen)); + blake2b_init(&blake_state, outlen); + blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)); + blake2b_update(&blake_state, in, inlen); + blake2b_final(&blake_state, out, outlen); } else { uint32_t toproduce; uint8_t out_buffer[BLAKE2B_OUTBYTES]; uint8_t in_buffer[BLAKE2B_OUTBYTES]; - TRY(blake2b_init(&blake_state, BLAKE2B_OUTBYTES)); - TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); - TRY(blake2b_update(&blake_state, in, inlen)); - TRY(blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES)); + blake2b_init(&blake_state, BLAKE2B_OUTBYTES); + blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)); + blake2b_update(&blake_state, in, inlen); + blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES); memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); out += BLAKE2B_OUTBYTES / 2; toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2; while (toproduce > BLAKE2B_OUTBYTES) { memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); - TRY(blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer, - BLAKE2B_OUTBYTES, NULL, 0)); + blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer,BLAKE2B_OUTBYTES, NULL, 0); memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); out += BLAKE2B_OUTBYTES / 2; toproduce -= BLAKE2B_OUTBYTES / 2; } memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); - TRY(blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, - 0)); + blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, 0); memcpy(out, out_buffer, toproduce); } -fail: - clear_internal_memory(&blake_state, sizeof(blake_state)); return ret; -#undef TRY } -/* Argon2 Team - End Code */ diff --git a/stratum/algos/blake2/blake2b.c.bak b/stratum/algos/blake2/blake2b.c.bak new file mode 100644 index 000000000..ca05df598 --- /dev/null +++ b/stratum/algos/blake2/blake2b.c.bak @@ -0,0 +1,390 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#include +#include +#include + +#include "blake2.h" +#include "blake2-impl.h" + +static const uint64_t blake2b_IV[8] = { + UINT64_C(0x6a09e667f3bcc908), UINT64_C(0xbb67ae8584caa73b), + UINT64_C(0x3c6ef372fe94f82b), UINT64_C(0xa54ff53a5f1d36f1), + UINT64_C(0x510e527fade682d1), UINT64_C(0x9b05688c2b3e6c1f), + UINT64_C(0x1f83d9abfb41bd6b), UINT64_C(0x5be0cd19137e2179)}; + +static const unsigned int blake2b_sigma[12][16] = { + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, + {11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4}, + {7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8}, + {9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13}, + {2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9}, + {12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11}, + {13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10}, + {6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5}, + {10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0}, + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, +}; + +static BLAKE2_INLINE void blake2b_set_lastnode(blake2b_state *S) { + S->f[1] = (uint64_t)-1; +} + +static BLAKE2_INLINE void blake2b_set_lastblock(blake2b_state *S) { + if (S->last_node) { + blake2b_set_lastnode(S); + } + S->f[0] = (uint64_t)-1; +} + +static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, + uint64_t inc) { + S->t[0] += inc; + S->t[1] += (S->t[0] < inc); +} + +static BLAKE2_INLINE void blake2b_invalidate_state(blake2b_state *S) { + clear_internal_memory(S, sizeof(*S)); /* wipe */ + blake2b_set_lastblock(S); /* invalidate for further use */ +} + +static BLAKE2_INLINE void blake2b_init0(blake2b_state *S) { + memset(S, 0, sizeof(*S)); + memcpy(S->h, blake2b_IV, sizeof(S->h)); +} + +int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { + const unsigned char *p = (const unsigned char *)P; + unsigned int i; + + if (NULL == P || NULL == S) { + return -1; + } + + blake2b_init0(S); + /* IV XOR Parameter Block */ + for (i = 0; i < 8; ++i) { + S->h[i] ^= load64(&p[i * sizeof(S->h[i])]); + } + S->outlen = P->digest_length; + return 0; +} + +/* Sequential blake2b initialization */ +int blake2b_init(blake2b_state *S, size_t outlen) { + blake2b_param P; + + if (S == NULL) { + return -1; + } + + if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + /* Setup Parameter Block for unkeyed BLAKE2 */ + P.digest_length = (uint8_t)outlen; + P.key_length = 0; + P.fanout = 1; + P.depth = 1; + P.leaf_length = 0; + P.node_offset = 0; + P.node_depth = 0; + P.inner_length = 0; + memset(P.reserved, 0, sizeof(P.reserved)); + memset(P.salt, 0, sizeof(P.salt)); + memset(P.personal, 0, sizeof(P.personal)); + + return blake2b_init_param(S, &P); +} + +int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, + size_t keylen) { + blake2b_param P; + + if (S == NULL) { + return -1; + } + + if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + if ((key == 0) || (keylen == 0) || (keylen > BLAKE2B_KEYBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + /* Setup Parameter Block for keyed BLAKE2 */ + P.digest_length = (uint8_t)outlen; + P.key_length = (uint8_t)keylen; + P.fanout = 1; + P.depth = 1; + P.leaf_length = 0; + P.node_offset = 0; + P.node_depth = 0; + P.inner_length = 0; + memset(P.reserved, 0, sizeof(P.reserved)); + memset(P.salt, 0, sizeof(P.salt)); + memset(P.personal, 0, sizeof(P.personal)); + + if (blake2b_init_param(S, &P) < 0) { + blake2b_invalidate_state(S); + return -1; + } + + { + uint8_t block[BLAKE2B_BLOCKBYTES]; + memset(block, 0, BLAKE2B_BLOCKBYTES); + memcpy(block, key, keylen); + blake2b_update(S, block, BLAKE2B_BLOCKBYTES); + /* Burn the key from stack */ + clear_internal_memory(block, BLAKE2B_BLOCKBYTES); + } + return 0; +} + +static void blake2b_compress(blake2b_state *S, const uint8_t *block) { + uint64_t m[16]; + uint64_t v[16]; + unsigned int i, r; + + for (i = 0; i < 16; ++i) { + m[i] = load64(block + i * sizeof(m[i])); + } + + for (i = 0; i < 8; ++i) { + v[i] = S->h[i]; + } + + v[8] = blake2b_IV[0]; + v[9] = blake2b_IV[1]; + v[10] = blake2b_IV[2]; + v[11] = blake2b_IV[3]; + v[12] = blake2b_IV[4] ^ S->t[0]; + v[13] = blake2b_IV[5] ^ S->t[1]; + v[14] = blake2b_IV[6] ^ S->f[0]; + v[15] = blake2b_IV[7] ^ S->f[1]; + +#define G(r, i, a, b, c, d) \ + do { \ + a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \ + d = rotr64(d ^ a, 32); \ + c = c + d; \ + b = rotr64(b ^ c, 24); \ + a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \ + d = rotr64(d ^ a, 16); \ + c = c + d; \ + b = rotr64(b ^ c, 63); \ + } while ((void)0, 0) + +#define ROUND(r) \ + do { \ + G(r, 0, v[0], v[4], v[8], v[12]); \ + G(r, 1, v[1], v[5], v[9], v[13]); \ + G(r, 2, v[2], v[6], v[10], v[14]); \ + G(r, 3, v[3], v[7], v[11], v[15]); \ + G(r, 4, v[0], v[5], v[10], v[15]); \ + G(r, 5, v[1], v[6], v[11], v[12]); \ + G(r, 6, v[2], v[7], v[8], v[13]); \ + G(r, 7, v[3], v[4], v[9], v[14]); \ + } while ((void)0, 0) + + for (r = 0; r < 12; ++r) { + ROUND(r); + } + + for (i = 0; i < 8; ++i) { + S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; + } + +#undef G +#undef ROUND +} + +int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { + const uint8_t *pin = (const uint8_t *)in; + + if (inlen == 0) { + return 0; + } + + /* Sanity check */ + if (S == NULL || in == NULL) { + return -1; + } + + /* Is this a reused state? */ + if (S->f[0] != 0) { + return -1; + } + + if (S->buflen + inlen > BLAKE2B_BLOCKBYTES) { + /* Complete current block */ + size_t left = S->buflen; + size_t fill = BLAKE2B_BLOCKBYTES - left; + memcpy(&S->buf[left], pin, fill); + blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); + blake2b_compress(S, S->buf); + S->buflen = 0; + inlen -= fill; + pin += fill; + /* Avoid buffer copies when possible */ + while (inlen > BLAKE2B_BLOCKBYTES) { + blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); + blake2b_compress(S, pin); + inlen -= BLAKE2B_BLOCKBYTES; + pin += BLAKE2B_BLOCKBYTES; + } + } + memcpy(&S->buf[S->buflen], pin, inlen); + S->buflen += (unsigned int)inlen; + return 0; +} + +int blake2b_final(blake2b_state *S, void *out, size_t outlen) { + uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; + unsigned int i; + + /* Sanity checks */ + if (S == NULL || out == NULL || outlen < S->outlen) { + return -1; + } + + /* Is this a reused state? */ + if (S->f[0] != 0) { + return -1; + } + + blake2b_increment_counter(S, S->buflen); + blake2b_set_lastblock(S); + memset(&S->buf[S->buflen], 0, BLAKE2B_BLOCKBYTES - S->buflen); /* Padding */ + blake2b_compress(S, S->buf); + + for (i = 0; i < 8; ++i) { /* Output full hash to temp buffer */ + store64(buffer + sizeof(S->h[i]) * i, S->h[i]); + } + + memcpy(out, buffer, S->outlen); + clear_internal_memory(buffer, sizeof(buffer)); + clear_internal_memory(S->buf, sizeof(S->buf)); + clear_internal_memory(S->h, sizeof(S->h)); + return 0; +} + +int blake2b(void *out, size_t outlen, const void *in, size_t inlen, + const void *key, size_t keylen) { + blake2b_state S; + int ret = -1; + + /* Verify parameters */ + if (NULL == in && inlen > 0) { + goto fail; + } + + if (NULL == out || outlen == 0 || outlen > BLAKE2B_OUTBYTES) { + goto fail; + } + + if ((NULL == key && keylen > 0) || keylen > BLAKE2B_KEYBYTES) { + goto fail; + } + + if (keylen > 0) { + if (blake2b_init_key(&S, outlen, key, keylen) < 0) { + goto fail; + } + } else { + if (blake2b_init(&S, outlen) < 0) { + goto fail; + } + } + + if (blake2b_update(&S, in, inlen) < 0) { + goto fail; + } + ret = blake2b_final(&S, out, outlen); + +fail: + clear_internal_memory(&S, sizeof(S)); + return ret; +} + +/* Argon2 Team - Begin Code */ +int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { + uint8_t *out = (uint8_t *)pout; + blake2b_state blake_state; + uint8_t outlen_bytes[sizeof(uint32_t)] = {0}; + int ret = -1; + + if (outlen > UINT32_MAX) { + goto fail; + } + + /* Ensure little-endian byte order! */ + store32(outlen_bytes, (uint32_t)outlen); + +#define TRY(statement) \ + do { \ + ret = statement; \ + if (ret < 0) { \ + goto fail; \ + } \ + } while ((void)0, 0) + + if (outlen <= BLAKE2B_OUTBYTES) { + TRY(blake2b_init(&blake_state, outlen)); + TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); + TRY(blake2b_update(&blake_state, in, inlen)); + TRY(blake2b_final(&blake_state, out, outlen)); + } else { + uint32_t toproduce; + uint8_t out_buffer[BLAKE2B_OUTBYTES]; + uint8_t in_buffer[BLAKE2B_OUTBYTES]; + TRY(blake2b_init(&blake_state, BLAKE2B_OUTBYTES)); + TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); + TRY(blake2b_update(&blake_state, in, inlen)); + TRY(blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES)); + memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); + out += BLAKE2B_OUTBYTES / 2; + toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2; + + while (toproduce > BLAKE2B_OUTBYTES) { + memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); + TRY(blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer, + BLAKE2B_OUTBYTES, NULL, 0)); + memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); + out += BLAKE2B_OUTBYTES / 2; + toproduce -= BLAKE2B_OUTBYTES / 2; + } + + memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); + TRY(blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, + 0)); + memcpy(out, out_buffer, toproduce); + } +fail: + clear_internal_memory(&blake_state, sizeof(blake_state)); + return ret; +#undef TRY +} +/* Argon2 Team - End Code */ diff --git a/stratum/algos/blake2/blamka-round-opt.h b/stratum/algos/blake2/blamka-round-opt.h index faf96662e..2c8942e31 100644 --- a/stratum/algos/blake2/blamka-round-opt.h +++ b/stratum/algos/blake2/blamka-round-opt.h @@ -4,7 +4,7 @@ * Copyright 2015 * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves * - * You may use this work under the terms of a Creative Commons CC0 1.0 + * You may use this work under the terms of a Creative Commons CC0 1.0 * License/Waiver or the Apache Public License 2.0, at your option. The terms of * these licenses can be found at: * @@ -18,10 +18,6 @@ #ifndef BLAKE_ROUND_MKA_OPT_H #define BLAKE_ROUND_MKA_OPT_H -#if defined(HAVE_CONFIG_H) -#include "config/dynamic-config.h" -#endif - #include "blake2-impl.h" #include @@ -182,7 +178,6 @@ static BLAKE2_INLINE __m128i fBlaMka(__m128i x, __m128i y) { \ UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ } while ((void)0, 0) - #else /* __AVX2__ */ #include @@ -473,4 +468,4 @@ static __m512i muladd(__m512i x, __m512i y) } while ((void)0, 0) #endif /* __AVX512F__ */ -#endif /* BLAKE_ROUND_MKA_OPT_H */ \ No newline at end of file +#endif /* BLAKE_ROUND_MKA_OPT_H */ diff --git a/stratum/algos/blake2/blamka-round-opt.h.bak b/stratum/algos/blake2/blamka-round-opt.h.bak new file mode 100644 index 000000000..faf96662e --- /dev/null +++ b/stratum/algos/blake2/blamka-round-opt.h.bak @@ -0,0 +1,476 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef BLAKE_ROUND_MKA_OPT_H +#define BLAKE_ROUND_MKA_OPT_H + +#if defined(HAVE_CONFIG_H) +#include "config/dynamic-config.h" +#endif + +#include "blake2-impl.h" + +#include +#if defined(__SSSE3__) +#include /* for _mm_shuffle_epi8 and _mm_alignr_epi8 */ +#endif + +#if defined(__XOP__) && (defined(__GNUC__) || defined(__clang__)) +#include +#endif + +#if !defined(__AVX512F__) +#if !defined(__AVX2__) +#if !defined(__XOP__) +#if defined(__SSSE3__) +#define r16 \ + (_mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9)) +#define r24 \ + (_mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10)) +#define _mm_roti_epi64(x, c) \ + (-(c) == 32) \ + ? _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) \ + : (-(c) == 24) \ + ? _mm_shuffle_epi8((x), r24) \ + : (-(c) == 16) \ + ? _mm_shuffle_epi8((x), r16) \ + : (-(c) == 63) \ + ? _mm_xor_si128(_mm_srli_epi64((x), -(c)), \ + _mm_add_epi64((x), (x))) \ + : _mm_xor_si128(_mm_srli_epi64((x), -(c)), \ + _mm_slli_epi64((x), 64 - (-(c)))) +#else /* defined(__SSE2__) */ +#define _mm_roti_epi64(r, c) \ + _mm_xor_si128(_mm_srli_epi64((r), -(c)), _mm_slli_epi64((r), 64 - (-(c)))) +#endif +#else +#endif + +static BLAKE2_INLINE __m128i fBlaMka(__m128i x, __m128i y) { + const __m128i z = _mm_mul_epu32(x, y); + return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z)); +} + +#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + A0 = fBlaMka(A0, B0); \ + A1 = fBlaMka(A1, B1); \ + \ + D0 = _mm_xor_si128(D0, A0); \ + D1 = _mm_xor_si128(D1, A1); \ + \ + D0 = _mm_roti_epi64(D0, -32); \ + D1 = _mm_roti_epi64(D1, -32); \ + \ + C0 = fBlaMka(C0, D0); \ + C1 = fBlaMka(C1, D1); \ + \ + B0 = _mm_xor_si128(B0, C0); \ + B1 = _mm_xor_si128(B1, C1); \ + \ + B0 = _mm_roti_epi64(B0, -24); \ + B1 = _mm_roti_epi64(B1, -24); \ + } while ((void)0, 0) + +#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + A0 = fBlaMka(A0, B0); \ + A1 = fBlaMka(A1, B1); \ + \ + D0 = _mm_xor_si128(D0, A0); \ + D1 = _mm_xor_si128(D1, A1); \ + \ + D0 = _mm_roti_epi64(D0, -16); \ + D1 = _mm_roti_epi64(D1, -16); \ + \ + C0 = fBlaMka(C0, D0); \ + C1 = fBlaMka(C1, D1); \ + \ + B0 = _mm_xor_si128(B0, C0); \ + B1 = _mm_xor_si128(B1, C1); \ + \ + B0 = _mm_roti_epi64(B0, -63); \ + B1 = _mm_roti_epi64(B1, -63); \ + } while ((void)0, 0) + +#if defined(__SSSE3__) +#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + __m128i t0 = _mm_alignr_epi8(B1, B0, 8); \ + __m128i t1 = _mm_alignr_epi8(B0, B1, 8); \ + B0 = t0; \ + B1 = t1; \ + \ + t0 = C0; \ + C0 = C1; \ + C1 = t0; \ + \ + t0 = _mm_alignr_epi8(D1, D0, 8); \ + t1 = _mm_alignr_epi8(D0, D1, 8); \ + D0 = t1; \ + D1 = t0; \ + } while ((void)0, 0) + +#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + __m128i t0 = _mm_alignr_epi8(B0, B1, 8); \ + __m128i t1 = _mm_alignr_epi8(B1, B0, 8); \ + B0 = t0; \ + B1 = t1; \ + \ + t0 = C0; \ + C0 = C1; \ + C1 = t0; \ + \ + t0 = _mm_alignr_epi8(D0, D1, 8); \ + t1 = _mm_alignr_epi8(D1, D0, 8); \ + D0 = t1; \ + D1 = t0; \ + } while ((void)0, 0) +#else /* SSE2 */ +#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + __m128i t0 = D0; \ + __m128i t1 = B0; \ + D0 = C0; \ + C0 = C1; \ + C1 = D0; \ + D0 = _mm_unpackhi_epi64(D1, _mm_unpacklo_epi64(t0, t0)); \ + D1 = _mm_unpackhi_epi64(t0, _mm_unpacklo_epi64(D1, D1)); \ + B0 = _mm_unpackhi_epi64(B0, _mm_unpacklo_epi64(B1, B1)); \ + B1 = _mm_unpackhi_epi64(B1, _mm_unpacklo_epi64(t1, t1)); \ + } while ((void)0, 0) + +#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + __m128i t0, t1; \ + t0 = C0; \ + C0 = C1; \ + C1 = t0; \ + t0 = B0; \ + t1 = D0; \ + B0 = _mm_unpackhi_epi64(B1, _mm_unpacklo_epi64(B0, B0)); \ + B1 = _mm_unpackhi_epi64(t0, _mm_unpacklo_epi64(B1, B1)); \ + D0 = _mm_unpackhi_epi64(D0, _mm_unpacklo_epi64(D1, D1)); \ + D1 = _mm_unpackhi_epi64(D1, _mm_unpacklo_epi64(t1, t1)); \ + } while ((void)0, 0) +#endif + +#define BLAKE2_ROUND(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + G1(A0, B0, C0, D0, A1, B1, C1, D1); \ + G2(A0, B0, C0, D0, A1, B1, C1, D1); \ + \ + DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ + \ + G1(A0, B0, C0, D0, A1, B1, C1, D1); \ + G2(A0, B0, C0, D0, A1, B1, C1, D1); \ + \ + UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ + } while ((void)0, 0) + +#else /* __AVX2__ */ + +#include + +#define rotr32(x) _mm256_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1)) +#define rotr24(x) _mm256_shuffle_epi8(x, _mm256_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10, 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10)) +#define rotr16(x) _mm256_shuffle_epi8(x, _mm256_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9, 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9)) +#define rotr63(x) _mm256_xor_si256(_mm256_srli_epi64((x), 63), _mm256_add_epi64((x), (x))) + +#define G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + __m256i ml = _mm256_mul_epu32(A0, B0); \ + ml = _mm256_add_epi64(ml, ml); \ + A0 = _mm256_add_epi64(A0, _mm256_add_epi64(B0, ml)); \ + D0 = _mm256_xor_si256(D0, A0); \ + D0 = rotr32(D0); \ + \ + ml = _mm256_mul_epu32(C0, D0); \ + ml = _mm256_add_epi64(ml, ml); \ + C0 = _mm256_add_epi64(C0, _mm256_add_epi64(D0, ml)); \ + \ + B0 = _mm256_xor_si256(B0, C0); \ + B0 = rotr24(B0); \ + \ + ml = _mm256_mul_epu32(A1, B1); \ + ml = _mm256_add_epi64(ml, ml); \ + A1 = _mm256_add_epi64(A1, _mm256_add_epi64(B1, ml)); \ + D1 = _mm256_xor_si256(D1, A1); \ + D1 = rotr32(D1); \ + \ + ml = _mm256_mul_epu32(C1, D1); \ + ml = _mm256_add_epi64(ml, ml); \ + C1 = _mm256_add_epi64(C1, _mm256_add_epi64(D1, ml)); \ + \ + B1 = _mm256_xor_si256(B1, C1); \ + B1 = rotr24(B1); \ + } while((void)0, 0); + +#define G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + __m256i ml = _mm256_mul_epu32(A0, B0); \ + ml = _mm256_add_epi64(ml, ml); \ + A0 = _mm256_add_epi64(A0, _mm256_add_epi64(B0, ml)); \ + D0 = _mm256_xor_si256(D0, A0); \ + D0 = rotr16(D0); \ + \ + ml = _mm256_mul_epu32(C0, D0); \ + ml = _mm256_add_epi64(ml, ml); \ + C0 = _mm256_add_epi64(C0, _mm256_add_epi64(D0, ml)); \ + B0 = _mm256_xor_si256(B0, C0); \ + B0 = rotr63(B0); \ + \ + ml = _mm256_mul_epu32(A1, B1); \ + ml = _mm256_add_epi64(ml, ml); \ + A1 = _mm256_add_epi64(A1, _mm256_add_epi64(B1, ml)); \ + D1 = _mm256_xor_si256(D1, A1); \ + D1 = rotr16(D1); \ + \ + ml = _mm256_mul_epu32(C1, D1); \ + ml = _mm256_add_epi64(ml, ml); \ + C1 = _mm256_add_epi64(C1, _mm256_add_epi64(D1, ml)); \ + B1 = _mm256_xor_si256(B1, C1); \ + B1 = rotr63(B1); \ + } while((void)0, 0); + +#define DIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + B0 = _mm256_permute4x64_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \ + C0 = _mm256_permute4x64_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ + D0 = _mm256_permute4x64_epi64(D0, _MM_SHUFFLE(2, 1, 0, 3)); \ + \ + B1 = _mm256_permute4x64_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \ + C1 = _mm256_permute4x64_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ + D1 = _mm256_permute4x64_epi64(D1, _MM_SHUFFLE(2, 1, 0, 3)); \ + } while((void)0, 0); + +#define DIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + __m256i tmp1 = _mm256_blend_epi32(B0, B1, 0xCC); \ + __m256i tmp2 = _mm256_blend_epi32(B0, B1, 0x33); \ + B1 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ + B0 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ + \ + tmp1 = C0; \ + C0 = C1; \ + C1 = tmp1; \ + \ + tmp1 = _mm256_blend_epi32(D0, D1, 0xCC); \ + tmp2 = _mm256_blend_epi32(D0, D1, 0x33); \ + D0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ + D1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ + } while(0); + +#define UNDIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + B0 = _mm256_permute4x64_epi64(B0, _MM_SHUFFLE(2, 1, 0, 3)); \ + C0 = _mm256_permute4x64_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ + D0 = _mm256_permute4x64_epi64(D0, _MM_SHUFFLE(0, 3, 2, 1)); \ + \ + B1 = _mm256_permute4x64_epi64(B1, _MM_SHUFFLE(2, 1, 0, 3)); \ + C1 = _mm256_permute4x64_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ + D1 = _mm256_permute4x64_epi64(D1, _MM_SHUFFLE(0, 3, 2, 1)); \ + } while((void)0, 0); + +#define UNDIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + __m256i tmp1 = _mm256_blend_epi32(B0, B1, 0xCC); \ + __m256i tmp2 = _mm256_blend_epi32(B0, B1, 0x33); \ + B0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ + B1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ + \ + tmp1 = C0; \ + C0 = C1; \ + C1 = tmp1; \ + \ + tmp1 = _mm256_blend_epi32(D0, D1, 0x33); \ + tmp2 = _mm256_blend_epi32(D0, D1, 0xCC); \ + D0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ + D1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ + } while((void)0, 0); + +#define BLAKE2_ROUND_1(A0, A1, B0, B1, C0, C1, D0, D1) \ + do{ \ + G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + DIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ + \ + G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + UNDIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ + } while((void)0, 0); + +#define BLAKE2_ROUND_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do{ \ + G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + DIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + UNDIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + } while((void)0, 0); + +#endif /* __AVX2__ */ + +#else /* __AVX512F__ */ + +#include + +#define ror64(x, n) _mm512_ror_epi64((x), (n)) + +static __m512i muladd(__m512i x, __m512i y) +{ + __m512i z = _mm512_mul_epu32(x, y); + return _mm512_add_epi64(_mm512_add_epi64(x, y), _mm512_add_epi64(z, z)); +} + +#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + A0 = muladd(A0, B0); \ + A1 = muladd(A1, B1); \ +\ + D0 = _mm512_xor_si512(D0, A0); \ + D1 = _mm512_xor_si512(D1, A1); \ +\ + D0 = ror64(D0, 32); \ + D1 = ror64(D1, 32); \ +\ + C0 = muladd(C0, D0); \ + C1 = muladd(C1, D1); \ +\ + B0 = _mm512_xor_si512(B0, C0); \ + B1 = _mm512_xor_si512(B1, C1); \ +\ + B0 = ror64(B0, 24); \ + B1 = ror64(B1, 24); \ + } while ((void)0, 0) + +#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + A0 = muladd(A0, B0); \ + A1 = muladd(A1, B1); \ +\ + D0 = _mm512_xor_si512(D0, A0); \ + D1 = _mm512_xor_si512(D1, A1); \ +\ + D0 = ror64(D0, 16); \ + D1 = ror64(D1, 16); \ +\ + C0 = muladd(C0, D0); \ + C1 = muladd(C1, D1); \ +\ + B0 = _mm512_xor_si512(B0, C0); \ + B1 = _mm512_xor_si512(B1, C1); \ +\ + B0 = ror64(B0, 63); \ + B1 = ror64(B1, 63); \ + } while ((void)0, 0) + +#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \ + B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \ +\ + C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ + C1 = _mm512_permutex_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ +\ + D0 = _mm512_permutex_epi64(D0, _MM_SHUFFLE(2, 1, 0, 3)); \ + D1 = _mm512_permutex_epi64(D1, _MM_SHUFFLE(2, 1, 0, 3)); \ + } while ((void)0, 0) + +#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(2, 1, 0, 3)); \ + B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(2, 1, 0, 3)); \ +\ + C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ + C1 = _mm512_permutex_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ +\ + D0 = _mm512_permutex_epi64(D0, _MM_SHUFFLE(0, 3, 2, 1)); \ + D1 = _mm512_permutex_epi64(D1, _MM_SHUFFLE(0, 3, 2, 1)); \ + } while ((void)0, 0) + +#define BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + G1(A0, B0, C0, D0, A1, B1, C1, D1); \ + G2(A0, B0, C0, D0, A1, B1, C1, D1); \ +\ + DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ +\ + G1(A0, B0, C0, D0, A1, B1, C1, D1); \ + G2(A0, B0, C0, D0, A1, B1, C1, D1); \ +\ + UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ + } while ((void)0, 0) + +#define SWAP_HALVES(A0, A1) \ + do { \ + __m512i t0, t1; \ + t0 = _mm512_shuffle_i64x2(A0, A1, _MM_SHUFFLE(1, 0, 1, 0)); \ + t1 = _mm512_shuffle_i64x2(A0, A1, _MM_SHUFFLE(3, 2, 3, 2)); \ + A0 = t0; \ + A1 = t1; \ + } while((void)0, 0) + +#define SWAP_QUARTERS(A0, A1) \ + do { \ + SWAP_HALVES(A0, A1); \ + A0 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A0); \ + A1 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A1); \ + } while((void)0, 0) + +#define UNSWAP_QUARTERS(A0, A1) \ + do { \ + A0 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A0); \ + A1 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A1); \ + SWAP_HALVES(A0, A1); \ + } while((void)0, 0) + +#define BLAKE2_ROUND_1(A0, C0, B0, D0, A1, C1, B1, D1) \ + do { \ + SWAP_HALVES(A0, B0); \ + SWAP_HALVES(C0, D0); \ + SWAP_HALVES(A1, B1); \ + SWAP_HALVES(C1, D1); \ + BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1); \ + SWAP_HALVES(A0, B0); \ + SWAP_HALVES(C0, D0); \ + SWAP_HALVES(A1, B1); \ + SWAP_HALVES(C1, D1); \ + } while ((void)0, 0) + +#define BLAKE2_ROUND_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + SWAP_QUARTERS(A0, A1); \ + SWAP_QUARTERS(B0, B1); \ + SWAP_QUARTERS(C0, C1); \ + SWAP_QUARTERS(D0, D1); \ + BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1); \ + UNSWAP_QUARTERS(A0, A1); \ + UNSWAP_QUARTERS(B0, B1); \ + UNSWAP_QUARTERS(C0, C1); \ + UNSWAP_QUARTERS(D0, D1); \ + } while ((void)0, 0) + +#endif /* __AVX512F__ */ +#endif /* BLAKE_ROUND_MKA_OPT_H */ \ No newline at end of file diff --git a/stratum/algos/blake2/blamka-round-ref.h b/stratum/algos/blake2/blamka-round-ref.h index 2238959e1..b8f2cf471 100644 --- a/stratum/algos/blake2/blamka-round-ref.h +++ b/stratum/algos/blake2/blamka-round-ref.h @@ -4,7 +4,7 @@ * Copyright 2015 * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves * - * You may use this work under the terms of a Creative Commons CC0 1.0 + * You may use this work under the terms of a Creative Commons CC0 1.0 * License/Waiver or the Apache Public License 2.0, at your option. The terms of * these licenses can be found at: * @@ -21,7 +21,7 @@ #include "blake2.h" #include "blake2-impl.h" -/*designed by the Lyra PHC team */ +/* designed by the Lyra PHC team */ static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { const uint64_t m = UINT64_C(0xFFFFFFFF); const uint64_t xy = (x & m) * (y & m); @@ -53,4 +53,4 @@ static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { G(v3, v4, v9, v14); \ } while ((void)0, 0) -#endif \ No newline at end of file +#endif diff --git a/stratum/algos/blake2/blamka-round-ref.h.bak b/stratum/algos/blake2/blamka-round-ref.h.bak new file mode 100644 index 000000000..2238959e1 --- /dev/null +++ b/stratum/algos/blake2/blamka-round-ref.h.bak @@ -0,0 +1,56 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef BLAKE_ROUND_MKA_H +#define BLAKE_ROUND_MKA_H + +#include "blake2.h" +#include "blake2-impl.h" + +/*designed by the Lyra PHC team */ +static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { + const uint64_t m = UINT64_C(0xFFFFFFFF); + const uint64_t xy = (x & m) * (y & m); + return x + y + 2 * xy; +} + +#define G(a, b, c, d) \ + do { \ + a = fBlaMka(a, b); \ + d = rotr64(d ^ a, 32); \ + c = fBlaMka(c, d); \ + b = rotr64(b ^ c, 24); \ + a = fBlaMka(a, b); \ + d = rotr64(d ^ a, 16); \ + c = fBlaMka(c, d); \ + b = rotr64(b ^ c, 63); \ + } while ((void)0, 0) + +#define BLAKE2_ROUND_NOMSG(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, \ + v12, v13, v14, v15) \ + do { \ + G(v0, v4, v8, v12); \ + G(v1, v5, v9, v13); \ + G(v2, v6, v10, v14); \ + G(v3, v7, v11, v15); \ + G(v0, v5, v10, v15); \ + G(v1, v6, v11, v12); \ + G(v2, v7, v8, v13); \ + G(v3, v4, v9, v14); \ + } while ((void)0, 0) + +#endif \ No newline at end of file diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 631024133..76147288d 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -18,8 +18,9 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ - argon2a.c blake2/blake2b.c ar2/argon2.c ar2/core.c ar2/encoding.c ar2/opt.c ar2/thread.c ar2/ar2-scrypt-jane.c \ - hive.c pomelo.c hex.c argon2d-dyn.c \ + argon2m.c blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ + hive.c pomelo.c hex.c \ + phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak new file mode 100644 index 000000000..631024133 --- /dev/null +++ b/stratum/algos/makefile.bak @@ -0,0 +1,47 @@ + +CC=gcc + +#CFLAGS=-c -g -I /usr/include/mysql +#LDFLAGS=-g + +CXXFLAGS = -O2 -I.. -march=native +CFLAGS= $(CXXFLAGS) -std=gnu99 +LDFLAGS=-O2 -lgmp + +SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ + c11.c x11.c x12.c x13.c hsr14.c sm3.c x14.c x15.c x17.c x18.c \ + x22i.c SWIFFTX/SWIFFTX.c \ + blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ + deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ + bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ + bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ + scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ + yescrypt.c yescrypt-opt.c sha256_Y.c \ + a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ + argon2a.c blake2/blake2b.c ar2/argon2.c ar2/core.c ar2/encoding.c ar2/opt.c ar2/thread.c ar2/ar2-scrypt-jane.c \ + hive.c pomelo.c hex.c argon2d-dyn.c \ + phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ + yespower.c yespower-opt.c sha256-P.c dedal.c + +OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) +OUTPUT=libalgos.a + +all: $(SOURCES) $(OUTPUT) + +$(OUTPUT): $(OBJECTS) + ar rc $@ $(OBJECTS) + touch ../stratum.cpp + +.cpp.o: + $(CC) $(CXXFLAGS) -c $< -o $@ + +.c.o: + $(CC) $(CFLAGS) -c $< -o $@ + +# $(CC) $(CFLAGS) -std=gnu99 -Wno-pointer-sign -Wno-pointer-to-int-cast -funroll-loops -fvariable-expansion-in-unroller -fmerge-all-constants -fbranch-target-load-optimize2 -fsched2-use-superblocks -falign-loops=16 -falign-functions=16 -falign-jumps=16 -falign-labels=16 -Ofast -flto -fuse-linker-plugin -ftree-loop-if-convert-stores -DUSE_ASM -pg $< + +clean: + rm -f *.o + rm -f ar2/*.o + rm -f blake2/*.o + rm -f SWIFFTX/*.o diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 6e6d5a9cd..df44be761 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -206,8 +206,7 @@ YAAMP_ALGO g_algos[] = {"m7m", m7m_hash, 0x10000, 0, 0}, {"veltor", veltor_hash, 1, 0, 0}, {"velvet", velvet_hash, 0x10000, 0, 0}, - {"argon2", argon2a_hash, 0x10000, 0, sha256_hash_hex }, - {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation + {"argon2m", argon2m_hash, 0x10000, 0, 0}, {"vitalium", vitalium_hash, 1, 0, 0}, {"aergo", aergo_hash, 1, 0, 0}, diff --git a/stratum/stratum.cpp.bak b/stratum/stratum.cpp.bak new file mode 100644 index 000000000..6e6d5a9cd --- /dev/null +++ b/stratum/stratum.cpp.bak @@ -0,0 +1,500 @@ + +#include "stratum.h" +#include +#include + +CommonList g_list_coind; +CommonList g_list_client; +CommonList g_list_job; +CommonList g_list_remote; +CommonList g_list_renter; +CommonList g_list_share; +CommonList g_list_worker; +CommonList g_list_block; +CommonList g_list_submit; +CommonList g_list_source; + +int g_tcp_port; + +char g_tcp_server[1024]; +char g_tcp_password[1024]; + +char g_sql_host[1024]; +char g_sql_database[1024]; +char g_sql_username[1024]; +char g_sql_password[1024]; +int g_sql_port = 3306; + +char g_stratum_coin_include[256]; +char g_stratum_coin_exclude[256]; + +char g_stratum_algo[256]; +double g_stratum_difficulty; +double g_stratum_nicehash_difficulty; +double g_stratum_nicehash_min_diff; +double g_stratum_nicehash_max_diff; +double g_stratum_min_diff; +double g_stratum_max_diff; + +int g_stratum_max_ttf; +int g_stratum_max_cons = 5000; +bool g_stratum_reconnect; +bool g_stratum_renting; +bool g_stratum_segwit = false; + +int g_limit_txs_per_block = 0; + +bool g_handle_haproxy_ips = false; +int g_socket_recv_timeout = 600; + +bool g_debuglog_client; +bool g_debuglog_hash; +bool g_debuglog_socket; +bool g_debuglog_rpc; +bool g_debuglog_list; +bool g_debuglog_remote; + +bool g_autoexchange = true; + +uint64_t g_max_shares = 0; +uint64_t g_shares_counter = 0; +uint64_t g_shares_log = 0; + +bool g_allow_rolltime = true; +time_t g_last_broadcasted = 0; +YAAMP_DB *g_db = NULL; + +pthread_mutex_t g_db_mutex; +pthread_mutex_t g_nonce1_mutex; +pthread_mutex_t g_job_create_mutex; + +struct ifaddrs *g_ifaddr; + +volatile bool g_exiting = false; + +void *stratum_thread(void *p); +void *monitor_thread(void *p); + +//////////////////////////////////////////////////////////////////////////////////////// + +static void scrypt_hash(const char* input, char* output, uint32_t len) +{ + scrypt_1024_1_1_256((unsigned char *)input, (unsigned char *)output); +} + +static void scryptn_hash(const char* input, char* output, uint32_t len) +{ + time_t time_table[][2] = + { + {2048, 1389306217}, + {4096, 1456415081}, + {8192, 1506746729}, + {16384, 1557078377}, + {32768, 1657741673}, + {65536, 1859068265}, + {131072, 2060394857}, + {262144, 1722307603}, + {524288, 1769642992}, + {0, 0}, + }; + + for(int i=0; time_table[i][0]; i++) + if(time(NULL) < time_table[i+1][1]) + { + scrypt_N_R_1_256(input, output, time_table[i][0], 1, len); + return; + } +} + +static void neoscrypt_hash(const char* input, char* output, uint32_t len) +{ + neoscrypt((unsigned char *)input, (unsigned char *)output, 0x80000620); +} + +YAAMP_ALGO g_algos[] = +{ + {"sha256", sha256_double_hash, 1, 0, 0}, + {"scrypt", scrypt_hash, 0x10000, 0, 0}, + {"scryptn", scryptn_hash, 0x10000, 0, 0}, + {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, + + {"c11", c11_hash, 1, 0, 0}, + {"x11", x11_hash, 1, 0, 0}, + {"x12", x12_hash, 1, 0, 0}, + {"x13", x13_hash, 1, 0, 0}, + {"x14", x14_hash, 1, 0, 0}, + {"x15", x15_hash, 1, 0, 0}, + {"x17", x17_hash, 1, 0, 0}, + {"x18", x18_hash, 1, 0, 0}, + {"x20r", x20r_hash, 0x100, 0, 0}, + {"x21s", x21s_hash, 0x100, 0, 0}, + {"x22i", x22i_hash, 1, 0, 0}, + + {"pipe", pipe_hash, 1,0,0}, + + {"x11evo", x11evo_hash, 1, 0, 0}, + {"xevan", xevan_hash, 0x100, 0, 0}, + + {"x16r", x16r_hash, 0x100, 0, 0}, + {"x16s", x16s_hash, 0x100, 0, 0}, + {"x16rt", x16rt_hash, 0x100, 0, 0}, + {"timetravel", timetravel_hash, 0x100, 0, 0}, + {"bitcore", timetravel10_hash, 0x100, 0, 0}, + {"exosis", exosis_hash, 0x100, 0, 0}, + {"hsr", hsr_hash, 1, 0, 0}, + {"hmq1725", hmq17_hash, 0x10000, 0, 0}, + + {"jha", jha_hash, 0x10000, 0}, + + {"allium", allium_hash, 0x100, 0, 0}, + {"lyra2", lyra2re_hash, 0x80, 0, 0}, + {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, + {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, + {"lyra2z", lyra2z_hash, 0x100, 0, 0}, + {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, + {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, + {"bastion", bastion_hash, 1, 0 }, + {"blake", blake_hash, 1, 0 }, + {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, + {"blake2b", blake2b_hash, 1, 0 }, + {"blake2s", blake2s_hash, 1, 0 }, + {"vanilla", blakecoin_hash, 1, 0 }, + {"decred", decred_hash, 1, 0 }, + + {"deep", deep_hash, 1, 0, 0}, + {"dedal", dedal_hash, 0x100, 0, 0}, + {"fresh", fresh_hash, 0x100, 0, 0}, + {"quark", quark_hash, 1, 0, 0}, + {"nist5", nist5_hash, 1, 0, 0}, + {"qubit", qubit_hash, 1, 0, 0}, + {"groestl", groestl_hash, 0x100, 0, sha256_hash_hex }, /* groestlcoin */ + {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ + {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ + {"skein", skein_hash, 1, 0, 0}, + {"sonoa", sonoa_hash, 1, 0, 0}, + {"tribus", tribus_hash, 1, 0, 0}, + {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, + {"keccakc", keccak256_hash, 0x100, 0, 0}, + {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, + + {"phi", phi_hash, 1, 0, 0}, + {"phi2", phi2_hash, 0x100, 0, 0}, + + {"polytimos", polytimos_hash, 1, 0, 0}, + {"skunk", skunk_hash, 1, 0, 0}, + + {"bmw", bmw_hash, 1, 0, 0}, + {"lbk3", lbk3_hash, 0x100, 0, 0}, + {"lbry", lbry_hash, 0x100, 0, 0}, + {"luffa", luffa_hash, 1, 0, 0}, + {"penta", penta_hash, 1, 0, 0}, + {"rainforest", rainforest_hash, 0x100, 0, 0}, + {"skein2", skein2_hash, 1, 0, 0}, + {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, + {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, + {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, + {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, + {"yespower", yespower_hash, 0x10000, 0, 0 }, + {"yespowerR8", yespowerR8_hash, 0x10000, 0, 0 }, + {"yespowerR16", yespowerR16_hash, 0x10000, 0, 0 }, + {"yespowerR24", yespowerR24_hash, 0x10000, 0, 0 }, + {"yespowerR32", yespowerR32_hash, 0x10000, 0, 0 }, + {"zr5", zr5_hash, 1, 0, 0}, + + {"a5a", a5a_hash, 0x10000, 0, 0}, + {"hive", hive_hash, 0x10000, 0, 0}, + {"m7m", m7m_hash, 0x10000, 0, 0}, + {"veltor", veltor_hash, 1, 0, 0}, + {"velvet", velvet_hash, 0x10000, 0, 0}, + {"argon2", argon2a_hash, 0x10000, 0, sha256_hash_hex }, + {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation + {"vitalium", vitalium_hash, 1, 0, 0}, + {"aergo", aergo_hash, 1, 0, 0}, + + {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x + + {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x + + {"sib", sib_hash, 1, 0, 0}, + + {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ + {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ + {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, + + + {"", NULL, 0, 0}, +}; + +YAAMP_ALGO *g_current_algo = NULL; + +YAAMP_ALGO *stratum_find_algo(const char *name) +{ + for(int i=0; g_algos[i].name[0]; i++) + if(!strcmp(name, g_algos[i].name)) + return &g_algos[i]; + + return NULL; +} + +//////////////////////////////////////////////////////////////////////////////////////// + +int main(int argc, char **argv) +{ + if(argc < 2) + { + printf("usage: %s \n", argv[0]); + return 1; + } + + srand(time(NULL)); + getifaddrs(&g_ifaddr); + + initlog(argv[1]); + +#ifdef NO_EXCHANGE + // todo: init with a db setting or a yiimp shell command + g_autoexchange = false; +#endif + + char configfile[1024]; + sprintf(configfile, "%s.conf", argv[1]); + + dictionary *ini = iniparser_load(configfile); + if(!ini) + { + debuglog("cant load config file %s\n", configfile); + return 1; + } + + g_tcp_port = iniparser_getint(ini, "TCP:port", 3333); + strcpy(g_tcp_server, iniparser_getstring(ini, "TCP:server", NULL)); + strcpy(g_tcp_password, iniparser_getstring(ini, "TCP:password", NULL)); + + strcpy(g_sql_host, iniparser_getstring(ini, "SQL:host", NULL)); + strcpy(g_sql_database, iniparser_getstring(ini, "SQL:database", NULL)); + strcpy(g_sql_username, iniparser_getstring(ini, "SQL:username", NULL)); + strcpy(g_sql_password, iniparser_getstring(ini, "SQL:password", NULL)); + g_sql_port = iniparser_getint(ini, "SQL:port", 3306); + + // optional coin filters (to mine only one on a special port or a test instance) + char *coin_filter = iniparser_getstring(ini, "WALLETS:include", NULL); + strcpy(g_stratum_coin_include, coin_filter ? coin_filter : ""); + coin_filter = iniparser_getstring(ini, "WALLETS:exclude", NULL); + strcpy(g_stratum_coin_exclude, coin_filter ? coin_filter : ""); + + strcpy(g_stratum_algo, iniparser_getstring(ini, "STRATUM:algo", NULL)); + g_stratum_difficulty = iniparser_getdouble(ini, "STRATUM:difficulty", 16); + g_stratum_nicehash_difficulty = iniparser_getdouble(ini, "STRATUM:nicehash", 16); + g_stratum_min_diff = iniparser_getdouble(ini, "STRATUM:diff_min", g_stratum_difficulty/2); + g_stratum_max_diff = iniparser_getdouble(ini, "STRATUM:diff_max", g_stratum_difficulty*8192); + g_stratum_nicehash_min_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_min", g_stratum_nicehash_difficulty/2); + g_stratum_nicehash_max_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_max", g_stratum_nicehash_difficulty*8192); + + g_stratum_max_cons = iniparser_getint(ini, "STRATUM:max_cons", 5000); + g_stratum_max_ttf = iniparser_getint(ini, "STRATUM:max_ttf", 0x70000000); + g_stratum_reconnect = iniparser_getint(ini, "STRATUM:reconnect", true); + g_stratum_renting = iniparser_getint(ini, "STRATUM:renting", true); + g_handle_haproxy_ips = iniparser_getint(ini, "STRATUM:haproxy_ips", g_handle_haproxy_ips); + g_socket_recv_timeout = iniparser_getint(ini, "STRATUM:recv_timeout", 600); + + g_max_shares = iniparser_getint(ini, "STRATUM:max_shares", g_max_shares); + g_limit_txs_per_block = iniparser_getint(ini, "STRATUM:max_txs_per_block", 0); + + g_debuglog_client = iniparser_getint(ini, "DEBUGLOG:client", false); + g_debuglog_hash = iniparser_getint(ini, "DEBUGLOG:hash", false); + g_debuglog_socket = iniparser_getint(ini, "DEBUGLOG:socket", false); + g_debuglog_rpc = iniparser_getint(ini, "DEBUGLOG:rpc", false); + g_debuglog_list = iniparser_getint(ini, "DEBUGLOG:list", false); + g_debuglog_remote = iniparser_getint(ini, "DEBUGLOG:remote", false); + + iniparser_freedict(ini); + + g_current_algo = stratum_find_algo(g_stratum_algo); + + if(!g_current_algo) yaamp_error("invalid algo"); + if(!g_current_algo->hash_function) yaamp_error("no hash function"); + +// struct rlimit rlim_files = {0x10000, 0x10000}; +// setrlimit(RLIMIT_NOFILE, &rlim_files); + + struct rlimit rlim_threads = {0x8000, 0x8000}; + setrlimit(RLIMIT_NPROC, &rlim_threads); + + stratumlogdate("starting stratum for %s on %s:%d\n", + g_current_algo->name, g_tcp_server, g_tcp_port); + + // ntime should not be changed by miners for these algos + g_allow_rolltime = strcmp(g_stratum_algo,"x11evo"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"timetravel"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"bitcore"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"exosis"); + if (!g_allow_rolltime) + stratumlog("note: time roll disallowed for %s algo\n", g_current_algo->name); + + g_db = db_connect(); + if(!g_db) yaamp_error("Cant connect database"); + +// db_query(g_db, "update mining set stratumids='loading'"); + + yaamp_create_mutex(&g_db_mutex); + yaamp_create_mutex(&g_nonce1_mutex); + yaamp_create_mutex(&g_job_create_mutex); + + YAAMP_DB *db = db_connect(); + if(!db) yaamp_error("Cant connect database"); + + db_register_stratum(db); + db_update_algos(db); + db_update_coinds(db); + + sleep(2); + job_init(); + +// job_signal(); + + //////////////////////////////////////////////// + + pthread_t thread1; + pthread_create(&thread1, NULL, monitor_thread, NULL); + + pthread_t thread2; + pthread_create(&thread2, NULL, stratum_thread, NULL); + + sleep(20); + + while(!g_exiting) + { + db_register_stratum(db); + db_update_workers(db); + db_update_algos(db); + db_update_coinds(db); + + if(g_stratum_renting) + { + db_update_renters(db); + db_update_remotes(db); + } + + share_write(db); + share_prune(db); + + block_prune(db); + submit_prune(db); + + sleep(1); + job_signal(); + + //////////////////////////////////// + +// source_prune(); + + object_prune(&g_list_coind, coind_delete); + object_prune(&g_list_remote, remote_delete); + object_prune(&g_list_job, job_delete); + object_prune(&g_list_client, client_delete); + object_prune(&g_list_block, block_delete); + object_prune(&g_list_worker, worker_delete); + object_prune(&g_list_share, share_delete); + object_prune(&g_list_submit, submit_delete); + + if (!g_exiting) sleep(20); + } + + stratumlog("closing database...\n"); + db_close(db); + + pthread_join(thread2, NULL); + db_close(g_db); // client threads (called by stratum one) + + closelogs(); + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////// + +void *monitor_thread(void *p) +{ + while(!g_exiting) + { + sleep(120); + + if(g_last_broadcasted + YAAMP_MAXJOBDELAY < time(NULL)) + { + g_exiting = true; + stratumlogdate("%s dead lock, exiting...\n", g_stratum_algo); + exit(1); + } + + if(g_max_shares && g_shares_counter) { + + if((g_shares_counter - g_shares_log) > 10000) { + stratumlogdate("%s %luK shares...\n", g_stratum_algo, (g_shares_counter/1000u)); + g_shares_log = g_shares_counter; + } + + if(g_shares_counter > g_max_shares) { + g_exiting = true; + stratumlogdate("%s need a restart (%lu shares), exiting...\n", g_stratum_algo, (unsigned long) g_max_shares); + exit(1); + } + } + } +} + +/////////////////////////////////////////////////////////////////////////////// + +void *stratum_thread(void *p) +{ + int listen_sock = socket(AF_INET, SOCK_STREAM, 0); + if(listen_sock <= 0) yaamp_error("socket"); + + int optval = 1; + setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval); + + struct sockaddr_in serv; + + serv.sin_family = AF_INET; + serv.sin_addr.s_addr = htonl(INADDR_ANY); + serv.sin_port = htons(g_tcp_port); + + int res = bind(listen_sock, (struct sockaddr*)&serv, sizeof(serv)); + if(res < 0) yaamp_error("bind"); + + res = listen(listen_sock, 4096); + if(res < 0) yaamp_error("listen"); + + ///////////////////////////////////////////////////////////////////////// + + int failcount = 0; + while(!g_exiting) + { + int sock = accept(listen_sock, NULL, NULL); + if(sock <= 0) + { + int error = errno; + stratumlog("%s socket accept() error %d\n", g_stratum_algo, error); + failcount++; + usleep(50000); + if (error == 24 && failcount > 5) { + g_exiting = true; // happen when max open files is reached (see ulimit) + stratumlogdate("%s too much socket failure, exiting...\n", g_stratum_algo); + exit(error); + } + continue; + } + + failcount = 0; + pthread_t thread; + int res = pthread_create(&thread, NULL, client_thread, (void *)(long)sock); + if(res != 0) + { + int error = errno; + close(sock); + g_exiting = true; + stratumlog("%s pthread_create error %d %d\n", g_stratum_algo, res, error); + } + + pthread_detach(thread); + } +} diff --git a/stratum/stratum.h b/stratum/stratum.h index b5174c2ed..b3d009d2a 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -220,11 +220,10 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/tribus.h" #include "algos/veltor.h" #include "algos/velvet.h" -#include "algos/argon2a.h" +#include "algos/argon2m.h" #include "algos/vitalium.h" #include "algos/aergo.h" #include "algos/hex.h" -#include "algos/argon2d-dyn.h" #include "algos/exosis.h" #include "algos/pipehash.h" #include "algos/gltalgos.h" diff --git a/stratum/stratum.h.bak b/stratum/stratum.h.bak new file mode 100644 index 000000000..b5174c2ed --- /dev/null +++ b/stratum/stratum.h.bak @@ -0,0 +1,230 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; + +#include "iniparser/src/iniparser.h" + +#include "json.h" +#include "util.h" + +#define YAAMP_RESTARTDELAY (24*60*60) +#define YAAMP_MAXJOBDELAY (2*60) +#define CURL_RPC_TIMEOUT (30) + +#define YAAMP_MS 1000 +#define YAAMP_SEC 1000000 + +#define YAAMP_MAXALGOS 32 + +typedef void (*YAAMP_HASH_FUNCTION)(const char *, char *, uint32_t); + +#define YAAMP_SHAREPERSEC 10 + +#define YAAMP_MINDIFF 0x0000000080000000 +#define YAAMP_MAXDIFF 0x4000000000000000 + +#define YAAMP_SMALLBUFSIZE (32*1024) + +#define YAAMP_NONCE_SIZE 4 +#define YAAMP_EXTRANONCE2_SIZE 4 + +#define YAAMP_HASHLEN_STR 65 +#define YAAMP_HASHLEN_BIN 32 + +extern CommonList g_list_coind; +extern CommonList g_list_client; +extern CommonList g_list_job; +extern CommonList g_list_remote; +extern CommonList g_list_renter; +extern CommonList g_list_share; +extern CommonList g_list_worker; +extern CommonList g_list_block; +extern CommonList g_list_submit; +extern CommonList g_list_source; + +extern int g_tcp_port; + +extern char g_tcp_server[1024]; +extern char g_tcp_password[1024]; + +extern char g_sql_host[1024]; +extern char g_sql_database[1024]; +extern char g_sql_username[1024]; +extern char g_sql_password[1024]; +extern int g_sql_port; + +extern char g_stratum_coin_include[256]; +extern char g_stratum_coin_exclude[256]; + +extern char g_stratum_algo[256]; +extern double g_stratum_difficulty; +extern double g_stratum_min_diff; +extern double g_stratum_max_diff; +extern double g_stratum_nicehash_difficulty; +extern double g_stratum_nicehash_min_diff; +extern double g_stratum_nicehash_max_diff; + +extern int g_stratum_max_cons; +extern int g_stratum_max_ttf; +extern bool g_stratum_reconnect; +extern bool g_stratum_renting; +extern bool g_stratum_segwit; +extern int g_limit_txs_per_block; + +extern bool g_handle_haproxy_ips; +extern int g_socket_recv_timeout; + +extern bool g_debuglog_client; +extern bool g_debuglog_hash; +extern bool g_debuglog_socket; +extern bool g_debuglog_rpc; +extern bool g_debuglog_list; +extern bool g_debuglog_remote; + +extern uint64_t g_max_shares; +extern uint64_t g_shares_counter; + +extern bool g_allow_rolltime; +extern time_t g_last_broadcasted; + +extern struct ifaddrs *g_ifaddr; + +extern pthread_mutex_t g_db_mutex; +extern pthread_mutex_t g_nonce1_mutex; +extern pthread_mutex_t g_job_create_mutex; + +extern volatile bool g_exiting; + +#include "db.h" +#include "object.h" +#include "socket.h" +#include "client.h" +#include "rpc.h" +#include "job.h" +#include "coind.h" +#include "remote.h" +#include "share.h" + +extern YAAMP_DB *g_db; +extern YAAMP_ALGO g_algos[]; +extern YAAMP_ALGO *g_current_algo; + +extern bool g_autoexchange; + +///////////////////////////////////////////////////////////////////////////////////////// + +YAAMP_ALGO *stratum_find_algo(const char *name); + +extern "C" +{ +void sha256_hash(const char *input, char *output, unsigned int len); +void sha256_double_hash(const char *input, char *output, unsigned int len); + +void scrypt_1024_1_1_256(const unsigned char *input, unsigned char *output); +void scrypt_N_R_1_256(const char* input, char* output, uint32_t N, uint32_t R, uint32_t len); +} + +void sha256_hash_hex(const char *input, char *output, unsigned int len); +void sha256_double_hash_hex(const char *input, char *output, unsigned int len); + +#include "algos/a5a.h" +#include "algos/c11.h" +#include "algos/x11.h" +#include "algos/x11evo.h" +#include "algos/x12.h" +#include "algos/x13.h" +#include "algos/x14.h" +#include "algos/x15.h" +#include "algos/x16r.h" +#include "algos/x16rt.h" +#include "algos/x16s.h" +#include "algos/x17.h" +#include "algos/x18.h" +#include "algos/x20r.h" +#include "algos/x21s.h" +#include "algos/x22i.h" +#include "algos/xevan.h" +#include "algos/hmq17.h" +#include "algos/nist5.h" +#include "algos/fresh.h" +#include "algos/hsr14.h" +#include "algos/quark.h" +#include "algos/neoscrypt.h" +#include "algos/allium.h" +#include "algos/lyra2re.h" +#include "algos/lyra2v2.h" +#include "algos/lyra2z.h" +#include "algos/lyra2vc0ban.h" +#include "algos/lyra2v3.h" +#include "algos/lyra2zz.h" +#include "algos/blake.h" +#include "algos/blakecoin.h" +#include "algos/blake2b.h" +#include "algos/blake2s.h" +#include "algos/qubit.h" +#include "algos/groestl.h" +#include "algos/jha.h" +#include "algos/skein.h" +#include "algos/keccak.h" +#include "algos/sha256t.h" +#include "algos/sha256q.h" +#include "algos/skunk.h" +#include "algos/timetravel.h" +#include "algos/bitcore.h" + +#include "algos/bastion.h" +#include "algos/bmw.h" +#include "algos/deep.h" +#include "algos/dedal.h" +#include "algos/lbk3.h" +#include "algos/lbry.h" +#include "algos/luffa.h" +#include "algos/pentablake.h" +#include "algos/rainforest.h" +#include "algos/whirlpool.h" +#include "algos/whirlpoolx.h" +#include "algos/skein2.h" +#include "algos/yescrypt.h" +#include "algos/yespower.h" +#include "algos/zr5.h" +#include "algos/hive.h" +#include "algos/sib.h" +#include "algos/m7m.h" +#include "algos/phi.h" +#include "algos/phi2.h" +#include "algos/polytimos.h" +#include "algos/sonoa.h" +#include "algos/tribus.h" +#include "algos/veltor.h" +#include "algos/velvet.h" +#include "algos/argon2a.h" +#include "algos/vitalium.h" +#include "algos/aergo.h" +#include "algos/hex.h" +#include "algos/argon2d-dyn.h" +#include "algos/exosis.h" +#include "algos/pipehash.h" +#include "algos/gltalgos.h" From b5469d5eb994587860e4f8e7e92af76a8674cf73 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sun, 17 Feb 2019 21:13:25 -0500 Subject: [PATCH 276/576] update update --- stratum/algos/argon2d/argon2.c | 458 +++++++++++++++++++++ stratum/algos/argon2d/argon2.h | 442 ++++++++++++++++++++ stratum/algos/argon2d/core.c | 635 +++++++++++++++++++++++++++++ stratum/algos/argon2d/core.h | 228 +++++++++++ stratum/algos/argon2d/encoding.c | 463 +++++++++++++++++++++ stratum/algos/argon2d/encoding.h | 57 +++ stratum/algos/argon2d/opt.c | 359 ++++++++++++++++ stratum/algos/argon2d/thread.c | 57 +++ stratum/algos/argon2d/thread.h | 67 +++ stratum/algos/argon2m.c | 37 ++ stratum/algos/argon2m.h | 11 + stratum/config.sample/argon2m.conf | 16 + 12 files changed, 2830 insertions(+) create mode 100644 stratum/algos/argon2d/argon2.c create mode 100644 stratum/algos/argon2d/argon2.h create mode 100644 stratum/algos/argon2d/core.c create mode 100644 stratum/algos/argon2d/core.h create mode 100644 stratum/algos/argon2d/encoding.c create mode 100644 stratum/algos/argon2d/encoding.h create mode 100644 stratum/algos/argon2d/opt.c create mode 100644 stratum/algos/argon2d/thread.c create mode 100644 stratum/algos/argon2d/thread.h create mode 100644 stratum/algos/argon2m.c create mode 100644 stratum/algos/argon2m.h create mode 100644 stratum/config.sample/argon2m.conf diff --git a/stratum/algos/argon2d/argon2.c b/stratum/algos/argon2d/argon2.c new file mode 100644 index 000000000..5eabe35dc --- /dev/null +++ b/stratum/algos/argon2d/argon2.c @@ -0,0 +1,458 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#include +#include +#include + +#include "argon2.h" +#include "encoding.h" +#include "core.h" + +const char *argon2_type2string(argon2_type type, int uppercase) { + switch (type) { + case Argon2_d: + return uppercase ? "Argon2d" : "argon2d"; + case Argon2_i: + return uppercase ? "Argon2i" : "argon2i"; + case Argon2_id: + return uppercase ? "Argon2id" : "argon2id"; + } + + return NULL; +} + +int argon2_ctx(argon2_context *context, argon2_type type) { + /* 1. Validate all inputs */ + int result = validate_inputs(context); + uint32_t memory_blocks, segment_length; + argon2_instance_t instance; + + if (ARGON2_OK != result) { + return result; + } + + if (Argon2_d != type && Argon2_i != type && Argon2_id != type) { + return ARGON2_INCORRECT_TYPE; + } + + /* 2. Align memory size */ + /* Minimum memory_blocks = 8L blocks, where L is the number of lanes */ + memory_blocks = context->m_cost; + + if (memory_blocks < 2 * ARGON2_SYNC_POINTS * context->lanes) { + memory_blocks = 2 * ARGON2_SYNC_POINTS * context->lanes; + } + + segment_length = memory_blocks / (context->lanes * ARGON2_SYNC_POINTS); + /* Ensure that all segments have equal length */ + memory_blocks = segment_length * (context->lanes * ARGON2_SYNC_POINTS); + + instance.version = context->version; + instance.memory = NULL; + instance.passes = context->t_cost; + instance.memory_blocks = memory_blocks; + instance.segment_length = segment_length; + instance.lane_length = segment_length * ARGON2_SYNC_POINTS; + instance.lanes = context->lanes; + instance.threads = context->threads; + instance.type = type; + + if (instance.threads > instance.lanes) { + instance.threads = instance.lanes; + } + + /* 3. Initialization: Hashing inputs, allocating memory, filling first + * blocks + */ + result = initialize(&instance, context); + + if (ARGON2_OK != result) { + return result; + } + + /* 4. Filling memory */ + result = fill_memory_blocks(&instance); + + if (ARGON2_OK != result) { + return result; + } + /* 5. Finalization */ + finalize(context, &instance); + + return ARGON2_OK; +} + +int argon2_hash(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, const size_t saltlen, + void *hash, const size_t hashlen, char *encoded, + const size_t encodedlen, argon2_type type, + const uint32_t version){ + + argon2_context context; + int result; + uint8_t *out; + + if (pwdlen > ARGON2_MAX_PWD_LENGTH) { + return ARGON2_PWD_TOO_LONG; + } + + if (saltlen > ARGON2_MAX_SALT_LENGTH) { + return ARGON2_SALT_TOO_LONG; + } + + if (hashlen > ARGON2_MAX_OUTLEN) { + return ARGON2_OUTPUT_TOO_LONG; + } + + if (hashlen < ARGON2_MIN_OUTLEN) { + return ARGON2_OUTPUT_TOO_SHORT; + } + + out = malloc(hashlen); + if (!out) { + return ARGON2_MEMORY_ALLOCATION_ERROR; + } + + context.out = (uint8_t *)out; + context.outlen = (uint32_t)hashlen; + context.pwd = CONST_CAST(uint8_t *)pwd; + context.pwdlen = (uint32_t)pwdlen; + context.salt = CONST_CAST(uint8_t *)salt; + context.saltlen = (uint32_t)saltlen; + context.secret = NULL; + context.secretlen = 0; + context.ad = NULL; + context.adlen = 0; + context.t_cost = t_cost; + context.m_cost = m_cost; + context.lanes = parallelism; + context.threads = parallelism; + context.allocate_cbk = NULL; + context.free_cbk = NULL; + context.flags = ARGON2_DEFAULT_FLAGS; + context.version = version; + + result = argon2_ctx(&context, type); + + if (result != ARGON2_OK) { + clear_internal_memory(out, hashlen); + free(out); + return result; + } + + /* if raw hash requested, write it */ + if (hash) { + memcpy(hash, out, hashlen); + } + + /* if encoding requested, write it */ + if (encoded && encodedlen) { + if (encode_string(encoded, encodedlen, &context, type) != ARGON2_OK) { + clear_internal_memory(out, hashlen); /* wipe buffers if error */ + clear_internal_memory(encoded, encodedlen); + free(out); + return ARGON2_ENCODING_FAIL; + } + } + clear_internal_memory(out, hashlen); + free(out); + + return ARGON2_OK; +} + +int argon2i_hash_encoded(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, const size_t hashlen, + char *encoded, const size_t encodedlen, + const uint32_t version) { + + return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, + NULL, hashlen, encoded, encodedlen, Argon2_i, + version ); +} + +int argon2i_hash_raw(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, void *hash, const size_t hashlen, + const uint32_t version ) { + + return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, + hash, hashlen, NULL, 0, Argon2_i, version ); +} + +int argon2d_hash_encoded(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, const size_t hashlen, + char *encoded, const size_t encodedlen, + const uint32_t version ) { + + return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, + NULL, hashlen, encoded, encodedlen, Argon2_d, + version ); +} + +int argon2d_hash_raw(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, void *hash, const size_t hashlen, + const uint32_t version ) { + + return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, + hash, hashlen, NULL, 0, Argon2_d, version ); +} + +int argon2id_hash_encoded(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, const size_t hashlen, + char *encoded, const size_t encodedlen, + const uint32_t version ) { + + return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, + NULL, hashlen, encoded, encodedlen, Argon2_id, + version); +} + +int argon2id_hash_raw(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, void *hash, const size_t hashlen, + const uint32_t version ) { + return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, + hash, hashlen, NULL, 0, Argon2_id, version ); +} + +static int argon2_compare(const uint8_t *b1, const uint8_t *b2, size_t len) { + size_t i; + uint8_t d = 0U; + + for (i = 0U; i < len; i++) { + d |= b1[i] ^ b2[i]; + } + return (int)((1 & ((d - 1) >> 8)) - 1); +} + +int argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen, + argon2_type type) { + + argon2_context ctx; + uint8_t *desired_result = NULL; + + int ret = ARGON2_OK; + + size_t encoded_len; + uint32_t max_field_len; + + if (pwdlen > ARGON2_MAX_PWD_LENGTH) { + return ARGON2_PWD_TOO_LONG; + } + + if (encoded == NULL) { + return ARGON2_DECODING_FAIL; + } + + encoded_len = strlen(encoded); + if (encoded_len > UINT32_MAX) { + return ARGON2_DECODING_FAIL; + } + + /* No field can be longer than the encoded length */ + max_field_len = (uint32_t)encoded_len; + + ctx.saltlen = max_field_len; + ctx.outlen = max_field_len; + + ctx.salt = malloc(ctx.saltlen); + ctx.out = malloc(ctx.outlen); + if (!ctx.salt || !ctx.out) { + ret = ARGON2_MEMORY_ALLOCATION_ERROR; + goto fail; + } + + ctx.pwd = (uint8_t *)pwd; + ctx.pwdlen = (uint32_t)pwdlen; + + ret = decode_string(&ctx, encoded, type); + if (ret != ARGON2_OK) { + goto fail; + } + + /* Set aside the desired result, and get a new buffer. */ + desired_result = ctx.out; + ctx.out = malloc(ctx.outlen); + if (!ctx.out) { + ret = ARGON2_MEMORY_ALLOCATION_ERROR; + goto fail; + } + + ret = argon2_verify_ctx(&ctx, (char *)desired_result, type); + if (ret != ARGON2_OK) { + goto fail; + } + +fail: + free(ctx.salt); + free(ctx.out); + free(desired_result); + + return ret; +} + +int argon2i_verify(const char *encoded, const void *pwd, const size_t pwdlen) { + + return argon2_verify(encoded, pwd, pwdlen, Argon2_i); +} + +int argon2d_verify(const char *encoded, const void *pwd, const size_t pwdlen) { + + return argon2_verify(encoded, pwd, pwdlen, Argon2_d); +} + +int argon2id_verify(const char *encoded, const void *pwd, const size_t pwdlen) { + + return argon2_verify(encoded, pwd, pwdlen, Argon2_id); +} + +int argon2d_ctx(argon2_context *context) { + return argon2_ctx(context, Argon2_d); +} + +int argon2i_ctx(argon2_context *context) { + return argon2_ctx(context, Argon2_i); +} + +int argon2id_ctx(argon2_context *context) { + return argon2_ctx(context, Argon2_id); +} + +int argon2_verify_ctx(argon2_context *context, const char *hash, + argon2_type type) { + int ret = argon2_ctx(context, type); + if (ret != ARGON2_OK) { + return ret; + } + + if (argon2_compare((uint8_t *)hash, context->out, context->outlen)) { + return ARGON2_VERIFY_MISMATCH; + } + + return ARGON2_OK; +} + +int argon2d_verify_ctx(argon2_context *context, const char *hash) { + return argon2_verify_ctx(context, hash, Argon2_d); +} + +int argon2i_verify_ctx(argon2_context *context, const char *hash) { + return argon2_verify_ctx(context, hash, Argon2_i); +} + +int argon2id_verify_ctx(argon2_context *context, const char *hash) { + return argon2_verify_ctx(context, hash, Argon2_id); +} + +const char *argon2_error_message(int error_code) { + switch (error_code) { + case ARGON2_OK: + return "OK"; + case ARGON2_OUTPUT_PTR_NULL: + return "Output pointer is NULL"; + case ARGON2_OUTPUT_TOO_SHORT: + return "Output is too short"; + case ARGON2_OUTPUT_TOO_LONG: + return "Output is too long"; + case ARGON2_PWD_TOO_SHORT: + return "Password is too short"; + case ARGON2_PWD_TOO_LONG: + return "Password is too long"; + case ARGON2_SALT_TOO_SHORT: + return "Salt is too short"; + case ARGON2_SALT_TOO_LONG: + return "Salt is too long"; + case ARGON2_AD_TOO_SHORT: + return "Associated data is too short"; + case ARGON2_AD_TOO_LONG: + return "Associated data is too long"; + case ARGON2_SECRET_TOO_SHORT: + return "Secret is too short"; + case ARGON2_SECRET_TOO_LONG: + return "Secret is too long"; + case ARGON2_TIME_TOO_SMALL: + return "Time cost is too small"; + case ARGON2_TIME_TOO_LARGE: + return "Time cost is too large"; + case ARGON2_MEMORY_TOO_LITTLE: + return "Memory cost is too small"; + case ARGON2_MEMORY_TOO_MUCH: + return "Memory cost is too large"; + case ARGON2_LANES_TOO_FEW: + return "Too few lanes"; + case ARGON2_LANES_TOO_MANY: + return "Too many lanes"; + case ARGON2_PWD_PTR_MISMATCH: + return "Password pointer is NULL, but password length is not 0"; + case ARGON2_SALT_PTR_MISMATCH: + return "Salt pointer is NULL, but salt length is not 0"; + case ARGON2_SECRET_PTR_MISMATCH: + return "Secret pointer is NULL, but secret length is not 0"; + case ARGON2_AD_PTR_MISMATCH: + return "Associated data pointer is NULL, but ad length is not 0"; + case ARGON2_MEMORY_ALLOCATION_ERROR: + return "Memory allocation error"; + case ARGON2_FREE_MEMORY_CBK_NULL: + return "The free memory callback is NULL"; + case ARGON2_ALLOCATE_MEMORY_CBK_NULL: + return "The allocate memory callback is NULL"; + case ARGON2_INCORRECT_PARAMETER: + return "Argon2_Context context is NULL"; + case ARGON2_INCORRECT_TYPE: + return "There is no such version of Argon2"; + case ARGON2_OUT_PTR_MISMATCH: + return "Output pointer mismatch"; + case ARGON2_THREADS_TOO_FEW: + return "Not enough threads"; + case ARGON2_THREADS_TOO_MANY: + return "Too many threads"; + case ARGON2_MISSING_ARGS: + return "Missing arguments"; + case ARGON2_ENCODING_FAIL: + return "Encoding failed"; + case ARGON2_DECODING_FAIL: + return "Decoding failed"; + case ARGON2_THREAD_FAIL: + return "Threading failure"; + case ARGON2_DECODING_LENGTH_FAIL: + return "Some of encoded parameters are too long or too short"; + case ARGON2_VERIFY_MISMATCH: + return "The password does not match the supplied hash"; + default: + return "Unknown error code"; + } +} +/* +size_t argon2_encodedlen(uint32_t t_cost, uint32_t m_cost, uint32_t parallelism, + uint32_t saltlen, uint32_t hashlen, argon2_type type) { + return strlen("$$v=$m=,t=,p=$$") + strlen(argon2_type2string(type, 0)) + + numlen(t_cost) + numlen(m_cost) + numlen(parallelism) + + b64len(saltlen) + b64len(hashlen) + numlen(ARGON2_VERSION_NUMBER) + 1; +} +*/ diff --git a/stratum/algos/argon2d/argon2.h b/stratum/algos/argon2d/argon2.h new file mode 100644 index 000000000..6e7e98b19 --- /dev/null +++ b/stratum/algos/argon2d/argon2.h @@ -0,0 +1,442 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef ARGON2_H +#define ARGON2_H + +#include +#include +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +/* Symbols visibility control */ +#ifdef A2_VISCTL +#define ARGON2_PUBLIC __attribute__((visibility("default"))) +#define ARGON2_LOCAL __attribute__ ((visibility ("hidden"))) +#elif _MSC_VER +#define ARGON2_PUBLIC __declspec(dllexport) +#define ARGON2_LOCAL +#else +#define ARGON2_PUBLIC +#define ARGON2_LOCAL +#endif + +/* + * Argon2 input parameter restrictions + */ + +/* Minimum and maximum number of lanes (degree of parallelism) */ +#define ARGON2_MIN_LANES UINT32_C(1) +#define ARGON2_MAX_LANES UINT32_C(0xFFFFFF) + +/* Minimum and maximum number of threads */ +#define ARGON2_MIN_THREADS UINT32_C(1) +#define ARGON2_MAX_THREADS UINT32_C(0xFFFFFF) + +/* Number of synchronization points between lanes per pass */ +#define ARGON2_SYNC_POINTS UINT32_C(4) + +/* Minimum and maximum digest size in bytes */ +#define ARGON2_MIN_OUTLEN UINT32_C(4) +#define ARGON2_MAX_OUTLEN UINT32_C(0xFFFFFFFF) + +/* Minimum and maximum number of memory blocks (each of BLOCK_SIZE bytes) */ +#define ARGON2_MIN_MEMORY UINT32_C(1) +/* #define ARGON2_MIN_MEMORY (2 * ARGON2_SYNC_POINTS) */ /* 2 blocks per slice */ + + +#define ARGON2_MIN(a, b) ((a) < (b) ? (a) : (b)) +/* Max memory size is addressing-space/2, topping at 2^32 blocks (4 TB) */ +#define ARGON2_MAX_MEMORY_BITS \ + ARGON2_MIN(UINT32_C(32), (sizeof(void *) * CHAR_BIT - 10 - 1)) +#define ARGON2_MAX_MEMORY \ + ARGON2_MIN(UINT32_C(0xFFFFFFFF), UINT64_C(1) << ARGON2_MAX_MEMORY_BITS) + +/* Minimum and maximum number of passes */ +#define ARGON2_MIN_TIME UINT32_C(1) +#define ARGON2_MAX_TIME UINT32_C(0xFFFFFFFF) + +/* Minimum and maximum password length in bytes */ +#define ARGON2_MIN_PWD_LENGTH UINT32_C(0) +#define ARGON2_MAX_PWD_LENGTH UINT32_C(0xFFFFFFFF) + +/* Minimum and maximum associated data length in bytes */ +#define ARGON2_MIN_AD_LENGTH UINT32_C(0) +#define ARGON2_MAX_AD_LENGTH UINT32_C(0xFFFFFFFF) + +/* Minimum and maximum salt length in bytes */ +#define ARGON2_MIN_SALT_LENGTH UINT32_C(0) +#define ARGON2_MAX_SALT_LENGTH UINT32_C(0xFFFFFFFF) + +/* Minimum and maximum key length in bytes */ +#define ARGON2_MIN_SECRET UINT32_C(0) +#define ARGON2_MAX_SECRET UINT32_C(0xFFFFFFFF) + +/* Flags to determine which fields are securely wiped (default = no wipe). */ +#define ARGON2_DEFAULT_FLAGS UINT32_C(0) +#define ARGON2_FLAG_CLEAR_PASSWORD (UINT32_C(1) << 0) +#define ARGON2_FLAG_CLEAR_SECRET (UINT32_C(1) << 1) + +/* Global flag to determine if we are wiping internal memory buffers. This flag + * is defined in core.c and deafults to 1 (wipe internal memory). */ +extern int FLAG_clear_internal_memory; + +/* Error codes */ +typedef enum Argon2_ErrorCodes { + ARGON2_OK = 0, + + ARGON2_OUTPUT_PTR_NULL = -1, + + ARGON2_OUTPUT_TOO_SHORT = -2, + ARGON2_OUTPUT_TOO_LONG = -3, + + ARGON2_PWD_TOO_SHORT = -4, + ARGON2_PWD_TOO_LONG = -5, + + ARGON2_SALT_TOO_SHORT = -6, + ARGON2_SALT_TOO_LONG = -7, + + ARGON2_AD_TOO_SHORT = -8, + ARGON2_AD_TOO_LONG = -9, + + ARGON2_SECRET_TOO_SHORT = -10, + ARGON2_SECRET_TOO_LONG = -11, + + ARGON2_TIME_TOO_SMALL = -12, + ARGON2_TIME_TOO_LARGE = -13, + + ARGON2_MEMORY_TOO_LITTLE = -14, + ARGON2_MEMORY_TOO_MUCH = -15, + + ARGON2_LANES_TOO_FEW = -16, + ARGON2_LANES_TOO_MANY = -17, + + ARGON2_PWD_PTR_MISMATCH = -18, /* NULL ptr with non-zero length */ + ARGON2_SALT_PTR_MISMATCH = -19, /* NULL ptr with non-zero length */ + ARGON2_SECRET_PTR_MISMATCH = -20, /* NULL ptr with non-zero length */ + ARGON2_AD_PTR_MISMATCH = -21, /* NULL ptr with non-zero length */ + + ARGON2_MEMORY_ALLOCATION_ERROR = -22, + + ARGON2_FREE_MEMORY_CBK_NULL = -23, + ARGON2_ALLOCATE_MEMORY_CBK_NULL = -24, + + ARGON2_INCORRECT_PARAMETER = -25, + ARGON2_INCORRECT_TYPE = -26, + + ARGON2_OUT_PTR_MISMATCH = -27, + + ARGON2_THREADS_TOO_FEW = -28, + ARGON2_THREADS_TOO_MANY = -29, + + ARGON2_MISSING_ARGS = -30, + + ARGON2_ENCODING_FAIL = -31, + + ARGON2_DECODING_FAIL = -32, + + ARGON2_THREAD_FAIL = -33, + + ARGON2_DECODING_LENGTH_FAIL = -34, + + ARGON2_VERIFY_MISMATCH = -35 +} argon2_error_codes; + +/* Memory allocator types --- for external allocation */ +typedef int (*allocate_fptr)(uint8_t **memory, size_t bytes_to_allocate); +typedef void (*deallocate_fptr)(uint8_t *memory, size_t bytes_to_allocate); + +/* Argon2 external data structures */ + +/* + ***** + * Context: structure to hold Argon2 inputs: + * output array and its length, + * password and its length, + * salt and its length, + * secret and its length, + * associated data and its length, + * number of passes, amount of used memory (in KBytes, can be rounded up a bit) + * number of parallel threads that will be run. + * All the parameters above affect the output hash value. + * Additionally, two function pointers can be provided to allocate and + * deallocate the memory (if NULL, memory will be allocated internally). + * Also, three flags indicate whether to erase password, secret as soon as they + * are pre-hashed (and thus not needed anymore), and the entire memory + ***** + * Simplest situation: you have output array out[8], password is stored in + * pwd[32], salt is stored in salt[16], you do not have keys nor associated + * data. You need to spend 1 GB of RAM and you run 5 passes of Argon2d with + * 4 parallel lanes. + * You want to erase the password, but you're OK with last pass not being + * erased. You want to use the default memory allocator. + * Then you initialize: + Argon2_Context(out,8,pwd,32,salt,16,NULL,0,NULL,0,5,1<<20,4,4,NULL,NULL,true,false,false,false) + */ +typedef struct Argon2_Context { + uint8_t *out; /* output array */ + uint32_t outlen; /* digest length */ + + uint8_t *pwd; /* password array */ + uint32_t pwdlen; /* password length */ + + uint8_t *salt; /* salt array */ + uint32_t saltlen; /* salt length */ + + uint8_t *secret; /* key array */ + uint32_t secretlen; /* key length */ + + uint8_t *ad; /* associated data array */ + uint32_t adlen; /* associated data length */ + + uint32_t t_cost; /* number of passes */ + uint32_t m_cost; /* amount of memory requested (KB) */ + uint32_t lanes; /* number of lanes */ + uint32_t threads; /* maximum number of threads */ + + uint32_t version; /* version number */ + + allocate_fptr allocate_cbk; /* pointer to memory allocator */ + deallocate_fptr free_cbk; /* pointer to memory deallocator */ + + uint32_t flags; /* array of bool options */ +} argon2_context; + +/* Argon2 primitive type */ +typedef enum Argon2_type { + Argon2_d = 0, + Argon2_i = 1, + Argon2_id = 2 +} argon2_type; + +/* Version of the algorithm */ +#define ARGON2_VERSION_10 0x10 +#define ARGON2_VERSION_13 0x13 + +/* + * Function that gives the string representation of an argon2_type. + * @param type The argon2_type that we want the string for + * @param uppercase Whether the string should have the first letter uppercase + * @return NULL if invalid type, otherwise the string representation. + */ +ARGON2_PUBLIC const char *argon2_type2string(argon2_type type, int uppercase); + +/* + * Function that performs memory-hard hashing with certain degree of parallelism + * @param context Pointer to the Argon2 internal structure + * @return Error code if smth is wrong, ARGON2_OK otherwise + */ +ARGON2_PUBLIC int argon2_ctx(argon2_context *context, argon2_type type); + +/** + * Hashes a password with Argon2i, producing an encoded hash + * @param t_cost Number of iterations + * @param m_cost Sets memory usage to m_cost kibibytes + * @param parallelism Number of threads and compute lanes + * @param pwd Pointer to password + * @param pwdlen Password size in bytes + * @param salt Pointer to salt + * @param saltlen Salt size in bytes + * @param hashlen Desired length of the hash in bytes + * @param encoded Buffer where to write the encoded hash + * @param encodedlen Size of the buffer (thus max size of the encoded hash) + * @pre Different parallelism levels will give different results + * @pre Returns ARGON2_OK if successful + */ +ARGON2_PUBLIC int argon2i_hash_encoded(const uint32_t t_cost, + const uint32_t m_cost, + const uint32_t parallelism, + const void *pwd, const size_t pwdlen, + const void *salt, const size_t saltlen, + const size_t hashlen, char *encoded, + const size_t encodedlen, + const uint32_t version ); + +/** + * Hashes a password with Argon2i, producing a raw hash at @hash + * @param t_cost Number of iterations + * @param m_cost Sets memory usage to m_cost kibibytes + * @param parallelism Number of threads and compute lanes + * @param pwd Pointer to password + * @param pwdlen Password size in bytes + * @param salt Pointer to salt + * @param saltlen Salt size in bytes + * @param hash Buffer where to write the raw hash - updated by the function + * @param hashlen Desired length of the hash in bytes + * @pre Different parallelism levels will give different results + * @pre Returns ARGON2_OK if successful + */ +ARGON2_PUBLIC int argon2i_hash_raw(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, void *hash, + const size_t hashlen, + const uint32_t version ); + +ARGON2_PUBLIC int argon2d_hash_encoded(const uint32_t t_cost, + const uint32_t m_cost, + const uint32_t parallelism, + const void *pwd, const size_t pwdlen, + const void *salt, const size_t saltlen, + const size_t hashlen, char *encoded, + const size_t encodedlen, + const uint32_t version ); + +ARGON2_PUBLIC int argon2d_hash_raw(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, void *hash, + const size_t hashlen, + const uint32_t version ); + +ARGON2_PUBLIC int argon2id_hash_encoded(const uint32_t t_cost, + const uint32_t m_cost, + const uint32_t parallelism, + const void *pwd, const size_t pwdlen, + const void *salt, const size_t saltlen, + const size_t hashlen, char *encoded, + const size_t encodedlen, + const uint32_t version ); + +ARGON2_PUBLIC int argon2id_hash_raw(const uint32_t t_cost, + const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, void *hash, + const size_t hashlen, + const uint32_t version ); + +/* generic function underlying the above ones */ +ARGON2_PUBLIC int argon2_hash(const uint32_t t_cost, const uint32_t m_cost, + const uint32_t parallelism, const void *pwd, + const size_t pwdlen, const void *salt, + const size_t saltlen, void *hash, + const size_t hashlen, char *encoded, + const size_t encodedlen, argon2_type type, + const uint32_t version ); + +/** + * Verifies a password against an encoded string + * Encoded string is restricted as in validate_inputs() + * @param encoded String encoding parameters, salt, hash + * @param pwd Pointer to password + * @pre Returns ARGON2_OK if successful + */ +ARGON2_PUBLIC int argon2i_verify(const char *encoded, const void *pwd, + const size_t pwdlen); + +ARGON2_PUBLIC int argon2d_verify(const char *encoded, const void *pwd, + const size_t pwdlen); + +ARGON2_PUBLIC int argon2id_verify(const char *encoded, const void *pwd, + const size_t pwdlen); + +/* generic function underlying the above ones */ +ARGON2_PUBLIC int argon2_verify(const char *encoded, const void *pwd, + const size_t pwdlen, argon2_type type); + +/** + * Argon2d: Version of Argon2 that picks memory blocks depending + * on the password and salt. Only for side-channel-free + * environment!! + ***** + * @param context Pointer to current Argon2 context + * @return Zero if successful, a non zero error code otherwise + */ +ARGON2_PUBLIC int argon2d_ctx(argon2_context *context); + +/** + * Argon2i: Version of Argon2 that picks memory blocks + * independent on the password and salt. Good for side-channels, + * but worse w.r.t. tradeoff attacks if only one pass is used. + ***** + * @param context Pointer to current Argon2 context + * @return Zero if successful, a non zero error code otherwise + */ +ARGON2_PUBLIC int argon2i_ctx(argon2_context *context); + +/** + * Argon2id: Version of Argon2 where the first half-pass over memory is + * password-independent, the rest are password-dependent (on the password and + * salt). OK against side channels (they reduce to 1/2-pass Argon2i), and + * better with w.r.t. tradeoff attacks (similar to Argon2d). + ***** + * @param context Pointer to current Argon2 context + * @return Zero if successful, a non zero error code otherwise + */ +ARGON2_PUBLIC int argon2id_ctx(argon2_context *context); + +/** + * Verify if a given password is correct for Argon2d hashing + * @param context Pointer to current Argon2 context + * @param hash The password hash to verify. The length of the hash is + * specified by the context outlen member + * @return Zero if successful, a non zero error code otherwise + */ +ARGON2_PUBLIC int argon2d_verify_ctx(argon2_context *context, const char *hash); + +/** + * Verify if a given password is correct for Argon2i hashing + * @param context Pointer to current Argon2 context + * @param hash The password hash to verify. The length of the hash is + * specified by the context outlen member + * @return Zero if successful, a non zero error code otherwise + */ +ARGON2_PUBLIC int argon2i_verify_ctx(argon2_context *context, const char *hash); + +/** + * Verify if a given password is correct for Argon2id hashing + * @param context Pointer to current Argon2 context + * @param hash The password hash to verify. The length of the hash is + * specified by the context outlen member + * @return Zero if successful, a non zero error code otherwise + */ +ARGON2_PUBLIC int argon2id_verify_ctx(argon2_context *context, + const char *hash); + +/* generic function underlying the above ones */ +ARGON2_PUBLIC int argon2_verify_ctx(argon2_context *context, const char *hash, + argon2_type type); + +/** + * Get the associated error message for given error code + * @return The error message associated with the given error code + */ +ARGON2_PUBLIC const char *argon2_error_message(int error_code); + +/** + * Returns the encoded hash length for the given input parameters + * @param t_cost Number of iterations + * @param m_cost Memory usage in kibibytes + * @param parallelism Number of threads; used to compute lanes + * @param saltlen Salt size in bytes + * @param hashlen Hash size in bytes + * @param type The argon2_type that we want the encoded length for + * @return The encoded hash length in bytes + */ +ARGON2_PUBLIC size_t argon2_encodedlen(uint32_t t_cost, uint32_t m_cost, + uint32_t parallelism, uint32_t saltlen, + uint32_t hashlen, argon2_type type); + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/stratum/algos/argon2d/core.c b/stratum/algos/argon2d/core.c new file mode 100644 index 000000000..ed4d84121 --- /dev/null +++ b/stratum/algos/argon2d/core.c @@ -0,0 +1,635 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +/*For memory wiping*/ +#ifdef _MSC_VER +#include +#include /* For SecureZeroMemory */ +#endif +#if defined __STDC_LIB_EXT1__ +#define __STDC_WANT_LIB_EXT1__ 1 +#endif +#define VC_GE_2005(version) (version >= 1400) + +#include +#include +#include + +#include "core.h" +#include "thread.h" +#include "../blake2/blake2.h" +#include "../blake2/blake2-impl.h" + +#ifdef GENKAT +#include "genkat.h" +#endif + +#if defined(__clang__) +#if __has_attribute(optnone) +#define NOT_OPTIMIZED __attribute__((optnone)) +#endif +#elif defined(__GNUC__) +#define GCC_VERSION \ + (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#if GCC_VERSION >= 40400 +#define NOT_OPTIMIZED __attribute__((optimize("O0"))) +#endif +#endif +#ifndef NOT_OPTIMIZED +#define NOT_OPTIMIZED +#endif + +/***************Instance and Position constructors**********/ +void init_block_value(block *b, uint8_t in) { memset(b->v, in, sizeof(b->v)); } + +void copy_block(block *dst, const block *src) { + memcpy(dst->v, src->v, sizeof(uint64_t) * ARGON2_QWORDS_IN_BLOCK); +} + +void xor_block(block *dst, const block *src) { + int i; + for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) { + dst->v[i] ^= src->v[i]; + } +} + +static void load_block(block *dst, const void *input) { + unsigned i; + for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) { + dst->v[i] = load64((const uint8_t *)input + i * sizeof(dst->v[i])); + } +} + +static void store_block(void *output, const block *src) { + unsigned i; + for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) { + store64((uint8_t *)output + i * sizeof(src->v[i]), src->v[i]); + } +} + +/***************Memory functions*****************/ + +int allocate_memory(const argon2_context *context, uint8_t **memory, + size_t num, size_t size) { + size_t memory_size = num*size; + if (memory == NULL) { + return ARGON2_MEMORY_ALLOCATION_ERROR; + } + + /* 1. Check for multiplication overflow */ + if (size != 0 && memory_size / size != num) { + return ARGON2_MEMORY_ALLOCATION_ERROR; + } + + /* 2. Try to allocate with appropriate allocator */ + if (context->allocate_cbk) { + (context->allocate_cbk)(memory, memory_size); + } else { + *memory = malloc(memory_size); + } + + if (*memory == NULL) { + return ARGON2_MEMORY_ALLOCATION_ERROR; + } + + return ARGON2_OK; +} + +void free_memory(const argon2_context *context, uint8_t *memory, + size_t num, size_t size) { + size_t memory_size = num*size; + clear_internal_memory(memory, memory_size); + if (context->free_cbk) { + (context->free_cbk)(memory, memory_size); + } else { + free(memory); + } +} + +void NOT_OPTIMIZED secure_wipe_memory(void *v, size_t n) { +#if defined(_MSC_VER) && VC_GE_2005(_MSC_VER) + SecureZeroMemory(v, n); +#elif defined memset_s + memset_s(v, n, 0, n); +#elif defined(__OpenBSD__) + explicit_bzero(v, n); +#else + static void *(*const volatile memset_sec)(void *, int, size_t) = &memset; + memset_sec(v, 0, n); +#endif +} + +/* Memory clear flag defaults to true. */ +int FLAG_clear_internal_memory = 0; +void clear_internal_memory(void *v, size_t n) { + if (FLAG_clear_internal_memory && v) { + secure_wipe_memory(v, n); + } +} + +void finalize(const argon2_context *context, argon2_instance_t *instance) { + if (context != NULL && instance != NULL) { + block blockhash; + uint32_t l; + + copy_block(&blockhash, instance->memory + instance->lane_length - 1); + + /* XOR the last blocks */ + for (l = 1; l < instance->lanes; ++l) { + uint32_t last_block_in_lane = + l * instance->lane_length + (instance->lane_length - 1); + xor_block(&blockhash, instance->memory + last_block_in_lane); + } + + /* Hash the result */ + { + uint8_t blockhash_bytes[ARGON2_BLOCK_SIZE]; + store_block(blockhash_bytes, &blockhash); + blake2b_long(context->out, context->outlen, blockhash_bytes, + ARGON2_BLOCK_SIZE); + /* clear blockhash and blockhash_bytes */ + clear_internal_memory(blockhash.v, ARGON2_BLOCK_SIZE); + clear_internal_memory(blockhash_bytes, ARGON2_BLOCK_SIZE); + } + +#ifdef GENKAT + print_tag(context->out, context->outlen); +#endif + + free_memory(context, (uint8_t *)instance->memory, + instance->memory_blocks, sizeof(block)); + } +} + +uint32_t index_alpha(const argon2_instance_t *instance, + const argon2_position_t *position, uint32_t pseudo_rand, + int same_lane) { + /* + * Pass 0: + * This lane : all already finished segments plus already constructed + * blocks in this segment + * Other lanes : all already finished segments + * Pass 1+: + * This lane : (SYNC_POINTS - 1) last segments plus already constructed + * blocks in this segment + * Other lanes : (SYNC_POINTS - 1) last segments + */ + uint32_t reference_area_size; + uint64_t relative_position; + uint32_t start_position, absolute_position; + + if (0 == position->pass) { + /* First pass */ + if (0 == position->slice) { + /* First slice */ + reference_area_size = + position->index - 1; /* all but the previous */ + } else { + if (same_lane) { + /* The same lane => add current segment */ + reference_area_size = + position->slice * instance->segment_length + + position->index - 1; + } else { + reference_area_size = + position->slice * instance->segment_length + + ((position->index == 0) ? (-1) : 0); + } + } + } else { + /* Second pass */ + if (same_lane) { + reference_area_size = instance->lane_length - + instance->segment_length + position->index - + 1; + } else { + reference_area_size = instance->lane_length - + instance->segment_length + + ((position->index == 0) ? (-1) : 0); + } + } + + /* 1.2.4. Mapping pseudo_rand to 0.. and produce + * relative position */ + relative_position = pseudo_rand; + relative_position = relative_position * relative_position >> 32; + relative_position = reference_area_size - 1 - + (reference_area_size * relative_position >> 32); + + /* 1.2.5 Computing starting position */ + start_position = 0; + + if (0 != position->pass) { + start_position = (position->slice == ARGON2_SYNC_POINTS - 1) + ? 0 + : (position->slice + 1) * instance->segment_length; + } + + /* 1.2.6. Computing absolute position */ + absolute_position = (start_position + relative_position) % + instance->lane_length; /* absolute position */ + return absolute_position; +} + +/* Single-threaded version for p=1 case */ +static int fill_memory_blocks_st(argon2_instance_t *instance) { + uint32_t r, s, l; + + for (r = 0; r < instance->passes; ++r) { + for (s = 0; s < ARGON2_SYNC_POINTS; ++s) { + for (l = 0; l < instance->lanes; ++l) { + argon2_position_t position = {r, l, (uint8_t)s, 0}; + fill_segment(instance, position); + } + } +#ifdef GENKAT + internal_kat(instance, r); /* Print all memory blocks */ +#endif + } + return ARGON2_OK; +} + +#if !defined(ARGON2_NO_THREADS) + +#ifdef _WIN32 +static unsigned __stdcall fill_segment_thr(void *thread_data) +#else +static void *fill_segment_thr(void *thread_data) +#endif +{ + argon2_thread_data *my_data = thread_data; + fill_segment(my_data->instance_ptr, my_data->pos); + argon2_thread_exit(); + return 0; +} + +/* Multi-threaded version for p > 1 case */ +static int fill_memory_blocks_mt(argon2_instance_t *instance) { + uint32_t r, s; + argon2_thread_handle_t *thread = NULL; + argon2_thread_data *thr_data = NULL; + int rc = ARGON2_OK; + + /* 1. Allocating space for threads */ + thread = calloc(instance->lanes, sizeof(argon2_thread_handle_t)); + if (thread == NULL) { + rc = ARGON2_MEMORY_ALLOCATION_ERROR; + goto fail; + } + + thr_data = calloc(instance->lanes, sizeof(argon2_thread_data)); + if (thr_data == NULL) { + rc = ARGON2_MEMORY_ALLOCATION_ERROR; + goto fail; + } + + for (r = 0; r < instance->passes; ++r) { + for (s = 0; s < ARGON2_SYNC_POINTS; ++s) { + uint32_t l; + + /* 2. Calling threads */ + for (l = 0; l < instance->lanes; ++l) { + argon2_position_t position; + + /* 2.1 Join a thread if limit is exceeded */ + if (l >= instance->threads) { + if (argon2_thread_join(thread[l - instance->threads])) { + rc = ARGON2_THREAD_FAIL; + goto fail; + } + } + + /* 2.2 Create thread */ + position.pass = r; + position.lane = l; + position.slice = (uint8_t)s; + position.index = 0; + thr_data[l].instance_ptr = + instance; /* preparing the thread input */ + memcpy(&(thr_data[l].pos), &position, + sizeof(argon2_position_t)); + if (argon2_thread_create(&thread[l], &fill_segment_thr, + (void *)&thr_data[l])) { + rc = ARGON2_THREAD_FAIL; + goto fail; + } + + /* fill_segment(instance, position); */ + /*Non-thread equivalent of the lines above */ + } + + /* 3. Joining remaining threads */ + for (l = instance->lanes - instance->threads; l < instance->lanes; + ++l) { + if (argon2_thread_join(thread[l])) { + rc = ARGON2_THREAD_FAIL; + goto fail; + } + } + } + +#ifdef GENKAT + internal_kat(instance, r); /* Print all memory blocks */ +#endif + } + +fail: + if (thread != NULL) { + free(thread); + } + if (thr_data != NULL) { + free(thr_data); + } + return rc; +} + +#endif /* ARGON2_NO_THREADS */ + +int fill_memory_blocks(argon2_instance_t *instance) { + if (instance == NULL || instance->lanes == 0) { + return ARGON2_INCORRECT_PARAMETER; + } +#if defined(ARGON2_NO_THREADS) + return fill_memory_blocks_st(instance); +#else + return instance->threads == 1 ? + fill_memory_blocks_st(instance) : fill_memory_blocks_mt(instance); +#endif +} + +int validate_inputs(const argon2_context *context) { + if (NULL == context) { + return ARGON2_INCORRECT_PARAMETER; + } + + if (NULL == context->out) { + return ARGON2_OUTPUT_PTR_NULL; + } + + /* Validate output length */ + if (ARGON2_MIN_OUTLEN > context->outlen) { + return ARGON2_OUTPUT_TOO_SHORT; + } + + if (ARGON2_MAX_OUTLEN < context->outlen) { + return ARGON2_OUTPUT_TOO_LONG; + } + + /* Validate password (required param) */ + if (NULL == context->pwd) { + if (0 != context->pwdlen) { + return ARGON2_PWD_PTR_MISMATCH; + } + } + + if (ARGON2_MIN_PWD_LENGTH > context->pwdlen) { + return ARGON2_PWD_TOO_SHORT; + } + + if (ARGON2_MAX_PWD_LENGTH < context->pwdlen) { + return ARGON2_PWD_TOO_LONG; + } + + /* Validate salt (required param) */ + if (NULL == context->salt) { + if (0 != context->saltlen) { + return ARGON2_SALT_PTR_MISMATCH; + } + } + + if (ARGON2_MIN_SALT_LENGTH > context->saltlen) { + return ARGON2_SALT_TOO_SHORT; + } + + if (ARGON2_MAX_SALT_LENGTH < context->saltlen) { + return ARGON2_SALT_TOO_LONG; + } + + /* Validate secret (optional param) */ + if (NULL == context->secret) { + if (0 != context->secretlen) { + return ARGON2_SECRET_PTR_MISMATCH; + } + } else { + if (ARGON2_MIN_SECRET > context->secretlen) { + return ARGON2_SECRET_TOO_SHORT; + } + if (ARGON2_MAX_SECRET < context->secretlen) { + return ARGON2_SECRET_TOO_LONG; + } + } + + /* Validate associated data (optional param) */ + if (NULL == context->ad) { + if (0 != context->adlen) { + return ARGON2_AD_PTR_MISMATCH; + } + } else { + if (ARGON2_MIN_AD_LENGTH > context->adlen) { + return ARGON2_AD_TOO_SHORT; + } + if (ARGON2_MAX_AD_LENGTH < context->adlen) { + return ARGON2_AD_TOO_LONG; + } + } + + /* Validate memory cost */ + if (ARGON2_MIN_MEMORY > context->m_cost) { + return ARGON2_MEMORY_TOO_LITTLE; + } + + if (ARGON2_MAX_MEMORY < context->m_cost) { + return ARGON2_MEMORY_TOO_MUCH; + } + + /* if (context->m_cost < 8 * context->lanes) { + return ARGON2_MEMORY_TOO_LITTLE; + } */ + + /* Validate time cost */ + if (ARGON2_MIN_TIME > context->t_cost) { + return ARGON2_TIME_TOO_SMALL; + } + + if (ARGON2_MAX_TIME < context->t_cost) { + return ARGON2_TIME_TOO_LARGE; + } + + /* Validate lanes */ + if (ARGON2_MIN_LANES > context->lanes) { + return ARGON2_LANES_TOO_FEW; + } + + if (ARGON2_MAX_LANES < context->lanes) { + return ARGON2_LANES_TOO_MANY; + } + + /* Validate threads */ + if (ARGON2_MIN_THREADS > context->threads) { + return ARGON2_THREADS_TOO_FEW; + } + + if (ARGON2_MAX_THREADS < context->threads) { + return ARGON2_THREADS_TOO_MANY; + } + + if (NULL != context->allocate_cbk && NULL == context->free_cbk) { + return ARGON2_FREE_MEMORY_CBK_NULL; + } + + if (NULL == context->allocate_cbk && NULL != context->free_cbk) { + return ARGON2_ALLOCATE_MEMORY_CBK_NULL; + } + + return ARGON2_OK; +} + +void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance) { + uint32_t l; + /* Make the first and second block in each lane as G(H0||0||i) or + G(H0||1||i) */ + uint8_t blockhash_bytes[ARGON2_BLOCK_SIZE]; + for (l = 0; l < instance->lanes; ++l) { + + store32(blockhash + ARGON2_PREHASH_DIGEST_LENGTH, 0); + store32(blockhash + ARGON2_PREHASH_DIGEST_LENGTH + 4, l); + blake2b_long(blockhash_bytes, ARGON2_BLOCK_SIZE, blockhash, + ARGON2_PREHASH_SEED_LENGTH); + load_block(&instance->memory[l * instance->lane_length + 0], + blockhash_bytes); + + store32(blockhash + ARGON2_PREHASH_DIGEST_LENGTH, 1); + blake2b_long(blockhash_bytes, ARGON2_BLOCK_SIZE, blockhash, + ARGON2_PREHASH_SEED_LENGTH); + load_block(&instance->memory[l * instance->lane_length + 1], + blockhash_bytes); + } + clear_internal_memory(blockhash_bytes, ARGON2_BLOCK_SIZE); +} + +void initial_hash(uint8_t *blockhash, argon2_context *context, + argon2_type type) { + blake2b_state BlakeHash; + uint8_t value[sizeof(uint32_t)]; + + if (NULL == context || NULL == blockhash) { + return; + } + + blake2b_init(&BlakeHash, ARGON2_PREHASH_DIGEST_LENGTH); + + store32(&value, context->lanes); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + store32(&value, context->outlen); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + store32(&value, context->m_cost); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + store32(&value, context->t_cost); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + +// store32(&value, ARGON2_VERSION_NUMBER); + store32(&value, context->version); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + store32(&value, (uint32_t)type); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + store32(&value, context->pwdlen); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + if (context->pwd != NULL) { + blake2b_update(&BlakeHash, (const uint8_t *)context->pwd, + context->pwdlen); + + if (context->flags & ARGON2_FLAG_CLEAR_PASSWORD) { + secure_wipe_memory(context->pwd, context->pwdlen); + context->pwdlen = 0; + } + } + + store32(&value, context->saltlen); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + if (context->salt != NULL) { + blake2b_update(&BlakeHash, (const uint8_t *)context->salt, + context->saltlen); + } + + store32(&value, context->secretlen); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + if (context->secret != NULL) { + blake2b_update(&BlakeHash, (const uint8_t *)context->secret, + context->secretlen); + + if (context->flags & ARGON2_FLAG_CLEAR_SECRET) { + secure_wipe_memory(context->secret, context->secretlen); + context->secretlen = 0; + } + } + + store32(&value, context->adlen); + blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value)); + + if (context->ad != NULL) { + blake2b_update(&BlakeHash, (const uint8_t *)context->ad, + context->adlen); + } + + blake2b_final(&BlakeHash, blockhash, ARGON2_PREHASH_DIGEST_LENGTH); +} + +int initialize(argon2_instance_t *instance, argon2_context *context) { + uint8_t blockhash[ARGON2_PREHASH_SEED_LENGTH]; + int result = ARGON2_OK; + + if (instance == NULL || context == NULL) + return ARGON2_INCORRECT_PARAMETER; + instance->context_ptr = context; + + /* 1. Memory allocation */ + result = allocate_memory(context, (uint8_t **)&(instance->memory), + instance->memory_blocks, sizeof(block)); + if (result != ARGON2_OK) { + return result; + } + + /* 2. Initial hashing */ + /* H_0 + 8 extra bytes to produce the first blocks */ + /* uint8_t blockhash[ARGON2_PREHASH_SEED_LENGTH]; */ + /* Hashing all inputs */ + initial_hash(blockhash, context, instance->type); + /* Zeroing 8 extra bytes */ + clear_internal_memory(blockhash + ARGON2_PREHASH_DIGEST_LENGTH, + ARGON2_PREHASH_SEED_LENGTH - + ARGON2_PREHASH_DIGEST_LENGTH); + +#ifdef GENKAT + initial_kat(blockhash, context, instance->type); +#endif + + /* 3. Creating first blocks, we always have at least two blocks in a slice + */ + fill_first_blocks(blockhash, instance); + /* Clearing the hash */ + clear_internal_memory(blockhash, ARGON2_PREHASH_SEED_LENGTH); + + return ARGON2_OK; +} diff --git a/stratum/algos/argon2d/core.h b/stratum/algos/argon2d/core.h new file mode 100644 index 000000000..78000ba9e --- /dev/null +++ b/stratum/algos/argon2d/core.h @@ -0,0 +1,228 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef ARGON2_CORE_H +#define ARGON2_CORE_H + +#include "argon2.h" + +#define CONST_CAST(x) (x)(uintptr_t) + +/**********************Argon2 internal constants*******************************/ + +enum argon2_core_constants { + /* Memory block size in bytes */ + ARGON2_BLOCK_SIZE = 1024, + ARGON2_QWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 8, + ARGON2_OWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 16, + ARGON2_HWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 32, + ARGON2_512BIT_WORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 64, + + /* Number of pseudo-random values generated by one call to Blake in Argon2i + to + generate reference block positions */ + ARGON2_ADDRESSES_IN_BLOCK = 128, + + /* Pre-hashing digest length and its extension*/ + ARGON2_PREHASH_DIGEST_LENGTH = 64, + ARGON2_PREHASH_SEED_LENGTH = 72 +}; + +/*************************Argon2 internal data types***********************/ + +/* + * Structure for the (1KB) memory block implemented as 128 64-bit words. + * Memory blocks can be copied, XORed. Internal words can be accessed by [] (no + * bounds checking). + */ +typedef struct block_ { uint64_t v[ARGON2_QWORDS_IN_BLOCK]; } block; + +/*****************Functions that work with the block******************/ + +/* Initialize each byte of the block with @in */ +void init_block_value(block *b, uint8_t in); + +/* Copy block @src to block @dst */ +void copy_block(block *dst, const block *src); + +/* XOR @src onto @dst bytewise */ +void xor_block(block *dst, const block *src); + +/* + * Argon2 instance: memory pointer, number of passes, amount of memory, type, + * and derived values. + * Used to evaluate the number and location of blocks to construct in each + * thread + */ +typedef struct Argon2_instance_t { + block *memory; /* Memory pointer */ + uint32_t version; + uint32_t passes; /* Number of passes */ + uint32_t memory_blocks; /* Number of blocks in memory */ + uint32_t segment_length; + uint32_t lane_length; + uint32_t lanes; + uint32_t threads; + argon2_type type; + int print_internals; /* whether to print the memory blocks */ + argon2_context *context_ptr; /* points back to original context */ +} argon2_instance_t; + +/* + * Argon2 position: where we construct the block right now. Used to distribute + * work between threads. + */ +typedef struct Argon2_position_t { + uint32_t pass; + uint32_t lane; + uint8_t slice; + uint32_t index; +} argon2_position_t; + +/*Struct that holds the inputs for thread handling FillSegment*/ +typedef struct Argon2_thread_data { + argon2_instance_t *instance_ptr; + argon2_position_t pos; +} argon2_thread_data; + +/*************************Argon2 core functions********************************/ + +/* Allocates memory to the given pointer, uses the appropriate allocator as + * specified in the context. Total allocated memory is num*size. + * @param context argon2_context which specifies the allocator + * @param memory pointer to the pointer to the memory + * @param size the size in bytes for each element to be allocated + * @param num the number of elements to be allocated + * @return ARGON2_OK if @memory is a valid pointer and memory is allocated + */ +int allocate_memory(const argon2_context *context, uint8_t **memory, + size_t num, size_t size); + +/* + * Frees memory at the given pointer, uses the appropriate deallocator as + * specified in the context. Also cleans the memory using clear_internal_memory. + * @param context argon2_context which specifies the deallocator + * @param memory pointer to buffer to be freed + * @param size the size in bytes for each element to be deallocated + * @param num the number of elements to be deallocated + */ +void free_memory(const argon2_context *context, uint8_t *memory, + size_t num, size_t size); + +/* Function that securely cleans the memory. This ignores any flags set + * regarding clearing memory. Usually one just calls clear_internal_memory. + * @param mem Pointer to the memory + * @param s Memory size in bytes + */ +void secure_wipe_memory(void *v, size_t n); + +/* Function that securely clears the memory if FLAG_clear_internal_memory is + * set. If the flag isn't set, this function does nothing. + * @param mem Pointer to the memory + * @param s Memory size in bytes + */ +void clear_internal_memory(void *v, size_t n); + +/* + * Computes absolute position of reference block in the lane following a skewed + * distribution and using a pseudo-random value as input + * @param instance Pointer to the current instance + * @param position Pointer to the current position + * @param pseudo_rand 32-bit pseudo-random value used to determine the position + * @param same_lane Indicates if the block will be taken from the current lane. + * If so we can reference the current segment + * @pre All pointers must be valid + */ +uint32_t index_alpha(const argon2_instance_t *instance, + const argon2_position_t *position, uint32_t pseudo_rand, + int same_lane); + +/* + * Function that validates all inputs against predefined restrictions and return + * an error code + * @param context Pointer to current Argon2 context + * @return ARGON2_OK if everything is all right, otherwise one of error codes + * (all defined in + */ +int validate_inputs(const argon2_context *context); + +/* + * Hashes all the inputs into @a blockhash[PREHASH_DIGEST_LENGTH], clears + * password and secret if needed + * @param context Pointer to the Argon2 internal structure containing memory + * pointer, and parameters for time and space requirements. + * @param blockhash Buffer for pre-hashing digest + * @param type Argon2 type + * @pre @a blockhash must have at least @a PREHASH_DIGEST_LENGTH bytes + * allocated + */ +void initial_hash(uint8_t *blockhash, argon2_context *context, + argon2_type type); + +/* + * Function creates first 2 blocks per lane + * @param instance Pointer to the current instance + * @param blockhash Pointer to the pre-hashing digest + * @pre blockhash must point to @a PREHASH_SEED_LENGTH allocated values + */ +void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance); + +/* + * Function allocates memory, hashes the inputs with Blake, and creates first + * two blocks. Returns the pointer to the main memory with 2 blocks per lane + * initialized + * @param context Pointer to the Argon2 internal structure containing memory + * pointer, and parameters for time and space requirements. + * @param instance Current Argon2 instance + * @return Zero if successful, -1 if memory failed to allocate. @context->state + * will be modified if successful. + */ +int initialize(argon2_instance_t *instance, argon2_context *context); + +/* + * XORing the last block of each lane, hashing it, making the tag. Deallocates + * the memory. + * @param context Pointer to current Argon2 context (use only the out parameters + * from it) + * @param instance Pointer to current instance of Argon2 + * @pre instance->state must point to necessary amount of memory + * @pre context->out must point to outlen bytes of memory + * @pre if context->free_cbk is not NULL, it should point to a function that + * deallocates memory + */ +void finalize(const argon2_context *context, argon2_instance_t *instance); + +/* + * Function that fills the segment using previous segments also from other + * threads + * @param context current context + * @param instance Pointer to the current instance + * @param position Current position + * @pre all block pointers must be valid + */ +void fill_segment(const argon2_instance_t *instance, + argon2_position_t position); + +/* + * Function that fills the entire memory t_cost times based on the first two + * blocks in each lane + * @param instance Pointer to the current instance + * @return ARGON2_OK if successful, @context->state + */ +int fill_memory_blocks(argon2_instance_t *instance); + +#endif diff --git a/stratum/algos/argon2d/encoding.c b/stratum/algos/argon2d/encoding.c new file mode 100644 index 000000000..12cfda4d0 --- /dev/null +++ b/stratum/algos/argon2d/encoding.c @@ -0,0 +1,463 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#include +#include +#include +#include +#include "encoding.h" +#include "core.h" + +/* + * Example code for a decoder and encoder of "hash strings", with Argon2 + * parameters. + * + * This code comprises three sections: + * + * -- The first section contains generic Base64 encoding and decoding + * functions. It is conceptually applicable to any hash function + * implementation that uses Base64 to encode and decode parameters, + * salts and outputs. It could be made into a library, provided that + * the relevant functions are made public (non-static) and be given + * reasonable names to avoid collisions with other functions. + * + * -- The second section is specific to Argon2. It encodes and decodes + * the parameters, salts and outputs. It does not compute the hash + * itself. + * + * The code was originally written by Thomas Pornin , + * to whom comments and remarks may be sent. It is released under what + * should amount to Public Domain or its closest equivalent; the + * following mantra is supposed to incarnate that fact with all the + * proper legal rituals: + * + * --------------------------------------------------------------------- + * This file is provided under the terms of Creative Commons CC0 1.0 + * Public Domain Dedication. To the extent possible under law, the + * author (Thomas Pornin) has waived all copyright and related or + * neighboring rights to this file. This work is published from: Canada. + * --------------------------------------------------------------------- + * + * Copyright (c) 2015 Thomas Pornin + */ + +/* ==================================================================== */ +/* + * Common code; could be shared between different hash functions. + * + * Note: the Base64 functions below assume that uppercase letters (resp. + * lowercase letters) have consecutive numerical codes, that fit on 8 + * bits. All modern systems use ASCII-compatible charsets, where these + * properties are true. If you are stuck with a dinosaur of a system + * that still defaults to EBCDIC then you already have much bigger + * interoperability issues to deal with. + */ + +/* + * Some macros for constant-time comparisons. These work over values in + * the 0..255 range. Returned value is 0x00 on "false", 0xFF on "true". + */ +#define EQ(x, y) ((((0U - ((unsigned)(x) ^ (unsigned)(y))) >> 8) & 0xFF) ^ 0xFF) +#define GT(x, y) ((((unsigned)(y) - (unsigned)(x)) >> 8) & 0xFF) +#define GE(x, y) (GT(y, x) ^ 0xFF) +#define LT(x, y) GT(y, x) +#define LE(x, y) GE(y, x) + +/* + * Convert value x (0..63) to corresponding Base64 character. + */ +static int b64_byte_to_char(unsigned x) { + return (LT(x, 26) & (x + 'A')) | + (GE(x, 26) & LT(x, 52) & (x + ('a' - 26))) | + (GE(x, 52) & LT(x, 62) & (x + ('0' - 52))) | (EQ(x, 62) & '+') | + (EQ(x, 63) & '/'); +} + +/* + * Convert character c to the corresponding 6-bit value. If character c + * is not a Base64 character, then 0xFF (255) is returned. + */ +static unsigned b64_char_to_byte(int c) { + unsigned x; + + x = (GE(c, 'A') & LE(c, 'Z') & (c - 'A')) | + (GE(c, 'a') & LE(c, 'z') & (c - ('a' - 26))) | + (GE(c, '0') & LE(c, '9') & (c - ('0' - 52))) | (EQ(c, '+') & 62) | + (EQ(c, '/') & 63); + return x | (EQ(x, 0) & (EQ(c, 'A') ^ 0xFF)); +} + +/* + * Convert some bytes to Base64. 'dst_len' is the length (in characters) + * of the output buffer 'dst'; if that buffer is not large enough to + * receive the result (including the terminating 0), then (size_t)-1 + * is returned. Otherwise, the zero-terminated Base64 string is written + * in the buffer, and the output length (counted WITHOUT the terminating + * zero) is returned. + */ +static size_t to_base64(char *dst, size_t dst_len, const void *src, + size_t src_len) { + size_t olen; + const unsigned char *buf; + unsigned acc, acc_len; + + olen = (src_len / 3) << 2; + switch (src_len % 3) { + case 2: + olen++; + /* fall through */ + case 1: + olen += 2; + break; + } + if (dst_len <= olen) { + return (size_t)-1; + } + acc = 0; + acc_len = 0; + buf = (const unsigned char *)src; + while (src_len-- > 0) { + acc = (acc << 8) + (*buf++); + acc_len += 8; + while (acc_len >= 6) { + acc_len -= 6; + *dst++ = (char)b64_byte_to_char((acc >> acc_len) & 0x3F); + } + } + if (acc_len > 0) { + *dst++ = (char)b64_byte_to_char((acc << (6 - acc_len)) & 0x3F); + } + *dst++ = 0; + return olen; +} + +/* + * Decode Base64 chars into bytes. The '*dst_len' value must initially + * contain the length of the output buffer '*dst'; when the decoding + * ends, the actual number of decoded bytes is written back in + * '*dst_len'. + * + * Decoding stops when a non-Base64 character is encountered, or when + * the output buffer capacity is exceeded. If an error occurred (output + * buffer is too small, invalid last characters leading to unprocessed + * buffered bits), then NULL is returned; otherwise, the returned value + * points to the first non-Base64 character in the source stream, which + * may be the terminating zero. + */ +static const char *from_base64(void *dst, size_t *dst_len, const char *src) { + size_t len; + unsigned char *buf; + unsigned acc, acc_len; + + buf = (unsigned char *)dst; + len = 0; + acc = 0; + acc_len = 0; + for (;;) { + unsigned d; + + d = b64_char_to_byte(*src); + if (d == 0xFF) { + break; + } + src++; + acc = (acc << 6) + d; + acc_len += 6; + if (acc_len >= 8) { + acc_len -= 8; + if ((len++) >= *dst_len) { + return NULL; + } + *buf++ = (acc >> acc_len) & 0xFF; + } + } + + /* + * If the input length is equal to 1 modulo 4 (which is + * invalid), then there will remain 6 unprocessed bits; + * otherwise, only 0, 2 or 4 bits are buffered. The buffered + * bits must also all be zero. + */ + if (acc_len > 4 || (acc & (((unsigned)1 << acc_len) - 1)) != 0) { + return NULL; + } + *dst_len = len; + return src; +} + +/* + * Decode decimal integer from 'str'; the value is written in '*v'. + * Returned value is a pointer to the next non-decimal character in the + * string. If there is no digit at all, or the value encoding is not + * minimal (extra leading zeros), or the value does not fit in an + * 'unsigned long', then NULL is returned. + */ +static const char *decode_decimal(const char *str, unsigned long *v) { + const char *orig; + unsigned long acc; + + acc = 0; + for (orig = str;; str++) { + int c; + + c = *str; + if (c < '0' || c > '9') { + break; + } + c -= '0'; + if (acc > (ULONG_MAX / 10)) { + return NULL; + } + acc *= 10; + if ((unsigned long)c > (ULONG_MAX - acc)) { + return NULL; + } + acc += (unsigned long)c; + } + if (str == orig || (*orig == '0' && str != (orig + 1))) { + return NULL; + } + *v = acc; + return str; +} + +/* ==================================================================== */ +/* + * Code specific to Argon2. + * + * The code below applies the following format: + * + * $argon2[$v=]$m=,t=,p=$$ + * + * where is either 'd', 'id', or 'i', is a decimal integer (positive, + * fits in an 'unsigned long'), and is Base64-encoded data (no '=' padding + * characters, no newline or whitespace). + * + * The last two binary chunks (encoded in Base64) are, in that order, + * the salt and the output. Both are required. The binary salt length and the + * output length must be in the allowed ranges defined in argon2.h. + * + * The ctx struct must contain buffers large enough to hold the salt and pwd + * when it is fed into decode_string. + */ + +int decode_string(argon2_context *ctx, const char *str, argon2_type type) { + +/* check for prefix */ +#define CC(prefix) \ + do { \ + size_t cc_len = strlen(prefix); \ + if (strncmp(str, prefix, cc_len) != 0) { \ + return ARGON2_DECODING_FAIL; \ + } \ + str += cc_len; \ + } while ((void)0, 0) + +/* optional prefix checking with supplied code */ +#define CC_opt(prefix, code) \ + do { \ + size_t cc_len = strlen(prefix); \ + if (strncmp(str, prefix, cc_len) == 0) { \ + str += cc_len; \ + { code; } \ + } \ + } while ((void)0, 0) + +/* Decoding prefix into decimal */ +#define DECIMAL(x) \ + do { \ + unsigned long dec_x; \ + str = decode_decimal(str, &dec_x); \ + if (str == NULL) { \ + return ARGON2_DECODING_FAIL; \ + } \ + (x) = dec_x; \ + } while ((void)0, 0) + + +/* Decoding prefix into uint32_t decimal */ +#define DECIMAL_U32(x) \ + do { \ + unsigned long dec_x; \ + str = decode_decimal(str, &dec_x); \ + if (str == NULL || dec_x > UINT32_MAX) { \ + return ARGON2_DECODING_FAIL; \ + } \ + (x) = (uint32_t)dec_x; \ + } while ((void)0, 0) + + +/* Decoding base64 into a binary buffer */ +#define BIN(buf, max_len, len) \ + do { \ + size_t bin_len = (max_len); \ + str = from_base64(buf, &bin_len, str); \ + if (str == NULL || bin_len > UINT32_MAX) { \ + return ARGON2_DECODING_FAIL; \ + } \ + (len) = (uint32_t)bin_len; \ + } while ((void)0, 0) + + size_t maxsaltlen = ctx->saltlen; + size_t maxoutlen = ctx->outlen; + int validation_result; + const char* type_string; + + /* We should start with the argon2_type we are using */ + type_string = argon2_type2string(type, 0); + if (!type_string) { + return ARGON2_INCORRECT_TYPE; + } + + CC("$"); + CC(type_string); + + /* Reading the version number if the default is suppressed */ + ctx->version = ARGON2_VERSION_10; + CC_opt("$v=", DECIMAL_U32(ctx->version)); + + CC("$m="); + DECIMAL_U32(ctx->m_cost); + CC(",t="); + DECIMAL_U32(ctx->t_cost); + CC(",p="); + DECIMAL_U32(ctx->lanes); + ctx->threads = ctx->lanes; + + CC("$"); + BIN(ctx->salt, maxsaltlen, ctx->saltlen); + CC("$"); + BIN(ctx->out, maxoutlen, ctx->outlen); + + /* The rest of the fields get the default values */ + ctx->secret = NULL; + ctx->secretlen = 0; + ctx->ad = NULL; + ctx->adlen = 0; + ctx->allocate_cbk = NULL; + ctx->free_cbk = NULL; + ctx->flags = ARGON2_DEFAULT_FLAGS; + + /* On return, must have valid context */ + validation_result = validate_inputs(ctx); + if (validation_result != ARGON2_OK) { + return validation_result; + } + + /* Can't have any additional characters */ + if (*str == 0) { + return ARGON2_OK; + } else { + return ARGON2_DECODING_FAIL; + } +#undef CC +#undef CC_opt +#undef DECIMAL +#undef BIN +} + +int encode_string(char *dst, size_t dst_len, argon2_context *ctx, + argon2_type type) { +#define SS(str) \ + do { \ + size_t pp_len = strlen(str); \ + if (pp_len >= dst_len) { \ + return ARGON2_ENCODING_FAIL; \ + } \ + memcpy(dst, str, pp_len + 1); \ + dst += pp_len; \ + dst_len -= pp_len; \ + } while ((void)0, 0) + +#define SX(x) \ + do { \ + char tmp[30]; \ + sprintf(tmp, "%lu", (unsigned long)(x)); \ + SS(tmp); \ + } while ((void)0, 0) + +#define SB(buf, len) \ + do { \ + size_t sb_len = to_base64(dst, dst_len, buf, len); \ + if (sb_len == (size_t)-1) { \ + return ARGON2_ENCODING_FAIL; \ + } \ + dst += sb_len; \ + dst_len -= sb_len; \ + } while ((void)0, 0) + + const char* type_string = argon2_type2string(type, 0); + int validation_result = validate_inputs(ctx); + + if (!type_string) { + return ARGON2_ENCODING_FAIL; + } + + if (validation_result != ARGON2_OK) { + return validation_result; + } + + + SS("$"); + SS(type_string); + + SS("$v="); + SX(ctx->version); + + SS("$m="); + SX(ctx->m_cost); + SS(",t="); + SX(ctx->t_cost); + SS(",p="); + SX(ctx->lanes); + + SS("$"); + SB(ctx->salt, ctx->saltlen); + + SS("$"); + SB(ctx->out, ctx->outlen); + return ARGON2_OK; + +#undef SS +#undef SX +#undef SB +} + +size_t b64len(uint32_t len) { + size_t olen = ((size_t)len / 3) << 2; + + switch (len % 3) { + case 2: + olen++; + /* fall through */ + case 1: + olen += 2; + break; + } + + return olen; +} + +size_t numlen(uint32_t num) { + size_t len = 1; + while (num >= 10) { + ++len; + num = num / 10; + } + return len; +} + diff --git a/stratum/algos/argon2d/encoding.h b/stratum/algos/argon2d/encoding.h new file mode 100644 index 000000000..7e83ec928 --- /dev/null +++ b/stratum/algos/argon2d/encoding.h @@ -0,0 +1,57 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef ENCODING_H +#define ENCODING_H +#include "argon2.h" + +#define ARGON2_MAX_DECODED_LANES UINT32_C(255) +#define ARGON2_MIN_DECODED_SALT_LEN UINT32_C(8) +#define ARGON2_MIN_DECODED_OUT_LEN UINT32_C(12) + +/* +* encode an Argon2 hash string into the provided buffer. 'dst_len' +* contains the size, in characters, of the 'dst' buffer; if 'dst_len' +* is less than the number of required characters (including the +* terminating 0), then this function returns ARGON2_ENCODING_ERROR. +* +* on success, ARGON2_OK is returned. +*/ +int encode_string(char *dst, size_t dst_len, argon2_context *ctx, + argon2_type type); + +/* +* Decodes an Argon2 hash string into the provided structure 'ctx'. +* The only fields that must be set prior to this call are ctx.saltlen and +* ctx.outlen (which must be the maximal salt and out length values that are +* allowed), ctx.salt and ctx.out (which must be buffers of the specified +* length), and ctx.pwd and ctx.pwdlen which must hold a valid password. +* +* Invalid input string causes an error. On success, the ctx is valid and all +* fields have been initialized. +* +* Returned value is ARGON2_OK on success, other ARGON2_ codes on error. +*/ +int decode_string(argon2_context *ctx, const char *str, argon2_type type); + +/* Returns the length of the encoded byte stream with length len */ +size_t b64len(uint32_t len); + +/* Returns the length of the encoded number num */ +size_t numlen(uint32_t num); + +#endif diff --git a/stratum/algos/argon2d/opt.c b/stratum/algos/argon2d/opt.c new file mode 100644 index 000000000..87ff4cc95 --- /dev/null +++ b/stratum/algos/argon2d/opt.c @@ -0,0 +1,359 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#include +#include +#include + +#include "argon2.h" +#include "core.h" + +#include "../blake2/blake2.h" +#include "../blake2/blamka-round-opt.h" + +/* + * Function fills a new memory block and optionally XORs the old block over the new one. + * Memory must be initialized. + * @param state Pointer to the just produced block. Content will be updated(!) + * @param ref_block Pointer to the reference block + * @param next_block Pointer to the block to be XORed over. May coincide with @ref_block + * @param with_xor Whether to XOR into the new block (1) or just overwrite (0) + * @pre all block pointers must be valid + */ + +#if defined(__AVX512F__) + +static void fill_block(__m512i *state, const block *ref_block, + block *next_block, int with_xor) { + __m512i block_XY[ARGON2_512BIT_WORDS_IN_BLOCK]; + unsigned int i; + + if (with_xor) { + for (i = 0; i < ARGON2_512BIT_WORDS_IN_BLOCK; i++) { + state[i] = _mm512_xor_si512( + state[i], _mm512_loadu_si512((const __m512i *)ref_block->v + i)); + block_XY[i] = _mm512_xor_si512( + state[i], _mm512_loadu_si512((const __m512i *)next_block->v + i)); + } + } else { + for (i = 0; i < ARGON2_512BIT_WORDS_IN_BLOCK; i++) { + block_XY[i] = state[i] = _mm512_xor_si512( + state[i], _mm512_loadu_si512((const __m512i *)ref_block->v + i)); + } + } + + BLAKE2_ROUND_1( state[ 0], state[ 1], state[ 2], state[ 3], + state[ 4], state[ 5], state[ 6], state[ 7] ); + BLAKE2_ROUND_1( state[ 8], state[ 9], state[10], state[11], + state[12], state[13], state[14], state[15] ); + + BLAKE2_ROUND_2( state[ 0], state[ 2], state[ 4], state[ 6], + state[ 8], state[10], state[12], state[14] ); + BLAKE2_ROUND_2( state[ 1], state[ 3], state[ 5], state[ 7], + state[ 9], state[11], state[13], state[15] ); + +/* + for (i = 0; i < 2; ++i) { + BLAKE2_ROUND_1( + state[8 * i + 0], state[8 * i + 1], state[8 * i + 2], state[8 * i + 3], + state[8 * i + 4], state[8 * i + 5], state[8 * i + 6], state[8 * i + 7]); + } + + for (i = 0; i < 2; ++i) { + BLAKE2_ROUND_2( + state[2 * 0 + i], state[2 * 1 + i], state[2 * 2 + i], state[2 * 3 + i], + state[2 * 4 + i], state[2 * 5 + i], state[2 * 6 + i], state[2 * 7 + i]); + } +*/ + + for (i = 0; i < ARGON2_512BIT_WORDS_IN_BLOCK; i++) { + state[i] = _mm512_xor_si512(state[i], block_XY[i]); + _mm512_storeu_si512((__m512i *)next_block->v + i, state[i]); + } +} + +#elif defined(__AVX2__) + +static void fill_block(__m256i *state, const block *ref_block, + block *next_block, int with_xor) { + __m256i block_XY[ARGON2_HWORDS_IN_BLOCK]; + unsigned int i; + + if (with_xor) { + for (i = 0; i < ARGON2_HWORDS_IN_BLOCK; i++) { + state[i] = _mm256_xor_si256( + state[i], _mm256_loadu_si256((const __m256i *)ref_block->v + i)); + block_XY[i] = _mm256_xor_si256( + state[i], _mm256_loadu_si256((const __m256i *)next_block->v + i)); + } + } else { + for (i = 0; i < ARGON2_HWORDS_IN_BLOCK; i++) { + block_XY[i] = state[i] = _mm256_xor_si256( + state[i], _mm256_loadu_si256((const __m256i *)ref_block->v + i)); + } + } + + BLAKE2_ROUND_1( state[ 0], state[ 4], state[ 1], state[ 5], + state[ 2], state[ 6], state[ 3], state[ 7] ); + BLAKE2_ROUND_1( state[ 8], state[12], state[ 9], state[13], + state[10], state[14], state[11], state[15] ); + BLAKE2_ROUND_1( state[16], state[20], state[17], state[21], + state[18], state[22], state[19], state[23] ); + BLAKE2_ROUND_1( state[24], state[28], state[25], state[29], + state[26], state[30], state[27], state[31] ); + + BLAKE2_ROUND_2( state[ 0], state[ 4], state[ 8], state[12], + state[16], state[20], state[24], state[28] ); + BLAKE2_ROUND_2( state[ 1], state[ 5], state[ 9], state[13], + state[17], state[21], state[25], state[29] ); + BLAKE2_ROUND_2( state[ 2], state[ 6], state[10], state[14], + state[18], state[22], state[26], state[30] ); + BLAKE2_ROUND_2( state[ 3], state[ 7], state[11], state[15], + state[19], state[23], state[27], state[31] ); + +/* + for (i = 0; i < 4; ++i) { + BLAKE2_ROUND_1(state[8 * i + 0], state[8 * i + 4], state[8 * i + 1], state[8 * i + 5], + state[8 * i + 2], state[8 * i + 6], state[8 * i + 3], state[8 * i + 7]); + } + + for (i = 0; i < 4; ++i) { + BLAKE2_ROUND_2(state[ 0 + i], state[ 4 + i], state[ 8 + i], state[12 + i], + state[16 + i], state[20 + i], state[24 + i], state[28 + i]); + } +*/ + + for (i = 0; i < ARGON2_HWORDS_IN_BLOCK; i++) { + state[i] = _mm256_xor_si256(state[i], block_XY[i]); + _mm256_storeu_si256((__m256i *)next_block->v + i, state[i]); + } +} + +#else // SSE2 + +static void fill_block(__m128i *state, const block *ref_block, + block *next_block, int with_xor) { + __m128i block_XY[ARGON2_OWORDS_IN_BLOCK]; + unsigned int i; + + if (with_xor) { + for (i = 0; i < ARGON2_OWORDS_IN_BLOCK; i++) { + state[i] = _mm_xor_si128( + state[i], _mm_loadu_si128((const __m128i *)ref_block->v + i)); + block_XY[i] = _mm_xor_si128( + state[i], _mm_loadu_si128((const __m128i *)next_block->v + i)); + } + } else { + for (i = 0; i < ARGON2_OWORDS_IN_BLOCK; i++) { + block_XY[i] = state[i] = _mm_xor_si128( + state[i], _mm_loadu_si128((const __m128i *)ref_block->v + i)); + } + } + + BLAKE2_ROUND( state[ 0], state[ 1], state[ 2], state[ 3], + state[ 4], state[ 5], state[ 6], state[ 7] ); + BLAKE2_ROUND( state[ 8], state[ 9], state[10], state[11], + state[12], state[13], state[14], state[15] ); + BLAKE2_ROUND( state[16], state[17], state[18], state[19], + state[20], state[21], state[22], state[23] ); + BLAKE2_ROUND( state[24], state[25], state[26], state[27], + state[28], state[29], state[30], state[31] ); + BLAKE2_ROUND( state[32], state[33], state[34], state[35], + state[36], state[37], state[38], state[39] ); + BLAKE2_ROUND( state[40], state[41], state[42], state[43], + state[44], state[45], state[46], state[47] ); + BLAKE2_ROUND( state[48], state[49], state[50], state[51], + state[52], state[53], state[54], state[55] ); + BLAKE2_ROUND( state[56], state[57], state[58], state[59], + state[60], state[61], state[62], state[63] ); + + BLAKE2_ROUND( state[ 0], state[ 8], state[16], state[24], + state[32], state[40], state[48], state[56] ); + BLAKE2_ROUND( state[ 1], state[ 9], state[17], state[25], + state[33], state[41], state[49], state[57] ); + BLAKE2_ROUND( state[ 2], state[10], state[18], state[26], + state[34], state[42], state[50], state[58] ); + BLAKE2_ROUND( state[ 3], state[11], state[19], state[27], + state[35], state[43], state[51], state[59] ); + BLAKE2_ROUND( state[ 4], state[12], state[20], state[28], + state[36], state[44], state[52], state[60] ); + BLAKE2_ROUND( state[ 5], state[13], state[21], state[29], + state[37], state[45], state[53], state[61] ); + BLAKE2_ROUND( state[ 6], state[14], state[22], state[30], + state[38], state[46], state[54], state[62] ); + BLAKE2_ROUND( state[ 7], state[15], state[23], state[31], + state[39], state[47], state[55], state[63] ); + +/* + for (i = 0; i < 8; ++i) { + BLAKE2_ROUND(state[8 * i + 0], state[8 * i + 1], state[8 * i + 2], + state[8 * i + 3], state[8 * i + 4], state[8 * i + 5], + state[8 * i + 6], state[8 * i + 7]); + } + + for (i = 0; i < 8; ++i) { + BLAKE2_ROUND(state[8 * 0 + i], state[8 * 1 + i], state[8 * 2 + i], + state[8 * 3 + i], state[8 * 4 + i], state[8 * 5 + i], + state[8 * 6 + i], state[8 * 7 + i]); + } +*/ + for (i = 0; i < ARGON2_OWORDS_IN_BLOCK; i++) { + state[i] = _mm_xor_si128(state[i], block_XY[i]); + _mm_storeu_si128((__m128i *)next_block->v + i, state[i]); + } +} + +#endif + +#if 0 +static void next_addresses(block *address_block, block *input_block) { + /*Temporary zero-initialized blocks*/ +#if defined(__AVX512F__) + __m512i zero_block[ARGON2_512BIT_WORDS_IN_BLOCK]; + __m512i zero2_block[ARGON2_512BIT_WORDS_IN_BLOCK]; +#elif defined(__AVX2__) + __m256i zero_block[ARGON2_HWORDS_IN_BLOCK]; + __m256i zero2_block[ARGON2_HWORDS_IN_BLOCK]; +#else + __m128i zero_block[ARGON2_OWORDS_IN_BLOCK]; + __m128i zero2_block[ARGON2_OWORDS_IN_BLOCK]; +#endif + + memset(zero_block, 0, sizeof(zero_block)); + memset(zero2_block, 0, sizeof(zero2_block)); + + /*Increasing index counter*/ + input_block->v[6]++; + + /*First iteration of G*/ + fill_block(zero_block, input_block, address_block, 0); + + /*Second iteration of G*/ + fill_block(zero2_block, address_block, address_block, 0); +} +#endif + +void fill_segment(const argon2_instance_t *instance, + argon2_position_t position) { + block *ref_block = NULL, *curr_block = NULL; +// block address_block, input_block; + uint64_t pseudo_rand, ref_index, ref_lane; + uint32_t prev_offset, curr_offset; + uint32_t starting_index, i; +#if defined(__AVX512F__) + __m512i state[ARGON2_512BIT_WORDS_IN_BLOCK]; +#elif defined(__AVX2__) + __m256i state[ARGON2_HWORDS_IN_BLOCK]; +#else + __m128i state[ARGON2_OWORDS_IN_BLOCK]; +#endif +// int data_independent_addressing; + + if (instance == NULL) { + return; + } + + // data_independent_addressing = + // (instance->type == Argon2_i) || + // (instance->type == Argon2_id && (position.pass == 0) && + // (position.slice < ARGON2_SYNC_POINTS / 2)); + + // if (data_independent_addressing) { + // init_block_value(&input_block, 0); + + // input_block.v[0] = position.pass; + // input_block.v[1] = position.lane; + // input_block.v[2] = position.slice; + // input_block.v[3] = instance->memory_blocks; + // input_block.v[4] = instance->passes; + // input_block.v[5] = instance->type; + // } + + starting_index = 0; + + if ((0 == position.pass) && (0 == position.slice)) { + starting_index = 2; /* we have already generated the first two blocks */ + + /* Don't forget to generate the first block of addresses: */ +// if (data_independent_addressing) { +// next_addresses(&address_block, &input_block); +// } + } + + /* Offset of the current block */ + curr_offset = position.lane * instance->lane_length + + position.slice * instance->segment_length + starting_index; + + if (0 == curr_offset % instance->lane_length) { + /* Last block in this lane */ + prev_offset = curr_offset + instance->lane_length - 1; + } else { + /* Previous block */ + prev_offset = curr_offset - 1; + } + + memcpy(state, ((instance->memory + prev_offset)->v), ARGON2_BLOCK_SIZE); + + for (i = starting_index; i < instance->segment_length; + ++i, ++curr_offset, ++prev_offset) { + /*1.1 Rotating prev_offset if needed */ + if (curr_offset % instance->lane_length == 1) { + prev_offset = curr_offset - 1; + } + + /* 1.2 Computing the index of the reference block */ + /* 1.2.1 Taking pseudo-random value from the previous block */ +// if (data_independent_addressing) { +// if (i % ARGON2_ADDRESSES_IN_BLOCK == 0) { +// next_addresses(&address_block, &input_block); +// } +// pseudo_rand = address_block.v[i % ARGON2_ADDRESSES_IN_BLOCK]; +// } else { + pseudo_rand = instance->memory[prev_offset].v[0]; +// } + + /* 1.2.2 Computing the lane of the reference block */ + ref_lane = ((pseudo_rand >> 32)) % instance->lanes; + + if ((position.pass == 0) && (position.slice == 0)) { + /* Can not reference other lanes yet */ + ref_lane = position.lane; + } + + /* 1.2.3 Computing the number of possible reference block within the + * lane. + */ + position.index = i; + ref_index = index_alpha(instance, &position, pseudo_rand & 0xFFFFFFFF, + ref_lane == position.lane); + + /* 2 Creating a new block */ + ref_block = + instance->memory + instance->lane_length * ref_lane + ref_index; + curr_block = instance->memory + curr_offset; + if (ARGON2_VERSION_10 == instance->version) { + /* version 1.2.1 and earlier: overwrite, not XOR */ + fill_block(state, ref_block, curr_block, 0); + } else { + if(0 == position.pass) { + fill_block(state, ref_block, curr_block, 0); + } else { + fill_block(state, ref_block, curr_block, 1); + } + } + } +} diff --git a/stratum/algos/argon2d/thread.c b/stratum/algos/argon2d/thread.c new file mode 100644 index 000000000..e099a00d2 --- /dev/null +++ b/stratum/algos/argon2d/thread.c @@ -0,0 +1,57 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#if !defined(ARGON2_NO_THREADS) + +#include "thread.h" +#if defined(_WIN32) +#include +#endif + +int argon2_thread_create(argon2_thread_handle_t *handle, + argon2_thread_func_t func, void *args) { + if (NULL == handle || func == NULL) { + return -1; + } +#if defined(_WIN32) + *handle = _beginthreadex(NULL, 0, func, args, 0, NULL); + return *handle != 0 ? 0 : -1; +#else + return pthread_create(handle, NULL, func, args); +#endif +} + +int argon2_thread_join(argon2_thread_handle_t handle) { +#if defined(_WIN32) + if (WaitForSingleObject((HANDLE)handle, INFINITE) == WAIT_OBJECT_0) { + return CloseHandle((HANDLE)handle) != 0 ? 0 : -1; + } + return -1; +#else + return pthread_join(handle, NULL); +#endif +} + +void argon2_thread_exit(void) { +#if defined(_WIN32) + _endthreadex(0); +#else + pthread_exit(NULL); +#endif +} + +#endif /* ARGON2_NO_THREADS */ diff --git a/stratum/algos/argon2d/thread.h b/stratum/algos/argon2d/thread.h new file mode 100644 index 000000000..49d88367b --- /dev/null +++ b/stratum/algos/argon2d/thread.h @@ -0,0 +1,67 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef ARGON2_THREAD_H +#define ARGON2_THREAD_H + +#if !defined(ARGON2_NO_THREADS) + +/* + Here we implement an abstraction layer for the simpĺe requirements + of the Argon2 code. We only require 3 primitives---thread creation, + joining, and termination---so full emulation of the pthreads API + is unwarranted. Currently we wrap pthreads and Win32 threads. + + The API defines 2 types: the function pointer type, + argon2_thread_func_t, + and the type of the thread handle---argon2_thread_handle_t. +*/ +#if defined(_WIN32) +#include +typedef unsigned(__stdcall *argon2_thread_func_t)(void *); +typedef uintptr_t argon2_thread_handle_t; +#else +#include +typedef void *(*argon2_thread_func_t)(void *); +typedef pthread_t argon2_thread_handle_t; +#endif + +/* Creates a thread + * @param handle pointer to a thread handle, which is the output of this + * function. Must not be NULL. + * @param func A function pointer for the thread's entry point. Must not be + * NULL. + * @param args Pointer that is passed as an argument to @func. May be NULL. + * @return 0 if @handle and @func are valid pointers and a thread is successfully + * created. + */ +int argon2_thread_create(argon2_thread_handle_t *handle, + argon2_thread_func_t func, void *args); + +/* Waits for a thread to terminate + * @param handle Handle to a thread created with argon2_thread_create. + * @return 0 if @handle is a valid handle, and joining completed successfully. +*/ +int argon2_thread_join(argon2_thread_handle_t handle); + +/* Terminate the current thread. Must be run inside a thread created by + * argon2_thread_create. +*/ +void argon2_thread_exit(void); + +#endif /* ARGON2_NO_THREADS */ +#endif diff --git a/stratum/algos/argon2m.c b/stratum/algos/argon2m.c new file mode 100644 index 000000000..db72b66fd --- /dev/null +++ b/stratum/algos/argon2m.c @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include +#include "sysendian.h" +#include "argon2d/argon2.h" +#include "argon2d/core.h" + +static const size_t INPUT_BYTES = 80; +static const size_t OUTPUT_BYTES = 32; +static const unsigned int DEFAULT_ARGON2_FLAG = 2; + +void argon2m_hash(const char* input, char* output, uint32_t len) +{ + argon2_context context; + context.out = (uint8_t *)output; + context.outlen = (uint32_t)OUTPUT_BYTES; + context.pwd = (uint8_t *)input; + context.pwdlen = (uint32_t)INPUT_BYTES; + context.salt = (uint8_t *)input; + context.saltlen = (uint32_t)INPUT_BYTES; + context.secret = NULL; + context.secretlen = 0; + context.ad = NULL; + context.adlen = 0; + context.allocate_cbk = NULL; + context.free_cbk = NULL; + context.flags = DEFAULT_ARGON2_FLAG; + context.m_cost = 2; + context.lanes = 1; + context.threads = 1; + context.t_cost = 1; + context.version = ARGON2_VERSION_13; + + argon2_ctx( &context, Argon2_id ); +} diff --git a/stratum/algos/argon2m.h b/stratum/algos/argon2m.h new file mode 100644 index 000000000..d34fea37f --- /dev/null +++ b/stratum/algos/argon2m.h @@ -0,0 +1,11 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void argon2m_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif diff --git a/stratum/config.sample/argon2m.conf b/stratum/config.sample/argon2m.conf new file mode 100644 index 000000000..d7631b0b5 --- /dev/null +++ b/stratum/config.sample/argon2m.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 4234 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = argon2m +difficulty = 4 +max_ttf = 40000 + From fa3774a89fd86c7f9ba82bb60c000b56bfdc7081 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sun, 17 Feb 2019 21:18:32 -0500 Subject: [PATCH 277/576] update --- stratum/algos/makefile | 4 ++-- stratum/algos/makefile.bak | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 76147288d..ddc57d57e 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -18,8 +18,8 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ - argon2m.c blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ - hive.c pomelo.c hex.c \ + blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ + hive.c pomelo.c hex.c argon2m.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index 631024133..76147288d 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -18,8 +18,9 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ - argon2a.c blake2/blake2b.c ar2/argon2.c ar2/core.c ar2/encoding.c ar2/opt.c ar2/thread.c ar2/ar2-scrypt-jane.c \ - hive.c pomelo.c hex.c argon2d-dyn.c \ + argon2m.c blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ + hive.c pomelo.c hex.c \ + phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c From 4cf2818327ffb3b4ede0c052434c693018ccc9ef Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 17 Feb 2019 21:23:38 -0500 Subject: [PATCH 278/576] Update makefile --- stratum/algos/makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index ddc57d57e..9588567ac 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -20,7 +20,6 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ hive.c pomelo.c hex.c argon2m.c \ - phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c From f1ccd9b5408535b5b5357f6c60f531ae972df53f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 17 Feb 2019 21:28:13 -0500 Subject: [PATCH 279/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 8114ce8fc..b7c902dfc 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -19,7 +19,7 @@ function yaamp_get_algos() 'blakecoin', 'blake2s', 'blake2b', - 'cuckoo', + 'argon2m', 'decred', 'deep', 'exosis', @@ -99,7 +99,6 @@ function yaamp_algo_mBTC_factor($algo) case 'blakecoin': case 'blake2s': case 'blake2b': - case 'cuckoo': case 'decred': case 'keccak': case 'keccakc': @@ -125,6 +124,7 @@ function yaamp_get_algo_norm($algo) 'x11' => 1.0, 'x13' => 1.0, 'argon2' => 1.0, + 'argon2m' => 1.0, 'argon2d-dyn' => 1.0, 'lyra2' => 1.0, 'lyra2v2' => 1.0, @@ -162,7 +162,6 @@ function getAlgoColors($algo) 'neoscrypt' => '#a0d0f0', 'scryptn' => '#d0d0d0', 'c11' => '#a0a0d0', - 'cuckoo' => '#9696dd', 'decred' => '#f0f0f0', 'deep' => '#e0ffff', 'x11' => '#f0f0a0', @@ -182,6 +181,7 @@ function getAlgoColors($algo) 'xevan' => '#f0b0a0', 'allium' => '#80a0d0', 'argon2' => '#e0d0e0', + 'argon2m' => '#e0d0e0', 'argon2d-dyn' => '#e0d0e0', 'aergo' => '#e0d0e0', 'bastion' => '#e0b0b0', @@ -250,7 +250,6 @@ function getAlgoPort($algo) 'sha256' => 3333, 'sha256t' => 3339, 'sha256q' => 3337, - 'cuckoo' => 8633, 'lbry' => 3334, 'scrypt' => 3433, 'timetravel' => 3555, @@ -279,7 +278,8 @@ function getAlgoPort($algo) 'quark' => 4033, 'whirlpool' => 4133, 'neoscrypt' => 4233, - 'argon2' => 4234, + 'argon2' => 4235, + 'argon2m' => 4234, 'argon2d-dyn' => 4239, 'scryptn' => 4333, 'allium' => 4443, From cf8322725926e25673b755c7bc1bc277b00e3511 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 18 Feb 2019 00:06:31 -0500 Subject: [PATCH 280/576] Update found_results.php --- .../modules/site/results/found_results.php | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/web/yaamp/modules/site/results/found_results.php b/web/yaamp/modules/site/results/found_results.php index e37a6365b..4de591e02 100644 --- a/web/yaamp/modules/site/results/found_results.php +++ b/web/yaamp/modules/site/results/found_results.php @@ -9,19 +9,32 @@ function WriteBoxHeader($title) $showrental = (bool) YAAMP_RENTAL; -$algo = user()->getState('yaamp-algo'); +$algo_from_query_param = getparam('algo'); + if($algo_from_query_param) { + // Query param is set + if($algo_from_query_param != 'all') { + $r_algo = array_map('trim', explode(',', $algo_from_query_param)); + $r_algo = preg_replace('/[^A-Za-z0-9\-]/', '', $r_algo); + } + } else { + // Filter out algo from user's preferences + $algo_from_user_pref = user()->getState('yaamp-algo'); + if($algo_from_user_pref != 'all') { + $r_algo = array($algo_from_user_pref); + } +} $count = getparam('count'); $count = $count? $count: 50; -WriteBoxHeader("Last $count Blocks ($algo)"); +$algo_header = isset($r_algo) ? implode(',', $r_algo) : 'any algo'; +WriteBoxHeader("Last $count Blocks ($algo_header)"); $criteria = new CDbCriteria(); $criteria->condition = "t.category NOT IN ('stake','generated')"; $criteria->condition .= " AND IFNULL(coin.visible,1)=1"; // ifnull for rental -if($algo != 'all') { - $criteria->condition .= " AND t.algo=:algo"; - $criteria->params = array(':algo'=>$algo); +if(isset($r_algo)) { + $criteria->addInCondition('t.algo', $r_algo); } $criteria->limit = $count; $criteria->order = 't.time DESC'; From 15489cd121e1b7bc8236ab7cad39e784d23d1a92 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 13:13:28 -0500 Subject: [PATCH 281/576] Update ExchangeCommand.php --- web/yaamp/commands/ExchangeCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/yaamp/commands/ExchangeCommand.php b/web/yaamp/commands/ExchangeCommand.php index 476ff06a5..cf60b1dbd 100644 --- a/web/yaamp/commands/ExchangeCommand.php +++ b/web/yaamp/commands/ExchangeCommand.php @@ -202,8 +202,8 @@ public function testApiKeys() $balance = kraken_api_user('Balance'); echo("kraken btc: ".json_encode($balance)."\n"); } - if (!empty(EXCH_KUCOIN_KEY)) { - $balance = kucoin_api_user('account/BTC/balance'); + if (!empty(EXCH_KUCOIN_KEY) && !empty(EXCH_KUCOIN_PASSPHRASE)) { + $balance = kucoin_api_user('accounts',array('currency'=>'BTC')); if (!is_object($balance) || !isset($balance->data)) echo "kucoin error ".json_encode($balance)."\n"; else echo("kucoin: ".json_encode($balance->data)."\n"); } From 05c8e92b09dcf0a8802fbb78244774c18d2e9204 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 13:14:07 -0500 Subject: [PATCH 282/576] Update rawcoins.php --- web/yaamp/core/backend/rawcoins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/core/backend/rawcoins.php b/web/yaamp/core/backend/rawcoins.php index 4d0c455d8..3678dd629 100644 --- a/web/yaamp/core/backend/rawcoins.php +++ b/web/yaamp/core/backend/rawcoins.php @@ -371,7 +371,7 @@ function updateRawcoins() } if (!exchange_get('kucoin', 'disabled')) { - $list = kucoin_api_query('market/open/coins'); + $list = kucoin_api_query('currencies'); if(is_object($list) && isset($list->data) && !empty($list->data)) { dborun("UPDATE markets SET deleted=true WHERE name='kucoin'"); From c43cb456e356ec00a828474aff4693eee6f5d6d3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 13:14:40 -0500 Subject: [PATCH 283/576] Update rawcoins.php --- web/yaamp/core/backend/rawcoins.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/yaamp/core/backend/rawcoins.php b/web/yaamp/core/backend/rawcoins.php index 3678dd629..769dea997 100644 --- a/web/yaamp/core/backend/rawcoins.php +++ b/web/yaamp/core/backend/rawcoins.php @@ -376,8 +376,8 @@ function updateRawcoins() { dborun("UPDATE markets SET deleted=true WHERE name='kucoin'"); foreach($list->data as $item) { - $symbol = $item->coin; - $name = $item->name; + $symbol = $item->name; + $name = $item->fullName; if (strpos($item->withdrawRemark,'Ethereum')) continue; updateRawCoin('kucoin', $symbol, $name); } From fd6917080956161dc87472f191858bd00e3c4c8e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 13:15:31 -0500 Subject: [PATCH 284/576] Update kucoin.php --- web/yaamp/core/exchange/kucoin.php | 45 +++++++++++++++++------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/web/yaamp/core/exchange/kucoin.php b/web/yaamp/core/exchange/kucoin.php index 743c86e2b..474846c84 100644 --- a/web/yaamp/core/exchange/kucoin.php +++ b/web/yaamp/core/exchange/kucoin.php @@ -8,14 +8,14 @@ function kucoin_result_valid($obj, $method='') return true; } -// https://api.kucoin.com/v1/open/symbols/?market=BTC +// https://openapi-v2.kucoin.com/api/v1/symbols?market=BTC +// https://openapi-v2.kucoin.com/api/v1/currencies for labels function kucoin_api_query($method, $params='', $returnType='object') { $exchange = 'kucoin'; - $url = "https://api.kucoin.com/v1/$method/"; - if (!empty($params)) - $url .= "?$params"; + $url = "https://openapi-v2.kucoin.com/api/v1/$method"; + if (!empty($params)) $url .= "?$params"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @@ -46,7 +46,7 @@ function kucoin_api_query($method, $params='', $returnType='object') return $ret; } -// https://api.kucoin.com/v1/account//wallet/address +// https://openapi-v2.kucoin.com/api/v1/deposit-addresses?currency= function kucoin_api_user($method, $params=NULL, $isPostMethod=false) { @@ -55,26 +55,33 @@ function kucoin_api_user($method, $params=NULL, $isPostMethod=false) if (!defined('EXCH_KUCOIN_SECRET')) define('EXCH_KUCOIN_SECRET', ''); if (empty(EXCH_KUCOIN_KEY) || empty(EXCH_KUCOIN_SECRET)) return false; + if (empty(EXCH_KUCOIN_PASSPHRASE)) return false; - $api_host = 'https://api.kucoin.com'; + $api_host = 'https://openapi-v2.kucoin.com'; $mt = explode(' ', microtime()); $nonce = $mt[1].substr($mt[0], 2, 3); - $url = $endpoint = "/v1/$method"; - $tosign = "$endpoint/$nonce/"; + $url = $endpoint = "/api/v1/$method"; if (empty($params)) $params = array(); $query = http_build_query($params); - if (strlen($query) && !$isPostMethod) { - $url .= '&'.$query; $query = ''; + $body = ""; + if ($isPostMethod) + $body = json_encode($params); + else if (strlen($query)) { + $body = '?'.$query; + $url .= $body; } - if ($isPostMethod) $post_data = $params; - $hmac = strtolower(hash_hmac('sha256', base64_encode($tosign.$query), EXCH_KUCOIN_SECRET)); + + $req = $isPostMethod ? "POST" : "GET"; + $tosign = "{$nonce}{$req}{$endpoint}{$body}"; + $hmac = hash_hmac('sha256', $tosign, EXCH_KUCOIN_SECRET, true); $headers = array( 'Content-Type: application/json;charset=UTF-8', 'KC-API-KEY: '.EXCH_KUCOIN_KEY, - 'KC-API-NONCE: '.$nonce, - 'KC-API-SIGNATURE: '.$hmac, + 'KC-API-PASSPHRASE: '.EXCH_KUCOIN_PASSPHRASE, + 'KC-API-TIMESTAMP: '.$nonce, + 'KC-API-SIGN: '.base64_encode($hmac), ); $ch = curl_init(); @@ -83,7 +90,7 @@ function kucoin_api_user($method, $params=NULL, $isPostMethod=false) curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); if ($isPostMethod) { curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); + curl_setopt($ch, CURLOPT_POSTFIELDS, $params); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); @@ -138,14 +145,14 @@ function kucoin_update_market($market) } $t1 = microtime(true); - $query = kucoin_api_query("$pair/open/tick"); + $query = kucoin_api_query('market/orderbook/level1','symbol='.$pair); if(!kucoin_result_valid($query)) return false; $ticker = $query->data; - $price2 = ((double) $ticker->buy + (double)$ticker->sell)/2; + $price2 = ((double) $ticker->bestBid + (double)$ticker->bestAsk)/2; $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->buy); - $market->pricetime = time(); + $market->price = AverageIncrement($market->price, $ticker->bestBid); + $market->pricetime = min(time(), 0 + $ticker->sequence); $market->save(); $apims = round((microtime(true) - $t1)*1000,3); From 588afec89b8db9c1d5e9ae7552d0ae1a04ed1ebf Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 20:44:33 -0500 Subject: [PATCH 285/576] Create phi1612.h --- stratum/algos/phi1612.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/phi1612.h diff --git a/stratum/algos/phi1612.h b/stratum/algos/phi1612.h new file mode 100644 index 000000000..7b59354dd --- /dev/null +++ b/stratum/algos/phi1612.h @@ -0,0 +1,16 @@ +#ifndef PHI1612_H +#define PHI1612_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void phi1612_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From b52b51216613c28ed3acd7d334e055291f804e87 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 20:44:52 -0500 Subject: [PATCH 286/576] Create phi1612.c --- stratum/algos/phi1612.c | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 stratum/algos/phi1612.c diff --git a/stratum/algos/phi1612.c b/stratum/algos/phi1612.c new file mode 100644 index 000000000..76e128726 --- /dev/null +++ b/stratum/algos/phi1612.c @@ -0,0 +1,51 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "gost.h" + +#include "common.h" + +void phi1612_hash(const char* input, char* output, uint32_t len) +{ + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_cubehash512_context ctx_cubehash; + sph_fugue512_context ctx_fugue; + sph_gost512_context ctx_gost; + sph_echo512_context ctx_echo; + + uint8_t hash[64]; + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, input, 80); + sph_skein512_close(&ctx_skein, (void*) hash); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, (const void*) hash, 64); + sph_jh512_close(&ctx_jh, (void*) hash); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, (const void*) hash, 64); + sph_cubehash512_close(&ctx_cubehash, (void*) hash); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, (const void*) hash, 64); + sph_fugue512_close(&ctx_fugue, (void*) hash); + + sph_gost512_init(&ctx_gost); + sph_gost512(&ctx_gost, (const void*) hash, 64); + sph_gost512_close(&ctx_gost, (void*) hash); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, (const void*) hash, 64); + sph_echo512_close(&ctx_echo, (void*) hash); + + memcpy(output, hash, 32); +} From bf0b6f81e09150cd11796bdf664b41c3d05dbf3f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 20:48:26 -0500 Subject: [PATCH 287/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 9588567ac..aa43e26e4 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -21,7 +21,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ hive.c pomelo.c hex.c argon2m.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ - yespower.c yespower-opt.c sha256-P.c dedal.c + yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) OUTPUT=libalgos.a From 7f4a4936a7b37d349db16029e9e5c05d4c7581b5 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 20:54:34 -0500 Subject: [PATCH 288/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index df44be761..8abe869d4 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -179,6 +179,7 @@ YAAMP_ALGO g_algos[] = {"phi", phi_hash, 1, 0, 0}, {"phi2", phi2_hash, 0x100, 0, 0}, + {"phi1612", phi1612_hash, 0x100, 0, 0}, {"polytimos", polytimos_hash, 1, 0, 0}, {"skunk", skunk_hash, 1, 0, 0}, From 2cb0e1966626db00c34087aea0b20d3ee7983f84 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 20:55:06 -0500 Subject: [PATCH 289/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index b3d009d2a..4ffc4d779 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -215,6 +215,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/m7m.h" #include "algos/phi.h" #include "algos/phi2.h" +#include "algos/phi1612.h" #include "algos/polytimos.h" #include "algos/sonoa.h" #include "algos/tribus.h" From fd5f7ccde7070233f4e3cd25563521fb24548494 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 21:01:46 -0500 Subject: [PATCH 290/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index b7c902dfc..aca3cd443 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -67,6 +67,7 @@ function yaamp_get_algos() 'm7m', 'phi', 'phi2', + 'phi1612', 'sib', 'skein', 'skein2', @@ -215,6 +216,7 @@ function getAlgoColors($algo) 'lyra2v3' => '#80a0f0', 'phi' => '#a0a0e0', 'phi2' => '#a0a0e0', + 'phi1612' => '#a0a0e0', 'polytimos' => '#dedefe', 'sib' => '#a0a0c0', 'skein' => '#80a0a0', @@ -325,6 +327,7 @@ function getAlgoPort($algo) 'hsr' => 7433, 'phi' => 8333, 'phi2' => 8332, + 'phi1612' => 8333, 'polytimos' => 8463, 'skunk' => 8433, 'tribus' => 8533, From 41078c12ebcaf9a82a4b7c7fb849e6774d9e2f19 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 21:02:41 -0500 Subject: [PATCH 291/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index aca3cd443..bef12de5f 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -327,7 +327,7 @@ function getAlgoPort($algo) 'hsr' => 7433, 'phi' => 8333, 'phi2' => 8332, - 'phi1612' => 8333, + 'phi1612' => 8334, 'polytimos' => 8463, 'skunk' => 8433, 'tribus' => 8533, From 3de9a77caacc6cb317b0c6956b3f838a164fe919 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 21:32:14 -0500 Subject: [PATCH 292/576] Update client_submit.cpp --- stratum/client_submit.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 61e840999..839e5da0a 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -250,16 +250,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL snprintf(block_hex, block_size, "%s", hex); } - if(g_current_algo->name && !strcmp("FOX", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } - bool b = coind_submit(coind, block_hex); if(b) { From e31828bf831493ec1a5c683216650fe1515009c6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:00:34 -0500 Subject: [PATCH 293/576] Update phi1612.c --- stratum/algos/phi1612.c | 68 ++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/stratum/algos/phi1612.c b/stratum/algos/phi1612.c index 76e128726..cea04ff47 100644 --- a/stratum/algos/phi1612.c +++ b/stratum/algos/phi1612.c @@ -14,38 +14,38 @@ void phi1612_hash(const char* input, char* output, uint32_t len) { - sph_skein512_context ctx_skein; - sph_jh512_context ctx_jh; - sph_cubehash512_context ctx_cubehash; - sph_fugue512_context ctx_fugue; - sph_gost512_context ctx_gost; - sph_echo512_context ctx_echo; - - uint8_t hash[64]; - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, input, 80); - sph_skein512_close(&ctx_skein, (void*) hash); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, (const void*) hash, 64); - sph_jh512_close(&ctx_jh, (void*) hash); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, (const void*) hash, 64); - sph_cubehash512_close(&ctx_cubehash, (void*) hash); - - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, (const void*) hash, 64); - sph_fugue512_close(&ctx_fugue, (void*) hash); - - sph_gost512_init(&ctx_gost); - sph_gost512(&ctx_gost, (const void*) hash, 64); - sph_gost512_close(&ctx_gost, (void*) hash); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, (const void*) hash, 64); - sph_echo512_close(&ctx_echo, (void*) hash); - - memcpy(output, hash, 32); + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_cubehash512_context ctx_cubehash; + sph_fugue512_context ctx_fugue; + sph_gost512_context ctx_gost; + sph_echo512_context ctx_echo; + + uint8_t _ALIGN(128) hash[64]; + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, input, len); + sph_skein512_close(&ctx_skein, (void*) hash); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, (const void*) hash, 64); + sph_jh512_close(&ctx_jh, (void*) hash); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, (const void*) hash, 64); + sph_cubehash512_close(&ctx_cubehash, (void*) hash); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, (const void*) hash, 64); + sph_fugue512_close(&ctx_fugue, (void*) hash); + + sph_gost512_init(&ctx_gost); + sph_gost512(&ctx_gost, (const void*) hash, 64); + sph_gost512_close(&ctx_gost, (void*) hash); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, (const void*) hash, 64); + sph_echo512_close(&ctx_echo, (void*) hash); + + memcpy(output, hash, 32); } From 01b1d5d0f9eaf5dc14ceecd40e459ecec365a3a7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:02:50 -0500 Subject: [PATCH 294/576] Update stratum.cpp --- stratum/stratum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 8abe869d4..83569bb18 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -179,7 +179,7 @@ YAAMP_ALGO g_algos[] = {"phi", phi_hash, 1, 0, 0}, {"phi2", phi2_hash, 0x100, 0, 0}, - {"phi1612", phi1612_hash, 0x100, 0, 0}, + {"phi1612", phi1612_hash, 1, 0, 0}, {"polytimos", polytimos_hash, 1, 0, 0}, {"skunk", skunk_hash, 1, 0, 0}, From a538671bbe1aaac441f85939b04dbaee86028b29 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:11:30 -0500 Subject: [PATCH 295/576] Create bcd.c --- stratum/algos/bcd.c | 99 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 stratum/algos/bcd.c diff --git a/stratum/algos/bcd.c b/stratum/algos/bcd.c new file mode 100644 index 000000000..447ff1046 --- /dev/null +++ b/stratum/algos/bcd.c @@ -0,0 +1,99 @@ +#include "bcd.h" +#include +#include +#include +#include + +#include "../sha3/sph_blake.h" +#include "../sha3/sph_bmw.h" +#include "../sha3/sph_groestl.h" +#include "../sha3/sph_jh.h" +#include "../sha3/sph_keccak.h" +#include "../sha3/sph_skein.h" +#include "../sha3/sph_luffa.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_shavite.h" +#include "../sha3/sph_simd.h" +#include "../sha3/sph_echo.h" +#include "../sha3/sph_hamsi.h" +#include "../sha3/sph_fugue.h" +#include "../sha3/sph_sm3.h" + +#include "common.h" + +void bcd_hash(const char* input, char* output, uint32_t len) +{ + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sm3_ctx_t ctx_sm3; + sph_cubehash512_context ctx_cubehash1; + sph_shavite512_context ctx_shavite1; + sph_simd512_context ctx_simd1; + sph_echo512_context ctx_echo1; + sph_hamsi512_context ctx_hamsi1; + sph_fugue512_context ctx_fugue1; + + uint32_t hashA[16], hashB[16]; + + sph_blake512_init(&ctx_blake); + sph_blake512 (&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, hashA); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512 (&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512 (&ctx_groestl, hashB, 64); + sph_groestl512_close(&ctx_groestl, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512 (&ctx_skein, hashA, 64); + sph_skein512_close (&ctx_skein, hashB); + + sph_jh512_init(&ctx_jh); + sph_jh512 (&ctx_jh, hashB, 64); + sph_jh512_close(&ctx_jh, hashA); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512 (&ctx_keccak, hashA, 64); + sph_keccak512_close(&ctx_keccak, hashB); + + memset(hashA, 0, sizeof(hashA)); + sm3_init(&ctx_sm3); + sph_sm3(&ctx_sm3, hashB, 64); + sph_sm3_close(&ctx_sm3, hashA); + + sph_cubehash512_init (&ctx_cubehash1); + sph_cubehash512 (&ctx_cubehash1, hashA, 64); + sph_cubehash512_close(&ctx_cubehash1, hashB); + + sph_shavite512_init (&ctx_shavite1); + sph_shavite512 (&ctx_shavite1, hashB, 64); + sph_shavite512_close(&ctx_shavite1, hashA); + + sph_simd512_init (&ctx_simd1); + sph_simd512 (&ctx_simd1, hashA, 64); + sph_simd512_close(&ctx_simd1, hashB); + + sph_echo512_init (&ctx_echo1); + sph_echo512 (&ctx_echo1, hashB, 64); + sph_echo512_close(&ctx_echo1, hashA); + + sph_hamsi512_init (&ctx_hamsi1); + sph_hamsi512 (&ctx_hamsi1, hashA, 64); + sph_hamsi512_close(&ctx_hamsi1, hashB); + + sph_fugue512_init (&ctx_fugue1); + sph_fugue512 (&ctx_fugue1, hashB, 64); + sph_fugue512_close(&ctx_fugue1, hashA); + + + + memcpy(output, hashA, 32); + +} From 6160b74e0a277eb8ae589eef88646c34cec8fa08 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:11:52 -0500 Subject: [PATCH 296/576] Create bcd.h --- stratum/algos/bcd.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/bcd.h diff --git a/stratum/algos/bcd.h b/stratum/algos/bcd.h new file mode 100644 index 000000000..30b2c028f --- /dev/null +++ b/stratum/algos/bcd.h @@ -0,0 +1,16 @@ +#ifndef BCD_H +#define BCD_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void bcd_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From c5af50cd52a4e0178c681a21ee5bc4709de6693b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:13:12 -0500 Subject: [PATCH 297/576] Update hsr14.c --- stratum/algos/hsr14.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stratum/algos/hsr14.c b/stratum/algos/hsr14.c index b31decdb4..b1a589f68 100644 --- a/stratum/algos/hsr14.c +++ b/stratum/algos/hsr14.c @@ -16,6 +16,7 @@ #include "../sha3/sph_echo.h" #include "../sha3/sph_hamsi.h" #include "../sha3/sph_fugue.h" +#include "../sha3/sph_sm3.h" #include "sm3.h" @@ -87,7 +88,7 @@ void hsr_hash(const char* input, char* output, uint32_t len) sm3_init(&ctx_sm3); sm3_update(&ctx_sm3, hash, 64); memset(hash, 0, sizeof hash); - sm3_close(&ctx_sm3, hash); + sph_sm3_close(&ctx_sm3, hash); sph_hamsi512_init(&ctx_hamsi1); sph_hamsi512(&ctx_hamsi1, hash, 64); From 268b05096b759569a84ce6f3379f74e621ed6059 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:13:41 -0500 Subject: [PATCH 298/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index aa43e26e4..1a9dd57ae 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -21,7 +21,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ hive.c pomelo.c hex.c argon2m.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ - yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c + yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) OUTPUT=libalgos.a From 43a1f5a6f82e52350abdc1d0b9ad255a6a43a3c4 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:14:27 -0500 Subject: [PATCH 299/576] Update makefile --- stratum/sha3/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/sha3/makefile b/stratum/sha3/makefile index 4b0df93ba..f2bd096cd 100644 --- a/stratum/sha3/makefile +++ b/stratum/sha3/makefile @@ -7,7 +7,7 @@ LDFLAGS=-O2 SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c \ sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ - blake2s.c blake2b.c sha2.c + blake2s.c blake2b.c sha2.c sph_sm3.c OBJECTS=$(SOURCES:.c=.o) OUTPUT=libhash.a From 52b7562d482e73b08dc4daa8f86b60c827084679 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:17:12 -0500 Subject: [PATCH 300/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 83569bb18..8400565b7 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -125,6 +125,7 @@ YAAMP_ALGO g_algos[] = {"x14", x14_hash, 1, 0, 0}, {"x15", x15_hash, 1, 0, 0}, {"x17", x17_hash, 1, 0, 0}, + {"bcd", bcd_hash, 1, 0, 0}, {"x18", x18_hash, 1, 0, 0}, {"x20r", x20r_hash, 0x100, 0, 0}, {"x21s", x21s_hash, 0x100, 0, 0}, From 8be24634ef93d554ce6f66b9fa916c5cc0fbd50f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:18:06 -0500 Subject: [PATCH 301/576] Update stratum.h --- stratum/stratum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.h b/stratum/stratum.h index 4ffc4d779..87862ce98 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -194,7 +194,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/skunk.h" #include "algos/timetravel.h" #include "algos/bitcore.h" - +#include "algos/bcd.h" #include "algos/bastion.h" #include "algos/bmw.h" #include "algos/deep.h" From 59d3c83f5102107474d90eb4ffad49abf57f019a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:19:02 -0500 Subject: [PATCH 302/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index bef12de5f..c59a89167 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -19,6 +19,7 @@ function yaamp_get_algos() 'blakecoin', 'blake2s', 'blake2b', + 'bcd', 'argon2m', 'decred', 'deep', @@ -162,6 +163,7 @@ function getAlgoColors($algo) 'scrypt' => '#c0c0e0', 'neoscrypt' => '#a0d0f0', 'scryptn' => '#d0d0d0', + 'bcd' => '#ffd880', 'c11' => '#a0a0d0', 'decred' => '#f0f0f0', 'deep' => '#e0ffff', @@ -313,6 +315,7 @@ function getAlgoPort($algo) 'blake2s' => 5766, 'blake2b' => 5777, 'penta' => 5833, + 'bcd' => 3643, 'rainforest' => 7443, 'luffa' => 5933, 'm7m' => 6033, From 71e994f1b31cac2c08c998a8f6a4a79375ae901a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:22:39 -0500 Subject: [PATCH 303/576] Update hsr14.c --- stratum/algos/hsr14.c | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/algos/hsr14.c b/stratum/algos/hsr14.c index b1a589f68..fc2de95c4 100644 --- a/stratum/algos/hsr14.c +++ b/stratum/algos/hsr14.c @@ -18,7 +18,6 @@ #include "../sha3/sph_fugue.h" #include "../sha3/sph_sm3.h" -#include "sm3.h" #include "common.h" From 399de2d269e95232f82d3e630ebed04c7b65762f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:26:13 -0500 Subject: [PATCH 304/576] Update sph_sm3.c From b4f025a1e3758a21456b02fca554c931459fef2d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:26:46 -0500 Subject: [PATCH 305/576] Update sph_sm3.h From 71ccb475212cae64e7c98cdf5cbed1f2bdfc3f0f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:30:25 -0500 Subject: [PATCH 306/576] Delete sm3.c --- stratum/algos/sm3.c | 220 -------------------------------------------- 1 file changed, 220 deletions(-) delete mode 100644 stratum/algos/sm3.c diff --git a/stratum/algos/sm3.c b/stratum/algos/sm3.c deleted file mode 100644 index b627cb8e1..000000000 --- a/stratum/algos/sm3.c +++ /dev/null @@ -1,220 +0,0 @@ -/* ==================================================================== - * Copyright (c) 2014 - 2017 The GmSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the GmSSL Project. - * (http://gmssl.org/)" - * - * 4. The name "GmSSL Project" must not be used to endorse or promote - * products derived from this software without prior written - * permission. For written permission, please contact - * guanzhi1980@gmail.com. - * - * 5. Products derived from this software may not be called "GmSSL" - * nor may "GmSSL" appear in their names without prior written - * permission of the GmSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the GmSSL Project - * (http://gmssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE GmSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 GmSSL PROJECT OR - * ITS 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 - -#include "sm3.h" - -void sm3_init(sm3_ctx_t *ctx) -{ - ctx->digest[0] = 0x7380166F; - ctx->digest[1] = 0x4914B2B9; - ctx->digest[2] = 0x172442D7; - ctx->digest[3] = 0xDA8A0600; - ctx->digest[4] = 0xA96F30BC; - ctx->digest[5] = 0x163138AA; - ctx->digest[6] = 0xE38DEE4D; - ctx->digest[7] = 0xB0FB0E4E; - - ctx->nblocks = 0; - ctx->num = 0; -} - -void sm3_update(sm3_ctx_t *ctx, const unsigned char* data, size_t data_len) -{ - if (ctx->num) { - unsigned int left = SM3_BLOCK_SIZE - ctx->num; - if (data_len < left) { - memcpy(ctx->block + ctx->num, data, data_len); - ctx->num += data_len; - return; - } else { - memcpy(ctx->block + ctx->num, data, left); - sm3_compress(ctx->digest, ctx->block); - ctx->nblocks++; - data += left; - data_len -= left; - } - } - while (data_len >= SM3_BLOCK_SIZE) { - sm3_compress(ctx->digest, data); - ctx->nblocks++; - data += SM3_BLOCK_SIZE; - data_len -= SM3_BLOCK_SIZE; - } - ctx->num = data_len; - if (data_len) { - memcpy(ctx->block, data, data_len); - } -} - -void sm3_close(void *cc, void *dst) -{ - sm3_final(cc, dst); - memset(cc, 0, sizeof(sm3_ctx_t)); -} - -void sm3_final(sm3_ctx_t *ctx, unsigned char *digest) -{ - int i; - uint32_t *pdigest = (uint32_t *)digest; - uint32_t *count = (uint32_t *)(ctx->block + SM3_BLOCK_SIZE - 8); - - ctx->block[ctx->num] = 0x80; - - if (ctx->num + 9 <= SM3_BLOCK_SIZE) { - memset(ctx->block + ctx->num + 1, 0, SM3_BLOCK_SIZE - ctx->num - 9); - } else { - memset(ctx->block + ctx->num + 1, 0, SM3_BLOCK_SIZE - ctx->num - 1); - sm3_compress(ctx->digest, ctx->block); - memset(ctx->block, 0, SM3_BLOCK_SIZE - 8); - } - - count[0] = cpu_to_be32((ctx->nblocks) >> 23); - count[1] = cpu_to_be32((ctx->nblocks << 9) + (ctx->num << 3)); - - sm3_compress(ctx->digest, ctx->block); - for (i = 0; i < sizeof(ctx->digest)/sizeof(ctx->digest[0]); i++) { - pdigest[i] = cpu_to_be32(ctx->digest[i]); - } -} - -#define ROTATELEFT(X,n) (((X)<<(n)) | ((X)>>(32-(n)))) - -#define P0(x) ((x) ^ ROTATELEFT((x),9) ^ ROTATELEFT((x),17)) -#define P1(x) ((x) ^ ROTATELEFT((x),15) ^ ROTATELEFT((x),23)) - -#define FF0(x,y,z) ( (x) ^ (y) ^ (z)) -#define FF1(x,y,z) (((x) & (y)) | ( (x) & (z)) | ( (y) & (z))) - -#define GG0(x,y,z) ( (x) ^ (y) ^ (z)) -#define GG1(x,y,z) (((x) & (y)) | ( (~(x)) & (z)) ) - - -void sm3_compress(uint32_t digest[8], const unsigned char block[64]) -{ - int j; - uint32_t W[68], W1[64]; - const uint32_t *pblock = (const uint32_t *)block; - - uint32_t A = digest[0]; - uint32_t B = digest[1]; - uint32_t C = digest[2]; - uint32_t D = digest[3]; - uint32_t E = digest[4]; - uint32_t F = digest[5]; - uint32_t G = digest[6]; - uint32_t H = digest[7]; - uint32_t SS1,SS2,TT1,TT2,T[64]; - - for(j = 0; j < 16; j++) { - W[j] = cpu_to_be32(pblock[j]); - } - for(j = 16; j < 68; j++) { - W[j] = P1( W[j-16] ^ W[j-9] ^ ROTATELEFT(W[j-3],15)) ^ ROTATELEFT(W[j - 13],7 ) ^ W[j-6];; - } - for(j = 0; j < 64; j++) { - W1[j] = W[j] ^ W[j+4]; - } - - for(j = 0; j < 16; j++) { - - T[j] = 0x79CC4519; - SS1 = ROTATELEFT((ROTATELEFT(A,12) + E + ROTATELEFT(T[j],j)), 7); - SS2 = SS1 ^ ROTATELEFT(A,12); - TT1 = FF0(A,B,C) + D + SS2 + W1[j]; - TT2 = GG0(E,F,G) + H + SS1 + W[j]; - D = C; - C = ROTATELEFT(B,9); - B = A; - A = TT1; - H = G; - G = ROTATELEFT(F,19); - F = E; - E = P0(TT2); - } - - for(j = 16; j < 64; j++) { - - T[j] = 0x7A879D8A; - SS1 = ROTATELEFT((ROTATELEFT(A,12) + E + ROTATELEFT(T[j],j&31)), 7); - SS2 = SS1 ^ ROTATELEFT(A,12); - TT1 = FF1(A,B,C) + D + SS2 + W1[j]; - TT2 = GG1(E,F,G) + H + SS1 + W[j]; - D = C; - C = ROTATELEFT(B,9); - B = A; - A = TT1; - H = G; - G = ROTATELEFT(F,19); - F = E; - E = P0(TT2); - } - - digest[0] ^= A; - digest[1] ^= B; - digest[2] ^= C; - digest[3] ^= D; - digest[4] ^= E; - digest[5] ^= F; - digest[6] ^= G; - digest[7] ^= H; -} - -void sm3(const unsigned char *msg, size_t msglen, - unsigned char dgst[SM3_DIGEST_LENGTH]) -{ - sm3_ctx_t ctx; - - sm3_init(&ctx); - sm3_update(&ctx, msg, msglen); - sm3_final(&ctx, dgst); - - memset(&ctx, 0, sizeof(sm3_ctx_t)); -} From b766a937d628616855fc0d2911f4922166e945ff Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:30:38 -0500 Subject: [PATCH 307/576] Delete sm3.h --- stratum/algos/sm3.h | 109 -------------------------------------------- 1 file changed, 109 deletions(-) delete mode 100644 stratum/algos/sm3.h diff --git a/stratum/algos/sm3.h b/stratum/algos/sm3.h deleted file mode 100644 index 05c6595d9..000000000 --- a/stratum/algos/sm3.h +++ /dev/null @@ -1,109 +0,0 @@ -/* ==================================================================== - * Copyright (c) 2014 - 2016 The GmSSL Project. All rights reserved. - * Copyright (c) 2017 - YiiMP (cleaned hmac dead stuff) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the GmSSL Project. - * (http://gmssl.org/)" - * - * 4. The name "GmSSL Project" must not be used to endorse or promote - * products derived from this software without prior written - * permission. For written permission, please contact - * guanzhi1980@gmail.com. - * - * 5. Products derived from this software may not be called "GmSSL" - * nor may "GmSSL" appear in their names without prior written - * permission of the GmSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the GmSSL Project - * (http://gmssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE GmSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 GmSSL PROJECT OR - * ITS 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. - * ==================================================================== - */ - -#ifndef _SM3_H -#define _SM3_H - -#define SM3_DIGEST_LENGTH 32 -#define SM3_BLOCK_SIZE 64 -#define SM3_CBLOCK (SM3_BLOCK_SIZE) -#define SM3_HMAC_SIZE (SM3_DIGEST_LENGTH) - - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct { - uint32_t digest[8]; - int nblocks; - unsigned char block[64]; - int num; -} sm3_ctx_t; - -void sm3_init(sm3_ctx_t *ctx); -void sm3_update(sm3_ctx_t *ctx, const unsigned char* data, size_t data_len); -void sm3_close(void *cc, void *dst); - -void sm3_final(sm3_ctx_t *ctx, unsigned char digest[SM3_DIGEST_LENGTH]); -void sm3_compress(uint32_t digest[8], const unsigned char block[SM3_BLOCK_SIZE]); -void sm3(const unsigned char *data, size_t datalen, - unsigned char digest[SM3_DIGEST_LENGTH]); - -#ifdef CPU_BIGENDIAN - -#define cpu_to_be16(v) (v) -#define cpu_to_be32(v) (v) -#define be16_to_cpu(v) (v) -#define be32_to_cpu(v) (v) - -#else - -#define cpu_to_le16(v) (v) -#define cpu_to_le32(v) (v) -#define le16_to_cpu(v) (v) -#define le32_to_cpu(v) (v) - -#define cpu_to_be16(v) (((v)<< 8) | ((v)>>8)) -#define cpu_to_be32(v) (((v)>>24) | (((v)>>8)&0xff00) | (((v)<<8)&0xff0000) | ((v)<<24)) -#define be16_to_cpu(v) cpu_to_be16(v) -#define be32_to_cpu(v) cpu_to_be32(v) - -#endif - -#ifdef __cplusplus -} -#endif -#endif From 7894bedfb9744e7cf088eccd270dd63088e03317 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:32:51 -0500 Subject: [PATCH 308/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 1a9dd57ae..a12ca4b7b 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -9,7 +9,7 @@ CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ - c11.c x11.c x12.c x13.c hsr14.c sm3.c x14.c x15.c x17.c x18.c \ + c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ From 73795c1ff02b45a4117b3be3873c267c2d731bc7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:02:53 -0500 Subject: [PATCH 309/576] Create binarium_hash_v1.c --- stratum/algos/binarium_hash_v1.c | 561 +++++++++++++++++++++++++++++++ 1 file changed, 561 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1.c diff --git a/stratum/algos/binarium_hash_v1.c b/stratum/algos/binarium_hash_v1.c new file mode 100644 index 000000000..5e0cda57c --- /dev/null +++ b/stratum/algos/binarium_hash_v1.c @@ -0,0 +1,561 @@ +#include "binarium_hash_v1.h" +#include +#include +#include +#include +//#include +/*#include +#include +#include */ + +#include "x11.h" + +#include "../sha3/sph_blake.h" +#include "../sha3/sph_bmw.h" +#include "../sha3/sph_groestl.h" +#include "../sha3/sph_jh.h" +#include "../sha3/sph_keccak.h" +#include "../sha3/sph_skein.h" +#include "../sha3/sph_luffa.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_shavite.h" +#include "../sha3/sph_simd.h" +#include "../sha3/sph_echo.h" + +#include "binarium_hash_v1/hashing/streebog/stribog.h" +#include "binarium_hash_v1/hashing/whirlpool/whirlpool.h" + +#include "binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/libgost15.h" +#include "binarium_hash_v1/encryption/three_fish/libskein_skein.h" +#include "binarium_hash_v1/open_ssl/camellia/camellia.h" + +#include "binarium_hash_v1/encryption/salsa20/ecrypt-sync.h" + + + +#define I_ALGORITHM_RECONFIGURATION_TIME_PERIOD_IN_SECONDS 604800 // 600 + +#define I_PRIME_NUMBER_FOR_MEMORY_HARD_HASHING 3571 + +#define I_AMOUNT_OF_BYTES_FOR_MEMORY_HARD_FUNCTION 32 * 1024 +#define I_MEMORY_BLOCK_SIZE_TO_ENCRYPTION_COMPUTATIONS_RATIO 1 + +const uint32_t GenesisBlock_nTime = 1516957200; + +typedef void ( * TCryptographyFunction ) ( const void *, const uint32_t, const void *, void * ); // uint512 + +#define I_AMOUNT_OF_INTERMEDIATE_HASH_FUNCTIONS 14 +#define I_AMOUNT_OF_INTERMEDIATE_ENCRYPTION_FUNCTIONS 3 + +TCryptographyFunction aIntermediateHashFunctions [ I_AMOUNT_OF_INTERMEDIATE_HASH_FUNCTIONS ]; +TCryptographyFunction aIntermediateEncryptionFunctions [ I_AMOUNT_OF_INTERMEDIATE_ENCRYPTION_FUNCTIONS ]; + + + +//---Hashing.------------------------------------------------------------- +void IntermediateHashFunction_Blake ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_blake512_context ctx_blake; + + sph_blake512_init(&ctx_blake); + sph_blake512 (&ctx_blake, _pData, _iDataSize); + sph_blake512_close(&ctx_blake, _pResult); +} + +void IntermediateHashFunction_BMW ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_bmw512_context ctx_bmw; + + sph_bmw512_init(&ctx_bmw); + sph_bmw512 (&ctx_bmw, _pData, _iDataSize); + sph_bmw512_close(&ctx_bmw, _pResult); +} + +void IntermediateHashFunction_Groestl ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_groestl512_context ctx_groestl; + + sph_groestl512_init(&ctx_groestl); + sph_groestl512 (&ctx_groestl, _pData, _iDataSize); + sph_groestl512_close(&ctx_groestl, _pResult); +} + +void IntermediateHashFunction_JH ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_jh512_context ctx_jh; + + sph_jh512_init(&ctx_jh); + sph_jh512 (&ctx_jh, _pData, _iDataSize); + sph_jh512_close(&ctx_jh, _pResult); +} + +void IntermediateHashFunction_Keccak ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_keccak512_context ctx_keccak; + + sph_keccak512_init(&ctx_keccak); + sph_keccak512 (&ctx_keccak, _pData, _iDataSize); + sph_keccak512_close(&ctx_keccak, _pResult); +} + +void IntermediateHashFunction_Skein ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_skein512_context ctx_skein; + + sph_skein512_init(&ctx_skein); + sph_skein512 (&ctx_skein, _pData, _iDataSize); + sph_skein512_close(&ctx_skein, _pResult); +} + +void IntermediateHashFunction_Luffa ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_luffa512_context ctx_luffa; + + sph_luffa512_init(&ctx_luffa); + sph_luffa512 (&ctx_luffa, _pData, _iDataSize); + sph_luffa512_close(&ctx_luffa, _pResult); +} + +void IntermediateHashFunction_Cubehash ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_cubehash512_context ctx_cubehash; + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512 (&ctx_cubehash, _pData, _iDataSize); + sph_cubehash512_close(&ctx_cubehash, _pResult); +} + +void IntermediateHashFunction_Shavite ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_shavite512_context ctx_shavite; + + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, _pData, _iDataSize); + sph_shavite512_close(&ctx_shavite, _pResult); +} + +void IntermediateHashFunction_Simd ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_simd512_context ctx_simd; + + sph_simd512_init(&ctx_simd); + sph_simd512 (&ctx_simd, _pData, _iDataSize); + sph_simd512_close(&ctx_simd, _pResult); +} + +void IntermediateHashFunction_Echo ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + sph_echo512_context ctx_echo; + + sph_echo512_init(&ctx_echo); + sph_echo512 (&ctx_echo, _pData, _iDataSize); + sph_echo512_close(&ctx_echo, _pResult); +} + +void IntermediateHashFunction_GOST_2012_Streebog ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + hash_512 ( ( const unsigned char * ) _pData, _iDataSize, ( unsigned char * ) _pResult ); +} + +void IntermediateHashFunction_Whirlpool ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + whirlpool_ctx structureWhirlpoolContext; + + rhash_whirlpool_init ( & structureWhirlpoolContext ); + rhash_whirlpool_update ( & structureWhirlpoolContext, ( const unsigned char * ) _pData, _iDataSize); + rhash_whirlpool_final ( & structureWhirlpoolContext, ( unsigned char * ) _pResult); +} + +/*inline uint512 IntermediateHashFunction_SWIFFT ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + HashKey key ALIGN; + HashState state ALIGN; + SWIFFT_HashData data ALIGN; + SwiFFT_initState ( state ); + SwiFFT_readKey ( ( const unsigned char * ) _pKey, & key ); + SwiFFT_readData ( data, ( const unsigned char * ) _pData ); + SwiFFT ( key, state, data ); + memcpy ( _pResult, state, 64 ); + //SwiFFT_printState ( state ); + //SwiFFT_printKey ( key ); + //SwiFFT_printData ( data ); +}*/ + +//---Encryption.---------------------------------------------------------------------- +/*void IntermediateEncryptionFunction_GOST_2015_Kuznechik ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + //uint64_t iIndex = GetUint64IndexFrom512BitsKey ( _pKey, 0 ); + //iIndex = iIndex % chainActive.Height (); + encryptBlockWithGost15 ( _pKey, ( ( unsigned char * ) _pResult ) ); // _pKey & chainActive [ chainActive.Height () - iIndex ] -> nVersion + encryptBlockWithGost15 ( _pData, ( ( unsigned char * ) _pResult + 16 ) ); // _pData + encryptBlockWithGost15 ( _pKey, ( ( unsigned char * ) _pResult + 32 ) ); // _pKey + encryptBlockWithGost15 ( _pData, ( ( unsigned char * ) _pResult + 48 ) ); // _pData +}*/ + +void IntermediateEncryptionFunction_GOST_2015_Kuznechik ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + /*char block_str [ 129 ]; + //char hash_str [ 129 ]; + char roundkeys_str [ 401 ]; + //uint32_t hash [ 1 ] [ 16 ]; + //uint64_t iIndex = GetUint64IndexFrom512BitsKey ( _pKey, 0 ); + //iIndex = iIndex % chainActive.Height (); + //memcpy ( hash [ 0 ], _pData, 64 ); + bin2hex(roundkeys_str, (unsigned char *) _pData, 200 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : roundkeys_str : %s.", roundkeys_str ); + bin2hex(block_str, (unsigned char *) _pResult, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pResult : %s.", block_str ); + bin2hex(block_str, (unsigned char *) _pKey, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pKey : %s.", block_str );*/ + encryptBlockWithGost15 ( _pKey, ( ( unsigned char * ) _pResult ) ); // _pKey + /*bin2hex(block_str, (unsigned char *) _pResult, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pResult : %s.", block_str ); + bin2hex(block_str, (unsigned char *) _pData, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pData : %s.", block_str );*/ + encryptBlockWithGost15 ( _pData, ( ( unsigned char * ) _pResult + 16 ) ); // _pData + /*bin2hex(block_str, (unsigned char *) _pResult, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pResult : %s.", block_str );*/ + + /*decryptBlockWithGost15 ( _pData, ( ( unsigned char * ) _pResult + 16 ) ); + bin2hex(block_str, (unsigned char *) _pResult, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pResult decrypted : %s.", block_str );*/ + + /*bin2hex(block_str, (unsigned char *) _pKey, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pKey : %s.", block_str );*/ + encryptBlockWithGost15 ( _pKey, ( ( unsigned char * ) _pResult + 32 ) ); // _pKey + /*bin2hex(block_str, (unsigned char *) _pResult, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pResult : %s.", block_str ); + bin2hex(block_str, (unsigned char *) _pData, 64 ); + fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pData : %s.", block_str );*/ + encryptBlockWithGost15 ( _pData, ( ( unsigned char * ) _pResult + 48 ) ); // _pData + //bin2hex(block_str, (unsigned char *) _pResult, 64 ); + //fprintf ( stdout, "DEBUG: IntermediateEncryptionFunction_GOST_2015_Kuznechik () : _pResult : %s.", block_str ); +} + +void IntermediateEncryptionFunction_ThreeFish ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + char T[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + // Result, Key, Text. + libskein_threefish_encrypt( ( char * ) _pResult, ( const char * ) _pKey, T, ( const char * ) _pData, 64, 512); +} + +void IntermediateEncryptionFunction_Camellia ( const void * _pData, const uint32_t _iDataSize, const void * _pKey, void * _pResult ) { + CAMELLIA_KEY stKey; + Camellia_set_key ( ( const unsigned char * ) _pKey, 256, & stKey ); // userKey + Camellia_encrypt ( ( const unsigned char * ) _pData, ( unsigned char * ) _pResult, & stKey ); // in, out, key +} + + + +inline void HashGenerator_Init () { + aIntermediateHashFunctions [ 0 ] = & IntermediateHashFunction_Blake; + aIntermediateHashFunctions [ 1 ] = & IntermediateHashFunction_BMW; + aIntermediateHashFunctions [ 2 ] = & IntermediateHashFunction_Groestl; + aIntermediateHashFunctions [ 3 ] = & IntermediateHashFunction_JH; + aIntermediateHashFunctions [ 4 ] = & IntermediateHashFunction_Keccak; + aIntermediateHashFunctions [ 5 ] = & IntermediateHashFunction_Skein; + aIntermediateHashFunctions [ 6 ] = & IntermediateHashFunction_Luffa; + aIntermediateHashFunctions [ 7 ] = & IntermediateHashFunction_Cubehash; + aIntermediateHashFunctions [ 8 ] = & IntermediateHashFunction_Shavite; + aIntermediateHashFunctions [ 9 ] = & IntermediateHashFunction_Simd; + aIntermediateHashFunctions [ 10 ] = & IntermediateHashFunction_Echo; + aIntermediateHashFunctions [ 11 ] = & IntermediateHashFunction_GOST_2012_Streebog; + aIntermediateHashFunctions [ 12 ] = & IntermediateHashFunction_Whirlpool; + //aIntermediateHashFunctions [ 13 ] = & IntermediateHashFunction_SWIFFT; + aIntermediateHashFunctions [ 13 ] = & IntermediateHashFunction_GOST_2012_Streebog; + + aIntermediateEncryptionFunctions [ 0 ] = & IntermediateEncryptionFunction_GOST_2015_Kuznechik; + aIntermediateEncryptionFunctions [ 1 ] = & IntermediateEncryptionFunction_ThreeFish; + aIntermediateEncryptionFunctions [ 2 ] = & IntermediateEncryptionFunction_Camellia; +} + + + +inline uint64_t GetUint64IndexFrom512BitsKey ( const unsigned char * _pKey, int pos ) { + //const uint8_t* ptr = ( const uint8_t * ) _pKey + pos * 8; + //return ((uint64_t)ptr[0]) | \ + ((uint64_t)ptr[1]) << 8 | \ + ((uint64_t)ptr[2]) << 16 | \ + ((uint64_t)ptr[3]) << 24 | \ + ((uint64_t)ptr[4]) << 32 | \ + ((uint64_t)ptr[5]) << 40 | \ + ((uint64_t)ptr[6]) << 48 | \ + ((uint64_t)ptr[7]) << 56; + + uint64_t * pAdress = ( uint64_t * ) ( _pKey + pos ); + return pAdress [ 0 ] ^ pAdress [ 1 ] ^ pAdress [ 2 ] ^ pAdress [ 3 ] ^ + pAdress [ 4 ] ^ pAdress [ 5 ] ^ pAdress [ 6 ] ^ pAdress [ 7 ]; + +} + +uint1024_XOROperator ( const char * _pDestinationData, const uint32_t _iDestinationOffsetInBytes, const unsigned char * _pData ) { + uint32_t i; + + uint64_t * pDestinationNumbers = ( uint64_t * ) ( _pDestinationData + _iDestinationOffsetInBytes ); + uint64_t * pSourceNumbers = ( uint64_t * ) _pData; + + for ( i = 0; i < 512 / 8 / 8; i ++ ) { // 8 bits in byte and 8 bytes in uint64_t. + //fprintf(stdout, "uint512.XOROperator () : %i .\n", i * 8 ); + + /** ( ( uint64_t * ) ( begin () + _iDestinationOffsetInBytes + i * 8 ) ) = + * ( ( uint64_t * ) ( begin () + _iDestinationOffsetInBytes + i * 8 ) ) ^ + * ( ( uint64_t * ) ( _pData + i * 8 ) );*/ + + pDestinationNumbers [ i ] = pDestinationNumbers [ i ] ^ pSourceNumbers [ i ]; + + } //-for + +} + + + +void bin2hex(char *s, const unsigned char *p, size_t len) +{ + for (size_t i = 0; i < len; i++) + sprintf(s + (i * 2), "%02x", (unsigned int) p[i]); +} + + + +void Binarium_hash_v1_hash_Implementation(const char* input, char* output, uint32_t len, uint32_t _iTimeFromGenesisBlock ) +{ + /*sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa1; + sph_cubehash512_context ctx_cubehash1; + sph_shavite512_context ctx_shavite1; + sph_simd512_context ctx_simd1; + sph_echo512_context ctx_echo1;*/ + + //these uint512 in the c++ source of the client are backed by an array of uint32 + //uint32_t hashA[16], hashB[16]; + + /*sph_blake512_init(&ctx_blake); + sph_blake512 (&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, hashA); + sph_bmw512_init(&ctx_bmw); + sph_bmw512 (&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + sph_groestl512_init(&ctx_groestl); + sph_groestl512 (&ctx_groestl, hashB, 64); + sph_groestl512_close(&ctx_groestl, hashA); + sph_skein512_init(&ctx_skein); + sph_skein512 (&ctx_skein, hashA, 64); + sph_skein512_close (&ctx_skein, hashB); + sph_jh512_init(&ctx_jh); + sph_jh512 (&ctx_jh, hashB, 64); + sph_jh512_close(&ctx_jh, hashA); + sph_keccak512_init(&ctx_keccak); + sph_keccak512 (&ctx_keccak, hashA, 64); + sph_keccak512_close(&ctx_keccak, hashB); + + sph_luffa512_init (&ctx_luffa1); + sph_luffa512 (&ctx_luffa1, hashB, 64); + sph_luffa512_close (&ctx_luffa1, hashA); + + sph_cubehash512_init (&ctx_cubehash1); + sph_cubehash512 (&ctx_cubehash1, hashA, 64); + sph_cubehash512_close(&ctx_cubehash1, hashB); + + sph_shavite512_init (&ctx_shavite1); + sph_shavite512 (&ctx_shavite1, hashB, 64); + sph_shavite512_close(&ctx_shavite1, hashA); + + sph_simd512_init (&ctx_simd1); + sph_simd512 (&ctx_simd1, hashA, 64); + sph_simd512_close(&ctx_simd1, hashB); + + sph_echo512_init (&ctx_echo1); + sph_echo512 (&ctx_echo1, hashB, 64); + sph_echo512_close(&ctx_echo1, hashA);*/ + + //memcpy(output, hashA, 32); + + + + uint32_t * p_nBits = ( input + 4 + 32 + 32 + 4 ); + + /*uint512 hash[11]; + uint512 uint512AdditionalHash; + uint512 uint512ChainBlockData; + uint1024 uint1024CombinedHashes;*/ + uint32_t hash [ 11 ] [ 16 ]; + uint32_t uint512AdditionalHash [ 16 ]; + uint32_t uint1024CombinedHashes [ 32 ]; + + uint64_t iIndexOfBlcok; + uint64_t iWeekNumber; + uint64_t iIndexFromWeekChangeBlock; + uint64_t iIndex; + + uint32_t i = 0; + + char block_str[200]; + char hash_str[129]; + char hash_1024_str[257]; + + + + // Important! + memset ( hash, 0, sizeof(hash) ); + + + + //bin2hex ( hash_str, ( unsigned char * ) input, 80 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : block_str : %s.\n", block_str ); + + // blake512 + aIntermediateHashFunctions [ 0 ] ( input, len, NULL, hash [ 0 ] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 0 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : blake512 : %s.\n", hash_str ); + + // bmw512 + aIntermediateHashFunctions [ 1 ] ( hash [ 0 ], 64, NULL, uint512AdditionalHash ); + //bin2hex ( hash_str, ( unsigned char * ) uint512AdditionalHash, 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : bmw512 : %s.\n", hash_str ); + + iWeekNumber = _iTimeFromGenesisBlock / I_ALGORITHM_RECONFIGURATION_TIME_PERIOD_IN_SECONDS * I_ALGORITHM_RECONFIGURATION_TIME_PERIOD_IN_SECONDS; + iIndex = ( iWeekNumber + * p_nBits ) % I_AMOUNT_OF_INTERMEDIATE_HASH_FUNCTIONS; + aIntermediateHashFunctions [ iIndex ] ( uint512AdditionalHash, 64, NULL, hash [ 1 ] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 1 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : aIntermediateHashFunctions 1 : %s.\n", hash_str ); + + // groestl512 + aIntermediateHashFunctions [ 2 ] ( hash [ 1 ], 64, NULL, hash [ 2 ] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 2 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : groestl512 : %s.\n", hash_str ); + + // skein512 + aIntermediateHashFunctions [ 5 ] ( hash [ 2 ], 64, NULL, ( (unsigned char *) uint1024CombinedHashes + 64 ) ); + //bin2hex ( hash_1024_str, ( unsigned char * ) uint1024CombinedHashes, 128 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : skein512 : %s.\n", hash_1024_str ); + + //-Streebog.-------------------------------------- + // jh512 + + aIntermediateHashFunctions [ 3 ] ( ( (unsigned char *) uint1024CombinedHashes + 64 ), 64, NULL, uint1024CombinedHashes ); + //bin2hex ( hash_1024_str, ( unsigned char * ) uint1024CombinedHashes, 128 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : jh512 : %s.\n", hash_1024_str ); + + + + ECRYPT_ctx structECRYPT_ctx; + + unsigned char aMemoryArea [ I_AMOUNT_OF_BYTES_FOR_MEMORY_HARD_FUNCTION ]; + memset ( aMemoryArea, 0, I_AMOUNT_OF_BYTES_FOR_MEMORY_HARD_FUNCTION ); + + ECRYPT_keysetup ( & structECRYPT_ctx, hash[1], ECRYPT_MAXKEYSIZE, ECRYPT_MAXIVSIZE ); + ECRYPT_ivsetup ( & structECRYPT_ctx, hash[2] ); + + uint64_t iWriteIndex; + + // Amplifying data and making random write accesses to memory. + // Block size is 64 bytes. ECRYPT_BLOCKLENGTH . + // Hash size is 64 bytes. + for ( i = 0; i < I_AMOUNT_OF_BYTES_FOR_MEMORY_HARD_FUNCTION / ( 64 ) / 2; i ++ ) { + iWriteIndex = + ( + // % I_AMOUNT_OF_BYTES_FOR_MEMORY_HARD_FUNCTION here is to prevent integer overflow + // on subsequent addition operation. + GetUint64IndexFrom512BitsKey ( ( (unsigned char *) uint1024CombinedHashes + 64 ), 0 ) % I_AMOUNT_OF_BYTES_FOR_MEMORY_HARD_FUNCTION + + i * I_PRIME_NUMBER_FOR_MEMORY_HARD_HASHING ) + % + ( I_AMOUNT_OF_BYTES_FOR_MEMORY_HARD_FUNCTION - 8 * ECRYPT_BLOCKLENGTH ); + + // From previous encryption result in memory to next encryption result in memory. + ECRYPT_encrypt_blocks ( & structECRYPT_ctx, + ( (unsigned char *) uint1024CombinedHashes + 64 ), + & ( aMemoryArea [ iWriteIndex ] ), + 1 ); // 8 + + //uint1024CombinedHashes.XOROperator ( 64, & ( aMemoryArea [ iWriteIndex ] ) ); + uint1024_XOROperator ( uint1024CombinedHashes, 64, & ( aMemoryArea [ iWriteIndex ] ) ); + + } //-for + + for ( i = 0; i < I_AMOUNT_OF_BYTES_FOR_MEMORY_HARD_FUNCTION / 64; i ++ ) { + //uint1024CombinedHashes.XOROperator ( 64, & ( aMemoryArea [ i * 64 ] ) ); + uint1024_XOROperator ( uint1024CombinedHashes, 64, & ( aMemoryArea [ i * 64 ] ) ); + + } //-for + + //bin2hex ( hash_1024_str, ( unsigned char * ) uint1024CombinedHashes, 128 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : Memory-hard hashing function : %s.\n", hash_1024_str ); + + //-Whirlpool-------------------------------------- + // keccak512 + aIntermediateHashFunctions [ 4 ] ( uint1024CombinedHashes, 128, NULL, hash[5] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 5 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : keccak512 : %s.\n", hash_str ); + + //-SWIFFT.---------------------------------------- + // luffa512 + aIntermediateHashFunctions [ 6 ] ( hash[5], 64, NULL, hash[6] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 6 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : luffa512 : %s.\n", hash_str ); + + // cubehash512 + aIntermediateHashFunctions [ 7 ] ( hash[6], 64, NULL, hash[7] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 7 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : cubehash512 : %s.\n", hash_str ); + + //-GOST 2015_Kuznechik.--------------------------- + memcpy ( hash [ 6 ], hash [ 7 ], 64 ); + iIndex = ( iWeekNumber + * p_nBits ) % I_AMOUNT_OF_INTERMEDIATE_ENCRYPTION_FUNCTIONS; + aIntermediateEncryptionFunctions [ iIndex ] ( hash[6], 64, hash[0], hash[7] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 7 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : aIntermediateEncryptionFunctions 1 : %s.\n", hash_str ); + + // shavite512 + aIntermediateHashFunctions [ 8 ] ( hash[7], 64, NULL, hash[8] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 8 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : shavite512 : %s.\n", hash_str ); + + //---ThreeFish.---------------------------------- + + // simd512 + aIntermediateHashFunctions [ 9 ] ( hash[8], 64, NULL, uint512AdditionalHash ); + //bin2hex ( hash_str, ( unsigned char * ) uint512AdditionalHash, 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : simd512 : %s.\n", hash_str ); + + iIndex = ( iWeekNumber + * p_nBits + 10 ) % I_AMOUNT_OF_INTERMEDIATE_HASH_FUNCTIONS; + aIntermediateHashFunctions [ iIndex ] ( uint512AdditionalHash, 64, NULL, hash[9] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 9 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : aIntermediateHashFunctions 2 : %s.\n", hash_str ); + + //---Camellia.----------------------------------- + + // echo512 + aIntermediateHashFunctions [ 10 ] ( hash[9], 64, NULL, hash[10] ); + //bin2hex ( hash_str, ( unsigned char * ) hash [ 10 ], 64 ); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : echo512 : %s.\n", hash_str ); + + + + //return hash[10].trim256(); + memcpy ( output, hash[10], 32 ); + + //bin2hex ( hash_str, ( unsigned char * ) output, 32 ); + //applog ( LOG_DEBUG, "DEBUG: Binarium_hash_v1_hash_Implementation () : resulting hash : %s.\n", hash_str ); + //std:: + //cout << "DEBUG: Binarium_hash_v1_hash_Implementation () : resulting hash : " << hash_str << " .\n"; + //isolate->ThrowException(Exception::TypeError( + // String::NewFromUtf8(isolate, "Wrong number of arguments"))); + //fprintf ( stdout, "DEBUG: Binarium_hash_v1_hash_Implementation () : resulting hash : %s.\n", hash_str ); + +} + +void Binarium_hash_v1_hash(const char* input, char* output, uint32_t len) +{ + HashGenerator_Init (); + + //char Data [ 200 ]; + //memset ( Data, 0, sizeof ( Data ) ); + + uint32_t iTimeFromGenesisBlock; + //uint32_t iAlgorithmSelector; + //uint32_t iHashFunctionsAmount; + uint32_t * p_nTime = ( input + 4 + 32 + 32 ); + //uint32_t * p_nTime = ( Data + 4 + 32 + 32 ); + + iTimeFromGenesisBlock = * p_nTime - GenesisBlock_nTime; + //iHashFunctionsAmount = 2; + //iAlgorithmSelector = iTimeFromGenesisBlock < 3528000 ? 0 : 1; + + //return (this->*(aHashFunctions[iAlgorithmSelector]))( pPrevBlockIndex, iTimeFromGenesisBlock ); + if ( iTimeFromGenesisBlock >= 3528000 ) { + Binarium_hash_v1_hash_Implementation ( input, output, len, iTimeFromGenesisBlock ); + //Binarium_hash_v1_hash_Implementation ( Data, output, len, iTimeFromGenesisBlock ); + + } else + x11_hash ( input, output, len ); + +} From 5405ce9f0b2f5248b1fe4dd3cc535aaa1c10230f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:03:13 -0500 Subject: [PATCH 310/576] Create binarium_hash_v1.h --- stratum/algos/binarium_hash_v1.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1.h diff --git a/stratum/algos/binarium_hash_v1.h b/stratum/algos/binarium_hash_v1.h new file mode 100644 index 000000000..533e32316 --- /dev/null +++ b/stratum/algos/binarium_hash_v1.h @@ -0,0 +1,16 @@ +#ifndef Binarium_hash_v1_H +#define Binarium_hash_v1_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void Binarium_hash_v1_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From 4d63921aadfe9bc230e7211d316967c960f9acdb Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:03:43 -0500 Subject: [PATCH 311/576] Create camellia.c --- .../encryption/camellia/camellia.c | 1469 +++++++++++++++++ 1 file changed, 1469 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/camellia/camellia.c diff --git a/stratum/algos/binarium_hash_v1/encryption/camellia/camellia.c b/stratum/algos/binarium_hash_v1/encryption/camellia/camellia.c new file mode 100644 index 000000000..c9ff165ac --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/camellia/camellia.c @@ -0,0 +1,1469 @@ +/* camellia.c ver 1.2.0 + * + * Copyright (c) 2006,2007 + * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer as + * the first lines of this file unmodified. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NTT ``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 NTT 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. + */ + +/* + * Algorithm Specification + * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html + */ + + +#include +#include + +#include "camellia.h" + +/* u32 must be 32bit word */ +typedef unsigned int u32; +typedef unsigned char u8; + +/* key constants */ + +#define CAMELLIA_SIGMA1L (0xA09E667FL) +#define CAMELLIA_SIGMA1R (0x3BCC908BL) +#define CAMELLIA_SIGMA2L (0xB67AE858L) +#define CAMELLIA_SIGMA2R (0x4CAA73B2L) +#define CAMELLIA_SIGMA3L (0xC6EF372FL) +#define CAMELLIA_SIGMA3R (0xE94F82BEL) +#define CAMELLIA_SIGMA4L (0x54FF53A5L) +#define CAMELLIA_SIGMA4R (0xF1D36F1CL) +#define CAMELLIA_SIGMA5L (0x10E527FAL) +#define CAMELLIA_SIGMA5R (0xDE682D1DL) +#define CAMELLIA_SIGMA6L (0xB05688C2L) +#define CAMELLIA_SIGMA6R (0xB3E6C1FDL) + +/* + * macros + */ + + +#if defined(_MSC_VER) + +# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) +# define GETU32(p) SWAP(*((u32 *)(p))) +# define PUTU32(ct, st) {*((u32 *)(ct)) = SWAP((st));} + +#else /* not MS-VC */ + +# define GETU32(pt) \ + (((u32)(pt)[0] << 24) \ + ^ ((u32)(pt)[1] << 16) \ + ^ ((u32)(pt)[2] << 8) \ + ^ ((u32)(pt)[3])) + +# define PUTU32(ct, st) { \ + (ct)[0] = (u8)((st) >> 24); \ + (ct)[1] = (u8)((st) >> 16); \ + (ct)[2] = (u8)((st) >> 8); \ + (ct)[3] = (u8)(st); } + +#endif + +#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2]) +#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1]) + +/* rotation right shift 1byte */ +#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24)) +/* rotation left shift 1bit */ +#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31)) +/* rotation left shift 1byte */ +#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24)) + +#define CAMELLIA_ROLDQ(ll, lr, rl, rr, w0, w1, bits) \ + do { \ + w0 = ll; \ + ll = (ll << bits) + (lr >> (32 - bits)); \ + lr = (lr << bits) + (rl >> (32 - bits)); \ + rl = (rl << bits) + (rr >> (32 - bits)); \ + rr = (rr << bits) + (w0 >> (32 - bits)); \ + } while(0) + +#define CAMELLIA_ROLDQo32(ll, lr, rl, rr, w0, w1, bits) \ + do { \ + w0 = ll; \ + w1 = lr; \ + ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \ + lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \ + rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \ + rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \ + } while(0) + +#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)]) +#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)]) +#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)]) +#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)]) + +#define CAMELLIA_F(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \ + do { \ + il = xl ^ kl; \ + ir = xr ^ kr; \ + t0 = il >> 16; \ + t1 = ir >> 16; \ + yl = CAMELLIA_SP1110(ir & 0xff) \ + ^ CAMELLIA_SP0222((t1 >> 8) & 0xff) \ + ^ CAMELLIA_SP3033(t1 & 0xff) \ + ^ CAMELLIA_SP4404((ir >> 8) & 0xff); \ + yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) \ + ^ CAMELLIA_SP0222(t0 & 0xff) \ + ^ CAMELLIA_SP3033((il >> 8) & 0xff) \ + ^ CAMELLIA_SP4404(il & 0xff); \ + yl ^= yr; \ + yr = CAMELLIA_RR8(yr); \ + yr ^= yl; \ + } while(0) + + +/* + * for speed up + * + */ +#define CAMELLIA_FLS(ll, lr, rl, rr, kll, klr, krl, krr, t0, t1, t2, t3) \ + do { \ + t0 = kll; \ + t0 &= ll; \ + lr ^= CAMELLIA_RL1(t0); \ + t1 = klr; \ + t1 |= lr; \ + ll ^= t1; \ + \ + t2 = krr; \ + t2 |= rr; \ + rl ^= t2; \ + t3 = krl; \ + t3 &= rl; \ + rr ^= CAMELLIA_RL1(t3); \ + } while(0) + +#define CAMELLIA_ROUNDSM(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \ + do { \ + ir = CAMELLIA_SP1110(xr & 0xff) \ + ^ CAMELLIA_SP0222((xr >> 24) & 0xff) \ + ^ CAMELLIA_SP3033((xr >> 16) & 0xff) \ + ^ CAMELLIA_SP4404((xr >> 8) & 0xff); \ + il = CAMELLIA_SP1110((xl >> 24) & 0xff) \ + ^ CAMELLIA_SP0222((xl >> 16) & 0xff) \ + ^ CAMELLIA_SP3033((xl >> 8) & 0xff) \ + ^ CAMELLIA_SP4404(xl & 0xff); \ + il ^= kl; \ + ir ^= kr; \ + ir ^= il; \ + il = CAMELLIA_RR8(il); \ + il ^= ir; \ + yl ^= ir; \ + yr ^= il; \ + } while(0) + + +static const u32 camellia_sp1110[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, +}; + +static const u32 camellia_sp0222[256] = { + 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, +}; + +static const u32 camellia_sp3033[256] = { + 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, +}; + +static const u32 camellia_sp4404[256] = { + 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, +}; + + +/** + * Stuff related to the Camellia key schedule + */ +#define subl(x) subL[(x)] +#define subr(x) subR[(x)] + +void camellia_setup128(const unsigned char *key, u32 *subkey) +{ + u32 kll, klr, krl, krr; + u32 il, ir, t0, t1, w0, w1; + u32 kw4l, kw4r, dw, tl, tr; + u32 subL[26]; + u32 subR[26]; + + /** + * k == kll || klr || krl || krr (|| is concatination) + */ + kll = GETU32(key ); + klr = GETU32(key + 4); + krl = GETU32(key + 8); + krr = GETU32(key + 12); + /** + * generate KL dependent subkeys + */ + subl(0) = kll; subr(0) = klr; + subl(1) = krl; subr(1) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(4) = kll; subr(4) = klr; + subl(5) = krl; subr(5) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30); + subl(10) = kll; subr(10) = klr; + subl(11) = krl; subr(11) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(13) = krl; subr(13) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(16) = kll; subr(16) = klr; + subl(17) = krl; subr(17) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(18) = kll; subr(18) = klr; + subl(19) = krl; subr(19) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(22) = kll; subr(22) = klr; + subl(23) = krl; subr(23) = krr; + + /* generate KA */ + kll = subl(0); klr = subr(0); + krl = subl(1); krr = subr(1); + CAMELLIA_F(kll, klr, + CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R, + w0, w1, il, ir, t0, t1); + krl ^= w0; krr ^= w1; + CAMELLIA_F(krl, krr, + CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R, + kll, klr, il, ir, t0, t1); + CAMELLIA_F(kll, klr, + CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R, + krl, krr, il, ir, t0, t1); + krl ^= w0; krr ^= w1; + CAMELLIA_F(krl, krr, + CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R, + w0, w1, il, ir, t0, t1); + kll ^= w0; klr ^= w1; + + /* generate KA dependent subkeys */ + subl(2) = kll; subr(2) = klr; + subl(3) = krl; subr(3) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(6) = kll; subr(6) = klr; + subl(7) = krl; subr(7) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(8) = kll; subr(8) = klr; + subl(9) = krl; subr(9) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(12) = kll; subr(12) = klr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(14) = kll; subr(14) = klr; + subl(15) = krl; subr(15) = krr; + CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34); + subl(20) = kll; subr(20) = klr; + subl(21) = krl; subr(21) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(24) = kll; subr(24) = klr; + subl(25) = krl; subr(25) = krr; + + + /* absorb kw2 to other subkeys */ + subl(3) ^= subl(1); subr(3) ^= subr(1); + subl(5) ^= subl(1); subr(5) ^= subr(1); + subl(7) ^= subl(1); subr(7) ^= subr(1); + subl(1) ^= subr(1) & ~subr(9); + dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw); + subl(11) ^= subl(1); subr(11) ^= subr(1); + subl(13) ^= subl(1); subr(13) ^= subr(1); + subl(15) ^= subl(1); subr(15) ^= subr(1); + subl(1) ^= subr(1) & ~subr(17); + dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw); + subl(19) ^= subl(1); subr(19) ^= subr(1); + subl(21) ^= subl(1); subr(21) ^= subr(1); + subl(23) ^= subl(1); subr(23) ^= subr(1); + subl(24) ^= subl(1); subr(24) ^= subr(1); + + /* absorb kw4 to other subkeys */ + kw4l = subl(25); kw4r = subr(25); + subl(22) ^= kw4l; subr(22) ^= kw4r; + subl(20) ^= kw4l; subr(20) ^= kw4r; + subl(18) ^= kw4l; subr(18) ^= kw4r; + kw4l ^= kw4r & ~subr(16); + dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw); + subl(14) ^= kw4l; subr(14) ^= kw4r; + subl(12) ^= kw4l; subr(12) ^= kw4r; + subl(10) ^= kw4l; subr(10) ^= kw4r; + kw4l ^= kw4r & ~subr(8); + dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw); + subl(6) ^= kw4l; subr(6) ^= kw4r; + subl(4) ^= kw4l; subr(4) ^= kw4r; + subl(2) ^= kw4l; subr(2) ^= kw4r; + subl(0) ^= kw4l; subr(0) ^= kw4r; + + /* key XOR is end of F-function */ + CamelliaSubkeyL(0) = subl(0) ^ subl(2); + CamelliaSubkeyR(0) = subr(0) ^ subr(2); + CamelliaSubkeyL(2) = subl(3); + CamelliaSubkeyR(2) = subr(3); + CamelliaSubkeyL(3) = subl(2) ^ subl(4); + CamelliaSubkeyR(3) = subr(2) ^ subr(4); + CamelliaSubkeyL(4) = subl(3) ^ subl(5); + CamelliaSubkeyR(4) = subr(3) ^ subr(5); + CamelliaSubkeyL(5) = subl(4) ^ subl(6); + CamelliaSubkeyR(5) = subr(4) ^ subr(6); + CamelliaSubkeyL(6) = subl(5) ^ subl(7); + CamelliaSubkeyR(6) = subr(5) ^ subr(7); + tl = subl(10) ^ (subr(10) & ~subr(8)); + dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(7) = subl(6) ^ tl; + CamelliaSubkeyR(7) = subr(6) ^ tr; + CamelliaSubkeyL(8) = subl(8); + CamelliaSubkeyR(8) = subr(8); + CamelliaSubkeyL(9) = subl(9); + CamelliaSubkeyR(9) = subr(9); + tl = subl(7) ^ (subr(7) & ~subr(9)); + dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(10) = tl ^ subl(11); + CamelliaSubkeyR(10) = tr ^ subr(11); + CamelliaSubkeyL(11) = subl(10) ^ subl(12); + CamelliaSubkeyR(11) = subr(10) ^ subr(12); + CamelliaSubkeyL(12) = subl(11) ^ subl(13); + CamelliaSubkeyR(12) = subr(11) ^ subr(13); + CamelliaSubkeyL(13) = subl(12) ^ subl(14); + CamelliaSubkeyR(13) = subr(12) ^ subr(14); + CamelliaSubkeyL(14) = subl(13) ^ subl(15); + CamelliaSubkeyR(14) = subr(13) ^ subr(15); + tl = subl(18) ^ (subr(18) & ~subr(16)); + dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(15) = subl(14) ^ tl; + CamelliaSubkeyR(15) = subr(14) ^ tr; + CamelliaSubkeyL(16) = subl(16); + CamelliaSubkeyR(16) = subr(16); + CamelliaSubkeyL(17) = subl(17); + CamelliaSubkeyR(17) = subr(17); + tl = subl(15) ^ (subr(15) & ~subr(17)); + dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(18) = tl ^ subl(19); + CamelliaSubkeyR(18) = tr ^ subr(19); + CamelliaSubkeyL(19) = subl(18) ^ subl(20); + CamelliaSubkeyR(19) = subr(18) ^ subr(20); + CamelliaSubkeyL(20) = subl(19) ^ subl(21); + CamelliaSubkeyR(20) = subr(19) ^ subr(21); + CamelliaSubkeyL(21) = subl(20) ^ subl(22); + CamelliaSubkeyR(21) = subr(20) ^ subr(22); + CamelliaSubkeyL(22) = subl(21) ^ subl(23); + CamelliaSubkeyR(22) = subr(21) ^ subr(23); + CamelliaSubkeyL(23) = subl(22); + CamelliaSubkeyR(23) = subr(22); + CamelliaSubkeyL(24) = subl(24) ^ subl(23); + CamelliaSubkeyR(24) = subr(24) ^ subr(23); + + /* apply the inverse of the last half of P-function */ + dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw; + dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw; + dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw; + dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw; + dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw; + dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw; + dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw; + dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw; + dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw; + dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw; + dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw; + dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw; + dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw; + dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw; + dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw; + dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw; + dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw; + dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw; + + return; +} + +void camellia_setup256(const unsigned char *key, u32 *subkey) +{ + u32 kll,klr,krl,krr; /* left half of key */ + u32 krll,krlr,krrl,krrr; /* right half of key */ + u32 il, ir, t0, t1, w0, w1; /* temporary variables */ + u32 kw4l, kw4r, dw, tl, tr; + u32 subL[34]; + u32 subR[34]; + + /** + * key = (kll || klr || krl || krr || krll || krlr || krrl || krrr) + * (|| is concatination) + */ + + kll = GETU32(key ); + klr = GETU32(key + 4); + krl = GETU32(key + 8); + krr = GETU32(key + 12); + krll = GETU32(key + 16); + krlr = GETU32(key + 20); + krrl = GETU32(key + 24); + krrr = GETU32(key + 28); + + /* generate KL dependent subkeys */ + subl(0) = kll; subr(0) = klr; + subl(1) = krl; subr(1) = krr; + CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 45); + subl(12) = kll; subr(12) = klr; + subl(13) = krl; subr(13) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(16) = kll; subr(16) = klr; + subl(17) = krl; subr(17) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17); + subl(22) = kll; subr(22) = klr; + subl(23) = krl; subr(23) = krr; + CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34); + subl(30) = kll; subr(30) = klr; + subl(31) = krl; subr(31) = krr; + + /* generate KR dependent subkeys */ + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15); + subl(4) = krll; subr(4) = krlr; + subl(5) = krrl; subr(5) = krrr; + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15); + subl(8) = krll; subr(8) = krlr; + subl(9) = krrl; subr(9) = krrr; + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); + subl(18) = krll; subr(18) = krlr; + subl(19) = krrl; subr(19) = krrr; + CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34); + subl(26) = krll; subr(26) = krlr; + subl(27) = krrl; subr(27) = krrr; + CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34); + + /* generate KA */ + kll = subl(0) ^ krll; klr = subr(0) ^ krlr; + krl = subl(1) ^ krrl; krr = subr(1) ^ krrr; + CAMELLIA_F(kll, klr, + CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R, + w0, w1, il, ir, t0, t1); + krl ^= w0; krr ^= w1; + CAMELLIA_F(krl, krr, + CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R, + kll, klr, il, ir, t0, t1); + kll ^= krll; klr ^= krlr; + CAMELLIA_F(kll, klr, + CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R, + krl, krr, il, ir, t0, t1); + krl ^= w0 ^ krrl; krr ^= w1 ^ krrr; + CAMELLIA_F(krl, krr, + CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R, + w0, w1, il, ir, t0, t1); + kll ^= w0; klr ^= w1; + + /* generate KB */ + krll ^= kll; krlr ^= klr; + krrl ^= krl; krrr ^= krr; + CAMELLIA_F(krll, krlr, + CAMELLIA_SIGMA5L, CAMELLIA_SIGMA5R, + w0, w1, il, ir, t0, t1); + krrl ^= w0; krrr ^= w1; + CAMELLIA_F(krrl, krrr, + CAMELLIA_SIGMA6L, CAMELLIA_SIGMA6R, + w0, w1, il, ir, t0, t1); + krll ^= w0; krlr ^= w1; + + /* generate KA dependent subkeys */ + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15); + subl(6) = kll; subr(6) = klr; + subl(7) = krl; subr(7) = krr; + CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30); + subl(14) = kll; subr(14) = klr; + subl(15) = krl; subr(15) = krr; + subl(24) = klr; subr(24) = krl; + subl(25) = krr; subr(25) = kll; + CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 49); + subl(28) = kll; subr(28) = klr; + subl(29) = krl; subr(29) = krr; + + /* generate KB dependent subkeys */ + subl(2) = krll; subr(2) = krlr; + subl(3) = krrl; subr(3) = krrr; + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); + subl(10) = krll; subr(10) = krlr; + subl(11) = krrl; subr(11) = krrr; + CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30); + subl(20) = krll; subr(20) = krlr; + subl(21) = krrl; subr(21) = krrr; + CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 51); + subl(32) = krll; subr(32) = krlr; + subl(33) = krrl; subr(33) = krrr; + + /* absorb kw2 to other subkeys */ + subl(3) ^= subl(1); subr(3) ^= subr(1); + subl(5) ^= subl(1); subr(5) ^= subr(1); + subl(7) ^= subl(1); subr(7) ^= subr(1); + subl(1) ^= subr(1) & ~subr(9); + dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw); + subl(11) ^= subl(1); subr(11) ^= subr(1); + subl(13) ^= subl(1); subr(13) ^= subr(1); + subl(15) ^= subl(1); subr(15) ^= subr(1); + subl(1) ^= subr(1) & ~subr(17); + dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw); + subl(19) ^= subl(1); subr(19) ^= subr(1); + subl(21) ^= subl(1); subr(21) ^= subr(1); + subl(23) ^= subl(1); subr(23) ^= subr(1); + subl(1) ^= subr(1) & ~subr(25); + dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw); + subl(27) ^= subl(1); subr(27) ^= subr(1); + subl(29) ^= subl(1); subr(29) ^= subr(1); + subl(31) ^= subl(1); subr(31) ^= subr(1); + subl(32) ^= subl(1); subr(32) ^= subr(1); + + /* absorb kw4 to other subkeys */ + kw4l = subl(33); kw4r = subr(33); + subl(30) ^= kw4l; subr(30) ^= kw4r; + subl(28) ^= kw4l; subr(28) ^= kw4r; + subl(26) ^= kw4l; subr(26) ^= kw4r; + kw4l ^= kw4r & ~subr(24); + dw = kw4l & subl(24), kw4r ^= CAMELLIA_RL1(dw); + subl(22) ^= kw4l; subr(22) ^= kw4r; + subl(20) ^= kw4l; subr(20) ^= kw4r; + subl(18) ^= kw4l; subr(18) ^= kw4r; + kw4l ^= kw4r & ~subr(16); + dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw); + subl(14) ^= kw4l; subr(14) ^= kw4r; + subl(12) ^= kw4l; subr(12) ^= kw4r; + subl(10) ^= kw4l; subr(10) ^= kw4r; + kw4l ^= kw4r & ~subr(8); + dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw); + subl(6) ^= kw4l; subr(6) ^= kw4r; + subl(4) ^= kw4l; subr(4) ^= kw4r; + subl(2) ^= kw4l; subr(2) ^= kw4r; + subl(0) ^= kw4l; subr(0) ^= kw4r; + + /* key XOR is end of F-function */ + CamelliaSubkeyL(0) = subl(0) ^ subl(2); + CamelliaSubkeyR(0) = subr(0) ^ subr(2); + CamelliaSubkeyL(2) = subl(3); + CamelliaSubkeyR(2) = subr(3); + CamelliaSubkeyL(3) = subl(2) ^ subl(4); + CamelliaSubkeyR(3) = subr(2) ^ subr(4); + CamelliaSubkeyL(4) = subl(3) ^ subl(5); + CamelliaSubkeyR(4) = subr(3) ^ subr(5); + CamelliaSubkeyL(5) = subl(4) ^ subl(6); + CamelliaSubkeyR(5) = subr(4) ^ subr(6); + CamelliaSubkeyL(6) = subl(5) ^ subl(7); + CamelliaSubkeyR(6) = subr(5) ^ subr(7); + tl = subl(10) ^ (subr(10) & ~subr(8)); + dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(7) = subl(6) ^ tl; + CamelliaSubkeyR(7) = subr(6) ^ tr; + CamelliaSubkeyL(8) = subl(8); + CamelliaSubkeyR(8) = subr(8); + CamelliaSubkeyL(9) = subl(9); + CamelliaSubkeyR(9) = subr(9); + tl = subl(7) ^ (subr(7) & ~subr(9)); + dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(10) = tl ^ subl(11); + CamelliaSubkeyR(10) = tr ^ subr(11); + CamelliaSubkeyL(11) = subl(10) ^ subl(12); + CamelliaSubkeyR(11) = subr(10) ^ subr(12); + CamelliaSubkeyL(12) = subl(11) ^ subl(13); + CamelliaSubkeyR(12) = subr(11) ^ subr(13); + CamelliaSubkeyL(13) = subl(12) ^ subl(14); + CamelliaSubkeyR(13) = subr(12) ^ subr(14); + CamelliaSubkeyL(14) = subl(13) ^ subl(15); + CamelliaSubkeyR(14) = subr(13) ^ subr(15); + tl = subl(18) ^ (subr(18) & ~subr(16)); + dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(15) = subl(14) ^ tl; + CamelliaSubkeyR(15) = subr(14) ^ tr; + CamelliaSubkeyL(16) = subl(16); + CamelliaSubkeyR(16) = subr(16); + CamelliaSubkeyL(17) = subl(17); + CamelliaSubkeyR(17) = subr(17); + tl = subl(15) ^ (subr(15) & ~subr(17)); + dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(18) = tl ^ subl(19); + CamelliaSubkeyR(18) = tr ^ subr(19); + CamelliaSubkeyL(19) = subl(18) ^ subl(20); + CamelliaSubkeyR(19) = subr(18) ^ subr(20); + CamelliaSubkeyL(20) = subl(19) ^ subl(21); + CamelliaSubkeyR(20) = subr(19) ^ subr(21); + CamelliaSubkeyL(21) = subl(20) ^ subl(22); + CamelliaSubkeyR(21) = subr(20) ^ subr(22); + CamelliaSubkeyL(22) = subl(21) ^ subl(23); + CamelliaSubkeyR(22) = subr(21) ^ subr(23); + tl = subl(26) ^ (subr(26) & ~subr(24)); + dw = tl & subl(24), tr = subr(26) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(23) = subl(22) ^ tl; + CamelliaSubkeyR(23) = subr(22) ^ tr; + CamelliaSubkeyL(24) = subl(24); + CamelliaSubkeyR(24) = subr(24); + CamelliaSubkeyL(25) = subl(25); + CamelliaSubkeyR(25) = subr(25); + tl = subl(23) ^ (subr(23) & ~subr(25)); + dw = tl & subl(25), tr = subr(23) ^ CAMELLIA_RL1(dw); + CamelliaSubkeyL(26) = tl ^ subl(27); + CamelliaSubkeyR(26) = tr ^ subr(27); + CamelliaSubkeyL(27) = subl(26) ^ subl(28); + CamelliaSubkeyR(27) = subr(26) ^ subr(28); + CamelliaSubkeyL(28) = subl(27) ^ subl(29); + CamelliaSubkeyR(28) = subr(27) ^ subr(29); + CamelliaSubkeyL(29) = subl(28) ^ subl(30); + CamelliaSubkeyR(29) = subr(28) ^ subr(30); + CamelliaSubkeyL(30) = subl(29) ^ subl(31); + CamelliaSubkeyR(30) = subr(29) ^ subr(31); + CamelliaSubkeyL(31) = subl(30); + CamelliaSubkeyR(31) = subr(30); + CamelliaSubkeyL(32) = subl(32) ^ subl(31); + CamelliaSubkeyR(32) = subr(32) ^ subr(31); + + /* apply the inverse of the last half of P-function */ + dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw; + dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw; + dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw; + dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw; + dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw; + dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw; + dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw; + dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw; + dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw; + dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw; + dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw; + dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw; + dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw; + dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw; + dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw; + dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw; + dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw; + dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw; + dw = CamelliaSubkeyL(26) ^ CamelliaSubkeyR(26), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(26) = CamelliaSubkeyL(26) ^ dw, CamelliaSubkeyL(26) = dw; + dw = CamelliaSubkeyL(27) ^ CamelliaSubkeyR(27), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(27) = CamelliaSubkeyL(27) ^ dw, CamelliaSubkeyL(27) = dw; + dw = CamelliaSubkeyL(28) ^ CamelliaSubkeyR(28), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(28) = CamelliaSubkeyL(28) ^ dw, CamelliaSubkeyL(28) = dw; + dw = CamelliaSubkeyL(29) ^ CamelliaSubkeyR(29), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(29) = CamelliaSubkeyL(29) ^ dw, CamelliaSubkeyL(29) = dw; + dw = CamelliaSubkeyL(30) ^ CamelliaSubkeyR(30), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(30) = CamelliaSubkeyL(30) ^ dw, CamelliaSubkeyL(30) = dw; + dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw); + CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw,CamelliaSubkeyL(31) = dw; + + return; +} + +void camellia_setup192(const unsigned char *key, u32 *subkey) +{ + unsigned char kk[32]; + u32 krll, krlr, krrl,krrr; + + memcpy(kk, key, 24); + memcpy((unsigned char *)&krll, key+16,4); + memcpy((unsigned char *)&krlr, key+20,4); + krrl = ~krll; + krrr = ~krlr; + memcpy(kk+24, (unsigned char *)&krrl, 4); + memcpy(kk+28, (unsigned char *)&krrr, 4); + camellia_setup256(kk, subkey); + return; +} + + +/** + * Stuff related to camellia encryption/decryption + * + * "io" must be 4byte aligned and big-endian data. + */ +void camellia_encrypt128(const u32 *subkey, u32 *io) +{ + u32 il, ir, t0, t1; + + /* pre whitening but absorb kw2*/ + io[0] ^= CamelliaSubkeyL(0); + io[1] ^= CamelliaSubkeyR(0); + /* main iteration */ + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(2),CamelliaSubkeyR(2), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(3),CamelliaSubkeyR(3), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(4),CamelliaSubkeyR(4), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(5),CamelliaSubkeyR(5), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(6),CamelliaSubkeyR(6), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(7),CamelliaSubkeyR(7), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(8),CamelliaSubkeyR(8), + CamelliaSubkeyL(9),CamelliaSubkeyR(9), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(10),CamelliaSubkeyR(10), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(11),CamelliaSubkeyR(11), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(12),CamelliaSubkeyR(12), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(13),CamelliaSubkeyR(13), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(14),CamelliaSubkeyR(14), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(15),CamelliaSubkeyR(15), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(16),CamelliaSubkeyR(16), + CamelliaSubkeyL(17),CamelliaSubkeyR(17), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(18),CamelliaSubkeyR(18), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(19),CamelliaSubkeyR(19), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(20),CamelliaSubkeyR(20), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(21),CamelliaSubkeyR(21), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(22),CamelliaSubkeyR(22), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(23),CamelliaSubkeyR(23), + io[0],io[1],il,ir,t0,t1); + + /* post whitening but kw4 */ + io[2] ^= CamelliaSubkeyL(24); + io[3] ^= CamelliaSubkeyR(24); + + t0 = io[0]; + t1 = io[1]; + io[0] = io[2]; + io[1] = io[3]; + io[2] = t0; + io[3] = t1; + + return; +} + +void camellia_decrypt128(const u32 *subkey, u32 *io) +{ + u32 il,ir,t0,t1; /* temporary valiables */ + + /* pre whitening but absorb kw2*/ + io[0] ^= CamelliaSubkeyL(24); + io[1] ^= CamelliaSubkeyR(24); + + /* main iteration */ + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(23),CamelliaSubkeyR(23), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(22),CamelliaSubkeyR(22), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(21),CamelliaSubkeyR(21), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(20),CamelliaSubkeyR(20), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(19),CamelliaSubkeyR(19), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(18),CamelliaSubkeyR(18), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(17),CamelliaSubkeyR(17), + CamelliaSubkeyL(16),CamelliaSubkeyR(16), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(15),CamelliaSubkeyR(15), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(14),CamelliaSubkeyR(14), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(13),CamelliaSubkeyR(13), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(12),CamelliaSubkeyR(12), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(11),CamelliaSubkeyR(11), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(10),CamelliaSubkeyR(10), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(9),CamelliaSubkeyR(9), + CamelliaSubkeyL(8),CamelliaSubkeyR(8), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(7),CamelliaSubkeyR(7), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(6),CamelliaSubkeyR(6), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(5),CamelliaSubkeyR(5), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(4),CamelliaSubkeyR(4), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(3),CamelliaSubkeyR(3), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(2),CamelliaSubkeyR(2), + io[0],io[1],il,ir,t0,t1); + + /* post whitening but kw4 */ + io[2] ^= CamelliaSubkeyL(0); + io[3] ^= CamelliaSubkeyR(0); + + t0 = io[0]; + t1 = io[1]; + io[0] = io[2]; + io[1] = io[3]; + io[2] = t0; + io[3] = t1; + + return; +} + +/** + * stuff for 192 and 256bit encryption/decryption + */ +void camellia_encrypt256(const u32 *subkey, u32 *io) +{ + u32 il,ir,t0,t1; /* temporary valiables */ + + /* pre whitening but absorb kw2*/ + io[0] ^= CamelliaSubkeyL(0); + io[1] ^= CamelliaSubkeyR(0); + + /* main iteration */ + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(2),CamelliaSubkeyR(2), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(3),CamelliaSubkeyR(3), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(4),CamelliaSubkeyR(4), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(5),CamelliaSubkeyR(5), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(6),CamelliaSubkeyR(6), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(7),CamelliaSubkeyR(7), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(8),CamelliaSubkeyR(8), + CamelliaSubkeyL(9),CamelliaSubkeyR(9), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(10),CamelliaSubkeyR(10), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(11),CamelliaSubkeyR(11), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(12),CamelliaSubkeyR(12), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(13),CamelliaSubkeyR(13), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(14),CamelliaSubkeyR(14), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(15),CamelliaSubkeyR(15), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(16),CamelliaSubkeyR(16), + CamelliaSubkeyL(17),CamelliaSubkeyR(17), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(18),CamelliaSubkeyR(18), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(19),CamelliaSubkeyR(19), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(20),CamelliaSubkeyR(20), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(21),CamelliaSubkeyR(21), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(22),CamelliaSubkeyR(22), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(23),CamelliaSubkeyR(23), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(24),CamelliaSubkeyR(24), + CamelliaSubkeyL(25),CamelliaSubkeyR(25), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(26),CamelliaSubkeyR(26), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(27),CamelliaSubkeyR(27), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(28),CamelliaSubkeyR(28), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(29),CamelliaSubkeyR(29), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(30),CamelliaSubkeyR(30), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(31),CamelliaSubkeyR(31), + io[0],io[1],il,ir,t0,t1); + + /* post whitening but kw4 */ + io[2] ^= CamelliaSubkeyL(32); + io[3] ^= CamelliaSubkeyR(32); + + t0 = io[0]; + t1 = io[1]; + io[0] = io[2]; + io[1] = io[3]; + io[2] = t0; + io[3] = t1; + + return; +} + +void camellia_decrypt256(const u32 *subkey, u32 *io) +{ + u32 il,ir,t0,t1; /* temporary valiables */ + + /* pre whitening but absorb kw2*/ + io[0] ^= CamelliaSubkeyL(32); + io[1] ^= CamelliaSubkeyR(32); + + /* main iteration */ + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(31),CamelliaSubkeyR(31), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(30),CamelliaSubkeyR(30), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(29),CamelliaSubkeyR(29), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(28),CamelliaSubkeyR(28), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(27),CamelliaSubkeyR(27), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(26),CamelliaSubkeyR(26), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(25),CamelliaSubkeyR(25), + CamelliaSubkeyL(24),CamelliaSubkeyR(24), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(23),CamelliaSubkeyR(23), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(22),CamelliaSubkeyR(22), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(21),CamelliaSubkeyR(21), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(20),CamelliaSubkeyR(20), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(19),CamelliaSubkeyR(19), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(18),CamelliaSubkeyR(18), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(17),CamelliaSubkeyR(17), + CamelliaSubkeyL(16),CamelliaSubkeyR(16), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(15),CamelliaSubkeyR(15), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(14),CamelliaSubkeyR(14), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(13),CamelliaSubkeyR(13), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(12),CamelliaSubkeyR(12), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(11),CamelliaSubkeyR(11), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(10),CamelliaSubkeyR(10), + io[0],io[1],il,ir,t0,t1); + + CAMELLIA_FLS(io[0],io[1],io[2],io[3], + CamelliaSubkeyL(9),CamelliaSubkeyR(9), + CamelliaSubkeyL(8),CamelliaSubkeyR(8), + t0,t1,il,ir); + + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(7),CamelliaSubkeyR(7), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(6),CamelliaSubkeyR(6), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(5),CamelliaSubkeyR(5), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(4),CamelliaSubkeyR(4), + io[0],io[1],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[0],io[1], + CamelliaSubkeyL(3),CamelliaSubkeyR(3), + io[2],io[3],il,ir,t0,t1); + CAMELLIA_ROUNDSM(io[2],io[3], + CamelliaSubkeyL(2),CamelliaSubkeyR(2), + io[0],io[1],il,ir,t0,t1); + + /* post whitening but kw4 */ + io[2] ^= CamelliaSubkeyL(0); + io[3] ^= CamelliaSubkeyR(0); + + t0 = io[0]; + t1 = io[1]; + io[0] = io[2]; + io[1] = io[3]; + io[2] = t0; + io[3] = t1; + + return; +} + +/*** + * + * API for compatibility + */ + +void Camellia_Ekeygen(const int keyBitLength, + const unsigned char *rawKey, + KEY_TABLE_TYPE keyTable) +{ + switch(keyBitLength) { + case 128: + camellia_setup128(rawKey, keyTable); + break; + case 192: + camellia_setup192(rawKey, keyTable); + break; + case 256: + camellia_setup256(rawKey, keyTable); + break; + default: + break; + } +} + + +void Camellia_EncryptBlock(const int keyBitLength, + const unsigned char *plaintext, + const KEY_TABLE_TYPE keyTable, + unsigned char *ciphertext) +{ + u32 tmp[4]; + + tmp[0] = GETU32(plaintext); + tmp[1] = GETU32(plaintext + 4); + tmp[2] = GETU32(plaintext + 8); + tmp[3] = GETU32(plaintext + 12); + + switch (keyBitLength) { + case 128: + camellia_encrypt128(keyTable, tmp); + break; + case 192: + /* fall through */ + case 256: + camellia_encrypt256(keyTable, tmp); + break; + default: + break; + } + + PUTU32(ciphertext, tmp[0]); + PUTU32(ciphertext + 4, tmp[1]); + PUTU32(ciphertext + 8, tmp[2]); + PUTU32(ciphertext + 12, tmp[3]); +} + +void Camellia_DecryptBlock(const int keyBitLength, + const unsigned char *ciphertext, + const KEY_TABLE_TYPE keyTable, + unsigned char *plaintext) +{ + u32 tmp[4]; + + tmp[0] = GETU32(ciphertext); + tmp[1] = GETU32(ciphertext + 4); + tmp[2] = GETU32(ciphertext + 8); + tmp[3] = GETU32(ciphertext + 12); + + switch (keyBitLength) { + case 128: + camellia_decrypt128(keyTable, tmp); + break; + case 192: + /* fall through */ + case 256: + camellia_decrypt256(keyTable, tmp); + break; + default: + break; + } + PUTU32(plaintext, tmp[0]); + PUTU32(plaintext + 4, tmp[1]); + PUTU32(plaintext + 8, tmp[2]); + PUTU32(plaintext + 12, tmp[3]); +} From 85a8d37501f24fd48824074747440ae012b6837f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:04:07 -0500 Subject: [PATCH 312/576] Create camellia.h --- .../encryption/camellia/camellia.h | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/camellia/camellia.h diff --git a/stratum/algos/binarium_hash_v1/encryption/camellia/camellia.h b/stratum/algos/binarium_hash_v1/encryption/camellia/camellia.h new file mode 100644 index 000000000..6a27d8e35 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/camellia/camellia.h @@ -0,0 +1,61 @@ +/* camellia.h ver 1.2.0 + * + * Copyright (c) 2006,2007 + * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer as + * the first lines of this file unmodified. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NTT ``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 NTT 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. + */ + +#ifndef HEADER_CAMELLIA_H +#define HEADER_CAMELLIA_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define CAMELLIA_BLOCK_SIZE 16 +#define CAMELLIA_TABLE_BYTE_LEN 272 +#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) + +typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; + + +void Camellia_Ekeygen(const int keyBitLength, + const unsigned char *rawKey, + KEY_TABLE_TYPE keyTable); + +void Camellia_EncryptBlock(const int keyBitLength, + const unsigned char *plaintext, + const KEY_TABLE_TYPE keyTable, + unsigned char *cipherText); + +void Camellia_DecryptBlock(const int keyBitLength, + const unsigned char *cipherText, + const KEY_TABLE_TYPE keyTable, + unsigned char *plaintext); + + +#ifdef __cplusplus +} +#endif + +#endif /* HEADER_CAMELLIA_H */ From cc910d7825d593ee1c4bb6ab3371d61e89c3d3e2 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:04:38 -0500 Subject: [PATCH 313/576] Create SIMD.c --- .../encryption/gost2015_kuznechik/SIMD.c | 228 ++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c new file mode 100644 index 000000000..e449e9b77 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c @@ -0,0 +1,228 @@ +#include "libgost15/libgost15.h" +#include "SIMD_tables.h" +#include "shared/tables.h" +#include +#include + +// TODO: Beat alignment warnings with Clang's and GCC's -Wcast-align. + +const size_t WorkspaceOfScheduleRoundKeys = 0; + +static void applySTransformation(__m128i *block) { + union block_t { + uint8_t asBytes[BlockLengthInBytes]; + __m128i asXMMWord; + } temporary_ = {{0}}; + _mm_storeu_si128(&(temporary_.asXMMWord), *block); + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { + temporary_.asBytes[byteIndex_] = Pi[temporary_.asBytes[byteIndex_]]; + } + *block = _mm_loadu_si128(&temporary_.asXMMWord); +} + +static void applyInversedSTransformation(__m128i *block) { + union block_t { + uint8_t asBytes[BlockLengthInBytes]; + __m128i asXMMWord; + } temporary_ = {{0}}; + _mm_storeu_si128(&temporary_.asXMMWord, *block); + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { + temporary_.asBytes[byteIndex_] = InversedPi[temporary_.asBytes[byteIndex_]]; + } + *block = _mm_loadu_si128(&temporary_.asXMMWord); +} + + +static void swapBlocks( + __m128i *left, + __m128i *right) { + *left = _mm_xor_si128(*left, *right); + *right = _mm_xor_si128(*left, *right); + *left = _mm_xor_si128(*left, *right); +} + + +static void applyLSTransformation( + const __m128i *input, + __m128i *output +) { + __m128i temporary1_, temporary2_; + __m128i addresses1_, addresses2_; + + addresses1_ = _mm_and_si128(*(const __m128i *) bitmask, *input); + addresses2_ = _mm_andnot_si128(*(const __m128i *) bitmask, *input); + + addresses1_ = _mm_srli_epi16(addresses1_, 4); + addresses2_ = _mm_slli_epi16(addresses2_, 4); + + temporary1_ = _mm_load_si128((const void *) (precomputedLSTable + _mm_extract_epi16(addresses1_, 0) + 0x1000)); + temporary2_ = _mm_load_si128((const void *) (precomputedLSTable + _mm_extract_epi16(addresses2_, 0))); + + temporary1_ = _mm_xor_si128(temporary1_, *(const __m128i *) (precomputedLSTable+ _mm_extract_epi16(addresses1_, 1)+ 0x3000)); + temporary2_ = _mm_xor_si128(temporary2_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses2_, 1) + 0x2000)); + + temporary1_ = _mm_xor_si128(temporary1_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses1_, 2) + 0x5000)); + temporary2_ = _mm_xor_si128(temporary2_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses2_, 2) + 0x4000)); + + temporary1_ = _mm_xor_si128(temporary1_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses1_, 3) + 0x7000)); + temporary2_ = _mm_xor_si128(temporary2_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses2_, 3) + 0x6000)); + + temporary1_ = _mm_xor_si128(temporary1_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses1_, 4) + 0x9000)); + temporary2_ = _mm_xor_si128(temporary2_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses2_, 4) + 0x8000)); + + temporary1_ = _mm_xor_si128(temporary1_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses1_, 5) + 0xB000)); + temporary2_ = _mm_xor_si128(temporary2_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses2_, 5) + 0xA000)); + + temporary1_ = _mm_xor_si128(temporary1_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses1_, 6) + 0xD000)); + temporary2_ = _mm_xor_si128(temporary2_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses2_, 6) + 0xC000)); + + temporary1_ = _mm_xor_si128(temporary1_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses1_, 7) + 0xF000)); + temporary2_ = _mm_xor_si128(temporary2_, *(const __m128i *) (precomputedLSTable + _mm_extract_epi16(addresses2_, 7) + 0xE000)); + + *output = _mm_xor_si128(temporary1_, temporary2_); +} + + +static void applyInversedLSTransformation( + const __m128i *input, + __m128i *output +) { + __m128i cache1_, cache2_; + __m128i addresses1_, addresses2_; + + addresses1_ = _mm_and_si128(*(const __m128i *) bitmask, *input); + addresses2_ = _mm_andnot_si128(*(const __m128i *) bitmask, *input); + + addresses1_ = _mm_srli_epi16(addresses1_, 4); + addresses2_ = _mm_slli_epi16(addresses2_, 4); + + cache1_ = _mm_load_si128((const void *) (precomputedInversedLSTable + _mm_extract_epi16(addresses1_, 0) + 0x1000)); + cache2_ = _mm_load_si128((const void *) (precomputedInversedLSTable + _mm_extract_epi16(addresses2_, 0))); + + cache1_ = _mm_xor_si128(cache1_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses1_, 1) + 0x3000)); + cache2_ = _mm_xor_si128(cache2_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses2_, 1) + 0x2000)); + + cache1_ = _mm_xor_si128(cache1_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses1_, 2) + 0x5000)); + cache2_ = _mm_xor_si128(cache2_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses2_, 2) + 0x4000)); + + cache1_ = _mm_xor_si128(cache1_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses1_, 3) + 0x7000)); + cache2_ = _mm_xor_si128(cache2_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses2_, 3) + 0x6000)); + + cache1_ = _mm_xor_si128(cache1_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses1_, 4) + 0x9000)); + cache2_ = _mm_xor_si128(cache2_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses2_, 4) + 0x8000)); + + cache1_ = _mm_xor_si128(cache1_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses1_, 5) + 0xB000)); + cache2_ = _mm_xor_si128(cache2_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses2_, 5) + 0xA000)); + + cache1_ = _mm_xor_si128(cache1_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses1_, 6) + 0xD000)); + cache2_ = _mm_xor_si128(cache2_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses2_, 6) + 0xC000)); + + cache1_ = _mm_xor_si128(cache1_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses1_, 7) + 0xF000)); + cache2_ = _mm_xor_si128(cache2_, *(const __m128i *) (precomputedInversedLSTable + _mm_extract_epi16(addresses2_, 7) + 0xE000)); + + *output = _mm_xor_si128(cache1_, cache2_); +} + + +static void applyFTransformation( + int constantIndex, + __m128i *left, + __m128i *right +) { + __m128i temporary1_, temporary2_; + + temporary1_ = _mm_loadu_si128((const __m128i *) &roundConstants[BlockLengthInBytes * constantIndex]); + temporary2_ = _mm_xor_si128(*left, temporary1_); + applyLSTransformation(&temporary2_, &temporary1_); + *right = _mm_xor_si128(*right, temporary1_); + swapBlocks(left, right); +} + + +void scheduleEncryptionRoundKeysForGost15( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + (void) memory; + uint64_t *roundKeys_ = roundKeys; + + memcpy(&roundKeys_[0], key, BlockLengthInBytes * 2); + + for (int nextKeyIndex_ = 2, constantIndex_ = 0; nextKeyIndex_ != NumberOfRounds; nextKeyIndex_ += 2) { + __m128i nextKey1_, nextKey2_; + + nextKey1_ = _mm_loadu_si128((__m128i *) &roundKeys_[2 * (nextKeyIndex_ - 2)]); + nextKey2_ = _mm_loadu_si128((__m128i *) &roundKeys_[2 * (nextKeyIndex_ - 1)]); + + for (int feistelRoundIndex_ = 0; feistelRoundIndex_ < NumberOfRoundsInKeySchedule; ++feistelRoundIndex_) { + applyFTransformation(constantIndex_++, &nextKey1_, &nextKey2_); + } + + _mm_storeu_si128((__m128i *) &roundKeys_[2 * (nextKeyIndex_)], nextKey1_); + _mm_storeu_si128((__m128i *) &roundKeys_[2 * (nextKeyIndex_ + 1)], nextKey2_); + } +} + + +void scheduleDecryptionRoundKeysForGost15( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + uint64_t *roundKeys_ = roundKeys; + scheduleEncryptionRoundKeysForGost15(roundKeys, key, memory); + + for (int keyIndex_ = 1; keyIndex_ <= 8; ++keyIndex_) { + __m128i temporary1_, temporary2_; + + temporary1_ = _mm_loadu_si128((__m128i *) &roundKeys_[2 * keyIndex_]); + applySTransformation(&temporary1_); + applyInversedLSTransformation(&temporary1_, &temporary2_); + _mm_storeu_si128((__m128i *) &roundKeys_[2 * keyIndex_], temporary2_); + } +} + + +void encryptBlockWithGost15( + const void *restrict roundKeys, + void *restrict data +) { + const uint64_t *roundKeys_ = roundKeys; + __m128i cache_, data_; + int round_; + + data_ = _mm_loadu_si128(data); + for (round_ = 0; round_ < NumberOfRounds - 1; ++round_) { + cache_ = _mm_xor_si128(data_, *(const __m128i *) &roundKeys_[2 * round_]); + applyLSTransformation(&cache_, &data_); + } + data_ = _mm_xor_si128(data_, *(const __m128i *) &roundKeys_[2 * round_]); + _mm_store_si128(data, data_); +} + + +void decryptBlockWithGost15( + const void *restrict roundKeys, + void *restrict data +) { + const uint64_t *roundKeys_ = roundKeys; + __m128i cache_, data_; + + data_ = _mm_loadu_si128(data); + data_ = _mm_xor_si128(data_, *(const __m128i *) &roundKeys_[2 * (NumberOfRounds - 1)]); + + applySTransformation(&data_); + applyInversedLSTransformation(&data_, &cache_); + applyInversedLSTransformation(&cache_, &data_); + cache_ = _mm_xor_si128(data_, *(const __m128i *) &roundKeys_[2 * (NumberOfRounds - 2)]); + + for (int round_ = NumberOfRounds - 3; round_ > 0; --round_) { + applyInversedLSTransformation(&cache_, &data_); + cache_ = _mm_xor_si128(data_, *(const __m128i *) &roundKeys_[2 * round_]); + } + + applyInversedSTransformation(&cache_); + data_ = _mm_xor_si128(cache_, *(const __m128i *) &roundKeys_[0]); + _mm_store_si128(data, data_); +} From f8667d5596a3629c8239b889c65fd1ed650d97a5 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:05:23 -0500 Subject: [PATCH 314/576] Create SIMD_tables.c --- .../gost2015_kuznechik/SIMD_tables.c | 8265 +++++++++++++++++ 1 file changed, 8265 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c new file mode 100644 index 000000000..54e8c7d73 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c @@ -0,0 +1,8265 @@ +#include "SIMD_tables.h" + +const uint8_t ALIGNED(bitmask[16]) = { + 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, +}; + +const uint8_t ALIGNED(precomputedInversedLSTable[16 * 256 * 16]) = { + /* Matrix row: 0 */ + 0xa5, 0xcc, 0x0e, 0x86, 0xc2, 0x4f, 0xba, 0x59, 0x3b, 0xe3, 0xef, 0x79, 0x82, 0x53, 0x11, 0xf0, /* Byte value: 0x00 */ + 0x2d, 0x03, 0x96, 0x94, 0x95, 0x6c, 0x2a, 0xb6, 0xf5, 0x9c, 0xba, 0xe7, 0x37, 0x83, 0x91, 0xbd, /* Byte value: 0x01 */ + 0x32, 0x17, 0xb1, 0xab, 0xa6, 0xf9, 0x11, 0xd2, 0x03, 0xc3, 0x8e, 0xc9, 0x90, 0x58, 0x92, 0xad, /* Byte value: 0x02 */ + 0x8f, 0xa5, 0x82, 0x44, 0x27, 0x96, 0x65, 0xbf, 0x60, 0xda, 0x6e, 0x59, 0x28, 0x51, 0x68, 0x84, /* Byte value: 0x03 */ + 0x0e, 0xd4, 0x34, 0xac, 0xe0, 0xa9, 0x29, 0xa0, 0x9f, 0x89, 0x76, 0x4d, 0xf9, 0xc1, 0x13, 0x51, /* Byte value: 0x04 */ + 0x30, 0xfc, 0x7a, 0xd2, 0x86, 0x40, 0x5f, 0x68, 0xb0, 0x37, 0x1e, 0x11, 0x74, 0xb4, 0x15, 0x71, /* Byte value: 0x05 */ + 0x38, 0xd6, 0xd0, 0xf5, 0x06, 0xe1, 0xa4, 0xc5, 0x39, 0x61, 0x1b, 0xf7, 0x62, 0x82, 0x4c, 0x87, /* Byte value: 0x06 */ + 0xc0, 0x76, 0x2b, 0xce, 0x5d, 0xc3, 0xbf, 0x63, 0x85, 0xdc, 0x78, 0x44, 0x13, 0x95, 0x54, 0x07, /* Byte value: 0x07 */ + 0x54, 0xd2, 0xdb, 0x47, 0x09, 0x71, 0x7d, 0x0f, 0xb6, 0x72, 0xc1, 0x40, 0x97, 0x04, 0xf2, 0xe8, /* Byte value: 0x08 */ + 0xe6, 0x20, 0x58, 0xd9, 0x78, 0x0a, 0x07, 0x9f, 0xf2, 0x98, 0x1f, 0xf1, 0xa4, 0xba, 0xb9, 0xfe, /* Byte value: 0x09 */ + 0x9e, 0x65, 0x91, 0xd7, 0xf4, 0xaa, 0x77, 0x7b, 0x09, 0x0c, 0x2c, 0x3a, 0x76, 0x4b, 0x78, 0xc5, /* Byte value: 0x0a */ + 0x39, 0x42, 0x54, 0x28, 0x16, 0x5c, 0x83, 0x98, 0x81, 0x1b, 0x53, 0x9b, 0x10, 0xf4, 0xee, 0xe9, /* Byte value: 0x0b */ + 0x55, 0x46, 0x5f, 0x9a, 0x19, 0xcc, 0x5a, 0x52, 0x0e, 0x08, 0x89, 0x2c, 0xe5, 0x72, 0x50, 0x86, /* Byte value: 0x0c */ + 0x7e, 0xbb, 0x57, 0x85, 0xec, 0xa8, 0xa2, 0xe9, 0xed, 0x4b, 0x40, 0x60, 0x3d, 0x06, 0x8b, 0x9c, /* Byte value: 0x0d */ + 0x52, 0x2c, 0x45, 0xcc, 0x69, 0x79, 0xaf, 0x02, 0xa0, 0xad, 0xb2, 0xeb, 0x78, 0xf3, 0xb8, 0x4f, /* Byte value: 0x0e */ + 0x91, 0x25, 0x21, 0xa6, 0x04, 0xbe, 0x79, 0x86, 0x2e, 0xff, 0x12, 0x1b, 0xfd, 0xfc, 0xc9, 0xfa, /* Byte value: 0x0f */ + 0x64, 0x2e, 0xa1, 0x95, 0x8f, 0x31, 0x22, 0x67, 0x06, 0x45, 0xdf, 0x51, 0xe3, 0xb0, 0xe7, 0x99, /* Byte value: 0x10 */ + 0x03, 0x7f, 0x4f, 0xa4, 0x30, 0x04, 0x69, 0xe7, 0x0b, 0x8e, 0xd8, 0xb4, 0x96, 0x9a, 0x25, 0xb2, /* Byte value: 0x11 */ + 0x57, 0xad, 0x94, 0xe3, 0x39, 0x75, 0x14, 0xe8, 0xbd, 0xfc, 0x19, 0xf4, 0x01, 0x9e, 0xd7, 0x5a, /* Byte value: 0x12 */ + 0x5a, 0x06, 0xef, 0xeb, 0xe9, 0xd8, 0x54, 0xaf, 0x29, 0xfb, 0xb7, 0x0d, 0x6e, 0xc5, 0xe1, 0xb9, /* Byte value: 0x13 */ + 0x1c, 0x6b, 0x68, 0x9b, 0x03, 0x91, 0x52, 0x83, 0xfd, 0xd1, 0xec, 0x9a, 0x31, 0x41, 0x26, 0xa2, /* Byte value: 0x14 */ + 0x60, 0x3b, 0xf4, 0x67, 0xcf, 0x80, 0xbe, 0xd0, 0xa3, 0x6e, 0x3c, 0x22, 0xe8, 0xab, 0x2a, 0xe2, /* Byte value: 0x15 */ + 0x07, 0x6a, 0x1a, 0x56, 0x70, 0xb5, 0xf5, 0x50, 0xae, 0xa5, 0x3b, 0xc7, 0x9d, 0x81, 0xe8, 0xc9, /* Byte value: 0x16 */ + 0x18, 0x7e, 0x3d, 0x69, 0x43, 0x20, 0xce, 0x34, 0x58, 0xfa, 0x0f, 0xe9, 0x3a, 0x5a, 0xeb, 0xd9, /* Byte value: 0x17 */ + 0x21, 0x3c, 0x69, 0x41, 0x55, 0x7c, 0x4d, 0xac, 0xd9, 0xe1, 0x5c, 0x72, 0x2a, 0xae, 0x05, 0x30, /* Byte value: 0x18 */ + 0x72, 0x84, 0xa8, 0x50, 0x2c, 0xb8, 0xc5, 0xf3, 0xc1, 0x36, 0xa6, 0xf5, 0x20, 0x2b, 0x1f, 0x11, /* Byte value: 0x19 */ + 0xa8, 0x67, 0x75, 0x8e, 0x12, 0xe2, 0xfa, 0x1e, 0xaf, 0xe4, 0x41, 0x80, 0xed, 0x08, 0x27, 0x13, /* Byte value: 0x1a */ + 0xd1, 0xb6, 0x38, 0x5d, 0x8e, 0xff, 0xad, 0xa7, 0xec, 0x0a, 0x3a, 0x27, 0x4d, 0x8f, 0x44, 0x46, /* Byte value: 0x1b */ + 0x29, 0x16, 0xc3, 0x66, 0xd5, 0xdd, 0xb6, 0x01, 0x50, 0xb7, 0x59, 0x94, 0x3c, 0x98, 0x5c, 0xc6, /* Byte value: 0x1c */ + 0xc6, 0x88, 0xb5, 0x45, 0x3d, 0xcb, 0x6d, 0x6e, 0x93, 0x03, 0x0b, 0xef, 0xfc, 0x62, 0x1e, 0xa0, /* Byte value: 0x1d */ + 0xa4, 0x58, 0x8a, 0x5b, 0xd2, 0xf2, 0x9d, 0x04, 0x83, 0x99, 0xa7, 0x15, 0xf0, 0x25, 0xb3, 0x9e, /* Byte value: 0x1e */ + 0x3f, 0xbc, 0xca, 0xa3, 0x76, 0x54, 0x51, 0x95, 0x97, 0xc4, 0x20, 0x30, 0xff, 0x03, 0xa4, 0x4e, /* Byte value: 0x1f */ + 0xe0, 0xde, 0xc6, 0x52, 0x18, 0x02, 0xd5, 0x92, 0xe4, 0x47, 0x6c, 0x5a, 0x4b, 0x4d, 0xf3, 0x59, /* Byte value: 0x20 */ + 0x27, 0xc2, 0xf7, 0xca, 0x35, 0x74, 0x9f, 0xa1, 0xcf, 0x3e, 0x2f, 0xd9, 0xc5, 0x59, 0x4f, 0x97, /* Byte value: 0x21 */ + 0x8d, 0x4e, 0x49, 0x3d, 0x07, 0x2f, 0x2b, 0x05, 0xd3, 0x2e, 0xfe, 0x81, 0xcc, 0xbd, 0xef, 0x58, /* Byte value: 0x22 */ + 0x0c, 0x3f, 0xff, 0xd5, 0xc0, 0x10, 0x67, 0x1a, 0x2c, 0x7d, 0xe6, 0x95, 0x1d, 0x2d, 0x94, 0x8d, /* Byte value: 0x23 */ + 0x82, 0x0e, 0xf9, 0x4c, 0xf7, 0x3b, 0x25, 0xf8, 0xf4, 0xdd, 0xc0, 0xa0, 0x47, 0x0a, 0x5e, 0x67, /* Byte value: 0x24 */ + 0xea, 0x1f, 0xa7, 0x0c, 0xb8, 0x1a, 0x60, 0x85, 0xde, 0xe5, 0xf9, 0x64, 0xb9, 0x97, 0x2d, 0x73, /* Byte value: 0x25 */ + 0xae, 0x99, 0xeb, 0x05, 0x72, 0xea, 0x28, 0x13, 0xb9, 0x3b, 0x32, 0x2b, 0x02, 0xff, 0x6d, 0xb4, /* Byte value: 0x26 */ + 0xb4, 0x0c, 0x1d, 0x15, 0x11, 0x73, 0xa8, 0x9d, 0x52, 0x35, 0xad, 0x1a, 0xdc, 0x49, 0x01, 0xb1, /* Byte value: 0x27 */ + 0x9a, 0x70, 0xc4, 0x25, 0xb4, 0x1b, 0xeb, 0xcc, 0xac, 0x27, 0xcf, 0x49, 0x7d, 0x50, 0xb5, 0xbe, /* Byte value: 0x28 */ + 0x63, 0x44, 0xbb, 0xc3, 0xff, 0x84, 0xd7, 0x37, 0xa8, 0xe0, 0xe4, 0x96, 0x7e, 0x31, 0x0f, 0x50, /* Byte value: 0x29 */ + 0x49, 0x2d, 0x37, 0x01, 0x1a, 0x5d, 0x08, 0xd1, 0xf3, 0xd9, 0x65, 0xb6, 0xd4, 0x33, 0x76, 0x24, /* Byte value: 0x2a */ + 0xe5, 0x5f, 0x17, 0x7d, 0x48, 0x0e, 0x6e, 0x78, 0xf9, 0x16, 0xc7, 0x45, 0x32, 0x20, 0x9c, 0x4c, /* Byte value: 0x2b */ + 0x42, 0x78, 0xd2, 0x82, 0xaa, 0xf8, 0x9a, 0x9b, 0x71, 0x01, 0xb8, 0xe4, 0x54, 0x9f, 0x0a, 0x60, /* Byte value: 0x2c */ + 0xe4, 0xcb, 0x93, 0xa0, 0x58, 0xb3, 0x49, 0x25, 0x41, 0x6c, 0x8f, 0x29, 0x40, 0x56, 0x3e, 0x22, /* Byte value: 0x2d */ + 0x15, 0xd5, 0x46, 0x61, 0x93, 0x8d, 0x8e, 0x73, 0xcc, 0xfd, 0xa1, 0x10, 0x55, 0x01, 0xdd, 0x3a, /* Byte value: 0x2e */ + 0xb7, 0x73, 0x52, 0xb1, 0x21, 0x77, 0xc1, 0x7a, 0x59, 0xbb, 0x75, 0xae, 0x4a, 0xd3, 0x24, 0x03, /* Byte value: 0x2f */ + 0xc8, 0x5c, 0x81, 0xe9, 0xdd, 0x62, 0x44, 0xce, 0x0c, 0x8a, 0x7d, 0xa2, 0x05, 0xa3, 0x0d, 0xf1, /* Byte value: 0x30 */ + 0x06, 0xfe, 0x9e, 0x8b, 0x60, 0x08, 0xd2, 0x0d, 0x16, 0xdf, 0x73, 0xab, 0xef, 0xf7, 0x4a, 0xa7, /* Byte value: 0x31 */ + 0x70, 0x6f, 0x63, 0x29, 0x0c, 0x01, 0x8b, 0x49, 0x72, 0xc2, 0x36, 0x2d, 0xc4, 0xc7, 0x98, 0xcd, /* Byte value: 0x32 */ + 0x9d, 0x1a, 0xde, 0x73, 0xc4, 0xae, 0x1e, 0x9c, 0x02, 0x82, 0xf4, 0x8e, 0xe0, 0xd1, 0x5d, 0x77, /* Byte value: 0x33 */ + 0x41, 0x07, 0x9d, 0x26, 0x9a, 0xfc, 0xf3, 0x7c, 0x7a, 0x8f, 0x60, 0x50, 0xc2, 0x05, 0x2f, 0xd2, /* Byte value: 0x34 */ + 0x75, 0xee, 0xb2, 0x06, 0x5c, 0x0d, 0x30, 0xa3, 0x6f, 0x93, 0x9d, 0x32, 0xbd, 0xaa, 0xf7, 0xd8, /* Byte value: 0x35 */ + 0x19, 0xea, 0xb9, 0xb4, 0x53, 0x9d, 0xe9, 0x69, 0xe0, 0x80, 0x47, 0x85, 0x48, 0x2c, 0x49, 0xb7, /* Byte value: 0x36 */ + 0xc9, 0xc8, 0x05, 0x34, 0xcd, 0xdf, 0x63, 0x93, 0xb4, 0xf0, 0x35, 0xce, 0x77, 0xd5, 0xaf, 0x9f, /* Byte value: 0x37 */ + 0xaa, 0x8c, 0xbe, 0xf7, 0x32, 0x5b, 0xb4, 0xa4, 0x1c, 0x10, 0xd1, 0x58, 0x09, 0xe4, 0xa0, 0xcf, /* Byte value: 0x38 */ + 0xfc, 0xb5, 0xae, 0xc9, 0x1b, 0x93, 0x87, 0x11, 0x19, 0x96, 0x80, 0xc0, 0x7a, 0x0c, 0xd5, 0xfb, /* Byte value: 0x39 */ + 0x4d, 0x38, 0x62, 0xf3, 0x5a, 0xec, 0x94, 0x66, 0x56, 0xf2, 0x86, 0xc5, 0xdf, 0x28, 0xbb, 0x5f, /* Byte value: 0x3a */ + 0xbf, 0x59, 0xf8, 0x96, 0xa1, 0xd6, 0x3a, 0xd7, 0xd0, 0xed, 0x70, 0x48, 0x5c, 0xe5, 0x7d, 0xf5, /* Byte value: 0x3b */ + 0x2a, 0x69, 0x8c, 0xc2, 0xe5, 0xd9, 0xdf, 0xe6, 0x5b, 0x39, 0x81, 0x20, 0xaa, 0x02, 0x79, 0x74, /* Byte value: 0x3c */ + 0x73, 0x10, 0x2c, 0x8d, 0x3c, 0x05, 0xe2, 0xae, 0x79, 0x4c, 0xee, 0x99, 0x52, 0x5d, 0xbd, 0x7f, /* Byte value: 0x3d */ + 0x84, 0xf0, 0x67, 0xc7, 0x97, 0x33, 0xf7, 0xf5, 0xe2, 0x02, 0xb3, 0x0b, 0xa8, 0xfd, 0x14, 0xc0, /* Byte value: 0x3e */ + 0xd5, 0xa3, 0x6d, 0xaf, 0xce, 0x4e, 0x31, 0x10, 0x49, 0x21, 0xd9, 0x54, 0x46, 0x94, 0x89, 0x3d, /* Byte value: 0x3f */ + 0xc3, 0x09, 0x64, 0x6a, 0x6d, 0xc7, 0xd6, 0x84, 0x8e, 0x52, 0xa0, 0xf0, 0x85, 0x0f, 0x71, 0xb5, /* Byte value: 0x40 */ + 0xaf, 0x0d, 0x6f, 0xd8, 0x62, 0x57, 0x0f, 0x4e, 0x01, 0x41, 0x7a, 0x47, 0x70, 0x89, 0xcf, 0xda, /* Byte value: 0x41 */ + 0x2b, 0xfd, 0x08, 0x1f, 0xf5, 0x64, 0xf8, 0xbb, 0xe3, 0x43, 0xc9, 0x4c, 0xd8, 0x74, 0xdb, 0x1a, /* Byte value: 0x42 */ + 0x86, 0x1b, 0xac, 0xbe, 0xb7, 0x8a, 0xb9, 0x4f, 0x51, 0xf6, 0x23, 0xd3, 0x4c, 0x11, 0x93, 0x1c, /* Byte value: 0x43 */ + 0xa7, 0x27, 0xc5, 0xff, 0xe2, 0xf6, 0xf4, 0xe3, 0x88, 0x17, 0x7f, 0xa1, 0x66, 0xbf, 0x96, 0x2c, /* Byte value: 0x44 */ + 0xb1, 0x8d, 0xcc, 0x3a, 0x41, 0x7f, 0x13, 0x77, 0x4f, 0x64, 0x06, 0x05, 0xa5, 0x24, 0x6e, 0xa4, /* Byte value: 0x45 */ + 0xb2, 0xf2, 0x83, 0x9e, 0x71, 0x7b, 0x7a, 0x90, 0x44, 0xea, 0xde, 0xb1, 0x33, 0xbe, 0x4b, 0x16, /* Byte value: 0x46 */ + 0x5b, 0x92, 0x6b, 0x36, 0xf9, 0x65, 0x73, 0xf2, 0x91, 0x81, 0xff, 0x61, 0x1c, 0xb3, 0x43, 0xd7, /* Byte value: 0x47 */ + 0x46, 0x6d, 0x87, 0x70, 0xea, 0x49, 0x06, 0x2c, 0xd4, 0x2a, 0x5b, 0x97, 0x5f, 0x84, 0xc7, 0x1b, /* Byte value: 0x48 */ + 0xd3, 0x5d, 0xf3, 0x24, 0xae, 0x46, 0xe3, 0x1d, 0x5f, 0xfe, 0xaa, 0xff, 0xa9, 0x63, 0xc3, 0x9a, /* Byte value: 0x49 */ + 0x9f, 0xf1, 0x15, 0x0a, 0xe4, 0x17, 0x50, 0x26, 0xb1, 0x76, 0x64, 0x56, 0x04, 0x3d, 0xda, 0xab, /* Byte value: 0x4a */ + 0xfd, 0x21, 0x2a, 0x14, 0x0b, 0x2e, 0xa0, 0x4c, 0xa1, 0xec, 0xc8, 0xac, 0x08, 0x7a, 0x77, 0x95, /* Byte value: 0x4b */ + 0xd4, 0x37, 0xe9, 0x72, 0xde, 0xf3, 0x16, 0x4d, 0xf1, 0x5b, 0x91, 0x38, 0x34, 0xe2, 0x2b, 0x53, /* Byte value: 0x4c */ + 0x0f, 0x40, 0xb0, 0x71, 0xf0, 0x14, 0x0e, 0xfd, 0x27, 0xf3, 0x3e, 0x21, 0x8b, 0xb7, 0xb1, 0x3f, /* Byte value: 0x4d */ + 0x9c, 0x8e, 0x5a, 0xae, 0xd4, 0x13, 0x39, 0xc1, 0xba, 0xf8, 0xbc, 0xe2, 0x92, 0xa7, 0xff, 0x19, /* Byte value: 0x4e */ + 0x2f, 0xe8, 0x5d, 0xed, 0xb5, 0xd5, 0x64, 0x0c, 0x46, 0x68, 0x2a, 0x3f, 0xd3, 0x6f, 0x16, 0x61, /* Byte value: 0x4f */ + 0x9b, 0xe4, 0x40, 0xf8, 0xa4, 0xa6, 0xcc, 0x91, 0x14, 0x5d, 0x87, 0x25, 0x0f, 0x26, 0x17, 0xd0, /* Byte value: 0x50 */ + 0x43, 0xec, 0x56, 0x5f, 0xba, 0x45, 0xbd, 0xc6, 0xc9, 0x7b, 0xf0, 0x88, 0x26, 0xe9, 0xa8, 0x0e, /* Byte value: 0x51 */ + 0xef, 0x9e, 0x76, 0x23, 0xe8, 0x16, 0xdb, 0x6f, 0xc3, 0xb4, 0x52, 0x7b, 0xc0, 0xfa, 0x42, 0x66, /* Byte value: 0x52 */ + 0xd9, 0x9c, 0x92, 0x7a, 0x0e, 0x5e, 0x56, 0x0a, 0x65, 0x5c, 0x3f, 0xc1, 0x5b, 0xb9, 0x1d, 0xb0, /* Byte value: 0x53 */ + 0x79, 0xd1, 0x4d, 0xd3, 0x9c, 0x1d, 0x57, 0xb9, 0x43, 0xee, 0x7b, 0xa7, 0xa0, 0x87, 0x63, 0x55, /* Byte value: 0x54 */ + 0xb6, 0xe7, 0xd6, 0x6c, 0x31, 0xca, 0xe6, 0x27, 0xe1, 0xc1, 0x3d, 0xc2, 0x38, 0xa5, 0x86, 0x6d, /* Byte value: 0x55 */ + 0x53, 0xb8, 0xc1, 0x11, 0x79, 0xc4, 0x88, 0x5f, 0x18, 0xd7, 0xfa, 0x87, 0x0a, 0x85, 0x1a, 0x21, /* Byte value: 0x56 */ + 0x7f, 0x2f, 0xd3, 0x58, 0xfc, 0x15, 0x85, 0xb4, 0x55, 0x31, 0x08, 0x0c, 0x4f, 0x70, 0x29, 0xf2, /* Byte value: 0x57 */ + 0xc1, 0xe2, 0xaf, 0x13, 0x4d, 0x7e, 0x98, 0x3e, 0x3d, 0xa6, 0x30, 0x28, 0x61, 0xe3, 0xf6, 0x69, /* Byte value: 0x58 */ + 0xf0, 0x8a, 0x51, 0x1c, 0xdb, 0x83, 0xe0, 0x0b, 0x35, 0xeb, 0x66, 0x55, 0x67, 0x21, 0x41, 0x76, /* Byte value: 0x59 */ + 0x23, 0xd7, 0xa2, 0x38, 0x75, 0xc5, 0x03, 0x16, 0x6a, 0x15, 0xcc, 0xaa, 0xce, 0x42, 0x82, 0xec, /* Byte value: 0x5a */ + 0xe7, 0xb4, 0xdc, 0x04, 0x68, 0xb7, 0x20, 0xc2, 0x4a, 0xe2, 0x57, 0x9d, 0xd6, 0xcc, 0x1b, 0x90, /* Byte value: 0x5b */ + 0x25, 0x29, 0x3c, 0xb3, 0x15, 0xcd, 0xd1, 0x1b, 0x7c, 0xca, 0xbf, 0x01, 0x21, 0xb5, 0xc8, 0x4b, /* Byte value: 0x5c */ + 0x5e, 0x13, 0xba, 0x19, 0xa9, 0x69, 0xc8, 0x18, 0x8c, 0xd0, 0x54, 0x7e, 0x65, 0xde, 0x2c, 0xc2, /* Byte value: 0x5d */ + 0xb5, 0x98, 0x99, 0xc8, 0x01, 0xce, 0x8f, 0xc0, 0xea, 0x4f, 0xe5, 0x76, 0xae, 0x3f, 0xa3, 0xdf, /* Byte value: 0x5e */ + 0x1e, 0x80, 0xa3, 0xe2, 0x23, 0x28, 0x1c, 0x39, 0x4e, 0x25, 0x7c, 0x42, 0xd5, 0xad, 0xa1, 0x7e, /* Byte value: 0x5f */ + 0xa2, 0xa6, 0x14, 0xd0, 0xb2, 0xfa, 0x4f, 0x09, 0x95, 0x46, 0xd4, 0xbe, 0x1f, 0xd2, 0xf9, 0x39, /* Byte value: 0x60 */ + 0xdf, 0x62, 0x0c, 0xf1, 0x6e, 0x56, 0x84, 0x07, 0x73, 0x83, 0x4c, 0x6a, 0xb4, 0x4e, 0x57, 0x17, /* Byte value: 0x61 */ + 0xa6, 0xb3, 0x41, 0x22, 0xf2, 0x4b, 0xd3, 0xbe, 0x30, 0x6d, 0x37, 0xcd, 0x14, 0xc9, 0x34, 0x42, /* Byte value: 0x62 */ + 0xfe, 0x5e, 0x65, 0xb0, 0x3b, 0x2a, 0xc9, 0xab, 0xaa, 0x62, 0x10, 0x18, 0x9e, 0xe0, 0x52, 0x27, /* Byte value: 0x63 */ + 0xac, 0x72, 0x20, 0x7c, 0x52, 0x53, 0x66, 0xa9, 0x0a, 0xcf, 0xa2, 0xf3, 0xe6, 0x13, 0xea, 0x68, /* Byte value: 0x64 */ + 0x22, 0x43, 0x26, 0xe5, 0x65, 0x78, 0x24, 0x4b, 0xd2, 0x6f, 0x84, 0xc6, 0xbc, 0x34, 0x20, 0x82, /* Byte value: 0x65 */ + 0xf9, 0x34, 0x7f, 0xe6, 0x4b, 0x9f, 0x3c, 0xfb, 0x04, 0xc7, 0x2b, 0xdf, 0x03, 0x61, 0xba, 0xee, /* Byte value: 0x66 */ + 0xe2, 0x35, 0x0d, 0x2b, 0x38, 0xbb, 0x9b, 0x28, 0x57, 0xb3, 0xfc, 0x82, 0xaf, 0xa1, 0x74, 0x85, /* Byte value: 0x67 */ + 0x4a, 0x52, 0x78, 0xa5, 0x2a, 0x59, 0x61, 0x36, 0xf8, 0x57, 0xbd, 0x02, 0x42, 0xa9, 0x53, 0x96, /* Byte value: 0x68 */ + 0xbc, 0x26, 0xb7, 0x32, 0x91, 0xd2, 0x53, 0x30, 0xdb, 0x63, 0xa8, 0xfc, 0xca, 0x7f, 0x58, 0x47, /* Byte value: 0x69 */ + 0x35, 0x7d, 0xab, 0xfd, 0xd6, 0x4c, 0xe4, 0x82, 0xad, 0x66, 0xb5, 0x0e, 0x0d, 0xd9, 0x7a, 0x64, /* Byte value: 0x6a */ + 0xca, 0xb7, 0x4a, 0x90, 0xfd, 0xdb, 0x0a, 0x74, 0xbf, 0x7e, 0xed, 0x7a, 0xe1, 0x4f, 0x8a, 0x2d, /* Byte value: 0x6b */ + 0xee, 0x0a, 0xf2, 0xfe, 0xf8, 0xab, 0xfc, 0x32, 0x7b, 0xce, 0x1a, 0x17, 0xb2, 0x8c, 0xe0, 0x08, /* Byte value: 0x6c */ + 0x78, 0x45, 0xc9, 0x0e, 0x8c, 0xa0, 0x70, 0xe4, 0xfb, 0x94, 0x33, 0xcb, 0xd2, 0xf1, 0xc1, 0x3b, /* Byte value: 0x6d */ + 0x05, 0x81, 0xd1, 0x2f, 0x50, 0x0c, 0xbb, 0xea, 0x1d, 0x51, 0xab, 0x1f, 0x79, 0x6d, 0x6f, 0x15, /* Byte value: 0x6e */ + 0x6b, 0x6e, 0x11, 0xe4, 0x7f, 0x25, 0x2c, 0x9a, 0x21, 0xb6, 0xe1, 0x70, 0x68, 0x07, 0x56, 0xa6, /* Byte value: 0x6f */ + 0x51, 0x53, 0x0a, 0x68, 0x59, 0x7d, 0xc6, 0xe5, 0xab, 0x23, 0x6a, 0x5f, 0xee, 0x69, 0x9d, 0xfd, /* Byte value: 0x70 */ + 0xe1, 0x4a, 0x42, 0x8f, 0x08, 0xbf, 0xf2, 0xcf, 0x5c, 0x3d, 0x24, 0x36, 0x39, 0x3b, 0x51, 0x37, /* Byte value: 0x71 */ + 0x59, 0x79, 0xa0, 0x4f, 0xd9, 0xdc, 0x3d, 0x48, 0x22, 0x75, 0x6f, 0xb9, 0xf8, 0x5f, 0xc4, 0x0b, /* Byte value: 0x72 */ + 0xa3, 0x32, 0x90, 0x0d, 0xa2, 0x47, 0x68, 0x54, 0x2d, 0x3c, 0x9c, 0xd2, 0x6d, 0xa4, 0x5b, 0x57, /* Byte value: 0x73 */ + 0xf2, 0x61, 0x9a, 0x65, 0xfb, 0x3a, 0xae, 0xb1, 0x86, 0x1f, 0xf6, 0x8d, 0x83, 0xcd, 0xc6, 0xaa, /* Byte value: 0x74 */ + 0x71, 0xfb, 0xe7, 0xf4, 0x1c, 0xbc, 0xac, 0x14, 0xca, 0xb8, 0x7e, 0x41, 0xb6, 0xb1, 0x3a, 0xa3, /* Byte value: 0x75 */ + 0x56, 0x39, 0x10, 0x3e, 0x29, 0xc8, 0x33, 0xb5, 0x05, 0x86, 0x51, 0x98, 0x73, 0xe8, 0x75, 0x34, /* Byte value: 0x76 */ + 0x11, 0xc0, 0x13, 0x93, 0xd3, 0x3c, 0x12, 0xc4, 0x69, 0xd6, 0x42, 0x63, 0x5e, 0x1a, 0x10, 0x41, /* Byte value: 0x77 */ + 0x6a, 0xfa, 0x95, 0x39, 0x6f, 0x98, 0x0b, 0xc7, 0x99, 0xcc, 0xa9, 0x1c, 0x1a, 0x71, 0xf4, 0xc8, /* Byte value: 0x78 */ + 0x89, 0x5b, 0x1c, 0xcf, 0x47, 0x9e, 0xb7, 0xb2, 0x76, 0x05, 0x1d, 0xf2, 0xc7, 0xa6, 0x22, 0x23, /* Byte value: 0x79 */ + 0x94, 0xa4, 0xf0, 0x89, 0x54, 0xb2, 0xc2, 0x6c, 0x33, 0xae, 0xb9, 0x04, 0x84, 0x91, 0xa6, 0xef, /* Byte value: 0x7a */ + 0x65, 0xba, 0x25, 0x48, 0x9f, 0x8c, 0x05, 0x3a, 0xbe, 0x3f, 0x97, 0x3d, 0x91, 0xc6, 0x45, 0xf7, /* Byte value: 0x7b */ + 0x8c, 0xda, 0xcd, 0xe0, 0x17, 0x92, 0x0c, 0x58, 0x6b, 0x54, 0xb6, 0xed, 0xbe, 0xcb, 0x4d, 0x36, /* Byte value: 0x7c */ + 0xbb, 0x4c, 0xad, 0x64, 0xe1, 0x67, 0xa6, 0x60, 0x75, 0xc6, 0x93, 0x3b, 0x57, 0xfe, 0xb0, 0x8e, /* Byte value: 0x7d */ + 0x77, 0x05, 0x79, 0x7f, 0x7c, 0xb4, 0x7e, 0x19, 0xdc, 0x67, 0x0d, 0xea, 0x59, 0x46, 0x70, 0x04, /* Byte value: 0x7e */ + 0x3c, 0xc3, 0x85, 0x07, 0x46, 0x50, 0x38, 0x72, 0x9c, 0x4a, 0xf8, 0x84, 0x69, 0x99, 0x81, 0xfc, /* Byte value: 0x7f */ + 0x7b, 0x3a, 0x86, 0xaa, 0xbc, 0xa4, 0x19, 0x03, 0xf0, 0x1a, 0xeb, 0x7f, 0x44, 0x6b, 0xe4, 0x89, /* Byte value: 0x80 */ + 0x28, 0x82, 0x47, 0xbb, 0xc5, 0x60, 0x91, 0x5c, 0xe8, 0xcd, 0x11, 0xf8, 0x4e, 0xee, 0xfe, 0xa8, /* Byte value: 0x81 */ + 0xab, 0x18, 0x3a, 0x2a, 0x22, 0xe6, 0x93, 0xf9, 0xa4, 0x6a, 0x99, 0x34, 0x7b, 0x92, 0x02, 0xa1, /* Byte value: 0x82 */ + 0xd2, 0xc9, 0x77, 0xf9, 0xbe, 0xfb, 0xc4, 0x40, 0xe7, 0x84, 0xe2, 0x93, 0xdb, 0x15, 0x61, 0xf4, /* Byte value: 0x83 */ + 0x31, 0x68, 0xfe, 0x0f, 0x96, 0xfd, 0x78, 0x35, 0x08, 0x4d, 0x56, 0x7d, 0x06, 0xc2, 0xb7, 0x1f, /* Byte value: 0x84 */ + 0xde, 0xf6, 0x88, 0x2c, 0x7e, 0xeb, 0xa3, 0x5a, 0xcb, 0xf9, 0x04, 0x06, 0xc6, 0x38, 0xf5, 0x79, /* Byte value: 0x85 */ + 0xc4, 0x63, 0x7e, 0x3c, 0x1d, 0x72, 0x23, 0xd4, 0x20, 0xf7, 0x9b, 0x37, 0x18, 0x8e, 0x99, 0x7c, /* Byte value: 0x86 */ + 0x5f, 0x87, 0x3e, 0xc4, 0xb9, 0xd4, 0xef, 0x45, 0x34, 0xaa, 0x1c, 0x12, 0x17, 0xa8, 0x8e, 0xac, /* Byte value: 0x87 */ + 0xcc, 0x49, 0xd4, 0x1b, 0x9d, 0xd3, 0xd8, 0x79, 0xa9, 0xa1, 0x9e, 0xd1, 0x0e, 0xb8, 0xc0, 0x8a, /* Byte value: 0x88 */ + 0xcf, 0x36, 0x9b, 0xbf, 0xad, 0xd7, 0xb1, 0x9e, 0xa2, 0x2f, 0x46, 0x65, 0x98, 0x22, 0xe5, 0x38, /* Byte value: 0x89 */ + 0x76, 0x91, 0xfd, 0xa2, 0x6c, 0x09, 0x59, 0x44, 0x64, 0x1d, 0x45, 0x86, 0x2b, 0x30, 0xd2, 0x6a, /* Byte value: 0x8a */ + 0x2c, 0x97, 0x12, 0x49, 0x85, 0xd1, 0x0d, 0xeb, 0x4d, 0xe6, 0xf2, 0x8b, 0x45, 0xf5, 0x33, 0xd3, /* Byte value: 0x8b */ + 0xb8, 0x33, 0xe2, 0xc0, 0xd1, 0x63, 0xcf, 0x87, 0x7e, 0x48, 0x4b, 0x8f, 0xc1, 0x64, 0x95, 0x3c, /* Byte value: 0x8c */ + 0xd8, 0x08, 0x16, 0xa7, 0x1e, 0xe3, 0x71, 0x57, 0xdd, 0x26, 0x77, 0xad, 0x29, 0xcf, 0xbf, 0xde, /* Byte value: 0x8d */ + 0x2e, 0x7c, 0xd9, 0x30, 0xa5, 0x68, 0x43, 0x51, 0xfe, 0x12, 0x62, 0x53, 0xa1, 0x19, 0xb4, 0x0f, /* Byte value: 0x8e */ + 0x36, 0x02, 0xe4, 0x59, 0xe6, 0x48, 0x8d, 0x65, 0xa6, 0xe8, 0x6d, 0xba, 0x9b, 0x43, 0x5f, 0xd6, /* Byte value: 0x8f */ + 0xdb, 0x77, 0x59, 0x03, 0x2e, 0xe7, 0x18, 0xb0, 0xd6, 0xa8, 0xaf, 0x19, 0xbf, 0x55, 0x9a, 0x6c, /* Byte value: 0x90 */ + 0x69, 0x85, 0xda, 0x9d, 0x5f, 0x9c, 0x62, 0x20, 0x92, 0x42, 0x71, 0xa8, 0x8c, 0xeb, 0xd1, 0x7a, /* Byte value: 0x91 */ + 0xb3, 0x66, 0x07, 0x43, 0x61, 0xc6, 0x5d, 0xcd, 0xfc, 0x90, 0x96, 0xdd, 0x41, 0xc8, 0xe9, 0x78, /* Byte value: 0x92 */ + 0x14, 0x41, 0xc2, 0xbc, 0x83, 0x30, 0xa9, 0x2e, 0x74, 0x87, 0xe9, 0x7c, 0x27, 0x77, 0x7f, 0x54, /* Byte value: 0x93 */ + 0x95, 0x30, 0x74, 0x54, 0x44, 0x0f, 0xe5, 0x31, 0x8b, 0xd4, 0xf1, 0x68, 0xf6, 0xe7, 0x04, 0x81, /* Byte value: 0x94 */ + 0xbe, 0xcd, 0x7c, 0x4b, 0xb1, 0x6b, 0x1d, 0x8a, 0x68, 0x97, 0x38, 0x24, 0x2e, 0x93, 0xdf, 0x9b, /* Byte value: 0x95 */ + 0x62, 0xd0, 0x3f, 0x1e, 0xef, 0x39, 0xf0, 0x6a, 0x10, 0x9a, 0xac, 0xfa, 0x0c, 0x47, 0xad, 0x3e, /* Byte value: 0x96 */ + 0xa1, 0xd9, 0x5b, 0x74, 0x82, 0xfe, 0x26, 0xee, 0x9e, 0xc8, 0x0c, 0x0a, 0x89, 0x48, 0xdc, 0x8b, /* Byte value: 0x97 */ + 0x3b, 0xa9, 0x9f, 0x51, 0x36, 0xe5, 0xcd, 0x22, 0x32, 0xef, 0xc3, 0x43, 0xf4, 0x18, 0x69, 0x35, /* Byte value: 0x98 */ + 0x16, 0xaa, 0x09, 0xc5, 0xa3, 0x89, 0xe7, 0x94, 0xc7, 0x73, 0x79, 0xa4, 0xc3, 0x9b, 0xf8, 0x88, /* Byte value: 0x99 */ + 0x66, 0xc5, 0x6a, 0xec, 0xaf, 0x88, 0x6c, 0xdd, 0xb5, 0xb1, 0x4f, 0x89, 0x07, 0x5c, 0x60, 0x45, /* Byte value: 0x9a */ + 0xe9, 0x60, 0xe8, 0xa8, 0x88, 0x1e, 0x09, 0x62, 0xd5, 0x6b, 0x21, 0xd0, 0x2f, 0x0d, 0x08, 0xc1, /* Byte value: 0x9b */ + 0x5c, 0xf8, 0x71, 0x60, 0x89, 0xd0, 0x86, 0xa2, 0x3f, 0x24, 0xc4, 0xa6, 0x81, 0x32, 0xab, 0x1e, /* Byte value: 0x9c */ + 0x6c, 0x04, 0x0b, 0xb2, 0x0f, 0x90, 0xd9, 0xca, 0x8f, 0x13, 0xda, 0xb7, 0xf5, 0x86, 0xbe, 0x6f, /* Byte value: 0x9d */ + 0x6d, 0x90, 0x8f, 0x6f, 0x1f, 0x2d, 0xfe, 0x97, 0x37, 0x69, 0x92, 0xdb, 0x87, 0xf0, 0x1c, 0x01, /* Byte value: 0x9e */ + 0xad, 0xe6, 0xa4, 0xa1, 0x42, 0xee, 0x41, 0xf4, 0xb2, 0xb5, 0xea, 0x9f, 0x94, 0x65, 0x48, 0x06, /* Byte value: 0x9f */ + 0x37, 0x96, 0x60, 0x84, 0xf6, 0xf5, 0xaa, 0x38, 0x1e, 0x92, 0x25, 0xd6, 0xe9, 0x35, 0xfd, 0xb8, /* Byte value: 0xa0 */ + 0x61, 0xaf, 0x70, 0xba, 0xdf, 0x3d, 0x99, 0x8d, 0x1b, 0x14, 0x74, 0x4e, 0x9a, 0xdd, 0x88, 0x8c, /* Byte value: 0xa1 */ + 0x4b, 0xc6, 0xfc, 0x78, 0x3a, 0xe4, 0x46, 0x6b, 0x40, 0x2d, 0xf5, 0x6e, 0x30, 0xdf, 0xf1, 0xf8, /* Byte value: 0xa2 */ + 0xb9, 0xa7, 0x66, 0x1d, 0xc1, 0xde, 0xe8, 0xda, 0xc6, 0x32, 0x03, 0xe3, 0xb3, 0x12, 0x37, 0x52, /* Byte value: 0xa3 */ + 0xe3, 0xa1, 0x89, 0xf6, 0x28, 0x06, 0xbc, 0x75, 0xef, 0xc9, 0xb4, 0xee, 0xdd, 0xd7, 0xd6, 0xeb, /* Byte value: 0xa4 */ + 0xba, 0xd8, 0x29, 0xb9, 0xf1, 0xda, 0x81, 0x3d, 0xcd, 0xbc, 0xdb, 0x57, 0x25, 0x88, 0x12, 0xe0, /* Byte value: 0xa5 */ + 0xf1, 0x1e, 0xd5, 0xc1, 0xcb, 0x3e, 0xc7, 0x56, 0x8d, 0x91, 0x2e, 0x39, 0x15, 0x57, 0xe3, 0x18, /* Byte value: 0xa6 */ + 0xa0, 0x4d, 0xdf, 0xa9, 0x92, 0x43, 0x01, 0xb3, 0x26, 0xb2, 0x44, 0x66, 0xfb, 0x3e, 0x7e, 0xe5, /* Byte value: 0xa7 */ + 0x85, 0x64, 0xe3, 0x1a, 0x87, 0x8e, 0xd0, 0xa8, 0x5a, 0x78, 0xfb, 0x67, 0xda, 0x8b, 0xb6, 0xae, /* Byte value: 0xa8 */ + 0x83, 0x9a, 0x7d, 0x91, 0xe7, 0x86, 0x02, 0xa5, 0x4c, 0xa7, 0x88, 0xcc, 0x35, 0x7c, 0xfc, 0x09, /* Byte value: 0xa9 */ + 0xda, 0xe3, 0xdd, 0xde, 0x3e, 0x5a, 0x3f, 0xed, 0x6e, 0xd2, 0xe7, 0x75, 0xcd, 0x23, 0x38, 0x02, /* Byte value: 0xaa */ + 0x47, 0xf9, 0x03, 0xad, 0xfa, 0xf4, 0x21, 0x71, 0x6c, 0x50, 0x13, 0xfb, 0x2d, 0xf2, 0x65, 0x75, /* Byte value: 0xab */ + 0xc5, 0xf7, 0xfa, 0xe1, 0x0d, 0xcf, 0x04, 0x89, 0x98, 0x8d, 0xd3, 0x5b, 0x6a, 0xf8, 0x3b, 0x12, /* Byte value: 0xac */ + 0xb0, 0x19, 0x48, 0xe7, 0x51, 0xc2, 0x34, 0x2a, 0xf7, 0x1e, 0x4e, 0x69, 0xd7, 0x52, 0xcc, 0xca, /* Byte value: 0xad */ + 0x33, 0x83, 0x35, 0x76, 0xb6, 0x44, 0x36, 0x8f, 0xbb, 0xb9, 0xc6, 0xa5, 0xe2, 0x2e, 0x30, 0xc3, /* Byte value: 0xae */ + 0xfa, 0x4b, 0x30, 0x42, 0x7b, 0x9b, 0x55, 0x1c, 0x0f, 0x49, 0xf3, 0x6b, 0x95, 0xfb, 0x9f, 0x5c, /* Byte value: 0xaf */ + 0x96, 0x4f, 0x3b, 0xf0, 0x74, 0x0b, 0x8c, 0xd6, 0x80, 0x5a, 0x29, 0xdc, 0x60, 0x7d, 0x21, 0x33, /* Byte value: 0xb0 */ + 0x6f, 0x7b, 0x44, 0x16, 0x3f, 0x94, 0xb0, 0x2d, 0x84, 0x9d, 0x02, 0x03, 0x63, 0x1c, 0x9b, 0xdd, /* Byte value: 0xb1 */ + 0x6e, 0xef, 0xc0, 0xcb, 0x2f, 0x29, 0x97, 0x70, 0x3c, 0xe7, 0x4a, 0x6f, 0x11, 0x6a, 0x39, 0xb3, /* Byte value: 0xb2 */ + 0xc2, 0x9d, 0xe0, 0xb7, 0x7d, 0x7a, 0xf1, 0xd9, 0x36, 0x28, 0xe8, 0x9c, 0xf7, 0x79, 0xd3, 0xdb, /* Byte value: 0xb3 */ + 0xf6, 0x74, 0xcf, 0x97, 0xbb, 0x8b, 0x32, 0x06, 0x23, 0x34, 0x15, 0xfe, 0x88, 0xd6, 0x0b, 0xd1, /* Byte value: 0xb4 */ + 0x50, 0xc7, 0x8e, 0xb5, 0x49, 0xc0, 0xe1, 0xb8, 0x13, 0x59, 0x22, 0x33, 0x9c, 0x1f, 0x3f, 0x93, /* Byte value: 0xb5 */ + 0xff, 0xca, 0xe1, 0x6d, 0x2b, 0x97, 0xee, 0xf6, 0x12, 0x18, 0x58, 0x74, 0xec, 0x96, 0xf0, 0x49, /* Byte value: 0xb6 */ + 0x5d, 0x6c, 0xf5, 0xbd, 0x99, 0x6d, 0xa1, 0xff, 0x87, 0x5e, 0x8c, 0xca, 0xf3, 0x44, 0x09, 0x70, /* Byte value: 0xb7 */ + 0xa9, 0xf3, 0xf1, 0x53, 0x02, 0x5f, 0xdd, 0x43, 0x17, 0x9e, 0x09, 0xec, 0x9f, 0x7e, 0x85, 0x7d, /* Byte value: 0xb8 */ + 0x8e, 0x31, 0x06, 0x99, 0x37, 0x2b, 0x42, 0xe2, 0xd8, 0xa0, 0x26, 0x35, 0x5a, 0x27, 0xca, 0xea, /* Byte value: 0xb9 */ + 0x17, 0x3e, 0x8d, 0x18, 0xb3, 0x34, 0xc0, 0xc9, 0x7f, 0x09, 0x31, 0xc8, 0xb1, 0xed, 0x5a, 0xe6, /* Byte value: 0xba */ + 0x1b, 0x01, 0x72, 0xcd, 0x73, 0x24, 0xa7, 0xd3, 0x53, 0x74, 0xd7, 0x5d, 0xac, 0xc0, 0xce, 0x6b, /* Byte value: 0xbb */ + 0x97, 0xdb, 0xbf, 0x2d, 0x64, 0xb6, 0xab, 0x8b, 0x38, 0x20, 0x61, 0xb0, 0x12, 0x0b, 0x83, 0x5d, /* Byte value: 0xbc */ + 0x7d, 0xc4, 0x18, 0x21, 0xdc, 0xac, 0xcb, 0x0e, 0xe6, 0xc5, 0x98, 0xd4, 0xab, 0x9c, 0xae, 0x2e, /* Byte value: 0xbd */ + 0xec, 0xe1, 0x39, 0x87, 0xd8, 0x12, 0xb2, 0x88, 0xc8, 0x3a, 0x8a, 0xcf, 0x56, 0x60, 0x67, 0xd4, /* Byte value: 0xbe */ + 0x58, 0xed, 0x24, 0x92, 0xc9, 0x61, 0x1a, 0x15, 0x9a, 0x0f, 0x27, 0xd5, 0x8a, 0x29, 0x66, 0x65, /* Byte value: 0xbf */ + 0xf7, 0xe0, 0x4b, 0x4a, 0xab, 0x36, 0x15, 0x5b, 0x9b, 0x4e, 0x5d, 0x92, 0xfa, 0xa0, 0xa9, 0xbf, /* Byte value: 0xc0 */ + 0x1f, 0x14, 0x27, 0x3f, 0x33, 0x95, 0x3b, 0x64, 0xf6, 0x5f, 0x34, 0x2e, 0xa7, 0xdb, 0x03, 0x10, /* Byte value: 0xc1 */ + 0xfb, 0xdf, 0xb4, 0x9f, 0x6b, 0x26, 0x72, 0x41, 0xb7, 0x33, 0xbb, 0x07, 0xe7, 0x8d, 0x3d, 0x32, /* Byte value: 0xc2 */ + 0x7c, 0x50, 0x9c, 0xfc, 0xcc, 0x11, 0xec, 0x53, 0x5e, 0xbf, 0xd0, 0xb8, 0xd9, 0xea, 0x0c, 0x40, /* Byte value: 0xc3 */ + 0x09, 0xbe, 0x2e, 0xfa, 0x90, 0x1c, 0xdc, 0xf0, 0x31, 0x2c, 0x4d, 0x8a, 0x64, 0x40, 0xfb, 0x98, /* Byte value: 0xc4 */ + 0x0d, 0xab, 0x7b, 0x08, 0xd0, 0xad, 0x40, 0x47, 0x94, 0x07, 0xae, 0xf9, 0x6f, 0x5b, 0x36, 0xe3, /* Byte value: 0xc5 */ + 0x7a, 0xae, 0x02, 0x77, 0xac, 0x19, 0x3e, 0x5e, 0x48, 0x60, 0xa3, 0x13, 0x36, 0x1d, 0x46, 0xe7, /* Byte value: 0xc6 */ + 0x67, 0x51, 0xee, 0x31, 0xbf, 0x35, 0x4b, 0x80, 0x0d, 0xcb, 0x07, 0xe5, 0x75, 0x2a, 0xc2, 0x2b, /* Byte value: 0xc7 */ + 0x45, 0x12, 0xc8, 0xd4, 0xda, 0x4d, 0x6f, 0xcb, 0xdf, 0xa4, 0x83, 0x23, 0xc9, 0x1e, 0xe2, 0xa9, /* Byte value: 0xc8 */ + 0x87, 0x8f, 0x28, 0x63, 0xa7, 0x37, 0x9e, 0x12, 0xe9, 0x8c, 0x6b, 0xbf, 0x3e, 0x67, 0x31, 0x72, /* Byte value: 0xc9 */ + 0xdc, 0x1d, 0x43, 0x55, 0x5e, 0x52, 0xed, 0xe0, 0x78, 0x0d, 0x94, 0xde, 0x22, 0xd4, 0x72, 0xa5, /* Byte value: 0xca */ + 0xe8, 0xf4, 0x6c, 0x75, 0x98, 0xa3, 0x2e, 0x3f, 0x6d, 0x11, 0x69, 0xbc, 0x5d, 0x7b, 0xaa, 0xaf, /* Byte value: 0xcb */ + 0x4f, 0xd3, 0xa9, 0x8a, 0x7a, 0x55, 0xda, 0xdc, 0xe5, 0x06, 0x16, 0x1d, 0x3b, 0xc4, 0x3c, 0x83, /* Byte value: 0xcc */ + 0x1d, 0xff, 0xec, 0x46, 0x13, 0x2c, 0x75, 0xde, 0x45, 0xab, 0xa4, 0xf6, 0x43, 0x37, 0x84, 0xcc, /* Byte value: 0xcd */ + 0x4e, 0x47, 0x2d, 0x57, 0x6a, 0xe8, 0xfd, 0x81, 0x5d, 0x7c, 0x5e, 0x71, 0x49, 0xb2, 0x9e, 0xed, /* Byte value: 0xce */ + 0x04, 0x15, 0x55, 0xf2, 0x40, 0xb1, 0x9c, 0xb7, 0xa5, 0x2b, 0xe3, 0x73, 0x0b, 0x1b, 0xcd, 0x7b, /* Byte value: 0xcf */ + 0xeb, 0x8b, 0x23, 0xd1, 0xa8, 0xa7, 0x47, 0xd8, 0x66, 0x9f, 0xb1, 0x08, 0xcb, 0xe1, 0x8f, 0x1d, /* Byte value: 0xd0 */ + 0xf8, 0xa0, 0xfb, 0x3b, 0x5b, 0x22, 0x1b, 0xa6, 0xbc, 0xbd, 0x63, 0xb3, 0x71, 0x17, 0x18, 0x80, /* Byte value: 0xd1 */ + 0xf3, 0xf5, 0x1e, 0xb8, 0xeb, 0x87, 0x89, 0xec, 0x3e, 0x65, 0xbe, 0xe1, 0xf1, 0xbb, 0x64, 0xc4, /* Byte value: 0xd2 */ + 0x3e, 0x28, 0x4e, 0x7e, 0x66, 0xe9, 0x76, 0xc8, 0x2f, 0xbe, 0x68, 0x5c, 0x8d, 0x75, 0x06, 0x20, /* Byte value: 0xd3 */ + 0x3d, 0x57, 0x01, 0xda, 0x56, 0xed, 0x1f, 0x2f, 0x24, 0x30, 0xb0, 0xe8, 0x1b, 0xef, 0x23, 0x92, /* Byte value: 0xd4 */ + 0xbd, 0xb2, 0x33, 0xef, 0x81, 0x6f, 0x74, 0x6d, 0x63, 0x19, 0xe0, 0x90, 0xb8, 0x09, 0xfa, 0x29, /* Byte value: 0xd5 */ + 0x8a, 0x24, 0x53, 0x6b, 0x77, 0x9a, 0xde, 0x55, 0x7d, 0x8b, 0xc5, 0x46, 0x51, 0x3c, 0x07, 0x91, /* Byte value: 0xd6 */ + 0x88, 0xcf, 0x98, 0x12, 0x57, 0x23, 0x90, 0xef, 0xce, 0x7f, 0x55, 0x9e, 0xb5, 0xd0, 0x80, 0x4d, /* Byte value: 0xd7 */ + 0xdd, 0x89, 0xc7, 0x88, 0x4e, 0xef, 0xca, 0xbd, 0xc0, 0x77, 0xdc, 0xb2, 0x50, 0xa2, 0xd0, 0xcb, /* Byte value: 0xd8 */ + 0xcd, 0xdd, 0x50, 0xc6, 0x8d, 0x6e, 0xff, 0x24, 0x11, 0xdb, 0xd6, 0xbd, 0x7c, 0xce, 0x62, 0xe4, /* Byte value: 0xd9 */ + 0x0b, 0x55, 0xe5, 0x83, 0xb0, 0xa5, 0x92, 0x4a, 0x82, 0xd8, 0xdd, 0x52, 0x80, 0xac, 0x7c, 0x44, /* Byte value: 0xda */ + 0x13, 0x2b, 0xd8, 0xea, 0xf3, 0x85, 0x5c, 0x7e, 0xda, 0x22, 0xd2, 0xbb, 0xba, 0xf6, 0x97, 0x9d, /* Byte value: 0xdb */ + 0x98, 0x9b, 0x0f, 0x5c, 0x94, 0xa2, 0xa5, 0x76, 0x1f, 0xd3, 0x5f, 0x91, 0x99, 0xbc, 0x32, 0x62, /* Byte value: 0xdc */ + 0x02, 0xeb, 0xcb, 0x79, 0x20, 0xb9, 0x4e, 0xba, 0xb3, 0xf4, 0x90, 0xd8, 0xe4, 0xec, 0x87, 0xdc, /* Byte value: 0xdd */ + 0x93, 0xce, 0xea, 0xdf, 0x24, 0x07, 0x37, 0x3c, 0x9d, 0x0b, 0x82, 0xc3, 0x19, 0x10, 0x4e, 0x26, /* Byte value: 0xde */ + 0x80, 0xe5, 0x32, 0x35, 0xd7, 0x82, 0x6b, 0x42, 0x47, 0x29, 0x50, 0x78, 0xa3, 0xe6, 0xd9, 0xbb, /* Byte value: 0xdf */ + 0x90, 0xb1, 0xa5, 0x7b, 0x14, 0x03, 0x5e, 0xdb, 0x96, 0x85, 0x5a, 0x77, 0x8f, 0x8a, 0x6b, 0x94, /* Byte value: 0xe0 */ + 0xd0, 0x22, 0xbc, 0x80, 0x9e, 0x42, 0x8a, 0xfa, 0x54, 0x70, 0x72, 0x4b, 0x3f, 0xf9, 0xe6, 0x28, /* Byte value: 0xe1 */ + 0x24, 0xbd, 0xb8, 0x6e, 0x05, 0x70, 0xf6, 0x46, 0xc4, 0xb0, 0xf7, 0x6d, 0x53, 0xc3, 0x6a, 0x25, /* Byte value: 0xe2 */ + 0x34, 0xe9, 0x2f, 0x20, 0xc6, 0xf1, 0xc3, 0xdf, 0x15, 0x1c, 0xfd, 0x62, 0x7f, 0xaf, 0xd8, 0x0a, /* Byte value: 0xe3 */ + 0xcb, 0x23, 0xce, 0x4d, 0xed, 0x66, 0x2d, 0x29, 0x07, 0x04, 0xa5, 0x16, 0x93, 0x39, 0x28, 0x43, /* Byte value: 0xe4 */ + 0xed, 0x75, 0xbd, 0x5a, 0xc8, 0xaf, 0x95, 0xd5, 0x70, 0x40, 0xc2, 0xa3, 0x24, 0x16, 0xc5, 0xba, /* Byte value: 0xe5 */ + 0xf4, 0x9f, 0x04, 0xee, 0x9b, 0x32, 0x7c, 0xbc, 0x90, 0xc0, 0x85, 0x26, 0x6c, 0x3a, 0x8c, 0x0d, /* Byte value: 0xe6 */ + 0xce, 0xa2, 0x1f, 0x62, 0xbd, 0x6a, 0x96, 0xc3, 0x1a, 0x55, 0x0e, 0x09, 0xea, 0x54, 0x47, 0x56, /* Byte value: 0xe7 */ + 0x99, 0x0f, 0x8b, 0x81, 0x84, 0x1f, 0x82, 0x2b, 0xa7, 0xa9, 0x17, 0xfd, 0xeb, 0xca, 0x90, 0x0c, /* Byte value: 0xe8 */ + 0x10, 0x54, 0x97, 0x4e, 0xc3, 0x81, 0x35, 0x99, 0xd1, 0xac, 0x0a, 0x0f, 0x2c, 0x6c, 0xb2, 0x2f, /* Byte value: 0xe9 */ + 0x44, 0x86, 0x4c, 0x09, 0xca, 0xf0, 0x48, 0x96, 0x67, 0xde, 0xcb, 0x4f, 0xbb, 0x68, 0x40, 0xc7, /* Byte value: 0xea */ + 0x40, 0x93, 0x19, 0xfb, 0x8a, 0x41, 0xd4, 0x21, 0xc2, 0xf5, 0x28, 0x3c, 0xb0, 0x73, 0x8d, 0xbc, /* Byte value: 0xeb */ + 0x92, 0x5a, 0x6e, 0x02, 0x34, 0xba, 0x10, 0x61, 0x25, 0x71, 0xca, 0xaf, 0x6b, 0x66, 0xec, 0x48, /* Byte value: 0xec */ + 0x3a, 0x3d, 0x1b, 0x8c, 0x26, 0x58, 0xea, 0x7f, 0x8a, 0x95, 0x8b, 0x2f, 0x86, 0x6e, 0xcb, 0x5b, /* Byte value: 0xed */ + 0x01, 0x94, 0x84, 0xdd, 0x10, 0xbd, 0x27, 0x5d, 0xb8, 0x7a, 0x48, 0x6c, 0x72, 0x76, 0xa2, 0x6e, /* Byte value: 0xee */ + 0x26, 0x56, 0x73, 0x17, 0x25, 0xc9, 0xb8, 0xfc, 0x77, 0x44, 0x67, 0xb5, 0xb7, 0x2f, 0xed, 0xf9, /* Byte value: 0xef */ + 0x12, 0xbf, 0x5c, 0x37, 0xe3, 0x38, 0x7b, 0x23, 0x62, 0x58, 0x9a, 0xd7, 0xc8, 0x80, 0x35, 0xf3, /* Byte value: 0xf0 */ + 0x1a, 0x95, 0xf6, 0x10, 0x63, 0x99, 0x80, 0x8e, 0xeb, 0x0e, 0x9f, 0x31, 0xde, 0xb6, 0x6c, 0x05, /* Byte value: 0xf1 */ + 0x48, 0xb9, 0xb3, 0xdc, 0x0a, 0xe0, 0x2f, 0x8c, 0x4b, 0xa3, 0x2d, 0xda, 0xa6, 0x45, 0xd4, 0x4a, /* Byte value: 0xf2 */ + 0x68, 0x11, 0x5e, 0x40, 0x4f, 0x21, 0x45, 0x7d, 0x2a, 0x38, 0x39, 0xc4, 0xfe, 0x9d, 0x73, 0x14, /* Byte value: 0xf3 */ + 0xf5, 0x0b, 0x80, 0x33, 0x8b, 0x8f, 0x5b, 0xe1, 0x28, 0xba, 0xcd, 0x4a, 0x1e, 0x4c, 0x2e, 0x63, /* Byte value: 0xf4 */ + 0x81, 0x71, 0xb6, 0xe8, 0xc7, 0x3f, 0x4c, 0x1f, 0xff, 0x53, 0x18, 0x14, 0xd1, 0x90, 0x7b, 0xd5, /* Byte value: 0xf5 */ + 0x8b, 0xb0, 0xd7, 0xb6, 0x67, 0x27, 0xf9, 0x08, 0xc5, 0xf1, 0x8d, 0x2a, 0x23, 0x4a, 0xa5, 0xff, /* Byte value: 0xf6 */ + 0xc7, 0x1c, 0x31, 0x98, 0x2d, 0x76, 0x4a, 0x33, 0x2b, 0x79, 0x43, 0x83, 0x8e, 0x14, 0xbc, 0xce, /* Byte value: 0xf7 */ + 0xd6, 0xdc, 0x22, 0x0b, 0xfe, 0x4a, 0x58, 0xf7, 0x42, 0xaf, 0x01, 0xe0, 0xd0, 0x0e, 0xac, 0x8f, /* Byte value: 0xf8 */ + 0x20, 0xa8, 0xed, 0x9c, 0x45, 0xc1, 0x6a, 0xf1, 0x61, 0x9b, 0x14, 0x1e, 0x58, 0xd8, 0xa7, 0x5e, /* Byte value: 0xf9 */ + 0x0a, 0xc1, 0x61, 0x5e, 0xa0, 0x18, 0xb5, 0x17, 0x3a, 0xa2, 0x95, 0x3e, 0xf2, 0xda, 0xde, 0x2a, /* Byte value: 0xfa */ + 0x08, 0x2a, 0xaa, 0x27, 0x80, 0xa1, 0xfb, 0xad, 0x89, 0x56, 0x05, 0xe6, 0x16, 0x36, 0x59, 0xf6, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x4c, 0xac, 0xe6, 0x2e, 0x4a, 0x51, 0xb3, 0x3b, 0xee, 0x88, 0xce, 0xa9, 0xad, 0x5e, 0x19, 0x31, /* Byte value: 0xfd */ + 0xd7, 0x48, 0xa6, 0xd6, 0xee, 0xf7, 0x7f, 0xaa, 0xfa, 0xd5, 0x49, 0x8c, 0xa2, 0x78, 0x0e, 0xe1, /* Byte value: 0xfe */ + 0x74, 0x7a, 0x36, 0xdb, 0x4c, 0xb0, 0x17, 0xfe, 0xd7, 0xe9, 0xd5, 0x5e, 0xcf, 0xdc, 0x55, 0xb6, /* Byte value: 0xff */ + + /* Matrix row: 1 */ + 0xcc, 0xec, 0x18, 0x15, 0x1b, 0x11, 0x97, 0xc3, 0xf0, 0x9a, 0x7d, 0x3e, 0x77, 0x3a, 0x93, 0x9b, /* Byte value: 0x00 */ + 0x03, 0x52, 0x4c, 0x32, 0xa4, 0x91, 0x05, 0xcd, 0xbd, 0x7b, 0x44, 0x0e, 0x71, 0xad, 0xa6, 0x23, /* Byte value: 0x01 */ + 0x17, 0x0c, 0x9a, 0xa9, 0x18, 0x92, 0x39, 0xd8, 0xad, 0x0a, 0xf2, 0x46, 0x78, 0x7d, 0x02, 0x74, /* Byte value: 0x02 */ + 0xa5, 0x43, 0xab, 0x04, 0x86, 0x68, 0x2c, 0x3c, 0x84, 0x83, 0x35, 0x17, 0xdb, 0x7b, 0x40, 0x98, /* Byte value: 0x03 */ + 0xd4, 0x39, 0x3d, 0x46, 0x72, 0x13, 0xbf, 0x64, 0x51, 0xc4, 0x18, 0x4e, 0x79, 0x1b, 0xea, 0x40, /* Byte value: 0x04 */ + 0xfc, 0x85, 0x52, 0xb3, 0xc9, 0x15, 0xc7, 0x4e, 0x71, 0x26, 0xb7, 0xde, 0x6b, 0x78, 0x61, 0xee, /* Byte value: 0x05 */ + 0xd6, 0xe4, 0xf4, 0xdb, 0x0b, 0x4c, 0xb9, 0x53, 0x87, 0x96, 0x60, 0xfb, 0x27, 0x6c, 0x2e, 0xc3, /* Byte value: 0x06 */ + 0x76, 0x51, 0x8b, 0x89, 0xa2, 0x54, 0x9a, 0xfb, 0x07, 0x98, 0x99, 0xfe, 0x6f, 0x23, 0x47, 0x3e, /* Byte value: 0x07 */ + 0xd2, 0x9d, 0xa5, 0x22, 0xf9, 0xf2, 0xb5, 0x3d, 0xe8, 0x32, 0x90, 0x52, 0x9b, 0x82, 0x65, 0x06, /* Byte value: 0x08 */ + 0x20, 0x4e, 0xcd, 0xc4, 0x9c, 0xb9, 0x60, 0xf6, 0xfe, 0x69, 0x8c, 0x01, 0xa9, 0x7c, 0x1d, 0xe7, /* Byte value: 0x09 */ + 0x65, 0x24, 0x40, 0xd9, 0x48, 0x78, 0xaf, 0x4d, 0xc5, 0x36, 0x9b, 0x11, 0xab, 0xb0, 0x0e, 0x8f, /* Byte value: 0x0a */ + 0x42, 0x41, 0x90, 0xd6, 0x82, 0xee, 0xc6, 0x18, 0xe9, 0x80, 0xa3, 0xb7, 0xcf, 0x8f, 0xfe, 0x8e, /* Byte value: 0x0b */ + 0x46, 0x38, 0xc1, 0x2f, 0x70, 0x50, 0xca, 0x76, 0x86, 0x24, 0x53, 0x1e, 0x73, 0x61, 0xb5, 0x4b, /* Byte value: 0x0c */ + 0xbb, 0x32, 0x16, 0x33, 0x64, 0x8b, 0x0e, 0xc2, 0x9c, 0x2b, 0xd8, 0x7b, 0x37, 0xc3, 0xb6, 0x05, /* Byte value: 0x0d */ + 0x2c, 0xc5, 0x3e, 0x0c, 0x49, 0xb8, 0x74, 0x44, 0x4f, 0x46, 0x5f, 0x39, 0xae, 0x8d, 0xc0, 0x6b, /* Byte value: 0x0e */ + 0x25, 0xb8, 0x19, 0x92, 0xb3, 0xc9, 0x6f, 0x62, 0xfa, 0xe4, 0x40, 0x13, 0x3a, 0x48, 0x34, 0x82, /* Byte value: 0x0f */ + 0x2e, 0x18, 0xf7, 0x91, 0x30, 0xe7, 0x72, 0x73, 0x99, 0x14, 0x27, 0x8c, 0xf0, 0xfa, 0x04, 0xe8, /* Byte value: 0x10 */ + 0x7f, 0x2c, 0xac, 0x17, 0x58, 0x25, 0x81, 0xdd, 0xb2, 0x3a, 0x86, 0xd4, 0xfb, 0xe6, 0xb3, 0xd7, /* Byte value: 0x11 */ + 0xad, 0xb1, 0x09, 0x35, 0xa1, 0xd7, 0x34, 0xe0, 0x5a, 0x08, 0x16, 0x86, 0x60, 0x64, 0xd6, 0xd1, /* Byte value: 0x12 */ + 0x06, 0xa4, 0x98, 0x64, 0x8b, 0xe1, 0x0a, 0x59, 0xb9, 0xf6, 0x88, 0x1c, 0xe2, 0x99, 0x8f, 0x46, /* Byte value: 0x13 */ + 0x6b, 0x72, 0x7a, 0x8c, 0xe4, 0x26, 0xbd, 0xc8, 0xa2, 0x4b, 0x30, 0x9c, 0xf2, 0x36, 0x17, 0x80, /* Byte value: 0x14 */ + 0x3b, 0xc9, 0xa4, 0xa5, 0x51, 0x2a, 0x4d, 0x9c, 0xe2, 0x4c, 0xad, 0x7f, 0xd6, 0xf0, 0xc2, 0x1f, /* Byte value: 0x15 */ + 0x6a, 0xfd, 0xff, 0x23, 0x39, 0xe8, 0xbe, 0x32, 0xc9, 0x62, 0x0c, 0x27, 0xdd, 0xec, 0x75, 0x20, /* Byte value: 0x16 */ + 0x7e, 0xa3, 0x29, 0xb8, 0x85, 0xeb, 0x82, 0x27, 0xd9, 0x13, 0xba, 0x6f, 0xd4, 0x3c, 0xd1, 0x77, /* Byte value: 0x17 */ + 0x3c, 0xe2, 0xb9, 0x6e, 0x07, 0x05, 0x44, 0x3f, 0x30, 0x93, 0x19, 0xd8, 0x1b, 0xb3, 0x2f, 0xf9, /* Byte value: 0x18 */ + 0x84, 0x82, 0xe3, 0x6f, 0xc7, 0x1f, 0x4f, 0x30, 0x11, 0xc3, 0x85, 0xad, 0x5d, 0xdd, 0x3f, 0xdf, /* Byte value: 0x19 */ + 0x67, 0xf9, 0x89, 0x44, 0x31, 0x27, 0xa9, 0x7a, 0x13, 0x64, 0xe3, 0xa4, 0xf5, 0xc7, 0xca, 0x0c, /* Byte value: 0x1a */ + 0xb6, 0x36, 0x60, 0x54, 0x6c, 0x44, 0x19, 0x8a, 0x46, 0x2d, 0x37, 0xf8, 0x1f, 0xe8, 0x09, 0x29, /* Byte value: 0x1b */ + 0x16, 0x83, 0x1f, 0x06, 0xc5, 0x5c, 0x3a, 0x22, 0xc6, 0x23, 0xce, 0xfd, 0x57, 0xa7, 0x60, 0xd4, /* Byte value: 0x1c */ + 0x88, 0x09, 0x10, 0xa7, 0x12, 0x1e, 0x5b, 0x82, 0xa0, 0xec, 0x56, 0x95, 0x5a, 0x2c, 0xe2, 0x53, /* Byte value: 0x1d */ + 0x58, 0x49, 0x7c, 0x18, 0x92, 0xb3, 0xe8, 0x88, 0x9e, 0x8c, 0xbe, 0x72, 0x9f, 0xd9, 0x43, 0xd6, /* Byte value: 0x1e */ + 0xbc, 0x19, 0x0b, 0xf8, 0x32, 0xa4, 0x07, 0x61, 0x4e, 0xf4, 0x6c, 0xdc, 0xfa, 0x80, 0x5b, 0xe3, /* Byte value: 0x1f */ + 0xde, 0x16, 0x56, 0xea, 0x2c, 0xf3, 0xa1, 0x8f, 0x59, 0x1d, 0x43, 0x6a, 0x9c, 0x73, 0xb8, 0x8a, /* Byte value: 0x20 */ + 0xc2, 0xba, 0x22, 0x40, 0xb7, 0x4f, 0x85, 0x46, 0x97, 0xe7, 0xd6, 0xb3, 0x2e, 0xbc, 0x8a, 0x94, /* Byte value: 0x21 */ + 0x4e, 0xca, 0x63, 0x1e, 0x57, 0xef, 0xd2, 0xaa, 0x58, 0xaf, 0x70, 0x8f, 0xc8, 0x7e, 0x23, 0x02, /* Byte value: 0x22 */ + 0x3f, 0xb0, 0xf5, 0x5c, 0xa3, 0x94, 0x41, 0xf2, 0x8d, 0xe8, 0x5d, 0xd6, 0x6a, 0x1e, 0x89, 0xda, /* Byte value: 0x23 */ + 0x0e, 0x56, 0x3a, 0x55, 0xac, 0x5e, 0x12, 0x85, 0x67, 0x7d, 0xab, 0x8d, 0x59, 0x86, 0x19, 0x0f, /* Byte value: 0x24 */ + 0x1f, 0xfe, 0x38, 0x98, 0x3f, 0x2d, 0x21, 0x04, 0x73, 0x81, 0xd1, 0xd7, 0xc3, 0x62, 0x94, 0x3d, /* Byte value: 0x25 */ + 0x99, 0xa1, 0x12, 0x6a, 0x81, 0x6d, 0x68, 0x03, 0xb4, 0x10, 0x2c, 0xcf, 0xc0, 0xc8, 0x6f, 0x61, /* Byte value: 0x26 */ + 0x0c, 0x8b, 0xf3, 0xc8, 0xd5, 0x01, 0x14, 0xb2, 0xb1, 0x2f, 0xd3, 0x38, 0x07, 0xf1, 0xdd, 0x8c, /* Byte value: 0x27 */ + 0x70, 0xf5, 0x13, 0xed, 0x29, 0xb5, 0x90, 0xa2, 0xbe, 0x6e, 0x11, 0xe2, 0x8d, 0xba, 0xc8, 0x78, /* Byte value: 0x28 */ + 0x44, 0xe5, 0x08, 0xb2, 0x09, 0x0f, 0xcc, 0x41, 0x50, 0x76, 0x2b, 0xab, 0x2d, 0x16, 0x71, 0xc8, /* Byte value: 0x29 */ + 0x2d, 0x4a, 0xbb, 0xa3, 0x94, 0x76, 0x77, 0xbe, 0x24, 0x6f, 0x63, 0x82, 0x81, 0x57, 0xa2, 0xcb, /* Byte value: 0x2a */ + 0x5f, 0x62, 0x61, 0xd3, 0xc4, 0x9c, 0xe1, 0x2b, 0x4c, 0x53, 0x0a, 0xd5, 0x52, 0x9a, 0xae, 0x30, /* Byte value: 0x2b */ + 0x78, 0x07, 0xb1, 0xdc, 0x0e, 0x0a, 0x88, 0x7e, 0x60, 0xe5, 0x32, 0x73, 0x36, 0xa5, 0x5e, 0x31, /* Byte value: 0x2c */ + 0xcb, 0xc7, 0x05, 0xde, 0x4d, 0x3e, 0x9e, 0x60, 0x22, 0x45, 0xc9, 0x99, 0xba, 0x79, 0x7e, 0x7d, /* Byte value: 0x2d */ + 0xd5, 0xb6, 0xb8, 0xe9, 0xaf, 0xdd, 0xbc, 0x9e, 0x3a, 0xed, 0x24, 0xf5, 0x56, 0xc1, 0x88, 0xe0, /* Byte value: 0x2e */ + 0x73, 0xa7, 0x5f, 0xdf, 0x8d, 0x24, 0x95, 0x6f, 0x03, 0x15, 0x55, 0xec, 0xfc, 0x17, 0x6e, 0x5b, /* Byte value: 0x2f */ + 0x5c, 0x30, 0x2d, 0xe1, 0x60, 0x0d, 0xe4, 0xe6, 0xf1, 0x28, 0x4e, 0xdb, 0x23, 0x37, 0x08, 0x13, /* Byte value: 0x30 */ + 0xfe, 0x58, 0x9b, 0x2e, 0xb0, 0x4a, 0xc1, 0x79, 0xa7, 0x74, 0xcf, 0x6b, 0x35, 0x0f, 0xa5, 0x6d, /* Byte value: 0x31 */ + 0x6f, 0x0b, 0x2b, 0x75, 0x16, 0x98, 0xb1, 0xa6, 0xcd, 0xef, 0xc0, 0x35, 0x4e, 0xd8, 0x5c, 0x45, /* Byte value: 0x32 */ + 0x1a, 0x08, 0xec, 0xce, 0x10, 0x5d, 0x2e, 0x90, 0x77, 0x0c, 0x1d, 0xc5, 0x50, 0x56, 0xbd, 0x58, /* Byte value: 0x33 */ + 0x07, 0x2b, 0x1d, 0xcb, 0x56, 0x2f, 0x09, 0xa3, 0xd2, 0xdf, 0xb4, 0xa7, 0xcd, 0x43, 0xed, 0xe6, /* Byte value: 0x34 */ + 0xee, 0x7f, 0x1c, 0x4c, 0xfe, 0xf7, 0xf1, 0x02, 0xd8, 0xa1, 0x89, 0x8a, 0x80, 0x31, 0x4a, 0xff, /* Byte value: 0x35 */ + 0xea, 0x06, 0x4d, 0xb5, 0x0c, 0x49, 0xfd, 0x6c, 0xb7, 0x05, 0x79, 0x23, 0x3c, 0xdf, 0x01, 0x3a, /* Byte value: 0x36 */ + 0xc8, 0x95, 0x49, 0xec, 0xe9, 0xaf, 0x9b, 0xad, 0x9f, 0x3e, 0x8d, 0x97, 0xcb, 0xd4, 0xd8, 0x5e, /* Byte value: 0x37 */ + 0x8c, 0x70, 0x41, 0x5e, 0xe0, 0xa0, 0x57, 0xec, 0xcf, 0x48, 0xa6, 0x3c, 0xe6, 0xc2, 0xa9, 0x96, /* Byte value: 0x38 */ + 0xb5, 0x64, 0x2c, 0x66, 0xc8, 0xd5, 0x1c, 0x47, 0xfb, 0x56, 0x73, 0xf6, 0x6e, 0x45, 0xaf, 0x0a, /* Byte value: 0x39 */ + 0x38, 0x9b, 0xe8, 0x97, 0xf5, 0xbb, 0x48, 0x51, 0x5f, 0x37, 0xe9, 0x71, 0xa7, 0x5d, 0x64, 0x3c, /* Byte value: 0x3a */ + 0x59, 0xc6, 0xf9, 0xb7, 0x4f, 0x7d, 0xeb, 0x72, 0xf5, 0xa5, 0x82, 0xc9, 0xb0, 0x03, 0x21, 0x76, /* Byte value: 0x3b */ + 0x69, 0xaf, 0xb3, 0x11, 0x9d, 0x79, 0xbb, 0xff, 0x74, 0x19, 0x48, 0x29, 0xac, 0x41, 0xd3, 0x03, /* Byte value: 0x3c */ + 0x10, 0x27, 0x87, 0x62, 0x4e, 0xbd, 0x30, 0x7b, 0x7f, 0xd5, 0x46, 0xe1, 0xb5, 0x3e, 0xef, 0x92, /* Byte value: 0x3d */ + 0xf0, 0x0e, 0xa1, 0x7b, 0x1c, 0x14, 0xd3, 0xfc, 0xc0, 0x09, 0x64, 0xe6, 0x6c, 0x89, 0xbc, 0x62, /* Byte value: 0x3e */ + 0xa3, 0xe7, 0x33, 0x60, 0x0d, 0x89, 0x26, 0x65, 0x3d, 0x75, 0xbd, 0x0b, 0x39, 0xe2, 0xcf, 0xde, /* Byte value: 0x3f */ + 0x09, 0x7d, 0x27, 0x9e, 0xfa, 0x71, 0x1b, 0x26, 0xb5, 0xa2, 0x1f, 0x2a, 0x94, 0xc5, 0xf4, 0xe9, /* Byte value: 0x40 */ + 0x0d, 0x04, 0x76, 0x67, 0x08, 0xcf, 0x17, 0x48, 0xda, 0x06, 0xef, 0x83, 0x28, 0x2b, 0xbf, 0x2c, /* Byte value: 0x41 */ + 0xfd, 0x0a, 0xd7, 0x1c, 0x14, 0xdb, 0xc4, 0xb4, 0x1a, 0x0f, 0x8b, 0x65, 0x44, 0xa2, 0x03, 0x4e, /* Byte value: 0x42 */ + 0x1b, 0x87, 0x69, 0x61, 0xcd, 0x93, 0x2d, 0x6a, 0x1c, 0x25, 0x21, 0x7e, 0x7f, 0x8c, 0xdf, 0xf8, /* Byte value: 0x43 */ + 0x27, 0x65, 0xd0, 0x0f, 0xca, 0x96, 0x69, 0x55, 0x2c, 0xb6, 0x38, 0xa6, 0x64, 0x3f, 0xf0, 0x01, /* Byte value: 0x44 */ + 0x8d, 0xff, 0xc4, 0xf1, 0x3d, 0x6e, 0x54, 0x16, 0xa4, 0x61, 0x9a, 0x87, 0xc9, 0x18, 0xcb, 0x36, /* Byte value: 0x45 */ + 0xf2, 0xd3, 0x68, 0xe6, 0x65, 0x4b, 0xd5, 0xcb, 0x16, 0x5b, 0x1c, 0x53, 0x32, 0xfe, 0x78, 0xe1, /* Byte value: 0x46 */ + 0x92, 0x01, 0xfc, 0x69, 0x02, 0x43, 0x75, 0x12, 0xd7, 0xe0, 0x4b, 0x50, 0x0a, 0x7a, 0x5f, 0x0b, /* Byte value: 0x47 */ + 0x6d, 0xd6, 0xe2, 0xe8, 0x6f, 0xc7, 0xb7, 0x91, 0x1b, 0xbd, 0xb8, 0x80, 0x10, 0xaf, 0x98, 0xc6, /* Byte value: 0x48 */ + 0x5d, 0xbf, 0xa8, 0x4e, 0xbd, 0xc3, 0xe7, 0x1c, 0x9a, 0x01, 0x72, 0x60, 0x0c, 0xed, 0x6a, 0xb3, /* Byte value: 0x49 */ + 0xf1, 0x81, 0x24, 0xd4, 0xc1, 0xda, 0xd0, 0x06, 0xab, 0x20, 0x58, 0x5d, 0x43, 0x53, 0xde, 0xc2, /* Byte value: 0x4a */ + 0x21, 0xc1, 0x48, 0x6b, 0x41, 0x77, 0x63, 0x0c, 0x95, 0x40, 0xb0, 0xba, 0x86, 0xa6, 0x7f, 0x47, /* Byte value: 0x4b */ + 0x37, 0x42, 0x57, 0x6d, 0x84, 0x2b, 0x59, 0x2e, 0x53, 0x63, 0x7e, 0x47, 0xd1, 0x01, 0x1f, 0x93, /* Byte value: 0x4c */ + 0x40, 0x9c, 0x59, 0x4b, 0xfb, 0xb1, 0xc0, 0x2f, 0x3f, 0xd2, 0xdb, 0x02, 0x91, 0xf8, 0x3a, 0x0d, /* Byte value: 0x4d */ + 0x8e, 0xad, 0x88, 0xc3, 0x99, 0xff, 0x51, 0xdb, 0x19, 0x1a, 0xde, 0x89, 0xb8, 0xb5, 0x6d, 0x15, /* Byte value: 0x4e */ + 0xe8, 0xdb, 0x84, 0x28, 0x75, 0x16, 0xfb, 0x5b, 0x61, 0x57, 0x01, 0x96, 0x62, 0xa8, 0xc5, 0xb9, /* Byte value: 0x4f */ + 0xe4, 0x50, 0x77, 0xe0, 0xa0, 0x17, 0xef, 0xe9, 0xd0, 0x78, 0xd2, 0xae, 0x65, 0x59, 0x18, 0x35, /* Byte value: 0x50 */ + 0xec, 0xa2, 0xd5, 0xd1, 0x87, 0xa8, 0xf7, 0x35, 0x0e, 0xf3, 0xf1, 0x3f, 0xde, 0x46, 0x8e, 0x7c, /* Byte value: 0x51 */ + 0x9e, 0x8a, 0x0f, 0xa1, 0xd7, 0x42, 0x61, 0xa0, 0x66, 0xcf, 0x98, 0x68, 0x0d, 0x8b, 0x82, 0x87, /* Byte value: 0x52 */ + 0x9c, 0x57, 0xc6, 0x3c, 0xae, 0x1d, 0x67, 0x97, 0xb0, 0x9d, 0xe0, 0xdd, 0x53, 0xfc, 0x46, 0x04, /* Byte value: 0x53 */ + 0xd1, 0xcf, 0xe9, 0x10, 0x5d, 0x63, 0xb0, 0xf0, 0x55, 0x49, 0xd4, 0x5c, 0xea, 0x2f, 0xc3, 0x25, /* Byte value: 0x54 */ + 0xe7, 0x02, 0x3b, 0xd2, 0x04, 0x86, 0xea, 0x24, 0x6d, 0x03, 0x96, 0xa0, 0x14, 0xf4, 0xbe, 0x16, /* Byte value: 0x55 */ + 0xb8, 0x60, 0x5a, 0x01, 0xc0, 0x1a, 0x0b, 0x0f, 0x21, 0x50, 0x9c, 0x75, 0x46, 0x6e, 0x10, 0x26, /* Byte value: 0x56 */ + 0x2f, 0x97, 0x72, 0x3e, 0xed, 0x29, 0x71, 0x89, 0xf2, 0x3d, 0x1b, 0x37, 0xdf, 0x20, 0x66, 0x48, /* Byte value: 0x57 */ + 0xe2, 0xf4, 0xef, 0x84, 0x2b, 0xf6, 0xe5, 0xb0, 0x69, 0x8e, 0x5a, 0xb2, 0x87, 0xc0, 0x97, 0x73, /* Byte value: 0x58 */ + 0x8a, 0xd4, 0xd9, 0x3a, 0x6b, 0x41, 0x5d, 0xb5, 0x76, 0xbe, 0x2e, 0x20, 0x04, 0x5b, 0x26, 0xd0, /* Byte value: 0x59 */ + 0xd7, 0x6b, 0x71, 0x74, 0xd6, 0x82, 0xba, 0xa9, 0xec, 0xbf, 0x5c, 0x40, 0x08, 0xb6, 0x4c, 0x63, /* Byte value: 0x5a */ + 0xb4, 0xeb, 0xa9, 0xc9, 0x15, 0x1b, 0x1f, 0xbd, 0x90, 0x7f, 0x4f, 0x4d, 0x41, 0x9f, 0xcd, 0xaa, /* Byte value: 0x5b */ + 0x29, 0x33, 0xea, 0x5a, 0x66, 0xc8, 0x7b, 0xd0, 0x4b, 0xcb, 0x93, 0x2b, 0x3d, 0xb9, 0xe9, 0x0e, /* Byte value: 0x5c */ + 0x13, 0x75, 0xcb, 0x50, 0xea, 0x2c, 0x35, 0xb6, 0xc2, 0xae, 0x02, 0xef, 0xc4, 0x93, 0x49, 0xb1, /* Byte value: 0x5d */ + 0x98, 0x2e, 0x97, 0xc5, 0x5c, 0xa3, 0x6b, 0xf9, 0xdf, 0x39, 0x10, 0x74, 0xef, 0x12, 0x0d, 0xc1, /* Byte value: 0x5e */ + 0x80, 0xfb, 0xb2, 0x96, 0x35, 0xa1, 0x43, 0x5e, 0x7e, 0x67, 0x75, 0x04, 0xe1, 0x33, 0x74, 0x1a, /* Byte value: 0x5f */ + 0xa6, 0x11, 0xe7, 0x36, 0x22, 0xf9, 0x29, 0xf1, 0x39, 0xf8, 0x71, 0x19, 0xaa, 0xd6, 0xe6, 0xbb, /* Byte value: 0x60 */ + 0x62, 0x0f, 0x5d, 0x12, 0x1e, 0x57, 0xa6, 0xee, 0x17, 0xe9, 0x2f, 0xb6, 0x66, 0xf3, 0xe3, 0x69, /* Byte value: 0x61 */ + 0xb3, 0xc0, 0xb4, 0x02, 0x43, 0x34, 0x16, 0x1e, 0x42, 0xa0, 0xfb, 0xea, 0x8c, 0xdc, 0x20, 0x4c, /* Byte value: 0x62 */ + 0x5e, 0xed, 0xe4, 0x7c, 0x19, 0x52, 0xe2, 0xd1, 0x27, 0x7a, 0x36, 0x6e, 0x7d, 0x40, 0xcc, 0x90, /* Byte value: 0x63 */ + 0x72, 0x28, 0xda, 0x70, 0x50, 0xea, 0x96, 0x95, 0x68, 0x3c, 0x69, 0x57, 0xd3, 0xcd, 0x0c, 0xfb, /* Byte value: 0x64 */ + 0x43, 0xce, 0x15, 0x79, 0x5f, 0x20, 0xc5, 0xe2, 0x82, 0xa9, 0x9f, 0x0c, 0xe0, 0x55, 0x9c, 0x2e, /* Byte value: 0x65 */ + 0x34, 0x10, 0x1b, 0x5f, 0x20, 0xba, 0x5c, 0xe3, 0xee, 0x18, 0x3a, 0x49, 0xa0, 0xac, 0xb9, 0xb0, /* Byte value: 0x66 */ + 0x35, 0x9f, 0x9e, 0xf0, 0xfd, 0x74, 0x5f, 0x19, 0x85, 0x31, 0x06, 0xf2, 0x8f, 0x76, 0xdb, 0x10, /* Byte value: 0x67 */ + 0x52, 0x66, 0x17, 0xb4, 0xcc, 0x53, 0xf6, 0x63, 0x96, 0x55, 0xe5, 0x56, 0x7a, 0xb1, 0x11, 0x1c, /* Byte value: 0x68 */ + 0x26, 0xea, 0x55, 0xa0, 0x17, 0x58, 0x6a, 0xaf, 0x47, 0x9f, 0x04, 0x1d, 0x4b, 0xe5, 0x92, 0xa1, /* Byte value: 0x69 */ + 0x7d, 0xf1, 0x65, 0x8a, 0x21, 0x7a, 0x87, 0xea, 0x64, 0x68, 0xfe, 0x61, 0xa5, 0x91, 0x77, 0x54, /* Byte value: 0x6a */ + 0xb7, 0xb9, 0xe5, 0xfb, 0xb1, 0x8a, 0x1a, 0x70, 0x2d, 0x04, 0x0b, 0x43, 0x30, 0x32, 0x6b, 0x89, /* Byte value: 0x6b */ + 0x0a, 0x2f, 0x6b, 0xac, 0x5e, 0xe0, 0x1e, 0xeb, 0x08, 0xd9, 0x5b, 0x24, 0xe5, 0x68, 0x52, 0xca, /* Byte value: 0x6c */ + 0x45, 0x6a, 0x8d, 0x1d, 0xd4, 0xc1, 0xcf, 0xbb, 0x3b, 0x5f, 0x17, 0x10, 0x02, 0xcc, 0x13, 0x68, /* Byte value: 0x6d */ + 0x81, 0x74, 0x37, 0x39, 0xe8, 0x6f, 0x40, 0xa4, 0x15, 0x4e, 0x49, 0xbf, 0xce, 0xe9, 0x16, 0xba, /* Byte value: 0x6e */ + 0x6e, 0x84, 0xae, 0xda, 0xcb, 0x56, 0xb2, 0x5c, 0xa6, 0xc6, 0xfc, 0x8e, 0x61, 0x02, 0x3e, 0xe5, /* Byte value: 0x6f */ + 0x53, 0xe9, 0x92, 0x1b, 0x11, 0x9d, 0xf5, 0x99, 0xfd, 0x7c, 0xd9, 0xed, 0x55, 0x6b, 0x73, 0xbc, /* Byte value: 0x70 */ + 0x4a, 0xb3, 0x32, 0xe7, 0xa5, 0x51, 0xde, 0xc4, 0x37, 0x0b, 0x80, 0x26, 0x74, 0x90, 0x68, 0xc7, /* Byte value: 0x71 */ + 0x79, 0x88, 0x34, 0x73, 0xd3, 0xc4, 0x8b, 0x84, 0x0b, 0xcc, 0x0e, 0xc8, 0x19, 0x7f, 0x3c, 0x91, /* Byte value: 0x72 */ + 0x32, 0xb4, 0x83, 0x3b, 0xab, 0x5b, 0x56, 0xba, 0x57, 0xee, 0xb2, 0x55, 0x42, 0x35, 0x36, 0xf6, /* Byte value: 0x73 */ + 0x61, 0x5d, 0x11, 0x20, 0xba, 0xc6, 0xa3, 0x23, 0xaa, 0x92, 0x6b, 0xb8, 0x17, 0x5e, 0x45, 0x4a, /* Byte value: 0x74 */ + 0xfb, 0xae, 0x4f, 0x78, 0x9f, 0x3a, 0xce, 0xed, 0xa3, 0xf9, 0x03, 0x79, 0xa6, 0x3b, 0x8c, 0x08, /* Byte value: 0x75 */ + 0x39, 0x14, 0x6d, 0x38, 0x28, 0x75, 0x4b, 0xab, 0x34, 0x1e, 0xd5, 0xca, 0x88, 0x87, 0x06, 0x9c, /* Byte value: 0x76 */ + 0xc0, 0x67, 0xeb, 0xdd, 0xce, 0x10, 0x83, 0x71, 0x41, 0xb5, 0xae, 0x06, 0x70, 0xcb, 0x4e, 0x17, /* Byte value: 0x77 */ + 0xfa, 0x21, 0xca, 0xd7, 0x42, 0xf4, 0xcd, 0x17, 0xc8, 0xd0, 0x3f, 0xc2, 0x89, 0xe1, 0xee, 0xa8, /* Byte value: 0x78 */ + 0x5b, 0x1b, 0x30, 0x2a, 0x36, 0x22, 0xed, 0x45, 0x23, 0xf7, 0xfa, 0x7c, 0xee, 0x74, 0xe5, 0xf5, /* Byte value: 0x79 */ + 0xa4, 0xcc, 0x2e, 0xab, 0x5b, 0xa6, 0x2f, 0xc6, 0xef, 0xaa, 0x09, 0xac, 0xf4, 0xa1, 0x22, 0x38, /* Byte value: 0x7a */ + 0xba, 0xbd, 0x93, 0x9c, 0xb9, 0x45, 0x0d, 0x38, 0xf7, 0x02, 0xe4, 0xc0, 0x18, 0x19, 0xd4, 0xa5, /* Byte value: 0x7b */ + 0xda, 0x6f, 0x07, 0x13, 0xde, 0x4d, 0xad, 0xe1, 0x36, 0xb9, 0xb3, 0xc3, 0x20, 0x9d, 0xf3, 0x4f, /* Byte value: 0x7c */ + 0x4c, 0x17, 0xaa, 0x83, 0x2e, 0xb0, 0xd4, 0x9d, 0x8e, 0xfd, 0x08, 0x3a, 0x96, 0x09, 0xe7, 0x81, /* Byte value: 0x7d */ + 0x05, 0xf6, 0xd4, 0x56, 0x2f, 0x70, 0x0f, 0x94, 0x04, 0x8d, 0xcc, 0x12, 0x93, 0x34, 0x29, 0x65, /* Byte value: 0x7e */ + 0xc3, 0x35, 0xa7, 0xef, 0x6a, 0x81, 0x86, 0xbc, 0xfc, 0xce, 0xea, 0x08, 0x01, 0x66, 0xe8, 0x34, /* Byte value: 0x7f */ + 0x3a, 0x46, 0x21, 0x0a, 0x8c, 0xe4, 0x4e, 0x66, 0x89, 0x65, 0x91, 0xc4, 0xf9, 0x2a, 0xa0, 0xbf, /* Byte value: 0x80 */ + 0x82, 0x26, 0x7b, 0x0b, 0x4c, 0xfe, 0x45, 0x69, 0xa8, 0x35, 0x0d, 0xb1, 0xbf, 0x44, 0xb0, 0x99, /* Byte value: 0x81 */ + 0x18, 0xd5, 0x25, 0x53, 0x69, 0x02, 0x28, 0xa7, 0xa1, 0x5e, 0x65, 0x70, 0x0e, 0x21, 0x79, 0xdb, /* Byte value: 0x82 */ + 0xc9, 0x1a, 0xcc, 0x43, 0x34, 0x61, 0x98, 0x57, 0xf4, 0x17, 0xb1, 0x2c, 0xe4, 0x0e, 0xba, 0xfe, /* Byte value: 0x83 */ + 0x68, 0x20, 0x36, 0xbe, 0x40, 0xb7, 0xb8, 0x05, 0x1f, 0x30, 0x74, 0x92, 0x83, 0x9b, 0xb1, 0xa3, /* Byte value: 0x84 */ + 0xf6, 0xaa, 0x39, 0x1f, 0x97, 0xf5, 0xd9, 0xa5, 0x79, 0xff, 0xec, 0xfa, 0x8e, 0x10, 0x33, 0x24, /* Byte value: 0x85 */ + 0x63, 0x80, 0xd8, 0xbd, 0xc3, 0x99, 0xa5, 0x14, 0x7c, 0xc0, 0x13, 0x0d, 0x49, 0x29, 0x81, 0xc9, /* Byte value: 0x86 */ + 0x87, 0xd0, 0xaf, 0x5d, 0x63, 0x8e, 0x4a, 0xfd, 0xac, 0xb8, 0xc1, 0xa3, 0x2c, 0x70, 0x99, 0xfc, /* Byte value: 0x87 */ + 0x49, 0xe1, 0x7e, 0xd5, 0x01, 0xc0, 0xdb, 0x09, 0x8a, 0x70, 0xc4, 0x28, 0x05, 0x3d, 0xce, 0xe4, /* Byte value: 0x88 */ + 0x36, 0xcd, 0xd2, 0xc2, 0x59, 0xe5, 0x5a, 0xd4, 0x38, 0x4a, 0x42, 0xfc, 0xfe, 0xdb, 0x7d, 0x33, /* Byte value: 0x89 */ + 0x91, 0x53, 0xb0, 0x5b, 0xa6, 0xd2, 0x70, 0xdf, 0x6a, 0x9b, 0x0f, 0x5e, 0x7b, 0xd7, 0xf9, 0x28, /* Byte value: 0x8a */ + 0x97, 0xf7, 0x28, 0x3f, 0x2d, 0x33, 0x7a, 0x86, 0xd3, 0x6d, 0x87, 0x42, 0x99, 0x4e, 0x76, 0x6e, /* Byte value: 0x8b */ + 0x33, 0x3b, 0x06, 0x94, 0x76, 0x95, 0x55, 0x40, 0x3c, 0xc7, 0x8e, 0xee, 0x6d, 0xef, 0x54, 0x56, /* Byte value: 0x8c */ + 0x08, 0xf2, 0xa2, 0x31, 0x27, 0xbf, 0x18, 0xdc, 0xde, 0x8b, 0x23, 0x91, 0xbb, 0x1f, 0x96, 0x49, /* Byte value: 0x8d */ + 0x7c, 0x7e, 0xe0, 0x25, 0xfc, 0xb4, 0x84, 0x10, 0x0f, 0x41, 0xc2, 0xda, 0x8a, 0x4b, 0x15, 0xf4, /* Byte value: 0x8e */ + 0x02, 0xdd, 0xc9, 0x9d, 0x79, 0x5f, 0x06, 0x37, 0xd6, 0x52, 0x78, 0xb5, 0x5e, 0x77, 0xc4, 0x83, /* Byte value: 0x8f */ + 0x77, 0xde, 0x0e, 0x26, 0x7f, 0x9a, 0x99, 0x01, 0x6c, 0xb1, 0xa5, 0x45, 0x40, 0xf9, 0x25, 0x9e, /* Byte value: 0x90 */ + 0x85, 0x0d, 0x66, 0xc0, 0x1a, 0xd1, 0x4c, 0xca, 0x7a, 0xea, 0xb9, 0x16, 0x72, 0x07, 0x5d, 0x7f, /* Byte value: 0x91 */ + 0x66, 0x76, 0x0c, 0xeb, 0xec, 0xe9, 0xaa, 0x80, 0x78, 0x4d, 0xdf, 0x1f, 0xda, 0x1d, 0xa8, 0xac, /* Byte value: 0x92 */ + 0x41, 0x13, 0xdc, 0xe4, 0x26, 0x7f, 0xc3, 0xd5, 0x54, 0xfb, 0xe7, 0xb9, 0xbe, 0x22, 0x58, 0xad, /* Byte value: 0x93 */ + 0x30, 0x69, 0x4a, 0xa6, 0xd2, 0x04, 0x50, 0x8d, 0x81, 0xbc, 0xca, 0xe0, 0x1c, 0x42, 0xf2, 0x75, /* Byte value: 0x94 */ + 0xcd, 0x63, 0x9d, 0xba, 0xc6, 0xdf, 0x94, 0x39, 0x9b, 0xb3, 0x41, 0x85, 0x58, 0xe0, 0xf1, 0x3b, /* Byte value: 0x95 */ + 0xd0, 0x40, 0x6c, 0xbf, 0x80, 0xad, 0xb3, 0x0a, 0x3e, 0x60, 0xe8, 0xe7, 0xc5, 0xf5, 0xa1, 0x85, /* Byte value: 0x96 */ + 0xd9, 0x3d, 0x4b, 0x21, 0x7a, 0xdc, 0xa8, 0x2c, 0x8b, 0xc2, 0xf7, 0xcd, 0x51, 0x30, 0x55, 0x6c, /* Byte value: 0x97 */ + 0xa9, 0xc8, 0x58, 0xcc, 0x53, 0x69, 0x38, 0x8e, 0x35, 0xac, 0xe6, 0x2f, 0xdc, 0x8a, 0x9d, 0x14, /* Byte value: 0x98 */ + 0xaa, 0x9a, 0x14, 0xfe, 0xf7, 0xf8, 0x3d, 0x43, 0x88, 0xd7, 0xa2, 0x21, 0xad, 0x27, 0x3b, 0x37, /* Byte value: 0x99 */ + 0xc5, 0x91, 0x3f, 0x8b, 0xe1, 0x60, 0x8c, 0xe5, 0x45, 0x38, 0x62, 0x14, 0xe3, 0xff, 0x67, 0x72, /* Byte value: 0x9a */ + 0x60, 0xd2, 0x94, 0x8f, 0x67, 0x08, 0xa0, 0xd9, 0xc1, 0xbb, 0x57, 0x03, 0x38, 0x84, 0x27, 0xea, /* Byte value: 0x9b */ + 0xf8, 0xfc, 0x03, 0x4a, 0x3b, 0xab, 0xcb, 0x20, 0x1e, 0x82, 0x47, 0x77, 0xd7, 0x96, 0x2a, 0x2b, /* Byte value: 0x9c */ + 0x04, 0x79, 0x51, 0xf9, 0xf2, 0xbe, 0x0c, 0x6e, 0x6f, 0xa4, 0xf0, 0xa9, 0xbc, 0xee, 0x4b, 0xc5, /* Byte value: 0x9d */ + 0x90, 0xdc, 0x35, 0xf4, 0x7b, 0x1c, 0x73, 0x25, 0x01, 0xb2, 0x33, 0xe5, 0x54, 0x0d, 0x9b, 0x88, /* Byte value: 0x9e */ + 0xe6, 0x8d, 0xbe, 0x7d, 0xd9, 0x48, 0xe9, 0xde, 0x06, 0x2a, 0xaa, 0x1b, 0x3b, 0x2e, 0xdc, 0xb6, /* Byte value: 0x9f */ + 0x96, 0x78, 0xad, 0x90, 0xf0, 0xfd, 0x79, 0x7c, 0xb8, 0x44, 0xbb, 0xf9, 0xb6, 0x94, 0x14, 0xce, /* Byte value: 0xa0 */ + 0xaf, 0x6c, 0xc0, 0xa8, 0xd8, 0x88, 0x32, 0xd7, 0x8c, 0x5a, 0x6e, 0x33, 0x3e, 0x13, 0x12, 0x52, /* Byte value: 0xa1 */ + 0xc6, 0xc3, 0x73, 0xb9, 0x45, 0xf1, 0x89, 0x28, 0xf8, 0x43, 0x26, 0x1a, 0x92, 0x52, 0xc1, 0x51, /* Byte value: 0xa2 */ + 0xa7, 0x9e, 0x62, 0x99, 0xff, 0x37, 0x2a, 0x0b, 0x52, 0xd1, 0x4d, 0xa2, 0x85, 0x0c, 0x84, 0x1b, /* Byte value: 0xa3 */ + 0xa1, 0x3a, 0xfa, 0xfd, 0x74, 0xd6, 0x20, 0x52, 0xeb, 0x27, 0xc5, 0xbe, 0x67, 0x95, 0x0b, 0x5d, /* Byte value: 0xa4 */ + 0xd8, 0xb2, 0xce, 0x8e, 0xa7, 0x12, 0xab, 0xd6, 0xe0, 0xeb, 0xcb, 0x76, 0x7e, 0xea, 0x37, 0xcc, /* Byte value: 0xa5 */ + 0x1e, 0x71, 0xbd, 0x37, 0xe2, 0xe3, 0x22, 0xfe, 0x18, 0xa8, 0xed, 0x6c, 0xec, 0xb8, 0xf6, 0x9d, /* Byte value: 0xa6 */ + 0x4d, 0x98, 0x2f, 0x2c, 0xf3, 0x7e, 0xd7, 0x67, 0xe5, 0xd4, 0x34, 0x81, 0xb9, 0xd3, 0x85, 0x21, /* Byte value: 0xa7 */ + 0x64, 0xab, 0xc5, 0x76, 0x95, 0xb6, 0xac, 0xb7, 0xae, 0x1f, 0xa7, 0xaa, 0x84, 0x6a, 0x6c, 0x2f, /* Byte value: 0xa8 */ + 0x9a, 0xf3, 0x5e, 0x58, 0x25, 0xfc, 0x6d, 0xce, 0x09, 0x6b, 0x68, 0xc1, 0xb1, 0x65, 0xc9, 0x42, /* Byte value: 0xa9 */ + 0xe3, 0x7b, 0x6a, 0x2b, 0xf6, 0x38, 0xe6, 0x4a, 0x02, 0xa7, 0x66, 0x09, 0xa8, 0x1a, 0xf5, 0xd3, /* Byte value: 0xaa */ + 0xf9, 0x73, 0x86, 0xe5, 0xe6, 0x65, 0xc8, 0xda, 0x75, 0xab, 0x7b, 0xcc, 0xf8, 0x4c, 0x48, 0x8b, /* Byte value: 0xab */ + 0xf7, 0x25, 0xbc, 0xb0, 0x4a, 0x3b, 0xda, 0x5f, 0x12, 0xd6, 0xd0, 0x41, 0xa1, 0xca, 0x51, 0x84, /* Byte value: 0xac */ + 0x19, 0x5a, 0xa0, 0xfc, 0xb4, 0xcc, 0x2b, 0x5d, 0xca, 0x77, 0x59, 0xcb, 0x21, 0xfb, 0x1b, 0x7b, /* Byte value: 0xad */ + 0x83, 0xa9, 0xfe, 0xa4, 0x91, 0x30, 0x46, 0x93, 0xc3, 0x1c, 0x31, 0x0a, 0x90, 0x9e, 0xd2, 0x39, /* Byte value: 0xae */ + 0x4b, 0x3c, 0xb7, 0x48, 0x78, 0x9f, 0xdd, 0x3e, 0x5c, 0x22, 0xbc, 0x9d, 0x5b, 0x4a, 0x0a, 0x67, /* Byte value: 0xaf */ + 0x4f, 0x45, 0xe6, 0xb1, 0x8a, 0x21, 0xd1, 0x50, 0x33, 0x86, 0x4c, 0x34, 0xe7, 0xa4, 0x41, 0xa2, /* Byte value: 0xb0 */ + 0x7b, 0x55, 0xfd, 0xee, 0xaa, 0x9b, 0x8d, 0xb3, 0xdd, 0x9e, 0x76, 0x7d, 0x47, 0x08, 0xf8, 0x12, /* Byte value: 0xb1 */ + 0xef, 0xf0, 0x99, 0xe3, 0x23, 0x39, 0xf2, 0xf8, 0xb3, 0x88, 0xb5, 0x31, 0xaf, 0xeb, 0x28, 0x5f, /* Byte value: 0xb2 */ + 0x9d, 0xd8, 0x43, 0x93, 0x73, 0xd3, 0x64, 0x6d, 0xdb, 0xb4, 0xdc, 0x66, 0x7c, 0x26, 0x24, 0xa4, /* Byte value: 0xb3 */ + 0x74, 0x8c, 0x42, 0x14, 0xdb, 0x0b, 0x9c, 0xcc, 0xd1, 0xca, 0xe1, 0x4b, 0x31, 0x54, 0x83, 0xbd, /* Byte value: 0xb4 */ + 0xc7, 0x4c, 0xf6, 0x16, 0x98, 0x3f, 0x8a, 0xd2, 0x93, 0x6a, 0x1a, 0xa1, 0xbd, 0x88, 0xa3, 0xf1, /* Byte value: 0xb5 */ + 0xca, 0x48, 0x80, 0x71, 0x90, 0xf0, 0x9d, 0x9a, 0x49, 0x6c, 0xf5, 0x22, 0x95, 0xa3, 0x1c, 0xdd, /* Byte value: 0xb6 */ + 0x6c, 0x59, 0x67, 0x47, 0xb2, 0x09, 0xb4, 0x6b, 0x70, 0x94, 0x84, 0x3b, 0x3f, 0x75, 0xfa, 0x66, /* Byte value: 0xb7 */ + 0xf3, 0x5c, 0xed, 0x49, 0xb8, 0x85, 0xd6, 0x31, 0x7d, 0x72, 0x20, 0xe8, 0x1d, 0x24, 0x1a, 0x41, /* Byte value: 0xb8 */ + 0x31, 0xe6, 0xcf, 0x09, 0x0f, 0xca, 0x53, 0x77, 0xea, 0x95, 0xf6, 0x5b, 0x33, 0x98, 0x90, 0xd5, /* Byte value: 0xb9 */ + 0x3e, 0x3f, 0x70, 0xf3, 0x7e, 0x5a, 0x42, 0x08, 0xe6, 0xc1, 0x61, 0x6d, 0x45, 0xc4, 0xeb, 0x7a, /* Byte value: 0xba */ + 0x01, 0x8f, 0x85, 0xaf, 0xdd, 0xce, 0x03, 0xfa, 0x6b, 0x29, 0x3c, 0xbb, 0x2f, 0xda, 0x62, 0xa0, /* Byte value: 0xbb */ + 0xdb, 0xe0, 0x82, 0xbc, 0x03, 0x83, 0xae, 0x1b, 0x5d, 0x90, 0x8f, 0x78, 0x0f, 0x47, 0x91, 0xef, /* Byte value: 0xbc */ + 0xc4, 0x1e, 0xba, 0x24, 0x3c, 0xae, 0x8f, 0x1f, 0x2e, 0x11, 0x5e, 0xaf, 0xcc, 0x25, 0x05, 0xd2, /* Byte value: 0xbd */ + 0xe1, 0xa6, 0xa3, 0xb6, 0x8f, 0x67, 0xe0, 0x7d, 0xd4, 0xf5, 0x1e, 0xbc, 0xf6, 0x6d, 0x31, 0x50, /* Byte value: 0xbe */ + 0xed, 0x2d, 0x50, 0x7e, 0x5a, 0x66, 0xf4, 0xcf, 0x65, 0xda, 0xcd, 0x84, 0xf1, 0x9c, 0xec, 0xdc, /* Byte value: 0xbf */ + 0xe0, 0x29, 0x26, 0x19, 0x52, 0xa9, 0xe3, 0x87, 0xbf, 0xdc, 0x22, 0x07, 0xd9, 0xb7, 0x53, 0xf0, /* Byte value: 0xc0 */ + 0x14, 0x5e, 0xd6, 0x9b, 0xbc, 0x03, 0x3c, 0x15, 0x10, 0x71, 0xb6, 0x48, 0x09, 0xd0, 0xa4, 0x57, /* Byte value: 0xc1 */ + 0xdf, 0x99, 0xd3, 0x45, 0xf1, 0x3d, 0xa2, 0x75, 0x32, 0x34, 0x7f, 0xd1, 0xb3, 0xa9, 0xda, 0x2a, /* Byte value: 0xc2 */ + 0x50, 0xbb, 0xde, 0x29, 0xb5, 0x0c, 0xf0, 0x54, 0x40, 0x07, 0x9d, 0xe3, 0x24, 0xc6, 0xd5, 0x9f, /* Byte value: 0xc3 */ + 0xbe, 0xc4, 0xc2, 0x65, 0x4b, 0xfb, 0x01, 0x56, 0x98, 0xa6, 0x14, 0x69, 0xa4, 0xf7, 0x9f, 0x60, /* Byte value: 0xc4 */ + 0xab, 0x15, 0x91, 0x51, 0x2a, 0x36, 0x3e, 0xb9, 0xe3, 0xfe, 0x9e, 0x9a, 0x82, 0xfd, 0x59, 0x97, /* Byte value: 0xc5 */ + 0xae, 0xe3, 0x45, 0x07, 0x05, 0x46, 0x31, 0x2d, 0xe7, 0x73, 0x52, 0x88, 0x11, 0xc9, 0x70, 0xf2, /* Byte value: 0xc6 */ + 0x51, 0x34, 0x5b, 0x86, 0x68, 0xc2, 0xf3, 0xae, 0x2b, 0x2e, 0xa1, 0x58, 0x0b, 0x1c, 0xb7, 0x3f, /* Byte value: 0xc7 */ + 0x12, 0xfa, 0x4e, 0xff, 0x37, 0xe2, 0x36, 0x4c, 0xa9, 0x87, 0x3e, 0x54, 0xeb, 0x49, 0x2b, 0x11, /* Byte value: 0xc8 */ + 0x8f, 0x22, 0x0d, 0x6c, 0x44, 0x31, 0x52, 0x21, 0x72, 0x33, 0xe2, 0x32, 0x97, 0x6f, 0x0f, 0xb5, /* Byte value: 0xc9 */ + 0x1d, 0x23, 0xf1, 0x05, 0x46, 0x72, 0x27, 0x33, 0xa5, 0xd3, 0xa9, 0x62, 0x9d, 0x15, 0x50, 0xbe, /* Byte value: 0xca */ + 0xf4, 0x77, 0xf0, 0x82, 0xee, 0xaa, 0xdf, 0x92, 0xaf, 0xad, 0x94, 0x4f, 0xd0, 0x67, 0xf7, 0xa7, /* Byte value: 0xcb */ + 0xd3, 0x12, 0x20, 0x8d, 0x24, 0x3c, 0xb6, 0xc7, 0x83, 0x1b, 0xac, 0xe9, 0xb4, 0x58, 0x07, 0xa6, /* Byte value: 0xcc */ + 0xff, 0xd7, 0x1e, 0x81, 0x6d, 0x84, 0xc2, 0x83, 0xcc, 0x5d, 0xf3, 0xd0, 0x1a, 0xd5, 0xc7, 0xcd, /* Byte value: 0xcd */ + 0x47, 0xb7, 0x44, 0x80, 0xad, 0x9e, 0xc9, 0x8c, 0xed, 0x0d, 0x6f, 0xa5, 0x5c, 0xbb, 0xd7, 0xeb, /* Byte value: 0xce */ + 0x15, 0xd1, 0x53, 0x34, 0x61, 0xcd, 0x3f, 0xef, 0x7b, 0x58, 0x8a, 0xf3, 0x26, 0x0a, 0xc6, 0xf7, /* Byte value: 0xcf */ + 0x8b, 0x5b, 0x5c, 0x95, 0xb6, 0x8f, 0x5e, 0x4f, 0x1d, 0x97, 0x12, 0x9b, 0x2b, 0x81, 0x44, 0x70, /* Byte value: 0xd0 */ + 0xa0, 0xb5, 0x7f, 0x52, 0xa9, 0x18, 0x23, 0xa8, 0x80, 0x0e, 0xf9, 0x05, 0x48, 0x4f, 0x69, 0xfd, /* Byte value: 0xd1 */ + 0xf5, 0xf8, 0x75, 0x2d, 0x33, 0x64, 0xdc, 0x68, 0xc4, 0x84, 0xa8, 0xf4, 0xff, 0xbd, 0x95, 0x07, /* Byte value: 0xd2 */ + 0x28, 0xbc, 0x6f, 0xf5, 0xbb, 0x06, 0x78, 0x2a, 0x20, 0xe2, 0xaf, 0x90, 0x12, 0x63, 0x8b, 0xae, /* Byte value: 0xd3 */ + 0x57, 0x90, 0xc3, 0xe2, 0xe3, 0x23, 0xf9, 0xf7, 0x92, 0xd8, 0x29, 0x44, 0xe9, 0x85, 0x38, 0x79, /* Byte value: 0xd4 */ + 0xb2, 0x4f, 0x31, 0xad, 0x9e, 0xfa, 0x15, 0xe4, 0x29, 0x89, 0xc7, 0x51, 0xa3, 0x06, 0x42, 0xec, /* Byte value: 0xd5 */ + 0x24, 0x37, 0x9c, 0x3d, 0x6e, 0x07, 0x6c, 0x98, 0x91, 0xcd, 0x7c, 0xa8, 0x15, 0x92, 0x56, 0x22, /* Byte value: 0xd6 */ + 0xcf, 0xbe, 0x54, 0x27, 0xbf, 0x80, 0x92, 0x0e, 0x4d, 0xe1, 0x39, 0x30, 0x06, 0x97, 0x35, 0xb8, /* Byte value: 0xd7 */ + 0x89, 0x86, 0x95, 0x08, 0xcf, 0xd0, 0x58, 0x78, 0xcb, 0xc5, 0x6a, 0x2e, 0x75, 0xf6, 0x80, 0xf3, /* Byte value: 0xd8 */ + 0xdd, 0x44, 0x1a, 0xd8, 0x88, 0x62, 0xa4, 0x42, 0xe4, 0x66, 0x07, 0x64, 0xed, 0xde, 0x1e, 0xa9, /* Byte value: 0xd9 */ + 0x55, 0x4d, 0x0a, 0x7f, 0x9a, 0x7c, 0xff, 0xc0, 0x44, 0x8a, 0x51, 0xf1, 0xb7, 0xf2, 0xfc, 0xfa, /* Byte value: 0xda */ + 0x2b, 0xee, 0x23, 0xc7, 0x1f, 0x97, 0x7d, 0xe7, 0x9d, 0x99, 0xeb, 0x9e, 0x63, 0xce, 0x2d, 0x8d, /* Byte value: 0xdb */ + 0x9b, 0x7c, 0xdb, 0xf7, 0xf8, 0x32, 0x6e, 0x34, 0x62, 0x42, 0x54, 0x7a, 0x9e, 0xbf, 0xab, 0xe2, /* Byte value: 0xdc */ + 0xeb, 0x89, 0xc8, 0x1a, 0xd1, 0x87, 0xfe, 0x96, 0xdc, 0x2c, 0x45, 0x98, 0x13, 0x05, 0x63, 0x9a, /* Byte value: 0xdd */ + 0xce, 0x31, 0xd1, 0x88, 0x62, 0x4e, 0x91, 0xf4, 0x26, 0xc8, 0x05, 0x8b, 0x29, 0x4d, 0x57, 0x18, /* Byte value: 0xde */ + 0xe5, 0xdf, 0xf2, 0x4f, 0x7d, 0xd9, 0xec, 0x13, 0xbb, 0x51, 0xee, 0x15, 0x4a, 0x83, 0x7a, 0x95, /* Byte value: 0xdf */ + 0xb1, 0x1d, 0x7d, 0x9f, 0x3a, 0x6b, 0x10, 0x29, 0x94, 0xf2, 0x83, 0x5f, 0xd2, 0xab, 0xe4, 0xcf, /* Byte value: 0xe0 */ + 0x22, 0x93, 0x04, 0x59, 0xe5, 0xe6, 0x66, 0xc1, 0x28, 0x3b, 0xf4, 0xb4, 0xf7, 0x0b, 0xd9, 0x64, /* Byte value: 0xe1 */ + 0xbd, 0x96, 0x8e, 0x57, 0xef, 0x6a, 0x04, 0x9b, 0x25, 0xdd, 0x50, 0x67, 0xd5, 0x5a, 0x39, 0x43, /* Byte value: 0xe2 */ + 0xe9, 0x54, 0x01, 0x87, 0xa8, 0xd8, 0xf8, 0xa1, 0x0a, 0x7e, 0x3d, 0x2d, 0x4d, 0x72, 0xa7, 0x19, /* Byte value: 0xe3 */ + 0x23, 0x1c, 0x81, 0xf6, 0x38, 0x28, 0x65, 0x3b, 0x43, 0x12, 0xc8, 0x0f, 0xd8, 0xd1, 0xbb, 0xc4, /* Byte value: 0xe4 */ + 0x75, 0x03, 0xc7, 0xbb, 0x06, 0xc5, 0x9f, 0x36, 0xba, 0xe3, 0xdd, 0xf0, 0x1e, 0x8e, 0xe1, 0x1d, /* Byte value: 0xe5 */ + 0x9f, 0x05, 0x8a, 0x0e, 0x0a, 0x8c, 0x62, 0x5a, 0x0d, 0xe6, 0xa4, 0xd3, 0x22, 0x51, 0xe0, 0x27, /* Byte value: 0xe6 */ + 0xa2, 0x68, 0xb6, 0xcf, 0xd0, 0x47, 0x25, 0x9f, 0x56, 0x5c, 0x81, 0xb0, 0x16, 0x38, 0xad, 0x7e, /* Byte value: 0xe7 */ + 0x0f, 0xd9, 0xbf, 0xfa, 0x71, 0x90, 0x11, 0x7f, 0x0c, 0x54, 0x97, 0x36, 0x76, 0x5c, 0x7b, 0xaf, /* Byte value: 0xe8 */ + 0x54, 0xc2, 0x8f, 0xd0, 0x47, 0xb2, 0xfc, 0x3a, 0x2f, 0xa3, 0x6d, 0x4a, 0x98, 0x28, 0x9e, 0x5a, /* Byte value: 0xe9 */ + 0x86, 0x5f, 0x2a, 0xf2, 0xbe, 0x40, 0x49, 0x07, 0xc7, 0x91, 0xfd, 0x18, 0x03, 0xaa, 0xfb, 0x5c, /* Byte value: 0xea */ + 0x93, 0x8e, 0x79, 0xc6, 0xdf, 0x8d, 0x76, 0xe8, 0xbc, 0xc9, 0x77, 0xeb, 0x25, 0xa0, 0x3d, 0xab, /* Byte value: 0xeb */ + 0x5a, 0x94, 0xb5, 0x85, 0xeb, 0xec, 0xee, 0xbf, 0x48, 0xde, 0xc6, 0xc7, 0xc1, 0xae, 0x87, 0x55, /* Byte value: 0xec */ + 0x3d, 0x6d, 0x3c, 0xc1, 0xda, 0xcb, 0x47, 0xc5, 0x5b, 0xba, 0x25, 0x63, 0x34, 0x69, 0x4d, 0x59, /* Byte value: 0xed */ + 0x94, 0xa5, 0x64, 0x0d, 0x89, 0xa2, 0x7f, 0x4b, 0x6e, 0x16, 0xc3, 0x4c, 0xe8, 0xe3, 0xd0, 0x4d, /* Byte value: 0xee */ + 0x56, 0x1f, 0x46, 0x4d, 0x3e, 0xed, 0xfa, 0x0d, 0xf9, 0xf1, 0x15, 0xff, 0xc6, 0x5f, 0x5a, 0xd9, /* Byte value: 0xef */ + 0xbf, 0x4b, 0x47, 0xca, 0x96, 0x35, 0x02, 0xac, 0xf3, 0x8f, 0x28, 0xd2, 0x8b, 0x2d, 0xfd, 0xc0, /* Byte value: 0xf0 */ + 0x95, 0x2a, 0xe1, 0xa2, 0x54, 0x6c, 0x7c, 0xb1, 0x05, 0x3f, 0xff, 0xf7, 0xc7, 0x39, 0xb2, 0xed, /* Byte value: 0xf1 */ + 0xb9, 0xef, 0xdf, 0xae, 0x1d, 0xd4, 0x08, 0xf5, 0x4a, 0x79, 0xa0, 0xce, 0x69, 0xb4, 0x72, 0x86, /* Byte value: 0xf2 */ + 0x11, 0xa8, 0x02, 0xcd, 0x93, 0x73, 0x33, 0x81, 0x14, 0xfc, 0x7a, 0x5a, 0x9a, 0xe4, 0x8d, 0x32, /* Byte value: 0xf3 */ + 0x0b, 0xa0, 0xee, 0x03, 0x83, 0x2e, 0x1d, 0x11, 0x63, 0xf0, 0x67, 0x9f, 0xca, 0xb2, 0x30, 0x6a, /* Byte value: 0xf4 */ + 0x71, 0x7a, 0x96, 0x42, 0xf4, 0x7b, 0x93, 0x58, 0xd5, 0x47, 0x2d, 0x59, 0xa2, 0x60, 0xaa, 0xd8, /* Byte value: 0xf5 */ + 0xb0, 0x92, 0xf8, 0x30, 0xe7, 0xa5, 0x13, 0xd3, 0xff, 0xdb, 0xbf, 0xe4, 0xfd, 0x71, 0x86, 0x6f, /* Byte value: 0xf6 */ + 0x1c, 0xac, 0x74, 0xaa, 0x9b, 0xbc, 0x24, 0xc9, 0xce, 0xfa, 0x95, 0xd9, 0xb2, 0xcf, 0x32, 0x1e, /* Byte value: 0xf7 */ + 0xdc, 0xcb, 0x9f, 0x77, 0x55, 0xac, 0xa7, 0xb8, 0x8f, 0x4f, 0x3b, 0xdf, 0xc2, 0x04, 0x7c, 0x09, /* Byte value: 0xf8 */ + 0xa8, 0x47, 0xdd, 0x63, 0x8e, 0xa7, 0x3b, 0x74, 0x5e, 0x85, 0xda, 0x94, 0xf3, 0x50, 0xff, 0xb4, /* Byte value: 0xf9 */ + 0xc1, 0xe8, 0x6e, 0x72, 0x13, 0xde, 0x80, 0x8b, 0x2a, 0x9c, 0x92, 0xbd, 0x5f, 0x11, 0x2c, 0xb7, /* Byte value: 0xfa */ + 0x2a, 0x61, 0xa6, 0x68, 0xc2, 0x59, 0x7e, 0x1d, 0xf6, 0xb0, 0xd7, 0x25, 0x4c, 0x14, 0x4f, 0x2d, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0xac, 0x3e, 0x8c, 0x9a, 0x7c, 0x19, 0x37, 0x1a, 0x31, 0x21, 0x2a, 0x3d, 0x4f, 0xbe, 0xb4, 0x71, /* Byte value: 0xfd */ + 0x48, 0x6e, 0xfb, 0x7a, 0xdc, 0x0e, 0xd8, 0xf3, 0xe1, 0x59, 0xf8, 0x93, 0x2a, 0xe7, 0xac, 0x44, /* Byte value: 0xfe */ + 0x7a, 0xda, 0x78, 0x41, 0x77, 0x55, 0x8e, 0x49, 0xb6, 0xb7, 0x4a, 0xc6, 0x68, 0xd2, 0x9a, 0xb2, /* Byte value: 0xff */ + + /* Matrix row: 2 */ + 0x47, 0x35, 0xef, 0xb5, 0xef, 0xef, 0x30, 0xe6, 0xaf, 0xa0, 0x89, 0x86, 0x13, 0x85, 0x5f, 0xe6, /* Byte value: 0x00 */ + 0xe9, 0x63, 0xba, 0xe4, 0xba, 0xba, 0x98, 0x67, 0x18, 0xd6, 0x5a, 0x94, 0x21, 0x7c, 0xa5, 0x67, /* Byte value: 0x01 */ + 0x8f, 0xb2, 0x8e, 0xde, 0x8e, 0x8e, 0xf7, 0x86, 0xb8, 0x77, 0x64, 0xab, 0x6e, 0x29, 0x15, 0x86, /* Byte value: 0x02 */ + 0x4e, 0xe2, 0x6e, 0xfc, 0x6e, 0x6e, 0x95, 0xad, 0x61, 0xf8, 0xdd, 0x44, 0x5e, 0x69, 0xe5, 0xad, /* Byte value: 0x03 */ + 0x03, 0xab, 0x76, 0x99, 0x76, 0x76, 0x7a, 0x58, 0x6f, 0xdf, 0x1c, 0xac, 0xd8, 0xe3, 0x3e, 0x58, /* Byte value: 0x04 */ + 0xcf, 0xca, 0x1e, 0xed, 0x1e, 0x1e, 0xa4, 0x59, 0xec, 0x5e, 0x60, 0xd2, 0x46, 0x49, 0x9d, 0x59, /* Byte value: 0x05 */ + 0x0c, 0xe9, 0x1b, 0x21, 0x1b, 0x1b, 0x2b, 0xa3, 0x7f, 0xfa, 0x70, 0xf5, 0xe6, 0x0a, 0xf8, 0xa3, /* Byte value: 0x06 */ + 0xba, 0xae, 0x78, 0x32, 0x78, 0x78, 0xd5, 0xa7, 0x36, 0xbb, 0x43, 0xce, 0xdb, 0xe7, 0x31, 0xa7, /* Byte value: 0x07 */ + 0x12, 0x6d, 0xc1, 0x92, 0xc1, 0xc1, 0x89, 0x96, 0x5f, 0xb0, 0xa8, 0x47, 0x9a, 0x1b, 0xb7, 0x96, /* Byte value: 0x08 */ + 0xf0, 0xaa, 0x1f, 0xd1, 0x1f, 0x1f, 0x59, 0x6b, 0xc3, 0x15, 0x0f, 0xd9, 0x66, 0x88, 0x3d, 0x6b, /* Byte value: 0x09 */ + 0x2b, 0x98, 0x2c, 0x5f, 0x2c, 0x2c, 0x80, 0x14, 0xae, 0x86, 0xff, 0xd7, 0xc9, 0xdf, 0x6b, 0x14, /* Byte value: 0x0a */ + 0x2c, 0xd5, 0x53, 0xd9, 0x53, 0x53, 0xe3, 0x2d, 0x55, 0x0f, 0x72, 0x28, 0xf2, 0x3a, 0xbc, 0x2d, /* Byte value: 0x0b */ + 0x32, 0x51, 0x89, 0x6a, 0x89, 0x89, 0x41, 0x18, 0x75, 0x45, 0xaa, 0x9a, 0x8e, 0x2b, 0xf3, 0x18, /* Byte value: 0x0c */ + 0x1b, 0xba, 0x40, 0xdb, 0x40, 0x40, 0x2c, 0xdd, 0x91, 0xe8, 0xfc, 0x85, 0xd7, 0xf7, 0x0d, 0xdd, /* Byte value: 0x0d */ + 0xd2, 0xe5, 0xb2, 0xc7, 0xb2, 0xb2, 0x7c, 0x34, 0xa3, 0xcb, 0xa4, 0xcc, 0xe2, 0xbb, 0xec, 0x34, /* Byte value: 0x0e */ + 0x08, 0x0f, 0x12, 0x3e, 0x12, 0x12, 0x32, 0xc2, 0xeb, 0xac, 0xe1, 0xa6, 0x05, 0x0c, 0x11, 0xc2, /* Byte value: 0x0f */ + 0xdd, 0xa7, 0xdf, 0x7f, 0xdf, 0xdf, 0x2d, 0xcf, 0xb3, 0xee, 0xc8, 0x95, 0xdc, 0x52, 0x2a, 0xcf, /* Byte value: 0x10 */ + 0x60, 0x44, 0xd8, 0xcb, 0xd8, 0xd8, 0x9b, 0x51, 0x7e, 0xdc, 0x06, 0xa4, 0x3c, 0x50, 0xcc, 0x51, /* Byte value: 0x11 */ + 0x72, 0x29, 0x19, 0x59, 0x19, 0x19, 0x12, 0xc7, 0x21, 0x6c, 0xae, 0xe3, 0xa6, 0x4b, 0x7b, 0xc7, /* Byte value: 0x12 */ + 0x11, 0xc6, 0xb7, 0x0b, 0xb7, 0xb7, 0xf3, 0xce, 0x30, 0x6f, 0xb4, 0xeb, 0x42, 0xf8, 0x89, 0xce, /* Byte value: 0x13 */ + 0x06, 0x95, 0xec, 0xf1, 0xec, 0xec, 0xf4, 0xb0, 0xde, 0x7d, 0x38, 0x9b, 0x73, 0x05, 0x7c, 0xb0, /* Byte value: 0x14 */ + 0x5d, 0x57, 0x3c, 0x19, 0x3c, 0x3c, 0x8b, 0xb2, 0x1b, 0xbc, 0xc0, 0x67, 0x8c, 0x92, 0xf9, 0xb2, /* Byte value: 0x15 */ + 0xe0, 0xb4, 0x3b, 0xad, 0x3b, 0x3b, 0x3d, 0x2c, 0xd6, 0x8e, 0x0e, 0x56, 0x6c, 0x90, 0x1f, 0x2c, /* Byte value: 0x16 */ + 0x86, 0x65, 0x0f, 0x97, 0x0f, 0x0f, 0x52, 0xcd, 0x76, 0x2f, 0x30, 0x69, 0x23, 0xc5, 0xaf, 0xcd, /* Byte value: 0x17 */ + 0xaa, 0xb0, 0x5c, 0x4e, 0x5c, 0x5c, 0xb1, 0xe0, 0x23, 0x20, 0x42, 0x41, 0xd1, 0xff, 0x13, 0xe0, /* Byte value: 0x18 */ + 0x58, 0x69, 0xa6, 0x71, 0xa6, 0xa6, 0x05, 0x5a, 0xaa, 0x1e, 0xe4, 0x50, 0x27, 0x74, 0xbb, 0x5a, /* Byte value: 0x19 */ + 0x24, 0xda, 0x41, 0xe7, 0x41, 0x41, 0xd1, 0xef, 0xbe, 0xa3, 0x93, 0x8e, 0xf7, 0x36, 0xad, 0xef, /* Byte value: 0x1a */ + 0xdf, 0xd4, 0x3a, 0x91, 0x3a, 0x3a, 0xc0, 0x1e, 0xf9, 0xc5, 0x61, 0x5d, 0x4c, 0x51, 0xbf, 0x1e, /* Byte value: 0x1b */ + 0x69, 0x93, 0x59, 0x82, 0x59, 0x59, 0x3e, 0x1a, 0xb0, 0x84, 0x52, 0x66, 0x71, 0xbc, 0x76, 0x1a, /* Byte value: 0x1c */ + 0x7a, 0x26, 0x0b, 0x67, 0x0b, 0x0b, 0x20, 0x05, 0xca, 0xc0, 0x4f, 0x45, 0xa3, 0x47, 0x6a, 0x05, /* Byte value: 0x1d */ + 0x67, 0x09, 0xa7, 0x4d, 0xa7, 0xa7, 0xf8, 0x68, 0x85, 0x55, 0x8b, 0x5b, 0x07, 0xb5, 0x1b, 0x68, /* Byte value: 0x1e */ + 0xec, 0x5d, 0x20, 0x8c, 0x20, 0x20, 0x16, 0x8f, 0xa9, 0x74, 0x7e, 0xa3, 0x8a, 0x9a, 0xe7, 0x8f, /* Byte value: 0x1f */ + 0x30, 0x22, 0x6c, 0x84, 0x6c, 0x6c, 0xac, 0xc9, 0x3f, 0x6e, 0x03, 0x52, 0x1e, 0x28, 0x66, 0xc9, /* Byte value: 0x20 */ + 0x6a, 0x38, 0x2f, 0x1b, 0x2f, 0x2f, 0x44, 0x42, 0xdf, 0x5b, 0x4e, 0xca, 0xa9, 0x5f, 0x48, 0x42, /* Byte value: 0x21 */ + 0x0e, 0x9a, 0xfe, 0xcf, 0xfe, 0xfe, 0xc6, 0x72, 0x35, 0xd1, 0xd9, 0x3d, 0x76, 0x09, 0x6d, 0x72, /* Byte value: 0x22 */ + 0x43, 0xd3, 0xe6, 0xaa, 0xe6, 0xe6, 0x29, 0x87, 0x3b, 0xf6, 0x18, 0xd5, 0xf0, 0x83, 0xb6, 0x87, /* Byte value: 0x23 */ + 0x2d, 0x0d, 0xc0, 0xae, 0xc0, 0xc0, 0x74, 0xa4, 0x70, 0xfb, 0xc7, 0x4c, 0xba, 0xda, 0x17, 0xa4, /* Byte value: 0x24 */ + 0xb3, 0x79, 0xf9, 0x7b, 0xf9, 0xf9, 0x70, 0xec, 0xf8, 0xe3, 0x17, 0x0c, 0x96, 0x0b, 0x8b, 0xec, /* Byte value: 0x25 */ + 0xe4, 0x52, 0x32, 0xb2, 0x32, 0x32, 0x24, 0x4d, 0x42, 0xd8, 0x9f, 0x05, 0x8f, 0x96, 0xf6, 0x4d, /* Byte value: 0x26 */ + 0x22, 0x4f, 0xad, 0x16, 0xad, 0xad, 0x25, 0x5f, 0x60, 0xde, 0xab, 0x15, 0x84, 0x33, 0xd1, 0x5f, /* Byte value: 0x27 */ + 0xab, 0x68, 0xcf, 0x39, 0xcf, 0xcf, 0x26, 0x69, 0x06, 0xd4, 0xf7, 0x25, 0x99, 0x1f, 0xb8, 0x69, /* Byte value: 0x28 */ + 0x3d, 0x13, 0xe4, 0xd2, 0xe4, 0xe4, 0x10, 0xe3, 0x65, 0x60, 0xc6, 0xc3, 0xb0, 0xc2, 0x35, 0xe3, /* Byte value: 0x29 */ + 0x34, 0xc4, 0x65, 0x9b, 0x65, 0x65, 0xb5, 0xa8, 0xab, 0x38, 0x92, 0x01, 0xfd, 0x2e, 0x8f, 0xa8, /* Byte value: 0x2a */ + 0x90, 0xee, 0xc7, 0x1a, 0xc7, 0xc7, 0xc2, 0x3a, 0xbd, 0xc9, 0x09, 0x7d, 0x5a, 0xd8, 0xf1, 0x3a, /* Byte value: 0x2b */ + 0x97, 0xa3, 0xb8, 0x9c, 0xb8, 0xb8, 0xa1, 0x03, 0x46, 0x40, 0x84, 0x82, 0x61, 0x3d, 0x26, 0x03, /* Byte value: 0x2c */ + 0xb0, 0xd2, 0x8f, 0xe2, 0x8f, 0x8f, 0x0a, 0xb4, 0x97, 0x3c, 0x0b, 0xa0, 0x4e, 0xe8, 0xb5, 0xb4, /* Byte value: 0x2d */ + 0xe5, 0x8a, 0xa1, 0xc5, 0xa1, 0xa1, 0xb3, 0xc4, 0x67, 0x2c, 0x2a, 0x61, 0xc7, 0x76, 0x5d, 0xc4, /* Byte value: 0x2e */ + 0x42, 0x0b, 0x75, 0xdd, 0x75, 0x75, 0xbe, 0x0e, 0x1e, 0x02, 0xad, 0xb1, 0xb8, 0x63, 0x1d, 0x0e, /* Byte value: 0x2f */ + 0x79, 0x8d, 0x7d, 0xfe, 0x7d, 0x7d, 0x5a, 0x5d, 0xa5, 0x1f, 0x53, 0xe9, 0x7b, 0xa4, 0x54, 0x5d, /* Byte value: 0x30 */ + 0xc0, 0x88, 0x73, 0x55, 0x73, 0x73, 0xf5, 0xa2, 0xfc, 0x7b, 0x0c, 0x8b, 0x78, 0xa0, 0x5b, 0xa2, /* Byte value: 0x31 */ + 0x18, 0x11, 0x36, 0x42, 0x36, 0x36, 0x56, 0x85, 0xfe, 0x37, 0xe0, 0x29, 0x0f, 0x14, 0x33, 0x85, /* Byte value: 0x32 */ + 0x4b, 0xdc, 0xf4, 0x94, 0xf4, 0xf4, 0x1b, 0x45, 0xd0, 0x5a, 0xf9, 0x73, 0xf5, 0x8f, 0xa7, 0x45, /* Byte value: 0x33 */ + 0xf7, 0xe7, 0x60, 0x57, 0x60, 0x60, 0x3a, 0x52, 0x38, 0x9c, 0x82, 0x26, 0x5d, 0x6d, 0xea, 0x52, /* Byte value: 0x34 */ + 0xb8, 0xdd, 0x9d, 0xdc, 0x9d, 0x9d, 0x38, 0x76, 0x7c, 0x90, 0xea, 0x06, 0x4b, 0xe4, 0xa4, 0x76, /* Byte value: 0x35 */ + 0xa6, 0x59, 0x47, 0x6f, 0x47, 0x47, 0x9a, 0x43, 0x5c, 0xda, 0x32, 0xb4, 0x37, 0xf5, 0xeb, 0x43, /* Byte value: 0x36 */ + 0x59, 0xb1, 0x35, 0x06, 0x35, 0x35, 0x92, 0xd3, 0x8f, 0xea, 0x51, 0x34, 0x6f, 0x94, 0x10, 0xd3, /* Byte value: 0x37 */ + 0x64, 0xa2, 0xd1, 0xd4, 0xd1, 0xd1, 0x82, 0x30, 0xea, 0x8a, 0x97, 0xf7, 0xdf, 0x56, 0x25, 0x30, /* Byte value: 0x38 */ + 0x36, 0xb7, 0x80, 0x75, 0x80, 0x80, 0x58, 0x79, 0xe1, 0x13, 0x3b, 0xc9, 0x6d, 0x2d, 0x1a, 0x79, /* Byte value: 0x39 */ + 0xb4, 0x34, 0x86, 0xfd, 0x86, 0x86, 0x13, 0xd5, 0x03, 0x6a, 0x9a, 0xf3, 0xad, 0xee, 0x5c, 0xd5, /* Byte value: 0x3a */ + 0x81, 0x28, 0x70, 0x11, 0x70, 0x70, 0x31, 0xf4, 0x8d, 0xa6, 0xbd, 0x96, 0x18, 0x20, 0x78, 0xf4, /* Byte value: 0x3b */ + 0x09, 0xd7, 0x81, 0x49, 0x81, 0x81, 0xa5, 0x4b, 0xce, 0x58, 0x54, 0xc2, 0x4d, 0xec, 0xba, 0x4b, /* Byte value: 0x3c */ + 0x78, 0x55, 0xee, 0x89, 0xee, 0xee, 0xcd, 0xd4, 0x80, 0xeb, 0xe6, 0x8d, 0x33, 0x44, 0xff, 0xd4, /* Byte value: 0x3d */ + 0xed, 0x85, 0xb3, 0xfb, 0xb3, 0xb3, 0x81, 0x06, 0x8c, 0x80, 0xcb, 0xc7, 0xc2, 0x7a, 0x4c, 0x06, /* Byte value: 0x3e */ + 0x5f, 0x24, 0xd9, 0xf7, 0xd9, 0xd9, 0x66, 0x63, 0x51, 0x97, 0x69, 0xaf, 0x1c, 0x91, 0x6c, 0x63, /* Byte value: 0x3f */ + 0xda, 0xea, 0xa0, 0xf9, 0xa0, 0xa0, 0x4e, 0xf6, 0x48, 0x67, 0x45, 0x6a, 0xe7, 0xb7, 0xfd, 0xf6, /* Byte value: 0x40 */ + 0xc4, 0x6e, 0x7a, 0x4a, 0x7a, 0x7a, 0xec, 0xc3, 0x68, 0x2d, 0x9d, 0xd8, 0x9b, 0xa6, 0xb2, 0xc3, /* Byte value: 0x41 */ + 0x29, 0xeb, 0xc9, 0xb1, 0xc9, 0xc9, 0x6d, 0xc5, 0xe4, 0xad, 0x56, 0x1f, 0x59, 0xdc, 0xfe, 0xc5, /* Byte value: 0x42 */ + 0xad, 0xfd, 0x23, 0xc8, 0x23, 0x23, 0xd2, 0xd9, 0xd8, 0xa9, 0xcf, 0xbe, 0xea, 0x1a, 0xc4, 0xd9, /* Byte value: 0x43 */ + 0x07, 0x4d, 0x7f, 0x86, 0x7f, 0x7f, 0x63, 0x39, 0xfb, 0x89, 0x8d, 0xff, 0x3b, 0xe5, 0xd7, 0x39, /* Byte value: 0x44 */ + 0x82, 0x83, 0x06, 0x88, 0x06, 0x06, 0x4b, 0xac, 0xe2, 0x79, 0xa1, 0x3a, 0xc0, 0xc3, 0x46, 0xac, /* Byte value: 0x45 */ + 0xe2, 0xc7, 0xde, 0x43, 0xde, 0xde, 0xd0, 0xfd, 0x9c, 0xa5, 0xa7, 0x9e, 0xfc, 0x93, 0x8a, 0xfd, /* Byte value: 0x46 */ + 0x31, 0xfa, 0xff, 0xf3, 0xff, 0xff, 0x3b, 0x40, 0x1a, 0x9a, 0xb6, 0x36, 0x56, 0xc8, 0xcd, 0x40, /* Byte value: 0x47 */ + 0x17, 0x53, 0x5b, 0xfa, 0x5b, 0x5b, 0x07, 0x7e, 0xee, 0x12, 0x8c, 0x70, 0x31, 0xfd, 0xf5, 0x7e, /* Byte value: 0x48 */ + 0x9f, 0xac, 0xaa, 0xa2, 0xaa, 0xaa, 0x93, 0xc1, 0xad, 0xec, 0x65, 0x24, 0x64, 0x31, 0x37, 0xc1, /* Byte value: 0x49 */ + 0x0b, 0xa4, 0x64, 0xa7, 0x64, 0x64, 0x48, 0x9a, 0x84, 0x73, 0xfd, 0x0a, 0xdd, 0xef, 0x2f, 0x9a, /* Byte value: 0x4a */ + 0x16, 0x8b, 0xc8, 0x8d, 0xc8, 0xc8, 0x90, 0xf7, 0xcb, 0xe6, 0x39, 0x14, 0x79, 0x1d, 0x5e, 0xf7, /* Byte value: 0x4b */ + 0x7f, 0x18, 0x91, 0x0f, 0x91, 0x91, 0xae, 0xed, 0x7b, 0x62, 0x6b, 0x72, 0x08, 0xa1, 0x28, 0xed, /* Byte value: 0x4c */ + 0x23, 0x97, 0x3e, 0x61, 0x3e, 0x3e, 0xb2, 0xd6, 0x45, 0x2a, 0x1e, 0x71, 0xcc, 0xd3, 0x7a, 0xd6, /* Byte value: 0x4d */ + 0x6b, 0xe0, 0xbc, 0x6c, 0xbc, 0xbc, 0xd3, 0xcb, 0xfa, 0xaf, 0xfb, 0xae, 0xe1, 0xbf, 0xe3, 0xcb, /* Byte value: 0x4e */ + 0xa9, 0x1b, 0x2a, 0xd7, 0x2a, 0x2a, 0xcb, 0xb8, 0x4c, 0xff, 0x5e, 0xed, 0x09, 0x1c, 0x2d, 0xb8, /* Byte value: 0x4f */ + 0x8b, 0x54, 0x87, 0xc1, 0x87, 0x87, 0xee, 0xe7, 0x2c, 0x21, 0xf5, 0xf8, 0x8d, 0x2f, 0xfc, 0xe7, /* Byte value: 0x50 */ + 0xb7, 0x9f, 0xf0, 0x64, 0xf0, 0xf0, 0x69, 0x8d, 0x6c, 0xb5, 0x86, 0x5f, 0x75, 0x0d, 0x62, 0x8d, /* Byte value: 0x51 */ + 0x13, 0xb5, 0x52, 0xe5, 0x52, 0x52, 0x1e, 0x1f, 0x7a, 0x44, 0x1d, 0x23, 0xd2, 0xfb, 0x1c, 0x1f, /* Byte value: 0x52 */ + 0x1c, 0xf7, 0x3f, 0x5d, 0x3f, 0x3f, 0x4f, 0xe4, 0x6a, 0x61, 0x71, 0x7a, 0xec, 0x12, 0xda, 0xe4, /* Byte value: 0x53 */ + 0xfb, 0x0e, 0x7b, 0x76, 0x7b, 0x7b, 0x11, 0xf1, 0x47, 0x66, 0xf2, 0xd3, 0xbb, 0x67, 0x12, 0xf1, /* Byte value: 0x54 */ + 0x62, 0x37, 0x3d, 0x25, 0x3d, 0x3d, 0x76, 0x80, 0x34, 0xf7, 0xaf, 0x6c, 0xac, 0x53, 0x59, 0x80, /* Byte value: 0x55 */ + 0xf2, 0xd9, 0xfa, 0x3f, 0xfa, 0xfa, 0xb4, 0xba, 0x89, 0x3e, 0xa6, 0x11, 0xf6, 0x8b, 0xa8, 0xba, /* Byte value: 0x56 */ + 0x3b, 0x86, 0x08, 0x23, 0x08, 0x08, 0xe4, 0x53, 0xbb, 0x1d, 0xfe, 0x58, 0xc3, 0xc7, 0x49, 0x53, /* Byte value: 0x57 */ + 0x9a, 0x92, 0x30, 0xca, 0x30, 0x30, 0x1d, 0x29, 0x1c, 0x4e, 0x41, 0x13, 0xcf, 0xd7, 0x75, 0x29, /* Byte value: 0x58 */ + 0x75, 0x64, 0x66, 0xdf, 0x66, 0x66, 0x71, 0xfe, 0xda, 0xe5, 0x23, 0x1c, 0x9d, 0xae, 0xac, 0xfe, /* Byte value: 0x59 */ + 0xea, 0xc8, 0xcc, 0x7d, 0xcc, 0xcc, 0xe2, 0x3f, 0x77, 0x09, 0x46, 0x38, 0xf9, 0x9f, 0x9b, 0x3f, /* Byte value: 0x5a */ + 0xd0, 0x96, 0x57, 0x29, 0x57, 0x57, 0x91, 0xe5, 0xe9, 0xe0, 0x0d, 0x04, 0x72, 0xb8, 0x79, 0xe5, /* Byte value: 0x5b */ + 0x2a, 0x40, 0xbf, 0x28, 0xbf, 0xbf, 0x17, 0x9d, 0x8b, 0x72, 0x4a, 0xb3, 0x81, 0x3f, 0xc0, 0x9d, /* Byte value: 0x5c */ + 0x91, 0x36, 0x54, 0x6d, 0x54, 0x54, 0x55, 0xb3, 0x98, 0x3d, 0xbc, 0x19, 0x12, 0x38, 0x5a, 0xb3, /* Byte value: 0x5d */ + 0x02, 0x73, 0xe5, 0xee, 0xe5, 0xe5, 0xed, 0xd1, 0x4a, 0x2b, 0xa9, 0xc8, 0x90, 0x03, 0x95, 0xd1, /* Byte value: 0x5e */ + 0x46, 0xed, 0x7c, 0xc2, 0x7c, 0x7c, 0xa7, 0x6f, 0x8a, 0x54, 0x3c, 0xe2, 0x5b, 0x65, 0xf4, 0x6f, /* Byte value: 0x5f */ + 0xa7, 0x81, 0xd4, 0x18, 0xd4, 0xd4, 0x0d, 0xca, 0x79, 0x2e, 0x87, 0xd0, 0x7f, 0x15, 0x40, 0xca, /* Byte value: 0x60 */ + 0xdc, 0x7f, 0x4c, 0x08, 0x4c, 0x4c, 0xba, 0x46, 0x96, 0x1a, 0x7d, 0xf1, 0x94, 0xb2, 0x81, 0x46, /* Byte value: 0x61 */ + 0x27, 0x71, 0x37, 0x7e, 0x37, 0x37, 0xab, 0xb7, 0xd1, 0x7c, 0x8f, 0x22, 0x2f, 0xd5, 0x93, 0xb7, /* Byte value: 0x62 */ + 0x76, 0xcf, 0x10, 0x46, 0x10, 0x10, 0x0b, 0xa6, 0xb5, 0x3a, 0x3f, 0xb0, 0x45, 0x4d, 0x92, 0xa6, /* Byte value: 0x63 */ + 0xa4, 0x2a, 0xa2, 0x81, 0xa2, 0xa2, 0x77, 0x92, 0x16, 0xf1, 0x9b, 0x7c, 0xa7, 0xf6, 0x7e, 0x92, /* Byte value: 0x64 */ + 0xca, 0xf4, 0x84, 0x85, 0x84, 0x84, 0x2a, 0xb1, 0x5d, 0xfc, 0x44, 0xe5, 0xed, 0xaf, 0xdf, 0xb1, /* Byte value: 0x65 */ + 0x96, 0x7b, 0x2b, 0xeb, 0x2b, 0x2b, 0x36, 0x8a, 0x63, 0xb4, 0x31, 0xe6, 0x29, 0xdd, 0x8d, 0x8a, /* Byte value: 0x66 */ + 0x70, 0x5a, 0xfc, 0xb7, 0xfc, 0xfc, 0xff, 0x16, 0x6b, 0x47, 0x07, 0x2b, 0x36, 0x48, 0xee, 0x16, /* Byte value: 0x67 */ + 0x54, 0x80, 0xbd, 0x50, 0xbd, 0xbd, 0x2e, 0xf9, 0xd5, 0xe4, 0x94, 0xa5, 0xc1, 0x7e, 0x43, 0xf9, /* Byte value: 0x68 */ + 0xe1, 0x6c, 0xa8, 0xda, 0xa8, 0xa8, 0xaa, 0xa5, 0xf3, 0x7a, 0xbb, 0x32, 0x24, 0x70, 0xb4, 0xa5, /* Byte value: 0x69 */ + 0x6f, 0x06, 0xb5, 0x73, 0xb5, 0xb5, 0xca, 0xaa, 0x6e, 0xf9, 0x6a, 0xfd, 0x02, 0xb9, 0x0a, 0xaa, /* Byte value: 0x6a */ + 0x39, 0xf5, 0xed, 0xcd, 0xed, 0xed, 0x09, 0x82, 0xf1, 0x36, 0x57, 0x90, 0x53, 0xc4, 0xdc, 0x82, /* Byte value: 0x6b */ + 0x33, 0x89, 0x1a, 0x1d, 0x1a, 0x1a, 0xd6, 0x91, 0x50, 0xb1, 0x1f, 0xfe, 0xc6, 0xcb, 0x58, 0x91, /* Byte value: 0x6c */ + 0xdb, 0x32, 0x33, 0x8e, 0x33, 0x33, 0xd9, 0x7f, 0x6d, 0x93, 0xf0, 0x0e, 0xaf, 0x57, 0x56, 0x7f, /* Byte value: 0x6d */ + 0xa0, 0xcc, 0xab, 0x9e, 0xab, 0xab, 0x6e, 0xf3, 0x82, 0xa7, 0x0a, 0x2f, 0x44, 0xf0, 0x97, 0xf3, /* Byte value: 0x6e */ + 0xfe, 0x30, 0xe1, 0x1e, 0xe1, 0xe1, 0x9f, 0x19, 0xf6, 0xc4, 0xd6, 0xe4, 0x10, 0x81, 0x50, 0x19, /* Byte value: 0x6f */ + 0xb2, 0xa1, 0x6a, 0x0c, 0x6a, 0x6a, 0xe7, 0x65, 0xdd, 0x17, 0xa2, 0x68, 0xde, 0xeb, 0x20, 0x65, /* Byte value: 0x70 */ + 0x10, 0x1e, 0x24, 0x7c, 0x24, 0x24, 0x64, 0x47, 0x15, 0x9b, 0x01, 0x8f, 0x0a, 0x18, 0x22, 0x47, /* Byte value: 0x71 */ + 0x71, 0x82, 0x6f, 0xc0, 0x6f, 0x6f, 0x68, 0x9f, 0x4e, 0xb3, 0xb2, 0x4f, 0x7e, 0xa8, 0x45, 0x9f, /* Byte value: 0x72 */ + 0x87, 0xbd, 0x9c, 0xe0, 0x9c, 0x9c, 0xc5, 0x44, 0x53, 0xdb, 0x85, 0x0d, 0x6b, 0x25, 0x04, 0x44, /* Byte value: 0x73 */ + 0x35, 0x1c, 0xf6, 0xec, 0xf6, 0xf6, 0x22, 0x21, 0x8e, 0xcc, 0x27, 0x65, 0xb5, 0xce, 0x24, 0x21, /* Byte value: 0x74 */ + 0x38, 0x2d, 0x7e, 0xba, 0x7e, 0x7e, 0x9e, 0x0b, 0xd4, 0xc2, 0xe2, 0xf4, 0x1b, 0x24, 0x77, 0x0b, /* Byte value: 0x75 */ + 0x52, 0x15, 0x51, 0xa1, 0x51, 0x51, 0xda, 0x49, 0x0b, 0x99, 0xac, 0x3e, 0xb2, 0x7b, 0x3f, 0x49, /* Byte value: 0x76 */ + 0x65, 0x7a, 0x42, 0xa3, 0x42, 0x42, 0x15, 0xb9, 0xcf, 0x7e, 0x22, 0x93, 0x97, 0xb6, 0x8e, 0xb9, /* Byte value: 0x77 */ + 0xde, 0x0c, 0xa9, 0xe6, 0xa9, 0xa9, 0x57, 0x97, 0xdc, 0x31, 0xd4, 0x39, 0x04, 0xb1, 0x14, 0x97, /* Byte value: 0x78 */ + 0x8e, 0x6a, 0x1d, 0xa9, 0x1d, 0x1d, 0x60, 0x0f, 0x9d, 0x83, 0xd1, 0xcf, 0x26, 0xc9, 0xbe, 0x0f, /* Byte value: 0x79 */ + 0xa8, 0xc3, 0xb9, 0xa0, 0xb9, 0xb9, 0x5c, 0x31, 0x69, 0x0b, 0xeb, 0x89, 0x41, 0xfc, 0x86, 0x31, /* Byte value: 0x7a */ + 0xfd, 0x9b, 0x97, 0x87, 0x97, 0x97, 0xe5, 0x41, 0x99, 0x1b, 0xca, 0x48, 0xc8, 0x62, 0x6e, 0x41, /* Byte value: 0x7b */ + 0x2e, 0xa6, 0xb6, 0x37, 0xb6, 0xb6, 0x0e, 0xfc, 0x1f, 0x24, 0xdb, 0xe0, 0x62, 0x39, 0x29, 0xfc, /* Byte value: 0x7c */ + 0x01, 0xd8, 0x93, 0x77, 0x93, 0x93, 0x97, 0x89, 0x25, 0xf4, 0xb5, 0x64, 0x48, 0xe0, 0xab, 0x89, /* Byte value: 0x7d */ + 0xf8, 0xa5, 0x0d, 0xef, 0x0d, 0x0d, 0x6b, 0xa9, 0x28, 0xb9, 0xee, 0x7f, 0x63, 0x84, 0x2c, 0xa9, /* Byte value: 0x7e */ + 0x8c, 0x19, 0xf8, 0x47, 0xf8, 0xf8, 0x8d, 0xde, 0xd7, 0xa8, 0x78, 0x07, 0xb6, 0xca, 0x2b, 0xde, /* Byte value: 0x7f */ + 0xbb, 0x76, 0xeb, 0x45, 0xeb, 0xeb, 0x42, 0x2e, 0x13, 0x4f, 0xf6, 0xaa, 0x93, 0x07, 0x9a, 0x2e, /* Byte value: 0x80 */ + 0x49, 0xaf, 0x11, 0x7a, 0x11, 0x11, 0xf6, 0x94, 0x9a, 0x71, 0x50, 0xbb, 0x65, 0x8c, 0x32, 0x94, /* Byte value: 0x81 */ + 0x44, 0x9e, 0x99, 0x2c, 0x99, 0x99, 0x4a, 0xbe, 0xc0, 0x7f, 0x95, 0x2a, 0xcb, 0x66, 0x61, 0xbe, /* Byte value: 0x82 */ + 0xbf, 0x90, 0xe2, 0x5a, 0xe2, 0xe2, 0x5b, 0x4f, 0x87, 0x19, 0x67, 0xf9, 0x70, 0x01, 0x73, 0x4f, /* Byte value: 0x83 */ + 0xef, 0xf6, 0x56, 0x15, 0x56, 0x56, 0x6c, 0xd7, 0xc6, 0xab, 0x62, 0x0f, 0x52, 0x79, 0xd9, 0xd7, /* Byte value: 0x84 */ + 0xfc, 0x43, 0x04, 0xf0, 0x04, 0x04, 0x72, 0xc8, 0xbc, 0xef, 0x7f, 0x2c, 0x80, 0x82, 0xc5, 0xc8, /* Byte value: 0x85 */ + 0x3a, 0x5e, 0x9b, 0x54, 0x9b, 0x9b, 0x73, 0xda, 0x9e, 0xe9, 0x4b, 0x3c, 0x8b, 0x27, 0xe2, 0xda, /* Byte value: 0x86 */ + 0xb1, 0x0a, 0x1c, 0x95, 0x1c, 0x1c, 0x9d, 0x3d, 0xb2, 0xc8, 0xbe, 0xc4, 0x06, 0x08, 0x1e, 0x3d, /* Byte value: 0x87 */ + 0xf9, 0x7d, 0x9e, 0x98, 0x9e, 0x9e, 0xfc, 0x20, 0x0d, 0x4d, 0x5b, 0x1b, 0x2b, 0x64, 0x87, 0x20, /* Byte value: 0x88 */ + 0x99, 0x39, 0x46, 0x53, 0x46, 0x46, 0x67, 0x71, 0x73, 0x91, 0x5d, 0xbf, 0x17, 0x34, 0x4b, 0x71, /* Byte value: 0x89 */ + 0xd8, 0x99, 0x45, 0x17, 0x45, 0x45, 0xa3, 0x27, 0x02, 0x4c, 0xec, 0xa2, 0x77, 0xb4, 0x68, 0x27, /* Byte value: 0x8a */ + 0xc9, 0x5f, 0xf2, 0x1c, 0xf2, 0xf2, 0x50, 0xe9, 0x32, 0x23, 0x58, 0x49, 0x35, 0x4c, 0xe1, 0xe9, /* Byte value: 0x8b */ + 0x61, 0x9c, 0x4b, 0xbc, 0x4b, 0x4b, 0x0c, 0xd8, 0x5b, 0x28, 0xb3, 0xc0, 0x74, 0xb0, 0x67, 0xd8, /* Byte value: 0x8c */ + 0x3c, 0xcb, 0x77, 0xa5, 0x77, 0x77, 0x87, 0x6a, 0x40, 0x94, 0x73, 0xa7, 0xf8, 0x22, 0x9e, 0x6a, /* Byte value: 0x8d */ + 0x89, 0x27, 0x62, 0x2f, 0x62, 0x62, 0x03, 0x36, 0x66, 0x0a, 0x5c, 0x30, 0x1d, 0x2c, 0x69, 0x36, /* Byte value: 0x8e */ + 0x0f, 0x42, 0x6d, 0xb8, 0x6d, 0x6d, 0x51, 0xfb, 0x10, 0x25, 0x6c, 0x59, 0x3e, 0xe9, 0xc6, 0xfb, /* Byte value: 0x8f */ + 0x5c, 0x8f, 0xaf, 0x6e, 0xaf, 0xaf, 0x1c, 0x3b, 0x3e, 0x48, 0x75, 0x03, 0xc4, 0x72, 0x52, 0x3b, /* Byte value: 0x90 */ + 0xbe, 0x48, 0x71, 0x2d, 0x71, 0x71, 0xcc, 0xc6, 0xa2, 0xed, 0xd2, 0x9d, 0x38, 0xe1, 0xd8, 0xc6, /* Byte value: 0x91 */ + 0xc2, 0xfb, 0x96, 0xbb, 0x96, 0x96, 0x18, 0x73, 0xb6, 0x50, 0xa5, 0x43, 0xe8, 0xa3, 0xce, 0x73, /* Byte value: 0x92 */ + 0xc5, 0xb6, 0xe9, 0x3d, 0xe9, 0xe9, 0x7b, 0x4a, 0x4d, 0xd9, 0x28, 0xbc, 0xd3, 0x46, 0x19, 0x4a, /* Byte value: 0x93 */ + 0x88, 0xff, 0xf1, 0x58, 0xf1, 0xf1, 0x94, 0xbf, 0x43, 0xfe, 0xe9, 0x54, 0x55, 0xcc, 0xc2, 0xbf, /* Byte value: 0x94 */ + 0xa1, 0x14, 0x38, 0xe9, 0x38, 0x38, 0xf9, 0x7a, 0xa7, 0x53, 0xbf, 0x4b, 0x0c, 0x10, 0x3c, 0x7a, /* Byte value: 0x95 */ + 0x1d, 0x2f, 0xac, 0x2a, 0xac, 0xac, 0xd8, 0x6d, 0x4f, 0x95, 0xc4, 0x1e, 0xa4, 0xf2, 0x71, 0x6d, /* Byte value: 0x96 */ + 0xc7, 0xc5, 0x0c, 0xd3, 0x0c, 0x0c, 0x96, 0x9b, 0x07, 0xf2, 0x81, 0x74, 0x43, 0x45, 0x8c, 0x9b, /* Byte value: 0x97 */ + 0x6c, 0xad, 0xc3, 0xea, 0xc3, 0xc3, 0xb0, 0xf2, 0x01, 0x26, 0x76, 0x51, 0xda, 0x5a, 0x34, 0xf2, /* Byte value: 0x98 */ + 0x85, 0xce, 0x79, 0x0e, 0x79, 0x79, 0x28, 0x95, 0x19, 0xf0, 0x2c, 0xc5, 0xfb, 0x26, 0x91, 0x95, /* Byte value: 0x99 */ + 0x9d, 0xdf, 0x4f, 0x4c, 0x4f, 0x4f, 0x7e, 0x10, 0xe7, 0xc7, 0xcc, 0xec, 0xf4, 0x32, 0xa2, 0x10, /* Byte value: 0x9a */ + 0xd3, 0x3d, 0x21, 0xb0, 0x21, 0x21, 0xeb, 0xbd, 0x86, 0x3f, 0x11, 0xa8, 0xaa, 0x5b, 0x47, 0xbd, /* Byte value: 0x9b */ + 0xd1, 0x4e, 0xc4, 0x5e, 0xc4, 0xc4, 0x06, 0x6c, 0xcc, 0x14, 0xb8, 0x60, 0x3a, 0x58, 0xd2, 0x6c, /* Byte value: 0x9c */ + 0x1e, 0x84, 0xda, 0xb3, 0xda, 0xda, 0xa2, 0x35, 0x20, 0x4a, 0xd8, 0xb2, 0x7c, 0x11, 0x4f, 0x35, /* Byte value: 0x9d */ + 0x3e, 0xb8, 0x92, 0x4b, 0x92, 0x92, 0x6a, 0xbb, 0x0a, 0xbf, 0xda, 0x6f, 0x68, 0x21, 0x0b, 0xbb, /* Byte value: 0x9e */ + 0x84, 0x16, 0xea, 0x79, 0xea, 0xea, 0xbf, 0x1c, 0x3c, 0x04, 0x99, 0xa1, 0xb3, 0xc6, 0x3a, 0x1c, /* Byte value: 0x9f */ + 0x2f, 0x7e, 0x25, 0x40, 0x25, 0x25, 0x99, 0x75, 0x3a, 0xd0, 0x6e, 0x84, 0x2a, 0xd9, 0x82, 0x75, /* Byte value: 0xa0 */ + 0x7d, 0x6b, 0x74, 0xe1, 0x74, 0x74, 0x43, 0x3c, 0x31, 0x49, 0xc2, 0xba, 0x98, 0xa2, 0xbd, 0x3c, /* Byte value: 0xa1 */ + 0x74, 0xbc, 0xf5, 0xa8, 0xf5, 0xf5, 0xe6, 0x77, 0xff, 0x11, 0x96, 0x78, 0xd5, 0x4e, 0x07, 0x77, /* Byte value: 0xa2 */ + 0x41, 0xa0, 0x03, 0x44, 0x03, 0x03, 0xc4, 0x56, 0x71, 0xdd, 0xb1, 0x1d, 0x60, 0x80, 0x23, 0x56, /* Byte value: 0xa3 */ + 0x50, 0x66, 0xb4, 0x4f, 0xb4, 0xb4, 0x37, 0x98, 0x41, 0xb2, 0x05, 0xf6, 0x22, 0x78, 0xaa, 0x98, /* Byte value: 0xa4 */ + 0x21, 0xe4, 0xdb, 0x8f, 0xdb, 0xdb, 0x5f, 0x07, 0x0f, 0x01, 0xb7, 0xb9, 0x5c, 0xd0, 0xef, 0x07, /* Byte value: 0xa5 */ + 0x55, 0x58, 0x2e, 0x27, 0x2e, 0x2e, 0xb9, 0x70, 0xf0, 0x10, 0x21, 0xc1, 0x89, 0x9e, 0xe8, 0x70, /* Byte value: 0xa6 */ + 0xe7, 0xf9, 0x44, 0x2b, 0x44, 0x44, 0x5e, 0x15, 0x2d, 0x07, 0x83, 0xa9, 0x57, 0x75, 0xc8, 0x15, /* Byte value: 0xa7 */ + 0xcd, 0xb9, 0xfb, 0x03, 0xfb, 0xfb, 0x49, 0x88, 0xa6, 0x75, 0xc9, 0x1a, 0xd6, 0x4a, 0x08, 0x88, /* Byte value: 0xa8 */ + 0x0d, 0x31, 0x88, 0x56, 0x88, 0x88, 0xbc, 0x2a, 0x5a, 0x0e, 0xc5, 0x91, 0xae, 0xea, 0x53, 0x2a, /* Byte value: 0xa9 */ + 0x7c, 0xb3, 0xe7, 0x96, 0xe7, 0xe7, 0xd4, 0xb5, 0x14, 0xbd, 0x77, 0xde, 0xd0, 0x42, 0x16, 0xb5, /* Byte value: 0xaa */ + 0x37, 0x6f, 0x13, 0x02, 0x13, 0x13, 0xcf, 0xf0, 0xc4, 0xe7, 0x8e, 0xad, 0x25, 0xcd, 0xb1, 0xf0, /* Byte value: 0xab */ + 0x1a, 0x62, 0xd3, 0xac, 0xd3, 0xd3, 0xbb, 0x54, 0xb4, 0x1c, 0x49, 0xe1, 0x9f, 0x17, 0xa6, 0x54, /* Byte value: 0xac */ + 0xa2, 0xbf, 0x4e, 0x70, 0x4e, 0x4e, 0x83, 0x22, 0xc8, 0x8c, 0xa3, 0xe7, 0xd4, 0xf3, 0x02, 0x22, /* Byte value: 0xad */ + 0xaf, 0x8e, 0xc6, 0x26, 0xc6, 0xc6, 0x3f, 0x08, 0x92, 0x82, 0x66, 0x76, 0x7a, 0x19, 0x51, 0x08, /* Byte value: 0xae */ + 0xf6, 0x3f, 0xf3, 0x20, 0xf3, 0xf3, 0xad, 0xdb, 0x1d, 0x68, 0x37, 0x42, 0x15, 0x8d, 0x41, 0xdb, /* Byte value: 0xaf */ + 0xe8, 0xbb, 0x29, 0x93, 0x29, 0x29, 0x0f, 0xee, 0x3d, 0x22, 0xef, 0xf0, 0x69, 0x9c, 0x0e, 0xee, /* Byte value: 0xb0 */ + 0x7e, 0xc0, 0x02, 0x78, 0x02, 0x02, 0x39, 0x64, 0x5e, 0x96, 0xde, 0x16, 0x40, 0x41, 0x83, 0x64, /* Byte value: 0xb1 */ + 0x5e, 0xfc, 0x4a, 0x80, 0x4a, 0x4a, 0xf1, 0xea, 0x74, 0x63, 0xdc, 0xcb, 0x54, 0x71, 0xc7, 0xea, /* Byte value: 0xb2 */ + 0xfa, 0xd6, 0xe8, 0x01, 0xe8, 0xe8, 0x86, 0x78, 0x62, 0x92, 0x47, 0xb7, 0xf3, 0x87, 0xb9, 0x78, /* Byte value: 0xb3 */ + 0xb5, 0xec, 0x15, 0x8a, 0x15, 0x15, 0x84, 0x5c, 0x26, 0x9e, 0x2f, 0x97, 0xe5, 0x0e, 0xf7, 0x5c, /* Byte value: 0xb4 */ + 0x92, 0x9d, 0x22, 0xf4, 0x22, 0x22, 0x2f, 0xeb, 0xf7, 0xe2, 0xa0, 0xb5, 0xca, 0xdb, 0x64, 0xeb, /* Byte value: 0xb5 */ + 0x56, 0xf3, 0x58, 0xbe, 0x58, 0x58, 0xc3, 0x28, 0x9f, 0xcf, 0x3d, 0x6d, 0x51, 0x7d, 0xd6, 0x28, /* Byte value: 0xb6 */ + 0xf1, 0x72, 0x8c, 0xa6, 0x8c, 0x8c, 0xce, 0xe2, 0xe6, 0xe1, 0xba, 0xbd, 0x2e, 0x68, 0x96, 0xe2, /* Byte value: 0xb7 */ + 0x04, 0xe6, 0x09, 0x1f, 0x09, 0x09, 0x19, 0x61, 0x94, 0x56, 0x91, 0x53, 0xe3, 0x06, 0xe9, 0x61, /* Byte value: 0xb8 */ + 0x6e, 0xde, 0x26, 0x04, 0x26, 0x26, 0x5d, 0x23, 0x4b, 0x0d, 0xdf, 0x99, 0x4a, 0x59, 0xa1, 0x23, /* Byte value: 0xb9 */ + 0xa5, 0xf2, 0x31, 0xf6, 0x31, 0x31, 0xe0, 0x1b, 0x33, 0x05, 0x2e, 0x18, 0xef, 0x16, 0xd5, 0x1b, /* Byte value: 0xba */ + 0xe6, 0x21, 0xd7, 0x5c, 0xd7, 0xd7, 0xc9, 0x9c, 0x08, 0xf3, 0x36, 0xcd, 0x1f, 0x95, 0x63, 0x9c, /* Byte value: 0xbb */ + 0xc8, 0x87, 0x61, 0x6b, 0x61, 0x61, 0xc7, 0x60, 0x17, 0xd7, 0xed, 0x2d, 0x7d, 0xac, 0x4a, 0x60, /* Byte value: 0xbc */ + 0x7b, 0xfe, 0x98, 0x10, 0x98, 0x98, 0xb7, 0x8c, 0xef, 0x34, 0xfa, 0x21, 0xeb, 0xa7, 0xc1, 0x8c, /* Byte value: 0xbd */ + 0x73, 0xf1, 0x8a, 0x2e, 0x8a, 0x8a, 0x85, 0x4e, 0x04, 0x98, 0x1b, 0x87, 0xee, 0xab, 0xd0, 0x4e, /* Byte value: 0xbe */ + 0x51, 0xbe, 0x27, 0x38, 0x27, 0x27, 0xa0, 0x11, 0x64, 0x46, 0xb0, 0x92, 0x6a, 0x98, 0x01, 0x11, /* Byte value: 0xbf */ + 0x95, 0xd0, 0x5d, 0x72, 0x5d, 0x5d, 0x4c, 0xd2, 0x0c, 0x6b, 0x2d, 0x4a, 0xf1, 0x3e, 0xb3, 0xd2, /* Byte value: 0xc0 */ + 0x66, 0xd1, 0x34, 0x3a, 0x34, 0x34, 0x6f, 0xe1, 0xa0, 0xa1, 0x3e, 0x3f, 0x4f, 0x55, 0xb0, 0xe1, /* Byte value: 0xc1 */ + 0xd6, 0x03, 0xbb, 0xd8, 0xbb, 0xbb, 0x65, 0x55, 0x37, 0x9d, 0x35, 0x9f, 0x01, 0xbd, 0x05, 0x55, /* Byte value: 0xc2 */ + 0x5b, 0xc2, 0xd0, 0xe8, 0xd0, 0xd0, 0x7f, 0x02, 0xc5, 0xc1, 0xf8, 0xfc, 0xff, 0x97, 0x85, 0x02, /* Byte value: 0xc3 */ + 0xe3, 0x1f, 0x4d, 0x34, 0x4d, 0x4d, 0x47, 0x74, 0xb9, 0x51, 0x12, 0xfa, 0xb4, 0x73, 0x21, 0x74, /* Byte value: 0xc4 */ + 0x63, 0xef, 0xae, 0x52, 0xae, 0xae, 0xe1, 0x09, 0x11, 0x03, 0x1a, 0x08, 0xe4, 0xb3, 0xf2, 0x09, /* Byte value: 0xc5 */ + 0x9b, 0x4a, 0xa3, 0xbd, 0xa3, 0xa3, 0x8a, 0xa0, 0x39, 0xba, 0xf4, 0x77, 0x87, 0x37, 0xde, 0xa0, /* Byte value: 0xc6 */ + 0xbd, 0xe3, 0x07, 0xb4, 0x07, 0x07, 0xb6, 0x9e, 0xcd, 0x32, 0xce, 0x31, 0xe0, 0x02, 0xe6, 0x9e, /* Byte value: 0xc7 */ + 0x77, 0x17, 0x83, 0x31, 0x83, 0x83, 0x9c, 0x2f, 0x90, 0xce, 0x8a, 0xd4, 0x0d, 0xad, 0x39, 0x2f, /* Byte value: 0xc8 */ + 0x8d, 0xc1, 0x6b, 0x30, 0x6b, 0x6b, 0x1a, 0x57, 0xf2, 0x5c, 0xcd, 0x63, 0xfe, 0x2a, 0x80, 0x57, /* Byte value: 0xc9 */ + 0xbc, 0x3b, 0x94, 0xc3, 0x94, 0x94, 0x21, 0x17, 0xe8, 0xc6, 0x7b, 0x55, 0xa8, 0xe2, 0x4d, 0x17, /* Byte value: 0xca */ + 0xf3, 0x01, 0x69, 0x48, 0x69, 0x69, 0x23, 0x33, 0xac, 0xca, 0x13, 0x75, 0xbe, 0x6b, 0x03, 0x33, /* Byte value: 0xcb */ + 0xf4, 0x4c, 0x16, 0xce, 0x16, 0x16, 0x40, 0x0a, 0x57, 0x43, 0x9e, 0x8a, 0x85, 0x8e, 0xd4, 0x0a, /* Byte value: 0xcc */ + 0x26, 0xa9, 0xa4, 0x09, 0xa4, 0xa4, 0x3c, 0x3e, 0xf4, 0x88, 0x3a, 0x46, 0x67, 0x35, 0x38, 0x3e, /* Byte value: 0xcd */ + 0xd4, 0x70, 0x5e, 0x36, 0x5e, 0x5e, 0x88, 0x84, 0x7d, 0xb6, 0x9c, 0x57, 0x91, 0xbe, 0x90, 0x84, /* Byte value: 0xce */ + 0x80, 0xf0, 0xe3, 0x66, 0xe3, 0xe3, 0xa6, 0x7d, 0xa8, 0x52, 0x08, 0xf2, 0x50, 0xc0, 0xd3, 0x7d, /* Byte value: 0xcf */ + 0x93, 0x45, 0xb1, 0x83, 0xb1, 0xb1, 0xb8, 0x62, 0xd2, 0x16, 0x15, 0xd1, 0x82, 0x3b, 0xcf, 0x62, /* Byte value: 0xd0 */ + 0xb6, 0x47, 0x63, 0x13, 0x63, 0x63, 0xfe, 0x04, 0x49, 0x41, 0x33, 0x3b, 0x3d, 0xed, 0xc9, 0x04, /* Byte value: 0xd1 */ + 0x15, 0x20, 0xbe, 0x14, 0xbe, 0xbe, 0xea, 0xaf, 0xa4, 0x39, 0x25, 0xb8, 0xa1, 0xfe, 0x60, 0xaf, /* Byte value: 0xd2 */ + 0xcc, 0x61, 0x68, 0x74, 0x68, 0x68, 0xde, 0x01, 0x83, 0x81, 0x7c, 0x7e, 0x9e, 0xaa, 0xa3, 0x01, /* Byte value: 0xd3 */ + 0xac, 0x25, 0xb0, 0xbf, 0xb0, 0xb0, 0x45, 0x50, 0xfd, 0x5d, 0x7a, 0xda, 0xa2, 0xfa, 0x6f, 0x50, /* Byte value: 0xd4 */ + 0xc1, 0x50, 0xe0, 0x22, 0xe0, 0xe0, 0x62, 0x2b, 0xd9, 0x8f, 0xb9, 0xef, 0x30, 0x40, 0xf0, 0x2b, /* Byte value: 0xd5 */ + 0xee, 0x2e, 0xc5, 0x62, 0xc5, 0xc5, 0xfb, 0x5e, 0xe3, 0x5f, 0xd7, 0x6b, 0x1a, 0x99, 0x72, 0x5e, /* Byte value: 0xd6 */ + 0xae, 0x56, 0x55, 0x51, 0x55, 0x55, 0xa8, 0x81, 0xb7, 0x76, 0xd3, 0x12, 0x32, 0xf9, 0xfa, 0x81, /* Byte value: 0xd7 */ + 0x9c, 0x07, 0xdc, 0x3b, 0xdc, 0xdc, 0xe9, 0x99, 0xc2, 0x33, 0x79, 0x88, 0xbc, 0xd2, 0x09, 0x99, /* Byte value: 0xd8 */ + 0xd9, 0x41, 0xd6, 0x60, 0xd6, 0xd6, 0x34, 0xae, 0x27, 0xb8, 0x59, 0xc6, 0x3f, 0x54, 0xc3, 0xae, /* Byte value: 0xd9 */ + 0xa3, 0x67, 0xdd, 0x07, 0xdd, 0xdd, 0x14, 0xab, 0xed, 0x78, 0x16, 0x83, 0x9c, 0x13, 0xa9, 0xab, /* Byte value: 0xda */ + 0x25, 0x02, 0xd2, 0x90, 0xd2, 0xd2, 0x46, 0x66, 0x9b, 0x57, 0x26, 0xea, 0xbf, 0xd6, 0x06, 0x66, /* Byte value: 0xdb */ + 0xeb, 0x10, 0x5f, 0x0a, 0x5f, 0x5f, 0x75, 0xb6, 0x52, 0xfd, 0xf3, 0x5c, 0xb1, 0x7f, 0x30, 0xb6, /* Byte value: 0xdc */ + 0x40, 0x78, 0x90, 0x33, 0x90, 0x90, 0x53, 0xdf, 0x54, 0x29, 0x04, 0x79, 0x28, 0x60, 0x88, 0xdf, /* Byte value: 0xdd */ + 0x48, 0x77, 0x82, 0x0d, 0x82, 0x82, 0x61, 0x1d, 0xbf, 0x85, 0xe5, 0xdf, 0x2d, 0x6c, 0x99, 0x1d, /* Byte value: 0xde */ + 0x6d, 0x75, 0x50, 0x9d, 0x50, 0x50, 0x27, 0x7b, 0x24, 0xd2, 0xc3, 0x35, 0x92, 0xba, 0x9f, 0x7b, /* Byte value: 0xdf */ + 0x28, 0x33, 0x5a, 0xc6, 0x5a, 0x5a, 0xfa, 0x4c, 0xc1, 0x59, 0xe3, 0x7b, 0x11, 0x3c, 0x55, 0x4c, /* Byte value: 0xe0 */ + 0xff, 0xe8, 0x72, 0x69, 0x72, 0x72, 0x08, 0x90, 0xd3, 0x30, 0x63, 0x80, 0x58, 0x61, 0xfb, 0x90, /* Byte value: 0xe1 */ + 0x0a, 0x7c, 0xf7, 0xd0, 0xf7, 0xf7, 0xdf, 0x13, 0xa1, 0x87, 0x48, 0x6e, 0x95, 0x0f, 0x84, 0x13, /* Byte value: 0xe2 */ + 0x4f, 0x3a, 0xfd, 0x8b, 0xfd, 0xfd, 0x02, 0x24, 0x44, 0x0c, 0x68, 0x20, 0x16, 0x89, 0x4e, 0x24, /* Byte value: 0xe3 */ + 0x19, 0xc9, 0xa5, 0x35, 0xa5, 0xa5, 0xc1, 0x0c, 0xdb, 0xc3, 0x55, 0x4d, 0x47, 0xf4, 0x98, 0x0c, /* Byte value: 0xe4 */ + 0x53, 0xcd, 0xc2, 0xd6, 0xc2, 0xc2, 0x4d, 0xc0, 0x2e, 0x6d, 0x19, 0x5a, 0xfa, 0x9b, 0x94, 0xc0, /* Byte value: 0xe5 */ + 0xf5, 0x94, 0x85, 0xb9, 0x85, 0x85, 0xd7, 0x83, 0x72, 0xb7, 0x2b, 0xee, 0xcd, 0x6e, 0x7f, 0x83, /* Byte value: 0xe6 */ + 0xb9, 0x05, 0x0e, 0xab, 0x0e, 0x0e, 0xaf, 0xff, 0x59, 0x64, 0x5f, 0x62, 0x03, 0x04, 0x0f, 0xff, /* Byte value: 0xe7 */ + 0xcb, 0x2c, 0x17, 0xf2, 0x17, 0x17, 0xbd, 0x38, 0x78, 0x08, 0xf1, 0x81, 0xa5, 0x4f, 0x74, 0x38, /* Byte value: 0xe8 */ + 0x45, 0x46, 0x0a, 0x5b, 0x0a, 0x0a, 0xdd, 0x37, 0xe5, 0x8b, 0x20, 0x4e, 0x83, 0x86, 0xca, 0x37, /* Byte value: 0xe9 */ + 0x57, 0x2b, 0xcb, 0xc9, 0xcb, 0xcb, 0x54, 0xa1, 0xba, 0x3b, 0x88, 0x09, 0x19, 0x9d, 0x7d, 0xa1, /* Byte value: 0xea */ + 0xd7, 0xdb, 0x28, 0xaf, 0x28, 0x28, 0xf2, 0xdc, 0x12, 0x69, 0x80, 0xfb, 0x49, 0x5d, 0xae, 0xdc, /* Byte value: 0xeb */ + 0x68, 0x4b, 0xca, 0xf5, 0xca, 0xca, 0xa9, 0x93, 0x95, 0x70, 0xe7, 0x02, 0x39, 0x5c, 0xdd, 0x93, /* Byte value: 0xec */ + 0x4c, 0x91, 0x8b, 0x12, 0x8b, 0x8b, 0x78, 0x7c, 0x2b, 0xd3, 0x74, 0x8c, 0xce, 0x6a, 0x70, 0x7c, /* Byte value: 0xed */ + 0x20, 0x3c, 0x48, 0xf8, 0x48, 0x48, 0xc8, 0x8e, 0x2a, 0xf5, 0x02, 0xdd, 0x14, 0x30, 0x44, 0x8e, /* Byte value: 0xee */ + 0x4a, 0x04, 0x67, 0xe3, 0x67, 0x67, 0x8c, 0xcc, 0xf5, 0xae, 0x4c, 0x17, 0xbd, 0x6f, 0x0c, 0xcc, /* Byte value: 0xef */ + 0x05, 0x3e, 0x9a, 0x68, 0x9a, 0x9a, 0x8e, 0xe8, 0xb1, 0xa2, 0x24, 0x37, 0xab, 0xe6, 0x42, 0xe8, /* Byte value: 0xf0 */ + 0xc6, 0x1d, 0x9f, 0xa4, 0x9f, 0x9f, 0x01, 0x12, 0x22, 0x06, 0x34, 0x10, 0x0b, 0xa5, 0x27, 0x12, /* Byte value: 0xf1 */ + 0x14, 0xf8, 0x2d, 0x63, 0x2d, 0x2d, 0x7d, 0x26, 0x81, 0xcd, 0x90, 0xdc, 0xe9, 0x1e, 0xcb, 0x26, /* Byte value: 0xf2 */ + 0x9e, 0x74, 0x39, 0xd5, 0x39, 0x39, 0x04, 0x48, 0x88, 0x18, 0xd0, 0x40, 0x2c, 0xd1, 0x9c, 0x48, /* Byte value: 0xf3 */ + 0xd5, 0xa8, 0xcd, 0x41, 0xcd, 0xcd, 0x1f, 0x0d, 0x58, 0x42, 0x29, 0x33, 0xd9, 0x5e, 0x3b, 0x0d, /* Byte value: 0xf4 */ + 0x4d, 0x49, 0x18, 0x65, 0x18, 0x18, 0xef, 0xf5, 0x0e, 0x27, 0xc1, 0xe8, 0x86, 0x8a, 0xdb, 0xf5, /* Byte value: 0xf5 */ + 0xce, 0x12, 0x8d, 0x9a, 0x8d, 0x8d, 0x33, 0xd0, 0xc9, 0xaa, 0xd5, 0xb6, 0x0e, 0xa9, 0x36, 0xd0, /* Byte value: 0xf6 */ + 0x5a, 0x1a, 0x43, 0x9f, 0x43, 0x43, 0xe8, 0x8b, 0xe0, 0x35, 0x4d, 0x98, 0xb7, 0x77, 0x2e, 0x8b, /* Byte value: 0xf7 */ + 0x3f, 0x60, 0x01, 0x3c, 0x01, 0x01, 0xfd, 0x32, 0x2f, 0x4b, 0x6f, 0x0b, 0x20, 0xc1, 0xa0, 0x32, /* Byte value: 0xf8 */ + 0x8a, 0x8c, 0x14, 0xb6, 0x14, 0x14, 0x79, 0x6e, 0x09, 0xd5, 0x40, 0x9c, 0xc5, 0xcf, 0x57, 0x6e, /* Byte value: 0xf9 */ + 0x83, 0x5b, 0x95, 0xff, 0x95, 0x95, 0xdc, 0x25, 0xc7, 0x8d, 0x14, 0x5e, 0x88, 0x23, 0xed, 0x25, /* Byte value: 0xfa */ + 0xc3, 0x23, 0x05, 0xcc, 0x05, 0x05, 0x8f, 0xfa, 0x93, 0xa4, 0x10, 0x27, 0xa0, 0x43, 0x65, 0xfa, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x94, 0x08, 0xce, 0x05, 0xce, 0xce, 0xdb, 0x5b, 0x29, 0x9f, 0x98, 0x2e, 0xb9, 0xde, 0x18, 0x5b, /* Byte value: 0xfd */ + 0x1f, 0x5c, 0x49, 0xc4, 0x49, 0x49, 0x35, 0xbc, 0x05, 0xbe, 0x6d, 0xd6, 0x34, 0xf1, 0xe4, 0xbc, /* Byte value: 0xfe */ + 0x98, 0xe1, 0xd5, 0x24, 0xd5, 0xd5, 0xf0, 0xf8, 0x56, 0x65, 0xe8, 0xdb, 0x5f, 0xd4, 0xe0, 0xf8, /* Byte value: 0xff */ + + /* Matrix row: 3 */ + 0xab, 0x5f, 0x0f, 0xc5, 0x97, 0x09, 0x7c, 0xc9, 0x42, 0xc5, 0x39, 0xbd, 0xfd, 0x81, 0x87, 0xfe, /* Byte value: 0x00 */ + 0xbb, 0xa5, 0xce, 0xde, 0x05, 0xdd, 0x1c, 0xf8, 0x12, 0xde, 0x45, 0x61, 0xc3, 0xdf, 0xcc, 0x2b, /* Byte value: 0x01 */ + 0x83, 0x15, 0xcf, 0x1f, 0x39, 0x08, 0x8c, 0x52, 0xca, 0x1f, 0xff, 0xa8, 0x9e, 0x12, 0xd5, 0x1c, /* Byte value: 0x02 */ + 0x0d, 0xe5, 0x99, 0x66, 0x2c, 0xc3, 0x2e, 0xd2, 0x39, 0x66, 0x56, 0x24, 0x2b, 0x05, 0x5f, 0x06, /* Byte value: 0x03 */ + 0x3a, 0x3e, 0xb0, 0xfa, 0xbf, 0x2e, 0x9c, 0x05, 0xd2, 0xfa, 0x54, 0x33, 0x2a, 0xb6, 0x28, 0x65, /* Byte value: 0x04 */ + 0x4a, 0x9d, 0xb2, 0xbb, 0xc7, 0x47, 0x7f, 0x92, 0xa1, 0xbb, 0xe3, 0x62, 0x90, 0xef, 0x1a, 0x0b, /* Byte value: 0x05 */ + 0xe8, 0xf8, 0x85, 0x6e, 0xb9, 0xb8, 0x35, 0x14, 0xce, 0x6e, 0x93, 0xcc, 0xa8, 0x9d, 0xa0, 0x57, /* Byte value: 0x06 */ + 0xeb, 0x31, 0x8d, 0xa9, 0x9a, 0xdf, 0x3f, 0x0d, 0xc1, 0xa9, 0x0a, 0x4b, 0x05, 0x3a, 0x68, 0x2c, /* Byte value: 0x07 */ + 0x8f, 0xb7, 0xef, 0x85, 0xb5, 0x57, 0xa4, 0x36, 0xf6, 0x85, 0xde, 0xf1, 0x6f, 0xcb, 0x73, 0x33, /* Byte value: 0x08 */ + 0xbe, 0x3d, 0xd6, 0x54, 0x60, 0x74, 0x02, 0xd3, 0x03, 0x54, 0x2d, 0x2b, 0xf7, 0xf5, 0x57, 0xa6, /* Byte value: 0x09 */ + 0x0f, 0x6b, 0x28, 0x5d, 0xaf, 0x38, 0x22, 0x7d, 0x33, 0x5d, 0xb8, 0xde, 0x5c, 0x7e, 0x6e, 0x54, /* Byte value: 0x0a */ + 0x6d, 0xbc, 0x5a, 0x3c, 0xc6, 0x7e, 0xad, 0x74, 0x1a, 0x3c, 0x9d, 0xa9, 0xaf, 0x02, 0x26, 0xbd, /* Byte value: 0x0b */ + 0x0a, 0xf3, 0x30, 0xd7, 0xca, 0x91, 0x3c, 0x56, 0x22, 0xd7, 0xd0, 0x94, 0x68, 0x54, 0xf5, 0xd9, /* Byte value: 0x0c */ + 0x29, 0x0d, 0x79, 0x26, 0x0e, 0x9d, 0xf6, 0x2d, 0x8d, 0x26, 0xb1, 0x68, 0xb9, 0x4f, 0xab, 0xcb, /* Byte value: 0x0d */ + 0x17, 0xec, 0x68, 0xaa, 0x74, 0x86, 0x72, 0xb5, 0x4b, 0xaa, 0xfa, 0x6c, 0x7d, 0x0f, 0xe1, 0x0a, /* Byte value: 0x0e */ + 0xb0, 0x11, 0x47, 0xf5, 0x6f, 0xd0, 0x26, 0x18, 0x35, 0xf5, 0xe2, 0x88, 0x71, 0x57, 0xc0, 0xdb, /* Byte value: 0x0f */ + 0xc5, 0x2a, 0x5d, 0x3e, 0x72, 0x10, 0xdb, 0xa4, 0x57, 0x3e, 0x3d, 0x93, 0xff, 0x24, 0x69, 0x38, /* Byte value: 0x10 */ + 0x4c, 0xcc, 0xa2, 0xf6, 0x81, 0x89, 0x6b, 0xa0, 0xbf, 0xf6, 0x12, 0xaf, 0x09, 0x62, 0x49, 0xfd, /* Byte value: 0x11 */ + 0xc3, 0x7b, 0x4d, 0x73, 0x34, 0xde, 0xcf, 0x96, 0x49, 0x73, 0xcc, 0x5e, 0x66, 0xa9, 0x3a, 0xce, /* Byte value: 0x12 */ + 0xb5, 0x89, 0x5f, 0x7f, 0x0a, 0x79, 0x38, 0x33, 0x24, 0x7f, 0x8a, 0xc2, 0x45, 0x7d, 0x5b, 0x56, /* Byte value: 0x13 */ + 0x74, 0x7c, 0xa3, 0x37, 0xbd, 0x5c, 0xfb, 0x0a, 0x67, 0x37, 0xa8, 0x66, 0x54, 0xaf, 0x50, 0xca, /* Byte value: 0x14 */ + 0x94, 0xf9, 0xa7, 0xb5, 0x4d, 0x8e, 0xfe, 0xe7, 0x81, 0xb5, 0x05, 0xc4, 0xe3, 0x1d, 0x34, 0x16, /* Byte value: 0x15 */ + 0x1d, 0x1f, 0x58, 0x7d, 0xbe, 0x17, 0x4e, 0xe3, 0x69, 0x7d, 0x2a, 0xf8, 0x15, 0x5b, 0x14, 0xd3, /* Byte value: 0x16 */ + 0x25, 0xaf, 0x59, 0xbc, 0x82, 0xc2, 0xde, 0x49, 0xb1, 0xbc, 0x90, 0x31, 0x48, 0x96, 0x0d, 0xe4, /* Byte value: 0x17 */ + 0x48, 0x13, 0x03, 0x80, 0x44, 0xbc, 0x73, 0x3d, 0xab, 0x80, 0x0d, 0x98, 0xe7, 0x94, 0x2b, 0x59, /* Byte value: 0x18 */ + 0xda, 0xbb, 0xb4, 0x78, 0x4f, 0xfc, 0x99, 0xe8, 0x34, 0x78, 0xf9, 0x91, 0x9d, 0x04, 0x4c, 0xb9, /* Byte value: 0x19 */ + 0xdd, 0xad, 0x1d, 0xc9, 0xa9, 0xae, 0x8b, 0x6c, 0x2f, 0xc9, 0x7f, 0x21, 0xde, 0x55, 0xe6, 0x66, /* Byte value: 0x1a */ + 0xe9, 0xbf, 0x3c, 0x92, 0x19, 0x24, 0x33, 0xa2, 0xcb, 0x92, 0xe4, 0xb1, 0x72, 0x41, 0x59, 0x7e, /* Byte value: 0x1b */ + 0xea, 0x76, 0x34, 0x55, 0x3a, 0x43, 0x39, 0xbb, 0xc4, 0x55, 0x7d, 0x36, 0xdf, 0xe6, 0x91, 0x05, /* Byte value: 0x1c */ + 0x73, 0x6a, 0x0a, 0x86, 0x5b, 0x0e, 0xe9, 0x8e, 0x7c, 0x86, 0x2e, 0xd6, 0x17, 0xfe, 0xfa, 0x15, /* Byte value: 0x1d */ + 0x2e, 0x1b, 0xd0, 0x97, 0xe8, 0xcf, 0xe4, 0xa9, 0x96, 0x97, 0x37, 0xd8, 0xfa, 0x1e, 0x01, 0x14, /* Byte value: 0x1e */ + 0xf5, 0xe7, 0xdd, 0x13, 0x07, 0xaf, 0x7b, 0xf7, 0xa7, 0x13, 0xb9, 0x34, 0xbd, 0xc6, 0xb4, 0x84, /* Byte value: 0x1f */ + 0x26, 0x66, 0x51, 0x7b, 0xa1, 0xa5, 0xd4, 0x50, 0xbe, 0x7b, 0x09, 0xb6, 0xe5, 0x31, 0xc5, 0x9f, /* Byte value: 0x20 */ + 0xd0, 0x48, 0x84, 0xaf, 0x85, 0x6d, 0xa5, 0xbe, 0x16, 0xaf, 0x29, 0x05, 0xf5, 0x50, 0xb9, 0x60, /* Byte value: 0x21 */ + 0xc4, 0x6d, 0xe4, 0xc2, 0xd2, 0x8c, 0xdd, 0x12, 0x52, 0xc2, 0x4a, 0xee, 0x25, 0xf8, 0x90, 0x11, /* Byte value: 0x22 */ + 0xf3, 0xb6, 0xcd, 0x5e, 0x41, 0x61, 0x6f, 0xc5, 0xb9, 0x5e, 0x48, 0xf9, 0x24, 0x4b, 0xe7, 0x72, /* Byte value: 0x23 */ + 0x7b, 0x17, 0x8b, 0x6a, 0x12, 0x64, 0xd9, 0x77, 0x54, 0x6a, 0x10, 0xb8, 0x08, 0xd1, 0x3e, 0x9e, /* Byte value: 0x24 */ + 0x4d, 0x8b, 0x1b, 0x0a, 0x21, 0x15, 0x6d, 0x16, 0xba, 0x0a, 0x65, 0xd2, 0xd3, 0xbe, 0xb0, 0xd4, /* Byte value: 0x25 */ + 0x45, 0xf6, 0x9a, 0xe6, 0x68, 0x7f, 0x5d, 0xef, 0x92, 0xe6, 0x5b, 0xbc, 0xcc, 0x91, 0x74, 0x5f, /* Byte value: 0x26 */ + 0xa9, 0xd1, 0xbe, 0xfe, 0x14, 0xf2, 0x70, 0x66, 0x48, 0xfe, 0xd7, 0x47, 0x8a, 0xfa, 0xb6, 0xac, /* Byte value: 0x27 */ + 0x5e, 0xb8, 0xd2, 0xd6, 0x90, 0xa6, 0x07, 0x3e, 0xe5, 0xd6, 0x80, 0x89, 0x40, 0x47, 0x33, 0x7a, /* Byte value: 0x28 */ + 0xd8, 0x35, 0x05, 0x43, 0xcc, 0x07, 0x95, 0x47, 0x3e, 0x43, 0x17, 0x6b, 0xea, 0x7f, 0x7d, 0xeb, /* Byte value: 0x29 */ + 0x7e, 0x8f, 0x93, 0xe0, 0x77, 0xcd, 0xc7, 0x5c, 0x45, 0xe0, 0x78, 0xf2, 0x3c, 0xfb, 0xa5, 0x13, /* Byte value: 0x2a */ + 0xf2, 0xf1, 0x74, 0xa2, 0xe1, 0xfd, 0x69, 0x73, 0xbc, 0xa2, 0x3f, 0x84, 0xfe, 0x97, 0x1e, 0x5b, /* Byte value: 0x2b */ + 0x90, 0x26, 0x06, 0xc3, 0x88, 0xbb, 0xe6, 0x7a, 0x95, 0xc3, 0x1a, 0xf3, 0x0d, 0xeb, 0x56, 0xb2, /* Byte value: 0x2c */ + 0x77, 0xb5, 0xab, 0xf0, 0x9e, 0x3b, 0xf1, 0x13, 0x68, 0xf0, 0x31, 0xe1, 0xf9, 0x08, 0x98, 0xb1, /* Byte value: 0x2d */ + 0x53, 0x5d, 0x4b, 0xb0, 0xbc, 0x65, 0x29, 0xec, 0xdc, 0xb0, 0xd6, 0xad, 0x6b, 0x42, 0x6c, 0x7c, /* Byte value: 0x2e */ + 0xe5, 0x1d, 0x1c, 0x08, 0x95, 0x7b, 0x1b, 0xc6, 0xf7, 0x08, 0xc5, 0xe8, 0x83, 0x98, 0xff, 0x51, /* Byte value: 0x2f */ + 0x49, 0x54, 0xba, 0x7c, 0xe4, 0x20, 0x75, 0x8b, 0xae, 0x7c, 0x7a, 0xe5, 0x3d, 0x48, 0xd2, 0x70, /* Byte value: 0x30 */ + 0x98, 0x5b, 0x87, 0x2f, 0xc1, 0xd1, 0xd6, 0x83, 0xbd, 0x2f, 0x24, 0x9d, 0x12, 0xc4, 0x92, 0x39, /* Byte value: 0x31 */ + 0x13, 0x33, 0xc9, 0xdc, 0xb1, 0xb3, 0x6a, 0x28, 0x5f, 0xdc, 0xe5, 0x5b, 0x93, 0xf9, 0x83, 0xae, /* Byte value: 0x32 */ + 0x43, 0xa7, 0x8a, 0xab, 0x2e, 0xb1, 0x49, 0xdd, 0x8c, 0xab, 0xaa, 0x71, 0x55, 0x1c, 0x27, 0xa9, /* Byte value: 0x33 */ + 0xdc, 0xea, 0xa4, 0x35, 0x09, 0x32, 0x8d, 0xda, 0x2a, 0x35, 0x08, 0x5c, 0x04, 0x89, 0x1f, 0x4f, /* Byte value: 0x34 */ + 0xc7, 0xa4, 0xec, 0x05, 0xf1, 0xeb, 0xd7, 0x0b, 0x5d, 0x05, 0xd3, 0x69, 0x88, 0x5f, 0x58, 0x6a, /* Byte value: 0x35 */ + 0xa0, 0xeb, 0x86, 0xee, 0xfd, 0x04, 0x46, 0x29, 0x65, 0xee, 0x9e, 0x54, 0x4f, 0x09, 0x8b, 0x0e, /* Byte value: 0x36 */ + 0xcc, 0x10, 0x65, 0x2e, 0x9b, 0xe6, 0xed, 0xeb, 0x7a, 0x2e, 0x74, 0x80, 0x3a, 0xd7, 0x54, 0x9a, /* Byte value: 0x37 */ + 0x14, 0x25, 0x60, 0x6d, 0x57, 0xe1, 0x78, 0xac, 0x44, 0x6d, 0x63, 0xeb, 0xd0, 0xa8, 0x29, 0x71, /* Byte value: 0x38 */ + 0x52, 0x1a, 0xf2, 0x4c, 0x1c, 0xf9, 0x2f, 0x5a, 0xd9, 0x4c, 0xa1, 0xd0, 0xb1, 0x9e, 0x95, 0x55, /* Byte value: 0x39 */ + 0x2f, 0x5c, 0x69, 0x6b, 0x48, 0x53, 0xe2, 0x1f, 0x93, 0x6b, 0x40, 0xa5, 0x20, 0xc2, 0xf8, 0x3d, /* Byte value: 0x3a */ + 0x47, 0x78, 0x2b, 0xdd, 0xeb, 0x84, 0x51, 0x40, 0x98, 0xdd, 0xb5, 0x46, 0xbb, 0xea, 0x45, 0x0d, /* Byte value: 0x3b */ + 0xa6, 0xba, 0x96, 0xa3, 0xbb, 0xca, 0x52, 0x1b, 0x7b, 0xa3, 0x6f, 0x99, 0xd6, 0x84, 0xd8, 0xf8, /* Byte value: 0x3c */ + 0x5f, 0xff, 0x6b, 0x2a, 0x30, 0x3a, 0x01, 0x88, 0xe0, 0x2a, 0xf7, 0xf4, 0x9a, 0x9b, 0xca, 0x53, /* Byte value: 0x3d */ + 0xe3, 0x4c, 0x0c, 0x45, 0xd3, 0xb5, 0x0f, 0xf4, 0xe9, 0x45, 0x34, 0x25, 0x1a, 0x15, 0xac, 0xa7, /* Byte value: 0x3e */ + 0xb8, 0x6c, 0xc6, 0x19, 0x26, 0xba, 0x16, 0xe1, 0x1d, 0x19, 0xdc, 0xe6, 0x6e, 0x78, 0x04, 0x50, /* Byte value: 0x3f */ + 0xa7, 0xfd, 0x2f, 0x5f, 0x1b, 0x56, 0x54, 0xad, 0x7e, 0x5f, 0x18, 0xe4, 0x0c, 0x58, 0x21, 0xd1, /* Byte value: 0x40 */ + 0xc0, 0xb2, 0x45, 0xb4, 0x17, 0xb9, 0xc5, 0x8f, 0x46, 0xb4, 0x55, 0xd9, 0xcb, 0x0e, 0xf2, 0xb5, /* Byte value: 0x41 */ + 0x23, 0xfe, 0x49, 0xf1, 0xc4, 0x0c, 0xca, 0x7b, 0xaf, 0xf1, 0x61, 0xfc, 0xd1, 0x1b, 0x5e, 0x12, /* Byte value: 0x42 */ + 0x2a, 0xc4, 0x71, 0xe1, 0x2d, 0xfa, 0xfc, 0x34, 0x82, 0xe1, 0x28, 0xef, 0x14, 0xe8, 0x63, 0xb0, /* Byte value: 0x43 */ + 0x62, 0xd7, 0x72, 0x61, 0x69, 0x46, 0x8f, 0x09, 0x29, 0x61, 0x25, 0x77, 0xf3, 0x7c, 0x48, 0xe9, /* Byte value: 0x44 */ + 0x7d, 0x46, 0x9b, 0x27, 0x54, 0xaa, 0xcd, 0x45, 0x4a, 0x27, 0xe1, 0x75, 0x91, 0x5c, 0x6d, 0x68, /* Byte value: 0x45 */ + 0x31, 0x8a, 0x39, 0xd1, 0xd5, 0x23, 0xa6, 0xe5, 0xf5, 0xd1, 0xf3, 0xda, 0x98, 0x3e, 0x24, 0x95, /* Byte value: 0x46 */ + 0x30, 0xcd, 0x80, 0x2d, 0x75, 0xbf, 0xa0, 0x53, 0xf0, 0x2d, 0x84, 0xa7, 0x42, 0xe2, 0xdd, 0xbc, /* Byte value: 0x47 */ + 0xc1, 0xf5, 0xfc, 0x48, 0xb7, 0x25, 0xc3, 0x39, 0x43, 0x48, 0x22, 0xa4, 0x11, 0xd2, 0x0b, 0x9c, /* Byte value: 0x48 */ + 0x20, 0x37, 0x41, 0x36, 0xe7, 0x6b, 0xc0, 0x62, 0xa0, 0x36, 0xf8, 0x7b, 0x7c, 0xbc, 0x96, 0x69, /* Byte value: 0x49 */ + 0x8a, 0x2f, 0xf7, 0x0f, 0xd0, 0xfe, 0xba, 0x1d, 0xe7, 0x0f, 0xb6, 0xbb, 0x5b, 0xe1, 0xe8, 0xbe, /* Byte value: 0x4a */ + 0xd7, 0x5e, 0x2d, 0x1e, 0x63, 0x3f, 0xb7, 0x3a, 0x0d, 0x1e, 0xaf, 0xb5, 0xb6, 0x01, 0x13, 0xbf, /* Byte value: 0x4b */ + 0x3d, 0x28, 0x19, 0x4b, 0x59, 0x7c, 0x8e, 0x81, 0xc9, 0x4b, 0xd2, 0x83, 0x69, 0xe7, 0x82, 0xba, /* Byte value: 0x4c */ + 0xbf, 0x7a, 0x6f, 0xa8, 0xc0, 0xe8, 0x04, 0x65, 0x06, 0xa8, 0x5a, 0x56, 0x2d, 0x29, 0xae, 0x8f, /* Byte value: 0x4d */ + 0xc6, 0xe3, 0x55, 0xf9, 0x51, 0x77, 0xd1, 0xbd, 0x58, 0xf9, 0xa4, 0x14, 0x52, 0x83, 0xa1, 0x43, /* Byte value: 0x4e */ + 0x72, 0x2d, 0xb3, 0x7a, 0xfb, 0x92, 0xef, 0x38, 0x79, 0x7a, 0x59, 0xab, 0xcd, 0x22, 0x03, 0x3c, /* Byte value: 0x4f */ + 0xdb, 0xfc, 0x0d, 0x84, 0xef, 0x60, 0x9f, 0x5e, 0x31, 0x84, 0x8e, 0xec, 0x47, 0xd8, 0xb5, 0x90, /* Byte value: 0x50 */ + 0x15, 0x62, 0xd9, 0x91, 0xf7, 0x7d, 0x7e, 0x1a, 0x41, 0x91, 0x14, 0x96, 0x0a, 0x74, 0xd0, 0x58, /* Byte value: 0x51 */ + 0x99, 0x1c, 0x3e, 0xd3, 0x61, 0x4d, 0xd0, 0x35, 0xb8, 0xd3, 0x53, 0xe0, 0xc8, 0x18, 0x6b, 0x10, /* Byte value: 0x52 */ + 0x4b, 0xda, 0x0b, 0x47, 0x67, 0xdb, 0x79, 0x24, 0xa4, 0x47, 0x94, 0x1f, 0x4a, 0x33, 0xe3, 0x22, /* Byte value: 0x53 */ + 0x34, 0x12, 0x21, 0x5b, 0xb0, 0x8a, 0xb8, 0xce, 0xe4, 0x5b, 0x9b, 0x90, 0xac, 0x14, 0xbf, 0x18, /* Byte value: 0x54 */ + 0x60, 0x59, 0xc3, 0x5a, 0xea, 0xbd, 0x83, 0xa6, 0x23, 0x5a, 0xcb, 0x8d, 0x84, 0x07, 0x79, 0xbb, /* Byte value: 0x55 */ + 0x92, 0xa8, 0xb7, 0xf8, 0x0b, 0x40, 0xea, 0xd5, 0x9f, 0xf8, 0xf4, 0x09, 0x7a, 0x90, 0x67, 0xe0, /* Byte value: 0x56 */ + 0xac, 0x49, 0xa6, 0x74, 0x71, 0x5b, 0x6e, 0x4d, 0x59, 0x74, 0xbf, 0x0d, 0xbe, 0xd0, 0x2d, 0x21, /* Byte value: 0x57 */ + 0x6e, 0x75, 0x52, 0xfb, 0xe5, 0x19, 0xa7, 0x6d, 0x15, 0xfb, 0x04, 0x2e, 0x02, 0xa5, 0xee, 0xc6, /* Byte value: 0x58 */ + 0xa1, 0xac, 0x3f, 0x12, 0x5d, 0x98, 0x40, 0x9f, 0x60, 0x12, 0xe9, 0x29, 0x95, 0xd5, 0x72, 0x27, /* Byte value: 0x59 */ + 0x81, 0x9b, 0x7e, 0x24, 0xba, 0xf3, 0x80, 0xfd, 0xc0, 0x24, 0x11, 0x52, 0xe9, 0x69, 0xe4, 0x4e, /* Byte value: 0x5a */ + 0x3b, 0x79, 0x09, 0x06, 0x1f, 0xb2, 0x9a, 0xb3, 0xd7, 0x06, 0x23, 0x4e, 0xf0, 0x6a, 0xd1, 0x4c, /* Byte value: 0x5b */ + 0x19, 0xc0, 0xf9, 0x0b, 0x7b, 0x22, 0x56, 0x7e, 0x7d, 0x0b, 0x35, 0xcf, 0xfb, 0xad, 0x76, 0x77, /* Byte value: 0x5c */ + 0xe4, 0x5a, 0xa5, 0xf4, 0x35, 0xe7, 0x1d, 0x70, 0xf2, 0xf4, 0xb2, 0x95, 0x59, 0x44, 0x06, 0x78, /* Byte value: 0x5d */ + 0x2c, 0x95, 0x61, 0xac, 0x6b, 0x34, 0xe8, 0x06, 0x9c, 0xac, 0xd9, 0x22, 0x8d, 0x65, 0x30, 0x46, /* Byte value: 0x5e */ + 0xbd, 0xf4, 0xde, 0x93, 0x43, 0x13, 0x08, 0xca, 0x0c, 0x93, 0xb4, 0xac, 0x5a, 0x52, 0x9f, 0xdd, /* Byte value: 0x5f */ + 0xb6, 0x40, 0x57, 0xb8, 0x29, 0x1e, 0x32, 0x2a, 0x2b, 0xb8, 0x13, 0x45, 0xe8, 0xda, 0x93, 0x2d, /* Byte value: 0x60 */ + 0xd3, 0x81, 0x8c, 0x68, 0xa6, 0x0a, 0xaf, 0xa7, 0x19, 0x68, 0xb0, 0x82, 0x58, 0xf7, 0x71, 0x1b, /* Byte value: 0x61 */ + 0xe7, 0x93, 0xad, 0x33, 0x16, 0x80, 0x17, 0x69, 0xfd, 0x33, 0x2b, 0x12, 0xf4, 0xe3, 0xce, 0x03, /* Byte value: 0x62 */ + 0x9b, 0x92, 0x8f, 0xe8, 0xe2, 0xb6, 0xdc, 0x9a, 0xb2, 0xe8, 0xbd, 0x1a, 0xbf, 0x63, 0x5a, 0x42, /* Byte value: 0x63 */ + 0x8c, 0x7e, 0xe7, 0x42, 0x96, 0x30, 0xae, 0x2f, 0xf9, 0x42, 0x47, 0x76, 0xc2, 0x6c, 0xbb, 0x48, /* Byte value: 0x64 */ + 0x04, 0xdf, 0xa1, 0x76, 0xc5, 0x35, 0x18, 0x9d, 0x14, 0x76, 0x1f, 0x37, 0xee, 0xf6, 0x62, 0xa4, /* Byte value: 0x65 */ + 0x86, 0x8d, 0xd7, 0x95, 0x5c, 0xa1, 0x92, 0x79, 0xdb, 0x95, 0x97, 0xe2, 0xaa, 0x38, 0x4e, 0x91, /* Byte value: 0x66 */ + 0xef, 0xee, 0x2c, 0xdf, 0x5f, 0xea, 0x27, 0x90, 0xd5, 0xdf, 0x15, 0x7c, 0xeb, 0xcc, 0x0a, 0x88, /* Byte value: 0x67 */ + 0x32, 0x43, 0x31, 0x16, 0xf6, 0x44, 0xac, 0xfc, 0xfa, 0x16, 0x6a, 0x5d, 0x35, 0x99, 0xec, 0xee, /* Byte value: 0x68 */ + 0x0b, 0xb4, 0x89, 0x2b, 0x6a, 0x0d, 0x3a, 0xe0, 0x27, 0x2b, 0xa7, 0xe9, 0xb2, 0x88, 0x0c, 0xf0, /* Byte value: 0x69 */ + 0x9e, 0x0a, 0x97, 0x62, 0x87, 0x1f, 0xc2, 0xb1, 0xa3, 0x62, 0xd5, 0x50, 0x8b, 0x49, 0xc1, 0xcf, /* Byte value: 0x6a */ + 0x80, 0xdc, 0xc7, 0xd8, 0x1a, 0x6f, 0x86, 0x4b, 0xc5, 0xd8, 0x66, 0x2f, 0x33, 0xb5, 0x1d, 0x67, /* Byte value: 0x6b */ + 0x1c, 0x58, 0xe1, 0x81, 0x1e, 0x8b, 0x48, 0x55, 0x6c, 0x81, 0x5d, 0x85, 0xcf, 0x87, 0xed, 0xfa, /* Byte value: 0x6c */ + 0xb1, 0x56, 0xfe, 0x09, 0xcf, 0x4c, 0x20, 0xae, 0x30, 0x09, 0x95, 0xf5, 0xab, 0x8b, 0x39, 0xf2, /* Byte value: 0x6d */ + 0xd4, 0x97, 0x25, 0xd9, 0x40, 0x58, 0xbd, 0x23, 0x02, 0xd9, 0x36, 0x32, 0x1b, 0xa6, 0xdb, 0xc4, /* Byte value: 0x6e */ + 0x7a, 0x50, 0x32, 0x96, 0xb2, 0xf8, 0xdf, 0xc1, 0x51, 0x96, 0x67, 0xc5, 0xd2, 0x0d, 0xc7, 0xb7, /* Byte value: 0x6f */ + 0x5b, 0x20, 0xca, 0x5c, 0xf5, 0x0f, 0x19, 0x15, 0xf4, 0x5c, 0xe8, 0xc3, 0x74, 0x6d, 0xa8, 0xf7, /* Byte value: 0x70 */ + 0xa3, 0x22, 0x8e, 0x29, 0xde, 0x63, 0x4c, 0x30, 0x6a, 0x29, 0x07, 0xd3, 0xe2, 0xae, 0x43, 0x75, /* Byte value: 0x71 */ + 0xf9, 0x45, 0xfd, 0x89, 0x8b, 0xf0, 0x53, 0x93, 0x9b, 0x89, 0x98, 0x6d, 0x4c, 0x1f, 0x12, 0xab, /* Byte value: 0x72 */ + 0x33, 0x04, 0x88, 0xea, 0x56, 0xd8, 0xaa, 0x4a, 0xff, 0xea, 0x1d, 0x20, 0xef, 0x45, 0x15, 0xc7, /* Byte value: 0x73 */ + 0x68, 0x24, 0x42, 0xb6, 0xa3, 0xd7, 0xb3, 0x5f, 0x0b, 0xb6, 0xf5, 0xe3, 0x9b, 0x28, 0xbd, 0x30, /* Byte value: 0x74 */ + 0x96, 0x77, 0x16, 0x8e, 0xce, 0x75, 0xf2, 0x48, 0x8b, 0x8e, 0xeb, 0x3e, 0x94, 0x66, 0x05, 0x44, /* Byte value: 0x75 */ + 0x46, 0x3f, 0x92, 0x21, 0x4b, 0x18, 0x57, 0xf6, 0x9d, 0x21, 0xc2, 0x3b, 0x61, 0x36, 0xbc, 0x24, /* Byte value: 0x76 */ + 0x02, 0x8e, 0xb1, 0x3b, 0x83, 0xfb, 0x0c, 0xaf, 0x0a, 0x3b, 0xee, 0xfa, 0x77, 0x7b, 0x31, 0x52, /* Byte value: 0x77 */ + 0xff, 0x14, 0xed, 0xc4, 0xcd, 0x3e, 0x47, 0xa1, 0x85, 0xc4, 0x69, 0xa0, 0xd5, 0x92, 0x41, 0x5d, /* Byte value: 0x78 */ + 0x95, 0xbe, 0x1e, 0x49, 0xed, 0x12, 0xf8, 0x51, 0x84, 0x49, 0x72, 0xb9, 0x39, 0xc1, 0xcd, 0x3f, /* Byte value: 0x79 */ + 0x64, 0x86, 0x62, 0x2c, 0x2f, 0x88, 0x9b, 0x3b, 0x37, 0x2c, 0xd4, 0xba, 0x6a, 0xf1, 0x1b, 0x1f, /* Byte value: 0x7a */ + 0x40, 0x6e, 0x82, 0x6c, 0x0d, 0xd6, 0x43, 0xc4, 0x83, 0x6c, 0x33, 0xf6, 0xf8, 0xbb, 0xef, 0xd2, /* Byte value: 0x7b */ + 0x41, 0x29, 0x3b, 0x90, 0xad, 0x4a, 0x45, 0x72, 0x86, 0x90, 0x44, 0x8b, 0x22, 0x67, 0x16, 0xfb, /* Byte value: 0x7c */ + 0x16, 0xab, 0xd1, 0x56, 0xd4, 0x1a, 0x74, 0x03, 0x4e, 0x56, 0x8d, 0x11, 0xa7, 0xd3, 0x18, 0x23, /* Byte value: 0x7d */ + 0x0e, 0x2c, 0x91, 0xa1, 0x0f, 0xa4, 0x24, 0xcb, 0x36, 0xa1, 0xcf, 0xa3, 0x86, 0xa2, 0x97, 0x7d, /* Byte value: 0x7e */ + 0xb9, 0x2b, 0x7f, 0xe5, 0x86, 0x26, 0x10, 0x57, 0x18, 0xe5, 0xab, 0x9b, 0xb4, 0xa4, 0xfd, 0x79, /* Byte value: 0x7f */ + 0xfd, 0x9a, 0x5c, 0xff, 0x4e, 0xc5, 0x4b, 0x0e, 0x8f, 0xff, 0x87, 0x5a, 0xa2, 0xe9, 0x70, 0x0f, /* Byte value: 0x80 */ + 0x6f, 0x32, 0xeb, 0x07, 0x45, 0x85, 0xa1, 0xdb, 0x10, 0x07, 0x73, 0x53, 0xd8, 0x79, 0x17, 0xef, /* Byte value: 0x81 */ + 0x91, 0x61, 0xbf, 0x3f, 0x28, 0x27, 0xe0, 0xcc, 0x90, 0x3f, 0x6d, 0x8e, 0xd7, 0x37, 0xaf, 0x9b, /* Byte value: 0x82 */ + 0xa5, 0x73, 0x9e, 0x64, 0x98, 0xad, 0x58, 0x02, 0x74, 0x64, 0xf6, 0x1e, 0x7b, 0x23, 0x10, 0x83, /* Byte value: 0x83 */ + 0xcf, 0xd9, 0x6d, 0xe9, 0xb8, 0x81, 0xe7, 0xf2, 0x75, 0xe9, 0xed, 0x07, 0x97, 0x70, 0x9c, 0xe1, /* Byte value: 0x84 */ + 0x56, 0xc5, 0x53, 0x3a, 0xd9, 0xcc, 0x37, 0xc7, 0xcd, 0x3a, 0xbe, 0xe7, 0x5f, 0x68, 0xf7, 0xf1, /* Byte value: 0x85 */ + 0xba, 0xe2, 0x77, 0x22, 0xa5, 0x41, 0x1a, 0x4e, 0x17, 0x22, 0x32, 0x1c, 0x19, 0x03, 0x35, 0x02, /* Byte value: 0x86 */ + 0x61, 0x1e, 0x7a, 0xa6, 0x4a, 0x21, 0x85, 0x10, 0x26, 0xa6, 0xbc, 0xf0, 0x5e, 0xdb, 0x80, 0x92, /* Byte value: 0x87 */ + 0x18, 0x87, 0x40, 0xf7, 0xdb, 0xbe, 0x50, 0xc8, 0x78, 0xf7, 0x42, 0xb2, 0x21, 0x71, 0x8f, 0x5e, /* Byte value: 0x88 */ + 0x54, 0x4b, 0xe2, 0x01, 0x5a, 0x37, 0x3b, 0x68, 0xc7, 0x01, 0x50, 0x1d, 0x28, 0x13, 0xc6, 0xa3, /* Byte value: 0x89 */ + 0x8b, 0x68, 0x4e, 0xf3, 0x70, 0x62, 0xbc, 0xab, 0xe2, 0xf3, 0xc1, 0xc6, 0x81, 0x3d, 0x11, 0x97, /* Byte value: 0x8a */ + 0x3e, 0xe1, 0x11, 0x8c, 0x7a, 0x1b, 0x84, 0x98, 0xc6, 0x8c, 0x4b, 0x04, 0xc4, 0x40, 0x4a, 0xc1, /* Byte value: 0x8b */ + 0x5a, 0x67, 0x73, 0xa0, 0x55, 0x93, 0x1f, 0xa3, 0xf1, 0xa0, 0x9f, 0xbe, 0xae, 0xb1, 0x51, 0xde, /* Byte value: 0x8c */ + 0xce, 0x9e, 0xd4, 0x15, 0x18, 0x1d, 0xe1, 0x44, 0x70, 0x15, 0x9a, 0x7a, 0x4d, 0xac, 0x65, 0xc8, /* Byte value: 0x8d */ + 0xf7, 0x69, 0x6c, 0x28, 0x84, 0x54, 0x77, 0x58, 0xad, 0x28, 0x57, 0xce, 0xca, 0xbd, 0x85, 0xd6, /* Byte value: 0x8e */ + 0xd2, 0xc6, 0x35, 0x94, 0x06, 0x96, 0xa9, 0x11, 0x1c, 0x94, 0xc7, 0xff, 0x82, 0x2b, 0x88, 0x32, /* Byte value: 0x8f */ + 0x82, 0x52, 0x76, 0xe3, 0x99, 0x94, 0x8a, 0xe4, 0xcf, 0xe3, 0x88, 0xd5, 0x44, 0xce, 0x2c, 0x35, /* Byte value: 0x90 */ + 0xb3, 0xd8, 0x4f, 0x32, 0x4c, 0xb7, 0x2c, 0x01, 0x3a, 0x32, 0x7b, 0x0f, 0xdc, 0xf0, 0x08, 0xa0, /* Byte value: 0x91 */ + 0xb4, 0xce, 0xe6, 0x83, 0xaa, 0xe5, 0x3e, 0x85, 0x21, 0x83, 0xfd, 0xbf, 0x9f, 0xa1, 0xa2, 0x7f, /* Byte value: 0x92 */ + 0xd6, 0x19, 0x94, 0xe2, 0xc3, 0xa3, 0xb1, 0x8c, 0x08, 0xe2, 0xd8, 0xc8, 0x6c, 0xdd, 0xea, 0x96, /* Byte value: 0x93 */ + 0xe1, 0xc2, 0xbd, 0x7e, 0x50, 0x4e, 0x03, 0x5b, 0xe3, 0x7e, 0xda, 0xdf, 0x6d, 0x6e, 0x9d, 0xf5, /* Byte value: 0x94 */ + 0xc2, 0x3c, 0xf4, 0x8f, 0x94, 0x42, 0xc9, 0x20, 0x4c, 0x8f, 0xbb, 0x23, 0xbc, 0x75, 0xc3, 0xe7, /* Byte value: 0x95 */ + 0x5d, 0x71, 0xda, 0x11, 0xb3, 0xc1, 0x0d, 0x27, 0xea, 0x11, 0x19, 0x0e, 0xed, 0xe0, 0xfb, 0x01, /* Byte value: 0x96 */ + 0xfa, 0x8c, 0xf5, 0x4e, 0xa8, 0x97, 0x59, 0x8a, 0x94, 0x4e, 0x01, 0xea, 0xe1, 0xb8, 0xda, 0xd0, /* Byte value: 0x97 */ + 0xa4, 0x34, 0x27, 0x98, 0x38, 0x31, 0x5e, 0xb4, 0x71, 0x98, 0x81, 0x63, 0xa1, 0xff, 0xe9, 0xaa, /* Byte value: 0x98 */ + 0x1f, 0x91, 0xe9, 0x46, 0x3d, 0xec, 0x42, 0x4c, 0x63, 0x46, 0xc4, 0x02, 0x62, 0x20, 0x25, 0x81, /* Byte value: 0x99 */ + 0x0c, 0xa2, 0x20, 0x9a, 0x8c, 0x5f, 0x28, 0x64, 0x3c, 0x9a, 0x21, 0x59, 0xf1, 0xd9, 0xa6, 0x2f, /* Byte value: 0x9a */ + 0x01, 0x47, 0xb9, 0xfc, 0xa0, 0x9c, 0x06, 0xb6, 0x05, 0xfc, 0x77, 0x7d, 0xda, 0xdc, 0xf9, 0x29, /* Byte value: 0x9b */ + 0x2d, 0xd2, 0xd8, 0x50, 0xcb, 0xa8, 0xee, 0xb0, 0x99, 0x50, 0xae, 0x5f, 0x57, 0xb9, 0xc9, 0x6f, /* Byte value: 0x9c */ + 0x67, 0x4f, 0x6a, 0xeb, 0x0c, 0xef, 0x91, 0x22, 0x38, 0xeb, 0x4d, 0x3d, 0xc7, 0x56, 0xd3, 0x64, /* Byte value: 0x9d */ + 0xe2, 0x0b, 0xb5, 0xb9, 0x73, 0x29, 0x09, 0x42, 0xec, 0xb9, 0x43, 0x58, 0xc0, 0xc9, 0x55, 0x8e, /* Byte value: 0x9e */ + 0x09, 0x3a, 0x38, 0x10, 0xe9, 0xf6, 0x36, 0x4f, 0x2d, 0x10, 0x49, 0x13, 0xc5, 0xf3, 0x3d, 0xa2, /* Byte value: 0x9f */ + 0x57, 0x82, 0xea, 0xc6, 0x79, 0x50, 0x31, 0x71, 0xc8, 0xc6, 0xc9, 0x9a, 0x85, 0xb4, 0x0e, 0xd8, /* Byte value: 0xa0 */ + 0x11, 0xbd, 0x78, 0xe7, 0x32, 0x48, 0x66, 0x87, 0x55, 0xe7, 0x0b, 0xa1, 0xe4, 0x82, 0xb2, 0xfc, /* Byte value: 0xa1 */ + 0xb7, 0x07, 0xee, 0x44, 0x89, 0x82, 0x34, 0x9c, 0x2e, 0x44, 0x64, 0x38, 0x32, 0x06, 0x6a, 0x04, /* Byte value: 0xa2 */ + 0xdf, 0x23, 0xac, 0xf2, 0x2a, 0x55, 0x87, 0xc3, 0x25, 0xf2, 0x91, 0xdb, 0xa9, 0x2e, 0xd7, 0x34, /* Byte value: 0xa3 */ + 0x6a, 0xaa, 0xf3, 0x8d, 0x20, 0x2c, 0xbf, 0xf0, 0x01, 0x8d, 0x1b, 0x19, 0xec, 0x53, 0x8c, 0x62, /* Byte value: 0xa4 */ + 0x93, 0xef, 0x0e, 0x04, 0xab, 0xdc, 0xec, 0x63, 0x9a, 0x04, 0x83, 0x74, 0xa0, 0x4c, 0x9e, 0xc9, /* Byte value: 0xa5 */ + 0x24, 0xe8, 0xe0, 0x40, 0x22, 0x5e, 0xd8, 0xff, 0xb4, 0x40, 0xe7, 0x4c, 0x92, 0x4a, 0xf4, 0xcd, /* Byte value: 0xa6 */ + 0x7f, 0xc8, 0x2a, 0x1c, 0xd7, 0x51, 0xc1, 0xea, 0x40, 0x1c, 0x0f, 0x8f, 0xe6, 0x27, 0x5c, 0x3a, /* Byte value: 0xa7 */ + 0x66, 0x08, 0xd3, 0x17, 0xac, 0x73, 0x97, 0x94, 0x3d, 0x17, 0x3a, 0x40, 0x1d, 0x8a, 0x2a, 0x4d, /* Byte value: 0xa8 */ + 0xfe, 0x53, 0x54, 0x38, 0x6d, 0xa2, 0x41, 0x17, 0x80, 0x38, 0x1e, 0xdd, 0x0f, 0x4e, 0xb8, 0x74, /* Byte value: 0xa9 */ + 0x07, 0x16, 0xa9, 0xb1, 0xe6, 0x52, 0x12, 0x84, 0x1b, 0xb1, 0x86, 0xb0, 0x43, 0x51, 0xaa, 0xdf, /* Byte value: 0xaa */ + 0x44, 0xb1, 0x23, 0x1a, 0xc8, 0xe3, 0x5b, 0x59, 0x97, 0x1a, 0x2c, 0xc1, 0x16, 0x4d, 0x8d, 0x76, /* Byte value: 0xab */ + 0x3f, 0xa6, 0xa8, 0x70, 0xda, 0x87, 0x82, 0x2e, 0xc3, 0x70, 0x3c, 0x79, 0x1e, 0x9c, 0xb3, 0xe8, /* Byte value: 0xac */ + 0xf8, 0x02, 0x44, 0x75, 0x2b, 0x6c, 0x55, 0x25, 0x9e, 0x75, 0xef, 0x10, 0x96, 0xc3, 0xeb, 0x82, /* Byte value: 0xad */ + 0x06, 0x51, 0x10, 0x4d, 0x46, 0xce, 0x14, 0x32, 0x1e, 0x4d, 0xf1, 0xcd, 0x99, 0x8d, 0x53, 0xf6, /* Byte value: 0xae */ + 0xca, 0x41, 0x75, 0x63, 0xdd, 0x28, 0xf9, 0xd9, 0x64, 0x63, 0x85, 0x4d, 0xa3, 0x5a, 0x07, 0x6c, /* Byte value: 0xaf */ + 0xad, 0x0e, 0x1f, 0x88, 0xd1, 0xc7, 0x68, 0xfb, 0x5c, 0x88, 0xc8, 0x70, 0x64, 0x0c, 0xd4, 0x08, /* Byte value: 0xb0 */ + 0x2b, 0x83, 0xc8, 0x1d, 0x8d, 0x66, 0xfa, 0x82, 0x87, 0x1d, 0x5f, 0x92, 0xce, 0x34, 0x9a, 0x99, /* Byte value: 0xb1 */ + 0xae, 0xc7, 0x17, 0x4f, 0xf2, 0xa0, 0x62, 0xe2, 0x53, 0x4f, 0x51, 0xf7, 0xc9, 0xab, 0x1c, 0x73, /* Byte value: 0xb2 */ + 0x22, 0xb9, 0xf0, 0x0d, 0x64, 0x90, 0xcc, 0xcd, 0xaa, 0x0d, 0x16, 0x81, 0x0b, 0xc7, 0xa7, 0x3b, /* Byte value: 0xb3 */ + 0x39, 0xf7, 0xb8, 0x3d, 0x9c, 0x49, 0x96, 0x1c, 0xdd, 0x3d, 0xcd, 0xb4, 0x87, 0x11, 0xe0, 0x1e, /* Byte value: 0xb4 */ + 0xde, 0x64, 0x15, 0x0e, 0x8a, 0xc9, 0x81, 0x75, 0x20, 0x0e, 0xe6, 0xa6, 0x73, 0xf2, 0x2e, 0x1d, /* Byte value: 0xb5 */ + 0x1e, 0xd6, 0x50, 0xba, 0x9d, 0x70, 0x44, 0xfa, 0x66, 0xba, 0xb3, 0x7f, 0xb8, 0xfc, 0xdc, 0xa8, /* Byte value: 0xb6 */ + 0xa8, 0x96, 0x07, 0x02, 0xb4, 0x6e, 0x76, 0xd0, 0x4d, 0x02, 0xa0, 0x3a, 0x50, 0x26, 0x4f, 0x85, /* Byte value: 0xb7 */ + 0x58, 0xe9, 0xc2, 0x9b, 0xd6, 0x68, 0x13, 0x0c, 0xfb, 0x9b, 0x71, 0x44, 0xd9, 0xca, 0x60, 0x8c, /* Byte value: 0xb8 */ + 0x88, 0xa1, 0x46, 0x34, 0x53, 0x05, 0xb6, 0xb2, 0xed, 0x34, 0x58, 0x41, 0x2c, 0x9a, 0xd9, 0xec, /* Byte value: 0xb9 */ + 0x9a, 0xd5, 0x36, 0x14, 0x42, 0x2a, 0xda, 0x2c, 0xb7, 0x14, 0xca, 0x67, 0x65, 0xbf, 0xa3, 0x6b, /* Byte value: 0xba */ + 0x69, 0x63, 0xfb, 0x4a, 0x03, 0x4b, 0xb5, 0xe9, 0x0e, 0x4a, 0x82, 0x9e, 0x41, 0xf4, 0x44, 0x19, /* Byte value: 0xbb */ + 0x28, 0x4a, 0xc0, 0xda, 0xae, 0x01, 0xf0, 0x9b, 0x88, 0xda, 0xc6, 0x15, 0x63, 0x93, 0x52, 0xe2, /* Byte value: 0xbc */ + 0x65, 0xc1, 0xdb, 0xd0, 0x8f, 0x14, 0x9d, 0x8d, 0x32, 0xd0, 0xa3, 0xc7, 0xb0, 0x2d, 0xe2, 0x36, /* Byte value: 0xbd */ + 0xd5, 0xd0, 0x9c, 0x25, 0xe0, 0xc4, 0xbb, 0x95, 0x07, 0x25, 0x41, 0x4f, 0xc1, 0x7a, 0x22, 0xed, /* Byte value: 0xbe */ + 0x7c, 0x01, 0x22, 0xdb, 0xf4, 0x36, 0xcb, 0xf3, 0x4f, 0xdb, 0x96, 0x08, 0x4b, 0x80, 0x94, 0x41, /* Byte value: 0xbf */ + 0xbc, 0xb3, 0x67, 0x6f, 0xe3, 0x8f, 0x0e, 0x7c, 0x09, 0x6f, 0xc3, 0xd1, 0x80, 0x8e, 0x66, 0xf4, /* Byte value: 0xc0 */ + 0x38, 0xb0, 0x01, 0xc1, 0x3c, 0xd5, 0x90, 0xaa, 0xd8, 0xc1, 0xba, 0xc9, 0x5d, 0xcd, 0x19, 0x37, /* Byte value: 0xc1 */ + 0x4f, 0x05, 0xaa, 0x31, 0xa2, 0xee, 0x61, 0xb9, 0xb0, 0x31, 0x8b, 0x28, 0xa4, 0xc5, 0x81, 0x86, /* Byte value: 0xc2 */ + 0xe0, 0x85, 0x04, 0x82, 0xf0, 0xd2, 0x05, 0xed, 0xe6, 0x82, 0xad, 0xa2, 0xb7, 0xb2, 0x64, 0xdc, /* Byte value: 0xc3 */ + 0x27, 0x21, 0xe8, 0x87, 0x01, 0x39, 0xd2, 0xe6, 0xbb, 0x87, 0x7e, 0xcb, 0x3f, 0xed, 0x3c, 0xb6, /* Byte value: 0xc4 */ + 0x76, 0xf2, 0x12, 0x0c, 0x3e, 0xa7, 0xf7, 0xa5, 0x6d, 0x0c, 0x46, 0x9c, 0x23, 0xd4, 0x61, 0x98, /* Byte value: 0xc5 */ + 0x78, 0xde, 0x83, 0xad, 0x31, 0x03, 0xd3, 0x6e, 0x5b, 0xad, 0x89, 0x3f, 0xa5, 0x76, 0xf6, 0xe5, /* Byte value: 0xc6 */ + 0x89, 0xe6, 0xff, 0xc8, 0xf3, 0x99, 0xb0, 0x04, 0xe8, 0xc8, 0x2f, 0x3c, 0xf6, 0x46, 0x20, 0xc5, /* Byte value: 0xc7 */ + 0x8d, 0x39, 0x5e, 0xbe, 0x36, 0xac, 0xa8, 0x99, 0xfc, 0xbe, 0x30, 0x0b, 0x18, 0xb0, 0x42, 0x61, /* Byte value: 0xc8 */ + 0xaf, 0x80, 0xae, 0xb3, 0x52, 0x3c, 0x64, 0x54, 0x56, 0xb3, 0x26, 0x8a, 0x13, 0x77, 0xe5, 0x5a, /* Byte value: 0xc9 */ + 0x9f, 0x4d, 0x2e, 0x9e, 0x27, 0x83, 0xc4, 0x07, 0xa6, 0x9e, 0xa2, 0x2d, 0x51, 0x95, 0x38, 0xe6, /* Byte value: 0xca */ + 0x84, 0x03, 0x66, 0xae, 0xdf, 0x5a, 0x9e, 0xd6, 0xd1, 0xae, 0x79, 0x18, 0xdd, 0x43, 0x7f, 0xc3, /* Byte value: 0xcb */ + 0xe6, 0xd4, 0x14, 0xcf, 0xb6, 0x1c, 0x11, 0xdf, 0xf8, 0xcf, 0x5c, 0x6f, 0x2e, 0x3f, 0x37, 0x2a, /* Byte value: 0xcc */ + 0xf1, 0x38, 0x7c, 0x65, 0xc2, 0x9a, 0x63, 0x6a, 0xb3, 0x65, 0xa6, 0x03, 0x53, 0x30, 0xd6, 0x20, /* Byte value: 0xcd */ + 0x63, 0x90, 0xcb, 0x9d, 0xc9, 0xda, 0x89, 0xbf, 0x2c, 0x9d, 0x52, 0x0a, 0x29, 0xa0, 0xb1, 0xc0, /* Byte value: 0xce */ + 0x51, 0xd3, 0xfa, 0x8b, 0x3f, 0x9e, 0x25, 0x43, 0xd6, 0x8b, 0x38, 0x57, 0x1c, 0x39, 0x5d, 0x2e, /* Byte value: 0xcf */ + 0xc8, 0xcf, 0xc4, 0x58, 0x5e, 0xd3, 0xf5, 0x76, 0x6e, 0x58, 0x6b, 0xb7, 0xd4, 0x21, 0x36, 0x3e, /* Byte value: 0xd0 */ + 0x03, 0xc9, 0x08, 0xc7, 0x23, 0x67, 0x0a, 0x19, 0x0f, 0xc7, 0x99, 0x87, 0xad, 0xa7, 0xc8, 0x7b, /* Byte value: 0xd1 */ + 0xed, 0x60, 0x9d, 0xe4, 0xdc, 0x11, 0x2b, 0x3f, 0xdf, 0xe4, 0xfb, 0x86, 0x9c, 0xb7, 0x3b, 0xda, /* Byte value: 0xd2 */ + 0x70, 0xa3, 0x02, 0x41, 0x78, 0x69, 0xe3, 0x97, 0x73, 0x41, 0xb7, 0x51, 0xba, 0x59, 0x32, 0x6e, /* Byte value: 0xd3 */ + 0x3c, 0x6f, 0xa0, 0xb7, 0xf9, 0xe0, 0x88, 0x37, 0xcc, 0xb7, 0xa5, 0xfe, 0xb3, 0x3b, 0x7b, 0x93, /* Byte value: 0xd4 */ + 0x8e, 0xf0, 0x56, 0x79, 0x15, 0xcb, 0xa2, 0x80, 0xf3, 0x79, 0xa9, 0x8c, 0xb5, 0x17, 0x8a, 0x1a, /* Byte value: 0xd5 */ + 0xd9, 0x72, 0xbc, 0xbf, 0x6c, 0x9b, 0x93, 0xf1, 0x3b, 0xbf, 0x60, 0x16, 0x30, 0xa3, 0x84, 0xc2, /* Byte value: 0xd6 */ + 0x10, 0xfa, 0xc1, 0x1b, 0x92, 0xd4, 0x60, 0x31, 0x50, 0x1b, 0x7c, 0xdc, 0x3e, 0x5e, 0x4b, 0xd5, /* Byte value: 0xd7 */ + 0x1a, 0x09, 0xf1, 0xcc, 0x58, 0x45, 0x5c, 0x67, 0x72, 0xcc, 0xac, 0x48, 0x56, 0x0a, 0xbe, 0x0c, /* Byte value: 0xd8 */ + 0x9d, 0xc3, 0x9f, 0xa5, 0xa4, 0x78, 0xc8, 0xa8, 0xac, 0xa5, 0x4c, 0xd7, 0x26, 0xee, 0x09, 0xb4, /* Byte value: 0xd9 */ + 0xee, 0xa9, 0x95, 0x23, 0xff, 0x76, 0x21, 0x26, 0xd0, 0x23, 0x62, 0x01, 0x31, 0x10, 0xf3, 0xa1, /* Byte value: 0xda */ + 0xcb, 0x06, 0xcc, 0x9f, 0x7d, 0xb4, 0xff, 0x6f, 0x61, 0x9f, 0xf2, 0x30, 0x79, 0x86, 0xfe, 0x45, /* Byte value: 0xdb */ + 0x97, 0x30, 0xaf, 0x72, 0x6e, 0xe9, 0xf4, 0xfe, 0x8e, 0x72, 0x9c, 0x43, 0x4e, 0xba, 0xfc, 0x6d, /* Byte value: 0xdc */ + 0xc9, 0x88, 0x7d, 0xa4, 0xfe, 0x4f, 0xf3, 0xc0, 0x6b, 0xa4, 0x1c, 0xca, 0x0e, 0xfd, 0xcf, 0x17, /* Byte value: 0xdd */ + 0x79, 0x99, 0x3a, 0x51, 0x91, 0x9f, 0xd5, 0xd8, 0x5e, 0x51, 0xfe, 0x42, 0x7f, 0xaa, 0x0f, 0xcc, /* Byte value: 0xde */ + 0xb2, 0x9f, 0xf6, 0xce, 0xec, 0x2b, 0x2a, 0xb7, 0x3f, 0xce, 0x0c, 0x72, 0x06, 0x2c, 0xf1, 0x89, /* Byte value: 0xdf */ + 0x35, 0x55, 0x98, 0xa7, 0x10, 0x16, 0xbe, 0x78, 0xe1, 0xa7, 0xec, 0xed, 0x76, 0xc8, 0x46, 0x31, /* Byte value: 0xe0 */ + 0x6c, 0xfb, 0xe3, 0xc0, 0x66, 0xe2, 0xab, 0xc2, 0x1f, 0xc0, 0xea, 0xd4, 0x75, 0xde, 0xdf, 0x94, /* Byte value: 0xe1 */ + 0x9c, 0x84, 0x26, 0x59, 0x04, 0xe4, 0xce, 0x1e, 0xa9, 0x59, 0x3b, 0xaa, 0xfc, 0x32, 0xf0, 0x9d, /* Byte value: 0xe2 */ + 0x1b, 0x4e, 0x48, 0x30, 0xf8, 0xd9, 0x5a, 0xd1, 0x77, 0x30, 0xdb, 0x35, 0x8c, 0xd6, 0x47, 0x25, /* Byte value: 0xe3 */ + 0x05, 0x98, 0x18, 0x8a, 0x65, 0xa9, 0x1e, 0x2b, 0x11, 0x8a, 0x68, 0x4a, 0x34, 0x2a, 0x9b, 0x8d, /* Byte value: 0xe4 */ + 0x50, 0x94, 0x43, 0x77, 0x9f, 0x02, 0x23, 0xf5, 0xd3, 0x77, 0x4f, 0x2a, 0xc6, 0xe5, 0xa4, 0x07, /* Byte value: 0xe5 */ + 0xf0, 0x7f, 0xc5, 0x99, 0x62, 0x06, 0x65, 0xdc, 0xb6, 0x99, 0xd1, 0x7e, 0x89, 0xec, 0x2f, 0x09, /* Byte value: 0xe6 */ + 0xd1, 0x0f, 0x3d, 0x53, 0x25, 0xf1, 0xa3, 0x08, 0x13, 0x53, 0x5e, 0x78, 0x2f, 0x8c, 0x40, 0x49, /* Byte value: 0xe7 */ + 0x12, 0x74, 0x70, 0x20, 0x11, 0x2f, 0x6c, 0x9e, 0x5a, 0x20, 0x92, 0x26, 0x49, 0x25, 0x7a, 0x87, /* Byte value: 0xe8 */ + 0x87, 0xca, 0x6e, 0x69, 0xfc, 0x3d, 0x94, 0xcf, 0xde, 0x69, 0xe0, 0x9f, 0x70, 0xe4, 0xb7, 0xb8, /* Byte value: 0xe9 */ + 0x08, 0x7d, 0x81, 0xec, 0x49, 0x6a, 0x30, 0xf9, 0x28, 0xec, 0x3e, 0x6e, 0x1f, 0x2f, 0xc4, 0x8b, /* Byte value: 0xea */ + 0x59, 0xae, 0x7b, 0x67, 0x76, 0xf4, 0x15, 0xba, 0xfe, 0x67, 0x06, 0x39, 0x03, 0x16, 0x99, 0xa5, /* Byte value: 0xeb */ + 0xfc, 0xdd, 0xe5, 0x03, 0xee, 0x59, 0x4d, 0xb8, 0x8a, 0x03, 0xf0, 0x27, 0x78, 0x35, 0x89, 0x26, /* Byte value: 0xec */ + 0x21, 0x70, 0xf8, 0xca, 0x47, 0xf7, 0xc6, 0xd4, 0xa5, 0xca, 0x8f, 0x06, 0xa6, 0x60, 0x6f, 0x40, /* Byte value: 0xed */ + 0x85, 0x44, 0xdf, 0x52, 0x7f, 0xc6, 0x98, 0x60, 0xd4, 0x52, 0x0e, 0x65, 0x07, 0x9f, 0x86, 0xea, /* Byte value: 0xee */ + 0x55, 0x0c, 0x5b, 0xfd, 0xfa, 0xab, 0x3d, 0xde, 0xc2, 0xfd, 0x27, 0x60, 0xf2, 0xcf, 0x3f, 0x8a, /* Byte value: 0xef */ + 0x4e, 0x42, 0x13, 0xcd, 0x02, 0x72, 0x67, 0x0f, 0xb5, 0xcd, 0xfc, 0x55, 0x7e, 0x19, 0x78, 0xaf, /* Byte value: 0xf0 */ + 0xec, 0x27, 0x24, 0x18, 0x7c, 0x8d, 0x2d, 0x89, 0xda, 0x18, 0x8c, 0xfb, 0x46, 0x6b, 0xc2, 0xf3, /* Byte value: 0xf1 */ + 0xfb, 0xcb, 0x4c, 0xb2, 0x08, 0x0b, 0x5f, 0x3c, 0x91, 0xb2, 0x76, 0x97, 0x3b, 0x64, 0x23, 0xf9, /* Byte value: 0xf2 */ + 0x36, 0x9c, 0x90, 0x60, 0x33, 0x71, 0xb4, 0x61, 0xee, 0x60, 0x75, 0x6a, 0xdb, 0x6f, 0x8e, 0x4a, /* Byte value: 0xf3 */ + 0x75, 0x3b, 0x1a, 0xcb, 0x1d, 0xc0, 0xfd, 0xbc, 0x62, 0xcb, 0xdf, 0x1b, 0x8e, 0x73, 0xa9, 0xe3, /* Byte value: 0xf4 */ + 0x37, 0xdb, 0x29, 0x9c, 0x93, 0xed, 0xb2, 0xd7, 0xeb, 0x9c, 0x02, 0x17, 0x01, 0xb3, 0x77, 0x63, /* Byte value: 0xf5 */ + 0x5c, 0x36, 0x63, 0xed, 0x13, 0x5d, 0x0b, 0x91, 0xef, 0xed, 0x6e, 0x73, 0x37, 0x3c, 0x02, 0x28, /* Byte value: 0xf6 */ + 0xf6, 0x2e, 0xd5, 0xd4, 0x24, 0xc8, 0x71, 0xee, 0xa8, 0xd4, 0x20, 0xb3, 0x10, 0x61, 0x7c, 0xff, /* Byte value: 0xf7 */ + 0xf4, 0xa0, 0x64, 0xef, 0xa7, 0x33, 0x7d, 0x41, 0xa2, 0xef, 0xce, 0x49, 0x67, 0x1a, 0x4d, 0xad, /* Byte value: 0xf8 */ + 0xcd, 0x57, 0xdc, 0xd2, 0x3b, 0x7a, 0xeb, 0x5d, 0x7f, 0xd2, 0x03, 0xfd, 0xe0, 0x0b, 0xad, 0xb3, /* Byte value: 0xf9 */ + 0x6b, 0xed, 0x4a, 0x71, 0x80, 0xb0, 0xb9, 0x46, 0x04, 0x71, 0x6c, 0x64, 0x36, 0x8f, 0x75, 0x4b, /* Byte value: 0xfa */ + 0xa2, 0x65, 0x37, 0xd5, 0x7e, 0xff, 0x4a, 0x86, 0x6f, 0xd5, 0x70, 0xae, 0x38, 0x72, 0xba, 0x5c, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0xaa, 0x18, 0xb6, 0x39, 0x37, 0x95, 0x7a, 0x7f, 0x47, 0x39, 0x4e, 0xc0, 0x27, 0x5d, 0x7e, 0xd7, /* Byte value: 0xfd */ + 0x71, 0xe4, 0xbb, 0xbd, 0xd8, 0xf5, 0xe5, 0x21, 0x76, 0xbd, 0xc0, 0x2c, 0x60, 0x85, 0xcb, 0x47, /* Byte value: 0xfe */ + 0x42, 0xe0, 0x33, 0x57, 0x8e, 0x2d, 0x4f, 0x6b, 0x89, 0x57, 0xdd, 0x0c, 0x8f, 0xc0, 0xde, 0x80, /* Byte value: 0xff */ + + /* Matrix row: 4 */ + 0xc2, 0x36, 0xbf, 0xb8, 0xb8, 0xed, 0xf8, 0xa5, 0xff, 0x6a, 0x2d, 0xa5, 0x4a, 0x84, 0x52, 0x5c, /* Byte value: 0x00 */ + 0x95, 0x8b, 0xd1, 0x9a, 0x9a, 0x0a, 0x38, 0x2d, 0x73, 0xc6, 0x2f, 0x2d, 0x97, 0x24, 0xdb, 0x4d, /* Byte value: 0x01 */ + 0xa6, 0x30, 0x54, 0xed, 0xed, 0x72, 0xdb, 0x32, 0x62, 0xa7, 0x28, 0x32, 0xbc, 0x57, 0x26, 0x97, /* Byte value: 0x02 */ + 0x27, 0xcf, 0x12, 0x53, 0x53, 0x58, 0x5c, 0x8f, 0x1d, 0x07, 0x49, 0x8f, 0xe1, 0x72, 0x4a, 0xc8, /* Byte value: 0x03 */ + 0xe0, 0xe4, 0xf8, 0xe2, 0xe2, 0xbd, 0xfb, 0x0e, 0xe1, 0x95, 0x96, 0x0e, 0x78, 0x67, 0x45, 0x71, /* Byte value: 0x04 */ + 0x86, 0x51, 0x31, 0x0c, 0x0c, 0x4d, 0xfe, 0x30, 0xc3, 0x57, 0x98, 0x30, 0x2e, 0x81, 0x7c, 0x06, /* Byte value: 0x05 */ + 0x06, 0x16, 0x66, 0x0e, 0x0e, 0xb1, 0x6a, 0x38, 0x02, 0x11, 0x1d, 0x38, 0x23, 0x5f, 0xd7, 0x07, /* Byte value: 0x06 */ + 0x5d, 0x87, 0xc4, 0x30, 0x30, 0xf7, 0x7e, 0xc0, 0x8a, 0x9f, 0x25, 0xc0, 0xb8, 0x41, 0x33, 0x18, /* Byte value: 0x07 */ + 0x09, 0x31, 0x99, 0x15, 0x15, 0xa9, 0x8b, 0x54, 0x07, 0xda, 0xc8, 0x54, 0x95, 0x2f, 0x30, 0xeb, /* Byte value: 0x08 */ + 0x78, 0xfb, 0xf4, 0xd8, 0xd8, 0xc0, 0x04, 0xe6, 0x28, 0x97, 0x67, 0xe6, 0xf9, 0x06, 0x34, 0x6c, /* Byte value: 0x09 */ + 0xf4, 0x90, 0x6f, 0xc6, 0xc6, 0x9d, 0x44, 0x9e, 0xed, 0xf3, 0xd8, 0x9e, 0xb2, 0x66, 0xf2, 0x63, /* Byte value: 0x0a */ + 0x16, 0xc7, 0xb5, 0x9f, 0x9f, 0x4f, 0x99, 0x39, 0xb3, 0x69, 0x45, 0x39, 0x6a, 0x34, 0xfa, 0xae, /* Byte value: 0x0b */ + 0x19, 0xe0, 0x4a, 0x84, 0x84, 0x57, 0x78, 0x55, 0xb6, 0xa2, 0x90, 0x55, 0xdc, 0x44, 0x1d, 0x42, /* Byte value: 0x0c */ + 0xec, 0xc8, 0x34, 0xfe, 0xfe, 0x1c, 0x2f, 0x7e, 0xe5, 0xb7, 0xac, 0x7e, 0x3e, 0xd9, 0x28, 0x7f, /* Byte value: 0x0d */ + 0x69, 0x92, 0x36, 0xf5, 0xf5, 0xe8, 0xe4, 0x52, 0x27, 0x09, 0xdb, 0x52, 0xe0, 0x96, 0xde, 0x9b, /* Byte value: 0x0e */ + 0x04, 0xa5, 0x44, 0xb5, 0xb5, 0xde, 0x4c, 0x91, 0xbd, 0x1e, 0x16, 0x91, 0x83, 0x6a, 0x9a, 0xbb, /* Byte value: 0x0f */ + 0x8f, 0x60, 0xa8, 0x19, 0x19, 0xe4, 0x75, 0x64, 0xc4, 0x8d, 0x50, 0x64, 0xbb, 0xae, 0x4c, 0xed, /* Byte value: 0x10 */ + 0x30, 0xb0, 0xb6, 0x70, 0x70, 0xc1, 0xd6, 0x03, 0x10, 0x88, 0xe8, 0x03, 0xdb, 0xbd, 0x77, 0x38, /* Byte value: 0x11 */ + 0x39, 0x81, 0x2f, 0x65, 0x65, 0x68, 0x5d, 0x57, 0x17, 0x52, 0x20, 0x57, 0x4e, 0x92, 0x47, 0xd3, /* Byte value: 0x12 */ + 0xe9, 0xd5, 0x61, 0xf7, 0xf7, 0x14, 0x70, 0x5a, 0xe6, 0x4f, 0x5e, 0x5a, 0xed, 0x48, 0x75, 0x9a, /* Byte value: 0x13 */ + 0x03, 0x0b, 0x33, 0x07, 0x07, 0xb9, 0x35, 0x1c, 0x01, 0xe9, 0xef, 0x1c, 0xf0, 0xce, 0x8a, 0xe2, /* Byte value: 0x14 */ + 0xcf, 0xa2, 0x62, 0x18, 0x18, 0x9a, 0x3f, 0x60, 0x45, 0xae, 0xf3, 0x60, 0x5c, 0xc1, 0xf8, 0x0c, /* Byte value: 0x15 */ + 0x70, 0x72, 0x7c, 0x71, 0x71, 0xbf, 0x9c, 0x07, 0x91, 0xab, 0x4b, 0x07, 0x3c, 0xd2, 0xc3, 0xd9, /* Byte value: 0x16 */ + 0x43, 0xc9, 0xf9, 0x06, 0x06, 0xc7, 0x7f, 0x18, 0x80, 0xca, 0x4c, 0x18, 0x17, 0xa1, 0x3e, 0x03, /* Byte value: 0x17 */ + 0x55, 0x0e, 0x4c, 0x99, 0x99, 0x88, 0xe6, 0x21, 0x33, 0xa3, 0x09, 0x21, 0x7d, 0x95, 0xc4, 0xad, /* Byte value: 0x18 */ + 0x2c, 0x4d, 0xa9, 0xfd, 0xfd, 0x9e, 0xf1, 0x72, 0xa5, 0xd2, 0x8a, 0x72, 0xd4, 0x68, 0x37, 0x9f, /* Byte value: 0x19 */ + 0x12, 0x62, 0xf1, 0x2a, 0x2a, 0x91, 0xd5, 0xa8, 0x0e, 0x77, 0x53, 0xa8, 0xe9, 0x5e, 0x60, 0x15, /* Byte value: 0x1a */ + 0x8e, 0xd8, 0xb9, 0xa5, 0xa5, 0x32, 0x66, 0xd1, 0x7a, 0x6b, 0xb4, 0xd1, 0xeb, 0x55, 0x8b, 0xb3, /* Byte value: 0x1b */ + 0xd5, 0x49, 0x1b, 0x9b, 0x9b, 0x74, 0x72, 0x29, 0xf2, 0xe5, 0x8c, 0x29, 0x70, 0x4b, 0x6f, 0xac, /* Byte value: 0x1c */ + 0x3d, 0x24, 0x6b, 0xd0, 0xd0, 0xb6, 0x11, 0xc6, 0xaa, 0x4c, 0x36, 0xc6, 0xcd, 0xf8, 0xdd, 0x68, /* Byte value: 0x1d */ + 0xd2, 0xe7, 0x6c, 0x29, 0x29, 0x13, 0x0b, 0xa4, 0x4e, 0x12, 0x75, 0xa4, 0x03, 0xef, 0x7f, 0xf5, /* Byte value: 0x1e */ + 0x76, 0x64, 0x1a, 0x7f, 0x7f, 0x0e, 0xf6, 0x3f, 0x93, 0xba, 0x56, 0x3f, 0x1f, 0x8d, 0x14, 0xde, /* Byte value: 0x1f */ + 0x18, 0x58, 0x5b, 0x38, 0x38, 0x81, 0x6b, 0xe0, 0x08, 0x44, 0x74, 0xe0, 0x8c, 0xbf, 0xda, 0x1c, /* Byte value: 0x20 */ + 0x35, 0xad, 0xe3, 0x79, 0x79, 0xc9, 0x89, 0x27, 0x13, 0x70, 0x1a, 0x27, 0x08, 0x2c, 0x2a, 0xdd, /* Byte value: 0x21 */ + 0x07, 0xae, 0x77, 0xb2, 0xb2, 0x67, 0x79, 0x8d, 0xbc, 0xf7, 0xf9, 0x8d, 0x73, 0xa4, 0x10, 0x59, /* Byte value: 0x22 */ + 0xc0, 0x85, 0x9d, 0x03, 0x03, 0x82, 0xde, 0x0c, 0x40, 0x65, 0x26, 0x0c, 0xea, 0xb1, 0x1f, 0xe0, /* Byte value: 0x23 */ + 0xf7, 0x9b, 0x5c, 0xc1, 0xc1, 0x24, 0x71, 0x82, 0xec, 0x1a, 0x37, 0x82, 0x42, 0xa8, 0x78, 0x81, /* Byte value: 0x24 */ + 0xb8, 0x7e, 0x69, 0xdb, 0xdb, 0x42, 0xda, 0xea, 0x68, 0xf2, 0x41, 0xea, 0x13, 0xb7, 0x2b, 0x8c, /* Byte value: 0x25 */ + 0x72, 0xc1, 0x5e, 0xca, 0xca, 0xd0, 0xba, 0xae, 0x2e, 0xa4, 0x40, 0xae, 0x9c, 0xe7, 0x8e, 0x65, /* Byte value: 0x26 */ + 0x11, 0x69, 0xc2, 0x2d, 0x2d, 0x28, 0xe0, 0xb4, 0x0f, 0x9e, 0xbc, 0xb4, 0x19, 0x90, 0xea, 0xf7, /* Byte value: 0x27 */ + 0xb4, 0x52, 0xa5, 0xc7, 0xc7, 0xe3, 0x0e, 0x9a, 0x6c, 0xd0, 0x7b, 0x9a, 0x55, 0x09, 0x46, 0x82, /* Byte value: 0x28 */ + 0xff, 0x12, 0xd4, 0x68, 0x68, 0x5b, 0xe9, 0x63, 0x55, 0x26, 0x1b, 0x63, 0x87, 0x7c, 0x8f, 0x34, /* Byte value: 0x29 */ + 0x1a, 0xeb, 0x79, 0x83, 0x83, 0xee, 0x4d, 0x49, 0xb7, 0x4b, 0x7f, 0x49, 0x2c, 0x8a, 0x97, 0xa0, /* Byte value: 0x2a */ + 0x48, 0x4b, 0x42, 0xa8, 0xa8, 0x01, 0xd2, 0xe5, 0x38, 0x1f, 0x8f, 0xe5, 0x22, 0xbb, 0x43, 0x54, /* Byte value: 0x2b */ + 0xaa, 0x1c, 0x98, 0xf1, 0xf1, 0xd3, 0x0f, 0x42, 0x66, 0x85, 0x12, 0x42, 0xfa, 0xe9, 0x4b, 0x99, /* Byte value: 0x2c */ + 0x58, 0x9a, 0x91, 0x39, 0x39, 0xff, 0x21, 0xe4, 0x89, 0x67, 0xd7, 0xe4, 0x6b, 0xd0, 0x6e, 0xfd, /* Byte value: 0x2d */ + 0x93, 0x9d, 0xb7, 0x94, 0x94, 0xbb, 0x52, 0x15, 0x71, 0xd7, 0x32, 0x15, 0xb4, 0x7b, 0x0c, 0x4a, /* Byte value: 0x2e */ + 0x21, 0xd9, 0x74, 0x5d, 0x5d, 0xe9, 0x36, 0xb7, 0x1f, 0x16, 0x54, 0xb7, 0xc2, 0x2d, 0x9d, 0xcf, /* Byte value: 0x2f */ + 0xdd, 0xc0, 0x93, 0x32, 0x32, 0x0b, 0xea, 0xc8, 0x4b, 0xd9, 0xa0, 0xc8, 0xb5, 0x9f, 0x98, 0x19, /* Byte value: 0x30 */ + 0x60, 0xa3, 0xaf, 0xe0, 0xe0, 0x41, 0x6f, 0x06, 0x20, 0xd3, 0x13, 0x06, 0x75, 0xb9, 0xee, 0x70, /* Byte value: 0x31 */ + 0x0c, 0x2c, 0xcc, 0x1c, 0x1c, 0xa1, 0xd4, 0x70, 0x04, 0x22, 0x3a, 0x70, 0x46, 0xbe, 0x6d, 0x0e, /* Byte value: 0x32 */ + 0xc4, 0x20, 0xd9, 0xb6, 0xb6, 0x5c, 0x92, 0x9d, 0xfd, 0x7b, 0x30, 0x9d, 0x69, 0xdb, 0x85, 0x5b, /* Byte value: 0x33 */ + 0x9a, 0xac, 0x2e, 0x81, 0x81, 0x12, 0xd9, 0x41, 0x76, 0x0d, 0xfa, 0x41, 0x21, 0x54, 0x3c, 0xa1, /* Byte value: 0x34 */ + 0x5c, 0x3f, 0xd5, 0x8c, 0x8c, 0x21, 0x6d, 0x75, 0x34, 0x79, 0xc1, 0x75, 0xe8, 0xba, 0xf4, 0x46, /* Byte value: 0x35 */ + 0x53, 0x18, 0x2a, 0x97, 0x97, 0x39, 0x8c, 0x19, 0x31, 0xb2, 0x14, 0x19, 0x5e, 0xca, 0x13, 0xaa, /* Byte value: 0x36 */ + 0xcd, 0x11, 0x40, 0xa3, 0xa3, 0xf5, 0x19, 0xc9, 0xfa, 0xa1, 0xf8, 0xc9, 0xfc, 0xf4, 0xb5, 0xb0, /* Byte value: 0x37 */ + 0x32, 0x03, 0x94, 0xcb, 0xcb, 0xae, 0xf0, 0xaa, 0xaf, 0x87, 0xe3, 0xaa, 0x7b, 0x88, 0x3a, 0x84, /* Byte value: 0x38 */ + 0x1b, 0x53, 0x68, 0x3f, 0x3f, 0x38, 0x5e, 0xfc, 0x09, 0xad, 0x9b, 0xfc, 0x7c, 0x71, 0x50, 0xfe, /* Byte value: 0x39 */ + 0x5a, 0x29, 0xb3, 0x82, 0x82, 0x90, 0x07, 0x4d, 0x36, 0x68, 0xdc, 0x4d, 0xcb, 0xe5, 0x23, 0x41, /* Byte value: 0x3a */ + 0xa1, 0x9e, 0x23, 0x5f, 0x5f, 0x15, 0xa2, 0xbf, 0xde, 0x50, 0xd1, 0xbf, 0xcf, 0xf3, 0x36, 0xce, /* Byte value: 0x3b */ + 0xe5, 0xf9, 0xad, 0xeb, 0xeb, 0xb5, 0xa4, 0x2a, 0xe2, 0x6d, 0x64, 0x2a, 0xab, 0xf6, 0x18, 0x94, /* Byte value: 0x3c */ + 0x3c, 0x9c, 0x7a, 0x6c, 0x6c, 0x60, 0x02, 0x73, 0x14, 0xaa, 0xd2, 0x73, 0x9d, 0x03, 0x1a, 0x36, /* Byte value: 0x3d */ + 0x97, 0x38, 0xf3, 0x21, 0x21, 0x65, 0x1e, 0x84, 0xcc, 0xc9, 0x24, 0x84, 0x37, 0x11, 0x96, 0xf1, /* Byte value: 0x3e */ + 0xce, 0x1a, 0x73, 0xa4, 0xa4, 0x4c, 0x2c, 0xd5, 0xfb, 0x48, 0x17, 0xd5, 0x0c, 0x3a, 0x3f, 0x52, /* Byte value: 0x3f */ + 0x6d, 0x37, 0x72, 0x40, 0x40, 0x36, 0xa8, 0xc3, 0x9a, 0x17, 0xcd, 0xc3, 0x63, 0xfc, 0x44, 0x20, /* Byte value: 0x40 */ + 0x62, 0x10, 0x8d, 0x5b, 0x5b, 0x2e, 0x49, 0xaf, 0x9f, 0xdc, 0x18, 0xaf, 0xd5, 0x8c, 0xa3, 0xcc, /* Byte value: 0x41 */ + 0xf5, 0x28, 0x7e, 0x7a, 0x7a, 0x4b, 0x57, 0x2b, 0x53, 0x15, 0x3c, 0x2b, 0xe2, 0x9d, 0x35, 0x3d, /* Byte value: 0x42 */ + 0xb7, 0x59, 0x96, 0xc0, 0xc0, 0x5a, 0x3b, 0x86, 0x6d, 0x39, 0x94, 0x86, 0xa5, 0xc7, 0xcc, 0x60, /* Byte value: 0x43 */ + 0xe2, 0x57, 0xda, 0x59, 0x59, 0xd2, 0xdd, 0xa7, 0x5e, 0x9a, 0x9d, 0xa7, 0xd8, 0x52, 0x08, 0xcd, /* Byte value: 0x44 */ + 0x41, 0x7a, 0xdb, 0xbd, 0xbd, 0xa8, 0x59, 0xb1, 0x3f, 0xc5, 0x47, 0xb1, 0xb7, 0x94, 0x73, 0xbf, /* Byte value: 0x45 */ + 0x71, 0xca, 0x6d, 0xcd, 0xcd, 0x69, 0x8f, 0xb2, 0x2f, 0x4d, 0xaf, 0xb2, 0x6c, 0x29, 0x04, 0x87, /* Byte value: 0x46 */ + 0xf9, 0x04, 0xb2, 0x66, 0x66, 0xea, 0x83, 0x5b, 0x57, 0x37, 0x06, 0x5b, 0xa4, 0x23, 0x58, 0x33, /* Byte value: 0x47 */ + 0xea, 0xde, 0x52, 0xf0, 0xf0, 0xad, 0x45, 0x46, 0xe7, 0xa6, 0xb1, 0x46, 0x1d, 0x86, 0xff, 0x78, /* Byte value: 0x48 */ + 0xae, 0xb9, 0xdc, 0x44, 0x44, 0x0d, 0x43, 0xd3, 0xdb, 0x9b, 0x04, 0xd3, 0x79, 0x83, 0xd1, 0x22, /* Byte value: 0x49 */ + 0xe4, 0x41, 0xbc, 0x57, 0x57, 0x63, 0xb7, 0x9f, 0x5c, 0x8b, 0x80, 0x9f, 0xfb, 0x0d, 0xdf, 0xca, /* Byte value: 0x4a */ + 0x0b, 0x82, 0xbb, 0xae, 0xae, 0xc6, 0xad, 0xfd, 0xb8, 0xd5, 0xc3, 0xfd, 0x35, 0x1a, 0x7d, 0x57, /* Byte value: 0x4b */ + 0xde, 0xcb, 0xa0, 0x35, 0x35, 0xb2, 0xdf, 0xd4, 0x4a, 0x30, 0x4f, 0xd4, 0x45, 0x51, 0x12, 0xfb, /* Byte value: 0x4c */ + 0xf0, 0x35, 0x2b, 0x73, 0x73, 0x43, 0x08, 0x0f, 0x50, 0xed, 0xce, 0x0f, 0x31, 0x0c, 0x68, 0xd8, /* Byte value: 0x4d */ + 0xd4, 0xf1, 0x0a, 0x27, 0x27, 0xa2, 0x61, 0x9c, 0x4c, 0x03, 0x68, 0x9c, 0x20, 0xb0, 0xa8, 0xf2, /* Byte value: 0x4e */ + 0xb5, 0xea, 0xb4, 0x7b, 0x7b, 0x35, 0x1d, 0x2f, 0xd2, 0x36, 0x9f, 0x2f, 0x05, 0xf2, 0x81, 0xdc, /* Byte value: 0x4f */ + 0xa4, 0x83, 0x76, 0x56, 0x56, 0x1d, 0xfd, 0x9b, 0xdd, 0xa8, 0x23, 0x9b, 0x1c, 0x62, 0x6b, 0x2b, /* Byte value: 0x50 */ + 0xba, 0xcd, 0x4b, 0x60, 0x60, 0x2d, 0xfc, 0x43, 0xd7, 0xfd, 0x4a, 0x43, 0xb3, 0x82, 0x66, 0x30, /* Byte value: 0x51 */ + 0xe8, 0x6d, 0x70, 0x4b, 0x4b, 0xc2, 0x63, 0xef, 0x58, 0xa9, 0xba, 0xef, 0xbd, 0xb3, 0xb2, 0xc4, /* Byte value: 0x52 */ + 0x0e, 0x9f, 0xee, 0xa7, 0xa7, 0xce, 0xf2, 0xd9, 0xbb, 0x2d, 0x31, 0xd9, 0xe6, 0x8b, 0x20, 0xb2, /* Byte value: 0x53 */ + 0x9c, 0xba, 0x48, 0x8f, 0x8f, 0xa3, 0xb3, 0x79, 0x74, 0x1c, 0xe7, 0x79, 0x02, 0x0b, 0xeb, 0xa6, /* Byte value: 0x54 */ + 0x31, 0x08, 0xa7, 0xcc, 0xcc, 0x17, 0xc5, 0xb6, 0xae, 0x6e, 0x0c, 0xb6, 0x8b, 0x46, 0xb0, 0x66, /* Byte value: 0x55 */ + 0x79, 0x43, 0xe5, 0x64, 0x64, 0x16, 0x17, 0x53, 0x96, 0x71, 0x83, 0x53, 0xa9, 0xfd, 0xf3, 0x32, /* Byte value: 0x56 */ + 0xfc, 0x19, 0xe7, 0x6f, 0x6f, 0xe2, 0xdc, 0x7f, 0x54, 0xcf, 0xf4, 0x7f, 0x77, 0xb2, 0x05, 0xd6, /* Byte value: 0x57 */ + 0x4d, 0x56, 0x17, 0xa1, 0xa1, 0x09, 0x8d, 0xc1, 0x3b, 0xe7, 0x7d, 0xc1, 0xf1, 0x2a, 0x1e, 0xb1, /* Byte value: 0x58 */ + 0xdb, 0xd6, 0xf5, 0x3c, 0x3c, 0xba, 0x80, 0xf0, 0x49, 0xc8, 0xbd, 0xf0, 0x96, 0xc0, 0x4f, 0x1e, /* Byte value: 0x59 */ + 0x75, 0x6f, 0x29, 0x78, 0x78, 0xb7, 0xc3, 0x23, 0x92, 0x53, 0xb9, 0x23, 0xef, 0x43, 0x9e, 0x3c, /* Byte value: 0x5a */ + 0x68, 0x2a, 0x27, 0x49, 0x49, 0x3e, 0xf7, 0xe7, 0x99, 0xef, 0x3f, 0xe7, 0xb0, 0x6d, 0x19, 0xc5, /* Byte value: 0x5b */ + 0x15, 0xcc, 0x86, 0x98, 0x98, 0xf6, 0xac, 0x25, 0xb2, 0x80, 0xaa, 0x25, 0x9a, 0xfa, 0x70, 0x4c, /* Byte value: 0x5c */ + 0xa9, 0x17, 0xab, 0xf6, 0xf6, 0x6a, 0x3a, 0x5e, 0x67, 0x6c, 0xfd, 0x5e, 0x0a, 0x27, 0xc1, 0x7b, /* Byte value: 0x5d */ + 0x01, 0xb8, 0x11, 0xbc, 0xbc, 0xd6, 0x13, 0xb5, 0xbe, 0xe6, 0xe4, 0xb5, 0x50, 0xfb, 0xc7, 0x5e, /* Byte value: 0x5e */ + 0x23, 0x6a, 0x56, 0xe6, 0xe6, 0x86, 0x10, 0x1e, 0xa0, 0x19, 0x5f, 0x1e, 0x62, 0x18, 0xd0, 0x73, /* Byte value: 0x5f */ + 0xb2, 0x44, 0xc3, 0xc9, 0xc9, 0x52, 0x64, 0xa2, 0x6e, 0xc1, 0x66, 0xa2, 0x76, 0x56, 0x91, 0x85, /* Byte value: 0x60 */ + 0x6e, 0x3c, 0x41, 0x47, 0x47, 0x8f, 0x9d, 0xdf, 0x9b, 0xfe, 0x22, 0xdf, 0x93, 0x32, 0xce, 0xc2, /* Byte value: 0x61 */ + 0xf2, 0x86, 0x09, 0xc8, 0xc8, 0x2c, 0x2e, 0xa6, 0xef, 0xe2, 0xc5, 0xa6, 0x91, 0x39, 0x25, 0x64, /* Byte value: 0x62 */ + 0x3b, 0x32, 0x0d, 0xde, 0xde, 0x07, 0x7b, 0xfe, 0xa8, 0x5d, 0x2b, 0xfe, 0xee, 0xa7, 0x0a, 0x6f, /* Byte value: 0x63 */ + 0x52, 0xa0, 0x3b, 0x2b, 0x2b, 0xef, 0x9f, 0xac, 0x8f, 0x54, 0xf0, 0xac, 0x0e, 0x31, 0xd4, 0xf4, /* Byte value: 0x64 */ + 0x65, 0xbe, 0xfa, 0xe9, 0xe9, 0x49, 0x30, 0x22, 0x23, 0x2b, 0xe1, 0x22, 0xa6, 0x28, 0xb3, 0x95, /* Byte value: 0x65 */ + 0x4b, 0x40, 0x71, 0xaf, 0xaf, 0xb8, 0xe7, 0xf9, 0x39, 0xf6, 0x60, 0xf9, 0xd2, 0x75, 0xc9, 0xb6, /* Byte value: 0x66 */ + 0x38, 0x39, 0x3e, 0xd9, 0xd9, 0xbe, 0x4e, 0xe2, 0xa9, 0xb4, 0xc4, 0xe2, 0x1e, 0x69, 0x80, 0x8d, /* Byte value: 0x67 */ + 0x2a, 0x5b, 0xcf, 0xf3, 0xf3, 0x2f, 0x9b, 0x4a, 0xa7, 0xc3, 0x97, 0x4a, 0xf7, 0x37, 0xe0, 0x98, /* Byte value: 0x68 */ + 0x91, 0x2e, 0x95, 0x2f, 0x2f, 0xd4, 0x74, 0xbc, 0xce, 0xd8, 0x39, 0xbc, 0x14, 0x4e, 0x41, 0xf6, /* Byte value: 0x69 */ + 0xd6, 0x42, 0x28, 0x9c, 0x9c, 0xcd, 0x47, 0x35, 0xf3, 0x0c, 0x63, 0x35, 0x80, 0x85, 0xe5, 0x4e, /* Byte value: 0x6a */ + 0xfd, 0xa1, 0xf6, 0xd3, 0xd3, 0x34, 0xcf, 0xca, 0xea, 0x29, 0x10, 0xca, 0x27, 0x49, 0xc2, 0x88, /* Byte value: 0x6b */ + 0xf8, 0xbc, 0xa3, 0xda, 0xda, 0x3c, 0x90, 0xee, 0xe9, 0xd1, 0xe2, 0xee, 0xf4, 0xd8, 0x9f, 0x6d, /* Byte value: 0x6c */ + 0x8c, 0x6b, 0x9b, 0x1e, 0x1e, 0x5d, 0x40, 0x78, 0xc5, 0x64, 0xbf, 0x78, 0x4b, 0x60, 0xc6, 0x0f, /* Byte value: 0x6d */ + 0x50, 0x13, 0x19, 0x90, 0x90, 0x80, 0xb9, 0x05, 0x30, 0x5b, 0xfb, 0x05, 0xae, 0x04, 0x99, 0x48, /* Byte value: 0x6e */ + 0x7f, 0x55, 0x83, 0x6a, 0x6a, 0xa7, 0x7d, 0x6b, 0x94, 0x60, 0x9e, 0x6b, 0x8a, 0xa2, 0x24, 0x35, /* Byte value: 0x6f */ + 0x59, 0x22, 0x80, 0x85, 0x85, 0x29, 0x32, 0x51, 0x37, 0x81, 0x33, 0x51, 0x3b, 0x2b, 0xa9, 0xa3, /* Byte value: 0x70 */ + 0x08, 0x89, 0x88, 0xa9, 0xa9, 0x7f, 0x98, 0xe1, 0xb9, 0x3c, 0x2c, 0xe1, 0xc5, 0xd4, 0xf7, 0xb5, /* Byte value: 0x71 */ + 0xd9, 0x65, 0xd7, 0x87, 0x87, 0xd5, 0xa6, 0x59, 0xf6, 0xc7, 0xb6, 0x59, 0x36, 0xf5, 0x02, 0xa2, /* Byte value: 0x72 */ + 0xa2, 0x95, 0x10, 0x58, 0x58, 0xac, 0x97, 0xa3, 0xdf, 0xb9, 0x3e, 0xa3, 0x3f, 0x3d, 0xbc, 0x2c, /* Byte value: 0x73 */ + 0xfb, 0xb7, 0x90, 0xdd, 0xdd, 0x85, 0xa5, 0xf2, 0xe8, 0x38, 0x0d, 0xf2, 0x04, 0x16, 0x15, 0x8f, /* Byte value: 0x74 */ + 0x1c, 0xfd, 0x1f, 0x8d, 0x8d, 0x5f, 0x27, 0x71, 0xb5, 0x5a, 0x62, 0x71, 0x0f, 0xd5, 0x40, 0xa7, /* Byte value: 0x75 */ + 0x29, 0x50, 0xfc, 0xf4, 0xf4, 0x96, 0xae, 0x56, 0xa6, 0x2a, 0x78, 0x56, 0x07, 0xf9, 0x6a, 0x7a, /* Byte value: 0x76 */ + 0xd3, 0x5f, 0x7d, 0x95, 0x95, 0xc5, 0x18, 0x11, 0xf0, 0xf4, 0x91, 0x11, 0x53, 0x14, 0xb8, 0xab, /* Byte value: 0x77 */ + 0x6f, 0x84, 0x50, 0xfb, 0xfb, 0x59, 0x8e, 0x6a, 0x25, 0x18, 0xc6, 0x6a, 0xc3, 0xc9, 0x09, 0x9c, /* Byte value: 0x78 */ + 0x47, 0x6c, 0xbd, 0xb3, 0xb3, 0x19, 0x33, 0x89, 0x3d, 0xd4, 0x5a, 0x89, 0x94, 0xcb, 0xa4, 0xb8, /* Byte value: 0x79 */ + 0x54, 0xb6, 0x5d, 0x25, 0x25, 0x5e, 0xf5, 0x94, 0x8d, 0x45, 0xed, 0x94, 0x2d, 0x6e, 0x03, 0xf3, /* Byte value: 0x7a */ + 0x9f, 0xb1, 0x7b, 0x88, 0x88, 0x1a, 0x86, 0x65, 0x75, 0xf5, 0x08, 0x65, 0xf2, 0xc5, 0x61, 0x44, /* Byte value: 0x7b */ + 0x17, 0x7f, 0xa4, 0x23, 0x23, 0x99, 0x8a, 0x8c, 0x0d, 0x8f, 0xa1, 0x8c, 0x3a, 0xcf, 0x3d, 0xf0, /* Byte value: 0x7c */ + 0xe1, 0x5c, 0xe9, 0x5e, 0x5e, 0x6b, 0xe8, 0xbb, 0x5f, 0x73, 0x72, 0xbb, 0x28, 0x9c, 0x82, 0x2f, /* Byte value: 0x7d */ + 0x7c, 0x5e, 0xb0, 0x6d, 0x6d, 0x1e, 0x48, 0x77, 0x95, 0x89, 0x71, 0x77, 0x7a, 0x6c, 0xae, 0xd7, /* Byte value: 0x7e */ + 0x46, 0xd4, 0xac, 0x0f, 0x0f, 0xcf, 0x20, 0x3c, 0x83, 0x32, 0xbe, 0x3c, 0xc4, 0x30, 0x63, 0xe6, /* Byte value: 0x7f */ + 0xbc, 0xdb, 0x2d, 0x6e, 0x6e, 0x9c, 0x96, 0x7b, 0xd5, 0xec, 0x57, 0x7b, 0x90, 0xdd, 0xb1, 0x37, /* Byte value: 0x80 */ + 0xc5, 0x98, 0xc8, 0x0a, 0x0a, 0x8a, 0x81, 0x28, 0x43, 0x9d, 0xd4, 0x28, 0x39, 0x20, 0x42, 0x05, /* Byte value: 0x81 */ + 0x22, 0xd2, 0x47, 0x5a, 0x5a, 0x50, 0x03, 0xab, 0x1e, 0xff, 0xbb, 0xab, 0x32, 0xe3, 0x17, 0x2d, /* Byte value: 0x82 */ + 0xbe, 0x68, 0x0f, 0xd5, 0xd5, 0xf3, 0xb0, 0xd2, 0x6a, 0xe3, 0x5c, 0xd2, 0x30, 0xe8, 0xfc, 0x8b, /* Byte value: 0x83 */ + 0x96, 0x80, 0xe2, 0x9d, 0x9d, 0xb3, 0x0d, 0x31, 0x72, 0x2f, 0xc0, 0x31, 0x67, 0xea, 0x51, 0xaf, /* Byte value: 0x84 */ + 0x7e, 0xed, 0x92, 0xd6, 0xd6, 0x71, 0x6e, 0xde, 0x2a, 0x86, 0x7a, 0xde, 0xda, 0x59, 0xe3, 0x6b, /* Byte value: 0x85 */ + 0x1d, 0x45, 0x0e, 0x31, 0x31, 0x89, 0x34, 0xc4, 0x0b, 0xbc, 0x86, 0xc4, 0x5f, 0x2e, 0x87, 0xf9, /* Byte value: 0x86 */ + 0xb9, 0xc6, 0x78, 0x67, 0x67, 0x94, 0xc9, 0x5f, 0xd6, 0x14, 0xa5, 0x5f, 0x43, 0x4c, 0xec, 0xd2, /* Byte value: 0x87 */ + 0x9d, 0x02, 0x59, 0x33, 0x33, 0x75, 0xa0, 0xcc, 0xca, 0xfa, 0x03, 0xcc, 0x52, 0xf0, 0x2c, 0xf8, /* Byte value: 0x88 */ + 0xad, 0xb2, 0xef, 0x43, 0x43, 0xb4, 0x76, 0xcf, 0xda, 0x72, 0xeb, 0xcf, 0x89, 0x4d, 0x5b, 0xc0, /* Byte value: 0x89 */ + 0x6c, 0x8f, 0x63, 0xfc, 0xfc, 0xe0, 0xbb, 0x76, 0x24, 0xf1, 0x29, 0x76, 0x33, 0x07, 0x83, 0x7e, /* Byte value: 0x8a */ + 0x85, 0x5a, 0x02, 0x0b, 0x0b, 0xf4, 0xcb, 0x2c, 0xc2, 0xbe, 0x77, 0x2c, 0xde, 0x4f, 0xf6, 0xe4, /* Byte value: 0x8b */ + 0xd1, 0xec, 0x5f, 0x2e, 0x2e, 0xaa, 0x3e, 0xb8, 0x4f, 0xfb, 0x9a, 0xb8, 0xf3, 0x21, 0xf5, 0x17, /* Byte value: 0x8c */ + 0x1e, 0x4e, 0x3d, 0x36, 0x36, 0x30, 0x01, 0xd8, 0x0a, 0x55, 0x69, 0xd8, 0xaf, 0xe0, 0x0d, 0x1b, /* Byte value: 0x8d */ + 0xa5, 0x3b, 0x67, 0xea, 0xea, 0xcb, 0xee, 0x2e, 0x63, 0x4e, 0xc7, 0x2e, 0x4c, 0x99, 0xac, 0x75, /* Byte value: 0x8e */ + 0xe6, 0xf2, 0x9e, 0xec, 0xec, 0x0c, 0x91, 0x36, 0xe3, 0x84, 0x8b, 0x36, 0x5b, 0x38, 0x92, 0x76, /* Byte value: 0x8f */ + 0x2e, 0xfe, 0x8b, 0x46, 0x46, 0xf1, 0xd7, 0xdb, 0x1a, 0xdd, 0x81, 0xdb, 0x74, 0x5d, 0x7a, 0x23, /* Byte value: 0x90 */ + 0x5f, 0x34, 0xe6, 0x8b, 0x8b, 0x98, 0x58, 0x69, 0x35, 0x90, 0x2e, 0x69, 0x18, 0x74, 0x7e, 0xa4, /* Byte value: 0x91 */ + 0x61, 0x1b, 0xbe, 0x5c, 0x5c, 0x97, 0x7c, 0xb3, 0x9e, 0x35, 0xf7, 0xb3, 0x25, 0x42, 0x29, 0x2e, /* Byte value: 0x92 */ + 0x83, 0x4c, 0x64, 0x05, 0x05, 0x45, 0xa1, 0x14, 0xc0, 0xaf, 0x6a, 0x14, 0xfd, 0x10, 0x21, 0xe3, /* Byte value: 0x93 */ + 0x44, 0x67, 0x8e, 0xb4, 0xb4, 0xa0, 0x06, 0x95, 0x3c, 0x3d, 0xb5, 0x95, 0x64, 0x05, 0x2e, 0x5a, /* Byte value: 0x94 */ + 0xb1, 0x4f, 0xf0, 0xce, 0xce, 0xeb, 0x51, 0xbe, 0x6f, 0x28, 0x89, 0xbe, 0x86, 0x98, 0x1b, 0x67, /* Byte value: 0x95 */ + 0xef, 0xc3, 0x07, 0xf9, 0xf9, 0xa5, 0x1a, 0x62, 0xe4, 0x5e, 0x43, 0x62, 0xce, 0x17, 0xa2, 0x9d, /* Byte value: 0x96 */ + 0x82, 0xf4, 0x75, 0xb9, 0xb9, 0x93, 0xb2, 0xa1, 0x7e, 0x49, 0x8e, 0xa1, 0xad, 0xeb, 0xe6, 0xbd, /* Byte value: 0x97 */ + 0x36, 0xa6, 0xd0, 0x7e, 0x7e, 0x70, 0xbc, 0x3b, 0x12, 0x99, 0xf5, 0x3b, 0xf8, 0xe2, 0xa0, 0x3f, /* Byte value: 0x98 */ + 0xa3, 0x2d, 0x01, 0xe4, 0xe4, 0x7a, 0x84, 0x16, 0x61, 0x5f, 0xda, 0x16, 0x6f, 0xc6, 0x7b, 0x72, /* Byte value: 0x99 */ + 0xaf, 0x01, 0xcd, 0xf8, 0xf8, 0xdb, 0x50, 0x66, 0x65, 0x7d, 0xe0, 0x66, 0x29, 0x78, 0x16, 0x7c, /* Byte value: 0x9a */ + 0x88, 0xce, 0xdf, 0xab, 0xab, 0x83, 0x0c, 0xe9, 0x78, 0x7a, 0xa9, 0xe9, 0xc8, 0x0a, 0x5c, 0xb4, /* Byte value: 0x9b */ + 0x89, 0x76, 0xce, 0x17, 0x17, 0x55, 0x1f, 0x5c, 0xc6, 0x9c, 0x4d, 0x5c, 0x98, 0xf1, 0x9b, 0xea, /* Byte value: 0x9c */ + 0x0f, 0x27, 0xff, 0x1b, 0x1b, 0x18, 0xe1, 0x6c, 0x05, 0xcb, 0xd5, 0x6c, 0xb6, 0x70, 0xe7, 0xec, /* Byte value: 0x9d */ + 0x1f, 0xf6, 0x2c, 0x8a, 0x8a, 0xe6, 0x12, 0x6d, 0xb4, 0xb3, 0x8d, 0x6d, 0xff, 0x1b, 0xca, 0x45, /* Byte value: 0x9e */ + 0x42, 0x71, 0xe8, 0xba, 0xba, 0x11, 0x6c, 0xad, 0x3e, 0x2c, 0xa8, 0xad, 0x47, 0x5a, 0xf9, 0x5d, /* Byte value: 0x9f */ + 0xf6, 0x23, 0x4d, 0x7d, 0x7d, 0xf2, 0x62, 0x37, 0x52, 0xfc, 0xd3, 0x37, 0x12, 0x53, 0xbf, 0xdf, /* Byte value: 0xa0 */ + 0xdf, 0x73, 0xb1, 0x89, 0x89, 0x64, 0xcc, 0x61, 0xf4, 0xd6, 0xab, 0x61, 0x15, 0xaa, 0xd5, 0xa5, /* Byte value: 0xa1 */ + 0x3a, 0x8a, 0x1c, 0x62, 0x62, 0xd1, 0x68, 0x4b, 0x16, 0xbb, 0xcf, 0x4b, 0xbe, 0x5c, 0xcd, 0x31, /* Byte value: 0xa2 */ + 0xc1, 0x3d, 0x8c, 0xbf, 0xbf, 0x54, 0xcd, 0xb9, 0xfe, 0x83, 0xc2, 0xb9, 0xba, 0x4a, 0xd8, 0xbe, /* Byte value: 0xa3 */ + 0x28, 0xe8, 0xed, 0x48, 0x48, 0x40, 0xbd, 0xe3, 0x18, 0xcc, 0x9c, 0xe3, 0x57, 0x02, 0xad, 0x24, /* Byte value: 0xa4 */ + 0xf1, 0x8d, 0x3a, 0xcf, 0xcf, 0x95, 0x1b, 0xba, 0xee, 0x0b, 0x2a, 0xba, 0x61, 0xf7, 0xaf, 0x86, /* Byte value: 0xa5 */ + 0xcb, 0x07, 0x26, 0xad, 0xad, 0x44, 0x73, 0xf1, 0xf8, 0xb0, 0xe5, 0xf1, 0xdf, 0xab, 0x62, 0xb7, /* Byte value: 0xa6 */ + 0x92, 0x25, 0xa6, 0x28, 0x28, 0x6d, 0x41, 0xa0, 0xcf, 0x31, 0xd6, 0xa0, 0xe4, 0x80, 0xcb, 0x14, /* Byte value: 0xa7 */ + 0x87, 0xe9, 0x20, 0xb0, 0xb0, 0x9b, 0xed, 0x85, 0x7d, 0xb1, 0x7c, 0x85, 0x7e, 0x7a, 0xbb, 0x58, /* Byte value: 0xa8 */ + 0xe7, 0x4a, 0x8f, 0x50, 0x50, 0xda, 0x82, 0x83, 0x5d, 0x62, 0x6f, 0x83, 0x0b, 0xc3, 0x55, 0x28, /* Byte value: 0xa9 */ + 0x3e, 0x2f, 0x58, 0xd7, 0xd7, 0x0f, 0x24, 0xda, 0xab, 0xa5, 0xd9, 0xda, 0x3d, 0x36, 0x57, 0x8a, /* Byte value: 0xaa */ + 0xfa, 0x0f, 0x81, 0x61, 0x61, 0x53, 0xb6, 0x47, 0x56, 0xde, 0xe9, 0x47, 0x54, 0xed, 0xd2, 0xd1, /* Byte value: 0xab */ + 0x0d, 0x94, 0xdd, 0xa0, 0xa0, 0x77, 0xc7, 0xc5, 0xba, 0xc4, 0xde, 0xc5, 0x16, 0x45, 0xaa, 0x50, /* Byte value: 0xac */ + 0x51, 0xab, 0x08, 0x2c, 0x2c, 0x56, 0xaa, 0xb0, 0x8e, 0xbd, 0x1f, 0xb0, 0xfe, 0xff, 0x5e, 0x16, /* Byte value: 0xad */ + 0xb6, 0xe1, 0x87, 0x7c, 0x7c, 0x8c, 0x28, 0x33, 0xd3, 0xdf, 0x70, 0x33, 0xf5, 0x3c, 0x0b, 0x3e, /* Byte value: 0xae */ + 0x7b, 0xf0, 0xc7, 0xdf, 0xdf, 0x79, 0x31, 0xfa, 0x29, 0x7e, 0x88, 0xfa, 0x09, 0xc8, 0xbe, 0x8e, /* Byte value: 0xaf */ + 0x74, 0xd7, 0x38, 0xc4, 0xc4, 0x61, 0xd0, 0x96, 0x2c, 0xb5, 0x5d, 0x96, 0xbf, 0xb8, 0x59, 0x62, /* Byte value: 0xb0 */ + 0x3f, 0x97, 0x49, 0x6b, 0x6b, 0xd9, 0x37, 0x6f, 0x15, 0x43, 0x3d, 0x6f, 0x6d, 0xcd, 0x90, 0xd4, /* Byte value: 0xb1 */ + 0x2f, 0x46, 0x9a, 0xfa, 0xfa, 0x27, 0xc4, 0x6e, 0xa4, 0x3b, 0x65, 0x6e, 0x24, 0xa6, 0xbd, 0x7d, /* Byte value: 0xb2 */ + 0x7d, 0xe6, 0xa1, 0xd1, 0xd1, 0xc8, 0x5b, 0xc2, 0x2b, 0x6f, 0x95, 0xc2, 0x2a, 0x97, 0x69, 0x89, /* Byte value: 0xb3 */ + 0xbb, 0x75, 0x5a, 0xdc, 0xdc, 0xfb, 0xef, 0xf6, 0x69, 0x1b, 0xae, 0xf6, 0xe3, 0x79, 0xa1, 0x6e, /* Byte value: 0xb4 */ + 0x49, 0xf3, 0x53, 0x14, 0x14, 0xd7, 0xc1, 0x50, 0x86, 0xf9, 0x6b, 0x50, 0x72, 0x40, 0x84, 0x0a, /* Byte value: 0xb5 */ + 0x2b, 0xe3, 0xde, 0x4f, 0x4f, 0xf9, 0x88, 0xff, 0x19, 0x25, 0x73, 0xff, 0xa7, 0xcc, 0x27, 0xc6, /* Byte value: 0xb6 */ + 0x99, 0xa7, 0x1d, 0x86, 0x86, 0xab, 0xec, 0x5d, 0x77, 0xe4, 0x15, 0x5d, 0xd1, 0x9a, 0xb6, 0x43, /* Byte value: 0xb7 */ + 0x02, 0xb3, 0x22, 0xbb, 0xbb, 0x6f, 0x26, 0xa9, 0xbf, 0x0f, 0x0b, 0xa9, 0xa0, 0x35, 0x4d, 0xbc, /* Byte value: 0xb8 */ + 0x37, 0x1e, 0xc1, 0xc2, 0xc2, 0xa6, 0xaf, 0x8e, 0xac, 0x7f, 0x11, 0x8e, 0xa8, 0x19, 0x67, 0x61, /* Byte value: 0xb9 */ + 0xb3, 0xfc, 0xd2, 0x75, 0x75, 0x84, 0x77, 0x17, 0xd0, 0x27, 0x82, 0x17, 0x26, 0xad, 0x56, 0xdb, /* Byte value: 0xba */ + 0x73, 0x79, 0x4f, 0x76, 0x76, 0x06, 0xa9, 0x1b, 0x90, 0x42, 0xa4, 0x1b, 0xcc, 0x1c, 0x49, 0x3b, /* Byte value: 0xbb */ + 0x64, 0x06, 0xeb, 0x55, 0x55, 0x9f, 0x23, 0x97, 0x9d, 0xcd, 0x05, 0x97, 0xf6, 0xd3, 0x74, 0xcb, /* Byte value: 0xbc */ + 0xdc, 0x78, 0x82, 0x8e, 0x8e, 0xdd, 0xf9, 0x7d, 0xf5, 0x3f, 0x44, 0x7d, 0xe5, 0x64, 0x5f, 0x47, /* Byte value: 0xbd */ + 0xd8, 0xdd, 0xc6, 0x3b, 0x3b, 0x03, 0xb5, 0xec, 0x48, 0x21, 0x52, 0xec, 0x66, 0x0e, 0xc5, 0xfc, /* Byte value: 0xbe */ + 0xc9, 0xb4, 0x04, 0x16, 0x16, 0x2b, 0x55, 0x58, 0x47, 0xbf, 0xee, 0x58, 0x7f, 0x9e, 0x2f, 0x0b, /* Byte value: 0xbf */ + 0xab, 0xa4, 0x89, 0x4d, 0x4d, 0x05, 0x1c, 0xf7, 0xd8, 0x63, 0xf6, 0xf7, 0xaa, 0x12, 0x8c, 0xc7, /* Byte value: 0xc0 */ + 0x33, 0xbb, 0x85, 0x77, 0x77, 0x78, 0xe3, 0x1f, 0x11, 0x61, 0x07, 0x1f, 0x2b, 0x73, 0xfd, 0xda, /* Byte value: 0xc1 */ + 0x6b, 0x21, 0x14, 0x4e, 0x4e, 0x87, 0xc2, 0xfb, 0x98, 0x06, 0xd0, 0xfb, 0x40, 0xa3, 0x93, 0x27, /* Byte value: 0xc2 */ + 0xcc, 0xa9, 0x51, 0x1f, 0x1f, 0x23, 0x0a, 0x7c, 0x44, 0x47, 0x1c, 0x7c, 0xac, 0x0f, 0x72, 0xee, /* Byte value: 0xc3 */ + 0x90, 0x96, 0x84, 0x93, 0x93, 0x02, 0x67, 0x09, 0x70, 0x3e, 0xdd, 0x09, 0x44, 0xb5, 0x86, 0xa8, /* Byte value: 0xc4 */ + 0xd0, 0x54, 0x4e, 0x92, 0x92, 0x7c, 0x2d, 0x0d, 0xf1, 0x1d, 0x7e, 0x0d, 0xa3, 0xda, 0x32, 0x49, /* Byte value: 0xc5 */ + 0xac, 0x0a, 0xfe, 0xff, 0xff, 0x62, 0x65, 0x7a, 0x64, 0x94, 0x0f, 0x7a, 0xd9, 0xb6, 0x9c, 0x9e, /* Byte value: 0xc6 */ + 0xbf, 0xd0, 0x1e, 0x69, 0x69, 0x25, 0xa3, 0x67, 0xd4, 0x05, 0xb8, 0x67, 0x60, 0x13, 0x3b, 0xd5, /* Byte value: 0xc7 */ + 0xda, 0x6e, 0xe4, 0x80, 0x80, 0x6c, 0x93, 0x45, 0xf7, 0x2e, 0x59, 0x45, 0xc6, 0x3b, 0x88, 0x40, /* Byte value: 0xc8 */ + 0xa7, 0x88, 0x45, 0x51, 0x51, 0xa4, 0xc8, 0x87, 0xdc, 0x41, 0xcc, 0x87, 0xec, 0xac, 0xe1, 0xc9, /* Byte value: 0xc9 */ + 0x5e, 0x8c, 0xf7, 0x37, 0x37, 0x4e, 0x4b, 0xdc, 0x8b, 0x76, 0xca, 0xdc, 0x48, 0x8f, 0xb9, 0xfa, /* Byte value: 0xca */ + 0x98, 0x1f, 0x0c, 0x3a, 0x3a, 0x7d, 0xff, 0xe8, 0xc9, 0x02, 0xf1, 0xe8, 0x81, 0x61, 0x71, 0x1d, /* Byte value: 0xcb */ + 0x7a, 0x48, 0xd6, 0x63, 0x63, 0xaf, 0x22, 0x4f, 0x97, 0x98, 0x6c, 0x4f, 0x59, 0x33, 0x79, 0xd0, /* Byte value: 0xcc */ + 0x13, 0xda, 0xe0, 0x96, 0x96, 0x47, 0xc6, 0x1d, 0xb0, 0x91, 0xb7, 0x1d, 0xb9, 0xa5, 0xa7, 0x4b, /* Byte value: 0xcd */ + 0x6a, 0x99, 0x05, 0xf2, 0xf2, 0x51, 0xd1, 0x4e, 0x26, 0xe0, 0x34, 0x4e, 0x10, 0x58, 0x54, 0x79, /* Byte value: 0xce */ + 0x40, 0xc2, 0xca, 0x01, 0x01, 0x7e, 0x4a, 0x04, 0x81, 0x23, 0xa3, 0x04, 0xe7, 0x6f, 0xb4, 0xe1, /* Byte value: 0xcf */ + 0xa8, 0xaf, 0xba, 0x4a, 0x4a, 0xbc, 0x29, 0xeb, 0xd9, 0x8a, 0x19, 0xeb, 0x5a, 0xdc, 0x06, 0x25, /* Byte value: 0xd0 */ + 0x5b, 0x91, 0xa2, 0x3e, 0x3e, 0x46, 0x14, 0xf8, 0x88, 0x8e, 0x38, 0xf8, 0x9b, 0x1e, 0xe4, 0x1f, /* Byte value: 0xd1 */ + 0xeb, 0x66, 0x43, 0x4c, 0x4c, 0x7b, 0x56, 0xf3, 0x59, 0x40, 0x55, 0xf3, 0x4d, 0x7d, 0x38, 0x26, /* Byte value: 0xd2 */ + 0x66, 0xb5, 0xc9, 0xee, 0xee, 0xf0, 0x05, 0x3e, 0x22, 0xc2, 0x0e, 0x3e, 0x56, 0xe6, 0x39, 0x77, /* Byte value: 0xd3 */ + 0x56, 0x05, 0x7f, 0x9e, 0x9e, 0x31, 0xd3, 0x3d, 0x32, 0x4a, 0xe6, 0x3d, 0x8d, 0x5b, 0x4e, 0x4f, /* Byte value: 0xd4 */ + 0x81, 0xff, 0x46, 0xbe, 0xbe, 0x2a, 0x87, 0xbd, 0x7f, 0xa0, 0x61, 0xbd, 0x5d, 0x25, 0x6c, 0x5f, /* Byte value: 0xd5 */ + 0x77, 0xdc, 0x0b, 0xc3, 0xc3, 0xd8, 0xe5, 0x8a, 0x2d, 0x5c, 0xb2, 0x8a, 0x4f, 0x76, 0xd3, 0x80, /* Byte value: 0xd6 */ + 0x57, 0xbd, 0x6e, 0x22, 0x22, 0xe7, 0xc0, 0x88, 0x8c, 0xac, 0x02, 0x88, 0xdd, 0xa0, 0x89, 0x11, /* Byte value: 0xd7 */ + 0x4e, 0x5d, 0x24, 0xa6, 0xa6, 0xb0, 0xb8, 0xdd, 0x3a, 0x0e, 0x92, 0xdd, 0x01, 0xe4, 0x94, 0x53, /* Byte value: 0xd8 */ + 0x8d, 0xd3, 0x8a, 0xa2, 0xa2, 0x8b, 0x53, 0xcd, 0x7b, 0x82, 0x5b, 0xcd, 0x1b, 0x9b, 0x01, 0x51, /* Byte value: 0xd9 */ + 0xb0, 0xf7, 0xe1, 0x72, 0x72, 0x3d, 0x42, 0x0b, 0xd1, 0xce, 0x6d, 0x0b, 0xd6, 0x63, 0xdc, 0x39, /* Byte value: 0xda */ + 0xf3, 0x3e, 0x18, 0x74, 0x74, 0xfa, 0x3d, 0x13, 0x51, 0x04, 0x21, 0x13, 0xc1, 0xc2, 0xe2, 0x3a, /* Byte value: 0xdb */ + 0x94, 0x33, 0xc0, 0x26, 0x26, 0xdc, 0x2b, 0x98, 0xcd, 0x20, 0xcb, 0x98, 0xc7, 0xdf, 0x1c, 0x13, /* Byte value: 0xdc */ + 0x20, 0x61, 0x65, 0xe1, 0xe1, 0x3f, 0x25, 0x02, 0xa1, 0xf0, 0xb0, 0x02, 0x92, 0xd6, 0x5a, 0x91, /* Byte value: 0xdd */ + 0x24, 0xc4, 0x21, 0x54, 0x54, 0xe1, 0x69, 0x93, 0x1c, 0xee, 0xa6, 0x93, 0x11, 0xbc, 0xc0, 0x2a, /* Byte value: 0xde */ + 0xd7, 0xfa, 0x39, 0x20, 0x20, 0x1b, 0x54, 0x80, 0x4d, 0xea, 0x87, 0x80, 0xd0, 0x7e, 0x22, 0x10, /* Byte value: 0xdf */ + 0x14, 0x74, 0x97, 0x24, 0x24, 0x20, 0xbf, 0x90, 0x0c, 0x66, 0x4e, 0x90, 0xca, 0x01, 0xb7, 0x12, /* Byte value: 0xe0 */ + 0x9e, 0x09, 0x6a, 0x34, 0x34, 0xcc, 0x95, 0xd0, 0xcb, 0x13, 0xec, 0xd0, 0xa2, 0x3e, 0xa6, 0x1a, /* Byte value: 0xe1 */ + 0x05, 0x1d, 0x55, 0x09, 0x09, 0x08, 0x5f, 0x24, 0x03, 0xf8, 0xf2, 0x24, 0xd3, 0x91, 0x5d, 0xe5, /* Byte value: 0xe2 */ + 0xc6, 0x93, 0xfb, 0x0d, 0x0d, 0x33, 0xb4, 0x34, 0x42, 0x74, 0x3b, 0x34, 0xc9, 0xee, 0xc8, 0xe7, /* Byte value: 0xe3 */ + 0xed, 0x70, 0x25, 0x42, 0x42, 0xca, 0x3c, 0xcb, 0x5b, 0x51, 0x48, 0xcb, 0x6e, 0x22, 0xef, 0x21, /* Byte value: 0xe4 */ + 0xc8, 0x0c, 0x15, 0xaa, 0xaa, 0xfd, 0x46, 0xed, 0xf9, 0x59, 0x0a, 0xed, 0x2f, 0x65, 0xe8, 0x55, /* Byte value: 0xe5 */ + 0x9b, 0x14, 0x3f, 0x3d, 0x3d, 0xc4, 0xca, 0xf4, 0xc8, 0xeb, 0x1e, 0xf4, 0x71, 0xaf, 0xfb, 0xff, /* Byte value: 0xe6 */ + 0xbd, 0x63, 0x3c, 0xd2, 0xd2, 0x4a, 0x85, 0xce, 0x6b, 0x0a, 0xb3, 0xce, 0xc0, 0x26, 0x76, 0x69, /* Byte value: 0xe7 */ + 0x84, 0xe2, 0x13, 0xb7, 0xb7, 0x22, 0xd8, 0x99, 0x7c, 0x58, 0x93, 0x99, 0x8e, 0xb4, 0x31, 0xba, /* Byte value: 0xe8 */ + 0xc3, 0x8e, 0xae, 0x04, 0x04, 0x3b, 0xeb, 0x10, 0x41, 0x8c, 0xc9, 0x10, 0x1a, 0x7f, 0x95, 0x02, /* Byte value: 0xe9 */ + 0xca, 0xbf, 0x37, 0x11, 0x11, 0x92, 0x60, 0x44, 0x46, 0x56, 0x01, 0x44, 0x8f, 0x50, 0xa5, 0xe9, /* Byte value: 0xea */ + 0x8a, 0x7d, 0xfd, 0x10, 0x10, 0xec, 0x2a, 0x40, 0xc7, 0x75, 0xa2, 0x40, 0x68, 0x3f, 0x11, 0x08, /* Byte value: 0xeb */ + 0x34, 0x15, 0xf2, 0xc5, 0xc5, 0x1f, 0x9a, 0x92, 0xad, 0x96, 0xfe, 0x92, 0x58, 0xd7, 0xed, 0x83, /* Byte value: 0xec */ + 0x26, 0x77, 0x03, 0xef, 0xef, 0x8e, 0x4f, 0x3a, 0xa3, 0xe1, 0xad, 0x3a, 0xb1, 0x89, 0x8d, 0x96, /* Byte value: 0xed */ + 0x10, 0xd1, 0xd3, 0x91, 0x91, 0xfe, 0xf3, 0x01, 0xb1, 0x78, 0x58, 0x01, 0x49, 0x6b, 0x2d, 0xa9, /* Byte value: 0xee */ + 0x25, 0x7c, 0x30, 0xe8, 0xe8, 0x37, 0x7a, 0x26, 0xa2, 0x08, 0x42, 0x26, 0x41, 0x47, 0x07, 0x74, /* Byte value: 0xef */ + 0xe3, 0xef, 0xcb, 0xe5, 0xe5, 0x04, 0xce, 0x12, 0xe0, 0x7c, 0x79, 0x12, 0x88, 0xa9, 0xcf, 0x93, /* Byte value: 0xf0 */ + 0x63, 0xa8, 0x9c, 0xe7, 0xe7, 0xf8, 0x5a, 0x1a, 0x21, 0x3a, 0xfc, 0x1a, 0x85, 0x77, 0x64, 0x92, /* Byte value: 0xf1 */ + 0x0a, 0x3a, 0xaa, 0x12, 0x12, 0x10, 0xbe, 0x48, 0x06, 0x33, 0x27, 0x48, 0x65, 0xe1, 0xba, 0x09, /* Byte value: 0xf2 */ + 0x4f, 0xe5, 0x35, 0x1a, 0x1a, 0x66, 0xab, 0x68, 0x84, 0xe8, 0x76, 0x68, 0x51, 0x1f, 0x53, 0x0d, /* Byte value: 0xf3 */ + 0x8b, 0xc5, 0xec, 0xac, 0xac, 0x3a, 0x39, 0xf5, 0x79, 0x93, 0x46, 0xf5, 0x38, 0xc4, 0xd6, 0x56, /* Byte value: 0xf4 */ + 0xc7, 0x2b, 0xea, 0xb1, 0xb1, 0xe5, 0xa7, 0x81, 0xfc, 0x92, 0xdf, 0x81, 0x99, 0x15, 0x0f, 0xb9, /* Byte value: 0xf5 */ + 0x67, 0x0d, 0xd8, 0x52, 0x52, 0x26, 0x16, 0x8b, 0x9c, 0x24, 0xea, 0x8b, 0x06, 0x1d, 0xfe, 0x29, /* Byte value: 0xf6 */ + 0x2d, 0xf5, 0xb8, 0x41, 0x41, 0x48, 0xe2, 0xc7, 0x1b, 0x34, 0x6e, 0xc7, 0x84, 0x93, 0xf0, 0xc1, /* Byte value: 0xf7 */ + 0xfe, 0xaa, 0xc5, 0xd4, 0xd4, 0x8d, 0xfa, 0xd6, 0xeb, 0xc0, 0xff, 0xd6, 0xd7, 0x87, 0x48, 0x6a, /* Byte value: 0xf8 */ + 0x45, 0xdf, 0x9f, 0x08, 0x08, 0x76, 0x15, 0x20, 0x82, 0xdb, 0x51, 0x20, 0x34, 0xfe, 0xe9, 0x04, /* Byte value: 0xf9 */ + 0xa0, 0x26, 0x32, 0xe3, 0xe3, 0xc3, 0xb1, 0x0a, 0x60, 0xb6, 0x35, 0x0a, 0x9f, 0x08, 0xf1, 0x90, /* Byte value: 0xfa */ + 0x80, 0x47, 0x57, 0x02, 0x02, 0xfc, 0x94, 0x08, 0xc1, 0x46, 0x85, 0x08, 0x0d, 0xde, 0xab, 0x01, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x4a, 0xf8, 0x60, 0x13, 0x13, 0x6e, 0xf4, 0x4c, 0x87, 0x10, 0x84, 0x4c, 0x82, 0x8e, 0x0e, 0xe8, /* Byte value: 0xfd */ + 0xee, 0x7b, 0x16, 0x45, 0x45, 0x73, 0x09, 0xd7, 0x5a, 0xb8, 0xa7, 0xd7, 0x9e, 0xec, 0x65, 0xc3, /* Byte value: 0xfe */ + 0x4c, 0xee, 0x06, 0x1d, 0x1d, 0xdf, 0x9e, 0x74, 0x85, 0x01, 0x99, 0x74, 0xa1, 0xd1, 0xd9, 0xef, /* Byte value: 0xff */ + + /* Matrix row: 5 */ + 0xd8, 0xca, 0x20, 0x18, 0xa6, 0x5b, 0x9c, 0xaf, 0x78, 0xd9, 0x1d, 0x80, 0x8c, 0x85, 0x3b, 0x8c, /* Byte value: 0x00 */ + 0x69, 0x10, 0x51, 0x4c, 0xc5, 0x06, 0x68, 0x18, 0xbf, 0x31, 0xb7, 0x87, 0xa1, 0x7c, 0xf5, 0xa1, /* Byte value: 0x01 */ + 0xc0, 0xd0, 0x1b, 0x9a, 0xb0, 0x2e, 0xcd, 0xb8, 0xb7, 0xbe, 0xdf, 0x6c, 0x21, 0x29, 0x03, 0x21, /* Byte value: 0x02 */ + 0xba, 0xff, 0xe6, 0xab, 0xa2, 0x89, 0xd9, 0x61, 0x42, 0xa1, 0xdc, 0x1e, 0xaa, 0x69, 0x60, 0xaa, /* Byte value: 0x03 */ + 0x16, 0x4a, 0xed, 0x3d, 0x41, 0x6b, 0x5a, 0x6f, 0xc9, 0x92, 0xec, 0x32, 0xcd, 0xe3, 0x9f, 0xcd, /* Byte value: 0x04 */ + 0x87, 0x09, 0x79, 0x52, 0xab, 0x3b, 0xd3, 0xec, 0xd9, 0x4f, 0x3c, 0x27, 0x0e, 0x49, 0xb0, 0x0e, /* Byte value: 0x05 */ + 0x58, 0xeb, 0x32, 0xf4, 0xc7, 0x6f, 0xab, 0x7f, 0xa2, 0x0d, 0x36, 0xc8, 0xb2, 0x0a, 0x39, 0xb2, /* Byte value: 0x06 */ + 0x59, 0x24, 0x27, 0x8b, 0xe9, 0xec, 0xca, 0x36, 0xe2, 0xff, 0xf0, 0x9c, 0x38, 0xe7, 0x85, 0x38, /* Byte value: 0x07 */ + 0xc4, 0x6a, 0x4f, 0xa5, 0x08, 0x67, 0x8a, 0x5f, 0x74, 0xf0, 0x41, 0xff, 0x4c, 0x1b, 0xb6, 0x4c, /* Byte value: 0x08 */ + 0x6a, 0x82, 0x6e, 0xcd, 0xb7, 0x40, 0xcb, 0xc3, 0x7f, 0xe4, 0x3e, 0x7b, 0xfc, 0x88, 0xf2, 0xfc, /* Byte value: 0x09 */ + 0x05, 0x75, 0x41, 0x40, 0x96, 0xca, 0x26, 0xae, 0x83, 0xbc, 0x58, 0xc7, 0xe7, 0xdf, 0x09, 0xe7, /* Byte value: 0x0a */ + 0x9a, 0x66, 0x03, 0x90, 0x2b, 0x84, 0xa4, 0x55, 0x95, 0x94, 0xa6, 0x0c, 0x44, 0x3a, 0x81, 0x44, /* Byte value: 0x0b */ + 0x06, 0xe7, 0x7e, 0xc1, 0xe4, 0x8c, 0x85, 0x75, 0x43, 0x69, 0xd1, 0x3b, 0xba, 0x2b, 0x0e, 0xba, /* Byte value: 0x0c */ + 0xa6, 0x5f, 0x89, 0x16, 0x0c, 0xb5, 0xcf, 0x91, 0x4e, 0x88, 0x80, 0x61, 0x6a, 0xf7, 0xed, 0x6a, /* Byte value: 0x0d */ + 0x0d, 0xc2, 0xe9, 0x3e, 0x25, 0x58, 0xa8, 0xa3, 0xc6, 0x20, 0xa7, 0x22, 0x3d, 0xbb, 0xa0, 0x3d, /* Byte value: 0x0e */ + 0xd1, 0xb2, 0x9d, 0x19, 0x3b, 0x4a, 0x73, 0xeb, 0x7d, 0xb7, 0x24, 0x31, 0xdc, 0x0c, 0x2e, 0xdc, /* Byte value: 0x0f */ + 0x43, 0x63, 0x36, 0xf7, 0xa3, 0x5c, 0x59, 0xb3, 0xad, 0xbf, 0x7d, 0xd8, 0x42, 0x52, 0x06, 0x42, /* Byte value: 0x10 */ + 0x85, 0x54, 0x53, 0xac, 0xf7, 0xfe, 0x11, 0x7e, 0x59, 0x68, 0x73, 0x8f, 0xd9, 0x50, 0x0b, 0xd9, /* Byte value: 0x11 */ + 0x41, 0x3e, 0x1c, 0x09, 0xff, 0x99, 0x9b, 0x21, 0x2d, 0x98, 0x32, 0x70, 0x95, 0x4b, 0xbd, 0x95, /* Byte value: 0x12 */ + 0xd2, 0x20, 0xa2, 0x98, 0x49, 0x0c, 0xd0, 0x30, 0xbd, 0x62, 0xad, 0xcd, 0x81, 0xf8, 0x29, 0x81, /* Byte value: 0x13 */ + 0x2c, 0x94, 0x19, 0x7a, 0x82, 0xd6, 0xb4, 0xde, 0x51, 0xe7, 0x1b, 0x64, 0x59, 0x05, 0xfd, 0x59, /* Byte value: 0x14 */ + 0xcd, 0x12, 0xf2, 0xa4, 0x95, 0x76, 0x65, 0x1b, 0x71, 0x9e, 0x78, 0x4e, 0x1c, 0x92, 0xa3, 0x1c, /* Byte value: 0x15 */ + 0x0b, 0x25, 0x97, 0xff, 0xc1, 0xd4, 0x2d, 0xd6, 0x85, 0x49, 0x76, 0x19, 0x87, 0x90, 0xae, 0x87, /* Byte value: 0x16 */ + 0xa2, 0xe5, 0xdd, 0x29, 0xb4, 0xfc, 0x88, 0x76, 0x8d, 0xc6, 0x1e, 0xf2, 0x07, 0xc5, 0x58, 0x07, /* Byte value: 0x17 */ + 0x38, 0x83, 0xde, 0xb9, 0x9f, 0x78, 0x2c, 0x23, 0x18, 0x52, 0xb8, 0xfe, 0x43, 0xff, 0xd9, 0x43, /* Byte value: 0x18 */ + 0xf7, 0xcc, 0x06, 0xe3, 0x56, 0xcb, 0x8b, 0xaa, 0xe9, 0xeb, 0x8f, 0x18, 0x88, 0x74, 0xc1, 0x88, /* Byte value: 0x19 */ + 0x4b, 0xd4, 0x9e, 0x89, 0x10, 0xce, 0xd7, 0xbe, 0xe8, 0x23, 0x82, 0x3d, 0x98, 0x36, 0xaf, 0x98, /* Byte value: 0x1a */ + 0xe6, 0xae, 0x80, 0x60, 0xdd, 0xaf, 0x35, 0xf9, 0x23, 0xe2, 0x74, 0x45, 0x75, 0x51, 0xec, 0x75, /* Byte value: 0x1b */ + 0xe7, 0x61, 0x95, 0x1f, 0xf3, 0x2c, 0x54, 0xb0, 0x63, 0x10, 0xb2, 0x11, 0xff, 0xbc, 0x50, 0xff, /* Byte value: 0x1c */ + 0x90, 0x8c, 0x81, 0x10, 0xc4, 0xd3, 0xe8, 0xca, 0x50, 0x2f, 0x16, 0x41, 0x49, 0x47, 0x93, 0x49, /* Byte value: 0x1d */ + 0x1a, 0x47, 0x11, 0x7c, 0x4a, 0xb0, 0x93, 0x85, 0x4f, 0x40, 0x8d, 0x44, 0x7a, 0xb5, 0x83, 0x7a, /* Byte value: 0x1e */ + 0x53, 0xce, 0xa5, 0x0b, 0x06, 0xbb, 0x86, 0xa9, 0x27, 0x44, 0x40, 0xd1, 0x35, 0x9a, 0x97, 0x35, /* Byte value: 0x1f */ + 0xa3, 0x2a, 0xc8, 0x56, 0x9a, 0x7f, 0xe9, 0x3f, 0xcd, 0x34, 0xd8, 0xa6, 0x8d, 0x28, 0xe4, 0x8d, /* Byte value: 0x20 */ + 0xf1, 0x2b, 0x78, 0x22, 0xb2, 0x47, 0x0e, 0xdf, 0xaa, 0x82, 0x5e, 0x23, 0x32, 0x5f, 0xcf, 0x32, /* Byte value: 0x21 */ + 0xfd, 0x26, 0x84, 0x63, 0xb9, 0x9c, 0xc7, 0x35, 0x2c, 0x50, 0x3f, 0x55, 0x85, 0x09, 0xd3, 0x85, /* Byte value: 0x22 */ + 0x51, 0x93, 0x8f, 0xf5, 0x5a, 0x7e, 0x44, 0x3b, 0xa7, 0x63, 0x0f, 0x79, 0xe2, 0x83, 0x2c, 0xe2, /* Byte value: 0x23 */ + 0x29, 0xe1, 0x58, 0x3a, 0x14, 0x1c, 0x92, 0x70, 0xd2, 0x5b, 0x43, 0xa3, 0xbe, 0xda, 0xf4, 0xbe, /* Byte value: 0x24 */ + 0x3b, 0x11, 0xe1, 0x38, 0xed, 0x3e, 0x8f, 0xf8, 0xd8, 0x87, 0x31, 0x02, 0x1e, 0x0b, 0xde, 0x1e, /* Byte value: 0x25 */ + 0x82, 0x7c, 0x38, 0x12, 0x3d, 0xf1, 0xf5, 0x42, 0x5a, 0xf3, 0x64, 0xe0, 0xe9, 0x96, 0xb9, 0xe9, /* Byte value: 0x26 */ + 0x67, 0x40, 0x87, 0xf3, 0x92, 0x18, 0x63, 0x60, 0xb9, 0xc4, 0x99, 0x59, 0xc1, 0x33, 0x52, 0xc1, /* Byte value: 0x27 */ + 0x8b, 0x04, 0x85, 0x13, 0xa0, 0xe0, 0x1a, 0x06, 0x5f, 0x9d, 0x5d, 0x51, 0xb9, 0x1f, 0xac, 0xb9, /* Byte value: 0x28 */ + 0x48, 0x46, 0xa1, 0x08, 0x62, 0x88, 0x74, 0x65, 0x28, 0xf6, 0x0b, 0xc1, 0xc5, 0xc2, 0xa8, 0xc5, /* Byte value: 0x29 */ + 0x2a, 0x73, 0x67, 0xbb, 0x66, 0x5a, 0x31, 0xab, 0x12, 0x8e, 0xca, 0x5f, 0xe3, 0x2e, 0xf3, 0xe3, /* Byte value: 0x2a */ + 0xef, 0xd6, 0x3d, 0x61, 0x40, 0xbe, 0xda, 0xbd, 0x26, 0x8c, 0x4d, 0xf4, 0x25, 0xd8, 0xf9, 0x25, /* Byte value: 0x2b */ + 0x70, 0xc5, 0x7f, 0xb1, 0xfd, 0xf0, 0x58, 0x46, 0x30, 0xa4, 0xb3, 0x3f, 0x86, 0x3d, 0x71, 0x86, /* Byte value: 0x2c */ + 0x2d, 0x5b, 0x0c, 0x05, 0xac, 0x55, 0xd5, 0x97, 0x11, 0x15, 0xdd, 0x30, 0xd3, 0xe8, 0x41, 0xd3, /* Byte value: 0x2d */ + 0x31, 0xfb, 0x63, 0xb8, 0x02, 0x69, 0xc3, 0x67, 0x1d, 0x3c, 0x81, 0x4f, 0x13, 0x76, 0xcc, 0x13, /* Byte value: 0x2e */ + 0xe2, 0x14, 0xd4, 0x5f, 0x65, 0xe6, 0x72, 0x1e, 0xe0, 0xac, 0xea, 0xd6, 0x18, 0x63, 0x59, 0x18, /* Byte value: 0x2f */ + 0x86, 0xc6, 0x6c, 0x2d, 0x85, 0xb8, 0xb2, 0xa5, 0x99, 0xbd, 0xfa, 0x73, 0x84, 0xa4, 0x0c, 0x84, /* Byte value: 0x30 */ + 0xc9, 0xa8, 0xa6, 0x9b, 0x2d, 0x3f, 0x22, 0xfc, 0xb2, 0xd0, 0xe6, 0xdd, 0x71, 0xa0, 0x16, 0x71, /* Byte value: 0x31 */ + 0xb0, 0x15, 0x64, 0x2b, 0x4d, 0xde, 0x95, 0xfe, 0x87, 0x1a, 0x6c, 0x53, 0xa7, 0x14, 0x72, 0xa7, /* Byte value: 0x32 */ + 0x80, 0x21, 0x12, 0xec, 0x61, 0x34, 0x37, 0xd0, 0xda, 0xd4, 0x2b, 0x48, 0x3e, 0x8f, 0x02, 0x3e, /* Byte value: 0x33 */ + 0xf5, 0x91, 0x2c, 0x1d, 0x0a, 0x0e, 0x49, 0x38, 0x69, 0xcc, 0xc0, 0xb0, 0x5f, 0x6d, 0x7a, 0x5f, /* Byte value: 0x34 */ + 0xfc, 0xe9, 0x91, 0x1c, 0x97, 0x1f, 0xa6, 0x7c, 0x6c, 0xa2, 0xf9, 0x01, 0x0f, 0xe4, 0x6f, 0x0f, /* Byte value: 0x35 */ + 0x60, 0x68, 0xec, 0x4d, 0x58, 0x17, 0x87, 0x5c, 0xba, 0x5f, 0x8e, 0x36, 0xf1, 0xf5, 0xe0, 0xf1, /* Byte value: 0x36 */ + 0x44, 0x4b, 0x5d, 0x49, 0x69, 0x53, 0xbd, 0x8f, 0xae, 0x24, 0x6a, 0xb7, 0x72, 0x94, 0xb4, 0x72, /* Byte value: 0x37 */ + 0x0c, 0x0d, 0xfc, 0x41, 0x0b, 0xdb, 0xc9, 0xea, 0x86, 0xd2, 0x61, 0x76, 0xb7, 0x56, 0x1c, 0xb7, /* Byte value: 0x38 */ + 0x8f, 0xbe, 0xd1, 0x2c, 0x18, 0xa9, 0x5d, 0xe1, 0x9c, 0xd3, 0xc3, 0xc2, 0xd4, 0x2d, 0x19, 0xd4, /* Byte value: 0x39 */ + 0xa4, 0x02, 0xa3, 0xe8, 0x50, 0x70, 0x0d, 0x03, 0xce, 0xaf, 0xcf, 0xc9, 0xbd, 0xee, 0x56, 0xbd, /* Byte value: 0x3a */ + 0x3d, 0xf6, 0x9f, 0xf9, 0x09, 0xb2, 0x0a, 0x8d, 0x9b, 0xee, 0xe0, 0x39, 0xa4, 0x20, 0xd0, 0xa4, /* Byte value: 0x3b */ + 0x62, 0x35, 0xc6, 0xb3, 0x04, 0xd2, 0x45, 0xce, 0x3a, 0x78, 0xc1, 0x9e, 0x26, 0xec, 0x5b, 0x26, /* Byte value: 0x3c */ + 0x35, 0x41, 0x37, 0x87, 0xba, 0x20, 0x84, 0x80, 0xde, 0x72, 0x1f, 0xdc, 0x7e, 0x44, 0x79, 0x7e, /* Byte value: 0x3d */ + 0xe0, 0x49, 0xfe, 0xa1, 0x39, 0x23, 0xb0, 0x8c, 0x60, 0x8b, 0xa5, 0x7e, 0xcf, 0x7a, 0xe2, 0xcf, /* Byte value: 0x3e */ + 0x68, 0xdf, 0x44, 0x33, 0xeb, 0x85, 0x09, 0x51, 0xff, 0xc3, 0x71, 0xd3, 0x2b, 0x91, 0x49, 0x2b, /* Byte value: 0x3f */ + 0xdc, 0x70, 0x74, 0x27, 0x1e, 0x12, 0xdb, 0x48, 0xbb, 0x97, 0x83, 0x13, 0xe1, 0xb7, 0x8e, 0xe1, /* Byte value: 0x40 */ + 0x40, 0xf1, 0x09, 0x76, 0xd1, 0x1a, 0xfa, 0x68, 0x6d, 0x6a, 0xf4, 0x24, 0x1f, 0xa6, 0x01, 0x1f, /* Byte value: 0x41 */ + 0xa0, 0xb8, 0xf7, 0xd7, 0xe8, 0x39, 0x4a, 0xe4, 0x0d, 0xe1, 0x51, 0x5a, 0xd0, 0xdc, 0xe3, 0xd0, /* Byte value: 0x42 */ + 0xa7, 0x90, 0x9c, 0x69, 0x22, 0x36, 0xae, 0xd8, 0x0e, 0x7a, 0x46, 0x35, 0xe0, 0x1a, 0x51, 0xe0, /* Byte value: 0x43 */ + 0x9f, 0x13, 0x42, 0xd0, 0xbd, 0x4e, 0x82, 0xfb, 0x16, 0x28, 0xfe, 0xcb, 0xa3, 0xe5, 0x88, 0xa3, /* Byte value: 0x44 */ + 0x2b, 0xbc, 0x72, 0xc4, 0x48, 0xd9, 0x50, 0xe2, 0x52, 0x7c, 0x0c, 0x0b, 0x69, 0xc3, 0x4f, 0x69, /* Byte value: 0x45 */ + 0xae, 0xe8, 0x21, 0x68, 0xbf, 0x27, 0x41, 0x9c, 0x0b, 0x14, 0x7f, 0x84, 0xb0, 0x93, 0x44, 0xb0, /* Byte value: 0x46 */ + 0x10, 0xad, 0x93, 0xfc, 0xa5, 0xe7, 0xdf, 0x1a, 0x8a, 0xfb, 0x3d, 0x09, 0x77, 0xc8, 0x91, 0x77, /* Byte value: 0x47 */ + 0xfe, 0xb4, 0xbb, 0xe2, 0xcb, 0xda, 0x64, 0xee, 0xec, 0x85, 0xb6, 0xa9, 0xd8, 0xfd, 0xd4, 0xd8, /* Byte value: 0x48 */ + 0xa1, 0x77, 0xe2, 0xa8, 0xc6, 0xba, 0x2b, 0xad, 0x4d, 0x13, 0x97, 0x0e, 0x5a, 0x31, 0x5f, 0x5a, /* Byte value: 0x49 */ + 0xc7, 0xf8, 0x70, 0x24, 0x7a, 0x21, 0x29, 0x84, 0xb4, 0x25, 0xc8, 0x03, 0x11, 0xef, 0xb1, 0x11, /* Byte value: 0x4a */ + 0x4d, 0x33, 0xe0, 0x48, 0xf4, 0x42, 0x52, 0xcb, 0xab, 0x4a, 0x53, 0x06, 0x22, 0x1d, 0xa1, 0x22, /* Byte value: 0x4b */ + 0xaa, 0x52, 0x75, 0x57, 0x07, 0x6e, 0x06, 0x7b, 0xc8, 0x5a, 0xe1, 0x17, 0xdd, 0xa1, 0xf1, 0xdd, /* Byte value: 0x4c */ + 0xd4, 0xc7, 0xdc, 0x59, 0xad, 0x80, 0x55, 0x45, 0xfe, 0x0b, 0x7c, 0xf6, 0x3b, 0xd3, 0x27, 0x3b, /* Byte value: 0x4d */ + 0x42, 0xac, 0x23, 0x88, 0x8d, 0xdf, 0x38, 0xfa, 0xed, 0x4d, 0xbb, 0x8c, 0xc8, 0xbf, 0xba, 0xc8, /* Byte value: 0x4e */ + 0x2e, 0xc9, 0x33, 0x84, 0xde, 0x13, 0x76, 0x4c, 0xd1, 0xc0, 0x54, 0xcc, 0x8e, 0x1c, 0x46, 0x8e, /* Byte value: 0x4f */ + 0x49, 0x89, 0xb4, 0x77, 0x4c, 0x0b, 0x15, 0x2c, 0x68, 0x04, 0xcd, 0x95, 0x4f, 0x2f, 0x14, 0x4f, /* Byte value: 0x50 */ + 0xb2, 0x48, 0x4e, 0xd5, 0x11, 0x1b, 0x57, 0x6c, 0x07, 0x3d, 0x23, 0xfb, 0x70, 0x0d, 0xc9, 0x70, /* Byte value: 0x51 */ + 0x77, 0xed, 0x14, 0x0f, 0x37, 0xff, 0xbc, 0x7a, 0x33, 0x3f, 0xa4, 0x50, 0xb6, 0xfb, 0xc3, 0xb6, /* Byte value: 0x52 */ + 0x39, 0x4c, 0xcb, 0xc6, 0xb1, 0xfb, 0x4d, 0x6a, 0x58, 0xa0, 0x7e, 0xaa, 0xc9, 0x12, 0x65, 0xc9, /* Byte value: 0x53 */ + 0xad, 0x7a, 0x1e, 0xe9, 0xcd, 0x61, 0xe2, 0x47, 0xcb, 0xc1, 0xf6, 0x78, 0xed, 0x67, 0x43, 0xed, /* Byte value: 0x54 */ + 0x20, 0x99, 0xe5, 0x3b, 0x89, 0x0d, 0x7d, 0x34, 0xd7, 0x35, 0x7a, 0x12, 0xee, 0x53, 0xe1, 0xee, /* Byte value: 0x55 */ + 0xcf, 0x4f, 0xd8, 0x5a, 0xc9, 0xb3, 0xa7, 0x89, 0xf1, 0xb9, 0x37, 0xe6, 0xcb, 0x8b, 0x18, 0xcb, /* Byte value: 0x56 */ + 0x64, 0xd2, 0xb8, 0x72, 0xe0, 0x5e, 0xc0, 0xbb, 0x79, 0x11, 0x10, 0xa5, 0x9c, 0xc7, 0x55, 0x9c, /* Byte value: 0x57 */ + 0x9b, 0xa9, 0x16, 0xef, 0x05, 0x07, 0xc5, 0x1c, 0xd5, 0x66, 0x60, 0x58, 0xce, 0xd7, 0x3d, 0xce, /* Byte value: 0x58 */ + 0xde, 0x2d, 0x5e, 0xd9, 0x42, 0xd7, 0x19, 0xda, 0x3b, 0xb0, 0xcc, 0xbb, 0x36, 0xae, 0x35, 0x36, /* Byte value: 0x59 */ + 0x7f, 0x5a, 0xbc, 0x71, 0x84, 0x6d, 0x32, 0x77, 0x76, 0xa3, 0x5b, 0xb5, 0x6c, 0x9f, 0x6a, 0x6c, /* Byte value: 0x5a */ + 0xa8, 0x0f, 0x5f, 0xa9, 0x5b, 0xab, 0xc4, 0xe9, 0x48, 0x7d, 0xae, 0xbf, 0x0a, 0xb8, 0x4a, 0x0a, /* Byte value: 0x5b */ + 0xb6, 0xf2, 0x1a, 0xea, 0xa9, 0x52, 0x10, 0x8b, 0xc4, 0x73, 0xbd, 0x68, 0x1d, 0x3f, 0x7c, 0x1d, /* Byte value: 0x5c */ + 0x5c, 0x51, 0x66, 0xcb, 0x7f, 0x26, 0xec, 0x98, 0x61, 0x43, 0xa8, 0x5b, 0xdf, 0x38, 0x8c, 0xdf, /* Byte value: 0x5d */ + 0xa5, 0xcd, 0xb6, 0x97, 0x7e, 0xf3, 0x6c, 0x4a, 0x8e, 0x5d, 0x09, 0x9d, 0x37, 0x03, 0xea, 0x37, /* Byte value: 0x5e */ + 0x6b, 0x4d, 0x7b, 0xb2, 0x99, 0xc3, 0xaa, 0x8a, 0x3f, 0x16, 0xf8, 0x2f, 0x76, 0x65, 0x4e, 0x76, /* Byte value: 0x5f */ + 0xd3, 0xef, 0xb7, 0xe7, 0x67, 0x8f, 0xb1, 0x79, 0xfd, 0x90, 0x6b, 0x99, 0x0b, 0x15, 0x95, 0x0b, /* Byte value: 0x60 */ + 0xf0, 0xe4, 0x6d, 0x5d, 0x9c, 0xc4, 0x6f, 0x96, 0xea, 0x70, 0x98, 0x77, 0xb8, 0xb2, 0x73, 0xb8, /* Byte value: 0x61 */ + 0x5d, 0x9e, 0x73, 0xb4, 0x51, 0xa5, 0x8d, 0xd1, 0x21, 0xb1, 0x6e, 0x0f, 0x55, 0xd5, 0x30, 0x55, /* Byte value: 0x62 */ + 0xc8, 0x67, 0xb3, 0xe4, 0x03, 0xbc, 0x43, 0xb5, 0xf2, 0x22, 0x20, 0x89, 0xfb, 0x4d, 0xaa, 0xfb, /* Byte value: 0x63 */ + 0xc5, 0xa5, 0x5a, 0xda, 0x26, 0xe4, 0xeb, 0x16, 0x34, 0x02, 0x87, 0xab, 0xc6, 0xf6, 0x0a, 0xc6, /* Byte value: 0x64 */ + 0xbd, 0xd7, 0x8d, 0x15, 0x68, 0x86, 0x3d, 0x5d, 0x41, 0x3a, 0xcb, 0x71, 0x9a, 0xaf, 0xd2, 0x9a, /* Byte value: 0x65 */ + 0xc3, 0x42, 0x24, 0x1b, 0xc2, 0x68, 0x6e, 0x63, 0x77, 0x6b, 0x56, 0x90, 0x7c, 0xdd, 0x04, 0x7c, /* Byte value: 0x66 */ + 0xe4, 0xf3, 0xaa, 0x9e, 0x81, 0x6a, 0xf7, 0x6b, 0xa3, 0xc5, 0x3b, 0xed, 0xa2, 0x48, 0x57, 0xa2, /* Byte value: 0x67 */ + 0xaf, 0x27, 0x34, 0x17, 0x91, 0xa4, 0x20, 0xd5, 0x4b, 0xe6, 0xb9, 0xd0, 0x3a, 0x7e, 0xf8, 0x3a, /* Byte value: 0x68 */ + 0xb8, 0xa2, 0xcc, 0x55, 0xfe, 0x4c, 0x1b, 0xf3, 0xc2, 0x86, 0x93, 0xb6, 0x7d, 0x70, 0xdb, 0x7d, /* Byte value: 0x69 */ + 0xcb, 0xf5, 0x8c, 0x65, 0x71, 0xfa, 0xe0, 0x6e, 0x32, 0xf7, 0xa9, 0x75, 0xa6, 0xb9, 0xad, 0xa6, /* Byte value: 0x6a */ + 0xc1, 0x1f, 0x0e, 0xe5, 0x9e, 0xad, 0xac, 0xf1, 0xf7, 0x4c, 0x19, 0x38, 0xab, 0xc4, 0xbf, 0xab, /* Byte value: 0x6b */ + 0xb5, 0x60, 0x25, 0x6b, 0xdb, 0x14, 0xb3, 0x50, 0x04, 0xa6, 0x34, 0x94, 0x40, 0xcb, 0x7b, 0x40, /* Byte value: 0x6c */ + 0x6f, 0xf7, 0x2f, 0x8d, 0x21, 0x8a, 0xed, 0x6d, 0xfc, 0x58, 0x66, 0xbc, 0x1b, 0x57, 0xfb, 0x1b, /* Byte value: 0x6d */ + 0x4c, 0xfc, 0xf5, 0x37, 0xda, 0xc1, 0x33, 0x82, 0xeb, 0xb8, 0x95, 0x52, 0xa8, 0xf0, 0x1d, 0xa8, /* Byte value: 0x6e */ + 0x97, 0xa4, 0xea, 0xae, 0x0e, 0xdc, 0x0c, 0xf6, 0x53, 0xb4, 0x01, 0x2e, 0x79, 0x81, 0x21, 0x79, /* Byte value: 0x6f */ + 0x88, 0x96, 0xba, 0x92, 0xd2, 0xa6, 0xb9, 0xdd, 0x9f, 0x48, 0xd4, 0xad, 0xe4, 0xeb, 0xab, 0xe4, /* Byte value: 0x70 */ + 0x61, 0xa7, 0xf9, 0x32, 0x76, 0x94, 0xe6, 0x15, 0xfa, 0xad, 0x48, 0x62, 0x7b, 0x18, 0x5c, 0x7b, /* Byte value: 0x71 */ + 0x57, 0x74, 0xf1, 0x34, 0xbe, 0xf2, 0xc1, 0x4e, 0xe4, 0x0a, 0xde, 0x42, 0x58, 0xa8, 0x22, 0x58, /* Byte value: 0x72 */ + 0x11, 0x62, 0x86, 0x83, 0x8b, 0x64, 0xbe, 0x53, 0xca, 0x09, 0xfb, 0x5d, 0xfd, 0x25, 0x2d, 0xfd, /* Byte value: 0x73 */ + 0x99, 0xf4, 0x3c, 0x11, 0x59, 0xc2, 0x07, 0x8e, 0x55, 0x41, 0x2f, 0xf0, 0x19, 0xce, 0x86, 0x19, /* Byte value: 0x74 */ + 0x72, 0x98, 0x55, 0x4f, 0xa1, 0x35, 0x9a, 0xd4, 0xb0, 0x83, 0xfc, 0x97, 0x51, 0x24, 0xca, 0x51, /* Byte value: 0x75 */ + 0x83, 0xb3, 0x2d, 0x6d, 0x13, 0x72, 0x94, 0x0b, 0x1a, 0x01, 0xa2, 0xb4, 0x63, 0x7b, 0x05, 0x63, /* Byte value: 0x76 */ + 0xbf, 0x8a, 0xa7, 0xeb, 0x34, 0x43, 0xff, 0xcf, 0xc1, 0x1d, 0x84, 0xd9, 0x4d, 0xb6, 0x69, 0x4d, /* Byte value: 0x77 */ + 0x55, 0x29, 0xdb, 0xca, 0xe2, 0x37, 0x03, 0xdc, 0x64, 0x2d, 0x91, 0xea, 0x8f, 0xb1, 0x99, 0x8f, /* Byte value: 0x78 */ + 0x73, 0x57, 0x40, 0x30, 0x8f, 0xb6, 0xfb, 0x9d, 0xf0, 0x71, 0x3a, 0xc3, 0xdb, 0xc9, 0x76, 0xdb, /* Byte value: 0x79 */ + 0x9d, 0x4e, 0x68, 0x2e, 0xe1, 0x8b, 0x40, 0x69, 0x96, 0x0f, 0xb1, 0x63, 0x74, 0xfc, 0x33, 0x74, /* Byte value: 0x7a */ + 0x81, 0xee, 0x07, 0x93, 0x4f, 0xb7, 0x56, 0x99, 0x9a, 0x26, 0xed, 0x1c, 0xb4, 0x62, 0xbe, 0xb4, /* Byte value: 0x7b */ + 0x3f, 0xab, 0xb5, 0x07, 0x55, 0x77, 0xc8, 0x1f, 0x1b, 0xc9, 0xaf, 0x91, 0x73, 0x39, 0x6b, 0x73, /* Byte value: 0x7c */ + 0xb3, 0x87, 0x5b, 0xaa, 0x3f, 0x98, 0x36, 0x25, 0x47, 0xcf, 0xe5, 0xaf, 0xfa, 0xe0, 0x75, 0xfa, /* Byte value: 0x7d */ + 0xbb, 0x30, 0xf3, 0xd4, 0x8c, 0x0a, 0xb8, 0x28, 0x02, 0x53, 0x1a, 0x4a, 0x20, 0x84, 0xdc, 0x20, /* Byte value: 0x7e */ + 0xd6, 0x9a, 0xf6, 0xa7, 0xf1, 0x45, 0x97, 0xd7, 0x7e, 0x2c, 0x33, 0x5e, 0xec, 0xca, 0x9c, 0xec, /* Byte value: 0x7f */ + 0xea, 0xa3, 0x7c, 0x21, 0xd6, 0x74, 0xfc, 0x13, 0xa5, 0x30, 0x15, 0x33, 0xc2, 0x07, 0xf0, 0xc2, /* Byte value: 0x80 */ + 0x25, 0xec, 0xa4, 0x7b, 0x1f, 0xc7, 0x5b, 0x9a, 0x54, 0x89, 0x22, 0xd5, 0x09, 0x8c, 0xe8, 0x09, /* Byte value: 0x81 */ + 0xce, 0x80, 0xcd, 0x25, 0xe7, 0x30, 0xc6, 0xc0, 0xb1, 0x4b, 0xf1, 0xb2, 0x41, 0x66, 0xa4, 0x41, /* Byte value: 0x82 */ + 0x63, 0xfa, 0xd3, 0xcc, 0x2a, 0x51, 0x24, 0x87, 0x7a, 0x8a, 0x07, 0xca, 0xac, 0x01, 0xe7, 0xac, /* Byte value: 0x83 */ + 0x45, 0x84, 0x48, 0x36, 0x47, 0xd0, 0xdc, 0xc6, 0xee, 0xd6, 0xac, 0xe3, 0xf8, 0x79, 0x08, 0xf8, /* Byte value: 0x84 */ + 0x32, 0x69, 0x5c, 0x39, 0x70, 0x2f, 0x60, 0xbc, 0xdd, 0xe9, 0x08, 0xb3, 0x4e, 0x82, 0xcb, 0x4e, /* Byte value: 0x85 */ + 0xd7, 0x55, 0xe3, 0xd8, 0xdf, 0xc6, 0xf6, 0x9e, 0x3e, 0xde, 0xf5, 0x0a, 0x66, 0x27, 0x20, 0x66, /* Byte value: 0x86 */ + 0x9e, 0xdc, 0x57, 0xaf, 0x93, 0xcd, 0xe3, 0xb2, 0x56, 0xda, 0x38, 0x9f, 0x29, 0x08, 0x34, 0x29, /* Byte value: 0x87 */ + 0x08, 0xb7, 0xa8, 0x7e, 0xb3, 0x92, 0x8e, 0x0d, 0x45, 0x9c, 0xff, 0xe5, 0xda, 0x64, 0xa9, 0xda, /* Byte value: 0x88 */ + 0x8d, 0xe3, 0xfb, 0xd2, 0x44, 0x6c, 0x9f, 0x73, 0x1c, 0xf4, 0x8c, 0x6a, 0x03, 0x34, 0xa2, 0x03, /* Byte value: 0x89 */ + 0x79, 0xbd, 0xc2, 0xb0, 0x60, 0xe1, 0xb7, 0x02, 0x35, 0xca, 0x8a, 0x8e, 0xd6, 0xb4, 0x64, 0xd6, /* Byte value: 0x8a */ + 0xab, 0x9d, 0x60, 0x28, 0x29, 0xed, 0x67, 0x32, 0x88, 0xa8, 0x27, 0x43, 0x57, 0x4c, 0x4d, 0x57, /* Byte value: 0x8b */ + 0x36, 0xd3, 0x08, 0x06, 0xc8, 0x66, 0x27, 0x5b, 0x1e, 0xa7, 0x96, 0x20, 0x23, 0xb0, 0x7e, 0x23, /* Byte value: 0x8c */ + 0xfb, 0xc1, 0xfa, 0xa2, 0x5d, 0x10, 0x42, 0x40, 0x6f, 0x39, 0xee, 0x6e, 0x3f, 0x22, 0xdd, 0x3f, /* Byte value: 0x8d */ + 0xec, 0x44, 0x02, 0xe0, 0x32, 0xf8, 0x79, 0x66, 0xe6, 0x59, 0xc4, 0x08, 0x78, 0x2c, 0xfe, 0x78, /* Byte value: 0x8e */ + 0x4e, 0xa1, 0xdf, 0xc9, 0x86, 0x04, 0xf1, 0x10, 0x6b, 0x9f, 0xda, 0xfa, 0x7f, 0xe9, 0xa6, 0x7f, /* Byte value: 0x8f */ + 0x7e, 0x95, 0xa9, 0x0e, 0xaa, 0xee, 0x53, 0x3e, 0x36, 0x51, 0x9d, 0xe1, 0xe6, 0x72, 0xd6, 0xe6, /* Byte value: 0x90 */ + 0xd0, 0x7d, 0x88, 0x66, 0x15, 0xc9, 0x12, 0xa2, 0x3d, 0x45, 0xe2, 0x65, 0x56, 0xe1, 0x92, 0x56, /* Byte value: 0x91 */ + 0x6c, 0x65, 0x10, 0x0c, 0x53, 0xcc, 0x4e, 0xb6, 0x3c, 0x8d, 0xef, 0x40, 0x46, 0xa3, 0xfc, 0x46, /* Byte value: 0x92 */ + 0xf3, 0x76, 0x52, 0xdc, 0xee, 0x82, 0xcc, 0x4d, 0x2a, 0xa5, 0x11, 0x8b, 0xe5, 0x46, 0x74, 0xe5, /* Byte value: 0x93 */ + 0x5f, 0xc3, 0x59, 0x4a, 0x0d, 0x60, 0x4f, 0x43, 0xa1, 0x96, 0x21, 0xa7, 0x82, 0xcc, 0x8b, 0x82, /* Byte value: 0x94 */ + 0xff, 0x7b, 0xae, 0x9d, 0xe5, 0x59, 0x05, 0xa7, 0xac, 0x77, 0x70, 0xfd, 0x52, 0x10, 0x68, 0x52, /* Byte value: 0x95 */ + 0x8a, 0xcb, 0x90, 0x6c, 0x8e, 0x63, 0x7b, 0x4f, 0x1f, 0x6f, 0x9b, 0x05, 0x33, 0xf2, 0x10, 0x33, /* Byte value: 0x96 */ + 0x56, 0xbb, 0xe4, 0x4b, 0x90, 0x71, 0xa0, 0x07, 0xa4, 0xf8, 0x18, 0x16, 0xd2, 0x45, 0x9e, 0xd2, /* Byte value: 0x97 */ + 0xdd, 0xbf, 0x61, 0x58, 0x30, 0x91, 0xba, 0x01, 0xfb, 0x65, 0x45, 0x47, 0x6b, 0x5a, 0x32, 0x6b, /* Byte value: 0x98 */ + 0xb4, 0xaf, 0x30, 0x14, 0xf5, 0x97, 0xd2, 0x19, 0x44, 0x54, 0xf2, 0xc0, 0xca, 0x26, 0xc7, 0xca, /* Byte value: 0x99 */ + 0x04, 0xba, 0x54, 0x3f, 0xb8, 0x49, 0x47, 0xe7, 0xc3, 0x4e, 0x9e, 0x93, 0x6d, 0x32, 0xb5, 0x6d, /* Byte value: 0x9a */ + 0xbe, 0x45, 0xb2, 0x94, 0x1a, 0xc0, 0x9e, 0x86, 0x81, 0xef, 0x42, 0x8d, 0xc7, 0x5b, 0xd5, 0xc7, /* Byte value: 0x9b */ + 0x1b, 0x88, 0x04, 0x03, 0x64, 0x33, 0xf2, 0xcc, 0x0f, 0xb2, 0x4b, 0x10, 0xf0, 0x58, 0x3f, 0xf0, /* Byte value: 0x9c */ + 0x9c, 0x81, 0x7d, 0x51, 0xcf, 0x08, 0x21, 0x20, 0xd6, 0xfd, 0x77, 0x37, 0xfe, 0x11, 0x8f, 0xfe, /* Byte value: 0x9d */ + 0x5e, 0x0c, 0x4c, 0x35, 0x23, 0xe3, 0x2e, 0x0a, 0xe1, 0x64, 0xe7, 0xf3, 0x08, 0x21, 0x37, 0x08, /* Byte value: 0x9e */ + 0x07, 0x28, 0x6b, 0xbe, 0xca, 0x0f, 0xe4, 0x3c, 0x03, 0x9b, 0x17, 0x6f, 0x30, 0xc6, 0xb2, 0x30, /* Byte value: 0x9f */ + 0x8c, 0x2c, 0xee, 0xad, 0x6a, 0xef, 0xfe, 0x3a, 0x5c, 0x06, 0x4a, 0x3e, 0x89, 0xd9, 0x1e, 0x89, /* Byte value: 0xa0 */ + 0x0f, 0x9f, 0xc3, 0xc0, 0x79, 0x9d, 0x6a, 0x31, 0x46, 0x07, 0xe8, 0x8a, 0xea, 0xa2, 0x1b, 0xea, /* Byte value: 0xa1 */ + 0x6d, 0xaa, 0x05, 0x73, 0x7d, 0x4f, 0x2f, 0xff, 0x7c, 0x7f, 0x29, 0x14, 0xcc, 0x4e, 0x40, 0xcc, /* Byte value: 0xa2 */ + 0xf4, 0x5e, 0x39, 0x62, 0x24, 0x8d, 0x28, 0x71, 0x29, 0x3e, 0x06, 0xe4, 0xd5, 0x80, 0xc6, 0xd5, /* Byte value: 0xa3 */ + 0x26, 0x7e, 0x9b, 0xfa, 0x6d, 0x81, 0xf8, 0x41, 0x94, 0x5c, 0xab, 0x29, 0x54, 0x78, 0xef, 0x54, /* Byte value: 0xa4 */ + 0x71, 0x0a, 0x6a, 0xce, 0xd3, 0x73, 0x39, 0x0f, 0x70, 0x56, 0x75, 0x6b, 0x0c, 0xd0, 0xcd, 0x0c, /* Byte value: 0xa5 */ + 0x1c, 0xa0, 0x6f, 0xbd, 0xae, 0x3c, 0x16, 0xf0, 0x0c, 0x29, 0x5c, 0x7f, 0xc0, 0x9e, 0x8d, 0xc0, /* Byte value: 0xa6 */ + 0x94, 0x36, 0xd5, 0x2f, 0x7c, 0x9a, 0xaf, 0x2d, 0x93, 0x61, 0x88, 0xd2, 0x24, 0x75, 0x26, 0x24, /* Byte value: 0xa7 */ + 0x22, 0xc4, 0xcf, 0xc5, 0xd5, 0xc8, 0xbf, 0xa6, 0x57, 0x12, 0x35, 0xba, 0x39, 0x4a, 0x5a, 0x39, /* Byte value: 0xa8 */ + 0xeb, 0x6c, 0x69, 0x5e, 0xf8, 0xf7, 0x9d, 0x5a, 0xe5, 0xc2, 0xd3, 0x67, 0x48, 0xea, 0x4c, 0x48, /* Byte value: 0xa9 */ + 0xbc, 0x18, 0x98, 0x6a, 0x46, 0x05, 0x5c, 0x14, 0x01, 0xc8, 0x0d, 0x25, 0x10, 0x42, 0x6e, 0x10, /* Byte value: 0xaa */ + 0x3c, 0x39, 0x8a, 0x86, 0x27, 0x31, 0x6b, 0xc4, 0xdb, 0x1c, 0x26, 0x6d, 0x2e, 0xcd, 0x6c, 0x2e, /* Byte value: 0xab */ + 0x15, 0xd8, 0xd2, 0xbc, 0x33, 0x2d, 0xf9, 0xb4, 0x09, 0x47, 0x65, 0xce, 0x90, 0x17, 0x98, 0x90, /* Byte value: 0xac */ + 0xe9, 0x31, 0x43, 0xa0, 0xa4, 0x32, 0x5f, 0xc8, 0x65, 0xe5, 0x9c, 0xcf, 0x9f, 0xf3, 0xf7, 0x9f, /* Byte value: 0xad */ + 0x02, 0x5d, 0x2a, 0xfe, 0x5c, 0xc5, 0xc2, 0x92, 0x80, 0x27, 0x4f, 0xa8, 0xd7, 0x19, 0xbb, 0xd7, /* Byte value: 0xae */ + 0x46, 0x16, 0x77, 0xb7, 0x35, 0x96, 0x7f, 0x1d, 0x2e, 0x03, 0x25, 0x1f, 0xa5, 0x8d, 0x0f, 0xa5, /* Byte value: 0xaf */ + 0xda, 0x97, 0x0a, 0xe6, 0xfa, 0x9e, 0x5e, 0x3d, 0xf8, 0xfe, 0x52, 0x28, 0x5b, 0x9c, 0x80, 0x5b, /* Byte value: 0xb0 */ + 0x19, 0xd5, 0x2e, 0xfd, 0x38, 0xf6, 0x30, 0x5e, 0x8f, 0x95, 0x04, 0xb8, 0x27, 0x41, 0x84, 0x27, /* Byte value: 0xb1 */ + 0xdb, 0x58, 0x1f, 0x99, 0xd4, 0x1d, 0x3f, 0x74, 0xb8, 0x0c, 0x94, 0x7c, 0xd1, 0x71, 0x3c, 0xd1, /* Byte value: 0xb2 */ + 0x1e, 0xfd, 0x45, 0x43, 0xf2, 0xf9, 0xd4, 0x62, 0x8c, 0x0e, 0x13, 0xd7, 0x17, 0x87, 0x36, 0x17, /* Byte value: 0xb3 */ + 0x17, 0x85, 0xf8, 0x42, 0x6f, 0xe8, 0x3b, 0x26, 0x89, 0x60, 0x2a, 0x66, 0x47, 0x0e, 0x23, 0x47, /* Byte value: 0xb4 */ + 0x4a, 0x1b, 0x8b, 0xf6, 0x3e, 0x4d, 0xb6, 0xf7, 0xa8, 0xd1, 0x44, 0x69, 0x12, 0xdb, 0x13, 0x12, /* Byte value: 0xb5 */ + 0x0a, 0xea, 0x82, 0x80, 0xef, 0x57, 0x4c, 0x9f, 0xc5, 0xbb, 0xb0, 0x4d, 0x0d, 0x7d, 0x12, 0x0d, /* Byte value: 0xb6 */ + 0xd9, 0x05, 0x35, 0x67, 0x88, 0xd8, 0xfd, 0xe6, 0x38, 0x2b, 0xdb, 0xd4, 0x06, 0x68, 0x87, 0x06, /* Byte value: 0xb7 */ + 0x89, 0x59, 0xaf, 0xed, 0xfc, 0x25, 0xd8, 0x94, 0xdf, 0xba, 0x12, 0xf9, 0x6e, 0x06, 0x17, 0x6e, /* Byte value: 0xb8 */ + 0x78, 0x72, 0xd7, 0xcf, 0x4e, 0x62, 0xd6, 0x4b, 0x75, 0x38, 0x4c, 0xda, 0x5c, 0x59, 0xd8, 0x5c, /* Byte value: 0xb9 */ + 0x76, 0x22, 0x01, 0x70, 0x19, 0x7c, 0xdd, 0x33, 0x73, 0xcd, 0x62, 0x04, 0x3c, 0x16, 0x7f, 0x3c, /* Byte value: 0xba */ + 0x27, 0xb1, 0x8e, 0x85, 0x43, 0x02, 0x99, 0x08, 0xd4, 0xae, 0x6d, 0x7d, 0xde, 0x95, 0x53, 0xde, /* Byte value: 0xbb */ + 0x18, 0x1a, 0x3b, 0x82, 0x16, 0x75, 0x51, 0x17, 0xcf, 0x67, 0xc2, 0xec, 0xad, 0xac, 0x38, 0xad, /* Byte value: 0xbc */ + 0x23, 0x0b, 0xda, 0xba, 0xfb, 0x4b, 0xde, 0xef, 0x17, 0xe0, 0xf3, 0xee, 0xb3, 0xa7, 0xe6, 0xb3, /* Byte value: 0xbd */ + 0xf2, 0xb9, 0x47, 0xa3, 0xc0, 0x01, 0xad, 0x04, 0x6a, 0x57, 0xd7, 0xdf, 0x6f, 0xab, 0xc8, 0x6f, /* Byte value: 0xbe */ + 0x95, 0xf9, 0xc0, 0x50, 0x52, 0x19, 0xce, 0x64, 0xd3, 0x93, 0x4e, 0x86, 0xae, 0x98, 0x9a, 0xae, /* Byte value: 0xbf */ + 0xd5, 0x08, 0xc9, 0x26, 0x83, 0x03, 0x34, 0x0c, 0xbe, 0xf9, 0xba, 0xa2, 0xb1, 0x3e, 0x9b, 0xb1, /* Byte value: 0xc0 */ + 0xa9, 0xc0, 0x4a, 0xd6, 0x75, 0x28, 0xa5, 0xa0, 0x08, 0x8f, 0x68, 0xeb, 0x80, 0x55, 0xf6, 0x80, /* Byte value: 0xc1 */ + 0x84, 0x9b, 0x46, 0xd3, 0xd9, 0x7d, 0x70, 0x37, 0x19, 0x9a, 0xb5, 0xdb, 0x53, 0xbd, 0xb7, 0x53, /* Byte value: 0xc2 */ + 0xe1, 0x86, 0xeb, 0xde, 0x17, 0xa0, 0xd1, 0xc5, 0x20, 0x79, 0x63, 0x2a, 0x45, 0x97, 0x5e, 0x45, /* Byte value: 0xc3 */ + 0x1d, 0x6f, 0x7a, 0xc2, 0x80, 0xbf, 0x77, 0xb9, 0x4c, 0xdb, 0x9a, 0x2b, 0x4a, 0x73, 0x31, 0x4a, /* Byte value: 0xc4 */ + 0x93, 0x1e, 0xbe, 0x91, 0xb6, 0x95, 0x4b, 0x11, 0x90, 0xfa, 0x9f, 0xbd, 0x14, 0xb3, 0x94, 0x14, /* Byte value: 0xc5 */ + 0x28, 0x2e, 0x4d, 0x45, 0x3a, 0x9f, 0xf3, 0x39, 0x92, 0xa9, 0x85, 0xf7, 0x34, 0x37, 0x48, 0x34, /* Byte value: 0xc6 */ + 0xc6, 0x37, 0x65, 0x5b, 0x54, 0xa2, 0x48, 0xcd, 0xf4, 0xd7, 0x0e, 0x57, 0x9b, 0x02, 0x0d, 0x9b, /* Byte value: 0xc7 */ + 0x7b, 0xe0, 0xe8, 0x4e, 0x3c, 0x24, 0x75, 0x90, 0xb5, 0xed, 0xc5, 0x26, 0x01, 0xad, 0xdf, 0x01, /* Byte value: 0xc8 */ + 0x65, 0x1d, 0xad, 0x0d, 0xce, 0xdd, 0xa1, 0xf2, 0x39, 0xe3, 0xd6, 0xf1, 0x16, 0x2a, 0xe9, 0x16, /* Byte value: 0xc9 */ + 0x75, 0xb0, 0x3e, 0xf1, 0x6b, 0x3a, 0x7e, 0xe8, 0xb3, 0x18, 0xeb, 0xf8, 0x61, 0xe2, 0x78, 0x61, /* Byte value: 0xca */ + 0x7c, 0xc8, 0x83, 0xf0, 0xf6, 0x2b, 0x91, 0xac, 0xb6, 0x76, 0xd2, 0x49, 0x31, 0x6b, 0x6d, 0x31, /* Byte value: 0xcb */ + 0xe3, 0xdb, 0xc1, 0x20, 0x4b, 0x65, 0x13, 0x57, 0xa0, 0x5e, 0x2c, 0x82, 0x92, 0x8e, 0xe5, 0x92, /* Byte value: 0xcc */ + 0xee, 0x19, 0x28, 0x1e, 0x6e, 0x3d, 0xbb, 0xf4, 0x66, 0x7e, 0x8b, 0xa0, 0xaf, 0x35, 0x45, 0xaf, /* Byte value: 0xcd */ + 0x21, 0x56, 0xf0, 0x44, 0xa7, 0x8e, 0x1c, 0x7d, 0x97, 0xc7, 0xbc, 0x46, 0x64, 0xbe, 0x5d, 0x64, /* Byte value: 0xce */ + 0x8e, 0x71, 0xc4, 0x53, 0x36, 0x2a, 0x3c, 0xa8, 0xdc, 0x21, 0x05, 0x96, 0x5e, 0xc0, 0xa5, 0x5e, /* Byte value: 0xcf */ + 0xf9, 0x9c, 0xd0, 0x5c, 0x01, 0xd5, 0x80, 0xd2, 0xef, 0x1e, 0xa1, 0xc6, 0xe8, 0x3b, 0x66, 0xe8, /* Byte value: 0xd0 */ + 0x01, 0xcf, 0x15, 0x7f, 0x2e, 0x83, 0x61, 0x49, 0x40, 0xf2, 0xc6, 0x54, 0x8a, 0xed, 0xbc, 0x8a, /* Byte value: 0xd1 */ + 0x5b, 0x79, 0x0d, 0x75, 0xb5, 0x29, 0x08, 0xa4, 0x62, 0xd8, 0xbf, 0x34, 0xef, 0xfe, 0x3e, 0xef, /* Byte value: 0xd2 */ + 0x91, 0x43, 0x94, 0x6f, 0xea, 0x50, 0x89, 0x83, 0x10, 0xdd, 0xd0, 0x15, 0xc3, 0xaa, 0x2f, 0xc3, /* Byte value: 0xd3 */ + 0x14, 0x17, 0xc7, 0xc3, 0x1d, 0xae, 0x98, 0xfd, 0x49, 0xb5, 0xa3, 0x9a, 0x1a, 0xfa, 0x24, 0x1a, /* Byte value: 0xd4 */ + 0x7a, 0x2f, 0xfd, 0x31, 0x12, 0xa7, 0x14, 0xd9, 0xf5, 0x1f, 0x03, 0x72, 0x8b, 0x40, 0x63, 0x8b, /* Byte value: 0xd5 */ + 0xf6, 0x03, 0x13, 0x9c, 0x78, 0x48, 0xea, 0xe3, 0xa9, 0x19, 0x49, 0x4c, 0x02, 0x99, 0x7d, 0x02, /* Byte value: 0xd6 */ + 0xb1, 0xda, 0x71, 0x54, 0x63, 0x5d, 0xf4, 0xb7, 0xc7, 0xe8, 0xaa, 0x07, 0x2d, 0xf9, 0xce, 0x2d, /* Byte value: 0xd7 */ + 0xb7, 0x3d, 0x0f, 0x95, 0x87, 0xd1, 0x71, 0xc2, 0x84, 0x81, 0x7b, 0x3c, 0x97, 0xd2, 0xc0, 0x97, /* Byte value: 0xd8 */ + 0xca, 0x3a, 0x99, 0x1a, 0x5f, 0x79, 0x81, 0x27, 0x72, 0x05, 0x6f, 0x21, 0x2c, 0x54, 0x11, 0x2c, /* Byte value: 0xd9 */ + 0x5a, 0xb6, 0x18, 0x0a, 0x9b, 0xaa, 0x69, 0xed, 0x22, 0x2a, 0x79, 0x60, 0x65, 0x13, 0x82, 0x65, /* Byte value: 0xda */ + 0xf8, 0x53, 0xc5, 0x23, 0x2f, 0x56, 0xe1, 0x9b, 0xaf, 0xec, 0x67, 0x92, 0x62, 0xd6, 0xda, 0x62, /* Byte value: 0xdb */ + 0xcc, 0xdd, 0xe7, 0xdb, 0xbb, 0xf5, 0x04, 0x52, 0x31, 0x6c, 0xbe, 0x1a, 0x96, 0x7f, 0x1f, 0x96, /* Byte value: 0xdc */ + 0x47, 0xd9, 0x62, 0xc8, 0x1b, 0x15, 0x1e, 0x54, 0x6e, 0xf1, 0xe3, 0x4b, 0x2f, 0x60, 0xb3, 0x2f, /* Byte value: 0xdd */ + 0x96, 0x6b, 0xff, 0xd1, 0x20, 0x5f, 0x6d, 0xbf, 0x13, 0x46, 0xc7, 0x7a, 0xf3, 0x6c, 0x9d, 0xf3, /* Byte value: 0xde */ + 0x6e, 0x38, 0x3a, 0xf2, 0x0f, 0x09, 0x8c, 0x24, 0xbc, 0xaa, 0xa0, 0xe8, 0x91, 0xba, 0x47, 0x91, /* Byte value: 0xdf */ + 0x13, 0x3f, 0xac, 0x7d, 0xd7, 0xa1, 0x7c, 0xc1, 0x4a, 0x2e, 0xb4, 0xf5, 0x2a, 0x3c, 0x96, 0x2a, /* Byte value: 0xe0 */ + 0x24, 0x23, 0xb1, 0x04, 0x31, 0x44, 0x3a, 0xd3, 0x14, 0x7b, 0xe4, 0x81, 0x83, 0x61, 0x54, 0x83, /* Byte value: 0xe1 */ + 0x74, 0x7f, 0x2b, 0x8e, 0x45, 0xb9, 0x1f, 0xa1, 0xf3, 0xea, 0x2d, 0xac, 0xeb, 0x0f, 0xc4, 0xeb, /* Byte value: 0xe2 */ + 0x09, 0x78, 0xbd, 0x01, 0x9d, 0x11, 0xef, 0x44, 0x05, 0x6e, 0x39, 0xb1, 0x50, 0x89, 0x15, 0x50, /* Byte value: 0xe3 */ + 0x03, 0x92, 0x3f, 0x81, 0x72, 0x46, 0xa3, 0xdb, 0xc0, 0xd5, 0x89, 0xfc, 0x5d, 0xf4, 0x07, 0x5d, /* Byte value: 0xe4 */ + 0x30, 0x34, 0x76, 0xc7, 0x2c, 0xea, 0xa2, 0x2e, 0x5d, 0xce, 0x47, 0x1b, 0x99, 0x9b, 0x70, 0x99, /* Byte value: 0xe5 */ + 0x50, 0x5c, 0x9a, 0x8a, 0x74, 0xfd, 0x25, 0x72, 0xe7, 0x91, 0xc9, 0x2d, 0x68, 0x6e, 0x90, 0x68, /* Byte value: 0xe6 */ + 0x4f, 0x6e, 0xca, 0xb6, 0xa8, 0x87, 0x90, 0x59, 0x2b, 0x6d, 0x1c, 0xae, 0xf5, 0x04, 0x1a, 0xf5, /* Byte value: 0xe7 */ + 0x0e, 0x50, 0xd6, 0xbf, 0x57, 0x1e, 0x0b, 0x78, 0x06, 0xf5, 0x2e, 0xde, 0x60, 0x4f, 0xa7, 0x60, /* Byte value: 0xe8 */ + 0x7d, 0x07, 0x96, 0x8f, 0xd8, 0xa8, 0xf0, 0xe5, 0xf6, 0x84, 0x14, 0x1d, 0xbb, 0x86, 0xd1, 0xbb, /* Byte value: 0xe9 */ + 0xb9, 0x6d, 0xd9, 0x2a, 0xd0, 0xcf, 0x7a, 0xba, 0x82, 0x74, 0x55, 0xe2, 0xf7, 0x9d, 0x67, 0xf7, /* Byte value: 0xea */ + 0x37, 0x1c, 0x1d, 0x79, 0xe6, 0xe5, 0x46, 0x12, 0x5e, 0x55, 0x50, 0x74, 0xa9, 0x5d, 0xc2, 0xa9, /* Byte value: 0xeb */ + 0x54, 0xe6, 0xce, 0xb5, 0xcc, 0xb4, 0x62, 0x95, 0x24, 0xdf, 0x57, 0xbe, 0x05, 0x5c, 0x25, 0x05, /* Byte value: 0xec */ + 0x1f, 0x32, 0x50, 0x3c, 0xdc, 0x7a, 0xb5, 0x2b, 0xcc, 0xfc, 0xd5, 0x83, 0x9d, 0x6a, 0x8a, 0x9d, /* Byte value: 0xed */ + 0xc2, 0x8d, 0x31, 0x64, 0xec, 0xeb, 0x0f, 0x2a, 0x37, 0x99, 0x90, 0xc4, 0xf6, 0x30, 0xb8, 0xf6, /* Byte value: 0xee */ + 0x33, 0xa6, 0x49, 0x46, 0x5e, 0xac, 0x01, 0xf5, 0x9d, 0x1b, 0xce, 0xe7, 0xc4, 0x6f, 0x77, 0xc4, /* Byte value: 0xef */ + 0x3a, 0xde, 0xf4, 0x47, 0xc3, 0xbd, 0xee, 0xb1, 0x98, 0x75, 0xf7, 0x56, 0x94, 0xe6, 0x62, 0x94, /* Byte value: 0xf0 */ + 0xe5, 0x3c, 0xbf, 0xe1, 0xaf, 0xe9, 0x96, 0x22, 0xe3, 0x37, 0xfd, 0xb9, 0x28, 0xa5, 0xeb, 0x28, /* Byte value: 0xf1 */ + 0xe8, 0xfe, 0x56, 0xdf, 0x8a, 0xb1, 0x3e, 0x81, 0x25, 0x17, 0x5a, 0x9b, 0x15, 0x1e, 0x4b, 0x15, /* Byte value: 0xf2 */ + 0x12, 0xf0, 0xb9, 0x02, 0xf9, 0x22, 0x1d, 0x88, 0x0a, 0xdc, 0x72, 0xa1, 0xa0, 0xd1, 0x2a, 0xa0, /* Byte value: 0xf3 */ + 0x92, 0xd1, 0xab, 0xee, 0x98, 0x16, 0x2a, 0x58, 0xd0, 0x08, 0x59, 0xe9, 0x9e, 0x5e, 0x28, 0x9e, /* Byte value: 0xf4 */ + 0xac, 0xb5, 0x0b, 0x96, 0xe3, 0xe2, 0x83, 0x0e, 0x8b, 0x33, 0x30, 0x2c, 0x67, 0x8a, 0xff, 0x67, /* Byte value: 0xf5 */ + 0x34, 0x8e, 0x22, 0xf8, 0x94, 0xa3, 0xe5, 0xc9, 0x9e, 0x80, 0xd9, 0x88, 0xf4, 0xa9, 0xc5, 0xf4, /* Byte value: 0xf6 */ + 0x52, 0x01, 0xb0, 0x74, 0x28, 0x38, 0xe7, 0xe0, 0x67, 0xb6, 0x86, 0x85, 0xbf, 0x77, 0x2b, 0xbf, /* Byte value: 0xf7 */ + 0xed, 0x8b, 0x17, 0x9f, 0x1c, 0x7b, 0x18, 0x2f, 0xa6, 0xab, 0x02, 0x5c, 0xf2, 0xc1, 0x42, 0xf2, /* Byte value: 0xf8 */ + 0xfa, 0x0e, 0xef, 0xdd, 0x73, 0x93, 0x23, 0x09, 0x2f, 0xcb, 0x28, 0x3a, 0xb5, 0xcf, 0x61, 0xb5, /* Byte value: 0xf9 */ + 0x98, 0x3b, 0x29, 0x6e, 0x77, 0x41, 0x66, 0xc7, 0x15, 0xb3, 0xe9, 0xa4, 0x93, 0x23, 0x3a, 0x93, /* Byte value: 0xfa */ + 0xdf, 0xe2, 0x4b, 0xa6, 0x6c, 0x54, 0x78, 0x93, 0x7b, 0x42, 0x0a, 0xef, 0xbc, 0x43, 0x89, 0xbc, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x66, 0x8f, 0x92, 0x8c, 0xbc, 0x9b, 0x02, 0x29, 0xf9, 0x36, 0x5f, 0x0d, 0x4b, 0xde, 0xee, 0x4b, /* Byte value: 0xfd */ + 0x2f, 0x06, 0x26, 0xfb, 0xf0, 0x90, 0x17, 0x05, 0x91, 0x32, 0x92, 0x98, 0x04, 0xf1, 0xfa, 0x04, /* Byte value: 0xfe */ + 0x3e, 0x64, 0xa0, 0x78, 0x7b, 0xf4, 0xa9, 0x56, 0x5b, 0x3b, 0x69, 0xc5, 0xf9, 0xd4, 0xd7, 0xf9, /* Byte value: 0xff */ + + /* Matrix row: 6 */ + 0x51, 0x8b, 0xc0, 0x48, 0x41, 0xdb, 0x9d, 0x79, 0x04, 0x5b, 0xb3, 0x42, 0x6e, 0xe5, 0x18, 0xc6, /* Byte value: 0x00 */ + 0x33, 0xea, 0x25, 0x27, 0xfa, 0x81, 0x30, 0xe7, 0xa3, 0x06, 0xf7, 0x12, 0x65, 0x8f, 0x4c, 0x36, /* Byte value: 0x01 */ + 0xa4, 0x98, 0x5a, 0x40, 0x48, 0x42, 0xb3, 0xc9, 0x3b, 0x2e, 0x19, 0xca, 0x9c, 0x04, 0x9a, 0x9d, /* Byte value: 0x02 */ + 0x67, 0xeb, 0x11, 0xd7, 0x14, 0x97, 0xc2, 0x59, 0x6c, 0x89, 0xa6, 0x39, 0x6b, 0x80, 0xab, 0x4b, /* Byte value: 0x03 */ + 0x0a, 0xd7, 0x2b, 0xb3, 0x9d, 0x59, 0xde, 0x4d, 0x55, 0x6b, 0x07, 0xd2, 0xc0, 0x17, 0x3d, 0xb5, /* Byte value: 0x04 */ + 0xe7, 0x33, 0xd5, 0x7d, 0x3a, 0x1c, 0x1b, 0x11, 0xa6, 0x3b, 0x18, 0xa1, 0xf1, 0xc2, 0x52, 0x20, /* Byte value: 0x05 */ + 0x28, 0xda, 0xac, 0x89, 0x31, 0xa7, 0xfe, 0xf7, 0x97, 0x6f, 0x1c, 0xce, 0x86, 0x5c, 0xf4, 0x91, /* Byte value: 0x06 */ + 0x1a, 0xcc, 0xd2, 0x37, 0xe8, 0x70, 0x6c, 0x44, 0xdd, 0xec, 0x60, 0xc1, 0x42, 0x8e, 0x8b, 0x80, /* Byte value: 0x07 */ + 0x6c, 0xc0, 0x61, 0xfd, 0xaa, 0x98, 0xbe, 0x40, 0xd0, 0x67, 0x2a, 0xf6, 0x0a, 0xca, 0xa5, 0xd9, /* Byte value: 0x08 */ + 0x65, 0xd0, 0xa7, 0x26, 0x52, 0x3b, 0x45, 0xf1, 0x7d, 0x40, 0x73, 0x03, 0xea, 0x3a, 0xcd, 0x05, /* Byte value: 0x09 */ + 0xfa, 0x4e, 0x45, 0x03, 0x3b, 0x0d, 0x9f, 0x3a, 0xa1, 0xca, 0x4f, 0x33, 0x52, 0x1c, 0x40, 0x55, /* Byte value: 0x0a */ + 0xe8, 0x6e, 0x0a, 0x76, 0x08, 0x88, 0xaa, 0x9b, 0x38, 0x84, 0xfd, 0x1a, 0x51, 0x3f, 0x90, 0x2e, /* Byte value: 0x0b */ + 0xac, 0x74, 0xc7, 0x02, 0x93, 0xb7, 0xea, 0x2c, 0x7f, 0x8c, 0xcb, 0x22, 0xdd, 0xa9, 0xc1, 0x66, /* Byte value: 0x0c */ + 0x5a, 0xa0, 0xb0, 0x62, 0xff, 0xd4, 0xe1, 0x60, 0xb8, 0xb5, 0x3f, 0x8d, 0x0f, 0xaf, 0x16, 0x54, /* Byte value: 0x0d */ + 0xa9, 0xfe, 0x33, 0xba, 0x3c, 0x7a, 0x85, 0xeb, 0xb4, 0x58, 0x29, 0x4b, 0xbd, 0x43, 0x3e, 0xdd, /* Byte value: 0x0e */ + 0x30, 0x2d, 0xc8, 0x4f, 0x9f, 0x7b, 0x15, 0x1b, 0x5b, 0x4a, 0xa9, 0x35, 0x45, 0x68, 0x19, 0x5f, /* Byte value: 0x0f */ + 0x8b, 0xf3, 0xb4, 0x80, 0x90, 0x84, 0xa5, 0x51, 0x76, 0x5c, 0x32, 0x57, 0xfb, 0x08, 0xf7, 0xf9, /* Byte value: 0x10 */ + 0x83, 0x1f, 0x29, 0xc2, 0x4b, 0x71, 0xfc, 0xb4, 0x32, 0xfe, 0xe0, 0xbf, 0xba, 0xa5, 0xac, 0x02, /* Byte value: 0x11 */ + 0xef, 0xdf, 0x48, 0x3f, 0xe1, 0xe9, 0x42, 0xf4, 0xe2, 0x99, 0xca, 0x49, 0xb0, 0x6f, 0x09, 0xdb, /* Byte value: 0x12 */ + 0x66, 0x17, 0x4a, 0x4e, 0x37, 0xc1, 0x60, 0x0d, 0x85, 0x0c, 0x2d, 0x24, 0xca, 0xdd, 0x98, 0x6c, /* Byte value: 0x13 */ + 0x14, 0x6d, 0x56, 0xa5, 0xf9, 0xb2, 0x7f, 0x9a, 0xaa, 0xd6, 0x0e, 0x67, 0x43, 0x2e, 0x7a, 0xa9, /* Byte value: 0x14 */ + 0x0d, 0x66, 0x69, 0xfa, 0x74, 0x38, 0x36, 0x22, 0x8f, 0x76, 0x30, 0x81, 0x21, 0x47, 0xa4, 0x40, /* Byte value: 0x15 */ + 0x05, 0x8a, 0xf4, 0xb8, 0xaf, 0xcd, 0x6f, 0xc7, 0xcb, 0xd4, 0xe2, 0x69, 0x60, 0xea, 0xff, 0xbb, /* Byte value: 0x16 */ + 0x92, 0xf8, 0x8b, 0xdf, 0x1d, 0x0e, 0xec, 0xe9, 0x53, 0xfc, 0x0c, 0xb1, 0x99, 0x61, 0x29, 0x10, /* Byte value: 0x17 */ + 0x7a, 0x96, 0x81, 0xa9, 0x15, 0x86, 0x46, 0x72, 0x6b, 0x78, 0xf1, 0xab, 0xc8, 0x5e, 0xb9, 0x3e, /* Byte value: 0x18 */ + 0x13, 0xdc, 0x14, 0xec, 0x10, 0xd3, 0x97, 0xf5, 0x70, 0xcb, 0x39, 0x34, 0xa2, 0x7e, 0xe3, 0x5c, /* Byte value: 0x19 */ + 0xd8, 0x43, 0xc2, 0x39, 0x97, 0xf3, 0xbf, 0x80, 0x63, 0xce, 0x54, 0x2f, 0x14, 0x57, 0x89, 0x71, /* Byte value: 0x1a */ + 0x87, 0x69, 0x86, 0xe3, 0xc7, 0xea, 0x31, 0x27, 0x10, 0xaf, 0x89, 0xcb, 0x7b, 0x12, 0x60, 0x9e, /* Byte value: 0x1b */ + 0xb5, 0x7f, 0xf8, 0x5d, 0x1e, 0x3d, 0xa3, 0x94, 0x5a, 0x2c, 0xf5, 0xc4, 0xbf, 0xc0, 0x1f, 0x8f, /* Byte value: 0x1c */ + 0xdf, 0xf2, 0x80, 0x70, 0x7e, 0x92, 0x57, 0xef, 0xb9, 0xd3, 0x63, 0x7c, 0xf5, 0x07, 0x10, 0x84, /* Byte value: 0x1d */ + 0x91, 0x3f, 0x66, 0xb7, 0x78, 0xf4, 0xc9, 0x15, 0xab, 0xb0, 0x52, 0x96, 0xb9, 0x86, 0x7c, 0x79, /* Byte value: 0x1e */ + 0x2d, 0x50, 0x58, 0x31, 0x9e, 0x6a, 0x91, 0x30, 0x5c, 0xbb, 0xfe, 0xa7, 0xe6, 0xb6, 0x0b, 0x2a, /* Byte value: 0x1f */ + 0xa0, 0xee, 0xf5, 0x61, 0xc4, 0xd9, 0x7e, 0x5a, 0x19, 0x7f, 0x70, 0xbe, 0x5d, 0xb3, 0x56, 0x01, /* Byte value: 0x20 */ + 0xbf, 0xa8, 0xd3, 0xee, 0x83, 0x64, 0x7d, 0xd9, 0x0f, 0x47, 0xf2, 0x16, 0x7f, 0xd7, 0x22, 0x3a, /* Byte value: 0x21 */ + 0x24, 0x40, 0x9e, 0xea, 0x66, 0xc9, 0x6a, 0x81, 0xf1, 0x9c, 0xa7, 0x52, 0x06, 0x46, 0x63, 0xf6, /* Byte value: 0x22 */ + 0x49, 0x7c, 0xa4, 0x8e, 0xef, 0x07, 0x76, 0x95, 0xc8, 0x7e, 0x06, 0xb9, 0xad, 0xd1, 0xf5, 0x08, /* Byte value: 0x23 */ + 0xee, 0x23, 0x13, 0xa6, 0xc2, 0xbf, 0xe0, 0xa0, 0x0b, 0x1c, 0x41, 0x54, 0x11, 0x32, 0x3a, 0xfc, /* Byte value: 0x24 */ + 0x2c, 0xac, 0x03, 0xa8, 0xbd, 0x3c, 0x33, 0x64, 0xb5, 0x3e, 0x75, 0xba, 0x47, 0xeb, 0x38, 0x0d, /* Byte value: 0x25 */ + 0x1d, 0x7d, 0x90, 0x7e, 0x01, 0x11, 0x84, 0x2b, 0x07, 0xf1, 0x57, 0x92, 0xa3, 0xde, 0x12, 0x75, /* Byte value: 0x26 */ + 0xcc, 0x2e, 0x94, 0x9c, 0x6e, 0x41, 0xc0, 0x1a, 0xc9, 0x18, 0x5a, 0x48, 0x57, 0x79, 0xf3, 0xd8, /* Byte value: 0x27 */ + 0x7c, 0xdb, 0x98, 0x79, 0xdf, 0xb1, 0x0c, 0x49, 0x58, 0xe0, 0x4d, 0xe5, 0x88, 0x53, 0x13, 0xec, /* Byte value: 0x28 */ + 0x8e, 0x79, 0x40, 0x38, 0x3f, 0x49, 0xca, 0x96, 0xbd, 0x88, 0xd0, 0x3e, 0x9b, 0xe2, 0x08, 0x42, /* Byte value: 0x29 */ + 0xb8, 0x19, 0x91, 0xa7, 0x6a, 0x05, 0x95, 0xb6, 0xd5, 0x5a, 0xc5, 0x45, 0x9e, 0x87, 0xbb, 0xcf, /* Byte value: 0x2a */ + 0xe6, 0xcf, 0x8e, 0xe4, 0x19, 0x4a, 0xb9, 0x45, 0x4f, 0xbe, 0x93, 0xbc, 0x50, 0x9f, 0x61, 0x07, /* Byte value: 0x2b */ + 0xf4, 0xef, 0xc1, 0x91, 0x2a, 0xcf, 0x8c, 0xe4, 0xd6, 0xf0, 0x21, 0x95, 0x53, 0xbc, 0xb1, 0x7c, /* Byte value: 0x2c */ + 0x26, 0x7b, 0x28, 0x1b, 0x20, 0x65, 0xed, 0x29, 0xe0, 0x55, 0x72, 0x68, 0x87, 0xfc, 0x05, 0xb8, /* Byte value: 0x2d */ + 0x1b, 0x30, 0x89, 0xae, 0xcb, 0x26, 0xce, 0x10, 0x34, 0x69, 0xeb, 0xdc, 0xe3, 0xd3, 0xb8, 0xa7, /* Byte value: 0x2e */ + 0x4f, 0x31, 0xbd, 0x5e, 0x25, 0x30, 0x3c, 0xae, 0xfb, 0xe6, 0xba, 0xf7, 0xed, 0xdc, 0x5f, 0xda, /* Byte value: 0x2f */ + 0xd5, 0x25, 0xab, 0xc3, 0xe3, 0xcb, 0x89, 0xa2, 0xec, 0xb8, 0x64, 0xae, 0x35, 0x10, 0x2d, 0x31, /* Byte value: 0x30 */ + 0xc5, 0x3e, 0x52, 0x47, 0x96, 0xe2, 0x3b, 0xab, 0x64, 0x3f, 0x03, 0xbd, 0xb7, 0x89, 0x9b, 0x04, /* Byte value: 0x31 */ + 0x50, 0x77, 0x9b, 0xd1, 0x62, 0x8d, 0x3f, 0x2d, 0xed, 0xde, 0x38, 0x5f, 0xcf, 0xb8, 0x2b, 0xe1, /* Byte value: 0x32 */ + 0x79, 0x51, 0x6c, 0xc1, 0x70, 0x7c, 0x63, 0x8e, 0x93, 0x34, 0xaf, 0x8c, 0xe8, 0xb9, 0xec, 0x57, /* Byte value: 0x33 */ + 0x77, 0xf0, 0xe8, 0x53, 0x61, 0xbe, 0x70, 0x50, 0xe4, 0x0e, 0xc1, 0x2a, 0xe9, 0x19, 0x1d, 0x7e, /* Byte value: 0x34 */ + 0x16, 0x56, 0xe0, 0x54, 0xbf, 0x1e, 0xf8, 0x32, 0xbb, 0x1f, 0xdb, 0x5d, 0xc2, 0x94, 0x1c, 0xe7, /* Byte value: 0x35 */ + 0x52, 0x4c, 0x2d, 0x20, 0x24, 0x21, 0xb8, 0x85, 0xfc, 0x17, 0xed, 0x65, 0x4e, 0x02, 0x4d, 0xaf, /* Byte value: 0x36 */ + 0x15, 0x91, 0x0d, 0x3c, 0xda, 0xe4, 0xdd, 0xce, 0x43, 0x53, 0x85, 0x7a, 0xe2, 0x73, 0x49, 0x8e, /* Byte value: 0x37 */ + 0x9b, 0xe8, 0x4d, 0x04, 0xe5, 0xad, 0x17, 0x58, 0xfe, 0xdb, 0x55, 0x44, 0x79, 0x91, 0x41, 0xcc, /* Byte value: 0x38 */ + 0xb4, 0x83, 0xa3, 0xc4, 0x3d, 0x6b, 0x01, 0xc0, 0xb3, 0xa9, 0x7e, 0xd9, 0x1e, 0x9d, 0x2c, 0xa8, /* Byte value: 0x39 */ + 0x3e, 0x8c, 0x4c, 0xdd, 0x8e, 0xb9, 0x06, 0xc5, 0x2c, 0x70, 0xc7, 0x93, 0x44, 0xc8, 0xe8, 0x76, /* Byte value: 0x3a */ + 0x80, 0xd8, 0xc4, 0xaa, 0x2e, 0x8b, 0xd9, 0x48, 0xca, 0xb2, 0xbe, 0x98, 0x9a, 0x42, 0xf9, 0x6b, /* Byte value: 0x3b */ + 0x36, 0x60, 0xd1, 0x9f, 0x55, 0x4c, 0x5f, 0x20, 0x68, 0xd2, 0x15, 0x7b, 0x05, 0x65, 0xb3, 0x8d, /* Byte value: 0x3c */ + 0xd3, 0x68, 0xb2, 0x13, 0x29, 0xfc, 0xc3, 0x99, 0xdf, 0x20, 0xd8, 0xe0, 0x75, 0x1d, 0x87, 0xe3, /* Byte value: 0x3d */ + 0x2b, 0x1d, 0x41, 0xe1, 0x54, 0x5d, 0xdb, 0x0b, 0x6f, 0x23, 0x42, 0xe9, 0xa6, 0xbb, 0xa1, 0xf8, /* Byte value: 0x3e */ + 0x01, 0xfc, 0x5b, 0x99, 0x23, 0x56, 0xa2, 0x54, 0xe9, 0x85, 0x8b, 0x1d, 0xa1, 0x5d, 0x33, 0x27, /* Byte value: 0x3f */ + 0x99, 0xd3, 0xfb, 0xf5, 0xa3, 0x01, 0x90, 0xf0, 0xef, 0x12, 0x80, 0x7e, 0xf8, 0x2b, 0x27, 0x82, /* Byte value: 0x40 */ + 0xdd, 0xc9, 0x36, 0x81, 0x38, 0x3e, 0xd0, 0x47, 0xa8, 0x1a, 0xb6, 0x46, 0x74, 0xbd, 0x76, 0xca, /* Byte value: 0x41 */ + 0xf6, 0xd4, 0x77, 0x60, 0x6c, 0x63, 0x0b, 0x4c, 0xc7, 0x39, 0xf4, 0xaf, 0xd2, 0x06, 0xd7, 0x32, /* Byte value: 0x42 */ + 0x68, 0xb6, 0xce, 0xdc, 0x26, 0x03, 0x73, 0xd3, 0xf2, 0x36, 0x43, 0x82, 0xcb, 0x7d, 0x69, 0x45, /* Byte value: 0x43 */ + 0x12, 0x20, 0x4f, 0x75, 0x33, 0x85, 0x35, 0xa1, 0x99, 0x4e, 0xb2, 0x29, 0x03, 0x23, 0xd0, 0x7b, /* Byte value: 0x44 */ + 0x8a, 0x0f, 0xef, 0x19, 0xb3, 0xd2, 0x07, 0x05, 0x9f, 0xd9, 0xb9, 0x4a, 0x5a, 0x55, 0xc4, 0xde, /* Byte value: 0x45 */ + 0x09, 0x10, 0xc6, 0xdb, 0xf8, 0xa3, 0xfb, 0xb1, 0xad, 0x27, 0x59, 0xf5, 0xe0, 0xf0, 0x68, 0xdc, /* Byte value: 0x46 */ + 0xa6, 0xa3, 0xec, 0xb1, 0x0e, 0xee, 0x34, 0x61, 0x2a, 0xe7, 0xcc, 0xf0, 0x1d, 0xbe, 0xfc, 0xd3, /* Byte value: 0x47 */ + 0x72, 0x7a, 0x1c, 0xeb, 0xce, 0x73, 0x1f, 0x97, 0x2f, 0xda, 0x23, 0x43, 0x89, 0xf3, 0xe2, 0xc5, /* Byte value: 0x48 */ + 0xc4, 0xc2, 0x09, 0xde, 0xb5, 0xb4, 0x99, 0xff, 0x8d, 0xba, 0x88, 0xa0, 0x16, 0xd4, 0xa8, 0x23, /* Byte value: 0x49 */ + 0x3a, 0xfa, 0xe3, 0xfc, 0x02, 0x22, 0xcb, 0x56, 0x0e, 0x21, 0xae, 0xe7, 0x85, 0x7f, 0x24, 0xea, /* Byte value: 0x4a */ + 0x74, 0x37, 0x05, 0x3b, 0x04, 0x44, 0x55, 0xac, 0x1c, 0x42, 0x9f, 0x0d, 0xc9, 0xfe, 0x48, 0x17, /* Byte value: 0x4b */ + 0xc1, 0x48, 0xfd, 0x66, 0x1a, 0x79, 0xf6, 0x38, 0x46, 0x6e, 0x6a, 0xc9, 0x76, 0x3e, 0x57, 0x98, /* Byte value: 0x4c */ + 0xca, 0x63, 0x8d, 0x4c, 0xa4, 0x76, 0x8a, 0x21, 0xfa, 0x80, 0xe6, 0x06, 0x17, 0x74, 0x59, 0x0a, /* Byte value: 0x4d */ + 0xb9, 0xe5, 0xca, 0x3e, 0x49, 0x53, 0x37, 0xe2, 0x3c, 0xdf, 0x4e, 0x58, 0x3f, 0xda, 0x88, 0xe8, /* Byte value: 0x4e */ + 0x70, 0x41, 0xaa, 0x1a, 0x88, 0xdf, 0x98, 0x3f, 0x3e, 0x13, 0xf6, 0x79, 0x08, 0x49, 0x84, 0x8b, /* Byte value: 0x4f */ + 0xbc, 0x6f, 0x3e, 0x86, 0xe6, 0x9e, 0x58, 0x25, 0xf7, 0x0b, 0xac, 0x31, 0x5f, 0x30, 0x77, 0x53, /* Byte value: 0x50 */ + 0x34, 0x5b, 0x67, 0x6e, 0x13, 0xe0, 0xd8, 0x88, 0x79, 0x1b, 0xc0, 0x41, 0x84, 0xdf, 0xd5, 0xc3, /* Byte value: 0x51 */ + 0x6a, 0x8d, 0x78, 0x2d, 0x60, 0xaf, 0xf4, 0x7b, 0xe3, 0xff, 0x96, 0xb8, 0x4a, 0xc7, 0x0f, 0x0b, /* Byte value: 0x52 */ + 0x48, 0x80, 0xff, 0x17, 0xcc, 0x51, 0xd4, 0xc1, 0x21, 0xfb, 0x8d, 0xa4, 0x0c, 0x8c, 0xc6, 0x2f, /* Byte value: 0x53 */ + 0x5f, 0x2a, 0x44, 0xda, 0x50, 0x19, 0x8e, 0xa7, 0x73, 0x61, 0xdd, 0xe4, 0x6f, 0x45, 0xe9, 0xef, /* Byte value: 0x54 */ + 0x8f, 0x85, 0x1b, 0xa1, 0x1c, 0x1f, 0x68, 0xc2, 0x54, 0x0d, 0x5b, 0x23, 0x3a, 0xbf, 0x3b, 0x65, /* Byte value: 0x55 */ + 0x69, 0x4a, 0x95, 0x45, 0x05, 0x55, 0xd1, 0x87, 0x1b, 0xb3, 0xc8, 0x9f, 0x6a, 0x20, 0x5a, 0x62, /* Byte value: 0x56 */ + 0x9a, 0x14, 0x16, 0x9d, 0xc6, 0xfb, 0xb5, 0x0c, 0x17, 0x5e, 0xde, 0x59, 0xd8, 0xcc, 0x72, 0xeb, /* Byte value: 0x57 */ + 0xda, 0x78, 0x74, 0xc8, 0xd1, 0x5f, 0x38, 0x28, 0x72, 0x07, 0x81, 0x15, 0x95, 0xed, 0xef, 0x3f, /* Byte value: 0x58 */ + 0xfd, 0xff, 0x07, 0x4a, 0xd2, 0x6c, 0x77, 0x55, 0x7b, 0xd7, 0x78, 0x60, 0xb3, 0x4c, 0xd9, 0xa0, /* Byte value: 0x59 */ + 0x39, 0x3d, 0x0e, 0x94, 0x67, 0xd8, 0xee, 0xaa, 0xf6, 0x6d, 0xf0, 0xc0, 0xa5, 0x98, 0x71, 0x83, /* Byte value: 0x5a */ + 0xa5, 0x64, 0x01, 0xd9, 0x6b, 0x14, 0x11, 0x9d, 0xd2, 0xab, 0x92, 0xd7, 0x3d, 0x59, 0xa9, 0xba, /* Byte value: 0x5b */ + 0xfc, 0x03, 0x5c, 0xd3, 0xf1, 0x3a, 0xd5, 0x01, 0x92, 0x52, 0xf3, 0x7d, 0x12, 0x11, 0xea, 0x87, /* Byte value: 0x5c */ + 0xe0, 0x82, 0x97, 0x34, 0xd3, 0x7d, 0xf3, 0x7e, 0x7c, 0x26, 0x2f, 0xf2, 0x10, 0x92, 0xcb, 0xd5, /* Byte value: 0x5d */ + 0x0c, 0x9a, 0x32, 0x63, 0x57, 0x6e, 0x94, 0x76, 0x66, 0xf3, 0xbb, 0x9c, 0x80, 0x1a, 0x97, 0x67, /* Byte value: 0x5e */ + 0x57, 0xc6, 0xd9, 0x98, 0x8b, 0xec, 0xd7, 0x42, 0x37, 0xc3, 0x0f, 0x0c, 0x2e, 0xe8, 0xb2, 0x14, /* Byte value: 0x5f */ + 0x54, 0x01, 0x34, 0xf0, 0xee, 0x16, 0xf2, 0xbe, 0xcf, 0x8f, 0x51, 0x2b, 0x0e, 0x0f, 0xe7, 0x7d, /* Byte value: 0x60 */ + 0x8d, 0xbe, 0xad, 0x50, 0x5a, 0xb3, 0xef, 0x6a, 0x45, 0xc4, 0x8e, 0x19, 0xbb, 0x05, 0x5d, 0x2b, /* Byte value: 0x61 */ + 0xd2, 0x94, 0xe9, 0x8a, 0x0a, 0xaa, 0x61, 0xcd, 0x36, 0xa5, 0x53, 0xfd, 0xd4, 0x40, 0xb4, 0xc4, /* Byte value: 0x62 */ + 0xf7, 0x28, 0x2c, 0xf9, 0x4f, 0x35, 0xa9, 0x18, 0x2e, 0xbc, 0x7f, 0xb2, 0x73, 0x5b, 0xe4, 0x15, /* Byte value: 0x63 */ + 0x5e, 0xd6, 0x1f, 0x43, 0x73, 0x4f, 0x2c, 0xf3, 0x9a, 0xe4, 0x56, 0xf9, 0xce, 0x18, 0xda, 0xc8, /* Byte value: 0x64 */ + 0xf9, 0x89, 0xa8, 0x6b, 0x5e, 0xf7, 0xba, 0xc6, 0x59, 0x86, 0x11, 0x14, 0x72, 0xfb, 0x15, 0x3c, /* Byte value: 0x65 */ + 0xf2, 0xa2, 0xd8, 0x41, 0xe0, 0xf8, 0xc6, 0xdf, 0xe5, 0x68, 0x9d, 0xdb, 0x13, 0xb1, 0x1b, 0xae, /* Byte value: 0x66 */ + 0xe3, 0x45, 0x7a, 0x5c, 0xb6, 0x87, 0xd6, 0x82, 0x84, 0x6a, 0x71, 0xd5, 0x30, 0x75, 0x9e, 0xbc, /* Byte value: 0x67 */ + 0x3b, 0x06, 0xb8, 0x65, 0x21, 0x74, 0x69, 0x02, 0xe7, 0xa4, 0x25, 0xfa, 0x24, 0x22, 0x17, 0xcd, /* Byte value: 0x68 */ + 0x03, 0xc7, 0xed, 0x68, 0x65, 0xfa, 0x25, 0xfc, 0xf8, 0x4c, 0x5e, 0x27, 0x20, 0xe7, 0x55, 0x69, /* Byte value: 0x69 */ + 0xa1, 0x12, 0xae, 0xf8, 0xe7, 0x8f, 0xdc, 0x0e, 0xf0, 0xfa, 0xfb, 0xa3, 0xfc, 0xee, 0x65, 0x26, /* Byte value: 0x6a */ + 0x96, 0x8e, 0x24, 0xfe, 0x91, 0x95, 0x21, 0x7a, 0x71, 0xad, 0x65, 0xc5, 0x58, 0xd6, 0xe5, 0x8c, /* Byte value: 0x6b */ + 0xaa, 0x39, 0xde, 0xd2, 0x59, 0x80, 0xa0, 0x17, 0x4c, 0x14, 0x77, 0x6c, 0x9d, 0xa4, 0x6b, 0xb4, /* Byte value: 0x6c */ + 0x9f, 0x9e, 0xe2, 0x25, 0x69, 0x36, 0xda, 0xcb, 0xdc, 0x8a, 0x3c, 0x30, 0xb8, 0x26, 0x8d, 0x50, /* Byte value: 0x6d */ + 0x46, 0x21, 0x7b, 0x85, 0xdd, 0x93, 0xc7, 0x1f, 0x56, 0xc1, 0xe3, 0x02, 0x0d, 0x2c, 0x37, 0x06, /* Byte value: 0x6e */ + 0x41, 0x90, 0x39, 0xcc, 0x34, 0xf2, 0x2f, 0x70, 0x8c, 0xdc, 0xd4, 0x51, 0xec, 0x7c, 0xae, 0xf3, /* Byte value: 0x6f */ + 0x2a, 0xe1, 0x1a, 0x78, 0x77, 0x0b, 0x79, 0x5f, 0x86, 0xa6, 0xc9, 0xf4, 0x07, 0xe6, 0x92, 0xdf, /* Byte value: 0x70 */ + 0x60, 0x5a, 0x53, 0x9e, 0xfd, 0xf6, 0x2a, 0x36, 0xb6, 0x94, 0x91, 0x6a, 0x8a, 0xd0, 0x32, 0xbe, /* Byte value: 0x71 */ + 0xe5, 0x08, 0x63, 0x8c, 0x7c, 0xb0, 0x9c, 0xb9, 0xb7, 0xf2, 0xcd, 0x9b, 0x70, 0x78, 0x34, 0x6e, /* Byte value: 0x72 */ + 0x94, 0xb5, 0x92, 0x0f, 0xd7, 0x39, 0xa6, 0xd2, 0x60, 0x64, 0xb0, 0xff, 0xd9, 0x6c, 0x83, 0xc2, /* Byte value: 0x73 */ + 0xbe, 0x54, 0x88, 0x77, 0xa0, 0x32, 0xdf, 0x8d, 0xe6, 0xc2, 0x79, 0x0b, 0xde, 0x8a, 0x11, 0x1d, /* Byte value: 0x74 */ + 0x90, 0xc3, 0x3d, 0x2e, 0x5b, 0xa2, 0x6b, 0x41, 0x42, 0x35, 0xd9, 0x8b, 0x18, 0xdb, 0x4f, 0x5e, /* Byte value: 0x75 */ + 0x2f, 0x6b, 0xee, 0xc0, 0xd8, 0xc6, 0x16, 0x98, 0x4d, 0x72, 0x2b, 0x9d, 0x67, 0x0c, 0x6d, 0x64, /* Byte value: 0x76 */ + 0x9d, 0xa5, 0x54, 0xd4, 0x2f, 0x9a, 0x5d, 0x63, 0xcd, 0x43, 0xe9, 0x0a, 0x39, 0x9c, 0xeb, 0x1e, /* Byte value: 0x77 */ + 0x81, 0x24, 0x9f, 0x33, 0x0d, 0xdd, 0x7b, 0x1c, 0x23, 0x37, 0x35, 0x85, 0x3b, 0x1f, 0xca, 0x4c, /* Byte value: 0x78 */ + 0xa2, 0xd5, 0x43, 0x90, 0x82, 0x75, 0xf9, 0xf2, 0x08, 0xb6, 0xa5, 0x84, 0xdc, 0x09, 0x30, 0x4f, /* Byte value: 0x79 */ + 0x76, 0x0c, 0xb3, 0xca, 0x42, 0xe8, 0xd2, 0x04, 0x0d, 0x8b, 0x4a, 0x37, 0x48, 0x44, 0x2e, 0x59, /* Byte value: 0x7a */ + 0x4b, 0x47, 0x12, 0x7f, 0xa9, 0xab, 0xf1, 0x3d, 0xd9, 0xb7, 0xd3, 0x83, 0x2c, 0x6b, 0x93, 0x46, /* Byte value: 0x7b */ + 0xe4, 0xf4, 0x38, 0x15, 0x5f, 0xe6, 0x3e, 0xed, 0x5e, 0x77, 0x46, 0x86, 0xd1, 0x25, 0x07, 0x49, /* Byte value: 0x7c */ + 0x06, 0x4d, 0x19, 0xd0, 0xca, 0x37, 0x4a, 0x3b, 0x33, 0x98, 0xbc, 0x4e, 0x40, 0x0d, 0xaa, 0xd2, /* Byte value: 0x7d */ + 0x55, 0xfd, 0x6f, 0x69, 0xcd, 0x40, 0x50, 0xea, 0x26, 0x0a, 0xda, 0x36, 0xaf, 0x52, 0xd4, 0x5a, /* Byte value: 0x7e */ + 0xae, 0x4f, 0x71, 0xf3, 0xd5, 0x1b, 0x6d, 0x84, 0x6e, 0x45, 0x1e, 0x18, 0x5c, 0x13, 0xa7, 0x28, /* Byte value: 0x7f */ + 0x1c, 0x81, 0xcb, 0xe7, 0x22, 0x47, 0x26, 0x7f, 0xee, 0x74, 0xdc, 0x8f, 0x02, 0x83, 0x21, 0x52, /* Byte value: 0x80 */ + 0x75, 0xcb, 0x5e, 0xa2, 0x27, 0x12, 0xf7, 0xf8, 0xf5, 0xc7, 0x14, 0x10, 0x68, 0xa3, 0x7b, 0x30, /* Byte value: 0x81 */ + 0x5b, 0x5c, 0xeb, 0xfb, 0xdc, 0x82, 0x43, 0x34, 0x51, 0x30, 0xb4, 0x90, 0xae, 0xf2, 0x25, 0x73, /* Byte value: 0x82 */ + 0x04, 0x76, 0xaf, 0x21, 0x8c, 0x9b, 0xcd, 0x93, 0x22, 0x51, 0x69, 0x74, 0xc1, 0xb7, 0xcc, 0x9c, /* Byte value: 0x83 */ + 0x27, 0x87, 0x73, 0x82, 0x03, 0x33, 0x4f, 0x7d, 0x09, 0xd0, 0xf9, 0x75, 0x26, 0xa1, 0x36, 0x9f, /* Byte value: 0x84 */ + 0x4d, 0x0a, 0x0b, 0xaf, 0x63, 0x9c, 0xbb, 0x06, 0xea, 0x2f, 0x6f, 0xcd, 0x6c, 0x66, 0x39, 0x94, /* Byte value: 0x85 */ + 0x9c, 0x59, 0x0f, 0x4d, 0x0c, 0xcc, 0xff, 0x37, 0x24, 0xc6, 0x62, 0x17, 0x98, 0xc1, 0xd8, 0x39, /* Byte value: 0x86 */ + 0x20, 0x36, 0x31, 0xcb, 0xea, 0x52, 0xa7, 0x12, 0xd3, 0xcd, 0xce, 0x26, 0xc7, 0xf1, 0xaf, 0x6a, /* Byte value: 0x87 */ + 0x53, 0xb0, 0x76, 0xb9, 0x07, 0x77, 0x1a, 0xd1, 0x15, 0x92, 0x66, 0x78, 0xef, 0x5f, 0x7e, 0x88, /* Byte value: 0x88 */ + 0xd0, 0xaf, 0x5f, 0x7b, 0x4c, 0x06, 0xe6, 0x65, 0x27, 0x6c, 0x86, 0xc7, 0x55, 0xfa, 0xd2, 0x8a, /* Byte value: 0x89 */ + 0x95, 0x49, 0xc9, 0x96, 0xf4, 0x6f, 0x04, 0x86, 0x89, 0xe1, 0x3b, 0xe2, 0x78, 0x31, 0xb0, 0xe5, /* Byte value: 0x8a */ + 0xf3, 0x5e, 0x83, 0xd8, 0xc3, 0xae, 0x64, 0x8b, 0x0c, 0xed, 0x16, 0xc6, 0xb2, 0xec, 0x28, 0x89, /* Byte value: 0x8b */ + 0x85, 0x52, 0x30, 0x12, 0x81, 0x46, 0xb6, 0x8f, 0x01, 0x66, 0x5c, 0xf1, 0xfa, 0xa8, 0x06, 0xd0, /* Byte value: 0x8c */ + 0x88, 0x34, 0x59, 0xe8, 0xf5, 0x7e, 0x80, 0xad, 0x8e, 0x10, 0x6c, 0x70, 0xdb, 0xef, 0xa2, 0x90, /* Byte value: 0x8d */ + 0xb0, 0xf5, 0x0c, 0xe5, 0xb1, 0xf0, 0xcc, 0x53, 0x91, 0xf8, 0x17, 0xad, 0xdf, 0x2a, 0xe0, 0x34, /* Byte value: 0x8e */ + 0x22, 0x0d, 0x87, 0x3a, 0xac, 0xfe, 0x20, 0xba, 0xc2, 0x04, 0x1b, 0x1c, 0x46, 0x4b, 0xc9, 0x24, /* Byte value: 0x8f */ + 0x0b, 0x2b, 0x70, 0x2a, 0xbe, 0x0f, 0x7c, 0x19, 0xbc, 0xee, 0x8c, 0xcf, 0x61, 0x4a, 0x0e, 0x92, /* Byte value: 0x90 */ + 0x02, 0x3b, 0xb6, 0xf1, 0x46, 0xac, 0x87, 0xa8, 0x11, 0xc9, 0xd5, 0x3a, 0x81, 0xba, 0x66, 0x4e, /* Byte value: 0x91 */ + 0xc9, 0xa4, 0x60, 0x24, 0xc1, 0x8c, 0xaf, 0xdd, 0x02, 0xcc, 0xb8, 0x21, 0x37, 0x93, 0x0c, 0x63, /* Byte value: 0x92 */ + 0xdb, 0x84, 0x2f, 0x51, 0xf2, 0x09, 0x9a, 0x7c, 0x9b, 0x82, 0x0a, 0x08, 0x34, 0xb0, 0xdc, 0x18, /* Byte value: 0x93 */ + 0xb6, 0xb8, 0x15, 0x35, 0x7b, 0xc7, 0x86, 0x68, 0xa2, 0x60, 0xab, 0xe3, 0x9f, 0x27, 0x4a, 0xe6, /* Byte value: 0x94 */ + 0x40, 0x6c, 0x62, 0x55, 0x17, 0xa4, 0x8d, 0x24, 0x65, 0x59, 0x5f, 0x4c, 0x4d, 0x21, 0x9d, 0xd4, /* Byte value: 0x95 */ + 0x4e, 0xcd, 0xe6, 0xc7, 0x06, 0x66, 0x9e, 0xfa, 0x12, 0x63, 0x31, 0xea, 0x4c, 0x81, 0x6c, 0xfd, /* Byte value: 0x96 */ + 0xd7, 0x1e, 0x1d, 0x32, 0xa5, 0x67, 0x0e, 0x0a, 0xfd, 0x71, 0xb1, 0x94, 0xb4, 0xaa, 0x4b, 0x7f, /* Byte value: 0x97 */ + 0xab, 0xc5, 0x85, 0x4b, 0x7a, 0xd6, 0x02, 0x43, 0xa5, 0x91, 0xfc, 0x71, 0x3c, 0xf9, 0x58, 0x93, /* Byte value: 0x98 */ + 0x98, 0x2f, 0xa0, 0x6c, 0x80, 0x57, 0x32, 0xa4, 0x06, 0x97, 0x0b, 0x63, 0x59, 0x76, 0x14, 0xa5, /* Byte value: 0x99 */ + 0xc8, 0x58, 0x3b, 0xbd, 0xe2, 0xda, 0x0d, 0x89, 0xeb, 0x49, 0x33, 0x3c, 0x96, 0xce, 0x3f, 0x44, /* Byte value: 0x9a */ + 0xaf, 0xb3, 0x2a, 0x6a, 0xf6, 0x4d, 0xcf, 0xd0, 0x87, 0xc0, 0x95, 0x05, 0xfd, 0x4e, 0x94, 0x0f, /* Byte value: 0x9b */ + 0xa3, 0x29, 0x18, 0x09, 0xa1, 0x23, 0x5b, 0xa6, 0xe1, 0x33, 0x2e, 0x99, 0x7d, 0x54, 0x03, 0x68, /* Byte value: 0x9c */ + 0x44, 0x1a, 0xcd, 0x74, 0x9b, 0x3f, 0x40, 0xb7, 0x47, 0x08, 0x36, 0x38, 0x8c, 0x96, 0x51, 0x48, /* Byte value: 0x9d */ + 0x84, 0xae, 0x6b, 0x8b, 0xa2, 0x10, 0x14, 0xdb, 0xe8, 0xe3, 0xd7, 0xec, 0x5b, 0xf5, 0x35, 0xf7, /* Byte value: 0x9e */ + 0x9e, 0x62, 0xb9, 0xbc, 0x4a, 0x60, 0x78, 0x9f, 0x35, 0x0f, 0xb7, 0x2d, 0x19, 0x7b, 0xbe, 0x77, /* Byte value: 0x9f */ + 0xe2, 0xb9, 0x21, 0xc5, 0x95, 0xd1, 0x74, 0xd6, 0x6d, 0xef, 0xfa, 0xc8, 0x91, 0x28, 0xad, 0x9b, /* Byte value: 0xa0 */ + 0xcd, 0xd2, 0xcf, 0x05, 0x4d, 0x17, 0x62, 0x4e, 0x20, 0x9d, 0xd1, 0x55, 0xf6, 0x24, 0xc0, 0xff, /* Byte value: 0xa1 */ + 0xfb, 0xb2, 0x1e, 0x9a, 0x18, 0x5b, 0x3d, 0x6e, 0x48, 0x4f, 0xc4, 0x2e, 0xf3, 0x41, 0x73, 0x72, /* Byte value: 0xa2 */ + 0x45, 0xe6, 0x96, 0xed, 0xb8, 0x69, 0xe2, 0xe3, 0xae, 0x8d, 0xbd, 0x25, 0x2d, 0xcb, 0x62, 0x6f, /* Byte value: 0xa3 */ + 0x23, 0xf1, 0xdc, 0xa3, 0x8f, 0xa8, 0x82, 0xee, 0x2b, 0x81, 0x90, 0x01, 0xe7, 0x16, 0xfa, 0x03, /* Byte value: 0xa4 */ + 0xc6, 0xf9, 0xbf, 0x2f, 0xf3, 0x18, 0x1e, 0x57, 0x9c, 0x73, 0x5d, 0x9a, 0x97, 0x6e, 0xce, 0x6d, /* Byte value: 0xa5 */ + 0x3d, 0x4b, 0xa1, 0xb5, 0xeb, 0x43, 0x23, 0x39, 0xd4, 0x3c, 0x99, 0xb4, 0x64, 0x2f, 0xbd, 0x1f, /* Byte value: 0xa6 */ + 0x17, 0xaa, 0xbb, 0xcd, 0x9c, 0x48, 0x5a, 0x66, 0x52, 0x9a, 0x50, 0x40, 0x63, 0xc9, 0x2f, 0xc0, /* Byte value: 0xa7 */ + 0xeb, 0xa9, 0xe7, 0x1e, 0x6d, 0x72, 0x8f, 0x67, 0xc0, 0xc8, 0xa3, 0x3d, 0x71, 0xd8, 0xc5, 0x47, /* Byte value: 0xa8 */ + 0x2e, 0x97, 0xb5, 0x59, 0xfb, 0x90, 0xb4, 0xcc, 0xa4, 0xf7, 0xa0, 0x80, 0xc6, 0x51, 0x5e, 0x43, /* Byte value: 0xa9 */ + 0xcb, 0x9f, 0xd6, 0xd5, 0x87, 0x20, 0x28, 0x75, 0x13, 0x05, 0x6d, 0x1b, 0xb6, 0x29, 0x6a, 0x2d, /* Byte value: 0xaa */ + 0xb2, 0xce, 0xba, 0x14, 0xf7, 0x5c, 0x4b, 0xfb, 0x80, 0x31, 0xc2, 0x97, 0x5e, 0x90, 0x86, 0x7a, /* Byte value: 0xab */ + 0x5c, 0xed, 0xa9, 0xb2, 0x35, 0xe3, 0xab, 0x5b, 0x8b, 0x2d, 0x83, 0xc3, 0x4f, 0xa2, 0xbc, 0x86, /* Byte value: 0xac */ + 0x4a, 0xbb, 0x49, 0xe6, 0x8a, 0xfd, 0x53, 0x69, 0x30, 0x32, 0x58, 0x9e, 0x8d, 0x36, 0xa0, 0x61, /* Byte value: 0xad */ + 0x64, 0x2c, 0xfc, 0xbf, 0x71, 0x6d, 0xe7, 0xa5, 0x94, 0xc5, 0xf8, 0x1e, 0x4b, 0x67, 0xfe, 0x22, /* Byte value: 0xae */ + 0x71, 0xbd, 0xf1, 0x83, 0xab, 0x89, 0x3a, 0x6b, 0xd7, 0x96, 0x7d, 0x64, 0xa9, 0x14, 0xb7, 0xac, /* Byte value: 0xaf */ + 0x35, 0xa7, 0x3c, 0xf7, 0x30, 0xb6, 0x7a, 0xdc, 0x90, 0x9e, 0x4b, 0x5c, 0x25, 0x82, 0xe6, 0xe4, /* Byte value: 0xb0 */ + 0xc7, 0x05, 0xe4, 0xb6, 0xd0, 0x4e, 0xbc, 0x03, 0x75, 0xf6, 0xd6, 0x87, 0x36, 0x33, 0xfd, 0x4a, /* Byte value: 0xb1 */ + 0x07, 0xb1, 0x42, 0x49, 0xe9, 0x61, 0xe8, 0x6f, 0xda, 0x1d, 0x37, 0x53, 0xe1, 0x50, 0x99, 0xf5, /* Byte value: 0xb2 */ + 0x59, 0x67, 0x5d, 0x0a, 0x9a, 0x2e, 0xc4, 0x9c, 0x40, 0xf9, 0x61, 0xaa, 0x2f, 0x48, 0x43, 0x3d, /* Byte value: 0xb3 */ + 0x38, 0xc1, 0x55, 0x0d, 0x44, 0x8e, 0x4c, 0xfe, 0x1f, 0xe8, 0x7b, 0xdd, 0x04, 0xc5, 0x42, 0xa4, /* Byte value: 0xb4 */ + 0xea, 0x55, 0xbc, 0x87, 0x4e, 0x24, 0x2d, 0x33, 0x29, 0x4d, 0x28, 0x20, 0xd0, 0x85, 0xf6, 0x60, /* Byte value: 0xb5 */ + 0x37, 0x9c, 0x8a, 0x06, 0x76, 0x1a, 0xfd, 0x74, 0x81, 0x57, 0x9e, 0x66, 0xa4, 0x38, 0x80, 0xaa, /* Byte value: 0xb6 */ + 0x63, 0x9d, 0xbe, 0xf6, 0x98, 0x0c, 0x0f, 0xca, 0x4e, 0xd8, 0xcf, 0x4d, 0xaa, 0x37, 0x67, 0xd7, /* Byte value: 0xb7 */ + 0x18, 0xf7, 0x64, 0xc6, 0xae, 0xdc, 0xeb, 0xec, 0xcc, 0x25, 0xb5, 0xfb, 0xc3, 0x34, 0xed, 0xce, /* Byte value: 0xb8 */ + 0xa7, 0x5f, 0xb7, 0x28, 0x2d, 0xb8, 0x96, 0x35, 0xc3, 0x62, 0x47, 0xed, 0xbc, 0xe3, 0xcf, 0xf4, /* Byte value: 0xb9 */ + 0x58, 0x9b, 0x06, 0x93, 0xb9, 0x78, 0x66, 0xc8, 0xa9, 0x7c, 0xea, 0xb7, 0x8e, 0x15, 0x70, 0x1a, /* Byte value: 0xba */ + 0x11, 0xe7, 0xa2, 0x1d, 0x56, 0x7f, 0x10, 0x5d, 0x61, 0x02, 0xec, 0x0e, 0x23, 0xc4, 0x85, 0x12, /* Byte value: 0xbb */ + 0xf5, 0x13, 0x9a, 0x08, 0x09, 0x99, 0x2e, 0xb0, 0x3f, 0x75, 0xaa, 0x88, 0xf2, 0xe1, 0x82, 0x5b, /* Byte value: 0xbc */ + 0xd9, 0xbf, 0x99, 0xa0, 0xb4, 0xa5, 0x1d, 0xd4, 0x8a, 0x4b, 0xdf, 0x32, 0xb5, 0x0a, 0xba, 0x56, /* Byte value: 0xbd */ + 0xe9, 0x92, 0x51, 0xef, 0x2b, 0xde, 0x08, 0xcf, 0xd1, 0x01, 0x76, 0x07, 0xf0, 0x62, 0xa3, 0x09, /* Byte value: 0xbe */ + 0x25, 0xbc, 0xc5, 0x73, 0x45, 0x9f, 0xc8, 0xd5, 0x18, 0x19, 0x2c, 0x4f, 0xa7, 0x1b, 0x50, 0xd1, /* Byte value: 0xbf */ + 0xf8, 0x75, 0xf3, 0xf2, 0x7d, 0xa1, 0x18, 0x92, 0xb0, 0x03, 0x9a, 0x09, 0xd3, 0xa6, 0x26, 0x1b, /* Byte value: 0xc0 */ + 0x97, 0x72, 0x7f, 0x67, 0xb2, 0xc3, 0x83, 0x2e, 0x98, 0x28, 0xee, 0xd8, 0xf9, 0x8b, 0xd6, 0xab, /* Byte value: 0xc1 */ + 0xb1, 0x09, 0x57, 0x7c, 0x92, 0xa6, 0x6e, 0x07, 0x78, 0x7d, 0x9c, 0xb0, 0x7e, 0x77, 0xd3, 0x13, /* Byte value: 0xc2 */ + 0x19, 0x0b, 0x3f, 0x5f, 0x8d, 0x8a, 0x49, 0xb8, 0x25, 0xa0, 0x3e, 0xe6, 0x62, 0x69, 0xde, 0xe9, /* Byte value: 0xc3 */ + 0x0f, 0x5d, 0xdf, 0x0b, 0x32, 0x94, 0xb1, 0x8a, 0x9e, 0xbf, 0xe5, 0xbb, 0xa0, 0xfd, 0xc2, 0x0e, /* Byte value: 0xc4 */ + 0x89, 0xc8, 0x02, 0x71, 0xd6, 0x28, 0x22, 0xf9, 0x67, 0x95, 0xe7, 0x6d, 0x7a, 0xb2, 0x91, 0xb7, /* Byte value: 0xc5 */ + 0xdc, 0x35, 0x6d, 0x18, 0x1b, 0x68, 0x72, 0x13, 0x41, 0x9f, 0x3d, 0x5b, 0xd5, 0xe0, 0x45, 0xed, /* Byte value: 0xc6 */ + 0x08, 0xec, 0x9d, 0x42, 0xdb, 0xf5, 0x59, 0xe5, 0x44, 0xa2, 0xd2, 0xe8, 0x41, 0xad, 0x5b, 0xfb, /* Byte value: 0xc7 */ + 0xf1, 0x65, 0x35, 0x29, 0x85, 0x02, 0xe3, 0x23, 0x1d, 0x24, 0xc3, 0xfc, 0x33, 0x56, 0x4e, 0xc7, /* Byte value: 0xc8 */ + 0xa8, 0x02, 0x68, 0x23, 0x1f, 0x2c, 0x27, 0xbf, 0x5d, 0xdd, 0xa2, 0x56, 0x1c, 0x1e, 0x0d, 0xfa, /* Byte value: 0xc9 */ + 0x0e, 0xa1, 0x84, 0x92, 0x11, 0xc2, 0x13, 0xde, 0x77, 0x3a, 0x6e, 0xa6, 0x01, 0xa0, 0xf1, 0x29, /* Byte value: 0xca */ + 0x6f, 0x07, 0x8c, 0x95, 0xcf, 0x62, 0x9b, 0xbc, 0x28, 0x2b, 0x74, 0xd1, 0x2a, 0x2d, 0xf0, 0xb0, /* Byte value: 0xcb */ + 0x7d, 0x27, 0xc3, 0xe0, 0xfc, 0xe7, 0xae, 0x1d, 0xb1, 0x65, 0xc6, 0xf8, 0x29, 0x0e, 0x20, 0xcb, /* Byte value: 0xcc */ + 0xd4, 0xd9, 0xf0, 0x5a, 0xc0, 0x9d, 0x2b, 0xf6, 0x05, 0x3d, 0xef, 0xb3, 0x94, 0x4d, 0x1e, 0x16, /* Byte value: 0xcd */ + 0xbd, 0x93, 0x65, 0x1f, 0xc5, 0xc8, 0xfa, 0x71, 0x1e, 0x8e, 0x27, 0x2c, 0xfe, 0x6d, 0x44, 0x74, /* Byte value: 0xce */ + 0x86, 0x95, 0xdd, 0x7a, 0xe4, 0xbc, 0x93, 0x73, 0xf9, 0x2a, 0x02, 0xd6, 0xda, 0x4f, 0x53, 0xb9, /* Byte value: 0xcf */ + 0xec, 0x18, 0xa5, 0x57, 0x84, 0x13, 0x67, 0x08, 0x1a, 0xd5, 0x94, 0x6e, 0x90, 0x88, 0x5c, 0xb2, /* Byte value: 0xd0 */ + 0x32, 0x16, 0x7e, 0xbe, 0xd9, 0xd7, 0x92, 0xb3, 0x4a, 0x83, 0x7c, 0x0f, 0xc4, 0xd2, 0x7f, 0x11, /* Byte value: 0xd1 */ + 0x7e, 0xe0, 0x2e, 0x88, 0x99, 0x1d, 0x8b, 0xe1, 0x49, 0x29, 0x98, 0xdf, 0x09, 0xe9, 0x75, 0xa2, /* Byte value: 0xd2 */ + 0xed, 0xe4, 0xfe, 0xce, 0xa7, 0x45, 0xc5, 0x5c, 0xf3, 0x50, 0x1f, 0x73, 0x31, 0xd5, 0x6f, 0x95, /* Byte value: 0xd3 */ + 0x6e, 0xfb, 0xd7, 0x0c, 0xec, 0x34, 0x39, 0xe8, 0xc1, 0xae, 0xff, 0xcc, 0x8b, 0x70, 0xc3, 0x97, /* Byte value: 0xd4 */ + 0xc3, 0x73, 0x4b, 0x97, 0x5c, 0xd5, 0x71, 0x90, 0x57, 0xa7, 0xbf, 0xf3, 0xf7, 0x84, 0x31, 0xd6, /* Byte value: 0xd5 */ + 0x21, 0xca, 0x6a, 0x52, 0xc9, 0x04, 0x05, 0x46, 0x3a, 0x48, 0x45, 0x3b, 0x66, 0xac, 0x9c, 0x4d, /* Byte value: 0xd6 */ + 0x62, 0x61, 0xe5, 0x6f, 0xbb, 0x5a, 0xad, 0x9e, 0xa7, 0x5d, 0x44, 0x50, 0x0b, 0x6a, 0x54, 0xf0, /* Byte value: 0xd7 */ + 0xce, 0x15, 0x22, 0x6d, 0x28, 0xed, 0x47, 0xb2, 0xd8, 0xd1, 0x8f, 0x72, 0xd6, 0xc3, 0x95, 0x96, /* Byte value: 0xd8 */ + 0x93, 0x04, 0xd0, 0x46, 0x3e, 0x58, 0x4e, 0xbd, 0xba, 0x79, 0x87, 0xac, 0x38, 0x3c, 0x1a, 0x37, /* Byte value: 0xd9 */ + 0x4c, 0xf6, 0x50, 0x36, 0x40, 0xca, 0x19, 0x52, 0x03, 0xaa, 0xe4, 0xd0, 0xcd, 0x3b, 0x0a, 0xb3, /* Byte value: 0xda */ + 0xde, 0x0e, 0xdb, 0xe9, 0x5d, 0xc4, 0xf5, 0xbb, 0x50, 0x56, 0xe8, 0x61, 0x54, 0x5a, 0x23, 0xa3, /* Byte value: 0xdb */ + 0x3f, 0x70, 0x17, 0x44, 0xad, 0xef, 0xa4, 0x91, 0xc5, 0xf5, 0x4c, 0x8e, 0xe5, 0x95, 0xdb, 0x51, /* Byte value: 0xdc */ + 0x43, 0xab, 0x8f, 0x3d, 0x72, 0x5e, 0xa8, 0xd8, 0x9d, 0x15, 0x01, 0x6b, 0x6d, 0xc6, 0xc8, 0xbd, /* Byte value: 0xdd */ + 0x73, 0x86, 0x47, 0x72, 0xed, 0x25, 0xbd, 0xc3, 0xc6, 0x5f, 0xa8, 0x5e, 0x28, 0xae, 0xd1, 0xe2, /* Byte value: 0xde */ + 0xad, 0x88, 0x9c, 0x9b, 0xb0, 0xe1, 0x48, 0x78, 0x96, 0x09, 0x40, 0x3f, 0x7c, 0xf4, 0xf2, 0x41, /* Byte value: 0xdf */ + 0xf0, 0x99, 0x6e, 0xb0, 0xa6, 0x54, 0x41, 0x77, 0xf4, 0xa1, 0x48, 0xe1, 0x92, 0x0b, 0x7d, 0xe0, /* Byte value: 0xe0 */ + 0x47, 0xdd, 0x20, 0x1c, 0xfe, 0xc5, 0x65, 0x4b, 0xbf, 0x44, 0x68, 0x1f, 0xac, 0x71, 0x04, 0x21, /* Byte value: 0xe1 */ + 0x3c, 0xb7, 0xfa, 0x2c, 0xc8, 0x15, 0x81, 0x6d, 0x3d, 0xb9, 0x12, 0xa9, 0xc5, 0x72, 0x8e, 0x38, /* Byte value: 0xe2 */ + 0x61, 0xa6, 0x08, 0x07, 0xde, 0xa0, 0x88, 0x62, 0x5f, 0x11, 0x1a, 0x77, 0x2b, 0x8d, 0x01, 0x99, /* Byte value: 0xe3 */ + 0x56, 0x3a, 0x82, 0x01, 0xa8, 0xba, 0x75, 0x16, 0xde, 0x46, 0x84, 0x11, 0x8f, 0xb5, 0x81, 0x33, /* Byte value: 0xe4 */ + 0x29, 0x26, 0xf7, 0x10, 0x12, 0xf1, 0x5c, 0xa3, 0x7e, 0xea, 0x97, 0xd3, 0x27, 0x01, 0xc7, 0xb6, /* Byte value: 0xe5 */ + 0x7b, 0x6a, 0xda, 0x30, 0x36, 0xd0, 0xe4, 0x26, 0x82, 0xfd, 0x7a, 0xb6, 0x69, 0x03, 0x8a, 0x19, /* Byte value: 0xe6 */ + 0x10, 0x1b, 0xf9, 0x84, 0x75, 0x29, 0xb2, 0x09, 0x88, 0x87, 0x67, 0x13, 0x82, 0x99, 0xb6, 0x35, /* Byte value: 0xe7 */ + 0xff, 0xc4, 0xb1, 0xbb, 0x94, 0xc0, 0xf0, 0xfd, 0x6a, 0x1e, 0xad, 0x5a, 0x32, 0xf6, 0xbf, 0xee, /* Byte value: 0xe8 */ + 0x5d, 0x11, 0xf2, 0x2b, 0x16, 0xb5, 0x09, 0x0f, 0x62, 0xa8, 0x08, 0xde, 0xee, 0xff, 0x8f, 0xa1, /* Byte value: 0xe9 */ + 0x31, 0xd1, 0x93, 0xd6, 0xbc, 0x2d, 0xb7, 0x4f, 0xb2, 0xcf, 0x22, 0x28, 0xe4, 0x35, 0x2a, 0x78, /* Byte value: 0xea */ + 0xb7, 0x44, 0x4e, 0xac, 0x58, 0x91, 0x24, 0x3c, 0x4b, 0xe5, 0x20, 0xfe, 0x3e, 0x7a, 0x79, 0xc1, /* Byte value: 0xeb */ + 0xb3, 0x32, 0xe1, 0x8d, 0xd4, 0x0a, 0xe9, 0xaf, 0x69, 0xb4, 0x49, 0x8a, 0xff, 0xcd, 0xb5, 0x5d, /* Byte value: 0xec */ + 0x6b, 0x71, 0x23, 0xb4, 0x43, 0xf9, 0x56, 0x2f, 0x0a, 0x7a, 0x1d, 0xa5, 0xeb, 0x9a, 0x3c, 0x2c, /* Byte value: 0xed */ + 0xc0, 0xb4, 0xa6, 0xff, 0x39, 0x2f, 0x54, 0x6c, 0xaf, 0xeb, 0xe1, 0xd4, 0xd7, 0x63, 0x64, 0xbf, /* Byte value: 0xee */ + 0x7f, 0x1c, 0x75, 0x11, 0xba, 0x4b, 0x29, 0xb5, 0xa0, 0xac, 0x13, 0xc2, 0xa8, 0xb4, 0x46, 0x85, /* Byte value: 0xef */ + 0x1e, 0xba, 0x7d, 0x16, 0x64, 0xeb, 0xa1, 0xd7, 0xff, 0xbd, 0x09, 0xb5, 0x83, 0x39, 0x47, 0x1c, /* Byte value: 0xf0 */ + 0xd1, 0x53, 0x04, 0xe2, 0x6f, 0x50, 0x44, 0x31, 0xce, 0xe9, 0x0d, 0xda, 0xf4, 0xa7, 0xe1, 0xad, /* Byte value: 0xf1 */ + 0x78, 0xad, 0x37, 0x58, 0x53, 0x2a, 0xc1, 0xda, 0x7a, 0xb1, 0x24, 0x91, 0x49, 0xe4, 0xdf, 0x70, /* Byte value: 0xf2 */ + 0xc2, 0x8f, 0x10, 0x0e, 0x7f, 0x83, 0xd3, 0xc4, 0xbe, 0x22, 0x34, 0xee, 0x56, 0xd9, 0x02, 0xf1, /* Byte value: 0xf3 */ + 0xbb, 0xde, 0x7c, 0xcf, 0x0f, 0xff, 0xb0, 0x4a, 0x2d, 0x16, 0x9b, 0x62, 0xbe, 0x60, 0xee, 0xa6, /* Byte value: 0xf4 */ + 0x6d, 0x3c, 0x3a, 0x64, 0x89, 0xce, 0x1c, 0x14, 0x39, 0xe2, 0xa1, 0xeb, 0xab, 0x97, 0x96, 0xfe, /* Byte value: 0xf5 */ + 0xe1, 0x7e, 0xcc, 0xad, 0xf0, 0x2b, 0x51, 0x2a, 0x95, 0xa3, 0xa4, 0xef, 0xb1, 0xcf, 0xf8, 0xf2, /* Byte value: 0xf6 */ + 0x1f, 0x46, 0x26, 0x8f, 0x47, 0xbd, 0x03, 0x83, 0x16, 0x38, 0x82, 0xa8, 0x22, 0x64, 0x74, 0x3b, /* Byte value: 0xf7 */ + 0x82, 0xe3, 0x72, 0x5b, 0x68, 0x27, 0x5e, 0xe0, 0xdb, 0x7b, 0x6b, 0xa2, 0x1b, 0xf8, 0x9f, 0x25, /* Byte value: 0xf8 */ + 0xba, 0x22, 0x27, 0x56, 0x2c, 0xa9, 0x12, 0x1e, 0xc4, 0x93, 0x10, 0x7f, 0x1f, 0x3d, 0xdd, 0x81, /* Byte value: 0xf9 */ + 0x8c, 0x42, 0xf6, 0xc9, 0x79, 0xe5, 0x4d, 0x3e, 0xac, 0x41, 0x05, 0x04, 0x1a, 0x58, 0x6e, 0x0c, /* Byte value: 0xfa */ + 0xcf, 0xe9, 0x79, 0xf4, 0x0b, 0xbb, 0xe5, 0xe6, 0x31, 0x54, 0x04, 0x6f, 0x77, 0x9e, 0xa6, 0xb1, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0xfe, 0x38, 0xea, 0x22, 0xb7, 0x96, 0x52, 0xa9, 0x83, 0x9b, 0x26, 0x47, 0x93, 0xab, 0x8c, 0xc9, /* Byte value: 0xfd */ + 0x42, 0x57, 0xd4, 0xa4, 0x51, 0x08, 0x0a, 0x8c, 0x74, 0x90, 0x8a, 0x76, 0xcc, 0x9b, 0xfb, 0x9a, /* Byte value: 0xfe */ + 0xd6, 0xe2, 0x46, 0xab, 0x86, 0x31, 0xac, 0x5e, 0x14, 0xf4, 0x3a, 0x89, 0x15, 0xf7, 0x78, 0x58, /* Byte value: 0xff */ + + /* Matrix row: 7 */ + 0xa5, 0x9d, 0x85, 0x46, 0x8a, 0x0e, 0x61, 0xc4, 0x42, 0xe7, 0xb4, 0xca, 0xc0, 0x3d, 0xf4, 0xe8, /* Byte value: 0x00 */ + 0x2d, 0x30, 0x7c, 0xb1, 0xb2, 0x96, 0xab, 0x86, 0x12, 0x3f, 0xbc, 0x10, 0x25, 0xe6, 0x1e, 0xf1, /* Byte value: 0x01 */ + 0x32, 0xb3, 0x29, 0xf1, 0xe6, 0xb1, 0x53, 0x61, 0xca, 0xf8, 0xa0, 0xd0, 0x5a, 0xc4, 0x96, 0x37, /* Byte value: 0x02 */ + 0x8f, 0xc2, 0x69, 0x55, 0xf0, 0x82, 0xf2, 0x7d, 0x39, 0xb6, 0xe7, 0xff, 0x11, 0x3a, 0xe8, 0x2f, /* Byte value: 0x03 */ + 0x0e, 0xde, 0xe3, 0x87, 0x53, 0x34, 0x70, 0x7e, 0xd2, 0xdc, 0x1d, 0x4a, 0x2b, 0x01, 0x04, 0x6c, /* Byte value: 0x04 */ + 0x30, 0x1b, 0x49, 0x07, 0xfb, 0x7a, 0x43, 0x73, 0xa1, 0x91, 0x25, 0x09, 0xd5, 0x45, 0xd7, 0x23, /* Byte value: 0x05 */ + 0x38, 0xfe, 0x0a, 0x59, 0x8f, 0xd0, 0x03, 0x3b, 0xce, 0xf6, 0x74, 0xeb, 0xac, 0x04, 0x10, 0x73, /* Byte value: 0x06 */ + 0xc0, 0x6c, 0xe7, 0x1c, 0x6a, 0x2b, 0xcf, 0x0f, 0xc1, 0x01, 0x94, 0x24, 0xd2, 0xd7, 0xda, 0x8c, /* Byte value: 0x07 */ + 0x54, 0xbe, 0x1b, 0x26, 0xf4, 0xdb, 0xe5, 0xb1, 0xf6, 0xa2, 0xa6, 0x6a, 0x61, 0x0e, 0x38, 0x4d, /* Byte value: 0x08 */ + 0xe6, 0x45, 0x88, 0x7e, 0x5e, 0x58, 0x3c, 0xda, 0x03, 0xe5, 0x5f, 0x82, 0xa7, 0x50, 0x83, 0x33, /* Byte value: 0x09 */ + 0x9e, 0x9f, 0xdf, 0x92, 0xf7, 0x91, 0x7a, 0xe4, 0x33, 0xad, 0xe6, 0x75, 0x45, 0x19, 0x64, 0x85, /* Byte value: 0x0a */ + 0x39, 0xaa, 0x3a, 0x22, 0x60, 0x54, 0x0b, 0x32, 0x1a, 0x23, 0xd7, 0x66, 0x0a, 0xa5, 0xd1, 0x79, /* Byte value: 0x0b */ + 0x55, 0xea, 0x2b, 0x5d, 0x1b, 0x5f, 0xed, 0xb8, 0x22, 0x77, 0x05, 0xe7, 0xc7, 0xaf, 0xf9, 0x47, /* Byte value: 0x0c */ + 0x7e, 0xe1, 0xf7, 0x35, 0x8e, 0x57, 0x76, 0x08, 0x8d, 0xf3, 0xf5, 0x5f, 0xb0, 0x09, 0x24, 0x8a, /* Byte value: 0x0d */ + 0x52, 0x85, 0xbb, 0xff, 0xd3, 0x45, 0xd5, 0x87, 0x4b, 0x19, 0xea, 0xc2, 0x33, 0x4e, 0xfb, 0x71, /* Byte value: 0x0e */ + 0x91, 0x15, 0x0c, 0x6e, 0x4b, 0x21, 0x02, 0x93, 0x35, 0xa4, 0x58, 0xb2, 0xc8, 0xb9, 0xa1, 0xe3, /* Byte value: 0x0f */ + 0x64, 0xa5, 0x52, 0x21, 0x0f, 0xa1, 0xa6, 0xc2, 0x57, 0x33, 0x83, 0x63, 0xb4, 0x4b, 0xef, 0x6e, /* Byte value: 0x10 */ + 0x03, 0xfc, 0x50, 0x8d, 0xf2, 0x4f, 0x18, 0x1b, 0xbf, 0xbc, 0x26, 0x54, 0x29, 0x20, 0x80, 0x1e, /* Byte value: 0x11 */ + 0x57, 0x42, 0x4b, 0xab, 0x06, 0x94, 0xfd, 0xaa, 0x49, 0x1e, 0x80, 0x3e, 0x48, 0x2e, 0xb8, 0x53, /* Byte value: 0x12 */ + 0x5a, 0x60, 0xf8, 0xa1, 0xa7, 0xef, 0x95, 0xcf, 0x24, 0x7e, 0xbb, 0x20, 0x4a, 0x0f, 0x3c, 0x21, /* Byte value: 0x13 */ + 0x1c, 0x7f, 0x05, 0xcd, 0xa6, 0x68, 0xe0, 0xfc, 0x67, 0x7b, 0x3a, 0x94, 0x56, 0x02, 0x08, 0xd8, /* Byte value: 0x14 */ + 0x60, 0x36, 0x92, 0x0e, 0x35, 0xf4, 0x86, 0xe6, 0x81, 0xe1, 0x4a, 0x12, 0x69, 0x8a, 0x6d, 0x46, /* Byte value: 0x15 */ + 0x07, 0x6f, 0x90, 0xa2, 0xc8, 0x1a, 0x38, 0x3f, 0x69, 0x6e, 0xef, 0x25, 0xf4, 0xe1, 0x02, 0x36, /* Byte value: 0x16 */ + 0x18, 0xec, 0xc5, 0xe2, 0x9c, 0x3d, 0xc0, 0xd8, 0xb1, 0xa9, 0xf3, 0xe5, 0x8b, 0xc3, 0x8a, 0xf0, /* Byte value: 0x17 */ + 0x21, 0x46, 0xff, 0xc0, 0xfc, 0x69, 0xcb, 0xea, 0xab, 0x8a, 0x24, 0x83, 0x81, 0x66, 0x5b, 0x89, /* Byte value: 0x18 */ + 0x72, 0x97, 0x74, 0x44, 0xc0, 0xa8, 0x16, 0x64, 0x34, 0x46, 0x6d, 0xcc, 0x14, 0x89, 0x61, 0xf2, /* Byte value: 0x19 */ + 0xa8, 0xbf, 0x36, 0x4c, 0x2b, 0x75, 0x09, 0xa1, 0x2f, 0x87, 0x8f, 0xd4, 0xc2, 0x1c, 0x70, 0x9a, /* Byte value: 0x1a */ + 0xd1, 0x31, 0x51, 0xdb, 0x6d, 0x38, 0x47, 0x96, 0xcb, 0x1a, 0x95, 0xae, 0x86, 0xf4, 0x56, 0x26, /* Byte value: 0x1b */ + 0x29, 0xa3, 0xbc, 0x9e, 0x88, 0xc3, 0x8b, 0xa2, 0xc4, 0xed, 0x75, 0x61, 0xf8, 0x27, 0x9c, 0xd9, /* Byte value: 0x1c */ + 0xc6, 0x57, 0x47, 0xc5, 0x4d, 0xb5, 0xff, 0x39, 0x7c, 0xba, 0xd8, 0x8c, 0x80, 0x97, 0x19, 0xb0, /* Byte value: 0x1d */ + 0xa4, 0xc9, 0xb5, 0x3d, 0x65, 0x8a, 0x69, 0xcd, 0x96, 0x32, 0x17, 0x47, 0x66, 0x9c, 0x35, 0xe2, /* Byte value: 0x1e */ + 0x3f, 0x91, 0x9a, 0xfb, 0x47, 0xca, 0x3b, 0x04, 0xa7, 0x98, 0x9b, 0xce, 0x58, 0xe5, 0x12, 0x45, /* Byte value: 0x1f */ + 0xe0, 0x7e, 0x28, 0xa7, 0x79, 0xc6, 0x0c, 0xec, 0xbe, 0x5e, 0x13, 0x2a, 0xf5, 0x10, 0x40, 0x0f, /* Byte value: 0x20 */ + 0x27, 0x7d, 0x5f, 0x19, 0xdb, 0xf7, 0xfb, 0xdc, 0x16, 0x31, 0x68, 0x2b, 0xd3, 0x26, 0x98, 0xb5, /* Byte value: 0x21 */ + 0x8d, 0x6a, 0x09, 0xa3, 0xed, 0x49, 0xe2, 0x6f, 0x52, 0xdf, 0x62, 0x26, 0x9e, 0xbb, 0xa9, 0x3b, /* Byte value: 0x22 */ + 0x0c, 0x76, 0x83, 0x71, 0x4e, 0xff, 0x60, 0x6c, 0xb9, 0xb5, 0x98, 0x93, 0xa4, 0x80, 0x45, 0x78, /* Byte value: 0x23 */ + 0x82, 0xe0, 0xda, 0x5f, 0x51, 0xf9, 0x9a, 0x18, 0x54, 0xd6, 0xdc, 0xe1, 0x13, 0x1b, 0x6c, 0x5d, /* Byte value: 0x24 */ + 0xea, 0x33, 0x0b, 0x0f, 0x10, 0xa7, 0x5c, 0xb6, 0xba, 0x50, 0xc7, 0x11, 0x03, 0xd0, 0xc6, 0x4b, /* Byte value: 0x25 */ + 0xae, 0x84, 0x96, 0x95, 0x0c, 0xeb, 0x39, 0x97, 0x92, 0x3c, 0xc3, 0x7c, 0x90, 0x5c, 0xb3, 0xa6, /* Byte value: 0x26 */ + 0xb4, 0xc0, 0x33, 0x81, 0x8d, 0x1d, 0xe9, 0x5d, 0x48, 0xfc, 0xb5, 0x40, 0x94, 0x1e, 0x78, 0x42, /* Byte value: 0x27 */ + 0x9a, 0x0c, 0x1f, 0xbd, 0xcd, 0xc4, 0x5a, 0xc0, 0xe5, 0x7f, 0x2f, 0x04, 0x98, 0xd8, 0xe6, 0xad, /* Byte value: 0x28 */ + 0x63, 0xca, 0xc2, 0x83, 0xc7, 0xbb, 0x9e, 0xfd, 0x3e, 0x5d, 0x6c, 0x46, 0x40, 0xaa, 0xed, 0x58, /* Byte value: 0x29 */ + 0x49, 0x95, 0x2e, 0x90, 0xbd, 0x37, 0x0d, 0x44, 0x45, 0x0c, 0x3f, 0x73, 0x91, 0xad, 0xf1, 0x9f, /* Byte value: 0x2a */ + 0xe5, 0xb9, 0xd8, 0xf3, 0xac, 0x17, 0x24, 0xc1, 0xbc, 0x59, 0x79, 0xd6, 0x8e, 0x70, 0x03, 0x2d, /* Byte value: 0x2b */ + 0x42, 0x8c, 0x3d, 0x43, 0x3b, 0xd2, 0x55, 0x17, 0x95, 0xd7, 0x48, 0xc5, 0xc1, 0xcc, 0xb6, 0xd1, /* Byte value: 0x2c */ + 0xe4, 0xed, 0xe8, 0x88, 0x43, 0x93, 0x2c, 0xc8, 0x68, 0x8c, 0xda, 0x5b, 0x28, 0xd1, 0xc2, 0x27, /* Byte value: 0x2d */ + 0x15, 0xce, 0x76, 0xe8, 0x3d, 0x46, 0xa8, 0xbd, 0xdc, 0xc9, 0xc8, 0xfb, 0x89, 0xe2, 0x0e, 0x82, /* Byte value: 0x2e */ + 0xb7, 0x3c, 0x63, 0x0c, 0x7f, 0x52, 0xf1, 0x46, 0xf7, 0x40, 0x93, 0x14, 0xbd, 0x3e, 0xf8, 0x5c, /* Byte value: 0x2f */ + 0xc8, 0x89, 0xa4, 0x42, 0x1e, 0x81, 0x8f, 0x47, 0xae, 0x66, 0xc5, 0xc6, 0xab, 0x96, 0x1d, 0xdc, /* Byte value: 0x30 */ + 0x06, 0x3b, 0xa0, 0xd9, 0x27, 0x9e, 0x30, 0x36, 0xbd, 0xbb, 0x4c, 0xa8, 0x52, 0x40, 0xc3, 0x3c, /* Byte value: 0x31 */ + 0x70, 0x3f, 0x14, 0xb2, 0xdd, 0x63, 0x06, 0x76, 0x5f, 0x2f, 0xe8, 0x15, 0x9b, 0x08, 0x20, 0xe6, /* Byte value: 0x32 */ + 0x9d, 0x63, 0x8f, 0x1f, 0x05, 0xde, 0x62, 0xff, 0x8c, 0x11, 0xc0, 0x21, 0x6c, 0x39, 0xe4, 0x9b, /* Byte value: 0x33 */ + 0x41, 0x70, 0x6d, 0xce, 0xc9, 0x9d, 0x4d, 0x0c, 0x2a, 0x6b, 0x6e, 0x91, 0xe8, 0xec, 0x36, 0xcf, /* Byte value: 0x34 */ + 0x75, 0xf8, 0xe4, 0xe6, 0x08, 0xb2, 0x2e, 0x5b, 0x5d, 0x28, 0x82, 0xe9, 0xe0, 0x68, 0x63, 0xc4, /* Byte value: 0x35 */ + 0x19, 0xb8, 0xf5, 0x99, 0x73, 0xb9, 0xc8, 0xd1, 0x65, 0x7c, 0x50, 0x68, 0x2d, 0x62, 0x4b, 0xfa, /* Byte value: 0x36 */ + 0xc9, 0xdd, 0x94, 0x39, 0xf1, 0x05, 0x87, 0x4e, 0x7a, 0xb3, 0x66, 0x4b, 0x0d, 0x37, 0xdc, 0xd6, /* Byte value: 0x37 */ + 0xaa, 0x17, 0x56, 0xba, 0x36, 0xbe, 0x19, 0xb3, 0x44, 0xee, 0x0a, 0x0d, 0x4d, 0x9d, 0x31, 0x8e, /* Byte value: 0x38 */ + 0xfc, 0x01, 0x2d, 0x6a, 0xdf, 0xae, 0xec, 0x10, 0xd9, 0x25, 0x29, 0xbe, 0xa3, 0x12, 0x48, 0xd7, /* Byte value: 0x39 */ + 0x4d, 0x06, 0xee, 0xbf, 0x87, 0x62, 0x2d, 0x60, 0x93, 0xde, 0xf6, 0x02, 0x4c, 0x6c, 0x73, 0xb7, /* Byte value: 0x3a */ + 0xbf, 0xd9, 0x20, 0x52, 0x0b, 0xf8, 0xb1, 0x0e, 0x98, 0x27, 0xc2, 0xf6, 0xc4, 0x7f, 0x3f, 0x0c, /* Byte value: 0x3b */ + 0x2a, 0x5f, 0xec, 0x13, 0x7a, 0x8c, 0x93, 0xb9, 0x7b, 0x51, 0x53, 0x35, 0xd1, 0x07, 0x1c, 0xc7, /* Byte value: 0x3c */ + 0x73, 0xc3, 0x44, 0x3f, 0x2f, 0x2c, 0x1e, 0x6d, 0xe0, 0x93, 0xce, 0x41, 0xb2, 0x28, 0xa0, 0xf8, /* Byte value: 0x3d */ + 0x84, 0xdb, 0x7a, 0x86, 0x76, 0x67, 0xaa, 0x2e, 0xe9, 0x6d, 0x90, 0x49, 0x41, 0x5b, 0xaf, 0x61, /* Byte value: 0x3e */ + 0xd5, 0xa2, 0x91, 0xf4, 0x57, 0x6d, 0x67, 0xb2, 0x1d, 0xc8, 0x5c, 0xdf, 0x5b, 0x35, 0xd4, 0x0e, /* Byte value: 0x3f */ + 0xc3, 0x90, 0xb7, 0x91, 0x98, 0x64, 0xd7, 0x14, 0x7e, 0xbd, 0xb2, 0x70, 0xfb, 0xf7, 0x5a, 0x92, /* Byte value: 0x40 */ + 0xaf, 0xd0, 0xa6, 0xee, 0xe3, 0x6f, 0x31, 0x9e, 0x46, 0xe9, 0x60, 0xf1, 0x36, 0xfd, 0x72, 0xac, /* Byte value: 0x41 */ + 0x2b, 0x0b, 0xdc, 0x68, 0x95, 0x08, 0x9b, 0xb0, 0xaf, 0x84, 0xf0, 0xb8, 0x77, 0xa6, 0xdd, 0xcd, /* Byte value: 0x42 */ + 0x86, 0x73, 0x1a, 0x70, 0x6b, 0xac, 0xba, 0x3c, 0x82, 0x04, 0x15, 0x90, 0xce, 0xda, 0xee, 0x75, /* Byte value: 0x43 */ + 0xa7, 0x35, 0xe5, 0xb0, 0x97, 0xc5, 0x71, 0xd6, 0x29, 0x8e, 0x31, 0x13, 0x4f, 0xbc, 0xb5, 0xfc, /* Byte value: 0x44 */ + 0xb1, 0x07, 0xc3, 0xd5, 0x58, 0xcc, 0xc1, 0x70, 0x4a, 0xfb, 0xdf, 0xbc, 0xef, 0x7e, 0x3b, 0x60, /* Byte value: 0x45 */ + 0xb2, 0xfb, 0x93, 0x58, 0xaa, 0x83, 0xd9, 0x6b, 0xf5, 0x47, 0xf9, 0xe8, 0xc6, 0x5e, 0xbb, 0x7e, /* Byte value: 0x46 */ + 0x5b, 0x34, 0xc8, 0xda, 0x48, 0x6b, 0x9d, 0xc6, 0xf0, 0xab, 0x18, 0xad, 0xec, 0xae, 0xfd, 0x2b, /* Byte value: 0x47 */ + 0x46, 0x1f, 0xfd, 0x6c, 0x01, 0x87, 0x75, 0x33, 0x43, 0x05, 0x81, 0xb4, 0x1c, 0x0d, 0x34, 0xf9, /* Byte value: 0x48 */ + 0xd3, 0x99, 0x31, 0x2d, 0x70, 0xf3, 0x57, 0x84, 0xa0, 0x73, 0x10, 0x77, 0x09, 0x75, 0x17, 0x32, /* Byte value: 0x49 */ + 0x9f, 0xcb, 0xef, 0xe9, 0x18, 0x15, 0x72, 0xed, 0xe7, 0x78, 0x45, 0xf8, 0xe3, 0xb8, 0xa5, 0x8f, /* Byte value: 0x4a */ + 0xfd, 0x55, 0x1d, 0x11, 0x30, 0x2a, 0xe4, 0x19, 0x0d, 0xf0, 0x8a, 0x33, 0x05, 0xb3, 0x89, 0xdd, /* Byte value: 0x4b */ + 0xd4, 0xf6, 0xa1, 0x8f, 0xb8, 0xe9, 0x6f, 0xbb, 0xc9, 0x1d, 0xff, 0x52, 0xfd, 0x94, 0x15, 0x04, /* Byte value: 0x4c */ + 0x0f, 0x8a, 0xd3, 0xfc, 0xbc, 0xb0, 0x78, 0x77, 0x06, 0x09, 0xbe, 0xc7, 0x8d, 0xa0, 0xc5, 0x66, /* Byte value: 0x4d */ + 0x9c, 0x37, 0xbf, 0x64, 0xea, 0x5a, 0x6a, 0xf6, 0x58, 0xc4, 0x63, 0xac, 0xca, 0x98, 0x25, 0x91, /* Byte value: 0x4e */ + 0x2f, 0x98, 0x1c, 0x47, 0xaf, 0x5d, 0xbb, 0x94, 0x79, 0x56, 0x39, 0xc9, 0xaa, 0x67, 0x5f, 0xe5, /* Byte value: 0x4f */ + 0x9b, 0x58, 0x2f, 0xc6, 0x22, 0x40, 0x52, 0xc9, 0x31, 0xaa, 0x8c, 0x89, 0x3e, 0x79, 0x27, 0xa7, /* Byte value: 0x50 */ + 0x43, 0xd8, 0x0d, 0x38, 0xd4, 0x56, 0x5d, 0x1e, 0x41, 0x02, 0xeb, 0x48, 0x67, 0x6d, 0x77, 0xdb, /* Byte value: 0x51 */ + 0xef, 0xf4, 0xfb, 0x5b, 0xc5, 0x76, 0x74, 0x9b, 0xb8, 0x57, 0xad, 0xed, 0x78, 0xb0, 0x85, 0x69, /* Byte value: 0x52 */ + 0xd9, 0xd4, 0x12, 0x85, 0x19, 0x92, 0x07, 0xde, 0xa4, 0x7d, 0xc4, 0x4c, 0xff, 0xb5, 0x91, 0x76, /* Byte value: 0x53 */ + 0x79, 0x8e, 0x67, 0x97, 0x46, 0x4d, 0x4e, 0x37, 0xe4, 0x9d, 0x1a, 0x7a, 0x44, 0xe8, 0x26, 0xbc, /* Byte value: 0x54 */ + 0xb6, 0x68, 0x53, 0x77, 0x90, 0xd6, 0xf9, 0x4f, 0x23, 0x95, 0x30, 0x99, 0x1b, 0x9f, 0x39, 0x56, /* Byte value: 0x55 */ + 0x53, 0xd1, 0x8b, 0x84, 0x3c, 0xc1, 0xdd, 0x8e, 0x9f, 0xcc, 0x49, 0x4f, 0x95, 0xef, 0x3a, 0x7b, /* Byte value: 0x56 */ + 0x7f, 0xb5, 0xc7, 0x4e, 0x61, 0xd3, 0x7e, 0x01, 0x59, 0x26, 0x56, 0xd2, 0x16, 0xa8, 0xe5, 0x80, /* Byte value: 0x57 */ + 0xc1, 0x38, 0xd7, 0x67, 0x85, 0xaf, 0xc7, 0x06, 0x15, 0xd4, 0x37, 0xa9, 0x74, 0x76, 0x1b, 0x86, /* Byte value: 0x58 */ + 0xf0, 0x77, 0xae, 0x1b, 0x91, 0x51, 0x8c, 0x7c, 0x60, 0x90, 0xb1, 0x2d, 0x07, 0x92, 0x0d, 0xaf, /* Byte value: 0x59 */ + 0x23, 0xee, 0x9f, 0x36, 0xe1, 0xa2, 0xdb, 0xf8, 0xc0, 0xe3, 0xa1, 0x5a, 0x0e, 0xe7, 0x1a, 0x9d, /* Byte value: 0x5a */ + 0xe7, 0x11, 0xb8, 0x05, 0xb1, 0xdc, 0x34, 0xd3, 0xd7, 0x30, 0xfc, 0x0f, 0x01, 0xf1, 0x42, 0x39, /* Byte value: 0x5b */ + 0x25, 0xd5, 0x3f, 0xef, 0xc6, 0x3c, 0xeb, 0xce, 0x7d, 0x58, 0xed, 0xf2, 0x5c, 0xa7, 0xd9, 0xa1, /* Byte value: 0x5c */ + 0x5e, 0xf3, 0x38, 0x8e, 0x9d, 0xba, 0xb5, 0xeb, 0xf2, 0xac, 0x72, 0x51, 0x97, 0xce, 0xbe, 0x09, /* Byte value: 0x5d */ + 0xb5, 0x94, 0x03, 0xfa, 0x62, 0x99, 0xe1, 0x54, 0x9c, 0x29, 0x16, 0xcd, 0x32, 0xbf, 0xb9, 0x48, /* Byte value: 0x5e */ + 0x1e, 0xd7, 0x65, 0x3b, 0xbb, 0xa3, 0xf0, 0xee, 0x0c, 0x12, 0xbf, 0x4d, 0xd9, 0x83, 0x49, 0xcc, /* Byte value: 0x5f */ + 0xa2, 0xf2, 0x15, 0xe4, 0x42, 0x14, 0x59, 0xfb, 0x2b, 0x89, 0x5b, 0xef, 0x34, 0xdc, 0xf6, 0xde, /* Byte value: 0x60 */ + 0xdf, 0xef, 0xb2, 0x5c, 0x3e, 0x0c, 0x37, 0xe8, 0x19, 0xc6, 0x88, 0xe4, 0xad, 0xf5, 0x52, 0x4a, /* Byte value: 0x61 */ + 0xa6, 0x61, 0xd5, 0xcb, 0x78, 0x41, 0x79, 0xdf, 0xfd, 0x5b, 0x92, 0x9e, 0xe9, 0x1d, 0x74, 0xf6, /* Byte value: 0x62 */ + 0xfe, 0xa9, 0x4d, 0x9c, 0xc2, 0x65, 0xfc, 0x02, 0xb2, 0x4c, 0xac, 0x67, 0x2c, 0x93, 0x09, 0xc3, /* Byte value: 0x63 */ + 0xac, 0x2c, 0xf6, 0x63, 0x11, 0x20, 0x29, 0x85, 0xf9, 0x55, 0x46, 0xa5, 0x1f, 0xdd, 0xf2, 0xb2, /* Byte value: 0x64 */ + 0x22, 0xba, 0xaf, 0x4d, 0x0e, 0x26, 0xd3, 0xf1, 0x14, 0x36, 0x02, 0xd7, 0xa8, 0x46, 0xdb, 0x97, /* Byte value: 0x65 */ + 0xf9, 0xc6, 0xdd, 0x3e, 0x0a, 0x7f, 0xc4, 0x3d, 0xdb, 0x22, 0x43, 0x42, 0xd8, 0x72, 0x0b, 0xf5, /* Byte value: 0x66 */ + 0xe2, 0xd6, 0x48, 0x51, 0x64, 0x0d, 0x1c, 0xfe, 0xd5, 0x37, 0x96, 0xf3, 0x7a, 0x91, 0x01, 0x1b, /* Byte value: 0x67 */ + 0x4a, 0x69, 0x7e, 0x1d, 0x4f, 0x78, 0x15, 0x5f, 0xfa, 0xb0, 0x19, 0x27, 0xb8, 0x8d, 0x71, 0x81, /* Byte value: 0x68 */ + 0xbc, 0x25, 0x70, 0xdf, 0xf9, 0xb7, 0xa9, 0x15, 0x27, 0x9b, 0xe4, 0xa2, 0xed, 0x5f, 0xbf, 0x12, /* Byte value: 0x69 */ + 0x35, 0xdc, 0xb9, 0x53, 0x2e, 0xab, 0x6b, 0x5e, 0xa3, 0x96, 0x4f, 0xf5, 0xae, 0x25, 0x94, 0x01, /* Byte value: 0x6a */ + 0xca, 0x21, 0xc4, 0xb4, 0x03, 0x4a, 0x9f, 0x55, 0xc5, 0x0f, 0x40, 0x1f, 0x24, 0x17, 0x5c, 0xc8, /* Byte value: 0x6b */ + 0xee, 0xa0, 0xcb, 0x20, 0x2a, 0xf2, 0x7c, 0x92, 0x6c, 0x82, 0x0e, 0x60, 0xde, 0x11, 0x44, 0x63, /* Byte value: 0x6c */ + 0x78, 0xda, 0x57, 0xec, 0xa9, 0xc9, 0x46, 0x3e, 0x30, 0x48, 0xb9, 0xf7, 0xe2, 0x49, 0xe7, 0xb6, /* Byte value: 0x6d */ + 0x05, 0xc7, 0xf0, 0x54, 0xd5, 0xd1, 0x28, 0x2d, 0x02, 0x07, 0x6a, 0xfc, 0x7b, 0x60, 0x43, 0x22, /* Byte value: 0x6e */ + 0x6b, 0x2f, 0x81, 0xdd, 0xb3, 0x11, 0xde, 0xb5, 0x51, 0x3a, 0x3d, 0xa4, 0x39, 0xeb, 0x2a, 0x08, /* Byte value: 0x6f */ + 0x51, 0x79, 0xeb, 0x72, 0x21, 0x0a, 0xcd, 0x9c, 0xf4, 0xa5, 0xcc, 0x96, 0x1a, 0x6e, 0x7b, 0x6f, /* Byte value: 0x70 */ + 0xe1, 0x2a, 0x18, 0xdc, 0x96, 0x42, 0x04, 0xe5, 0x6a, 0x8b, 0xb0, 0xa7, 0x53, 0xb1, 0x81, 0x05, /* Byte value: 0x71 */ + 0x59, 0x9c, 0xa8, 0x2c, 0x55, 0xa0, 0x8d, 0xd4, 0x9b, 0xc2, 0x9d, 0x74, 0x63, 0x2f, 0xbc, 0x3f, /* Byte value: 0x72 */ + 0xa3, 0xa6, 0x25, 0x9f, 0xad, 0x90, 0x51, 0xf2, 0xff, 0x5c, 0xf8, 0x62, 0x92, 0x7d, 0x37, 0xd4, /* Byte value: 0x73 */ + 0xf2, 0xdf, 0xce, 0xed, 0x8c, 0x9a, 0x9c, 0x6e, 0x0b, 0xf9, 0x34, 0xf4, 0x88, 0x13, 0x4c, 0xbb, /* Byte value: 0x74 */ + 0x71, 0x6b, 0x24, 0xc9, 0x32, 0xe7, 0x0e, 0x7f, 0x8b, 0xfa, 0x4b, 0x98, 0x3d, 0xa9, 0xe1, 0xec, /* Byte value: 0x75 */ + 0x56, 0x16, 0x7b, 0xd0, 0xe9, 0x10, 0xf5, 0xa3, 0x9d, 0xcb, 0x23, 0xb3, 0xee, 0x8f, 0x79, 0x59, /* Byte value: 0x76 */ + 0x11, 0x5d, 0xb6, 0xc7, 0x07, 0x13, 0x88, 0x99, 0x0a, 0x1b, 0x01, 0x8a, 0x54, 0x23, 0x8c, 0xaa, /* Byte value: 0x77 */ + 0x6a, 0x7b, 0xb1, 0xa6, 0x5c, 0x95, 0xd6, 0xbc, 0x85, 0xef, 0x9e, 0x29, 0x9f, 0x4a, 0xeb, 0x02, /* Byte value: 0x78 */ + 0x89, 0xf9, 0xc9, 0x8c, 0xd7, 0x1c, 0xc2, 0x4b, 0x84, 0x0d, 0xab, 0x57, 0x43, 0x7a, 0x2b, 0x13, /* Byte value: 0x79 */ + 0x94, 0xd2, 0xfc, 0x3a, 0x9e, 0xf0, 0x2a, 0xbe, 0x37, 0xa3, 0x32, 0x4e, 0xb3, 0xd9, 0xe2, 0xc1, /* Byte value: 0x7a */ + 0x65, 0xf1, 0x62, 0x5a, 0xe0, 0x25, 0xae, 0xcb, 0x83, 0xe6, 0x20, 0xee, 0x12, 0xea, 0x2e, 0x64, /* Byte value: 0x7b */ + 0x8c, 0x3e, 0x39, 0xd8, 0x02, 0xcd, 0xea, 0x66, 0x86, 0x0a, 0xc1, 0xab, 0x38, 0x1a, 0x68, 0x31, /* Byte value: 0x7c */ + 0xbb, 0x4a, 0xe0, 0x7d, 0x31, 0xad, 0x91, 0x2a, 0x4e, 0xf5, 0x0b, 0x87, 0x19, 0xbe, 0xbd, 0x24, /* Byte value: 0x7d */ + 0x77, 0x50, 0x84, 0x10, 0x15, 0x79, 0x3e, 0x49, 0x36, 0x41, 0x07, 0x30, 0x6f, 0xe9, 0x22, 0xd0, /* Byte value: 0x7e */ + 0x3c, 0x6d, 0xca, 0x76, 0xb5, 0x85, 0x23, 0x1f, 0x18, 0x24, 0xbd, 0x9a, 0x71, 0xc5, 0x92, 0x5b, /* Byte value: 0x7f */ + 0x7b, 0x26, 0x07, 0x61, 0x5b, 0x86, 0x5e, 0x25, 0x8f, 0xf4, 0x9f, 0xa3, 0xcb, 0x69, 0x67, 0xa8, /* Byte value: 0x80 */ + 0x28, 0xf7, 0x8c, 0xe5, 0x67, 0x47, 0x83, 0xab, 0x10, 0x38, 0xd6, 0xec, 0x5e, 0x86, 0x5d, 0xd3, /* Byte value: 0x81 */ + 0xab, 0x43, 0x66, 0xc1, 0xd9, 0x3a, 0x11, 0xba, 0x90, 0x3b, 0xa9, 0x80, 0xeb, 0x3c, 0xf0, 0x84, /* Byte value: 0x82 */ + 0xd2, 0xcd, 0x01, 0x56, 0x9f, 0x77, 0x5f, 0x8d, 0x74, 0xa6, 0xb3, 0xfa, 0xaf, 0xd4, 0xd6, 0x38, /* Byte value: 0x83 */ + 0x31, 0x4f, 0x79, 0x7c, 0x14, 0xfe, 0x4b, 0x7a, 0x75, 0x44, 0x86, 0x84, 0x73, 0xe4, 0x16, 0x29, /* Byte value: 0x84 */ + 0xde, 0xbb, 0x82, 0x27, 0xd1, 0x88, 0x3f, 0xe1, 0xcd, 0x13, 0x2b, 0x69, 0x0b, 0x54, 0x93, 0x40, /* Byte value: 0x85 */ + 0xc4, 0xff, 0x27, 0x33, 0x50, 0x7e, 0xef, 0x2b, 0x17, 0xd3, 0x5d, 0x55, 0x0f, 0x16, 0x58, 0xa4, /* Byte value: 0x86 */ + 0x5f, 0xa7, 0x08, 0xf5, 0x72, 0x3e, 0xbd, 0xe2, 0x26, 0x79, 0xd1, 0xdc, 0x31, 0x6f, 0x7f, 0x03, /* Byte value: 0x87 */ + 0xcc, 0x1a, 0x64, 0x6d, 0x24, 0xd4, 0xaf, 0x63, 0x78, 0xb4, 0x0c, 0xb7, 0x76, 0x57, 0x9f, 0xf4, /* Byte value: 0x88 */ + 0xcf, 0xe6, 0x34, 0xe0, 0xd6, 0x9b, 0xb7, 0x78, 0xc7, 0x08, 0x2a, 0xe3, 0x5f, 0x77, 0x1f, 0xea, /* Byte value: 0x89 */ + 0x76, 0x04, 0xb4, 0x6b, 0xfa, 0xfd, 0x36, 0x40, 0xe2, 0x94, 0xa4, 0xbd, 0xc9, 0x48, 0xe3, 0xda, /* Byte value: 0x8a */ + 0x2c, 0x64, 0x4c, 0xca, 0x5d, 0x12, 0xa3, 0x8f, 0xc6, 0xea, 0x1f, 0x9d, 0x83, 0x47, 0xdf, 0xfb, /* Byte value: 0x8b */ + 0xb8, 0xb6, 0xb0, 0xf0, 0xc3, 0xe2, 0x89, 0x31, 0xf1, 0x49, 0x2d, 0xd3, 0x30, 0x9e, 0x3d, 0x3a, /* Byte value: 0x8c */ + 0xd8, 0x80, 0x22, 0xfe, 0xf6, 0x16, 0x0f, 0xd7, 0x70, 0xa8, 0x67, 0xc1, 0x59, 0x14, 0x50, 0x7c, /* Byte value: 0x8d */ + 0x2e, 0xcc, 0x2c, 0x3c, 0x40, 0xd9, 0xb3, 0x9d, 0xad, 0x83, 0x9a, 0x44, 0x0c, 0xc6, 0x9e, 0xef, /* Byte value: 0x8e */ + 0x36, 0x20, 0xe9, 0xde, 0xdc, 0xe4, 0x73, 0x45, 0x1c, 0x2a, 0x69, 0xa1, 0x87, 0x05, 0x14, 0x1f, /* Byte value: 0x8f */ + 0xdb, 0x7c, 0x72, 0x73, 0x04, 0x59, 0x17, 0xcc, 0xcf, 0x14, 0x41, 0x95, 0x70, 0x34, 0xd0, 0x62, /* Byte value: 0x90 */ + 0x69, 0x87, 0xe1, 0x2b, 0xae, 0xda, 0xce, 0xa7, 0x3a, 0x53, 0xb8, 0x7d, 0xb6, 0x6a, 0x6b, 0x1c, /* Byte value: 0x91 */ + 0xb3, 0xaf, 0xa3, 0x23, 0x45, 0x07, 0xd1, 0x62, 0x21, 0x92, 0x5a, 0x65, 0x60, 0xff, 0x7a, 0x74, /* Byte value: 0x92 */ + 0x14, 0x9a, 0x46, 0x93, 0xd2, 0xc2, 0xa0, 0xb4, 0x08, 0x1c, 0x6b, 0x76, 0x2f, 0x43, 0xcf, 0x88, /* Byte value: 0x93 */ + 0x95, 0x86, 0xcc, 0x41, 0x71, 0x74, 0x22, 0xb7, 0xe3, 0x76, 0x91, 0xc3, 0x15, 0x78, 0x23, 0xcb, /* Byte value: 0x94 */ + 0xbe, 0x8d, 0x10, 0x29, 0xe4, 0x7c, 0xb9, 0x07, 0x4c, 0xf2, 0x61, 0x7b, 0x62, 0xde, 0xfe, 0x06, /* Byte value: 0x95 */ + 0x62, 0x9e, 0xf2, 0xf8, 0x28, 0x3f, 0x96, 0xf4, 0xea, 0x88, 0xcf, 0xcb, 0xe6, 0x0b, 0x2c, 0x52, /* Byte value: 0x96 */ + 0xa1, 0x0e, 0x45, 0x69, 0xb0, 0x5b, 0x41, 0xe0, 0x94, 0x35, 0x7d, 0xbb, 0x1d, 0xfc, 0x76, 0xc0, /* Byte value: 0x97 */ + 0x3b, 0x02, 0x5a, 0xd4, 0x7d, 0x9f, 0x1b, 0x20, 0x71, 0x4a, 0x52, 0xbf, 0x85, 0x24, 0x90, 0x6d, /* Byte value: 0x98 */ + 0x16, 0x32, 0x26, 0x65, 0xcf, 0x09, 0xb0, 0xa6, 0x63, 0x75, 0xee, 0xaf, 0xa0, 0xc2, 0x8e, 0x9c, /* Byte value: 0x99 */ + 0x66, 0x0d, 0x32, 0xd7, 0x12, 0x6a, 0xb6, 0xd0, 0x3c, 0x5a, 0x06, 0xba, 0x3b, 0xca, 0xae, 0x7a, /* Byte value: 0x9a */ + 0xe9, 0xcf, 0x5b, 0x82, 0xe2, 0xe8, 0x44, 0xad, 0x05, 0xec, 0xe1, 0x45, 0x2a, 0xf0, 0x46, 0x55, /* Byte value: 0x9b */ + 0x5c, 0x5b, 0x58, 0x78, 0x80, 0x71, 0xa5, 0xf9, 0x99, 0xc5, 0xf7, 0x88, 0x18, 0x4f, 0xff, 0x1d, /* Byte value: 0x9c */ + 0x6c, 0x40, 0x11, 0x7f, 0x7b, 0x0b, 0xe6, 0x8a, 0x38, 0x54, 0xd2, 0x81, 0xcd, 0x0a, 0x28, 0x3e, /* Byte value: 0x9d */ + 0x6d, 0x14, 0x21, 0x04, 0x94, 0x8f, 0xee, 0x83, 0xec, 0x81, 0x71, 0x0c, 0x6b, 0xab, 0xe9, 0x34, /* Byte value: 0x9e */ + 0xad, 0x78, 0xc6, 0x18, 0xfe, 0xa4, 0x21, 0x8c, 0x2d, 0x80, 0xe5, 0x28, 0xb9, 0x7c, 0x33, 0xb8, /* Byte value: 0x9f */ + 0x37, 0x74, 0xd9, 0xa5, 0x33, 0x60, 0x7b, 0x4c, 0xc8, 0xff, 0xca, 0x2c, 0x21, 0xa4, 0xd5, 0x15, /* Byte value: 0xa0 */ + 0x61, 0x62, 0xa2, 0x75, 0xda, 0x70, 0x8e, 0xef, 0x55, 0x34, 0xe9, 0x9f, 0xcf, 0x2b, 0xac, 0x4c, /* Byte value: 0xa1 */ + 0x4b, 0x3d, 0x4e, 0x66, 0xa0, 0xfc, 0x1d, 0x56, 0x2e, 0x65, 0xba, 0xaa, 0x1e, 0x2c, 0xb0, 0x8b, /* Byte value: 0xa2 */ + 0xb9, 0xe2, 0x80, 0x8b, 0x2c, 0x66, 0x81, 0x38, 0x25, 0x9c, 0x8e, 0x5e, 0x96, 0x3f, 0xfc, 0x30, /* Byte value: 0xa3 */ + 0xe3, 0x82, 0x78, 0x2a, 0x8b, 0x89, 0x14, 0xf7, 0x01, 0xe2, 0x35, 0x7e, 0xdc, 0x30, 0xc0, 0x11, /* Byte value: 0xa4 */ + 0xba, 0x1e, 0xd0, 0x06, 0xde, 0x29, 0x99, 0x23, 0x9a, 0x20, 0xa8, 0x0a, 0xbf, 0x1f, 0x7c, 0x2e, /* Byte value: 0xa5 */ + 0xf1, 0x23, 0x9e, 0x60, 0x7e, 0xd5, 0x84, 0x75, 0xb4, 0x45, 0x12, 0xa0, 0xa1, 0x33, 0xcc, 0xa5, /* Byte value: 0xa6 */ + 0xa0, 0x5a, 0x75, 0x12, 0x5f, 0xdf, 0x49, 0xe9, 0x40, 0xe0, 0xde, 0x36, 0xbb, 0x5d, 0xb7, 0xca, /* Byte value: 0xa7 */ + 0x85, 0x8f, 0x4a, 0xfd, 0x99, 0xe3, 0xa2, 0x27, 0x3d, 0xb8, 0x33, 0xc4, 0xe7, 0xfa, 0x6e, 0x6b, /* Byte value: 0xa8 */ + 0x83, 0xb4, 0xea, 0x24, 0xbe, 0x7d, 0x92, 0x11, 0x80, 0x03, 0x7f, 0x6c, 0xb5, 0xba, 0xad, 0x57, /* Byte value: 0xa9 */ + 0xda, 0x28, 0x42, 0x08, 0xeb, 0xdd, 0x1f, 0xc5, 0x1b, 0xc1, 0xe2, 0x18, 0xd6, 0x95, 0x11, 0x68, /* Byte value: 0xaa */ + 0x47, 0x4b, 0xcd, 0x17, 0xee, 0x03, 0x7d, 0x3a, 0x97, 0xd0, 0x22, 0x39, 0xba, 0xac, 0xf5, 0xf3, /* Byte value: 0xab */ + 0xc5, 0xab, 0x17, 0x48, 0xbf, 0xfa, 0xe7, 0x22, 0xc3, 0x06, 0xfe, 0xd8, 0xa9, 0xb7, 0x99, 0xae, /* Byte value: 0xac */ + 0xb0, 0x53, 0xf3, 0xae, 0xb7, 0x48, 0xc9, 0x79, 0x9e, 0x2e, 0x7c, 0x31, 0x49, 0xdf, 0xfa, 0x6a, /* Byte value: 0xad */ + 0x33, 0xe7, 0x19, 0x8a, 0x09, 0x35, 0x5b, 0x68, 0x1e, 0x2d, 0x03, 0x5d, 0xfc, 0x65, 0x57, 0x3d, /* Byte value: 0xae */ + 0xfa, 0x3a, 0x8d, 0xb3, 0xf8, 0x30, 0xdc, 0x26, 0x64, 0x9e, 0x65, 0x16, 0xf1, 0x52, 0x8b, 0xeb, /* Byte value: 0xaf */ + 0x96, 0x7a, 0x9c, 0xcc, 0x83, 0x3b, 0x3a, 0xac, 0x5c, 0xca, 0xb7, 0x97, 0x3c, 0x58, 0xa3, 0xd5, /* Byte value: 0xb0 */ + 0x6f, 0xbc, 0x41, 0xf2, 0x89, 0x44, 0xfe, 0x91, 0x87, 0xe8, 0xf4, 0xd5, 0xe4, 0x2a, 0xa8, 0x20, /* Byte value: 0xb1 */ + 0x6e, 0xe8, 0x71, 0x89, 0x66, 0xc0, 0xf6, 0x98, 0x53, 0x3d, 0x57, 0x58, 0x42, 0x8b, 0x69, 0x2a, /* Byte value: 0xb2 */ + 0xc2, 0xc4, 0x87, 0xea, 0x77, 0xe0, 0xdf, 0x1d, 0xaa, 0x68, 0x11, 0xfd, 0x5d, 0x56, 0x9b, 0x98, /* Byte value: 0xb3 */ + 0xf6, 0x4c, 0x0e, 0xc2, 0xb6, 0xcf, 0xbc, 0x4a, 0xdd, 0x2b, 0xfd, 0x85, 0x55, 0xd2, 0xce, 0x93, /* Byte value: 0xb4 */ + 0x50, 0x2d, 0xdb, 0x09, 0xce, 0x8e, 0xc5, 0x95, 0x20, 0x70, 0x6f, 0x1b, 0xbc, 0xcf, 0xba, 0x65, /* Byte value: 0xb5 */ + 0xff, 0xfd, 0x7d, 0xe7, 0x2d, 0xe1, 0xf4, 0x0b, 0x66, 0x99, 0x0f, 0xea, 0x8a, 0x32, 0xc8, 0xc9, /* Byte value: 0xb6 */ + 0x5d, 0x0f, 0x68, 0x03, 0x6f, 0xf5, 0xad, 0xf0, 0x4d, 0x10, 0x54, 0x05, 0xbe, 0xee, 0x3e, 0x17, /* Byte value: 0xb7 */ + 0xa9, 0xeb, 0x06, 0x37, 0xc4, 0xf1, 0x01, 0xa8, 0xfb, 0x52, 0x2c, 0x59, 0x64, 0xbd, 0xb1, 0x90, /* Byte value: 0xb8 */ + 0x8e, 0x96, 0x59, 0x2e, 0x1f, 0x06, 0xfa, 0x74, 0xed, 0x63, 0x44, 0x72, 0xb7, 0x9b, 0x29, 0x25, /* Byte value: 0xb9 */ + 0x17, 0x66, 0x16, 0x1e, 0x20, 0x8d, 0xb8, 0xaf, 0xb7, 0xa0, 0x4d, 0x22, 0x06, 0x63, 0x4f, 0x96, /* Byte value: 0xba */ + 0x1b, 0x10, 0x95, 0x6f, 0x6e, 0x72, 0xd8, 0xc3, 0x0e, 0x15, 0xd5, 0xb1, 0xa2, 0xe3, 0x0a, 0xee, /* Byte value: 0xbb */ + 0x97, 0x2e, 0xac, 0xb7, 0x6c, 0xbf, 0x32, 0xa5, 0x88, 0x1f, 0x14, 0x1a, 0x9a, 0xf9, 0x62, 0xdf, /* Byte value: 0xbc */ + 0x7d, 0x1d, 0xa7, 0xb8, 0x7c, 0x18, 0x6e, 0x13, 0x32, 0x4f, 0xd3, 0x0b, 0x99, 0x29, 0xa4, 0x94, /* Byte value: 0xbd */ + 0xec, 0x08, 0xab, 0xd6, 0x37, 0x39, 0x6c, 0x80, 0x07, 0xeb, 0x8b, 0xb9, 0x51, 0x90, 0x05, 0x77, /* Byte value: 0xbe */ + 0x58, 0xc8, 0x98, 0x57, 0xba, 0x24, 0x85, 0xdd, 0x4f, 0x17, 0x3e, 0xf9, 0xc5, 0x8e, 0x7d, 0x35, /* Byte value: 0xbf */ + 0xf7, 0x18, 0x3e, 0xb9, 0x59, 0x4b, 0xb4, 0x43, 0x09, 0xfe, 0x5e, 0x08, 0xf3, 0x73, 0x0f, 0x99, /* Byte value: 0xc0 */ + 0x1f, 0x83, 0x55, 0x40, 0x54, 0x27, 0xf8, 0xe7, 0xd8, 0xc7, 0x1c, 0xc0, 0x7f, 0x22, 0x88, 0xc6, /* Byte value: 0xc1 */ + 0xfb, 0x6e, 0xbd, 0xc8, 0x17, 0xb4, 0xd4, 0x2f, 0xb0, 0x4b, 0xc6, 0x9b, 0x57, 0xf3, 0x4a, 0xe1, /* Byte value: 0xc2 */ + 0x7c, 0x49, 0x97, 0xc3, 0x93, 0x9c, 0x66, 0x1a, 0xe6, 0x9a, 0x70, 0x86, 0x3f, 0x88, 0x65, 0x9e, /* Byte value: 0xc3 */ + 0x09, 0xb1, 0x73, 0x25, 0x9b, 0x2e, 0x48, 0x41, 0xbb, 0xb2, 0xf2, 0x6f, 0xdf, 0xe0, 0x06, 0x5a, /* Byte value: 0xc4 */ + 0x0d, 0x22, 0xb3, 0x0a, 0xa1, 0x7b, 0x68, 0x65, 0x6d, 0x60, 0x3b, 0x1e, 0x02, 0x21, 0x84, 0x72, /* Byte value: 0xc5 */ + 0x7a, 0x72, 0x37, 0x1a, 0xb4, 0x02, 0x56, 0x2c, 0x5b, 0x21, 0x3c, 0x2e, 0x6d, 0xc8, 0xa6, 0xa2, /* Byte value: 0xc6 */ + 0x67, 0x59, 0x02, 0xac, 0xfd, 0xee, 0xbe, 0xd9, 0xe8, 0x8f, 0xa5, 0x37, 0x9d, 0x6b, 0x6f, 0x70, /* Byte value: 0xc7 */ + 0x45, 0xe3, 0xad, 0xe1, 0xf3, 0xc8, 0x6d, 0x28, 0xfc, 0xb9, 0xa7, 0xe0, 0x35, 0x2d, 0xb4, 0xe7, /* Byte value: 0xc8 */ + 0x87, 0x27, 0x2a, 0x0b, 0x84, 0x28, 0xb2, 0x35, 0x56, 0xd1, 0xb6, 0x1d, 0x68, 0x7b, 0x2f, 0x7f, /* Byte value: 0xc9 */ + 0xdc, 0x13, 0xe2, 0xd1, 0xcc, 0x43, 0x2f, 0xf3, 0xa6, 0x7a, 0xae, 0xb0, 0x84, 0xd5, 0xd2, 0x54, /* Byte value: 0xca */ + 0xe8, 0x9b, 0x6b, 0xf9, 0x0d, 0x6c, 0x4c, 0xa4, 0xd1, 0x39, 0x42, 0xc8, 0x8c, 0x51, 0x87, 0x5f, /* Byte value: 0xcb */ + 0x4f, 0xae, 0x8e, 0x49, 0x9a, 0xa9, 0x3d, 0x72, 0xf8, 0xb7, 0x73, 0xdb, 0xc3, 0xed, 0x32, 0xa3, /* Byte value: 0xcc */ + 0x1d, 0x2b, 0x35, 0xb6, 0x49, 0xec, 0xe8, 0xf5, 0xb3, 0xae, 0x99, 0x19, 0xf0, 0xa3, 0xc9, 0xd2, /* Byte value: 0xcd */ + 0x4e, 0xfa, 0xbe, 0x32, 0x75, 0x2d, 0x35, 0x7b, 0x2c, 0x62, 0xd0, 0x56, 0x65, 0x4c, 0xf3, 0xa9, /* Byte value: 0xce */ + 0x04, 0x93, 0xc0, 0x2f, 0x3a, 0x55, 0x20, 0x24, 0xd6, 0xd2, 0xc9, 0x71, 0xdd, 0xc1, 0x82, 0x28, /* Byte value: 0xcf */ + 0xeb, 0x67, 0x3b, 0x74, 0xff, 0x23, 0x54, 0xbf, 0x6e, 0x85, 0x64, 0x9c, 0xa5, 0x71, 0x07, 0x41, /* Byte value: 0xd0 */ + 0xf8, 0x92, 0xed, 0x45, 0xe5, 0xfb, 0xcc, 0x34, 0x0f, 0xf7, 0xe0, 0xcf, 0x7e, 0xd3, 0xca, 0xff, /* Byte value: 0xd1 */ + 0xf3, 0x8b, 0xfe, 0x96, 0x63, 0x1e, 0x94, 0x67, 0xdf, 0x2c, 0x97, 0x79, 0x2e, 0xb2, 0x8d, 0xb1, /* Byte value: 0xd2 */ + 0x3e, 0xc5, 0xaa, 0x80, 0xa8, 0x4e, 0x33, 0x0d, 0x73, 0x4d, 0x38, 0x43, 0xfe, 0x44, 0xd3, 0x4f, /* Byte value: 0xd3 */ + 0x3d, 0x39, 0xfa, 0x0d, 0x5a, 0x01, 0x2b, 0x16, 0xcc, 0xf1, 0x1e, 0x17, 0xd7, 0x64, 0x53, 0x51, /* Byte value: 0xd4 */ + 0xbd, 0x71, 0x40, 0xa4, 0x16, 0x33, 0xa1, 0x1c, 0xf3, 0x4e, 0x47, 0x2f, 0x4b, 0xfe, 0x7e, 0x18, /* Byte value: 0xd5 */ + 0x8a, 0x05, 0x99, 0x01, 0x25, 0x53, 0xda, 0x50, 0x3b, 0xb1, 0x8d, 0x03, 0x6a, 0x5a, 0xab, 0x0d, /* Byte value: 0xd6 */ + 0x88, 0xad, 0xf9, 0xf7, 0x38, 0x98, 0xca, 0x42, 0x50, 0xd8, 0x08, 0xda, 0xe5, 0xdb, 0xea, 0x19, /* Byte value: 0xd7 */ + 0xdd, 0x47, 0xd2, 0xaa, 0x23, 0xc7, 0x27, 0xfa, 0x72, 0xaf, 0x0d, 0x3d, 0x22, 0x74, 0x13, 0x5e, /* Byte value: 0xd8 */ + 0xcd, 0x4e, 0x54, 0x16, 0xcb, 0x50, 0xa7, 0x6a, 0xac, 0x61, 0xaf, 0x3a, 0xd0, 0xf6, 0x5e, 0xfe, /* Byte value: 0xd9 */ + 0x0b, 0x19, 0x13, 0xd3, 0x86, 0xe5, 0x58, 0x53, 0xd0, 0xdb, 0x77, 0xb6, 0x50, 0x61, 0x47, 0x4e, /* Byte value: 0xda */ + 0x13, 0xf5, 0xd6, 0x31, 0x1a, 0xd8, 0x98, 0x8b, 0x61, 0x72, 0x84, 0x53, 0xdb, 0xa2, 0xcd, 0xbe, /* Byte value: 0xdb */ + 0x98, 0xa4, 0x7f, 0x4b, 0xd0, 0x0f, 0x4a, 0xd2, 0x8e, 0x16, 0xaa, 0xdd, 0x17, 0x59, 0xa7, 0xb9, /* Byte value: 0xdc */ + 0x02, 0xa8, 0x60, 0xf6, 0x1d, 0xcb, 0x10, 0x12, 0x6b, 0x69, 0x85, 0xd9, 0x8f, 0x81, 0x41, 0x14, /* Byte value: 0xdd */ + 0x93, 0xbd, 0x6c, 0x98, 0x56, 0xea, 0x12, 0x81, 0x5e, 0xcd, 0xdd, 0x6b, 0x47, 0x38, 0xe0, 0xf7, /* Byte value: 0xde */ + 0x80, 0x48, 0xba, 0xa9, 0x4c, 0x32, 0x8a, 0x0a, 0x3f, 0xbf, 0x59, 0x38, 0x9c, 0x9a, 0x2d, 0x49, /* Byte value: 0xdf */ + 0x90, 0x41, 0x3c, 0x15, 0xa4, 0xa5, 0x0a, 0x9a, 0xe1, 0x71, 0xfb, 0x3f, 0x6e, 0x18, 0x60, 0xe9, /* Byte value: 0xe0 */ + 0xd0, 0x65, 0x61, 0xa0, 0x82, 0xbc, 0x4f, 0x9f, 0x1f, 0xcf, 0x36, 0x23, 0x20, 0x55, 0x97, 0x2c, /* Byte value: 0xe1 */ + 0x24, 0x81, 0x0f, 0x94, 0x29, 0xb8, 0xe3, 0xc7, 0xa9, 0x8d, 0x4e, 0x7f, 0xfa, 0x06, 0x18, 0xab, /* Byte value: 0xe2 */ + 0x34, 0x88, 0x89, 0x28, 0xc1, 0x2f, 0x63, 0x57, 0x77, 0x43, 0xec, 0x78, 0x08, 0x84, 0x55, 0x0b, /* Byte value: 0xe3 */ + 0xcb, 0x75, 0xf4, 0xcf, 0xec, 0xce, 0x97, 0x5c, 0x11, 0xda, 0xe3, 0x92, 0x82, 0xb6, 0x9d, 0xc2, /* Byte value: 0xe4 */ + 0xed, 0x5c, 0x9b, 0xad, 0xd8, 0xbd, 0x64, 0x89, 0xd3, 0x3e, 0x28, 0x34, 0xf7, 0x31, 0xc4, 0x7d, /* Byte value: 0xe5 */ + 0xf4, 0xe4, 0x6e, 0x34, 0xab, 0x04, 0xac, 0x58, 0xb6, 0x42, 0x78, 0x5c, 0xda, 0x53, 0x8f, 0x87, /* Byte value: 0xe6 */ + 0xce, 0xb2, 0x04, 0x9b, 0x39, 0x1f, 0xbf, 0x71, 0x13, 0xdd, 0x89, 0x6e, 0xf9, 0xd6, 0xde, 0xe0, /* Byte value: 0xe7 */ + 0x99, 0xf0, 0x4f, 0x30, 0x3f, 0x8b, 0x42, 0xdb, 0x5a, 0xc3, 0x09, 0x50, 0xb1, 0xf8, 0x66, 0xb3, /* Byte value: 0xe8 */ + 0x10, 0x09, 0x86, 0xbc, 0xe8, 0x97, 0x80, 0x90, 0xde, 0xce, 0xa2, 0x07, 0xf2, 0x82, 0x4d, 0xa0, /* Byte value: 0xe9 */ + 0x44, 0xb7, 0x9d, 0x9a, 0x1c, 0x4c, 0x65, 0x21, 0x28, 0x6c, 0x04, 0x6d, 0x93, 0x8c, 0x75, 0xed, /* Byte value: 0xea */ + 0x40, 0x24, 0x5d, 0xb5, 0x26, 0x19, 0x45, 0x05, 0xfe, 0xbe, 0xcd, 0x1c, 0x4e, 0x4d, 0xf7, 0xc5, /* Byte value: 0xeb */ + 0x92, 0xe9, 0x5c, 0xe3, 0xb9, 0x6e, 0x1a, 0x88, 0x8a, 0x18, 0x7e, 0xe6, 0xe1, 0x99, 0x21, 0xfd, /* Byte value: 0xec */ + 0x3a, 0x56, 0x6a, 0xaf, 0x92, 0x1b, 0x13, 0x29, 0xa5, 0x9f, 0xf1, 0x32, 0x23, 0x85, 0x51, 0x67, /* Byte value: 0xed */ + 0x01, 0x54, 0x30, 0x7b, 0xef, 0x84, 0x08, 0x09, 0xd4, 0xd5, 0xa3, 0x8d, 0xa6, 0xa1, 0xc1, 0x0a, /* Byte value: 0xee */ + 0x26, 0x29, 0x6f, 0x62, 0x34, 0x73, 0xf3, 0xd5, 0xc2, 0xe4, 0xcb, 0xa6, 0x75, 0x87, 0x59, 0xbf, /* Byte value: 0xef */ + 0x12, 0xa1, 0xe6, 0x4a, 0xf5, 0x5c, 0x90, 0x82, 0xb5, 0xa7, 0x27, 0xde, 0x7d, 0x03, 0x0c, 0xb4, /* Byte value: 0xf0 */ + 0x1a, 0x44, 0xa5, 0x14, 0x81, 0xf6, 0xd0, 0xca, 0xda, 0xc0, 0x76, 0x3c, 0x04, 0x42, 0xcb, 0xe4, /* Byte value: 0xf1 */ + 0x48, 0xc1, 0x1e, 0xeb, 0x52, 0xb3, 0x05, 0x4d, 0x91, 0xd9, 0x9c, 0xfe, 0x37, 0x0c, 0x30, 0x95, /* Byte value: 0xf2 */ + 0x68, 0xd3, 0xd1, 0x50, 0x41, 0x5e, 0xc6, 0xae, 0xee, 0x86, 0x1b, 0xf0, 0x10, 0xcb, 0xaa, 0x16, /* Byte value: 0xf3 */ + 0xf5, 0xb0, 0x5e, 0x4f, 0x44, 0x80, 0xa4, 0x51, 0x62, 0x97, 0xdb, 0xd1, 0x7c, 0xf2, 0x4e, 0x8d, /* Byte value: 0xf4 */ + 0x81, 0x1c, 0x8a, 0xd2, 0xa3, 0xb6, 0x82, 0x03, 0xeb, 0x6a, 0xfa, 0xb5, 0x3a, 0x3b, 0xec, 0x43, /* Byte value: 0xf5 */ + 0x8b, 0x51, 0xa9, 0x7a, 0xca, 0xd7, 0xd2, 0x59, 0xef, 0x64, 0x2e, 0x8e, 0xcc, 0xfb, 0x6a, 0x07, /* Byte value: 0xf6 */ + 0xc7, 0x03, 0x77, 0xbe, 0xa2, 0x31, 0xf7, 0x30, 0xa8, 0x6f, 0x7b, 0x01, 0x26, 0x36, 0xd8, 0xba, /* Byte value: 0xf7 */ + 0xd6, 0x5e, 0xc1, 0x79, 0xa5, 0x22, 0x7f, 0xa9, 0xa2, 0x74, 0x7a, 0x8b, 0x72, 0x15, 0x54, 0x10, /* Byte value: 0xf8 */ + 0x20, 0x12, 0xcf, 0xbb, 0x13, 0xed, 0xc3, 0xe3, 0x7f, 0x5f, 0x87, 0x0e, 0x27, 0xc7, 0x9a, 0x83, /* Byte value: 0xf9 */ + 0x0a, 0x4d, 0x23, 0xa8, 0x69, 0x61, 0x50, 0x5a, 0x04, 0x0e, 0xd4, 0x3b, 0xf6, 0xc0, 0x86, 0x44, /* Byte value: 0xfa */ + 0x08, 0xe5, 0x43, 0x5e, 0x74, 0xaa, 0x40, 0x48, 0x6f, 0x67, 0x51, 0xe2, 0x79, 0x41, 0xc7, 0x50, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x4c, 0x52, 0xde, 0xc4, 0x68, 0xe6, 0x25, 0x69, 0x47, 0x0b, 0x55, 0x8f, 0xea, 0xcd, 0xb2, 0xbd, /* Byte value: 0xfd */ + 0xd7, 0x0a, 0xf1, 0x02, 0x4a, 0xa6, 0x77, 0xa0, 0x76, 0xa1, 0xd9, 0x06, 0xd4, 0xb4, 0x95, 0x1a, /* Byte value: 0xfe */ + 0x74, 0xac, 0xd4, 0x9d, 0xe7, 0x36, 0x26, 0x52, 0x89, 0xfd, 0x21, 0x64, 0x46, 0xc9, 0xa2, 0xce, /* Byte value: 0xff */ + + /* Matrix row: 8 */ + 0x99, 0xaa, 0x16, 0x04, 0xc2, 0x95, 0x8c, 0x4a, 0x63, 0xeb, 0xf0, 0x49, 0x21, 0x0a, 0xad, 0xf8, /* Byte value: 0x00 */ + 0x93, 0xe3, 0xda, 0xa3, 0x95, 0xb5, 0xa1, 0x97, 0x1b, 0x19, 0xbd, 0x7f, 0x09, 0x35, 0xa8, 0x38, /* Byte value: 0x01 */ + 0x88, 0xfd, 0x2b, 0x3b, 0xa6, 0xc5, 0x21, 0xbc, 0xaf, 0xb5, 0xad, 0x3e, 0x65, 0x8a, 0x44, 0xdb, /* Byte value: 0x02 */ + 0xae, 0x16, 0x29, 0x6c, 0x27, 0x1a, 0xaa, 0xe1, 0xc4, 0x02, 0x84, 0xcc, 0xfd, 0xee, 0x57, 0x5c, /* Byte value: 0x03 */ + 0x8b, 0xbe, 0x09, 0x55, 0xe0, 0x74, 0xcd, 0x78, 0xbb, 0x23, 0x51, 0x37, 0x69, 0x61, 0xa4, 0xfb, /* Byte value: 0x04 */ + 0xbd, 0x82, 0x28, 0xa6, 0x86, 0x94, 0x0e, 0x2e, 0x10, 0xb8, 0x71, 0xb5, 0xb1, 0xdc, 0xbf, 0xfe, /* Byte value: 0x05 */ + 0x69, 0xbd, 0x24, 0x97, 0x06, 0x13, 0xb2, 0x23, 0xa9, 0x8c, 0x87, 0xdc, 0x67, 0x47, 0xd5, 0x6a, /* Byte value: 0x06 */ + 0xb1, 0x4d, 0xa0, 0xdd, 0x5d, 0x15, 0x38, 0xb8, 0x40, 0xa5, 0x07, 0x91, 0x81, 0xf6, 0xb9, 0x7e, /* Byte value: 0x07 */ + 0x6e, 0xbb, 0x7e, 0xd0, 0x09, 0xdd, 0x4c, 0x95, 0x8d, 0x11, 0xe8, 0xc9, 0x7b, 0x0b, 0x37, 0x8b, /* Byte value: 0x08 */ + 0x38, 0x30, 0x95, 0x7d, 0x78, 0xbf, 0xfc, 0xf9, 0xe3, 0x62, 0xfe, 0xa8, 0xe0, 0x25, 0x1c, 0x04, /* Byte value: 0x09 */ + 0x3e, 0xb6, 0xd1, 0xa1, 0xf4, 0x1e, 0xe7, 0xb2, 0xcb, 0x8d, 0xc5, 0xba, 0xf8, 0x30, 0x1f, 0x44, /* Byte value: 0x0a */ + 0x92, 0x63, 0xc4, 0x38, 0x16, 0xda, 0x44, 0x6a, 0x17, 0x6b, 0xe9, 0x78, 0x0d, 0x6c, 0x49, 0x99, /* Byte value: 0x0b */ + 0x95, 0x65, 0x9e, 0x7f, 0x19, 0x14, 0xba, 0xdc, 0x33, 0xf6, 0x86, 0x6d, 0x11, 0x20, 0xab, 0x78, /* Byte value: 0x0c */ + 0x59, 0x07, 0x41, 0xb8, 0xec, 0x52, 0x6a, 0x3e, 0x2a, 0xf8, 0x9c, 0x4c, 0xa7, 0xef, 0xcd, 0x2f, /* Byte value: 0x0d */ + 0x31, 0x3a, 0x7b, 0xb4, 0x69, 0x2e, 0x3d, 0xe0, 0x8f, 0x06, 0x4f, 0x97, 0xc4, 0xf1, 0xf9, 0xe4, /* Byte value: 0x0e */ + 0x4e, 0xd6, 0x38, 0x5b, 0x04, 0xa3, 0xdc, 0x83, 0xce, 0x49, 0xfa, 0x29, 0xfb, 0x7a, 0x27, 0x4c, /* Byte value: 0x0f */ + 0xd3, 0x39, 0x56, 0x76, 0x8f, 0x49, 0x42, 0xbb, 0x9d, 0xa9, 0x99, 0x7c, 0xca, 0xd7, 0x88, 0x75, /* Byte value: 0x10 */ + 0xce, 0xa1, 0xe3, 0x32, 0x30, 0x98, 0xd9, 0xdb, 0x01, 0xea, 0xb2, 0x2f, 0xbe, 0x7d, 0x67, 0xd6, /* Byte value: 0x11 */ + 0xa0, 0x1a, 0x9d, 0xe2, 0x39, 0x45, 0x95, 0x4e, 0x8c, 0xfb, 0x5a, 0xe6, 0xc5, 0x76, 0x50, 0x5d, /* Byte value: 0x12 */ + 0xe5, 0x05, 0x77, 0x85, 0xe9, 0xa9, 0x81, 0xed, 0x36, 0x32, 0xb9, 0xfe, 0x12, 0x6a, 0x93, 0x70, /* Byte value: 0x13 */ + 0xd5, 0xbf, 0x12, 0xaa, 0x03, 0xe8, 0x59, 0xf0, 0xb5, 0x46, 0xa2, 0x6e, 0xd2, 0xc2, 0x8b, 0x35, /* Byte value: 0x14 */ + 0xb9, 0xc7, 0x50, 0x8f, 0xcf, 0xeb, 0x1c, 0x5c, 0x20, 0xb3, 0xe2, 0xa9, 0xa1, 0x7b, 0xbd, 0x3f, /* Byte value: 0x15 */ + 0xa4, 0x5f, 0xe5, 0xcb, 0x70, 0x3a, 0x87, 0x3c, 0xbc, 0xf0, 0xc9, 0xfa, 0xd5, 0xd1, 0x52, 0x9c, /* Byte value: 0x16 */ + 0xbf, 0x41, 0x14, 0x53, 0x43, 0x4a, 0x07, 0x17, 0x08, 0x5c, 0xd9, 0xbb, 0xb9, 0x6e, 0xbe, 0x7f, /* Byte value: 0x17 */ + 0x2d, 0x22, 0xd0, 0x6b, 0x55, 0x90, 0x43, 0x7d, 0x1f, 0x37, 0x30, 0xc3, 0xb4, 0x02, 0xf7, 0xe6, /* Byte value: 0x18 */ + 0xe7, 0xc6, 0x4b, 0x70, 0x2c, 0x77, 0x88, 0xd4, 0x2e, 0xd6, 0x11, 0xf0, 0x1a, 0xd8, 0x92, 0xf1, /* Byte value: 0x19 */ + 0xdc, 0xb5, 0xfc, 0x63, 0x12, 0x79, 0x98, 0xe9, 0xd9, 0x22, 0x13, 0x51, 0xf6, 0x16, 0x6e, 0xd5, /* Byte value: 0x1a */ + 0x21, 0xed, 0x58, 0x10, 0x8e, 0x11, 0x75, 0xeb, 0x4f, 0x2a, 0x46, 0xe7, 0x84, 0x28, 0xf1, 0x66, /* Byte value: 0x1b */ + 0xf9, 0x1d, 0xdc, 0x5a, 0xd5, 0x17, 0xff, 0x70, 0xa6, 0x03, 0xc6, 0xaa, 0x62, 0x99, 0x9d, 0x72, /* Byte value: 0x1c */ + 0xee, 0xcc, 0xa5, 0xb9, 0x3d, 0xe6, 0x49, 0xcd, 0x42, 0xb2, 0xa0, 0xcf, 0x3e, 0x0c, 0x77, 0x11, /* Byte value: 0x1d */ + 0x62, 0x74, 0xf6, 0xab, 0xd2, 0x5c, 0x7a, 0x03, 0xdd, 0x0c, 0x9e, 0xed, 0x4b, 0x21, 0x31, 0x0b, /* Byte value: 0x1e */ + 0xcd, 0xe2, 0xc1, 0x5c, 0x76, 0x29, 0x35, 0x1f, 0x15, 0x7c, 0x4e, 0x26, 0xb2, 0x96, 0x87, 0xf6, /* Byte value: 0x1f */ + 0x67, 0xb1, 0x90, 0x19, 0x18, 0x4c, 0x8d, 0x8c, 0xe1, 0x75, 0x59, 0xf6, 0x5f, 0xdf, 0xd2, 0x6b, /* Byte value: 0x20 */ + 0x72, 0xa3, 0xd5, 0x0f, 0x35, 0x63, 0x32, 0x08, 0x1d, 0x20, 0x97, 0x9d, 0x0b, 0xf8, 0x39, 0x89, /* Byte value: 0x21 */ + 0x9b, 0x69, 0x2a, 0xf1, 0x07, 0x4b, 0x85, 0x73, 0x7b, 0x0f, 0x58, 0x47, 0x29, 0xb8, 0xac, 0x79, /* Byte value: 0x22 */ + 0xbe, 0xc1, 0x0a, 0xc8, 0xc0, 0x25, 0xe2, 0xea, 0x04, 0x2e, 0x8d, 0xbc, 0xbd, 0x37, 0x5f, 0xde, /* Byte value: 0x23 */ + 0xeb, 0x09, 0xc3, 0x0b, 0xf7, 0xf6, 0xbe, 0x42, 0x7e, 0xcb, 0x67, 0xd4, 0x2a, 0xf2, 0x94, 0x71, /* Byte value: 0x24 */ + 0x86, 0xf1, 0x9f, 0xb5, 0xb8, 0x9a, 0x1e, 0x13, 0xe7, 0x4c, 0x73, 0x14, 0x5d, 0x12, 0x43, 0xda, /* Byte value: 0x25 */ + 0x83, 0x34, 0xf9, 0x07, 0x72, 0x8a, 0xe9, 0x9c, 0xdb, 0x35, 0xb4, 0x0f, 0x49, 0xec, 0xa0, 0xba, /* Byte value: 0x26 */ + 0x09, 0x0a, 0xee, 0xc9, 0x11, 0x91, 0xc1, 0x19, 0x6c, 0x64, 0xb1, 0x3f, 0x24, 0xd4, 0xe5, 0xe0, /* Byte value: 0x27 */ + 0x54, 0x48, 0xd7, 0x58, 0xb4, 0xbc, 0xb9, 0x55, 0x76, 0x97, 0xbe, 0x6f, 0x93, 0x9c, 0x2a, 0x0e, /* Byte value: 0x28 */ + 0x77, 0x66, 0xb3, 0xbd, 0xff, 0x73, 0xc5, 0x87, 0x21, 0x59, 0x50, 0x86, 0x1f, 0x06, 0xda, 0xe9, /* Byte value: 0x29 */ + 0x40, 0xda, 0x8c, 0xd5, 0x1a, 0xfc, 0xe3, 0x2c, 0x86, 0xb0, 0x24, 0x03, 0xc3, 0xe2, 0x20, 0x4d, /* Byte value: 0x2a */ + 0xf6, 0x91, 0x76, 0x4f, 0x48, 0x27, 0x25, 0x22, 0xe2, 0x88, 0x4c, 0x87, 0x5e, 0x58, 0x7b, 0xd2, /* Byte value: 0x2b */ + 0x5a, 0x44, 0x63, 0xd6, 0xaa, 0xe3, 0x86, 0xfa, 0x3e, 0x6e, 0x60, 0x45, 0xab, 0x04, 0x2d, 0x0f, /* Byte value: 0x2c */ + 0x0d, 0x4f, 0x96, 0xe0, 0x58, 0xee, 0xd3, 0x6b, 0x5c, 0x6f, 0x22, 0x23, 0x34, 0x73, 0xe7, 0x21, /* Byte value: 0x2d */ + 0xfa, 0x5e, 0xfe, 0x34, 0x93, 0xa6, 0x13, 0xb4, 0xb2, 0x95, 0x3a, 0xa3, 0x6e, 0x72, 0x7d, 0x52, /* Byte value: 0x2e */ + 0xc7, 0xab, 0x0d, 0xfb, 0x21, 0x09, 0x18, 0xc2, 0x6d, 0x8e, 0x03, 0x10, 0x9a, 0xa9, 0x82, 0x36, /* Byte value: 0x2f */ + 0x65, 0x72, 0xac, 0xec, 0xdd, 0x92, 0x84, 0xb5, 0xf9, 0x91, 0xf1, 0xf8, 0x57, 0x6d, 0xd3, 0xea, /* Byte value: 0x30 */ + 0x5f, 0x81, 0x05, 0x64, 0x60, 0xf3, 0x71, 0x75, 0x02, 0x17, 0xa7, 0x5e, 0xbf, 0xfa, 0xce, 0x6f, /* Byte value: 0x31 */ + 0xd2, 0xb9, 0x48, 0xed, 0x0c, 0x26, 0xa7, 0x46, 0x91, 0xdb, 0xcd, 0x7b, 0xce, 0x8e, 0x69, 0xd4, /* Byte value: 0x32 */ + 0xf0, 0x17, 0x32, 0x93, 0xc4, 0x86, 0x3e, 0x69, 0xca, 0x67, 0x77, 0x95, 0x46, 0x4d, 0x78, 0x92, /* Byte value: 0x33 */ + 0x94, 0xe5, 0x80, 0xe4, 0x9a, 0x7b, 0x5f, 0x21, 0x3f, 0x84, 0xd2, 0x6a, 0x15, 0x79, 0x4a, 0xd9, /* Byte value: 0x34 */ + 0x43, 0x99, 0xae, 0xbb, 0x5c, 0x4d, 0x0f, 0xe8, 0x92, 0x26, 0xd8, 0x0a, 0xcf, 0x09, 0xc0, 0x6d, /* Byte value: 0x35 */ + 0x44, 0x9f, 0xf4, 0xfc, 0x53, 0x83, 0xf1, 0x5e, 0xb6, 0xbb, 0xb7, 0x1f, 0xd3, 0x45, 0x22, 0x8c, /* Byte value: 0x36 */ + 0x9e, 0xac, 0x4c, 0x43, 0xcd, 0x5b, 0x72, 0xfc, 0x47, 0x76, 0x9f, 0x5c, 0x3d, 0x46, 0x4f, 0x19, /* Byte value: 0x37 */ + 0xe9, 0xca, 0xff, 0xfe, 0x32, 0x28, 0xb7, 0x7b, 0x66, 0x2f, 0xcf, 0xda, 0x22, 0x40, 0x95, 0xf0, /* Byte value: 0x38 */ + 0xb2, 0x0e, 0x82, 0xb3, 0x1b, 0xa4, 0xd4, 0x7c, 0x54, 0x33, 0xfb, 0x98, 0x8d, 0x1d, 0x59, 0x5e, /* Byte value: 0x39 */ + 0x2a, 0x24, 0x8a, 0x2c, 0x5a, 0x5e, 0xbd, 0xcb, 0x3b, 0xaa, 0x5f, 0xd6, 0xa8, 0x4e, 0x15, 0x07, /* Byte value: 0x3a */ + 0x13, 0x94, 0x01, 0xca, 0xa1, 0x8e, 0xa4, 0xcf, 0xd4, 0xba, 0xf5, 0x79, 0x4c, 0x32, 0xe8, 0xa2, /* Byte value: 0x3b */ + 0x37, 0xbc, 0x3f, 0x68, 0xe5, 0x8f, 0x26, 0xab, 0xa7, 0xe9, 0x74, 0x85, 0xdc, 0xe4, 0xfa, 0xa4, /* Byte value: 0x3c */ + 0x1c, 0x18, 0xab, 0xdf, 0x3c, 0xbe, 0x7e, 0x9d, 0x90, 0x31, 0x7f, 0x54, 0x70, 0xf3, 0x0e, 0x02, /* Byte value: 0x3d */ + 0xb4, 0x88, 0xc6, 0x6f, 0x97, 0x05, 0xcf, 0x37, 0x7c, 0xdc, 0xc0, 0x8a, 0x95, 0x08, 0x5a, 0x1e, /* Byte value: 0x3e */ + 0x4b, 0x13, 0x5e, 0xe9, 0xce, 0xb3, 0x2b, 0x0c, 0xf2, 0x30, 0x3d, 0x32, 0xef, 0x84, 0xc4, 0x2c, /* Byte value: 0x3f */ + 0x7f, 0xec, 0x43, 0xef, 0x6d, 0x8d, 0xe1, 0x63, 0x41, 0x4f, 0xb5, 0xbe, 0x3f, 0x8b, 0xde, 0xa8, /* Byte value: 0x40 */ + 0x78, 0xea, 0x19, 0xa8, 0x62, 0x43, 0x1f, 0xd5, 0x65, 0xd2, 0xda, 0xab, 0x23, 0xc7, 0x3c, 0x49, /* Byte value: 0x41 */ + 0xcc, 0x62, 0xdf, 0xc7, 0xf5, 0x46, 0xd0, 0xe2, 0x19, 0x0e, 0x1a, 0x21, 0xb6, 0xcf, 0x66, 0x57, /* Byte value: 0x42 */ + 0x81, 0xf7, 0xc5, 0xf2, 0xb7, 0x54, 0xe0, 0xa5, 0xc3, 0xd1, 0x1c, 0x01, 0x41, 0x5e, 0xa1, 0x3b, /* Byte value: 0x43 */ + 0xac, 0xd5, 0x15, 0x99, 0xe2, 0xc4, 0xa3, 0xd8, 0xdc, 0xe6, 0x2c, 0xc2, 0xf5, 0x5c, 0x56, 0xdd, /* Byte value: 0x44 */ + 0x98, 0x2a, 0x08, 0x9f, 0x41, 0xfa, 0x69, 0xb7, 0x6f, 0x99, 0xa4, 0x4e, 0x25, 0x53, 0x4c, 0x59, /* Byte value: 0x45 */ + 0x56, 0x8b, 0xeb, 0xad, 0x71, 0x62, 0xb0, 0x6c, 0x6e, 0x73, 0x16, 0x61, 0x9b, 0x2e, 0x2b, 0x8f, /* Byte value: 0x46 */ + 0x1e, 0xdb, 0x97, 0x2a, 0xf9, 0x60, 0x77, 0xa4, 0x88, 0xd5, 0xd7, 0x5a, 0x78, 0x41, 0x0f, 0x83, /* Byte value: 0x47 */ + 0x30, 0xba, 0x65, 0x2f, 0xea, 0x41, 0xd8, 0x1d, 0x83, 0x74, 0x1b, 0x90, 0xc0, 0xa8, 0x18, 0x45, /* Byte value: 0x48 */ + 0x14, 0x92, 0x5b, 0x8d, 0xae, 0x40, 0x5a, 0x79, 0xf0, 0x27, 0x9a, 0x6c, 0x50, 0x7e, 0x0a, 0x43, /* Byte value: 0x49 */ + 0xc5, 0x68, 0x31, 0x0e, 0xe4, 0xd7, 0x11, 0xfb, 0x75, 0x6a, 0xab, 0x1e, 0x92, 0x1b, 0x83, 0xb7, /* Byte value: 0x4a */ + 0x49, 0xd0, 0x62, 0x1c, 0x0b, 0x6d, 0x22, 0x35, 0xea, 0xd4, 0x95, 0x3c, 0xe7, 0x36, 0xc5, 0xad, /* Byte value: 0x4b */ + 0xb0, 0xcd, 0xbe, 0x46, 0xde, 0x7a, 0xdd, 0x45, 0x4c, 0xd7, 0x53, 0x96, 0x85, 0xaf, 0x58, 0xdf, /* Byte value: 0x4c */ + 0x70, 0x60, 0xe9, 0xfa, 0xf0, 0xbd, 0x3b, 0x31, 0x05, 0xc4, 0x3f, 0x93, 0x03, 0x4a, 0x38, 0x08, /* Byte value: 0x4d */ + 0x0b, 0xc9, 0xd2, 0x3c, 0xd4, 0x4f, 0xc8, 0x20, 0x74, 0x80, 0x19, 0x31, 0x2c, 0x66, 0xe4, 0x61, /* Byte value: 0x4e */ + 0xa6, 0x9c, 0xd9, 0x3e, 0xb5, 0xe4, 0x8e, 0x05, 0xa4, 0x14, 0x61, 0xf4, 0xdd, 0x63, 0x53, 0x1d, /* Byte value: 0x4f */ + 0xaf, 0x96, 0x37, 0xf7, 0xa4, 0x75, 0x4f, 0x1c, 0xc8, 0x70, 0xd0, 0xcb, 0xf9, 0xb7, 0xb6, 0xfd, /* Byte value: 0x50 */ + 0xa1, 0x9a, 0x83, 0x79, 0xba, 0x2a, 0x70, 0xb3, 0x80, 0x89, 0x0e, 0xe1, 0xc1, 0x2f, 0xb1, 0xfc, /* Byte value: 0x51 */ + 0x17, 0xd1, 0x79, 0xe3, 0xe8, 0xf1, 0xb6, 0xbd, 0xe4, 0xb1, 0x66, 0x65, 0x5c, 0x95, 0xea, 0x63, /* Byte value: 0x52 */ + 0xf5, 0xd2, 0x54, 0x21, 0x0e, 0x96, 0xc9, 0xe6, 0xf6, 0x1e, 0xb0, 0x8e, 0x52, 0xb3, 0x9b, 0xf2, /* Byte value: 0x53 */ + 0xfd, 0x58, 0xa4, 0x73, 0x9c, 0x68, 0xed, 0x02, 0x96, 0x08, 0x55, 0xb6, 0x72, 0x3e, 0x9f, 0xb3, /* Byte value: 0x54 */ + 0x3c, 0x75, 0xed, 0x54, 0x31, 0xc0, 0xee, 0x8b, 0xd3, 0x69, 0x6d, 0xb4, 0xf0, 0x82, 0x1e, 0xc5, /* Byte value: 0x55 */ + 0xca, 0xe4, 0x9b, 0x1b, 0x79, 0xe7, 0xcb, 0xa9, 0x31, 0xe1, 0x21, 0x33, 0xae, 0xda, 0x65, 0x17, /* Byte value: 0x56 */ + 0xa2, 0xd9, 0xa1, 0x17, 0xfc, 0x9b, 0x9c, 0x77, 0x94, 0x1f, 0xf2, 0xe8, 0xcd, 0xc4, 0x51, 0xdc, /* Byte value: 0x57 */ + 0x4a, 0x93, 0x40, 0x72, 0x4d, 0xdc, 0xce, 0xf1, 0xfe, 0x42, 0x69, 0x35, 0xeb, 0xdd, 0x25, 0x8d, /* Byte value: 0x58 */ + 0x0c, 0xcf, 0x88, 0x7b, 0xdb, 0x81, 0x36, 0x96, 0x50, 0x1d, 0x76, 0x24, 0x30, 0x2a, 0x06, 0x80, /* Byte value: 0x59 */ + 0x18, 0x5d, 0xd3, 0xf6, 0x75, 0xc1, 0x6c, 0xef, 0xa0, 0x3a, 0xec, 0x48, 0x60, 0x54, 0x0c, 0xc3, /* Byte value: 0x5a */ + 0xc3, 0xee, 0x75, 0xd2, 0x68, 0x76, 0x0a, 0xb0, 0x5d, 0x85, 0x90, 0x0c, 0x8a, 0x0e, 0x80, 0xf7, /* Byte value: 0x5b */ + 0x47, 0xdc, 0xd6, 0x92, 0x15, 0x32, 0x1d, 0x9a, 0xa2, 0x2d, 0x4b, 0x16, 0xdf, 0xae, 0xc2, 0xac, /* Byte value: 0x5c */ + 0x8f, 0xfb, 0x71, 0x7c, 0xa9, 0x0b, 0xdf, 0x0a, 0x8b, 0x28, 0xc2, 0x2b, 0x79, 0xc6, 0xa6, 0x3a, /* Byte value: 0x5d */ + 0xf2, 0xd4, 0x0e, 0x66, 0x01, 0x58, 0x37, 0x50, 0xd2, 0x83, 0xdf, 0x9b, 0x4e, 0xff, 0x79, 0x13, /* Byte value: 0x5e */ + 0xe0, 0xc0, 0x11, 0x37, 0x23, 0xb9, 0x76, 0x62, 0x0a, 0x4b, 0x7e, 0xe5, 0x06, 0x94, 0x70, 0x10, /* Byte value: 0x5f */ + 0x3d, 0xf5, 0xf3, 0xcf, 0xb2, 0xaf, 0x0b, 0x76, 0xdf, 0x1b, 0x39, 0xb3, 0xf4, 0xdb, 0xff, 0x64, /* Byte value: 0x60 */ + 0xaa, 0x53, 0x51, 0x45, 0x6e, 0x65, 0xb8, 0x93, 0xf4, 0x09, 0x17, 0xd0, 0xed, 0x49, 0x55, 0x9d, /* Byte value: 0x61 */ + 0x57, 0x0b, 0xf5, 0x36, 0xf2, 0x0d, 0x55, 0x91, 0x62, 0x01, 0x42, 0x66, 0x9f, 0x77, 0xca, 0x2e, /* Byte value: 0x62 */ + 0x87, 0x71, 0x81, 0x2e, 0x3b, 0xf5, 0xfb, 0xee, 0xeb, 0x3e, 0x27, 0x13, 0x59, 0x4b, 0xa2, 0x7b, /* Byte value: 0x63 */ + 0xb6, 0x4b, 0xfa, 0x9a, 0x52, 0xdb, 0xc6, 0x0e, 0x64, 0x38, 0x68, 0x84, 0x9d, 0xba, 0x5b, 0x9f, /* Byte value: 0x64 */ + 0xe3, 0x83, 0x33, 0x59, 0x65, 0x08, 0x9a, 0xa6, 0x1e, 0xdd, 0x82, 0xec, 0x0a, 0x7f, 0x90, 0x30, /* Byte value: 0x65 */ + 0x23, 0x2e, 0x64, 0xe5, 0x4b, 0xcf, 0x7c, 0xd2, 0x57, 0xce, 0xee, 0xe9, 0x8c, 0x9a, 0xf0, 0xe7, /* Byte value: 0x66 */ + 0x52, 0xce, 0x93, 0x84, 0x38, 0x1d, 0xa2, 0x1e, 0x5e, 0x78, 0x85, 0x7d, 0x8b, 0x89, 0x29, 0x4e, /* Byte value: 0x67 */ + 0x8e, 0x7b, 0x6f, 0xe7, 0x2a, 0x64, 0x3a, 0xf7, 0x87, 0x5a, 0x96, 0x2c, 0x7d, 0x9f, 0x47, 0x9b, /* Byte value: 0x68 */ + 0xdd, 0x35, 0xe2, 0xf8, 0x91, 0x16, 0x7d, 0x14, 0xd5, 0x50, 0x47, 0x56, 0xf2, 0x4f, 0x8f, 0x74, /* Byte value: 0x69 */ + 0x2c, 0xa2, 0xce, 0xf0, 0xd6, 0xff, 0xa6, 0x80, 0x13, 0x45, 0x64, 0xc4, 0xb0, 0x5b, 0x16, 0x47, /* Byte value: 0x6a */ + 0x50, 0x0d, 0xaf, 0x71, 0xfd, 0xc3, 0xab, 0x27, 0x46, 0x9c, 0x2d, 0x73, 0x83, 0x3b, 0x28, 0xcf, /* Byte value: 0x6b */ + 0xec, 0x0f, 0x99, 0x4c, 0xf8, 0x38, 0x40, 0xf4, 0x5a, 0x56, 0x08, 0xc1, 0x36, 0xbe, 0x76, 0x90, /* Byte value: 0x6c */ + 0x06, 0x86, 0x44, 0xdc, 0x8c, 0xa1, 0x1b, 0x4b, 0x28, 0xef, 0x3b, 0x12, 0x18, 0x15, 0x03, 0x40, /* Byte value: 0x6d */ + 0x91, 0x20, 0xe6, 0x56, 0x50, 0x6b, 0xa8, 0xae, 0x03, 0xfd, 0x15, 0x71, 0x01, 0x87, 0xa9, 0xb9, /* Byte value: 0x6e */ + 0xa3, 0x59, 0xbf, 0x8c, 0x7f, 0xf4, 0x79, 0x8a, 0x98, 0x6d, 0xa6, 0xef, 0xc9, 0x9d, 0xb0, 0x7d, /* Byte value: 0x6f */ + 0xff, 0x9b, 0x98, 0x86, 0x59, 0xb6, 0xe4, 0x3b, 0x8e, 0xec, 0xfd, 0xb8, 0x7a, 0x8c, 0x9e, 0x32, /* Byte value: 0x70 */ + 0x9c, 0x6f, 0x70, 0xb6, 0x08, 0x85, 0x7b, 0xc5, 0x5f, 0x92, 0x37, 0x52, 0x35, 0xf4, 0x4e, 0x98, /* Byte value: 0x71 */ + 0x2b, 0xa4, 0x94, 0xb7, 0xd9, 0x31, 0x58, 0x36, 0x37, 0xd8, 0x0b, 0xd1, 0xac, 0x17, 0xf4, 0xa6, /* Byte value: 0x72 */ + 0xc6, 0x2b, 0x13, 0x60, 0xa2, 0x66, 0xfd, 0x3f, 0x61, 0xfc, 0x57, 0x17, 0x9e, 0xf0, 0x63, 0x97, /* Byte value: 0x73 */ + 0x39, 0xb0, 0x8b, 0xe6, 0xfb, 0xd0, 0x19, 0x04, 0xef, 0x10, 0xaa, 0xaf, 0xe4, 0x7c, 0xfd, 0xa5, /* Byte value: 0x74 */ + 0x29, 0x67, 0xa8, 0x42, 0x1c, 0xef, 0x51, 0x0f, 0x2f, 0x3c, 0xa3, 0xdf, 0xa4, 0xa5, 0xf5, 0x27, /* Byte value: 0x75 */ + 0x5b, 0xc4, 0x7d, 0x4d, 0x29, 0x8c, 0x63, 0x07, 0x32, 0x1c, 0x34, 0x42, 0xaf, 0x5d, 0xcc, 0xae, /* Byte value: 0x76 */ + 0x90, 0xa0, 0xf8, 0xcd, 0xd3, 0x04, 0x4d, 0x53, 0x0f, 0x8f, 0x41, 0x76, 0x05, 0xde, 0x48, 0x18, /* Byte value: 0x77 */ + 0x58, 0x87, 0x5f, 0x23, 0x6f, 0x3d, 0x8f, 0xc3, 0x26, 0x8a, 0xc8, 0x4b, 0xa3, 0xb6, 0x2c, 0x8e, /* Byte value: 0x78 */ + 0xf1, 0x97, 0x2c, 0x08, 0x47, 0xe9, 0xdb, 0x94, 0xc6, 0x15, 0x23, 0x92, 0x42, 0x14, 0x99, 0x33, /* Byte value: 0x79 */ + 0xdf, 0xf6, 0xde, 0x0d, 0x54, 0xc8, 0x74, 0x2d, 0xcd, 0xb4, 0xef, 0x58, 0xfa, 0xfd, 0x8e, 0xf5, /* Byte value: 0x7a */ + 0x28, 0xe7, 0xb6, 0xd9, 0x9f, 0x80, 0xb4, 0xf2, 0x23, 0x4e, 0xf7, 0xd8, 0xa0, 0xfc, 0x14, 0x86, /* Byte value: 0x7b */ + 0x60, 0xb7, 0xca, 0x5e, 0x17, 0x82, 0x73, 0x3a, 0xc5, 0xe8, 0x36, 0xe3, 0x43, 0x93, 0x30, 0x8a, /* Byte value: 0x7c */ + 0x79, 0x6a, 0x07, 0x33, 0xe1, 0x2c, 0xfa, 0x28, 0x69, 0xa0, 0x8e, 0xac, 0x27, 0x9e, 0xdd, 0xe8, /* Byte value: 0x7d */ + 0x76, 0xe6, 0xad, 0x26, 0x7c, 0x1c, 0x20, 0x7a, 0x2d, 0x2b, 0x04, 0x81, 0x1b, 0x5f, 0x3b, 0x48, /* Byte value: 0x7e */ + 0x03, 0x43, 0x22, 0x6e, 0x46, 0xb1, 0xec, 0xc4, 0x14, 0x96, 0xfc, 0x09, 0x0c, 0xeb, 0xe0, 0x20, /* Byte value: 0x7f */ + 0xc8, 0x27, 0xa7, 0xee, 0xbc, 0x39, 0xc2, 0x90, 0x29, 0x05, 0x89, 0x3d, 0xa6, 0x68, 0x64, 0x96, /* Byte value: 0x80 */ + 0x02, 0xc3, 0x3c, 0xf5, 0xc5, 0xde, 0x09, 0x39, 0x18, 0xe4, 0xa8, 0x0e, 0x08, 0xb2, 0x01, 0x81, /* Byte value: 0x81 */ + 0x12, 0x14, 0x1f, 0x51, 0x22, 0xe1, 0x41, 0x32, 0xd8, 0xc8, 0xa1, 0x7e, 0x48, 0x6b, 0x09, 0x03, /* Byte value: 0x82 */ + 0xef, 0x4c, 0xbb, 0x22, 0xbe, 0x89, 0xac, 0x30, 0x4e, 0xc0, 0xf4, 0xc8, 0x3a, 0x55, 0x96, 0xb0, /* Byte value: 0x83 */ + 0x46, 0x5c, 0xc8, 0x09, 0x96, 0x5d, 0xf8, 0x67, 0xae, 0x5f, 0x1f, 0x11, 0xdb, 0xf7, 0x23, 0x0d, /* Byte value: 0x84 */ + 0x51, 0x8d, 0xb1, 0xea, 0x7e, 0xac, 0x4e, 0xda, 0x4a, 0xee, 0x79, 0x74, 0x87, 0x62, 0xc9, 0x6e, /* Byte value: 0x85 */ + 0xdb, 0xb3, 0xa6, 0x24, 0x1d, 0xb7, 0x66, 0x5f, 0xfd, 0xbf, 0x7c, 0x44, 0xea, 0x5a, 0x8c, 0x34, /* Byte value: 0x86 */ + 0x74, 0x25, 0x91, 0xd3, 0xb9, 0xc2, 0x29, 0x43, 0x35, 0xcf, 0xac, 0x8f, 0x13, 0xed, 0x3a, 0xc9, /* Byte value: 0x87 */ + 0x0f, 0x8c, 0xaa, 0x15, 0x9d, 0x30, 0xda, 0x52, 0x44, 0x8b, 0x8a, 0x2d, 0x3c, 0xc1, 0xe6, 0xa0, /* Byte value: 0x88 */ + 0xc1, 0x2d, 0x49, 0x27, 0xad, 0xa8, 0x03, 0x89, 0x45, 0x61, 0x38, 0x02, 0x82, 0xbc, 0x81, 0x76, /* Byte value: 0x89 */ + 0x8d, 0x38, 0x4d, 0x89, 0x6c, 0xd5, 0xd6, 0x33, 0x93, 0xcc, 0x6a, 0x25, 0x71, 0x74, 0xa7, 0xbb, /* Byte value: 0x8a */ + 0x68, 0x3d, 0x3a, 0x0c, 0x85, 0x7c, 0x57, 0xde, 0xa5, 0xfe, 0xd3, 0xdb, 0x63, 0x1e, 0x34, 0xcb, /* Byte value: 0x8b */ + 0xb7, 0xcb, 0xe4, 0x01, 0xd1, 0xb4, 0x23, 0xf3, 0x68, 0x4a, 0x3c, 0x83, 0x99, 0xe3, 0xba, 0x3e, /* Byte value: 0x8c */ + 0x0e, 0x0c, 0xb4, 0x8e, 0x1e, 0x5f, 0x3f, 0xaf, 0x48, 0xf9, 0xde, 0x2a, 0x38, 0x98, 0x07, 0x01, /* Byte value: 0x8d */ + 0x5d, 0x42, 0x39, 0x91, 0xa5, 0x2d, 0x78, 0x4c, 0x1a, 0xf3, 0x0f, 0x50, 0xb7, 0x48, 0xcf, 0xee, /* Byte value: 0x8e */ + 0xe2, 0x03, 0x2d, 0xc2, 0xe6, 0x67, 0x7f, 0x5b, 0x12, 0xaf, 0xd6, 0xeb, 0x0e, 0x26, 0x71, 0x91, /* Byte value: 0x8f */ + 0xc0, 0xad, 0x57, 0xbc, 0x2e, 0xc7, 0xe6, 0x74, 0x49, 0x13, 0x6c, 0x05, 0x86, 0xe5, 0x60, 0xd7, /* Byte value: 0x90 */ + 0x96, 0x26, 0xbc, 0x11, 0x5f, 0xa5, 0x56, 0x18, 0x27, 0x60, 0x7a, 0x64, 0x1d, 0xcb, 0x4b, 0x58, /* Byte value: 0x91 */ + 0xad, 0x55, 0x0b, 0x02, 0x61, 0xab, 0x46, 0x25, 0xd0, 0x94, 0x78, 0xc5, 0xf1, 0x05, 0xb7, 0x7c, /* Byte value: 0x92 */ + 0x01, 0x80, 0x1e, 0x9b, 0x83, 0x6f, 0xe5, 0xfd, 0x0c, 0x72, 0x54, 0x07, 0x04, 0x59, 0xe1, 0xa1, /* Byte value: 0x93 */ + 0x24, 0x28, 0x3e, 0xa2, 0x44, 0x01, 0x82, 0x64, 0x73, 0x53, 0x81, 0xfc, 0x90, 0xd6, 0x12, 0x06, /* Byte value: 0x94 */ + 0xe8, 0x4a, 0xe1, 0x65, 0xb1, 0x47, 0x52, 0x86, 0x6a, 0x5d, 0x9b, 0xdd, 0x26, 0x19, 0x74, 0x51, /* Byte value: 0x95 */ + 0x8c, 0xb8, 0x53, 0x12, 0xef, 0xba, 0x33, 0xce, 0x9f, 0xbe, 0x3e, 0x22, 0x75, 0x2d, 0x46, 0x1a, /* Byte value: 0x96 */ + 0xf3, 0x54, 0x10, 0xfd, 0x82, 0x37, 0xd2, 0xad, 0xde, 0xf1, 0x8b, 0x9c, 0x4a, 0xa6, 0x98, 0xb2, /* Byte value: 0x97 */ + 0xa7, 0x1c, 0xc7, 0xa5, 0x36, 0x8b, 0x6b, 0xf8, 0xa8, 0x66, 0x35, 0xf3, 0xd9, 0x3a, 0xb2, 0xbc, /* Byte value: 0x98 */ + 0x34, 0xff, 0x1d, 0x06, 0xa3, 0x3e, 0xca, 0x6f, 0xb3, 0x7f, 0x88, 0x8c, 0xd0, 0x0f, 0x1a, 0x84, /* Byte value: 0x99 */ + 0xe6, 0x46, 0x55, 0xeb, 0xaf, 0x18, 0x6d, 0x29, 0x22, 0xa4, 0x45, 0xf7, 0x1e, 0x81, 0x73, 0x50, /* Byte value: 0x9a */ + 0x48, 0x50, 0x7c, 0x87, 0x88, 0x02, 0xc7, 0xc8, 0xe6, 0xa6, 0xc1, 0x3b, 0xe3, 0x6f, 0x24, 0x0c, /* Byte value: 0x9b */ + 0xba, 0x84, 0x72, 0xe1, 0x89, 0x5a, 0xf0, 0x98, 0x34, 0x25, 0x1e, 0xa0, 0xad, 0x90, 0x5d, 0x1f, /* Byte value: 0x9c */ + 0x07, 0x06, 0x5a, 0x47, 0x0f, 0xce, 0xfe, 0xb6, 0x24, 0x9d, 0x6f, 0x15, 0x1c, 0x4c, 0xe2, 0xe1, /* Byte value: 0x9d */ + 0xfc, 0xd8, 0xba, 0xe8, 0x1f, 0x07, 0x08, 0xff, 0x9a, 0x7a, 0x01, 0xb1, 0x76, 0x67, 0x7e, 0x12, /* Byte value: 0x9e */ + 0x4d, 0x95, 0x1a, 0x35, 0x42, 0x12, 0x30, 0x47, 0xda, 0xdf, 0x06, 0x20, 0xf7, 0x91, 0xc7, 0x6c, /* Byte value: 0x9f */ + 0x19, 0xdd, 0xcd, 0x6d, 0xf6, 0xae, 0x89, 0x12, 0xac, 0x48, 0xb8, 0x4f, 0x64, 0x0d, 0xed, 0x62, /* Byte value: 0xa0 */ + 0x42, 0x19, 0xb0, 0x20, 0xdf, 0x22, 0xea, 0x15, 0x9e, 0x54, 0x8c, 0x0d, 0xcb, 0x50, 0x21, 0xcc, /* Byte value: 0xa1 */ + 0x75, 0xa5, 0x8f, 0x48, 0x3a, 0xad, 0xcc, 0xbe, 0x39, 0xbd, 0xf8, 0x88, 0x17, 0xb4, 0xdb, 0x68, /* Byte value: 0xa2 */ + 0x4c, 0x15, 0x04, 0xae, 0xc1, 0x7d, 0xd5, 0xba, 0xd6, 0xad, 0x52, 0x27, 0xf3, 0xc8, 0x26, 0xcd, /* Byte value: 0xa3 */ + 0xa9, 0x10, 0x73, 0x2b, 0x28, 0xd4, 0x54, 0x57, 0xe0, 0x9f, 0xeb, 0xd9, 0xe1, 0xa2, 0xb5, 0xbd, /* Byte value: 0xa4 */ + 0x82, 0xb4, 0xe7, 0x9c, 0xf1, 0xe5, 0x0c, 0x61, 0xd7, 0x47, 0xe0, 0x08, 0x4d, 0xb5, 0x41, 0x1b, /* Byte value: 0xa5 */ + 0xf7, 0x11, 0x68, 0xd4, 0xcb, 0x48, 0xc0, 0xdf, 0xee, 0xfa, 0x18, 0x80, 0x5a, 0x01, 0x9a, 0x73, /* Byte value: 0xa6 */ + 0x08, 0x8a, 0xf0, 0x52, 0x92, 0xfe, 0x24, 0xe4, 0x60, 0x16, 0xe5, 0x38, 0x20, 0x8d, 0x04, 0x41, /* Byte value: 0xa7 */ + 0x4f, 0x56, 0x26, 0xc0, 0x87, 0xcc, 0x39, 0x7e, 0xc2, 0x3b, 0xae, 0x2e, 0xff, 0x23, 0xc6, 0xed, /* Byte value: 0xa8 */ + 0x10, 0xd7, 0x23, 0xa4, 0xe7, 0x3f, 0x48, 0x0b, 0xc0, 0x2c, 0x09, 0x70, 0x40, 0xd9, 0x08, 0x82, /* Byte value: 0xa9 */ + 0x3b, 0x73, 0xb7, 0x13, 0x3e, 0x0e, 0x10, 0x3d, 0xf7, 0xf4, 0x02, 0xa1, 0xec, 0xce, 0xfc, 0x24, /* Byte value: 0xaa */ + 0xcb, 0x64, 0x85, 0x80, 0xfa, 0x88, 0x2e, 0x54, 0x3d, 0x93, 0x75, 0x34, 0xaa, 0x83, 0x84, 0xb6, /* Byte value: 0xab */ + 0x20, 0x6d, 0x46, 0x8b, 0x0d, 0x7e, 0x90, 0x16, 0x43, 0x58, 0x12, 0xe0, 0x80, 0x71, 0x10, 0xc7, /* Byte value: 0xac */ + 0x63, 0xf4, 0xe8, 0x30, 0x51, 0x33, 0x9f, 0xfe, 0xd1, 0x7e, 0xca, 0xea, 0x4f, 0x78, 0xd0, 0xaa, /* Byte value: 0xad */ + 0x73, 0x23, 0xcb, 0x94, 0xb6, 0x0c, 0xd7, 0xf5, 0x11, 0x52, 0xc3, 0x9a, 0x0f, 0xa1, 0xd8, 0x28, /* Byte value: 0xae */ + 0xed, 0x8f, 0x87, 0xd7, 0x7b, 0x57, 0xa5, 0x09, 0x56, 0x24, 0x5c, 0xc6, 0x32, 0xe7, 0x97, 0x31, /* Byte value: 0xaf */ + 0xea, 0x89, 0xdd, 0x90, 0x74, 0x99, 0x5b, 0xbf, 0x72, 0xb9, 0x33, 0xd3, 0x2e, 0xab, 0x75, 0xd0, /* Byte value: 0xb0 */ + 0xc9, 0xa7, 0xb9, 0x75, 0x3f, 0x56, 0x27, 0x6d, 0x25, 0x77, 0xdd, 0x3a, 0xa2, 0x31, 0x85, 0x37, /* Byte value: 0xb1 */ + 0x32, 0x79, 0x59, 0xda, 0x2f, 0x9f, 0xd1, 0x24, 0x9b, 0x90, 0xb3, 0x9e, 0xc8, 0x1a, 0x19, 0xc4, /* Byte value: 0xb2 */ + 0x84, 0x32, 0xa3, 0x40, 0x7d, 0x44, 0x17, 0x2a, 0xff, 0xa8, 0xdb, 0x1a, 0x55, 0xa0, 0x42, 0x5b, /* Byte value: 0xb3 */ + 0x53, 0x4e, 0x8d, 0x1f, 0xbb, 0x72, 0x47, 0xe3, 0x52, 0x0a, 0xd1, 0x7a, 0x8f, 0xd0, 0xc8, 0xef, /* Byte value: 0xb4 */ + 0x04, 0x45, 0x78, 0x29, 0x49, 0x7f, 0x12, 0x72, 0x30, 0x0b, 0x93, 0x1c, 0x10, 0xa7, 0x02, 0xc1, /* Byte value: 0xb5 */ + 0x7c, 0xaf, 0x61, 0x81, 0x2b, 0x3c, 0x0d, 0xa7, 0x55, 0xd9, 0x49, 0xb7, 0x33, 0x60, 0x3e, 0x88, /* Byte value: 0xb6 */ + 0x41, 0x5a, 0x92, 0x4e, 0x99, 0x93, 0x06, 0xd1, 0x8a, 0xc2, 0x70, 0x04, 0xc7, 0xbb, 0xc1, 0xec, /* Byte value: 0xb7 */ + 0x27, 0x6b, 0x1c, 0xcc, 0x02, 0xb0, 0x6e, 0xa0, 0x67, 0xc5, 0x7d, 0xf5, 0x9c, 0x3d, 0xf2, 0x26, /* Byte value: 0xb8 */ + 0x55, 0xc8, 0xc9, 0xc3, 0x37, 0xd3, 0x5c, 0xa8, 0x7a, 0xe5, 0xea, 0x68, 0x97, 0xc5, 0xcb, 0xaf, /* Byte value: 0xb9 */ + 0xcf, 0x21, 0xfd, 0xa9, 0xb3, 0xf7, 0x3c, 0x26, 0x0d, 0x98, 0xe6, 0x28, 0xba, 0x24, 0x86, 0x77, /* Byte value: 0xba */ + 0x71, 0xe0, 0xf7, 0x61, 0x73, 0xd2, 0xde, 0xcc, 0x09, 0xb6, 0x6b, 0x94, 0x07, 0x13, 0xd9, 0xa9, /* Byte value: 0xbb */ + 0x11, 0x57, 0x3d, 0x3f, 0x64, 0x50, 0xad, 0xf6, 0xcc, 0x5e, 0x5d, 0x77, 0x44, 0x80, 0xe9, 0x23, /* Byte value: 0xbc */ + 0x97, 0xa6, 0xa2, 0x8a, 0xdc, 0xca, 0xb3, 0xe5, 0x2b, 0x12, 0x2e, 0x63, 0x19, 0x92, 0xaa, 0xf9, /* Byte value: 0xbd */ + 0xd9, 0x70, 0x9a, 0xd1, 0xd8, 0x69, 0x6f, 0x66, 0xe5, 0x5b, 0xd4, 0x4a, 0xe2, 0xe8, 0x8d, 0xb5, /* Byte value: 0xbe */ + 0xd0, 0x7a, 0x74, 0x18, 0xc9, 0xf8, 0xae, 0x7f, 0x89, 0x3f, 0x65, 0x75, 0xc6, 0x3c, 0x68, 0x55, /* Byte value: 0xbf */ + 0xa8, 0x90, 0x6d, 0xb0, 0xab, 0xbb, 0xb1, 0xaa, 0xec, 0xed, 0xbf, 0xde, 0xe5, 0xfb, 0x54, 0x1c, /* Byte value: 0xc0 */ + 0x1b, 0x1e, 0xf1, 0x98, 0x33, 0x70, 0x80, 0x2b, 0xb4, 0xac, 0x10, 0x41, 0x6c, 0xbf, 0xec, 0xe3, /* Byte value: 0xc1 */ + 0x16, 0x51, 0x67, 0x78, 0x6b, 0x9e, 0x53, 0x40, 0xe8, 0xc3, 0x32, 0x62, 0x58, 0xcc, 0x0b, 0xc2, /* Byte value: 0xc2 */ + 0x6c, 0x78, 0x42, 0x25, 0xcc, 0x03, 0x45, 0xac, 0x95, 0xf5, 0x40, 0xc7, 0x73, 0xb9, 0x36, 0x0a, /* Byte value: 0xc3 */ + 0x2f, 0xe1, 0xec, 0x9e, 0x90, 0x4e, 0x4a, 0x44, 0x07, 0xd3, 0x98, 0xcd, 0xbc, 0xb0, 0xf6, 0x67, /* Byte value: 0xc4 */ + 0x45, 0x1f, 0xea, 0x67, 0xd0, 0xec, 0x14, 0xa3, 0xba, 0xc9, 0xe3, 0x18, 0xd7, 0x1c, 0xc3, 0x2d, /* Byte value: 0xc5 */ + 0x33, 0xf9, 0x47, 0x41, 0xac, 0xf0, 0x34, 0xd9, 0x97, 0xe2, 0xe7, 0x99, 0xcc, 0x43, 0xf8, 0x65, /* Byte value: 0xc6 */ + 0x1d, 0x98, 0xb5, 0x44, 0xbf, 0xd1, 0x9b, 0x60, 0x9c, 0x43, 0x2b, 0x53, 0x74, 0xaa, 0xef, 0xa3, /* Byte value: 0xc7 */ + 0xfe, 0x1b, 0x86, 0x1d, 0xda, 0xd9, 0x01, 0xc6, 0x82, 0x9e, 0xa9, 0xbf, 0x7e, 0xd5, 0x7f, 0x93, /* Byte value: 0xc8 */ + 0x7a, 0x29, 0x25, 0x5d, 0xa7, 0x9d, 0x16, 0xec, 0x7d, 0x36, 0x72, 0xa5, 0x2b, 0x75, 0x3d, 0xc8, /* Byte value: 0xc9 */ + 0x64, 0xf2, 0xb2, 0x77, 0x5e, 0xfd, 0x61, 0x48, 0xf5, 0xe3, 0xa5, 0xff, 0x53, 0x34, 0x32, 0x4b, /* Byte value: 0xca */ + 0xb3, 0x8e, 0x9c, 0x28, 0x98, 0xcb, 0x31, 0x81, 0x58, 0x41, 0xaf, 0x9f, 0x89, 0x44, 0xb8, 0xff, /* Byte value: 0xcb */ + 0x1f, 0x5b, 0x89, 0xb1, 0x7a, 0x0f, 0x92, 0x59, 0x84, 0xa7, 0x83, 0x5d, 0x7c, 0x18, 0xee, 0x22, /* Byte value: 0xcc */ + 0x2e, 0x61, 0xf2, 0x05, 0x13, 0x21, 0xaf, 0xb9, 0x0b, 0xa1, 0xcc, 0xca, 0xb8, 0xe9, 0x17, 0xc6, /* Byte value: 0xcd */ + 0xe4, 0x85, 0x69, 0x1e, 0x6a, 0xc6, 0x64, 0x10, 0x3a, 0x40, 0xed, 0xf9, 0x16, 0x33, 0x72, 0xd1, /* Byte value: 0xce */ + 0x6a, 0xfe, 0x06, 0xf9, 0x40, 0xa2, 0x5e, 0xe7, 0xbd, 0x1a, 0x7b, 0xd5, 0x6b, 0xac, 0x35, 0x4a, /* Byte value: 0xcf */ + 0x7d, 0x2f, 0x7f, 0x1a, 0xa8, 0x53, 0xe8, 0x5a, 0x59, 0xab, 0x1d, 0xb0, 0x37, 0x39, 0xdf, 0x29, /* Byte value: 0xd0 */ + 0xd8, 0xf0, 0x84, 0x4a, 0x5b, 0x06, 0x8a, 0x9b, 0xe9, 0x29, 0x80, 0x4d, 0xe6, 0xb1, 0x6c, 0x14, /* Byte value: 0xd1 */ + 0xc2, 0x6e, 0x6b, 0x49, 0xeb, 0x19, 0xef, 0x4d, 0x51, 0xf7, 0xc4, 0x0b, 0x8e, 0x57, 0x61, 0x56, /* Byte value: 0xd2 */ + 0x36, 0x3c, 0x21, 0xf3, 0x66, 0xe0, 0xc3, 0x56, 0xab, 0x9b, 0x20, 0x82, 0xd8, 0xbd, 0x1b, 0x05, /* Byte value: 0xd3 */ + 0xf8, 0x9d, 0xc2, 0xc1, 0x56, 0x78, 0x1a, 0x8d, 0xaa, 0x71, 0x92, 0xad, 0x66, 0xc0, 0x7c, 0xd3, /* Byte value: 0xd4 */ + 0x26, 0xeb, 0x02, 0x57, 0x81, 0xdf, 0x8b, 0x5d, 0x6b, 0xb7, 0x29, 0xf2, 0x98, 0x64, 0x13, 0x87, /* Byte value: 0xd5 */ + 0x3f, 0x36, 0xcf, 0x3a, 0x77, 0x71, 0x02, 0x4f, 0xc7, 0xff, 0x91, 0xbd, 0xfc, 0x69, 0xfe, 0xe5, /* Byte value: 0xd6 */ + 0x0a, 0x49, 0xcc, 0xa7, 0x57, 0x20, 0x2d, 0xdd, 0x78, 0xf2, 0x4d, 0x36, 0x28, 0x3f, 0x05, 0xc0, /* Byte value: 0xd7 */ + 0x9f, 0x2c, 0x52, 0xd8, 0x4e, 0x34, 0x97, 0x01, 0x4b, 0x04, 0xcb, 0x5b, 0x39, 0x1f, 0xae, 0xb8, /* Byte value: 0xd8 */ + 0xf4, 0x52, 0x4a, 0xba, 0x8d, 0xf9, 0x2c, 0x1b, 0xfa, 0x6c, 0xe4, 0x89, 0x56, 0xea, 0x7a, 0x53, /* Byte value: 0xd9 */ + 0x1a, 0x9e, 0xef, 0x03, 0xb0, 0x1f, 0x65, 0xd6, 0xb8, 0xde, 0x44, 0x46, 0x68, 0xe6, 0x0d, 0x42, /* Byte value: 0xda */ + 0xa5, 0xdf, 0xfb, 0x50, 0xf3, 0x55, 0x62, 0xc1, 0xb0, 0x82, 0x9d, 0xfd, 0xd1, 0x88, 0xb3, 0x3d, /* Byte value: 0xdb */ + 0x61, 0x37, 0xd4, 0xc5, 0x94, 0xed, 0x96, 0xc7, 0xc9, 0x9a, 0x62, 0xe4, 0x47, 0xca, 0xd1, 0x2b, /* Byte value: 0xdc */ + 0x35, 0x7f, 0x03, 0x9d, 0x20, 0x51, 0x2f, 0x92, 0xbf, 0x0d, 0xdc, 0x8b, 0xd4, 0x56, 0xfb, 0x25, /* Byte value: 0xdd */ + 0x7b, 0xa9, 0x3b, 0xc6, 0x24, 0xf2, 0xf3, 0x11, 0x71, 0x44, 0x26, 0xa2, 0x2f, 0x2c, 0xdc, 0x69, /* Byte value: 0xde */ + 0xde, 0x76, 0xc0, 0x96, 0xd7, 0xa7, 0x91, 0xd0, 0xc1, 0xc6, 0xbb, 0x5f, 0xfe, 0xa4, 0x6f, 0x54, /* Byte value: 0xdf */ + 0xb5, 0x08, 0xd8, 0xf4, 0x14, 0x6a, 0x2a, 0xca, 0x70, 0xae, 0x94, 0x8d, 0x91, 0x51, 0xbb, 0xbf, /* Byte value: 0xe0 */ + 0xda, 0x33, 0xb8, 0xbf, 0x9e, 0xd8, 0x83, 0xa2, 0xf1, 0xcd, 0x28, 0x43, 0xee, 0x03, 0x6d, 0x95, /* Byte value: 0xe1 */ + 0xbc, 0x02, 0x36, 0x3d, 0x05, 0xfb, 0xeb, 0xd3, 0x1c, 0xca, 0x25, 0xb2, 0xb5, 0x85, 0x5e, 0x5f, /* Byte value: 0xe2 */ + 0xd7, 0x7c, 0x2e, 0x5f, 0xc6, 0x36, 0x50, 0xc9, 0xad, 0xa2, 0x0a, 0x60, 0xda, 0x70, 0x8a, 0xb4, /* Byte value: 0xe3 */ + 0xab, 0xd3, 0x4f, 0xde, 0xed, 0x0a, 0x5d, 0x6e, 0xf8, 0x7b, 0x43, 0xd7, 0xe9, 0x10, 0xb4, 0x3c, /* Byte value: 0xe4 */ + 0x22, 0xae, 0x7a, 0x7e, 0xc8, 0xa0, 0x99, 0x2f, 0x5b, 0xbc, 0xba, 0xee, 0x88, 0xc3, 0x11, 0x46, /* Byte value: 0xe5 */ + 0x66, 0x31, 0x8e, 0x82, 0x9b, 0x23, 0x68, 0x71, 0xed, 0x07, 0x0d, 0xf1, 0x5b, 0x86, 0x33, 0xca, /* Byte value: 0xe6 */ + 0x3a, 0xf3, 0xa9, 0x88, 0xbd, 0x61, 0xf5, 0xc0, 0xfb, 0x86, 0x56, 0xa6, 0xe8, 0x97, 0x1d, 0x85, /* Byte value: 0xe7 */ + 0x9a, 0xe9, 0x34, 0x6a, 0x84, 0x24, 0x60, 0x8e, 0x77, 0x7d, 0x0c, 0x40, 0x2d, 0xe1, 0x4d, 0xd8, /* Byte value: 0xe8 */ + 0x6b, 0x7e, 0x18, 0x62, 0xc3, 0xcd, 0xbb, 0x1a, 0xb1, 0x68, 0x2f, 0xd2, 0x6f, 0xf5, 0xd4, 0xeb, /* Byte value: 0xe9 */ + 0x05, 0xc5, 0x66, 0xb2, 0xca, 0x10, 0xf7, 0x8f, 0x3c, 0x79, 0xc7, 0x1b, 0x14, 0xfe, 0xe3, 0x60, /* Byte value: 0xea */ + 0x6f, 0x3b, 0x60, 0x4b, 0x8a, 0xb2, 0xa9, 0x68, 0x81, 0x63, 0xbc, 0xce, 0x7f, 0x52, 0xd6, 0x2a, /* Byte value: 0xeb */ + 0x80, 0x77, 0xdb, 0x69, 0x34, 0x3b, 0x05, 0x58, 0xcf, 0xa3, 0x48, 0x06, 0x45, 0x07, 0x40, 0x9a, /* Byte value: 0xec */ + 0x5c, 0xc2, 0x27, 0x0a, 0x26, 0x42, 0x9d, 0xb1, 0x16, 0x81, 0x5b, 0x57, 0xb3, 0x11, 0x2e, 0x4f, /* Byte value: 0xed */ + 0xfb, 0xde, 0xe0, 0xaf, 0x10, 0xc9, 0xf6, 0x49, 0xbe, 0xe7, 0x6e, 0xa4, 0x6a, 0x2b, 0x9c, 0xf3, /* Byte value: 0xee */ + 0x89, 0x7d, 0x35, 0xa0, 0x25, 0xaa, 0xc4, 0x41, 0xa3, 0xc7, 0xf9, 0x39, 0x61, 0xd3, 0xa5, 0x7a, /* Byte value: 0xef */ + 0x5e, 0x01, 0x1b, 0xff, 0xe3, 0x9c, 0x94, 0x88, 0x0e, 0x65, 0xf3, 0x59, 0xbb, 0xa3, 0x2f, 0xce, /* Byte value: 0xf0 */ + 0x8a, 0x3e, 0x17, 0xce, 0x63, 0x1b, 0x28, 0x85, 0xb7, 0x51, 0x05, 0x30, 0x6d, 0x38, 0x45, 0x5a, /* Byte value: 0xf1 */ + 0xbb, 0x04, 0x6c, 0x7a, 0x0a, 0x35, 0x15, 0x65, 0x38, 0x57, 0x4a, 0xa7, 0xa9, 0xc9, 0xbc, 0xbe, /* Byte value: 0xf2 */ + 0x6d, 0xf8, 0x5c, 0xbe, 0x4f, 0x6c, 0xa0, 0x51, 0x99, 0x87, 0x14, 0xc0, 0x77, 0xe0, 0xd7, 0xab, /* Byte value: 0xf3 */ + 0x9d, 0xef, 0x6e, 0x2d, 0x8b, 0xea, 0x9e, 0x38, 0x53, 0xe0, 0x63, 0x55, 0x31, 0xad, 0xaf, 0x39, /* Byte value: 0xf4 */ + 0x25, 0xa8, 0x20, 0x39, 0xc7, 0x6e, 0x67, 0x99, 0x7f, 0x21, 0xd5, 0xfb, 0x94, 0x8f, 0xf3, 0xa7, /* Byte value: 0xf5 */ + 0xc4, 0xe8, 0x2f, 0x95, 0x67, 0xb8, 0xf4, 0x06, 0x79, 0x18, 0xff, 0x19, 0x96, 0x42, 0x62, 0x16, /* Byte value: 0xf6 */ + 0x15, 0x12, 0x45, 0x16, 0x2d, 0x2f, 0xbf, 0x84, 0xfc, 0x55, 0xce, 0x6b, 0x54, 0x27, 0xeb, 0xe2, /* Byte value: 0xf7 */ + 0x85, 0xb2, 0xbd, 0xdb, 0xfe, 0x2b, 0xf2, 0xd7, 0xf3, 0xda, 0x8f, 0x1d, 0x51, 0xf9, 0xa3, 0xfa, /* Byte value: 0xf8 */ + 0xd6, 0xfc, 0x30, 0xc4, 0x45, 0x59, 0xb5, 0x34, 0xa1, 0xd0, 0x5e, 0x67, 0xde, 0x29, 0x6b, 0x15, /* Byte value: 0xf9 */ + 0xe1, 0x40, 0x0f, 0xac, 0xa0, 0xd6, 0x93, 0x9f, 0x06, 0x39, 0x2a, 0xe2, 0x02, 0xcd, 0x91, 0xb1, /* Byte value: 0xfa */ + 0xd4, 0x3f, 0x0c, 0x31, 0x80, 0x87, 0xbc, 0x0d, 0xb9, 0x34, 0xf6, 0x69, 0xd6, 0x9b, 0x6a, 0x94, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0xd1, 0xfa, 0x6a, 0x83, 0x4a, 0x97, 0x4b, 0x82, 0x85, 0x4d, 0x31, 0x72, 0xc2, 0x65, 0x89, 0xf4, /* Byte value: 0xfd */ + 0x7e, 0x6c, 0x5d, 0x74, 0xee, 0xe2, 0x04, 0x9e, 0x4d, 0x3d, 0xe1, 0xb9, 0x3b, 0xd2, 0x3f, 0x09, /* Byte value: 0xfe */ + 0xb8, 0x47, 0x4e, 0x14, 0x4c, 0x84, 0xf9, 0xa1, 0x2c, 0xc1, 0xb6, 0xae, 0xa5, 0x22, 0x5c, 0x9e, /* Byte value: 0xff */ + + /* Matrix row: 9 */ + 0xa5, 0x55, 0xa4, 0x90, 0xc6, 0x8d, 0x2f, 0xd5, 0x71, 0x80, 0x04, 0x89, 0xcb, 0x72, 0x1b, 0x5d, /* Byte value: 0x00 */ + 0x2d, 0x90, 0x75, 0x4e, 0x36, 0xf9, 0x9f, 0x17, 0x62, 0x87, 0xa3, 0x5a, 0x48, 0x8a, 0xa4, 0x15, /* Byte value: 0x01 */ + 0x32, 0x9f, 0x4c, 0x80, 0x9d, 0x5f, 0xd4, 0xf3, 0xbf, 0x6c, 0x3b, 0x64, 0xae, 0x3d, 0x18, 0xe9, /* Byte value: 0x02 */ + 0x8f, 0x0b, 0x94, 0x6d, 0x4b, 0xb1, 0x7f, 0x15, 0x81, 0x1e, 0x6c, 0xdd, 0xe4, 0xac, 0x86, 0xd3, /* Byte value: 0x03 */ + 0x0e, 0x5f, 0x8a, 0xa5, 0xb5, 0x49, 0x5d, 0x6d, 0xe7, 0x32, 0x55, 0x1c, 0xce, 0xa8, 0x72, 0xf5, /* Byte value: 0x04 */ + 0x30, 0x41, 0xf8, 0xfa, 0x20, 0xc6, 0xcb, 0x66, 0x9e, 0x27, 0xa6, 0x60, 0xc1, 0x05, 0xc9, 0xce, /* Byte value: 0x05 */ + 0x38, 0xbf, 0x6d, 0xd1, 0x91, 0xe7, 0xb7, 0x77, 0x1a, 0xc8, 0x97, 0x70, 0xbe, 0xe5, 0x0b, 0x52, /* Byte value: 0x06 */ + 0xc0, 0xc7, 0x66, 0x6e, 0x80, 0x9e, 0xaa, 0x5b, 0x3d, 0x9c, 0xdd, 0x43, 0x82, 0x14, 0xa2, 0xbe, /* Byte value: 0x07 */ + 0x54, 0xbc, 0x60, 0x39, 0xd9, 0x78, 0xa0, 0x43, 0x23, 0xff, 0xd0, 0xa8, 0x5e, 0x7f, 0xf9, 0xdf, /* Byte value: 0x08 */ + 0xe6, 0x18, 0x68, 0x4c, 0x05, 0x72, 0xb8, 0x63, 0x0b, 0x7b, 0x7d, 0x0f, 0x0c, 0x5a, 0x9c, 0xe2, /* Byte value: 0x09 */ + 0x9e, 0x5b, 0x27, 0x06, 0x55, 0x5e, 0x69, 0x9c, 0xbb, 0xc7, 0xa1, 0xff, 0xcc, 0xb3, 0x48, 0xda, /* Byte value: 0x0a */ + 0x39, 0xd0, 0x37, 0xec, 0x2e, 0x4a, 0x59, 0xdc, 0xeb, 0x0c, 0x38, 0x72, 0x68, 0xf9, 0x82, 0xa0, /* Byte value: 0x0b */ + 0x55, 0xd3, 0x3a, 0x04, 0x66, 0xd5, 0x4e, 0xe8, 0xd2, 0x3b, 0x7f, 0xaa, 0x88, 0x63, 0x70, 0x2d, /* Byte value: 0x0c */ + 0x7e, 0xe2, 0x50, 0xc4, 0x54, 0x44, 0xf0, 0x83, 0xd3, 0x61, 0xb8, 0xfc, 0x71, 0xa1, 0x64, 0x51, /* Byte value: 0x0d */ + 0x52, 0x1d, 0x7f, 0xb7, 0xdd, 0x10, 0x81, 0x3f, 0x40, 0x22, 0xb4, 0xa4, 0xef, 0x37, 0x49, 0xb6, /* Byte value: 0x0e */ + 0x91, 0x6b, 0xf7, 0x9e, 0x5f, 0xba, 0xda, 0x5a, 0xad, 0x31, 0x5b, 0xe1, 0xd4, 0x07, 0xb3, 0xdd, /* Byte value: 0x0f */ + 0x64, 0xfd, 0x98, 0xc3, 0xf9, 0xbe, 0x6b, 0x25, 0xbd, 0xd8, 0x76, 0xc8, 0x9f, 0x7a, 0x30, 0x11, /* Byte value: 0x10 */ + 0x03, 0xb1, 0xee, 0x47, 0x02, 0x34, 0xf1, 0x3e, 0xd0, 0x8f, 0x32, 0x06, 0xb9, 0x24, 0x58, 0xd5, /* Byte value: 0x11 */ + 0x57, 0x0d, 0x8e, 0x7e, 0xdb, 0x4c, 0x51, 0x7d, 0xf3, 0x70, 0xe2, 0xae, 0xe7, 0x5b, 0xa1, 0x0a, /* Byte value: 0x12 */ + 0x5a, 0xe3, 0xea, 0x9c, 0x6c, 0x31, 0xfd, 0x2e, 0xc4, 0xcd, 0x85, 0xb4, 0x90, 0xd7, 0x8b, 0x2a, /* Byte value: 0x13 */ + 0x1c, 0xbe, 0xd7, 0x89, 0xa9, 0x92, 0xba, 0xda, 0x0d, 0x64, 0xaa, 0x38, 0x5f, 0x93, 0xe4, 0x29, /* Byte value: 0x14 */ + 0x60, 0x82, 0x33, 0x37, 0x40, 0x4f, 0x55, 0xcc, 0xff, 0x4e, 0x8f, 0xc0, 0x41, 0x0a, 0x51, 0x5f, /* Byte value: 0x15 */ + 0x07, 0xce, 0x45, 0xb3, 0xbb, 0xc5, 0xcf, 0xd7, 0x92, 0x19, 0xcb, 0x0e, 0x67, 0x54, 0x39, 0x9b, /* Byte value: 0x16 */ + 0x18, 0xc1, 0x7c, 0x7d, 0x10, 0x63, 0x84, 0x33, 0x4f, 0xf2, 0x53, 0x30, 0x81, 0xe3, 0x85, 0x67, /* Byte value: 0x17 */ + 0x21, 0x11, 0x4b, 0x91, 0x3e, 0x29, 0xdd, 0xef, 0xa4, 0xfe, 0x6b, 0x42, 0xe9, 0x1a, 0x07, 0xc7, /* Byte value: 0x18 */ + 0x72, 0x63, 0x6e, 0x1b, 0x5c, 0x94, 0xb2, 0x7b, 0x15, 0x18, 0x70, 0xe4, 0xd0, 0x31, 0xc7, 0x83, /* Byte value: 0x19 */ + 0xa8, 0xbb, 0xc0, 0x72, 0x71, 0xf0, 0x83, 0x86, 0x46, 0x3d, 0x63, 0x93, 0xbc, 0xfe, 0x31, 0x7d, /* Byte value: 0x1a */ + 0xd1, 0x97, 0xd5, 0x05, 0x9e, 0x71, 0xbc, 0xd2, 0x07, 0x45, 0x10, 0x61, 0xaa, 0x0b, 0x6c, 0xb7, /* Byte value: 0x1b */ + 0x29, 0xef, 0xde, 0xba, 0x8f, 0x08, 0xa1, 0xfe, 0x20, 0x11, 0x5a, 0x52, 0x96, 0xfa, 0xc5, 0x5b, /* Byte value: 0x1c */ + 0xc6, 0x66, 0x79, 0xe0, 0x84, 0xf6, 0x8b, 0x27, 0x5e, 0x41, 0xb9, 0x4f, 0x33, 0x5c, 0x12, 0xd7, /* Byte value: 0x1d */ + 0xa4, 0x3a, 0xfe, 0xad, 0x79, 0x20, 0xc1, 0x7e, 0x80, 0x44, 0xab, 0x8b, 0x1d, 0x6e, 0x92, 0xaf, /* Byte value: 0x1e */ + 0x3f, 0x71, 0x28, 0x62, 0x2a, 0x22, 0x78, 0xa0, 0x88, 0xd1, 0x5c, 0x7e, 0xd9, 0xb1, 0x32, 0xc9, /* Byte value: 0x1f */ + 0xe0, 0xb9, 0x77, 0xc2, 0x01, 0x1a, 0x99, 0x1f, 0x68, 0xa6, 0x19, 0x03, 0xbd, 0x12, 0x2c, 0x8b, /* Byte value: 0x20 */ + 0x27, 0xb0, 0x54, 0x1f, 0x3a, 0x41, 0xfc, 0x93, 0xc7, 0x23, 0x0f, 0x4e, 0x58, 0x52, 0xb7, 0xae, /* Byte value: 0x21 */ + 0x8d, 0xd5, 0x20, 0x17, 0xf6, 0x28, 0x60, 0x80, 0xa0, 0x55, 0xf1, 0xd9, 0x8b, 0x94, 0x57, 0xf4, /* Byte value: 0x22 */ + 0x0c, 0x81, 0x3e, 0xdf, 0x08, 0xd0, 0x42, 0xf8, 0xc6, 0x79, 0xc8, 0x18, 0xa1, 0x90, 0xa3, 0xd2, /* Byte value: 0x23 */ + 0x82, 0xe5, 0xf0, 0x8f, 0xfc, 0xcc, 0xd3, 0x46, 0xb6, 0xa3, 0x0b, 0xc7, 0x93, 0x20, 0xac, 0xf3, /* Byte value: 0x24 */ + 0xea, 0x99, 0x56, 0x93, 0x0d, 0xa2, 0xfa, 0x9b, 0xcd, 0x02, 0xb5, 0x17, 0xad, 0xca, 0x3f, 0x30, /* Byte value: 0x25 */ + 0xae, 0x1a, 0xdf, 0xfc, 0x75, 0x98, 0xa2, 0xfa, 0x25, 0xe0, 0x07, 0x9f, 0x0d, 0xb6, 0x81, 0x14, /* Byte value: 0x26 */ + 0xb4, 0x05, 0x17, 0xfb, 0xd8, 0x62, 0x39, 0x5c, 0x4b, 0x59, 0xc9, 0xab, 0xe3, 0x6d, 0xd5, 0x54, /* Byte value: 0x27 */ + 0x9a, 0x24, 0x8c, 0xf2, 0xec, 0xaf, 0x57, 0x75, 0xf9, 0x51, 0x58, 0xf7, 0x12, 0xc3, 0x29, 0x94, /* Byte value: 0x28 */ + 0x63, 0x33, 0xdd, 0x70, 0x42, 0x7b, 0xa4, 0xf2, 0x2f, 0xc1, 0xbd, 0xc6, 0xf8, 0x2e, 0x09, 0x8a, /* Byte value: 0x29 */ + 0x49, 0x6d, 0xed, 0x8d, 0xcf, 0x47, 0xf4, 0x32, 0xdf, 0x5f, 0xd5, 0x92, 0xd7, 0xf0, 0x94, 0x04, /* Byte value: 0x2a */ + 0xe5, 0xa9, 0x86, 0x0b, 0x07, 0x46, 0x49, 0x5d, 0xdb, 0xf4, 0x4f, 0x09, 0xb5, 0x7e, 0xc4, 0x37, /* Byte value: 0x2b */ + 0x42, 0x22, 0x96, 0xe1, 0x7c, 0x52, 0x79, 0x1d, 0x8b, 0x3f, 0xd6, 0x84, 0x11, 0x34, 0x0e, 0x4d, /* Byte value: 0x2c */ + 0xe4, 0xc6, 0xdc, 0x36, 0xb8, 0xeb, 0xa7, 0xf6, 0x2a, 0x30, 0xe0, 0x0b, 0x63, 0x62, 0x4d, 0xc5, /* Byte value: 0x2d */ + 0x15, 0x2f, 0x18, 0x9f, 0xa7, 0x1e, 0x28, 0x60, 0x78, 0x4f, 0x34, 0x2a, 0xf6, 0x6f, 0xaf, 0x47, /* Byte value: 0x2e */ + 0xb7, 0xb4, 0xf9, 0xbc, 0xda, 0x56, 0xc8, 0x62, 0x9b, 0xd6, 0xfb, 0xad, 0x5a, 0x49, 0x8d, 0x81, /* Byte value: 0x2f */ + 0xc8, 0x39, 0xf3, 0x45, 0x31, 0xbf, 0xd6, 0x4a, 0xb9, 0x73, 0xec, 0x53, 0xfd, 0xf4, 0x60, 0x22, /* Byte value: 0x30 */ + 0x06, 0xa1, 0x1f, 0x8e, 0x04, 0x68, 0x21, 0x7c, 0x63, 0xdd, 0x64, 0x0c, 0xb1, 0x48, 0xb0, 0x69, /* Byte value: 0x31 */ + 0x70, 0xbd, 0xda, 0x61, 0xe1, 0x0d, 0xad, 0xee, 0x34, 0x53, 0xed, 0xe0, 0xbf, 0x09, 0x16, 0xa4, /* Byte value: 0x32 */ + 0x9d, 0xea, 0xc9, 0x41, 0x57, 0x6a, 0x98, 0xa2, 0x6b, 0x48, 0x93, 0xf9, 0x75, 0x97, 0x10, 0x0f, /* Byte value: 0x33 */ + 0x41, 0x93, 0x78, 0xa6, 0x7e, 0x66, 0x88, 0x23, 0x5b, 0xb0, 0xe4, 0x82, 0xa8, 0x10, 0x56, 0x98, /* Byte value: 0x34 */ + 0x75, 0xad, 0x2b, 0xa8, 0xe7, 0x51, 0x7d, 0xac, 0x87, 0x01, 0xbb, 0xea, 0xb7, 0x65, 0xfe, 0x18, /* Byte value: 0x35 */ + 0x19, 0xae, 0x26, 0x40, 0xaf, 0xce, 0x6a, 0x98, 0xbe, 0x36, 0xfc, 0x32, 0x57, 0xff, 0x0c, 0x95, /* Byte value: 0x36 */ + 0xc9, 0x56, 0xa9, 0x78, 0x8e, 0x12, 0x38, 0xe1, 0x48, 0xb7, 0x43, 0x51, 0x2b, 0xe8, 0xe9, 0xd0, /* Byte value: 0x37 */ + 0xaa, 0x65, 0x74, 0x08, 0xcc, 0x69, 0x9c, 0x13, 0x67, 0x76, 0xfe, 0x97, 0xd3, 0xc6, 0xe0, 0x5a, /* Byte value: 0x38 */ + 0xfc, 0x07, 0xa0, 0x4b, 0xa8, 0x88, 0x23, 0xc5, 0x65, 0xc2, 0xb3, 0x3b, 0xe2, 0x81, 0xc8, 0xa2, /* Byte value: 0x39 */ + 0x4d, 0x12, 0x46, 0x79, 0x76, 0xb6, 0xca, 0xdb, 0x9d, 0xc9, 0x2c, 0x9a, 0x09, 0x80, 0xf5, 0x4a, /* Byte value: 0x3a */ + 0xbf, 0x4a, 0x6c, 0x97, 0x6b, 0x77, 0xb4, 0x73, 0x1f, 0x39, 0xca, 0xbd, 0x25, 0xa9, 0x4f, 0x1d, /* Byte value: 0x3b */ + 0x2a, 0x5e, 0x30, 0xfd, 0x8d, 0x3c, 0x50, 0xc0, 0xf0, 0x9e, 0x68, 0x54, 0x2f, 0xde, 0x9d, 0x8e, /* Byte value: 0x3c */ + 0x73, 0x0c, 0x34, 0x26, 0xe3, 0x39, 0x5c, 0xd0, 0xe4, 0xdc, 0xdf, 0xe6, 0x06, 0x2d, 0x4e, 0x71, /* Byte value: 0x3d */ + 0x84, 0x44, 0xef, 0x01, 0xf8, 0xa4, 0xf2, 0x3a, 0xd5, 0x7e, 0x6f, 0xcb, 0x22, 0x68, 0x1c, 0x9a, /* Byte value: 0x3e */ + 0xd5, 0xe8, 0x7e, 0xf1, 0x27, 0x80, 0x82, 0x3b, 0x45, 0xd3, 0xe9, 0x69, 0x74, 0x7b, 0x0d, 0xf9, /* Byte value: 0x3f */ + 0xc3, 0x76, 0x88, 0x29, 0x82, 0xaa, 0x5b, 0x65, 0xed, 0x13, 0xef, 0x45, 0x3b, 0x30, 0xfa, 0x6b, /* Byte value: 0x40 */ + 0xaf, 0x75, 0x85, 0xc1, 0xca, 0x35, 0x4c, 0x51, 0xd4, 0x24, 0xa8, 0x9d, 0xdb, 0xaa, 0x08, 0xe6, /* Byte value: 0x41 */ + 0x2b, 0x31, 0x6a, 0xc0, 0x32, 0x91, 0xbe, 0x6b, 0x01, 0x5a, 0xc7, 0x56, 0xf9, 0xc2, 0x14, 0x7c, /* Byte value: 0x42 */ + 0x86, 0x9a, 0x5b, 0x7b, 0x45, 0x3d, 0xed, 0xaf, 0xf4, 0x35, 0xf2, 0xcf, 0x4d, 0x50, 0xcd, 0xbd, /* Byte value: 0x43 */ + 0xa7, 0x8b, 0x10, 0xea, 0x7b, 0x14, 0x30, 0x40, 0x50, 0xcb, 0x99, 0x8d, 0xa4, 0x4a, 0xca, 0x7a, /* Byte value: 0x44 */ + 0xb1, 0x15, 0xe6, 0x32, 0xde, 0x3e, 0xe9, 0x1e, 0xf8, 0x0b, 0x9f, 0xa1, 0xeb, 0x01, 0x3d, 0xe8, /* Byte value: 0x45 */ + 0xb2, 0xa4, 0x08, 0x75, 0xdc, 0x0a, 0x18, 0x20, 0x28, 0x84, 0xad, 0xa7, 0x52, 0x25, 0x65, 0x3d, /* Byte value: 0x46 */ + 0x5b, 0x8c, 0xb0, 0xa1, 0xd3, 0x9c, 0x13, 0x85, 0x35, 0x09, 0x2a, 0xb6, 0x46, 0xcb, 0x02, 0xd8, /* Byte value: 0x47 */ + 0x46, 0x5d, 0x3d, 0x15, 0xc5, 0xa3, 0x47, 0xf4, 0xc9, 0xa9, 0x2f, 0x8c, 0xcf, 0x44, 0x6f, 0x03, /* Byte value: 0x48 */ + 0xd3, 0x49, 0x61, 0x7f, 0x23, 0xe8, 0xa3, 0x47, 0x26, 0x0e, 0x8d, 0x65, 0xc5, 0x33, 0xbd, 0x90, /* Byte value: 0x49 */ + 0x9f, 0x34, 0x7d, 0x3b, 0xea, 0xf3, 0x87, 0x37, 0x4a, 0x03, 0x0e, 0xfd, 0x1a, 0xaf, 0xc1, 0x28, /* Byte value: 0x4a */ + 0xfd, 0x68, 0xfa, 0x76, 0x17, 0x25, 0xcd, 0x6e, 0x94, 0x06, 0x1c, 0x39, 0x34, 0x9d, 0x41, 0x50, /* Byte value: 0x4b */ + 0xd4, 0x87, 0x24, 0xcc, 0x98, 0x2d, 0x6c, 0x90, 0xb4, 0x17, 0x46, 0x6b, 0xa2, 0x67, 0x84, 0x0b, /* Byte value: 0x4c */ + 0x0f, 0x30, 0xd0, 0x98, 0x0a, 0xe4, 0xb3, 0xc6, 0x16, 0xf6, 0xfa, 0x1e, 0x18, 0xb4, 0xfb, 0x07, /* Byte value: 0x4d */ + 0x9c, 0x85, 0x93, 0x7c, 0xe8, 0xc7, 0x76, 0x09, 0x9a, 0x8c, 0x3c, 0xfb, 0xa3, 0x8b, 0x99, 0xfd, /* Byte value: 0x4e */ + 0x2f, 0x4e, 0xc1, 0x34, 0x8b, 0x60, 0x80, 0x82, 0x43, 0xcc, 0x3e, 0x5e, 0x27, 0xb2, 0x75, 0x32, /* Byte value: 0x4f */ + 0x9b, 0x4b, 0xd6, 0xcf, 0x53, 0x02, 0xb9, 0xde, 0x08, 0x95, 0xf7, 0xf5, 0xc4, 0xdf, 0xa0, 0x66, /* Byte value: 0x50 */ + 0x43, 0x4d, 0xcc, 0xdc, 0xc3, 0xff, 0x97, 0xb6, 0x7a, 0xfb, 0x79, 0x86, 0xc7, 0x28, 0x87, 0xbf, /* Byte value: 0x51 */ + 0xef, 0x89, 0xa7, 0x5a, 0x0b, 0xfe, 0x2a, 0xd9, 0x7e, 0x50, 0xe3, 0x1d, 0xa5, 0xa6, 0xd7, 0x8c, /* Byte value: 0x52 */ + 0xd9, 0x69, 0x40, 0x2e, 0x2f, 0x50, 0xc0, 0xc3, 0x83, 0xaa, 0x21, 0x71, 0xd5, 0xeb, 0xae, 0x2b, /* Byte value: 0x53 */ + 0x79, 0x2c, 0x15, 0x77, 0xef, 0x81, 0x3f, 0x54, 0x41, 0x78, 0x73, 0xf2, 0x16, 0xf5, 0x5d, 0xca, /* Byte value: 0x54 */ + 0xb6, 0xdb, 0xa3, 0x81, 0x65, 0xfb, 0x26, 0xc9, 0x6a, 0x12, 0x54, 0xaf, 0x8c, 0x55, 0x04, 0x73, /* Byte value: 0x55 */ + 0x53, 0x72, 0x25, 0x8a, 0x62, 0xbd, 0x6f, 0x94, 0xb1, 0xe6, 0x1b, 0xa6, 0x39, 0x2b, 0xc0, 0x44, /* Byte value: 0x56 */ + 0x7f, 0x8d, 0x0a, 0xf9, 0xeb, 0xe9, 0x1e, 0x28, 0x22, 0xa5, 0x17, 0xfe, 0xa7, 0xbd, 0xed, 0xa3, /* Byte value: 0x57 */ + 0xc1, 0xa8, 0x3c, 0x53, 0x3f, 0x33, 0x44, 0xf0, 0xcc, 0x58, 0x72, 0x41, 0x54, 0x08, 0x2b, 0x4c, /* Byte value: 0x58 */ + 0xf0, 0x86, 0x9e, 0x94, 0xa0, 0x58, 0x61, 0x3d, 0xa3, 0xbb, 0x7b, 0x23, 0x43, 0x11, 0x6b, 0x70, /* Byte value: 0x59 */ + 0x23, 0xcf, 0xff, 0xeb, 0x83, 0xb0, 0xc2, 0x7a, 0x85, 0xb5, 0xf6, 0x46, 0x86, 0x22, 0xd6, 0xe0, /* Byte value: 0x5a */ + 0xe7, 0x77, 0x32, 0x71, 0xba, 0xdf, 0x56, 0xc8, 0xfa, 0xbf, 0xd2, 0x0d, 0xda, 0x46, 0x15, 0x10, /* Byte value: 0x5b */ + 0x25, 0x6e, 0xe0, 0x65, 0x87, 0xd8, 0xe3, 0x06, 0xe6, 0x68, 0x92, 0x4a, 0x37, 0x6a, 0x66, 0x89, /* Byte value: 0x5c */ + 0x5e, 0x9c, 0x41, 0x68, 0xd5, 0xc0, 0xc3, 0xc7, 0x86, 0x5b, 0x7c, 0xbc, 0x4e, 0xa7, 0xea, 0x64, /* Byte value: 0x5d */ + 0xb5, 0x6a, 0x4d, 0xc6, 0x67, 0xcf, 0xd7, 0xf7, 0xba, 0x9d, 0x66, 0xa9, 0x35, 0x71, 0x5c, 0xa6, /* Byte value: 0x5e */ + 0x1e, 0x60, 0x63, 0xf3, 0x14, 0x0b, 0xa5, 0x4f, 0x2c, 0x2f, 0x37, 0x3c, 0x30, 0xab, 0x35, 0x0e, /* Byte value: 0x5f */ + 0xa2, 0x9b, 0xe1, 0x23, 0x7d, 0x48, 0xe0, 0x02, 0xe3, 0x99, 0xcf, 0x87, 0xac, 0x26, 0x22, 0xc6, /* Byte value: 0x60 */ + 0xdf, 0xc8, 0x5f, 0xa0, 0x2b, 0x38, 0xe1, 0xbf, 0xe0, 0x77, 0x45, 0x7d, 0x64, 0xa3, 0x1e, 0x42, /* Byte value: 0x61 */ + 0xa6, 0xe4, 0x4a, 0xd7, 0xc4, 0xb9, 0xde, 0xeb, 0xa1, 0x0f, 0x36, 0x8f, 0x72, 0x56, 0x43, 0x88, /* Byte value: 0x62 */ + 0xfe, 0xd9, 0x14, 0x31, 0x15, 0x11, 0x3c, 0x50, 0x44, 0x89, 0x2e, 0x3f, 0x8d, 0xb9, 0x19, 0x85, /* Byte value: 0x63 */ + 0xac, 0xc4, 0x6b, 0x86, 0xc8, 0x01, 0xbd, 0x6f, 0x04, 0xab, 0x9a, 0x9b, 0x62, 0x8e, 0x50, 0x33, /* Byte value: 0x64 */ + 0x22, 0xa0, 0xa5, 0xd6, 0x3c, 0x1d, 0x2c, 0xd1, 0x74, 0x71, 0x59, 0x44, 0x50, 0x3e, 0x5f, 0x12, /* Byte value: 0x65 */ + 0xf9, 0x17, 0x51, 0x82, 0xae, 0xd4, 0xf3, 0x87, 0xd6, 0x90, 0xe5, 0x31, 0xea, 0xed, 0x20, 0x1e, /* Byte value: 0x66 */ + 0xe2, 0x67, 0xc3, 0xb8, 0xbc, 0x83, 0x86, 0x8a, 0x49, 0xed, 0x84, 0x07, 0xd2, 0x2a, 0xfd, 0xac, /* Byte value: 0x67 */ + 0x4a, 0xdc, 0x03, 0xca, 0xcd, 0x73, 0x05, 0x0c, 0x0f, 0xd0, 0xe7, 0x94, 0x6e, 0xd4, 0xcc, 0xd1, /* Byte value: 0x68 */ + 0xbc, 0xfb, 0x82, 0xd0, 0x69, 0x43, 0x45, 0x4d, 0xcf, 0xb6, 0xf8, 0xbb, 0x9c, 0x8d, 0x17, 0xc8, /* Byte value: 0x69 */ + 0x35, 0x51, 0x09, 0x33, 0x26, 0x9a, 0x1b, 0x24, 0x2d, 0x75, 0xf0, 0x6a, 0xc9, 0x69, 0x21, 0x72, /* Byte value: 0x6a */ + 0xca, 0xe7, 0x47, 0x3f, 0x8c, 0x26, 0xc9, 0xdf, 0x98, 0x38, 0x71, 0x57, 0x92, 0xcc, 0xb1, 0x05, /* Byte value: 0x6b */ + 0xee, 0xe6, 0xfd, 0x67, 0xb4, 0x53, 0xc4, 0x72, 0x8f, 0x94, 0x4c, 0x1f, 0x73, 0xba, 0x5e, 0x7e, /* Byte value: 0x6c */ + 0x78, 0x43, 0x4f, 0x4a, 0x50, 0x2c, 0xd1, 0xff, 0xb0, 0xbc, 0xdc, 0xf0, 0xc0, 0xe9, 0xd4, 0x38, /* Byte value: 0x6d */ + 0x05, 0x10, 0xf1, 0xc9, 0x06, 0x5c, 0xd0, 0x42, 0xb3, 0x52, 0x56, 0x0a, 0x08, 0x6c, 0xe8, 0xbc, /* Byte value: 0x6e */ + 0x6b, 0xcd, 0x48, 0x5b, 0xf3, 0x5a, 0xd8, 0xe3, 0xab, 0x2e, 0x8c, 0xd6, 0x87, 0xce, 0xcb, 0x16, /* Byte value: 0x6f */ + 0x51, 0xac, 0x91, 0xf0, 0xdf, 0x24, 0x70, 0x01, 0x90, 0xad, 0x86, 0xa2, 0x56, 0x13, 0x11, 0x63, /* Byte value: 0x70 */ + 0xe1, 0xd6, 0x2d, 0xff, 0xbe, 0xb7, 0x77, 0xb4, 0x99, 0x62, 0xb6, 0x01, 0x6b, 0x0e, 0xa5, 0x79, /* Byte value: 0x71 */ + 0x59, 0x52, 0x04, 0xdb, 0x6e, 0x05, 0x0c, 0x10, 0x14, 0x42, 0xb7, 0xb2, 0x29, 0xf3, 0xd3, 0xff, /* Byte value: 0x72 */ + 0xa3, 0xf4, 0xbb, 0x1e, 0xc2, 0xe5, 0x0e, 0xa9, 0x12, 0x5d, 0x60, 0x85, 0x7a, 0x3a, 0xab, 0x34, /* Byte value: 0x73 */ + 0xf2, 0x58, 0x2a, 0xee, 0x1d, 0xc1, 0x7e, 0xa8, 0x82, 0xf0, 0xe6, 0x27, 0x2c, 0x29, 0xba, 0x57, /* Byte value: 0x74 */ + 0x71, 0xd2, 0x80, 0x5c, 0x5e, 0xa0, 0x43, 0x45, 0xc5, 0x97, 0x42, 0xe2, 0x69, 0x15, 0x9f, 0x56, /* Byte value: 0x75 */ + 0x56, 0x62, 0xd4, 0x43, 0x64, 0xe1, 0xbf, 0xd6, 0x02, 0xb4, 0x4d, 0xac, 0x31, 0x47, 0x28, 0xf8, /* Byte value: 0x76 */ + 0x11, 0x50, 0xb3, 0x6b, 0x1e, 0xef, 0x16, 0x89, 0x3a, 0xd9, 0xcd, 0x22, 0x28, 0x1f, 0xce, 0x09, /* Byte value: 0x77 */ + 0x6a, 0xa2, 0x12, 0x66, 0x4c, 0xf7, 0x36, 0x48, 0x5a, 0xea, 0x23, 0xd4, 0x51, 0xd2, 0x42, 0xe4, /* Byte value: 0x78 */ + 0x89, 0xaa, 0x8b, 0xe3, 0x4f, 0xd9, 0x5e, 0x69, 0xe2, 0xc3, 0x08, 0xd1, 0x55, 0xe4, 0x36, 0xba, /* Byte value: 0x79 */ + 0x94, 0x7b, 0x06, 0x57, 0x59, 0xe6, 0x0a, 0x18, 0x1e, 0x63, 0x0d, 0xeb, 0xdc, 0x6b, 0x5b, 0x61, /* Byte value: 0x7a */ + 0x65, 0x92, 0xc2, 0xfe, 0x46, 0x13, 0x85, 0x8e, 0x4c, 0x1c, 0xd9, 0xca, 0x49, 0x66, 0xb9, 0xe3, /* Byte value: 0x7b */ + 0x8c, 0xba, 0x7a, 0x2a, 0x49, 0x85, 0x8e, 0x2b, 0x51, 0x91, 0x5e, 0xdb, 0x5d, 0x88, 0xde, 0x06, /* Byte value: 0x7c */ + 0xbb, 0x35, 0xc7, 0x63, 0xd2, 0x86, 0x8a, 0x9a, 0x5d, 0xaf, 0x33, 0xb5, 0xfb, 0xd9, 0x2e, 0x53, /* Byte value: 0x7d */ + 0x77, 0x73, 0x9f, 0xd2, 0x5a, 0xc8, 0x62, 0x39, 0xa6, 0x4a, 0x26, 0xee, 0xd8, 0x5d, 0x2f, 0x3f, /* Byte value: 0x7e */ + 0x3c, 0xc0, 0xc6, 0x25, 0x28, 0x16, 0x89, 0x9e, 0x58, 0x5e, 0x6e, 0x78, 0x60, 0x95, 0x6a, 0x1c, /* Byte value: 0x7f */ + 0x7b, 0xf2, 0xa1, 0x0d, 0x52, 0x18, 0x20, 0xc1, 0x60, 0x33, 0xee, 0xf6, 0x79, 0xcd, 0x8c, 0xed, /* Byte value: 0x80 */ + 0x28, 0x80, 0x84, 0x87, 0x30, 0xa5, 0x4f, 0x55, 0xd1, 0xd5, 0xf5, 0x50, 0x40, 0xe6, 0x4c, 0xa9, /* Byte value: 0x81 */ + 0xab, 0x0a, 0x2e, 0x35, 0x73, 0xc4, 0x72, 0xb8, 0x96, 0xb2, 0x51, 0x95, 0x05, 0xda, 0x69, 0xa8, /* Byte value: 0x82 */ + 0xd2, 0x26, 0x3b, 0x42, 0x9c, 0x45, 0x4d, 0xec, 0xd7, 0xca, 0x22, 0x67, 0x13, 0x2f, 0x34, 0x62, /* Byte value: 0x83 */ + 0x31, 0x2e, 0xa2, 0xc7, 0x9f, 0x6b, 0x25, 0xcd, 0x6f, 0xe3, 0x09, 0x62, 0x17, 0x19, 0x40, 0x3c, /* Byte value: 0x84 */ + 0xde, 0xa7, 0x05, 0x9d, 0x94, 0x95, 0x0f, 0x14, 0x11, 0xb3, 0xea, 0x7f, 0xb2, 0xbf, 0x97, 0xb0, /* Byte value: 0x85 */ + 0xc4, 0xb8, 0xcd, 0x9a, 0x39, 0x6f, 0x94, 0xb2, 0x7f, 0x0a, 0x24, 0x4b, 0x5c, 0x64, 0xc3, 0xf0, /* Byte value: 0x86 */ + 0x5f, 0xf3, 0x1b, 0x55, 0x6a, 0x6d, 0x2d, 0x6c, 0x77, 0x9f, 0xd3, 0xbe, 0x98, 0xbb, 0x63, 0x96, /* Byte value: 0x87 */ + 0xcc, 0x46, 0x58, 0xb1, 0x88, 0x4e, 0xe8, 0xa3, 0xfb, 0xe5, 0x15, 0x5b, 0x23, 0x84, 0x01, 0x6c, /* Byte value: 0x88 */ + 0xcf, 0xf7, 0xb6, 0xf6, 0x8a, 0x7a, 0x19, 0x9d, 0x2b, 0x6a, 0x27, 0x5d, 0x9a, 0xa0, 0x59, 0xb9, /* Byte value: 0x89 */ + 0x76, 0x1c, 0xc5, 0xef, 0xe5, 0x65, 0x8c, 0x92, 0x57, 0x8e, 0x89, 0xec, 0x0e, 0x41, 0xa6, 0xcd, /* Byte value: 0x8a */ + 0x2c, 0xff, 0x2f, 0x73, 0x89, 0x54, 0x71, 0xbc, 0x93, 0x43, 0x0c, 0x58, 0x9e, 0x96, 0x2d, 0xe7, /* Byte value: 0x8b */ + 0xb8, 0x84, 0x29, 0x24, 0xd0, 0xb2, 0x7b, 0xa4, 0x8d, 0x20, 0x01, 0xb3, 0x42, 0xfd, 0x76, 0x86, /* Byte value: 0x8c */ + 0xd8, 0x06, 0x1a, 0x13, 0x90, 0xfd, 0x2e, 0x68, 0x72, 0x6e, 0x8e, 0x73, 0x03, 0xf7, 0x27, 0xd9, /* Byte value: 0x8d */ + 0x2e, 0x21, 0x9b, 0x09, 0x34, 0xcd, 0x6e, 0x29, 0xb2, 0x08, 0x91, 0x5c, 0xf1, 0xae, 0xfc, 0xc0, /* Byte value: 0x8e */ + 0x36, 0xe0, 0xe7, 0x74, 0x24, 0xae, 0xea, 0x1a, 0xfd, 0xfa, 0xc2, 0x6c, 0x70, 0x4d, 0x79, 0xa7, /* Byte value: 0x8f */ + 0xdb, 0xb7, 0xf4, 0x54, 0x92, 0xc9, 0xdf, 0x56, 0xa2, 0xe1, 0xbc, 0x75, 0xba, 0xd3, 0x7f, 0x0c, /* Byte value: 0x90 */ + 0x69, 0x13, 0xfc, 0x21, 0x4e, 0xc3, 0xc7, 0x76, 0x8a, 0x65, 0x11, 0xd2, 0xe8, 0xf6, 0x1a, 0x31, /* Byte value: 0x91 */ + 0xb3, 0xcb, 0x52, 0x48, 0x63, 0xa7, 0xf6, 0x8b, 0xd9, 0x40, 0x02, 0xa5, 0x84, 0x39, 0xec, 0xcf, /* Byte value: 0x92 */ + 0x14, 0x40, 0x42, 0xa2, 0x18, 0xb3, 0xc6, 0xcb, 0x89, 0x8b, 0x9b, 0x28, 0x20, 0x73, 0x26, 0xb5, /* Byte value: 0x93 */ + 0x95, 0x14, 0x5c, 0x6a, 0xe6, 0x4b, 0xe4, 0xb3, 0xef, 0xa7, 0xa2, 0xe9, 0x0a, 0x77, 0xd2, 0x93, /* Byte value: 0x94 */ + 0xbe, 0x25, 0x36, 0xaa, 0xd4, 0xda, 0x5a, 0xd8, 0xee, 0xfd, 0x65, 0xbf, 0xf3, 0xb5, 0xc6, 0xef, /* Byte value: 0x95 */ + 0x62, 0x5c, 0x87, 0x4d, 0xfd, 0xd6, 0x4a, 0x59, 0xde, 0x05, 0x12, 0xc4, 0x2e, 0x32, 0x80, 0x78, /* Byte value: 0x96 */ + 0xa1, 0x2a, 0x0f, 0x64, 0x7f, 0x7c, 0x11, 0x3c, 0x33, 0x16, 0xfd, 0x81, 0x15, 0x02, 0x7a, 0x13, /* Byte value: 0x97 */ + 0x3b, 0x0e, 0x83, 0x96, 0x93, 0xd3, 0x46, 0x49, 0xca, 0x47, 0xa5, 0x76, 0x07, 0xc1, 0x53, 0x87, /* Byte value: 0x98 */ + 0x16, 0x9e, 0xf6, 0xd8, 0xa5, 0x2a, 0xd9, 0x5e, 0xa8, 0xc0, 0x06, 0x2c, 0x4f, 0x4b, 0xf7, 0x92, /* Byte value: 0x99 */ + 0x66, 0x23, 0x2c, 0xb9, 0x44, 0x27, 0x74, 0xb0, 0x9c, 0x93, 0xeb, 0xcc, 0xf0, 0x42, 0xe1, 0x36, /* Byte value: 0x9a */ + 0xe9, 0x28, 0xb8, 0xd4, 0x0f, 0x96, 0x0b, 0xa5, 0x1d, 0x8d, 0x87, 0x11, 0x14, 0xee, 0x67, 0xe5, /* Byte value: 0x9b */ + 0x5c, 0x42, 0xf5, 0x12, 0x68, 0x59, 0xdc, 0x52, 0xa7, 0x10, 0xe1, 0xb8, 0x21, 0x9f, 0x3b, 0x43, /* Byte value: 0x9c */ + 0x6c, 0x03, 0x0d, 0xe8, 0x48, 0x9f, 0x17, 0x34, 0x39, 0x37, 0x47, 0xd8, 0xe0, 0x9a, 0xf2, 0x8d, /* Byte value: 0x9d */ + 0x6d, 0x6c, 0x57, 0xd5, 0xf7, 0x32, 0xf9, 0x9f, 0xc8, 0xf3, 0xe8, 0xda, 0x36, 0x86, 0x7b, 0x7f, /* Byte value: 0x9e */ + 0xad, 0xab, 0x31, 0xbb, 0x77, 0xac, 0x53, 0xc4, 0xf5, 0x6f, 0x35, 0x99, 0xb4, 0x92, 0xd9, 0xc1, /* Byte value: 0x9f */ + 0x37, 0x8f, 0xbd, 0x49, 0x9b, 0x03, 0x04, 0xb1, 0x0c, 0x3e, 0x6d, 0x6e, 0xa6, 0x51, 0xf0, 0x55, /* Byte value: 0xa0 */ + 0x61, 0xed, 0x69, 0x0a, 0xff, 0xe2, 0xbb, 0x67, 0x0e, 0x8a, 0x20, 0xc2, 0x97, 0x16, 0xd8, 0xad, /* Byte value: 0xa1 */ + 0x4b, 0xb3, 0x59, 0xf7, 0x72, 0xde, 0xeb, 0xa7, 0xfe, 0x14, 0x48, 0x96, 0xb8, 0xc8, 0x45, 0x23, /* Byte value: 0xa2 */ + 0xb9, 0xeb, 0x73, 0x19, 0x6f, 0x1f, 0x95, 0x0f, 0x7c, 0xe4, 0xae, 0xb1, 0x94, 0xe1, 0xff, 0x74, /* Byte value: 0xa3 */ + 0xe3, 0x08, 0x99, 0x85, 0x03, 0x2e, 0x68, 0x21, 0xb8, 0x29, 0x2b, 0x05, 0x04, 0x36, 0x74, 0x5e, /* Byte value: 0xa4 */ + 0xba, 0x5a, 0x9d, 0x5e, 0x6d, 0x2b, 0x64, 0x31, 0xac, 0x6b, 0x9c, 0xb7, 0x2d, 0xc5, 0xa7, 0xa1, /* Byte value: 0xa5 */ + 0xf1, 0xe9, 0xc4, 0xa9, 0x1f, 0xf5, 0x8f, 0x96, 0x52, 0x7f, 0xd4, 0x21, 0x95, 0x0d, 0xe2, 0x82, /* Byte value: 0xa6 */ + 0xa0, 0x45, 0x55, 0x59, 0xc0, 0xd1, 0xff, 0x97, 0xc2, 0xd2, 0x52, 0x83, 0xc3, 0x1e, 0xf3, 0xe1, /* Byte value: 0xa7 */ + 0x85, 0x2b, 0xb5, 0x3c, 0x47, 0x09, 0x1c, 0x91, 0x24, 0xba, 0xc0, 0xc9, 0xf4, 0x74, 0x95, 0x68, /* Byte value: 0xa8 */ + 0x83, 0x8a, 0xaa, 0xb2, 0x43, 0x61, 0x3d, 0xed, 0x47, 0x67, 0xa4, 0xc5, 0x45, 0x3c, 0x25, 0x01, /* Byte value: 0xa9 */ + 0xda, 0xd8, 0xae, 0x69, 0x2d, 0x64, 0x31, 0xfd, 0x53, 0x25, 0x13, 0x77, 0x6c, 0xcf, 0xf6, 0xfe, /* Byte value: 0xaa */ + 0x47, 0x32, 0x67, 0x28, 0x7a, 0x0e, 0xa9, 0x5f, 0x38, 0x6d, 0x80, 0x8e, 0x19, 0x58, 0xe6, 0xf1, /* Byte value: 0xab */ + 0xc5, 0xd7, 0x97, 0xa7, 0x86, 0xc2, 0x7a, 0x19, 0x8e, 0xce, 0x8b, 0x49, 0x8a, 0x78, 0x4a, 0x02, /* Byte value: 0xac */ + 0xb0, 0x7a, 0xbc, 0x0f, 0x61, 0x93, 0x07, 0xb5, 0x09, 0xcf, 0x30, 0xa3, 0x3d, 0x1d, 0xb4, 0x1a, /* Byte value: 0xad */ + 0x33, 0xf0, 0x16, 0xbd, 0x22, 0xf2, 0x3a, 0x58, 0x4e, 0xa8, 0x94, 0x66, 0x78, 0x21, 0x91, 0x1b, /* Byte value: 0xae */ + 0xfa, 0xa6, 0xbf, 0xc5, 0xac, 0xe0, 0x02, 0xb9, 0x06, 0x1f, 0xd7, 0x37, 0x53, 0xc9, 0x78, 0xcb, /* Byte value: 0xaf */ + 0x96, 0xa5, 0xb2, 0x2d, 0xe4, 0x7f, 0x15, 0x8d, 0x3f, 0x28, 0x90, 0xef, 0xb3, 0x53, 0x8a, 0x46, /* Byte value: 0xb0 */ + 0x6f, 0xb2, 0xe3, 0xaf, 0x4a, 0xab, 0xe6, 0x0a, 0xe9, 0xb8, 0x75, 0xde, 0x59, 0xbe, 0xaa, 0x58, /* Byte value: 0xb1 */ + 0x6e, 0xdd, 0xb9, 0x92, 0xf5, 0x06, 0x08, 0xa1, 0x18, 0x7c, 0xda, 0xdc, 0x8f, 0xa2, 0x23, 0xaa, /* Byte value: 0xb2 */ + 0xc2, 0x19, 0xd2, 0x14, 0x3d, 0x07, 0xb5, 0xce, 0x1c, 0xd7, 0x40, 0x47, 0xed, 0x2c, 0x73, 0x99, /* Byte value: 0xb3 */ + 0xf6, 0x27, 0x81, 0x1a, 0xa4, 0x30, 0x40, 0x41, 0xc0, 0x66, 0x1f, 0x2f, 0xf2, 0x59, 0xdb, 0x19, /* Byte value: 0xb4 */ + 0x50, 0xc3, 0xcb, 0xcd, 0x60, 0x89, 0x9e, 0xaa, 0x61, 0x69, 0x29, 0xa0, 0x80, 0x0f, 0x98, 0x91, /* Byte value: 0xb5 */ + 0xff, 0xb6, 0x4e, 0x0c, 0xaa, 0xbc, 0xd2, 0xfb, 0xb5, 0x4d, 0x81, 0x3d, 0x5b, 0xa5, 0x90, 0x77, /* Byte value: 0xb6 */ + 0x5d, 0x2d, 0xaf, 0x2f, 0xd7, 0xf4, 0x32, 0xf9, 0x56, 0xd4, 0x4e, 0xba, 0xf7, 0x83, 0xb2, 0xb1, /* Byte value: 0xb7 */ + 0xa9, 0xd4, 0x9a, 0x4f, 0xce, 0x5d, 0x6d, 0x2d, 0xb7, 0xf9, 0xcc, 0x91, 0x6a, 0xe2, 0xb8, 0x8f, /* Byte value: 0xb8 */ + 0x8e, 0x64, 0xce, 0x50, 0xf4, 0x1c, 0x91, 0xbe, 0x70, 0xda, 0xc3, 0xdf, 0x32, 0xb0, 0x0f, 0x21, /* Byte value: 0xb9 */ + 0x17, 0xf1, 0xac, 0xe5, 0x1a, 0x87, 0x37, 0xf5, 0x59, 0x04, 0xa9, 0x2e, 0x99, 0x57, 0x7e, 0x60, /* Byte value: 0xba */ + 0x1b, 0x70, 0x92, 0x3a, 0x12, 0x57, 0x75, 0x0d, 0x9f, 0x7d, 0x61, 0x36, 0x38, 0xc7, 0xdd, 0xb2, /* Byte value: 0xbb */ + 0x97, 0xca, 0xe8, 0x10, 0x5b, 0xd2, 0xfb, 0x26, 0xce, 0xec, 0x3f, 0xed, 0x65, 0x4f, 0x03, 0xb4, /* Byte value: 0xbc */ + 0x7d, 0x53, 0xbe, 0x83, 0x56, 0x70, 0x01, 0xbd, 0x03, 0xee, 0x8a, 0xfa, 0xc8, 0x85, 0x3c, 0x84, /* Byte value: 0xbd */ + 0xec, 0x38, 0x49, 0x1d, 0x09, 0xca, 0xdb, 0xe7, 0xae, 0xdf, 0xd1, 0x1b, 0x1c, 0x82, 0x8f, 0x59, /* Byte value: 0xbe */ + 0x58, 0x3d, 0x5e, 0xe6, 0xd1, 0xa8, 0xe2, 0xbb, 0xe5, 0x86, 0x18, 0xb0, 0xff, 0xef, 0x5a, 0x0d, /* Byte value: 0xbf */ + 0xf7, 0x48, 0xdb, 0x27, 0x1b, 0x9d, 0xae, 0xea, 0x31, 0xa2, 0xb0, 0x2d, 0x24, 0x45, 0x52, 0xeb, /* Byte value: 0xc0 */ + 0x1f, 0x0f, 0x39, 0xce, 0xab, 0xa6, 0x4b, 0xe4, 0xdd, 0xeb, 0x98, 0x3e, 0xe6, 0xb7, 0xbc, 0xfc, /* Byte value: 0xc1 */ + 0xfb, 0xc9, 0xe5, 0xf8, 0x13, 0x4d, 0xec, 0x12, 0xf7, 0xdb, 0x78, 0x35, 0x85, 0xd5, 0xf1, 0x39, /* Byte value: 0xc2 */ + 0x7c, 0x3c, 0xe4, 0xbe, 0xe9, 0xdd, 0xef, 0x16, 0xf2, 0x2a, 0x25, 0xf8, 0x1e, 0x99, 0xb5, 0x76, /* Byte value: 0xc3 */ + 0x09, 0x91, 0xcf, 0x16, 0x0e, 0x8c, 0x92, 0xba, 0x75, 0x2b, 0x9e, 0x12, 0xa9, 0xfc, 0x4b, 0x6e, /* Byte value: 0xc4 */ + 0x0d, 0xee, 0x64, 0xe2, 0xb7, 0x7d, 0xac, 0x53, 0x37, 0xbd, 0x67, 0x1a, 0x77, 0x8c, 0x2a, 0x20, /* Byte value: 0xc5 */ + 0x7a, 0x9d, 0xfb, 0x30, 0xed, 0xb5, 0xce, 0x6a, 0x91, 0xf7, 0x41, 0xf4, 0xaf, 0xd1, 0x05, 0x1f, /* Byte value: 0xc6 */ + 0x67, 0x4c, 0x76, 0x84, 0xfb, 0x8a, 0x9a, 0x1b, 0x6d, 0x57, 0x44, 0xce, 0x26, 0x5e, 0x68, 0xc4, /* Byte value: 0xc7 */ + 0x45, 0xec, 0xd3, 0x52, 0xc7, 0x97, 0xb6, 0xca, 0x19, 0x26, 0x1d, 0x8a, 0x76, 0x60, 0x37, 0xd6, /* Byte value: 0xc8 */ + 0x87, 0xf5, 0x01, 0x46, 0xfa, 0x90, 0x03, 0x04, 0x05, 0xf1, 0x5d, 0xcd, 0x9b, 0x4c, 0x44, 0x4f, /* Byte value: 0xc9 */ + 0xdc, 0x79, 0xb1, 0xe7, 0x29, 0x0c, 0x10, 0x81, 0x30, 0xf8, 0x77, 0x7b, 0xdd, 0x87, 0x46, 0x97, /* Byte value: 0xca */ + 0xe8, 0x47, 0xe2, 0xe9, 0xb0, 0x3b, 0xe5, 0x0e, 0xec, 0x49, 0x28, 0x13, 0xc2, 0xf2, 0xee, 0x17, /* Byte value: 0xcb */ + 0x4f, 0xcc, 0xf2, 0x03, 0xcb, 0x2f, 0xd5, 0x4e, 0xbc, 0x82, 0xb1, 0x9e, 0x66, 0xb8, 0x24, 0x6d, /* Byte value: 0xcc */ + 0x1d, 0xd1, 0x8d, 0xb4, 0x16, 0x3f, 0x54, 0x71, 0xfc, 0xa0, 0x05, 0x3a, 0x89, 0x8f, 0x6d, 0xdb, /* Byte value: 0xcd */ + 0x4e, 0xa3, 0xa8, 0x3e, 0x74, 0x82, 0x3b, 0xe5, 0x4d, 0x46, 0x1e, 0x9c, 0xb0, 0xa4, 0xad, 0x9f, /* Byte value: 0xce */ + 0x04, 0x7f, 0xab, 0xf4, 0xb9, 0xf1, 0x3e, 0xe9, 0x42, 0x96, 0xf9, 0x08, 0xde, 0x70, 0x61, 0x4e, /* Byte value: 0xcf */ + 0xeb, 0xf6, 0x0c, 0xae, 0xb2, 0x0f, 0x14, 0x30, 0x3c, 0xc6, 0x1a, 0x15, 0x7b, 0xd6, 0xb6, 0xc2, /* Byte value: 0xd0 */ + 0xf8, 0x78, 0x0b, 0xbf, 0x11, 0x79, 0x1d, 0x2c, 0x27, 0x54, 0x4a, 0x33, 0x3c, 0xf1, 0xa9, 0xec, /* Byte value: 0xd1 */ + 0xf3, 0x37, 0x70, 0xd3, 0xa2, 0x6c, 0x90, 0x03, 0x73, 0x34, 0x49, 0x25, 0xfa, 0x35, 0x33, 0xa5, /* Byte value: 0xd2 */ + 0x3e, 0x1e, 0x72, 0x5f, 0x95, 0x8f, 0x96, 0x0b, 0x79, 0x15, 0xf3, 0x7c, 0x0f, 0xad, 0xbb, 0x3b, /* Byte value: 0xd3 */ + 0x3d, 0xaf, 0x9c, 0x18, 0x97, 0xbb, 0x67, 0x35, 0xa9, 0x9a, 0xc1, 0x7a, 0xb6, 0x89, 0xe3, 0xee, /* Byte value: 0xd4 */ + 0xbd, 0x94, 0xd8, 0xed, 0xd6, 0xee, 0xab, 0xe6, 0x3e, 0x72, 0x57, 0xb9, 0x4a, 0x91, 0x9e, 0x3a, /* Byte value: 0xd5 */ + 0x8a, 0x1b, 0x65, 0xa4, 0x4d, 0xed, 0xaf, 0x57, 0x32, 0x4c, 0x3a, 0xd7, 0xec, 0xc0, 0x6e, 0x6f, /* Byte value: 0xd6 */ + 0x88, 0xc5, 0xd1, 0xde, 0xf0, 0x74, 0xb0, 0xc2, 0x13, 0x07, 0xa7, 0xd3, 0x83, 0xf8, 0xbf, 0x48, /* Byte value: 0xd7 */ + 0xdd, 0x16, 0xeb, 0xda, 0x96, 0xa1, 0xfe, 0x2a, 0xc1, 0x3c, 0xd8, 0x79, 0x0b, 0x9b, 0xcf, 0x65, /* Byte value: 0xd8 */ + 0xcd, 0x29, 0x02, 0x8c, 0x37, 0xe3, 0x06, 0x08, 0x0a, 0x21, 0xba, 0x59, 0xf5, 0x98, 0x88, 0x9e, /* Byte value: 0xd9 */ + 0x0b, 0x4f, 0x7b, 0x6c, 0xb3, 0x15, 0x8d, 0x2f, 0x54, 0x60, 0x03, 0x16, 0xc6, 0xc4, 0x9a, 0x49, /* Byte value: 0xda */ + 0x13, 0x8e, 0x07, 0x11, 0xa3, 0x76, 0x09, 0x1c, 0x1b, 0x92, 0x50, 0x26, 0x47, 0x27, 0x1f, 0x2e, /* Byte value: 0xdb */ + 0x98, 0xfa, 0x38, 0x88, 0x51, 0x36, 0x48, 0xe0, 0xd8, 0x1a, 0xc5, 0xf3, 0x7d, 0xfb, 0xf8, 0xb3, /* Byte value: 0xdc */ + 0x02, 0xde, 0xb4, 0x7a, 0xbd, 0x99, 0x1f, 0x95, 0x21, 0x4b, 0x9d, 0x04, 0x6f, 0x38, 0xd1, 0x27, /* Byte value: 0xdd */ + 0x93, 0xb5, 0x43, 0xe4, 0xe2, 0x23, 0xc5, 0xcf, 0x8c, 0x7a, 0xc6, 0xe5, 0xbb, 0x3f, 0x62, 0xfa, /* Byte value: 0xde */ + 0x80, 0x3b, 0x44, 0xf5, 0x41, 0x55, 0xcc, 0xd3, 0x97, 0xe8, 0x96, 0xc3, 0xfc, 0x18, 0x7d, 0xd4, /* Byte value: 0xdf */ + 0x90, 0x04, 0xad, 0xa3, 0xe0, 0x17, 0x34, 0xf1, 0x5c, 0xf5, 0xf4, 0xe3, 0x02, 0x1b, 0x3a, 0x2f, /* Byte value: 0xe0 */ + 0xd0, 0xf8, 0x8f, 0x38, 0x21, 0xdc, 0x52, 0x79, 0xf6, 0x81, 0xbf, 0x63, 0x7c, 0x17, 0xe5, 0x45, /* Byte value: 0xe1 */ + 0x24, 0x01, 0xba, 0x58, 0x38, 0x75, 0x0d, 0xad, 0x17, 0xac, 0x3d, 0x48, 0xe1, 0x76, 0xef, 0x7b, /* Byte value: 0xe2 */ + 0x34, 0x3e, 0x53, 0x0e, 0x99, 0x37, 0xf5, 0x8f, 0xdc, 0xb1, 0x5f, 0x68, 0x1f, 0x75, 0xa8, 0x80, /* Byte value: 0xe3 */ + 0xcb, 0x88, 0x1d, 0x02, 0x33, 0x8b, 0x27, 0x74, 0x69, 0xfc, 0xde, 0x55, 0x44, 0xd0, 0x38, 0xf7, /* Byte value: 0xe4 */ + 0xed, 0x57, 0x13, 0x20, 0xb6, 0x67, 0x35, 0x4c, 0x5f, 0x1b, 0x7e, 0x19, 0xca, 0x9e, 0x06, 0xab, /* Byte value: 0xe5 */ + 0xf4, 0xf9, 0x35, 0x60, 0x19, 0xa9, 0x5f, 0xd4, 0xe1, 0x2d, 0x82, 0x2b, 0x9d, 0x61, 0x0a, 0x3e, /* Byte value: 0xe6 */ + 0xce, 0x98, 0xec, 0xcb, 0x35, 0xd7, 0xf7, 0x36, 0xda, 0xae, 0x88, 0x5f, 0x4c, 0xbc, 0xd0, 0x4b, /* Byte value: 0xe7 */ + 0x99, 0x95, 0x62, 0xb5, 0xee, 0x9b, 0xa6, 0x4b, 0x29, 0xde, 0x6a, 0xf1, 0xab, 0xe7, 0x71, 0x41, /* Byte value: 0xe8 */ + 0x10, 0x3f, 0xe9, 0x56, 0xa1, 0x42, 0xf8, 0x22, 0xcb, 0x1d, 0x62, 0x20, 0xfe, 0x03, 0x47, 0xfb, /* Byte value: 0xe9 */ + 0x44, 0x83, 0x89, 0x6f, 0x78, 0x3a, 0x58, 0x61, 0xe8, 0xe2, 0xb2, 0x88, 0xa0, 0x7c, 0xbe, 0x24, /* Byte value: 0xea */ + 0x40, 0xfc, 0x22, 0x9b, 0xc1, 0xcb, 0x66, 0x88, 0xaa, 0x74, 0x4b, 0x80, 0x7e, 0x0c, 0xdf, 0x6a, /* Byte value: 0xeb */ + 0x92, 0xda, 0x19, 0xd9, 0x5d, 0x8e, 0x2b, 0x64, 0x7d, 0xbe, 0x69, 0xe7, 0x6d, 0x23, 0xeb, 0x08, /* Byte value: 0xec */ + 0x3a, 0x61, 0xd9, 0xab, 0x2c, 0x7e, 0xa8, 0xe2, 0x3b, 0x83, 0x0a, 0x74, 0xd1, 0xdd, 0xda, 0x75, /* Byte value: 0xed */ + 0x01, 0x6f, 0x5a, 0x3d, 0xbf, 0xad, 0xee, 0xab, 0xf1, 0xc4, 0xaf, 0x02, 0xd6, 0x1c, 0x89, 0xf2, /* Byte value: 0xee */ + 0x26, 0xdf, 0x0e, 0x22, 0x85, 0xec, 0x12, 0x38, 0x36, 0xe7, 0xa0, 0x4c, 0x8e, 0x4e, 0x3e, 0x5c, /* Byte value: 0xef */ + 0x12, 0xe1, 0x5d, 0x2c, 0x1c, 0xdb, 0xe7, 0xb7, 0xea, 0x56, 0xff, 0x24, 0x91, 0x3b, 0x96, 0xdc, /* Byte value: 0xf0 */ + 0x1a, 0x1f, 0xc8, 0x07, 0xad, 0xfa, 0x9b, 0xa6, 0x6e, 0xb9, 0xce, 0x34, 0xee, 0xdb, 0x54, 0x40, /* Byte value: 0xf1 */ + 0x48, 0x02, 0xb7, 0xb0, 0x70, 0xea, 0x1a, 0x99, 0x2e, 0x9b, 0x7a, 0x90, 0x01, 0xec, 0x1d, 0xf6, /* Byte value: 0xf2 */ + 0x68, 0x7c, 0xa6, 0x1c, 0xf1, 0x6e, 0x29, 0xdd, 0x7b, 0xa1, 0xbe, 0xd0, 0x3e, 0xea, 0x93, 0xc3, /* Byte value: 0xf3 */ + 0xf5, 0x96, 0x6f, 0x5d, 0xa6, 0x04, 0xb1, 0x7f, 0x10, 0xe9, 0x2d, 0x29, 0x4b, 0x7d, 0x83, 0xcc, /* Byte value: 0xf4 */ + 0x81, 0x54, 0x1e, 0xc8, 0xfe, 0xf8, 0x22, 0x78, 0x66, 0x2c, 0x39, 0xc1, 0x2a, 0x04, 0xf4, 0x26, /* Byte value: 0xf5 */ + 0x8b, 0x74, 0x3f, 0x99, 0xf2, 0x40, 0x41, 0xfc, 0xc3, 0x88, 0x95, 0xd5, 0x3a, 0xdc, 0xe7, 0x9d, /* Byte value: 0xf6 */ + 0xc7, 0x09, 0x23, 0xdd, 0x3b, 0x5b, 0x65, 0x8c, 0xaf, 0x85, 0x16, 0x4d, 0xe5, 0x40, 0x9b, 0x25, /* Byte value: 0xf7 */ + 0xd6, 0x59, 0x90, 0xb6, 0x25, 0xb4, 0x73, 0x05, 0x95, 0x5c, 0xdb, 0x6f, 0xcd, 0x5f, 0x55, 0x2c, /* Byte value: 0xf8 */ + 0x20, 0x7e, 0x11, 0xac, 0x81, 0x84, 0x33, 0x44, 0x55, 0x3a, 0xc4, 0x40, 0x3f, 0x06, 0x8e, 0x35, /* Byte value: 0xf9 */ + 0x0a, 0x20, 0x21, 0x51, 0x0c, 0xb8, 0x63, 0x84, 0xa5, 0xa4, 0xac, 0x14, 0x10, 0xd8, 0x13, 0xbb, /* Byte value: 0xfa */ + 0x08, 0xfe, 0x95, 0x2b, 0xb1, 0x21, 0x7c, 0x11, 0x84, 0xef, 0x31, 0x10, 0x7f, 0xe0, 0xc2, 0x9c, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x4c, 0x7d, 0x1c, 0x44, 0xc9, 0x1b, 0x24, 0x70, 0x6c, 0x0d, 0x83, 0x98, 0xdf, 0x9c, 0x7c, 0xb8, /* Byte value: 0xfd */ + 0xd7, 0x36, 0xca, 0x8b, 0x9a, 0x19, 0x9d, 0xae, 0x64, 0x98, 0x74, 0x6d, 0x1b, 0x43, 0xdc, 0xde, /* Byte value: 0xfe */ + 0x74, 0xc2, 0x71, 0x95, 0x58, 0xfc, 0x93, 0x07, 0x76, 0xc5, 0x14, 0xe8, 0x61, 0x79, 0x77, 0xea, /* Byte value: 0xff */ + + /* Matrix row: 10 */ + 0x51, 0xf6, 0x5f, 0xcc, 0xc9, 0xbb, 0x4b, 0xca, 0x7e, 0x52, 0xea, 0x5b, 0x67, 0xa2, 0xef, 0xe6, /* Byte value: 0x00 */ + 0x33, 0xae, 0xa5, 0x03, 0xf8, 0x72, 0xcf, 0x10, 0xac, 0xdb, 0x41, 0x06, 0xb8, 0x66, 0xba, 0x67, /* Byte value: 0x01 */ + 0xa4, 0x6a, 0x15, 0x17, 0x52, 0x6f, 0xc2, 0xd0, 0x70, 0x26, 0xcb, 0x2e, 0x94, 0x8b, 0x8e, 0x86, /* Byte value: 0x02 */ + 0x67, 0xde, 0xe5, 0xa5, 0xd2, 0x7e, 0xfa, 0xff, 0x18, 0x4a, 0x19, 0x89, 0xa8, 0xce, 0x6e, 0xad, /* Byte value: 0x03 */ + 0x0a, 0xcf, 0x3e, 0xd4, 0x05, 0xad, 0xfc, 0x4a, 0x57, 0x45, 0xa7, 0x6b, 0xee, 0x14, 0x76, 0x58, /* Byte value: 0x04 */ + 0xe7, 0x84, 0x9d, 0xfc, 0x92, 0x97, 0xe6, 0x09, 0x2c, 0x7c, 0x70, 0x3b, 0xb6, 0x0d, 0x1e, 0x59, /* Byte value: 0x05 */ + 0x28, 0xba, 0xf8, 0xd6, 0x14, 0xf1, 0x76, 0xeb, 0x9f, 0xd7, 0xd9, 0x6f, 0x3e, 0x50, 0x1b, 0xa3, /* Byte value: 0x06 */ + 0x1a, 0x55, 0x31, 0x76, 0x0d, 0x19, 0x1e, 0x24, 0xb0, 0x33, 0x03, 0xec, 0x9d, 0x34, 0x78, 0xa7, /* Byte value: 0x07 */ + 0x6c, 0x50, 0xb7, 0xd2, 0x36, 0x49, 0xa1, 0x6a, 0xcc, 0x30, 0x25, 0x67, 0x5d, 0xd8, 0xc1, 0x96, /* Byte value: 0x08 */ + 0x65, 0x5c, 0x3d, 0x20, 0xd3, 0x89, 0x77, 0x82, 0xdd, 0x34, 0xec, 0x40, 0x9e, 0xca, 0x1f, 0x6b, /* Byte value: 0x09 */ + 0xfa, 0xd5, 0x6b, 0x65, 0x7d, 0xce, 0x0b, 0x75, 0x93, 0xf2, 0x34, 0xca, 0x6a, 0x37, 0x2c, 0x14, /* Byte value: 0x0a */ + 0xe8, 0xcd, 0xbc, 0x42, 0x74, 0x8d, 0x64, 0x66, 0xb1, 0xfa, 0x65, 0x84, 0x2f, 0x13, 0x53, 0x2d, /* Byte value: 0x0b */ + 0xac, 0x27, 0xf3, 0x46, 0x56, 0x35, 0xb3, 0xe7, 0xe2, 0x1d, 0x99, 0x8c, 0x4c, 0x9b, 0x89, 0x18, /* Byte value: 0x0c */ + 0x5a, 0x78, 0x0d, 0xbb, 0x2d, 0x8c, 0x10, 0x5f, 0xaa, 0x28, 0xd6, 0xb5, 0x92, 0xb4, 0x40, 0xdd, /* Byte value: 0x0d */ + 0xa9, 0xa1, 0xec, 0x2c, 0xb5, 0x82, 0xcd, 0xc2, 0x28, 0xde, 0x2b, 0x58, 0x3b, 0x91, 0xb2, 0x34, /* Byte value: 0x0e */ + 0x30, 0x6d, 0x11, 0x25, 0x18, 0x1f, 0xe5, 0xb2, 0xea, 0x9a, 0x2f, 0x4a, 0x95, 0x60, 0x12, 0xc2, /* Byte value: 0x0f */ + 0x8b, 0xd4, 0x2a, 0x2e, 0xa4, 0xde, 0x47, 0x63, 0xe0, 0x4c, 0x55, 0x5c, 0xeb, 0xd5, 0xdf, 0xcf, /* Byte value: 0x10 */ + 0x83, 0x99, 0xcc, 0x7f, 0xa0, 0x84, 0x36, 0x54, 0x72, 0x77, 0x07, 0xfe, 0x33, 0xc5, 0xd8, 0x51, /* Byte value: 0x11 */ + 0xef, 0xc9, 0x7b, 0xad, 0x96, 0xcd, 0x97, 0x3e, 0xbe, 0x47, 0x22, 0x99, 0x6e, 0x1d, 0x19, 0xc7, /* Byte value: 0x12 */ + 0x66, 0x9f, 0x89, 0x06, 0x33, 0xe4, 0x5d, 0x20, 0x9b, 0x75, 0x82, 0x0c, 0xb3, 0xcc, 0xb7, 0xce, /* Byte value: 0x13 */ + 0x14, 0x5d, 0x7c, 0x6b, 0x0a, 0x99, 0x3b, 0x94, 0xae, 0x8a, 0x8d, 0xd6, 0x1f, 0x28, 0xec, 0xb0, /* Byte value: 0x14 */ + 0x0d, 0xcb, 0xf9, 0x3b, 0xe7, 0xed, 0x0f, 0x12, 0x58, 0xf8, 0xe0, 0x76, 0xaf, 0x1a, 0x3c, 0xb2, /* Byte value: 0x15 */ + 0x05, 0x86, 0x1f, 0x6a, 0xe3, 0xb7, 0x7e, 0x25, 0xca, 0xc3, 0xb2, 0xd4, 0x77, 0x0a, 0x3b, 0x2c, /* Byte value: 0x16 */ + 0x92, 0x42, 0xaf, 0x7e, 0x49, 0xaa, 0x73, 0xe5, 0x16, 0x3e, 0x38, 0xfc, 0x5b, 0xe7, 0x0f, 0xcd, /* Byte value: 0x17 */ + 0x7a, 0x8f, 0x13, 0x3c, 0x3d, 0x27, 0x17, 0x83, 0xa7, 0xc4, 0x5d, 0x78, 0x74, 0xf4, 0x5c, 0xe0, /* Byte value: 0x18 */ + 0x13, 0x59, 0xbb, 0x84, 0xe8, 0xd9, 0xc8, 0xcc, 0xa1, 0x37, 0xca, 0xcb, 0x5e, 0x26, 0xa6, 0x5a, /* Byte value: 0x19 */ + 0xd8, 0xa0, 0xad, 0x67, 0x6c, 0x92, 0x81, 0xd4, 0x5b, 0x60, 0x4a, 0xce, 0xba, 0x73, 0x41, 0xef, /* Byte value: 0x1a */ + 0x87, 0x5e, 0xbf, 0xb6, 0xa2, 0xa9, 0xef, 0xae, 0x3b, 0x8b, 0x2e, 0xaf, 0x5f, 0xcd, 0x3a, 0x1e, /* Byte value: 0x1b */ + 0xb5, 0xb1, 0x76, 0x16, 0xbb, 0x41, 0x87, 0x61, 0x14, 0x6f, 0xf4, 0x2c, 0xfc, 0xa9, 0x59, 0x1a, /* Byte value: 0x1c */ + 0xdf, 0xa4, 0x6a, 0x88, 0x8e, 0xd2, 0x72, 0x8c, 0x54, 0xdd, 0x0d, 0xd3, 0xfb, 0x7d, 0x0b, 0x05, /* Byte value: 0x1d */ + 0x91, 0x81, 0x1b, 0x58, 0xa9, 0xc7, 0x59, 0x47, 0x50, 0x7f, 0x56, 0xb0, 0x76, 0xe1, 0xa7, 0x68, /* Byte value: 0x1e */ + 0x2d, 0x3c, 0xe7, 0xbc, 0xf7, 0x46, 0x08, 0xce, 0x55, 0x14, 0x6b, 0xbb, 0x49, 0x5a, 0x20, 0x8f, /* Byte value: 0x1f */ + 0xa0, 0xad, 0x66, 0xde, 0x50, 0x42, 0x1b, 0x2a, 0x39, 0xda, 0xe2, 0x7f, 0xf8, 0x83, 0x6c, 0xc9, /* Byte value: 0x20 */ + 0xbf, 0x7e, 0x48, 0xc2, 0xbe, 0xec, 0x7b, 0x2b, 0x43, 0x2a, 0x53, 0x47, 0x12, 0xbd, 0x2f, 0x42, /* Byte value: 0x21 */ + 0x24, 0x30, 0x6d, 0x4e, 0x12, 0x86, 0xde, 0x26, 0x44, 0x10, 0xa2, 0x9c, 0x8a, 0x48, 0xfe, 0x72, /* Byte value: 0x22 */ + 0x49, 0x21, 0xb6, 0x3f, 0xc5, 0x55, 0xd8, 0x93, 0x0b, 0x1f, 0x1c, 0x7e, 0xcc, 0x92, 0xe6, 0x87, /* Byte value: 0x23 */ + 0xee, 0x88, 0x17, 0x0e, 0x77, 0x57, 0x30, 0xe1, 0x3d, 0x78, 0xb9, 0x1c, 0x75, 0x1f, 0xc0, 0xa4, /* Byte value: 0x24 */ + 0x2c, 0x7d, 0x8b, 0x1f, 0x16, 0xdc, 0xaf, 0x11, 0xd6, 0x2b, 0xf0, 0x3e, 0x52, 0x58, 0xf9, 0xec, /* Byte value: 0x25 */ + 0x1d, 0x51, 0xf6, 0x99, 0xef, 0x59, 0xed, 0x7c, 0xbf, 0x8e, 0x44, 0xf1, 0xdc, 0x3a, 0x32, 0x4d, /* Byte value: 0x26 */ + 0xcc, 0xfd, 0xd1, 0x0c, 0x66, 0x0b, 0xba, 0x40, 0xf5, 0xea, 0xc7, 0x18, 0xa5, 0x5b, 0xad, 0x5f, /* Byte value: 0x27 */ + 0x7c, 0xca, 0xb8, 0x70, 0x3e, 0xfd, 0x43, 0x04, 0x2b, 0x46, 0x81, 0xe0, 0x2e, 0xf8, 0xcf, 0x69, /* Byte value: 0x28 */ + 0x8e, 0x52, 0x35, 0x44, 0x47, 0x69, 0x39, 0x46, 0x2a, 0x8f, 0xe7, 0x88, 0x9c, 0xdf, 0xe4, 0xe3, /* Byte value: 0x29 */ + 0xb8, 0x7a, 0x8f, 0x2d, 0x5c, 0xac, 0x88, 0x73, 0x4c, 0x97, 0x14, 0x5a, 0x53, 0xb3, 0x65, 0xa8, /* Byte value: 0x2a */ + 0xe6, 0xc5, 0xf1, 0x5f, 0x73, 0x0d, 0x41, 0xd6, 0xaf, 0x43, 0xeb, 0xbe, 0xad, 0x0f, 0xc7, 0x3a, /* Byte value: 0x2b */ + 0xf4, 0xdd, 0x26, 0x78, 0x7a, 0x4e, 0x2e, 0xc5, 0x8d, 0x4b, 0xba, 0xf0, 0xe8, 0x2b, 0xb8, 0x03, /* Byte value: 0x2c */ + 0x26, 0xb2, 0xb5, 0xcb, 0x13, 0x71, 0x53, 0x5b, 0x81, 0x6e, 0x57, 0x55, 0xbc, 0x4c, 0x8f, 0xb4, /* Byte value: 0x2d */ + 0x1b, 0x14, 0x5d, 0xd5, 0xec, 0x83, 0xb9, 0xfb, 0x33, 0x0c, 0x98, 0x69, 0x86, 0x36, 0xa1, 0xc4, /* Byte value: 0x2e */ + 0x4f, 0x64, 0x1d, 0x73, 0xc6, 0x8f, 0x8c, 0x14, 0x87, 0x9d, 0xc0, 0xe6, 0x96, 0x9e, 0x75, 0x0e, /* Byte value: 0x2f */ + 0xd5, 0x6b, 0x54, 0x5c, 0x8b, 0x7f, 0x8e, 0xc6, 0x03, 0x98, 0xaa, 0xb8, 0x15, 0x69, 0x7d, 0x5d, /* Byte value: 0x30 */ + 0xc5, 0xf1, 0x5b, 0xfe, 0x83, 0xcb, 0x6c, 0xa8, 0xe4, 0xee, 0x0e, 0x3f, 0x66, 0x49, 0x73, 0xa2, /* Byte value: 0x31 */ + 0x50, 0xb7, 0x33, 0x6f, 0x28, 0x21, 0xec, 0x15, 0xfd, 0x6d, 0x71, 0xde, 0x7c, 0xa0, 0x36, 0x85, /* Byte value: 0x32 */ + 0x79, 0x4c, 0xa7, 0x1a, 0xdd, 0x4a, 0x3d, 0x21, 0xe1, 0x85, 0x33, 0x34, 0x59, 0xf2, 0xf4, 0x45, /* Byte value: 0x33 */ + 0x77, 0x44, 0xea, 0x07, 0xda, 0xca, 0x18, 0x91, 0xff, 0x3c, 0xbd, 0x0e, 0xdb, 0xee, 0x60, 0x52, /* Byte value: 0x34 */ + 0x16, 0xdf, 0xa4, 0xee, 0x0b, 0x6e, 0xb6, 0xe9, 0x6b, 0xf4, 0x78, 0x1f, 0x29, 0x2c, 0x9d, 0x76, /* Byte value: 0x35 */ + 0x52, 0x35, 0xeb, 0xea, 0x29, 0xd6, 0x61, 0x68, 0x38, 0x13, 0x84, 0x17, 0x4a, 0xa4, 0x47, 0x43, /* Byte value: 0x36 */ + 0x15, 0x1c, 0x10, 0xc8, 0xeb, 0x03, 0x9c, 0x4b, 0x2d, 0xb5, 0x16, 0x53, 0x04, 0x2a, 0x35, 0xd3, /* Byte value: 0x37 */ + 0x9b, 0x4e, 0x25, 0x8c, 0xac, 0x6a, 0xa5, 0x0d, 0x07, 0x3a, 0xf1, 0xdb, 0x98, 0xf5, 0xd1, 0x30, /* Byte value: 0x38 */ + 0xb4, 0xf0, 0x1a, 0xb5, 0x5a, 0xdb, 0x20, 0xbe, 0x97, 0x50, 0x6f, 0xa9, 0xe7, 0xab, 0x80, 0x79, /* Byte value: 0x39 */ + 0x3e, 0x65, 0x5c, 0x38, 0x1f, 0x9f, 0xc0, 0x02, 0xf4, 0x23, 0xa1, 0x70, 0x17, 0x7c, 0x86, 0xd5, /* Byte value: 0x3a */ + 0x80, 0x5a, 0x78, 0x59, 0x40, 0xe9, 0x1c, 0xf6, 0x34, 0x36, 0x69, 0xb2, 0x1e, 0xc3, 0x70, 0xf4, /* Byte value: 0x3b */ + 0x36, 0x28, 0xba, 0x69, 0x1b, 0xc5, 0xb1, 0x35, 0x66, 0x18, 0xf3, 0xd2, 0xcf, 0x6c, 0x81, 0x4b, /* Byte value: 0x3c */ + 0xd3, 0x2e, 0xff, 0x10, 0x88, 0xa5, 0xda, 0x41, 0x8f, 0x1a, 0x76, 0x20, 0x4f, 0x65, 0xee, 0xd4, /* Byte value: 0x3d */ + 0x2b, 0x79, 0x4c, 0xf0, 0xf4, 0x9c, 0x5c, 0x49, 0xd9, 0x96, 0xb7, 0x23, 0x13, 0x56, 0xb3, 0x06, /* Byte value: 0x3e */ + 0x01, 0x41, 0x6c, 0xa3, 0xe1, 0x9a, 0xa7, 0xdf, 0x83, 0x3f, 0x9b, 0x85, 0x1b, 0x02, 0xd9, 0x63, /* Byte value: 0x3f */ + 0x99, 0xcc, 0xfd, 0x09, 0xad, 0x9d, 0x28, 0x70, 0xc2, 0x44, 0x04, 0x12, 0xae, 0xf1, 0xa0, 0xf6, /* Byte value: 0x40 */ + 0xdd, 0x26, 0xb2, 0x0d, 0x8f, 0x25, 0xff, 0xf1, 0x91, 0xa3, 0xf8, 0x1a, 0xcd, 0x79, 0x7a, 0xc3, /* Byte value: 0x41 */ + 0xf6, 0x5f, 0xfe, 0xfd, 0x7b, 0xb9, 0xa3, 0xb8, 0x48, 0x35, 0x4f, 0x39, 0xde, 0x2f, 0xc9, 0xc5, /* Byte value: 0x42 */ + 0x68, 0x97, 0xc4, 0x1b, 0x34, 0x64, 0x78, 0x90, 0x85, 0xcc, 0x0c, 0x36, 0x31, 0xd0, 0x23, 0xd9, /* Byte value: 0x43 */ + 0x12, 0x18, 0xd7, 0x27, 0x09, 0x43, 0x6f, 0x13, 0x22, 0x08, 0x51, 0x4e, 0x45, 0x24, 0x7f, 0x39, /* Byte value: 0x44 */ + 0x8a, 0x95, 0x46, 0x8d, 0x45, 0x44, 0xe0, 0xbc, 0x63, 0x73, 0xce, 0xd9, 0xf0, 0xd7, 0x06, 0xac, /* Byte value: 0x45 */ + 0x09, 0x0c, 0x8a, 0xf2, 0xe5, 0xc0, 0xd6, 0xe8, 0x11, 0x04, 0xc9, 0x27, 0xc3, 0x12, 0xde, 0xfd, /* Byte value: 0x46 */ + 0xa6, 0xe8, 0xcd, 0x92, 0x53, 0x98, 0x4f, 0xad, 0xb5, 0x58, 0x3e, 0xe7, 0xa2, 0x8f, 0xff, 0x40, /* Byte value: 0x47 */ + 0x72, 0xc2, 0xf5, 0x6d, 0x39, 0x7d, 0x66, 0xb4, 0x35, 0xff, 0x0f, 0xda, 0xac, 0xe4, 0x5b, 0x7e, /* Byte value: 0x48 */ + 0xc4, 0xb0, 0x37, 0x5d, 0x62, 0x51, 0xcb, 0x77, 0x67, 0xd1, 0x95, 0xba, 0x7d, 0x4b, 0xaa, 0xc1, /* Byte value: 0x49 */ + 0x3a, 0xa2, 0x2f, 0xf1, 0x1d, 0xb2, 0x19, 0xf8, 0xbd, 0xdf, 0x88, 0x21, 0x7b, 0x74, 0x64, 0x9a, /* Byte value: 0x4a */ + 0x74, 0x87, 0x5e, 0x21, 0x3a, 0xa7, 0x32, 0x33, 0xb9, 0x7d, 0xd3, 0x42, 0xf6, 0xe8, 0xc8, 0xf7, /* Byte value: 0x4b */ + 0xc1, 0x36, 0x28, 0x37, 0x81, 0xe6, 0xb5, 0x52, 0xad, 0x12, 0x27, 0x6e, 0x0a, 0x41, 0x91, 0xed, /* Byte value: 0x4c */ + 0xca, 0xb8, 0x7a, 0x40, 0x65, 0xd1, 0xee, 0xc7, 0x79, 0x68, 0x1b, 0x80, 0xff, 0x57, 0x3e, 0xd6, /* Byte value: 0x4d */ + 0xb9, 0x3b, 0xe3, 0x8e, 0xbd, 0x36, 0x2f, 0xac, 0xcf, 0xa8, 0x8f, 0xdf, 0x48, 0xb1, 0xbc, 0xcb, /* Byte value: 0x4e */ + 0x70, 0x40, 0x2d, 0xe8, 0x38, 0x8a, 0xeb, 0xc9, 0xf0, 0x81, 0xfa, 0x13, 0x9a, 0xe0, 0x2a, 0xb8, /* Byte value: 0x4f */ + 0xbc, 0xbd, 0xfc, 0xe4, 0x5e, 0x81, 0x51, 0x89, 0x05, 0x6b, 0x3d, 0x0b, 0x3f, 0xbb, 0x87, 0xe7, /* Byte value: 0x50 */ + 0x34, 0xaa, 0x62, 0xec, 0x1a, 0x32, 0x3c, 0x48, 0xa3, 0x66, 0x06, 0x1b, 0xf9, 0x68, 0xf0, 0x8d, /* Byte value: 0x51 */ + 0x6a, 0x15, 0x1c, 0x9e, 0x35, 0x93, 0xf5, 0xed, 0x40, 0xb2, 0xf9, 0xff, 0x07, 0xd4, 0x52, 0x1f, /* Byte value: 0x52 */ + 0x48, 0x60, 0xda, 0x9c, 0x24, 0xcf, 0x7f, 0x4c, 0x88, 0x20, 0x87, 0xfb, 0xd7, 0x90, 0x3f, 0xe4, /* Byte value: 0x53 */ + 0x5f, 0xfe, 0x12, 0xd1, 0xce, 0x3b, 0x6e, 0x7a, 0x60, 0xeb, 0x64, 0x61, 0xe5, 0xbe, 0x7b, 0xf1, /* Byte value: 0x54 */ + 0x8f, 0x13, 0x59, 0xe7, 0xa6, 0xf3, 0x9e, 0x99, 0xa9, 0xb0, 0x7c, 0x0d, 0x87, 0xdd, 0x3d, 0x80, /* Byte value: 0x55 */ + 0x69, 0xd6, 0xa8, 0xb8, 0xd5, 0xfe, 0xdf, 0x4f, 0x06, 0xf3, 0x97, 0xb3, 0x2a, 0xd2, 0xfa, 0xba, /* Byte value: 0x56 */ + 0x9a, 0x0f, 0x49, 0x2f, 0x4d, 0xf0, 0x02, 0xd2, 0x84, 0x05, 0x6a, 0x5e, 0x83, 0xf7, 0x08, 0x53, /* Byte value: 0x57 */ + 0xda, 0x22, 0x75, 0xe2, 0x6d, 0x65, 0x0c, 0xa9, 0x9e, 0x1e, 0xbf, 0x07, 0x8c, 0x77, 0x30, 0x29, /* Byte value: 0x58 */ + 0xfd, 0xd1, 0xac, 0x8a, 0x9f, 0x8e, 0xf8, 0x2d, 0x9c, 0x4f, 0x73, 0xd7, 0x2b, 0x39, 0x66, 0xfe, /* Byte value: 0x59 */ + 0x39, 0x61, 0x9b, 0xd7, 0xfd, 0xdf, 0x33, 0x5a, 0xfb, 0x9e, 0xe6, 0x6d, 0x56, 0x72, 0xcc, 0x3f, /* Byte value: 0x5a */ + 0xa5, 0x2b, 0x79, 0xb4, 0xb3, 0xf5, 0x65, 0x0f, 0xf3, 0x19, 0x50, 0xab, 0x8f, 0x89, 0x57, 0xe5, /* Byte value: 0x5b */ + 0xfc, 0x90, 0xc0, 0x29, 0x7e, 0x14, 0x5f, 0xf2, 0x1f, 0x70, 0xe8, 0x52, 0x30, 0x3b, 0xbf, 0x9d, /* Byte value: 0x5c */ + 0xe0, 0x80, 0x5a, 0x13, 0x70, 0xd7, 0x15, 0x51, 0x23, 0xc1, 0x37, 0x26, 0xf7, 0x03, 0x54, 0xb3, /* Byte value: 0x5d */ + 0x0c, 0x8a, 0x95, 0x98, 0x06, 0x77, 0xa8, 0xcd, 0xdb, 0xc7, 0x7b, 0xf3, 0xb4, 0x18, 0xe5, 0xd1, /* Byte value: 0x5e */ + 0x57, 0xb3, 0xf4, 0x80, 0xca, 0x61, 0x1f, 0x4d, 0xf2, 0xd0, 0x36, 0xc3, 0x3d, 0xae, 0x7c, 0x6f, /* Byte value: 0x5f */ + 0x54, 0x70, 0x40, 0xa6, 0x2a, 0x0c, 0x35, 0xef, 0xb4, 0x91, 0x58, 0x8f, 0x10, 0xa8, 0xd4, 0xca, /* Byte value: 0x60 */ + 0x8d, 0x91, 0x81, 0x62, 0xa7, 0x04, 0x13, 0xe4, 0x6c, 0xce, 0x89, 0xc4, 0xb1, 0xd9, 0x4c, 0x46, /* Byte value: 0x61 */ + 0xd2, 0x6f, 0x93, 0xb3, 0x69, 0x3f, 0x7d, 0x9e, 0x0c, 0x25, 0xed, 0xa5, 0x54, 0x67, 0x37, 0xb7, /* Byte value: 0x62 */ + 0xf7, 0x1e, 0x92, 0x5e, 0x9a, 0x23, 0x04, 0x67, 0xcb, 0x0a, 0xd4, 0xbc, 0xc5, 0x2d, 0x10, 0xa6, /* Byte value: 0x63 */ + 0x5e, 0xbf, 0x7e, 0x72, 0x2f, 0xa1, 0xc9, 0xa5, 0xe3, 0xd4, 0xff, 0xe4, 0xfe, 0xbc, 0xa2, 0x92, /* Byte value: 0x64 */ + 0xf9, 0x16, 0xdf, 0x43, 0x9d, 0xa3, 0x21, 0xd7, 0xd5, 0xb3, 0x5a, 0x86, 0x47, 0x31, 0x84, 0xb1, /* Byte value: 0x65 */ + 0xf2, 0x98, 0x8d, 0x34, 0x79, 0x94, 0x7a, 0x42, 0x01, 0xc9, 0x66, 0x68, 0xb2, 0x27, 0x2b, 0x8a, /* Byte value: 0x66 */ + 0xe3, 0x43, 0xee, 0x35, 0x90, 0xba, 0x3f, 0xf3, 0x65, 0x80, 0x59, 0x6a, 0xda, 0x05, 0xfc, 0x16, /* Byte value: 0x67 */ + 0x3b, 0xe3, 0x43, 0x52, 0xfc, 0x28, 0xbe, 0x27, 0x3e, 0xe0, 0x13, 0xa4, 0x60, 0x76, 0xbd, 0xf9, /* Byte value: 0x68 */ + 0x03, 0xc3, 0xb4, 0x26, 0xe0, 0x6d, 0x2a, 0xa2, 0x46, 0x41, 0x6e, 0x4c, 0x2d, 0x06, 0xa8, 0xa5, /* Byte value: 0x69 */ + 0xa1, 0xec, 0x0a, 0x7d, 0xb1, 0xd8, 0xbc, 0xf5, 0xba, 0xe5, 0x79, 0xfa, 0xe3, 0x81, 0xb5, 0xaa, /* Byte value: 0x6a */ + 0x96, 0x85, 0xdc, 0xb7, 0x4b, 0x87, 0xaa, 0x1f, 0x5f, 0xc2, 0x11, 0xad, 0x37, 0xef, 0xed, 0x82, /* Byte value: 0x6b */ + 0xaa, 0x62, 0x58, 0x0a, 0x55, 0xef, 0xe7, 0x60, 0x6e, 0x9f, 0x45, 0x14, 0x16, 0x97, 0x1a, 0x91, /* Byte value: 0x6c */ + 0x9f, 0x89, 0x56, 0x45, 0xae, 0x47, 0x7c, 0xf7, 0x4e, 0xc6, 0xd8, 0x8a, 0xf4, 0xfd, 0x33, 0x7f, /* Byte value: 0x6d */ + 0x46, 0x68, 0x97, 0x81, 0x23, 0x4f, 0x5a, 0xfc, 0x96, 0x99, 0x09, 0xc1, 0x55, 0x8c, 0xab, 0xf3, /* Byte value: 0x6e */ + 0x41, 0x6c, 0x50, 0x6e, 0xc1, 0x0f, 0xa9, 0xa4, 0x99, 0x24, 0x4e, 0xdc, 0x14, 0x82, 0xe1, 0x19, /* Byte value: 0x6f */ + 0x2a, 0x38, 0x20, 0x53, 0x15, 0x06, 0xfb, 0x96, 0x5a, 0xa9, 0x2c, 0xa6, 0x08, 0x54, 0x6a, 0x65, /* Byte value: 0x70 */ + 0x60, 0xda, 0x22, 0x4a, 0x30, 0x3e, 0x09, 0xa7, 0x17, 0xf7, 0x5e, 0x94, 0xe9, 0xc0, 0x24, 0x47, /* Byte value: 0x71 */ + 0xe5, 0x06, 0x45, 0x79, 0x93, 0x60, 0x6b, 0x74, 0xe9, 0x02, 0x85, 0xf2, 0x80, 0x09, 0x6f, 0x9f, /* Byte value: 0x72 */ + 0x94, 0x07, 0x04, 0x32, 0x4a, 0x70, 0x27, 0x62, 0x9a, 0xbc, 0xe4, 0x64, 0x01, 0xeb, 0x9c, 0x44, /* Byte value: 0x73 */ + 0xbe, 0x3f, 0x24, 0x61, 0x5f, 0x76, 0xdc, 0xf4, 0xc0, 0x15, 0xc8, 0xc2, 0x09, 0xbf, 0xf6, 0x21, /* Byte value: 0x74 */ + 0x90, 0xc0, 0x77, 0xfb, 0x48, 0x5d, 0xfe, 0x98, 0xd3, 0x40, 0xcd, 0x35, 0x6d, 0xe3, 0x7e, 0x0b, /* Byte value: 0x75 */ + 0x2f, 0xbe, 0x3f, 0x39, 0xf6, 0xb1, 0x85, 0xb3, 0x90, 0x6a, 0x9e, 0x72, 0x7f, 0x5e, 0x51, 0x49, /* Byte value: 0x76 */ + 0x9d, 0x0b, 0x8e, 0xc0, 0xaf, 0xb0, 0xf1, 0x8a, 0x8b, 0xb8, 0x2d, 0x43, 0xc2, 0xf9, 0x42, 0xb9, /* Byte value: 0x77 */ + 0x81, 0x1b, 0x14, 0xfa, 0xa1, 0x73, 0xbb, 0x29, 0xb7, 0x09, 0xf2, 0x37, 0x05, 0xc1, 0xa9, 0x97, /* Byte value: 0x78 */ + 0xa2, 0x2f, 0xbe, 0x5b, 0x51, 0xb5, 0x96, 0x57, 0xfc, 0xa4, 0x17, 0xb6, 0xce, 0x87, 0x1d, 0x0f, /* Byte value: 0x79 */ + 0x76, 0x05, 0x86, 0xa4, 0x3b, 0x50, 0xbf, 0x4e, 0x7c, 0x03, 0x26, 0x8b, 0xc0, 0xec, 0xb9, 0x31, /* Byte value: 0x7a */ + 0x4b, 0xa3, 0x6e, 0xba, 0xc4, 0xa2, 0x55, 0xee, 0xce, 0x61, 0xe9, 0xb7, 0xfa, 0x96, 0x97, 0x41, /* Byte value: 0x7b */ + 0xe4, 0x47, 0x29, 0xda, 0x72, 0xfa, 0xcc, 0xab, 0x6a, 0x3d, 0x1e, 0x77, 0x9b, 0x0b, 0xb6, 0xfc, /* Byte value: 0x7c */ + 0x06, 0x45, 0xab, 0x4c, 0x03, 0xda, 0x54, 0x87, 0x8c, 0x82, 0xdc, 0x98, 0x5a, 0x0c, 0x93, 0x89, /* Byte value: 0x7d */ + 0x55, 0x31, 0x2c, 0x05, 0xcb, 0x96, 0x92, 0x30, 0x37, 0xae, 0xc3, 0x0a, 0x0b, 0xaa, 0x0d, 0xa9, /* Byte value: 0x7e */ + 0xae, 0xa5, 0x2b, 0xc3, 0x57, 0xc2, 0x3e, 0x9a, 0x27, 0x63, 0x6c, 0x45, 0x7a, 0x9f, 0xf8, 0xde, /* Byte value: 0x7f */ + 0x1c, 0x10, 0x9a, 0x3a, 0x0e, 0xc3, 0x4a, 0xa3, 0x3c, 0xb1, 0xdf, 0x74, 0xc7, 0x38, 0xeb, 0x2e, /* Byte value: 0x80 */ + 0x75, 0xc6, 0x32, 0x82, 0xdb, 0x3d, 0x95, 0xec, 0x3a, 0x42, 0x48, 0xc7, 0xed, 0xea, 0x11, 0x94, /* Byte value: 0x81 */ + 0x5b, 0x39, 0x61, 0x18, 0xcc, 0x16, 0xb7, 0x80, 0x29, 0x17, 0x4d, 0x30, 0x89, 0xb6, 0x99, 0xbe, /* Byte value: 0x82 */ + 0x04, 0xc7, 0x73, 0xc9, 0x02, 0x2d, 0xd9, 0xfa, 0x49, 0xfc, 0x29, 0x51, 0x6c, 0x08, 0xe2, 0x4f, /* Byte value: 0x83 */ + 0x27, 0xf3, 0xd9, 0x68, 0xf2, 0xeb, 0xf4, 0x84, 0x02, 0x51, 0xcc, 0xd0, 0xa7, 0x4e, 0x56, 0xd7, /* Byte value: 0x84 */ + 0x4d, 0xe6, 0xc5, 0xf6, 0xc7, 0x78, 0x01, 0x69, 0x42, 0xe3, 0x35, 0x2f, 0xa0, 0x9a, 0x04, 0xc8, /* Byte value: 0x85 */ + 0x9c, 0x4a, 0xe2, 0x63, 0x4e, 0x2a, 0x56, 0x55, 0x08, 0x87, 0xb6, 0xc6, 0xd9, 0xfb, 0x9b, 0xda, /* Byte value: 0x86 */ + 0x20, 0xf7, 0x1e, 0x87, 0x10, 0xab, 0x07, 0xdc, 0x0d, 0xec, 0x8b, 0xcd, 0xe6, 0x40, 0x1c, 0x3d, /* Byte value: 0x87 */ + 0x53, 0x74, 0x87, 0x49, 0xc8, 0x4c, 0xc6, 0xb7, 0xbb, 0x2c, 0x1f, 0x92, 0x51, 0xa6, 0x9e, 0x20, /* Byte value: 0x88 */ + 0xd0, 0xed, 0x4b, 0x36, 0x68, 0xc8, 0xf0, 0xe3, 0xc9, 0x5b, 0x18, 0x6c, 0x62, 0x63, 0x46, 0x71, /* Byte value: 0x89 */ + 0x95, 0x46, 0x68, 0x91, 0xab, 0xea, 0x80, 0xbd, 0x19, 0x83, 0x7f, 0xe1, 0x1a, 0xe9, 0x45, 0x27, /* Byte value: 0x8a */ + 0xf3, 0xd9, 0xe1, 0x97, 0x98, 0x0e, 0xdd, 0x9d, 0x82, 0xf6, 0xfd, 0xed, 0xa9, 0x25, 0xf2, 0xe9, /* Byte value: 0x8b */ + 0x85, 0xdc, 0x67, 0x33, 0xa3, 0x5e, 0x62, 0xd3, 0xfe, 0xf5, 0xdb, 0x66, 0x69, 0xc9, 0x4b, 0xd8, /* Byte value: 0x8c */ + 0x88, 0x17, 0x9e, 0x08, 0x44, 0xb3, 0x6d, 0xc1, 0xa6, 0x0d, 0x3b, 0x10, 0xc6, 0xd3, 0x77, 0x6a, /* Byte value: 0x8d */ + 0xb0, 0x37, 0x69, 0x7c, 0x58, 0xf6, 0xf9, 0x44, 0xde, 0xac, 0x46, 0xf8, 0x8b, 0xa3, 0x62, 0x36, /* Byte value: 0x8e */ + 0x22, 0x75, 0xc6, 0x02, 0x11, 0x5c, 0x8a, 0xa1, 0xc8, 0x92, 0x7e, 0x04, 0xd0, 0x44, 0x6d, 0xfb, /* Byte value: 0x8f */ + 0x0b, 0x8e, 0x52, 0x77, 0xe4, 0x37, 0x5b, 0x95, 0xd4, 0x7a, 0x3c, 0xee, 0xf5, 0x16, 0xaf, 0x3b, /* Byte value: 0x90 */ + 0x02, 0x82, 0xd8, 0x85, 0x01, 0xf7, 0x8d, 0x7d, 0xc5, 0x7e, 0xf5, 0xc9, 0x36, 0x04, 0x71, 0xc6, /* Byte value: 0x91 */ + 0xc9, 0x7b, 0xce, 0x66, 0x85, 0xbc, 0xc4, 0x65, 0x3f, 0x29, 0x75, 0xcc, 0xd2, 0x51, 0x96, 0x73, /* Byte value: 0x92 */ + 0xdb, 0x63, 0x19, 0x41, 0x8c, 0xff, 0xab, 0x76, 0x1d, 0x21, 0x24, 0x82, 0x97, 0x75, 0xe9, 0x4a, /* Byte value: 0x93 */ + 0xb6, 0x72, 0xc2, 0x30, 0x5b, 0x2c, 0xad, 0xc3, 0x52, 0x2e, 0x9a, 0x60, 0xd1, 0xaf, 0xf1, 0xbf, /* Byte value: 0x94 */ + 0x40, 0x2d, 0x3c, 0xcd, 0x20, 0x95, 0x0e, 0x7b, 0x1a, 0x1b, 0xd5, 0x59, 0x0f, 0x80, 0x38, 0x7a, /* Byte value: 0x95 */ + 0x4e, 0x25, 0x71, 0xd0, 0x27, 0x15, 0x2b, 0xcb, 0x04, 0xa2, 0x5b, 0x63, 0x8d, 0x9c, 0xac, 0x6d, /* Byte value: 0x96 */ + 0xd7, 0xe9, 0x8c, 0xd9, 0x8a, 0x88, 0x03, 0xbb, 0xc6, 0xe6, 0x5f, 0x71, 0x23, 0x6d, 0x0c, 0x9b, /* Byte value: 0x97 */ + 0xab, 0x23, 0x34, 0xa9, 0xb4, 0x75, 0x40, 0xbf, 0xed, 0xa0, 0xde, 0x91, 0x0d, 0x95, 0xc3, 0xf2, /* Byte value: 0x98 */ + 0x98, 0x8d, 0x91, 0xaa, 0x4c, 0x07, 0x8f, 0xaf, 0x41, 0x7b, 0x9f, 0x97, 0xb5, 0xf3, 0x79, 0x95, /* Byte value: 0x99 */ + 0xc8, 0x3a, 0xa2, 0xc5, 0x64, 0x26, 0x63, 0xba, 0xbc, 0x16, 0xee, 0x49, 0xc9, 0x53, 0x4f, 0x10, /* Byte value: 0x9a */ + 0xaf, 0xe4, 0x47, 0x60, 0xb6, 0x58, 0x99, 0x45, 0xa4, 0x5c, 0xf7, 0xc0, 0x61, 0x9d, 0x21, 0xbd, /* Byte value: 0x9b */ + 0xa3, 0x6e, 0xd2, 0xf8, 0xb0, 0x2f, 0x31, 0x88, 0x7f, 0x9b, 0x8c, 0x33, 0xd5, 0x85, 0xc4, 0x6c, /* Byte value: 0x9c */ + 0x44, 0xea, 0x4f, 0x04, 0x22, 0xb8, 0xd7, 0x81, 0x53, 0xe7, 0xfc, 0x08, 0x63, 0x88, 0xda, 0x35, /* Byte value: 0x9d */ + 0x84, 0x9d, 0x0b, 0x90, 0x42, 0xc4, 0xc5, 0x0c, 0x7d, 0xca, 0x40, 0xe3, 0x72, 0xcb, 0x92, 0xbb, /* Byte value: 0x9e */ + 0x9e, 0xc8, 0x3a, 0xe6, 0x4f, 0xdd, 0xdb, 0x28, 0xcd, 0xf9, 0x43, 0x0f, 0xef, 0xff, 0xea, 0x1c, /* Byte value: 0x9f */ + 0xe2, 0x02, 0x82, 0x96, 0x71, 0x20, 0x98, 0x2c, 0xe6, 0xbf, 0xc2, 0xef, 0xc1, 0x07, 0x25, 0x75, /* Byte value: 0xa0 */ + 0xcd, 0xbc, 0xbd, 0xaf, 0x87, 0x91, 0x1d, 0x9f, 0x76, 0xd5, 0x5c, 0x9d, 0xbe, 0x59, 0x74, 0x3c, /* Byte value: 0xa1 */ + 0xfb, 0x94, 0x07, 0xc6, 0x9c, 0x54, 0xac, 0xaa, 0x10, 0xcd, 0xaf, 0x4f, 0x71, 0x35, 0xf5, 0x77, /* Byte value: 0xa2 */ + 0x45, 0xab, 0x23, 0xa7, 0xc3, 0x22, 0x70, 0x5e, 0xd0, 0xd8, 0x67, 0x8d, 0x78, 0x8a, 0x03, 0x56, /* Byte value: 0xa3 */ + 0x23, 0x34, 0xaa, 0xa1, 0xf0, 0xc6, 0x2d, 0x7e, 0x4b, 0xad, 0xe5, 0x81, 0xcb, 0x46, 0xb4, 0x98, /* Byte value: 0xa4 */ + 0xc6, 0x32, 0xef, 0xd8, 0x63, 0xa6, 0x46, 0x0a, 0xa2, 0xaf, 0x60, 0x73, 0x4b, 0x4f, 0xdb, 0x07, /* Byte value: 0xa5 */ + 0x3d, 0xa6, 0xe8, 0x1e, 0xff, 0xf2, 0xea, 0xa0, 0xb2, 0x62, 0xcf, 0x3c, 0x3a, 0x7a, 0x2e, 0x70, /* Byte value: 0xa6 */ + 0x17, 0x9e, 0xc8, 0x4d, 0xea, 0xf4, 0x11, 0x36, 0xe8, 0xcb, 0xe3, 0x9a, 0x32, 0x2e, 0x44, 0x15, /* Byte value: 0xa7 */ + 0xeb, 0x0e, 0x08, 0x64, 0x94, 0xe0, 0x4e, 0xc4, 0xf7, 0xbb, 0x0b, 0xc8, 0x02, 0x15, 0xfb, 0x88, /* Byte value: 0xa8 */ + 0x2e, 0xff, 0x53, 0x9a, 0x17, 0x2b, 0x22, 0x6c, 0x13, 0x55, 0x05, 0xf7, 0x64, 0x5c, 0x88, 0x2a, /* Byte value: 0xa9 */ + 0xcb, 0xf9, 0x16, 0xe3, 0x84, 0x4b, 0x49, 0x18, 0xfa, 0x57, 0x80, 0x05, 0xe4, 0x55, 0xe7, 0xb5, /* Byte value: 0xaa */ + 0xb2, 0xb5, 0xb1, 0xf9, 0x59, 0x01, 0x74, 0x39, 0x1b, 0xd2, 0xb3, 0x31, 0xbd, 0xa7, 0x13, 0xf0, /* Byte value: 0xab */ + 0x5c, 0x3d, 0xa6, 0xf7, 0x2e, 0x56, 0x44, 0xd8, 0x26, 0xaa, 0x0a, 0x2d, 0xc8, 0xb8, 0xd3, 0x54, /* Byte value: 0xac */ + 0x4a, 0xe2, 0x02, 0x19, 0x25, 0x38, 0xf2, 0x31, 0x4d, 0x5e, 0x72, 0x32, 0xe1, 0x94, 0x4e, 0x22, /* Byte value: 0xad */ + 0x64, 0x1d, 0x51, 0x83, 0x32, 0x13, 0xd0, 0x5d, 0x5e, 0x0b, 0x77, 0xc5, 0x85, 0xc8, 0xc6, 0x08, /* Byte value: 0xae */ + 0x71, 0x01, 0x41, 0x4b, 0xd9, 0x10, 0x4c, 0x16, 0x73, 0xbe, 0x61, 0x96, 0x81, 0xe2, 0xf3, 0xdb, /* Byte value: 0xaf */ + 0x35, 0xeb, 0x0e, 0x4f, 0xfb, 0xa8, 0x9b, 0x97, 0x20, 0x59, 0x9d, 0x9e, 0xe2, 0x6a, 0x29, 0xee, /* Byte value: 0xb0 */ + 0xc7, 0x73, 0x83, 0x7b, 0x82, 0x3c, 0xe1, 0xd5, 0x21, 0x90, 0xfb, 0xf6, 0x50, 0x4d, 0x02, 0x64, /* Byte value: 0xb1 */ + 0x07, 0x04, 0xc7, 0xef, 0xe2, 0x40, 0xf3, 0x58, 0x0f, 0xbd, 0x47, 0x1d, 0x41, 0x0e, 0x4a, 0xea, /* Byte value: 0xb2 */ + 0x59, 0xbb, 0xb9, 0x9d, 0xcd, 0xe1, 0x3a, 0xfd, 0xec, 0x69, 0xb8, 0xf9, 0xbf, 0xb2, 0xe8, 0x78, /* Byte value: 0xb3 */ + 0x38, 0x20, 0xf7, 0x74, 0x1c, 0x45, 0x94, 0x85, 0x78, 0xa1, 0x7d, 0xe8, 0x4d, 0x70, 0x15, 0x5c, /* Byte value: 0xb4 */ + 0xea, 0x4f, 0x64, 0xc7, 0x75, 0x7a, 0xe9, 0x1b, 0x74, 0x84, 0x90, 0x4d, 0x19, 0x17, 0x22, 0xeb, /* Byte value: 0xb5 */ + 0x37, 0x69, 0xd6, 0xca, 0xfa, 0x5f, 0x16, 0xea, 0xe5, 0x27, 0x68, 0x57, 0xd4, 0x6e, 0x58, 0x28, /* Byte value: 0xb6 */ + 0x63, 0x19, 0x96, 0x6c, 0xd0, 0x53, 0x23, 0x05, 0x51, 0xb6, 0x30, 0xd8, 0xc4, 0xc6, 0x8c, 0xe2, /* Byte value: 0xb7 */ + 0x18, 0xd7, 0xe9, 0xf3, 0x0c, 0xee, 0x93, 0x59, 0x75, 0x4d, 0xf6, 0x25, 0xab, 0x30, 0x09, 0x61, /* Byte value: 0xb8 */ + 0xa7, 0xa9, 0xa1, 0x31, 0xb2, 0x02, 0xe8, 0x72, 0x36, 0x67, 0xa5, 0x62, 0xb9, 0x8d, 0x26, 0x23, /* Byte value: 0xb9 */ + 0x58, 0xfa, 0xd5, 0x3e, 0x2c, 0x7b, 0x9d, 0x22, 0x6f, 0x56, 0x23, 0x7c, 0xa4, 0xb0, 0x31, 0x1b, /* Byte value: 0xba */ + 0x11, 0xdb, 0x63, 0x01, 0xe9, 0x2e, 0x45, 0xb1, 0x64, 0x49, 0x3f, 0x02, 0x68, 0x22, 0xd7, 0x9c, /* Byte value: 0xbb */ + 0xf5, 0x9c, 0x4a, 0xdb, 0x9b, 0xd4, 0x89, 0x1a, 0x0e, 0x74, 0x21, 0x75, 0xf3, 0x29, 0x61, 0x60, /* Byte value: 0xbc */ + 0xd9, 0xe1, 0xc1, 0xc4, 0x8d, 0x08, 0x26, 0x0b, 0xd8, 0x5f, 0xd1, 0x4b, 0xa1, 0x71, 0x98, 0x8c, /* Byte value: 0xbd */ + 0xe9, 0x8c, 0xd0, 0xe1, 0x95, 0x17, 0xc3, 0xb9, 0x32, 0xc5, 0xfe, 0x01, 0x34, 0x11, 0x8a, 0x4e, /* Byte value: 0xbe */ + 0x25, 0x71, 0x01, 0xed, 0xf3, 0x1c, 0x79, 0xf9, 0xc7, 0x2f, 0x39, 0x19, 0x91, 0x4a, 0x27, 0x11, /* Byte value: 0xbf */ + 0xf8, 0x57, 0xb3, 0xe0, 0x7c, 0x39, 0x86, 0x08, 0x56, 0x8c, 0xc1, 0x03, 0x5c, 0x33, 0x5d, 0xd2, /* Byte value: 0xc0 */ + 0x97, 0xc4, 0xb0, 0x14, 0xaa, 0x1d, 0x0d, 0xc0, 0xdc, 0xfd, 0x8a, 0x28, 0x2c, 0xed, 0x34, 0xe1, /* Byte value: 0xc1 */ + 0xb1, 0x76, 0x05, 0xdf, 0xb9, 0x6c, 0x5e, 0x9b, 0x5d, 0x93, 0xdd, 0x7d, 0x90, 0xa1, 0xbb, 0x55, /* Byte value: 0xc2 */ + 0x19, 0x96, 0x85, 0x50, 0xed, 0x74, 0x34, 0x86, 0xf6, 0x72, 0x6d, 0xa0, 0xb0, 0x32, 0xd0, 0x02, /* Byte value: 0xc3 */ + 0x0f, 0x49, 0x21, 0xbe, 0xe6, 0x1a, 0x82, 0x6f, 0x9d, 0x86, 0x15, 0xbf, 0x99, 0x1e, 0x4d, 0x74, /* Byte value: 0xc4 */ + 0x89, 0x56, 0xf2, 0xab, 0xa5, 0x29, 0xca, 0x1e, 0x25, 0x32, 0xa0, 0x95, 0xdd, 0xd1, 0xae, 0x09, /* Byte value: 0xc5 */ + 0xdc, 0x67, 0xde, 0xae, 0x6e, 0xbf, 0x58, 0x2e, 0x12, 0x9c, 0x63, 0x9f, 0xd6, 0x7b, 0xa3, 0xa0, /* Byte value: 0xc6 */ + 0x08, 0x4d, 0xe6, 0x51, 0x04, 0x5a, 0x71, 0x37, 0x92, 0x3b, 0x52, 0xa2, 0xd8, 0x10, 0x07, 0x9e, /* Byte value: 0xc7 */ + 0xf1, 0x5b, 0x39, 0x12, 0x99, 0xf9, 0x50, 0xe0, 0x47, 0x88, 0x08, 0x24, 0x9f, 0x21, 0x83, 0x2f, /* Byte value: 0xc8 */ + 0xa8, 0xe0, 0x80, 0x8f, 0x54, 0x18, 0x6a, 0x1d, 0xab, 0xe1, 0xb0, 0xdd, 0x20, 0x93, 0x6b, 0x57, /* Byte value: 0xc9 */ + 0x0e, 0x08, 0x4d, 0x1d, 0x07, 0x80, 0x25, 0xb0, 0x1e, 0xb9, 0x8e, 0x3a, 0x82, 0x1c, 0x94, 0x17, /* Byte value: 0xca */ + 0x6f, 0x93, 0x03, 0xf4, 0xd6, 0x24, 0x8b, 0xc8, 0x8a, 0x71, 0x4b, 0x2b, 0x70, 0xde, 0x69, 0x33, /* Byte value: 0xcb */ + 0x7d, 0x8b, 0xd4, 0xd3, 0xdf, 0x67, 0xe4, 0xdb, 0xa8, 0x79, 0x1a, 0x65, 0x35, 0xfa, 0x16, 0x0a, /* Byte value: 0xcc */ + 0xd4, 0x2a, 0x38, 0xff, 0x6a, 0xe5, 0x29, 0x19, 0x80, 0xa7, 0x31, 0x3d, 0x0e, 0x6b, 0xa4, 0x3e, /* Byte value: 0xcd */ + 0xbd, 0xfc, 0x90, 0x47, 0xbf, 0x1b, 0xf6, 0x56, 0x86, 0x54, 0xa6, 0x8e, 0x24, 0xb9, 0x5e, 0x84, /* Byte value: 0xce */ + 0x86, 0x1f, 0xd3, 0x15, 0x43, 0x33, 0x48, 0x71, 0xb8, 0xb4, 0xb5, 0x2a, 0x44, 0xcf, 0xe3, 0x7d, /* Byte value: 0xcf */ + 0xec, 0x0a, 0xcf, 0x8b, 0x76, 0xa0, 0xbd, 0x9c, 0xf8, 0x06, 0x4c, 0xd5, 0x43, 0x1b, 0xb1, 0x62, /* Byte value: 0xd0 */ + 0x32, 0xef, 0xc9, 0xa0, 0x19, 0xe8, 0x68, 0xcf, 0x2f, 0xe4, 0xda, 0x83, 0xa3, 0x64, 0x63, 0x04, /* Byte value: 0xd1 */ + 0x7e, 0x48, 0x60, 0xf5, 0x3f, 0x0a, 0xce, 0x79, 0xee, 0x38, 0x74, 0x29, 0x18, 0xfc, 0xbe, 0xaf, /* Byte value: 0xd2 */ + 0xed, 0x4b, 0xa3, 0x28, 0x97, 0x3a, 0x1a, 0x43, 0x7b, 0x39, 0xd7, 0x50, 0x58, 0x19, 0x68, 0x01, /* Byte value: 0xd3 */ + 0x6e, 0xd2, 0x6f, 0x57, 0x37, 0xbe, 0x2c, 0x17, 0x09, 0x4e, 0xd0, 0xae, 0x6b, 0xdc, 0xb0, 0x50, /* Byte value: 0xd4 */ + 0xc3, 0xb4, 0xf0, 0xb2, 0x80, 0x11, 0x38, 0x2f, 0x68, 0x6c, 0xd2, 0xa7, 0x3c, 0x45, 0xe0, 0x2b, /* Byte value: 0xd5 */ + 0x21, 0xb6, 0x72, 0x24, 0xf1, 0x31, 0xa0, 0x03, 0x8e, 0xd3, 0x10, 0x48, 0xfd, 0x42, 0xc5, 0x5e, /* Byte value: 0xd6 */ + 0x62, 0x58, 0xfa, 0xcf, 0x31, 0xc9, 0x84, 0xda, 0xd2, 0x89, 0xab, 0x5d, 0xdf, 0xc4, 0x55, 0x81, /* Byte value: 0xd7 */ + 0xce, 0x7f, 0x09, 0x89, 0x67, 0xfc, 0x37, 0x3d, 0x30, 0x94, 0x32, 0xd1, 0x93, 0x5f, 0xdc, 0x99, /* Byte value: 0xd8 */ + 0x93, 0x03, 0xc3, 0xdd, 0xa8, 0x30, 0xd4, 0x3a, 0x95, 0x01, 0xa3, 0x79, 0x40, 0xe5, 0xd6, 0xae, /* Byte value: 0xd9 */ + 0x4c, 0xa7, 0xa9, 0x55, 0x26, 0xe2, 0xa6, 0xb6, 0xc1, 0xdc, 0xae, 0xaa, 0xbb, 0x98, 0xdd, 0xab, /* Byte value: 0xda */ + 0xde, 0xe5, 0x06, 0x2b, 0x6f, 0x48, 0xd5, 0x53, 0xd7, 0xe2, 0x96, 0x56, 0xe0, 0x7f, 0xd2, 0x66, /* Byte value: 0xdb */ + 0x3f, 0x24, 0x30, 0x9b, 0xfe, 0x05, 0x67, 0xdd, 0x77, 0x1c, 0x3a, 0xf5, 0x0c, 0x7e, 0x5f, 0xb6, /* Byte value: 0xdc */ + 0x43, 0xee, 0x88, 0xeb, 0xc0, 0xf8, 0x24, 0xd9, 0x5c, 0x5a, 0xbb, 0x15, 0x22, 0x86, 0x90, 0xdf, /* Byte value: 0xdd */ + 0x73, 0x83, 0x99, 0xce, 0xd8, 0xe7, 0xc1, 0x6b, 0xb6, 0xc0, 0x94, 0x5f, 0xb7, 0xe6, 0x82, 0x1d, /* Byte value: 0xde */ + 0xad, 0x66, 0x9f, 0xe5, 0xb7, 0xaf, 0x14, 0x38, 0x61, 0x22, 0x02, 0x09, 0x57, 0x99, 0x50, 0x7b, /* Byte value: 0xdf */ + 0xf0, 0x1a, 0x55, 0xb1, 0x78, 0x63, 0xf7, 0x3f, 0xc4, 0xb7, 0x93, 0xa1, 0x84, 0x23, 0x5a, 0x4c, /* Byte value: 0xe0 */ + 0x47, 0x29, 0xfb, 0x22, 0xc2, 0xd5, 0xfd, 0x23, 0x15, 0xa6, 0x92, 0x44, 0x4e, 0x8e, 0x72, 0x90, /* Byte value: 0xe1 */ + 0x3c, 0xe7, 0x84, 0xbd, 0x1e, 0x68, 0x4d, 0x7f, 0x31, 0x5d, 0x54, 0xb9, 0x21, 0x78, 0xf7, 0x13, /* Byte value: 0xe2 */ + 0x61, 0x9b, 0x4e, 0xe9, 0xd1, 0xa4, 0xae, 0x78, 0x94, 0xc8, 0xc5, 0x11, 0xf2, 0xc2, 0xfd, 0x24, /* Byte value: 0xe3 */ + 0x56, 0xf2, 0x98, 0x23, 0x2b, 0xfb, 0xb8, 0x92, 0x71, 0xef, 0xad, 0x46, 0x26, 0xac, 0xa5, 0x0c, /* Byte value: 0xe4 */ + 0x29, 0xfb, 0x94, 0x75, 0xf5, 0x6b, 0xd1, 0x34, 0x1c, 0xe8, 0x42, 0xea, 0x25, 0x52, 0xc2, 0xc0, /* Byte value: 0xe5 */ + 0x7b, 0xce, 0x7f, 0x9f, 0xdc, 0xbd, 0xb0, 0x5c, 0x24, 0xfb, 0xc6, 0xfd, 0x6f, 0xf6, 0x85, 0x83, /* Byte value: 0xe6 */ + 0x10, 0x9a, 0x0f, 0xa2, 0x08, 0xb4, 0xe2, 0x6e, 0xe7, 0x76, 0xa4, 0x87, 0x73, 0x20, 0x0e, 0xff, /* Byte value: 0xe7 */ + 0xff, 0x53, 0x74, 0x0f, 0x9e, 0x79, 0x75, 0x50, 0x59, 0x31, 0x86, 0x1e, 0x1d, 0x3d, 0x17, 0x38, /* Byte value: 0xe8 */ + 0x5d, 0x7c, 0xca, 0x54, 0xcf, 0xcc, 0xe3, 0x07, 0xa5, 0x95, 0x91, 0xa8, 0xd3, 0xba, 0x0a, 0x37, /* Byte value: 0xe9 */ + 0x31, 0x2c, 0x7d, 0x86, 0xf9, 0x85, 0x42, 0x6d, 0x69, 0xa5, 0xb4, 0xcf, 0x8e, 0x62, 0xcb, 0xa1, /* Byte value: 0xea */ + 0xb7, 0x33, 0xae, 0x93, 0xba, 0xb6, 0x0a, 0x1c, 0xd1, 0x11, 0x01, 0xe5, 0xca, 0xad, 0x28, 0xdc, /* Byte value: 0xeb */ + 0xb3, 0xf4, 0xdd, 0x5a, 0xb8, 0x9b, 0xd3, 0xe6, 0x98, 0xed, 0x28, 0xb4, 0xa6, 0xa5, 0xca, 0x93, /* Byte value: 0xec */ + 0x6b, 0x54, 0x70, 0x3d, 0xd4, 0x09, 0x52, 0x32, 0xc3, 0x8d, 0x62, 0x7a, 0x1c, 0xd6, 0x8b, 0x7c, /* Byte value: 0xed */ + 0xc0, 0x77, 0x44, 0x94, 0x60, 0x7c, 0x12, 0x8d, 0x2e, 0x2d, 0xbc, 0xeb, 0x11, 0x43, 0x48, 0x8e, /* Byte value: 0xee */ + 0x7f, 0x09, 0x0c, 0x56, 0xde, 0x90, 0x69, 0xa6, 0x6d, 0x07, 0xef, 0xac, 0x03, 0xfe, 0x67, 0xcc, /* Byte value: 0xef */ + 0x1e, 0x92, 0x42, 0xbf, 0x0f, 0x34, 0xc7, 0xde, 0xf9, 0xcf, 0x2a, 0xbd, 0xf1, 0x3c, 0x9a, 0xe8, /* Byte value: 0xf0 */ + 0xd1, 0xac, 0x27, 0x95, 0x89, 0x52, 0x57, 0x3c, 0x4a, 0x64, 0x83, 0xe9, 0x79, 0x61, 0x9f, 0x12, /* Byte value: 0xf1 */ + 0x78, 0x0d, 0xcb, 0xb9, 0x3c, 0xd0, 0x9a, 0xfe, 0x62, 0xba, 0xa8, 0xb1, 0x42, 0xf0, 0x2d, 0x26, /* Byte value: 0xf2 */ + 0xc2, 0xf5, 0x9c, 0x11, 0x61, 0x8b, 0x9f, 0xf0, 0xeb, 0x53, 0x49, 0x22, 0x27, 0x47, 0x39, 0x48, /* Byte value: 0xf3 */ + 0xbb, 0xb9, 0x3b, 0x0b, 0xbc, 0xc1, 0xa2, 0xd1, 0x0a, 0xd6, 0x7a, 0x16, 0x7e, 0xb5, 0xcd, 0x0d, /* Byte value: 0xf4 */ + 0x6d, 0x11, 0xdb, 0x71, 0xd7, 0xd3, 0x06, 0xb5, 0x4f, 0x0f, 0xbe, 0xe2, 0x46, 0xda, 0x18, 0xf5, /* Byte value: 0xf5 */ + 0xe1, 0xc1, 0x36, 0xb0, 0x91, 0x4d, 0xb2, 0x8e, 0xa0, 0xfe, 0xac, 0xa3, 0xec, 0x01, 0x8d, 0xd0, /* Byte value: 0xf6 */ + 0x1f, 0xd3, 0x2e, 0x1c, 0xee, 0xae, 0x60, 0x01, 0x7a, 0xf0, 0xb1, 0x38, 0xea, 0x3e, 0x43, 0x8b, /* Byte value: 0xf7 */ + 0x82, 0xd8, 0xa0, 0xdc, 0x41, 0x1e, 0x91, 0x8b, 0xf1, 0x48, 0x9c, 0x7b, 0x28, 0xc7, 0x01, 0x32, /* Byte value: 0xf8 */ + 0xba, 0xf8, 0x57, 0xa8, 0x5d, 0x5b, 0x05, 0x0e, 0x89, 0xe9, 0xe1, 0x93, 0x65, 0xb7, 0x14, 0x6e, /* Byte value: 0xf9 */ + 0x8c, 0xd0, 0xed, 0xc1, 0x46, 0x9e, 0xb4, 0x3b, 0xef, 0xf1, 0x12, 0x41, 0xaa, 0xdb, 0x95, 0x25, /* Byte value: 0xfa */ + 0xcf, 0x3e, 0x65, 0x2a, 0x86, 0x66, 0x90, 0xe2, 0xb3, 0xab, 0xa9, 0x54, 0x88, 0x5d, 0x05, 0xfa, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0xfe, 0x12, 0x18, 0xac, 0x7f, 0xe3, 0xd2, 0x8f, 0xda, 0x0e, 0x1d, 0x9b, 0x06, 0x3f, 0xce, 0x5b, /* Byte value: 0xfd */ + 0x42, 0xaf, 0xe4, 0x48, 0x21, 0x62, 0x83, 0x06, 0xdf, 0x65, 0x20, 0x90, 0x39, 0x84, 0x49, 0xbc, /* Byte value: 0xfe */ + 0xd6, 0xa8, 0xe0, 0x7a, 0x6b, 0x12, 0xa4, 0x64, 0x45, 0xd9, 0xc4, 0xf4, 0x38, 0x6f, 0xd5, 0xf8, /* Byte value: 0xff */ + + /* Matrix row: 11 */ + 0xd8, 0x59, 0xe0, 0xf8, 0xd2, 0x2a, 0xca, 0x1c, 0x17, 0x58, 0x25, 0x47, 0x72, 0xa8, 0x1d, 0x31, /* Byte value: 0x00 */ + 0x69, 0xb6, 0x74, 0x38, 0x5c, 0x64, 0x10, 0xef, 0x82, 0xee, 0xaa, 0xe9, 0x8a, 0x53, 0xb7, 0xc0, /* Byte value: 0x01 */ + 0xc0, 0xd2, 0x41, 0xdb, 0x4a, 0x91, 0xd0, 0xa1, 0x55, 0xac, 0x5e, 0x8f, 0x3d, 0x01, 0xdf, 0x89, /* Byte value: 0x02 */ + 0xba, 0xbf, 0xf7, 0x5c, 0x54, 0x08, 0xff, 0xc7, 0x32, 0xa4, 0x91, 0x4e, 0xac, 0x20, 0xdc, 0x8e, /* Byte value: 0x03 */ + 0x16, 0xa0, 0xc6, 0xfb, 0x77, 0x8c, 0x4a, 0x68, 0x8d, 0x24, 0x3c, 0x03, 0xa8, 0x75, 0xec, 0xfe, /* Byte value: 0x04 */ + 0x87, 0x68, 0xac, 0xfe, 0x5b, 0xa5, 0x09, 0xf4, 0xe0, 0xa0, 0x17, 0xcf, 0x05, 0xd1, 0x3c, 0x6c, /* Byte value: 0x05 */ + 0x58, 0xc5, 0x9e, 0x6a, 0x1f, 0x75, 0xeb, 0x63, 0x71, 0x90, 0xf0, 0x0c, 0xe5, 0x17, 0x36, 0x7e, /* Byte value: 0x06 */ + 0x59, 0x63, 0xf5, 0x7e, 0xaf, 0xd1, 0x24, 0x56, 0x06, 0xc5, 0x5c, 0xba, 0x14, 0xc2, 0xf0, 0x73, /* Byte value: 0x07 */ + 0xc4, 0x0f, 0x2e, 0x8b, 0xcf, 0x44, 0x6a, 0x75, 0x4a, 0x3b, 0xab, 0x12, 0x7f, 0xd3, 0x41, 0xbd, /* Byte value: 0x08 */ + 0x6a, 0x9f, 0xc9, 0x04, 0x4f, 0x4b, 0x82, 0xb0, 0x1b, 0x11, 0x9d, 0xf0, 0x5a, 0xef, 0x3e, 0xd7, /* Byte value: 0x09 */ + 0x05, 0x7b, 0x04, 0x44, 0x35, 0x71, 0x75, 0xe1, 0x68, 0xc2, 0x59, 0x2b, 0xb3, 0x07, 0x58, 0x39, /* Byte value: 0x0a */ + 0x9a, 0x98, 0x09, 0x99, 0xf6, 0x6f, 0x66, 0xa8, 0xca, 0x96, 0x35, 0x2c, 0xf9, 0x7f, 0xa6, 0xed, /* Byte value: 0x0b */ + 0x06, 0x52, 0xb9, 0x78, 0x26, 0x5e, 0xe7, 0xbe, 0xf1, 0x3d, 0x6e, 0x32, 0x63, 0xbb, 0xd1, 0x2e, /* Byte value: 0x0c */ + 0xa6, 0xe9, 0x39, 0x2f, 0x49, 0x66, 0x5f, 0xae, 0x6f, 0xc7, 0x1f, 0x1b, 0xa1, 0x5b, 0x80, 0x02, /* Byte value: 0x0d */ + 0x0d, 0x02, 0xda, 0xe4, 0xfc, 0x18, 0xc2, 0x8a, 0x56, 0x2f, 0x70, 0xd2, 0x37, 0x60, 0xa7, 0x51, /* Byte value: 0x0e */ + 0xd1, 0x86, 0x55, 0x4c, 0xab, 0xe7, 0xb2, 0x42, 0x5e, 0xe0, 0xa0, 0x08, 0x07, 0x1a, 0x24, 0x54, /* Byte value: 0x0f */ + 0x43, 0x67, 0x82, 0x75, 0x94, 0xe1, 0x63, 0x81, 0xaa, 0x9b, 0xbc, 0xdd, 0x7a, 0x02, 0x7d, 0xd1, /* Byte value: 0x10 */ + 0x85, 0xe7, 0x7a, 0xd6, 0xf8, 0x2e, 0x54, 0x9e, 0x0e, 0x0a, 0x8c, 0x60, 0x24, 0xb8, 0x73, 0x76, /* Byte value: 0x11 */ + 0x41, 0xe8, 0x54, 0x5d, 0x37, 0x6a, 0x3e, 0xeb, 0x44, 0x31, 0x27, 0x72, 0x5b, 0x6b, 0x32, 0xcb, /* Byte value: 0x12 */ + 0xd2, 0xaf, 0xe8, 0x70, 0xb8, 0xc8, 0x20, 0x1d, 0xc7, 0x1f, 0x97, 0x11, 0xd7, 0xa6, 0xad, 0x43, /* Byte value: 0x13 */ + 0x2c, 0x83, 0x4f, 0x35, 0xee, 0xdb, 0x94, 0xd0, 0xd9, 0x48, 0x78, 0x06, 0x93, 0xea, 0x1b, 0x3f, /* Byte value: 0x14 */ + 0xcd, 0xd0, 0x9b, 0x3f, 0xb6, 0x89, 0x12, 0x2b, 0x03, 0x83, 0x2e, 0x5d, 0x0a, 0x61, 0x78, 0xd8, /* Byte value: 0x15 */ + 0x0b, 0x50, 0x63, 0x9c, 0xda, 0x46, 0x25, 0x34, 0xa7, 0x12, 0x1e, 0xe0, 0x54, 0xdb, 0x76, 0x7f, /* Byte value: 0x16 */ + 0xa2, 0x34, 0x56, 0x7f, 0xcc, 0xb3, 0xe5, 0x7a, 0x70, 0x50, 0xea, 0x86, 0xe3, 0x89, 0x1e, 0x36, /* Byte value: 0x17 */ + 0x38, 0xac, 0x5f, 0xe6, 0x3a, 0xdc, 0x83, 0xd2, 0xba, 0xc6, 0xdf, 0xaa, 0x1a, 0xf6, 0xb8, 0xdb, /* Byte value: 0x18 */ + 0xf7, 0xf3, 0x12, 0xf1, 0x2f, 0xde, 0xcc, 0x93, 0x57, 0xef, 0x6a, 0x58, 0x31, 0xfe, 0x8f, 0x19, /* Byte value: 0x19 */ + 0x4b, 0x1e, 0x5c, 0xd5, 0x5d, 0x88, 0xd4, 0xea, 0x94, 0x76, 0x95, 0x24, 0xfe, 0x65, 0x82, 0xb9, /* Byte value: 0x1a */ + 0xe6, 0xa7, 0x06, 0x66, 0xce, 0xa8, 0xae, 0x70, 0x5c, 0xa3, 0x94, 0xdf, 0x0b, 0xe5, 0x74, 0xc4, /* Byte value: 0x1b */ + 0xe7, 0x01, 0x6d, 0x72, 0x7e, 0x0c, 0x61, 0x45, 0x2b, 0xf6, 0x38, 0x69, 0xfa, 0x30, 0xb2, 0xc9, /* Byte value: 0x1c */ + 0x90, 0x6e, 0x01, 0x11, 0x9c, 0x8d, 0x8c, 0xa9, 0x1a, 0xd1, 0x87, 0x7a, 0x5c, 0x71, 0x16, 0x9f, /* Byte value: 0x1d */ + 0x1a, 0x04, 0x77, 0x0b, 0x3b, 0x30, 0x47, 0xd7, 0xac, 0x5e, 0xe0, 0x67, 0x6e, 0xc0, 0x8d, 0xa2, /* Byte value: 0x1e */ + 0x53, 0x95, 0xfd, 0xf6, 0xc5, 0x33, 0xce, 0x57, 0xd6, 0x82, 0xee, 0xec, 0xb1, 0xcc, 0x40, 0x01, /* Byte value: 0x1f */ + 0xa3, 0x92, 0x3d, 0x6b, 0x7c, 0x17, 0x2a, 0x4f, 0x07, 0x05, 0x46, 0x30, 0x12, 0x5c, 0xd8, 0x3b, /* Byte value: 0x20 */ + 0xf1, 0xa1, 0xab, 0x89, 0x09, 0x80, 0x2b, 0x2d, 0xa6, 0xd2, 0x04, 0x6a, 0x52, 0x45, 0x5e, 0x37, /* Byte value: 0x21 */ + 0xfd, 0x05, 0x1a, 0x79, 0x45, 0x3c, 0x26, 0x92, 0x87, 0xa8, 0xd8, 0x0e, 0x94, 0xf0, 0x3f, 0x6b, /* Byte value: 0x22 */ + 0x51, 0x1a, 0x2b, 0xde, 0x66, 0xb8, 0x93, 0x3d, 0x38, 0x28, 0x75, 0x43, 0x90, 0xa5, 0x0f, 0x1b, /* Byte value: 0x23 */ + 0x29, 0xf8, 0x4b, 0x71, 0xdb, 0xaa, 0xe1, 0x31, 0xb1, 0x8a, 0x21, 0x2d, 0x20, 0xed, 0x43, 0x06, /* Byte value: 0x24 */ + 0x3b, 0x85, 0xe2, 0xda, 0x29, 0xf3, 0x11, 0x8d, 0x23, 0x39, 0xe8, 0xb3, 0xca, 0x4a, 0x31, 0xcc, /* Byte value: 0x25 */ + 0x82, 0x13, 0xa8, 0xba, 0x6e, 0xd4, 0x7c, 0x15, 0x88, 0x62, 0x4e, 0xe4, 0xb6, 0xd6, 0x64, 0x55, /* Byte value: 0x26 */ + 0x67, 0x9d, 0x13, 0xe0, 0xb3, 0x53, 0x40, 0x3a, 0x4d, 0x3e, 0xed, 0x22, 0x6d, 0x8f, 0x99, 0x86, /* Byte value: 0x27 */ + 0x8b, 0xcc, 0x1d, 0x0e, 0x17, 0x19, 0x04, 0x4b, 0xc1, 0xda, 0xcb, 0xab, 0xc3, 0x64, 0x5d, 0x30, /* Byte value: 0x28 */ + 0x48, 0x37, 0xe1, 0xe9, 0x4e, 0xa7, 0x46, 0xb5, 0x0d, 0x89, 0xa2, 0x3d, 0x2e, 0xd9, 0x0b, 0xae, /* Byte value: 0x29 */ + 0x2a, 0xd1, 0xf6, 0x4d, 0xc8, 0x85, 0x73, 0x6e, 0x28, 0x75, 0x16, 0x34, 0xf0, 0x51, 0xca, 0x11, /* Byte value: 0x2a */ + 0xef, 0x78, 0xb3, 0xd2, 0xb7, 0x65, 0xd6, 0x2e, 0x15, 0x1b, 0x11, 0x90, 0x7e, 0x57, 0x4d, 0xa1, /* Byte value: 0x2b */ + 0x70, 0x9b, 0xbe, 0x0f, 0x74, 0x7b, 0xc5, 0x67, 0xb7, 0x4f, 0x7d, 0x97, 0x34, 0x2f, 0xb3, 0x75, /* Byte value: 0x2c */ + 0x2d, 0x25, 0x24, 0x21, 0x5e, 0x7f, 0x5b, 0xe5, 0xae, 0x1d, 0xd4, 0xb0, 0x62, 0x3f, 0xdd, 0x32, /* Byte value: 0x2d */ + 0x31, 0x73, 0xea, 0x52, 0x43, 0x11, 0xfb, 0x8c, 0xf3, 0x7e, 0x5a, 0xe5, 0x6f, 0x44, 0x81, 0xbe, /* Byte value: 0x2e */ + 0xe2, 0x7a, 0x69, 0x36, 0x4b, 0x7d, 0x14, 0xa4, 0x43, 0x34, 0x61, 0x42, 0x49, 0x37, 0xea, 0xf0, /* Byte value: 0x2f */ + 0x86, 0xce, 0xc7, 0xea, 0xeb, 0x01, 0xc6, 0xc1, 0x97, 0xf5, 0xbb, 0x79, 0xf4, 0x04, 0xfa, 0x61, /* Byte value: 0x30 */ + 0xc9, 0x0d, 0xf4, 0x6f, 0x33, 0x5c, 0xa8, 0xff, 0x1c, 0x14, 0xdb, 0xc0, 0x48, 0xb3, 0xe6, 0xec, /* Byte value: 0x31 */ + 0xb0, 0x49, 0xff, 0xd4, 0x3e, 0xea, 0x15, 0xc6, 0xe2, 0xe3, 0x23, 0x18, 0x09, 0x2e, 0x6c, 0xfc, /* Byte value: 0x32 */ + 0x80, 0x9c, 0x7e, 0x92, 0xcd, 0x5f, 0x21, 0x7f, 0x66, 0xc8, 0xd5, 0x4b, 0x97, 0xbf, 0x2b, 0x4f, /* Byte value: 0x33 */ + 0xf5, 0x7c, 0xc4, 0xd9, 0x8c, 0x55, 0x91, 0xf9, 0xb9, 0x45, 0xf1, 0xf7, 0x10, 0x97, 0xc0, 0x03, /* Byte value: 0x34 */ + 0xfc, 0xa3, 0x71, 0x6d, 0xf5, 0x98, 0xe9, 0xa7, 0xf0, 0xfd, 0x74, 0xb8, 0x65, 0x25, 0xf9, 0x66, /* Byte value: 0x35 */ + 0x60, 0x69, 0xc1, 0x8c, 0x25, 0xa9, 0x68, 0xb1, 0xcb, 0x56, 0x2f, 0xa6, 0xff, 0xe1, 0x8e, 0xa5, /* Byte value: 0x36 */ + 0x44, 0x93, 0x50, 0x19, 0x02, 0x1b, 0x4b, 0x0a, 0x2c, 0xf3, 0x7e, 0x59, 0xe8, 0x6c, 0x6a, 0xf2, /* Byte value: 0x37 */ + 0x0c, 0xa4, 0xb1, 0xf0, 0x4c, 0xbc, 0x0d, 0xbf, 0x21, 0x7a, 0xdc, 0x64, 0xc6, 0xb5, 0x61, 0x5c, /* Byte value: 0x38 */ + 0x8f, 0x11, 0x72, 0x5e, 0x92, 0xcc, 0xbe, 0x9f, 0xde, 0x4d, 0x3e, 0x36, 0x81, 0xb6, 0xc3, 0x04, /* Byte value: 0x39 */ + 0xa4, 0x66, 0xef, 0x07, 0xea, 0xed, 0x02, 0xc4, 0x81, 0x6d, 0x84, 0xb4, 0x80, 0x32, 0xcf, 0x18, /* Byte value: 0x3a */ + 0x3d, 0xd7, 0x5b, 0xa2, 0x0f, 0xad, 0xf6, 0x33, 0xd2, 0x04, 0x86, 0x81, 0xa9, 0xf1, 0xe0, 0xe2, /* Byte value: 0x3b */ + 0x62, 0xe6, 0x17, 0xa4, 0x86, 0x22, 0x35, 0xdb, 0x25, 0xfc, 0xb4, 0x09, 0xde, 0x88, 0xc1, 0xbf, /* Byte value: 0x3c */ + 0x35, 0xae, 0x85, 0x02, 0xc6, 0xc4, 0x41, 0x58, 0xec, 0xe9, 0xaf, 0x78, 0x2d, 0x96, 0x1f, 0x8a, /* Byte value: 0x3d */ + 0xe0, 0xf5, 0xbf, 0x1e, 0xe8, 0xf6, 0x49, 0xce, 0xad, 0x9e, 0xfa, 0xed, 0x68, 0x5e, 0xa5, 0xea, /* Byte value: 0x3e */ + 0x68, 0x10, 0x1f, 0x2c, 0xec, 0xc0, 0xdf, 0xda, 0xf5, 0xbb, 0x06, 0x5f, 0x7b, 0x86, 0x71, 0xcd, /* Byte value: 0x3f */ + 0xdc, 0x84, 0x8f, 0xa8, 0x57, 0xff, 0x70, 0xc8, 0x08, 0xcf, 0xd0, 0xda, 0x30, 0x7a, 0x83, 0x05, /* Byte value: 0x40 */ + 0x40, 0x4e, 0x3f, 0x49, 0x87, 0xce, 0xf1, 0xde, 0x33, 0x64, 0x8b, 0xc4, 0xaa, 0xbe, 0xf4, 0xc6, /* Byte value: 0x41 */ + 0xa0, 0xbb, 0x80, 0x57, 0x6f, 0x38, 0xb8, 0x10, 0x9e, 0xfa, 0x71, 0x29, 0xc2, 0xe0, 0x51, 0x2c, /* Byte value: 0x42 */ + 0xa7, 0x4f, 0x52, 0x3b, 0xf9, 0xc2, 0x90, 0x9b, 0x18, 0x92, 0xb3, 0xad, 0x50, 0x8e, 0x46, 0x0f, /* Byte value: 0x43 */ + 0x9f, 0xe3, 0x0d, 0xdd, 0xc3, 0x1e, 0x13, 0x49, 0xa2, 0x54, 0x6c, 0x07, 0x4a, 0x78, 0xfe, 0xd4, /* Byte value: 0x44 */ + 0x2b, 0x77, 0x9d, 0x59, 0x78, 0x21, 0xbc, 0x5b, 0x5f, 0x20, 0xba, 0x82, 0x01, 0x84, 0x0c, 0x1c, /* Byte value: 0x45 */ + 0xae, 0x90, 0xe7, 0x8f, 0x80, 0x0f, 0xe8, 0xc5, 0x51, 0x2a, 0x36, 0xe2, 0x25, 0x3c, 0x7f, 0x6a, /* Byte value: 0x46 */ + 0x10, 0xf2, 0x7f, 0x83, 0x51, 0xd2, 0xad, 0xd6, 0x7c, 0x19, 0x52, 0x31, 0xcb, 0xce, 0x3d, 0xd0, /* Byte value: 0x47 */ + 0xfe, 0x2c, 0xa7, 0x45, 0x56, 0x13, 0xb4, 0xcd, 0x1e, 0x57, 0xef, 0x17, 0x44, 0x4c, 0xb6, 0x7c, /* Byte value: 0x48 */ + 0xa1, 0x1d, 0xeb, 0x43, 0xdf, 0x9c, 0x77, 0x25, 0xe9, 0xaf, 0xdd, 0x9f, 0x33, 0x35, 0x97, 0x21, /* Byte value: 0x49 */ + 0xc7, 0x26, 0x93, 0xb7, 0xdc, 0x6b, 0xf8, 0x2a, 0xd3, 0xc4, 0x9c, 0x0b, 0xaf, 0x6f, 0xc8, 0xaa, /* Byte value: 0x4a */ + 0x4d, 0x4c, 0xe5, 0xad, 0x7b, 0xd6, 0x33, 0x54, 0x65, 0x4b, 0xfb, 0x16, 0x9d, 0xde, 0x53, 0x97, /* Byte value: 0x4b */ + 0xaa, 0x4d, 0x88, 0xdf, 0x05, 0xda, 0x52, 0x11, 0x4e, 0xbd, 0xc3, 0x7f, 0x67, 0xee, 0xe1, 0x5e, /* Byte value: 0x4c */ + 0xd4, 0xfd, 0x51, 0x08, 0x9e, 0x96, 0xc7, 0xa3, 0x36, 0x22, 0xf9, 0x23, 0xb4, 0x1d, 0x7c, 0x6d, /* Byte value: 0x4d */ + 0x42, 0xc1, 0xe9, 0x61, 0x24, 0x45, 0xac, 0xb4, 0xdd, 0xce, 0x10, 0x6b, 0x8b, 0xd7, 0xbb, 0xdc, /* Byte value: 0x4e */ + 0x2e, 0x0c, 0x99, 0x1d, 0x4d, 0x50, 0xc9, 0xba, 0x37, 0xe2, 0xe3, 0xa9, 0xb2, 0x83, 0x54, 0x25, /* Byte value: 0x4f */ + 0x49, 0x91, 0x8a, 0xfd, 0xfe, 0x03, 0x89, 0x80, 0x7a, 0xdc, 0x0e, 0x8b, 0xdf, 0x0c, 0xcd, 0xa3, /* Byte value: 0x50 */ + 0xb2, 0xc6, 0x29, 0xfc, 0x9d, 0x61, 0x48, 0xac, 0x0c, 0x49, 0xb8, 0xb7, 0x28, 0x47, 0x23, 0xe6, /* Byte value: 0x51 */ + 0x77, 0x6f, 0x6c, 0x63, 0xe2, 0x81, 0xed, 0xec, 0x31, 0x27, 0xbf, 0x13, 0xa6, 0x41, 0xa4, 0x56, /* Byte value: 0x52 */ + 0x39, 0x0a, 0x34, 0xf2, 0x8a, 0x78, 0x4c, 0xe7, 0xcd, 0x93, 0x73, 0x1c, 0xeb, 0x23, 0x7e, 0xd6, /* Byte value: 0x53 */ + 0xad, 0xb9, 0x5a, 0xb3, 0x93, 0x20, 0x7a, 0x9a, 0xc8, 0xd5, 0x01, 0xfb, 0xf5, 0x80, 0xf6, 0x7d, /* Byte value: 0x54 */ + 0x20, 0x27, 0xfe, 0xc5, 0xa2, 0x67, 0x99, 0x6f, 0xf8, 0x32, 0xa4, 0x62, 0x55, 0x5f, 0x7a, 0x63, /* Byte value: 0x55 */ + 0xcf, 0x5f, 0x4d, 0x17, 0x15, 0x02, 0x4f, 0x41, 0xed, 0x29, 0xb5, 0xf2, 0x2b, 0x08, 0x37, 0xc2, /* Byte value: 0x56 */ + 0x64, 0xb4, 0xae, 0xdc, 0xa0, 0x7c, 0xd2, 0x65, 0xd4, 0xc1, 0xda, 0x3b, 0xbd, 0x33, 0x10, 0x91, /* Byte value: 0x57 */ + 0x9b, 0x3e, 0x62, 0x8d, 0x46, 0xcb, 0xa9, 0x9d, 0xbd, 0xc3, 0x99, 0x9a, 0x08, 0xaa, 0x60, 0xe0, /* Byte value: 0x58 */ + 0xde, 0x0b, 0x59, 0x80, 0xf4, 0x74, 0x2d, 0xa2, 0xe6, 0x65, 0x4b, 0x75, 0x11, 0x13, 0xcc, 0x1f, /* Byte value: 0x59 */ + 0x7f, 0x16, 0xb2, 0xc3, 0x2b, 0xe8, 0x5a, 0x87, 0x0f, 0xca, 0x96, 0xea, 0x22, 0x26, 0x5b, 0x3e, /* Byte value: 0x5a */ + 0xa8, 0xc2, 0x5e, 0xf7, 0xa6, 0x51, 0x0f, 0x7b, 0xa0, 0x17, 0x58, 0xd0, 0x46, 0x87, 0xae, 0x44, /* Byte value: 0x5b */ + 0xb6, 0x1b, 0x46, 0xac, 0x18, 0xb4, 0xf2, 0x78, 0x13, 0xde, 0x4d, 0x2a, 0x6a, 0x95, 0xbd, 0xd2, /* Byte value: 0x5c */ + 0x5c, 0x18, 0xf1, 0x3a, 0x9a, 0xa0, 0x51, 0xb7, 0x6e, 0x07, 0x05, 0x91, 0xa7, 0xc5, 0xa8, 0x4a, /* Byte value: 0x5d */ + 0xa5, 0xc0, 0x84, 0x13, 0x5a, 0x49, 0xcd, 0xf1, 0xf6, 0x38, 0x28, 0x02, 0x71, 0xe7, 0x09, 0x15, /* Byte value: 0x5e */ + 0x6b, 0x39, 0xa2, 0x10, 0xff, 0xef, 0x4d, 0x85, 0x6c, 0x44, 0x31, 0x46, 0xab, 0x3a, 0xf8, 0xda, /* Byte value: 0x5f */ + 0xd3, 0x09, 0x83, 0x64, 0x08, 0x6c, 0xef, 0x28, 0xb0, 0x4a, 0x3b, 0xa7, 0x26, 0x73, 0x6b, 0x4e, /* Byte value: 0x60 */ + 0xf0, 0x07, 0xc0, 0x9d, 0xb9, 0x24, 0xe4, 0x18, 0xd1, 0x87, 0xa8, 0xdc, 0xa3, 0x90, 0x98, 0x3a, /* Byte value: 0x61 */ + 0x5d, 0xbe, 0x9a, 0x2e, 0x2a, 0x04, 0x9e, 0x82, 0x19, 0x52, 0xa9, 0x27, 0x56, 0x10, 0x6e, 0x47, /* Byte value: 0x62 */ + 0xc8, 0xab, 0x9f, 0x7b, 0x83, 0xf8, 0x67, 0xca, 0x6b, 0x41, 0x77, 0x76, 0xb9, 0x66, 0x20, 0xe1, /* Byte value: 0x63 */ + 0xc5, 0xa9, 0x45, 0x9f, 0x7f, 0xe0, 0xa5, 0x40, 0x3d, 0x6e, 0x07, 0xa4, 0x8e, 0x06, 0x87, 0xb0, /* Byte value: 0x64 */ + 0xbd, 0x4b, 0x25, 0x30, 0xc2, 0xf2, 0xd7, 0x4c, 0xb4, 0xcc, 0x53, 0xca, 0x3e, 0x4e, 0xcb, 0xad, /* Byte value: 0x65 */ + 0xc3, 0xfb, 0xfc, 0xe7, 0x59, 0xbe, 0x42, 0xfe, 0xcc, 0x53, 0x69, 0x96, 0xed, 0xbd, 0x56, 0x9e, /* Byte value: 0x66 */ + 0xe4, 0x28, 0xd0, 0x4e, 0x6d, 0x23, 0xf3, 0x1a, 0xb2, 0x09, 0x0f, 0x70, 0x2a, 0x8c, 0x3b, 0xde, /* Byte value: 0x67 */ + 0xaf, 0x36, 0x8c, 0x9b, 0x30, 0xab, 0x27, 0xf0, 0x26, 0x7f, 0x9a, 0x54, 0xd4, 0xe9, 0xb9, 0x67, /* Byte value: 0x68 */ + 0xb8, 0x30, 0x21, 0x74, 0xf7, 0x83, 0xa2, 0xad, 0xdc, 0x0e, 0x0a, 0xe1, 0x8d, 0x49, 0x93, 0x94, /* Byte value: 0x69 */ + 0xcb, 0x82, 0x22, 0x47, 0x90, 0xd7, 0xf5, 0x95, 0xf2, 0xbe, 0x40, 0x6f, 0x69, 0xda, 0xa9, 0xf6, /* Byte value: 0x6a */ + 0xc1, 0x74, 0x2a, 0xcf, 0xfa, 0x35, 0x1f, 0x94, 0x22, 0xf9, 0xf2, 0x39, 0xcc, 0xd4, 0x19, 0x84, /* Byte value: 0x6b */ + 0xb5, 0x32, 0xfb, 0x90, 0x0b, 0x9b, 0x60, 0x27, 0x8a, 0x21, 0x7a, 0x33, 0xba, 0x29, 0x34, 0xc5, /* Byte value: 0x6c */ + 0x6f, 0xe4, 0xcd, 0x40, 0x7a, 0x3a, 0xf7, 0x51, 0x73, 0xd3, 0xc4, 0xdb, 0xe9, 0xe8, 0x66, 0xee, /* Byte value: 0x6d */ + 0x4c, 0xea, 0x8e, 0xb9, 0xcb, 0x72, 0xfc, 0x61, 0x12, 0x1e, 0x57, 0xa0, 0x6c, 0x0b, 0x95, 0x9a, /* Byte value: 0x6e */ + 0x97, 0x9a, 0xd3, 0x7d, 0x0a, 0x77, 0xa4, 0x22, 0x9c, 0xb9, 0x45, 0xfe, 0xce, 0x1f, 0x01, 0xbc, /* Byte value: 0x6f */ + 0x88, 0xe5, 0xa0, 0x32, 0x04, 0x36, 0x96, 0x14, 0x58, 0x25, 0xfc, 0xb2, 0x13, 0xd8, 0xd4, 0x27, /* Byte value: 0x70 */ + 0x61, 0xcf, 0xaa, 0x98, 0x95, 0x0d, 0xa7, 0x84, 0xbc, 0x03, 0x83, 0x10, 0x0e, 0x34, 0x48, 0xa8, /* Byte value: 0x71 */ + 0x57, 0x48, 0x92, 0xa6, 0x40, 0xe6, 0x74, 0x83, 0xc9, 0x15, 0x1b, 0x71, 0xf3, 0x1e, 0xde, 0x35, /* Byte value: 0x72 */ + 0x11, 0x54, 0x14, 0x97, 0xe1, 0x76, 0x62, 0xe3, 0x0b, 0x4c, 0xfe, 0x87, 0x3a, 0x1b, 0xfb, 0xdd, /* Byte value: 0x73 */ + 0x99, 0xb1, 0xb4, 0xa5, 0xe5, 0x40, 0xf4, 0xf7, 0x53, 0x69, 0x02, 0x35, 0x29, 0xc3, 0x2f, 0xfa, /* Byte value: 0x74 */ + 0x72, 0x14, 0x68, 0x27, 0xd7, 0xf0, 0x98, 0x0d, 0x59, 0xe5, 0xe6, 0x38, 0x15, 0x46, 0xfc, 0x6f, /* Byte value: 0x75 */ + 0x83, 0xb5, 0xc3, 0xae, 0xde, 0x70, 0xb3, 0x20, 0xff, 0x37, 0xe2, 0x52, 0x47, 0x03, 0xa2, 0x58, /* Byte value: 0x76 */ + 0xbf, 0xc4, 0xf3, 0x18, 0x61, 0x79, 0x8a, 0x26, 0x5a, 0x66, 0xc8, 0x65, 0x1f, 0x27, 0x84, 0xb7, /* Byte value: 0x77 */ + 0x55, 0xc7, 0x44, 0x8e, 0xe3, 0x6d, 0x29, 0xe9, 0x27, 0xbf, 0x80, 0xde, 0xd2, 0x77, 0x91, 0x2f, /* Byte value: 0x78 */ + 0x73, 0xb2, 0x03, 0x33, 0x67, 0x54, 0x57, 0x38, 0x2e, 0xb0, 0x4a, 0x8e, 0xe4, 0x93, 0x3a, 0x62, /* Byte value: 0x79 */ + 0x9d, 0x6c, 0xdb, 0xf5, 0x60, 0x95, 0x4e, 0x23, 0x4c, 0xfe, 0xf7, 0xa8, 0x6b, 0x11, 0xb1, 0xce, /* Byte value: 0x7a */ + 0x81, 0x3a, 0x15, 0x86, 0x7d, 0xfb, 0xee, 0x4a, 0x11, 0x9d, 0x79, 0xfd, 0x66, 0x6a, 0xed, 0x42, /* Byte value: 0x7b */ + 0x3f, 0x58, 0x8d, 0x8a, 0xac, 0x26, 0xab, 0x59, 0x3c, 0xae, 0x1d, 0x2e, 0x88, 0x98, 0xaf, 0xf8, /* Byte value: 0x7c */ + 0xb3, 0x60, 0x42, 0xe8, 0x2d, 0xc5, 0x87, 0x99, 0x7b, 0x1c, 0x14, 0x01, 0xd9, 0x92, 0xe5, 0xeb, /* Byte value: 0x7d */ + 0xbb, 0x19, 0x9c, 0x48, 0xe4, 0xac, 0x30, 0xf2, 0x45, 0xf1, 0x3d, 0xf8, 0x5d, 0xf5, 0x1a, 0x83, /* Byte value: 0x7e */ + 0xd6, 0x72, 0x87, 0x20, 0x3d, 0x1d, 0x9a, 0xc9, 0xd8, 0x88, 0x62, 0x8c, 0x95, 0x74, 0x33, 0x77, /* Byte value: 0x7f */ + 0xea, 0x03, 0xb7, 0x96, 0x82, 0x14, 0xa3, 0xcf, 0x7d, 0xd9, 0x48, 0xbb, 0xcd, 0x50, 0x15, 0x98, /* Byte value: 0x80 */ + 0x25, 0x5c, 0xfa, 0x81, 0x97, 0x16, 0xec, 0x8e, 0x90, 0xf0, 0xfd, 0x49, 0xe6, 0x58, 0x22, 0x5a, /* Byte value: 0x81 */ + 0xce, 0xf9, 0x26, 0x03, 0xa5, 0xa6, 0x80, 0x74, 0x9a, 0x7c, 0x19, 0x44, 0xda, 0xdd, 0xf1, 0xcf, /* Byte value: 0x82 */ + 0x63, 0x40, 0x7c, 0xb0, 0x36, 0x86, 0xfa, 0xee, 0x52, 0xa9, 0x18, 0xbf, 0x2f, 0x5d, 0x07, 0xb2, /* Byte value: 0x83 */ + 0x45, 0x35, 0x3b, 0x0d, 0xb2, 0xbf, 0x84, 0x3f, 0x5b, 0xa6, 0xd2, 0xef, 0x19, 0xb9, 0xac, 0xff, /* Byte value: 0x84 */ + 0x32, 0x5a, 0x57, 0x6e, 0x50, 0x3e, 0x69, 0xd3, 0x6a, 0x81, 0x6d, 0xfc, 0xbf, 0xf8, 0x08, 0xa9, /* Byte value: 0x85 */ + 0xd7, 0xd4, 0xec, 0x34, 0x8d, 0xb9, 0x55, 0xfc, 0xaf, 0xdd, 0xce, 0x3a, 0x64, 0xa1, 0xf5, 0x7a, /* Byte value: 0x86 */ + 0x9e, 0x45, 0x66, 0xc9, 0x73, 0xba, 0xdc, 0x7c, 0xd5, 0x01, 0xc0, 0xb1, 0xbb, 0xad, 0x38, 0xd9, /* Byte value: 0x87 */ + 0x08, 0x79, 0xde, 0xa0, 0xc9, 0x69, 0xb7, 0x6b, 0x3e, 0xed, 0x29, 0xf9, 0x84, 0x67, 0xff, 0x68, /* Byte value: 0x88 */ + 0x8d, 0x9e, 0xa4, 0x76, 0x31, 0x47, 0xe3, 0xf5, 0x30, 0xe7, 0xa5, 0x99, 0xa0, 0xdf, 0x8c, 0x1e, /* Byte value: 0x89 */ + 0x79, 0x44, 0x0b, 0xbb, 0x0d, 0xb6, 0xbd, 0x39, 0xfe, 0xf7, 0xf8, 0xd8, 0x41, 0x9d, 0x8a, 0x10, /* Byte value: 0x8a */ + 0xab, 0xeb, 0xe3, 0xcb, 0xb5, 0x7e, 0x9d, 0x24, 0x39, 0xe8, 0x6f, 0xc9, 0x96, 0x3b, 0x27, 0x53, /* Byte value: 0x8b */ + 0x36, 0x87, 0x38, 0x3e, 0xd5, 0xeb, 0xd3, 0x07, 0x75, 0x16, 0x98, 0x61, 0xfd, 0x2a, 0x96, 0x9d, /* Byte value: 0x8c */ + 0xfb, 0x57, 0xa3, 0x01, 0x63, 0x62, 0xc1, 0x2c, 0x76, 0x95, 0xb6, 0x3c, 0xf7, 0x4b, 0xee, 0x45, /* Byte value: 0x8d */ + 0xec, 0x51, 0x0e, 0xee, 0xa4, 0x4a, 0x44, 0x71, 0x8c, 0xe4, 0x26, 0x89, 0xae, 0xeb, 0xc4, 0xb6, /* Byte value: 0x8e */ + 0x4e, 0x65, 0x58, 0x91, 0x68, 0xf9, 0xa1, 0x0b, 0xfc, 0xb4, 0xcc, 0x0f, 0x4d, 0x62, 0xda, 0x80, /* Byte value: 0x8f */ + 0x7e, 0xb0, 0xd9, 0xd7, 0x9b, 0x4c, 0x95, 0xb2, 0x78, 0x9f, 0x3a, 0x5c, 0xd3, 0xf3, 0x9d, 0x33, /* Byte value: 0x90 */ + 0xd0, 0x20, 0x3e, 0x58, 0x1b, 0x43, 0x7d, 0x77, 0x29, 0xb5, 0x0c, 0xbe, 0xf6, 0xcf, 0xe2, 0x59, /* Byte value: 0x91 */ + 0x6c, 0xcd, 0x70, 0x7c, 0x69, 0x15, 0x65, 0x0e, 0xea, 0x2c, 0xf3, 0xc2, 0x39, 0x54, 0xef, 0xf9, /* Byte value: 0x92 */ + 0xf3, 0x2e, 0x7d, 0xa1, 0xaa, 0x0b, 0x76, 0x47, 0x48, 0x78, 0x9f, 0xc5, 0x73, 0x2c, 0x11, 0x2d, /* Byte value: 0x93 */ + 0x5f, 0x31, 0x4c, 0x06, 0x89, 0x8f, 0xc3, 0xe8, 0xf7, 0xf8, 0x32, 0x88, 0x77, 0x79, 0x21, 0x5d, /* Byte value: 0x94 */ + 0xff, 0x8a, 0xcc, 0x51, 0xe6, 0xb7, 0x7b, 0xf8, 0x69, 0x02, 0x43, 0xa1, 0xb5, 0x99, 0x70, 0x71, /* Byte value: 0x95 */ + 0x8a, 0x6a, 0x76, 0x1a, 0xa7, 0xbd, 0xcb, 0x7e, 0xb6, 0x8f, 0x67, 0x1d, 0x32, 0xb1, 0x9b, 0x3d, /* Byte value: 0x96 */ + 0x56, 0xee, 0xf9, 0xb2, 0xf0, 0x42, 0xbb, 0xb6, 0xbe, 0x40, 0xb7, 0xc7, 0x02, 0xcb, 0x18, 0x38, /* Byte value: 0x97 */ + 0xdd, 0x22, 0xe4, 0xbc, 0xe7, 0x5b, 0xbf, 0xfd, 0x7f, 0x9a, 0x7c, 0x6c, 0xc1, 0xaf, 0x45, 0x08, /* Byte value: 0x98 */ + 0xb4, 0x94, 0x90, 0x84, 0xbb, 0x3f, 0xaf, 0x12, 0xfd, 0x74, 0xd6, 0x85, 0x4b, 0xfc, 0xf2, 0xc8, /* Byte value: 0x99 */ + 0x04, 0xdd, 0x6f, 0x50, 0x85, 0xd5, 0xba, 0xd4, 0x1f, 0x97, 0xf5, 0x9d, 0x42, 0xd2, 0x9e, 0x34, /* Byte value: 0x9a */ + 0xbe, 0x62, 0x98, 0x0c, 0xd1, 0xdd, 0x45, 0x13, 0x2d, 0x33, 0x64, 0xd3, 0xee, 0xf2, 0x42, 0xba, /* Byte value: 0x9b */ + 0x1b, 0xa2, 0x1c, 0x1f, 0x8b, 0x94, 0x88, 0xe2, 0xdb, 0x0b, 0x4c, 0xd1, 0x9f, 0x15, 0x4b, 0xaf, /* Byte value: 0x9c */ + 0x9c, 0xca, 0xb0, 0xe1, 0xd0, 0x31, 0x81, 0x16, 0x3b, 0xab, 0x5b, 0x1e, 0x9a, 0xc4, 0x77, 0xc3, /* Byte value: 0x9d */ + 0x5e, 0x97, 0x27, 0x12, 0x39, 0x2b, 0x0c, 0xdd, 0x80, 0xad, 0x9e, 0x3e, 0x86, 0xac, 0xe7, 0x50, /* Byte value: 0x9e */ + 0x07, 0xf4, 0xd2, 0x6c, 0x96, 0xfa, 0x28, 0x8b, 0x86, 0x68, 0xc2, 0x84, 0x92, 0x6e, 0x17, 0x23, /* Byte value: 0x9f */ + 0x8c, 0x38, 0xcf, 0x62, 0x81, 0xe3, 0x2c, 0xc0, 0x47, 0xb2, 0x09, 0x2f, 0x51, 0x0a, 0x4a, 0x13, /* Byte value: 0xa0 */ + 0x0f, 0x8d, 0x0c, 0xcc, 0x5f, 0x93, 0x9f, 0xe0, 0xb8, 0x85, 0xeb, 0x7d, 0x16, 0x09, 0xe8, 0x4b, /* Byte value: 0xa1 */ + 0x6d, 0x6b, 0x1b, 0x68, 0xd9, 0xb1, 0xaa, 0x3b, 0x9d, 0x79, 0x5f, 0x74, 0xc8, 0x81, 0x29, 0xf4, /* Byte value: 0xa2 */ + 0xf4, 0xda, 0xaf, 0xcd, 0x3c, 0xf1, 0x5e, 0xcc, 0xce, 0x10, 0x5d, 0x41, 0xe1, 0x42, 0x06, 0x0e, /* Byte value: 0xa3 */ + 0x26, 0x75, 0x47, 0xbd, 0x84, 0x39, 0x7e, 0xd1, 0x09, 0x0f, 0xca, 0x50, 0x36, 0xe4, 0xab, 0x4d, /* Byte value: 0xa4 */ + 0x71, 0x3d, 0xd5, 0x1b, 0xc4, 0xdf, 0x0a, 0x52, 0xc0, 0x1a, 0xd1, 0x21, 0xc5, 0xfa, 0x75, 0x78, /* Byte value: 0xa5 */ + 0x1c, 0x56, 0xce, 0x73, 0x1d, 0x6e, 0xa0, 0x69, 0x5d, 0x63, 0x8e, 0x55, 0x0d, 0x7b, 0x5c, 0x8c, /* Byte value: 0xa6 */ + 0x94, 0xb3, 0x6e, 0x41, 0x19, 0x58, 0x36, 0x7d, 0x05, 0x46, 0x72, 0xe7, 0x1e, 0xa3, 0x88, 0xab, /* Byte value: 0xa7 */ + 0x22, 0xa8, 0x28, 0xed, 0x01, 0xec, 0xc4, 0x05, 0x16, 0x98, 0x3f, 0xcd, 0x74, 0x36, 0x35, 0x79, /* Byte value: 0xa8 */ + 0xeb, 0xa5, 0xdc, 0x82, 0x32, 0xb0, 0x6c, 0xfa, 0x0a, 0x8c, 0xe4, 0x0d, 0x3c, 0x85, 0xd3, 0x95, /* Byte value: 0xa9 */ + 0xbc, 0xed, 0x4e, 0x24, 0x72, 0x56, 0x18, 0x79, 0xc3, 0x99, 0xff, 0x7c, 0xcf, 0x9b, 0x0d, 0xa0, /* Byte value: 0xaa */ + 0x3c, 0x71, 0x30, 0xb6, 0xbf, 0x09, 0x39, 0x06, 0xa5, 0x51, 0x2a, 0x37, 0x58, 0x24, 0x26, 0xef, /* Byte value: 0xab */ + 0x15, 0x89, 0x7b, 0xc7, 0x64, 0xa3, 0xd8, 0x37, 0x14, 0xdb, 0x0b, 0x1a, 0x78, 0xc9, 0x65, 0xe9, /* Byte value: 0xac */ + 0xe9, 0x2a, 0x0a, 0xaa, 0x91, 0x3b, 0x31, 0x90, 0xe4, 0x26, 0x7f, 0xa2, 0x1d, 0xec, 0x9c, 0x8f, /* Byte value: 0xad */ + 0x02, 0x8f, 0xd6, 0x28, 0xa3, 0x8b, 0x5d, 0x6a, 0xee, 0xaa, 0x9b, 0xaf, 0x21, 0x69, 0x4f, 0x1a, /* Byte value: 0xae */ + 0x46, 0x1c, 0x86, 0x31, 0xa1, 0x90, 0x16, 0x60, 0xc2, 0x59, 0xe5, 0xf6, 0xc9, 0x05, 0x25, 0xe8, /* Byte value: 0xaf */ + 0xda, 0xd6, 0x36, 0xd0, 0x71, 0xa1, 0x97, 0x76, 0xf9, 0xf2, 0xbe, 0xe8, 0x53, 0xc1, 0x52, 0x2b, /* Byte value: 0xb0 */ + 0x19, 0x2d, 0xca, 0x37, 0x28, 0x1f, 0xd5, 0x88, 0x35, 0xa1, 0xd7, 0x7e, 0xbe, 0x7c, 0x04, 0xb5, /* Byte value: 0xb1 */ + 0xdb, 0x70, 0x5d, 0xc4, 0xc1, 0x05, 0x58, 0x43, 0x8e, 0xa7, 0x12, 0x5e, 0xa2, 0x14, 0x94, 0x26, /* Byte value: 0xb2 */ + 0x1e, 0xd9, 0x18, 0x5b, 0xbe, 0xe5, 0xfd, 0x03, 0xb3, 0xc9, 0x15, 0xfa, 0x2c, 0x12, 0x13, 0x96, /* Byte value: 0xb3 */ + 0x17, 0x06, 0xad, 0xef, 0xc7, 0x28, 0x85, 0x5d, 0xfa, 0x71, 0x90, 0xb5, 0x59, 0xa0, 0x2a, 0xf3, /* Byte value: 0xb4 */ + 0x4a, 0xb8, 0x37, 0xc1, 0xed, 0x2c, 0x1b, 0xdf, 0xe3, 0x23, 0x39, 0x92, 0x0f, 0xb0, 0x44, 0xb4, /* Byte value: 0xb5 */ + 0x0a, 0xf6, 0x08, 0x88, 0x6a, 0xe2, 0xea, 0x01, 0xd0, 0x47, 0xb2, 0x56, 0xa5, 0x0e, 0xb0, 0x72, /* Byte value: 0xb6 */ + 0xd9, 0xff, 0x8b, 0xec, 0x62, 0x8e, 0x05, 0x29, 0x60, 0x0d, 0x89, 0xf1, 0x83, 0x7d, 0xdb, 0x3c, /* Byte value: 0xb7 */ + 0x89, 0x43, 0xcb, 0x26, 0xb4, 0x92, 0x59, 0x21, 0x2f, 0x70, 0x50, 0x04, 0xe2, 0x0d, 0x12, 0x2a, /* Byte value: 0xb8 */ + 0x78, 0xe2, 0x60, 0xaf, 0xbd, 0x12, 0x72, 0x0c, 0x89, 0xa2, 0x54, 0x6e, 0xb0, 0x48, 0x4c, 0x1d, /* Byte value: 0xb9 */ + 0x76, 0xc9, 0x07, 0x77, 0x52, 0x25, 0x22, 0xd9, 0x46, 0x72, 0x13, 0xa5, 0x57, 0x94, 0x62, 0x5b, /* Byte value: 0xba */ + 0x27, 0xd3, 0x2c, 0xa9, 0x34, 0x9d, 0xb1, 0xe4, 0x7e, 0x5a, 0x66, 0xe6, 0xc7, 0x31, 0x6d, 0x40, /* Byte value: 0xbb */ + 0x18, 0x8b, 0xa1, 0x23, 0x98, 0xbb, 0x1a, 0xbd, 0x42, 0xf4, 0x7b, 0xc8, 0x4f, 0xa9, 0xc2, 0xb8, /* Byte value: 0xbc */ + 0x23, 0x0e, 0x43, 0xf9, 0xb1, 0x48, 0x0b, 0x30, 0x61, 0xcd, 0x93, 0x7b, 0x85, 0xe3, 0xf3, 0x74, /* Byte value: 0xbd */ + 0xf2, 0x88, 0x16, 0xb5, 0x1a, 0xaf, 0xb9, 0x72, 0x3f, 0x2d, 0x33, 0x73, 0x82, 0xf9, 0xd7, 0x20, /* Byte value: 0xbe */ + 0x95, 0x15, 0x05, 0x55, 0xa9, 0xfc, 0xf9, 0x48, 0x72, 0x13, 0xde, 0x51, 0xef, 0x76, 0x4e, 0xa6, /* Byte value: 0xbf */ + 0xd5, 0x5b, 0x3a, 0x1c, 0x2e, 0x32, 0x08, 0x96, 0x41, 0x77, 0x55, 0x95, 0x45, 0xc8, 0xba, 0x60, /* Byte value: 0xc0 */ + 0xa9, 0x64, 0x35, 0xe3, 0x16, 0xf5, 0xc0, 0x4e, 0xd7, 0x42, 0xf4, 0x66, 0xb7, 0x52, 0x68, 0x49, /* Byte value: 0xc1 */ + 0x84, 0x41, 0x11, 0xc2, 0x48, 0x8a, 0x9b, 0xab, 0x79, 0x5f, 0x20, 0xd6, 0xd5, 0x6d, 0xb5, 0x7b, /* Byte value: 0xc2 */ + 0xe1, 0x53, 0xd4, 0x0a, 0x58, 0x52, 0x86, 0xfb, 0xda, 0xcb, 0x56, 0x5b, 0x99, 0x8b, 0x63, 0xe7, /* Byte value: 0xc3 */ + 0x1d, 0xf0, 0xa5, 0x67, 0xad, 0xca, 0x6f, 0x5c, 0x2a, 0x36, 0x22, 0xe3, 0xfc, 0xae, 0x9a, 0x81, /* Byte value: 0xc4 */ + 0x93, 0x47, 0xbc, 0x2d, 0x8f, 0xa2, 0x1e, 0xf6, 0x83, 0x2e, 0xb0, 0x63, 0x8c, 0xcd, 0x9f, 0x88, /* Byte value: 0xc5 */ + 0x28, 0x5e, 0x20, 0x65, 0x6b, 0x0e, 0x2e, 0x04, 0xc6, 0xdf, 0x8d, 0x9b, 0xd1, 0x38, 0x85, 0x0b, /* Byte value: 0xc6 */ + 0xc6, 0x80, 0xf8, 0xa3, 0x6c, 0xcf, 0x37, 0x1f, 0xa4, 0x91, 0x30, 0xbd, 0x5e, 0xba, 0x0e, 0xa7, /* Byte value: 0xc7 */ + 0x7b, 0xcb, 0xdd, 0x93, 0xae, 0x3d, 0xe0, 0x53, 0x10, 0x5d, 0x63, 0x77, 0x60, 0xf4, 0xc5, 0x0a, /* Byte value: 0xc8 */ + 0x65, 0x12, 0xc5, 0xc8, 0x10, 0xd8, 0x1d, 0x50, 0xa3, 0x94, 0x76, 0x8d, 0x4c, 0xe6, 0xd6, 0x9c, /* Byte value: 0xc9 */ + 0x75, 0xe0, 0xba, 0x4b, 0x41, 0x0a, 0xb0, 0x86, 0xdf, 0x8d, 0x24, 0xbc, 0x87, 0x28, 0xeb, 0x4c, /* Byte value: 0xca */ + 0x7c, 0x3f, 0x0f, 0xff, 0x38, 0xc7, 0xc8, 0xd8, 0x96, 0x35, 0xa1, 0xf3, 0xf2, 0x9a, 0xd2, 0x29, /* Byte value: 0xcb */ + 0xe3, 0xdc, 0x02, 0x22, 0xfb, 0xd9, 0xdb, 0x91, 0x34, 0x61, 0xcd, 0xf4, 0xb8, 0xe2, 0x2c, 0xfd, /* Byte value: 0xcc */ + 0xee, 0xde, 0xd8, 0xc6, 0x07, 0xc1, 0x19, 0x1b, 0x62, 0x4e, 0xbd, 0x26, 0x8f, 0x82, 0x8b, 0xac, /* Byte value: 0xcd */ + 0x21, 0x81, 0x95, 0xd1, 0x12, 0xc3, 0x56, 0x5a, 0x8f, 0x67, 0x08, 0xd4, 0xa4, 0x8a, 0xbc, 0x6e, /* Byte value: 0xce */ + 0x8e, 0xb7, 0x19, 0x4a, 0x22, 0x68, 0x71, 0xaa, 0xa9, 0x18, 0x92, 0x80, 0x70, 0x63, 0x05, 0x09, /* Byte value: 0xcf */ + 0xf9, 0xd8, 0x75, 0x29, 0xc0, 0xe9, 0x9c, 0x46, 0x98, 0x3f, 0x2d, 0x93, 0xd6, 0x22, 0xa1, 0x5f, /* Byte value: 0xd0 */ + 0x01, 0xa6, 0x6b, 0x14, 0xb0, 0xa4, 0xcf, 0x35, 0x77, 0x55, 0xac, 0xb6, 0xf1, 0xd5, 0xc6, 0x0d, /* Byte value: 0xd1 */ + 0x5b, 0xec, 0x23, 0x56, 0x0c, 0x5a, 0x79, 0x3c, 0xe8, 0x6f, 0xc7, 0x15, 0x35, 0xab, 0xbf, 0x69, /* Byte value: 0xd2 */ + 0x91, 0xc8, 0x6a, 0x05, 0x2c, 0x29, 0x43, 0x9c, 0x6d, 0x84, 0x2b, 0xcc, 0xad, 0xa4, 0xd0, 0x92, /* Byte value: 0xd3 */ + 0x14, 0x2f, 0x10, 0xd3, 0xd4, 0x07, 0x17, 0x02, 0x63, 0x8e, 0xa7, 0xac, 0x89, 0x1c, 0xa3, 0xe4, /* Byte value: 0xd4 */ + 0x7a, 0x6d, 0xb6, 0x87, 0x1e, 0x99, 0x2f, 0x66, 0x67, 0x08, 0xcf, 0xc1, 0x91, 0x21, 0x03, 0x07, /* Byte value: 0xd5 */ + 0xf6, 0x55, 0x79, 0xe5, 0x9f, 0x7a, 0x03, 0xa6, 0x20, 0xba, 0xc6, 0xee, 0xc0, 0x2b, 0x49, 0x14, /* Byte value: 0xd6 */ + 0xb1, 0xef, 0x94, 0xc0, 0x8e, 0x4e, 0xda, 0xf3, 0x95, 0xb6, 0x8f, 0xae, 0xf8, 0xfb, 0xaa, 0xf1, /* Byte value: 0xd7 */ + 0xb7, 0xbd, 0x2d, 0xb8, 0xa8, 0x10, 0x3d, 0x4d, 0x64, 0x8b, 0xe1, 0x9c, 0x9b, 0x40, 0x7b, 0xdf, /* Byte value: 0xd8 */ + 0xca, 0x24, 0x49, 0x53, 0x20, 0x73, 0x3a, 0xa0, 0x85, 0xeb, 0xec, 0xd9, 0x98, 0x0f, 0x6f, 0xfb, /* Byte value: 0xd9 */ + 0x5a, 0x4a, 0x48, 0x42, 0xbc, 0xfe, 0xb6, 0x09, 0x9f, 0x3a, 0x6b, 0xa3, 0xc4, 0x7e, 0x79, 0x64, /* Byte value: 0xda */ + 0xf8, 0x7e, 0x1e, 0x3d, 0x70, 0x4d, 0x53, 0x73, 0xef, 0x6a, 0x81, 0x25, 0x27, 0xf7, 0x67, 0x52, /* Byte value: 0xdb */ + 0xcc, 0x76, 0xf0, 0x2b, 0x06, 0x2d, 0xdd, 0x1e, 0x74, 0xd6, 0x82, 0xeb, 0xfb, 0xb4, 0xbe, 0xd5, /* Byte value: 0xdc */ + 0x47, 0xba, 0xed, 0x25, 0x11, 0x34, 0xd9, 0x55, 0xb5, 0x0c, 0x49, 0x40, 0x38, 0xd0, 0xe3, 0xe5, /* Byte value: 0xdd */ + 0x96, 0x3c, 0xb8, 0x69, 0xba, 0xd3, 0x6b, 0x17, 0xeb, 0xec, 0xe9, 0x48, 0x3f, 0xca, 0xc7, 0xb1, /* Byte value: 0xde */ + 0x6e, 0x42, 0xa6, 0x54, 0xca, 0x9e, 0x38, 0x64, 0x04, 0x86, 0x68, 0x6d, 0x18, 0x3d, 0xa0, 0xe3, /* Byte value: 0xdf */ + 0x13, 0xdb, 0xc2, 0xbf, 0x42, 0xfd, 0x3f, 0x89, 0xe5, 0xe6, 0x65, 0x28, 0x1b, 0x72, 0xb4, 0xc7, /* Byte value: 0xe0 */ + 0x24, 0xfa, 0x91, 0x95, 0x27, 0xb2, 0x23, 0xbb, 0xe7, 0xa5, 0x51, 0xff, 0x17, 0x8d, 0xe4, 0x57, /* Byte value: 0xe1 */ + 0x74, 0x46, 0xd1, 0x5f, 0xf1, 0xae, 0x7f, 0xb3, 0xa8, 0xd8, 0x88, 0x0a, 0x76, 0xfd, 0x2d, 0x41, /* Byte value: 0xe2 */ + 0x09, 0xdf, 0xb5, 0xb4, 0x79, 0xcd, 0x78, 0x5e, 0x49, 0xb8, 0x85, 0x4f, 0x75, 0xb2, 0x39, 0x65, /* Byte value: 0xe3 */ + 0x03, 0x29, 0xbd, 0x3c, 0x13, 0x2f, 0x92, 0x5f, 0x99, 0xff, 0x37, 0x19, 0xd0, 0xbc, 0x89, 0x17, /* Byte value: 0xe4 */ + 0x30, 0xd5, 0x81, 0x46, 0xf3, 0xb5, 0x34, 0xb9, 0x84, 0x2b, 0xf6, 0x53, 0x9e, 0x91, 0x47, 0xb3, /* Byte value: 0xe5 */ + 0x50, 0xbc, 0x40, 0xca, 0xd6, 0x1c, 0x5c, 0x08, 0x4f, 0x7d, 0xd9, 0xf5, 0x61, 0x70, 0xc9, 0x16, /* Byte value: 0xe6 */ + 0x4f, 0xc3, 0x33, 0x85, 0xd8, 0x5d, 0x6e, 0x3e, 0x8b, 0xe1, 0x60, 0xb9, 0xbc, 0xb7, 0x1c, 0x8d, /* Byte value: 0xe7 */ + 0x0e, 0x2b, 0x67, 0xd8, 0xef, 0x37, 0x50, 0xd5, 0xcf, 0xd0, 0x47, 0xcb, 0xe7, 0xdc, 0x2e, 0x46, /* Byte value: 0xe8 */ + 0x7d, 0x99, 0x64, 0xeb, 0x88, 0x63, 0x07, 0xed, 0xe1, 0x60, 0x0d, 0x45, 0x03, 0x4f, 0x14, 0x24, /* Byte value: 0xe9 */ + 0xb9, 0x96, 0x4a, 0x60, 0x47, 0x27, 0x6d, 0x98, 0xab, 0x5b, 0xa6, 0x57, 0x7c, 0x9c, 0x55, 0x99, /* Byte value: 0xea */ + 0x37, 0x21, 0x53, 0x2a, 0x65, 0x4f, 0x1c, 0x32, 0x02, 0x43, 0x34, 0xd7, 0x0c, 0xff, 0x50, 0x90, /* Byte value: 0xeb */ + 0x54, 0x61, 0x2f, 0x9a, 0x53, 0xc9, 0xe6, 0xdc, 0x50, 0xea, 0x2c, 0x68, 0x23, 0xa2, 0x57, 0x22, /* Byte value: 0xec */ + 0x1f, 0x7f, 0x73, 0x4f, 0x0e, 0x41, 0x32, 0x36, 0xc4, 0x9c, 0xb9, 0x4c, 0xdd, 0xc7, 0xd5, 0x9b, /* Byte value: 0xed */ + 0xc2, 0x5d, 0x97, 0xf3, 0xe9, 0x1a, 0x8d, 0xcb, 0xbb, 0x06, 0xc5, 0x20, 0x1c, 0x68, 0x90, 0x93, /* Byte value: 0xee */ + 0x33, 0xfc, 0x3c, 0x7a, 0xe0, 0x9a, 0xa6, 0xe6, 0x1d, 0xd4, 0xc1, 0x4a, 0x4e, 0x2d, 0xce, 0xa4, /* Byte value: 0xef */ + 0x3a, 0x23, 0x89, 0xce, 0x99, 0x57, 0xde, 0xb8, 0x54, 0x6c, 0x44, 0x05, 0x3b, 0x9f, 0xf7, 0xc1, /* Byte value: 0xf0 */ + 0xe5, 0x8e, 0xbb, 0x5a, 0xdd, 0x87, 0x3c, 0x2f, 0xc5, 0x5c, 0xa3, 0xc6, 0xdb, 0x59, 0xfd, 0xd3, /* Byte value: 0xf1 */ + 0xe8, 0x8c, 0x61, 0xbe, 0x21, 0x9f, 0xfe, 0xa5, 0x93, 0x73, 0xd3, 0x14, 0xec, 0x39, 0x5a, 0x82, /* Byte value: 0xf2 */ + 0x12, 0x7d, 0xa9, 0xab, 0xf2, 0x59, 0xf0, 0xbc, 0x92, 0xb3, 0xc9, 0x9e, 0xea, 0xa7, 0x72, 0xca, /* Byte value: 0xf3 */ + 0x92, 0xe1, 0xd7, 0x39, 0x3f, 0x06, 0xd1, 0xc3, 0xf4, 0x7b, 0x1c, 0xd5, 0x7d, 0x18, 0x59, 0x85, /* Byte value: 0xf4 */ + 0xac, 0x1f, 0x31, 0xa7, 0x23, 0x84, 0xb5, 0xaf, 0xbf, 0x80, 0xad, 0x4d, 0x04, 0x55, 0x30, 0x70, /* Byte value: 0xf5 */ + 0x34, 0x08, 0xee, 0x16, 0x76, 0x60, 0x8e, 0x6d, 0x9b, 0xbc, 0x03, 0xce, 0xdc, 0x43, 0xd9, 0x87, /* Byte value: 0xf6 */ + 0x52, 0x33, 0x96, 0xe2, 0x75, 0x97, 0x01, 0x62, 0xa1, 0xd7, 0x42, 0x5a, 0x40, 0x19, 0x86, 0x0c, /* Byte value: 0xf7 */ + 0xed, 0xf7, 0x65, 0xfa, 0x14, 0xee, 0x8b, 0x44, 0xfb, 0xb1, 0x8a, 0x3f, 0x5f, 0x3e, 0x02, 0xbb, /* Byte value: 0xf8 */ + 0xfa, 0xf1, 0xc8, 0x15, 0xd3, 0xc6, 0x0e, 0x19, 0x01, 0xc0, 0x1a, 0x8a, 0x06, 0x9e, 0x28, 0x48, /* Byte value: 0xf9 */ + 0x98, 0x17, 0xdf, 0xb1, 0x55, 0xe4, 0x3b, 0xc2, 0x24, 0x3c, 0xae, 0x83, 0xd8, 0x16, 0xe9, 0xf7, /* Byte value: 0xfa */ + 0xdf, 0xad, 0x32, 0x94, 0x44, 0xd0, 0xe2, 0x97, 0x91, 0x30, 0xe7, 0xc3, 0xe0, 0xc6, 0x0a, 0x12, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x66, 0x3b, 0x78, 0xf4, 0x03, 0xf7, 0x8f, 0x0f, 0x3a, 0x6b, 0x41, 0x94, 0x9c, 0x5a, 0x5f, 0x8b, /* Byte value: 0xfd */ + 0x2f, 0xaa, 0xf2, 0x09, 0xfd, 0xf4, 0x06, 0x8f, 0x40, 0xb7, 0x4f, 0x1f, 0x43, 0x56, 0x92, 0x28, /* Byte value: 0xfe */ + 0x3e, 0xfe, 0xe6, 0x9e, 0x1c, 0x82, 0x64, 0x6c, 0x4b, 0xfb, 0xb1, 0x98, 0x79, 0x4d, 0x69, 0xf5, /* Byte value: 0xff */ + + /* Matrix row: 12 */ + 0xc2, 0x45, 0xb9, 0x57, 0x85, 0xa8, 0xdb, 0x13, 0x2a, 0x3f, 0xb0, 0xb9, 0xb0, 0x0b, 0x7b, 0xc6, /* Byte value: 0x00 */ + 0x95, 0x59, 0xc2, 0x20, 0x7c, 0x53, 0x81, 0x21, 0x64, 0x56, 0x1f, 0xc2, 0x1f, 0x6d, 0x57, 0x36, /* Byte value: 0x01 */ + 0xa6, 0x73, 0x93, 0x63, 0x29, 0x01, 0x42, 0x6e, 0x91, 0x38, 0x9b, 0x93, 0x9b, 0xf4, 0x35, 0x9d, /* Byte value: 0x02 */ + 0x27, 0x78, 0x48, 0x3d, 0x69, 0x20, 0x97, 0x5e, 0x08, 0x0c, 0x8b, 0x48, 0x8b, 0xf5, 0x6f, 0x4b, /* Byte value: 0x03 */ + 0xe0, 0xc8, 0x66, 0x94, 0xe3, 0x75, 0x59, 0xd8, 0x8c, 0xca, 0x48, 0x66, 0x48, 0xe5, 0x86, 0xb5, /* Byte value: 0x04 */ + 0x86, 0x9c, 0xc4, 0x12, 0x49, 0xd1, 0x1c, 0x46, 0xa5, 0x16, 0x83, 0xc4, 0x83, 0x14, 0x42, 0x20, /* Byte value: 0x05 */ + 0x06, 0xa6, 0x5b, 0x15, 0x0a, 0x17, 0xa7, 0xe6, 0x75, 0xae, 0xe3, 0x5b, 0xe3, 0x12, 0x5d, 0x91, /* Byte value: 0x06 */ + 0x5d, 0x35, 0x96, 0x48, 0xe7, 0xc2, 0x70, 0xdb, 0xd1, 0x58, 0x49, 0x96, 0x49, 0x50, 0xcb, 0x80, /* Byte value: 0x07 */ + 0x09, 0x7a, 0x21, 0xd4, 0x1b, 0xd3, 0x98, 0x9a, 0x44, 0x66, 0x76, 0x21, 0x76, 0x3f, 0x28, 0xd9, /* Byte value: 0x08 */ + 0x78, 0x2f, 0x56, 0xc7, 0x88, 0xef, 0x3b, 0x66, 0x4b, 0x8f, 0x22, 0x56, 0x22, 0xab, 0x2e, 0x05, /* Byte value: 0x09 */ + 0xf4, 0x9a, 0x7f, 0xea, 0xdf, 0x07, 0x0d, 0xc9, 0x71, 0xa8, 0x47, 0x7f, 0x47, 0x89, 0x8b, 0x55, /* Byte value: 0x0a */ + 0x16, 0x30, 0x91, 0xcc, 0x3a, 0x7f, 0x88, 0xf2, 0x6f, 0xb9, 0xef, 0x91, 0xef, 0x62, 0x87, 0x2e, /* Byte value: 0x0b */ + 0x19, 0xec, 0xeb, 0x0d, 0x2b, 0xbb, 0xb7, 0x8e, 0x5e, 0x71, 0x7a, 0xeb, 0x7a, 0x4f, 0xf2, 0x66, /* Byte value: 0x0c */ + 0xec, 0x47, 0xd0, 0xbe, 0xf7, 0x5b, 0xd4, 0xd7, 0x66, 0x55, 0x4d, 0xd0, 0x4d, 0xc1, 0x3c, 0x54, /* Byte value: 0x0d */ + 0x69, 0x88, 0xd8, 0x47, 0xbb, 0x60, 0x7a, 0xe2, 0x18, 0x14, 0x5e, 0xd8, 0x5e, 0xdc, 0xb1, 0xdd, /* Byte value: 0x0e */ + 0x04, 0xc4, 0xd3, 0xa7, 0x0c, 0x1a, 0x7b, 0x05, 0xe7, 0x75, 0x03, 0xd3, 0x03, 0x1c, 0xd7, 0x5f, /* Byte value: 0x0f */ + 0x8f, 0xe6, 0xe5, 0xc6, 0x52, 0x02, 0x84, 0xdc, 0xe1, 0x70, 0xf5, 0xe5, 0xf5, 0x2b, 0x6a, 0xf9, /* Byte value: 0x10 */ + 0x30, 0x79, 0x9d, 0xa8, 0x50, 0xb8, 0x71, 0x3c, 0x2e, 0x39, 0x14, 0x9d, 0x14, 0x90, 0xad, 0x02, /* Byte value: 0x11 */ + 0x39, 0x03, 0xbc, 0x7c, 0x4b, 0x6b, 0xe9, 0xa6, 0x6a, 0x5f, 0x62, 0xbc, 0x62, 0xaf, 0x85, 0xdb, /* Byte value: 0x12 */ + 0xe9, 0xb2, 0x47, 0x40, 0xf8, 0xa6, 0xc1, 0x42, 0xc8, 0xac, 0x3e, 0x47, 0x3e, 0xda, 0xae, 0x6c, /* Byte value: 0x13 */ + 0x03, 0x53, 0xcc, 0xeb, 0x05, 0xea, 0xb2, 0x73, 0xdb, 0x57, 0x90, 0xcc, 0x90, 0x09, 0xcf, 0xa9, /* Byte value: 0x14 */ + 0xcf, 0xfb, 0x4b, 0x24, 0x92, 0x61, 0x38, 0x8c, 0x89, 0x2c, 0xc5, 0x4b, 0xc5, 0x28, 0x84, 0x40, /* Byte value: 0x15 */ + 0x70, 0x64, 0x33, 0x4a, 0x90, 0xdb, 0xcd, 0x6c, 0x46, 0x65, 0x24, 0x33, 0x24, 0x93, 0x43, 0xbb, /* Byte value: 0x16 */ + 0x43, 0x4e, 0x62, 0x09, 0xc5, 0x89, 0x0e, 0x23, 0xb3, 0x0b, 0xa0, 0x62, 0xa0, 0x0a, 0x21, 0x10, /* Byte value: 0x17 */ + 0x55, 0x7e, 0xf3, 0xc5, 0xff, 0xf6, 0x86, 0xd1, 0xdc, 0xb2, 0x4f, 0xf3, 0x4f, 0x68, 0xa6, 0x3e, /* Byte value: 0x18 */ + 0x2c, 0x60, 0xe1, 0x5b, 0x74, 0xfe, 0xd3, 0x27, 0xde, 0xb1, 0x1d, 0xe1, 0x1d, 0xc4, 0xcd, 0x5c, /* Byte value: 0x19 */ + 0x12, 0xf4, 0x42, 0x6b, 0x36, 0x65, 0xf3, 0xf7, 0x88, 0xcc, 0xec, 0x42, 0xec, 0x7e, 0x50, 0x71, /* Byte value: 0x1a */ + 0x8e, 0xd7, 0xa1, 0x9f, 0x51, 0xe5, 0xea, 0x4c, 0xa8, 0xfc, 0x85, 0xa1, 0x85, 0x2c, 0x2f, 0x9e, /* Byte value: 0x1b */ + 0xd5, 0x44, 0x6c, 0xc2, 0xbc, 0x30, 0x3d, 0x71, 0x0c, 0x0a, 0x2f, 0x6c, 0x2f, 0x6e, 0xb9, 0x8f, /* Byte value: 0x1c */ + 0x3d, 0xc7, 0x6f, 0xdb, 0x47, 0x71, 0x92, 0xa3, 0x8d, 0x2a, 0x61, 0x6f, 0x61, 0xb3, 0x52, 0x84, /* Byte value: 0x1d */ + 0xd2, 0xd3, 0x73, 0x8e, 0xb5, 0xc0, 0xf4, 0x07, 0x30, 0x28, 0xbc, 0x73, 0xbc, 0x7b, 0xa1, 0x79, /* Byte value: 0x1e */ + 0x76, 0xc2, 0x68, 0x5f, 0x9a, 0xcc, 0x6a, 0x8a, 0x33, 0xcb, 0xc7, 0x68, 0xc7, 0x81, 0x1e, 0x2a, /* Byte value: 0x1f */ + 0x18, 0xdd, 0xaf, 0x54, 0x28, 0x5c, 0xd9, 0x1e, 0x17, 0xfd, 0x0a, 0xaf, 0x0a, 0x48, 0xb7, 0x01, /* Byte value: 0x20 */ + 0x35, 0x8c, 0x0a, 0x56, 0x5f, 0x45, 0x64, 0xa9, 0x80, 0xc0, 0x67, 0x0a, 0x67, 0x8b, 0x3f, 0x3a, /* Byte value: 0x21 */ + 0x07, 0x97, 0x1f, 0x4c, 0x09, 0xf0, 0xc9, 0x76, 0x3c, 0x22, 0x93, 0x1f, 0x93, 0x15, 0x18, 0xf6, /* Byte value: 0x22 */ + 0xc0, 0x27, 0x31, 0xe5, 0x83, 0xa5, 0x07, 0xf0, 0xb8, 0xe4, 0x50, 0x31, 0x50, 0x05, 0xf1, 0x08, /* Byte value: 0x23 */ + 0xf7, 0xc9, 0xb3, 0x01, 0xda, 0xed, 0xbf, 0xba, 0xaa, 0xff, 0xd7, 0xb3, 0xd7, 0x80, 0x44, 0xfc, /* Byte value: 0x24 */ + 0xb8, 0x08, 0x67, 0x22, 0x0b, 0x4a, 0x3c, 0x96, 0xf3, 0x6b, 0x72, 0x67, 0x72, 0xae, 0xdf, 0x0d, /* Byte value: 0x25 */ + 0x72, 0x06, 0xbb, 0xf8, 0x96, 0xd6, 0x11, 0x8f, 0xd4, 0xbe, 0xc4, 0xbb, 0xc4, 0x9d, 0xc9, 0x75, /* Byte value: 0x26 */ + 0x11, 0xa7, 0x8e, 0x80, 0x33, 0x8f, 0x41, 0x84, 0x53, 0x9b, 0x7c, 0x8e, 0x7c, 0x77, 0x9f, 0xd8, /* Byte value: 0x27 */ + 0xb4, 0x87, 0xd1, 0x08, 0x1f, 0x64, 0xb1, 0x99, 0x19, 0xf4, 0x77, 0xd1, 0x77, 0x8a, 0x65, 0xec, /* Byte value: 0x28 */ + 0xff, 0x82, 0xd6, 0x8c, 0xc2, 0xd9, 0x49, 0xb0, 0xa7, 0x15, 0xd1, 0xd6, 0xd1, 0xb8, 0x29, 0x42, /* Byte value: 0x29 */ + 0x1a, 0xbf, 0x27, 0xe6, 0x2e, 0x51, 0x05, 0xfd, 0x85, 0x26, 0xea, 0x27, 0xea, 0x46, 0x3d, 0xcf, /* Byte value: 0x2a */ + 0x48, 0x56, 0xcb, 0x6f, 0xd8, 0x57, 0x4a, 0x5a, 0x65, 0xb6, 0x36, 0xcb, 0x36, 0x3b, 0x83, 0x07, /* Byte value: 0x2b */ + 0xaa, 0xfc, 0x25, 0x49, 0x3d, 0x2f, 0xcf, 0x61, 0x7b, 0xa7, 0x9e, 0x25, 0x9e, 0xd0, 0x8f, 0x7c, /* Byte value: 0x2c */ + 0x58, 0xc0, 0x01, 0xb6, 0xe8, 0x3f, 0x65, 0x4e, 0x7f, 0xa1, 0x3a, 0x01, 0x3a, 0x4b, 0x59, 0xb8, /* Byte value: 0x2d */ + 0x93, 0xff, 0x99, 0x35, 0x76, 0x44, 0x26, 0xc7, 0x11, 0xf8, 0xfc, 0x99, 0xfc, 0x7f, 0x0a, 0xa7, /* Byte value: 0x2e */ + 0x21, 0xde, 0x13, 0x28, 0x63, 0x37, 0x30, 0xb8, 0x7d, 0xa2, 0x68, 0x13, 0x68, 0xe7, 0x32, 0xda, /* Byte value: 0x2f */ + 0xdd, 0x0f, 0x09, 0x4f, 0xa4, 0x04, 0xcb, 0x7b, 0x01, 0xe0, 0x29, 0x09, 0x29, 0x56, 0xd4, 0x31, /* Byte value: 0x30 */ + 0x60, 0xf2, 0xf9, 0x93, 0xa0, 0xb3, 0xe2, 0x78, 0x5c, 0x72, 0x28, 0xf9, 0x28, 0xe3, 0x99, 0x04, /* Byte value: 0x31 */ + 0x0c, 0x8f, 0xb6, 0x2a, 0x14, 0x2e, 0x8d, 0x0f, 0xea, 0x9f, 0x05, 0xb6, 0x05, 0x24, 0xba, 0xe1, /* Byte value: 0x32 */ + 0xc4, 0xe3, 0xe2, 0x42, 0x8f, 0xbf, 0x7c, 0xf5, 0x5f, 0x91, 0x53, 0xe2, 0x53, 0x19, 0x26, 0x57, /* Byte value: 0x33 */ + 0x9a, 0x85, 0xb8, 0xe1, 0x6d, 0x97, 0xbe, 0x5d, 0x55, 0x9e, 0x8a, 0xb8, 0x8a, 0x40, 0x22, 0x7e, /* Byte value: 0x34 */ + 0x5c, 0x04, 0xd2, 0x11, 0xe4, 0x25, 0x1e, 0x4b, 0x98, 0xd4, 0x39, 0xd2, 0x39, 0x57, 0x8e, 0xe7, /* Byte value: 0x35 */ + 0x53, 0xd8, 0xa8, 0xd0, 0xf5, 0xe1, 0x21, 0x37, 0xa9, 0x1c, 0xac, 0xa8, 0xac, 0x7a, 0xfb, 0xaf, /* Byte value: 0x36 */ + 0xcd, 0x99, 0xc3, 0x96, 0x94, 0x6c, 0xe4, 0x6f, 0x1b, 0xf7, 0x25, 0xc3, 0x25, 0x26, 0x0e, 0x8e, /* Byte value: 0x37 */ + 0x32, 0x1b, 0x15, 0x1a, 0x56, 0xb5, 0xad, 0xdf, 0xbc, 0xe2, 0xf4, 0x15, 0xf4, 0x9e, 0x27, 0xcc, /* Byte value: 0x38 */ + 0x1b, 0x8e, 0x63, 0xbf, 0x2d, 0xb6, 0x6b, 0x6d, 0xcc, 0xaa, 0x9a, 0x63, 0x9a, 0x41, 0x78, 0xa8, /* Byte value: 0x39 */ + 0x5a, 0xa2, 0x89, 0x04, 0xee, 0x32, 0xb9, 0xad, 0xed, 0x7a, 0xda, 0x89, 0xda, 0x45, 0xd3, 0x76, /* Byte value: 0x3a */ + 0xa1, 0xe4, 0x8c, 0x2f, 0x20, 0xf1, 0x8b, 0x18, 0xad, 0x1a, 0x08, 0x8c, 0x08, 0xe1, 0x2d, 0x6b, /* Byte value: 0x3b */ + 0xe5, 0x3d, 0xf1, 0x6a, 0xec, 0x88, 0x4c, 0x4d, 0x22, 0x33, 0x3b, 0xf1, 0x3b, 0xfe, 0x14, 0x8d, /* Byte value: 0x3c */ + 0x3c, 0xf6, 0x2b, 0x82, 0x44, 0x96, 0xfc, 0x33, 0xc4, 0xa6, 0x11, 0x2b, 0x11, 0xb4, 0x17, 0xe3, /* Byte value: 0x3d */ + 0x97, 0x3b, 0x4a, 0x92, 0x7a, 0x5e, 0x5d, 0xc2, 0xf6, 0x8d, 0xff, 0x4a, 0xff, 0x63, 0xdd, 0xf8, /* Byte value: 0x3e */ + 0xce, 0xca, 0x0f, 0x7d, 0x91, 0x86, 0x56, 0x1c, 0xc0, 0xa0, 0xb5, 0x0f, 0xb5, 0x2f, 0xc1, 0x27, /* Byte value: 0x3f */ + 0x6d, 0x4c, 0x0b, 0xe0, 0xb7, 0x7a, 0x01, 0xe7, 0xff, 0x61, 0x5d, 0x0b, 0x5d, 0xc0, 0x66, 0x82, /* Byte value: 0x40 */ + 0x62, 0x90, 0x71, 0x21, 0xa6, 0xbe, 0x3e, 0x9b, 0xce, 0xa9, 0xc8, 0x71, 0xc8, 0xed, 0x13, 0xca, /* Byte value: 0x41 */ + 0xf5, 0xab, 0x3b, 0xb3, 0xdc, 0xe0, 0x63, 0x59, 0x38, 0x24, 0x37, 0x3b, 0x37, 0x8e, 0xce, 0x32, /* Byte value: 0x42 */ + 0xb7, 0xd4, 0x1d, 0xe3, 0x1a, 0x8e, 0x03, 0xea, 0xc2, 0xa3, 0xe7, 0x1d, 0xe7, 0x83, 0xaa, 0x45, /* Byte value: 0x43 */ + 0xe2, 0xaa, 0xee, 0x26, 0xe5, 0x78, 0x85, 0x3b, 0x1e, 0x11, 0xa8, 0xee, 0xa8, 0xeb, 0x0c, 0x7b, /* Byte value: 0x44 */ + 0x41, 0x2c, 0xea, 0xbb, 0xc3, 0x84, 0xd2, 0xc0, 0x21, 0xd0, 0x40, 0xea, 0x40, 0x04, 0xab, 0xde, /* Byte value: 0x45 */ + 0x71, 0x55, 0x77, 0x13, 0x93, 0x3c, 0xa3, 0xfc, 0x0f, 0xe9, 0x54, 0x77, 0x54, 0x94, 0x06, 0xdc, /* Byte value: 0x46 */ + 0xf9, 0x24, 0x8d, 0x99, 0xc8, 0xce, 0xee, 0x56, 0xd2, 0xbb, 0x32, 0x8d, 0x32, 0xaa, 0x74, 0xd3, /* Byte value: 0x47 */ + 0xea, 0xe1, 0x8b, 0xab, 0xfd, 0x4c, 0x73, 0x31, 0x13, 0xfb, 0xae, 0x8b, 0xae, 0xd3, 0x61, 0xc5, /* Byte value: 0x48 */ + 0xae, 0x38, 0xf6, 0xee, 0x31, 0x35, 0xb4, 0x64, 0x9c, 0xd2, 0x9d, 0xf6, 0x9d, 0xcc, 0x58, 0x23, /* Byte value: 0x49 */ + 0xe4, 0x0c, 0xb5, 0x33, 0xef, 0x6f, 0x22, 0xdd, 0x6b, 0xbf, 0x4b, 0xb5, 0x4b, 0xf9, 0x51, 0xea, /* Byte value: 0x4a */ + 0x0b, 0x18, 0xa9, 0x66, 0x1d, 0xde, 0x44, 0x79, 0xd6, 0xbd, 0x96, 0xa9, 0x96, 0x31, 0xa2, 0x17, /* Byte value: 0x4b */ + 0xde, 0x5c, 0xc5, 0xa4, 0xa1, 0xee, 0x79, 0x08, 0xda, 0xb7, 0xb9, 0xc5, 0xb9, 0x5f, 0x1b, 0x98, /* Byte value: 0x4c */ + 0xf0, 0x5e, 0xac, 0x4d, 0xd3, 0x1d, 0x76, 0xcc, 0x96, 0xdd, 0x44, 0xac, 0x44, 0x95, 0x5c, 0x0a, /* Byte value: 0x4d */ + 0xd4, 0x75, 0x28, 0x9b, 0xbf, 0xd7, 0x53, 0xe1, 0x45, 0x86, 0x5f, 0x28, 0x5f, 0x69, 0xfc, 0xe8, /* Byte value: 0x4e */ + 0xb5, 0xb6, 0x95, 0x51, 0x1c, 0x83, 0xdf, 0x09, 0x50, 0x78, 0x07, 0x95, 0x07, 0x8d, 0x20, 0x8b, /* Byte value: 0x4f */ + 0xa4, 0x11, 0x1b, 0xd1, 0x2f, 0x0c, 0x9e, 0x8d, 0x03, 0xe3, 0x7b, 0x1b, 0x7b, 0xfa, 0xbf, 0x53, /* Byte value: 0x50 */ + 0xba, 0x6a, 0xef, 0x90, 0x0d, 0x47, 0xe0, 0x75, 0x61, 0xb0, 0x92, 0xef, 0x92, 0xa0, 0x55, 0xc3, /* Byte value: 0x51 */ + 0xe8, 0x83, 0x03, 0x19, 0xfb, 0x41, 0xaf, 0xd2, 0x81, 0x20, 0x4e, 0x03, 0x4e, 0xdd, 0xeb, 0x0b, /* Byte value: 0x52 */ + 0x0e, 0xed, 0x3e, 0x98, 0x12, 0x23, 0x51, 0xec, 0x78, 0x44, 0xe5, 0x3e, 0xe5, 0x2a, 0x30, 0x2f, /* Byte value: 0x53 */ + 0x9c, 0x23, 0xe3, 0xf4, 0x67, 0x80, 0x19, 0xbb, 0x20, 0x30, 0x69, 0xe3, 0x69, 0x52, 0x7f, 0xef, /* Byte value: 0x54 */ + 0x31, 0x48, 0xd9, 0xf1, 0x53, 0x5f, 0x1f, 0xac, 0x67, 0xb5, 0x64, 0xd9, 0x64, 0x97, 0xe8, 0x65, /* Byte value: 0x55 */ + 0x79, 0x1e, 0x12, 0x9e, 0x8b, 0x08, 0x55, 0xf6, 0x02, 0x03, 0x52, 0x12, 0x52, 0xac, 0x6b, 0x62, /* Byte value: 0x56 */ + 0xfc, 0xd1, 0x1a, 0x67, 0xc7, 0x33, 0xfb, 0xc3, 0x7c, 0x42, 0x41, 0x1a, 0x41, 0xb1, 0xe6, 0xeb, /* Byte value: 0x57 */ + 0x4d, 0xa3, 0x5c, 0x91, 0xd7, 0xaa, 0x5f, 0xcf, 0xcb, 0x4f, 0x45, 0x5c, 0x45, 0x20, 0x11, 0x3f, /* Byte value: 0x58 */ + 0xdb, 0xa9, 0x52, 0x5a, 0xae, 0x13, 0x6c, 0x9d, 0x74, 0x4e, 0xca, 0x52, 0xca, 0x44, 0x89, 0xa0, /* Byte value: 0x59 */ + 0x75, 0x91, 0xa4, 0xb4, 0x9f, 0x26, 0xd8, 0xf9, 0xe8, 0x9c, 0x57, 0xa4, 0x57, 0x88, 0xd1, 0x83, /* Byte value: 0x5a */ + 0x68, 0xb9, 0x9c, 0x1e, 0xb8, 0x87, 0x14, 0x72, 0x51, 0x98, 0x2e, 0x9c, 0x2e, 0xdb, 0xf4, 0xba, /* Byte value: 0x5b */ + 0x15, 0x63, 0x5d, 0x27, 0x3f, 0x95, 0x3a, 0x81, 0xb4, 0xee, 0x7f, 0x5d, 0x7f, 0x6b, 0x48, 0x87, /* Byte value: 0x5c */ + 0xa9, 0xaf, 0xe9, 0xa2, 0x38, 0xc5, 0x7d, 0x12, 0xa0, 0xf0, 0x0e, 0xe9, 0x0e, 0xd9, 0x40, 0xd5, /* Byte value: 0x5d */ + 0x01, 0x31, 0x44, 0x59, 0x03, 0xe7, 0x6e, 0x90, 0x49, 0x8c, 0x70, 0x44, 0x70, 0x07, 0x45, 0x67, /* Byte value: 0x5e */ + 0x23, 0xbc, 0x9b, 0x9a, 0x65, 0x3a, 0xec, 0x5b, 0xef, 0x79, 0x88, 0x9b, 0x88, 0xe9, 0xb8, 0x14, /* Byte value: 0x5f */ + 0xb2, 0x21, 0x8a, 0x1d, 0x15, 0x73, 0x16, 0x7f, 0x6c, 0x5a, 0x94, 0x8a, 0x94, 0x98, 0x38, 0x7d, /* Byte value: 0x60 */ + 0x6e, 0x1f, 0xc7, 0x0b, 0xb2, 0x90, 0xb3, 0x94, 0x24, 0x36, 0xcd, 0xc7, 0xcd, 0xc9, 0xa9, 0x2b, /* Byte value: 0x61 */ + 0xf2, 0x3c, 0x24, 0xff, 0xd5, 0x10, 0xaa, 0x2f, 0x04, 0x06, 0xa4, 0x24, 0xa4, 0x9b, 0xd6, 0xc4, /* Byte value: 0x62 */ + 0x3b, 0x61, 0x34, 0xce, 0x4d, 0x66, 0x35, 0x45, 0xf8, 0x84, 0x82, 0x34, 0x82, 0xa1, 0x0f, 0x15, /* Byte value: 0x63 */ + 0x52, 0xe9, 0xec, 0x89, 0xf6, 0x06, 0x4f, 0xa7, 0xe0, 0x90, 0xdc, 0xec, 0xdc, 0x7d, 0xbe, 0xc8, /* Byte value: 0x64 */ + 0x65, 0x07, 0x6e, 0x6d, 0xaf, 0x4e, 0xf7, 0xed, 0xf2, 0x8b, 0x5b, 0x6e, 0x5b, 0xf8, 0x0b, 0x3c, /* Byte value: 0x65 */ + 0x4b, 0x05, 0x07, 0x84, 0xdd, 0xbd, 0xf8, 0x29, 0xbe, 0xe1, 0xa6, 0x07, 0xa6, 0x32, 0x4c, 0xae, /* Byte value: 0x66 */ + 0x38, 0x32, 0xf8, 0x25, 0x48, 0x8c, 0x87, 0x36, 0x23, 0xd3, 0x12, 0xf8, 0x12, 0xa8, 0xc0, 0xbc, /* Byte value: 0x67 */ + 0x2a, 0xc6, 0xba, 0x4e, 0x7e, 0xe9, 0x74, 0xc1, 0xab, 0x1f, 0xfe, 0xba, 0xfe, 0xd6, 0x90, 0xcd, /* Byte value: 0x68 */ + 0x91, 0x9d, 0x11, 0x87, 0x70, 0x49, 0xfa, 0x24, 0x83, 0x23, 0x1c, 0x11, 0x1c, 0x71, 0x80, 0x69, /* Byte value: 0x69 */ + 0xd6, 0x17, 0xa0, 0x29, 0xb9, 0xda, 0x8f, 0x02, 0xd7, 0x5d, 0xbf, 0xa0, 0xbf, 0x67, 0x76, 0x26, /* Byte value: 0x6a */ + 0xfd, 0xe0, 0x5e, 0x3e, 0xc4, 0xd4, 0x95, 0x53, 0x35, 0xce, 0x31, 0x5e, 0x31, 0xb6, 0xa3, 0x8c, /* Byte value: 0x6b */ + 0xf8, 0x15, 0xc9, 0xc0, 0xcb, 0x29, 0x80, 0xc6, 0x9b, 0x37, 0x42, 0xc9, 0x42, 0xad, 0x31, 0xb4, /* Byte value: 0x6c */ + 0x8c, 0xb5, 0x29, 0x2d, 0x57, 0xe8, 0x36, 0xaf, 0x3a, 0x27, 0x65, 0x29, 0x65, 0x22, 0xa5, 0x50, /* Byte value: 0x6d */ + 0x50, 0x8b, 0x64, 0x3b, 0xf0, 0x0b, 0x93, 0x44, 0x72, 0x4b, 0x3c, 0x64, 0x3c, 0x73, 0x34, 0x06, /* Byte value: 0x6e */ + 0x7f, 0xb8, 0x49, 0x8b, 0x81, 0x1f, 0xf2, 0x10, 0x77, 0xad, 0xb1, 0x49, 0xb1, 0xbe, 0x36, 0xf3, /* Byte value: 0x6f */ + 0x59, 0xf1, 0x45, 0xef, 0xeb, 0xd8, 0x0b, 0xde, 0x36, 0x2d, 0x4a, 0x45, 0x4a, 0x4c, 0x1c, 0xdf, /* Byte value: 0x70 */ + 0x08, 0x4b, 0x65, 0x8d, 0x18, 0x34, 0xf6, 0x0a, 0x0d, 0xea, 0x06, 0x65, 0x06, 0x38, 0x6d, 0xbe, /* Byte value: 0x71 */ + 0xd9, 0xcb, 0xda, 0xe8, 0xa8, 0x1e, 0xb0, 0x7e, 0xe6, 0x95, 0x2a, 0xda, 0x2a, 0x4a, 0x03, 0x6e, /* Byte value: 0x72 */ + 0xa2, 0xb7, 0x40, 0xc4, 0x25, 0x1b, 0x39, 0x6b, 0x76, 0x4d, 0x98, 0x40, 0x98, 0xe8, 0xe2, 0xc2, /* Byte value: 0x73 */ + 0xfb, 0x46, 0x05, 0x2b, 0xce, 0xc3, 0x32, 0xb5, 0x40, 0x60, 0xd2, 0x05, 0xd2, 0xa4, 0xfe, 0x1d, /* Byte value: 0x74 */ + 0x1c, 0x19, 0x7c, 0xf3, 0x24, 0x46, 0xa2, 0x1b, 0xf0, 0x88, 0x09, 0x7c, 0x09, 0x54, 0x60, 0x5e, /* Byte value: 0x75 */ + 0x29, 0x95, 0x76, 0xa5, 0x7b, 0x03, 0xc6, 0xb2, 0x70, 0x48, 0x6e, 0x76, 0x6e, 0xdf, 0x5f, 0x64, /* Byte value: 0x76 */ + 0xd3, 0xe2, 0x37, 0xd7, 0xb6, 0x27, 0x9a, 0x97, 0x79, 0xa4, 0xcc, 0x37, 0xcc, 0x7c, 0xe4, 0x1e, /* Byte value: 0x77 */ + 0x6f, 0x2e, 0x83, 0x52, 0xb1, 0x77, 0xdd, 0x04, 0x6d, 0xba, 0xbd, 0x83, 0xbd, 0xce, 0xec, 0x4c, /* Byte value: 0x78 */ + 0x47, 0x8a, 0xb1, 0xae, 0xc9, 0x93, 0x75, 0x26, 0x54, 0x7e, 0xa3, 0xb1, 0xa3, 0x16, 0xf6, 0x4f, /* Byte value: 0x79 */ + 0x54, 0x4f, 0xb7, 0x9c, 0xfc, 0x11, 0xe8, 0x41, 0x95, 0x3e, 0x3f, 0xb7, 0x3f, 0x6f, 0xe3, 0x59, /* Byte value: 0x7a */ + 0x9f, 0x70, 0x2f, 0x1f, 0x62, 0x6a, 0xab, 0xc8, 0xfb, 0x67, 0xf9, 0x2f, 0xf9, 0x5b, 0xb0, 0x46, /* Byte value: 0x7b */ + 0x17, 0x01, 0xd5, 0x95, 0x39, 0x98, 0xe6, 0x62, 0x26, 0x35, 0x9f, 0xd5, 0x9f, 0x65, 0xc2, 0x49, /* Byte value: 0x7c */ + 0xe1, 0xf9, 0x22, 0xcd, 0xe0, 0x92, 0x37, 0x48, 0xc5, 0x46, 0x38, 0x22, 0x38, 0xe2, 0xc3, 0xd2, /* Byte value: 0x7d */ + 0x7c, 0xeb, 0x85, 0x60, 0x84, 0xf5, 0x40, 0x63, 0xac, 0xfa, 0x21, 0x85, 0x21, 0xb7, 0xf9, 0x5a, /* Byte value: 0x7e */ + 0x46, 0xbb, 0xf5, 0xf7, 0xca, 0x74, 0x1b, 0xb6, 0x1d, 0xf2, 0xd3, 0xf5, 0xd3, 0x11, 0xb3, 0x28, /* Byte value: 0x7f */ + 0xbc, 0xcc, 0xb4, 0x85, 0x07, 0x50, 0x47, 0x93, 0x14, 0x1e, 0x71, 0xb4, 0x71, 0xb2, 0x08, 0x52, /* Byte value: 0x80 */ + 0xc5, 0xd2, 0xa6, 0x1b, 0x8c, 0x58, 0x12, 0x65, 0x16, 0x1d, 0x23, 0xa6, 0x23, 0x1e, 0x63, 0x30, /* Byte value: 0x81 */ + 0x22, 0x8d, 0xdf, 0xc3, 0x66, 0xdd, 0x82, 0xcb, 0xa6, 0xf5, 0xf8, 0xdf, 0xf8, 0xee, 0xfd, 0x73, /* Byte value: 0x82 */ + 0xbe, 0xae, 0x3c, 0x37, 0x01, 0x5d, 0x9b, 0x70, 0x86, 0xc5, 0x91, 0x3c, 0x91, 0xbc, 0x82, 0x9c, /* Byte value: 0x83 */ + 0x96, 0x0a, 0x0e, 0xcb, 0x79, 0xb9, 0x33, 0x52, 0xbf, 0x01, 0x8f, 0x0e, 0x8f, 0x64, 0x98, 0x9f, /* Byte value: 0x84 */ + 0x7e, 0x89, 0x0d, 0xd2, 0x82, 0xf8, 0x9c, 0x80, 0x3e, 0x21, 0xc1, 0x0d, 0xc1, 0xb9, 0x73, 0x94, /* Byte value: 0x85 */ + 0x1d, 0x28, 0x38, 0xaa, 0x27, 0xa1, 0xcc, 0x8b, 0xb9, 0x04, 0x79, 0x38, 0x79, 0x53, 0x25, 0x39, /* Byte value: 0x86 */ + 0xb9, 0x39, 0x23, 0x7b, 0x08, 0xad, 0x52, 0x06, 0xba, 0xe7, 0x02, 0x23, 0x02, 0xa9, 0x9a, 0x6a, /* Byte value: 0x87 */ + 0x9d, 0x12, 0xa7, 0xad, 0x64, 0x67, 0x77, 0x2b, 0x69, 0xbc, 0x19, 0xa7, 0x19, 0x55, 0x3a, 0x88, /* Byte value: 0x88 */ + 0xad, 0x6b, 0x3a, 0x05, 0x34, 0xdf, 0x06, 0x17, 0x47, 0x85, 0x0d, 0x3a, 0x0d, 0xc5, 0x97, 0x8a, /* Byte value: 0x89 */ + 0x6c, 0x7d, 0x4f, 0xb9, 0xb4, 0x9d, 0x6f, 0x77, 0xb6, 0xed, 0x2d, 0x4f, 0x2d, 0xc7, 0x23, 0xe5, /* Byte value: 0x8a */ + 0x85, 0xcf, 0x08, 0xf9, 0x4c, 0x3b, 0xae, 0x35, 0x7e, 0x41, 0x13, 0x08, 0x13, 0x1d, 0x8d, 0x89, /* Byte value: 0x8b */ + 0xd1, 0x80, 0xbf, 0x65, 0xb0, 0x2a, 0x46, 0x74, 0xeb, 0x7f, 0x2c, 0xbf, 0x2c, 0x72, 0x6e, 0xd0, /* Byte value: 0x8c */ + 0x1e, 0x7b, 0xf4, 0x41, 0x22, 0x4b, 0x7e, 0xf8, 0x62, 0x53, 0xe9, 0xf4, 0xe9, 0x5a, 0xea, 0x90, /* Byte value: 0x8d */ + 0xa5, 0x20, 0x5f, 0x88, 0x2c, 0xeb, 0xf0, 0x1d, 0x4a, 0x6f, 0x0b, 0x5f, 0x0b, 0xfd, 0xfa, 0x34, /* Byte value: 0x8e */ + 0xe6, 0x6e, 0x3d, 0x81, 0xe9, 0x62, 0xfe, 0x3e, 0xf9, 0x64, 0xab, 0x3d, 0xab, 0xf7, 0xdb, 0x24, /* Byte value: 0x8f */ + 0x2e, 0x02, 0x69, 0xe9, 0x72, 0xf3, 0x0f, 0xc4, 0x4c, 0x6a, 0xfd, 0x69, 0xfd, 0xca, 0x47, 0x92, /* Byte value: 0x90 */ + 0x5f, 0x57, 0x1e, 0xfa, 0xe1, 0xcf, 0xac, 0x38, 0x43, 0x83, 0xa9, 0x1e, 0xa9, 0x5e, 0x41, 0x4e, /* Byte value: 0x91 */ + 0x61, 0xc3, 0xbd, 0xca, 0xa3, 0x54, 0x8c, 0xe8, 0x15, 0xfe, 0x58, 0xbd, 0x58, 0xe4, 0xdc, 0x63, /* Byte value: 0x92 */ + 0x83, 0x69, 0x53, 0xec, 0x46, 0x2c, 0x09, 0xd3, 0x0b, 0xef, 0xf0, 0x53, 0xf0, 0x0f, 0xd0, 0x18, /* Byte value: 0x93 */ + 0x44, 0xd9, 0x7d, 0x45, 0xcc, 0x79, 0xc7, 0x55, 0x8f, 0x29, 0x33, 0x7d, 0x33, 0x1f, 0x39, 0xe6, /* Byte value: 0x94 */ + 0xb1, 0x72, 0x46, 0xf6, 0x10, 0x99, 0xa4, 0x0c, 0xb7, 0x0d, 0x04, 0x46, 0x04, 0x91, 0xf7, 0xd4, /* Byte value: 0x95 */ + 0xef, 0x14, 0x1c, 0x55, 0xf2, 0xb1, 0x66, 0xa4, 0xbd, 0x02, 0xdd, 0x1c, 0xdd, 0xc8, 0xf3, 0xfd, /* Byte value: 0x96 */ + 0x82, 0x58, 0x17, 0xb5, 0x45, 0xcb, 0x67, 0x43, 0x42, 0x63, 0x80, 0x17, 0x80, 0x08, 0x95, 0x7f, /* Byte value: 0x97 */ + 0x36, 0xdf, 0xc6, 0xbd, 0x5a, 0xaf, 0xd6, 0xda, 0x5b, 0x97, 0xf7, 0xc6, 0xf7, 0x82, 0xf0, 0x93, /* Byte value: 0x98 */ + 0xa3, 0x86, 0x04, 0x9d, 0x26, 0xfc, 0x57, 0xfb, 0x3f, 0xc1, 0xe8, 0x04, 0xe8, 0xef, 0xa7, 0xa5, /* Byte value: 0x99 */ + 0xaf, 0x09, 0xb2, 0xb7, 0x32, 0xd2, 0xda, 0xf4, 0xd5, 0x5e, 0xed, 0xb2, 0xed, 0xcb, 0x1d, 0x44, /* Byte value: 0x9a */ + 0x88, 0x71, 0xfa, 0x8a, 0x5b, 0xf2, 0x4d, 0xaa, 0xdd, 0x52, 0x66, 0xfa, 0x66, 0x3e, 0x72, 0x0f, /* Byte value: 0x9b */ + 0x89, 0x40, 0xbe, 0xd3, 0x58, 0x15, 0x23, 0x3a, 0x94, 0xde, 0x16, 0xbe, 0x16, 0x39, 0x37, 0x68, /* Byte value: 0x9c */ + 0x0f, 0xdc, 0x7a, 0xc1, 0x11, 0xc4, 0x3f, 0x7c, 0x31, 0xc8, 0x95, 0x7a, 0x95, 0x2d, 0x75, 0x48, /* Byte value: 0x9d */ + 0x1f, 0x4a, 0xb0, 0x18, 0x21, 0xac, 0x10, 0x68, 0x2b, 0xdf, 0x99, 0xb0, 0x99, 0x5d, 0xaf, 0xf7, /* Byte value: 0x9e */ + 0x42, 0x7f, 0x26, 0x50, 0xc6, 0x6e, 0x60, 0xb3, 0xfa, 0x87, 0xd0, 0x26, 0xd0, 0x0d, 0x64, 0x77, /* Byte value: 0x9f */ + 0xf6, 0xf8, 0xf7, 0x58, 0xd9, 0x0a, 0xd1, 0x2a, 0xe3, 0x73, 0xa7, 0xf7, 0xa7, 0x87, 0x01, 0x9b, /* Byte value: 0xa0 */ + 0xdf, 0x6d, 0x81, 0xfd, 0xa2, 0x09, 0x17, 0x98, 0x93, 0x3b, 0xc9, 0x81, 0xc9, 0x58, 0x5e, 0xff, /* Byte value: 0xa1 */ + 0x3a, 0x50, 0x70, 0x97, 0x4e, 0x81, 0x5b, 0xd5, 0xb1, 0x08, 0xf2, 0x70, 0xf2, 0xa6, 0x4a, 0x72, /* Byte value: 0xa2 */ + 0xc1, 0x16, 0x75, 0xbc, 0x80, 0x42, 0x69, 0x60, 0xf1, 0x68, 0x20, 0x75, 0x20, 0x02, 0xb4, 0x6f, /* Byte value: 0xa3 */ + 0x28, 0xa4, 0x32, 0xfc, 0x78, 0xe4, 0xa8, 0x22, 0x39, 0xc4, 0x1e, 0x32, 0x1e, 0xd8, 0x1a, 0x03, /* Byte value: 0xa4 */ + 0xf1, 0x6f, 0xe8, 0x14, 0xd0, 0xfa, 0x18, 0x5c, 0xdf, 0x51, 0x34, 0xe8, 0x34, 0x92, 0x19, 0x6d, /* Byte value: 0xa5 */ + 0xcb, 0x3f, 0x98, 0x83, 0x9e, 0x7b, 0x43, 0x89, 0x6e, 0x59, 0xc6, 0x98, 0xc6, 0x34, 0x53, 0x1f, /* Byte value: 0xa6 */ + 0x92, 0xce, 0xdd, 0x6c, 0x75, 0xa3, 0x48, 0x57, 0x58, 0x74, 0x8c, 0xdd, 0x8c, 0x78, 0x4f, 0xc0, /* Byte value: 0xa7 */ + 0x87, 0xad, 0x80, 0x4b, 0x4a, 0x36, 0x72, 0xd6, 0xec, 0x9a, 0xf3, 0x80, 0xf3, 0x13, 0x07, 0x47, /* Byte value: 0xa8 */ + 0xe7, 0x5f, 0x79, 0xd8, 0xea, 0x85, 0x90, 0xae, 0xb0, 0xe8, 0xdb, 0x79, 0xdb, 0xf0, 0x9e, 0x43, /* Byte value: 0xa9 */ + 0x3e, 0x94, 0xa3, 0x30, 0x42, 0x9b, 0x20, 0xd0, 0x56, 0x7d, 0xf1, 0xa3, 0xf1, 0xba, 0x9d, 0x2d, /* Byte value: 0xaa */ + 0xfa, 0x77, 0x41, 0x72, 0xcd, 0x24, 0x5c, 0x25, 0x09, 0xec, 0xa2, 0x41, 0xa2, 0xa3, 0xbb, 0x7a, /* Byte value: 0xab */ + 0x0d, 0xbe, 0xf2, 0x73, 0x17, 0xc9, 0xe3, 0x9f, 0xa3, 0x13, 0x75, 0xf2, 0x75, 0x23, 0xff, 0x86, /* Byte value: 0xac */ + 0x51, 0xba, 0x20, 0x62, 0xf3, 0xec, 0xfd, 0xd4, 0x3b, 0xc7, 0x4c, 0x20, 0x4c, 0x74, 0x71, 0x61, /* Byte value: 0xad */ + 0xb6, 0xe5, 0x59, 0xba, 0x19, 0x69, 0x6d, 0x7a, 0x8b, 0x2f, 0x97, 0x59, 0x97, 0x84, 0xef, 0x22, /* Byte value: 0xae */ + 0x7b, 0x7c, 0x9a, 0x2c, 0x8d, 0x05, 0x89, 0x15, 0x90, 0xd8, 0xb2, 0x9a, 0xb2, 0xa2, 0xe1, 0xac, /* Byte value: 0xaf */ + 0x74, 0xa0, 0xe0, 0xed, 0x9c, 0xc1, 0xb6, 0x69, 0xa1, 0x10, 0x27, 0xe0, 0x27, 0x8f, 0x94, 0xe4, /* Byte value: 0xb0 */ + 0x3f, 0xa5, 0xe7, 0x69, 0x41, 0x7c, 0x4e, 0x40, 0x1f, 0xf1, 0x81, 0xe7, 0x81, 0xbd, 0xd8, 0x4a, /* Byte value: 0xb1 */ + 0x2f, 0x33, 0x2d, 0xb0, 0x71, 0x14, 0x61, 0x54, 0x05, 0xe6, 0x8d, 0x2d, 0x8d, 0xcd, 0x02, 0xf5, /* Byte value: 0xb2 */ + 0x7d, 0xda, 0xc1, 0x39, 0x87, 0x12, 0x2e, 0xf3, 0xe5, 0x76, 0x51, 0xc1, 0x51, 0xb0, 0xbc, 0x3d, /* Byte value: 0xb3 */ + 0xbb, 0x5b, 0xab, 0xc9, 0x0e, 0xa0, 0x8e, 0xe5, 0x28, 0x3c, 0xe2, 0xab, 0xe2, 0xa7, 0x10, 0xa4, /* Byte value: 0xb4 */ + 0x49, 0x67, 0x8f, 0x36, 0xdb, 0xb0, 0x24, 0xca, 0x2c, 0x3a, 0x46, 0x8f, 0x46, 0x3c, 0xc6, 0x60, /* Byte value: 0xb5 */ + 0x2b, 0xf7, 0xfe, 0x17, 0x7d, 0x0e, 0x1a, 0x51, 0xe2, 0x93, 0x8e, 0xfe, 0x8e, 0xd1, 0xd5, 0xaa, /* Byte value: 0xb6 */ + 0x99, 0xd6, 0x74, 0x0a, 0x68, 0x7d, 0x0c, 0x2e, 0x8e, 0xc9, 0x1a, 0x74, 0x1a, 0x49, 0xed, 0xd7, /* Byte value: 0xb7 */ + 0x02, 0x62, 0x88, 0xb2, 0x06, 0x0d, 0xdc, 0xe3, 0x92, 0xdb, 0xe0, 0x88, 0xe0, 0x0e, 0x8a, 0xce, /* Byte value: 0xb8 */ + 0x37, 0xee, 0x82, 0xe4, 0x59, 0x48, 0xb8, 0x4a, 0x12, 0x1b, 0x87, 0x82, 0x87, 0x85, 0xb5, 0xf4, /* Byte value: 0xb9 */ + 0xb3, 0x10, 0xce, 0x44, 0x16, 0x94, 0x78, 0xef, 0x25, 0xd6, 0xe4, 0xce, 0xe4, 0x9f, 0x7d, 0x1a, /* Byte value: 0xba */ + 0x73, 0x37, 0xff, 0xa1, 0x95, 0x31, 0x7f, 0x1f, 0x9d, 0x32, 0xb4, 0xff, 0xb4, 0x9a, 0x8c, 0x12, /* Byte value: 0xbb */ + 0x64, 0x36, 0x2a, 0x34, 0xac, 0xa9, 0x99, 0x7d, 0xbb, 0x07, 0x2b, 0x2a, 0x2b, 0xff, 0x4e, 0x5b, /* Byte value: 0xbc */ + 0xdc, 0x3e, 0x4d, 0x16, 0xa7, 0xe3, 0xa5, 0xeb, 0x48, 0x6c, 0x59, 0x4d, 0x59, 0x51, 0x91, 0x56, /* Byte value: 0xbd */ + 0xd8, 0xfa, 0x9e, 0xb1, 0xab, 0xf9, 0xde, 0xee, 0xaf, 0x19, 0x5a, 0x9e, 0x5a, 0x4d, 0x46, 0x09, /* Byte value: 0xbe */ + 0xc9, 0x5d, 0x10, 0x31, 0x98, 0x76, 0x9f, 0x6a, 0xfc, 0x82, 0x26, 0x10, 0x26, 0x3a, 0xd9, 0xd1, /* Byte value: 0xbf */ + 0xab, 0xcd, 0x61, 0x10, 0x3e, 0xc8, 0xa1, 0xf1, 0x32, 0x2b, 0xee, 0x61, 0xee, 0xd7, 0xca, 0x1b, /* Byte value: 0xc0 */ + 0x33, 0x2a, 0x51, 0x43, 0x55, 0x52, 0xc3, 0x4f, 0xf5, 0x6e, 0x84, 0x51, 0x84, 0x99, 0x62, 0xab, /* Byte value: 0xc1 */ + 0x6b, 0xea, 0x50, 0xf5, 0xbd, 0x6d, 0xa6, 0x01, 0x8a, 0xcf, 0xbe, 0x50, 0xbe, 0xd2, 0x3b, 0x13, /* Byte value: 0xc2 */ + 0xcc, 0xa8, 0x87, 0xcf, 0x97, 0x8b, 0x8a, 0xff, 0x52, 0x7b, 0x55, 0x87, 0x55, 0x21, 0x4b, 0xe9, /* Byte value: 0xc3 */ + 0x90, 0xac, 0x55, 0xde, 0x73, 0xae, 0x94, 0xb4, 0xca, 0xaf, 0x6c, 0x55, 0x6c, 0x76, 0xc5, 0x0e, /* Byte value: 0xc4 */ + 0xd0, 0xb1, 0xfb, 0x3c, 0xb3, 0xcd, 0x28, 0xe4, 0xa2, 0xf3, 0x5c, 0xfb, 0x5c, 0x75, 0x2b, 0xb7, /* Byte value: 0xc5 */ + 0xac, 0x5a, 0x7e, 0x5c, 0x37, 0x38, 0x68, 0x87, 0x0e, 0x09, 0x7d, 0x7e, 0x7d, 0xc2, 0xd2, 0xed, /* Byte value: 0xc6 */ + 0xbf, 0x9f, 0x78, 0x6e, 0x02, 0xba, 0xf5, 0xe0, 0xcf, 0x49, 0xe1, 0x78, 0xe1, 0xbb, 0xc7, 0xfb, /* Byte value: 0xc7 */ + 0xda, 0x98, 0x16, 0x03, 0xad, 0xf4, 0x02, 0x0d, 0x3d, 0xc2, 0xba, 0x16, 0xba, 0x43, 0xcc, 0xc7, /* Byte value: 0xc8 */ + 0xa7, 0x42, 0xd7, 0x3a, 0x2a, 0xe6, 0x2c, 0xfe, 0xd8, 0xb4, 0xeb, 0xd7, 0xeb, 0xf3, 0x70, 0xfa, /* Byte value: 0xc9 */ + 0x5e, 0x66, 0x5a, 0xa3, 0xe2, 0x28, 0xc2, 0xa8, 0x0a, 0x0f, 0xd9, 0x5a, 0xd9, 0x59, 0x04, 0x29, /* Byte value: 0xca */ + 0x98, 0xe7, 0x30, 0x53, 0x6b, 0x9a, 0x62, 0xbe, 0xc7, 0x45, 0x6a, 0x30, 0x6a, 0x4e, 0xa8, 0xb0, /* Byte value: 0xcb */ + 0x7a, 0x4d, 0xde, 0x75, 0x8e, 0xe2, 0xe7, 0x85, 0xd9, 0x54, 0xc2, 0xde, 0xc2, 0xa5, 0xa4, 0xcb, /* Byte value: 0xcc */ + 0x13, 0xc5, 0x06, 0x32, 0x35, 0x82, 0x9d, 0x67, 0xc1, 0x40, 0x9c, 0x06, 0x9c, 0x79, 0x15, 0x16, /* Byte value: 0xcd */ + 0x6a, 0xdb, 0x14, 0xac, 0xbe, 0x8a, 0xc8, 0x91, 0xc3, 0x43, 0xce, 0x14, 0xce, 0xd5, 0x7e, 0x74, /* Byte value: 0xce */ + 0x40, 0x1d, 0xae, 0xe2, 0xc0, 0x63, 0xbc, 0x50, 0x68, 0x5c, 0x30, 0xae, 0x30, 0x03, 0xee, 0xb9, /* Byte value: 0xcf */ + 0xa8, 0x9e, 0xad, 0xfb, 0x3b, 0x22, 0x13, 0x82, 0xe9, 0x7c, 0x7e, 0xad, 0x7e, 0xde, 0x05, 0xb2, /* Byte value: 0xd0 */ + 0x5b, 0x93, 0xcd, 0x5d, 0xed, 0xd5, 0xd7, 0x3d, 0xa4, 0xf6, 0xaa, 0xcd, 0xaa, 0x42, 0x96, 0x11, /* Byte value: 0xd1 */ + 0xeb, 0xd0, 0xcf, 0xf2, 0xfe, 0xab, 0x1d, 0xa1, 0x5a, 0x77, 0xde, 0xcf, 0xde, 0xd4, 0x24, 0xa2, /* Byte value: 0xd2 */ + 0x66, 0x54, 0xa2, 0x86, 0xaa, 0xa4, 0x45, 0x9e, 0x29, 0xdc, 0xcb, 0xa2, 0xcb, 0xf1, 0xc4, 0x95, /* Byte value: 0xd3 */ + 0x56, 0x2d, 0x3f, 0x2e, 0xfa, 0x1c, 0x34, 0xa2, 0x07, 0xe5, 0xdf, 0x3f, 0xdf, 0x61, 0x69, 0x97, /* Byte value: 0xd4 */ + 0x81, 0x0b, 0xdb, 0x5e, 0x40, 0x21, 0xd5, 0x30, 0x99, 0x34, 0x10, 0xdb, 0x10, 0x01, 0x5a, 0xd6, /* Byte value: 0xd5 */ + 0x77, 0xf3, 0x2c, 0x06, 0x99, 0x2b, 0x04, 0x1a, 0x7a, 0x47, 0xb7, 0x2c, 0xb7, 0x86, 0x5b, 0x4d, /* Byte value: 0xd6 */ + 0x57, 0x1c, 0x7b, 0x77, 0xf9, 0xfb, 0x5a, 0x32, 0x4e, 0x69, 0xaf, 0x7b, 0xaf, 0x66, 0x2c, 0xf0, /* Byte value: 0xd7 */ + 0x4e, 0xf0, 0x90, 0x7a, 0xd2, 0x40, 0xed, 0xbc, 0x10, 0x18, 0xd5, 0x90, 0xd5, 0x29, 0xde, 0x96, /* Byte value: 0xd8 */ + 0x8d, 0x84, 0x6d, 0x74, 0x54, 0x0f, 0x58, 0x3f, 0x73, 0xab, 0x15, 0x6d, 0x15, 0x25, 0xe0, 0x37, /* Byte value: 0xd9 */ + 0xb0, 0x43, 0x02, 0xaf, 0x13, 0x7e, 0xca, 0x9c, 0xfe, 0x81, 0x74, 0x02, 0x74, 0x96, 0xb2, 0xb3, /* Byte value: 0xda */ + 0xf3, 0x0d, 0x60, 0xa6, 0xd6, 0xf7, 0xc4, 0xbf, 0x4d, 0x8a, 0xd4, 0x60, 0xd4, 0x9c, 0x93, 0xa3, /* Byte value: 0xdb */ + 0x94, 0x68, 0x86, 0x79, 0x7f, 0xb4, 0xef, 0xb1, 0x2d, 0xda, 0x6f, 0x86, 0x6f, 0x6a, 0x12, 0x51, /* Byte value: 0xdc */ + 0x20, 0xef, 0x57, 0x71, 0x60, 0xd0, 0x5e, 0x28, 0x34, 0x2e, 0x18, 0x57, 0x18, 0xe0, 0x77, 0xbd, /* Byte value: 0xdd */ + 0x24, 0x2b, 0x84, 0xd6, 0x6c, 0xca, 0x25, 0x2d, 0xd3, 0x5b, 0x1b, 0x84, 0x1b, 0xfc, 0xa0, 0xe2, /* Byte value: 0xde */ + 0xd7, 0x26, 0xe4, 0x70, 0xba, 0x3d, 0xe1, 0x92, 0x9e, 0xd1, 0xcf, 0xe4, 0xcf, 0x60, 0x33, 0x41, /* Byte value: 0xdf */ + 0x14, 0x52, 0x19, 0x7e, 0x3c, 0x72, 0x54, 0x11, 0xfd, 0x62, 0x0f, 0x19, 0x0f, 0x6c, 0x0d, 0xe0, /* Byte value: 0xe0 */ + 0x9e, 0x41, 0x6b, 0x46, 0x61, 0x8d, 0xc5, 0x58, 0xb2, 0xeb, 0x89, 0x6b, 0x89, 0x5c, 0xf5, 0x21, /* Byte value: 0xe1 */ + 0x05, 0xf5, 0x97, 0xfe, 0x0f, 0xfd, 0x15, 0x95, 0xae, 0xf9, 0x73, 0x97, 0x73, 0x1b, 0x92, 0x38, /* Byte value: 0xe2 */ + 0xc6, 0x81, 0x6a, 0xf0, 0x89, 0xb2, 0xa0, 0x16, 0xcd, 0x4a, 0xb3, 0x6a, 0xb3, 0x17, 0xac, 0x99, /* Byte value: 0xe3 */ + 0xed, 0x76, 0x94, 0xe7, 0xf4, 0xbc, 0xba, 0x47, 0x2f, 0xd9, 0x3d, 0x94, 0x3d, 0xc6, 0x79, 0x33, /* Byte value: 0xe4 */ + 0xc8, 0x6c, 0x54, 0x68, 0x9b, 0x91, 0xf1, 0xfa, 0xb5, 0x0e, 0x56, 0x54, 0x56, 0x3d, 0x9c, 0xb6, /* Byte value: 0xe5 */ + 0x9b, 0xb4, 0xfc, 0xb8, 0x6e, 0x70, 0xd0, 0xcd, 0x1c, 0x12, 0xfa, 0xfc, 0xfa, 0x47, 0x67, 0x19, /* Byte value: 0xe6 */ + 0xbd, 0xfd, 0xf0, 0xdc, 0x04, 0xb7, 0x29, 0x03, 0x5d, 0x92, 0x01, 0xf0, 0x01, 0xb5, 0x4d, 0x35, /* Byte value: 0xe7 */ + 0x84, 0xfe, 0x4c, 0xa0, 0x4f, 0xdc, 0xc0, 0xa5, 0x37, 0xcd, 0x63, 0x4c, 0x63, 0x1a, 0xc8, 0xee, /* Byte value: 0xe8 */ + 0xc3, 0x74, 0xfd, 0x0e, 0x86, 0x4f, 0xb5, 0x83, 0x63, 0xb3, 0xc0, 0xfd, 0xc0, 0x0c, 0x3e, 0xa1, /* Byte value: 0xe9 */ + 0xca, 0x0e, 0xdc, 0xda, 0x9d, 0x9c, 0x2d, 0x19, 0x27, 0xd5, 0xb6, 0xdc, 0xb6, 0x33, 0x16, 0x78, /* Byte value: 0xea */ + 0x8a, 0x13, 0x72, 0x38, 0x5d, 0xff, 0x91, 0x49, 0x4f, 0x89, 0x86, 0x72, 0x86, 0x30, 0xf8, 0xc1, /* Byte value: 0xeb */ + 0x34, 0xbd, 0x4e, 0x0f, 0x5c, 0xa2, 0x0a, 0x39, 0xc9, 0x4c, 0x17, 0x4e, 0x17, 0x8c, 0x7a, 0x5d, /* Byte value: 0xec */ + 0x26, 0x49, 0x0c, 0x64, 0x6a, 0xc7, 0xf9, 0xce, 0x41, 0x80, 0xfb, 0x0c, 0xfb, 0xf2, 0x2a, 0x2c, /* Byte value: 0xed */ + 0x10, 0x96, 0xca, 0xd9, 0x30, 0x68, 0x2f, 0x14, 0x1a, 0x17, 0x0c, 0xca, 0x0c, 0x70, 0xda, 0xbf, /* Byte value: 0xee */ + 0x25, 0x1a, 0xc0, 0x8f, 0x6f, 0x2d, 0x4b, 0xbd, 0x9a, 0xd7, 0x6b, 0xc0, 0x6b, 0xfb, 0xe5, 0x85, /* Byte value: 0xef */ + 0xe3, 0x9b, 0xaa, 0x7f, 0xe6, 0x9f, 0xeb, 0xab, 0x57, 0x9d, 0xd8, 0xaa, 0xd8, 0xec, 0x49, 0x1c, /* Byte value: 0xf0 */ + 0x63, 0xa1, 0x35, 0x78, 0xa5, 0x59, 0x50, 0x0b, 0x87, 0x25, 0xb8, 0x35, 0xb8, 0xea, 0x56, 0xad, /* Byte value: 0xf1 */ + 0x0a, 0x29, 0xed, 0x3f, 0x1e, 0x39, 0x2a, 0xe9, 0x9f, 0x31, 0xe6, 0xed, 0xe6, 0x36, 0xe7, 0x70, /* Byte value: 0xf2 */ + 0x4f, 0xc1, 0xd4, 0x23, 0xd1, 0xa7, 0x83, 0x2c, 0x59, 0x94, 0xa5, 0xd4, 0xa5, 0x2e, 0x9b, 0xf1, /* Byte value: 0xf3 */ + 0x8b, 0x22, 0x36, 0x61, 0x5e, 0x18, 0xff, 0xd9, 0x06, 0x05, 0xf6, 0x36, 0xf6, 0x37, 0xbd, 0xa6, /* Byte value: 0xf4 */ + 0xc7, 0xb0, 0x2e, 0xa9, 0x8a, 0x55, 0xce, 0x86, 0x84, 0xc6, 0xc3, 0x2e, 0xc3, 0x10, 0xe9, 0xfe, /* Byte value: 0xf5 */ + 0x67, 0x65, 0xe6, 0xdf, 0xa9, 0x43, 0x2b, 0x0e, 0x60, 0x50, 0xbb, 0xe6, 0xbb, 0xf6, 0x81, 0xf2, /* Byte value: 0xf6 */ + 0x2d, 0x51, 0xa5, 0x02, 0x77, 0x19, 0xbd, 0xb7, 0x97, 0x3d, 0x6d, 0xa5, 0x6d, 0xc3, 0x88, 0x3b, /* Byte value: 0xf7 */ + 0xfe, 0xb3, 0x92, 0xd5, 0xc1, 0x3e, 0x27, 0x20, 0xee, 0x99, 0xa1, 0x92, 0xa1, 0xbf, 0x6c, 0x25, /* Byte value: 0xf8 */ + 0x45, 0xe8, 0x39, 0x1c, 0xcf, 0x9e, 0xa9, 0xc5, 0xc6, 0xa5, 0x43, 0x39, 0x43, 0x18, 0x7c, 0x81, /* Byte value: 0xf9 */ + 0xa0, 0xd5, 0xc8, 0x76, 0x23, 0x16, 0xe5, 0x88, 0xe4, 0x96, 0x78, 0xc8, 0x78, 0xe6, 0x68, 0x0c, /* Byte value: 0xfa */ + 0x80, 0x3a, 0x9f, 0x07, 0x43, 0xc6, 0xbb, 0xa0, 0xd0, 0xb8, 0x60, 0x9f, 0x60, 0x06, 0x1f, 0xb1, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x4a, 0x34, 0x43, 0xdd, 0xde, 0x5a, 0x96, 0xb9, 0xf7, 0x6d, 0xd6, 0x43, 0xd6, 0x35, 0x09, 0xc9, /* Byte value: 0xfd */ + 0xee, 0x25, 0x58, 0x0c, 0xf1, 0x56, 0x08, 0x34, 0xf4, 0x8e, 0xad, 0x58, 0xad, 0xcf, 0xb6, 0x9a, /* Byte value: 0xfe */ + 0x4c, 0x92, 0x18, 0xc8, 0xd4, 0x4d, 0x31, 0x5f, 0x82, 0xc3, 0x35, 0x18, 0x35, 0x27, 0x54, 0x58, /* Byte value: 0xff */ + + /* Matrix row: 13 */ + 0xab, 0xda, 0x7f, 0x93, 0x75, 0x63, 0x3b, 0x22, 0xb7, 0x40, 0xa6, 0x84, 0xc2, 0x22, 0x09, 0xda, /* Byte value: 0x00 */ + 0xbb, 0xd9, 0xf4, 0xa6, 0xc1, 0x1b, 0xf5, 0xe1, 0x54, 0xa2, 0xc5, 0x24, 0x95, 0xe1, 0xdd, 0xd9, /* Byte value: 0x01 */ + 0x83, 0x3c, 0x0e, 0x02, 0x84, 0xaf, 0x03, 0xe7, 0x22, 0x36, 0xb0, 0x57, 0xa6, 0xe7, 0x08, 0x3c, /* Byte value: 0x02 */ + 0x0d, 0x8c, 0x03, 0x40, 0xed, 0xc4, 0x60, 0xd0, 0xca, 0x0f, 0xa2, 0x72, 0x27, 0xd0, 0xc3, 0x8c, /* Byte value: 0x03 */ + 0x3a, 0xdd, 0xd3, 0xea, 0xb2, 0xbb, 0x9f, 0x26, 0x52, 0x19, 0x41, 0x67, 0xe0, 0x26, 0x2e, 0xdd, /* Byte value: 0x04 */ + 0x4a, 0xd4, 0xe4, 0x61, 0x38, 0x10, 0xb0, 0x2a, 0xbe, 0xf2, 0xab, 0x81, 0x86, 0x2a, 0x47, 0xd4, /* Byte value: 0x05 */ + 0xe8, 0xf2, 0xca, 0x2e, 0x8d, 0xa9, 0x39, 0x98, 0x8b, 0x64, 0xc7, 0x5f, 0x06, 0x98, 0xb8, 0xf2, /* Byte value: 0x06 */ + 0xeb, 0xd6, 0x16, 0x47, 0xe0, 0x40, 0x85, 0xa8, 0xbd, 0x4e, 0xe9, 0x41, 0x5d, 0xa8, 0xdf, 0xd6, /* Byte value: 0x07 */ + 0x8f, 0xac, 0xf8, 0x65, 0xf3, 0x8d, 0xb6, 0x27, 0xfa, 0x9e, 0x08, 0x2f, 0x09, 0x27, 0x57, 0xac, /* Byte value: 0x08 */ + 0xbe, 0xb5, 0x53, 0x1d, 0x76, 0xe3, 0xf2, 0xb1, 0x0e, 0xdc, 0xb7, 0x06, 0x78, 0xb1, 0x74, 0xb5, /* Byte value: 0x09 */ + 0x0f, 0xb4, 0x2a, 0x0e, 0x1a, 0xcb, 0x09, 0xf0, 0xee, 0x82, 0x96, 0x66, 0xf4, 0xf0, 0x38, 0xb4, /* Byte value: 0x0a */ + 0x6d, 0x86, 0xbf, 0xfe, 0xd3, 0x17, 0x81, 0x1f, 0xc5, 0x06, 0x2b, 0x34, 0x16, 0x1f, 0x7e, 0x86, /* Byte value: 0x0b */ + 0x0a, 0xd8, 0x8d, 0xb5, 0xad, 0x33, 0x0e, 0xa0, 0xb4, 0xfc, 0xe4, 0x44, 0x19, 0xa0, 0x91, 0xd8, /* Byte value: 0x0c */ + 0x29, 0xfa, 0x84, 0xb6, 0x6b, 0x2a, 0xed, 0xd5, 0x87, 0xd1, 0x0c, 0xd9, 0xec, 0xd5, 0x9d, 0xfa, /* Byte value: 0x0d */ + 0x17, 0x57, 0x05, 0xc0, 0xf4, 0x8f, 0xa0, 0xb3, 0x9d, 0x11, 0x25, 0x96, 0x69, 0xb3, 0x86, 0x57, /* Byte value: 0x0e */ + 0xb0, 0x1d, 0x8c, 0x34, 0xf6, 0xce, 0x2e, 0x51, 0xf2, 0xf9, 0x3b, 0x6a, 0x04, 0x51, 0xd0, 0x1d, /* Byte value: 0x0f */ + 0xc5, 0x78, 0x1c, 0x04, 0xcb, 0x9d, 0x06, 0x0d, 0x44, 0x6c, 0xa3, 0xae, 0x8f, 0x0d, 0x10, 0x78, /* Byte value: 0x10 */ + 0x4c, 0x9c, 0x9f, 0xb3, 0xe2, 0x01, 0x0b, 0x4a, 0xd2, 0xa6, 0xf7, 0xbd, 0x30, 0x4a, 0x89, 0x9c, /* Byte value: 0x11 */ + 0xc3, 0x30, 0x67, 0xd6, 0x11, 0x8c, 0xbd, 0x6d, 0x28, 0x38, 0xff, 0x92, 0x39, 0x6d, 0xde, 0x30, /* Byte value: 0x12 */ + 0xb5, 0x71, 0x2b, 0x8f, 0x41, 0x36, 0x29, 0x01, 0xa8, 0x87, 0x49, 0x48, 0xe9, 0x01, 0x79, 0x71, /* Byte value: 0x13 */ + 0x74, 0x79, 0x65, 0x17, 0xa7, 0xb5, 0xfd, 0x4c, 0xa4, 0x32, 0x82, 0xce, 0x03, 0x4c, 0x5c, 0x79, /* Byte value: 0x14 */ + 0x94, 0x6b, 0x0b, 0xc2, 0x70, 0x20, 0xa3, 0x54, 0xbf, 0x27, 0x95, 0xc1, 0xcf, 0x54, 0x8e, 0x6b, /* Byte value: 0x15 */ + 0x1d, 0x8f, 0x88, 0x75, 0x59, 0xbc, 0xae, 0x13, 0x29, 0xed, 0xc1, 0xd2, 0x70, 0x13, 0x17, 0x8f, /* Byte value: 0x16 */ + 0x25, 0x6a, 0x72, 0xd1, 0x1c, 0x08, 0x58, 0x15, 0x5f, 0x79, 0xb4, 0xa1, 0x43, 0x15, 0xc2, 0x6a, /* Byte value: 0x17 */ + 0x48, 0xec, 0xcd, 0x2f, 0xcf, 0x1f, 0xd9, 0x0a, 0x9a, 0x7f, 0x9f, 0x95, 0x55, 0x0a, 0xbc, 0xec, /* Byte value: 0x18 */ + 0xda, 0xcf, 0xbd, 0x3f, 0x65, 0x2e, 0xc1, 0x3e, 0x49, 0x0c, 0x56, 0x68, 0x2c, 0x3e, 0xfc, 0xcf, /* Byte value: 0x19 */ + 0xdd, 0x9b, 0x33, 0xca, 0x25, 0xd9, 0xaf, 0x4e, 0x37, 0xff, 0x10, 0x5e, 0x12, 0x4e, 0xae, 0x9b, /* Byte value: 0x1a */ + 0xe9, 0xee, 0x3f, 0x09, 0x17, 0x4f, 0xec, 0x88, 0x99, 0xc3, 0xdd, 0x55, 0x8e, 0x88, 0x24, 0xee, /* Byte value: 0x1b */ + 0xea, 0xca, 0xe3, 0x60, 0x7a, 0xa6, 0x50, 0xb8, 0xaf, 0xe9, 0xf3, 0x4b, 0xd5, 0xb8, 0x43, 0xca, /* Byte value: 0x1c */ + 0x73, 0x2d, 0xeb, 0xe2, 0xe7, 0x42, 0x93, 0x3c, 0xda, 0xc1, 0xc4, 0xf8, 0x3d, 0x3c, 0x0e, 0x2d, /* Byte value: 0x1d */ + 0x2e, 0xae, 0x0a, 0x43, 0x2b, 0xdd, 0x83, 0xa5, 0xf9, 0x22, 0x4a, 0xef, 0xd2, 0xa5, 0xcf, 0xae, /* Byte value: 0x1e */ + 0xf5, 0x7d, 0x42, 0x5b, 0xd4, 0x15, 0x97, 0x8b, 0xa2, 0x89, 0x06, 0x8d, 0x76, 0x8b, 0xaf, 0x7d, /* Byte value: 0x1f */ + 0x26, 0x4e, 0xae, 0xb8, 0x71, 0xe1, 0xe4, 0x25, 0x69, 0x53, 0x9a, 0xbf, 0x18, 0x25, 0xa5, 0x4e, /* Byte value: 0x20 */ + 0xd0, 0x17, 0x30, 0x8a, 0xc8, 0x1d, 0xcf, 0x9e, 0xfd, 0xf0, 0xb2, 0x2c, 0x35, 0x9e, 0x6d, 0x17, /* Byte value: 0x21 */ + 0xc4, 0x64, 0xe9, 0x23, 0x51, 0x7b, 0xd3, 0x1d, 0x56, 0xcb, 0xb9, 0xa4, 0x07, 0x1d, 0x8c, 0x64, /* Byte value: 0x22 */ + 0xf3, 0x35, 0x39, 0x89, 0x0e, 0x04, 0x2c, 0xeb, 0xce, 0xdd, 0x5a, 0xb1, 0xc0, 0xeb, 0x61, 0x35, /* Byte value: 0x23 */ + 0x7b, 0xcd, 0x4f, 0x19, 0xbd, 0x7e, 0xf4, 0xbc, 0x4a, 0xb0, 0x14, 0xa8, 0xf7, 0xbc, 0x64, 0xcd, /* Byte value: 0x24 */ + 0x4d, 0x80, 0x6a, 0x94, 0x78, 0xe7, 0xde, 0x5a, 0xc0, 0x01, 0xed, 0xb7, 0xb8, 0x5a, 0x15, 0x80, /* Byte value: 0x25 */ + 0x45, 0x60, 0xce, 0x6f, 0x22, 0xdb, 0xb9, 0xda, 0x50, 0x70, 0x3d, 0xe7, 0x72, 0xda, 0x7f, 0x60, /* Byte value: 0x26 */ + 0xa9, 0xe2, 0x56, 0xdd, 0x82, 0x6c, 0x52, 0x02, 0x93, 0xcd, 0x92, 0x90, 0x11, 0x02, 0xf2, 0xe2, /* Byte value: 0x27 */ + 0x5e, 0xa7, 0x3d, 0xc8, 0xa1, 0x76, 0xac, 0xa9, 0x15, 0xc9, 0xa0, 0x09, 0xb4, 0xa9, 0xa6, 0xa7, /* Byte value: 0x28 */ + 0xd8, 0xf7, 0x94, 0x71, 0x92, 0x21, 0xa8, 0x1e, 0x6d, 0x81, 0x62, 0x7c, 0xff, 0x1e, 0x07, 0xf7, /* Byte value: 0x29 */ + 0x7e, 0xa1, 0xe8, 0xa2, 0x0a, 0x86, 0xf3, 0xec, 0x10, 0xce, 0x66, 0x8a, 0x1a, 0xec, 0xcd, 0xa1, /* Byte value: 0x2a */ + 0xf2, 0x29, 0xcc, 0xae, 0x94, 0xe2, 0xf9, 0xfb, 0xdc, 0x7a, 0x40, 0xbb, 0x48, 0xfb, 0xfd, 0x29, /* Byte value: 0x2b */ + 0x90, 0x1b, 0x59, 0x5e, 0x5d, 0x3e, 0x71, 0x14, 0xf7, 0xfe, 0xfd, 0xe9, 0xaa, 0x14, 0xbb, 0x1b, /* Byte value: 0x2c */ + 0x77, 0x5d, 0xb9, 0x7e, 0xca, 0x5c, 0x41, 0x7c, 0x92, 0x18, 0xac, 0xd0, 0x58, 0x7c, 0x3b, 0x5d, /* Byte value: 0x2d */ + 0x53, 0x2b, 0x3e, 0x88, 0x4c, 0xb2, 0xcc, 0x79, 0xdf, 0xc6, 0x02, 0x7b, 0x93, 0x79, 0x65, 0x2b, /* Byte value: 0x2e */ + 0xe5, 0x7e, 0xc9, 0x6e, 0x60, 0x6d, 0x59, 0x48, 0x41, 0x6b, 0x65, 0x2d, 0x21, 0x48, 0x7b, 0x7e, /* Byte value: 0x2f */ + 0x49, 0xf0, 0x38, 0x08, 0x55, 0xf9, 0x0c, 0x1a, 0x88, 0xd8, 0x85, 0x9f, 0xdd, 0x1a, 0x20, 0xf0, /* Byte value: 0x30 */ + 0x98, 0xfb, 0xfd, 0xa5, 0x07, 0x02, 0x16, 0x94, 0x67, 0x8f, 0x2d, 0xb9, 0x60, 0x94, 0xd1, 0xfb, /* Byte value: 0x31 */ + 0x13, 0x27, 0x57, 0x5c, 0xd9, 0x91, 0x72, 0xf3, 0xd5, 0xc8, 0x4d, 0xbe, 0x0c, 0xf3, 0xb3, 0x27, /* Byte value: 0x32 */ + 0x43, 0x28, 0xb5, 0xbd, 0xf8, 0xca, 0x02, 0xba, 0x3c, 0x24, 0x61, 0xdb, 0xc4, 0xba, 0xb1, 0x28, /* Byte value: 0x33 */ + 0xdc, 0x87, 0xc6, 0xed, 0xbf, 0x3f, 0x7a, 0x5e, 0x25, 0x58, 0x0a, 0x54, 0x9a, 0x5e, 0x32, 0x87, /* Byte value: 0x34 */ + 0xc7, 0x40, 0x35, 0x4a, 0x3c, 0x92, 0x6f, 0x2d, 0x60, 0xe1, 0x97, 0xba, 0x5c, 0x2d, 0xeb, 0x40, /* Byte value: 0x35 */ + 0xa0, 0x1e, 0x07, 0x01, 0x42, 0xb6, 0xe0, 0x92, 0x11, 0x1b, 0x58, 0xca, 0x53, 0x92, 0x04, 0x1e, /* Byte value: 0x36 */ + 0xcc, 0x84, 0x4d, 0xd8, 0x0b, 0x47, 0xb4, 0x9d, 0xc6, 0xba, 0x69, 0xf4, 0xcd, 0x9d, 0xe6, 0x84, /* Byte value: 0x37 */ + 0x14, 0x73, 0xd9, 0xa9, 0x99, 0x66, 0x1c, 0x83, 0xab, 0x3b, 0x0b, 0x88, 0x32, 0x83, 0xe1, 0x73, /* Byte value: 0x38 */ + 0x52, 0x37, 0xcb, 0xaf, 0xd6, 0x54, 0x19, 0x69, 0xcd, 0x61, 0x18, 0x71, 0x1b, 0x69, 0xf9, 0x37, /* Byte value: 0x39 */ + 0x2f, 0xb2, 0xff, 0x64, 0xb1, 0x3b, 0x56, 0xb5, 0xeb, 0x85, 0x50, 0xe5, 0x5a, 0xb5, 0x53, 0xb2, /* Byte value: 0x3a */ + 0x47, 0x58, 0xe7, 0x21, 0xd5, 0xd4, 0xd0, 0xfa, 0x74, 0xfd, 0x09, 0xf3, 0xa1, 0xfa, 0x84, 0x58, /* Byte value: 0x3b */ + 0xa6, 0x56, 0x7c, 0xd3, 0x98, 0xa7, 0x5b, 0xf2, 0x7d, 0x4f, 0x04, 0xf6, 0xe5, 0xf2, 0xca, 0x56, /* Byte value: 0x3c */ + 0x5f, 0xbb, 0xc8, 0xef, 0x3b, 0x90, 0x79, 0xb9, 0x07, 0x6e, 0xba, 0x03, 0x3c, 0xb9, 0x3a, 0xbb, /* Byte value: 0x3d */ + 0xe3, 0x36, 0xb2, 0xbc, 0xba, 0x7c, 0xe2, 0x28, 0x2d, 0x3f, 0x39, 0x11, 0x97, 0x28, 0xb5, 0x36, /* Byte value: 0x3e */ + 0xb8, 0xfd, 0x28, 0xcf, 0xac, 0xf2, 0x49, 0xd1, 0x62, 0x88, 0xeb, 0x3a, 0xce, 0xd1, 0xba, 0xfd, /* Byte value: 0x3f */ + 0xa7, 0x4a, 0x89, 0xf4, 0x02, 0x41, 0x8e, 0xe2, 0x6f, 0xe8, 0x1e, 0xfc, 0x6d, 0xe2, 0x56, 0x4a, /* Byte value: 0x40 */ + 0xc0, 0x14, 0xbb, 0xbf, 0x7c, 0x65, 0x01, 0x5d, 0x1e, 0x12, 0xd1, 0x8c, 0x62, 0x5d, 0xb9, 0x14, /* Byte value: 0x41 */ + 0x23, 0x22, 0x09, 0x03, 0xc6, 0x19, 0xe3, 0x75, 0x33, 0x2d, 0xe8, 0x9d, 0xf5, 0x75, 0x0c, 0x22, /* Byte value: 0x42 */ + 0x2a, 0xde, 0x58, 0xdf, 0x06, 0xc3, 0x51, 0xe5, 0xb1, 0xfb, 0x22, 0xc7, 0xb7, 0xe5, 0xfa, 0xde, /* Byte value: 0x43 */ + 0x62, 0x32, 0x95, 0xf0, 0xc9, 0xdc, 0x88, 0xef, 0x2b, 0x84, 0xbd, 0x52, 0xe2, 0xef, 0x46, 0x32, /* Byte value: 0x44 */ + 0x7d, 0x85, 0x34, 0xcb, 0x67, 0x6f, 0x4f, 0xdc, 0x26, 0xe4, 0x48, 0x94, 0x41, 0xdc, 0xaa, 0x85, /* Byte value: 0x45 */ + 0x31, 0x19, 0xab, 0x78, 0x85, 0x6e, 0x44, 0x96, 0xf4, 0x42, 0xbf, 0x29, 0x71, 0x96, 0x23, 0x19, /* Byte value: 0x46 */ + 0x30, 0x05, 0x5e, 0x5f, 0x1f, 0x88, 0x91, 0x86, 0xe6, 0xe5, 0xa5, 0x23, 0xf9, 0x86, 0xbf, 0x05, /* Byte value: 0x47 */ + 0xc1, 0x08, 0x4e, 0x98, 0xe6, 0x83, 0xd4, 0x4d, 0x0c, 0xb5, 0xcb, 0x86, 0xea, 0x4d, 0x25, 0x08, /* Byte value: 0x48 */ + 0x20, 0x06, 0xd5, 0x6a, 0xab, 0xf0, 0x5f, 0x45, 0x05, 0x07, 0xc6, 0x83, 0xae, 0x45, 0x6b, 0x06, /* Byte value: 0x49 */ + 0x8a, 0xc0, 0x5f, 0xde, 0x44, 0x75, 0xb1, 0x77, 0xa0, 0xe0, 0x7a, 0x0d, 0xe4, 0x77, 0xfe, 0xc0, /* Byte value: 0x4a */ + 0xd7, 0x43, 0xbe, 0x7f, 0x88, 0xea, 0xa1, 0xee, 0x83, 0x03, 0xf4, 0x1a, 0x0b, 0xee, 0x3f, 0x43, /* Byte value: 0x4b */ + 0x3d, 0x89, 0x5d, 0x1f, 0xf2, 0x4c, 0xf1, 0x56, 0x2c, 0xea, 0x07, 0x51, 0xde, 0x56, 0x7c, 0x89, /* Byte value: 0x4c */ + 0xbf, 0xa9, 0xa6, 0x3a, 0xec, 0x05, 0x27, 0xa1, 0x1c, 0x7b, 0xad, 0x0c, 0xf0, 0xa1, 0xe8, 0xa9, /* Byte value: 0x4d */ + 0xc6, 0x5c, 0xc0, 0x6d, 0xa6, 0x74, 0xba, 0x3d, 0x72, 0x46, 0x8d, 0xb0, 0xd4, 0x3d, 0x77, 0x5c, /* Byte value: 0x4e */ + 0x72, 0x31, 0x1e, 0xc5, 0x7d, 0xa4, 0x46, 0x2c, 0xc8, 0x66, 0xde, 0xf2, 0xb5, 0x2c, 0x92, 0x31, /* Byte value: 0x4f */ + 0xdb, 0xd3, 0x48, 0x18, 0xff, 0xc8, 0x14, 0x2e, 0x5b, 0xab, 0x4c, 0x62, 0xa4, 0x2e, 0x60, 0xd3, /* Byte value: 0x50 */ + 0x15, 0x6f, 0x2c, 0x8e, 0x03, 0x80, 0xc9, 0x93, 0xb9, 0x9c, 0x11, 0x82, 0xba, 0x93, 0x7d, 0x6f, /* Byte value: 0x51 */ + 0x99, 0xe7, 0x08, 0x82, 0x9d, 0xe4, 0xc3, 0x84, 0x75, 0x28, 0x37, 0xb3, 0xe8, 0x84, 0x4d, 0xe7, /* Byte value: 0x52 */ + 0x4b, 0xc8, 0x11, 0x46, 0xa2, 0xf6, 0x65, 0x3a, 0xac, 0x55, 0xb1, 0x8b, 0x0e, 0x3a, 0xdb, 0xc8, /* Byte value: 0x53 */ + 0x34, 0x75, 0x0c, 0xc3, 0x32, 0x96, 0x43, 0xc6, 0xae, 0x3c, 0xcd, 0x0b, 0x9c, 0xc6, 0x8a, 0x75, /* Byte value: 0x54 */ + 0x60, 0x0a, 0xbc, 0xbe, 0x3e, 0xd3, 0xe1, 0xcf, 0x0f, 0x09, 0x89, 0x46, 0x31, 0xcf, 0xbd, 0x0a, /* Byte value: 0x55 */ + 0x92, 0x23, 0x70, 0x10, 0xaa, 0x31, 0x18, 0x34, 0xd3, 0x73, 0xc9, 0xfd, 0x79, 0x34, 0x40, 0x23, /* Byte value: 0x56 */ + 0xac, 0x8e, 0xf1, 0x66, 0x35, 0x94, 0x55, 0x52, 0xc9, 0xb3, 0xe0, 0xb2, 0xfc, 0x52, 0x5b, 0x8e, /* Byte value: 0x57 */ + 0x6e, 0xa2, 0x63, 0x97, 0xbe, 0xfe, 0x3d, 0x2f, 0xf3, 0x2c, 0x05, 0x2a, 0x4d, 0x2f, 0x19, 0xa2, /* Byte value: 0x58 */ + 0xa1, 0x02, 0xf2, 0x26, 0xd8, 0x50, 0x35, 0x82, 0x03, 0xbc, 0x42, 0xc0, 0xdb, 0x82, 0x98, 0x02, /* Byte value: 0x59 */ + 0x81, 0x04, 0x27, 0x4c, 0x73, 0xa0, 0x6a, 0xc7, 0x06, 0xbb, 0x84, 0x43, 0x75, 0xc7, 0xf3, 0x04, /* Byte value: 0x5a */ + 0x3b, 0xc1, 0x26, 0xcd, 0x28, 0x5d, 0x4a, 0x36, 0x40, 0xbe, 0x5b, 0x6d, 0x68, 0x36, 0xb2, 0xc1, /* Byte value: 0x5b */ + 0x19, 0xff, 0xda, 0xe9, 0x74, 0xa2, 0x7c, 0x53, 0x61, 0x34, 0xa9, 0xfa, 0x15, 0x53, 0x22, 0xff, /* Byte value: 0x5c */ + 0xe4, 0x62, 0x3c, 0x49, 0xfa, 0x8b, 0x8c, 0x58, 0x53, 0xcc, 0x7f, 0x27, 0xa9, 0x58, 0xe7, 0x62, /* Byte value: 0x5d */ + 0x2c, 0x96, 0x23, 0x0d, 0xdc, 0xd2, 0xea, 0x85, 0xdd, 0xaf, 0x7e, 0xfb, 0x01, 0x85, 0x34, 0x96, /* Byte value: 0x5e */ + 0xbd, 0x91, 0x8f, 0x74, 0x1b, 0x0a, 0x4e, 0x81, 0x38, 0xf6, 0x99, 0x18, 0x23, 0x81, 0x13, 0x91, /* Byte value: 0x5f */ + 0xb6, 0x55, 0xf7, 0xe6, 0x2c, 0xdf, 0x95, 0x31, 0x9e, 0xad, 0x67, 0x56, 0xb2, 0x31, 0x1e, 0x55, /* Byte value: 0x60 */ + 0xd3, 0x33, 0xec, 0xe3, 0xa5, 0xf4, 0x73, 0xae, 0xcb, 0xda, 0x9c, 0x32, 0x6e, 0xae, 0x0a, 0x33, /* Byte value: 0x61 */ + 0xe7, 0x46, 0xe0, 0x20, 0x97, 0x62, 0x30, 0x68, 0x65, 0xe6, 0x51, 0x39, 0xf2, 0x68, 0x80, 0x46, /* Byte value: 0x62 */ + 0x9b, 0xdf, 0x21, 0xcc, 0x6a, 0xeb, 0xaa, 0xa4, 0x51, 0xa5, 0x03, 0xa7, 0x3b, 0xa4, 0xb6, 0xdf, /* Byte value: 0x63 */ + 0x8c, 0x88, 0x24, 0x0c, 0x9e, 0x64, 0x0a, 0x17, 0xcc, 0xb4, 0x26, 0x31, 0x52, 0x17, 0x30, 0x88, /* Byte value: 0x64 */ + 0x04, 0x70, 0x52, 0x9c, 0x2d, 0x1e, 0xd2, 0x40, 0x48, 0xd9, 0x68, 0x28, 0x65, 0x40, 0x35, 0x70, /* Byte value: 0x65 */ + 0x86, 0x50, 0xa9, 0xb9, 0x33, 0x57, 0x04, 0xb7, 0x78, 0x48, 0xc2, 0x75, 0x4b, 0xb7, 0xa1, 0x50, /* Byte value: 0x66 */ + 0xef, 0xa6, 0x44, 0xdb, 0xcd, 0x5e, 0x57, 0xe8, 0xf5, 0x97, 0x81, 0x69, 0x38, 0xe8, 0xea, 0xa6, /* Byte value: 0x67 */ + 0x32, 0x3d, 0x77, 0x11, 0xe8, 0x87, 0xf8, 0xa6, 0xc2, 0x68, 0x91, 0x37, 0x2a, 0xa6, 0x44, 0x3d, /* Byte value: 0x68 */ + 0x0b, 0xc4, 0x78, 0x92, 0x37, 0xd5, 0xdb, 0xb0, 0xa6, 0x5b, 0xfe, 0x4e, 0x91, 0xb0, 0x0d, 0xc4, /* Byte value: 0x69 */ + 0x9e, 0xb3, 0x86, 0x77, 0xdd, 0x13, 0xad, 0xf4, 0x0b, 0xdb, 0x71, 0x85, 0xd6, 0xf4, 0x1f, 0xb3, /* Byte value: 0x6a */ + 0x80, 0x18, 0xd2, 0x6b, 0xe9, 0x46, 0xbf, 0xd7, 0x14, 0x1c, 0x9e, 0x49, 0xfd, 0xd7, 0x6f, 0x18, /* Byte value: 0x6b */ + 0x1c, 0x93, 0x7d, 0x52, 0xc3, 0x5a, 0x7b, 0x03, 0x3b, 0x4a, 0xdb, 0xd8, 0xf8, 0x03, 0x8b, 0x93, /* Byte value: 0x6c */ + 0xb1, 0x01, 0x79, 0x13, 0x6c, 0x28, 0xfb, 0x41, 0xe0, 0x5e, 0x21, 0x60, 0x8c, 0x41, 0x4c, 0x01, /* Byte value: 0x6d */ + 0xd4, 0x67, 0x62, 0x16, 0xe5, 0x03, 0x1d, 0xde, 0xb5, 0x29, 0xda, 0x04, 0x50, 0xde, 0x58, 0x67, /* Byte value: 0x6e */ + 0x7a, 0xd1, 0xba, 0x3e, 0x27, 0x98, 0x21, 0xac, 0x58, 0x17, 0x0e, 0xa2, 0x7f, 0xac, 0xf8, 0xd1, /* Byte value: 0x6f */ + 0x5b, 0xcb, 0x9a, 0x73, 0x16, 0x8e, 0xab, 0xf9, 0x4f, 0xb7, 0xd2, 0x2b, 0x59, 0xf9, 0x0f, 0xcb, /* Byte value: 0x70 */ + 0xa3, 0x3a, 0xdb, 0x68, 0x2f, 0x5f, 0x5c, 0xa2, 0x27, 0x31, 0x76, 0xd4, 0x08, 0xa2, 0x63, 0x3a, /* Byte value: 0x71 */ + 0xf9, 0xed, 0xb4, 0x3c, 0xa3, 0x37, 0x22, 0x4b, 0x7a, 0x21, 0xbe, 0xf5, 0xd9, 0x4b, 0xf0, 0xed, /* Byte value: 0x72 */ + 0x33, 0x21, 0x82, 0x36, 0x72, 0x61, 0x2d, 0xb6, 0xd0, 0xcf, 0x8b, 0x3d, 0xa2, 0xb6, 0xd8, 0x21, /* Byte value: 0x73 */ + 0x68, 0xea, 0x18, 0x45, 0x64, 0xef, 0x86, 0x4f, 0x9f, 0x78, 0x59, 0x16, 0xfb, 0x4f, 0xd7, 0xea, /* Byte value: 0x74 */ + 0x96, 0x53, 0x22, 0x8c, 0x87, 0x2f, 0xca, 0x74, 0x9b, 0xaa, 0xa1, 0xd5, 0x1c, 0x74, 0x75, 0x53, /* Byte value: 0x75 */ + 0x46, 0x44, 0x12, 0x06, 0x4f, 0x32, 0x05, 0xea, 0x66, 0x5a, 0x13, 0xf9, 0x29, 0xea, 0x18, 0x44, /* Byte value: 0x76 */ + 0x02, 0x38, 0x29, 0x4e, 0xf7, 0x0f, 0x69, 0x20, 0x24, 0x8d, 0x34, 0x14, 0xd3, 0x20, 0xfb, 0x38, /* Byte value: 0x77 */ + 0xff, 0xa5, 0xcf, 0xee, 0x79, 0x26, 0x99, 0x2b, 0x16, 0x75, 0xe2, 0xc9, 0x6f, 0x2b, 0x3e, 0xa5, /* Byte value: 0x78 */ + 0x95, 0x77, 0xfe, 0xe5, 0xea, 0xc6, 0x76, 0x44, 0xad, 0x80, 0x8f, 0xcb, 0x47, 0x44, 0x12, 0x77, /* Byte value: 0x79 */ + 0x64, 0x7a, 0xee, 0x22, 0x13, 0xcd, 0x33, 0x8f, 0x47, 0xd0, 0xe1, 0x6e, 0x54, 0x8f, 0x88, 0x7a, /* Byte value: 0x7a */ + 0x40, 0x0c, 0x69, 0xd4, 0x95, 0x23, 0xbe, 0x8a, 0x0a, 0x0e, 0x4f, 0xc5, 0x9f, 0x8a, 0xd6, 0x0c, /* Byte value: 0x7b */ + 0x41, 0x10, 0x9c, 0xf3, 0x0f, 0xc5, 0x6b, 0x9a, 0x18, 0xa9, 0x55, 0xcf, 0x17, 0x9a, 0x4a, 0x10, /* Byte value: 0x7c */ + 0x16, 0x4b, 0xf0, 0xe7, 0x6e, 0x69, 0x75, 0xa3, 0x8f, 0xb6, 0x3f, 0x9c, 0xe1, 0xa3, 0x1a, 0x4b, /* Byte value: 0x7d */ + 0x0e, 0xa8, 0xdf, 0x29, 0x80, 0x2d, 0xdc, 0xe0, 0xfc, 0x25, 0x8c, 0x6c, 0x7c, 0xe0, 0xa4, 0xa8, /* Byte value: 0x7e */ + 0xb9, 0xe1, 0xdd, 0xe8, 0x36, 0x14, 0x9c, 0xc1, 0x70, 0x2f, 0xf1, 0x30, 0x46, 0xc1, 0x26, 0xe1, /* Byte value: 0x7f */ + 0xfd, 0x9d, 0xe6, 0xa0, 0x8e, 0x29, 0xf0, 0x0b, 0x32, 0xf8, 0xd6, 0xdd, 0xbc, 0x0b, 0xc5, 0x9d, /* Byte value: 0x80 */ + 0x6f, 0xbe, 0x96, 0xb0, 0x24, 0x18, 0xe8, 0x3f, 0xe1, 0x8b, 0x1f, 0x20, 0xc5, 0x3f, 0x85, 0xbe, /* Byte value: 0x81 */ + 0x91, 0x07, 0xac, 0x79, 0xc7, 0xd8, 0xa4, 0x04, 0xe5, 0x59, 0xe7, 0xe3, 0x22, 0x04, 0x27, 0x07, /* Byte value: 0x82 */ + 0xa5, 0x72, 0xa0, 0xba, 0xf5, 0x4e, 0xe7, 0xc2, 0x4b, 0x65, 0x2a, 0xe8, 0xbe, 0xc2, 0xad, 0x72, /* Byte value: 0x83 */ + 0xcf, 0xa0, 0x91, 0xb1, 0x66, 0xae, 0x08, 0xad, 0xf0, 0x90, 0x47, 0xea, 0x96, 0xad, 0x81, 0xa0, /* Byte value: 0x84 */ + 0x56, 0x47, 0x99, 0x33, 0xfb, 0x4a, 0xcb, 0x29, 0x85, 0xb8, 0x70, 0x59, 0x7e, 0x29, 0xcc, 0x47, /* Byte value: 0x85 */ + 0xba, 0xc5, 0x01, 0x81, 0x5b, 0xfd, 0x20, 0xf1, 0x46, 0x05, 0xdf, 0x2e, 0x1d, 0xf1, 0x41, 0xc5, /* Byte value: 0x86 */ + 0x61, 0x16, 0x49, 0x99, 0xa4, 0x35, 0x34, 0xdf, 0x1d, 0xae, 0x93, 0x4c, 0xb9, 0xdf, 0x21, 0x16, /* Byte value: 0x87 */ + 0x18, 0xe3, 0x2f, 0xce, 0xee, 0x44, 0xa9, 0x43, 0x73, 0x93, 0xb3, 0xf0, 0x9d, 0x43, 0xbe, 0xe3, /* Byte value: 0x88 */ + 0x54, 0x7f, 0xb0, 0x7d, 0x0c, 0x45, 0xa2, 0x09, 0xa1, 0x35, 0x44, 0x4d, 0xad, 0x09, 0x37, 0x7f, /* Byte value: 0x89 */ + 0x8b, 0xdc, 0xaa, 0xf9, 0xde, 0x93, 0x64, 0x67, 0xb2, 0x47, 0x60, 0x07, 0x6c, 0x67, 0x62, 0xdc, /* Byte value: 0x8a */ + 0x3e, 0xad, 0x81, 0x76, 0x9f, 0xa5, 0x4d, 0x66, 0x1a, 0xc0, 0x29, 0x4f, 0x85, 0x66, 0x1b, 0xad, /* Byte value: 0x8b */ + 0x5a, 0xd7, 0x6f, 0x54, 0x8c, 0x68, 0x7e, 0xe9, 0x5d, 0x10, 0xc8, 0x21, 0xd1, 0xe9, 0x93, 0xd7, /* Byte value: 0x8c */ + 0xce, 0xbc, 0x64, 0x96, 0xfc, 0x48, 0xdd, 0xbd, 0xe2, 0x37, 0x5d, 0xe0, 0x1e, 0xbd, 0x1d, 0xbc, /* Byte value: 0x8d */ + 0xf7, 0x45, 0x6b, 0x15, 0x23, 0x1a, 0xfe, 0xab, 0x86, 0x04, 0x32, 0x99, 0xa5, 0xab, 0x54, 0x45, /* Byte value: 0x8e */ + 0xd2, 0x2f, 0x19, 0xc4, 0x3f, 0x12, 0xa6, 0xbe, 0xd9, 0x7d, 0x86, 0x38, 0xe6, 0xbe, 0x96, 0x2f, /* Byte value: 0x8f */ + 0x82, 0x20, 0xfb, 0x25, 0x1e, 0x49, 0xd6, 0xf7, 0x30, 0x91, 0xaa, 0x5d, 0x2e, 0xf7, 0x94, 0x20, /* Byte value: 0x90 */ + 0xb3, 0x39, 0x50, 0x5d, 0x9b, 0x27, 0x92, 0x61, 0xc4, 0xd3, 0x15, 0x74, 0x5f, 0x61, 0xb7, 0x39, /* Byte value: 0x91 */ + 0xb4, 0x6d, 0xde, 0xa8, 0xdb, 0xd0, 0xfc, 0x11, 0xba, 0x20, 0x53, 0x42, 0x61, 0x11, 0xe5, 0x6d, /* Byte value: 0x92 */ + 0xd6, 0x5f, 0x4b, 0x58, 0x12, 0x0c, 0x74, 0xfe, 0x91, 0xa4, 0xee, 0x10, 0x83, 0xfe, 0xa3, 0x5f, /* Byte value: 0x93 */ + 0xe1, 0x0e, 0x9b, 0xf2, 0x4d, 0x73, 0x8b, 0x08, 0x09, 0xb2, 0x0d, 0x05, 0x44, 0x08, 0x4e, 0x0e, /* Byte value: 0x94 */ + 0xc2, 0x2c, 0x92, 0xf1, 0x8b, 0x6a, 0x68, 0x7d, 0x3a, 0x9f, 0xe5, 0x98, 0xb1, 0x7d, 0x42, 0x2c, /* Byte value: 0x95 */ + 0x5d, 0x83, 0xe1, 0xa1, 0xcc, 0x9f, 0x10, 0x99, 0x23, 0xe3, 0x8e, 0x17, 0xef, 0x99, 0xc1, 0x83, /* Byte value: 0x96 */ + 0xfa, 0xc9, 0x68, 0x55, 0xce, 0xde, 0x9e, 0x7b, 0x4c, 0x0b, 0x90, 0xeb, 0x82, 0x7b, 0x97, 0xc9, /* Byte value: 0x97 */ + 0xa4, 0x6e, 0x55, 0x9d, 0x6f, 0xa8, 0x32, 0xd2, 0x59, 0xc2, 0x30, 0xe2, 0x36, 0xd2, 0x31, 0x6e, /* Byte value: 0x98 */ + 0x1f, 0xb7, 0xa1, 0x3b, 0xae, 0xb3, 0xc7, 0x33, 0x0d, 0x60, 0xf5, 0xc6, 0xa3, 0x33, 0xec, 0xb7, /* Byte value: 0x99 */ + 0x0c, 0x90, 0xf6, 0x67, 0x77, 0x22, 0xb5, 0xc0, 0xd8, 0xa8, 0xb8, 0x78, 0xaf, 0xc0, 0x5f, 0x90, /* Byte value: 0x9a */ + 0x01, 0x1c, 0xf5, 0x27, 0x9a, 0xe6, 0xd5, 0x10, 0x12, 0xa7, 0x1a, 0x0a, 0x88, 0x10, 0x9c, 0x1c, /* Byte value: 0x9b */ + 0x2d, 0x8a, 0xd6, 0x2a, 0x46, 0x34, 0x3f, 0x95, 0xcf, 0x08, 0x64, 0xf1, 0x89, 0x95, 0xa8, 0x8a, /* Byte value: 0x9c */ + 0x67, 0x5e, 0x32, 0x4b, 0x7e, 0x24, 0x8f, 0xbf, 0x71, 0xfa, 0xcf, 0x70, 0x0f, 0xbf, 0xef, 0x5e, /* Byte value: 0x9d */ + 0xe2, 0x2a, 0x47, 0x9b, 0x20, 0x9a, 0x37, 0x38, 0x3f, 0x98, 0x23, 0x1b, 0x1f, 0x38, 0x29, 0x2a, /* Byte value: 0x9e */ + 0x09, 0xfc, 0x51, 0xdc, 0xc0, 0xda, 0xb2, 0x90, 0x82, 0xd6, 0xca, 0x5a, 0x42, 0x90, 0xf6, 0xfc, /* Byte value: 0x9f */ + 0x57, 0x5b, 0x6c, 0x14, 0x61, 0xac, 0x1e, 0x39, 0x97, 0x1f, 0x6a, 0x53, 0xf6, 0x39, 0x50, 0x5b, /* Byte value: 0xa0 */ + 0x11, 0x1f, 0x7e, 0x12, 0x2e, 0x9e, 0x1b, 0xd3, 0xf1, 0x45, 0x79, 0xaa, 0xdf, 0xd3, 0x48, 0x1f, /* Byte value: 0xa1 */ + 0xb7, 0x49, 0x02, 0xc1, 0xb6, 0x39, 0x40, 0x21, 0x8c, 0x0a, 0x7d, 0x5c, 0x3a, 0x21, 0x82, 0x49, /* Byte value: 0xa2 */ + 0xdf, 0xa3, 0x1a, 0x84, 0xd2, 0xd6, 0xc6, 0x6e, 0x13, 0x72, 0x24, 0x4a, 0xc1, 0x6e, 0x55, 0xa3, /* Byte value: 0xa3 */ + 0x6a, 0xd2, 0x31, 0x0b, 0x93, 0xe0, 0xef, 0x6f, 0xbb, 0xf5, 0x6d, 0x02, 0x28, 0x6f, 0x2c, 0xd2, /* Byte value: 0xa4 */ + 0x93, 0x3f, 0x85, 0x37, 0x30, 0xd7, 0xcd, 0x24, 0xc1, 0xd4, 0xd3, 0xf7, 0xf1, 0x24, 0xdc, 0x3f, /* Byte value: 0xa5 */ + 0x24, 0x76, 0x87, 0xf6, 0x86, 0xee, 0x8d, 0x05, 0x4d, 0xde, 0xae, 0xab, 0xcb, 0x05, 0x5e, 0x76, /* Byte value: 0xa6 */ + 0x7f, 0xbd, 0x1d, 0x85, 0x90, 0x60, 0x26, 0xfc, 0x02, 0x69, 0x7c, 0x80, 0x92, 0xfc, 0x51, 0xbd, /* Byte value: 0xa7 */ + 0x66, 0x42, 0xc7, 0x6c, 0xe4, 0xc2, 0x5a, 0xaf, 0x63, 0x5d, 0xd5, 0x7a, 0x87, 0xaf, 0x73, 0x42, /* Byte value: 0xa8 */ + 0xfe, 0xb9, 0x3a, 0xc9, 0xe3, 0xc0, 0x4c, 0x3b, 0x04, 0xd2, 0xf8, 0xc3, 0xe7, 0x3b, 0xa2, 0xb9, /* Byte value: 0xa9 */ + 0x07, 0x54, 0x8e, 0xf5, 0x40, 0xf7, 0x6e, 0x70, 0x7e, 0xf3, 0x46, 0x36, 0x3e, 0x70, 0x52, 0x54, /* Byte value: 0xaa */ + 0x44, 0x7c, 0x3b, 0x48, 0xb8, 0x3d, 0x6c, 0xca, 0x42, 0xd7, 0x27, 0xed, 0xfa, 0xca, 0xe3, 0x7c, /* Byte value: 0xab */ + 0x3f, 0xb1, 0x74, 0x51, 0x05, 0x43, 0x98, 0x76, 0x08, 0x67, 0x33, 0x45, 0x0d, 0x76, 0x87, 0xb1, /* Byte value: 0xac */ + 0xf8, 0xf1, 0x41, 0x1b, 0x39, 0xd1, 0xf7, 0x5b, 0x68, 0x86, 0xa4, 0xff, 0x51, 0x5b, 0x6c, 0xf1, /* Byte value: 0xad */ + 0x06, 0x48, 0x7b, 0xd2, 0xda, 0x11, 0xbb, 0x60, 0x6c, 0x54, 0x5c, 0x3c, 0xb6, 0x60, 0xce, 0x48, /* Byte value: 0xae */ + 0xca, 0xcc, 0x36, 0x0a, 0xd1, 0x56, 0x0f, 0xfd, 0xaa, 0xee, 0x35, 0xc8, 0x7b, 0xfd, 0x28, 0xcc, /* Byte value: 0xaf */ + 0xad, 0x92, 0x04, 0x41, 0xaf, 0x72, 0x80, 0x42, 0xdb, 0x14, 0xfa, 0xb8, 0x74, 0x42, 0xc7, 0x92, /* Byte value: 0xb0 */ + 0x2b, 0xc2, 0xad, 0xf8, 0x9c, 0x25, 0x84, 0xf5, 0xa3, 0x5c, 0x38, 0xcd, 0x3f, 0xf5, 0x66, 0xc2, /* Byte value: 0xb1 */ + 0xae, 0xb6, 0xd8, 0x28, 0xc2, 0x9b, 0x3c, 0x72, 0xed, 0x3e, 0xd4, 0xa6, 0x2f, 0x72, 0xa0, 0xb6, /* Byte value: 0xb2 */ + 0x22, 0x3e, 0xfc, 0x24, 0x5c, 0xff, 0x36, 0x65, 0x21, 0x8a, 0xf2, 0x97, 0x7d, 0x65, 0x90, 0x3e, /* Byte value: 0xb3 */ + 0x39, 0xf9, 0x0f, 0x83, 0xdf, 0x52, 0x23, 0x16, 0x64, 0x33, 0x6f, 0x79, 0xbb, 0x16, 0x49, 0xf9, /* Byte value: 0xb4 */ + 0xde, 0xbf, 0xef, 0xa3, 0x48, 0x30, 0x13, 0x7e, 0x01, 0xd5, 0x3e, 0x40, 0x49, 0x7e, 0xc9, 0xbf, /* Byte value: 0xb5 */ + 0x1e, 0xab, 0x54, 0x1c, 0x34, 0x55, 0x12, 0x23, 0x1f, 0xc7, 0xef, 0xcc, 0x2b, 0x23, 0x70, 0xab, /* Byte value: 0xb6 */ + 0xa8, 0xfe, 0xa3, 0xfa, 0x18, 0x8a, 0x87, 0x12, 0x81, 0x6a, 0x88, 0x9a, 0x99, 0x12, 0x6e, 0xfe, /* Byte value: 0xb7 */ + 0x58, 0xef, 0x46, 0x1a, 0x7b, 0x67, 0x17, 0xc9, 0x79, 0x9d, 0xfc, 0x35, 0x02, 0xc9, 0x68, 0xef, /* Byte value: 0xb8 */ + 0x88, 0xf8, 0x76, 0x90, 0xb3, 0x7a, 0xd8, 0x57, 0x84, 0x6d, 0x4e, 0x19, 0x37, 0x57, 0x05, 0xf8, /* Byte value: 0xb9 */ + 0x9a, 0xc3, 0xd4, 0xeb, 0xf0, 0x0d, 0x7f, 0xb4, 0x43, 0x02, 0x19, 0xad, 0xb3, 0xb4, 0x2a, 0xc3, /* Byte value: 0xba */ + 0x69, 0xf6, 0xed, 0x62, 0xfe, 0x09, 0x53, 0x5f, 0x8d, 0xdf, 0x43, 0x1c, 0x73, 0x5f, 0x4b, 0xf6, /* Byte value: 0xbb */ + 0x28, 0xe6, 0x71, 0x91, 0xf1, 0xcc, 0x38, 0xc5, 0x95, 0x76, 0x16, 0xd3, 0x64, 0xc5, 0x01, 0xe6, /* Byte value: 0xbc */ + 0x65, 0x66, 0x1b, 0x05, 0x89, 0x2b, 0xe6, 0x9f, 0x55, 0x77, 0xfb, 0x64, 0xdc, 0x9f, 0x14, 0x66, /* Byte value: 0xbd */ + 0xd5, 0x7b, 0x97, 0x31, 0x7f, 0xe5, 0xc8, 0xce, 0xa7, 0x8e, 0xc0, 0x0e, 0xd8, 0xce, 0xc4, 0x7b, /* Byte value: 0xbe */ + 0x7c, 0x99, 0xc1, 0xec, 0xfd, 0x89, 0x9a, 0xcc, 0x34, 0x43, 0x52, 0x9e, 0xc9, 0xcc, 0x36, 0x99, /* Byte value: 0xbf */ + 0xbc, 0x8d, 0x7a, 0x53, 0x81, 0xec, 0x9b, 0x91, 0x2a, 0x51, 0x83, 0x12, 0xab, 0x91, 0x8f, 0x8d, /* Byte value: 0xc0 */ + 0x38, 0xe5, 0xfa, 0xa4, 0x45, 0xb4, 0xf6, 0x06, 0x76, 0x94, 0x75, 0x73, 0x33, 0x06, 0xd5, 0xe5, /* Byte value: 0xc1 */ + 0x4f, 0xb8, 0x43, 0xda, 0x8f, 0xe8, 0xb7, 0x7a, 0xe4, 0x8c, 0xd9, 0xa3, 0x6b, 0x7a, 0xee, 0xb8, /* Byte value: 0xc2 */ + 0xe0, 0x12, 0x6e, 0xd5, 0xd7, 0x95, 0x5e, 0x18, 0x1b, 0x15, 0x17, 0x0f, 0xcc, 0x18, 0xd2, 0x12, /* Byte value: 0xc3 */ + 0x27, 0x52, 0x5b, 0x9f, 0xeb, 0x07, 0x31, 0x35, 0x7b, 0xf4, 0x80, 0xb5, 0x90, 0x35, 0x39, 0x52, /* Byte value: 0xc4 */ + 0x76, 0x41, 0x4c, 0x59, 0x50, 0xba, 0x94, 0x6c, 0x80, 0xbf, 0xb6, 0xda, 0xd0, 0x6c, 0xa7, 0x41, /* Byte value: 0xc5 */ + 0x78, 0xe9, 0x93, 0x70, 0xd0, 0x97, 0x48, 0x8c, 0x7c, 0x9a, 0x3a, 0xb6, 0xac, 0x8c, 0x03, 0xe9, /* Byte value: 0xc6 */ + 0x89, 0xe4, 0x83, 0xb7, 0x29, 0x9c, 0x0d, 0x47, 0x96, 0xca, 0x54, 0x13, 0xbf, 0x47, 0x99, 0xe4, /* Byte value: 0xc7 */ + 0x8d, 0x94, 0xd1, 0x2b, 0x04, 0x82, 0xdf, 0x07, 0xde, 0x13, 0x3c, 0x3b, 0xda, 0x07, 0xac, 0x94, /* Byte value: 0xc8 */ + 0xaf, 0xaa, 0x2d, 0x0f, 0x58, 0x7d, 0xe9, 0x62, 0xff, 0x99, 0xce, 0xac, 0xa7, 0x62, 0x3c, 0xaa, /* Byte value: 0xc9 */ + 0x9f, 0xaf, 0x73, 0x50, 0x47, 0xf5, 0x78, 0xe4, 0x19, 0x7c, 0x6b, 0x8f, 0x5e, 0xe4, 0x83, 0xaf, /* Byte value: 0xca */ + 0x84, 0x68, 0x80, 0xf7, 0xc4, 0x58, 0x6d, 0x97, 0x5c, 0xc5, 0xf6, 0x61, 0x98, 0x97, 0x5a, 0x68, /* Byte value: 0xcb */ + 0xe6, 0x5a, 0x15, 0x07, 0x0d, 0x84, 0xe5, 0x78, 0x77, 0x41, 0x4b, 0x33, 0x7a, 0x78, 0x1c, 0x5a, /* Byte value: 0xcc */ + 0xf1, 0x0d, 0x10, 0xc7, 0xf9, 0x0b, 0x45, 0xcb, 0xea, 0x50, 0x6e, 0xa5, 0x13, 0xcb, 0x9a, 0x0d, /* Byte value: 0xcd */ + 0x63, 0x2e, 0x60, 0xd7, 0x53, 0x3a, 0x5d, 0xff, 0x39, 0x23, 0xa7, 0x58, 0x6a, 0xff, 0xda, 0x2e, /* Byte value: 0xce */ + 0x51, 0x13, 0x17, 0xc6, 0xbb, 0xbd, 0xa5, 0x59, 0xfb, 0x4b, 0x36, 0x6f, 0x40, 0x59, 0x9e, 0x13, /* Byte value: 0xcf */ + 0xc8, 0xf4, 0x1f, 0x44, 0x26, 0x59, 0x66, 0xdd, 0x8e, 0x63, 0x01, 0xdc, 0xa8, 0xdd, 0xd3, 0xf4, /* Byte value: 0xd0 */ + 0x03, 0x24, 0xdc, 0x69, 0x6d, 0xe9, 0xbc, 0x30, 0x36, 0x2a, 0x2e, 0x1e, 0x5b, 0x30, 0x67, 0x24, /* Byte value: 0xd1 */ + 0xed, 0x9e, 0x6d, 0x95, 0x3a, 0x51, 0x3e, 0xc8, 0xd1, 0x1a, 0xb5, 0x7d, 0xeb, 0xc8, 0x11, 0x9e, /* Byte value: 0xd2 */ + 0x70, 0x09, 0x37, 0x8b, 0x8a, 0xab, 0x2f, 0x0c, 0xec, 0xeb, 0xea, 0xe6, 0x66, 0x0c, 0x69, 0x09, /* Byte value: 0xd3 */ + 0x3c, 0x95, 0xa8, 0x38, 0x68, 0xaa, 0x24, 0x46, 0x3e, 0x4d, 0x1d, 0x5b, 0x56, 0x46, 0xe0, 0x95, /* Byte value: 0xd4 */ + 0x8e, 0xb0, 0x0d, 0x42, 0x69, 0x6b, 0x63, 0x37, 0xe8, 0x39, 0x12, 0x25, 0x81, 0x37, 0xcb, 0xb0, /* Byte value: 0xd5 */ + 0xd9, 0xeb, 0x61, 0x56, 0x08, 0xc7, 0x7d, 0x0e, 0x7f, 0x26, 0x78, 0x76, 0x77, 0x0e, 0x9b, 0xeb, /* Byte value: 0xd6 */ + 0x10, 0x03, 0x8b, 0x35, 0xb4, 0x78, 0xce, 0xc3, 0xe3, 0xe2, 0x63, 0xa0, 0x57, 0xc3, 0xd4, 0x03, /* Byte value: 0xd7 */ + 0x1a, 0xdb, 0x06, 0x80, 0x19, 0x4b, 0xc0, 0x63, 0x57, 0x1e, 0x87, 0xe4, 0x4e, 0x63, 0x45, 0xdb, /* Byte value: 0xd8 */ + 0x9d, 0x97, 0x5a, 0x1e, 0xb0, 0xfa, 0x11, 0xc4, 0x3d, 0xf1, 0x5f, 0x9b, 0x8d, 0xc4, 0x78, 0x97, /* Byte value: 0xd9 */ + 0xee, 0xba, 0xb1, 0xfc, 0x57, 0xb8, 0x82, 0xf8, 0xe7, 0x30, 0x9b, 0x63, 0xb0, 0xf8, 0x76, 0xba, /* Byte value: 0xda */ + 0xcb, 0xd0, 0xc3, 0x2d, 0x4b, 0xb0, 0xda, 0xed, 0xb8, 0x49, 0x2f, 0xc2, 0xf3, 0xed, 0xb4, 0xd0, /* Byte value: 0xdb */ + 0x97, 0x4f, 0xd7, 0xab, 0x1d, 0xc9, 0x1f, 0x64, 0x89, 0x0d, 0xbb, 0xdf, 0x94, 0x64, 0xe9, 0x4f, /* Byte value: 0xdc */ + 0xc9, 0xe8, 0xea, 0x63, 0xbc, 0xbf, 0xb3, 0xcd, 0x9c, 0xc4, 0x1b, 0xd6, 0x20, 0xcd, 0x4f, 0xe8, /* Byte value: 0xdd */ + 0x79, 0xf5, 0x66, 0x57, 0x4a, 0x71, 0x9d, 0x9c, 0x6e, 0x3d, 0x20, 0xbc, 0x24, 0x9c, 0x9f, 0xf5, /* Byte value: 0xde */ + 0xb2, 0x25, 0xa5, 0x7a, 0x01, 0xc1, 0x47, 0x71, 0xd6, 0x74, 0x0f, 0x7e, 0xd7, 0x71, 0x2b, 0x25, /* Byte value: 0xdf */ + 0x35, 0x69, 0xf9, 0xe4, 0xa8, 0x70, 0x96, 0xd6, 0xbc, 0x9b, 0xd7, 0x01, 0x14, 0xd6, 0x16, 0x69, /* Byte value: 0xe0 */ + 0x6c, 0x9a, 0x4a, 0xd9, 0x49, 0xf1, 0x54, 0x0f, 0xd7, 0xa1, 0x31, 0x3e, 0x9e, 0x0f, 0xe2, 0x9a, /* Byte value: 0xe1 */ + 0x9c, 0x8b, 0xaf, 0x39, 0x2a, 0x1c, 0xc4, 0xd4, 0x2f, 0x56, 0x45, 0x91, 0x05, 0xd4, 0xe4, 0x8b, /* Byte value: 0xe2 */ + 0x1b, 0xc7, 0xf3, 0xa7, 0x83, 0xad, 0x15, 0x73, 0x45, 0xb9, 0x9d, 0xee, 0xc6, 0x73, 0xd9, 0xc7, /* Byte value: 0xe3 */ + 0x05, 0x6c, 0xa7, 0xbb, 0xb7, 0xf8, 0x07, 0x50, 0x5a, 0x7e, 0x72, 0x22, 0xed, 0x50, 0xa9, 0x6c, /* Byte value: 0xe4 */ + 0x50, 0x0f, 0xe2, 0xe1, 0x21, 0x5b, 0x70, 0x49, 0xe9, 0xec, 0x2c, 0x65, 0xc8, 0x49, 0x02, 0x0f, /* Byte value: 0xe5 */ + 0xf0, 0x11, 0xe5, 0xe0, 0x63, 0xed, 0x90, 0xdb, 0xf8, 0xf7, 0x74, 0xaf, 0x9b, 0xdb, 0x06, 0x11, /* Byte value: 0xe6 */ + 0xd1, 0x0b, 0xc5, 0xad, 0x52, 0xfb, 0x1a, 0x8e, 0xef, 0x57, 0xa8, 0x26, 0xbd, 0x8e, 0xf1, 0x0b, /* Byte value: 0xe7 */ + 0x12, 0x3b, 0xa2, 0x7b, 0x43, 0x77, 0xa7, 0xe3, 0xc7, 0x6f, 0x57, 0xb4, 0x84, 0xe3, 0x2f, 0x3b, /* Byte value: 0xe8 */ + 0x87, 0x4c, 0x5c, 0x9e, 0xa9, 0xb1, 0xd1, 0xa7, 0x6a, 0xef, 0xd8, 0x7f, 0xc3, 0xa7, 0x3d, 0x4c, /* Byte value: 0xe9 */ + 0x08, 0xe0, 0xa4, 0xfb, 0x5a, 0x3c, 0x67, 0x80, 0x90, 0x71, 0xd0, 0x50, 0xca, 0x80, 0x6a, 0xe0, /* Byte value: 0xea */ + 0x59, 0xf3, 0xb3, 0x3d, 0xe1, 0x81, 0xc2, 0xd9, 0x6b, 0x3a, 0xe6, 0x3f, 0x8a, 0xd9, 0xf4, 0xf3, /* Byte value: 0xeb */ + 0xfc, 0x81, 0x13, 0x87, 0x14, 0xcf, 0x25, 0x1b, 0x20, 0x5f, 0xcc, 0xd7, 0x34, 0x1b, 0x59, 0x81, /* Byte value: 0xec */ + 0x21, 0x1a, 0x20, 0x4d, 0x31, 0x16, 0x8a, 0x55, 0x17, 0xa0, 0xdc, 0x89, 0x26, 0x55, 0xf7, 0x1a, /* Byte value: 0xed */ + 0x85, 0x74, 0x75, 0xd0, 0x5e, 0xbe, 0xb8, 0x87, 0x4e, 0x62, 0xec, 0x6b, 0x10, 0x87, 0xc6, 0x74, /* Byte value: 0xee */ + 0x55, 0x63, 0x45, 0x5a, 0x96, 0xa3, 0x77, 0x19, 0xb3, 0x92, 0x5e, 0x47, 0x25, 0x19, 0xab, 0x63, /* Byte value: 0xef */ + 0x4e, 0xa4, 0xb6, 0xfd, 0x15, 0x0e, 0x62, 0x6a, 0xf6, 0x2b, 0xc3, 0xa9, 0xe3, 0x6a, 0x72, 0xa4, /* Byte value: 0xf0 */ + 0xec, 0x82, 0x98, 0xb2, 0xa0, 0xb7, 0xeb, 0xd8, 0xc3, 0xbd, 0xaf, 0x77, 0x63, 0xd8, 0x8d, 0x82, /* Byte value: 0xf1 */ + 0xfb, 0xd5, 0x9d, 0x72, 0x54, 0x38, 0x4b, 0x6b, 0x5e, 0xac, 0x8a, 0xe1, 0x0a, 0x6b, 0x0b, 0xd5, /* Byte value: 0xf2 */ + 0x36, 0x4d, 0x25, 0x8d, 0xc5, 0x99, 0x2a, 0xe6, 0x8a, 0xb1, 0xf9, 0x1f, 0x4f, 0xe6, 0x71, 0x4d, /* Byte value: 0xf3 */ + 0x75, 0x65, 0x90, 0x30, 0x3d, 0x53, 0x28, 0x5c, 0xb6, 0x95, 0x98, 0xc4, 0x8b, 0x5c, 0xc0, 0x65, /* Byte value: 0xf4 */ + 0x37, 0x51, 0xd0, 0xaa, 0x5f, 0x7f, 0xff, 0xf6, 0x98, 0x16, 0xe3, 0x15, 0xc7, 0xf6, 0xed, 0x51, /* Byte value: 0xf5 */ + 0x5c, 0x9f, 0x14, 0x86, 0x56, 0x79, 0xc5, 0x89, 0x31, 0x44, 0x94, 0x1d, 0x67, 0x89, 0x5d, 0x9f, /* Byte value: 0xf6 */ + 0xf6, 0x59, 0x9e, 0x32, 0xb9, 0xfc, 0x2b, 0xbb, 0x94, 0xa3, 0x28, 0x93, 0x2d, 0xbb, 0xc8, 0x59, /* Byte value: 0xf7 */ + 0xf4, 0x61, 0xb7, 0x7c, 0x4e, 0xf3, 0x42, 0x9b, 0xb0, 0x2e, 0x1c, 0x87, 0xfe, 0x9b, 0x33, 0x61, /* Byte value: 0xf8 */ + 0xcd, 0x98, 0xb8, 0xff, 0x91, 0xa1, 0x61, 0x8d, 0xd4, 0x1d, 0x73, 0xfe, 0x45, 0x8d, 0x7a, 0x98, /* Byte value: 0xf9 */ + 0x6b, 0xce, 0xc4, 0x2c, 0x09, 0x06, 0x3a, 0x7f, 0xa9, 0x52, 0x77, 0x08, 0xa0, 0x7f, 0xb0, 0xce, /* Byte value: 0xfa */ + 0xa2, 0x26, 0x2e, 0x4f, 0xb5, 0xb9, 0x89, 0xb2, 0x35, 0x96, 0x6c, 0xde, 0x80, 0xb2, 0xff, 0x26, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0xaa, 0xc6, 0x8a, 0xb4, 0xef, 0x85, 0xee, 0x32, 0xa5, 0xe7, 0xbc, 0x8e, 0x4a, 0x32, 0x95, 0xc6, /* Byte value: 0xfd */ + 0x71, 0x15, 0xc2, 0xac, 0x10, 0x4d, 0xfa, 0x1c, 0xfe, 0x4c, 0xf0, 0xec, 0xee, 0x1c, 0xf5, 0x15, /* Byte value: 0xfe */ + 0x42, 0x34, 0x40, 0x9a, 0x62, 0x2c, 0xd7, 0xaa, 0x2e, 0x83, 0x7b, 0xd1, 0x4c, 0xaa, 0x2d, 0x34, /* Byte value: 0xff */ + + /* Matrix row: 14 */ + 0x47, 0x52, 0xd9, 0xd2, 0x69, 0x81, 0x42, 0x4a, 0x4e, 0xe7, 0x53, 0x5d, 0xa9, 0x30, 0x47, 0x7c, /* Byte value: 0x00 */ + 0xe9, 0xdb, 0x31, 0x5c, 0x2e, 0xdf, 0x12, 0x97, 0x34, 0x3f, 0x83, 0x15, 0x0b, 0x98, 0xe9, 0x1c, /* Byte value: 0x01 */ + 0x8f, 0x26, 0xbe, 0x4a, 0x25, 0x12, 0xca, 0xbc, 0x87, 0xf8, 0x58, 0xe9, 0x7f, 0xf7, 0x8f, 0x8c, /* Byte value: 0x02 */ + 0x4e, 0x4a, 0xa1, 0x54, 0x2a, 0x05, 0x39, 0xe1, 0x8d, 0xb6, 0x51, 0xd3, 0x3b, 0x95, 0x4e, 0x2e, /* Byte value: 0x03 */ + 0x03, 0x45, 0x92, 0x77, 0xda, 0xb6, 0xd2, 0x78, 0x2d, 0xdc, 0xc1, 0xf5, 0xf1, 0x7a, 0x03, 0x9c, /* Byte value: 0x04 */ + 0xcf, 0x7c, 0x4f, 0x5b, 0xcc, 0xef, 0xa1, 0x2e, 0x88, 0x91, 0xb4, 0xce, 0x19, 0xa4, 0xcf, 0x7f, /* Byte value: 0x05 */ + 0x0c, 0xd7, 0x0d, 0x1f, 0xee, 0x9d, 0xce, 0x23, 0xb4, 0xf6, 0x82, 0x52, 0x42, 0x2b, 0x0c, 0x35, /* Byte value: 0x06 */ + 0xba, 0x33, 0xff, 0xaf, 0xb6, 0x3a, 0xc1, 0xb8, 0x65, 0x01, 0x95, 0xbe, 0x64, 0xd5, 0xba, 0x3f, /* Byte value: 0x07 */ + 0x12, 0x30, 0xf0, 0xcf, 0x86, 0xcb, 0xf6, 0x95, 0x45, 0xa2, 0x04, 0xdf, 0xe7, 0x89, 0x12, 0xa4, /* Byte value: 0x08 */ + 0xf0, 0x34, 0xe4, 0x4f, 0xc6, 0xf5, 0x03, 0xf9, 0x84, 0xe5, 0xba, 0xe2, 0x61, 0x59, 0xf0, 0x02, /* Byte value: 0x09 */ + 0x2b, 0xf2, 0xbc, 0x35, 0xfb, 0x7e, 0x33, 0xb2, 0x13, 0xad, 0x4b, 0xda, 0xbe, 0x80, 0x2b, 0x22, /* Byte value: 0x0a */ + 0x2c, 0xfa, 0x94, 0xf6, 0x7b, 0x02, 0x1a, 0x6a, 0x52, 0x23, 0xf4, 0xa0, 0x71, 0xe3, 0x2c, 0xad, /* Byte value: 0x0b */ + 0x32, 0x1d, 0x69, 0x26, 0x13, 0x54, 0x22, 0xdc, 0xa3, 0x77, 0x72, 0x2d, 0xd4, 0x41, 0x32, 0x3c, /* Byte value: 0x0c */ + 0x1b, 0x28, 0x88, 0x49, 0xc5, 0x4f, 0x8d, 0x3e, 0x86, 0xf3, 0x06, 0x51, 0x75, 0x2c, 0x1b, 0xf6, /* Byte value: 0x0d */ + 0xd2, 0xde, 0x20, 0xfc, 0x7e, 0x0f, 0x4b, 0xe0, 0x54, 0x19, 0xf3, 0xb6, 0x4d, 0x7c, 0xd2, 0x72, /* Byte value: 0x0e */ + 0x08, 0x9a, 0xb7, 0xab, 0xb4, 0x57, 0x35, 0x83, 0xd8, 0xa4, 0xfc, 0xdd, 0x7c, 0x32, 0x08, 0x26, /* Byte value: 0x0f */ + 0xdd, 0x4c, 0xbf, 0x94, 0x4a, 0x24, 0x57, 0xbb, 0xcd, 0x33, 0xb0, 0x11, 0xfe, 0x2d, 0xdd, 0xdb, /* Byte value: 0x10 */ + 0x60, 0x77, 0x68, 0xf8, 0x7c, 0x62, 0xbf, 0xdb, 0xe9, 0xbc, 0x9a, 0xd5, 0x55, 0x9b, 0x60, 0x6b, /* Byte value: 0x11 */ + 0x72, 0x47, 0x98, 0x37, 0xfa, 0xa9, 0x49, 0x4e, 0xac, 0x1e, 0x9e, 0x0a, 0xb2, 0x12, 0x72, 0xcf, /* Byte value: 0x12 */ + 0x11, 0x75, 0x62, 0xb8, 0x5c, 0x7d, 0x24, 0xed, 0x68, 0x7e, 0xc5, 0x2a, 0x16, 0xf3, 0x11, 0x38, /* Byte value: 0x13 */ + 0x06, 0x8a, 0xe7, 0xee, 0x77, 0xaf, 0x67, 0xf0, 0x5a, 0x7b, 0x41, 0x29, 0x21, 0xf4, 0x06, 0xfb, /* Byte value: 0x14 */ + 0x5d, 0xf8, 0x9e, 0xb6, 0x5b, 0x1d, 0x81, 0x5c, 0xd3, 0xe1, 0xab, 0x5f, 0x32, 0x8b, 0x5d, 0xfe, /* Byte value: 0x15 */ + 0xe0, 0xc3, 0x49, 0xda, 0x6d, 0x5b, 0x69, 0x3c, 0xf7, 0x6e, 0x81, 0x9b, 0x99, 0x3d, 0xe0, 0x4e, /* Byte value: 0x16 */ + 0x86, 0x3e, 0xc6, 0xcc, 0x66, 0x96, 0xb1, 0x17, 0x44, 0xa9, 0x5a, 0x67, 0xed, 0x52, 0x86, 0xde, /* Byte value: 0x17 */ + 0xaa, 0xc4, 0x52, 0x3a, 0x1d, 0x94, 0xab, 0x7d, 0x16, 0x8a, 0xae, 0xc7, 0x9c, 0xb1, 0xaa, 0x73, /* Byte value: 0x18 */ + 0x58, 0x37, 0xeb, 0x2f, 0xf6, 0x04, 0x34, 0xd4, 0xa4, 0x46, 0x2b, 0x83, 0xe2, 0x05, 0x58, 0x99, /* Byte value: 0x19 */ + 0x24, 0x60, 0x23, 0x5d, 0xcf, 0x55, 0x2f, 0xe9, 0x8a, 0x87, 0x08, 0x7d, 0x0d, 0xd1, 0x24, 0x8b, /* Byte value: 0x1a */ + 0xdf, 0x8b, 0xe2, 0xce, 0x67, 0x41, 0xcb, 0xeb, 0xfb, 0x1a, 0x8f, 0xb7, 0xe1, 0xc0, 0xdf, 0x33, /* Byte value: 0x1b */ + 0x69, 0x6f, 0x10, 0x7e, 0x3f, 0xe6, 0xc4, 0x70, 0x2a, 0xed, 0x98, 0x5b, 0xc7, 0x3e, 0x69, 0x39, /* Byte value: 0x1c */ + 0x7a, 0xdd, 0x2f, 0x9c, 0x4e, 0xfe, 0x7c, 0xcd, 0x74, 0xba, 0x62, 0xd7, 0xce, 0x20, 0x7a, 0xe9, /* Byte value: 0x1d */ + 0x67, 0x7f, 0x40, 0x3b, 0xfc, 0x1e, 0x96, 0x03, 0xa8, 0x32, 0x25, 0xaf, 0x9a, 0xf8, 0x67, 0xe4, /* Byte value: 0x1e */ + 0xec, 0x14, 0x44, 0xc5, 0x83, 0xc6, 0xa7, 0x1f, 0x43, 0x98, 0x03, 0xc9, 0xdb, 0x16, 0xec, 0x7b, /* Byte value: 0x1f */ + 0x30, 0xda, 0x34, 0x7c, 0x3e, 0x31, 0xbe, 0x8c, 0x95, 0x5e, 0x4d, 0x8b, 0xcb, 0xac, 0x30, 0xd4, /* Byte value: 0x20 */ + 0x6a, 0x2a, 0x82, 0x09, 0xe5, 0x50, 0x16, 0x08, 0x07, 0x31, 0x59, 0xae, 0x36, 0x44, 0x6a, 0xa5, /* Byte value: 0x21 */ + 0x0e, 0x10, 0x50, 0x45, 0xc3, 0xf8, 0x52, 0x73, 0x82, 0xdf, 0xbd, 0xf4, 0x5d, 0xc6, 0x0e, 0xdd, /* Byte value: 0x22 */ + 0x43, 0x1f, 0x63, 0x66, 0x33, 0x4b, 0xb9, 0xea, 0x22, 0xb5, 0x2d, 0xd2, 0x97, 0x29, 0x43, 0x6f, /* Byte value: 0x23 */ + 0x2d, 0x78, 0x5b, 0xdb, 0x8c, 0xd1, 0x54, 0x42, 0x49, 0xd6, 0x0a, 0xf3, 0x9f, 0x74, 0x2d, 0xd9, /* Byte value: 0x24 */ + 0xb3, 0x2b, 0x87, 0x29, 0xf5, 0xbe, 0xba, 0x13, 0xa6, 0x50, 0x97, 0x30, 0xf6, 0x70, 0xb3, 0x6d, /* Byte value: 0x25 */ + 0xe4, 0x8e, 0xf3, 0x6e, 0x37, 0x91, 0x92, 0x9c, 0x9b, 0x3c, 0xff, 0x14, 0xa7, 0x24, 0xe4, 0x5d, /* Byte value: 0x26 */ + 0x22, 0xea, 0xc4, 0xb3, 0xb8, 0xfa, 0x48, 0x19, 0xd0, 0xfc, 0x49, 0x54, 0x2c, 0x25, 0x22, 0x70, /* Byte value: 0x27 */ + 0xab, 0x46, 0x9d, 0x17, 0xea, 0x47, 0xe5, 0x55, 0x0d, 0x7f, 0x50, 0x94, 0x72, 0x26, 0xab, 0x07, /* Byte value: 0x28 */ + 0x3d, 0x8f, 0xf6, 0x4e, 0x27, 0x7f, 0x3e, 0x87, 0x3a, 0x5d, 0x31, 0x8a, 0x67, 0x10, 0x3d, 0x95, /* Byte value: 0x29 */ + 0x34, 0x97, 0x8e, 0xc8, 0x64, 0xfb, 0x45, 0x2c, 0xf9, 0x0c, 0x33, 0x04, 0xf5, 0xb5, 0x34, 0xc7, /* Byte value: 0x2a */ + 0x90, 0x43, 0x8c, 0xb7, 0xba, 0x97, 0xbc, 0x22, 0x6d, 0x59, 0x20, 0x37, 0x34, 0xc2, 0x90, 0x69, /* Byte value: 0x2b */ + 0x97, 0x4b, 0xa4, 0x74, 0x3a, 0xeb, 0x95, 0xfa, 0x2c, 0xd7, 0x9f, 0x4d, 0xfb, 0xa1, 0x97, 0xe6, /* Byte value: 0x2c */ + 0xb0, 0x6e, 0x15, 0x5e, 0x2f, 0x08, 0x68, 0x6b, 0x8b, 0x8c, 0x56, 0xc5, 0x07, 0x0a, 0xb0, 0xf1, /* Byte value: 0x2d */ + 0xe5, 0x0c, 0x3c, 0x43, 0xc0, 0x42, 0xdc, 0xb4, 0x80, 0xc9, 0x01, 0x47, 0x49, 0xb3, 0xe5, 0x29, /* Byte value: 0x2e */ + 0x42, 0x9d, 0xac, 0x4b, 0xc4, 0x98, 0xf7, 0xc2, 0x39, 0x40, 0xd3, 0x81, 0x79, 0xbe, 0x42, 0x1b, /* Byte value: 0x2f */ + 0x79, 0x98, 0xbd, 0xeb, 0x94, 0x48, 0xae, 0xb5, 0x59, 0x66, 0xa3, 0x22, 0x3f, 0x5a, 0x79, 0x75, /* Byte value: 0x30 */ + 0xc0, 0xee, 0xd0, 0x33, 0xf8, 0xc4, 0xbd, 0x75, 0x11, 0xbb, 0xf7, 0x69, 0xaa, 0xf5, 0xc0, 0xd6, /* Byte value: 0x31 */ + 0x18, 0x6d, 0x1a, 0x3e, 0x1f, 0xf9, 0x5f, 0x46, 0xab, 0x2f, 0xc7, 0xa4, 0x84, 0x56, 0x18, 0x6a, /* Byte value: 0x32 */ + 0x4b, 0x85, 0xd4, 0xcd, 0x87, 0x1c, 0x8c, 0x69, 0xfa, 0x11, 0xd1, 0x0f, 0xeb, 0x1b, 0x4b, 0x49, /* Byte value: 0x33 */ + 0xf7, 0x3c, 0xcc, 0x8c, 0x46, 0x89, 0x2a, 0x21, 0xc5, 0x6b, 0x05, 0x98, 0xae, 0x3a, 0xf7, 0x8d, /* Byte value: 0x34 */ + 0xb8, 0xf4, 0xa2, 0xf5, 0x9b, 0x5f, 0x5d, 0xe8, 0x53, 0x28, 0xaa, 0x18, 0x7b, 0x38, 0xb8, 0xd7, /* Byte value: 0x35 */ + 0xa6, 0x13, 0x5f, 0x25, 0xf3, 0x09, 0x65, 0x5e, 0xa2, 0x7c, 0x2c, 0x95, 0xde, 0x9a, 0xa6, 0x46, /* Byte value: 0x36 */ + 0x59, 0xb5, 0x24, 0x02, 0x01, 0xd7, 0x7a, 0xfc, 0xbf, 0xb3, 0xd5, 0xd0, 0x0c, 0x92, 0x59, 0xed, /* Byte value: 0x37 */ + 0x64, 0x3a, 0xd2, 0x4c, 0x26, 0xa8, 0x44, 0x7b, 0x85, 0xee, 0xe4, 0x5a, 0x6b, 0x82, 0x64, 0x78, /* Byte value: 0x38 */ + 0x36, 0x50, 0xd3, 0x92, 0x49, 0x9e, 0xd9, 0x7c, 0xcf, 0x25, 0x0c, 0xa2, 0xea, 0x58, 0x36, 0x2f, /* Byte value: 0x39 */ + 0xb4, 0x23, 0xaf, 0xea, 0x75, 0xc2, 0x93, 0xcb, 0xe7, 0xde, 0x28, 0x4a, 0x39, 0x13, 0xb4, 0xe2, /* Byte value: 0x3a */ + 0x81, 0x36, 0xee, 0x0f, 0xe6, 0xea, 0x98, 0xcf, 0x05, 0x27, 0xe5, 0x1d, 0x22, 0x31, 0x81, 0x51, /* Byte value: 0x3b */ + 0x09, 0x18, 0x78, 0x86, 0x43, 0x84, 0x7b, 0xab, 0xc3, 0x51, 0x02, 0x8e, 0x92, 0xa5, 0x09, 0x52, /* Byte value: 0x3c */ + 0x78, 0x1a, 0x72, 0xc6, 0x63, 0x9b, 0xe0, 0x9d, 0x42, 0x93, 0x5d, 0x71, 0xd1, 0xcd, 0x78, 0x01, /* Byte value: 0x3d */ + 0xed, 0x96, 0x8b, 0xe8, 0x74, 0x15, 0xe9, 0x37, 0x58, 0x6d, 0xfd, 0x9a, 0x35, 0x81, 0xed, 0x0f, /* Byte value: 0x3e */ + 0x5f, 0x3f, 0xc3, 0xec, 0x76, 0x78, 0x1d, 0x0c, 0xe5, 0xc8, 0x94, 0xf9, 0x2d, 0x66, 0x5f, 0x16, /* Byte value: 0x3f */ + 0xda, 0x44, 0x97, 0x57, 0xca, 0x58, 0x7e, 0x63, 0x8c, 0xbd, 0x0f, 0x6b, 0x31, 0x4e, 0xda, 0x54, /* Byte value: 0x40 */ + 0xc4, 0xa3, 0x6a, 0x87, 0xa2, 0x0e, 0x46, 0xd5, 0x7d, 0xe9, 0x89, 0xe6, 0x94, 0xec, 0xc4, 0xc5, /* Byte value: 0x41 */ + 0x29, 0x35, 0xe1, 0x6f, 0xd6, 0x1b, 0xaf, 0xe2, 0x25, 0x84, 0x74, 0x7c, 0xa1, 0x6d, 0x29, 0xca, /* Byte value: 0x42 */ + 0xad, 0xcc, 0x7a, 0xf9, 0x9d, 0xe8, 0x82, 0xa5, 0x57, 0x04, 0x11, 0xbd, 0x53, 0xd2, 0xad, 0xfc, /* Byte value: 0x43 */ + 0x07, 0x08, 0x28, 0xc3, 0x80, 0x7c, 0x29, 0xd8, 0x41, 0x8e, 0xbf, 0x7a, 0xcf, 0x63, 0x07, 0x8f, /* Byte value: 0x44 */ + 0x82, 0x73, 0x7c, 0x78, 0x3c, 0x5c, 0x4a, 0xb7, 0x28, 0xfb, 0x24, 0xe8, 0xd3, 0x4b, 0x82, 0xcd, /* Byte value: 0x45 */ + 0xe2, 0x04, 0x14, 0x80, 0x40, 0x3e, 0xf5, 0x6c, 0xc1, 0x47, 0xbe, 0x3d, 0x86, 0xd0, 0xe2, 0xa6, /* Byte value: 0x46 */ + 0x31, 0x58, 0xfb, 0x51, 0xc9, 0xe2, 0xf0, 0xa4, 0x8e, 0xab, 0xb3, 0xd8, 0x25, 0x3b, 0x31, 0xa0, /* Byte value: 0x47 */ + 0x17, 0xff, 0x85, 0x56, 0x2b, 0xd2, 0x43, 0x1d, 0x32, 0x05, 0x84, 0x03, 0x37, 0x07, 0x17, 0xc3, /* Byte value: 0x48 */ + 0x9f, 0xd1, 0x13, 0xdf, 0x8e, 0xbc, 0xa0, 0x79, 0xf4, 0x73, 0x63, 0x90, 0x87, 0x93, 0x9f, 0xc0, /* Byte value: 0x49 */ + 0x0b, 0xdf, 0x25, 0xdc, 0x6e, 0xe1, 0xe7, 0xfb, 0xf5, 0x78, 0x3d, 0x28, 0x8d, 0x48, 0x0b, 0xba, /* Byte value: 0x4a */ + 0x16, 0x7d, 0x4a, 0x7b, 0xdc, 0x01, 0x0d, 0x35, 0x29, 0xf0, 0x7a, 0x50, 0xd9, 0x90, 0x16, 0xb7, /* Byte value: 0x4b */ + 0x7f, 0x12, 0x5a, 0x05, 0xe3, 0xe7, 0xc9, 0x45, 0x03, 0x1d, 0xe2, 0x0b, 0x1e, 0xae, 0x7f, 0x8e, /* Byte value: 0x4c */ + 0x23, 0x68, 0x0b, 0x9e, 0x4f, 0x29, 0x06, 0x31, 0xcb, 0x09, 0xb7, 0x07, 0xc2, 0xb2, 0x23, 0x04, /* Byte value: 0x4d */ + 0x6b, 0xa8, 0x4d, 0x24, 0x12, 0x83, 0x58, 0x20, 0x1c, 0xc4, 0xa7, 0xfd, 0xd8, 0xd3, 0x6b, 0xd1, /* Byte value: 0x4e */ + 0xa9, 0x81, 0xc0, 0x4d, 0xc7, 0x22, 0x79, 0x05, 0x3b, 0x56, 0x6f, 0x32, 0x6d, 0xcb, 0xa9, 0xef, /* Byte value: 0x4f */ + 0x8b, 0x6b, 0x04, 0xfe, 0x7f, 0xd8, 0x31, 0x1c, 0xeb, 0xaa, 0x26, 0x66, 0x41, 0xee, 0x8b, 0x9f, /* Byte value: 0x50 */ + 0xb7, 0x66, 0x3d, 0x9d, 0xaf, 0x74, 0x41, 0xb3, 0xca, 0x02, 0xe9, 0xbf, 0xc8, 0x69, 0xb7, 0x7e, /* Byte value: 0x51 */ + 0x13, 0xb2, 0x3f, 0xe2, 0x71, 0x18, 0xb8, 0xbd, 0x5e, 0x57, 0xfa, 0x8c, 0x09, 0x1e, 0x13, 0xd0, /* Byte value: 0x52 */ + 0x1c, 0x20, 0xa0, 0x8a, 0x45, 0x33, 0xa4, 0xe6, 0xc7, 0x7d, 0xb9, 0x2b, 0xba, 0x4f, 0x1c, 0x79, /* Byte value: 0x53 */ + 0xfb, 0xeb, 0xc1, 0x93, 0xa8, 0x14, 0xe4, 0x02, 0x71, 0x9d, 0x87, 0xca, 0xec, 0x11, 0xfb, 0xb8, /* Byte value: 0x54 */ + 0x62, 0xb0, 0x35, 0xa2, 0x51, 0x07, 0x23, 0x8b, 0xdf, 0x95, 0xa5, 0x73, 0x4a, 0x76, 0x62, 0x83, /* Byte value: 0x55 */ + 0xf2, 0xf3, 0xb9, 0x15, 0xeb, 0x90, 0x9f, 0xa9, 0xb2, 0xcc, 0x85, 0x44, 0x7e, 0xb4, 0xf2, 0xea, /* Byte value: 0x56 */ + 0x3b, 0x05, 0x11, 0xa0, 0x50, 0xd0, 0x59, 0x77, 0x60, 0x26, 0x70, 0xa3, 0x46, 0xe4, 0x3b, 0x6e, /* Byte value: 0x57 */ + 0x9a, 0x1e, 0x66, 0x46, 0x23, 0xa5, 0x15, 0xf1, 0x83, 0xd4, 0xe3, 0x4c, 0x57, 0x1d, 0x9a, 0xa7, /* Byte value: 0x58 */ + 0x75, 0x4f, 0xb0, 0xf4, 0x7a, 0xd5, 0x60, 0x96, 0xed, 0x90, 0x21, 0x70, 0x7d, 0x71, 0x75, 0x40, /* Byte value: 0x59 */ + 0xea, 0x9e, 0xa3, 0x2b, 0xf4, 0x69, 0xc0, 0xef, 0x19, 0xe3, 0x42, 0xe0, 0xfa, 0xe2, 0xea, 0x80, /* Byte value: 0x5a */ + 0xd0, 0x19, 0x7d, 0xa6, 0x53, 0x6a, 0xd7, 0xb0, 0x62, 0x30, 0xcc, 0x10, 0x52, 0x91, 0xd0, 0x9a, /* Byte value: 0x5b */ + 0x2a, 0x70, 0x73, 0x18, 0x0c, 0xad, 0x7d, 0x9a, 0x08, 0x58, 0xb5, 0x89, 0x50, 0x17, 0x2a, 0x56, /* Byte value: 0x5c */ + 0x91, 0xc1, 0x43, 0x9a, 0x4d, 0x44, 0xf2, 0x0a, 0x76, 0xac, 0xde, 0x64, 0xda, 0x55, 0x91, 0x1d, /* Byte value: 0x5d */ + 0x02, 0xc7, 0x5d, 0x5a, 0x2d, 0x65, 0x9c, 0x50, 0x36, 0x29, 0x3f, 0xa6, 0x1f, 0xed, 0x02, 0xe8, /* Byte value: 0x5e */ + 0x46, 0xd0, 0x16, 0xff, 0x9e, 0x52, 0x0c, 0x62, 0x55, 0x12, 0xad, 0x0e, 0x47, 0xa7, 0x46, 0x08, /* Byte value: 0x5f */ + 0xa7, 0x91, 0x90, 0x08, 0x04, 0xda, 0x2b, 0x76, 0xb9, 0x89, 0xd2, 0xc6, 0x30, 0x0d, 0xa7, 0x32, /* Byte value: 0x60 */ + 0xdc, 0xce, 0x70, 0xb9, 0xbd, 0xf7, 0x19, 0x93, 0xd6, 0xc6, 0x4e, 0x42, 0x10, 0xba, 0xdc, 0xaf, /* Byte value: 0x61 */ + 0x27, 0x25, 0xb1, 0x2a, 0x15, 0xe3, 0xfd, 0x91, 0xa7, 0x5b, 0xc9, 0x88, 0xfc, 0xab, 0x27, 0x17, /* Byte value: 0x62 */ + 0x76, 0x0a, 0x22, 0x83, 0xa0, 0x63, 0xb2, 0xee, 0xc0, 0x4c, 0xe0, 0x85, 0x8c, 0x0b, 0x76, 0xdc, /* Byte value: 0x63 */ + 0xa4, 0xd4, 0x02, 0x7f, 0xde, 0x6c, 0xf9, 0x0e, 0x94, 0x55, 0x13, 0x33, 0xc1, 0x77, 0xa4, 0xae, /* Byte value: 0x64 */ + 0xca, 0xb3, 0x3a, 0xc2, 0x61, 0xf6, 0x14, 0xa6, 0xff, 0x36, 0x34, 0x12, 0xc9, 0x2a, 0xca, 0x18, /* Byte value: 0x65 */ + 0x96, 0xc9, 0x6b, 0x59, 0xcd, 0x38, 0xdb, 0xd2, 0x37, 0x22, 0x61, 0x1e, 0x15, 0x36, 0x96, 0x92, /* Byte value: 0x66 */ + 0x70, 0x80, 0xc5, 0x6d, 0xd7, 0xcc, 0xd5, 0x1e, 0x9a, 0x37, 0xa1, 0xac, 0xad, 0xff, 0x70, 0x27, /* Byte value: 0x67 */ + 0x54, 0xe0, 0xe6, 0x30, 0x18, 0x99, 0xfa, 0xf7, 0x10, 0xb0, 0xa9, 0xd1, 0xa0, 0x2e, 0x54, 0xac, /* Byte value: 0x68 */ + 0xe1, 0x41, 0x86, 0xf7, 0x9a, 0x88, 0x27, 0x14, 0xec, 0x9b, 0x7f, 0xc8, 0x77, 0xaa, 0xe1, 0x3a, /* Byte value: 0x69 */ + 0x6f, 0xe5, 0xf7, 0x90, 0x48, 0x49, 0xa3, 0x80, 0x70, 0x96, 0xd9, 0x72, 0xe6, 0xca, 0x6f, 0xc2, /* Byte value: 0x6a */ + 0x39, 0xc2, 0x4c, 0xfa, 0x7d, 0xb5, 0xc5, 0x27, 0x56, 0x0f, 0x4f, 0x05, 0x59, 0x09, 0x39, 0x86, /* Byte value: 0x6b */ + 0x33, 0x9f, 0xa6, 0x0b, 0xe4, 0x87, 0x6c, 0xf4, 0xb8, 0x82, 0x8c, 0x7e, 0x3a, 0xd6, 0x33, 0x48, /* Byte value: 0x6c */ + 0xdb, 0xc6, 0x58, 0x7a, 0x3d, 0x8b, 0x30, 0x4b, 0x97, 0x48, 0xf1, 0x38, 0xdf, 0xd9, 0xdb, 0x20, /* Byte value: 0x6d */ + 0xa0, 0x99, 0xb8, 0xcb, 0x84, 0xa6, 0x02, 0xae, 0xf8, 0x07, 0x6d, 0xbc, 0xff, 0x6e, 0xa0, 0xbd, /* Byte value: 0x6e */ + 0xfe, 0x24, 0xb4, 0x0a, 0x05, 0x0d, 0x51, 0x8a, 0x06, 0x3a, 0x07, 0x16, 0x3c, 0x9f, 0xfe, 0xdf, /* Byte value: 0x6f */ + 0xb2, 0xa9, 0x48, 0x04, 0x02, 0x6d, 0xf4, 0x3b, 0xbd, 0xa5, 0x69, 0x63, 0x18, 0xe7, 0xb2, 0x19, /* Byte value: 0x70 */ + 0x10, 0xf7, 0xad, 0x95, 0xab, 0xae, 0x6a, 0xc5, 0x73, 0x8b, 0x3b, 0x79, 0xf8, 0x64, 0x10, 0x4c, /* Byte value: 0x71 */ + 0x71, 0x02, 0x0a, 0x40, 0x20, 0x1f, 0x9b, 0x36, 0x81, 0xc2, 0x5f, 0xff, 0x43, 0x68, 0x71, 0x53, /* Byte value: 0x72 */ + 0x87, 0xbc, 0x09, 0xe1, 0x91, 0x45, 0xff, 0x3f, 0x5f, 0x5c, 0xa4, 0x34, 0x03, 0xc5, 0x87, 0xaa, /* Byte value: 0x73 */ + 0x35, 0x15, 0x41, 0xe5, 0x93, 0x28, 0x0b, 0x04, 0xe2, 0xf9, 0xcd, 0x57, 0x1b, 0x22, 0x35, 0xb3, /* Byte value: 0x74 */ + 0x38, 0x40, 0x83, 0xd7, 0x8a, 0x66, 0x8b, 0x0f, 0x4d, 0xfa, 0xb1, 0x56, 0xb7, 0x9e, 0x38, 0xf2, /* Byte value: 0x75 */ + 0x52, 0x6a, 0x01, 0xde, 0x6f, 0x36, 0x9d, 0x07, 0x4a, 0xcb, 0xe8, 0xf8, 0x81, 0xda, 0x52, 0x57, /* Byte value: 0x76 */ + 0x65, 0xb8, 0x1d, 0x61, 0xd1, 0x7b, 0x0a, 0x53, 0x9e, 0x1b, 0x1a, 0x09, 0x85, 0x15, 0x65, 0x0c, /* Byte value: 0x77 */ + 0xde, 0x09, 0x2d, 0xe3, 0x90, 0x92, 0x85, 0xc3, 0xe0, 0xef, 0x71, 0xe4, 0x0f, 0x57, 0xde, 0x47, /* Byte value: 0x78 */ + 0x8e, 0xa4, 0x71, 0x67, 0xd2, 0xc1, 0x84, 0x94, 0x9c, 0x0d, 0xa6, 0xba, 0x91, 0x60, 0x8e, 0xf8, /* Byte value: 0x79 */ + 0xa8, 0x03, 0x0f, 0x60, 0x30, 0xf1, 0x37, 0x2d, 0x20, 0xa3, 0x91, 0x61, 0x83, 0x5c, 0xa8, 0x9b, /* Byte value: 0x7a */ + 0xfd, 0x61, 0x26, 0x7d, 0xdf, 0xbb, 0x83, 0xf2, 0x2b, 0xe6, 0xc6, 0xe3, 0xcd, 0xe5, 0xfd, 0x43, /* Byte value: 0x7b */ + 0x2e, 0x3d, 0xc9, 0xac, 0x56, 0x67, 0x86, 0x3a, 0x64, 0x0a, 0xcb, 0x06, 0x6e, 0x0e, 0x2e, 0x45, /* Byte value: 0x7c */ + 0x01, 0x82, 0xcf, 0x2d, 0xf7, 0xd3, 0x4e, 0x28, 0x1b, 0xf5, 0xfe, 0x53, 0xee, 0x97, 0x01, 0x74, /* Byte value: 0x7d */ + 0xf8, 0xae, 0x53, 0xe4, 0x72, 0xa2, 0x36, 0x7a, 0x5c, 0x41, 0x46, 0x3f, 0x1d, 0x6b, 0xf8, 0x24, /* Byte value: 0x7e */ + 0x8c, 0x63, 0x2c, 0x3d, 0xff, 0xa4, 0x18, 0xc4, 0xaa, 0x24, 0x99, 0x1c, 0x8e, 0x8d, 0x8c, 0x10, /* Byte value: 0x7f */ + 0xbb, 0xb1, 0x30, 0x82, 0x41, 0xe9, 0x8f, 0x90, 0x7e, 0xf4, 0x6b, 0xed, 0x8a, 0x42, 0xbb, 0x4b, /* Byte value: 0x80 */ + 0x49, 0x42, 0x89, 0x97, 0xaa, 0x79, 0x10, 0x39, 0xcc, 0x38, 0xee, 0xa9, 0xf4, 0xf6, 0x49, 0xa1, /* Byte value: 0x81 */ + 0x44, 0x17, 0x4b, 0xa5, 0xb3, 0x37, 0x90, 0x32, 0x63, 0x3b, 0x92, 0xa8, 0x58, 0x4a, 0x44, 0xe0, /* Byte value: 0x82 */ + 0xbf, 0xfc, 0x8a, 0x36, 0x1b, 0x23, 0x74, 0x30, 0x12, 0xa6, 0x15, 0x62, 0xb4, 0x5b, 0xbf, 0x58, /* Byte value: 0x83 */ + 0xef, 0x51, 0xd6, 0xb2, 0x59, 0x70, 0x75, 0x67, 0x6e, 0x44, 0xc2, 0x3c, 0x2a, 0x6c, 0xef, 0xe7, /* Byte value: 0x84 */ + 0xfc, 0xe3, 0xe9, 0x50, 0x28, 0x68, 0xcd, 0xda, 0x30, 0x13, 0x38, 0xb0, 0x23, 0x72, 0xfc, 0x37, /* Byte value: 0x85 */ + 0x3a, 0x87, 0xde, 0x8d, 0xa7, 0x03, 0x17, 0x5f, 0x7b, 0xd3, 0x8e, 0xf0, 0xa8, 0x73, 0x3a, 0x1a, /* Byte value: 0x86 */ + 0xb1, 0xec, 0xda, 0x73, 0xd8, 0xdb, 0x26, 0x43, 0x90, 0x79, 0xa8, 0x96, 0xe9, 0x9d, 0xb1, 0x85, /* Byte value: 0x87 */ + 0xf9, 0x2c, 0x9c, 0xc9, 0x85, 0x71, 0x78, 0x52, 0x47, 0xb4, 0xb8, 0x6c, 0xf3, 0xfc, 0xf9, 0x50, /* Byte value: 0x88 */ + 0x99, 0x5b, 0xf4, 0x31, 0xf9, 0x13, 0xc7, 0x89, 0xae, 0x08, 0x22, 0xb9, 0xa6, 0x67, 0x99, 0x3b, /* Byte value: 0x89 */ + 0xd8, 0x83, 0xca, 0x0d, 0xe7, 0x3d, 0xe2, 0x33, 0xba, 0x94, 0x30, 0xcd, 0x2e, 0xa3, 0xd8, 0xbc, /* Byte value: 0x8a */ + 0xc9, 0xf6, 0xa8, 0xb5, 0xbb, 0x40, 0xc6, 0xde, 0xd2, 0xea, 0xf5, 0xe7, 0x38, 0x50, 0xc9, 0x84, /* Byte value: 0x8b */ + 0x61, 0xf5, 0xa7, 0xd5, 0x8b, 0xb1, 0xf1, 0xf3, 0xf2, 0x49, 0x64, 0x86, 0xbb, 0x0c, 0x61, 0x1f, /* Byte value: 0x8c */ + 0x3c, 0x0d, 0x39, 0x63, 0xd0, 0xac, 0x70, 0xaf, 0x21, 0xa8, 0xcf, 0xd9, 0x89, 0x87, 0x3c, 0xe1, /* Byte value: 0x8d */ + 0x89, 0xac, 0x59, 0xa4, 0x52, 0xbd, 0xad, 0x4c, 0xdd, 0x83, 0x19, 0xc0, 0x5e, 0x03, 0x89, 0x77, /* Byte value: 0x8e */ + 0x0f, 0x92, 0x9f, 0x68, 0x34, 0x2b, 0x1c, 0x5b, 0x99, 0x2a, 0x43, 0xa7, 0xb3, 0x51, 0x0f, 0xa9, /* Byte value: 0x8f */ + 0x5c, 0x7a, 0x51, 0x9b, 0xac, 0xce, 0xcf, 0x74, 0xc8, 0x14, 0x55, 0x0c, 0xdc, 0x1c, 0x5c, 0x8a, /* Byte value: 0x90 */ + 0xbe, 0x7e, 0x45, 0x1b, 0xec, 0xf0, 0x3a, 0x18, 0x09, 0x53, 0xeb, 0x31, 0x5a, 0xcc, 0xbe, 0x2c, /* Byte value: 0x91 */ + 0xc2, 0x29, 0x8d, 0x69, 0xd5, 0xa1, 0x21, 0x25, 0x27, 0x92, 0xc8, 0xcf, 0xb5, 0x18, 0xc2, 0x3e, /* Byte value: 0x92 */ + 0xc5, 0x21, 0xa5, 0xaa, 0x55, 0xdd, 0x08, 0xfd, 0x66, 0x1c, 0x77, 0xb5, 0x7a, 0x7b, 0xc5, 0xb1, /* Byte value: 0x93 */ + 0x88, 0x2e, 0x96, 0x89, 0xa5, 0x6e, 0xe3, 0x64, 0xc6, 0x76, 0xe7, 0x93, 0xb0, 0x94, 0x88, 0x03, /* Byte value: 0x94 */ + 0xa1, 0x1b, 0x77, 0xe6, 0x73, 0x75, 0x4c, 0x86, 0xe3, 0xf2, 0x93, 0xef, 0x11, 0xf9, 0xa1, 0xc9, /* Byte value: 0x95 */ + 0x1d, 0xa2, 0x6f, 0xa7, 0xb2, 0xe0, 0xea, 0xce, 0xdc, 0x88, 0x47, 0x78, 0x54, 0xd8, 0x1d, 0x0d, /* Byte value: 0x96 */ + 0xc7, 0xe6, 0xf8, 0xf0, 0x78, 0xb8, 0x94, 0xad, 0x50, 0x35, 0x48, 0x13, 0x65, 0x96, 0xc7, 0x59, /* Byte value: 0x97 */ + 0x6c, 0xa0, 0x65, 0xe7, 0x92, 0xff, 0x71, 0xf8, 0x5d, 0x4a, 0x18, 0x87, 0x17, 0xb0, 0x6c, 0x5e, /* Byte value: 0x98 */ + 0x85, 0x7b, 0x54, 0xbb, 0xbc, 0x20, 0x63, 0x6f, 0x69, 0x75, 0x9b, 0x92, 0x1c, 0x28, 0x85, 0x42, /* Byte value: 0x99 */ + 0x9d, 0x16, 0x4e, 0x85, 0xa3, 0xd9, 0x3c, 0x29, 0xc2, 0x5a, 0x5c, 0x36, 0x98, 0x7e, 0x9d, 0x28, /* Byte value: 0x9a */ + 0xd3, 0x5c, 0xef, 0xd1, 0x89, 0xdc, 0x05, 0xc8, 0x4f, 0xec, 0x0d, 0xe5, 0xa3, 0xeb, 0xd3, 0x06, /* Byte value: 0x9b */ + 0xd1, 0x9b, 0xb2, 0x8b, 0xa4, 0xb9, 0x99, 0x98, 0x79, 0xc5, 0x32, 0x43, 0xbc, 0x06, 0xd1, 0xee, /* Byte value: 0x9c */ + 0x1e, 0xe7, 0xfd, 0xd0, 0x68, 0x56, 0x38, 0xb6, 0xf1, 0x54, 0x86, 0x8d, 0xa5, 0xa2, 0x1e, 0x91, /* Byte value: 0x9d */ + 0x3e, 0xca, 0x64, 0x39, 0xfd, 0xc9, 0xec, 0xff, 0x17, 0x81, 0xf0, 0x7f, 0x96, 0x6a, 0x3e, 0x09, /* Byte value: 0x9e */ + 0x84, 0xf9, 0x9b, 0x96, 0x4b, 0xf3, 0x2d, 0x47, 0x72, 0x80, 0x65, 0xc1, 0xf2, 0xbf, 0x84, 0x36, /* Byte value: 0x9f */ + 0x2f, 0xbf, 0x06, 0x81, 0xa1, 0xb4, 0xc8, 0x12, 0x7f, 0xff, 0x35, 0x55, 0x80, 0x99, 0x2f, 0x31, /* Byte value: 0xa0 */ + 0x7d, 0xd5, 0x07, 0x5f, 0xce, 0x82, 0x55, 0x15, 0x35, 0x34, 0xdd, 0xad, 0x01, 0x43, 0x7d, 0x66, /* Byte value: 0xa1 */ + 0x74, 0xcd, 0x7f, 0xd9, 0x8d, 0x06, 0x2e, 0xbe, 0xf6, 0x65, 0xdf, 0x23, 0x93, 0xe6, 0x74, 0x34, /* Byte value: 0xa2 */ + 0x41, 0xd8, 0x3e, 0x3c, 0x1e, 0x2e, 0x25, 0xba, 0x14, 0x9c, 0x12, 0x74, 0x88, 0xc4, 0x41, 0x87, /* Byte value: 0xa3 */ + 0x50, 0xad, 0x5c, 0x84, 0x42, 0x53, 0x01, 0x57, 0x7c, 0xe2, 0xd7, 0x5e, 0x9e, 0x37, 0x50, 0xbf, /* Byte value: 0xa4 */ + 0x21, 0xaf, 0x56, 0xc4, 0x62, 0x4c, 0x9a, 0x61, 0xfd, 0x20, 0x88, 0xa1, 0xdd, 0x5f, 0x21, 0xec, /* Byte value: 0xa5 */ + 0x55, 0x62, 0x29, 0x1d, 0xef, 0x4a, 0xb4, 0xdf, 0x0b, 0x45, 0x57, 0x82, 0x4e, 0xb9, 0x55, 0xd8, /* Byte value: 0xa6 */ + 0xe7, 0xcb, 0x61, 0x19, 0xed, 0x27, 0x40, 0xe4, 0xb6, 0xe0, 0x3e, 0xe1, 0x56, 0x5e, 0xe7, 0xc1, /* Byte value: 0xa7 */ + 0xcd, 0xbb, 0x12, 0x01, 0xe1, 0x8a, 0x3d, 0x7e, 0xbe, 0xb8, 0x8b, 0x68, 0x06, 0x49, 0xcd, 0x97, /* Byte value: 0xa8 */ + 0x0d, 0x55, 0xc2, 0x32, 0x19, 0x4e, 0x80, 0x0b, 0xaf, 0x03, 0x7c, 0x01, 0xac, 0xbc, 0x0d, 0x41, /* Byte value: 0xa9 */ + 0x7c, 0x57, 0xc8, 0x72, 0x39, 0x51, 0x1b, 0x3d, 0x2e, 0xc1, 0x23, 0xfe, 0xef, 0xd4, 0x7c, 0x12, /* Byte value: 0xaa */ + 0x37, 0xd2, 0x1c, 0xbf, 0xbe, 0x4d, 0x97, 0x54, 0xd4, 0xd0, 0xf2, 0xf1, 0x04, 0xcf, 0x37, 0x5b, /* Byte value: 0xab */ + 0x1a, 0xaa, 0x47, 0x64, 0x32, 0x9c, 0xc3, 0x16, 0x9d, 0x06, 0xf8, 0x02, 0x9b, 0xbb, 0x1a, 0x82, /* Byte value: 0xac */ + 0xa2, 0x5e, 0xe5, 0x91, 0xa9, 0xc3, 0x9e, 0xfe, 0xce, 0x2e, 0x52, 0x1a, 0xe0, 0x83, 0xa2, 0x55, /* Byte value: 0xad */ + 0xaf, 0x0b, 0x27, 0xa3, 0xb0, 0x8d, 0x1e, 0xf5, 0x61, 0x2d, 0x2e, 0x1b, 0x4c, 0x3f, 0xaf, 0x14, /* Byte value: 0xae */ + 0xf6, 0xbe, 0x03, 0xa1, 0xb1, 0x5a, 0x64, 0x09, 0xde, 0x9e, 0xfb, 0xcb, 0x40, 0xad, 0xf6, 0xf9, /* Byte value: 0xaf */ + 0xe8, 0x59, 0xfe, 0x71, 0xd9, 0x0c, 0x5c, 0xbf, 0x2f, 0xca, 0x7d, 0x46, 0xe5, 0x0f, 0xe8, 0x68, /* Byte value: 0xb0 */ + 0x7e, 0x90, 0x95, 0x28, 0x14, 0x34, 0x87, 0x6d, 0x18, 0xe8, 0x1c, 0x58, 0xf0, 0x39, 0x7e, 0xfa, /* Byte value: 0xb1 */ + 0x5e, 0xbd, 0x0c, 0xc1, 0x81, 0xab, 0x53, 0x24, 0xfe, 0x3d, 0x6a, 0xaa, 0xc3, 0xf1, 0x5e, 0x62, /* Byte value: 0xb2 */ + 0xfa, 0x69, 0x0e, 0xbe, 0x5f, 0xc7, 0xaa, 0x2a, 0x6a, 0x68, 0x79, 0x99, 0x02, 0x86, 0xfa, 0xcc, /* Byte value: 0xb3 */ + 0xb5, 0xa1, 0x60, 0xc7, 0x82, 0x11, 0xdd, 0xe3, 0xfc, 0x2b, 0xd6, 0x19, 0xd7, 0x84, 0xb5, 0x96, /* Byte value: 0xb4 */ + 0x92, 0x84, 0xd1, 0xed, 0x97, 0xf2, 0x20, 0x72, 0x5b, 0x70, 0x1f, 0x91, 0x2b, 0x2f, 0x92, 0x81, /* Byte value: 0xb5 */ + 0x56, 0x27, 0xbb, 0x6a, 0x35, 0xfc, 0x66, 0xa7, 0x26, 0x99, 0x96, 0x77, 0xbf, 0xc3, 0x56, 0x44, /* Byte value: 0xb6 */ + 0xf1, 0xb6, 0x2b, 0x62, 0x31, 0x26, 0x4d, 0xd1, 0x9f, 0x10, 0x44, 0xb1, 0x8f, 0xce, 0xf1, 0x76, /* Byte value: 0xb7 */ + 0x04, 0x4d, 0xba, 0xb4, 0x5a, 0xca, 0xfb, 0xa0, 0x6c, 0x52, 0x7e, 0x8f, 0x3e, 0x19, 0x04, 0x13, /* Byte value: 0xb8 */ + 0x6e, 0x67, 0x38, 0xbd, 0xbf, 0x9a, 0xed, 0xa8, 0x6b, 0x63, 0x27, 0x21, 0x08, 0x5d, 0x6e, 0xb6, /* Byte value: 0xb9 */ + 0xa5, 0x56, 0xcd, 0x52, 0x29, 0xbf, 0xb7, 0x26, 0x8f, 0xa0, 0xed, 0x60, 0x2f, 0xe0, 0xa5, 0xda, /* Byte value: 0xba */ + 0xe6, 0x49, 0xae, 0x34, 0x1a, 0xf4, 0x0e, 0xcc, 0xad, 0x15, 0xc0, 0xb2, 0xb8, 0xc9, 0xe6, 0xb5, /* Byte value: 0xbb */ + 0xc8, 0x74, 0x67, 0x98, 0x4c, 0x93, 0x88, 0xf6, 0xc9, 0x1f, 0x0b, 0xb4, 0xd6, 0xc7, 0xc8, 0xf0, /* Byte value: 0xbc */ + 0x7b, 0x5f, 0xe0, 0xb1, 0xb9, 0x2d, 0x32, 0xe5, 0x6f, 0x4f, 0x9c, 0x84, 0x20, 0xb7, 0x7b, 0x9d, /* Byte value: 0xbd */ + 0x73, 0xc5, 0x57, 0x1a, 0x0d, 0x7a, 0x07, 0x66, 0xb7, 0xeb, 0x60, 0x59, 0x5c, 0x85, 0x73, 0xbb, /* Byte value: 0xbe */ + 0x51, 0x2f, 0x93, 0xa9, 0xb5, 0x80, 0x4f, 0x7f, 0x67, 0x17, 0x29, 0x0d, 0x70, 0xa0, 0x51, 0xcb, /* Byte value: 0xbf */ + 0x95, 0x8c, 0xf9, 0x2e, 0x17, 0x8e, 0x09, 0xaa, 0x1a, 0xfe, 0xa0, 0xeb, 0xe4, 0x4c, 0x95, 0x0e, /* Byte value: 0xc0 */ + 0x66, 0xfd, 0x8f, 0x16, 0x0b, 0xcd, 0xd8, 0x2b, 0xb3, 0xc7, 0xdb, 0xfc, 0x74, 0x6f, 0x66, 0x90, /* Byte value: 0xc1 */ + 0xd6, 0x93, 0x9a, 0x48, 0x24, 0xc5, 0xb0, 0x40, 0x38, 0x4b, 0x8d, 0x39, 0x73, 0x65, 0xd6, 0x61, /* Byte value: 0xc2 */ + 0x5b, 0x72, 0x79, 0x58, 0x2c, 0xb2, 0xe6, 0xac, 0x89, 0x9a, 0xea, 0x76, 0x13, 0x7f, 0x5b, 0x05, /* Byte value: 0xc3 */ + 0xe3, 0x86, 0xdb, 0xad, 0xb7, 0xed, 0xbb, 0x44, 0xda, 0xb2, 0x40, 0x6e, 0x68, 0x47, 0xe3, 0xd2, /* Byte value: 0xc4 */ + 0x63, 0x32, 0xfa, 0x8f, 0xa6, 0xd4, 0x6d, 0xa3, 0xc4, 0x60, 0x5b, 0x20, 0xa4, 0xe1, 0x63, 0xf7, /* Byte value: 0xc5 */ + 0x9b, 0x9c, 0xa9, 0x6b, 0xd4, 0x76, 0x5b, 0xd9, 0x98, 0x21, 0x1d, 0x1f, 0xb9, 0x8a, 0x9b, 0xd3, /* Byte value: 0xc6 */ + 0xbd, 0x3b, 0xd7, 0x6c, 0x36, 0x46, 0xe8, 0x60, 0x24, 0x8f, 0x2a, 0xc4, 0xab, 0xb6, 0xbd, 0xb0, /* Byte value: 0xc7 */ + 0x77, 0x88, 0xed, 0xae, 0x57, 0xb0, 0xfc, 0xc6, 0xdb, 0xb9, 0x1e, 0xd6, 0x62, 0x9c, 0x77, 0xa8, /* Byte value: 0xc8 */ + 0x8d, 0xe1, 0xe3, 0x10, 0x08, 0x77, 0x56, 0xec, 0xb1, 0xd1, 0x67, 0x4f, 0x60, 0x1a, 0x8d, 0x64, /* Byte value: 0xc9 */ + 0xbc, 0xb9, 0x18, 0x41, 0xc1, 0x95, 0xa6, 0x48, 0x3f, 0x7a, 0xd4, 0x97, 0x45, 0x21, 0xbc, 0xc4, /* Byte value: 0xca */ + 0xf3, 0x71, 0x76, 0x38, 0x1c, 0x43, 0xd1, 0x81, 0xa9, 0x39, 0x7b, 0x17, 0x90, 0x23, 0xf3, 0x9e, /* Byte value: 0xcb */ + 0xf4, 0x79, 0x5e, 0xfb, 0x9c, 0x3f, 0xf8, 0x59, 0xe8, 0xb7, 0xc4, 0x6d, 0x5f, 0x40, 0xf4, 0x11, /* Byte value: 0xcc */ + 0x26, 0xa7, 0x7e, 0x07, 0xe2, 0x30, 0xb3, 0xb9, 0xbc, 0xae, 0x37, 0xdb, 0x12, 0x3c, 0x26, 0x63, /* Byte value: 0xcd */ + 0xd4, 0x54, 0xc7, 0x12, 0x09, 0xa0, 0x2c, 0x10, 0x0e, 0x62, 0xb2, 0x9f, 0x6c, 0x88, 0xd4, 0x89, /* Byte value: 0xce */ + 0x80, 0xb4, 0x21, 0x22, 0x11, 0x39, 0xd6, 0xe7, 0x1e, 0xd2, 0x1b, 0x4e, 0xcc, 0xa6, 0x80, 0x25, /* Byte value: 0xcf */ + 0x93, 0x06, 0x1e, 0xc0, 0x60, 0x21, 0x6e, 0x5a, 0x40, 0x85, 0xe1, 0xc2, 0xc5, 0xb8, 0x93, 0xf5, /* Byte value: 0xd0 */ + 0xb6, 0xe4, 0xf2, 0xb0, 0x58, 0xa7, 0x0f, 0x9b, 0xd1, 0xf7, 0x17, 0xec, 0x26, 0xfe, 0xb6, 0x0a, /* Byte value: 0xd1 */ + 0x15, 0x38, 0xd8, 0x0c, 0x06, 0xb7, 0xdf, 0x4d, 0x04, 0x2c, 0xbb, 0xa5, 0x28, 0xea, 0x15, 0x2b, /* Byte value: 0xd2 */ + 0xcc, 0x39, 0xdd, 0x2c, 0x16, 0x59, 0x73, 0x56, 0xa5, 0x4d, 0x75, 0x3b, 0xe8, 0xde, 0xcc, 0xe3, /* Byte value: 0xd3 */ + 0xac, 0x4e, 0xb5, 0xd4, 0x6a, 0x3b, 0xcc, 0x8d, 0x4c, 0xf1, 0xef, 0xee, 0xbd, 0x45, 0xac, 0x88, /* Byte value: 0xd4 */ + 0xc1, 0x6c, 0x1f, 0x1e, 0x0f, 0x17, 0xf3, 0x5d, 0x0a, 0x4e, 0x09, 0x3a, 0x44, 0x62, 0xc1, 0xa2, /* Byte value: 0xd5 */ + 0xee, 0xd3, 0x19, 0x9f, 0xae, 0xa3, 0x3b, 0x4f, 0x75, 0xb1, 0x3c, 0x6f, 0xc4, 0xfb, 0xee, 0x93, /* Byte value: 0xd6 */ + 0xae, 0x89, 0xe8, 0x8e, 0x47, 0x5e, 0x50, 0xdd, 0x7a, 0xd8, 0xd0, 0x48, 0xa2, 0xa8, 0xae, 0x60, /* Byte value: 0xd7 */ + 0x9c, 0x94, 0x81, 0xa8, 0x54, 0x0a, 0x72, 0x01, 0xd9, 0xaf, 0xa2, 0x65, 0x76, 0xe9, 0x9c, 0x5c, /* Byte value: 0xd8 */ + 0xd9, 0x01, 0x05, 0x20, 0x10, 0xee, 0xac, 0x1b, 0xa1, 0x61, 0xce, 0x9e, 0xc0, 0x34, 0xd9, 0xc8, /* Byte value: 0xd9 */ + 0xa3, 0xdc, 0x2a, 0xbc, 0x5e, 0x10, 0xd0, 0xd6, 0xd5, 0xdb, 0xac, 0x49, 0x0e, 0x14, 0xa3, 0x21, /* Byte value: 0xda */ + 0x25, 0xe2, 0xec, 0x70, 0x38, 0x86, 0x61, 0xc1, 0x91, 0x72, 0xf6, 0x2e, 0xe3, 0x46, 0x25, 0xff, /* Byte value: 0xdb */ + 0xeb, 0x1c, 0x6c, 0x06, 0x03, 0xba, 0x8e, 0xc7, 0x02, 0x16, 0xbc, 0xb3, 0x14, 0x75, 0xeb, 0xf4, /* Byte value: 0xdc */ + 0x40, 0x5a, 0xf1, 0x11, 0xe9, 0xfd, 0x6b, 0x92, 0x0f, 0x69, 0xec, 0x27, 0x66, 0x53, 0x40, 0xf3, /* Byte value: 0xdd */ + 0x48, 0xc0, 0x46, 0xba, 0x5d, 0xaa, 0x5e, 0x11, 0xd7, 0xcd, 0x10, 0xfa, 0x1a, 0x61, 0x48, 0xd5, /* Byte value: 0xde */ + 0x6d, 0x22, 0xaa, 0xca, 0x65, 0x2c, 0x3f, 0xd0, 0x46, 0xbf, 0xe6, 0xd4, 0xf9, 0x27, 0x6d, 0x2a, /* Byte value: 0xdf */ + 0x28, 0xb7, 0x2e, 0x42, 0x21, 0xc8, 0xe1, 0xca, 0x3e, 0x71, 0x8a, 0x2f, 0x4f, 0xfa, 0x28, 0xbe, /* Byte value: 0xe0 */ + 0xff, 0xa6, 0x7b, 0x27, 0xf2, 0xde, 0x1f, 0xa2, 0x1d, 0xcf, 0xf9, 0x45, 0xd2, 0x08, 0xff, 0xab, /* Byte value: 0xe1 */ + 0x0a, 0x5d, 0xea, 0xf1, 0x99, 0x32, 0xa9, 0xd3, 0xee, 0x8d, 0xc3, 0x7b, 0x63, 0xdf, 0x0a, 0xce, /* Byte value: 0xe2 */ + 0x4f, 0xc8, 0x6e, 0x79, 0xdd, 0xd6, 0x77, 0xc9, 0x96, 0x43, 0xaf, 0x80, 0xd5, 0x02, 0x4f, 0x5a, /* Byte value: 0xe3 */ + 0x19, 0xef, 0xd5, 0x13, 0xe8, 0x2a, 0x11, 0x6e, 0xb0, 0xda, 0x39, 0xf7, 0x6a, 0xc1, 0x19, 0x1e, /* Byte value: 0xe4 */ + 0x53, 0xe8, 0xce, 0xf3, 0x98, 0xe5, 0xd3, 0x2f, 0x51, 0x3e, 0x16, 0xab, 0x6f, 0x4d, 0x53, 0x23, /* Byte value: 0xe5 */ + 0xf5, 0xfb, 0x91, 0xd6, 0x6b, 0xec, 0xb6, 0x71, 0xf3, 0x42, 0x3a, 0x3e, 0xb1, 0xd7, 0xf5, 0x65, /* Byte value: 0xe6 */ + 0xb9, 0x76, 0x6d, 0xd8, 0x6c, 0x8c, 0x13, 0xc0, 0x48, 0xdd, 0x54, 0x4b, 0x95, 0xaf, 0xb9, 0xa3, /* Byte value: 0xe7 */ + 0xcb, 0x31, 0xf5, 0xef, 0x96, 0x25, 0x5a, 0x8e, 0xe4, 0xc3, 0xca, 0x41, 0x27, 0xbd, 0xcb, 0x6c, /* Byte value: 0xe8 */ + 0x45, 0x95, 0x84, 0x88, 0x44, 0xe4, 0xde, 0x1a, 0x78, 0xce, 0x6c, 0xfb, 0xb6, 0xdd, 0x45, 0x94, /* Byte value: 0xe9 */ + 0x57, 0xa5, 0x74, 0x47, 0xc2, 0x2f, 0x28, 0x8f, 0x3d, 0x6c, 0x68, 0x24, 0x51, 0x54, 0x57, 0x30, /* Byte value: 0xea */ + 0xd7, 0x11, 0x55, 0x65, 0xd3, 0x16, 0xfe, 0x68, 0x23, 0xbe, 0x73, 0x6a, 0x9d, 0xf2, 0xd7, 0x15, /* Byte value: 0xeb */ + 0x68, 0xed, 0xdf, 0x53, 0xc8, 0x35, 0x8a, 0x58, 0x31, 0x18, 0x66, 0x08, 0x29, 0xa9, 0x68, 0x4d, /* Byte value: 0xec */ + 0x4c, 0x8d, 0xfc, 0x0e, 0x07, 0x60, 0xa5, 0xb1, 0xbb, 0x9f, 0x6e, 0x75, 0x24, 0x78, 0x4c, 0xc6, /* Byte value: 0xed */ + 0x20, 0x2d, 0x99, 0xe9, 0x95, 0x9f, 0xd4, 0x49, 0xe6, 0xd5, 0x76, 0xf2, 0x33, 0xc8, 0x20, 0x98, /* Byte value: 0xee */ + 0x4a, 0x07, 0x1b, 0xe0, 0x70, 0xcf, 0xc2, 0x41, 0xe1, 0xe4, 0x2f, 0x5c, 0x05, 0x8c, 0x4a, 0x3d, /* Byte value: 0xef */ + 0x05, 0xcf, 0x75, 0x99, 0xad, 0x19, 0xb5, 0x88, 0x77, 0xa7, 0x80, 0xdc, 0xd0, 0x8e, 0x05, 0x67, /* Byte value: 0xf0 */ + 0xc6, 0x64, 0x37, 0xdd, 0x8f, 0x6b, 0xda, 0x85, 0x4b, 0xc0, 0xb6, 0x40, 0x8b, 0x01, 0xc6, 0x2d, /* Byte value: 0xf1 */ + 0x14, 0xba, 0x17, 0x21, 0xf1, 0x64, 0x91, 0x65, 0x1f, 0xd9, 0x45, 0xf6, 0xc6, 0x7d, 0x14, 0x5f, /* Byte value: 0xf2 */ + 0x9e, 0x53, 0xdc, 0xf2, 0x79, 0x6f, 0xee, 0x51, 0xef, 0x86, 0x9d, 0xc3, 0x69, 0x04, 0x9e, 0xb4, /* Byte value: 0xf3 */ + 0xd5, 0xd6, 0x08, 0x3f, 0xfe, 0x73, 0x62, 0x38, 0x15, 0x97, 0x4c, 0xcc, 0x82, 0x1f, 0xd5, 0xfd, /* Byte value: 0xf4 */ + 0x4d, 0x0f, 0x33, 0x23, 0xf0, 0xb3, 0xeb, 0x99, 0xa0, 0x6a, 0x90, 0x26, 0xca, 0xef, 0x4d, 0xb2, /* Byte value: 0xf5 */ + 0xce, 0xfe, 0x80, 0x76, 0x3b, 0x3c, 0xef, 0x06, 0x93, 0x64, 0x4a, 0x9d, 0xf7, 0x33, 0xce, 0x0b, /* Byte value: 0xf6 */ + 0x5a, 0xf0, 0xb6, 0x75, 0xdb, 0x61, 0xa8, 0x84, 0x92, 0x6f, 0x14, 0x25, 0xfd, 0xe8, 0x5a, 0x71, /* Byte value: 0xf7 */ + 0x3f, 0x48, 0xab, 0x14, 0x0a, 0x1a, 0xa2, 0xd7, 0x0c, 0x74, 0x0e, 0x2c, 0x78, 0xfd, 0x3f, 0x7d, /* Byte value: 0xf8 */ + 0x8a, 0xe9, 0xcb, 0xd3, 0x88, 0x0b, 0x7f, 0x34, 0xf0, 0x5f, 0xd8, 0x35, 0xaf, 0x79, 0x8a, 0xeb, /* Byte value: 0xf9 */ + 0x83, 0xf1, 0xb3, 0x55, 0xcb, 0x8f, 0x04, 0x9f, 0x33, 0x0e, 0xda, 0xbb, 0x3d, 0xdc, 0x83, 0xb9, /* Byte value: 0xfa */ + 0xc3, 0xab, 0x42, 0x44, 0x22, 0x72, 0x6f, 0x0d, 0x3c, 0x67, 0x36, 0x9c, 0x5b, 0x8f, 0xc3, 0x4a, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0x94, 0x0e, 0x36, 0x03, 0xe0, 0x5d, 0x47, 0x82, 0x01, 0x0b, 0x5e, 0xb8, 0x0a, 0xdb, 0x94, 0x7a, /* Byte value: 0xfd */ + 0x1f, 0x65, 0x32, 0xfd, 0x9f, 0x85, 0x76, 0x9e, 0xea, 0xa1, 0x78, 0xde, 0x4b, 0x35, 0x1f, 0xe5, /* Byte value: 0xfe */ + 0x98, 0xd9, 0x3b, 0x1c, 0x0e, 0xc0, 0x89, 0xa1, 0xb5, 0xfd, 0xdc, 0xea, 0x48, 0xf0, 0x98, 0x4f, /* Byte value: 0xff */ + + /* Matrix row: 15 */ + 0xcc, 0x0e, 0x86, 0xc2, 0x4f, 0xba, 0x59, 0x3b, 0xe3, 0xef, 0x79, 0x82, 0x53, 0x11, 0xf0, 0xcd, /* Byte value: 0x00 */ + 0x03, 0x96, 0x94, 0x95, 0x6c, 0x2a, 0xb6, 0xf5, 0x9c, 0xba, 0xe7, 0x37, 0x83, 0x91, 0xbd, 0x5b, /* Byte value: 0x01 */ + 0x17, 0xb1, 0xab, 0xa6, 0xf9, 0x11, 0xd2, 0x03, 0xc3, 0x8e, 0xc9, 0x90, 0x58, 0x92, 0xad, 0x69, /* Byte value: 0x02 */ + 0xa5, 0x82, 0x44, 0x27, 0x96, 0x65, 0xbf, 0x60, 0xda, 0x6e, 0x59, 0x28, 0x51, 0x68, 0x84, 0xbe, /* Byte value: 0x03 */ + 0xd4, 0x34, 0xac, 0xe0, 0xa9, 0x29, 0xa0, 0x9f, 0x89, 0x76, 0x4d, 0xf9, 0xc1, 0x13, 0x51, 0x50, /* Byte value: 0x04 */ + 0xfc, 0x7a, 0xd2, 0x86, 0x40, 0x5f, 0x68, 0xb0, 0x37, 0x1e, 0x11, 0x74, 0xb4, 0x15, 0x71, 0x34, /* Byte value: 0x05 */ + 0xd6, 0xd0, 0xf5, 0x06, 0xe1, 0xa4, 0xc5, 0x39, 0x61, 0x1b, 0xf7, 0x62, 0x82, 0x4c, 0x87, 0x83, /* Byte value: 0x06 */ + 0x76, 0x2b, 0xce, 0x5d, 0xc3, 0xbf, 0x63, 0x85, 0xdc, 0x78, 0x44, 0x13, 0x95, 0x54, 0x07, 0xd0, /* Byte value: 0x07 */ + 0xd2, 0xdb, 0x47, 0x09, 0x71, 0x7d, 0x0f, 0xb6, 0x72, 0xc1, 0x40, 0x97, 0x04, 0xf2, 0xe8, 0xe6, /* Byte value: 0x08 */ + 0x20, 0x58, 0xd9, 0x78, 0x0a, 0x07, 0x9f, 0xf2, 0x98, 0x1f, 0xf1, 0xa4, 0xba, 0xb9, 0xfe, 0xae, /* Byte value: 0x09 */ + 0x65, 0x91, 0xd7, 0xf4, 0xaa, 0x77, 0x7b, 0x09, 0x0c, 0x2c, 0x3a, 0x76, 0x4b, 0x78, 0xc5, 0xdc, /* Byte value: 0x0a */ + 0x42, 0x54, 0x28, 0x16, 0x5c, 0x83, 0x98, 0x81, 0x1b, 0x53, 0x9b, 0x10, 0xf4, 0xee, 0xe9, 0x4c, /* Byte value: 0x0b */ + 0x46, 0x5f, 0x9a, 0x19, 0xcc, 0x5a, 0x52, 0x0e, 0x08, 0x89, 0x2c, 0xe5, 0x72, 0x50, 0x86, 0x29, /* Byte value: 0x0c */ + 0xbb, 0x57, 0x85, 0xec, 0xa8, 0xa2, 0xe9, 0xed, 0x4b, 0x40, 0x60, 0x3d, 0x06, 0x8b, 0x9c, 0x95, /* Byte value: 0x0d */ + 0x2c, 0x45, 0xcc, 0x69, 0x79, 0xaf, 0x02, 0xa0, 0xad, 0xb2, 0xeb, 0x78, 0xf3, 0xb8, 0x4f, 0x01, /* Byte value: 0x0e */ + 0x25, 0x21, 0xa6, 0x04, 0xbe, 0x79, 0x86, 0x2e, 0xff, 0x12, 0x1b, 0xfd, 0xfc, 0xc9, 0xfa, 0x43, /* Byte value: 0x0f */ + 0x2e, 0xa1, 0x95, 0x8f, 0x31, 0x22, 0x67, 0x06, 0x45, 0xdf, 0x51, 0xe3, 0xb0, 0xe7, 0x99, 0xd2, /* Byte value: 0x10 */ + 0x7f, 0x4f, 0xa4, 0x30, 0x04, 0x69, 0xe7, 0x0b, 0x8e, 0xd8, 0xb4, 0x96, 0x9a, 0x25, 0xb2, 0x92, /* Byte value: 0x11 */ + 0xad, 0x94, 0xe3, 0x39, 0x75, 0x14, 0xe8, 0xbd, 0xfc, 0x19, 0xf4, 0x01, 0x9e, 0xd7, 0x5a, 0x74, /* Byte value: 0x12 */ + 0x06, 0xef, 0xeb, 0xe9, 0xd8, 0x54, 0xaf, 0x29, 0xfb, 0xb7, 0x0d, 0x6e, 0xc5, 0xe1, 0xb9, 0xb6, /* Byte value: 0x13 */ + 0x6b, 0x68, 0x9b, 0x03, 0x91, 0x52, 0x83, 0xfd, 0xd1, 0xec, 0x9a, 0x31, 0x41, 0x26, 0xa2, 0xa0, /* Byte value: 0x14 */ + 0x3b, 0xf4, 0x67, 0xcf, 0x80, 0xbe, 0xd0, 0xa3, 0x6e, 0x3c, 0x22, 0xe8, 0xab, 0x2a, 0xe2, 0x68, /* Byte value: 0x15 */ + 0x6a, 0x1a, 0x56, 0x70, 0xb5, 0xf5, 0x50, 0xae, 0xa5, 0x3b, 0xc7, 0x9d, 0x81, 0xe8, 0xc9, 0x28, /* Byte value: 0x16 */ + 0x7e, 0x3d, 0x69, 0x43, 0x20, 0xce, 0x34, 0x58, 0xfa, 0x0f, 0xe9, 0x3a, 0x5a, 0xeb, 0xd9, 0x1a, /* Byte value: 0x17 */ + 0x3c, 0x69, 0x41, 0x55, 0x7c, 0x4d, 0xac, 0xd9, 0xe1, 0x5c, 0x72, 0x2a, 0xae, 0x05, 0x30, 0x56, /* Byte value: 0x18 */ + 0x84, 0xa8, 0x50, 0x2c, 0xb8, 0xc5, 0xf3, 0xc1, 0x36, 0xa6, 0xf5, 0x20, 0x2b, 0x1f, 0x11, 0x98, /* Byte value: 0x19 */ + 0x67, 0x75, 0x8e, 0x12, 0xe2, 0xfa, 0x1e, 0xaf, 0xe4, 0x41, 0x80, 0xed, 0x08, 0x27, 0x13, 0x0f, /* Byte value: 0x1a */ + 0xb6, 0x38, 0x5d, 0x8e, 0xff, 0xad, 0xa7, 0xec, 0x0a, 0x3a, 0x27, 0x4d, 0x8f, 0x44, 0x46, 0xb2, /* Byte value: 0x1b */ + 0x16, 0xc3, 0x66, 0xd5, 0xdd, 0xb6, 0x01, 0x50, 0xb7, 0x59, 0x94, 0x3c, 0x98, 0x5c, 0xc6, 0xe1, /* Byte value: 0x1c */ + 0x88, 0xb5, 0x45, 0x3d, 0xcb, 0x6d, 0x6e, 0x93, 0x03, 0x0b, 0xef, 0xfc, 0x62, 0x1e, 0xa0, 0x37, /* Byte value: 0x1d */ + 0x58, 0x8a, 0x5b, 0xd2, 0xf2, 0x9d, 0x04, 0x83, 0x99, 0xa7, 0x15, 0xf0, 0x25, 0xb3, 0x9e, 0x02, /* Byte value: 0x1e */ + 0xbc, 0xca, 0xa3, 0x76, 0x54, 0x51, 0x95, 0x97, 0xc4, 0x20, 0x30, 0xff, 0x03, 0xa4, 0x4e, 0xab, /* Byte value: 0x1f */ + 0xde, 0xc6, 0x52, 0x18, 0x02, 0xd5, 0x92, 0xe4, 0x47, 0x6c, 0x5a, 0x4b, 0x4d, 0xf3, 0x59, 0x49, /* Byte value: 0x20 */ + 0xc2, 0xf7, 0xca, 0x35, 0x74, 0x9f, 0xa1, 0xcf, 0x3e, 0x2f, 0xd9, 0xc5, 0x59, 0x4f, 0x97, 0xb1, /* Byte value: 0x21 */ + 0x4e, 0x49, 0x3d, 0x07, 0x2f, 0x2b, 0x05, 0xd3, 0x2e, 0xfe, 0x81, 0xcc, 0xbd, 0xef, 0x58, 0xe3, /* Byte value: 0x22 */ + 0x3f, 0xff, 0xd5, 0xc0, 0x10, 0x67, 0x1a, 0x2c, 0x7d, 0xe6, 0x95, 0x1d, 0x2d, 0x94, 0x8d, 0x0d, /* Byte value: 0x23 */ + 0x0e, 0xf9, 0x4c, 0xf7, 0x3b, 0x25, 0xf8, 0xf4, 0xdd, 0xc0, 0xa0, 0x47, 0x0a, 0x5e, 0x67, 0x7c, /* Byte value: 0x24 */ + 0x1f, 0xa7, 0x0c, 0xb8, 0x1a, 0x60, 0x85, 0xde, 0xe5, 0xf9, 0x64, 0xb9, 0x97, 0x2d, 0x73, 0xa3, /* Byte value: 0x25 */ + 0x99, 0xeb, 0x05, 0x72, 0xea, 0x28, 0x13, 0xb9, 0x3b, 0x32, 0x2b, 0x02, 0xff, 0x6d, 0xb4, 0xe8, /* Byte value: 0x26 */ + 0x0c, 0x1d, 0x15, 0x11, 0x73, 0xa8, 0x9d, 0x52, 0x35, 0xad, 0x1a, 0xdc, 0x49, 0x01, 0xb1, 0xaf, /* Byte value: 0x27 */ + 0x70, 0xc4, 0x25, 0xb4, 0x1b, 0xeb, 0xcc, 0xac, 0x27, 0xcf, 0x49, 0x7d, 0x50, 0xb5, 0xbe, 0x66, /* Byte value: 0x28 */ + 0x44, 0xbb, 0xc3, 0xff, 0x84, 0xd7, 0x37, 0xa8, 0xe0, 0xe4, 0x96, 0x7e, 0x31, 0x0f, 0x50, 0xfa, /* Byte value: 0x29 */ + 0x2d, 0x37, 0x01, 0x1a, 0x5d, 0x08, 0xd1, 0xf3, 0xd9, 0x65, 0xb6, 0xd4, 0x33, 0x76, 0x24, 0x89, /* Byte value: 0x2a */ + 0x5f, 0x17, 0x7d, 0x48, 0x0e, 0x6e, 0x78, 0xf9, 0x16, 0xc7, 0x45, 0x32, 0x20, 0x9c, 0x4c, 0x3c, /* Byte value: 0x2b */ + 0x78, 0xd2, 0x82, 0xaa, 0xf8, 0x9a, 0x9b, 0x71, 0x01, 0xb8, 0xe4, 0x54, 0x9f, 0x0a, 0x60, 0xac, /* Byte value: 0x2c */ + 0xcb, 0x93, 0xa0, 0x58, 0xb3, 0x49, 0x25, 0x41, 0x6c, 0x8f, 0x29, 0x40, 0x56, 0x3e, 0x22, 0xf3, /* Byte value: 0x2d */ + 0xd5, 0x46, 0x61, 0x93, 0x8d, 0x8e, 0x73, 0xcc, 0xfd, 0xa1, 0x10, 0x55, 0x01, 0xdd, 0x3a, 0xd8, /* Byte value: 0x2e */ + 0x73, 0x52, 0xb1, 0x21, 0x77, 0xc1, 0x7a, 0x59, 0xbb, 0x75, 0xae, 0x4a, 0xd3, 0x24, 0x03, 0x3d, /* Byte value: 0x2f */ + 0x5c, 0x81, 0xe9, 0xdd, 0x62, 0x44, 0xce, 0x0c, 0x8a, 0x7d, 0xa2, 0x05, 0xa3, 0x0d, 0xf1, 0x67, /* Byte value: 0x30 */ + 0xfe, 0x9e, 0x8b, 0x60, 0x08, 0xd2, 0x0d, 0x16, 0xdf, 0x73, 0xab, 0xef, 0xf7, 0x4a, 0xa7, 0xe7, /* Byte value: 0x31 */ + 0x6f, 0x63, 0x29, 0x0c, 0x01, 0x8b, 0x49, 0x72, 0xc2, 0x36, 0x2d, 0xc4, 0xc7, 0x98, 0xcd, 0xc5, /* Byte value: 0x32 */ + 0x1a, 0xde, 0x73, 0xc4, 0xae, 0x1e, 0x9c, 0x02, 0x82, 0xf4, 0x8e, 0xe0, 0xd1, 0x5d, 0x77, 0x4e, /* Byte value: 0x33 */ + 0x07, 0x9d, 0x26, 0x9a, 0xfc, 0xf3, 0x7c, 0x7a, 0x8f, 0x60, 0x50, 0xc2, 0x05, 0x2f, 0xd2, 0x3e, /* Byte value: 0x34 */ + 0xee, 0xb2, 0x06, 0x5c, 0x0d, 0x30, 0xa3, 0x6f, 0x93, 0x9d, 0x32, 0xbd, 0xaa, 0xf7, 0xd8, 0xb0, /* Byte value: 0x35 */ + 0xea, 0xb9, 0xb4, 0x53, 0x9d, 0xe9, 0x69, 0xe0, 0x80, 0x47, 0x85, 0x48, 0x2c, 0x49, 0xb7, 0xd5, /* Byte value: 0x36 */ + 0xc8, 0x05, 0x34, 0xcd, 0xdf, 0x63, 0x93, 0xb4, 0xf0, 0x35, 0xce, 0x77, 0xd5, 0xaf, 0x9f, 0xa8, /* Byte value: 0x37 */ + 0x8c, 0xbe, 0xf7, 0x32, 0x5b, 0xb4, 0xa4, 0x1c, 0x10, 0xd1, 0x58, 0x09, 0xe4, 0xa0, 0xcf, 0x52, /* Byte value: 0x38 */ + 0xb5, 0xae, 0xc9, 0x1b, 0x93, 0x87, 0x11, 0x19, 0x96, 0x80, 0xc0, 0x7a, 0x0c, 0xd5, 0xfb, 0xe9, /* Byte value: 0x39 */ + 0x38, 0x62, 0xf3, 0x5a, 0xec, 0x94, 0x66, 0x56, 0xf2, 0x86, 0xc5, 0xdf, 0x28, 0xbb, 0x5f, 0x33, /* Byte value: 0x3a */ + 0x59, 0xf8, 0x96, 0xa1, 0xd6, 0x3a, 0xd7, 0xd0, 0xed, 0x70, 0x48, 0x5c, 0xe5, 0x7d, 0xf5, 0x8a, /* Byte value: 0x3b */ + 0x69, 0x8c, 0xc2, 0xe5, 0xd9, 0xdf, 0xe6, 0x5b, 0x39, 0x81, 0x20, 0xaa, 0x02, 0x79, 0x74, 0x73, /* Byte value: 0x3c */ + 0x10, 0x2c, 0x8d, 0x3c, 0x05, 0xe2, 0xae, 0x79, 0x4c, 0xee, 0x99, 0x52, 0x5d, 0xbd, 0x7f, 0x57, /* Byte value: 0x3d */ + 0xf0, 0x67, 0xc7, 0x97, 0x33, 0xf7, 0xf5, 0xe2, 0x02, 0xb3, 0x0b, 0xa8, 0xfd, 0x14, 0xc0, 0x9b, /* Byte value: 0x3e */ + 0xa3, 0x6d, 0xaf, 0xce, 0x4e, 0x31, 0x10, 0x49, 0x21, 0xd9, 0x54, 0x46, 0x94, 0x89, 0x3d, 0x08, /* Byte value: 0x3f */ + 0x09, 0x64, 0x6a, 0x6d, 0xc7, 0xd6, 0x84, 0x8e, 0x52, 0xa0, 0xf0, 0x85, 0x0f, 0x71, 0xb5, 0x42, /* Byte value: 0x40 */ + 0x0d, 0x6f, 0xd8, 0x62, 0x57, 0x0f, 0x4e, 0x01, 0x41, 0x7a, 0x47, 0x70, 0x89, 0xcf, 0xda, 0x27, /* Byte value: 0x41 */ + 0xfd, 0x08, 0x1f, 0xf5, 0x64, 0xf8, 0xbb, 0xe3, 0x43, 0xc9, 0x4c, 0xd8, 0x74, 0xdb, 0x1a, 0xbc, /* Byte value: 0x42 */ + 0x1b, 0xac, 0xbe, 0xb7, 0x8a, 0xb9, 0x4f, 0x51, 0xf6, 0x23, 0xd3, 0x4c, 0x11, 0x93, 0x1c, 0xc6, /* Byte value: 0x43 */ + 0x27, 0xc5, 0xff, 0xe2, 0xf6, 0xf4, 0xe3, 0x88, 0x17, 0x7f, 0xa1, 0x66, 0xbf, 0x96, 0x2c, 0x90, /* Byte value: 0x44 */ + 0x8d, 0xcc, 0x3a, 0x41, 0x7f, 0x13, 0x77, 0x4f, 0x64, 0x06, 0x05, 0xa5, 0x24, 0x6e, 0xa4, 0xda, /* Byte value: 0x45 */ + 0xf2, 0x83, 0x9e, 0x71, 0x7b, 0x7a, 0x90, 0x44, 0xea, 0xde, 0xb1, 0x33, 0xbe, 0x4b, 0x16, 0x48, /* Byte value: 0x46 */ + 0x92, 0x6b, 0x36, 0xf9, 0x65, 0x73, 0xf2, 0x91, 0x81, 0xff, 0x61, 0x1c, 0xb3, 0x43, 0xd7, 0x79, /* Byte value: 0x47 */ + 0x6d, 0x87, 0x70, 0xea, 0x49, 0x06, 0x2c, 0xd4, 0x2a, 0x5b, 0x97, 0x5f, 0x84, 0xc7, 0x1b, 0x16, /* Byte value: 0x48 */ + 0x5d, 0xf3, 0x24, 0xae, 0x46, 0xe3, 0x1d, 0x5f, 0xfe, 0xaa, 0xff, 0xa9, 0x63, 0xc3, 0x9a, 0xef, /* Byte value: 0x49 */ + 0xf1, 0x15, 0x0a, 0xe4, 0x17, 0x50, 0x26, 0xb1, 0x76, 0x64, 0x56, 0x04, 0x3d, 0xda, 0xab, 0x13, /* Byte value: 0x4a */ + 0x21, 0x2a, 0x14, 0x0b, 0x2e, 0xa0, 0x4c, 0xa1, 0xec, 0xc8, 0xac, 0x08, 0x7a, 0x77, 0x95, 0x26, /* Byte value: 0x4b */ + 0x37, 0xe9, 0x72, 0xde, 0xf3, 0x16, 0x4d, 0xf1, 0x5b, 0x91, 0x38, 0x34, 0xe2, 0x2b, 0x53, 0xc7, /* Byte value: 0x4c */ + 0x40, 0xb0, 0x71, 0xf0, 0x14, 0x0e, 0xfd, 0x27, 0xf3, 0x3e, 0x21, 0x8b, 0xb7, 0xb1, 0x3f, 0x9f, /* Byte value: 0x4d */ + 0x8e, 0x5a, 0xae, 0xd4, 0x13, 0x39, 0xc1, 0xba, 0xf8, 0xbc, 0xe2, 0x92, 0xa7, 0xff, 0x19, 0x81, /* Byte value: 0x4e */ + 0xe8, 0x5d, 0xed, 0xb5, 0xd5, 0x64, 0x0c, 0x46, 0x68, 0x2a, 0x3f, 0xd3, 0x6f, 0x16, 0x61, 0x06, /* Byte value: 0x4f */ + 0xe4, 0x40, 0xf8, 0xa4, 0xa6, 0xcc, 0x91, 0x14, 0x5d, 0x87, 0x25, 0x0f, 0x26, 0x17, 0xd0, 0xa9, /* Byte value: 0x50 */ + 0xec, 0x56, 0x5f, 0xba, 0x45, 0xbd, 0xc6, 0xc9, 0x7b, 0xf0, 0x88, 0x26, 0xe9, 0xa8, 0x0e, 0x63, /* Byte value: 0x51 */ + 0x9e, 0x76, 0x23, 0xe8, 0x16, 0xdb, 0x6f, 0xc3, 0xb4, 0x52, 0x7b, 0xc0, 0xfa, 0x42, 0x66, 0xd6, /* Byte value: 0x52 */ + 0x9c, 0x92, 0x7a, 0x0e, 0x5e, 0x56, 0x0a, 0x65, 0x5c, 0x3f, 0xc1, 0x5b, 0xb9, 0x1d, 0xb0, 0x05, /* Byte value: 0x53 */ + 0xd1, 0x4d, 0xd3, 0x9c, 0x1d, 0x57, 0xb9, 0x43, 0xee, 0x7b, 0xa7, 0xa0, 0x87, 0x63, 0x55, 0xbd, /* Byte value: 0x54 */ + 0xe7, 0xd6, 0x6c, 0x31, 0xca, 0xe6, 0x27, 0xe1, 0xc1, 0x3d, 0xc2, 0x38, 0xa5, 0x86, 0x6d, 0xf2, /* Byte value: 0x55 */ + 0xb8, 0xc1, 0x11, 0x79, 0xc4, 0x88, 0x5f, 0x18, 0xd7, 0xfa, 0x87, 0x0a, 0x85, 0x1a, 0x21, 0xce, /* Byte value: 0x56 */ + 0x2f, 0xd3, 0x58, 0xfc, 0x15, 0x85, 0xb4, 0x55, 0x31, 0x08, 0x0c, 0x4f, 0x70, 0x29, 0xf2, 0x5a, /* Byte value: 0x57 */ + 0xe2, 0xaf, 0x13, 0x4d, 0x7e, 0x98, 0x3e, 0x3d, 0xa6, 0x30, 0x28, 0x61, 0xe3, 0xf6, 0x69, 0x1f, /* Byte value: 0x58 */ + 0x8a, 0x51, 0x1c, 0xdb, 0x83, 0xe0, 0x0b, 0x35, 0xeb, 0x66, 0x55, 0x67, 0x21, 0x41, 0x76, 0xe4, /* Byte value: 0x59 */ + 0xd7, 0xa2, 0x38, 0x75, 0xc5, 0x03, 0x16, 0x6a, 0x15, 0xcc, 0xaa, 0xce, 0x42, 0x82, 0xec, 0x0b, /* Byte value: 0x5a */ + 0xb4, 0xdc, 0x04, 0x68, 0xb7, 0x20, 0xc2, 0x4a, 0xe2, 0x57, 0x9d, 0xd6, 0xcc, 0x1b, 0x90, 0x61, /* Byte value: 0x5b */ + 0x29, 0x3c, 0xb3, 0x15, 0xcd, 0xd1, 0x1b, 0x7c, 0xca, 0xbf, 0x01, 0x21, 0xb5, 0xc8, 0x4b, 0xec, /* Byte value: 0x5c */ + 0x13, 0xba, 0x19, 0xa9, 0x69, 0xc8, 0x18, 0x8c, 0xd0, 0x54, 0x7e, 0x65, 0xde, 0x2c, 0xc2, 0x0c, /* Byte value: 0x5d */ + 0x98, 0x99, 0xc8, 0x01, 0xce, 0x8f, 0xc0, 0xea, 0x4f, 0xe5, 0x76, 0xae, 0x3f, 0xa3, 0xdf, 0x60, /* Byte value: 0x5e */ + 0x80, 0xa3, 0xe2, 0x23, 0x28, 0x1c, 0x39, 0x4e, 0x25, 0x7c, 0x42, 0xd5, 0xad, 0xa1, 0x7e, 0xfd, /* Byte value: 0x5f */ + 0xa6, 0x14, 0xd0, 0xb2, 0xfa, 0x4f, 0x09, 0x95, 0x46, 0xd4, 0xbe, 0x1f, 0xd2, 0xf9, 0x39, 0xe5, /* Byte value: 0x60 */ + 0x62, 0x0c, 0xf1, 0x6e, 0x56, 0x84, 0x07, 0x73, 0x83, 0x4c, 0x6a, 0xb4, 0x4e, 0x57, 0x17, 0xe2, /* Byte value: 0x61 */ + 0xb3, 0x41, 0x22, 0xf2, 0x4b, 0xd3, 0xbe, 0x30, 0x6d, 0x37, 0xcd, 0x14, 0xc9, 0x34, 0x42, 0x5f, /* Byte value: 0x62 */ + 0x5e, 0x65, 0xb0, 0x3b, 0x2a, 0xc9, 0xab, 0xaa, 0x62, 0x10, 0x18, 0x9e, 0xe0, 0x52, 0x27, 0xb4, /* Byte value: 0x63 */ + 0x72, 0x20, 0x7c, 0x52, 0x53, 0x66, 0xa9, 0x0a, 0xcf, 0xa2, 0xf3, 0xe6, 0x13, 0xea, 0x68, 0xb5, /* Byte value: 0x64 */ + 0x43, 0x26, 0xe5, 0x65, 0x78, 0x24, 0x4b, 0xd2, 0x6f, 0x84, 0xc6, 0xbc, 0x34, 0x20, 0x82, 0xc4, /* Byte value: 0x65 */ + 0x34, 0x7f, 0xe6, 0x4b, 0x9f, 0x3c, 0xfb, 0x04, 0xc7, 0x2b, 0xdf, 0x03, 0x61, 0xba, 0xee, 0x9c, /* Byte value: 0x66 */ + 0x35, 0x0d, 0x2b, 0x38, 0xbb, 0x9b, 0x28, 0x57, 0xb3, 0xfc, 0x82, 0xaf, 0xa1, 0x74, 0x85, 0x14, /* Byte value: 0x67 */ + 0x52, 0x78, 0xa5, 0x2a, 0x59, 0x61, 0x36, 0xf8, 0x57, 0xbd, 0x02, 0x42, 0xa9, 0x53, 0x96, 0x1b, /* Byte value: 0x68 */ + 0x26, 0xb7, 0x32, 0x91, 0xd2, 0x53, 0x30, 0xdb, 0x63, 0xa8, 0xfc, 0xca, 0x7f, 0x58, 0x47, 0x18, /* Byte value: 0x69 */ + 0x7d, 0xab, 0xfd, 0xd6, 0x4c, 0xe4, 0x82, 0xad, 0x66, 0xb5, 0x0e, 0x0d, 0xd9, 0x7a, 0x64, 0x41, /* Byte value: 0x6a */ + 0xb7, 0x4a, 0x90, 0xfd, 0xdb, 0x0a, 0x74, 0xbf, 0x7e, 0xed, 0x7a, 0xe1, 0x4f, 0x8a, 0x2d, 0x3a, /* Byte value: 0x6b */ + 0x0a, 0xf2, 0xfe, 0xf8, 0xab, 0xfc, 0x32, 0x7b, 0xce, 0x1a, 0x17, 0xb2, 0x8c, 0xe0, 0x08, 0x19, /* Byte value: 0x6c */ + 0x45, 0xc9, 0x0e, 0x8c, 0xa0, 0x70, 0xe4, 0xfb, 0x94, 0x33, 0xcb, 0xd2, 0xf1, 0xc1, 0x3b, 0x72, /* Byte value: 0x6d */ + 0x81, 0xd1, 0x2f, 0x50, 0x0c, 0xbb, 0xea, 0x1d, 0x51, 0xab, 0x1f, 0x79, 0x6d, 0x6f, 0x15, 0x75, /* Byte value: 0x6e */ + 0x6e, 0x11, 0xe4, 0x7f, 0x25, 0x2c, 0x9a, 0x21, 0xb6, 0xe1, 0x70, 0x68, 0x07, 0x56, 0xa6, 0x4d, /* Byte value: 0x6f */ + 0x53, 0x0a, 0x68, 0x59, 0x7d, 0xc6, 0xe5, 0xab, 0x23, 0x6a, 0x5f, 0xee, 0x69, 0x9d, 0xfd, 0x93, /* Byte value: 0x70 */ + 0x4a, 0x42, 0x8f, 0x08, 0xbf, 0xf2, 0xcf, 0x5c, 0x3d, 0x24, 0x36, 0x39, 0x3b, 0x51, 0x37, 0x86, /* Byte value: 0x71 */ + 0x79, 0xa0, 0x4f, 0xd9, 0xdc, 0x3d, 0x48, 0x22, 0x75, 0x6f, 0xb9, 0xf8, 0x5f, 0xc4, 0x0b, 0x24, /* Byte value: 0x72 */ + 0x32, 0x90, 0x0d, 0xa2, 0x47, 0x68, 0x54, 0x2d, 0x3c, 0x9c, 0xd2, 0x6d, 0xa4, 0x5b, 0x57, 0x2a, /* Byte value: 0x73 */ + 0x61, 0x9a, 0x65, 0xfb, 0x3a, 0xae, 0xb1, 0x86, 0x1f, 0xf6, 0x8d, 0x83, 0xcd, 0xc6, 0xaa, 0xb9, /* Byte value: 0x74 */ + 0xfb, 0xe7, 0xf4, 0x1c, 0xbc, 0xac, 0x14, 0xca, 0xb8, 0x7e, 0x41, 0xb6, 0xb1, 0x3a, 0xa3, 0x0a, /* Byte value: 0x75 */ + 0x39, 0x10, 0x3e, 0x29, 0xc8, 0x33, 0xb5, 0x05, 0x86, 0x51, 0x98, 0x73, 0xe8, 0x75, 0x34, 0xbb, /* Byte value: 0x76 */ + 0xc0, 0x13, 0x93, 0xd3, 0x3c, 0x12, 0xc4, 0x69, 0xd6, 0x42, 0x63, 0x5e, 0x1a, 0x10, 0x41, 0x62, /* Byte value: 0x77 */ + 0xfa, 0x95, 0x39, 0x6f, 0x98, 0x0b, 0xc7, 0x99, 0xcc, 0xa9, 0x1c, 0x1a, 0x71, 0xf4, 0xc8, 0x82, /* Byte value: 0x78 */ + 0x5b, 0x1c, 0xcf, 0x47, 0x9e, 0xb7, 0xb2, 0x76, 0x05, 0x1d, 0xf2, 0xc7, 0xa6, 0x22, 0x23, 0x59, /* Byte value: 0x79 */ + 0xa4, 0xf0, 0x89, 0x54, 0xb2, 0xc2, 0x6c, 0x33, 0xae, 0xb9, 0x04, 0x84, 0x91, 0xa6, 0xef, 0x36, /* Byte value: 0x7a */ + 0xba, 0x25, 0x48, 0x9f, 0x8c, 0x05, 0x3a, 0xbe, 0x3f, 0x97, 0x3d, 0x91, 0xc6, 0x45, 0xf7, 0x1d, /* Byte value: 0x7b */ + 0xda, 0xcd, 0xe0, 0x17, 0x92, 0x0c, 0x58, 0x6b, 0x54, 0xb6, 0xed, 0xbe, 0xcb, 0x4d, 0x36, 0x2c, /* Byte value: 0x7c */ + 0x4c, 0xad, 0x64, 0xe1, 0x67, 0xa6, 0x60, 0x75, 0xc6, 0x93, 0x3b, 0x57, 0xfe, 0xb0, 0x8e, 0x30, /* Byte value: 0x7d */ + 0x05, 0x79, 0x7f, 0x7c, 0xb4, 0x7e, 0x19, 0xdc, 0x67, 0x0d, 0xea, 0x59, 0x46, 0x70, 0x04, 0xed, /* Byte value: 0x7e */ + 0xc3, 0x85, 0x07, 0x46, 0x50, 0x38, 0x72, 0x9c, 0x4a, 0xf8, 0x84, 0x69, 0x99, 0x81, 0xfc, 0x39, /* Byte value: 0x7f */ + 0x3a, 0x86, 0xaa, 0xbc, 0xa4, 0x19, 0x03, 0xf0, 0x1a, 0xeb, 0x7f, 0x44, 0x6b, 0xe4, 0x89, 0xe0, /* Byte value: 0x80 */ + 0x82, 0x47, 0xbb, 0xc5, 0x60, 0x91, 0x5c, 0xe8, 0xcd, 0x11, 0xf8, 0x4e, 0xee, 0xfe, 0xa8, 0x2e, /* Byte value: 0x81 */ + 0x18, 0x3a, 0x2a, 0x22, 0xe6, 0x93, 0xf9, 0xa4, 0x6a, 0x99, 0x34, 0x7b, 0x92, 0x02, 0xa1, 0x9d, /* Byte value: 0x82 */ + 0xc9, 0x77, 0xf9, 0xbe, 0xfb, 0xc4, 0x40, 0xe7, 0x84, 0xe2, 0x93, 0xdb, 0x15, 0x61, 0xf4, 0x20, /* Byte value: 0x83 */ + 0x68, 0xfe, 0x0f, 0x96, 0xfd, 0x78, 0x35, 0x08, 0x4d, 0x56, 0x7d, 0x06, 0xc2, 0xb7, 0x1f, 0xfb, /* Byte value: 0x84 */ + 0xf6, 0x88, 0x2c, 0x7e, 0xeb, 0xa3, 0x5a, 0xcb, 0xf9, 0x04, 0x06, 0xc6, 0x38, 0xf5, 0x79, 0x2d, /* Byte value: 0x85 */ + 0x63, 0x7e, 0x3c, 0x1d, 0x72, 0x23, 0xd4, 0x20, 0xf7, 0x9b, 0x37, 0x18, 0x8e, 0x99, 0x7c, 0x6a, /* Byte value: 0x86 */ + 0x87, 0x3e, 0xc4, 0xb9, 0xd4, 0xef, 0x45, 0x34, 0xaa, 0x1c, 0x12, 0x17, 0xa8, 0x8e, 0xac, 0xc3, /* Byte value: 0x87 */ + 0x49, 0xd4, 0x1b, 0x9d, 0xd3, 0xd8, 0x79, 0xa9, 0xa1, 0x9e, 0xd1, 0x0e, 0xb8, 0xc0, 0x8a, 0xdd, /* Byte value: 0x88 */ + 0x36, 0x9b, 0xbf, 0xad, 0xd7, 0xb1, 0x9e, 0xa2, 0x2f, 0x46, 0x65, 0x98, 0x22, 0xe5, 0x38, 0x4f, /* Byte value: 0x89 */ + 0x91, 0xfd, 0xa2, 0x6c, 0x09, 0x59, 0x44, 0x64, 0x1d, 0x45, 0x86, 0x2b, 0x30, 0xd2, 0x6a, 0x22, /* Byte value: 0x8a */ + 0x97, 0x12, 0x49, 0x85, 0xd1, 0x0d, 0xeb, 0x4d, 0xe6, 0xf2, 0x8b, 0x45, 0xf5, 0x33, 0xd3, 0x94, /* Byte value: 0x8b */ + 0x33, 0xe2, 0xc0, 0xd1, 0x63, 0xcf, 0x87, 0x7e, 0x48, 0x4b, 0x8f, 0xc1, 0x64, 0x95, 0x3c, 0xa2, /* Byte value: 0x8c */ + 0x08, 0x16, 0xa7, 0x1e, 0xe3, 0x71, 0x57, 0xdd, 0x26, 0x77, 0xad, 0x29, 0xcf, 0xbf, 0xde, 0xca, /* Byte value: 0x8d */ + 0x7c, 0xd9, 0x30, 0xa5, 0x68, 0x43, 0x51, 0xfe, 0x12, 0x62, 0x53, 0xa1, 0x19, 0xb4, 0x0f, 0xc9, /* Byte value: 0x8e */ + 0x02, 0xe4, 0x59, 0xe6, 0x48, 0x8d, 0x65, 0xa6, 0xe8, 0x6d, 0xba, 0x9b, 0x43, 0x5f, 0xd6, 0xd3, /* Byte value: 0x8f */ + 0x77, 0x59, 0x03, 0x2e, 0xe7, 0x18, 0xb0, 0xd6, 0xa8, 0xaf, 0x19, 0xbf, 0x55, 0x9a, 0x6c, 0x58, /* Byte value: 0x90 */ + 0x85, 0xda, 0x9d, 0x5f, 0x9c, 0x62, 0x20, 0x92, 0x42, 0x71, 0xa8, 0x8c, 0xeb, 0xd1, 0x7a, 0x10, /* Byte value: 0x91 */ + 0x66, 0x07, 0x43, 0x61, 0xc6, 0x5d, 0xcd, 0xfc, 0x90, 0x96, 0xdd, 0x41, 0xc8, 0xe9, 0x78, 0x87, /* Byte value: 0x92 */ + 0x41, 0xc2, 0xbc, 0x83, 0x30, 0xa9, 0x2e, 0x74, 0x87, 0xe9, 0x7c, 0x27, 0x77, 0x7f, 0x54, 0x17, /* Byte value: 0x93 */ + 0x30, 0x74, 0x54, 0x44, 0x0f, 0xe5, 0x31, 0x8b, 0xd4, 0xf1, 0x68, 0xf6, 0xe7, 0x04, 0x81, 0xf9, /* Byte value: 0x94 */ + 0xcd, 0x7c, 0x4b, 0xb1, 0x6b, 0x1d, 0x8a, 0x68, 0x97, 0x38, 0x24, 0x2e, 0x93, 0xdf, 0x9b, 0x45, /* Byte value: 0x95 */ + 0xd0, 0x3f, 0x1e, 0xef, 0x39, 0xf0, 0x6a, 0x10, 0x9a, 0xac, 0xfa, 0x0c, 0x47, 0xad, 0x3e, 0x35, /* Byte value: 0x96 */ + 0xd9, 0x5b, 0x74, 0x82, 0xfe, 0x26, 0xee, 0x9e, 0xc8, 0x0c, 0x0a, 0x89, 0x48, 0xdc, 0x8b, 0x77, /* Byte value: 0x97 */ + 0xa9, 0x9f, 0x51, 0x36, 0xe5, 0xcd, 0x22, 0x32, 0xef, 0xc3, 0x43, 0xf4, 0x18, 0x69, 0x35, 0x11, /* Byte value: 0x98 */ + 0xaa, 0x09, 0xc5, 0xa3, 0x89, 0xe7, 0x94, 0xc7, 0x73, 0x79, 0xa4, 0xc3, 0x9b, 0xf8, 0x88, 0x4a, /* Byte value: 0x99 */ + 0xc5, 0x6a, 0xec, 0xaf, 0x88, 0x6c, 0xdd, 0xb5, 0xb1, 0x4f, 0x89, 0x07, 0x5c, 0x60, 0x45, 0x8f, /* Byte value: 0x9a */ + 0x60, 0xe8, 0xa8, 0x88, 0x1e, 0x09, 0x62, 0xd5, 0x6b, 0x21, 0xd0, 0x2f, 0x0d, 0x08, 0xc1, 0x31, /* Byte value: 0x9b */ + 0xf8, 0x71, 0x60, 0x89, 0xd0, 0x86, 0xa2, 0x3f, 0x24, 0xc4, 0xa6, 0x81, 0x32, 0xab, 0x1e, 0x51, /* Byte value: 0x9c */ + 0x04, 0x0b, 0xb2, 0x0f, 0x90, 0xd9, 0xca, 0x8f, 0x13, 0xda, 0xb7, 0xf5, 0x86, 0xbe, 0x6f, 0x65, /* Byte value: 0x9d */ + 0x90, 0x8f, 0x6f, 0x1f, 0x2d, 0xfe, 0x97, 0x37, 0x69, 0x92, 0xdb, 0x87, 0xf0, 0x1c, 0x01, 0xaa, /* Byte value: 0x9e */ + 0xe6, 0xa4, 0xa1, 0x42, 0xee, 0x41, 0xf4, 0xb2, 0xb5, 0xea, 0x9f, 0x94, 0x65, 0x48, 0x06, 0x7a, /* Byte value: 0x9f */ + 0x96, 0x60, 0x84, 0xf6, 0xf5, 0xaa, 0x38, 0x1e, 0x92, 0x25, 0xd6, 0xe9, 0x35, 0xfd, 0xb8, 0x1c, /* Byte value: 0xa0 */ + 0xaf, 0x70, 0xba, 0xdf, 0x3d, 0x99, 0x8d, 0x1b, 0x14, 0x74, 0x4e, 0x9a, 0xdd, 0x88, 0x8c, 0xa7, /* Byte value: 0xa1 */ + 0xc6, 0xfc, 0x78, 0x3a, 0xe4, 0x46, 0x6b, 0x40, 0x2d, 0xf5, 0x6e, 0x30, 0xdf, 0xf1, 0xf8, 0xd4, /* Byte value: 0xa2 */ + 0xa7, 0x66, 0x1d, 0xc1, 0xde, 0xe8, 0xda, 0xc6, 0x32, 0x03, 0xe3, 0xb3, 0x12, 0x37, 0x52, 0x6d, /* Byte value: 0xa3 */ + 0xa1, 0x89, 0xf6, 0x28, 0x06, 0xbc, 0x75, 0xef, 0xc9, 0xb4, 0xee, 0xdd, 0xd7, 0xd6, 0xeb, 0xdb, /* Byte value: 0xa4 */ + 0xd8, 0x29, 0xb9, 0xf1, 0xda, 0x81, 0x3d, 0xcd, 0xbc, 0xdb, 0x57, 0x25, 0x88, 0x12, 0xe0, 0xff, /* Byte value: 0xa5 */ + 0x1e, 0xd5, 0xc1, 0xcb, 0x3e, 0xc7, 0x56, 0x8d, 0x91, 0x2e, 0x39, 0x15, 0x57, 0xe3, 0x18, 0x2b, /* Byte value: 0xa6 */ + 0x4d, 0xdf, 0xa9, 0x92, 0x43, 0x01, 0xb3, 0x26, 0xb2, 0x44, 0x66, 0xfb, 0x3e, 0x7e, 0xe5, 0xb8, /* Byte value: 0xa7 */ + 0x64, 0xe3, 0x1a, 0x87, 0x8e, 0xd0, 0xa8, 0x5a, 0x78, 0xfb, 0x67, 0xda, 0x8b, 0xb6, 0xae, 0x54, /* Byte value: 0xa8 */ + 0x9a, 0x7d, 0x91, 0xe7, 0x86, 0x02, 0xa5, 0x4c, 0xa7, 0x88, 0xcc, 0x35, 0x7c, 0xfc, 0x09, 0xb3, /* Byte value: 0xa9 */ + 0xe3, 0xdd, 0xde, 0x3e, 0x5a, 0x3f, 0xed, 0x6e, 0xd2, 0xe7, 0x75, 0xcd, 0x23, 0x38, 0x02, 0x97, /* Byte value: 0xaa */ + 0xf9, 0x03, 0xad, 0xfa, 0xf4, 0x21, 0x71, 0x6c, 0x50, 0x13, 0xfb, 0x2d, 0xf2, 0x65, 0x75, 0xd9, /* Byte value: 0xab */ + 0xf7, 0xfa, 0xe1, 0x0d, 0xcf, 0x04, 0x89, 0x98, 0x8d, 0xd3, 0x5b, 0x6a, 0xf8, 0x3b, 0x12, 0xa5, /* Byte value: 0xac */ + 0x19, 0x48, 0xe7, 0x51, 0xc2, 0x34, 0x2a, 0xf7, 0x1e, 0x4e, 0x69, 0xd7, 0x52, 0xcc, 0xca, 0x15, /* Byte value: 0xad */ + 0x83, 0x35, 0x76, 0xb6, 0x44, 0x36, 0x8f, 0xbb, 0xb9, 0xc6, 0xa5, 0xe2, 0x2e, 0x30, 0xc3, 0xa6, /* Byte value: 0xae */ + 0x4b, 0x30, 0x42, 0x7b, 0x9b, 0x55, 0x1c, 0x0f, 0x49, 0xf3, 0x6b, 0x95, 0xfb, 0x9f, 0x5c, 0x0e, /* Byte value: 0xaf */ + 0x4f, 0x3b, 0xf0, 0x74, 0x0b, 0x8c, 0xd6, 0x80, 0x5a, 0x29, 0xdc, 0x60, 0x7d, 0x21, 0x33, 0x6b, /* Byte value: 0xb0 */ + 0x7b, 0x44, 0x16, 0x3f, 0x94, 0xb0, 0x2d, 0x84, 0x9d, 0x02, 0x03, 0x63, 0x1c, 0x9b, 0xdd, 0xf7, /* Byte value: 0xb1 */ + 0xef, 0xc0, 0xcb, 0x2f, 0x29, 0x97, 0x70, 0x3c, 0xe7, 0x4a, 0x6f, 0x11, 0x6a, 0x39, 0xb3, 0x38, /* Byte value: 0xb2 */ + 0x9d, 0xe0, 0xb7, 0x7d, 0x7a, 0xf1, 0xd9, 0x36, 0x28, 0xe8, 0x9c, 0xf7, 0x79, 0xd3, 0xdb, 0x8d, /* Byte value: 0xb3 */ + 0x74, 0xcf, 0x97, 0xbb, 0x8b, 0x32, 0x06, 0x23, 0x34, 0x15, 0xfe, 0x88, 0xd6, 0x0b, 0xd1, 0x03, /* Byte value: 0xb4 */ + 0xc7, 0x8e, 0xb5, 0x49, 0xc0, 0xe1, 0xb8, 0x13, 0x59, 0x22, 0x33, 0x9c, 0x1f, 0x3f, 0x93, 0x5c, /* Byte value: 0xb5 */ + 0xca, 0xe1, 0x6d, 0x2b, 0x97, 0xee, 0xf6, 0x12, 0x18, 0x58, 0x74, 0xec, 0x96, 0xf0, 0x49, 0x7b, /* Byte value: 0xb6 */ + 0x6c, 0xf5, 0xbd, 0x99, 0x6d, 0xa1, 0xff, 0x87, 0x5e, 0x8c, 0xca, 0xf3, 0x44, 0x09, 0x70, 0x9e, /* Byte value: 0xb7 */ + 0xf3, 0xf1, 0x53, 0x02, 0x5f, 0xdd, 0x43, 0x17, 0x9e, 0x09, 0xec, 0x9f, 0x7e, 0x85, 0x7d, 0xc0, /* Byte value: 0xb8 */ + 0x31, 0x06, 0x99, 0x37, 0x2b, 0x42, 0xe2, 0xd8, 0xa0, 0x26, 0x35, 0x5a, 0x27, 0xca, 0xea, 0x71, /* Byte value: 0xb9 */ + 0x3e, 0x8d, 0x18, 0xb3, 0x34, 0xc0, 0xc9, 0x7f, 0x09, 0x31, 0xc8, 0xb1, 0xed, 0x5a, 0xe6, 0x85, /* Byte value: 0xba */ + 0x01, 0x72, 0xcd, 0x73, 0x24, 0xa7, 0xd3, 0x53, 0x74, 0xd7, 0x5d, 0xac, 0xc0, 0xce, 0x6b, 0x88, /* Byte value: 0xbb */ + 0xdb, 0xbf, 0x2d, 0x64, 0xb6, 0xab, 0x8b, 0x38, 0x20, 0x61, 0xb0, 0x12, 0x0b, 0x83, 0x5d, 0xa4, /* Byte value: 0xbc */ + 0xc4, 0x18, 0x21, 0xdc, 0xac, 0xcb, 0x0e, 0xe6, 0xc5, 0x98, 0xd4, 0xab, 0x9c, 0xae, 0x2e, 0x07, /* Byte value: 0xbd */ + 0xe1, 0x39, 0x87, 0xd8, 0x12, 0xb2, 0x88, 0xc8, 0x3a, 0x8a, 0xcf, 0x56, 0x60, 0x67, 0xd4, 0x44, /* Byte value: 0xbe */ + 0xed, 0x24, 0x92, 0xc9, 0x61, 0x1a, 0x15, 0x9a, 0x0f, 0x27, 0xd5, 0x8a, 0x29, 0x66, 0x65, 0xeb, /* Byte value: 0xbf */ + 0xe0, 0x4b, 0x4a, 0xab, 0x36, 0x15, 0x5b, 0x9b, 0x4e, 0x5d, 0x92, 0xfa, 0xa0, 0xa9, 0xbf, 0xcc, /* Byte value: 0xc0 */ + 0x14, 0x27, 0x3f, 0x33, 0x95, 0x3b, 0x64, 0xf6, 0x5f, 0x34, 0x2e, 0xa7, 0xdb, 0x03, 0x10, 0x32, /* Byte value: 0xc1 */ + 0xdf, 0xb4, 0x9f, 0x6b, 0x26, 0x72, 0x41, 0xb7, 0x33, 0xbb, 0x07, 0xe7, 0x8d, 0x3d, 0x32, 0xc1, /* Byte value: 0xc2 */ + 0x50, 0x9c, 0xfc, 0xcc, 0x11, 0xec, 0x53, 0x5e, 0xbf, 0xd0, 0xb8, 0xd9, 0xea, 0x0c, 0x40, 0xc8, /* Byte value: 0xc3 */ + 0xbe, 0x2e, 0xfa, 0x90, 0x1c, 0xdc, 0xf0, 0x31, 0x2c, 0x4d, 0x8a, 0x64, 0x40, 0xfb, 0x98, 0x78, /* Byte value: 0xc4 */ + 0xab, 0x7b, 0x08, 0xd0, 0xad, 0x40, 0x47, 0x94, 0x07, 0xae, 0xf9, 0x6f, 0x5b, 0x36, 0xe3, 0xc2, /* Byte value: 0xc5 */ + 0xae, 0x02, 0x77, 0xac, 0x19, 0x3e, 0x5e, 0x48, 0x60, 0xa3, 0x13, 0x36, 0x1d, 0x46, 0xe7, 0x2f, /* Byte value: 0xc6 */ + 0x51, 0xee, 0x31, 0xbf, 0x35, 0x4b, 0x80, 0x0d, 0xcb, 0x07, 0xe5, 0x75, 0x2a, 0xc2, 0x2b, 0x40, /* Byte value: 0xc7 */ + 0x12, 0xc8, 0xd4, 0xda, 0x4d, 0x6f, 0xcb, 0xdf, 0xa4, 0x83, 0x23, 0xc9, 0x1e, 0xe2, 0xa9, 0x84, /* Byte value: 0xc8 */ + 0x8f, 0x28, 0x63, 0xa7, 0x37, 0x9e, 0x12, 0xe9, 0x8c, 0x6b, 0xbf, 0x3e, 0x67, 0x31, 0x72, 0x09, /* Byte value: 0xc9 */ + 0x1d, 0x43, 0x55, 0x5e, 0x52, 0xed, 0xe0, 0x78, 0x0d, 0x94, 0xde, 0x22, 0xd4, 0x72, 0xa5, 0x70, /* Byte value: 0xca */ + 0xf4, 0x6c, 0x75, 0x98, 0xa3, 0x2e, 0x3f, 0x6d, 0x11, 0x69, 0xbc, 0x5d, 0x7b, 0xaa, 0xaf, 0xfe, /* Byte value: 0xcb */ + 0xd3, 0xa9, 0x8a, 0x7a, 0x55, 0xda, 0xdc, 0xe5, 0x06, 0x16, 0x1d, 0x3b, 0xc4, 0x3c, 0x83, 0x6e, /* Byte value: 0xcc */ + 0xff, 0xec, 0x46, 0x13, 0x2c, 0x75, 0xde, 0x45, 0xab, 0xa4, 0xf6, 0x43, 0x37, 0x84, 0xcc, 0x6f, /* Byte value: 0xcd */ + 0x47, 0x2d, 0x57, 0x6a, 0xe8, 0xfd, 0x81, 0x5d, 0x7c, 0x5e, 0x71, 0x49, 0xb2, 0x9e, 0xed, 0xa1, /* Byte value: 0xce */ + 0x15, 0x55, 0xf2, 0x40, 0xb1, 0x9c, 0xb7, 0xa5, 0x2b, 0xe3, 0x73, 0x0b, 0x1b, 0xcd, 0x7b, 0xba, /* Byte value: 0xcf */ + 0x8b, 0x23, 0xd1, 0xa8, 0xa7, 0x47, 0xd8, 0x66, 0x9f, 0xb1, 0x08, 0xcb, 0xe1, 0x8f, 0x1d, 0x6c, /* Byte value: 0xd0 */ + 0xa0, 0xfb, 0x3b, 0x5b, 0x22, 0x1b, 0xa6, 0xbc, 0xbd, 0x63, 0xb3, 0x71, 0x17, 0x18, 0x80, 0x53, /* Byte value: 0xd1 */ + 0xf5, 0x1e, 0xb8, 0xeb, 0x87, 0x89, 0xec, 0x3e, 0x65, 0xbe, 0xe1, 0xf1, 0xbb, 0x64, 0xc4, 0x76, /* Byte value: 0xd2 */ + 0x28, 0x4e, 0x7e, 0x66, 0xe9, 0x76, 0xc8, 0x2f, 0xbe, 0x68, 0x5c, 0x8d, 0x75, 0x06, 0x20, 0x64, /* Byte value: 0xd3 */ + 0x57, 0x01, 0xda, 0x56, 0xed, 0x1f, 0x2f, 0x24, 0x30, 0xb0, 0xe8, 0x1b, 0xef, 0x23, 0x92, 0xf6, /* Byte value: 0xd4 */ + 0xb2, 0x33, 0xef, 0x81, 0x6f, 0x74, 0x6d, 0x63, 0x19, 0xe0, 0x90, 0xb8, 0x09, 0xfa, 0x29, 0xd7, /* Byte value: 0xd5 */ + 0x24, 0x53, 0x6b, 0x77, 0x9a, 0xde, 0x55, 0x7d, 0x8b, 0xc5, 0x46, 0x51, 0x3c, 0x07, 0x91, 0xcb, /* Byte value: 0xd6 */ + 0xcf, 0x98, 0x12, 0x57, 0x23, 0x90, 0xef, 0xce, 0x7f, 0x55, 0x9e, 0xb5, 0xd0, 0x80, 0x4d, 0x96, /* Byte value: 0xd7 */ + 0x89, 0xc7, 0x88, 0x4e, 0xef, 0xca, 0xbd, 0xc0, 0x77, 0xdc, 0xb2, 0x50, 0xa2, 0xd0, 0xcb, 0xbf, /* Byte value: 0xd8 */ + 0xdd, 0x50, 0xc6, 0x8d, 0x6e, 0xff, 0x24, 0x11, 0xdb, 0xd6, 0xbd, 0x7c, 0xce, 0x62, 0xe4, 0x12, /* Byte value: 0xd9 */ + 0x55, 0xe5, 0x83, 0xb0, 0xa5, 0x92, 0x4a, 0x82, 0xd8, 0xdd, 0x52, 0x80, 0xac, 0x7c, 0x44, 0x25, /* Byte value: 0xda */ + 0x2b, 0xd8, 0xea, 0xf3, 0x85, 0x5c, 0x7e, 0xda, 0x22, 0xd2, 0xbb, 0xba, 0xf6, 0x97, 0x9d, 0x3f, /* Byte value: 0xdb */ + 0x9b, 0x0f, 0x5c, 0x94, 0xa2, 0xa5, 0x76, 0x1f, 0xd3, 0x5f, 0x91, 0x99, 0xbc, 0x32, 0x62, 0x3b, /* Byte value: 0xdc */ + 0xeb, 0xcb, 0x79, 0x20, 0xb9, 0x4e, 0xba, 0xb3, 0xf4, 0x90, 0xd8, 0xe4, 0xec, 0x87, 0xdc, 0x5d, /* Byte value: 0xdd */ + 0xce, 0xea, 0xdf, 0x24, 0x07, 0x37, 0x3c, 0x9d, 0x0b, 0x82, 0xc3, 0x19, 0x10, 0x4e, 0x26, 0x1e, /* Byte value: 0xde */ + 0xe5, 0x32, 0x35, 0xd7, 0x82, 0x6b, 0x42, 0x47, 0x29, 0x50, 0x78, 0xa3, 0xe6, 0xd9, 0xbb, 0x21, /* Byte value: 0xdf */ + 0xb1, 0xa5, 0x7b, 0x14, 0x03, 0x5e, 0xdb, 0x96, 0x85, 0x5a, 0x77, 0x8f, 0x8a, 0x6b, 0x94, 0x8c, /* Byte value: 0xe0 */ + 0x22, 0xbc, 0x80, 0x9e, 0x42, 0x8a, 0xfa, 0x54, 0x70, 0x72, 0x4b, 0x3f, 0xf9, 0xe6, 0x28, 0x7d, /* Byte value: 0xe1 */ + 0xbd, 0xb8, 0x6e, 0x05, 0x70, 0xf6, 0x46, 0xc4, 0xb0, 0xf7, 0x6d, 0x53, 0xc3, 0x6a, 0x25, 0x23, /* Byte value: 0xe2 */ + 0xe9, 0x2f, 0x20, 0xc6, 0xf1, 0xc3, 0xdf, 0x15, 0x1c, 0xfd, 0x62, 0x7f, 0xaf, 0xd8, 0x0a, 0x8e, /* Byte value: 0xe3 */ + 0x23, 0xce, 0x4d, 0xed, 0x66, 0x2d, 0x29, 0x07, 0x04, 0xa5, 0x16, 0x93, 0x39, 0x28, 0x43, 0xf5, /* Byte value: 0xe4 */ + 0x75, 0xbd, 0x5a, 0xc8, 0xaf, 0x95, 0xd5, 0x70, 0x40, 0xc2, 0xa3, 0x24, 0x16, 0xc5, 0xba, 0x8b, /* Byte value: 0xe5 */ + 0x9f, 0x04, 0xee, 0x9b, 0x32, 0x7c, 0xbc, 0x90, 0xc0, 0x85, 0x26, 0x6c, 0x3a, 0x8c, 0x0d, 0x5e, /* Byte value: 0xe6 */ + 0xa2, 0x1f, 0x62, 0xbd, 0x6a, 0x96, 0xc3, 0x1a, 0x55, 0x0e, 0x09, 0xea, 0x54, 0x47, 0x56, 0x80, /* Byte value: 0xe7 */ + 0x0f, 0x8b, 0x81, 0x84, 0x1f, 0x82, 0x2b, 0xa7, 0xa9, 0x17, 0xfd, 0xeb, 0xca, 0x90, 0x0c, 0xf4, /* Byte value: 0xe8 */ + 0x54, 0x97, 0x4e, 0xc3, 0x81, 0x35, 0x99, 0xd1, 0xac, 0x0a, 0x0f, 0x2c, 0x6c, 0xb2, 0x2f, 0xad, /* Byte value: 0xe9 */ + 0x86, 0x4c, 0x09, 0xca, 0xf0, 0x48, 0x96, 0x67, 0xde, 0xcb, 0x4f, 0xbb, 0x68, 0x40, 0xc7, 0x4b, /* Byte value: 0xea */ + 0x93, 0x19, 0xfb, 0x8a, 0x41, 0xd4, 0x21, 0xc2, 0xf5, 0x28, 0x3c, 0xb0, 0x73, 0x8d, 0xbc, 0xf1, /* Byte value: 0xeb */ + 0x5a, 0x6e, 0x02, 0x34, 0xba, 0x10, 0x61, 0x25, 0x71, 0xca, 0xaf, 0x6b, 0x66, 0xec, 0x48, 0xd1, /* Byte value: 0xec */ + 0x3d, 0x1b, 0x8c, 0x26, 0x58, 0xea, 0x7f, 0x8a, 0x95, 0x8b, 0x2f, 0x86, 0x6e, 0xcb, 0x5b, 0xde, /* Byte value: 0xed */ + 0x94, 0x84, 0xdd, 0x10, 0xbd, 0x27, 0x5d, 0xb8, 0x7a, 0x48, 0x6c, 0x72, 0x76, 0xa2, 0x6e, 0xcf, /* Byte value: 0xee */ + 0x56, 0x73, 0x17, 0x25, 0xc9, 0xb8, 0xfc, 0x77, 0x44, 0x67, 0xb5, 0xb7, 0x2f, 0xed, 0xf9, 0x7e, /* Byte value: 0xef */ + 0xbf, 0x5c, 0x37, 0xe3, 0x38, 0x7b, 0x23, 0x62, 0x58, 0x9a, 0xd7, 0xc8, 0x80, 0x35, 0xf3, 0xf0, /* Byte value: 0xf0 */ + 0x95, 0xf6, 0x10, 0x63, 0x99, 0x80, 0x8e, 0xeb, 0x0e, 0x9f, 0x31, 0xde, 0xb6, 0x6c, 0x05, 0x47, /* Byte value: 0xf1 */ + 0xb9, 0xb3, 0xdc, 0x0a, 0xe0, 0x2f, 0x8c, 0x4b, 0xa3, 0x2d, 0xda, 0xa6, 0x45, 0xd4, 0x4a, 0x46, /* Byte value: 0xf2 */ + 0x11, 0x5e, 0x40, 0x4f, 0x21, 0x45, 0x7d, 0x2a, 0x38, 0x39, 0xc4, 0xfe, 0x9d, 0x73, 0x14, 0xdf, /* Byte value: 0xf3 */ + 0x0b, 0x80, 0x33, 0x8b, 0x8f, 0x5b, 0xe1, 0x28, 0xba, 0xcd, 0x4a, 0x1e, 0x4c, 0x2e, 0x63, 0x91, /* Byte value: 0xf4 */ + 0x71, 0xb6, 0xe8, 0xc7, 0x3f, 0x4c, 0x1f, 0xff, 0x53, 0x18, 0x14, 0xd1, 0x90, 0x7b, 0xd5, 0xee, /* Byte value: 0xf5 */ + 0xb0, 0xd7, 0xb6, 0x67, 0x27, 0xf9, 0x08, 0xc5, 0xf1, 0x8d, 0x2a, 0x23, 0x4a, 0xa5, 0xff, 0x04, /* Byte value: 0xf6 */ + 0x1c, 0x31, 0x98, 0x2d, 0x76, 0x4a, 0x33, 0x2b, 0x79, 0x43, 0x83, 0x8e, 0x14, 0xbc, 0xce, 0xf8, /* Byte value: 0xf7 */ + 0xdc, 0x22, 0x0b, 0xfe, 0x4a, 0x58, 0xf7, 0x42, 0xaf, 0x01, 0xe0, 0xd0, 0x0e, 0xac, 0x8f, 0x9a, /* Byte value: 0xf8 */ + 0xa8, 0xed, 0x9c, 0x45, 0xc1, 0x6a, 0xf1, 0x61, 0x9b, 0x14, 0x1e, 0x58, 0xd8, 0xa7, 0x5e, 0x99, /* Byte value: 0xf9 */ + 0xc1, 0x61, 0x5e, 0xa0, 0x18, 0xb5, 0x17, 0x3a, 0xa2, 0x95, 0x3e, 0xf2, 0xda, 0xde, 0x2a, 0xea, /* Byte value: 0xfa */ + 0x2a, 0xaa, 0x27, 0x80, 0xa1, 0xfb, 0xad, 0x89, 0x56, 0x05, 0xe6, 0x16, 0x36, 0x59, 0xf6, 0xb7, /* Byte value: 0xfb */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xfc */ + 0xac, 0xe6, 0x2e, 0x4a, 0x51, 0xb3, 0x3b, 0xee, 0x88, 0xce, 0xa9, 0xad, 0x5e, 0x19, 0x31, 0xfc, /* Byte value: 0xfd */ + 0x48, 0xa6, 0xd6, 0xee, 0xf7, 0x7f, 0xaa, 0xfa, 0xd5, 0x49, 0x8c, 0xa2, 0x78, 0x0e, 0xe1, 0x55, /* Byte value: 0xfe */ + 0x7a, 0x36, 0xdb, 0x4c, 0xb0, 0x17, 0xfe, 0xd7, 0xe9, 0xd5, 0x5e, 0xcf, 0xdc, 0x55, 0xb6, 0x7f, /* Byte value: 0xff */ +}; + +const uint8_t ALIGNED(precomputedLSTable[16 * 256 * 16]) = { + /* Matrix row: 0 */ + 0xe9, 0xfb, 0xd5, 0x0c, 0x7a, 0xc0, 0x80, 0x96, 0x19, 0x11, 0x87, 0x93, 0x1b, 0xc9, 0xae, 0xb5, /* Byte value: 0x01 */ + 0x19, 0x08, 0xe0, 0x8c, 0xb2, 0x17, 0x1a, 0xce, 0x7b, 0x32, 0xfc, 0xab, 0xf8, 0xfe, 0xf2, 0x0a, /* Byte value: 0x02 */ + 0xbf, 0xcb, 0xd0, 0xa2, 0x50, 0xb2, 0xdc, 0x77, 0xc0, 0xbd, 0xca, 0xef, 0x4e, 0x88, 0xc7, 0x89, /* Byte value: 0x03 */ + 0x62, 0x41, 0x10, 0x1a, 0x5e, 0x63, 0x42, 0xd6, 0x69, 0xc4, 0x12, 0x3c, 0xd3, 0x93, 0x13, 0xc0, /* Byte value: 0x04 */ + 0x4f, 0x38, 0xe5, 0x22, 0x98, 0x65, 0x46, 0x2f, 0xa2, 0x9e, 0xb1, 0xd7, 0xad, 0xbf, 0x9b, 0x36, /* Byte value: 0x05 */ + 0x38, 0xb3, 0x39, 0x6a, 0x11, 0x6f, 0x4a, 0xe7, 0x3c, 0x70, 0x97, 0x29, 0x2f, 0xcb, 0xc0, 0xef, /* Byte value: 0x06 */ + 0xfb, 0x1f, 0xb7, 0xc2, 0x06, 0x7d, 0x56, 0x4d, 0x08, 0x35, 0x78, 0xfd, 0x96, 0x0f, 0xfe, 0x68, /* Byte value: 0x07 */ + 0x4a, 0x88, 0xf8, 0x9b, 0xc3, 0xa4, 0x79, 0x73, 0xc7, 0x94, 0xe7, 0x89, 0xa3, 0xc5, 0x09, 0xaa, /* Byte value: 0x08 */ + 0xc1, 0x32, 0x3d, 0x8d, 0xe7, 0x07, 0xbb, 0x33, 0xb7, 0x41, 0x72, 0x26, 0x6b, 0x9f, 0xb4, 0xdf, /* Byte value: 0x09 */ + 0x6a, 0x7c, 0x99, 0x8e, 0x18, 0x37, 0x9b, 0xf7, 0x20, 0xd4, 0x23, 0x72, 0x1d, 0x3c, 0x7e, 0x63, /* Byte value: 0x0a */ + 0x0e, 0x5c, 0x9f, 0xfb, 0x95, 0x6b, 0xf3, 0x49, 0x0f, 0x1c, 0x55, 0x9b, 0x7b, 0x42, 0x30, 0x4b, /* Byte value: 0x0b */ + 0x97, 0x02, 0x38, 0x23, 0xcd, 0x75, 0xe7, 0xd2, 0x6e, 0xed, 0x3f, 0x5a, 0x3e, 0xde, 0xdd, 0xe3, /* Byte value: 0x0c */ + 0x0b, 0xec, 0x82, 0x42, 0xce, 0xaa, 0xcc, 0x15, 0x6a, 0x16, 0x03, 0xc5, 0x75, 0x38, 0xa2, 0xd7, /* Byte value: 0x0d */ + 0xa5, 0x12, 0x3b, 0xf8, 0x6a, 0x5b, 0xd3, 0x8d, 0x98, 0x89, 0x04, 0xcf, 0x0d, 0xe1, 0xfa, 0xf7, /* Byte value: 0x0e */ + 0xba, 0x7b, 0xcd, 0x1b, 0x0b, 0x73, 0xe3, 0x2b, 0xa5, 0xb7, 0x9c, 0xb1, 0x40, 0xf2, 0x55, 0x15, /* Byte value: 0x0f */ + 0x33, 0x5f, 0xbb, 0x28, 0xdf, 0xc5, 0x86, 0xf2, 0x56, 0x66, 0x94, 0xec, 0x5a, 0xf3, 0x62, 0x38, /* Byte value: 0x10 */ + 0x31, 0xc1, 0x08, 0x0d, 0x2f, 0xd0, 0x21, 0x6b, 0xd5, 0x62, 0x09, 0x1e, 0x88, 0xa8, 0xe8, 0x60, /* Byte value: 0x11 */ + 0xed, 0x04, 0x70, 0x46, 0x59, 0xea, 0x0d, 0x67, 0xdc, 0x19, 0x7e, 0xb4, 0x7c, 0x7f, 0x79, 0x05, /* Byte value: 0x12 */ + 0xe4, 0x76, 0x41, 0x21, 0x67, 0x55, 0x66, 0xeb, 0x35, 0x0b, 0xe0, 0x83, 0xdb, 0x1c, 0x51, 0x8a, /* Byte value: 0x13 */ + 0x58, 0x6c, 0x9a, 0x55, 0xbf, 0x19, 0xaf, 0xa8, 0xd6, 0xb0, 0x18, 0xe7, 0x2e, 0x03, 0x59, 0x77, /* Byte value: 0x14 */ + 0x1e, 0x26, 0x4e, 0x10, 0x19, 0xc3, 0x82, 0x0b, 0x9d, 0x3c, 0x37, 0x07, 0x24, 0xdf, 0xea, 0xce, /* Byte value: 0x15 */ + 0xc9, 0x0f, 0xb4, 0x19, 0xa1, 0x53, 0x62, 0x12, 0xfe, 0x51, 0x43, 0x68, 0xa5, 0x30, 0xd9, 0x7c, /* Byte value: 0x16 */ + 0xf4, 0x0c, 0x90, 0xca, 0xeb, 0xfd, 0x17, 0xa9, 0xa7, 0x2b, 0x82, 0x1f, 0x84, 0x81, 0x8b, 0x0f, /* Byte value: 0x17 */ + 0xff, 0xe0, 0x12, 0x88, 0x25, 0x57, 0xdb, 0xbc, 0xcd, 0x3d, 0x81, 0xda, 0xf1, 0xb9, 0x29, 0xd8, /* Byte value: 0x18 */ + 0x85, 0xe6, 0x5a, 0xed, 0xb1, 0xc8, 0x31, 0x09, 0x7f, 0xc9, 0xc0, 0x34, 0xb3, 0x18, 0x8d, 0x3e, /* Byte value: 0x19 */ + 0xd3, 0xd6, 0x5f, 0x43, 0x9b, 0xba, 0x6d, 0xe8, 0xa6, 0x65, 0x8d, 0x48, 0xe6, 0x59, 0xe4, 0x02, /* Byte value: 0x1a */ + 0x2b, 0x18, 0xe3, 0x57, 0x15, 0x39, 0x2e, 0x91, 0x8d, 0x56, 0xc7, 0x3e, 0xcb, 0xc1, 0xd5, 0x1e, /* Byte value: 0x1b */ + 0x30, 0x8e, 0xb0, 0xfe, 0x57, 0x3b, 0x93, 0xc6, 0x75, 0x60, 0xa6, 0x67, 0xe1, 0x64, 0xad, 0x4c, /* Byte value: 0x1c */ + 0x17, 0x54, 0x7f, 0x77, 0x27, 0x7c, 0xe9, 0x87, 0x74, 0x2e, 0xa9, 0x30, 0x83, 0xbc, 0xc2, 0x41, /* Byte value: 0x1d */ + 0x12, 0xe4, 0x62, 0xce, 0x7c, 0xbd, 0xd6, 0xdb, 0x11, 0x24, 0xff, 0x6e, 0x8d, 0xc6, 0x50, 0xdd, /* Byte value: 0x1e */ + 0xc3, 0xac, 0x8e, 0xa8, 0x17, 0x12, 0x1c, 0xaa, 0x34, 0x45, 0xef, 0xd4, 0xb9, 0xc4, 0x3e, 0x87, /* Byte value: 0x1f */ + 0x1f, 0x69, 0xf6, 0xe3, 0x61, 0x28, 0x30, 0xa6, 0x3d, 0x3e, 0x98, 0x7e, 0x4d, 0x13, 0xaf, 0xe2, /* Byte value: 0x20 */ + 0x9c, 0xee, 0xba, 0x61, 0x03, 0xdf, 0x2b, 0xc7, 0x04, 0xfb, 0x3c, 0x9f, 0x4b, 0xe6, 0x7f, 0x34, /* Byte value: 0x21 */ + 0x1a, 0xd9, 0xeb, 0x5a, 0x3a, 0xe9, 0x0f, 0xfa, 0x58, 0x34, 0xce, 0x20, 0x43, 0x69, 0x3d, 0x7e, /* Byte value: 0x22 */ + 0x1d, 0xf7, 0x45, 0xc6, 0x91, 0x3d, 0x97, 0x3f, 0xbe, 0x3a, 0x05, 0x8c, 0x9f, 0x48, 0x25, 0xba, /* Byte value: 0x23 */ + 0xb6, 0xb9, 0xe1, 0xc5, 0x6e, 0x0d, 0xb7, 0xfb, 0x29, 0xaf, 0x54, 0xd8, 0xe9, 0xeb, 0xef, 0x06, /* Byte value: 0x24 */ + 0x14, 0x85, 0x74, 0xa1, 0xaf, 0x82, 0xfc, 0xb3, 0x57, 0x28, 0x9b, 0xbb, 0x38, 0x2b, 0x0d, 0x35, /* Byte value: 0x25 */ + 0x51, 0x1e, 0xab, 0x32, 0x81, 0xa6, 0xc4, 0x24, 0x3f, 0xa2, 0x86, 0xd0, 0x89, 0x60, 0x71, 0xf8, /* Byte value: 0x26 */ + 0xd6, 0x66, 0x42, 0xfa, 0xc0, 0x7b, 0x52, 0xb4, 0xc3, 0x6f, 0xdb, 0x16, 0xe8, 0x23, 0x76, 0x9e, /* Byte value: 0x27 */ + 0x56, 0x30, 0x05, 0xae, 0x2a, 0x72, 0x5c, 0xe1, 0xd9, 0xac, 0x4d, 0x7c, 0x55, 0x41, 0x69, 0x3c, /* Byte value: 0x28 */ + 0xee, 0xd5, 0x7b, 0x90, 0xd1, 0x14, 0x18, 0x53, 0xff, 0x1f, 0x4c, 0x3f, 0xc7, 0xe8, 0xb6, 0x71, /* Byte value: 0x29 */ + 0xa0, 0xa2, 0x26, 0x41, 0x31, 0x9a, 0xec, 0xd1, 0xfd, 0x83, 0x52, 0x91, 0x03, 0x9b, 0x68, 0x6b, /* Byte value: 0x2a */ + 0x39, 0xfc, 0x81, 0x99, 0x69, 0x84, 0xf8, 0x4a, 0x9c, 0x72, 0x38, 0x50, 0x46, 0x07, 0x85, 0xc3, /* Byte value: 0x2b */ + 0xac, 0x60, 0x0a, 0x9f, 0x54, 0xe4, 0xb8, 0x01, 0x71, 0x9b, 0x9a, 0xf8, 0xaa, 0x82, 0xd2, 0x78, /* Byte value: 0x2c */ + 0x04, 0xff, 0xa5, 0x4a, 0x23, 0x2a, 0x8d, 0xf1, 0xc5, 0x08, 0xf9, 0x27, 0x67, 0xb6, 0xd7, 0xb0, /* Byte value: 0x2d */ + 0xcf, 0x6e, 0xa2, 0x76, 0x72, 0x6c, 0x48, 0x7a, 0xb8, 0x5d, 0x27, 0xbd, 0x10, 0xdd, 0x84, 0x94, /* Byte value: 0x2e */ + 0x71, 0xea, 0xca, 0x27, 0x5a, 0x35, 0x26, 0xa0, 0xd8, 0xe2, 0x42, 0x2b, 0x37, 0x99, 0x06, 0x31, /* Byte value: 0x2f */ + 0x6e, 0x83, 0x3c, 0xc4, 0x3b, 0x1d, 0x16, 0x06, 0xe5, 0xdc, 0xda, 0x55, 0x7a, 0x8a, 0xa9, 0xd3, /* Byte value: 0x30 */ + 0x75, 0x15, 0x6f, 0x6d, 0x79, 0x1f, 0xab, 0x51, 0x1d, 0xea, 0xbb, 0x0c, 0x50, 0x2f, 0xd1, 0x81, /* Byte value: 0x31 */ + 0x9b, 0xc0, 0x14, 0xfd, 0xa8, 0x0b, 0xb3, 0x02, 0xe2, 0xf5, 0xf7, 0x33, 0x97, 0xc7, 0x67, 0xf0, /* Byte value: 0x32 */ + 0x5d, 0xdc, 0x87, 0xec, 0xe4, 0xd8, 0x90, 0xf4, 0xb3, 0xba, 0x4e, 0xb9, 0x20, 0x79, 0xcb, 0xeb, /* Byte value: 0x33 */ + 0xe8, 0xb4, 0x6d, 0xff, 0x02, 0x2b, 0x32, 0x3b, 0xb9, 0x13, 0x28, 0xea, 0x72, 0x05, 0xeb, 0x99, /* Byte value: 0x34 */ + 0xdb, 0xeb, 0xd6, 0xd7, 0xdd, 0xee, 0xb4, 0xc9, 0xef, 0x75, 0xbc, 0x06, 0x28, 0xf6, 0x89, 0xa1, /* Byte value: 0x35 */ + 0x82, 0xc8, 0xf4, 0x71, 0x1a, 0x1c, 0xa9, 0xcc, 0x99, 0xc7, 0x0b, 0x98, 0x6f, 0x39, 0x95, 0xfa, /* Byte value: 0x36 */ + 0xbe, 0x84, 0x68, 0x51, 0x28, 0x59, 0x6e, 0xda, 0x60, 0xbf, 0x65, 0x96, 0x27, 0x44, 0x82, 0xa5, /* Byte value: 0x37 */ + 0xb8, 0xe5, 0x7e, 0x3e, 0xfb, 0x66, 0x44, 0xb2, 0x26, 0xb3, 0x01, 0x43, 0x92, 0xa9, 0xdf, 0x4d, /* Byte value: 0x38 */ + 0xe7, 0xa7, 0x4a, 0xf7, 0xef, 0xab, 0x73, 0xdf, 0x16, 0x0d, 0xd2, 0x08, 0x60, 0x8b, 0x9e, 0xfe, /* Byte value: 0x39 */ + 0x25, 0x44, 0x7c, 0xac, 0x80, 0x52, 0xdd, 0xd8, 0x82, 0x4a, 0x92, 0xa5, 0xb0, 0x83, 0xe5, 0x55, /* Byte value: 0x3a */ + 0x8b, 0xba, 0xc5, 0x16, 0x24, 0xa3, 0xc2, 0x40, 0x70, 0xd5, 0x95, 0xaf, 0xc8, 0x5a, 0xbd, 0x75, /* Byte value: 0x3b */ + 0x3b, 0x62, 0x32, 0xbc, 0x99, 0x91, 0x5f, 0xd3, 0x1f, 0x76, 0xa5, 0xa2, 0x94, 0x5c, 0x0f, 0x9b, /* Byte value: 0x3c */ + 0x5a, 0xf2, 0x29, 0x70, 0x4f, 0x0c, 0x08, 0x31, 0x55, 0xb4, 0x85, 0x15, 0xfc, 0x58, 0xd3, 0x2f, /* Byte value: 0x3d */ + 0xc7, 0x53, 0x2b, 0xe2, 0x34, 0x38, 0x91, 0x5b, 0xf1, 0x4d, 0x16, 0xf3, 0xde, 0x72, 0xe9, 0x37, /* Byte value: 0x3e */ + 0xef, 0x9a, 0xc3, 0x63, 0xa9, 0xff, 0xaa, 0xfe, 0x5f, 0x1d, 0xe3, 0x46, 0xae, 0x24, 0xf3, 0x5d, /* Byte value: 0x3f */ + 0x32, 0x10, 0x03, 0xdb, 0xa7, 0x2e, 0x34, 0x5f, 0xf6, 0x64, 0x3b, 0x95, 0x33, 0x3f, 0x27, 0x14, /* Byte value: 0x40 */ + 0x6c, 0x1d, 0x8f, 0xe1, 0xcb, 0x08, 0xb1, 0x9f, 0x66, 0xd8, 0x47, 0xa7, 0xa8, 0xd1, 0x23, 0x8b, /* Byte value: 0x41 */ + 0x8e, 0x0a, 0xd8, 0xaf, 0x7f, 0x62, 0xfd, 0x1c, 0x15, 0xdf, 0xc3, 0xf1, 0xc6, 0x20, 0x2f, 0xe9, /* Byte value: 0x42 */ + 0x94, 0xd3, 0x33, 0xf5, 0x45, 0x8b, 0xf2, 0xe6, 0x4d, 0xeb, 0x0d, 0xd1, 0x85, 0x49, 0x12, 0x97, /* Byte value: 0x43 */ + 0x93, 0xfd, 0x9d, 0x69, 0xee, 0x5f, 0x6a, 0x23, 0xab, 0xe5, 0xc6, 0x7d, 0x59, 0x68, 0x0a, 0x53, /* Byte value: 0x44 */ + 0xa3, 0x73, 0x2d, 0x97, 0xb9, 0x64, 0xf9, 0xe5, 0xde, 0x85, 0x60, 0x1a, 0xb8, 0x0c, 0xa7, 0x1f, /* Byte value: 0x45 */ + 0x67, 0xf1, 0x0d, 0xa3, 0x05, 0xa2, 0x7d, 0x8a, 0x0c, 0xce, 0x44, 0x62, 0xdd, 0xe9, 0x81, 0x5c, /* Byte value: 0x46 */ + 0x46, 0x4a, 0xd4, 0x45, 0xa6, 0xda, 0x2d, 0xa3, 0x4b, 0x8c, 0x2f, 0xe0, 0x0a, 0xdc, 0xb3, 0xb9, /* Byte value: 0x47 */ + 0x9d, 0xa1, 0x02, 0x92, 0x7b, 0x34, 0x99, 0x6a, 0xa4, 0xf9, 0x93, 0xe6, 0x22, 0x2a, 0x3a, 0x18, /* Byte value: 0x48 */ + 0xb9, 0xaa, 0xc6, 0xcd, 0x83, 0x8d, 0xf6, 0x1f, 0x86, 0xb1, 0xae, 0x3a, 0xfb, 0x65, 0x9a, 0x61, /* Byte value: 0x49 */ + 0x73, 0x74, 0x79, 0x02, 0xaa, 0x20, 0x81, 0x39, 0x5b, 0xe6, 0xdf, 0xd9, 0xe5, 0xc2, 0x8c, 0x69, /* Byte value: 0x4a */ + 0xdf, 0x14, 0x73, 0x9d, 0xfe, 0xc4, 0x39, 0x38, 0x2a, 0x7d, 0x45, 0x21, 0x4f, 0x40, 0x5e, 0x11, /* Byte value: 0x4b */ + 0xe5, 0x39, 0xf9, 0xd2, 0x1f, 0xbe, 0xd4, 0x46, 0x95, 0x09, 0x4f, 0xfa, 0xb2, 0xd0, 0x14, 0xa6, /* Byte value: 0x4c */ + 0x26, 0x95, 0x77, 0x7a, 0x08, 0xac, 0xc8, 0xec, 0xa1, 0x4c, 0xa0, 0x2e, 0x0b, 0x14, 0x2a, 0x21, /* Byte value: 0x4d */ + 0xde, 0x5b, 0xcb, 0x6e, 0x86, 0x2f, 0x8b, 0x95, 0x8a, 0x7f, 0xea, 0x58, 0x26, 0x8c, 0x1b, 0x3d, /* Byte value: 0x4e */ + 0x80, 0x56, 0x47, 0x54, 0xea, 0x09, 0x0e, 0x55, 0x1a, 0xc3, 0x96, 0x6a, 0xbd, 0x62, 0x1f, 0xa2, /* Byte value: 0x4f */ + 0xdd, 0x8a, 0xc0, 0xb8, 0x0e, 0xd1, 0x9e, 0xa1, 0xa9, 0x79, 0xd8, 0xd3, 0x9d, 0x1b, 0xd4, 0x49, /* Byte value: 0x50 */ + 0x60, 0xdf, 0xa3, 0x3f, 0xae, 0x76, 0xe5, 0x4f, 0xea, 0xc0, 0x8f, 0xce, 0x01, 0xc8, 0x99, 0x98, /* Byte value: 0x51 */ + 0xc5, 0xcd, 0x98, 0xc7, 0xc4, 0x2d, 0x36, 0xc2, 0x72, 0x49, 0x8b, 0x01, 0x0c, 0x29, 0x63, 0x6f, /* Byte value: 0x52 */ + 0x50, 0x51, 0x13, 0xc1, 0xf9, 0x4d, 0x76, 0x89, 0x9f, 0xa0, 0x29, 0xa9, 0xe0, 0xac, 0x34, 0xd4, /* Byte value: 0x53 */ + 0xbb, 0x34, 0x75, 0xe8, 0x73, 0x98, 0x51, 0x86, 0x05, 0xb5, 0x33, 0xc8, 0x29, 0x3e, 0x10, 0x39, /* Byte value: 0x54 */ + 0xb7, 0xf6, 0x59, 0x36, 0x16, 0xe6, 0x05, 0x56, 0x89, 0xad, 0xfb, 0xa1, 0x80, 0x27, 0xaa, 0x2a, /* Byte value: 0x55 */ + 0x0d, 0x8d, 0x94, 0x2d, 0x1d, 0x95, 0xe6, 0x7d, 0x2c, 0x1a, 0x67, 0x10, 0xc0, 0xd5, 0xff, 0x3f, /* Byte value: 0x56 */ + 0x22, 0x6a, 0xd2, 0x30, 0x2b, 0x86, 0x45, 0x1d, 0x64, 0x44, 0x59, 0x09, 0x6c, 0xa2, 0xfd, 0x91, /* Byte value: 0x57 */ + 0xf0, 0xf3, 0x35, 0x80, 0xc8, 0xd7, 0x9a, 0x58, 0x62, 0x23, 0x7b, 0x38, 0xe3, 0x37, 0x5c, 0xbf, /* Byte value: 0x58 */ + 0x8a, 0xf5, 0x7d, 0xe5, 0x5c, 0x48, 0x70, 0xed, 0xd0, 0xd7, 0x3a, 0xd6, 0xa1, 0x96, 0xf8, 0x59, /* Byte value: 0x59 */ + 0x98, 0x11, 0x1f, 0x2b, 0x20, 0xf5, 0xa6, 0x36, 0xc1, 0xf3, 0xc5, 0xb8, 0x2c, 0x50, 0xa8, 0x84, /* Byte value: 0x5a */ + 0x3f, 0x9d, 0x97, 0xf6, 0xba, 0xbb, 0xd2, 0x22, 0xda, 0x7e, 0x5c, 0x85, 0xf3, 0xea, 0xd8, 0x2b, /* Byte value: 0x5b */ + 0xd9, 0x75, 0x65, 0xf2, 0x2d, 0xfb, 0x13, 0x50, 0x6c, 0x71, 0x21, 0xf4, 0xfa, 0xad, 0x03, 0xf9, /* Byte value: 0x5c */ + 0x81, 0x19, 0xff, 0xa7, 0x92, 0xe2, 0xbc, 0xf8, 0xba, 0xc1, 0x39, 0x13, 0xd4, 0xae, 0x5a, 0x8e, /* Byte value: 0x5d */ + 0x3d, 0x03, 0x24, 0xd3, 0x4a, 0xae, 0x75, 0xbb, 0x59, 0x7a, 0xc1, 0x77, 0x21, 0xb1, 0x52, 0x73, /* Byte value: 0x5e */ + 0x9e, 0x70, 0x09, 0x44, 0xf3, 0xca, 0x8c, 0x5e, 0x87, 0xff, 0xa1, 0x6d, 0x99, 0xbd, 0xf5, 0x6c, /* Byte value: 0x5f */ + 0x09, 0x72, 0x31, 0x67, 0x3e, 0xbf, 0x6b, 0x8c, 0xe9, 0x12, 0x9e, 0x37, 0xa7, 0x63, 0x28, 0x8f, /* Byte value: 0x60 */ + 0xd8, 0x3a, 0xdd, 0x01, 0x55, 0x10, 0xa1, 0xfd, 0xcc, 0x73, 0x8e, 0x8d, 0x93, 0x61, 0x46, 0xd5, /* Byte value: 0x61 */ + 0x77, 0x8b, 0xdc, 0x48, 0x89, 0x0a, 0x0c, 0xc8, 0x9e, 0xee, 0x26, 0xfe, 0x82, 0x74, 0x5b, 0xd9, /* Byte value: 0x62 */ + 0x6b, 0x33, 0x21, 0x7d, 0x60, 0xdc, 0x29, 0x5a, 0x80, 0xd6, 0x8c, 0x0b, 0x74, 0xf0, 0x3b, 0x4f, /* Byte value: 0x63 */ + 0xe1, 0xc6, 0x5c, 0x98, 0x3c, 0x94, 0x59, 0xb7, 0x50, 0x01, 0xb6, 0xdd, 0xd5, 0x66, 0xc3, 0x16, /* Byte value: 0x64 */ + 0xad, 0x2f, 0xb2, 0x6c, 0x2c, 0x0f, 0x0a, 0xac, 0xd1, 0x99, 0x35, 0x81, 0xc3, 0x4e, 0x97, 0x54, /* Byte value: 0x65 */ + 0xe0, 0x89, 0xe4, 0x6b, 0x44, 0x7f, 0xeb, 0x1a, 0xf0, 0x03, 0x19, 0xa4, 0xbc, 0xaa, 0x86, 0x3a, /* Byte value: 0x66 */ + 0x66, 0xbe, 0xb5, 0x50, 0x7d, 0x49, 0xcf, 0x27, 0xac, 0xcc, 0xeb, 0x1b, 0xb4, 0x25, 0xc4, 0x70, /* Byte value: 0x67 */ + 0xf8, 0xce, 0xbc, 0x14, 0x8e, 0x83, 0x43, 0x79, 0x2b, 0x33, 0x4a, 0x76, 0x2d, 0x98, 0x31, 0x1c, /* Byte value: 0x68 */ + 0x76, 0xc4, 0x64, 0xbb, 0xf1, 0xe1, 0xbe, 0x65, 0x3e, 0xec, 0x89, 0x87, 0xeb, 0xb8, 0x1e, 0xf5, /* Byte value: 0x69 */ + 0x43, 0xfa, 0xc9, 0xfc, 0xfd, 0x1b, 0x12, 0xff, 0x2e, 0x86, 0x79, 0xbe, 0x04, 0xa6, 0x21, 0x25, /* Byte value: 0x6a */ + 0x72, 0x3b, 0xc1, 0xf1, 0xd2, 0xcb, 0x33, 0x94, 0xfb, 0xe4, 0x70, 0xa0, 0x8c, 0x0e, 0xc9, 0x45, /* Byte value: 0x6b */ + 0xf7, 0xdd, 0x9b, 0x1c, 0x63, 0x03, 0x02, 0x9d, 0x84, 0x2d, 0xb0, 0x94, 0x3f, 0x16, 0x44, 0x7b, /* Byte value: 0x6c */ + 0x4e, 0x77, 0x5d, 0xd1, 0xe0, 0x8e, 0xf4, 0x82, 0x02, 0x9c, 0x1e, 0xae, 0xc4, 0x73, 0xde, 0x1a, /* Byte value: 0x6d */ + 0xdc, 0xc5, 0x78, 0x4b, 0x76, 0x3a, 0x2c, 0x0c, 0x09, 0x7b, 0x77, 0xaa, 0xf4, 0xd7, 0x91, 0x65, /* Byte value: 0x6e */ + 0x48, 0x16, 0x4b, 0xbe, 0x33, 0xb1, 0xde, 0xea, 0x44, 0x90, 0x7a, 0x7b, 0x71, 0x9e, 0x83, 0xf2, /* Byte value: 0x6f */ + 0xda, 0xa4, 0x6e, 0x24, 0xa5, 0x05, 0x06, 0x64, 0x4f, 0x77, 0x13, 0x7f, 0x41, 0x3a, 0xcc, 0x8d, /* Byte value: 0x70 */ + 0x69, 0xad, 0x92, 0x58, 0x90, 0xc9, 0x8e, 0xc3, 0x03, 0xd2, 0x11, 0xf9, 0xa6, 0xab, 0xb1, 0x17, /* Byte value: 0x71 */ + 0xb0, 0xd8, 0xf7, 0xaa, 0xbd, 0x32, 0x9d, 0x93, 0x6f, 0xa3, 0x30, 0x0d, 0x5c, 0x06, 0xb2, 0xee, /* Byte value: 0x72 */ + 0xd5, 0xb7, 0x49, 0x2c, 0x48, 0x85, 0x47, 0x80, 0xe0, 0x69, 0xe9, 0x9d, 0x53, 0xb4, 0xb9, 0xea, /* Byte value: 0x73 */ + 0xf6, 0x92, 0x23, 0xef, 0x1b, 0xe8, 0xb0, 0x30, 0x24, 0x2f, 0x1f, 0xed, 0x56, 0xda, 0x01, 0x57, /* Byte value: 0x74 */ + 0x7b, 0x49, 0xf0, 0x96, 0xec, 0x74, 0x58, 0x18, 0x12, 0xf6, 0xee, 0x97, 0x2b, 0x6d, 0xe1, 0xca, /* Byte value: 0x75 */ + 0x41, 0x64, 0x7a, 0xd9, 0x0d, 0x0e, 0xb5, 0x66, 0xad, 0x82, 0xe4, 0x4c, 0xd6, 0xfd, 0xab, 0x7d, /* Byte value: 0x76 */ + 0xcb, 0x91, 0x07, 0x3c, 0x51, 0x46, 0xc5, 0x8b, 0x7d, 0x55, 0xde, 0x9a, 0x77, 0x6b, 0x53, 0x24, /* Byte value: 0x77 */ + 0x95, 0x9c, 0x8b, 0x06, 0x3d, 0x60, 0x40, 0x4b, 0xed, 0xe9, 0xa2, 0xa8, 0xec, 0x85, 0x57, 0xbb, /* Byte value: 0x78 */ + 0xaa, 0x01, 0x1c, 0xf0, 0x87, 0xdb, 0x92, 0x69, 0x37, 0x97, 0xfe, 0x2d, 0x1f, 0x6f, 0x8f, 0x90, /* Byte value: 0x79 */ + 0xe6, 0xe8, 0xf2, 0x04, 0x97, 0x40, 0xc1, 0x72, 0xb6, 0x0f, 0x7d, 0x71, 0x09, 0x47, 0xdb, 0xd2, /* Byte value: 0x7a */ + 0x37, 0xa0, 0x1e, 0x62, 0xfc, 0xef, 0x0b, 0x03, 0x93, 0x6e, 0x6d, 0xcb, 0x3d, 0x45, 0xb5, 0x88, /* Byte value: 0x7b */ + 0x21, 0xbb, 0xd9, 0xe6, 0xa3, 0x78, 0x50, 0x29, 0x47, 0x42, 0x6b, 0x82, 0xd7, 0x35, 0x32, 0xe5, /* Byte value: 0x7c */ + 0x42, 0xb5, 0x71, 0x0f, 0x85, 0xf0, 0xa0, 0x52, 0x8e, 0x84, 0xd6, 0xc7, 0x6d, 0x6a, 0x64, 0x09, /* Byte value: 0x7d */ + 0xd7, 0x29, 0xfa, 0x09, 0xb8, 0x90, 0xe0, 0x19, 0x63, 0x6d, 0x74, 0x6f, 0x81, 0xef, 0x33, 0xb2, /* Byte value: 0x7e */ + 0xc2, 0xe3, 0x36, 0x5b, 0x6f, 0xf9, 0xae, 0x07, 0x94, 0x47, 0x40, 0xad, 0xd0, 0x08, 0x7b, 0xab, /* Byte value: 0x7f */ + 0x74, 0x5a, 0xd7, 0x9e, 0x01, 0xf4, 0x19, 0xfc, 0xbd, 0xe8, 0x14, 0x75, 0x39, 0xe3, 0x94, 0xad, /* Byte value: 0x80 */ + 0xe2, 0x17, 0x57, 0x4e, 0xb4, 0x6a, 0x4c, 0x83, 0x73, 0x07, 0x84, 0x56, 0x6e, 0xf1, 0x0c, 0x62, /* Byte value: 0x81 */ + 0x91, 0x63, 0x2e, 0x4c, 0x1e, 0x4a, 0xcd, 0xba, 0x28, 0xe1, 0x5b, 0x8f, 0x8b, 0x33, 0x80, 0x0b, /* Byte value: 0x82 */ + 0x23, 0x25, 0x6a, 0xc3, 0x53, 0x6d, 0xf7, 0xb0, 0xc4, 0x46, 0xf6, 0x70, 0x05, 0x6e, 0xb8, 0xbd, /* Byte value: 0x83 */ + 0xc0, 0x7d, 0x85, 0x7e, 0x9f, 0xec, 0x09, 0x9e, 0x17, 0x43, 0xdd, 0x5f, 0x02, 0x53, 0xf1, 0xf3, /* Byte value: 0x84 */ + 0x64, 0x20, 0x06, 0x75, 0x8d, 0x5c, 0x68, 0xbe, 0x2f, 0xc8, 0x76, 0xe9, 0x66, 0x7e, 0x4e, 0x28, /* Byte value: 0x85 */ + 0x0f, 0x13, 0x27, 0x08, 0xed, 0x80, 0x41, 0xe4, 0xaf, 0x1e, 0xfa, 0xe2, 0x12, 0x8e, 0x75, 0x67, /* Byte value: 0x86 */ + 0x63, 0x0e, 0xa8, 0xe9, 0x26, 0x88, 0xf0, 0x7b, 0xc9, 0xc6, 0xbd, 0x45, 0xba, 0x5f, 0x56, 0xec, /* Byte value: 0x87 */ + 0xa8, 0x9f, 0xaf, 0xd5, 0x77, 0xce, 0x35, 0xf0, 0xb4, 0x93, 0x63, 0xdf, 0xcd, 0x34, 0x05, 0xc8, /* Byte value: 0x88 */ + 0x55, 0xe1, 0x0e, 0x78, 0xa2, 0x8c, 0x49, 0xd5, 0xfa, 0xaa, 0x7f, 0xf7, 0xee, 0xd6, 0xa6, 0x48, /* Byte value: 0x89 */ + 0xbd, 0x55, 0x63, 0x87, 0xa0, 0xa7, 0x7b, 0xee, 0x43, 0xb9, 0x57, 0x1d, 0x9c, 0xd3, 0x4d, 0xd1, /* Byte value: 0x8a */ + 0x9a, 0x8f, 0xac, 0x0e, 0xd0, 0xe0, 0x01, 0xaf, 0x42, 0xf7, 0x58, 0x4a, 0xfe, 0x0b, 0x22, 0xdc, /* Byte value: 0x8b */ + 0x03, 0xd1, 0x0b, 0xd6, 0x88, 0xfe, 0x15, 0x34, 0x23, 0x06, 0x32, 0x8b, 0xbb, 0x97, 0xcf, 0x74, /* Byte value: 0x8c */ + 0xc8, 0x40, 0x0c, 0xea, 0xd9, 0xb8, 0xd0, 0xbf, 0x5e, 0x53, 0xec, 0x11, 0xcc, 0xfc, 0x9c, 0x50, /* Byte value: 0x8d */ + 0xc4, 0x82, 0x20, 0x34, 0xbc, 0xc6, 0x84, 0x6f, 0xd2, 0x4b, 0x24, 0x78, 0x65, 0xe5, 0x26, 0x43, /* Byte value: 0x8e */ + 0x6d, 0x52, 0x37, 0x12, 0xb3, 0xe3, 0x03, 0x32, 0xc6, 0xda, 0xe8, 0xde, 0xc1, 0x1d, 0x66, 0xa7, /* Byte value: 0x8f */ + 0x92, 0xb2, 0x25, 0x9a, 0x96, 0xb4, 0xd8, 0x8e, 0x0b, 0xe7, 0x69, 0x04, 0x30, 0xa4, 0x4f, 0x7f, /* Byte value: 0x90 */ + 0x49, 0x59, 0xf3, 0x4d, 0x4b, 0x5a, 0x6c, 0x47, 0xe4, 0x92, 0xd5, 0x02, 0x18, 0x52, 0xc6, 0xde, /* Byte value: 0x91 */ + 0x9f, 0x3f, 0xb1, 0xb7, 0x8b, 0x21, 0x3e, 0xf3, 0x27, 0xfd, 0x0e, 0x14, 0xf0, 0x71, 0xb0, 0x40, /* Byte value: 0x92 */ + 0x44, 0xd4, 0x67, 0x60, 0x56, 0xcf, 0x8a, 0x3a, 0xc8, 0x88, 0xb2, 0x12, 0xd8, 0x87, 0x39, 0xe1, /* Byte value: 0x93 */ + 0x2d, 0x79, 0xf5, 0x38, 0xc6, 0x06, 0x04, 0xf9, 0xcb, 0x5a, 0xa3, 0xeb, 0x7e, 0x2c, 0x88, 0xf6, /* Byte value: 0x94 */ + 0x2f, 0xe7, 0x46, 0x1d, 0x36, 0x13, 0xa3, 0x60, 0x48, 0x5e, 0x3e, 0x19, 0xac, 0x77, 0x02, 0xae, /* Byte value: 0x95 */ + 0x36, 0xef, 0xa6, 0x91, 0x84, 0x04, 0xb9, 0xae, 0x33, 0x6c, 0xc2, 0xb2, 0x54, 0x89, 0xf0, 0xa4, /* Byte value: 0x96 */ + 0x15, 0xca, 0xcc, 0x52, 0xd7, 0x69, 0x4e, 0x1e, 0xf7, 0x2a, 0x34, 0xc2, 0x51, 0xe7, 0x48, 0x19, /* Byte value: 0x97 */ + 0x18, 0x47, 0x58, 0x7f, 0xca, 0xfc, 0xa8, 0x63, 0xdb, 0x30, 0x53, 0xd2, 0x91, 0x32, 0xb7, 0x26, /* Byte value: 0x98 */ + 0x70, 0xa5, 0x72, 0xd4, 0x22, 0xde, 0x94, 0x0d, 0x78, 0xe0, 0xed, 0x52, 0x5e, 0x55, 0x43, 0x1d, /* Byte value: 0x99 */ + 0xfe, 0xaf, 0xaa, 0x7b, 0x5d, 0xbc, 0x69, 0x11, 0x6d, 0x3f, 0x2e, 0xa3, 0x98, 0x75, 0x6c, 0xf4, /* Byte value: 0x9a */ + 0x2e, 0xa8, 0xfe, 0xee, 0x4e, 0xf8, 0x11, 0xcd, 0xe8, 0x5c, 0x91, 0x60, 0xc5, 0xbb, 0x47, 0x82, /* Byte value: 0x9b */ + 0x5c, 0x93, 0x3f, 0x1f, 0x9c, 0x33, 0x22, 0x59, 0x13, 0xb8, 0xe1, 0xc0, 0x49, 0xb5, 0x8e, 0xc7, /* Byte value: 0x9c */ + 0xa1, 0xed, 0x9e, 0xb2, 0x49, 0x71, 0x5e, 0x7c, 0x5d, 0x81, 0xfd, 0xe8, 0x6a, 0x57, 0x2d, 0x47, /* Byte value: 0x9d */ + 0xa6, 0xc3, 0x30, 0x2e, 0xe2, 0xa5, 0xc6, 0xb9, 0xbb, 0x8f, 0x36, 0x44, 0xb6, 0x76, 0x35, 0x83, /* Byte value: 0x9e */ + 0xea, 0x2a, 0xde, 0xda, 0xf2, 0x3e, 0x95, 0xa2, 0x3a, 0x17, 0xb5, 0x18, 0xa0, 0x5e, 0x61, 0xc1, /* Byte value: 0x9f */ + 0x1b, 0x96, 0x53, 0xa9, 0x42, 0x02, 0xbd, 0x57, 0xf8, 0x36, 0x61, 0x59, 0x2a, 0xa5, 0x78, 0x52, /* Byte value: 0xa0 */ + 0x90, 0x2c, 0x96, 0xbf, 0x66, 0xa1, 0x7f, 0x17, 0x88, 0xe3, 0xf4, 0xf6, 0xe2, 0xff, 0xc5, 0x27, /* Byte value: 0xa1 */ + 0xa4, 0x5d, 0x83, 0x0b, 0x12, 0xb0, 0x61, 0x20, 0x38, 0x8b, 0xab, 0xb6, 0x64, 0x2d, 0xbf, 0xdb, /* Byte value: 0xa2 */ + 0x68, 0xe2, 0x2a, 0xab, 0xe8, 0x22, 0x3c, 0x6e, 0xa3, 0xd0, 0xbe, 0x80, 0xcf, 0x67, 0xf4, 0x3b, /* Byte value: 0xa3 */ + 0x57, 0x7f, 0xbd, 0x5d, 0x52, 0x99, 0xee, 0x4c, 0x79, 0xae, 0xe2, 0x05, 0x3c, 0x8d, 0x2c, 0x10, /* Byte value: 0xa4 */ + 0xfd, 0x7e, 0xa1, 0xad, 0xd5, 0x42, 0x7c, 0x25, 0x4e, 0x39, 0x1c, 0x28, 0x23, 0xe2, 0xa3, 0x80, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x35, 0x3e, 0xad, 0x47, 0x0c, 0xfa, 0xac, 0x9a, 0x10, 0x6a, 0xf0, 0x39, 0xef, 0x1e, 0x3f, 0xd0, /* Byte value: 0xa7 */ + 0x4b, 0xc7, 0x40, 0x68, 0xbb, 0x4f, 0xcb, 0xde, 0x67, 0x96, 0x48, 0xf0, 0xca, 0x09, 0x4c, 0x86, /* Byte value: 0xa8 */ + 0x47, 0x05, 0x6c, 0xb6, 0xde, 0x31, 0x9f, 0x0e, 0xeb, 0x8e, 0x80, 0x99, 0x63, 0x10, 0xf6, 0x95, /* Byte value: 0xa9 */ + 0xa2, 0x3c, 0x95, 0x64, 0xc1, 0x8f, 0x4b, 0x48, 0x7e, 0x87, 0xcf, 0x63, 0xd1, 0xc0, 0xe2, 0x33, /* Byte value: 0xaa */ + 0x83, 0x87, 0x4c, 0x82, 0x62, 0xf7, 0x1b, 0x61, 0x39, 0xc5, 0xa4, 0xe1, 0x06, 0xf5, 0xd0, 0xd6, /* Byte value: 0xab */ + 0x7c, 0x67, 0x5e, 0x0a, 0x47, 0xa0, 0xc0, 0xdd, 0xf4, 0xf8, 0x25, 0x3b, 0xf7, 0x4c, 0xf9, 0x0e, /* Byte value: 0xac */ + 0xd2, 0x99, 0xe7, 0xb0, 0xe3, 0x51, 0xdf, 0x45, 0x06, 0x67, 0x22, 0x31, 0x8f, 0x95, 0xa1, 0x2e, /* Byte value: 0xad */ + 0x13, 0xab, 0xda, 0x3d, 0x04, 0x56, 0x64, 0x76, 0xb1, 0x26, 0x50, 0x17, 0xe4, 0x0a, 0x15, 0xf1, /* Byte value: 0xae */ + 0x7e, 0xf9, 0xed, 0x2f, 0xb7, 0xb5, 0x67, 0x44, 0x77, 0xfc, 0xb8, 0xc9, 0x25, 0x17, 0x73, 0x56, /* Byte value: 0xaf */ + 0x3e, 0xd2, 0x2f, 0x05, 0xc2, 0x50, 0x60, 0x8f, 0x7a, 0x7c, 0xf3, 0xfc, 0x9a, 0x26, 0x9d, 0x07, /* Byte value: 0xb0 */ + 0x7a, 0x06, 0x48, 0x65, 0x94, 0x9f, 0xea, 0xb5, 0xb2, 0xf4, 0x41, 0xee, 0x42, 0xa1, 0xa4, 0xe6, /* Byte value: 0xb1 */ + 0x84, 0xa9, 0xe2, 0x1e, 0xc9, 0x23, 0x83, 0xa4, 0xdf, 0xcb, 0x6f, 0x4d, 0xda, 0xd4, 0xc8, 0x12, /* Byte value: 0xb2 */ + 0x16, 0x1b, 0xc7, 0x84, 0x5f, 0x97, 0x5b, 0x2a, 0xd4, 0x2c, 0x06, 0x49, 0xea, 0x70, 0x87, 0x6d, /* Byte value: 0xb3 */ + 0xd1, 0x48, 0xec, 0x66, 0x6b, 0xaf, 0xca, 0x71, 0x25, 0x61, 0x10, 0xba, 0x34, 0x02, 0x6e, 0x5a, /* Byte value: 0xb4 */ + 0xb1, 0x97, 0x4f, 0x59, 0xc5, 0xd9, 0x2f, 0x3e, 0xcf, 0xa1, 0x9f, 0x74, 0x35, 0xca, 0xf7, 0xc2, /* Byte value: 0xb5 */ + 0x0c, 0xc2, 0x2c, 0xde, 0x65, 0x7e, 0x54, 0xd0, 0x8c, 0x18, 0xc8, 0x69, 0xa9, 0x19, 0xba, 0x13, /* Byte value: 0xb6 */ + 0x29, 0x86, 0x50, 0x72, 0xe5, 0x2c, 0x89, 0x08, 0x0e, 0x52, 0x5a, 0xcc, 0x19, 0x9a, 0x5f, 0x46, /* Byte value: 0xb7 */ + 0x06, 0x61, 0x16, 0x6f, 0xd3, 0x3f, 0x2a, 0x68, 0x46, 0x0c, 0x64, 0xd5, 0xb5, 0xed, 0x5d, 0xe8, /* Byte value: 0xb8 */ + 0x2c, 0x36, 0x4d, 0xcb, 0xbe, 0xed, 0xb6, 0x54, 0x6b, 0x58, 0x0c, 0x92, 0x17, 0xe0, 0xcd, 0xda, /* Byte value: 0xb9 */ + 0x2a, 0x57, 0x5b, 0xa4, 0x6d, 0xd2, 0x9c, 0x3c, 0x2d, 0x54, 0x68, 0x47, 0xa2, 0x0d, 0x90, 0x32, /* Byte value: 0xba */ + 0xcd, 0xf0, 0x11, 0x53, 0x82, 0x79, 0xef, 0xe3, 0x3b, 0x59, 0xba, 0x4f, 0xc2, 0x86, 0x0e, 0xcc, /* Byte value: 0xbb */ + 0x07, 0x2e, 0xae, 0x9c, 0xab, 0xd4, 0x98, 0xc5, 0xe6, 0x0e, 0xcb, 0xac, 0xdc, 0x21, 0x18, 0xc4, /* Byte value: 0xbc */ + 0x10, 0x7a, 0xd1, 0xeb, 0x8c, 0xa8, 0x71, 0x42, 0x92, 0x20, 0x62, 0x9c, 0x5f, 0x9d, 0xda, 0x85, /* Byte value: 0xbd */ + 0x08, 0x3d, 0x89, 0x94, 0x46, 0x54, 0xd9, 0x21, 0x49, 0x10, 0x31, 0x4e, 0xce, 0xaf, 0x6d, 0xa3, /* Byte value: 0xbe */ + 0xf9, 0x81, 0x04, 0xe7, 0xf6, 0x68, 0xf1, 0xd4, 0x8b, 0x31, 0xe5, 0x0f, 0x44, 0x54, 0x74, 0x30, /* Byte value: 0xbf */ + 0x11, 0x35, 0x69, 0x18, 0xf4, 0x43, 0xc3, 0xef, 0x32, 0x22, 0xcd, 0xe5, 0x36, 0x51, 0x9f, 0xa9, /* Byte value: 0xc0 */ + 0x28, 0xc9, 0xe8, 0x81, 0x9d, 0xc7, 0x3b, 0xa5, 0xae, 0x50, 0xf5, 0xb5, 0x70, 0x56, 0x1a, 0x6a, /* Byte value: 0xc1 */ + 0xeb, 0x65, 0x66, 0x29, 0x8a, 0xd5, 0x27, 0x0f, 0x9a, 0x15, 0x1a, 0x61, 0xc9, 0x92, 0x24, 0xed, /* Byte value: 0xc2 */ + 0x87, 0x78, 0xe9, 0xc8, 0x41, 0xdd, 0x96, 0x90, 0xfc, 0xcd, 0x5d, 0xc6, 0x61, 0x43, 0x07, 0x66, /* Byte value: 0xc3 */ + 0xf1, 0xbc, 0x8d, 0x73, 0xb0, 0x3c, 0x28, 0xf5, 0xc2, 0x21, 0xd4, 0x41, 0x8a, 0xfb, 0x19, 0x93, /* Byte value: 0xc4 */ + 0xc6, 0x1c, 0x93, 0x11, 0x4c, 0xd3, 0x23, 0xf6, 0x51, 0x4f, 0xb9, 0x8a, 0xb7, 0xbe, 0xac, 0x1b, /* Byte value: 0xc5 */ + 0xb5, 0x68, 0xea, 0x13, 0xe6, 0xf3, 0xa2, 0xcf, 0x0a, 0xa9, 0x66, 0x53, 0x52, 0x7c, 0x20, 0x72, /* Byte value: 0xc6 */ + 0x6f, 0xcc, 0x84, 0x37, 0x43, 0xf6, 0xa4, 0xab, 0x45, 0xde, 0x75, 0x2c, 0x13, 0x46, 0xec, 0xff, /* Byte value: 0xc7 */ + 0xcc, 0xbf, 0xa9, 0xa0, 0xfa, 0x92, 0x5d, 0x4e, 0x9b, 0x5b, 0x15, 0x36, 0xab, 0x4a, 0x4b, 0xe0, /* Byte value: 0xc8 */ + 0x34, 0x71, 0x15, 0xb4, 0x74, 0x11, 0x1e, 0x37, 0xb0, 0x68, 0x5f, 0x40, 0x86, 0xd2, 0x7a, 0xfc, /* Byte value: 0xc9 */ + 0x1c, 0xb8, 0xfd, 0x35, 0xe9, 0xd6, 0x25, 0x92, 0x1e, 0x38, 0xaa, 0xf5, 0xf6, 0x84, 0x60, 0x96, /* Byte value: 0xca */ + 0x4d, 0xa6, 0x56, 0x07, 0x68, 0x70, 0xe1, 0xb6, 0x21, 0x9a, 0x2c, 0x25, 0x7f, 0xe4, 0x11, 0x6e, /* Byte value: 0xcb */ + 0xf3, 0x22, 0x3e, 0x56, 0x40, 0x29, 0x8f, 0x6c, 0x41, 0x25, 0x49, 0xb3, 0x58, 0xa0, 0x93, 0xcb, /* Byte value: 0xcc */ + 0x96, 0x4d, 0x80, 0xd0, 0xb5, 0x9e, 0x55, 0x7f, 0xce, 0xef, 0x90, 0x23, 0x57, 0x12, 0x98, 0xcf, /* Byte value: 0xcd */ + 0x05, 0xb0, 0x1d, 0xb9, 0x5b, 0xc1, 0x3f, 0x5c, 0x65, 0x0a, 0x56, 0x5e, 0x0e, 0x7a, 0x92, 0x9c, /* Byte value: 0xce */ + 0x61, 0x90, 0x1b, 0xcc, 0xd6, 0x9d, 0x57, 0xe2, 0x4a, 0xc2, 0x20, 0xb7, 0x68, 0x04, 0xdc, 0xb4, /* Byte value: 0xcf */ + 0x59, 0x23, 0x22, 0xa6, 0xc7, 0xf2, 0x1d, 0x05, 0x76, 0xb2, 0xb7, 0x9e, 0x47, 0xcf, 0x1c, 0x5b, /* Byte value: 0xd0 */ + 0x86, 0x37, 0x51, 0x3b, 0x39, 0x36, 0x24, 0x3d, 0x5c, 0xcf, 0xf2, 0xbf, 0x08, 0x8f, 0x42, 0x4a, /* Byte value: 0xd1 */ + 0x88, 0x6b, 0xce, 0xc0, 0xac, 0x5d, 0xd7, 0x74, 0x53, 0xd3, 0xa7, 0x24, 0x73, 0xcd, 0x72, 0x01, /* Byte value: 0xd2 */ + 0xb3, 0x09, 0xfc, 0x7c, 0x35, 0xcc, 0x88, 0xa7, 0x4c, 0xa5, 0x02, 0x86, 0xe7, 0x91, 0x7d, 0x9a, /* Byte value: 0xd3 */ + 0x89, 0x24, 0x76, 0x33, 0xd4, 0xb6, 0x65, 0xd9, 0xf3, 0xd1, 0x08, 0x5d, 0x1a, 0x01, 0x37, 0x2d, /* Byte value: 0xd4 */ + 0xfc, 0x31, 0x19, 0x5e, 0xad, 0xa9, 0xce, 0x88, 0xee, 0x3b, 0xb3, 0x51, 0x4a, 0x2e, 0xe6, 0xac, /* Byte value: 0xd5 */ + 0xab, 0x4e, 0xa4, 0x03, 0xff, 0x30, 0x20, 0xc4, 0x97, 0x95, 0x51, 0x54, 0x76, 0xa3, 0xca, 0xbc, /* Byte value: 0xd6 */ + 0x53, 0x80, 0x18, 0x17, 0x71, 0xb3, 0x63, 0xbd, 0xbc, 0xa6, 0x1b, 0x22, 0x5b, 0x3b, 0xfb, 0xa0, /* Byte value: 0xd7 */ + 0xb4, 0x27, 0x52, 0xe0, 0x9e, 0x18, 0x10, 0x62, 0xaa, 0xab, 0xc9, 0x2a, 0x3b, 0xb0, 0x65, 0x5e, /* Byte value: 0xd8 */ + 0xe3, 0x58, 0xef, 0xbd, 0xcc, 0x81, 0xfe, 0x2e, 0xd3, 0x05, 0x2b, 0x2f, 0x07, 0x3d, 0x49, 0x4e, /* Byte value: 0xd9 */ + 0xce, 0x21, 0x1a, 0x85, 0x0a, 0x87, 0xfa, 0xd7, 0x18, 0x5f, 0x88, 0xc4, 0x79, 0x11, 0xc1, 0xb8, /* Byte value: 0xda */ + 0x52, 0xcf, 0xa0, 0xe4, 0x09, 0x58, 0xd1, 0x10, 0x1c, 0xa4, 0xb4, 0x5b, 0x32, 0xf7, 0xbe, 0x8c, /* Byte value: 0xdb */ + 0x8c, 0x94, 0x6b, 0x8a, 0x8f, 0x77, 0x5a, 0x85, 0x96, 0xdb, 0x5e, 0x03, 0x14, 0x7b, 0xa5, 0xb1, /* Byte value: 0xdc */ + 0x3a, 0x2d, 0x8a, 0x4f, 0xe1, 0x7a, 0xed, 0x7e, 0xbf, 0x74, 0x0a, 0xdb, 0xfd, 0x90, 0x4a, 0xb7, /* Byte value: 0xdd */ + 0xca, 0xde, 0xbf, 0xcf, 0x29, 0xad, 0x77, 0x26, 0xdd, 0x57, 0x71, 0xe3, 0x1e, 0xa7, 0x16, 0x08, /* Byte value: 0xde */ + 0x54, 0xae, 0xb6, 0x8b, 0xda, 0x67, 0xfb, 0x78, 0x5a, 0xa8, 0xd0, 0x8e, 0x87, 0x1a, 0xe3, 0x64, /* Byte value: 0xdf */ + 0xa7, 0x8c, 0x88, 0xdd, 0x9a, 0x4e, 0x74, 0x14, 0x1b, 0x8d, 0x99, 0x3d, 0xdf, 0xba, 0x70, 0xaf, /* Byte value: 0xe0 */ + 0x99, 0x5e, 0xa7, 0xd8, 0x58, 0x1e, 0x14, 0x9b, 0x61, 0xf1, 0x6a, 0xc1, 0x45, 0x9c, 0xed, 0xa8, /* Byte value: 0xe1 */ + 0x0a, 0xa3, 0x3a, 0xb1, 0xb6, 0x41, 0x7e, 0xb8, 0xca, 0x14, 0xac, 0xbc, 0x1c, 0xf4, 0xe7, 0xfb, /* Byte value: 0xe2 */ + 0x40, 0x2b, 0xc2, 0x2a, 0x75, 0xe5, 0x07, 0xcb, 0x0d, 0x80, 0x4b, 0x35, 0xbf, 0x31, 0xee, 0x51, /* Byte value: 0xe3 */ + 0x02, 0x9e, 0xb3, 0x25, 0xf0, 0x15, 0xa7, 0x99, 0x83, 0x04, 0x9d, 0xf2, 0xd2, 0x5b, 0x8a, 0x58, /* Byte value: 0xe4 */ + 0x5b, 0xbd, 0x91, 0x83, 0x37, 0xe7, 0xba, 0x9c, 0xf5, 0xb6, 0x2a, 0x6c, 0x95, 0x94, 0x96, 0x03, /* Byte value: 0xe5 */ + 0xbc, 0x1a, 0xdb, 0x74, 0xd8, 0x4c, 0xc9, 0x43, 0xe3, 0xbb, 0xf8, 0x64, 0xf5, 0x1f, 0x08, 0xfd, /* Byte value: 0xe6 */ + 0x78, 0x98, 0xfb, 0x40, 0x64, 0x8a, 0x4d, 0x2c, 0x31, 0xf0, 0xdc, 0x1c, 0x90, 0xfa, 0x2e, 0xbe, /* Byte value: 0xe7 */ + 0x79, 0xd7, 0x43, 0xb3, 0x1c, 0x61, 0xff, 0x81, 0x91, 0xf2, 0x73, 0x65, 0xf9, 0x36, 0x6b, 0x92, /* Byte value: 0xe8 */ + 0xf5, 0x43, 0x28, 0x39, 0x93, 0x16, 0xa5, 0x04, 0x07, 0x29, 0x2d, 0x66, 0xed, 0x4d, 0xce, 0x23, /* Byte value: 0xe9 */ + 0xa9, 0xd0, 0x17, 0x26, 0x0f, 0x25, 0x87, 0x5d, 0x14, 0x91, 0xcc, 0xa6, 0xa4, 0xf8, 0x40, 0xe4, /* Byte value: 0xea */ + 0xec, 0x4b, 0xc8, 0xb5, 0x21, 0x01, 0xbf, 0xca, 0x7c, 0x1b, 0xd1, 0xcd, 0x15, 0xb3, 0x3c, 0x29, /* Byte value: 0xeb */ + 0x7d, 0x28, 0xe6, 0xf9, 0x3f, 0x4b, 0x72, 0x70, 0x54, 0xfa, 0x8a, 0x42, 0x9e, 0x80, 0xbc, 0x22, /* Byte value: 0xec */ + 0x45, 0x9b, 0xdf, 0x93, 0x2e, 0x24, 0x38, 0x97, 0x68, 0x8a, 0x1d, 0x6b, 0xb1, 0x4b, 0x7c, 0xcd, /* Byte value: 0xed */ + 0x3c, 0x4c, 0x9c, 0x20, 0x32, 0x45, 0xc7, 0x16, 0xf9, 0x78, 0x6e, 0x0e, 0x48, 0x7d, 0x17, 0x5f, /* Byte value: 0xee */ + 0x65, 0x6f, 0xbe, 0x86, 0xf5, 0xb7, 0xda, 0x13, 0x8f, 0xca, 0xd9, 0x90, 0x0f, 0xb2, 0x0b, 0x04, /* Byte value: 0xef */ + 0x01, 0x4f, 0xb8, 0xf3, 0x78, 0xeb, 0xb2, 0xad, 0xa0, 0x02, 0xaf, 0x79, 0x69, 0xcc, 0x45, 0x2c, /* Byte value: 0xf0 */ + 0x24, 0x0b, 0xc4, 0x5f, 0xf8, 0xb9, 0x6f, 0x75, 0x22, 0x48, 0x3d, 0xdc, 0xd9, 0x4f, 0xa0, 0x79, /* Byte value: 0xf1 */ + 0x5f, 0x42, 0x34, 0xc9, 0x14, 0xcd, 0x37, 0x6d, 0x30, 0xbe, 0xd3, 0x4b, 0xf2, 0x22, 0x41, 0xb3, /* Byte value: 0xf2 */ + 0x7f, 0xb6, 0x55, 0xdc, 0xcf, 0x5e, 0xd5, 0xe9, 0xd7, 0xfe, 0x17, 0xb0, 0x4c, 0xdb, 0x36, 0x7a, /* Byte value: 0xf3 */ + 0x20, 0xf4, 0x61, 0x15, 0xdb, 0x93, 0xe2, 0x84, 0xe7, 0x40, 0xc4, 0xfb, 0xbe, 0xf9, 0x77, 0xc9, /* Byte value: 0xf4 */ + 0xae, 0xfe, 0xb9, 0xba, 0xa4, 0xf1, 0x1f, 0x98, 0xf2, 0x9f, 0x07, 0x0a, 0x78, 0xd9, 0x58, 0x20, /* Byte value: 0xf5 */ + 0x5e, 0x0d, 0x8c, 0x3a, 0x6c, 0x26, 0x85, 0xc0, 0x90, 0xbc, 0x7c, 0x32, 0x9b, 0xee, 0x04, 0x9f, /* Byte value: 0xf6 */ + 0xaf, 0xb1, 0x01, 0x49, 0xdc, 0x1a, 0xad, 0x35, 0x52, 0x9d, 0xa8, 0x73, 0x11, 0x15, 0x1d, 0x0c, /* Byte value: 0xf7 */ + 0xd0, 0x07, 0x54, 0x95, 0x13, 0x44, 0x78, 0xdc, 0x85, 0x63, 0xbf, 0xc3, 0x5d, 0xce, 0x2b, 0x76, /* Byte value: 0xf8 */ + 0xb2, 0x46, 0x44, 0x8f, 0x4d, 0x27, 0x3a, 0x0a, 0xec, 0xa7, 0xad, 0xff, 0x8e, 0x5d, 0x38, 0xb6, /* Byte value: 0xf9 */ + 0x8f, 0x45, 0x60, 0x5c, 0x07, 0x89, 0x4f, 0xb1, 0xb5, 0xdd, 0x6c, 0x88, 0xaf, 0xec, 0x6a, 0xc5, /* Byte value: 0xfa */ + 0x27, 0xda, 0xcf, 0x89, 0x70, 0x47, 0x7a, 0x41, 0x01, 0x4e, 0x0f, 0x57, 0x62, 0xd8, 0x6f, 0x0d, /* Byte value: 0xfb */ + 0x8d, 0xdb, 0xd3, 0x79, 0xf7, 0x9c, 0xe8, 0x28, 0x36, 0xd9, 0xf1, 0x7a, 0x7d, 0xb7, 0xe0, 0x9d, /* Byte value: 0xfc */ + 0x4c, 0xe9, 0xee, 0xf4, 0x10, 0x9b, 0x53, 0x1b, 0x81, 0x98, 0x83, 0x5c, 0x16, 0x28, 0x54, 0x42, /* Byte value: 0xfd */ + 0xd4, 0xf8, 0xf1, 0xdf, 0x30, 0x6e, 0xf5, 0x2d, 0x40, 0x6b, 0x46, 0xe4, 0x3a, 0x78, 0xfc, 0xc6, /* Byte value: 0xfe */ + 0xfa, 0x50, 0x0f, 0x31, 0x7e, 0x96, 0xe4, 0xe0, 0xa8, 0x37, 0xd7, 0x84, 0xff, 0xc3, 0xbb, 0x44, /* Byte value: 0xff */ + 0xf2, 0x6d, 0x86, 0xa5, 0x38, 0xc2, 0x3d, 0xc1, 0xe1, 0x27, 0xe6, 0xca, 0x31, 0x6c, 0xd6, 0xe7, /* Byte value: 0x00 */ + + /* Matrix row: 1 */ + 0x2f, 0x36, 0x58, 0xea, 0xa2, 0x0c, 0x25, 0xcf, 0x7c, 0xd9, 0x9e, 0x49, 0x92, 0xd3, 0x50, 0x36, /* Byte value: 0x01 */ + 0x48, 0x33, 0xd6, 0x3a, 0x7e, 0x8c, 0x82, 0xb8, 0xf4, 0x6c, 0x87, 0xe4, 0x0b, 0xa6, 0x9f, 0x33, /* Byte value: 0x02 */ + 0x5c, 0x9c, 0xe9, 0x76, 0x65, 0xa2, 0xaf, 0xd9, 0x01, 0x72, 0x0a, 0x54, 0xa8, 0x81, 0x94, 0x9c, /* Byte value: 0x03 */ + 0x0c, 0x65, 0x15, 0x85, 0x09, 0x1a, 0x1b, 0x9e, 0x53, 0x0a, 0x7b, 0xd1, 0x61, 0x1d, 0xb8, 0x65, /* Byte value: 0x04 */ + 0x3b, 0x99, 0x67, 0xa6, 0xb9, 0x22, 0x08, 0xae, 0x89, 0xc7, 0x13, 0xf9, 0x31, 0xf4, 0x5b, 0x99, /* Byte value: 0x05 */ + 0x62, 0x5e, 0xf1, 0xc3, 0xaa, 0x6a, 0x3d, 0xfe, 0x24, 0x53, 0xab, 0x81, 0xc1, 0x0c, 0xbd, 0x5e, /* Byte value: 0x06 */ + 0xe7, 0xef, 0x6c, 0x2a, 0x3c, 0xc2, 0x44, 0x6e, 0x67, 0x75, 0x70, 0x59, 0xb2, 0xd6, 0x51, 0xef, /* Byte value: 0x07 */ + 0x42, 0x85, 0x28, 0x1c, 0x92, 0x9b, 0x75, 0x69, 0x6f, 0x63, 0x20, 0xbc, 0xbb, 0x54, 0x7b, 0x85, /* Byte value: 0x08 */ + 0x61, 0xd6, 0x65, 0x73, 0x39, 0x8d, 0x4b, 0x38, 0x40, 0xb0, 0xc5, 0x24, 0x48, 0x9a, 0x93, 0xd6, /* Byte value: 0x09 */ + 0x1a, 0x3a, 0x73, 0xa8, 0xf0, 0x8e, 0xd3, 0x7b, 0x5f, 0x17, 0x03, 0xa7, 0x8d, 0xde, 0x87, 0x3a, /* Byte value: 0x0a */ + 0xf9, 0xf6, 0xad, 0x40, 0xcb, 0xfb, 0x9e, 0xde, 0x09, 0x64, 0x5a, 0xb1, 0xa1, 0x03, 0xbe, 0xf6, /* Byte value: 0x0b */ + 0x12, 0x7c, 0xd4, 0xef, 0xfe, 0x23, 0xc1, 0x2e, 0x3d, 0x1b, 0x51, 0x39, 0x72, 0xc8, 0x57, 0x7c, /* Byte value: 0x0c */ + 0x80, 0xea, 0xe2, 0xfa, 0xe0, 0x42, 0xe3, 0x19, 0xef, 0xc0, 0x69, 0xf4, 0x2b, 0xa3, 0x9e, 0xea, /* Byte value: 0x0d */ + 0x82, 0x1a, 0xbb, 0x9b, 0x02, 0xf8, 0x06, 0x9d, 0x16, 0xc3, 0x9c, 0x32, 0x64, 0x47, 0xaa, 0x1a, /* Byte value: 0x0e */ + 0x25, 0x80, 0xa6, 0xcc, 0x4e, 0x1b, 0xd2, 0x1e, 0xe7, 0xd6, 0x39, 0x11, 0x22, 0x21, 0xb4, 0x80, /* Byte value: 0x0f */ + 0xe2, 0xb4, 0x13, 0x39, 0x4a, 0x28, 0xde, 0xe7, 0xcb, 0x93, 0xc2, 0x75, 0xea, 0xaf, 0x23, 0xb4, /* Byte value: 0x10 */ + 0x06, 0xd3, 0xeb, 0xa3, 0xe5, 0x0d, 0xec, 0x4f, 0xc8, 0x05, 0xdc, 0x89, 0xd1, 0xef, 0x5c, 0xd3, /* Byte value: 0x11 */ + 0x24, 0xf8, 0x6b, 0x1d, 0x3f, 0x46, 0x41, 0x5c, 0x7a, 0x36, 0xa2, 0x72, 0xe4, 0x53, 0xae, 0xf8, /* Byte value: 0x12 */ + 0x40, 0x75, 0x71, 0x7d, 0x70, 0x21, 0x90, 0xed, 0x96, 0x60, 0xd5, 0x7a, 0xf4, 0xb0, 0x4f, 0x75, /* Byte value: 0x13 */ + 0x8a, 0x5c, 0x1c, 0xdc, 0x0c, 0x55, 0x14, 0xc8, 0x74, 0xcf, 0xce, 0xac, 0x9b, 0x51, 0x7a, 0x5c, /* Byte value: 0x14 */ + 0xd5, 0x48, 0x61, 0x1a, 0xfa, 0x10, 0xcd, 0xd7, 0x11, 0x5e, 0xaa, 0x5d, 0xba, 0x46, 0xc0, 0x48, /* Byte value: 0x15 */ + 0x77, 0x89, 0x03, 0x5e, 0xc0, 0x19, 0x83, 0xdd, 0x4c, 0xad, 0xbd, 0x52, 0xa4, 0x59, 0xac, 0x89, /* Byte value: 0x16 */ + 0x6c, 0xcb, 0xbd, 0x27, 0x41, 0xca, 0xc3, 0xe4, 0x8e, 0x5a, 0x25, 0x96, 0xef, 0xf5, 0x31, 0xcb, /* Byte value: 0x17 */ + 0xec, 0x21, 0x5f, 0xdd, 0xa1, 0x88, 0x20, 0xfd, 0x61, 0x9a, 0x4c, 0x62, 0xc4, 0x56, 0xaf, 0x21, /* Byte value: 0x18 */ + 0xda, 0xa5, 0xe0, 0x2f, 0x60, 0xed, 0xa0, 0x8f, 0x26, 0xb7, 0xbf, 0x29, 0x52, 0xcd, 0x56, 0xa5, /* Byte value: 0x19 */ + 0xa9, 0x0f, 0x51, 0xb3, 0xa7, 0x43, 0x2a, 0x99, 0x5b, 0x1c, 0x2b, 0x34, 0x68, 0x9f, 0x92, 0x0f, /* Byte value: 0x1a */ + 0xd8, 0x55, 0xb9, 0x4e, 0x82, 0x57, 0x45, 0x0b, 0xdf, 0xb4, 0x4a, 0xef, 0x1d, 0x29, 0x62, 0x55, /* Byte value: 0x1b */ + 0x74, 0x01, 0x97, 0xee, 0x53, 0xfe, 0xf5, 0x1b, 0x28, 0x4e, 0xd3, 0xf7, 0x2d, 0xcf, 0x82, 0x01, /* Byte value: 0x1c */ + 0xb1, 0xc5, 0x7b, 0x7a, 0xb5, 0x77, 0x1c, 0x66, 0xfd, 0x08, 0xdd, 0x55, 0xaa, 0xa5, 0x21, 0xc5, /* Byte value: 0x1d */ + 0xc8, 0xd9, 0x34, 0xc0, 0x9e, 0xce, 0x61, 0xa1, 0x1b, 0xac, 0xee, 0x10, 0x20, 0x05, 0x01, 0xd9, /* Byte value: 0x1e */ + 0x85, 0xb1, 0x9d, 0xe9, 0x96, 0xa8, 0x79, 0x90, 0x43, 0x26, 0xdb, 0xd8, 0x73, 0xda, 0xec, 0xb1, /* Byte value: 0x1f */ + 0xa7, 0x9a, 0x1d, 0x57, 0x4c, 0xe3, 0xd4, 0x83, 0xf1, 0x15, 0xa5, 0x23, 0x46, 0x66, 0x1e, 0x9a, /* Byte value: 0x20 */ + 0x92, 0x96, 0x36, 0x15, 0x1e, 0x61, 0x22, 0x37, 0xd2, 0xdb, 0x38, 0xcd, 0x59, 0x6b, 0xc9, 0x96, /* Byte value: 0x21 */ + 0xde, 0x86, 0x52, 0xed, 0x67, 0x5a, 0xa9, 0x44, 0x17, 0xb1, 0x96, 0x66, 0xcc, 0xc6, 0x3e, 0x86, /* Byte value: 0x22 */ + 0x43, 0xfd, 0xe5, 0xcd, 0xe3, 0xc6, 0xe6, 0x2b, 0xf2, 0x83, 0xbb, 0xdf, 0x7d, 0x26, 0x61, 0xfd, /* Byte value: 0x23 */ + 0x38, 0x11, 0xf3, 0x16, 0x2a, 0xc5, 0x7e, 0x68, 0xed, 0x24, 0x7d, 0x5c, 0xb8, 0x62, 0x75, 0x11, /* Byte value: 0x24 */ + 0x27, 0x70, 0xff, 0xad, 0xac, 0xa1, 0x37, 0x9a, 0x1e, 0xd5, 0xcc, 0xd7, 0x6d, 0xc5, 0x80, 0x70, /* Byte value: 0x25 */ + 0xee, 0xd1, 0x06, 0xbc, 0x43, 0x32, 0xc5, 0x79, 0x98, 0x99, 0xb9, 0xa4, 0x8b, 0xb2, 0x9b, 0xd1, /* Byte value: 0x26 */ + 0xd0, 0x13, 0x1e, 0x09, 0x8c, 0xfa, 0x57, 0x5e, 0xbd, 0xb8, 0x18, 0x71, 0xe2, 0x3f, 0xb2, 0x13, /* Byte value: 0x27 */ + 0x73, 0xaa, 0xb1, 0x9c, 0xc7, 0xae, 0x8a, 0x16, 0x7d, 0xab, 0x94, 0x1d, 0x3a, 0x52, 0xc4, 0xaa, /* Byte value: 0x28 */ + 0xb2, 0x4d, 0xef, 0xca, 0x26, 0x90, 0x6a, 0xa0, 0x99, 0xeb, 0xb3, 0xf0, 0x23, 0x33, 0x0f, 0x4d, /* Byte value: 0x29 */ + 0xfb, 0x06, 0xf4, 0x21, 0x29, 0x41, 0x7b, 0x5a, 0xf0, 0x67, 0xaf, 0x77, 0xee, 0xe7, 0x8a, 0x06, /* Byte value: 0x2a */ + 0x10, 0x8c, 0x8d, 0x8e, 0x1c, 0x99, 0x24, 0xaa, 0xc4, 0x18, 0xa4, 0xff, 0x3d, 0x2c, 0x63, 0x8c, /* Byte value: 0x2b */ + 0xe6, 0x97, 0xa1, 0xfb, 0x4d, 0x9f, 0xd7, 0x2c, 0xfa, 0x95, 0xeb, 0x3a, 0x74, 0xa4, 0x4b, 0x97, /* Byte value: 0x2c */ + 0x0b, 0xce, 0x33, 0xf7, 0x9d, 0x4a, 0x64, 0x93, 0x06, 0xef, 0x3c, 0x3b, 0x76, 0x80, 0xfe, 0xce, /* Byte value: 0x2d */ + 0x98, 0x20, 0xc8, 0x33, 0xf2, 0x76, 0xd5, 0xe6, 0x49, 0xd4, 0x9f, 0x95, 0xe9, 0x99, 0x2d, 0x20, /* Byte value: 0x2e */ + 0xb6, 0x6e, 0x5d, 0x08, 0x21, 0x27, 0x63, 0x6b, 0xa8, 0xed, 0x9a, 0xbf, 0xbd, 0x38, 0x67, 0x6e, /* Byte value: 0x2f */ + 0x11, 0xf4, 0x40, 0x5f, 0x6d, 0xc4, 0xb7, 0xe8, 0x59, 0xf8, 0x3f, 0x9c, 0xfb, 0x5e, 0x79, 0xf4, /* Byte value: 0x30 */ + 0xbd, 0xa0, 0x6e, 0xff, 0xbc, 0x6d, 0x07, 0xf8, 0xae, 0x02, 0xa6, 0x84, 0xcb, 0xb8, 0x99, 0xa0, /* Byte value: 0x31 */ + 0x0f, 0xed, 0x81, 0x35, 0x9a, 0xfd, 0x6d, 0x58, 0x37, 0xe9, 0x15, 0x74, 0xe8, 0x8b, 0x96, 0xed, /* Byte value: 0x32 */ + 0xf3, 0x40, 0x53, 0x66, 0x27, 0xec, 0x69, 0x0f, 0x92, 0x6b, 0xfd, 0xe9, 0x11, 0xf1, 0x5a, 0x40, /* Byte value: 0x33 */ + 0x5d, 0xe4, 0x24, 0xa7, 0x14, 0xff, 0x3c, 0x9b, 0x9c, 0x92, 0x91, 0x37, 0x6e, 0xf3, 0x8e, 0xe4, /* Byte value: 0x34 */ + 0xbf, 0x50, 0x37, 0x9e, 0x5e, 0xd7, 0xe2, 0x7c, 0x57, 0x01, 0x53, 0x42, 0x84, 0x5c, 0xad, 0x50, /* Byte value: 0x35 */ + 0x47, 0xde, 0x57, 0x0f, 0xe4, 0x71, 0xef, 0xe0, 0xc3, 0x85, 0x92, 0x90, 0xe3, 0x2d, 0x09, 0xde, /* Byte value: 0x36 */ + 0x2e, 0x4e, 0x95, 0x3b, 0xd3, 0x51, 0xb6, 0x8d, 0xe1, 0x39, 0x05, 0x2a, 0x54, 0xa1, 0x4a, 0x4e, /* Byte value: 0x37 */ + 0xc1, 0xe7, 0x5e, 0x56, 0xe1, 0x3e, 0xe0, 0xb6, 0xe4, 0x40, 0x27, 0xed, 0x19, 0x61, 0xcb, 0xe7, /* Byte value: 0x38 */ + 0xd6, 0xc0, 0xf5, 0xaa, 0x69, 0xf7, 0xbb, 0x11, 0x75, 0xbd, 0xc4, 0xf8, 0x33, 0xd0, 0xee, 0xc0, /* Byte value: 0x39 */ + 0x21, 0xa3, 0x14, 0x0e, 0x49, 0xac, 0xdb, 0xd5, 0xd6, 0xd0, 0x10, 0x5e, 0xbc, 0x2a, 0xdc, 0xa3, /* Byte value: 0x3a */ + 0x23, 0x53, 0x4d, 0x6f, 0xab, 0x16, 0x3e, 0x51, 0x2f, 0xd3, 0xe5, 0x98, 0xf3, 0xce, 0xe8, 0x53, /* Byte value: 0x3b */ + 0xf4, 0xeb, 0x75, 0x14, 0xb3, 0xbc, 0x16, 0x02, 0xc7, 0x8e, 0xba, 0x03, 0x06, 0x6c, 0x1c, 0xeb, /* Byte value: 0x3c */ + 0x6e, 0x3b, 0xe4, 0x46, 0xa3, 0x70, 0x26, 0x60, 0x77, 0x59, 0xd0, 0x50, 0xa0, 0x11, 0x05, 0x3b, /* Byte value: 0x3d */ + 0x8e, 0x7f, 0xae, 0x1e, 0x0b, 0xe2, 0x1d, 0x03, 0x45, 0xc9, 0xe7, 0xe3, 0x05, 0x5a, 0x12, 0x7f, /* Byte value: 0x3e */ + 0xc0, 0x9f, 0x93, 0x87, 0x90, 0x63, 0x73, 0xf4, 0x79, 0xa0, 0xbc, 0x8e, 0xdf, 0x13, 0xd1, 0x9f, /* Byte value: 0x3f */ + 0x90, 0x66, 0x6f, 0x74, 0xfc, 0xdb, 0xc7, 0xb3, 0x2b, 0xd8, 0xcd, 0x0b, 0x16, 0x8f, 0xfd, 0x66, /* Byte value: 0x40 */ + 0xf5, 0x93, 0xb8, 0xc5, 0xc2, 0xe1, 0x85, 0x40, 0x5a, 0x6e, 0x21, 0x60, 0xc0, 0x1e, 0x06, 0x93, /* Byte value: 0x41 */ + 0x5a, 0x4f, 0x02, 0xd5, 0x80, 0xaf, 0x43, 0x96, 0xc9, 0x77, 0xd6, 0xdd, 0x79, 0x6e, 0xc8, 0x4f, /* Byte value: 0x42 */ + 0x84, 0xc9, 0x50, 0x38, 0xe7, 0xf5, 0xea, 0xd2, 0xde, 0xc6, 0x40, 0xbb, 0xb5, 0xa8, 0xf6, 0xc9, /* Byte value: 0x43 */ + 0x19, 0xb2, 0xe7, 0x18, 0x63, 0x69, 0xa5, 0xbd, 0x3b, 0xf4, 0x6d, 0x02, 0x04, 0x48, 0xa9, 0xb2, /* Byte value: 0x44 */ + 0x6d, 0xb3, 0x70, 0xf6, 0x30, 0x97, 0x50, 0xa6, 0x13, 0xba, 0xbe, 0xf5, 0x29, 0x87, 0x2b, 0xb3, /* Byte value: 0x45 */ + 0x75, 0x79, 0x5a, 0x3f, 0x22, 0xa3, 0x66, 0x59, 0xb5, 0xae, 0x48, 0x94, 0xeb, 0xbd, 0x98, 0x79, /* Byte value: 0x46 */ + 0x5f, 0x14, 0x7d, 0xc6, 0xf6, 0x45, 0xd9, 0x1f, 0x65, 0x91, 0x64, 0xf1, 0x21, 0x17, 0xba, 0x14, /* Byte value: 0x47 */ + 0xe0, 0x44, 0x4a, 0x58, 0xa8, 0x92, 0x3b, 0x63, 0x32, 0x90, 0x37, 0xb3, 0xa5, 0x4b, 0x17, 0x44, /* Byte value: 0x48 */ + 0xb3, 0x35, 0x22, 0x1b, 0x57, 0xcd, 0xf9, 0xe2, 0x04, 0x0b, 0x28, 0x93, 0xe5, 0x41, 0x15, 0x35, /* Byte value: 0x49 */ + 0x52, 0x09, 0xa5, 0x92, 0x8e, 0x02, 0x51, 0xc3, 0xab, 0x7b, 0x84, 0x43, 0x86, 0x78, 0x18, 0x09, /* Byte value: 0x4a */ + 0xb4, 0x9e, 0x04, 0x69, 0xc3, 0x9d, 0x86, 0xef, 0x51, 0xee, 0x6f, 0x79, 0xf2, 0xdc, 0x53, 0x9e, /* Byte value: 0x4b */ + 0x32, 0xa7, 0x0d, 0x30, 0xc6, 0xd2, 0x89, 0xb9, 0x76, 0x2b, 0xda, 0x04, 0x08, 0x90, 0x91, 0xa7, /* Byte value: 0x4c */ + 0xb7, 0x16, 0x90, 0xd9, 0x50, 0x7a, 0xf0, 0x29, 0x35, 0x0d, 0x01, 0xdc, 0x7b, 0x4a, 0x7d, 0x16, /* Byte value: 0x4d */ + 0xc6, 0x4c, 0x78, 0x24, 0x75, 0x6e, 0x9f, 0xbb, 0xb1, 0xa5, 0x60, 0x07, 0x0e, 0xfc, 0x8d, 0x4c, /* Byte value: 0x4e */ + 0xa3, 0xb9, 0xaf, 0x95, 0x4b, 0x54, 0xdd, 0x48, 0xc0, 0x13, 0x8c, 0x6c, 0xd8, 0x6d, 0x76, 0xb9, /* Byte value: 0x4f */ + 0x50, 0xf9, 0xfc, 0xf3, 0x6c, 0xb8, 0xb4, 0x47, 0x52, 0x78, 0x71, 0x85, 0xc9, 0x9c, 0x2c, 0xf9, /* Byte value: 0x50 */ + 0xe8, 0x02, 0xed, 0x1f, 0xa6, 0x3f, 0x29, 0x36, 0x50, 0x9c, 0x65, 0x2d, 0x5a, 0x5d, 0xc7, 0x02, /* Byte value: 0x51 */ + 0x6a, 0x18, 0x56, 0x84, 0xa4, 0xc7, 0x2f, 0xab, 0x46, 0x5f, 0xf9, 0x1f, 0x3e, 0x1a, 0x6d, 0x18, /* Byte value: 0x52 */ + 0x9c, 0x03, 0x7a, 0xf1, 0xf5, 0xc1, 0xdc, 0x2d, 0x78, 0xd2, 0xb6, 0xda, 0x77, 0x92, 0x45, 0x03, /* Byte value: 0x53 */ + 0x57, 0x52, 0xda, 0x81, 0xf8, 0xe8, 0xcb, 0x4a, 0x07, 0x9d, 0x36, 0x6f, 0xde, 0x01, 0x6a, 0x52, /* Byte value: 0x54 */ + 0x4a, 0xc3, 0x8f, 0x5b, 0x9c, 0x36, 0x67, 0x3c, 0x0d, 0x6f, 0x72, 0x22, 0x44, 0x42, 0xab, 0xc3, /* Byte value: 0x55 */ + 0x6f, 0x43, 0x29, 0x97, 0xd2, 0x2d, 0xb5, 0x22, 0xea, 0xb9, 0x4b, 0x33, 0x66, 0x63, 0x1f, 0x43, /* Byte value: 0x56 */ + 0xbc, 0xd8, 0xa3, 0x2e, 0xcd, 0x30, 0x94, 0xba, 0x33, 0xe2, 0x3d, 0xe7, 0x0d, 0xca, 0x83, 0xd8, /* Byte value: 0x57 */ + 0x67, 0x05, 0x8e, 0xd0, 0xdc, 0x80, 0xa7, 0x77, 0x88, 0xb5, 0x19, 0xad, 0x99, 0x75, 0xcf, 0x05, /* Byte value: 0x58 */ + 0x51, 0x81, 0x31, 0x22, 0x1d, 0xe5, 0x27, 0x05, 0xcf, 0x98, 0xea, 0xe6, 0x0f, 0xee, 0x36, 0x81, /* Byte value: 0x59 */ + 0x99, 0x58, 0x05, 0xe2, 0x83, 0x2b, 0x46, 0xa4, 0xd4, 0x34, 0x04, 0xf6, 0x2f, 0xeb, 0x37, 0x58, /* Byte value: 0x5a */ + 0xff, 0x25, 0x46, 0xe3, 0x2e, 0xf6, 0x72, 0x91, 0xc1, 0x61, 0x86, 0x38, 0x70, 0xec, 0xe2, 0x25, /* Byte value: 0x5b */ + 0x5b, 0x37, 0xcf, 0x04, 0xf1, 0xf2, 0xd0, 0xd4, 0x54, 0x97, 0x4d, 0xbe, 0xbf, 0x1c, 0xd2, 0x37, /* Byte value: 0x5c */ + 0xd1, 0x6b, 0xd3, 0xd8, 0xfd, 0xa7, 0xc4, 0x1c, 0x20, 0x58, 0x83, 0x12, 0x24, 0x4d, 0xa8, 0x6b, /* Byte value: 0x5d */ + 0x1b, 0x42, 0xbe, 0x79, 0x81, 0xd3, 0x40, 0x39, 0xc2, 0xf7, 0x98, 0xc4, 0x4b, 0xac, 0x9d, 0x42, /* Byte value: 0x5e */ + 0x76, 0xf1, 0xce, 0x8f, 0xb1, 0x44, 0x10, 0x9f, 0xd1, 0x4d, 0x26, 0x31, 0x62, 0x2b, 0xb6, 0xf1, /* Byte value: 0x5f */ + 0x64, 0x8d, 0x1a, 0x60, 0x4f, 0x67, 0xd1, 0xb1, 0xec, 0x56, 0x77, 0x08, 0x10, 0xe3, 0xe1, 0x8d, /* Byte value: 0x60 */ + 0x29, 0xe5, 0xb3, 0x49, 0x47, 0x01, 0xc9, 0x80, 0xb4, 0xdc, 0x42, 0xc0, 0x43, 0x3c, 0x0c, 0xe5, /* Byte value: 0x61 */ + 0x59, 0xc7, 0x96, 0x65, 0x13, 0x48, 0x35, 0x50, 0xad, 0x94, 0xb8, 0x78, 0xf0, 0xf8, 0xe6, 0xc7, /* Byte value: 0x62 */ + 0x68, 0xe8, 0x0f, 0xe5, 0x46, 0x7d, 0xca, 0x2f, 0xbf, 0x5c, 0x0c, 0xd9, 0x71, 0xfe, 0x59, 0xe8, /* Byte value: 0x63 */ + 0x39, 0x69, 0x3e, 0xc7, 0x5b, 0x98, 0xed, 0x2a, 0x70, 0xc4, 0xe6, 0x3f, 0x7e, 0x10, 0x6f, 0x69, /* Byte value: 0x64 */ + 0x94, 0x45, 0xdd, 0xb6, 0xfb, 0x6c, 0xce, 0x78, 0x1a, 0xde, 0xe4, 0x44, 0x88, 0x84, 0x95, 0x45, /* Byte value: 0x65 */ + 0x4b, 0xbb, 0x42, 0x8a, 0xed, 0x6b, 0xf4, 0x7e, 0x90, 0x8f, 0xe9, 0x41, 0x82, 0x30, 0xb1, 0xbb, /* Byte value: 0x66 */ + 0x07, 0xab, 0x26, 0x72, 0x94, 0x50, 0x7f, 0x0d, 0x55, 0xe5, 0x47, 0xea, 0x17, 0x9d, 0x46, 0xab, /* Byte value: 0x67 */ + 0x71, 0x5a, 0xe8, 0xfd, 0x25, 0x14, 0x6f, 0x92, 0x84, 0xa8, 0x61, 0xdb, 0x75, 0xb6, 0xf0, 0x5a, /* Byte value: 0x68 */ + 0x2b, 0x15, 0xea, 0x28, 0xa5, 0xbb, 0x2c, 0x04, 0x4d, 0xdf, 0xb7, 0x06, 0x0c, 0xd8, 0x38, 0x15, /* Byte value: 0x69 */ + 0x26, 0x08, 0x32, 0x7c, 0xdd, 0xfc, 0xa4, 0xd8, 0x83, 0x35, 0x57, 0xb4, 0xab, 0xb7, 0x9a, 0x08, /* Byte value: 0x6a */ + 0x20, 0xdb, 0xd9, 0xdf, 0x38, 0xf1, 0x48, 0x97, 0x4b, 0x30, 0x8b, 0x3d, 0x7a, 0x58, 0xc6, 0xdb, /* Byte value: 0x6b */ + 0xfa, 0x7e, 0x39, 0xf0, 0x58, 0x1c, 0xe8, 0x18, 0x6d, 0x87, 0x34, 0x14, 0x28, 0x95, 0x90, 0x7e, /* Byte value: 0x6c */ + 0x49, 0x4b, 0x1b, 0xeb, 0x0f, 0xd1, 0x11, 0xfa, 0x69, 0x8c, 0x1c, 0x87, 0xcd, 0xd4, 0x85, 0x4b, /* Byte value: 0x6d */ + 0x22, 0x2b, 0x80, 0xbe, 0xda, 0x4b, 0xad, 0x13, 0xb2, 0x33, 0x7e, 0xfb, 0x35, 0xbc, 0xf2, 0x2b, /* Byte value: 0x6e */ + 0xa6, 0xe2, 0xd0, 0x86, 0x3d, 0xbe, 0x47, 0xc1, 0x6c, 0xf5, 0x3e, 0x40, 0x80, 0x14, 0x04, 0xe2, /* Byte value: 0x6f */ + 0xcd, 0x82, 0x4b, 0xd3, 0xe8, 0x24, 0xfb, 0x28, 0xb7, 0x4a, 0x5c, 0x3c, 0x78, 0x7c, 0x73, 0x82, /* Byte value: 0x70 */ + 0x8c, 0x8f, 0xf7, 0x7f, 0xe9, 0x58, 0xf8, 0x87, 0xbc, 0xca, 0x12, 0x25, 0x4a, 0xbe, 0x26, 0x8f, /* Byte value: 0x71 */ + 0xd7, 0xb8, 0x38, 0x7b, 0x18, 0xaa, 0x28, 0x53, 0xe8, 0x5d, 0x5f, 0x9b, 0xf5, 0xa2, 0xf4, 0xb8, /* Byte value: 0x72 */ + 0x46, 0xa6, 0x9a, 0xde, 0x95, 0x2c, 0x7c, 0xa2, 0x5e, 0x65, 0x09, 0xf3, 0x25, 0x5f, 0x13, 0xa6, /* Byte value: 0x73 */ + 0x88, 0xac, 0x45, 0xbd, 0xee, 0xef, 0xf1, 0x4c, 0x8d, 0xcc, 0x3b, 0x6a, 0xd4, 0xb5, 0x4e, 0xac, /* Byte value: 0x74 */ + 0x44, 0x56, 0xc3, 0xbf, 0x77, 0x96, 0x99, 0x26, 0xa7, 0x66, 0xfc, 0x35, 0x6a, 0xbb, 0x27, 0x56, /* Byte value: 0x75 */ + 0xc2, 0x6f, 0xca, 0xe6, 0x72, 0xd9, 0x96, 0x70, 0x80, 0xa3, 0x49, 0x48, 0x90, 0xf7, 0xe5, 0x6f, /* Byte value: 0x76 */ + 0x93, 0xee, 0xfb, 0xc4, 0x6f, 0x3c, 0xb1, 0x75, 0x4f, 0x3b, 0xa3, 0xae, 0x9f, 0x19, 0xd3, 0xee, /* Byte value: 0x77 */ + 0xf6, 0x1b, 0x2c, 0x75, 0x51, 0x06, 0xf3, 0x86, 0x3e, 0x8d, 0x4f, 0xc5, 0x49, 0x88, 0x28, 0x1b, /* Byte value: 0x78 */ + 0x09, 0x3e, 0x6a, 0x96, 0x7f, 0xf0, 0x81, 0x17, 0xff, 0xec, 0xc9, 0xfd, 0x39, 0x64, 0xca, 0x3e, /* Byte value: 0x79 */ + 0xa4, 0x12, 0x89, 0xe7, 0xdf, 0x04, 0xa2, 0x45, 0x95, 0xf6, 0xcb, 0x86, 0xcf, 0xf0, 0x30, 0x12, /* Byte value: 0x7a */ + 0xe9, 0x7a, 0x20, 0xce, 0xd7, 0x62, 0xba, 0x74, 0xcd, 0x7c, 0xfe, 0x4e, 0x9c, 0x2f, 0xdd, 0x7a, /* Byte value: 0x7b */ + 0x2a, 0x6d, 0x27, 0xf9, 0xd4, 0xe6, 0xbf, 0x46, 0xd0, 0x3f, 0x2c, 0x65, 0xca, 0xaa, 0x22, 0x6d, /* Byte value: 0x7c */ + 0x54, 0xda, 0x4e, 0x31, 0x6b, 0x0f, 0xbd, 0x8c, 0x63, 0x7e, 0x58, 0xca, 0x57, 0x97, 0x44, 0xda, /* Byte value: 0x7d */ + 0xa2, 0xc1, 0x62, 0x44, 0x3a, 0x09, 0x4e, 0x0a, 0x5d, 0xf3, 0x17, 0x0f, 0x1e, 0x1f, 0x6c, 0xc1, /* Byte value: 0x7e */ + 0xf7, 0x63, 0xe1, 0xa4, 0x20, 0x5b, 0x60, 0xc4, 0xa3, 0x6d, 0xd4, 0xa6, 0x8f, 0xfa, 0x32, 0x63, /* Byte value: 0x7f */ + 0xcf, 0x72, 0x12, 0xb2, 0x0a, 0x9e, 0x1e, 0xac, 0x4e, 0x49, 0xa9, 0xfa, 0x37, 0x98, 0x47, 0x72, /* Byte value: 0x80 */ + 0xaf, 0xdc, 0xba, 0x10, 0x42, 0x4e, 0xc6, 0xd6, 0x93, 0x19, 0xf7, 0xbd, 0xb9, 0x70, 0xce, 0xdc, /* Byte value: 0x81 */ + 0xfd, 0xd5, 0x1f, 0x82, 0xcc, 0x4c, 0x97, 0x15, 0x38, 0x62, 0x73, 0xfe, 0x3f, 0x08, 0xd6, 0xd5, /* Byte value: 0x82 */ + 0xce, 0x0a, 0xdf, 0x63, 0x7b, 0xc3, 0x8d, 0xee, 0xd3, 0xa9, 0x32, 0x99, 0xf1, 0xea, 0x5d, 0x0a, /* Byte value: 0x83 */ + 0x13, 0x04, 0x19, 0x3e, 0x8f, 0x7e, 0x52, 0x6c, 0xa0, 0xfb, 0xca, 0x5a, 0xb4, 0xba, 0x4d, 0x04, /* Byte value: 0x84 */ + 0xe3, 0xcc, 0xde, 0xe8, 0x3b, 0x75, 0x4d, 0xa5, 0x56, 0x73, 0x59, 0x16, 0x2c, 0xdd, 0x39, 0xcc, /* Byte value: 0x85 */ + 0x8b, 0x24, 0xd1, 0x0d, 0x7d, 0x08, 0x87, 0x8a, 0xe9, 0x2f, 0x55, 0xcf, 0x5d, 0x23, 0x60, 0x24, /* Byte value: 0x86 */ + 0x7e, 0xb7, 0x69, 0xc8, 0xbf, 0xe9, 0x02, 0xca, 0xb3, 0x41, 0x74, 0xaf, 0x9d, 0x3d, 0x66, 0xb7, /* Byte value: 0x87 */ + 0xed, 0x59, 0x92, 0x0c, 0xd0, 0xd5, 0xb3, 0xbf, 0xfc, 0x7a, 0xd7, 0x01, 0x02, 0x24, 0xb5, 0x59, /* Byte value: 0x88 */ + 0xe5, 0x1f, 0x35, 0x4b, 0xde, 0x78, 0xa1, 0xea, 0x9e, 0x76, 0x85, 0x9f, 0xfd, 0x32, 0x65, 0x1f, /* Byte value: 0x89 */ + 0xb8, 0xfb, 0x11, 0xec, 0xca, 0x87, 0x9d, 0x71, 0x02, 0xe4, 0x14, 0xa8, 0x93, 0xc1, 0xeb, 0xfb, /* Byte value: 0x8a */ + 0x7d, 0x3f, 0xfd, 0x78, 0x2c, 0x0e, 0x74, 0x0c, 0xd7, 0xa2, 0x1a, 0x0a, 0x14, 0xab, 0x48, 0x3f, /* Byte value: 0x8b */ + 0x96, 0xb5, 0x84, 0xd7, 0x19, 0xd6, 0x2b, 0xfc, 0xe3, 0xdd, 0x11, 0x82, 0xc7, 0x60, 0xa1, 0xb5, /* Byte value: 0x8c */ + 0x05, 0x5b, 0x7f, 0x13, 0x76, 0xea, 0x9a, 0x89, 0xac, 0xe6, 0xb2, 0x2c, 0x58, 0x79, 0x72, 0x5b, /* Byte value: 0x8d */ + 0x18, 0xca, 0x2a, 0xc9, 0x12, 0x34, 0x36, 0xff, 0xa6, 0x14, 0xf6, 0x61, 0xc2, 0x3a, 0xb3, 0xca, /* Byte value: 0x8e */ + 0x87, 0x41, 0xc4, 0x88, 0x74, 0x12, 0x9c, 0x14, 0xba, 0x25, 0x2e, 0x1e, 0x3c, 0x3e, 0xd8, 0x41, /* Byte value: 0x8f */ + 0x6b, 0x60, 0x9b, 0x55, 0xd5, 0x9a, 0xbc, 0xe9, 0xdb, 0xbf, 0x62, 0x7c, 0xf8, 0x68, 0x77, 0x60, /* Byte value: 0x90 */ + 0xd4, 0x30, 0xac, 0xcb, 0x8b, 0x4d, 0x5e, 0x95, 0x8c, 0xbe, 0x31, 0x3e, 0x7c, 0x34, 0xda, 0x30, /* Byte value: 0x91 */ + 0x04, 0x23, 0xb2, 0xc2, 0x07, 0xb7, 0x09, 0xcb, 0x31, 0x06, 0x29, 0x4f, 0x9e, 0x0b, 0x68, 0x23, /* Byte value: 0x92 */ + 0xbb, 0x73, 0x85, 0x5c, 0x59, 0x60, 0xeb, 0xb7, 0x66, 0x07, 0x7a, 0x0d, 0x1a, 0x57, 0xc5, 0x73, /* Byte value: 0x93 */ + 0x37, 0xfc, 0x72, 0x23, 0xb0, 0x38, 0x13, 0x30, 0xda, 0xcd, 0x68, 0x28, 0x50, 0xe9, 0xe3, 0xfc, /* Byte value: 0x94 */ + 0xd3, 0x9b, 0x8a, 0xb9, 0x1f, 0x1d, 0x21, 0x98, 0xd9, 0x5b, 0x76, 0xd4, 0x6b, 0xa9, 0x9c, 0x9b, /* Byte value: 0x95 */ + 0x9b, 0xa8, 0x5c, 0x83, 0x61, 0x91, 0xa3, 0x20, 0x2d, 0x37, 0xf1, 0x30, 0x60, 0x0f, 0x03, 0xa8, /* Byte value: 0x96 */ + 0x55, 0xa2, 0x83, 0xe0, 0x1a, 0x52, 0x2e, 0xce, 0xfe, 0x9e, 0xc3, 0xa9, 0x91, 0xe5, 0x5e, 0xa2, /* Byte value: 0x97 */ + 0x3a, 0xe1, 0xaa, 0x77, 0xc8, 0x7f, 0x9b, 0xec, 0x14, 0x27, 0x88, 0x9a, 0xf7, 0x86, 0x41, 0xe1, /* Byte value: 0x98 */ + 0xc4, 0xbc, 0x21, 0x45, 0x97, 0xd4, 0x7a, 0x3f, 0x48, 0xa6, 0x95, 0xc1, 0x41, 0x18, 0xb9, 0xbc, /* Byte value: 0x99 */ + 0x9e, 0xf3, 0x23, 0x90, 0x17, 0x7b, 0x39, 0xa9, 0x81, 0xd1, 0x43, 0x1c, 0x38, 0x76, 0x71, 0xf3, /* Byte value: 0x9a */ + 0xa1, 0x49, 0xf6, 0xf4, 0xa9, 0xee, 0x38, 0xcc, 0x39, 0x10, 0x79, 0xaa, 0x97, 0x89, 0x42, 0x49, /* Byte value: 0x9b */ + 0x81, 0x92, 0x2f, 0x2b, 0x91, 0x1f, 0x70, 0x5b, 0x72, 0x20, 0xf2, 0x97, 0xed, 0xd1, 0x84, 0x92, /* Byte value: 0x9c */ + 0x89, 0xd4, 0x88, 0x6c, 0x9f, 0xb2, 0x62, 0x0e, 0x10, 0x2c, 0xa0, 0x09, 0x12, 0xc7, 0x54, 0xd4, /* Byte value: 0x9d */ + 0x14, 0xaf, 0x3f, 0x4c, 0x1b, 0x2e, 0x2d, 0x61, 0xf5, 0x1e, 0x8d, 0xb0, 0xa3, 0x27, 0x0b, 0xaf, /* Byte value: 0x9e */ + 0xb9, 0x83, 0xdc, 0x3d, 0xbb, 0xda, 0x0e, 0x33, 0x9f, 0x04, 0x8f, 0xcb, 0x55, 0xb3, 0xf1, 0x83, /* Byte value: 0x9f */ + 0xac, 0x54, 0x2e, 0xa0, 0xd1, 0xa9, 0xb0, 0x10, 0xf7, 0xfa, 0x99, 0x18, 0x30, 0xe6, 0xe0, 0x54, /* Byte value: 0xa0 */ + 0x8f, 0x07, 0x63, 0xcf, 0x7a, 0xbf, 0x8e, 0x41, 0xd8, 0x29, 0x7c, 0x80, 0xc3, 0x28, 0x08, 0x07, /* Byte value: 0xa1 */ + 0xf0, 0xc8, 0xc7, 0xd6, 0xb4, 0x0b, 0x1f, 0xc9, 0xf6, 0x88, 0x93, 0x4c, 0x98, 0x67, 0x74, 0xc8, /* Byte value: 0xa2 */ + 0xfe, 0x5d, 0x8b, 0x32, 0x5f, 0xab, 0xe1, 0xd3, 0x5c, 0x81, 0x1d, 0x5b, 0xb6, 0x9e, 0xf8, 0x5d, /* Byte value: 0xa3 */ + 0x01, 0x78, 0xcd, 0xd1, 0x71, 0x5d, 0x93, 0x42, 0x9d, 0xe0, 0x9b, 0x63, 0xc6, 0x72, 0x1a, 0x78, /* Byte value: 0xa4 */ + 0x08, 0x46, 0xa7, 0x47, 0x0e, 0xad, 0x12, 0x55, 0x62, 0x0c, 0x52, 0x9e, 0xff, 0x16, 0xd0, 0x46, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x0d, 0x1d, 0xd8, 0x54, 0x78, 0x47, 0x88, 0xdc, 0xce, 0xea, 0xe0, 0xb2, 0xa7, 0x6f, 0xa2, 0x1d, /* Byte value: 0xa7 */ + 0x30, 0x57, 0x54, 0x51, 0x24, 0x68, 0x6c, 0x3d, 0x8f, 0x28, 0x2f, 0xc2, 0x47, 0x74, 0xa5, 0x57, /* Byte value: 0xa8 */ + 0x2d, 0xc6, 0x01, 0x8b, 0x40, 0xb6, 0xc0, 0x4b, 0x85, 0xda, 0x6b, 0x8f, 0xdd, 0x37, 0x64, 0xc6, /* Byte value: 0xa9 */ + 0x1f, 0x61, 0x0c, 0xbb, 0x86, 0x64, 0x49, 0xf2, 0xf3, 0xf1, 0xb1, 0x8b, 0xd5, 0xa7, 0xf5, 0x61, /* Byte value: 0xaa */ + 0x35, 0x0c, 0x2b, 0x42, 0x52, 0x82, 0xf6, 0xb4, 0x23, 0xce, 0x9d, 0xee, 0x1f, 0x0d, 0xd7, 0x0c, /* Byte value: 0xab */ + 0xd9, 0x2d, 0x74, 0x9f, 0xf3, 0x0a, 0xd6, 0x49, 0x42, 0x54, 0xd1, 0x8c, 0xdb, 0x5b, 0x78, 0x2d, /* Byte value: 0xac */ + 0xdb, 0xdd, 0x2d, 0xfe, 0x11, 0xb0, 0x33, 0xcd, 0xbb, 0x57, 0x24, 0x4a, 0x94, 0xbf, 0x4c, 0xdd, /* Byte value: 0xad */ + 0xba, 0x0b, 0x48, 0x8d, 0x28, 0x3d, 0x78, 0xf5, 0xfb, 0xe7, 0xe1, 0x6e, 0xdc, 0x25, 0xdf, 0x0b, /* Byte value: 0xae */ + 0x3d, 0x4a, 0x8c, 0x05, 0x5c, 0x2f, 0xe4, 0xe1, 0x41, 0xc2, 0xcf, 0x70, 0xe0, 0x1b, 0x07, 0x4a, /* Byte value: 0xaf */ + 0x8d, 0xf7, 0x3a, 0xae, 0x98, 0x05, 0x6b, 0xc5, 0x21, 0x2a, 0x89, 0x46, 0x8c, 0xcc, 0x3c, 0xf7, /* Byte value: 0xb0 */ + 0x36, 0x84, 0xbf, 0xf2, 0xc1, 0x65, 0x80, 0x72, 0x47, 0x2d, 0xf3, 0x4b, 0x96, 0x9b, 0xf9, 0x84, /* Byte value: 0xb1 */ + 0xa8, 0x77, 0x9c, 0x62, 0xd6, 0x1e, 0xb9, 0xdb, 0xc6, 0xfc, 0xb0, 0x57, 0xae, 0xed, 0x88, 0x77, /* Byte value: 0xb2 */ + 0xc3, 0x17, 0x07, 0x37, 0x03, 0x84, 0x05, 0x32, 0x1d, 0x43, 0xd2, 0x2b, 0x56, 0x85, 0xff, 0x17, /* Byte value: 0xb3 */ + 0x4d, 0x68, 0xa9, 0x29, 0x08, 0x66, 0x18, 0x31, 0x58, 0x8a, 0x35, 0xc8, 0x53, 0xdf, 0xed, 0x68, /* Byte value: 0xb4 */ + 0xa5, 0x6a, 0x44, 0x36, 0xae, 0x59, 0x31, 0x07, 0x08, 0x16, 0x50, 0xe5, 0x09, 0x82, 0x2a, 0x6a, /* Byte value: 0xb5 */ + 0x1d, 0x91, 0x55, 0xda, 0x64, 0xde, 0xac, 0x76, 0x0a, 0xf2, 0x44, 0x4d, 0x9a, 0x43, 0xc1, 0x91, /* Byte value: 0xb6 */ + 0x3c, 0x32, 0x41, 0xd4, 0x2d, 0x72, 0x77, 0xa3, 0xdc, 0x22, 0x54, 0x13, 0x26, 0x69, 0x1d, 0x32, /* Byte value: 0xb7 */ + 0xef, 0xa9, 0xcb, 0x6d, 0x32, 0x6f, 0x56, 0x3b, 0x05, 0x79, 0x22, 0xc7, 0x4d, 0xc0, 0x81, 0xa9, /* Byte value: 0xb8 */ + 0x45, 0x2e, 0x0e, 0x6e, 0x06, 0xcb, 0x0a, 0x64, 0x3a, 0x86, 0x67, 0x56, 0xac, 0xc9, 0x3d, 0x2e, /* Byte value: 0xb9 */ + 0xaa, 0x87, 0xc5, 0x03, 0x34, 0xa4, 0x5c, 0x5f, 0x3f, 0xff, 0x45, 0x91, 0xe1, 0x09, 0xbc, 0x87, /* Byte value: 0xba */ + 0x7c, 0x47, 0x30, 0xa9, 0x5d, 0x53, 0xe7, 0x4e, 0x4a, 0x42, 0x81, 0x69, 0xd2, 0xd9, 0x52, 0x47, /* Byte value: 0xbb */ + 0x9d, 0x7b, 0xb7, 0x20, 0x84, 0x9c, 0x4f, 0x6f, 0xe5, 0x32, 0x2d, 0xb9, 0xb1, 0xe0, 0x5f, 0x7b, /* Byte value: 0xbc */ + 0x2c, 0xbe, 0xcc, 0x5a, 0x31, 0xeb, 0x53, 0x09, 0x18, 0x3a, 0xf0, 0xec, 0x1b, 0x45, 0x7e, 0xbe, /* Byte value: 0xbd */ + 0x16, 0x5f, 0x66, 0x2d, 0xf9, 0x94, 0xc8, 0xe5, 0x0c, 0x1d, 0x78, 0x76, 0xec, 0xc3, 0x3f, 0x5f, /* Byte value: 0xbe */ + 0x03, 0x88, 0x94, 0xb0, 0x93, 0xe7, 0x76, 0xc6, 0x64, 0xe3, 0x6e, 0xa5, 0x89, 0x96, 0x2e, 0x88, /* Byte value: 0xbf */ + 0x5e, 0x6c, 0xb0, 0x17, 0x87, 0x18, 0x4a, 0x5d, 0xf8, 0x71, 0xff, 0x92, 0xe7, 0x65, 0xa0, 0x6c, /* Byte value: 0xc0 */ + 0x4e, 0xe0, 0x3d, 0x99, 0x9b, 0x81, 0x6e, 0xf7, 0x3c, 0x69, 0x5b, 0x6d, 0xda, 0x49, 0xc3, 0xe0, /* Byte value: 0xc1 */ + 0xcb, 0x51, 0xa0, 0x70, 0x0d, 0x29, 0x17, 0x67, 0x7f, 0x4f, 0x80, 0xb5, 0xa9, 0x93, 0x2f, 0x51, /* Byte value: 0xc2 */ + 0x3e, 0xc2, 0x18, 0xb5, 0xcf, 0xc8, 0x92, 0x27, 0x25, 0x21, 0xa1, 0xd5, 0x69, 0x8d, 0x29, 0xc2, /* Byte value: 0xc3 */ + 0x15, 0xd7, 0xf2, 0x9d, 0x6a, 0x73, 0xbe, 0x23, 0x68, 0xfe, 0x16, 0xd3, 0x65, 0x55, 0x11, 0xd7, /* Byte value: 0xc4 */ + 0xfc, 0xad, 0xd2, 0x53, 0xbd, 0x11, 0x04, 0x57, 0xa5, 0x82, 0xe8, 0x9d, 0xf9, 0x7a, 0xcc, 0xad, /* Byte value: 0xc5 */ + 0xae, 0xa4, 0x77, 0xc1, 0x33, 0x13, 0x55, 0x94, 0x0e, 0xf9, 0x6c, 0xde, 0x7f, 0x02, 0xd4, 0xa4, /* Byte value: 0xc6 */ + 0x63, 0x26, 0x3c, 0x12, 0xdb, 0x37, 0xae, 0xbc, 0xb9, 0xb3, 0x30, 0xe2, 0x07, 0x7e, 0xa7, 0x26, /* Byte value: 0xc7 */ + 0x0e, 0x95, 0x4c, 0xe4, 0xeb, 0xa0, 0xfe, 0x1a, 0xaa, 0x09, 0x8e, 0x17, 0x2e, 0xf9, 0x8c, 0x95, /* Byte value: 0xc8 */ + 0x7f, 0xcf, 0xa4, 0x19, 0xce, 0xb4, 0x91, 0x88, 0x2e, 0xa1, 0xef, 0xcc, 0x5b, 0x4f, 0x7c, 0xcf, /* Byte value: 0xc9 */ + 0x31, 0x2f, 0x99, 0x80, 0x55, 0x35, 0xff, 0x7f, 0x12, 0xc8, 0xb4, 0xa1, 0x81, 0x06, 0xbf, 0x2f, /* Byte value: 0xca */ + 0xdf, 0xfe, 0x9f, 0x3c, 0x16, 0x07, 0x3a, 0x06, 0x8a, 0x51, 0x0d, 0x05, 0x0a, 0xb4, 0x24, 0xfe, /* Byte value: 0xcb */ + 0xf1, 0xb0, 0x0a, 0x07, 0xc5, 0x56, 0x8c, 0x8b, 0x6b, 0x68, 0x08, 0x2f, 0x5e, 0x15, 0x6e, 0xb0, /* Byte value: 0xcc */ + 0x60, 0xae, 0xa8, 0xa2, 0x48, 0xd0, 0xd8, 0x7a, 0xdd, 0x50, 0x5e, 0x47, 0x8e, 0xe8, 0x89, 0xae, /* Byte value: 0xcd */ + 0x79, 0x1c, 0x4f, 0xba, 0x2b, 0xb9, 0x7d, 0xc7, 0xe6, 0xa4, 0x33, 0x45, 0x8a, 0xa0, 0x20, 0x1c, /* Byte value: 0xce */ + 0x9a, 0xd0, 0x91, 0x52, 0x10, 0xcc, 0x30, 0x62, 0xb0, 0xd7, 0x6a, 0x53, 0xa6, 0x7d, 0x19, 0xd0, /* Byte value: 0xcf */ + 0xf8, 0x8e, 0x60, 0x91, 0xba, 0xa6, 0x0d, 0x9c, 0x94, 0x84, 0xc1, 0xd2, 0x67, 0x71, 0xa4, 0x8e, /* Byte value: 0xd0 */ + 0x4c, 0x10, 0x64, 0xf8, 0x79, 0x3b, 0x8b, 0x73, 0xc5, 0x6a, 0xae, 0xab, 0x95, 0xad, 0xf7, 0x10, /* Byte value: 0xd1 */ + 0xb5, 0xe6, 0xc9, 0xb8, 0xb2, 0xc0, 0x15, 0xad, 0xcc, 0x0e, 0xf4, 0x1a, 0x34, 0xae, 0x49, 0xe6, /* Byte value: 0xd2 */ + 0x41, 0x0d, 0xbc, 0xac, 0x01, 0x7c, 0x03, 0xaf, 0x0b, 0x80, 0x4e, 0x19, 0x32, 0xc2, 0x55, 0x0d, /* Byte value: 0xd3 */ + 0xc7, 0x34, 0xb5, 0xf5, 0x04, 0x33, 0x0c, 0xf9, 0x2c, 0x45, 0xfb, 0x64, 0xc8, 0x8e, 0x97, 0x34, /* Byte value: 0xd4 */ + 0x7a, 0x94, 0xdb, 0x0a, 0xb8, 0x5e, 0x0b, 0x01, 0x82, 0x47, 0x5d, 0xe0, 0x03, 0x36, 0x0e, 0x94, /* Byte value: 0xd5 */ + 0x7b, 0xec, 0x16, 0xdb, 0xc9, 0x03, 0x98, 0x43, 0x1f, 0xa7, 0xc6, 0x83, 0xc5, 0x44, 0x14, 0xec, /* Byte value: 0xd6 */ + 0x0a, 0xb6, 0xfe, 0x26, 0xec, 0x17, 0xf7, 0xd1, 0x9b, 0x0f, 0xa7, 0x58, 0xb0, 0xf2, 0xe4, 0xb6, /* Byte value: 0xd7 */ + 0xdc, 0x76, 0x0b, 0x8c, 0x85, 0xe0, 0x4c, 0xc0, 0xee, 0xb2, 0x63, 0xa0, 0x83, 0x22, 0x0a, 0x76, /* Byte value: 0xd8 */ + 0xdd, 0x0e, 0xc6, 0x5d, 0xf4, 0xbd, 0xdf, 0x82, 0x73, 0x52, 0xf8, 0xc3, 0x45, 0x50, 0x10, 0x0e, /* Byte value: 0xd9 */ + 0xea, 0xf2, 0xb4, 0x7e, 0x44, 0x85, 0xcc, 0xb2, 0xa9, 0x9f, 0x90, 0xeb, 0x15, 0xb9, 0xf3, 0xf2, /* Byte value: 0xda */ + 0x78, 0x64, 0x82, 0x6b, 0x5a, 0xe4, 0xee, 0x85, 0x7b, 0x44, 0xa8, 0x26, 0x4c, 0xd2, 0x3a, 0x64, /* Byte value: 0xdb */ + 0xbe, 0x28, 0xfa, 0x4f, 0x2f, 0x8a, 0x71, 0x3e, 0xca, 0xe1, 0xc8, 0x21, 0x42, 0x2e, 0xb7, 0x28, /* Byte value: 0xdc */ + 0x86, 0x39, 0x09, 0x59, 0x05, 0x4f, 0x0f, 0x56, 0x27, 0xc5, 0xb5, 0x7d, 0xfa, 0x4c, 0xc2, 0x39, /* Byte value: 0xdd */ + 0xe1, 0x3c, 0x87, 0x89, 0xd9, 0xcf, 0xa8, 0x21, 0xaf, 0x70, 0xac, 0xd0, 0x63, 0x39, 0x0d, 0x3c, /* Byte value: 0xde */ + 0x97, 0xcd, 0x49, 0x06, 0x68, 0x8b, 0xb8, 0xbe, 0x7e, 0x3d, 0x8a, 0xe1, 0x01, 0x12, 0xbb, 0xcd, /* Byte value: 0xdf */ + 0x66, 0x7d, 0x43, 0x01, 0xad, 0xdd, 0x34, 0x35, 0x15, 0x55, 0x82, 0xce, 0x5f, 0x07, 0xd5, 0x7d, /* Byte value: 0xe0 */ + 0xeb, 0x8a, 0x79, 0xaf, 0x35, 0xd8, 0x5f, 0xf0, 0x34, 0x7f, 0x0b, 0x88, 0xd3, 0xcb, 0xe9, 0x8a, /* Byte value: 0xe1 */ + 0xf2, 0x38, 0x9e, 0xb7, 0x56, 0xb1, 0xfa, 0x4d, 0x0f, 0x8b, 0x66, 0x8a, 0xd7, 0x83, 0x40, 0x38, /* Byte value: 0xe2 */ + 0xb0, 0xbd, 0xb6, 0xab, 0xc4, 0x2a, 0x8f, 0x24, 0x60, 0xe8, 0x46, 0x36, 0x6c, 0xd7, 0x3b, 0xbd, /* Byte value: 0xe3 */ + 0xe4, 0x67, 0xf8, 0x9a, 0xaf, 0x25, 0x32, 0xa8, 0x03, 0x96, 0x1e, 0xfc, 0x3b, 0x40, 0x7f, 0x67, /* Byte value: 0xe4 */ + 0x1c, 0xe9, 0x98, 0x0b, 0x15, 0x83, 0x3f, 0x34, 0x97, 0x12, 0xdf, 0x2e, 0x5c, 0x31, 0xdb, 0xe9, /* Byte value: 0xe5 */ + 0xca, 0x29, 0x6d, 0xa1, 0x7c, 0x74, 0x84, 0x25, 0xe2, 0xaf, 0x1b, 0xd6, 0x6f, 0xe1, 0x35, 0x29, /* Byte value: 0xe6 */ + 0xd2, 0xe3, 0x47, 0x68, 0x6e, 0x40, 0xb2, 0xda, 0x44, 0xbb, 0xed, 0xb7, 0xad, 0xdb, 0x86, 0xe3, /* Byte value: 0xe7 */ + 0xa0, 0x31, 0x3b, 0x25, 0xd8, 0xb3, 0xab, 0x8e, 0xa4, 0xf0, 0xe2, 0xc9, 0x51, 0xfb, 0x58, 0x31, /* Byte value: 0xe8 */ + 0x1e, 0x19, 0xc1, 0x6a, 0xf7, 0x39, 0xda, 0xb0, 0x6e, 0x11, 0x2a, 0xe8, 0x13, 0xd5, 0xef, 0x19, /* Byte value: 0xe9 */ + 0x9f, 0x8b, 0xee, 0x41, 0x66, 0x26, 0xaa, 0xeb, 0x1c, 0x31, 0xd8, 0x7f, 0xfe, 0x04, 0x6b, 0x8b, /* Byte value: 0xea */ + 0x56, 0x2a, 0x17, 0x50, 0x89, 0xb5, 0x58, 0x08, 0x9a, 0x7d, 0xad, 0x0c, 0x18, 0x73, 0x70, 0x2a, /* Byte value: 0xeb */ + 0xab, 0xff, 0x08, 0xd2, 0x45, 0xf9, 0xcf, 0x1d, 0xa2, 0x1f, 0xde, 0xf2, 0x27, 0x7b, 0xa6, 0xff, /* Byte value: 0xec */ + 0xc9, 0xa1, 0xf9, 0x11, 0xef, 0x93, 0xf2, 0xe3, 0x86, 0x4c, 0x75, 0x73, 0xe6, 0x77, 0x1b, 0xa1, /* Byte value: 0xed */ + 0x69, 0x90, 0xc2, 0x34, 0x37, 0x20, 0x59, 0x6d, 0x22, 0xbc, 0x97, 0xba, 0xb7, 0x8c, 0x43, 0x90, /* Byte value: 0xee */ + 0x91, 0x1e, 0xa2, 0xa5, 0x8d, 0x86, 0x54, 0xf1, 0xb6, 0x38, 0x56, 0x68, 0xd0, 0xfd, 0xe7, 0x1e, /* Byte value: 0xef */ + 0x72, 0xd2, 0x7c, 0x4d, 0xb6, 0xf3, 0x19, 0x54, 0xe0, 0x4b, 0x0f, 0x7e, 0xfc, 0x20, 0xde, 0xd2, /* Byte value: 0xf0 */ + 0x53, 0x71, 0x68, 0x43, 0xff, 0x5f, 0xc2, 0x81, 0x36, 0x9b, 0x1f, 0x20, 0x40, 0x0a, 0x02, 0x71, /* Byte value: 0xf1 */ + 0x17, 0x27, 0xab, 0xfc, 0x88, 0xc9, 0x5b, 0xa7, 0x91, 0xfd, 0xe3, 0x15, 0x2a, 0xb1, 0x25, 0x27, /* Byte value: 0xf2 */ + 0x4f, 0x98, 0xf0, 0x48, 0xea, 0xdc, 0xfd, 0xb5, 0xa1, 0x89, 0xc0, 0x0e, 0x1c, 0x3b, 0xd9, 0x98, /* Byte value: 0xf3 */ + 0x58, 0xbf, 0x5b, 0xb4, 0x62, 0x15, 0xa6, 0x12, 0x30, 0x74, 0x23, 0x1b, 0x36, 0x8a, 0xfc, 0xbf, /* Byte value: 0xf4 */ + 0x02, 0xf0, 0x59, 0x61, 0xe2, 0xba, 0xe5, 0x84, 0xf9, 0x03, 0xf5, 0xc6, 0x4f, 0xe4, 0x34, 0xf0, /* Byte value: 0xf5 */ + 0x65, 0xf5, 0xd7, 0xb1, 0x3e, 0x3a, 0x42, 0xf3, 0x71, 0xb6, 0xec, 0x6b, 0xd6, 0x91, 0xfb, 0xf5, /* Byte value: 0xf6 */ + 0x70, 0x22, 0x25, 0x2c, 0x54, 0x49, 0xfc, 0xd0, 0x19, 0x48, 0xfa, 0xb8, 0xb3, 0xc4, 0xea, 0x22, /* Byte value: 0xf7 */ + 0x3f, 0xba, 0xd5, 0x64, 0xbe, 0x95, 0x01, 0x65, 0xb8, 0xc1, 0x3a, 0xb6, 0xaf, 0xff, 0x33, 0xba, /* Byte value: 0xf8 */ + 0x33, 0xdf, 0xc0, 0xe1, 0xb7, 0x8f, 0x1a, 0xfb, 0xeb, 0xcb, 0x41, 0x67, 0xce, 0xe2, 0x8b, 0xdf, /* Byte value: 0xf9 */ + 0x28, 0x9d, 0x7e, 0x98, 0x36, 0x5c, 0x5a, 0xc2, 0x29, 0x3c, 0xd9, 0xa3, 0x85, 0x4e, 0x16, 0x9d, /* Byte value: 0xfa */ + 0xc5, 0xc4, 0xec, 0x94, 0xe6, 0x89, 0xe9, 0x7d, 0xd5, 0x46, 0x0e, 0xa2, 0x87, 0x6a, 0xa3, 0xc4, /* Byte value: 0xfb */ + 0xcc, 0xfa, 0x86, 0x02, 0x99, 0x79, 0x68, 0x6a, 0x2a, 0xaa, 0xc7, 0x5f, 0xbe, 0x0e, 0x69, 0xfa, /* Byte value: 0xfc */ + 0xad, 0x2c, 0xe3, 0x71, 0xa0, 0xf4, 0x23, 0x52, 0x6a, 0x1a, 0x02, 0x7b, 0xf6, 0x94, 0xfa, 0x2c, /* Byte value: 0xfd */ + 0x34, 0x74, 0xe6, 0x93, 0x23, 0xdf, 0x65, 0xf6, 0xbe, 0x2e, 0x06, 0x8d, 0xd9, 0x7f, 0xcd, 0x74, /* Byte value: 0xfe */ + 0x95, 0x3d, 0x10, 0x67, 0x8a, 0x31, 0x5d, 0x3a, 0x87, 0x3e, 0x7f, 0x27, 0x4e, 0xf6, 0x8f, 0x3d, /* Byte value: 0xff */ + 0x83, 0x62, 0x76, 0x4a, 0x73, 0xa5, 0x95, 0xdf, 0x8b, 0x23, 0x07, 0x51, 0xa2, 0x35, 0xb0, 0x62, /* Byte value: 0x00 */ + + /* Matrix row: 2 */ + 0x37, 0xf9, 0x69, 0x1b, 0x71, 0x18, 0x61, 0xcd, 0x69, 0x19, 0x54, 0xd6, 0xaf, 0xcb, 0x37, 0x52, /* Byte value: 0x01 */ + 0x93, 0x8b, 0x03, 0xf8, 0xd8, 0xdb, 0x4a, 0x3b, 0x03, 0x7b, 0x5a, 0xc3, 0x52, 0x7d, 0x93, 0x1c, /* Byte value: 0x02 */ + 0xdb, 0x45, 0x63, 0x4e, 0xe4, 0x87, 0x1e, 0x57, 0x63, 0xc0, 0x4b, 0x19, 0x80, 0x06, 0xdb, 0x1a, /* Byte value: 0x03 */ + 0x38, 0xfb, 0x20, 0xd3, 0x14, 0x34, 0x8d, 0x24, 0x20, 0x69, 0x0f, 0xf7, 0x4e, 0x29, 0x38, 0x02, /* Byte value: 0x04 */ + 0x7f, 0x37, 0x09, 0xad, 0x4d, 0x44, 0x35, 0xa1, 0x09, 0xa2, 0x45, 0x0c, 0x7d, 0xb0, 0x7f, 0x54, /* Byte value: 0x05 */ + 0xb6, 0xa0, 0x72, 0x2f, 0xa6, 0xd4, 0x3e, 0xed, 0x72, 0x3c, 0x9b, 0xc2, 0x28, 0xd8, 0xb6, 0xae, /* Byte value: 0x06 */ + 0xa0, 0x81, 0xad, 0x96, 0xea, 0x47, 0x90, 0xf0, 0xad, 0x08, 0xae, 0x66, 0xb1, 0x91, 0xa0, 0xcf, /* Byte value: 0x07 */ + 0xb7, 0xec, 0x33, 0xa3, 0xc6, 0xf5, 0x60, 0x0d, 0x33, 0xc7, 0xb3, 0xae, 0x3b, 0xa1, 0xb7, 0x1f, /* Byte value: 0x08 */ + 0xb8, 0xee, 0x7a, 0x6b, 0xa3, 0xd9, 0x8c, 0xe4, 0x7a, 0xb7, 0xe8, 0x8f, 0xda, 0x43, 0xb8, 0x4f, /* Byte value: 0x09 */ + 0xc5, 0x41, 0xf1, 0x1d, 0x2e, 0xdf, 0x05, 0x46, 0xf1, 0x20, 0xfd, 0x5b, 0x81, 0x01, 0xc5, 0xba, /* Byte value: 0x0a */ + 0xcc, 0x28, 0xfd, 0x7b, 0xc8, 0x35, 0xee, 0xaa, 0xfd, 0x0f, 0x56, 0xd1, 0x0a, 0x36, 0xcc, 0xca, /* Byte value: 0x0b */ + 0x54, 0x52, 0x70, 0x3e, 0x36, 0x46, 0xf3, 0x7e, 0x70, 0x6e, 0xf7, 0x40, 0xf5, 0x8e, 0x54, 0x07, /* Byte value: 0x0c */ + 0x04, 0xf3, 0xc7, 0x75, 0x43, 0x84, 0xbb, 0x06, 0xc7, 0x6a, 0xa0, 0x73, 0x4c, 0x27, 0x04, 0x81, /* Byte value: 0x0d */ + 0xb1, 0x87, 0x76, 0x0d, 0x45, 0x33, 0x67, 0x08, 0x76, 0x98, 0x43, 0x05, 0x51, 0x74, 0xb1, 0x3f, /* Byte value: 0x0e */ + 0x13, 0x9e, 0x59, 0x40, 0x6f, 0x36, 0x4b, 0xfb, 0x59, 0xa5, 0xbd, 0xbb, 0xc6, 0x17, 0x13, 0x51, /* Byte value: 0x0f */ + 0xb2, 0x53, 0xb5, 0x5a, 0xe5, 0x50, 0x85, 0xeb, 0xb5, 0x56, 0x3b, 0xb1, 0x64, 0xff, 0xb2, 0x2f, /* Byte value: 0x10 */ + 0x1c, 0x9c, 0x10, 0x88, 0x0a, 0x1a, 0xa7, 0x12, 0x10, 0xd5, 0xe6, 0x9a, 0x27, 0xf5, 0x1c, 0x01, /* Byte value: 0x11 */ + 0xa8, 0xa4, 0xe0, 0x7c, 0x6c, 0x8c, 0x25, 0xfc, 0xe0, 0xdc, 0x2d, 0x80, 0x29, 0xdf, 0xa8, 0x0e, /* Byte value: 0x12 */ + 0x02, 0x98, 0x82, 0xdb, 0xc0, 0x42, 0xbc, 0x03, 0x82, 0x35, 0x50, 0xd8, 0x26, 0xf2, 0x02, 0xa1, /* Byte value: 0x13 */ + 0x20, 0x94, 0xf7, 0x2e, 0x5d, 0xaa, 0x91, 0x30, 0xf7, 0xd6, 0x49, 0x1e, 0x25, 0xfb, 0x20, 0x82, /* Byte value: 0x14 */ + 0xf5, 0x9f, 0x9c, 0x24, 0xbc, 0x20, 0x3d, 0x6e, 0x9c, 0x9d, 0x71, 0x4a, 0x57, 0x66, 0xf5, 0x79, /* Byte value: 0x15 */ + 0x45, 0x54, 0xab, 0xa5, 0x99, 0x32, 0x04, 0x86, 0xab, 0xfe, 0x1a, 0x23, 0x15, 0x6b, 0x45, 0xf7, /* Byte value: 0x16 */ + 0x3b, 0x2f, 0xe3, 0x84, 0xb4, 0x57, 0x6f, 0xc7, 0xe3, 0xa7, 0x77, 0x43, 0x7b, 0xa2, 0x3b, 0x12, /* Byte value: 0x17 */ + 0x3f, 0xdc, 0x24, 0xf1, 0xf7, 0xd3, 0xd4, 0xc1, 0x24, 0xcd, 0xd7, 0x30, 0x37, 0x85, 0x3f, 0x93, /* Byte value: 0x18 */ + 0xc3, 0x2a, 0xb4, 0xb3, 0xad, 0x19, 0x02, 0x43, 0xb4, 0x7f, 0x0d, 0xf0, 0xeb, 0xd4, 0xc3, 0x9a, /* Byte value: 0x19 */ + 0x2f, 0x96, 0xbe, 0xe6, 0x38, 0x86, 0x7d, 0xd9, 0xbe, 0xa6, 0x12, 0x3f, 0xc4, 0x19, 0x2f, 0xd2, /* Byte value: 0x1a */ + 0x76, 0x5e, 0x05, 0xcb, 0xab, 0xae, 0xde, 0x4d, 0x05, 0x8d, 0xee, 0x86, 0xf6, 0x87, 0x76, 0x24, /* Byte value: 0x1b */ + 0x4b, 0x1a, 0xa3, 0xe1, 0x9c, 0x3f, 0xb6, 0x8f, 0xa3, 0x75, 0x69, 0x6e, 0xe7, 0xf0, 0x4b, 0x16, /* Byte value: 0x1c */ + 0x5f, 0xa3, 0xfe, 0x83, 0x10, 0xee, 0xa4, 0x91, 0xfe, 0x74, 0x0c, 0x12, 0x58, 0x4b, 0x5f, 0xd6, /* Byte value: 0x1d */ + 0x97, 0x78, 0xc4, 0x8d, 0x9b, 0x5f, 0xf1, 0x3d, 0xc4, 0x11, 0xfa, 0xb0, 0x1e, 0x5a, 0x97, 0x9d, /* Byte value: 0x1e */ + 0x16, 0x21, 0xdf, 0xb9, 0x4c, 0x93, 0xae, 0x1d, 0xdf, 0x34, 0x35, 0xa4, 0x99, 0x49, 0x16, 0x61, /* Byte value: 0x1f */ + 0xa2, 0x19, 0x2f, 0x4d, 0x2a, 0x05, 0x2c, 0xf3, 0x2f, 0x3d, 0xfe, 0xbe, 0x97, 0x63, 0xa2, 0x6e, /* Byte value: 0x20 */ + 0x50, 0xa1, 0xb7, 0x4b, 0x75, 0xc2, 0x48, 0x78, 0xb7, 0x04, 0x57, 0x33, 0xb9, 0xa9, 0x50, 0x86, /* Byte value: 0x21 */ + 0x6a, 0xc2, 0x15, 0x43, 0xa1, 0xb4, 0x79, 0x5f, 0x15, 0x58, 0x08, 0x1c, 0xd1, 0x72, 0x6a, 0x25, /* Byte value: 0x22 */ + 0x0c, 0xd6, 0x8a, 0x9f, 0xc5, 0x4f, 0x0e, 0x0a, 0x8a, 0xbe, 0x23, 0x95, 0xd4, 0x69, 0x0c, 0x40, /* Byte value: 0x23 */ + 0x71, 0x79, 0x01, 0xe9, 0x48, 0x49, 0x87, 0xa8, 0x01, 0x29, 0x36, 0x41, 0x8f, 0x2b, 0x71, 0xb5, /* Byte value: 0x24 */ + 0xa6, 0xea, 0xe8, 0x38, 0x69, 0x81, 0x97, 0xf5, 0xe8, 0x57, 0x5e, 0xcd, 0xdb, 0x44, 0xa6, 0xef, /* Byte value: 0x25 */ + 0x8a, 0xa8, 0x95, 0x89, 0xf1, 0x64, 0x08, 0xcf, 0x95, 0x3f, 0x34, 0x46, 0x2a, 0xd6, 0x8a, 0x2d, /* Byte value: 0x26 */ + 0xe7, 0x4d, 0x84, 0xe8, 0xb3, 0x37, 0x28, 0x75, 0x84, 0xc3, 0xe4, 0x9d, 0x82, 0x08, 0xe7, 0x99, /* Byte value: 0x27 */ + 0xec, 0xbc, 0x0a, 0x55, 0x95, 0x9f, 0x7f, 0x9a, 0x0a, 0xd9, 0x1f, 0xcf, 0x2f, 0xcd, 0xec, 0x48, /* Byte value: 0x28 */ + 0x51, 0xed, 0xf6, 0xc7, 0x15, 0xe3, 0x16, 0x98, 0xf6, 0xff, 0x7f, 0x5f, 0xaa, 0xd0, 0x51, 0x37, /* Byte value: 0x29 */ + 0x79, 0x5c, 0x4c, 0x03, 0xce, 0x82, 0x32, 0xa4, 0x4c, 0xfd, 0xb5, 0xa7, 0x17, 0x65, 0x79, 0x74, /* Byte value: 0x2a */ + 0xe1, 0x26, 0xc1, 0x46, 0x30, 0xf1, 0x2f, 0x70, 0xc1, 0x9c, 0x14, 0x36, 0xe8, 0xdd, 0xe1, 0xb9, /* Byte value: 0x2b */ + 0x1b, 0xbb, 0x14, 0xaa, 0xe9, 0xfd, 0xfe, 0xf7, 0x14, 0x71, 0x3e, 0x5d, 0x5e, 0x59, 0x1b, 0x90, /* Byte value: 0x2c */ + 0x9f, 0x5d, 0x89, 0x67, 0x1d, 0x94, 0x44, 0x31, 0x89, 0xc5, 0x79, 0x56, 0x86, 0x14, 0x9f, 0x5c, /* Byte value: 0x2d */ + 0x74, 0xc6, 0x87, 0x10, 0x6b, 0xec, 0x62, 0x4e, 0x87, 0xb8, 0xbe, 0x5e, 0xd0, 0x75, 0x74, 0x85, /* Byte value: 0x2e */ + 0xf8, 0x05, 0x57, 0x37, 0x19, 0x4e, 0x6d, 0x84, 0x57, 0xd8, 0x7a, 0xb3, 0x90, 0x76, 0xf8, 0x88, /* Byte value: 0x2f */ + 0x5a, 0x1c, 0x78, 0x7a, 0x33, 0x4b, 0x41, 0x77, 0x78, 0xe5, 0x84, 0x0d, 0x07, 0x15, 0x5a, 0xe6, /* Byte value: 0x30 */ + 0x67, 0x58, 0xde, 0x50, 0x04, 0xda, 0x29, 0xb5, 0xde, 0x1d, 0x03, 0xe5, 0x16, 0x62, 0x67, 0xd4, /* Byte value: 0x31 */ + 0x36, 0xb5, 0x28, 0x97, 0x11, 0x39, 0x3f, 0x2d, 0x28, 0xe2, 0x7c, 0xba, 0xbc, 0xb2, 0x36, 0xe3, /* Byte value: 0x32 */ + 0xe8, 0x4f, 0xcd, 0x20, 0xd6, 0x1b, 0xc4, 0x9c, 0xcd, 0xb3, 0xbf, 0xbc, 0x63, 0xea, 0xe8, 0xc9, /* Byte value: 0x33 */ + 0x60, 0x7f, 0xda, 0x72, 0xe7, 0x3d, 0x70, 0x50, 0xda, 0xb9, 0xdb, 0x22, 0x6f, 0xce, 0x60, 0x45, /* Byte value: 0x34 */ + 0xd2, 0x2c, 0x6f, 0x28, 0x02, 0x6d, 0xf5, 0xbb, 0x6f, 0xef, 0xe0, 0x93, 0x0b, 0x31, 0xd2, 0x6a, /* Byte value: 0x35 */ + 0xa5, 0x3e, 0x2b, 0x6f, 0xc9, 0xe2, 0x75, 0x16, 0x2b, 0x99, 0x26, 0x79, 0xee, 0xcf, 0xa5, 0xff, /* Byte value: 0x36 */ + 0x8c, 0xc3, 0xd0, 0x27, 0x72, 0xa2, 0x0f, 0xca, 0xd0, 0x60, 0xc4, 0xed, 0x40, 0x03, 0x8c, 0x0d, /* Byte value: 0x37 */ + 0xbd, 0x51, 0xfc, 0x92, 0x80, 0x7c, 0x69, 0x02, 0xfc, 0x26, 0x60, 0x90, 0x85, 0x1d, 0xbd, 0x7f, /* Byte value: 0x38 */ + 0xfb, 0xd1, 0x94, 0x60, 0xb9, 0x2d, 0x8f, 0x67, 0x94, 0x16, 0x02, 0x07, 0xa5, 0xfd, 0xfb, 0x98, /* Byte value: 0x39 */ + 0xba, 0x76, 0xf8, 0xb0, 0x63, 0x9b, 0x30, 0xe7, 0xf8, 0x82, 0xb8, 0x57, 0xfc, 0xb1, 0xba, 0xee, /* Byte value: 0x3a */ + 0x0f, 0x02, 0x49, 0xc8, 0x65, 0x2c, 0xec, 0xe9, 0x49, 0x70, 0x5b, 0x21, 0xe1, 0xe2, 0x0f, 0x50, /* Byte value: 0x3b */ + 0x4f, 0xe9, 0x64, 0x94, 0xdf, 0xbb, 0x0d, 0x89, 0x64, 0x1f, 0xc9, 0x1d, 0xab, 0xd7, 0x4f, 0x97, /* Byte value: 0x3c */ + 0x8e, 0x5b, 0x52, 0xfc, 0xb2, 0xe0, 0xb3, 0xc9, 0x52, 0x55, 0x94, 0x35, 0x66, 0xf1, 0x8e, 0xac, /* Byte value: 0x3d */ + 0x89, 0x7c, 0x56, 0xde, 0x51, 0x07, 0xea, 0x2c, 0x56, 0xf1, 0x4c, 0xf2, 0x1f, 0x5d, 0x89, 0x3d, /* Byte value: 0x3e */ + 0x06, 0x6b, 0x45, 0xae, 0x83, 0xc6, 0x07, 0x05, 0x45, 0x5f, 0xf0, 0xab, 0x6a, 0xd5, 0x06, 0x20, /* Byte value: 0x3f */ + 0xe5, 0xd5, 0x06, 0x33, 0x73, 0x75, 0x94, 0x76, 0x06, 0xf6, 0xb4, 0x45, 0xa4, 0xfa, 0xe5, 0x38, /* Byte value: 0x40 */ + 0xf4, 0xd3, 0xdd, 0xa8, 0xdc, 0x01, 0x63, 0x8e, 0xdd, 0x66, 0x59, 0x26, 0x44, 0x1f, 0xf4, 0xc8, /* Byte value: 0x41 */ + 0xc7, 0xd9, 0x73, 0xc6, 0xee, 0x9d, 0xb9, 0x45, 0x73, 0x15, 0xad, 0x83, 0xa7, 0xf3, 0xc7, 0x1b, /* Byte value: 0x42 */ + 0xad, 0x1b, 0x66, 0x85, 0x4f, 0x29, 0xc0, 0x1a, 0x66, 0x4d, 0xa5, 0x9f, 0x76, 0x81, 0xad, 0x3e, /* Byte value: 0x43 */ + 0xcb, 0x0f, 0xf9, 0x59, 0x2b, 0xd2, 0xb7, 0x4f, 0xf9, 0xab, 0x8e, 0x16, 0x73, 0x9a, 0xcb, 0x5b, /* Byte value: 0x44 */ + 0x80, 0x15, 0x5a, 0xb8, 0xb7, 0xed, 0x01, 0xc0, 0x5a, 0xde, 0xe7, 0x78, 0x94, 0x6a, 0x80, 0x4d, /* Byte value: 0x45 */ + 0xf0, 0x20, 0x1a, 0xdd, 0x9f, 0x85, 0xd8, 0x88, 0x1a, 0x0c, 0xf9, 0x55, 0x08, 0x38, 0xf0, 0x49, /* Byte value: 0x46 */ + 0xd5, 0x0b, 0x6b, 0x0a, 0xe1, 0x8a, 0xac, 0x5e, 0x6b, 0x4b, 0x38, 0x54, 0x72, 0x9d, 0xd5, 0xfb, /* Byte value: 0x47 */ + 0x07, 0x27, 0x04, 0x22, 0xe3, 0xe7, 0x59, 0xe5, 0x04, 0xa4, 0xd8, 0xc7, 0x79, 0xac, 0x07, 0x91, /* Byte value: 0x48 */ + 0xea, 0xd7, 0x4f, 0xfb, 0x16, 0x59, 0x78, 0x9f, 0x4f, 0x86, 0xef, 0x64, 0x45, 0x18, 0xea, 0x68, /* Byte value: 0x49 */ + 0x56, 0xca, 0xf2, 0xe5, 0xf6, 0x04, 0x4f, 0x7d, 0xf2, 0x5b, 0xa7, 0x98, 0xd3, 0x7c, 0x56, 0xa6, /* Byte value: 0x4a */ + 0x4d, 0x71, 0xe6, 0x4f, 0x1f, 0xf9, 0xb1, 0x8a, 0xe6, 0x2a, 0x99, 0xc5, 0x8d, 0x25, 0x4d, 0x36, /* Byte value: 0x4b */ + 0x55, 0x1e, 0x31, 0xb2, 0x56, 0x67, 0xad, 0x9e, 0x31, 0x95, 0xdf, 0x2c, 0xe6, 0xf7, 0x55, 0xb6, /* Byte value: 0x4c */ + 0x43, 0x3f, 0xee, 0x0b, 0x1a, 0xf4, 0x03, 0x83, 0xee, 0xa1, 0xea, 0x88, 0x7f, 0xbe, 0x43, 0xd7, /* Byte value: 0x4d */ + 0x1a, 0xf7, 0x55, 0x26, 0x89, 0xdc, 0xa0, 0x17, 0x55, 0x8a, 0x16, 0x31, 0x4d, 0x20, 0x1a, 0x21, /* Byte value: 0x4e */ + 0x0b, 0xf1, 0x8e, 0xbd, 0x26, 0xa8, 0x57, 0xef, 0x8e, 0x1a, 0xfb, 0x52, 0xad, 0xc5, 0x0b, 0xd1, /* Byte value: 0x4f */ + 0xe3, 0xbe, 0x43, 0x9d, 0xf0, 0xb3, 0x93, 0x73, 0x43, 0xa9, 0x44, 0xee, 0xce, 0x2f, 0xe3, 0x18, /* Byte value: 0x50 */ + 0x96, 0x34, 0x85, 0x01, 0xfb, 0x7e, 0xaf, 0xdd, 0x85, 0xea, 0xd2, 0xdc, 0x0d, 0x23, 0x96, 0x2c, /* Byte value: 0x51 */ + 0x27, 0xb3, 0xf3, 0x0c, 0xbe, 0x4d, 0xc8, 0xd5, 0xf3, 0x72, 0x91, 0xd9, 0x5c, 0x57, 0x27, 0x13, /* Byte value: 0x52 */ + 0xdd, 0x2e, 0x26, 0xe0, 0x67, 0x41, 0x19, 0x52, 0x26, 0x9f, 0xbb, 0xb2, 0xea, 0xd3, 0xdd, 0x3a, /* Byte value: 0x53 */ + 0x44, 0x18, 0xea, 0x29, 0xf9, 0x13, 0x5a, 0x66, 0xea, 0x05, 0x32, 0x4f, 0x06, 0x12, 0x44, 0x46, /* Byte value: 0x54 */ + 0x26, 0xff, 0xb2, 0x80, 0xde, 0x6c, 0x96, 0x35, 0xb2, 0x89, 0xb9, 0xb5, 0x4f, 0x2e, 0x26, 0xa2, /* Byte value: 0x55 */ + 0x35, 0x61, 0xeb, 0xc0, 0xb1, 0x5a, 0xdd, 0xce, 0xeb, 0x2c, 0x04, 0x0e, 0x89, 0x39, 0x35, 0xf3, /* Byte value: 0x56 */ + 0xdc, 0x62, 0x67, 0x6c, 0x07, 0x60, 0x47, 0xb2, 0x67, 0x64, 0x93, 0xde, 0xf9, 0xaa, 0xdc, 0x8b, /* Byte value: 0x57 */ + 0xa4, 0x72, 0x6a, 0xe3, 0xa9, 0xc3, 0x2b, 0xf6, 0x6a, 0x62, 0x0e, 0x15, 0xfd, 0xb6, 0xa4, 0x4e, /* Byte value: 0x58 */ + 0x58, 0x84, 0xfa, 0xa1, 0xf3, 0x09, 0xfd, 0x74, 0xfa, 0xd0, 0xd4, 0xd5, 0x21, 0xe7, 0x58, 0x47, /* Byte value: 0x59 */ + 0xcf, 0xfc, 0x3e, 0x2c, 0x68, 0x56, 0x0c, 0x49, 0x3e, 0xc1, 0x2e, 0x65, 0x3f, 0xbd, 0xcf, 0xda, /* Byte value: 0x5a */ + 0xd0, 0xb4, 0xed, 0xf3, 0xc2, 0x2f, 0x49, 0xb8, 0xed, 0xda, 0xb0, 0x4b, 0x2d, 0xc3, 0xd0, 0xcb, /* Byte value: 0x5b */ + 0x7c, 0xe3, 0xca, 0xfa, 0xed, 0x27, 0xd7, 0x42, 0xca, 0x6c, 0x3d, 0xb8, 0x48, 0x3b, 0x7c, 0x44, /* Byte value: 0x5c */ + 0x5c, 0x77, 0x3d, 0xd4, 0xb0, 0x8d, 0x46, 0x72, 0x3d, 0xba, 0x74, 0xa6, 0x6d, 0xc0, 0x5c, 0xc6, /* Byte value: 0x5d */ + 0x7e, 0x7b, 0x48, 0x21, 0x2d, 0x65, 0x6b, 0x41, 0x48, 0x59, 0x6d, 0x60, 0x6e, 0xc9, 0x7e, 0xe5, /* Byte value: 0x5e */ + 0xfe, 0x6e, 0x12, 0x99, 0x9a, 0x88, 0x6a, 0x81, 0x12, 0x87, 0x8a, 0x18, 0xfa, 0xa3, 0xfe, 0xa8, /* Byte value: 0x5f */ + 0xaa, 0x3c, 0x62, 0xa7, 0xac, 0xce, 0x99, 0xff, 0x62, 0xe9, 0x7d, 0x58, 0x0f, 0x2d, 0xaa, 0xaf, /* Byte value: 0x60 */ + 0x2b, 0x65, 0x79, 0x93, 0x7b, 0x02, 0xc6, 0xdf, 0x79, 0xcc, 0xb2, 0x4c, 0x88, 0x3e, 0x2b, 0x53, /* Byte value: 0x61 */ + 0xc9, 0x97, 0x7b, 0x82, 0xeb, 0x90, 0x0b, 0x4c, 0x7b, 0x9e, 0xde, 0xce, 0x55, 0x68, 0xc9, 0xfa, /* Byte value: 0x62 */ + 0x92, 0xc7, 0x42, 0x74, 0xb8, 0xfa, 0x14, 0xdb, 0x42, 0x80, 0x72, 0xaf, 0x41, 0x04, 0x92, 0xad, /* Byte value: 0x63 */ + 0xca, 0x43, 0xb8, 0xd5, 0x4b, 0xf3, 0xe9, 0xaf, 0xb8, 0x50, 0xa6, 0x7a, 0x60, 0xe3, 0xca, 0xea, /* Byte value: 0x64 */ + 0x4c, 0x3d, 0xa7, 0xc3, 0x7f, 0xd8, 0xef, 0x6a, 0xa7, 0xd1, 0xb1, 0xa9, 0x9e, 0x5c, 0x4c, 0x87, /* Byte value: 0x65 */ + 0x9d, 0xc5, 0x0b, 0xbc, 0xdd, 0xd6, 0xf8, 0x32, 0x0b, 0xf0, 0x29, 0x8e, 0xa0, 0xe6, 0x9d, 0xfd, /* Byte value: 0x66 */ + 0xa7, 0xa6, 0xa9, 0xb4, 0x09, 0xa0, 0xc9, 0x15, 0xa9, 0xac, 0x76, 0xa1, 0xc8, 0x3d, 0xa7, 0x5e, /* Byte value: 0x67 */ + 0x59, 0xc8, 0xbb, 0x2d, 0x93, 0x28, 0xa3, 0x94, 0xbb, 0x2b, 0xfc, 0xb9, 0x32, 0x9e, 0x59, 0xf6, /* Byte value: 0x68 */ + 0x9e, 0x11, 0xc8, 0xeb, 0x7d, 0xb5, 0x1a, 0xd1, 0xc8, 0x3e, 0x51, 0x3a, 0x95, 0x6d, 0x9e, 0xed, /* Byte value: 0x69 */ + 0x1d, 0xd0, 0x51, 0x04, 0x6a, 0x3b, 0xf9, 0xf2, 0x51, 0x2e, 0xce, 0xf6, 0x34, 0x8c, 0x1d, 0xb0, /* Byte value: 0x6a */ + 0x01, 0x4c, 0x41, 0x8c, 0x60, 0x21, 0x5e, 0xe0, 0x41, 0xfb, 0x28, 0x6c, 0x13, 0x79, 0x01, 0xb1, /* Byte value: 0x6b */ + 0xc2, 0x66, 0xf5, 0x3f, 0xcd, 0x38, 0x5c, 0xa3, 0xf5, 0x84, 0x25, 0x9c, 0xf8, 0xad, 0xc2, 0x2b, /* Byte value: 0x6c */ + 0x28, 0xb1, 0xba, 0xc4, 0xdb, 0x61, 0x24, 0x3c, 0xba, 0x02, 0xca, 0xf8, 0xbd, 0xb5, 0x28, 0x43, /* Byte value: 0x6d */ + 0xb4, 0x38, 0xf0, 0xf4, 0x66, 0x96, 0x82, 0xee, 0xf0, 0x09, 0xcb, 0x1a, 0x0e, 0x2a, 0xb4, 0x0f, /* Byte value: 0x6e */ + 0x19, 0x23, 0x96, 0x71, 0x29, 0xbf, 0x42, 0xf4, 0x96, 0x44, 0x6e, 0x85, 0x78, 0xab, 0x19, 0x31, /* Byte value: 0x6f */ + 0x85, 0xaa, 0xdc, 0x41, 0x94, 0x48, 0xe4, 0x26, 0xdc, 0x4f, 0x6f, 0x67, 0xcb, 0x34, 0x85, 0x7d, /* Byte value: 0x70 */ + 0x3c, 0x08, 0xe7, 0xa6, 0x57, 0xb0, 0x36, 0x22, 0xe7, 0x03, 0xaf, 0x84, 0x02, 0x0e, 0x3c, 0x83, /* Byte value: 0x71 */ + 0x40, 0xeb, 0x2d, 0x5c, 0xba, 0x97, 0xe1, 0x60, 0x2d, 0x6f, 0x92, 0x3c, 0x4a, 0x35, 0x40, 0xc7, /* Byte value: 0x72 */ + 0x1e, 0x04, 0x92, 0x53, 0xca, 0x58, 0x1b, 0x11, 0x92, 0xe0, 0xb6, 0x42, 0x01, 0x07, 0x1e, 0xa0, /* Byte value: 0x73 */ + 0x95, 0xe0, 0x46, 0x56, 0x5b, 0x1d, 0x4d, 0x3e, 0x46, 0x24, 0xaa, 0x68, 0x38, 0xa8, 0x95, 0x3c, /* Byte value: 0x74 */ + 0xab, 0x70, 0x23, 0x2b, 0xcc, 0xef, 0xc7, 0x1f, 0x23, 0x12, 0x55, 0x34, 0x1c, 0x54, 0xab, 0x1e, /* Byte value: 0x75 */ + 0xb3, 0x1f, 0xf4, 0xd6, 0x85, 0x71, 0xdb, 0x0b, 0xf4, 0xad, 0x13, 0xdd, 0x77, 0x86, 0xb3, 0x9e, /* Byte value: 0x76 */ + 0xeb, 0x9b, 0x0e, 0x77, 0x76, 0x78, 0x26, 0x7f, 0x0e, 0x7d, 0xc7, 0x08, 0x56, 0x61, 0xeb, 0xd9, /* Byte value: 0x77 */ + 0xfa, 0x9d, 0xd5, 0xec, 0xd9, 0x0c, 0xd1, 0x87, 0xd5, 0xed, 0x2a, 0x6b, 0xb6, 0x84, 0xfa, 0x29, /* Byte value: 0x78 */ + 0x2a, 0x29, 0x38, 0x1f, 0x1b, 0x23, 0x98, 0x3f, 0x38, 0x37, 0x9a, 0x20, 0x9b, 0x47, 0x2a, 0xe2, /* Byte value: 0x79 */ + 0xac, 0x57, 0x27, 0x09, 0x2f, 0x08, 0x9e, 0xfa, 0x27, 0xb6, 0x8d, 0xf3, 0x65, 0xf8, 0xac, 0x8f, /* Byte value: 0x7a */ + 0x2d, 0x0e, 0x3c, 0x3d, 0xf8, 0xc4, 0xc1, 0xda, 0x3c, 0x93, 0x42, 0xe7, 0xe2, 0xeb, 0x2d, 0x73, /* Byte value: 0x7b */ + 0x25, 0x2b, 0x71, 0xd7, 0x7e, 0x0f, 0x74, 0xd6, 0x71, 0x47, 0xc1, 0x01, 0x7a, 0xa5, 0x25, 0xb2, /* Byte value: 0x7c */ + 0x4a, 0x56, 0xe2, 0x6d, 0xfc, 0x1e, 0xe8, 0x6f, 0xe2, 0x8e, 0x41, 0x02, 0xf4, 0x89, 0x4a, 0xa7, /* Byte value: 0x7d */ + 0xb0, 0xcb, 0x37, 0x81, 0x25, 0x12, 0x39, 0xe8, 0x37, 0x63, 0x6b, 0x69, 0x42, 0x0d, 0xb0, 0x8e, /* Byte value: 0x7e */ + 0x41, 0xa7, 0x6c, 0xd0, 0xda, 0xb6, 0xbf, 0x80, 0x6c, 0x94, 0xba, 0x50, 0x59, 0x4c, 0x41, 0x76, /* Byte value: 0x7f */ + 0x30, 0xde, 0x6d, 0x39, 0x92, 0xff, 0x38, 0x28, 0x6d, 0xbd, 0x8c, 0x11, 0xd6, 0x67, 0x30, 0xc3, /* Byte value: 0x80 */ + 0x33, 0x0a, 0xae, 0x6e, 0x32, 0x9c, 0xda, 0xcb, 0xae, 0x73, 0xf4, 0xa5, 0xe3, 0xec, 0x33, 0xd3, /* Byte value: 0x81 */ + 0x65, 0xc0, 0x5c, 0x8b, 0xc4, 0x98, 0x95, 0xb6, 0x5c, 0x28, 0x53, 0x3d, 0x30, 0x90, 0x65, 0x75, /* Byte value: 0x82 */ + 0x8b, 0xe4, 0xd4, 0x05, 0x91, 0x45, 0x56, 0x2f, 0xd4, 0xc4, 0x1c, 0x2a, 0x39, 0xaf, 0x8b, 0x9c, /* Byte value: 0x83 */ + 0xef, 0x68, 0xc9, 0x02, 0x35, 0xfc, 0x9d, 0x79, 0xc9, 0x17, 0x67, 0x7b, 0x1a, 0x46, 0xef, 0x58, /* Byte value: 0x84 */ + 0x09, 0x69, 0x0c, 0x66, 0xe6, 0xea, 0xeb, 0xec, 0x0c, 0x2f, 0xab, 0x8a, 0x8b, 0x37, 0x09, 0x70, /* Byte value: 0x85 */ + 0x9b, 0xae, 0x4e, 0x12, 0x5e, 0x10, 0xff, 0x37, 0x4e, 0xaf, 0xd9, 0x25, 0xca, 0x33, 0x9b, 0xdd, /* Byte value: 0x86 */ + 0x6f, 0x7d, 0x93, 0xba, 0x82, 0x11, 0x9c, 0xb9, 0x93, 0xc9, 0x80, 0x03, 0x8e, 0x2c, 0x6f, 0x15, /* Byte value: 0x87 */ + 0x84, 0xe6, 0x9d, 0xcd, 0xf4, 0x69, 0xba, 0xc6, 0x9d, 0xb4, 0x47, 0x0b, 0xd8, 0x4d, 0x84, 0xcc, /* Byte value: 0x88 */ + 0x15, 0xf5, 0x1c, 0xee, 0xec, 0xf0, 0x4c, 0xfe, 0x1c, 0xfa, 0x4d, 0x10, 0xac, 0xc2, 0x15, 0x71, /* Byte value: 0x89 */ + 0x75, 0x8a, 0xc6, 0x9c, 0x0b, 0xcd, 0x3c, 0xae, 0xc6, 0x43, 0x96, 0x32, 0xc3, 0x0c, 0x75, 0x34, /* Byte value: 0x8a */ + 0x61, 0x33, 0x9b, 0xfe, 0x87, 0x1c, 0x2e, 0xb0, 0x9b, 0x42, 0xf3, 0x4e, 0x7c, 0xb7, 0x61, 0xf4, /* Byte value: 0x8b */ + 0xf9, 0x49, 0x16, 0xbb, 0x79, 0x6f, 0x33, 0x64, 0x16, 0x23, 0x52, 0xdf, 0x83, 0x0f, 0xf9, 0x39, /* Byte value: 0x8c */ + 0x12, 0xd2, 0x18, 0xcc, 0x0f, 0x17, 0x15, 0x1b, 0x18, 0x5e, 0x95, 0xd7, 0xd5, 0x6e, 0x12, 0xe0, /* Byte value: 0x8d */ + 0x70, 0x35, 0x40, 0x65, 0x28, 0x68, 0xd9, 0x48, 0x40, 0xd2, 0x1e, 0x2d, 0x9c, 0x52, 0x70, 0x04, /* Byte value: 0x8e */ + 0xa3, 0x55, 0x6e, 0xc1, 0x4a, 0x24, 0x72, 0x13, 0x6e, 0xc6, 0xd6, 0xd2, 0x84, 0x1a, 0xa3, 0xdf, /* Byte value: 0x8f */ + 0x9c, 0x89, 0x4a, 0x30, 0xbd, 0xf7, 0xa6, 0xd2, 0x4a, 0x0b, 0x01, 0xe2, 0xb3, 0x9f, 0x9c, 0x4c, /* Byte value: 0x90 */ + 0x4e, 0xa5, 0x25, 0x18, 0xbf, 0x9a, 0x53, 0x69, 0x25, 0xe4, 0xe1, 0x71, 0xb8, 0xae, 0x4e, 0x26, /* Byte value: 0x91 */ + 0xa9, 0xe8, 0xa1, 0xf0, 0x0c, 0xad, 0x7b, 0x1c, 0xa1, 0x27, 0x05, 0xec, 0x3a, 0xa6, 0xa9, 0xbf, /* Byte value: 0x92 */ + 0x7b, 0xc4, 0xce, 0xd8, 0x0e, 0xc0, 0x8e, 0xa7, 0xce, 0xc8, 0xe5, 0x7f, 0x31, 0x97, 0x7b, 0xd5, /* Byte value: 0x93 */ + 0x47, 0xcc, 0x29, 0x7e, 0x59, 0x70, 0xb8, 0x85, 0x29, 0xcb, 0x4a, 0xfb, 0x33, 0x99, 0x47, 0x56, /* Byte value: 0x94 */ + 0xe9, 0x03, 0x8c, 0xac, 0xb6, 0x3a, 0x9a, 0x7c, 0x8c, 0x48, 0x97, 0xd0, 0x70, 0x93, 0xe9, 0x78, /* Byte value: 0x95 */ + 0x7a, 0x88, 0x8f, 0x54, 0x6e, 0xe1, 0xd0, 0x47, 0x8f, 0x33, 0xcd, 0x13, 0x22, 0xee, 0x7a, 0x64, /* Byte value: 0x96 */ + 0xf1, 0x6c, 0x5b, 0x51, 0xff, 0xa4, 0x86, 0x68, 0x5b, 0xf7, 0xd1, 0x39, 0x1b, 0x41, 0xf1, 0xf8, /* Byte value: 0x97 */ + 0xc4, 0x0d, 0xb0, 0x91, 0x4e, 0xfe, 0x5b, 0xa6, 0xb0, 0xdb, 0xd5, 0x37, 0x92, 0x78, 0xc4, 0x0b, /* Byte value: 0x98 */ + 0xaf, 0x83, 0xe4, 0x5e, 0x8f, 0x6b, 0x7c, 0x19, 0xe4, 0x78, 0xf5, 0x47, 0x50, 0x73, 0xaf, 0x9f, /* Byte value: 0x99 */ + 0x68, 0x5a, 0x97, 0x98, 0x61, 0xf6, 0xc5, 0x5c, 0x97, 0x6d, 0x58, 0xc4, 0xf7, 0x80, 0x68, 0x84, /* Byte value: 0x9a */ + 0xbe, 0x85, 0x3f, 0xc5, 0x20, 0x1f, 0x8b, 0xe1, 0x3f, 0xe8, 0x18, 0x24, 0xb0, 0x96, 0xbe, 0x6f, /* Byte value: 0x9b */ + 0xbf, 0xc9, 0x7e, 0x49, 0x40, 0x3e, 0xd5, 0x01, 0x7e, 0x13, 0x30, 0x48, 0xa3, 0xef, 0xbf, 0xde, /* Byte value: 0x9c */ + 0x2e, 0xda, 0xff, 0x6a, 0x58, 0xa7, 0x23, 0x39, 0xff, 0x5d, 0x3a, 0x53, 0xd7, 0x60, 0x2e, 0x63, /* Byte value: 0x9d */ + 0x48, 0xce, 0x60, 0xb6, 0x3c, 0x5c, 0x54, 0x6c, 0x60, 0xbb, 0x11, 0xda, 0xd2, 0x7b, 0x48, 0x06, /* Byte value: 0x9e */ + 0xce, 0xb0, 0x7f, 0xa0, 0x08, 0x77, 0x52, 0xa9, 0x7f, 0x3a, 0x06, 0x09, 0x2c, 0xc4, 0xce, 0x6b, /* Byte value: 0x9f */ + 0x3d, 0x44, 0xa6, 0x2a, 0x37, 0x91, 0x68, 0xc2, 0xa6, 0xf8, 0x87, 0xe8, 0x11, 0x77, 0x3d, 0x32, /* Byte value: 0xa0 */ + 0x32, 0x46, 0xef, 0xe2, 0x52, 0xbd, 0x84, 0x2b, 0xef, 0x88, 0xdc, 0xc9, 0xf0, 0x95, 0x32, 0x62, /* Byte value: 0xa1 */ + 0xe6, 0x01, 0xc5, 0x64, 0xd3, 0x16, 0x76, 0x95, 0xc5, 0x38, 0xcc, 0xf1, 0x91, 0x71, 0xe6, 0x28, /* Byte value: 0xa2 */ + 0x6b, 0x8e, 0x54, 0xcf, 0xc1, 0x95, 0x27, 0xbf, 0x54, 0xa3, 0x20, 0x70, 0xc2, 0x0b, 0x6b, 0x94, /* Byte value: 0xa3 */ + 0xbb, 0x3a, 0xb9, 0x3c, 0x03, 0xba, 0x6e, 0x07, 0xb9, 0x79, 0x90, 0x3b, 0xef, 0xc8, 0xbb, 0x5f, /* Byte value: 0xa4 */ + 0x91, 0x13, 0x81, 0x23, 0x18, 0x99, 0xf6, 0x38, 0x81, 0x4e, 0x0a, 0x1b, 0x74, 0x8f, 0x91, 0xbd, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x83, 0xc1, 0x99, 0xef, 0x17, 0x8e, 0xe3, 0x23, 0x99, 0x10, 0x9f, 0xcc, 0xa1, 0xe1, 0x83, 0x5d, /* Byte value: 0xa7 */ + 0xe0, 0x6a, 0x80, 0xca, 0x50, 0xd0, 0x71, 0x90, 0x80, 0x67, 0x3c, 0x5a, 0xfb, 0xa4, 0xe0, 0x08, /* Byte value: 0xa8 */ + 0x82, 0x8d, 0xd8, 0x63, 0x77, 0xaf, 0xbd, 0xc3, 0xd8, 0xeb, 0xb7, 0xa0, 0xb2, 0x98, 0x82, 0xec, /* Byte value: 0xa9 */ + 0xd7, 0x93, 0xe9, 0xd1, 0x21, 0xc8, 0x10, 0x5d, 0xe9, 0x7e, 0x68, 0x8c, 0x54, 0x6f, 0xd7, 0x5a, /* Byte value: 0xaa */ + 0xf2, 0xb8, 0x98, 0x06, 0x5f, 0xc7, 0x64, 0x8b, 0x98, 0x39, 0xa9, 0x8d, 0x2e, 0xca, 0xf2, 0xe8, /* Byte value: 0xab */ + 0xcd, 0x64, 0xbc, 0xf7, 0xa8, 0x14, 0xb0, 0x4a, 0xbc, 0xf4, 0x7e, 0xbd, 0x19, 0x4f, 0xcd, 0x7b, /* Byte value: 0xac */ + 0x78, 0x10, 0x0d, 0x8f, 0xae, 0xa3, 0x6c, 0x44, 0x0d, 0x06, 0x9d, 0xcb, 0x04, 0x1c, 0x78, 0xc5, /* Byte value: 0xad */ + 0xc0, 0xfe, 0x77, 0xe4, 0x0d, 0x7a, 0xe0, 0xa0, 0x77, 0xb1, 0x75, 0x44, 0xde, 0x5f, 0xc0, 0x8a, /* Byte value: 0xae */ + 0x63, 0xab, 0x19, 0x25, 0x47, 0x5e, 0x92, 0xb3, 0x19, 0x77, 0xa3, 0x96, 0x5a, 0x45, 0x63, 0x55, /* Byte value: 0xaf */ + 0x87, 0x32, 0x5e, 0x9a, 0x54, 0x0a, 0x58, 0x25, 0x5e, 0x7a, 0x3f, 0xbf, 0xed, 0xc6, 0x87, 0xdc, /* Byte value: 0xb0 */ + 0xfc, 0xf6, 0x90, 0x42, 0x5a, 0xca, 0xd6, 0x82, 0x90, 0xb2, 0xda, 0xc0, 0xdc, 0x51, 0xfc, 0x09, /* Byte value: 0xb1 */ + 0x94, 0xac, 0x07, 0xda, 0x3b, 0x3c, 0x13, 0xde, 0x07, 0xdf, 0x82, 0x04, 0x2b, 0xd1, 0x94, 0x8d, /* Byte value: 0xb2 */ + 0x08, 0x25, 0x4d, 0xea, 0x86, 0xcb, 0xb5, 0x0c, 0x4d, 0xd4, 0x83, 0xe6, 0x98, 0x4e, 0x08, 0xc1, /* Byte value: 0xb3 */ + 0x81, 0x59, 0x1b, 0x34, 0xd7, 0xcc, 0x5f, 0x20, 0x1b, 0x25, 0xcf, 0x14, 0x87, 0x13, 0x81, 0xfc, /* Byte value: 0xb4 */ + 0x17, 0x6d, 0x9e, 0x35, 0x2c, 0xb2, 0xf0, 0xfd, 0x9e, 0xcf, 0x1d, 0xc8, 0x8a, 0x30, 0x17, 0xd0, /* Byte value: 0xb5 */ + 0x62, 0xe7, 0x58, 0xa9, 0x27, 0x7f, 0xcc, 0x53, 0x58, 0x8c, 0x8b, 0xfa, 0x49, 0x3c, 0x62, 0xe4, /* Byte value: 0xb6 */ + 0xd8, 0x91, 0xa0, 0x19, 0x44, 0xe4, 0xfc, 0xb4, 0xa0, 0x0e, 0x33, 0xad, 0xb5, 0x8d, 0xd8, 0x0a, /* Byte value: 0xb7 */ + 0x31, 0x92, 0x2c, 0xb5, 0xf2, 0xde, 0x66, 0xc8, 0x2c, 0x46, 0xa4, 0x7d, 0xc5, 0x1e, 0x31, 0x72, /* Byte value: 0xb8 */ + 0x10, 0x4a, 0x9a, 0x17, 0xcf, 0x55, 0xa9, 0x18, 0x9a, 0x6b, 0xc5, 0x0f, 0xf3, 0x9c, 0x10, 0x41, /* Byte value: 0xb9 */ + 0x21, 0xd8, 0xb6, 0xa2, 0x3d, 0x8b, 0xcf, 0xd0, 0xb6, 0x2d, 0x61, 0x72, 0x36, 0x82, 0x21, 0x33, /* Byte value: 0xba */ + 0xda, 0x09, 0x22, 0xc2, 0x84, 0xa6, 0x40, 0xb7, 0x22, 0x3b, 0x63, 0x75, 0x93, 0x7f, 0xda, 0xab, /* Byte value: 0xbb */ + 0x66, 0x14, 0x9f, 0xdc, 0x64, 0xfb, 0x77, 0x55, 0x9f, 0xe6, 0x2b, 0x89, 0x05, 0x1b, 0x66, 0x65, /* Byte value: 0xbc */ + 0x39, 0xb7, 0x61, 0x5f, 0x74, 0x15, 0xd3, 0xc4, 0x61, 0x92, 0x27, 0x9b, 0x5d, 0x50, 0x39, 0xb3, /* Byte value: 0xbd */ + 0xfd, 0xba, 0xd1, 0xce, 0x3a, 0xeb, 0x88, 0x62, 0xd1, 0x49, 0xf2, 0xac, 0xcf, 0x28, 0xfd, 0xb8, /* Byte value: 0xbe */ + 0x0e, 0x4e, 0x08, 0x44, 0x05, 0x0d, 0xb2, 0x09, 0x08, 0x8b, 0x73, 0x4d, 0xf2, 0x9b, 0x0e, 0xe1, /* Byte value: 0xbf */ + 0x6e, 0x31, 0xd2, 0x36, 0xe2, 0x30, 0xc2, 0x59, 0xd2, 0x32, 0xa8, 0x6f, 0x9d, 0x55, 0x6e, 0xa4, /* Byte value: 0xc0 */ + 0x8f, 0x17, 0x13, 0x70, 0xd2, 0xc1, 0xed, 0x29, 0x13, 0xae, 0xbc, 0x59, 0x75, 0x88, 0x8f, 0x1d, /* Byte value: 0xc1 */ + 0x99, 0x36, 0xcc, 0xc9, 0x9e, 0x52, 0x43, 0x34, 0xcc, 0x9a, 0x89, 0xfd, 0xec, 0xc1, 0x99, 0x7c, /* Byte value: 0xc2 */ + 0x6d, 0xe5, 0x11, 0x61, 0x42, 0x53, 0x20, 0xba, 0x11, 0xfc, 0xd0, 0xdb, 0xa8, 0xde, 0x6d, 0xb4, /* Byte value: 0xc3 */ + 0xf3, 0xf4, 0xd9, 0x8a, 0x3f, 0xe6, 0x3a, 0x6b, 0xd9, 0xc2, 0x81, 0xe1, 0x3d, 0xb3, 0xf3, 0x59, /* Byte value: 0xc4 */ + 0xde, 0xfa, 0xe5, 0xb7, 0xc7, 0x22, 0xfb, 0xb1, 0xe5, 0x51, 0xc3, 0x06, 0xdf, 0x58, 0xde, 0x2a, /* Byte value: 0xc5 */ + 0x88, 0x30, 0x17, 0x52, 0x31, 0x26, 0xb4, 0xcc, 0x17, 0x0a, 0x64, 0x9e, 0x0c, 0x24, 0x88, 0x8c, /* Byte value: 0xc6 */ + 0x0d, 0x9a, 0xcb, 0x13, 0xa5, 0x6e, 0x50, 0xea, 0xcb, 0x45, 0x0b, 0xf9, 0xc7, 0x10, 0x0d, 0xf1, /* Byte value: 0xc7 */ + 0x8d, 0x8f, 0x91, 0xab, 0x12, 0x83, 0x51, 0x2a, 0x91, 0x9b, 0xec, 0x81, 0x53, 0x7a, 0x8d, 0xbc, /* Byte value: 0xc8 */ + 0xd4, 0x47, 0x2a, 0x86, 0x81, 0xab, 0xf2, 0xbe, 0x2a, 0xb0, 0x10, 0x38, 0x61, 0xe4, 0xd4, 0x4a, /* Byte value: 0xc9 */ + 0x5b, 0x50, 0x39, 0xf6, 0x53, 0x6a, 0x1f, 0x97, 0x39, 0x1e, 0xac, 0x61, 0x14, 0x6c, 0x5b, 0x57, /* Byte value: 0xca */ + 0xd1, 0xf8, 0xac, 0x7f, 0xa2, 0x0e, 0x17, 0x58, 0xac, 0x21, 0x98, 0x27, 0x3e, 0xba, 0xd1, 0x7a, /* Byte value: 0xcb */ + 0x5d, 0x3b, 0x7c, 0x58, 0xd0, 0xac, 0x18, 0x92, 0x7c, 0x41, 0x5c, 0xca, 0x7e, 0xb9, 0x5d, 0x77, /* Byte value: 0xcc */ + 0x03, 0xd4, 0xc3, 0x57, 0xa0, 0x63, 0xe2, 0xe3, 0xc3, 0xce, 0x78, 0xb4, 0x35, 0x8b, 0x03, 0x10, /* Byte value: 0xcd */ + 0xc8, 0xdb, 0x3a, 0x0e, 0x8b, 0xb1, 0x55, 0xac, 0x3a, 0x65, 0xf6, 0xa2, 0x46, 0x11, 0xc8, 0x4b, /* Byte value: 0xce */ + 0xc1, 0xb2, 0x36, 0x68, 0x6d, 0x5b, 0xbe, 0x40, 0x36, 0x4a, 0x5d, 0x28, 0xcd, 0x26, 0xc1, 0x3b, /* Byte value: 0xcf */ + 0x77, 0x12, 0x44, 0x47, 0xcb, 0x8f, 0x80, 0xad, 0x44, 0x76, 0xc6, 0xea, 0xe5, 0xfe, 0x77, 0x95, /* Byte value: 0xd0 */ + 0x3a, 0x63, 0xa2, 0x08, 0xd4, 0x76, 0x31, 0x27, 0xa2, 0x5c, 0x5f, 0x2f, 0x68, 0xdb, 0x3a, 0xa3, /* Byte value: 0xd1 */ + 0xf6, 0x4b, 0x5f, 0x73, 0x1c, 0x43, 0xdf, 0x8d, 0x5f, 0x53, 0x09, 0xfe, 0x62, 0xed, 0xf6, 0x69, /* Byte value: 0xd2 */ + 0xb9, 0xa2, 0x3b, 0xe7, 0xc3, 0xf8, 0xd2, 0x04, 0x3b, 0x4c, 0xc0, 0xe3, 0xc9, 0x3a, 0xb9, 0xfe, /* Byte value: 0xd3 */ + 0xa1, 0xcd, 0xec, 0x1a, 0x8a, 0x66, 0xce, 0x10, 0xec, 0xf3, 0x86, 0x0a, 0xa2, 0xe8, 0xa1, 0x7e, /* Byte value: 0xd4 */ + 0xc6, 0x95, 0x32, 0x4a, 0x8e, 0xbc, 0xe7, 0xa5, 0x32, 0xee, 0x85, 0xef, 0xb4, 0x8a, 0xc6, 0xaa, /* Byte value: 0xd5 */ + 0x7d, 0xaf, 0x8b, 0x76, 0x8d, 0x06, 0x89, 0xa2, 0x8b, 0x97, 0x15, 0xd4, 0x5b, 0x42, 0x7d, 0xf5, /* Byte value: 0xd6 */ + 0x24, 0x67, 0x30, 0x5b, 0x1e, 0x2e, 0x2a, 0x36, 0x30, 0xbc, 0xe9, 0x6d, 0x69, 0xdc, 0x24, 0x03, /* Byte value: 0xd7 */ + 0xdf, 0xb6, 0xa4, 0x3b, 0xa7, 0x03, 0xa5, 0x51, 0xa4, 0xaa, 0xeb, 0x6a, 0xcc, 0x21, 0xdf, 0x9b, /* Byte value: 0xd8 */ + 0x64, 0x8c, 0x1d, 0x07, 0xa4, 0xb9, 0xcb, 0x56, 0x1d, 0xd3, 0x7b, 0x51, 0x23, 0xe9, 0x64, 0xc4, /* Byte value: 0xd9 */ + 0x23, 0x40, 0x34, 0x79, 0xfd, 0xc9, 0x73, 0xd3, 0x34, 0x18, 0x31, 0xaa, 0x10, 0x70, 0x23, 0x92, /* Byte value: 0xda */ + 0x73, 0xe1, 0x83, 0x32, 0x88, 0x0b, 0x3b, 0xab, 0x83, 0x1c, 0x66, 0x99, 0xa9, 0xd9, 0x73, 0x14, /* Byte value: 0xdb */ + 0x69, 0x16, 0xd6, 0x14, 0x01, 0xd7, 0x9b, 0xbc, 0xd6, 0x96, 0x70, 0xa8, 0xe4, 0xf9, 0x69, 0x35, /* Byte value: 0xdc */ + 0x18, 0x6f, 0xd7, 0xfd, 0x49, 0x9e, 0x1c, 0x14, 0xd7, 0xbf, 0x46, 0xe9, 0x6b, 0xd2, 0x18, 0x80, /* Byte value: 0xdd */ + 0xbc, 0x1d, 0xbd, 0x1e, 0xe0, 0x5d, 0x37, 0xe2, 0xbd, 0xdd, 0x48, 0xfc, 0x96, 0x64, 0xbc, 0xce, /* Byte value: 0xde */ + 0x42, 0x73, 0xaf, 0x87, 0x7a, 0xd5, 0x5d, 0x63, 0xaf, 0x5a, 0xc2, 0xe4, 0x6c, 0xc7, 0x42, 0x66, /* Byte value: 0xdf */ + 0x1f, 0x48, 0xd3, 0xdf, 0xaa, 0x79, 0x45, 0xf1, 0xd3, 0x1b, 0x9e, 0x2e, 0x12, 0x7e, 0x1f, 0x11, /* Byte value: 0xe0 */ + 0x98, 0x7a, 0x8d, 0x45, 0xfe, 0x73, 0x1d, 0xd4, 0x8d, 0x61, 0xa1, 0x91, 0xff, 0xb8, 0x98, 0xcd, /* Byte value: 0xe1 */ + 0x53, 0x75, 0x74, 0x1c, 0xd5, 0xa1, 0xaa, 0x9b, 0x74, 0xca, 0x2f, 0x87, 0x8c, 0x22, 0x53, 0x96, /* Byte value: 0xe2 */ + 0xe4, 0x99, 0x47, 0xbf, 0x13, 0x54, 0xca, 0x96, 0x47, 0x0d, 0x9c, 0x29, 0xb7, 0x83, 0xe4, 0x89, /* Byte value: 0xe3 */ + 0xae, 0xcf, 0xa5, 0xd2, 0xef, 0x4a, 0x22, 0xf9, 0xa5, 0x83, 0xdd, 0x2b, 0x43, 0x0a, 0xae, 0x2e, /* Byte value: 0xe4 */ + 0xd9, 0xdd, 0xe1, 0x95, 0x24, 0xc5, 0xa2, 0x54, 0xe1, 0xf5, 0x1b, 0xc1, 0xa6, 0xf4, 0xd9, 0xbb, /* Byte value: 0xe5 */ + 0x22, 0x0c, 0x75, 0xf5, 0x9d, 0xe8, 0x2d, 0x33, 0x75, 0xe3, 0x19, 0xc6, 0x03, 0x09, 0x22, 0x23, /* Byte value: 0xe6 */ + 0x52, 0x39, 0x35, 0x90, 0xb5, 0x80, 0xf4, 0x7b, 0x35, 0x31, 0x07, 0xeb, 0x9f, 0x5b, 0x52, 0x27, /* Byte value: 0xe7 */ + 0x05, 0xbf, 0x86, 0xf9, 0x23, 0xa5, 0xe5, 0xe6, 0x86, 0x91, 0x88, 0x1f, 0x5f, 0x5e, 0x05, 0x30, /* Byte value: 0xe8 */ + 0x6c, 0xa9, 0x50, 0xed, 0x22, 0x72, 0x7e, 0x5a, 0x50, 0x07, 0xf8, 0xb7, 0xbb, 0xa7, 0x6c, 0x05, /* Byte value: 0xe9 */ + 0xd3, 0x60, 0x2e, 0xa4, 0x62, 0x4c, 0xab, 0x5b, 0x2e, 0x14, 0xc8, 0xff, 0x18, 0x48, 0xd3, 0xdb, /* Byte value: 0xea */ + 0xff, 0x22, 0x53, 0x15, 0xfa, 0xa9, 0x34, 0x61, 0x53, 0x7c, 0xa2, 0x74, 0xe9, 0xda, 0xff, 0x19, /* Byte value: 0xeb */ + 0x9a, 0xe2, 0x0f, 0x9e, 0x3e, 0x31, 0xa1, 0xd7, 0x0f, 0x54, 0xf1, 0x49, 0xd9, 0x4a, 0x9a, 0x6c, /* Byte value: 0xec */ + 0x2c, 0x42, 0x7d, 0xb1, 0x98, 0xe5, 0x9f, 0x3a, 0x7d, 0x68, 0x6a, 0x8b, 0xf1, 0x92, 0x2c, 0xc2, /* Byte value: 0xed */ + 0x29, 0xfd, 0xfb, 0x48, 0xbb, 0x40, 0x7a, 0xdc, 0xfb, 0xf9, 0xe2, 0x94, 0xae, 0xcc, 0x29, 0xf2, /* Byte value: 0xee */ + 0x5e, 0xef, 0xbf, 0x0f, 0x70, 0xcf, 0xfa, 0x71, 0xbf, 0x8f, 0x24, 0x7e, 0x4b, 0x32, 0x5e, 0x67, /* Byte value: 0xef */ + 0x57, 0x86, 0xb3, 0x69, 0x96, 0x25, 0x11, 0x9d, 0xb3, 0xa0, 0x8f, 0xf4, 0xc0, 0x05, 0x57, 0x17, /* Byte value: 0xf0 */ + 0xed, 0xf0, 0x4b, 0xd9, 0xf5, 0xbe, 0x21, 0x7a, 0x4b, 0x22, 0x37, 0xa3, 0x3c, 0xb4, 0xed, 0xf9, /* Byte value: 0xf1 */ + 0x46, 0x80, 0x68, 0xf2, 0x39, 0x51, 0xe6, 0x65, 0x68, 0x30, 0x62, 0x97, 0x20, 0xe0, 0x46, 0xe7, /* Byte value: 0xf2 */ + 0x34, 0x2d, 0xaa, 0x4c, 0xd1, 0x7b, 0x83, 0x2e, 0xaa, 0xd7, 0x2c, 0x62, 0x9a, 0x40, 0x34, 0x42, /* Byte value: 0xf3 */ + 0x72, 0xad, 0xc2, 0xbe, 0xe8, 0x2a, 0x65, 0x4b, 0xc2, 0xe7, 0x4e, 0xf5, 0xba, 0xa0, 0x72, 0xa5, /* Byte value: 0xf4 */ + 0xb5, 0x74, 0xb1, 0x78, 0x06, 0xb7, 0xdc, 0x0e, 0xb1, 0xf2, 0xe3, 0x76, 0x1d, 0x53, 0xb5, 0xbe, /* Byte value: 0xf5 */ + 0x11, 0x06, 0xdb, 0x9b, 0xaf, 0x74, 0xf7, 0xf8, 0xdb, 0x90, 0xed, 0x63, 0xe0, 0xe5, 0x11, 0xf0, /* Byte value: 0xf6 */ + 0xe2, 0xf2, 0x02, 0x11, 0x90, 0x92, 0xcd, 0x93, 0x02, 0x52, 0x6c, 0x82, 0xdd, 0x56, 0xe2, 0xa9, /* Byte value: 0xf7 */ + 0xd6, 0xdf, 0xa8, 0x5d, 0x41, 0xe9, 0x4e, 0xbd, 0xa8, 0x85, 0x40, 0xe0, 0x47, 0x16, 0xd6, 0xeb, /* Byte value: 0xf8 */ + 0xee, 0x24, 0x88, 0x8e, 0x55, 0xdd, 0xc3, 0x99, 0x88, 0xec, 0x4f, 0x17, 0x09, 0x3f, 0xee, 0xe9, /* Byte value: 0xf9 */ + 0x90, 0x5f, 0xc0, 0xaf, 0x78, 0xb8, 0xa8, 0xd8, 0xc0, 0xb5, 0x22, 0x77, 0x67, 0xf6, 0x90, 0x0c, /* Byte value: 0xfa */ + 0x14, 0xb9, 0x5d, 0x62, 0x8c, 0xd1, 0x12, 0x1e, 0x5d, 0x01, 0x65, 0x7c, 0xbf, 0xbb, 0x14, 0xc0, /* Byte value: 0xfb */ + 0x3e, 0x90, 0x65, 0x7d, 0x97, 0xf2, 0x8a, 0x21, 0x65, 0x36, 0xff, 0x5c, 0x24, 0xfc, 0x3e, 0x22, /* Byte value: 0xfc */ + 0x86, 0x7e, 0x1f, 0x16, 0x34, 0x2b, 0x06, 0xc5, 0x1f, 0x81, 0x17, 0xd3, 0xfe, 0xbf, 0x86, 0x6d, /* Byte value: 0xfd */ + 0x49, 0x82, 0x21, 0x3a, 0x5c, 0x7d, 0x0a, 0x8c, 0x21, 0x40, 0x39, 0xb6, 0xc1, 0x02, 0x49, 0xb7, /* Byte value: 0xfe */ + 0xf7, 0x07, 0x1e, 0xff, 0x7c, 0x62, 0x81, 0x6d, 0x1e, 0xa8, 0x21, 0x92, 0x71, 0x94, 0xf7, 0xd8, /* Byte value: 0xff */ + 0x0a, 0xbd, 0xcf, 0x31, 0x46, 0x89, 0x09, 0x0f, 0xcf, 0xe1, 0xd3, 0x3e, 0xbe, 0xbc, 0x0a, 0x60, /* Byte value: 0x00 */ + + /* Matrix row: 3 */ + 0xa8, 0x78, 0x41, 0x9a, 0x63, 0x9a, 0xaa, 0xcc, 0x6d, 0x6b, 0xb6, 0x2d, 0xbf, 0x63, 0x8e, 0x1b, /* Byte value: 0x01 */ + 0xb4, 0x31, 0xad, 0x42, 0xc9, 0x42, 0x37, 0x9b, 0xc6, 0x80, 0x29, 0xcb, 0xc0, 0xc9, 0x15, 0xf8, /* Byte value: 0x02 */ + 0x96, 0xde, 0x29, 0xd5, 0x90, 0xd5, 0x18, 0x10, 0xbc, 0xed, 0x40, 0xd2, 0x7a, 0x90, 0xf0, 0x4e, /* Byte value: 0x03 */ + 0x1e, 0xe4, 0x7c, 0xcc, 0x37, 0xcc, 0xa4, 0x79, 0x97, 0x9a, 0x27, 0xb6, 0xd7, 0x37, 0xe2, 0xd3, /* Byte value: 0x04 */ + 0x8a, 0x97, 0xc5, 0x0d, 0x3a, 0x0d, 0x85, 0x47, 0x17, 0x06, 0xdf, 0x34, 0x05, 0x3a, 0x6b, 0xad, /* Byte value: 0x05 */ + 0xf5, 0x02, 0xcd, 0x8d, 0x2d, 0x8d, 0xe6, 0x05, 0x54, 0x61, 0x14, 0x71, 0xb0, 0x2d, 0x33, 0x2f, /* Byte value: 0x06 */ + 0x9f, 0x98, 0x64, 0x8f, 0x0e, 0x8f, 0x01, 0xbf, 0x52, 0x33, 0xb9, 0x79, 0xcb, 0x0e, 0x0a, 0x96, /* Byte value: 0x07 */ + 0xa5, 0xa7, 0xef, 0xe8, 0x04, 0xe8, 0xc1, 0x3f, 0xfb, 0x57, 0xfc, 0x26, 0x9d, 0x04, 0x86, 0xa3, /* Byte value: 0x08 */ + 0x13, 0x3b, 0xd2, 0xbe, 0x50, 0xbe, 0xcf, 0x8a, 0x01, 0xa6, 0x6d, 0xbd, 0xf5, 0x50, 0xea, 0x6b, /* Byte value: 0x09 */ + 0x39, 0x25, 0x53, 0x79, 0x38, 0x79, 0x04, 0xb9, 0x8b, 0xcc, 0xa1, 0x27, 0xaa, 0x38, 0x28, 0x1d, /* Byte value: 0x0a */ + 0xac, 0xe1, 0xa2, 0xb2, 0x9a, 0xb2, 0xd8, 0x90, 0x15, 0x89, 0x05, 0x8d, 0x2c, 0x9a, 0x7c, 0x7b, /* Byte value: 0x0b */ + 0x2d, 0x9d, 0xba, 0xf1, 0xa3, 0xf1, 0x7d, 0x56, 0xd0, 0x20, 0x9b, 0x42, 0x30, 0xa3, 0x94, 0x3e, /* Byte value: 0x0c */ + 0x83, 0xd1, 0x88, 0x57, 0xa4, 0x57, 0x9c, 0xe8, 0xf9, 0xd8, 0x26, 0x9f, 0xb4, 0xa4, 0x91, 0x75, /* Byte value: 0x0d */ + 0x86, 0xff, 0x23, 0x75, 0xf2, 0x75, 0x13, 0xa3, 0x9f, 0xe3, 0xc9, 0x17, 0x73, 0xf2, 0xbe, 0x0d, /* Byte value: 0x0e */ + 0xb9, 0xee, 0x03, 0x30, 0xae, 0x30, 0x5c, 0x68, 0x50, 0xbc, 0x63, 0xc0, 0xe2, 0xae, 0x1d, 0x40, /* Byte value: 0x0f */ + 0x76, 0xd3, 0x45, 0xda, 0x89, 0xda, 0x7a, 0xed, 0xad, 0xb9, 0x32, 0xee, 0x04, 0x89, 0xa2, 0x5a, /* Byte value: 0x10 */ + 0x0f, 0x72, 0x3e, 0x66, 0xfa, 0x66, 0x52, 0xdd, 0xaa, 0x4d, 0xf2, 0x5b, 0x8a, 0xfa, 0x71, 0x88, /* Byte value: 0x11 */ + 0x5a, 0xf9, 0xb7, 0x21, 0x85, 0x21, 0xfa, 0xac, 0x63, 0x40, 0xf5, 0x84, 0x60, 0x85, 0xeb, 0x7c, /* Byte value: 0x12 */ + 0xa0, 0x89, 0x44, 0xca, 0x52, 0xca, 0x4e, 0x74, 0x9d, 0x6c, 0x13, 0xae, 0x5a, 0x52, 0xa9, 0xdb, /* Byte value: 0x13 */ + 0x92, 0x47, 0xca, 0xfd, 0x69, 0xfd, 0x6a, 0x4c, 0xc4, 0x0f, 0xf3, 0x72, 0xe9, 0x69, 0x02, 0x2e, /* Byte value: 0x14 */ + 0xe2, 0xa0, 0xfc, 0x1b, 0x84, 0x1b, 0x5b, 0xd3, 0x2d, 0x25, 0xca, 0x6c, 0xd6, 0x84, 0x2b, 0x24, /* Byte value: 0x15 */ + 0x34, 0xfa, 0xfd, 0x0b, 0x5f, 0x0b, 0x6f, 0x4a, 0x1d, 0xf0, 0xeb, 0x2c, 0x88, 0x5f, 0x20, 0xa5, /* Byte value: 0x16 */ + 0xee, 0xc8, 0x1a, 0x63, 0x4c, 0x63, 0xcd, 0x37, 0xa5, 0xc0, 0xdc, 0x4f, 0xa0, 0x4c, 0xfe, 0x84, /* Byte value: 0x17 */ + 0x6d, 0x19, 0x92, 0x34, 0xe8, 0x34, 0x51, 0xdf, 0x5c, 0x18, 0xfa, 0xd0, 0x14, 0xe8, 0x6f, 0xf1, /* Byte value: 0x18 */ + 0x1a, 0x7d, 0x9f, 0xe4, 0xce, 0xe4, 0xd6, 0x25, 0xef, 0x78, 0x94, 0x16, 0x44, 0xce, 0x10, 0xb3, /* Byte value: 0x19 */ + 0x24, 0xdb, 0xf7, 0xab, 0x3d, 0xab, 0x64, 0xf9, 0x3e, 0xfe, 0x62, 0xe9, 0x81, 0x3d, 0x6e, 0xe6, /* Byte value: 0x1a */ + 0x1f, 0x53, 0x34, 0xc6, 0x98, 0xc6, 0x59, 0x6e, 0x89, 0x43, 0x7b, 0x9e, 0x83, 0x98, 0x3f, 0xcb, /* Byte value: 0x1b */ + 0xd2, 0xc3, 0xe2, 0x38, 0x22, 0x38, 0x46, 0xc5, 0x48, 0x37, 0x92, 0xe0, 0xcd, 0x22, 0xf9, 0xe1, /* Byte value: 0x1c */ + 0x18, 0xd0, 0x0f, 0xf0, 0x53, 0xf0, 0xef, 0x0b, 0xd3, 0x09, 0x2c, 0x46, 0xec, 0x53, 0x69, 0x83, /* Byte value: 0x1d */ + 0x37, 0xe0, 0x25, 0x15, 0x6d, 0x15, 0xab, 0x73, 0x3f, 0x58, 0x0f, 0x54, 0x74, 0x6d, 0x84, 0x8d, /* Byte value: 0x1e */ + 0x6a, 0x9a, 0xa9, 0x02, 0x23, 0x02, 0xe7, 0xba, 0x06, 0x52, 0xad, 0x08, 0x7b, 0x23, 0x39, 0xb9, /* Byte value: 0x1f */ + 0x3f, 0x11, 0x20, 0x45, 0x5c, 0x45, 0x4f, 0xcb, 0xcf, 0x5f, 0xaa, 0xd7, 0x91, 0x5c, 0xa3, 0x4d, /* Byte value: 0x20 */ + 0xae, 0x4c, 0x32, 0xa6, 0x07, 0xa6, 0xe1, 0xbe, 0x29, 0xf8, 0xbd, 0xdd, 0x84, 0x07, 0x05, 0x4b, /* Byte value: 0x21 */ + 0x10, 0x21, 0x0a, 0xa0, 0x62, 0xa0, 0x0b, 0xb3, 0x23, 0x0e, 0x89, 0xc5, 0x09, 0x62, 0x4e, 0x43, /* Byte value: 0x22 */ + 0x46, 0xb0, 0x5b, 0xf9, 0x2f, 0xf9, 0x67, 0xfb, 0xc8, 0xab, 0x6a, 0x62, 0x1f, 0x2f, 0x70, 0x9f, /* Byte value: 0x23 */ + 0x6c, 0xae, 0xda, 0x3e, 0x47, 0x3e, 0xac, 0xc8, 0x42, 0xc1, 0xa6, 0xf8, 0x40, 0x47, 0xb2, 0xe9, /* Byte value: 0x24 */ + 0xbc, 0xc0, 0xa8, 0x12, 0xf8, 0x12, 0xd3, 0x23, 0x36, 0x87, 0x8c, 0x48, 0x25, 0xf8, 0x32, 0x38, /* Byte value: 0x25 */ + 0x68, 0x37, 0x39, 0x16, 0xbe, 0x16, 0xde, 0x94, 0x3a, 0x23, 0x15, 0x58, 0xd3, 0xbe, 0x40, 0x89, /* Byte value: 0x26 */ + 0x0b, 0xeb, 0xdd, 0x4e, 0x03, 0x4e, 0x20, 0x81, 0xd2, 0xaf, 0x41, 0xfb, 0x19, 0x03, 0x83, 0xe8, /* Byte value: 0x27 */ + 0x3e, 0xa6, 0x68, 0x4f, 0xf3, 0x4f, 0xb2, 0xdc, 0xd1, 0x86, 0xf6, 0xff, 0xc5, 0xf3, 0x7e, 0x55, /* Byte value: 0x28 */ + 0xfe, 0xe9, 0x10, 0xc3, 0x2e, 0xc3, 0xc6, 0x84, 0x86, 0xce, 0x55, 0x8a, 0xa9, 0x2e, 0xb0, 0xc7, /* Byte value: 0x29 */ + 0xa9, 0xcf, 0x09, 0x90, 0xcc, 0x90, 0x57, 0xdb, 0x73, 0xb2, 0xea, 0x05, 0xeb, 0xcc, 0x53, 0x03, /* Byte value: 0x2a */ + 0x28, 0xb3, 0x11, 0xd3, 0xf5, 0xd3, 0xf2, 0x1d, 0xb6, 0x1b, 0x74, 0xca, 0xf7, 0xf5, 0xbb, 0x46, /* Byte value: 0x2b */ + 0x7c, 0x8f, 0xd0, 0x9e, 0x25, 0x9e, 0xa7, 0x7b, 0x61, 0xcf, 0x2f, 0x3d, 0x49, 0x25, 0xfc, 0xaa, /* Byte value: 0x2c */ + 0xf2, 0x81, 0xf6, 0xbb, 0xe6, 0xbb, 0x50, 0x60, 0x0e, 0x2b, 0x43, 0xa9, 0xdf, 0xe6, 0x65, 0x67, /* Byte value: 0x2d */ + 0xbf, 0xda, 0x70, 0x0c, 0xca, 0x0c, 0x17, 0x1a, 0x14, 0x2f, 0x68, 0x30, 0xd9, 0xca, 0x96, 0x10, /* Byte value: 0x2e */ + 0xf4, 0xb5, 0x85, 0x87, 0x82, 0x87, 0x1b, 0x12, 0x4a, 0xb8, 0x48, 0x59, 0xe4, 0x82, 0xee, 0x37, /* Byte value: 0x2f */ + 0xcb, 0xa4, 0xa5, 0xc2, 0xde, 0xc2, 0x54, 0xd9, 0x85, 0xe7, 0xe2, 0x8e, 0x75, 0xde, 0x4d, 0x7a, /* Byte value: 0x30 */ + 0x06, 0x34, 0x73, 0x3c, 0x64, 0x3c, 0x4b, 0x72, 0x44, 0x93, 0x0b, 0xf0, 0x3b, 0x64, 0x8b, 0x50, /* Byte value: 0x31 */ + 0xf8, 0xdd, 0x63, 0xff, 0x4a, 0xff, 0x8d, 0xf6, 0xc2, 0x5d, 0x5e, 0x7a, 0x92, 0x4a, 0x3b, 0x97, /* Byte value: 0x32 */ + 0xbd, 0x77, 0xe0, 0x18, 0x57, 0x18, 0x2e, 0x34, 0x28, 0x5e, 0xd0, 0x60, 0x71, 0x57, 0xef, 0x20, /* Byte value: 0x33 */ + 0x75, 0xc9, 0x9d, 0xc4, 0xbb, 0xc4, 0xbe, 0xd4, 0x8f, 0x11, 0xd6, 0x96, 0xf8, 0xbb, 0x06, 0x72, /* Byte value: 0x34 */ + 0x03, 0x1a, 0xd8, 0x1e, 0x32, 0x1e, 0xc4, 0x39, 0x22, 0xa8, 0xe4, 0x78, 0xfc, 0x32, 0xa4, 0x28, /* Byte value: 0x35 */ + 0x4c, 0xec, 0xce, 0xbd, 0x83, 0xbd, 0xba, 0x6d, 0x04, 0xdd, 0x77, 0xb1, 0x52, 0x83, 0x2e, 0x6f, /* Byte value: 0x36 */ + 0x4b, 0x6f, 0xf5, 0x8b, 0x48, 0x8b, 0x0c, 0x08, 0x5e, 0x97, 0x20, 0x69, 0x3d, 0x48, 0x78, 0x27, /* Byte value: 0x37 */ + 0xc0, 0x4f, 0x78, 0x8c, 0xdd, 0x8c, 0x74, 0x58, 0x57, 0x48, 0xa3, 0x75, 0x6c, 0xdd, 0xce, 0x92, /* Byte value: 0x38 */ + 0x04, 0x99, 0xe3, 0x28, 0xf9, 0x28, 0x72, 0x5c, 0x78, 0xe2, 0xb3, 0xa0, 0x93, 0xf9, 0xf2, 0x60, /* Byte value: 0x39 */ + 0xb3, 0xb2, 0x96, 0x74, 0x02, 0x74, 0x81, 0xfe, 0x9c, 0xca, 0x7e, 0x13, 0xaf, 0x02, 0x43, 0xb0, /* Byte value: 0x3a */ + 0xb6, 0x9c, 0x3d, 0x56, 0x54, 0x56, 0x0e, 0xb5, 0xfa, 0xf1, 0x91, 0x9b, 0x68, 0x54, 0x6c, 0xc8, /* Byte value: 0x3b */ + 0x51, 0x12, 0x6a, 0x6f, 0x86, 0x6f, 0xda, 0x2d, 0xb1, 0xef, 0xb4, 0x7f, 0x79, 0x86, 0x68, 0x94, /* Byte value: 0x3c */ + 0xeb, 0xe6, 0xb1, 0x41, 0x1a, 0x41, 0x42, 0x7c, 0xc3, 0xfb, 0x33, 0xc7, 0x67, 0x1a, 0xd1, 0xfc, /* Byte value: 0x3d */ + 0x98, 0x1b, 0x5f, 0xb9, 0xc5, 0xb9, 0xb7, 0xda, 0x08, 0x79, 0xee, 0xa1, 0xa4, 0xc5, 0x5c, 0xde, /* Byte value: 0x3e */ + 0x23, 0x58, 0xcc, 0x9d, 0xf6, 0x9d, 0xd2, 0x9c, 0x64, 0xb4, 0x35, 0x31, 0xee, 0xf6, 0x38, 0xae, /* Byte value: 0x3f */ + 0xab, 0x62, 0x99, 0x84, 0x51, 0x84, 0x6e, 0xf5, 0x4f, 0xc3, 0x52, 0x55, 0x43, 0x51, 0x2a, 0x33, /* Byte value: 0x40 */ + 0xb2, 0x05, 0xde, 0x7e, 0xad, 0x7e, 0x7c, 0xe9, 0x82, 0x13, 0x22, 0x3b, 0xfb, 0xad, 0x9e, 0xa8, /* Byte value: 0x41 */ + 0x99, 0xac, 0x17, 0xb3, 0x6a, 0xb3, 0x4a, 0xcd, 0x16, 0xa0, 0xb2, 0x89, 0xf0, 0x6a, 0x81, 0xc6, /* Byte value: 0x42 */ + 0x89, 0x8d, 0x1d, 0x13, 0x08, 0x13, 0x41, 0x7e, 0x35, 0xae, 0x3b, 0x4c, 0xf9, 0x08, 0xcf, 0x85, /* Byte value: 0x43 */ + 0xdf, 0x1c, 0x4c, 0x4a, 0x45, 0x4a, 0x2d, 0x36, 0xde, 0x0b, 0xd8, 0xeb, 0xef, 0x45, 0xf1, 0x59, /* Byte value: 0x44 */ + 0x0d, 0xdf, 0xae, 0x72, 0x67, 0x72, 0x6b, 0xf3, 0x96, 0x3c, 0x4a, 0x0b, 0x22, 0x67, 0x08, 0xb8, /* Byte value: 0x45 */ + 0x31, 0xd4, 0x56, 0x29, 0x09, 0x29, 0xe0, 0x01, 0x7b, 0xcb, 0x04, 0xa4, 0x4f, 0x09, 0x0f, 0xdd, /* Byte value: 0x46 */ + 0x70, 0xe7, 0x36, 0xe6, 0xed, 0xe6, 0x31, 0x9f, 0xe9, 0x2a, 0x39, 0x1e, 0x3f, 0xed, 0x29, 0x0a, /* Byte value: 0x47 */ + 0x73, 0xfd, 0xee, 0xf8, 0xdf, 0xf8, 0xf5, 0xa6, 0xcb, 0x82, 0xdd, 0x66, 0xc3, 0xdf, 0x8d, 0x22, /* Byte value: 0x48 */ + 0x1d, 0xfe, 0xa4, 0xd2, 0x05, 0xd2, 0x60, 0x40, 0xb5, 0x32, 0xc3, 0xce, 0x2b, 0x05, 0x46, 0xfb, /* Byte value: 0x49 */ + 0x8d, 0x14, 0xfe, 0x3b, 0xf1, 0x3b, 0x33, 0x22, 0x4d, 0x4c, 0x88, 0xec, 0x6a, 0xf1, 0x3d, 0xe5, /* Byte value: 0x4a */ + 0xf1, 0x9b, 0x2e, 0xa5, 0xd4, 0xa5, 0x94, 0x59, 0x2c, 0x83, 0xa7, 0xd1, 0x23, 0xd4, 0xc1, 0x4f, /* Byte value: 0x4b */ + 0x7d, 0x38, 0x98, 0x94, 0x8a, 0x94, 0x5a, 0x6c, 0x7f, 0x16, 0x73, 0x15, 0x1d, 0x8a, 0x21, 0xb2, /* Byte value: 0x4c */ + 0x17, 0xa2, 0x31, 0x96, 0xa9, 0x96, 0xbd, 0xd6, 0x79, 0x44, 0xde, 0x1d, 0x66, 0xa9, 0x18, 0x0b, /* Byte value: 0x4d */ + 0x2c, 0x2a, 0xf2, 0xfb, 0x0c, 0xfb, 0x80, 0x41, 0xce, 0xf9, 0xc7, 0x6a, 0x64, 0x0c, 0x49, 0x26, /* Byte value: 0x4e */ + 0x35, 0x4d, 0xb5, 0x01, 0xf0, 0x01, 0x92, 0x5d, 0x03, 0x29, 0xb7, 0x04, 0xdc, 0xf0, 0xfd, 0xbd, /* Byte value: 0x4f */ + 0x88, 0x3a, 0x55, 0x19, 0xa7, 0x19, 0xbc, 0x69, 0x2b, 0x77, 0x67, 0x64, 0xad, 0xa7, 0x12, 0x9d, /* Byte value: 0x50 */ + 0x67, 0x45, 0x07, 0x70, 0x44, 0x70, 0x8c, 0x49, 0x90, 0x6e, 0xe7, 0x03, 0x59, 0x44, 0x31, 0x01, /* Byte value: 0x51 */ + 0xe1, 0xba, 0x24, 0x05, 0xb6, 0x05, 0x9f, 0xea, 0x0f, 0x8d, 0x2e, 0x14, 0x2a, 0xb6, 0x8f, 0x0c, /* Byte value: 0x52 */ + 0xb5, 0x86, 0xe5, 0x48, 0x66, 0x48, 0xca, 0x8c, 0xd8, 0x59, 0x75, 0xe3, 0x94, 0x66, 0xc8, 0xe0, /* Byte value: 0x53 */ + 0x64, 0x5f, 0xdf, 0x6e, 0x76, 0x6e, 0x48, 0x70, 0xb2, 0xc6, 0x03, 0x7b, 0xa5, 0x76, 0x95, 0x29, /* Byte value: 0x54 */ + 0xb1, 0x1f, 0x06, 0x60, 0x9f, 0x60, 0xb8, 0xd0, 0xa0, 0xbb, 0xc6, 0x43, 0x07, 0x9f, 0x3a, 0x80, /* Byte value: 0x55 */ + 0x08, 0xf1, 0x05, 0x50, 0x31, 0x50, 0xe4, 0xb8, 0xf0, 0x07, 0xa5, 0x83, 0xe5, 0x31, 0x27, 0xc0, /* Byte value: 0x56 */ + 0xe5, 0x23, 0xc7, 0x2d, 0x4f, 0x2d, 0xed, 0xb6, 0x77, 0x6f, 0x9d, 0xb4, 0xb9, 0x4f, 0x7d, 0x6c, /* Byte value: 0x57 */ + 0x1c, 0x49, 0xec, 0xd8, 0xaa, 0xd8, 0x9d, 0x57, 0xab, 0xeb, 0x9f, 0xe6, 0x7f, 0xaa, 0x9b, 0xe3, /* Byte value: 0x58 */ + 0x6b, 0x2d, 0xe1, 0x08, 0x8c, 0x08, 0x1a, 0xad, 0x18, 0x8b, 0xf1, 0x20, 0x2f, 0x8c, 0xe4, 0xa1, /* Byte value: 0x59 */ + 0x5c, 0xcd, 0xc4, 0x1d, 0xe1, 0x1d, 0xb1, 0xde, 0x27, 0xd3, 0xfe, 0x74, 0x5b, 0xe1, 0x60, 0x2c, /* Byte value: 0x5a */ + 0xa3, 0x93, 0x9c, 0xd4, 0x60, 0xd4, 0x8a, 0x4d, 0xbf, 0xc4, 0xf7, 0xd6, 0xa6, 0x60, 0x0d, 0xf3, /* Byte value: 0x5b */ + 0x7a, 0xbb, 0xa3, 0xa2, 0x41, 0xa2, 0xec, 0x09, 0x25, 0x5c, 0x24, 0xcd, 0x72, 0x41, 0x77, 0xfa, /* Byte value: 0x5c */ + 0xe8, 0xfc, 0x69, 0x5f, 0x28, 0x5f, 0x86, 0x45, 0xe1, 0x53, 0xd7, 0xbf, 0x9b, 0x28, 0x75, 0xd4, /* Byte value: 0x5d */ + 0xda, 0x32, 0xe7, 0x68, 0x13, 0x68, 0xa2, 0x7d, 0xb8, 0x30, 0x37, 0x63, 0x28, 0x13, 0xde, 0x21, /* Byte value: 0x5e */ + 0xd7, 0xed, 0x49, 0x1a, 0x74, 0x1a, 0xc9, 0x8e, 0x2e, 0x0c, 0x7d, 0x68, 0x0a, 0x74, 0xd6, 0x99, /* Byte value: 0x5f */ + 0xfa, 0x70, 0xf3, 0xeb, 0xd7, 0xeb, 0xb4, 0xd8, 0xfe, 0x2c, 0xe6, 0x2a, 0x3a, 0xd7, 0x42, 0xa7, /* Byte value: 0x60 */ + 0xa7, 0x0a, 0x7f, 0xfc, 0x99, 0xfc, 0xf8, 0x11, 0xc7, 0x26, 0x44, 0x76, 0x35, 0x99, 0xff, 0x93, /* Byte value: 0x61 */ + 0x7f, 0x95, 0x08, 0x80, 0x17, 0x80, 0x63, 0x42, 0x43, 0x67, 0xcb, 0x45, 0xb5, 0x17, 0x58, 0x82, /* Byte value: 0x62 */ + 0xe4, 0x94, 0x8f, 0x27, 0xe0, 0x27, 0x10, 0xa1, 0x69, 0xb6, 0xc1, 0x9c, 0xed, 0xe0, 0xa0, 0x74, /* Byte value: 0x63 */ + 0x8f, 0xb9, 0x6e, 0x2f, 0x6c, 0x2f, 0x0a, 0x0c, 0x71, 0x3d, 0x30, 0xbc, 0xc2, 0x6c, 0x44, 0xd5, /* Byte value: 0x64 */ + 0xa1, 0x3e, 0x0c, 0xc0, 0xfd, 0xc0, 0xb3, 0x63, 0x83, 0xb5, 0x4f, 0x86, 0x0e, 0xfd, 0x74, 0xc3, /* Byte value: 0x65 */ + 0x52, 0x08, 0xb2, 0x71, 0xb4, 0x71, 0x1e, 0x14, 0x93, 0x47, 0x50, 0x07, 0x85, 0xb4, 0xcc, 0xbc, /* Byte value: 0x66 */ + 0xec, 0x65, 0x8a, 0x77, 0xd1, 0x77, 0xf4, 0x19, 0x99, 0xb1, 0x64, 0x1f, 0x08, 0xd1, 0x87, 0xb4, /* Byte value: 0x67 */ + 0x3b, 0x88, 0xc3, 0x6d, 0xa5, 0x6d, 0x3d, 0x97, 0xb7, 0xbd, 0x19, 0x77, 0x02, 0xa5, 0x51, 0x2d, /* Byte value: 0x68 */ + 0xa2, 0x24, 0xd4, 0xde, 0xcf, 0xde, 0x77, 0x5a, 0xa1, 0x1d, 0xab, 0xfe, 0xf2, 0xcf, 0xd0, 0xeb, /* Byte value: 0x69 */ + 0x5f, 0xd7, 0x1c, 0x03, 0xd3, 0x03, 0x75, 0xe7, 0x05, 0x7b, 0x1a, 0x0c, 0xa7, 0xd3, 0xc4, 0x04, /* Byte value: 0x6a */ + 0x50, 0xa5, 0x22, 0x65, 0x29, 0x65, 0x27, 0x3a, 0xaf, 0x36, 0xe8, 0x57, 0x2d, 0x29, 0xb5, 0x8c, /* Byte value: 0x6b */ + 0x4a, 0xd8, 0xbd, 0x81, 0xe7, 0x81, 0xf1, 0x1f, 0x40, 0x4e, 0x7c, 0x41, 0x69, 0xe7, 0xa5, 0x3f, /* Byte value: 0x6c */ + 0x57, 0x26, 0x19, 0x53, 0xe2, 0x53, 0x91, 0x5f, 0xf5, 0x7c, 0xbf, 0x8f, 0x42, 0xe2, 0xe3, 0xc4, /* Byte value: 0x6d */ + 0x55, 0x8b, 0x89, 0x47, 0x7f, 0x47, 0xa8, 0x71, 0xc9, 0x0d, 0x07, 0xdf, 0xea, 0x7f, 0x9a, 0xf4, /* Byte value: 0x6e */ + 0xdc, 0x06, 0x94, 0x54, 0x77, 0x54, 0xe9, 0x0f, 0xfc, 0xa3, 0x3c, 0x93, 0x13, 0x77, 0x55, 0x71, /* Byte value: 0x6f */ + 0xde, 0xab, 0x04, 0x40, 0xea, 0x40, 0xd0, 0x21, 0xc0, 0xd2, 0x84, 0xc3, 0xbb, 0xea, 0x2c, 0x41, /* Byte value: 0x70 */ + 0x9d, 0x35, 0xf4, 0x9b, 0x93, 0x9b, 0x38, 0x91, 0x6e, 0x42, 0x01, 0x29, 0x63, 0x93, 0x73, 0xa6, /* Byte value: 0x71 */ + 0xe7, 0x8e, 0x57, 0x39, 0xd2, 0x39, 0xd4, 0x98, 0x4b, 0x1e, 0x25, 0xe4, 0x11, 0xd2, 0x04, 0x5c, /* Byte value: 0x72 */ + 0xaf, 0xfb, 0x7a, 0xac, 0xa8, 0xac, 0x1c, 0xa9, 0x37, 0x21, 0xe1, 0xf5, 0xd0, 0xa8, 0xd8, 0x53, /* Byte value: 0x73 */ + 0x97, 0x69, 0x61, 0xdf, 0x3f, 0xdf, 0xe5, 0x07, 0xa2, 0x34, 0x1c, 0xfa, 0x2e, 0x3f, 0x2d, 0x56, /* Byte value: 0x74 */ + 0xaa, 0xd5, 0xd1, 0x8e, 0xfe, 0x8e, 0x93, 0xe2, 0x51, 0x1a, 0x0e, 0x7d, 0x17, 0xfe, 0xf7, 0x2b, /* Byte value: 0x75 */ + 0x26, 0x76, 0x67, 0xbf, 0xa0, 0xbf, 0x5d, 0xd7, 0x02, 0x8f, 0xda, 0xb9, 0x29, 0xa0, 0x17, 0xd6, /* Byte value: 0x76 */ + 0x4d, 0x5b, 0x86, 0xb7, 0x2c, 0xb7, 0x47, 0x7a, 0x1a, 0x04, 0x2b, 0x99, 0x06, 0x2c, 0xf3, 0x77, /* Byte value: 0x77 */ + 0x54, 0x3c, 0xc1, 0x4d, 0xd0, 0x4d, 0x55, 0x66, 0xd7, 0xd4, 0x5b, 0xf7, 0xbe, 0xd0, 0x47, 0xec, /* Byte value: 0x78 */ + 0xf7, 0xaf, 0x5d, 0x99, 0xb0, 0x99, 0xdf, 0x2b, 0x68, 0x10, 0xac, 0x21, 0x18, 0xb0, 0x4a, 0x1f, /* Byte value: 0x79 */ + 0xd9, 0x28, 0x3f, 0x76, 0x21, 0x76, 0x66, 0x44, 0x9a, 0x98, 0xd3, 0x1b, 0xd4, 0x21, 0x7a, 0x09, /* Byte value: 0x7a */ + 0x84, 0x52, 0xb3, 0x61, 0x6f, 0x61, 0x2a, 0x8d, 0xa3, 0x92, 0x71, 0x47, 0xdb, 0x6f, 0xc7, 0x3d, /* Byte value: 0x7b */ + 0x41, 0x33, 0x60, 0xcf, 0xe4, 0xcf, 0xd1, 0x9e, 0x92, 0xe1, 0x3d, 0xba, 0x70, 0xe4, 0x26, 0xd7, /* Byte value: 0x7c */ + 0x82, 0x66, 0xc0, 0x5d, 0x0b, 0x5d, 0x61, 0xff, 0xe7, 0x01, 0x7a, 0xb7, 0xe0, 0x0b, 0x4c, 0x6d, /* Byte value: 0x7d */ + 0xd6, 0x5a, 0x01, 0x10, 0xdb, 0x10, 0x34, 0x99, 0x30, 0xd5, 0x21, 0x40, 0x5e, 0xdb, 0x0b, 0x81, /* Byte value: 0x7e */ + 0xb7, 0x2b, 0x75, 0x5c, 0xfb, 0x5c, 0xf3, 0xa2, 0xe4, 0x28, 0xcd, 0xb3, 0x3c, 0xfb, 0xb1, 0xd0, /* Byte value: 0x7f */ + 0xdb, 0x85, 0xaf, 0x62, 0xbc, 0x62, 0x5f, 0x6a, 0xa6, 0xe9, 0x6b, 0x4b, 0x7c, 0xbc, 0x03, 0x39, /* Byte value: 0x80 */ + 0x2b, 0xa9, 0xc9, 0xcd, 0xc7, 0xcd, 0x36, 0x24, 0x94, 0xb3, 0x90, 0xb2, 0x0b, 0xc7, 0x1f, 0x6e, /* Byte value: 0x81 */ + 0xa6, 0xbd, 0x37, 0xf6, 0x36, 0xf6, 0x05, 0x06, 0xd9, 0xff, 0x18, 0x5e, 0x61, 0x36, 0x22, 0x8b, /* Byte value: 0x82 */ + 0x38, 0x92, 0x1b, 0x73, 0x97, 0x73, 0xf9, 0xae, 0x95, 0x15, 0xfd, 0x0f, 0xfe, 0x97, 0xf5, 0x05, /* Byte value: 0x83 */ + 0xce, 0x8a, 0x0e, 0xe0, 0x88, 0xe0, 0xdb, 0x92, 0xe3, 0xdc, 0x0d, 0x06, 0xb2, 0x88, 0x62, 0x02, /* Byte value: 0x84 */ + 0x95, 0xc4, 0xf1, 0xcb, 0xa2, 0xcb, 0xdc, 0x29, 0x9e, 0x45, 0xa4, 0xaa, 0x86, 0xa2, 0x54, 0x66, /* Byte value: 0x85 */ + 0x71, 0x50, 0x7e, 0xec, 0x42, 0xec, 0xcc, 0x88, 0xf7, 0xf3, 0x65, 0x36, 0x6b, 0x42, 0xf4, 0x12, /* Byte value: 0x86 */ + 0xc3, 0x55, 0xa0, 0x92, 0xef, 0x92, 0xb0, 0x61, 0x75, 0xe0, 0x47, 0x0d, 0x90, 0xef, 0x6a, 0xba, /* Byte value: 0x87 */ + 0x8e, 0x0e, 0x26, 0x25, 0xc3, 0x25, 0xf7, 0x1b, 0x6f, 0xe4, 0x6c, 0x94, 0x96, 0xc3, 0x99, 0xcd, /* Byte value: 0x88 */ + 0x9a, 0xb6, 0xcf, 0xad, 0x58, 0xad, 0x8e, 0xf4, 0x34, 0x08, 0x56, 0xf1, 0x0c, 0x58, 0x25, 0xee, /* Byte value: 0x89 */ + 0xef, 0x7f, 0x52, 0x69, 0xe3, 0x69, 0x30, 0x20, 0xbb, 0x19, 0x80, 0x67, 0xf4, 0xe3, 0x23, 0x9c, /* Byte value: 0x8a */ + 0x25, 0x6c, 0xbf, 0xa1, 0x92, 0xa1, 0x99, 0xee, 0x20, 0x27, 0x3e, 0xc1, 0xd5, 0x92, 0xb3, 0xfe, /* Byte value: 0x8b */ + 0xa4, 0x10, 0xa7, 0xe2, 0xab, 0xe2, 0x3c, 0x28, 0xe5, 0x8e, 0xa0, 0x0e, 0xc9, 0xab, 0x5b, 0xbb, /* Byte value: 0x8c */ + 0xe9, 0x4b, 0x21, 0x55, 0x87, 0x55, 0x7b, 0x52, 0xff, 0x8a, 0x8b, 0x97, 0xcf, 0x87, 0xa8, 0xcc, /* Byte value: 0x8d */ + 0x3c, 0x0b, 0xf8, 0x5b, 0x6e, 0x5b, 0x8b, 0xf2, 0xed, 0xf7, 0x4e, 0xaf, 0x6d, 0x6e, 0x07, 0x65, /* Byte value: 0x8e */ + 0x6f, 0xb4, 0x02, 0x20, 0x75, 0x20, 0x68, 0xf1, 0x60, 0x69, 0x42, 0x80, 0xbc, 0x75, 0x16, 0xc1, /* Byte value: 0x8f */ + 0x02, 0xad, 0x90, 0x14, 0x9d, 0x14, 0x39, 0x2e, 0x3c, 0x71, 0xb8, 0x50, 0xa8, 0x9d, 0x79, 0x30, /* Byte value: 0x90 */ + 0x01, 0xb7, 0x48, 0x0a, 0xaf, 0x0a, 0xfd, 0x17, 0x1e, 0xd9, 0x5c, 0x28, 0x54, 0xaf, 0xdd, 0x18, /* Byte value: 0x91 */ + 0x0a, 0x5c, 0x95, 0x44, 0xac, 0x44, 0xdd, 0x96, 0xcc, 0x76, 0x1d, 0xd3, 0x4d, 0xac, 0x5e, 0xf0, /* Byte value: 0x92 */ + 0x09, 0x46, 0x4d, 0x5a, 0x9e, 0x5a, 0x19, 0xaf, 0xee, 0xde, 0xf9, 0xab, 0xb1, 0x9e, 0xfa, 0xd8, /* Byte value: 0x93 */ + 0x94, 0x73, 0xb9, 0xc1, 0x0d, 0xc1, 0x21, 0x3e, 0x80, 0x9c, 0xf8, 0x82, 0xd2, 0x0d, 0x89, 0x7e, /* Byte value: 0x94 */ + 0xed, 0xd2, 0xc2, 0x7d, 0x7e, 0x7d, 0x09, 0x0e, 0x87, 0x68, 0x38, 0x37, 0x5c, 0x7e, 0x5a, 0xac, /* Byte value: 0x95 */ + 0x59, 0xe3, 0x6f, 0x3f, 0xb7, 0x3f, 0x3e, 0x95, 0x41, 0xe8, 0x11, 0xfc, 0x9c, 0xb7, 0x4f, 0x54, /* Byte value: 0x96 */ + 0x61, 0x71, 0x74, 0x4c, 0x20, 0x4c, 0xc7, 0x3b, 0xd4, 0xfd, 0xec, 0xf3, 0x62, 0x20, 0xba, 0x51, /* Byte value: 0x97 */ + 0x69, 0x80, 0x71, 0x1c, 0x11, 0x1c, 0x23, 0x83, 0x24, 0xfa, 0x49, 0x70, 0x87, 0x11, 0x9d, 0x91, /* Byte value: 0x98 */ + 0x29, 0x04, 0x59, 0xd9, 0x5a, 0xd9, 0x0f, 0x0a, 0xa8, 0xc2, 0x28, 0xe2, 0xa3, 0x5a, 0x66, 0x5e, /* Byte value: 0x99 */ + 0xb0, 0xa8, 0x4e, 0x6a, 0x30, 0x6a, 0x45, 0xc7, 0xbe, 0x62, 0x9a, 0x6b, 0x53, 0x30, 0xe7, 0x98, /* Byte value: 0x9a */ + 0x30, 0x63, 0x1e, 0x23, 0xa6, 0x23, 0x1d, 0x16, 0x65, 0x12, 0x58, 0x8c, 0x1b, 0xa6, 0xd2, 0xc5, /* Byte value: 0x9b */ + 0x60, 0xc6, 0x3c, 0x46, 0x8f, 0x46, 0x3a, 0x2c, 0xca, 0x24, 0xb0, 0xdb, 0x36, 0x8f, 0x67, 0x49, /* Byte value: 0x9c */ + 0x74, 0x7e, 0xd5, 0xce, 0x14, 0xce, 0x43, 0xc3, 0x91, 0xc8, 0x8a, 0xbe, 0xac, 0x14, 0xdb, 0x6a, /* Byte value: 0x9d */ + 0x22, 0xef, 0x84, 0x97, 0x59, 0x97, 0x2f, 0x8b, 0x7a, 0x6d, 0x69, 0x19, 0xba, 0x59, 0xe5, 0xb6, /* Byte value: 0x9e */ + 0x0c, 0x68, 0xe6, 0x78, 0xc8, 0x78, 0x96, 0xe4, 0x88, 0xe5, 0x16, 0x23, 0x76, 0xc8, 0xd5, 0xa0, /* Byte value: 0x9f */ + 0xcd, 0x90, 0xd6, 0xfe, 0xba, 0xfe, 0x1f, 0xab, 0xc1, 0x74, 0xe9, 0x7e, 0x4e, 0xba, 0xc6, 0x2a, /* Byte value: 0xa0 */ + 0x7b, 0x0c, 0xeb, 0xa8, 0xee, 0xa8, 0x11, 0x1e, 0x3b, 0x85, 0x78, 0xe5, 0x26, 0xee, 0xaa, 0xe2, /* Byte value: 0xa1 */ + 0x5b, 0x4e, 0xff, 0x2b, 0x2a, 0x2b, 0x07, 0xbb, 0x7d, 0x99, 0xa9, 0xac, 0x34, 0x2a, 0x36, 0x64, /* Byte value: 0xa2 */ + 0x40, 0x84, 0x28, 0xc5, 0x4b, 0xc5, 0x2c, 0x89, 0x8c, 0x38, 0x61, 0x92, 0x24, 0x4b, 0xfb, 0xcf, /* Byte value: 0xa3 */ + 0xe3, 0x17, 0xb4, 0x11, 0x2b, 0x11, 0xa6, 0xc4, 0x33, 0xfc, 0x96, 0x44, 0x82, 0x2b, 0xf6, 0x3c, /* Byte value: 0xa4 */ + 0x14, 0xb8, 0xe9, 0x88, 0x9b, 0x88, 0x79, 0xef, 0x5b, 0xec, 0x3a, 0x65, 0x9a, 0x9b, 0xbc, 0x23, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0xfd, 0xf3, 0xc8, 0xdd, 0x1c, 0xdd, 0x02, 0xbd, 0xa4, 0x66, 0xb1, 0xf2, 0x55, 0x1c, 0x14, 0xef, /* Byte value: 0xa7 */ + 0x78, 0x16, 0x33, 0xb6, 0xdc, 0xb6, 0xd5, 0x27, 0x19, 0x2d, 0x9c, 0x9d, 0xda, 0xdc, 0x0e, 0xca, /* Byte value: 0xa8 */ + 0xad, 0x56, 0xea, 0xb8, 0x35, 0xb8, 0x25, 0x87, 0x0b, 0x50, 0x59, 0xa5, 0x78, 0x35, 0xa1, 0x63, /* Byte value: 0xa9 */ + 0xd0, 0x6e, 0x72, 0x2c, 0xbf, 0x2c, 0x7f, 0xeb, 0x74, 0x46, 0x2a, 0xb0, 0x65, 0xbf, 0x80, 0xd1, /* Byte value: 0xaa */ + 0x91, 0x5d, 0x12, 0xe3, 0x5b, 0xe3, 0xae, 0x75, 0xe6, 0xa7, 0x17, 0x0a, 0x15, 0x5b, 0xa6, 0x06, /* Byte value: 0xab */ + 0xfc, 0x44, 0x80, 0xd7, 0xb3, 0xd7, 0xff, 0xaa, 0xba, 0xbf, 0xed, 0xda, 0x01, 0xb3, 0xc9, 0xf7, /* Byte value: 0xac */ + 0xf9, 0x6a, 0x2b, 0xf5, 0xe5, 0xf5, 0x70, 0xe1, 0xdc, 0x84, 0x02, 0x52, 0xc6, 0xe5, 0xe6, 0x8f, /* Byte value: 0xad */ + 0xea, 0x51, 0xf9, 0x4b, 0xb5, 0x4b, 0xbf, 0x6b, 0xdd, 0x22, 0x6f, 0xef, 0x33, 0xb5, 0x0c, 0xe4, /* Byte value: 0xae */ + 0x85, 0xe5, 0xfb, 0x6b, 0xc0, 0x6b, 0xd7, 0x9a, 0xbd, 0x4b, 0x2d, 0x6f, 0x8f, 0xc0, 0x1a, 0x25, /* Byte value: 0xaf */ + 0x7e, 0x22, 0x40, 0x8a, 0xb8, 0x8a, 0x9e, 0x55, 0x5d, 0xbe, 0x97, 0x6d, 0xe1, 0xb8, 0x85, 0x9a, /* Byte value: 0xb0 */ + 0x77, 0x64, 0x0d, 0xd0, 0x26, 0xd0, 0x87, 0xfa, 0xb3, 0x60, 0x6e, 0xc6, 0x50, 0x26, 0x7f, 0x42, /* Byte value: 0xb1 */ + 0xc7, 0xcc, 0x43, 0xba, 0x16, 0xba, 0xc2, 0x3d, 0x0d, 0x02, 0xf4, 0xad, 0x03, 0x16, 0x98, 0xda, /* Byte value: 0xb2 */ + 0xc5, 0x61, 0xd3, 0xae, 0x8b, 0xae, 0xfb, 0x13, 0x31, 0x73, 0x4c, 0xfd, 0xab, 0x8b, 0xe1, 0xea, /* Byte value: 0xb3 */ + 0x5d, 0x7a, 0x8c, 0x17, 0x4e, 0x17, 0x4c, 0xc9, 0x39, 0x0a, 0xa2, 0x5c, 0x0f, 0x4e, 0xbd, 0x34, /* Byte value: 0xb4 */ + 0x3a, 0x3f, 0x8b, 0x67, 0x0a, 0x67, 0xc0, 0x80, 0xa9, 0x64, 0x45, 0x5f, 0x56, 0x0a, 0x8c, 0x35, /* Byte value: 0xb5 */ + 0xd5, 0x40, 0xd9, 0x0e, 0xe9, 0x0e, 0xf0, 0xa0, 0x12, 0x7d, 0xc5, 0x38, 0xa2, 0xe9, 0xaf, 0xa9, /* Byte value: 0xb6 */ + 0x66, 0xf2, 0x4f, 0x7a, 0xeb, 0x7a, 0x71, 0x5e, 0x8e, 0xb7, 0xbb, 0x2b, 0x0d, 0xeb, 0xec, 0x19, /* Byte value: 0xb7 */ + 0x8b, 0x20, 0x8d, 0x07, 0x95, 0x07, 0x78, 0x50, 0x09, 0xdf, 0x83, 0x1c, 0x51, 0x95, 0xb6, 0xb5, /* Byte value: 0xb8 */ + 0x49, 0xc2, 0x65, 0x9f, 0xd5, 0x9f, 0x35, 0x26, 0x62, 0xe6, 0x98, 0x39, 0x95, 0xd5, 0x01, 0x17, /* Byte value: 0xb9 */ + 0xc2, 0xe2, 0xe8, 0x98, 0x40, 0x98, 0x4d, 0x76, 0x6b, 0x39, 0x1b, 0x25, 0xc4, 0x40, 0xb7, 0xa2, /* Byte value: 0xba */ + 0xc6, 0x7b, 0x0b, 0xb0, 0xb9, 0xb0, 0x3f, 0x2a, 0x13, 0xdb, 0xa8, 0x85, 0x57, 0xb9, 0x45, 0xc2, /* Byte value: 0xbb */ + 0x56, 0x91, 0x51, 0x59, 0x4d, 0x59, 0x6c, 0x48, 0xeb, 0xa5, 0xe3, 0xa7, 0x16, 0x4d, 0x3e, 0xdc, /* Byte value: 0xbc */ + 0x4e, 0x41, 0x5e, 0xa9, 0x1e, 0xa9, 0x83, 0x43, 0x38, 0xac, 0xcf, 0xe1, 0xfa, 0x1e, 0x57, 0x5f, /* Byte value: 0xbd */ + 0x27, 0xc1, 0x2f, 0xb5, 0x0f, 0xb5, 0xa0, 0xc0, 0x1c, 0x56, 0x86, 0x91, 0x7d, 0x0f, 0xca, 0xce, /* Byte value: 0xbe */ + 0xe6, 0x39, 0x1f, 0x33, 0x7d, 0x33, 0x29, 0x8f, 0x55, 0xc7, 0x79, 0xcc, 0x45, 0x7d, 0xd9, 0x44, /* Byte value: 0xbf */ + 0x93, 0xf0, 0x82, 0xf7, 0xc6, 0xf7, 0x97, 0x5b, 0xda, 0xd6, 0xaf, 0x5a, 0xbd, 0xc6, 0xdf, 0x36, /* Byte value: 0xc0 */ + 0xbb, 0x43, 0x93, 0x24, 0x33, 0x24, 0x65, 0x46, 0x6c, 0xcd, 0xdb, 0x90, 0x4a, 0x33, 0x64, 0x70, /* Byte value: 0xc1 */ + 0xd1, 0xd9, 0x3a, 0x26, 0x10, 0x26, 0x82, 0xfc, 0x6a, 0x9f, 0x76, 0x98, 0x31, 0x10, 0x5d, 0xc9, /* Byte value: 0xc2 */ + 0x63, 0xdc, 0xe4, 0x58, 0xbd, 0x58, 0xfe, 0x15, 0xe8, 0x8c, 0x54, 0xa3, 0xca, 0xbd, 0xc3, 0x61, /* Byte value: 0xc3 */ + 0xc1, 0xf8, 0x30, 0x86, 0x72, 0x86, 0x89, 0x4f, 0x49, 0x91, 0xff, 0x5d, 0x38, 0x72, 0x13, 0x8a, /* Byte value: 0xc4 */ + 0x45, 0xaa, 0x83, 0xe7, 0x1d, 0xe7, 0xa3, 0xc2, 0xea, 0x03, 0x8e, 0x1a, 0xe3, 0x1d, 0xd4, 0xb7, /* Byte value: 0xc5 */ + 0xc8, 0xbe, 0x7d, 0xdc, 0xec, 0xdc, 0x90, 0xe0, 0xa7, 0x4f, 0x06, 0xf6, 0x89, 0xec, 0xe9, 0x52, /* Byte value: 0xc6 */ + 0x16, 0x15, 0x79, 0x9c, 0x06, 0x9c, 0x40, 0xc1, 0x67, 0x9d, 0x82, 0x35, 0x32, 0x06, 0xc5, 0x13, /* Byte value: 0xc7 */ + 0x1b, 0xca, 0xd7, 0xee, 0x61, 0xee, 0x2b, 0x32, 0xf1, 0xa1, 0xc8, 0x3e, 0x10, 0x61, 0xcd, 0xab, /* Byte value: 0xc8 */ + 0x20, 0x42, 0x14, 0x83, 0xc4, 0x83, 0x16, 0xa5, 0x46, 0x1c, 0xd1, 0x49, 0x12, 0xc4, 0x9c, 0x86, /* Byte value: 0xc9 */ + 0x9b, 0x01, 0x87, 0xa7, 0xf7, 0xa7, 0x73, 0xe3, 0x2a, 0xd1, 0x0a, 0xd9, 0x58, 0xf7, 0xf8, 0xf6, /* Byte value: 0xca */ + 0xf3, 0x36, 0xbe, 0xb1, 0x49, 0xb1, 0xad, 0x77, 0x10, 0xf2, 0x1f, 0x81, 0x8b, 0x49, 0xb8, 0x7f, /* Byte value: 0xcb */ + 0xb8, 0x59, 0x4b, 0x3a, 0x01, 0x3a, 0xa1, 0x7f, 0x4e, 0x65, 0x3f, 0xe8, 0xb6, 0x01, 0xc0, 0x58, /* Byte value: 0xcc */ + 0xf0, 0x2c, 0x66, 0xaf, 0x7b, 0xaf, 0x69, 0x4e, 0x32, 0x5a, 0xfb, 0xf9, 0x77, 0x7b, 0x1c, 0x57, /* Byte value: 0xcd */ + 0x2f, 0x30, 0x2a, 0xe5, 0x3e, 0xe5, 0x44, 0x78, 0xec, 0x51, 0x23, 0x12, 0x98, 0x3e, 0xed, 0x0e, /* Byte value: 0xce */ + 0xba, 0xf4, 0xdb, 0x2e, 0x9c, 0x2e, 0x98, 0x51, 0x72, 0x14, 0x87, 0xb8, 0x1e, 0x9c, 0xb9, 0x68, /* Byte value: 0xcf */ + 0x4f, 0xf6, 0x16, 0xa3, 0xb1, 0xa3, 0x7e, 0x54, 0x26, 0x75, 0x93, 0xc9, 0xae, 0xb1, 0x8a, 0x47, /* Byte value: 0xd0 */ + 0xbe, 0x6d, 0x38, 0x06, 0x65, 0x06, 0xea, 0x0d, 0x0a, 0xf6, 0x34, 0x18, 0x8d, 0x65, 0x4b, 0x08, /* Byte value: 0xd1 */ + 0x12, 0x8c, 0x9a, 0xb4, 0xff, 0xb4, 0x32, 0x9d, 0x1f, 0x7f, 0x31, 0x95, 0xa1, 0xff, 0x37, 0x73, /* Byte value: 0xd2 */ + 0x43, 0x9e, 0xf0, 0xdb, 0x79, 0xdb, 0xe8, 0xb0, 0xae, 0x90, 0x85, 0xea, 0xd8, 0x79, 0x5f, 0xe7, /* Byte value: 0xd3 */ + 0xcf, 0x3d, 0x46, 0xea, 0x27, 0xea, 0x26, 0x85, 0xfd, 0x05, 0x51, 0x2e, 0xe6, 0x27, 0xbf, 0x1a, /* Byte value: 0xd4 */ + 0xc9, 0x09, 0x35, 0xd6, 0x43, 0xd6, 0x6d, 0xf7, 0xb9, 0x96, 0x5a, 0xde, 0xdd, 0x43, 0x34, 0x4a, /* Byte value: 0xd5 */ + 0x2a, 0x1e, 0x81, 0xc7, 0x68, 0xc7, 0xcb, 0x33, 0x8a, 0x6a, 0xcc, 0x9a, 0x5f, 0x68, 0xc2, 0x76, /* Byte value: 0xd6 */ + 0x11, 0x96, 0x42, 0xaa, 0xcd, 0xaa, 0xf6, 0xa4, 0x3d, 0xd7, 0xd5, 0xed, 0x5d, 0xcd, 0x93, 0x5b, /* Byte value: 0xd7 */ + 0x15, 0x0f, 0xa1, 0x82, 0x34, 0x82, 0x84, 0xf8, 0x45, 0x35, 0x66, 0x4d, 0xce, 0x34, 0x61, 0x3b, /* Byte value: 0xd8 */ + 0xf6, 0x18, 0x15, 0x93, 0x1f, 0x93, 0x22, 0x3c, 0x76, 0xc9, 0xf0, 0x09, 0x4c, 0x1f, 0x97, 0x07, /* Byte value: 0xd9 */ + 0x62, 0x6b, 0xac, 0x52, 0x12, 0x52, 0x03, 0x02, 0xf6, 0x55, 0x08, 0x8b, 0x9e, 0x12, 0x1e, 0x79, /* Byte value: 0xda */ + 0xcc, 0x27, 0x9e, 0xf4, 0x15, 0xf4, 0xe2, 0xbc, 0xdf, 0xad, 0xb5, 0x56, 0x1a, 0x15, 0x1b, 0x32, /* Byte value: 0xdb */ + 0xe0, 0x0d, 0x6c, 0x0f, 0x19, 0x0f, 0x62, 0xfd, 0x11, 0x54, 0x72, 0x3c, 0x7e, 0x19, 0x52, 0x14, /* Byte value: 0xdc */ + 0x8c, 0xa3, 0xb6, 0x31, 0x5e, 0x31, 0xce, 0x35, 0x53, 0x95, 0xd4, 0xc4, 0x3e, 0x5e, 0xe0, 0xfd, /* Byte value: 0xdd */ + 0x90, 0xea, 0x5a, 0xe9, 0xf4, 0xe9, 0x53, 0x62, 0xf8, 0x7e, 0x4b, 0x22, 0x41, 0xf4, 0x7b, 0x1e, /* Byte value: 0xde */ + 0x47, 0x07, 0x13, 0xf3, 0x80, 0xf3, 0x9a, 0xec, 0xd6, 0x72, 0x36, 0x4a, 0x4b, 0x80, 0xad, 0x87, /* Byte value: 0xdf */ + 0xff, 0x5e, 0x58, 0xc9, 0x81, 0xc9, 0x3b, 0x93, 0x98, 0x17, 0x09, 0xa2, 0xfd, 0x81, 0x6d, 0xdf, /* Byte value: 0xe0 */ + 0x81, 0x7c, 0x18, 0x43, 0x39, 0x43, 0xa5, 0xc6, 0xc5, 0xa9, 0x9e, 0xcf, 0x1c, 0x39, 0xe8, 0x45, /* Byte value: 0xe1 */ + 0x5e, 0x60, 0x54, 0x09, 0x7c, 0x09, 0x88, 0xf0, 0x1b, 0xa2, 0x46, 0x24, 0xf3, 0x7c, 0x19, 0x1c, /* Byte value: 0xe2 */ + 0xfb, 0xc7, 0xbb, 0xe1, 0x78, 0xe1, 0x49, 0xcf, 0xe0, 0xf5, 0xba, 0x02, 0x6e, 0x78, 0x9f, 0xbf, /* Byte value: 0xe3 */ + 0x79, 0xa1, 0x7b, 0xbc, 0x73, 0xbc, 0x28, 0x30, 0x07, 0xf4, 0xc0, 0xb5, 0x8e, 0x73, 0xd3, 0xd2, /* Byte value: 0xe4 */ + 0x36, 0x57, 0x6d, 0x1f, 0xc2, 0x1f, 0x56, 0x64, 0x21, 0x81, 0x53, 0x7c, 0x20, 0xc2, 0x59, 0x95, /* Byte value: 0xe5 */ + 0x32, 0xce, 0x8e, 0x37, 0x3b, 0x37, 0x24, 0x38, 0x59, 0x63, 0xe0, 0xdc, 0xb3, 0x3b, 0xab, 0xf5, /* Byte value: 0xe6 */ + 0x0e, 0xc5, 0x76, 0x6c, 0x55, 0x6c, 0xaf, 0xca, 0xb4, 0x94, 0xae, 0x73, 0xde, 0x55, 0xac, 0x90, /* Byte value: 0xe7 */ + 0xd3, 0x74, 0xaa, 0x32, 0x8d, 0x32, 0xbb, 0xd2, 0x56, 0xee, 0xce, 0xc8, 0x99, 0x8d, 0x24, 0xf9, /* Byte value: 0xe8 */ + 0x33, 0x79, 0xc6, 0x3d, 0x94, 0x3d, 0xd9, 0x2f, 0x47, 0xba, 0xbc, 0xf4, 0xe7, 0x94, 0x76, 0xed, /* Byte value: 0xe9 */ + 0x53, 0xbf, 0xfa, 0x7b, 0x1b, 0x7b, 0xe3, 0x03, 0x8d, 0x9e, 0x0c, 0x2f, 0xd1, 0x1b, 0x11, 0xa4, /* Byte value: 0xea */ + 0x87, 0x48, 0x6b, 0x7f, 0x5d, 0x7f, 0xee, 0xb4, 0x81, 0x3a, 0x95, 0x3f, 0x27, 0x5d, 0x63, 0x15, /* Byte value: 0xeb */ + 0x21, 0xf5, 0x5c, 0x89, 0x6b, 0x89, 0xeb, 0xb2, 0x58, 0xc5, 0x8d, 0x61, 0x46, 0x6b, 0x41, 0x9e, /* Byte value: 0xec */ + 0xd4, 0xf7, 0x91, 0x04, 0x46, 0x04, 0x0d, 0xb7, 0x0c, 0xa4, 0x99, 0x10, 0xf6, 0x46, 0x72, 0xb1, /* Byte value: 0xed */ + 0x07, 0x83, 0x3b, 0x36, 0xcb, 0x36, 0xb6, 0x65, 0x5a, 0x4a, 0x57, 0xd8, 0x6f, 0xcb, 0x56, 0x48, /* Byte value: 0xee */ + 0x48, 0x75, 0x2d, 0x95, 0x7a, 0x95, 0xc8, 0x31, 0x7c, 0x3f, 0xc4, 0x11, 0xc1, 0x7a, 0xdc, 0x0f, /* Byte value: 0xef */ + 0xdd, 0xb1, 0xdc, 0x5e, 0xd8, 0x5e, 0x14, 0x18, 0xe2, 0x7a, 0x60, 0xbb, 0x47, 0xd8, 0x88, 0x69, /* Byte value: 0xf0 */ + 0x6e, 0x03, 0x4a, 0x2a, 0xda, 0x2a, 0x95, 0xe6, 0x7e, 0xb0, 0x1e, 0xa8, 0xe8, 0xda, 0xcb, 0xd9, /* Byte value: 0xf1 */ + 0xc4, 0xd6, 0x9b, 0xa4, 0x24, 0xa4, 0x06, 0x04, 0x2f, 0xaa, 0x10, 0xd5, 0xff, 0x24, 0x3c, 0xf2, /* Byte value: 0xf2 */ + 0x58, 0x54, 0x27, 0x35, 0x18, 0x35, 0xc3, 0x82, 0x5f, 0x31, 0x4d, 0xd4, 0xc8, 0x18, 0x92, 0x4c, /* Byte value: 0xf3 */ + 0x9c, 0x82, 0xbc, 0x91, 0x3c, 0x91, 0xc5, 0x86, 0x70, 0x9b, 0x5d, 0x01, 0x37, 0x3c, 0xae, 0xbe, /* Byte value: 0xf4 */ + 0x05, 0x2e, 0xab, 0x22, 0x56, 0x22, 0x8f, 0x4b, 0x66, 0x3b, 0xef, 0x88, 0xc7, 0x56, 0x2f, 0x78, /* Byte value: 0xf5 */ + 0x19, 0x67, 0x47, 0xfa, 0xfc, 0xfa, 0x12, 0x1c, 0xcd, 0xd0, 0x70, 0x6e, 0xb8, 0xfc, 0xb4, 0x9b, /* Byte value: 0xf6 */ + 0xd8, 0x9f, 0x77, 0x7c, 0x8e, 0x7c, 0x9b, 0x53, 0x84, 0x41, 0x8f, 0x33, 0x80, 0x8e, 0xa7, 0x11, /* Byte value: 0xf7 */ + 0x80, 0xcb, 0x50, 0x49, 0x96, 0x49, 0x58, 0xd1, 0xdb, 0x70, 0xc2, 0xe7, 0x48, 0x96, 0x35, 0x5d, /* Byte value: 0xf8 */ + 0x9e, 0x2f, 0x2c, 0x85, 0xa1, 0x85, 0xfc, 0xa8, 0x4c, 0xea, 0xe5, 0x51, 0x9f, 0xa1, 0xd7, 0x8e, /* Byte value: 0xf9 */ + 0x44, 0x1d, 0xcb, 0xed, 0xb2, 0xed, 0x5e, 0xd5, 0xf4, 0xda, 0xd2, 0x32, 0xb7, 0xb2, 0x09, 0xaf, /* Byte value: 0xfa */ + 0xca, 0x13, 0xed, 0xc8, 0x71, 0xc8, 0xa9, 0xce, 0x9b, 0x3e, 0xbe, 0xa6, 0x21, 0x71, 0x90, 0x62, /* Byte value: 0xfb */ + 0x3d, 0xbc, 0xb0, 0x51, 0xc1, 0x51, 0x76, 0xe5, 0xf3, 0x2e, 0x12, 0x87, 0x39, 0xc1, 0xda, 0x7d, /* Byte value: 0xfc */ + 0x2e, 0x87, 0x62, 0xef, 0x91, 0xef, 0xb9, 0x6f, 0xf2, 0x88, 0x7f, 0x3a, 0xcc, 0x91, 0x30, 0x16, /* Byte value: 0xfd */ + 0x72, 0x4a, 0xa6, 0xf2, 0x70, 0xf2, 0x08, 0xb1, 0xd5, 0x5b, 0x81, 0x4e, 0x97, 0x70, 0x50, 0x3a, /* Byte value: 0xfe */ + 0x42, 0x29, 0xb8, 0xd1, 0xd6, 0xd1, 0x15, 0xa7, 0xb0, 0x49, 0xd9, 0xc2, 0x8c, 0xd6, 0x82, 0xff, /* Byte value: 0xff */ + 0x65, 0xe8, 0x97, 0x64, 0xd9, 0x64, 0xb5, 0x67, 0xac, 0x1f, 0x5f, 0x53, 0xf1, 0xd9, 0x48, 0x31, /* Byte value: 0x00 */ + + /* Matrix row: 4 */ + 0x04, 0xc3, 0xb6, 0x81, 0x36, 0x3e, 0x4d, 0xde, 0x9f, 0xbe, 0xcc, 0x92, 0x5e, 0x72, 0x11, 0x8f, /* Byte value: 0x01 */ + 0xc5, 0x34, 0x29, 0xba, 0x33, 0x7a, 0x21, 0x8a, 0x27, 0x60, 0x9b, 0x0b, 0x90, 0xfb, 0x32, 0xb5, /* Byte value: 0x02 */ + 0xdf, 0x7b, 0x40, 0x9b, 0x9c, 0xe1, 0x8b, 0x64, 0x4d, 0x3d, 0x10, 0xa8, 0xb8, 0x2d, 0xbd, 0xb7, /* Byte value: 0x03 */ + 0xb7, 0x84, 0x27, 0x1f, 0x65, 0xc8, 0x66, 0x5a, 0x26, 0x8a, 0x79, 0x61, 0x18, 0xf3, 0xc4, 0xbf, /* Byte value: 0x04 */ + 0x1e, 0x8c, 0xdf, 0xa0, 0x99, 0xa5, 0xe7, 0x30, 0xf5, 0xe3, 0x47, 0x31, 0x76, 0xa4, 0x9e, 0x8d, /* Byte value: 0x05 */ + 0x26, 0x94, 0x14, 0xa2, 0x5e, 0x12, 0xa7, 0x8e, 0x43, 0x58, 0x05, 0xc1, 0xc4, 0x5d, 0x70, 0xdb, /* Byte value: 0x06 */ + 0xff, 0xac, 0xb9, 0x19, 0xef, 0xd2, 0xa6, 0x5b, 0x3f, 0x84, 0xbf, 0xb2, 0x0d, 0x3b, 0x35, 0x45, /* Byte value: 0x07 */ + 0xc8, 0xf2, 0xfc, 0x4b, 0x85, 0xd6, 0x74, 0xfd, 0x12, 0xaf, 0x3f, 0xbb, 0x84, 0x90, 0x94, 0xb4, /* Byte value: 0x08 */ + 0x7b, 0xb5, 0x6d, 0xd5, 0xd6, 0x20, 0x5f, 0x79, 0xab, 0x9b, 0x8a, 0x48, 0xc2, 0x11, 0x41, 0x84, /* Byte value: 0x09 */ + 0x7a, 0xf5, 0xa1, 0x64, 0x3a, 0xce, 0xdd, 0xaf, 0xfc, 0x55, 0xb9, 0x8d, 0x34, 0xec, 0xd4, 0xd7, /* Byte value: 0x0a */ + 0xe8, 0x25, 0x05, 0xc9, 0xf6, 0xe5, 0x59, 0xc2, 0x60, 0x16, 0x90, 0xa1, 0x31, 0x86, 0x1c, 0x46, /* Byte value: 0x0b */ + 0xa0, 0x0d, 0x9b, 0xcf, 0x7c, 0xff, 0x99, 0xc3, 0x79, 0x18, 0x56, 0x72, 0x24, 0x4e, 0xed, 0xbc, /* Byte value: 0x0c */ + 0x3e, 0x5b, 0x26, 0x22, 0xea, 0x96, 0xca, 0x0f, 0x87, 0x5a, 0xe8, 0x2b, 0xc3, 0xb2, 0x16, 0x7f, /* Byte value: 0x0d */ + 0xe9, 0x65, 0xc9, 0x78, 0x1a, 0x0b, 0xdb, 0x14, 0x37, 0xd8, 0xa3, 0x64, 0xc7, 0x7b, 0x89, 0x15, /* Byte value: 0x0e */ + 0x09, 0x05, 0x63, 0x70, 0x80, 0x92, 0x18, 0xa9, 0xaa, 0x71, 0x68, 0x22, 0x4a, 0x19, 0xb7, 0x8e, /* Byte value: 0x0f */ + 0x18, 0xcf, 0x32, 0x80, 0xb4, 0x84, 0x6d, 0x81, 0xc4, 0x02, 0xed, 0xea, 0x07, 0xef, 0x66, 0xa4, /* Byte value: 0x10 */ + 0xba, 0x42, 0xf2, 0xee, 0xd3, 0x64, 0x33, 0x2d, 0x13, 0x45, 0xdd, 0xd1, 0x0c, 0x98, 0x62, 0xbe, /* Byte value: 0x11 */ + 0x83, 0x1a, 0xf5, 0x5d, 0xf8, 0x3d, 0xf1, 0x45, 0xf2, 0x30, 0xac, 0xe4, 0x48, 0x9c, 0x19, 0xbb, /* Byte value: 0x12 */ + 0x1f, 0xcc, 0x13, 0x11, 0x75, 0x4b, 0x65, 0xe6, 0xa2, 0x2d, 0x74, 0xf4, 0x80, 0x59, 0x0b, 0xde, /* Byte value: 0x13 */ + 0x33, 0x9d, 0xf3, 0xd3, 0x5c, 0x3a, 0x9f, 0x78, 0xb2, 0x95, 0x4c, 0x9b, 0xd7, 0xd9, 0xb0, 0x7e, /* Byte value: 0x14 */ + 0xb1, 0xc7, 0xca, 0x3f, 0x48, 0xe9, 0xec, 0xeb, 0x17, 0x6b, 0xd3, 0xba, 0x69, 0xb8, 0x3c, 0x96, /* Byte value: 0x15 */ + 0xb6, 0xc4, 0xeb, 0xae, 0x89, 0x26, 0xe4, 0x8c, 0x71, 0x44, 0x4a, 0xa4, 0xee, 0x0e, 0x51, 0xec, /* Byte value: 0x16 */ + 0x46, 0x2e, 0xdc, 0xe7, 0xcb, 0x47, 0xd0, 0xcf, 0xd5, 0x50, 0x37, 0xef, 0xd8, 0x67, 0x2b, 0x0e, /* Byte value: 0x17 */ + 0x78, 0x75, 0xfa, 0xc5, 0x21, 0xd1, 0x1a, 0xc0, 0x52, 0x0a, 0xdf, 0xc4, 0x1b, 0xd5, 0x3d, 0x71, /* Byte value: 0x18 */ + 0x5b, 0x62, 0x94, 0x57, 0xa5, 0x13, 0x72, 0x46, 0xd9, 0x22, 0x25, 0x52, 0x77, 0x07, 0xc9, 0x76, /* Byte value: 0x19 */ + 0x80, 0xda, 0x62, 0x4d, 0x0f, 0xcc, 0xb4, 0xfc, 0x0b, 0xa1, 0xf9, 0x68, 0x91, 0x58, 0x65, 0x4e, /* Byte value: 0x1a */ + 0x8c, 0x5c, 0x7b, 0x0d, 0x55, 0x8e, 0x63, 0x5d, 0x69, 0xa0, 0x6e, 0x1d, 0x73, 0xce, 0x56, 0x1c, /* Byte value: 0x1b */ + 0xeb, 0xe5, 0x92, 0xd9, 0x01, 0x14, 0x1c, 0x7b, 0x99, 0x87, 0xc5, 0x2d, 0xe8, 0x42, 0x60, 0xb3, /* Byte value: 0x1c */ + 0x2d, 0x11, 0x2c, 0x73, 0xc5, 0x9f, 0x78, 0x48, 0x47, 0x76, 0x0b, 0xaa, 0xa1, 0x7d, 0x2e, 0xf3, /* Byte value: 0x1d */ + 0xfb, 0x6f, 0x0f, 0x98, 0xd9, 0xec, 0xeb, 0x85, 0xa0, 0x3a, 0x73, 0x20, 0x53, 0x49, 0x24, 0xca, /* Byte value: 0x1e */ + 0xd9, 0x38, 0xad, 0xbb, 0xb1, 0xc0, 0x01, 0xd5, 0x7c, 0xdc, 0xba, 0x73, 0xc9, 0x66, 0x45, 0x9e, /* Byte value: 0x1f */ + 0xe0, 0x60, 0xaa, 0x08, 0x9a, 0x99, 0xc3, 0xbd, 0x9d, 0xa9, 0xcb, 0x46, 0x8d, 0x62, 0x3e, 0x9b, /* Byte value: 0x20 */ + 0x9e, 0x56, 0xbd, 0xed, 0x96, 0x69, 0x53, 0xcc, 0xfe, 0x42, 0xbe, 0x59, 0xe7, 0xfc, 0xfb, 0xc3, /* Byte value: 0x21 */ + 0x36, 0x1e, 0x89, 0xe3, 0x86, 0xea, 0x50, 0x70, 0x7a, 0xe5, 0xb3, 0xcc, 0x7f, 0x56, 0x34, 0xa2, /* Byte value: 0x22 */ + 0x42, 0xed, 0x6a, 0x66, 0xfd, 0x79, 0x9d, 0x11, 0x4a, 0xee, 0xfb, 0x7d, 0x86, 0x15, 0x3a, 0x81, /* Byte value: 0x23 */ + 0x43, 0xad, 0xa6, 0xd7, 0x11, 0x97, 0x1f, 0xc7, 0x1d, 0x20, 0xc8, 0xb8, 0x70, 0xe8, 0xaf, 0xd2, /* Byte value: 0x24 */ + 0xde, 0x3b, 0x8c, 0x2a, 0x70, 0x0f, 0x09, 0xb2, 0x1a, 0xf3, 0x23, 0x6d, 0x4e, 0xd0, 0x28, 0xe4, /* Byte value: 0x25 */ + 0xaf, 0x4b, 0x15, 0x9f, 0xd1, 0x4c, 0x0b, 0xdb, 0xe2, 0x88, 0x94, 0x8b, 0x1f, 0x1c, 0xa2, 0x1b, /* Byte value: 0x26 */ + 0x56, 0xa4, 0x41, 0xa6, 0x13, 0xbf, 0x27, 0x31, 0xec, 0xed, 0x81, 0xe2, 0x63, 0x6c, 0x6f, 0x77, /* Byte value: 0x27 */ + 0xdb, 0xb8, 0xf6, 0x1a, 0xaa, 0xdf, 0xc6, 0xba, 0xd2, 0x83, 0xdc, 0x3a, 0xe6, 0x5f, 0xac, 0x38, /* Byte value: 0x28 */ + 0x70, 0x30, 0x55, 0x04, 0x4d, 0xad, 0x80, 0xbf, 0xaf, 0xb5, 0x84, 0x23, 0xa7, 0x31, 0x1f, 0xac, /* Byte value: 0x29 */ + 0x3f, 0x1b, 0xea, 0x93, 0x06, 0x78, 0x48, 0xd9, 0xd0, 0x94, 0xdb, 0xee, 0x35, 0x4f, 0x83, 0x2c, /* Byte value: 0x2a */ + 0x77, 0x33, 0x74, 0x95, 0x8c, 0x62, 0x88, 0xd8, 0xc9, 0x9a, 0x1d, 0x3d, 0x20, 0x87, 0x72, 0xd6, /* Byte value: 0x2b */ + 0x75, 0xb3, 0x2f, 0x34, 0x97, 0x7d, 0x4f, 0xb7, 0x67, 0xc5, 0x7b, 0x74, 0x0f, 0xbe, 0x9b, 0x70, /* Byte value: 0x2c */ + 0x87, 0xd9, 0x43, 0xdc, 0xce, 0x03, 0xbc, 0x9b, 0x6d, 0x8e, 0x60, 0x76, 0x16, 0xee, 0x08, 0x34, /* Byte value: 0x2d */ + 0x93, 0x90, 0x68, 0x1c, 0x20, 0xc5, 0x06, 0xbb, 0xcb, 0x8d, 0x1a, 0xe9, 0xf3, 0x97, 0x5d, 0xc2, /* Byte value: 0x2e */ + 0x1d, 0x4c, 0x48, 0xb0, 0x6e, 0x54, 0xa2, 0x89, 0x0c, 0x72, 0x12, 0xbd, 0xaf, 0x60, 0xe2, 0x78, /* Byte value: 0x2f */ + 0xfd, 0x2c, 0xe2, 0xb8, 0xf4, 0xcd, 0x61, 0x34, 0x91, 0xdb, 0xd9, 0xfb, 0x22, 0x02, 0xdc, 0xe3, /* Byte value: 0x30 */ + 0x9a, 0x95, 0x0b, 0x6c, 0xa0, 0x57, 0x1e, 0x12, 0x61, 0xfc, 0x72, 0xcb, 0xb9, 0x8e, 0xea, 0x4c, /* Byte value: 0x31 */ + 0xea, 0xa5, 0x5e, 0x68, 0xed, 0xfa, 0x9e, 0xad, 0xce, 0x49, 0xf6, 0xe8, 0x1e, 0xbf, 0xf5, 0xe0, /* Byte value: 0x32 */ + 0xe5, 0xe3, 0xd0, 0x38, 0x40, 0x49, 0x0c, 0xb5, 0x55, 0xd9, 0x34, 0x11, 0x25, 0xed, 0xba, 0x47, /* Byte value: 0x33 */ + 0x55, 0x64, 0xd6, 0xb6, 0xe4, 0x4e, 0x62, 0x88, 0x15, 0x7c, 0xd4, 0x6e, 0xba, 0xa8, 0x13, 0x82, /* Byte value: 0x34 */ + 0x4d, 0xab, 0xe4, 0x36, 0x50, 0xca, 0x0f, 0x09, 0xd1, 0x7e, 0x39, 0x84, 0xbd, 0x47, 0x75, 0x26, /* Byte value: 0x35 */ + 0x2f, 0x91, 0x77, 0xd2, 0xde, 0x80, 0xbf, 0x27, 0xe9, 0x29, 0x6d, 0xe3, 0x8e, 0x44, 0xc7, 0x55, /* Byte value: 0x36 */ + 0x8e, 0xdc, 0x20, 0xac, 0x4e, 0x91, 0xa4, 0x32, 0xc7, 0xff, 0x08, 0x54, 0x5c, 0xf7, 0xbf, 0xba, /* Byte value: 0x37 */ + 0xab, 0x88, 0xa3, 0x1e, 0xe7, 0x72, 0x46, 0x05, 0x7d, 0x36, 0x58, 0x19, 0x41, 0x6e, 0xb3, 0x94, /* Byte value: 0x38 */ + 0xec, 0xe6, 0xb3, 0x48, 0xc0, 0xdb, 0x14, 0x1c, 0xff, 0xa8, 0x5c, 0x33, 0x6f, 0xf4, 0x0d, 0xc9, /* Byte value: 0x39 */ + 0x64, 0x79, 0x7e, 0xc4, 0xa3, 0x6b, 0x3a, 0x9f, 0x09, 0xb6, 0xfe, 0xbc, 0x42, 0x48, 0x4a, 0x5a, /* Byte value: 0x3a */ + 0xb3, 0x47, 0x91, 0x9e, 0x53, 0xf6, 0x2b, 0x84, 0xb9, 0x34, 0xb5, 0xf3, 0x46, 0x81, 0xd5, 0x30, /* Byte value: 0x3b */ + 0xd5, 0xbe, 0xb4, 0xfb, 0xeb, 0x82, 0xd6, 0x74, 0x1e, 0xdd, 0x2d, 0x06, 0x2b, 0xf0, 0x76, 0xcc, /* Byte value: 0x3c */ + 0x91, 0x10, 0x33, 0xbd, 0x3b, 0xda, 0xc1, 0xd4, 0x65, 0xd2, 0x7c, 0xa0, 0xdc, 0xae, 0xb4, 0x64, /* Byte value: 0x3d */ + 0x5e, 0xe1, 0xee, 0x67, 0x7f, 0xc3, 0xbd, 0x4e, 0x11, 0x52, 0xda, 0x05, 0xdf, 0x88, 0x4d, 0xaa, /* Byte value: 0x3e */ + 0x21, 0x97, 0x35, 0x33, 0x9f, 0xdd, 0xaf, 0xe9, 0x25, 0x77, 0x9c, 0xdf, 0x43, 0xeb, 0x1d, 0xa1, /* Byte value: 0x3f */ + 0x49, 0x68, 0x52, 0xb7, 0x66, 0xf4, 0x42, 0xd7, 0x4e, 0xc0, 0xf5, 0x16, 0xe3, 0x35, 0x64, 0xa9, /* Byte value: 0x40 */ + 0x5f, 0xa1, 0x22, 0xd6, 0x93, 0x2d, 0x3f, 0x98, 0x46, 0x9c, 0xe9, 0xc0, 0x29, 0x75, 0xd8, 0xf9, /* Byte value: 0x41 */ + 0x65, 0x39, 0xb2, 0x75, 0x4f, 0x85, 0xb8, 0x49, 0x5e, 0x78, 0xcd, 0x79, 0xb4, 0xb5, 0xdf, 0x09, /* Byte value: 0x42 */ + 0x53, 0x27, 0x3b, 0x96, 0xc9, 0x6f, 0xe8, 0x39, 0x24, 0x9d, 0x7e, 0xb5, 0xcb, 0xe3, 0xeb, 0xab, /* Byte value: 0x43 */ + 0x27, 0xd4, 0xd8, 0x13, 0xb2, 0xfc, 0x25, 0x58, 0x14, 0x96, 0x36, 0x04, 0x32, 0xa0, 0xe5, 0x88, /* Byte value: 0x44 */ + 0xcc, 0x31, 0x4a, 0xca, 0xb3, 0xe8, 0x39, 0x23, 0x8d, 0x11, 0xf3, 0x29, 0xda, 0xe2, 0x85, 0x3b, /* Byte value: 0x45 */ + 0x61, 0xfa, 0x04, 0xf4, 0x79, 0xbb, 0xf5, 0x97, 0xc1, 0xc6, 0x01, 0xeb, 0xea, 0xc7, 0xce, 0x86, /* Byte value: 0x46 */ + 0x82, 0x5a, 0x39, 0xec, 0x14, 0xd3, 0x73, 0x93, 0xa5, 0xfe, 0x9f, 0x21, 0xbe, 0x61, 0x8c, 0xe8, /* Byte value: 0x47 */ + 0xcf, 0xf1, 0xdd, 0xda, 0x44, 0x19, 0x7c, 0x9a, 0x74, 0x80, 0xa6, 0xa5, 0x03, 0x26, 0xf9, 0xce, /* Byte value: 0x48 */ + 0xfa, 0x2f, 0xc3, 0x29, 0x35, 0x02, 0x69, 0x53, 0xf7, 0xf4, 0x40, 0xe5, 0xa5, 0xb4, 0xb1, 0x99, /* Byte value: 0x49 */ + 0xbf, 0xc1, 0x88, 0xde, 0x09, 0xb4, 0xfc, 0x25, 0xdb, 0x35, 0x22, 0x86, 0xa4, 0x17, 0xe6, 0x62, /* Byte value: 0x4a */ + 0xca, 0x72, 0xa7, 0xea, 0x9e, 0xc9, 0xb3, 0x92, 0xbc, 0xf0, 0x59, 0xf2, 0xab, 0xa9, 0x7d, 0x12, /* Byte value: 0x4b */ + 0x4e, 0x6b, 0x73, 0x26, 0xa7, 0x3b, 0x4a, 0xb0, 0x28, 0xef, 0x6c, 0x08, 0x64, 0x83, 0x09, 0xd3, /* Byte value: 0x4c */ + 0x97, 0x53, 0xde, 0x9d, 0x16, 0xfb, 0x4b, 0x65, 0x54, 0x33, 0xd6, 0x7b, 0xad, 0xe5, 0x4c, 0x4d, /* Byte value: 0x4d */ + 0x9b, 0xd5, 0xc7, 0xdd, 0x4c, 0xb9, 0x9c, 0xc4, 0x36, 0x32, 0x41, 0x0e, 0x4f, 0x73, 0x7f, 0x1f, /* Byte value: 0x4e */ + 0x8d, 0x1c, 0xb7, 0xbc, 0xb9, 0x60, 0xe1, 0x8b, 0x3e, 0x6e, 0x5d, 0xd8, 0x85, 0x33, 0xc3, 0x4f, /* Byte value: 0x4f */ + 0x68, 0xff, 0x67, 0x84, 0xf9, 0x29, 0xed, 0x3e, 0x6b, 0xb7, 0x69, 0xc9, 0xa0, 0xde, 0x79, 0x08, /* Byte value: 0x50 */ + 0x15, 0x09, 0xe7, 0x71, 0x02, 0x28, 0x38, 0xf6, 0xf1, 0xcd, 0x49, 0x5a, 0x13, 0x84, 0xc0, 0xa5, /* Byte value: 0x51 */ + 0xfc, 0x6c, 0x2e, 0x09, 0x18, 0x23, 0xe3, 0xe2, 0xc6, 0x15, 0xea, 0x3e, 0xd4, 0xff, 0x49, 0xb0, /* Byte value: 0x52 */ + 0xfe, 0xec, 0x75, 0xa8, 0x03, 0x3c, 0x24, 0x8d, 0x68, 0x4a, 0x8c, 0x77, 0xfb, 0xc6, 0xa0, 0x16, /* Byte value: 0x53 */ + 0x58, 0xa2, 0x03, 0x47, 0x52, 0xe2, 0x37, 0xff, 0x20, 0xb3, 0x70, 0xde, 0xae, 0xc3, 0xb5, 0x83, /* Byte value: 0x54 */ + 0x12, 0x0a, 0xc6, 0xe0, 0xc3, 0xe7, 0x30, 0x91, 0x97, 0xe2, 0xd0, 0x44, 0x94, 0x32, 0xad, 0xdf, /* Byte value: 0x55 */ + 0x1b, 0x0f, 0xa5, 0x90, 0x43, 0x75, 0x28, 0x38, 0x3d, 0x93, 0xb8, 0x66, 0xde, 0x2b, 0x1a, 0x51, /* Byte value: 0x56 */ + 0x10, 0x8a, 0x9d, 0x41, 0xd8, 0xf8, 0xf7, 0xfe, 0x39, 0xbd, 0xb6, 0x0d, 0xbb, 0x0b, 0x44, 0x79, /* Byte value: 0x57 */ + 0xc1, 0xf7, 0x9f, 0x3b, 0x05, 0x44, 0x6c, 0x54, 0xb8, 0xde, 0x57, 0x99, 0xce, 0x89, 0x23, 0x3a, /* Byte value: 0x58 */ + 0xe2, 0xe0, 0xf1, 0xa9, 0x81, 0x86, 0x04, 0xd2, 0x33, 0xf6, 0xad, 0x0f, 0xa2, 0x5b, 0xd7, 0x3d, /* Byte value: 0x59 */ + 0x19, 0x8f, 0xfe, 0x31, 0x58, 0x6a, 0xef, 0x57, 0x93, 0xcc, 0xde, 0x2f, 0xf1, 0x12, 0xf3, 0xf7, /* Byte value: 0x5a */ + 0x52, 0x67, 0xf7, 0x27, 0x25, 0x81, 0x6a, 0xef, 0x73, 0x53, 0x4d, 0x70, 0x3d, 0x1e, 0x7e, 0xf8, /* Byte value: 0x5b */ + 0xef, 0x26, 0x24, 0x58, 0x37, 0x2a, 0x51, 0xa5, 0x06, 0x39, 0x09, 0xbf, 0xb6, 0x30, 0x71, 0x3c, /* Byte value: 0x5c */ + 0xdc, 0xbb, 0xd7, 0x8b, 0x6b, 0x10, 0xce, 0xdd, 0xb4, 0xac, 0x45, 0x24, 0x61, 0xe9, 0xc1, 0x42, /* Byte value: 0x5d */ + 0xf0, 0xea, 0x37, 0x49, 0x42, 0x61, 0x34, 0x43, 0xa4, 0x14, 0x7d, 0x4b, 0x36, 0x69, 0x7a, 0xe2, /* Byte value: 0x5e */ + 0x3c, 0xdb, 0x7d, 0x83, 0xf1, 0x89, 0x0d, 0x60, 0x29, 0x05, 0x8e, 0x62, 0xec, 0x8b, 0xff, 0xd9, /* Byte value: 0x5f */ + 0x9c, 0xd6, 0xe6, 0x4c, 0x8d, 0x76, 0x94, 0xa3, 0x50, 0x1d, 0xd8, 0x10, 0xc8, 0xc5, 0x12, 0x65, /* Byte value: 0x60 */ + 0xbe, 0x81, 0x44, 0x6f, 0xe5, 0x5a, 0x7e, 0xf3, 0x8c, 0xfb, 0x11, 0x43, 0x52, 0xea, 0x73, 0x31, /* Byte value: 0x61 */ + 0x38, 0x18, 0xcb, 0x02, 0xc7, 0xb7, 0x40, 0xbe, 0xb6, 0xbb, 0x42, 0xf0, 0xb2, 0xf9, 0xee, 0x56, /* Byte value: 0x62 */ + 0x2b, 0x52, 0xc1, 0x53, 0xe8, 0xbe, 0xf2, 0xf9, 0x76, 0x97, 0xa1, 0x71, 0xd0, 0x36, 0xd6, 0xda, /* Byte value: 0x63 */ + 0xc9, 0xb2, 0x30, 0xfa, 0x69, 0x38, 0xf6, 0x2b, 0x45, 0x61, 0x0c, 0x7e, 0x72, 0x6d, 0x01, 0xe7, /* Byte value: 0x64 */ + 0x24, 0x14, 0x4f, 0x03, 0x45, 0x0d, 0x60, 0xe1, 0xed, 0x07, 0x63, 0x88, 0xeb, 0x64, 0x99, 0x7d, /* Byte value: 0x65 */ + 0x98, 0x15, 0x50, 0xcd, 0xbb, 0x48, 0xd9, 0x7d, 0xcf, 0xa3, 0x14, 0x82, 0x96, 0xb7, 0x03, 0xea, /* Byte value: 0x66 */ + 0x30, 0x5d, 0x64, 0xc3, 0xab, 0xcb, 0xda, 0xc1, 0x4b, 0x04, 0x19, 0x17, 0x0e, 0x1d, 0xcc, 0x8b, /* Byte value: 0x67 */ + 0x0c, 0x86, 0x19, 0x40, 0x5a, 0x42, 0xd7, 0xa1, 0x62, 0x01, 0x97, 0x75, 0xe2, 0x96, 0x33, 0x52, /* Byte value: 0x68 */ + 0x69, 0xbf, 0xab, 0x35, 0x15, 0xc7, 0x6f, 0xe8, 0x3c, 0x79, 0x5a, 0x0c, 0x56, 0x23, 0xec, 0x5b, /* Byte value: 0x69 */ + 0x54, 0x24, 0x1a, 0x07, 0x08, 0xa0, 0xe0, 0x5e, 0x42, 0xb2, 0xe7, 0xab, 0x4c, 0x55, 0x86, 0xd1, /* Byte value: 0x6a */ + 0xee, 0x66, 0xe8, 0xe9, 0xdb, 0xc4, 0xd3, 0x73, 0x51, 0xf7, 0x3a, 0x7a, 0x40, 0xcd, 0xe4, 0x6f, /* Byte value: 0x6b */ + 0xb5, 0x04, 0x7c, 0xbe, 0x7e, 0xd7, 0xa1, 0x35, 0x88, 0xd5, 0x1f, 0x28, 0x37, 0xca, 0x2d, 0x19, /* Byte value: 0x6c */ + 0x4f, 0x2b, 0xbf, 0x97, 0x4b, 0xd5, 0xc8, 0x66, 0x7f, 0x21, 0x5f, 0xcd, 0x92, 0x7e, 0x9c, 0x80, /* Byte value: 0x6d */ + 0x39, 0x58, 0x07, 0xb3, 0x2b, 0x59, 0xc2, 0x68, 0xe1, 0x75, 0x71, 0x35, 0x44, 0x04, 0x7b, 0x05, /* Byte value: 0x6e */ + 0x6a, 0x7f, 0x3c, 0x25, 0xe2, 0x36, 0x2a, 0x51, 0xc5, 0xe8, 0x0f, 0x80, 0x8f, 0xe7, 0x90, 0xae, /* Byte value: 0x6f */ + 0x1c, 0x0c, 0x84, 0x01, 0x82, 0xba, 0x20, 0x5f, 0x5b, 0xbc, 0x21, 0x78, 0x59, 0x9d, 0x77, 0x2b, /* Byte value: 0x70 */ + 0x89, 0xdf, 0x01, 0x3d, 0x8f, 0x5e, 0xac, 0x55, 0xa1, 0xd0, 0x91, 0x4a, 0xdb, 0x41, 0xd2, 0xc0, /* Byte value: 0x71 */ + 0x66, 0xf9, 0x25, 0x65, 0xb8, 0x74, 0xfd, 0xf0, 0xa7, 0xe9, 0x98, 0xf5, 0x6d, 0x71, 0xa3, 0xfc, /* Byte value: 0x72 */ + 0xa5, 0x8e, 0xe1, 0xff, 0xa6, 0x2f, 0x56, 0xcb, 0xb1, 0x68, 0xa9, 0x25, 0x8c, 0xc1, 0x69, 0x60, /* Byte value: 0x73 */ + 0xe4, 0xa3, 0x1c, 0x89, 0xac, 0xa7, 0x8e, 0x63, 0x02, 0x17, 0x07, 0xd4, 0xd3, 0x10, 0x2f, 0x14, /* Byte value: 0x74 */ + 0x72, 0xb0, 0x0e, 0xa5, 0x56, 0xb2, 0x47, 0xd0, 0x01, 0xea, 0xe2, 0x6a, 0x88, 0x08, 0xf6, 0x0a, /* Byte value: 0x75 */ + 0xf6, 0xa9, 0xda, 0x69, 0x6f, 0x40, 0xbe, 0xf2, 0x95, 0xf5, 0xd7, 0x90, 0x47, 0x22, 0x82, 0xcb, /* Byte value: 0x76 */ + 0x14, 0x49, 0x2b, 0xc0, 0xee, 0xc6, 0xba, 0x20, 0xa6, 0x03, 0x7a, 0x9f, 0xe5, 0x79, 0x55, 0xf6, /* Byte value: 0x77 */ + 0x02, 0x80, 0x5b, 0xa1, 0x1b, 0x1f, 0xc7, 0x6f, 0xae, 0x5f, 0x66, 0x49, 0x2f, 0x39, 0xe9, 0xa6, /* Byte value: 0x78 */ + 0x50, 0xe7, 0xac, 0x86, 0x3e, 0x9e, 0xad, 0x80, 0xdd, 0x0c, 0x2b, 0x39, 0x12, 0x27, 0x97, 0x5e, /* Byte value: 0x79 */ + 0xbd, 0x41, 0xd3, 0x7f, 0x12, 0xab, 0x3b, 0x4a, 0x75, 0x6a, 0x44, 0xcf, 0x8b, 0x2e, 0x0f, 0xc4, /* Byte value: 0x7a */ + 0x9f, 0x16, 0x71, 0x5c, 0x7a, 0x87, 0xd1, 0x1a, 0xa9, 0x8c, 0x8d, 0x9c, 0x11, 0x01, 0x6e, 0x90, /* Byte value: 0x7b */ + 0xe3, 0xa0, 0x3d, 0x18, 0x6d, 0x68, 0x86, 0x04, 0x64, 0x38, 0x9e, 0xca, 0x54, 0xa6, 0x42, 0x6e, /* Byte value: 0x7c */ + 0x05, 0x83, 0x7a, 0x30, 0xda, 0xd0, 0xcf, 0x08, 0xc8, 0x70, 0xff, 0x57, 0xa8, 0x8f, 0x84, 0xdc, /* Byte value: 0x7d */ + 0x07, 0x03, 0x21, 0x91, 0xc1, 0xcf, 0x08, 0x67, 0x66, 0x2f, 0x99, 0x1e, 0x87, 0xb6, 0x6d, 0x7a, /* Byte value: 0x7e */ + 0x88, 0x9f, 0xcd, 0x8c, 0x63, 0xb0, 0x2e, 0x83, 0xf6, 0x1e, 0xa2, 0x8f, 0x2d, 0xbc, 0x47, 0x93, /* Byte value: 0x7f */ + 0xcb, 0x32, 0x6b, 0x5b, 0x72, 0x27, 0x31, 0x44, 0xeb, 0x3e, 0x6a, 0x37, 0x5d, 0x54, 0xe8, 0x41, /* Byte value: 0x80 */ + 0x3a, 0x98, 0x90, 0xa3, 0xdc, 0xa8, 0x87, 0xd1, 0x18, 0xe4, 0x24, 0xb9, 0x9d, 0xc0, 0x07, 0xf0, /* Byte value: 0x81 */ + 0x85, 0x59, 0x18, 0x7d, 0xd5, 0x1c, 0x7b, 0xf4, 0xc3, 0xd1, 0x06, 0x3f, 0x39, 0xd7, 0xe1, 0x92, /* Byte value: 0x82 */ + 0x41, 0x2d, 0xfd, 0x76, 0x0a, 0x88, 0xd8, 0xa8, 0xb3, 0x7f, 0xae, 0xf1, 0x5f, 0xd1, 0x46, 0x74, /* Byte value: 0x83 */ + 0x2a, 0x12, 0x0d, 0xe2, 0x04, 0x50, 0x70, 0x2f, 0x21, 0x59, 0x92, 0xb4, 0x26, 0xcb, 0x43, 0x89, /* Byte value: 0x84 */ + 0x92, 0xd0, 0xa4, 0xad, 0xcc, 0x2b, 0x84, 0x6d, 0x9c, 0x43, 0x29, 0x2c, 0x05, 0x6a, 0xc8, 0x91, /* Byte value: 0x85 */ + 0xb9, 0x82, 0x65, 0xfe, 0x24, 0x95, 0x76, 0x94, 0xea, 0xd4, 0x88, 0x5d, 0xd5, 0x5c, 0x1e, 0x4b, /* Byte value: 0x86 */ + 0xe6, 0x23, 0x47, 0x28, 0xb7, 0xb8, 0x49, 0x0c, 0xac, 0x48, 0x61, 0x9d, 0xfc, 0x29, 0xc6, 0xb2, /* Byte value: 0x87 */ + 0xf2, 0x6a, 0x6c, 0xe8, 0x59, 0x7e, 0xf3, 0x2c, 0x0a, 0x4b, 0x1b, 0x02, 0x19, 0x50, 0x93, 0x44, /* Byte value: 0x88 */ + 0x28, 0x92, 0x56, 0x43, 0x1f, 0x4f, 0xb7, 0x40, 0x8f, 0x06, 0xf4, 0xfd, 0x09, 0xf2, 0xaa, 0x2f, /* Byte value: 0x89 */ + 0x7d, 0xf6, 0x80, 0xf5, 0xfb, 0x01, 0xd5, 0xc8, 0x9a, 0x7a, 0x20, 0x93, 0xb3, 0x5a, 0xb9, 0xad, /* Byte value: 0x8a */ + 0xbb, 0x02, 0x3e, 0x5f, 0x3f, 0x8a, 0xb1, 0xfb, 0x44, 0x8b, 0xee, 0x14, 0xfa, 0x65, 0xf7, 0xed, /* Byte value: 0x8b */ + 0xf3, 0x2a, 0xa0, 0x59, 0xb5, 0x90, 0x71, 0xfa, 0x5d, 0x85, 0x28, 0xc7, 0xef, 0xad, 0x06, 0x17, /* Byte value: 0x8c */ + 0xe7, 0x63, 0x8b, 0x99, 0x5b, 0x56, 0xcb, 0xda, 0xfb, 0x86, 0x52, 0x58, 0x0a, 0xd4, 0x53, 0xe1, /* Byte value: 0x8d */ + 0xad, 0xcb, 0x4e, 0x3e, 0xca, 0x53, 0xcc, 0xb4, 0x4c, 0xd7, 0xf2, 0xc2, 0x30, 0x25, 0x4b, 0xbd, /* Byte value: 0x8e */ + 0x0e, 0x06, 0x42, 0xe1, 0x41, 0x5d, 0x10, 0xce, 0xcc, 0x5e, 0xf1, 0x3c, 0xcd, 0xaf, 0xda, 0xf4, /* Byte value: 0x8f */ + 0x76, 0x73, 0xb8, 0x24, 0x60, 0x8c, 0x0a, 0x0e, 0x9e, 0x54, 0x2e, 0xf8, 0xd6, 0x7a, 0xe7, 0x85, /* Byte value: 0x90 */ + 0x3b, 0xd8, 0x5c, 0x12, 0x30, 0x46, 0x05, 0x07, 0x4f, 0x2a, 0x17, 0x7c, 0x6b, 0x3d, 0x92, 0xa3, /* Byte value: 0x91 */ + 0x6d, 0x7c, 0x1d, 0xb4, 0x23, 0xf9, 0x22, 0x36, 0xa3, 0xc7, 0x96, 0x9e, 0x08, 0x51, 0xfd, 0xd4, /* Byte value: 0x92 */ + 0x20, 0xd7, 0xf9, 0x82, 0x73, 0x33, 0x2d, 0x3f, 0x72, 0xb9, 0xaf, 0x1a, 0xb5, 0x16, 0x88, 0xf2, /* Byte value: 0x93 */ + 0xa9, 0x08, 0xf8, 0xbf, 0xfc, 0x6d, 0x81, 0x6a, 0xd3, 0x69, 0x3e, 0x50, 0x6e, 0x57, 0x5a, 0x32, /* Byte value: 0x94 */ + 0x0b, 0x85, 0x38, 0xd1, 0x9b, 0x8d, 0xdf, 0xc6, 0x04, 0x2e, 0x0e, 0x6b, 0x65, 0x20, 0x5e, 0x28, /* Byte value: 0x95 */ + 0xce, 0xb1, 0x11, 0x6b, 0xa8, 0xf7, 0xfe, 0x4c, 0x23, 0x4e, 0x95, 0x60, 0xf5, 0xdb, 0x6c, 0x9d, /* Byte value: 0x96 */ + 0x8f, 0x9c, 0xec, 0x1d, 0xa2, 0x7f, 0x26, 0xe4, 0x90, 0x31, 0x3b, 0x91, 0xaa, 0x0a, 0x2a, 0xe9, /* Byte value: 0x97 */ + 0x94, 0x93, 0x49, 0x8d, 0xe1, 0x0a, 0x0e, 0xdc, 0xad, 0xa2, 0x83, 0xf7, 0x74, 0x21, 0x30, 0xb8, /* Byte value: 0x98 */ + 0x4c, 0xeb, 0x28, 0x87, 0xbc, 0x24, 0x8d, 0xdf, 0x86, 0xb0, 0x0a, 0x41, 0x4b, 0xba, 0xe0, 0x75, /* Byte value: 0x99 */ + 0x29, 0xd2, 0x9a, 0xf2, 0xf3, 0xa1, 0x35, 0x96, 0xd8, 0xc8, 0xc7, 0x38, 0xff, 0x0f, 0x3f, 0x7c, /* Byte value: 0x9a */ + 0x5a, 0x22, 0x58, 0xe6, 0x49, 0xfd, 0xf0, 0x90, 0x8e, 0xec, 0x16, 0x97, 0x81, 0xfa, 0x5c, 0x25, /* Byte value: 0x9b */ + 0xb4, 0x44, 0xb0, 0x0f, 0x92, 0x39, 0x23, 0xe3, 0xdf, 0x1b, 0x2c, 0xed, 0xc1, 0x37, 0xb8, 0x4a, /* Byte value: 0x9c */ + 0x6e, 0xbc, 0x8a, 0xa4, 0xd4, 0x08, 0x67, 0x8f, 0x5a, 0x56, 0xc3, 0x12, 0xd1, 0x95, 0x81, 0x21, /* Byte value: 0x9d */ + 0x1a, 0x4f, 0x69, 0x21, 0xaf, 0x9b, 0xaa, 0xee, 0x6a, 0x5d, 0x8b, 0xa3, 0x28, 0xd6, 0x8f, 0x02, /* Byte value: 0x9e */ + 0xf7, 0xe9, 0x16, 0xd8, 0x83, 0xae, 0x3c, 0x24, 0xc2, 0x3b, 0xe4, 0x55, 0xb1, 0xdf, 0x17, 0x98, /* Byte value: 0x9f */ + 0x67, 0xb9, 0xe9, 0xd4, 0x54, 0x9a, 0x7f, 0x26, 0xf0, 0x27, 0xab, 0x30, 0x9b, 0x8c, 0x36, 0xaf, /* Byte value: 0xa0 */ + 0xd4, 0xfe, 0x78, 0x4a, 0x07, 0x6c, 0x54, 0xa2, 0x49, 0x13, 0x1e, 0xc3, 0xdd, 0x0d, 0xe3, 0x9f, /* Byte value: 0xa1 */ + 0xb8, 0xc2, 0xa9, 0x4f, 0xc8, 0x7b, 0xf4, 0x42, 0xbd, 0x1a, 0xbb, 0x98, 0x23, 0xa1, 0x8b, 0x18, /* Byte value: 0xa2 */ + 0xd8, 0x78, 0x61, 0x0a, 0x5d, 0x2e, 0x83, 0x03, 0x2b, 0x12, 0x89, 0xb6, 0x3f, 0x9b, 0xd0, 0xcd, /* Byte value: 0xa3 */ + 0x8a, 0x1f, 0x96, 0x2d, 0x78, 0xaf, 0xe9, 0xec, 0x58, 0x41, 0xc4, 0xc6, 0x02, 0x85, 0xae, 0x35, /* Byte value: 0xa4 */ + 0xda, 0xf8, 0x3a, 0xab, 0x46, 0x31, 0x44, 0x6c, 0x85, 0x4d, 0xef, 0xff, 0x10, 0xa2, 0x39, 0x6b, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x3d, 0x9b, 0xb1, 0x32, 0x1d, 0x67, 0x8f, 0xb6, 0x7e, 0xcb, 0xbd, 0xa7, 0x1a, 0x76, 0x6a, 0x8a, /* Byte value: 0xa7 */ + 0x99, 0x55, 0x9c, 0x7c, 0x57, 0xa6, 0x5b, 0xab, 0x98, 0x6d, 0x27, 0x47, 0x60, 0x4a, 0x96, 0xb9, /* Byte value: 0xa8 */ + 0xd3, 0xfd, 0x59, 0xdb, 0xc6, 0xa3, 0x5c, 0xc5, 0x2f, 0x3c, 0x87, 0xdd, 0x5a, 0xbb, 0x8e, 0xe5, /* Byte value: 0xa9 */ + 0x9d, 0x96, 0x2a, 0xfd, 0x61, 0x98, 0x16, 0x75, 0x07, 0xd3, 0xeb, 0xd5, 0x3e, 0x38, 0x87, 0x36, /* Byte value: 0xaa */ + 0x7e, 0x36, 0x17, 0xe5, 0x0c, 0xf0, 0x90, 0x71, 0x63, 0xeb, 0x75, 0x1f, 0x6a, 0x9e, 0xc5, 0x58, /* Byte value: 0xab */ + 0x06, 0x43, 0xed, 0x20, 0x2d, 0x21, 0x8a, 0xb1, 0x31, 0xe1, 0xaa, 0xdb, 0x71, 0x4b, 0xf8, 0x29, /* Byte value: 0xac */ + 0xd1, 0x7d, 0x02, 0x7a, 0xdd, 0xbc, 0x9b, 0xaa, 0x81, 0x63, 0xe1, 0x94, 0x75, 0x82, 0x67, 0x43, /* Byte value: 0xad */ + 0xaa, 0xc8, 0x6f, 0xaf, 0x0b, 0x9c, 0xc4, 0xd3, 0x2a, 0xf8, 0x6b, 0xdc, 0xb7, 0x93, 0x26, 0xc7, /* Byte value: 0xae */ + 0xa4, 0xce, 0x2d, 0x4e, 0x4a, 0xc1, 0xd4, 0x1d, 0xe6, 0xa6, 0x9a, 0xe0, 0x7a, 0x3c, 0xfc, 0x33, /* Byte value: 0xaf */ + 0x03, 0xc0, 0x97, 0x10, 0xf7, 0xf1, 0x45, 0xb9, 0xf9, 0x91, 0x55, 0x8c, 0xd9, 0xc4, 0x7c, 0xf5, /* Byte value: 0xb0 */ + 0x23, 0x17, 0x6e, 0x92, 0x84, 0xc2, 0x68, 0x86, 0x8b, 0x28, 0xfa, 0x96, 0x6c, 0xd2, 0xf4, 0x07, /* Byte value: 0xb1 */ + 0x0a, 0xc5, 0xf4, 0x60, 0x77, 0x63, 0x5d, 0x10, 0x53, 0xe0, 0x3d, 0xae, 0x93, 0xdd, 0xcb, 0x7b, /* Byte value: 0xb2 */ + 0x7c, 0xb6, 0x4c, 0x44, 0x17, 0xef, 0x57, 0x1e, 0xcd, 0xb4, 0x13, 0x56, 0x45, 0xa7, 0x2c, 0xfe, /* Byte value: 0xb3 */ + 0x22, 0x57, 0xa2, 0x23, 0x68, 0x2c, 0xea, 0x50, 0xdc, 0xe6, 0xc9, 0x53, 0x9a, 0x2f, 0x61, 0x54, /* Byte value: 0xb4 */ + 0x37, 0x5e, 0x45, 0x52, 0x6a, 0x04, 0xd2, 0xa6, 0x2d, 0x2b, 0x80, 0x09, 0x89, 0xab, 0xa1, 0xf1, /* Byte value: 0xb5 */ + 0x4a, 0xa8, 0xc5, 0xa7, 0x91, 0x05, 0x07, 0x6e, 0xb7, 0x51, 0xa0, 0x9a, 0x3a, 0xf1, 0x18, 0x5c, /* Byte value: 0xb6 */ + 0x2e, 0xd1, 0xbb, 0x63, 0x32, 0x6e, 0x3d, 0xf1, 0xbe, 0xe7, 0x5e, 0x26, 0x78, 0xb9, 0x52, 0x06, /* Byte value: 0xb7 */ + 0x25, 0x54, 0x83, 0xb2, 0xa9, 0xe3, 0xe2, 0x37, 0xba, 0xc9, 0x50, 0x4d, 0x1d, 0x99, 0x0c, 0x2e, /* Byte value: 0xb8 */ + 0xf8, 0xaf, 0x98, 0x88, 0x2e, 0x1d, 0xae, 0x3c, 0x59, 0xab, 0x26, 0xac, 0x8a, 0x8d, 0x58, 0x3f, /* Byte value: 0xb9 */ + 0xdd, 0xfb, 0x1b, 0x3a, 0x87, 0xfe, 0x4c, 0x0b, 0xe3, 0x62, 0x76, 0xe1, 0x97, 0x14, 0x54, 0x11, /* Byte value: 0xba */ + 0x31, 0x1d, 0xa8, 0x72, 0x47, 0x25, 0x58, 0x17, 0x1c, 0xca, 0x2a, 0xd2, 0xf8, 0xe0, 0x59, 0xd8, /* Byte value: 0xbb */ + 0x74, 0xf3, 0xe3, 0x85, 0x7b, 0x93, 0xcd, 0x61, 0x30, 0x0b, 0x48, 0xb1, 0xf9, 0x43, 0x0e, 0x23, /* Byte value: 0xbc */ + 0x59, 0xe2, 0xcf, 0xf6, 0xbe, 0x0c, 0xb5, 0x29, 0x77, 0x7d, 0x43, 0x1b, 0x58, 0x3e, 0x20, 0xd0, /* Byte value: 0xbd */ + 0xcd, 0x71, 0x86, 0x7b, 0x5f, 0x06, 0xbb, 0xf5, 0xda, 0xdf, 0xc0, 0xec, 0x2c, 0x1f, 0x10, 0x68, /* Byte value: 0xbe */ + 0x5d, 0x21, 0x79, 0x77, 0x88, 0x32, 0xf8, 0xf7, 0xe8, 0xc3, 0x8f, 0x89, 0x06, 0x4c, 0x31, 0x5f, /* Byte value: 0xbf */ + 0x08, 0x45, 0xaf, 0xc1, 0x6c, 0x7c, 0x9a, 0x7f, 0xfd, 0xbf, 0x5b, 0xe7, 0xbc, 0xe4, 0x22, 0xdd, /* Byte value: 0xc0 */ + 0x7f, 0x76, 0xdb, 0x54, 0xe0, 0x1e, 0x12, 0xa7, 0x34, 0x25, 0x46, 0xda, 0x9c, 0x63, 0x50, 0x0b, /* Byte value: 0xc1 */ + 0xa6, 0x4e, 0x76, 0xef, 0x51, 0xde, 0x13, 0x72, 0x48, 0xf9, 0xfc, 0xa9, 0x55, 0x05, 0x15, 0x95, /* Byte value: 0xc2 */ + 0xf9, 0xef, 0x54, 0x39, 0xc2, 0xf3, 0x2c, 0xea, 0x0e, 0x65, 0x15, 0x69, 0x7c, 0x70, 0xcd, 0x6c, /* Byte value: 0xc3 */ + 0x90, 0x50, 0xff, 0x0c, 0xd7, 0x34, 0x43, 0x02, 0x32, 0x1c, 0x4f, 0x65, 0x2a, 0x53, 0x21, 0x37, /* Byte value: 0xc4 */ + 0x0f, 0x46, 0x8e, 0x50, 0xad, 0xb3, 0x92, 0x18, 0x9b, 0x90, 0xc2, 0xf9, 0x3b, 0x52, 0x4f, 0xa7, /* Byte value: 0xc5 */ + 0xb0, 0x87, 0x06, 0x8e, 0xa4, 0x07, 0x6e, 0x3d, 0x40, 0xa5, 0xe0, 0x7f, 0x9f, 0x45, 0xa9, 0xc5, /* Byte value: 0xc6 */ + 0xac, 0x8b, 0x82, 0x8f, 0x26, 0xbd, 0x4e, 0x62, 0x1b, 0x19, 0xc1, 0x07, 0xc6, 0xd8, 0xde, 0xee, /* Byte value: 0xc7 */ + 0x60, 0xba, 0xc8, 0x45, 0x95, 0x55, 0x77, 0x41, 0x96, 0x08, 0x32, 0x2e, 0x1c, 0x3a, 0x5b, 0xd5, /* Byte value: 0xc8 */ + 0x6c, 0x3c, 0xd1, 0x05, 0xcf, 0x17, 0xa0, 0xe0, 0xf4, 0x09, 0xa5, 0x5b, 0xfe, 0xac, 0x68, 0x87, /* Byte value: 0xc9 */ + 0x13, 0x4a, 0x0a, 0x51, 0x2f, 0x09, 0xb2, 0x47, 0xc0, 0x2c, 0xe3, 0x81, 0x62, 0xcf, 0x38, 0x8c, /* Byte value: 0xca */ + 0xbc, 0x01, 0x1f, 0xce, 0xfe, 0x45, 0xb9, 0x9c, 0x22, 0xa4, 0x77, 0x0a, 0x7d, 0xd3, 0x9a, 0x97, /* Byte value: 0xcb */ + 0x32, 0xdd, 0x3f, 0x62, 0xb0, 0xd4, 0x1d, 0xae, 0xe5, 0x5b, 0x7f, 0x5e, 0x21, 0x24, 0x25, 0x2d, /* Byte value: 0xcc */ + 0xf1, 0xaa, 0xfb, 0xf8, 0xae, 0x8f, 0xb6, 0x95, 0xf3, 0xda, 0x4e, 0x8e, 0xc0, 0x94, 0xef, 0xb1, /* Byte value: 0xcd */ + 0xd6, 0x7e, 0x23, 0xeb, 0x1c, 0x73, 0x93, 0xcd, 0xe7, 0x4c, 0x78, 0x8a, 0xf2, 0x34, 0x0a, 0x39, /* Byte value: 0xce */ + 0x44, 0xae, 0x87, 0x46, 0xd0, 0x58, 0x17, 0xa0, 0x7b, 0x0f, 0x51, 0xa6, 0xf7, 0x5e, 0xc2, 0xa8, /* Byte value: 0xcf */ + 0x62, 0x3a, 0x93, 0xe4, 0x8e, 0x4a, 0xb0, 0x2e, 0x38, 0x57, 0x54, 0x67, 0x33, 0x03, 0xb2, 0x73, /* Byte value: 0xd0 */ + 0xa8, 0x48, 0x34, 0x0e, 0x10, 0x83, 0x03, 0xbc, 0x84, 0xa7, 0x0d, 0x95, 0x98, 0xaa, 0xcf, 0x61, /* Byte value: 0xd1 */ + 0x40, 0x6d, 0x31, 0xc7, 0xe6, 0x66, 0x5a, 0x7e, 0xe4, 0xb1, 0x9d, 0x34, 0xa9, 0x2c, 0xd3, 0x27, /* Byte value: 0xd2 */ + 0x95, 0xd3, 0x85, 0x3c, 0x0d, 0xe4, 0x8c, 0x0a, 0xfa, 0x6c, 0xb0, 0x32, 0x82, 0xdc, 0xa5, 0xeb, /* Byte value: 0xd3 */ + 0x11, 0xca, 0x51, 0xf0, 0x34, 0x16, 0x75, 0x28, 0x6e, 0x73, 0x85, 0xc8, 0x4d, 0xf6, 0xd1, 0x2a, /* Byte value: 0xd4 */ + 0x8b, 0x5f, 0x5a, 0x9c, 0x94, 0x41, 0x6b, 0x3a, 0x0f, 0x8f, 0xf7, 0x03, 0xf4, 0x78, 0x3b, 0x66, /* Byte value: 0xd5 */ + 0x01, 0x40, 0xcc, 0xb1, 0xec, 0xee, 0x82, 0xd6, 0x57, 0xce, 0x33, 0xc5, 0xf6, 0xfd, 0x95, 0x53, /* Byte value: 0xd6 */ + 0x0d, 0xc6, 0xd5, 0xf1, 0xb6, 0xac, 0x55, 0x77, 0x35, 0xcf, 0xa4, 0xb0, 0x14, 0x6b, 0xa6, 0x01, /* Byte value: 0xd7 */ + 0xe1, 0x20, 0x66, 0xb9, 0x76, 0x77, 0x41, 0x6b, 0xca, 0x67, 0xf8, 0x83, 0x7b, 0x9f, 0xab, 0xc8, /* Byte value: 0xd8 */ + 0x6b, 0x3f, 0xf0, 0x94, 0x0e, 0xd8, 0xa8, 0x87, 0x92, 0x26, 0x3c, 0x45, 0x79, 0x1a, 0x05, 0xfd, /* Byte value: 0xd9 */ + 0xc2, 0x37, 0x08, 0x2b, 0xf2, 0xb5, 0x29, 0xed, 0x41, 0x4f, 0x02, 0x15, 0x17, 0x4d, 0x5f, 0xcf, /* Byte value: 0xda */ + 0x5c, 0x61, 0xb5, 0xc6, 0x64, 0xdc, 0x7a, 0x21, 0xbf, 0x0d, 0xbc, 0x4c, 0xf0, 0xb1, 0xa4, 0x0c, /* Byte value: 0xdb */ + 0xc7, 0xb4, 0x72, 0x1b, 0x28, 0x65, 0xe6, 0xe5, 0x89, 0x3f, 0xfd, 0x42, 0xbf, 0xc2, 0xdb, 0x13, /* Byte value: 0xdc */ + 0x84, 0x19, 0xd4, 0xcc, 0x39, 0xf2, 0xf9, 0x22, 0x94, 0x1f, 0x35, 0xfa, 0xcf, 0x2a, 0x74, 0xc1, /* Byte value: 0xdd */ + 0x45, 0xee, 0x4b, 0xf7, 0x3c, 0xb6, 0x95, 0x76, 0x2c, 0xc1, 0x62, 0x63, 0x01, 0xa3, 0x57, 0xfb, /* Byte value: 0xde */ + 0x79, 0x35, 0x36, 0x74, 0xcd, 0x3f, 0x98, 0x16, 0x05, 0xc4, 0xec, 0x01, 0xed, 0x28, 0xa8, 0x22, /* Byte value: 0xdf */ + 0x4b, 0xe8, 0x09, 0x16, 0x7d, 0xeb, 0x85, 0xb8, 0xe0, 0x9f, 0x93, 0x5f, 0xcc, 0x0c, 0x8d, 0x0f, /* Byte value: 0xe0 */ + 0x48, 0x28, 0x9e, 0x06, 0x8a, 0x1a, 0xc0, 0x01, 0x19, 0x0e, 0xc6, 0xd3, 0x15, 0xc8, 0xf1, 0xfa, /* Byte value: 0xe1 */ + 0x6f, 0xfc, 0x46, 0x15, 0x38, 0xe6, 0xe5, 0x59, 0x0d, 0x98, 0xf0, 0xd7, 0x27, 0x68, 0x14, 0x72, /* Byte value: 0xe2 */ + 0xa7, 0x0e, 0xba, 0x5e, 0xbd, 0x30, 0x91, 0xa4, 0x1f, 0x37, 0xcf, 0x6c, 0xa3, 0xf8, 0x80, 0xc6, /* Byte value: 0xe3 */ + 0xa2, 0x8d, 0xc0, 0x6e, 0x67, 0xe0, 0x5e, 0xac, 0xd7, 0x47, 0x30, 0x3b, 0x0b, 0x77, 0x04, 0x1a, /* Byte value: 0xe4 */ + 0xc0, 0xb7, 0x53, 0x8a, 0xe9, 0xaa, 0xee, 0x82, 0xef, 0x10, 0x64, 0x5c, 0x38, 0x74, 0xb6, 0x69, /* Byte value: 0xe5 */ + 0x2c, 0x51, 0xe0, 0xc2, 0x29, 0x71, 0xfa, 0x9e, 0x10, 0xb8, 0x38, 0x6f, 0x57, 0x80, 0xbb, 0xa0, /* Byte value: 0xe6 */ + 0x81, 0x9a, 0xae, 0xfc, 0xe3, 0x22, 0x36, 0x2a, 0x5c, 0x6f, 0xca, 0xad, 0x67, 0xa5, 0xf0, 0x1d, /* Byte value: 0xe7 */ + 0xd0, 0x3d, 0xce, 0xcb, 0x31, 0x52, 0x19, 0x7c, 0xd6, 0xad, 0xd2, 0x51, 0x83, 0x7f, 0xf2, 0x10, /* Byte value: 0xe8 */ + 0x17, 0x89, 0xbc, 0xd0, 0x19, 0x37, 0xff, 0x99, 0x5f, 0x92, 0x2f, 0x13, 0x3c, 0xbd, 0x29, 0x03, /* Byte value: 0xe9 */ + 0xa3, 0xcd, 0x0c, 0xdf, 0x8b, 0x0e, 0xdc, 0x7a, 0x80, 0x89, 0x03, 0xfe, 0xfd, 0x8a, 0x91, 0x49, /* Byte value: 0xea */ + 0xd2, 0xbd, 0x95, 0x6a, 0x2a, 0x4d, 0xde, 0x13, 0x78, 0xf2, 0xb4, 0x18, 0xac, 0x46, 0x1b, 0xb6, /* Byte value: 0xeb */ + 0x57, 0xe4, 0x8d, 0x17, 0xff, 0x51, 0xa5, 0xe7, 0xbb, 0x23, 0xb2, 0x27, 0x95, 0x91, 0xfa, 0x24, /* Byte value: 0xec */ + 0x71, 0x70, 0x99, 0xb5, 0xa1, 0x43, 0x02, 0x69, 0xf8, 0x7b, 0xb7, 0xe6, 0x51, 0xcc, 0x8a, 0xff, /* Byte value: 0xed */ + 0xa1, 0x4d, 0x57, 0x7e, 0x90, 0x11, 0x1b, 0x15, 0x2e, 0xd6, 0x65, 0xb7, 0xd2, 0xb3, 0x78, 0xef, /* Byte value: 0xee */ + 0xc3, 0x77, 0xc4, 0x9a, 0x1e, 0x5b, 0xab, 0x3b, 0x16, 0x81, 0x31, 0xd0, 0xe1, 0xb0, 0xca, 0x9c, /* Byte value: 0xef */ + 0x51, 0xa7, 0x60, 0x37, 0xd2, 0x70, 0x2f, 0x56, 0x8a, 0xc2, 0x18, 0xfc, 0xe4, 0xda, 0x02, 0x0d, /* Byte value: 0xf0 */ + 0x35, 0xde, 0x1e, 0xf3, 0x71, 0x1b, 0x15, 0xc9, 0x83, 0x74, 0xe6, 0x40, 0xa6, 0x92, 0x48, 0x57, /* Byte value: 0xf1 */ + 0x47, 0x6e, 0x10, 0x56, 0x27, 0xa9, 0x52, 0x19, 0x82, 0x9e, 0x04, 0x2a, 0x2e, 0x9a, 0xbe, 0x5d, /* Byte value: 0xf2 */ + 0xf5, 0x69, 0x4d, 0x79, 0x98, 0xb1, 0xfb, 0x4b, 0x6c, 0x64, 0x82, 0x1c, 0x9e, 0xe6, 0xfe, 0x3e, /* Byte value: 0xf3 */ + 0xb2, 0x07, 0x5d, 0x2f, 0xbf, 0x18, 0xa9, 0x52, 0xee, 0xfa, 0x86, 0x36, 0xb0, 0x7c, 0x40, 0x63, /* Byte value: 0xf4 */ + 0xd7, 0x3e, 0xef, 0x5a, 0xf0, 0x9d, 0x11, 0x1b, 0xb0, 0x82, 0x4b, 0x4f, 0x04, 0xc9, 0x9f, 0x6a, /* Byte value: 0xf5 */ + 0x16, 0xc9, 0x70, 0x61, 0xf5, 0xd9, 0x7d, 0x4f, 0x08, 0x5c, 0x1c, 0xd6, 0xca, 0x40, 0xbc, 0x50, /* Byte value: 0xf6 */ + 0x86, 0x99, 0x8f, 0x6d, 0x22, 0xed, 0x3e, 0x4d, 0x3a, 0x40, 0x53, 0xb3, 0xe0, 0x13, 0x9d, 0x67, /* Byte value: 0xf7 */ + 0x73, 0xf0, 0xc2, 0x14, 0xba, 0x5c, 0xc5, 0x06, 0x56, 0x24, 0xd1, 0xaf, 0x7e, 0xf5, 0x63, 0x59, /* Byte value: 0xf8 */ + 0xc4, 0x74, 0xe5, 0x0b, 0xdf, 0x94, 0xa3, 0x5c, 0x70, 0xae, 0xa8, 0xce, 0x66, 0x06, 0xa7, 0xe6, /* Byte value: 0xf9 */ + 0x34, 0x9e, 0xd2, 0x42, 0x9d, 0xf5, 0x97, 0x1f, 0xd4, 0xba, 0xd5, 0x85, 0x50, 0x6f, 0xdd, 0x04, /* Byte value: 0xfa */ + 0xc6, 0xf4, 0xbe, 0xaa, 0xc4, 0x8b, 0x64, 0x33, 0xde, 0xf1, 0xce, 0x87, 0x49, 0x3f, 0x4e, 0x40, /* Byte value: 0xfb */ + 0x96, 0x13, 0x12, 0x2c, 0xfa, 0x15, 0xc9, 0xb3, 0x03, 0xfd, 0xe5, 0xbe, 0x5b, 0x18, 0xd9, 0x1e, /* Byte value: 0xfc */ + 0xed, 0xa6, 0x7f, 0xf9, 0x2c, 0x35, 0x96, 0xca, 0xa8, 0x66, 0x6f, 0xf6, 0x99, 0x09, 0x98, 0x9a, /* Byte value: 0xfd */ + 0xf4, 0x29, 0x81, 0xc8, 0x74, 0x5f, 0x79, 0x9d, 0x3b, 0xaa, 0xb1, 0xd9, 0x68, 0x1b, 0x6b, 0x6d, /* Byte value: 0xfe */ + 0xae, 0x0b, 0xd9, 0x2e, 0x3d, 0xa2, 0x89, 0x0d, 0xb5, 0x46, 0xa7, 0x4e, 0xe9, 0xe1, 0x37, 0x48, /* Byte value: 0xff */ + 0x63, 0x7a, 0x5f, 0x55, 0x62, 0xa4, 0x32, 0xf8, 0x6f, 0x99, 0x67, 0xa2, 0xc5, 0xfe, 0x27, 0x20, /* Byte value: 0x00 */ + + /* Matrix row: 5 */ + 0x79, 0x80, 0xab, 0xe7, 0xa9, 0x6f, 0x50, 0x97, 0xbe, 0x20, 0xdb, 0x5a, 0xb5, 0x1a, 0xf0, 0xb4, /* Byte value: 0x01 */ + 0x91, 0x1a, 0x97, 0x16, 0x14, 0x45, 0x9f, 0x6e, 0x60, 0xe7, 0xef, 0x55, 0x0a, 0x58, 0x62, 0xaa, /* Byte value: 0x02 */ + 0x99, 0xdc, 0x5f, 0x93, 0xd1, 0x32, 0x94, 0x30, 0x3d, 0x37, 0xfc, 0x67, 0x89, 0x09, 0x7f, 0xce, /* Byte value: 0x03 */ + 0xb9, 0x42, 0xf9, 0xc2, 0x43, 0x2d, 0xb8, 0x8b, 0x8a, 0xf1, 0xb0, 0xaf, 0xc0, 0x8e, 0x0b, 0x9d, /* Byte value: 0x04 */ + 0x71, 0x46, 0x63, 0x62, 0x6c, 0x18, 0x5b, 0xc9, 0xe3, 0xf0, 0xc8, 0x68, 0x36, 0x4b, 0xed, 0xd0, /* Byte value: 0x05 */ + 0xea, 0x4a, 0x0e, 0x41, 0x1d, 0x47, 0xbd, 0x0f, 0x58, 0xf3, 0x40, 0xe2, 0xef, 0xc7, 0x04, 0x07, /* Byte value: 0x06 */ + 0xd7, 0x56, 0x4e, 0xa7, 0xd0, 0xcc, 0x51, 0x02, 0x84, 0xf4, 0xeb, 0xf2, 0x68, 0xd9, 0xf3, 0x27, /* Byte value: 0x07 */ + 0x95, 0x79, 0xf3, 0xb5, 0x97, 0x9f, 0x7b, 0x41, 0xaf, 0x8f, 0x07, 0x4c, 0xaa, 0x91, 0x8d, 0x98, /* Byte value: 0x08 */ + 0x55, 0xbb, 0xa1, 0x90, 0x7d, 0xdd, 0x93, 0x5d, 0x9b, 0x5e, 0x6c, 0xb9, 0xdf, 0x05, 0x76, 0xb1, /* Byte value: 0x09 */ + 0xda, 0x9b, 0xfb, 0xd9, 0xc6, 0xb6, 0x87, 0x08, 0x55, 0x56, 0x2a, 0x4e, 0x63, 0xe2, 0x4a, 0x9c, /* Byte value: 0x0a */ + 0xdb, 0xf3, 0xe2, 0x81, 0x96, 0x61, 0xbe, 0x73, 0x16, 0x4c, 0x10, 0xd9, 0x4b, 0x41, 0x01, 0x71, /* Byte value: 0x0b */ + 0xb5, 0xe7, 0x55, 0xe4, 0x05, 0x80, 0x57, 0xfa, 0x18, 0x49, 0x4b, 0x84, 0xe3, 0x16, 0xf9, 0xcb, /* Byte value: 0x0c */ + 0x3f, 0xcc, 0x72, 0x56, 0x6d, 0xe6, 0x9e, 0xfb, 0x5a, 0x33, 0xdf, 0xfd, 0xd7, 0x9b, 0x61, 0x39, /* Byte value: 0x0d */ + 0x54, 0xd3, 0xb8, 0xc8, 0x2d, 0x0a, 0xaa, 0x26, 0xd8, 0x44, 0x56, 0x2e, 0xf7, 0xa6, 0x3d, 0x5c, /* Byte value: 0x0e */ + 0x7d, 0xe3, 0xcf, 0x44, 0x2a, 0xb5, 0xb4, 0xb8, 0x71, 0x48, 0x33, 0x43, 0x15, 0xd3, 0x1f, 0x86, /* Byte value: 0x0f */ + 0xd5, 0x86, 0x7c, 0x17, 0x70, 0xa1, 0x23, 0xf4, 0x02, 0xc0, 0x9f, 0x1f, 0x38, 0x5c, 0x65, 0x3e, /* Byte value: 0x10 */ + 0xbd, 0x21, 0x9d, 0x61, 0xc0, 0xf7, 0x5c, 0xa4, 0x45, 0x99, 0x58, 0xb6, 0x60, 0x47, 0xe4, 0xaf, /* Byte value: 0x11 */ + 0xa9, 0x0d, 0xaa, 0x0b, 0x0a, 0xc3, 0xae, 0x37, 0x30, 0x92, 0x96, 0xcb, 0x05, 0x2c, 0x31, 0x55, /* Byte value: 0x12 */ + 0xfe, 0x66, 0x39, 0x2b, 0xd7, 0x73, 0x4f, 0x9c, 0x2d, 0xf8, 0x8e, 0x9f, 0x8a, 0xac, 0xd1, 0xfd, /* Byte value: 0x13 */ + 0x3b, 0xaf, 0x16, 0xf5, 0xee, 0x3c, 0x7a, 0xd4, 0x95, 0x5b, 0x37, 0xe4, 0x77, 0x52, 0x8e, 0x0b, /* Byte value: 0x14 */ + 0x1d, 0x82, 0xe6, 0xb7, 0x5f, 0x94, 0xc0, 0xb6, 0x6b, 0xc1, 0xe7, 0xd8, 0xce, 0x99, 0x83, 0x73, /* Byte value: 0x15 */ + 0x36, 0x62, 0xa3, 0x8b, 0xf8, 0x46, 0xac, 0xde, 0x44, 0xf9, 0xf6, 0x58, 0x7c, 0x69, 0x37, 0xb0, /* Byte value: 0x16 */ + 0x38, 0x17, 0x3d, 0x1d, 0x1e, 0x86, 0x31, 0x59, 0x50, 0x75, 0x79, 0x9e, 0x0f, 0x74, 0x53, 0xff, /* Byte value: 0x17 */ + 0x07, 0xdb, 0x4f, 0x4b, 0x73, 0x60, 0xaf, 0xa2, 0x0a, 0x46, 0xa6, 0x63, 0xd8, 0xef, 0x32, 0xc6, /* Byte value: 0x18 */ + 0x1b, 0x31, 0xb0, 0xa4, 0x7c, 0x23, 0x56, 0x6f, 0x22, 0x9d, 0x7b, 0x2c, 0x3e, 0xd5, 0xfa, 0x58, /* Byte value: 0x19 */ + 0xfb, 0x6d, 0x44, 0xd0, 0x04, 0x7e, 0x92, 0xc8, 0xa1, 0x8a, 0x5c, 0x11, 0x02, 0xc6, 0x75, 0x22, /* Byte value: 0x1a */ + 0x70, 0x2e, 0x7a, 0x3a, 0x3c, 0xcf, 0x62, 0xb2, 0xa0, 0xea, 0xf2, 0xff, 0x1e, 0xe8, 0xa6, 0x3d, /* Byte value: 0x1b */ + 0x89, 0x93, 0x0c, 0x5a, 0x98, 0xdc, 0x82, 0x8c, 0x87, 0x54, 0xda, 0x03, 0x4c, 0xab, 0x45, 0x06, /* Byte value: 0x1c */ + 0x4a, 0xe9, 0x75, 0x97, 0x82, 0x24, 0x21, 0x1d, 0x76, 0xab, 0xff, 0x8c, 0x41, 0x19, 0x63, 0xdb, /* Byte value: 0x1d */ + 0xae, 0xd6, 0xe5, 0x40, 0x79, 0xa3, 0x01, 0x95, 0x3a, 0xd4, 0x30, 0xa8, 0xdd, 0xc3, 0x03, 0x93, /* Byte value: 0x1e */ + 0x3d, 0x1c, 0x40, 0xe6, 0xcd, 0x8b, 0xec, 0x0d, 0xdc, 0x07, 0xab, 0x10, 0x87, 0x1e, 0xf7, 0x20, /* Byte value: 0x1f */ + 0x29, 0x30, 0x77, 0x8c, 0x07, 0xbf, 0x1e, 0x9e, 0xa9, 0x0c, 0x65, 0x6d, 0xe2, 0x75, 0x22, 0xda, /* Byte value: 0x20 */ + 0x8a, 0x2b, 0x27, 0xb2, 0x68, 0x66, 0xc9, 0x01, 0x42, 0x7a, 0x94, 0x79, 0x34, 0x8d, 0x98, 0xf2, /* Byte value: 0x21 */ + 0xcd, 0x0f, 0xe7, 0x5b, 0xfc, 0x38, 0x3e, 0x16, 0xe5, 0x73, 0xaa, 0x49, 0x7e, 0xaf, 0x42, 0x92, /* Byte value: 0x22 */ + 0x41, 0x97, 0x96, 0xfa, 0xb7, 0xe9, 0x61, 0xce, 0xee, 0x55, 0xa2, 0xc4, 0xba, 0x6e, 0xa3, 0x4b, /* Byte value: 0x23 */ + 0xce, 0xb7, 0xcc, 0xb3, 0x0c, 0x82, 0x75, 0x9b, 0x20, 0x5d, 0xe4, 0x33, 0x06, 0x89, 0x9f, 0x66, /* Byte value: 0x24 */ + 0x16, 0xfc, 0x05, 0xda, 0x6a, 0x59, 0x80, 0x65, 0xf3, 0x3f, 0xba, 0x90, 0x35, 0xee, 0x43, 0xe3, /* Byte value: 0x25 */ + 0x6c, 0xc4, 0x85, 0xd5, 0x33, 0x8c, 0x9b, 0x7f, 0x88, 0x31, 0x2f, 0xb0, 0xf8, 0xd2, 0x6e, 0xa3, /* Byte value: 0x26 */ + 0x1f, 0x52, 0xd4, 0x07, 0xff, 0xf9, 0xb2, 0x40, 0xed, 0xf5, 0x93, 0x35, 0x9e, 0x1c, 0x15, 0x6a, /* Byte value: 0x27 */ + 0xe0, 0x5c, 0xf4, 0x74, 0x78, 0x5d, 0xc4, 0xa7, 0x83, 0x17, 0x27, 0x3d, 0x3c, 0x13, 0x8f, 0x7a, /* Byte value: 0x28 */ + 0xf5, 0x18, 0xda, 0x46, 0xe2, 0xbe, 0x0f, 0x4f, 0xb5, 0x06, 0xd3, 0xd7, 0x71, 0xdb, 0x11, 0x6d, /* Byte value: 0x29 */ + 0xb0, 0xec, 0x28, 0x1f, 0xd6, 0x8d, 0x8a, 0xae, 0x94, 0x3b, 0x99, 0x0a, 0x6b, 0x7c, 0x5d, 0x14, /* Byte value: 0x2a */ + 0xde, 0xf8, 0x9f, 0x7a, 0x45, 0x6c, 0x63, 0x27, 0x9a, 0x3e, 0xc2, 0x57, 0xc3, 0x2b, 0xa5, 0xae, /* Byte value: 0x2b */ + 0x03, 0xb8, 0x2b, 0xe8, 0xf0, 0xba, 0x4b, 0x8d, 0xc5, 0x2e, 0x4e, 0x7a, 0x78, 0x26, 0xdd, 0xf4, /* Byte value: 0x2c */ + 0xd0, 0x8d, 0x01, 0xec, 0xa3, 0xac, 0xfe, 0xa0, 0x8e, 0xb2, 0x4d, 0x91, 0xb0, 0x36, 0xc1, 0xe1, /* Byte value: 0x2d */ + 0x8e, 0x48, 0x43, 0x11, 0xeb, 0xbc, 0x2d, 0x2e, 0x8d, 0x12, 0x7c, 0x60, 0x94, 0x44, 0x77, 0xc0, /* Byte value: 0x2e */ + 0x23, 0x26, 0x8d, 0xb9, 0x62, 0xa5, 0x67, 0x36, 0x72, 0xe8, 0x02, 0xb2, 0x31, 0xa1, 0xa9, 0xa7, /* Byte value: 0x2f */ + 0x0a, 0x16, 0xfa, 0x35, 0x65, 0x1a, 0x79, 0xa8, 0xdb, 0xe4, 0x67, 0xdf, 0xd3, 0xd4, 0x8b, 0x7d, /* Byte value: 0x30 */ + 0xf3, 0xab, 0x8c, 0x55, 0xc1, 0x09, 0x99, 0x96, 0xfc, 0x5a, 0x4f, 0x23, 0x81, 0x97, 0x68, 0x46, /* Byte value: 0x31 */ + 0x06, 0xb3, 0x56, 0x13, 0x23, 0xb7, 0x96, 0xd9, 0x49, 0x5c, 0x9c, 0xf4, 0xf0, 0x4c, 0x79, 0x2b, /* Byte value: 0x32 */ + 0xdf, 0x90, 0x86, 0x22, 0x15, 0xbb, 0x5a, 0x5c, 0xd9, 0x24, 0xf8, 0xc0, 0xeb, 0x88, 0xee, 0x43, /* Byte value: 0x33 */ + 0x4d, 0x32, 0x3a, 0xdc, 0xf1, 0x44, 0x8e, 0xbf, 0x7c, 0xed, 0x59, 0xef, 0x99, 0xf6, 0x51, 0x1d, /* Byte value: 0x34 */ + 0x98, 0xb4, 0x46, 0xcb, 0x81, 0xe5, 0xad, 0x4b, 0x7e, 0x2d, 0xc6, 0xf0, 0xa1, 0xaa, 0x34, 0x23, /* Byte value: 0x35 */ + 0x97, 0xa9, 0xc1, 0x05, 0x37, 0xf2, 0x09, 0xb7, 0x29, 0xbb, 0x73, 0xa1, 0xfa, 0x14, 0x1b, 0x81, /* Byte value: 0x36 */ + 0xad, 0x6e, 0xce, 0xa8, 0x89, 0x19, 0x4a, 0x18, 0xff, 0xfa, 0x7e, 0xd2, 0xa5, 0xe5, 0xde, 0x67, /* Byte value: 0x37 */ + 0x15, 0x44, 0x2e, 0x32, 0x9a, 0xe3, 0xcb, 0xe8, 0x36, 0x11, 0xf4, 0xea, 0x4d, 0xc8, 0x9e, 0x17, /* Byte value: 0x38 */ + 0xa2, 0x73, 0x49, 0x66, 0x3f, 0x0e, 0xee, 0xe4, 0xa8, 0x6c, 0xcb, 0x83, 0xfe, 0x5b, 0xf1, 0xc5, /* Byte value: 0x39 */ + 0xab, 0xdd, 0x98, 0xbb, 0xaa, 0xae, 0xdc, 0xc1, 0xb6, 0xa6, 0xe2, 0x26, 0x55, 0xa9, 0xa7, 0x4c, /* Byte value: 0x3a */ + 0xc0, 0xc2, 0x52, 0x25, 0xea, 0x42, 0xe8, 0x1c, 0x34, 0xd1, 0x6b, 0xf5, 0x75, 0x94, 0xfb, 0x29, /* Byte value: 0x3b */ + 0xb6, 0x5f, 0x7e, 0x0c, 0xf5, 0x3a, 0x1c, 0x77, 0xdd, 0x67, 0x05, 0xfe, 0x9b, 0x30, 0x24, 0x3f, /* Byte value: 0x3c */ + 0x53, 0x08, 0xf7, 0x83, 0x5e, 0x6a, 0x05, 0x84, 0xd2, 0x02, 0xf0, 0x4d, 0x2f, 0x49, 0x0f, 0x9a, /* Byte value: 0x3d */ + 0xed, 0x91, 0x41, 0x0a, 0x6e, 0x27, 0x12, 0xad, 0x52, 0xb5, 0xe6, 0x81, 0x37, 0x28, 0x36, 0xc1, /* Byte value: 0x3e */ + 0xc1, 0xaa, 0x4b, 0x7d, 0xba, 0x95, 0xd1, 0x67, 0x77, 0xcb, 0x51, 0x62, 0x5d, 0x37, 0xb0, 0xc4, /* Byte value: 0x3f */ + 0xe1, 0x34, 0xed, 0x2c, 0x28, 0x8a, 0xfd, 0xdc, 0xc0, 0x0d, 0x1d, 0xaa, 0x14, 0xb0, 0xc4, 0x97, /* Byte value: 0x40 */ + 0x62, 0xb1, 0x1b, 0x43, 0xd5, 0x4c, 0x06, 0xf8, 0x9c, 0xbd, 0xa0, 0x76, 0x8b, 0xcf, 0x0a, 0xec, /* Byte value: 0x41 */ + 0x24, 0xfd, 0xc2, 0xf2, 0x11, 0xc5, 0xc8, 0x94, 0x78, 0xae, 0xa4, 0xd1, 0xe9, 0x4e, 0x9b, 0x61, /* Byte value: 0x42 */ + 0xe9, 0xf2, 0x25, 0xa9, 0xed, 0xfd, 0xf6, 0x82, 0x9d, 0xdd, 0x0e, 0x98, 0x97, 0xe1, 0xd9, 0xf3, /* Byte value: 0x43 */ + 0x65, 0x6a, 0x54, 0x08, 0xa6, 0x2c, 0xa9, 0x5a, 0x96, 0xfb, 0x06, 0x15, 0x53, 0x20, 0x38, 0x2a, /* Byte value: 0x44 */ + 0xec, 0xf9, 0x58, 0x52, 0x3e, 0xf0, 0x2b, 0xd6, 0x11, 0xaf, 0xdc, 0x16, 0x1f, 0x8b, 0x7d, 0x2c, /* Byte value: 0x45 */ + 0x5d, 0x7d, 0x69, 0x15, 0xb8, 0xaa, 0x98, 0x03, 0xc6, 0x8e, 0x7f, 0x8b, 0x5c, 0x54, 0x6b, 0xd5, /* Byte value: 0x46 */ + 0x26, 0x2d, 0xf0, 0x42, 0xb1, 0xa8, 0xba, 0x62, 0xfe, 0x9a, 0xd0, 0x3c, 0xb9, 0xcb, 0x0d, 0x78, /* Byte value: 0x47 */ + 0xbe, 0x99, 0xb6, 0x89, 0x30, 0x4d, 0x17, 0x29, 0x80, 0xb7, 0x16, 0xcc, 0x18, 0x61, 0x39, 0x5b, /* Byte value: 0x48 */ + 0x21, 0xf6, 0xbf, 0x09, 0xc2, 0xc8, 0x15, 0xc0, 0xf4, 0xdc, 0x76, 0x5f, 0x61, 0x24, 0x3f, 0xbe, /* Byte value: 0x49 */ + 0x4b, 0x81, 0x6c, 0xcf, 0xd2, 0xf3, 0x18, 0x66, 0x35, 0xb1, 0xc5, 0x1b, 0x69, 0xba, 0x28, 0x36, /* Byte value: 0x4a */ + 0x48, 0x39, 0x47, 0x27, 0x22, 0x49, 0x53, 0xeb, 0xf0, 0x9f, 0x8b, 0x61, 0x11, 0x9c, 0xf5, 0xc2, /* Byte value: 0x4b */ + 0xca, 0xd4, 0xa8, 0x10, 0x8f, 0x58, 0x91, 0xb4, 0xef, 0x35, 0x0c, 0x2a, 0xa6, 0x40, 0x70, 0x54, /* Byte value: 0x4c */ + 0xf7, 0xc8, 0xe8, 0xf6, 0x42, 0xd3, 0x7d, 0xb9, 0x33, 0x32, 0xa7, 0x3a, 0x21, 0x5e, 0x87, 0x74, /* Byte value: 0x4d */ + 0x7c, 0x8b, 0xd6, 0x1c, 0x7a, 0x62, 0x8d, 0xc3, 0x32, 0x52, 0x09, 0xd4, 0x3d, 0x70, 0x54, 0x6b, /* Byte value: 0x4e */ + 0xff, 0x0e, 0x20, 0x73, 0x87, 0xa4, 0x76, 0xe7, 0x6e, 0xe2, 0xb4, 0x08, 0xa2, 0x0f, 0x9a, 0x10, /* Byte value: 0x4f */ + 0x20, 0x9e, 0xa6, 0x51, 0x92, 0x1f, 0x2c, 0xbb, 0xb7, 0xc6, 0x4c, 0xc8, 0x49, 0x87, 0x74, 0x53, /* Byte value: 0x50 */ + 0xd1, 0xe5, 0x18, 0xb4, 0xf3, 0x7b, 0xc7, 0xdb, 0xcd, 0xa8, 0x77, 0x06, 0x98, 0x95, 0x8a, 0x0c, /* Byte value: 0x51 */ + 0x85, 0x36, 0xa0, 0x7c, 0xde, 0x71, 0x6d, 0xfd, 0x15, 0xec, 0x21, 0x28, 0x6f, 0x33, 0xb7, 0x50, /* Byte value: 0x52 */ + 0x58, 0x76, 0x14, 0xee, 0x6b, 0xa7, 0x45, 0x57, 0x4a, 0xfc, 0xad, 0x05, 0xd4, 0x3e, 0xcf, 0x0a, /* Byte value: 0x53 */ + 0x49, 0x51, 0x5e, 0x7f, 0x72, 0x9e, 0x6a, 0x90, 0xb3, 0x85, 0xb1, 0xf6, 0x39, 0x3f, 0xbe, 0x2f, /* Byte value: 0x54 */ + 0xfa, 0x05, 0x5d, 0x88, 0x54, 0xa9, 0xab, 0xb3, 0xe2, 0x90, 0x66, 0x86, 0x2a, 0x65, 0x3e, 0xcf, /* Byte value: 0x55 */ + 0x87, 0xe6, 0x92, 0xcc, 0x7e, 0x1c, 0x1f, 0x0b, 0x93, 0xd8, 0x55, 0xc5, 0x3f, 0xb6, 0x21, 0x49, /* Byte value: 0x56 */ + 0x27, 0x45, 0xe9, 0x1a, 0xe1, 0x7f, 0x83, 0x19, 0xbd, 0x80, 0xea, 0xab, 0x91, 0x68, 0x46, 0x95, /* Byte value: 0x57 */ + 0xe8, 0x9a, 0x3c, 0xf1, 0xbd, 0x2a, 0xcf, 0xf9, 0xde, 0xc7, 0x34, 0x0f, 0xbf, 0x42, 0x92, 0x1e, /* Byte value: 0x58 */ + 0xf4, 0x70, 0xc3, 0x1e, 0xb2, 0x69, 0x36, 0x34, 0xf6, 0x1c, 0xe9, 0x40, 0x59, 0x78, 0x5a, 0x80, /* Byte value: 0x59 */ + 0x5a, 0xa6, 0x26, 0x5e, 0xcb, 0xca, 0x37, 0xa1, 0xcc, 0xc8, 0xd9, 0xe8, 0x84, 0xbb, 0x59, 0x13, /* Byte value: 0x5a */ + 0x66, 0xd2, 0x7f, 0xe0, 0x56, 0x96, 0xe2, 0xd7, 0x53, 0xd5, 0x48, 0x6f, 0x2b, 0x06, 0xe5, 0xde, /* Byte value: 0x5b */ + 0xf0, 0x13, 0xa7, 0xbd, 0x31, 0xb3, 0xd2, 0x1b, 0x39, 0x74, 0x01, 0x59, 0xf9, 0xb1, 0xb5, 0xb2, /* Byte value: 0x5c */ + 0xcb, 0xbc, 0xb1, 0x48, 0xdf, 0x8f, 0xa8, 0xcf, 0xac, 0x2f, 0x36, 0xbd, 0x8e, 0xe3, 0x3b, 0xb9, /* Byte value: 0x5d */ + 0x0e, 0x75, 0x9e, 0x96, 0xe6, 0xc0, 0x9d, 0x87, 0x14, 0x8c, 0x8f, 0xc6, 0x73, 0x1d, 0x64, 0x4f, /* Byte value: 0x5e */ + 0xe2, 0x8c, 0xc6, 0xc4, 0xd8, 0x30, 0xb6, 0x51, 0x05, 0x23, 0x53, 0xd0, 0x6c, 0x96, 0x19, 0x63, /* Byte value: 0x5f */ + 0x57, 0x6b, 0x93, 0x20, 0xdd, 0xb0, 0xe1, 0xab, 0x1d, 0x6a, 0x18, 0x54, 0x8f, 0x80, 0xe0, 0xa8, /* Byte value: 0x60 */ + 0xc4, 0xa1, 0x36, 0x86, 0x69, 0x98, 0x0c, 0x33, 0xfb, 0xb9, 0x83, 0xec, 0xd5, 0x5d, 0x14, 0x1b, /* Byte value: 0x61 */ + 0x9b, 0x0c, 0x6d, 0x23, 0x71, 0x5f, 0xe6, 0xc6, 0xbb, 0x03, 0x88, 0x8a, 0xd9, 0x8c, 0xe9, 0xd7, /* Byte value: 0x62 */ + 0xee, 0x29, 0x6a, 0xe2, 0x9e, 0x9d, 0x59, 0x20, 0x97, 0x9b, 0xa8, 0xfb, 0x4f, 0x0e, 0xeb, 0x35, /* Byte value: 0x63 */ + 0x1a, 0x59, 0xa9, 0xfc, 0x2c, 0xf4, 0x6f, 0x14, 0x61, 0x87, 0x41, 0xbb, 0x16, 0x76, 0xb1, 0xb5, /* Byte value: 0x64 */ + 0x37, 0x0a, 0xba, 0xd3, 0xa8, 0x91, 0x95, 0xa5, 0x07, 0xe3, 0xcc, 0xcf, 0x54, 0xca, 0x7c, 0x5d, /* Byte value: 0x65 */ + 0x2e, 0xeb, 0x38, 0xc7, 0x74, 0xdf, 0xb1, 0x3c, 0xa3, 0x4a, 0xc3, 0x0e, 0x3a, 0x9a, 0x10, 0x1c, /* Byte value: 0x66 */ + 0x69, 0xcf, 0xf8, 0x2e, 0xe0, 0x81, 0x46, 0x2b, 0x04, 0x43, 0xfd, 0x3e, 0x70, 0xb8, 0xca, 0x7c, /* Byte value: 0x67 */ + 0x8b, 0x43, 0x3e, 0xea, 0x38, 0xb1, 0xf0, 0x7a, 0x01, 0x60, 0xae, 0xee, 0x1c, 0x2e, 0xd3, 0x1f, /* Byte value: 0x68 */ + 0xaf, 0xbe, 0xfc, 0x18, 0x29, 0x74, 0x38, 0xee, 0x79, 0xce, 0x0a, 0x3f, 0xf5, 0x60, 0x48, 0x7e, /* Byte value: 0x69 */ + 0xc2, 0x12, 0x60, 0x95, 0x4a, 0x2f, 0x9a, 0xea, 0xb2, 0xe5, 0x1f, 0x18, 0x25, 0x11, 0x6d, 0x30, /* Byte value: 0x6a */ + 0x7f, 0x33, 0xfd, 0xf4, 0x8a, 0xd8, 0xc6, 0x4e, 0xf7, 0x7c, 0x47, 0xae, 0x45, 0x56, 0x89, 0x9f, /* Byte value: 0x6b */ + 0x64, 0x02, 0x4d, 0x50, 0xf6, 0xfb, 0x90, 0x21, 0xd5, 0xe1, 0x3c, 0x82, 0x7b, 0x83, 0x73, 0xc7, /* Byte value: 0x6c */ + 0x45, 0xf4, 0xf2, 0x59, 0x34, 0x33, 0x85, 0xe1, 0x21, 0x3d, 0x4a, 0xdd, 0x1a, 0xa7, 0x4c, 0x79, /* Byte value: 0x6d */ + 0x14, 0x2c, 0x37, 0x6a, 0xca, 0x34, 0xf2, 0x93, 0x75, 0x0b, 0xce, 0x7d, 0x65, 0x6b, 0xd5, 0xfa, /* Byte value: 0x6e */ + 0xfd, 0xde, 0x12, 0xc3, 0x27, 0xc9, 0x04, 0x11, 0xe8, 0xd6, 0xc0, 0xe5, 0xf2, 0x8a, 0x0c, 0x09, /* Byte value: 0x6f */ + 0xac, 0x06, 0xd7, 0xf0, 0xd9, 0xce, 0x73, 0x63, 0xbc, 0xe0, 0x44, 0x45, 0x8d, 0x46, 0x95, 0x8a, /* Byte value: 0x70 */ + 0x86, 0x8e, 0x8b, 0x94, 0x2e, 0xcb, 0x26, 0x70, 0xd0, 0xc2, 0x6f, 0x52, 0x17, 0x15, 0x6a, 0xa4, /* Byte value: 0x71 */ + 0x76, 0x9d, 0x2c, 0x29, 0x1f, 0x78, 0xf4, 0x6b, 0xe9, 0xb6, 0x6e, 0x0b, 0xee, 0xa4, 0xdf, 0x16, /* Byte value: 0x72 */ + 0x43, 0x47, 0xa4, 0x4a, 0x17, 0x84, 0x13, 0x38, 0x68, 0x61, 0xd6, 0x29, 0xea, 0xeb, 0x35, 0x52, /* Byte value: 0x73 */ + 0x50, 0xb0, 0xdc, 0x6b, 0xae, 0xd0, 0x4e, 0x09, 0x17, 0x2c, 0xbe, 0x37, 0x57, 0x6f, 0xd2, 0x6e, /* Byte value: 0x74 */ + 0x28, 0x58, 0x6e, 0xd4, 0x57, 0x68, 0x27, 0xe5, 0xea, 0x16, 0x5f, 0xfa, 0xca, 0xd6, 0x69, 0x37, /* Byte value: 0x75 */ + 0xaa, 0xb5, 0x81, 0xe3, 0xfa, 0x79, 0xe5, 0xba, 0xf5, 0xbc, 0xd8, 0xb1, 0x7d, 0x0a, 0xec, 0xa1, /* Byte value: 0x76 */ + 0x5e, 0xc5, 0x42, 0xfd, 0x48, 0x10, 0xd3, 0x8e, 0x03, 0xa0, 0x31, 0xf1, 0x24, 0x72, 0xb6, 0x21, /* Byte value: 0x77 */ + 0xdd, 0x40, 0xb4, 0x92, 0xb5, 0xd6, 0x28, 0xaa, 0x5f, 0x10, 0x8c, 0x2d, 0xbb, 0x0d, 0x78, 0x5a, /* Byte value: 0x78 */ + 0xbb, 0x92, 0xcb, 0x72, 0xe3, 0x40, 0xca, 0x7d, 0x0c, 0xc5, 0xc4, 0x42, 0x90, 0x0b, 0x9d, 0x84, /* Byte value: 0x79 */ + 0x96, 0xc1, 0xd8, 0x5d, 0x67, 0x25, 0x30, 0xcc, 0x6a, 0xa1, 0x49, 0x36, 0xd2, 0xb7, 0x50, 0x6c, /* Byte value: 0x7a */ + 0x05, 0x0b, 0x7d, 0xfb, 0xd3, 0x0d, 0xdd, 0x54, 0x8c, 0x72, 0xd2, 0x8e, 0x88, 0x6a, 0xa4, 0xdf, /* Byte value: 0x7b */ + 0x7b, 0x50, 0x99, 0x57, 0x09, 0x02, 0x22, 0x61, 0x38, 0x14, 0xaf, 0xb7, 0xe5, 0x9f, 0x66, 0xad, /* Byte value: 0x7c */ + 0xf6, 0xa0, 0xf1, 0xae, 0x12, 0x04, 0x44, 0xc2, 0x70, 0x28, 0x9d, 0xad, 0x09, 0xfd, 0xcc, 0x99, /* Byte value: 0x7d */ + 0x2b, 0xe0, 0x45, 0x3c, 0xa7, 0xd2, 0x6c, 0x68, 0x2f, 0x38, 0x11, 0x80, 0xb2, 0xf0, 0xb4, 0xc3, /* Byte value: 0x7e */ + 0x09, 0xae, 0xd1, 0xdd, 0x95, 0xa0, 0x32, 0x25, 0x1e, 0xca, 0x29, 0xa5, 0xab, 0xf2, 0x56, 0x89, /* Byte value: 0x7f */ + 0xc7, 0x19, 0x1d, 0x6e, 0x99, 0x22, 0x47, 0xbe, 0x3e, 0x97, 0xcd, 0x96, 0xad, 0x7b, 0xc9, 0xef, /* Byte value: 0x80 */ + 0x46, 0x4c, 0xd9, 0xb1, 0xc4, 0x89, 0xce, 0x6c, 0xe4, 0x13, 0x04, 0xa7, 0x62, 0x81, 0x91, 0x8d, /* Byte value: 0x81 */ + 0x0d, 0xcd, 0xb5, 0x7e, 0x16, 0x7a, 0xd6, 0x0a, 0xd1, 0xa2, 0xc1, 0xbc, 0x0b, 0x3b, 0xb9, 0xbb, /* Byte value: 0x82 */ + 0x13, 0xf7, 0x78, 0x21, 0xb9, 0x54, 0x5d, 0x31, 0x7f, 0x4d, 0x68, 0x1e, 0xbd, 0x84, 0xe7, 0x3c, /* Byte value: 0x83 */ + 0x61, 0x09, 0x30, 0xab, 0x25, 0xf6, 0x4d, 0x75, 0x59, 0x93, 0xee, 0x0c, 0xf3, 0xe9, 0xd7, 0x18, /* Byte value: 0x84 */ + 0x01, 0x68, 0x19, 0x58, 0x50, 0xd7, 0x39, 0x7b, 0x43, 0x1a, 0x3a, 0x97, 0x28, 0xa3, 0x4b, 0xed, /* Byte value: 0x85 */ + 0xef, 0x41, 0x73, 0xba, 0xce, 0x4a, 0x60, 0x5b, 0xd4, 0x81, 0x92, 0x6c, 0x67, 0xad, 0xa0, 0xd8, /* Byte value: 0x86 */ + 0x8d, 0xf0, 0x68, 0xf9, 0x1b, 0x06, 0x66, 0xa3, 0x48, 0x3c, 0x32, 0x1a, 0xec, 0x62, 0xaa, 0x34, /* Byte value: 0x87 */ + 0xd3, 0x35, 0x2a, 0x04, 0x53, 0x16, 0xb5, 0x2d, 0x4b, 0x9c, 0x03, 0xeb, 0xc8, 0x10, 0x1c, 0x15, /* Byte value: 0x88 */ + 0xbc, 0x49, 0x84, 0x39, 0x90, 0x20, 0x65, 0xdf, 0x06, 0x83, 0x62, 0x21, 0x48, 0xe4, 0xaf, 0x42, /* Byte value: 0x89 */ + 0xf1, 0x7b, 0xbe, 0xe5, 0x61, 0x64, 0xeb, 0x60, 0x7a, 0x6e, 0x3b, 0xce, 0xd1, 0x12, 0xfe, 0x5f, /* Byte value: 0x8a */ + 0x32, 0x01, 0xc7, 0x28, 0x7b, 0x9c, 0x48, 0xf1, 0x8b, 0x91, 0x1e, 0x41, 0xdc, 0xa0, 0xd8, 0x82, /* Byte value: 0x8b */ + 0x5c, 0x15, 0x70, 0x4d, 0xe8, 0x7d, 0xa1, 0x78, 0x85, 0x94, 0x45, 0x1c, 0x74, 0xf7, 0x20, 0x38, /* Byte value: 0x8c */ + 0x02, 0xd0, 0x32, 0xb0, 0xa0, 0x6d, 0x72, 0xf6, 0x86, 0x34, 0x74, 0xed, 0x50, 0x85, 0x96, 0x19, /* Byte value: 0x8d */ + 0xb1, 0x84, 0x31, 0x47, 0x86, 0x5a, 0xb3, 0xd5, 0xd7, 0x21, 0xa3, 0x9d, 0x43, 0xdf, 0x16, 0xf9, /* Byte value: 0x8e */ + 0x56, 0x03, 0x8a, 0x78, 0x8d, 0x67, 0xd8, 0xd0, 0x5e, 0x70, 0x22, 0xc3, 0xa7, 0x23, 0xab, 0x45, /* Byte value: 0x8f */ + 0x51, 0xd8, 0xc5, 0x33, 0xfe, 0x07, 0x77, 0x72, 0x54, 0x36, 0x84, 0xa0, 0x7f, 0xcc, 0x99, 0x83, /* Byte value: 0x90 */ + 0xc9, 0x6c, 0x83, 0xf8, 0x7f, 0xe2, 0xda, 0x39, 0x2a, 0x1b, 0x42, 0x50, 0xde, 0x66, 0xad, 0xa0, /* Byte value: 0x91 */ + 0xd6, 0x3e, 0x57, 0xff, 0x80, 0x1b, 0x68, 0x79, 0xc7, 0xee, 0xd1, 0x65, 0x40, 0x7a, 0xb8, 0xca, /* Byte value: 0x92 */ + 0x4e, 0x8a, 0x11, 0x34, 0x01, 0xfe, 0xc5, 0x32, 0xb9, 0xc3, 0x17, 0x95, 0xe1, 0xd0, 0x8c, 0xe9, /* Byte value: 0x93 */ + 0xc8, 0x04, 0x9a, 0xa0, 0x2f, 0x35, 0xe3, 0x42, 0x69, 0x01, 0x78, 0xc7, 0xf6, 0xc5, 0xe6, 0x4d, /* Byte value: 0x94 */ + 0xa0, 0xa3, 0x7b, 0xd6, 0x9f, 0x63, 0x9c, 0x12, 0x2e, 0x58, 0xbf, 0x6e, 0xae, 0xde, 0x67, 0xdc, /* Byte value: 0x95 */ + 0x31, 0xb9, 0xec, 0xc0, 0x8b, 0x26, 0x03, 0x7c, 0x4e, 0xbf, 0x50, 0x3b, 0xa4, 0x86, 0x05, 0x76, /* Byte value: 0x96 */ + 0x22, 0x4e, 0x94, 0xe1, 0x32, 0x72, 0x5e, 0x4d, 0x31, 0xf2, 0x38, 0x25, 0x19, 0x02, 0xe2, 0x4a, /* Byte value: 0x97 */ + 0xa5, 0xa8, 0x06, 0x2d, 0x4c, 0x6e, 0x41, 0x46, 0xa2, 0x2a, 0x6d, 0xe0, 0x26, 0xb4, 0xc3, 0x03, /* Byte value: 0x98 */ + 0x17, 0x94, 0x1c, 0x82, 0x3a, 0x8e, 0xb9, 0x1e, 0xb0, 0x25, 0x80, 0x07, 0x1d, 0x4d, 0x08, 0x0e, /* Byte value: 0x99 */ + 0x33, 0x69, 0xde, 0x70, 0x2b, 0x4b, 0x71, 0x8a, 0xc8, 0x8b, 0x24, 0xd6, 0xf4, 0x03, 0x93, 0x6f, /* Byte value: 0x9a */ + 0x94, 0x11, 0xea, 0xed, 0xc7, 0x48, 0x42, 0x3a, 0xec, 0x95, 0x3d, 0xdb, 0x82, 0x32, 0xc6, 0x75, /* Byte value: 0x9b */ + 0xeb, 0x22, 0x17, 0x19, 0x4d, 0x90, 0x84, 0x74, 0x1b, 0xe9, 0x7a, 0x75, 0xc7, 0x64, 0x4f, 0xea, /* Byte value: 0x9c */ + 0x84, 0x5e, 0xb9, 0x24, 0x8e, 0xa6, 0x54, 0x86, 0x56, 0xf6, 0x1b, 0xbf, 0x47, 0x90, 0xfc, 0xbd, /* Byte value: 0x9d */ + 0x08, 0xc6, 0xc8, 0x85, 0xc5, 0x77, 0x0b, 0x5e, 0x5d, 0xd0, 0x13, 0x32, 0x83, 0x51, 0x1d, 0x64, /* Byte value: 0x9e */ + 0x25, 0x95, 0xdb, 0xaa, 0x41, 0x12, 0xf1, 0xef, 0x3b, 0xb4, 0x9e, 0x46, 0xc1, 0xed, 0xd0, 0x8c, /* Byte value: 0x9f */ + 0xf9, 0xbd, 0x76, 0x60, 0xa4, 0x13, 0xe0, 0x3e, 0x27, 0xbe, 0x28, 0xfc, 0x52, 0x43, 0xe3, 0x3b, /* Byte value: 0xa0 */ + 0x39, 0x7f, 0x24, 0x45, 0x4e, 0x51, 0x08, 0x22, 0x13, 0x6f, 0x43, 0x09, 0x27, 0xd7, 0x18, 0x12, /* Byte value: 0xa1 */ + 0x60, 0x61, 0x29, 0xf3, 0x75, 0x21, 0x74, 0x0e, 0x1a, 0x89, 0xd4, 0x9b, 0xdb, 0x4a, 0x9c, 0xf5, /* Byte value: 0xa2 */ + 0xb2, 0x3c, 0x1a, 0xaf, 0x76, 0xe0, 0xf8, 0x58, 0x12, 0x0f, 0xed, 0xe7, 0x3b, 0xf9, 0xcb, 0x0d, /* Byte value: 0xa3 */ + 0xd4, 0xee, 0x65, 0x4f, 0x20, 0x76, 0x1a, 0x8f, 0x41, 0xda, 0xa5, 0x88, 0x10, 0xff, 0x2e, 0xd3, /* Byte value: 0xa4 */ + 0x6f, 0x7c, 0xae, 0x3d, 0xc3, 0x36, 0xd0, 0xf2, 0x4d, 0x1f, 0x61, 0xca, 0x80, 0xf4, 0xb3, 0x57, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x6d, 0xac, 0x9c, 0x8d, 0x63, 0x5b, 0xa2, 0x04, 0xcb, 0x2b, 0x15, 0x27, 0xd0, 0x71, 0x25, 0x4e, /* Byte value: 0xa7 */ + 0xa1, 0xcb, 0x62, 0x8e, 0xcf, 0xb4, 0xa5, 0x69, 0x6d, 0x42, 0x85, 0xf9, 0x86, 0x7d, 0x2c, 0x31, /* Byte value: 0xa8 */ + 0x12, 0x9f, 0x61, 0x79, 0xe9, 0x83, 0x64, 0x4a, 0x3c, 0x57, 0x52, 0x89, 0x95, 0x27, 0xac, 0xd1, /* Byte value: 0xa9 */ + 0xd8, 0x4b, 0xc9, 0x69, 0x66, 0xdb, 0xf5, 0xfe, 0xd3, 0x62, 0x5e, 0xa3, 0x33, 0x67, 0xdc, 0x85, /* Byte value: 0xaa */ + 0xa3, 0x1b, 0x50, 0x3e, 0x6f, 0xd9, 0xd7, 0x9f, 0xeb, 0x76, 0xf1, 0x14, 0xd6, 0xf8, 0xba, 0x28, /* Byte value: 0xab */ + 0xa4, 0xc0, 0x1f, 0x75, 0x1c, 0xb9, 0x78, 0x3d, 0xe1, 0x30, 0x57, 0x77, 0x0e, 0x17, 0x88, 0xee, /* Byte value: 0xac */ + 0xcf, 0xdf, 0xd5, 0xeb, 0x5c, 0x55, 0x4c, 0xe0, 0x63, 0x47, 0xde, 0xa4, 0x2e, 0x2a, 0xd4, 0x8b, /* Byte value: 0xad */ + 0x9a, 0x64, 0x74, 0x7b, 0x21, 0x88, 0xdf, 0xbd, 0xf8, 0x19, 0xb2, 0x1d, 0xf1, 0x2f, 0xa2, 0x3a, /* Byte value: 0xae */ + 0xcc, 0x67, 0xfe, 0x03, 0xac, 0xef, 0x07, 0x6d, 0xa6, 0x69, 0x90, 0xde, 0x56, 0x0c, 0x09, 0x7f, /* Byte value: 0xaf */ + 0x52, 0x60, 0xee, 0xdb, 0x0e, 0xbd, 0x3c, 0xff, 0x91, 0x18, 0xca, 0xda, 0x07, 0xea, 0x44, 0x77, /* Byte value: 0xb0 */ + 0x1c, 0xea, 0xff, 0xef, 0x0f, 0x43, 0xf9, 0xcd, 0x28, 0xdb, 0xdd, 0x4f, 0xe6, 0x3a, 0xc8, 0x9e, /* Byte value: 0xb1 */ + 0x2f, 0x83, 0x21, 0x9f, 0x24, 0x08, 0x88, 0x47, 0xe0, 0x50, 0xf9, 0x99, 0x12, 0x39, 0x5b, 0xf1, /* Byte value: 0xb2 */ + 0x7e, 0x5b, 0xe4, 0xac, 0xda, 0x0f, 0xff, 0x35, 0xb4, 0x66, 0x7d, 0x39, 0x6d, 0xf5, 0xc2, 0x72, /* Byte value: 0xb3 */ + 0x93, 0xca, 0xa5, 0xa6, 0xb4, 0x28, 0xed, 0x98, 0xe6, 0xd3, 0x9b, 0xb8, 0x5a, 0xdd, 0xf4, 0xb3, /* Byte value: 0xb4 */ + 0x42, 0x2f, 0xbd, 0x12, 0x47, 0x53, 0x2a, 0x43, 0x2b, 0x7b, 0xec, 0xbe, 0xc2, 0x48, 0x7e, 0xbf, /* Byte value: 0xb5 */ + 0xb3, 0x54, 0x03, 0xf7, 0x26, 0x37, 0xc1, 0x23, 0x51, 0x15, 0xd7, 0x70, 0x13, 0x5a, 0x80, 0xe0, /* Byte value: 0xb6 */ + 0x18, 0x89, 0x9b, 0x4c, 0x8c, 0x99, 0x1d, 0xe2, 0xe7, 0xb3, 0x35, 0x56, 0x46, 0xf3, 0x27, 0xac, /* Byte value: 0xb7 */ + 0xb8, 0x2a, 0xe0, 0x9a, 0x13, 0xfa, 0x81, 0xf0, 0xc9, 0xeb, 0x8a, 0x38, 0xe8, 0x2d, 0x40, 0x70, /* Byte value: 0xb8 */ + 0xfc, 0xb6, 0x0b, 0x9b, 0x77, 0x1e, 0x3d, 0x6a, 0xab, 0xcc, 0xfa, 0x72, 0xda, 0x29, 0x47, 0xe4, /* Byte value: 0xb9 */ + 0x44, 0x9c, 0xeb, 0x01, 0x64, 0xe4, 0xbc, 0x9a, 0x62, 0x27, 0x70, 0x4a, 0x32, 0x04, 0x07, 0x94, /* Byte value: 0xba */ + 0xe6, 0xef, 0xa2, 0x67, 0x5b, 0xea, 0x52, 0x7e, 0xca, 0x4b, 0xbb, 0xc9, 0xcc, 0x5f, 0xf6, 0x51, /* Byte value: 0xbb */ + 0x8c, 0x98, 0x71, 0xa1, 0x4b, 0xd1, 0x5f, 0xd8, 0x0b, 0x26, 0x08, 0x8d, 0xc4, 0xc1, 0xe1, 0xd9, /* Byte value: 0xbc */ + 0xc6, 0x71, 0x04, 0x36, 0xc9, 0xf5, 0x7e, 0xc5, 0x7d, 0x8d, 0xf7, 0x01, 0x85, 0xd8, 0x82, 0x02, /* Byte value: 0xbd */ + 0x63, 0xd9, 0x02, 0x1b, 0x85, 0x9b, 0x3f, 0x83, 0xdf, 0xa7, 0x9a, 0xe1, 0xa3, 0x6c, 0x41, 0x01, /* Byte value: 0xbe */ + 0xbf, 0xf1, 0xaf, 0xd1, 0x60, 0x9a, 0x2e, 0x52, 0xc3, 0xad, 0x2c, 0x5b, 0x30, 0xc2, 0x72, 0xb6, /* Byte value: 0xbf */ + 0xf2, 0xc3, 0x95, 0x0d, 0x91, 0xde, 0xa0, 0xed, 0xbf, 0x40, 0x75, 0xb4, 0xa9, 0x34, 0x23, 0xab, /* Byte value: 0xc0 */ + 0x2c, 0x3b, 0x0a, 0x77, 0xd4, 0xb2, 0xc3, 0xca, 0x25, 0x7e, 0xb7, 0xe3, 0x6a, 0x1f, 0x86, 0x05, /* Byte value: 0xc1 */ + 0x11, 0x27, 0x4a, 0x91, 0x19, 0x39, 0x2f, 0xc7, 0xf9, 0x79, 0x1c, 0xf3, 0xed, 0x01, 0x71, 0x25, /* Byte value: 0xc2 */ + 0x73, 0x96, 0x51, 0xd2, 0xcc, 0x75, 0x29, 0x3f, 0x65, 0xc4, 0xbc, 0x85, 0x66, 0xce, 0x7b, 0xc9, /* Byte value: 0xc3 */ + 0xdc, 0x28, 0xad, 0xca, 0xe5, 0x01, 0x11, 0xd1, 0x1c, 0x0a, 0xb6, 0xba, 0x93, 0xae, 0x33, 0xb7, /* Byte value: 0xc4 */ + 0xd9, 0x23, 0xd0, 0x31, 0x36, 0x0c, 0xcc, 0x85, 0x90, 0x78, 0x64, 0x34, 0x1b, 0xc4, 0x97, 0x68, /* Byte value: 0xc5 */ + 0x92, 0xa2, 0xbc, 0xfe, 0xe4, 0xff, 0xd4, 0xe3, 0xa5, 0xc9, 0xa1, 0x2f, 0x72, 0x7e, 0xbf, 0x5e, /* Byte value: 0xc6 */ + 0x3e, 0xa4, 0x6b, 0x0e, 0x3d, 0x31, 0xa7, 0x80, 0x19, 0x29, 0xe5, 0x6a, 0xff, 0x38, 0x2a, 0xd4, /* Byte value: 0xc7 */ + 0xd2, 0x5d, 0x33, 0x5c, 0x03, 0xc1, 0x8c, 0x56, 0x08, 0x86, 0x39, 0x7c, 0xe0, 0xb3, 0x57, 0xf8, /* Byte value: 0xc8 */ + 0x59, 0x1e, 0x0d, 0xb6, 0x3b, 0x70, 0x7c, 0x2c, 0x09, 0xe6, 0x97, 0x92, 0xfc, 0x9d, 0x84, 0xe7, /* Byte value: 0xc9 */ + 0x75, 0x25, 0x07, 0xc1, 0xef, 0xc2, 0xbf, 0xe6, 0x2c, 0x98, 0x20, 0x71, 0x96, 0x82, 0x02, 0xe2, /* Byte value: 0xca */ + 0x19, 0xe1, 0x82, 0x14, 0xdc, 0x4e, 0x24, 0x99, 0xa4, 0xa9, 0x0f, 0xc1, 0x6e, 0x50, 0x6c, 0x41, /* Byte value: 0xcb */ + 0xb4, 0x8f, 0x4c, 0xbc, 0x55, 0x57, 0x6e, 0x81, 0x5b, 0x53, 0x71, 0x13, 0xcb, 0xb5, 0xb2, 0x26, /* Byte value: 0xcc */ + 0x81, 0x55, 0xc4, 0xdf, 0x5d, 0xab, 0x89, 0xd2, 0xda, 0x84, 0xc9, 0x31, 0xcf, 0xfa, 0x58, 0x62, /* Byte value: 0xcd */ + 0xe4, 0x3f, 0x90, 0xd7, 0xfb, 0x87, 0x20, 0x88, 0x4c, 0x7f, 0xcf, 0x24, 0x9c, 0xda, 0x60, 0x48, /* Byte value: 0xce */ + 0xe5, 0x57, 0x89, 0x8f, 0xab, 0x50, 0x19, 0xf3, 0x0f, 0x65, 0xf5, 0xb3, 0xb4, 0x79, 0x2b, 0xa5, /* Byte value: 0xcf */ + 0x0f, 0x1d, 0x87, 0xce, 0xb6, 0x17, 0xa4, 0xfc, 0x57, 0x96, 0xb5, 0x51, 0x5b, 0xbe, 0x2f, 0xa2, /* Byte value: 0xd0 */ + 0x47, 0x24, 0xc0, 0xe9, 0x94, 0x5e, 0xf7, 0x17, 0xa7, 0x09, 0x3e, 0x30, 0x4a, 0x22, 0xda, 0x60, /* Byte value: 0xd1 */ + 0x9c, 0xd7, 0x22, 0x68, 0x02, 0x3f, 0x49, 0x64, 0xb1, 0x45, 0x2e, 0xe9, 0x01, 0x63, 0xdb, 0x11, /* Byte value: 0xd2 */ + 0x2a, 0x88, 0x5c, 0x64, 0xf7, 0x05, 0x55, 0x13, 0x6c, 0x22, 0x2b, 0x17, 0x9a, 0x53, 0xff, 0x2e, /* Byte value: 0xd3 */ + 0xa8, 0x65, 0xb3, 0x53, 0x5a, 0x14, 0x97, 0x4c, 0x73, 0x88, 0xac, 0x5c, 0x2d, 0x8f, 0x7a, 0xb8, /* Byte value: 0xd4 */ + 0x5b, 0xce, 0x3f, 0x06, 0x9b, 0x1d, 0x0e, 0xda, 0x8f, 0xd2, 0xe3, 0x7f, 0xac, 0x18, 0x12, 0xfe, /* Byte value: 0xd5 */ + 0x8f, 0x20, 0x5a, 0x49, 0xbb, 0x6b, 0x14, 0x55, 0xce, 0x08, 0x46, 0xf7, 0xbc, 0xe7, 0x3c, 0x2d, /* Byte value: 0xd6 */ + 0x04, 0x63, 0x64, 0xa3, 0x83, 0xda, 0xe4, 0x2f, 0xcf, 0x68, 0xe8, 0x19, 0xa0, 0xc9, 0xef, 0x32, /* Byte value: 0xd7 */ + 0xa6, 0x10, 0x2d, 0xc5, 0xbc, 0xd4, 0x0a, 0xcb, 0x67, 0x04, 0x23, 0x9a, 0x5e, 0x92, 0x1e, 0xf7, /* Byte value: 0xd8 */ + 0x72, 0xfe, 0x48, 0x8a, 0x9c, 0xa2, 0x10, 0x44, 0x26, 0xde, 0x86, 0x12, 0x4e, 0x6d, 0x30, 0x24, /* Byte value: 0xd9 */ + 0xba, 0xfa, 0xd2, 0x2a, 0xb3, 0x97, 0xf3, 0x06, 0x4f, 0xdf, 0xfe, 0xd5, 0xb8, 0xa8, 0xd6, 0x69, /* Byte value: 0xda */ + 0x30, 0xd1, 0xf5, 0x98, 0xdb, 0xf1, 0x3a, 0x07, 0x0d, 0xa5, 0x6a, 0xac, 0x8c, 0x25, 0x4e, 0x9b, /* Byte value: 0xdb */ + 0x4c, 0x5a, 0x23, 0x84, 0xa1, 0x93, 0xb7, 0xc4, 0x3f, 0xf7, 0x63, 0x78, 0xb1, 0x55, 0x1a, 0xf0, /* Byte value: 0xdc */ + 0x82, 0xed, 0xef, 0x37, 0xad, 0x11, 0xc2, 0x5f, 0x1f, 0xaa, 0x87, 0x4b, 0xb7, 0xdc, 0x85, 0x96, /* Byte value: 0xdd */ + 0x6a, 0x77, 0xd3, 0xc6, 0x10, 0x3b, 0x0d, 0xa6, 0xc1, 0x6d, 0xb3, 0x44, 0x08, 0x9e, 0x17, 0x88, /* Byte value: 0xde */ + 0x88, 0xfb, 0x15, 0x02, 0xc8, 0x0b, 0xbb, 0xf7, 0xc4, 0x4e, 0xe0, 0x94, 0x64, 0x08, 0x0e, 0xeb, /* Byte value: 0xdf */ + 0x3c, 0x74, 0x59, 0xbe, 0x9d, 0x5c, 0xd5, 0x76, 0x9f, 0x1d, 0x91, 0x87, 0xaf, 0xbd, 0xbc, 0xcd, /* Byte value: 0xe0 */ + 0x6e, 0x14, 0xb7, 0x65, 0x93, 0xe1, 0xe9, 0x89, 0x0e, 0x05, 0x5b, 0x5d, 0xa8, 0x57, 0xf8, 0xba, /* Byte value: 0xe1 */ + 0x0b, 0x7e, 0xe3, 0x6d, 0x35, 0xcd, 0x40, 0xd3, 0x98, 0xfe, 0x5d, 0x48, 0xfb, 0x77, 0xc0, 0x90, /* Byte value: 0xe2 */ + 0x9e, 0x07, 0x10, 0xd8, 0xa2, 0x52, 0x3b, 0x92, 0x37, 0x71, 0x5a, 0x04, 0x51, 0xe6, 0x4d, 0x08, /* Byte value: 0xe3 */ + 0x68, 0xa7, 0xe1, 0x76, 0xb0, 0x56, 0x7f, 0x50, 0x47, 0x59, 0xc7, 0xa9, 0x58, 0x1b, 0x81, 0x91, /* Byte value: 0xe4 */ + 0x67, 0xba, 0x66, 0xb8, 0x06, 0x41, 0xdb, 0xac, 0x10, 0xcf, 0x72, 0xf8, 0x03, 0xa5, 0xae, 0x33, /* Byte value: 0xe5 */ + 0xc5, 0xc9, 0x2f, 0xde, 0x39, 0x4f, 0x35, 0x48, 0xb8, 0xa3, 0xb9, 0x7b, 0xfd, 0xfe, 0x5f, 0xf6, /* Byte value: 0xe6 */ + 0x74, 0x4d, 0x1e, 0x99, 0xbf, 0x15, 0x86, 0x9d, 0x6f, 0x82, 0x1a, 0xe6, 0xbe, 0x21, 0x49, 0x0f, /* Byte value: 0xe7 */ + 0x40, 0xff, 0x8f, 0xa2, 0xe7, 0x3e, 0x58, 0xb5, 0xad, 0x4f, 0x98, 0x53, 0x92, 0xcd, 0xe8, 0xa6, /* Byte value: 0xe8 */ + 0x0c, 0xa5, 0xac, 0x26, 0x46, 0xad, 0xef, 0x71, 0x92, 0xb8, 0xfb, 0x2b, 0x23, 0x98, 0xf2, 0x56, /* Byte value: 0xe9 */ + 0xe7, 0x87, 0xbb, 0x3f, 0x0b, 0x3d, 0x6b, 0x05, 0x89, 0x51, 0x81, 0x5e, 0xe4, 0xfc, 0xbd, 0xbc, /* Byte value: 0xea */ + 0x9d, 0xbf, 0x3b, 0x30, 0x52, 0xe8, 0x70, 0x1f, 0xf2, 0x5f, 0x14, 0x7e, 0x29, 0xc0, 0x90, 0xfc, /* Byte value: 0xeb */ + 0x90, 0x72, 0x8e, 0x4e, 0x44, 0x92, 0xa6, 0x15, 0x23, 0xfd, 0xd5, 0xc2, 0x22, 0xfb, 0x29, 0x47, /* Byte value: 0xec */ + 0x7a, 0x38, 0x80, 0x0f, 0x59, 0xd5, 0x1b, 0x1a, 0x7b, 0x0e, 0x95, 0x20, 0xcd, 0x3c, 0x2d, 0x40, /* Byte value: 0xed */ + 0x3a, 0xc7, 0x0f, 0xad, 0xbe, 0xeb, 0x43, 0xaf, 0xd6, 0x41, 0x0d, 0x73, 0x5f, 0xf1, 0xc5, 0xe6, /* Byte value: 0xee */ + 0x35, 0xda, 0x88, 0x63, 0x08, 0xfc, 0xe7, 0x53, 0x81, 0xd7, 0xb8, 0x22, 0x04, 0x4f, 0xea, 0x44, /* Byte value: 0xef */ + 0x34, 0xb2, 0x91, 0x3b, 0x58, 0x2b, 0xde, 0x28, 0xc2, 0xcd, 0x82, 0xb5, 0x2c, 0xec, 0xa1, 0xa9, /* Byte value: 0xf0 */ + 0x9f, 0x6f, 0x09, 0x80, 0xf2, 0x85, 0x02, 0xe9, 0x74, 0x6b, 0x60, 0x93, 0x79, 0x45, 0x06, 0xe5, /* Byte value: 0xf1 */ + 0xb7, 0x37, 0x67, 0x54, 0xa5, 0xed, 0x25, 0x0c, 0x9e, 0x7d, 0x3f, 0x69, 0xb3, 0x93, 0x6f, 0xd2, /* Byte value: 0xf2 */ + 0xf8, 0xd5, 0x6f, 0x38, 0xf4, 0xc4, 0xd9, 0x45, 0x64, 0xa4, 0x12, 0x6b, 0x7a, 0xe0, 0xa8, 0xd6, /* Byte value: 0xf3 */ + 0x4f, 0xe2, 0x08, 0x6c, 0x51, 0x29, 0xfc, 0x49, 0xfa, 0xd9, 0x2d, 0x02, 0xc9, 0x73, 0xc7, 0x04, /* Byte value: 0xf4 */ + 0x6b, 0x1f, 0xca, 0x9e, 0x40, 0xec, 0x34, 0xdd, 0x82, 0x77, 0x89, 0xd3, 0x20, 0x3d, 0x5c, 0x65, /* Byte value: 0xf5 */ + 0x83, 0x85, 0xf6, 0x6f, 0xfd, 0xc6, 0xfb, 0x24, 0x5c, 0xb0, 0xbd, 0xdc, 0x9f, 0x7f, 0xce, 0x7b, /* Byte value: 0xf6 */ + 0x5f, 0xad, 0x5b, 0xa5, 0x18, 0xc7, 0xea, 0xf5, 0x40, 0xba, 0x0b, 0x66, 0x0c, 0xd1, 0xfd, 0xcc, /* Byte value: 0xf7 */ + 0xa7, 0x78, 0x34, 0x9d, 0xec, 0x03, 0x33, 0xb0, 0x24, 0x1e, 0x19, 0x0d, 0x76, 0x31, 0x55, 0x1a, /* Byte value: 0xf8 */ + 0x1e, 0x3a, 0xcd, 0x5f, 0xaf, 0x2e, 0x8b, 0x3b, 0xae, 0xef, 0xa9, 0xa2, 0xb6, 0xbf, 0x5e, 0x87, /* Byte value: 0xf9 */ + 0x10, 0x4f, 0x53, 0xc9, 0x49, 0xee, 0x16, 0xbc, 0xba, 0x63, 0x26, 0x64, 0xc5, 0xa2, 0x3a, 0xc8, /* Byte value: 0xfa */ + 0xc3, 0x7a, 0x79, 0xcd, 0x1a, 0xf8, 0xa3, 0x91, 0xf1, 0xff, 0x25, 0x8f, 0x0d, 0xb2, 0x26, 0xdd, /* Byte value: 0xfb */ + 0x78, 0xe8, 0xb2, 0xbf, 0xf9, 0xb8, 0x69, 0xec, 0xfd, 0x3a, 0xe1, 0xcd, 0x9d, 0xb9, 0xbb, 0x59, /* Byte value: 0xfc */ + 0x2d, 0x53, 0x13, 0x2f, 0x84, 0x65, 0xfa, 0xb1, 0x66, 0x64, 0x8d, 0x74, 0x42, 0xbc, 0xcd, 0xe8, /* Byte value: 0xfd */ + 0x77, 0xf5, 0x35, 0x71, 0x4f, 0xaf, 0xcd, 0x10, 0xaa, 0xac, 0x54, 0x9c, 0xc6, 0x07, 0x94, 0xfb, /* Byte value: 0xfe */ + 0xe3, 0xe4, 0xdf, 0x9c, 0x88, 0xe7, 0x8f, 0x2a, 0x46, 0x39, 0x69, 0x47, 0x44, 0x35, 0x52, 0x8e, /* Byte value: 0xff */ + 0x80, 0x3d, 0xdd, 0x87, 0x0d, 0x7c, 0xb0, 0xa9, 0x99, 0x9e, 0xf3, 0xa6, 0xe7, 0x59, 0x13, 0x8f, /* Byte value: 0x00 */ + + /* Matrix row: 6 */ + 0xa2, 0xc8, 0x81, 0xe2, 0x3b, 0xb3, 0xc2, 0x65, 0xc5, 0x23, 0x88, 0xa8, 0x4b, 0xa0, 0x07, 0xfc, /* Byte value: 0x01 */ + 0x7e, 0x5e, 0xba, 0x73, 0x1f, 0x4c, 0x94, 0x8f, 0x72, 0xc4, 0x53, 0xb4, 0x67, 0xfd, 0xe6, 0xee, /* Byte value: 0x02 */ + 0x65, 0xcf, 0x9b, 0x0b, 0x79, 0xd8, 0x3c, 0xc1, 0x2a, 0xfe, 0xa1, 0x96, 0xda, 0xeb, 0x16, 0xdd, /* Byte value: 0x03 */ + 0x09, 0xce, 0x1f, 0x28, 0x22, 0xcd, 0xd9, 0x3a, 0x89, 0x16, 0xef, 0x1e, 0x6b, 0xb3, 0x50, 0x11, /* Byte value: 0x04 */ + 0xb9, 0x59, 0xa0, 0x9a, 0x5d, 0x27, 0x6a, 0x2b, 0x9d, 0x19, 0x7a, 0x8a, 0xf6, 0xb6, 0xf7, 0xcf, /* Byte value: 0x05 */ + 0xaa, 0x23, 0xa2, 0x8f, 0xdc, 0xda, 0x7c, 0x18, 0xa1, 0x08, 0x06, 0xf5, 0x92, 0xb9, 0xdd, 0x6e, /* Byte value: 0x06 */ + 0x3c, 0x40, 0x19, 0x17, 0x62, 0x09, 0xe3, 0x6f, 0xcd, 0x25, 0x6b, 0x9f, 0xc7, 0xa2, 0x2e, 0x31, /* Byte value: 0x07 */ + 0x92, 0xf7, 0x4b, 0x4f, 0x2c, 0x06, 0xc0, 0xa8, 0x5e, 0xd9, 0x2a, 0xa5, 0xd8, 0xf6, 0x9e, 0x16, /* Byte value: 0x08 */ + 0x39, 0xf1, 0xd5, 0x85, 0x35, 0x78, 0xdb, 0xf7, 0x12, 0xec, 0x4d, 0x13, 0xf8, 0xe5, 0xc9, 0xfb, /* Byte value: 0x09 */ + 0xf0, 0xc3, 0x64, 0x5c, 0x4b, 0x24, 0x0a, 0x7f, 0xb2, 0x94, 0x6f, 0x39, 0x9a, 0xcd, 0xb8, 0xc4, /* Byte value: 0x0a */ + 0xcb, 0x78, 0xc9, 0x53, 0x37, 0xd7, 0x1f, 0x06, 0xb9, 0x02, 0xe0, 0xac, 0xc5, 0xbf, 0xa6, 0xfa, /* Byte value: 0x0b */ + 0xfe, 0xf6, 0xcf, 0x6c, 0x77, 0x13, 0x25, 0x53, 0xfd, 0x31, 0x64, 0x2d, 0x69, 0xae, 0xd8, 0xda, /* Byte value: 0x0c */ + 0xe0, 0xd6, 0x22, 0x86, 0x46, 0xf6, 0xb5, 0x85, 0x7a, 0xc2, 0xb0, 0x83, 0xeb, 0xff, 0xcf, 0x23, /* Byte value: 0x0d */ + 0x02, 0x4a, 0x78, 0x8a, 0x49, 0x8b, 0xce, 0x8e, 0x19, 0x7a, 0xc2, 0x86, 0xa7, 0x97, 0xd7, 0xc5, /* Byte value: 0x0e */ + 0x4e, 0x61, 0x70, 0xde, 0x08, 0xf9, 0x96, 0x42, 0xe9, 0x3e, 0xf1, 0xb9, 0xf4, 0xab, 0x7f, 0x04, /* Byte value: 0x0f */ + 0x4a, 0xf5, 0x80, 0x09, 0x9a, 0x2c, 0xc9, 0x9d, 0xdb, 0xca, 0xb6, 0x76, 0x79, 0x46, 0x12, 0x4d, /* Byte value: 0x10 */ + 0xe5, 0x67, 0xee, 0x14, 0x11, 0x87, 0x8d, 0x1d, 0xa5, 0x0b, 0x96, 0x0f, 0xd4, 0xb8, 0x28, 0xe9, /* Byte value: 0x11 */ + 0x3f, 0x2f, 0x5d, 0xd8, 0xee, 0x26, 0x4a, 0xa6, 0x39, 0x62, 0xc8, 0x5a, 0xd2, 0x9f, 0x73, 0x77, /* Byte value: 0x12 */ + 0x70, 0x6b, 0x11, 0x43, 0x23, 0x7b, 0xbb, 0xa3, 0x3d, 0x61, 0x58, 0xa0, 0x94, 0x9e, 0x86, 0xf0, /* Byte value: 0x13 */ + 0x0c, 0x7f, 0xd3, 0xba, 0x75, 0xbc, 0xe1, 0xa2, 0x56, 0xdf, 0xc9, 0x92, 0x54, 0xf4, 0xb7, 0xdb, /* Byte value: 0x14 */ + 0xfa, 0x62, 0x3f, 0xbb, 0xe5, 0xc6, 0x7a, 0x8c, 0xcf, 0xc5, 0x23, 0xe2, 0xe4, 0x43, 0xb5, 0x93, /* Byte value: 0x15 */ + 0xc0, 0xfc, 0xae, 0xf1, 0x5c, 0x91, 0x08, 0xb2, 0x29, 0x6e, 0xcd, 0x34, 0x09, 0x9b, 0x21, 0x2e, /* Byte value: 0x16 */ + 0x41, 0x71, 0xe7, 0xab, 0xf1, 0x6a, 0xde, 0x29, 0x4b, 0xa6, 0x9b, 0xee, 0xb5, 0x62, 0x95, 0x99, /* Byte value: 0x17 */ + 0xa1, 0xa7, 0xc5, 0x2d, 0xb7, 0x9c, 0x6b, 0xac, 0x31, 0x64, 0x2b, 0x6d, 0x5e, 0x9d, 0x5a, 0xba, /* Byte value: 0x18 */ + 0x60, 0x7e, 0x57, 0x99, 0x2e, 0xa9, 0x04, 0x59, 0xf5, 0x37, 0x87, 0x1a, 0xe5, 0xac, 0xf1, 0x17, /* Byte value: 0x19 */ + 0xa7, 0x79, 0x4d, 0x70, 0x6c, 0xc2, 0xfa, 0xfd, 0x1a, 0xea, 0xae, 0x24, 0x74, 0xe7, 0xe0, 0x36, /* Byte value: 0x1a */ + 0x82, 0xe2, 0x0d, 0x95, 0x21, 0xd4, 0x7f, 0x52, 0x96, 0x8f, 0xf5, 0x1f, 0xa9, 0xc4, 0xe9, 0xf1, /* Byte value: 0x1b */ + 0x53, 0x2e, 0xd9, 0xfb, 0xb5, 0x33, 0xaf, 0x5d, 0x9a, 0x8a, 0x86, 0xd2, 0x63, 0xc7, 0x35, 0xbb, /* Byte value: 0x1c */ + 0xb5, 0x26, 0x73, 0x20, 0x28, 0x9b, 0x8b, 0x89, 0xcb, 0xc6, 0xb3, 0x18, 0xa2, 0x42, 0x40, 0x14, /* Byte value: 0x1d */ + 0x9e, 0x88, 0x98, 0xf5, 0x59, 0xba, 0x21, 0x0a, 0x08, 0x06, 0xe3, 0x37, 0x8c, 0x02, 0x29, 0xcd, /* Byte value: 0x1e */ + 0x96, 0x63, 0xbb, 0x98, 0xbe, 0xd3, 0x9f, 0x77, 0x6c, 0x2d, 0x6d, 0x6a, 0x55, 0x1b, 0xf3, 0x5f, /* Byte value: 0x1f */ + 0x4c, 0x2b, 0x08, 0x54, 0x41, 0x72, 0x58, 0xcc, 0xf0, 0x44, 0x33, 0x3f, 0x53, 0x3c, 0xa8, 0xc1, /* Byte value: 0x20 */ + 0x1e, 0x20, 0xed, 0xea, 0x31, 0xe5, 0x90, 0xd6, 0x87, 0xf3, 0xd4, 0xae, 0x82, 0x51, 0x17, 0xf9, /* Byte value: 0x21 */ + 0x67, 0x85, 0xe3, 0x81, 0x30, 0x53, 0xf2, 0x4f, 0x33, 0x84, 0x63, 0x10, 0x7d, 0x7c, 0xc1, 0x18, /* Byte value: 0x22 */ + 0xe3, 0xb9, 0x66, 0x49, 0xca, 0xd9, 0x1c, 0x4c, 0x8e, 0x85, 0x13, 0x46, 0xfe, 0xc2, 0x92, 0x65, /* Byte value: 0x23 */ + 0x2a, 0x8b, 0xd7, 0x90, 0xb4, 0x85, 0xcd, 0xc4, 0x2e, 0xfd, 0x31, 0x6c, 0x9c, 0xea, 0xe3, 0x5a, /* Byte value: 0x24 */ + 0xac, 0xfd, 0x2a, 0xd2, 0x07, 0x84, 0xed, 0x49, 0x8a, 0x86, 0x83, 0xbc, 0xb8, 0xc3, 0x67, 0xe2, /* Byte value: 0x25 */ + 0x43, 0x3b, 0x9f, 0x21, 0xb8, 0xe1, 0x10, 0xa7, 0x52, 0xdc, 0x59, 0x68, 0x12, 0xf5, 0x42, 0x5c, /* Byte value: 0x26 */ + 0x8c, 0xd7, 0xa6, 0xa5, 0x1d, 0xe3, 0x50, 0x7e, 0xd9, 0x2a, 0xfe, 0x0b, 0x5a, 0xa7, 0x89, 0xef, /* Byte value: 0x27 */ + 0xc7, 0x07, 0x1a, 0xe9, 0x42, 0x6b, 0xfe, 0xa4, 0xef, 0xdd, 0x29, 0x3e, 0x91, 0x4b, 0x11, 0x21, /* Byte value: 0x28 */ + 0x26, 0xf4, 0x04, 0x2a, 0xc1, 0x39, 0x2c, 0x66, 0x78, 0x22, 0xf8, 0xfe, 0xc8, 0x1e, 0x54, 0x81, /* Byte value: 0x29 */ + 0x29, 0xe4, 0x93, 0x5f, 0x38, 0xaa, 0x64, 0x0d, 0xda, 0xba, 0x92, 0xa9, 0x89, 0xd7, 0xbe, 0x1c, /* Byte value: 0x2a */ + 0x1c, 0x6a, 0x95, 0x60, 0x78, 0x6e, 0x5e, 0x58, 0x9e, 0x89, 0x16, 0x28, 0x25, 0xc6, 0xc0, 0x3c, /* Byte value: 0x2b */ + 0x4d, 0x0e, 0x34, 0x11, 0x84, 0xd6, 0x3f, 0x8b, 0x1d, 0x79, 0x52, 0x7c, 0xe1, 0x96, 0x22, 0x42, /* Byte value: 0x2c */ + 0x9d, 0xe7, 0xdc, 0x3a, 0xd5, 0x95, 0x88, 0xc3, 0xfc, 0x41, 0x40, 0xf2, 0x99, 0x3f, 0x74, 0x8b, /* Byte value: 0x2d */ + 0xf2, 0x89, 0x1c, 0xd6, 0x02, 0xaf, 0xc4, 0xf1, 0xab, 0xee, 0xad, 0xbf, 0x3d, 0x5a, 0x6f, 0x01, /* Byte value: 0x2e */ + 0x21, 0x0f, 0xb0, 0x32, 0xdf, 0xc3, 0xda, 0x70, 0xbe, 0x91, 0x1c, 0xf4, 0x50, 0xce, 0x64, 0x8e, /* Byte value: 0x2f */ + 0x6d, 0x24, 0xb8, 0x66, 0x9e, 0xb1, 0x82, 0xbc, 0x4e, 0xd5, 0x2f, 0xcb, 0x03, 0xf2, 0xcc, 0x4f, /* Byte value: 0x30 */ + 0xbc, 0xe8, 0x6c, 0x08, 0x0a, 0x56, 0x52, 0xb3, 0x42, 0xd0, 0x5c, 0x06, 0xc9, 0xf1, 0x10, 0x05, /* Byte value: 0x31 */ + 0x9a, 0x1c, 0x68, 0x22, 0xcb, 0x6f, 0x7e, 0xd5, 0x3a, 0xf2, 0xa4, 0xf8, 0x01, 0xef, 0x44, 0x84, /* Byte value: 0x32 */ + 0x27, 0xd1, 0x38, 0x6f, 0x04, 0x9d, 0x4b, 0x21, 0x95, 0x1f, 0x99, 0xbd, 0x7a, 0xb4, 0xde, 0x02, /* Byte value: 0x33 */ + 0x14, 0x81, 0xb6, 0x0d, 0x9f, 0x07, 0xe0, 0x25, 0xfa, 0xa2, 0x98, 0x75, 0xfc, 0xdf, 0x1a, 0xae, /* Byte value: 0x34 */ + 0x5e, 0x74, 0x36, 0x04, 0x05, 0x2b, 0x29, 0xb8, 0x21, 0x68, 0x2e, 0x03, 0x85, 0x99, 0x08, 0xe3, /* Byte value: 0x35 */ + 0xe4, 0x42, 0xd2, 0x51, 0xd4, 0x23, 0xea, 0x5a, 0x48, 0x36, 0xf7, 0x4c, 0x66, 0x12, 0xa2, 0x6a, /* Byte value: 0x36 */ + 0xd3, 0x86, 0xac, 0xe4, 0xdd, 0x6c, 0x1e, 0x81, 0x15, 0x7f, 0xb1, 0x4b, 0x6d, 0x94, 0x0b, 0x8f, /* Byte value: 0x37 */ + 0xe1, 0xf3, 0x1e, 0xc3, 0x83, 0x52, 0xd2, 0xc2, 0x97, 0xff, 0xd1, 0xc0, 0x59, 0x55, 0x45, 0xa0, /* Byte value: 0x38 */ + 0x69, 0xb0, 0x48, 0xb1, 0x0c, 0x64, 0xdd, 0x63, 0x7c, 0x21, 0x68, 0x04, 0x8e, 0x1f, 0xa1, 0x06, /* Byte value: 0x39 */ + 0x49, 0x9a, 0xc4, 0xc6, 0x16, 0x03, 0x60, 0x54, 0x2f, 0x8d, 0x15, 0xb3, 0x6c, 0x7b, 0x4f, 0x0b, /* Byte value: 0x3a */ + 0xab, 0x06, 0x9e, 0xca, 0x19, 0x7e, 0x1b, 0x5f, 0x4c, 0x35, 0x67, 0xb6, 0x20, 0x13, 0x57, 0xed, /* Byte value: 0x3b */ + 0xb3, 0xf8, 0xfb, 0x7d, 0xf3, 0xc5, 0x1a, 0xd8, 0xe0, 0x48, 0x36, 0x51, 0x88, 0x38, 0xfa, 0x98, /* Byte value: 0x3c */ + 0xa3, 0xed, 0xbd, 0xa7, 0xfe, 0x17, 0xa5, 0x22, 0x28, 0x1e, 0xe9, 0xeb, 0xf9, 0x0a, 0x8d, 0x7f, /* Byte value: 0x3d */ + 0x0b, 0x84, 0x67, 0xa2, 0x6b, 0x46, 0x17, 0xb4, 0x90, 0x6c, 0x2d, 0x98, 0xcc, 0x24, 0x87, 0xd4, /* Byte value: 0x3e */ + 0x90, 0xbd, 0x33, 0xc5, 0x65, 0x8d, 0x0e, 0x26, 0x47, 0xa3, 0xe8, 0x23, 0x7f, 0x61, 0x49, 0xd3, /* Byte value: 0x3f */ + 0xfc, 0xbc, 0xb7, 0xe6, 0x3e, 0x98, 0xeb, 0xdd, 0xe4, 0x4b, 0xa6, 0xab, 0xce, 0x39, 0x0f, 0x1f, /* Byte value: 0x40 */ + 0xc2, 0xb6, 0xd6, 0x7b, 0x15, 0x1a, 0xc6, 0x3c, 0x30, 0x14, 0x0f, 0xb2, 0xae, 0x0c, 0xf6, 0xeb, /* Byte value: 0x41 */ + 0x80, 0xa8, 0x75, 0x1f, 0x68, 0x5f, 0xb1, 0xdc, 0x8f, 0xf5, 0x37, 0x99, 0x0e, 0x53, 0x3e, 0x34, /* Byte value: 0x42 */ + 0xe7, 0x2d, 0x96, 0x9e, 0x58, 0x0c, 0x43, 0x93, 0xbc, 0x71, 0x54, 0x89, 0x73, 0x2f, 0xff, 0x2c, /* Byte value: 0x43 */ + 0x63, 0x11, 0x13, 0x56, 0xa2, 0x86, 0xad, 0x90, 0x01, 0x70, 0x24, 0xdf, 0xf0, 0x91, 0xac, 0x51, /* Byte value: 0x44 */ + 0x30, 0x3f, 0xca, 0xad, 0x17, 0xb5, 0x02, 0xcd, 0x9b, 0xfa, 0xa2, 0x0d, 0x93, 0x56, 0x99, 0xea, /* Byte value: 0x45 */ + 0x22, 0x60, 0xf4, 0xfd, 0x53, 0xec, 0x73, 0xb9, 0x4a, 0xd6, 0xbf, 0x31, 0x45, 0xf3, 0x39, 0xc8, /* Byte value: 0x46 */ + 0xf6, 0x1d, 0xec, 0x01, 0x90, 0x7a, 0x9b, 0x2e, 0x99, 0x1a, 0xea, 0x70, 0xb0, 0xb7, 0x02, 0x48, /* Byte value: 0x47 */ + 0xa8, 0x69, 0xda, 0x05, 0x95, 0x51, 0xb2, 0x96, 0xb8, 0x72, 0xc4, 0x73, 0x35, 0x2e, 0x0a, 0xab, /* Byte value: 0x48 */ + 0x57, 0xba, 0x29, 0x2c, 0x27, 0xe6, 0xf0, 0x82, 0xa8, 0x7e, 0xc1, 0x1d, 0xee, 0x2a, 0x58, 0xf2, /* Byte value: 0x49 */ + 0x8e, 0x9d, 0xde, 0x2f, 0x54, 0x68, 0x9e, 0xf0, 0xc0, 0x50, 0x3c, 0x8d, 0xfd, 0x30, 0x5e, 0x2a, /* Byte value: 0x4a */ + 0xc3, 0x93, 0xea, 0x3e, 0xd0, 0xbe, 0xa1, 0x7b, 0xdd, 0x29, 0x6e, 0xf1, 0x1c, 0xa6, 0x7c, 0x68, /* Byte value: 0x4b */ + 0xc6, 0x22, 0x26, 0xac, 0x87, 0xcf, 0x99, 0xe3, 0x02, 0xe0, 0x48, 0x7d, 0x23, 0xe1, 0x9b, 0xa2, /* Byte value: 0x4c */ + 0x50, 0x41, 0x9d, 0x34, 0x39, 0x1c, 0x06, 0x94, 0x6e, 0xcd, 0x25, 0x17, 0x76, 0xfa, 0x68, 0xfd, /* Byte value: 0x4d */ + 0x75, 0xda, 0xdd, 0xd1, 0x74, 0x0a, 0x83, 0x3b, 0xe2, 0xa8, 0x7e, 0x2c, 0xab, 0xd9, 0x61, 0x3a, /* Byte value: 0x4e */ + 0x4b, 0xd0, 0xbc, 0x4c, 0x5f, 0x88, 0xae, 0xda, 0x36, 0xf7, 0xd7, 0x35, 0xcb, 0xec, 0x98, 0xce, /* Byte value: 0x4f */ + 0x6c, 0x01, 0x84, 0x23, 0x5b, 0x15, 0xe5, 0xfb, 0xa3, 0xe8, 0x4e, 0x88, 0xb1, 0x58, 0x46, 0xcc, /* Byte value: 0x50 */ + 0xa6, 0x5c, 0x71, 0x35, 0xa9, 0x66, 0x9d, 0xba, 0xf7, 0xd7, 0xcf, 0x67, 0xc6, 0x4d, 0x6a, 0xb5, /* Byte value: 0x51 */ + 0xa4, 0x16, 0x09, 0xbf, 0xe0, 0xed, 0x53, 0x34, 0xee, 0xad, 0x0d, 0xe1, 0x61, 0xda, 0xbd, 0x70, /* Byte value: 0x52 */ + 0xf5, 0x72, 0xa8, 0xce, 0x1c, 0x55, 0x32, 0xe7, 0x6d, 0x5d, 0x49, 0xb5, 0xa5, 0x8a, 0x5f, 0x0e, /* Byte value: 0x53 */ + 0xf8, 0x28, 0x47, 0x31, 0xac, 0x4d, 0xb4, 0x02, 0xd6, 0xbf, 0xe1, 0x64, 0x43, 0xd4, 0x62, 0x56, /* Byte value: 0x54 */ + 0x9c, 0xc2, 0xe0, 0x7f, 0x10, 0x31, 0xef, 0x84, 0x11, 0x7c, 0x21, 0xb1, 0x2b, 0x95, 0xfe, 0x08, /* Byte value: 0x55 */ + 0xd2, 0xa3, 0x90, 0xa1, 0x18, 0xc8, 0x79, 0xc6, 0xf8, 0x42, 0xd0, 0x08, 0xdf, 0x3e, 0x81, 0x0c, /* Byte value: 0x56 */ + 0xcd, 0xa6, 0x41, 0x0e, 0xec, 0x89, 0x8e, 0x57, 0x92, 0x8c, 0x65, 0xe5, 0xef, 0xc5, 0x1c, 0x76, /* Byte value: 0x57 */ + 0xdc, 0x96, 0x3b, 0x91, 0x24, 0xff, 0x56, 0xea, 0xb7, 0xe7, 0xdb, 0x1c, 0x2c, 0x5d, 0xe1, 0x12, /* Byte value: 0x58 */ + 0x1d, 0x4f, 0xa9, 0x25, 0xbd, 0xca, 0x39, 0x1f, 0x73, 0xb4, 0x77, 0x6b, 0x97, 0x6c, 0x4a, 0xbf, /* Byte value: 0x59 */ + 0x83, 0xc7, 0x31, 0xd0, 0xe4, 0x70, 0x18, 0x15, 0x7b, 0xb2, 0x94, 0x5c, 0x1b, 0x6e, 0x63, 0x72, /* Byte value: 0x5a */ + 0x2e, 0x1f, 0x27, 0x47, 0x26, 0x50, 0x92, 0x1b, 0x1c, 0x09, 0x76, 0xa3, 0x11, 0x07, 0x8e, 0x13, /* Byte value: 0x5b */ + 0xf1, 0xe6, 0x58, 0x19, 0x8e, 0x80, 0x6d, 0x38, 0x5f, 0xa9, 0x0e, 0x7a, 0x28, 0x67, 0x32, 0x47, /* Byte value: 0x5c */ + 0xfd, 0x99, 0x8b, 0xa3, 0xfb, 0x3c, 0x8c, 0x9a, 0x09, 0x76, 0xc7, 0xe8, 0x7c, 0x93, 0x85, 0x9c, /* Byte value: 0x5d */ + 0x81, 0x8d, 0x49, 0x5a, 0xad, 0xfb, 0xd6, 0x9b, 0x62, 0xc8, 0x56, 0xda, 0xbc, 0xf9, 0xb4, 0xb7, /* Byte value: 0x5e */ + 0xb1, 0xb2, 0x83, 0xf7, 0xba, 0x4e, 0xd4, 0x56, 0xf9, 0x32, 0xf4, 0xd7, 0x2f, 0xaf, 0x2d, 0x5d, /* Byte value: 0x5f */ + 0x4f, 0x44, 0x4c, 0x9b, 0xcd, 0x5d, 0xf1, 0x05, 0x04, 0x03, 0x90, 0xfa, 0x46, 0x01, 0xf5, 0x87, /* Byte value: 0x60 */ + 0x47, 0xaf, 0x6f, 0xf6, 0x2a, 0x34, 0x4f, 0x78, 0x60, 0x28, 0x1e, 0xa7, 0x9f, 0x18, 0x2f, 0x15, /* Byte value: 0x61 */ + 0x13, 0x7a, 0x02, 0x15, 0x81, 0xfd, 0x16, 0x33, 0x3c, 0x11, 0x7c, 0x7f, 0x64, 0x0f, 0x2a, 0xa1, /* Byte value: 0x62 */ + 0x46, 0x8a, 0x53, 0xb3, 0xef, 0x90, 0x28, 0x3f, 0x8d, 0x15, 0x7f, 0xe4, 0x2d, 0xb2, 0xa5, 0x96, /* Byte value: 0x63 */ + 0x5b, 0xc5, 0xfa, 0x96, 0x52, 0x5a, 0x11, 0x20, 0xfe, 0xa1, 0x08, 0x8f, 0xba, 0xde, 0xef, 0x29, /* Byte value: 0x64 */ + 0xfb, 0x47, 0x03, 0xfe, 0x20, 0x62, 0x1d, 0xcb, 0x22, 0xf8, 0x42, 0xa1, 0x56, 0xe9, 0x3f, 0x10, /* Byte value: 0x65 */ + 0xed, 0x8c, 0xcd, 0x79, 0xf6, 0xee, 0x33, 0x60, 0xc1, 0x20, 0x18, 0x52, 0x0d, 0xa1, 0xf2, 0x7b, /* Byte value: 0x66 */ + 0x94, 0x29, 0xc3, 0x12, 0xf7, 0x58, 0x51, 0xf9, 0x75, 0x57, 0xaf, 0xec, 0xf2, 0x8c, 0x24, 0x9a, /* Byte value: 0x67 */ + 0x25, 0x9b, 0x40, 0xe5, 0x4d, 0x16, 0x85, 0xaf, 0x8c, 0x65, 0x5b, 0x3b, 0xdd, 0x23, 0x09, 0xc7, /* Byte value: 0x68 */ + 0xa5, 0x33, 0x35, 0xfa, 0x25, 0x49, 0x34, 0x73, 0x03, 0x90, 0x6c, 0xa2, 0xd3, 0x70, 0x37, 0xf3, /* Byte value: 0x69 */ + 0xdd, 0xb3, 0x07, 0xd4, 0xe1, 0x5b, 0x31, 0xad, 0x5a, 0xda, 0xba, 0x5f, 0x9e, 0xf7, 0x6b, 0x91, /* Byte value: 0x6a */ + 0x38, 0xd4, 0xe9, 0xc0, 0xf0, 0xdc, 0xbc, 0xb0, 0xff, 0xd1, 0x2c, 0x50, 0x4a, 0x4f, 0x43, 0x78, /* Byte value: 0x6b */ + 0x58, 0xaa, 0xbe, 0x59, 0xde, 0x75, 0xb8, 0xe9, 0x0a, 0xe6, 0xab, 0x4a, 0xaf, 0xe3, 0xb2, 0x6f, /* Byte value: 0x6c */ + 0x0f, 0x10, 0x97, 0x75, 0xf9, 0x93, 0x48, 0x6b, 0xa2, 0x98, 0x6a, 0x57, 0x41, 0xc9, 0xea, 0x9d, /* Byte value: 0x6d */ + 0xda, 0x48, 0xb3, 0xcc, 0xff, 0xa1, 0xc7, 0xbb, 0x9c, 0x69, 0x5e, 0x55, 0x06, 0x27, 0x5b, 0x9e, /* Byte value: 0x6e */ + 0x3d, 0x65, 0x25, 0x52, 0xa7, 0xad, 0x84, 0x28, 0x20, 0x18, 0x0a, 0xdc, 0x75, 0x08, 0xa4, 0xb2, /* Byte value: 0x6f */ + 0xe8, 0x3d, 0x01, 0xeb, 0xa1, 0x9f, 0x0b, 0xf8, 0x1e, 0xe9, 0x3e, 0xde, 0x32, 0xe6, 0x15, 0xb1, /* Byte value: 0x70 */ + 0xe9, 0x18, 0x3d, 0xae, 0x64, 0x3b, 0x6c, 0xbf, 0xf3, 0xd4, 0x5f, 0x9d, 0x80, 0x4c, 0x9f, 0x32, /* Byte value: 0x71 */ + 0x18, 0xfe, 0x65, 0xb7, 0xea, 0xbb, 0x01, 0x87, 0xac, 0x7d, 0x51, 0xe7, 0xa8, 0x2b, 0xad, 0x75, /* Byte value: 0x72 */ + 0x95, 0x0c, 0xff, 0x57, 0x32, 0xfc, 0x36, 0xbe, 0x98, 0x6a, 0xce, 0xaf, 0x40, 0x26, 0xae, 0x19, /* Byte value: 0x73 */ + 0xee, 0xe3, 0x89, 0xb6, 0x7a, 0xc1, 0x9a, 0xa9, 0x35, 0x67, 0xbb, 0x97, 0x18, 0x9c, 0xaf, 0x3d, /* Byte value: 0x74 */ + 0x77, 0x90, 0xa5, 0x5b, 0x3d, 0x81, 0x4d, 0xb5, 0xfb, 0xd2, 0xbc, 0xaa, 0x0c, 0x4e, 0xb6, 0xff, /* Byte value: 0x75 */ + 0x72, 0x21, 0x69, 0xc9, 0x6a, 0xf0, 0x75, 0x2d, 0x24, 0x1b, 0x9a, 0x26, 0x33, 0x09, 0x51, 0x35, /* Byte value: 0x76 */ + 0x6f, 0x6e, 0xc0, 0xec, 0xd7, 0x3a, 0x4c, 0x32, 0x57, 0xaf, 0xed, 0x4d, 0xa4, 0x65, 0x1b, 0x8a, /* Byte value: 0x77 */ + 0x51, 0x64, 0xa1, 0x71, 0xfc, 0xb8, 0x61, 0xd3, 0x83, 0xf0, 0x44, 0x54, 0xc4, 0x50, 0xe2, 0x7e, /* Byte value: 0x78 */ + 0x7f, 0x7b, 0x86, 0x36, 0xda, 0xe8, 0xf3, 0xc8, 0x9f, 0xf9, 0x32, 0xf7, 0xd5, 0x57, 0x6c, 0x6d, /* Byte value: 0x79 */ + 0xdf, 0xf9, 0x7f, 0x5e, 0xa8, 0xd0, 0xff, 0x23, 0x43, 0xa0, 0x78, 0xd9, 0x39, 0x60, 0xbc, 0x54, /* Byte value: 0x7a */ + 0xd7, 0x12, 0x5c, 0x33, 0x4f, 0xb9, 0x41, 0x5e, 0x27, 0x8b, 0xf6, 0x84, 0xe0, 0x79, 0x66, 0xc6, /* Byte value: 0x7b */ + 0xd4, 0x7d, 0x18, 0xfc, 0xc3, 0x96, 0xe8, 0x97, 0xd3, 0xcc, 0x55, 0x41, 0xf5, 0x44, 0x3b, 0x80, /* Byte value: 0x7c */ + 0x6b, 0xfa, 0x30, 0x3b, 0x45, 0xef, 0x13, 0xed, 0x65, 0x5b, 0xaa, 0x82, 0x29, 0x88, 0x76, 0xc3, /* Byte value: 0x7d */ + 0x3a, 0x9e, 0x91, 0x4a, 0xb9, 0x57, 0x72, 0x3e, 0xe6, 0xab, 0xee, 0xd6, 0xed, 0xd8, 0x94, 0xbd, /* Byte value: 0x7e */ + 0x20, 0x2a, 0x8c, 0x77, 0x1a, 0x67, 0xbd, 0x37, 0x53, 0xac, 0x7d, 0xb7, 0xe2, 0x64, 0xee, 0x0d, /* Byte value: 0x7f */ + 0x0a, 0xa1, 0x5b, 0xe7, 0xae, 0xe2, 0x70, 0xf3, 0x7d, 0x51, 0x4c, 0xdb, 0x7e, 0x8e, 0x0d, 0x57, /* Byte value: 0x80 */ + 0x42, 0x1e, 0xa3, 0x64, 0x7d, 0x45, 0x77, 0xe0, 0xbf, 0xe1, 0x38, 0x2b, 0xa0, 0x5f, 0xc8, 0xdf, /* Byte value: 0x81 */ + 0xcc, 0x83, 0x7d, 0x4b, 0x29, 0x2d, 0xe9, 0x10, 0x7f, 0xb1, 0x04, 0xa6, 0x5d, 0x6f, 0x96, 0xf5, /* Byte value: 0x82 */ + 0x7b, 0xef, 0x76, 0xe1, 0x48, 0x3d, 0xac, 0x17, 0xad, 0x0d, 0x75, 0x38, 0x58, 0xba, 0x01, 0x24, /* Byte value: 0x83 */ + 0x8f, 0xb8, 0xe2, 0x6a, 0x91, 0xcc, 0xf9, 0xb7, 0x2d, 0x6d, 0x5d, 0xce, 0x4f, 0x9a, 0xd4, 0xa9, /* Byte value: 0x84 */ + 0x3b, 0xbb, 0xad, 0x0f, 0x7c, 0xf3, 0x15, 0x79, 0x0b, 0x96, 0x8f, 0x95, 0x5f, 0x72, 0x1e, 0x3e, /* Byte value: 0x85 */ + 0x7d, 0x31, 0xfe, 0xbc, 0x93, 0x63, 0x3d, 0x46, 0x86, 0x83, 0xf0, 0x71, 0x72, 0xc0, 0xbb, 0xa8, /* Byte value: 0x86 */ + 0xbf, 0x87, 0x28, 0xc7, 0x86, 0x79, 0xfb, 0x7a, 0xb6, 0x97, 0xff, 0xc3, 0xdc, 0xcc, 0x4d, 0x43, /* Byte value: 0x87 */ + 0xd0, 0xe9, 0xe8, 0x2b, 0x51, 0x43, 0xb7, 0x48, 0xe1, 0x38, 0x12, 0x8e, 0x78, 0xa9, 0x56, 0xc9, /* Byte value: 0x88 */ + 0xde, 0xdc, 0x43, 0x1b, 0x6d, 0x74, 0x98, 0x64, 0xae, 0x9d, 0x19, 0x9a, 0x8b, 0xca, 0x36, 0xd7, /* Byte value: 0x89 */ + 0xca, 0x5d, 0xf5, 0x16, 0xf2, 0x73, 0x78, 0x41, 0x54, 0x3f, 0x81, 0xef, 0x77, 0x15, 0x2c, 0x79, /* Byte value: 0x8a */ + 0x2c, 0x55, 0x5f, 0xcd, 0x6f, 0xdb, 0x5c, 0x95, 0x05, 0x73, 0xb4, 0x25, 0xb6, 0x90, 0x59, 0xd6, /* Byte value: 0x8b */ + 0x19, 0xdb, 0x59, 0xf2, 0x2f, 0x1f, 0x66, 0xc0, 0x41, 0x40, 0x30, 0xa4, 0x1a, 0x81, 0x27, 0xf6, /* Byte value: 0x8c */ + 0x76, 0xb5, 0x99, 0x1e, 0xf8, 0x25, 0x2a, 0xf2, 0x16, 0xef, 0xdd, 0xe9, 0xbe, 0xe4, 0x3c, 0x7c, /* Byte value: 0x8d */ + 0x12, 0x5f, 0x3e, 0x50, 0x44, 0x59, 0x71, 0x74, 0xd1, 0x2c, 0x1d, 0x3c, 0xd6, 0xa5, 0xa0, 0x22, /* Byte value: 0x8e */ + 0x74, 0xff, 0xe1, 0x94, 0xb1, 0xae, 0xe4, 0x7c, 0x0f, 0x95, 0x1f, 0x6f, 0x19, 0x73, 0xeb, 0xb9, /* Byte value: 0x8f */ + 0xd5, 0x58, 0x24, 0xb9, 0x06, 0x32, 0x8f, 0xd0, 0x3e, 0xf1, 0x34, 0x02, 0x47, 0xee, 0xb1, 0x03, /* Byte value: 0x90 */ + 0x8b, 0x2c, 0x12, 0xbd, 0x03, 0x19, 0xa6, 0x68, 0x1f, 0x99, 0x1a, 0x01, 0xc2, 0x77, 0xb9, 0xe0, /* Byte value: 0x91 */ + 0x07, 0xfb, 0xb4, 0x18, 0x1e, 0xfa, 0xf6, 0x16, 0xc6, 0xb3, 0xe4, 0x0a, 0x98, 0xd0, 0x30, 0x0f, /* Byte value: 0x92 */ + 0x59, 0x8f, 0x82, 0x1c, 0x1b, 0xd1, 0xdf, 0xae, 0xe7, 0xdb, 0xca, 0x09, 0x1d, 0x49, 0x38, 0xec, /* Byte value: 0x93 */ + 0xb0, 0x97, 0xbf, 0xb2, 0x7f, 0xea, 0xb3, 0x11, 0x14, 0x0f, 0x95, 0x94, 0x9d, 0x05, 0xa7, 0xde, /* Byte value: 0x94 */ + 0x1f, 0x05, 0xd1, 0xaf, 0xf4, 0x41, 0xf7, 0x91, 0x6a, 0xce, 0xb5, 0xed, 0x30, 0xfb, 0x9d, 0x7a, /* Byte value: 0x95 */ + 0x61, 0x5b, 0x6b, 0xdc, 0xeb, 0x0d, 0x63, 0x1e, 0x18, 0x0a, 0xe6, 0x59, 0x57, 0x06, 0x7b, 0x94, /* Byte value: 0x96 */ + 0x1a, 0xb4, 0x1d, 0x3d, 0xa3, 0x30, 0xcf, 0x09, 0xb5, 0x07, 0x93, 0x61, 0x0f, 0xbc, 0x7a, 0xb0, /* Byte value: 0x97 */ + 0xc8, 0x17, 0x8d, 0x9c, 0xbb, 0xf8, 0xb6, 0xcf, 0x4d, 0x45, 0x43, 0x69, 0xd0, 0x82, 0xfb, 0xbc, /* Byte value: 0x98 */ + 0x97, 0x46, 0x87, 0xdd, 0x7b, 0x77, 0xf8, 0x30, 0x81, 0x10, 0x0c, 0x29, 0xe7, 0xb1, 0x79, 0xdc, /* Byte value: 0x99 */ + 0x17, 0xee, 0xf2, 0xc2, 0x13, 0x28, 0x49, 0xec, 0x0e, 0xe5, 0x3b, 0xb0, 0xe9, 0xe2, 0x47, 0xe8, /* Byte value: 0x9a */ + 0xa9, 0x4c, 0xe6, 0x40, 0x50, 0xf5, 0xd5, 0xd1, 0x55, 0x4f, 0xa5, 0x30, 0x87, 0x84, 0x80, 0x28, /* Byte value: 0x9b */ + 0x91, 0x98, 0x0f, 0x80, 0xa0, 0x29, 0x69, 0x61, 0xaa, 0x9e, 0x89, 0x60, 0xcd, 0xcb, 0xc3, 0x50, /* Byte value: 0x9c */ + 0x9f, 0xad, 0xa4, 0xb0, 0x9c, 0x1e, 0x46, 0x4d, 0xe5, 0x3b, 0x82, 0x74, 0x3e, 0xa8, 0xa3, 0x4e, /* Byte value: 0x9d */ + 0x1b, 0x91, 0x21, 0x78, 0x66, 0x94, 0xa8, 0x4e, 0x58, 0x3a, 0xf2, 0x22, 0xbd, 0x16, 0xf0, 0x33, /* Byte value: 0x9e */ + 0xbb, 0x13, 0xd8, 0x10, 0x14, 0xac, 0xa4, 0xa5, 0x84, 0x63, 0xb8, 0x0c, 0x51, 0x21, 0x20, 0x0a, /* Byte value: 0x9f */ + 0xd1, 0xcc, 0xd4, 0x6e, 0x94, 0xe7, 0xd0, 0x0f, 0x0c, 0x05, 0x73, 0xcd, 0xca, 0x03, 0xdc, 0x4a, /* Byte value: 0xa0 */ + 0x7a, 0xca, 0x4a, 0xa4, 0x8d, 0x99, 0xcb, 0x50, 0x40, 0x30, 0x14, 0x7b, 0xea, 0x10, 0x8b, 0xa7, /* Byte value: 0xa1 */ + 0xb4, 0x03, 0x4f, 0x65, 0xed, 0x3f, 0xec, 0xce, 0x26, 0xfb, 0xd2, 0x5b, 0x10, 0xe8, 0xca, 0x97, /* Byte value: 0xa2 */ + 0x5f, 0x51, 0x0a, 0x41, 0xc0, 0x8f, 0x4e, 0xff, 0xcc, 0x55, 0x4f, 0x40, 0x37, 0x33, 0x82, 0x60, /* Byte value: 0xa3 */ + 0x71, 0x4e, 0x2d, 0x06, 0xe6, 0xdf, 0xdc, 0xe4, 0xd0, 0x5c, 0x39, 0xe3, 0x26, 0x34, 0x0c, 0x73, /* Byte value: 0xa4 */ + 0x0e, 0x35, 0xab, 0x30, 0x3c, 0x37, 0x2f, 0x2c, 0x4f, 0xa5, 0x0b, 0x14, 0xf3, 0x63, 0x60, 0x1e, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x78, 0x80, 0x32, 0x2e, 0xc4, 0x12, 0x05, 0xde, 0x59, 0x4a, 0xd6, 0xfd, 0x4d, 0x87, 0x5c, 0x62, /* Byte value: 0xa7 */ + 0x24, 0xbe, 0x7c, 0xa0, 0x88, 0xb2, 0xe2, 0xe8, 0x61, 0x58, 0x3a, 0x78, 0x6f, 0x89, 0x83, 0x44, /* Byte value: 0xa8 */ + 0x40, 0x54, 0xdb, 0xee, 0x34, 0xce, 0xb9, 0x6e, 0xa6, 0x9b, 0xfa, 0xad, 0x07, 0xc8, 0x1f, 0x1a, /* Byte value: 0xa9 */ + 0x86, 0x76, 0xfd, 0x42, 0xb3, 0x01, 0x20, 0x8d, 0xa4, 0x7b, 0xb2, 0xd0, 0x24, 0x29, 0x84, 0xb8, /* Byte value: 0xaa */ + 0x52, 0x0b, 0xe5, 0xbe, 0x70, 0x97, 0xc8, 0x1a, 0x77, 0xb7, 0xe7, 0x91, 0xd1, 0x6d, 0xbf, 0x38, /* Byte value: 0xab */ + 0xf3, 0xac, 0x20, 0x93, 0xc7, 0x0b, 0xa3, 0xb6, 0x46, 0xd3, 0xcc, 0xfc, 0x8f, 0xf0, 0xe5, 0x82, /* Byte value: 0xac */ + 0x11, 0x30, 0x7a, 0x9f, 0xc8, 0x76, 0xd8, 0xbd, 0x25, 0x6b, 0xbe, 0xf9, 0xc3, 0x98, 0xfd, 0x64, /* Byte value: 0xad */ + 0x28, 0xc1, 0xaf, 0x1a, 0xfd, 0x0e, 0x03, 0x4a, 0x37, 0x87, 0xf3, 0xea, 0x3b, 0x7d, 0x34, 0x9f, /* Byte value: 0xae */ + 0x5c, 0x3e, 0x4e, 0x8e, 0x4c, 0xa0, 0xe7, 0x36, 0x38, 0x12, 0xec, 0x85, 0x22, 0x0e, 0xdf, 0x26, /* Byte value: 0xaf */ + 0x98, 0x56, 0x10, 0xa8, 0x82, 0xe4, 0xb0, 0x5b, 0x23, 0x88, 0x66, 0x7e, 0xa6, 0x78, 0x93, 0x41, /* Byte value: 0xb0 */ + 0xc1, 0xd9, 0x92, 0xb4, 0x99, 0x35, 0x6f, 0xf5, 0xc4, 0x53, 0xac, 0x77, 0xbb, 0x31, 0xab, 0xad, /* Byte value: 0xb1 */ + 0xd6, 0x37, 0x60, 0x76, 0x8a, 0x1d, 0x26, 0x19, 0xca, 0xb6, 0x97, 0xc7, 0x52, 0xd3, 0xec, 0x45, /* Byte value: 0xb2 */ + 0x03, 0x6f, 0x44, 0xcf, 0x8c, 0x2f, 0xa9, 0xc9, 0xf4, 0x47, 0xa3, 0xc5, 0x15, 0x3d, 0x5d, 0x46, /* Byte value: 0xb3 */ + 0x08, 0xeb, 0x23, 0x6d, 0xe7, 0x69, 0xbe, 0x7d, 0x64, 0x2b, 0x8e, 0x5d, 0xd9, 0x19, 0xda, 0x92, /* Byte value: 0xb4 */ + 0xae, 0xb7, 0x52, 0x58, 0x4e, 0x0f, 0x23, 0xc7, 0x93, 0xfc, 0x41, 0x3a, 0x1f, 0x54, 0xb0, 0x27, /* Byte value: 0xb5 */ + 0x64, 0xea, 0xa7, 0x4e, 0xbc, 0x7c, 0x5b, 0x86, 0xc7, 0xc3, 0xc0, 0xd5, 0x68, 0x41, 0x9c, 0x5e, /* Byte value: 0xb6 */ + 0x2d, 0x70, 0x63, 0x88, 0xaa, 0x7f, 0x3b, 0xd2, 0xe8, 0x4e, 0xd5, 0x66, 0x04, 0x3a, 0xd3, 0x55, /* Byte value: 0xb7 */ + 0x32, 0x75, 0xb2, 0x27, 0x5e, 0x3e, 0xcc, 0x43, 0x82, 0x80, 0x60, 0x8b, 0x34, 0xc1, 0x4e, 0x2f, /* Byte value: 0xb8 */ + 0x06, 0xde, 0x88, 0x5d, 0xdb, 0x5e, 0x91, 0x51, 0x2b, 0x8e, 0x85, 0x49, 0x2a, 0x7a, 0xba, 0x8c, /* Byte value: 0xb9 */ + 0x34, 0xab, 0x3a, 0x7a, 0x85, 0x60, 0x5d, 0x12, 0xa9, 0x0e, 0xe5, 0xc2, 0x1e, 0xbb, 0xf4, 0xa3, /* Byte value: 0xba */ + 0x5d, 0x1b, 0x72, 0xcb, 0x89, 0x04, 0x80, 0x71, 0xd5, 0x2f, 0x8d, 0xc6, 0x90, 0xa4, 0x55, 0xa5, /* Byte value: 0xbb */ + 0x84, 0x3c, 0x85, 0xc8, 0xfa, 0x8a, 0xee, 0x03, 0xbd, 0x01, 0x70, 0x56, 0x83, 0xbe, 0x53, 0x7d, /* Byte value: 0xbc */ + 0x31, 0x1a, 0xf6, 0xe8, 0xd2, 0x11, 0x65, 0x8a, 0x76, 0xc7, 0xc3, 0x4e, 0x21, 0xfc, 0x13, 0x69, /* Byte value: 0xbd */ + 0xf9, 0x0d, 0x7b, 0x74, 0x69, 0xe9, 0xd3, 0x45, 0x3b, 0x82, 0x80, 0x27, 0xf1, 0x7e, 0xe8, 0xd5, /* Byte value: 0xbe */ + 0x93, 0xd2, 0x77, 0x0a, 0xe9, 0xa2, 0xa7, 0xef, 0xb3, 0xe4, 0x4b, 0xe6, 0x6a, 0x5c, 0x14, 0x95, /* Byte value: 0xbf */ + 0x87, 0x53, 0xc1, 0x07, 0x76, 0xa5, 0x47, 0xca, 0x49, 0x46, 0xd3, 0x93, 0x96, 0x83, 0x0e, 0x3b, /* Byte value: 0xc0 */ + 0x9b, 0x39, 0x54, 0x67, 0x0e, 0xcb, 0x19, 0x92, 0xd7, 0xcf, 0xc5, 0xbb, 0xb3, 0x45, 0xce, 0x07, /* Byte value: 0xc1 */ + 0x0d, 0x5a, 0xef, 0xff, 0xb0, 0x18, 0x86, 0xe5, 0xbb, 0xe2, 0xa8, 0xd1, 0xe6, 0x5e, 0x3d, 0x58, /* Byte value: 0xc2 */ + 0xcf, 0xec, 0x39, 0x84, 0xa5, 0x02, 0x40, 0xd9, 0x8b, 0xf6, 0xa7, 0x63, 0x48, 0x52, 0xcb, 0xb3, /* Byte value: 0xc3 */ + 0x6a, 0xdf, 0x0c, 0x7e, 0x80, 0x4b, 0x74, 0xaa, 0x88, 0x66, 0xcb, 0xc1, 0x9b, 0x22, 0xfc, 0x40, /* Byte value: 0xc4 */ + 0xbd, 0xcd, 0x50, 0x4d, 0xcf, 0xf2, 0x35, 0xf4, 0xaf, 0xed, 0x3d, 0x45, 0x7b, 0x5b, 0x9a, 0x86, /* Byte value: 0xc5 */ + 0x33, 0x50, 0x8e, 0x62, 0x9b, 0x9a, 0xab, 0x04, 0x6f, 0xbd, 0x01, 0xc8, 0x86, 0x6b, 0xc4, 0xac, /* Byte value: 0xc6 */ + 0xdb, 0x6d, 0x8f, 0x89, 0x3a, 0x05, 0xa0, 0xfc, 0x71, 0x54, 0x3f, 0x16, 0xb4, 0x8d, 0xd1, 0x1d, /* Byte value: 0xc7 */ + 0xeb, 0x52, 0x45, 0x24, 0x2d, 0xb0, 0xa2, 0x31, 0xea, 0xae, 0x9d, 0x1b, 0x27, 0xdb, 0x48, 0xf7, /* Byte value: 0xc8 */ + 0xce, 0xc9, 0x05, 0xc1, 0x60, 0xa6, 0x27, 0x9e, 0x66, 0xcb, 0xc6, 0x20, 0xfa, 0xf8, 0x41, 0x30, /* Byte value: 0xc9 */ + 0x55, 0xf0, 0x51, 0xa6, 0x6e, 0x6d, 0x3e, 0x0c, 0xb1, 0x04, 0x03, 0x9b, 0x49, 0xbd, 0x8f, 0x37, /* Byte value: 0xca */ + 0x16, 0xcb, 0xce, 0x87, 0xd6, 0x8c, 0x2e, 0xab, 0xe3, 0xd8, 0x5a, 0xf3, 0x5b, 0x48, 0xcd, 0x6b, /* Byte value: 0xcb */ + 0xc5, 0x4d, 0x62, 0x63, 0x0b, 0xe0, 0x30, 0x2a, 0xf6, 0xa7, 0xeb, 0xb8, 0x36, 0xdc, 0xc6, 0xe4, /* Byte value: 0xcc */ + 0x48, 0xbf, 0xf8, 0x83, 0xd3, 0xa7, 0x07, 0x13, 0xc2, 0xb0, 0x74, 0xf0, 0xde, 0xd1, 0xc5, 0x88, /* Byte value: 0xcd */ + 0x2b, 0xae, 0xeb, 0xd5, 0x71, 0x21, 0xaa, 0x83, 0xc3, 0xc0, 0x50, 0x2f, 0x2e, 0x40, 0x69, 0xd9, /* Byte value: 0xce */ + 0x10, 0x15, 0x46, 0xda, 0x0d, 0xd2, 0xbf, 0xfa, 0xc8, 0x56, 0xdf, 0xba, 0x71, 0x32, 0x77, 0xe7, /* Byte value: 0xcf */ + 0xba, 0x36, 0xe4, 0x55, 0xd1, 0x08, 0xc3, 0xe2, 0x69, 0x5e, 0xd9, 0x4f, 0xe3, 0x8b, 0xaa, 0x89, /* Byte value: 0xd0 */ + 0x79, 0xa5, 0x0e, 0x6b, 0x01, 0xb6, 0x62, 0x99, 0xb4, 0x77, 0xb7, 0xbe, 0xff, 0x2d, 0xd6, 0xe1, /* Byte value: 0xd1 */ + 0xb2, 0xdd, 0xc7, 0x38, 0x36, 0x61, 0x7d, 0x9f, 0x0d, 0x75, 0x57, 0x12, 0x3a, 0x92, 0x70, 0x1b, /* Byte value: 0xd2 */ + 0x01, 0x25, 0x3c, 0x45, 0xc5, 0xa4, 0x67, 0x47, 0xed, 0x3d, 0x61, 0x43, 0xb2, 0xaa, 0x8a, 0x83, /* Byte value: 0xd3 */ + 0x04, 0x94, 0xf0, 0xd7, 0x92, 0xd5, 0x5f, 0xdf, 0x32, 0xf4, 0x47, 0xcf, 0x8d, 0xed, 0x6d, 0x49, /* Byte value: 0xd4 */ + 0xb8, 0x7c, 0x9c, 0xdf, 0x98, 0x83, 0x0d, 0x6c, 0x70, 0x24, 0x1b, 0xc9, 0x44, 0x1c, 0x7d, 0x4c, /* Byte value: 0xd5 */ + 0xc9, 0x32, 0xb1, 0xd9, 0x7e, 0x5c, 0xd1, 0x88, 0xa0, 0x78, 0x22, 0x2a, 0x62, 0x28, 0x71, 0x3f, /* Byte value: 0xd6 */ + 0xec, 0xa9, 0xf1, 0x3c, 0x33, 0x4a, 0x54, 0x27, 0x2c, 0x1d, 0x79, 0x11, 0xbf, 0x0b, 0x78, 0xf8, /* Byte value: 0xd7 */ + 0x85, 0x19, 0xb9, 0x8d, 0x3f, 0x2e, 0x89, 0x44, 0x50, 0x3c, 0x11, 0x15, 0x31, 0x14, 0xd9, 0xfe, /* Byte value: 0xd8 */ + 0xf4, 0x57, 0x94, 0x8b, 0xd9, 0xf1, 0x55, 0xa0, 0x80, 0x60, 0x28, 0xf6, 0x17, 0x20, 0xd5, 0x8d, /* Byte value: 0xd9 */ + 0x44, 0xc0, 0x2b, 0x39, 0xa6, 0x1b, 0xe6, 0xb1, 0x94, 0x6f, 0xbd, 0x62, 0x8a, 0x25, 0x72, 0x53, /* Byte value: 0xda */ + 0x5a, 0xe0, 0xc6, 0xd3, 0x97, 0xfe, 0x76, 0x67, 0x13, 0x9c, 0x69, 0xcc, 0x08, 0x74, 0x65, 0xaa, /* Byte value: 0xdb */ + 0x2f, 0x3a, 0x1b, 0x02, 0xe3, 0xf4, 0xf5, 0x5c, 0xf1, 0x34, 0x17, 0xe0, 0xa3, 0xad, 0x04, 0x90, /* Byte value: 0xdc */ + 0x05, 0xb1, 0xcc, 0x92, 0x57, 0x71, 0x38, 0x98, 0xdf, 0xc9, 0x26, 0x8c, 0x3f, 0x47, 0xe7, 0xca, /* Byte value: 0xdd */ + 0xd9, 0x27, 0xf7, 0x03, 0x73, 0x8e, 0x6e, 0x72, 0x68, 0x2e, 0xfd, 0x90, 0x13, 0x1a, 0x06, 0xd8, /* Byte value: 0xde */ + 0x68, 0x95, 0x74, 0xf4, 0xc9, 0xc0, 0xba, 0x24, 0x91, 0x1c, 0x09, 0x47, 0x3c, 0xb5, 0x2b, 0x85, /* Byte value: 0xdf */ + 0xad, 0xd8, 0x16, 0x97, 0xc2, 0x20, 0x8a, 0x0e, 0x67, 0xbb, 0xe2, 0xff, 0x0a, 0x69, 0xed, 0x61, /* Byte value: 0xe0 */ + 0x35, 0x8e, 0x06, 0x3f, 0x40, 0xc4, 0x3a, 0x55, 0x44, 0x33, 0x84, 0x81, 0xac, 0x11, 0x7e, 0x20, /* Byte value: 0xe1 */ + 0x56, 0x9f, 0x15, 0x69, 0xe2, 0x42, 0x97, 0xc5, 0x45, 0x43, 0xa0, 0x5e, 0x5c, 0x80, 0xd2, 0x71, /* Byte value: 0xe2 */ + 0xc4, 0x68, 0x5e, 0x26, 0xce, 0x44, 0x57, 0x6d, 0x1b, 0x9a, 0x8a, 0xfb, 0x84, 0x76, 0x4c, 0x67, /* Byte value: 0xe3 */ + 0xaf, 0x92, 0x6e, 0x1d, 0x8b, 0xab, 0x44, 0x80, 0x7e, 0xc1, 0x20, 0x79, 0xad, 0xfe, 0x3a, 0xa4, /* Byte value: 0xe4 */ + 0x15, 0xa4, 0x8a, 0x48, 0x5a, 0xa3, 0x87, 0x62, 0x17, 0x9f, 0xf9, 0x36, 0x4e, 0x75, 0x90, 0x2d, /* Byte value: 0xe5 */ + 0x7c, 0x14, 0xc2, 0xf9, 0x56, 0xc7, 0x5a, 0x01, 0x6b, 0xbe, 0x91, 0x32, 0xc0, 0x6a, 0x31, 0x2b, /* Byte value: 0xe6 */ + 0x6e, 0x4b, 0xfc, 0xa9, 0x12, 0x9e, 0x2b, 0x75, 0xba, 0x92, 0x8c, 0x0e, 0x16, 0xcf, 0x91, 0x09, /* Byte value: 0xe7 */ + 0xd8, 0x02, 0xcb, 0x46, 0xb6, 0x2a, 0x09, 0x35, 0x85, 0x13, 0x9c, 0xd3, 0xa1, 0xb0, 0x8c, 0x5b, /* Byte value: 0xe8 */ + 0xf7, 0x38, 0xd0, 0x44, 0x55, 0xde, 0xfc, 0x69, 0x74, 0x27, 0x8b, 0x33, 0x02, 0x1d, 0x88, 0xcb, /* Byte value: 0xe9 */ + 0x66, 0xa0, 0xdf, 0xc4, 0xf5, 0xf7, 0x95, 0x08, 0xde, 0xb9, 0x02, 0x53, 0xcf, 0xd6, 0x4b, 0x9b, /* Byte value: 0xea */ + 0x89, 0x66, 0x6a, 0x37, 0x4a, 0x92, 0x68, 0xe6, 0x06, 0xe3, 0xd8, 0x87, 0x65, 0xe0, 0x6e, 0x25, /* Byte value: 0xeb */ + 0x45, 0xe5, 0x17, 0x7c, 0x63, 0xbf, 0x81, 0xf6, 0x79, 0x52, 0xdc, 0x21, 0x38, 0x8f, 0xf8, 0xd0, /* Byte value: 0xec */ + 0xef, 0xc6, 0xb5, 0xf3, 0xbf, 0x65, 0xfd, 0xee, 0xd8, 0x5a, 0xda, 0xd4, 0xaa, 0x36, 0x25, 0xbe, /* Byte value: 0xed */ + 0x37, 0xc4, 0x7e, 0xb5, 0x09, 0x4f, 0xf4, 0xdb, 0x5d, 0x49, 0x46, 0x07, 0x0b, 0x86, 0xa9, 0xe5, /* Byte value: 0xee */ + 0x8d, 0xf2, 0x9a, 0xe0, 0xd8, 0x47, 0x37, 0x39, 0x34, 0x17, 0x9f, 0x48, 0xe8, 0x0d, 0x03, 0x6c, /* Byte value: 0xef */ + 0xb6, 0x49, 0x37, 0xef, 0xa4, 0xb4, 0x22, 0x40, 0x3f, 0x81, 0x10, 0xdd, 0xb7, 0x7f, 0x1d, 0x52, /* Byte value: 0xf0 */ + 0xff, 0xd3, 0xf3, 0x29, 0xb2, 0xb7, 0x42, 0x14, 0x10, 0x0c, 0x05, 0x6e, 0xdb, 0x04, 0x52, 0x59, /* Byte value: 0xf1 */ + 0x88, 0x43, 0x56, 0x72, 0x8f, 0x36, 0x0f, 0xa1, 0xeb, 0xde, 0xb9, 0xc4, 0xd7, 0x4a, 0xe4, 0xa6, /* Byte value: 0xf2 */ + 0xea, 0x77, 0x79, 0x61, 0xe8, 0x14, 0xc5, 0x76, 0x07, 0x93, 0xfc, 0x58, 0x95, 0x71, 0xc2, 0x74, /* Byte value: 0xf3 */ + 0x62, 0x34, 0x2f, 0x13, 0x67, 0x22, 0xca, 0xd7, 0xec, 0x4d, 0x45, 0x9c, 0x42, 0x3b, 0x26, 0xd2, /* Byte value: 0xf4 */ + 0xe2, 0x9c, 0x5a, 0x0c, 0x0f, 0x7d, 0x7b, 0x0b, 0x63, 0xb8, 0x72, 0x05, 0x4c, 0x68, 0x18, 0xe6, /* Byte value: 0xf5 */ + 0x3e, 0x0a, 0x61, 0x9d, 0x2b, 0x82, 0x2d, 0xe1, 0xd4, 0x5f, 0xa9, 0x19, 0x60, 0x35, 0xf9, 0xf4, /* Byte value: 0xf6 */ + 0x54, 0xd5, 0x6d, 0xe3, 0xab, 0xc9, 0x59, 0x4b, 0x5c, 0x39, 0x62, 0xd8, 0xfb, 0x17, 0x05, 0xb4, /* Byte value: 0xf7 */ + 0xbe, 0xa2, 0x14, 0x82, 0x43, 0xdd, 0x9c, 0x3d, 0x5b, 0xaa, 0x9e, 0x80, 0x6e, 0x66, 0xc7, 0xc0, /* Byte value: 0xf8 */ + 0xb7, 0x6c, 0x0b, 0xaa, 0x61, 0x10, 0x45, 0x07, 0xd2, 0xbc, 0x71, 0x9e, 0x05, 0xd5, 0x97, 0xd1, /* Byte value: 0xf9 */ + 0x36, 0xe1, 0x42, 0xf0, 0xcc, 0xeb, 0x93, 0x9c, 0xb0, 0x74, 0x27, 0x44, 0xb9, 0x2c, 0x23, 0x66, /* Byte value: 0xfa */ + 0xe6, 0x08, 0xaa, 0xdb, 0x9d, 0xa8, 0x24, 0xd4, 0x51, 0x4c, 0x35, 0xca, 0xc1, 0x85, 0x75, 0xaf, /* Byte value: 0xfb */ + 0x99, 0x73, 0x2c, 0xed, 0x47, 0x40, 0xd7, 0x1c, 0xce, 0xb5, 0x07, 0x3d, 0x14, 0xd2, 0x19, 0xc2, /* Byte value: 0xfc */ + 0xa0, 0x82, 0xf9, 0x68, 0x72, 0x38, 0x0c, 0xeb, 0xdc, 0x59, 0x4a, 0x2e, 0xec, 0x37, 0xd0, 0x39, /* Byte value: 0xfd */ + 0x23, 0x45, 0xc8, 0xb8, 0x96, 0x48, 0x14, 0xfe, 0xa7, 0xeb, 0xde, 0x72, 0xf7, 0x59, 0xb3, 0x4b, /* Byte value: 0xfe */ + 0x8a, 0x09, 0x2e, 0xf8, 0xc6, 0xbd, 0xc1, 0x2f, 0xf2, 0xa4, 0x7b, 0x42, 0x70, 0xdd, 0x33, 0x63, /* Byte value: 0xff */ + 0x73, 0x04, 0x55, 0x8c, 0xaf, 0x54, 0x12, 0x6a, 0xc9, 0x26, 0xfb, 0x65, 0x81, 0xa3, 0xdb, 0xb6, /* Byte value: 0x00 */ + + /* Matrix row: 7 */ + 0x5e, 0x59, 0x1d, 0x8d, 0x98, 0xfb, 0x33, 0x54, 0x7c, 0xd4, 0xa4, 0x1b, 0xb3, 0x82, 0x0e, 0xb2, /* Byte value: 0x01 */ + 0x90, 0x76, 0xbe, 0x36, 0xc1, 0x08, 0x56, 0x5a, 0xf4, 0x40, 0x38, 0xf8, 0x4c, 0x99, 0x0f, 0xec, /* Byte value: 0x02 */ + 0xb8, 0xae, 0x1f, 0x39, 0x5b, 0xcb, 0x04, 0x4b, 0x01, 0x97, 0x34, 0x4e, 0xd8, 0x52, 0x2c, 0x9f, /* Byte value: 0x03 */ + 0x18, 0x48, 0xde, 0x05, 0x76, 0x41, 0x8f, 0x0f, 0x53, 0x4d, 0x04, 0xd3, 0xcd, 0xf8, 0xa0, 0x90, /* Byte value: 0x04 */ + 0x76, 0x81, 0xbc, 0x82, 0x02, 0x38, 0x61, 0x45, 0x89, 0x03, 0xa8, 0xad, 0x27, 0x49, 0x2d, 0xc1, /* Byte value: 0x05 */ + 0xc4, 0x19, 0x1a, 0xc8, 0x9e, 0xb3, 0x90, 0x9b, 0x24, 0xd1, 0x9f, 0x2f, 0xda, 0x59, 0x79, 0x32, /* Byte value: 0x06 */ + 0x0d, 0x23, 0xf7, 0xdb, 0x11, 0x1f, 0x5f, 0xae, 0x67, 0xf8, 0x5d, 0x96, 0x09, 0xc8, 0x5c, 0x46, /* Byte value: 0x07 */ + 0x84, 0x1a, 0x0f, 0xd0, 0x8c, 0x88, 0x7f, 0xb3, 0x6f, 0xca, 0x3e, 0xa3, 0x06, 0x1d, 0xff, 0x34, /* Byte value: 0x08 */ + 0xc2, 0x0b, 0xcc, 0x58, 0x62, 0x32, 0xc3, 0xe8, 0x40, 0x53, 0x9e, 0x6b, 0x78, 0x67, 0x51, 0x16, /* Byte value: 0x09 */ + 0x34, 0x8c, 0x5a, 0xea, 0x44, 0x7c, 0xbf, 0xfd, 0x5f, 0x66, 0xb7, 0x1d, 0x24, 0xa6, 0xb3, 0xdb, /* Byte value: 0x0a */ + 0x31, 0x97, 0xe7, 0x32, 0xc6, 0x5c, 0x24, 0x56, 0x09, 0xa5, 0x57, 0x7b, 0xd7, 0x87, 0x8f, 0xed, /* Byte value: 0x0b */ + 0x24, 0xfc, 0xce, 0xec, 0xa1, 0x02, 0xf4, 0xf7, 0x3d, 0x10, 0x0e, 0x3e, 0x13, 0xb7, 0x73, 0x3b, /* Byte value: 0x0c */ + 0xc3, 0x0c, 0x54, 0x60, 0x48, 0xec, 0x3a, 0xa0, 0xef, 0x6c, 0xc1, 0x75, 0xf6, 0xd3, 0x5d, 0x18, /* Byte value: 0x0d */ + 0xc7, 0x10, 0x71, 0x80, 0xe0, 0x12, 0x58, 0x43, 0x16, 0x90, 0x7e, 0x0d, 0x8b, 0x46, 0x6d, 0x20, /* Byte value: 0x0e */ + 0x4a, 0x35, 0xac, 0x6b, 0xd5, 0x7b, 0x1a, 0xbd, 0xe7, 0x5e, 0xa2, 0x40, 0xf9, 0x06, 0xfe, 0x6a, /* Byte value: 0x0f */ + 0x07, 0x15, 0x4e, 0xa8, 0xd6, 0x5f, 0xaa, 0x3b, 0xcb, 0xbd, 0x5e, 0x5a, 0x2c, 0x8a, 0x24, 0x2a, /* Byte value: 0x10 */ + 0x0c, 0x24, 0x6f, 0xe3, 0x3b, 0xc1, 0xa6, 0xe6, 0xc8, 0xc7, 0x02, 0x88, 0x87, 0x7c, 0x50, 0x48, /* Byte value: 0x11 */ + 0x48, 0x3b, 0x5f, 0x1b, 0x81, 0x04, 0x2b, 0x2d, 0x7a, 0x20, 0x1c, 0x7c, 0x26, 0xad, 0xe6, 0x76, /* Byte value: 0x12 */ + 0x80, 0x06, 0x2a, 0x30, 0x24, 0x76, 0x1d, 0x50, 0x96, 0x36, 0x81, 0xdb, 0x7b, 0x88, 0xcf, 0x0c, /* Byte value: 0x13 */ + 0xd7, 0x60, 0xe5, 0x86, 0x05, 0x6c, 0x13, 0x49, 0x74, 0xe6, 0xc7, 0x2e, 0xbc, 0x57, 0xad, 0xc0, /* Byte value: 0x14 */ + 0x69, 0xdc, 0x2c, 0x2f, 0xa2, 0x26, 0x44, 0x71, 0x11, 0xf3, 0xf2, 0x24, 0xc6, 0x3b, 0xa9, 0x7b, /* Byte value: 0x15 */ + 0xee, 0xcf, 0x48, 0xb7, 0x50, 0x0f, 0xf3, 0x1a, 0x4c, 0x78, 0x2d, 0xa5, 0x91, 0x39, 0x42, 0x5d, /* Byte value: 0x16 */ + 0xd8, 0x4d, 0xe1, 0x2d, 0x40, 0x0c, 0x7d, 0x77, 0x8e, 0x60, 0x24, 0x84, 0x6a, 0x34, 0xe9, 0x9a, /* Byte value: 0x17 */ + 0x1b, 0x41, 0xb5, 0x4d, 0x08, 0xe0, 0x47, 0xd7, 0x61, 0x0c, 0xe5, 0xf1, 0x9c, 0xe7, 0xb4, 0x82, /* Byte value: 0x18 */ + 0x77, 0x86, 0x24, 0xba, 0x28, 0xe6, 0x98, 0x0d, 0x26, 0x3c, 0xf7, 0xb3, 0xa9, 0xfd, 0x21, 0xcf, /* Byte value: 0x19 */ + 0x91, 0x71, 0x26, 0x0e, 0xeb, 0xd6, 0xaf, 0x12, 0x5b, 0x7f, 0x67, 0xe6, 0xc2, 0x2d, 0x03, 0xe2, /* Byte value: 0x1a */ + 0x73, 0x9a, 0x01, 0x5a, 0x80, 0x18, 0xfa, 0xee, 0xdf, 0xc0, 0x48, 0xcb, 0xd4, 0x68, 0x11, 0xf7, /* Byte value: 0x1b */ + 0xe8, 0xdd, 0x9e, 0x27, 0xac, 0x8e, 0xa0, 0x69, 0x28, 0xfa, 0x2c, 0xe1, 0x33, 0x07, 0x6a, 0x79, /* Byte value: 0x1c */ + 0xa1, 0xe1, 0x59, 0x04, 0x07, 0x54, 0x72, 0x0c, 0xfd, 0xe5, 0x6f, 0x83, 0x9b, 0x1e, 0x80, 0x01, /* Byte value: 0x1d */ + 0x53, 0x7a, 0xea, 0x56, 0x89, 0xe4, 0x6c, 0xfa, 0x1b, 0x2c, 0xf9, 0x8d, 0xba, 0x4a, 0x52, 0xf4, /* Byte value: 0x1e */ + 0xc9, 0x3a, 0xed, 0x13, 0x8f, 0xac, 0xcf, 0x35, 0x43, 0x29, 0xc2, 0xb9, 0xd3, 0x91, 0x25, 0x74, /* Byte value: 0x1f */ + 0x8d, 0x25, 0xdd, 0xeb, 0x35, 0x69, 0x42, 0xfe, 0xf1, 0xce, 0xdc, 0x4d, 0x72, 0x40, 0x93, 0x4a, /* Byte value: 0x20 */ + 0xe7, 0xf0, 0x9a, 0x8c, 0xe9, 0xee, 0xce, 0x57, 0xd2, 0x7c, 0xcf, 0x4b, 0xe5, 0x64, 0x2e, 0x23, /* Byte value: 0x21 */ + 0x7f, 0xbe, 0x6e, 0xb9, 0xbb, 0xd9, 0x5c, 0x08, 0x17, 0x07, 0x4a, 0x43, 0x53, 0x14, 0x41, 0xbf, /* Byte value: 0x22 */ + 0x86, 0x14, 0xfc, 0xa0, 0xd8, 0xf7, 0x4e, 0x23, 0xf2, 0xb4, 0x80, 0x9f, 0xd9, 0xb6, 0xe7, 0x28, /* Byte value: 0x23 */ + 0x70, 0x93, 0x6a, 0x12, 0xfe, 0xb9, 0x32, 0x36, 0xed, 0x81, 0xa9, 0xe9, 0x85, 0x77, 0x05, 0xe5, /* Byte value: 0x24 */ + 0x4e, 0x29, 0x89, 0x8b, 0x7d, 0x85, 0x78, 0x5e, 0x1e, 0xa2, 0x1d, 0x38, 0x84, 0x93, 0xce, 0x52, /* Byte value: 0x25 */ + 0x1f, 0x5d, 0x90, 0xad, 0xa0, 0x1e, 0x25, 0x34, 0x98, 0xf0, 0x5a, 0x89, 0xe1, 0x72, 0x84, 0xba, /* Byte value: 0x26 */ + 0x63, 0xea, 0x95, 0x5c, 0x65, 0x66, 0xb1, 0xe4, 0xbd, 0xb6, 0xf1, 0xe8, 0xe3, 0x79, 0xd1, 0x17, /* Byte value: 0x27 */ + 0xe6, 0xf7, 0x02, 0xb4, 0xc3, 0x30, 0x37, 0x1f, 0x7d, 0x43, 0x90, 0x55, 0x6b, 0xd0, 0x22, 0x2d, /* Byte value: 0x28 */ + 0xa7, 0xf3, 0x8f, 0x94, 0xfb, 0xd5, 0x21, 0x7f, 0x99, 0x67, 0x6e, 0xc7, 0x39, 0x20, 0xa8, 0x25, /* Byte value: 0x29 */ + 0x35, 0x8b, 0xc2, 0xd2, 0x6e, 0xa2, 0x46, 0xb5, 0xf0, 0x59, 0xe8, 0x03, 0xaa, 0x12, 0xbf, 0xd5, /* Byte value: 0x2a */ + 0x20, 0xe0, 0xeb, 0x0c, 0x09, 0xfc, 0x96, 0x14, 0xc4, 0xec, 0xb1, 0x46, 0x6e, 0x22, 0x43, 0x03, /* Byte value: 0x2b */ + 0x0f, 0x2d, 0x04, 0xab, 0x45, 0x60, 0x6e, 0x3e, 0xfa, 0x86, 0xe3, 0xaa, 0xd6, 0x63, 0x44, 0x5a, /* Byte value: 0x2c */ + 0x16, 0x62, 0x42, 0x96, 0x19, 0xff, 0x18, 0x79, 0x06, 0xf4, 0xb8, 0x67, 0x95, 0x2f, 0xe8, 0xc4, /* Byte value: 0x2d */ + 0xf3, 0x9c, 0x2b, 0x6a, 0xa4, 0x6e, 0xe7, 0xbe, 0x49, 0xf6, 0xc9, 0x10, 0xaf, 0xe0, 0xde, 0xfb, /* Byte value: 0x2e */ + 0xaf, 0xcb, 0xc5, 0x97, 0x68, 0xea, 0xe5, 0x7a, 0xa8, 0x5c, 0xd3, 0x37, 0xc3, 0xc9, 0xc8, 0x55, /* Byte value: 0x2f */ + 0x22, 0xee, 0x18, 0x7c, 0x5d, 0x83, 0xa7, 0x84, 0x59, 0x92, 0x0f, 0x7a, 0xb1, 0x89, 0x5b, 0x1f, /* Byte value: 0x30 */ + 0xb9, 0xa9, 0x87, 0x01, 0x71, 0x15, 0xfd, 0x03, 0xae, 0xa8, 0x6b, 0x50, 0x56, 0xe6, 0x20, 0x91, /* Byte value: 0x31 */ + 0x1e, 0x5a, 0x08, 0x95, 0x8a, 0xc0, 0xdc, 0x7c, 0x37, 0xcf, 0x05, 0x97, 0x6f, 0xc6, 0x88, 0xb4, /* Byte value: 0x32 */ + 0x25, 0xfb, 0x56, 0xd4, 0x8b, 0xdc, 0x0d, 0xbf, 0x92, 0x2f, 0x51, 0x20, 0x9d, 0x03, 0x7f, 0x35, /* Byte value: 0x33 */ + 0xba, 0xa0, 0xec, 0x49, 0x0f, 0xb4, 0x35, 0xdb, 0x9c, 0xe9, 0x8a, 0x72, 0x07, 0xf9, 0x34, 0x83, /* Byte value: 0x34 */ + 0xbd, 0xb5, 0xa2, 0xe1, 0xd9, 0xeb, 0x9f, 0xe0, 0x57, 0x54, 0xd4, 0x28, 0x2b, 0x73, 0x10, 0xa9, /* Byte value: 0x35 */ + 0x8e, 0x2c, 0xb6, 0xa3, 0x4b, 0xc8, 0x8a, 0x26, 0xc3, 0x8f, 0x3d, 0x6f, 0x23, 0x5f, 0x87, 0x58, /* Byte value: 0x36 */ + 0x5c, 0x57, 0xee, 0xfd, 0xcc, 0x84, 0x02, 0xc4, 0xe1, 0xaa, 0x1a, 0x27, 0x6c, 0x29, 0x16, 0xae, /* Byte value: 0x37 */ + 0x41, 0x04, 0x8d, 0x20, 0x38, 0xe5, 0x16, 0x60, 0xe4, 0x24, 0xfe, 0x92, 0x52, 0xf0, 0x8a, 0x08, /* Byte value: 0x38 */ + 0x6f, 0xce, 0xfa, 0xbf, 0x5e, 0xa7, 0x17, 0x02, 0x75, 0x71, 0xf3, 0x60, 0x64, 0x05, 0x81, 0x5f, /* Byte value: 0x39 */ + 0x42, 0x0d, 0xe6, 0x68, 0x46, 0x44, 0xde, 0xb8, 0xd6, 0x65, 0x1f, 0xb0, 0x03, 0xef, 0x9e, 0x1a, /* Byte value: 0x3a */ + 0x46, 0x11, 0xc3, 0x88, 0xee, 0xba, 0xbc, 0x5b, 0x2f, 0x99, 0xa0, 0xc8, 0x7e, 0x7a, 0xae, 0x22, /* Byte value: 0x3b */ + 0x2b, 0xd1, 0xca, 0x47, 0xe4, 0x62, 0x9a, 0xc9, 0xc7, 0x96, 0xed, 0x94, 0xc5, 0xd4, 0x37, 0x61, /* Byte value: 0x3c */ + 0xdc, 0x51, 0xc4, 0xcd, 0xe8, 0xf2, 0x1f, 0x94, 0x77, 0x9c, 0x9b, 0xfc, 0x17, 0xa1, 0xd9, 0xa2, /* Byte value: 0x3d */ + 0xdf, 0x58, 0xaf, 0x85, 0x96, 0x53, 0xd7, 0x4c, 0x45, 0xdd, 0x7a, 0xde, 0x46, 0xbe, 0xcd, 0xb0, /* Byte value: 0x3e */ + 0x43, 0x0a, 0x7e, 0x50, 0x6c, 0x9a, 0x27, 0xf0, 0x79, 0x5a, 0x40, 0xae, 0x8d, 0x5b, 0x92, 0x14, /* Byte value: 0x3f */ + 0xe3, 0xec, 0xbf, 0x6c, 0x41, 0x10, 0xac, 0xb4, 0x2b, 0x80, 0x70, 0x33, 0x98, 0xf1, 0x1e, 0x1b, /* Byte value: 0x40 */ + 0x29, 0xdf, 0x39, 0x37, 0xb0, 0x1d, 0xab, 0x59, 0x5a, 0xe8, 0x53, 0xa8, 0x1a, 0x7f, 0x2f, 0x7d, /* Byte value: 0x41 */ + 0xb4, 0x8a, 0x70, 0xda, 0x60, 0x0a, 0xa2, 0xad, 0xc9, 0x50, 0x36, 0xc6, 0x5f, 0x2e, 0x7c, 0xd7, /* Byte value: 0x42 */ + 0xcb, 0x34, 0x1e, 0x63, 0xdb, 0xd3, 0xfe, 0xa5, 0xde, 0x57, 0x7c, 0x85, 0x0c, 0x3a, 0x3d, 0x68, /* Byte value: 0x43 */ + 0x32, 0x9e, 0x8c, 0x7a, 0xb8, 0xfd, 0xec, 0x8e, 0x3b, 0xe4, 0xb6, 0x59, 0x86, 0x98, 0x9b, 0xff, /* Byte value: 0x44 */ + 0xda, 0x43, 0x12, 0x5d, 0x14, 0x73, 0x4c, 0xe7, 0x13, 0x1e, 0x9a, 0xb8, 0xb5, 0x9f, 0xf1, 0x86, /* Byte value: 0x45 */ + 0xea, 0xd3, 0x6d, 0x57, 0xf8, 0xf1, 0x91, 0xf9, 0xb5, 0x84, 0x92, 0xdd, 0xec, 0xac, 0x72, 0x65, /* Byte value: 0x46 */ + 0xbe, 0xbc, 0xc9, 0xa9, 0xa7, 0x4a, 0x57, 0x38, 0x65, 0x15, 0x35, 0x0a, 0x7a, 0x6c, 0x04, 0xbb, /* Byte value: 0x47 */ + 0x03, 0x09, 0x6b, 0x48, 0x7e, 0xa1, 0xc8, 0xd8, 0x32, 0x41, 0xe1, 0x22, 0x51, 0x1f, 0x14, 0x12, /* Byte value: 0x48 */ + 0xa5, 0xfd, 0x7c, 0xe4, 0xaf, 0xaa, 0x10, 0xef, 0x04, 0x19, 0xd0, 0xfb, 0xe6, 0x8b, 0xb0, 0x39, /* Byte value: 0x49 */ + 0xa4, 0xfa, 0xe4, 0xdc, 0x85, 0x74, 0xe9, 0xa7, 0xab, 0x26, 0x8f, 0xe5, 0x68, 0x3f, 0xbc, 0x37, /* Byte value: 0x4a */ + 0xab, 0xd7, 0xe0, 0x77, 0xc0, 0x14, 0x87, 0x99, 0x51, 0xa0, 0x6c, 0x4f, 0xbe, 0x5c, 0xf8, 0x6d, /* Byte value: 0x4b */ + 0x64, 0xff, 0xdb, 0xf4, 0xb3, 0x39, 0x1b, 0xdf, 0x76, 0x0b, 0xaf, 0xb2, 0xcf, 0xf3, 0xf5, 0x3d, /* Byte value: 0x4c */ + 0xad, 0xc5, 0x36, 0xe7, 0x3c, 0x95, 0xd4, 0xea, 0x35, 0x22, 0x6d, 0x0b, 0x1c, 0x62, 0xd0, 0x49, /* Byte value: 0x4d */ + 0x4f, 0x2e, 0x11, 0xb3, 0x57, 0x5b, 0x81, 0x16, 0xb1, 0x9d, 0x42, 0x26, 0x0a, 0x27, 0xc2, 0x5c, /* Byte value: 0x4e */ + 0x85, 0x1d, 0x97, 0xe8, 0xa6, 0x56, 0x86, 0xfb, 0xc0, 0xf5, 0x61, 0xbd, 0x88, 0xa9, 0xf3, 0x3a, /* Byte value: 0x4f */ + 0xa0, 0xe6, 0xc1, 0x3c, 0x2d, 0x8a, 0x8b, 0x44, 0x52, 0xda, 0x30, 0x9d, 0x15, 0xaa, 0x8c, 0x0f, /* Byte value: 0x50 */ + 0x13, 0x79, 0xff, 0x4e, 0x9b, 0xdf, 0x83, 0xd2, 0x50, 0x37, 0x58, 0x01, 0x66, 0x0e, 0xd4, 0xf2, /* Byte value: 0x51 */ + 0xd4, 0x69, 0x8e, 0xce, 0x7b, 0xcd, 0xdb, 0x91, 0x46, 0xa7, 0x26, 0x0c, 0xed, 0x48, 0xb9, 0xd2, /* Byte value: 0x52 */ + 0xfb, 0xa4, 0x61, 0x69, 0x37, 0x51, 0x23, 0xbb, 0x78, 0xcd, 0x74, 0xe0, 0x55, 0x09, 0xbe, 0x8b, /* Byte value: 0x53 */ + 0xae, 0xcc, 0x5d, 0xaf, 0x42, 0x34, 0x1c, 0x32, 0x07, 0x63, 0x8c, 0x29, 0x4d, 0x7d, 0xc4, 0x5b, /* Byte value: 0x54 */ + 0x94, 0x6a, 0x9b, 0xd6, 0x69, 0xf6, 0x34, 0xb9, 0x0d, 0xbc, 0x87, 0x80, 0x31, 0x0c, 0x3f, 0xd4, /* Byte value: 0x55 */ + 0xde, 0x5f, 0x37, 0xbd, 0xbc, 0x8d, 0x2e, 0x04, 0xea, 0xe2, 0x25, 0xc0, 0xc8, 0x0a, 0xc1, 0xbe, /* Byte value: 0x56 */ + 0xbb, 0xa7, 0x74, 0x71, 0x25, 0x6a, 0xcc, 0x93, 0x33, 0xd6, 0xd5, 0x6c, 0x89, 0x4d, 0x38, 0x8d, /* Byte value: 0x57 */ + 0xce, 0x2f, 0xa3, 0xbb, 0x59, 0xf3, 0x65, 0x0e, 0x88, 0x94, 0x9c, 0xe3, 0xff, 0x1b, 0x01, 0x5e, /* Byte value: 0x58 */ + 0xa2, 0xe8, 0x32, 0x4c, 0x79, 0xf5, 0xba, 0xd4, 0xcf, 0xa4, 0x8e, 0xa1, 0xca, 0x01, 0x94, 0x13, /* Byte value: 0x59 */ + 0xf1, 0x92, 0xd8, 0x1a, 0xf0, 0x11, 0xd6, 0x2e, 0xd4, 0x88, 0x77, 0x2c, 0x70, 0x4b, 0xc6, 0xe7, /* Byte value: 0x5a */ + 0x3d, 0xb3, 0x88, 0xd1, 0xfd, 0x9d, 0x82, 0xb0, 0xc1, 0x62, 0x55, 0xf3, 0x50, 0xfb, 0xdf, 0xa5, /* Byte value: 0x5b */ + 0xb6, 0x84, 0x83, 0xaa, 0x34, 0x75, 0x93, 0x3d, 0x54, 0x2e, 0x88, 0xfa, 0x80, 0x85, 0x64, 0xcb, /* Byte value: 0x5c */ + 0x61, 0xe4, 0x66, 0x2c, 0x31, 0x19, 0x80, 0x74, 0x20, 0xc8, 0x4f, 0xd4, 0x3c, 0xd2, 0xc9, 0x0b, /* Byte value: 0x5d */ + 0x36, 0x82, 0xa9, 0x9a, 0x10, 0x03, 0x8e, 0x6d, 0xc2, 0x18, 0x09, 0x21, 0xfb, 0x0d, 0xab, 0xc7, /* Byte value: 0x5e */ + 0xec, 0xc1, 0xbb, 0xc7, 0x04, 0x70, 0xc2, 0x8a, 0xd1, 0x06, 0x93, 0x99, 0x4e, 0x92, 0x5a, 0x41, /* Byte value: 0x5f */ + 0xc8, 0x3d, 0x75, 0x2b, 0xa5, 0x72, 0x36, 0x7d, 0xec, 0x16, 0x9d, 0xa7, 0x5d, 0x25, 0x29, 0x7a, /* Byte value: 0x60 */ + 0x52, 0x7d, 0x72, 0x6e, 0xa3, 0x3a, 0x95, 0xb2, 0xb4, 0x13, 0xa6, 0x93, 0x34, 0xfe, 0x5e, 0xfa, /* Byte value: 0x61 */ + 0xb2, 0x98, 0xa6, 0x4a, 0x9c, 0x8b, 0xf1, 0xde, 0xad, 0xd2, 0x37, 0x82, 0xfd, 0x10, 0x54, 0xf3, /* Byte value: 0x62 */ + 0xd0, 0x75, 0xab, 0x2e, 0xd3, 0x33, 0xb9, 0x72, 0xbf, 0x5b, 0x99, 0x74, 0x90, 0xdd, 0x89, 0xea, /* Byte value: 0x63 */ + 0x72, 0x9d, 0x99, 0x62, 0xaa, 0xc6, 0x03, 0xa6, 0x70, 0xff, 0x17, 0xd5, 0x5a, 0xdc, 0x1d, 0xf9, /* Byte value: 0x64 */ + 0xeb, 0xd4, 0xf5, 0x6f, 0xd2, 0x2f, 0x68, 0xb1, 0x1a, 0xbb, 0xcd, 0xc3, 0x62, 0x18, 0x7e, 0x6b, /* Byte value: 0x65 */ + 0x96, 0x64, 0x68, 0xa6, 0x3d, 0x89, 0x05, 0x29, 0x90, 0xc2, 0x39, 0xbc, 0xee, 0xa7, 0x27, 0xc8, /* Byte value: 0x66 */ + 0x0e, 0x2a, 0x9c, 0x93, 0x6f, 0xbe, 0x97, 0x76, 0x55, 0xb9, 0xbc, 0xb4, 0x58, 0xd7, 0x48, 0x54, /* Byte value: 0x67 */ + 0xe2, 0xeb, 0x27, 0x54, 0x6b, 0xce, 0x55, 0xfc, 0x84, 0xbf, 0x2f, 0x2d, 0x16, 0x45, 0x12, 0x15, /* Byte value: 0x68 */ + 0x56, 0x61, 0x57, 0x8e, 0x0b, 0xc4, 0xf7, 0x51, 0x4d, 0xef, 0x19, 0xeb, 0x49, 0x6b, 0x6e, 0xc2, /* Byte value: 0x69 */ + 0x4c, 0x27, 0x7a, 0xfb, 0x29, 0xfa, 0x49, 0xce, 0x83, 0xdc, 0xa3, 0x04, 0x5b, 0x38, 0xd6, 0x4e, /* Byte value: 0x6a */ + 0x40, 0x03, 0x15, 0x18, 0x12, 0x3b, 0xef, 0x28, 0x4b, 0x1b, 0xa1, 0x8c, 0xdc, 0x44, 0x86, 0x06, /* Byte value: 0x6b */ + 0x37, 0x85, 0x31, 0xa2, 0x3a, 0xdd, 0x77, 0x25, 0x6d, 0x27, 0x56, 0x3f, 0x75, 0xb9, 0xa7, 0xc9, /* Byte value: 0x6c */ + 0x92, 0x78, 0x4d, 0x46, 0x95, 0x77, 0x67, 0xca, 0x69, 0x3e, 0x86, 0xc4, 0x93, 0x32, 0x17, 0xf0, /* Byte value: 0x6d */ + 0x44, 0x1f, 0x30, 0xf8, 0xba, 0xc5, 0x8d, 0xcb, 0xb2, 0xe7, 0x1e, 0xf4, 0xa1, 0xd1, 0xb6, 0x3e, /* Byte value: 0x6e */ + 0x8f, 0x2b, 0x2e, 0x9b, 0x61, 0x16, 0x73, 0x6e, 0x6c, 0xb0, 0x62, 0x71, 0xad, 0xeb, 0x8b, 0x56, /* Byte value: 0x6f */ + 0x59, 0x4c, 0x53, 0x25, 0x4e, 0xa4, 0x99, 0x6f, 0xb7, 0x69, 0xfa, 0x41, 0x9f, 0x08, 0x2a, 0x98, /* Byte value: 0x70 */ + 0xdb, 0x44, 0x8a, 0x65, 0x3e, 0xad, 0xb5, 0xaf, 0xbc, 0x21, 0xc5, 0xa6, 0x3b, 0x2b, 0xfd, 0x88, /* Byte value: 0x71 */ + 0x6d, 0xc0, 0x09, 0xcf, 0x0a, 0xd8, 0x26, 0x92, 0xe8, 0x0f, 0x4d, 0x5c, 0xbb, 0xae, 0x99, 0x43, /* Byte value: 0x72 */ + 0x8c, 0x22, 0x45, 0xd3, 0x1f, 0xb7, 0xbb, 0xb6, 0x5e, 0xf1, 0x83, 0x53, 0xfc, 0xf4, 0x9f, 0x44, /* Byte value: 0x73 */ + 0xd3, 0x7c, 0xc0, 0x66, 0xad, 0x92, 0x71, 0xaa, 0x8d, 0x1a, 0x78, 0x56, 0xc1, 0xc2, 0x9d, 0xf8, /* Byte value: 0x74 */ + 0x88, 0x3e, 0x60, 0x33, 0xb7, 0x49, 0xd9, 0x55, 0xa7, 0x0d, 0x3c, 0x2b, 0x81, 0x61, 0xaf, 0x7c, /* Byte value: 0x75 */ + 0x47, 0x16, 0x5b, 0xb0, 0xc4, 0x64, 0x45, 0x13, 0x80, 0xa6, 0xff, 0xd6, 0xf0, 0xce, 0xa2, 0x2c, /* Byte value: 0x76 */ + 0xe5, 0xfe, 0x69, 0xfc, 0xbd, 0x91, 0xff, 0xc7, 0x4f, 0x02, 0x71, 0x77, 0x3a, 0xcf, 0x36, 0x3f, /* Byte value: 0x77 */ + 0x2f, 0xcd, 0xef, 0xa7, 0x4c, 0x9c, 0xf8, 0x2a, 0x3e, 0x6a, 0x52, 0xec, 0xb8, 0x41, 0x07, 0x59, /* Byte value: 0x78 */ + 0x12, 0x7e, 0x67, 0x76, 0xb1, 0x01, 0x7a, 0x9a, 0xff, 0x08, 0x07, 0x1f, 0xe8, 0xba, 0xd8, 0xfc, /* Byte value: 0x79 */ + 0x8b, 0x37, 0x0b, 0x7b, 0xc9, 0xe8, 0x11, 0x8d, 0x95, 0x4c, 0xdd, 0x09, 0xd0, 0x7e, 0xbb, 0x6e, /* Byte value: 0x7a */ + 0x11, 0x77, 0x0c, 0x3e, 0xcf, 0xa0, 0xb2, 0x42, 0xcd, 0x49, 0xe6, 0x3d, 0xb9, 0xa5, 0xcc, 0xee, /* Byte value: 0x7b */ + 0x54, 0x6f, 0xa4, 0xfe, 0x5f, 0xbb, 0xc6, 0xc1, 0xd0, 0x91, 0xa7, 0xd7, 0x96, 0xc0, 0x76, 0xde, /* Byte value: 0x7c */ + 0xa8, 0xde, 0x8b, 0x3f, 0xbe, 0xb5, 0x4f, 0x41, 0x63, 0xe1, 0x8d, 0x6d, 0xef, 0x43, 0xec, 0x7f, /* Byte value: 0x7d */ + 0x87, 0x13, 0x64, 0x98, 0xf2, 0x29, 0xb7, 0x6b, 0x5d, 0x8b, 0xdf, 0x81, 0x57, 0x02, 0xeb, 0x26, /* Byte value: 0x7e */ + 0x2d, 0xc3, 0x1c, 0xd7, 0x18, 0xe3, 0xc9, 0xba, 0xa3, 0x14, 0xec, 0xd0, 0x67, 0xea, 0x1f, 0x45, /* Byte value: 0x7f */ + 0x5d, 0x50, 0x76, 0xc5, 0xe6, 0x5a, 0xfb, 0x8c, 0x4e, 0x95, 0x45, 0x39, 0xe2, 0x9d, 0x1a, 0xa0, /* Byte value: 0x80 */ + 0x9d, 0x55, 0x49, 0xed, 0xd0, 0x17, 0x09, 0xf4, 0x93, 0xb8, 0x65, 0x6e, 0x45, 0x51, 0x53, 0xaa, /* Byte value: 0x81 */ + 0x39, 0xaf, 0xad, 0x31, 0x55, 0x63, 0xe0, 0x53, 0x38, 0x9e, 0xea, 0x8b, 0x2d, 0x6e, 0xef, 0x9d, /* Byte value: 0x82 */ + 0x5f, 0x5e, 0x85, 0xb5, 0xb2, 0x25, 0xca, 0x1c, 0xd3, 0xeb, 0xfb, 0x05, 0x3d, 0x36, 0x02, 0xbc, /* Byte value: 0x83 */ + 0x26, 0xf2, 0x3d, 0x9c, 0xf5, 0x7d, 0xc5, 0x67, 0xa0, 0x6e, 0xb0, 0x02, 0xcc, 0x1c, 0x6b, 0x27, /* Byte value: 0x84 */ + 0x05, 0x1b, 0xbd, 0xd8, 0x82, 0x20, 0x9b, 0xab, 0x56, 0xc3, 0xe0, 0x66, 0xf3, 0x21, 0x3c, 0x36, /* Byte value: 0x85 */ + 0xd5, 0x6e, 0x16, 0xf6, 0x51, 0x13, 0x22, 0xd9, 0xe9, 0x98, 0x79, 0x12, 0x63, 0xfc, 0xb5, 0xdc, /* Byte value: 0x86 */ + 0xfc, 0xb1, 0x2f, 0xc1, 0xe1, 0x0e, 0x89, 0x80, 0xb3, 0x70, 0x2a, 0xba, 0x79, 0x83, 0x9a, 0xa1, /* Byte value: 0x87 */ + 0x19, 0x4f, 0x46, 0x3d, 0x5c, 0x9f, 0x76, 0x47, 0xfc, 0x72, 0x5b, 0xcd, 0x43, 0x4c, 0xac, 0x9e, /* Byte value: 0x88 */ + 0x09, 0x3f, 0xd2, 0x3b, 0xb9, 0xe1, 0x3d, 0x4d, 0x9e, 0x04, 0xe2, 0xee, 0x74, 0x5d, 0x6c, 0x7e, /* Byte value: 0x89 */ + 0xb3, 0x9f, 0x3e, 0x72, 0xb6, 0x55, 0x08, 0x96, 0x02, 0xed, 0x68, 0x9c, 0x73, 0xa4, 0x58, 0xfd, /* Byte value: 0x8a */ + 0xfa, 0xa3, 0xf9, 0x51, 0x1d, 0x8f, 0xda, 0xf3, 0xd7, 0xf2, 0x2b, 0xfe, 0xdb, 0xbd, 0xb2, 0x85, /* Byte value: 0x8b */ + 0xef, 0xc8, 0xd0, 0x8f, 0x7a, 0xd1, 0x0a, 0x52, 0xe3, 0x47, 0x72, 0xbb, 0x1f, 0x8d, 0x4e, 0x53, /* Byte value: 0x8c */ + 0x0a, 0x36, 0xb9, 0x73, 0xc7, 0x40, 0xf5, 0x95, 0xac, 0x45, 0x03, 0xcc, 0x25, 0x42, 0x78, 0x6c, /* Byte value: 0x8d */ + 0x30, 0x90, 0x7f, 0x0a, 0xec, 0x82, 0xdd, 0x1e, 0xa6, 0x9a, 0x08, 0x65, 0x59, 0x33, 0x83, 0xe3, /* Byte value: 0x8e */ + 0xcd, 0x26, 0xc8, 0xf3, 0x27, 0x52, 0xad, 0xd6, 0xba, 0xd5, 0x7d, 0xc1, 0xae, 0x04, 0x15, 0x4c, /* Byte value: 0x8f */ + 0xd6, 0x67, 0x7d, 0xbe, 0x2f, 0xb2, 0xea, 0x01, 0xdb, 0xd9, 0x98, 0x30, 0x32, 0xe3, 0xa1, 0xce, /* Byte value: 0x90 */ + 0x6b, 0xd2, 0xdf, 0x5f, 0xf6, 0x59, 0x75, 0xe1, 0x8c, 0x8d, 0x4c, 0x18, 0x19, 0x90, 0xb1, 0x67, /* Byte value: 0x91 */ + 0x08, 0x38, 0x4a, 0x03, 0x93, 0x3f, 0xc4, 0x05, 0x31, 0x3b, 0xbd, 0xf0, 0xfa, 0xe9, 0x60, 0x70, /* Byte value: 0x92 */ + 0xb5, 0x8d, 0xe8, 0xe2, 0x4a, 0xd4, 0x5b, 0xe5, 0x66, 0x6f, 0x69, 0xd8, 0xd1, 0x9a, 0x70, 0xd9, /* Byte value: 0x93 */ + 0x6e, 0xc9, 0x62, 0x87, 0x74, 0x79, 0xee, 0x4a, 0xda, 0x4e, 0xac, 0x7e, 0xea, 0xb1, 0x8d, 0x51, /* Byte value: 0x94 */ + 0x65, 0xf8, 0x43, 0xcc, 0x99, 0xe7, 0xe2, 0x97, 0xd9, 0x34, 0xf0, 0xac, 0x41, 0x47, 0xf9, 0x33, /* Byte value: 0x95 */ + 0xf5, 0x8e, 0xfd, 0xfa, 0x58, 0xef, 0xb4, 0xcd, 0x2d, 0x74, 0xc8, 0x54, 0x0d, 0xde, 0xf6, 0xdf, /* Byte value: 0x96 */ + 0xaa, 0xd0, 0x78, 0x4f, 0xea, 0xca, 0x7e, 0xd1, 0xfe, 0x9f, 0x33, 0x51, 0x30, 0xe8, 0xf4, 0x63, /* Byte value: 0x97 */ + 0x74, 0x8f, 0x4f, 0xf2, 0x56, 0x47, 0x50, 0xd5, 0x14, 0x7d, 0x16, 0x91, 0xf8, 0xe2, 0x35, 0xdd, /* Byte value: 0x98 */ + 0x4b, 0x32, 0x34, 0x53, 0xff, 0xa5, 0xe3, 0xf5, 0x48, 0x61, 0xfd, 0x5e, 0x77, 0xb2, 0xf2, 0x64, /* Byte value: 0x99 */ + 0xff, 0xb8, 0x44, 0x89, 0x9f, 0xaf, 0x41, 0x58, 0x81, 0x31, 0xcb, 0x98, 0x28, 0x9c, 0x8e, 0xb3, /* Byte value: 0x9a */ + 0x81, 0x01, 0xb2, 0x08, 0x0e, 0xa8, 0xe4, 0x18, 0x39, 0x09, 0xde, 0xc5, 0xf5, 0x3c, 0xc3, 0x02, /* Byte value: 0x9b */ + 0xc1, 0x02, 0xa7, 0x10, 0x1c, 0x93, 0x0b, 0x30, 0x72, 0x12, 0x7f, 0x49, 0x29, 0x78, 0x45, 0x04, /* Byte value: 0x9c */ + 0xd1, 0x72, 0x33, 0x16, 0xf9, 0xed, 0x40, 0x3a, 0x10, 0x64, 0xc6, 0x6a, 0x1e, 0x69, 0x85, 0xe4, /* Byte value: 0x9d */ + 0x28, 0xd8, 0xa1, 0x0f, 0x9a, 0xc3, 0x52, 0x11, 0xf5, 0xd7, 0x0c, 0xb6, 0x94, 0xcb, 0x23, 0x73, /* Byte value: 0x9e */ + 0xb1, 0x91, 0xcd, 0x02, 0xe2, 0x2a, 0x39, 0x06, 0x9f, 0x93, 0xd6, 0xa0, 0xac, 0x0f, 0x40, 0xe1, /* Byte value: 0x9f */ + 0x9b, 0x47, 0x9f, 0x7d, 0x2c, 0x96, 0x5a, 0x87, 0xf7, 0x3a, 0x64, 0x2a, 0xe7, 0x6f, 0x7b, 0x8e, /* Byte value: 0xa0 */ + 0xdd, 0x56, 0x5c, 0xf5, 0xc2, 0x2c, 0xe6, 0xdc, 0xd8, 0xa3, 0xc4, 0xe2, 0x99, 0x15, 0xd5, 0xac, /* Byte value: 0xa1 */ + 0x23, 0xe9, 0x80, 0x44, 0x77, 0x5d, 0x5e, 0xcc, 0xf6, 0xad, 0x50, 0x64, 0x3f, 0x3d, 0x57, 0x11, /* Byte value: 0xa2 */ + 0x3f, 0xbd, 0x7b, 0xa1, 0xa9, 0xe2, 0xb3, 0x20, 0x5c, 0x1c, 0xeb, 0xcf, 0x8f, 0x50, 0xc7, 0xb9, /* Byte value: 0xa3 */ + 0x02, 0x0e, 0xf3, 0x70, 0x54, 0x7f, 0x31, 0x90, 0x9d, 0x7e, 0xbe, 0x3c, 0xdf, 0xab, 0x18, 0x1c, /* Byte value: 0xa4 */ + 0x10, 0x70, 0x94, 0x06, 0xe5, 0x7e, 0x4b, 0x0a, 0x62, 0x76, 0xb9, 0x23, 0x37, 0x11, 0xc0, 0xe0, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x1a, 0x46, 0x2d, 0x75, 0x22, 0x3e, 0xbe, 0x9f, 0xce, 0x33, 0xba, 0xef, 0x12, 0x53, 0xb8, 0x8c, /* Byte value: 0xa7 */ + 0x60, 0xe3, 0xfe, 0x14, 0x1b, 0xc7, 0x79, 0x3c, 0x8f, 0xf7, 0x10, 0xca, 0xb2, 0x66, 0xc5, 0x05, /* Byte value: 0xa8 */ + 0x5a, 0x45, 0x38, 0x6d, 0x30, 0x05, 0x51, 0xb7, 0x85, 0x28, 0x1b, 0x63, 0xce, 0x17, 0x3e, 0x8a, /* Byte value: 0xa9 */ + 0x3e, 0xba, 0xe3, 0x99, 0x83, 0x3c, 0x4a, 0x68, 0xf3, 0x23, 0xb4, 0xd1, 0x01, 0xe4, 0xcb, 0xb7, /* Byte value: 0xaa */ + 0x6a, 0xd5, 0x47, 0x67, 0xdc, 0x87, 0x8c, 0xa9, 0x23, 0xb2, 0x13, 0x06, 0x97, 0x24, 0xbd, 0x69, /* Byte value: 0xab */ + 0x71, 0x94, 0xf2, 0x2a, 0xd4, 0x67, 0xcb, 0x7e, 0x42, 0xbe, 0xf6, 0xf7, 0x0b, 0xc3, 0x09, 0xeb, /* Byte value: 0xac */ + 0x75, 0x88, 0xd7, 0xca, 0x7c, 0x99, 0xa9, 0x9d, 0xbb, 0x42, 0x49, 0x8f, 0x76, 0x56, 0x39, 0xd3, /* Byte value: 0xad */ + 0xb7, 0x83, 0x1b, 0x92, 0x1e, 0xab, 0x6a, 0x75, 0xfb, 0x11, 0xd7, 0xe4, 0x0e, 0x31, 0x68, 0xc5, /* Byte value: 0xae */ + 0x7a, 0xa5, 0xd3, 0x61, 0x39, 0xf9, 0xc7, 0xa3, 0x41, 0xc4, 0xaa, 0x25, 0xa0, 0x35, 0x7d, 0x89, /* Byte value: 0xaf */ + 0xd9, 0x4a, 0x79, 0x15, 0x6a, 0xd2, 0x84, 0x3f, 0x21, 0x5f, 0x7b, 0x9a, 0xe4, 0x80, 0xe5, 0x94, /* Byte value: 0xb0 */ + 0x6c, 0xc7, 0x91, 0xf7, 0x20, 0x06, 0xdf, 0xda, 0x47, 0x30, 0x12, 0x42, 0x35, 0x1a, 0x95, 0x4d, /* Byte value: 0xb1 */ + 0x93, 0x7f, 0xd5, 0x7e, 0xbf, 0xa9, 0x9e, 0x82, 0xc6, 0x01, 0xd9, 0xda, 0x1d, 0x86, 0x1b, 0xfe, /* Byte value: 0xb2 */ + 0x45, 0x18, 0xa8, 0xc0, 0x90, 0x1b, 0x74, 0x83, 0x1d, 0xd8, 0x41, 0xea, 0x2f, 0x65, 0xba, 0x30, /* Byte value: 0xb3 */ + 0x9a, 0x40, 0x07, 0x45, 0x06, 0x48, 0xa3, 0xcf, 0x58, 0x05, 0x3b, 0x34, 0x69, 0xdb, 0x77, 0x80, /* Byte value: 0xb4 */ + 0x89, 0x39, 0xf8, 0x0b, 0x9d, 0x97, 0x20, 0x1d, 0x08, 0x32, 0x63, 0x35, 0x0f, 0xd5, 0xa3, 0x72, /* Byte value: 0xb5 */ + 0x3a, 0xa6, 0xc6, 0x79, 0x2b, 0xc2, 0x28, 0x8b, 0x0a, 0xdf, 0x0b, 0xa9, 0x7c, 0x71, 0xfb, 0x8f, /* Byte value: 0xb6 */ + 0x78, 0xab, 0x20, 0x11, 0x6d, 0x86, 0xf6, 0x33, 0xdc, 0xba, 0x14, 0x19, 0x7f, 0x9e, 0x65, 0x95, /* Byte value: 0xb7 */ + 0x1d, 0x53, 0x63, 0xdd, 0xf4, 0x61, 0x14, 0xa4, 0x05, 0x8e, 0xe4, 0xb5, 0x3e, 0xd9, 0x9c, 0xa6, /* Byte value: 0xb8 */ + 0x8a, 0x30, 0x93, 0x43, 0xe3, 0x36, 0xe8, 0xc5, 0x3a, 0x73, 0x82, 0x17, 0x5e, 0xca, 0xb7, 0x60, /* Byte value: 0xb9 */ + 0x97, 0x63, 0xf0, 0x9e, 0x17, 0x57, 0xfc, 0x61, 0x3f, 0xfd, 0x66, 0xa2, 0x60, 0x13, 0x2b, 0xc6, /* Byte value: 0xba */ + 0xf8, 0xad, 0x0a, 0x21, 0x49, 0xf0, 0xeb, 0x63, 0x4a, 0x8c, 0x95, 0xc2, 0x04, 0x16, 0xaa, 0x99, /* Byte value: 0xbb */ + 0xf9, 0xaa, 0x92, 0x19, 0x63, 0x2e, 0x12, 0x2b, 0xe5, 0xb3, 0xca, 0xdc, 0x8a, 0xa2, 0xa6, 0x97, /* Byte value: 0xbc */ + 0x58, 0x4b, 0xcb, 0x1d, 0x64, 0x7a, 0x60, 0x27, 0x18, 0x56, 0xa5, 0x5f, 0x11, 0xbc, 0x26, 0x96, /* Byte value: 0xbd */ + 0x2c, 0xc4, 0x84, 0xef, 0x32, 0x3d, 0x30, 0xf2, 0x0c, 0x2b, 0xb3, 0xce, 0xe9, 0x5e, 0x13, 0x4b, /* Byte value: 0xbe */ + 0x06, 0x12, 0xd6, 0x90, 0xfc, 0x81, 0x53, 0x73, 0x64, 0x82, 0x01, 0x44, 0xa2, 0x3e, 0x28, 0x24, /* Byte value: 0xbf */ + 0xbc, 0xb2, 0x3a, 0xd9, 0xf3, 0x35, 0x66, 0xa8, 0xf8, 0x6b, 0x8b, 0x36, 0xa5, 0xc7, 0x1c, 0xa7, /* Byte value: 0xc0 */ + 0x9c, 0x52, 0xd1, 0xd5, 0xfa, 0xc9, 0xf0, 0xbc, 0x3c, 0x87, 0x3a, 0x70, 0xcb, 0xe5, 0x5f, 0xa4, /* Byte value: 0xc1 */ + 0x55, 0x68, 0x3c, 0xc6, 0x75, 0x65, 0x3f, 0x89, 0x7f, 0xae, 0xf8, 0xc9, 0x18, 0x74, 0x7a, 0xd0, /* Byte value: 0xc2 */ + 0x7c, 0xb7, 0x05, 0xf1, 0xc5, 0x78, 0x94, 0xd0, 0x25, 0x46, 0xab, 0x61, 0x02, 0x0b, 0x55, 0xad, /* Byte value: 0xc3 */ + 0x2a, 0xd6, 0x52, 0x7f, 0xce, 0xbc, 0x63, 0x81, 0x68, 0xa9, 0xb2, 0x8a, 0x4b, 0x60, 0x3b, 0x6f, /* Byte value: 0xc4 */ + 0x3b, 0xa1, 0x5e, 0x41, 0x01, 0x1c, 0xd1, 0xc3, 0xa5, 0xe0, 0x54, 0xb7, 0xf2, 0xc5, 0xf7, 0x81, /* Byte value: 0xc5 */ + 0x9f, 0x5b, 0xba, 0x9d, 0x84, 0x68, 0x38, 0x64, 0x0e, 0xc6, 0xdb, 0x52, 0x9a, 0xfa, 0x4b, 0xb6, /* Byte value: 0xc6 */ + 0xc6, 0x17, 0xe9, 0xb8, 0xca, 0xcc, 0xa1, 0x0b, 0xb9, 0xaf, 0x21, 0x13, 0x05, 0xf2, 0x61, 0x2e, /* Byte value: 0xc7 */ + 0x1c, 0x54, 0xfb, 0xe5, 0xde, 0xbf, 0xed, 0xec, 0xaa, 0xb1, 0xbb, 0xab, 0xb0, 0x6d, 0x90, 0xa8, /* Byte value: 0xc8 */ + 0xfe, 0xbf, 0xdc, 0xb1, 0xb5, 0x71, 0xb8, 0x10, 0x2e, 0x0e, 0x94, 0x86, 0xa6, 0x28, 0x82, 0xbd, /* Byte value: 0xc9 */ + 0x62, 0xed, 0x0d, 0x64, 0x4f, 0xb8, 0x48, 0xac, 0x12, 0x89, 0xae, 0xf6, 0x6d, 0xcd, 0xdd, 0x19, /* Byte value: 0xca */ + 0x7d, 0xb0, 0x9d, 0xc9, 0xef, 0xa6, 0x6d, 0x98, 0x8a, 0x79, 0xf4, 0x7f, 0x8c, 0xbf, 0x59, 0xa3, /* Byte value: 0xcb */ + 0x21, 0xe7, 0x73, 0x34, 0x23, 0x22, 0x6f, 0x5c, 0x6b, 0xd3, 0xee, 0x58, 0xe0, 0x96, 0x4f, 0x0d, /* Byte value: 0xcc */ + 0xc0, 0x05, 0x3f, 0x28, 0x36, 0x4d, 0xf2, 0x78, 0xdd, 0x2d, 0x20, 0x57, 0xa7, 0xcc, 0x49, 0x0a, /* Byte value: 0xcd */ + 0xf2, 0x9b, 0xb3, 0x52, 0x8e, 0xb0, 0x1e, 0xf6, 0xe6, 0xc9, 0x96, 0x0e, 0x21, 0x54, 0xd2, 0xf5, /* Byte value: 0xce */ + 0xf7, 0x80, 0x0e, 0x8a, 0x0c, 0x90, 0x85, 0x5d, 0xb0, 0x0a, 0x76, 0x68, 0xd2, 0x75, 0xee, 0xc3, /* Byte value: 0xcf */ + 0x33, 0x99, 0x14, 0x42, 0x92, 0x23, 0x15, 0xc6, 0x94, 0xdb, 0xe9, 0x47, 0x08, 0x2c, 0x97, 0xf1, /* Byte value: 0xd0 */ + 0x98, 0x4e, 0xf4, 0x35, 0x52, 0x37, 0x92, 0x5f, 0xc5, 0x7b, 0x85, 0x08, 0xb6, 0x70, 0x6f, 0x9c, /* Byte value: 0xd1 */ + 0xa9, 0xd9, 0x13, 0x07, 0x94, 0x6b, 0xb6, 0x09, 0xcc, 0xde, 0xd2, 0x73, 0x61, 0xf7, 0xe0, 0x71, /* Byte value: 0xd2 */ + 0x82, 0x08, 0xd9, 0x40, 0x70, 0x09, 0x2c, 0xc0, 0x0b, 0x48, 0x3f, 0xe7, 0xa4, 0x23, 0xd7, 0x10, /* Byte value: 0xd3 */ + 0x4d, 0x20, 0xe2, 0xc3, 0x03, 0x24, 0xb0, 0x86, 0x2c, 0xe3, 0xfc, 0x1a, 0xd5, 0x8c, 0xda, 0x40, /* Byte value: 0xd4 */ + 0xf4, 0x89, 0x65, 0xc2, 0x72, 0x31, 0x4d, 0x85, 0x82, 0x4b, 0x97, 0x4a, 0x83, 0x6a, 0xfa, 0xd1, /* Byte value: 0xd5 */ + 0xf6, 0x87, 0x96, 0xb2, 0x26, 0x4e, 0x7c, 0x15, 0x1f, 0x35, 0x29, 0x76, 0x5c, 0xc1, 0xe2, 0xcd, /* Byte value: 0xd6 */ + 0x14, 0x6c, 0xb1, 0xe6, 0x4d, 0x80, 0x29, 0xe9, 0x9b, 0x8a, 0x06, 0x5b, 0x4a, 0x84, 0xf0, 0xd8, /* Byte value: 0xd7 */ + 0x7b, 0xa2, 0x4b, 0x59, 0x13, 0x27, 0x3e, 0xeb, 0xee, 0xfb, 0xf5, 0x3b, 0x2e, 0x81, 0x71, 0x87, /* Byte value: 0xd8 */ + 0x79, 0xac, 0xb8, 0x29, 0x47, 0x58, 0x0f, 0x7b, 0x73, 0x85, 0x4b, 0x07, 0xf1, 0x2a, 0x69, 0x9b, /* Byte value: 0xd9 */ + 0x17, 0x65, 0xda, 0xae, 0x33, 0x21, 0xe1, 0x31, 0xa9, 0xcb, 0xe7, 0x79, 0x1b, 0x9b, 0xe4, 0xca, /* Byte value: 0xda */ + 0xf0, 0x95, 0x40, 0x22, 0xda, 0xcf, 0x2f, 0x66, 0x7b, 0xb7, 0x28, 0x32, 0xfe, 0xff, 0xca, 0xe9, /* Byte value: 0xdb */ + 0xbf, 0xbb, 0x51, 0x91, 0x8d, 0x94, 0xae, 0x70, 0xca, 0x2a, 0x6a, 0x14, 0xf4, 0xd8, 0x08, 0xb5, /* Byte value: 0xdc */ + 0xcf, 0x28, 0x3b, 0x83, 0x73, 0x2d, 0x9c, 0x46, 0x27, 0xab, 0xc3, 0xfd, 0x71, 0xaf, 0x0d, 0x50, /* Byte value: 0xdd */ + 0x01, 0x07, 0x98, 0x38, 0x2a, 0xde, 0xf9, 0x48, 0xaf, 0x3f, 0x5f, 0x1e, 0x8e, 0xb4, 0x0c, 0x0e, /* Byte value: 0xde */ + 0xed, 0xc6, 0x23, 0xff, 0x2e, 0xae, 0x3b, 0xc2, 0x7e, 0x39, 0xcc, 0x87, 0xc0, 0x26, 0x56, 0x4f, /* Byte value: 0xdf */ + 0xcc, 0x21, 0x50, 0xcb, 0x0d, 0x8c, 0x54, 0x9e, 0x15, 0xea, 0x22, 0xdf, 0x20, 0xb0, 0x19, 0x42, /* Byte value: 0xe0 */ + 0x15, 0x6b, 0x29, 0xde, 0x67, 0x5e, 0xd0, 0xa1, 0x34, 0xb5, 0x59, 0x45, 0xc4, 0x30, 0xfc, 0xd6, /* Byte value: 0xe1 */ + 0x27, 0xf5, 0xa5, 0xa4, 0xdf, 0xa3, 0x3c, 0x2f, 0x0f, 0x51, 0xef, 0x1c, 0x42, 0xa8, 0x67, 0x29, /* Byte value: 0xe2 */ + 0xa3, 0xef, 0xaa, 0x74, 0x53, 0x2b, 0x43, 0x9c, 0x60, 0x9b, 0xd1, 0xbf, 0x44, 0xb5, 0x98, 0x1d, /* Byte value: 0xe3 */ + 0x0b, 0x31, 0x21, 0x4b, 0xed, 0x9e, 0x0c, 0xdd, 0x03, 0x7a, 0x5c, 0xd2, 0xab, 0xf6, 0x74, 0x62, /* Byte value: 0xe4 */ + 0x38, 0xa8, 0x35, 0x09, 0x7f, 0xbd, 0x19, 0x1b, 0x97, 0xa1, 0xb5, 0x95, 0xa3, 0xda, 0xe3, 0x93, /* Byte value: 0xe5 */ + 0x57, 0x66, 0xcf, 0xb6, 0x21, 0x1a, 0x0e, 0x19, 0xe2, 0xd0, 0x46, 0xf5, 0xc7, 0xdf, 0x62, 0xcc, /* Byte value: 0xe6 */ + 0x67, 0xf6, 0xb0, 0xbc, 0xcd, 0x98, 0xd3, 0x07, 0x44, 0x4a, 0x4e, 0x90, 0x9e, 0xec, 0xe1, 0x2f, /* Byte value: 0xe7 */ + 0x83, 0x0f, 0x41, 0x78, 0x5a, 0xd7, 0xd5, 0x88, 0xa4, 0x77, 0x60, 0xf9, 0x2a, 0x97, 0xdb, 0x1e, /* Byte value: 0xe8 */ + 0x3c, 0xb4, 0x10, 0xe9, 0xd7, 0x43, 0x7b, 0xf8, 0x6e, 0x5d, 0x0a, 0xed, 0xde, 0x4f, 0xd3, 0xab, /* Byte value: 0xe9 */ + 0xfd, 0xb6, 0xb7, 0xf9, 0xcb, 0xd0, 0x70, 0xc8, 0x1c, 0x4f, 0x75, 0xa4, 0xf7, 0x37, 0x96, 0xaf, /* Byte value: 0xea */ + 0xac, 0xc2, 0xae, 0xdf, 0x16, 0x4b, 0x2d, 0xa2, 0x9a, 0x1d, 0x32, 0x15, 0x92, 0xd6, 0xdc, 0x47, /* Byte value: 0xeb */ + 0x95, 0x6d, 0x03, 0xee, 0x43, 0x28, 0xcd, 0xf1, 0xa2, 0x83, 0xd8, 0x9e, 0xbf, 0xb8, 0x33, 0xda, /* Byte value: 0xec */ + 0x51, 0x74, 0x19, 0x26, 0xdd, 0x9b, 0x5d, 0x6a, 0x86, 0x52, 0x47, 0xb1, 0x65, 0xe1, 0x4a, 0xe8, /* Byte value: 0xed */ + 0xd2, 0x7b, 0x58, 0x5e, 0x87, 0x4c, 0x88, 0xe2, 0x22, 0x25, 0x27, 0x48, 0x4f, 0x76, 0x91, 0xf6, /* Byte value: 0xee */ + 0xe1, 0xe2, 0x4c, 0x1c, 0x15, 0x6f, 0x9d, 0x24, 0xb6, 0xfe, 0xce, 0x0f, 0x47, 0x5a, 0x06, 0x07, /* Byte value: 0xef */ + 0xe4, 0xf9, 0xf1, 0xc4, 0x97, 0x4f, 0x06, 0x8f, 0xe0, 0x3d, 0x2e, 0x69, 0xb4, 0x7b, 0x3a, 0x31, /* Byte value: 0xf0 */ + 0xa6, 0xf4, 0x17, 0xac, 0xd1, 0x0b, 0xd8, 0x37, 0x36, 0x58, 0x31, 0xd9, 0xb7, 0x94, 0xa4, 0x2b, /* Byte value: 0xf1 */ + 0x2e, 0xca, 0x77, 0x9f, 0x66, 0x42, 0x01, 0x62, 0x91, 0x55, 0x0d, 0xf2, 0x36, 0xf5, 0x0b, 0x57, /* Byte value: 0xf2 */ + 0x9e, 0x5c, 0x22, 0xa5, 0xae, 0xb6, 0xc1, 0x2c, 0xa1, 0xf9, 0x84, 0x4c, 0x14, 0x4e, 0x47, 0xb8, /* Byte value: 0xf3 */ + 0xb0, 0x96, 0x55, 0x3a, 0xc8, 0xf4, 0xc0, 0x4e, 0x30, 0xac, 0x89, 0xbe, 0x22, 0xbb, 0x4c, 0xef, /* Byte value: 0xf4 */ + 0x04, 0x1c, 0x25, 0xe0, 0xa8, 0xfe, 0x62, 0xe3, 0xf9, 0xfc, 0xbf, 0x78, 0x7d, 0x95, 0x30, 0x38, /* Byte value: 0xf5 */ + 0xca, 0x33, 0x86, 0x5b, 0xf1, 0x0d, 0x07, 0xed, 0x71, 0x68, 0x23, 0x9b, 0x82, 0x8e, 0x31, 0x66, /* Byte value: 0xf6 */ + 0xe0, 0xe5, 0xd4, 0x24, 0x3f, 0xb1, 0x64, 0x6c, 0x19, 0xc1, 0x91, 0x11, 0xc9, 0xee, 0x0a, 0x09, /* Byte value: 0xf7 */ + 0x7e, 0xb9, 0xf6, 0x81, 0x91, 0x07, 0xa5, 0x40, 0xb8, 0x38, 0x15, 0x5d, 0xdd, 0xa0, 0x4d, 0xb1, /* Byte value: 0xf8 */ + 0x66, 0xf1, 0x28, 0x84, 0xe7, 0x46, 0x2a, 0x4f, 0xeb, 0x75, 0x11, 0x8e, 0x10, 0x58, 0xed, 0x21, /* Byte value: 0xf9 */ + 0x50, 0x73, 0x81, 0x1e, 0xf7, 0x45, 0xa4, 0x22, 0x29, 0x6d, 0x18, 0xaf, 0xeb, 0x55, 0x46, 0xe6, /* Byte value: 0xfa */ + 0x49, 0x3c, 0xc7, 0x23, 0xab, 0xda, 0xd2, 0x65, 0xd5, 0x1f, 0x43, 0x62, 0xa8, 0x19, 0xea, 0x78, /* Byte value: 0xfb */ + 0x5b, 0x42, 0xa0, 0x55, 0x1a, 0xdb, 0xa8, 0xff, 0x2a, 0x17, 0x44, 0x7d, 0x40, 0xa3, 0x32, 0x84, /* Byte value: 0xfc */ + 0x99, 0x49, 0x6c, 0x0d, 0x78, 0xe9, 0x6b, 0x17, 0x6a, 0x44, 0xda, 0x16, 0x38, 0xc4, 0x63, 0x92, /* Byte value: 0xfd */ + 0x68, 0xdb, 0xb4, 0x17, 0x88, 0xf8, 0xbd, 0x39, 0xbe, 0xcc, 0xad, 0x3a, 0x48, 0x8f, 0xa5, 0x75, /* Byte value: 0xfe */ + 0xe9, 0xda, 0x06, 0x1f, 0x86, 0x50, 0x59, 0x21, 0x87, 0xc5, 0x73, 0xff, 0xbd, 0xb3, 0x66, 0x77, /* Byte value: 0xff */ + 0xc5, 0x1e, 0x82, 0xf0, 0xb4, 0x6d, 0x69, 0xd3, 0x8b, 0xee, 0xc0, 0x31, 0x54, 0xed, 0x75, 0x3c, /* Byte value: 0x00 */ + + /* Matrix row: 8 */ + 0xd7, 0x48, 0x12, 0xa3, 0xbe, 0x29, 0x25, 0xd9, 0x10, 0xec, 0xae, 0xdf, 0x6a, 0x2d, 0x01, 0xfc, /* Byte value: 0x01 */ + 0x63, 0x44, 0x11, 0xde, 0x60, 0x0e, 0x82, 0x6c, 0x92, 0x7c, 0xf2, 0x2a, 0x20, 0xcb, 0xa0, 0xee, /* Byte value: 0x02 */ + 0x5e, 0x13, 0x74, 0x22, 0x3d, 0x0d, 0xaf, 0x72, 0xfa, 0x27, 0xc7, 0x23, 0xaa, 0xd2, 0x47, 0xdd, /* Byte value: 0x03 */ + 0xaa, 0x8c, 0x23, 0x54, 0x8a, 0x01, 0x1b, 0x0a, 0x99, 0x88, 0x13, 0x07, 0xc7, 0xb6, 0x5d, 0x11, /* Byte value: 0x04 */ + 0xea, 0x1f, 0x77, 0x5f, 0xe3, 0x2a, 0x08, 0xc7, 0x78, 0xb7, 0x9b, 0xd6, 0xe0, 0x34, 0xe6, 0xcf, /* Byte value: 0x05 */ + 0x2a, 0x69, 0x8b, 0x42, 0x58, 0x57, 0x3d, 0x53, 0x98, 0xf6, 0xc0, 0x66, 0x89, 0x71, 0xe8, 0x6e, /* Byte value: 0x06 */ + 0x29, 0x16, 0xe4, 0x73, 0x84, 0x86, 0x44, 0x75, 0x7a, 0x4b, 0xfe, 0x14, 0x7c, 0x79, 0x4f, 0x31, /* Byte value: 0x07 */ + 0x9c, 0x8e, 0xc2, 0xa0, 0xaf, 0xee, 0x75, 0x63, 0xa6, 0xb0, 0x09, 0xcf, 0x65, 0x26, 0x32, 0x16, /* Byte value: 0x08 */ + 0xe1, 0x4a, 0xf3, 0x57, 0x9b, 0xc6, 0x4b, 0xb0, 0x2f, 0xd4, 0xb4, 0x17, 0xc8, 0xbd, 0x6e, 0xfb, /* Byte value: 0x09 */ + 0xa4, 0x58, 0x16, 0x0f, 0x55, 0x5d, 0xd3, 0x17, 0x2b, 0xef, 0x7e, 0x50, 0x33, 0x27, 0xff, 0xc4, /* Byte value: 0x0a */ + 0xeb, 0x8b, 0x52, 0xf1, 0x16, 0x65, 0x9e, 0x64, 0x26, 0xdc, 0x30, 0xf8, 0xb3, 0x8d, 0x3a, 0xfa, /* Byte value: 0x0b */ + 0x68, 0x11, 0x95, 0xd6, 0x18, 0xe2, 0xc1, 0x1b, 0xc5, 0x1f, 0xdd, 0xeb, 0x08, 0x42, 0x28, 0xda, /* Byte value: 0x0c */ + 0x9d, 0x1a, 0xe7, 0x0e, 0x5a, 0xa1, 0xe3, 0xc0, 0xf8, 0xdb, 0xa2, 0xe1, 0x36, 0x9f, 0xee, 0x23, /* Byte value: 0x0d */ + 0xae, 0x99, 0xb7, 0xa9, 0xd8, 0xfe, 0x06, 0xc3, 0x22, 0xe7, 0xfa, 0xbf, 0x48, 0x17, 0xab, 0xc5, /* Byte value: 0x0e */ + 0x28, 0x82, 0xc1, 0xdd, 0x71, 0xc9, 0xd2, 0xd6, 0x24, 0x20, 0x55, 0x3a, 0x2f, 0xc0, 0x93, 0x04, /* Byte value: 0x0f */ + 0xb7, 0x73, 0x6c, 0x4c, 0x02, 0xf6, 0xde, 0x93, 0x60, 0x2d, 0x62, 0x87, 0xbf, 0xee, 0x06, 0x4d, /* Byte value: 0x10 */ + 0x55, 0x46, 0xf0, 0x2a, 0x45, 0xe1, 0xec, 0x05, 0xad, 0x44, 0xe8, 0xe2, 0x82, 0x5b, 0xcf, 0xe9, /* Byte value: 0x11 */ + 0xd0, 0x22, 0xe9, 0x6f, 0x30, 0x07, 0x41, 0x36, 0x49, 0x3e, 0x79, 0x15, 0x10, 0x84, 0x50, 0x77, /* Byte value: 0x12 */ + 0xaf, 0x0d, 0x92, 0x07, 0x2d, 0xb1, 0x90, 0x60, 0x7c, 0x8c, 0x51, 0x91, 0x1b, 0xae, 0x77, 0xf0, /* Byte value: 0x13 */ + 0x62, 0xd0, 0x34, 0x70, 0x95, 0x41, 0x14, 0xcf, 0xcc, 0x17, 0x59, 0x04, 0x73, 0x72, 0x7c, 0xdb, /* Byte value: 0x14 */ + 0xf7, 0xe0, 0x38, 0x47, 0x6b, 0xdd, 0xcd, 0x5e, 0x81, 0x12, 0xea, 0x56, 0x98, 0x6c, 0xbd, 0x93, /* Byte value: 0x15 */ + 0xef, 0x9e, 0xc6, 0x0c, 0x44, 0x9a, 0x83, 0xad, 0x9d, 0xb3, 0xd9, 0x40, 0x3c, 0x2c, 0xcc, 0x2e, /* Byte value: 0x16 */ + 0xb3, 0x66, 0xf8, 0xb1, 0x50, 0x09, 0xc3, 0x5a, 0xdb, 0x42, 0x8b, 0x3f, 0x30, 0x4f, 0xf0, 0x99, /* Byte value: 0x17 */ + 0x2e, 0x7c, 0x1f, 0xbf, 0x0a, 0xa8, 0x20, 0x9a, 0x23, 0x99, 0x29, 0xde, 0x06, 0xd0, 0x1e, 0xba, /* Byte value: 0x18 */ + 0x96, 0x4f, 0x63, 0x06, 0x22, 0x4d, 0xa0, 0xb7, 0xaf, 0xb8, 0x8d, 0x20, 0x1e, 0x16, 0x66, 0x17, /* Byte value: 0x19 */ + 0x1f, 0x14, 0x05, 0x87, 0xa1, 0x69, 0x2a, 0x1c, 0x45, 0x73, 0xe4, 0xdc, 0xde, 0xe9, 0x20, 0x36, /* Byte value: 0x1a */ + 0xa5, 0xcc, 0x33, 0xa1, 0xa0, 0x12, 0x45, 0xb4, 0x75, 0x84, 0xd5, 0x7e, 0x60, 0x9e, 0x23, 0xf1, /* Byte value: 0x1b */ + 0x24, 0xbd, 0xbe, 0x19, 0x87, 0x0b, 0xf5, 0x4e, 0x2a, 0x91, 0xad, 0x31, 0x7d, 0xe0, 0x4a, 0xbb, /* Byte value: 0x1c */ + 0x88, 0xcf, 0x43, 0x2f, 0x76, 0x6b, 0x1c, 0x08, 0xb4, 0xa0, 0xc2, 0xd2, 0x93, 0x46, 0x9a, 0x14, /* Byte value: 0x1d */ + 0xfe, 0x5e, 0xf6, 0xd0, 0x3a, 0xaf, 0x61, 0xac, 0x6a, 0xa7, 0x50, 0xcb, 0x16, 0x54, 0x4e, 0xcd, /* Byte value: 0x1e */ + 0x03, 0x7f, 0x6f, 0x31, 0xdc, 0xd1, 0x79, 0x26, 0xe2, 0xbd, 0x3e, 0x72, 0xf5, 0x08, 0xa7, 0x5f, /* Byte value: 0x1f */ + 0x86, 0x1b, 0x76, 0x74, 0xa9, 0x37, 0xd4, 0x15, 0x06, 0xc7, 0xaf, 0x85, 0x67, 0xd7, 0x38, 0xc1, /* Byte value: 0x20 */ + 0xf5, 0x0b, 0x72, 0xd8, 0x42, 0x43, 0x22, 0xdb, 0x3d, 0xc4, 0x7f, 0x0a, 0x3e, 0xdd, 0xc6, 0xf9, /* Byte value: 0x21 */ + 0xf0, 0x8a, 0xc3, 0x8b, 0xe5, 0xf3, 0xa9, 0xb1, 0xd8, 0xc0, 0x3d, 0x9c, 0xe2, 0xc5, 0xec, 0x18, /* Byte value: 0x22 */ + 0x64, 0x2e, 0xea, 0x12, 0xee, 0x20, 0xe6, 0x83, 0xcb, 0xae, 0x25, 0xe0, 0x5a, 0x62, 0xf1, 0x65, /* Byte value: 0x23 */ + 0x21, 0x3c, 0x0f, 0x4a, 0x20, 0xbb, 0x7e, 0x24, 0xcf, 0x95, 0xef, 0xa7, 0xa1, 0xf8, 0x60, 0x5a, /* Byte value: 0x24 */ + 0x1b, 0x01, 0x91, 0x7a, 0xf3, 0x96, 0x37, 0xd5, 0xfe, 0x1c, 0x0d, 0x64, 0x51, 0x48, 0xd6, 0xe2, /* Byte value: 0x25 */ + 0x1d, 0xff, 0x4f, 0x18, 0x88, 0xf7, 0xc5, 0x99, 0xf9, 0xa5, 0x71, 0x80, 0x78, 0x58, 0x5b, 0x5c, /* Byte value: 0x26 */ + 0x69, 0x85, 0xb0, 0x78, 0xed, 0xad, 0x57, 0xb8, 0x9b, 0x74, 0x76, 0xc5, 0x5b, 0xfb, 0xf4, 0xef, /* Byte value: 0x27 */ + 0x89, 0x5b, 0x66, 0x81, 0x83, 0x24, 0x8a, 0xab, 0xea, 0xcb, 0x69, 0xfc, 0xc0, 0xff, 0x46, 0x21, /* Byte value: 0x28 */ + 0x43, 0xec, 0x3b, 0x3a, 0xb5, 0xfa, 0x6a, 0xeb, 0x03, 0x82, 0xb6, 0xa3, 0xd2, 0x8a, 0x1c, 0x81, /* Byte value: 0x29 */ + 0xd8, 0x08, 0x02, 0x56, 0x94, 0x3a, 0x7b, 0x67, 0xfc, 0xe0, 0x68, 0xa6, 0xcd, 0x05, 0x7f, 0x1c, /* Byte value: 0x2a */ + 0x5b, 0x92, 0xc5, 0x71, 0x9a, 0xbd, 0x24, 0x18, 0x1f, 0x23, 0x85, 0xb5, 0x76, 0xca, 0x6d, 0x3c, /* Byte value: 0x2b */ + 0xd1, 0xb6, 0xcc, 0xc1, 0xc5, 0x48, 0xd7, 0x95, 0x17, 0x55, 0xd2, 0x3b, 0x43, 0x3d, 0x8c, 0x42, /* Byte value: 0x2c */ + 0x07, 0x6a, 0xfb, 0xcc, 0x8e, 0x2e, 0x64, 0xef, 0x59, 0xd2, 0xd7, 0xca, 0x7a, 0xa9, 0x51, 0x8b, /* Byte value: 0x2d */ + 0x0a, 0xc1, 0xa1, 0xa6, 0x8d, 0xa3, 0xd5, 0xd4, 0x09, 0x08, 0x84, 0xef, 0x7b, 0x30, 0x54, 0x01, /* Byte value: 0x2e */ + 0x25, 0x29, 0x9b, 0xb7, 0x72, 0x44, 0x63, 0xed, 0x74, 0xfa, 0x06, 0x1f, 0x2e, 0x59, 0x96, 0x8e, /* Byte value: 0x2f */ + 0xa3, 0x32, 0xed, 0xc3, 0xdb, 0x73, 0xb7, 0xf8, 0x72, 0x3d, 0xa9, 0x9a, 0x49, 0x8e, 0xae, 0x4f, /* Byte value: 0x30 */ + 0x22, 0x43, 0x60, 0x7b, 0xfc, 0x6a, 0x07, 0x02, 0x2d, 0x28, 0xd1, 0xd5, 0x54, 0xf0, 0xc7, 0x05, /* Byte value: 0x31 */ + 0x61, 0xaf, 0x5b, 0x41, 0x49, 0x90, 0x6d, 0xe9, 0x2e, 0xaa, 0x67, 0x76, 0x86, 0x7a, 0xdb, 0x84, /* Byte value: 0x32 */ + 0x14, 0x41, 0x81, 0x8f, 0xd9, 0x85, 0x69, 0x6b, 0x12, 0x10, 0xcb, 0x1d, 0xf6, 0x60, 0xa8, 0x02, /* Byte value: 0x33 */ + 0xa6, 0xb3, 0x5c, 0x90, 0x7c, 0xc3, 0x3c, 0x92, 0x97, 0x39, 0xeb, 0x0c, 0x95, 0x96, 0x84, 0xae, /* Byte value: 0x34 */ + 0x11, 0xc0, 0x30, 0xdc, 0x7e, 0x35, 0xe2, 0x01, 0xf7, 0x14, 0x89, 0x8b, 0x2a, 0x78, 0x82, 0xe3, /* Byte value: 0x35 */ + 0x02, 0xeb, 0x4a, 0x9f, 0x29, 0x9e, 0xef, 0x85, 0xbc, 0xd6, 0x95, 0x5c, 0xa6, 0xb1, 0x7b, 0x6a, /* Byte value: 0x36 */ + 0x2f, 0xe8, 0x3a, 0x11, 0xff, 0xe7, 0xb6, 0x39, 0x7d, 0xf2, 0x82, 0xf0, 0x55, 0x69, 0xc2, 0x8f, /* Byte value: 0x37 */ + 0xca, 0xb7, 0x5d, 0xbb, 0x36, 0xde, 0xe0, 0x40, 0xe9, 0x49, 0xdf, 0x5f, 0x12, 0x75, 0x5a, 0xa0, /* Byte value: 0x38 */ + 0x3c, 0xc3, 0x40, 0x52, 0xa8, 0x4c, 0xbb, 0xbd, 0x36, 0x30, 0x9e, 0x27, 0xd9, 0xa0, 0x3b, 0x06, /* Byte value: 0x39 */ + 0x4e, 0x47, 0x61, 0x50, 0xb6, 0x77, 0xdb, 0xd0, 0x53, 0x58, 0xe5, 0x86, 0xd3, 0x13, 0x19, 0x0b, /* Byte value: 0x3a */ + 0x7d, 0xc4, 0x31, 0xf7, 0x34, 0x28, 0x3e, 0xd3, 0x89, 0x64, 0xbd, 0xd8, 0xad, 0x9b, 0x5c, 0xed, /* Byte value: 0x3b */ + 0xb9, 0xa7, 0x59, 0x17, 0xdd, 0xaa, 0x16, 0x8e, 0xd2, 0x4a, 0x0f, 0xd0, 0x4b, 0x7f, 0xa4, 0x98, /* Byte value: 0x3c */ + 0x80, 0xe5, 0xa8, 0x16, 0xd2, 0x56, 0x26, 0x59, 0x01, 0x7e, 0xd3, 0x61, 0x4e, 0xc7, 0xb5, 0x7f, /* Byte value: 0x3d */ + 0x04, 0x15, 0x94, 0xfd, 0x52, 0xff, 0x1d, 0xc9, 0xbb, 0x6f, 0xe9, 0xb8, 0x8f, 0xa1, 0xf6, 0xd4, /* Byte value: 0x3e */ + 0x32, 0x17, 0x75, 0x09, 0x77, 0x10, 0x73, 0xa0, 0x84, 0x57, 0xf3, 0x70, 0x2d, 0x31, 0x99, 0xd3, /* Byte value: 0x3f */ + 0xc6, 0x88, 0x22, 0x7f, 0xc0, 0x1c, 0xc7, 0xd8, 0xe7, 0xf8, 0x27, 0x54, 0x40, 0x55, 0x83, 0x1f, /* Byte value: 0x40 */ + 0x41, 0x07, 0x71, 0xa5, 0x9c, 0x64, 0x85, 0x6e, 0xbf, 0x54, 0x23, 0xff, 0x74, 0x3b, 0x67, 0xeb, /* Byte value: 0x41 */ + 0x0b, 0x55, 0x84, 0x08, 0x78, 0xec, 0x43, 0x77, 0x57, 0x63, 0x2f, 0xc1, 0x28, 0x89, 0x88, 0x34, /* Byte value: 0x42 */ + 0xfb, 0xdf, 0x47, 0x83, 0x9d, 0x1f, 0xea, 0xc6, 0x8f, 0xa3, 0x12, 0x5d, 0xca, 0x4c, 0x64, 0x2c, /* Byte value: 0x43 */ + 0x6f, 0x7b, 0x6e, 0x1a, 0x96, 0xcc, 0xa5, 0xf4, 0x9c, 0xcd, 0x0a, 0x21, 0x72, 0xeb, 0x79, 0x51, /* Byte value: 0x44 */ + 0x4b, 0xc6, 0xd0, 0x03, 0x11, 0xc7, 0x50, 0xba, 0xb6, 0x5c, 0xa7, 0x10, 0x0f, 0x0b, 0x33, 0xea, /* Byte value: 0x45 */ + 0xdc, 0x1d, 0x96, 0xab, 0xc6, 0xc5, 0x66, 0xae, 0x47, 0x8f, 0x81, 0x1e, 0x42, 0xa4, 0x89, 0xc8, /* Byte value: 0x46 */ + 0x95, 0x30, 0x0c, 0x37, 0xfe, 0x9c, 0xd9, 0x91, 0x4d, 0x05, 0xb3, 0x52, 0xeb, 0x1e, 0xc1, 0x48, /* Byte value: 0x47 */ + 0x84, 0xf0, 0x3c, 0xeb, 0x80, 0xa9, 0x3b, 0x90, 0xba, 0x11, 0x3a, 0xd9, 0xc1, 0x66, 0x43, 0xab, /* Byte value: 0x48 */ + 0xbb, 0x4c, 0x13, 0x88, 0xf4, 0x34, 0xf9, 0x0b, 0x6e, 0x9c, 0x9a, 0x8c, 0xed, 0xce, 0xdf, 0xf2, /* Byte value: 0x49 */ + 0xc7, 0x1c, 0x07, 0xd1, 0x35, 0x53, 0x51, 0x7b, 0xb9, 0x93, 0x8c, 0x7a, 0x13, 0xec, 0x5f, 0x2a, /* Byte value: 0x4a */ + 0x16, 0xaa, 0xcb, 0x10, 0xf0, 0x1b, 0x86, 0xee, 0xae, 0xc6, 0x5e, 0x41, 0x50, 0xd1, 0xd3, 0x68, /* Byte value: 0x4b */ + 0xde, 0xf6, 0xdc, 0x34, 0xef, 0x5b, 0x89, 0x2b, 0xfb, 0x59, 0x14, 0x42, 0xe4, 0x15, 0xf2, 0xa2, /* Byte value: 0x4c */ + 0xdd, 0x89, 0xb3, 0x05, 0x33, 0x8a, 0xf0, 0x0d, 0x19, 0xe4, 0x2a, 0x30, 0x11, 0x1d, 0x55, 0xfd, /* Byte value: 0x4d */ + 0x67, 0x51, 0x85, 0x23, 0x32, 0xf1, 0x9f, 0xa5, 0x29, 0x13, 0x1b, 0x92, 0xaf, 0x6a, 0x56, 0x3a, /* Byte value: 0x4e */ + 0xe0, 0xde, 0xd6, 0xf9, 0x6e, 0x89, 0xdd, 0x13, 0x71, 0xbf, 0x1f, 0x39, 0x9b, 0x04, 0xb2, 0xce, /* Byte value: 0x4f */ + 0xf4, 0x9f, 0x57, 0x76, 0xb7, 0x0c, 0xb4, 0x78, 0x63, 0xaf, 0xd4, 0x24, 0x6d, 0x64, 0x1a, 0xcc, /* Byte value: 0x50 */ + 0x48, 0xb9, 0xbf, 0x32, 0xcd, 0x16, 0x29, 0x9c, 0x54, 0xe1, 0x99, 0x62, 0xfa, 0x03, 0x94, 0xb5, /* Byte value: 0x51 */ + 0xe6, 0x20, 0x08, 0x9b, 0x15, 0xe8, 0x2f, 0x5f, 0x76, 0x06, 0x63, 0xdd, 0xb2, 0x14, 0x3f, 0x70, /* Byte value: 0x52 */ + 0x6c, 0x04, 0x01, 0x2b, 0x4a, 0x1d, 0xdc, 0xd2, 0x7e, 0x70, 0x34, 0x53, 0x87, 0xe3, 0xde, 0x0e, /* Byte value: 0x53 */ + 0x59, 0x79, 0x8f, 0xee, 0xb3, 0x23, 0xcb, 0x9d, 0xa3, 0xf5, 0x10, 0xe9, 0xd0, 0x7b, 0x16, 0x56, /* Byte value: 0x54 */ + 0x50, 0xc7, 0x41, 0x79, 0xe2, 0x51, 0x67, 0x6f, 0x48, 0x40, 0xaa, 0x74, 0x5e, 0x43, 0xe5, 0x08, /* Byte value: 0x55 */ + 0x78, 0x45, 0x80, 0xa4, 0x93, 0x98, 0xb5, 0xb9, 0x6c, 0x60, 0xff, 0x4e, 0x71, 0x83, 0x76, 0x0c, /* Byte value: 0x56 */ + 0xda, 0xe3, 0x48, 0xc9, 0xbd, 0xa4, 0x94, 0xe2, 0x40, 0x36, 0xfd, 0xfa, 0x6b, 0xb4, 0x04, 0x76, /* Byte value: 0x57 */ + 0xb4, 0x0c, 0x03, 0x7d, 0xde, 0x27, 0xa7, 0xb5, 0x82, 0x90, 0x5c, 0xf5, 0x4a, 0xe6, 0xa1, 0x12, /* Byte value: 0x58 */ + 0x0c, 0x3f, 0x7f, 0xc4, 0xf6, 0xc2, 0x27, 0x98, 0x0e, 0xb1, 0xf8, 0x0b, 0x52, 0x20, 0xd9, 0xbf, /* Byte value: 0x59 */ + 0xf2, 0x61, 0x89, 0x14, 0xcc, 0x6d, 0x46, 0x34, 0x64, 0x16, 0xa8, 0xc0, 0x44, 0x74, 0x97, 0x72, /* Byte value: 0x5a */ + 0xbe, 0xcd, 0xa2, 0xdb, 0x53, 0x84, 0x72, 0x61, 0x8b, 0x98, 0xd8, 0x1a, 0x31, 0xd6, 0xf5, 0x13, /* Byte value: 0x5b */ + 0xf3, 0xf5, 0xac, 0xba, 0x39, 0x22, 0xd0, 0x97, 0x3a, 0x7d, 0x03, 0xee, 0x17, 0xcd, 0x4b, 0x47, /* Byte value: 0x5c */ + 0x91, 0x25, 0x98, 0xca, 0xac, 0x63, 0xc4, 0x58, 0xf6, 0x6a, 0x5a, 0xea, 0x64, 0xbf, 0x37, 0x9c, /* Byte value: 0x5d */ + 0x5c, 0xf8, 0x3e, 0xbd, 0x14, 0x93, 0x40, 0xf7, 0x46, 0xf1, 0x52, 0x7f, 0x0c, 0x63, 0x3c, 0xb7, /* Byte value: 0x5e */ + 0x17, 0x3e, 0xee, 0xbe, 0x05, 0x54, 0x10, 0x4d, 0xf0, 0xad, 0xf5, 0x6f, 0x03, 0x68, 0x0f, 0x5d, /* Byte value: 0x5f */ + 0x7f, 0x2f, 0x7b, 0x68, 0x1d, 0xb6, 0xd1, 0x56, 0x35, 0xb2, 0x28, 0x84, 0x0b, 0x2a, 0x27, 0x87, /* Byte value: 0x60 */ + 0x82, 0x0e, 0xe2, 0x89, 0xfb, 0xc8, 0xc9, 0xdc, 0xbd, 0xa8, 0x46, 0x3d, 0xe8, 0x76, 0xce, 0x15, /* Byte value: 0x61 */ + 0xc0, 0x76, 0xfc, 0x1d, 0xbb, 0x7d, 0x35, 0x94, 0xe0, 0x41, 0x5b, 0xb0, 0x69, 0x45, 0x0e, 0xa1, /* Byte value: 0x62 */ + 0xd5, 0xa3, 0x58, 0x3c, 0x97, 0xb7, 0xca, 0x5c, 0xac, 0x3a, 0x3b, 0x83, 0xcc, 0x9c, 0x7a, 0x96, /* Byte value: 0x63 */ + 0xd9, 0x9c, 0x27, 0xf8, 0x61, 0x75, 0xed, 0xc4, 0xa2, 0x8b, 0xc3, 0x88, 0x9e, 0xbc, 0xa3, 0x29, /* Byte value: 0x64 */ + 0xa0, 0x4d, 0x82, 0xf2, 0x07, 0xa2, 0xce, 0xde, 0x90, 0x80, 0x97, 0xe8, 0xbc, 0x86, 0x09, 0x10, /* Byte value: 0x65 */ + 0xa8, 0x67, 0x69, 0xcb, 0xa3, 0x9f, 0xf4, 0x8f, 0x25, 0x5e, 0x86, 0x5b, 0x61, 0x07, 0x26, 0x7b, /* Byte value: 0x66 */ + 0xad, 0xe6, 0xd8, 0x98, 0x04, 0x2f, 0x7f, 0xe5, 0xc0, 0x5a, 0xc4, 0xcd, 0xbd, 0x1f, 0x0c, 0x9a, /* Byte value: 0x67 */ + 0xba, 0xd8, 0x36, 0x26, 0x01, 0x7b, 0x6f, 0xa8, 0x30, 0xf7, 0x31, 0xa2, 0xbe, 0x77, 0x03, 0xc7, /* Byte value: 0x68 */ + 0xb1, 0x8d, 0xb2, 0x2e, 0x79, 0x97, 0x2c, 0xdf, 0x67, 0x94, 0x1e, 0x63, 0x96, 0xfe, 0x8b, 0xf3, /* Byte value: 0x69 */ + 0xe3, 0xa1, 0xb9, 0xc8, 0xb2, 0x58, 0xa4, 0x35, 0x93, 0x02, 0x21, 0x4b, 0x6e, 0x0c, 0x15, 0x91, /* Byte value: 0x6a */ + 0xb6, 0xe7, 0x49, 0xe2, 0xf7, 0xb9, 0x48, 0x30, 0x3e, 0x46, 0xc9, 0xa9, 0xec, 0x57, 0xda, 0x78, /* Byte value: 0x6b */ + 0x20, 0xa8, 0x2a, 0xe4, 0xd5, 0xf4, 0xe8, 0x87, 0x91, 0xfe, 0x44, 0x89, 0xf2, 0x41, 0xbc, 0x6f, /* Byte value: 0x6c */ + 0x9b, 0xe4, 0x39, 0x6c, 0x21, 0xc0, 0x11, 0x8c, 0xff, 0x62, 0xde, 0x05, 0x1f, 0x8f, 0x63, 0x9d, /* Byte value: 0x6d */ + 0x85, 0x64, 0x19, 0x45, 0x75, 0xe6, 0xad, 0x33, 0xe4, 0x7a, 0x91, 0xf7, 0x92, 0xdf, 0x9f, 0x9e, /* Byte value: 0x6e */ + 0x7e, 0xbb, 0x5e, 0xc6, 0xe8, 0xf9, 0x47, 0xf5, 0x6b, 0xd9, 0x83, 0xaa, 0x58, 0x93, 0xfb, 0xb2, /* Byte value: 0x6f */ + 0x60, 0x3b, 0x7e, 0xef, 0xbc, 0xdf, 0xfb, 0x4a, 0x70, 0xc1, 0xcc, 0x58, 0xd5, 0xc3, 0x07, 0xb1, /* Byte value: 0x70 */ + 0x37, 0x96, 0xc4, 0x5a, 0xd0, 0xa0, 0xf8, 0xca, 0x61, 0x53, 0xb1, 0xe6, 0xf1, 0x29, 0xb3, 0x32, /* Byte value: 0x71 */ + 0xc4, 0x63, 0x68, 0xe0, 0xe9, 0x82, 0x28, 0x5d, 0x5b, 0x2e, 0xb2, 0x08, 0xe6, 0xe4, 0xf8, 0x75, /* Byte value: 0x72 */ + 0xfa, 0x4b, 0x62, 0x2d, 0x68, 0x50, 0x7c, 0x65, 0xd1, 0xc8, 0xb9, 0x73, 0x99, 0xf5, 0xb8, 0x19, /* Byte value: 0x73 */ + 0x51, 0x53, 0x64, 0xd7, 0x17, 0x1e, 0xf1, 0xcc, 0x16, 0x2b, 0x01, 0x5a, 0x0d, 0xfa, 0x39, 0x3d, /* Byte value: 0x74 */ + 0xc9, 0xc8, 0x32, 0x8a, 0xea, 0x0f, 0x99, 0x66, 0x0b, 0xf4, 0xe1, 0x2d, 0xe7, 0x7d, 0xfd, 0xff, /* Byte value: 0x75 */ + 0x01, 0x94, 0x25, 0xae, 0xf5, 0x4f, 0x96, 0xa3, 0x5e, 0x6b, 0xab, 0x2e, 0x53, 0xb9, 0xdc, 0x35, /* Byte value: 0x76 */ + 0x0d, 0xab, 0x5a, 0x6a, 0x03, 0x8d, 0xb1, 0x3b, 0x50, 0xda, 0x53, 0x25, 0x01, 0x99, 0x05, 0x8a, /* Byte value: 0x77 */ + 0x8a, 0x24, 0x09, 0xb0, 0x5f, 0xf5, 0xf3, 0x8d, 0x08, 0x76, 0x57, 0x8e, 0x35, 0xf7, 0xe1, 0x7e, /* Byte value: 0x78 */ + 0x34, 0xe9, 0xab, 0x6b, 0x0c, 0x71, 0x81, 0xec, 0x83, 0xee, 0x8f, 0x94, 0x04, 0x21, 0x14, 0x6d, /* Byte value: 0x79 */ + 0x4d, 0x38, 0x0e, 0x61, 0x6a, 0xa6, 0xa2, 0xf6, 0xb1, 0xe5, 0xdb, 0xf4, 0x26, 0x1b, 0xbe, 0x54, /* Byte value: 0x7a */ + 0xb0, 0x19, 0x97, 0x80, 0x8c, 0xd8, 0xba, 0x7c, 0x39, 0xff, 0xb5, 0x4d, 0xc5, 0x47, 0x57, 0xc6, /* Byte value: 0x7b */ + 0x49, 0x2d, 0x9a, 0x9c, 0x38, 0x59, 0xbf, 0x3f, 0x0a, 0x8a, 0x32, 0x4c, 0xa9, 0xba, 0x48, 0x80, /* Byte value: 0x7c */ + 0x92, 0x5a, 0xf7, 0xfb, 0x70, 0xb2, 0xbd, 0x7e, 0x14, 0xd7, 0x64, 0x98, 0x91, 0xb7, 0x90, 0xc3, /* Byte value: 0x7d */ + 0x18, 0x7e, 0xfe, 0x4b, 0x2f, 0x47, 0x4e, 0xf3, 0x1c, 0xa1, 0x33, 0x16, 0xa4, 0x40, 0x71, 0xbd, /* Byte value: 0x7e */ + 0x72, 0x84, 0x21, 0x02, 0x1e, 0x3b, 0x60, 0x6d, 0x65, 0x68, 0x7b, 0xa1, 0x0a, 0xb3, 0x22, 0x0d, /* Byte value: 0x7f */ + 0x53, 0xb8, 0x2e, 0x48, 0x3e, 0x80, 0x1e, 0x49, 0xaa, 0xfd, 0x94, 0x06, 0xab, 0x4b, 0x42, 0x57, /* Byte value: 0x80 */ + 0x4a, 0x52, 0xf5, 0xad, 0xe4, 0x88, 0xc6, 0x19, 0xe8, 0x37, 0x0c, 0x3e, 0x5c, 0xb2, 0xef, 0xdf, /* Byte value: 0x81 */ + 0x8d, 0x4e, 0xf2, 0x7c, 0xd1, 0xdb, 0x97, 0x62, 0x51, 0xa4, 0x80, 0x44, 0x4f, 0x5e, 0xb0, 0xf5, /* Byte value: 0x82 */ + 0xab, 0x18, 0x06, 0xfa, 0x7f, 0x4e, 0x8d, 0xa9, 0xc7, 0xe3, 0xb8, 0x29, 0x94, 0x0f, 0x81, 0x24, /* Byte value: 0x83 */ + 0x90, 0xb1, 0xbd, 0x64, 0x59, 0x2c, 0x52, 0xfb, 0xa8, 0x01, 0xf1, 0xc4, 0x37, 0x06, 0xeb, 0xa9, /* Byte value: 0x84 */ + 0x4f, 0xd3, 0x44, 0xfe, 0x43, 0x38, 0x4d, 0x73, 0x0d, 0x33, 0x4e, 0xa8, 0x80, 0xaa, 0xc5, 0x3e, /* Byte value: 0x85 */ + 0x9a, 0x70, 0x1c, 0xc2, 0xd4, 0x8f, 0x87, 0x2f, 0xa1, 0x09, 0x75, 0x2b, 0x4c, 0x36, 0xbf, 0xa8, /* Byte value: 0x86 */ + 0xdb, 0x77, 0x6d, 0x67, 0x48, 0xeb, 0x02, 0x41, 0x1e, 0x5d, 0x56, 0xd4, 0x38, 0x0d, 0xd8, 0x43, /* Byte value: 0x87 */ + 0xd6, 0xdc, 0x37, 0x0d, 0x4b, 0x66, 0xb3, 0x7a, 0x4e, 0x87, 0x05, 0xf1, 0x39, 0x94, 0xdd, 0xc9, /* Byte value: 0x88 */ + 0x1a, 0x95, 0xb4, 0xd4, 0x06, 0xd9, 0xa1, 0x76, 0xa0, 0x77, 0xa6, 0x4a, 0x02, 0xf1, 0x0a, 0xd7, /* Byte value: 0x89 */ + 0xbc, 0x26, 0xe8, 0x44, 0x7a, 0x1a, 0x9d, 0xe4, 0x37, 0x4e, 0x4d, 0x46, 0x97, 0x67, 0x8e, 0x79, /* Byte value: 0x8a */ + 0x10, 0x54, 0x15, 0x72, 0x8b, 0x7a, 0x74, 0xa2, 0xa9, 0x7f, 0x22, 0xa5, 0x79, 0xc1, 0x5e, 0xd6, /* Byte value: 0x8b */ + 0x93, 0xce, 0xd2, 0x55, 0x85, 0xfd, 0x2b, 0xdd, 0x4a, 0xbc, 0xcf, 0xb6, 0xc2, 0x0e, 0x4c, 0xf6, /* Byte value: 0x8c */ + 0x9e, 0x65, 0x88, 0x3f, 0x86, 0x70, 0x9a, 0xe6, 0x1a, 0x66, 0x9c, 0x93, 0xc3, 0x97, 0x49, 0x7c, /* Byte value: 0x8d */ + 0x97, 0xdb, 0x46, 0xa8, 0xd7, 0x02, 0x36, 0x14, 0xf1, 0xd3, 0x26, 0x0e, 0x4d, 0xaf, 0xba, 0x22, /* Byte value: 0x8e */ + 0x30, 0xfc, 0x3f, 0x96, 0x5e, 0x8e, 0x9c, 0x25, 0x38, 0x81, 0x66, 0x2c, 0x8b, 0x80, 0xe2, 0xb9, /* Byte value: 0x8f */ + 0x1e, 0x80, 0x20, 0x29, 0x54, 0x26, 0xbc, 0xbf, 0x1b, 0x18, 0x4f, 0xf2, 0x8d, 0x50, 0xfc, 0x03, /* Byte value: 0x90 */ + 0x0f, 0x40, 0x10, 0xf5, 0x2a, 0x13, 0x5e, 0xbe, 0xec, 0x0c, 0xc6, 0x79, 0xa7, 0x28, 0x7e, 0xe0, /* Byte value: 0x91 */ + 0x66, 0xc5, 0xa0, 0x8d, 0xc7, 0xbe, 0x09, 0x06, 0x77, 0x78, 0xb0, 0xbc, 0xfc, 0xd3, 0x8a, 0x0f, /* Byte value: 0x92 */ + 0x77, 0x05, 0x90, 0x51, 0xb9, 0x8b, 0xeb, 0x07, 0x80, 0x6c, 0x39, 0x37, 0xd6, 0xab, 0x08, 0xec, /* Byte value: 0x93 */ + 0x40, 0x93, 0x54, 0x0b, 0x69, 0x2b, 0x13, 0xcd, 0xe1, 0x3f, 0x88, 0xd1, 0x27, 0x82, 0xbb, 0xde, /* Byte value: 0x94 */ + 0xa2, 0xa6, 0xc8, 0x6d, 0x2e, 0x3c, 0x21, 0x5b, 0x2c, 0x56, 0x02, 0xb4, 0x1a, 0x37, 0x72, 0x7a, /* Byte value: 0x95 */ + 0xc1, 0xe2, 0xd9, 0xb3, 0x4e, 0x32, 0xa3, 0x37, 0xbe, 0x2a, 0xf0, 0x9e, 0x3a, 0xfc, 0xd2, 0x94, /* Byte value: 0x96 */ + 0x6a, 0xfa, 0xdf, 0x49, 0x31, 0x7c, 0x2e, 0x9e, 0x79, 0xc9, 0x48, 0xb7, 0xae, 0xf3, 0x53, 0xb0, /* Byte value: 0x97 */ + 0x12, 0xbf, 0x5f, 0xed, 0xa2, 0xe4, 0x9b, 0x27, 0x15, 0xa9, 0xb7, 0xf9, 0xdf, 0x70, 0x25, 0xbc, /* Byte value: 0x98 */ + 0x54, 0xd2, 0xd5, 0x84, 0xb0, 0xae, 0x7a, 0xa6, 0xf3, 0x2f, 0x43, 0xcc, 0xd1, 0xe2, 0x13, 0xdc, /* Byte value: 0x99 */ + 0x5f, 0x87, 0x51, 0x8c, 0xc8, 0x42, 0x39, 0xd1, 0xa4, 0x4c, 0x6c, 0x0d, 0xf9, 0x6b, 0x9b, 0xe8, /* Byte value: 0x9a */ + 0xd3, 0x5d, 0x86, 0x5e, 0xec, 0xd6, 0x38, 0x10, 0xab, 0x83, 0x47, 0x67, 0xe5, 0x8c, 0xf7, 0x28, /* Byte value: 0x9b */ + 0x65, 0xba, 0xcf, 0xbc, 0x1b, 0x6f, 0x70, 0x20, 0x95, 0xc5, 0x8e, 0xce, 0x09, 0xdb, 0x2d, 0x50, /* Byte value: 0x9c */ + 0xa9, 0xf3, 0x4c, 0x65, 0x56, 0xd0, 0x62, 0x2c, 0x7b, 0x35, 0x2d, 0x75, 0x32, 0xbe, 0xfa, 0x4e, /* Byte value: 0x9d */ + 0x3d, 0x57, 0x65, 0xfc, 0x5d, 0x03, 0x2d, 0x1e, 0x68, 0x5b, 0x35, 0x09, 0x8a, 0x19, 0xe7, 0x33, /* Byte value: 0x9e */ + 0x44, 0x86, 0xc0, 0xf6, 0x3b, 0xd4, 0x0e, 0x04, 0x5a, 0x50, 0x61, 0x69, 0xa8, 0x23, 0x4d, 0x0a, /* Byte value: 0x9f */ + 0x81, 0x71, 0x8d, 0xb8, 0x27, 0x19, 0xb0, 0xfa, 0x5f, 0x15, 0x78, 0x4f, 0x1d, 0x7e, 0x69, 0x4a, /* Byte value: 0xa0 */ + 0xfc, 0xb5, 0xbc, 0x4f, 0x13, 0x31, 0x8e, 0x29, 0xd6, 0x71, 0xc5, 0x97, 0xb0, 0xe5, 0x35, 0xa7, /* Byte value: 0xa1 */ + 0xdf, 0x62, 0xf9, 0x9a, 0x1a, 0x14, 0x1f, 0x88, 0xa5, 0x32, 0xbf, 0x6c, 0xb7, 0xac, 0x2e, 0x97, /* Byte value: 0xa2 */ + 0x46, 0x6d, 0x8a, 0x69, 0x12, 0x4a, 0xe1, 0x81, 0xe6, 0x86, 0xf4, 0x35, 0x0e, 0x92, 0x36, 0x60, /* Byte value: 0xa3 */ + 0xf8, 0xa0, 0x28, 0xb2, 0x41, 0xce, 0x93, 0xe0, 0x6d, 0x1e, 0x2c, 0x2f, 0x3f, 0x44, 0xc3, 0x73, /* Byte value: 0xa4 */ + 0xcc, 0x49, 0x83, 0xd9, 0x4d, 0xbf, 0x12, 0x0c, 0xee, 0xf0, 0xa3, 0xbb, 0x3b, 0x65, 0xd7, 0x1e, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x52, 0x2c, 0x0b, 0xe6, 0xcb, 0xcf, 0x88, 0xea, 0xf4, 0x96, 0x3f, 0x28, 0xf8, 0xf2, 0x9e, 0x62, /* Byte value: 0xa7 */ + 0xed, 0x75, 0x8c, 0x93, 0x6d, 0x04, 0x6c, 0x28, 0x21, 0x65, 0x4c, 0x1c, 0x9a, 0x9d, 0xb7, 0x44, /* Byte value: 0xa8 */ + 0xe4, 0xcb, 0x42, 0x04, 0x3c, 0x76, 0xc0, 0xda, 0xca, 0xd0, 0xf6, 0x81, 0x14, 0xa5, 0x44, 0x1a, /* Byte value: 0xa9 */ + 0x3a, 0x3d, 0x9e, 0x30, 0xd3, 0x2d, 0x49, 0xf1, 0x31, 0x89, 0xe2, 0xc3, 0xf0, 0xb0, 0xb6, 0xb8, /* Byte value: 0xaa */ + 0x73, 0x10, 0x04, 0xac, 0xeb, 0x74, 0xf6, 0xce, 0x3b, 0x03, 0xd0, 0x8f, 0x59, 0x0a, 0xfe, 0x38, /* Byte value: 0xab */ + 0x5d, 0x6c, 0x1b, 0x13, 0xe1, 0xdc, 0xd6, 0x54, 0x18, 0x9a, 0xf9, 0x51, 0x5f, 0xda, 0xe0, 0x82, /* Byte value: 0xac */ + 0x6e, 0xef, 0x4b, 0xb4, 0x63, 0x83, 0x33, 0x57, 0xc2, 0xa6, 0xa1, 0x0f, 0x21, 0x52, 0xa5, 0x64, /* Byte value: 0xad */ + 0x8f, 0xa5, 0xb8, 0xe3, 0xf8, 0x45, 0x78, 0xe7, 0xed, 0x72, 0x15, 0x18, 0xe9, 0xef, 0xcb, 0x9f, /* Byte value: 0xae */ + 0xbf, 0x59, 0x87, 0x75, 0xa6, 0xcb, 0xe4, 0xc2, 0xd5, 0xf3, 0x73, 0x34, 0x62, 0x6f, 0x29, 0x26, /* Byte value: 0xaf */ + 0xcf, 0x36, 0xec, 0xe8, 0x91, 0x6e, 0x6b, 0x2a, 0x0c, 0x4d, 0x9d, 0xc9, 0xce, 0x6d, 0x70, 0x41, /* Byte value: 0xb0 */ + 0xb8, 0x33, 0x7c, 0xb9, 0x28, 0xe5, 0x80, 0x2d, 0x8c, 0x21, 0xa4, 0xfe, 0x18, 0xc6, 0x78, 0xad, /* Byte value: 0xb1 */ + 0xe7, 0xb4, 0x2d, 0x35, 0xe0, 0xa7, 0xb9, 0xfc, 0x28, 0x6d, 0xc8, 0xf3, 0xe1, 0xad, 0xe3, 0x45, /* Byte value: 0xb2 */ + 0xf9, 0x34, 0x0d, 0x1c, 0xb4, 0x81, 0x05, 0x43, 0x33, 0x75, 0x87, 0x01, 0x6c, 0xfd, 0x1f, 0x46, /* Byte value: 0xb3 */ + 0xfd, 0x21, 0x99, 0xe1, 0xe6, 0x7e, 0x18, 0x8a, 0x88, 0x1a, 0x6e, 0xb9, 0xe3, 0x5c, 0xe9, 0x92, /* Byte value: 0xb4 */ + 0xb5, 0x98, 0x26, 0xd3, 0x2b, 0x68, 0x31, 0x16, 0xdc, 0xfb, 0xf7, 0xdb, 0x19, 0x5f, 0x7d, 0x27, /* Byte value: 0xb5 */ + 0x09, 0xbe, 0xce, 0x97, 0x51, 0x72, 0xac, 0xf2, 0xeb, 0xb5, 0xba, 0x9d, 0x8e, 0x38, 0xf3, 0x5e, /* Byte value: 0xb6 */ + 0x47, 0xf9, 0xaf, 0xc7, 0xe7, 0x05, 0x77, 0x22, 0xb8, 0xed, 0x5f, 0x1b, 0x5d, 0x2b, 0xea, 0x55, /* Byte value: 0xb7 */ + 0xe5, 0x5f, 0x67, 0xaa, 0xc9, 0x39, 0x56, 0x79, 0x94, 0xbb, 0x5d, 0xaf, 0x47, 0x1c, 0x98, 0x2f, /* Byte value: 0xb8 */ + 0x31, 0x68, 0x1a, 0x38, 0xab, 0xc1, 0x0a, 0x86, 0x66, 0xea, 0xcd, 0x02, 0xd8, 0x39, 0x3e, 0x8c, /* Byte value: 0xb9 */ + 0xd4, 0x37, 0x7d, 0x92, 0x62, 0xf8, 0x5c, 0xff, 0xf2, 0x51, 0x90, 0xad, 0x9f, 0x25, 0xa6, 0xa3, /* Byte value: 0xba */ + 0xe8, 0xf4, 0x3d, 0xc0, 0xca, 0xb4, 0xe7, 0x42, 0xc4, 0x61, 0x0e, 0x8a, 0x46, 0x85, 0x9d, 0xa5, /* Byte value: 0xbb */ + 0x94, 0xa4, 0x29, 0x99, 0x0b, 0xd3, 0x4f, 0x32, 0x13, 0x6e, 0x18, 0x7c, 0xb8, 0xa7, 0x1d, 0x7d, /* Byte value: 0xbc */ + 0x1c, 0x6b, 0x6a, 0xb6, 0x7d, 0xb8, 0x53, 0x3a, 0xa7, 0xce, 0xda, 0xae, 0x2b, 0xe1, 0x87, 0x69, /* Byte value: 0xbd */ + 0x0e, 0xd4, 0x35, 0x5b, 0xdf, 0x5c, 0xc8, 0x1d, 0xb2, 0x67, 0x6d, 0x57, 0xf4, 0x91, 0xa2, 0xd5, /* Byte value: 0xbe */ + 0xcb, 0x23, 0x78, 0x15, 0xc3, 0x91, 0x76, 0xe3, 0xb7, 0x22, 0x74, 0x71, 0x41, 0xcc, 0x86, 0x95, /* Byte value: 0xbf */ + 0x6d, 0x90, 0x24, 0x85, 0xbf, 0x52, 0x4a, 0x71, 0x20, 0x1b, 0x9f, 0x7d, 0xd4, 0x5a, 0x02, 0x3b, /* Byte value: 0xc0 */ + 0x36, 0x02, 0xe1, 0xf4, 0x25, 0xef, 0x6e, 0x69, 0x3f, 0x38, 0x1a, 0xc8, 0xa2, 0x90, 0x6f, 0x07, /* Byte value: 0xc1 */ + 0x35, 0x7d, 0x8e, 0xc5, 0xf9, 0x3e, 0x17, 0x4f, 0xdd, 0x85, 0x24, 0xba, 0x57, 0x98, 0xc8, 0x58, /* Byte value: 0xc2 */ + 0x74, 0x7a, 0xff, 0x60, 0x65, 0x5a, 0x92, 0x21, 0x62, 0xd1, 0x07, 0x45, 0x23, 0xa3, 0xaf, 0xb3, /* Byte value: 0xc3 */ + 0xc5, 0xf7, 0x4d, 0x4e, 0x1c, 0xcd, 0xbe, 0xfe, 0x05, 0x45, 0x19, 0x26, 0xb5, 0x5d, 0x24, 0x40, /* Byte value: 0xc4 */ + 0x75, 0xee, 0xda, 0xce, 0x90, 0x15, 0x04, 0x82, 0x3c, 0xba, 0xac, 0x6b, 0x70, 0x1a, 0x73, 0x86, /* Byte value: 0xc5 */ + 0xb2, 0xf2, 0xdd, 0x1f, 0xa5, 0x46, 0x55, 0xf9, 0x85, 0x29, 0x20, 0x11, 0x63, 0xf6, 0x2c, 0xac, /* Byte value: 0xc6 */ + 0xd2, 0xc9, 0xa3, 0xf0, 0x19, 0x99, 0xae, 0xb3, 0xf5, 0xe8, 0xec, 0x49, 0xb6, 0x35, 0x2b, 0x1d, /* Byte value: 0xc7 */ + 0x99, 0x0f, 0x73, 0xf3, 0x08, 0x5e, 0xfe, 0x09, 0x43, 0xb4, 0x4b, 0x59, 0xb9, 0x3e, 0x18, 0xf7, /* Byte value: 0xc8 */ + 0x23, 0xd7, 0x45, 0xd5, 0x09, 0x25, 0x91, 0xa1, 0x73, 0x43, 0x7a, 0xfb, 0x07, 0x49, 0x1b, 0x30, /* Byte value: 0xc9 */ + 0x15, 0xd5, 0xa4, 0x21, 0x2c, 0xca, 0xff, 0xc8, 0x4c, 0x7b, 0x60, 0x33, 0xa5, 0xd9, 0x74, 0x37, /* Byte value: 0xca */ + 0x08, 0x2a, 0xeb, 0x39, 0xa4, 0x3d, 0x3a, 0x51, 0xb5, 0xde, 0x11, 0xb3, 0xdd, 0x81, 0x2f, 0x6b, /* Byte value: 0xcb */ + 0x27, 0xc2, 0xd1, 0x28, 0x5b, 0xda, 0x8c, 0x68, 0xc8, 0x2c, 0x93, 0x43, 0x88, 0xe8, 0xed, 0xe4, /* Byte value: 0xcc */ + 0x19, 0xea, 0xdb, 0xe5, 0xda, 0x08, 0xd8, 0x50, 0x42, 0xca, 0x98, 0x38, 0xf7, 0xf9, 0xad, 0x88, /* Byte value: 0xcd */ + 0x76, 0x91, 0xb5, 0xff, 0x4c, 0xc4, 0x7d, 0xa4, 0xde, 0x07, 0x92, 0x19, 0x85, 0x12, 0xd4, 0xd9, /* Byte value: 0xce */ + 0x39, 0x42, 0xf1, 0x01, 0x0f, 0xfc, 0x30, 0xd7, 0xd3, 0x34, 0xdc, 0xb1, 0x05, 0xb8, 0x11, 0xe7, /* Byte value: 0xcf */ + 0x13, 0x2b, 0x7a, 0x43, 0x57, 0xab, 0x0d, 0x84, 0x4b, 0xc2, 0x1c, 0xd7, 0x8c, 0xc9, 0xf9, 0x89, /* Byte value: 0xd0 */ + 0x05, 0x81, 0xb1, 0x53, 0xa7, 0xb0, 0x8b, 0x6a, 0xe5, 0x04, 0x42, 0x96, 0xdc, 0x18, 0x2a, 0xe1, /* Byte value: 0xd1 */ + 0xee, 0x0a, 0xe3, 0xa2, 0xb1, 0xd5, 0x15, 0x0e, 0xc3, 0xd8, 0x72, 0x6e, 0x6f, 0x95, 0x10, 0x1b, /* Byte value: 0xd2 */ + 0x57, 0xad, 0xba, 0xb5, 0x6c, 0x7f, 0x03, 0x80, 0x11, 0x92, 0x7d, 0xbe, 0x24, 0xea, 0xb4, 0x83, /* Byte value: 0xd3 */ + 0x9f, 0xf1, 0xad, 0x91, 0x73, 0x3f, 0x0c, 0x45, 0x44, 0x0d, 0x37, 0xbd, 0x90, 0x2e, 0x95, 0x49, /* Byte value: 0xd4 */ + 0xbd, 0xb2, 0xcd, 0xea, 0x8f, 0x55, 0x0b, 0x47, 0x69, 0x25, 0xe6, 0x68, 0xc4, 0xde, 0x52, 0x4c, /* Byte value: 0xd5 */ + 0x45, 0x12, 0xe5, 0x58, 0xce, 0x9b, 0x98, 0xa7, 0x04, 0x3b, 0xca, 0x47, 0xfb, 0x9a, 0x91, 0x3f, /* Byte value: 0xd6 */ + 0xff, 0xca, 0xd3, 0x7e, 0xcf, 0xe0, 0xf7, 0x0f, 0x34, 0xcc, 0xfb, 0xe5, 0x45, 0xed, 0x92, 0xf8, /* Byte value: 0xd7 */ + 0xc3, 0x09, 0x93, 0x2c, 0x67, 0xac, 0x4c, 0xb2, 0x02, 0xfc, 0x65, 0xc2, 0x9c, 0x4d, 0xa9, 0xfe, /* Byte value: 0xd8 */ + 0x3b, 0xa9, 0xbb, 0x9e, 0x26, 0x62, 0xdf, 0x52, 0x6f, 0xe2, 0x49, 0xed, 0xa3, 0x09, 0x6a, 0x8d, /* Byte value: 0xd9 */ + 0x7b, 0x3a, 0xef, 0x95, 0x4f, 0x49, 0xcc, 0x9f, 0x8e, 0xdd, 0xc1, 0x3c, 0x84, 0x8b, 0xd1, 0x53, /* Byte value: 0xda */ + 0x8e, 0x31, 0x9d, 0x4d, 0x0d, 0x0a, 0xee, 0x44, 0xb3, 0x19, 0xbe, 0x36, 0xba, 0x56, 0x17, 0xaa, /* Byte value: 0xdb */ + 0xe9, 0x60, 0x18, 0x6e, 0x3f, 0xfb, 0x71, 0xe1, 0x9a, 0x0a, 0xa5, 0xa4, 0x15, 0x3c, 0x41, 0x90, /* Byte value: 0xdc */ + 0xc8, 0x5c, 0x17, 0x24, 0x1f, 0x40, 0x0f, 0xc5, 0x55, 0x9f, 0x4a, 0x03, 0xb4, 0xc4, 0x21, 0xca, /* Byte value: 0xdd */ + 0x7c, 0x50, 0x14, 0x59, 0xc1, 0x67, 0xa8, 0x70, 0xd7, 0x0f, 0x16, 0xf6, 0xfe, 0x22, 0x80, 0xd8, /* Byte value: 0xde */ + 0x6b, 0x6e, 0xfa, 0xe7, 0xc4, 0x33, 0xb8, 0x3d, 0x27, 0xa2, 0xe3, 0x99, 0xfd, 0x4a, 0x8f, 0x85, /* Byte value: 0xdf */ + 0x4c, 0xac, 0x2b, 0xcf, 0x9f, 0xe9, 0x34, 0x55, 0xef, 0x8e, 0x70, 0xda, 0x75, 0xa2, 0x62, 0x61, /* Byte value: 0xe0 */ + 0x83, 0x9a, 0xc7, 0x27, 0x0e, 0x87, 0x5f, 0x7f, 0xe3, 0xc3, 0xed, 0x13, 0xbb, 0xcf, 0x12, 0x20, /* Byte value: 0xe1 */ + 0xec, 0xe1, 0xa9, 0x3d, 0x98, 0x4b, 0xfa, 0x8b, 0x7f, 0x0e, 0xe7, 0x32, 0xc9, 0x24, 0x6b, 0x71, /* Byte value: 0xe2 */ + 0x70, 0x6f, 0x6b, 0x9d, 0x37, 0xa5, 0x8f, 0xe8, 0xd9, 0xbe, 0xee, 0xfd, 0xac, 0x02, 0x59, 0x67, /* Byte value: 0xe3 */ + 0xe2, 0x35, 0x9c, 0x66, 0x47, 0x17, 0x32, 0x96, 0xcd, 0x69, 0x8a, 0x65, 0x3d, 0xb5, 0xc9, 0xa4, /* Byte value: 0xe4 */ + 0xf1, 0x1e, 0xe6, 0x25, 0x10, 0xbc, 0x3f, 0x12, 0x86, 0xab, 0x96, 0xb2, 0xb1, 0x7c, 0x30, 0x2d, /* Byte value: 0xe5 */ + 0xcd, 0xdd, 0xa6, 0x77, 0xb8, 0xf0, 0x84, 0xaf, 0xb0, 0x9b, 0x08, 0x95, 0x68, 0xdc, 0x0b, 0x2b, /* Byte value: 0xe6 */ + 0x5a, 0x06, 0xe0, 0xdf, 0x6f, 0xf2, 0xb2, 0xbb, 0x41, 0x48, 0x2e, 0x9b, 0x25, 0x73, 0xb1, 0x09, /* Byte value: 0xe7 */ + 0x2b, 0xfd, 0xae, 0xec, 0xad, 0x18, 0xab, 0xf0, 0xc6, 0x9d, 0x6b, 0x48, 0xda, 0xc8, 0x34, 0x5b, /* Byte value: 0xe8 */ + 0xc2, 0x9d, 0xb6, 0x82, 0x92, 0xe3, 0xda, 0x11, 0x5c, 0x97, 0xce, 0xec, 0xcf, 0xf4, 0x75, 0xcb, /* Byte value: 0xe9 */ + 0xa7, 0x27, 0x79, 0x3e, 0x89, 0x8c, 0xaa, 0x31, 0xc9, 0x52, 0x40, 0x22, 0xc6, 0x2f, 0x58, 0x9b, /* Byte value: 0xea */ + 0xa1, 0xd9, 0xa7, 0x5c, 0xf2, 0xed, 0x58, 0x7d, 0xce, 0xeb, 0x3c, 0xc6, 0xef, 0x3f, 0xd5, 0x25, /* Byte value: 0xeb */ + 0x2c, 0x97, 0x55, 0x20, 0x23, 0x36, 0xcf, 0x1f, 0x9f, 0x4f, 0xbc, 0x82, 0xa0, 0x61, 0x65, 0xd0, /* Byte value: 0xec */ + 0x06, 0xfe, 0xde, 0x62, 0x7b, 0x61, 0xf2, 0x4c, 0x07, 0xb9, 0x7c, 0xe4, 0x29, 0x10, 0x8d, 0xbe, /* Byte value: 0xed */ + 0x2d, 0x03, 0x70, 0x8e, 0xd6, 0x79, 0x59, 0xbc, 0xc1, 0x24, 0x17, 0xac, 0xf3, 0xd8, 0xb9, 0xe5, /* Byte value: 0xee */ + 0x3e, 0x28, 0x0a, 0xcd, 0x81, 0xd2, 0x54, 0x38, 0x8a, 0xe6, 0x0b, 0x7b, 0x7f, 0x11, 0x40, 0x6c, /* Byte value: 0xef */ + 0x71, 0xfb, 0x4e, 0x33, 0xc2, 0xea, 0x19, 0x4b, 0x87, 0xd5, 0x45, 0xd3, 0xff, 0xbb, 0x85, 0x52, /* Byte value: 0xf0 */ + 0x3f, 0xbc, 0x2f, 0x63, 0x74, 0x9d, 0xc2, 0x9b, 0xd4, 0x8d, 0xa0, 0x55, 0x2c, 0xa8, 0x9c, 0x59, /* Byte value: 0xf1 */ + 0xf6, 0x74, 0x1d, 0xe9, 0x9e, 0x92, 0x5b, 0xfd, 0xdf, 0x79, 0x41, 0x78, 0xcb, 0xd5, 0x61, 0xa6, /* Byte value: 0xf2 */ + 0xce, 0xa2, 0xc9, 0x46, 0x64, 0x21, 0xfd, 0x89, 0x52, 0x26, 0x36, 0xe7, 0x9d, 0xd4, 0xac, 0x74, /* Byte value: 0xf3 */ + 0x38, 0xd6, 0xd4, 0xaf, 0xfa, 0xb3, 0xa6, 0x74, 0x8d, 0x5f, 0x77, 0x9f, 0x56, 0x01, 0xcd, 0xd2, /* Byte value: 0xf4 */ + 0x33, 0x83, 0x50, 0xa7, 0x82, 0x5f, 0xe5, 0x03, 0xda, 0x3c, 0x58, 0x5e, 0x7e, 0x88, 0x45, 0xe6, /* Byte value: 0xf5 */ + 0x87, 0x8f, 0x53, 0xda, 0x5c, 0x78, 0x42, 0xb6, 0x58, 0xac, 0x04, 0xab, 0x34, 0x6e, 0xe4, 0xf4, /* Byte value: 0xf6 */ + 0x42, 0x78, 0x1e, 0x94, 0x40, 0xb5, 0xfc, 0x48, 0x5d, 0xe9, 0x1d, 0x8d, 0x81, 0x33, 0xc0, 0xb4, /* Byte value: 0xf7 */ + 0x8c, 0xda, 0xd7, 0xd2, 0x24, 0x94, 0x01, 0xc1, 0x0f, 0xcf, 0x2b, 0x6a, 0x1c, 0xe7, 0x6c, 0xc0, /* Byte value: 0xf8 */ + 0x26, 0x56, 0xf4, 0x86, 0xae, 0x95, 0x1a, 0xcb, 0x96, 0x47, 0x38, 0x6d, 0xdb, 0x51, 0x31, 0xd1, /* Byte value: 0xf9 */ + 0x7a, 0xae, 0xca, 0x3b, 0xba, 0x06, 0x5a, 0x3c, 0xd0, 0xb6, 0x6a, 0x12, 0xd7, 0x32, 0x0d, 0x66, /* Byte value: 0xfa */ + 0xac, 0x72, 0xfd, 0x36, 0xf1, 0x60, 0xe9, 0x46, 0x9e, 0x31, 0x6f, 0xe3, 0xee, 0xa6, 0xd0, 0xaf, /* Byte value: 0xfb */ + 0x98, 0x9b, 0x56, 0x5d, 0xfd, 0x11, 0x68, 0xaa, 0x1d, 0xdf, 0xe0, 0x77, 0xea, 0x87, 0xc4, 0xc2, /* Byte value: 0xfc */ + 0x79, 0xd1, 0xa5, 0x0a, 0x66, 0xd7, 0x23, 0x1a, 0x32, 0x0b, 0x54, 0x60, 0x22, 0x3a, 0xaa, 0x39, /* Byte value: 0xfd */ + 0x8b, 0xb0, 0x2c, 0x1e, 0xaa, 0xba, 0x65, 0x2e, 0x56, 0x1d, 0xfc, 0xa0, 0x66, 0x4e, 0x3d, 0x4b, /* Byte value: 0xfe */ + 0x58, 0xed, 0xaa, 0x40, 0x46, 0x6c, 0x5d, 0x3e, 0xfd, 0x9e, 0xbb, 0xc7, 0x83, 0xc2, 0xca, 0x63, /* Byte value: 0xff */ + 0x56, 0x39, 0x9f, 0x1b, 0x99, 0x30, 0x95, 0x23, 0x4f, 0xf9, 0xd6, 0x90, 0x77, 0x53, 0x68, 0xb6, /* Byte value: 0x00 */ + + /* Matrix row: 9 */ + 0xa8, 0x2c, 0x9d, 0x1e, 0xd9, 0x7e, 0xa9, 0xb3, 0xc0, 0x01, 0x6b, 0x3d, 0xc4, 0xa3, 0x83, 0xb4, /* Byte value: 0x01 */ + 0xb4, 0x6b, 0xa4, 0x9d, 0x6c, 0x77, 0x14, 0x4c, 0x17, 0xa0, 0x80, 0x59, 0xd2, 0xde, 0x39, 0xaa, /* Byte value: 0x02 */ + 0x96, 0x95, 0xc3, 0xd6, 0x72, 0x8f, 0xd1, 0xd8, 0xb2, 0x47, 0xed, 0x28, 0x6d, 0x22, 0x15, 0xce, /* Byte value: 0x03 */ + 0x1e, 0xeb, 0x9c, 0x39, 0x0a, 0xe9, 0x43, 0xcd, 0x63, 0x5d, 0x9a, 0x2f, 0xd4, 0x54, 0xa5, 0x9d, /* Byte value: 0x04 */ + 0x8a, 0xd2, 0xfa, 0x55, 0xc7, 0x86, 0x6c, 0x27, 0x65, 0xe6, 0x06, 0x4c, 0x7b, 0x5f, 0xaf, 0xd0, /* Byte value: 0x05 */ + 0xf5, 0x99, 0x50, 0xe1, 0x53, 0x37, 0x1d, 0xda, 0x6f, 0xe8, 0x61, 0xe9, 0x49, 0x42, 0xb1, 0x07, /* Byte value: 0x06 */ + 0x9f, 0x36, 0xa1, 0x26, 0x75, 0xf9, 0xd0, 0x09, 0x7d, 0x4f, 0x33, 0x03, 0x82, 0x73, 0x87, 0x27, /* Byte value: 0x07 */ + 0xa5, 0x14, 0x76, 0x59, 0x63, 0x0b, 0x97, 0x06, 0xa4, 0x32, 0x57, 0x80, 0x6c, 0xa0, 0x2f, 0x98, /* Byte value: 0x08 */ + 0x13, 0xd3, 0x77, 0x7e, 0xb0, 0x9c, 0x7d, 0x78, 0x07, 0x6e, 0xa6, 0x92, 0x7c, 0x57, 0x09, 0xb1, /* Byte value: 0x09 */ + 0x39, 0xd8, 0xc1, 0x98, 0x17, 0x62, 0xc6, 0x24, 0x37, 0xff, 0xcc, 0x0c, 0x4d, 0x0f, 0x59, 0x9c, /* Byte value: 0x0a */ + 0xac, 0xb7, 0x14, 0xa9, 0x64, 0x7d, 0x96, 0xd7, 0x6b, 0x3a, 0x89, 0xab, 0x83, 0xf1, 0xbd, 0x71, /* Byte value: 0x0b */ + 0x2d, 0x6a, 0x29, 0xb6, 0x1b, 0x6d, 0x05, 0x13, 0x75, 0x28, 0x20, 0x87, 0xd5, 0xd6, 0x9f, 0xcb, /* Byte value: 0x0c */ + 0x83, 0x71, 0x98, 0xa5, 0xc0, 0xf0, 0x6d, 0xf6, 0xaa, 0xee, 0xd8, 0x67, 0x94, 0x0e, 0x3d, 0x39, /* Byte value: 0x0d */ + 0x86, 0xbc, 0xa2, 0x4f, 0xc3, 0x83, 0x2d, 0x8b, 0x5b, 0xab, 0xe3, 0x35, 0xb2, 0xa9, 0xed, 0x5c, /* Byte value: 0x0e */ + 0xb9, 0x53, 0x4f, 0xda, 0xd6, 0x02, 0x2a, 0xf9, 0x73, 0x93, 0xbc, 0xe4, 0x7a, 0xdd, 0x95, 0x86, /* Byte value: 0x0f */ + 0x76, 0xe8, 0xc8, 0x44, 0x93, 0xc7, 0x70, 0x2c, 0xc5, 0x06, 0xb9, 0x8e, 0xdd, 0x4c, 0x8c, 0x3e, /* Byte value: 0x10 */ + 0x0f, 0x94, 0x4e, 0xfd, 0x05, 0x95, 0xc0, 0x87, 0xd0, 0xcf, 0x4d, 0xf6, 0x6a, 0x2a, 0xb3, 0xaf, /* Byte value: 0x11 */ + 0x5a, 0xd4, 0x52, 0xaf, 0x36, 0xda, 0x0a, 0x26, 0xea, 0x50, 0x40, 0xcd, 0x69, 0x6f, 0xfd, 0x55, /* Byte value: 0x12 */ + 0xa0, 0xd9, 0x4c, 0xb3, 0x60, 0x78, 0xd7, 0x7b, 0x55, 0x77, 0x6c, 0xd2, 0x4a, 0x07, 0xff, 0xfd, /* Byte value: 0x13 */ + 0x92, 0x0e, 0x4a, 0x61, 0xcf, 0x8c, 0xee, 0xbc, 0x19, 0x7c, 0x0f, 0xbe, 0x2a, 0x70, 0x2b, 0x0b, /* Byte value: 0x14 */ + 0xe2, 0xd1, 0xae, 0x28, 0x5e, 0xa8, 0x5f, 0xc6, 0xc3, 0xbd, 0x25, 0xed, 0x72, 0x47, 0x86, 0x73, /* Byte value: 0x15 */ + 0x34, 0xe0, 0x2a, 0xdf, 0xad, 0x17, 0xf8, 0x91, 0x53, 0xcc, 0xf0, 0xb1, 0xe5, 0x0c, 0xf5, 0xb0, /* Byte value: 0x16 */ + 0xee, 0xbf, 0xf6, 0x32, 0x5a, 0xad, 0x1e, 0x6a, 0xfd, 0xf0, 0xc0, 0x94, 0xbb, 0xb1, 0xc4, 0xff, /* Byte value: 0x17 */ + 0x6d, 0xce, 0x6e, 0x97, 0x9a, 0x5d, 0x73, 0x9c, 0x57, 0x1e, 0x18, 0xf3, 0x2f, 0xbf, 0xf9, 0xc6, /* Byte value: 0x18 */ + 0x1a, 0x70, 0x15, 0x8e, 0xb7, 0xea, 0x7c, 0xa9, 0xc8, 0x66, 0x78, 0xb9, 0x93, 0x06, 0x9b, 0x58, /* Byte value: 0x19 */ + 0x24, 0xc9, 0x4b, 0x46, 0x1c, 0x1b, 0x04, 0xc2, 0xba, 0x20, 0xfe, 0xac, 0x3a, 0x87, 0x0d, 0x22, /* Byte value: 0x1a */ + 0x1f, 0xbd, 0x2f, 0x64, 0xb4, 0x99, 0x3c, 0xd4, 0x39, 0x23, 0x43, 0xeb, 0xb5, 0xa1, 0x4b, 0x3d, /* Byte value: 0x1b */ + 0xd2, 0xaa, 0x0d, 0x40, 0x4e, 0xbc, 0x98, 0x33, 0x3b, 0x4a, 0x37, 0xca, 0xd0, 0x19, 0x4d, 0x06, /* Byte value: 0x1c */ + 0x18, 0xdc, 0xb0, 0x34, 0x08, 0x0a, 0x82, 0x9b, 0x7c, 0x9a, 0x09, 0xf2, 0x51, 0x2f, 0x84, 0xdb, /* Byte value: 0x1d */ + 0x37, 0x1a, 0x3c, 0x38, 0xac, 0x87, 0x79, 0xba, 0xbd, 0x4e, 0x58, 0x3e, 0x46, 0xd0, 0x04, 0x93, /* Byte value: 0x1e */ + 0x6a, 0xaf, 0xf1, 0xc7, 0x26, 0xce, 0xcd, 0xd3, 0x12, 0xa7, 0x52, 0xea, 0xcb, 0x31, 0x36, 0x20, /* Byte value: 0x1f */ + 0x3f, 0xef, 0xed, 0x95, 0x15, 0x81, 0x07, 0x72, 0x28, 0x38, 0x5f, 0xd1, 0xc8, 0x74, 0x78, 0xda, /* Byte value: 0x20 */ + 0xae, 0x1b, 0xb1, 0x13, 0xdb, 0x9d, 0x68, 0xe5, 0xdf, 0xc6, 0xf8, 0xe0, 0x41, 0xd8, 0xa2, 0xf2, /* Byte value: 0x21 */ + 0x10, 0x29, 0x61, 0x99, 0xb1, 0x0c, 0xfc, 0x53, 0xe9, 0xec, 0x0e, 0x1d, 0xdf, 0x8b, 0xf8, 0x92, /* Byte value: 0x22 */ + 0x46, 0x93, 0x6b, 0x2c, 0x83, 0xd3, 0xb7, 0xd9, 0x3d, 0xf1, 0xab, 0xa9, 0x7f, 0x12, 0x47, 0x4b, /* Byte value: 0x23 */ + 0x6c, 0x98, 0xdd, 0xca, 0x24, 0x2d, 0x0c, 0x85, 0x0d, 0x60, 0xc1, 0x37, 0x4e, 0x4a, 0x17, 0x66, /* Byte value: 0x24 */ + 0xbc, 0x9e, 0x75, 0x30, 0xd5, 0x71, 0x6a, 0x84, 0x82, 0xd6, 0x87, 0xb6, 0x5c, 0x7a, 0x45, 0xe3, /* Byte value: 0x25 */ + 0x68, 0x03, 0x54, 0x7d, 0x99, 0x2e, 0x33, 0xe1, 0xa6, 0x5b, 0x23, 0xa1, 0x09, 0x18, 0x29, 0xa3, /* Byte value: 0x26 */ + 0x0b, 0x0f, 0xc7, 0x4a, 0xb8, 0x96, 0xff, 0xe3, 0x7b, 0xf4, 0xaf, 0x60, 0x2d, 0x78, 0x8d, 0x6a, /* Byte value: 0x27 */ + 0x3e, 0xb9, 0x5e, 0xc8, 0xab, 0xf1, 0x78, 0x6b, 0x72, 0x46, 0x86, 0x15, 0xa9, 0x81, 0x96, 0x7a, /* Byte value: 0x28 */ + 0xfe, 0x96, 0x97, 0xab, 0xeb, 0xa1, 0xe2, 0x39, 0x14, 0x1c, 0xce, 0x89, 0x64, 0x3a, 0x3c, 0x6d, /* Byte value: 0x29 */ + 0xa9, 0x7a, 0x2e, 0x43, 0x67, 0x0e, 0xd6, 0xaa, 0x9a, 0x7f, 0xb2, 0xf9, 0xa5, 0x56, 0x6d, 0x14, /* Byte value: 0x2a */ + 0x28, 0xa7, 0x13, 0x5c, 0x18, 0x1e, 0x45, 0x6e, 0x84, 0x6d, 0x1b, 0xd5, 0xf3, 0x71, 0x4f, 0xae, /* Byte value: 0x2b */ + 0x7c, 0xb1, 0xbc, 0x53, 0x95, 0x21, 0xf0, 0xd6, 0xe4, 0x8c, 0xcf, 0x2a, 0x91, 0xc1, 0xef, 0xf4, /* Byte value: 0x2c */ + 0xf2, 0xf8, 0xcf, 0xb1, 0xef, 0xa4, 0xa3, 0x95, 0x2a, 0x51, 0x2b, 0xf0, 0xad, 0xcc, 0x7e, 0xe1, /* Byte value: 0x2d */ + 0xbf, 0x64, 0x63, 0xd7, 0xd4, 0xe1, 0xeb, 0xaf, 0x6c, 0x54, 0x2f, 0x39, 0xff, 0xa6, 0xb4, 0xc0, /* Byte value: 0x2e */ + 0xf4, 0xcf, 0xe3, 0xbc, 0xed, 0x47, 0x62, 0xc3, 0x35, 0x96, 0xb8, 0x2d, 0x28, 0xb7, 0x5f, 0xa7, /* Byte value: 0x2f */ + 0xcb, 0x20, 0x0e, 0x29, 0xf8, 0xc6, 0x65, 0xb1, 0x1d, 0xae, 0xe7, 0xfc, 0xe0, 0xc3, 0x27, 0x7d, /* Byte value: 0x30 */ + 0x06, 0x37, 0x2c, 0x0d, 0x02, 0xe3, 0xc1, 0x56, 0x1f, 0xc7, 0x93, 0xdd, 0x85, 0x7b, 0x21, 0x46, /* Byte value: 0x31 */ + 0xf8, 0xa1, 0xbb, 0xa6, 0xe9, 0x42, 0x23, 0x6f, 0x0b, 0xdb, 0x5d, 0x54, 0xe1, 0x41, 0x1d, 0x2b, /* Byte value: 0x32 */ + 0xbd, 0xc8, 0xc6, 0x6d, 0x6b, 0x01, 0x15, 0x9d, 0xd8, 0xa8, 0x5e, 0x72, 0x3d, 0x8f, 0xab, 0x43, /* Byte value: 0x33 */ + 0x75, 0x12, 0xde, 0xa3, 0x92, 0x57, 0xf1, 0x07, 0x2b, 0x84, 0x11, 0x01, 0x7e, 0x90, 0x7d, 0x1d, /* Byte value: 0x34 */ + 0x03, 0xfa, 0x16, 0xe7, 0x01, 0x90, 0x81, 0x2b, 0xee, 0x82, 0xa8, 0x8f, 0xa3, 0xdc, 0xf1, 0x23, /* Byte value: 0x35 */ + 0x4c, 0xca, 0x1f, 0x3b, 0x85, 0x35, 0x37, 0x23, 0x1c, 0x7b, 0xdd, 0x0d, 0x33, 0x9f, 0x24, 0x81, /* Byte value: 0x36 */ + 0x4b, 0xab, 0x80, 0x6b, 0x39, 0xa6, 0x89, 0x6c, 0x59, 0xc2, 0x97, 0x14, 0xd7, 0x11, 0xeb, 0x67, /* Byte value: 0x37 */ + 0xc0, 0x2f, 0xc9, 0x63, 0x40, 0x50, 0x9a, 0x52, 0x66, 0x5a, 0x48, 0x9c, 0xcd, 0xbb, 0xaa, 0x17, /* Byte value: 0x38 */ + 0x04, 0x9b, 0x89, 0xb7, 0xbd, 0x03, 0x3f, 0x64, 0xab, 0x3b, 0xe2, 0x96, 0x47, 0x52, 0x3e, 0xc5, /* Byte value: 0x39 */ + 0xb3, 0x0a, 0x3b, 0xcd, 0xd0, 0xe4, 0xaa, 0x03, 0x52, 0x19, 0xca, 0x40, 0x36, 0x50, 0xf6, 0x4c, /* Byte value: 0x3a */ + 0xb6, 0xc7, 0x01, 0x27, 0xd3, 0x97, 0xea, 0x7e, 0xa3, 0x5c, 0xf1, 0x12, 0x10, 0xf7, 0x26, 0x29, /* Byte value: 0x3b */ + 0x51, 0xdb, 0x95, 0xe5, 0x8e, 0x4c, 0xf5, 0xc5, 0x91, 0xa4, 0xef, 0xad, 0x44, 0x17, 0x70, 0x3f, /* Byte value: 0x3c */ + 0xeb, 0x72, 0xcc, 0xd8, 0x59, 0xde, 0x5e, 0x17, 0x0c, 0xb5, 0xfb, 0xc6, 0x9d, 0x16, 0x14, 0x9a, /* Byte value: 0x3d */ + 0x98, 0x57, 0x3e, 0x76, 0xc9, 0x6a, 0x6e, 0x46, 0x38, 0xf6, 0x79, 0x1a, 0x66, 0xfd, 0x48, 0xc1, /* Byte value: 0x3e */ + 0x23, 0xa8, 0xd4, 0x16, 0xa0, 0x88, 0xba, 0x8d, 0xff, 0x99, 0xb4, 0xb5, 0xde, 0x09, 0xc2, 0xc4, /* Byte value: 0x3f */ + 0xab, 0xd6, 0x8b, 0xf9, 0xd8, 0xee, 0x28, 0x98, 0x2e, 0x83, 0xc3, 0xb2, 0x67, 0x7f, 0x72, 0x97, /* Byte value: 0x40 */ + 0xb2, 0x5c, 0x88, 0x90, 0x6e, 0x94, 0xd5, 0x1a, 0x08, 0x67, 0x13, 0x84, 0x57, 0xa5, 0x18, 0xec, /* Byte value: 0x41 */ + 0x99, 0x01, 0x8d, 0x2b, 0x77, 0x1a, 0x11, 0x5f, 0x62, 0x88, 0xa0, 0xde, 0x07, 0x08, 0xa6, 0x61, /* Byte value: 0x42 */ + 0x89, 0x28, 0xec, 0xb2, 0xc6, 0x16, 0xed, 0x0c, 0x8b, 0x64, 0xae, 0xc3, 0xd8, 0x83, 0x5e, 0xf3, /* Byte value: 0x43 */ + 0xdf, 0x92, 0xe6, 0x07, 0xf4, 0xc9, 0xa6, 0x86, 0x5f, 0x79, 0x0b, 0x77, 0x78, 0x1a, 0xe1, 0x2a, /* Byte value: 0x44 */ + 0x0d, 0x38, 0xeb, 0x47, 0xba, 0x75, 0x3e, 0xb5, 0x64, 0x33, 0x3c, 0xbd, 0xa8, 0x03, 0xac, 0x2c, /* Byte value: 0x45 */ + 0x31, 0x2d, 0x10, 0x35, 0xae, 0x64, 0xb8, 0xec, 0xa2, 0x89, 0xcb, 0xe3, 0xc3, 0xab, 0x25, 0xd5, /* Byte value: 0x46 */ + 0x70, 0xdf, 0xe4, 0x49, 0x91, 0x24, 0xb1, 0x7a, 0xda, 0xc1, 0x2a, 0x53, 0x58, 0x37, 0xad, 0x78, /* Byte value: 0x47 */ + 0x73, 0x25, 0xf2, 0xae, 0x90, 0xb4, 0x30, 0x51, 0x34, 0x43, 0x82, 0xdc, 0xfb, 0xeb, 0x5c, 0x5b, /* Byte value: 0x48 */ + 0x1d, 0x11, 0x8a, 0xde, 0x0b, 0x79, 0xc2, 0xe6, 0x8d, 0xdf, 0x32, 0xa0, 0x77, 0x88, 0x54, 0xbe, /* Byte value: 0x49 */ + 0x8d, 0xb3, 0x65, 0x05, 0x7b, 0x15, 0xd2, 0x68, 0x20, 0x5f, 0x4c, 0x55, 0x9f, 0xd1, 0x60, 0x36, /* Byte value: 0x4a */ + 0xf1, 0x02, 0xd9, 0x56, 0xee, 0x34, 0x22, 0xbe, 0xc4, 0xd3, 0x83, 0x7f, 0x0e, 0x10, 0x8f, 0xc2, /* Byte value: 0x4b */ + 0x7d, 0xe7, 0x0f, 0x0e, 0x2b, 0x51, 0x8f, 0xcf, 0xbe, 0xf2, 0x16, 0xee, 0xf0, 0x34, 0x01, 0x54, /* Byte value: 0x4c */ + 0x17, 0x48, 0xfe, 0xc9, 0x0d, 0x9f, 0x42, 0x1c, 0xac, 0x55, 0x44, 0x04, 0x3b, 0x05, 0x37, 0x74, /* Byte value: 0x4d */ + 0x2c, 0x3c, 0x9a, 0xeb, 0xa5, 0x1d, 0x7a, 0x0a, 0x2f, 0x56, 0xf9, 0x43, 0xb4, 0x23, 0x71, 0x6b, /* Byte value: 0x4e */ + 0x35, 0xb6, 0x99, 0x82, 0x13, 0x67, 0x87, 0x88, 0x09, 0xb2, 0x29, 0x75, 0x84, 0xf9, 0x1b, 0x10, /* Byte value: 0x4f */ + 0x88, 0x7e, 0x5f, 0xef, 0x78, 0x66, 0x92, 0x15, 0xd1, 0x1a, 0x77, 0x07, 0xb9, 0x76, 0xb0, 0x53, /* Byte value: 0x50 */ + 0x67, 0x97, 0x1a, 0x80, 0x9c, 0xbb, 0xf3, 0x66, 0x76, 0x94, 0x6e, 0x57, 0x63, 0x32, 0x9a, 0x0c, /* Byte value: 0x51 */ + 0xe1, 0x2b, 0xb8, 0xcf, 0x5f, 0x38, 0xde, 0xed, 0x2d, 0x3f, 0x8d, 0x62, 0xd1, 0x9b, 0x77, 0x50, /* Byte value: 0x52 */ + 0xb5, 0x3d, 0x17, 0xc0, 0xd2, 0x07, 0x6b, 0x55, 0x4d, 0xde, 0x59, 0x9d, 0xb3, 0x2b, 0xd7, 0x0a, /* Byte value: 0x53 */ + 0x64, 0x6d, 0x0c, 0x67, 0x9d, 0x2b, 0x72, 0x4d, 0x98, 0x16, 0xc6, 0xd8, 0xc0, 0xee, 0x6b, 0x2f, /* Byte value: 0x54 */ + 0xb1, 0xa6, 0x9e, 0x77, 0x6f, 0x04, 0x54, 0x31, 0xe6, 0xe5, 0xbb, 0x0b, 0xf4, 0x79, 0xe9, 0xcf, /* Byte value: 0x55 */ + 0x08, 0xf5, 0xd1, 0xad, 0xb9, 0x06, 0x7e, 0xc8, 0x95, 0x76, 0x07, 0xef, 0x8e, 0xa4, 0x7c, 0x49, /* Byte value: 0x56 */ + 0xe5, 0xb0, 0x31, 0x78, 0xe2, 0x3b, 0xe1, 0x89, 0x86, 0x04, 0x6f, 0xf4, 0x96, 0xc9, 0x49, 0x95, /* Byte value: 0x57 */ + 0x1c, 0x47, 0x39, 0x83, 0xb5, 0x09, 0xbd, 0xff, 0xd7, 0xa1, 0xeb, 0x64, 0x16, 0x7d, 0xba, 0x1e, /* Byte value: 0x58 */ + 0x6b, 0xf9, 0x42, 0x9a, 0x98, 0xbe, 0xb2, 0xca, 0x48, 0xd9, 0x8b, 0x2e, 0xaa, 0xc4, 0xd8, 0x80, /* Byte value: 0x59 */ + 0x5c, 0xe3, 0x7e, 0xa2, 0x34, 0x39, 0xcb, 0x70, 0xf5, 0x97, 0xd3, 0x10, 0xec, 0x14, 0xdc, 0x13, /* Byte value: 0x5a */ + 0xa3, 0x23, 0x5a, 0x54, 0x61, 0xe8, 0x56, 0x50, 0xbb, 0xf5, 0xc4, 0x5d, 0xe9, 0xdb, 0x0e, 0xde, /* Byte value: 0x5b */ + 0x7a, 0x86, 0x90, 0x5e, 0x97, 0xc2, 0x31, 0x80, 0xfb, 0x4b, 0x5c, 0xf7, 0x14, 0xba, 0xce, 0xb2, /* Byte value: 0x5c */ + 0xe8, 0x88, 0xda, 0x3f, 0x58, 0x4e, 0xdf, 0x3c, 0xe2, 0x37, 0x53, 0x49, 0x3e, 0xca, 0xe5, 0xb9, /* Byte value: 0x5d */ + 0xda, 0x5f, 0xdc, 0xed, 0xf7, 0xba, 0xe6, 0xfb, 0xae, 0x3c, 0x30, 0x25, 0x5e, 0xbd, 0x31, 0x4f, /* Byte value: 0x5e */ + 0xd7, 0x67, 0x37, 0xaa, 0x4d, 0xcf, 0xd8, 0x4e, 0xca, 0x0f, 0x0c, 0x98, 0xf6, 0xbe, 0x9d, 0x63, /* Byte value: 0x5f */ + 0xfa, 0x0d, 0x1e, 0x1c, 0x56, 0xa2, 0xdd, 0x5d, 0xbf, 0x27, 0x2c, 0x1f, 0x23, 0x68, 0x02, 0xa8, /* Byte value: 0x60 */ + 0xa7, 0xb8, 0xd3, 0xe3, 0xdc, 0xeb, 0x69, 0x34, 0x10, 0xce, 0x26, 0xcb, 0xae, 0x89, 0x30, 0x1b, /* Byte value: 0x61 */ + 0x7f, 0x4b, 0xaa, 0xb4, 0x94, 0xb1, 0x71, 0xfd, 0x0a, 0x0e, 0x67, 0xa5, 0x32, 0x1d, 0x1e, 0xd7, /* Byte value: 0x62 */ + 0xe4, 0xe6, 0x82, 0x25, 0x5c, 0x4b, 0x9e, 0x90, 0xdc, 0x7a, 0xb6, 0x30, 0xf7, 0x3c, 0xa7, 0x35, /* Byte value: 0x63 */ + 0x8f, 0x1f, 0xc0, 0xbf, 0xc4, 0xf5, 0x2c, 0x5a, 0x94, 0xa3, 0x3d, 0x1e, 0x5d, 0xf8, 0x7f, 0xb5, /* Byte value: 0x64 */ + 0xa1, 0x8f, 0xff, 0xee, 0xde, 0x08, 0xa8, 0x62, 0x0f, 0x09, 0xb5, 0x16, 0x2b, 0xf2, 0x11, 0x5d, /* Byte value: 0x65 */ + 0x52, 0x21, 0x83, 0x02, 0x8f, 0xdc, 0x74, 0xee, 0x7f, 0x26, 0x47, 0x22, 0xe7, 0xcb, 0x81, 0x1c, /* Byte value: 0x66 */ + 0xec, 0x13, 0x53, 0x88, 0xe5, 0x4d, 0xe0, 0x58, 0x49, 0x0c, 0xb1, 0xdf, 0x79, 0x98, 0xdb, 0x7c, /* Byte value: 0x67 */ + 0x3b, 0x74, 0x64, 0x22, 0xa8, 0x82, 0x38, 0x16, 0x83, 0x03, 0xbd, 0x47, 0x8f, 0x26, 0x46, 0x1f, /* Byte value: 0x68 */ + 0xa2, 0x75, 0xe9, 0x09, 0xdf, 0x98, 0x29, 0x49, 0xe1, 0x8b, 0x1d, 0x99, 0x88, 0x2e, 0xe0, 0x7e, /* Byte value: 0x69 */ + 0x5f, 0x19, 0x68, 0x45, 0x35, 0xa9, 0x4a, 0x5b, 0x1b, 0x15, 0x7b, 0x9f, 0x4f, 0xc8, 0x2d, 0x30, /* Byte value: 0x6a */ + 0x50, 0x8d, 0x26, 0xb8, 0x30, 0x3c, 0x8a, 0xdc, 0xcb, 0xda, 0x36, 0x69, 0x25, 0xe2, 0x9e, 0x9f, /* Byte value: 0x6b */ + 0x4a, 0xfd, 0x33, 0x36, 0x87, 0xd6, 0xf6, 0x75, 0x03, 0xbc, 0x4e, 0xd0, 0xb6, 0xe4, 0x05, 0xc7, /* Byte value: 0x6c */ + 0x57, 0xec, 0xb9, 0xe8, 0x8c, 0xaf, 0x34, 0x93, 0x8e, 0x63, 0x7c, 0x70, 0xc1, 0x6c, 0x51, 0x79, /* Byte value: 0x6d */ + 0x55, 0x40, 0x1c, 0x52, 0x33, 0x4f, 0xca, 0xa1, 0x3a, 0x9f, 0x0d, 0x3b, 0x03, 0x45, 0x4e, 0xfa, /* Byte value: 0x6e */ + 0xdc, 0x68, 0xf0, 0xe0, 0xf5, 0x59, 0x27, 0xad, 0xb1, 0xfb, 0xa3, 0xf8, 0xdb, 0xc6, 0x10, 0x09, /* Byte value: 0x6f */ + 0xde, 0xc4, 0x55, 0x5a, 0x4a, 0xb9, 0xd9, 0x9f, 0x05, 0x07, 0xd2, 0xb3, 0x19, 0xef, 0x0f, 0x8a, /* Byte value: 0x70 */ + 0x9d, 0x9a, 0x04, 0x9c, 0xca, 0x19, 0x2e, 0x3b, 0xc9, 0xb3, 0x42, 0x48, 0x40, 0x5a, 0x98, 0xa4, /* Byte value: 0x71 */ + 0xe7, 0x1c, 0x94, 0xc2, 0x5d, 0xdb, 0x1f, 0xbb, 0x32, 0xf8, 0x1e, 0xbf, 0x54, 0xe0, 0x56, 0x16, /* Byte value: 0x72 */ + 0xaf, 0x4d, 0x02, 0x4e, 0x65, 0xed, 0x17, 0xfc, 0x85, 0xb8, 0x21, 0x24, 0x20, 0x2d, 0x4c, 0x52, /* Byte value: 0x73 */ + 0x97, 0xc3, 0x70, 0x8b, 0xcc, 0xff, 0xae, 0xc1, 0xe8, 0x39, 0x34, 0xec, 0x0c, 0xd7, 0xfb, 0x6e, /* Byte value: 0x74 */ + 0xaa, 0x80, 0x38, 0xa4, 0x66, 0x9e, 0x57, 0x81, 0x74, 0xfd, 0x1a, 0x76, 0x06, 0x8a, 0x9c, 0x37, /* Byte value: 0x75 */ + 0x26, 0x65, 0xee, 0xfc, 0xa3, 0xfb, 0xfa, 0xf0, 0x0e, 0xdc, 0x8f, 0xe7, 0xf8, 0xae, 0x12, 0xa1, /* Byte value: 0x76 */ + 0x4d, 0x9c, 0xac, 0x66, 0x3b, 0x45, 0x48, 0x3a, 0x46, 0x05, 0x04, 0xc9, 0x52, 0x6a, 0xca, 0x21, /* Byte value: 0x77 */ + 0x54, 0x16, 0xaf, 0x0f, 0x8d, 0x3f, 0xb5, 0xb8, 0x60, 0xe1, 0xd4, 0xff, 0x62, 0xb0, 0xa0, 0x5a, /* Byte value: 0x78 */ + 0xf7, 0x35, 0xf5, 0x5b, 0xec, 0xd7, 0xe3, 0xe8, 0xdb, 0x14, 0x10, 0xa2, 0x8b, 0x6b, 0xae, 0x84, /* Byte value: 0x79 */ + 0xd9, 0xa5, 0xca, 0x0a, 0xf6, 0x2a, 0x67, 0xd0, 0x40, 0xbe, 0x98, 0xaa, 0xfd, 0x61, 0xc0, 0x6c, /* Byte value: 0x7a */ + 0x84, 0x10, 0x07, 0xf5, 0x7c, 0x63, 0xd3, 0xb9, 0xef, 0x57, 0x92, 0x7e, 0x70, 0x80, 0xf2, 0xdf, /* Byte value: 0x7b */ + 0x41, 0xf2, 0xf4, 0x7c, 0x3f, 0x40, 0x09, 0x96, 0x78, 0x48, 0xe1, 0xb0, 0x9b, 0x9c, 0x88, 0xad, /* Byte value: 0x7c */ + 0x82, 0x27, 0x2b, 0xf8, 0x7e, 0x80, 0x12, 0xef, 0xf0, 0x90, 0x01, 0xa3, 0xf5, 0xfb, 0xd3, 0x99, /* Byte value: 0x7d */ + 0xd6, 0x31, 0x84, 0xf7, 0xf3, 0xbf, 0xa7, 0x57, 0x90, 0x71, 0xd5, 0x5c, 0x97, 0x4b, 0x73, 0xc3, /* Byte value: 0x7e */ + 0xb7, 0x91, 0xb2, 0x7a, 0x6d, 0xe7, 0x95, 0x67, 0xf9, 0x22, 0x28, 0xd6, 0x71, 0x02, 0xc8, 0x89, /* Byte value: 0x7f */ + 0xdb, 0x09, 0x6f, 0xb0, 0x49, 0xca, 0x99, 0xe2, 0xf4, 0x42, 0xe9, 0xe1, 0x3f, 0x48, 0xdf, 0xef, /* Byte value: 0x80 */ + 0x2b, 0x5d, 0x05, 0xbb, 0x19, 0x8e, 0xc4, 0x45, 0x6a, 0xef, 0xb3, 0x5a, 0x50, 0xad, 0xbe, 0x8d, /* Byte value: 0x81 */ + 0xa6, 0xee, 0x60, 0xbe, 0x62, 0x9b, 0x16, 0x2d, 0x4a, 0xb0, 0xff, 0x0f, 0xcf, 0x7c, 0xde, 0xbb, /* Byte value: 0x82 */ + 0x38, 0x8e, 0x72, 0xc5, 0xa9, 0x12, 0xb9, 0x3d, 0x6d, 0x81, 0x15, 0xc8, 0x2c, 0xfa, 0xb7, 0x3c, /* Byte value: 0x83 */ + 0xce, 0xed, 0x34, 0xc3, 0xfb, 0xb5, 0x25, 0xcc, 0xec, 0xeb, 0xdc, 0xae, 0xc6, 0x64, 0xf7, 0x18, /* Byte value: 0x84 */ + 0x95, 0x6f, 0xd5, 0x31, 0x73, 0x1f, 0x50, 0xf3, 0x5c, 0xc5, 0x45, 0xa7, 0xce, 0xfe, 0xe4, 0xed, /* Byte value: 0x85 */ + 0x71, 0x89, 0x57, 0x14, 0x2f, 0x54, 0xce, 0x63, 0x80, 0xbf, 0xf3, 0x97, 0x39, 0xc2, 0x43, 0xd8, /* Byte value: 0x86 */ + 0xc3, 0xd5, 0xdf, 0x84, 0x41, 0xc0, 0x1b, 0x79, 0x88, 0xd8, 0xe0, 0x13, 0x6e, 0x67, 0x5b, 0x34, /* Byte value: 0x87 */ + 0x8e, 0x49, 0x73, 0xe2, 0x7a, 0x85, 0x53, 0x43, 0xce, 0xdd, 0xe4, 0xda, 0x3c, 0x0d, 0x91, 0x15, /* Byte value: 0x88 */ + 0x9a, 0xfb, 0x9b, 0xcc, 0x76, 0x8a, 0x90, 0x74, 0x8c, 0x0a, 0x08, 0x51, 0xa4, 0xd4, 0x57, 0x42, /* Byte value: 0x89 */ + 0xef, 0xe9, 0x45, 0x6f, 0xe4, 0xdd, 0x61, 0x73, 0xa7, 0x8e, 0x19, 0x50, 0xda, 0x44, 0x2a, 0x5f, /* Byte value: 0x8a */ + 0x25, 0x9f, 0xf8, 0x1b, 0xa2, 0x6b, 0x7b, 0xdb, 0xe0, 0x5e, 0x27, 0x68, 0x5b, 0x72, 0xe3, 0x82, /* Byte value: 0x8b */ + 0xa4, 0x42, 0xc5, 0x04, 0xdd, 0x7b, 0xe8, 0x1f, 0xfe, 0x4c, 0x8e, 0x44, 0x0d, 0x55, 0xc1, 0x38, /* Byte value: 0x8c */ + 0xe9, 0xde, 0x69, 0x62, 0xe6, 0x3e, 0xa0, 0x25, 0xb8, 0x49, 0x8a, 0x8d, 0x5f, 0x3f, 0x0b, 0x19, /* Byte value: 0x8d */ + 0x3c, 0x15, 0xfb, 0x72, 0x14, 0x11, 0x86, 0x59, 0xc6, 0xba, 0xf7, 0x5e, 0x6b, 0xa8, 0x89, 0xf9, /* Byte value: 0x8e */ + 0x6f, 0x62, 0xcb, 0x2d, 0x25, 0xbd, 0x8d, 0xae, 0xe3, 0xe2, 0x69, 0xb8, 0xed, 0x96, 0xe6, 0x45, /* Byte value: 0x8f */ + 0x02, 0xac, 0xa5, 0xba, 0xbf, 0xe0, 0xfe, 0x32, 0xb4, 0xfc, 0x71, 0x4b, 0xc2, 0x29, 0x1f, 0x83, /* Byte value: 0x90 */ + 0x01, 0x56, 0xb3, 0x5d, 0xbe, 0x70, 0x7f, 0x19, 0x5a, 0x7e, 0xd9, 0xc4, 0x61, 0xf5, 0xee, 0xa0, /* Byte value: 0x91 */ + 0x0a, 0x59, 0x74, 0x17, 0x06, 0xe6, 0x80, 0xfa, 0x21, 0x8a, 0x76, 0xa4, 0x4c, 0x8d, 0x63, 0xca, /* Byte value: 0x92 */ + 0x09, 0xa3, 0x62, 0xf0, 0x07, 0x76, 0x01, 0xd1, 0xcf, 0x08, 0xde, 0x2b, 0xef, 0x51, 0x92, 0xe9, /* Byte value: 0x93 */ + 0x94, 0x39, 0x66, 0x6c, 0xcd, 0x6f, 0x2f, 0xea, 0x06, 0xbb, 0x9c, 0x63, 0xaf, 0x0b, 0x0a, 0x4d, /* Byte value: 0x94 */ + 0xed, 0x45, 0xe0, 0xd5, 0x5b, 0x3d, 0x9f, 0x41, 0x13, 0x72, 0x68, 0x1b, 0x18, 0x6d, 0x35, 0xdc, /* Byte value: 0x95 */ + 0x59, 0x2e, 0x44, 0x48, 0x37, 0x4a, 0x8b, 0x0d, 0x04, 0xd2, 0xe8, 0x42, 0xca, 0xb3, 0x0c, 0x76, /* Byte value: 0x96 */ + 0x61, 0xa0, 0x36, 0x8d, 0x9e, 0x58, 0x32, 0x30, 0x69, 0x53, 0xfd, 0x8a, 0xe6, 0x49, 0xbb, 0x4a, /* Byte value: 0x97 */ + 0x69, 0x55, 0xe7, 0x20, 0x27, 0x5e, 0x4c, 0xf8, 0xfc, 0x25, 0xfa, 0x65, 0x68, 0xed, 0xc7, 0x03, /* Byte value: 0x98 */ + 0x29, 0xf1, 0xa0, 0x01, 0xa6, 0x6e, 0x3a, 0x77, 0xde, 0x13, 0xc2, 0x11, 0x92, 0x84, 0xa1, 0x0e, /* Byte value: 0x99 */ + 0xb0, 0xf0, 0x2d, 0x2a, 0xd1, 0x74, 0x2b, 0x28, 0xbc, 0x9b, 0x62, 0xcf, 0x95, 0x8c, 0x07, 0x6f, /* Byte value: 0x9a */ + 0x30, 0x7b, 0xa3, 0x68, 0x10, 0x14, 0xc7, 0xf5, 0xf8, 0xf7, 0x12, 0x27, 0xa2, 0x5e, 0xcb, 0x75, /* Byte value: 0x9b */ + 0x60, 0xf6, 0x85, 0xd0, 0x20, 0x28, 0x4d, 0x29, 0x33, 0x2d, 0x24, 0x4e, 0x87, 0xbc, 0x55, 0xea, /* Byte value: 0x9c */ + 0x74, 0x44, 0x6d, 0xfe, 0x2c, 0x27, 0x8e, 0x1e, 0x71, 0xfa, 0xc8, 0xc5, 0x1f, 0x65, 0x93, 0xbd, /* Byte value: 0x9d */ + 0x22, 0xfe, 0x67, 0x4b, 0x1e, 0xf8, 0xc5, 0x94, 0xa5, 0xe7, 0x6d, 0x71, 0xbf, 0xfc, 0x2c, 0x64, /* Byte value: 0x9e */ + 0x0c, 0x6e, 0x58, 0x1a, 0x04, 0x05, 0x41, 0xac, 0x3e, 0x4d, 0xe5, 0x79, 0xc9, 0xf6, 0x42, 0x8c, /* Byte value: 0x9f */ + 0xcd, 0x17, 0x22, 0x24, 0xfa, 0x25, 0xa4, 0xe7, 0x02, 0x69, 0x74, 0x21, 0x65, 0xb8, 0x06, 0x3b, /* Byte value: 0xa0 */ + 0x7b, 0xd0, 0x23, 0x03, 0x29, 0xb2, 0x4e, 0x99, 0xa1, 0x35, 0x85, 0x33, 0x75, 0x4f, 0x20, 0x12, /* Byte value: 0xa1 */ + 0x5b, 0x82, 0xe1, 0xf2, 0x88, 0xaa, 0x75, 0x3f, 0xb0, 0x2e, 0x99, 0x09, 0x08, 0x9a, 0x13, 0xf5, /* Byte value: 0xa2 */ + 0x40, 0xa4, 0x47, 0x21, 0x81, 0x30, 0x76, 0x8f, 0x22, 0x36, 0x38, 0x74, 0xfa, 0x69, 0x66, 0x0d, /* Byte value: 0xa3 */ + 0xe3, 0x87, 0x1d, 0x75, 0xe0, 0xd8, 0x20, 0xdf, 0x99, 0xc3, 0xfc, 0x29, 0x13, 0xb2, 0x68, 0xd3, /* Byte value: 0xa4 */ + 0x14, 0xb2, 0xe8, 0x2e, 0x0c, 0x0f, 0xc3, 0x37, 0x42, 0xd7, 0xec, 0x8b, 0x98, 0xd9, 0xc6, 0x57, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0xfd, 0x6c, 0x81, 0x4c, 0xea, 0x31, 0x63, 0x12, 0xfa, 0x9e, 0x66, 0x06, 0xc7, 0xe6, 0xcd, 0x4e, /* Byte value: 0xa7 */ + 0x78, 0x2a, 0x35, 0xe4, 0x28, 0x22, 0xcf, 0xb2, 0x4f, 0xb7, 0x2d, 0xbc, 0xd6, 0x93, 0xd1, 0x31, /* Byte value: 0xa8 */ + 0xad, 0xe1, 0xa7, 0xf4, 0xda, 0x0d, 0xe9, 0xce, 0x31, 0x44, 0x50, 0x6f, 0xe2, 0x04, 0x53, 0xd1, /* Byte value: 0xa9 */ + 0xd0, 0x06, 0xa8, 0xfa, 0xf1, 0x5c, 0x66, 0x01, 0x8f, 0xb6, 0x46, 0x81, 0x12, 0x30, 0x52, 0x85, /* Byte value: 0xaa */ + 0x91, 0xf4, 0x5c, 0x86, 0xce, 0x1c, 0x6f, 0x97, 0xf7, 0xfe, 0xa7, 0x31, 0x89, 0xac, 0xda, 0x28, /* Byte value: 0xab */ + 0xfc, 0x3a, 0x32, 0x11, 0x54, 0x41, 0x1c, 0x0b, 0xa0, 0xe0, 0xbf, 0xc2, 0xa6, 0x13, 0x23, 0xee, /* Byte value: 0xac */ + 0xf9, 0xf7, 0x08, 0xfb, 0x57, 0x32, 0x5c, 0x76, 0x51, 0xa5, 0x84, 0x90, 0x80, 0xb4, 0xf3, 0x8b, /* Byte value: 0xad */ + 0xea, 0x24, 0x7f, 0x85, 0xe7, 0xae, 0x21, 0x0e, 0x56, 0xcb, 0x22, 0x02, 0xfc, 0xe3, 0xfa, 0x3a, /* Byte value: 0xae */ + 0x85, 0x46, 0xb4, 0xa8, 0xc2, 0x13, 0xac, 0xa0, 0xb5, 0x29, 0x4b, 0xba, 0x11, 0x75, 0x1c, 0x7f, /* Byte value: 0xaf */ + 0x7e, 0x1d, 0x19, 0xe9, 0x2a, 0xc1, 0x0e, 0xe4, 0x50, 0x70, 0xbe, 0x61, 0x53, 0xe8, 0xf0, 0x77, /* Byte value: 0xb0 */ + 0x77, 0xbe, 0x7b, 0x19, 0x2d, 0xb7, 0x0f, 0x35, 0x9f, 0x78, 0x60, 0x4a, 0xbc, 0xb9, 0x62, 0x9e, /* Byte value: 0xb1 */ + 0xc7, 0x4e, 0x56, 0x33, 0xfc, 0xc3, 0x24, 0x1d, 0x23, 0xe3, 0x02, 0x85, 0x29, 0x35, 0x65, 0xf1, /* Byte value: 0xb2 */ + 0xc5, 0xe2, 0xf3, 0x89, 0x43, 0x23, 0xda, 0x2f, 0x97, 0x1f, 0x73, 0xce, 0xeb, 0x1c, 0x7a, 0x72, /* Byte value: 0xb3 */ + 0x5d, 0xb5, 0xcd, 0xff, 0x8a, 0x49, 0xb4, 0x69, 0xaf, 0xe9, 0x0a, 0xd4, 0x8d, 0xe1, 0x32, 0xb3, /* Byte value: 0xb4 */ + 0x3a, 0x22, 0xd7, 0x7f, 0x16, 0xf2, 0x47, 0x0f, 0xd9, 0x7d, 0x64, 0x83, 0xee, 0xd3, 0xa8, 0xbf, /* Byte value: 0xb5 */ + 0xd5, 0xcb, 0x92, 0x10, 0xf2, 0x2f, 0x26, 0x7c, 0x7e, 0xf3, 0x7d, 0xd3, 0x34, 0x97, 0x82, 0xe0, /* Byte value: 0xb6 */ + 0x66, 0xc1, 0xa9, 0xdd, 0x22, 0xcb, 0x8c, 0x7f, 0x2c, 0xea, 0xb7, 0x93, 0x02, 0xc7, 0x74, 0xac, /* Byte value: 0xb7 */ + 0x8b, 0x84, 0x49, 0x08, 0x79, 0xf6, 0x13, 0x3e, 0x3f, 0x98, 0xdf, 0x88, 0x1a, 0xaa, 0x41, 0x70, /* Byte value: 0xb8 */ + 0x49, 0x07, 0x25, 0xd1, 0x86, 0x46, 0x77, 0x5e, 0xed, 0x3e, 0xe6, 0x5f, 0x15, 0x38, 0xf4, 0xe4, /* Byte value: 0xb9 */ + 0xc2, 0x83, 0x6c, 0xd9, 0xff, 0xb0, 0x64, 0x60, 0xd2, 0xa6, 0x39, 0xd7, 0x0f, 0x92, 0xb5, 0x94, /* Byte value: 0xba */ + 0xc6, 0x18, 0xe5, 0x6e, 0x42, 0xb3, 0x5b, 0x04, 0x79, 0x9d, 0xdb, 0x41, 0x48, 0xc0, 0x8b, 0x51, /* Byte value: 0xbb */ + 0x56, 0xba, 0x0a, 0xb5, 0x32, 0xdf, 0x4b, 0x8a, 0xd4, 0x1d, 0xa5, 0xb4, 0xa0, 0x99, 0xbf, 0xd9, /* Byte value: 0xbc */ + 0x4e, 0x66, 0xba, 0x81, 0x3a, 0xd5, 0xc9, 0x11, 0xa8, 0x87, 0xac, 0x46, 0xf1, 0xb6, 0x3b, 0x02, /* Byte value: 0xbd */ + 0x27, 0x33, 0x5d, 0xa1, 0x1d, 0x8b, 0x85, 0xe9, 0x54, 0xa2, 0x56, 0x23, 0x99, 0x5b, 0xfc, 0x01, /* Byte value: 0xbe */ + 0xe6, 0x4a, 0x27, 0x9f, 0xe3, 0xab, 0x60, 0xa2, 0x68, 0x86, 0xc7, 0x7b, 0x35, 0x15, 0xb8, 0xb6, /* Byte value: 0xbf */ + 0x93, 0x58, 0xf9, 0x3c, 0x71, 0xfc, 0x91, 0xa5, 0x43, 0x02, 0xd6, 0x7a, 0x4b, 0x85, 0xc5, 0xab, /* Byte value: 0xc0 */ + 0xbb, 0xff, 0xea, 0x60, 0x69, 0xe2, 0xd4, 0xcb, 0xc7, 0x6f, 0xcd, 0xaf, 0xb8, 0xf4, 0x8a, 0x05, /* Byte value: 0xc1 */ + 0xd1, 0x50, 0x1b, 0xa7, 0x4f, 0x2c, 0x19, 0x18, 0xd5, 0xc8, 0x9f, 0x45, 0x73, 0xc5, 0xbc, 0x25, /* Byte value: 0xc2 */ + 0x63, 0x0c, 0x93, 0x37, 0x21, 0xb8, 0xcc, 0x02, 0xdd, 0xaf, 0x8c, 0xc1, 0x24, 0x60, 0xa4, 0xc9, /* Byte value: 0xc3 */ + 0xc1, 0x79, 0x7a, 0x3e, 0xfe, 0x20, 0xe5, 0x4b, 0x3c, 0x24, 0x91, 0x58, 0xac, 0x4e, 0x44, 0xb7, /* Byte value: 0xc4 */ + 0x45, 0x69, 0x7d, 0xcb, 0x82, 0x43, 0x36, 0xf2, 0xd3, 0x73, 0x03, 0x26, 0xdc, 0xce, 0xb6, 0x68, /* Byte value: 0xc5 */ + 0xc8, 0xda, 0x18, 0xce, 0xf9, 0x56, 0xe4, 0x9a, 0xf3, 0x2c, 0x4f, 0x73, 0x43, 0x1f, 0xd6, 0x5e, /* Byte value: 0xc6 */ + 0x16, 0x1e, 0x4d, 0x94, 0xb3, 0xef, 0x3d, 0x05, 0xf6, 0x2b, 0x9d, 0xc0, 0x5a, 0xf0, 0xd9, 0xd4, /* Byte value: 0xc7 */ + 0x1b, 0x26, 0xa6, 0xd3, 0x09, 0x9a, 0x03, 0xb0, 0x92, 0x18, 0xa1, 0x7d, 0xf2, 0xf3, 0x75, 0xf8, /* Byte value: 0xc8 */ + 0x20, 0x52, 0xc2, 0xf1, 0xa1, 0x18, 0x3b, 0xa6, 0x11, 0x1b, 0x1c, 0x3a, 0x7d, 0xd5, 0x33, 0xe7, /* Byte value: 0xc9 */ + 0x9b, 0xad, 0x28, 0x91, 0xc8, 0xfa, 0xef, 0x6d, 0xd6, 0x74, 0xd1, 0x95, 0xc5, 0x21, 0xb9, 0xe2, /* Byte value: 0xca */ + 0xf3, 0xae, 0x7c, 0xec, 0x51, 0xd4, 0xdc, 0x8c, 0x70, 0x2f, 0xf2, 0x34, 0xcc, 0x39, 0x90, 0x41, /* Byte value: 0xcb */ + 0xb8, 0x05, 0xfc, 0x87, 0x68, 0x72, 0x55, 0xe0, 0x29, 0xed, 0x65, 0x20, 0x1b, 0x28, 0x7b, 0x26, /* Byte value: 0xcc */ + 0xf0, 0x54, 0x6a, 0x0b, 0x50, 0x44, 0x5d, 0xa7, 0x9e, 0xad, 0x5a, 0xbb, 0x6f, 0xe5, 0x61, 0x62, /* Byte value: 0xcd */ + 0x2f, 0xc6, 0x8c, 0x0c, 0xa4, 0x8d, 0xfb, 0x21, 0xc1, 0xd4, 0x51, 0xcc, 0x17, 0xff, 0x80, 0x48, /* Byte value: 0xce */ + 0xba, 0xa9, 0x59, 0x3d, 0xd7, 0x92, 0xab, 0xd2, 0x9d, 0x11, 0x14, 0x6b, 0xd9, 0x01, 0x64, 0xa5, /* Byte value: 0xcf */ + 0x4f, 0x30, 0x09, 0xdc, 0x84, 0xa5, 0xb6, 0x08, 0xf2, 0xf9, 0x75, 0x82, 0x90, 0x43, 0xd5, 0xa2, /* Byte value: 0xd0 */ + 0xbe, 0x32, 0xd0, 0x8a, 0x6a, 0x91, 0x94, 0xb6, 0x36, 0x2a, 0xf6, 0xfd, 0x9e, 0x53, 0x5a, 0x60, /* Byte value: 0xd1 */ + 0x12, 0x85, 0xc4, 0x23, 0x0e, 0xec, 0x02, 0x61, 0x5d, 0x10, 0x7f, 0x56, 0x1d, 0xa2, 0xe7, 0x11, /* Byte value: 0xd2 */ + 0x43, 0x5e, 0x51, 0xc6, 0x80, 0xa0, 0xf7, 0xa4, 0xcc, 0xb4, 0x90, 0xfb, 0x59, 0xb5, 0x97, 0x2e, /* Byte value: 0xd3 */ + 0xcf, 0xbb, 0x87, 0x9e, 0x45, 0xc5, 0x5a, 0xd5, 0xb6, 0x95, 0x05, 0x6a, 0xa7, 0x91, 0x19, 0xb8, /* Byte value: 0xd4 */ + 0xc9, 0x8c, 0xab, 0x93, 0x47, 0x26, 0x9b, 0x83, 0xa9, 0x52, 0x96, 0xb7, 0x22, 0xea, 0x38, 0xfe, /* Byte value: 0xd5 */ + 0x2a, 0x0b, 0xb6, 0xe6, 0xa7, 0xfe, 0xbb, 0x5c, 0x30, 0x91, 0x6a, 0x9e, 0x31, 0x58, 0x50, 0x2d, /* Byte value: 0xd6 */ + 0x11, 0x7f, 0xd2, 0xc4, 0x0f, 0x7c, 0x83, 0x4a, 0xb3, 0x92, 0xd7, 0xd9, 0xbe, 0x7e, 0x16, 0x32, /* Byte value: 0xd7 */ + 0x15, 0xe4, 0x5b, 0x73, 0xb2, 0x7f, 0xbc, 0x2e, 0x18, 0xa9, 0x35, 0x4f, 0xf9, 0x2c, 0x28, 0xf7, /* Byte value: 0xd8 */ + 0xf6, 0x63, 0x46, 0x06, 0x52, 0xa7, 0x9c, 0xf1, 0x81, 0x6a, 0xc9, 0x66, 0xea, 0x9e, 0x40, 0x24, /* Byte value: 0xd9 */ + 0x62, 0x5a, 0x20, 0x6a, 0x9f, 0xc8, 0xb3, 0x1b, 0x87, 0xd1, 0x55, 0x05, 0x45, 0x95, 0x4a, 0x69, /* Byte value: 0xda */ + 0xcc, 0x41, 0x91, 0x79, 0x44, 0x55, 0xdb, 0xfe, 0x58, 0x17, 0xad, 0xe5, 0x04, 0x4d, 0xe8, 0x9b, /* Byte value: 0xdb */ + 0xe0, 0x7d, 0x0b, 0x92, 0xe1, 0x48, 0xa1, 0xf4, 0x77, 0x41, 0x54, 0xa6, 0xb0, 0x6e, 0x99, 0xf0, /* Byte value: 0xdc */ + 0x8c, 0xe5, 0xd6, 0x58, 0xc5, 0x65, 0xad, 0x71, 0x7a, 0x21, 0x95, 0x91, 0xfe, 0x24, 0x8e, 0x96, /* Byte value: 0xdd */ + 0x90, 0xa2, 0xef, 0xdb, 0x70, 0x6c, 0x10, 0x8e, 0xad, 0x80, 0x7e, 0xf5, 0xe8, 0x59, 0x34, 0x88, /* Byte value: 0xde */ + 0x47, 0xc5, 0xd8, 0x71, 0x3d, 0xa3, 0xc8, 0xc0, 0x67, 0x8f, 0x72, 0x6d, 0x1e, 0xe7, 0xa9, 0xeb, /* Byte value: 0xdf */ + 0xff, 0xc0, 0x24, 0xf6, 0x55, 0xd1, 0x9d, 0x20, 0x4e, 0x62, 0x17, 0x4d, 0x05, 0xcf, 0xd2, 0xcd, /* Byte value: 0xe0 */ + 0x81, 0xdd, 0x3d, 0x1f, 0x7f, 0x10, 0x93, 0xc4, 0x1e, 0x12, 0xa9, 0x2c, 0x56, 0x27, 0x22, 0xba, /* Byte value: 0xe1 */ + 0x5e, 0x4f, 0xdb, 0x18, 0x8b, 0xd9, 0x35, 0x42, 0x41, 0x6b, 0xa2, 0x5b, 0x2e, 0x3d, 0xc3, 0x90, /* Byte value: 0xe2 */ + 0xfb, 0x5b, 0xad, 0x41, 0xe8, 0xd2, 0xa2, 0x44, 0xe5, 0x59, 0xf5, 0xdb, 0x42, 0x9d, 0xec, 0x08, /* Byte value: 0xe3 */ + 0x79, 0x7c, 0x86, 0xb9, 0x96, 0x52, 0xb0, 0xab, 0x15, 0xc9, 0xf4, 0x78, 0xb7, 0x66, 0x3f, 0x91, /* Byte value: 0xe4 */ + 0x36, 0x4c, 0x8f, 0x65, 0x12, 0xf7, 0x06, 0xa3, 0xe7, 0x30, 0x81, 0xfa, 0x27, 0x25, 0xea, 0x33, /* Byte value: 0xe5 */ + 0x32, 0xd7, 0x06, 0xd2, 0xaf, 0xf4, 0x39, 0xc7, 0x4c, 0x0b, 0x63, 0x6c, 0x60, 0x77, 0xd4, 0xf6, /* Byte value: 0xe6 */ + 0x0e, 0xc2, 0xfd, 0xa0, 0xbb, 0xe5, 0xbf, 0x9e, 0x8a, 0xb1, 0x94, 0x32, 0x0b, 0xdf, 0x5d, 0x0f, /* Byte value: 0xe7 */ + 0xd3, 0xfc, 0xbe, 0x1d, 0xf0, 0xcc, 0xe7, 0x2a, 0x61, 0x34, 0xee, 0x0e, 0xb1, 0xec, 0xa3, 0xa6, /* Byte value: 0xe8 */ + 0x33, 0x81, 0xb5, 0x8f, 0x11, 0x84, 0x46, 0xde, 0x16, 0x75, 0xba, 0xa8, 0x01, 0x82, 0x3a, 0x56, /* Byte value: 0xe9 */ + 0x53, 0x77, 0x30, 0x5f, 0x31, 0xac, 0x0b, 0xf7, 0x25, 0x58, 0x9e, 0xe6, 0x86, 0x3e, 0x6f, 0xbc, /* Byte value: 0xea */ + 0x87, 0xea, 0x11, 0x12, 0x7d, 0xf3, 0x52, 0x92, 0x01, 0xd5, 0x3a, 0xf1, 0xd3, 0x5c, 0x03, 0xfc, /* Byte value: 0xeb */ + 0x21, 0x04, 0x71, 0xac, 0x1f, 0x68, 0x44, 0xbf, 0x4b, 0x65, 0xc5, 0xfe, 0x1c, 0x20, 0xdd, 0x47, /* Byte value: 0xec */ + 0xd4, 0x9d, 0x21, 0x4d, 0x4c, 0x5f, 0x59, 0x65, 0x24, 0x8d, 0xa4, 0x17, 0x55, 0x62, 0x6c, 0x40, /* Byte value: 0xed */ + 0x07, 0x61, 0x9f, 0x50, 0xbc, 0x93, 0xbe, 0x4f, 0x45, 0xb9, 0x4a, 0x19, 0xe4, 0x8e, 0xcf, 0xe6, /* Byte value: 0xee */ + 0x48, 0x51, 0x96, 0x8c, 0x38, 0x36, 0x08, 0x47, 0xb7, 0x40, 0x3f, 0x9b, 0x74, 0xcd, 0x1a, 0x44, /* Byte value: 0xef */ + 0xdd, 0x3e, 0x43, 0xbd, 0x4b, 0x29, 0x58, 0xb4, 0xeb, 0x85, 0x7a, 0x3c, 0xba, 0x33, 0xfe, 0xa9, /* Byte value: 0xf0 */ + 0x6e, 0x34, 0x78, 0x70, 0x9b, 0xcd, 0xf2, 0xb7, 0xb9, 0x9c, 0xb0, 0x7c, 0x8c, 0x63, 0x08, 0xe5, /* Byte value: 0xf1 */ + 0xc4, 0xb4, 0x40, 0xd4, 0xfd, 0x53, 0xa5, 0x36, 0xcd, 0x61, 0xaa, 0x0a, 0x8a, 0xe9, 0x94, 0xd2, /* Byte value: 0xf2 */ + 0x58, 0x78, 0xf7, 0x15, 0x89, 0x3a, 0xf4, 0x14, 0x5e, 0xac, 0x31, 0x86, 0xab, 0x46, 0xe2, 0xd6, /* Byte value: 0xf3 */ + 0x9c, 0xcc, 0xb7, 0xc1, 0x74, 0x69, 0x51, 0x22, 0x93, 0xcd, 0x9b, 0x8c, 0x21, 0xaf, 0x76, 0x04, /* Byte value: 0xf4 */ + 0x05, 0xcd, 0x3a, 0xea, 0x03, 0x73, 0x40, 0x7d, 0xf1, 0x45, 0x3b, 0x52, 0x26, 0xa7, 0xd0, 0x65, /* Byte value: 0xf5 */ + 0x19, 0x8a, 0x03, 0x69, 0xb6, 0x7a, 0xfd, 0x82, 0x26, 0xe4, 0xd0, 0x36, 0x30, 0xda, 0x6a, 0x7b, /* Byte value: 0xf6 */ + 0xd8, 0xf3, 0x79, 0x57, 0x48, 0x5a, 0x18, 0xc9, 0x1a, 0xc0, 0x41, 0x6e, 0x9c, 0x94, 0x2e, 0xcc, /* Byte value: 0xf7 */ + 0x80, 0x8b, 0x8e, 0x42, 0xc1, 0x60, 0xec, 0xdd, 0x44, 0x6c, 0x70, 0xe8, 0x37, 0xd2, 0xcc, 0x1a, /* Byte value: 0xf8 */ + 0x9e, 0x60, 0x12, 0x7b, 0xcb, 0x89, 0xaf, 0x10, 0x27, 0x31, 0xea, 0xc7, 0xe3, 0x86, 0x69, 0x87, /* Byte value: 0xf9 */ + 0x44, 0x3f, 0xce, 0x96, 0x3c, 0x33, 0x49, 0xeb, 0x89, 0x0d, 0xda, 0xe2, 0xbd, 0x3b, 0x58, 0xc8, /* Byte value: 0xfa */ + 0xca, 0x76, 0xbd, 0x74, 0x46, 0xb6, 0x1a, 0xa8, 0x47, 0xd0, 0x3e, 0x38, 0x81, 0x36, 0xc9, 0xdd, /* Byte value: 0xfb */ + 0x3d, 0x43, 0x48, 0x2f, 0xaa, 0x61, 0xf9, 0x40, 0x9c, 0xc4, 0x2e, 0x9a, 0x0a, 0x5d, 0x67, 0x59, /* Byte value: 0xfc */ + 0x2e, 0x90, 0x3f, 0x51, 0x1a, 0xfd, 0x84, 0x38, 0x9b, 0xaa, 0x88, 0x08, 0x76, 0x0a, 0x6e, 0xe8, /* Byte value: 0xfd */ + 0x72, 0x73, 0x41, 0xf3, 0x2e, 0xc4, 0x4f, 0x48, 0x6e, 0x3d, 0x5b, 0x18, 0x9a, 0x1e, 0xb2, 0xfb, /* Byte value: 0xfe */ + 0x42, 0x08, 0xe2, 0x9b, 0x3e, 0xd0, 0x88, 0xbd, 0x96, 0xca, 0x49, 0x3f, 0x38, 0x40, 0x79, 0x8e, /* Byte value: 0xff */ + 0x65, 0x3b, 0xbf, 0x3a, 0x23, 0x5b, 0x0d, 0x54, 0xc2, 0x68, 0x1f, 0x1c, 0xa1, 0x1b, 0x85, 0x8f, /* Byte value: 0x00 */ + + /* Matrix row: 10 */ + 0xd4, 0x19, 0x2d, 0xd4, 0xc2, 0xc3, 0xd3, 0x9c, 0xe1, 0x5d, 0xa9, 0x18, 0x2c, 0xd1, 0xbe, 0x8f, /* Byte value: 0x01 */ + 0x40, 0x7b, 0xcb, 0x40, 0x94, 0x34, 0xa6, 0x04, 0x50, 0xb3, 0x14, 0xdb, 0x6b, 0x25, 0x60, 0xb5, /* Byte value: 0x02 */ + 0x97, 0xc0, 0xd2, 0x97, 0x3c, 0x7b, 0x81, 0x84, 0xc2, 0x71, 0xd1, 0x87, 0x95, 0x0f, 0x3d, 0xb7, /* Byte value: 0x03 */ + 0x4d, 0x69, 0xb6, 0x4d, 0xd9, 0x84, 0x1d, 0xc1, 0xcf, 0xff, 0x43, 0x34, 0xeb, 0xa7, 0x8a, 0xbf, /* Byte value: 0x04 */ + 0x03, 0xa2, 0x34, 0x03, 0x6a, 0x8c, 0xf4, 0x1c, 0x73, 0x9f, 0x6c, 0x44, 0xd2, 0xfb, 0xe3, 0x8d, /* Byte value: 0x05 */ + 0xd1, 0x3c, 0x71, 0xd1, 0x7c, 0x94, 0x0c, 0xb8, 0x74, 0x3f, 0x1d, 0xd4, 0x99, 0x1f, 0x58, 0xdb, /* Byte value: 0x06 */ + 0xf8, 0x08, 0x79, 0xf8, 0xe3, 0xac, 0xd6, 0xee, 0xc6, 0xdc, 0xd0, 0x47, 0x36, 0x48, 0x84, 0x45, /* Byte value: 0x07 */ + 0xca, 0xc7, 0x26, 0xca, 0xc0, 0xf2, 0x54, 0x44, 0x19, 0xd2, 0x97, 0xf5, 0x14, 0x30, 0xaf, 0xb4, /* Byte value: 0x08 */ + 0x53, 0xb7, 0xbd, 0x53, 0xdb, 0xb5, 0x9a, 0x19, 0x37, 0x70, 0x7d, 0xd9, 0xd3, 0x46, 0x9b, 0x84, /* Byte value: 0x09 */ + 0x66, 0x20, 0x27, 0x66, 0x0a, 0xf5, 0xde, 0x3e, 0x9e, 0xf6, 0xc6, 0xdf, 0xd8, 0xe3, 0x55, 0xd7, /* Byte value: 0x0a */ + 0xa5, 0x0f, 0x8d, 0xa5, 0x1f, 0x25, 0x03, 0x2e, 0x1d, 0x7f, 0x96, 0x35, 0xb7, 0x77, 0x16, 0x46, /* Byte value: 0x0b */ + 0x10, 0x6e, 0x42, 0x10, 0x25, 0x0d, 0xc8, 0x01, 0x14, 0x5c, 0x05, 0x46, 0x6a, 0x98, 0x18, 0xbc, /* Byte value: 0x0c */ + 0x6c, 0x6a, 0x9f, 0x6c, 0xb5, 0x5b, 0xa3, 0x76, 0x77, 0x32, 0x6d, 0x84, 0x71, 0xbc, 0x5a, 0x7f, /* Byte value: 0x0d */ + 0x90, 0x98, 0x17, 0x90, 0xce, 0x65, 0x47, 0x09, 0xb4, 0xf9, 0x2d, 0x33, 0xbc, 0xd2, 0xd8, 0x15, /* Byte value: 0x0e */ + 0x5e, 0xa5, 0xc0, 0x5e, 0x96, 0x05, 0x21, 0xdc, 0xa8, 0x3c, 0x2a, 0x36, 0x53, 0xc4, 0x71, 0x8e, /* Byte value: 0x0f */ + 0xbd, 0x56, 0xee, 0xbd, 0xc9, 0xcf, 0xaf, 0xce, 0x03, 0x0d, 0x70, 0x50, 0xe8, 0xa3, 0x02, 0xa4, /* Byte value: 0x10 */ + 0xc7, 0xd5, 0x5b, 0xc7, 0x8d, 0x42, 0xef, 0x81, 0x86, 0x9e, 0xc0, 0x1a, 0x94, 0xb2, 0x45, 0xbe, /* Byte value: 0x11 */ + 0x20, 0xdc, 0x84, 0x20, 0x4a, 0x1a, 0x53, 0x02, 0x28, 0xb8, 0x0a, 0x8c, 0xd4, 0xf3, 0x30, 0xbb, /* Byte value: 0x12 */ + 0x36, 0x35, 0xae, 0x36, 0xbb, 0xcc, 0xb0, 0x3b, 0xda, 0x19, 0xd7, 0x42, 0xd9, 0x5e, 0x2d, 0xde, /* Byte value: 0x13 */ + 0xe6, 0xd6, 0x72, 0xe6, 0xe1, 0x9d, 0x51, 0x36, 0x3e, 0x53, 0xee, 0xaa, 0x0e, 0xa9, 0x95, 0x7e, /* Byte value: 0x14 */ + 0xf3, 0x9d, 0x6c, 0xf3, 0x7a, 0xc7, 0x46, 0x13, 0xbf, 0x6d, 0x5f, 0x20, 0xd1, 0xff, 0x6b, 0x96, /* Byte value: 0x15 */ + 0x78, 0xfe, 0x2c, 0x78, 0x08, 0xc4, 0x59, 0xe6, 0x66, 0x79, 0xf8, 0x32, 0xe0, 0x02, 0x44, 0xec, /* Byte value: 0x16 */ + 0x60, 0xa7, 0x4f, 0x60, 0xde, 0x2e, 0xf5, 0x06, 0x78, 0x0b, 0x1e, 0x57, 0xbf, 0xd6, 0x50, 0x0e, /* Byte value: 0x17 */ + 0x0c, 0xcd, 0xd0, 0x0c, 0x6b, 0x75, 0x56, 0x70, 0x0f, 0x39, 0x73, 0xd3, 0xce, 0x6a, 0x0a, 0x71, /* Byte value: 0x18 */ + 0x3c, 0x7f, 0x16, 0x3c, 0x04, 0x62, 0xcd, 0x73, 0x33, 0xdd, 0x7c, 0x19, 0x70, 0x01, 0x22, 0x76, /* Byte value: 0x19 */ + 0x7f, 0xa6, 0xe9, 0x7f, 0xfa, 0xda, 0x9f, 0x6b, 0x10, 0xf1, 0x04, 0x86, 0xc9, 0xdf, 0xa1, 0x4e, /* Byte value: 0x1a */ + 0xc0, 0x8d, 0x9e, 0xc0, 0x7f, 0x5c, 0x29, 0x0c, 0xf0, 0x16, 0x3c, 0xae, 0xbd, 0x6f, 0xa0, 0x1c, /* Byte value: 0x1b */ + 0xfa, 0x75, 0xe0, 0xfa, 0xaf, 0xe5, 0xcf, 0x47, 0x25, 0x36, 0x98, 0x3f, 0xaa, 0x5b, 0x87, 0xb3, /* Byte value: 0x1c */ + 0xe5, 0x74, 0x46, 0xe5, 0x8b, 0x11, 0xa5, 0x2a, 0x4d, 0xcc, 0x82, 0xee, 0xdc, 0x52, 0x76, 0xf3, /* Byte value: 0x1d */ + 0x2c, 0x11, 0x54, 0x2c, 0x21, 0x6f, 0x05, 0x72, 0x27, 0x81, 0x79, 0x5f, 0x1a, 0x99, 0x3a, 0xca, /* Byte value: 0x1e */ + 0x29, 0x34, 0x08, 0x29, 0x9f, 0x38, 0xda, 0x56, 0xb2, 0xe3, 0xcd, 0x93, 0xaf, 0x57, 0xdc, 0x9e, /* Byte value: 0x1f */ + 0xce, 0x3d, 0xd7, 0xce, 0x58, 0x60, 0x66, 0xd5, 0x1c, 0xc5, 0x07, 0x05, 0xef, 0x16, 0xa9, 0x9b, /* Byte value: 0x20 */ + 0x7c, 0x04, 0xdd, 0x7c, 0x90, 0x56, 0x6b, 0x77, 0x63, 0x6e, 0x68, 0xc2, 0x1b, 0x24, 0x42, 0xc3, /* Byte value: 0x21 */ + 0x07, 0x58, 0xc5, 0x07, 0xf2, 0x1e, 0xc6, 0x8d, 0x76, 0x88, 0xfc, 0xb4, 0x29, 0xdd, 0xe5, 0xa2, /* Byte value: 0x22 */ + 0xb4, 0xbe, 0x62, 0xb4, 0x1c, 0xed, 0x26, 0x9a, 0x99, 0x56, 0xb7, 0x4f, 0x93, 0x07, 0xee, 0x81, /* Byte value: 0x23 */ + 0x81, 0x29, 0xf8, 0x81, 0xcd, 0xad, 0x62, 0xbd, 0x30, 0xd0, 0x0c, 0x49, 0x98, 0xa2, 0x20, 0xd2, /* Byte value: 0x24 */ + 0xa2, 0x57, 0x48, 0xa2, 0xed, 0x3b, 0xc5, 0xa3, 0x6b, 0xf7, 0x6a, 0x81, 0x9e, 0xaa, 0xf3, 0xe4, /* Byte value: 0x25 */ + 0xf0, 0x3f, 0x58, 0xf0, 0x10, 0x4b, 0xb2, 0x0f, 0xcc, 0xf2, 0x33, 0x64, 0x03, 0x04, 0x88, 0x1b, /* Byte value: 0x26 */ + 0xb6, 0xc3, 0xfb, 0xb6, 0x50, 0xa4, 0x3f, 0x33, 0x7a, 0xbc, 0xff, 0x37, 0x0f, 0x14, 0xed, 0x77, /* Byte value: 0x27 */ + 0x43, 0xd9, 0xff, 0x43, 0xfe, 0xb8, 0x52, 0x18, 0x23, 0x2c, 0x78, 0x9f, 0xb9, 0xde, 0x83, 0x38, /* Byte value: 0x28 */ + 0x67, 0xff, 0x8a, 0x67, 0x2c, 0x30, 0x33, 0x8b, 0x0e, 0x83, 0xe2, 0xe3, 0x96, 0x0b, 0xb5, 0xac, /* Byte value: 0x29 */ + 0x59, 0xfd, 0x05, 0x59, 0x64, 0x1b, 0xe7, 0x51, 0xde, 0xb4, 0xd6, 0x82, 0x7a, 0x19, 0x94, 0x2c, /* Byte value: 0x2a */ + 0xec, 0x9c, 0xca, 0xec, 0x5e, 0x33, 0x2c, 0x7e, 0xd7, 0x97, 0x45, 0xf1, 0xa7, 0xf6, 0x9a, 0xd6, /* Byte value: 0x2b */ + 0x86, 0x71, 0x3d, 0x86, 0x3f, 0xb3, 0xa4, 0x30, 0x46, 0x58, 0xf0, 0xfd, 0xb1, 0x7f, 0xc5, 0x70, /* Byte value: 0x2c */ + 0xf4, 0xc5, 0xa9, 0xf4, 0x88, 0xd9, 0x80, 0x9e, 0xc9, 0xe5, 0xa3, 0x94, 0xf8, 0x22, 0x8e, 0x34, /* Byte value: 0x2d */ + 0xf6, 0xb8, 0x30, 0xf6, 0xc4, 0x90, 0x99, 0x37, 0x2a, 0x0f, 0xeb, 0xec, 0x64, 0x31, 0x8d, 0xc2, /* Byte value: 0x2e */ + 0x5c, 0xd8, 0x59, 0x5c, 0xda, 0x4c, 0x38, 0x75, 0x4b, 0xd6, 0x62, 0x4e, 0xcf, 0xd7, 0x72, 0x78, /* Byte value: 0x2f */ + 0x92, 0xe5, 0x8e, 0x92, 0x82, 0x2c, 0x5e, 0xa0, 0x57, 0x13, 0x65, 0x4b, 0x20, 0xc1, 0xdb, 0xe3, /* Byte value: 0x30 */ + 0xa8, 0x1d, 0xf0, 0xa8, 0x52, 0x95, 0xb8, 0xeb, 0x82, 0x33, 0xc1, 0xda, 0x37, 0xf5, 0xfc, 0x4c, /* Byte value: 0x31 */ + 0xcf, 0xe2, 0x7a, 0xcf, 0x7e, 0xa5, 0x8b, 0x60, 0x8c, 0xb0, 0x23, 0x39, 0xa1, 0xfe, 0x49, 0xe0, /* Byte value: 0x32 */ + 0x2f, 0xb3, 0x60, 0x2f, 0x4b, 0xe3, 0xf1, 0x6e, 0x54, 0x1e, 0x15, 0x1b, 0xc8, 0x62, 0xd9, 0x47, /* Byte value: 0x33 */ + 0xe9, 0xb9, 0x96, 0xe9, 0xe0, 0x64, 0xf3, 0x5a, 0x42, 0xf5, 0xf1, 0x3d, 0x12, 0x38, 0x7c, 0x82, /* Byte value: 0x34 */ + 0x54, 0xef, 0x78, 0x54, 0x29, 0xab, 0x5c, 0x94, 0x41, 0xf8, 0x81, 0x6d, 0xfa, 0x9b, 0x7e, 0x26, /* Byte value: 0x35 */ + 0x8f, 0x99, 0xb1, 0x8f, 0xea, 0x91, 0x2d, 0x64, 0xdc, 0x03, 0x37, 0xe2, 0xca, 0xdb, 0x29, 0x55, /* Byte value: 0x36 */ + 0xaa, 0x60, 0x69, 0xaa, 0x1e, 0xdc, 0xa1, 0x42, 0x61, 0xd9, 0x89, 0xa2, 0xab, 0xe6, 0xff, 0xba, /* Byte value: 0x37 */ + 0x24, 0x26, 0x75, 0x24, 0xd2, 0x88, 0x61, 0x93, 0x2d, 0xaf, 0x9a, 0x7c, 0x2f, 0xd5, 0x36, 0x94, /* Byte value: 0x38 */ + 0x71, 0x16, 0xa0, 0x71, 0xdd, 0xe6, 0xd0, 0xb2, 0xfc, 0x22, 0x3f, 0x2d, 0x9b, 0xa6, 0xa8, 0xc9, /* Byte value: 0x39 */ + 0x65, 0x82, 0x13, 0x65, 0x60, 0x79, 0x2a, 0x22, 0xed, 0x69, 0xaa, 0x9b, 0x0a, 0x18, 0xb6, 0x5a, /* Byte value: 0x3a */ + 0x99, 0x70, 0x9b, 0x99, 0x1b, 0x47, 0xce, 0x5d, 0x2e, 0xa2, 0xea, 0x2c, 0xc7, 0x76, 0x34, 0x30, /* Byte value: 0x3b */ + 0x96, 0x1f, 0x7f, 0x96, 0x1a, 0xbe, 0x6c, 0x31, 0x52, 0x04, 0xf5, 0xbb, 0xdb, 0xe7, 0xdd, 0xcc, /* Byte value: 0x3c */ + 0x9c, 0x55, 0xc7, 0x9c, 0xa5, 0x10, 0x11, 0x79, 0xbb, 0xc0, 0x5e, 0xe0, 0x72, 0xb8, 0xd2, 0x64, /* Byte value: 0x3d */ + 0xdd, 0xf1, 0xa1, 0xdd, 0x17, 0xe1, 0x5a, 0xc8, 0x7b, 0x06, 0x6e, 0x07, 0x57, 0x75, 0x52, 0xaa, /* Byte value: 0x3e */ + 0x5a, 0x5f, 0x31, 0x5a, 0x0e, 0x97, 0x13, 0x4d, 0xad, 0x2b, 0xba, 0xc6, 0xa8, 0xe2, 0x77, 0xa1, /* Byte value: 0x3f */ + 0x80, 0xf6, 0x55, 0x80, 0xeb, 0x68, 0x8f, 0x08, 0xa0, 0xa5, 0x28, 0x75, 0xd6, 0x4a, 0xc0, 0xa9, /* Byte value: 0x40 */ + 0xe8, 0x66, 0x3b, 0xe8, 0xc6, 0xa1, 0x1e, 0xef, 0xd2, 0x80, 0xd5, 0x01, 0x5c, 0xd0, 0x9c, 0xf9, /* Byte value: 0x41 */ + 0x50, 0x15, 0x89, 0x50, 0xb1, 0x39, 0x6e, 0x05, 0x44, 0xef, 0x11, 0x9d, 0x01, 0xbd, 0x78, 0x09, /* Byte value: 0x42 */ + 0x57, 0x4d, 0x4c, 0x57, 0x43, 0x27, 0xa8, 0x88, 0x32, 0x67, 0xed, 0x29, 0x28, 0x60, 0x9d, 0xab, /* Byte value: 0x43 */ + 0xe4, 0xab, 0xeb, 0xe4, 0xad, 0xd4, 0x48, 0x9f, 0xdd, 0xb9, 0xa6, 0xd2, 0x92, 0xba, 0x96, 0x88, /* Byte value: 0x44 */ + 0x1e, 0xde, 0x0b, 0x1e, 0x02, 0x31, 0x87, 0xd8, 0xf8, 0x8f, 0x3e, 0xed, 0x38, 0xe1, 0x11, 0x3b, /* Byte value: 0x45 */ + 0x84, 0x0c, 0xa4, 0x84, 0x73, 0xfa, 0xbd, 0x99, 0xa5, 0xb2, 0xb8, 0x85, 0x2d, 0x6c, 0xc6, 0x86, /* Byte value: 0x46 */ + 0x15, 0x4b, 0x1e, 0x15, 0x9b, 0x5a, 0x17, 0x25, 0x81, 0x3e, 0xb1, 0x8a, 0xdf, 0x56, 0xfe, 0xe8, /* Byte value: 0x47 */ + 0x41, 0xa4, 0x66, 0x41, 0xb2, 0xf1, 0x4b, 0xb1, 0xc0, 0xc6, 0x30, 0xe7, 0x25, 0xcd, 0x80, 0xce, /* Byte value: 0x48 */ + 0x19, 0x86, 0xce, 0x19, 0xf0, 0x2f, 0x41, 0x55, 0x8e, 0x07, 0xc2, 0x59, 0x11, 0x3c, 0xf4, 0x99, /* Byte value: 0x49 */ + 0x26, 0x5b, 0xec, 0x26, 0x9e, 0xc1, 0x78, 0x3a, 0xce, 0x45, 0xd2, 0x04, 0xb3, 0xc6, 0x35, 0x62, /* Byte value: 0x4a */ + 0xa0, 0x2a, 0xd1, 0xa0, 0xa1, 0x72, 0xdc, 0x0a, 0x88, 0x1d, 0x22, 0xf9, 0x02, 0xb9, 0xf0, 0x12, /* Byte value: 0x4b */ + 0x0b, 0x95, 0x15, 0x0b, 0x99, 0x6b, 0x90, 0xfd, 0x79, 0xb1, 0x8f, 0x67, 0xe7, 0xb7, 0xef, 0xd3, /* Byte value: 0x4c */ + 0x22, 0xa1, 0x1d, 0x22, 0x06, 0x53, 0x4a, 0xab, 0xcb, 0x52, 0x42, 0xf4, 0x48, 0xe0, 0x33, 0x4d, /* Byte value: 0x4d */ + 0x9d, 0x8a, 0x6a, 0x9d, 0x83, 0xd5, 0xfc, 0xcc, 0x2b, 0xb5, 0x7a, 0xdc, 0x3c, 0x50, 0x32, 0x1f, /* Byte value: 0x4e */ + 0xf5, 0x1a, 0x04, 0xf5, 0xae, 0x1c, 0x6d, 0x2b, 0x59, 0x90, 0x87, 0xa8, 0xb6, 0xca, 0x6e, 0x4f, /* Byte value: 0x4f */ + 0xda, 0xa9, 0x64, 0xda, 0xe5, 0xff, 0x9c, 0x45, 0x0d, 0x8e, 0x92, 0xb3, 0x7e, 0xa8, 0xb7, 0x08, /* Byte value: 0x50 */ + 0x37, 0xea, 0x03, 0x37, 0x9d, 0x09, 0x5d, 0x8e, 0x4a, 0x6c, 0xf3, 0x7e, 0x97, 0xb6, 0xcd, 0xa5, /* Byte value: 0x51 */ + 0xa7, 0x72, 0x14, 0xa7, 0x53, 0x6c, 0x1a, 0x87, 0xfe, 0x95, 0xde, 0x4d, 0x2b, 0x64, 0x15, 0xb0, /* Byte value: 0x52 */ + 0xcd, 0x9f, 0xe3, 0xcd, 0x32, 0xec, 0x92, 0xc9, 0x6f, 0x5a, 0x6b, 0x41, 0x3d, 0xed, 0x4a, 0x16, /* Byte value: 0x53 */ + 0x63, 0x05, 0x7b, 0x63, 0xb4, 0xa2, 0x01, 0x1a, 0x0b, 0x94, 0x72, 0x13, 0x6d, 0x2d, 0xb3, 0x83, /* Byte value: 0x54 */ + 0xbc, 0x89, 0x43, 0xbc, 0xef, 0x0a, 0x42, 0x7b, 0x93, 0x78, 0x54, 0x6c, 0xa6, 0x4b, 0xe2, 0xdf, /* Byte value: 0x55 */ + 0xe2, 0x2c, 0x83, 0xe2, 0x79, 0x0f, 0x63, 0xa7, 0x3b, 0x44, 0x7e, 0x5a, 0xf5, 0x8f, 0x93, 0x51, /* Byte value: 0x56 */ + 0xd6, 0x64, 0xb4, 0xd6, 0x8e, 0x8a, 0xca, 0x35, 0x02, 0xb7, 0xe1, 0x60, 0xb0, 0xc2, 0xbd, 0x79, /* Byte value: 0x57 */ + 0x94, 0x62, 0xe6, 0x94, 0x56, 0xf7, 0x75, 0x98, 0xb1, 0xee, 0xbd, 0xc3, 0x47, 0xf4, 0xde, 0x3a, /* Byte value: 0x58 */ + 0xa4, 0xd0, 0x20, 0xa4, 0x39, 0xe0, 0xee, 0x9b, 0x8d, 0x0a, 0xb2, 0x09, 0xf9, 0x9f, 0xf6, 0x3d, /* Byte value: 0x59 */ + 0x88, 0xc1, 0x74, 0x88, 0x18, 0x8f, 0xeb, 0xe9, 0xaa, 0x8b, 0xcb, 0x56, 0xe3, 0x06, 0xcc, 0xf7, /* Byte value: 0x5a */ + 0x62, 0xda, 0xd6, 0x62, 0x92, 0x67, 0xec, 0xaf, 0x9b, 0xe1, 0x56, 0x2f, 0x23, 0xc5, 0x53, 0xf8, /* Byte value: 0x5b */ + 0x2e, 0x6c, 0xcd, 0x2e, 0x6d, 0x26, 0x1c, 0xdb, 0xc4, 0x6b, 0x31, 0x27, 0x86, 0x8a, 0x39, 0x3c, /* Byte value: 0x5c */ + 0xc8, 0xba, 0xbf, 0xc8, 0x8c, 0xbb, 0x4d, 0xed, 0xfa, 0x38, 0xdf, 0x8d, 0x88, 0x23, 0xac, 0x42, /* Byte value: 0x5d */ + 0x18, 0x59, 0x63, 0x18, 0xd6, 0xea, 0xac, 0xe0, 0x1e, 0x72, 0xe6, 0x65, 0x5f, 0xd4, 0x14, 0xe2, /* Byte value: 0x5e */ + 0x06, 0x87, 0x68, 0x06, 0xd4, 0xdb, 0x2b, 0x38, 0xe6, 0xfd, 0xd8, 0x88, 0x67, 0x35, 0x05, 0xd9, /* Byte value: 0x5f */ + 0x16, 0xe9, 0x2a, 0x16, 0xf1, 0xd6, 0xe3, 0x39, 0xf2, 0xa1, 0xdd, 0xce, 0x0d, 0xad, 0x1d, 0x65, /* Byte value: 0x60 */ + 0x13, 0xcc, 0x76, 0x13, 0x4f, 0x81, 0x3c, 0x1d, 0x67, 0xc3, 0x69, 0x02, 0xb8, 0x63, 0xfb, 0x31, /* Byte value: 0x61 */ + 0xd2, 0x9e, 0x45, 0xd2, 0x16, 0x18, 0xf8, 0xa4, 0x07, 0xa0, 0x71, 0x90, 0x4b, 0xe4, 0xbb, 0x56, /* Byte value: 0x62 */ + 0x5b, 0x80, 0x9c, 0x5b, 0x28, 0x52, 0xfe, 0xf8, 0x3d, 0x5e, 0x9e, 0xfa, 0xe6, 0x0a, 0x97, 0xda, /* Byte value: 0x63 */ + 0xff, 0x50, 0xbc, 0xff, 0x11, 0xb2, 0x10, 0x63, 0xb0, 0x54, 0x2c, 0xf3, 0x1f, 0x95, 0x61, 0xe7, /* Byte value: 0x64 */ + 0xbb, 0xd1, 0x86, 0xbb, 0x1d, 0x14, 0x84, 0xf6, 0xe5, 0xf0, 0xa8, 0xd8, 0x8f, 0x96, 0x07, 0x7d, /* Byte value: 0x65 */ + 0xc2, 0xf0, 0x07, 0xc2, 0x33, 0x15, 0x30, 0xa5, 0x13, 0xfc, 0x74, 0xd6, 0x21, 0x7c, 0xa3, 0xea, /* Byte value: 0x66 */ + 0xb9, 0xac, 0x1f, 0xb9, 0x51, 0x5d, 0x9d, 0x5f, 0x06, 0x1a, 0xe0, 0xa0, 0x13, 0x85, 0x04, 0x8b, /* Byte value: 0x67 */ + 0xbf, 0x2b, 0x77, 0xbf, 0x85, 0x86, 0xb6, 0x67, 0xe0, 0xe7, 0x38, 0x28, 0x74, 0xb0, 0x01, 0x52, /* Byte value: 0x68 */ + 0xef, 0x3e, 0xfe, 0xef, 0x34, 0xbf, 0xd8, 0x62, 0xa4, 0x08, 0x29, 0xb5, 0x75, 0x0d, 0x79, 0x5b, /* Byte value: 0x69 */ + 0xdc, 0x2e, 0x0c, 0xdc, 0x31, 0x24, 0xb7, 0x7d, 0xeb, 0x73, 0x4a, 0x3b, 0x19, 0x9d, 0xb2, 0xd1, /* Byte value: 0x6a */ + 0x1b, 0xfb, 0x57, 0x1b, 0xbc, 0x66, 0x58, 0xfc, 0x6d, 0xed, 0x8a, 0x21, 0x8d, 0x2f, 0xf7, 0x6f, /* Byte value: 0x6b */ + 0x27, 0x84, 0x41, 0x27, 0xb8, 0x04, 0x95, 0x8f, 0x5e, 0x30, 0xf6, 0x38, 0xfd, 0x2e, 0xd5, 0x19, /* Byte value: 0x6c */ + 0x3e, 0x02, 0x8f, 0x3e, 0x48, 0x2b, 0xd4, 0xda, 0xd0, 0x37, 0x34, 0x61, 0xec, 0x12, 0x21, 0x80, /* Byte value: 0x6d */ + 0xe7, 0x09, 0xdf, 0xe7, 0xc7, 0x58, 0xbc, 0x83, 0xae, 0x26, 0xca, 0x96, 0x40, 0x41, 0x75, 0x05, /* Byte value: 0x6e */ + 0xb0, 0x44, 0x93, 0xb0, 0x84, 0x7f, 0x14, 0x0b, 0x9c, 0x41, 0x27, 0xbf, 0x68, 0x21, 0xe8, 0xae, /* Byte value: 0x6f */ + 0x69, 0x4f, 0xc3, 0x69, 0x0b, 0x0c, 0x7c, 0x52, 0xe2, 0x50, 0xd9, 0x48, 0xc4, 0x72, 0xbc, 0x2b, /* Byte value: 0x70 */ + 0x21, 0x03, 0x29, 0x21, 0x6c, 0xdf, 0xbe, 0xb7, 0xb8, 0xcd, 0x2e, 0xb0, 0x9a, 0x1b, 0xd0, 0xc0, /* Byte value: 0x71 */ + 0x0f, 0x6f, 0xe4, 0x0f, 0x01, 0xf9, 0xa2, 0x6c, 0x7c, 0xa6, 0x1f, 0x97, 0x1c, 0x91, 0xe9, 0xfc, /* Byte value: 0x72 */ + 0xf1, 0xe0, 0xf5, 0xf1, 0x36, 0x8e, 0x5f, 0xba, 0x5c, 0x87, 0x17, 0x58, 0x4d, 0xec, 0x68, 0x60, /* Byte value: 0x73 */ + 0x1a, 0x24, 0xfa, 0x1a, 0x9a, 0xa3, 0xb5, 0x49, 0xfd, 0x98, 0xae, 0x1d, 0xc3, 0xc7, 0x17, 0x14, /* Byte value: 0x74 */ + 0x0d, 0x12, 0x7d, 0x0d, 0x4d, 0xb0, 0xbb, 0xc5, 0x9f, 0x4c, 0x57, 0xef, 0x80, 0x82, 0xea, 0x0a, /* Byte value: 0x75 */ + 0xa6, 0xad, 0xb9, 0xa6, 0x75, 0xa9, 0xf7, 0x32, 0x6e, 0xe0, 0xfa, 0x71, 0x65, 0x8c, 0xf5, 0xcb, /* Byte value: 0x76 */ + 0x02, 0x7d, 0x99, 0x02, 0x4c, 0x49, 0x19, 0xa9, 0xe3, 0xea, 0x48, 0x78, 0x9c, 0x13, 0x03, 0xf6, /* Byte value: 0x77 */ + 0x6a, 0xed, 0xf7, 0x6a, 0x61, 0x80, 0x88, 0x4e, 0x91, 0xcf, 0xb5, 0x0c, 0x16, 0x89, 0x5f, 0xa6, /* Byte value: 0x78 */ + 0x08, 0x37, 0x21, 0x08, 0xf3, 0xe7, 0x64, 0xe1, 0x0a, 0x2e, 0xe3, 0x23, 0x35, 0x4c, 0x0c, 0x5e, /* Byte value: 0x79 */ + 0x4c, 0xb6, 0x1b, 0x4c, 0xff, 0x41, 0xf0, 0x74, 0x5f, 0x8a, 0x67, 0x08, 0xa5, 0x4f, 0x6a, 0xc4, /* Byte value: 0x7a */ + 0x49, 0x93, 0x47, 0x49, 0x41, 0x16, 0x2f, 0x50, 0xca, 0xe8, 0xd3, 0xc4, 0x10, 0x81, 0x8c, 0x90, /* Byte value: 0x7b */ + 0x91, 0x47, 0xba, 0x91, 0xe8, 0xa0, 0xaa, 0xbc, 0x24, 0x8c, 0x09, 0x0f, 0xf2, 0x3a, 0x38, 0x6e, /* Byte value: 0x7c */ + 0xe1, 0x8e, 0xb7, 0xe1, 0x13, 0x83, 0x97, 0xbb, 0x48, 0xdb, 0x12, 0x1e, 0x27, 0x74, 0x70, 0xdc, /* Byte value: 0x7d */ + 0x8b, 0x63, 0x40, 0x8b, 0x72, 0x03, 0x1f, 0xf5, 0xd9, 0x14, 0xa7, 0x12, 0x31, 0xfd, 0x2f, 0x7a, /* Byte value: 0x7e */ + 0x14, 0x94, 0xb3, 0x14, 0xbd, 0x9f, 0xfa, 0x90, 0x11, 0x4b, 0x95, 0xb6, 0x91, 0xbe, 0x1e, 0x93, /* Byte value: 0x7f */ + 0x95, 0xbd, 0x4b, 0x95, 0x70, 0x32, 0x98, 0x2d, 0x21, 0x9b, 0x99, 0xff, 0x09, 0x1c, 0x3e, 0x41, /* Byte value: 0x80 */ + 0xb8, 0x73, 0xb2, 0xb8, 0x77, 0x98, 0x70, 0xea, 0x96, 0x6f, 0xc4, 0x9c, 0x5d, 0x6d, 0xe4, 0xf0, /* Byte value: 0x81 */ + 0x9e, 0x28, 0x5e, 0x9e, 0xe9, 0x59, 0x08, 0xd0, 0x58, 0x2a, 0x16, 0x98, 0xee, 0xab, 0xd1, 0x92, /* Byte value: 0x82 */ + 0xeb, 0xc4, 0x0f, 0xeb, 0xac, 0x2d, 0xea, 0xf3, 0xa1, 0x1f, 0xb9, 0x45, 0x8e, 0x2b, 0x7f, 0x74, /* Byte value: 0x83 */ + 0x6e, 0x17, 0x06, 0x6e, 0xf9, 0x12, 0xba, 0xdf, 0x94, 0xd8, 0x25, 0xfc, 0xed, 0xaf, 0x59, 0x89, /* Byte value: 0x84 */ + 0xc3, 0x2f, 0xaa, 0xc3, 0x15, 0xd0, 0xdd, 0x10, 0x83, 0x89, 0x50, 0xea, 0x6f, 0x94, 0x43, 0x91, /* Byte value: 0x85 */ + 0x98, 0xaf, 0x36, 0x98, 0x3d, 0x82, 0x23, 0xe8, 0xbe, 0xd7, 0xce, 0x10, 0x89, 0x9e, 0xd4, 0x4b, /* Byte value: 0x86 */ + 0x70, 0xc9, 0x0d, 0x70, 0xfb, 0x23, 0x3d, 0x07, 0x6c, 0x57, 0x1b, 0x11, 0xd5, 0x4e, 0x48, 0xb2, /* Byte value: 0x87 */ + 0x72, 0xb4, 0x94, 0x72, 0xb7, 0x6a, 0x24, 0xae, 0x8f, 0xbd, 0x53, 0x69, 0x49, 0x5d, 0x4b, 0x44, /* Byte value: 0x88 */ + 0x04, 0xfa, 0xf1, 0x04, 0x98, 0x92, 0x32, 0x91, 0x05, 0x17, 0x90, 0xf0, 0xfb, 0x26, 0x06, 0x2f, /* Byte value: 0x89 */ + 0xed, 0x43, 0x67, 0xed, 0x78, 0xf6, 0xc1, 0xcb, 0x47, 0xe2, 0x61, 0xcd, 0xe9, 0x1e, 0x7a, 0xad, /* Byte value: 0x8a */ + 0xf2, 0x42, 0xc1, 0xf2, 0x5c, 0x02, 0xab, 0xa6, 0x2f, 0x18, 0x7b, 0x1c, 0x9f, 0x17, 0x8b, 0xed, /* Byte value: 0x8b */ + 0x47, 0x23, 0x0e, 0x47, 0x66, 0x2a, 0x60, 0x89, 0x26, 0x3b, 0xe8, 0x6f, 0x42, 0xf8, 0x85, 0x17, /* Byte value: 0x8c */ + 0x45, 0x5e, 0x97, 0x45, 0x2a, 0x63, 0x79, 0x20, 0xc5, 0xd1, 0xa0, 0x17, 0xde, 0xeb, 0x86, 0xe1, /* Byte value: 0x8d */ + 0x9a, 0xd2, 0xaf, 0x9a, 0x71, 0xcb, 0x3a, 0x41, 0x5d, 0x3d, 0x86, 0x68, 0x15, 0x8d, 0xd7, 0xbd, /* Byte value: 0x8e */ + 0xd5, 0xc6, 0x80, 0xd5, 0xe4, 0x06, 0x3e, 0x29, 0x71, 0x28, 0x8d, 0x24, 0x62, 0x39, 0x5e, 0xf4, /* Byte value: 0x8f */ + 0xd9, 0x0b, 0x50, 0xd9, 0x8f, 0x73, 0x68, 0x59, 0x7e, 0x11, 0xfe, 0xf7, 0xac, 0x53, 0x54, 0x85, /* Byte value: 0x90 */ + 0x8d, 0xe4, 0x28, 0x8d, 0xa6, 0xd8, 0x34, 0xcd, 0x3f, 0xe9, 0x7f, 0x9a, 0x56, 0xc8, 0x2a, 0xa3, /* Byte value: 0x91 */ + 0x3b, 0x27, 0xd3, 0x3b, 0xf6, 0x7c, 0x0b, 0xfe, 0x45, 0x55, 0x80, 0xad, 0x59, 0xdc, 0xc7, 0xd4, /* Byte value: 0x92 */ + 0x6f, 0xc8, 0xab, 0x6f, 0xdf, 0xd7, 0x57, 0x6a, 0x04, 0xad, 0x01, 0xc0, 0xa3, 0x47, 0xb9, 0xf2, /* Byte value: 0x93 */ + 0x4e, 0xcb, 0x82, 0x4e, 0xb3, 0x08, 0xe9, 0xdd, 0xbc, 0x60, 0x2f, 0x70, 0x39, 0x5c, 0x69, 0x32, /* Byte value: 0x94 */ + 0x34, 0x48, 0x37, 0x34, 0xf7, 0x85, 0xa9, 0x92, 0x39, 0xf3, 0x9f, 0x3a, 0x45, 0x4d, 0x2e, 0x28, /* Byte value: 0x95 */ + 0x74, 0x33, 0xfc, 0x74, 0x63, 0xb1, 0x0f, 0x96, 0x69, 0x40, 0x8b, 0xe1, 0x2e, 0x68, 0x4e, 0x9d, /* Byte value: 0x96 */ + 0x9f, 0xf7, 0xf3, 0x9f, 0xcf, 0x9c, 0xe5, 0x65, 0xc8, 0x5f, 0x32, 0xa4, 0xa0, 0x43, 0x31, 0xe9, /* Byte value: 0x97 */ + 0x7d, 0xdb, 0x70, 0x7d, 0xb6, 0x93, 0x86, 0xc2, 0xf3, 0x1b, 0x4c, 0xfe, 0x55, 0xcc, 0xa2, 0xb8, /* Byte value: 0x98 */ + 0x61, 0x78, 0xe2, 0x61, 0xf8, 0xeb, 0x18, 0xb3, 0xe8, 0x7e, 0x3a, 0x6b, 0xf1, 0x3e, 0xb0, 0x75, /* Byte value: 0x99 */ + 0x31, 0x6d, 0x6b, 0x31, 0x49, 0xd2, 0x76, 0xb6, 0xac, 0x91, 0x2b, 0xf6, 0xf0, 0x83, 0xc8, 0x7c, /* Byte value: 0x9a */ + 0x09, 0xe8, 0x8c, 0x09, 0xd5, 0x22, 0x89, 0x54, 0x9a, 0x5b, 0xc7, 0x1f, 0x7b, 0xa4, 0xec, 0x25, /* Byte value: 0x9b */ + 0x12, 0x13, 0xdb, 0x12, 0x69, 0x44, 0xd1, 0xa8, 0xf7, 0xb6, 0x4d, 0x3e, 0xf6, 0x8b, 0x1b, 0x4a, /* Byte value: 0x9c */ + 0x64, 0x5d, 0xbe, 0x64, 0x46, 0xbc, 0xc7, 0x97, 0x7d, 0x1c, 0x8e, 0xa7, 0x44, 0xf0, 0x56, 0x21, /* Byte value: 0x9d */ + 0xd7, 0xbb, 0x19, 0xd7, 0xa8, 0x4f, 0x27, 0x80, 0x92, 0xc2, 0xc5, 0x5c, 0xfe, 0x2a, 0x5d, 0x02, /* Byte value: 0x9e */ + 0x93, 0x3a, 0x23, 0x93, 0xa4, 0xe9, 0xb3, 0x15, 0xc7, 0x66, 0x41, 0x77, 0x6e, 0x29, 0x3b, 0x98, /* Byte value: 0x9f */ + 0x3a, 0xf8, 0x7e, 0x3a, 0xd0, 0xb9, 0xe6, 0x4b, 0xd5, 0x20, 0xa4, 0x91, 0x17, 0x34, 0x27, 0xaf, /* Byte value: 0xa0 */ + 0xa3, 0x88, 0xe5, 0xa3, 0xcb, 0xfe, 0x28, 0x16, 0xfb, 0x82, 0x4e, 0xbd, 0xd0, 0x42, 0x13, 0x9f, /* Byte value: 0xa1 */ + 0xad, 0x38, 0xac, 0xad, 0xec, 0xc2, 0x67, 0xcf, 0x17, 0x51, 0x75, 0x16, 0x82, 0x3b, 0x1a, 0x18, /* Byte value: 0xa2 */ + 0x1c, 0xa3, 0x92, 0x1c, 0x4e, 0x78, 0x9e, 0x71, 0x1b, 0x65, 0x76, 0x95, 0xa4, 0xf2, 0x12, 0xcd, /* Byte value: 0xa3 */ + 0x7e, 0x79, 0x44, 0x7e, 0xdc, 0x1f, 0x72, 0xde, 0x80, 0x84, 0x20, 0xba, 0x87, 0x37, 0x41, 0x35, /* Byte value: 0xa4 */ + 0x76, 0x4e, 0x65, 0x76, 0x2f, 0xf8, 0x16, 0x3f, 0x8a, 0xaa, 0xc3, 0x99, 0xb2, 0x7b, 0x4d, 0x6b, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x33, 0x10, 0xf2, 0x33, 0x05, 0x9b, 0x6f, 0x1f, 0x4f, 0x7b, 0x63, 0x8e, 0x6c, 0x90, 0xcb, 0x8a, /* Byte value: 0xa7 */ + 0xf7, 0x67, 0x9d, 0xf7, 0xe2, 0x55, 0x74, 0x82, 0xba, 0x7a, 0xcf, 0xd0, 0x2a, 0xd9, 0x6d, 0xb9, /* Byte value: 0xa8 */ + 0x28, 0xeb, 0xa5, 0x28, 0xb9, 0xfd, 0x37, 0xe3, 0x22, 0x96, 0xe9, 0xaf, 0xe1, 0xbf, 0x3c, 0xe5, /* Byte value: 0xa9 */ + 0x23, 0x7e, 0xb0, 0x23, 0x20, 0x96, 0xa7, 0x1e, 0x5b, 0x27, 0x66, 0xc8, 0x06, 0x08, 0xd3, 0x36, /* Byte value: 0xaa */ + 0xb2, 0x39, 0x0a, 0xb2, 0xc8, 0x36, 0x0d, 0xa2, 0x7f, 0xab, 0x6f, 0xc7, 0xf4, 0x32, 0xeb, 0x58, /* Byte value: 0xab */ + 0xbe, 0xf4, 0xda, 0xbe, 0xa3, 0x43, 0x5b, 0xd2, 0x70, 0x92, 0x1c, 0x14, 0x3a, 0x58, 0xe1, 0x29, /* Byte value: 0xac */ + 0x42, 0x06, 0x52, 0x42, 0xd8, 0x7d, 0xbf, 0xad, 0xb3, 0x59, 0x5c, 0xa3, 0xf7, 0x36, 0x63, 0x43, /* Byte value: 0xad */ + 0x11, 0xb1, 0xef, 0x11, 0x03, 0xc8, 0x25, 0xb4, 0x84, 0x29, 0x21, 0x7a, 0x24, 0x70, 0xf8, 0xc7, /* Byte value: 0xae */ + 0xc4, 0x77, 0x6f, 0xc4, 0xe7, 0xce, 0x1b, 0x9d, 0xf5, 0x01, 0xac, 0x5e, 0x46, 0x49, 0xa6, 0x33, /* Byte value: 0xaf */ + 0x5f, 0x7a, 0x6d, 0x5f, 0xb0, 0xc0, 0xcc, 0x69, 0x38, 0x49, 0x0e, 0x0a, 0x1d, 0x2c, 0x91, 0xf5, /* Byte value: 0xb0 */ + 0x30, 0xb2, 0xc6, 0x30, 0x6f, 0x17, 0x9b, 0x03, 0x3c, 0xe4, 0x0f, 0xca, 0xbe, 0x6b, 0x28, 0x07, /* Byte value: 0xb1 */ + 0x01, 0xdf, 0xad, 0x01, 0x26, 0xc5, 0xed, 0xb5, 0x90, 0x75, 0x24, 0x3c, 0x4e, 0xe8, 0xe0, 0x7b, /* Byte value: 0xb2 */ + 0xd8, 0xd4, 0xfd, 0xd8, 0xa9, 0xb6, 0x85, 0xec, 0xee, 0x64, 0xda, 0xcb, 0xe2, 0xbb, 0xb4, 0xfe, /* Byte value: 0xb3 */ + 0x05, 0x25, 0x5c, 0x05, 0xbe, 0x57, 0xdf, 0x24, 0x95, 0x62, 0xb4, 0xcc, 0xb5, 0xce, 0xe6, 0x54, /* Byte value: 0xb4 */ + 0x32, 0xcf, 0x5f, 0x32, 0x23, 0x5e, 0x82, 0xaa, 0xdf, 0x0e, 0x47, 0xb2, 0x22, 0x78, 0x2b, 0xf1, /* Byte value: 0xb5 */ + 0xdf, 0x8c, 0x38, 0xdf, 0x5b, 0xa8, 0x43, 0x61, 0x98, 0xec, 0x26, 0x7f, 0xcb, 0x66, 0x51, 0x5c, /* Byte value: 0xb6 */ + 0xba, 0x0e, 0x2b, 0xba, 0x3b, 0xd1, 0x69, 0x43, 0x75, 0x85, 0x8c, 0xe4, 0xc1, 0x7e, 0xe7, 0x06, /* Byte value: 0xb7 */ + 0x8e, 0x46, 0x1c, 0x8e, 0xcc, 0x54, 0xc0, 0xd1, 0x4c, 0x76, 0x13, 0xde, 0x84, 0x33, 0xc9, 0x2e, /* Byte value: 0xb8 */ + 0x73, 0x6b, 0x39, 0x73, 0x91, 0xaf, 0xc9, 0x1b, 0x1f, 0xc8, 0x77, 0x55, 0x07, 0xb5, 0xab, 0x3f, /* Byte value: 0xb9 */ + 0xfd, 0x2d, 0x25, 0xfd, 0x5d, 0xfb, 0x09, 0xca, 0x53, 0xbe, 0x64, 0x8b, 0x83, 0x86, 0x62, 0x11, /* Byte value: 0xba */ + 0x8c, 0x3b, 0x85, 0x8c, 0x80, 0x1d, 0xd9, 0x78, 0xaf, 0x9c, 0x5b, 0xa6, 0x18, 0x20, 0xca, 0xd8, /* Byte value: 0xbb */ + 0xb3, 0xe6, 0xa7, 0xb3, 0xee, 0xf3, 0xe0, 0x17, 0xef, 0xde, 0x4b, 0xfb, 0xba, 0xda, 0x0b, 0x23, /* Byte value: 0xbc */ + 0x56, 0x92, 0xe1, 0x56, 0x65, 0xe2, 0x45, 0x3d, 0xa2, 0x12, 0xc9, 0x15, 0x66, 0x88, 0x7d, 0xd0, /* Byte value: 0xbd */ + 0x2b, 0x49, 0x91, 0x2b, 0xd3, 0x71, 0xc3, 0xff, 0x51, 0x09, 0x85, 0xeb, 0x33, 0x44, 0xdf, 0x68, /* Byte value: 0xbe */ + 0x82, 0x8b, 0xcc, 0x82, 0xa7, 0x21, 0x96, 0xa1, 0x43, 0x4f, 0x60, 0x0d, 0x4a, 0x59, 0xc3, 0x5f, /* Byte value: 0xbf */ + 0x6b, 0x32, 0x5a, 0x6b, 0x47, 0x45, 0x65, 0xfb, 0x01, 0xba, 0x91, 0x30, 0x58, 0x61, 0xbf, 0xdd, /* Byte value: 0xc0 */ + 0x87, 0xae, 0x90, 0x87, 0x19, 0x76, 0x49, 0x85, 0xd6, 0x2d, 0xd4, 0xc1, 0xff, 0x97, 0x25, 0x0b, /* Byte value: 0xc1 */ + 0xae, 0x9a, 0x98, 0xae, 0x86, 0x4e, 0x93, 0xd3, 0x64, 0xce, 0x19, 0x52, 0x50, 0xc0, 0xf9, 0x95, /* Byte value: 0xc2 */ + 0x46, 0xfc, 0xa3, 0x46, 0x40, 0xef, 0x8d, 0x3c, 0xb6, 0x4e, 0xcc, 0x53, 0x0c, 0x10, 0x65, 0x6c, /* Byte value: 0xc3 */ + 0xa9, 0xc2, 0x5d, 0xa9, 0x74, 0x50, 0x55, 0x5e, 0x12, 0x46, 0xe5, 0xe6, 0x79, 0x1d, 0x1c, 0x37, /* Byte value: 0xc4 */ + 0xe0, 0x51, 0x1a, 0xe0, 0x35, 0x46, 0x7a, 0x0e, 0xd8, 0xae, 0x36, 0x22, 0x69, 0x9c, 0x90, 0xa7, /* Byte value: 0xc5 */ + 0xc6, 0x0a, 0xf6, 0xc6, 0xab, 0x87, 0x02, 0x34, 0x16, 0xeb, 0xe4, 0x26, 0xda, 0x5a, 0xa5, 0xc5, /* Byte value: 0xc6 */ + 0xaf, 0x45, 0x35, 0xaf, 0xa0, 0x8b, 0x7e, 0x66, 0xf4, 0xbb, 0x3d, 0x6e, 0x1e, 0x28, 0x19, 0xee, /* Byte value: 0xc7 */ + 0xb1, 0x9b, 0x3e, 0xb1, 0xa2, 0xba, 0xf9, 0xbe, 0x0c, 0x34, 0x03, 0x83, 0x26, 0xc9, 0x08, 0xd5, /* Byte value: 0xc8 */ + 0x0e, 0xb0, 0x49, 0x0e, 0x27, 0x3c, 0x4f, 0xd9, 0xec, 0xd3, 0x3b, 0xab, 0x52, 0x79, 0x09, 0x87, /* Byte value: 0xc9 */ + 0x89, 0x1e, 0xd9, 0x89, 0x3e, 0x4a, 0x06, 0x5c, 0x3a, 0xfe, 0xef, 0x6a, 0xad, 0xee, 0x2c, 0x8c, /* Byte value: 0xca */ + 0x79, 0x21, 0x81, 0x79, 0x2e, 0x01, 0xb4, 0x53, 0xf6, 0x0c, 0xdc, 0x0e, 0xae, 0xea, 0xa4, 0x97, /* Byte value: 0xcb */ + 0xd3, 0x41, 0xe8, 0xd3, 0x30, 0xdd, 0x15, 0x11, 0x97, 0xd5, 0x55, 0xac, 0x05, 0x0c, 0x5b, 0x2d, /* Byte value: 0xcc */ + 0x2d, 0xce, 0xf9, 0x2d, 0x07, 0xaa, 0xe8, 0xc7, 0xb7, 0xf4, 0x5d, 0x63, 0x54, 0x71, 0xda, 0xb1, /* Byte value: 0xcd */ + 0xc9, 0x65, 0x12, 0xc9, 0xaa, 0x7e, 0xa0, 0x58, 0x6a, 0x4d, 0xfb, 0xb1, 0xc6, 0xcb, 0x4c, 0x39, /* Byte value: 0xce */ + 0x0a, 0x4a, 0xb8, 0x0a, 0xbf, 0xae, 0x7d, 0x48, 0xe9, 0xc4, 0xab, 0x5b, 0xa9, 0x5f, 0x0f, 0xa8, /* Byte value: 0xcf */ + 0xdb, 0x76, 0xc9, 0xdb, 0xc3, 0x3a, 0x71, 0xf0, 0x9d, 0xfb, 0xb6, 0x8f, 0x30, 0x40, 0x57, 0x73, /* Byte value: 0xd0 */ + 0x7b, 0x5c, 0x18, 0x7b, 0x62, 0x48, 0xad, 0xfa, 0x15, 0xe6, 0x94, 0x76, 0x32, 0xf9, 0xa7, 0x61, /* Byte value: 0xd1 */ + 0xde, 0x53, 0x95, 0xde, 0x7d, 0x6d, 0xae, 0xd4, 0x08, 0x99, 0x02, 0x43, 0x85, 0x8e, 0xb1, 0x27, /* Byte value: 0xd2 */ + 0x48, 0x4c, 0xea, 0x48, 0x67, 0xd3, 0xc2, 0xe5, 0x5a, 0x9d, 0xf7, 0xf8, 0x5e, 0x69, 0x6c, 0xeb, /* Byte value: 0xd3 */ + 0xe3, 0xf3, 0x2e, 0xe3, 0x5f, 0xca, 0x8e, 0x12, 0xab, 0x31, 0x5a, 0x66, 0xbb, 0x67, 0x73, 0x2a, /* Byte value: 0xd4 */ + 0x4b, 0xee, 0xde, 0x4b, 0x0d, 0x5f, 0x36, 0xf9, 0x29, 0x02, 0x9b, 0xbc, 0x8c, 0x92, 0x8f, 0x66, /* Byte value: 0xd5 */ + 0x35, 0x97, 0x9a, 0x35, 0xd1, 0x40, 0x44, 0x27, 0xa9, 0x86, 0xbb, 0x06, 0x0b, 0xa5, 0xce, 0x53, /* Byte value: 0xd6 */ + 0x8a, 0xbc, 0xed, 0x8a, 0x54, 0xc6, 0xf2, 0x40, 0x49, 0x61, 0x83, 0x2e, 0x7f, 0x15, 0xcf, 0x01, /* Byte value: 0xd7 */ + 0xfb, 0xaa, 0x4d, 0xfb, 0x89, 0x20, 0x22, 0xf2, 0xb5, 0x43, 0xbc, 0x03, 0xe4, 0xb3, 0x67, 0xc8, /* Byte value: 0xd8 */ + 0x85, 0xd3, 0x09, 0x85, 0x55, 0x3f, 0x50, 0x2c, 0x35, 0xc7, 0x9c, 0xb9, 0x63, 0x84, 0x26, 0xfd, /* Byte value: 0xd9 */ + 0xcb, 0x18, 0x8b, 0xcb, 0xe6, 0x37, 0xb9, 0xf1, 0x89, 0xa7, 0xb3, 0xc9, 0x5a, 0xd8, 0x4f, 0xcf, /* Byte value: 0xda */ + 0xb7, 0x1c, 0x56, 0xb7, 0x76, 0x61, 0xd2, 0x86, 0xea, 0xc9, 0xdb, 0x0b, 0x41, 0xfc, 0x0d, 0x0c, /* Byte value: 0xdb */ + 0x2a, 0x96, 0x3c, 0x2a, 0xf5, 0xb4, 0x2e, 0x4a, 0xc1, 0x7c, 0xa1, 0xd7, 0x7d, 0xac, 0x3f, 0x13, /* Byte value: 0xdc */ + 0xab, 0xbf, 0xc4, 0xab, 0x38, 0x19, 0x4c, 0xf7, 0xf1, 0xac, 0xad, 0x9e, 0xe5, 0x0e, 0x1f, 0xc1, /* Byte value: 0xdd */ + 0x3f, 0xdd, 0x22, 0x3f, 0x6e, 0xee, 0x39, 0x6f, 0x40, 0x42, 0x10, 0x5d, 0xa2, 0xfa, 0xc1, 0xfb, /* Byte value: 0xde */ + 0x39, 0x5a, 0x4a, 0x39, 0xba, 0x35, 0x12, 0x57, 0xa6, 0xbf, 0xc8, 0xd5, 0xc5, 0xcf, 0xc4, 0x22, /* Byte value: 0xdf */ + 0xea, 0x1b, 0xa2, 0xea, 0x8a, 0xe8, 0x07, 0x46, 0x31, 0x6a, 0x9d, 0x79, 0xc0, 0xc3, 0x9f, 0x0f, /* Byte value: 0xe0 */ + 0xb5, 0x61, 0xcf, 0xb5, 0x3a, 0x28, 0xcb, 0x2f, 0x09, 0x23, 0x93, 0x73, 0xdd, 0xef, 0x0e, 0xfa, /* Byte value: 0xe1 */ + 0x51, 0xca, 0x24, 0x51, 0x97, 0xfc, 0x83, 0xb0, 0xd4, 0x9a, 0x35, 0xa1, 0x4f, 0x55, 0x98, 0x72, /* Byte value: 0xe2 */ + 0x9b, 0x0d, 0x02, 0x9b, 0x57, 0x0e, 0xd7, 0xf4, 0xcd, 0x48, 0xa2, 0x54, 0x5b, 0x65, 0x37, 0xc6, /* Byte value: 0xe3 */ + 0x7a, 0x83, 0xb5, 0x7a, 0x44, 0x8d, 0x40, 0x4f, 0x85, 0x93, 0xb0, 0x4a, 0x7c, 0x11, 0x47, 0x1a, /* Byte value: 0xe4 */ + 0xa1, 0xf5, 0x7c, 0xa1, 0x87, 0xb7, 0x31, 0xbf, 0x18, 0x68, 0x06, 0xc5, 0x4c, 0x51, 0x10, 0x69, /* Byte value: 0xe5 */ + 0xd0, 0xe3, 0xdc, 0xd0, 0x5a, 0x51, 0xe1, 0x0d, 0xe4, 0x4a, 0x39, 0xe8, 0xd7, 0xf7, 0xb8, 0xa0, /* Byte value: 0xe6 */ + 0x4a, 0x31, 0x73, 0x4a, 0x2b, 0x9a, 0xdb, 0x4c, 0xb9, 0x77, 0xbf, 0x80, 0xc2, 0x7a, 0x6f, 0x1d, /* Byte value: 0xe7 */ + 0x77, 0x91, 0xc8, 0x77, 0x09, 0x3d, 0xfb, 0x8a, 0x1a, 0xdf, 0xe7, 0xa5, 0xfc, 0x93, 0xad, 0x10, /* Byte value: 0xe8 */ + 0x5d, 0x07, 0xf4, 0x5d, 0xfc, 0x89, 0xd5, 0xc0, 0xdb, 0xa3, 0x46, 0x72, 0x81, 0x3f, 0x92, 0x03, /* Byte value: 0xe9 */ + 0x4f, 0x14, 0x2f, 0x4f, 0x95, 0xcd, 0x04, 0x68, 0x2c, 0x15, 0x0b, 0x4c, 0x77, 0xb4, 0x89, 0x49, /* Byte value: 0xea */ + 0x1d, 0x7c, 0x3f, 0x1d, 0x68, 0xbd, 0x73, 0xc4, 0x8b, 0x10, 0x52, 0xa9, 0xea, 0x1a, 0xf2, 0xb6, /* Byte value: 0xeb */ + 0x83, 0x54, 0x61, 0x83, 0x81, 0xe4, 0x7b, 0x14, 0xd3, 0x3a, 0x44, 0x31, 0x04, 0xb1, 0x23, 0x24, /* Byte value: 0xec */ + 0x52, 0x68, 0x10, 0x52, 0xfd, 0x70, 0x77, 0xac, 0xa7, 0x05, 0x59, 0xe5, 0x9d, 0xae, 0x7b, 0xff, /* Byte value: 0xed */ + 0x25, 0xf9, 0xd8, 0x25, 0xf4, 0x4d, 0x8c, 0x26, 0xbd, 0xda, 0xbe, 0x40, 0x61, 0x3d, 0xd6, 0xef, /* Byte value: 0xee */ + 0xfe, 0x8f, 0x11, 0xfe, 0x37, 0x77, 0xfd, 0xd6, 0x20, 0x21, 0x08, 0xcf, 0x51, 0x7d, 0x81, 0x9c, /* Byte value: 0xef */ + 0x3d, 0xa0, 0xbb, 0x3d, 0x22, 0xa7, 0x20, 0xc6, 0xa3, 0xa8, 0x58, 0x25, 0x3e, 0xe9, 0xc2, 0x0d, /* Byte value: 0xf0 */ + 0x58, 0x22, 0xa8, 0x58, 0x42, 0xde, 0x0a, 0xe4, 0x4e, 0xc1, 0xf2, 0xbe, 0x34, 0xf1, 0x74, 0x57, /* Byte value: 0xf1 */ + 0x55, 0x30, 0xd5, 0x55, 0x0f, 0x6e, 0xb1, 0x21, 0xd1, 0x8d, 0xa5, 0x51, 0xb4, 0x73, 0x9e, 0x5d, /* Byte value: 0xf2 */ + 0xf9, 0xd7, 0xd4, 0xf9, 0xc5, 0x69, 0x3b, 0x5b, 0x56, 0xa9, 0xf4, 0x7b, 0x78, 0xa0, 0x64, 0x3e, /* Byte value: 0xf3 */ + 0xac, 0xe7, 0x01, 0xac, 0xca, 0x07, 0x8a, 0x7a, 0x87, 0x24, 0x51, 0x2a, 0xcc, 0xd3, 0xfa, 0x63, /* Byte value: 0xf4 */ + 0xfc, 0xf2, 0x88, 0xfc, 0x7b, 0x3e, 0xe4, 0x7f, 0xc3, 0xcb, 0x40, 0xb7, 0xcd, 0x6e, 0x82, 0x6a, /* Byte value: 0xf5 */ + 0x68, 0x90, 0x6e, 0x68, 0x2d, 0xc9, 0x91, 0xe7, 0x72, 0x25, 0xfd, 0x74, 0x8a, 0x9a, 0x5c, 0x50, /* Byte value: 0xf6 */ + 0xc1, 0x52, 0x33, 0xc1, 0x59, 0x99, 0xc4, 0xb9, 0x60, 0x63, 0x18, 0x92, 0xf3, 0x87, 0x40, 0x67, /* Byte value: 0xf7 */ + 0x38, 0x85, 0xe7, 0x38, 0x9c, 0xf0, 0xff, 0xe2, 0x36, 0xca, 0xec, 0xe9, 0x8b, 0x27, 0x24, 0x59, /* Byte value: 0xf8 */ + 0x75, 0xec, 0x51, 0x75, 0x45, 0x74, 0xe2, 0x23, 0xf9, 0x35, 0xaf, 0xdd, 0x60, 0x80, 0xae, 0xe6, /* Byte value: 0xf9 */ + 0x6d, 0xb5, 0x32, 0x6d, 0x93, 0x9e, 0x4e, 0xc3, 0xe7, 0x47, 0x49, 0xb8, 0x3f, 0x54, 0xba, 0x04, /* Byte value: 0xfa */ + 0x1f, 0x01, 0xa6, 0x1f, 0x24, 0xf4, 0x6a, 0x6d, 0x68, 0xfa, 0x1a, 0xd1, 0x76, 0x09, 0xf1, 0x40, /* Byte value: 0xfb */ + 0x17, 0x36, 0x87, 0x17, 0xd7, 0x13, 0x0e, 0x8c, 0x62, 0xd4, 0xf9, 0xf2, 0x43, 0x45, 0xfd, 0x1e, /* Byte value: 0xfc */ + 0x44, 0x81, 0x3a, 0x44, 0x0c, 0xa6, 0x94, 0x95, 0x55, 0xa4, 0x84, 0x2b, 0x90, 0x03, 0x66, 0x9a, /* Byte value: 0xfd */ + 0xcc, 0x40, 0x4e, 0xcc, 0x14, 0x29, 0x7f, 0x7c, 0xff, 0x2f, 0x4f, 0x7d, 0x73, 0x05, 0xaa, 0x6d, /* Byte value: 0xfe */ + 0xc5, 0xa8, 0xc2, 0xc5, 0xc1, 0x0b, 0xf6, 0x28, 0x65, 0x74, 0x88, 0x62, 0x08, 0xa1, 0x46, 0x48, /* Byte value: 0xff */ + 0xee, 0xe1, 0x53, 0xee, 0x12, 0x7a, 0x35, 0xd7, 0x34, 0x7d, 0x0d, 0x89, 0x3b, 0xe5, 0x99, 0x20, /* Byte value: 0x00 */ + + /* Matrix row: 11 */ + 0xfe, 0x50, 0x71, 0x7c, 0xfc, 0x9b, 0xad, 0x09, 0xfc, 0x5e, 0x38, 0x3f, 0x3f, 0x68, 0x53, 0x1b, /* Byte value: 0x01 */ + 0x6d, 0x9f, 0xd8, 0xf4, 0xee, 0xe2, 0xd1, 0xe9, 0xee, 0x90, 0x3c, 0xda, 0xda, 0xa3, 0xbc, 0xf8, /* Byte value: 0x02 */ + 0x53, 0x94, 0xe4, 0x01, 0xdd, 0x92, 0x0e, 0x3a, 0xdd, 0xb8, 0xb0, 0xa6, 0xa6, 0x24, 0x5d, 0x4e, /* Byte value: 0x03 */ + 0xab, 0xb8, 0x14, 0x53, 0x11, 0x91, 0xf4, 0xf0, 0x11, 0x18, 0xc5, 0x95, 0x95, 0x7d, 0x5f, 0xd3, /* Byte value: 0x04 */ + 0xc0, 0x5b, 0x4d, 0x89, 0xcf, 0xeb, 0x72, 0xda, 0xcf, 0x76, 0xb4, 0x43, 0x43, 0xef, 0xb2, 0xad, /* Byte value: 0x05 */ + 0x7d, 0xbd, 0xa6, 0x24, 0x6e, 0x65, 0x3b, 0xa4, 0x6e, 0xc4, 0x27, 0xfa, 0xfa, 0x9a, 0x46, 0x2f, /* Byte value: 0x06 */ + 0xaf, 0x51, 0xea, 0x67, 0x31, 0xc0, 0x2f, 0x72, 0x31, 0x0d, 0xb3, 0x9d, 0x9d, 0xe2, 0x80, 0x96, /* Byte value: 0x07 */ + 0x72, 0x7b, 0xc6, 0x6f, 0x16, 0xda, 0x5f, 0x61, 0x16, 0x84, 0x7a, 0xe4, 0xe4, 0x01, 0x2d, 0xa3, /* Byte value: 0x08 */ + 0x27, 0x93, 0xa3, 0x40, 0xfb, 0xd0, 0x06, 0x98, 0xfb, 0xc2, 0x87, 0x4e, 0x4e, 0x14, 0x21, 0x6b, /* Byte value: 0x09 */ + 0xf9, 0x87, 0x2e, 0x5f, 0xc4, 0x86, 0xbc, 0x0b, 0xc4, 0x34, 0x89, 0x31, 0x31, 0x0e, 0x45, 0x1d, /* Byte value: 0x0a */ + 0x8e, 0xbe, 0xc8, 0x09, 0xfa, 0x88, 0x7e, 0x29, 0xfa, 0x31, 0x79, 0xdf, 0xdf, 0xc7, 0xf0, 0x7b, /* Byte value: 0x0b */ + 0x8a, 0x57, 0x36, 0x3d, 0xda, 0xd9, 0xa5, 0xab, 0xda, 0x24, 0x0f, 0xd7, 0xd7, 0x58, 0x2f, 0x3e, /* Byte value: 0x0c */ + 0x3c, 0x9e, 0x43, 0xef, 0x23, 0xb9, 0x53, 0x92, 0x23, 0xc3, 0xb7, 0x78, 0x78, 0x29, 0x6f, 0x75, /* Byte value: 0x0d */ + 0x50, 0xaa, 0x45, 0x16, 0xc5, 0xde, 0xc4, 0xba, 0xc5, 0xc7, 0x77, 0xa0, 0xa0, 0xdd, 0x94, 0x0d, /* Byte value: 0x0e */ + 0xe1, 0xb4, 0x6f, 0xe7, 0x04, 0xa3, 0x23, 0x81, 0x04, 0x4a, 0x7e, 0x01, 0x01, 0xca, 0xc2, 0x40, /* Byte value: 0x0f */ + 0x41, 0x23, 0xe5, 0xcb, 0x4d, 0xdc, 0x68, 0x36, 0x4d, 0x07, 0x90, 0x82, 0x82, 0xb3, 0x29, 0x5a, /* Byte value: 0x10 */ + 0xb4, 0x5c, 0x0a, 0xc8, 0xe9, 0xa9, 0x7a, 0x78, 0xe9, 0x0c, 0x83, 0xab, 0xab, 0xdf, 0xce, 0x88, /* Byte value: 0x11 */ + 0xd7, 0xae, 0x6c, 0x7a, 0x77, 0x71, 0x89, 0x95, 0x77, 0x48, 0x1e, 0x6d, 0x6d, 0xb0, 0x5e, 0x7c, /* Byte value: 0x12 */ + 0x1e, 0x4f, 0xc0, 0x96, 0xf0, 0xbd, 0xc8, 0x49, 0xf0, 0x80, 0xba, 0x3c, 0x3c, 0xf5, 0xd6, 0xdb, /* Byte value: 0x13 */ + 0x23, 0x7a, 0x5d, 0x74, 0xdb, 0x81, 0xdd, 0x1a, 0xdb, 0xd7, 0xf1, 0x46, 0x46, 0x8b, 0xfe, 0x2e, /* Byte value: 0x14 */ + 0x2a, 0xc0, 0xbc, 0x11, 0x93, 0xa6, 0xee, 0x1c, 0x93, 0x69, 0xe1, 0x54, 0x54, 0x21, 0xc4, 0x24, /* Byte value: 0x15 */ + 0x75, 0xac, 0x99, 0x4c, 0x2e, 0xc7, 0x4e, 0x63, 0x2e, 0xee, 0xcb, 0xea, 0xea, 0x67, 0x3b, 0xa5, /* Byte value: 0x16 */ + 0xba, 0x31, 0xb4, 0x8e, 0x99, 0x93, 0x58, 0x7c, 0x99, 0xd8, 0x22, 0xb7, 0xb7, 0x13, 0xe2, 0x84, /* Byte value: 0x17 */ + 0x86, 0xaf, 0xf7, 0x61, 0xba, 0x2a, 0x0b, 0xee, 0xba, 0x1b, 0x95, 0xcf, 0xcf, 0x3a, 0x8d, 0xf1, /* Byte value: 0x18 */ + 0xdb, 0x56, 0xad, 0x26, 0x17, 0x82, 0x27, 0xd0, 0x17, 0x77, 0x84, 0x75, 0x75, 0xd2, 0xfc, 0xb3, /* Byte value: 0x19 */ + 0x76, 0x92, 0x38, 0x5b, 0x36, 0x8b, 0x84, 0xe3, 0x36, 0x91, 0x0c, 0xec, 0xec, 0x9e, 0xf2, 0xe6, /* Byte value: 0x1a */ + 0xb7, 0x62, 0xab, 0xdf, 0xf1, 0xe5, 0xb0, 0xf8, 0xf1, 0x73, 0x44, 0xad, 0xad, 0x26, 0x07, 0xcb, /* Byte value: 0x1b */ + 0x2f, 0x82, 0x9c, 0x28, 0xbb, 0x72, 0x73, 0x5f, 0xbb, 0xe8, 0x6b, 0x5e, 0x5e, 0xe9, 0x5c, 0xe1, /* Byte value: 0x1c */ + 0xe3, 0x21, 0x10, 0xfd, 0x14, 0x6a, 0xaf, 0xc0, 0x14, 0xa1, 0x45, 0x05, 0x05, 0x64, 0x4c, 0x83, /* Byte value: 0x1d */ + 0x51, 0x01, 0x9b, 0x1b, 0xcd, 0x5b, 0x82, 0x7b, 0xcd, 0x53, 0x8b, 0xa2, 0xa2, 0x8a, 0xd3, 0x8d, /* Byte value: 0x1e */ + 0xd2, 0xec, 0x4c, 0x43, 0x5f, 0xa5, 0x14, 0xd6, 0x5f, 0xc9, 0x94, 0x67, 0x67, 0x78, 0xc6, 0xb9, /* Byte value: 0x1f */ + 0xb1, 0x1e, 0x2a, 0xf1, 0xc1, 0x7d, 0xe7, 0x3b, 0xc1, 0x8d, 0x09, 0xa1, 0xa1, 0x17, 0x56, 0x4d, /* Byte value: 0x20 */ + 0xb6, 0xc9, 0x75, 0xd2, 0xf9, 0x60, 0xf6, 0x39, 0xf9, 0xe7, 0xb8, 0xaf, 0xaf, 0x71, 0x40, 0x4b, /* Byte value: 0x21 */ + 0x03, 0x3e, 0xa1, 0x17, 0x18, 0x4c, 0xca, 0x80, 0x18, 0x7f, 0xc7, 0x06, 0x06, 0xf9, 0xc9, 0x43, /* Byte value: 0x22 */ + 0x44, 0x61, 0xc5, 0xf2, 0x65, 0x08, 0xf5, 0x75, 0x65, 0x86, 0x1a, 0x88, 0x88, 0x7b, 0xb1, 0x9f, /* Byte value: 0x23 */ + 0x9a, 0x75, 0x48, 0xed, 0x5a, 0x5e, 0x4f, 0xe6, 0x5a, 0x70, 0x14, 0xf7, 0xf7, 0x61, 0xd5, 0xe9, /* Byte value: 0x24 */ + 0x8d, 0x80, 0x69, 0x1e, 0xe2, 0xc4, 0xb4, 0xa9, 0xe2, 0x4e, 0xbe, 0xd9, 0xd9, 0x3e, 0x39, 0x38, /* Byte value: 0x25 */ + 0xea, 0x9b, 0xf1, 0x98, 0x5c, 0x4d, 0x9c, 0xc6, 0x5c, 0x1f, 0x55, 0x17, 0x17, 0xce, 0x76, 0x89, /* Byte value: 0x26 */ + 0xc4, 0xb2, 0xb3, 0xbd, 0xef, 0xba, 0xa9, 0x58, 0xef, 0x63, 0xc2, 0x4b, 0x4b, 0x70, 0x6d, 0xe8, /* Byte value: 0x27 */ + 0xad, 0xc4, 0x95, 0x7d, 0x21, 0x09, 0xa3, 0x33, 0x21, 0xe6, 0x88, 0x99, 0x99, 0x4c, 0x0e, 0x55, /* Byte value: 0x28 */ + 0xb9, 0x0f, 0x15, 0x99, 0x81, 0xdf, 0x92, 0xfc, 0x81, 0xa7, 0xe5, 0xb1, 0xb1, 0xea, 0x2b, 0xc7, /* Byte value: 0x29 */ + 0xe2, 0x8a, 0xce, 0xf0, 0x1c, 0xef, 0xe9, 0x01, 0x1c, 0x35, 0xb9, 0x07, 0x07, 0x33, 0x0b, 0x03, /* Byte value: 0x2a */ + 0xe6, 0x63, 0x30, 0xc4, 0x3c, 0xbe, 0x32, 0x83, 0x3c, 0x20, 0xcf, 0x0f, 0x0f, 0xac, 0xd4, 0x46, /* Byte value: 0x2b */ + 0x99, 0x4b, 0xe9, 0xfa, 0x42, 0x12, 0x85, 0x66, 0x42, 0x0f, 0xd3, 0xf1, 0xf1, 0x98, 0x1c, 0xaa, /* Byte value: 0x2c */ + 0x29, 0xfe, 0x1d, 0x06, 0x8b, 0xea, 0x24, 0x9c, 0x8b, 0x16, 0x26, 0x52, 0x52, 0xd8, 0x0d, 0x67, /* Byte value: 0x2d */ + 0xa9, 0x2d, 0x6b, 0x49, 0x01, 0x58, 0x78, 0xb1, 0x01, 0xf3, 0xfe, 0x91, 0x91, 0xd3, 0xd1, 0x10, /* Byte value: 0x2e */ + 0x61, 0x67, 0x19, 0xa8, 0x8e, 0x11, 0x7f, 0xac, 0x8e, 0xaf, 0xa6, 0xc2, 0xc2, 0xc1, 0x1e, 0x37, /* Byte value: 0x2f */ + 0xd0, 0x79, 0x33, 0x59, 0x4f, 0x6c, 0x98, 0x97, 0x4f, 0x22, 0xaf, 0x63, 0x63, 0xd6, 0x48, 0x7a, /* Byte value: 0x30 */ + 0x48, 0x99, 0x04, 0xae, 0x05, 0xfb, 0x5b, 0x30, 0x05, 0xb9, 0x80, 0x90, 0x90, 0x19, 0x13, 0x50, /* Byte value: 0x31 */ + 0xf1, 0x96, 0x11, 0x37, 0x84, 0x24, 0xc9, 0xcc, 0x84, 0x1e, 0x65, 0x21, 0x21, 0xf3, 0x38, 0x97, /* Byte value: 0x32 */ + 0x91, 0x5a, 0xd6, 0x92, 0x02, 0xb0, 0xf0, 0xa1, 0x02, 0x25, 0x3f, 0xe1, 0xe1, 0x65, 0x61, 0x20, /* Byte value: 0x33 */ + 0x65, 0x8e, 0xe7, 0x9c, 0xae, 0x40, 0xa4, 0x2e, 0xae, 0xba, 0xd0, 0xca, 0xca, 0x5e, 0xc1, 0x72, /* Byte value: 0x34 */ + 0x24, 0xad, 0x02, 0x57, 0xe3, 0x9c, 0xcc, 0x18, 0xe3, 0xbd, 0x40, 0x48, 0x48, 0xed, 0xe8, 0x28, /* Byte value: 0x35 */ + 0x9c, 0x09, 0xc9, 0xc3, 0x6a, 0xc6, 0x18, 0x25, 0x6a, 0x8e, 0x59, 0xfb, 0xfb, 0x50, 0x84, 0x6f, /* Byte value: 0x36 */ + 0xc8, 0x4a, 0x72, 0xe1, 0x8f, 0x49, 0x07, 0x1d, 0x8f, 0x5c, 0x58, 0x53, 0x53, 0x12, 0xcf, 0x27, /* Byte value: 0x37 */ + 0x14, 0xcb, 0x80, 0xe4, 0xa0, 0xd6, 0x31, 0xcf, 0xa0, 0x41, 0x6d, 0x28, 0x28, 0xa6, 0x25, 0x92, /* Byte value: 0x38 */ + 0x70, 0xee, 0xb9, 0x75, 0x06, 0x13, 0xd3, 0x20, 0x06, 0x6f, 0x41, 0xe0, 0xe0, 0xaf, 0xa3, 0x60, /* Byte value: 0x39 */ + 0x39, 0xdc, 0x63, 0xd6, 0x0b, 0x6d, 0xce, 0xd1, 0x0b, 0x42, 0x3d, 0x72, 0x72, 0xe1, 0xf7, 0xb0, /* Byte value: 0x3a */ + 0x55, 0xe8, 0x65, 0x2f, 0xed, 0x0a, 0x59, 0xf9, 0xed, 0x46, 0xfd, 0xaa, 0xaa, 0x15, 0x0c, 0xc8, /* Byte value: 0x3b */ + 0x13, 0x1c, 0xdf, 0xc7, 0x98, 0xcb, 0x20, 0xcd, 0x98, 0x2b, 0xdc, 0x26, 0x26, 0xc0, 0x33, 0x94, /* Byte value: 0x3c */ + 0xd6, 0x05, 0xb2, 0x77, 0x7f, 0xf4, 0xcf, 0x54, 0x7f, 0xdc, 0xe2, 0x6f, 0x6f, 0xe7, 0x19, 0xfc, /* Byte value: 0x3d */ + 0xfb, 0x12, 0x51, 0x45, 0xd4, 0x4f, 0x30, 0x4a, 0xd4, 0xdf, 0xb2, 0x35, 0x35, 0xa0, 0xcb, 0xde, /* Byte value: 0x3e */ + 0x22, 0xd1, 0x83, 0x79, 0xd3, 0x04, 0x9b, 0xdb, 0xd3, 0x43, 0x0d, 0x44, 0x44, 0xdc, 0xb9, 0xae, /* Byte value: 0x3f */ + 0xda, 0xfd, 0x73, 0x2b, 0x1f, 0x07, 0x61, 0x11, 0x1f, 0xe3, 0x78, 0x77, 0x77, 0x85, 0xbb, 0x33, /* Byte value: 0x40 */ + 0x25, 0x06, 0xdc, 0x5a, 0xeb, 0x19, 0x8a, 0xd9, 0xeb, 0x29, 0xbc, 0x4a, 0x4a, 0xba, 0xaf, 0xa8, /* Byte value: 0x41 */ + 0xe7, 0xc8, 0xee, 0xc9, 0x34, 0x3b, 0x74, 0x42, 0x34, 0xb4, 0x33, 0x0d, 0x0d, 0xfb, 0x93, 0xc6, /* Byte value: 0x42 */ + 0xe4, 0xf6, 0x4f, 0xde, 0x2c, 0x77, 0xbe, 0xc2, 0x2c, 0xcb, 0xf4, 0x0b, 0x0b, 0x02, 0x5a, 0x85, /* Byte value: 0x43 */ + 0xa3, 0xa9, 0x2b, 0x3b, 0x51, 0x33, 0x81, 0x37, 0x51, 0x32, 0x29, 0x85, 0x85, 0x80, 0x22, 0x59, /* Byte value: 0x44 */ + 0x8c, 0x2b, 0xb7, 0x13, 0xea, 0x41, 0xf2, 0x68, 0xea, 0xda, 0x42, 0xdb, 0xdb, 0x69, 0x7e, 0xb8, /* Byte value: 0x45 */ + 0x19, 0x98, 0x9f, 0xb5, 0xc8, 0xa0, 0xd9, 0x4b, 0xc8, 0xea, 0x0b, 0x32, 0x32, 0x93, 0xc0, 0xdd, /* Byte value: 0x46 */ + 0x09, 0xba, 0xe1, 0x65, 0x48, 0x27, 0x33, 0x06, 0x48, 0xbe, 0x10, 0x12, 0x12, 0xaa, 0x3a, 0x0a, /* Byte value: 0x47 */ + 0x2d, 0x17, 0xe3, 0x32, 0xab, 0xbb, 0xff, 0x1e, 0xab, 0x03, 0x50, 0x5a, 0x5a, 0x47, 0xd2, 0x22, /* Byte value: 0x48 */ + 0x8f, 0x15, 0x16, 0x04, 0xf2, 0x0d, 0x38, 0xe8, 0xf2, 0xa5, 0x85, 0xdd, 0xdd, 0x90, 0xb7, 0xfb, /* Byte value: 0x49 */ + 0x94, 0x18, 0xf6, 0xab, 0x2a, 0x64, 0x6d, 0xe2, 0x2a, 0xa4, 0xb5, 0xeb, 0xeb, 0xad, 0xf9, 0xe5, /* Byte value: 0x4a */ + 0x0d, 0x53, 0x1f, 0x51, 0x68, 0x76, 0xe8, 0x84, 0x68, 0xab, 0x66, 0x1a, 0x1a, 0x35, 0xe5, 0x4f, /* Byte value: 0x4b */ + 0x85, 0x91, 0x56, 0x76, 0xa2, 0x66, 0xc1, 0x6e, 0xa2, 0x64, 0x52, 0xc9, 0xc9, 0xc3, 0x44, 0xb2, /* Byte value: 0x4c */ + 0x57, 0x7d, 0x1a, 0x35, 0xfd, 0xc3, 0xd5, 0xb8, 0xfd, 0xad, 0xc6, 0xae, 0xae, 0xbb, 0x82, 0x0b, /* Byte value: 0x4d */ + 0x96, 0x8d, 0x89, 0xb1, 0x3a, 0xad, 0xe1, 0xa3, 0x3a, 0x4f, 0x8e, 0xef, 0xef, 0x03, 0x77, 0x26, /* Byte value: 0x4e */ + 0x69, 0x76, 0x26, 0xc0, 0xce, 0xb3, 0x0a, 0x6b, 0xce, 0x85, 0x4a, 0xd2, 0xd2, 0x3c, 0x63, 0xbd, /* Byte value: 0x4f */ + 0xf8, 0x2c, 0xf0, 0x52, 0xcc, 0x03, 0xfa, 0xca, 0xcc, 0xa0, 0x75, 0x33, 0x33, 0x59, 0x02, 0x9d, /* Byte value: 0x50 */ + 0x5e, 0xc7, 0xfb, 0x50, 0xb5, 0xe4, 0xe6, 0xbe, 0xb5, 0x13, 0xd6, 0xbc, 0xbc, 0x11, 0xb8, 0x01, /* Byte value: 0x51 */ + 0x0e, 0x6d, 0xbe, 0x46, 0x70, 0x3a, 0x22, 0x04, 0x70, 0xd4, 0xa1, 0x1c, 0x1c, 0xcc, 0x2c, 0x0c, /* Byte value: 0x52 */ + 0x71, 0x45, 0x67, 0x78, 0x0e, 0x96, 0x95, 0xe1, 0x0e, 0xfb, 0xbd, 0xe2, 0xe2, 0xf8, 0xe4, 0xe0, /* Byte value: 0x53 */ + 0x7a, 0x6a, 0xf9, 0x07, 0x56, 0x78, 0x2a, 0xa6, 0x56, 0xae, 0x96, 0xf4, 0xf4, 0xfc, 0x50, 0x29, /* Byte value: 0x54 */ + 0x01, 0xab, 0xde, 0x0d, 0x08, 0x85, 0x46, 0xc1, 0x08, 0x94, 0xfc, 0x02, 0x02, 0x57, 0x47, 0x80, /* Byte value: 0x55 */ + 0xe0, 0x1f, 0xb1, 0xea, 0x0c, 0x26, 0x65, 0x40, 0x0c, 0xde, 0x82, 0x03, 0x03, 0x9d, 0x85, 0xc0, /* Byte value: 0x56 */ + 0x7e, 0x83, 0x07, 0x33, 0x76, 0x29, 0xf1, 0x24, 0x76, 0xbb, 0xe0, 0xfc, 0xfc, 0x63, 0x8f, 0x6c, /* Byte value: 0x57 */ + 0x93, 0xcf, 0xa9, 0x88, 0x12, 0x79, 0x7c, 0xe0, 0x12, 0xce, 0x04, 0xe5, 0xe5, 0xcb, 0xef, 0xe3, /* Byte value: 0x58 */ + 0xce, 0x36, 0xf3, 0xcf, 0xbf, 0xd1, 0x50, 0xde, 0xbf, 0xa2, 0x15, 0x5f, 0x5f, 0x23, 0x9e, 0xa1, /* Byte value: 0x59 */ + 0x9f, 0x37, 0x68, 0xd4, 0x72, 0x8a, 0xd2, 0xa5, 0x72, 0xf1, 0x9e, 0xfd, 0xfd, 0xa9, 0x4d, 0x2c, /* Byte value: 0x5a */ + 0x3a, 0xe2, 0xc2, 0xc1, 0x13, 0x21, 0x04, 0x51, 0x13, 0x3d, 0xfa, 0x74, 0x74, 0x18, 0x3e, 0xf3, /* Byte value: 0x5b */ + 0xd1, 0xd2, 0xed, 0x54, 0x47, 0xe9, 0xde, 0x56, 0x47, 0xb6, 0x53, 0x61, 0x61, 0x81, 0x0f, 0xfa, /* Byte value: 0x5c */ + 0xf2, 0xa8, 0xb0, 0x20, 0x9c, 0x68, 0x03, 0x4c, 0x9c, 0x61, 0xa2, 0x27, 0x27, 0x0a, 0xf1, 0xd4, /* Byte value: 0x5d */ + 0xcf, 0x9d, 0x2d, 0xc2, 0xb7, 0x54, 0x16, 0x1f, 0xb7, 0x36, 0xe9, 0x5d, 0x5d, 0x74, 0xd9, 0x21, /* Byte value: 0x5e */ + 0x43, 0xb6, 0x9a, 0xd1, 0x5d, 0x15, 0xe4, 0x77, 0x5d, 0xec, 0xab, 0x86, 0x86, 0x1d, 0xa7, 0x99, /* Byte value: 0x5f */ + 0xc9, 0xe1, 0xac, 0xec, 0x87, 0xcc, 0x41, 0xdc, 0x87, 0xc8, 0xa4, 0x51, 0x51, 0x45, 0x88, 0xa7, /* Byte value: 0x60 */ + 0x4a, 0x0c, 0x7b, 0xb4, 0x15, 0x32, 0xd7, 0x71, 0x15, 0x52, 0xbb, 0x94, 0x94, 0xb7, 0x9d, 0x93, /* Byte value: 0x61 */ + 0xbd, 0xe6, 0xeb, 0xad, 0xa1, 0x8e, 0x49, 0x7e, 0xa1, 0xb2, 0x93, 0xb9, 0xb9, 0x75, 0xf4, 0x82, /* Byte value: 0x62 */ + 0x62, 0x59, 0xb8, 0xbf, 0x96, 0x5d, 0xb5, 0x2c, 0x96, 0xd0, 0x61, 0xc4, 0xc4, 0x38, 0xd7, 0x74, /* Byte value: 0x63 */ + 0xac, 0x6f, 0x4b, 0x70, 0x29, 0x8c, 0xe5, 0xf2, 0x29, 0x72, 0x74, 0x9b, 0x9b, 0x1b, 0x49, 0xd5, /* Byte value: 0x64 */ + 0x02, 0x95, 0x7f, 0x1a, 0x10, 0xc9, 0x8c, 0x41, 0x10, 0xeb, 0x3b, 0x04, 0x04, 0xae, 0x8e, 0xc3, /* Byte value: 0x65 */ + 0x37, 0xb1, 0xdd, 0x90, 0x7b, 0x57, 0xec, 0xd5, 0x7b, 0x96, 0x9c, 0x6e, 0x6e, 0x2d, 0xdb, 0xbc, /* Byte value: 0x66 */ + 0x82, 0x46, 0x09, 0x55, 0x9a, 0x7b, 0xd0, 0x6c, 0x9a, 0x0e, 0xe3, 0xc7, 0xc7, 0xa5, 0x52, 0xb4, /* Byte value: 0x67 */ + 0xc1, 0xf0, 0x93, 0x84, 0xc7, 0x6e, 0x34, 0x1b, 0xc7, 0xe2, 0x48, 0x41, 0x41, 0xb8, 0xf5, 0x2d, /* Byte value: 0x68 */ + 0x26, 0x38, 0x7d, 0x4d, 0xf3, 0x55, 0x40, 0x59, 0xf3, 0x56, 0x7b, 0x4c, 0x4c, 0x43, 0x66, 0xeb, /* Byte value: 0x69 */ + 0xbb, 0x9a, 0x6a, 0x83, 0x91, 0x16, 0x1e, 0xbd, 0x91, 0x4c, 0xde, 0xb5, 0xb5, 0x44, 0xa5, 0x04, /* Byte value: 0x6a */ + 0x0f, 0xc6, 0x60, 0x4b, 0x78, 0xbf, 0x64, 0xc5, 0x78, 0x40, 0x5d, 0x1e, 0x1e, 0x9b, 0x6b, 0x8c, /* Byte value: 0x6b */ + 0xd4, 0x90, 0xcd, 0x6d, 0x6f, 0x3d, 0x43, 0x15, 0x6f, 0x37, 0xd9, 0x6b, 0x6b, 0x49, 0x97, 0x3f, /* Byte value: 0x6c */ + 0x5b, 0x85, 0xdb, 0x69, 0x9d, 0x30, 0x7b, 0xfd, 0x9d, 0x92, 0x5c, 0xb6, 0xb6, 0xd9, 0x20, 0xc4, /* Byte value: 0x6d */ + 0x63, 0xf2, 0x66, 0xb2, 0x9e, 0xd8, 0xf3, 0xed, 0x9e, 0x44, 0x9d, 0xc6, 0xc6, 0x6f, 0x90, 0xf4, /* Byte value: 0x6e */ + 0x87, 0x04, 0x29, 0x6c, 0xb2, 0xaf, 0x4d, 0x2f, 0xb2, 0x8f, 0x69, 0xcd, 0xcd, 0x6d, 0xca, 0x71, /* Byte value: 0x6f */ + 0xbf, 0x73, 0x94, 0xb7, 0xb1, 0x47, 0xc5, 0x3f, 0xb1, 0x59, 0xa8, 0xbd, 0xbd, 0xdb, 0x7a, 0x41, /* Byte value: 0x70 */ + 0x97, 0x26, 0x57, 0xbc, 0x32, 0x28, 0xa7, 0x62, 0x32, 0xdb, 0x72, 0xed, 0xed, 0x54, 0x30, 0xa6, /* Byte value: 0x71 */ + 0x46, 0xf4, 0xba, 0xe8, 0x75, 0xc1, 0x79, 0x34, 0x75, 0x6d, 0x21, 0x8c, 0x8c, 0xd5, 0x3f, 0x5c, /* Byte value: 0x72 */ + 0xaa, 0x13, 0xca, 0x5e, 0x19, 0x14, 0xb2, 0x31, 0x19, 0x8c, 0x39, 0x97, 0x97, 0x2a, 0x18, 0x53, /* Byte value: 0x73 */ + 0x4f, 0x4e, 0x5b, 0x8d, 0x3d, 0xe6, 0x4a, 0x32, 0x3d, 0xd3, 0x31, 0x9e, 0x9e, 0x7f, 0x05, 0x56, /* Byte value: 0x74 */ + 0xc6, 0x27, 0xcc, 0xa7, 0xff, 0x73, 0x25, 0x19, 0xff, 0x88, 0xf9, 0x4f, 0x4f, 0xde, 0xe3, 0x2b, /* Byte value: 0x75 */ + 0x4e, 0xe5, 0x85, 0x80, 0x35, 0x63, 0x0c, 0xf3, 0x35, 0x47, 0xcd, 0x9c, 0x9c, 0x28, 0x42, 0xd6, /* Byte value: 0x76 */ + 0x80, 0xd3, 0x76, 0x4f, 0x8a, 0xb2, 0x5c, 0x2d, 0x8a, 0xe5, 0xd8, 0xc3, 0xc3, 0x0b, 0xdc, 0x77, /* Byte value: 0x77 */ + 0x7f, 0x28, 0xd9, 0x3e, 0x7e, 0xac, 0xb7, 0xe5, 0x7e, 0x2f, 0x1c, 0xfe, 0xfe, 0x34, 0xc8, 0xec, /* Byte value: 0x78 */ + 0x45, 0xca, 0x1b, 0xff, 0x6d, 0x8d, 0xb3, 0xb4, 0x6d, 0x12, 0xe6, 0x8a, 0x8a, 0x2c, 0xf6, 0x1f, /* Byte value: 0x79 */ + 0xeb, 0x30, 0x2f, 0x95, 0x54, 0xc8, 0xda, 0x07, 0x54, 0x8b, 0xa9, 0x15, 0x15, 0x99, 0x31, 0x09, /* Byte value: 0x7a */ + 0x68, 0xdd, 0xf8, 0xcd, 0xc6, 0x36, 0x4c, 0xaa, 0xc6, 0x11, 0xb6, 0xd0, 0xd0, 0x6b, 0x24, 0x3d, /* Byte value: 0x7b */ + 0x10, 0x22, 0x7e, 0xd0, 0x80, 0x87, 0xea, 0x4d, 0x80, 0x54, 0x1b, 0x20, 0x20, 0x39, 0xfa, 0xd7, /* Byte value: 0x7c */ + 0x20, 0x44, 0xfc, 0x63, 0xc3, 0xcd, 0x17, 0x9a, 0xc3, 0xa8, 0x36, 0x40, 0x40, 0x72, 0x37, 0x6d, /* Byte value: 0x7d */ + 0x5f, 0x6c, 0x25, 0x5d, 0xbd, 0x61, 0xa0, 0x7f, 0xbd, 0x87, 0x2a, 0xbe, 0xbe, 0x46, 0xff, 0x81, /* Byte value: 0x7e */ + 0x49, 0x32, 0xda, 0xa3, 0x0d, 0x7e, 0x1d, 0xf1, 0x0d, 0x2d, 0x7c, 0x92, 0x92, 0x4e, 0x54, 0xd0, /* Byte value: 0x7f */ + 0xd3, 0x47, 0x92, 0x4e, 0x57, 0x20, 0x52, 0x17, 0x57, 0x5d, 0x68, 0x65, 0x65, 0x2f, 0x81, 0x39, /* Byte value: 0x80 */ + 0xc2, 0xce, 0x32, 0x93, 0xdf, 0x22, 0xfe, 0x9b, 0xdf, 0x9d, 0x8f, 0x47, 0x47, 0x41, 0x3c, 0x6e, /* Byte value: 0x81 */ + 0x56, 0xd6, 0xc4, 0x38, 0xf5, 0x46, 0x93, 0x79, 0xf5, 0x39, 0x3a, 0xac, 0xac, 0xec, 0xc5, 0x8b, /* Byte value: 0x82 */ + 0xe5, 0x5d, 0x91, 0xd3, 0x24, 0xf2, 0xf8, 0x03, 0x24, 0x5f, 0x08, 0x09, 0x09, 0x55, 0x1d, 0x05, /* Byte value: 0x83 */ + 0xbc, 0x4d, 0x35, 0xa0, 0xa9, 0x0b, 0x0f, 0xbf, 0xa9, 0x26, 0x6f, 0xbb, 0xbb, 0x22, 0xb3, 0x02, /* Byte value: 0x84 */ + 0x77, 0x39, 0xe6, 0x56, 0x3e, 0x0e, 0xc2, 0x22, 0x3e, 0x05, 0xf0, 0xee, 0xee, 0xc9, 0xb5, 0x66, /* Byte value: 0x85 */ + 0x15, 0x60, 0x5e, 0xe9, 0xa8, 0x53, 0x77, 0x0e, 0xa8, 0xd5, 0x91, 0x2a, 0x2a, 0xf1, 0x62, 0x12, /* Byte value: 0x86 */ + 0x30, 0x66, 0x82, 0xb3, 0x43, 0x4a, 0xfd, 0xd7, 0x43, 0xfc, 0x2d, 0x60, 0x60, 0x4b, 0xcd, 0xba, /* Byte value: 0x87 */ + 0xb0, 0xb5, 0xf4, 0xfc, 0xc9, 0xf8, 0xa1, 0xfa, 0xc9, 0x19, 0xf5, 0xa3, 0xa3, 0x40, 0x11, 0xcd, /* Byte value: 0x88 */ + 0xc3, 0x65, 0xec, 0x9e, 0xd7, 0xa7, 0xb8, 0x5a, 0xd7, 0x09, 0x73, 0x45, 0x45, 0x16, 0x7b, 0xee, /* Byte value: 0x89 */ + 0xa6, 0xeb, 0x0b, 0x02, 0x79, 0xe7, 0x1c, 0x74, 0x79, 0xb3, 0xa3, 0x8f, 0x8f, 0x48, 0xba, 0x9c, /* Byte value: 0x8a */ + 0x6a, 0x48, 0x87, 0xd7, 0xd6, 0xff, 0xc0, 0xeb, 0xd6, 0xfa, 0x8d, 0xd4, 0xd4, 0xc5, 0xaa, 0xfe, /* Byte value: 0x8b */ + 0x6e, 0xa1, 0x79, 0xe3, 0xf6, 0xae, 0x1b, 0x69, 0xf6, 0xef, 0xfb, 0xdc, 0xdc, 0x5a, 0x75, 0xbb, /* Byte value: 0x8c */ + 0xee, 0x72, 0x0f, 0xac, 0x7c, 0x1c, 0x47, 0x44, 0x7c, 0x0a, 0x23, 0x1f, 0x1f, 0x51, 0xa9, 0xcc, /* Byte value: 0x8d */ + 0x95, 0xb3, 0x28, 0xa6, 0x22, 0xe1, 0x2b, 0x23, 0x22, 0x30, 0x49, 0xe9, 0xe9, 0xfa, 0xbe, 0x65, /* Byte value: 0x8e */ + 0xbe, 0xd8, 0x4a, 0xba, 0xb9, 0xc2, 0x83, 0xfe, 0xb9, 0xcd, 0x54, 0xbf, 0xbf, 0x8c, 0x3d, 0xc1, /* Byte value: 0x8f */ + 0x38, 0x77, 0xbd, 0xdb, 0x03, 0xe8, 0x88, 0x10, 0x03, 0xd6, 0xc1, 0x70, 0x70, 0xb6, 0xb0, 0x30, /* Byte value: 0x90 */ + 0x1c, 0xda, 0xbf, 0x8c, 0xe0, 0x74, 0x44, 0x08, 0xe0, 0x6b, 0x81, 0x38, 0x38, 0x5b, 0x58, 0x18, /* Byte value: 0x91 */ + 0xd8, 0x68, 0x0c, 0x31, 0x0f, 0xce, 0xed, 0x50, 0x0f, 0x08, 0x43, 0x73, 0x73, 0x2b, 0x35, 0xf0, /* Byte value: 0x92 */ + 0xfc, 0xc5, 0x0e, 0x66, 0xec, 0x52, 0x21, 0x48, 0xec, 0xb5, 0x03, 0x3b, 0x3b, 0xc6, 0xdd, 0xd8, /* Byte value: 0x93 */ + 0x6b, 0xe3, 0x59, 0xda, 0xde, 0x7a, 0x86, 0x2a, 0xde, 0x6e, 0x71, 0xd6, 0xd6, 0x92, 0xed, 0x7e, /* Byte value: 0x94 */ + 0x9e, 0x9c, 0xb6, 0xd9, 0x7a, 0x0f, 0x94, 0x64, 0x7a, 0x65, 0x62, 0xff, 0xff, 0xfe, 0x0a, 0xac, /* Byte value: 0x95 */ + 0xf3, 0x03, 0x6e, 0x2d, 0x94, 0xed, 0x45, 0x8d, 0x94, 0xf5, 0x5e, 0x25, 0x25, 0x5d, 0xb6, 0x54, /* Byte value: 0x96 */ + 0x16, 0x5e, 0xff, 0xfe, 0xb0, 0x1f, 0xbd, 0x8e, 0xb0, 0xaa, 0x56, 0x2c, 0x2c, 0x08, 0xab, 0x51, /* Byte value: 0x97 */ + 0xf6, 0x41, 0x4e, 0x14, 0xbc, 0x39, 0xd8, 0xce, 0xbc, 0x74, 0xd4, 0x2f, 0x2f, 0x95, 0x2e, 0x91, /* Byte value: 0x98 */ + 0xfa, 0xb9, 0x8f, 0x48, 0xdc, 0xca, 0x76, 0x8b, 0xdc, 0x4b, 0x4e, 0x37, 0x37, 0xf7, 0x8c, 0x5e, /* Byte value: 0x99 */ + 0x1d, 0x71, 0x61, 0x81, 0xe8, 0xf1, 0x02, 0xc9, 0xe8, 0xff, 0x7d, 0x3a, 0x3a, 0x0c, 0x1f, 0x98, /* Byte value: 0x9a */ + 0x05, 0x42, 0x20, 0x39, 0x28, 0xd4, 0x9d, 0x43, 0x28, 0x81, 0x8a, 0x0a, 0x0a, 0xc8, 0x98, 0xc5, /* Byte value: 0x9b */ + 0x0a, 0x84, 0x40, 0x72, 0x50, 0x6b, 0xf9, 0x86, 0x50, 0xc1, 0xd7, 0x14, 0x14, 0x53, 0xf3, 0x49, /* Byte value: 0x9c */ + 0x79, 0x54, 0x58, 0x10, 0x4e, 0x34, 0xe0, 0x26, 0x4e, 0xd1, 0x51, 0xf2, 0xf2, 0x05, 0x99, 0x6a, /* Byte value: 0x9d */ + 0x3e, 0x0b, 0x3c, 0xf5, 0x33, 0x70, 0xdf, 0xd3, 0x33, 0x28, 0x8c, 0x7c, 0x7c, 0x87, 0xe1, 0xb6, /* Byte value: 0x9e */ + 0x90, 0xf1, 0x08, 0x9f, 0x0a, 0x35, 0xb6, 0x60, 0x0a, 0xb1, 0xc3, 0xe3, 0xe3, 0x32, 0x26, 0xa0, /* Byte value: 0x9f */ + 0x98, 0xe0, 0x37, 0xf7, 0x4a, 0x97, 0xc3, 0xa7, 0x4a, 0x9b, 0x2f, 0xf3, 0xf3, 0xcf, 0x5b, 0x2a, /* Byte value: 0xa0 */ + 0xcd, 0x08, 0x52, 0xd8, 0xa7, 0x9d, 0x9a, 0x5e, 0xa7, 0xdd, 0xd2, 0x59, 0x59, 0xda, 0x57, 0xe2, /* Byte value: 0xa1 */ + 0xcb, 0x74, 0xd3, 0xf6, 0x97, 0x05, 0xcd, 0x9d, 0x97, 0x23, 0x9f, 0x55, 0x55, 0xeb, 0x06, 0x64, /* Byte value: 0xa2 */ + 0x0c, 0xf8, 0xc1, 0x5c, 0x60, 0xf3, 0xae, 0x45, 0x60, 0x3f, 0x9a, 0x18, 0x18, 0x62, 0xa2, 0xcf, /* Byte value: 0xa3 */ + 0x36, 0x1a, 0x03, 0x9d, 0x73, 0xd2, 0xaa, 0x14, 0x73, 0x02, 0x60, 0x6c, 0x6c, 0x7a, 0x9c, 0x3c, /* Byte value: 0xa4 */ + 0x73, 0xd0, 0x18, 0x62, 0x1e, 0x5f, 0x19, 0xa0, 0x1e, 0x10, 0x86, 0xe6, 0xe6, 0x56, 0x6a, 0x23, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x9d, 0xa2, 0x17, 0xce, 0x62, 0x43, 0x5e, 0xe4, 0x62, 0x1a, 0xa5, 0xf9, 0xf9, 0x07, 0xc3, 0xef, /* Byte value: 0xa7 */ + 0xe9, 0xa5, 0x50, 0x8f, 0x44, 0x01, 0x56, 0x46, 0x44, 0x60, 0x92, 0x11, 0x11, 0x37, 0xbf, 0xca, /* Byte value: 0xa8 */ + 0x92, 0x64, 0x77, 0x85, 0x1a, 0xfc, 0x3a, 0x21, 0x1a, 0x5a, 0xf8, 0xe7, 0xe7, 0x9c, 0xa8, 0x63, /* Byte value: 0xa9 */ + 0x17, 0xf5, 0x21, 0xf3, 0xb8, 0x9a, 0xfb, 0x4f, 0xb8, 0x3e, 0xaa, 0x2e, 0x2e, 0x5f, 0xec, 0xd1, /* Byte value: 0xaa */ + 0x07, 0xd7, 0x5f, 0x23, 0x38, 0x1d, 0x11, 0x02, 0x38, 0x6a, 0xb1, 0x0e, 0x0e, 0x66, 0x16, 0x06, /* Byte value: 0xab */ + 0x81, 0x78, 0xa8, 0x42, 0x82, 0x37, 0x1a, 0xec, 0x82, 0x71, 0x24, 0xc1, 0xc1, 0x5c, 0x9b, 0xf7, /* Byte value: 0xac */ + 0xed, 0x4c, 0xae, 0xbb, 0x64, 0x50, 0x8d, 0xc4, 0x64, 0x75, 0xe4, 0x19, 0x19, 0xa8, 0x60, 0x8f, /* Byte value: 0xad */ + 0xca, 0xdf, 0x0d, 0xfb, 0x9f, 0x80, 0x8b, 0x5c, 0x9f, 0xb7, 0x63, 0x57, 0x57, 0xbc, 0x41, 0xe4, /* Byte value: 0xae */ + 0x74, 0x07, 0x47, 0x41, 0x26, 0x42, 0x08, 0xa2, 0x26, 0x7a, 0x37, 0xe8, 0xe8, 0x30, 0x7c, 0x25, /* Byte value: 0xaf */ + 0xa1, 0x3c, 0x54, 0x21, 0x41, 0xfa, 0x0d, 0x76, 0x41, 0xd9, 0x12, 0x81, 0x81, 0x2e, 0xac, 0x9a, /* Byte value: 0xb0 */ + 0x5d, 0xf9, 0x5a, 0x47, 0xad, 0xa8, 0x2c, 0x3e, 0xad, 0x6c, 0x11, 0xba, 0xba, 0xe8, 0x71, 0x42, /* Byte value: 0xb1 */ + 0x40, 0x88, 0x3b, 0xc6, 0x45, 0x59, 0x2e, 0xf7, 0x45, 0x93, 0x6c, 0x80, 0x80, 0xe4, 0x6e, 0xda, /* Byte value: 0xb2 */ + 0x78, 0xff, 0x86, 0x1d, 0x46, 0xb1, 0xa6, 0xe7, 0x46, 0x45, 0xad, 0xf0, 0xf0, 0x52, 0xde, 0xea, /* Byte value: 0xb3 */ + 0x83, 0xed, 0xd7, 0x58, 0x92, 0xfe, 0x96, 0xad, 0x92, 0x9a, 0x1f, 0xc5, 0xc5, 0xf2, 0x15, 0x34, /* Byte value: 0xb4 */ + 0xdd, 0x2a, 0x2c, 0x08, 0x27, 0x1a, 0x70, 0x13, 0x27, 0x89, 0xc9, 0x79, 0x79, 0xe3, 0xad, 0x35, /* Byte value: 0xb5 */ + 0x7b, 0xc1, 0x27, 0x0a, 0x5e, 0xfd, 0x6c, 0x67, 0x5e, 0x3a, 0x6a, 0xf6, 0xf6, 0xab, 0x17, 0xa9, /* Byte value: 0xb6 */ + 0x42, 0x1d, 0x44, 0xdc, 0x55, 0x90, 0xa2, 0xb6, 0x55, 0x78, 0x57, 0x84, 0x84, 0x4a, 0xe0, 0x19, /* Byte value: 0xb7 */ + 0xdc, 0x81, 0xf2, 0x05, 0x2f, 0x9f, 0x36, 0xd2, 0x2f, 0x1d, 0x35, 0x7b, 0x7b, 0xb4, 0xea, 0xb5, /* Byte value: 0xb8 */ + 0xf0, 0x3d, 0xcf, 0x3a, 0x8c, 0xa1, 0x8f, 0x0d, 0x8c, 0x8a, 0x99, 0x23, 0x23, 0xa4, 0x7f, 0x17, /* Byte value: 0xb9 */ + 0x2c, 0xbc, 0x3d, 0x3f, 0xa3, 0x3e, 0xb9, 0xdf, 0xa3, 0x97, 0xac, 0x58, 0x58, 0x10, 0x95, 0xa2, /* Byte value: 0xba */ + 0x5c, 0x52, 0x84, 0x4a, 0xa5, 0x2d, 0x6a, 0xff, 0xa5, 0xf8, 0xed, 0xb8, 0xb8, 0xbf, 0x36, 0xc2, /* Byte value: 0xbb */ + 0x47, 0x5f, 0x64, 0xe5, 0x7d, 0x44, 0x3f, 0xf5, 0x7d, 0xf9, 0xdd, 0x8e, 0x8e, 0x82, 0x78, 0xdc, /* Byte value: 0xbc */ + 0xa4, 0x7e, 0x74, 0x18, 0x69, 0x2e, 0x90, 0x35, 0x69, 0x58, 0x98, 0x8b, 0x8b, 0xe6, 0x34, 0x5f, /* Byte value: 0xbd */ + 0x52, 0x3f, 0x3a, 0x0c, 0xd5, 0x17, 0x48, 0xfb, 0xd5, 0x2c, 0x4c, 0xa4, 0xa4, 0x73, 0x1a, 0xce, /* Byte value: 0xbe */ + 0x5a, 0x2e, 0x05, 0x64, 0x95, 0xb5, 0x3d, 0x3c, 0x95, 0x06, 0xa0, 0xb4, 0xb4, 0x8e, 0x67, 0x44, /* Byte value: 0xbf */ + 0x3f, 0xa0, 0xe2, 0xf8, 0x3b, 0xf5, 0x99, 0x12, 0x3b, 0xbc, 0x70, 0x7e, 0x7e, 0xd0, 0xa6, 0x36, /* Byte value: 0xc0 */ + 0xd9, 0xc3, 0xd2, 0x3c, 0x07, 0x4b, 0xab, 0x91, 0x07, 0x9c, 0xbf, 0x71, 0x71, 0x7c, 0x72, 0x70, /* Byte value: 0xc1 */ + 0x0b, 0x2f, 0x9e, 0x7f, 0x58, 0xee, 0xbf, 0x47, 0x58, 0x55, 0x2b, 0x16, 0x16, 0x04, 0xb4, 0xc9, /* Byte value: 0xc2 */ + 0x2e, 0x29, 0x42, 0x25, 0xb3, 0xf7, 0x35, 0x9e, 0xb3, 0x7c, 0x97, 0x5c, 0x5c, 0xbe, 0x1b, 0x61, /* Byte value: 0xc3 */ + 0x08, 0x11, 0x3f, 0x68, 0x40, 0xa2, 0x75, 0xc7, 0x40, 0x2a, 0xec, 0x10, 0x10, 0xfd, 0x7d, 0x8a, /* Byte value: 0xc4 */ + 0x60, 0xcc, 0xc7, 0xa5, 0x86, 0x94, 0x39, 0x6d, 0x86, 0x3b, 0x5a, 0xc0, 0xc0, 0x96, 0x59, 0xb7, /* Byte value: 0xc5 */ + 0xf4, 0xd4, 0x31, 0x0e, 0xac, 0xf0, 0x54, 0x8f, 0xac, 0x9f, 0xef, 0x2b, 0x2b, 0x3b, 0xa0, 0x52, /* Byte value: 0xc6 */ + 0x4b, 0xa7, 0xa5, 0xb9, 0x1d, 0xb7, 0x91, 0xb0, 0x1d, 0xc6, 0x47, 0x96, 0x96, 0xe0, 0xda, 0x13, /* Byte value: 0xc7 */ + 0xc7, 0x8c, 0x12, 0xaa, 0xf7, 0xf6, 0x63, 0xd8, 0xf7, 0x1c, 0x05, 0x4d, 0x4d, 0x89, 0xa4, 0xab, /* Byte value: 0xc8 */ + 0x06, 0x7c, 0x81, 0x2e, 0x30, 0x98, 0x57, 0xc3, 0x30, 0xfe, 0x4d, 0x0c, 0x0c, 0x31, 0x51, 0x86, /* Byte value: 0xc9 */ + 0xdf, 0xbf, 0x53, 0x12, 0x37, 0xd3, 0xfc, 0x52, 0x37, 0x62, 0xf2, 0x7d, 0x7d, 0x4d, 0x23, 0xf6, /* Byte value: 0xca */ + 0x35, 0x24, 0xa2, 0x8a, 0x6b, 0x9e, 0x60, 0x94, 0x6b, 0x7d, 0xa7, 0x6a, 0x6a, 0x83, 0x55, 0x7f, /* Byte value: 0xcb */ + 0xfd, 0x6e, 0xd0, 0x6b, 0xe4, 0xd7, 0x67, 0x89, 0xe4, 0x21, 0xff, 0x39, 0x39, 0x91, 0x9a, 0x58, /* Byte value: 0xcc */ + 0x11, 0x89, 0xa0, 0xdd, 0x88, 0x02, 0xac, 0x8c, 0x88, 0xc0, 0xe7, 0x22, 0x22, 0x6e, 0xbd, 0x57, /* Byte value: 0xcd */ + 0xb2, 0x20, 0x8b, 0xe6, 0xd9, 0x31, 0x2d, 0xbb, 0xd9, 0xf2, 0xce, 0xa7, 0xa7, 0xee, 0x9f, 0x0e, /* Byte value: 0xce */ + 0xc5, 0x19, 0x6d, 0xb0, 0xe7, 0x3f, 0xef, 0x99, 0xe7, 0xf7, 0x3e, 0x49, 0x49, 0x27, 0x2a, 0x68, /* Byte value: 0xcf */ + 0xb8, 0xa4, 0xcb, 0x94, 0x89, 0x5a, 0xd4, 0x3d, 0x89, 0x33, 0x19, 0xb3, 0xb3, 0xbd, 0x6c, 0x47, /* Byte value: 0xd0 */ + 0xb5, 0xf7, 0xd4, 0xc5, 0xe1, 0x2c, 0x3c, 0xb9, 0xe1, 0x98, 0x7f, 0xa9, 0xa9, 0x88, 0x89, 0x08, /* Byte value: 0xd1 */ + 0x3b, 0x49, 0x1c, 0xcc, 0x1b, 0xa4, 0x42, 0x90, 0x1b, 0xa9, 0x06, 0x76, 0x76, 0x4f, 0x79, 0x73, /* Byte value: 0xd2 */ + 0x28, 0x55, 0xc3, 0x0b, 0x83, 0x6f, 0x62, 0x5d, 0x83, 0x82, 0xda, 0x50, 0x50, 0x8f, 0x4a, 0xe7, /* Byte value: 0xd3 */ + 0xa0, 0x97, 0x8a, 0x2c, 0x49, 0x7f, 0x4b, 0xb7, 0x49, 0x4d, 0xee, 0x83, 0x83, 0x79, 0xeb, 0x1a, /* Byte value: 0xd4 */ + 0xe8, 0x0e, 0x8e, 0x82, 0x4c, 0x84, 0x10, 0x87, 0x4c, 0xf4, 0x6e, 0x13, 0x13, 0x60, 0xf8, 0x4a, /* Byte value: 0xd5 */ + 0xde, 0x14, 0x8d, 0x1f, 0x3f, 0x56, 0xba, 0x93, 0x3f, 0xf6, 0x0e, 0x7f, 0x7f, 0x1a, 0x64, 0x76, /* Byte value: 0xd6 */ + 0x1f, 0xe4, 0x1e, 0x9b, 0xf8, 0x38, 0x8e, 0x88, 0xf8, 0x14, 0x46, 0x3e, 0x3e, 0xa2, 0x91, 0x5b, /* Byte value: 0xd7 */ + 0x6f, 0x0a, 0xa7, 0xee, 0xfe, 0x2b, 0x5d, 0xa8, 0xfe, 0x7b, 0x07, 0xde, 0xde, 0x0d, 0x32, 0x3b, /* Byte value: 0xd8 */ + 0x59, 0x10, 0xa4, 0x73, 0x8d, 0xf9, 0xf7, 0xbc, 0x8d, 0x79, 0x67, 0xb2, 0xb2, 0x77, 0xae, 0x07, /* Byte value: 0xd9 */ + 0x32, 0xf3, 0xfd, 0xa9, 0x53, 0x83, 0x71, 0x96, 0x53, 0x17, 0x16, 0x64, 0x64, 0xe5, 0x43, 0x79, /* Byte value: 0xda */ + 0x84, 0x3a, 0x88, 0x7b, 0xaa, 0xe3, 0x87, 0xaf, 0xaa, 0xf0, 0xae, 0xcb, 0xcb, 0x94, 0x03, 0x32, /* Byte value: 0xdb */ + 0x12, 0xb7, 0x01, 0xca, 0x90, 0x4e, 0x66, 0x0c, 0x90, 0xbf, 0x20, 0x24, 0x24, 0x97, 0x74, 0x14, /* Byte value: 0xdc */ + 0x88, 0xc2, 0x49, 0x27, 0xca, 0x10, 0x29, 0xea, 0xca, 0xcf, 0x34, 0xd3, 0xd3, 0xf6, 0xa1, 0xfd, /* Byte value: 0xdd */ + 0x1b, 0x0d, 0xe0, 0xaf, 0xd8, 0x69, 0x55, 0x0a, 0xd8, 0x01, 0x30, 0x36, 0x36, 0x3d, 0x4e, 0x1e, /* Byte value: 0xde */ + 0x58, 0xbb, 0x7a, 0x7e, 0x85, 0x7c, 0xb1, 0x7d, 0x85, 0xed, 0x9b, 0xb0, 0xb0, 0x20, 0xe9, 0x87, /* Byte value: 0xdf */ + 0xa5, 0xd5, 0xaa, 0x15, 0x61, 0xab, 0xd6, 0xf4, 0x61, 0xcc, 0x64, 0x89, 0x89, 0xb1, 0x73, 0xdf, /* Byte value: 0xe0 */ + 0x04, 0xe9, 0xfe, 0x34, 0x20, 0x51, 0xdb, 0x82, 0x20, 0x15, 0x76, 0x08, 0x08, 0x9f, 0xdf, 0x45, /* Byte value: 0xe1 */ + 0xa7, 0x40, 0xd5, 0x0f, 0x71, 0x62, 0x5a, 0xb5, 0x71, 0x27, 0x5f, 0x8d, 0x8d, 0x1f, 0xfd, 0x1c, /* Byte value: 0xe2 */ + 0xd5, 0x3b, 0x13, 0x60, 0x67, 0xb8, 0x05, 0xd4, 0x67, 0xa3, 0x25, 0x69, 0x69, 0x1e, 0xd0, 0xbf, /* Byte value: 0xe3 */ + 0xf5, 0x7f, 0xef, 0x03, 0xa4, 0x75, 0x12, 0x4e, 0xa4, 0x0b, 0x13, 0x29, 0x29, 0x6c, 0xe7, 0xd2, /* Byte value: 0xe4 */ + 0x4d, 0xdb, 0x24, 0x97, 0x2d, 0x2f, 0xc6, 0x73, 0x2d, 0x38, 0x0a, 0x9a, 0x9a, 0xd1, 0x8b, 0x95, /* Byte value: 0xe5 */ + 0x3d, 0x35, 0x9d, 0xe2, 0x2b, 0x3c, 0x15, 0x53, 0x2b, 0x57, 0x4b, 0x7a, 0x7a, 0x7e, 0x28, 0xf5, /* Byte value: 0xe6 */ + 0xa8, 0x86, 0xb5, 0x44, 0x09, 0xdd, 0x3e, 0x70, 0x09, 0x67, 0x02, 0x93, 0x93, 0x84, 0x96, 0x90, /* Byte value: 0xe7 */ + 0x33, 0x58, 0x23, 0xa4, 0x5b, 0x06, 0x37, 0x57, 0x5b, 0x83, 0xea, 0x66, 0x66, 0xb2, 0x04, 0xf9, /* Byte value: 0xe8 */ + 0x21, 0xef, 0x22, 0x6e, 0xcb, 0x48, 0x51, 0x5b, 0xcb, 0x3c, 0xca, 0x42, 0x42, 0x25, 0x70, 0xed, /* Byte value: 0xe9 */ + 0x2b, 0x6b, 0x62, 0x1c, 0x9b, 0x23, 0xa8, 0xdd, 0x9b, 0xfd, 0x1d, 0x56, 0x56, 0x76, 0x83, 0xa4, /* Byte value: 0xea */ + 0x4c, 0x70, 0xfa, 0x9a, 0x25, 0xaa, 0x80, 0xb2, 0x25, 0xac, 0xf6, 0x98, 0x98, 0x86, 0xcc, 0x15, /* Byte value: 0xeb */ + 0x1a, 0xa6, 0x3e, 0xa2, 0xd0, 0xec, 0x13, 0xcb, 0xd0, 0x95, 0xcc, 0x34, 0x34, 0x6a, 0x09, 0x9e, /* Byte value: 0xec */ + 0x67, 0x1b, 0x98, 0x86, 0xbe, 0x89, 0x28, 0x6f, 0xbe, 0x51, 0xeb, 0xce, 0xce, 0xf0, 0x4f, 0xb1, /* Byte value: 0xed */ + 0x54, 0x43, 0xbb, 0x22, 0xe5, 0x8f, 0x1f, 0x38, 0xe5, 0xd2, 0x01, 0xa8, 0xa8, 0x42, 0x4b, 0x48, /* Byte value: 0xee */ + 0xec, 0xe7, 0x70, 0xb6, 0x6c, 0xd5, 0xcb, 0x05, 0x6c, 0xe1, 0x18, 0x1b, 0x1b, 0xff, 0x27, 0x0f, /* Byte value: 0xef */ + 0x9b, 0xde, 0x96, 0xe0, 0x52, 0xdb, 0x09, 0x27, 0x52, 0xe4, 0xe8, 0xf5, 0xf5, 0x36, 0x92, 0x69, /* Byte value: 0xf0 */ + 0xa2, 0x02, 0xf5, 0x36, 0x59, 0xb6, 0xc7, 0xf6, 0x59, 0xa6, 0xd5, 0x87, 0x87, 0xd7, 0x65, 0xd9, /* Byte value: 0xf1 */ + 0x64, 0x25, 0x39, 0x91, 0xa6, 0xc5, 0xe2, 0xef, 0xa6, 0x2e, 0x2c, 0xc8, 0xc8, 0x09, 0x86, 0xf2, /* Byte value: 0xf2 */ + 0xef, 0xd9, 0xd1, 0xa1, 0x74, 0x99, 0x01, 0x85, 0x74, 0x9e, 0xdf, 0x1d, 0x1d, 0x06, 0xee, 0x4c, /* Byte value: 0xf3 */ + 0x8b, 0xfc, 0xe8, 0x30, 0xd2, 0x5c, 0xe3, 0x6a, 0xd2, 0xb0, 0xf3, 0xd5, 0xd5, 0x0f, 0x68, 0xbe, /* Byte value: 0xf4 */ + 0x6c, 0x34, 0x06, 0xf9, 0xe6, 0x67, 0x97, 0x28, 0xe6, 0x04, 0xc0, 0xd8, 0xd8, 0xf4, 0xfb, 0x78, /* Byte value: 0xf5 */ + 0xff, 0xfb, 0xaf, 0x71, 0xf4, 0x1e, 0xeb, 0xc8, 0xf4, 0xca, 0xc4, 0x3d, 0x3d, 0x3f, 0x14, 0x9b, /* Byte value: 0xf6 */ + 0xf7, 0xea, 0x90, 0x19, 0xb4, 0xbc, 0x9e, 0x0f, 0xb4, 0xe0, 0x28, 0x2d, 0x2d, 0xc2, 0x69, 0x11, /* Byte value: 0xf7 */ + 0x18, 0x33, 0x41, 0xb8, 0xc0, 0x25, 0x9f, 0x8a, 0xc0, 0x7e, 0xf7, 0x30, 0x30, 0xc4, 0x87, 0x5d, /* Byte value: 0xf8 */ + 0xb3, 0x8b, 0x55, 0xeb, 0xd1, 0xb4, 0x6b, 0x7a, 0xd1, 0x66, 0x32, 0xa5, 0xa5, 0xb9, 0xd8, 0x8e, /* Byte value: 0xf9 */ + 0x7c, 0x16, 0x78, 0x29, 0x66, 0xe0, 0x7d, 0x65, 0x66, 0x50, 0xdb, 0xf8, 0xf8, 0xcd, 0x01, 0xaf, /* Byte value: 0xfa */ + 0xcc, 0xa3, 0x8c, 0xd5, 0xaf, 0x18, 0xdc, 0x9f, 0xaf, 0x49, 0x2e, 0x5b, 0x5b, 0x8d, 0x10, 0x62, /* Byte value: 0xfb */ + 0x89, 0x69, 0x97, 0x2a, 0xc2, 0x95, 0x6f, 0x2b, 0xc2, 0x5b, 0xc8, 0xd1, 0xd1, 0xa1, 0xe6, 0x7d, /* Byte value: 0xfc */ + 0xae, 0xfa, 0x34, 0x6a, 0x39, 0x45, 0x69, 0xb3, 0x39, 0x99, 0x4f, 0x9f, 0x9f, 0xb5, 0xc7, 0x16, /* Byte value: 0xfd */ + 0x31, 0xcd, 0x5c, 0xbe, 0x4b, 0xcf, 0xbb, 0x16, 0x4b, 0x68, 0xd1, 0x62, 0x62, 0x1c, 0x8a, 0x3a, /* Byte value: 0xfe */ + 0x34, 0x8f, 0x7c, 0x87, 0x63, 0x1b, 0x26, 0x55, 0x63, 0xe9, 0x5b, 0x68, 0x68, 0xd4, 0x12, 0xff, /* Byte value: 0xff */ + 0x66, 0xb0, 0x46, 0x8b, 0xb6, 0x0c, 0x6e, 0xae, 0xb6, 0xc5, 0x17, 0xcc, 0xcc, 0xa7, 0x08, 0x31, /* Byte value: 0x00 */ + + /* Matrix row: 12 */ + 0x55, 0x95, 0x9e, 0xb1, 0xd0, 0xa1, 0x4c, 0xd9, 0x5a, 0x2f, 0xf9, 0x1c, 0x4c, 0xf2, 0x1a, 0x52, /* Byte value: 0x01 */ + 0xfa, 0xed, 0x87, 0xcf, 0x85, 0x5d, 0x81, 0x6c, 0x55, 0x48, 0x8b, 0x1e, 0x81, 0xe1, 0x58, 0x1c, /* Byte value: 0x02 */ + 0x0c, 0xbe, 0x0a, 0x56, 0x48, 0xac, 0xcc, 0x72, 0x67, 0x5c, 0x45, 0x58, 0xcc, 0xf1, 0x09, 0x1a, /* Byte value: 0x03 */ + 0x52, 0x31, 0x7b, 0x77, 0xfa, 0xee, 0x3b, 0x0a, 0xaf, 0x0c, 0xfb, 0x83, 0x3b, 0xb1, 0x8e, 0x02, /* Byte value: 0x04 */ + 0xa3, 0xc6, 0x13, 0x28, 0x1d, 0x50, 0x01, 0xc7, 0x68, 0x3b, 0x37, 0x5a, 0x01, 0xe2, 0x4b, 0x54, /* Byte value: 0x05 */ + 0x73, 0x1c, 0xab, 0xc9, 0xf7, 0x51, 0x4f, 0x53, 0xe2, 0x62, 0xa0, 0xf2, 0x4f, 0x17, 0xc7, 0xae, /* Byte value: 0x06 */ + 0xe1, 0x9c, 0x70, 0x97, 0x07, 0xed, 0xe9, 0x75, 0xf2, 0xe7, 0x81, 0xb8, 0xe9, 0x6d, 0xd9, 0xcf, /* Byte value: 0x07 */ + 0x81, 0x25, 0x20, 0x62, 0x02, 0xc4, 0x46, 0x63, 0x4c, 0x42, 0xec, 0x3d, 0x46, 0xe9, 0x91, 0x1f, /* Byte value: 0x08 */ + 0x86, 0x81, 0xc5, 0xa4, 0x28, 0x8b, 0x31, 0xb0, 0xb9, 0x61, 0xee, 0xa2, 0x31, 0xaa, 0x05, 0x4f, /* Byte value: 0x09 */ + 0x02, 0x35, 0x03, 0x19, 0x1c, 0x32, 0x22, 0x17, 0x4e, 0x1a, 0x41, 0xa5, 0x22, 0x77, 0xe2, 0xba, /* Byte value: 0x0a */ + 0x6c, 0x07, 0x5a, 0xa3, 0x4d, 0x85, 0x63, 0x64, 0xd9, 0xf9, 0x28, 0xdd, 0x63, 0x75, 0x41, 0xca, /* Byte value: 0x0b */ + 0xdf, 0xaa, 0x51, 0x43, 0xb0, 0x86, 0xb1, 0x1b, 0x84, 0x12, 0x52, 0xe6, 0xb1, 0xa9, 0x16, 0x07, /* Byte value: 0x0c */ + 0x4e, 0xe4, 0x69, 0xe9, 0x52, 0x11, 0x24, 0xc0, 0xfd, 0x80, 0xf3, 0xba, 0x24, 0x7e, 0x9b, 0x81, /* Byte value: 0x0d */ + 0xe8, 0xb3, 0x9c, 0x1e, 0x79, 0x3c, 0x70, 0xc3, 0x2e, 0x82, 0x87, 0xda, 0x70, 0xa8, 0xa6, 0x3f, /* Byte value: 0x0e */ + 0x2e, 0x5d, 0x39, 0x1c, 0x57, 0x38, 0x8b, 0xd6, 0x43, 0x25, 0x9e, 0x3f, 0x8b, 0xfa, 0xd3, 0x51, /* Byte value: 0x0f */ + 0x3d, 0xf8, 0xc2, 0x20, 0xa5, 0x40, 0x6b, 0x93, 0x1f, 0xe2, 0x53, 0x48, 0x6b, 0x69, 0x5c, 0x2f, /* Byte value: 0x10 */ + 0x29, 0xf9, 0xdc, 0xda, 0x7d, 0x77, 0xfc, 0x05, 0xb6, 0x06, 0x9c, 0xa0, 0xfc, 0xb9, 0x47, 0x01, /* Byte value: 0x11 */ + 0x7d, 0x97, 0xa2, 0x86, 0xa3, 0xcf, 0xa1, 0x36, 0xcb, 0x24, 0xa4, 0x0f, 0xa1, 0x91, 0x2c, 0x0e, /* Byte value: 0x12 */ + 0x27, 0x72, 0xd5, 0x95, 0x29, 0xe9, 0x12, 0x60, 0x9f, 0x40, 0x98, 0x5d, 0x12, 0x3f, 0xac, 0xa1, /* Byte value: 0x13 */ + 0x35, 0x2c, 0xce, 0x44, 0xd5, 0x88, 0xe3, 0xcf, 0xe4, 0x8a, 0x94, 0x99, 0xe3, 0x76, 0x52, 0x82, /* Byte value: 0x14 */ + 0xcc, 0x0f, 0xaa, 0x7f, 0x42, 0xfe, 0x51, 0x5e, 0xd8, 0xd5, 0x9f, 0x91, 0x51, 0x3a, 0x99, 0x79, /* Byte value: 0x15 */ + 0xd6, 0x85, 0xbd, 0xca, 0xce, 0x57, 0x28, 0xad, 0x58, 0x77, 0x54, 0x84, 0x28, 0x6c, 0x69, 0xf7, /* Byte value: 0x16 */ + 0x87, 0x7a, 0x25, 0x49, 0x26, 0x92, 0x20, 0x5a, 0x9e, 0x6c, 0x2f, 0x11, 0x20, 0x70, 0x74, 0x12, /* Byte value: 0x17 */ + 0xc9, 0x9e, 0x4c, 0xa0, 0x74, 0x83, 0x04, 0x9a, 0x63, 0xec, 0xdc, 0xab, 0x04, 0x0e, 0xef, 0x93, /* Byte value: 0x18 */ + 0x6b, 0xa3, 0xbf, 0x65, 0x67, 0xca, 0x14, 0xb7, 0x2c, 0xda, 0x2a, 0x42, 0x14, 0x36, 0xd5, 0x9a, /* Byte value: 0x19 */ + 0x32, 0x88, 0x2b, 0x82, 0xff, 0xc7, 0x94, 0x1c, 0x11, 0xa9, 0x96, 0x06, 0x94, 0x35, 0xc6, 0xd2, /* Byte value: 0x1a */ + 0xcd, 0xf4, 0x4a, 0x92, 0x4c, 0xe7, 0x40, 0xb4, 0xff, 0xd8, 0x5e, 0x22, 0x40, 0xe0, 0xe8, 0x24, /* Byte value: 0x1b */ + 0x23, 0x18, 0xd3, 0xa7, 0x11, 0x8d, 0x56, 0x4e, 0x03, 0x74, 0x1a, 0xd4, 0x56, 0xd1, 0xab, 0x16, /* Byte value: 0x1c */ + 0x96, 0xea, 0xdd, 0x6c, 0xc8, 0xd8, 0xe2, 0x08, 0x8c, 0xb1, 0xa3, 0xc3, 0xe2, 0x94, 0x19, 0xd6, /* Byte value: 0x1d */ + 0xb4, 0x09, 0xee, 0x26, 0xd7, 0x4c, 0xa5, 0xac, 0xa8, 0xc8, 0x78, 0xa4, 0xa5, 0x9f, 0xc3, 0x9d, /* Byte value: 0x1e */ + 0x92, 0x80, 0xdb, 0x5e, 0xf0, 0xbc, 0xa6, 0x26, 0x10, 0x85, 0x21, 0x4a, 0xa6, 0x7a, 0x1e, 0x61, /* Byte value: 0x1f */ + 0xc6, 0xee, 0xa5, 0x02, 0x2e, 0x04, 0xfb, 0x15, 0x6d, 0xa7, 0x19, 0xe5, 0xfb, 0x52, 0x75, 0x6e, /* Byte value: 0x20 */ + 0x91, 0x4e, 0x38, 0xaa, 0xe2, 0x97, 0x95, 0xdb, 0x79, 0x92, 0xa1, 0x5c, 0x95, 0xd7, 0x8d, 0x86, /* Byte value: 0x21 */ + 0xe4, 0x0d, 0x96, 0x48, 0x31, 0x90, 0xbc, 0xb1, 0x49, 0xde, 0xc2, 0x82, 0xbc, 0x59, 0xaf, 0x25, /* Byte value: 0x22 */ + 0xd2, 0xef, 0xbb, 0xf8, 0xf6, 0x33, 0x6c, 0x83, 0xc4, 0x43, 0xd6, 0x0d, 0x6c, 0x82, 0x6e, 0x40, /* Byte value: 0x23 */ + 0x56, 0x5b, 0x7d, 0x45, 0xc2, 0x8a, 0x7f, 0x24, 0x33, 0x38, 0x79, 0x0a, 0x7f, 0x5f, 0x89, 0xb5, /* Byte value: 0x24 */ + 0x88, 0x0a, 0xcc, 0xeb, 0x7c, 0x15, 0xdf, 0xd5, 0x90, 0x27, 0xea, 0x5f, 0xdf, 0x2c, 0xee, 0xef, /* Byte value: 0x25 */ + 0x6f, 0xc9, 0xb9, 0x57, 0x5f, 0xae, 0x50, 0x99, 0xb0, 0xee, 0xa8, 0xcb, 0x50, 0xd8, 0xd2, 0x2d, /* Byte value: 0x26 */ + 0x10, 0x6b, 0x18, 0xc8, 0xe0, 0x53, 0xd3, 0xb8, 0x35, 0xd0, 0x4d, 0x61, 0xd3, 0x3e, 0x1c, 0x99, /* Byte value: 0x27 */ + 0x59, 0x2b, 0x94, 0xe7, 0x98, 0x0d, 0x80, 0xab, 0x3d, 0x73, 0xbc, 0x44, 0x80, 0x03, 0x13, 0x48, /* Byte value: 0x28 */ + 0x63, 0x77, 0xb3, 0x01, 0x17, 0x02, 0x9c, 0xeb, 0xd7, 0xb2, 0xed, 0x93, 0x9c, 0x29, 0xdb, 0x37, /* Byte value: 0x29 */ + 0xca, 0x50, 0xaf, 0x54, 0x66, 0xa8, 0x37, 0x67, 0x0a, 0xfb, 0x5c, 0xbd, 0x37, 0xa3, 0x7c, 0x74, /* Byte value: 0x2a */ + 0x79, 0xfd, 0xa4, 0xb4, 0x9b, 0xab, 0xe5, 0x18, 0x57, 0x10, 0x26, 0x86, 0xe5, 0x7f, 0x2b, 0xb9, /* Byte value: 0x2b */ + 0xb2, 0x56, 0xeb, 0x0d, 0xf3, 0x1a, 0xc3, 0x95, 0x7a, 0xe6, 0xbb, 0x88, 0xc3, 0x06, 0x26, 0x90, /* Byte value: 0x2c */ + 0x28, 0x02, 0x3c, 0x37, 0x73, 0x6e, 0xed, 0xef, 0x91, 0x0b, 0x5d, 0x13, 0xed, 0x63, 0x36, 0x5c, /* Byte value: 0x2d */ + 0xea, 0x86, 0x9f, 0x07, 0x65, 0x0e, 0x52, 0xd4, 0x60, 0x98, 0xc6, 0x7f, 0x52, 0xdf, 0x44, 0x85, /* Byte value: 0x2e */ + 0xec, 0xd9, 0x9a, 0x2c, 0x41, 0x58, 0x34, 0xed, 0xb2, 0xb6, 0x05, 0x53, 0x34, 0x46, 0xa1, 0x88, /* Byte value: 0x2f */ + 0x2a, 0x37, 0x3f, 0x2e, 0x6f, 0x5c, 0xcf, 0xf8, 0xdf, 0x11, 0x1c, 0xb6, 0xcf, 0x14, 0xd4, 0xe6, /* Byte value: 0x30 */ + 0xc4, 0xdb, 0xa6, 0x1b, 0x32, 0x36, 0xd9, 0x02, 0x23, 0xbd, 0x58, 0x40, 0xd9, 0x25, 0x97, 0xd4, /* Byte value: 0x31 */ + 0xa7, 0xac, 0x15, 0x1a, 0x25, 0x34, 0x45, 0xe9, 0xf4, 0x0f, 0xb5, 0xd3, 0x45, 0x0c, 0x4c, 0xe3, /* Byte value: 0x32 */ + 0x17, 0xcf, 0xfd, 0x0e, 0xca, 0x1c, 0xa4, 0x6b, 0xc0, 0xf3, 0x4f, 0xfe, 0xa4, 0x7d, 0x88, 0xc9, /* Byte value: 0x33 */ + 0x5f, 0x74, 0x91, 0xcc, 0xbc, 0x5b, 0xe6, 0x92, 0xef, 0x5d, 0x7f, 0x68, 0xe6, 0x9a, 0xf6, 0x45, /* Byte value: 0x34 */ + 0x62, 0x8c, 0x53, 0xec, 0x19, 0x1b, 0x8d, 0x01, 0xf0, 0xbf, 0x2c, 0x20, 0x8d, 0xf3, 0xaa, 0x6a, /* Byte value: 0x35 */ + 0x5d, 0x41, 0x92, 0xd5, 0xa0, 0x69, 0xc4, 0x85, 0xa1, 0x47, 0x3e, 0xcd, 0xc4, 0xed, 0x14, 0xff, /* Byte value: 0x36 */ + 0x06, 0x5f, 0x05, 0x2b, 0x24, 0x56, 0x66, 0x39, 0xd2, 0x2e, 0xc3, 0x2c, 0x66, 0x99, 0xe5, 0x0d, /* Byte value: 0x37 */ + 0x3a, 0x5c, 0x27, 0xe6, 0x8f, 0x0f, 0x1c, 0x40, 0xea, 0xc1, 0x51, 0xd7, 0x1c, 0x2a, 0xc8, 0x7f, /* Byte value: 0x38 */ + 0x39, 0x92, 0xc4, 0x12, 0x9d, 0x24, 0x2f, 0xbd, 0x83, 0xd6, 0xd1, 0xc1, 0x2f, 0x87, 0x5b, 0x98, /* Byte value: 0x39 */ + 0xa1, 0xf3, 0x10, 0x31, 0x01, 0x62, 0x23, 0xd0, 0x26, 0x21, 0x76, 0xff, 0x23, 0x95, 0xa9, 0xee, /* Byte value: 0x3a */ + 0x07, 0xa4, 0xe5, 0xc6, 0x2a, 0x4f, 0x77, 0xd3, 0xf5, 0x23, 0x02, 0x9f, 0x77, 0x43, 0x94, 0x50, /* Byte value: 0x3b */ + 0x6d, 0xfc, 0xba, 0x4e, 0x43, 0x9c, 0x72, 0x8e, 0xfe, 0xf4, 0xe9, 0x6e, 0x72, 0xaf, 0x30, 0x97, /* Byte value: 0x3c */ + 0x21, 0x2d, 0xd0, 0xbe, 0x0d, 0xbf, 0x74, 0x59, 0x4d, 0x6e, 0x5b, 0x71, 0x74, 0xa6, 0x49, 0xac, /* Byte value: 0x3d */ + 0xba, 0x82, 0xe7, 0x69, 0x83, 0xd2, 0x4b, 0xc9, 0x81, 0x8e, 0x7c, 0x59, 0x4b, 0x19, 0x28, 0x3d, /* Byte value: 0x3e */ + 0x69, 0x96, 0xbc, 0x7c, 0x7b, 0xf8, 0x36, 0xa0, 0x62, 0xc0, 0x6b, 0xe7, 0x36, 0x41, 0x37, 0x20, /* Byte value: 0x3f */ + 0x37, 0x19, 0xcd, 0x5d, 0xc9, 0xba, 0xc1, 0xd8, 0xaa, 0x90, 0xd5, 0x3c, 0xc1, 0x01, 0xb0, 0x38, /* Byte value: 0x40 */ + 0x3e, 0x36, 0x21, 0xd4, 0xb7, 0x6b, 0x58, 0x6e, 0x76, 0xf5, 0xd3, 0x5e, 0x58, 0xc4, 0xcf, 0xc8, /* Byte value: 0x41 */ + 0x25, 0x47, 0xd6, 0x8c, 0x35, 0xdb, 0x30, 0x77, 0xd1, 0x5a, 0xd9, 0xf8, 0x30, 0x48, 0x4e, 0x1b, /* Byte value: 0x42 */ + 0xc1, 0x4a, 0x40, 0xc4, 0x04, 0x4b, 0x8c, 0xc6, 0x98, 0x84, 0x1b, 0x7a, 0x8c, 0x11, 0xe1, 0x3e, /* Byte value: 0x43 */ + 0xf7, 0xa8, 0x6d, 0x74, 0xc3, 0xe8, 0x5c, 0xf4, 0x15, 0x19, 0x0f, 0xf5, 0x5c, 0xca, 0x20, 0x5b, /* Byte value: 0x44 */ + 0xd4, 0xb0, 0xbe, 0xd3, 0xd2, 0x65, 0x0a, 0xba, 0x16, 0x6d, 0x15, 0x21, 0x0a, 0x1b, 0x8b, 0x4d, /* Byte value: 0x45 */ + 0x70, 0xd2, 0x48, 0x3d, 0xe5, 0x7a, 0x7c, 0xae, 0x8b, 0x75, 0x20, 0xe4, 0x7c, 0xba, 0x54, 0x49, /* Byte value: 0x46 */ + 0xf9, 0x23, 0x64, 0x3b, 0x97, 0x76, 0xb2, 0x91, 0x3c, 0x5f, 0x0b, 0x08, 0xb2, 0x4c, 0xcb, 0xfb, /* Byte value: 0x47 */ + 0x9b, 0xaf, 0x37, 0xd7, 0x8e, 0x6d, 0x3f, 0x90, 0xcc, 0xe0, 0x27, 0x28, 0x3f, 0xbf, 0x61, 0x91, /* Byte value: 0x48 */ + 0x30, 0xbd, 0x28, 0x9b, 0xe3, 0xf5, 0xb6, 0x0b, 0x5f, 0xb3, 0xd7, 0xa3, 0xb6, 0x42, 0x24, 0x68, /* Byte value: 0x49 */ + 0xf8, 0xd8, 0x84, 0xd6, 0x99, 0x6f, 0xa3, 0x7b, 0x1b, 0x52, 0xca, 0xbb, 0xa3, 0x96, 0xba, 0xa6, /* Byte value: 0x4a */ + 0x4a, 0x8e, 0x6f, 0xdb, 0x6a, 0x75, 0x60, 0xee, 0x61, 0xb4, 0x71, 0x33, 0x60, 0x90, 0x9c, 0x36, /* Byte value: 0x4b */ + 0x2d, 0x93, 0xda, 0xe8, 0x45, 0x13, 0xb8, 0x2b, 0x2a, 0x32, 0x1e, 0x29, 0xb8, 0x57, 0x40, 0xb6, /* Byte value: 0x4c */ + 0xbf, 0x13, 0x01, 0xb6, 0xb5, 0xaf, 0x1e, 0x0d, 0x3a, 0xb7, 0x3f, 0x63, 0x1e, 0x2d, 0x5e, 0xd7, /* Byte value: 0x4d */ + 0x40, 0x6f, 0x60, 0xa6, 0x06, 0x8f, 0xca, 0xa5, 0xd4, 0xc6, 0xf7, 0x47, 0xca, 0xf8, 0x70, 0x21, /* Byte value: 0x4e */ + 0x49, 0x40, 0x8c, 0x2f, 0x78, 0x5e, 0x53, 0x13, 0x08, 0xa3, 0xf1, 0x25, 0x53, 0x3d, 0x0f, 0xd1, /* Byte value: 0x4f */ + 0x5e, 0x8f, 0x71, 0x21, 0xb2, 0x42, 0xf7, 0x78, 0xc8, 0x50, 0xbe, 0xdb, 0xf7, 0x40, 0x87, 0x18, /* Byte value: 0x50 */ + 0x46, 0x30, 0x65, 0x8d, 0x22, 0xd9, 0xac, 0x9c, 0x06, 0xe8, 0x34, 0x6b, 0xac, 0x61, 0x95, 0x2c, /* Byte value: 0x51 */ + 0xae, 0x83, 0xf9, 0x93, 0x5b, 0xe5, 0xdc, 0x5f, 0x28, 0x6a, 0xb3, 0xb1, 0xdc, 0xc9, 0x33, 0x13, /* Byte value: 0x52 */ + 0x65, 0x28, 0xb6, 0x2a, 0x33, 0x54, 0xfa, 0xd2, 0x05, 0x9c, 0x2e, 0xbf, 0xfa, 0xb0, 0x3e, 0x3a, /* Byte value: 0x53 */ + 0x24, 0xbc, 0x36, 0x61, 0x3b, 0xc2, 0x21, 0x9d, 0xf6, 0x57, 0x18, 0x4b, 0x21, 0x92, 0x3f, 0x46, /* Byte value: 0x54 */ + 0x5c, 0xba, 0x72, 0x38, 0xae, 0x70, 0xd5, 0x6f, 0x86, 0x4a, 0xff, 0x7e, 0xd5, 0x37, 0x65, 0xa2, /* Byte value: 0x55 */ + 0x72, 0xe7, 0x4b, 0x24, 0xf9, 0x48, 0x5e, 0xb9, 0xc5, 0x6f, 0x61, 0x41, 0x5e, 0xcd, 0xb6, 0xf3, /* Byte value: 0x56 */ + 0x97, 0x11, 0x3d, 0x81, 0xc6, 0xc1, 0xf3, 0xe2, 0xab, 0xbc, 0x62, 0x70, 0xf3, 0x4e, 0x68, 0x8b, /* Byte value: 0x57 */ + 0xaf, 0x78, 0x19, 0x7e, 0x55, 0xfc, 0xcd, 0xb5, 0x0f, 0x67, 0x72, 0x02, 0xcd, 0x13, 0x42, 0x4e, /* Byte value: 0x58 */ + 0x0d, 0x45, 0xea, 0xbb, 0x46, 0xb5, 0xdd, 0x98, 0x40, 0x51, 0x84, 0xeb, 0xdd, 0x2b, 0x78, 0x47, /* Byte value: 0x59 */ + 0xb9, 0x4c, 0x04, 0x9d, 0x91, 0xf9, 0x78, 0x34, 0xe8, 0x99, 0xfc, 0x4f, 0x78, 0xb4, 0xbb, 0xda, /* Byte value: 0x5a */ + 0x45, 0xfe, 0x86, 0x79, 0x30, 0xf2, 0x9f, 0x61, 0x6f, 0xff, 0xb4, 0x7d, 0x9f, 0xcc, 0x06, 0xcb, /* Byte value: 0x5b */ + 0x76, 0x8d, 0x4d, 0x16, 0xc1, 0x2c, 0x1a, 0x97, 0x59, 0x5b, 0xe3, 0xc8, 0x1a, 0x23, 0xb1, 0x44, /* Byte value: 0x5c */ + 0x43, 0xa1, 0x83, 0x52, 0x14, 0xa4, 0xf9, 0x58, 0xbd, 0xd1, 0x77, 0x51, 0xf9, 0x55, 0xe3, 0xc6, /* Byte value: 0x5d */ + 0x51, 0xff, 0x98, 0x83, 0xe8, 0xc5, 0x08, 0xf7, 0xc6, 0x1b, 0x7b, 0x95, 0x08, 0x1c, 0x1d, 0xe5, /* Byte value: 0x5e */ + 0x85, 0x4f, 0x26, 0x50, 0x3a, 0xa0, 0x02, 0x4d, 0xd0, 0x76, 0x6e, 0xb4, 0x02, 0x07, 0x96, 0xa8, /* Byte value: 0x5f */ + 0x5a, 0xe5, 0x77, 0x13, 0x8a, 0x26, 0xb3, 0x56, 0x54, 0x64, 0x3c, 0x52, 0xb3, 0xae, 0x80, 0xaf, /* Byte value: 0x60 */ + 0x7c, 0x6c, 0x42, 0x6b, 0xad, 0xd6, 0xb0, 0xdc, 0xec, 0x29, 0x65, 0xbc, 0xb0, 0x4b, 0x5d, 0x53, /* Byte value: 0x61 */ + 0xd0, 0xda, 0xb8, 0xe1, 0xea, 0x01, 0x4e, 0x94, 0x8a, 0x59, 0x97, 0xa8, 0x4e, 0xf5, 0x8c, 0xfa, /* Byte value: 0x62 */ + 0x08, 0xd4, 0x0c, 0x64, 0x70, 0xc8, 0x88, 0x5c, 0xfb, 0x68, 0xc7, 0xd1, 0x88, 0x1f, 0x0e, 0xad, /* Byte value: 0x63 */ + 0x05, 0x91, 0xe6, 0xdf, 0x36, 0x7d, 0x55, 0xc4, 0xbb, 0x39, 0x43, 0x3a, 0x55, 0x34, 0x76, 0xea, /* Byte value: 0x64 */ + 0xb8, 0xb7, 0xe4, 0x70, 0x9f, 0xe0, 0x69, 0xde, 0xcf, 0x94, 0x3d, 0xfc, 0x69, 0x6e, 0xca, 0x87, /* Byte value: 0x65 */ + 0x0f, 0x70, 0xe9, 0xa2, 0x5a, 0x87, 0xff, 0x8f, 0x0e, 0x4b, 0xc5, 0x4e, 0xff, 0x5c, 0x9a, 0xfd, /* Byte value: 0x66 */ + 0x7a, 0x33, 0x47, 0x40, 0x89, 0x80, 0xd6, 0xe5, 0x3e, 0x07, 0xa6, 0x90, 0xd6, 0xd2, 0xb8, 0x5e, /* Byte value: 0x67 */ + 0xff, 0x7c, 0x61, 0x10, 0xb3, 0x20, 0xd4, 0xa8, 0xee, 0x71, 0xc8, 0x24, 0xd4, 0xd5, 0x2e, 0xf6, /* Byte value: 0x68 */ + 0xda, 0x3b, 0xb7, 0x9c, 0x86, 0xfb, 0xe4, 0xdf, 0x3f, 0x2b, 0x11, 0xdc, 0xe4, 0x9d, 0x60, 0xed, /* Byte value: 0x69 */ + 0xdb, 0xc0, 0x57, 0x71, 0x88, 0xe2, 0xf5, 0x35, 0x18, 0x26, 0xd0, 0x6f, 0xf5, 0x47, 0x11, 0xb0, /* Byte value: 0x6a */ + 0xf2, 0x39, 0x8b, 0xab, 0xf5, 0x95, 0x09, 0x30, 0xae, 0x20, 0x4c, 0xcf, 0x09, 0xfe, 0x56, 0xb1, /* Byte value: 0x6b */ + 0x99, 0x9a, 0x34, 0xce, 0x92, 0x5f, 0x1d, 0x87, 0x82, 0xfa, 0x66, 0x8d, 0x1d, 0xc8, 0x83, 0x2b, /* Byte value: 0x6c */ + 0xa9, 0x27, 0x1c, 0x55, 0x71, 0xaa, 0xab, 0x8c, 0xdd, 0x49, 0xb1, 0x2e, 0xab, 0x8a, 0xa7, 0x43, /* Byte value: 0x6d */ + 0x54, 0x6e, 0x7e, 0x5c, 0xde, 0xb8, 0x5d, 0x33, 0x7d, 0x22, 0x38, 0xaf, 0x5d, 0x28, 0x6b, 0x0f, /* Byte value: 0x6e */ + 0x95, 0x24, 0x3e, 0x98, 0xda, 0xf3, 0xd1, 0xf5, 0xe5, 0xa6, 0x23, 0xd5, 0xd1, 0x39, 0x8a, 0x31, /* Byte value: 0x6f */ + 0x68, 0x6d, 0x5c, 0x91, 0x75, 0xe1, 0x27, 0x4a, 0x45, 0xcd, 0xaa, 0x54, 0x27, 0x9b, 0x46, 0x7d, /* Byte value: 0x70 */ + 0x1c, 0xd5, 0x12, 0x9e, 0xa8, 0xff, 0x1f, 0xca, 0x52, 0x8c, 0x08, 0x39, 0x1f, 0xcf, 0x15, 0x83, /* Byte value: 0x71 */ + 0x6a, 0x58, 0x5f, 0x88, 0x69, 0xd3, 0x05, 0x5d, 0x0b, 0xd7, 0xeb, 0xf1, 0x05, 0xec, 0xa4, 0xc7, /* Byte value: 0x72 */ + 0x0e, 0x8b, 0x09, 0x4f, 0x54, 0x9e, 0xee, 0x65, 0x29, 0x46, 0x04, 0xfd, 0xee, 0x86, 0xeb, 0xa0, /* Byte value: 0x73 */ + 0x93, 0x7b, 0x3b, 0xb3, 0xfe, 0xa5, 0xb7, 0xcc, 0x37, 0x88, 0xe0, 0xf9, 0xb7, 0xa0, 0x6f, 0x3c, /* Byte value: 0x74 */ + 0xa8, 0xdc, 0xfc, 0xb8, 0x7f, 0xb3, 0xba, 0x66, 0xfa, 0x44, 0x70, 0x9d, 0xba, 0x50, 0xd6, 0x1e, /* Byte value: 0x75 */ + 0xcf, 0xc1, 0x49, 0x8b, 0x50, 0xd5, 0x62, 0xa3, 0xb1, 0xc2, 0x1f, 0x87, 0x62, 0x97, 0x0a, 0x9e, /* Byte value: 0x76 */ + 0xc2, 0x84, 0xa3, 0x30, 0x16, 0x60, 0xbf, 0x3b, 0xf1, 0x93, 0x9b, 0x6c, 0xbf, 0xbc, 0x72, 0xd9, /* Byte value: 0x77 */ + 0xcb, 0xab, 0x4f, 0xb9, 0x68, 0xb1, 0x26, 0x8d, 0x2d, 0xf6, 0x9d, 0x0e, 0x26, 0x79, 0x0d, 0x29, /* Byte value: 0x78 */ + 0x8e, 0x55, 0xc9, 0xc0, 0x58, 0x43, 0xb9, 0xec, 0x42, 0x09, 0x29, 0x73, 0xb9, 0xb5, 0x0b, 0xe2, /* Byte value: 0x79 */ + 0x33, 0x73, 0xcb, 0x6f, 0xf1, 0xde, 0x85, 0xf6, 0x36, 0xa4, 0x57, 0xb5, 0x85, 0xef, 0xb7, 0x8f, /* Byte value: 0x7a */ + 0x15, 0xfa, 0xfe, 0x17, 0xd6, 0x2e, 0x86, 0x7c, 0x8e, 0xe9, 0x0e, 0x5b, 0x86, 0x0a, 0x6a, 0x73, /* Byte value: 0x7b */ + 0x89, 0xf1, 0x2c, 0x06, 0x72, 0x0c, 0xce, 0x3f, 0xb7, 0x2a, 0x2b, 0xec, 0xce, 0xf6, 0x9f, 0xb2, /* Byte value: 0x7c */ + 0xd1, 0x21, 0x58, 0x0c, 0xe4, 0x18, 0x5f, 0x7e, 0xad, 0x54, 0x56, 0x1b, 0x5f, 0x2f, 0xfd, 0xa7, /* Byte value: 0x7d */ + 0x1a, 0x8a, 0x17, 0xb5, 0x8c, 0xa9, 0x79, 0xf3, 0x80, 0xa2, 0xcb, 0x15, 0x79, 0x56, 0xf0, 0x8e, /* Byte value: 0x7e */ + 0x98, 0x61, 0xd4, 0x23, 0x9c, 0x46, 0x0c, 0x6d, 0xa5, 0xf7, 0xa7, 0x3e, 0x0c, 0x12, 0xf2, 0x76, /* Byte value: 0x7f */ + 0xce, 0x3a, 0xa9, 0x66, 0x5e, 0xcc, 0x73, 0x49, 0x96, 0xcf, 0xde, 0x34, 0x73, 0x4d, 0x7b, 0xc3, /* Byte value: 0x80 */ + 0x1b, 0x71, 0xf7, 0x58, 0x82, 0xb0, 0x68, 0x19, 0xa7, 0xaf, 0x0a, 0xa6, 0x68, 0x8c, 0x81, 0xd3, /* Byte value: 0x81 */ + 0xe3, 0xa9, 0x73, 0x8e, 0x1b, 0xdf, 0xcb, 0x62, 0xbc, 0xfd, 0xc0, 0x1d, 0xcb, 0x1a, 0x3b, 0x75, /* Byte value: 0x82 */ + 0x9d, 0xf0, 0x32, 0xfc, 0xaa, 0x3b, 0x59, 0xa9, 0x1e, 0xce, 0xe4, 0x04, 0x59, 0x26, 0x84, 0x9c, /* Byte value: 0x83 */ + 0x8c, 0x60, 0xca, 0xd9, 0x44, 0x71, 0x9b, 0xfb, 0x0c, 0x13, 0x68, 0xd6, 0x9b, 0xc2, 0xe9, 0x58, /* Byte value: 0x84 */ + 0x6e, 0x32, 0x59, 0xba, 0x51, 0xb7, 0x41, 0x73, 0x97, 0xe3, 0x69, 0x78, 0x41, 0x02, 0xa3, 0x70, /* Byte value: 0x85 */ + 0x66, 0xe6, 0x55, 0xde, 0x21, 0x7f, 0xc9, 0x2f, 0x6c, 0x8b, 0xae, 0xa9, 0xc9, 0x1d, 0xad, 0xdd, /* Byte value: 0x86 */ + 0x58, 0xd0, 0x74, 0x0a, 0x96, 0x14, 0x91, 0x41, 0x1a, 0x7e, 0x7d, 0xf7, 0x91, 0xd9, 0x62, 0x15, /* Byte value: 0x87 */ + 0x9a, 0x54, 0xd7, 0x3a, 0x80, 0x74, 0x2e, 0x7a, 0xeb, 0xed, 0xe6, 0x9b, 0x2e, 0x65, 0x10, 0xcc, /* Byte value: 0x88 */ + 0x47, 0xcb, 0x85, 0x60, 0x2c, 0xc0, 0xbd, 0x76, 0x21, 0xe5, 0xf5, 0xd8, 0xbd, 0xbb, 0xe4, 0x71, /* Byte value: 0x89 */ + 0x18, 0xbf, 0x14, 0xac, 0x90, 0x9b, 0x5b, 0xe4, 0xce, 0xb8, 0x8a, 0xb0, 0x5b, 0x21, 0x12, 0x34, /* Byte value: 0x8a */ + 0xad, 0x4d, 0x1a, 0x67, 0x49, 0xce, 0xef, 0xa2, 0x41, 0x7d, 0x33, 0xa7, 0xef, 0x64, 0xa0, 0xf4, /* Byte value: 0x8b */ + 0x1e, 0xe0, 0x11, 0x87, 0xb4, 0xcd, 0x3d, 0xdd, 0x1c, 0x96, 0x49, 0x9c, 0x3d, 0xb8, 0xf7, 0x39, /* Byte value: 0x8c */ + 0xdc, 0x64, 0xb2, 0xb7, 0xa2, 0xad, 0x82, 0xe6, 0xed, 0x05, 0xd2, 0xf0, 0x82, 0x04, 0x85, 0xe0, /* Byte value: 0x8d */ + 0xa4, 0x62, 0xf6, 0xee, 0x37, 0x1f, 0x76, 0x14, 0x9d, 0x18, 0x35, 0xc5, 0x76, 0xa1, 0xdf, 0x04, /* Byte value: 0x8e */ + 0x34, 0xd7, 0x2e, 0xa9, 0xdb, 0x91, 0xf2, 0x25, 0xc3, 0x87, 0x55, 0x2a, 0xf2, 0xac, 0x23, 0xdf, /* Byte value: 0x8f */ + 0xfd, 0x49, 0x62, 0x09, 0xaf, 0x12, 0xf6, 0xbf, 0xa0, 0x6b, 0x89, 0x81, 0xf6, 0xa2, 0xcc, 0x4c, /* Byte value: 0x90 */ + 0x9f, 0xc5, 0x31, 0xe5, 0xb6, 0x09, 0x7b, 0xbe, 0x50, 0xd4, 0xa5, 0xa1, 0x7b, 0x51, 0x66, 0x26, /* Byte value: 0x91 */ + 0x8f, 0xae, 0x29, 0x2d, 0x56, 0x5a, 0xa8, 0x06, 0x65, 0x04, 0xe8, 0xc0, 0xa8, 0x6f, 0x7a, 0xbf, /* Byte value: 0x92 */ + 0xed, 0x22, 0x7a, 0xc1, 0x4f, 0x41, 0x25, 0x07, 0x95, 0xbb, 0xc4, 0xe0, 0x25, 0x9c, 0xd0, 0xd5, /* Byte value: 0x93 */ + 0xf1, 0xf7, 0x68, 0x5f, 0xe7, 0xbe, 0x3a, 0xcd, 0xc7, 0x37, 0xcc, 0xd9, 0x3a, 0x53, 0xc5, 0x56, /* Byte value: 0x94 */ + 0xe5, 0xf6, 0x76, 0xa5, 0x3f, 0x89, 0xad, 0x5b, 0x6e, 0xd3, 0x03, 0x31, 0xad, 0x83, 0xde, 0x78, /* Byte value: 0x95 */ + 0x1f, 0x1b, 0xf1, 0x6a, 0xba, 0xd4, 0x2c, 0x37, 0x3b, 0x9b, 0x88, 0x2f, 0x2c, 0x62, 0x86, 0x64, /* Byte value: 0x96 */ + 0x82, 0xeb, 0xc3, 0x96, 0x10, 0xef, 0x75, 0x9e, 0x25, 0x55, 0x6c, 0x2b, 0x75, 0x44, 0x02, 0xf8, /* Byte value: 0x97 */ + 0xf0, 0x0c, 0x88, 0xb2, 0xe9, 0xa7, 0x2b, 0x27, 0xe0, 0x3a, 0x0d, 0x6a, 0x2b, 0x89, 0xb4, 0x0b, /* Byte value: 0x98 */ + 0xe6, 0x38, 0x95, 0x51, 0x2d, 0xa2, 0x9e, 0xa6, 0x07, 0xc4, 0x83, 0x27, 0x9e, 0x2e, 0x4d, 0x9f, /* Byte value: 0x99 */ + 0xc3, 0x7f, 0x43, 0xdd, 0x18, 0x79, 0xae, 0xd1, 0xd6, 0x9e, 0x5a, 0xdf, 0xae, 0x66, 0x03, 0x84, /* Byte value: 0x9a */ + 0xef, 0x17, 0x79, 0xd8, 0x53, 0x73, 0x07, 0x10, 0xdb, 0xa1, 0x85, 0x45, 0x07, 0xeb, 0x32, 0x6f, /* Byte value: 0x9b */ + 0x1d, 0x2e, 0xf2, 0x73, 0xa6, 0xe6, 0x0e, 0x20, 0x75, 0x81, 0xc9, 0x8a, 0x0e, 0x15, 0x64, 0xde, /* Byte value: 0x9c */ + 0xc0, 0xb1, 0xa0, 0x29, 0x0a, 0x52, 0x9d, 0x2c, 0xbf, 0x89, 0xda, 0xc9, 0x9d, 0xcb, 0x90, 0x63, /* Byte value: 0x9d */ + 0xf6, 0x53, 0x8d, 0x99, 0xcd, 0xf1, 0x4d, 0x1e, 0x32, 0x14, 0xce, 0x46, 0x4d, 0x10, 0x51, 0x06, /* Byte value: 0x9e */ + 0x4b, 0x75, 0x8f, 0x36, 0x64, 0x6c, 0x71, 0x04, 0x46, 0xb9, 0xb0, 0x80, 0x71, 0x4a, 0xed, 0x6b, /* Byte value: 0x9f */ + 0xee, 0xec, 0x99, 0x35, 0x5d, 0x6a, 0x16, 0xfa, 0xfc, 0xac, 0x44, 0xf6, 0x16, 0x31, 0x43, 0x32, /* Byte value: 0xa0 */ + 0xe9, 0x48, 0x7c, 0xf3, 0x77, 0x25, 0x61, 0x29, 0x09, 0x8f, 0x46, 0x69, 0x61, 0x72, 0xd7, 0x62, /* Byte value: 0xa1 */ + 0xe2, 0x52, 0x93, 0x63, 0x15, 0xc6, 0xda, 0x88, 0x9b, 0xf0, 0x01, 0xae, 0xda, 0xc0, 0x4a, 0x28, /* Byte value: 0xa2 */ + 0x16, 0x34, 0x1d, 0xe3, 0xc4, 0x05, 0xb5, 0x81, 0xe7, 0xfe, 0x8e, 0x4d, 0xb5, 0xa7, 0xf9, 0x94, /* Byte value: 0xa3 */ + 0x53, 0xca, 0x9b, 0x9a, 0xf4, 0xf7, 0x2a, 0xe0, 0x88, 0x01, 0x3a, 0x30, 0x2a, 0x6b, 0xff, 0x5f, /* Byte value: 0xa4 */ + 0xdd, 0x9f, 0x52, 0x5a, 0xac, 0xb4, 0x93, 0x0c, 0xca, 0x08, 0x13, 0x43, 0x93, 0xde, 0xf4, 0xbd, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x01, 0xfb, 0xe0, 0xed, 0x0e, 0x19, 0x11, 0xea, 0x27, 0x0d, 0xc1, 0xb3, 0x11, 0xda, 0x71, 0x5d, /* Byte value: 0xa7 */ + 0x8b, 0xc4, 0x2f, 0x1f, 0x6e, 0x3e, 0xec, 0x28, 0xf9, 0x30, 0x6a, 0x49, 0xec, 0x81, 0x7d, 0x08, /* Byte value: 0xa8 */ + 0xf3, 0xc2, 0x6b, 0x46, 0xfb, 0x8c, 0x18, 0xda, 0x89, 0x2d, 0x8d, 0x7c, 0x18, 0x24, 0x27, 0xec, /* Byte value: 0xa9 */ + 0xde, 0x51, 0xb1, 0xae, 0xbe, 0x9f, 0xa0, 0xf1, 0xa3, 0x1f, 0x93, 0x55, 0xa0, 0x73, 0x67, 0x5a, /* Byte value: 0xaa */ + 0x57, 0xa0, 0x9d, 0xa8, 0xcc, 0x93, 0x6e, 0xce, 0x14, 0x35, 0xb8, 0xb9, 0x6e, 0x85, 0xf8, 0xe8, /* Byte value: 0xab */ + 0x9e, 0x3e, 0xd1, 0x08, 0xb8, 0x10, 0x6a, 0x54, 0x77, 0xd9, 0x64, 0x12, 0x6a, 0x8b, 0x17, 0x7b, /* Byte value: 0xac */ + 0x38, 0x69, 0x24, 0xff, 0x93, 0x3d, 0x3e, 0x57, 0xa4, 0xdb, 0x10, 0x72, 0x3e, 0x5d, 0x2a, 0xc5, /* Byte value: 0xad */ + 0xbe, 0xe8, 0xe1, 0x5b, 0xbb, 0xb6, 0x0f, 0xe7, 0x1d, 0xba, 0xfe, 0xd0, 0x0f, 0xf7, 0x2f, 0x8a, /* Byte value: 0xae */ + 0x8a, 0x3f, 0xcf, 0xf2, 0x60, 0x27, 0xfd, 0xc2, 0xde, 0x3d, 0xab, 0xfa, 0xfd, 0x5b, 0x0c, 0x55, /* Byte value: 0xaf */ + 0x4f, 0x1f, 0x89, 0x04, 0x5c, 0x08, 0x35, 0x2a, 0xda, 0x8d, 0x32, 0x09, 0x35, 0xa4, 0xea, 0xdc, /* Byte value: 0xb0 */ + 0xa2, 0x3d, 0xf3, 0xc5, 0x13, 0x49, 0x10, 0x2d, 0x4f, 0x36, 0xf6, 0xe9, 0x10, 0x38, 0x3a, 0x09, /* Byte value: 0xb1 */ + 0x61, 0x42, 0xb0, 0x18, 0x0b, 0x30, 0xbe, 0xfc, 0x99, 0xa8, 0xac, 0x36, 0xbe, 0x5e, 0x39, 0x8d, /* Byte value: 0xb2 */ + 0x9c, 0x0b, 0xd2, 0x11, 0xa4, 0x22, 0x48, 0x43, 0x39, 0xc3, 0x25, 0xb7, 0x48, 0xfc, 0xf5, 0xc1, /* Byte value: 0xb3 */ + 0x26, 0x89, 0x35, 0x78, 0x27, 0xf0, 0x03, 0x8a, 0xb8, 0x4d, 0x59, 0xee, 0x03, 0xe5, 0xdd, 0xfc, /* Byte value: 0xb4 */ + 0x60, 0xb9, 0x50, 0xf5, 0x05, 0x29, 0xaf, 0x16, 0xbe, 0xa5, 0x6d, 0x85, 0xaf, 0x84, 0x48, 0xd0, /* Byte value: 0xb5 */ + 0x78, 0x06, 0x44, 0x59, 0x95, 0xb2, 0xf4, 0xf2, 0x70, 0x1d, 0xe7, 0x35, 0xf4, 0xa5, 0x5a, 0xe4, /* Byte value: 0xb6 */ + 0xd9, 0xf5, 0x54, 0x68, 0x94, 0xd0, 0xd7, 0x22, 0x56, 0x3c, 0x91, 0xca, 0xd7, 0x30, 0xf3, 0x0a, /* Byte value: 0xb7 */ + 0x3c, 0x03, 0x22, 0xcd, 0xab, 0x59, 0x7a, 0x79, 0x38, 0xef, 0x92, 0xfb, 0x7a, 0xb3, 0x2d, 0x72, /* Byte value: 0xb8 */ + 0xfb, 0x16, 0x67, 0x22, 0x8b, 0x44, 0x90, 0x86, 0x72, 0x45, 0x4a, 0xad, 0x90, 0x3b, 0x29, 0x41, /* Byte value: 0xb9 */ + 0xc7, 0x15, 0x45, 0xef, 0x20, 0x1d, 0xea, 0xff, 0x4a, 0xaa, 0xd8, 0x56, 0xea, 0x88, 0x04, 0x33, /* Byte value: 0xba */ + 0xfe, 0x87, 0x81, 0xfd, 0xbd, 0x39, 0xc5, 0x42, 0xc9, 0x7c, 0x09, 0x97, 0xc5, 0x0f, 0x5f, 0xab, /* Byte value: 0xbb */ + 0x36, 0xe2, 0x2d, 0xb0, 0xc7, 0xa3, 0xd0, 0x32, 0x8d, 0x9d, 0x14, 0x8f, 0xd0, 0xdb, 0xc1, 0x65, /* Byte value: 0xbc */ + 0xa0, 0x08, 0xf0, 0xdc, 0x0f, 0x7b, 0x32, 0x3a, 0x01, 0x2c, 0xb7, 0x4c, 0x32, 0x4f, 0xd8, 0xb3, /* Byte value: 0xbd */ + 0x50, 0x04, 0x78, 0x6e, 0xe6, 0xdc, 0x19, 0x1d, 0xe1, 0x16, 0xba, 0x26, 0x19, 0xc6, 0x6c, 0xb8, /* Byte value: 0xbe */ + 0xf5, 0x9d, 0x6e, 0x6d, 0xdf, 0xda, 0x7e, 0xe3, 0x5b, 0x03, 0x4e, 0x50, 0x7e, 0xbd, 0xc2, 0xe1, /* Byte value: 0xbf */ + 0xaa, 0xe9, 0xff, 0xa1, 0x63, 0x81, 0x98, 0x71, 0xb4, 0x5e, 0x31, 0x38, 0x98, 0x27, 0x34, 0xa4, /* Byte value: 0xc0 */ + 0xd3, 0x14, 0x5b, 0x15, 0xf8, 0x2a, 0x7d, 0x69, 0xe3, 0x4e, 0x17, 0xbe, 0x7d, 0x58, 0x1f, 0x1d, /* Byte value: 0xc1 */ + 0x41, 0x94, 0x80, 0x4b, 0x08, 0x96, 0xdb, 0x4f, 0xf3, 0xcb, 0x36, 0xf4, 0xdb, 0x22, 0x01, 0x7c, /* Byte value: 0xc2 */ + 0x7f, 0xa2, 0xa1, 0x9f, 0xbf, 0xfd, 0x83, 0x21, 0x85, 0x3e, 0xe5, 0xaa, 0x83, 0xe6, 0xce, 0xb4, /* Byte value: 0xc3 */ + 0xa5, 0x99, 0x16, 0x03, 0x39, 0x06, 0x67, 0xfe, 0xba, 0x15, 0xf4, 0x76, 0x67, 0x7b, 0xae, 0x59, /* Byte value: 0xc4 */ + 0xb0, 0x63, 0xe8, 0x14, 0xef, 0x28, 0xe1, 0x82, 0x34, 0xfc, 0xfa, 0x2d, 0xe1, 0x71, 0xc4, 0x2a, /* Byte value: 0xc5 */ + 0x48, 0xbb, 0x6c, 0xc2, 0x76, 0x47, 0x42, 0xf9, 0x2f, 0xae, 0x30, 0x96, 0x42, 0xe7, 0x7e, 0x8c, /* Byte value: 0xc6 */ + 0x20, 0xd6, 0x30, 0x53, 0x03, 0xa6, 0x65, 0xb3, 0x6a, 0x63, 0x9a, 0xc2, 0x65, 0x7c, 0x38, 0xf1, /* Byte value: 0xc7 */ + 0xf4, 0x66, 0x8e, 0x80, 0xd1, 0xc3, 0x6f, 0x09, 0x7c, 0x0e, 0x8f, 0xe3, 0x6f, 0x67, 0xb3, 0xbc, /* Byte value: 0xc8 */ + 0x0b, 0x1a, 0xef, 0x90, 0x62, 0xe3, 0xbb, 0xa1, 0x92, 0x7f, 0x47, 0xc7, 0xbb, 0xb2, 0x9d, 0x4a, /* Byte value: 0xc9 */ + 0xd8, 0x0e, 0xb4, 0x85, 0x9a, 0xc9, 0xc6, 0xc8, 0x71, 0x31, 0x50, 0x79, 0xc6, 0xea, 0x82, 0x57, /* Byte value: 0xca */ + 0xb7, 0xc7, 0x0d, 0xd2, 0xc5, 0x67, 0x96, 0x51, 0xc1, 0xdf, 0xf8, 0xb2, 0x96, 0x32, 0x50, 0x7a, /* Byte value: 0xcb */ + 0xb1, 0x98, 0x08, 0xf9, 0xe1, 0x31, 0xf0, 0x68, 0x13, 0xf1, 0x3b, 0x9e, 0xf0, 0xab, 0xb5, 0x77, /* Byte value: 0xcc */ + 0xd5, 0x4b, 0x5e, 0x3e, 0xdc, 0x7c, 0x1b, 0x50, 0x31, 0x60, 0xd4, 0x92, 0x1b, 0xc1, 0xfa, 0x10, /* Byte value: 0xcd */ + 0x22, 0xe3, 0x33, 0x4a, 0x1f, 0x94, 0x47, 0xa4, 0x24, 0x79, 0xdb, 0x67, 0x47, 0x0b, 0xda, 0x4b, /* Byte value: 0xce */ + 0x4c, 0xd1, 0x6a, 0xf0, 0x4e, 0x23, 0x06, 0xd7, 0xb3, 0x9a, 0xb2, 0x1f, 0x06, 0x09, 0x79, 0x3b, /* Byte value: 0xcf */ + 0x3f, 0xcd, 0xc1, 0x39, 0xb9, 0x72, 0x49, 0x84, 0x51, 0xf8, 0x12, 0xed, 0x49, 0x1e, 0xbe, 0x95, /* Byte value: 0xd0 */ + 0x75, 0x43, 0xae, 0xe2, 0xd3, 0x07, 0x29, 0x6a, 0x30, 0x4c, 0x63, 0xde, 0x29, 0x8e, 0x22, 0xa3, /* Byte value: 0xd1 */ + 0x19, 0x44, 0xf4, 0x41, 0x9e, 0x82, 0x4a, 0x0e, 0xe9, 0xb5, 0x4b, 0x03, 0x4a, 0xfb, 0x63, 0x69, /* Byte value: 0xd2 */ + 0x74, 0xb8, 0x4e, 0x0f, 0xdd, 0x1e, 0x38, 0x80, 0x17, 0x41, 0xa2, 0x6d, 0x38, 0x54, 0x53, 0xfe, /* Byte value: 0xd3 */ + 0x13, 0xa5, 0xfb, 0x3c, 0xf2, 0x78, 0xe0, 0x45, 0x5c, 0xc7, 0xcd, 0x77, 0xe0, 0x93, 0x8f, 0x7e, /* Byte value: 0xd4 */ + 0xd7, 0x7e, 0x5d, 0x27, 0xc0, 0x4e, 0x39, 0x47, 0x7f, 0x7a, 0x95, 0x37, 0x39, 0xb6, 0x18, 0xaa, /* Byte value: 0xd5 */ + 0x84, 0xb4, 0xc6, 0xbd, 0x34, 0xb9, 0x13, 0xa7, 0xf7, 0x7b, 0xaf, 0x07, 0x13, 0xdd, 0xe7, 0xf5, /* Byte value: 0xd6 */ + 0x7b, 0xc8, 0xa7, 0xad, 0x87, 0x99, 0xc7, 0x0f, 0x19, 0x0a, 0x67, 0x23, 0xc7, 0x08, 0xc9, 0x03, /* Byte value: 0xd7 */ + 0x42, 0x5a, 0x63, 0xbf, 0x1a, 0xbd, 0xe8, 0xb2, 0x9a, 0xdc, 0xb6, 0xe2, 0xe8, 0x8f, 0x92, 0x9b, /* Byte value: 0xd8 */ + 0x11, 0x90, 0xf8, 0x25, 0xee, 0x4a, 0xc2, 0x52, 0x12, 0xdd, 0x8c, 0xd2, 0xc2, 0xe4, 0x6d, 0xc4, /* Byte value: 0xd9 */ + 0xe0, 0x67, 0x90, 0x7a, 0x09, 0xf4, 0xf8, 0x9f, 0xd5, 0xea, 0x40, 0x0b, 0xf8, 0xb7, 0xa8, 0x92, /* Byte value: 0xda */ + 0x71, 0x29, 0xa8, 0xd0, 0xeb, 0x63, 0x6d, 0x44, 0xac, 0x78, 0xe1, 0x57, 0x6d, 0x60, 0x25, 0x14, /* Byte value: 0xdb */ + 0x31, 0x46, 0xc8, 0x76, 0xed, 0xec, 0xa7, 0xe1, 0x78, 0xbe, 0x16, 0x10, 0xa7, 0x98, 0x55, 0x35, /* Byte value: 0xdc */ + 0x67, 0x1d, 0xb5, 0x33, 0x2f, 0x66, 0xd8, 0xc5, 0x4b, 0x86, 0x6f, 0x1a, 0xd8, 0xc7, 0xdc, 0x80, /* Byte value: 0xdd */ + 0xc8, 0x65, 0xac, 0x4d, 0x7a, 0x9a, 0x15, 0x70, 0x44, 0xe1, 0x1d, 0x18, 0x15, 0xd4, 0x9e, 0xce, /* Byte value: 0xde */ + 0x4d, 0x2a, 0x8a, 0x1d, 0x40, 0x3a, 0x17, 0x3d, 0x94, 0x97, 0x73, 0xac, 0x17, 0xd3, 0x08, 0x66, /* Byte value: 0xdf */ + 0xfc, 0xb2, 0x82, 0xe4, 0xa1, 0x0b, 0xe7, 0x55, 0x87, 0x66, 0x48, 0x32, 0xe7, 0x78, 0xbd, 0x11, /* Byte value: 0xe0 */ + 0xb3, 0xad, 0x0b, 0xe0, 0xfd, 0x03, 0xd2, 0x7f, 0x5d, 0xeb, 0x7a, 0x3b, 0xd2, 0xdc, 0x57, 0xcd, /* Byte value: 0xe1 */ + 0x44, 0x05, 0x66, 0x94, 0x3e, 0xeb, 0x8e, 0x8b, 0x48, 0xf2, 0x75, 0xce, 0x8e, 0x16, 0x77, 0x96, /* Byte value: 0xe2 */ + 0xc5, 0x20, 0x46, 0xf6, 0x3c, 0x2f, 0xc8, 0xe8, 0x04, 0xb0, 0x99, 0xf3, 0xc8, 0xff, 0xe6, 0x89, /* Byte value: 0xe3 */ + 0x14, 0x01, 0x1e, 0xfa, 0xd8, 0x37, 0x97, 0x96, 0xa9, 0xe4, 0xcf, 0xe8, 0x97, 0xd0, 0x1b, 0x2e, /* Byte value: 0xe4 */ + 0x2b, 0xcc, 0xdf, 0xc3, 0x61, 0x45, 0xde, 0x12, 0xf8, 0x1c, 0xdd, 0x05, 0xde, 0xce, 0xa5, 0xbb, /* Byte value: 0xe5 */ + 0x12, 0x5e, 0x1b, 0xd1, 0xfc, 0x61, 0xf1, 0xaf, 0x7b, 0xca, 0x0c, 0xc4, 0xf1, 0x49, 0xfe, 0x23, /* Byte value: 0xe6 */ + 0xb6, 0x3c, 0xed, 0x3f, 0xcb, 0x7e, 0x87, 0xbb, 0xe6, 0xd2, 0x39, 0x01, 0x87, 0xe8, 0x21, 0x27, /* Byte value: 0xe7 */ + 0xbc, 0xdd, 0xe2, 0x42, 0xa7, 0x84, 0x2d, 0xf0, 0x53, 0xa0, 0xbf, 0x75, 0x2d, 0x80, 0xcd, 0x30, /* Byte value: 0xe8 */ + 0x8d, 0x9b, 0x2a, 0x34, 0x4a, 0x68, 0x8a, 0x11, 0x2b, 0x1e, 0xa9, 0x65, 0x8a, 0x18, 0x98, 0x05, /* Byte value: 0xe9 */ + 0x90, 0xb5, 0xd8, 0x47, 0xec, 0x8e, 0x84, 0x31, 0x5e, 0x9f, 0x60, 0xef, 0x84, 0x0d, 0xfc, 0xdb, /* Byte value: 0xea */ + 0x77, 0x76, 0xad, 0xfb, 0xcf, 0x35, 0x0b, 0x7d, 0x7e, 0x56, 0x22, 0x7b, 0x0b, 0xf9, 0xc0, 0x19, /* Byte value: 0xeb */ + 0x94, 0xdf, 0xde, 0x75, 0xd4, 0xea, 0xc0, 0x1f, 0xc2, 0xab, 0xe2, 0x66, 0xc0, 0xe3, 0xfb, 0x6c, /* Byte value: 0xec */ + 0xe7, 0xc3, 0x75, 0xbc, 0x23, 0xbb, 0x8f, 0x4c, 0x20, 0xc9, 0x42, 0x94, 0x8f, 0xf4, 0x3c, 0xc2, /* Byte value: 0xed */ + 0x5b, 0x1e, 0x97, 0xfe, 0x84, 0x3f, 0xa2, 0xbc, 0x73, 0x69, 0xfd, 0xe1, 0xa2, 0x74, 0xf1, 0xf2, /* Byte value: 0xee */ + 0x64, 0xd3, 0x56, 0xc7, 0x3d, 0x4d, 0xeb, 0x38, 0x22, 0x91, 0xef, 0x0c, 0xeb, 0x6a, 0x4f, 0x67, /* Byte value: 0xef */ + 0x0a, 0xe1, 0x0f, 0x7d, 0x6c, 0xfa, 0xaa, 0x4b, 0xb5, 0x72, 0x86, 0x74, 0xaa, 0x68, 0xec, 0x17, /* Byte value: 0xf0 */ + 0xab, 0x12, 0x1f, 0x4c, 0x6d, 0x98, 0x89, 0x9b, 0x93, 0x53, 0xf0, 0x8b, 0x89, 0xfd, 0x45, 0xf9, /* Byte value: 0xf1 */ + 0x03, 0xce, 0xe3, 0xf4, 0x12, 0x2b, 0x33, 0xfd, 0x69, 0x17, 0x80, 0x16, 0x33, 0xad, 0x93, 0xe7, /* Byte value: 0xf2 */ + 0x80, 0xde, 0xc0, 0x8f, 0x0c, 0xdd, 0x57, 0x89, 0x6b, 0x4f, 0x2d, 0x8e, 0x57, 0x33, 0xe0, 0x42, /* Byte value: 0xf3 */ + 0x83, 0x10, 0x23, 0x7b, 0x1e, 0xf6, 0x64, 0x74, 0x02, 0x58, 0xad, 0x98, 0x64, 0x9e, 0x73, 0xa5, /* Byte value: 0xf4 */ + 0xa6, 0x57, 0xf5, 0xf7, 0x2b, 0x2d, 0x54, 0x03, 0xd3, 0x02, 0x74, 0x60, 0x54, 0xd6, 0x3d, 0xbe, /* Byte value: 0xf5 */ + 0x09, 0x2f, 0xec, 0x89, 0x7e, 0xd1, 0x99, 0xb6, 0xdc, 0x65, 0x06, 0x62, 0x99, 0xc5, 0x7f, 0xf0, /* Byte value: 0xf6 */ + 0xac, 0xb6, 0xfa, 0x8a, 0x47, 0xd7, 0xfe, 0x48, 0x66, 0x70, 0xf2, 0x14, 0xfe, 0xbe, 0xd1, 0xa9, /* Byte value: 0xf7 */ + 0x2c, 0x68, 0x3a, 0x05, 0x4b, 0x0a, 0xa9, 0xc1, 0x0d, 0x3f, 0xdf, 0x9a, 0xa9, 0x8d, 0x31, 0xeb, /* Byte value: 0xf8 */ + 0x7e, 0x59, 0x41, 0x72, 0xb1, 0xe4, 0x92, 0xcb, 0xa2, 0x33, 0x24, 0x19, 0x92, 0x3c, 0xbf, 0xe9, /* Byte value: 0xf9 */ + 0x2f, 0xa6, 0xd9, 0xf1, 0x59, 0x21, 0x9a, 0x3c, 0x64, 0x28, 0x5f, 0x8c, 0x9a, 0x20, 0xa2, 0x0c, /* Byte value: 0xfa */ + 0xb5, 0xf2, 0x0e, 0xcb, 0xd9, 0x55, 0xb4, 0x46, 0x8f, 0xc5, 0xb9, 0x17, 0xb4, 0x45, 0xb2, 0xc0, /* Byte value: 0xfb */ + 0x3b, 0xa7, 0xc7, 0x0b, 0x81, 0x16, 0x0d, 0xaa, 0xcd, 0xcc, 0x90, 0x64, 0x0d, 0xf0, 0xb9, 0x22, /* Byte value: 0xfc */ + 0xbd, 0x26, 0x02, 0xaf, 0xa9, 0x9d, 0x3c, 0x1a, 0x74, 0xad, 0x7e, 0xc6, 0x3c, 0x5a, 0xbc, 0x6d, /* Byte value: 0xfd */ + 0x04, 0x6a, 0x06, 0x32, 0x38, 0x64, 0x44, 0x2e, 0x9c, 0x34, 0x82, 0x89, 0x44, 0xee, 0x07, 0xb7, /* Byte value: 0xfe */ + 0xeb, 0x7d, 0x7f, 0xea, 0x6b, 0x17, 0x43, 0x3e, 0x47, 0x95, 0x07, 0xcc, 0x43, 0x05, 0x35, 0xd8, /* Byte value: 0xff */ + 0xbb, 0x79, 0x07, 0x84, 0x8d, 0xcb, 0x5a, 0x23, 0xa6, 0x83, 0xbd, 0xea, 0x5a, 0xc3, 0x59, 0x60, /* Byte value: 0x00 */ + + /* Matrix row: 13 */ + 0x79, 0x1a, 0x2d, 0x6d, 0xc9, 0x3b, 0x13, 0xe1, 0x79, 0x58, 0x80, 0x80, 0x75, 0x80, 0xb7, 0x36, /* Byte value: 0x01 */ + 0x91, 0x58, 0xcb, 0xc6, 0xfe, 0x1f, 0xb1, 0x50, 0x91, 0xd6, 0x1a, 0x1a, 0x1d, 0x1a, 0x89, 0x33, /* Byte value: 0x02 */ + 0x99, 0x09, 0xd2, 0xbc, 0x88, 0x79, 0x33, 0xc2, 0x99, 0xe9, 0xdc, 0xdc, 0x3b, 0xdc, 0x07, 0x9c, /* Byte value: 0x03 */ + 0xb9, 0x8e, 0xb6, 0x97, 0x93, 0x22, 0x7e, 0xcf, 0xb9, 0x15, 0x42, 0x42, 0xa3, 0x42, 0x7a, 0x65, /* Byte value: 0x04 */ + 0x71, 0x4b, 0x34, 0x17, 0xbf, 0x5d, 0x91, 0x73, 0x71, 0x67, 0x46, 0x46, 0x53, 0x46, 0x39, 0x99, /* Byte value: 0x05 */ + 0xea, 0xc7, 0x71, 0x54, 0xcb, 0xdc, 0x63, 0x74, 0xea, 0xf1, 0x4a, 0x4a, 0x80, 0x4a, 0xfc, 0x5e, /* Byte value: 0x06 */ + 0xd7, 0xd9, 0x79, 0x52, 0x0f, 0x62, 0xab, 0xc6, 0xd7, 0x6c, 0x56, 0x56, 0x15, 0x56, 0xf6, 0xef, /* Byte value: 0x07 */ + 0x95, 0x91, 0x26, 0xfb, 0xc5, 0x2c, 0xf0, 0x19, 0x95, 0x28, 0x79, 0x79, 0x0e, 0x79, 0xce, 0x85, /* Byte value: 0x08 */ + 0x55, 0x05, 0xbd, 0x01, 0x9f, 0x35, 0x9d, 0x37, 0x55, 0x65, 0xbb, 0xbb, 0xd8, 0xbb, 0x03, 0xd6, /* Byte value: 0x09 */ + 0xda, 0xe2, 0x27, 0x8b, 0x3c, 0x4b, 0xe9, 0x9e, 0xda, 0x73, 0x9b, 0x9b, 0x54, 0x9b, 0x5e, 0x3a, /* Byte value: 0x0a */ + 0xdb, 0x41, 0x8d, 0x15, 0x42, 0x37, 0x68, 0x1d, 0xdb, 0xad, 0xf3, 0xf3, 0x20, 0xf3, 0x3f, 0xf6, /* Byte value: 0x0b */ + 0xb5, 0x16, 0x42, 0xd0, 0xde, 0x77, 0xbd, 0x14, 0xb5, 0xd4, 0xe7, 0xe7, 0x96, 0xe7, 0xb3, 0x7c, /* Byte value: 0x0c */ + 0x3f, 0x9b, 0x9f, 0xf9, 0x38, 0x46, 0x09, 0x77, 0x3f, 0xe2, 0xcc, 0xcc, 0x7d, 0xcc, 0xc8, 0xea, /* Byte value: 0x0d */ + 0x54, 0xa6, 0x17, 0x9f, 0xe1, 0x49, 0x1c, 0xb4, 0x54, 0xbb, 0xd3, 0xd3, 0xac, 0xd3, 0x62, 0x1a, /* Byte value: 0x0e */ + 0x7d, 0xd3, 0xc0, 0x50, 0xf2, 0x08, 0x52, 0xa8, 0x7d, 0xa6, 0xe3, 0xe3, 0x66, 0xe3, 0xf0, 0x80, /* Byte value: 0x0f */ + 0xd5, 0x5c, 0xee, 0xad, 0xf3, 0x9a, 0x6a, 0x03, 0xd5, 0x13, 0x86, 0x86, 0xfd, 0x86, 0x34, 0xb4, /* Byte value: 0x10 */ + 0xbd, 0x47, 0x5b, 0xaa, 0xa8, 0x11, 0x3f, 0x86, 0xbd, 0xeb, 0x21, 0x21, 0xb0, 0x21, 0x3d, 0xd3, /* Byte value: 0x11 */ + 0xa9, 0x2c, 0x84, 0x63, 0x7f, 0xee, 0xb9, 0x28, 0xa9, 0x6b, 0x0d, 0x0d, 0xef, 0x0d, 0xa5, 0xf8, /* Byte value: 0x12 */ + 0xfe, 0xac, 0xae, 0x9d, 0x1c, 0x23, 0xe5, 0xda, 0xfe, 0x71, 0x66, 0x66, 0xdf, 0x66, 0x64, 0x75, /* Byte value: 0x13 */ + 0x3b, 0x52, 0x72, 0xc4, 0x03, 0x75, 0x48, 0x3e, 0x3b, 0x1c, 0xaf, 0xaf, 0x6e, 0xaf, 0x8f, 0x5c, /* Byte value: 0x14 */ + 0x1d, 0x99, 0x6c, 0x2d, 0xdf, 0xe5, 0x85, 0xbf, 0x1d, 0x61, 0x82, 0x82, 0x0d, 0x82, 0x77, 0x48, /* Byte value: 0x15 */ + 0x36, 0x69, 0x2c, 0x1d, 0x30, 0x5c, 0x0a, 0x66, 0x36, 0x03, 0x62, 0x62, 0x2f, 0x62, 0x27, 0x89, /* Byte value: 0x16 */ + 0x38, 0x74, 0x4f, 0xa5, 0x81, 0xf1, 0x08, 0x78, 0x38, 0xbd, 0x17, 0x17, 0xf2, 0x17, 0x2c, 0xcb, /* Byte value: 0x17 */ + 0x07, 0xef, 0xd0, 0x5c, 0xb9, 0xb7, 0x01, 0x0f, 0x07, 0x5f, 0xdb, 0xdb, 0x8f, 0xdb, 0xe4, 0x21, /* Byte value: 0x18 */ + 0x1b, 0xd5, 0x16, 0xef, 0x18, 0x2e, 0x05, 0x33, 0x1b, 0xe0, 0x31, 0x31, 0xf6, 0x31, 0xf2, 0xa5, /* Byte value: 0x19 */ + 0xfb, 0xc6, 0xe9, 0x3e, 0x59, 0x6c, 0x25, 0x10, 0xfb, 0x51, 0x6d, 0x6d, 0xb8, 0x6d, 0x42, 0x0f, /* Byte value: 0x1a */ + 0x70, 0xe8, 0x9e, 0x89, 0xc1, 0x21, 0x10, 0xf0, 0x70, 0xb9, 0x2e, 0x2e, 0x27, 0x2e, 0x58, 0x55, /* Byte value: 0x1b */ + 0x89, 0xab, 0xe0, 0x48, 0x64, 0xb5, 0xf4, 0x25, 0x89, 0x97, 0x93, 0x93, 0x77, 0x93, 0xd8, 0x01, /* Byte value: 0x1c */ + 0x4a, 0x19, 0x46, 0xd3, 0xbc, 0x28, 0xd9, 0x4d, 0x4a, 0x7b, 0xe9, 0xe9, 0x3d, 0xe9, 0xb6, 0xc5, /* Byte value: 0x1d */ + 0xae, 0xc3, 0x54, 0x3f, 0xc6, 0x59, 0xb8, 0x27, 0xae, 0x34, 0xd6, 0xd6, 0x60, 0xd6, 0x41, 0xd9, /* Byte value: 0x1e */ + 0x3d, 0x1e, 0x08, 0x06, 0xc4, 0xbe, 0xc8, 0xb2, 0x3d, 0x9d, 0x1c, 0x1c, 0x95, 0x1c, 0x0a, 0xb1, /* Byte value: 0x1f */ + 0x29, 0x75, 0xd7, 0xcf, 0x13, 0x41, 0x4e, 0x1c, 0x29, 0x1d, 0x30, 0x30, 0xca, 0x30, 0x92, 0x9a, /* Byte value: 0x20 */ + 0x8a, 0x8d, 0xdd, 0x29, 0xe6, 0x31, 0xb4, 0x63, 0x8a, 0x36, 0x2b, 0x2b, 0xeb, 0x2b, 0x7b, 0x96, /* Byte value: 0x21 */ + 0xcd, 0xaf, 0xc5, 0x23, 0x69, 0x30, 0x2f, 0x76, 0xcd, 0x52, 0x0f, 0x0f, 0x97, 0x0f, 0x65, 0x86, /* Byte value: 0x22 */ + 0x41, 0x6e, 0x62, 0xc8, 0x48, 0xca, 0x1b, 0x99, 0x41, 0xe5, 0x97, 0x97, 0x87, 0x97, 0x9b, 0xfd, /* Byte value: 0x23 */ + 0xce, 0x89, 0xf8, 0x42, 0xeb, 0xb4, 0x6f, 0x30, 0xce, 0xf3, 0xb7, 0xb7, 0x0b, 0xb7, 0xc6, 0x11, /* Byte value: 0x24 */ + 0x16, 0xee, 0x48, 0x36, 0x2b, 0x07, 0x47, 0x6b, 0x16, 0xff, 0xfc, 0xfc, 0xb7, 0xfc, 0x5a, 0x70, /* Byte value: 0x25 */ + 0x6c, 0xd2, 0x58, 0x3a, 0x60, 0xb8, 0x14, 0xcc, 0x6c, 0x06, 0xc4, 0xc4, 0x5e, 0xc4, 0x4e, 0xd1, /* Byte value: 0x26 */ + 0x1f, 0x1c, 0xfb, 0xd2, 0x23, 0x1d, 0x44, 0x7a, 0x1f, 0x1e, 0x52, 0x52, 0xe5, 0x52, 0xb5, 0x13, /* Byte value: 0x27 */ + 0xe0, 0x13, 0xff, 0xd1, 0x41, 0x42, 0x20, 0x23, 0xe0, 0xb1, 0x5c, 0x5c, 0x4e, 0x5c, 0xb0, 0xaa, /* Byte value: 0x28 */ + 0xf5, 0xdb, 0x8a, 0x86, 0xe8, 0xc1, 0x27, 0x0e, 0xf5, 0xef, 0x18, 0x18, 0x65, 0x18, 0x49, 0x4d, /* Byte value: 0x29 */ + 0xb0, 0x7c, 0x05, 0x73, 0x9b, 0x38, 0x7d, 0xde, 0xb0, 0xf4, 0xec, 0xec, 0xf1, 0xec, 0x95, 0x06, /* Byte value: 0x2a */ + 0xde, 0x2b, 0xca, 0xb6, 0x07, 0x78, 0xa8, 0xd7, 0xde, 0x8d, 0xf8, 0xf8, 0x47, 0xf8, 0x19, 0x8c, /* Byte value: 0x2b */ + 0x03, 0x26, 0x3d, 0x61, 0x82, 0x84, 0x40, 0x46, 0x03, 0xa1, 0xb8, 0xb8, 0x9c, 0xb8, 0xa3, 0x97, /* Byte value: 0x2c */ + 0xd0, 0x36, 0xa9, 0x0e, 0xb6, 0xd5, 0xaa, 0xc9, 0xd0, 0x33, 0x8d, 0x8d, 0x9a, 0x8d, 0x12, 0xce, /* Byte value: 0x2d */ + 0x8e, 0x44, 0x30, 0x14, 0xdd, 0x02, 0xf5, 0x2a, 0x8e, 0xc8, 0x48, 0x48, 0xf8, 0x48, 0x3c, 0x20, /* Byte value: 0x2e */ + 0x23, 0xa1, 0x59, 0x4a, 0x99, 0xdf, 0x0d, 0x4b, 0x23, 0x5d, 0x26, 0x26, 0x04, 0x26, 0xde, 0x6e, /* Byte value: 0x2f */ + 0x0a, 0xd4, 0x8e, 0x85, 0x8a, 0x9e, 0x43, 0x57, 0x0a, 0x40, 0x16, 0x16, 0xce, 0x16, 0x4c, 0xf4, /* Byte value: 0x30 */ + 0xf3, 0x97, 0xf0, 0x44, 0x2f, 0x0a, 0xa7, 0x82, 0xf3, 0x6e, 0xab, 0xab, 0x9e, 0xab, 0xcc, 0xa0, /* Byte value: 0x31 */ + 0x06, 0x4c, 0x7a, 0xc2, 0xc7, 0xcb, 0x80, 0x8c, 0x06, 0x81, 0xb3, 0xb3, 0xfb, 0xb3, 0x85, 0xed, /* Byte value: 0x32 */ + 0xdf, 0x88, 0x60, 0x28, 0x79, 0x04, 0x29, 0x54, 0xdf, 0x53, 0x90, 0x90, 0x33, 0x90, 0x78, 0x40, /* Byte value: 0x33 */ + 0x4d, 0xf6, 0x96, 0x8f, 0x05, 0x9f, 0xd8, 0x42, 0x4d, 0x24, 0x32, 0x32, 0xb2, 0x32, 0x52, 0xe4, /* Byte value: 0x34 */ + 0x98, 0xaa, 0x78, 0x22, 0xf6, 0x05, 0xb2, 0x41, 0x98, 0x37, 0xb4, 0xb4, 0x4f, 0xb4, 0x66, 0x50, /* Byte value: 0x35 */ + 0x97, 0x14, 0xb1, 0x04, 0x39, 0xd4, 0x31, 0xdc, 0x97, 0x57, 0xa9, 0xa9, 0xe6, 0xa9, 0x0c, 0xde, /* Byte value: 0x36 */ + 0xad, 0xe5, 0x69, 0x5e, 0x44, 0xdd, 0xf8, 0x61, 0xad, 0x95, 0x6e, 0x6e, 0xfc, 0x6e, 0xe2, 0x4e, /* Byte value: 0x37 */ + 0x15, 0xc8, 0x75, 0x57, 0xa9, 0x83, 0x07, 0x2d, 0x15, 0x5e, 0x44, 0x44, 0x2b, 0x44, 0xf9, 0xe7, /* Byte value: 0x38 */ + 0xa2, 0x5b, 0xa0, 0x78, 0x8b, 0x0c, 0x7b, 0xfc, 0xa2, 0xf5, 0x73, 0x73, 0x55, 0x73, 0x88, 0xc0, /* Byte value: 0x39 */ + 0xab, 0xa9, 0x13, 0x9c, 0x83, 0x16, 0x78, 0xed, 0xab, 0x14, 0xdd, 0xdd, 0x07, 0xdd, 0x67, 0xa3, /* Byte value: 0x3a */ + 0xc0, 0x94, 0x9b, 0xfa, 0x5a, 0x19, 0x6d, 0x2e, 0xc0, 0x4d, 0xc2, 0xc2, 0xd6, 0xc2, 0xcd, 0x53, /* Byte value: 0x3b */ + 0xb6, 0x30, 0x7f, 0xb1, 0x5c, 0xf3, 0xfd, 0x52, 0xb6, 0x75, 0x5f, 0x5f, 0x0a, 0x5f, 0x10, 0xeb, /* Byte value: 0x3c */ + 0x53, 0x49, 0xc7, 0xc3, 0x58, 0xfe, 0x1d, 0xbb, 0x53, 0xe4, 0x08, 0x08, 0x23, 0x08, 0x86, 0x3b, /* Byte value: 0x3d */ + 0xed, 0x28, 0xa1, 0x08, 0x72, 0x6b, 0x62, 0x7b, 0xed, 0xae, 0x91, 0x91, 0x0f, 0x91, 0x18, 0x7f, /* Byte value: 0x3e */ + 0xc1, 0x37, 0x31, 0x64, 0x24, 0x65, 0xec, 0xad, 0xc1, 0x93, 0xaa, 0xaa, 0xa2, 0xaa, 0xac, 0x9f, /* Byte value: 0x3f */ + 0xe1, 0xb0, 0x55, 0x4f, 0x3f, 0x3e, 0xa1, 0xa0, 0xe1, 0x6f, 0x34, 0x34, 0x3a, 0x34, 0xd1, 0x66, /* Byte value: 0x40 */ + 0x62, 0xcf, 0x3b, 0x82, 0xd1, 0x15, 0x16, 0xd2, 0x62, 0xb8, 0xb1, 0xb1, 0x83, 0xb1, 0x45, 0x93, /* Byte value: 0x41 */ + 0x24, 0x4e, 0x89, 0x16, 0x20, 0x68, 0x0c, 0x44, 0x24, 0x02, 0xfd, 0xfd, 0x8b, 0xfd, 0x3a, 0x4f, /* Byte value: 0x42 */ + 0xe9, 0xe1, 0x4c, 0x35, 0x49, 0x58, 0x23, 0x32, 0xe9, 0x50, 0xf2, 0xf2, 0x1c, 0xf2, 0x5f, 0xc9, /* Byte value: 0x43 */ + 0x65, 0x20, 0xeb, 0xde, 0x68, 0xa2, 0x17, 0xdd, 0x65, 0xe7, 0x6a, 0x6a, 0x0c, 0x6a, 0xa1, 0xb2, /* Byte value: 0x44 */ + 0xec, 0x8b, 0x0b, 0x96, 0x0c, 0x17, 0xe3, 0xf8, 0xec, 0x70, 0xf9, 0xf9, 0x7b, 0xf9, 0x79, 0xb3, /* Byte value: 0x45 */ + 0x5d, 0x54, 0xa4, 0x7b, 0xe9, 0x53, 0x1f, 0xa5, 0x5d, 0x5a, 0x7d, 0x7d, 0xfe, 0x7d, 0x8d, 0x79, /* Byte value: 0x46 */ + 0x26, 0xcb, 0x1e, 0xe9, 0xdc, 0x90, 0xcd, 0x81, 0x26, 0x7d, 0x2d, 0x2d, 0x63, 0x2d, 0xf8, 0x14, /* Byte value: 0x47 */ + 0xbe, 0x61, 0x66, 0xcb, 0x2a, 0x95, 0x7f, 0xc0, 0xbe, 0x4a, 0x99, 0x99, 0x2c, 0x99, 0x9e, 0x44, /* Byte value: 0x48 */ + 0x21, 0x24, 0xce, 0xb5, 0x65, 0x27, 0xcc, 0x8e, 0x21, 0x22, 0xf6, 0xf6, 0xec, 0xf6, 0x1c, 0x35, /* Byte value: 0x49 */ + 0x4b, 0xba, 0xec, 0x4d, 0xc2, 0x54, 0x58, 0xce, 0x4b, 0xa5, 0x81, 0x81, 0x49, 0x81, 0xd7, 0x09, /* Byte value: 0x4a */ + 0x48, 0x9c, 0xd1, 0x2c, 0x40, 0xd0, 0x18, 0x88, 0x48, 0x04, 0x39, 0x39, 0xd5, 0x39, 0x74, 0x9e, /* Byte value: 0x4b */ + 0xca, 0x40, 0x15, 0x7f, 0xd0, 0x87, 0x2e, 0x79, 0xca, 0x0d, 0xd4, 0xd4, 0x18, 0xd4, 0x81, 0xa7, /* Byte value: 0x4c */ + 0xf7, 0x5e, 0x1d, 0x79, 0x14, 0x39, 0xe6, 0xcb, 0xf7, 0x90, 0xc8, 0xc8, 0x8d, 0xc8, 0x8b, 0x16, /* Byte value: 0x4d */ + 0x7c, 0x70, 0x6a, 0xce, 0x8c, 0x74, 0xd3, 0x2b, 0x7c, 0x78, 0x8b, 0x8b, 0x12, 0x8b, 0x91, 0x4c, /* Byte value: 0x4e */ + 0xff, 0x0f, 0x04, 0x03, 0x62, 0x5f, 0x64, 0x59, 0xff, 0xaf, 0x0e, 0x0e, 0xab, 0x0e, 0x05, 0xb9, /* Byte value: 0x4f */ + 0x20, 0x87, 0x64, 0x2b, 0x1b, 0x5b, 0x4d, 0x0d, 0x20, 0xfc, 0x9e, 0x9e, 0x98, 0x9e, 0x7d, 0xf9, /* Byte value: 0x50 */ + 0xd1, 0x95, 0x03, 0x90, 0xc8, 0xa9, 0x2b, 0x4a, 0xd1, 0xed, 0xe5, 0xe5, 0xee, 0xe5, 0x73, 0x02, /* Byte value: 0x51 */ + 0x85, 0x33, 0x14, 0x0f, 0x29, 0xe0, 0x37, 0xfe, 0x85, 0x56, 0x36, 0x36, 0x42, 0x36, 0x11, 0x18, /* Byte value: 0x52 */ + 0x58, 0x3e, 0xe3, 0xd8, 0xac, 0x1c, 0xdf, 0x6f, 0x58, 0x7a, 0x76, 0x76, 0x99, 0x76, 0xab, 0x03, /* Byte value: 0x53 */ + 0x49, 0x3f, 0x7b, 0xb2, 0x3e, 0xac, 0x99, 0x0b, 0x49, 0xda, 0x51, 0x51, 0xa1, 0x51, 0x15, 0x52, /* Byte value: 0x54 */ + 0xfa, 0x65, 0x43, 0xa0, 0x27, 0x10, 0xa4, 0x93, 0xfa, 0x8f, 0x05, 0x05, 0xcc, 0x05, 0x23, 0xc3, /* Byte value: 0x55 */ + 0x87, 0xb6, 0x83, 0xf0, 0xd5, 0x18, 0xf6, 0x3b, 0x87, 0x29, 0xe6, 0xe6, 0xaa, 0xe6, 0xd3, 0x43, /* Byte value: 0x56 */ + 0x27, 0x68, 0xb4, 0x77, 0xa2, 0xec, 0x4c, 0x02, 0x27, 0xa3, 0x45, 0x45, 0x17, 0x45, 0x99, 0xd8, /* Byte value: 0x57 */ + 0xe8, 0x42, 0xe6, 0xab, 0x37, 0x24, 0xa2, 0xb1, 0xe8, 0x8e, 0x9a, 0x9a, 0x68, 0x9a, 0x3e, 0x05, /* Byte value: 0x58 */ + 0xf4, 0x78, 0x20, 0x18, 0x96, 0xbd, 0xa6, 0x8d, 0xf4, 0x31, 0x70, 0x70, 0x11, 0x70, 0x28, 0x81, /* Byte value: 0x59 */ + 0x5a, 0xbb, 0x74, 0x27, 0x50, 0xe4, 0x1e, 0xaa, 0x5a, 0x05, 0xa6, 0xa6, 0x71, 0xa6, 0x69, 0x58, /* Byte value: 0x5a */ + 0x66, 0x06, 0xd6, 0xbf, 0xea, 0x26, 0x57, 0x9b, 0x66, 0x46, 0xd2, 0xd2, 0x90, 0xd2, 0x02, 0x25, /* Byte value: 0x5b */ + 0xf0, 0xb1, 0xcd, 0x25, 0xad, 0x8e, 0xe7, 0xc4, 0xf0, 0xcf, 0x13, 0x13, 0x02, 0x13, 0x6f, 0x37, /* Byte value: 0x5c */ + 0xcb, 0xe3, 0xbf, 0xe1, 0xae, 0xfb, 0xaf, 0xfa, 0xcb, 0xd3, 0xbc, 0xbc, 0x6c, 0xbc, 0xe0, 0x6b, /* Byte value: 0x5d */ + 0x0e, 0x1d, 0x63, 0xb8, 0xb1, 0xad, 0x02, 0x1e, 0x0e, 0xbe, 0x75, 0x75, 0xdd, 0x75, 0x0b, 0x42, /* Byte value: 0x5e */ + 0xe2, 0x96, 0x68, 0x2e, 0xbd, 0xba, 0xe1, 0xe6, 0xe2, 0xce, 0x8c, 0x8c, 0xa6, 0x8c, 0x72, 0xf1, /* Byte value: 0x5f */ + 0x57, 0x80, 0x2a, 0xfe, 0x63, 0xcd, 0x5c, 0xf2, 0x57, 0x1a, 0x6b, 0x6b, 0x30, 0x6b, 0xc1, 0x8d, /* Byte value: 0x60 */ + 0xc4, 0x5d, 0x76, 0xc7, 0x61, 0x2a, 0x2c, 0x67, 0xc4, 0xb3, 0xa1, 0xa1, 0xc5, 0xa1, 0x8a, 0xe5, /* Byte value: 0x61 */ + 0x9b, 0x8c, 0x45, 0x43, 0x74, 0x81, 0xf2, 0x07, 0x9b, 0x96, 0x0c, 0x0c, 0xd3, 0x0c, 0xc5, 0xc7, /* Byte value: 0x62 */ + 0xee, 0x0e, 0x9c, 0x69, 0xf0, 0xef, 0x22, 0x3d, 0xee, 0x0f, 0x29, 0x29, 0x93, 0x29, 0xbb, 0xe8, /* Byte value: 0x63 */ + 0x1a, 0x76, 0xbc, 0x71, 0x66, 0x52, 0x84, 0xb0, 0x1a, 0x3e, 0x59, 0x59, 0x82, 0x59, 0x93, 0x69, /* Byte value: 0x64 */ + 0x37, 0xca, 0x86, 0x83, 0x4e, 0x20, 0x8b, 0xe5, 0x37, 0xdd, 0x0a, 0x0a, 0x5b, 0x0a, 0x46, 0x45, /* Byte value: 0x65 */ + 0x2e, 0x9a, 0x07, 0x93, 0xaa, 0xf6, 0x4f, 0x13, 0x2e, 0x42, 0xeb, 0xeb, 0x45, 0xeb, 0x76, 0xbb, /* Byte value: 0x66 */ + 0x69, 0xb8, 0x1f, 0x99, 0x25, 0xf7, 0xd4, 0x06, 0x69, 0x26, 0xcf, 0xcf, 0x39, 0xcf, 0x68, 0xab, /* Byte value: 0x67 */ + 0x8b, 0x2e, 0x77, 0xb7, 0x98, 0x4d, 0x35, 0xe0, 0x8b, 0xe8, 0x43, 0x43, 0x9f, 0x43, 0x1a, 0x5a, /* Byte value: 0x68 */ + 0xaf, 0x60, 0xfe, 0xa1, 0xb8, 0x25, 0x39, 0xa4, 0xaf, 0xea, 0xbe, 0xbe, 0x14, 0xbe, 0x20, 0x15, /* Byte value: 0x69 */ + 0xc2, 0x11, 0x0c, 0x05, 0xa6, 0xe1, 0xac, 0xeb, 0xc2, 0x32, 0x12, 0x12, 0x3e, 0x12, 0x0f, 0x08, /* Byte value: 0x6a */ + 0x7f, 0x56, 0x57, 0xaf, 0x0e, 0xf0, 0x93, 0x6d, 0x7f, 0xd9, 0x33, 0x33, 0x8e, 0x33, 0x32, 0xdb, /* Byte value: 0x6b */ + 0x64, 0x83, 0x41, 0x40, 0x16, 0xde, 0x96, 0x5e, 0x64, 0x39, 0x02, 0x02, 0x78, 0x02, 0xc0, 0x7e, /* Byte value: 0x6c */ + 0x45, 0xa7, 0x8f, 0xf5, 0x73, 0xf9, 0x5a, 0xd0, 0x45, 0x1b, 0xf4, 0xf4, 0x94, 0xf4, 0xdc, 0x4b, /* Byte value: 0x6d */ + 0x14, 0x6b, 0xdf, 0xc9, 0xd7, 0xff, 0x86, 0xae, 0x14, 0x80, 0x2c, 0x2c, 0x5f, 0x2c, 0x98, 0x2b, /* Byte value: 0x6e */ + 0xfd, 0x8a, 0x93, 0xfc, 0x9e, 0xa7, 0xa5, 0x9c, 0xfd, 0xd0, 0xde, 0xde, 0x43, 0xde, 0xc7, 0xe2, /* Byte value: 0x6f */ + 0xac, 0x46, 0xc3, 0xc0, 0x3a, 0xa1, 0x79, 0xe2, 0xac, 0x4b, 0x06, 0x06, 0x88, 0x06, 0x83, 0x82, /* Byte value: 0x70 */ + 0x86, 0x15, 0x29, 0x6e, 0xab, 0x64, 0x77, 0xb8, 0x86, 0xf7, 0x8e, 0x8e, 0xde, 0x8e, 0xb2, 0x8f, /* Byte value: 0x71 */ + 0x76, 0xa4, 0xe4, 0x4b, 0x06, 0xea, 0x90, 0x7c, 0x76, 0x38, 0x9d, 0x9d, 0xdc, 0x9d, 0xdd, 0xb8, /* Byte value: 0x72 */ + 0x43, 0xeb, 0xf5, 0x37, 0xb4, 0x32, 0xda, 0x5c, 0x43, 0x9a, 0x47, 0x47, 0x6f, 0x47, 0x59, 0xa6, /* Byte value: 0x73 */ + 0x50, 0x6f, 0xfa, 0xa2, 0xda, 0x7a, 0x5d, 0xfd, 0x50, 0x45, 0xb0, 0xb0, 0xbf, 0xb0, 0x25, 0xac, /* Byte value: 0x74 */ + 0x28, 0xd6, 0x7d, 0x51, 0x6d, 0x3d, 0xcf, 0x9f, 0x28, 0xc3, 0x58, 0x58, 0xbe, 0x58, 0xf3, 0x56, /* Byte value: 0x75 */ + 0xaa, 0x0a, 0xb9, 0x02, 0xfd, 0x6a, 0xf9, 0x6e, 0xaa, 0xca, 0xb5, 0xb5, 0x73, 0xb5, 0x06, 0x6f, /* Byte value: 0x76 */ + 0x5e, 0x72, 0x99, 0x1a, 0x6b, 0xd7, 0x5f, 0xe3, 0x5e, 0xfb, 0xc5, 0xc5, 0x62, 0xc5, 0x2e, 0xee, /* Byte value: 0x77 */ + 0xdd, 0x0d, 0xf7, 0xd7, 0x85, 0xfc, 0xe8, 0x91, 0xdd, 0x2c, 0x40, 0x40, 0xdb, 0x40, 0xba, 0x1b, /* Byte value: 0x78 */ + 0xbb, 0x0b, 0x21, 0x68, 0x6f, 0xda, 0xbf, 0x0a, 0xbb, 0x6a, 0x92, 0x92, 0x4b, 0x92, 0xb8, 0x3e, /* Byte value: 0x79 */ + 0x96, 0xb7, 0x1b, 0x9a, 0x47, 0xa8, 0xb0, 0x5f, 0x96, 0x89, 0xc1, 0xc1, 0x92, 0xc1, 0x6d, 0x12, /* Byte value: 0x7a */ + 0x05, 0x6a, 0x47, 0xa3, 0x45, 0x4f, 0xc0, 0xca, 0x05, 0x20, 0x0b, 0x0b, 0x67, 0x0b, 0x26, 0x7a, /* Byte value: 0x7b */ + 0x7b, 0x9f, 0xba, 0x92, 0x35, 0xc3, 0xd2, 0x24, 0x7b, 0x27, 0x50, 0x50, 0x9d, 0x50, 0x75, 0x6d, /* Byte value: 0x7c */ + 0xf6, 0xfd, 0xb7, 0xe7, 0x6a, 0x45, 0x67, 0x48, 0xf6, 0x4e, 0xa0, 0xa0, 0xf9, 0xa0, 0xea, 0xda, /* Byte value: 0x7d */ + 0x2b, 0xf0, 0x40, 0x30, 0xef, 0xb9, 0x8f, 0xd9, 0x2b, 0x62, 0xe0, 0xe0, 0x22, 0xe0, 0x50, 0xc1, /* Byte value: 0x7e */ + 0x09, 0xf2, 0xb3, 0xe4, 0x08, 0x1a, 0x03, 0x11, 0x09, 0xe1, 0xae, 0xae, 0x52, 0xae, 0xef, 0x63, /* Byte value: 0x7f */ + 0xc7, 0x7b, 0x4b, 0xa6, 0xe3, 0xae, 0x6c, 0x21, 0xc7, 0x12, 0x19, 0x19, 0x59, 0x19, 0x29, 0x72, /* Byte value: 0x80 */ + 0x46, 0x81, 0xb2, 0x94, 0xf1, 0x7d, 0x1a, 0x96, 0x46, 0xba, 0x4c, 0x4c, 0x08, 0x4c, 0x7f, 0xdc, /* Byte value: 0x81 */ + 0x0d, 0x3b, 0x5e, 0xd9, 0x33, 0x29, 0x42, 0x58, 0x0d, 0x1f, 0xcd, 0xcd, 0x41, 0xcd, 0xa8, 0xd5, /* Byte value: 0x82 */ + 0x13, 0x84, 0x0f, 0x95, 0x6e, 0x48, 0x87, 0xa1, 0x13, 0xdf, 0xf7, 0xf7, 0xd0, 0xf7, 0x7c, 0x0a, /* Byte value: 0x83 */ + 0x61, 0xe9, 0x06, 0xe3, 0x53, 0x91, 0x56, 0x94, 0x61, 0x19, 0x09, 0x09, 0x1f, 0x09, 0xe6, 0x04, /* Byte value: 0x84 */ + 0x01, 0xa3, 0xaa, 0x9e, 0x7e, 0x7c, 0x81, 0x83, 0x01, 0xde, 0x68, 0x68, 0x74, 0x68, 0x61, 0xcc, /* Byte value: 0x85 */ + 0xef, 0xad, 0x36, 0xf7, 0x8e, 0x93, 0xa3, 0xbe, 0xef, 0xd1, 0x41, 0x41, 0xe7, 0x41, 0xda, 0x24, /* Byte value: 0x86 */ + 0x8d, 0x62, 0x0d, 0x75, 0x5f, 0x86, 0xb5, 0x6c, 0x8d, 0x69, 0xf0, 0xf0, 0x64, 0xf0, 0x9f, 0xb7, /* Byte value: 0x87 */ + 0xd3, 0x10, 0x94, 0x6f, 0x34, 0x51, 0xea, 0x8f, 0xd3, 0x92, 0x35, 0x35, 0x06, 0x35, 0xb1, 0x59, /* Byte value: 0x88 */ + 0xbc, 0xe4, 0xf1, 0x34, 0xd6, 0x6d, 0xbe, 0x05, 0xbc, 0x35, 0x49, 0x49, 0xc4, 0x49, 0x5c, 0x1f, /* Byte value: 0x89 */ + 0xf1, 0x12, 0x67, 0xbb, 0xd3, 0xf2, 0x66, 0x47, 0xf1, 0x11, 0x7b, 0x7b, 0x76, 0x7b, 0x0e, 0xfb, /* Byte value: 0x8a */ + 0x32, 0xa0, 0xc1, 0x20, 0x0b, 0x6f, 0x4b, 0x2f, 0x32, 0xfd, 0x01, 0x01, 0x3c, 0x01, 0x60, 0x3f, /* Byte value: 0x8b */ + 0x5c, 0xf7, 0x0e, 0xe5, 0x97, 0x2f, 0x9e, 0x26, 0x5c, 0x84, 0x15, 0x15, 0x8a, 0x15, 0xec, 0xb5, /* Byte value: 0x8c */ + 0x02, 0x85, 0x97, 0xff, 0xfc, 0xf8, 0xc1, 0xc5, 0x02, 0x7f, 0xd0, 0xd0, 0xe8, 0xd0, 0xc2, 0x5b, /* Byte value: 0x8d */ + 0xb1, 0xdf, 0xaf, 0xed, 0xe5, 0x44, 0xfc, 0x5d, 0xb1, 0x2a, 0x84, 0x84, 0x85, 0x84, 0xf4, 0xca, /* Byte value: 0x8e */ + 0x56, 0x23, 0x80, 0x60, 0x1d, 0xb1, 0xdd, 0x71, 0x56, 0xc4, 0x03, 0x03, 0x44, 0x03, 0xa0, 0x41, /* Byte value: 0x8f */ + 0x51, 0xcc, 0x50, 0x3c, 0xa4, 0x06, 0xdc, 0x7e, 0x51, 0x9b, 0xd8, 0xd8, 0xcb, 0xd8, 0x44, 0x60, /* Byte value: 0x90 */ + 0xc9, 0x66, 0x28, 0x1e, 0x52, 0x03, 0x6e, 0x3f, 0xc9, 0xac, 0x6c, 0x6c, 0x84, 0x6c, 0x22, 0x30, /* Byte value: 0x91 */ + 0xd6, 0x7a, 0xd3, 0xcc, 0x71, 0x1e, 0x2a, 0x45, 0xd6, 0xb2, 0x3e, 0x3e, 0x61, 0x3e, 0x97, 0x23, /* Byte value: 0x92 */ + 0x4e, 0xd0, 0xab, 0xee, 0x87, 0x1b, 0x98, 0x04, 0x4e, 0x85, 0x8a, 0x8a, 0x2e, 0x8a, 0xf1, 0x73, /* Byte value: 0x93 */ + 0xc8, 0xc5, 0x82, 0x80, 0x2c, 0x7f, 0xef, 0xbc, 0xc8, 0x72, 0x04, 0x04, 0xf0, 0x04, 0x43, 0xfc, /* Byte value: 0x94 */ + 0xa0, 0xde, 0x37, 0x87, 0x77, 0xf4, 0xba, 0x39, 0xa0, 0x8a, 0xa3, 0xa3, 0xbd, 0xa3, 0x4a, 0x9b, /* Byte value: 0x95 */ + 0x31, 0x86, 0xfc, 0x41, 0x89, 0xeb, 0x0b, 0x69, 0x31, 0x5c, 0xb9, 0xb9, 0xa0, 0xb9, 0xc3, 0xa8, /* Byte value: 0x96 */ + 0x22, 0x02, 0xf3, 0xd4, 0xe7, 0xa3, 0x8c, 0xc8, 0x22, 0x83, 0x4e, 0x4e, 0x70, 0x4e, 0xbf, 0xa2, /* Byte value: 0x97 */ + 0xa5, 0xb4, 0x70, 0x24, 0x32, 0xbb, 0x7a, 0xf3, 0xa5, 0xaa, 0xa8, 0xa8, 0xda, 0xa8, 0x6c, 0xe1, /* Byte value: 0x98 */ + 0x17, 0x4d, 0xe2, 0xa8, 0x55, 0x7b, 0xc6, 0xe8, 0x17, 0x21, 0x94, 0x94, 0xc3, 0x94, 0x3b, 0xbc, /* Byte value: 0x99 */ + 0x33, 0x03, 0x6b, 0xbe, 0x75, 0x13, 0xca, 0xac, 0x33, 0x23, 0x69, 0x69, 0x48, 0x69, 0x01, 0xf3, /* Byte value: 0x9a */ + 0x94, 0x32, 0x8c, 0x65, 0xbb, 0x50, 0x71, 0x9a, 0x94, 0xf6, 0x11, 0x11, 0x7a, 0x11, 0xaf, 0x49, /* Byte value: 0x9b */ + 0xeb, 0x64, 0xdb, 0xca, 0xb5, 0xa0, 0xe2, 0xf7, 0xeb, 0x2f, 0x22, 0x22, 0xf4, 0x22, 0x9d, 0x92, /* Byte value: 0x9c */ + 0x84, 0x90, 0xbe, 0x91, 0x57, 0x9c, 0xb6, 0x7d, 0x84, 0x88, 0x5e, 0x5e, 0x36, 0x5e, 0x70, 0xd4, /* Byte value: 0x9d */ + 0x08, 0x51, 0x19, 0x7a, 0x76, 0x66, 0x82, 0x92, 0x08, 0x3f, 0xc6, 0xc6, 0x26, 0xc6, 0x8e, 0xaf, /* Byte value: 0x9e */ + 0x25, 0xed, 0x23, 0x88, 0x5e, 0x14, 0x8d, 0xc7, 0x25, 0xdc, 0x95, 0x95, 0xff, 0x95, 0x5b, 0x83, /* Byte value: 0x9f */ + 0xf9, 0x43, 0x7e, 0xc1, 0xa5, 0x94, 0xe4, 0xd5, 0xf9, 0x2e, 0xbd, 0xbd, 0x50, 0xbd, 0x80, 0x54, /* Byte value: 0xa0 */ + 0x39, 0xd7, 0xe5, 0x3b, 0xff, 0x8d, 0x89, 0xfb, 0x39, 0x63, 0x7f, 0x7f, 0x86, 0x7f, 0x4d, 0x07, /* Byte value: 0xa1 */ + 0x60, 0x4a, 0xac, 0x7d, 0x2d, 0xed, 0xd7, 0x17, 0x60, 0xc7, 0x61, 0x61, 0x6b, 0x61, 0x87, 0xc8, /* Byte value: 0xa2 */ + 0xb2, 0xf9, 0x92, 0x8c, 0x67, 0xc0, 0xbc, 0x1b, 0xb2, 0x8b, 0x3c, 0x3c, 0x19, 0x3c, 0x57, 0x5d, /* Byte value: 0xa3 */ + 0xd4, 0xff, 0x44, 0x33, 0x8d, 0xe6, 0xeb, 0x80, 0xd4, 0xcd, 0xee, 0xee, 0x89, 0xee, 0x55, 0x78, /* Byte value: 0xa4 */ + 0x6f, 0xf4, 0x65, 0x5b, 0xe2, 0x3c, 0x54, 0x8a, 0x6f, 0xa7, 0x7c, 0x7c, 0xc2, 0x7c, 0xed, 0x46, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x6d, 0x71, 0xf2, 0xa4, 0x1e, 0xc4, 0x95, 0x4f, 0x6d, 0xd8, 0xac, 0xac, 0x2a, 0xac, 0x2f, 0x1d, /* Byte value: 0xa7 */ + 0xa1, 0x7d, 0x9d, 0x19, 0x09, 0x88, 0x3b, 0xba, 0xa1, 0x54, 0xcb, 0xcb, 0xc9, 0xcb, 0x2b, 0x57, /* Byte value: 0xa8 */ + 0x12, 0x27, 0xa5, 0x0b, 0x10, 0x34, 0x06, 0x22, 0x12, 0x01, 0x9f, 0x9f, 0xa4, 0x9f, 0x1d, 0xc6, /* Byte value: 0xa9 */ + 0xd8, 0x67, 0xb0, 0x74, 0xc0, 0xb3, 0x28, 0x5b, 0xd8, 0x0c, 0x4b, 0x4b, 0xbc, 0x4b, 0x9c, 0x61, /* Byte value: 0xaa */ + 0xa3, 0xf8, 0x0a, 0xe6, 0xf5, 0x70, 0xfa, 0x7f, 0xa3, 0x2b, 0x1b, 0x1b, 0x21, 0x1b, 0xe9, 0x0c, /* Byte value: 0xab */ + 0xa4, 0x17, 0xda, 0xba, 0x4c, 0xc7, 0xfb, 0x70, 0xa4, 0x74, 0xc0, 0xc0, 0xae, 0xc0, 0x0d, 0x2d, /* Byte value: 0xac */ + 0xcf, 0x2a, 0x52, 0xdc, 0x95, 0xc8, 0xee, 0xb3, 0xcf, 0x2d, 0xdf, 0xdf, 0x7f, 0xdf, 0xa7, 0xdd, /* Byte value: 0xad */ + 0x9a, 0x2f, 0xef, 0xdd, 0x0a, 0xfd, 0x73, 0x84, 0x9a, 0x48, 0x64, 0x64, 0xa7, 0x64, 0xa4, 0x0b, /* Byte value: 0xae */ + 0xcc, 0x0c, 0x6f, 0xbd, 0x17, 0x4c, 0xae, 0xf5, 0xcc, 0x8c, 0x67, 0x67, 0xe3, 0x67, 0x04, 0x4a, /* Byte value: 0xaf */ + 0x52, 0xea, 0x6d, 0x5d, 0x26, 0x82, 0x9c, 0x38, 0x52, 0x3a, 0x60, 0x60, 0x57, 0x60, 0xe7, 0xf7, /* Byte value: 0xb0 */ + 0x1c, 0x3a, 0xc6, 0xb3, 0xa1, 0x99, 0x04, 0x3c, 0x1c, 0xbf, 0xea, 0xea, 0x79, 0xea, 0x16, 0x84, /* Byte value: 0xb1 */ + 0x2f, 0x39, 0xad, 0x0d, 0xd4, 0x8a, 0xce, 0x90, 0x2f, 0x9c, 0x83, 0x83, 0x31, 0x83, 0x17, 0x77, /* Byte value: 0xb2 */ + 0x7e, 0xf5, 0xfd, 0x31, 0x70, 0x8c, 0x12, 0xee, 0x7e, 0x07, 0x5b, 0x5b, 0xfa, 0x5b, 0x53, 0x17, /* Byte value: 0xb3 */ + 0x93, 0xdd, 0x5c, 0x39, 0x02, 0xe7, 0x70, 0x95, 0x93, 0xa9, 0xca, 0xca, 0xf5, 0xca, 0x4b, 0x68, /* Byte value: 0xb4 */ + 0x42, 0x48, 0x5f, 0xa9, 0xca, 0x4e, 0x5b, 0xdf, 0x42, 0x44, 0x2f, 0x2f, 0x1b, 0x2f, 0x38, 0x6a, /* Byte value: 0xb5 */ + 0xb3, 0x5a, 0x38, 0x12, 0x19, 0xbc, 0x3d, 0x98, 0xb3, 0x55, 0x54, 0x54, 0x6d, 0x54, 0x36, 0x91, /* Byte value: 0xb6 */ + 0x18, 0xf3, 0x2b, 0x8e, 0x9a, 0xaa, 0x45, 0x75, 0x18, 0x41, 0x89, 0x89, 0x6a, 0x89, 0x51, 0x32, /* Byte value: 0xb7 */ + 0xb8, 0x2d, 0x1c, 0x09, 0xed, 0x5e, 0xff, 0x4c, 0xb8, 0xcb, 0x2a, 0x2a, 0xd7, 0x2a, 0x1b, 0xa9, /* Byte value: 0xb8 */ + 0xfc, 0x29, 0x39, 0x62, 0xe0, 0xdb, 0x24, 0x1f, 0xfc, 0x0e, 0xb6, 0xb6, 0x37, 0xb6, 0xa6, 0x2e, /* Byte value: 0xb9 */ + 0x44, 0x04, 0x25, 0x6b, 0x0d, 0x85, 0xdb, 0x53, 0x44, 0xc5, 0x9c, 0x9c, 0xe0, 0x9c, 0xbd, 0x87, /* Byte value: 0xba */ + 0xe6, 0x5f, 0x85, 0x13, 0x86, 0x89, 0xa0, 0xaf, 0xe6, 0x30, 0xef, 0xef, 0xb5, 0xef, 0x35, 0x47, /* Byte value: 0xbb */ + 0x8c, 0xc1, 0xa7, 0xeb, 0x21, 0xfa, 0x34, 0xef, 0x8c, 0xb7, 0x98, 0x98, 0x10, 0x98, 0xfe, 0x7b, /* Byte value: 0xbc */ + 0xc6, 0xd8, 0xe1, 0x38, 0x9d, 0xd2, 0xed, 0xa2, 0xc6, 0xcc, 0x71, 0x71, 0x2d, 0x71, 0x48, 0xbe, /* Byte value: 0xbd */ + 0x63, 0x6c, 0x91, 0x1c, 0xaf, 0x69, 0x97, 0x51, 0x63, 0x66, 0xd9, 0xd9, 0xf7, 0xd9, 0x24, 0x5f, /* Byte value: 0xbe */ + 0xbf, 0xc2, 0xcc, 0x55, 0x54, 0xe9, 0xfe, 0x43, 0xbf, 0x94, 0xf1, 0xf1, 0x58, 0xf1, 0xff, 0x88, /* Byte value: 0xbf */ + 0xf2, 0x34, 0x5a, 0xda, 0x51, 0x76, 0x26, 0x01, 0xf2, 0xb0, 0xc3, 0xc3, 0xea, 0xc3, 0xad, 0x6c, /* Byte value: 0xc0 */ + 0x2c, 0x1f, 0x90, 0x6c, 0x56, 0x0e, 0x8e, 0xd6, 0x2c, 0x3d, 0x3b, 0x3b, 0xad, 0x3b, 0xb4, 0xe0, /* Byte value: 0xc1 */ + 0x11, 0x01, 0x98, 0x6a, 0x92, 0xb0, 0x46, 0x64, 0x11, 0xa0, 0x27, 0x27, 0x38, 0x27, 0xbe, 0x51, /* Byte value: 0xc2 */ + 0x73, 0xce, 0xa3, 0xe8, 0x43, 0xa5, 0x50, 0xb6, 0x73, 0x18, 0x96, 0x96, 0xbb, 0x96, 0xfb, 0xc2, /* Byte value: 0xc3 */ + 0xdc, 0xae, 0x5d, 0x49, 0xfb, 0x80, 0x69, 0x12, 0xdc, 0xf2, 0x28, 0x28, 0xaf, 0x28, 0xdb, 0xd7, /* Byte value: 0xc4 */ + 0xd9, 0xc4, 0x1a, 0xea, 0xbe, 0xcf, 0xa9, 0xd8, 0xd9, 0xd2, 0x23, 0x23, 0xc8, 0x23, 0xfd, 0xad, /* Byte value: 0xc5 */ + 0x92, 0x7e, 0xf6, 0xa7, 0x7c, 0x9b, 0xf1, 0x16, 0x92, 0x77, 0xa2, 0xa2, 0x81, 0xa2, 0x2a, 0xa4, /* Byte value: 0xc6 */ + 0x3e, 0x38, 0x35, 0x67, 0x46, 0x3a, 0x88, 0xf4, 0x3e, 0x3c, 0xa4, 0xa4, 0x09, 0xa4, 0xa9, 0x26, /* Byte value: 0xc7 */ + 0xd2, 0xb3, 0x3e, 0xf1, 0x4a, 0x2d, 0x6b, 0x0c, 0xd2, 0x4c, 0x5d, 0x5d, 0x72, 0x5d, 0xd0, 0x95, /* Byte value: 0xc8 */ + 0x59, 0x9d, 0x49, 0x46, 0xd2, 0x60, 0x5e, 0xec, 0x59, 0xa4, 0x1e, 0x1e, 0xed, 0x1e, 0xca, 0xcf, /* Byte value: 0xc9 */ + 0x75, 0x82, 0xd9, 0x2a, 0x84, 0x6e, 0xd0, 0x3a, 0x75, 0x99, 0x25, 0x25, 0x40, 0x25, 0x7e, 0x2f, /* Byte value: 0xca */ + 0x19, 0x50, 0x81, 0x10, 0xe4, 0xd6, 0xc4, 0xf6, 0x19, 0x9f, 0xe1, 0xe1, 0x1e, 0xe1, 0x30, 0xfe, /* Byte value: 0xcb */ + 0xb4, 0xb5, 0xe8, 0x4e, 0xa0, 0x0b, 0x3c, 0x97, 0xb4, 0x0a, 0x8f, 0x8f, 0xe2, 0x8f, 0xd2, 0xb0, /* Byte value: 0xcc */ + 0x81, 0xfa, 0xf9, 0x32, 0x12, 0xd3, 0x76, 0xb7, 0x81, 0xa8, 0x55, 0x55, 0x51, 0x55, 0x56, 0xae, /* Byte value: 0xcd */ + 0xe4, 0xda, 0x12, 0xec, 0x7a, 0x71, 0x61, 0x6a, 0xe4, 0x4f, 0x3f, 0x3f, 0x5d, 0x3f, 0xf7, 0x1c, /* Byte value: 0xce */ + 0xe5, 0x79, 0xb8, 0x72, 0x04, 0x0d, 0xe0, 0xe9, 0xe5, 0x91, 0x57, 0x57, 0x29, 0x57, 0x96, 0xd0, /* Byte value: 0xcf */ + 0x0f, 0xbe, 0xc9, 0x26, 0xcf, 0xd1, 0x83, 0x9d, 0x0f, 0x60, 0x1d, 0x1d, 0xa9, 0x1d, 0x6a, 0x8e, /* Byte value: 0xd0 */ + 0x47, 0x22, 0x18, 0x0a, 0x8f, 0x01, 0x9b, 0x15, 0x47, 0x64, 0x24, 0x24, 0x7c, 0x24, 0x1e, 0x10, /* Byte value: 0xd1 */ + 0x9c, 0x63, 0x95, 0x1f, 0xcd, 0x36, 0xf3, 0x08, 0x9c, 0xc9, 0xd7, 0xd7, 0x5c, 0xd7, 0x21, 0xe6, /* Byte value: 0xd2 */ + 0x2a, 0x53, 0xea, 0xae, 0x91, 0xc5, 0x0e, 0x5a, 0x2a, 0xbc, 0x88, 0x88, 0x56, 0x88, 0x31, 0x0d, /* Byte value: 0xd3 */ + 0xa8, 0x8f, 0x2e, 0xfd, 0x01, 0x92, 0x38, 0xab, 0xa8, 0xb5, 0x65, 0x65, 0x9b, 0x65, 0xc4, 0x34, /* Byte value: 0xd4 */ + 0x5b, 0x18, 0xde, 0xb9, 0x2e, 0x98, 0x9f, 0x29, 0x5b, 0xdb, 0xce, 0xce, 0x05, 0xce, 0x08, 0x94, /* Byte value: 0xd5 */ + 0x8f, 0xe7, 0x9a, 0x8a, 0xa3, 0x7e, 0x74, 0xa9, 0x8f, 0x16, 0x20, 0x20, 0x8c, 0x20, 0x5d, 0xec, /* Byte value: 0xd6 */ + 0x04, 0xc9, 0xed, 0x3d, 0x3b, 0x33, 0x41, 0x49, 0x04, 0xfe, 0x63, 0x63, 0x13, 0x63, 0x47, 0xb6, /* Byte value: 0xd7 */ + 0xa6, 0x92, 0x4d, 0x45, 0xb0, 0x3f, 0x3a, 0xb5, 0xa6, 0x0b, 0x10, 0x10, 0x46, 0x10, 0xcf, 0x76, /* Byte value: 0xd8 */ + 0x72, 0x6d, 0x09, 0x76, 0x3d, 0xd9, 0xd1, 0x35, 0x72, 0xc6, 0xfe, 0xfe, 0xcf, 0xfe, 0x9a, 0x0e, /* Byte value: 0xd9 */ + 0xba, 0xa8, 0x8b, 0xf6, 0x11, 0xa6, 0x3e, 0x89, 0xba, 0xb4, 0xfa, 0xfa, 0x3f, 0xfa, 0xd9, 0xf2, /* Byte value: 0xda */ + 0x30, 0x25, 0x56, 0xdf, 0xf7, 0x97, 0x8a, 0xea, 0x30, 0x82, 0xd1, 0xd1, 0xd4, 0xd1, 0xa2, 0x64, /* Byte value: 0xdb */ + 0x4c, 0x55, 0x3c, 0x11, 0x7b, 0xe3, 0x59, 0xc1, 0x4c, 0xfa, 0x5a, 0x5a, 0xc6, 0x5a, 0x33, 0x28, /* Byte value: 0xdc */ + 0x82, 0xdc, 0xc4, 0x53, 0x90, 0x57, 0x36, 0xf1, 0x82, 0x09, 0xed, 0xed, 0xcd, 0xed, 0xf5, 0x39, /* Byte value: 0xdd */ + 0x6a, 0x9e, 0x22, 0xf8, 0xa7, 0x73, 0x94, 0x40, 0x6a, 0x87, 0x77, 0x77, 0xa5, 0x77, 0xcb, 0x3c, /* Byte value: 0xde */ + 0x88, 0x08, 0x4a, 0xd6, 0x1a, 0xc9, 0x75, 0xa6, 0x88, 0x49, 0xfb, 0xfb, 0x03, 0xfb, 0xb9, 0xcd, /* Byte value: 0xdf */ + 0x3c, 0xbd, 0xa2, 0x98, 0xba, 0xc2, 0x49, 0x31, 0x3c, 0x43, 0x74, 0x74, 0xe1, 0x74, 0x6b, 0x7d, /* Byte value: 0xe0 */ + 0x6e, 0x57, 0xcf, 0xc5, 0x9c, 0x40, 0xd5, 0x09, 0x6e, 0x79, 0x14, 0x14, 0xb6, 0x14, 0x8c, 0x8a, /* Byte value: 0xe1 */ + 0x0b, 0x77, 0x24, 0x1b, 0xf4, 0xe2, 0xc2, 0xd4, 0x0b, 0x9e, 0x7e, 0x7e, 0xba, 0x7e, 0x2d, 0x38, /* Byte value: 0xe2 */ + 0x9e, 0xe6, 0x02, 0xe0, 0x31, 0xce, 0x32, 0xcd, 0x9e, 0xb6, 0x07, 0x07, 0xb4, 0x07, 0xe3, 0xbd, /* Byte value: 0xe3 */ + 0x68, 0x1b, 0xb5, 0x07, 0x5b, 0x8b, 0x55, 0x85, 0x68, 0xf8, 0xa7, 0xa7, 0x4d, 0xa7, 0x09, 0x67, /* Byte value: 0xe4 */ + 0x67, 0xa5, 0x7c, 0x21, 0x94, 0x5a, 0xd6, 0x18, 0x67, 0x98, 0xba, 0xba, 0xe4, 0xba, 0x63, 0xe9, /* Byte value: 0xe5 */ + 0xc5, 0xfe, 0xdc, 0x59, 0x1f, 0x56, 0xad, 0xe4, 0xc5, 0x6d, 0xc9, 0xc9, 0xb1, 0xc9, 0xeb, 0x29, /* Byte value: 0xe6 */ + 0x74, 0x21, 0x73, 0xb4, 0xfa, 0x12, 0x51, 0xb9, 0x74, 0x47, 0x4d, 0x4d, 0x34, 0x4d, 0x1f, 0xe3, /* Byte value: 0xe7 */ + 0x40, 0xcd, 0xc8, 0x56, 0x36, 0xb6, 0x9a, 0x1a, 0x40, 0x3b, 0xff, 0xff, 0xf3, 0xff, 0xfa, 0x31, /* Byte value: 0xe8 */ + 0x0c, 0x98, 0xf4, 0x47, 0x4d, 0x55, 0xc3, 0xdb, 0x0c, 0xc1, 0xa5, 0xa5, 0x35, 0xa5, 0xc9, 0x19, /* Byte value: 0xe9 */ + 0xe7, 0xfc, 0x2f, 0x8d, 0xf8, 0xf5, 0x21, 0x2c, 0xe7, 0xee, 0x87, 0x87, 0xc1, 0x87, 0x54, 0x8b, /* Byte value: 0xea */ + 0x9d, 0xc0, 0x3f, 0x81, 0xb3, 0x4a, 0x72, 0x8b, 0x9d, 0x17, 0xbf, 0xbf, 0x28, 0xbf, 0x40, 0x2a, /* Byte value: 0xeb */ + 0x90, 0xfb, 0x61, 0x58, 0x80, 0x63, 0x30, 0xd3, 0x90, 0x08, 0x72, 0x72, 0x69, 0x72, 0xe8, 0xff, /* Byte value: 0xec */ + 0x7a, 0x3c, 0x10, 0x0c, 0x4b, 0xbf, 0x53, 0xa7, 0x7a, 0xf9, 0x38, 0x38, 0xe9, 0x38, 0x14, 0xa1, /* Byte value: 0xed */ + 0x3a, 0xf1, 0xd8, 0x5a, 0x7d, 0x09, 0xc9, 0xbd, 0x3a, 0xc2, 0xc7, 0xc7, 0x1a, 0xc7, 0xee, 0x90, /* Byte value: 0xee */ + 0x35, 0x4f, 0x11, 0x7c, 0xb2, 0xd8, 0x4a, 0x20, 0x35, 0xa2, 0xda, 0xda, 0xb3, 0xda, 0x84, 0x1e, /* Byte value: 0xef */ + 0x34, 0xec, 0xbb, 0xe2, 0xcc, 0xa4, 0xcb, 0xa3, 0x34, 0x7c, 0xb2, 0xb2, 0xc7, 0xb2, 0xe5, 0xd2, /* Byte value: 0xf0 */ + 0x9f, 0x45, 0xa8, 0x7e, 0x4f, 0xb2, 0xb3, 0x4e, 0x9f, 0x68, 0x6f, 0x6f, 0xc0, 0x6f, 0x82, 0x71, /* Byte value: 0xf1 */ + 0xb7, 0x93, 0xd5, 0x2f, 0x22, 0x8f, 0x7c, 0xd1, 0xb7, 0xab, 0x37, 0x37, 0x7e, 0x37, 0x71, 0x27, /* Byte value: 0xf2 */ + 0xf8, 0xe0, 0xd4, 0x5f, 0xdb, 0xe8, 0x65, 0x56, 0xf8, 0xf0, 0xd5, 0xd5, 0x24, 0xd5, 0xe1, 0x98, /* Byte value: 0xf3 */ + 0x4f, 0x73, 0x01, 0x70, 0xf9, 0x67, 0x19, 0x87, 0x4f, 0x5b, 0xe2, 0xe2, 0x5a, 0xe2, 0x90, 0xbf, /* Byte value: 0xf4 */ + 0x6b, 0x3d, 0x88, 0x66, 0xd9, 0x0f, 0x15, 0xc3, 0x6b, 0x59, 0x1f, 0x1f, 0xd1, 0x1f, 0xaa, 0xf0, /* Byte value: 0xf5 */ + 0x83, 0x7f, 0x6e, 0xcd, 0xee, 0x2b, 0xb7, 0x72, 0x83, 0xd7, 0x85, 0x85, 0xb9, 0x85, 0x94, 0xf5, /* Byte value: 0xf6 */ + 0x5f, 0xd1, 0x33, 0x84, 0x15, 0xab, 0xde, 0x60, 0x5f, 0x25, 0xad, 0xad, 0x16, 0xad, 0x4f, 0x22, /* Byte value: 0xf7 */ + 0xa7, 0x31, 0xe7, 0xdb, 0xce, 0x43, 0xbb, 0x36, 0xa7, 0xd5, 0x78, 0x78, 0x32, 0x78, 0xae, 0xba, /* Byte value: 0xf8 */ + 0x1e, 0xbf, 0x51, 0x4c, 0x5d, 0x61, 0xc5, 0xf9, 0x1e, 0xc0, 0x3a, 0x3a, 0x91, 0x3a, 0xd4, 0xdf, /* Byte value: 0xf9 */ + 0x10, 0xa2, 0x32, 0xf4, 0xec, 0xcc, 0xc7, 0xe7, 0x10, 0x7e, 0x4f, 0x4f, 0x4c, 0x4f, 0xdf, 0x9d, /* Byte value: 0xfa */ + 0xc3, 0xb2, 0xa6, 0x9b, 0xd8, 0x9d, 0x2d, 0x68, 0xc3, 0xec, 0x7a, 0x7a, 0x4a, 0x7a, 0x6e, 0xc4, /* Byte value: 0xfb */ + 0x78, 0xb9, 0x87, 0xf3, 0xb7, 0x47, 0x92, 0x62, 0x78, 0x86, 0xe8, 0xe8, 0x01, 0xe8, 0xd6, 0xfa, /* Byte value: 0xfc */ + 0x2d, 0xbc, 0x3a, 0xf2, 0x28, 0x72, 0x0f, 0x55, 0x2d, 0xe3, 0x53, 0x53, 0xd9, 0x53, 0xd5, 0x2c, /* Byte value: 0xfd */ + 0x77, 0x07, 0x4e, 0xd5, 0x78, 0x96, 0x11, 0xff, 0x77, 0xe6, 0xf5, 0xf5, 0xa8, 0xf5, 0xbc, 0x74, /* Byte value: 0xfe */ + 0xe3, 0x35, 0xc2, 0xb0, 0xc3, 0xc6, 0x60, 0x65, 0xe3, 0x10, 0xe4, 0xe4, 0xd2, 0xe4, 0x13, 0x3d, /* Byte value: 0xff */ + 0x80, 0x59, 0x53, 0xac, 0x6c, 0xaf, 0xf7, 0x34, 0x80, 0x76, 0x3d, 0x3d, 0x25, 0x3d, 0x37, 0x62, /* Byte value: 0x00 */ + + /* Matrix row: 14 */ + 0x0a, 0xaf, 0x45, 0x6e, 0xf6, 0x73, 0x56, 0xfb, 0x47, 0x1c, 0xd5, 0xc8, 0x66, 0x2c, 0x64, 0xb5, /* Byte value: 0x01 */ + 0xca, 0x52, 0x68, 0xe5, 0x24, 0x5b, 0xd9, 0x08, 0xeb, 0x1e, 0xe0, 0x5e, 0xac, 0x6b, 0x2f, 0x0a, /* Byte value: 0x02 */ + 0xf3, 0x80, 0xf6, 0x75, 0x2e, 0x6a, 0xc5, 0xcb, 0x78, 0x58, 0xd0, 0xcf, 0x08, 0x95, 0x86, 0x89, /* Byte value: 0x03 */ + 0x17, 0x4e, 0xcb, 0x70, 0x06, 0xae, 0xb5, 0x41, 0x71, 0x83, 0x10, 0xce, 0xdd, 0xeb, 0x67, 0xc0, /* Byte value: 0x04 */ + 0x33, 0x7d, 0xdb, 0xfe, 0xfc, 0x42, 0x4a, 0x38, 0xd4, 0x5a, 0xe5, 0x59, 0xc2, 0xd2, 0xcd, 0x36, /* Byte value: 0x05 */ + 0x5f, 0x28, 0xeb, 0xaf, 0x31, 0xb5, 0x88, 0xb3, 0xf8, 0xf2, 0x39, 0x23, 0xe3, 0x99, 0xf0, 0xef, /* Byte value: 0x06 */ + 0xa3, 0xb1, 0x9b, 0x83, 0x92, 0x74, 0x30, 0x1f, 0x05, 0xb8, 0xb7, 0x40, 0xbe, 0x36, 0x20, 0x68, /* Byte value: 0x07 */ + 0x37, 0x3b, 0x27, 0xad, 0x21, 0xa2, 0xd7, 0x88, 0x43, 0x3d, 0xf8, 0xf7, 0xfe, 0x14, 0x9a, 0xaa, /* Byte value: 0x08 */ + 0x2a, 0xda, 0xa9, 0xb3, 0xd1, 0x7f, 0x34, 0x32, 0x75, 0xa2, 0x3d, 0xf1, 0x45, 0xd3, 0x99, 0xdf, /* Byte value: 0x09 */ + 0xc9, 0x81, 0x29, 0x49, 0x0d, 0x13, 0xc0, 0x7c, 0x14, 0xa5, 0x99, 0xc3, 0xbd, 0xd8, 0x80, 0x63, /* Byte value: 0x0a */ + 0x67, 0x0a, 0x4a, 0x5b, 0x9d, 0xbc, 0x22, 0x5c, 0x3e, 0xdd, 0x9f, 0x78, 0x48, 0xb7, 0x3c, 0x4b, /* Byte value: 0x0b */ + 0xd3, 0xf5, 0x1a, 0xa8, 0x09, 0x66, 0xa7, 0x02, 0x4a, 0xe6, 0x38, 0xf6, 0x2b, 0x6a, 0x7b, 0xe3, /* Byte value: 0x0c */ + 0x63, 0x4c, 0xb6, 0x08, 0x40, 0x5c, 0xbf, 0xec, 0xa9, 0xba, 0x82, 0xd6, 0x74, 0x71, 0x6b, 0xd7, /* Byte value: 0x0d */ + 0x84, 0x51, 0xca, 0xa1, 0x41, 0xd0, 0xd6, 0x12, 0x5f, 0xda, 0x3b, 0x4a, 0xb0, 0xbc, 0x25, 0xf7, /* Byte value: 0x0e */ + 0xf7, 0xc6, 0x0a, 0x26, 0xf3, 0x8a, 0x58, 0x7b, 0xef, 0x3f, 0xcd, 0x61, 0x34, 0x53, 0xd1, 0x15, /* Byte value: 0x0f */ + 0x3c, 0x64, 0x5d, 0xa7, 0x71, 0xe9, 0x37, 0x5f, 0x51, 0x48, 0xbb, 0xf5, 0x97, 0xe8, 0x9b, 0x38, /* Byte value: 0x10 */ + 0xea, 0x27, 0x84, 0x38, 0x03, 0x57, 0xbb, 0xc1, 0xd9, 0xa0, 0x08, 0x67, 0x8f, 0x94, 0xd2, 0x60, /* Byte value: 0x11 */ + 0x65, 0x29, 0x34, 0x93, 0x12, 0xcc, 0x8d, 0x04, 0x94, 0x0f, 0x70, 0x2f, 0x56, 0xd4, 0xf6, 0x05, /* Byte value: 0x12 */ + 0xd0, 0x26, 0x5b, 0x04, 0x20, 0x2e, 0xbe, 0x76, 0xb5, 0x5d, 0x41, 0x6b, 0x3a, 0xd9, 0xd4, 0x8a, /* Byte value: 0x13 */ + 0x9e, 0x25, 0xf9, 0x40, 0x45, 0xa5, 0xb1, 0x6c, 0x01, 0x99, 0x9a, 0x7f, 0x26, 0x0e, 0xde, 0x77, /* Byte value: 0x14 */ + 0x18, 0x57, 0x4d, 0x29, 0x8b, 0x05, 0xc8, 0x26, 0xf4, 0x91, 0x4e, 0x62, 0x88, 0xd1, 0x31, 0xce, /* Byte value: 0x15 */ + 0xf4, 0x15, 0x4b, 0x8a, 0xda, 0xc2, 0x41, 0x0f, 0x10, 0x84, 0xb4, 0xfc, 0x25, 0xe0, 0x7e, 0x7c, /* Byte value: 0x16 */ + 0xaf, 0x7b, 0x5c, 0x76, 0x36, 0x97, 0x54, 0x0c, 0x7f, 0x11, 0x90, 0x71, 0xfa, 0xbf, 0xd9, 0x0f, /* Byte value: 0x17 */ + 0xcc, 0x37, 0xea, 0x7e, 0x76, 0xcb, 0xeb, 0xe0, 0xd6, 0xab, 0x12, 0xa7, 0x8e, 0xce, 0xb2, 0xd8, /* Byte value: 0x18 */ + 0x7a, 0xeb, 0xc4, 0x45, 0x6d, 0x61, 0xc1, 0xe6, 0x08, 0x42, 0x5a, 0x7e, 0xf3, 0x70, 0x3f, 0x3e, /* Byte value: 0x19 */ + 0x83, 0xc4, 0x77, 0x5e, 0xb5, 0x78, 0x52, 0xd6, 0x37, 0x06, 0x5f, 0x79, 0x9d, 0xc9, 0xdd, 0x02, /* Byte value: 0x1a */ + 0x9d, 0xf6, 0xb8, 0xec, 0x6c, 0xed, 0xa8, 0x18, 0xfe, 0x22, 0xe3, 0xe2, 0x37, 0xbd, 0x71, 0x1e, /* Byte value: 0x1b */ + 0x81, 0xe7, 0x09, 0x96, 0x3a, 0x08, 0xfd, 0x8e, 0x9d, 0xd4, 0xb0, 0x2e, 0x83, 0xaa, 0x17, 0x4c, /* Byte value: 0x1c */ + 0xad, 0x58, 0x22, 0xbe, 0xb9, 0xe7, 0xfb, 0x54, 0xd5, 0xc3, 0x7f, 0x26, 0xe4, 0xdc, 0x13, 0x41, /* Byte value: 0x1d */ + 0xa9, 0x1e, 0xde, 0xed, 0x64, 0x07, 0x66, 0xe4, 0x42, 0xa4, 0x62, 0x88, 0xd8, 0x1a, 0x44, 0xdd, /* Byte value: 0x1e */ + 0xfc, 0x99, 0x70, 0x2c, 0xa3, 0xc1, 0xb8, 0xac, 0xfd, 0x4a, 0x8e, 0x63, 0x5d, 0xaf, 0xd0, 0x87, /* Byte value: 0x1f */ + 0x73, 0x97, 0xc0, 0x87, 0xb2, 0x5a, 0x8e, 0x69, 0xb0, 0xe5, 0xf6, 0x2b, 0x84, 0xef, 0xf4, 0xe2, /* Byte value: 0x20 */ + 0xb0, 0xb9, 0xac, 0xa0, 0x49, 0x3a, 0x18, 0xee, 0xe3, 0x5c, 0xba, 0x20, 0x5f, 0x1b, 0x10, 0x34, /* Byte value: 0x21 */ + 0x77, 0xd1, 0x3c, 0xd4, 0x6f, 0xba, 0x13, 0xd9, 0x27, 0x82, 0xeb, 0x85, 0xb8, 0x29, 0xa3, 0x7e, /* Byte value: 0x22 */ + 0xa5, 0xd4, 0x19, 0x18, 0xc0, 0xe4, 0x02, 0xf7, 0x38, 0x0d, 0x45, 0xb9, 0x9c, 0x93, 0xbd, 0xba, /* Byte value: 0x23 */ + 0x46, 0x8f, 0x99, 0xe2, 0x1c, 0x88, 0xf6, 0xb9, 0x59, 0x0a, 0xe1, 0x8b, 0x64, 0x98, 0xa4, 0x06, /* Byte value: 0x24 */ + 0x10, 0xdb, 0x76, 0x8f, 0xf2, 0x06, 0x31, 0x85, 0x19, 0x5f, 0x74, 0xfd, 0xf0, 0x9e, 0x9f, 0x35, /* Byte value: 0x25 */ + 0x2b, 0x2a, 0x96, 0xd7, 0x77, 0x47, 0x82, 0x1e, 0x20, 0xcb, 0xab, 0x3b, 0x4a, 0x03, 0xfc, 0xf8, /* Byte value: 0x26 */ + 0x87, 0x82, 0x8b, 0x0d, 0x68, 0x98, 0xcf, 0x66, 0xa0, 0x61, 0x42, 0xd7, 0xa1, 0x0f, 0x8a, 0x9e, /* Byte value: 0x27 */ + 0xf9, 0x2f, 0xb3, 0x1b, 0xd8, 0x19, 0x93, 0x30, 0x3f, 0x44, 0x05, 0x07, 0x6e, 0xb9, 0xe2, 0x3c, /* Byte value: 0x28 */ + 0xd8, 0xaa, 0x60, 0xa2, 0x59, 0x2d, 0x47, 0xd5, 0x58, 0x93, 0x7b, 0xf4, 0x42, 0x96, 0x7a, 0x71, /* Byte value: 0x29 */ + 0x80, 0x17, 0x36, 0xf2, 0x9c, 0x30, 0x4b, 0xa2, 0xc8, 0xbd, 0x26, 0xe4, 0x8c, 0x7a, 0x72, 0x6b, /* Byte value: 0x2a */ + 0x34, 0xe8, 0x66, 0x01, 0x08, 0xea, 0xce, 0xfc, 0xbc, 0x86, 0x81, 0x6a, 0xef, 0xa7, 0x35, 0xc3, /* Byte value: 0x2b */ + 0x31, 0x5e, 0xa5, 0x36, 0x73, 0x32, 0xe5, 0x60, 0x7e, 0x88, 0x0a, 0x0e, 0xdc, 0xb1, 0x07, 0x78, /* Byte value: 0x2c */ + 0x6f, 0x86, 0x71, 0xfd, 0xe4, 0xbf, 0xdb, 0xff, 0xd3, 0x13, 0xa5, 0xe7, 0x30, 0xf8, 0x92, 0xb0, /* Byte value: 0x2d */ + 0x4d, 0xd0, 0xe3, 0xe8, 0x4c, 0xc3, 0x16, 0x6e, 0x4b, 0x7f, 0xa2, 0x89, 0x0d, 0x64, 0xa5, 0x94, /* Byte value: 0x2e */ + 0xd5, 0x90, 0x98, 0x33, 0x5b, 0xf6, 0x95, 0xea, 0x77, 0x53, 0xca, 0x0f, 0x09, 0xcf, 0xe6, 0x31, /* Byte value: 0x2f */ + 0xa6, 0x07, 0x58, 0xb4, 0xe9, 0xac, 0x1b, 0x83, 0xc7, 0xb6, 0x3c, 0x24, 0x8d, 0x20, 0x12, 0xd3, /* Byte value: 0x30 */ + 0xba, 0x16, 0xe9, 0xce, 0xbf, 0x49, 0x4e, 0x15, 0xa4, 0x40, 0x6f, 0xe8, 0x39, 0x37, 0x74, 0x81, /* Byte value: 0x31 */ + 0x62, 0xbc, 0x89, 0x6c, 0xe6, 0x64, 0x09, 0xc0, 0xfc, 0xd3, 0x14, 0x1c, 0x7b, 0xa1, 0x0e, 0xf0, /* Byte value: 0x32 */ + 0x9a, 0x63, 0x05, 0x13, 0x98, 0x45, 0x2c, 0xdc, 0x96, 0xfe, 0x87, 0xd1, 0x1a, 0xc8, 0x89, 0xeb, /* Byte value: 0x33 */ + 0x61, 0x6f, 0xc8, 0xc0, 0xcf, 0x2c, 0x10, 0xb4, 0x03, 0x68, 0x6d, 0x81, 0x6a, 0x12, 0xa1, 0x99, /* Byte value: 0x34 */ + 0x5d, 0x0b, 0x95, 0x67, 0xbe, 0xc5, 0x27, 0xeb, 0x52, 0x20, 0xd6, 0x74, 0xfd, 0xfa, 0x3a, 0xa1, /* Byte value: 0x35 */ + 0xa8, 0xee, 0xe1, 0x89, 0xc2, 0x3f, 0xd0, 0xc8, 0x17, 0xcd, 0xf4, 0x42, 0xd7, 0xca, 0x21, 0xfa, /* Byte value: 0x36 */ + 0x98, 0x40, 0x7b, 0xdb, 0x17, 0x35, 0x83, 0x84, 0x3c, 0x2c, 0x68, 0x86, 0x04, 0xab, 0x43, 0xa5, /* Byte value: 0x37 */ + 0x21, 0x85, 0xd3, 0xb9, 0x81, 0x34, 0xd4, 0xe5, 0x67, 0xd7, 0x7e, 0xf3, 0x2c, 0x2f, 0x98, 0x4d, /* Byte value: 0x38 */ + 0x6d, 0xa5, 0x0f, 0x35, 0x6b, 0xcf, 0x74, 0xa7, 0x79, 0xc1, 0x4a, 0xb0, 0x2e, 0x9b, 0x58, 0xfe, /* Byte value: 0x39 */ + 0xfa, 0xfc, 0xf2, 0xb7, 0xf1, 0x51, 0x8a, 0x44, 0xc0, 0xff, 0x7c, 0x9a, 0x7f, 0x0a, 0x4d, 0x55, /* Byte value: 0x3a */ + 0x1d, 0xe1, 0x8e, 0x1e, 0xf0, 0xdd, 0xe3, 0xba, 0x36, 0x9f, 0xc5, 0x06, 0xbb, 0xc7, 0x03, 0x75, /* Byte value: 0x3b */ + 0xe2, 0xab, 0xbf, 0x9e, 0x7a, 0x54, 0x42, 0x62, 0x34, 0x6e, 0x32, 0xf8, 0xf7, 0xdb, 0x7c, 0x9b, /* Byte value: 0x3c */ + 0x48, 0x66, 0x20, 0xdf, 0x37, 0x1b, 0x3d, 0xf2, 0x89, 0x71, 0x29, 0xed, 0x3e, 0x72, 0x97, 0x2f, /* Byte value: 0x3d */ + 0x93, 0x1f, 0x01, 0xd1, 0x47, 0x7e, 0x63, 0x53, 0x2e, 0x59, 0x2b, 0x84, 0x6d, 0x57, 0x42, 0x37, /* Byte value: 0x3e */ + 0xb3, 0x6a, 0xed, 0x0c, 0x60, 0x72, 0x01, 0x9a, 0x1c, 0xe7, 0xc3, 0xbd, 0x4e, 0xa8, 0xbf, 0x5d, /* Byte value: 0x3f */ + 0x57, 0xa4, 0xd0, 0x09, 0x48, 0xb6, 0x71, 0x10, 0x15, 0x3c, 0x03, 0xbc, 0x9b, 0xd6, 0x5e, 0x14, /* Byte value: 0x40 */ + 0x70, 0x44, 0x81, 0x2b, 0x9b, 0x12, 0x97, 0x1d, 0x4f, 0x5e, 0x8f, 0xb6, 0x95, 0x5c, 0x5b, 0x8b, /* Byte value: 0x41 */ + 0x19, 0xa7, 0x72, 0x4d, 0x2d, 0x3d, 0x7e, 0x0a, 0xa1, 0xf8, 0xd8, 0xa8, 0x87, 0x01, 0x54, 0xe9, /* Byte value: 0x42 */ + 0x6e, 0x76, 0x4e, 0x99, 0x42, 0x87, 0x6d, 0xd3, 0x86, 0x7a, 0x33, 0x2d, 0x3f, 0x28, 0xf7, 0x97, /* Byte value: 0x43 */ + 0xbc, 0x73, 0x6b, 0x55, 0xed, 0xd9, 0x7c, 0xfd, 0x99, 0xf5, 0x9d, 0x11, 0x1b, 0x92, 0xe9, 0x53, /* Byte value: 0x44 */ + 0x3d, 0x94, 0x62, 0xc3, 0xd7, 0xd1, 0x81, 0x73, 0x04, 0x21, 0x2d, 0x3f, 0x98, 0x38, 0xfe, 0x1f, /* Byte value: 0x45 */ + 0x13, 0x08, 0x37, 0x23, 0xdb, 0x4e, 0x28, 0xf1, 0xe6, 0xe4, 0x0d, 0x60, 0xe1, 0x2d, 0x30, 0x5c, /* Byte value: 0x46 */ + 0x86, 0x72, 0xb4, 0x69, 0xce, 0xa0, 0x79, 0x4a, 0xf5, 0x08, 0xd4, 0x1d, 0xae, 0xdf, 0xef, 0xb9, /* Byte value: 0x47 */ + 0xdb, 0x79, 0x21, 0x0e, 0x70, 0x65, 0x5e, 0xa1, 0xa7, 0x28, 0x02, 0x69, 0x53, 0x25, 0xd5, 0x18, /* Byte value: 0x48 */ + 0x4a, 0x45, 0x5e, 0x17, 0xb8, 0x6b, 0x92, 0xaa, 0x23, 0xa3, 0xc6, 0xba, 0x20, 0x11, 0x5d, 0x61, /* Byte value: 0x49 */ + 0x03, 0xd3, 0x41, 0xac, 0x29, 0x48, 0x19, 0x74, 0xff, 0xbb, 0x79, 0x9d, 0x11, 0xb3, 0xaf, 0x69, /* Byte value: 0x4a */ + 0x32, 0x8d, 0xe4, 0x9a, 0x5a, 0x7a, 0xfc, 0x14, 0x81, 0x33, 0x73, 0x93, 0xcd, 0x02, 0xa8, 0x11, /* Byte value: 0x4b */ + 0xbb, 0xe6, 0xd6, 0xaa, 0x19, 0x71, 0xf8, 0x39, 0xf1, 0x29, 0xf9, 0x22, 0x36, 0xe7, 0x11, 0xa6, /* Byte value: 0x4c */ + 0x47, 0x7f, 0xa6, 0x86, 0xba, 0xb0, 0x40, 0x95, 0x0c, 0x63, 0x77, 0x41, 0x6b, 0x48, 0xc1, 0x21, /* Byte value: 0x4d */ + 0x59, 0x4d, 0x69, 0x34, 0x63, 0x25, 0xba, 0x5b, 0xc5, 0x47, 0xcb, 0xda, 0xc1, 0x3c, 0x6d, 0x3d, /* Byte value: 0x4e */ + 0x7e, 0xad, 0x38, 0x16, 0xb0, 0x81, 0x5c, 0x56, 0x9f, 0x25, 0x47, 0xd0, 0xcf, 0xb6, 0x68, 0xa2, /* Byte value: 0x4f */ + 0xe4, 0xce, 0x3d, 0x05, 0x28, 0xc4, 0x70, 0x8a, 0x09, 0xdb, 0xc0, 0x01, 0xd5, 0x7e, 0xe1, 0x49, /* Byte value: 0x50 */ + 0xc1, 0x0d, 0x12, 0xef, 0x74, 0x10, 0x39, 0xdf, 0xf9, 0x6b, 0xa3, 0x5c, 0xc5, 0x97, 0x2e, 0x98, /* Byte value: 0x51 */ + 0x45, 0x5c, 0xd8, 0x4e, 0x35, 0xc0, 0xef, 0xcd, 0xa6, 0xb1, 0x98, 0x16, 0x75, 0x2b, 0x0b, 0x6f, /* Byte value: 0x52 */ + 0x40, 0xea, 0x1b, 0x79, 0x4e, 0x18, 0xc4, 0x51, 0x64, 0xbf, 0x13, 0x72, 0x46, 0x3d, 0x39, 0xd4, /* Byte value: 0x53 */ + 0x9c, 0x06, 0x87, 0x88, 0xca, 0xd5, 0x1e, 0x34, 0xab, 0x4b, 0x75, 0x28, 0x38, 0x6d, 0x14, 0x39, /* Byte value: 0x54 */ + 0x2d, 0x4f, 0x14, 0x4c, 0x25, 0xd7, 0xb0, 0xf6, 0x1d, 0x7e, 0x59, 0xc2, 0x68, 0xa6, 0x61, 0x2a, /* Byte value: 0x55 */ + 0xda, 0x89, 0x1e, 0x6a, 0xd6, 0x5d, 0xe8, 0x8d, 0xf2, 0x41, 0x94, 0xa3, 0x5c, 0xf5, 0xb0, 0x3f, /* Byte value: 0x56 */ + 0x28, 0xf9, 0xd7, 0x7b, 0x5e, 0x0f, 0x9b, 0x6a, 0xdf, 0x70, 0xd2, 0xa6, 0x5b, 0xb0, 0x53, 0x91, /* Byte value: 0x57 */ + 0xc0, 0xfd, 0x2d, 0x8b, 0xd2, 0x28, 0x8f, 0xf3, 0xac, 0x02, 0x35, 0x96, 0xca, 0x47, 0x4b, 0xbf, /* Byte value: 0x58 */ + 0x76, 0x21, 0x03, 0xb0, 0xc9, 0x82, 0xa5, 0xf5, 0x72, 0xeb, 0x7d, 0x4f, 0xb7, 0xf9, 0xc6, 0x59, /* Byte value: 0x59 */ + 0xdf, 0x3f, 0xdd, 0x5d, 0xad, 0x85, 0xc3, 0x11, 0x30, 0x4f, 0x1f, 0xc7, 0x6f, 0xe3, 0x82, 0x84, /* Byte value: 0x5a */ + 0x8d, 0x2d, 0xce, 0x63, 0x9e, 0xeb, 0x99, 0x9d, 0xe7, 0x7d, 0x97, 0x1f, 0xc7, 0x23, 0xee, 0x2b, /* Byte value: 0x5b */ + 0x8b, 0x48, 0x4c, 0xf8, 0xcc, 0x7b, 0xab, 0x75, 0xda, 0xc8, 0x65, 0xe6, 0xe5, 0x86, 0x73, 0xf9, /* Byte value: 0x5c */ + 0x15, 0x6d, 0xb5, 0xb8, 0x89, 0xde, 0x1a, 0x19, 0xdb, 0x51, 0xff, 0x99, 0xc3, 0x88, 0xad, 0x8e, /* Byte value: 0x5d */ + 0x5b, 0x6e, 0x17, 0xfc, 0xec, 0x55, 0x15, 0x03, 0x6f, 0x95, 0x24, 0x8d, 0xdf, 0x5f, 0xa7, 0x73, /* Byte value: 0x5e */ + 0x66, 0xfa, 0x75, 0x3f, 0x3b, 0x84, 0x94, 0x70, 0x6b, 0xb4, 0x09, 0xb2, 0x47, 0x67, 0x59, 0x6c, /* Byte value: 0x5f */ + 0xb5, 0x0f, 0x6f, 0x97, 0x32, 0xe2, 0x33, 0x72, 0x21, 0x52, 0x31, 0x44, 0x6c, 0x0d, 0x22, 0x8f, /* Byte value: 0x60 */ + 0xe0, 0x88, 0xc1, 0x56, 0xf5, 0x24, 0xed, 0x3a, 0x9e, 0xbc, 0xdd, 0xaf, 0xe9, 0xb8, 0xb6, 0xd5, /* Byte value: 0x61 */ + 0x6c, 0x55, 0x30, 0x51, 0xcd, 0xf7, 0xc2, 0x8b, 0x2c, 0xa8, 0xdc, 0x7a, 0x21, 0x4b, 0x3d, 0xd9, /* Byte value: 0x62 */ + 0xa2, 0x41, 0xa4, 0xe7, 0x34, 0x4c, 0x86, 0x33, 0x50, 0xd1, 0x21, 0x8a, 0xb1, 0xe6, 0x45, 0x4f, /* Byte value: 0x63 */ + 0xd4, 0x60, 0xa7, 0x57, 0xfd, 0xce, 0x23, 0xc6, 0x22, 0x3a, 0x5c, 0xc5, 0x06, 0x1f, 0x83, 0x16, /* Byte value: 0x64 */ + 0x5a, 0x9e, 0x28, 0x98, 0x4a, 0x6d, 0xa3, 0x2f, 0x3a, 0xfc, 0xb2, 0x47, 0xd0, 0x8f, 0xc2, 0x54, /* Byte value: 0x65 */ + 0xbf, 0xa0, 0x2a, 0xf9, 0xc4, 0x91, 0x65, 0x89, 0x66, 0x4e, 0xe4, 0x8c, 0x0a, 0x21, 0x46, 0x3a, /* Byte value: 0x66 */ + 0x78, 0xc8, 0xba, 0x8d, 0xe2, 0x11, 0x6e, 0xbe, 0xa2, 0x90, 0xb5, 0x29, 0xed, 0x13, 0xf5, 0x70, /* Byte value: 0x67 */ + 0x1e, 0x32, 0xcf, 0xb2, 0xd9, 0x95, 0xfa, 0xce, 0xc9, 0x24, 0xbc, 0x9b, 0xaa, 0x74, 0xac, 0x1c, /* Byte value: 0x68 */ + 0x07, 0x95, 0xbd, 0xff, 0xf4, 0xa8, 0x84, 0xc4, 0x68, 0xdc, 0x64, 0x33, 0x2d, 0x75, 0xf8, 0xf5, /* Byte value: 0x69 */ + 0x82, 0x34, 0x48, 0x3a, 0x13, 0x40, 0xe4, 0xfa, 0x62, 0x6f, 0xc9, 0xb3, 0x92, 0x19, 0xb8, 0x25, /* Byte value: 0x6a */ + 0x68, 0x13, 0xcc, 0x02, 0x10, 0x17, 0x5f, 0x3b, 0xbb, 0xcf, 0xc1, 0xd4, 0x1d, 0x8d, 0x6a, 0x45, /* Byte value: 0x6b */ + 0x12, 0xf8, 0x08, 0x47, 0x7d, 0x76, 0x9e, 0xdd, 0xb3, 0x8d, 0x9b, 0xaa, 0xee, 0xfd, 0x55, 0x7b, /* Byte value: 0x6c */ + 0x58, 0xbd, 0x56, 0x50, 0xc5, 0x1d, 0x0c, 0x77, 0x90, 0x2e, 0x5d, 0x10, 0xce, 0xec, 0x08, 0x1a, /* Byte value: 0x6d */ + 0x8f, 0x0e, 0xb0, 0xab, 0x11, 0x9b, 0x36, 0xc5, 0x4d, 0xaf, 0x78, 0x48, 0xd9, 0x40, 0x24, 0x65, /* Byte value: 0x6e */ + 0xe1, 0x78, 0xfe, 0x32, 0x53, 0x1c, 0x5b, 0x16, 0xcb, 0xd5, 0x4b, 0x65, 0xe6, 0x68, 0xd3, 0xf2, /* Byte value: 0x6f */ + 0x36, 0xcb, 0x18, 0xc9, 0x87, 0x9a, 0x61, 0xa4, 0x16, 0x54, 0x6e, 0x3d, 0xf1, 0xc4, 0xff, 0x8d, /* Byte value: 0x70 */ + 0x74, 0x02, 0x7d, 0x78, 0x46, 0xf2, 0x0a, 0xad, 0xd8, 0x39, 0x92, 0x18, 0xa9, 0x9a, 0x0c, 0x17, /* Byte value: 0x71 */ + 0xff, 0x4a, 0x31, 0x80, 0x8a, 0x89, 0xa1, 0xd8, 0x02, 0xf1, 0xf7, 0xfe, 0x4c, 0x1c, 0x7f, 0xee, /* Byte value: 0x72 */ + 0x3a, 0x01, 0xdf, 0x3c, 0x23, 0x79, 0x05, 0xb7, 0x6c, 0xfd, 0x49, 0x0c, 0xb5, 0x4d, 0x06, 0xea, /* Byte value: 0x73 */ + 0x79, 0x38, 0x85, 0xe9, 0x44, 0x29, 0xd8, 0x92, 0xf7, 0xf9, 0x23, 0xe3, 0xe2, 0xc3, 0x90, 0x57, /* Byte value: 0x74 */ + 0xdd, 0x1c, 0xa3, 0x95, 0x22, 0xf5, 0x6c, 0x49, 0x9a, 0x9d, 0xf0, 0x90, 0x71, 0x80, 0x48, 0xca, /* Byte value: 0x75 */ + 0x54, 0x77, 0x91, 0xa5, 0x61, 0xfe, 0x68, 0x64, 0xea, 0x87, 0x7a, 0x21, 0x8a, 0x65, 0xf1, 0x7d, /* Byte value: 0x76 */ + 0x22, 0x56, 0x92, 0x15, 0xa8, 0x7c, 0xcd, 0x91, 0x98, 0x6c, 0x07, 0x6e, 0x3d, 0x9c, 0x37, 0x24, /* Byte value: 0x77 */ + 0x05, 0xb6, 0xc3, 0x37, 0x7b, 0xd8, 0x2b, 0x9c, 0xc2, 0x0e, 0x8b, 0x64, 0x33, 0x16, 0x32, 0xbb, /* Byte value: 0x78 */ + 0x88, 0x9b, 0x0d, 0x54, 0xe5, 0x33, 0xb2, 0x01, 0x25, 0x73, 0x1c, 0x7b, 0xf4, 0x35, 0xdc, 0x90, /* Byte value: 0x79 */ + 0x06, 0x65, 0x82, 0x9b, 0x52, 0x90, 0x32, 0xe8, 0x3d, 0xb5, 0xf2, 0xf9, 0x22, 0xa5, 0x9d, 0xd2, /* Byte value: 0x7a */ + 0x53, 0xe2, 0x2c, 0x5a, 0x95, 0x56, 0xec, 0xa0, 0x82, 0x5b, 0x1e, 0x12, 0xa7, 0x10, 0x09, 0x88, /* Byte value: 0x7b */ + 0x95, 0x7a, 0x83, 0x4a, 0x15, 0xee, 0x51, 0xbb, 0x13, 0xec, 0xd9, 0x7d, 0x4f, 0xf2, 0xdf, 0xe5, /* Byte value: 0x7c */ + 0xe9, 0xf4, 0xc5, 0x94, 0x2a, 0x1f, 0xa2, 0xb5, 0x26, 0x1b, 0x71, 0xfa, 0x9e, 0x27, 0x7d, 0x09, /* Byte value: 0x7d */ + 0xec, 0x42, 0x06, 0xa3, 0x51, 0xc7, 0x89, 0x29, 0xe4, 0x15, 0xfa, 0x9e, 0xad, 0x31, 0x4f, 0xb2, /* Byte value: 0x7e */ + 0x97, 0x59, 0xfd, 0x82, 0x9a, 0x9e, 0xfe, 0xe3, 0xb9, 0x3e, 0x36, 0x2a, 0x51, 0x91, 0x15, 0xab, /* Byte value: 0x7f */ + 0xd1, 0xd6, 0x64, 0x60, 0x86, 0x16, 0x08, 0x5a, 0xe0, 0x34, 0xd7, 0xa1, 0x35, 0x09, 0xb1, 0xad, /* Byte value: 0x80 */ + 0x69, 0xe3, 0xf3, 0x66, 0xb6, 0x2f, 0xe9, 0x17, 0xee, 0xa6, 0x57, 0x1e, 0x12, 0x5d, 0x0f, 0x62, /* Byte value: 0x81 */ + 0x6a, 0x30, 0xb2, 0xca, 0x9f, 0x67, 0xf0, 0x63, 0x11, 0x1d, 0x2e, 0x83, 0x03, 0xee, 0xa0, 0x0b, /* Byte value: 0x82 */ + 0x43, 0x39, 0x5a, 0xd5, 0x67, 0x50, 0xdd, 0x25, 0x9b, 0x04, 0x6a, 0xef, 0x57, 0x8e, 0x96, 0xbd, /* Byte value: 0x83 */ + 0x41, 0x1a, 0x24, 0x1d, 0xe8, 0x20, 0x72, 0x7d, 0x31, 0xd6, 0x85, 0xb8, 0x49, 0xed, 0x5c, 0xf3, /* Byte value: 0x84 */ + 0xae, 0x8b, 0x63, 0x12, 0x90, 0xaf, 0xe2, 0x20, 0x2a, 0x78, 0x06, 0xbb, 0xf5, 0x6f, 0xbc, 0x28, /* Byte value: 0x85 */ + 0x0c, 0xca, 0xc7, 0xf5, 0xa4, 0xe3, 0x64, 0x13, 0x7a, 0xa9, 0x27, 0x31, 0x44, 0x89, 0xf9, 0x67, /* Byte value: 0x86 */ + 0x7c, 0x8e, 0x46, 0xde, 0x3f, 0xf1, 0xf3, 0x0e, 0x35, 0xf7, 0xa8, 0x87, 0xd1, 0xd5, 0xa2, 0xec, /* Byte value: 0x87 */ + 0x5e, 0xd8, 0xd4, 0xcb, 0x97, 0x8d, 0x3e, 0x9f, 0xad, 0x9b, 0xaf, 0xe9, 0xec, 0x49, 0x95, 0xc8, /* Byte value: 0x88 */ + 0x44, 0xac, 0xe7, 0x2a, 0x93, 0xf8, 0x59, 0xe1, 0xf3, 0xd8, 0x0e, 0xdc, 0x7a, 0xfb, 0x6e, 0x48, /* Byte value: 0x89 */ + 0x25, 0xc3, 0x2f, 0xea, 0x5c, 0xd4, 0x49, 0x55, 0xf0, 0xb0, 0x63, 0x5d, 0x10, 0xe9, 0xcf, 0xd1, /* Byte value: 0x8a */ + 0x09, 0x7c, 0x04, 0xc2, 0xdf, 0x3b, 0x4f, 0x8f, 0xb8, 0xa7, 0xac, 0x55, 0x77, 0x9f, 0xcb, 0xdc, /* Byte value: 0x8b */ + 0xbd, 0x83, 0x54, 0x31, 0x4b, 0xe1, 0xca, 0xd1, 0xcc, 0x9c, 0x0b, 0xdb, 0x14, 0x42, 0x8c, 0x74, /* Byte value: 0x8c */ + 0x9f, 0xd5, 0xc6, 0x24, 0xe3, 0x9d, 0x07, 0x40, 0x54, 0xf0, 0x0c, 0xb5, 0x29, 0xde, 0xbb, 0x50, /* Byte value: 0x8d */ + 0x2e, 0x9c, 0x55, 0xe0, 0x0c, 0x9f, 0xa9, 0x82, 0xe2, 0xc5, 0x20, 0x5f, 0x79, 0x15, 0xce, 0x43, /* Byte value: 0x8e */ + 0x1b, 0x84, 0x0c, 0x85, 0xa2, 0x4d, 0xd1, 0x52, 0x0b, 0x2a, 0x37, 0xff, 0x99, 0x62, 0x9e, 0xa7, /* Byte value: 0x8f */ + 0xd7, 0xb3, 0xe6, 0xfb, 0xd4, 0x86, 0x3a, 0xb2, 0xdd, 0x81, 0x25, 0x58, 0x17, 0xac, 0x2c, 0x7f, /* Byte value: 0x90 */ + 0x8a, 0xb8, 0x73, 0x9c, 0x6a, 0x43, 0x1d, 0x59, 0x8f, 0xa1, 0xf3, 0x2c, 0xea, 0x56, 0x16, 0xde, /* Byte value: 0x91 */ + 0x0d, 0x3a, 0xf8, 0x91, 0x02, 0xdb, 0xd2, 0x3f, 0x2f, 0xc0, 0xb1, 0xfb, 0x4b, 0x59, 0x9c, 0x40, /* Byte value: 0x92 */ + 0x50, 0x31, 0x6d, 0xf6, 0xbc, 0x1e, 0xf5, 0xd4, 0x7d, 0xe0, 0x67, 0x8f, 0xb6, 0xa3, 0xa6, 0xe1, /* Byte value: 0x93 */ + 0x24, 0x33, 0x10, 0x8e, 0xfa, 0xec, 0xff, 0x79, 0xa5, 0xd9, 0xf5, 0x97, 0x1f, 0x39, 0xaa, 0xf6, /* Byte value: 0x94 */ + 0xf2, 0x70, 0xc9, 0x11, 0x88, 0x52, 0x73, 0xe7, 0x2d, 0x31, 0x46, 0x05, 0x07, 0x45, 0xe3, 0xae, /* Byte value: 0x95 */ + 0x38, 0x22, 0xa1, 0xf4, 0xac, 0x09, 0xaa, 0xef, 0xc6, 0x2f, 0xa6, 0x5b, 0xab, 0x2e, 0xcc, 0xa4, /* Byte value: 0x96 */ + 0x7b, 0x1b, 0xfb, 0x21, 0xcb, 0x59, 0x77, 0xca, 0x5d, 0x2b, 0xcc, 0xb4, 0xfc, 0xa0, 0x5a, 0x19, /* Byte value: 0x97 */ + 0xa1, 0x92, 0xe5, 0x4b, 0x1d, 0x04, 0x9f, 0x47, 0xaf, 0x6a, 0x58, 0x17, 0xa0, 0x55, 0xea, 0x26, /* Byte value: 0x98 */ + 0xbe, 0x50, 0x15, 0x9d, 0x62, 0xa9, 0xd3, 0xa5, 0x33, 0x27, 0x72, 0x46, 0x05, 0xf1, 0x23, 0x1d, /* Byte value: 0x99 */ + 0xa7, 0xf7, 0x67, 0xd0, 0x4f, 0x94, 0xad, 0xaf, 0x92, 0xdf, 0xaa, 0xee, 0x82, 0xf0, 0x77, 0xf4, /* Byte value: 0x9a */ + 0x99, 0xb0, 0x44, 0xbf, 0xb1, 0x0d, 0x35, 0xa8, 0x69, 0x45, 0xfe, 0x4c, 0x0b, 0x7b, 0x26, 0x82, /* Byte value: 0x9b */ + 0xf1, 0xa3, 0x88, 0xbd, 0xa1, 0x1a, 0x6a, 0x93, 0xd2, 0x8a, 0x3f, 0x98, 0x16, 0xf6, 0x4c, 0xc7, /* Byte value: 0x9c */ + 0xeb, 0xd7, 0xbb, 0x5c, 0xa5, 0x6f, 0x0d, 0xed, 0x8c, 0xc9, 0x9e, 0xad, 0x80, 0x44, 0xb7, 0x47, /* Byte value: 0x9d */ + 0x39, 0xd2, 0x9e, 0x90, 0x0a, 0x31, 0x1c, 0xc3, 0x93, 0x46, 0x30, 0x91, 0xa4, 0xfe, 0xa9, 0x83, /* Byte value: 0x9e */ + 0xb7, 0x2c, 0x11, 0x5f, 0xbd, 0x92, 0x9c, 0x2a, 0x8b, 0x80, 0xde, 0x13, 0x72, 0x6e, 0xe8, 0xc1, /* Byte value: 0x9f */ + 0x1c, 0x11, 0xb1, 0x7a, 0x56, 0xe5, 0x55, 0x96, 0x63, 0xf6, 0x53, 0xcc, 0xb4, 0x17, 0x66, 0x52, /* Byte value: 0xa0 */ + 0x01, 0xf0, 0x3f, 0x64, 0xa6, 0x38, 0xb6, 0x2c, 0x55, 0x69, 0x96, 0xca, 0x0f, 0xd0, 0x65, 0x27, /* Byte value: 0xa1 */ + 0xef, 0x91, 0x47, 0x0f, 0x78, 0x8f, 0x90, 0x5d, 0x1b, 0xae, 0x83, 0x03, 0xbc, 0x82, 0xe0, 0xdb, /* Byte value: 0xa2 */ + 0x1f, 0xc2, 0xf0, 0xd6, 0x7f, 0xad, 0x4c, 0xe2, 0x9c, 0x4d, 0x2a, 0x51, 0xa5, 0xa4, 0xc9, 0x3b, /* Byte value: 0xa3 */ + 0x92, 0xef, 0x3e, 0xb5, 0xe1, 0x46, 0xd5, 0x7f, 0x7b, 0x30, 0xbd, 0x4e, 0x62, 0x87, 0x27, 0x10, /* Byte value: 0xa4 */ + 0x1a, 0x74, 0x33, 0xe1, 0x04, 0x75, 0x67, 0x7e, 0x5e, 0x43, 0xa1, 0x35, 0x96, 0xb2, 0xfb, 0x80, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x85, 0xa1, 0xf5, 0xc5, 0xe7, 0xe8, 0x60, 0x3e, 0x0a, 0xb3, 0xad, 0x80, 0xbf, 0x6c, 0x40, 0xd0, /* Byte value: 0xa7 */ + 0x5c, 0xfb, 0xaa, 0x03, 0x18, 0xfd, 0x91, 0xc7, 0x07, 0x49, 0x40, 0xbe, 0xf2, 0x2a, 0x5f, 0x86, /* Byte value: 0xa8 */ + 0xed, 0xb2, 0x39, 0xc7, 0xf7, 0xff, 0x3f, 0x05, 0xb1, 0x7c, 0x6c, 0x54, 0xa2, 0xe1, 0x2a, 0x95, /* Byte value: 0xa9 */ + 0x56, 0x54, 0xef, 0x6d, 0xee, 0x8e, 0xc7, 0x3c, 0x40, 0x55, 0x95, 0x76, 0x94, 0x06, 0x3b, 0x33, /* Byte value: 0xaa */ + 0xc3, 0x2e, 0x6c, 0x27, 0xfb, 0x60, 0x96, 0x87, 0x53, 0xb9, 0x4c, 0x0b, 0xdb, 0xf4, 0xe4, 0xd6, /* Byte value: 0xab */ + 0x0f, 0x19, 0x86, 0x59, 0x8d, 0xab, 0x7d, 0x67, 0x85, 0x12, 0x5e, 0xac, 0x55, 0x3a, 0x56, 0x0e, /* Byte value: 0xac */ + 0xe8, 0x04, 0xfa, 0xf0, 0x8c, 0x27, 0x14, 0x99, 0x73, 0x72, 0xe7, 0x30, 0x91, 0xf7, 0x18, 0x2e, /* Byte value: 0xad */ + 0xc2, 0xde, 0x53, 0x43, 0x5d, 0x58, 0x20, 0xab, 0x06, 0xd0, 0xda, 0xc1, 0xd4, 0x24, 0x81, 0xf1, /* Byte value: 0xae */ + 0xd9, 0x5a, 0x5f, 0xc6, 0xff, 0x15, 0xf1, 0xf9, 0x0d, 0xfa, 0xed, 0x3e, 0x4d, 0x46, 0x1f, 0x56, /* Byte value: 0xaf */ + 0xe6, 0xed, 0x43, 0xcd, 0xa7, 0xb4, 0xdf, 0xd2, 0xa3, 0x09, 0x2f, 0x56, 0xcb, 0x1d, 0x2b, 0x07, /* Byte value: 0xb0 */ + 0xb6, 0xdc, 0x2e, 0x3b, 0x1b, 0xaa, 0x2a, 0x06, 0xde, 0xe9, 0x48, 0xd9, 0x7d, 0xbe, 0x8d, 0xe6, /* Byte value: 0xb1 */ + 0x11, 0x2b, 0x49, 0xeb, 0x54, 0x3e, 0x87, 0xa9, 0x4c, 0x36, 0xe2, 0x37, 0xff, 0x4e, 0xfa, 0x12, /* Byte value: 0xb2 */ + 0xc6, 0x98, 0xaf, 0x10, 0x80, 0xb8, 0xbd, 0x1b, 0x91, 0xb7, 0xc7, 0x6f, 0xe8, 0xe2, 0xd6, 0x6d, /* Byte value: 0xb3 */ + 0x55, 0x87, 0xae, 0xc1, 0xc7, 0xc6, 0xde, 0x48, 0xbf, 0xee, 0xec, 0xeb, 0x85, 0xb5, 0x94, 0x5a, /* Byte value: 0xb4 */ + 0x94, 0x8a, 0xbc, 0x2e, 0xb3, 0xd6, 0xe7, 0x97, 0x46, 0x85, 0x4f, 0xb7, 0x40, 0x22, 0xba, 0xc2, /* Byte value: 0xb5 */ + 0xb1, 0x49, 0x93, 0xc4, 0xef, 0x02, 0xae, 0xc2, 0xb6, 0x35, 0x2c, 0xea, 0x50, 0xcb, 0x75, 0x13, /* Byte value: 0xb6 */ + 0x4b, 0xb5, 0x61, 0x73, 0x1e, 0x53, 0x24, 0x86, 0x76, 0xca, 0x50, 0x70, 0x2f, 0xc1, 0x38, 0x46, /* Byte value: 0xb7 */ + 0xb9, 0xc5, 0xa8, 0x62, 0x96, 0x01, 0x57, 0x61, 0x5b, 0xfb, 0x16, 0x75, 0x28, 0x84, 0xdb, 0xe8, /* Byte value: 0xb8 */ + 0x4f, 0xf3, 0x9d, 0x20, 0xc3, 0xb3, 0xb9, 0x36, 0xe1, 0xad, 0x4d, 0xde, 0x13, 0x07, 0x6f, 0xda, /* Byte value: 0xb9 */ + 0xf6, 0x36, 0x35, 0x42, 0x55, 0xb2, 0xee, 0x57, 0xba, 0x56, 0x5b, 0xab, 0x3b, 0x83, 0xb4, 0x32, /* Byte value: 0xba */ + 0x9b, 0x93, 0x3a, 0x77, 0x3e, 0x7d, 0x9a, 0xf0, 0xc3, 0x97, 0x11, 0x1b, 0x15, 0x18, 0xec, 0xcc, /* Byte value: 0xbb */ + 0xd2, 0x05, 0x25, 0xcc, 0xaf, 0x5e, 0x11, 0x2e, 0x1f, 0x8f, 0xae, 0x3c, 0x24, 0xba, 0x1e, 0xc4, /* Byte value: 0xbc */ + 0x7f, 0x5d, 0x07, 0x72, 0x16, 0xb9, 0xea, 0x7a, 0xca, 0x4c, 0xd1, 0x1a, 0xc0, 0x66, 0x0d, 0x85, /* Byte value: 0xbd */ + 0xde, 0xcf, 0xe2, 0x39, 0x0b, 0xbd, 0x75, 0x3d, 0x65, 0x26, 0x89, 0x0d, 0x60, 0x33, 0xe7, 0xa3, /* Byte value: 0xbe */ + 0x75, 0xf2, 0x42, 0x1c, 0xe0, 0xca, 0xbc, 0x81, 0x8d, 0x50, 0x04, 0xd2, 0xa6, 0x4a, 0x69, 0x30, /* Byte value: 0xbf */ + 0x14, 0x9d, 0x8a, 0xdc, 0x2f, 0xe6, 0xac, 0x35, 0x8e, 0x38, 0x69, 0x53, 0xcc, 0x58, 0xc8, 0xa9, /* Byte value: 0xc0 */ + 0x20, 0x75, 0xec, 0xdd, 0x27, 0x0c, 0x62, 0xc9, 0x32, 0xbe, 0xe8, 0x39, 0x23, 0xff, 0xfd, 0x6a, /* Byte value: 0xc1 */ + 0xdc, 0xec, 0x9c, 0xf1, 0x84, 0xcd, 0xda, 0x65, 0xcf, 0xf4, 0x66, 0x5a, 0x7e, 0x50, 0x2d, 0xed, /* Byte value: 0xc2 */ + 0xac, 0xa8, 0x1d, 0xda, 0x1f, 0xdf, 0x4d, 0x78, 0x80, 0xaa, 0xe9, 0xec, 0xeb, 0x0c, 0x76, 0x66, /* Byte value: 0xc3 */ + 0xab, 0x3d, 0xa0, 0x25, 0xeb, 0x77, 0xc9, 0xbc, 0xe8, 0x76, 0x8d, 0xdf, 0xc6, 0x79, 0x8e, 0x93, /* Byte value: 0xc4 */ + 0xf8, 0xdf, 0x8c, 0x7f, 0x7e, 0x21, 0x25, 0x1c, 0x6a, 0x2d, 0x93, 0xcd, 0x61, 0x69, 0x87, 0x1b, /* Byte value: 0xc5 */ + 0xfb, 0x0c, 0xcd, 0xd3, 0x57, 0x69, 0x3c, 0x68, 0x95, 0x96, 0xea, 0x50, 0x70, 0xda, 0x28, 0x72, /* Byte value: 0xc6 */ + 0xcd, 0xc7, 0xd5, 0x1a, 0xd0, 0xf3, 0x5d, 0xcc, 0x83, 0xc2, 0x84, 0x6d, 0x81, 0x1e, 0xd7, 0xff, /* Byte value: 0xc7 */ + 0xf0, 0x53, 0xb7, 0xd9, 0x07, 0x22, 0xdc, 0xbf, 0x87, 0xe3, 0xa9, 0x52, 0x19, 0x26, 0x29, 0xe0, /* Byte value: 0xc8 */ + 0xee, 0x61, 0x78, 0x6b, 0xde, 0xb7, 0x26, 0x71, 0x4e, 0xc7, 0x15, 0xc9, 0xb3, 0x52, 0x85, 0xfc, /* Byte value: 0xc9 */ + 0xce, 0x14, 0x94, 0xb6, 0xf9, 0xbb, 0x44, 0xb8, 0x7c, 0x79, 0xfd, 0xf0, 0x90, 0xad, 0x78, 0x96, /* Byte value: 0xca */ + 0xe5, 0x3e, 0x02, 0x61, 0x8e, 0xfc, 0xc6, 0xa6, 0x5c, 0xb2, 0x56, 0xcb, 0xda, 0xae, 0x84, 0x6e, /* Byte value: 0xcb */ + 0x7d, 0x7e, 0x79, 0xba, 0x99, 0xc9, 0x45, 0x22, 0x60, 0x9e, 0x3e, 0x4d, 0xde, 0x05, 0xc7, 0xcb, /* Byte value: 0xcc */ + 0xb8, 0x35, 0x97, 0x06, 0x30, 0x39, 0xe1, 0x4d, 0x0e, 0x92, 0x80, 0xbf, 0x27, 0x54, 0xbe, 0xcf, /* Byte value: 0xcd */ + 0x04, 0x46, 0xfc, 0x53, 0xdd, 0xe0, 0x9d, 0xb0, 0x97, 0x67, 0x1d, 0xae, 0x3c, 0xc6, 0x57, 0x9c, /* Byte value: 0xce */ + 0xaa, 0xcd, 0x9f, 0x41, 0x4d, 0x4f, 0x7f, 0x90, 0xbd, 0x1f, 0x1b, 0x15, 0xc9, 0xa9, 0xeb, 0xb4, /* Byte value: 0xcf */ + 0xf5, 0xe5, 0x74, 0xee, 0x7c, 0xfa, 0xf7, 0x23, 0x45, 0xed, 0x22, 0x36, 0x2a, 0x30, 0x1b, 0x5b, /* Byte value: 0xd0 */ + 0xc7, 0x68, 0x90, 0x74, 0x26, 0x80, 0x0b, 0x37, 0xc4, 0xde, 0x51, 0xa5, 0xe7, 0x32, 0xb3, 0x4a, /* Byte value: 0xd1 */ + 0xa0, 0x62, 0xda, 0x2f, 0xbb, 0x3c, 0x29, 0x6b, 0xfa, 0x03, 0xce, 0xdd, 0xaf, 0x85, 0x8f, 0x01, /* Byte value: 0xd2 */ + 0x42, 0xc9, 0x65, 0xb1, 0xc1, 0x68, 0x6b, 0x09, 0xce, 0x6d, 0xfc, 0x25, 0x58, 0x5e, 0xf3, 0x9a, /* Byte value: 0xd3 */ + 0xcb, 0xa2, 0x57, 0x81, 0x82, 0x63, 0x6f, 0x24, 0xbe, 0x77, 0x76, 0x94, 0xa3, 0xbb, 0x4a, 0x2d, /* Byte value: 0xd4 */ + 0x71, 0xb4, 0xbe, 0x4f, 0x3d, 0x2a, 0x21, 0x31, 0x1a, 0x37, 0x19, 0x7c, 0x9a, 0x8c, 0x3e, 0xac, /* Byte value: 0xd5 */ + 0xe3, 0x5b, 0x80, 0xfa, 0xdc, 0x6c, 0xf4, 0x4e, 0x61, 0x07, 0xa4, 0x32, 0xf8, 0x0b, 0x19, 0xbc, /* Byte value: 0xd6 */ + 0xfd, 0x69, 0x4f, 0x48, 0x05, 0xf9, 0x0e, 0x80, 0xa8, 0x23, 0x18, 0xa9, 0x52, 0x7f, 0xb5, 0xa0, /* Byte value: 0xd7 */ + 0x90, 0xcc, 0x40, 0x7d, 0x6e, 0x36, 0x7a, 0x27, 0xd1, 0xe2, 0x52, 0x19, 0x7c, 0xe4, 0xed, 0x5e, /* Byte value: 0xd8 */ + 0x02, 0x23, 0x7e, 0xc8, 0x8f, 0x70, 0xaf, 0x58, 0xaa, 0xd2, 0xef, 0x57, 0x1e, 0x63, 0xca, 0x4e, /* Byte value: 0xd9 */ + 0x26, 0x10, 0x6e, 0x46, 0x75, 0x9c, 0x50, 0x21, 0x0f, 0x0b, 0x1a, 0xc0, 0x01, 0x5a, 0x60, 0xb8, /* Byte value: 0xda */ + 0x96, 0xa9, 0xc2, 0xe6, 0x3c, 0xa6, 0x48, 0xcf, 0xec, 0x57, 0xa0, 0xe0, 0x5e, 0x41, 0x70, 0x8c, /* Byte value: 0xdb */ + 0xcf, 0xe4, 0xab, 0xd2, 0x5f, 0x83, 0xf2, 0x94, 0x29, 0x10, 0x6b, 0x3a, 0x9f, 0x7d, 0x1d, 0xb1, /* Byte value: 0xdc */ + 0x89, 0x6b, 0x32, 0x30, 0x43, 0x0b, 0x04, 0x2d, 0x70, 0x1a, 0x8a, 0xb1, 0xfb, 0xe5, 0xb9, 0xb7, /* Byte value: 0xdd */ + 0x49, 0x96, 0x1f, 0xbb, 0x91, 0x23, 0x8b, 0xde, 0xdc, 0x18, 0xbf, 0x27, 0x31, 0xa2, 0xf2, 0x08, /* Byte value: 0xde */ + 0x2f, 0x6c, 0x6a, 0x84, 0xaa, 0xa7, 0x1f, 0xae, 0xb7, 0xac, 0xb6, 0x95, 0x76, 0xc5, 0xab, 0x64, /* Byte value: 0xdf */ + 0x52, 0x12, 0x13, 0x3e, 0x33, 0x6e, 0x5a, 0x8c, 0xd7, 0x32, 0x88, 0xd8, 0xa8, 0xc0, 0x6c, 0xaf, /* Byte value: 0xe0 */ + 0xb4, 0xff, 0x50, 0xf3, 0x94, 0xda, 0x85, 0x5e, 0x74, 0x3b, 0xa7, 0x8e, 0x63, 0xdd, 0x47, 0xa8, /* Byte value: 0xe1 */ + 0x08, 0x8c, 0x3b, 0xa6, 0x79, 0x03, 0xf9, 0xa3, 0xed, 0xce, 0x3a, 0x9f, 0x78, 0x4f, 0xae, 0xfb, /* Byte value: 0xe2 */ + 0x3f, 0xb7, 0x1c, 0x0b, 0x58, 0xa1, 0x2e, 0x2b, 0xae, 0xf3, 0xc2, 0x68, 0x86, 0x5b, 0x34, 0x51, /* Byte value: 0xe3 */ + 0xd6, 0x43, 0xd9, 0x9f, 0x72, 0xbe, 0x8c, 0x9e, 0x88, 0xe8, 0xb3, 0x92, 0x18, 0x7c, 0x49, 0x58, /* Byte value: 0xe4 */ + 0x23, 0xa6, 0xad, 0x71, 0x0e, 0x44, 0x7b, 0xbd, 0xcd, 0x05, 0x91, 0xa4, 0x32, 0x4c, 0x52, 0x03, /* Byte value: 0xe5 */ + 0x4e, 0x03, 0xa2, 0x44, 0x65, 0x8b, 0x0f, 0x1a, 0xb4, 0xc4, 0xdb, 0x14, 0x1c, 0xd7, 0x0a, 0xfd, /* Byte value: 0xe6 */ + 0x60, 0x9f, 0xf7, 0xa4, 0x69, 0x14, 0xa6, 0x98, 0x56, 0x01, 0xfb, 0x4b, 0x65, 0xc2, 0xc4, 0xbe, /* Byte value: 0xe7 */ + 0x0b, 0x5f, 0x7a, 0x0a, 0x50, 0x4b, 0xe0, 0xd7, 0x12, 0x75, 0x43, 0x02, 0x69, 0xfc, 0x01, 0x92, /* Byte value: 0xe8 */ + 0xc4, 0xbb, 0xd1, 0xd8, 0x0f, 0xc8, 0x12, 0x43, 0x3b, 0x65, 0x28, 0x38, 0xf6, 0x81, 0x1c, 0x23, /* Byte value: 0xe9 */ + 0x35, 0x18, 0x59, 0x65, 0xae, 0xd2, 0x78, 0xd0, 0xe9, 0xef, 0x17, 0xa0, 0xe0, 0x77, 0x50, 0xe4, /* Byte value: 0xea */ + 0x0e, 0xe9, 0xb9, 0x3d, 0x2b, 0x93, 0xcb, 0x4b, 0xd0, 0x7b, 0xc8, 0x66, 0x5a, 0xea, 0x33, 0x29, /* Byte value: 0xeb */ + 0x64, 0xd9, 0x0b, 0xf7, 0xb4, 0xf4, 0x3b, 0x28, 0xc1, 0x66, 0xe6, 0xe5, 0x59, 0x04, 0x93, 0x22, /* Byte value: 0xec */ + 0x3b, 0xf1, 0xe0, 0x58, 0x85, 0x41, 0xb3, 0x9b, 0x39, 0x94, 0xdf, 0xc6, 0xba, 0x9d, 0x63, 0xcd, /* Byte value: 0xed */ + 0x30, 0xae, 0x9a, 0x52, 0xd5, 0x0a, 0x53, 0x4c, 0x2b, 0xe1, 0x9c, 0xc4, 0xd3, 0x61, 0x62, 0x5f, /* Byte value: 0xee */ + 0xc5, 0x4b, 0xee, 0xbc, 0xa9, 0xf0, 0xa4, 0x6f, 0x6e, 0x0c, 0xbe, 0xf2, 0xf9, 0x51, 0x79, 0x04, /* Byte value: 0xef */ + 0x6b, 0xc0, 0x8d, 0xae, 0x39, 0x5f, 0x46, 0x4f, 0x44, 0x74, 0xb8, 0x49, 0x0c, 0x3e, 0xc5, 0x2c, /* Byte value: 0xf0 */ + 0x91, 0x3c, 0x7f, 0x19, 0xc8, 0x0e, 0xcc, 0x0b, 0x84, 0x8b, 0xc4, 0xd3, 0x73, 0x34, 0x88, 0x79, /* Byte value: 0xf1 */ + 0x4c, 0x20, 0xdc, 0x8c, 0xea, 0xfb, 0xa0, 0x42, 0x1e, 0x16, 0x34, 0x43, 0x02, 0xb4, 0xc0, 0xb3, /* Byte value: 0xf2 */ + 0xb2, 0x9a, 0xd2, 0x68, 0xc6, 0x4a, 0xb7, 0xb6, 0x49, 0x8e, 0x55, 0x77, 0x41, 0x78, 0xda, 0x7a, /* Byte value: 0xf3 */ + 0xfe, 0xba, 0x0e, 0xe4, 0x2c, 0xb1, 0x17, 0xf4, 0x57, 0x98, 0x61, 0x34, 0x43, 0xcc, 0x1a, 0xc9, /* Byte value: 0xf4 */ + 0xe7, 0x1d, 0x7c, 0xa9, 0x01, 0x8c, 0x69, 0xfe, 0xf6, 0x60, 0xb9, 0x9c, 0xc4, 0xcd, 0x4e, 0x20, /* Byte value: 0xf5 */ + 0x27, 0xe0, 0x51, 0x22, 0xd3, 0xa4, 0xe6, 0x0d, 0x5a, 0x62, 0x8c, 0x0a, 0x0e, 0x8a, 0x05, 0x9f, /* Byte value: 0xf6 */ + 0x8c, 0xdd, 0xf1, 0x07, 0x38, 0xd3, 0x2f, 0xb1, 0xb2, 0x14, 0x01, 0xd5, 0xc8, 0xf3, 0x8b, 0x0c, /* Byte value: 0xf7 */ + 0x3e, 0x47, 0x23, 0x6f, 0xfe, 0x99, 0x98, 0x07, 0xfb, 0x9a, 0x54, 0xa2, 0x89, 0x8b, 0x51, 0x76, /* Byte value: 0xf8 */ + 0x29, 0x09, 0xe8, 0x1f, 0xf8, 0x37, 0x2d, 0x46, 0x8a, 0x19, 0x44, 0x6c, 0x54, 0x60, 0x36, 0xb6, /* Byte value: 0xf9 */ + 0x72, 0x67, 0xff, 0xe3, 0x14, 0x62, 0x38, 0x45, 0xe5, 0x8c, 0x60, 0xe1, 0x8b, 0x3f, 0x91, 0xc5, /* Byte value: 0xfa */ + 0x2c, 0xbf, 0x2b, 0x28, 0x83, 0xef, 0x06, 0xda, 0x48, 0x17, 0xcf, 0x08, 0x67, 0x76, 0x04, 0x0d, /* Byte value: 0xfb */ + 0xa4, 0x24, 0x26, 0x7c, 0x66, 0xdc, 0xb4, 0xdb, 0x6d, 0x64, 0xd3, 0x73, 0x93, 0x43, 0xd8, 0x9d, /* Byte value: 0xfc */ + 0x8e, 0xfe, 0x8f, 0xcf, 0xb7, 0xa3, 0x80, 0xe9, 0x18, 0xc6, 0xee, 0x82, 0xd6, 0x90, 0x41, 0x42, /* Byte value: 0xfd */ + 0x51, 0xc1, 0x52, 0x92, 0x1a, 0x26, 0x43, 0xf8, 0x28, 0x89, 0xf1, 0x45, 0xb9, 0x73, 0xc3, 0xc6, /* Byte value: 0xfe */ + 0xc8, 0x71, 0x16, 0x2d, 0xab, 0x2b, 0x76, 0x50, 0x41, 0xcc, 0x0f, 0x09, 0xb2, 0x08, 0xe5, 0x44, /* Byte value: 0xff */ + 0x16, 0xbe, 0xf4, 0x14, 0xa0, 0x96, 0x03, 0x6d, 0x24, 0xea, 0x86, 0x04, 0xd2, 0x3b, 0x02, 0xe7, /* Byte value: 0x00 */ + + /* Matrix row: 15 */ + 0xfb, 0xd5, 0x0c, 0x7a, 0xc0, 0x80, 0x96, 0x19, 0x11, 0x87, 0x93, 0x1b, 0xc9, 0xae, 0xb5, 0xfc, /* Byte value: 0x01 */ + 0x08, 0xe0, 0x8c, 0xb2, 0x17, 0x1a, 0xce, 0x7b, 0x32, 0xfc, 0xab, 0xf8, 0xfe, 0xf2, 0x0a, 0xee, /* Byte value: 0x02 */ + 0xcb, 0xd0, 0xa2, 0x50, 0xb2, 0xdc, 0x77, 0xc0, 0xbd, 0xca, 0xef, 0x4e, 0x88, 0xc7, 0x89, 0xdd, /* Byte value: 0x03 */ + 0x41, 0x10, 0x1a, 0x5e, 0x63, 0x42, 0xd6, 0x69, 0xc4, 0x12, 0x3c, 0xd3, 0x93, 0x13, 0xc0, 0x11, /* Byte value: 0x04 */ + 0x38, 0xe5, 0x22, 0x98, 0x65, 0x46, 0x2f, 0xa2, 0x9e, 0xb1, 0xd7, 0xad, 0xbf, 0x9b, 0x36, 0xcf, /* Byte value: 0x05 */ + 0xb3, 0x39, 0x6a, 0x11, 0x6f, 0x4a, 0xe7, 0x3c, 0x70, 0x97, 0x29, 0x2f, 0xcb, 0xc0, 0xef, 0x6e, /* Byte value: 0x06 */ + 0x1f, 0xb7, 0xc2, 0x06, 0x7d, 0x56, 0x4d, 0x08, 0x35, 0x78, 0xfd, 0x96, 0x0f, 0xfe, 0x68, 0x31, /* Byte value: 0x07 */ + 0x88, 0xf8, 0x9b, 0xc3, 0xa4, 0x79, 0x73, 0xc7, 0x94, 0xe7, 0x89, 0xa3, 0xc5, 0x09, 0xaa, 0x16, /* Byte value: 0x08 */ + 0x32, 0x3d, 0x8d, 0xe7, 0x07, 0xbb, 0x33, 0xb7, 0x41, 0x72, 0x26, 0x6b, 0x9f, 0xb4, 0xdf, 0xfb, /* Byte value: 0x09 */ + 0x7c, 0x99, 0x8e, 0x18, 0x37, 0x9b, 0xf7, 0x20, 0xd4, 0x23, 0x72, 0x1d, 0x3c, 0x7e, 0x63, 0xc4, /* Byte value: 0x0a */ + 0x5c, 0x9f, 0xfb, 0x95, 0x6b, 0xf3, 0x49, 0x0f, 0x1c, 0x55, 0x9b, 0x7b, 0x42, 0x30, 0x4b, 0xfa, /* Byte value: 0x0b */ + 0x02, 0x38, 0x23, 0xcd, 0x75, 0xe7, 0xd2, 0x6e, 0xed, 0x3f, 0x5a, 0x3e, 0xde, 0xdd, 0xe3, 0xda, /* Byte value: 0x0c */ + 0xec, 0x82, 0x42, 0xce, 0xaa, 0xcc, 0x15, 0x6a, 0x16, 0x03, 0xc5, 0x75, 0x38, 0xa2, 0xd7, 0x23, /* Byte value: 0x0d */ + 0x12, 0x3b, 0xf8, 0x6a, 0x5b, 0xd3, 0x8d, 0x98, 0x89, 0x04, 0xcf, 0x0d, 0xe1, 0xfa, 0xf7, 0xc5, /* Byte value: 0x0e */ + 0x7b, 0xcd, 0x1b, 0x0b, 0x73, 0xe3, 0x2b, 0xa5, 0xb7, 0x9c, 0xb1, 0x40, 0xf2, 0x55, 0x15, 0x04, /* Byte value: 0x0f */ + 0x5f, 0xbb, 0x28, 0xdf, 0xc5, 0x86, 0xf2, 0x56, 0x66, 0x94, 0xec, 0x5a, 0xf3, 0x62, 0x38, 0x4d, /* Byte value: 0x10 */ + 0xc1, 0x08, 0x0d, 0x2f, 0xd0, 0x21, 0x6b, 0xd5, 0x62, 0x09, 0x1e, 0x88, 0xa8, 0xe8, 0x60, 0xe9, /* Byte value: 0x11 */ + 0x04, 0x70, 0x46, 0x59, 0xea, 0x0d, 0x67, 0xdc, 0x19, 0x7e, 0xb4, 0x7c, 0x7f, 0x79, 0x05, 0x77, /* Byte value: 0x12 */ + 0x76, 0x41, 0x21, 0x67, 0x55, 0x66, 0xeb, 0x35, 0x0b, 0xe0, 0x83, 0xdb, 0x1c, 0x51, 0x8a, 0xf0, /* Byte value: 0x13 */ + 0x6c, 0x9a, 0x55, 0xbf, 0x19, 0xaf, 0xa8, 0xd6, 0xb0, 0x18, 0xe7, 0x2e, 0x03, 0x59, 0x77, 0xdb, /* Byte value: 0x14 */ + 0x26, 0x4e, 0x10, 0x19, 0xc3, 0x82, 0x0b, 0x9d, 0x3c, 0x37, 0x07, 0x24, 0xdf, 0xea, 0xce, 0x93, /* Byte value: 0x15 */ + 0x0f, 0xb4, 0x19, 0xa1, 0x53, 0x62, 0x12, 0xfe, 0x51, 0x43, 0x68, 0xa5, 0x30, 0xd9, 0x7c, 0x2e, /* Byte value: 0x16 */ + 0x0c, 0x90, 0xca, 0xeb, 0xfd, 0x17, 0xa9, 0xa7, 0x2b, 0x82, 0x1f, 0x84, 0x81, 0x8b, 0x0f, 0x99, /* Byte value: 0x17 */ + 0xe0, 0x12, 0x88, 0x25, 0x57, 0xdb, 0xbc, 0xcd, 0x3d, 0x81, 0xda, 0xf1, 0xb9, 0x29, 0xd8, 0xba, /* Byte value: 0x18 */ + 0xe6, 0x5a, 0xed, 0xb1, 0xc8, 0x31, 0x09, 0x7f, 0xc9, 0xc0, 0x34, 0xb3, 0x18, 0x8d, 0x3e, 0x17, /* Byte value: 0x19 */ + 0xd6, 0x5f, 0x43, 0x9b, 0xba, 0x6d, 0xe8, 0xa6, 0x65, 0x8d, 0x48, 0xe6, 0x59, 0xe4, 0x02, 0x36, /* Byte value: 0x1a */ + 0x18, 0xe3, 0x57, 0x15, 0x39, 0x2e, 0x91, 0x8d, 0x56, 0xc7, 0x3e, 0xcb, 0xc1, 0xd5, 0x1e, 0xf1, /* Byte value: 0x1b */ + 0x8e, 0xb0, 0xfe, 0x57, 0x3b, 0x93, 0xc6, 0x75, 0x60, 0xa6, 0x67, 0xe1, 0x64, 0xad, 0x4c, 0xbb, /* Byte value: 0x1c */ + 0x54, 0x7f, 0x77, 0x27, 0x7c, 0xe9, 0x87, 0x74, 0x2e, 0xa9, 0x30, 0x83, 0xbc, 0xc2, 0x41, 0x14, /* Byte value: 0x1d */ + 0xe4, 0x62, 0xce, 0x7c, 0xbd, 0xd6, 0xdb, 0x11, 0x24, 0xff, 0x6e, 0x8d, 0xc6, 0x50, 0xdd, 0xcd, /* Byte value: 0x1e */ + 0xac, 0x8e, 0xa8, 0x17, 0x12, 0x1c, 0xaa, 0x34, 0x45, 0xef, 0xd4, 0xb9, 0xc4, 0x3e, 0x87, 0x5f, /* Byte value: 0x1f */ + 0x69, 0xf6, 0xe3, 0x61, 0x28, 0x30, 0xa6, 0x3d, 0x3e, 0x98, 0x7e, 0x4d, 0x13, 0xaf, 0xe2, 0xc1, /* Byte value: 0x20 */ + 0xee, 0xba, 0x61, 0x03, 0xdf, 0x2b, 0xc7, 0x04, 0xfb, 0x3c, 0x9f, 0x4b, 0xe6, 0x7f, 0x34, 0xf9, /* Byte value: 0x21 */ + 0xd9, 0xeb, 0x5a, 0x3a, 0xe9, 0x0f, 0xfa, 0x58, 0x34, 0xce, 0x20, 0x43, 0x69, 0x3d, 0x7e, 0x18, /* Byte value: 0x22 */ + 0xf7, 0x45, 0xc6, 0x91, 0x3d, 0x97, 0x3f, 0xbe, 0x3a, 0x05, 0x8c, 0x9f, 0x48, 0x25, 0xba, 0x65, /* Byte value: 0x23 */ + 0xb9, 0xe1, 0xc5, 0x6e, 0x0d, 0xb7, 0xfb, 0x29, 0xaf, 0x54, 0xd8, 0xe9, 0xeb, 0xef, 0x06, 0x5a, /* Byte value: 0x24 */ + 0x85, 0x74, 0xa1, 0xaf, 0x82, 0xfc, 0xb3, 0x57, 0x28, 0x9b, 0xbb, 0x38, 0x2b, 0x0d, 0x35, 0xe2, /* Byte value: 0x25 */ + 0x1e, 0xab, 0x32, 0x81, 0xa6, 0xc4, 0x24, 0x3f, 0xa2, 0x86, 0xd0, 0x89, 0x60, 0x71, 0xf8, 0x5c, /* Byte value: 0x26 */ + 0x66, 0x42, 0xfa, 0xc0, 0x7b, 0x52, 0xb4, 0xc3, 0x6f, 0xdb, 0x16, 0xe8, 0x23, 0x76, 0x9e, 0xef, /* Byte value: 0x27 */ + 0x30, 0x05, 0xae, 0x2a, 0x72, 0x5c, 0xe1, 0xd9, 0xac, 0x4d, 0x7c, 0x55, 0x41, 0x69, 0x3c, 0x21, /* Byte value: 0x28 */ + 0xd5, 0x7b, 0x90, 0xd1, 0x14, 0x18, 0x53, 0xff, 0x1f, 0x4c, 0x3f, 0xc7, 0xe8, 0xb6, 0x71, 0x81, /* Byte value: 0x29 */ + 0xa2, 0x26, 0x41, 0x31, 0x9a, 0xec, 0xd1, 0xfd, 0x83, 0x52, 0x91, 0x03, 0x9b, 0x68, 0x6b, 0x1c, /* Byte value: 0x2a */ + 0xfc, 0x81, 0x99, 0x69, 0x84, 0xf8, 0x4a, 0x9c, 0x72, 0x38, 0x50, 0x46, 0x07, 0x85, 0xc3, 0x3c, /* Byte value: 0x2b */ + 0x60, 0x0a, 0x9f, 0x54, 0xe4, 0xb8, 0x01, 0x71, 0x9b, 0x9a, 0xf8, 0xaa, 0x82, 0xd2, 0x78, 0x42, /* Byte value: 0x2c */ + 0xff, 0xa5, 0x4a, 0x23, 0x2a, 0x8d, 0xf1, 0xc5, 0x08, 0xf9, 0x27, 0x67, 0xb6, 0xd7, 0xb0, 0x8b, /* Byte value: 0x2d */ + 0x6e, 0xa2, 0x76, 0x72, 0x6c, 0x48, 0x7a, 0xb8, 0x5d, 0x27, 0xbd, 0x10, 0xdd, 0x84, 0x94, 0x01, /* Byte value: 0x2e */ + 0xea, 0xca, 0x27, 0x5a, 0x35, 0x26, 0xa0, 0xd8, 0xe2, 0x42, 0x2b, 0x37, 0x99, 0x06, 0x31, 0x8e, /* Byte value: 0x2f */ + 0x83, 0x3c, 0xc4, 0x3b, 0x1d, 0x16, 0x06, 0xe5, 0xdc, 0xda, 0x55, 0x7a, 0x8a, 0xa9, 0xd3, 0x4f, /* Byte value: 0x30 */ + 0x15, 0x6f, 0x6d, 0x79, 0x1f, 0xab, 0x51, 0x1d, 0xea, 0xbb, 0x0c, 0x50, 0x2f, 0xd1, 0x81, 0x05, /* Byte value: 0x31 */ + 0xc0, 0x14, 0xfd, 0xa8, 0x0b, 0xb3, 0x02, 0xe2, 0xf5, 0xf7, 0x33, 0x97, 0xc7, 0x67, 0xf0, 0x84, /* Byte value: 0x32 */ + 0xdc, 0x87, 0xec, 0xe4, 0xd8, 0x90, 0xf4, 0xb3, 0xba, 0x4e, 0xb9, 0x20, 0x79, 0xcb, 0xeb, 0x02, /* Byte value: 0x33 */ + 0xb4, 0x6d, 0xff, 0x02, 0x2b, 0x32, 0x3b, 0xb9, 0x13, 0x28, 0xea, 0x72, 0x05, 0xeb, 0x99, 0xae, /* Byte value: 0x34 */ + 0xeb, 0xd6, 0xd7, 0xdd, 0xee, 0xb4, 0xc9, 0xef, 0x75, 0xbc, 0x06, 0x28, 0xf6, 0x89, 0xa1, 0xe3, /* Byte value: 0x35 */ + 0xc8, 0xf4, 0x71, 0x1a, 0x1c, 0xa9, 0xcc, 0x99, 0xc7, 0x0b, 0x98, 0x6f, 0x39, 0x95, 0xfa, 0x6a, /* Byte value: 0x36 */ + 0x84, 0x68, 0x51, 0x28, 0x59, 0x6e, 0xda, 0x60, 0xbf, 0x65, 0x96, 0x27, 0x44, 0x82, 0xa5, 0x8f, /* Byte value: 0x37 */ + 0xe5, 0x7e, 0x3e, 0xfb, 0x66, 0x44, 0xb2, 0x26, 0xb3, 0x01, 0x43, 0x92, 0xa9, 0xdf, 0x4d, 0xa0, /* Byte value: 0x38 */ + 0xa7, 0x4a, 0xf7, 0xef, 0xab, 0x73, 0xdf, 0x16, 0x0d, 0xd2, 0x08, 0x60, 0x8b, 0x9e, 0xfe, 0x06, /* Byte value: 0x39 */ + 0x44, 0x7c, 0xac, 0x80, 0x52, 0xdd, 0xd8, 0x82, 0x4a, 0x92, 0xa5, 0xb0, 0x83, 0xe5, 0x55, 0x0b, /* Byte value: 0x3a */ + 0xba, 0xc5, 0x16, 0x24, 0xa3, 0xc2, 0x40, 0x70, 0xd5, 0x95, 0xaf, 0xc8, 0x5a, 0xbd, 0x75, 0xed, /* Byte value: 0x3b */ + 0x62, 0x32, 0xbc, 0x99, 0x91, 0x5f, 0xd3, 0x1f, 0x76, 0xa5, 0xa2, 0x94, 0x5c, 0x0f, 0x9b, 0x98, /* Byte value: 0x3c */ + 0xf2, 0x29, 0x70, 0x4f, 0x0c, 0x08, 0x31, 0x55, 0xb4, 0x85, 0x15, 0xfc, 0x58, 0xd3, 0x2f, 0x7f, /* Byte value: 0x3d */ + 0x53, 0x2b, 0xe2, 0x34, 0x38, 0x91, 0x5b, 0xf1, 0x4d, 0x16, 0xf3, 0xde, 0x72, 0xe9, 0x37, 0xd4, /* Byte value: 0x3e */ + 0x9a, 0xc3, 0x63, 0xa9, 0xff, 0xaa, 0xfe, 0x5f, 0x1d, 0xe3, 0x46, 0xae, 0x24, 0xf3, 0x5d, 0xd3, /* Byte value: 0x3f */ + 0x10, 0x03, 0xdb, 0xa7, 0x2e, 0x34, 0x5f, 0xf6, 0x64, 0x3b, 0x95, 0x33, 0x3f, 0x27, 0x14, 0x1f, /* Byte value: 0x40 */ + 0x1d, 0x8f, 0xe1, 0xcb, 0x08, 0xb1, 0x9f, 0x66, 0xd8, 0x47, 0xa7, 0xa8, 0xd1, 0x23, 0x8b, 0xeb, /* Byte value: 0x41 */ + 0x0a, 0xd8, 0xaf, 0x7f, 0x62, 0xfd, 0x1c, 0x15, 0xdf, 0xc3, 0xf1, 0xc6, 0x20, 0x2f, 0xe9, 0x34, /* Byte value: 0x42 */ + 0xd3, 0x33, 0xf5, 0x45, 0x8b, 0xf2, 0xe6, 0x4d, 0xeb, 0x0d, 0xd1, 0x85, 0x49, 0x12, 0x97, 0x2c, /* Byte value: 0x43 */ + 0xfd, 0x9d, 0x69, 0xee, 0x5f, 0x6a, 0x23, 0xab, 0xe5, 0xc6, 0x7d, 0x59, 0x68, 0x0a, 0x53, 0x51, /* Byte value: 0x44 */ + 0x73, 0x2d, 0x97, 0xb9, 0x64, 0xf9, 0xe5, 0xde, 0x85, 0x60, 0x1a, 0xb8, 0x0c, 0xa7, 0x1f, 0xea, /* Byte value: 0x45 */ + 0xf1, 0x0d, 0xa3, 0x05, 0xa2, 0x7d, 0x8a, 0x0c, 0xce, 0x44, 0x62, 0xdd, 0xe9, 0x81, 0x5c, 0xc8, /* Byte value: 0x46 */ + 0x4a, 0xd4, 0x45, 0xa6, 0xda, 0x2d, 0xa3, 0x4b, 0x8c, 0x2f, 0xe0, 0x0a, 0xdc, 0xb3, 0xb9, 0x48, /* Byte value: 0x47 */ + 0xa1, 0x02, 0x92, 0x7b, 0x34, 0x99, 0x6a, 0xa4, 0xf9, 0x93, 0xe6, 0x22, 0x2a, 0x3a, 0x18, 0xab, /* Byte value: 0x48 */ + 0xaa, 0xc6, 0xcd, 0x83, 0x8d, 0xf6, 0x1f, 0x86, 0xb1, 0xae, 0x3a, 0xfb, 0x65, 0x9a, 0x61, 0xf2, /* Byte value: 0x49 */ + 0x74, 0x79, 0x02, 0xaa, 0x20, 0x81, 0x39, 0x5b, 0xe6, 0xdf, 0xd9, 0xe5, 0xc2, 0x8c, 0x69, 0x2a, /* Byte value: 0x4a */ + 0x14, 0x73, 0x9d, 0xfe, 0xc4, 0x39, 0x38, 0x2a, 0x7d, 0x45, 0x21, 0x4f, 0x40, 0x5e, 0x11, 0x68, /* Byte value: 0x4b */ + 0x39, 0xf9, 0xd2, 0x1f, 0xbe, 0xd4, 0x46, 0x95, 0x09, 0x4f, 0xfa, 0xb2, 0xd0, 0x14, 0xa6, 0xa2, /* Byte value: 0x4c */ + 0x95, 0x77, 0x7a, 0x08, 0xac, 0xc8, 0xec, 0xa1, 0x4c, 0xa0, 0x2e, 0x0b, 0x14, 0x2a, 0x21, 0xfd, /* Byte value: 0x4d */ + 0x5b, 0xcb, 0x6e, 0x86, 0x2f, 0x8b, 0x95, 0x8a, 0x7f, 0xea, 0x58, 0x26, 0x8c, 0x1b, 0x3d, 0x3a, /* Byte value: 0x4e */ + 0x56, 0x47, 0x54, 0xea, 0x09, 0x0e, 0x55, 0x1a, 0xc3, 0x96, 0x6a, 0xbd, 0x62, 0x1f, 0xa2, 0xce, /* Byte value: 0x4f */ + 0x8a, 0xc0, 0xb8, 0x0e, 0xd1, 0x9e, 0xa1, 0xa9, 0x79, 0xd8, 0xd3, 0x9d, 0x1b, 0xd4, 0x49, 0xcc, /* Byte value: 0x50 */ + 0xdf, 0xa3, 0x3f, 0xae, 0x76, 0xe5, 0x4f, 0xea, 0xc0, 0x8f, 0xce, 0x01, 0xc8, 0x99, 0x98, 0xb5, /* Byte value: 0x51 */ + 0xcd, 0x98, 0xc7, 0xc4, 0x2d, 0x36, 0xc2, 0x72, 0x49, 0x8b, 0x01, 0x0c, 0x29, 0x63, 0x6f, 0x70, /* Byte value: 0x52 */ + 0x51, 0x13, 0xc1, 0xf9, 0x4d, 0x76, 0x89, 0x9f, 0xa0, 0x29, 0xa9, 0xe0, 0xac, 0x34, 0xd4, 0x0e, /* Byte value: 0x53 */ + 0x34, 0x75, 0xe8, 0x73, 0x98, 0x51, 0x86, 0x05, 0xb5, 0x33, 0xc8, 0x29, 0x3e, 0x10, 0x39, 0x56, /* Byte value: 0x54 */ + 0xf6, 0x59, 0x36, 0x16, 0xe6, 0x05, 0x56, 0x89, 0xad, 0xfb, 0xa1, 0x80, 0x27, 0xaa, 0x2a, 0x08, /* Byte value: 0x55 */ + 0x8d, 0x94, 0x2d, 0x1d, 0x95, 0xe6, 0x7d, 0x2c, 0x1a, 0x67, 0x10, 0xc0, 0xd5, 0xff, 0x3f, 0x0c, /* Byte value: 0x56 */ + 0x6a, 0xd2, 0x30, 0x2b, 0x86, 0x45, 0x1d, 0x64, 0x44, 0x59, 0x09, 0x6c, 0xa2, 0xfd, 0x91, 0x76, /* Byte value: 0x57 */ + 0xf3, 0x35, 0x80, 0xc8, 0xd7, 0x9a, 0x58, 0x62, 0x23, 0x7b, 0x38, 0xe3, 0x37, 0x5c, 0xbf, 0x12, /* Byte value: 0x58 */ + 0xf5, 0x7d, 0xe5, 0x5c, 0x48, 0x70, 0xed, 0xd0, 0xd7, 0x3a, 0xd6, 0xa1, 0x96, 0xf8, 0x59, 0xbf, /* Byte value: 0x59 */ + 0x11, 0x1f, 0x2b, 0x20, 0xf5, 0xa6, 0x36, 0xc1, 0xf3, 0xc5, 0xb8, 0x2c, 0x50, 0xa8, 0x84, 0x72, /* Byte value: 0x5a */ + 0x9d, 0x97, 0xf6, 0xba, 0xbb, 0xd2, 0x22, 0xda, 0x7e, 0x5c, 0x85, 0xf3, 0xea, 0xd8, 0x2b, 0x13, /* Byte value: 0x5b */ + 0x75, 0x65, 0xf2, 0x2d, 0xfb, 0x13, 0x50, 0x6c, 0x71, 0x21, 0xf4, 0xfa, 0xad, 0x03, 0xf9, 0x47, /* Byte value: 0x5c */ + 0x19, 0xff, 0xa7, 0x92, 0xe2, 0xbc, 0xf8, 0xba, 0xc1, 0x39, 0x13, 0xd4, 0xae, 0x5a, 0x8e, 0x9c, /* Byte value: 0x5d */ + 0x03, 0x24, 0xd3, 0x4a, 0xae, 0x75, 0xbb, 0x59, 0x7a, 0xc1, 0x77, 0x21, 0xb1, 0x52, 0x73, 0xb7, /* Byte value: 0x5e */ + 0x70, 0x09, 0x44, 0xf3, 0xca, 0x8c, 0x5e, 0x87, 0xff, 0xa1, 0x6d, 0x99, 0xbd, 0xf5, 0x6c, 0x5d, /* Byte value: 0x5f */ + 0x72, 0x31, 0x67, 0x3e, 0xbf, 0x6b, 0x8c, 0xe9, 0x12, 0x9e, 0x37, 0xa7, 0x63, 0x28, 0x8f, 0x87, /* Byte value: 0x60 */ + 0x3a, 0xdd, 0x01, 0x55, 0x10, 0xa1, 0xfd, 0xcc, 0x73, 0x8e, 0x8d, 0x93, 0x61, 0x46, 0xd5, 0x15, /* Byte value: 0x61 */ + 0x8b, 0xdc, 0x48, 0x89, 0x0a, 0x0c, 0xc8, 0x9e, 0xee, 0x26, 0xfe, 0x82, 0x74, 0x5b, 0xd9, 0xa1, /* Byte value: 0x62 */ + 0x33, 0x21, 0x7d, 0x60, 0xdc, 0x29, 0x5a, 0x80, 0xd6, 0x8c, 0x0b, 0x74, 0xf0, 0x3b, 0x4f, 0x96, /* Byte value: 0x63 */ + 0xc6, 0x5c, 0x98, 0x3c, 0x94, 0x59, 0xb7, 0x50, 0x01, 0xb6, 0xdd, 0xd5, 0x66, 0xc3, 0x16, 0x29, /* Byte value: 0x64 */ + 0x2f, 0xb2, 0x6c, 0x2c, 0x0f, 0x0a, 0xac, 0xd1, 0x99, 0x35, 0x81, 0xc3, 0x4e, 0x97, 0x54, 0x10, /* Byte value: 0x65 */ + 0x89, 0xe4, 0x6b, 0x44, 0x7f, 0xeb, 0x1a, 0xf0, 0x03, 0x19, 0xa4, 0xbc, 0xaa, 0x86, 0x3a, 0x7b, /* Byte value: 0x66 */ + 0xbe, 0xb5, 0x50, 0x7d, 0x49, 0xcf, 0x27, 0xac, 0xcc, 0xeb, 0x1b, 0xb4, 0x25, 0xc4, 0x70, 0x9a, /* Byte value: 0x67 */ + 0xce, 0xbc, 0x14, 0x8e, 0x83, 0x43, 0x79, 0x2b, 0x33, 0x4a, 0x76, 0x2d, 0x98, 0x31, 0x1c, 0xc7, /* Byte value: 0x68 */ + 0xc4, 0x64, 0xbb, 0xf1, 0xe1, 0xbe, 0x65, 0x3e, 0xec, 0x89, 0x87, 0xeb, 0xb8, 0x1e, 0xf5, 0xf3, /* Byte value: 0x69 */ + 0xfa, 0xc9, 0xfc, 0xfd, 0x1b, 0x12, 0xff, 0x2e, 0x86, 0x79, 0xbe, 0x04, 0xa6, 0x21, 0x25, 0x91, /* Byte value: 0x6a */ + 0x3b, 0xc1, 0xf1, 0xd2, 0xcb, 0x33, 0x94, 0xfb, 0xe4, 0x70, 0xa0, 0x8c, 0x0e, 0xc9, 0x45, 0x78, /* Byte value: 0x6b */ + 0xdd, 0x9b, 0x1c, 0x63, 0x03, 0x02, 0x9d, 0x84, 0x2d, 0xb0, 0x94, 0x3f, 0x16, 0x44, 0x7b, 0x6f, /* Byte value: 0x6c */ + 0x77, 0x5d, 0xd1, 0xe0, 0x8e, 0xf4, 0x82, 0x02, 0x9c, 0x1e, 0xae, 0xc4, 0x73, 0xde, 0x1a, 0x9d, /* Byte value: 0x6d */ + 0xc5, 0x78, 0x4b, 0x76, 0x3a, 0x2c, 0x0c, 0x09, 0x7b, 0x77, 0xaa, 0xf4, 0xd7, 0x91, 0x65, 0x9e, /* Byte value: 0x6e */ + 0x16, 0x4b, 0xbe, 0x33, 0xb1, 0xde, 0xea, 0x44, 0x90, 0x7a, 0x7b, 0x71, 0x9e, 0x83, 0xf2, 0xb2, /* Byte value: 0x6f */ + 0xa4, 0x6e, 0x24, 0xa5, 0x05, 0x06, 0x64, 0x4f, 0x77, 0x13, 0x7f, 0x41, 0x3a, 0xcc, 0x8d, 0xb1, /* Byte value: 0x70 */ + 0xad, 0x92, 0x58, 0x90, 0xc9, 0x8e, 0xc3, 0x03, 0xd2, 0x11, 0xf9, 0xa6, 0xab, 0xb1, 0x17, 0x32, /* Byte value: 0x71 */ + 0xd8, 0xf7, 0xaa, 0xbd, 0x32, 0x9d, 0x93, 0x6f, 0xa3, 0x30, 0x0d, 0x5c, 0x06, 0xb2, 0xee, 0x75, /* Byte value: 0x72 */ + 0xb7, 0x49, 0x2c, 0x48, 0x85, 0x47, 0x80, 0xe0, 0x69, 0xe9, 0x9d, 0x53, 0xb4, 0xb9, 0xea, 0x19, /* Byte value: 0x73 */ + 0x92, 0x23, 0xef, 0x1b, 0xe8, 0xb0, 0x30, 0x24, 0x2f, 0x1f, 0xed, 0x56, 0xda, 0x01, 0x57, 0x3d, /* Byte value: 0x74 */ + 0x49, 0xf0, 0x96, 0xec, 0x74, 0x58, 0x18, 0x12, 0xf6, 0xee, 0x97, 0x2b, 0x6d, 0xe1, 0xca, 0xff, /* Byte value: 0x75 */ + 0x64, 0x7a, 0xd9, 0x0d, 0x0e, 0xb5, 0x66, 0xad, 0x82, 0xe4, 0x4c, 0xd6, 0xfd, 0xab, 0x7d, 0x35, /* Byte value: 0x76 */ + 0x91, 0x07, 0x3c, 0x51, 0x46, 0xc5, 0x8b, 0x7d, 0x55, 0xde, 0x9a, 0x77, 0x6b, 0x53, 0x24, 0x8a, /* Byte value: 0x77 */ + 0x9c, 0x8b, 0x06, 0x3d, 0x60, 0x40, 0x4b, 0xed, 0xe9, 0xa2, 0xa8, 0xec, 0x85, 0x57, 0xbb, 0x7e, /* Byte value: 0x78 */ + 0x01, 0x1c, 0xf0, 0x87, 0xdb, 0x92, 0x69, 0x37, 0x97, 0xfe, 0x2d, 0x1f, 0x6f, 0x8f, 0x90, 0x6d, /* Byte value: 0x79 */ + 0xe8, 0xf2, 0x04, 0x97, 0x40, 0xc1, 0x72, 0xb6, 0x0f, 0x7d, 0x71, 0x09, 0x47, 0xdb, 0xd2, 0x54, /* Byte value: 0x7a */ + 0xa0, 0x1e, 0x62, 0xfc, 0xef, 0x0b, 0x03, 0x93, 0x6e, 0x6d, 0xcb, 0x3d, 0x45, 0xb5, 0x88, 0xc6, /* Byte value: 0x7b */ + 0xbb, 0xd9, 0xe6, 0xa3, 0x78, 0x50, 0x29, 0x47, 0x42, 0x6b, 0x82, 0xd7, 0x35, 0x32, 0xe5, 0x80, /* Byte value: 0x7c */ + 0xb5, 0x71, 0x0f, 0x85, 0xf0, 0xa0, 0x52, 0x8e, 0x84, 0xd6, 0xc7, 0x6d, 0x6a, 0x64, 0x09, 0xc3, /* Byte value: 0x7d */ + 0x29, 0xfa, 0x09, 0xb8, 0x90, 0xe0, 0x19, 0x63, 0x6d, 0x74, 0x6f, 0x81, 0xef, 0x33, 0xb2, 0xbd, /* Byte value: 0x7e */ + 0xe3, 0x36, 0x5b, 0x6f, 0xf9, 0xae, 0x07, 0x94, 0x47, 0x40, 0xad, 0xd0, 0x08, 0x7b, 0xab, 0x0d, /* Byte value: 0x7f */ + 0x5a, 0xd7, 0x9e, 0x01, 0xf4, 0x19, 0xfc, 0xbd, 0xe8, 0x14, 0x75, 0x39, 0xe3, 0x94, 0xad, 0x57, /* Byte value: 0x80 */ + 0x17, 0x57, 0x4e, 0xb4, 0x6a, 0x4c, 0x83, 0x73, 0x07, 0x84, 0x56, 0x6e, 0xf1, 0x0c, 0x62, 0xdf, /* Byte value: 0x81 */ + 0x63, 0x2e, 0x4c, 0x1e, 0x4a, 0xcd, 0xba, 0x28, 0xe1, 0x5b, 0x8f, 0x8b, 0x33, 0x80, 0x0b, 0xf5, /* Byte value: 0x82 */ + 0x25, 0x6a, 0xc3, 0x53, 0x6d, 0xf7, 0xb0, 0xc4, 0x46, 0xf6, 0x70, 0x05, 0x6e, 0xb8, 0xbd, 0x24, /* Byte value: 0x83 */ + 0x7d, 0x85, 0x7e, 0x9f, 0xec, 0x09, 0x9e, 0x17, 0x43, 0xdd, 0x5f, 0x02, 0x53, 0xf1, 0xf3, 0xa9, /* Byte value: 0x84 */ + 0x20, 0x06, 0x75, 0x8d, 0x5c, 0x68, 0xbe, 0x2f, 0xc8, 0x76, 0xe9, 0x66, 0x7e, 0x4e, 0x28, 0x3e, /* Byte value: 0x85 */ + 0x13, 0x27, 0x08, 0xed, 0x80, 0x41, 0xe4, 0xaf, 0x1e, 0xfa, 0xe2, 0x12, 0x8e, 0x75, 0x67, 0xa8, /* Byte value: 0x86 */ + 0x0e, 0xa8, 0xe9, 0x26, 0x88, 0xf0, 0x7b, 0xc9, 0xc6, 0xbd, 0x45, 0xba, 0x5f, 0x56, 0xec, 0x43, /* Byte value: 0x87 */ + 0x9f, 0xaf, 0xd5, 0x77, 0xce, 0x35, 0xf0, 0xb4, 0x93, 0x63, 0xdf, 0xcd, 0x34, 0x05, 0xc8, 0xc9, /* Byte value: 0x88 */ + 0xe1, 0x0e, 0x78, 0xa2, 0x8c, 0x49, 0xd5, 0xfa, 0xaa, 0x7f, 0xf7, 0xee, 0xd6, 0xa6, 0x48, 0xd7, /* Byte value: 0x89 */ + 0x55, 0x63, 0x87, 0xa0, 0xa7, 0x7b, 0xee, 0x43, 0xb9, 0x57, 0x1d, 0x9c, 0xd3, 0x4d, 0xd1, 0x79, /* Byte value: 0x8a */ + 0x8f, 0xac, 0x0e, 0xd0, 0xe0, 0x01, 0xaf, 0x42, 0xf7, 0x58, 0x4a, 0xfe, 0x0b, 0x22, 0xdc, 0xd6, /* Byte value: 0x8b */ + 0xd1, 0x0b, 0xd6, 0x88, 0xfe, 0x15, 0x34, 0x23, 0x06, 0x32, 0x8b, 0xbb, 0x97, 0xcf, 0x74, 0xf6, /* Byte value: 0x8c */ + 0x40, 0x0c, 0xea, 0xd9, 0xb8, 0xd0, 0xbf, 0x5e, 0x53, 0xec, 0x11, 0xcc, 0xfc, 0x9c, 0x50, 0x7c, /* Byte value: 0x8d */ + 0x82, 0x20, 0x34, 0xbc, 0xc6, 0x84, 0x6f, 0xd2, 0x4b, 0x24, 0x78, 0x65, 0xe5, 0x26, 0x43, 0x22, /* Byte value: 0x8e */ + 0x52, 0x37, 0x12, 0xb3, 0xe3, 0x03, 0x32, 0xc6, 0xda, 0xe8, 0xde, 0xc1, 0x1d, 0x66, 0xa7, 0xb9, /* Byte value: 0x8f */ + 0xb2, 0x25, 0x9a, 0x96, 0xb4, 0xd8, 0x8e, 0x0b, 0xe7, 0x69, 0x04, 0x30, 0xa4, 0x4f, 0x7f, 0x03, /* Byte value: 0x90 */ + 0x59, 0xf3, 0x4d, 0x4b, 0x5a, 0x6c, 0x47, 0xe4, 0x92, 0xd5, 0x02, 0x18, 0x52, 0xc6, 0xde, 0xe0, /* Byte value: 0x91 */ + 0x3f, 0xb1, 0xb7, 0x8b, 0x21, 0x3e, 0xf3, 0x27, 0xfd, 0x0e, 0x14, 0xf0, 0x71, 0xb0, 0x40, 0x0f, /* Byte value: 0x92 */ + 0xd4, 0x67, 0x60, 0x56, 0xcf, 0x8a, 0x3a, 0xc8, 0x88, 0xb2, 0x12, 0xd8, 0x87, 0x39, 0xe1, 0xec, /* Byte value: 0x93 */ + 0x79, 0xf5, 0x38, 0xc6, 0x06, 0x04, 0xf9, 0xcb, 0x5a, 0xa3, 0xeb, 0x7e, 0x2c, 0x88, 0xf6, 0xde, /* Byte value: 0x94 */ + 0xe7, 0x46, 0x1d, 0x36, 0x13, 0xa3, 0x60, 0x48, 0x5e, 0x3e, 0x19, 0xac, 0x77, 0x02, 0xae, 0x7a, /* Byte value: 0x95 */ + 0xef, 0xa6, 0x91, 0x84, 0x04, 0xb9, 0xae, 0x33, 0x6c, 0xc2, 0xb2, 0x54, 0x89, 0xf0, 0xa4, 0x94, /* Byte value: 0x96 */ + 0xca, 0xcc, 0x52, 0xd7, 0x69, 0x4e, 0x1e, 0xf7, 0x2a, 0x34, 0xc2, 0x51, 0xe7, 0x48, 0x19, 0xb0, /* Byte value: 0x97 */ + 0x47, 0x58, 0x7f, 0xca, 0xfc, 0xa8, 0x63, 0xdb, 0x30, 0x53, 0xd2, 0x91, 0x32, 0xb7, 0x26, 0xbc, /* Byte value: 0x98 */ + 0xa5, 0x72, 0xd4, 0x22, 0xde, 0x94, 0x0d, 0x78, 0xe0, 0xed, 0x52, 0x5e, 0x55, 0x43, 0x1d, 0xdc, /* Byte value: 0x99 */ + 0xaf, 0xaa, 0x7b, 0x5d, 0xbc, 0x69, 0x11, 0x6d, 0x3f, 0x2e, 0xa3, 0x98, 0x75, 0x6c, 0xf4, 0xe8, /* Byte value: 0x9a */ + 0xa8, 0xfe, 0xee, 0x4e, 0xf8, 0x11, 0xcd, 0xe8, 0x5c, 0x91, 0x60, 0xc5, 0xbb, 0x47, 0x82, 0x28, /* Byte value: 0x9b */ + 0x93, 0x3f, 0x1f, 0x9c, 0x33, 0x22, 0x59, 0x13, 0xb8, 0xe1, 0xc0, 0x49, 0xb5, 0x8e, 0xc7, 0x50, /* Byte value: 0x9c */ + 0xed, 0x9e, 0xb2, 0x49, 0x71, 0x5e, 0x7c, 0x5d, 0x81, 0xfd, 0xe8, 0x6a, 0x57, 0x2d, 0x47, 0x4e, /* Byte value: 0x9d */ + 0xc3, 0x30, 0x2e, 0xe2, 0xa5, 0xc6, 0xb9, 0xbb, 0x8f, 0x36, 0x44, 0xb6, 0x76, 0x35, 0x83, 0x33, /* Byte value: 0x9e */ + 0x2a, 0xde, 0xda, 0xf2, 0x3e, 0x95, 0xa2, 0x3a, 0x17, 0xb5, 0x18, 0xa0, 0x5e, 0x61, 0xc1, 0x0a, /* Byte value: 0x9f */ + 0x96, 0x53, 0xa9, 0x42, 0x02, 0xbd, 0x57, 0xf8, 0x36, 0x61, 0x59, 0x2a, 0xa5, 0x78, 0x52, 0x4a, /* Byte value: 0xa0 */ + 0x2c, 0x96, 0xbf, 0x66, 0xa1, 0x7f, 0x17, 0x88, 0xe3, 0xf4, 0xf6, 0xe2, 0xff, 0xc5, 0x27, 0xa7, /* Byte value: 0xa1 */ + 0x5d, 0x83, 0x0b, 0x12, 0xb0, 0x61, 0x20, 0x38, 0x8b, 0xab, 0xb6, 0x64, 0x2d, 0xbf, 0xdb, 0x97, /* Byte value: 0xa2 */ + 0xe2, 0x2a, 0xab, 0xe8, 0x22, 0x3c, 0x6e, 0xa3, 0xd0, 0xbe, 0x80, 0xcf, 0x67, 0xf4, 0x3b, 0x60, /* Byte value: 0xa3 */ + 0x7f, 0xbd, 0x5d, 0x52, 0x99, 0xee, 0x4c, 0x79, 0xae, 0xe2, 0x05, 0x3c, 0x8d, 0x2c, 0x10, 0x73, /* Byte value: 0xa4 */ + 0x7e, 0xa1, 0xad, 0xd5, 0x42, 0x7c, 0x25, 0x4e, 0x39, 0x1c, 0x28, 0x23, 0xe2, 0xa3, 0x80, 0x1e, /* Byte value: 0xa5 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Byte value: 0xa6 */ + 0x3e, 0xad, 0x47, 0x0c, 0xfa, 0xac, 0x9a, 0x10, 0x6a, 0xf0, 0x39, 0xef, 0x1e, 0x3f, 0xd0, 0x62, /* Byte value: 0xa7 */ + 0xc7, 0x40, 0x68, 0xbb, 0x4f, 0xcb, 0xde, 0x67, 0x96, 0x48, 0xf0, 0xca, 0x09, 0x4c, 0x86, 0x44, /* Byte value: 0xa8 */ + 0x05, 0x6c, 0xb6, 0xde, 0x31, 0x9f, 0x0e, 0xeb, 0x8e, 0x80, 0x99, 0x63, 0x10, 0xf6, 0x95, 0x1a, /* Byte value: 0xa9 */ + 0x3c, 0x95, 0x64, 0xc1, 0x8f, 0x4b, 0x48, 0x7e, 0x87, 0xcf, 0x63, 0xd1, 0xc0, 0xe2, 0x33, 0xb8, /* Byte value: 0xaa */ + 0x87, 0x4c, 0x82, 0x62, 0xf7, 0x1b, 0x61, 0x39, 0xc5, 0xa4, 0xe1, 0x06, 0xf5, 0xd0, 0xd6, 0x38, /* Byte value: 0xab */ + 0x67, 0x5e, 0x0a, 0x47, 0xa0, 0xc0, 0xdd, 0xf4, 0xf8, 0x25, 0x3b, 0xf7, 0x4c, 0xf9, 0x0e, 0x82, /* Byte value: 0xac */ + 0x99, 0xe7, 0xb0, 0xe3, 0x51, 0xdf, 0x45, 0x06, 0x67, 0x22, 0x31, 0x8f, 0x95, 0xa1, 0x2e, 0x64, /* Byte value: 0xad */ + 0xab, 0xda, 0x3d, 0x04, 0x56, 0x64, 0x76, 0xb1, 0x26, 0x50, 0x17, 0xe4, 0x0a, 0x15, 0xf1, 0x9f, /* Byte value: 0xae */ + 0xf9, 0xed, 0x2f, 0xb7, 0xb5, 0x67, 0x44, 0x77, 0xfc, 0xb8, 0xc9, 0x25, 0x17, 0x73, 0x56, 0x26, /* Byte value: 0xaf */ + 0xd2, 0x2f, 0x05, 0xc2, 0x50, 0x60, 0x8f, 0x7a, 0x7c, 0xf3, 0xfc, 0x9a, 0x26, 0x9d, 0x07, 0x41, /* Byte value: 0xb0 */ + 0x06, 0x48, 0x65, 0x94, 0x9f, 0xea, 0xb5, 0xb2, 0xf4, 0x41, 0xee, 0x42, 0xa1, 0xa4, 0xe6, 0xad, /* Byte value: 0xb1 */ + 0xa9, 0xe2, 0x1e, 0xc9, 0x23, 0x83, 0xa4, 0xdf, 0xcb, 0x6f, 0x4d, 0xda, 0xd4, 0xc8, 0x12, 0x45, /* Byte value: 0xb2 */ + 0x1b, 0xc7, 0x84, 0x5f, 0x97, 0x5b, 0x2a, 0xd4, 0x2c, 0x06, 0x49, 0xea, 0x70, 0x87, 0x6d, 0x46, /* Byte value: 0xb3 */ + 0x48, 0xec, 0x66, 0x6b, 0xaf, 0xca, 0x71, 0x25, 0x61, 0x10, 0xba, 0x34, 0x02, 0x6e, 0x5a, 0x92, /* Byte value: 0xb4 */ + 0x97, 0x4f, 0x59, 0xc5, 0xd9, 0x2f, 0x3e, 0xcf, 0xa1, 0x9f, 0x74, 0x35, 0xca, 0xf7, 0xc2, 0x27, /* Byte value: 0xb5 */ + 0xc2, 0x2c, 0xde, 0x65, 0x7e, 0x54, 0xd0, 0x8c, 0x18, 0xc8, 0x69, 0xa9, 0x19, 0xba, 0x13, 0x5e, /* Byte value: 0xb6 */ + 0x86, 0x50, 0x72, 0xe5, 0x2c, 0x89, 0x08, 0x0e, 0x52, 0x5a, 0xcc, 0x19, 0x9a, 0x5f, 0x46, 0x55, /* Byte value: 0xb7 */ + 0x61, 0x16, 0x6f, 0xd3, 0x3f, 0x2a, 0x68, 0x46, 0x0c, 0x64, 0xd5, 0xb5, 0xed, 0x5d, 0xe8, 0x2f, /* Byte value: 0xb8 */ + 0x36, 0x4d, 0xcb, 0xbe, 0xed, 0xb6, 0x54, 0x6b, 0x58, 0x0c, 0x92, 0x17, 0xe0, 0xcd, 0xda, 0x8c, /* Byte value: 0xb9 */ + 0x57, 0x5b, 0xa4, 0x6d, 0xd2, 0x9c, 0x3c, 0x2d, 0x54, 0x68, 0x47, 0xa2, 0x0d, 0x90, 0x32, 0xa3, /* Byte value: 0xba */ + 0xf0, 0x11, 0x53, 0x82, 0x79, 0xef, 0xe3, 0x3b, 0x59, 0xba, 0x4f, 0xc2, 0x86, 0x0e, 0xcc, 0xa5, /* Byte value: 0xbb */ + 0x2e, 0xae, 0x9c, 0xab, 0xd4, 0x98, 0xc5, 0xe6, 0x0e, 0xcb, 0xac, 0xdc, 0x21, 0x18, 0xc4, 0x7d, /* Byte value: 0xbc */ + 0x7a, 0xd1, 0xeb, 0x8c, 0xa8, 0x71, 0x42, 0x92, 0x20, 0x62, 0x9c, 0x5f, 0x9d, 0xda, 0x85, 0x69, /* Byte value: 0xbd */ + 0x3d, 0x89, 0x94, 0x46, 0x54, 0xd9, 0x21, 0x49, 0x10, 0x31, 0x4e, 0xce, 0xaf, 0x6d, 0xa3, 0xd5, /* Byte value: 0xbe */ + 0x81, 0x04, 0xe7, 0xf6, 0x68, 0xf1, 0xd4, 0x8b, 0x31, 0xe5, 0x0f, 0x44, 0x54, 0x74, 0x30, 0x95, /* Byte value: 0xbf */ + 0x35, 0x69, 0x18, 0xf4, 0x43, 0xc3, 0xef, 0x32, 0x22, 0xcd, 0xe5, 0x36, 0x51, 0x9f, 0xa9, 0x3b, /* Byte value: 0xc0 */ + 0xc9, 0xe8, 0x81, 0x9d, 0xc7, 0x3b, 0xa5, 0xae, 0x50, 0xf5, 0xb5, 0x70, 0x56, 0x1a, 0x6a, 0x07, /* Byte value: 0xc1 */ + 0x65, 0x66, 0x29, 0x8a, 0xd5, 0x27, 0x0f, 0x9a, 0x15, 0x1a, 0x61, 0xc9, 0x92, 0x24, 0xed, 0x58, /* Byte value: 0xc2 */ + 0x78, 0xe9, 0xc8, 0x41, 0xdd, 0x96, 0x90, 0xfc, 0xcd, 0x5d, 0xc6, 0x61, 0x43, 0x07, 0x66, 0xb3, /* Byte value: 0xc3 */ + 0xbc, 0x8d, 0x73, 0xb0, 0x3c, 0x28, 0xf5, 0xc2, 0x21, 0xd4, 0x41, 0x8a, 0xfb, 0x19, 0x93, 0x40, /* Byte value: 0xc4 */ + 0x1c, 0x93, 0x11, 0x4c, 0xd3, 0x23, 0xf6, 0x51, 0x4f, 0xb9, 0x8a, 0xb7, 0xbe, 0xac, 0x1b, 0x86, /* Byte value: 0xc5 */ + 0x68, 0xea, 0x13, 0xe6, 0xf3, 0xa2, 0xcf, 0x0a, 0xa9, 0x66, 0x53, 0x52, 0x7c, 0x20, 0x72, 0xac, /* Byte value: 0xc6 */ + 0xcc, 0x84, 0x37, 0x43, 0xf6, 0xa4, 0xab, 0x45, 0xde, 0x75, 0x2c, 0x13, 0x46, 0xec, 0xff, 0x1d, /* Byte value: 0xc7 */ + 0xbf, 0xa9, 0xa0, 0xfa, 0x92, 0x5d, 0x4e, 0x9b, 0x5b, 0x15, 0x36, 0xab, 0x4a, 0x4b, 0xe0, 0xf7, /* Byte value: 0xc8 */ + 0x71, 0x15, 0xb4, 0x74, 0x11, 0x1e, 0x37, 0xb0, 0x68, 0x5f, 0x40, 0x86, 0xd2, 0x7a, 0xfc, 0x30, /* Byte value: 0xc9 */ + 0xb8, 0xfd, 0x35, 0xe9, 0xd6, 0x25, 0x92, 0x1e, 0x38, 0xaa, 0xf5, 0xf6, 0x84, 0x60, 0x96, 0x37, /* Byte value: 0xca */ + 0xa6, 0x56, 0x07, 0x68, 0x70, 0xe1, 0xb6, 0x21, 0x9a, 0x2c, 0x25, 0x7f, 0xe4, 0x11, 0x6e, 0x6b, /* Byte value: 0xcb */ + 0x22, 0x3e, 0x56, 0x40, 0x29, 0x8f, 0x6c, 0x41, 0x25, 0x49, 0xb3, 0x58, 0xa0, 0x93, 0xcb, 0xe4, /* Byte value: 0xcc */ + 0x4d, 0x80, 0xd0, 0xb5, 0x9e, 0x55, 0x7f, 0xce, 0xef, 0x90, 0x23, 0x57, 0x12, 0x98, 0xcf, 0x88, /* Byte value: 0xcd */ + 0xb0, 0x1d, 0xb9, 0x5b, 0xc1, 0x3f, 0x5c, 0x65, 0x0a, 0x56, 0x5e, 0x0e, 0x7a, 0x92, 0x9c, 0xd9, /* Byte value: 0xce */ + 0x90, 0x1b, 0xcc, 0xd6, 0x9d, 0x57, 0xe2, 0x4a, 0xc2, 0x20, 0xb7, 0x68, 0x04, 0xdc, 0xb4, 0xe7, /* Byte value: 0xcf */ + 0x23, 0x22, 0xa6, 0xc7, 0xf2, 0x1d, 0x05, 0x76, 0xb2, 0xb7, 0x9e, 0x47, 0xcf, 0x1c, 0x5b, 0x89, /* Byte value: 0xd0 */ + 0x37, 0x51, 0x3b, 0x39, 0x36, 0x24, 0x3d, 0x5c, 0xcf, 0xf2, 0xbf, 0x08, 0x8f, 0x42, 0x4a, 0xe1, /* Byte value: 0xd1 */ + 0x6b, 0xce, 0xc0, 0xac, 0x5d, 0xd7, 0x74, 0x53, 0xd3, 0xa7, 0x24, 0x73, 0xcd, 0x72, 0x01, 0x1b, /* Byte value: 0xd2 */ + 0x09, 0xfc, 0x7c, 0x35, 0xcc, 0x88, 0xa7, 0x4c, 0xa5, 0x02, 0x86, 0xe7, 0x91, 0x7d, 0x9a, 0x83, /* Byte value: 0xd3 */ + 0x24, 0x76, 0x33, 0xd4, 0xb6, 0x65, 0xd9, 0xf3, 0xd1, 0x08, 0x5d, 0x1a, 0x01, 0x37, 0x2d, 0x49, /* Byte value: 0xd4 */ + 0x31, 0x19, 0x5e, 0xad, 0xa9, 0xce, 0x88, 0xee, 0x3b, 0xb3, 0x51, 0x4a, 0x2e, 0xe6, 0xac, 0x4c, /* Byte value: 0xd5 */ + 0x4e, 0xa4, 0x03, 0xff, 0x30, 0x20, 0xc4, 0x97, 0x95, 0x51, 0x54, 0x76, 0xa3, 0xca, 0xbc, 0x3f, /* Byte value: 0xd6 */ + 0x80, 0x18, 0x17, 0x71, 0xb3, 0x63, 0xbd, 0xbc, 0xa6, 0x1b, 0x22, 0x5b, 0x3b, 0xfb, 0xa0, 0xf8, /* Byte value: 0xd7 */ + 0x27, 0x52, 0xe0, 0x9e, 0x18, 0x10, 0x62, 0xaa, 0xab, 0xc9, 0x2a, 0x3b, 0xb0, 0x65, 0x5e, 0xfe, /* Byte value: 0xd8 */ + 0x58, 0xef, 0xbd, 0xcc, 0x81, 0xfe, 0x2e, 0xd3, 0x05, 0x2b, 0x2f, 0x07, 0x3d, 0x49, 0x4e, 0x8d, /* Byte value: 0xd9 */ + 0x21, 0x1a, 0x85, 0x0a, 0x87, 0xfa, 0xd7, 0x18, 0x5f, 0x88, 0xc4, 0x79, 0x11, 0xc1, 0xb8, 0x53, /* Byte value: 0xda */ + 0xcf, 0xa0, 0xe4, 0x09, 0x58, 0xd1, 0x10, 0x1c, 0xa4, 0xb4, 0x5b, 0x32, 0xf7, 0xbe, 0x8c, 0xaa, /* Byte value: 0xdb */ + 0x94, 0x6b, 0x8a, 0x8f, 0x77, 0x5a, 0x85, 0x96, 0xdb, 0x5e, 0x03, 0x14, 0x7b, 0xa5, 0xb1, 0x90, /* Byte value: 0xdc */ + 0x2d, 0x8a, 0x4f, 0xe1, 0x7a, 0xed, 0x7e, 0xbf, 0x74, 0x0a, 0xdb, 0xfd, 0x90, 0x4a, 0xb7, 0xca, /* Byte value: 0xdd */ + 0xde, 0xbf, 0xcf, 0x29, 0xad, 0x77, 0x26, 0xdd, 0x57, 0x71, 0xe3, 0x1e, 0xa7, 0x16, 0x08, 0xd8, /* Byte value: 0xde */ + 0xae, 0xb6, 0x8b, 0xda, 0x67, 0xfb, 0x78, 0x5a, 0xa8, 0xd0, 0x8e, 0x87, 0x1a, 0xe3, 0x64, 0x85, /* Byte value: 0xdf */ + 0x8c, 0x88, 0xdd, 0x9a, 0x4e, 0x74, 0x14, 0x1b, 0x8d, 0x99, 0x3d, 0xdf, 0xba, 0x70, 0xaf, 0x61, /* Byte value: 0xe0 */ + 0x5e, 0xa7, 0xd8, 0x58, 0x1e, 0x14, 0x9b, 0x61, 0xf1, 0x6a, 0xc1, 0x45, 0x9c, 0xed, 0xa8, 0x20, /* Byte value: 0xe1 */ + 0xa3, 0x3a, 0xb1, 0xb6, 0x41, 0x7e, 0xb8, 0xca, 0x14, 0xac, 0xbc, 0x1c, 0xf4, 0xe7, 0xfb, 0x71, /* Byte value: 0xe2 */ + 0x2b, 0xc2, 0x2a, 0x75, 0xe5, 0x07, 0xcb, 0x0d, 0x80, 0x4b, 0x35, 0xbf, 0x31, 0xee, 0x51, 0x67, /* Byte value: 0xe3 */ + 0x9e, 0xb3, 0x25, 0xf0, 0x15, 0xa7, 0x99, 0x83, 0x04, 0x9d, 0xf2, 0xd2, 0x5b, 0x8a, 0x58, 0xa4, /* Byte value: 0xe4 */ + 0xbd, 0x91, 0x83, 0x37, 0xe7, 0xba, 0x9c, 0xf5, 0xb6, 0x2a, 0x6c, 0x95, 0x94, 0x96, 0x03, 0x2d, /* Byte value: 0xe5 */ + 0x1a, 0xdb, 0x74, 0xd8, 0x4c, 0xc9, 0x43, 0xe3, 0xbb, 0xf8, 0x64, 0xf5, 0x1f, 0x08, 0xfd, 0x2b, /* Byte value: 0xe6 */ + 0x98, 0xfb, 0x40, 0x64, 0x8a, 0x4d, 0x2c, 0x31, 0xf0, 0xdc, 0x1c, 0x90, 0xfa, 0x2e, 0xbe, 0x09, /* Byte value: 0xe7 */ + 0xd7, 0x43, 0xb3, 0x1c, 0x61, 0xff, 0x81, 0x91, 0xf2, 0x73, 0x65, 0xf9, 0x36, 0x6b, 0x92, 0x5b, /* Byte value: 0xe8 */ + 0x43, 0x28, 0x39, 0x93, 0x16, 0xa5, 0x04, 0x07, 0x29, 0x2d, 0x66, 0xed, 0x4d, 0xce, 0x23, 0xcb, /* Byte value: 0xe9 */ + 0xd0, 0x17, 0x26, 0x0f, 0x25, 0x87, 0x5d, 0x14, 0x91, 0xcc, 0xa6, 0xa4, 0xf8, 0x40, 0xe4, 0x9b, /* Byte value: 0xea */ + 0x4b, 0xc8, 0xb5, 0x21, 0x01, 0xbf, 0xca, 0x7c, 0x1b, 0xd1, 0xcd, 0x15, 0xb3, 0x3c, 0x29, 0x25, /* Byte value: 0xeb */ + 0x28, 0xe6, 0xf9, 0x3f, 0x4b, 0x72, 0x70, 0x54, 0xfa, 0x8a, 0x42, 0x9e, 0x80, 0xbc, 0x22, 0xd0, /* Byte value: 0xec */ + 0x9b, 0xdf, 0x93, 0x2e, 0x24, 0x38, 0x97, 0x68, 0x8a, 0x1d, 0x6b, 0xb1, 0x4b, 0x7c, 0xcd, 0xbe, /* Byte value: 0xed */ + 0x4c, 0x9c, 0x20, 0x32, 0x45, 0xc7, 0x16, 0xf9, 0x78, 0x6e, 0x0e, 0x48, 0x7d, 0x17, 0x5f, 0xe5, /* Byte value: 0xee */ + 0x6f, 0xbe, 0x86, 0xf5, 0xb7, 0xda, 0x13, 0x8f, 0xca, 0xd9, 0x90, 0x0f, 0xb2, 0x0b, 0x04, 0x6c, /* Byte value: 0xef */ + 0x4f, 0xb8, 0xf3, 0x78, 0xeb, 0xb2, 0xad, 0xa0, 0x02, 0xaf, 0x79, 0x69, 0xcc, 0x45, 0x2c, 0x52, /* Byte value: 0xf0 */ + 0x0b, 0xc4, 0x5f, 0xf8, 0xb9, 0x6f, 0x75, 0x22, 0x48, 0x3d, 0xdc, 0xd9, 0x4f, 0xa0, 0x79, 0x59, /* Byte value: 0xf1 */ + 0x42, 0x34, 0xc9, 0x14, 0xcd, 0x37, 0x6d, 0x30, 0xbe, 0xd3, 0x4b, 0xf2, 0x22, 0x41, 0xb3, 0xa6, /* Byte value: 0xf2 */ + 0xb6, 0x55, 0xdc, 0xcf, 0x5e, 0xd5, 0xe9, 0xd7, 0xfe, 0x17, 0xb0, 0x4c, 0xdb, 0x36, 0x7a, 0x74, /* Byte value: 0xf3 */ + 0xf4, 0x61, 0x15, 0xdb, 0x93, 0xe2, 0x84, 0xe7, 0x40, 0xc4, 0xfb, 0xbe, 0xf9, 0x77, 0xc9, 0xd2, /* Byte value: 0xf4 */ + 0xfe, 0xb9, 0xba, 0xa4, 0xf1, 0x1f, 0x98, 0xf2, 0x9f, 0x07, 0x0a, 0x78, 0xd9, 0x58, 0x20, 0xe6, /* Byte value: 0xf5 */ + 0x0d, 0x8c, 0x3a, 0x6c, 0x26, 0x85, 0xc0, 0x90, 0xbc, 0x7c, 0x32, 0x9b, 0xee, 0x04, 0x9f, 0xf4, /* Byte value: 0xf6 */ + 0xb1, 0x01, 0x49, 0xdc, 0x1a, 0xad, 0x35, 0x52, 0x9d, 0xa8, 0x73, 0x11, 0x15, 0x1d, 0x0c, 0xb4, /* Byte value: 0xf7 */ + 0x07, 0x54, 0x95, 0x13, 0x44, 0x78, 0xdc, 0x85, 0x63, 0xbf, 0xc3, 0x5d, 0xce, 0x2b, 0x76, 0xc0, /* Byte value: 0xf8 */ + 0x46, 0x44, 0x8f, 0x4d, 0x27, 0x3a, 0x0a, 0xec, 0xa7, 0xad, 0xff, 0x8e, 0x5d, 0x38, 0xb6, 0xd1, /* Byte value: 0xf9 */ + 0x45, 0x60, 0x5c, 0x07, 0x89, 0x4f, 0xb1, 0xb5, 0xdd, 0x6c, 0x88, 0xaf, 0xec, 0x6a, 0xc5, 0x66, /* Byte value: 0xfa */ + 0xda, 0xcf, 0x89, 0x70, 0x47, 0x7a, 0x41, 0x01, 0x4e, 0x0f, 0x57, 0x62, 0xd8, 0x6f, 0x0d, 0xaf, /* Byte value: 0xfb */ + 0xdb, 0xd3, 0x79, 0xf7, 0x9c, 0xe8, 0x28, 0x36, 0xd9, 0xf1, 0x7a, 0x7d, 0xb7, 0xe0, 0x9d, 0xc2, /* Byte value: 0xfc */ + 0xe9, 0xee, 0xf4, 0x10, 0x9b, 0x53, 0x1b, 0x81, 0x98, 0x83, 0x5c, 0x16, 0x28, 0x54, 0x42, 0x39, /* Byte value: 0xfd */ + 0xf8, 0xf1, 0xdf, 0x30, 0x6e, 0xf5, 0x2d, 0x40, 0x6b, 0x46, 0xe4, 0x3a, 0x78, 0xfc, 0xc6, 0x4b, /* Byte value: 0xfe */ + 0x50, 0x0f, 0x31, 0x7e, 0x96, 0xe4, 0xe0, 0xa8, 0x37, 0xd7, 0x84, 0xff, 0xc3, 0xbb, 0x44, 0x63, /* Byte value: 0xff */ + 0x6d, 0x86, 0xa5, 0x38, 0xc2, 0x3d, 0xc1, 0xe1, 0x27, 0xe6, 0xca, 0x31, 0x6c, 0xd6, 0xe7, 0xb6, /* Byte value: 0x00 */ +}; From d80cf3e1a864ee96999f77a05028d5a79d7caefa Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:05:52 -0500 Subject: [PATCH 315/576] Create SIMD_tables.h --- .../gost2015_kuznechik/SIMD_tables.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.h diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.h b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.h new file mode 100644 index 000000000..a5514159a --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.h @@ -0,0 +1,19 @@ +#if !defined LIBGOST15_SIMD_TABLES_HEADER_INCLUDED_ +#define LIBGOST15_SIMD_TABLES_HEADER_INCLUDED_ + +#include "libgost15/platform.h" + +/* Crude alignment macros. */ +#if defined _MSC_VER +#define ALIGNED(what) __declspec(align(16)) what +#elif defined(__GNUC__) +#define ALIGNED(what) what __attribute__((aligned(16))) +#else +#define ALIGNED(what) what +#endif + +extern const uint8_t ALIGNED(bitmask[16]); +extern const uint8_t ALIGNED(precomputedInversedLSTable[16 * 256 * 16]); +extern const uint8_t ALIGNED(precomputedLSTable[16 * 256 * 16]); + +#endif From dd5b5c077c1b7481faf2c99571d15a2a281f1aa1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:06:34 -0500 Subject: [PATCH 316/576] Create compact.c --- .../encryption/gost2015_kuznechik/compact.c | 240 ++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c new file mode 100644 index 000000000..73a8f427d --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c @@ -0,0 +1,240 @@ +#include "libgost15/libgost15.h" +#include "shared/tables.h" +#include + + +const size_t WorkspaceOfScheduleRoundKeys = BlockLengthInBytes * 2; + + +static uint8_t multiplyInGF256( + uint8_t left, + uint8_t right +) { + if (left && right) { + int productLogarithm_ = 0; + uint8_t leftLogarithm_ = logarithmicTable[left]; + uint8_t rightLogarithm_ = logarithmicTable[right]; + productLogarithm_ = leftLogarithm_ + rightLogarithm_; + if (productLogarithm_ > 0xff) { productLogarithm_ -= 0xff; } + return exponentialTable[productLogarithm_]; + } + else { + return 0; + } +} + + +static void applyXTransformation( + const uint8_t *restrict key, + const uint8_t *input, + uint8_t *restrict output +) { + uint64_t key_[2], input_[2], output_[2]; + + /* Compiler usually sees this through. Advantages of using memcpy: */ + memcpy(key_, key, BlockLengthInBytes); + memcpy(input_, input, BlockLengthInBytes); + + output_[0] = input_[0] ^ key_[0]; + output_[1] = input_[1] ^ key_[1]; + + memcpy(output, output_, BlockLengthInBytes); +} + + +static void applySTransformation( + uint8_t *block +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; byteIndex_ += 8) { + block[byteIndex_ + 0] = Pi[block[byteIndex_ + 0]]; + block[byteIndex_ + 1] = Pi[block[byteIndex_ + 1]]; + block[byteIndex_ + 2] = Pi[block[byteIndex_ + 2]]; + block[byteIndex_ + 3] = Pi[block[byteIndex_ + 3]]; + + block[byteIndex_ + 4] = Pi[block[byteIndex_ + 4]]; + block[byteIndex_ + 5] = Pi[block[byteIndex_ + 5]]; + block[byteIndex_ + 6] = Pi[block[byteIndex_ + 6]]; + block[byteIndex_ + 7] = Pi[block[byteIndex_ + 7]]; + } +} + + +static void applyInversedSTransformation( + uint8_t *block +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; byteIndex_ += 8) { + block[byteIndex_ + 0] = InversedPi[block[byteIndex_ + 0]]; + block[byteIndex_ + 1] = InversedPi[block[byteIndex_ + 1]]; + block[byteIndex_ + 2] = InversedPi[block[byteIndex_ + 2]]; + block[byteIndex_ + 3] = InversedPi[block[byteIndex_ + 3]]; + + block[byteIndex_ + 4] = InversedPi[block[byteIndex_ + 4]]; + block[byteIndex_ + 5] = InversedPi[block[byteIndex_ + 5]]; + block[byteIndex_ + 6] = InversedPi[block[byteIndex_ + 6]]; + block[byteIndex_ + 7] = InversedPi[block[byteIndex_ + 7]]; + } +} + + +static void applyLTransformation( + const uint8_t *input, + uint8_t *output +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { + uint8_t cache_ = 0; + for (int addendIndex_ = 0; addendIndex_ < BlockLengthInBytes; ++addendIndex_) { + cache_ ^= multiplyInGF256(LTransformationMatrix[addendIndex_][byteIndex_], + input[addendIndex_]); + } + output[byteIndex_] = cache_; + } +} + + +static void applyInversedLTransformation( + const uint8_t *input, + uint8_t *output +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { + uint8_t cache_ = 0; + for (int addendIndex_ = 0; addendIndex_ < BlockLengthInBytes; ++addendIndex_) { + cache_ ^= multiplyInGF256(inversedLTransformationMatrix[addendIndex_][byteIndex_], + input[addendIndex_]); + } + output[byteIndex_] = cache_; + } +} + + +static void applyXSLTransformation( + const uint8_t *key, + uint8_t *block, + uint8_t *temporary +) { + applyXTransformation(key, block, temporary); + applySTransformation(temporary); + applyLTransformation(temporary, block); +} + + +static void applyInversedSLXTransformation( + const uint8_t *key, + uint8_t *block, + uint8_t *temporary +) { + applyXTransformation(key, block, temporary); + applyInversedLTransformation(temporary, block); + applyInversedSTransformation(block); +} + + +static void swapBlocks( + uint8_t *restrict left, + uint8_t *restrict right, + uint8_t *restrict temporary +) { + /* left != right != temp shall hold. */ + memcpy(temporary, left, BlockLengthInBytes); + memcpy(left, right, BlockLengthInBytes); + memcpy(right, temporary, BlockLengthInBytes); +} + + +static void applyFTransformation( + const uint8_t *restrict key, + uint8_t *restrict left, + uint8_t *restrict right, + uint8_t *restrict temporary1, + uint8_t *restrict temporary2 +) { + memcpy(temporary1, left, BlockLengthInBytes); + applyXSLTransformation(key, temporary1, temporary2); + applyXTransformation(temporary1, right, right); + swapBlocks(left, right, temporary2); +} + + +static void fetchKeyScheduleRoundConstant( + uint8_t index, + uint8_t *restrict roundConstant, + uint8_t *restrict temporary +) { + memset(temporary, 0, BlockLengthInBytes); + temporary[BlockLengthInBytes - 1] = index; + applyLTransformation(temporary, roundConstant); +} + + +static void scheduleRoundKeys( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + uint8_t *memory_ = memory, *roundKeys_ = roundKeys; + + memcpy(&roundKeys_[0], key, BlockLengthInBytes * 2); + + for (int nextKeyIndex_ = 2, constantIndex_ = 0; + nextKeyIndex_ != NumberOfRounds; + nextKeyIndex_ += 2) { + memcpy(&roundKeys_[BlockLengthInBytes * (nextKeyIndex_)], + &roundKeys_[BlockLengthInBytes * (nextKeyIndex_ - 2)], + BlockLengthInBytes * 2); + + for (int feistelRoundIndex_ = 0; feistelRoundIndex_ < NumberOfRoundsInKeySchedule; ++feistelRoundIndex_) { + applyFTransformation(&roundConstants[BlockLengthInBytes * constantIndex_++], + &roundKeys_[BlockLengthInBytes * (nextKeyIndex_)], + &roundKeys_[BlockLengthInBytes * (nextKeyIndex_ + 1)], + &memory_[0], + &memory_[BlockLengthInBytes]); + } + } +} + + +void scheduleEncryptionRoundKeysForGost15( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + scheduleRoundKeys(roundKeys, key, memory); +} + + +void scheduleDecryptionRoundKeysForGost15( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + scheduleRoundKeys(roundKeys, key, memory); +} + + +void encryptBlockWithGost15( + const void *restrict roundKeys, + void *restrict block +) { + const uint8_t *roundKeys_ = roundKeys; + uint8_t cache_[BlockLengthInBytes] = {0}; + int round_ = 0; + + for (; round_ < NumberOfRounds - 1; ++round_) { + applyXSLTransformation(&roundKeys_[BlockLengthInBytes * round_], block, cache_); + } + applyXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, block); +} + + +void decryptBlockWithGost15( + const void *restrict roundKeys, + void *restrict block +) { + const uint8_t *roundKeys_ = roundKeys; + uint8_t cache_[BlockLengthInBytes] = {0}; + int round_ = NumberOfRounds - 1; + + for (; round_ > 0; --round_) { + applyInversedSLXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, cache_); + } + applyXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, block); +} From 7119b6d08a9e7ca00f62741c45e1d8531214f8ab Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:07:13 -0500 Subject: [PATCH 317/576] Create libgost15.h --- .../gost2015_kuznechik/libgost15/libgost15.h | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/libgost15.h diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/libgost15.h b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/libgost15.h new file mode 100644 index 000000000..15548fd8b --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/libgost15.h @@ -0,0 +1,46 @@ +#if !defined LIBGOST15_HEADER_INCLUDED_ +#define LIBGOST15_HEADER_INCLUDED_ + +#include "platform.h" + +enum { + NumberOfRounds = 10, + NumberOfRoundsInKeySchedule = 8, + + BlockLengthInBytes = 128 / 8, + KeyLengthInBytes = 256 / 8, +}; + +extern const size_t WorkspaceOfScheduleRoundKeys; + +#ifdef __cplusplus +extern "C" { +#endif + +void encryptBlockWithGost15( + const void *roundKeys, + void *block +); + +void decryptBlockWithGost15( + const void *roundKeys, + void *block +); + +void scheduleEncryptionRoundKeysForGost15( + void *roundKeys, + const void *key, + void *memory +); + +void scheduleDecryptionRoundKeysForGost15( + void *roundKeys, + const void *key, + void *memory +); + +#ifdef __cplusplus +} +#endif + +#endif From 8795ac252344ebd4f9a78f7a40f8e1d2923288e3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:07:44 -0500 Subject: [PATCH 318/576] Create platform.h --- .../gost2015_kuznechik/libgost15/platform.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/platform.h diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/platform.h b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/platform.h new file mode 100644 index 000000000..077cf2856 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/libgost15/platform.h @@ -0,0 +1,14 @@ +#if !defined LIBGOST15_PLATFORM_HEADER_INCLUDED_ +#define LIBGOST15_PLATFORM_HEADER_INCLUDED_ + +#include +#include + +/* TODO: Make platform-dependent keywords available within CMake. + */ + +/* Restrict keyword macros. */ + +/* Force inline keyword macros. */ + +#endif From 41f994d7be6e2037d7d86f01ac7dcd2562a215ce Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:08:06 -0500 Subject: [PATCH 319/576] Create optimised.c --- .../encryption/gost2015_kuznechik/optimised.c | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised.c diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised.c b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised.c new file mode 100644 index 000000000..7e0edcc6e --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised.c @@ -0,0 +1,206 @@ +#include "libgost15/libgost15.h" +#include "shared/tables.h" +#include "optimised_tables.h" +#include + + +const size_t WorkspaceOfScheduleRoundKeys = BlockLengthInBytes * 2; + + +static void applySTransformation( + unsigned char *block +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { + block[byteIndex_] = Pi[block[byteIndex_]]; + } +} + + +static void applyInversedSTransformation( + unsigned char *block +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { + block[byteIndex_] = InversedPi[block[byteIndex_]]; + } +} + + +static void swapBlocks( + uint64_t *restrict left, + uint64_t *restrict right +) { + /* Inequality left != right shall hold. */ + left[0] = left[0] ^ right[0]; + left[1] = left[1] ^ right[1]; + + right[0] = left[0] ^ right[0]; + right[1] = left[1] ^ right[1]; + + left[0] = left[0] ^ right[0]; + left[1] = left[1] ^ right[1]; +} + + +static void applyLSTransformation( + const unsigned char *input, + uint64_t *output +) { + uint64_t left_ = 0, right_ = 0; + + for (int index_ = 0; index_ < 16; ++index_) { + left_ ^= precomputedLSTableLeft[index_][input[index_]].asQWord; + } + + for (int index_ = 0; index_ < 16; ++index_) { + right_ ^= precomputedLSTableRight[index_][input[index_]].asQWord; + } + + output[0] = left_; + output[1] = right_; +} + + +static void applyInversedLSTransformation( + const unsigned char *input, + uint64_t *output +) { + + uint64_t left_ = 0, right_ = 0; + + for (int index_ = 0; index_ < 16; ++index_) { + left_ ^= precomputedInversedLSTableLeft[index_][input[index_]].asQWord; + } + + for (int index_ = 0; index_ < 16; ++index_) { + right_ ^= precomputedInversedLSTableRight[index_][input[index_]].asQWord; + } + + output[0] = left_; + output[1] = right_; +} + + +static void applyFTransformation( + int constantIndex, + uint64_t *restrict left, + uint64_t *restrict right, + uint64_t *restrict temp1, + uint64_t *restrict temp2 +) { + temp1[0] = left[0] ^ roundConstantsLeft[constantIndex].asQWord; + temp1[1] = left[1] ^ roundConstantsRight[constantIndex].asQWord; + + applyLSTransformation((unsigned char *) temp1, temp2); + + right[0] ^= temp2[0]; + right[1] ^= temp2[1]; + + swapBlocks(left, right); +} + + +void scheduleEncryptionRoundKeysForGost15( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + uint64_t *memory_ = memory; + uint64_t *roundKeys_ = roundKeys; + + memcpy(&roundKeys_[0], key, BlockLengthInBytes * 2); + + for (int nextKeyIndex_ = 2, constantIndex_ = 0; + nextKeyIndex_ != NumberOfRounds; + nextKeyIndex_ += 2) { + memcpy(&roundKeys_[2 * (nextKeyIndex_)], + &roundKeys_[2 * (nextKeyIndex_ - 2)], + BlockLengthInBytes * 2); + + for (int feistelRoundIndex_ = 0; + feistelRoundIndex_ < NumberOfRoundsInKeySchedule; + ++feistelRoundIndex_) { + applyFTransformation(constantIndex_++, + &roundKeys_[2 * (nextKeyIndex_)], + &roundKeys_[2 * (nextKeyIndex_ + 1)], + &memory_[0], + &memory_[2]); + } + } +} + + +void scheduleDecryptionRoundKeysForGost15( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + uint64_t *roundKeys_ = roundKeys; + uint64_t cache_[2] = {0}; + + scheduleEncryptionRoundKeysForGost15(roundKeys, key, memory); + + for (int roundKeyIndex_ = 1; roundKeyIndex_ <= 8; ++roundKeyIndex_) { + memcpy(cache_, + &roundKeys_[2 * roundKeyIndex_], + BlockLengthInBytes); + applySTransformation((unsigned char *) cache_); + applyInversedLSTransformation((unsigned char *) cache_, + &roundKeys_[2 * roundKeyIndex_]); + } +} + + +void encryptBlockWithGost15( + const void *restrict roundKeys, + void *restrict data +) { + uint64_t *data_ = data; + const uint64_t *roundKeys_ = roundKeys; + uint64_t cache_[2] = {0}; + size_t round_ = 0; + + for (; round_ < NumberOfRounds - 1; ++round_) { + cache_[0] = data_[0] ^ roundKeys_[2 * round_]; + cache_[1] = data_[1] ^ roundKeys_[2 * round_ + 1]; + + applyLSTransformation((unsigned char *) cache_, data); + } + + data_[0] = data_[0] ^ roundKeys_[2 * round_]; + data_[1] = data_[1] ^ roundKeys_[2 * round_ + 1]; +} + + +void decryptBlockWithGost15( + const void *restrict roundKeys, + void *restrict data +) { + uint64_t *data_ = data; + const uint64_t *roundKeys_ = roundKeys; + uint64_t cache_[2] = {0}; + size_t round_ = NumberOfRounds - 1; + + data_[0] ^= roundKeys_[2 * round_]; + data_[1] ^= roundKeys_[2 * round_ + 1]; + --round_; + + applySTransformation(data); + applyInversedLSTransformation((unsigned char *) data, cache_); + applyInversedLSTransformation((unsigned char *) cache_, data); + + cache_[0] = data_[0] ^ roundKeys_[2 * round_]; + cache_[1] = data_[1] ^ roundKeys_[2 * round_ + 1]; + --round_; + + for (; round_ > 0; --round_) { + applyInversedLSTransformation((unsigned char *) cache_, data); + + cache_[0] = data_[0] ^ roundKeys_[2 * round_]; + cache_[1] = data_[1] ^ roundKeys_[2 * round_ + 1]; + } + + applyInversedSTransformation((unsigned char *) cache_); + + data_[0] = cache_[0] ^ roundKeys_[2 * round_]; + data_[1] = cache_[1] ^ roundKeys_[2 * round_ + 1]; +} From 64a80f7aefba39dba0aaeeed6dd4135652f4546f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:08:45 -0500 Subject: [PATCH 320/576] Create optimised_tables.c --- .../gost2015_kuznechik/optimised_tables.c | 16595 ++++++++++++++++ 1 file changed, 16595 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised_tables.c diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised_tables.c b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised_tables.c new file mode 100644 index 000000000..b96e3304d --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised_tables.c @@ -0,0 +1,16595 @@ +#include "optimised_tables.h" + +const union qword_t roundConstantsLeft[32] = { + {{0x6e, 0xa2, 0x76, 0x72, 0x6c, 0x48, 0x7a, 0xb8,}}, + {{0xdc, 0x87, 0xec, 0xe4, 0xd8, 0x90, 0xf4, 0xb3,}}, + {{0xb2, 0x25, 0x9a, 0x96, 0xb4, 0xd8, 0x8e, 0x0b,}}, + {{0x7b, 0xcd, 0x1b, 0x0b, 0x73, 0xe3, 0x2b, 0xa5,}}, + {{0x15, 0x6f, 0x6d, 0x79, 0x1f, 0xab, 0x51, 0x1d,}}, + {{0xa7, 0x4a, 0xf7, 0xef, 0xab, 0x73, 0xdf, 0x16,}}, + {{0xc9, 0xe8, 0x81, 0x9d, 0xc7, 0x3b, 0xa5, 0xae,}}, + {{0xf6, 0x59, 0x36, 0x16, 0xe6, 0x05, 0x56, 0x89,}}, + {{0x98, 0xfb, 0x40, 0x64, 0x8a, 0x4d, 0x2c, 0x31,}}, + {{0x2a, 0xde, 0xda, 0xf2, 0x3e, 0x95, 0xa2, 0x3a,}}, + {{0x44, 0x7c, 0xac, 0x80, 0x52, 0xdd, 0xd8, 0x82,}}, + {{0x8d, 0x94, 0x2d, 0x1d, 0x95, 0xe6, 0x7d, 0x2c,}}, + {{0xe3, 0x36, 0x5b, 0x6f, 0xf9, 0xae, 0x07, 0x94,}}, + {{0x51, 0x13, 0xc1, 0xf9, 0x4d, 0x76, 0x89, 0x9f,}}, + {{0x3f, 0xb1, 0xb7, 0x8b, 0x21, 0x3e, 0xf3, 0x27,}}, + {{0x2f, 0xb2, 0x6c, 0x2c, 0x0f, 0x0a, 0xac, 0xd1,}}, + {{0x41, 0x10, 0x1a, 0x5e, 0x63, 0x42, 0xd6, 0x69,}}, + {{0xf3, 0x35, 0x80, 0xc8, 0xd7, 0x9a, 0x58, 0x62,}}, + {{0x9d, 0x97, 0xf6, 0xba, 0xbb, 0xd2, 0x22, 0xda,}}, + {{0x54, 0x7f, 0x77, 0x27, 0x7c, 0xe9, 0x87, 0x74,}}, + {{0x3a, 0xdd, 0x01, 0x55, 0x10, 0xa1, 0xfd, 0xcc,}}, + {{0x88, 0xf8, 0x9b, 0xc3, 0xa4, 0x79, 0x73, 0xc7,}}, + {{0xe6, 0x5a, 0xed, 0xb1, 0xc8, 0x31, 0x09, 0x7f,}}, + {{0xd9, 0xeb, 0x5a, 0x3a, 0xe9, 0x0f, 0xfa, 0x58,}}, + {{0xb7, 0x49, 0x2c, 0x48, 0x85, 0x47, 0x80, 0xe0,}}, + {{0x05, 0x6c, 0xb6, 0xde, 0x31, 0x9f, 0x0e, 0xeb,}}, + {{0x6b, 0xce, 0xc0, 0xac, 0x5d, 0xd7, 0x74, 0x53,}}, + {{0xa2, 0x26, 0x41, 0x31, 0x9a, 0xec, 0xd1, 0xfd,}}, + {{0xcc, 0x84, 0x37, 0x43, 0xf6, 0xa4, 0xab, 0x45,}}, + {{0x7e, 0xa1, 0xad, 0xd5, 0x42, 0x7c, 0x25, 0x4e,}}, + {{0x10, 0x03, 0xdb, 0xa7, 0x2e, 0x34, 0x5f, 0xf6,}}, + {{0x5e, 0xa7, 0xd8, 0x58, 0x1e, 0x14, 0x9b, 0x61,}}, +}; + +const union qword_t roundConstantsRight[32] = { + {{0x5d, 0x27, 0xbd, 0x10, 0xdd, 0x84, 0x94, 0x01,}}, + {{0xba, 0x4e, 0xb9, 0x20, 0x79, 0xcb, 0xeb, 0x02,}}, + {{0xe7, 0x69, 0x04, 0x30, 0xa4, 0x4f, 0x7f, 0x03,}}, + {{0xb7, 0x9c, 0xb1, 0x40, 0xf2, 0x55, 0x15, 0x04,}}, + {{0xea, 0xbb, 0x0c, 0x50, 0x2f, 0xd1, 0x81, 0x05,}}, + {{0x0d, 0xd2, 0x08, 0x60, 0x8b, 0x9e, 0xfe, 0x06,}}, + {{0x50, 0xf5, 0xb5, 0x70, 0x56, 0x1a, 0x6a, 0x07,}}, + {{0xad, 0xfb, 0xa1, 0x80, 0x27, 0xaa, 0x2a, 0x08,}}, + {{0xf0, 0xdc, 0x1c, 0x90, 0xfa, 0x2e, 0xbe, 0x09,}}, + {{0x17, 0xb5, 0x18, 0xa0, 0x5e, 0x61, 0xc1, 0x0a,}}, + {{0x4a, 0x92, 0xa5, 0xb0, 0x83, 0xe5, 0x55, 0x0b,}}, + {{0x1a, 0x67, 0x10, 0xc0, 0xd5, 0xff, 0x3f, 0x0c,}}, + {{0x47, 0x40, 0xad, 0xd0, 0x08, 0x7b, 0xab, 0x0d,}}, + {{0xa0, 0x29, 0xa9, 0xe0, 0xac, 0x34, 0xd4, 0x0e,}}, + {{0xfd, 0x0e, 0x14, 0xf0, 0x71, 0xb0, 0x40, 0x0f,}}, + {{0x99, 0x35, 0x81, 0xc3, 0x4e, 0x97, 0x54, 0x10,}}, + {{0xc4, 0x12, 0x3c, 0xd3, 0x93, 0x13, 0xc0, 0x11,}}, + {{0x23, 0x7b, 0x38, 0xe3, 0x37, 0x5c, 0xbf, 0x12,}}, + {{0x7e, 0x5c, 0x85, 0xf3, 0xea, 0xd8, 0x2b, 0x13,}}, + {{0x2e, 0xa9, 0x30, 0x83, 0xbc, 0xc2, 0x41, 0x14,}}, + {{0x73, 0x8e, 0x8d, 0x93, 0x61, 0x46, 0xd5, 0x15,}}, + {{0x94, 0xe7, 0x89, 0xa3, 0xc5, 0x09, 0xaa, 0x16,}}, + {{0xc9, 0xc0, 0x34, 0xb3, 0x18, 0x8d, 0x3e, 0x17,}}, + {{0x34, 0xce, 0x20, 0x43, 0x69, 0x3d, 0x7e, 0x18,}}, + {{0x69, 0xe9, 0x9d, 0x53, 0xb4, 0xb9, 0xea, 0x19,}}, + {{0x8e, 0x80, 0x99, 0x63, 0x10, 0xf6, 0x95, 0x1a,}}, + {{0xd3, 0xa7, 0x24, 0x73, 0xcd, 0x72, 0x01, 0x1b,}}, + {{0x83, 0x52, 0x91, 0x03, 0x9b, 0x68, 0x6b, 0x1c,}}, + {{0xde, 0x75, 0x2c, 0x13, 0x46, 0xec, 0xff, 0x1d,}}, + {{0x39, 0x1c, 0x28, 0x23, 0xe2, 0xa3, 0x80, 0x1e,}}, + {{0x64, 0x3b, 0x95, 0x33, 0x3f, 0x27, 0x14, 0x1f,}}, + {{0xf1, 0x6a, 0xc1, 0x45, 0x9c, 0xed, 0xa8, 0x20,}}, +}; + +const union qword_t precomputedLSTableLeft[16][256] = { + { /* Matrix row: 0 */ + {{0xe9, 0xfb, 0xd5, 0x0c, 0x7a, 0xc0, 0x80, 0x96,}}, /* Byte value: 0x00 */ + {{0x19, 0x08, 0xe0, 0x8c, 0xb2, 0x17, 0x1a, 0xce,}}, /* Byte value: 0x01 */ + {{0xbf, 0xcb, 0xd0, 0xa2, 0x50, 0xb2, 0xdc, 0x77,}}, /* Byte value: 0x02 */ + {{0x62, 0x41, 0x10, 0x1a, 0x5e, 0x63, 0x42, 0xd6,}}, /* Byte value: 0x03 */ + {{0x4f, 0x38, 0xe5, 0x22, 0x98, 0x65, 0x46, 0x2f,}}, /* Byte value: 0x04 */ + {{0x38, 0xb3, 0x39, 0x6a, 0x11, 0x6f, 0x4a, 0xe7,}}, /* Byte value: 0x05 */ + {{0xfb, 0x1f, 0xb7, 0xc2, 0x06, 0x7d, 0x56, 0x4d,}}, /* Byte value: 0x06 */ + {{0x4a, 0x88, 0xf8, 0x9b, 0xc3, 0xa4, 0x79, 0x73,}}, /* Byte value: 0x07 */ + {{0xc1, 0x32, 0x3d, 0x8d, 0xe7, 0x07, 0xbb, 0x33,}}, /* Byte value: 0x08 */ + {{0x6a, 0x7c, 0x99, 0x8e, 0x18, 0x37, 0x9b, 0xf7,}}, /* Byte value: 0x09 */ + {{0x0e, 0x5c, 0x9f, 0xfb, 0x95, 0x6b, 0xf3, 0x49,}}, /* Byte value: 0x0a */ + {{0x97, 0x02, 0x38, 0x23, 0xcd, 0x75, 0xe7, 0xd2,}}, /* Byte value: 0x0b */ + {{0x0b, 0xec, 0x82, 0x42, 0xce, 0xaa, 0xcc, 0x15,}}, /* Byte value: 0x0c */ + {{0xa5, 0x12, 0x3b, 0xf8, 0x6a, 0x5b, 0xd3, 0x8d,}}, /* Byte value: 0x0d */ + {{0xba, 0x7b, 0xcd, 0x1b, 0x0b, 0x73, 0xe3, 0x2b,}}, /* Byte value: 0x0e */ + {{0x33, 0x5f, 0xbb, 0x28, 0xdf, 0xc5, 0x86, 0xf2,}}, /* Byte value: 0x0f */ + {{0x31, 0xc1, 0x08, 0x0d, 0x2f, 0xd0, 0x21, 0x6b,}}, /* Byte value: 0x10 */ + {{0xed, 0x04, 0x70, 0x46, 0x59, 0xea, 0x0d, 0x67,}}, /* Byte value: 0x11 */ + {{0xe4, 0x76, 0x41, 0x21, 0x67, 0x55, 0x66, 0xeb,}}, /* Byte value: 0x12 */ + {{0x58, 0x6c, 0x9a, 0x55, 0xbf, 0x19, 0xaf, 0xa8,}}, /* Byte value: 0x13 */ + {{0x1e, 0x26, 0x4e, 0x10, 0x19, 0xc3, 0x82, 0x0b,}}, /* Byte value: 0x14 */ + {{0xc9, 0x0f, 0xb4, 0x19, 0xa1, 0x53, 0x62, 0x12,}}, /* Byte value: 0x15 */ + {{0xf4, 0x0c, 0x90, 0xca, 0xeb, 0xfd, 0x17, 0xa9,}}, /* Byte value: 0x16 */ + {{0xff, 0xe0, 0x12, 0x88, 0x25, 0x57, 0xdb, 0xbc,}}, /* Byte value: 0x17 */ + {{0x85, 0xe6, 0x5a, 0xed, 0xb1, 0xc8, 0x31, 0x09,}}, /* Byte value: 0x18 */ + {{0xd3, 0xd6, 0x5f, 0x43, 0x9b, 0xba, 0x6d, 0xe8,}}, /* Byte value: 0x19 */ + {{0x2b, 0x18, 0xe3, 0x57, 0x15, 0x39, 0x2e, 0x91,}}, /* Byte value: 0x1a */ + {{0x30, 0x8e, 0xb0, 0xfe, 0x57, 0x3b, 0x93, 0xc6,}}, /* Byte value: 0x1b */ + {{0x17, 0x54, 0x7f, 0x77, 0x27, 0x7c, 0xe9, 0x87,}}, /* Byte value: 0x1c */ + {{0x12, 0xe4, 0x62, 0xce, 0x7c, 0xbd, 0xd6, 0xdb,}}, /* Byte value: 0x1d */ + {{0xc3, 0xac, 0x8e, 0xa8, 0x17, 0x12, 0x1c, 0xaa,}}, /* Byte value: 0x1e */ + {{0x1f, 0x69, 0xf6, 0xe3, 0x61, 0x28, 0x30, 0xa6,}}, /* Byte value: 0x1f */ + {{0x9c, 0xee, 0xba, 0x61, 0x03, 0xdf, 0x2b, 0xc7,}}, /* Byte value: 0x20 */ + {{0x1a, 0xd9, 0xeb, 0x5a, 0x3a, 0xe9, 0x0f, 0xfa,}}, /* Byte value: 0x21 */ + {{0x1d, 0xf7, 0x45, 0xc6, 0x91, 0x3d, 0x97, 0x3f,}}, /* Byte value: 0x22 */ + {{0xb6, 0xb9, 0xe1, 0xc5, 0x6e, 0x0d, 0xb7, 0xfb,}}, /* Byte value: 0x23 */ + {{0x14, 0x85, 0x74, 0xa1, 0xaf, 0x82, 0xfc, 0xb3,}}, /* Byte value: 0x24 */ + {{0x51, 0x1e, 0xab, 0x32, 0x81, 0xa6, 0xc4, 0x24,}}, /* Byte value: 0x25 */ + {{0xd6, 0x66, 0x42, 0xfa, 0xc0, 0x7b, 0x52, 0xb4,}}, /* Byte value: 0x26 */ + {{0x56, 0x30, 0x05, 0xae, 0x2a, 0x72, 0x5c, 0xe1,}}, /* Byte value: 0x27 */ + {{0xee, 0xd5, 0x7b, 0x90, 0xd1, 0x14, 0x18, 0x53,}}, /* Byte value: 0x28 */ + {{0xa0, 0xa2, 0x26, 0x41, 0x31, 0x9a, 0xec, 0xd1,}}, /* Byte value: 0x29 */ + {{0x39, 0xfc, 0x81, 0x99, 0x69, 0x84, 0xf8, 0x4a,}}, /* Byte value: 0x2a */ + {{0xac, 0x60, 0x0a, 0x9f, 0x54, 0xe4, 0xb8, 0x01,}}, /* Byte value: 0x2b */ + {{0x04, 0xff, 0xa5, 0x4a, 0x23, 0x2a, 0x8d, 0xf1,}}, /* Byte value: 0x2c */ + {{0xcf, 0x6e, 0xa2, 0x76, 0x72, 0x6c, 0x48, 0x7a,}}, /* Byte value: 0x2d */ + {{0x71, 0xea, 0xca, 0x27, 0x5a, 0x35, 0x26, 0xa0,}}, /* Byte value: 0x2e */ + {{0x6e, 0x83, 0x3c, 0xc4, 0x3b, 0x1d, 0x16, 0x06,}}, /* Byte value: 0x2f */ + {{0x75, 0x15, 0x6f, 0x6d, 0x79, 0x1f, 0xab, 0x51,}}, /* Byte value: 0x30 */ + {{0x9b, 0xc0, 0x14, 0xfd, 0xa8, 0x0b, 0xb3, 0x02,}}, /* Byte value: 0x31 */ + {{0x5d, 0xdc, 0x87, 0xec, 0xe4, 0xd8, 0x90, 0xf4,}}, /* Byte value: 0x32 */ + {{0xe8, 0xb4, 0x6d, 0xff, 0x02, 0x2b, 0x32, 0x3b,}}, /* Byte value: 0x33 */ + {{0xdb, 0xeb, 0xd6, 0xd7, 0xdd, 0xee, 0xb4, 0xc9,}}, /* Byte value: 0x34 */ + {{0x82, 0xc8, 0xf4, 0x71, 0x1a, 0x1c, 0xa9, 0xcc,}}, /* Byte value: 0x35 */ + {{0xbe, 0x84, 0x68, 0x51, 0x28, 0x59, 0x6e, 0xda,}}, /* Byte value: 0x36 */ + {{0xb8, 0xe5, 0x7e, 0x3e, 0xfb, 0x66, 0x44, 0xb2,}}, /* Byte value: 0x37 */ + {{0xe7, 0xa7, 0x4a, 0xf7, 0xef, 0xab, 0x73, 0xdf,}}, /* Byte value: 0x38 */ + {{0x25, 0x44, 0x7c, 0xac, 0x80, 0x52, 0xdd, 0xd8,}}, /* Byte value: 0x39 */ + {{0x8b, 0xba, 0xc5, 0x16, 0x24, 0xa3, 0xc2, 0x40,}}, /* Byte value: 0x3a */ + {{0x3b, 0x62, 0x32, 0xbc, 0x99, 0x91, 0x5f, 0xd3,}}, /* Byte value: 0x3b */ + {{0x5a, 0xf2, 0x29, 0x70, 0x4f, 0x0c, 0x08, 0x31,}}, /* Byte value: 0x3c */ + {{0xc7, 0x53, 0x2b, 0xe2, 0x34, 0x38, 0x91, 0x5b,}}, /* Byte value: 0x3d */ + {{0xef, 0x9a, 0xc3, 0x63, 0xa9, 0xff, 0xaa, 0xfe,}}, /* Byte value: 0x3e */ + {{0x32, 0x10, 0x03, 0xdb, 0xa7, 0x2e, 0x34, 0x5f,}}, /* Byte value: 0x3f */ + {{0x6c, 0x1d, 0x8f, 0xe1, 0xcb, 0x08, 0xb1, 0x9f,}}, /* Byte value: 0x40 */ + {{0x8e, 0x0a, 0xd8, 0xaf, 0x7f, 0x62, 0xfd, 0x1c,}}, /* Byte value: 0x41 */ + {{0x94, 0xd3, 0x33, 0xf5, 0x45, 0x8b, 0xf2, 0xe6,}}, /* Byte value: 0x42 */ + {{0x93, 0xfd, 0x9d, 0x69, 0xee, 0x5f, 0x6a, 0x23,}}, /* Byte value: 0x43 */ + {{0xa3, 0x73, 0x2d, 0x97, 0xb9, 0x64, 0xf9, 0xe5,}}, /* Byte value: 0x44 */ + {{0x67, 0xf1, 0x0d, 0xa3, 0x05, 0xa2, 0x7d, 0x8a,}}, /* Byte value: 0x45 */ + {{0x46, 0x4a, 0xd4, 0x45, 0xa6, 0xda, 0x2d, 0xa3,}}, /* Byte value: 0x46 */ + {{0x9d, 0xa1, 0x02, 0x92, 0x7b, 0x34, 0x99, 0x6a,}}, /* Byte value: 0x47 */ + {{0xb9, 0xaa, 0xc6, 0xcd, 0x83, 0x8d, 0xf6, 0x1f,}}, /* Byte value: 0x48 */ + {{0x73, 0x74, 0x79, 0x02, 0xaa, 0x20, 0x81, 0x39,}}, /* Byte value: 0x49 */ + {{0xdf, 0x14, 0x73, 0x9d, 0xfe, 0xc4, 0x39, 0x38,}}, /* Byte value: 0x4a */ + {{0xe5, 0x39, 0xf9, 0xd2, 0x1f, 0xbe, 0xd4, 0x46,}}, /* Byte value: 0x4b */ + {{0x26, 0x95, 0x77, 0x7a, 0x08, 0xac, 0xc8, 0xec,}}, /* Byte value: 0x4c */ + {{0xde, 0x5b, 0xcb, 0x6e, 0x86, 0x2f, 0x8b, 0x95,}}, /* Byte value: 0x4d */ + {{0x80, 0x56, 0x47, 0x54, 0xea, 0x09, 0x0e, 0x55,}}, /* Byte value: 0x4e */ + {{0xdd, 0x8a, 0xc0, 0xb8, 0x0e, 0xd1, 0x9e, 0xa1,}}, /* Byte value: 0x4f */ + {{0x60, 0xdf, 0xa3, 0x3f, 0xae, 0x76, 0xe5, 0x4f,}}, /* Byte value: 0x50 */ + {{0xc5, 0xcd, 0x98, 0xc7, 0xc4, 0x2d, 0x36, 0xc2,}}, /* Byte value: 0x51 */ + {{0x50, 0x51, 0x13, 0xc1, 0xf9, 0x4d, 0x76, 0x89,}}, /* Byte value: 0x52 */ + {{0xbb, 0x34, 0x75, 0xe8, 0x73, 0x98, 0x51, 0x86,}}, /* Byte value: 0x53 */ + {{0xb7, 0xf6, 0x59, 0x36, 0x16, 0xe6, 0x05, 0x56,}}, /* Byte value: 0x54 */ + {{0x0d, 0x8d, 0x94, 0x2d, 0x1d, 0x95, 0xe6, 0x7d,}}, /* Byte value: 0x55 */ + {{0x22, 0x6a, 0xd2, 0x30, 0x2b, 0x86, 0x45, 0x1d,}}, /* Byte value: 0x56 */ + {{0xf0, 0xf3, 0x35, 0x80, 0xc8, 0xd7, 0x9a, 0x58,}}, /* Byte value: 0x57 */ + {{0x8a, 0xf5, 0x7d, 0xe5, 0x5c, 0x48, 0x70, 0xed,}}, /* Byte value: 0x58 */ + {{0x98, 0x11, 0x1f, 0x2b, 0x20, 0xf5, 0xa6, 0x36,}}, /* Byte value: 0x59 */ + {{0x3f, 0x9d, 0x97, 0xf6, 0xba, 0xbb, 0xd2, 0x22,}}, /* Byte value: 0x5a */ + {{0xd9, 0x75, 0x65, 0xf2, 0x2d, 0xfb, 0x13, 0x50,}}, /* Byte value: 0x5b */ + {{0x81, 0x19, 0xff, 0xa7, 0x92, 0xe2, 0xbc, 0xf8,}}, /* Byte value: 0x5c */ + {{0x3d, 0x03, 0x24, 0xd3, 0x4a, 0xae, 0x75, 0xbb,}}, /* Byte value: 0x5d */ + {{0x9e, 0x70, 0x09, 0x44, 0xf3, 0xca, 0x8c, 0x5e,}}, /* Byte value: 0x5e */ + {{0x09, 0x72, 0x31, 0x67, 0x3e, 0xbf, 0x6b, 0x8c,}}, /* Byte value: 0x5f */ + {{0xd8, 0x3a, 0xdd, 0x01, 0x55, 0x10, 0xa1, 0xfd,}}, /* Byte value: 0x60 */ + {{0x77, 0x8b, 0xdc, 0x48, 0x89, 0x0a, 0x0c, 0xc8,}}, /* Byte value: 0x61 */ + {{0x6b, 0x33, 0x21, 0x7d, 0x60, 0xdc, 0x29, 0x5a,}}, /* Byte value: 0x62 */ + {{0xe1, 0xc6, 0x5c, 0x98, 0x3c, 0x94, 0x59, 0xb7,}}, /* Byte value: 0x63 */ + {{0xad, 0x2f, 0xb2, 0x6c, 0x2c, 0x0f, 0x0a, 0xac,}}, /* Byte value: 0x64 */ + {{0xe0, 0x89, 0xe4, 0x6b, 0x44, 0x7f, 0xeb, 0x1a,}}, /* Byte value: 0x65 */ + {{0x66, 0xbe, 0xb5, 0x50, 0x7d, 0x49, 0xcf, 0x27,}}, /* Byte value: 0x66 */ + {{0xf8, 0xce, 0xbc, 0x14, 0x8e, 0x83, 0x43, 0x79,}}, /* Byte value: 0x67 */ + {{0x76, 0xc4, 0x64, 0xbb, 0xf1, 0xe1, 0xbe, 0x65,}}, /* Byte value: 0x68 */ + {{0x43, 0xfa, 0xc9, 0xfc, 0xfd, 0x1b, 0x12, 0xff,}}, /* Byte value: 0x69 */ + {{0x72, 0x3b, 0xc1, 0xf1, 0xd2, 0xcb, 0x33, 0x94,}}, /* Byte value: 0x6a */ + {{0xf7, 0xdd, 0x9b, 0x1c, 0x63, 0x03, 0x02, 0x9d,}}, /* Byte value: 0x6b */ + {{0x4e, 0x77, 0x5d, 0xd1, 0xe0, 0x8e, 0xf4, 0x82,}}, /* Byte value: 0x6c */ + {{0xdc, 0xc5, 0x78, 0x4b, 0x76, 0x3a, 0x2c, 0x0c,}}, /* Byte value: 0x6d */ + {{0x48, 0x16, 0x4b, 0xbe, 0x33, 0xb1, 0xde, 0xea,}}, /* Byte value: 0x6e */ + {{0xda, 0xa4, 0x6e, 0x24, 0xa5, 0x05, 0x06, 0x64,}}, /* Byte value: 0x6f */ + {{0x69, 0xad, 0x92, 0x58, 0x90, 0xc9, 0x8e, 0xc3,}}, /* Byte value: 0x70 */ + {{0xb0, 0xd8, 0xf7, 0xaa, 0xbd, 0x32, 0x9d, 0x93,}}, /* Byte value: 0x71 */ + {{0xd5, 0xb7, 0x49, 0x2c, 0x48, 0x85, 0x47, 0x80,}}, /* Byte value: 0x72 */ + {{0xf6, 0x92, 0x23, 0xef, 0x1b, 0xe8, 0xb0, 0x30,}}, /* Byte value: 0x73 */ + {{0x7b, 0x49, 0xf0, 0x96, 0xec, 0x74, 0x58, 0x18,}}, /* Byte value: 0x74 */ + {{0x41, 0x64, 0x7a, 0xd9, 0x0d, 0x0e, 0xb5, 0x66,}}, /* Byte value: 0x75 */ + {{0xcb, 0x91, 0x07, 0x3c, 0x51, 0x46, 0xc5, 0x8b,}}, /* Byte value: 0x76 */ + {{0x95, 0x9c, 0x8b, 0x06, 0x3d, 0x60, 0x40, 0x4b,}}, /* Byte value: 0x77 */ + {{0xaa, 0x01, 0x1c, 0xf0, 0x87, 0xdb, 0x92, 0x69,}}, /* Byte value: 0x78 */ + {{0xe6, 0xe8, 0xf2, 0x04, 0x97, 0x40, 0xc1, 0x72,}}, /* Byte value: 0x79 */ + {{0x37, 0xa0, 0x1e, 0x62, 0xfc, 0xef, 0x0b, 0x03,}}, /* Byte value: 0x7a */ + {{0x21, 0xbb, 0xd9, 0xe6, 0xa3, 0x78, 0x50, 0x29,}}, /* Byte value: 0x7b */ + {{0x42, 0xb5, 0x71, 0x0f, 0x85, 0xf0, 0xa0, 0x52,}}, /* Byte value: 0x7c */ + {{0xd7, 0x29, 0xfa, 0x09, 0xb8, 0x90, 0xe0, 0x19,}}, /* Byte value: 0x7d */ + {{0xc2, 0xe3, 0x36, 0x5b, 0x6f, 0xf9, 0xae, 0x07,}}, /* Byte value: 0x7e */ + {{0x74, 0x5a, 0xd7, 0x9e, 0x01, 0xf4, 0x19, 0xfc,}}, /* Byte value: 0x7f */ + {{0xe2, 0x17, 0x57, 0x4e, 0xb4, 0x6a, 0x4c, 0x83,}}, /* Byte value: 0x80 */ + {{0x91, 0x63, 0x2e, 0x4c, 0x1e, 0x4a, 0xcd, 0xba,}}, /* Byte value: 0x81 */ + {{0x23, 0x25, 0x6a, 0xc3, 0x53, 0x6d, 0xf7, 0xb0,}}, /* Byte value: 0x82 */ + {{0xc0, 0x7d, 0x85, 0x7e, 0x9f, 0xec, 0x09, 0x9e,}}, /* Byte value: 0x83 */ + {{0x64, 0x20, 0x06, 0x75, 0x8d, 0x5c, 0x68, 0xbe,}}, /* Byte value: 0x84 */ + {{0x0f, 0x13, 0x27, 0x08, 0xed, 0x80, 0x41, 0xe4,}}, /* Byte value: 0x85 */ + {{0x63, 0x0e, 0xa8, 0xe9, 0x26, 0x88, 0xf0, 0x7b,}}, /* Byte value: 0x86 */ + {{0xa8, 0x9f, 0xaf, 0xd5, 0x77, 0xce, 0x35, 0xf0,}}, /* Byte value: 0x87 */ + {{0x55, 0xe1, 0x0e, 0x78, 0xa2, 0x8c, 0x49, 0xd5,}}, /* Byte value: 0x88 */ + {{0xbd, 0x55, 0x63, 0x87, 0xa0, 0xa7, 0x7b, 0xee,}}, /* Byte value: 0x89 */ + {{0x9a, 0x8f, 0xac, 0x0e, 0xd0, 0xe0, 0x01, 0xaf,}}, /* Byte value: 0x8a */ + {{0x03, 0xd1, 0x0b, 0xd6, 0x88, 0xfe, 0x15, 0x34,}}, /* Byte value: 0x8b */ + {{0xc8, 0x40, 0x0c, 0xea, 0xd9, 0xb8, 0xd0, 0xbf,}}, /* Byte value: 0x8c */ + {{0xc4, 0x82, 0x20, 0x34, 0xbc, 0xc6, 0x84, 0x6f,}}, /* Byte value: 0x8d */ + {{0x6d, 0x52, 0x37, 0x12, 0xb3, 0xe3, 0x03, 0x32,}}, /* Byte value: 0x8e */ + {{0x92, 0xb2, 0x25, 0x9a, 0x96, 0xb4, 0xd8, 0x8e,}}, /* Byte value: 0x8f */ + {{0x49, 0x59, 0xf3, 0x4d, 0x4b, 0x5a, 0x6c, 0x47,}}, /* Byte value: 0x90 */ + {{0x9f, 0x3f, 0xb1, 0xb7, 0x8b, 0x21, 0x3e, 0xf3,}}, /* Byte value: 0x91 */ + {{0x44, 0xd4, 0x67, 0x60, 0x56, 0xcf, 0x8a, 0x3a,}}, /* Byte value: 0x92 */ + {{0x2d, 0x79, 0xf5, 0x38, 0xc6, 0x06, 0x04, 0xf9,}}, /* Byte value: 0x93 */ + {{0x2f, 0xe7, 0x46, 0x1d, 0x36, 0x13, 0xa3, 0x60,}}, /* Byte value: 0x94 */ + {{0x36, 0xef, 0xa6, 0x91, 0x84, 0x04, 0xb9, 0xae,}}, /* Byte value: 0x95 */ + {{0x15, 0xca, 0xcc, 0x52, 0xd7, 0x69, 0x4e, 0x1e,}}, /* Byte value: 0x96 */ + {{0x18, 0x47, 0x58, 0x7f, 0xca, 0xfc, 0xa8, 0x63,}}, /* Byte value: 0x97 */ + {{0x70, 0xa5, 0x72, 0xd4, 0x22, 0xde, 0x94, 0x0d,}}, /* Byte value: 0x98 */ + {{0xfe, 0xaf, 0xaa, 0x7b, 0x5d, 0xbc, 0x69, 0x11,}}, /* Byte value: 0x99 */ + {{0x2e, 0xa8, 0xfe, 0xee, 0x4e, 0xf8, 0x11, 0xcd,}}, /* Byte value: 0x9a */ + {{0x5c, 0x93, 0x3f, 0x1f, 0x9c, 0x33, 0x22, 0x59,}}, /* Byte value: 0x9b */ + {{0xa1, 0xed, 0x9e, 0xb2, 0x49, 0x71, 0x5e, 0x7c,}}, /* Byte value: 0x9c */ + {{0xa6, 0xc3, 0x30, 0x2e, 0xe2, 0xa5, 0xc6, 0xb9,}}, /* Byte value: 0x9d */ + {{0xea, 0x2a, 0xde, 0xda, 0xf2, 0x3e, 0x95, 0xa2,}}, /* Byte value: 0x9e */ + {{0x1b, 0x96, 0x53, 0xa9, 0x42, 0x02, 0xbd, 0x57,}}, /* Byte value: 0x9f */ + {{0x90, 0x2c, 0x96, 0xbf, 0x66, 0xa1, 0x7f, 0x17,}}, /* Byte value: 0xa0 */ + {{0xa4, 0x5d, 0x83, 0x0b, 0x12, 0xb0, 0x61, 0x20,}}, /* Byte value: 0xa1 */ + {{0x68, 0xe2, 0x2a, 0xab, 0xe8, 0x22, 0x3c, 0x6e,}}, /* Byte value: 0xa2 */ + {{0x57, 0x7f, 0xbd, 0x5d, 0x52, 0x99, 0xee, 0x4c,}}, /* Byte value: 0xa3 */ + {{0xfd, 0x7e, 0xa1, 0xad, 0xd5, 0x42, 0x7c, 0x25,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x35, 0x3e, 0xad, 0x47, 0x0c, 0xfa, 0xac, 0x9a,}}, /* Byte value: 0xa6 */ + {{0x4b, 0xc7, 0x40, 0x68, 0xbb, 0x4f, 0xcb, 0xde,}}, /* Byte value: 0xa7 */ + {{0x47, 0x05, 0x6c, 0xb6, 0xde, 0x31, 0x9f, 0x0e,}}, /* Byte value: 0xa8 */ + {{0xa2, 0x3c, 0x95, 0x64, 0xc1, 0x8f, 0x4b, 0x48,}}, /* Byte value: 0xa9 */ + {{0x83, 0x87, 0x4c, 0x82, 0x62, 0xf7, 0x1b, 0x61,}}, /* Byte value: 0xaa */ + {{0x7c, 0x67, 0x5e, 0x0a, 0x47, 0xa0, 0xc0, 0xdd,}}, /* Byte value: 0xab */ + {{0xd2, 0x99, 0xe7, 0xb0, 0xe3, 0x51, 0xdf, 0x45,}}, /* Byte value: 0xac */ + {{0x13, 0xab, 0xda, 0x3d, 0x04, 0x56, 0x64, 0x76,}}, /* Byte value: 0xad */ + {{0x7e, 0xf9, 0xed, 0x2f, 0xb7, 0xb5, 0x67, 0x44,}}, /* Byte value: 0xae */ + {{0x3e, 0xd2, 0x2f, 0x05, 0xc2, 0x50, 0x60, 0x8f,}}, /* Byte value: 0xaf */ + {{0x7a, 0x06, 0x48, 0x65, 0x94, 0x9f, 0xea, 0xb5,}}, /* Byte value: 0xb0 */ + {{0x84, 0xa9, 0xe2, 0x1e, 0xc9, 0x23, 0x83, 0xa4,}}, /* Byte value: 0xb1 */ + {{0x16, 0x1b, 0xc7, 0x84, 0x5f, 0x97, 0x5b, 0x2a,}}, /* Byte value: 0xb2 */ + {{0xd1, 0x48, 0xec, 0x66, 0x6b, 0xaf, 0xca, 0x71,}}, /* Byte value: 0xb3 */ + {{0xb1, 0x97, 0x4f, 0x59, 0xc5, 0xd9, 0x2f, 0x3e,}}, /* Byte value: 0xb4 */ + {{0x0c, 0xc2, 0x2c, 0xde, 0x65, 0x7e, 0x54, 0xd0,}}, /* Byte value: 0xb5 */ + {{0x29, 0x86, 0x50, 0x72, 0xe5, 0x2c, 0x89, 0x08,}}, /* Byte value: 0xb6 */ + {{0x06, 0x61, 0x16, 0x6f, 0xd3, 0x3f, 0x2a, 0x68,}}, /* Byte value: 0xb7 */ + {{0x2c, 0x36, 0x4d, 0xcb, 0xbe, 0xed, 0xb6, 0x54,}}, /* Byte value: 0xb8 */ + {{0x2a, 0x57, 0x5b, 0xa4, 0x6d, 0xd2, 0x9c, 0x3c,}}, /* Byte value: 0xb9 */ + {{0xcd, 0xf0, 0x11, 0x53, 0x82, 0x79, 0xef, 0xe3,}}, /* Byte value: 0xba */ + {{0x07, 0x2e, 0xae, 0x9c, 0xab, 0xd4, 0x98, 0xc5,}}, /* Byte value: 0xbb */ + {{0x10, 0x7a, 0xd1, 0xeb, 0x8c, 0xa8, 0x71, 0x42,}}, /* Byte value: 0xbc */ + {{0x08, 0x3d, 0x89, 0x94, 0x46, 0x54, 0xd9, 0x21,}}, /* Byte value: 0xbd */ + {{0xf9, 0x81, 0x04, 0xe7, 0xf6, 0x68, 0xf1, 0xd4,}}, /* Byte value: 0xbe */ + {{0x11, 0x35, 0x69, 0x18, 0xf4, 0x43, 0xc3, 0xef,}}, /* Byte value: 0xbf */ + {{0x28, 0xc9, 0xe8, 0x81, 0x9d, 0xc7, 0x3b, 0xa5,}}, /* Byte value: 0xc0 */ + {{0xeb, 0x65, 0x66, 0x29, 0x8a, 0xd5, 0x27, 0x0f,}}, /* Byte value: 0xc1 */ + {{0x87, 0x78, 0xe9, 0xc8, 0x41, 0xdd, 0x96, 0x90,}}, /* Byte value: 0xc2 */ + {{0xf1, 0xbc, 0x8d, 0x73, 0xb0, 0x3c, 0x28, 0xf5,}}, /* Byte value: 0xc3 */ + {{0xc6, 0x1c, 0x93, 0x11, 0x4c, 0xd3, 0x23, 0xf6,}}, /* Byte value: 0xc4 */ + {{0xb5, 0x68, 0xea, 0x13, 0xe6, 0xf3, 0xa2, 0xcf,}}, /* Byte value: 0xc5 */ + {{0x6f, 0xcc, 0x84, 0x37, 0x43, 0xf6, 0xa4, 0xab,}}, /* Byte value: 0xc6 */ + {{0xcc, 0xbf, 0xa9, 0xa0, 0xfa, 0x92, 0x5d, 0x4e,}}, /* Byte value: 0xc7 */ + {{0x34, 0x71, 0x15, 0xb4, 0x74, 0x11, 0x1e, 0x37,}}, /* Byte value: 0xc8 */ + {{0x1c, 0xb8, 0xfd, 0x35, 0xe9, 0xd6, 0x25, 0x92,}}, /* Byte value: 0xc9 */ + {{0x4d, 0xa6, 0x56, 0x07, 0x68, 0x70, 0xe1, 0xb6,}}, /* Byte value: 0xca */ + {{0xf3, 0x22, 0x3e, 0x56, 0x40, 0x29, 0x8f, 0x6c,}}, /* Byte value: 0xcb */ + {{0x96, 0x4d, 0x80, 0xd0, 0xb5, 0x9e, 0x55, 0x7f,}}, /* Byte value: 0xcc */ + {{0x05, 0xb0, 0x1d, 0xb9, 0x5b, 0xc1, 0x3f, 0x5c,}}, /* Byte value: 0xcd */ + {{0x61, 0x90, 0x1b, 0xcc, 0xd6, 0x9d, 0x57, 0xe2,}}, /* Byte value: 0xce */ + {{0x59, 0x23, 0x22, 0xa6, 0xc7, 0xf2, 0x1d, 0x05,}}, /* Byte value: 0xcf */ + {{0x86, 0x37, 0x51, 0x3b, 0x39, 0x36, 0x24, 0x3d,}}, /* Byte value: 0xd0 */ + {{0x88, 0x6b, 0xce, 0xc0, 0xac, 0x5d, 0xd7, 0x74,}}, /* Byte value: 0xd1 */ + {{0xb3, 0x09, 0xfc, 0x7c, 0x35, 0xcc, 0x88, 0xa7,}}, /* Byte value: 0xd2 */ + {{0x89, 0x24, 0x76, 0x33, 0xd4, 0xb6, 0x65, 0xd9,}}, /* Byte value: 0xd3 */ + {{0xfc, 0x31, 0x19, 0x5e, 0xad, 0xa9, 0xce, 0x88,}}, /* Byte value: 0xd4 */ + {{0xab, 0x4e, 0xa4, 0x03, 0xff, 0x30, 0x20, 0xc4,}}, /* Byte value: 0xd5 */ + {{0x53, 0x80, 0x18, 0x17, 0x71, 0xb3, 0x63, 0xbd,}}, /* Byte value: 0xd6 */ + {{0xb4, 0x27, 0x52, 0xe0, 0x9e, 0x18, 0x10, 0x62,}}, /* Byte value: 0xd7 */ + {{0xe3, 0x58, 0xef, 0xbd, 0xcc, 0x81, 0xfe, 0x2e,}}, /* Byte value: 0xd8 */ + {{0xce, 0x21, 0x1a, 0x85, 0x0a, 0x87, 0xfa, 0xd7,}}, /* Byte value: 0xd9 */ + {{0x52, 0xcf, 0xa0, 0xe4, 0x09, 0x58, 0xd1, 0x10,}}, /* Byte value: 0xda */ + {{0x8c, 0x94, 0x6b, 0x8a, 0x8f, 0x77, 0x5a, 0x85,}}, /* Byte value: 0xdb */ + {{0x3a, 0x2d, 0x8a, 0x4f, 0xe1, 0x7a, 0xed, 0x7e,}}, /* Byte value: 0xdc */ + {{0xca, 0xde, 0xbf, 0xcf, 0x29, 0xad, 0x77, 0x26,}}, /* Byte value: 0xdd */ + {{0x54, 0xae, 0xb6, 0x8b, 0xda, 0x67, 0xfb, 0x78,}}, /* Byte value: 0xde */ + {{0xa7, 0x8c, 0x88, 0xdd, 0x9a, 0x4e, 0x74, 0x14,}}, /* Byte value: 0xdf */ + {{0x99, 0x5e, 0xa7, 0xd8, 0x58, 0x1e, 0x14, 0x9b,}}, /* Byte value: 0xe0 */ + {{0x0a, 0xa3, 0x3a, 0xb1, 0xb6, 0x41, 0x7e, 0xb8,}}, /* Byte value: 0xe1 */ + {{0x40, 0x2b, 0xc2, 0x2a, 0x75, 0xe5, 0x07, 0xcb,}}, /* Byte value: 0xe2 */ + {{0x02, 0x9e, 0xb3, 0x25, 0xf0, 0x15, 0xa7, 0x99,}}, /* Byte value: 0xe3 */ + {{0x5b, 0xbd, 0x91, 0x83, 0x37, 0xe7, 0xba, 0x9c,}}, /* Byte value: 0xe4 */ + {{0xbc, 0x1a, 0xdb, 0x74, 0xd8, 0x4c, 0xc9, 0x43,}}, /* Byte value: 0xe5 */ + {{0x78, 0x98, 0xfb, 0x40, 0x64, 0x8a, 0x4d, 0x2c,}}, /* Byte value: 0xe6 */ + {{0x79, 0xd7, 0x43, 0xb3, 0x1c, 0x61, 0xff, 0x81,}}, /* Byte value: 0xe7 */ + {{0xf5, 0x43, 0x28, 0x39, 0x93, 0x16, 0xa5, 0x04,}}, /* Byte value: 0xe8 */ + {{0xa9, 0xd0, 0x17, 0x26, 0x0f, 0x25, 0x87, 0x5d,}}, /* Byte value: 0xe9 */ + {{0xec, 0x4b, 0xc8, 0xb5, 0x21, 0x01, 0xbf, 0xca,}}, /* Byte value: 0xea */ + {{0x7d, 0x28, 0xe6, 0xf9, 0x3f, 0x4b, 0x72, 0x70,}}, /* Byte value: 0xeb */ + {{0x45, 0x9b, 0xdf, 0x93, 0x2e, 0x24, 0x38, 0x97,}}, /* Byte value: 0xec */ + {{0x3c, 0x4c, 0x9c, 0x20, 0x32, 0x45, 0xc7, 0x16,}}, /* Byte value: 0xed */ + {{0x65, 0x6f, 0xbe, 0x86, 0xf5, 0xb7, 0xda, 0x13,}}, /* Byte value: 0xee */ + {{0x01, 0x4f, 0xb8, 0xf3, 0x78, 0xeb, 0xb2, 0xad,}}, /* Byte value: 0xef */ + {{0x24, 0x0b, 0xc4, 0x5f, 0xf8, 0xb9, 0x6f, 0x75,}}, /* Byte value: 0xf0 */ + {{0x5f, 0x42, 0x34, 0xc9, 0x14, 0xcd, 0x37, 0x6d,}}, /* Byte value: 0xf1 */ + {{0x7f, 0xb6, 0x55, 0xdc, 0xcf, 0x5e, 0xd5, 0xe9,}}, /* Byte value: 0xf2 */ + {{0x20, 0xf4, 0x61, 0x15, 0xdb, 0x93, 0xe2, 0x84,}}, /* Byte value: 0xf3 */ + {{0xae, 0xfe, 0xb9, 0xba, 0xa4, 0xf1, 0x1f, 0x98,}}, /* Byte value: 0xf4 */ + {{0x5e, 0x0d, 0x8c, 0x3a, 0x6c, 0x26, 0x85, 0xc0,}}, /* Byte value: 0xf5 */ + {{0xaf, 0xb1, 0x01, 0x49, 0xdc, 0x1a, 0xad, 0x35,}}, /* Byte value: 0xf6 */ + {{0xd0, 0x07, 0x54, 0x95, 0x13, 0x44, 0x78, 0xdc,}}, /* Byte value: 0xf7 */ + {{0xb2, 0x46, 0x44, 0x8f, 0x4d, 0x27, 0x3a, 0x0a,}}, /* Byte value: 0xf8 */ + {{0x8f, 0x45, 0x60, 0x5c, 0x07, 0x89, 0x4f, 0xb1,}}, /* Byte value: 0xf9 */ + {{0x27, 0xda, 0xcf, 0x89, 0x70, 0x47, 0x7a, 0x41,}}, /* Byte value: 0xfa */ + {{0x8d, 0xdb, 0xd3, 0x79, 0xf7, 0x9c, 0xe8, 0x28,}}, /* Byte value: 0xfb */ + {{0x4c, 0xe9, 0xee, 0xf4, 0x10, 0x9b, 0x53, 0x1b,}}, /* Byte value: 0xfc */ + {{0xd4, 0xf8, 0xf1, 0xdf, 0x30, 0x6e, 0xf5, 0x2d,}}, /* Byte value: 0xfd */ + {{0xfa, 0x50, 0x0f, 0x31, 0x7e, 0x96, 0xe4, 0xe0,}}, /* Byte value: 0xfe */ + {{0xf2, 0x6d, 0x86, 0xa5, 0x38, 0xc2, 0x3d, 0xc1,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 1 */ + {{0x2f, 0x36, 0x58, 0xea, 0xa2, 0x0c, 0x25, 0xcf,}}, /* Byte value: 0x00 */ + {{0x48, 0x33, 0xd6, 0x3a, 0x7e, 0x8c, 0x82, 0xb8,}}, /* Byte value: 0x01 */ + {{0x5c, 0x9c, 0xe9, 0x76, 0x65, 0xa2, 0xaf, 0xd9,}}, /* Byte value: 0x02 */ + {{0x0c, 0x65, 0x15, 0x85, 0x09, 0x1a, 0x1b, 0x9e,}}, /* Byte value: 0x03 */ + {{0x3b, 0x99, 0x67, 0xa6, 0xb9, 0x22, 0x08, 0xae,}}, /* Byte value: 0x04 */ + {{0x62, 0x5e, 0xf1, 0xc3, 0xaa, 0x6a, 0x3d, 0xfe,}}, /* Byte value: 0x05 */ + {{0xe7, 0xef, 0x6c, 0x2a, 0x3c, 0xc2, 0x44, 0x6e,}}, /* Byte value: 0x06 */ + {{0x42, 0x85, 0x28, 0x1c, 0x92, 0x9b, 0x75, 0x69,}}, /* Byte value: 0x07 */ + {{0x61, 0xd6, 0x65, 0x73, 0x39, 0x8d, 0x4b, 0x38,}}, /* Byte value: 0x08 */ + {{0x1a, 0x3a, 0x73, 0xa8, 0xf0, 0x8e, 0xd3, 0x7b,}}, /* Byte value: 0x09 */ + {{0xf9, 0xf6, 0xad, 0x40, 0xcb, 0xfb, 0x9e, 0xde,}}, /* Byte value: 0x0a */ + {{0x12, 0x7c, 0xd4, 0xef, 0xfe, 0x23, 0xc1, 0x2e,}}, /* Byte value: 0x0b */ + {{0x80, 0xea, 0xe2, 0xfa, 0xe0, 0x42, 0xe3, 0x19,}}, /* Byte value: 0x0c */ + {{0x82, 0x1a, 0xbb, 0x9b, 0x02, 0xf8, 0x06, 0x9d,}}, /* Byte value: 0x0d */ + {{0x25, 0x80, 0xa6, 0xcc, 0x4e, 0x1b, 0xd2, 0x1e,}}, /* Byte value: 0x0e */ + {{0xe2, 0xb4, 0x13, 0x39, 0x4a, 0x28, 0xde, 0xe7,}}, /* Byte value: 0x0f */ + {{0x06, 0xd3, 0xeb, 0xa3, 0xe5, 0x0d, 0xec, 0x4f,}}, /* Byte value: 0x10 */ + {{0x24, 0xf8, 0x6b, 0x1d, 0x3f, 0x46, 0x41, 0x5c,}}, /* Byte value: 0x11 */ + {{0x40, 0x75, 0x71, 0x7d, 0x70, 0x21, 0x90, 0xed,}}, /* Byte value: 0x12 */ + {{0x8a, 0x5c, 0x1c, 0xdc, 0x0c, 0x55, 0x14, 0xc8,}}, /* Byte value: 0x13 */ + {{0xd5, 0x48, 0x61, 0x1a, 0xfa, 0x10, 0xcd, 0xd7,}}, /* Byte value: 0x14 */ + {{0x77, 0x89, 0x03, 0x5e, 0xc0, 0x19, 0x83, 0xdd,}}, /* Byte value: 0x15 */ + {{0x6c, 0xcb, 0xbd, 0x27, 0x41, 0xca, 0xc3, 0xe4,}}, /* Byte value: 0x16 */ + {{0xec, 0x21, 0x5f, 0xdd, 0xa1, 0x88, 0x20, 0xfd,}}, /* Byte value: 0x17 */ + {{0xda, 0xa5, 0xe0, 0x2f, 0x60, 0xed, 0xa0, 0x8f,}}, /* Byte value: 0x18 */ + {{0xa9, 0x0f, 0x51, 0xb3, 0xa7, 0x43, 0x2a, 0x99,}}, /* Byte value: 0x19 */ + {{0xd8, 0x55, 0xb9, 0x4e, 0x82, 0x57, 0x45, 0x0b,}}, /* Byte value: 0x1a */ + {{0x74, 0x01, 0x97, 0xee, 0x53, 0xfe, 0xf5, 0x1b,}}, /* Byte value: 0x1b */ + {{0xb1, 0xc5, 0x7b, 0x7a, 0xb5, 0x77, 0x1c, 0x66,}}, /* Byte value: 0x1c */ + {{0xc8, 0xd9, 0x34, 0xc0, 0x9e, 0xce, 0x61, 0xa1,}}, /* Byte value: 0x1d */ + {{0x85, 0xb1, 0x9d, 0xe9, 0x96, 0xa8, 0x79, 0x90,}}, /* Byte value: 0x1e */ + {{0xa7, 0x9a, 0x1d, 0x57, 0x4c, 0xe3, 0xd4, 0x83,}}, /* Byte value: 0x1f */ + {{0x92, 0x96, 0x36, 0x15, 0x1e, 0x61, 0x22, 0x37,}}, /* Byte value: 0x20 */ + {{0xde, 0x86, 0x52, 0xed, 0x67, 0x5a, 0xa9, 0x44,}}, /* Byte value: 0x21 */ + {{0x43, 0xfd, 0xe5, 0xcd, 0xe3, 0xc6, 0xe6, 0x2b,}}, /* Byte value: 0x22 */ + {{0x38, 0x11, 0xf3, 0x16, 0x2a, 0xc5, 0x7e, 0x68,}}, /* Byte value: 0x23 */ + {{0x27, 0x70, 0xff, 0xad, 0xac, 0xa1, 0x37, 0x9a,}}, /* Byte value: 0x24 */ + {{0xee, 0xd1, 0x06, 0xbc, 0x43, 0x32, 0xc5, 0x79,}}, /* Byte value: 0x25 */ + {{0xd0, 0x13, 0x1e, 0x09, 0x8c, 0xfa, 0x57, 0x5e,}}, /* Byte value: 0x26 */ + {{0x73, 0xaa, 0xb1, 0x9c, 0xc7, 0xae, 0x8a, 0x16,}}, /* Byte value: 0x27 */ + {{0xb2, 0x4d, 0xef, 0xca, 0x26, 0x90, 0x6a, 0xa0,}}, /* Byte value: 0x28 */ + {{0xfb, 0x06, 0xf4, 0x21, 0x29, 0x41, 0x7b, 0x5a,}}, /* Byte value: 0x29 */ + {{0x10, 0x8c, 0x8d, 0x8e, 0x1c, 0x99, 0x24, 0xaa,}}, /* Byte value: 0x2a */ + {{0xe6, 0x97, 0xa1, 0xfb, 0x4d, 0x9f, 0xd7, 0x2c,}}, /* Byte value: 0x2b */ + {{0x0b, 0xce, 0x33, 0xf7, 0x9d, 0x4a, 0x64, 0x93,}}, /* Byte value: 0x2c */ + {{0x98, 0x20, 0xc8, 0x33, 0xf2, 0x76, 0xd5, 0xe6,}}, /* Byte value: 0x2d */ + {{0xb6, 0x6e, 0x5d, 0x08, 0x21, 0x27, 0x63, 0x6b,}}, /* Byte value: 0x2e */ + {{0x11, 0xf4, 0x40, 0x5f, 0x6d, 0xc4, 0xb7, 0xe8,}}, /* Byte value: 0x2f */ + {{0xbd, 0xa0, 0x6e, 0xff, 0xbc, 0x6d, 0x07, 0xf8,}}, /* Byte value: 0x30 */ + {{0x0f, 0xed, 0x81, 0x35, 0x9a, 0xfd, 0x6d, 0x58,}}, /* Byte value: 0x31 */ + {{0xf3, 0x40, 0x53, 0x66, 0x27, 0xec, 0x69, 0x0f,}}, /* Byte value: 0x32 */ + {{0x5d, 0xe4, 0x24, 0xa7, 0x14, 0xff, 0x3c, 0x9b,}}, /* Byte value: 0x33 */ + {{0xbf, 0x50, 0x37, 0x9e, 0x5e, 0xd7, 0xe2, 0x7c,}}, /* Byte value: 0x34 */ + {{0x47, 0xde, 0x57, 0x0f, 0xe4, 0x71, 0xef, 0xe0,}}, /* Byte value: 0x35 */ + {{0x2e, 0x4e, 0x95, 0x3b, 0xd3, 0x51, 0xb6, 0x8d,}}, /* Byte value: 0x36 */ + {{0xc1, 0xe7, 0x5e, 0x56, 0xe1, 0x3e, 0xe0, 0xb6,}}, /* Byte value: 0x37 */ + {{0xd6, 0xc0, 0xf5, 0xaa, 0x69, 0xf7, 0xbb, 0x11,}}, /* Byte value: 0x38 */ + {{0x21, 0xa3, 0x14, 0x0e, 0x49, 0xac, 0xdb, 0xd5,}}, /* Byte value: 0x39 */ + {{0x23, 0x53, 0x4d, 0x6f, 0xab, 0x16, 0x3e, 0x51,}}, /* Byte value: 0x3a */ + {{0xf4, 0xeb, 0x75, 0x14, 0xb3, 0xbc, 0x16, 0x02,}}, /* Byte value: 0x3b */ + {{0x6e, 0x3b, 0xe4, 0x46, 0xa3, 0x70, 0x26, 0x60,}}, /* Byte value: 0x3c */ + {{0x8e, 0x7f, 0xae, 0x1e, 0x0b, 0xe2, 0x1d, 0x03,}}, /* Byte value: 0x3d */ + {{0xc0, 0x9f, 0x93, 0x87, 0x90, 0x63, 0x73, 0xf4,}}, /* Byte value: 0x3e */ + {{0x90, 0x66, 0x6f, 0x74, 0xfc, 0xdb, 0xc7, 0xb3,}}, /* Byte value: 0x3f */ + {{0xf5, 0x93, 0xb8, 0xc5, 0xc2, 0xe1, 0x85, 0x40,}}, /* Byte value: 0x40 */ + {{0x5a, 0x4f, 0x02, 0xd5, 0x80, 0xaf, 0x43, 0x96,}}, /* Byte value: 0x41 */ + {{0x84, 0xc9, 0x50, 0x38, 0xe7, 0xf5, 0xea, 0xd2,}}, /* Byte value: 0x42 */ + {{0x19, 0xb2, 0xe7, 0x18, 0x63, 0x69, 0xa5, 0xbd,}}, /* Byte value: 0x43 */ + {{0x6d, 0xb3, 0x70, 0xf6, 0x30, 0x97, 0x50, 0xa6,}}, /* Byte value: 0x44 */ + {{0x75, 0x79, 0x5a, 0x3f, 0x22, 0xa3, 0x66, 0x59,}}, /* Byte value: 0x45 */ + {{0x5f, 0x14, 0x7d, 0xc6, 0xf6, 0x45, 0xd9, 0x1f,}}, /* Byte value: 0x46 */ + {{0xe0, 0x44, 0x4a, 0x58, 0xa8, 0x92, 0x3b, 0x63,}}, /* Byte value: 0x47 */ + {{0xb3, 0x35, 0x22, 0x1b, 0x57, 0xcd, 0xf9, 0xe2,}}, /* Byte value: 0x48 */ + {{0x52, 0x09, 0xa5, 0x92, 0x8e, 0x02, 0x51, 0xc3,}}, /* Byte value: 0x49 */ + {{0xb4, 0x9e, 0x04, 0x69, 0xc3, 0x9d, 0x86, 0xef,}}, /* Byte value: 0x4a */ + {{0x32, 0xa7, 0x0d, 0x30, 0xc6, 0xd2, 0x89, 0xb9,}}, /* Byte value: 0x4b */ + {{0xb7, 0x16, 0x90, 0xd9, 0x50, 0x7a, 0xf0, 0x29,}}, /* Byte value: 0x4c */ + {{0xc6, 0x4c, 0x78, 0x24, 0x75, 0x6e, 0x9f, 0xbb,}}, /* Byte value: 0x4d */ + {{0xa3, 0xb9, 0xaf, 0x95, 0x4b, 0x54, 0xdd, 0x48,}}, /* Byte value: 0x4e */ + {{0x50, 0xf9, 0xfc, 0xf3, 0x6c, 0xb8, 0xb4, 0x47,}}, /* Byte value: 0x4f */ + {{0xe8, 0x02, 0xed, 0x1f, 0xa6, 0x3f, 0x29, 0x36,}}, /* Byte value: 0x50 */ + {{0x6a, 0x18, 0x56, 0x84, 0xa4, 0xc7, 0x2f, 0xab,}}, /* Byte value: 0x51 */ + {{0x9c, 0x03, 0x7a, 0xf1, 0xf5, 0xc1, 0xdc, 0x2d,}}, /* Byte value: 0x52 */ + {{0x57, 0x52, 0xda, 0x81, 0xf8, 0xe8, 0xcb, 0x4a,}}, /* Byte value: 0x53 */ + {{0x4a, 0xc3, 0x8f, 0x5b, 0x9c, 0x36, 0x67, 0x3c,}}, /* Byte value: 0x54 */ + {{0x6f, 0x43, 0x29, 0x97, 0xd2, 0x2d, 0xb5, 0x22,}}, /* Byte value: 0x55 */ + {{0xbc, 0xd8, 0xa3, 0x2e, 0xcd, 0x30, 0x94, 0xba,}}, /* Byte value: 0x56 */ + {{0x67, 0x05, 0x8e, 0xd0, 0xdc, 0x80, 0xa7, 0x77,}}, /* Byte value: 0x57 */ + {{0x51, 0x81, 0x31, 0x22, 0x1d, 0xe5, 0x27, 0x05,}}, /* Byte value: 0x58 */ + {{0x99, 0x58, 0x05, 0xe2, 0x83, 0x2b, 0x46, 0xa4,}}, /* Byte value: 0x59 */ + {{0xff, 0x25, 0x46, 0xe3, 0x2e, 0xf6, 0x72, 0x91,}}, /* Byte value: 0x5a */ + {{0x5b, 0x37, 0xcf, 0x04, 0xf1, 0xf2, 0xd0, 0xd4,}}, /* Byte value: 0x5b */ + {{0xd1, 0x6b, 0xd3, 0xd8, 0xfd, 0xa7, 0xc4, 0x1c,}}, /* Byte value: 0x5c */ + {{0x1b, 0x42, 0xbe, 0x79, 0x81, 0xd3, 0x40, 0x39,}}, /* Byte value: 0x5d */ + {{0x76, 0xf1, 0xce, 0x8f, 0xb1, 0x44, 0x10, 0x9f,}}, /* Byte value: 0x5e */ + {{0x64, 0x8d, 0x1a, 0x60, 0x4f, 0x67, 0xd1, 0xb1,}}, /* Byte value: 0x5f */ + {{0x29, 0xe5, 0xb3, 0x49, 0x47, 0x01, 0xc9, 0x80,}}, /* Byte value: 0x60 */ + {{0x59, 0xc7, 0x96, 0x65, 0x13, 0x48, 0x35, 0x50,}}, /* Byte value: 0x61 */ + {{0x68, 0xe8, 0x0f, 0xe5, 0x46, 0x7d, 0xca, 0x2f,}}, /* Byte value: 0x62 */ + {{0x39, 0x69, 0x3e, 0xc7, 0x5b, 0x98, 0xed, 0x2a,}}, /* Byte value: 0x63 */ + {{0x94, 0x45, 0xdd, 0xb6, 0xfb, 0x6c, 0xce, 0x78,}}, /* Byte value: 0x64 */ + {{0x4b, 0xbb, 0x42, 0x8a, 0xed, 0x6b, 0xf4, 0x7e,}}, /* Byte value: 0x65 */ + {{0x07, 0xab, 0x26, 0x72, 0x94, 0x50, 0x7f, 0x0d,}}, /* Byte value: 0x66 */ + {{0x71, 0x5a, 0xe8, 0xfd, 0x25, 0x14, 0x6f, 0x92,}}, /* Byte value: 0x67 */ + {{0x2b, 0x15, 0xea, 0x28, 0xa5, 0xbb, 0x2c, 0x04,}}, /* Byte value: 0x68 */ + {{0x26, 0x08, 0x32, 0x7c, 0xdd, 0xfc, 0xa4, 0xd8,}}, /* Byte value: 0x69 */ + {{0x20, 0xdb, 0xd9, 0xdf, 0x38, 0xf1, 0x48, 0x97,}}, /* Byte value: 0x6a */ + {{0xfa, 0x7e, 0x39, 0xf0, 0x58, 0x1c, 0xe8, 0x18,}}, /* Byte value: 0x6b */ + {{0x49, 0x4b, 0x1b, 0xeb, 0x0f, 0xd1, 0x11, 0xfa,}}, /* Byte value: 0x6c */ + {{0x22, 0x2b, 0x80, 0xbe, 0xda, 0x4b, 0xad, 0x13,}}, /* Byte value: 0x6d */ + {{0xa6, 0xe2, 0xd0, 0x86, 0x3d, 0xbe, 0x47, 0xc1,}}, /* Byte value: 0x6e */ + {{0xcd, 0x82, 0x4b, 0xd3, 0xe8, 0x24, 0xfb, 0x28,}}, /* Byte value: 0x6f */ + {{0x8c, 0x8f, 0xf7, 0x7f, 0xe9, 0x58, 0xf8, 0x87,}}, /* Byte value: 0x70 */ + {{0xd7, 0xb8, 0x38, 0x7b, 0x18, 0xaa, 0x28, 0x53,}}, /* Byte value: 0x71 */ + {{0x46, 0xa6, 0x9a, 0xde, 0x95, 0x2c, 0x7c, 0xa2,}}, /* Byte value: 0x72 */ + {{0x88, 0xac, 0x45, 0xbd, 0xee, 0xef, 0xf1, 0x4c,}}, /* Byte value: 0x73 */ + {{0x44, 0x56, 0xc3, 0xbf, 0x77, 0x96, 0x99, 0x26,}}, /* Byte value: 0x74 */ + {{0xc2, 0x6f, 0xca, 0xe6, 0x72, 0xd9, 0x96, 0x70,}}, /* Byte value: 0x75 */ + {{0x93, 0xee, 0xfb, 0xc4, 0x6f, 0x3c, 0xb1, 0x75,}}, /* Byte value: 0x76 */ + {{0xf6, 0x1b, 0x2c, 0x75, 0x51, 0x06, 0xf3, 0x86,}}, /* Byte value: 0x77 */ + {{0x09, 0x3e, 0x6a, 0x96, 0x7f, 0xf0, 0x81, 0x17,}}, /* Byte value: 0x78 */ + {{0xa4, 0x12, 0x89, 0xe7, 0xdf, 0x04, 0xa2, 0x45,}}, /* Byte value: 0x79 */ + {{0xe9, 0x7a, 0x20, 0xce, 0xd7, 0x62, 0xba, 0x74,}}, /* Byte value: 0x7a */ + {{0x2a, 0x6d, 0x27, 0xf9, 0xd4, 0xe6, 0xbf, 0x46,}}, /* Byte value: 0x7b */ + {{0x54, 0xda, 0x4e, 0x31, 0x6b, 0x0f, 0xbd, 0x8c,}}, /* Byte value: 0x7c */ + {{0xa2, 0xc1, 0x62, 0x44, 0x3a, 0x09, 0x4e, 0x0a,}}, /* Byte value: 0x7d */ + {{0xf7, 0x63, 0xe1, 0xa4, 0x20, 0x5b, 0x60, 0xc4,}}, /* Byte value: 0x7e */ + {{0xcf, 0x72, 0x12, 0xb2, 0x0a, 0x9e, 0x1e, 0xac,}}, /* Byte value: 0x7f */ + {{0xaf, 0xdc, 0xba, 0x10, 0x42, 0x4e, 0xc6, 0xd6,}}, /* Byte value: 0x80 */ + {{0xfd, 0xd5, 0x1f, 0x82, 0xcc, 0x4c, 0x97, 0x15,}}, /* Byte value: 0x81 */ + {{0xce, 0x0a, 0xdf, 0x63, 0x7b, 0xc3, 0x8d, 0xee,}}, /* Byte value: 0x82 */ + {{0x13, 0x04, 0x19, 0x3e, 0x8f, 0x7e, 0x52, 0x6c,}}, /* Byte value: 0x83 */ + {{0xe3, 0xcc, 0xde, 0xe8, 0x3b, 0x75, 0x4d, 0xa5,}}, /* Byte value: 0x84 */ + {{0x8b, 0x24, 0xd1, 0x0d, 0x7d, 0x08, 0x87, 0x8a,}}, /* Byte value: 0x85 */ + {{0x7e, 0xb7, 0x69, 0xc8, 0xbf, 0xe9, 0x02, 0xca,}}, /* Byte value: 0x86 */ + {{0xed, 0x59, 0x92, 0x0c, 0xd0, 0xd5, 0xb3, 0xbf,}}, /* Byte value: 0x87 */ + {{0xe5, 0x1f, 0x35, 0x4b, 0xde, 0x78, 0xa1, 0xea,}}, /* Byte value: 0x88 */ + {{0xb8, 0xfb, 0x11, 0xec, 0xca, 0x87, 0x9d, 0x71,}}, /* Byte value: 0x89 */ + {{0x7d, 0x3f, 0xfd, 0x78, 0x2c, 0x0e, 0x74, 0x0c,}}, /* Byte value: 0x8a */ + {{0x96, 0xb5, 0x84, 0xd7, 0x19, 0xd6, 0x2b, 0xfc,}}, /* Byte value: 0x8b */ + {{0x05, 0x5b, 0x7f, 0x13, 0x76, 0xea, 0x9a, 0x89,}}, /* Byte value: 0x8c */ + {{0x18, 0xca, 0x2a, 0xc9, 0x12, 0x34, 0x36, 0xff,}}, /* Byte value: 0x8d */ + {{0x87, 0x41, 0xc4, 0x88, 0x74, 0x12, 0x9c, 0x14,}}, /* Byte value: 0x8e */ + {{0x6b, 0x60, 0x9b, 0x55, 0xd5, 0x9a, 0xbc, 0xe9,}}, /* Byte value: 0x8f */ + {{0xd4, 0x30, 0xac, 0xcb, 0x8b, 0x4d, 0x5e, 0x95,}}, /* Byte value: 0x90 */ + {{0x04, 0x23, 0xb2, 0xc2, 0x07, 0xb7, 0x09, 0xcb,}}, /* Byte value: 0x91 */ + {{0xbb, 0x73, 0x85, 0x5c, 0x59, 0x60, 0xeb, 0xb7,}}, /* Byte value: 0x92 */ + {{0x37, 0xfc, 0x72, 0x23, 0xb0, 0x38, 0x13, 0x30,}}, /* Byte value: 0x93 */ + {{0xd3, 0x9b, 0x8a, 0xb9, 0x1f, 0x1d, 0x21, 0x98,}}, /* Byte value: 0x94 */ + {{0x9b, 0xa8, 0x5c, 0x83, 0x61, 0x91, 0xa3, 0x20,}}, /* Byte value: 0x95 */ + {{0x55, 0xa2, 0x83, 0xe0, 0x1a, 0x52, 0x2e, 0xce,}}, /* Byte value: 0x96 */ + {{0x3a, 0xe1, 0xaa, 0x77, 0xc8, 0x7f, 0x9b, 0xec,}}, /* Byte value: 0x97 */ + {{0xc4, 0xbc, 0x21, 0x45, 0x97, 0xd4, 0x7a, 0x3f,}}, /* Byte value: 0x98 */ + {{0x9e, 0xf3, 0x23, 0x90, 0x17, 0x7b, 0x39, 0xa9,}}, /* Byte value: 0x99 */ + {{0xa1, 0x49, 0xf6, 0xf4, 0xa9, 0xee, 0x38, 0xcc,}}, /* Byte value: 0x9a */ + {{0x81, 0x92, 0x2f, 0x2b, 0x91, 0x1f, 0x70, 0x5b,}}, /* Byte value: 0x9b */ + {{0x89, 0xd4, 0x88, 0x6c, 0x9f, 0xb2, 0x62, 0x0e,}}, /* Byte value: 0x9c */ + {{0x14, 0xaf, 0x3f, 0x4c, 0x1b, 0x2e, 0x2d, 0x61,}}, /* Byte value: 0x9d */ + {{0xb9, 0x83, 0xdc, 0x3d, 0xbb, 0xda, 0x0e, 0x33,}}, /* Byte value: 0x9e */ + {{0xac, 0x54, 0x2e, 0xa0, 0xd1, 0xa9, 0xb0, 0x10,}}, /* Byte value: 0x9f */ + {{0x8f, 0x07, 0x63, 0xcf, 0x7a, 0xbf, 0x8e, 0x41,}}, /* Byte value: 0xa0 */ + {{0xf0, 0xc8, 0xc7, 0xd6, 0xb4, 0x0b, 0x1f, 0xc9,}}, /* Byte value: 0xa1 */ + {{0xfe, 0x5d, 0x8b, 0x32, 0x5f, 0xab, 0xe1, 0xd3,}}, /* Byte value: 0xa2 */ + {{0x01, 0x78, 0xcd, 0xd1, 0x71, 0x5d, 0x93, 0x42,}}, /* Byte value: 0xa3 */ + {{0x08, 0x46, 0xa7, 0x47, 0x0e, 0xad, 0x12, 0x55,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x0d, 0x1d, 0xd8, 0x54, 0x78, 0x47, 0x88, 0xdc,}}, /* Byte value: 0xa6 */ + {{0x30, 0x57, 0x54, 0x51, 0x24, 0x68, 0x6c, 0x3d,}}, /* Byte value: 0xa7 */ + {{0x2d, 0xc6, 0x01, 0x8b, 0x40, 0xb6, 0xc0, 0x4b,}}, /* Byte value: 0xa8 */ + {{0x1f, 0x61, 0x0c, 0xbb, 0x86, 0x64, 0x49, 0xf2,}}, /* Byte value: 0xa9 */ + {{0x35, 0x0c, 0x2b, 0x42, 0x52, 0x82, 0xf6, 0xb4,}}, /* Byte value: 0xaa */ + {{0xd9, 0x2d, 0x74, 0x9f, 0xf3, 0x0a, 0xd6, 0x49,}}, /* Byte value: 0xab */ + {{0xdb, 0xdd, 0x2d, 0xfe, 0x11, 0xb0, 0x33, 0xcd,}}, /* Byte value: 0xac */ + {{0xba, 0x0b, 0x48, 0x8d, 0x28, 0x3d, 0x78, 0xf5,}}, /* Byte value: 0xad */ + {{0x3d, 0x4a, 0x8c, 0x05, 0x5c, 0x2f, 0xe4, 0xe1,}}, /* Byte value: 0xae */ + {{0x8d, 0xf7, 0x3a, 0xae, 0x98, 0x05, 0x6b, 0xc5,}}, /* Byte value: 0xaf */ + {{0x36, 0x84, 0xbf, 0xf2, 0xc1, 0x65, 0x80, 0x72,}}, /* Byte value: 0xb0 */ + {{0xa8, 0x77, 0x9c, 0x62, 0xd6, 0x1e, 0xb9, 0xdb,}}, /* Byte value: 0xb1 */ + {{0xc3, 0x17, 0x07, 0x37, 0x03, 0x84, 0x05, 0x32,}}, /* Byte value: 0xb2 */ + {{0x4d, 0x68, 0xa9, 0x29, 0x08, 0x66, 0x18, 0x31,}}, /* Byte value: 0xb3 */ + {{0xa5, 0x6a, 0x44, 0x36, 0xae, 0x59, 0x31, 0x07,}}, /* Byte value: 0xb4 */ + {{0x1d, 0x91, 0x55, 0xda, 0x64, 0xde, 0xac, 0x76,}}, /* Byte value: 0xb5 */ + {{0x3c, 0x32, 0x41, 0xd4, 0x2d, 0x72, 0x77, 0xa3,}}, /* Byte value: 0xb6 */ + {{0xef, 0xa9, 0xcb, 0x6d, 0x32, 0x6f, 0x56, 0x3b,}}, /* Byte value: 0xb7 */ + {{0x45, 0x2e, 0x0e, 0x6e, 0x06, 0xcb, 0x0a, 0x64,}}, /* Byte value: 0xb8 */ + {{0xaa, 0x87, 0xc5, 0x03, 0x34, 0xa4, 0x5c, 0x5f,}}, /* Byte value: 0xb9 */ + {{0x7c, 0x47, 0x30, 0xa9, 0x5d, 0x53, 0xe7, 0x4e,}}, /* Byte value: 0xba */ + {{0x9d, 0x7b, 0xb7, 0x20, 0x84, 0x9c, 0x4f, 0x6f,}}, /* Byte value: 0xbb */ + {{0x2c, 0xbe, 0xcc, 0x5a, 0x31, 0xeb, 0x53, 0x09,}}, /* Byte value: 0xbc */ + {{0x16, 0x5f, 0x66, 0x2d, 0xf9, 0x94, 0xc8, 0xe5,}}, /* Byte value: 0xbd */ + {{0x03, 0x88, 0x94, 0xb0, 0x93, 0xe7, 0x76, 0xc6,}}, /* Byte value: 0xbe */ + {{0x5e, 0x6c, 0xb0, 0x17, 0x87, 0x18, 0x4a, 0x5d,}}, /* Byte value: 0xbf */ + {{0x4e, 0xe0, 0x3d, 0x99, 0x9b, 0x81, 0x6e, 0xf7,}}, /* Byte value: 0xc0 */ + {{0xcb, 0x51, 0xa0, 0x70, 0x0d, 0x29, 0x17, 0x67,}}, /* Byte value: 0xc1 */ + {{0x3e, 0xc2, 0x18, 0xb5, 0xcf, 0xc8, 0x92, 0x27,}}, /* Byte value: 0xc2 */ + {{0x15, 0xd7, 0xf2, 0x9d, 0x6a, 0x73, 0xbe, 0x23,}}, /* Byte value: 0xc3 */ + {{0xfc, 0xad, 0xd2, 0x53, 0xbd, 0x11, 0x04, 0x57,}}, /* Byte value: 0xc4 */ + {{0xae, 0xa4, 0x77, 0xc1, 0x33, 0x13, 0x55, 0x94,}}, /* Byte value: 0xc5 */ + {{0x63, 0x26, 0x3c, 0x12, 0xdb, 0x37, 0xae, 0xbc,}}, /* Byte value: 0xc6 */ + {{0x0e, 0x95, 0x4c, 0xe4, 0xeb, 0xa0, 0xfe, 0x1a,}}, /* Byte value: 0xc7 */ + {{0x7f, 0xcf, 0xa4, 0x19, 0xce, 0xb4, 0x91, 0x88,}}, /* Byte value: 0xc8 */ + {{0x31, 0x2f, 0x99, 0x80, 0x55, 0x35, 0xff, 0x7f,}}, /* Byte value: 0xc9 */ + {{0xdf, 0xfe, 0x9f, 0x3c, 0x16, 0x07, 0x3a, 0x06,}}, /* Byte value: 0xca */ + {{0xf1, 0xb0, 0x0a, 0x07, 0xc5, 0x56, 0x8c, 0x8b,}}, /* Byte value: 0xcb */ + {{0x60, 0xae, 0xa8, 0xa2, 0x48, 0xd0, 0xd8, 0x7a,}}, /* Byte value: 0xcc */ + {{0x79, 0x1c, 0x4f, 0xba, 0x2b, 0xb9, 0x7d, 0xc7,}}, /* Byte value: 0xcd */ + {{0x9a, 0xd0, 0x91, 0x52, 0x10, 0xcc, 0x30, 0x62,}}, /* Byte value: 0xce */ + {{0xf8, 0x8e, 0x60, 0x91, 0xba, 0xa6, 0x0d, 0x9c,}}, /* Byte value: 0xcf */ + {{0x4c, 0x10, 0x64, 0xf8, 0x79, 0x3b, 0x8b, 0x73,}}, /* Byte value: 0xd0 */ + {{0xb5, 0xe6, 0xc9, 0xb8, 0xb2, 0xc0, 0x15, 0xad,}}, /* Byte value: 0xd1 */ + {{0x41, 0x0d, 0xbc, 0xac, 0x01, 0x7c, 0x03, 0xaf,}}, /* Byte value: 0xd2 */ + {{0xc7, 0x34, 0xb5, 0xf5, 0x04, 0x33, 0x0c, 0xf9,}}, /* Byte value: 0xd3 */ + {{0x7a, 0x94, 0xdb, 0x0a, 0xb8, 0x5e, 0x0b, 0x01,}}, /* Byte value: 0xd4 */ + {{0x7b, 0xec, 0x16, 0xdb, 0xc9, 0x03, 0x98, 0x43,}}, /* Byte value: 0xd5 */ + {{0x0a, 0xb6, 0xfe, 0x26, 0xec, 0x17, 0xf7, 0xd1,}}, /* Byte value: 0xd6 */ + {{0xdc, 0x76, 0x0b, 0x8c, 0x85, 0xe0, 0x4c, 0xc0,}}, /* Byte value: 0xd7 */ + {{0xdd, 0x0e, 0xc6, 0x5d, 0xf4, 0xbd, 0xdf, 0x82,}}, /* Byte value: 0xd8 */ + {{0xea, 0xf2, 0xb4, 0x7e, 0x44, 0x85, 0xcc, 0xb2,}}, /* Byte value: 0xd9 */ + {{0x78, 0x64, 0x82, 0x6b, 0x5a, 0xe4, 0xee, 0x85,}}, /* Byte value: 0xda */ + {{0xbe, 0x28, 0xfa, 0x4f, 0x2f, 0x8a, 0x71, 0x3e,}}, /* Byte value: 0xdb */ + {{0x86, 0x39, 0x09, 0x59, 0x05, 0x4f, 0x0f, 0x56,}}, /* Byte value: 0xdc */ + {{0xe1, 0x3c, 0x87, 0x89, 0xd9, 0xcf, 0xa8, 0x21,}}, /* Byte value: 0xdd */ + {{0x97, 0xcd, 0x49, 0x06, 0x68, 0x8b, 0xb8, 0xbe,}}, /* Byte value: 0xde */ + {{0x66, 0x7d, 0x43, 0x01, 0xad, 0xdd, 0x34, 0x35,}}, /* Byte value: 0xdf */ + {{0xeb, 0x8a, 0x79, 0xaf, 0x35, 0xd8, 0x5f, 0xf0,}}, /* Byte value: 0xe0 */ + {{0xf2, 0x38, 0x9e, 0xb7, 0x56, 0xb1, 0xfa, 0x4d,}}, /* Byte value: 0xe1 */ + {{0xb0, 0xbd, 0xb6, 0xab, 0xc4, 0x2a, 0x8f, 0x24,}}, /* Byte value: 0xe2 */ + {{0xe4, 0x67, 0xf8, 0x9a, 0xaf, 0x25, 0x32, 0xa8,}}, /* Byte value: 0xe3 */ + {{0x1c, 0xe9, 0x98, 0x0b, 0x15, 0x83, 0x3f, 0x34,}}, /* Byte value: 0xe4 */ + {{0xca, 0x29, 0x6d, 0xa1, 0x7c, 0x74, 0x84, 0x25,}}, /* Byte value: 0xe5 */ + {{0xd2, 0xe3, 0x47, 0x68, 0x6e, 0x40, 0xb2, 0xda,}}, /* Byte value: 0xe6 */ + {{0xa0, 0x31, 0x3b, 0x25, 0xd8, 0xb3, 0xab, 0x8e,}}, /* Byte value: 0xe7 */ + {{0x1e, 0x19, 0xc1, 0x6a, 0xf7, 0x39, 0xda, 0xb0,}}, /* Byte value: 0xe8 */ + {{0x9f, 0x8b, 0xee, 0x41, 0x66, 0x26, 0xaa, 0xeb,}}, /* Byte value: 0xe9 */ + {{0x56, 0x2a, 0x17, 0x50, 0x89, 0xb5, 0x58, 0x08,}}, /* Byte value: 0xea */ + {{0xab, 0xff, 0x08, 0xd2, 0x45, 0xf9, 0xcf, 0x1d,}}, /* Byte value: 0xeb */ + {{0xc9, 0xa1, 0xf9, 0x11, 0xef, 0x93, 0xf2, 0xe3,}}, /* Byte value: 0xec */ + {{0x69, 0x90, 0xc2, 0x34, 0x37, 0x20, 0x59, 0x6d,}}, /* Byte value: 0xed */ + {{0x91, 0x1e, 0xa2, 0xa5, 0x8d, 0x86, 0x54, 0xf1,}}, /* Byte value: 0xee */ + {{0x72, 0xd2, 0x7c, 0x4d, 0xb6, 0xf3, 0x19, 0x54,}}, /* Byte value: 0xef */ + {{0x53, 0x71, 0x68, 0x43, 0xff, 0x5f, 0xc2, 0x81,}}, /* Byte value: 0xf0 */ + {{0x17, 0x27, 0xab, 0xfc, 0x88, 0xc9, 0x5b, 0xa7,}}, /* Byte value: 0xf1 */ + {{0x4f, 0x98, 0xf0, 0x48, 0xea, 0xdc, 0xfd, 0xb5,}}, /* Byte value: 0xf2 */ + {{0x58, 0xbf, 0x5b, 0xb4, 0x62, 0x15, 0xa6, 0x12,}}, /* Byte value: 0xf3 */ + {{0x02, 0xf0, 0x59, 0x61, 0xe2, 0xba, 0xe5, 0x84,}}, /* Byte value: 0xf4 */ + {{0x65, 0xf5, 0xd7, 0xb1, 0x3e, 0x3a, 0x42, 0xf3,}}, /* Byte value: 0xf5 */ + {{0x70, 0x22, 0x25, 0x2c, 0x54, 0x49, 0xfc, 0xd0,}}, /* Byte value: 0xf6 */ + {{0x3f, 0xba, 0xd5, 0x64, 0xbe, 0x95, 0x01, 0x65,}}, /* Byte value: 0xf7 */ + {{0x33, 0xdf, 0xc0, 0xe1, 0xb7, 0x8f, 0x1a, 0xfb,}}, /* Byte value: 0xf8 */ + {{0x28, 0x9d, 0x7e, 0x98, 0x36, 0x5c, 0x5a, 0xc2,}}, /* Byte value: 0xf9 */ + {{0xc5, 0xc4, 0xec, 0x94, 0xe6, 0x89, 0xe9, 0x7d,}}, /* Byte value: 0xfa */ + {{0xcc, 0xfa, 0x86, 0x02, 0x99, 0x79, 0x68, 0x6a,}}, /* Byte value: 0xfb */ + {{0xad, 0x2c, 0xe3, 0x71, 0xa0, 0xf4, 0x23, 0x52,}}, /* Byte value: 0xfc */ + {{0x34, 0x74, 0xe6, 0x93, 0x23, 0xdf, 0x65, 0xf6,}}, /* Byte value: 0xfd */ + {{0x95, 0x3d, 0x10, 0x67, 0x8a, 0x31, 0x5d, 0x3a,}}, /* Byte value: 0xfe */ + {{0x83, 0x62, 0x76, 0x4a, 0x73, 0xa5, 0x95, 0xdf,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 2 */ + {{0x37, 0xf9, 0x69, 0x1b, 0x71, 0x18, 0x61, 0xcd,}}, /* Byte value: 0x00 */ + {{0x93, 0x8b, 0x03, 0xf8, 0xd8, 0xdb, 0x4a, 0x3b,}}, /* Byte value: 0x01 */ + {{0xdb, 0x45, 0x63, 0x4e, 0xe4, 0x87, 0x1e, 0x57,}}, /* Byte value: 0x02 */ + {{0x38, 0xfb, 0x20, 0xd3, 0x14, 0x34, 0x8d, 0x24,}}, /* Byte value: 0x03 */ + {{0x7f, 0x37, 0x09, 0xad, 0x4d, 0x44, 0x35, 0xa1,}}, /* Byte value: 0x04 */ + {{0xb6, 0xa0, 0x72, 0x2f, 0xa6, 0xd4, 0x3e, 0xed,}}, /* Byte value: 0x05 */ + {{0xa0, 0x81, 0xad, 0x96, 0xea, 0x47, 0x90, 0xf0,}}, /* Byte value: 0x06 */ + {{0xb7, 0xec, 0x33, 0xa3, 0xc6, 0xf5, 0x60, 0x0d,}}, /* Byte value: 0x07 */ + {{0xb8, 0xee, 0x7a, 0x6b, 0xa3, 0xd9, 0x8c, 0xe4,}}, /* Byte value: 0x08 */ + {{0xc5, 0x41, 0xf1, 0x1d, 0x2e, 0xdf, 0x05, 0x46,}}, /* Byte value: 0x09 */ + {{0xcc, 0x28, 0xfd, 0x7b, 0xc8, 0x35, 0xee, 0xaa,}}, /* Byte value: 0x0a */ + {{0x54, 0x52, 0x70, 0x3e, 0x36, 0x46, 0xf3, 0x7e,}}, /* Byte value: 0x0b */ + {{0x04, 0xf3, 0xc7, 0x75, 0x43, 0x84, 0xbb, 0x06,}}, /* Byte value: 0x0c */ + {{0xb1, 0x87, 0x76, 0x0d, 0x45, 0x33, 0x67, 0x08,}}, /* Byte value: 0x0d */ + {{0x13, 0x9e, 0x59, 0x40, 0x6f, 0x36, 0x4b, 0xfb,}}, /* Byte value: 0x0e */ + {{0xb2, 0x53, 0xb5, 0x5a, 0xe5, 0x50, 0x85, 0xeb,}}, /* Byte value: 0x0f */ + {{0x1c, 0x9c, 0x10, 0x88, 0x0a, 0x1a, 0xa7, 0x12,}}, /* Byte value: 0x10 */ + {{0xa8, 0xa4, 0xe0, 0x7c, 0x6c, 0x8c, 0x25, 0xfc,}}, /* Byte value: 0x11 */ + {{0x02, 0x98, 0x82, 0xdb, 0xc0, 0x42, 0xbc, 0x03,}}, /* Byte value: 0x12 */ + {{0x20, 0x94, 0xf7, 0x2e, 0x5d, 0xaa, 0x91, 0x30,}}, /* Byte value: 0x13 */ + {{0xf5, 0x9f, 0x9c, 0x24, 0xbc, 0x20, 0x3d, 0x6e,}}, /* Byte value: 0x14 */ + {{0x45, 0x54, 0xab, 0xa5, 0x99, 0x32, 0x04, 0x86,}}, /* Byte value: 0x15 */ + {{0x3b, 0x2f, 0xe3, 0x84, 0xb4, 0x57, 0x6f, 0xc7,}}, /* Byte value: 0x16 */ + {{0x3f, 0xdc, 0x24, 0xf1, 0xf7, 0xd3, 0xd4, 0xc1,}}, /* Byte value: 0x17 */ + {{0xc3, 0x2a, 0xb4, 0xb3, 0xad, 0x19, 0x02, 0x43,}}, /* Byte value: 0x18 */ + {{0x2f, 0x96, 0xbe, 0xe6, 0x38, 0x86, 0x7d, 0xd9,}}, /* Byte value: 0x19 */ + {{0x76, 0x5e, 0x05, 0xcb, 0xab, 0xae, 0xde, 0x4d,}}, /* Byte value: 0x1a */ + {{0x4b, 0x1a, 0xa3, 0xe1, 0x9c, 0x3f, 0xb6, 0x8f,}}, /* Byte value: 0x1b */ + {{0x5f, 0xa3, 0xfe, 0x83, 0x10, 0xee, 0xa4, 0x91,}}, /* Byte value: 0x1c */ + {{0x97, 0x78, 0xc4, 0x8d, 0x9b, 0x5f, 0xf1, 0x3d,}}, /* Byte value: 0x1d */ + {{0x16, 0x21, 0xdf, 0xb9, 0x4c, 0x93, 0xae, 0x1d,}}, /* Byte value: 0x1e */ + {{0xa2, 0x19, 0x2f, 0x4d, 0x2a, 0x05, 0x2c, 0xf3,}}, /* Byte value: 0x1f */ + {{0x50, 0xa1, 0xb7, 0x4b, 0x75, 0xc2, 0x48, 0x78,}}, /* Byte value: 0x20 */ + {{0x6a, 0xc2, 0x15, 0x43, 0xa1, 0xb4, 0x79, 0x5f,}}, /* Byte value: 0x21 */ + {{0x0c, 0xd6, 0x8a, 0x9f, 0xc5, 0x4f, 0x0e, 0x0a,}}, /* Byte value: 0x22 */ + {{0x71, 0x79, 0x01, 0xe9, 0x48, 0x49, 0x87, 0xa8,}}, /* Byte value: 0x23 */ + {{0xa6, 0xea, 0xe8, 0x38, 0x69, 0x81, 0x97, 0xf5,}}, /* Byte value: 0x24 */ + {{0x8a, 0xa8, 0x95, 0x89, 0xf1, 0x64, 0x08, 0xcf,}}, /* Byte value: 0x25 */ + {{0xe7, 0x4d, 0x84, 0xe8, 0xb3, 0x37, 0x28, 0x75,}}, /* Byte value: 0x26 */ + {{0xec, 0xbc, 0x0a, 0x55, 0x95, 0x9f, 0x7f, 0x9a,}}, /* Byte value: 0x27 */ + {{0x51, 0xed, 0xf6, 0xc7, 0x15, 0xe3, 0x16, 0x98,}}, /* Byte value: 0x28 */ + {{0x79, 0x5c, 0x4c, 0x03, 0xce, 0x82, 0x32, 0xa4,}}, /* Byte value: 0x29 */ + {{0xe1, 0x26, 0xc1, 0x46, 0x30, 0xf1, 0x2f, 0x70,}}, /* Byte value: 0x2a */ + {{0x1b, 0xbb, 0x14, 0xaa, 0xe9, 0xfd, 0xfe, 0xf7,}}, /* Byte value: 0x2b */ + {{0x9f, 0x5d, 0x89, 0x67, 0x1d, 0x94, 0x44, 0x31,}}, /* Byte value: 0x2c */ + {{0x74, 0xc6, 0x87, 0x10, 0x6b, 0xec, 0x62, 0x4e,}}, /* Byte value: 0x2d */ + {{0xf8, 0x05, 0x57, 0x37, 0x19, 0x4e, 0x6d, 0x84,}}, /* Byte value: 0x2e */ + {{0x5a, 0x1c, 0x78, 0x7a, 0x33, 0x4b, 0x41, 0x77,}}, /* Byte value: 0x2f */ + {{0x67, 0x58, 0xde, 0x50, 0x04, 0xda, 0x29, 0xb5,}}, /* Byte value: 0x30 */ + {{0x36, 0xb5, 0x28, 0x97, 0x11, 0x39, 0x3f, 0x2d,}}, /* Byte value: 0x31 */ + {{0xe8, 0x4f, 0xcd, 0x20, 0xd6, 0x1b, 0xc4, 0x9c,}}, /* Byte value: 0x32 */ + {{0x60, 0x7f, 0xda, 0x72, 0xe7, 0x3d, 0x70, 0x50,}}, /* Byte value: 0x33 */ + {{0xd2, 0x2c, 0x6f, 0x28, 0x02, 0x6d, 0xf5, 0xbb,}}, /* Byte value: 0x34 */ + {{0xa5, 0x3e, 0x2b, 0x6f, 0xc9, 0xe2, 0x75, 0x16,}}, /* Byte value: 0x35 */ + {{0x8c, 0xc3, 0xd0, 0x27, 0x72, 0xa2, 0x0f, 0xca,}}, /* Byte value: 0x36 */ + {{0xbd, 0x51, 0xfc, 0x92, 0x80, 0x7c, 0x69, 0x02,}}, /* Byte value: 0x37 */ + {{0xfb, 0xd1, 0x94, 0x60, 0xb9, 0x2d, 0x8f, 0x67,}}, /* Byte value: 0x38 */ + {{0xba, 0x76, 0xf8, 0xb0, 0x63, 0x9b, 0x30, 0xe7,}}, /* Byte value: 0x39 */ + {{0x0f, 0x02, 0x49, 0xc8, 0x65, 0x2c, 0xec, 0xe9,}}, /* Byte value: 0x3a */ + {{0x4f, 0xe9, 0x64, 0x94, 0xdf, 0xbb, 0x0d, 0x89,}}, /* Byte value: 0x3b */ + {{0x8e, 0x5b, 0x52, 0xfc, 0xb2, 0xe0, 0xb3, 0xc9,}}, /* Byte value: 0x3c */ + {{0x89, 0x7c, 0x56, 0xde, 0x51, 0x07, 0xea, 0x2c,}}, /* Byte value: 0x3d */ + {{0x06, 0x6b, 0x45, 0xae, 0x83, 0xc6, 0x07, 0x05,}}, /* Byte value: 0x3e */ + {{0xe5, 0xd5, 0x06, 0x33, 0x73, 0x75, 0x94, 0x76,}}, /* Byte value: 0x3f */ + {{0xf4, 0xd3, 0xdd, 0xa8, 0xdc, 0x01, 0x63, 0x8e,}}, /* Byte value: 0x40 */ + {{0xc7, 0xd9, 0x73, 0xc6, 0xee, 0x9d, 0xb9, 0x45,}}, /* Byte value: 0x41 */ + {{0xad, 0x1b, 0x66, 0x85, 0x4f, 0x29, 0xc0, 0x1a,}}, /* Byte value: 0x42 */ + {{0xcb, 0x0f, 0xf9, 0x59, 0x2b, 0xd2, 0xb7, 0x4f,}}, /* Byte value: 0x43 */ + {{0x80, 0x15, 0x5a, 0xb8, 0xb7, 0xed, 0x01, 0xc0,}}, /* Byte value: 0x44 */ + {{0xf0, 0x20, 0x1a, 0xdd, 0x9f, 0x85, 0xd8, 0x88,}}, /* Byte value: 0x45 */ + {{0xd5, 0x0b, 0x6b, 0x0a, 0xe1, 0x8a, 0xac, 0x5e,}}, /* Byte value: 0x46 */ + {{0x07, 0x27, 0x04, 0x22, 0xe3, 0xe7, 0x59, 0xe5,}}, /* Byte value: 0x47 */ + {{0xea, 0xd7, 0x4f, 0xfb, 0x16, 0x59, 0x78, 0x9f,}}, /* Byte value: 0x48 */ + {{0x56, 0xca, 0xf2, 0xe5, 0xf6, 0x04, 0x4f, 0x7d,}}, /* Byte value: 0x49 */ + {{0x4d, 0x71, 0xe6, 0x4f, 0x1f, 0xf9, 0xb1, 0x8a,}}, /* Byte value: 0x4a */ + {{0x55, 0x1e, 0x31, 0xb2, 0x56, 0x67, 0xad, 0x9e,}}, /* Byte value: 0x4b */ + {{0x43, 0x3f, 0xee, 0x0b, 0x1a, 0xf4, 0x03, 0x83,}}, /* Byte value: 0x4c */ + {{0x1a, 0xf7, 0x55, 0x26, 0x89, 0xdc, 0xa0, 0x17,}}, /* Byte value: 0x4d */ + {{0x0b, 0xf1, 0x8e, 0xbd, 0x26, 0xa8, 0x57, 0xef,}}, /* Byte value: 0x4e */ + {{0xe3, 0xbe, 0x43, 0x9d, 0xf0, 0xb3, 0x93, 0x73,}}, /* Byte value: 0x4f */ + {{0x96, 0x34, 0x85, 0x01, 0xfb, 0x7e, 0xaf, 0xdd,}}, /* Byte value: 0x50 */ + {{0x27, 0xb3, 0xf3, 0x0c, 0xbe, 0x4d, 0xc8, 0xd5,}}, /* Byte value: 0x51 */ + {{0xdd, 0x2e, 0x26, 0xe0, 0x67, 0x41, 0x19, 0x52,}}, /* Byte value: 0x52 */ + {{0x44, 0x18, 0xea, 0x29, 0xf9, 0x13, 0x5a, 0x66,}}, /* Byte value: 0x53 */ + {{0x26, 0xff, 0xb2, 0x80, 0xde, 0x6c, 0x96, 0x35,}}, /* Byte value: 0x54 */ + {{0x35, 0x61, 0xeb, 0xc0, 0xb1, 0x5a, 0xdd, 0xce,}}, /* Byte value: 0x55 */ + {{0xdc, 0x62, 0x67, 0x6c, 0x07, 0x60, 0x47, 0xb2,}}, /* Byte value: 0x56 */ + {{0xa4, 0x72, 0x6a, 0xe3, 0xa9, 0xc3, 0x2b, 0xf6,}}, /* Byte value: 0x57 */ + {{0x58, 0x84, 0xfa, 0xa1, 0xf3, 0x09, 0xfd, 0x74,}}, /* Byte value: 0x58 */ + {{0xcf, 0xfc, 0x3e, 0x2c, 0x68, 0x56, 0x0c, 0x49,}}, /* Byte value: 0x59 */ + {{0xd0, 0xb4, 0xed, 0xf3, 0xc2, 0x2f, 0x49, 0xb8,}}, /* Byte value: 0x5a */ + {{0x7c, 0xe3, 0xca, 0xfa, 0xed, 0x27, 0xd7, 0x42,}}, /* Byte value: 0x5b */ + {{0x5c, 0x77, 0x3d, 0xd4, 0xb0, 0x8d, 0x46, 0x72,}}, /* Byte value: 0x5c */ + {{0x7e, 0x7b, 0x48, 0x21, 0x2d, 0x65, 0x6b, 0x41,}}, /* Byte value: 0x5d */ + {{0xfe, 0x6e, 0x12, 0x99, 0x9a, 0x88, 0x6a, 0x81,}}, /* Byte value: 0x5e */ + {{0xaa, 0x3c, 0x62, 0xa7, 0xac, 0xce, 0x99, 0xff,}}, /* Byte value: 0x5f */ + {{0x2b, 0x65, 0x79, 0x93, 0x7b, 0x02, 0xc6, 0xdf,}}, /* Byte value: 0x60 */ + {{0xc9, 0x97, 0x7b, 0x82, 0xeb, 0x90, 0x0b, 0x4c,}}, /* Byte value: 0x61 */ + {{0x92, 0xc7, 0x42, 0x74, 0xb8, 0xfa, 0x14, 0xdb,}}, /* Byte value: 0x62 */ + {{0xca, 0x43, 0xb8, 0xd5, 0x4b, 0xf3, 0xe9, 0xaf,}}, /* Byte value: 0x63 */ + {{0x4c, 0x3d, 0xa7, 0xc3, 0x7f, 0xd8, 0xef, 0x6a,}}, /* Byte value: 0x64 */ + {{0x9d, 0xc5, 0x0b, 0xbc, 0xdd, 0xd6, 0xf8, 0x32,}}, /* Byte value: 0x65 */ + {{0xa7, 0xa6, 0xa9, 0xb4, 0x09, 0xa0, 0xc9, 0x15,}}, /* Byte value: 0x66 */ + {{0x59, 0xc8, 0xbb, 0x2d, 0x93, 0x28, 0xa3, 0x94,}}, /* Byte value: 0x67 */ + {{0x9e, 0x11, 0xc8, 0xeb, 0x7d, 0xb5, 0x1a, 0xd1,}}, /* Byte value: 0x68 */ + {{0x1d, 0xd0, 0x51, 0x04, 0x6a, 0x3b, 0xf9, 0xf2,}}, /* Byte value: 0x69 */ + {{0x01, 0x4c, 0x41, 0x8c, 0x60, 0x21, 0x5e, 0xe0,}}, /* Byte value: 0x6a */ + {{0xc2, 0x66, 0xf5, 0x3f, 0xcd, 0x38, 0x5c, 0xa3,}}, /* Byte value: 0x6b */ + {{0x28, 0xb1, 0xba, 0xc4, 0xdb, 0x61, 0x24, 0x3c,}}, /* Byte value: 0x6c */ + {{0xb4, 0x38, 0xf0, 0xf4, 0x66, 0x96, 0x82, 0xee,}}, /* Byte value: 0x6d */ + {{0x19, 0x23, 0x96, 0x71, 0x29, 0xbf, 0x42, 0xf4,}}, /* Byte value: 0x6e */ + {{0x85, 0xaa, 0xdc, 0x41, 0x94, 0x48, 0xe4, 0x26,}}, /* Byte value: 0x6f */ + {{0x3c, 0x08, 0xe7, 0xa6, 0x57, 0xb0, 0x36, 0x22,}}, /* Byte value: 0x70 */ + {{0x40, 0xeb, 0x2d, 0x5c, 0xba, 0x97, 0xe1, 0x60,}}, /* Byte value: 0x71 */ + {{0x1e, 0x04, 0x92, 0x53, 0xca, 0x58, 0x1b, 0x11,}}, /* Byte value: 0x72 */ + {{0x95, 0xe0, 0x46, 0x56, 0x5b, 0x1d, 0x4d, 0x3e,}}, /* Byte value: 0x73 */ + {{0xab, 0x70, 0x23, 0x2b, 0xcc, 0xef, 0xc7, 0x1f,}}, /* Byte value: 0x74 */ + {{0xb3, 0x1f, 0xf4, 0xd6, 0x85, 0x71, 0xdb, 0x0b,}}, /* Byte value: 0x75 */ + {{0xeb, 0x9b, 0x0e, 0x77, 0x76, 0x78, 0x26, 0x7f,}}, /* Byte value: 0x76 */ + {{0xfa, 0x9d, 0xd5, 0xec, 0xd9, 0x0c, 0xd1, 0x87,}}, /* Byte value: 0x77 */ + {{0x2a, 0x29, 0x38, 0x1f, 0x1b, 0x23, 0x98, 0x3f,}}, /* Byte value: 0x78 */ + {{0xac, 0x57, 0x27, 0x09, 0x2f, 0x08, 0x9e, 0xfa,}}, /* Byte value: 0x79 */ + {{0x2d, 0x0e, 0x3c, 0x3d, 0xf8, 0xc4, 0xc1, 0xda,}}, /* Byte value: 0x7a */ + {{0x25, 0x2b, 0x71, 0xd7, 0x7e, 0x0f, 0x74, 0xd6,}}, /* Byte value: 0x7b */ + {{0x4a, 0x56, 0xe2, 0x6d, 0xfc, 0x1e, 0xe8, 0x6f,}}, /* Byte value: 0x7c */ + {{0xb0, 0xcb, 0x37, 0x81, 0x25, 0x12, 0x39, 0xe8,}}, /* Byte value: 0x7d */ + {{0x41, 0xa7, 0x6c, 0xd0, 0xda, 0xb6, 0xbf, 0x80,}}, /* Byte value: 0x7e */ + {{0x30, 0xde, 0x6d, 0x39, 0x92, 0xff, 0x38, 0x28,}}, /* Byte value: 0x7f */ + {{0x33, 0x0a, 0xae, 0x6e, 0x32, 0x9c, 0xda, 0xcb,}}, /* Byte value: 0x80 */ + {{0x65, 0xc0, 0x5c, 0x8b, 0xc4, 0x98, 0x95, 0xb6,}}, /* Byte value: 0x81 */ + {{0x8b, 0xe4, 0xd4, 0x05, 0x91, 0x45, 0x56, 0x2f,}}, /* Byte value: 0x82 */ + {{0xef, 0x68, 0xc9, 0x02, 0x35, 0xfc, 0x9d, 0x79,}}, /* Byte value: 0x83 */ + {{0x09, 0x69, 0x0c, 0x66, 0xe6, 0xea, 0xeb, 0xec,}}, /* Byte value: 0x84 */ + {{0x9b, 0xae, 0x4e, 0x12, 0x5e, 0x10, 0xff, 0x37,}}, /* Byte value: 0x85 */ + {{0x6f, 0x7d, 0x93, 0xba, 0x82, 0x11, 0x9c, 0xb9,}}, /* Byte value: 0x86 */ + {{0x84, 0xe6, 0x9d, 0xcd, 0xf4, 0x69, 0xba, 0xc6,}}, /* Byte value: 0x87 */ + {{0x15, 0xf5, 0x1c, 0xee, 0xec, 0xf0, 0x4c, 0xfe,}}, /* Byte value: 0x88 */ + {{0x75, 0x8a, 0xc6, 0x9c, 0x0b, 0xcd, 0x3c, 0xae,}}, /* Byte value: 0x89 */ + {{0x61, 0x33, 0x9b, 0xfe, 0x87, 0x1c, 0x2e, 0xb0,}}, /* Byte value: 0x8a */ + {{0xf9, 0x49, 0x16, 0xbb, 0x79, 0x6f, 0x33, 0x64,}}, /* Byte value: 0x8b */ + {{0x12, 0xd2, 0x18, 0xcc, 0x0f, 0x17, 0x15, 0x1b,}}, /* Byte value: 0x8c */ + {{0x70, 0x35, 0x40, 0x65, 0x28, 0x68, 0xd9, 0x48,}}, /* Byte value: 0x8d */ + {{0xa3, 0x55, 0x6e, 0xc1, 0x4a, 0x24, 0x72, 0x13,}}, /* Byte value: 0x8e */ + {{0x9c, 0x89, 0x4a, 0x30, 0xbd, 0xf7, 0xa6, 0xd2,}}, /* Byte value: 0x8f */ + {{0x4e, 0xa5, 0x25, 0x18, 0xbf, 0x9a, 0x53, 0x69,}}, /* Byte value: 0x90 */ + {{0xa9, 0xe8, 0xa1, 0xf0, 0x0c, 0xad, 0x7b, 0x1c,}}, /* Byte value: 0x91 */ + {{0x7b, 0xc4, 0xce, 0xd8, 0x0e, 0xc0, 0x8e, 0xa7,}}, /* Byte value: 0x92 */ + {{0x47, 0xcc, 0x29, 0x7e, 0x59, 0x70, 0xb8, 0x85,}}, /* Byte value: 0x93 */ + {{0xe9, 0x03, 0x8c, 0xac, 0xb6, 0x3a, 0x9a, 0x7c,}}, /* Byte value: 0x94 */ + {{0x7a, 0x88, 0x8f, 0x54, 0x6e, 0xe1, 0xd0, 0x47,}}, /* Byte value: 0x95 */ + {{0xf1, 0x6c, 0x5b, 0x51, 0xff, 0xa4, 0x86, 0x68,}}, /* Byte value: 0x96 */ + {{0xc4, 0x0d, 0xb0, 0x91, 0x4e, 0xfe, 0x5b, 0xa6,}}, /* Byte value: 0x97 */ + {{0xaf, 0x83, 0xe4, 0x5e, 0x8f, 0x6b, 0x7c, 0x19,}}, /* Byte value: 0x98 */ + {{0x68, 0x5a, 0x97, 0x98, 0x61, 0xf6, 0xc5, 0x5c,}}, /* Byte value: 0x99 */ + {{0xbe, 0x85, 0x3f, 0xc5, 0x20, 0x1f, 0x8b, 0xe1,}}, /* Byte value: 0x9a */ + {{0xbf, 0xc9, 0x7e, 0x49, 0x40, 0x3e, 0xd5, 0x01,}}, /* Byte value: 0x9b */ + {{0x2e, 0xda, 0xff, 0x6a, 0x58, 0xa7, 0x23, 0x39,}}, /* Byte value: 0x9c */ + {{0x48, 0xce, 0x60, 0xb6, 0x3c, 0x5c, 0x54, 0x6c,}}, /* Byte value: 0x9d */ + {{0xce, 0xb0, 0x7f, 0xa0, 0x08, 0x77, 0x52, 0xa9,}}, /* Byte value: 0x9e */ + {{0x3d, 0x44, 0xa6, 0x2a, 0x37, 0x91, 0x68, 0xc2,}}, /* Byte value: 0x9f */ + {{0x32, 0x46, 0xef, 0xe2, 0x52, 0xbd, 0x84, 0x2b,}}, /* Byte value: 0xa0 */ + {{0xe6, 0x01, 0xc5, 0x64, 0xd3, 0x16, 0x76, 0x95,}}, /* Byte value: 0xa1 */ + {{0x6b, 0x8e, 0x54, 0xcf, 0xc1, 0x95, 0x27, 0xbf,}}, /* Byte value: 0xa2 */ + {{0xbb, 0x3a, 0xb9, 0x3c, 0x03, 0xba, 0x6e, 0x07,}}, /* Byte value: 0xa3 */ + {{0x91, 0x13, 0x81, 0x23, 0x18, 0x99, 0xf6, 0x38,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x83, 0xc1, 0x99, 0xef, 0x17, 0x8e, 0xe3, 0x23,}}, /* Byte value: 0xa6 */ + {{0xe0, 0x6a, 0x80, 0xca, 0x50, 0xd0, 0x71, 0x90,}}, /* Byte value: 0xa7 */ + {{0x82, 0x8d, 0xd8, 0x63, 0x77, 0xaf, 0xbd, 0xc3,}}, /* Byte value: 0xa8 */ + {{0xd7, 0x93, 0xe9, 0xd1, 0x21, 0xc8, 0x10, 0x5d,}}, /* Byte value: 0xa9 */ + {{0xf2, 0xb8, 0x98, 0x06, 0x5f, 0xc7, 0x64, 0x8b,}}, /* Byte value: 0xaa */ + {{0xcd, 0x64, 0xbc, 0xf7, 0xa8, 0x14, 0xb0, 0x4a,}}, /* Byte value: 0xab */ + {{0x78, 0x10, 0x0d, 0x8f, 0xae, 0xa3, 0x6c, 0x44,}}, /* Byte value: 0xac */ + {{0xc0, 0xfe, 0x77, 0xe4, 0x0d, 0x7a, 0xe0, 0xa0,}}, /* Byte value: 0xad */ + {{0x63, 0xab, 0x19, 0x25, 0x47, 0x5e, 0x92, 0xb3,}}, /* Byte value: 0xae */ + {{0x87, 0x32, 0x5e, 0x9a, 0x54, 0x0a, 0x58, 0x25,}}, /* Byte value: 0xaf */ + {{0xfc, 0xf6, 0x90, 0x42, 0x5a, 0xca, 0xd6, 0x82,}}, /* Byte value: 0xb0 */ + {{0x94, 0xac, 0x07, 0xda, 0x3b, 0x3c, 0x13, 0xde,}}, /* Byte value: 0xb1 */ + {{0x08, 0x25, 0x4d, 0xea, 0x86, 0xcb, 0xb5, 0x0c,}}, /* Byte value: 0xb2 */ + {{0x81, 0x59, 0x1b, 0x34, 0xd7, 0xcc, 0x5f, 0x20,}}, /* Byte value: 0xb3 */ + {{0x17, 0x6d, 0x9e, 0x35, 0x2c, 0xb2, 0xf0, 0xfd,}}, /* Byte value: 0xb4 */ + {{0x62, 0xe7, 0x58, 0xa9, 0x27, 0x7f, 0xcc, 0x53,}}, /* Byte value: 0xb5 */ + {{0xd8, 0x91, 0xa0, 0x19, 0x44, 0xe4, 0xfc, 0xb4,}}, /* Byte value: 0xb6 */ + {{0x31, 0x92, 0x2c, 0xb5, 0xf2, 0xde, 0x66, 0xc8,}}, /* Byte value: 0xb7 */ + {{0x10, 0x4a, 0x9a, 0x17, 0xcf, 0x55, 0xa9, 0x18,}}, /* Byte value: 0xb8 */ + {{0x21, 0xd8, 0xb6, 0xa2, 0x3d, 0x8b, 0xcf, 0xd0,}}, /* Byte value: 0xb9 */ + {{0xda, 0x09, 0x22, 0xc2, 0x84, 0xa6, 0x40, 0xb7,}}, /* Byte value: 0xba */ + {{0x66, 0x14, 0x9f, 0xdc, 0x64, 0xfb, 0x77, 0x55,}}, /* Byte value: 0xbb */ + {{0x39, 0xb7, 0x61, 0x5f, 0x74, 0x15, 0xd3, 0xc4,}}, /* Byte value: 0xbc */ + {{0xfd, 0xba, 0xd1, 0xce, 0x3a, 0xeb, 0x88, 0x62,}}, /* Byte value: 0xbd */ + {{0x0e, 0x4e, 0x08, 0x44, 0x05, 0x0d, 0xb2, 0x09,}}, /* Byte value: 0xbe */ + {{0x6e, 0x31, 0xd2, 0x36, 0xe2, 0x30, 0xc2, 0x59,}}, /* Byte value: 0xbf */ + {{0x8f, 0x17, 0x13, 0x70, 0xd2, 0xc1, 0xed, 0x29,}}, /* Byte value: 0xc0 */ + {{0x99, 0x36, 0xcc, 0xc9, 0x9e, 0x52, 0x43, 0x34,}}, /* Byte value: 0xc1 */ + {{0x6d, 0xe5, 0x11, 0x61, 0x42, 0x53, 0x20, 0xba,}}, /* Byte value: 0xc2 */ + {{0xf3, 0xf4, 0xd9, 0x8a, 0x3f, 0xe6, 0x3a, 0x6b,}}, /* Byte value: 0xc3 */ + {{0xde, 0xfa, 0xe5, 0xb7, 0xc7, 0x22, 0xfb, 0xb1,}}, /* Byte value: 0xc4 */ + {{0x88, 0x30, 0x17, 0x52, 0x31, 0x26, 0xb4, 0xcc,}}, /* Byte value: 0xc5 */ + {{0x0d, 0x9a, 0xcb, 0x13, 0xa5, 0x6e, 0x50, 0xea,}}, /* Byte value: 0xc6 */ + {{0x8d, 0x8f, 0x91, 0xab, 0x12, 0x83, 0x51, 0x2a,}}, /* Byte value: 0xc7 */ + {{0xd4, 0x47, 0x2a, 0x86, 0x81, 0xab, 0xf2, 0xbe,}}, /* Byte value: 0xc8 */ + {{0x5b, 0x50, 0x39, 0xf6, 0x53, 0x6a, 0x1f, 0x97,}}, /* Byte value: 0xc9 */ + {{0xd1, 0xf8, 0xac, 0x7f, 0xa2, 0x0e, 0x17, 0x58,}}, /* Byte value: 0xca */ + {{0x5d, 0x3b, 0x7c, 0x58, 0xd0, 0xac, 0x18, 0x92,}}, /* Byte value: 0xcb */ + {{0x03, 0xd4, 0xc3, 0x57, 0xa0, 0x63, 0xe2, 0xe3,}}, /* Byte value: 0xcc */ + {{0xc8, 0xdb, 0x3a, 0x0e, 0x8b, 0xb1, 0x55, 0xac,}}, /* Byte value: 0xcd */ + {{0xc1, 0xb2, 0x36, 0x68, 0x6d, 0x5b, 0xbe, 0x40,}}, /* Byte value: 0xce */ + {{0x77, 0x12, 0x44, 0x47, 0xcb, 0x8f, 0x80, 0xad,}}, /* Byte value: 0xcf */ + {{0x3a, 0x63, 0xa2, 0x08, 0xd4, 0x76, 0x31, 0x27,}}, /* Byte value: 0xd0 */ + {{0xf6, 0x4b, 0x5f, 0x73, 0x1c, 0x43, 0xdf, 0x8d,}}, /* Byte value: 0xd1 */ + {{0xb9, 0xa2, 0x3b, 0xe7, 0xc3, 0xf8, 0xd2, 0x04,}}, /* Byte value: 0xd2 */ + {{0xa1, 0xcd, 0xec, 0x1a, 0x8a, 0x66, 0xce, 0x10,}}, /* Byte value: 0xd3 */ + {{0xc6, 0x95, 0x32, 0x4a, 0x8e, 0xbc, 0xe7, 0xa5,}}, /* Byte value: 0xd4 */ + {{0x7d, 0xaf, 0x8b, 0x76, 0x8d, 0x06, 0x89, 0xa2,}}, /* Byte value: 0xd5 */ + {{0x24, 0x67, 0x30, 0x5b, 0x1e, 0x2e, 0x2a, 0x36,}}, /* Byte value: 0xd6 */ + {{0xdf, 0xb6, 0xa4, 0x3b, 0xa7, 0x03, 0xa5, 0x51,}}, /* Byte value: 0xd7 */ + {{0x64, 0x8c, 0x1d, 0x07, 0xa4, 0xb9, 0xcb, 0x56,}}, /* Byte value: 0xd8 */ + {{0x23, 0x40, 0x34, 0x79, 0xfd, 0xc9, 0x73, 0xd3,}}, /* Byte value: 0xd9 */ + {{0x73, 0xe1, 0x83, 0x32, 0x88, 0x0b, 0x3b, 0xab,}}, /* Byte value: 0xda */ + {{0x69, 0x16, 0xd6, 0x14, 0x01, 0xd7, 0x9b, 0xbc,}}, /* Byte value: 0xdb */ + {{0x18, 0x6f, 0xd7, 0xfd, 0x49, 0x9e, 0x1c, 0x14,}}, /* Byte value: 0xdc */ + {{0xbc, 0x1d, 0xbd, 0x1e, 0xe0, 0x5d, 0x37, 0xe2,}}, /* Byte value: 0xdd */ + {{0x42, 0x73, 0xaf, 0x87, 0x7a, 0xd5, 0x5d, 0x63,}}, /* Byte value: 0xde */ + {{0x1f, 0x48, 0xd3, 0xdf, 0xaa, 0x79, 0x45, 0xf1,}}, /* Byte value: 0xdf */ + {{0x98, 0x7a, 0x8d, 0x45, 0xfe, 0x73, 0x1d, 0xd4,}}, /* Byte value: 0xe0 */ + {{0x53, 0x75, 0x74, 0x1c, 0xd5, 0xa1, 0xaa, 0x9b,}}, /* Byte value: 0xe1 */ + {{0xe4, 0x99, 0x47, 0xbf, 0x13, 0x54, 0xca, 0x96,}}, /* Byte value: 0xe2 */ + {{0xae, 0xcf, 0xa5, 0xd2, 0xef, 0x4a, 0x22, 0xf9,}}, /* Byte value: 0xe3 */ + {{0xd9, 0xdd, 0xe1, 0x95, 0x24, 0xc5, 0xa2, 0x54,}}, /* Byte value: 0xe4 */ + {{0x22, 0x0c, 0x75, 0xf5, 0x9d, 0xe8, 0x2d, 0x33,}}, /* Byte value: 0xe5 */ + {{0x52, 0x39, 0x35, 0x90, 0xb5, 0x80, 0xf4, 0x7b,}}, /* Byte value: 0xe6 */ + {{0x05, 0xbf, 0x86, 0xf9, 0x23, 0xa5, 0xe5, 0xe6,}}, /* Byte value: 0xe7 */ + {{0x6c, 0xa9, 0x50, 0xed, 0x22, 0x72, 0x7e, 0x5a,}}, /* Byte value: 0xe8 */ + {{0xd3, 0x60, 0x2e, 0xa4, 0x62, 0x4c, 0xab, 0x5b,}}, /* Byte value: 0xe9 */ + {{0xff, 0x22, 0x53, 0x15, 0xfa, 0xa9, 0x34, 0x61,}}, /* Byte value: 0xea */ + {{0x9a, 0xe2, 0x0f, 0x9e, 0x3e, 0x31, 0xa1, 0xd7,}}, /* Byte value: 0xeb */ + {{0x2c, 0x42, 0x7d, 0xb1, 0x98, 0xe5, 0x9f, 0x3a,}}, /* Byte value: 0xec */ + {{0x29, 0xfd, 0xfb, 0x48, 0xbb, 0x40, 0x7a, 0xdc,}}, /* Byte value: 0xed */ + {{0x5e, 0xef, 0xbf, 0x0f, 0x70, 0xcf, 0xfa, 0x71,}}, /* Byte value: 0xee */ + {{0x57, 0x86, 0xb3, 0x69, 0x96, 0x25, 0x11, 0x9d,}}, /* Byte value: 0xef */ + {{0xed, 0xf0, 0x4b, 0xd9, 0xf5, 0xbe, 0x21, 0x7a,}}, /* Byte value: 0xf0 */ + {{0x46, 0x80, 0x68, 0xf2, 0x39, 0x51, 0xe6, 0x65,}}, /* Byte value: 0xf1 */ + {{0x34, 0x2d, 0xaa, 0x4c, 0xd1, 0x7b, 0x83, 0x2e,}}, /* Byte value: 0xf2 */ + {{0x72, 0xad, 0xc2, 0xbe, 0xe8, 0x2a, 0x65, 0x4b,}}, /* Byte value: 0xf3 */ + {{0xb5, 0x74, 0xb1, 0x78, 0x06, 0xb7, 0xdc, 0x0e,}}, /* Byte value: 0xf4 */ + {{0x11, 0x06, 0xdb, 0x9b, 0xaf, 0x74, 0xf7, 0xf8,}}, /* Byte value: 0xf5 */ + {{0xe2, 0xf2, 0x02, 0x11, 0x90, 0x92, 0xcd, 0x93,}}, /* Byte value: 0xf6 */ + {{0xd6, 0xdf, 0xa8, 0x5d, 0x41, 0xe9, 0x4e, 0xbd,}}, /* Byte value: 0xf7 */ + {{0xee, 0x24, 0x88, 0x8e, 0x55, 0xdd, 0xc3, 0x99,}}, /* Byte value: 0xf8 */ + {{0x90, 0x5f, 0xc0, 0xaf, 0x78, 0xb8, 0xa8, 0xd8,}}, /* Byte value: 0xf9 */ + {{0x14, 0xb9, 0x5d, 0x62, 0x8c, 0xd1, 0x12, 0x1e,}}, /* Byte value: 0xfa */ + {{0x3e, 0x90, 0x65, 0x7d, 0x97, 0xf2, 0x8a, 0x21,}}, /* Byte value: 0xfb */ + {{0x86, 0x7e, 0x1f, 0x16, 0x34, 0x2b, 0x06, 0xc5,}}, /* Byte value: 0xfc */ + {{0x49, 0x82, 0x21, 0x3a, 0x5c, 0x7d, 0x0a, 0x8c,}}, /* Byte value: 0xfd */ + {{0xf7, 0x07, 0x1e, 0xff, 0x7c, 0x62, 0x81, 0x6d,}}, /* Byte value: 0xfe */ + {{0x0a, 0xbd, 0xcf, 0x31, 0x46, 0x89, 0x09, 0x0f,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 3 */ + {{0xa8, 0x78, 0x41, 0x9a, 0x63, 0x9a, 0xaa, 0xcc,}}, /* Byte value: 0x00 */ + {{0xb4, 0x31, 0xad, 0x42, 0xc9, 0x42, 0x37, 0x9b,}}, /* Byte value: 0x01 */ + {{0x96, 0xde, 0x29, 0xd5, 0x90, 0xd5, 0x18, 0x10,}}, /* Byte value: 0x02 */ + {{0x1e, 0xe4, 0x7c, 0xcc, 0x37, 0xcc, 0xa4, 0x79,}}, /* Byte value: 0x03 */ + {{0x8a, 0x97, 0xc5, 0x0d, 0x3a, 0x0d, 0x85, 0x47,}}, /* Byte value: 0x04 */ + {{0xf5, 0x02, 0xcd, 0x8d, 0x2d, 0x8d, 0xe6, 0x05,}}, /* Byte value: 0x05 */ + {{0x9f, 0x98, 0x64, 0x8f, 0x0e, 0x8f, 0x01, 0xbf,}}, /* Byte value: 0x06 */ + {{0xa5, 0xa7, 0xef, 0xe8, 0x04, 0xe8, 0xc1, 0x3f,}}, /* Byte value: 0x07 */ + {{0x13, 0x3b, 0xd2, 0xbe, 0x50, 0xbe, 0xcf, 0x8a,}}, /* Byte value: 0x08 */ + {{0x39, 0x25, 0x53, 0x79, 0x38, 0x79, 0x04, 0xb9,}}, /* Byte value: 0x09 */ + {{0xac, 0xe1, 0xa2, 0xb2, 0x9a, 0xb2, 0xd8, 0x90,}}, /* Byte value: 0x0a */ + {{0x2d, 0x9d, 0xba, 0xf1, 0xa3, 0xf1, 0x7d, 0x56,}}, /* Byte value: 0x0b */ + {{0x83, 0xd1, 0x88, 0x57, 0xa4, 0x57, 0x9c, 0xe8,}}, /* Byte value: 0x0c */ + {{0x86, 0xff, 0x23, 0x75, 0xf2, 0x75, 0x13, 0xa3,}}, /* Byte value: 0x0d */ + {{0xb9, 0xee, 0x03, 0x30, 0xae, 0x30, 0x5c, 0x68,}}, /* Byte value: 0x0e */ + {{0x76, 0xd3, 0x45, 0xda, 0x89, 0xda, 0x7a, 0xed,}}, /* Byte value: 0x0f */ + {{0x0f, 0x72, 0x3e, 0x66, 0xfa, 0x66, 0x52, 0xdd,}}, /* Byte value: 0x10 */ + {{0x5a, 0xf9, 0xb7, 0x21, 0x85, 0x21, 0xfa, 0xac,}}, /* Byte value: 0x11 */ + {{0xa0, 0x89, 0x44, 0xca, 0x52, 0xca, 0x4e, 0x74,}}, /* Byte value: 0x12 */ + {{0x92, 0x47, 0xca, 0xfd, 0x69, 0xfd, 0x6a, 0x4c,}}, /* Byte value: 0x13 */ + {{0xe2, 0xa0, 0xfc, 0x1b, 0x84, 0x1b, 0x5b, 0xd3,}}, /* Byte value: 0x14 */ + {{0x34, 0xfa, 0xfd, 0x0b, 0x5f, 0x0b, 0x6f, 0x4a,}}, /* Byte value: 0x15 */ + {{0xee, 0xc8, 0x1a, 0x63, 0x4c, 0x63, 0xcd, 0x37,}}, /* Byte value: 0x16 */ + {{0x6d, 0x19, 0x92, 0x34, 0xe8, 0x34, 0x51, 0xdf,}}, /* Byte value: 0x17 */ + {{0x1a, 0x7d, 0x9f, 0xe4, 0xce, 0xe4, 0xd6, 0x25,}}, /* Byte value: 0x18 */ + {{0x24, 0xdb, 0xf7, 0xab, 0x3d, 0xab, 0x64, 0xf9,}}, /* Byte value: 0x19 */ + {{0x1f, 0x53, 0x34, 0xc6, 0x98, 0xc6, 0x59, 0x6e,}}, /* Byte value: 0x1a */ + {{0xd2, 0xc3, 0xe2, 0x38, 0x22, 0x38, 0x46, 0xc5,}}, /* Byte value: 0x1b */ + {{0x18, 0xd0, 0x0f, 0xf0, 0x53, 0xf0, 0xef, 0x0b,}}, /* Byte value: 0x1c */ + {{0x37, 0xe0, 0x25, 0x15, 0x6d, 0x15, 0xab, 0x73,}}, /* Byte value: 0x1d */ + {{0x6a, 0x9a, 0xa9, 0x02, 0x23, 0x02, 0xe7, 0xba,}}, /* Byte value: 0x1e */ + {{0x3f, 0x11, 0x20, 0x45, 0x5c, 0x45, 0x4f, 0xcb,}}, /* Byte value: 0x1f */ + {{0xae, 0x4c, 0x32, 0xa6, 0x07, 0xa6, 0xe1, 0xbe,}}, /* Byte value: 0x20 */ + {{0x10, 0x21, 0x0a, 0xa0, 0x62, 0xa0, 0x0b, 0xb3,}}, /* Byte value: 0x21 */ + {{0x46, 0xb0, 0x5b, 0xf9, 0x2f, 0xf9, 0x67, 0xfb,}}, /* Byte value: 0x22 */ + {{0x6c, 0xae, 0xda, 0x3e, 0x47, 0x3e, 0xac, 0xc8,}}, /* Byte value: 0x23 */ + {{0xbc, 0xc0, 0xa8, 0x12, 0xf8, 0x12, 0xd3, 0x23,}}, /* Byte value: 0x24 */ + {{0x68, 0x37, 0x39, 0x16, 0xbe, 0x16, 0xde, 0x94,}}, /* Byte value: 0x25 */ + {{0x0b, 0xeb, 0xdd, 0x4e, 0x03, 0x4e, 0x20, 0x81,}}, /* Byte value: 0x26 */ + {{0x3e, 0xa6, 0x68, 0x4f, 0xf3, 0x4f, 0xb2, 0xdc,}}, /* Byte value: 0x27 */ + {{0xfe, 0xe9, 0x10, 0xc3, 0x2e, 0xc3, 0xc6, 0x84,}}, /* Byte value: 0x28 */ + {{0xa9, 0xcf, 0x09, 0x90, 0xcc, 0x90, 0x57, 0xdb,}}, /* Byte value: 0x29 */ + {{0x28, 0xb3, 0x11, 0xd3, 0xf5, 0xd3, 0xf2, 0x1d,}}, /* Byte value: 0x2a */ + {{0x7c, 0x8f, 0xd0, 0x9e, 0x25, 0x9e, 0xa7, 0x7b,}}, /* Byte value: 0x2b */ + {{0xf2, 0x81, 0xf6, 0xbb, 0xe6, 0xbb, 0x50, 0x60,}}, /* Byte value: 0x2c */ + {{0xbf, 0xda, 0x70, 0x0c, 0xca, 0x0c, 0x17, 0x1a,}}, /* Byte value: 0x2d */ + {{0xf4, 0xb5, 0x85, 0x87, 0x82, 0x87, 0x1b, 0x12,}}, /* Byte value: 0x2e */ + {{0xcb, 0xa4, 0xa5, 0xc2, 0xde, 0xc2, 0x54, 0xd9,}}, /* Byte value: 0x2f */ + {{0x06, 0x34, 0x73, 0x3c, 0x64, 0x3c, 0x4b, 0x72,}}, /* Byte value: 0x30 */ + {{0xf8, 0xdd, 0x63, 0xff, 0x4a, 0xff, 0x8d, 0xf6,}}, /* Byte value: 0x31 */ + {{0xbd, 0x77, 0xe0, 0x18, 0x57, 0x18, 0x2e, 0x34,}}, /* Byte value: 0x32 */ + {{0x75, 0xc9, 0x9d, 0xc4, 0xbb, 0xc4, 0xbe, 0xd4,}}, /* Byte value: 0x33 */ + {{0x03, 0x1a, 0xd8, 0x1e, 0x32, 0x1e, 0xc4, 0x39,}}, /* Byte value: 0x34 */ + {{0x4c, 0xec, 0xce, 0xbd, 0x83, 0xbd, 0xba, 0x6d,}}, /* Byte value: 0x35 */ + {{0x4b, 0x6f, 0xf5, 0x8b, 0x48, 0x8b, 0x0c, 0x08,}}, /* Byte value: 0x36 */ + {{0xc0, 0x4f, 0x78, 0x8c, 0xdd, 0x8c, 0x74, 0x58,}}, /* Byte value: 0x37 */ + {{0x04, 0x99, 0xe3, 0x28, 0xf9, 0x28, 0x72, 0x5c,}}, /* Byte value: 0x38 */ + {{0xb3, 0xb2, 0x96, 0x74, 0x02, 0x74, 0x81, 0xfe,}}, /* Byte value: 0x39 */ + {{0xb6, 0x9c, 0x3d, 0x56, 0x54, 0x56, 0x0e, 0xb5,}}, /* Byte value: 0x3a */ + {{0x51, 0x12, 0x6a, 0x6f, 0x86, 0x6f, 0xda, 0x2d,}}, /* Byte value: 0x3b */ + {{0xeb, 0xe6, 0xb1, 0x41, 0x1a, 0x41, 0x42, 0x7c,}}, /* Byte value: 0x3c */ + {{0x98, 0x1b, 0x5f, 0xb9, 0xc5, 0xb9, 0xb7, 0xda,}}, /* Byte value: 0x3d */ + {{0x23, 0x58, 0xcc, 0x9d, 0xf6, 0x9d, 0xd2, 0x9c,}}, /* Byte value: 0x3e */ + {{0xab, 0x62, 0x99, 0x84, 0x51, 0x84, 0x6e, 0xf5,}}, /* Byte value: 0x3f */ + {{0xb2, 0x05, 0xde, 0x7e, 0xad, 0x7e, 0x7c, 0xe9,}}, /* Byte value: 0x40 */ + {{0x99, 0xac, 0x17, 0xb3, 0x6a, 0xb3, 0x4a, 0xcd,}}, /* Byte value: 0x41 */ + {{0x89, 0x8d, 0x1d, 0x13, 0x08, 0x13, 0x41, 0x7e,}}, /* Byte value: 0x42 */ + {{0xdf, 0x1c, 0x4c, 0x4a, 0x45, 0x4a, 0x2d, 0x36,}}, /* Byte value: 0x43 */ + {{0x0d, 0xdf, 0xae, 0x72, 0x67, 0x72, 0x6b, 0xf3,}}, /* Byte value: 0x44 */ + {{0x31, 0xd4, 0x56, 0x29, 0x09, 0x29, 0xe0, 0x01,}}, /* Byte value: 0x45 */ + {{0x70, 0xe7, 0x36, 0xe6, 0xed, 0xe6, 0x31, 0x9f,}}, /* Byte value: 0x46 */ + {{0x73, 0xfd, 0xee, 0xf8, 0xdf, 0xf8, 0xf5, 0xa6,}}, /* Byte value: 0x47 */ + {{0x1d, 0xfe, 0xa4, 0xd2, 0x05, 0xd2, 0x60, 0x40,}}, /* Byte value: 0x48 */ + {{0x8d, 0x14, 0xfe, 0x3b, 0xf1, 0x3b, 0x33, 0x22,}}, /* Byte value: 0x49 */ + {{0xf1, 0x9b, 0x2e, 0xa5, 0xd4, 0xa5, 0x94, 0x59,}}, /* Byte value: 0x4a */ + {{0x7d, 0x38, 0x98, 0x94, 0x8a, 0x94, 0x5a, 0x6c,}}, /* Byte value: 0x4b */ + {{0x17, 0xa2, 0x31, 0x96, 0xa9, 0x96, 0xbd, 0xd6,}}, /* Byte value: 0x4c */ + {{0x2c, 0x2a, 0xf2, 0xfb, 0x0c, 0xfb, 0x80, 0x41,}}, /* Byte value: 0x4d */ + {{0x35, 0x4d, 0xb5, 0x01, 0xf0, 0x01, 0x92, 0x5d,}}, /* Byte value: 0x4e */ + {{0x88, 0x3a, 0x55, 0x19, 0xa7, 0x19, 0xbc, 0x69,}}, /* Byte value: 0x4f */ + {{0x67, 0x45, 0x07, 0x70, 0x44, 0x70, 0x8c, 0x49,}}, /* Byte value: 0x50 */ + {{0xe1, 0xba, 0x24, 0x05, 0xb6, 0x05, 0x9f, 0xea,}}, /* Byte value: 0x51 */ + {{0xb5, 0x86, 0xe5, 0x48, 0x66, 0x48, 0xca, 0x8c,}}, /* Byte value: 0x52 */ + {{0x64, 0x5f, 0xdf, 0x6e, 0x76, 0x6e, 0x48, 0x70,}}, /* Byte value: 0x53 */ + {{0xb1, 0x1f, 0x06, 0x60, 0x9f, 0x60, 0xb8, 0xd0,}}, /* Byte value: 0x54 */ + {{0x08, 0xf1, 0x05, 0x50, 0x31, 0x50, 0xe4, 0xb8,}}, /* Byte value: 0x55 */ + {{0xe5, 0x23, 0xc7, 0x2d, 0x4f, 0x2d, 0xed, 0xb6,}}, /* Byte value: 0x56 */ + {{0x1c, 0x49, 0xec, 0xd8, 0xaa, 0xd8, 0x9d, 0x57,}}, /* Byte value: 0x57 */ + {{0x6b, 0x2d, 0xe1, 0x08, 0x8c, 0x08, 0x1a, 0xad,}}, /* Byte value: 0x58 */ + {{0x5c, 0xcd, 0xc4, 0x1d, 0xe1, 0x1d, 0xb1, 0xde,}}, /* Byte value: 0x59 */ + {{0xa3, 0x93, 0x9c, 0xd4, 0x60, 0xd4, 0x8a, 0x4d,}}, /* Byte value: 0x5a */ + {{0x7a, 0xbb, 0xa3, 0xa2, 0x41, 0xa2, 0xec, 0x09,}}, /* Byte value: 0x5b */ + {{0xe8, 0xfc, 0x69, 0x5f, 0x28, 0x5f, 0x86, 0x45,}}, /* Byte value: 0x5c */ + {{0xda, 0x32, 0xe7, 0x68, 0x13, 0x68, 0xa2, 0x7d,}}, /* Byte value: 0x5d */ + {{0xd7, 0xed, 0x49, 0x1a, 0x74, 0x1a, 0xc9, 0x8e,}}, /* Byte value: 0x5e */ + {{0xfa, 0x70, 0xf3, 0xeb, 0xd7, 0xeb, 0xb4, 0xd8,}}, /* Byte value: 0x5f */ + {{0xa7, 0x0a, 0x7f, 0xfc, 0x99, 0xfc, 0xf8, 0x11,}}, /* Byte value: 0x60 */ + {{0x7f, 0x95, 0x08, 0x80, 0x17, 0x80, 0x63, 0x42,}}, /* Byte value: 0x61 */ + {{0xe4, 0x94, 0x8f, 0x27, 0xe0, 0x27, 0x10, 0xa1,}}, /* Byte value: 0x62 */ + {{0x8f, 0xb9, 0x6e, 0x2f, 0x6c, 0x2f, 0x0a, 0x0c,}}, /* Byte value: 0x63 */ + {{0xa1, 0x3e, 0x0c, 0xc0, 0xfd, 0xc0, 0xb3, 0x63,}}, /* Byte value: 0x64 */ + {{0x52, 0x08, 0xb2, 0x71, 0xb4, 0x71, 0x1e, 0x14,}}, /* Byte value: 0x65 */ + {{0xec, 0x65, 0x8a, 0x77, 0xd1, 0x77, 0xf4, 0x19,}}, /* Byte value: 0x66 */ + {{0x3b, 0x88, 0xc3, 0x6d, 0xa5, 0x6d, 0x3d, 0x97,}}, /* Byte value: 0x67 */ + {{0xa2, 0x24, 0xd4, 0xde, 0xcf, 0xde, 0x77, 0x5a,}}, /* Byte value: 0x68 */ + {{0x5f, 0xd7, 0x1c, 0x03, 0xd3, 0x03, 0x75, 0xe7,}}, /* Byte value: 0x69 */ + {{0x50, 0xa5, 0x22, 0x65, 0x29, 0x65, 0x27, 0x3a,}}, /* Byte value: 0x6a */ + {{0x4a, 0xd8, 0xbd, 0x81, 0xe7, 0x81, 0xf1, 0x1f,}}, /* Byte value: 0x6b */ + {{0x57, 0x26, 0x19, 0x53, 0xe2, 0x53, 0x91, 0x5f,}}, /* Byte value: 0x6c */ + {{0x55, 0x8b, 0x89, 0x47, 0x7f, 0x47, 0xa8, 0x71,}}, /* Byte value: 0x6d */ + {{0xdc, 0x06, 0x94, 0x54, 0x77, 0x54, 0xe9, 0x0f,}}, /* Byte value: 0x6e */ + {{0xde, 0xab, 0x04, 0x40, 0xea, 0x40, 0xd0, 0x21,}}, /* Byte value: 0x6f */ + {{0x9d, 0x35, 0xf4, 0x9b, 0x93, 0x9b, 0x38, 0x91,}}, /* Byte value: 0x70 */ + {{0xe7, 0x8e, 0x57, 0x39, 0xd2, 0x39, 0xd4, 0x98,}}, /* Byte value: 0x71 */ + {{0xaf, 0xfb, 0x7a, 0xac, 0xa8, 0xac, 0x1c, 0xa9,}}, /* Byte value: 0x72 */ + {{0x97, 0x69, 0x61, 0xdf, 0x3f, 0xdf, 0xe5, 0x07,}}, /* Byte value: 0x73 */ + {{0xaa, 0xd5, 0xd1, 0x8e, 0xfe, 0x8e, 0x93, 0xe2,}}, /* Byte value: 0x74 */ + {{0x26, 0x76, 0x67, 0xbf, 0xa0, 0xbf, 0x5d, 0xd7,}}, /* Byte value: 0x75 */ + {{0x4d, 0x5b, 0x86, 0xb7, 0x2c, 0xb7, 0x47, 0x7a,}}, /* Byte value: 0x76 */ + {{0x54, 0x3c, 0xc1, 0x4d, 0xd0, 0x4d, 0x55, 0x66,}}, /* Byte value: 0x77 */ + {{0xf7, 0xaf, 0x5d, 0x99, 0xb0, 0x99, 0xdf, 0x2b,}}, /* Byte value: 0x78 */ + {{0xd9, 0x28, 0x3f, 0x76, 0x21, 0x76, 0x66, 0x44,}}, /* Byte value: 0x79 */ + {{0x84, 0x52, 0xb3, 0x61, 0x6f, 0x61, 0x2a, 0x8d,}}, /* Byte value: 0x7a */ + {{0x41, 0x33, 0x60, 0xcf, 0xe4, 0xcf, 0xd1, 0x9e,}}, /* Byte value: 0x7b */ + {{0x82, 0x66, 0xc0, 0x5d, 0x0b, 0x5d, 0x61, 0xff,}}, /* Byte value: 0x7c */ + {{0xd6, 0x5a, 0x01, 0x10, 0xdb, 0x10, 0x34, 0x99,}}, /* Byte value: 0x7d */ + {{0xb7, 0x2b, 0x75, 0x5c, 0xfb, 0x5c, 0xf3, 0xa2,}}, /* Byte value: 0x7e */ + {{0xdb, 0x85, 0xaf, 0x62, 0xbc, 0x62, 0x5f, 0x6a,}}, /* Byte value: 0x7f */ + {{0x2b, 0xa9, 0xc9, 0xcd, 0xc7, 0xcd, 0x36, 0x24,}}, /* Byte value: 0x80 */ + {{0xa6, 0xbd, 0x37, 0xf6, 0x36, 0xf6, 0x05, 0x06,}}, /* Byte value: 0x81 */ + {{0x38, 0x92, 0x1b, 0x73, 0x97, 0x73, 0xf9, 0xae,}}, /* Byte value: 0x82 */ + {{0xce, 0x8a, 0x0e, 0xe0, 0x88, 0xe0, 0xdb, 0x92,}}, /* Byte value: 0x83 */ + {{0x95, 0xc4, 0xf1, 0xcb, 0xa2, 0xcb, 0xdc, 0x29,}}, /* Byte value: 0x84 */ + {{0x71, 0x50, 0x7e, 0xec, 0x42, 0xec, 0xcc, 0x88,}}, /* Byte value: 0x85 */ + {{0xc3, 0x55, 0xa0, 0x92, 0xef, 0x92, 0xb0, 0x61,}}, /* Byte value: 0x86 */ + {{0x8e, 0x0e, 0x26, 0x25, 0xc3, 0x25, 0xf7, 0x1b,}}, /* Byte value: 0x87 */ + {{0x9a, 0xb6, 0xcf, 0xad, 0x58, 0xad, 0x8e, 0xf4,}}, /* Byte value: 0x88 */ + {{0xef, 0x7f, 0x52, 0x69, 0xe3, 0x69, 0x30, 0x20,}}, /* Byte value: 0x89 */ + {{0x25, 0x6c, 0xbf, 0xa1, 0x92, 0xa1, 0x99, 0xee,}}, /* Byte value: 0x8a */ + {{0xa4, 0x10, 0xa7, 0xe2, 0xab, 0xe2, 0x3c, 0x28,}}, /* Byte value: 0x8b */ + {{0xe9, 0x4b, 0x21, 0x55, 0x87, 0x55, 0x7b, 0x52,}}, /* Byte value: 0x8c */ + {{0x3c, 0x0b, 0xf8, 0x5b, 0x6e, 0x5b, 0x8b, 0xf2,}}, /* Byte value: 0x8d */ + {{0x6f, 0xb4, 0x02, 0x20, 0x75, 0x20, 0x68, 0xf1,}}, /* Byte value: 0x8e */ + {{0x02, 0xad, 0x90, 0x14, 0x9d, 0x14, 0x39, 0x2e,}}, /* Byte value: 0x8f */ + {{0x01, 0xb7, 0x48, 0x0a, 0xaf, 0x0a, 0xfd, 0x17,}}, /* Byte value: 0x90 */ + {{0x0a, 0x5c, 0x95, 0x44, 0xac, 0x44, 0xdd, 0x96,}}, /* Byte value: 0x91 */ + {{0x09, 0x46, 0x4d, 0x5a, 0x9e, 0x5a, 0x19, 0xaf,}}, /* Byte value: 0x92 */ + {{0x94, 0x73, 0xb9, 0xc1, 0x0d, 0xc1, 0x21, 0x3e,}}, /* Byte value: 0x93 */ + {{0xed, 0xd2, 0xc2, 0x7d, 0x7e, 0x7d, 0x09, 0x0e,}}, /* Byte value: 0x94 */ + {{0x59, 0xe3, 0x6f, 0x3f, 0xb7, 0x3f, 0x3e, 0x95,}}, /* Byte value: 0x95 */ + {{0x61, 0x71, 0x74, 0x4c, 0x20, 0x4c, 0xc7, 0x3b,}}, /* Byte value: 0x96 */ + {{0x69, 0x80, 0x71, 0x1c, 0x11, 0x1c, 0x23, 0x83,}}, /* Byte value: 0x97 */ + {{0x29, 0x04, 0x59, 0xd9, 0x5a, 0xd9, 0x0f, 0x0a,}}, /* Byte value: 0x98 */ + {{0xb0, 0xa8, 0x4e, 0x6a, 0x30, 0x6a, 0x45, 0xc7,}}, /* Byte value: 0x99 */ + {{0x30, 0x63, 0x1e, 0x23, 0xa6, 0x23, 0x1d, 0x16,}}, /* Byte value: 0x9a */ + {{0x60, 0xc6, 0x3c, 0x46, 0x8f, 0x46, 0x3a, 0x2c,}}, /* Byte value: 0x9b */ + {{0x74, 0x7e, 0xd5, 0xce, 0x14, 0xce, 0x43, 0xc3,}}, /* Byte value: 0x9c */ + {{0x22, 0xef, 0x84, 0x97, 0x59, 0x97, 0x2f, 0x8b,}}, /* Byte value: 0x9d */ + {{0x0c, 0x68, 0xe6, 0x78, 0xc8, 0x78, 0x96, 0xe4,}}, /* Byte value: 0x9e */ + {{0xcd, 0x90, 0xd6, 0xfe, 0xba, 0xfe, 0x1f, 0xab,}}, /* Byte value: 0x9f */ + {{0x7b, 0x0c, 0xeb, 0xa8, 0xee, 0xa8, 0x11, 0x1e,}}, /* Byte value: 0xa0 */ + {{0x5b, 0x4e, 0xff, 0x2b, 0x2a, 0x2b, 0x07, 0xbb,}}, /* Byte value: 0xa1 */ + {{0x40, 0x84, 0x28, 0xc5, 0x4b, 0xc5, 0x2c, 0x89,}}, /* Byte value: 0xa2 */ + {{0xe3, 0x17, 0xb4, 0x11, 0x2b, 0x11, 0xa6, 0xc4,}}, /* Byte value: 0xa3 */ + {{0x14, 0xb8, 0xe9, 0x88, 0x9b, 0x88, 0x79, 0xef,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0xfd, 0xf3, 0xc8, 0xdd, 0x1c, 0xdd, 0x02, 0xbd,}}, /* Byte value: 0xa6 */ + {{0x78, 0x16, 0x33, 0xb6, 0xdc, 0xb6, 0xd5, 0x27,}}, /* Byte value: 0xa7 */ + {{0xad, 0x56, 0xea, 0xb8, 0x35, 0xb8, 0x25, 0x87,}}, /* Byte value: 0xa8 */ + {{0xd0, 0x6e, 0x72, 0x2c, 0xbf, 0x2c, 0x7f, 0xeb,}}, /* Byte value: 0xa9 */ + {{0x91, 0x5d, 0x12, 0xe3, 0x5b, 0xe3, 0xae, 0x75,}}, /* Byte value: 0xaa */ + {{0xfc, 0x44, 0x80, 0xd7, 0xb3, 0xd7, 0xff, 0xaa,}}, /* Byte value: 0xab */ + {{0xf9, 0x6a, 0x2b, 0xf5, 0xe5, 0xf5, 0x70, 0xe1,}}, /* Byte value: 0xac */ + {{0xea, 0x51, 0xf9, 0x4b, 0xb5, 0x4b, 0xbf, 0x6b,}}, /* Byte value: 0xad */ + {{0x85, 0xe5, 0xfb, 0x6b, 0xc0, 0x6b, 0xd7, 0x9a,}}, /* Byte value: 0xae */ + {{0x7e, 0x22, 0x40, 0x8a, 0xb8, 0x8a, 0x9e, 0x55,}}, /* Byte value: 0xaf */ + {{0x77, 0x64, 0x0d, 0xd0, 0x26, 0xd0, 0x87, 0xfa,}}, /* Byte value: 0xb0 */ + {{0xc7, 0xcc, 0x43, 0xba, 0x16, 0xba, 0xc2, 0x3d,}}, /* Byte value: 0xb1 */ + {{0xc5, 0x61, 0xd3, 0xae, 0x8b, 0xae, 0xfb, 0x13,}}, /* Byte value: 0xb2 */ + {{0x5d, 0x7a, 0x8c, 0x17, 0x4e, 0x17, 0x4c, 0xc9,}}, /* Byte value: 0xb3 */ + {{0x3a, 0x3f, 0x8b, 0x67, 0x0a, 0x67, 0xc0, 0x80,}}, /* Byte value: 0xb4 */ + {{0xd5, 0x40, 0xd9, 0x0e, 0xe9, 0x0e, 0xf0, 0xa0,}}, /* Byte value: 0xb5 */ + {{0x66, 0xf2, 0x4f, 0x7a, 0xeb, 0x7a, 0x71, 0x5e,}}, /* Byte value: 0xb6 */ + {{0x8b, 0x20, 0x8d, 0x07, 0x95, 0x07, 0x78, 0x50,}}, /* Byte value: 0xb7 */ + {{0x49, 0xc2, 0x65, 0x9f, 0xd5, 0x9f, 0x35, 0x26,}}, /* Byte value: 0xb8 */ + {{0xc2, 0xe2, 0xe8, 0x98, 0x40, 0x98, 0x4d, 0x76,}}, /* Byte value: 0xb9 */ + {{0xc6, 0x7b, 0x0b, 0xb0, 0xb9, 0xb0, 0x3f, 0x2a,}}, /* Byte value: 0xba */ + {{0x56, 0x91, 0x51, 0x59, 0x4d, 0x59, 0x6c, 0x48,}}, /* Byte value: 0xbb */ + {{0x4e, 0x41, 0x5e, 0xa9, 0x1e, 0xa9, 0x83, 0x43,}}, /* Byte value: 0xbc */ + {{0x27, 0xc1, 0x2f, 0xb5, 0x0f, 0xb5, 0xa0, 0xc0,}}, /* Byte value: 0xbd */ + {{0xe6, 0x39, 0x1f, 0x33, 0x7d, 0x33, 0x29, 0x8f,}}, /* Byte value: 0xbe */ + {{0x93, 0xf0, 0x82, 0xf7, 0xc6, 0xf7, 0x97, 0x5b,}}, /* Byte value: 0xbf */ + {{0xbb, 0x43, 0x93, 0x24, 0x33, 0x24, 0x65, 0x46,}}, /* Byte value: 0xc0 */ + {{0xd1, 0xd9, 0x3a, 0x26, 0x10, 0x26, 0x82, 0xfc,}}, /* Byte value: 0xc1 */ + {{0x63, 0xdc, 0xe4, 0x58, 0xbd, 0x58, 0xfe, 0x15,}}, /* Byte value: 0xc2 */ + {{0xc1, 0xf8, 0x30, 0x86, 0x72, 0x86, 0x89, 0x4f,}}, /* Byte value: 0xc3 */ + {{0x45, 0xaa, 0x83, 0xe7, 0x1d, 0xe7, 0xa3, 0xc2,}}, /* Byte value: 0xc4 */ + {{0xc8, 0xbe, 0x7d, 0xdc, 0xec, 0xdc, 0x90, 0xe0,}}, /* Byte value: 0xc5 */ + {{0x16, 0x15, 0x79, 0x9c, 0x06, 0x9c, 0x40, 0xc1,}}, /* Byte value: 0xc6 */ + {{0x1b, 0xca, 0xd7, 0xee, 0x61, 0xee, 0x2b, 0x32,}}, /* Byte value: 0xc7 */ + {{0x20, 0x42, 0x14, 0x83, 0xc4, 0x83, 0x16, 0xa5,}}, /* Byte value: 0xc8 */ + {{0x9b, 0x01, 0x87, 0xa7, 0xf7, 0xa7, 0x73, 0xe3,}}, /* Byte value: 0xc9 */ + {{0xf3, 0x36, 0xbe, 0xb1, 0x49, 0xb1, 0xad, 0x77,}}, /* Byte value: 0xca */ + {{0xb8, 0x59, 0x4b, 0x3a, 0x01, 0x3a, 0xa1, 0x7f,}}, /* Byte value: 0xcb */ + {{0xf0, 0x2c, 0x66, 0xaf, 0x7b, 0xaf, 0x69, 0x4e,}}, /* Byte value: 0xcc */ + {{0x2f, 0x30, 0x2a, 0xe5, 0x3e, 0xe5, 0x44, 0x78,}}, /* Byte value: 0xcd */ + {{0xba, 0xf4, 0xdb, 0x2e, 0x9c, 0x2e, 0x98, 0x51,}}, /* Byte value: 0xce */ + {{0x4f, 0xf6, 0x16, 0xa3, 0xb1, 0xa3, 0x7e, 0x54,}}, /* Byte value: 0xcf */ + {{0xbe, 0x6d, 0x38, 0x06, 0x65, 0x06, 0xea, 0x0d,}}, /* Byte value: 0xd0 */ + {{0x12, 0x8c, 0x9a, 0xb4, 0xff, 0xb4, 0x32, 0x9d,}}, /* Byte value: 0xd1 */ + {{0x43, 0x9e, 0xf0, 0xdb, 0x79, 0xdb, 0xe8, 0xb0,}}, /* Byte value: 0xd2 */ + {{0xcf, 0x3d, 0x46, 0xea, 0x27, 0xea, 0x26, 0x85,}}, /* Byte value: 0xd3 */ + {{0xc9, 0x09, 0x35, 0xd6, 0x43, 0xd6, 0x6d, 0xf7,}}, /* Byte value: 0xd4 */ + {{0x2a, 0x1e, 0x81, 0xc7, 0x68, 0xc7, 0xcb, 0x33,}}, /* Byte value: 0xd5 */ + {{0x11, 0x96, 0x42, 0xaa, 0xcd, 0xaa, 0xf6, 0xa4,}}, /* Byte value: 0xd6 */ + {{0x15, 0x0f, 0xa1, 0x82, 0x34, 0x82, 0x84, 0xf8,}}, /* Byte value: 0xd7 */ + {{0xf6, 0x18, 0x15, 0x93, 0x1f, 0x93, 0x22, 0x3c,}}, /* Byte value: 0xd8 */ + {{0x62, 0x6b, 0xac, 0x52, 0x12, 0x52, 0x03, 0x02,}}, /* Byte value: 0xd9 */ + {{0xcc, 0x27, 0x9e, 0xf4, 0x15, 0xf4, 0xe2, 0xbc,}}, /* Byte value: 0xda */ + {{0xe0, 0x0d, 0x6c, 0x0f, 0x19, 0x0f, 0x62, 0xfd,}}, /* Byte value: 0xdb */ + {{0x8c, 0xa3, 0xb6, 0x31, 0x5e, 0x31, 0xce, 0x35,}}, /* Byte value: 0xdc */ + {{0x90, 0xea, 0x5a, 0xe9, 0xf4, 0xe9, 0x53, 0x62,}}, /* Byte value: 0xdd */ + {{0x47, 0x07, 0x13, 0xf3, 0x80, 0xf3, 0x9a, 0xec,}}, /* Byte value: 0xde */ + {{0xff, 0x5e, 0x58, 0xc9, 0x81, 0xc9, 0x3b, 0x93,}}, /* Byte value: 0xdf */ + {{0x81, 0x7c, 0x18, 0x43, 0x39, 0x43, 0xa5, 0xc6,}}, /* Byte value: 0xe0 */ + {{0x5e, 0x60, 0x54, 0x09, 0x7c, 0x09, 0x88, 0xf0,}}, /* Byte value: 0xe1 */ + {{0xfb, 0xc7, 0xbb, 0xe1, 0x78, 0xe1, 0x49, 0xcf,}}, /* Byte value: 0xe2 */ + {{0x79, 0xa1, 0x7b, 0xbc, 0x73, 0xbc, 0x28, 0x30,}}, /* Byte value: 0xe3 */ + {{0x36, 0x57, 0x6d, 0x1f, 0xc2, 0x1f, 0x56, 0x64,}}, /* Byte value: 0xe4 */ + {{0x32, 0xce, 0x8e, 0x37, 0x3b, 0x37, 0x24, 0x38,}}, /* Byte value: 0xe5 */ + {{0x0e, 0xc5, 0x76, 0x6c, 0x55, 0x6c, 0xaf, 0xca,}}, /* Byte value: 0xe6 */ + {{0xd3, 0x74, 0xaa, 0x32, 0x8d, 0x32, 0xbb, 0xd2,}}, /* Byte value: 0xe7 */ + {{0x33, 0x79, 0xc6, 0x3d, 0x94, 0x3d, 0xd9, 0x2f,}}, /* Byte value: 0xe8 */ + {{0x53, 0xbf, 0xfa, 0x7b, 0x1b, 0x7b, 0xe3, 0x03,}}, /* Byte value: 0xe9 */ + {{0x87, 0x48, 0x6b, 0x7f, 0x5d, 0x7f, 0xee, 0xb4,}}, /* Byte value: 0xea */ + {{0x21, 0xf5, 0x5c, 0x89, 0x6b, 0x89, 0xeb, 0xb2,}}, /* Byte value: 0xeb */ + {{0xd4, 0xf7, 0x91, 0x04, 0x46, 0x04, 0x0d, 0xb7,}}, /* Byte value: 0xec */ + {{0x07, 0x83, 0x3b, 0x36, 0xcb, 0x36, 0xb6, 0x65,}}, /* Byte value: 0xed */ + {{0x48, 0x75, 0x2d, 0x95, 0x7a, 0x95, 0xc8, 0x31,}}, /* Byte value: 0xee */ + {{0xdd, 0xb1, 0xdc, 0x5e, 0xd8, 0x5e, 0x14, 0x18,}}, /* Byte value: 0xef */ + {{0x6e, 0x03, 0x4a, 0x2a, 0xda, 0x2a, 0x95, 0xe6,}}, /* Byte value: 0xf0 */ + {{0xc4, 0xd6, 0x9b, 0xa4, 0x24, 0xa4, 0x06, 0x04,}}, /* Byte value: 0xf1 */ + {{0x58, 0x54, 0x27, 0x35, 0x18, 0x35, 0xc3, 0x82,}}, /* Byte value: 0xf2 */ + {{0x9c, 0x82, 0xbc, 0x91, 0x3c, 0x91, 0xc5, 0x86,}}, /* Byte value: 0xf3 */ + {{0x05, 0x2e, 0xab, 0x22, 0x56, 0x22, 0x8f, 0x4b,}}, /* Byte value: 0xf4 */ + {{0x19, 0x67, 0x47, 0xfa, 0xfc, 0xfa, 0x12, 0x1c,}}, /* Byte value: 0xf5 */ + {{0xd8, 0x9f, 0x77, 0x7c, 0x8e, 0x7c, 0x9b, 0x53,}}, /* Byte value: 0xf6 */ + {{0x80, 0xcb, 0x50, 0x49, 0x96, 0x49, 0x58, 0xd1,}}, /* Byte value: 0xf7 */ + {{0x9e, 0x2f, 0x2c, 0x85, 0xa1, 0x85, 0xfc, 0xa8,}}, /* Byte value: 0xf8 */ + {{0x44, 0x1d, 0xcb, 0xed, 0xb2, 0xed, 0x5e, 0xd5,}}, /* Byte value: 0xf9 */ + {{0xca, 0x13, 0xed, 0xc8, 0x71, 0xc8, 0xa9, 0xce,}}, /* Byte value: 0xfa */ + {{0x3d, 0xbc, 0xb0, 0x51, 0xc1, 0x51, 0x76, 0xe5,}}, /* Byte value: 0xfb */ + {{0x2e, 0x87, 0x62, 0xef, 0x91, 0xef, 0xb9, 0x6f,}}, /* Byte value: 0xfc */ + {{0x72, 0x4a, 0xa6, 0xf2, 0x70, 0xf2, 0x08, 0xb1,}}, /* Byte value: 0xfd */ + {{0x42, 0x29, 0xb8, 0xd1, 0xd6, 0xd1, 0x15, 0xa7,}}, /* Byte value: 0xfe */ + {{0x65, 0xe8, 0x97, 0x64, 0xd9, 0x64, 0xb5, 0x67,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 4 */ + {{0x04, 0xc3, 0xb6, 0x81, 0x36, 0x3e, 0x4d, 0xde,}}, /* Byte value: 0x00 */ + {{0xc5, 0x34, 0x29, 0xba, 0x33, 0x7a, 0x21, 0x8a,}}, /* Byte value: 0x01 */ + {{0xdf, 0x7b, 0x40, 0x9b, 0x9c, 0xe1, 0x8b, 0x64,}}, /* Byte value: 0x02 */ + {{0xb7, 0x84, 0x27, 0x1f, 0x65, 0xc8, 0x66, 0x5a,}}, /* Byte value: 0x03 */ + {{0x1e, 0x8c, 0xdf, 0xa0, 0x99, 0xa5, 0xe7, 0x30,}}, /* Byte value: 0x04 */ + {{0x26, 0x94, 0x14, 0xa2, 0x5e, 0x12, 0xa7, 0x8e,}}, /* Byte value: 0x05 */ + {{0xff, 0xac, 0xb9, 0x19, 0xef, 0xd2, 0xa6, 0x5b,}}, /* Byte value: 0x06 */ + {{0xc8, 0xf2, 0xfc, 0x4b, 0x85, 0xd6, 0x74, 0xfd,}}, /* Byte value: 0x07 */ + {{0x7b, 0xb5, 0x6d, 0xd5, 0xd6, 0x20, 0x5f, 0x79,}}, /* Byte value: 0x08 */ + {{0x7a, 0xf5, 0xa1, 0x64, 0x3a, 0xce, 0xdd, 0xaf,}}, /* Byte value: 0x09 */ + {{0xe8, 0x25, 0x05, 0xc9, 0xf6, 0xe5, 0x59, 0xc2,}}, /* Byte value: 0x0a */ + {{0xa0, 0x0d, 0x9b, 0xcf, 0x7c, 0xff, 0x99, 0xc3,}}, /* Byte value: 0x0b */ + {{0x3e, 0x5b, 0x26, 0x22, 0xea, 0x96, 0xca, 0x0f,}}, /* Byte value: 0x0c */ + {{0xe9, 0x65, 0xc9, 0x78, 0x1a, 0x0b, 0xdb, 0x14,}}, /* Byte value: 0x0d */ + {{0x09, 0x05, 0x63, 0x70, 0x80, 0x92, 0x18, 0xa9,}}, /* Byte value: 0x0e */ + {{0x18, 0xcf, 0x32, 0x80, 0xb4, 0x84, 0x6d, 0x81,}}, /* Byte value: 0x0f */ + {{0xba, 0x42, 0xf2, 0xee, 0xd3, 0x64, 0x33, 0x2d,}}, /* Byte value: 0x10 */ + {{0x83, 0x1a, 0xf5, 0x5d, 0xf8, 0x3d, 0xf1, 0x45,}}, /* Byte value: 0x11 */ + {{0x1f, 0xcc, 0x13, 0x11, 0x75, 0x4b, 0x65, 0xe6,}}, /* Byte value: 0x12 */ + {{0x33, 0x9d, 0xf3, 0xd3, 0x5c, 0x3a, 0x9f, 0x78,}}, /* Byte value: 0x13 */ + {{0xb1, 0xc7, 0xca, 0x3f, 0x48, 0xe9, 0xec, 0xeb,}}, /* Byte value: 0x14 */ + {{0xb6, 0xc4, 0xeb, 0xae, 0x89, 0x26, 0xe4, 0x8c,}}, /* Byte value: 0x15 */ + {{0x46, 0x2e, 0xdc, 0xe7, 0xcb, 0x47, 0xd0, 0xcf,}}, /* Byte value: 0x16 */ + {{0x78, 0x75, 0xfa, 0xc5, 0x21, 0xd1, 0x1a, 0xc0,}}, /* Byte value: 0x17 */ + {{0x5b, 0x62, 0x94, 0x57, 0xa5, 0x13, 0x72, 0x46,}}, /* Byte value: 0x18 */ + {{0x80, 0xda, 0x62, 0x4d, 0x0f, 0xcc, 0xb4, 0xfc,}}, /* Byte value: 0x19 */ + {{0x8c, 0x5c, 0x7b, 0x0d, 0x55, 0x8e, 0x63, 0x5d,}}, /* Byte value: 0x1a */ + {{0xeb, 0xe5, 0x92, 0xd9, 0x01, 0x14, 0x1c, 0x7b,}}, /* Byte value: 0x1b */ + {{0x2d, 0x11, 0x2c, 0x73, 0xc5, 0x9f, 0x78, 0x48,}}, /* Byte value: 0x1c */ + {{0xfb, 0x6f, 0x0f, 0x98, 0xd9, 0xec, 0xeb, 0x85,}}, /* Byte value: 0x1d */ + {{0xd9, 0x38, 0xad, 0xbb, 0xb1, 0xc0, 0x01, 0xd5,}}, /* Byte value: 0x1e */ + {{0xe0, 0x60, 0xaa, 0x08, 0x9a, 0x99, 0xc3, 0xbd,}}, /* Byte value: 0x1f */ + {{0x9e, 0x56, 0xbd, 0xed, 0x96, 0x69, 0x53, 0xcc,}}, /* Byte value: 0x20 */ + {{0x36, 0x1e, 0x89, 0xe3, 0x86, 0xea, 0x50, 0x70,}}, /* Byte value: 0x21 */ + {{0x42, 0xed, 0x6a, 0x66, 0xfd, 0x79, 0x9d, 0x11,}}, /* Byte value: 0x22 */ + {{0x43, 0xad, 0xa6, 0xd7, 0x11, 0x97, 0x1f, 0xc7,}}, /* Byte value: 0x23 */ + {{0xde, 0x3b, 0x8c, 0x2a, 0x70, 0x0f, 0x09, 0xb2,}}, /* Byte value: 0x24 */ + {{0xaf, 0x4b, 0x15, 0x9f, 0xd1, 0x4c, 0x0b, 0xdb,}}, /* Byte value: 0x25 */ + {{0x56, 0xa4, 0x41, 0xa6, 0x13, 0xbf, 0x27, 0x31,}}, /* Byte value: 0x26 */ + {{0xdb, 0xb8, 0xf6, 0x1a, 0xaa, 0xdf, 0xc6, 0xba,}}, /* Byte value: 0x27 */ + {{0x70, 0x30, 0x55, 0x04, 0x4d, 0xad, 0x80, 0xbf,}}, /* Byte value: 0x28 */ + {{0x3f, 0x1b, 0xea, 0x93, 0x06, 0x78, 0x48, 0xd9,}}, /* Byte value: 0x29 */ + {{0x77, 0x33, 0x74, 0x95, 0x8c, 0x62, 0x88, 0xd8,}}, /* Byte value: 0x2a */ + {{0x75, 0xb3, 0x2f, 0x34, 0x97, 0x7d, 0x4f, 0xb7,}}, /* Byte value: 0x2b */ + {{0x87, 0xd9, 0x43, 0xdc, 0xce, 0x03, 0xbc, 0x9b,}}, /* Byte value: 0x2c */ + {{0x93, 0x90, 0x68, 0x1c, 0x20, 0xc5, 0x06, 0xbb,}}, /* Byte value: 0x2d */ + {{0x1d, 0x4c, 0x48, 0xb0, 0x6e, 0x54, 0xa2, 0x89,}}, /* Byte value: 0x2e */ + {{0xfd, 0x2c, 0xe2, 0xb8, 0xf4, 0xcd, 0x61, 0x34,}}, /* Byte value: 0x2f */ + {{0x9a, 0x95, 0x0b, 0x6c, 0xa0, 0x57, 0x1e, 0x12,}}, /* Byte value: 0x30 */ + {{0xea, 0xa5, 0x5e, 0x68, 0xed, 0xfa, 0x9e, 0xad,}}, /* Byte value: 0x31 */ + {{0xe5, 0xe3, 0xd0, 0x38, 0x40, 0x49, 0x0c, 0xb5,}}, /* Byte value: 0x32 */ + {{0x55, 0x64, 0xd6, 0xb6, 0xe4, 0x4e, 0x62, 0x88,}}, /* Byte value: 0x33 */ + {{0x4d, 0xab, 0xe4, 0x36, 0x50, 0xca, 0x0f, 0x09,}}, /* Byte value: 0x34 */ + {{0x2f, 0x91, 0x77, 0xd2, 0xde, 0x80, 0xbf, 0x27,}}, /* Byte value: 0x35 */ + {{0x8e, 0xdc, 0x20, 0xac, 0x4e, 0x91, 0xa4, 0x32,}}, /* Byte value: 0x36 */ + {{0xab, 0x88, 0xa3, 0x1e, 0xe7, 0x72, 0x46, 0x05,}}, /* Byte value: 0x37 */ + {{0xec, 0xe6, 0xb3, 0x48, 0xc0, 0xdb, 0x14, 0x1c,}}, /* Byte value: 0x38 */ + {{0x64, 0x79, 0x7e, 0xc4, 0xa3, 0x6b, 0x3a, 0x9f,}}, /* Byte value: 0x39 */ + {{0xb3, 0x47, 0x91, 0x9e, 0x53, 0xf6, 0x2b, 0x84,}}, /* Byte value: 0x3a */ + {{0xd5, 0xbe, 0xb4, 0xfb, 0xeb, 0x82, 0xd6, 0x74,}}, /* Byte value: 0x3b */ + {{0x91, 0x10, 0x33, 0xbd, 0x3b, 0xda, 0xc1, 0xd4,}}, /* Byte value: 0x3c */ + {{0x5e, 0xe1, 0xee, 0x67, 0x7f, 0xc3, 0xbd, 0x4e,}}, /* Byte value: 0x3d */ + {{0x21, 0x97, 0x35, 0x33, 0x9f, 0xdd, 0xaf, 0xe9,}}, /* Byte value: 0x3e */ + {{0x49, 0x68, 0x52, 0xb7, 0x66, 0xf4, 0x42, 0xd7,}}, /* Byte value: 0x3f */ + {{0x5f, 0xa1, 0x22, 0xd6, 0x93, 0x2d, 0x3f, 0x98,}}, /* Byte value: 0x40 */ + {{0x65, 0x39, 0xb2, 0x75, 0x4f, 0x85, 0xb8, 0x49,}}, /* Byte value: 0x41 */ + {{0x53, 0x27, 0x3b, 0x96, 0xc9, 0x6f, 0xe8, 0x39,}}, /* Byte value: 0x42 */ + {{0x27, 0xd4, 0xd8, 0x13, 0xb2, 0xfc, 0x25, 0x58,}}, /* Byte value: 0x43 */ + {{0xcc, 0x31, 0x4a, 0xca, 0xb3, 0xe8, 0x39, 0x23,}}, /* Byte value: 0x44 */ + {{0x61, 0xfa, 0x04, 0xf4, 0x79, 0xbb, 0xf5, 0x97,}}, /* Byte value: 0x45 */ + {{0x82, 0x5a, 0x39, 0xec, 0x14, 0xd3, 0x73, 0x93,}}, /* Byte value: 0x46 */ + {{0xcf, 0xf1, 0xdd, 0xda, 0x44, 0x19, 0x7c, 0x9a,}}, /* Byte value: 0x47 */ + {{0xfa, 0x2f, 0xc3, 0x29, 0x35, 0x02, 0x69, 0x53,}}, /* Byte value: 0x48 */ + {{0xbf, 0xc1, 0x88, 0xde, 0x09, 0xb4, 0xfc, 0x25,}}, /* Byte value: 0x49 */ + {{0xca, 0x72, 0xa7, 0xea, 0x9e, 0xc9, 0xb3, 0x92,}}, /* Byte value: 0x4a */ + {{0x4e, 0x6b, 0x73, 0x26, 0xa7, 0x3b, 0x4a, 0xb0,}}, /* Byte value: 0x4b */ + {{0x97, 0x53, 0xde, 0x9d, 0x16, 0xfb, 0x4b, 0x65,}}, /* Byte value: 0x4c */ + {{0x9b, 0xd5, 0xc7, 0xdd, 0x4c, 0xb9, 0x9c, 0xc4,}}, /* Byte value: 0x4d */ + {{0x8d, 0x1c, 0xb7, 0xbc, 0xb9, 0x60, 0xe1, 0x8b,}}, /* Byte value: 0x4e */ + {{0x68, 0xff, 0x67, 0x84, 0xf9, 0x29, 0xed, 0x3e,}}, /* Byte value: 0x4f */ + {{0x15, 0x09, 0xe7, 0x71, 0x02, 0x28, 0x38, 0xf6,}}, /* Byte value: 0x50 */ + {{0xfc, 0x6c, 0x2e, 0x09, 0x18, 0x23, 0xe3, 0xe2,}}, /* Byte value: 0x51 */ + {{0xfe, 0xec, 0x75, 0xa8, 0x03, 0x3c, 0x24, 0x8d,}}, /* Byte value: 0x52 */ + {{0x58, 0xa2, 0x03, 0x47, 0x52, 0xe2, 0x37, 0xff,}}, /* Byte value: 0x53 */ + {{0x12, 0x0a, 0xc6, 0xe0, 0xc3, 0xe7, 0x30, 0x91,}}, /* Byte value: 0x54 */ + {{0x1b, 0x0f, 0xa5, 0x90, 0x43, 0x75, 0x28, 0x38,}}, /* Byte value: 0x55 */ + {{0x10, 0x8a, 0x9d, 0x41, 0xd8, 0xf8, 0xf7, 0xfe,}}, /* Byte value: 0x56 */ + {{0xc1, 0xf7, 0x9f, 0x3b, 0x05, 0x44, 0x6c, 0x54,}}, /* Byte value: 0x57 */ + {{0xe2, 0xe0, 0xf1, 0xa9, 0x81, 0x86, 0x04, 0xd2,}}, /* Byte value: 0x58 */ + {{0x19, 0x8f, 0xfe, 0x31, 0x58, 0x6a, 0xef, 0x57,}}, /* Byte value: 0x59 */ + {{0x52, 0x67, 0xf7, 0x27, 0x25, 0x81, 0x6a, 0xef,}}, /* Byte value: 0x5a */ + {{0xef, 0x26, 0x24, 0x58, 0x37, 0x2a, 0x51, 0xa5,}}, /* Byte value: 0x5b */ + {{0xdc, 0xbb, 0xd7, 0x8b, 0x6b, 0x10, 0xce, 0xdd,}}, /* Byte value: 0x5c */ + {{0xf0, 0xea, 0x37, 0x49, 0x42, 0x61, 0x34, 0x43,}}, /* Byte value: 0x5d */ + {{0x3c, 0xdb, 0x7d, 0x83, 0xf1, 0x89, 0x0d, 0x60,}}, /* Byte value: 0x5e */ + {{0x9c, 0xd6, 0xe6, 0x4c, 0x8d, 0x76, 0x94, 0xa3,}}, /* Byte value: 0x5f */ + {{0xbe, 0x81, 0x44, 0x6f, 0xe5, 0x5a, 0x7e, 0xf3,}}, /* Byte value: 0x60 */ + {{0x38, 0x18, 0xcb, 0x02, 0xc7, 0xb7, 0x40, 0xbe,}}, /* Byte value: 0x61 */ + {{0x2b, 0x52, 0xc1, 0x53, 0xe8, 0xbe, 0xf2, 0xf9,}}, /* Byte value: 0x62 */ + {{0xc9, 0xb2, 0x30, 0xfa, 0x69, 0x38, 0xf6, 0x2b,}}, /* Byte value: 0x63 */ + {{0x24, 0x14, 0x4f, 0x03, 0x45, 0x0d, 0x60, 0xe1,}}, /* Byte value: 0x64 */ + {{0x98, 0x15, 0x50, 0xcd, 0xbb, 0x48, 0xd9, 0x7d,}}, /* Byte value: 0x65 */ + {{0x30, 0x5d, 0x64, 0xc3, 0xab, 0xcb, 0xda, 0xc1,}}, /* Byte value: 0x66 */ + {{0x0c, 0x86, 0x19, 0x40, 0x5a, 0x42, 0xd7, 0xa1,}}, /* Byte value: 0x67 */ + {{0x69, 0xbf, 0xab, 0x35, 0x15, 0xc7, 0x6f, 0xe8,}}, /* Byte value: 0x68 */ + {{0x54, 0x24, 0x1a, 0x07, 0x08, 0xa0, 0xe0, 0x5e,}}, /* Byte value: 0x69 */ + {{0xee, 0x66, 0xe8, 0xe9, 0xdb, 0xc4, 0xd3, 0x73,}}, /* Byte value: 0x6a */ + {{0xb5, 0x04, 0x7c, 0xbe, 0x7e, 0xd7, 0xa1, 0x35,}}, /* Byte value: 0x6b */ + {{0x4f, 0x2b, 0xbf, 0x97, 0x4b, 0xd5, 0xc8, 0x66,}}, /* Byte value: 0x6c */ + {{0x39, 0x58, 0x07, 0xb3, 0x2b, 0x59, 0xc2, 0x68,}}, /* Byte value: 0x6d */ + {{0x6a, 0x7f, 0x3c, 0x25, 0xe2, 0x36, 0x2a, 0x51,}}, /* Byte value: 0x6e */ + {{0x1c, 0x0c, 0x84, 0x01, 0x82, 0xba, 0x20, 0x5f,}}, /* Byte value: 0x6f */ + {{0x89, 0xdf, 0x01, 0x3d, 0x8f, 0x5e, 0xac, 0x55,}}, /* Byte value: 0x70 */ + {{0x66, 0xf9, 0x25, 0x65, 0xb8, 0x74, 0xfd, 0xf0,}}, /* Byte value: 0x71 */ + {{0xa5, 0x8e, 0xe1, 0xff, 0xa6, 0x2f, 0x56, 0xcb,}}, /* Byte value: 0x72 */ + {{0xe4, 0xa3, 0x1c, 0x89, 0xac, 0xa7, 0x8e, 0x63,}}, /* Byte value: 0x73 */ + {{0x72, 0xb0, 0x0e, 0xa5, 0x56, 0xb2, 0x47, 0xd0,}}, /* Byte value: 0x74 */ + {{0xf6, 0xa9, 0xda, 0x69, 0x6f, 0x40, 0xbe, 0xf2,}}, /* Byte value: 0x75 */ + {{0x14, 0x49, 0x2b, 0xc0, 0xee, 0xc6, 0xba, 0x20,}}, /* Byte value: 0x76 */ + {{0x02, 0x80, 0x5b, 0xa1, 0x1b, 0x1f, 0xc7, 0x6f,}}, /* Byte value: 0x77 */ + {{0x50, 0xe7, 0xac, 0x86, 0x3e, 0x9e, 0xad, 0x80,}}, /* Byte value: 0x78 */ + {{0xbd, 0x41, 0xd3, 0x7f, 0x12, 0xab, 0x3b, 0x4a,}}, /* Byte value: 0x79 */ + {{0x9f, 0x16, 0x71, 0x5c, 0x7a, 0x87, 0xd1, 0x1a,}}, /* Byte value: 0x7a */ + {{0xe3, 0xa0, 0x3d, 0x18, 0x6d, 0x68, 0x86, 0x04,}}, /* Byte value: 0x7b */ + {{0x05, 0x83, 0x7a, 0x30, 0xda, 0xd0, 0xcf, 0x08,}}, /* Byte value: 0x7c */ + {{0x07, 0x03, 0x21, 0x91, 0xc1, 0xcf, 0x08, 0x67,}}, /* Byte value: 0x7d */ + {{0x88, 0x9f, 0xcd, 0x8c, 0x63, 0xb0, 0x2e, 0x83,}}, /* Byte value: 0x7e */ + {{0xcb, 0x32, 0x6b, 0x5b, 0x72, 0x27, 0x31, 0x44,}}, /* Byte value: 0x7f */ + {{0x3a, 0x98, 0x90, 0xa3, 0xdc, 0xa8, 0x87, 0xd1,}}, /* Byte value: 0x80 */ + {{0x85, 0x59, 0x18, 0x7d, 0xd5, 0x1c, 0x7b, 0xf4,}}, /* Byte value: 0x81 */ + {{0x41, 0x2d, 0xfd, 0x76, 0x0a, 0x88, 0xd8, 0xa8,}}, /* Byte value: 0x82 */ + {{0x2a, 0x12, 0x0d, 0xe2, 0x04, 0x50, 0x70, 0x2f,}}, /* Byte value: 0x83 */ + {{0x92, 0xd0, 0xa4, 0xad, 0xcc, 0x2b, 0x84, 0x6d,}}, /* Byte value: 0x84 */ + {{0xb9, 0x82, 0x65, 0xfe, 0x24, 0x95, 0x76, 0x94,}}, /* Byte value: 0x85 */ + {{0xe6, 0x23, 0x47, 0x28, 0xb7, 0xb8, 0x49, 0x0c,}}, /* Byte value: 0x86 */ + {{0xf2, 0x6a, 0x6c, 0xe8, 0x59, 0x7e, 0xf3, 0x2c,}}, /* Byte value: 0x87 */ + {{0x28, 0x92, 0x56, 0x43, 0x1f, 0x4f, 0xb7, 0x40,}}, /* Byte value: 0x88 */ + {{0x7d, 0xf6, 0x80, 0xf5, 0xfb, 0x01, 0xd5, 0xc8,}}, /* Byte value: 0x89 */ + {{0xbb, 0x02, 0x3e, 0x5f, 0x3f, 0x8a, 0xb1, 0xfb,}}, /* Byte value: 0x8a */ + {{0xf3, 0x2a, 0xa0, 0x59, 0xb5, 0x90, 0x71, 0xfa,}}, /* Byte value: 0x8b */ + {{0xe7, 0x63, 0x8b, 0x99, 0x5b, 0x56, 0xcb, 0xda,}}, /* Byte value: 0x8c */ + {{0xad, 0xcb, 0x4e, 0x3e, 0xca, 0x53, 0xcc, 0xb4,}}, /* Byte value: 0x8d */ + {{0x0e, 0x06, 0x42, 0xe1, 0x41, 0x5d, 0x10, 0xce,}}, /* Byte value: 0x8e */ + {{0x76, 0x73, 0xb8, 0x24, 0x60, 0x8c, 0x0a, 0x0e,}}, /* Byte value: 0x8f */ + {{0x3b, 0xd8, 0x5c, 0x12, 0x30, 0x46, 0x05, 0x07,}}, /* Byte value: 0x90 */ + {{0x6d, 0x7c, 0x1d, 0xb4, 0x23, 0xf9, 0x22, 0x36,}}, /* Byte value: 0x91 */ + {{0x20, 0xd7, 0xf9, 0x82, 0x73, 0x33, 0x2d, 0x3f,}}, /* Byte value: 0x92 */ + {{0xa9, 0x08, 0xf8, 0xbf, 0xfc, 0x6d, 0x81, 0x6a,}}, /* Byte value: 0x93 */ + {{0x0b, 0x85, 0x38, 0xd1, 0x9b, 0x8d, 0xdf, 0xc6,}}, /* Byte value: 0x94 */ + {{0xce, 0xb1, 0x11, 0x6b, 0xa8, 0xf7, 0xfe, 0x4c,}}, /* Byte value: 0x95 */ + {{0x8f, 0x9c, 0xec, 0x1d, 0xa2, 0x7f, 0x26, 0xe4,}}, /* Byte value: 0x96 */ + {{0x94, 0x93, 0x49, 0x8d, 0xe1, 0x0a, 0x0e, 0xdc,}}, /* Byte value: 0x97 */ + {{0x4c, 0xeb, 0x28, 0x87, 0xbc, 0x24, 0x8d, 0xdf,}}, /* Byte value: 0x98 */ + {{0x29, 0xd2, 0x9a, 0xf2, 0xf3, 0xa1, 0x35, 0x96,}}, /* Byte value: 0x99 */ + {{0x5a, 0x22, 0x58, 0xe6, 0x49, 0xfd, 0xf0, 0x90,}}, /* Byte value: 0x9a */ + {{0xb4, 0x44, 0xb0, 0x0f, 0x92, 0x39, 0x23, 0xe3,}}, /* Byte value: 0x9b */ + {{0x6e, 0xbc, 0x8a, 0xa4, 0xd4, 0x08, 0x67, 0x8f,}}, /* Byte value: 0x9c */ + {{0x1a, 0x4f, 0x69, 0x21, 0xaf, 0x9b, 0xaa, 0xee,}}, /* Byte value: 0x9d */ + {{0xf7, 0xe9, 0x16, 0xd8, 0x83, 0xae, 0x3c, 0x24,}}, /* Byte value: 0x9e */ + {{0x67, 0xb9, 0xe9, 0xd4, 0x54, 0x9a, 0x7f, 0x26,}}, /* Byte value: 0x9f */ + {{0xd4, 0xfe, 0x78, 0x4a, 0x07, 0x6c, 0x54, 0xa2,}}, /* Byte value: 0xa0 */ + {{0xb8, 0xc2, 0xa9, 0x4f, 0xc8, 0x7b, 0xf4, 0x42,}}, /* Byte value: 0xa1 */ + {{0xd8, 0x78, 0x61, 0x0a, 0x5d, 0x2e, 0x83, 0x03,}}, /* Byte value: 0xa2 */ + {{0x8a, 0x1f, 0x96, 0x2d, 0x78, 0xaf, 0xe9, 0xec,}}, /* Byte value: 0xa3 */ + {{0xda, 0xf8, 0x3a, 0xab, 0x46, 0x31, 0x44, 0x6c,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x3d, 0x9b, 0xb1, 0x32, 0x1d, 0x67, 0x8f, 0xb6,}}, /* Byte value: 0xa6 */ + {{0x99, 0x55, 0x9c, 0x7c, 0x57, 0xa6, 0x5b, 0xab,}}, /* Byte value: 0xa7 */ + {{0xd3, 0xfd, 0x59, 0xdb, 0xc6, 0xa3, 0x5c, 0xc5,}}, /* Byte value: 0xa8 */ + {{0x9d, 0x96, 0x2a, 0xfd, 0x61, 0x98, 0x16, 0x75,}}, /* Byte value: 0xa9 */ + {{0x7e, 0x36, 0x17, 0xe5, 0x0c, 0xf0, 0x90, 0x71,}}, /* Byte value: 0xaa */ + {{0x06, 0x43, 0xed, 0x20, 0x2d, 0x21, 0x8a, 0xb1,}}, /* Byte value: 0xab */ + {{0xd1, 0x7d, 0x02, 0x7a, 0xdd, 0xbc, 0x9b, 0xaa,}}, /* Byte value: 0xac */ + {{0xaa, 0xc8, 0x6f, 0xaf, 0x0b, 0x9c, 0xc4, 0xd3,}}, /* Byte value: 0xad */ + {{0xa4, 0xce, 0x2d, 0x4e, 0x4a, 0xc1, 0xd4, 0x1d,}}, /* Byte value: 0xae */ + {{0x03, 0xc0, 0x97, 0x10, 0xf7, 0xf1, 0x45, 0xb9,}}, /* Byte value: 0xaf */ + {{0x23, 0x17, 0x6e, 0x92, 0x84, 0xc2, 0x68, 0x86,}}, /* Byte value: 0xb0 */ + {{0x0a, 0xc5, 0xf4, 0x60, 0x77, 0x63, 0x5d, 0x10,}}, /* Byte value: 0xb1 */ + {{0x7c, 0xb6, 0x4c, 0x44, 0x17, 0xef, 0x57, 0x1e,}}, /* Byte value: 0xb2 */ + {{0x22, 0x57, 0xa2, 0x23, 0x68, 0x2c, 0xea, 0x50,}}, /* Byte value: 0xb3 */ + {{0x37, 0x5e, 0x45, 0x52, 0x6a, 0x04, 0xd2, 0xa6,}}, /* Byte value: 0xb4 */ + {{0x4a, 0xa8, 0xc5, 0xa7, 0x91, 0x05, 0x07, 0x6e,}}, /* Byte value: 0xb5 */ + {{0x2e, 0xd1, 0xbb, 0x63, 0x32, 0x6e, 0x3d, 0xf1,}}, /* Byte value: 0xb6 */ + {{0x25, 0x54, 0x83, 0xb2, 0xa9, 0xe3, 0xe2, 0x37,}}, /* Byte value: 0xb7 */ + {{0xf8, 0xaf, 0x98, 0x88, 0x2e, 0x1d, 0xae, 0x3c,}}, /* Byte value: 0xb8 */ + {{0xdd, 0xfb, 0x1b, 0x3a, 0x87, 0xfe, 0x4c, 0x0b,}}, /* Byte value: 0xb9 */ + {{0x31, 0x1d, 0xa8, 0x72, 0x47, 0x25, 0x58, 0x17,}}, /* Byte value: 0xba */ + {{0x74, 0xf3, 0xe3, 0x85, 0x7b, 0x93, 0xcd, 0x61,}}, /* Byte value: 0xbb */ + {{0x59, 0xe2, 0xcf, 0xf6, 0xbe, 0x0c, 0xb5, 0x29,}}, /* Byte value: 0xbc */ + {{0xcd, 0x71, 0x86, 0x7b, 0x5f, 0x06, 0xbb, 0xf5,}}, /* Byte value: 0xbd */ + {{0x5d, 0x21, 0x79, 0x77, 0x88, 0x32, 0xf8, 0xf7,}}, /* Byte value: 0xbe */ + {{0x08, 0x45, 0xaf, 0xc1, 0x6c, 0x7c, 0x9a, 0x7f,}}, /* Byte value: 0xbf */ + {{0x7f, 0x76, 0xdb, 0x54, 0xe0, 0x1e, 0x12, 0xa7,}}, /* Byte value: 0xc0 */ + {{0xa6, 0x4e, 0x76, 0xef, 0x51, 0xde, 0x13, 0x72,}}, /* Byte value: 0xc1 */ + {{0xf9, 0xef, 0x54, 0x39, 0xc2, 0xf3, 0x2c, 0xea,}}, /* Byte value: 0xc2 */ + {{0x90, 0x50, 0xff, 0x0c, 0xd7, 0x34, 0x43, 0x02,}}, /* Byte value: 0xc3 */ + {{0x0f, 0x46, 0x8e, 0x50, 0xad, 0xb3, 0x92, 0x18,}}, /* Byte value: 0xc4 */ + {{0xb0, 0x87, 0x06, 0x8e, 0xa4, 0x07, 0x6e, 0x3d,}}, /* Byte value: 0xc5 */ + {{0xac, 0x8b, 0x82, 0x8f, 0x26, 0xbd, 0x4e, 0x62,}}, /* Byte value: 0xc6 */ + {{0x60, 0xba, 0xc8, 0x45, 0x95, 0x55, 0x77, 0x41,}}, /* Byte value: 0xc7 */ + {{0x6c, 0x3c, 0xd1, 0x05, 0xcf, 0x17, 0xa0, 0xe0,}}, /* Byte value: 0xc8 */ + {{0x13, 0x4a, 0x0a, 0x51, 0x2f, 0x09, 0xb2, 0x47,}}, /* Byte value: 0xc9 */ + {{0xbc, 0x01, 0x1f, 0xce, 0xfe, 0x45, 0xb9, 0x9c,}}, /* Byte value: 0xca */ + {{0x32, 0xdd, 0x3f, 0x62, 0xb0, 0xd4, 0x1d, 0xae,}}, /* Byte value: 0xcb */ + {{0xf1, 0xaa, 0xfb, 0xf8, 0xae, 0x8f, 0xb6, 0x95,}}, /* Byte value: 0xcc */ + {{0xd6, 0x7e, 0x23, 0xeb, 0x1c, 0x73, 0x93, 0xcd,}}, /* Byte value: 0xcd */ + {{0x44, 0xae, 0x87, 0x46, 0xd0, 0x58, 0x17, 0xa0,}}, /* Byte value: 0xce */ + {{0x62, 0x3a, 0x93, 0xe4, 0x8e, 0x4a, 0xb0, 0x2e,}}, /* Byte value: 0xcf */ + {{0xa8, 0x48, 0x34, 0x0e, 0x10, 0x83, 0x03, 0xbc,}}, /* Byte value: 0xd0 */ + {{0x40, 0x6d, 0x31, 0xc7, 0xe6, 0x66, 0x5a, 0x7e,}}, /* Byte value: 0xd1 */ + {{0x95, 0xd3, 0x85, 0x3c, 0x0d, 0xe4, 0x8c, 0x0a,}}, /* Byte value: 0xd2 */ + {{0x11, 0xca, 0x51, 0xf0, 0x34, 0x16, 0x75, 0x28,}}, /* Byte value: 0xd3 */ + {{0x8b, 0x5f, 0x5a, 0x9c, 0x94, 0x41, 0x6b, 0x3a,}}, /* Byte value: 0xd4 */ + {{0x01, 0x40, 0xcc, 0xb1, 0xec, 0xee, 0x82, 0xd6,}}, /* Byte value: 0xd5 */ + {{0x0d, 0xc6, 0xd5, 0xf1, 0xb6, 0xac, 0x55, 0x77,}}, /* Byte value: 0xd6 */ + {{0xe1, 0x20, 0x66, 0xb9, 0x76, 0x77, 0x41, 0x6b,}}, /* Byte value: 0xd7 */ + {{0x6b, 0x3f, 0xf0, 0x94, 0x0e, 0xd8, 0xa8, 0x87,}}, /* Byte value: 0xd8 */ + {{0xc2, 0x37, 0x08, 0x2b, 0xf2, 0xb5, 0x29, 0xed,}}, /* Byte value: 0xd9 */ + {{0x5c, 0x61, 0xb5, 0xc6, 0x64, 0xdc, 0x7a, 0x21,}}, /* Byte value: 0xda */ + {{0xc7, 0xb4, 0x72, 0x1b, 0x28, 0x65, 0xe6, 0xe5,}}, /* Byte value: 0xdb */ + {{0x84, 0x19, 0xd4, 0xcc, 0x39, 0xf2, 0xf9, 0x22,}}, /* Byte value: 0xdc */ + {{0x45, 0xee, 0x4b, 0xf7, 0x3c, 0xb6, 0x95, 0x76,}}, /* Byte value: 0xdd */ + {{0x79, 0x35, 0x36, 0x74, 0xcd, 0x3f, 0x98, 0x16,}}, /* Byte value: 0xde */ + {{0x4b, 0xe8, 0x09, 0x16, 0x7d, 0xeb, 0x85, 0xb8,}}, /* Byte value: 0xdf */ + {{0x48, 0x28, 0x9e, 0x06, 0x8a, 0x1a, 0xc0, 0x01,}}, /* Byte value: 0xe0 */ + {{0x6f, 0xfc, 0x46, 0x15, 0x38, 0xe6, 0xe5, 0x59,}}, /* Byte value: 0xe1 */ + {{0xa7, 0x0e, 0xba, 0x5e, 0xbd, 0x30, 0x91, 0xa4,}}, /* Byte value: 0xe2 */ + {{0xa2, 0x8d, 0xc0, 0x6e, 0x67, 0xe0, 0x5e, 0xac,}}, /* Byte value: 0xe3 */ + {{0xc0, 0xb7, 0x53, 0x8a, 0xe9, 0xaa, 0xee, 0x82,}}, /* Byte value: 0xe4 */ + {{0x2c, 0x51, 0xe0, 0xc2, 0x29, 0x71, 0xfa, 0x9e,}}, /* Byte value: 0xe5 */ + {{0x81, 0x9a, 0xae, 0xfc, 0xe3, 0x22, 0x36, 0x2a,}}, /* Byte value: 0xe6 */ + {{0xd0, 0x3d, 0xce, 0xcb, 0x31, 0x52, 0x19, 0x7c,}}, /* Byte value: 0xe7 */ + {{0x17, 0x89, 0xbc, 0xd0, 0x19, 0x37, 0xff, 0x99,}}, /* Byte value: 0xe8 */ + {{0xa3, 0xcd, 0x0c, 0xdf, 0x8b, 0x0e, 0xdc, 0x7a,}}, /* Byte value: 0xe9 */ + {{0xd2, 0xbd, 0x95, 0x6a, 0x2a, 0x4d, 0xde, 0x13,}}, /* Byte value: 0xea */ + {{0x57, 0xe4, 0x8d, 0x17, 0xff, 0x51, 0xa5, 0xe7,}}, /* Byte value: 0xeb */ + {{0x71, 0x70, 0x99, 0xb5, 0xa1, 0x43, 0x02, 0x69,}}, /* Byte value: 0xec */ + {{0xa1, 0x4d, 0x57, 0x7e, 0x90, 0x11, 0x1b, 0x15,}}, /* Byte value: 0xed */ + {{0xc3, 0x77, 0xc4, 0x9a, 0x1e, 0x5b, 0xab, 0x3b,}}, /* Byte value: 0xee */ + {{0x51, 0xa7, 0x60, 0x37, 0xd2, 0x70, 0x2f, 0x56,}}, /* Byte value: 0xef */ + {{0x35, 0xde, 0x1e, 0xf3, 0x71, 0x1b, 0x15, 0xc9,}}, /* Byte value: 0xf0 */ + {{0x47, 0x6e, 0x10, 0x56, 0x27, 0xa9, 0x52, 0x19,}}, /* Byte value: 0xf1 */ + {{0xf5, 0x69, 0x4d, 0x79, 0x98, 0xb1, 0xfb, 0x4b,}}, /* Byte value: 0xf2 */ + {{0xb2, 0x07, 0x5d, 0x2f, 0xbf, 0x18, 0xa9, 0x52,}}, /* Byte value: 0xf3 */ + {{0xd7, 0x3e, 0xef, 0x5a, 0xf0, 0x9d, 0x11, 0x1b,}}, /* Byte value: 0xf4 */ + {{0x16, 0xc9, 0x70, 0x61, 0xf5, 0xd9, 0x7d, 0x4f,}}, /* Byte value: 0xf5 */ + {{0x86, 0x99, 0x8f, 0x6d, 0x22, 0xed, 0x3e, 0x4d,}}, /* Byte value: 0xf6 */ + {{0x73, 0xf0, 0xc2, 0x14, 0xba, 0x5c, 0xc5, 0x06,}}, /* Byte value: 0xf7 */ + {{0xc4, 0x74, 0xe5, 0x0b, 0xdf, 0x94, 0xa3, 0x5c,}}, /* Byte value: 0xf8 */ + {{0x34, 0x9e, 0xd2, 0x42, 0x9d, 0xf5, 0x97, 0x1f,}}, /* Byte value: 0xf9 */ + {{0xc6, 0xf4, 0xbe, 0xaa, 0xc4, 0x8b, 0x64, 0x33,}}, /* Byte value: 0xfa */ + {{0x96, 0x13, 0x12, 0x2c, 0xfa, 0x15, 0xc9, 0xb3,}}, /* Byte value: 0xfb */ + {{0xed, 0xa6, 0x7f, 0xf9, 0x2c, 0x35, 0x96, 0xca,}}, /* Byte value: 0xfc */ + {{0xf4, 0x29, 0x81, 0xc8, 0x74, 0x5f, 0x79, 0x9d,}}, /* Byte value: 0xfd */ + {{0xae, 0x0b, 0xd9, 0x2e, 0x3d, 0xa2, 0x89, 0x0d,}}, /* Byte value: 0xfe */ + {{0x63, 0x7a, 0x5f, 0x55, 0x62, 0xa4, 0x32, 0xf8,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 5 */ + {{0x79, 0x80, 0xab, 0xe7, 0xa9, 0x6f, 0x50, 0x97,}}, /* Byte value: 0x00 */ + {{0x91, 0x1a, 0x97, 0x16, 0x14, 0x45, 0x9f, 0x6e,}}, /* Byte value: 0x01 */ + {{0x99, 0xdc, 0x5f, 0x93, 0xd1, 0x32, 0x94, 0x30,}}, /* Byte value: 0x02 */ + {{0xb9, 0x42, 0xf9, 0xc2, 0x43, 0x2d, 0xb8, 0x8b,}}, /* Byte value: 0x03 */ + {{0x71, 0x46, 0x63, 0x62, 0x6c, 0x18, 0x5b, 0xc9,}}, /* Byte value: 0x04 */ + {{0xea, 0x4a, 0x0e, 0x41, 0x1d, 0x47, 0xbd, 0x0f,}}, /* Byte value: 0x05 */ + {{0xd7, 0x56, 0x4e, 0xa7, 0xd0, 0xcc, 0x51, 0x02,}}, /* Byte value: 0x06 */ + {{0x95, 0x79, 0xf3, 0xb5, 0x97, 0x9f, 0x7b, 0x41,}}, /* Byte value: 0x07 */ + {{0x55, 0xbb, 0xa1, 0x90, 0x7d, 0xdd, 0x93, 0x5d,}}, /* Byte value: 0x08 */ + {{0xda, 0x9b, 0xfb, 0xd9, 0xc6, 0xb6, 0x87, 0x08,}}, /* Byte value: 0x09 */ + {{0xdb, 0xf3, 0xe2, 0x81, 0x96, 0x61, 0xbe, 0x73,}}, /* Byte value: 0x0a */ + {{0xb5, 0xe7, 0x55, 0xe4, 0x05, 0x80, 0x57, 0xfa,}}, /* Byte value: 0x0b */ + {{0x3f, 0xcc, 0x72, 0x56, 0x6d, 0xe6, 0x9e, 0xfb,}}, /* Byte value: 0x0c */ + {{0x54, 0xd3, 0xb8, 0xc8, 0x2d, 0x0a, 0xaa, 0x26,}}, /* Byte value: 0x0d */ + {{0x7d, 0xe3, 0xcf, 0x44, 0x2a, 0xb5, 0xb4, 0xb8,}}, /* Byte value: 0x0e */ + {{0xd5, 0x86, 0x7c, 0x17, 0x70, 0xa1, 0x23, 0xf4,}}, /* Byte value: 0x0f */ + {{0xbd, 0x21, 0x9d, 0x61, 0xc0, 0xf7, 0x5c, 0xa4,}}, /* Byte value: 0x10 */ + {{0xa9, 0x0d, 0xaa, 0x0b, 0x0a, 0xc3, 0xae, 0x37,}}, /* Byte value: 0x11 */ + {{0xfe, 0x66, 0x39, 0x2b, 0xd7, 0x73, 0x4f, 0x9c,}}, /* Byte value: 0x12 */ + {{0x3b, 0xaf, 0x16, 0xf5, 0xee, 0x3c, 0x7a, 0xd4,}}, /* Byte value: 0x13 */ + {{0x1d, 0x82, 0xe6, 0xb7, 0x5f, 0x94, 0xc0, 0xb6,}}, /* Byte value: 0x14 */ + {{0x36, 0x62, 0xa3, 0x8b, 0xf8, 0x46, 0xac, 0xde,}}, /* Byte value: 0x15 */ + {{0x38, 0x17, 0x3d, 0x1d, 0x1e, 0x86, 0x31, 0x59,}}, /* Byte value: 0x16 */ + {{0x07, 0xdb, 0x4f, 0x4b, 0x73, 0x60, 0xaf, 0xa2,}}, /* Byte value: 0x17 */ + {{0x1b, 0x31, 0xb0, 0xa4, 0x7c, 0x23, 0x56, 0x6f,}}, /* Byte value: 0x18 */ + {{0xfb, 0x6d, 0x44, 0xd0, 0x04, 0x7e, 0x92, 0xc8,}}, /* Byte value: 0x19 */ + {{0x70, 0x2e, 0x7a, 0x3a, 0x3c, 0xcf, 0x62, 0xb2,}}, /* Byte value: 0x1a */ + {{0x89, 0x93, 0x0c, 0x5a, 0x98, 0xdc, 0x82, 0x8c,}}, /* Byte value: 0x1b */ + {{0x4a, 0xe9, 0x75, 0x97, 0x82, 0x24, 0x21, 0x1d,}}, /* Byte value: 0x1c */ + {{0xae, 0xd6, 0xe5, 0x40, 0x79, 0xa3, 0x01, 0x95,}}, /* Byte value: 0x1d */ + {{0x3d, 0x1c, 0x40, 0xe6, 0xcd, 0x8b, 0xec, 0x0d,}}, /* Byte value: 0x1e */ + {{0x29, 0x30, 0x77, 0x8c, 0x07, 0xbf, 0x1e, 0x9e,}}, /* Byte value: 0x1f */ + {{0x8a, 0x2b, 0x27, 0xb2, 0x68, 0x66, 0xc9, 0x01,}}, /* Byte value: 0x20 */ + {{0xcd, 0x0f, 0xe7, 0x5b, 0xfc, 0x38, 0x3e, 0x16,}}, /* Byte value: 0x21 */ + {{0x41, 0x97, 0x96, 0xfa, 0xb7, 0xe9, 0x61, 0xce,}}, /* Byte value: 0x22 */ + {{0xce, 0xb7, 0xcc, 0xb3, 0x0c, 0x82, 0x75, 0x9b,}}, /* Byte value: 0x23 */ + {{0x16, 0xfc, 0x05, 0xda, 0x6a, 0x59, 0x80, 0x65,}}, /* Byte value: 0x24 */ + {{0x6c, 0xc4, 0x85, 0xd5, 0x33, 0x8c, 0x9b, 0x7f,}}, /* Byte value: 0x25 */ + {{0x1f, 0x52, 0xd4, 0x07, 0xff, 0xf9, 0xb2, 0x40,}}, /* Byte value: 0x26 */ + {{0xe0, 0x5c, 0xf4, 0x74, 0x78, 0x5d, 0xc4, 0xa7,}}, /* Byte value: 0x27 */ + {{0xf5, 0x18, 0xda, 0x46, 0xe2, 0xbe, 0x0f, 0x4f,}}, /* Byte value: 0x28 */ + {{0xb0, 0xec, 0x28, 0x1f, 0xd6, 0x8d, 0x8a, 0xae,}}, /* Byte value: 0x29 */ + {{0xde, 0xf8, 0x9f, 0x7a, 0x45, 0x6c, 0x63, 0x27,}}, /* Byte value: 0x2a */ + {{0x03, 0xb8, 0x2b, 0xe8, 0xf0, 0xba, 0x4b, 0x8d,}}, /* Byte value: 0x2b */ + {{0xd0, 0x8d, 0x01, 0xec, 0xa3, 0xac, 0xfe, 0xa0,}}, /* Byte value: 0x2c */ + {{0x8e, 0x48, 0x43, 0x11, 0xeb, 0xbc, 0x2d, 0x2e,}}, /* Byte value: 0x2d */ + {{0x23, 0x26, 0x8d, 0xb9, 0x62, 0xa5, 0x67, 0x36,}}, /* Byte value: 0x2e */ + {{0x0a, 0x16, 0xfa, 0x35, 0x65, 0x1a, 0x79, 0xa8,}}, /* Byte value: 0x2f */ + {{0xf3, 0xab, 0x8c, 0x55, 0xc1, 0x09, 0x99, 0x96,}}, /* Byte value: 0x30 */ + {{0x06, 0xb3, 0x56, 0x13, 0x23, 0xb7, 0x96, 0xd9,}}, /* Byte value: 0x31 */ + {{0xdf, 0x90, 0x86, 0x22, 0x15, 0xbb, 0x5a, 0x5c,}}, /* Byte value: 0x32 */ + {{0x4d, 0x32, 0x3a, 0xdc, 0xf1, 0x44, 0x8e, 0xbf,}}, /* Byte value: 0x33 */ + {{0x98, 0xb4, 0x46, 0xcb, 0x81, 0xe5, 0xad, 0x4b,}}, /* Byte value: 0x34 */ + {{0x97, 0xa9, 0xc1, 0x05, 0x37, 0xf2, 0x09, 0xb7,}}, /* Byte value: 0x35 */ + {{0xad, 0x6e, 0xce, 0xa8, 0x89, 0x19, 0x4a, 0x18,}}, /* Byte value: 0x36 */ + {{0x15, 0x44, 0x2e, 0x32, 0x9a, 0xe3, 0xcb, 0xe8,}}, /* Byte value: 0x37 */ + {{0xa2, 0x73, 0x49, 0x66, 0x3f, 0x0e, 0xee, 0xe4,}}, /* Byte value: 0x38 */ + {{0xab, 0xdd, 0x98, 0xbb, 0xaa, 0xae, 0xdc, 0xc1,}}, /* Byte value: 0x39 */ + {{0xc0, 0xc2, 0x52, 0x25, 0xea, 0x42, 0xe8, 0x1c,}}, /* Byte value: 0x3a */ + {{0xb6, 0x5f, 0x7e, 0x0c, 0xf5, 0x3a, 0x1c, 0x77,}}, /* Byte value: 0x3b */ + {{0x53, 0x08, 0xf7, 0x83, 0x5e, 0x6a, 0x05, 0x84,}}, /* Byte value: 0x3c */ + {{0xed, 0x91, 0x41, 0x0a, 0x6e, 0x27, 0x12, 0xad,}}, /* Byte value: 0x3d */ + {{0xc1, 0xaa, 0x4b, 0x7d, 0xba, 0x95, 0xd1, 0x67,}}, /* Byte value: 0x3e */ + {{0xe1, 0x34, 0xed, 0x2c, 0x28, 0x8a, 0xfd, 0xdc,}}, /* Byte value: 0x3f */ + {{0x62, 0xb1, 0x1b, 0x43, 0xd5, 0x4c, 0x06, 0xf8,}}, /* Byte value: 0x40 */ + {{0x24, 0xfd, 0xc2, 0xf2, 0x11, 0xc5, 0xc8, 0x94,}}, /* Byte value: 0x41 */ + {{0xe9, 0xf2, 0x25, 0xa9, 0xed, 0xfd, 0xf6, 0x82,}}, /* Byte value: 0x42 */ + {{0x65, 0x6a, 0x54, 0x08, 0xa6, 0x2c, 0xa9, 0x5a,}}, /* Byte value: 0x43 */ + {{0xec, 0xf9, 0x58, 0x52, 0x3e, 0xf0, 0x2b, 0xd6,}}, /* Byte value: 0x44 */ + {{0x5d, 0x7d, 0x69, 0x15, 0xb8, 0xaa, 0x98, 0x03,}}, /* Byte value: 0x45 */ + {{0x26, 0x2d, 0xf0, 0x42, 0xb1, 0xa8, 0xba, 0x62,}}, /* Byte value: 0x46 */ + {{0xbe, 0x99, 0xb6, 0x89, 0x30, 0x4d, 0x17, 0x29,}}, /* Byte value: 0x47 */ + {{0x21, 0xf6, 0xbf, 0x09, 0xc2, 0xc8, 0x15, 0xc0,}}, /* Byte value: 0x48 */ + {{0x4b, 0x81, 0x6c, 0xcf, 0xd2, 0xf3, 0x18, 0x66,}}, /* Byte value: 0x49 */ + {{0x48, 0x39, 0x47, 0x27, 0x22, 0x49, 0x53, 0xeb,}}, /* Byte value: 0x4a */ + {{0xca, 0xd4, 0xa8, 0x10, 0x8f, 0x58, 0x91, 0xb4,}}, /* Byte value: 0x4b */ + {{0xf7, 0xc8, 0xe8, 0xf6, 0x42, 0xd3, 0x7d, 0xb9,}}, /* Byte value: 0x4c */ + {{0x7c, 0x8b, 0xd6, 0x1c, 0x7a, 0x62, 0x8d, 0xc3,}}, /* Byte value: 0x4d */ + {{0xff, 0x0e, 0x20, 0x73, 0x87, 0xa4, 0x76, 0xe7,}}, /* Byte value: 0x4e */ + {{0x20, 0x9e, 0xa6, 0x51, 0x92, 0x1f, 0x2c, 0xbb,}}, /* Byte value: 0x4f */ + {{0xd1, 0xe5, 0x18, 0xb4, 0xf3, 0x7b, 0xc7, 0xdb,}}, /* Byte value: 0x50 */ + {{0x85, 0x36, 0xa0, 0x7c, 0xde, 0x71, 0x6d, 0xfd,}}, /* Byte value: 0x51 */ + {{0x58, 0x76, 0x14, 0xee, 0x6b, 0xa7, 0x45, 0x57,}}, /* Byte value: 0x52 */ + {{0x49, 0x51, 0x5e, 0x7f, 0x72, 0x9e, 0x6a, 0x90,}}, /* Byte value: 0x53 */ + {{0xfa, 0x05, 0x5d, 0x88, 0x54, 0xa9, 0xab, 0xb3,}}, /* Byte value: 0x54 */ + {{0x87, 0xe6, 0x92, 0xcc, 0x7e, 0x1c, 0x1f, 0x0b,}}, /* Byte value: 0x55 */ + {{0x27, 0x45, 0xe9, 0x1a, 0xe1, 0x7f, 0x83, 0x19,}}, /* Byte value: 0x56 */ + {{0xe8, 0x9a, 0x3c, 0xf1, 0xbd, 0x2a, 0xcf, 0xf9,}}, /* Byte value: 0x57 */ + {{0xf4, 0x70, 0xc3, 0x1e, 0xb2, 0x69, 0x36, 0x34,}}, /* Byte value: 0x58 */ + {{0x5a, 0xa6, 0x26, 0x5e, 0xcb, 0xca, 0x37, 0xa1,}}, /* Byte value: 0x59 */ + {{0x66, 0xd2, 0x7f, 0xe0, 0x56, 0x96, 0xe2, 0xd7,}}, /* Byte value: 0x5a */ + {{0xf0, 0x13, 0xa7, 0xbd, 0x31, 0xb3, 0xd2, 0x1b,}}, /* Byte value: 0x5b */ + {{0xcb, 0xbc, 0xb1, 0x48, 0xdf, 0x8f, 0xa8, 0xcf,}}, /* Byte value: 0x5c */ + {{0x0e, 0x75, 0x9e, 0x96, 0xe6, 0xc0, 0x9d, 0x87,}}, /* Byte value: 0x5d */ + {{0xe2, 0x8c, 0xc6, 0xc4, 0xd8, 0x30, 0xb6, 0x51,}}, /* Byte value: 0x5e */ + {{0x57, 0x6b, 0x93, 0x20, 0xdd, 0xb0, 0xe1, 0xab,}}, /* Byte value: 0x5f */ + {{0xc4, 0xa1, 0x36, 0x86, 0x69, 0x98, 0x0c, 0x33,}}, /* Byte value: 0x60 */ + {{0x9b, 0x0c, 0x6d, 0x23, 0x71, 0x5f, 0xe6, 0xc6,}}, /* Byte value: 0x61 */ + {{0xee, 0x29, 0x6a, 0xe2, 0x9e, 0x9d, 0x59, 0x20,}}, /* Byte value: 0x62 */ + {{0x1a, 0x59, 0xa9, 0xfc, 0x2c, 0xf4, 0x6f, 0x14,}}, /* Byte value: 0x63 */ + {{0x37, 0x0a, 0xba, 0xd3, 0xa8, 0x91, 0x95, 0xa5,}}, /* Byte value: 0x64 */ + {{0x2e, 0xeb, 0x38, 0xc7, 0x74, 0xdf, 0xb1, 0x3c,}}, /* Byte value: 0x65 */ + {{0x69, 0xcf, 0xf8, 0x2e, 0xe0, 0x81, 0x46, 0x2b,}}, /* Byte value: 0x66 */ + {{0x8b, 0x43, 0x3e, 0xea, 0x38, 0xb1, 0xf0, 0x7a,}}, /* Byte value: 0x67 */ + {{0xaf, 0xbe, 0xfc, 0x18, 0x29, 0x74, 0x38, 0xee,}}, /* Byte value: 0x68 */ + {{0xc2, 0x12, 0x60, 0x95, 0x4a, 0x2f, 0x9a, 0xea,}}, /* Byte value: 0x69 */ + {{0x7f, 0x33, 0xfd, 0xf4, 0x8a, 0xd8, 0xc6, 0x4e,}}, /* Byte value: 0x6a */ + {{0x64, 0x02, 0x4d, 0x50, 0xf6, 0xfb, 0x90, 0x21,}}, /* Byte value: 0x6b */ + {{0x45, 0xf4, 0xf2, 0x59, 0x34, 0x33, 0x85, 0xe1,}}, /* Byte value: 0x6c */ + {{0x14, 0x2c, 0x37, 0x6a, 0xca, 0x34, 0xf2, 0x93,}}, /* Byte value: 0x6d */ + {{0xfd, 0xde, 0x12, 0xc3, 0x27, 0xc9, 0x04, 0x11,}}, /* Byte value: 0x6e */ + {{0xac, 0x06, 0xd7, 0xf0, 0xd9, 0xce, 0x73, 0x63,}}, /* Byte value: 0x6f */ + {{0x86, 0x8e, 0x8b, 0x94, 0x2e, 0xcb, 0x26, 0x70,}}, /* Byte value: 0x70 */ + {{0x76, 0x9d, 0x2c, 0x29, 0x1f, 0x78, 0xf4, 0x6b,}}, /* Byte value: 0x71 */ + {{0x43, 0x47, 0xa4, 0x4a, 0x17, 0x84, 0x13, 0x38,}}, /* Byte value: 0x72 */ + {{0x50, 0xb0, 0xdc, 0x6b, 0xae, 0xd0, 0x4e, 0x09,}}, /* Byte value: 0x73 */ + {{0x28, 0x58, 0x6e, 0xd4, 0x57, 0x68, 0x27, 0xe5,}}, /* Byte value: 0x74 */ + {{0xaa, 0xb5, 0x81, 0xe3, 0xfa, 0x79, 0xe5, 0xba,}}, /* Byte value: 0x75 */ + {{0x5e, 0xc5, 0x42, 0xfd, 0x48, 0x10, 0xd3, 0x8e,}}, /* Byte value: 0x76 */ + {{0xdd, 0x40, 0xb4, 0x92, 0xb5, 0xd6, 0x28, 0xaa,}}, /* Byte value: 0x77 */ + {{0xbb, 0x92, 0xcb, 0x72, 0xe3, 0x40, 0xca, 0x7d,}}, /* Byte value: 0x78 */ + {{0x96, 0xc1, 0xd8, 0x5d, 0x67, 0x25, 0x30, 0xcc,}}, /* Byte value: 0x79 */ + {{0x05, 0x0b, 0x7d, 0xfb, 0xd3, 0x0d, 0xdd, 0x54,}}, /* Byte value: 0x7a */ + {{0x7b, 0x50, 0x99, 0x57, 0x09, 0x02, 0x22, 0x61,}}, /* Byte value: 0x7b */ + {{0xf6, 0xa0, 0xf1, 0xae, 0x12, 0x04, 0x44, 0xc2,}}, /* Byte value: 0x7c */ + {{0x2b, 0xe0, 0x45, 0x3c, 0xa7, 0xd2, 0x6c, 0x68,}}, /* Byte value: 0x7d */ + {{0x09, 0xae, 0xd1, 0xdd, 0x95, 0xa0, 0x32, 0x25,}}, /* Byte value: 0x7e */ + {{0xc7, 0x19, 0x1d, 0x6e, 0x99, 0x22, 0x47, 0xbe,}}, /* Byte value: 0x7f */ + {{0x46, 0x4c, 0xd9, 0xb1, 0xc4, 0x89, 0xce, 0x6c,}}, /* Byte value: 0x80 */ + {{0x0d, 0xcd, 0xb5, 0x7e, 0x16, 0x7a, 0xd6, 0x0a,}}, /* Byte value: 0x81 */ + {{0x13, 0xf7, 0x78, 0x21, 0xb9, 0x54, 0x5d, 0x31,}}, /* Byte value: 0x82 */ + {{0x61, 0x09, 0x30, 0xab, 0x25, 0xf6, 0x4d, 0x75,}}, /* Byte value: 0x83 */ + {{0x01, 0x68, 0x19, 0x58, 0x50, 0xd7, 0x39, 0x7b,}}, /* Byte value: 0x84 */ + {{0xef, 0x41, 0x73, 0xba, 0xce, 0x4a, 0x60, 0x5b,}}, /* Byte value: 0x85 */ + {{0x8d, 0xf0, 0x68, 0xf9, 0x1b, 0x06, 0x66, 0xa3,}}, /* Byte value: 0x86 */ + {{0xd3, 0x35, 0x2a, 0x04, 0x53, 0x16, 0xb5, 0x2d,}}, /* Byte value: 0x87 */ + {{0xbc, 0x49, 0x84, 0x39, 0x90, 0x20, 0x65, 0xdf,}}, /* Byte value: 0x88 */ + {{0xf1, 0x7b, 0xbe, 0xe5, 0x61, 0x64, 0xeb, 0x60,}}, /* Byte value: 0x89 */ + {{0x32, 0x01, 0xc7, 0x28, 0x7b, 0x9c, 0x48, 0xf1,}}, /* Byte value: 0x8a */ + {{0x5c, 0x15, 0x70, 0x4d, 0xe8, 0x7d, 0xa1, 0x78,}}, /* Byte value: 0x8b */ + {{0x02, 0xd0, 0x32, 0xb0, 0xa0, 0x6d, 0x72, 0xf6,}}, /* Byte value: 0x8c */ + {{0xb1, 0x84, 0x31, 0x47, 0x86, 0x5a, 0xb3, 0xd5,}}, /* Byte value: 0x8d */ + {{0x56, 0x03, 0x8a, 0x78, 0x8d, 0x67, 0xd8, 0xd0,}}, /* Byte value: 0x8e */ + {{0x51, 0xd8, 0xc5, 0x33, 0xfe, 0x07, 0x77, 0x72,}}, /* Byte value: 0x8f */ + {{0xc9, 0x6c, 0x83, 0xf8, 0x7f, 0xe2, 0xda, 0x39,}}, /* Byte value: 0x90 */ + {{0xd6, 0x3e, 0x57, 0xff, 0x80, 0x1b, 0x68, 0x79,}}, /* Byte value: 0x91 */ + {{0x4e, 0x8a, 0x11, 0x34, 0x01, 0xfe, 0xc5, 0x32,}}, /* Byte value: 0x92 */ + {{0xc8, 0x04, 0x9a, 0xa0, 0x2f, 0x35, 0xe3, 0x42,}}, /* Byte value: 0x93 */ + {{0xa0, 0xa3, 0x7b, 0xd6, 0x9f, 0x63, 0x9c, 0x12,}}, /* Byte value: 0x94 */ + {{0x31, 0xb9, 0xec, 0xc0, 0x8b, 0x26, 0x03, 0x7c,}}, /* Byte value: 0x95 */ + {{0x22, 0x4e, 0x94, 0xe1, 0x32, 0x72, 0x5e, 0x4d,}}, /* Byte value: 0x96 */ + {{0xa5, 0xa8, 0x06, 0x2d, 0x4c, 0x6e, 0x41, 0x46,}}, /* Byte value: 0x97 */ + {{0x17, 0x94, 0x1c, 0x82, 0x3a, 0x8e, 0xb9, 0x1e,}}, /* Byte value: 0x98 */ + {{0x33, 0x69, 0xde, 0x70, 0x2b, 0x4b, 0x71, 0x8a,}}, /* Byte value: 0x99 */ + {{0x94, 0x11, 0xea, 0xed, 0xc7, 0x48, 0x42, 0x3a,}}, /* Byte value: 0x9a */ + {{0xeb, 0x22, 0x17, 0x19, 0x4d, 0x90, 0x84, 0x74,}}, /* Byte value: 0x9b */ + {{0x84, 0x5e, 0xb9, 0x24, 0x8e, 0xa6, 0x54, 0x86,}}, /* Byte value: 0x9c */ + {{0x08, 0xc6, 0xc8, 0x85, 0xc5, 0x77, 0x0b, 0x5e,}}, /* Byte value: 0x9d */ + {{0x25, 0x95, 0xdb, 0xaa, 0x41, 0x12, 0xf1, 0xef,}}, /* Byte value: 0x9e */ + {{0xf9, 0xbd, 0x76, 0x60, 0xa4, 0x13, 0xe0, 0x3e,}}, /* Byte value: 0x9f */ + {{0x39, 0x7f, 0x24, 0x45, 0x4e, 0x51, 0x08, 0x22,}}, /* Byte value: 0xa0 */ + {{0x60, 0x61, 0x29, 0xf3, 0x75, 0x21, 0x74, 0x0e,}}, /* Byte value: 0xa1 */ + {{0xb2, 0x3c, 0x1a, 0xaf, 0x76, 0xe0, 0xf8, 0x58,}}, /* Byte value: 0xa2 */ + {{0xd4, 0xee, 0x65, 0x4f, 0x20, 0x76, 0x1a, 0x8f,}}, /* Byte value: 0xa3 */ + {{0x6f, 0x7c, 0xae, 0x3d, 0xc3, 0x36, 0xd0, 0xf2,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x6d, 0xac, 0x9c, 0x8d, 0x63, 0x5b, 0xa2, 0x04,}}, /* Byte value: 0xa6 */ + {{0xa1, 0xcb, 0x62, 0x8e, 0xcf, 0xb4, 0xa5, 0x69,}}, /* Byte value: 0xa7 */ + {{0x12, 0x9f, 0x61, 0x79, 0xe9, 0x83, 0x64, 0x4a,}}, /* Byte value: 0xa8 */ + {{0xd8, 0x4b, 0xc9, 0x69, 0x66, 0xdb, 0xf5, 0xfe,}}, /* Byte value: 0xa9 */ + {{0xa3, 0x1b, 0x50, 0x3e, 0x6f, 0xd9, 0xd7, 0x9f,}}, /* Byte value: 0xaa */ + {{0xa4, 0xc0, 0x1f, 0x75, 0x1c, 0xb9, 0x78, 0x3d,}}, /* Byte value: 0xab */ + {{0xcf, 0xdf, 0xd5, 0xeb, 0x5c, 0x55, 0x4c, 0xe0,}}, /* Byte value: 0xac */ + {{0x9a, 0x64, 0x74, 0x7b, 0x21, 0x88, 0xdf, 0xbd,}}, /* Byte value: 0xad */ + {{0xcc, 0x67, 0xfe, 0x03, 0xac, 0xef, 0x07, 0x6d,}}, /* Byte value: 0xae */ + {{0x52, 0x60, 0xee, 0xdb, 0x0e, 0xbd, 0x3c, 0xff,}}, /* Byte value: 0xaf */ + {{0x1c, 0xea, 0xff, 0xef, 0x0f, 0x43, 0xf9, 0xcd,}}, /* Byte value: 0xb0 */ + {{0x2f, 0x83, 0x21, 0x9f, 0x24, 0x08, 0x88, 0x47,}}, /* Byte value: 0xb1 */ + {{0x7e, 0x5b, 0xe4, 0xac, 0xda, 0x0f, 0xff, 0x35,}}, /* Byte value: 0xb2 */ + {{0x93, 0xca, 0xa5, 0xa6, 0xb4, 0x28, 0xed, 0x98,}}, /* Byte value: 0xb3 */ + {{0x42, 0x2f, 0xbd, 0x12, 0x47, 0x53, 0x2a, 0x43,}}, /* Byte value: 0xb4 */ + {{0xb3, 0x54, 0x03, 0xf7, 0x26, 0x37, 0xc1, 0x23,}}, /* Byte value: 0xb5 */ + {{0x18, 0x89, 0x9b, 0x4c, 0x8c, 0x99, 0x1d, 0xe2,}}, /* Byte value: 0xb6 */ + {{0xb8, 0x2a, 0xe0, 0x9a, 0x13, 0xfa, 0x81, 0xf0,}}, /* Byte value: 0xb7 */ + {{0xfc, 0xb6, 0x0b, 0x9b, 0x77, 0x1e, 0x3d, 0x6a,}}, /* Byte value: 0xb8 */ + {{0x44, 0x9c, 0xeb, 0x01, 0x64, 0xe4, 0xbc, 0x9a,}}, /* Byte value: 0xb9 */ + {{0xe6, 0xef, 0xa2, 0x67, 0x5b, 0xea, 0x52, 0x7e,}}, /* Byte value: 0xba */ + {{0x8c, 0x98, 0x71, 0xa1, 0x4b, 0xd1, 0x5f, 0xd8,}}, /* Byte value: 0xbb */ + {{0xc6, 0x71, 0x04, 0x36, 0xc9, 0xf5, 0x7e, 0xc5,}}, /* Byte value: 0xbc */ + {{0x63, 0xd9, 0x02, 0x1b, 0x85, 0x9b, 0x3f, 0x83,}}, /* Byte value: 0xbd */ + {{0xbf, 0xf1, 0xaf, 0xd1, 0x60, 0x9a, 0x2e, 0x52,}}, /* Byte value: 0xbe */ + {{0xf2, 0xc3, 0x95, 0x0d, 0x91, 0xde, 0xa0, 0xed,}}, /* Byte value: 0xbf */ + {{0x2c, 0x3b, 0x0a, 0x77, 0xd4, 0xb2, 0xc3, 0xca,}}, /* Byte value: 0xc0 */ + {{0x11, 0x27, 0x4a, 0x91, 0x19, 0x39, 0x2f, 0xc7,}}, /* Byte value: 0xc1 */ + {{0x73, 0x96, 0x51, 0xd2, 0xcc, 0x75, 0x29, 0x3f,}}, /* Byte value: 0xc2 */ + {{0xdc, 0x28, 0xad, 0xca, 0xe5, 0x01, 0x11, 0xd1,}}, /* Byte value: 0xc3 */ + {{0xd9, 0x23, 0xd0, 0x31, 0x36, 0x0c, 0xcc, 0x85,}}, /* Byte value: 0xc4 */ + {{0x92, 0xa2, 0xbc, 0xfe, 0xe4, 0xff, 0xd4, 0xe3,}}, /* Byte value: 0xc5 */ + {{0x3e, 0xa4, 0x6b, 0x0e, 0x3d, 0x31, 0xa7, 0x80,}}, /* Byte value: 0xc6 */ + {{0xd2, 0x5d, 0x33, 0x5c, 0x03, 0xc1, 0x8c, 0x56,}}, /* Byte value: 0xc7 */ + {{0x59, 0x1e, 0x0d, 0xb6, 0x3b, 0x70, 0x7c, 0x2c,}}, /* Byte value: 0xc8 */ + {{0x75, 0x25, 0x07, 0xc1, 0xef, 0xc2, 0xbf, 0xe6,}}, /* Byte value: 0xc9 */ + {{0x19, 0xe1, 0x82, 0x14, 0xdc, 0x4e, 0x24, 0x99,}}, /* Byte value: 0xca */ + {{0xb4, 0x8f, 0x4c, 0xbc, 0x55, 0x57, 0x6e, 0x81,}}, /* Byte value: 0xcb */ + {{0x81, 0x55, 0xc4, 0xdf, 0x5d, 0xab, 0x89, 0xd2,}}, /* Byte value: 0xcc */ + {{0xe4, 0x3f, 0x90, 0xd7, 0xfb, 0x87, 0x20, 0x88,}}, /* Byte value: 0xcd */ + {{0xe5, 0x57, 0x89, 0x8f, 0xab, 0x50, 0x19, 0xf3,}}, /* Byte value: 0xce */ + {{0x0f, 0x1d, 0x87, 0xce, 0xb6, 0x17, 0xa4, 0xfc,}}, /* Byte value: 0xcf */ + {{0x47, 0x24, 0xc0, 0xe9, 0x94, 0x5e, 0xf7, 0x17,}}, /* Byte value: 0xd0 */ + {{0x9c, 0xd7, 0x22, 0x68, 0x02, 0x3f, 0x49, 0x64,}}, /* Byte value: 0xd1 */ + {{0x2a, 0x88, 0x5c, 0x64, 0xf7, 0x05, 0x55, 0x13,}}, /* Byte value: 0xd2 */ + {{0xa8, 0x65, 0xb3, 0x53, 0x5a, 0x14, 0x97, 0x4c,}}, /* Byte value: 0xd3 */ + {{0x5b, 0xce, 0x3f, 0x06, 0x9b, 0x1d, 0x0e, 0xda,}}, /* Byte value: 0xd4 */ + {{0x8f, 0x20, 0x5a, 0x49, 0xbb, 0x6b, 0x14, 0x55,}}, /* Byte value: 0xd5 */ + {{0x04, 0x63, 0x64, 0xa3, 0x83, 0xda, 0xe4, 0x2f,}}, /* Byte value: 0xd6 */ + {{0xa6, 0x10, 0x2d, 0xc5, 0xbc, 0xd4, 0x0a, 0xcb,}}, /* Byte value: 0xd7 */ + {{0x72, 0xfe, 0x48, 0x8a, 0x9c, 0xa2, 0x10, 0x44,}}, /* Byte value: 0xd8 */ + {{0xba, 0xfa, 0xd2, 0x2a, 0xb3, 0x97, 0xf3, 0x06,}}, /* Byte value: 0xd9 */ + {{0x30, 0xd1, 0xf5, 0x98, 0xdb, 0xf1, 0x3a, 0x07,}}, /* Byte value: 0xda */ + {{0x4c, 0x5a, 0x23, 0x84, 0xa1, 0x93, 0xb7, 0xc4,}}, /* Byte value: 0xdb */ + {{0x82, 0xed, 0xef, 0x37, 0xad, 0x11, 0xc2, 0x5f,}}, /* Byte value: 0xdc */ + {{0x6a, 0x77, 0xd3, 0xc6, 0x10, 0x3b, 0x0d, 0xa6,}}, /* Byte value: 0xdd */ + {{0x88, 0xfb, 0x15, 0x02, 0xc8, 0x0b, 0xbb, 0xf7,}}, /* Byte value: 0xde */ + {{0x3c, 0x74, 0x59, 0xbe, 0x9d, 0x5c, 0xd5, 0x76,}}, /* Byte value: 0xdf */ + {{0x6e, 0x14, 0xb7, 0x65, 0x93, 0xe1, 0xe9, 0x89,}}, /* Byte value: 0xe0 */ + {{0x0b, 0x7e, 0xe3, 0x6d, 0x35, 0xcd, 0x40, 0xd3,}}, /* Byte value: 0xe1 */ + {{0x9e, 0x07, 0x10, 0xd8, 0xa2, 0x52, 0x3b, 0x92,}}, /* Byte value: 0xe2 */ + {{0x68, 0xa7, 0xe1, 0x76, 0xb0, 0x56, 0x7f, 0x50,}}, /* Byte value: 0xe3 */ + {{0x67, 0xba, 0x66, 0xb8, 0x06, 0x41, 0xdb, 0xac,}}, /* Byte value: 0xe4 */ + {{0xc5, 0xc9, 0x2f, 0xde, 0x39, 0x4f, 0x35, 0x48,}}, /* Byte value: 0xe5 */ + {{0x74, 0x4d, 0x1e, 0x99, 0xbf, 0x15, 0x86, 0x9d,}}, /* Byte value: 0xe6 */ + {{0x40, 0xff, 0x8f, 0xa2, 0xe7, 0x3e, 0x58, 0xb5,}}, /* Byte value: 0xe7 */ + {{0x0c, 0xa5, 0xac, 0x26, 0x46, 0xad, 0xef, 0x71,}}, /* Byte value: 0xe8 */ + {{0xe7, 0x87, 0xbb, 0x3f, 0x0b, 0x3d, 0x6b, 0x05,}}, /* Byte value: 0xe9 */ + {{0x9d, 0xbf, 0x3b, 0x30, 0x52, 0xe8, 0x70, 0x1f,}}, /* Byte value: 0xea */ + {{0x90, 0x72, 0x8e, 0x4e, 0x44, 0x92, 0xa6, 0x15,}}, /* Byte value: 0xeb */ + {{0x7a, 0x38, 0x80, 0x0f, 0x59, 0xd5, 0x1b, 0x1a,}}, /* Byte value: 0xec */ + {{0x3a, 0xc7, 0x0f, 0xad, 0xbe, 0xeb, 0x43, 0xaf,}}, /* Byte value: 0xed */ + {{0x35, 0xda, 0x88, 0x63, 0x08, 0xfc, 0xe7, 0x53,}}, /* Byte value: 0xee */ + {{0x34, 0xb2, 0x91, 0x3b, 0x58, 0x2b, 0xde, 0x28,}}, /* Byte value: 0xef */ + {{0x9f, 0x6f, 0x09, 0x80, 0xf2, 0x85, 0x02, 0xe9,}}, /* Byte value: 0xf0 */ + {{0xb7, 0x37, 0x67, 0x54, 0xa5, 0xed, 0x25, 0x0c,}}, /* Byte value: 0xf1 */ + {{0xf8, 0xd5, 0x6f, 0x38, 0xf4, 0xc4, 0xd9, 0x45,}}, /* Byte value: 0xf2 */ + {{0x4f, 0xe2, 0x08, 0x6c, 0x51, 0x29, 0xfc, 0x49,}}, /* Byte value: 0xf3 */ + {{0x6b, 0x1f, 0xca, 0x9e, 0x40, 0xec, 0x34, 0xdd,}}, /* Byte value: 0xf4 */ + {{0x83, 0x85, 0xf6, 0x6f, 0xfd, 0xc6, 0xfb, 0x24,}}, /* Byte value: 0xf5 */ + {{0x5f, 0xad, 0x5b, 0xa5, 0x18, 0xc7, 0xea, 0xf5,}}, /* Byte value: 0xf6 */ + {{0xa7, 0x78, 0x34, 0x9d, 0xec, 0x03, 0x33, 0xb0,}}, /* Byte value: 0xf7 */ + {{0x1e, 0x3a, 0xcd, 0x5f, 0xaf, 0x2e, 0x8b, 0x3b,}}, /* Byte value: 0xf8 */ + {{0x10, 0x4f, 0x53, 0xc9, 0x49, 0xee, 0x16, 0xbc,}}, /* Byte value: 0xf9 */ + {{0xc3, 0x7a, 0x79, 0xcd, 0x1a, 0xf8, 0xa3, 0x91,}}, /* Byte value: 0xfa */ + {{0x78, 0xe8, 0xb2, 0xbf, 0xf9, 0xb8, 0x69, 0xec,}}, /* Byte value: 0xfb */ + {{0x2d, 0x53, 0x13, 0x2f, 0x84, 0x65, 0xfa, 0xb1,}}, /* Byte value: 0xfc */ + {{0x77, 0xf5, 0x35, 0x71, 0x4f, 0xaf, 0xcd, 0x10,}}, /* Byte value: 0xfd */ + {{0xe3, 0xe4, 0xdf, 0x9c, 0x88, 0xe7, 0x8f, 0x2a,}}, /* Byte value: 0xfe */ + {{0x80, 0x3d, 0xdd, 0x87, 0x0d, 0x7c, 0xb0, 0xa9,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 6 */ + {{0xa2, 0xc8, 0x81, 0xe2, 0x3b, 0xb3, 0xc2, 0x65,}}, /* Byte value: 0x00 */ + {{0x7e, 0x5e, 0xba, 0x73, 0x1f, 0x4c, 0x94, 0x8f,}}, /* Byte value: 0x01 */ + {{0x65, 0xcf, 0x9b, 0x0b, 0x79, 0xd8, 0x3c, 0xc1,}}, /* Byte value: 0x02 */ + {{0x09, 0xce, 0x1f, 0x28, 0x22, 0xcd, 0xd9, 0x3a,}}, /* Byte value: 0x03 */ + {{0xb9, 0x59, 0xa0, 0x9a, 0x5d, 0x27, 0x6a, 0x2b,}}, /* Byte value: 0x04 */ + {{0xaa, 0x23, 0xa2, 0x8f, 0xdc, 0xda, 0x7c, 0x18,}}, /* Byte value: 0x05 */ + {{0x3c, 0x40, 0x19, 0x17, 0x62, 0x09, 0xe3, 0x6f,}}, /* Byte value: 0x06 */ + {{0x92, 0xf7, 0x4b, 0x4f, 0x2c, 0x06, 0xc0, 0xa8,}}, /* Byte value: 0x07 */ + {{0x39, 0xf1, 0xd5, 0x85, 0x35, 0x78, 0xdb, 0xf7,}}, /* Byte value: 0x08 */ + {{0xf0, 0xc3, 0x64, 0x5c, 0x4b, 0x24, 0x0a, 0x7f,}}, /* Byte value: 0x09 */ + {{0xcb, 0x78, 0xc9, 0x53, 0x37, 0xd7, 0x1f, 0x06,}}, /* Byte value: 0x0a */ + {{0xfe, 0xf6, 0xcf, 0x6c, 0x77, 0x13, 0x25, 0x53,}}, /* Byte value: 0x0b */ + {{0xe0, 0xd6, 0x22, 0x86, 0x46, 0xf6, 0xb5, 0x85,}}, /* Byte value: 0x0c */ + {{0x02, 0x4a, 0x78, 0x8a, 0x49, 0x8b, 0xce, 0x8e,}}, /* Byte value: 0x0d */ + {{0x4e, 0x61, 0x70, 0xde, 0x08, 0xf9, 0x96, 0x42,}}, /* Byte value: 0x0e */ + {{0x4a, 0xf5, 0x80, 0x09, 0x9a, 0x2c, 0xc9, 0x9d,}}, /* Byte value: 0x0f */ + {{0xe5, 0x67, 0xee, 0x14, 0x11, 0x87, 0x8d, 0x1d,}}, /* Byte value: 0x10 */ + {{0x3f, 0x2f, 0x5d, 0xd8, 0xee, 0x26, 0x4a, 0xa6,}}, /* Byte value: 0x11 */ + {{0x70, 0x6b, 0x11, 0x43, 0x23, 0x7b, 0xbb, 0xa3,}}, /* Byte value: 0x12 */ + {{0x0c, 0x7f, 0xd3, 0xba, 0x75, 0xbc, 0xe1, 0xa2,}}, /* Byte value: 0x13 */ + {{0xfa, 0x62, 0x3f, 0xbb, 0xe5, 0xc6, 0x7a, 0x8c,}}, /* Byte value: 0x14 */ + {{0xc0, 0xfc, 0xae, 0xf1, 0x5c, 0x91, 0x08, 0xb2,}}, /* Byte value: 0x15 */ + {{0x41, 0x71, 0xe7, 0xab, 0xf1, 0x6a, 0xde, 0x29,}}, /* Byte value: 0x16 */ + {{0xa1, 0xa7, 0xc5, 0x2d, 0xb7, 0x9c, 0x6b, 0xac,}}, /* Byte value: 0x17 */ + {{0x60, 0x7e, 0x57, 0x99, 0x2e, 0xa9, 0x04, 0x59,}}, /* Byte value: 0x18 */ + {{0xa7, 0x79, 0x4d, 0x70, 0x6c, 0xc2, 0xfa, 0xfd,}}, /* Byte value: 0x19 */ + {{0x82, 0xe2, 0x0d, 0x95, 0x21, 0xd4, 0x7f, 0x52,}}, /* Byte value: 0x1a */ + {{0x53, 0x2e, 0xd9, 0xfb, 0xb5, 0x33, 0xaf, 0x5d,}}, /* Byte value: 0x1b */ + {{0xb5, 0x26, 0x73, 0x20, 0x28, 0x9b, 0x8b, 0x89,}}, /* Byte value: 0x1c */ + {{0x9e, 0x88, 0x98, 0xf5, 0x59, 0xba, 0x21, 0x0a,}}, /* Byte value: 0x1d */ + {{0x96, 0x63, 0xbb, 0x98, 0xbe, 0xd3, 0x9f, 0x77,}}, /* Byte value: 0x1e */ + {{0x4c, 0x2b, 0x08, 0x54, 0x41, 0x72, 0x58, 0xcc,}}, /* Byte value: 0x1f */ + {{0x1e, 0x20, 0xed, 0xea, 0x31, 0xe5, 0x90, 0xd6,}}, /* Byte value: 0x20 */ + {{0x67, 0x85, 0xe3, 0x81, 0x30, 0x53, 0xf2, 0x4f,}}, /* Byte value: 0x21 */ + {{0xe3, 0xb9, 0x66, 0x49, 0xca, 0xd9, 0x1c, 0x4c,}}, /* Byte value: 0x22 */ + {{0x2a, 0x8b, 0xd7, 0x90, 0xb4, 0x85, 0xcd, 0xc4,}}, /* Byte value: 0x23 */ + {{0xac, 0xfd, 0x2a, 0xd2, 0x07, 0x84, 0xed, 0x49,}}, /* Byte value: 0x24 */ + {{0x43, 0x3b, 0x9f, 0x21, 0xb8, 0xe1, 0x10, 0xa7,}}, /* Byte value: 0x25 */ + {{0x8c, 0xd7, 0xa6, 0xa5, 0x1d, 0xe3, 0x50, 0x7e,}}, /* Byte value: 0x26 */ + {{0xc7, 0x07, 0x1a, 0xe9, 0x42, 0x6b, 0xfe, 0xa4,}}, /* Byte value: 0x27 */ + {{0x26, 0xf4, 0x04, 0x2a, 0xc1, 0x39, 0x2c, 0x66,}}, /* Byte value: 0x28 */ + {{0x29, 0xe4, 0x93, 0x5f, 0x38, 0xaa, 0x64, 0x0d,}}, /* Byte value: 0x29 */ + {{0x1c, 0x6a, 0x95, 0x60, 0x78, 0x6e, 0x5e, 0x58,}}, /* Byte value: 0x2a */ + {{0x4d, 0x0e, 0x34, 0x11, 0x84, 0xd6, 0x3f, 0x8b,}}, /* Byte value: 0x2b */ + {{0x9d, 0xe7, 0xdc, 0x3a, 0xd5, 0x95, 0x88, 0xc3,}}, /* Byte value: 0x2c */ + {{0xf2, 0x89, 0x1c, 0xd6, 0x02, 0xaf, 0xc4, 0xf1,}}, /* Byte value: 0x2d */ + {{0x21, 0x0f, 0xb0, 0x32, 0xdf, 0xc3, 0xda, 0x70,}}, /* Byte value: 0x2e */ + {{0x6d, 0x24, 0xb8, 0x66, 0x9e, 0xb1, 0x82, 0xbc,}}, /* Byte value: 0x2f */ + {{0xbc, 0xe8, 0x6c, 0x08, 0x0a, 0x56, 0x52, 0xb3,}}, /* Byte value: 0x30 */ + {{0x9a, 0x1c, 0x68, 0x22, 0xcb, 0x6f, 0x7e, 0xd5,}}, /* Byte value: 0x31 */ + {{0x27, 0xd1, 0x38, 0x6f, 0x04, 0x9d, 0x4b, 0x21,}}, /* Byte value: 0x32 */ + {{0x14, 0x81, 0xb6, 0x0d, 0x9f, 0x07, 0xe0, 0x25,}}, /* Byte value: 0x33 */ + {{0x5e, 0x74, 0x36, 0x04, 0x05, 0x2b, 0x29, 0xb8,}}, /* Byte value: 0x34 */ + {{0xe4, 0x42, 0xd2, 0x51, 0xd4, 0x23, 0xea, 0x5a,}}, /* Byte value: 0x35 */ + {{0xd3, 0x86, 0xac, 0xe4, 0xdd, 0x6c, 0x1e, 0x81,}}, /* Byte value: 0x36 */ + {{0xe1, 0xf3, 0x1e, 0xc3, 0x83, 0x52, 0xd2, 0xc2,}}, /* Byte value: 0x37 */ + {{0x69, 0xb0, 0x48, 0xb1, 0x0c, 0x64, 0xdd, 0x63,}}, /* Byte value: 0x38 */ + {{0x49, 0x9a, 0xc4, 0xc6, 0x16, 0x03, 0x60, 0x54,}}, /* Byte value: 0x39 */ + {{0xab, 0x06, 0x9e, 0xca, 0x19, 0x7e, 0x1b, 0x5f,}}, /* Byte value: 0x3a */ + {{0xb3, 0xf8, 0xfb, 0x7d, 0xf3, 0xc5, 0x1a, 0xd8,}}, /* Byte value: 0x3b */ + {{0xa3, 0xed, 0xbd, 0xa7, 0xfe, 0x17, 0xa5, 0x22,}}, /* Byte value: 0x3c */ + {{0x0b, 0x84, 0x67, 0xa2, 0x6b, 0x46, 0x17, 0xb4,}}, /* Byte value: 0x3d */ + {{0x90, 0xbd, 0x33, 0xc5, 0x65, 0x8d, 0x0e, 0x26,}}, /* Byte value: 0x3e */ + {{0xfc, 0xbc, 0xb7, 0xe6, 0x3e, 0x98, 0xeb, 0xdd,}}, /* Byte value: 0x3f */ + {{0xc2, 0xb6, 0xd6, 0x7b, 0x15, 0x1a, 0xc6, 0x3c,}}, /* Byte value: 0x40 */ + {{0x80, 0xa8, 0x75, 0x1f, 0x68, 0x5f, 0xb1, 0xdc,}}, /* Byte value: 0x41 */ + {{0xe7, 0x2d, 0x96, 0x9e, 0x58, 0x0c, 0x43, 0x93,}}, /* Byte value: 0x42 */ + {{0x63, 0x11, 0x13, 0x56, 0xa2, 0x86, 0xad, 0x90,}}, /* Byte value: 0x43 */ + {{0x30, 0x3f, 0xca, 0xad, 0x17, 0xb5, 0x02, 0xcd,}}, /* Byte value: 0x44 */ + {{0x22, 0x60, 0xf4, 0xfd, 0x53, 0xec, 0x73, 0xb9,}}, /* Byte value: 0x45 */ + {{0xf6, 0x1d, 0xec, 0x01, 0x90, 0x7a, 0x9b, 0x2e,}}, /* Byte value: 0x46 */ + {{0xa8, 0x69, 0xda, 0x05, 0x95, 0x51, 0xb2, 0x96,}}, /* Byte value: 0x47 */ + {{0x57, 0xba, 0x29, 0x2c, 0x27, 0xe6, 0xf0, 0x82,}}, /* Byte value: 0x48 */ + {{0x8e, 0x9d, 0xde, 0x2f, 0x54, 0x68, 0x9e, 0xf0,}}, /* Byte value: 0x49 */ + {{0xc3, 0x93, 0xea, 0x3e, 0xd0, 0xbe, 0xa1, 0x7b,}}, /* Byte value: 0x4a */ + {{0xc6, 0x22, 0x26, 0xac, 0x87, 0xcf, 0x99, 0xe3,}}, /* Byte value: 0x4b */ + {{0x50, 0x41, 0x9d, 0x34, 0x39, 0x1c, 0x06, 0x94,}}, /* Byte value: 0x4c */ + {{0x75, 0xda, 0xdd, 0xd1, 0x74, 0x0a, 0x83, 0x3b,}}, /* Byte value: 0x4d */ + {{0x4b, 0xd0, 0xbc, 0x4c, 0x5f, 0x88, 0xae, 0xda,}}, /* Byte value: 0x4e */ + {{0x6c, 0x01, 0x84, 0x23, 0x5b, 0x15, 0xe5, 0xfb,}}, /* Byte value: 0x4f */ + {{0xa6, 0x5c, 0x71, 0x35, 0xa9, 0x66, 0x9d, 0xba,}}, /* Byte value: 0x50 */ + {{0xa4, 0x16, 0x09, 0xbf, 0xe0, 0xed, 0x53, 0x34,}}, /* Byte value: 0x51 */ + {{0xf5, 0x72, 0xa8, 0xce, 0x1c, 0x55, 0x32, 0xe7,}}, /* Byte value: 0x52 */ + {{0xf8, 0x28, 0x47, 0x31, 0xac, 0x4d, 0xb4, 0x02,}}, /* Byte value: 0x53 */ + {{0x9c, 0xc2, 0xe0, 0x7f, 0x10, 0x31, 0xef, 0x84,}}, /* Byte value: 0x54 */ + {{0xd2, 0xa3, 0x90, 0xa1, 0x18, 0xc8, 0x79, 0xc6,}}, /* Byte value: 0x55 */ + {{0xcd, 0xa6, 0x41, 0x0e, 0xec, 0x89, 0x8e, 0x57,}}, /* Byte value: 0x56 */ + {{0xdc, 0x96, 0x3b, 0x91, 0x24, 0xff, 0x56, 0xea,}}, /* Byte value: 0x57 */ + {{0x1d, 0x4f, 0xa9, 0x25, 0xbd, 0xca, 0x39, 0x1f,}}, /* Byte value: 0x58 */ + {{0x83, 0xc7, 0x31, 0xd0, 0xe4, 0x70, 0x18, 0x15,}}, /* Byte value: 0x59 */ + {{0x2e, 0x1f, 0x27, 0x47, 0x26, 0x50, 0x92, 0x1b,}}, /* Byte value: 0x5a */ + {{0xf1, 0xe6, 0x58, 0x19, 0x8e, 0x80, 0x6d, 0x38,}}, /* Byte value: 0x5b */ + {{0xfd, 0x99, 0x8b, 0xa3, 0xfb, 0x3c, 0x8c, 0x9a,}}, /* Byte value: 0x5c */ + {{0x81, 0x8d, 0x49, 0x5a, 0xad, 0xfb, 0xd6, 0x9b,}}, /* Byte value: 0x5d */ + {{0xb1, 0xb2, 0x83, 0xf7, 0xba, 0x4e, 0xd4, 0x56,}}, /* Byte value: 0x5e */ + {{0x4f, 0x44, 0x4c, 0x9b, 0xcd, 0x5d, 0xf1, 0x05,}}, /* Byte value: 0x5f */ + {{0x47, 0xaf, 0x6f, 0xf6, 0x2a, 0x34, 0x4f, 0x78,}}, /* Byte value: 0x60 */ + {{0x13, 0x7a, 0x02, 0x15, 0x81, 0xfd, 0x16, 0x33,}}, /* Byte value: 0x61 */ + {{0x46, 0x8a, 0x53, 0xb3, 0xef, 0x90, 0x28, 0x3f,}}, /* Byte value: 0x62 */ + {{0x5b, 0xc5, 0xfa, 0x96, 0x52, 0x5a, 0x11, 0x20,}}, /* Byte value: 0x63 */ + {{0xfb, 0x47, 0x03, 0xfe, 0x20, 0x62, 0x1d, 0xcb,}}, /* Byte value: 0x64 */ + {{0xed, 0x8c, 0xcd, 0x79, 0xf6, 0xee, 0x33, 0x60,}}, /* Byte value: 0x65 */ + {{0x94, 0x29, 0xc3, 0x12, 0xf7, 0x58, 0x51, 0xf9,}}, /* Byte value: 0x66 */ + {{0x25, 0x9b, 0x40, 0xe5, 0x4d, 0x16, 0x85, 0xaf,}}, /* Byte value: 0x67 */ + {{0xa5, 0x33, 0x35, 0xfa, 0x25, 0x49, 0x34, 0x73,}}, /* Byte value: 0x68 */ + {{0xdd, 0xb3, 0x07, 0xd4, 0xe1, 0x5b, 0x31, 0xad,}}, /* Byte value: 0x69 */ + {{0x38, 0xd4, 0xe9, 0xc0, 0xf0, 0xdc, 0xbc, 0xb0,}}, /* Byte value: 0x6a */ + {{0x58, 0xaa, 0xbe, 0x59, 0xde, 0x75, 0xb8, 0xe9,}}, /* Byte value: 0x6b */ + {{0x0f, 0x10, 0x97, 0x75, 0xf9, 0x93, 0x48, 0x6b,}}, /* Byte value: 0x6c */ + {{0xda, 0x48, 0xb3, 0xcc, 0xff, 0xa1, 0xc7, 0xbb,}}, /* Byte value: 0x6d */ + {{0x3d, 0x65, 0x25, 0x52, 0xa7, 0xad, 0x84, 0x28,}}, /* Byte value: 0x6e */ + {{0xe8, 0x3d, 0x01, 0xeb, 0xa1, 0x9f, 0x0b, 0xf8,}}, /* Byte value: 0x6f */ + {{0xe9, 0x18, 0x3d, 0xae, 0x64, 0x3b, 0x6c, 0xbf,}}, /* Byte value: 0x70 */ + {{0x18, 0xfe, 0x65, 0xb7, 0xea, 0xbb, 0x01, 0x87,}}, /* Byte value: 0x71 */ + {{0x95, 0x0c, 0xff, 0x57, 0x32, 0xfc, 0x36, 0xbe,}}, /* Byte value: 0x72 */ + {{0xee, 0xe3, 0x89, 0xb6, 0x7a, 0xc1, 0x9a, 0xa9,}}, /* Byte value: 0x73 */ + {{0x77, 0x90, 0xa5, 0x5b, 0x3d, 0x81, 0x4d, 0xb5,}}, /* Byte value: 0x74 */ + {{0x72, 0x21, 0x69, 0xc9, 0x6a, 0xf0, 0x75, 0x2d,}}, /* Byte value: 0x75 */ + {{0x6f, 0x6e, 0xc0, 0xec, 0xd7, 0x3a, 0x4c, 0x32,}}, /* Byte value: 0x76 */ + {{0x51, 0x64, 0xa1, 0x71, 0xfc, 0xb8, 0x61, 0xd3,}}, /* Byte value: 0x77 */ + {{0x7f, 0x7b, 0x86, 0x36, 0xda, 0xe8, 0xf3, 0xc8,}}, /* Byte value: 0x78 */ + {{0xdf, 0xf9, 0x7f, 0x5e, 0xa8, 0xd0, 0xff, 0x23,}}, /* Byte value: 0x79 */ + {{0xd7, 0x12, 0x5c, 0x33, 0x4f, 0xb9, 0x41, 0x5e,}}, /* Byte value: 0x7a */ + {{0xd4, 0x7d, 0x18, 0xfc, 0xc3, 0x96, 0xe8, 0x97,}}, /* Byte value: 0x7b */ + {{0x6b, 0xfa, 0x30, 0x3b, 0x45, 0xef, 0x13, 0xed,}}, /* Byte value: 0x7c */ + {{0x3a, 0x9e, 0x91, 0x4a, 0xb9, 0x57, 0x72, 0x3e,}}, /* Byte value: 0x7d */ + {{0x20, 0x2a, 0x8c, 0x77, 0x1a, 0x67, 0xbd, 0x37,}}, /* Byte value: 0x7e */ + {{0x0a, 0xa1, 0x5b, 0xe7, 0xae, 0xe2, 0x70, 0xf3,}}, /* Byte value: 0x7f */ + {{0x42, 0x1e, 0xa3, 0x64, 0x7d, 0x45, 0x77, 0xe0,}}, /* Byte value: 0x80 */ + {{0xcc, 0x83, 0x7d, 0x4b, 0x29, 0x2d, 0xe9, 0x10,}}, /* Byte value: 0x81 */ + {{0x7b, 0xef, 0x76, 0xe1, 0x48, 0x3d, 0xac, 0x17,}}, /* Byte value: 0x82 */ + {{0x8f, 0xb8, 0xe2, 0x6a, 0x91, 0xcc, 0xf9, 0xb7,}}, /* Byte value: 0x83 */ + {{0x3b, 0xbb, 0xad, 0x0f, 0x7c, 0xf3, 0x15, 0x79,}}, /* Byte value: 0x84 */ + {{0x7d, 0x31, 0xfe, 0xbc, 0x93, 0x63, 0x3d, 0x46,}}, /* Byte value: 0x85 */ + {{0xbf, 0x87, 0x28, 0xc7, 0x86, 0x79, 0xfb, 0x7a,}}, /* Byte value: 0x86 */ + {{0xd0, 0xe9, 0xe8, 0x2b, 0x51, 0x43, 0xb7, 0x48,}}, /* Byte value: 0x87 */ + {{0xde, 0xdc, 0x43, 0x1b, 0x6d, 0x74, 0x98, 0x64,}}, /* Byte value: 0x88 */ + {{0xca, 0x5d, 0xf5, 0x16, 0xf2, 0x73, 0x78, 0x41,}}, /* Byte value: 0x89 */ + {{0x2c, 0x55, 0x5f, 0xcd, 0x6f, 0xdb, 0x5c, 0x95,}}, /* Byte value: 0x8a */ + {{0x19, 0xdb, 0x59, 0xf2, 0x2f, 0x1f, 0x66, 0xc0,}}, /* Byte value: 0x8b */ + {{0x76, 0xb5, 0x99, 0x1e, 0xf8, 0x25, 0x2a, 0xf2,}}, /* Byte value: 0x8c */ + {{0x12, 0x5f, 0x3e, 0x50, 0x44, 0x59, 0x71, 0x74,}}, /* Byte value: 0x8d */ + {{0x74, 0xff, 0xe1, 0x94, 0xb1, 0xae, 0xe4, 0x7c,}}, /* Byte value: 0x8e */ + {{0xd5, 0x58, 0x24, 0xb9, 0x06, 0x32, 0x8f, 0xd0,}}, /* Byte value: 0x8f */ + {{0x8b, 0x2c, 0x12, 0xbd, 0x03, 0x19, 0xa6, 0x68,}}, /* Byte value: 0x90 */ + {{0x07, 0xfb, 0xb4, 0x18, 0x1e, 0xfa, 0xf6, 0x16,}}, /* Byte value: 0x91 */ + {{0x59, 0x8f, 0x82, 0x1c, 0x1b, 0xd1, 0xdf, 0xae,}}, /* Byte value: 0x92 */ + {{0xb0, 0x97, 0xbf, 0xb2, 0x7f, 0xea, 0xb3, 0x11,}}, /* Byte value: 0x93 */ + {{0x1f, 0x05, 0xd1, 0xaf, 0xf4, 0x41, 0xf7, 0x91,}}, /* Byte value: 0x94 */ + {{0x61, 0x5b, 0x6b, 0xdc, 0xeb, 0x0d, 0x63, 0x1e,}}, /* Byte value: 0x95 */ + {{0x1a, 0xb4, 0x1d, 0x3d, 0xa3, 0x30, 0xcf, 0x09,}}, /* Byte value: 0x96 */ + {{0xc8, 0x17, 0x8d, 0x9c, 0xbb, 0xf8, 0xb6, 0xcf,}}, /* Byte value: 0x97 */ + {{0x97, 0x46, 0x87, 0xdd, 0x7b, 0x77, 0xf8, 0x30,}}, /* Byte value: 0x98 */ + {{0x17, 0xee, 0xf2, 0xc2, 0x13, 0x28, 0x49, 0xec,}}, /* Byte value: 0x99 */ + {{0xa9, 0x4c, 0xe6, 0x40, 0x50, 0xf5, 0xd5, 0xd1,}}, /* Byte value: 0x9a */ + {{0x91, 0x98, 0x0f, 0x80, 0xa0, 0x29, 0x69, 0x61,}}, /* Byte value: 0x9b */ + {{0x9f, 0xad, 0xa4, 0xb0, 0x9c, 0x1e, 0x46, 0x4d,}}, /* Byte value: 0x9c */ + {{0x1b, 0x91, 0x21, 0x78, 0x66, 0x94, 0xa8, 0x4e,}}, /* Byte value: 0x9d */ + {{0xbb, 0x13, 0xd8, 0x10, 0x14, 0xac, 0xa4, 0xa5,}}, /* Byte value: 0x9e */ + {{0xd1, 0xcc, 0xd4, 0x6e, 0x94, 0xe7, 0xd0, 0x0f,}}, /* Byte value: 0x9f */ + {{0x7a, 0xca, 0x4a, 0xa4, 0x8d, 0x99, 0xcb, 0x50,}}, /* Byte value: 0xa0 */ + {{0xb4, 0x03, 0x4f, 0x65, 0xed, 0x3f, 0xec, 0xce,}}, /* Byte value: 0xa1 */ + {{0x5f, 0x51, 0x0a, 0x41, 0xc0, 0x8f, 0x4e, 0xff,}}, /* Byte value: 0xa2 */ + {{0x71, 0x4e, 0x2d, 0x06, 0xe6, 0xdf, 0xdc, 0xe4,}}, /* Byte value: 0xa3 */ + {{0x0e, 0x35, 0xab, 0x30, 0x3c, 0x37, 0x2f, 0x2c,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x78, 0x80, 0x32, 0x2e, 0xc4, 0x12, 0x05, 0xde,}}, /* Byte value: 0xa6 */ + {{0x24, 0xbe, 0x7c, 0xa0, 0x88, 0xb2, 0xe2, 0xe8,}}, /* Byte value: 0xa7 */ + {{0x40, 0x54, 0xdb, 0xee, 0x34, 0xce, 0xb9, 0x6e,}}, /* Byte value: 0xa8 */ + {{0x86, 0x76, 0xfd, 0x42, 0xb3, 0x01, 0x20, 0x8d,}}, /* Byte value: 0xa9 */ + {{0x52, 0x0b, 0xe5, 0xbe, 0x70, 0x97, 0xc8, 0x1a,}}, /* Byte value: 0xaa */ + {{0xf3, 0xac, 0x20, 0x93, 0xc7, 0x0b, 0xa3, 0xb6,}}, /* Byte value: 0xab */ + {{0x11, 0x30, 0x7a, 0x9f, 0xc8, 0x76, 0xd8, 0xbd,}}, /* Byte value: 0xac */ + {{0x28, 0xc1, 0xaf, 0x1a, 0xfd, 0x0e, 0x03, 0x4a,}}, /* Byte value: 0xad */ + {{0x5c, 0x3e, 0x4e, 0x8e, 0x4c, 0xa0, 0xe7, 0x36,}}, /* Byte value: 0xae */ + {{0x98, 0x56, 0x10, 0xa8, 0x82, 0xe4, 0xb0, 0x5b,}}, /* Byte value: 0xaf */ + {{0xc1, 0xd9, 0x92, 0xb4, 0x99, 0x35, 0x6f, 0xf5,}}, /* Byte value: 0xb0 */ + {{0xd6, 0x37, 0x60, 0x76, 0x8a, 0x1d, 0x26, 0x19,}}, /* Byte value: 0xb1 */ + {{0x03, 0x6f, 0x44, 0xcf, 0x8c, 0x2f, 0xa9, 0xc9,}}, /* Byte value: 0xb2 */ + {{0x08, 0xeb, 0x23, 0x6d, 0xe7, 0x69, 0xbe, 0x7d,}}, /* Byte value: 0xb3 */ + {{0xae, 0xb7, 0x52, 0x58, 0x4e, 0x0f, 0x23, 0xc7,}}, /* Byte value: 0xb4 */ + {{0x64, 0xea, 0xa7, 0x4e, 0xbc, 0x7c, 0x5b, 0x86,}}, /* Byte value: 0xb5 */ + {{0x2d, 0x70, 0x63, 0x88, 0xaa, 0x7f, 0x3b, 0xd2,}}, /* Byte value: 0xb6 */ + {{0x32, 0x75, 0xb2, 0x27, 0x5e, 0x3e, 0xcc, 0x43,}}, /* Byte value: 0xb7 */ + {{0x06, 0xde, 0x88, 0x5d, 0xdb, 0x5e, 0x91, 0x51,}}, /* Byte value: 0xb8 */ + {{0x34, 0xab, 0x3a, 0x7a, 0x85, 0x60, 0x5d, 0x12,}}, /* Byte value: 0xb9 */ + {{0x5d, 0x1b, 0x72, 0xcb, 0x89, 0x04, 0x80, 0x71,}}, /* Byte value: 0xba */ + {{0x84, 0x3c, 0x85, 0xc8, 0xfa, 0x8a, 0xee, 0x03,}}, /* Byte value: 0xbb */ + {{0x31, 0x1a, 0xf6, 0xe8, 0xd2, 0x11, 0x65, 0x8a,}}, /* Byte value: 0xbc */ + {{0xf9, 0x0d, 0x7b, 0x74, 0x69, 0xe9, 0xd3, 0x45,}}, /* Byte value: 0xbd */ + {{0x93, 0xd2, 0x77, 0x0a, 0xe9, 0xa2, 0xa7, 0xef,}}, /* Byte value: 0xbe */ + {{0x87, 0x53, 0xc1, 0x07, 0x76, 0xa5, 0x47, 0xca,}}, /* Byte value: 0xbf */ + {{0x9b, 0x39, 0x54, 0x67, 0x0e, 0xcb, 0x19, 0x92,}}, /* Byte value: 0xc0 */ + {{0x0d, 0x5a, 0xef, 0xff, 0xb0, 0x18, 0x86, 0xe5,}}, /* Byte value: 0xc1 */ + {{0xcf, 0xec, 0x39, 0x84, 0xa5, 0x02, 0x40, 0xd9,}}, /* Byte value: 0xc2 */ + {{0x6a, 0xdf, 0x0c, 0x7e, 0x80, 0x4b, 0x74, 0xaa,}}, /* Byte value: 0xc3 */ + {{0xbd, 0xcd, 0x50, 0x4d, 0xcf, 0xf2, 0x35, 0xf4,}}, /* Byte value: 0xc4 */ + {{0x33, 0x50, 0x8e, 0x62, 0x9b, 0x9a, 0xab, 0x04,}}, /* Byte value: 0xc5 */ + {{0xdb, 0x6d, 0x8f, 0x89, 0x3a, 0x05, 0xa0, 0xfc,}}, /* Byte value: 0xc6 */ + {{0xeb, 0x52, 0x45, 0x24, 0x2d, 0xb0, 0xa2, 0x31,}}, /* Byte value: 0xc7 */ + {{0xce, 0xc9, 0x05, 0xc1, 0x60, 0xa6, 0x27, 0x9e,}}, /* Byte value: 0xc8 */ + {{0x55, 0xf0, 0x51, 0xa6, 0x6e, 0x6d, 0x3e, 0x0c,}}, /* Byte value: 0xc9 */ + {{0x16, 0xcb, 0xce, 0x87, 0xd6, 0x8c, 0x2e, 0xab,}}, /* Byte value: 0xca */ + {{0xc5, 0x4d, 0x62, 0x63, 0x0b, 0xe0, 0x30, 0x2a,}}, /* Byte value: 0xcb */ + {{0x48, 0xbf, 0xf8, 0x83, 0xd3, 0xa7, 0x07, 0x13,}}, /* Byte value: 0xcc */ + {{0x2b, 0xae, 0xeb, 0xd5, 0x71, 0x21, 0xaa, 0x83,}}, /* Byte value: 0xcd */ + {{0x10, 0x15, 0x46, 0xda, 0x0d, 0xd2, 0xbf, 0xfa,}}, /* Byte value: 0xce */ + {{0xba, 0x36, 0xe4, 0x55, 0xd1, 0x08, 0xc3, 0xe2,}}, /* Byte value: 0xcf */ + {{0x79, 0xa5, 0x0e, 0x6b, 0x01, 0xb6, 0x62, 0x99,}}, /* Byte value: 0xd0 */ + {{0xb2, 0xdd, 0xc7, 0x38, 0x36, 0x61, 0x7d, 0x9f,}}, /* Byte value: 0xd1 */ + {{0x01, 0x25, 0x3c, 0x45, 0xc5, 0xa4, 0x67, 0x47,}}, /* Byte value: 0xd2 */ + {{0x04, 0x94, 0xf0, 0xd7, 0x92, 0xd5, 0x5f, 0xdf,}}, /* Byte value: 0xd3 */ + {{0xb8, 0x7c, 0x9c, 0xdf, 0x98, 0x83, 0x0d, 0x6c,}}, /* Byte value: 0xd4 */ + {{0xc9, 0x32, 0xb1, 0xd9, 0x7e, 0x5c, 0xd1, 0x88,}}, /* Byte value: 0xd5 */ + {{0xec, 0xa9, 0xf1, 0x3c, 0x33, 0x4a, 0x54, 0x27,}}, /* Byte value: 0xd6 */ + {{0x85, 0x19, 0xb9, 0x8d, 0x3f, 0x2e, 0x89, 0x44,}}, /* Byte value: 0xd7 */ + {{0xf4, 0x57, 0x94, 0x8b, 0xd9, 0xf1, 0x55, 0xa0,}}, /* Byte value: 0xd8 */ + {{0x44, 0xc0, 0x2b, 0x39, 0xa6, 0x1b, 0xe6, 0xb1,}}, /* Byte value: 0xd9 */ + {{0x5a, 0xe0, 0xc6, 0xd3, 0x97, 0xfe, 0x76, 0x67,}}, /* Byte value: 0xda */ + {{0x2f, 0x3a, 0x1b, 0x02, 0xe3, 0xf4, 0xf5, 0x5c,}}, /* Byte value: 0xdb */ + {{0x05, 0xb1, 0xcc, 0x92, 0x57, 0x71, 0x38, 0x98,}}, /* Byte value: 0xdc */ + {{0xd9, 0x27, 0xf7, 0x03, 0x73, 0x8e, 0x6e, 0x72,}}, /* Byte value: 0xdd */ + {{0x68, 0x95, 0x74, 0xf4, 0xc9, 0xc0, 0xba, 0x24,}}, /* Byte value: 0xde */ + {{0xad, 0xd8, 0x16, 0x97, 0xc2, 0x20, 0x8a, 0x0e,}}, /* Byte value: 0xdf */ + {{0x35, 0x8e, 0x06, 0x3f, 0x40, 0xc4, 0x3a, 0x55,}}, /* Byte value: 0xe0 */ + {{0x56, 0x9f, 0x15, 0x69, 0xe2, 0x42, 0x97, 0xc5,}}, /* Byte value: 0xe1 */ + {{0xc4, 0x68, 0x5e, 0x26, 0xce, 0x44, 0x57, 0x6d,}}, /* Byte value: 0xe2 */ + {{0xaf, 0x92, 0x6e, 0x1d, 0x8b, 0xab, 0x44, 0x80,}}, /* Byte value: 0xe3 */ + {{0x15, 0xa4, 0x8a, 0x48, 0x5a, 0xa3, 0x87, 0x62,}}, /* Byte value: 0xe4 */ + {{0x7c, 0x14, 0xc2, 0xf9, 0x56, 0xc7, 0x5a, 0x01,}}, /* Byte value: 0xe5 */ + {{0x6e, 0x4b, 0xfc, 0xa9, 0x12, 0x9e, 0x2b, 0x75,}}, /* Byte value: 0xe6 */ + {{0xd8, 0x02, 0xcb, 0x46, 0xb6, 0x2a, 0x09, 0x35,}}, /* Byte value: 0xe7 */ + {{0xf7, 0x38, 0xd0, 0x44, 0x55, 0xde, 0xfc, 0x69,}}, /* Byte value: 0xe8 */ + {{0x66, 0xa0, 0xdf, 0xc4, 0xf5, 0xf7, 0x95, 0x08,}}, /* Byte value: 0xe9 */ + {{0x89, 0x66, 0x6a, 0x37, 0x4a, 0x92, 0x68, 0xe6,}}, /* Byte value: 0xea */ + {{0x45, 0xe5, 0x17, 0x7c, 0x63, 0xbf, 0x81, 0xf6,}}, /* Byte value: 0xeb */ + {{0xef, 0xc6, 0xb5, 0xf3, 0xbf, 0x65, 0xfd, 0xee,}}, /* Byte value: 0xec */ + {{0x37, 0xc4, 0x7e, 0xb5, 0x09, 0x4f, 0xf4, 0xdb,}}, /* Byte value: 0xed */ + {{0x8d, 0xf2, 0x9a, 0xe0, 0xd8, 0x47, 0x37, 0x39,}}, /* Byte value: 0xee */ + {{0xb6, 0x49, 0x37, 0xef, 0xa4, 0xb4, 0x22, 0x40,}}, /* Byte value: 0xef */ + {{0xff, 0xd3, 0xf3, 0x29, 0xb2, 0xb7, 0x42, 0x14,}}, /* Byte value: 0xf0 */ + {{0x88, 0x43, 0x56, 0x72, 0x8f, 0x36, 0x0f, 0xa1,}}, /* Byte value: 0xf1 */ + {{0xea, 0x77, 0x79, 0x61, 0xe8, 0x14, 0xc5, 0x76,}}, /* Byte value: 0xf2 */ + {{0x62, 0x34, 0x2f, 0x13, 0x67, 0x22, 0xca, 0xd7,}}, /* Byte value: 0xf3 */ + {{0xe2, 0x9c, 0x5a, 0x0c, 0x0f, 0x7d, 0x7b, 0x0b,}}, /* Byte value: 0xf4 */ + {{0x3e, 0x0a, 0x61, 0x9d, 0x2b, 0x82, 0x2d, 0xe1,}}, /* Byte value: 0xf5 */ + {{0x54, 0xd5, 0x6d, 0xe3, 0xab, 0xc9, 0x59, 0x4b,}}, /* Byte value: 0xf6 */ + {{0xbe, 0xa2, 0x14, 0x82, 0x43, 0xdd, 0x9c, 0x3d,}}, /* Byte value: 0xf7 */ + {{0xb7, 0x6c, 0x0b, 0xaa, 0x61, 0x10, 0x45, 0x07,}}, /* Byte value: 0xf8 */ + {{0x36, 0xe1, 0x42, 0xf0, 0xcc, 0xeb, 0x93, 0x9c,}}, /* Byte value: 0xf9 */ + {{0xe6, 0x08, 0xaa, 0xdb, 0x9d, 0xa8, 0x24, 0xd4,}}, /* Byte value: 0xfa */ + {{0x99, 0x73, 0x2c, 0xed, 0x47, 0x40, 0xd7, 0x1c,}}, /* Byte value: 0xfb */ + {{0xa0, 0x82, 0xf9, 0x68, 0x72, 0x38, 0x0c, 0xeb,}}, /* Byte value: 0xfc */ + {{0x23, 0x45, 0xc8, 0xb8, 0x96, 0x48, 0x14, 0xfe,}}, /* Byte value: 0xfd */ + {{0x8a, 0x09, 0x2e, 0xf8, 0xc6, 0xbd, 0xc1, 0x2f,}}, /* Byte value: 0xfe */ + {{0x73, 0x04, 0x55, 0x8c, 0xaf, 0x54, 0x12, 0x6a,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 7 */ + {{0x5e, 0x59, 0x1d, 0x8d, 0x98, 0xfb, 0x33, 0x54,}}, /* Byte value: 0x00 */ + {{0x90, 0x76, 0xbe, 0x36, 0xc1, 0x08, 0x56, 0x5a,}}, /* Byte value: 0x01 */ + {{0xb8, 0xae, 0x1f, 0x39, 0x5b, 0xcb, 0x04, 0x4b,}}, /* Byte value: 0x02 */ + {{0x18, 0x48, 0xde, 0x05, 0x76, 0x41, 0x8f, 0x0f,}}, /* Byte value: 0x03 */ + {{0x76, 0x81, 0xbc, 0x82, 0x02, 0x38, 0x61, 0x45,}}, /* Byte value: 0x04 */ + {{0xc4, 0x19, 0x1a, 0xc8, 0x9e, 0xb3, 0x90, 0x9b,}}, /* Byte value: 0x05 */ + {{0x0d, 0x23, 0xf7, 0xdb, 0x11, 0x1f, 0x5f, 0xae,}}, /* Byte value: 0x06 */ + {{0x84, 0x1a, 0x0f, 0xd0, 0x8c, 0x88, 0x7f, 0xb3,}}, /* Byte value: 0x07 */ + {{0xc2, 0x0b, 0xcc, 0x58, 0x62, 0x32, 0xc3, 0xe8,}}, /* Byte value: 0x08 */ + {{0x34, 0x8c, 0x5a, 0xea, 0x44, 0x7c, 0xbf, 0xfd,}}, /* Byte value: 0x09 */ + {{0x31, 0x97, 0xe7, 0x32, 0xc6, 0x5c, 0x24, 0x56,}}, /* Byte value: 0x0a */ + {{0x24, 0xfc, 0xce, 0xec, 0xa1, 0x02, 0xf4, 0xf7,}}, /* Byte value: 0x0b */ + {{0xc3, 0x0c, 0x54, 0x60, 0x48, 0xec, 0x3a, 0xa0,}}, /* Byte value: 0x0c */ + {{0xc7, 0x10, 0x71, 0x80, 0xe0, 0x12, 0x58, 0x43,}}, /* Byte value: 0x0d */ + {{0x4a, 0x35, 0xac, 0x6b, 0xd5, 0x7b, 0x1a, 0xbd,}}, /* Byte value: 0x0e */ + {{0x07, 0x15, 0x4e, 0xa8, 0xd6, 0x5f, 0xaa, 0x3b,}}, /* Byte value: 0x0f */ + {{0x0c, 0x24, 0x6f, 0xe3, 0x3b, 0xc1, 0xa6, 0xe6,}}, /* Byte value: 0x10 */ + {{0x48, 0x3b, 0x5f, 0x1b, 0x81, 0x04, 0x2b, 0x2d,}}, /* Byte value: 0x11 */ + {{0x80, 0x06, 0x2a, 0x30, 0x24, 0x76, 0x1d, 0x50,}}, /* Byte value: 0x12 */ + {{0xd7, 0x60, 0xe5, 0x86, 0x05, 0x6c, 0x13, 0x49,}}, /* Byte value: 0x13 */ + {{0x69, 0xdc, 0x2c, 0x2f, 0xa2, 0x26, 0x44, 0x71,}}, /* Byte value: 0x14 */ + {{0xee, 0xcf, 0x48, 0xb7, 0x50, 0x0f, 0xf3, 0x1a,}}, /* Byte value: 0x15 */ + {{0xd8, 0x4d, 0xe1, 0x2d, 0x40, 0x0c, 0x7d, 0x77,}}, /* Byte value: 0x16 */ + {{0x1b, 0x41, 0xb5, 0x4d, 0x08, 0xe0, 0x47, 0xd7,}}, /* Byte value: 0x17 */ + {{0x77, 0x86, 0x24, 0xba, 0x28, 0xe6, 0x98, 0x0d,}}, /* Byte value: 0x18 */ + {{0x91, 0x71, 0x26, 0x0e, 0xeb, 0xd6, 0xaf, 0x12,}}, /* Byte value: 0x19 */ + {{0x73, 0x9a, 0x01, 0x5a, 0x80, 0x18, 0xfa, 0xee,}}, /* Byte value: 0x1a */ + {{0xe8, 0xdd, 0x9e, 0x27, 0xac, 0x8e, 0xa0, 0x69,}}, /* Byte value: 0x1b */ + {{0xa1, 0xe1, 0x59, 0x04, 0x07, 0x54, 0x72, 0x0c,}}, /* Byte value: 0x1c */ + {{0x53, 0x7a, 0xea, 0x56, 0x89, 0xe4, 0x6c, 0xfa,}}, /* Byte value: 0x1d */ + {{0xc9, 0x3a, 0xed, 0x13, 0x8f, 0xac, 0xcf, 0x35,}}, /* Byte value: 0x1e */ + {{0x8d, 0x25, 0xdd, 0xeb, 0x35, 0x69, 0x42, 0xfe,}}, /* Byte value: 0x1f */ + {{0xe7, 0xf0, 0x9a, 0x8c, 0xe9, 0xee, 0xce, 0x57,}}, /* Byte value: 0x20 */ + {{0x7f, 0xbe, 0x6e, 0xb9, 0xbb, 0xd9, 0x5c, 0x08,}}, /* Byte value: 0x21 */ + {{0x86, 0x14, 0xfc, 0xa0, 0xd8, 0xf7, 0x4e, 0x23,}}, /* Byte value: 0x22 */ + {{0x70, 0x93, 0x6a, 0x12, 0xfe, 0xb9, 0x32, 0x36,}}, /* Byte value: 0x23 */ + {{0x4e, 0x29, 0x89, 0x8b, 0x7d, 0x85, 0x78, 0x5e,}}, /* Byte value: 0x24 */ + {{0x1f, 0x5d, 0x90, 0xad, 0xa0, 0x1e, 0x25, 0x34,}}, /* Byte value: 0x25 */ + {{0x63, 0xea, 0x95, 0x5c, 0x65, 0x66, 0xb1, 0xe4,}}, /* Byte value: 0x26 */ + {{0xe6, 0xf7, 0x02, 0xb4, 0xc3, 0x30, 0x37, 0x1f,}}, /* Byte value: 0x27 */ + {{0xa7, 0xf3, 0x8f, 0x94, 0xfb, 0xd5, 0x21, 0x7f,}}, /* Byte value: 0x28 */ + {{0x35, 0x8b, 0xc2, 0xd2, 0x6e, 0xa2, 0x46, 0xb5,}}, /* Byte value: 0x29 */ + {{0x20, 0xe0, 0xeb, 0x0c, 0x09, 0xfc, 0x96, 0x14,}}, /* Byte value: 0x2a */ + {{0x0f, 0x2d, 0x04, 0xab, 0x45, 0x60, 0x6e, 0x3e,}}, /* Byte value: 0x2b */ + {{0x16, 0x62, 0x42, 0x96, 0x19, 0xff, 0x18, 0x79,}}, /* Byte value: 0x2c */ + {{0xf3, 0x9c, 0x2b, 0x6a, 0xa4, 0x6e, 0xe7, 0xbe,}}, /* Byte value: 0x2d */ + {{0xaf, 0xcb, 0xc5, 0x97, 0x68, 0xea, 0xe5, 0x7a,}}, /* Byte value: 0x2e */ + {{0x22, 0xee, 0x18, 0x7c, 0x5d, 0x83, 0xa7, 0x84,}}, /* Byte value: 0x2f */ + {{0xb9, 0xa9, 0x87, 0x01, 0x71, 0x15, 0xfd, 0x03,}}, /* Byte value: 0x30 */ + {{0x1e, 0x5a, 0x08, 0x95, 0x8a, 0xc0, 0xdc, 0x7c,}}, /* Byte value: 0x31 */ + {{0x25, 0xfb, 0x56, 0xd4, 0x8b, 0xdc, 0x0d, 0xbf,}}, /* Byte value: 0x32 */ + {{0xba, 0xa0, 0xec, 0x49, 0x0f, 0xb4, 0x35, 0xdb,}}, /* Byte value: 0x33 */ + {{0xbd, 0xb5, 0xa2, 0xe1, 0xd9, 0xeb, 0x9f, 0xe0,}}, /* Byte value: 0x34 */ + {{0x8e, 0x2c, 0xb6, 0xa3, 0x4b, 0xc8, 0x8a, 0x26,}}, /* Byte value: 0x35 */ + {{0x5c, 0x57, 0xee, 0xfd, 0xcc, 0x84, 0x02, 0xc4,}}, /* Byte value: 0x36 */ + {{0x41, 0x04, 0x8d, 0x20, 0x38, 0xe5, 0x16, 0x60,}}, /* Byte value: 0x37 */ + {{0x6f, 0xce, 0xfa, 0xbf, 0x5e, 0xa7, 0x17, 0x02,}}, /* Byte value: 0x38 */ + {{0x42, 0x0d, 0xe6, 0x68, 0x46, 0x44, 0xde, 0xb8,}}, /* Byte value: 0x39 */ + {{0x46, 0x11, 0xc3, 0x88, 0xee, 0xba, 0xbc, 0x5b,}}, /* Byte value: 0x3a */ + {{0x2b, 0xd1, 0xca, 0x47, 0xe4, 0x62, 0x9a, 0xc9,}}, /* Byte value: 0x3b */ + {{0xdc, 0x51, 0xc4, 0xcd, 0xe8, 0xf2, 0x1f, 0x94,}}, /* Byte value: 0x3c */ + {{0xdf, 0x58, 0xaf, 0x85, 0x96, 0x53, 0xd7, 0x4c,}}, /* Byte value: 0x3d */ + {{0x43, 0x0a, 0x7e, 0x50, 0x6c, 0x9a, 0x27, 0xf0,}}, /* Byte value: 0x3e */ + {{0xe3, 0xec, 0xbf, 0x6c, 0x41, 0x10, 0xac, 0xb4,}}, /* Byte value: 0x3f */ + {{0x29, 0xdf, 0x39, 0x37, 0xb0, 0x1d, 0xab, 0x59,}}, /* Byte value: 0x40 */ + {{0xb4, 0x8a, 0x70, 0xda, 0x60, 0x0a, 0xa2, 0xad,}}, /* Byte value: 0x41 */ + {{0xcb, 0x34, 0x1e, 0x63, 0xdb, 0xd3, 0xfe, 0xa5,}}, /* Byte value: 0x42 */ + {{0x32, 0x9e, 0x8c, 0x7a, 0xb8, 0xfd, 0xec, 0x8e,}}, /* Byte value: 0x43 */ + {{0xda, 0x43, 0x12, 0x5d, 0x14, 0x73, 0x4c, 0xe7,}}, /* Byte value: 0x44 */ + {{0xea, 0xd3, 0x6d, 0x57, 0xf8, 0xf1, 0x91, 0xf9,}}, /* Byte value: 0x45 */ + {{0xbe, 0xbc, 0xc9, 0xa9, 0xa7, 0x4a, 0x57, 0x38,}}, /* Byte value: 0x46 */ + {{0x03, 0x09, 0x6b, 0x48, 0x7e, 0xa1, 0xc8, 0xd8,}}, /* Byte value: 0x47 */ + {{0xa5, 0xfd, 0x7c, 0xe4, 0xaf, 0xaa, 0x10, 0xef,}}, /* Byte value: 0x48 */ + {{0xa4, 0xfa, 0xe4, 0xdc, 0x85, 0x74, 0xe9, 0xa7,}}, /* Byte value: 0x49 */ + {{0xab, 0xd7, 0xe0, 0x77, 0xc0, 0x14, 0x87, 0x99,}}, /* Byte value: 0x4a */ + {{0x64, 0xff, 0xdb, 0xf4, 0xb3, 0x39, 0x1b, 0xdf,}}, /* Byte value: 0x4b */ + {{0xad, 0xc5, 0x36, 0xe7, 0x3c, 0x95, 0xd4, 0xea,}}, /* Byte value: 0x4c */ + {{0x4f, 0x2e, 0x11, 0xb3, 0x57, 0x5b, 0x81, 0x16,}}, /* Byte value: 0x4d */ + {{0x85, 0x1d, 0x97, 0xe8, 0xa6, 0x56, 0x86, 0xfb,}}, /* Byte value: 0x4e */ + {{0xa0, 0xe6, 0xc1, 0x3c, 0x2d, 0x8a, 0x8b, 0x44,}}, /* Byte value: 0x4f */ + {{0x13, 0x79, 0xff, 0x4e, 0x9b, 0xdf, 0x83, 0xd2,}}, /* Byte value: 0x50 */ + {{0xd4, 0x69, 0x8e, 0xce, 0x7b, 0xcd, 0xdb, 0x91,}}, /* Byte value: 0x51 */ + {{0xfb, 0xa4, 0x61, 0x69, 0x37, 0x51, 0x23, 0xbb,}}, /* Byte value: 0x52 */ + {{0xae, 0xcc, 0x5d, 0xaf, 0x42, 0x34, 0x1c, 0x32,}}, /* Byte value: 0x53 */ + {{0x94, 0x6a, 0x9b, 0xd6, 0x69, 0xf6, 0x34, 0xb9,}}, /* Byte value: 0x54 */ + {{0xde, 0x5f, 0x37, 0xbd, 0xbc, 0x8d, 0x2e, 0x04,}}, /* Byte value: 0x55 */ + {{0xbb, 0xa7, 0x74, 0x71, 0x25, 0x6a, 0xcc, 0x93,}}, /* Byte value: 0x56 */ + {{0xce, 0x2f, 0xa3, 0xbb, 0x59, 0xf3, 0x65, 0x0e,}}, /* Byte value: 0x57 */ + {{0xa2, 0xe8, 0x32, 0x4c, 0x79, 0xf5, 0xba, 0xd4,}}, /* Byte value: 0x58 */ + {{0xf1, 0x92, 0xd8, 0x1a, 0xf0, 0x11, 0xd6, 0x2e,}}, /* Byte value: 0x59 */ + {{0x3d, 0xb3, 0x88, 0xd1, 0xfd, 0x9d, 0x82, 0xb0,}}, /* Byte value: 0x5a */ + {{0xb6, 0x84, 0x83, 0xaa, 0x34, 0x75, 0x93, 0x3d,}}, /* Byte value: 0x5b */ + {{0x61, 0xe4, 0x66, 0x2c, 0x31, 0x19, 0x80, 0x74,}}, /* Byte value: 0x5c */ + {{0x36, 0x82, 0xa9, 0x9a, 0x10, 0x03, 0x8e, 0x6d,}}, /* Byte value: 0x5d */ + {{0xec, 0xc1, 0xbb, 0xc7, 0x04, 0x70, 0xc2, 0x8a,}}, /* Byte value: 0x5e */ + {{0xc8, 0x3d, 0x75, 0x2b, 0xa5, 0x72, 0x36, 0x7d,}}, /* Byte value: 0x5f */ + {{0x52, 0x7d, 0x72, 0x6e, 0xa3, 0x3a, 0x95, 0xb2,}}, /* Byte value: 0x60 */ + {{0xb2, 0x98, 0xa6, 0x4a, 0x9c, 0x8b, 0xf1, 0xde,}}, /* Byte value: 0x61 */ + {{0xd0, 0x75, 0xab, 0x2e, 0xd3, 0x33, 0xb9, 0x72,}}, /* Byte value: 0x62 */ + {{0x72, 0x9d, 0x99, 0x62, 0xaa, 0xc6, 0x03, 0xa6,}}, /* Byte value: 0x63 */ + {{0xeb, 0xd4, 0xf5, 0x6f, 0xd2, 0x2f, 0x68, 0xb1,}}, /* Byte value: 0x64 */ + {{0x96, 0x64, 0x68, 0xa6, 0x3d, 0x89, 0x05, 0x29,}}, /* Byte value: 0x65 */ + {{0x0e, 0x2a, 0x9c, 0x93, 0x6f, 0xbe, 0x97, 0x76,}}, /* Byte value: 0x66 */ + {{0xe2, 0xeb, 0x27, 0x54, 0x6b, 0xce, 0x55, 0xfc,}}, /* Byte value: 0x67 */ + {{0x56, 0x61, 0x57, 0x8e, 0x0b, 0xc4, 0xf7, 0x51,}}, /* Byte value: 0x68 */ + {{0x4c, 0x27, 0x7a, 0xfb, 0x29, 0xfa, 0x49, 0xce,}}, /* Byte value: 0x69 */ + {{0x40, 0x03, 0x15, 0x18, 0x12, 0x3b, 0xef, 0x28,}}, /* Byte value: 0x6a */ + {{0x37, 0x85, 0x31, 0xa2, 0x3a, 0xdd, 0x77, 0x25,}}, /* Byte value: 0x6b */ + {{0x92, 0x78, 0x4d, 0x46, 0x95, 0x77, 0x67, 0xca,}}, /* Byte value: 0x6c */ + {{0x44, 0x1f, 0x30, 0xf8, 0xba, 0xc5, 0x8d, 0xcb,}}, /* Byte value: 0x6d */ + {{0x8f, 0x2b, 0x2e, 0x9b, 0x61, 0x16, 0x73, 0x6e,}}, /* Byte value: 0x6e */ + {{0x59, 0x4c, 0x53, 0x25, 0x4e, 0xa4, 0x99, 0x6f,}}, /* Byte value: 0x6f */ + {{0xdb, 0x44, 0x8a, 0x65, 0x3e, 0xad, 0xb5, 0xaf,}}, /* Byte value: 0x70 */ + {{0x6d, 0xc0, 0x09, 0xcf, 0x0a, 0xd8, 0x26, 0x92,}}, /* Byte value: 0x71 */ + {{0x8c, 0x22, 0x45, 0xd3, 0x1f, 0xb7, 0xbb, 0xb6,}}, /* Byte value: 0x72 */ + {{0xd3, 0x7c, 0xc0, 0x66, 0xad, 0x92, 0x71, 0xaa,}}, /* Byte value: 0x73 */ + {{0x88, 0x3e, 0x60, 0x33, 0xb7, 0x49, 0xd9, 0x55,}}, /* Byte value: 0x74 */ + {{0x47, 0x16, 0x5b, 0xb0, 0xc4, 0x64, 0x45, 0x13,}}, /* Byte value: 0x75 */ + {{0xe5, 0xfe, 0x69, 0xfc, 0xbd, 0x91, 0xff, 0xc7,}}, /* Byte value: 0x76 */ + {{0x2f, 0xcd, 0xef, 0xa7, 0x4c, 0x9c, 0xf8, 0x2a,}}, /* Byte value: 0x77 */ + {{0x12, 0x7e, 0x67, 0x76, 0xb1, 0x01, 0x7a, 0x9a,}}, /* Byte value: 0x78 */ + {{0x8b, 0x37, 0x0b, 0x7b, 0xc9, 0xe8, 0x11, 0x8d,}}, /* Byte value: 0x79 */ + {{0x11, 0x77, 0x0c, 0x3e, 0xcf, 0xa0, 0xb2, 0x42,}}, /* Byte value: 0x7a */ + {{0x54, 0x6f, 0xa4, 0xfe, 0x5f, 0xbb, 0xc6, 0xc1,}}, /* Byte value: 0x7b */ + {{0xa8, 0xde, 0x8b, 0x3f, 0xbe, 0xb5, 0x4f, 0x41,}}, /* Byte value: 0x7c */ + {{0x87, 0x13, 0x64, 0x98, 0xf2, 0x29, 0xb7, 0x6b,}}, /* Byte value: 0x7d */ + {{0x2d, 0xc3, 0x1c, 0xd7, 0x18, 0xe3, 0xc9, 0xba,}}, /* Byte value: 0x7e */ + {{0x5d, 0x50, 0x76, 0xc5, 0xe6, 0x5a, 0xfb, 0x8c,}}, /* Byte value: 0x7f */ + {{0x9d, 0x55, 0x49, 0xed, 0xd0, 0x17, 0x09, 0xf4,}}, /* Byte value: 0x80 */ + {{0x39, 0xaf, 0xad, 0x31, 0x55, 0x63, 0xe0, 0x53,}}, /* Byte value: 0x81 */ + {{0x5f, 0x5e, 0x85, 0xb5, 0xb2, 0x25, 0xca, 0x1c,}}, /* Byte value: 0x82 */ + {{0x26, 0xf2, 0x3d, 0x9c, 0xf5, 0x7d, 0xc5, 0x67,}}, /* Byte value: 0x83 */ + {{0x05, 0x1b, 0xbd, 0xd8, 0x82, 0x20, 0x9b, 0xab,}}, /* Byte value: 0x84 */ + {{0xd5, 0x6e, 0x16, 0xf6, 0x51, 0x13, 0x22, 0xd9,}}, /* Byte value: 0x85 */ + {{0xfc, 0xb1, 0x2f, 0xc1, 0xe1, 0x0e, 0x89, 0x80,}}, /* Byte value: 0x86 */ + {{0x19, 0x4f, 0x46, 0x3d, 0x5c, 0x9f, 0x76, 0x47,}}, /* Byte value: 0x87 */ + {{0x09, 0x3f, 0xd2, 0x3b, 0xb9, 0xe1, 0x3d, 0x4d,}}, /* Byte value: 0x88 */ + {{0xb3, 0x9f, 0x3e, 0x72, 0xb6, 0x55, 0x08, 0x96,}}, /* Byte value: 0x89 */ + {{0xfa, 0xa3, 0xf9, 0x51, 0x1d, 0x8f, 0xda, 0xf3,}}, /* Byte value: 0x8a */ + {{0xef, 0xc8, 0xd0, 0x8f, 0x7a, 0xd1, 0x0a, 0x52,}}, /* Byte value: 0x8b */ + {{0x0a, 0x36, 0xb9, 0x73, 0xc7, 0x40, 0xf5, 0x95,}}, /* Byte value: 0x8c */ + {{0x30, 0x90, 0x7f, 0x0a, 0xec, 0x82, 0xdd, 0x1e,}}, /* Byte value: 0x8d */ + {{0xcd, 0x26, 0xc8, 0xf3, 0x27, 0x52, 0xad, 0xd6,}}, /* Byte value: 0x8e */ + {{0xd6, 0x67, 0x7d, 0xbe, 0x2f, 0xb2, 0xea, 0x01,}}, /* Byte value: 0x8f */ + {{0x6b, 0xd2, 0xdf, 0x5f, 0xf6, 0x59, 0x75, 0xe1,}}, /* Byte value: 0x90 */ + {{0x08, 0x38, 0x4a, 0x03, 0x93, 0x3f, 0xc4, 0x05,}}, /* Byte value: 0x91 */ + {{0xb5, 0x8d, 0xe8, 0xe2, 0x4a, 0xd4, 0x5b, 0xe5,}}, /* Byte value: 0x92 */ + {{0x6e, 0xc9, 0x62, 0x87, 0x74, 0x79, 0xee, 0x4a,}}, /* Byte value: 0x93 */ + {{0x65, 0xf8, 0x43, 0xcc, 0x99, 0xe7, 0xe2, 0x97,}}, /* Byte value: 0x94 */ + {{0xf5, 0x8e, 0xfd, 0xfa, 0x58, 0xef, 0xb4, 0xcd,}}, /* Byte value: 0x95 */ + {{0xaa, 0xd0, 0x78, 0x4f, 0xea, 0xca, 0x7e, 0xd1,}}, /* Byte value: 0x96 */ + {{0x74, 0x8f, 0x4f, 0xf2, 0x56, 0x47, 0x50, 0xd5,}}, /* Byte value: 0x97 */ + {{0x4b, 0x32, 0x34, 0x53, 0xff, 0xa5, 0xe3, 0xf5,}}, /* Byte value: 0x98 */ + {{0xff, 0xb8, 0x44, 0x89, 0x9f, 0xaf, 0x41, 0x58,}}, /* Byte value: 0x99 */ + {{0x81, 0x01, 0xb2, 0x08, 0x0e, 0xa8, 0xe4, 0x18,}}, /* Byte value: 0x9a */ + {{0xc1, 0x02, 0xa7, 0x10, 0x1c, 0x93, 0x0b, 0x30,}}, /* Byte value: 0x9b */ + {{0xd1, 0x72, 0x33, 0x16, 0xf9, 0xed, 0x40, 0x3a,}}, /* Byte value: 0x9c */ + {{0x28, 0xd8, 0xa1, 0x0f, 0x9a, 0xc3, 0x52, 0x11,}}, /* Byte value: 0x9d */ + {{0xb1, 0x91, 0xcd, 0x02, 0xe2, 0x2a, 0x39, 0x06,}}, /* Byte value: 0x9e */ + {{0x9b, 0x47, 0x9f, 0x7d, 0x2c, 0x96, 0x5a, 0x87,}}, /* Byte value: 0x9f */ + {{0xdd, 0x56, 0x5c, 0xf5, 0xc2, 0x2c, 0xe6, 0xdc,}}, /* Byte value: 0xa0 */ + {{0x23, 0xe9, 0x80, 0x44, 0x77, 0x5d, 0x5e, 0xcc,}}, /* Byte value: 0xa1 */ + {{0x3f, 0xbd, 0x7b, 0xa1, 0xa9, 0xe2, 0xb3, 0x20,}}, /* Byte value: 0xa2 */ + {{0x02, 0x0e, 0xf3, 0x70, 0x54, 0x7f, 0x31, 0x90,}}, /* Byte value: 0xa3 */ + {{0x10, 0x70, 0x94, 0x06, 0xe5, 0x7e, 0x4b, 0x0a,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x1a, 0x46, 0x2d, 0x75, 0x22, 0x3e, 0xbe, 0x9f,}}, /* Byte value: 0xa6 */ + {{0x60, 0xe3, 0xfe, 0x14, 0x1b, 0xc7, 0x79, 0x3c,}}, /* Byte value: 0xa7 */ + {{0x5a, 0x45, 0x38, 0x6d, 0x30, 0x05, 0x51, 0xb7,}}, /* Byte value: 0xa8 */ + {{0x3e, 0xba, 0xe3, 0x99, 0x83, 0x3c, 0x4a, 0x68,}}, /* Byte value: 0xa9 */ + {{0x6a, 0xd5, 0x47, 0x67, 0xdc, 0x87, 0x8c, 0xa9,}}, /* Byte value: 0xaa */ + {{0x71, 0x94, 0xf2, 0x2a, 0xd4, 0x67, 0xcb, 0x7e,}}, /* Byte value: 0xab */ + {{0x75, 0x88, 0xd7, 0xca, 0x7c, 0x99, 0xa9, 0x9d,}}, /* Byte value: 0xac */ + {{0xb7, 0x83, 0x1b, 0x92, 0x1e, 0xab, 0x6a, 0x75,}}, /* Byte value: 0xad */ + {{0x7a, 0xa5, 0xd3, 0x61, 0x39, 0xf9, 0xc7, 0xa3,}}, /* Byte value: 0xae */ + {{0xd9, 0x4a, 0x79, 0x15, 0x6a, 0xd2, 0x84, 0x3f,}}, /* Byte value: 0xaf */ + {{0x6c, 0xc7, 0x91, 0xf7, 0x20, 0x06, 0xdf, 0xda,}}, /* Byte value: 0xb0 */ + {{0x93, 0x7f, 0xd5, 0x7e, 0xbf, 0xa9, 0x9e, 0x82,}}, /* Byte value: 0xb1 */ + {{0x45, 0x18, 0xa8, 0xc0, 0x90, 0x1b, 0x74, 0x83,}}, /* Byte value: 0xb2 */ + {{0x9a, 0x40, 0x07, 0x45, 0x06, 0x48, 0xa3, 0xcf,}}, /* Byte value: 0xb3 */ + {{0x89, 0x39, 0xf8, 0x0b, 0x9d, 0x97, 0x20, 0x1d,}}, /* Byte value: 0xb4 */ + {{0x3a, 0xa6, 0xc6, 0x79, 0x2b, 0xc2, 0x28, 0x8b,}}, /* Byte value: 0xb5 */ + {{0x78, 0xab, 0x20, 0x11, 0x6d, 0x86, 0xf6, 0x33,}}, /* Byte value: 0xb6 */ + {{0x1d, 0x53, 0x63, 0xdd, 0xf4, 0x61, 0x14, 0xa4,}}, /* Byte value: 0xb7 */ + {{0x8a, 0x30, 0x93, 0x43, 0xe3, 0x36, 0xe8, 0xc5,}}, /* Byte value: 0xb8 */ + {{0x97, 0x63, 0xf0, 0x9e, 0x17, 0x57, 0xfc, 0x61,}}, /* Byte value: 0xb9 */ + {{0xf8, 0xad, 0x0a, 0x21, 0x49, 0xf0, 0xeb, 0x63,}}, /* Byte value: 0xba */ + {{0xf9, 0xaa, 0x92, 0x19, 0x63, 0x2e, 0x12, 0x2b,}}, /* Byte value: 0xbb */ + {{0x58, 0x4b, 0xcb, 0x1d, 0x64, 0x7a, 0x60, 0x27,}}, /* Byte value: 0xbc */ + {{0x2c, 0xc4, 0x84, 0xef, 0x32, 0x3d, 0x30, 0xf2,}}, /* Byte value: 0xbd */ + {{0x06, 0x12, 0xd6, 0x90, 0xfc, 0x81, 0x53, 0x73,}}, /* Byte value: 0xbe */ + {{0xbc, 0xb2, 0x3a, 0xd9, 0xf3, 0x35, 0x66, 0xa8,}}, /* Byte value: 0xbf */ + {{0x9c, 0x52, 0xd1, 0xd5, 0xfa, 0xc9, 0xf0, 0xbc,}}, /* Byte value: 0xc0 */ + {{0x55, 0x68, 0x3c, 0xc6, 0x75, 0x65, 0x3f, 0x89,}}, /* Byte value: 0xc1 */ + {{0x7c, 0xb7, 0x05, 0xf1, 0xc5, 0x78, 0x94, 0xd0,}}, /* Byte value: 0xc2 */ + {{0x2a, 0xd6, 0x52, 0x7f, 0xce, 0xbc, 0x63, 0x81,}}, /* Byte value: 0xc3 */ + {{0x3b, 0xa1, 0x5e, 0x41, 0x01, 0x1c, 0xd1, 0xc3,}}, /* Byte value: 0xc4 */ + {{0x9f, 0x5b, 0xba, 0x9d, 0x84, 0x68, 0x38, 0x64,}}, /* Byte value: 0xc5 */ + {{0xc6, 0x17, 0xe9, 0xb8, 0xca, 0xcc, 0xa1, 0x0b,}}, /* Byte value: 0xc6 */ + {{0x1c, 0x54, 0xfb, 0xe5, 0xde, 0xbf, 0xed, 0xec,}}, /* Byte value: 0xc7 */ + {{0xfe, 0xbf, 0xdc, 0xb1, 0xb5, 0x71, 0xb8, 0x10,}}, /* Byte value: 0xc8 */ + {{0x62, 0xed, 0x0d, 0x64, 0x4f, 0xb8, 0x48, 0xac,}}, /* Byte value: 0xc9 */ + {{0x7d, 0xb0, 0x9d, 0xc9, 0xef, 0xa6, 0x6d, 0x98,}}, /* Byte value: 0xca */ + {{0x21, 0xe7, 0x73, 0x34, 0x23, 0x22, 0x6f, 0x5c,}}, /* Byte value: 0xcb */ + {{0xc0, 0x05, 0x3f, 0x28, 0x36, 0x4d, 0xf2, 0x78,}}, /* Byte value: 0xcc */ + {{0xf2, 0x9b, 0xb3, 0x52, 0x8e, 0xb0, 0x1e, 0xf6,}}, /* Byte value: 0xcd */ + {{0xf7, 0x80, 0x0e, 0x8a, 0x0c, 0x90, 0x85, 0x5d,}}, /* Byte value: 0xce */ + {{0x33, 0x99, 0x14, 0x42, 0x92, 0x23, 0x15, 0xc6,}}, /* Byte value: 0xcf */ + {{0x98, 0x4e, 0xf4, 0x35, 0x52, 0x37, 0x92, 0x5f,}}, /* Byte value: 0xd0 */ + {{0xa9, 0xd9, 0x13, 0x07, 0x94, 0x6b, 0xb6, 0x09,}}, /* Byte value: 0xd1 */ + {{0x82, 0x08, 0xd9, 0x40, 0x70, 0x09, 0x2c, 0xc0,}}, /* Byte value: 0xd2 */ + {{0x4d, 0x20, 0xe2, 0xc3, 0x03, 0x24, 0xb0, 0x86,}}, /* Byte value: 0xd3 */ + {{0xf4, 0x89, 0x65, 0xc2, 0x72, 0x31, 0x4d, 0x85,}}, /* Byte value: 0xd4 */ + {{0xf6, 0x87, 0x96, 0xb2, 0x26, 0x4e, 0x7c, 0x15,}}, /* Byte value: 0xd5 */ + {{0x14, 0x6c, 0xb1, 0xe6, 0x4d, 0x80, 0x29, 0xe9,}}, /* Byte value: 0xd6 */ + {{0x7b, 0xa2, 0x4b, 0x59, 0x13, 0x27, 0x3e, 0xeb,}}, /* Byte value: 0xd7 */ + {{0x79, 0xac, 0xb8, 0x29, 0x47, 0x58, 0x0f, 0x7b,}}, /* Byte value: 0xd8 */ + {{0x17, 0x65, 0xda, 0xae, 0x33, 0x21, 0xe1, 0x31,}}, /* Byte value: 0xd9 */ + {{0xf0, 0x95, 0x40, 0x22, 0xda, 0xcf, 0x2f, 0x66,}}, /* Byte value: 0xda */ + {{0xbf, 0xbb, 0x51, 0x91, 0x8d, 0x94, 0xae, 0x70,}}, /* Byte value: 0xdb */ + {{0xcf, 0x28, 0x3b, 0x83, 0x73, 0x2d, 0x9c, 0x46,}}, /* Byte value: 0xdc */ + {{0x01, 0x07, 0x98, 0x38, 0x2a, 0xde, 0xf9, 0x48,}}, /* Byte value: 0xdd */ + {{0xed, 0xc6, 0x23, 0xff, 0x2e, 0xae, 0x3b, 0xc2,}}, /* Byte value: 0xde */ + {{0xcc, 0x21, 0x50, 0xcb, 0x0d, 0x8c, 0x54, 0x9e,}}, /* Byte value: 0xdf */ + {{0x15, 0x6b, 0x29, 0xde, 0x67, 0x5e, 0xd0, 0xa1,}}, /* Byte value: 0xe0 */ + {{0x27, 0xf5, 0xa5, 0xa4, 0xdf, 0xa3, 0x3c, 0x2f,}}, /* Byte value: 0xe1 */ + {{0xa3, 0xef, 0xaa, 0x74, 0x53, 0x2b, 0x43, 0x9c,}}, /* Byte value: 0xe2 */ + {{0x0b, 0x31, 0x21, 0x4b, 0xed, 0x9e, 0x0c, 0xdd,}}, /* Byte value: 0xe3 */ + {{0x38, 0xa8, 0x35, 0x09, 0x7f, 0xbd, 0x19, 0x1b,}}, /* Byte value: 0xe4 */ + {{0x57, 0x66, 0xcf, 0xb6, 0x21, 0x1a, 0x0e, 0x19,}}, /* Byte value: 0xe5 */ + {{0x67, 0xf6, 0xb0, 0xbc, 0xcd, 0x98, 0xd3, 0x07,}}, /* Byte value: 0xe6 */ + {{0x83, 0x0f, 0x41, 0x78, 0x5a, 0xd7, 0xd5, 0x88,}}, /* Byte value: 0xe7 */ + {{0x3c, 0xb4, 0x10, 0xe9, 0xd7, 0x43, 0x7b, 0xf8,}}, /* Byte value: 0xe8 */ + {{0xfd, 0xb6, 0xb7, 0xf9, 0xcb, 0xd0, 0x70, 0xc8,}}, /* Byte value: 0xe9 */ + {{0xac, 0xc2, 0xae, 0xdf, 0x16, 0x4b, 0x2d, 0xa2,}}, /* Byte value: 0xea */ + {{0x95, 0x6d, 0x03, 0xee, 0x43, 0x28, 0xcd, 0xf1,}}, /* Byte value: 0xeb */ + {{0x51, 0x74, 0x19, 0x26, 0xdd, 0x9b, 0x5d, 0x6a,}}, /* Byte value: 0xec */ + {{0xd2, 0x7b, 0x58, 0x5e, 0x87, 0x4c, 0x88, 0xe2,}}, /* Byte value: 0xed */ + {{0xe1, 0xe2, 0x4c, 0x1c, 0x15, 0x6f, 0x9d, 0x24,}}, /* Byte value: 0xee */ + {{0xe4, 0xf9, 0xf1, 0xc4, 0x97, 0x4f, 0x06, 0x8f,}}, /* Byte value: 0xef */ + {{0xa6, 0xf4, 0x17, 0xac, 0xd1, 0x0b, 0xd8, 0x37,}}, /* Byte value: 0xf0 */ + {{0x2e, 0xca, 0x77, 0x9f, 0x66, 0x42, 0x01, 0x62,}}, /* Byte value: 0xf1 */ + {{0x9e, 0x5c, 0x22, 0xa5, 0xae, 0xb6, 0xc1, 0x2c,}}, /* Byte value: 0xf2 */ + {{0xb0, 0x96, 0x55, 0x3a, 0xc8, 0xf4, 0xc0, 0x4e,}}, /* Byte value: 0xf3 */ + {{0x04, 0x1c, 0x25, 0xe0, 0xa8, 0xfe, 0x62, 0xe3,}}, /* Byte value: 0xf4 */ + {{0xca, 0x33, 0x86, 0x5b, 0xf1, 0x0d, 0x07, 0xed,}}, /* Byte value: 0xf5 */ + {{0xe0, 0xe5, 0xd4, 0x24, 0x3f, 0xb1, 0x64, 0x6c,}}, /* Byte value: 0xf6 */ + {{0x7e, 0xb9, 0xf6, 0x81, 0x91, 0x07, 0xa5, 0x40,}}, /* Byte value: 0xf7 */ + {{0x66, 0xf1, 0x28, 0x84, 0xe7, 0x46, 0x2a, 0x4f,}}, /* Byte value: 0xf8 */ + {{0x50, 0x73, 0x81, 0x1e, 0xf7, 0x45, 0xa4, 0x22,}}, /* Byte value: 0xf9 */ + {{0x49, 0x3c, 0xc7, 0x23, 0xab, 0xda, 0xd2, 0x65,}}, /* Byte value: 0xfa */ + {{0x5b, 0x42, 0xa0, 0x55, 0x1a, 0xdb, 0xa8, 0xff,}}, /* Byte value: 0xfb */ + {{0x99, 0x49, 0x6c, 0x0d, 0x78, 0xe9, 0x6b, 0x17,}}, /* Byte value: 0xfc */ + {{0x68, 0xdb, 0xb4, 0x17, 0x88, 0xf8, 0xbd, 0x39,}}, /* Byte value: 0xfd */ + {{0xe9, 0xda, 0x06, 0x1f, 0x86, 0x50, 0x59, 0x21,}}, /* Byte value: 0xfe */ + {{0xc5, 0x1e, 0x82, 0xf0, 0xb4, 0x6d, 0x69, 0xd3,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 8 */ + {{0xd7, 0x48, 0x12, 0xa3, 0xbe, 0x29, 0x25, 0xd9,}}, /* Byte value: 0x00 */ + {{0x63, 0x44, 0x11, 0xde, 0x60, 0x0e, 0x82, 0x6c,}}, /* Byte value: 0x01 */ + {{0x5e, 0x13, 0x74, 0x22, 0x3d, 0x0d, 0xaf, 0x72,}}, /* Byte value: 0x02 */ + {{0xaa, 0x8c, 0x23, 0x54, 0x8a, 0x01, 0x1b, 0x0a,}}, /* Byte value: 0x03 */ + {{0xea, 0x1f, 0x77, 0x5f, 0xe3, 0x2a, 0x08, 0xc7,}}, /* Byte value: 0x04 */ + {{0x2a, 0x69, 0x8b, 0x42, 0x58, 0x57, 0x3d, 0x53,}}, /* Byte value: 0x05 */ + {{0x29, 0x16, 0xe4, 0x73, 0x84, 0x86, 0x44, 0x75,}}, /* Byte value: 0x06 */ + {{0x9c, 0x8e, 0xc2, 0xa0, 0xaf, 0xee, 0x75, 0x63,}}, /* Byte value: 0x07 */ + {{0xe1, 0x4a, 0xf3, 0x57, 0x9b, 0xc6, 0x4b, 0xb0,}}, /* Byte value: 0x08 */ + {{0xa4, 0x58, 0x16, 0x0f, 0x55, 0x5d, 0xd3, 0x17,}}, /* Byte value: 0x09 */ + {{0xeb, 0x8b, 0x52, 0xf1, 0x16, 0x65, 0x9e, 0x64,}}, /* Byte value: 0x0a */ + {{0x68, 0x11, 0x95, 0xd6, 0x18, 0xe2, 0xc1, 0x1b,}}, /* Byte value: 0x0b */ + {{0x9d, 0x1a, 0xe7, 0x0e, 0x5a, 0xa1, 0xe3, 0xc0,}}, /* Byte value: 0x0c */ + {{0xae, 0x99, 0xb7, 0xa9, 0xd8, 0xfe, 0x06, 0xc3,}}, /* Byte value: 0x0d */ + {{0x28, 0x82, 0xc1, 0xdd, 0x71, 0xc9, 0xd2, 0xd6,}}, /* Byte value: 0x0e */ + {{0xb7, 0x73, 0x6c, 0x4c, 0x02, 0xf6, 0xde, 0x93,}}, /* Byte value: 0x0f */ + {{0x55, 0x46, 0xf0, 0x2a, 0x45, 0xe1, 0xec, 0x05,}}, /* Byte value: 0x10 */ + {{0xd0, 0x22, 0xe9, 0x6f, 0x30, 0x07, 0x41, 0x36,}}, /* Byte value: 0x11 */ + {{0xaf, 0x0d, 0x92, 0x07, 0x2d, 0xb1, 0x90, 0x60,}}, /* Byte value: 0x12 */ + {{0x62, 0xd0, 0x34, 0x70, 0x95, 0x41, 0x14, 0xcf,}}, /* Byte value: 0x13 */ + {{0xf7, 0xe0, 0x38, 0x47, 0x6b, 0xdd, 0xcd, 0x5e,}}, /* Byte value: 0x14 */ + {{0xef, 0x9e, 0xc6, 0x0c, 0x44, 0x9a, 0x83, 0xad,}}, /* Byte value: 0x15 */ + {{0xb3, 0x66, 0xf8, 0xb1, 0x50, 0x09, 0xc3, 0x5a,}}, /* Byte value: 0x16 */ + {{0x2e, 0x7c, 0x1f, 0xbf, 0x0a, 0xa8, 0x20, 0x9a,}}, /* Byte value: 0x17 */ + {{0x96, 0x4f, 0x63, 0x06, 0x22, 0x4d, 0xa0, 0xb7,}}, /* Byte value: 0x18 */ + {{0x1f, 0x14, 0x05, 0x87, 0xa1, 0x69, 0x2a, 0x1c,}}, /* Byte value: 0x19 */ + {{0xa5, 0xcc, 0x33, 0xa1, 0xa0, 0x12, 0x45, 0xb4,}}, /* Byte value: 0x1a */ + {{0x24, 0xbd, 0xbe, 0x19, 0x87, 0x0b, 0xf5, 0x4e,}}, /* Byte value: 0x1b */ + {{0x88, 0xcf, 0x43, 0x2f, 0x76, 0x6b, 0x1c, 0x08,}}, /* Byte value: 0x1c */ + {{0xfe, 0x5e, 0xf6, 0xd0, 0x3a, 0xaf, 0x61, 0xac,}}, /* Byte value: 0x1d */ + {{0x03, 0x7f, 0x6f, 0x31, 0xdc, 0xd1, 0x79, 0x26,}}, /* Byte value: 0x1e */ + {{0x86, 0x1b, 0x76, 0x74, 0xa9, 0x37, 0xd4, 0x15,}}, /* Byte value: 0x1f */ + {{0xf5, 0x0b, 0x72, 0xd8, 0x42, 0x43, 0x22, 0xdb,}}, /* Byte value: 0x20 */ + {{0xf0, 0x8a, 0xc3, 0x8b, 0xe5, 0xf3, 0xa9, 0xb1,}}, /* Byte value: 0x21 */ + {{0x64, 0x2e, 0xea, 0x12, 0xee, 0x20, 0xe6, 0x83,}}, /* Byte value: 0x22 */ + {{0x21, 0x3c, 0x0f, 0x4a, 0x20, 0xbb, 0x7e, 0x24,}}, /* Byte value: 0x23 */ + {{0x1b, 0x01, 0x91, 0x7a, 0xf3, 0x96, 0x37, 0xd5,}}, /* Byte value: 0x24 */ + {{0x1d, 0xff, 0x4f, 0x18, 0x88, 0xf7, 0xc5, 0x99,}}, /* Byte value: 0x25 */ + {{0x69, 0x85, 0xb0, 0x78, 0xed, 0xad, 0x57, 0xb8,}}, /* Byte value: 0x26 */ + {{0x89, 0x5b, 0x66, 0x81, 0x83, 0x24, 0x8a, 0xab,}}, /* Byte value: 0x27 */ + {{0x43, 0xec, 0x3b, 0x3a, 0xb5, 0xfa, 0x6a, 0xeb,}}, /* Byte value: 0x28 */ + {{0xd8, 0x08, 0x02, 0x56, 0x94, 0x3a, 0x7b, 0x67,}}, /* Byte value: 0x29 */ + {{0x5b, 0x92, 0xc5, 0x71, 0x9a, 0xbd, 0x24, 0x18,}}, /* Byte value: 0x2a */ + {{0xd1, 0xb6, 0xcc, 0xc1, 0xc5, 0x48, 0xd7, 0x95,}}, /* Byte value: 0x2b */ + {{0x07, 0x6a, 0xfb, 0xcc, 0x8e, 0x2e, 0x64, 0xef,}}, /* Byte value: 0x2c */ + {{0x0a, 0xc1, 0xa1, 0xa6, 0x8d, 0xa3, 0xd5, 0xd4,}}, /* Byte value: 0x2d */ + {{0x25, 0x29, 0x9b, 0xb7, 0x72, 0x44, 0x63, 0xed,}}, /* Byte value: 0x2e */ + {{0xa3, 0x32, 0xed, 0xc3, 0xdb, 0x73, 0xb7, 0xf8,}}, /* Byte value: 0x2f */ + {{0x22, 0x43, 0x60, 0x7b, 0xfc, 0x6a, 0x07, 0x02,}}, /* Byte value: 0x30 */ + {{0x61, 0xaf, 0x5b, 0x41, 0x49, 0x90, 0x6d, 0xe9,}}, /* Byte value: 0x31 */ + {{0x14, 0x41, 0x81, 0x8f, 0xd9, 0x85, 0x69, 0x6b,}}, /* Byte value: 0x32 */ + {{0xa6, 0xb3, 0x5c, 0x90, 0x7c, 0xc3, 0x3c, 0x92,}}, /* Byte value: 0x33 */ + {{0x11, 0xc0, 0x30, 0xdc, 0x7e, 0x35, 0xe2, 0x01,}}, /* Byte value: 0x34 */ + {{0x02, 0xeb, 0x4a, 0x9f, 0x29, 0x9e, 0xef, 0x85,}}, /* Byte value: 0x35 */ + {{0x2f, 0xe8, 0x3a, 0x11, 0xff, 0xe7, 0xb6, 0x39,}}, /* Byte value: 0x36 */ + {{0xca, 0xb7, 0x5d, 0xbb, 0x36, 0xde, 0xe0, 0x40,}}, /* Byte value: 0x37 */ + {{0x3c, 0xc3, 0x40, 0x52, 0xa8, 0x4c, 0xbb, 0xbd,}}, /* Byte value: 0x38 */ + {{0x4e, 0x47, 0x61, 0x50, 0xb6, 0x77, 0xdb, 0xd0,}}, /* Byte value: 0x39 */ + {{0x7d, 0xc4, 0x31, 0xf7, 0x34, 0x28, 0x3e, 0xd3,}}, /* Byte value: 0x3a */ + {{0xb9, 0xa7, 0x59, 0x17, 0xdd, 0xaa, 0x16, 0x8e,}}, /* Byte value: 0x3b */ + {{0x80, 0xe5, 0xa8, 0x16, 0xd2, 0x56, 0x26, 0x59,}}, /* Byte value: 0x3c */ + {{0x04, 0x15, 0x94, 0xfd, 0x52, 0xff, 0x1d, 0xc9,}}, /* Byte value: 0x3d */ + {{0x32, 0x17, 0x75, 0x09, 0x77, 0x10, 0x73, 0xa0,}}, /* Byte value: 0x3e */ + {{0xc6, 0x88, 0x22, 0x7f, 0xc0, 0x1c, 0xc7, 0xd8,}}, /* Byte value: 0x3f */ + {{0x41, 0x07, 0x71, 0xa5, 0x9c, 0x64, 0x85, 0x6e,}}, /* Byte value: 0x40 */ + {{0x0b, 0x55, 0x84, 0x08, 0x78, 0xec, 0x43, 0x77,}}, /* Byte value: 0x41 */ + {{0xfb, 0xdf, 0x47, 0x83, 0x9d, 0x1f, 0xea, 0xc6,}}, /* Byte value: 0x42 */ + {{0x6f, 0x7b, 0x6e, 0x1a, 0x96, 0xcc, 0xa5, 0xf4,}}, /* Byte value: 0x43 */ + {{0x4b, 0xc6, 0xd0, 0x03, 0x11, 0xc7, 0x50, 0xba,}}, /* Byte value: 0x44 */ + {{0xdc, 0x1d, 0x96, 0xab, 0xc6, 0xc5, 0x66, 0xae,}}, /* Byte value: 0x45 */ + {{0x95, 0x30, 0x0c, 0x37, 0xfe, 0x9c, 0xd9, 0x91,}}, /* Byte value: 0x46 */ + {{0x84, 0xf0, 0x3c, 0xeb, 0x80, 0xa9, 0x3b, 0x90,}}, /* Byte value: 0x47 */ + {{0xbb, 0x4c, 0x13, 0x88, 0xf4, 0x34, 0xf9, 0x0b,}}, /* Byte value: 0x48 */ + {{0xc7, 0x1c, 0x07, 0xd1, 0x35, 0x53, 0x51, 0x7b,}}, /* Byte value: 0x49 */ + {{0x16, 0xaa, 0xcb, 0x10, 0xf0, 0x1b, 0x86, 0xee,}}, /* Byte value: 0x4a */ + {{0xde, 0xf6, 0xdc, 0x34, 0xef, 0x5b, 0x89, 0x2b,}}, /* Byte value: 0x4b */ + {{0xdd, 0x89, 0xb3, 0x05, 0x33, 0x8a, 0xf0, 0x0d,}}, /* Byte value: 0x4c */ + {{0x67, 0x51, 0x85, 0x23, 0x32, 0xf1, 0x9f, 0xa5,}}, /* Byte value: 0x4d */ + {{0xe0, 0xde, 0xd6, 0xf9, 0x6e, 0x89, 0xdd, 0x13,}}, /* Byte value: 0x4e */ + {{0xf4, 0x9f, 0x57, 0x76, 0xb7, 0x0c, 0xb4, 0x78,}}, /* Byte value: 0x4f */ + {{0x48, 0xb9, 0xbf, 0x32, 0xcd, 0x16, 0x29, 0x9c,}}, /* Byte value: 0x50 */ + {{0xe6, 0x20, 0x08, 0x9b, 0x15, 0xe8, 0x2f, 0x5f,}}, /* Byte value: 0x51 */ + {{0x6c, 0x04, 0x01, 0x2b, 0x4a, 0x1d, 0xdc, 0xd2,}}, /* Byte value: 0x52 */ + {{0x59, 0x79, 0x8f, 0xee, 0xb3, 0x23, 0xcb, 0x9d,}}, /* Byte value: 0x53 */ + {{0x50, 0xc7, 0x41, 0x79, 0xe2, 0x51, 0x67, 0x6f,}}, /* Byte value: 0x54 */ + {{0x78, 0x45, 0x80, 0xa4, 0x93, 0x98, 0xb5, 0xb9,}}, /* Byte value: 0x55 */ + {{0xda, 0xe3, 0x48, 0xc9, 0xbd, 0xa4, 0x94, 0xe2,}}, /* Byte value: 0x56 */ + {{0xb4, 0x0c, 0x03, 0x7d, 0xde, 0x27, 0xa7, 0xb5,}}, /* Byte value: 0x57 */ + {{0x0c, 0x3f, 0x7f, 0xc4, 0xf6, 0xc2, 0x27, 0x98,}}, /* Byte value: 0x58 */ + {{0xf2, 0x61, 0x89, 0x14, 0xcc, 0x6d, 0x46, 0x34,}}, /* Byte value: 0x59 */ + {{0xbe, 0xcd, 0xa2, 0xdb, 0x53, 0x84, 0x72, 0x61,}}, /* Byte value: 0x5a */ + {{0xf3, 0xf5, 0xac, 0xba, 0x39, 0x22, 0xd0, 0x97,}}, /* Byte value: 0x5b */ + {{0x91, 0x25, 0x98, 0xca, 0xac, 0x63, 0xc4, 0x58,}}, /* Byte value: 0x5c */ + {{0x5c, 0xf8, 0x3e, 0xbd, 0x14, 0x93, 0x40, 0xf7,}}, /* Byte value: 0x5d */ + {{0x17, 0x3e, 0xee, 0xbe, 0x05, 0x54, 0x10, 0x4d,}}, /* Byte value: 0x5e */ + {{0x7f, 0x2f, 0x7b, 0x68, 0x1d, 0xb6, 0xd1, 0x56,}}, /* Byte value: 0x5f */ + {{0x82, 0x0e, 0xe2, 0x89, 0xfb, 0xc8, 0xc9, 0xdc,}}, /* Byte value: 0x60 */ + {{0xc0, 0x76, 0xfc, 0x1d, 0xbb, 0x7d, 0x35, 0x94,}}, /* Byte value: 0x61 */ + {{0xd5, 0xa3, 0x58, 0x3c, 0x97, 0xb7, 0xca, 0x5c,}}, /* Byte value: 0x62 */ + {{0xd9, 0x9c, 0x27, 0xf8, 0x61, 0x75, 0xed, 0xc4,}}, /* Byte value: 0x63 */ + {{0xa0, 0x4d, 0x82, 0xf2, 0x07, 0xa2, 0xce, 0xde,}}, /* Byte value: 0x64 */ + {{0xa8, 0x67, 0x69, 0xcb, 0xa3, 0x9f, 0xf4, 0x8f,}}, /* Byte value: 0x65 */ + {{0xad, 0xe6, 0xd8, 0x98, 0x04, 0x2f, 0x7f, 0xe5,}}, /* Byte value: 0x66 */ + {{0xba, 0xd8, 0x36, 0x26, 0x01, 0x7b, 0x6f, 0xa8,}}, /* Byte value: 0x67 */ + {{0xb1, 0x8d, 0xb2, 0x2e, 0x79, 0x97, 0x2c, 0xdf,}}, /* Byte value: 0x68 */ + {{0xe3, 0xa1, 0xb9, 0xc8, 0xb2, 0x58, 0xa4, 0x35,}}, /* Byte value: 0x69 */ + {{0xb6, 0xe7, 0x49, 0xe2, 0xf7, 0xb9, 0x48, 0x30,}}, /* Byte value: 0x6a */ + {{0x20, 0xa8, 0x2a, 0xe4, 0xd5, 0xf4, 0xe8, 0x87,}}, /* Byte value: 0x6b */ + {{0x9b, 0xe4, 0x39, 0x6c, 0x21, 0xc0, 0x11, 0x8c,}}, /* Byte value: 0x6c */ + {{0x85, 0x64, 0x19, 0x45, 0x75, 0xe6, 0xad, 0x33,}}, /* Byte value: 0x6d */ + {{0x7e, 0xbb, 0x5e, 0xc6, 0xe8, 0xf9, 0x47, 0xf5,}}, /* Byte value: 0x6e */ + {{0x60, 0x3b, 0x7e, 0xef, 0xbc, 0xdf, 0xfb, 0x4a,}}, /* Byte value: 0x6f */ + {{0x37, 0x96, 0xc4, 0x5a, 0xd0, 0xa0, 0xf8, 0xca,}}, /* Byte value: 0x70 */ + {{0xc4, 0x63, 0x68, 0xe0, 0xe9, 0x82, 0x28, 0x5d,}}, /* Byte value: 0x71 */ + {{0xfa, 0x4b, 0x62, 0x2d, 0x68, 0x50, 0x7c, 0x65,}}, /* Byte value: 0x72 */ + {{0x51, 0x53, 0x64, 0xd7, 0x17, 0x1e, 0xf1, 0xcc,}}, /* Byte value: 0x73 */ + {{0xc9, 0xc8, 0x32, 0x8a, 0xea, 0x0f, 0x99, 0x66,}}, /* Byte value: 0x74 */ + {{0x01, 0x94, 0x25, 0xae, 0xf5, 0x4f, 0x96, 0xa3,}}, /* Byte value: 0x75 */ + {{0x0d, 0xab, 0x5a, 0x6a, 0x03, 0x8d, 0xb1, 0x3b,}}, /* Byte value: 0x76 */ + {{0x8a, 0x24, 0x09, 0xb0, 0x5f, 0xf5, 0xf3, 0x8d,}}, /* Byte value: 0x77 */ + {{0x34, 0xe9, 0xab, 0x6b, 0x0c, 0x71, 0x81, 0xec,}}, /* Byte value: 0x78 */ + {{0x4d, 0x38, 0x0e, 0x61, 0x6a, 0xa6, 0xa2, 0xf6,}}, /* Byte value: 0x79 */ + {{0xb0, 0x19, 0x97, 0x80, 0x8c, 0xd8, 0xba, 0x7c,}}, /* Byte value: 0x7a */ + {{0x49, 0x2d, 0x9a, 0x9c, 0x38, 0x59, 0xbf, 0x3f,}}, /* Byte value: 0x7b */ + {{0x92, 0x5a, 0xf7, 0xfb, 0x70, 0xb2, 0xbd, 0x7e,}}, /* Byte value: 0x7c */ + {{0x18, 0x7e, 0xfe, 0x4b, 0x2f, 0x47, 0x4e, 0xf3,}}, /* Byte value: 0x7d */ + {{0x72, 0x84, 0x21, 0x02, 0x1e, 0x3b, 0x60, 0x6d,}}, /* Byte value: 0x7e */ + {{0x53, 0xb8, 0x2e, 0x48, 0x3e, 0x80, 0x1e, 0x49,}}, /* Byte value: 0x7f */ + {{0x4a, 0x52, 0xf5, 0xad, 0xe4, 0x88, 0xc6, 0x19,}}, /* Byte value: 0x80 */ + {{0x8d, 0x4e, 0xf2, 0x7c, 0xd1, 0xdb, 0x97, 0x62,}}, /* Byte value: 0x81 */ + {{0xab, 0x18, 0x06, 0xfa, 0x7f, 0x4e, 0x8d, 0xa9,}}, /* Byte value: 0x82 */ + {{0x90, 0xb1, 0xbd, 0x64, 0x59, 0x2c, 0x52, 0xfb,}}, /* Byte value: 0x83 */ + {{0x4f, 0xd3, 0x44, 0xfe, 0x43, 0x38, 0x4d, 0x73,}}, /* Byte value: 0x84 */ + {{0x9a, 0x70, 0x1c, 0xc2, 0xd4, 0x8f, 0x87, 0x2f,}}, /* Byte value: 0x85 */ + {{0xdb, 0x77, 0x6d, 0x67, 0x48, 0xeb, 0x02, 0x41,}}, /* Byte value: 0x86 */ + {{0xd6, 0xdc, 0x37, 0x0d, 0x4b, 0x66, 0xb3, 0x7a,}}, /* Byte value: 0x87 */ + {{0x1a, 0x95, 0xb4, 0xd4, 0x06, 0xd9, 0xa1, 0x76,}}, /* Byte value: 0x88 */ + {{0xbc, 0x26, 0xe8, 0x44, 0x7a, 0x1a, 0x9d, 0xe4,}}, /* Byte value: 0x89 */ + {{0x10, 0x54, 0x15, 0x72, 0x8b, 0x7a, 0x74, 0xa2,}}, /* Byte value: 0x8a */ + {{0x93, 0xce, 0xd2, 0x55, 0x85, 0xfd, 0x2b, 0xdd,}}, /* Byte value: 0x8b */ + {{0x9e, 0x65, 0x88, 0x3f, 0x86, 0x70, 0x9a, 0xe6,}}, /* Byte value: 0x8c */ + {{0x97, 0xdb, 0x46, 0xa8, 0xd7, 0x02, 0x36, 0x14,}}, /* Byte value: 0x8d */ + {{0x30, 0xfc, 0x3f, 0x96, 0x5e, 0x8e, 0x9c, 0x25,}}, /* Byte value: 0x8e */ + {{0x1e, 0x80, 0x20, 0x29, 0x54, 0x26, 0xbc, 0xbf,}}, /* Byte value: 0x8f */ + {{0x0f, 0x40, 0x10, 0xf5, 0x2a, 0x13, 0x5e, 0xbe,}}, /* Byte value: 0x90 */ + {{0x66, 0xc5, 0xa0, 0x8d, 0xc7, 0xbe, 0x09, 0x06,}}, /* Byte value: 0x91 */ + {{0x77, 0x05, 0x90, 0x51, 0xb9, 0x8b, 0xeb, 0x07,}}, /* Byte value: 0x92 */ + {{0x40, 0x93, 0x54, 0x0b, 0x69, 0x2b, 0x13, 0xcd,}}, /* Byte value: 0x93 */ + {{0xa2, 0xa6, 0xc8, 0x6d, 0x2e, 0x3c, 0x21, 0x5b,}}, /* Byte value: 0x94 */ + {{0xc1, 0xe2, 0xd9, 0xb3, 0x4e, 0x32, 0xa3, 0x37,}}, /* Byte value: 0x95 */ + {{0x6a, 0xfa, 0xdf, 0x49, 0x31, 0x7c, 0x2e, 0x9e,}}, /* Byte value: 0x96 */ + {{0x12, 0xbf, 0x5f, 0xed, 0xa2, 0xe4, 0x9b, 0x27,}}, /* Byte value: 0x97 */ + {{0x54, 0xd2, 0xd5, 0x84, 0xb0, 0xae, 0x7a, 0xa6,}}, /* Byte value: 0x98 */ + {{0x5f, 0x87, 0x51, 0x8c, 0xc8, 0x42, 0x39, 0xd1,}}, /* Byte value: 0x99 */ + {{0xd3, 0x5d, 0x86, 0x5e, 0xec, 0xd6, 0x38, 0x10,}}, /* Byte value: 0x9a */ + {{0x65, 0xba, 0xcf, 0xbc, 0x1b, 0x6f, 0x70, 0x20,}}, /* Byte value: 0x9b */ + {{0xa9, 0xf3, 0x4c, 0x65, 0x56, 0xd0, 0x62, 0x2c,}}, /* Byte value: 0x9c */ + {{0x3d, 0x57, 0x65, 0xfc, 0x5d, 0x03, 0x2d, 0x1e,}}, /* Byte value: 0x9d */ + {{0x44, 0x86, 0xc0, 0xf6, 0x3b, 0xd4, 0x0e, 0x04,}}, /* Byte value: 0x9e */ + {{0x81, 0x71, 0x8d, 0xb8, 0x27, 0x19, 0xb0, 0xfa,}}, /* Byte value: 0x9f */ + {{0xfc, 0xb5, 0xbc, 0x4f, 0x13, 0x31, 0x8e, 0x29,}}, /* Byte value: 0xa0 */ + {{0xdf, 0x62, 0xf9, 0x9a, 0x1a, 0x14, 0x1f, 0x88,}}, /* Byte value: 0xa1 */ + {{0x46, 0x6d, 0x8a, 0x69, 0x12, 0x4a, 0xe1, 0x81,}}, /* Byte value: 0xa2 */ + {{0xf8, 0xa0, 0x28, 0xb2, 0x41, 0xce, 0x93, 0xe0,}}, /* Byte value: 0xa3 */ + {{0xcc, 0x49, 0x83, 0xd9, 0x4d, 0xbf, 0x12, 0x0c,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x52, 0x2c, 0x0b, 0xe6, 0xcb, 0xcf, 0x88, 0xea,}}, /* Byte value: 0xa6 */ + {{0xed, 0x75, 0x8c, 0x93, 0x6d, 0x04, 0x6c, 0x28,}}, /* Byte value: 0xa7 */ + {{0xe4, 0xcb, 0x42, 0x04, 0x3c, 0x76, 0xc0, 0xda,}}, /* Byte value: 0xa8 */ + {{0x3a, 0x3d, 0x9e, 0x30, 0xd3, 0x2d, 0x49, 0xf1,}}, /* Byte value: 0xa9 */ + {{0x73, 0x10, 0x04, 0xac, 0xeb, 0x74, 0xf6, 0xce,}}, /* Byte value: 0xaa */ + {{0x5d, 0x6c, 0x1b, 0x13, 0xe1, 0xdc, 0xd6, 0x54,}}, /* Byte value: 0xab */ + {{0x6e, 0xef, 0x4b, 0xb4, 0x63, 0x83, 0x33, 0x57,}}, /* Byte value: 0xac */ + {{0x8f, 0xa5, 0xb8, 0xe3, 0xf8, 0x45, 0x78, 0xe7,}}, /* Byte value: 0xad */ + {{0xbf, 0x59, 0x87, 0x75, 0xa6, 0xcb, 0xe4, 0xc2,}}, /* Byte value: 0xae */ + {{0xcf, 0x36, 0xec, 0xe8, 0x91, 0x6e, 0x6b, 0x2a,}}, /* Byte value: 0xaf */ + {{0xb8, 0x33, 0x7c, 0xb9, 0x28, 0xe5, 0x80, 0x2d,}}, /* Byte value: 0xb0 */ + {{0xe7, 0xb4, 0x2d, 0x35, 0xe0, 0xa7, 0xb9, 0xfc,}}, /* Byte value: 0xb1 */ + {{0xf9, 0x34, 0x0d, 0x1c, 0xb4, 0x81, 0x05, 0x43,}}, /* Byte value: 0xb2 */ + {{0xfd, 0x21, 0x99, 0xe1, 0xe6, 0x7e, 0x18, 0x8a,}}, /* Byte value: 0xb3 */ + {{0xb5, 0x98, 0x26, 0xd3, 0x2b, 0x68, 0x31, 0x16,}}, /* Byte value: 0xb4 */ + {{0x09, 0xbe, 0xce, 0x97, 0x51, 0x72, 0xac, 0xf2,}}, /* Byte value: 0xb5 */ + {{0x47, 0xf9, 0xaf, 0xc7, 0xe7, 0x05, 0x77, 0x22,}}, /* Byte value: 0xb6 */ + {{0xe5, 0x5f, 0x67, 0xaa, 0xc9, 0x39, 0x56, 0x79,}}, /* Byte value: 0xb7 */ + {{0x31, 0x68, 0x1a, 0x38, 0xab, 0xc1, 0x0a, 0x86,}}, /* Byte value: 0xb8 */ + {{0xd4, 0x37, 0x7d, 0x92, 0x62, 0xf8, 0x5c, 0xff,}}, /* Byte value: 0xb9 */ + {{0xe8, 0xf4, 0x3d, 0xc0, 0xca, 0xb4, 0xe7, 0x42,}}, /* Byte value: 0xba */ + {{0x94, 0xa4, 0x29, 0x99, 0x0b, 0xd3, 0x4f, 0x32,}}, /* Byte value: 0xbb */ + {{0x1c, 0x6b, 0x6a, 0xb6, 0x7d, 0xb8, 0x53, 0x3a,}}, /* Byte value: 0xbc */ + {{0x0e, 0xd4, 0x35, 0x5b, 0xdf, 0x5c, 0xc8, 0x1d,}}, /* Byte value: 0xbd */ + {{0xcb, 0x23, 0x78, 0x15, 0xc3, 0x91, 0x76, 0xe3,}}, /* Byte value: 0xbe */ + {{0x6d, 0x90, 0x24, 0x85, 0xbf, 0x52, 0x4a, 0x71,}}, /* Byte value: 0xbf */ + {{0x36, 0x02, 0xe1, 0xf4, 0x25, 0xef, 0x6e, 0x69,}}, /* Byte value: 0xc0 */ + {{0x35, 0x7d, 0x8e, 0xc5, 0xf9, 0x3e, 0x17, 0x4f,}}, /* Byte value: 0xc1 */ + {{0x74, 0x7a, 0xff, 0x60, 0x65, 0x5a, 0x92, 0x21,}}, /* Byte value: 0xc2 */ + {{0xc5, 0xf7, 0x4d, 0x4e, 0x1c, 0xcd, 0xbe, 0xfe,}}, /* Byte value: 0xc3 */ + {{0x75, 0xee, 0xda, 0xce, 0x90, 0x15, 0x04, 0x82,}}, /* Byte value: 0xc4 */ + {{0xb2, 0xf2, 0xdd, 0x1f, 0xa5, 0x46, 0x55, 0xf9,}}, /* Byte value: 0xc5 */ + {{0xd2, 0xc9, 0xa3, 0xf0, 0x19, 0x99, 0xae, 0xb3,}}, /* Byte value: 0xc6 */ + {{0x99, 0x0f, 0x73, 0xf3, 0x08, 0x5e, 0xfe, 0x09,}}, /* Byte value: 0xc7 */ + {{0x23, 0xd7, 0x45, 0xd5, 0x09, 0x25, 0x91, 0xa1,}}, /* Byte value: 0xc8 */ + {{0x15, 0xd5, 0xa4, 0x21, 0x2c, 0xca, 0xff, 0xc8,}}, /* Byte value: 0xc9 */ + {{0x08, 0x2a, 0xeb, 0x39, 0xa4, 0x3d, 0x3a, 0x51,}}, /* Byte value: 0xca */ + {{0x27, 0xc2, 0xd1, 0x28, 0x5b, 0xda, 0x8c, 0x68,}}, /* Byte value: 0xcb */ + {{0x19, 0xea, 0xdb, 0xe5, 0xda, 0x08, 0xd8, 0x50,}}, /* Byte value: 0xcc */ + {{0x76, 0x91, 0xb5, 0xff, 0x4c, 0xc4, 0x7d, 0xa4,}}, /* Byte value: 0xcd */ + {{0x39, 0x42, 0xf1, 0x01, 0x0f, 0xfc, 0x30, 0xd7,}}, /* Byte value: 0xce */ + {{0x13, 0x2b, 0x7a, 0x43, 0x57, 0xab, 0x0d, 0x84,}}, /* Byte value: 0xcf */ + {{0x05, 0x81, 0xb1, 0x53, 0xa7, 0xb0, 0x8b, 0x6a,}}, /* Byte value: 0xd0 */ + {{0xee, 0x0a, 0xe3, 0xa2, 0xb1, 0xd5, 0x15, 0x0e,}}, /* Byte value: 0xd1 */ + {{0x57, 0xad, 0xba, 0xb5, 0x6c, 0x7f, 0x03, 0x80,}}, /* Byte value: 0xd2 */ + {{0x9f, 0xf1, 0xad, 0x91, 0x73, 0x3f, 0x0c, 0x45,}}, /* Byte value: 0xd3 */ + {{0xbd, 0xb2, 0xcd, 0xea, 0x8f, 0x55, 0x0b, 0x47,}}, /* Byte value: 0xd4 */ + {{0x45, 0x12, 0xe5, 0x58, 0xce, 0x9b, 0x98, 0xa7,}}, /* Byte value: 0xd5 */ + {{0xff, 0xca, 0xd3, 0x7e, 0xcf, 0xe0, 0xf7, 0x0f,}}, /* Byte value: 0xd6 */ + {{0xc3, 0x09, 0x93, 0x2c, 0x67, 0xac, 0x4c, 0xb2,}}, /* Byte value: 0xd7 */ + {{0x3b, 0xa9, 0xbb, 0x9e, 0x26, 0x62, 0xdf, 0x52,}}, /* Byte value: 0xd8 */ + {{0x7b, 0x3a, 0xef, 0x95, 0x4f, 0x49, 0xcc, 0x9f,}}, /* Byte value: 0xd9 */ + {{0x8e, 0x31, 0x9d, 0x4d, 0x0d, 0x0a, 0xee, 0x44,}}, /* Byte value: 0xda */ + {{0xe9, 0x60, 0x18, 0x6e, 0x3f, 0xfb, 0x71, 0xe1,}}, /* Byte value: 0xdb */ + {{0xc8, 0x5c, 0x17, 0x24, 0x1f, 0x40, 0x0f, 0xc5,}}, /* Byte value: 0xdc */ + {{0x7c, 0x50, 0x14, 0x59, 0xc1, 0x67, 0xa8, 0x70,}}, /* Byte value: 0xdd */ + {{0x6b, 0x6e, 0xfa, 0xe7, 0xc4, 0x33, 0xb8, 0x3d,}}, /* Byte value: 0xde */ + {{0x4c, 0xac, 0x2b, 0xcf, 0x9f, 0xe9, 0x34, 0x55,}}, /* Byte value: 0xdf */ + {{0x83, 0x9a, 0xc7, 0x27, 0x0e, 0x87, 0x5f, 0x7f,}}, /* Byte value: 0xe0 */ + {{0xec, 0xe1, 0xa9, 0x3d, 0x98, 0x4b, 0xfa, 0x8b,}}, /* Byte value: 0xe1 */ + {{0x70, 0x6f, 0x6b, 0x9d, 0x37, 0xa5, 0x8f, 0xe8,}}, /* Byte value: 0xe2 */ + {{0xe2, 0x35, 0x9c, 0x66, 0x47, 0x17, 0x32, 0x96,}}, /* Byte value: 0xe3 */ + {{0xf1, 0x1e, 0xe6, 0x25, 0x10, 0xbc, 0x3f, 0x12,}}, /* Byte value: 0xe4 */ + {{0xcd, 0xdd, 0xa6, 0x77, 0xb8, 0xf0, 0x84, 0xaf,}}, /* Byte value: 0xe5 */ + {{0x5a, 0x06, 0xe0, 0xdf, 0x6f, 0xf2, 0xb2, 0xbb,}}, /* Byte value: 0xe6 */ + {{0x2b, 0xfd, 0xae, 0xec, 0xad, 0x18, 0xab, 0xf0,}}, /* Byte value: 0xe7 */ + {{0xc2, 0x9d, 0xb6, 0x82, 0x92, 0xe3, 0xda, 0x11,}}, /* Byte value: 0xe8 */ + {{0xa7, 0x27, 0x79, 0x3e, 0x89, 0x8c, 0xaa, 0x31,}}, /* Byte value: 0xe9 */ + {{0xa1, 0xd9, 0xa7, 0x5c, 0xf2, 0xed, 0x58, 0x7d,}}, /* Byte value: 0xea */ + {{0x2c, 0x97, 0x55, 0x20, 0x23, 0x36, 0xcf, 0x1f,}}, /* Byte value: 0xeb */ + {{0x06, 0xfe, 0xde, 0x62, 0x7b, 0x61, 0xf2, 0x4c,}}, /* Byte value: 0xec */ + {{0x2d, 0x03, 0x70, 0x8e, 0xd6, 0x79, 0x59, 0xbc,}}, /* Byte value: 0xed */ + {{0x3e, 0x28, 0x0a, 0xcd, 0x81, 0xd2, 0x54, 0x38,}}, /* Byte value: 0xee */ + {{0x71, 0xfb, 0x4e, 0x33, 0xc2, 0xea, 0x19, 0x4b,}}, /* Byte value: 0xef */ + {{0x3f, 0xbc, 0x2f, 0x63, 0x74, 0x9d, 0xc2, 0x9b,}}, /* Byte value: 0xf0 */ + {{0xf6, 0x74, 0x1d, 0xe9, 0x9e, 0x92, 0x5b, 0xfd,}}, /* Byte value: 0xf1 */ + {{0xce, 0xa2, 0xc9, 0x46, 0x64, 0x21, 0xfd, 0x89,}}, /* Byte value: 0xf2 */ + {{0x38, 0xd6, 0xd4, 0xaf, 0xfa, 0xb3, 0xa6, 0x74,}}, /* Byte value: 0xf3 */ + {{0x33, 0x83, 0x50, 0xa7, 0x82, 0x5f, 0xe5, 0x03,}}, /* Byte value: 0xf4 */ + {{0x87, 0x8f, 0x53, 0xda, 0x5c, 0x78, 0x42, 0xb6,}}, /* Byte value: 0xf5 */ + {{0x42, 0x78, 0x1e, 0x94, 0x40, 0xb5, 0xfc, 0x48,}}, /* Byte value: 0xf6 */ + {{0x8c, 0xda, 0xd7, 0xd2, 0x24, 0x94, 0x01, 0xc1,}}, /* Byte value: 0xf7 */ + {{0x26, 0x56, 0xf4, 0x86, 0xae, 0x95, 0x1a, 0xcb,}}, /* Byte value: 0xf8 */ + {{0x7a, 0xae, 0xca, 0x3b, 0xba, 0x06, 0x5a, 0x3c,}}, /* Byte value: 0xf9 */ + {{0xac, 0x72, 0xfd, 0x36, 0xf1, 0x60, 0xe9, 0x46,}}, /* Byte value: 0xfa */ + {{0x98, 0x9b, 0x56, 0x5d, 0xfd, 0x11, 0x68, 0xaa,}}, /* Byte value: 0xfb */ + {{0x79, 0xd1, 0xa5, 0x0a, 0x66, 0xd7, 0x23, 0x1a,}}, /* Byte value: 0xfc */ + {{0x8b, 0xb0, 0x2c, 0x1e, 0xaa, 0xba, 0x65, 0x2e,}}, /* Byte value: 0xfd */ + {{0x58, 0xed, 0xaa, 0x40, 0x46, 0x6c, 0x5d, 0x3e,}}, /* Byte value: 0xfe */ + {{0x56, 0x39, 0x9f, 0x1b, 0x99, 0x30, 0x95, 0x23,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 9 */ + {{0xa8, 0x2c, 0x9d, 0x1e, 0xd9, 0x7e, 0xa9, 0xb3,}}, /* Byte value: 0x00 */ + {{0xb4, 0x6b, 0xa4, 0x9d, 0x6c, 0x77, 0x14, 0x4c,}}, /* Byte value: 0x01 */ + {{0x96, 0x95, 0xc3, 0xd6, 0x72, 0x8f, 0xd1, 0xd8,}}, /* Byte value: 0x02 */ + {{0x1e, 0xeb, 0x9c, 0x39, 0x0a, 0xe9, 0x43, 0xcd,}}, /* Byte value: 0x03 */ + {{0x8a, 0xd2, 0xfa, 0x55, 0xc7, 0x86, 0x6c, 0x27,}}, /* Byte value: 0x04 */ + {{0xf5, 0x99, 0x50, 0xe1, 0x53, 0x37, 0x1d, 0xda,}}, /* Byte value: 0x05 */ + {{0x9f, 0x36, 0xa1, 0x26, 0x75, 0xf9, 0xd0, 0x09,}}, /* Byte value: 0x06 */ + {{0xa5, 0x14, 0x76, 0x59, 0x63, 0x0b, 0x97, 0x06,}}, /* Byte value: 0x07 */ + {{0x13, 0xd3, 0x77, 0x7e, 0xb0, 0x9c, 0x7d, 0x78,}}, /* Byte value: 0x08 */ + {{0x39, 0xd8, 0xc1, 0x98, 0x17, 0x62, 0xc6, 0x24,}}, /* Byte value: 0x09 */ + {{0xac, 0xb7, 0x14, 0xa9, 0x64, 0x7d, 0x96, 0xd7,}}, /* Byte value: 0x0a */ + {{0x2d, 0x6a, 0x29, 0xb6, 0x1b, 0x6d, 0x05, 0x13,}}, /* Byte value: 0x0b */ + {{0x83, 0x71, 0x98, 0xa5, 0xc0, 0xf0, 0x6d, 0xf6,}}, /* Byte value: 0x0c */ + {{0x86, 0xbc, 0xa2, 0x4f, 0xc3, 0x83, 0x2d, 0x8b,}}, /* Byte value: 0x0d */ + {{0xb9, 0x53, 0x4f, 0xda, 0xd6, 0x02, 0x2a, 0xf9,}}, /* Byte value: 0x0e */ + {{0x76, 0xe8, 0xc8, 0x44, 0x93, 0xc7, 0x70, 0x2c,}}, /* Byte value: 0x0f */ + {{0x0f, 0x94, 0x4e, 0xfd, 0x05, 0x95, 0xc0, 0x87,}}, /* Byte value: 0x10 */ + {{0x5a, 0xd4, 0x52, 0xaf, 0x36, 0xda, 0x0a, 0x26,}}, /* Byte value: 0x11 */ + {{0xa0, 0xd9, 0x4c, 0xb3, 0x60, 0x78, 0xd7, 0x7b,}}, /* Byte value: 0x12 */ + {{0x92, 0x0e, 0x4a, 0x61, 0xcf, 0x8c, 0xee, 0xbc,}}, /* Byte value: 0x13 */ + {{0xe2, 0xd1, 0xae, 0x28, 0x5e, 0xa8, 0x5f, 0xc6,}}, /* Byte value: 0x14 */ + {{0x34, 0xe0, 0x2a, 0xdf, 0xad, 0x17, 0xf8, 0x91,}}, /* Byte value: 0x15 */ + {{0xee, 0xbf, 0xf6, 0x32, 0x5a, 0xad, 0x1e, 0x6a,}}, /* Byte value: 0x16 */ + {{0x6d, 0xce, 0x6e, 0x97, 0x9a, 0x5d, 0x73, 0x9c,}}, /* Byte value: 0x17 */ + {{0x1a, 0x70, 0x15, 0x8e, 0xb7, 0xea, 0x7c, 0xa9,}}, /* Byte value: 0x18 */ + {{0x24, 0xc9, 0x4b, 0x46, 0x1c, 0x1b, 0x04, 0xc2,}}, /* Byte value: 0x19 */ + {{0x1f, 0xbd, 0x2f, 0x64, 0xb4, 0x99, 0x3c, 0xd4,}}, /* Byte value: 0x1a */ + {{0xd2, 0xaa, 0x0d, 0x40, 0x4e, 0xbc, 0x98, 0x33,}}, /* Byte value: 0x1b */ + {{0x18, 0xdc, 0xb0, 0x34, 0x08, 0x0a, 0x82, 0x9b,}}, /* Byte value: 0x1c */ + {{0x37, 0x1a, 0x3c, 0x38, 0xac, 0x87, 0x79, 0xba,}}, /* Byte value: 0x1d */ + {{0x6a, 0xaf, 0xf1, 0xc7, 0x26, 0xce, 0xcd, 0xd3,}}, /* Byte value: 0x1e */ + {{0x3f, 0xef, 0xed, 0x95, 0x15, 0x81, 0x07, 0x72,}}, /* Byte value: 0x1f */ + {{0xae, 0x1b, 0xb1, 0x13, 0xdb, 0x9d, 0x68, 0xe5,}}, /* Byte value: 0x20 */ + {{0x10, 0x29, 0x61, 0x99, 0xb1, 0x0c, 0xfc, 0x53,}}, /* Byte value: 0x21 */ + {{0x46, 0x93, 0x6b, 0x2c, 0x83, 0xd3, 0xb7, 0xd9,}}, /* Byte value: 0x22 */ + {{0x6c, 0x98, 0xdd, 0xca, 0x24, 0x2d, 0x0c, 0x85,}}, /* Byte value: 0x23 */ + {{0xbc, 0x9e, 0x75, 0x30, 0xd5, 0x71, 0x6a, 0x84,}}, /* Byte value: 0x24 */ + {{0x68, 0x03, 0x54, 0x7d, 0x99, 0x2e, 0x33, 0xe1,}}, /* Byte value: 0x25 */ + {{0x0b, 0x0f, 0xc7, 0x4a, 0xb8, 0x96, 0xff, 0xe3,}}, /* Byte value: 0x26 */ + {{0x3e, 0xb9, 0x5e, 0xc8, 0xab, 0xf1, 0x78, 0x6b,}}, /* Byte value: 0x27 */ + {{0xfe, 0x96, 0x97, 0xab, 0xeb, 0xa1, 0xe2, 0x39,}}, /* Byte value: 0x28 */ + {{0xa9, 0x7a, 0x2e, 0x43, 0x67, 0x0e, 0xd6, 0xaa,}}, /* Byte value: 0x29 */ + {{0x28, 0xa7, 0x13, 0x5c, 0x18, 0x1e, 0x45, 0x6e,}}, /* Byte value: 0x2a */ + {{0x7c, 0xb1, 0xbc, 0x53, 0x95, 0x21, 0xf0, 0xd6,}}, /* Byte value: 0x2b */ + {{0xf2, 0xf8, 0xcf, 0xb1, 0xef, 0xa4, 0xa3, 0x95,}}, /* Byte value: 0x2c */ + {{0xbf, 0x64, 0x63, 0xd7, 0xd4, 0xe1, 0xeb, 0xaf,}}, /* Byte value: 0x2d */ + {{0xf4, 0xcf, 0xe3, 0xbc, 0xed, 0x47, 0x62, 0xc3,}}, /* Byte value: 0x2e */ + {{0xcb, 0x20, 0x0e, 0x29, 0xf8, 0xc6, 0x65, 0xb1,}}, /* Byte value: 0x2f */ + {{0x06, 0x37, 0x2c, 0x0d, 0x02, 0xe3, 0xc1, 0x56,}}, /* Byte value: 0x30 */ + {{0xf8, 0xa1, 0xbb, 0xa6, 0xe9, 0x42, 0x23, 0x6f,}}, /* Byte value: 0x31 */ + {{0xbd, 0xc8, 0xc6, 0x6d, 0x6b, 0x01, 0x15, 0x9d,}}, /* Byte value: 0x32 */ + {{0x75, 0x12, 0xde, 0xa3, 0x92, 0x57, 0xf1, 0x07,}}, /* Byte value: 0x33 */ + {{0x03, 0xfa, 0x16, 0xe7, 0x01, 0x90, 0x81, 0x2b,}}, /* Byte value: 0x34 */ + {{0x4c, 0xca, 0x1f, 0x3b, 0x85, 0x35, 0x37, 0x23,}}, /* Byte value: 0x35 */ + {{0x4b, 0xab, 0x80, 0x6b, 0x39, 0xa6, 0x89, 0x6c,}}, /* Byte value: 0x36 */ + {{0xc0, 0x2f, 0xc9, 0x63, 0x40, 0x50, 0x9a, 0x52,}}, /* Byte value: 0x37 */ + {{0x04, 0x9b, 0x89, 0xb7, 0xbd, 0x03, 0x3f, 0x64,}}, /* Byte value: 0x38 */ + {{0xb3, 0x0a, 0x3b, 0xcd, 0xd0, 0xe4, 0xaa, 0x03,}}, /* Byte value: 0x39 */ + {{0xb6, 0xc7, 0x01, 0x27, 0xd3, 0x97, 0xea, 0x7e,}}, /* Byte value: 0x3a */ + {{0x51, 0xdb, 0x95, 0xe5, 0x8e, 0x4c, 0xf5, 0xc5,}}, /* Byte value: 0x3b */ + {{0xeb, 0x72, 0xcc, 0xd8, 0x59, 0xde, 0x5e, 0x17,}}, /* Byte value: 0x3c */ + {{0x98, 0x57, 0x3e, 0x76, 0xc9, 0x6a, 0x6e, 0x46,}}, /* Byte value: 0x3d */ + {{0x23, 0xa8, 0xd4, 0x16, 0xa0, 0x88, 0xba, 0x8d,}}, /* Byte value: 0x3e */ + {{0xab, 0xd6, 0x8b, 0xf9, 0xd8, 0xee, 0x28, 0x98,}}, /* Byte value: 0x3f */ + {{0xb2, 0x5c, 0x88, 0x90, 0x6e, 0x94, 0xd5, 0x1a,}}, /* Byte value: 0x40 */ + {{0x99, 0x01, 0x8d, 0x2b, 0x77, 0x1a, 0x11, 0x5f,}}, /* Byte value: 0x41 */ + {{0x89, 0x28, 0xec, 0xb2, 0xc6, 0x16, 0xed, 0x0c,}}, /* Byte value: 0x42 */ + {{0xdf, 0x92, 0xe6, 0x07, 0xf4, 0xc9, 0xa6, 0x86,}}, /* Byte value: 0x43 */ + {{0x0d, 0x38, 0xeb, 0x47, 0xba, 0x75, 0x3e, 0xb5,}}, /* Byte value: 0x44 */ + {{0x31, 0x2d, 0x10, 0x35, 0xae, 0x64, 0xb8, 0xec,}}, /* Byte value: 0x45 */ + {{0x70, 0xdf, 0xe4, 0x49, 0x91, 0x24, 0xb1, 0x7a,}}, /* Byte value: 0x46 */ + {{0x73, 0x25, 0xf2, 0xae, 0x90, 0xb4, 0x30, 0x51,}}, /* Byte value: 0x47 */ + {{0x1d, 0x11, 0x8a, 0xde, 0x0b, 0x79, 0xc2, 0xe6,}}, /* Byte value: 0x48 */ + {{0x8d, 0xb3, 0x65, 0x05, 0x7b, 0x15, 0xd2, 0x68,}}, /* Byte value: 0x49 */ + {{0xf1, 0x02, 0xd9, 0x56, 0xee, 0x34, 0x22, 0xbe,}}, /* Byte value: 0x4a */ + {{0x7d, 0xe7, 0x0f, 0x0e, 0x2b, 0x51, 0x8f, 0xcf,}}, /* Byte value: 0x4b */ + {{0x17, 0x48, 0xfe, 0xc9, 0x0d, 0x9f, 0x42, 0x1c,}}, /* Byte value: 0x4c */ + {{0x2c, 0x3c, 0x9a, 0xeb, 0xa5, 0x1d, 0x7a, 0x0a,}}, /* Byte value: 0x4d */ + {{0x35, 0xb6, 0x99, 0x82, 0x13, 0x67, 0x87, 0x88,}}, /* Byte value: 0x4e */ + {{0x88, 0x7e, 0x5f, 0xef, 0x78, 0x66, 0x92, 0x15,}}, /* Byte value: 0x4f */ + {{0x67, 0x97, 0x1a, 0x80, 0x9c, 0xbb, 0xf3, 0x66,}}, /* Byte value: 0x50 */ + {{0xe1, 0x2b, 0xb8, 0xcf, 0x5f, 0x38, 0xde, 0xed,}}, /* Byte value: 0x51 */ + {{0xb5, 0x3d, 0x17, 0xc0, 0xd2, 0x07, 0x6b, 0x55,}}, /* Byte value: 0x52 */ + {{0x64, 0x6d, 0x0c, 0x67, 0x9d, 0x2b, 0x72, 0x4d,}}, /* Byte value: 0x53 */ + {{0xb1, 0xa6, 0x9e, 0x77, 0x6f, 0x04, 0x54, 0x31,}}, /* Byte value: 0x54 */ + {{0x08, 0xf5, 0xd1, 0xad, 0xb9, 0x06, 0x7e, 0xc8,}}, /* Byte value: 0x55 */ + {{0xe5, 0xb0, 0x31, 0x78, 0xe2, 0x3b, 0xe1, 0x89,}}, /* Byte value: 0x56 */ + {{0x1c, 0x47, 0x39, 0x83, 0xb5, 0x09, 0xbd, 0xff,}}, /* Byte value: 0x57 */ + {{0x6b, 0xf9, 0x42, 0x9a, 0x98, 0xbe, 0xb2, 0xca,}}, /* Byte value: 0x58 */ + {{0x5c, 0xe3, 0x7e, 0xa2, 0x34, 0x39, 0xcb, 0x70,}}, /* Byte value: 0x59 */ + {{0xa3, 0x23, 0x5a, 0x54, 0x61, 0xe8, 0x56, 0x50,}}, /* Byte value: 0x5a */ + {{0x7a, 0x86, 0x90, 0x5e, 0x97, 0xc2, 0x31, 0x80,}}, /* Byte value: 0x5b */ + {{0xe8, 0x88, 0xda, 0x3f, 0x58, 0x4e, 0xdf, 0x3c,}}, /* Byte value: 0x5c */ + {{0xda, 0x5f, 0xdc, 0xed, 0xf7, 0xba, 0xe6, 0xfb,}}, /* Byte value: 0x5d */ + {{0xd7, 0x67, 0x37, 0xaa, 0x4d, 0xcf, 0xd8, 0x4e,}}, /* Byte value: 0x5e */ + {{0xfa, 0x0d, 0x1e, 0x1c, 0x56, 0xa2, 0xdd, 0x5d,}}, /* Byte value: 0x5f */ + {{0xa7, 0xb8, 0xd3, 0xe3, 0xdc, 0xeb, 0x69, 0x34,}}, /* Byte value: 0x60 */ + {{0x7f, 0x4b, 0xaa, 0xb4, 0x94, 0xb1, 0x71, 0xfd,}}, /* Byte value: 0x61 */ + {{0xe4, 0xe6, 0x82, 0x25, 0x5c, 0x4b, 0x9e, 0x90,}}, /* Byte value: 0x62 */ + {{0x8f, 0x1f, 0xc0, 0xbf, 0xc4, 0xf5, 0x2c, 0x5a,}}, /* Byte value: 0x63 */ + {{0xa1, 0x8f, 0xff, 0xee, 0xde, 0x08, 0xa8, 0x62,}}, /* Byte value: 0x64 */ + {{0x52, 0x21, 0x83, 0x02, 0x8f, 0xdc, 0x74, 0xee,}}, /* Byte value: 0x65 */ + {{0xec, 0x13, 0x53, 0x88, 0xe5, 0x4d, 0xe0, 0x58,}}, /* Byte value: 0x66 */ + {{0x3b, 0x74, 0x64, 0x22, 0xa8, 0x82, 0x38, 0x16,}}, /* Byte value: 0x67 */ + {{0xa2, 0x75, 0xe9, 0x09, 0xdf, 0x98, 0x29, 0x49,}}, /* Byte value: 0x68 */ + {{0x5f, 0x19, 0x68, 0x45, 0x35, 0xa9, 0x4a, 0x5b,}}, /* Byte value: 0x69 */ + {{0x50, 0x8d, 0x26, 0xb8, 0x30, 0x3c, 0x8a, 0xdc,}}, /* Byte value: 0x6a */ + {{0x4a, 0xfd, 0x33, 0x36, 0x87, 0xd6, 0xf6, 0x75,}}, /* Byte value: 0x6b */ + {{0x57, 0xec, 0xb9, 0xe8, 0x8c, 0xaf, 0x34, 0x93,}}, /* Byte value: 0x6c */ + {{0x55, 0x40, 0x1c, 0x52, 0x33, 0x4f, 0xca, 0xa1,}}, /* Byte value: 0x6d */ + {{0xdc, 0x68, 0xf0, 0xe0, 0xf5, 0x59, 0x27, 0xad,}}, /* Byte value: 0x6e */ + {{0xde, 0xc4, 0x55, 0x5a, 0x4a, 0xb9, 0xd9, 0x9f,}}, /* Byte value: 0x6f */ + {{0x9d, 0x9a, 0x04, 0x9c, 0xca, 0x19, 0x2e, 0x3b,}}, /* Byte value: 0x70 */ + {{0xe7, 0x1c, 0x94, 0xc2, 0x5d, 0xdb, 0x1f, 0xbb,}}, /* Byte value: 0x71 */ + {{0xaf, 0x4d, 0x02, 0x4e, 0x65, 0xed, 0x17, 0xfc,}}, /* Byte value: 0x72 */ + {{0x97, 0xc3, 0x70, 0x8b, 0xcc, 0xff, 0xae, 0xc1,}}, /* Byte value: 0x73 */ + {{0xaa, 0x80, 0x38, 0xa4, 0x66, 0x9e, 0x57, 0x81,}}, /* Byte value: 0x74 */ + {{0x26, 0x65, 0xee, 0xfc, 0xa3, 0xfb, 0xfa, 0xf0,}}, /* Byte value: 0x75 */ + {{0x4d, 0x9c, 0xac, 0x66, 0x3b, 0x45, 0x48, 0x3a,}}, /* Byte value: 0x76 */ + {{0x54, 0x16, 0xaf, 0x0f, 0x8d, 0x3f, 0xb5, 0xb8,}}, /* Byte value: 0x77 */ + {{0xf7, 0x35, 0xf5, 0x5b, 0xec, 0xd7, 0xe3, 0xe8,}}, /* Byte value: 0x78 */ + {{0xd9, 0xa5, 0xca, 0x0a, 0xf6, 0x2a, 0x67, 0xd0,}}, /* Byte value: 0x79 */ + {{0x84, 0x10, 0x07, 0xf5, 0x7c, 0x63, 0xd3, 0xb9,}}, /* Byte value: 0x7a */ + {{0x41, 0xf2, 0xf4, 0x7c, 0x3f, 0x40, 0x09, 0x96,}}, /* Byte value: 0x7b */ + {{0x82, 0x27, 0x2b, 0xf8, 0x7e, 0x80, 0x12, 0xef,}}, /* Byte value: 0x7c */ + {{0xd6, 0x31, 0x84, 0xf7, 0xf3, 0xbf, 0xa7, 0x57,}}, /* Byte value: 0x7d */ + {{0xb7, 0x91, 0xb2, 0x7a, 0x6d, 0xe7, 0x95, 0x67,}}, /* Byte value: 0x7e */ + {{0xdb, 0x09, 0x6f, 0xb0, 0x49, 0xca, 0x99, 0xe2,}}, /* Byte value: 0x7f */ + {{0x2b, 0x5d, 0x05, 0xbb, 0x19, 0x8e, 0xc4, 0x45,}}, /* Byte value: 0x80 */ + {{0xa6, 0xee, 0x60, 0xbe, 0x62, 0x9b, 0x16, 0x2d,}}, /* Byte value: 0x81 */ + {{0x38, 0x8e, 0x72, 0xc5, 0xa9, 0x12, 0xb9, 0x3d,}}, /* Byte value: 0x82 */ + {{0xce, 0xed, 0x34, 0xc3, 0xfb, 0xb5, 0x25, 0xcc,}}, /* Byte value: 0x83 */ + {{0x95, 0x6f, 0xd5, 0x31, 0x73, 0x1f, 0x50, 0xf3,}}, /* Byte value: 0x84 */ + {{0x71, 0x89, 0x57, 0x14, 0x2f, 0x54, 0xce, 0x63,}}, /* Byte value: 0x85 */ + {{0xc3, 0xd5, 0xdf, 0x84, 0x41, 0xc0, 0x1b, 0x79,}}, /* Byte value: 0x86 */ + {{0x8e, 0x49, 0x73, 0xe2, 0x7a, 0x85, 0x53, 0x43,}}, /* Byte value: 0x87 */ + {{0x9a, 0xfb, 0x9b, 0xcc, 0x76, 0x8a, 0x90, 0x74,}}, /* Byte value: 0x88 */ + {{0xef, 0xe9, 0x45, 0x6f, 0xe4, 0xdd, 0x61, 0x73,}}, /* Byte value: 0x89 */ + {{0x25, 0x9f, 0xf8, 0x1b, 0xa2, 0x6b, 0x7b, 0xdb,}}, /* Byte value: 0x8a */ + {{0xa4, 0x42, 0xc5, 0x04, 0xdd, 0x7b, 0xe8, 0x1f,}}, /* Byte value: 0x8b */ + {{0xe9, 0xde, 0x69, 0x62, 0xe6, 0x3e, 0xa0, 0x25,}}, /* Byte value: 0x8c */ + {{0x3c, 0x15, 0xfb, 0x72, 0x14, 0x11, 0x86, 0x59,}}, /* Byte value: 0x8d */ + {{0x6f, 0x62, 0xcb, 0x2d, 0x25, 0xbd, 0x8d, 0xae,}}, /* Byte value: 0x8e */ + {{0x02, 0xac, 0xa5, 0xba, 0xbf, 0xe0, 0xfe, 0x32,}}, /* Byte value: 0x8f */ + {{0x01, 0x56, 0xb3, 0x5d, 0xbe, 0x70, 0x7f, 0x19,}}, /* Byte value: 0x90 */ + {{0x0a, 0x59, 0x74, 0x17, 0x06, 0xe6, 0x80, 0xfa,}}, /* Byte value: 0x91 */ + {{0x09, 0xa3, 0x62, 0xf0, 0x07, 0x76, 0x01, 0xd1,}}, /* Byte value: 0x92 */ + {{0x94, 0x39, 0x66, 0x6c, 0xcd, 0x6f, 0x2f, 0xea,}}, /* Byte value: 0x93 */ + {{0xed, 0x45, 0xe0, 0xd5, 0x5b, 0x3d, 0x9f, 0x41,}}, /* Byte value: 0x94 */ + {{0x59, 0x2e, 0x44, 0x48, 0x37, 0x4a, 0x8b, 0x0d,}}, /* Byte value: 0x95 */ + {{0x61, 0xa0, 0x36, 0x8d, 0x9e, 0x58, 0x32, 0x30,}}, /* Byte value: 0x96 */ + {{0x69, 0x55, 0xe7, 0x20, 0x27, 0x5e, 0x4c, 0xf8,}}, /* Byte value: 0x97 */ + {{0x29, 0xf1, 0xa0, 0x01, 0xa6, 0x6e, 0x3a, 0x77,}}, /* Byte value: 0x98 */ + {{0xb0, 0xf0, 0x2d, 0x2a, 0xd1, 0x74, 0x2b, 0x28,}}, /* Byte value: 0x99 */ + {{0x30, 0x7b, 0xa3, 0x68, 0x10, 0x14, 0xc7, 0xf5,}}, /* Byte value: 0x9a */ + {{0x60, 0xf6, 0x85, 0xd0, 0x20, 0x28, 0x4d, 0x29,}}, /* Byte value: 0x9b */ + {{0x74, 0x44, 0x6d, 0xfe, 0x2c, 0x27, 0x8e, 0x1e,}}, /* Byte value: 0x9c */ + {{0x22, 0xfe, 0x67, 0x4b, 0x1e, 0xf8, 0xc5, 0x94,}}, /* Byte value: 0x9d */ + {{0x0c, 0x6e, 0x58, 0x1a, 0x04, 0x05, 0x41, 0xac,}}, /* Byte value: 0x9e */ + {{0xcd, 0x17, 0x22, 0x24, 0xfa, 0x25, 0xa4, 0xe7,}}, /* Byte value: 0x9f */ + {{0x7b, 0xd0, 0x23, 0x03, 0x29, 0xb2, 0x4e, 0x99,}}, /* Byte value: 0xa0 */ + {{0x5b, 0x82, 0xe1, 0xf2, 0x88, 0xaa, 0x75, 0x3f,}}, /* Byte value: 0xa1 */ + {{0x40, 0xa4, 0x47, 0x21, 0x81, 0x30, 0x76, 0x8f,}}, /* Byte value: 0xa2 */ + {{0xe3, 0x87, 0x1d, 0x75, 0xe0, 0xd8, 0x20, 0xdf,}}, /* Byte value: 0xa3 */ + {{0x14, 0xb2, 0xe8, 0x2e, 0x0c, 0x0f, 0xc3, 0x37,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0xfd, 0x6c, 0x81, 0x4c, 0xea, 0x31, 0x63, 0x12,}}, /* Byte value: 0xa6 */ + {{0x78, 0x2a, 0x35, 0xe4, 0x28, 0x22, 0xcf, 0xb2,}}, /* Byte value: 0xa7 */ + {{0xad, 0xe1, 0xa7, 0xf4, 0xda, 0x0d, 0xe9, 0xce,}}, /* Byte value: 0xa8 */ + {{0xd0, 0x06, 0xa8, 0xfa, 0xf1, 0x5c, 0x66, 0x01,}}, /* Byte value: 0xa9 */ + {{0x91, 0xf4, 0x5c, 0x86, 0xce, 0x1c, 0x6f, 0x97,}}, /* Byte value: 0xaa */ + {{0xfc, 0x3a, 0x32, 0x11, 0x54, 0x41, 0x1c, 0x0b,}}, /* Byte value: 0xab */ + {{0xf9, 0xf7, 0x08, 0xfb, 0x57, 0x32, 0x5c, 0x76,}}, /* Byte value: 0xac */ + {{0xea, 0x24, 0x7f, 0x85, 0xe7, 0xae, 0x21, 0x0e,}}, /* Byte value: 0xad */ + {{0x85, 0x46, 0xb4, 0xa8, 0xc2, 0x13, 0xac, 0xa0,}}, /* Byte value: 0xae */ + {{0x7e, 0x1d, 0x19, 0xe9, 0x2a, 0xc1, 0x0e, 0xe4,}}, /* Byte value: 0xaf */ + {{0x77, 0xbe, 0x7b, 0x19, 0x2d, 0xb7, 0x0f, 0x35,}}, /* Byte value: 0xb0 */ + {{0xc7, 0x4e, 0x56, 0x33, 0xfc, 0xc3, 0x24, 0x1d,}}, /* Byte value: 0xb1 */ + {{0xc5, 0xe2, 0xf3, 0x89, 0x43, 0x23, 0xda, 0x2f,}}, /* Byte value: 0xb2 */ + {{0x5d, 0xb5, 0xcd, 0xff, 0x8a, 0x49, 0xb4, 0x69,}}, /* Byte value: 0xb3 */ + {{0x3a, 0x22, 0xd7, 0x7f, 0x16, 0xf2, 0x47, 0x0f,}}, /* Byte value: 0xb4 */ + {{0xd5, 0xcb, 0x92, 0x10, 0xf2, 0x2f, 0x26, 0x7c,}}, /* Byte value: 0xb5 */ + {{0x66, 0xc1, 0xa9, 0xdd, 0x22, 0xcb, 0x8c, 0x7f,}}, /* Byte value: 0xb6 */ + {{0x8b, 0x84, 0x49, 0x08, 0x79, 0xf6, 0x13, 0x3e,}}, /* Byte value: 0xb7 */ + {{0x49, 0x07, 0x25, 0xd1, 0x86, 0x46, 0x77, 0x5e,}}, /* Byte value: 0xb8 */ + {{0xc2, 0x83, 0x6c, 0xd9, 0xff, 0xb0, 0x64, 0x60,}}, /* Byte value: 0xb9 */ + {{0xc6, 0x18, 0xe5, 0x6e, 0x42, 0xb3, 0x5b, 0x04,}}, /* Byte value: 0xba */ + {{0x56, 0xba, 0x0a, 0xb5, 0x32, 0xdf, 0x4b, 0x8a,}}, /* Byte value: 0xbb */ + {{0x4e, 0x66, 0xba, 0x81, 0x3a, 0xd5, 0xc9, 0x11,}}, /* Byte value: 0xbc */ + {{0x27, 0x33, 0x5d, 0xa1, 0x1d, 0x8b, 0x85, 0xe9,}}, /* Byte value: 0xbd */ + {{0xe6, 0x4a, 0x27, 0x9f, 0xe3, 0xab, 0x60, 0xa2,}}, /* Byte value: 0xbe */ + {{0x93, 0x58, 0xf9, 0x3c, 0x71, 0xfc, 0x91, 0xa5,}}, /* Byte value: 0xbf */ + {{0xbb, 0xff, 0xea, 0x60, 0x69, 0xe2, 0xd4, 0xcb,}}, /* Byte value: 0xc0 */ + {{0xd1, 0x50, 0x1b, 0xa7, 0x4f, 0x2c, 0x19, 0x18,}}, /* Byte value: 0xc1 */ + {{0x63, 0x0c, 0x93, 0x37, 0x21, 0xb8, 0xcc, 0x02,}}, /* Byte value: 0xc2 */ + {{0xc1, 0x79, 0x7a, 0x3e, 0xfe, 0x20, 0xe5, 0x4b,}}, /* Byte value: 0xc3 */ + {{0x45, 0x69, 0x7d, 0xcb, 0x82, 0x43, 0x36, 0xf2,}}, /* Byte value: 0xc4 */ + {{0xc8, 0xda, 0x18, 0xce, 0xf9, 0x56, 0xe4, 0x9a,}}, /* Byte value: 0xc5 */ + {{0x16, 0x1e, 0x4d, 0x94, 0xb3, 0xef, 0x3d, 0x05,}}, /* Byte value: 0xc6 */ + {{0x1b, 0x26, 0xa6, 0xd3, 0x09, 0x9a, 0x03, 0xb0,}}, /* Byte value: 0xc7 */ + {{0x20, 0x52, 0xc2, 0xf1, 0xa1, 0x18, 0x3b, 0xa6,}}, /* Byte value: 0xc8 */ + {{0x9b, 0xad, 0x28, 0x91, 0xc8, 0xfa, 0xef, 0x6d,}}, /* Byte value: 0xc9 */ + {{0xf3, 0xae, 0x7c, 0xec, 0x51, 0xd4, 0xdc, 0x8c,}}, /* Byte value: 0xca */ + {{0xb8, 0x05, 0xfc, 0x87, 0x68, 0x72, 0x55, 0xe0,}}, /* Byte value: 0xcb */ + {{0xf0, 0x54, 0x6a, 0x0b, 0x50, 0x44, 0x5d, 0xa7,}}, /* Byte value: 0xcc */ + {{0x2f, 0xc6, 0x8c, 0x0c, 0xa4, 0x8d, 0xfb, 0x21,}}, /* Byte value: 0xcd */ + {{0xba, 0xa9, 0x59, 0x3d, 0xd7, 0x92, 0xab, 0xd2,}}, /* Byte value: 0xce */ + {{0x4f, 0x30, 0x09, 0xdc, 0x84, 0xa5, 0xb6, 0x08,}}, /* Byte value: 0xcf */ + {{0xbe, 0x32, 0xd0, 0x8a, 0x6a, 0x91, 0x94, 0xb6,}}, /* Byte value: 0xd0 */ + {{0x12, 0x85, 0xc4, 0x23, 0x0e, 0xec, 0x02, 0x61,}}, /* Byte value: 0xd1 */ + {{0x43, 0x5e, 0x51, 0xc6, 0x80, 0xa0, 0xf7, 0xa4,}}, /* Byte value: 0xd2 */ + {{0xcf, 0xbb, 0x87, 0x9e, 0x45, 0xc5, 0x5a, 0xd5,}}, /* Byte value: 0xd3 */ + {{0xc9, 0x8c, 0xab, 0x93, 0x47, 0x26, 0x9b, 0x83,}}, /* Byte value: 0xd4 */ + {{0x2a, 0x0b, 0xb6, 0xe6, 0xa7, 0xfe, 0xbb, 0x5c,}}, /* Byte value: 0xd5 */ + {{0x11, 0x7f, 0xd2, 0xc4, 0x0f, 0x7c, 0x83, 0x4a,}}, /* Byte value: 0xd6 */ + {{0x15, 0xe4, 0x5b, 0x73, 0xb2, 0x7f, 0xbc, 0x2e,}}, /* Byte value: 0xd7 */ + {{0xf6, 0x63, 0x46, 0x06, 0x52, 0xa7, 0x9c, 0xf1,}}, /* Byte value: 0xd8 */ + {{0x62, 0x5a, 0x20, 0x6a, 0x9f, 0xc8, 0xb3, 0x1b,}}, /* Byte value: 0xd9 */ + {{0xcc, 0x41, 0x91, 0x79, 0x44, 0x55, 0xdb, 0xfe,}}, /* Byte value: 0xda */ + {{0xe0, 0x7d, 0x0b, 0x92, 0xe1, 0x48, 0xa1, 0xf4,}}, /* Byte value: 0xdb */ + {{0x8c, 0xe5, 0xd6, 0x58, 0xc5, 0x65, 0xad, 0x71,}}, /* Byte value: 0xdc */ + {{0x90, 0xa2, 0xef, 0xdb, 0x70, 0x6c, 0x10, 0x8e,}}, /* Byte value: 0xdd */ + {{0x47, 0xc5, 0xd8, 0x71, 0x3d, 0xa3, 0xc8, 0xc0,}}, /* Byte value: 0xde */ + {{0xff, 0xc0, 0x24, 0xf6, 0x55, 0xd1, 0x9d, 0x20,}}, /* Byte value: 0xdf */ + {{0x81, 0xdd, 0x3d, 0x1f, 0x7f, 0x10, 0x93, 0xc4,}}, /* Byte value: 0xe0 */ + {{0x5e, 0x4f, 0xdb, 0x18, 0x8b, 0xd9, 0x35, 0x42,}}, /* Byte value: 0xe1 */ + {{0xfb, 0x5b, 0xad, 0x41, 0xe8, 0xd2, 0xa2, 0x44,}}, /* Byte value: 0xe2 */ + {{0x79, 0x7c, 0x86, 0xb9, 0x96, 0x52, 0xb0, 0xab,}}, /* Byte value: 0xe3 */ + {{0x36, 0x4c, 0x8f, 0x65, 0x12, 0xf7, 0x06, 0xa3,}}, /* Byte value: 0xe4 */ + {{0x32, 0xd7, 0x06, 0xd2, 0xaf, 0xf4, 0x39, 0xc7,}}, /* Byte value: 0xe5 */ + {{0x0e, 0xc2, 0xfd, 0xa0, 0xbb, 0xe5, 0xbf, 0x9e,}}, /* Byte value: 0xe6 */ + {{0xd3, 0xfc, 0xbe, 0x1d, 0xf0, 0xcc, 0xe7, 0x2a,}}, /* Byte value: 0xe7 */ + {{0x33, 0x81, 0xb5, 0x8f, 0x11, 0x84, 0x46, 0xde,}}, /* Byte value: 0xe8 */ + {{0x53, 0x77, 0x30, 0x5f, 0x31, 0xac, 0x0b, 0xf7,}}, /* Byte value: 0xe9 */ + {{0x87, 0xea, 0x11, 0x12, 0x7d, 0xf3, 0x52, 0x92,}}, /* Byte value: 0xea */ + {{0x21, 0x04, 0x71, 0xac, 0x1f, 0x68, 0x44, 0xbf,}}, /* Byte value: 0xeb */ + {{0xd4, 0x9d, 0x21, 0x4d, 0x4c, 0x5f, 0x59, 0x65,}}, /* Byte value: 0xec */ + {{0x07, 0x61, 0x9f, 0x50, 0xbc, 0x93, 0xbe, 0x4f,}}, /* Byte value: 0xed */ + {{0x48, 0x51, 0x96, 0x8c, 0x38, 0x36, 0x08, 0x47,}}, /* Byte value: 0xee */ + {{0xdd, 0x3e, 0x43, 0xbd, 0x4b, 0x29, 0x58, 0xb4,}}, /* Byte value: 0xef */ + {{0x6e, 0x34, 0x78, 0x70, 0x9b, 0xcd, 0xf2, 0xb7,}}, /* Byte value: 0xf0 */ + {{0xc4, 0xb4, 0x40, 0xd4, 0xfd, 0x53, 0xa5, 0x36,}}, /* Byte value: 0xf1 */ + {{0x58, 0x78, 0xf7, 0x15, 0x89, 0x3a, 0xf4, 0x14,}}, /* Byte value: 0xf2 */ + {{0x9c, 0xcc, 0xb7, 0xc1, 0x74, 0x69, 0x51, 0x22,}}, /* Byte value: 0xf3 */ + {{0x05, 0xcd, 0x3a, 0xea, 0x03, 0x73, 0x40, 0x7d,}}, /* Byte value: 0xf4 */ + {{0x19, 0x8a, 0x03, 0x69, 0xb6, 0x7a, 0xfd, 0x82,}}, /* Byte value: 0xf5 */ + {{0xd8, 0xf3, 0x79, 0x57, 0x48, 0x5a, 0x18, 0xc9,}}, /* Byte value: 0xf6 */ + {{0x80, 0x8b, 0x8e, 0x42, 0xc1, 0x60, 0xec, 0xdd,}}, /* Byte value: 0xf7 */ + {{0x9e, 0x60, 0x12, 0x7b, 0xcb, 0x89, 0xaf, 0x10,}}, /* Byte value: 0xf8 */ + {{0x44, 0x3f, 0xce, 0x96, 0x3c, 0x33, 0x49, 0xeb,}}, /* Byte value: 0xf9 */ + {{0xca, 0x76, 0xbd, 0x74, 0x46, 0xb6, 0x1a, 0xa8,}}, /* Byte value: 0xfa */ + {{0x3d, 0x43, 0x48, 0x2f, 0xaa, 0x61, 0xf9, 0x40,}}, /* Byte value: 0xfb */ + {{0x2e, 0x90, 0x3f, 0x51, 0x1a, 0xfd, 0x84, 0x38,}}, /* Byte value: 0xfc */ + {{0x72, 0x73, 0x41, 0xf3, 0x2e, 0xc4, 0x4f, 0x48,}}, /* Byte value: 0xfd */ + {{0x42, 0x08, 0xe2, 0x9b, 0x3e, 0xd0, 0x88, 0xbd,}}, /* Byte value: 0xfe */ + {{0x65, 0x3b, 0xbf, 0x3a, 0x23, 0x5b, 0x0d, 0x54,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 10 */ + {{0xd4, 0x19, 0x2d, 0xd4, 0xc2, 0xc3, 0xd3, 0x9c,}}, /* Byte value: 0x00 */ + {{0x40, 0x7b, 0xcb, 0x40, 0x94, 0x34, 0xa6, 0x04,}}, /* Byte value: 0x01 */ + {{0x97, 0xc0, 0xd2, 0x97, 0x3c, 0x7b, 0x81, 0x84,}}, /* Byte value: 0x02 */ + {{0x4d, 0x69, 0xb6, 0x4d, 0xd9, 0x84, 0x1d, 0xc1,}}, /* Byte value: 0x03 */ + {{0x03, 0xa2, 0x34, 0x03, 0x6a, 0x8c, 0xf4, 0x1c,}}, /* Byte value: 0x04 */ + {{0xd1, 0x3c, 0x71, 0xd1, 0x7c, 0x94, 0x0c, 0xb8,}}, /* Byte value: 0x05 */ + {{0xf8, 0x08, 0x79, 0xf8, 0xe3, 0xac, 0xd6, 0xee,}}, /* Byte value: 0x06 */ + {{0xca, 0xc7, 0x26, 0xca, 0xc0, 0xf2, 0x54, 0x44,}}, /* Byte value: 0x07 */ + {{0x53, 0xb7, 0xbd, 0x53, 0xdb, 0xb5, 0x9a, 0x19,}}, /* Byte value: 0x08 */ + {{0x66, 0x20, 0x27, 0x66, 0x0a, 0xf5, 0xde, 0x3e,}}, /* Byte value: 0x09 */ + {{0xa5, 0x0f, 0x8d, 0xa5, 0x1f, 0x25, 0x03, 0x2e,}}, /* Byte value: 0x0a */ + {{0x10, 0x6e, 0x42, 0x10, 0x25, 0x0d, 0xc8, 0x01,}}, /* Byte value: 0x0b */ + {{0x6c, 0x6a, 0x9f, 0x6c, 0xb5, 0x5b, 0xa3, 0x76,}}, /* Byte value: 0x0c */ + {{0x90, 0x98, 0x17, 0x90, 0xce, 0x65, 0x47, 0x09,}}, /* Byte value: 0x0d */ + {{0x5e, 0xa5, 0xc0, 0x5e, 0x96, 0x05, 0x21, 0xdc,}}, /* Byte value: 0x0e */ + {{0xbd, 0x56, 0xee, 0xbd, 0xc9, 0xcf, 0xaf, 0xce,}}, /* Byte value: 0x0f */ + {{0xc7, 0xd5, 0x5b, 0xc7, 0x8d, 0x42, 0xef, 0x81,}}, /* Byte value: 0x10 */ + {{0x20, 0xdc, 0x84, 0x20, 0x4a, 0x1a, 0x53, 0x02,}}, /* Byte value: 0x11 */ + {{0x36, 0x35, 0xae, 0x36, 0xbb, 0xcc, 0xb0, 0x3b,}}, /* Byte value: 0x12 */ + {{0xe6, 0xd6, 0x72, 0xe6, 0xe1, 0x9d, 0x51, 0x36,}}, /* Byte value: 0x13 */ + {{0xf3, 0x9d, 0x6c, 0xf3, 0x7a, 0xc7, 0x46, 0x13,}}, /* Byte value: 0x14 */ + {{0x78, 0xfe, 0x2c, 0x78, 0x08, 0xc4, 0x59, 0xe6,}}, /* Byte value: 0x15 */ + {{0x60, 0xa7, 0x4f, 0x60, 0xde, 0x2e, 0xf5, 0x06,}}, /* Byte value: 0x16 */ + {{0x0c, 0xcd, 0xd0, 0x0c, 0x6b, 0x75, 0x56, 0x70,}}, /* Byte value: 0x17 */ + {{0x3c, 0x7f, 0x16, 0x3c, 0x04, 0x62, 0xcd, 0x73,}}, /* Byte value: 0x18 */ + {{0x7f, 0xa6, 0xe9, 0x7f, 0xfa, 0xda, 0x9f, 0x6b,}}, /* Byte value: 0x19 */ + {{0xc0, 0x8d, 0x9e, 0xc0, 0x7f, 0x5c, 0x29, 0x0c,}}, /* Byte value: 0x1a */ + {{0xfa, 0x75, 0xe0, 0xfa, 0xaf, 0xe5, 0xcf, 0x47,}}, /* Byte value: 0x1b */ + {{0xe5, 0x74, 0x46, 0xe5, 0x8b, 0x11, 0xa5, 0x2a,}}, /* Byte value: 0x1c */ + {{0x2c, 0x11, 0x54, 0x2c, 0x21, 0x6f, 0x05, 0x72,}}, /* Byte value: 0x1d */ + {{0x29, 0x34, 0x08, 0x29, 0x9f, 0x38, 0xda, 0x56,}}, /* Byte value: 0x1e */ + {{0xce, 0x3d, 0xd7, 0xce, 0x58, 0x60, 0x66, 0xd5,}}, /* Byte value: 0x1f */ + {{0x7c, 0x04, 0xdd, 0x7c, 0x90, 0x56, 0x6b, 0x77,}}, /* Byte value: 0x20 */ + {{0x07, 0x58, 0xc5, 0x07, 0xf2, 0x1e, 0xc6, 0x8d,}}, /* Byte value: 0x21 */ + {{0xb4, 0xbe, 0x62, 0xb4, 0x1c, 0xed, 0x26, 0x9a,}}, /* Byte value: 0x22 */ + {{0x81, 0x29, 0xf8, 0x81, 0xcd, 0xad, 0x62, 0xbd,}}, /* Byte value: 0x23 */ + {{0xa2, 0x57, 0x48, 0xa2, 0xed, 0x3b, 0xc5, 0xa3,}}, /* Byte value: 0x24 */ + {{0xf0, 0x3f, 0x58, 0xf0, 0x10, 0x4b, 0xb2, 0x0f,}}, /* Byte value: 0x25 */ + {{0xb6, 0xc3, 0xfb, 0xb6, 0x50, 0xa4, 0x3f, 0x33,}}, /* Byte value: 0x26 */ + {{0x43, 0xd9, 0xff, 0x43, 0xfe, 0xb8, 0x52, 0x18,}}, /* Byte value: 0x27 */ + {{0x67, 0xff, 0x8a, 0x67, 0x2c, 0x30, 0x33, 0x8b,}}, /* Byte value: 0x28 */ + {{0x59, 0xfd, 0x05, 0x59, 0x64, 0x1b, 0xe7, 0x51,}}, /* Byte value: 0x29 */ + {{0xec, 0x9c, 0xca, 0xec, 0x5e, 0x33, 0x2c, 0x7e,}}, /* Byte value: 0x2a */ + {{0x86, 0x71, 0x3d, 0x86, 0x3f, 0xb3, 0xa4, 0x30,}}, /* Byte value: 0x2b */ + {{0xf4, 0xc5, 0xa9, 0xf4, 0x88, 0xd9, 0x80, 0x9e,}}, /* Byte value: 0x2c */ + {{0xf6, 0xb8, 0x30, 0xf6, 0xc4, 0x90, 0x99, 0x37,}}, /* Byte value: 0x2d */ + {{0x5c, 0xd8, 0x59, 0x5c, 0xda, 0x4c, 0x38, 0x75,}}, /* Byte value: 0x2e */ + {{0x92, 0xe5, 0x8e, 0x92, 0x82, 0x2c, 0x5e, 0xa0,}}, /* Byte value: 0x2f */ + {{0xa8, 0x1d, 0xf0, 0xa8, 0x52, 0x95, 0xb8, 0xeb,}}, /* Byte value: 0x30 */ + {{0xcf, 0xe2, 0x7a, 0xcf, 0x7e, 0xa5, 0x8b, 0x60,}}, /* Byte value: 0x31 */ + {{0x2f, 0xb3, 0x60, 0x2f, 0x4b, 0xe3, 0xf1, 0x6e,}}, /* Byte value: 0x32 */ + {{0xe9, 0xb9, 0x96, 0xe9, 0xe0, 0x64, 0xf3, 0x5a,}}, /* Byte value: 0x33 */ + {{0x54, 0xef, 0x78, 0x54, 0x29, 0xab, 0x5c, 0x94,}}, /* Byte value: 0x34 */ + {{0x8f, 0x99, 0xb1, 0x8f, 0xea, 0x91, 0x2d, 0x64,}}, /* Byte value: 0x35 */ + {{0xaa, 0x60, 0x69, 0xaa, 0x1e, 0xdc, 0xa1, 0x42,}}, /* Byte value: 0x36 */ + {{0x24, 0x26, 0x75, 0x24, 0xd2, 0x88, 0x61, 0x93,}}, /* Byte value: 0x37 */ + {{0x71, 0x16, 0xa0, 0x71, 0xdd, 0xe6, 0xd0, 0xb2,}}, /* Byte value: 0x38 */ + {{0x65, 0x82, 0x13, 0x65, 0x60, 0x79, 0x2a, 0x22,}}, /* Byte value: 0x39 */ + {{0x99, 0x70, 0x9b, 0x99, 0x1b, 0x47, 0xce, 0x5d,}}, /* Byte value: 0x3a */ + {{0x96, 0x1f, 0x7f, 0x96, 0x1a, 0xbe, 0x6c, 0x31,}}, /* Byte value: 0x3b */ + {{0x9c, 0x55, 0xc7, 0x9c, 0xa5, 0x10, 0x11, 0x79,}}, /* Byte value: 0x3c */ + {{0xdd, 0xf1, 0xa1, 0xdd, 0x17, 0xe1, 0x5a, 0xc8,}}, /* Byte value: 0x3d */ + {{0x5a, 0x5f, 0x31, 0x5a, 0x0e, 0x97, 0x13, 0x4d,}}, /* Byte value: 0x3e */ + {{0x80, 0xf6, 0x55, 0x80, 0xeb, 0x68, 0x8f, 0x08,}}, /* Byte value: 0x3f */ + {{0xe8, 0x66, 0x3b, 0xe8, 0xc6, 0xa1, 0x1e, 0xef,}}, /* Byte value: 0x40 */ + {{0x50, 0x15, 0x89, 0x50, 0xb1, 0x39, 0x6e, 0x05,}}, /* Byte value: 0x41 */ + {{0x57, 0x4d, 0x4c, 0x57, 0x43, 0x27, 0xa8, 0x88,}}, /* Byte value: 0x42 */ + {{0xe4, 0xab, 0xeb, 0xe4, 0xad, 0xd4, 0x48, 0x9f,}}, /* Byte value: 0x43 */ + {{0x1e, 0xde, 0x0b, 0x1e, 0x02, 0x31, 0x87, 0xd8,}}, /* Byte value: 0x44 */ + {{0x84, 0x0c, 0xa4, 0x84, 0x73, 0xfa, 0xbd, 0x99,}}, /* Byte value: 0x45 */ + {{0x15, 0x4b, 0x1e, 0x15, 0x9b, 0x5a, 0x17, 0x25,}}, /* Byte value: 0x46 */ + {{0x41, 0xa4, 0x66, 0x41, 0xb2, 0xf1, 0x4b, 0xb1,}}, /* Byte value: 0x47 */ + {{0x19, 0x86, 0xce, 0x19, 0xf0, 0x2f, 0x41, 0x55,}}, /* Byte value: 0x48 */ + {{0x26, 0x5b, 0xec, 0x26, 0x9e, 0xc1, 0x78, 0x3a,}}, /* Byte value: 0x49 */ + {{0xa0, 0x2a, 0xd1, 0xa0, 0xa1, 0x72, 0xdc, 0x0a,}}, /* Byte value: 0x4a */ + {{0x0b, 0x95, 0x15, 0x0b, 0x99, 0x6b, 0x90, 0xfd,}}, /* Byte value: 0x4b */ + {{0x22, 0xa1, 0x1d, 0x22, 0x06, 0x53, 0x4a, 0xab,}}, /* Byte value: 0x4c */ + {{0x9d, 0x8a, 0x6a, 0x9d, 0x83, 0xd5, 0xfc, 0xcc,}}, /* Byte value: 0x4d */ + {{0xf5, 0x1a, 0x04, 0xf5, 0xae, 0x1c, 0x6d, 0x2b,}}, /* Byte value: 0x4e */ + {{0xda, 0xa9, 0x64, 0xda, 0xe5, 0xff, 0x9c, 0x45,}}, /* Byte value: 0x4f */ + {{0x37, 0xea, 0x03, 0x37, 0x9d, 0x09, 0x5d, 0x8e,}}, /* Byte value: 0x50 */ + {{0xa7, 0x72, 0x14, 0xa7, 0x53, 0x6c, 0x1a, 0x87,}}, /* Byte value: 0x51 */ + {{0xcd, 0x9f, 0xe3, 0xcd, 0x32, 0xec, 0x92, 0xc9,}}, /* Byte value: 0x52 */ + {{0x63, 0x05, 0x7b, 0x63, 0xb4, 0xa2, 0x01, 0x1a,}}, /* Byte value: 0x53 */ + {{0xbc, 0x89, 0x43, 0xbc, 0xef, 0x0a, 0x42, 0x7b,}}, /* Byte value: 0x54 */ + {{0xe2, 0x2c, 0x83, 0xe2, 0x79, 0x0f, 0x63, 0xa7,}}, /* Byte value: 0x55 */ + {{0xd6, 0x64, 0xb4, 0xd6, 0x8e, 0x8a, 0xca, 0x35,}}, /* Byte value: 0x56 */ + {{0x94, 0x62, 0xe6, 0x94, 0x56, 0xf7, 0x75, 0x98,}}, /* Byte value: 0x57 */ + {{0xa4, 0xd0, 0x20, 0xa4, 0x39, 0xe0, 0xee, 0x9b,}}, /* Byte value: 0x58 */ + {{0x88, 0xc1, 0x74, 0x88, 0x18, 0x8f, 0xeb, 0xe9,}}, /* Byte value: 0x59 */ + {{0x62, 0xda, 0xd6, 0x62, 0x92, 0x67, 0xec, 0xaf,}}, /* Byte value: 0x5a */ + {{0x2e, 0x6c, 0xcd, 0x2e, 0x6d, 0x26, 0x1c, 0xdb,}}, /* Byte value: 0x5b */ + {{0xc8, 0xba, 0xbf, 0xc8, 0x8c, 0xbb, 0x4d, 0xed,}}, /* Byte value: 0x5c */ + {{0x18, 0x59, 0x63, 0x18, 0xd6, 0xea, 0xac, 0xe0,}}, /* Byte value: 0x5d */ + {{0x06, 0x87, 0x68, 0x06, 0xd4, 0xdb, 0x2b, 0x38,}}, /* Byte value: 0x5e */ + {{0x16, 0xe9, 0x2a, 0x16, 0xf1, 0xd6, 0xe3, 0x39,}}, /* Byte value: 0x5f */ + {{0x13, 0xcc, 0x76, 0x13, 0x4f, 0x81, 0x3c, 0x1d,}}, /* Byte value: 0x60 */ + {{0xd2, 0x9e, 0x45, 0xd2, 0x16, 0x18, 0xf8, 0xa4,}}, /* Byte value: 0x61 */ + {{0x5b, 0x80, 0x9c, 0x5b, 0x28, 0x52, 0xfe, 0xf8,}}, /* Byte value: 0x62 */ + {{0xff, 0x50, 0xbc, 0xff, 0x11, 0xb2, 0x10, 0x63,}}, /* Byte value: 0x63 */ + {{0xbb, 0xd1, 0x86, 0xbb, 0x1d, 0x14, 0x84, 0xf6,}}, /* Byte value: 0x64 */ + {{0xc2, 0xf0, 0x07, 0xc2, 0x33, 0x15, 0x30, 0xa5,}}, /* Byte value: 0x65 */ + {{0xb9, 0xac, 0x1f, 0xb9, 0x51, 0x5d, 0x9d, 0x5f,}}, /* Byte value: 0x66 */ + {{0xbf, 0x2b, 0x77, 0xbf, 0x85, 0x86, 0xb6, 0x67,}}, /* Byte value: 0x67 */ + {{0xef, 0x3e, 0xfe, 0xef, 0x34, 0xbf, 0xd8, 0x62,}}, /* Byte value: 0x68 */ + {{0xdc, 0x2e, 0x0c, 0xdc, 0x31, 0x24, 0xb7, 0x7d,}}, /* Byte value: 0x69 */ + {{0x1b, 0xfb, 0x57, 0x1b, 0xbc, 0x66, 0x58, 0xfc,}}, /* Byte value: 0x6a */ + {{0x27, 0x84, 0x41, 0x27, 0xb8, 0x04, 0x95, 0x8f,}}, /* Byte value: 0x6b */ + {{0x3e, 0x02, 0x8f, 0x3e, 0x48, 0x2b, 0xd4, 0xda,}}, /* Byte value: 0x6c */ + {{0xe7, 0x09, 0xdf, 0xe7, 0xc7, 0x58, 0xbc, 0x83,}}, /* Byte value: 0x6d */ + {{0xb0, 0x44, 0x93, 0xb0, 0x84, 0x7f, 0x14, 0x0b,}}, /* Byte value: 0x6e */ + {{0x69, 0x4f, 0xc3, 0x69, 0x0b, 0x0c, 0x7c, 0x52,}}, /* Byte value: 0x6f */ + {{0x21, 0x03, 0x29, 0x21, 0x6c, 0xdf, 0xbe, 0xb7,}}, /* Byte value: 0x70 */ + {{0x0f, 0x6f, 0xe4, 0x0f, 0x01, 0xf9, 0xa2, 0x6c,}}, /* Byte value: 0x71 */ + {{0xf1, 0xe0, 0xf5, 0xf1, 0x36, 0x8e, 0x5f, 0xba,}}, /* Byte value: 0x72 */ + {{0x1a, 0x24, 0xfa, 0x1a, 0x9a, 0xa3, 0xb5, 0x49,}}, /* Byte value: 0x73 */ + {{0x0d, 0x12, 0x7d, 0x0d, 0x4d, 0xb0, 0xbb, 0xc5,}}, /* Byte value: 0x74 */ + {{0xa6, 0xad, 0xb9, 0xa6, 0x75, 0xa9, 0xf7, 0x32,}}, /* Byte value: 0x75 */ + {{0x02, 0x7d, 0x99, 0x02, 0x4c, 0x49, 0x19, 0xa9,}}, /* Byte value: 0x76 */ + {{0x6a, 0xed, 0xf7, 0x6a, 0x61, 0x80, 0x88, 0x4e,}}, /* Byte value: 0x77 */ + {{0x08, 0x37, 0x21, 0x08, 0xf3, 0xe7, 0x64, 0xe1,}}, /* Byte value: 0x78 */ + {{0x4c, 0xb6, 0x1b, 0x4c, 0xff, 0x41, 0xf0, 0x74,}}, /* Byte value: 0x79 */ + {{0x49, 0x93, 0x47, 0x49, 0x41, 0x16, 0x2f, 0x50,}}, /* Byte value: 0x7a */ + {{0x91, 0x47, 0xba, 0x91, 0xe8, 0xa0, 0xaa, 0xbc,}}, /* Byte value: 0x7b */ + {{0xe1, 0x8e, 0xb7, 0xe1, 0x13, 0x83, 0x97, 0xbb,}}, /* Byte value: 0x7c */ + {{0x8b, 0x63, 0x40, 0x8b, 0x72, 0x03, 0x1f, 0xf5,}}, /* Byte value: 0x7d */ + {{0x14, 0x94, 0xb3, 0x14, 0xbd, 0x9f, 0xfa, 0x90,}}, /* Byte value: 0x7e */ + {{0x95, 0xbd, 0x4b, 0x95, 0x70, 0x32, 0x98, 0x2d,}}, /* Byte value: 0x7f */ + {{0xb8, 0x73, 0xb2, 0xb8, 0x77, 0x98, 0x70, 0xea,}}, /* Byte value: 0x80 */ + {{0x9e, 0x28, 0x5e, 0x9e, 0xe9, 0x59, 0x08, 0xd0,}}, /* Byte value: 0x81 */ + {{0xeb, 0xc4, 0x0f, 0xeb, 0xac, 0x2d, 0xea, 0xf3,}}, /* Byte value: 0x82 */ + {{0x6e, 0x17, 0x06, 0x6e, 0xf9, 0x12, 0xba, 0xdf,}}, /* Byte value: 0x83 */ + {{0xc3, 0x2f, 0xaa, 0xc3, 0x15, 0xd0, 0xdd, 0x10,}}, /* Byte value: 0x84 */ + {{0x98, 0xaf, 0x36, 0x98, 0x3d, 0x82, 0x23, 0xe8,}}, /* Byte value: 0x85 */ + {{0x70, 0xc9, 0x0d, 0x70, 0xfb, 0x23, 0x3d, 0x07,}}, /* Byte value: 0x86 */ + {{0x72, 0xb4, 0x94, 0x72, 0xb7, 0x6a, 0x24, 0xae,}}, /* Byte value: 0x87 */ + {{0x04, 0xfa, 0xf1, 0x04, 0x98, 0x92, 0x32, 0x91,}}, /* Byte value: 0x88 */ + {{0xed, 0x43, 0x67, 0xed, 0x78, 0xf6, 0xc1, 0xcb,}}, /* Byte value: 0x89 */ + {{0xf2, 0x42, 0xc1, 0xf2, 0x5c, 0x02, 0xab, 0xa6,}}, /* Byte value: 0x8a */ + {{0x47, 0x23, 0x0e, 0x47, 0x66, 0x2a, 0x60, 0x89,}}, /* Byte value: 0x8b */ + {{0x45, 0x5e, 0x97, 0x45, 0x2a, 0x63, 0x79, 0x20,}}, /* Byte value: 0x8c */ + {{0x9a, 0xd2, 0xaf, 0x9a, 0x71, 0xcb, 0x3a, 0x41,}}, /* Byte value: 0x8d */ + {{0xd5, 0xc6, 0x80, 0xd5, 0xe4, 0x06, 0x3e, 0x29,}}, /* Byte value: 0x8e */ + {{0xd9, 0x0b, 0x50, 0xd9, 0x8f, 0x73, 0x68, 0x59,}}, /* Byte value: 0x8f */ + {{0x8d, 0xe4, 0x28, 0x8d, 0xa6, 0xd8, 0x34, 0xcd,}}, /* Byte value: 0x90 */ + {{0x3b, 0x27, 0xd3, 0x3b, 0xf6, 0x7c, 0x0b, 0xfe,}}, /* Byte value: 0x91 */ + {{0x6f, 0xc8, 0xab, 0x6f, 0xdf, 0xd7, 0x57, 0x6a,}}, /* Byte value: 0x92 */ + {{0x4e, 0xcb, 0x82, 0x4e, 0xb3, 0x08, 0xe9, 0xdd,}}, /* Byte value: 0x93 */ + {{0x34, 0x48, 0x37, 0x34, 0xf7, 0x85, 0xa9, 0x92,}}, /* Byte value: 0x94 */ + {{0x74, 0x33, 0xfc, 0x74, 0x63, 0xb1, 0x0f, 0x96,}}, /* Byte value: 0x95 */ + {{0x9f, 0xf7, 0xf3, 0x9f, 0xcf, 0x9c, 0xe5, 0x65,}}, /* Byte value: 0x96 */ + {{0x7d, 0xdb, 0x70, 0x7d, 0xb6, 0x93, 0x86, 0xc2,}}, /* Byte value: 0x97 */ + {{0x61, 0x78, 0xe2, 0x61, 0xf8, 0xeb, 0x18, 0xb3,}}, /* Byte value: 0x98 */ + {{0x31, 0x6d, 0x6b, 0x31, 0x49, 0xd2, 0x76, 0xb6,}}, /* Byte value: 0x99 */ + {{0x09, 0xe8, 0x8c, 0x09, 0xd5, 0x22, 0x89, 0x54,}}, /* Byte value: 0x9a */ + {{0x12, 0x13, 0xdb, 0x12, 0x69, 0x44, 0xd1, 0xa8,}}, /* Byte value: 0x9b */ + {{0x64, 0x5d, 0xbe, 0x64, 0x46, 0xbc, 0xc7, 0x97,}}, /* Byte value: 0x9c */ + {{0xd7, 0xbb, 0x19, 0xd7, 0xa8, 0x4f, 0x27, 0x80,}}, /* Byte value: 0x9d */ + {{0x93, 0x3a, 0x23, 0x93, 0xa4, 0xe9, 0xb3, 0x15,}}, /* Byte value: 0x9e */ + {{0x3a, 0xf8, 0x7e, 0x3a, 0xd0, 0xb9, 0xe6, 0x4b,}}, /* Byte value: 0x9f */ + {{0xa3, 0x88, 0xe5, 0xa3, 0xcb, 0xfe, 0x28, 0x16,}}, /* Byte value: 0xa0 */ + {{0xad, 0x38, 0xac, 0xad, 0xec, 0xc2, 0x67, 0xcf,}}, /* Byte value: 0xa1 */ + {{0x1c, 0xa3, 0x92, 0x1c, 0x4e, 0x78, 0x9e, 0x71,}}, /* Byte value: 0xa2 */ + {{0x7e, 0x79, 0x44, 0x7e, 0xdc, 0x1f, 0x72, 0xde,}}, /* Byte value: 0xa3 */ + {{0x76, 0x4e, 0x65, 0x76, 0x2f, 0xf8, 0x16, 0x3f,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x33, 0x10, 0xf2, 0x33, 0x05, 0x9b, 0x6f, 0x1f,}}, /* Byte value: 0xa6 */ + {{0xf7, 0x67, 0x9d, 0xf7, 0xe2, 0x55, 0x74, 0x82,}}, /* Byte value: 0xa7 */ + {{0x28, 0xeb, 0xa5, 0x28, 0xb9, 0xfd, 0x37, 0xe3,}}, /* Byte value: 0xa8 */ + {{0x23, 0x7e, 0xb0, 0x23, 0x20, 0x96, 0xa7, 0x1e,}}, /* Byte value: 0xa9 */ + {{0xb2, 0x39, 0x0a, 0xb2, 0xc8, 0x36, 0x0d, 0xa2,}}, /* Byte value: 0xaa */ + {{0xbe, 0xf4, 0xda, 0xbe, 0xa3, 0x43, 0x5b, 0xd2,}}, /* Byte value: 0xab */ + {{0x42, 0x06, 0x52, 0x42, 0xd8, 0x7d, 0xbf, 0xad,}}, /* Byte value: 0xac */ + {{0x11, 0xb1, 0xef, 0x11, 0x03, 0xc8, 0x25, 0xb4,}}, /* Byte value: 0xad */ + {{0xc4, 0x77, 0x6f, 0xc4, 0xe7, 0xce, 0x1b, 0x9d,}}, /* Byte value: 0xae */ + {{0x5f, 0x7a, 0x6d, 0x5f, 0xb0, 0xc0, 0xcc, 0x69,}}, /* Byte value: 0xaf */ + {{0x30, 0xb2, 0xc6, 0x30, 0x6f, 0x17, 0x9b, 0x03,}}, /* Byte value: 0xb0 */ + {{0x01, 0xdf, 0xad, 0x01, 0x26, 0xc5, 0xed, 0xb5,}}, /* Byte value: 0xb1 */ + {{0xd8, 0xd4, 0xfd, 0xd8, 0xa9, 0xb6, 0x85, 0xec,}}, /* Byte value: 0xb2 */ + {{0x05, 0x25, 0x5c, 0x05, 0xbe, 0x57, 0xdf, 0x24,}}, /* Byte value: 0xb3 */ + {{0x32, 0xcf, 0x5f, 0x32, 0x23, 0x5e, 0x82, 0xaa,}}, /* Byte value: 0xb4 */ + {{0xdf, 0x8c, 0x38, 0xdf, 0x5b, 0xa8, 0x43, 0x61,}}, /* Byte value: 0xb5 */ + {{0xba, 0x0e, 0x2b, 0xba, 0x3b, 0xd1, 0x69, 0x43,}}, /* Byte value: 0xb6 */ + {{0x8e, 0x46, 0x1c, 0x8e, 0xcc, 0x54, 0xc0, 0xd1,}}, /* Byte value: 0xb7 */ + {{0x73, 0x6b, 0x39, 0x73, 0x91, 0xaf, 0xc9, 0x1b,}}, /* Byte value: 0xb8 */ + {{0xfd, 0x2d, 0x25, 0xfd, 0x5d, 0xfb, 0x09, 0xca,}}, /* Byte value: 0xb9 */ + {{0x8c, 0x3b, 0x85, 0x8c, 0x80, 0x1d, 0xd9, 0x78,}}, /* Byte value: 0xba */ + {{0xb3, 0xe6, 0xa7, 0xb3, 0xee, 0xf3, 0xe0, 0x17,}}, /* Byte value: 0xbb */ + {{0x56, 0x92, 0xe1, 0x56, 0x65, 0xe2, 0x45, 0x3d,}}, /* Byte value: 0xbc */ + {{0x2b, 0x49, 0x91, 0x2b, 0xd3, 0x71, 0xc3, 0xff,}}, /* Byte value: 0xbd */ + {{0x82, 0x8b, 0xcc, 0x82, 0xa7, 0x21, 0x96, 0xa1,}}, /* Byte value: 0xbe */ + {{0x6b, 0x32, 0x5a, 0x6b, 0x47, 0x45, 0x65, 0xfb,}}, /* Byte value: 0xbf */ + {{0x87, 0xae, 0x90, 0x87, 0x19, 0x76, 0x49, 0x85,}}, /* Byte value: 0xc0 */ + {{0xae, 0x9a, 0x98, 0xae, 0x86, 0x4e, 0x93, 0xd3,}}, /* Byte value: 0xc1 */ + {{0x46, 0xfc, 0xa3, 0x46, 0x40, 0xef, 0x8d, 0x3c,}}, /* Byte value: 0xc2 */ + {{0xa9, 0xc2, 0x5d, 0xa9, 0x74, 0x50, 0x55, 0x5e,}}, /* Byte value: 0xc3 */ + {{0xe0, 0x51, 0x1a, 0xe0, 0x35, 0x46, 0x7a, 0x0e,}}, /* Byte value: 0xc4 */ + {{0xc6, 0x0a, 0xf6, 0xc6, 0xab, 0x87, 0x02, 0x34,}}, /* Byte value: 0xc5 */ + {{0xaf, 0x45, 0x35, 0xaf, 0xa0, 0x8b, 0x7e, 0x66,}}, /* Byte value: 0xc6 */ + {{0xb1, 0x9b, 0x3e, 0xb1, 0xa2, 0xba, 0xf9, 0xbe,}}, /* Byte value: 0xc7 */ + {{0x0e, 0xb0, 0x49, 0x0e, 0x27, 0x3c, 0x4f, 0xd9,}}, /* Byte value: 0xc8 */ + {{0x89, 0x1e, 0xd9, 0x89, 0x3e, 0x4a, 0x06, 0x5c,}}, /* Byte value: 0xc9 */ + {{0x79, 0x21, 0x81, 0x79, 0x2e, 0x01, 0xb4, 0x53,}}, /* Byte value: 0xca */ + {{0xd3, 0x41, 0xe8, 0xd3, 0x30, 0xdd, 0x15, 0x11,}}, /* Byte value: 0xcb */ + {{0x2d, 0xce, 0xf9, 0x2d, 0x07, 0xaa, 0xe8, 0xc7,}}, /* Byte value: 0xcc */ + {{0xc9, 0x65, 0x12, 0xc9, 0xaa, 0x7e, 0xa0, 0x58,}}, /* Byte value: 0xcd */ + {{0x0a, 0x4a, 0xb8, 0x0a, 0xbf, 0xae, 0x7d, 0x48,}}, /* Byte value: 0xce */ + {{0xdb, 0x76, 0xc9, 0xdb, 0xc3, 0x3a, 0x71, 0xf0,}}, /* Byte value: 0xcf */ + {{0x7b, 0x5c, 0x18, 0x7b, 0x62, 0x48, 0xad, 0xfa,}}, /* Byte value: 0xd0 */ + {{0xde, 0x53, 0x95, 0xde, 0x7d, 0x6d, 0xae, 0xd4,}}, /* Byte value: 0xd1 */ + {{0x48, 0x4c, 0xea, 0x48, 0x67, 0xd3, 0xc2, 0xe5,}}, /* Byte value: 0xd2 */ + {{0xe3, 0xf3, 0x2e, 0xe3, 0x5f, 0xca, 0x8e, 0x12,}}, /* Byte value: 0xd3 */ + {{0x4b, 0xee, 0xde, 0x4b, 0x0d, 0x5f, 0x36, 0xf9,}}, /* Byte value: 0xd4 */ + {{0x35, 0x97, 0x9a, 0x35, 0xd1, 0x40, 0x44, 0x27,}}, /* Byte value: 0xd5 */ + {{0x8a, 0xbc, 0xed, 0x8a, 0x54, 0xc6, 0xf2, 0x40,}}, /* Byte value: 0xd6 */ + {{0xfb, 0xaa, 0x4d, 0xfb, 0x89, 0x20, 0x22, 0xf2,}}, /* Byte value: 0xd7 */ + {{0x85, 0xd3, 0x09, 0x85, 0x55, 0x3f, 0x50, 0x2c,}}, /* Byte value: 0xd8 */ + {{0xcb, 0x18, 0x8b, 0xcb, 0xe6, 0x37, 0xb9, 0xf1,}}, /* Byte value: 0xd9 */ + {{0xb7, 0x1c, 0x56, 0xb7, 0x76, 0x61, 0xd2, 0x86,}}, /* Byte value: 0xda */ + {{0x2a, 0x96, 0x3c, 0x2a, 0xf5, 0xb4, 0x2e, 0x4a,}}, /* Byte value: 0xdb */ + {{0xab, 0xbf, 0xc4, 0xab, 0x38, 0x19, 0x4c, 0xf7,}}, /* Byte value: 0xdc */ + {{0x3f, 0xdd, 0x22, 0x3f, 0x6e, 0xee, 0x39, 0x6f,}}, /* Byte value: 0xdd */ + {{0x39, 0x5a, 0x4a, 0x39, 0xba, 0x35, 0x12, 0x57,}}, /* Byte value: 0xde */ + {{0xea, 0x1b, 0xa2, 0xea, 0x8a, 0xe8, 0x07, 0x46,}}, /* Byte value: 0xdf */ + {{0xb5, 0x61, 0xcf, 0xb5, 0x3a, 0x28, 0xcb, 0x2f,}}, /* Byte value: 0xe0 */ + {{0x51, 0xca, 0x24, 0x51, 0x97, 0xfc, 0x83, 0xb0,}}, /* Byte value: 0xe1 */ + {{0x9b, 0x0d, 0x02, 0x9b, 0x57, 0x0e, 0xd7, 0xf4,}}, /* Byte value: 0xe2 */ + {{0x7a, 0x83, 0xb5, 0x7a, 0x44, 0x8d, 0x40, 0x4f,}}, /* Byte value: 0xe3 */ + {{0xa1, 0xf5, 0x7c, 0xa1, 0x87, 0xb7, 0x31, 0xbf,}}, /* Byte value: 0xe4 */ + {{0xd0, 0xe3, 0xdc, 0xd0, 0x5a, 0x51, 0xe1, 0x0d,}}, /* Byte value: 0xe5 */ + {{0x4a, 0x31, 0x73, 0x4a, 0x2b, 0x9a, 0xdb, 0x4c,}}, /* Byte value: 0xe6 */ + {{0x77, 0x91, 0xc8, 0x77, 0x09, 0x3d, 0xfb, 0x8a,}}, /* Byte value: 0xe7 */ + {{0x5d, 0x07, 0xf4, 0x5d, 0xfc, 0x89, 0xd5, 0xc0,}}, /* Byte value: 0xe8 */ + {{0x4f, 0x14, 0x2f, 0x4f, 0x95, 0xcd, 0x04, 0x68,}}, /* Byte value: 0xe9 */ + {{0x1d, 0x7c, 0x3f, 0x1d, 0x68, 0xbd, 0x73, 0xc4,}}, /* Byte value: 0xea */ + {{0x83, 0x54, 0x61, 0x83, 0x81, 0xe4, 0x7b, 0x14,}}, /* Byte value: 0xeb */ + {{0x52, 0x68, 0x10, 0x52, 0xfd, 0x70, 0x77, 0xac,}}, /* Byte value: 0xec */ + {{0x25, 0xf9, 0xd8, 0x25, 0xf4, 0x4d, 0x8c, 0x26,}}, /* Byte value: 0xed */ + {{0xfe, 0x8f, 0x11, 0xfe, 0x37, 0x77, 0xfd, 0xd6,}}, /* Byte value: 0xee */ + {{0x3d, 0xa0, 0xbb, 0x3d, 0x22, 0xa7, 0x20, 0xc6,}}, /* Byte value: 0xef */ + {{0x58, 0x22, 0xa8, 0x58, 0x42, 0xde, 0x0a, 0xe4,}}, /* Byte value: 0xf0 */ + {{0x55, 0x30, 0xd5, 0x55, 0x0f, 0x6e, 0xb1, 0x21,}}, /* Byte value: 0xf1 */ + {{0xf9, 0xd7, 0xd4, 0xf9, 0xc5, 0x69, 0x3b, 0x5b,}}, /* Byte value: 0xf2 */ + {{0xac, 0xe7, 0x01, 0xac, 0xca, 0x07, 0x8a, 0x7a,}}, /* Byte value: 0xf3 */ + {{0xfc, 0xf2, 0x88, 0xfc, 0x7b, 0x3e, 0xe4, 0x7f,}}, /* Byte value: 0xf4 */ + {{0x68, 0x90, 0x6e, 0x68, 0x2d, 0xc9, 0x91, 0xe7,}}, /* Byte value: 0xf5 */ + {{0xc1, 0x52, 0x33, 0xc1, 0x59, 0x99, 0xc4, 0xb9,}}, /* Byte value: 0xf6 */ + {{0x38, 0x85, 0xe7, 0x38, 0x9c, 0xf0, 0xff, 0xe2,}}, /* Byte value: 0xf7 */ + {{0x75, 0xec, 0x51, 0x75, 0x45, 0x74, 0xe2, 0x23,}}, /* Byte value: 0xf8 */ + {{0x6d, 0xb5, 0x32, 0x6d, 0x93, 0x9e, 0x4e, 0xc3,}}, /* Byte value: 0xf9 */ + {{0x1f, 0x01, 0xa6, 0x1f, 0x24, 0xf4, 0x6a, 0x6d,}}, /* Byte value: 0xfa */ + {{0x17, 0x36, 0x87, 0x17, 0xd7, 0x13, 0x0e, 0x8c,}}, /* Byte value: 0xfb */ + {{0x44, 0x81, 0x3a, 0x44, 0x0c, 0xa6, 0x94, 0x95,}}, /* Byte value: 0xfc */ + {{0xcc, 0x40, 0x4e, 0xcc, 0x14, 0x29, 0x7f, 0x7c,}}, /* Byte value: 0xfd */ + {{0xc5, 0xa8, 0xc2, 0xc5, 0xc1, 0x0b, 0xf6, 0x28,}}, /* Byte value: 0xfe */ + {{0xee, 0xe1, 0x53, 0xee, 0x12, 0x7a, 0x35, 0xd7,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 11 */ + {{0xfe, 0x50, 0x71, 0x7c, 0xfc, 0x9b, 0xad, 0x09,}}, /* Byte value: 0x00 */ + {{0x6d, 0x9f, 0xd8, 0xf4, 0xee, 0xe2, 0xd1, 0xe9,}}, /* Byte value: 0x01 */ + {{0x53, 0x94, 0xe4, 0x01, 0xdd, 0x92, 0x0e, 0x3a,}}, /* Byte value: 0x02 */ + {{0xab, 0xb8, 0x14, 0x53, 0x11, 0x91, 0xf4, 0xf0,}}, /* Byte value: 0x03 */ + {{0xc0, 0x5b, 0x4d, 0x89, 0xcf, 0xeb, 0x72, 0xda,}}, /* Byte value: 0x04 */ + {{0x7d, 0xbd, 0xa6, 0x24, 0x6e, 0x65, 0x3b, 0xa4,}}, /* Byte value: 0x05 */ + {{0xaf, 0x51, 0xea, 0x67, 0x31, 0xc0, 0x2f, 0x72,}}, /* Byte value: 0x06 */ + {{0x72, 0x7b, 0xc6, 0x6f, 0x16, 0xda, 0x5f, 0x61,}}, /* Byte value: 0x07 */ + {{0x27, 0x93, 0xa3, 0x40, 0xfb, 0xd0, 0x06, 0x98,}}, /* Byte value: 0x08 */ + {{0xf9, 0x87, 0x2e, 0x5f, 0xc4, 0x86, 0xbc, 0x0b,}}, /* Byte value: 0x09 */ + {{0x8e, 0xbe, 0xc8, 0x09, 0xfa, 0x88, 0x7e, 0x29,}}, /* Byte value: 0x0a */ + {{0x8a, 0x57, 0x36, 0x3d, 0xda, 0xd9, 0xa5, 0xab,}}, /* Byte value: 0x0b */ + {{0x3c, 0x9e, 0x43, 0xef, 0x23, 0xb9, 0x53, 0x92,}}, /* Byte value: 0x0c */ + {{0x50, 0xaa, 0x45, 0x16, 0xc5, 0xde, 0xc4, 0xba,}}, /* Byte value: 0x0d */ + {{0xe1, 0xb4, 0x6f, 0xe7, 0x04, 0xa3, 0x23, 0x81,}}, /* Byte value: 0x0e */ + {{0x41, 0x23, 0xe5, 0xcb, 0x4d, 0xdc, 0x68, 0x36,}}, /* Byte value: 0x0f */ + {{0xb4, 0x5c, 0x0a, 0xc8, 0xe9, 0xa9, 0x7a, 0x78,}}, /* Byte value: 0x10 */ + {{0xd7, 0xae, 0x6c, 0x7a, 0x77, 0x71, 0x89, 0x95,}}, /* Byte value: 0x11 */ + {{0x1e, 0x4f, 0xc0, 0x96, 0xf0, 0xbd, 0xc8, 0x49,}}, /* Byte value: 0x12 */ + {{0x23, 0x7a, 0x5d, 0x74, 0xdb, 0x81, 0xdd, 0x1a,}}, /* Byte value: 0x13 */ + {{0x2a, 0xc0, 0xbc, 0x11, 0x93, 0xa6, 0xee, 0x1c,}}, /* Byte value: 0x14 */ + {{0x75, 0xac, 0x99, 0x4c, 0x2e, 0xc7, 0x4e, 0x63,}}, /* Byte value: 0x15 */ + {{0xba, 0x31, 0xb4, 0x8e, 0x99, 0x93, 0x58, 0x7c,}}, /* Byte value: 0x16 */ + {{0x86, 0xaf, 0xf7, 0x61, 0xba, 0x2a, 0x0b, 0xee,}}, /* Byte value: 0x17 */ + {{0xdb, 0x56, 0xad, 0x26, 0x17, 0x82, 0x27, 0xd0,}}, /* Byte value: 0x18 */ + {{0x76, 0x92, 0x38, 0x5b, 0x36, 0x8b, 0x84, 0xe3,}}, /* Byte value: 0x19 */ + {{0xb7, 0x62, 0xab, 0xdf, 0xf1, 0xe5, 0xb0, 0xf8,}}, /* Byte value: 0x1a */ + {{0x2f, 0x82, 0x9c, 0x28, 0xbb, 0x72, 0x73, 0x5f,}}, /* Byte value: 0x1b */ + {{0xe3, 0x21, 0x10, 0xfd, 0x14, 0x6a, 0xaf, 0xc0,}}, /* Byte value: 0x1c */ + {{0x51, 0x01, 0x9b, 0x1b, 0xcd, 0x5b, 0x82, 0x7b,}}, /* Byte value: 0x1d */ + {{0xd2, 0xec, 0x4c, 0x43, 0x5f, 0xa5, 0x14, 0xd6,}}, /* Byte value: 0x1e */ + {{0xb1, 0x1e, 0x2a, 0xf1, 0xc1, 0x7d, 0xe7, 0x3b,}}, /* Byte value: 0x1f */ + {{0xb6, 0xc9, 0x75, 0xd2, 0xf9, 0x60, 0xf6, 0x39,}}, /* Byte value: 0x20 */ + {{0x03, 0x3e, 0xa1, 0x17, 0x18, 0x4c, 0xca, 0x80,}}, /* Byte value: 0x21 */ + {{0x44, 0x61, 0xc5, 0xf2, 0x65, 0x08, 0xf5, 0x75,}}, /* Byte value: 0x22 */ + {{0x9a, 0x75, 0x48, 0xed, 0x5a, 0x5e, 0x4f, 0xe6,}}, /* Byte value: 0x23 */ + {{0x8d, 0x80, 0x69, 0x1e, 0xe2, 0xc4, 0xb4, 0xa9,}}, /* Byte value: 0x24 */ + {{0xea, 0x9b, 0xf1, 0x98, 0x5c, 0x4d, 0x9c, 0xc6,}}, /* Byte value: 0x25 */ + {{0xc4, 0xb2, 0xb3, 0xbd, 0xef, 0xba, 0xa9, 0x58,}}, /* Byte value: 0x26 */ + {{0xad, 0xc4, 0x95, 0x7d, 0x21, 0x09, 0xa3, 0x33,}}, /* Byte value: 0x27 */ + {{0xb9, 0x0f, 0x15, 0x99, 0x81, 0xdf, 0x92, 0xfc,}}, /* Byte value: 0x28 */ + {{0xe2, 0x8a, 0xce, 0xf0, 0x1c, 0xef, 0xe9, 0x01,}}, /* Byte value: 0x29 */ + {{0xe6, 0x63, 0x30, 0xc4, 0x3c, 0xbe, 0x32, 0x83,}}, /* Byte value: 0x2a */ + {{0x99, 0x4b, 0xe9, 0xfa, 0x42, 0x12, 0x85, 0x66,}}, /* Byte value: 0x2b */ + {{0x29, 0xfe, 0x1d, 0x06, 0x8b, 0xea, 0x24, 0x9c,}}, /* Byte value: 0x2c */ + {{0xa9, 0x2d, 0x6b, 0x49, 0x01, 0x58, 0x78, 0xb1,}}, /* Byte value: 0x2d */ + {{0x61, 0x67, 0x19, 0xa8, 0x8e, 0x11, 0x7f, 0xac,}}, /* Byte value: 0x2e */ + {{0xd0, 0x79, 0x33, 0x59, 0x4f, 0x6c, 0x98, 0x97,}}, /* Byte value: 0x2f */ + {{0x48, 0x99, 0x04, 0xae, 0x05, 0xfb, 0x5b, 0x30,}}, /* Byte value: 0x30 */ + {{0xf1, 0x96, 0x11, 0x37, 0x84, 0x24, 0xc9, 0xcc,}}, /* Byte value: 0x31 */ + {{0x91, 0x5a, 0xd6, 0x92, 0x02, 0xb0, 0xf0, 0xa1,}}, /* Byte value: 0x32 */ + {{0x65, 0x8e, 0xe7, 0x9c, 0xae, 0x40, 0xa4, 0x2e,}}, /* Byte value: 0x33 */ + {{0x24, 0xad, 0x02, 0x57, 0xe3, 0x9c, 0xcc, 0x18,}}, /* Byte value: 0x34 */ + {{0x9c, 0x09, 0xc9, 0xc3, 0x6a, 0xc6, 0x18, 0x25,}}, /* Byte value: 0x35 */ + {{0xc8, 0x4a, 0x72, 0xe1, 0x8f, 0x49, 0x07, 0x1d,}}, /* Byte value: 0x36 */ + {{0x14, 0xcb, 0x80, 0xe4, 0xa0, 0xd6, 0x31, 0xcf,}}, /* Byte value: 0x37 */ + {{0x70, 0xee, 0xb9, 0x75, 0x06, 0x13, 0xd3, 0x20,}}, /* Byte value: 0x38 */ + {{0x39, 0xdc, 0x63, 0xd6, 0x0b, 0x6d, 0xce, 0xd1,}}, /* Byte value: 0x39 */ + {{0x55, 0xe8, 0x65, 0x2f, 0xed, 0x0a, 0x59, 0xf9,}}, /* Byte value: 0x3a */ + {{0x13, 0x1c, 0xdf, 0xc7, 0x98, 0xcb, 0x20, 0xcd,}}, /* Byte value: 0x3b */ + {{0xd6, 0x05, 0xb2, 0x77, 0x7f, 0xf4, 0xcf, 0x54,}}, /* Byte value: 0x3c */ + {{0xfb, 0x12, 0x51, 0x45, 0xd4, 0x4f, 0x30, 0x4a,}}, /* Byte value: 0x3d */ + {{0x22, 0xd1, 0x83, 0x79, 0xd3, 0x04, 0x9b, 0xdb,}}, /* Byte value: 0x3e */ + {{0xda, 0xfd, 0x73, 0x2b, 0x1f, 0x07, 0x61, 0x11,}}, /* Byte value: 0x3f */ + {{0x25, 0x06, 0xdc, 0x5a, 0xeb, 0x19, 0x8a, 0xd9,}}, /* Byte value: 0x40 */ + {{0xe7, 0xc8, 0xee, 0xc9, 0x34, 0x3b, 0x74, 0x42,}}, /* Byte value: 0x41 */ + {{0xe4, 0xf6, 0x4f, 0xde, 0x2c, 0x77, 0xbe, 0xc2,}}, /* Byte value: 0x42 */ + {{0xa3, 0xa9, 0x2b, 0x3b, 0x51, 0x33, 0x81, 0x37,}}, /* Byte value: 0x43 */ + {{0x8c, 0x2b, 0xb7, 0x13, 0xea, 0x41, 0xf2, 0x68,}}, /* Byte value: 0x44 */ + {{0x19, 0x98, 0x9f, 0xb5, 0xc8, 0xa0, 0xd9, 0x4b,}}, /* Byte value: 0x45 */ + {{0x09, 0xba, 0xe1, 0x65, 0x48, 0x27, 0x33, 0x06,}}, /* Byte value: 0x46 */ + {{0x2d, 0x17, 0xe3, 0x32, 0xab, 0xbb, 0xff, 0x1e,}}, /* Byte value: 0x47 */ + {{0x8f, 0x15, 0x16, 0x04, 0xf2, 0x0d, 0x38, 0xe8,}}, /* Byte value: 0x48 */ + {{0x94, 0x18, 0xf6, 0xab, 0x2a, 0x64, 0x6d, 0xe2,}}, /* Byte value: 0x49 */ + {{0x0d, 0x53, 0x1f, 0x51, 0x68, 0x76, 0xe8, 0x84,}}, /* Byte value: 0x4a */ + {{0x85, 0x91, 0x56, 0x76, 0xa2, 0x66, 0xc1, 0x6e,}}, /* Byte value: 0x4b */ + {{0x57, 0x7d, 0x1a, 0x35, 0xfd, 0xc3, 0xd5, 0xb8,}}, /* Byte value: 0x4c */ + {{0x96, 0x8d, 0x89, 0xb1, 0x3a, 0xad, 0xe1, 0xa3,}}, /* Byte value: 0x4d */ + {{0x69, 0x76, 0x26, 0xc0, 0xce, 0xb3, 0x0a, 0x6b,}}, /* Byte value: 0x4e */ + {{0xf8, 0x2c, 0xf0, 0x52, 0xcc, 0x03, 0xfa, 0xca,}}, /* Byte value: 0x4f */ + {{0x5e, 0xc7, 0xfb, 0x50, 0xb5, 0xe4, 0xe6, 0xbe,}}, /* Byte value: 0x50 */ + {{0x0e, 0x6d, 0xbe, 0x46, 0x70, 0x3a, 0x22, 0x04,}}, /* Byte value: 0x51 */ + {{0x71, 0x45, 0x67, 0x78, 0x0e, 0x96, 0x95, 0xe1,}}, /* Byte value: 0x52 */ + {{0x7a, 0x6a, 0xf9, 0x07, 0x56, 0x78, 0x2a, 0xa6,}}, /* Byte value: 0x53 */ + {{0x01, 0xab, 0xde, 0x0d, 0x08, 0x85, 0x46, 0xc1,}}, /* Byte value: 0x54 */ + {{0xe0, 0x1f, 0xb1, 0xea, 0x0c, 0x26, 0x65, 0x40,}}, /* Byte value: 0x55 */ + {{0x7e, 0x83, 0x07, 0x33, 0x76, 0x29, 0xf1, 0x24,}}, /* Byte value: 0x56 */ + {{0x93, 0xcf, 0xa9, 0x88, 0x12, 0x79, 0x7c, 0xe0,}}, /* Byte value: 0x57 */ + {{0xce, 0x36, 0xf3, 0xcf, 0xbf, 0xd1, 0x50, 0xde,}}, /* Byte value: 0x58 */ + {{0x9f, 0x37, 0x68, 0xd4, 0x72, 0x8a, 0xd2, 0xa5,}}, /* Byte value: 0x59 */ + {{0x3a, 0xe2, 0xc2, 0xc1, 0x13, 0x21, 0x04, 0x51,}}, /* Byte value: 0x5a */ + {{0xd1, 0xd2, 0xed, 0x54, 0x47, 0xe9, 0xde, 0x56,}}, /* Byte value: 0x5b */ + {{0xf2, 0xa8, 0xb0, 0x20, 0x9c, 0x68, 0x03, 0x4c,}}, /* Byte value: 0x5c */ + {{0xcf, 0x9d, 0x2d, 0xc2, 0xb7, 0x54, 0x16, 0x1f,}}, /* Byte value: 0x5d */ + {{0x43, 0xb6, 0x9a, 0xd1, 0x5d, 0x15, 0xe4, 0x77,}}, /* Byte value: 0x5e */ + {{0xc9, 0xe1, 0xac, 0xec, 0x87, 0xcc, 0x41, 0xdc,}}, /* Byte value: 0x5f */ + {{0x4a, 0x0c, 0x7b, 0xb4, 0x15, 0x32, 0xd7, 0x71,}}, /* Byte value: 0x60 */ + {{0xbd, 0xe6, 0xeb, 0xad, 0xa1, 0x8e, 0x49, 0x7e,}}, /* Byte value: 0x61 */ + {{0x62, 0x59, 0xb8, 0xbf, 0x96, 0x5d, 0xb5, 0x2c,}}, /* Byte value: 0x62 */ + {{0xac, 0x6f, 0x4b, 0x70, 0x29, 0x8c, 0xe5, 0xf2,}}, /* Byte value: 0x63 */ + {{0x02, 0x95, 0x7f, 0x1a, 0x10, 0xc9, 0x8c, 0x41,}}, /* Byte value: 0x64 */ + {{0x37, 0xb1, 0xdd, 0x90, 0x7b, 0x57, 0xec, 0xd5,}}, /* Byte value: 0x65 */ + {{0x82, 0x46, 0x09, 0x55, 0x9a, 0x7b, 0xd0, 0x6c,}}, /* Byte value: 0x66 */ + {{0xc1, 0xf0, 0x93, 0x84, 0xc7, 0x6e, 0x34, 0x1b,}}, /* Byte value: 0x67 */ + {{0x26, 0x38, 0x7d, 0x4d, 0xf3, 0x55, 0x40, 0x59,}}, /* Byte value: 0x68 */ + {{0xbb, 0x9a, 0x6a, 0x83, 0x91, 0x16, 0x1e, 0xbd,}}, /* Byte value: 0x69 */ + {{0x0f, 0xc6, 0x60, 0x4b, 0x78, 0xbf, 0x64, 0xc5,}}, /* Byte value: 0x6a */ + {{0xd4, 0x90, 0xcd, 0x6d, 0x6f, 0x3d, 0x43, 0x15,}}, /* Byte value: 0x6b */ + {{0x5b, 0x85, 0xdb, 0x69, 0x9d, 0x30, 0x7b, 0xfd,}}, /* Byte value: 0x6c */ + {{0x63, 0xf2, 0x66, 0xb2, 0x9e, 0xd8, 0xf3, 0xed,}}, /* Byte value: 0x6d */ + {{0x87, 0x04, 0x29, 0x6c, 0xb2, 0xaf, 0x4d, 0x2f,}}, /* Byte value: 0x6e */ + {{0xbf, 0x73, 0x94, 0xb7, 0xb1, 0x47, 0xc5, 0x3f,}}, /* Byte value: 0x6f */ + {{0x97, 0x26, 0x57, 0xbc, 0x32, 0x28, 0xa7, 0x62,}}, /* Byte value: 0x70 */ + {{0x46, 0xf4, 0xba, 0xe8, 0x75, 0xc1, 0x79, 0x34,}}, /* Byte value: 0x71 */ + {{0xaa, 0x13, 0xca, 0x5e, 0x19, 0x14, 0xb2, 0x31,}}, /* Byte value: 0x72 */ + {{0x4f, 0x4e, 0x5b, 0x8d, 0x3d, 0xe6, 0x4a, 0x32,}}, /* Byte value: 0x73 */ + {{0xc6, 0x27, 0xcc, 0xa7, 0xff, 0x73, 0x25, 0x19,}}, /* Byte value: 0x74 */ + {{0x4e, 0xe5, 0x85, 0x80, 0x35, 0x63, 0x0c, 0xf3,}}, /* Byte value: 0x75 */ + {{0x80, 0xd3, 0x76, 0x4f, 0x8a, 0xb2, 0x5c, 0x2d,}}, /* Byte value: 0x76 */ + {{0x7f, 0x28, 0xd9, 0x3e, 0x7e, 0xac, 0xb7, 0xe5,}}, /* Byte value: 0x77 */ + {{0x45, 0xca, 0x1b, 0xff, 0x6d, 0x8d, 0xb3, 0xb4,}}, /* Byte value: 0x78 */ + {{0xeb, 0x30, 0x2f, 0x95, 0x54, 0xc8, 0xda, 0x07,}}, /* Byte value: 0x79 */ + {{0x68, 0xdd, 0xf8, 0xcd, 0xc6, 0x36, 0x4c, 0xaa,}}, /* Byte value: 0x7a */ + {{0x10, 0x22, 0x7e, 0xd0, 0x80, 0x87, 0xea, 0x4d,}}, /* Byte value: 0x7b */ + {{0x20, 0x44, 0xfc, 0x63, 0xc3, 0xcd, 0x17, 0x9a,}}, /* Byte value: 0x7c */ + {{0x5f, 0x6c, 0x25, 0x5d, 0xbd, 0x61, 0xa0, 0x7f,}}, /* Byte value: 0x7d */ + {{0x49, 0x32, 0xda, 0xa3, 0x0d, 0x7e, 0x1d, 0xf1,}}, /* Byte value: 0x7e */ + {{0xd3, 0x47, 0x92, 0x4e, 0x57, 0x20, 0x52, 0x17,}}, /* Byte value: 0x7f */ + {{0xc2, 0xce, 0x32, 0x93, 0xdf, 0x22, 0xfe, 0x9b,}}, /* Byte value: 0x80 */ + {{0x56, 0xd6, 0xc4, 0x38, 0xf5, 0x46, 0x93, 0x79,}}, /* Byte value: 0x81 */ + {{0xe5, 0x5d, 0x91, 0xd3, 0x24, 0xf2, 0xf8, 0x03,}}, /* Byte value: 0x82 */ + {{0xbc, 0x4d, 0x35, 0xa0, 0xa9, 0x0b, 0x0f, 0xbf,}}, /* Byte value: 0x83 */ + {{0x77, 0x39, 0xe6, 0x56, 0x3e, 0x0e, 0xc2, 0x22,}}, /* Byte value: 0x84 */ + {{0x15, 0x60, 0x5e, 0xe9, 0xa8, 0x53, 0x77, 0x0e,}}, /* Byte value: 0x85 */ + {{0x30, 0x66, 0x82, 0xb3, 0x43, 0x4a, 0xfd, 0xd7,}}, /* Byte value: 0x86 */ + {{0xb0, 0xb5, 0xf4, 0xfc, 0xc9, 0xf8, 0xa1, 0xfa,}}, /* Byte value: 0x87 */ + {{0xc3, 0x65, 0xec, 0x9e, 0xd7, 0xa7, 0xb8, 0x5a,}}, /* Byte value: 0x88 */ + {{0xa6, 0xeb, 0x0b, 0x02, 0x79, 0xe7, 0x1c, 0x74,}}, /* Byte value: 0x89 */ + {{0x6a, 0x48, 0x87, 0xd7, 0xd6, 0xff, 0xc0, 0xeb,}}, /* Byte value: 0x8a */ + {{0x6e, 0xa1, 0x79, 0xe3, 0xf6, 0xae, 0x1b, 0x69,}}, /* Byte value: 0x8b */ + {{0xee, 0x72, 0x0f, 0xac, 0x7c, 0x1c, 0x47, 0x44,}}, /* Byte value: 0x8c */ + {{0x95, 0xb3, 0x28, 0xa6, 0x22, 0xe1, 0x2b, 0x23,}}, /* Byte value: 0x8d */ + {{0xbe, 0xd8, 0x4a, 0xba, 0xb9, 0xc2, 0x83, 0xfe,}}, /* Byte value: 0x8e */ + {{0x38, 0x77, 0xbd, 0xdb, 0x03, 0xe8, 0x88, 0x10,}}, /* Byte value: 0x8f */ + {{0x1c, 0xda, 0xbf, 0x8c, 0xe0, 0x74, 0x44, 0x08,}}, /* Byte value: 0x90 */ + {{0xd8, 0x68, 0x0c, 0x31, 0x0f, 0xce, 0xed, 0x50,}}, /* Byte value: 0x91 */ + {{0xfc, 0xc5, 0x0e, 0x66, 0xec, 0x52, 0x21, 0x48,}}, /* Byte value: 0x92 */ + {{0x6b, 0xe3, 0x59, 0xda, 0xde, 0x7a, 0x86, 0x2a,}}, /* Byte value: 0x93 */ + {{0x9e, 0x9c, 0xb6, 0xd9, 0x7a, 0x0f, 0x94, 0x64,}}, /* Byte value: 0x94 */ + {{0xf3, 0x03, 0x6e, 0x2d, 0x94, 0xed, 0x45, 0x8d,}}, /* Byte value: 0x95 */ + {{0x16, 0x5e, 0xff, 0xfe, 0xb0, 0x1f, 0xbd, 0x8e,}}, /* Byte value: 0x96 */ + {{0xf6, 0x41, 0x4e, 0x14, 0xbc, 0x39, 0xd8, 0xce,}}, /* Byte value: 0x97 */ + {{0xfa, 0xb9, 0x8f, 0x48, 0xdc, 0xca, 0x76, 0x8b,}}, /* Byte value: 0x98 */ + {{0x1d, 0x71, 0x61, 0x81, 0xe8, 0xf1, 0x02, 0xc9,}}, /* Byte value: 0x99 */ + {{0x05, 0x42, 0x20, 0x39, 0x28, 0xd4, 0x9d, 0x43,}}, /* Byte value: 0x9a */ + {{0x0a, 0x84, 0x40, 0x72, 0x50, 0x6b, 0xf9, 0x86,}}, /* Byte value: 0x9b */ + {{0x79, 0x54, 0x58, 0x10, 0x4e, 0x34, 0xe0, 0x26,}}, /* Byte value: 0x9c */ + {{0x3e, 0x0b, 0x3c, 0xf5, 0x33, 0x70, 0xdf, 0xd3,}}, /* Byte value: 0x9d */ + {{0x90, 0xf1, 0x08, 0x9f, 0x0a, 0x35, 0xb6, 0x60,}}, /* Byte value: 0x9e */ + {{0x98, 0xe0, 0x37, 0xf7, 0x4a, 0x97, 0xc3, 0xa7,}}, /* Byte value: 0x9f */ + {{0xcd, 0x08, 0x52, 0xd8, 0xa7, 0x9d, 0x9a, 0x5e,}}, /* Byte value: 0xa0 */ + {{0xcb, 0x74, 0xd3, 0xf6, 0x97, 0x05, 0xcd, 0x9d,}}, /* Byte value: 0xa1 */ + {{0x0c, 0xf8, 0xc1, 0x5c, 0x60, 0xf3, 0xae, 0x45,}}, /* Byte value: 0xa2 */ + {{0x36, 0x1a, 0x03, 0x9d, 0x73, 0xd2, 0xaa, 0x14,}}, /* Byte value: 0xa3 */ + {{0x73, 0xd0, 0x18, 0x62, 0x1e, 0x5f, 0x19, 0xa0,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x9d, 0xa2, 0x17, 0xce, 0x62, 0x43, 0x5e, 0xe4,}}, /* Byte value: 0xa6 */ + {{0xe9, 0xa5, 0x50, 0x8f, 0x44, 0x01, 0x56, 0x46,}}, /* Byte value: 0xa7 */ + {{0x92, 0x64, 0x77, 0x85, 0x1a, 0xfc, 0x3a, 0x21,}}, /* Byte value: 0xa8 */ + {{0x17, 0xf5, 0x21, 0xf3, 0xb8, 0x9a, 0xfb, 0x4f,}}, /* Byte value: 0xa9 */ + {{0x07, 0xd7, 0x5f, 0x23, 0x38, 0x1d, 0x11, 0x02,}}, /* Byte value: 0xaa */ + {{0x81, 0x78, 0xa8, 0x42, 0x82, 0x37, 0x1a, 0xec,}}, /* Byte value: 0xab */ + {{0xed, 0x4c, 0xae, 0xbb, 0x64, 0x50, 0x8d, 0xc4,}}, /* Byte value: 0xac */ + {{0xca, 0xdf, 0x0d, 0xfb, 0x9f, 0x80, 0x8b, 0x5c,}}, /* Byte value: 0xad */ + {{0x74, 0x07, 0x47, 0x41, 0x26, 0x42, 0x08, 0xa2,}}, /* Byte value: 0xae */ + {{0xa1, 0x3c, 0x54, 0x21, 0x41, 0xfa, 0x0d, 0x76,}}, /* Byte value: 0xaf */ + {{0x5d, 0xf9, 0x5a, 0x47, 0xad, 0xa8, 0x2c, 0x3e,}}, /* Byte value: 0xb0 */ + {{0x40, 0x88, 0x3b, 0xc6, 0x45, 0x59, 0x2e, 0xf7,}}, /* Byte value: 0xb1 */ + {{0x78, 0xff, 0x86, 0x1d, 0x46, 0xb1, 0xa6, 0xe7,}}, /* Byte value: 0xb2 */ + {{0x83, 0xed, 0xd7, 0x58, 0x92, 0xfe, 0x96, 0xad,}}, /* Byte value: 0xb3 */ + {{0xdd, 0x2a, 0x2c, 0x08, 0x27, 0x1a, 0x70, 0x13,}}, /* Byte value: 0xb4 */ + {{0x7b, 0xc1, 0x27, 0x0a, 0x5e, 0xfd, 0x6c, 0x67,}}, /* Byte value: 0xb5 */ + {{0x42, 0x1d, 0x44, 0xdc, 0x55, 0x90, 0xa2, 0xb6,}}, /* Byte value: 0xb6 */ + {{0xdc, 0x81, 0xf2, 0x05, 0x2f, 0x9f, 0x36, 0xd2,}}, /* Byte value: 0xb7 */ + {{0xf0, 0x3d, 0xcf, 0x3a, 0x8c, 0xa1, 0x8f, 0x0d,}}, /* Byte value: 0xb8 */ + {{0x2c, 0xbc, 0x3d, 0x3f, 0xa3, 0x3e, 0xb9, 0xdf,}}, /* Byte value: 0xb9 */ + {{0x5c, 0x52, 0x84, 0x4a, 0xa5, 0x2d, 0x6a, 0xff,}}, /* Byte value: 0xba */ + {{0x47, 0x5f, 0x64, 0xe5, 0x7d, 0x44, 0x3f, 0xf5,}}, /* Byte value: 0xbb */ + {{0xa4, 0x7e, 0x74, 0x18, 0x69, 0x2e, 0x90, 0x35,}}, /* Byte value: 0xbc */ + {{0x52, 0x3f, 0x3a, 0x0c, 0xd5, 0x17, 0x48, 0xfb,}}, /* Byte value: 0xbd */ + {{0x5a, 0x2e, 0x05, 0x64, 0x95, 0xb5, 0x3d, 0x3c,}}, /* Byte value: 0xbe */ + {{0x3f, 0xa0, 0xe2, 0xf8, 0x3b, 0xf5, 0x99, 0x12,}}, /* Byte value: 0xbf */ + {{0xd9, 0xc3, 0xd2, 0x3c, 0x07, 0x4b, 0xab, 0x91,}}, /* Byte value: 0xc0 */ + {{0x0b, 0x2f, 0x9e, 0x7f, 0x58, 0xee, 0xbf, 0x47,}}, /* Byte value: 0xc1 */ + {{0x2e, 0x29, 0x42, 0x25, 0xb3, 0xf7, 0x35, 0x9e,}}, /* Byte value: 0xc2 */ + {{0x08, 0x11, 0x3f, 0x68, 0x40, 0xa2, 0x75, 0xc7,}}, /* Byte value: 0xc3 */ + {{0x60, 0xcc, 0xc7, 0xa5, 0x86, 0x94, 0x39, 0x6d,}}, /* Byte value: 0xc4 */ + {{0xf4, 0xd4, 0x31, 0x0e, 0xac, 0xf0, 0x54, 0x8f,}}, /* Byte value: 0xc5 */ + {{0x4b, 0xa7, 0xa5, 0xb9, 0x1d, 0xb7, 0x91, 0xb0,}}, /* Byte value: 0xc6 */ + {{0xc7, 0x8c, 0x12, 0xaa, 0xf7, 0xf6, 0x63, 0xd8,}}, /* Byte value: 0xc7 */ + {{0x06, 0x7c, 0x81, 0x2e, 0x30, 0x98, 0x57, 0xc3,}}, /* Byte value: 0xc8 */ + {{0xdf, 0xbf, 0x53, 0x12, 0x37, 0xd3, 0xfc, 0x52,}}, /* Byte value: 0xc9 */ + {{0x35, 0x24, 0xa2, 0x8a, 0x6b, 0x9e, 0x60, 0x94,}}, /* Byte value: 0xca */ + {{0xfd, 0x6e, 0xd0, 0x6b, 0xe4, 0xd7, 0x67, 0x89,}}, /* Byte value: 0xcb */ + {{0x11, 0x89, 0xa0, 0xdd, 0x88, 0x02, 0xac, 0x8c,}}, /* Byte value: 0xcc */ + {{0xb2, 0x20, 0x8b, 0xe6, 0xd9, 0x31, 0x2d, 0xbb,}}, /* Byte value: 0xcd */ + {{0xc5, 0x19, 0x6d, 0xb0, 0xe7, 0x3f, 0xef, 0x99,}}, /* Byte value: 0xce */ + {{0xb8, 0xa4, 0xcb, 0x94, 0x89, 0x5a, 0xd4, 0x3d,}}, /* Byte value: 0xcf */ + {{0xb5, 0xf7, 0xd4, 0xc5, 0xe1, 0x2c, 0x3c, 0xb9,}}, /* Byte value: 0xd0 */ + {{0x3b, 0x49, 0x1c, 0xcc, 0x1b, 0xa4, 0x42, 0x90,}}, /* Byte value: 0xd1 */ + {{0x28, 0x55, 0xc3, 0x0b, 0x83, 0x6f, 0x62, 0x5d,}}, /* Byte value: 0xd2 */ + {{0xa0, 0x97, 0x8a, 0x2c, 0x49, 0x7f, 0x4b, 0xb7,}}, /* Byte value: 0xd3 */ + {{0xe8, 0x0e, 0x8e, 0x82, 0x4c, 0x84, 0x10, 0x87,}}, /* Byte value: 0xd4 */ + {{0xde, 0x14, 0x8d, 0x1f, 0x3f, 0x56, 0xba, 0x93,}}, /* Byte value: 0xd5 */ + {{0x1f, 0xe4, 0x1e, 0x9b, 0xf8, 0x38, 0x8e, 0x88,}}, /* Byte value: 0xd6 */ + {{0x6f, 0x0a, 0xa7, 0xee, 0xfe, 0x2b, 0x5d, 0xa8,}}, /* Byte value: 0xd7 */ + {{0x59, 0x10, 0xa4, 0x73, 0x8d, 0xf9, 0xf7, 0xbc,}}, /* Byte value: 0xd8 */ + {{0x32, 0xf3, 0xfd, 0xa9, 0x53, 0x83, 0x71, 0x96,}}, /* Byte value: 0xd9 */ + {{0x84, 0x3a, 0x88, 0x7b, 0xaa, 0xe3, 0x87, 0xaf,}}, /* Byte value: 0xda */ + {{0x12, 0xb7, 0x01, 0xca, 0x90, 0x4e, 0x66, 0x0c,}}, /* Byte value: 0xdb */ + {{0x88, 0xc2, 0x49, 0x27, 0xca, 0x10, 0x29, 0xea,}}, /* Byte value: 0xdc */ + {{0x1b, 0x0d, 0xe0, 0xaf, 0xd8, 0x69, 0x55, 0x0a,}}, /* Byte value: 0xdd */ + {{0x58, 0xbb, 0x7a, 0x7e, 0x85, 0x7c, 0xb1, 0x7d,}}, /* Byte value: 0xde */ + {{0xa5, 0xd5, 0xaa, 0x15, 0x61, 0xab, 0xd6, 0xf4,}}, /* Byte value: 0xdf */ + {{0x04, 0xe9, 0xfe, 0x34, 0x20, 0x51, 0xdb, 0x82,}}, /* Byte value: 0xe0 */ + {{0xa7, 0x40, 0xd5, 0x0f, 0x71, 0x62, 0x5a, 0xb5,}}, /* Byte value: 0xe1 */ + {{0xd5, 0x3b, 0x13, 0x60, 0x67, 0xb8, 0x05, 0xd4,}}, /* Byte value: 0xe2 */ + {{0xf5, 0x7f, 0xef, 0x03, 0xa4, 0x75, 0x12, 0x4e,}}, /* Byte value: 0xe3 */ + {{0x4d, 0xdb, 0x24, 0x97, 0x2d, 0x2f, 0xc6, 0x73,}}, /* Byte value: 0xe4 */ + {{0x3d, 0x35, 0x9d, 0xe2, 0x2b, 0x3c, 0x15, 0x53,}}, /* Byte value: 0xe5 */ + {{0xa8, 0x86, 0xb5, 0x44, 0x09, 0xdd, 0x3e, 0x70,}}, /* Byte value: 0xe6 */ + {{0x33, 0x58, 0x23, 0xa4, 0x5b, 0x06, 0x37, 0x57,}}, /* Byte value: 0xe7 */ + {{0x21, 0xef, 0x22, 0x6e, 0xcb, 0x48, 0x51, 0x5b,}}, /* Byte value: 0xe8 */ + {{0x2b, 0x6b, 0x62, 0x1c, 0x9b, 0x23, 0xa8, 0xdd,}}, /* Byte value: 0xe9 */ + {{0x4c, 0x70, 0xfa, 0x9a, 0x25, 0xaa, 0x80, 0xb2,}}, /* Byte value: 0xea */ + {{0x1a, 0xa6, 0x3e, 0xa2, 0xd0, 0xec, 0x13, 0xcb,}}, /* Byte value: 0xeb */ + {{0x67, 0x1b, 0x98, 0x86, 0xbe, 0x89, 0x28, 0x6f,}}, /* Byte value: 0xec */ + {{0x54, 0x43, 0xbb, 0x22, 0xe5, 0x8f, 0x1f, 0x38,}}, /* Byte value: 0xed */ + {{0xec, 0xe7, 0x70, 0xb6, 0x6c, 0xd5, 0xcb, 0x05,}}, /* Byte value: 0xee */ + {{0x9b, 0xde, 0x96, 0xe0, 0x52, 0xdb, 0x09, 0x27,}}, /* Byte value: 0xef */ + {{0xa2, 0x02, 0xf5, 0x36, 0x59, 0xb6, 0xc7, 0xf6,}}, /* Byte value: 0xf0 */ + {{0x64, 0x25, 0x39, 0x91, 0xa6, 0xc5, 0xe2, 0xef,}}, /* Byte value: 0xf1 */ + {{0xef, 0xd9, 0xd1, 0xa1, 0x74, 0x99, 0x01, 0x85,}}, /* Byte value: 0xf2 */ + {{0x8b, 0xfc, 0xe8, 0x30, 0xd2, 0x5c, 0xe3, 0x6a,}}, /* Byte value: 0xf3 */ + {{0x6c, 0x34, 0x06, 0xf9, 0xe6, 0x67, 0x97, 0x28,}}, /* Byte value: 0xf4 */ + {{0xff, 0xfb, 0xaf, 0x71, 0xf4, 0x1e, 0xeb, 0xc8,}}, /* Byte value: 0xf5 */ + {{0xf7, 0xea, 0x90, 0x19, 0xb4, 0xbc, 0x9e, 0x0f,}}, /* Byte value: 0xf6 */ + {{0x18, 0x33, 0x41, 0xb8, 0xc0, 0x25, 0x9f, 0x8a,}}, /* Byte value: 0xf7 */ + {{0xb3, 0x8b, 0x55, 0xeb, 0xd1, 0xb4, 0x6b, 0x7a,}}, /* Byte value: 0xf8 */ + {{0x7c, 0x16, 0x78, 0x29, 0x66, 0xe0, 0x7d, 0x65,}}, /* Byte value: 0xf9 */ + {{0xcc, 0xa3, 0x8c, 0xd5, 0xaf, 0x18, 0xdc, 0x9f,}}, /* Byte value: 0xfa */ + {{0x89, 0x69, 0x97, 0x2a, 0xc2, 0x95, 0x6f, 0x2b,}}, /* Byte value: 0xfb */ + {{0xae, 0xfa, 0x34, 0x6a, 0x39, 0x45, 0x69, 0xb3,}}, /* Byte value: 0xfc */ + {{0x31, 0xcd, 0x5c, 0xbe, 0x4b, 0xcf, 0xbb, 0x16,}}, /* Byte value: 0xfd */ + {{0x34, 0x8f, 0x7c, 0x87, 0x63, 0x1b, 0x26, 0x55,}}, /* Byte value: 0xfe */ + {{0x66, 0xb0, 0x46, 0x8b, 0xb6, 0x0c, 0x6e, 0xae,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 12 */ + {{0x55, 0x95, 0x9e, 0xb1, 0xd0, 0xa1, 0x4c, 0xd9,}}, /* Byte value: 0x00 */ + {{0xfa, 0xed, 0x87, 0xcf, 0x85, 0x5d, 0x81, 0x6c,}}, /* Byte value: 0x01 */ + {{0x0c, 0xbe, 0x0a, 0x56, 0x48, 0xac, 0xcc, 0x72,}}, /* Byte value: 0x02 */ + {{0x52, 0x31, 0x7b, 0x77, 0xfa, 0xee, 0x3b, 0x0a,}}, /* Byte value: 0x03 */ + {{0xa3, 0xc6, 0x13, 0x28, 0x1d, 0x50, 0x01, 0xc7,}}, /* Byte value: 0x04 */ + {{0x73, 0x1c, 0xab, 0xc9, 0xf7, 0x51, 0x4f, 0x53,}}, /* Byte value: 0x05 */ + {{0xe1, 0x9c, 0x70, 0x97, 0x07, 0xed, 0xe9, 0x75,}}, /* Byte value: 0x06 */ + {{0x81, 0x25, 0x20, 0x62, 0x02, 0xc4, 0x46, 0x63,}}, /* Byte value: 0x07 */ + {{0x86, 0x81, 0xc5, 0xa4, 0x28, 0x8b, 0x31, 0xb0,}}, /* Byte value: 0x08 */ + {{0x02, 0x35, 0x03, 0x19, 0x1c, 0x32, 0x22, 0x17,}}, /* Byte value: 0x09 */ + {{0x6c, 0x07, 0x5a, 0xa3, 0x4d, 0x85, 0x63, 0x64,}}, /* Byte value: 0x0a */ + {{0xdf, 0xaa, 0x51, 0x43, 0xb0, 0x86, 0xb1, 0x1b,}}, /* Byte value: 0x0b */ + {{0x4e, 0xe4, 0x69, 0xe9, 0x52, 0x11, 0x24, 0xc0,}}, /* Byte value: 0x0c */ + {{0xe8, 0xb3, 0x9c, 0x1e, 0x79, 0x3c, 0x70, 0xc3,}}, /* Byte value: 0x0d */ + {{0x2e, 0x5d, 0x39, 0x1c, 0x57, 0x38, 0x8b, 0xd6,}}, /* Byte value: 0x0e */ + {{0x3d, 0xf8, 0xc2, 0x20, 0xa5, 0x40, 0x6b, 0x93,}}, /* Byte value: 0x0f */ + {{0x29, 0xf9, 0xdc, 0xda, 0x7d, 0x77, 0xfc, 0x05,}}, /* Byte value: 0x10 */ + {{0x7d, 0x97, 0xa2, 0x86, 0xa3, 0xcf, 0xa1, 0x36,}}, /* Byte value: 0x11 */ + {{0x27, 0x72, 0xd5, 0x95, 0x29, 0xe9, 0x12, 0x60,}}, /* Byte value: 0x12 */ + {{0x35, 0x2c, 0xce, 0x44, 0xd5, 0x88, 0xe3, 0xcf,}}, /* Byte value: 0x13 */ + {{0xcc, 0x0f, 0xaa, 0x7f, 0x42, 0xfe, 0x51, 0x5e,}}, /* Byte value: 0x14 */ + {{0xd6, 0x85, 0xbd, 0xca, 0xce, 0x57, 0x28, 0xad,}}, /* Byte value: 0x15 */ + {{0x87, 0x7a, 0x25, 0x49, 0x26, 0x92, 0x20, 0x5a,}}, /* Byte value: 0x16 */ + {{0xc9, 0x9e, 0x4c, 0xa0, 0x74, 0x83, 0x04, 0x9a,}}, /* Byte value: 0x17 */ + {{0x6b, 0xa3, 0xbf, 0x65, 0x67, 0xca, 0x14, 0xb7,}}, /* Byte value: 0x18 */ + {{0x32, 0x88, 0x2b, 0x82, 0xff, 0xc7, 0x94, 0x1c,}}, /* Byte value: 0x19 */ + {{0xcd, 0xf4, 0x4a, 0x92, 0x4c, 0xe7, 0x40, 0xb4,}}, /* Byte value: 0x1a */ + {{0x23, 0x18, 0xd3, 0xa7, 0x11, 0x8d, 0x56, 0x4e,}}, /* Byte value: 0x1b */ + {{0x96, 0xea, 0xdd, 0x6c, 0xc8, 0xd8, 0xe2, 0x08,}}, /* Byte value: 0x1c */ + {{0xb4, 0x09, 0xee, 0x26, 0xd7, 0x4c, 0xa5, 0xac,}}, /* Byte value: 0x1d */ + {{0x92, 0x80, 0xdb, 0x5e, 0xf0, 0xbc, 0xa6, 0x26,}}, /* Byte value: 0x1e */ + {{0xc6, 0xee, 0xa5, 0x02, 0x2e, 0x04, 0xfb, 0x15,}}, /* Byte value: 0x1f */ + {{0x91, 0x4e, 0x38, 0xaa, 0xe2, 0x97, 0x95, 0xdb,}}, /* Byte value: 0x20 */ + {{0xe4, 0x0d, 0x96, 0x48, 0x31, 0x90, 0xbc, 0xb1,}}, /* Byte value: 0x21 */ + {{0xd2, 0xef, 0xbb, 0xf8, 0xf6, 0x33, 0x6c, 0x83,}}, /* Byte value: 0x22 */ + {{0x56, 0x5b, 0x7d, 0x45, 0xc2, 0x8a, 0x7f, 0x24,}}, /* Byte value: 0x23 */ + {{0x88, 0x0a, 0xcc, 0xeb, 0x7c, 0x15, 0xdf, 0xd5,}}, /* Byte value: 0x24 */ + {{0x6f, 0xc9, 0xb9, 0x57, 0x5f, 0xae, 0x50, 0x99,}}, /* Byte value: 0x25 */ + {{0x10, 0x6b, 0x18, 0xc8, 0xe0, 0x53, 0xd3, 0xb8,}}, /* Byte value: 0x26 */ + {{0x59, 0x2b, 0x94, 0xe7, 0x98, 0x0d, 0x80, 0xab,}}, /* Byte value: 0x27 */ + {{0x63, 0x77, 0xb3, 0x01, 0x17, 0x02, 0x9c, 0xeb,}}, /* Byte value: 0x28 */ + {{0xca, 0x50, 0xaf, 0x54, 0x66, 0xa8, 0x37, 0x67,}}, /* Byte value: 0x29 */ + {{0x79, 0xfd, 0xa4, 0xb4, 0x9b, 0xab, 0xe5, 0x18,}}, /* Byte value: 0x2a */ + {{0xb2, 0x56, 0xeb, 0x0d, 0xf3, 0x1a, 0xc3, 0x95,}}, /* Byte value: 0x2b */ + {{0x28, 0x02, 0x3c, 0x37, 0x73, 0x6e, 0xed, 0xef,}}, /* Byte value: 0x2c */ + {{0xea, 0x86, 0x9f, 0x07, 0x65, 0x0e, 0x52, 0xd4,}}, /* Byte value: 0x2d */ + {{0xec, 0xd9, 0x9a, 0x2c, 0x41, 0x58, 0x34, 0xed,}}, /* Byte value: 0x2e */ + {{0x2a, 0x37, 0x3f, 0x2e, 0x6f, 0x5c, 0xcf, 0xf8,}}, /* Byte value: 0x2f */ + {{0xc4, 0xdb, 0xa6, 0x1b, 0x32, 0x36, 0xd9, 0x02,}}, /* Byte value: 0x30 */ + {{0xa7, 0xac, 0x15, 0x1a, 0x25, 0x34, 0x45, 0xe9,}}, /* Byte value: 0x31 */ + {{0x17, 0xcf, 0xfd, 0x0e, 0xca, 0x1c, 0xa4, 0x6b,}}, /* Byte value: 0x32 */ + {{0x5f, 0x74, 0x91, 0xcc, 0xbc, 0x5b, 0xe6, 0x92,}}, /* Byte value: 0x33 */ + {{0x62, 0x8c, 0x53, 0xec, 0x19, 0x1b, 0x8d, 0x01,}}, /* Byte value: 0x34 */ + {{0x5d, 0x41, 0x92, 0xd5, 0xa0, 0x69, 0xc4, 0x85,}}, /* Byte value: 0x35 */ + {{0x06, 0x5f, 0x05, 0x2b, 0x24, 0x56, 0x66, 0x39,}}, /* Byte value: 0x36 */ + {{0x3a, 0x5c, 0x27, 0xe6, 0x8f, 0x0f, 0x1c, 0x40,}}, /* Byte value: 0x37 */ + {{0x39, 0x92, 0xc4, 0x12, 0x9d, 0x24, 0x2f, 0xbd,}}, /* Byte value: 0x38 */ + {{0xa1, 0xf3, 0x10, 0x31, 0x01, 0x62, 0x23, 0xd0,}}, /* Byte value: 0x39 */ + {{0x07, 0xa4, 0xe5, 0xc6, 0x2a, 0x4f, 0x77, 0xd3,}}, /* Byte value: 0x3a */ + {{0x6d, 0xfc, 0xba, 0x4e, 0x43, 0x9c, 0x72, 0x8e,}}, /* Byte value: 0x3b */ + {{0x21, 0x2d, 0xd0, 0xbe, 0x0d, 0xbf, 0x74, 0x59,}}, /* Byte value: 0x3c */ + {{0xba, 0x82, 0xe7, 0x69, 0x83, 0xd2, 0x4b, 0xc9,}}, /* Byte value: 0x3d */ + {{0x69, 0x96, 0xbc, 0x7c, 0x7b, 0xf8, 0x36, 0xa0,}}, /* Byte value: 0x3e */ + {{0x37, 0x19, 0xcd, 0x5d, 0xc9, 0xba, 0xc1, 0xd8,}}, /* Byte value: 0x3f */ + {{0x3e, 0x36, 0x21, 0xd4, 0xb7, 0x6b, 0x58, 0x6e,}}, /* Byte value: 0x40 */ + {{0x25, 0x47, 0xd6, 0x8c, 0x35, 0xdb, 0x30, 0x77,}}, /* Byte value: 0x41 */ + {{0xc1, 0x4a, 0x40, 0xc4, 0x04, 0x4b, 0x8c, 0xc6,}}, /* Byte value: 0x42 */ + {{0xf7, 0xa8, 0x6d, 0x74, 0xc3, 0xe8, 0x5c, 0xf4,}}, /* Byte value: 0x43 */ + {{0xd4, 0xb0, 0xbe, 0xd3, 0xd2, 0x65, 0x0a, 0xba,}}, /* Byte value: 0x44 */ + {{0x70, 0xd2, 0x48, 0x3d, 0xe5, 0x7a, 0x7c, 0xae,}}, /* Byte value: 0x45 */ + {{0xf9, 0x23, 0x64, 0x3b, 0x97, 0x76, 0xb2, 0x91,}}, /* Byte value: 0x46 */ + {{0x9b, 0xaf, 0x37, 0xd7, 0x8e, 0x6d, 0x3f, 0x90,}}, /* Byte value: 0x47 */ + {{0x30, 0xbd, 0x28, 0x9b, 0xe3, 0xf5, 0xb6, 0x0b,}}, /* Byte value: 0x48 */ + {{0xf8, 0xd8, 0x84, 0xd6, 0x99, 0x6f, 0xa3, 0x7b,}}, /* Byte value: 0x49 */ + {{0x4a, 0x8e, 0x6f, 0xdb, 0x6a, 0x75, 0x60, 0xee,}}, /* Byte value: 0x4a */ + {{0x2d, 0x93, 0xda, 0xe8, 0x45, 0x13, 0xb8, 0x2b,}}, /* Byte value: 0x4b */ + {{0xbf, 0x13, 0x01, 0xb6, 0xb5, 0xaf, 0x1e, 0x0d,}}, /* Byte value: 0x4c */ + {{0x40, 0x6f, 0x60, 0xa6, 0x06, 0x8f, 0xca, 0xa5,}}, /* Byte value: 0x4d */ + {{0x49, 0x40, 0x8c, 0x2f, 0x78, 0x5e, 0x53, 0x13,}}, /* Byte value: 0x4e */ + {{0x5e, 0x8f, 0x71, 0x21, 0xb2, 0x42, 0xf7, 0x78,}}, /* Byte value: 0x4f */ + {{0x46, 0x30, 0x65, 0x8d, 0x22, 0xd9, 0xac, 0x9c,}}, /* Byte value: 0x50 */ + {{0xae, 0x83, 0xf9, 0x93, 0x5b, 0xe5, 0xdc, 0x5f,}}, /* Byte value: 0x51 */ + {{0x65, 0x28, 0xb6, 0x2a, 0x33, 0x54, 0xfa, 0xd2,}}, /* Byte value: 0x52 */ + {{0x24, 0xbc, 0x36, 0x61, 0x3b, 0xc2, 0x21, 0x9d,}}, /* Byte value: 0x53 */ + {{0x5c, 0xba, 0x72, 0x38, 0xae, 0x70, 0xd5, 0x6f,}}, /* Byte value: 0x54 */ + {{0x72, 0xe7, 0x4b, 0x24, 0xf9, 0x48, 0x5e, 0xb9,}}, /* Byte value: 0x55 */ + {{0x97, 0x11, 0x3d, 0x81, 0xc6, 0xc1, 0xf3, 0xe2,}}, /* Byte value: 0x56 */ + {{0xaf, 0x78, 0x19, 0x7e, 0x55, 0xfc, 0xcd, 0xb5,}}, /* Byte value: 0x57 */ + {{0x0d, 0x45, 0xea, 0xbb, 0x46, 0xb5, 0xdd, 0x98,}}, /* Byte value: 0x58 */ + {{0xb9, 0x4c, 0x04, 0x9d, 0x91, 0xf9, 0x78, 0x34,}}, /* Byte value: 0x59 */ + {{0x45, 0xfe, 0x86, 0x79, 0x30, 0xf2, 0x9f, 0x61,}}, /* Byte value: 0x5a */ + {{0x76, 0x8d, 0x4d, 0x16, 0xc1, 0x2c, 0x1a, 0x97,}}, /* Byte value: 0x5b */ + {{0x43, 0xa1, 0x83, 0x52, 0x14, 0xa4, 0xf9, 0x58,}}, /* Byte value: 0x5c */ + {{0x51, 0xff, 0x98, 0x83, 0xe8, 0xc5, 0x08, 0xf7,}}, /* Byte value: 0x5d */ + {{0x85, 0x4f, 0x26, 0x50, 0x3a, 0xa0, 0x02, 0x4d,}}, /* Byte value: 0x5e */ + {{0x5a, 0xe5, 0x77, 0x13, 0x8a, 0x26, 0xb3, 0x56,}}, /* Byte value: 0x5f */ + {{0x7c, 0x6c, 0x42, 0x6b, 0xad, 0xd6, 0xb0, 0xdc,}}, /* Byte value: 0x60 */ + {{0xd0, 0xda, 0xb8, 0xe1, 0xea, 0x01, 0x4e, 0x94,}}, /* Byte value: 0x61 */ + {{0x08, 0xd4, 0x0c, 0x64, 0x70, 0xc8, 0x88, 0x5c,}}, /* Byte value: 0x62 */ + {{0x05, 0x91, 0xe6, 0xdf, 0x36, 0x7d, 0x55, 0xc4,}}, /* Byte value: 0x63 */ + {{0xb8, 0xb7, 0xe4, 0x70, 0x9f, 0xe0, 0x69, 0xde,}}, /* Byte value: 0x64 */ + {{0x0f, 0x70, 0xe9, 0xa2, 0x5a, 0x87, 0xff, 0x8f,}}, /* Byte value: 0x65 */ + {{0x7a, 0x33, 0x47, 0x40, 0x89, 0x80, 0xd6, 0xe5,}}, /* Byte value: 0x66 */ + {{0xff, 0x7c, 0x61, 0x10, 0xb3, 0x20, 0xd4, 0xa8,}}, /* Byte value: 0x67 */ + {{0xda, 0x3b, 0xb7, 0x9c, 0x86, 0xfb, 0xe4, 0xdf,}}, /* Byte value: 0x68 */ + {{0xdb, 0xc0, 0x57, 0x71, 0x88, 0xe2, 0xf5, 0x35,}}, /* Byte value: 0x69 */ + {{0xf2, 0x39, 0x8b, 0xab, 0xf5, 0x95, 0x09, 0x30,}}, /* Byte value: 0x6a */ + {{0x99, 0x9a, 0x34, 0xce, 0x92, 0x5f, 0x1d, 0x87,}}, /* Byte value: 0x6b */ + {{0xa9, 0x27, 0x1c, 0x55, 0x71, 0xaa, 0xab, 0x8c,}}, /* Byte value: 0x6c */ + {{0x54, 0x6e, 0x7e, 0x5c, 0xde, 0xb8, 0x5d, 0x33,}}, /* Byte value: 0x6d */ + {{0x95, 0x24, 0x3e, 0x98, 0xda, 0xf3, 0xd1, 0xf5,}}, /* Byte value: 0x6e */ + {{0x68, 0x6d, 0x5c, 0x91, 0x75, 0xe1, 0x27, 0x4a,}}, /* Byte value: 0x6f */ + {{0x1c, 0xd5, 0x12, 0x9e, 0xa8, 0xff, 0x1f, 0xca,}}, /* Byte value: 0x70 */ + {{0x6a, 0x58, 0x5f, 0x88, 0x69, 0xd3, 0x05, 0x5d,}}, /* Byte value: 0x71 */ + {{0x0e, 0x8b, 0x09, 0x4f, 0x54, 0x9e, 0xee, 0x65,}}, /* Byte value: 0x72 */ + {{0x93, 0x7b, 0x3b, 0xb3, 0xfe, 0xa5, 0xb7, 0xcc,}}, /* Byte value: 0x73 */ + {{0xa8, 0xdc, 0xfc, 0xb8, 0x7f, 0xb3, 0xba, 0x66,}}, /* Byte value: 0x74 */ + {{0xcf, 0xc1, 0x49, 0x8b, 0x50, 0xd5, 0x62, 0xa3,}}, /* Byte value: 0x75 */ + {{0xc2, 0x84, 0xa3, 0x30, 0x16, 0x60, 0xbf, 0x3b,}}, /* Byte value: 0x76 */ + {{0xcb, 0xab, 0x4f, 0xb9, 0x68, 0xb1, 0x26, 0x8d,}}, /* Byte value: 0x77 */ + {{0x8e, 0x55, 0xc9, 0xc0, 0x58, 0x43, 0xb9, 0xec,}}, /* Byte value: 0x78 */ + {{0x33, 0x73, 0xcb, 0x6f, 0xf1, 0xde, 0x85, 0xf6,}}, /* Byte value: 0x79 */ + {{0x15, 0xfa, 0xfe, 0x17, 0xd6, 0x2e, 0x86, 0x7c,}}, /* Byte value: 0x7a */ + {{0x89, 0xf1, 0x2c, 0x06, 0x72, 0x0c, 0xce, 0x3f,}}, /* Byte value: 0x7b */ + {{0xd1, 0x21, 0x58, 0x0c, 0xe4, 0x18, 0x5f, 0x7e,}}, /* Byte value: 0x7c */ + {{0x1a, 0x8a, 0x17, 0xb5, 0x8c, 0xa9, 0x79, 0xf3,}}, /* Byte value: 0x7d */ + {{0x98, 0x61, 0xd4, 0x23, 0x9c, 0x46, 0x0c, 0x6d,}}, /* Byte value: 0x7e */ + {{0xce, 0x3a, 0xa9, 0x66, 0x5e, 0xcc, 0x73, 0x49,}}, /* Byte value: 0x7f */ + {{0x1b, 0x71, 0xf7, 0x58, 0x82, 0xb0, 0x68, 0x19,}}, /* Byte value: 0x80 */ + {{0xe3, 0xa9, 0x73, 0x8e, 0x1b, 0xdf, 0xcb, 0x62,}}, /* Byte value: 0x81 */ + {{0x9d, 0xf0, 0x32, 0xfc, 0xaa, 0x3b, 0x59, 0xa9,}}, /* Byte value: 0x82 */ + {{0x8c, 0x60, 0xca, 0xd9, 0x44, 0x71, 0x9b, 0xfb,}}, /* Byte value: 0x83 */ + {{0x6e, 0x32, 0x59, 0xba, 0x51, 0xb7, 0x41, 0x73,}}, /* Byte value: 0x84 */ + {{0x66, 0xe6, 0x55, 0xde, 0x21, 0x7f, 0xc9, 0x2f,}}, /* Byte value: 0x85 */ + {{0x58, 0xd0, 0x74, 0x0a, 0x96, 0x14, 0x91, 0x41,}}, /* Byte value: 0x86 */ + {{0x9a, 0x54, 0xd7, 0x3a, 0x80, 0x74, 0x2e, 0x7a,}}, /* Byte value: 0x87 */ + {{0x47, 0xcb, 0x85, 0x60, 0x2c, 0xc0, 0xbd, 0x76,}}, /* Byte value: 0x88 */ + {{0x18, 0xbf, 0x14, 0xac, 0x90, 0x9b, 0x5b, 0xe4,}}, /* Byte value: 0x89 */ + {{0xad, 0x4d, 0x1a, 0x67, 0x49, 0xce, 0xef, 0xa2,}}, /* Byte value: 0x8a */ + {{0x1e, 0xe0, 0x11, 0x87, 0xb4, 0xcd, 0x3d, 0xdd,}}, /* Byte value: 0x8b */ + {{0xdc, 0x64, 0xb2, 0xb7, 0xa2, 0xad, 0x82, 0xe6,}}, /* Byte value: 0x8c */ + {{0xa4, 0x62, 0xf6, 0xee, 0x37, 0x1f, 0x76, 0x14,}}, /* Byte value: 0x8d */ + {{0x34, 0xd7, 0x2e, 0xa9, 0xdb, 0x91, 0xf2, 0x25,}}, /* Byte value: 0x8e */ + {{0xfd, 0x49, 0x62, 0x09, 0xaf, 0x12, 0xf6, 0xbf,}}, /* Byte value: 0x8f */ + {{0x9f, 0xc5, 0x31, 0xe5, 0xb6, 0x09, 0x7b, 0xbe,}}, /* Byte value: 0x90 */ + {{0x8f, 0xae, 0x29, 0x2d, 0x56, 0x5a, 0xa8, 0x06,}}, /* Byte value: 0x91 */ + {{0xed, 0x22, 0x7a, 0xc1, 0x4f, 0x41, 0x25, 0x07,}}, /* Byte value: 0x92 */ + {{0xf1, 0xf7, 0x68, 0x5f, 0xe7, 0xbe, 0x3a, 0xcd,}}, /* Byte value: 0x93 */ + {{0xe5, 0xf6, 0x76, 0xa5, 0x3f, 0x89, 0xad, 0x5b,}}, /* Byte value: 0x94 */ + {{0x1f, 0x1b, 0xf1, 0x6a, 0xba, 0xd4, 0x2c, 0x37,}}, /* Byte value: 0x95 */ + {{0x82, 0xeb, 0xc3, 0x96, 0x10, 0xef, 0x75, 0x9e,}}, /* Byte value: 0x96 */ + {{0xf0, 0x0c, 0x88, 0xb2, 0xe9, 0xa7, 0x2b, 0x27,}}, /* Byte value: 0x97 */ + {{0xe6, 0x38, 0x95, 0x51, 0x2d, 0xa2, 0x9e, 0xa6,}}, /* Byte value: 0x98 */ + {{0xc3, 0x7f, 0x43, 0xdd, 0x18, 0x79, 0xae, 0xd1,}}, /* Byte value: 0x99 */ + {{0xef, 0x17, 0x79, 0xd8, 0x53, 0x73, 0x07, 0x10,}}, /* Byte value: 0x9a */ + {{0x1d, 0x2e, 0xf2, 0x73, 0xa6, 0xe6, 0x0e, 0x20,}}, /* Byte value: 0x9b */ + {{0xc0, 0xb1, 0xa0, 0x29, 0x0a, 0x52, 0x9d, 0x2c,}}, /* Byte value: 0x9c */ + {{0xf6, 0x53, 0x8d, 0x99, 0xcd, 0xf1, 0x4d, 0x1e,}}, /* Byte value: 0x9d */ + {{0x4b, 0x75, 0x8f, 0x36, 0x64, 0x6c, 0x71, 0x04,}}, /* Byte value: 0x9e */ + {{0xee, 0xec, 0x99, 0x35, 0x5d, 0x6a, 0x16, 0xfa,}}, /* Byte value: 0x9f */ + {{0xe9, 0x48, 0x7c, 0xf3, 0x77, 0x25, 0x61, 0x29,}}, /* Byte value: 0xa0 */ + {{0xe2, 0x52, 0x93, 0x63, 0x15, 0xc6, 0xda, 0x88,}}, /* Byte value: 0xa1 */ + {{0x16, 0x34, 0x1d, 0xe3, 0xc4, 0x05, 0xb5, 0x81,}}, /* Byte value: 0xa2 */ + {{0x53, 0xca, 0x9b, 0x9a, 0xf4, 0xf7, 0x2a, 0xe0,}}, /* Byte value: 0xa3 */ + {{0xdd, 0x9f, 0x52, 0x5a, 0xac, 0xb4, 0x93, 0x0c,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x01, 0xfb, 0xe0, 0xed, 0x0e, 0x19, 0x11, 0xea,}}, /* Byte value: 0xa6 */ + {{0x8b, 0xc4, 0x2f, 0x1f, 0x6e, 0x3e, 0xec, 0x28,}}, /* Byte value: 0xa7 */ + {{0xf3, 0xc2, 0x6b, 0x46, 0xfb, 0x8c, 0x18, 0xda,}}, /* Byte value: 0xa8 */ + {{0xde, 0x51, 0xb1, 0xae, 0xbe, 0x9f, 0xa0, 0xf1,}}, /* Byte value: 0xa9 */ + {{0x57, 0xa0, 0x9d, 0xa8, 0xcc, 0x93, 0x6e, 0xce,}}, /* Byte value: 0xaa */ + {{0x9e, 0x3e, 0xd1, 0x08, 0xb8, 0x10, 0x6a, 0x54,}}, /* Byte value: 0xab */ + {{0x38, 0x69, 0x24, 0xff, 0x93, 0x3d, 0x3e, 0x57,}}, /* Byte value: 0xac */ + {{0xbe, 0xe8, 0xe1, 0x5b, 0xbb, 0xb6, 0x0f, 0xe7,}}, /* Byte value: 0xad */ + {{0x8a, 0x3f, 0xcf, 0xf2, 0x60, 0x27, 0xfd, 0xc2,}}, /* Byte value: 0xae */ + {{0x4f, 0x1f, 0x89, 0x04, 0x5c, 0x08, 0x35, 0x2a,}}, /* Byte value: 0xaf */ + {{0xa2, 0x3d, 0xf3, 0xc5, 0x13, 0x49, 0x10, 0x2d,}}, /* Byte value: 0xb0 */ + {{0x61, 0x42, 0xb0, 0x18, 0x0b, 0x30, 0xbe, 0xfc,}}, /* Byte value: 0xb1 */ + {{0x9c, 0x0b, 0xd2, 0x11, 0xa4, 0x22, 0x48, 0x43,}}, /* Byte value: 0xb2 */ + {{0x26, 0x89, 0x35, 0x78, 0x27, 0xf0, 0x03, 0x8a,}}, /* Byte value: 0xb3 */ + {{0x60, 0xb9, 0x50, 0xf5, 0x05, 0x29, 0xaf, 0x16,}}, /* Byte value: 0xb4 */ + {{0x78, 0x06, 0x44, 0x59, 0x95, 0xb2, 0xf4, 0xf2,}}, /* Byte value: 0xb5 */ + {{0xd9, 0xf5, 0x54, 0x68, 0x94, 0xd0, 0xd7, 0x22,}}, /* Byte value: 0xb6 */ + {{0x3c, 0x03, 0x22, 0xcd, 0xab, 0x59, 0x7a, 0x79,}}, /* Byte value: 0xb7 */ + {{0xfb, 0x16, 0x67, 0x22, 0x8b, 0x44, 0x90, 0x86,}}, /* Byte value: 0xb8 */ + {{0xc7, 0x15, 0x45, 0xef, 0x20, 0x1d, 0xea, 0xff,}}, /* Byte value: 0xb9 */ + {{0xfe, 0x87, 0x81, 0xfd, 0xbd, 0x39, 0xc5, 0x42,}}, /* Byte value: 0xba */ + {{0x36, 0xe2, 0x2d, 0xb0, 0xc7, 0xa3, 0xd0, 0x32,}}, /* Byte value: 0xbb */ + {{0xa0, 0x08, 0xf0, 0xdc, 0x0f, 0x7b, 0x32, 0x3a,}}, /* Byte value: 0xbc */ + {{0x50, 0x04, 0x78, 0x6e, 0xe6, 0xdc, 0x19, 0x1d,}}, /* Byte value: 0xbd */ + {{0xf5, 0x9d, 0x6e, 0x6d, 0xdf, 0xda, 0x7e, 0xe3,}}, /* Byte value: 0xbe */ + {{0xaa, 0xe9, 0xff, 0xa1, 0x63, 0x81, 0x98, 0x71,}}, /* Byte value: 0xbf */ + {{0xd3, 0x14, 0x5b, 0x15, 0xf8, 0x2a, 0x7d, 0x69,}}, /* Byte value: 0xc0 */ + {{0x41, 0x94, 0x80, 0x4b, 0x08, 0x96, 0xdb, 0x4f,}}, /* Byte value: 0xc1 */ + {{0x7f, 0xa2, 0xa1, 0x9f, 0xbf, 0xfd, 0x83, 0x21,}}, /* Byte value: 0xc2 */ + {{0xa5, 0x99, 0x16, 0x03, 0x39, 0x06, 0x67, 0xfe,}}, /* Byte value: 0xc3 */ + {{0xb0, 0x63, 0xe8, 0x14, 0xef, 0x28, 0xe1, 0x82,}}, /* Byte value: 0xc4 */ + {{0x48, 0xbb, 0x6c, 0xc2, 0x76, 0x47, 0x42, 0xf9,}}, /* Byte value: 0xc5 */ + {{0x20, 0xd6, 0x30, 0x53, 0x03, 0xa6, 0x65, 0xb3,}}, /* Byte value: 0xc6 */ + {{0xf4, 0x66, 0x8e, 0x80, 0xd1, 0xc3, 0x6f, 0x09,}}, /* Byte value: 0xc7 */ + {{0x0b, 0x1a, 0xef, 0x90, 0x62, 0xe3, 0xbb, 0xa1,}}, /* Byte value: 0xc8 */ + {{0xd8, 0x0e, 0xb4, 0x85, 0x9a, 0xc9, 0xc6, 0xc8,}}, /* Byte value: 0xc9 */ + {{0xb7, 0xc7, 0x0d, 0xd2, 0xc5, 0x67, 0x96, 0x51,}}, /* Byte value: 0xca */ + {{0xb1, 0x98, 0x08, 0xf9, 0xe1, 0x31, 0xf0, 0x68,}}, /* Byte value: 0xcb */ + {{0xd5, 0x4b, 0x5e, 0x3e, 0xdc, 0x7c, 0x1b, 0x50,}}, /* Byte value: 0xcc */ + {{0x22, 0xe3, 0x33, 0x4a, 0x1f, 0x94, 0x47, 0xa4,}}, /* Byte value: 0xcd */ + {{0x4c, 0xd1, 0x6a, 0xf0, 0x4e, 0x23, 0x06, 0xd7,}}, /* Byte value: 0xce */ + {{0x3f, 0xcd, 0xc1, 0x39, 0xb9, 0x72, 0x49, 0x84,}}, /* Byte value: 0xcf */ + {{0x75, 0x43, 0xae, 0xe2, 0xd3, 0x07, 0x29, 0x6a,}}, /* Byte value: 0xd0 */ + {{0x19, 0x44, 0xf4, 0x41, 0x9e, 0x82, 0x4a, 0x0e,}}, /* Byte value: 0xd1 */ + {{0x74, 0xb8, 0x4e, 0x0f, 0xdd, 0x1e, 0x38, 0x80,}}, /* Byte value: 0xd2 */ + {{0x13, 0xa5, 0xfb, 0x3c, 0xf2, 0x78, 0xe0, 0x45,}}, /* Byte value: 0xd3 */ + {{0xd7, 0x7e, 0x5d, 0x27, 0xc0, 0x4e, 0x39, 0x47,}}, /* Byte value: 0xd4 */ + {{0x84, 0xb4, 0xc6, 0xbd, 0x34, 0xb9, 0x13, 0xa7,}}, /* Byte value: 0xd5 */ + {{0x7b, 0xc8, 0xa7, 0xad, 0x87, 0x99, 0xc7, 0x0f,}}, /* Byte value: 0xd6 */ + {{0x42, 0x5a, 0x63, 0xbf, 0x1a, 0xbd, 0xe8, 0xb2,}}, /* Byte value: 0xd7 */ + {{0x11, 0x90, 0xf8, 0x25, 0xee, 0x4a, 0xc2, 0x52,}}, /* Byte value: 0xd8 */ + {{0xe0, 0x67, 0x90, 0x7a, 0x09, 0xf4, 0xf8, 0x9f,}}, /* Byte value: 0xd9 */ + {{0x71, 0x29, 0xa8, 0xd0, 0xeb, 0x63, 0x6d, 0x44,}}, /* Byte value: 0xda */ + {{0x31, 0x46, 0xc8, 0x76, 0xed, 0xec, 0xa7, 0xe1,}}, /* Byte value: 0xdb */ + {{0x67, 0x1d, 0xb5, 0x33, 0x2f, 0x66, 0xd8, 0xc5,}}, /* Byte value: 0xdc */ + {{0xc8, 0x65, 0xac, 0x4d, 0x7a, 0x9a, 0x15, 0x70,}}, /* Byte value: 0xdd */ + {{0x4d, 0x2a, 0x8a, 0x1d, 0x40, 0x3a, 0x17, 0x3d,}}, /* Byte value: 0xde */ + {{0xfc, 0xb2, 0x82, 0xe4, 0xa1, 0x0b, 0xe7, 0x55,}}, /* Byte value: 0xdf */ + {{0xb3, 0xad, 0x0b, 0xe0, 0xfd, 0x03, 0xd2, 0x7f,}}, /* Byte value: 0xe0 */ + {{0x44, 0x05, 0x66, 0x94, 0x3e, 0xeb, 0x8e, 0x8b,}}, /* Byte value: 0xe1 */ + {{0xc5, 0x20, 0x46, 0xf6, 0x3c, 0x2f, 0xc8, 0xe8,}}, /* Byte value: 0xe2 */ + {{0x14, 0x01, 0x1e, 0xfa, 0xd8, 0x37, 0x97, 0x96,}}, /* Byte value: 0xe3 */ + {{0x2b, 0xcc, 0xdf, 0xc3, 0x61, 0x45, 0xde, 0x12,}}, /* Byte value: 0xe4 */ + {{0x12, 0x5e, 0x1b, 0xd1, 0xfc, 0x61, 0xf1, 0xaf,}}, /* Byte value: 0xe5 */ + {{0xb6, 0x3c, 0xed, 0x3f, 0xcb, 0x7e, 0x87, 0xbb,}}, /* Byte value: 0xe6 */ + {{0xbc, 0xdd, 0xe2, 0x42, 0xa7, 0x84, 0x2d, 0xf0,}}, /* Byte value: 0xe7 */ + {{0x8d, 0x9b, 0x2a, 0x34, 0x4a, 0x68, 0x8a, 0x11,}}, /* Byte value: 0xe8 */ + {{0x90, 0xb5, 0xd8, 0x47, 0xec, 0x8e, 0x84, 0x31,}}, /* Byte value: 0xe9 */ + {{0x77, 0x76, 0xad, 0xfb, 0xcf, 0x35, 0x0b, 0x7d,}}, /* Byte value: 0xea */ + {{0x94, 0xdf, 0xde, 0x75, 0xd4, 0xea, 0xc0, 0x1f,}}, /* Byte value: 0xeb */ + {{0xe7, 0xc3, 0x75, 0xbc, 0x23, 0xbb, 0x8f, 0x4c,}}, /* Byte value: 0xec */ + {{0x5b, 0x1e, 0x97, 0xfe, 0x84, 0x3f, 0xa2, 0xbc,}}, /* Byte value: 0xed */ + {{0x64, 0xd3, 0x56, 0xc7, 0x3d, 0x4d, 0xeb, 0x38,}}, /* Byte value: 0xee */ + {{0x0a, 0xe1, 0x0f, 0x7d, 0x6c, 0xfa, 0xaa, 0x4b,}}, /* Byte value: 0xef */ + {{0xab, 0x12, 0x1f, 0x4c, 0x6d, 0x98, 0x89, 0x9b,}}, /* Byte value: 0xf0 */ + {{0x03, 0xce, 0xe3, 0xf4, 0x12, 0x2b, 0x33, 0xfd,}}, /* Byte value: 0xf1 */ + {{0x80, 0xde, 0xc0, 0x8f, 0x0c, 0xdd, 0x57, 0x89,}}, /* Byte value: 0xf2 */ + {{0x83, 0x10, 0x23, 0x7b, 0x1e, 0xf6, 0x64, 0x74,}}, /* Byte value: 0xf3 */ + {{0xa6, 0x57, 0xf5, 0xf7, 0x2b, 0x2d, 0x54, 0x03,}}, /* Byte value: 0xf4 */ + {{0x09, 0x2f, 0xec, 0x89, 0x7e, 0xd1, 0x99, 0xb6,}}, /* Byte value: 0xf5 */ + {{0xac, 0xb6, 0xfa, 0x8a, 0x47, 0xd7, 0xfe, 0x48,}}, /* Byte value: 0xf6 */ + {{0x2c, 0x68, 0x3a, 0x05, 0x4b, 0x0a, 0xa9, 0xc1,}}, /* Byte value: 0xf7 */ + {{0x7e, 0x59, 0x41, 0x72, 0xb1, 0xe4, 0x92, 0xcb,}}, /* Byte value: 0xf8 */ + {{0x2f, 0xa6, 0xd9, 0xf1, 0x59, 0x21, 0x9a, 0x3c,}}, /* Byte value: 0xf9 */ + {{0xb5, 0xf2, 0x0e, 0xcb, 0xd9, 0x55, 0xb4, 0x46,}}, /* Byte value: 0xfa */ + {{0x3b, 0xa7, 0xc7, 0x0b, 0x81, 0x16, 0x0d, 0xaa,}}, /* Byte value: 0xfb */ + {{0xbd, 0x26, 0x02, 0xaf, 0xa9, 0x9d, 0x3c, 0x1a,}}, /* Byte value: 0xfc */ + {{0x04, 0x6a, 0x06, 0x32, 0x38, 0x64, 0x44, 0x2e,}}, /* Byte value: 0xfd */ + {{0xeb, 0x7d, 0x7f, 0xea, 0x6b, 0x17, 0x43, 0x3e,}}, /* Byte value: 0xfe */ + {{0xbb, 0x79, 0x07, 0x84, 0x8d, 0xcb, 0x5a, 0x23,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 13 */ + {{0x79, 0x1a, 0x2d, 0x6d, 0xc9, 0x3b, 0x13, 0xe1,}}, /* Byte value: 0x00 */ + {{0x91, 0x58, 0xcb, 0xc6, 0xfe, 0x1f, 0xb1, 0x50,}}, /* Byte value: 0x01 */ + {{0x99, 0x09, 0xd2, 0xbc, 0x88, 0x79, 0x33, 0xc2,}}, /* Byte value: 0x02 */ + {{0xb9, 0x8e, 0xb6, 0x97, 0x93, 0x22, 0x7e, 0xcf,}}, /* Byte value: 0x03 */ + {{0x71, 0x4b, 0x34, 0x17, 0xbf, 0x5d, 0x91, 0x73,}}, /* Byte value: 0x04 */ + {{0xea, 0xc7, 0x71, 0x54, 0xcb, 0xdc, 0x63, 0x74,}}, /* Byte value: 0x05 */ + {{0xd7, 0xd9, 0x79, 0x52, 0x0f, 0x62, 0xab, 0xc6,}}, /* Byte value: 0x06 */ + {{0x95, 0x91, 0x26, 0xfb, 0xc5, 0x2c, 0xf0, 0x19,}}, /* Byte value: 0x07 */ + {{0x55, 0x05, 0xbd, 0x01, 0x9f, 0x35, 0x9d, 0x37,}}, /* Byte value: 0x08 */ + {{0xda, 0xe2, 0x27, 0x8b, 0x3c, 0x4b, 0xe9, 0x9e,}}, /* Byte value: 0x09 */ + {{0xdb, 0x41, 0x8d, 0x15, 0x42, 0x37, 0x68, 0x1d,}}, /* Byte value: 0x0a */ + {{0xb5, 0x16, 0x42, 0xd0, 0xde, 0x77, 0xbd, 0x14,}}, /* Byte value: 0x0b */ + {{0x3f, 0x9b, 0x9f, 0xf9, 0x38, 0x46, 0x09, 0x77,}}, /* Byte value: 0x0c */ + {{0x54, 0xa6, 0x17, 0x9f, 0xe1, 0x49, 0x1c, 0xb4,}}, /* Byte value: 0x0d */ + {{0x7d, 0xd3, 0xc0, 0x50, 0xf2, 0x08, 0x52, 0xa8,}}, /* Byte value: 0x0e */ + {{0xd5, 0x5c, 0xee, 0xad, 0xf3, 0x9a, 0x6a, 0x03,}}, /* Byte value: 0x0f */ + {{0xbd, 0x47, 0x5b, 0xaa, 0xa8, 0x11, 0x3f, 0x86,}}, /* Byte value: 0x10 */ + {{0xa9, 0x2c, 0x84, 0x63, 0x7f, 0xee, 0xb9, 0x28,}}, /* Byte value: 0x11 */ + {{0xfe, 0xac, 0xae, 0x9d, 0x1c, 0x23, 0xe5, 0xda,}}, /* Byte value: 0x12 */ + {{0x3b, 0x52, 0x72, 0xc4, 0x03, 0x75, 0x48, 0x3e,}}, /* Byte value: 0x13 */ + {{0x1d, 0x99, 0x6c, 0x2d, 0xdf, 0xe5, 0x85, 0xbf,}}, /* Byte value: 0x14 */ + {{0x36, 0x69, 0x2c, 0x1d, 0x30, 0x5c, 0x0a, 0x66,}}, /* Byte value: 0x15 */ + {{0x38, 0x74, 0x4f, 0xa5, 0x81, 0xf1, 0x08, 0x78,}}, /* Byte value: 0x16 */ + {{0x07, 0xef, 0xd0, 0x5c, 0xb9, 0xb7, 0x01, 0x0f,}}, /* Byte value: 0x17 */ + {{0x1b, 0xd5, 0x16, 0xef, 0x18, 0x2e, 0x05, 0x33,}}, /* Byte value: 0x18 */ + {{0xfb, 0xc6, 0xe9, 0x3e, 0x59, 0x6c, 0x25, 0x10,}}, /* Byte value: 0x19 */ + {{0x70, 0xe8, 0x9e, 0x89, 0xc1, 0x21, 0x10, 0xf0,}}, /* Byte value: 0x1a */ + {{0x89, 0xab, 0xe0, 0x48, 0x64, 0xb5, 0xf4, 0x25,}}, /* Byte value: 0x1b */ + {{0x4a, 0x19, 0x46, 0xd3, 0xbc, 0x28, 0xd9, 0x4d,}}, /* Byte value: 0x1c */ + {{0xae, 0xc3, 0x54, 0x3f, 0xc6, 0x59, 0xb8, 0x27,}}, /* Byte value: 0x1d */ + {{0x3d, 0x1e, 0x08, 0x06, 0xc4, 0xbe, 0xc8, 0xb2,}}, /* Byte value: 0x1e */ + {{0x29, 0x75, 0xd7, 0xcf, 0x13, 0x41, 0x4e, 0x1c,}}, /* Byte value: 0x1f */ + {{0x8a, 0x8d, 0xdd, 0x29, 0xe6, 0x31, 0xb4, 0x63,}}, /* Byte value: 0x20 */ + {{0xcd, 0xaf, 0xc5, 0x23, 0x69, 0x30, 0x2f, 0x76,}}, /* Byte value: 0x21 */ + {{0x41, 0x6e, 0x62, 0xc8, 0x48, 0xca, 0x1b, 0x99,}}, /* Byte value: 0x22 */ + {{0xce, 0x89, 0xf8, 0x42, 0xeb, 0xb4, 0x6f, 0x30,}}, /* Byte value: 0x23 */ + {{0x16, 0xee, 0x48, 0x36, 0x2b, 0x07, 0x47, 0x6b,}}, /* Byte value: 0x24 */ + {{0x6c, 0xd2, 0x58, 0x3a, 0x60, 0xb8, 0x14, 0xcc,}}, /* Byte value: 0x25 */ + {{0x1f, 0x1c, 0xfb, 0xd2, 0x23, 0x1d, 0x44, 0x7a,}}, /* Byte value: 0x26 */ + {{0xe0, 0x13, 0xff, 0xd1, 0x41, 0x42, 0x20, 0x23,}}, /* Byte value: 0x27 */ + {{0xf5, 0xdb, 0x8a, 0x86, 0xe8, 0xc1, 0x27, 0x0e,}}, /* Byte value: 0x28 */ + {{0xb0, 0x7c, 0x05, 0x73, 0x9b, 0x38, 0x7d, 0xde,}}, /* Byte value: 0x29 */ + {{0xde, 0x2b, 0xca, 0xb6, 0x07, 0x78, 0xa8, 0xd7,}}, /* Byte value: 0x2a */ + {{0x03, 0x26, 0x3d, 0x61, 0x82, 0x84, 0x40, 0x46,}}, /* Byte value: 0x2b */ + {{0xd0, 0x36, 0xa9, 0x0e, 0xb6, 0xd5, 0xaa, 0xc9,}}, /* Byte value: 0x2c */ + {{0x8e, 0x44, 0x30, 0x14, 0xdd, 0x02, 0xf5, 0x2a,}}, /* Byte value: 0x2d */ + {{0x23, 0xa1, 0x59, 0x4a, 0x99, 0xdf, 0x0d, 0x4b,}}, /* Byte value: 0x2e */ + {{0x0a, 0xd4, 0x8e, 0x85, 0x8a, 0x9e, 0x43, 0x57,}}, /* Byte value: 0x2f */ + {{0xf3, 0x97, 0xf0, 0x44, 0x2f, 0x0a, 0xa7, 0x82,}}, /* Byte value: 0x30 */ + {{0x06, 0x4c, 0x7a, 0xc2, 0xc7, 0xcb, 0x80, 0x8c,}}, /* Byte value: 0x31 */ + {{0xdf, 0x88, 0x60, 0x28, 0x79, 0x04, 0x29, 0x54,}}, /* Byte value: 0x32 */ + {{0x4d, 0xf6, 0x96, 0x8f, 0x05, 0x9f, 0xd8, 0x42,}}, /* Byte value: 0x33 */ + {{0x98, 0xaa, 0x78, 0x22, 0xf6, 0x05, 0xb2, 0x41,}}, /* Byte value: 0x34 */ + {{0x97, 0x14, 0xb1, 0x04, 0x39, 0xd4, 0x31, 0xdc,}}, /* Byte value: 0x35 */ + {{0xad, 0xe5, 0x69, 0x5e, 0x44, 0xdd, 0xf8, 0x61,}}, /* Byte value: 0x36 */ + {{0x15, 0xc8, 0x75, 0x57, 0xa9, 0x83, 0x07, 0x2d,}}, /* Byte value: 0x37 */ + {{0xa2, 0x5b, 0xa0, 0x78, 0x8b, 0x0c, 0x7b, 0xfc,}}, /* Byte value: 0x38 */ + {{0xab, 0xa9, 0x13, 0x9c, 0x83, 0x16, 0x78, 0xed,}}, /* Byte value: 0x39 */ + {{0xc0, 0x94, 0x9b, 0xfa, 0x5a, 0x19, 0x6d, 0x2e,}}, /* Byte value: 0x3a */ + {{0xb6, 0x30, 0x7f, 0xb1, 0x5c, 0xf3, 0xfd, 0x52,}}, /* Byte value: 0x3b */ + {{0x53, 0x49, 0xc7, 0xc3, 0x58, 0xfe, 0x1d, 0xbb,}}, /* Byte value: 0x3c */ + {{0xed, 0x28, 0xa1, 0x08, 0x72, 0x6b, 0x62, 0x7b,}}, /* Byte value: 0x3d */ + {{0xc1, 0x37, 0x31, 0x64, 0x24, 0x65, 0xec, 0xad,}}, /* Byte value: 0x3e */ + {{0xe1, 0xb0, 0x55, 0x4f, 0x3f, 0x3e, 0xa1, 0xa0,}}, /* Byte value: 0x3f */ + {{0x62, 0xcf, 0x3b, 0x82, 0xd1, 0x15, 0x16, 0xd2,}}, /* Byte value: 0x40 */ + {{0x24, 0x4e, 0x89, 0x16, 0x20, 0x68, 0x0c, 0x44,}}, /* Byte value: 0x41 */ + {{0xe9, 0xe1, 0x4c, 0x35, 0x49, 0x58, 0x23, 0x32,}}, /* Byte value: 0x42 */ + {{0x65, 0x20, 0xeb, 0xde, 0x68, 0xa2, 0x17, 0xdd,}}, /* Byte value: 0x43 */ + {{0xec, 0x8b, 0x0b, 0x96, 0x0c, 0x17, 0xe3, 0xf8,}}, /* Byte value: 0x44 */ + {{0x5d, 0x54, 0xa4, 0x7b, 0xe9, 0x53, 0x1f, 0xa5,}}, /* Byte value: 0x45 */ + {{0x26, 0xcb, 0x1e, 0xe9, 0xdc, 0x90, 0xcd, 0x81,}}, /* Byte value: 0x46 */ + {{0xbe, 0x61, 0x66, 0xcb, 0x2a, 0x95, 0x7f, 0xc0,}}, /* Byte value: 0x47 */ + {{0x21, 0x24, 0xce, 0xb5, 0x65, 0x27, 0xcc, 0x8e,}}, /* Byte value: 0x48 */ + {{0x4b, 0xba, 0xec, 0x4d, 0xc2, 0x54, 0x58, 0xce,}}, /* Byte value: 0x49 */ + {{0x48, 0x9c, 0xd1, 0x2c, 0x40, 0xd0, 0x18, 0x88,}}, /* Byte value: 0x4a */ + {{0xca, 0x40, 0x15, 0x7f, 0xd0, 0x87, 0x2e, 0x79,}}, /* Byte value: 0x4b */ + {{0xf7, 0x5e, 0x1d, 0x79, 0x14, 0x39, 0xe6, 0xcb,}}, /* Byte value: 0x4c */ + {{0x7c, 0x70, 0x6a, 0xce, 0x8c, 0x74, 0xd3, 0x2b,}}, /* Byte value: 0x4d */ + {{0xff, 0x0f, 0x04, 0x03, 0x62, 0x5f, 0x64, 0x59,}}, /* Byte value: 0x4e */ + {{0x20, 0x87, 0x64, 0x2b, 0x1b, 0x5b, 0x4d, 0x0d,}}, /* Byte value: 0x4f */ + {{0xd1, 0x95, 0x03, 0x90, 0xc8, 0xa9, 0x2b, 0x4a,}}, /* Byte value: 0x50 */ + {{0x85, 0x33, 0x14, 0x0f, 0x29, 0xe0, 0x37, 0xfe,}}, /* Byte value: 0x51 */ + {{0x58, 0x3e, 0xe3, 0xd8, 0xac, 0x1c, 0xdf, 0x6f,}}, /* Byte value: 0x52 */ + {{0x49, 0x3f, 0x7b, 0xb2, 0x3e, 0xac, 0x99, 0x0b,}}, /* Byte value: 0x53 */ + {{0xfa, 0x65, 0x43, 0xa0, 0x27, 0x10, 0xa4, 0x93,}}, /* Byte value: 0x54 */ + {{0x87, 0xb6, 0x83, 0xf0, 0xd5, 0x18, 0xf6, 0x3b,}}, /* Byte value: 0x55 */ + {{0x27, 0x68, 0xb4, 0x77, 0xa2, 0xec, 0x4c, 0x02,}}, /* Byte value: 0x56 */ + {{0xe8, 0x42, 0xe6, 0xab, 0x37, 0x24, 0xa2, 0xb1,}}, /* Byte value: 0x57 */ + {{0xf4, 0x78, 0x20, 0x18, 0x96, 0xbd, 0xa6, 0x8d,}}, /* Byte value: 0x58 */ + {{0x5a, 0xbb, 0x74, 0x27, 0x50, 0xe4, 0x1e, 0xaa,}}, /* Byte value: 0x59 */ + {{0x66, 0x06, 0xd6, 0xbf, 0xea, 0x26, 0x57, 0x9b,}}, /* Byte value: 0x5a */ + {{0xf0, 0xb1, 0xcd, 0x25, 0xad, 0x8e, 0xe7, 0xc4,}}, /* Byte value: 0x5b */ + {{0xcb, 0xe3, 0xbf, 0xe1, 0xae, 0xfb, 0xaf, 0xfa,}}, /* Byte value: 0x5c */ + {{0x0e, 0x1d, 0x63, 0xb8, 0xb1, 0xad, 0x02, 0x1e,}}, /* Byte value: 0x5d */ + {{0xe2, 0x96, 0x68, 0x2e, 0xbd, 0xba, 0xe1, 0xe6,}}, /* Byte value: 0x5e */ + {{0x57, 0x80, 0x2a, 0xfe, 0x63, 0xcd, 0x5c, 0xf2,}}, /* Byte value: 0x5f */ + {{0xc4, 0x5d, 0x76, 0xc7, 0x61, 0x2a, 0x2c, 0x67,}}, /* Byte value: 0x60 */ + {{0x9b, 0x8c, 0x45, 0x43, 0x74, 0x81, 0xf2, 0x07,}}, /* Byte value: 0x61 */ + {{0xee, 0x0e, 0x9c, 0x69, 0xf0, 0xef, 0x22, 0x3d,}}, /* Byte value: 0x62 */ + {{0x1a, 0x76, 0xbc, 0x71, 0x66, 0x52, 0x84, 0xb0,}}, /* Byte value: 0x63 */ + {{0x37, 0xca, 0x86, 0x83, 0x4e, 0x20, 0x8b, 0xe5,}}, /* Byte value: 0x64 */ + {{0x2e, 0x9a, 0x07, 0x93, 0xaa, 0xf6, 0x4f, 0x13,}}, /* Byte value: 0x65 */ + {{0x69, 0xb8, 0x1f, 0x99, 0x25, 0xf7, 0xd4, 0x06,}}, /* Byte value: 0x66 */ + {{0x8b, 0x2e, 0x77, 0xb7, 0x98, 0x4d, 0x35, 0xe0,}}, /* Byte value: 0x67 */ + {{0xaf, 0x60, 0xfe, 0xa1, 0xb8, 0x25, 0x39, 0xa4,}}, /* Byte value: 0x68 */ + {{0xc2, 0x11, 0x0c, 0x05, 0xa6, 0xe1, 0xac, 0xeb,}}, /* Byte value: 0x69 */ + {{0x7f, 0x56, 0x57, 0xaf, 0x0e, 0xf0, 0x93, 0x6d,}}, /* Byte value: 0x6a */ + {{0x64, 0x83, 0x41, 0x40, 0x16, 0xde, 0x96, 0x5e,}}, /* Byte value: 0x6b */ + {{0x45, 0xa7, 0x8f, 0xf5, 0x73, 0xf9, 0x5a, 0xd0,}}, /* Byte value: 0x6c */ + {{0x14, 0x6b, 0xdf, 0xc9, 0xd7, 0xff, 0x86, 0xae,}}, /* Byte value: 0x6d */ + {{0xfd, 0x8a, 0x93, 0xfc, 0x9e, 0xa7, 0xa5, 0x9c,}}, /* Byte value: 0x6e */ + {{0xac, 0x46, 0xc3, 0xc0, 0x3a, 0xa1, 0x79, 0xe2,}}, /* Byte value: 0x6f */ + {{0x86, 0x15, 0x29, 0x6e, 0xab, 0x64, 0x77, 0xb8,}}, /* Byte value: 0x70 */ + {{0x76, 0xa4, 0xe4, 0x4b, 0x06, 0xea, 0x90, 0x7c,}}, /* Byte value: 0x71 */ + {{0x43, 0xeb, 0xf5, 0x37, 0xb4, 0x32, 0xda, 0x5c,}}, /* Byte value: 0x72 */ + {{0x50, 0x6f, 0xfa, 0xa2, 0xda, 0x7a, 0x5d, 0xfd,}}, /* Byte value: 0x73 */ + {{0x28, 0xd6, 0x7d, 0x51, 0x6d, 0x3d, 0xcf, 0x9f,}}, /* Byte value: 0x74 */ + {{0xaa, 0x0a, 0xb9, 0x02, 0xfd, 0x6a, 0xf9, 0x6e,}}, /* Byte value: 0x75 */ + {{0x5e, 0x72, 0x99, 0x1a, 0x6b, 0xd7, 0x5f, 0xe3,}}, /* Byte value: 0x76 */ + {{0xdd, 0x0d, 0xf7, 0xd7, 0x85, 0xfc, 0xe8, 0x91,}}, /* Byte value: 0x77 */ + {{0xbb, 0x0b, 0x21, 0x68, 0x6f, 0xda, 0xbf, 0x0a,}}, /* Byte value: 0x78 */ + {{0x96, 0xb7, 0x1b, 0x9a, 0x47, 0xa8, 0xb0, 0x5f,}}, /* Byte value: 0x79 */ + {{0x05, 0x6a, 0x47, 0xa3, 0x45, 0x4f, 0xc0, 0xca,}}, /* Byte value: 0x7a */ + {{0x7b, 0x9f, 0xba, 0x92, 0x35, 0xc3, 0xd2, 0x24,}}, /* Byte value: 0x7b */ + {{0xf6, 0xfd, 0xb7, 0xe7, 0x6a, 0x45, 0x67, 0x48,}}, /* Byte value: 0x7c */ + {{0x2b, 0xf0, 0x40, 0x30, 0xef, 0xb9, 0x8f, 0xd9,}}, /* Byte value: 0x7d */ + {{0x09, 0xf2, 0xb3, 0xe4, 0x08, 0x1a, 0x03, 0x11,}}, /* Byte value: 0x7e */ + {{0xc7, 0x7b, 0x4b, 0xa6, 0xe3, 0xae, 0x6c, 0x21,}}, /* Byte value: 0x7f */ + {{0x46, 0x81, 0xb2, 0x94, 0xf1, 0x7d, 0x1a, 0x96,}}, /* Byte value: 0x80 */ + {{0x0d, 0x3b, 0x5e, 0xd9, 0x33, 0x29, 0x42, 0x58,}}, /* Byte value: 0x81 */ + {{0x13, 0x84, 0x0f, 0x95, 0x6e, 0x48, 0x87, 0xa1,}}, /* Byte value: 0x82 */ + {{0x61, 0xe9, 0x06, 0xe3, 0x53, 0x91, 0x56, 0x94,}}, /* Byte value: 0x83 */ + {{0x01, 0xa3, 0xaa, 0x9e, 0x7e, 0x7c, 0x81, 0x83,}}, /* Byte value: 0x84 */ + {{0xef, 0xad, 0x36, 0xf7, 0x8e, 0x93, 0xa3, 0xbe,}}, /* Byte value: 0x85 */ + {{0x8d, 0x62, 0x0d, 0x75, 0x5f, 0x86, 0xb5, 0x6c,}}, /* Byte value: 0x86 */ + {{0xd3, 0x10, 0x94, 0x6f, 0x34, 0x51, 0xea, 0x8f,}}, /* Byte value: 0x87 */ + {{0xbc, 0xe4, 0xf1, 0x34, 0xd6, 0x6d, 0xbe, 0x05,}}, /* Byte value: 0x88 */ + {{0xf1, 0x12, 0x67, 0xbb, 0xd3, 0xf2, 0x66, 0x47,}}, /* Byte value: 0x89 */ + {{0x32, 0xa0, 0xc1, 0x20, 0x0b, 0x6f, 0x4b, 0x2f,}}, /* Byte value: 0x8a */ + {{0x5c, 0xf7, 0x0e, 0xe5, 0x97, 0x2f, 0x9e, 0x26,}}, /* Byte value: 0x8b */ + {{0x02, 0x85, 0x97, 0xff, 0xfc, 0xf8, 0xc1, 0xc5,}}, /* Byte value: 0x8c */ + {{0xb1, 0xdf, 0xaf, 0xed, 0xe5, 0x44, 0xfc, 0x5d,}}, /* Byte value: 0x8d */ + {{0x56, 0x23, 0x80, 0x60, 0x1d, 0xb1, 0xdd, 0x71,}}, /* Byte value: 0x8e */ + {{0x51, 0xcc, 0x50, 0x3c, 0xa4, 0x06, 0xdc, 0x7e,}}, /* Byte value: 0x8f */ + {{0xc9, 0x66, 0x28, 0x1e, 0x52, 0x03, 0x6e, 0x3f,}}, /* Byte value: 0x90 */ + {{0xd6, 0x7a, 0xd3, 0xcc, 0x71, 0x1e, 0x2a, 0x45,}}, /* Byte value: 0x91 */ + {{0x4e, 0xd0, 0xab, 0xee, 0x87, 0x1b, 0x98, 0x04,}}, /* Byte value: 0x92 */ + {{0xc8, 0xc5, 0x82, 0x80, 0x2c, 0x7f, 0xef, 0xbc,}}, /* Byte value: 0x93 */ + {{0xa0, 0xde, 0x37, 0x87, 0x77, 0xf4, 0xba, 0x39,}}, /* Byte value: 0x94 */ + {{0x31, 0x86, 0xfc, 0x41, 0x89, 0xeb, 0x0b, 0x69,}}, /* Byte value: 0x95 */ + {{0x22, 0x02, 0xf3, 0xd4, 0xe7, 0xa3, 0x8c, 0xc8,}}, /* Byte value: 0x96 */ + {{0xa5, 0xb4, 0x70, 0x24, 0x32, 0xbb, 0x7a, 0xf3,}}, /* Byte value: 0x97 */ + {{0x17, 0x4d, 0xe2, 0xa8, 0x55, 0x7b, 0xc6, 0xe8,}}, /* Byte value: 0x98 */ + {{0x33, 0x03, 0x6b, 0xbe, 0x75, 0x13, 0xca, 0xac,}}, /* Byte value: 0x99 */ + {{0x94, 0x32, 0x8c, 0x65, 0xbb, 0x50, 0x71, 0x9a,}}, /* Byte value: 0x9a */ + {{0xeb, 0x64, 0xdb, 0xca, 0xb5, 0xa0, 0xe2, 0xf7,}}, /* Byte value: 0x9b */ + {{0x84, 0x90, 0xbe, 0x91, 0x57, 0x9c, 0xb6, 0x7d,}}, /* Byte value: 0x9c */ + {{0x08, 0x51, 0x19, 0x7a, 0x76, 0x66, 0x82, 0x92,}}, /* Byte value: 0x9d */ + {{0x25, 0xed, 0x23, 0x88, 0x5e, 0x14, 0x8d, 0xc7,}}, /* Byte value: 0x9e */ + {{0xf9, 0x43, 0x7e, 0xc1, 0xa5, 0x94, 0xe4, 0xd5,}}, /* Byte value: 0x9f */ + {{0x39, 0xd7, 0xe5, 0x3b, 0xff, 0x8d, 0x89, 0xfb,}}, /* Byte value: 0xa0 */ + {{0x60, 0x4a, 0xac, 0x7d, 0x2d, 0xed, 0xd7, 0x17,}}, /* Byte value: 0xa1 */ + {{0xb2, 0xf9, 0x92, 0x8c, 0x67, 0xc0, 0xbc, 0x1b,}}, /* Byte value: 0xa2 */ + {{0xd4, 0xff, 0x44, 0x33, 0x8d, 0xe6, 0xeb, 0x80,}}, /* Byte value: 0xa3 */ + {{0x6f, 0xf4, 0x65, 0x5b, 0xe2, 0x3c, 0x54, 0x8a,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x6d, 0x71, 0xf2, 0xa4, 0x1e, 0xc4, 0x95, 0x4f,}}, /* Byte value: 0xa6 */ + {{0xa1, 0x7d, 0x9d, 0x19, 0x09, 0x88, 0x3b, 0xba,}}, /* Byte value: 0xa7 */ + {{0x12, 0x27, 0xa5, 0x0b, 0x10, 0x34, 0x06, 0x22,}}, /* Byte value: 0xa8 */ + {{0xd8, 0x67, 0xb0, 0x74, 0xc0, 0xb3, 0x28, 0x5b,}}, /* Byte value: 0xa9 */ + {{0xa3, 0xf8, 0x0a, 0xe6, 0xf5, 0x70, 0xfa, 0x7f,}}, /* Byte value: 0xaa */ + {{0xa4, 0x17, 0xda, 0xba, 0x4c, 0xc7, 0xfb, 0x70,}}, /* Byte value: 0xab */ + {{0xcf, 0x2a, 0x52, 0xdc, 0x95, 0xc8, 0xee, 0xb3,}}, /* Byte value: 0xac */ + {{0x9a, 0x2f, 0xef, 0xdd, 0x0a, 0xfd, 0x73, 0x84,}}, /* Byte value: 0xad */ + {{0xcc, 0x0c, 0x6f, 0xbd, 0x17, 0x4c, 0xae, 0xf5,}}, /* Byte value: 0xae */ + {{0x52, 0xea, 0x6d, 0x5d, 0x26, 0x82, 0x9c, 0x38,}}, /* Byte value: 0xaf */ + {{0x1c, 0x3a, 0xc6, 0xb3, 0xa1, 0x99, 0x04, 0x3c,}}, /* Byte value: 0xb0 */ + {{0x2f, 0x39, 0xad, 0x0d, 0xd4, 0x8a, 0xce, 0x90,}}, /* Byte value: 0xb1 */ + {{0x7e, 0xf5, 0xfd, 0x31, 0x70, 0x8c, 0x12, 0xee,}}, /* Byte value: 0xb2 */ + {{0x93, 0xdd, 0x5c, 0x39, 0x02, 0xe7, 0x70, 0x95,}}, /* Byte value: 0xb3 */ + {{0x42, 0x48, 0x5f, 0xa9, 0xca, 0x4e, 0x5b, 0xdf,}}, /* Byte value: 0xb4 */ + {{0xb3, 0x5a, 0x38, 0x12, 0x19, 0xbc, 0x3d, 0x98,}}, /* Byte value: 0xb5 */ + {{0x18, 0xf3, 0x2b, 0x8e, 0x9a, 0xaa, 0x45, 0x75,}}, /* Byte value: 0xb6 */ + {{0xb8, 0x2d, 0x1c, 0x09, 0xed, 0x5e, 0xff, 0x4c,}}, /* Byte value: 0xb7 */ + {{0xfc, 0x29, 0x39, 0x62, 0xe0, 0xdb, 0x24, 0x1f,}}, /* Byte value: 0xb8 */ + {{0x44, 0x04, 0x25, 0x6b, 0x0d, 0x85, 0xdb, 0x53,}}, /* Byte value: 0xb9 */ + {{0xe6, 0x5f, 0x85, 0x13, 0x86, 0x89, 0xa0, 0xaf,}}, /* Byte value: 0xba */ + {{0x8c, 0xc1, 0xa7, 0xeb, 0x21, 0xfa, 0x34, 0xef,}}, /* Byte value: 0xbb */ + {{0xc6, 0xd8, 0xe1, 0x38, 0x9d, 0xd2, 0xed, 0xa2,}}, /* Byte value: 0xbc */ + {{0x63, 0x6c, 0x91, 0x1c, 0xaf, 0x69, 0x97, 0x51,}}, /* Byte value: 0xbd */ + {{0xbf, 0xc2, 0xcc, 0x55, 0x54, 0xe9, 0xfe, 0x43,}}, /* Byte value: 0xbe */ + {{0xf2, 0x34, 0x5a, 0xda, 0x51, 0x76, 0x26, 0x01,}}, /* Byte value: 0xbf */ + {{0x2c, 0x1f, 0x90, 0x6c, 0x56, 0x0e, 0x8e, 0xd6,}}, /* Byte value: 0xc0 */ + {{0x11, 0x01, 0x98, 0x6a, 0x92, 0xb0, 0x46, 0x64,}}, /* Byte value: 0xc1 */ + {{0x73, 0xce, 0xa3, 0xe8, 0x43, 0xa5, 0x50, 0xb6,}}, /* Byte value: 0xc2 */ + {{0xdc, 0xae, 0x5d, 0x49, 0xfb, 0x80, 0x69, 0x12,}}, /* Byte value: 0xc3 */ + {{0xd9, 0xc4, 0x1a, 0xea, 0xbe, 0xcf, 0xa9, 0xd8,}}, /* Byte value: 0xc4 */ + {{0x92, 0x7e, 0xf6, 0xa7, 0x7c, 0x9b, 0xf1, 0x16,}}, /* Byte value: 0xc5 */ + {{0x3e, 0x38, 0x35, 0x67, 0x46, 0x3a, 0x88, 0xf4,}}, /* Byte value: 0xc6 */ + {{0xd2, 0xb3, 0x3e, 0xf1, 0x4a, 0x2d, 0x6b, 0x0c,}}, /* Byte value: 0xc7 */ + {{0x59, 0x9d, 0x49, 0x46, 0xd2, 0x60, 0x5e, 0xec,}}, /* Byte value: 0xc8 */ + {{0x75, 0x82, 0xd9, 0x2a, 0x84, 0x6e, 0xd0, 0x3a,}}, /* Byte value: 0xc9 */ + {{0x19, 0x50, 0x81, 0x10, 0xe4, 0xd6, 0xc4, 0xf6,}}, /* Byte value: 0xca */ + {{0xb4, 0xb5, 0xe8, 0x4e, 0xa0, 0x0b, 0x3c, 0x97,}}, /* Byte value: 0xcb */ + {{0x81, 0xfa, 0xf9, 0x32, 0x12, 0xd3, 0x76, 0xb7,}}, /* Byte value: 0xcc */ + {{0xe4, 0xda, 0x12, 0xec, 0x7a, 0x71, 0x61, 0x6a,}}, /* Byte value: 0xcd */ + {{0xe5, 0x79, 0xb8, 0x72, 0x04, 0x0d, 0xe0, 0xe9,}}, /* Byte value: 0xce */ + {{0x0f, 0xbe, 0xc9, 0x26, 0xcf, 0xd1, 0x83, 0x9d,}}, /* Byte value: 0xcf */ + {{0x47, 0x22, 0x18, 0x0a, 0x8f, 0x01, 0x9b, 0x15,}}, /* Byte value: 0xd0 */ + {{0x9c, 0x63, 0x95, 0x1f, 0xcd, 0x36, 0xf3, 0x08,}}, /* Byte value: 0xd1 */ + {{0x2a, 0x53, 0xea, 0xae, 0x91, 0xc5, 0x0e, 0x5a,}}, /* Byte value: 0xd2 */ + {{0xa8, 0x8f, 0x2e, 0xfd, 0x01, 0x92, 0x38, 0xab,}}, /* Byte value: 0xd3 */ + {{0x5b, 0x18, 0xde, 0xb9, 0x2e, 0x98, 0x9f, 0x29,}}, /* Byte value: 0xd4 */ + {{0x8f, 0xe7, 0x9a, 0x8a, 0xa3, 0x7e, 0x74, 0xa9,}}, /* Byte value: 0xd5 */ + {{0x04, 0xc9, 0xed, 0x3d, 0x3b, 0x33, 0x41, 0x49,}}, /* Byte value: 0xd6 */ + {{0xa6, 0x92, 0x4d, 0x45, 0xb0, 0x3f, 0x3a, 0xb5,}}, /* Byte value: 0xd7 */ + {{0x72, 0x6d, 0x09, 0x76, 0x3d, 0xd9, 0xd1, 0x35,}}, /* Byte value: 0xd8 */ + {{0xba, 0xa8, 0x8b, 0xf6, 0x11, 0xa6, 0x3e, 0x89,}}, /* Byte value: 0xd9 */ + {{0x30, 0x25, 0x56, 0xdf, 0xf7, 0x97, 0x8a, 0xea,}}, /* Byte value: 0xda */ + {{0x4c, 0x55, 0x3c, 0x11, 0x7b, 0xe3, 0x59, 0xc1,}}, /* Byte value: 0xdb */ + {{0x82, 0xdc, 0xc4, 0x53, 0x90, 0x57, 0x36, 0xf1,}}, /* Byte value: 0xdc */ + {{0x6a, 0x9e, 0x22, 0xf8, 0xa7, 0x73, 0x94, 0x40,}}, /* Byte value: 0xdd */ + {{0x88, 0x08, 0x4a, 0xd6, 0x1a, 0xc9, 0x75, 0xa6,}}, /* Byte value: 0xde */ + {{0x3c, 0xbd, 0xa2, 0x98, 0xba, 0xc2, 0x49, 0x31,}}, /* Byte value: 0xdf */ + {{0x6e, 0x57, 0xcf, 0xc5, 0x9c, 0x40, 0xd5, 0x09,}}, /* Byte value: 0xe0 */ + {{0x0b, 0x77, 0x24, 0x1b, 0xf4, 0xe2, 0xc2, 0xd4,}}, /* Byte value: 0xe1 */ + {{0x9e, 0xe6, 0x02, 0xe0, 0x31, 0xce, 0x32, 0xcd,}}, /* Byte value: 0xe2 */ + {{0x68, 0x1b, 0xb5, 0x07, 0x5b, 0x8b, 0x55, 0x85,}}, /* Byte value: 0xe3 */ + {{0x67, 0xa5, 0x7c, 0x21, 0x94, 0x5a, 0xd6, 0x18,}}, /* Byte value: 0xe4 */ + {{0xc5, 0xfe, 0xdc, 0x59, 0x1f, 0x56, 0xad, 0xe4,}}, /* Byte value: 0xe5 */ + {{0x74, 0x21, 0x73, 0xb4, 0xfa, 0x12, 0x51, 0xb9,}}, /* Byte value: 0xe6 */ + {{0x40, 0xcd, 0xc8, 0x56, 0x36, 0xb6, 0x9a, 0x1a,}}, /* Byte value: 0xe7 */ + {{0x0c, 0x98, 0xf4, 0x47, 0x4d, 0x55, 0xc3, 0xdb,}}, /* Byte value: 0xe8 */ + {{0xe7, 0xfc, 0x2f, 0x8d, 0xf8, 0xf5, 0x21, 0x2c,}}, /* Byte value: 0xe9 */ + {{0x9d, 0xc0, 0x3f, 0x81, 0xb3, 0x4a, 0x72, 0x8b,}}, /* Byte value: 0xea */ + {{0x90, 0xfb, 0x61, 0x58, 0x80, 0x63, 0x30, 0xd3,}}, /* Byte value: 0xeb */ + {{0x7a, 0x3c, 0x10, 0x0c, 0x4b, 0xbf, 0x53, 0xa7,}}, /* Byte value: 0xec */ + {{0x3a, 0xf1, 0xd8, 0x5a, 0x7d, 0x09, 0xc9, 0xbd,}}, /* Byte value: 0xed */ + {{0x35, 0x4f, 0x11, 0x7c, 0xb2, 0xd8, 0x4a, 0x20,}}, /* Byte value: 0xee */ + {{0x34, 0xec, 0xbb, 0xe2, 0xcc, 0xa4, 0xcb, 0xa3,}}, /* Byte value: 0xef */ + {{0x9f, 0x45, 0xa8, 0x7e, 0x4f, 0xb2, 0xb3, 0x4e,}}, /* Byte value: 0xf0 */ + {{0xb7, 0x93, 0xd5, 0x2f, 0x22, 0x8f, 0x7c, 0xd1,}}, /* Byte value: 0xf1 */ + {{0xf8, 0xe0, 0xd4, 0x5f, 0xdb, 0xe8, 0x65, 0x56,}}, /* Byte value: 0xf2 */ + {{0x4f, 0x73, 0x01, 0x70, 0xf9, 0x67, 0x19, 0x87,}}, /* Byte value: 0xf3 */ + {{0x6b, 0x3d, 0x88, 0x66, 0xd9, 0x0f, 0x15, 0xc3,}}, /* Byte value: 0xf4 */ + {{0x83, 0x7f, 0x6e, 0xcd, 0xee, 0x2b, 0xb7, 0x72,}}, /* Byte value: 0xf5 */ + {{0x5f, 0xd1, 0x33, 0x84, 0x15, 0xab, 0xde, 0x60,}}, /* Byte value: 0xf6 */ + {{0xa7, 0x31, 0xe7, 0xdb, 0xce, 0x43, 0xbb, 0x36,}}, /* Byte value: 0xf7 */ + {{0x1e, 0xbf, 0x51, 0x4c, 0x5d, 0x61, 0xc5, 0xf9,}}, /* Byte value: 0xf8 */ + {{0x10, 0xa2, 0x32, 0xf4, 0xec, 0xcc, 0xc7, 0xe7,}}, /* Byte value: 0xf9 */ + {{0xc3, 0xb2, 0xa6, 0x9b, 0xd8, 0x9d, 0x2d, 0x68,}}, /* Byte value: 0xfa */ + {{0x78, 0xb9, 0x87, 0xf3, 0xb7, 0x47, 0x92, 0x62,}}, /* Byte value: 0xfb */ + {{0x2d, 0xbc, 0x3a, 0xf2, 0x28, 0x72, 0x0f, 0x55,}}, /* Byte value: 0xfc */ + {{0x77, 0x07, 0x4e, 0xd5, 0x78, 0x96, 0x11, 0xff,}}, /* Byte value: 0xfd */ + {{0xe3, 0x35, 0xc2, 0xb0, 0xc3, 0xc6, 0x60, 0x65,}}, /* Byte value: 0xfe */ + {{0x80, 0x59, 0x53, 0xac, 0x6c, 0xaf, 0xf7, 0x34,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 14 */ + {{0x0a, 0xaf, 0x45, 0x6e, 0xf6, 0x73, 0x56, 0xfb,}}, /* Byte value: 0x00 */ + {{0xca, 0x52, 0x68, 0xe5, 0x24, 0x5b, 0xd9, 0x08,}}, /* Byte value: 0x01 */ + {{0xf3, 0x80, 0xf6, 0x75, 0x2e, 0x6a, 0xc5, 0xcb,}}, /* Byte value: 0x02 */ + {{0x17, 0x4e, 0xcb, 0x70, 0x06, 0xae, 0xb5, 0x41,}}, /* Byte value: 0x03 */ + {{0x33, 0x7d, 0xdb, 0xfe, 0xfc, 0x42, 0x4a, 0x38,}}, /* Byte value: 0x04 */ + {{0x5f, 0x28, 0xeb, 0xaf, 0x31, 0xb5, 0x88, 0xb3,}}, /* Byte value: 0x05 */ + {{0xa3, 0xb1, 0x9b, 0x83, 0x92, 0x74, 0x30, 0x1f,}}, /* Byte value: 0x06 */ + {{0x37, 0x3b, 0x27, 0xad, 0x21, 0xa2, 0xd7, 0x88,}}, /* Byte value: 0x07 */ + {{0x2a, 0xda, 0xa9, 0xb3, 0xd1, 0x7f, 0x34, 0x32,}}, /* Byte value: 0x08 */ + {{0xc9, 0x81, 0x29, 0x49, 0x0d, 0x13, 0xc0, 0x7c,}}, /* Byte value: 0x09 */ + {{0x67, 0x0a, 0x4a, 0x5b, 0x9d, 0xbc, 0x22, 0x5c,}}, /* Byte value: 0x0a */ + {{0xd3, 0xf5, 0x1a, 0xa8, 0x09, 0x66, 0xa7, 0x02,}}, /* Byte value: 0x0b */ + {{0x63, 0x4c, 0xb6, 0x08, 0x40, 0x5c, 0xbf, 0xec,}}, /* Byte value: 0x0c */ + {{0x84, 0x51, 0xca, 0xa1, 0x41, 0xd0, 0xd6, 0x12,}}, /* Byte value: 0x0d */ + {{0xf7, 0xc6, 0x0a, 0x26, 0xf3, 0x8a, 0x58, 0x7b,}}, /* Byte value: 0x0e */ + {{0x3c, 0x64, 0x5d, 0xa7, 0x71, 0xe9, 0x37, 0x5f,}}, /* Byte value: 0x0f */ + {{0xea, 0x27, 0x84, 0x38, 0x03, 0x57, 0xbb, 0xc1,}}, /* Byte value: 0x10 */ + {{0x65, 0x29, 0x34, 0x93, 0x12, 0xcc, 0x8d, 0x04,}}, /* Byte value: 0x11 */ + {{0xd0, 0x26, 0x5b, 0x04, 0x20, 0x2e, 0xbe, 0x76,}}, /* Byte value: 0x12 */ + {{0x9e, 0x25, 0xf9, 0x40, 0x45, 0xa5, 0xb1, 0x6c,}}, /* Byte value: 0x13 */ + {{0x18, 0x57, 0x4d, 0x29, 0x8b, 0x05, 0xc8, 0x26,}}, /* Byte value: 0x14 */ + {{0xf4, 0x15, 0x4b, 0x8a, 0xda, 0xc2, 0x41, 0x0f,}}, /* Byte value: 0x15 */ + {{0xaf, 0x7b, 0x5c, 0x76, 0x36, 0x97, 0x54, 0x0c,}}, /* Byte value: 0x16 */ + {{0xcc, 0x37, 0xea, 0x7e, 0x76, 0xcb, 0xeb, 0xe0,}}, /* Byte value: 0x17 */ + {{0x7a, 0xeb, 0xc4, 0x45, 0x6d, 0x61, 0xc1, 0xe6,}}, /* Byte value: 0x18 */ + {{0x83, 0xc4, 0x77, 0x5e, 0xb5, 0x78, 0x52, 0xd6,}}, /* Byte value: 0x19 */ + {{0x9d, 0xf6, 0xb8, 0xec, 0x6c, 0xed, 0xa8, 0x18,}}, /* Byte value: 0x1a */ + {{0x81, 0xe7, 0x09, 0x96, 0x3a, 0x08, 0xfd, 0x8e,}}, /* Byte value: 0x1b */ + {{0xad, 0x58, 0x22, 0xbe, 0xb9, 0xe7, 0xfb, 0x54,}}, /* Byte value: 0x1c */ + {{0xa9, 0x1e, 0xde, 0xed, 0x64, 0x07, 0x66, 0xe4,}}, /* Byte value: 0x1d */ + {{0xfc, 0x99, 0x70, 0x2c, 0xa3, 0xc1, 0xb8, 0xac,}}, /* Byte value: 0x1e */ + {{0x73, 0x97, 0xc0, 0x87, 0xb2, 0x5a, 0x8e, 0x69,}}, /* Byte value: 0x1f */ + {{0xb0, 0xb9, 0xac, 0xa0, 0x49, 0x3a, 0x18, 0xee,}}, /* Byte value: 0x20 */ + {{0x77, 0xd1, 0x3c, 0xd4, 0x6f, 0xba, 0x13, 0xd9,}}, /* Byte value: 0x21 */ + {{0xa5, 0xd4, 0x19, 0x18, 0xc0, 0xe4, 0x02, 0xf7,}}, /* Byte value: 0x22 */ + {{0x46, 0x8f, 0x99, 0xe2, 0x1c, 0x88, 0xf6, 0xb9,}}, /* Byte value: 0x23 */ + {{0x10, 0xdb, 0x76, 0x8f, 0xf2, 0x06, 0x31, 0x85,}}, /* Byte value: 0x24 */ + {{0x2b, 0x2a, 0x96, 0xd7, 0x77, 0x47, 0x82, 0x1e,}}, /* Byte value: 0x25 */ + {{0x87, 0x82, 0x8b, 0x0d, 0x68, 0x98, 0xcf, 0x66,}}, /* Byte value: 0x26 */ + {{0xf9, 0x2f, 0xb3, 0x1b, 0xd8, 0x19, 0x93, 0x30,}}, /* Byte value: 0x27 */ + {{0xd8, 0xaa, 0x60, 0xa2, 0x59, 0x2d, 0x47, 0xd5,}}, /* Byte value: 0x28 */ + {{0x80, 0x17, 0x36, 0xf2, 0x9c, 0x30, 0x4b, 0xa2,}}, /* Byte value: 0x29 */ + {{0x34, 0xe8, 0x66, 0x01, 0x08, 0xea, 0xce, 0xfc,}}, /* Byte value: 0x2a */ + {{0x31, 0x5e, 0xa5, 0x36, 0x73, 0x32, 0xe5, 0x60,}}, /* Byte value: 0x2b */ + {{0x6f, 0x86, 0x71, 0xfd, 0xe4, 0xbf, 0xdb, 0xff,}}, /* Byte value: 0x2c */ + {{0x4d, 0xd0, 0xe3, 0xe8, 0x4c, 0xc3, 0x16, 0x6e,}}, /* Byte value: 0x2d */ + {{0xd5, 0x90, 0x98, 0x33, 0x5b, 0xf6, 0x95, 0xea,}}, /* Byte value: 0x2e */ + {{0xa6, 0x07, 0x58, 0xb4, 0xe9, 0xac, 0x1b, 0x83,}}, /* Byte value: 0x2f */ + {{0xba, 0x16, 0xe9, 0xce, 0xbf, 0x49, 0x4e, 0x15,}}, /* Byte value: 0x30 */ + {{0x62, 0xbc, 0x89, 0x6c, 0xe6, 0x64, 0x09, 0xc0,}}, /* Byte value: 0x31 */ + {{0x9a, 0x63, 0x05, 0x13, 0x98, 0x45, 0x2c, 0xdc,}}, /* Byte value: 0x32 */ + {{0x61, 0x6f, 0xc8, 0xc0, 0xcf, 0x2c, 0x10, 0xb4,}}, /* Byte value: 0x33 */ + {{0x5d, 0x0b, 0x95, 0x67, 0xbe, 0xc5, 0x27, 0xeb,}}, /* Byte value: 0x34 */ + {{0xa8, 0xee, 0xe1, 0x89, 0xc2, 0x3f, 0xd0, 0xc8,}}, /* Byte value: 0x35 */ + {{0x98, 0x40, 0x7b, 0xdb, 0x17, 0x35, 0x83, 0x84,}}, /* Byte value: 0x36 */ + {{0x21, 0x85, 0xd3, 0xb9, 0x81, 0x34, 0xd4, 0xe5,}}, /* Byte value: 0x37 */ + {{0x6d, 0xa5, 0x0f, 0x35, 0x6b, 0xcf, 0x74, 0xa7,}}, /* Byte value: 0x38 */ + {{0xfa, 0xfc, 0xf2, 0xb7, 0xf1, 0x51, 0x8a, 0x44,}}, /* Byte value: 0x39 */ + {{0x1d, 0xe1, 0x8e, 0x1e, 0xf0, 0xdd, 0xe3, 0xba,}}, /* Byte value: 0x3a */ + {{0xe2, 0xab, 0xbf, 0x9e, 0x7a, 0x54, 0x42, 0x62,}}, /* Byte value: 0x3b */ + {{0x48, 0x66, 0x20, 0xdf, 0x37, 0x1b, 0x3d, 0xf2,}}, /* Byte value: 0x3c */ + {{0x93, 0x1f, 0x01, 0xd1, 0x47, 0x7e, 0x63, 0x53,}}, /* Byte value: 0x3d */ + {{0xb3, 0x6a, 0xed, 0x0c, 0x60, 0x72, 0x01, 0x9a,}}, /* Byte value: 0x3e */ + {{0x57, 0xa4, 0xd0, 0x09, 0x48, 0xb6, 0x71, 0x10,}}, /* Byte value: 0x3f */ + {{0x70, 0x44, 0x81, 0x2b, 0x9b, 0x12, 0x97, 0x1d,}}, /* Byte value: 0x40 */ + {{0x19, 0xa7, 0x72, 0x4d, 0x2d, 0x3d, 0x7e, 0x0a,}}, /* Byte value: 0x41 */ + {{0x6e, 0x76, 0x4e, 0x99, 0x42, 0x87, 0x6d, 0xd3,}}, /* Byte value: 0x42 */ + {{0xbc, 0x73, 0x6b, 0x55, 0xed, 0xd9, 0x7c, 0xfd,}}, /* Byte value: 0x43 */ + {{0x3d, 0x94, 0x62, 0xc3, 0xd7, 0xd1, 0x81, 0x73,}}, /* Byte value: 0x44 */ + {{0x13, 0x08, 0x37, 0x23, 0xdb, 0x4e, 0x28, 0xf1,}}, /* Byte value: 0x45 */ + {{0x86, 0x72, 0xb4, 0x69, 0xce, 0xa0, 0x79, 0x4a,}}, /* Byte value: 0x46 */ + {{0xdb, 0x79, 0x21, 0x0e, 0x70, 0x65, 0x5e, 0xa1,}}, /* Byte value: 0x47 */ + {{0x4a, 0x45, 0x5e, 0x17, 0xb8, 0x6b, 0x92, 0xaa,}}, /* Byte value: 0x48 */ + {{0x03, 0xd3, 0x41, 0xac, 0x29, 0x48, 0x19, 0x74,}}, /* Byte value: 0x49 */ + {{0x32, 0x8d, 0xe4, 0x9a, 0x5a, 0x7a, 0xfc, 0x14,}}, /* Byte value: 0x4a */ + {{0xbb, 0xe6, 0xd6, 0xaa, 0x19, 0x71, 0xf8, 0x39,}}, /* Byte value: 0x4b */ + {{0x47, 0x7f, 0xa6, 0x86, 0xba, 0xb0, 0x40, 0x95,}}, /* Byte value: 0x4c */ + {{0x59, 0x4d, 0x69, 0x34, 0x63, 0x25, 0xba, 0x5b,}}, /* Byte value: 0x4d */ + {{0x7e, 0xad, 0x38, 0x16, 0xb0, 0x81, 0x5c, 0x56,}}, /* Byte value: 0x4e */ + {{0xe4, 0xce, 0x3d, 0x05, 0x28, 0xc4, 0x70, 0x8a,}}, /* Byte value: 0x4f */ + {{0xc1, 0x0d, 0x12, 0xef, 0x74, 0x10, 0x39, 0xdf,}}, /* Byte value: 0x50 */ + {{0x45, 0x5c, 0xd8, 0x4e, 0x35, 0xc0, 0xef, 0xcd,}}, /* Byte value: 0x51 */ + {{0x40, 0xea, 0x1b, 0x79, 0x4e, 0x18, 0xc4, 0x51,}}, /* Byte value: 0x52 */ + {{0x9c, 0x06, 0x87, 0x88, 0xca, 0xd5, 0x1e, 0x34,}}, /* Byte value: 0x53 */ + {{0x2d, 0x4f, 0x14, 0x4c, 0x25, 0xd7, 0xb0, 0xf6,}}, /* Byte value: 0x54 */ + {{0xda, 0x89, 0x1e, 0x6a, 0xd6, 0x5d, 0xe8, 0x8d,}}, /* Byte value: 0x55 */ + {{0x28, 0xf9, 0xd7, 0x7b, 0x5e, 0x0f, 0x9b, 0x6a,}}, /* Byte value: 0x56 */ + {{0xc0, 0xfd, 0x2d, 0x8b, 0xd2, 0x28, 0x8f, 0xf3,}}, /* Byte value: 0x57 */ + {{0x76, 0x21, 0x03, 0xb0, 0xc9, 0x82, 0xa5, 0xf5,}}, /* Byte value: 0x58 */ + {{0xdf, 0x3f, 0xdd, 0x5d, 0xad, 0x85, 0xc3, 0x11,}}, /* Byte value: 0x59 */ + {{0x8d, 0x2d, 0xce, 0x63, 0x9e, 0xeb, 0x99, 0x9d,}}, /* Byte value: 0x5a */ + {{0x8b, 0x48, 0x4c, 0xf8, 0xcc, 0x7b, 0xab, 0x75,}}, /* Byte value: 0x5b */ + {{0x15, 0x6d, 0xb5, 0xb8, 0x89, 0xde, 0x1a, 0x19,}}, /* Byte value: 0x5c */ + {{0x5b, 0x6e, 0x17, 0xfc, 0xec, 0x55, 0x15, 0x03,}}, /* Byte value: 0x5d */ + {{0x66, 0xfa, 0x75, 0x3f, 0x3b, 0x84, 0x94, 0x70,}}, /* Byte value: 0x5e */ + {{0xb5, 0x0f, 0x6f, 0x97, 0x32, 0xe2, 0x33, 0x72,}}, /* Byte value: 0x5f */ + {{0xe0, 0x88, 0xc1, 0x56, 0xf5, 0x24, 0xed, 0x3a,}}, /* Byte value: 0x60 */ + {{0x6c, 0x55, 0x30, 0x51, 0xcd, 0xf7, 0xc2, 0x8b,}}, /* Byte value: 0x61 */ + {{0xa2, 0x41, 0xa4, 0xe7, 0x34, 0x4c, 0x86, 0x33,}}, /* Byte value: 0x62 */ + {{0xd4, 0x60, 0xa7, 0x57, 0xfd, 0xce, 0x23, 0xc6,}}, /* Byte value: 0x63 */ + {{0x5a, 0x9e, 0x28, 0x98, 0x4a, 0x6d, 0xa3, 0x2f,}}, /* Byte value: 0x64 */ + {{0xbf, 0xa0, 0x2a, 0xf9, 0xc4, 0x91, 0x65, 0x89,}}, /* Byte value: 0x65 */ + {{0x78, 0xc8, 0xba, 0x8d, 0xe2, 0x11, 0x6e, 0xbe,}}, /* Byte value: 0x66 */ + {{0x1e, 0x32, 0xcf, 0xb2, 0xd9, 0x95, 0xfa, 0xce,}}, /* Byte value: 0x67 */ + {{0x07, 0x95, 0xbd, 0xff, 0xf4, 0xa8, 0x84, 0xc4,}}, /* Byte value: 0x68 */ + {{0x82, 0x34, 0x48, 0x3a, 0x13, 0x40, 0xe4, 0xfa,}}, /* Byte value: 0x69 */ + {{0x68, 0x13, 0xcc, 0x02, 0x10, 0x17, 0x5f, 0x3b,}}, /* Byte value: 0x6a */ + {{0x12, 0xf8, 0x08, 0x47, 0x7d, 0x76, 0x9e, 0xdd,}}, /* Byte value: 0x6b */ + {{0x58, 0xbd, 0x56, 0x50, 0xc5, 0x1d, 0x0c, 0x77,}}, /* Byte value: 0x6c */ + {{0x8f, 0x0e, 0xb0, 0xab, 0x11, 0x9b, 0x36, 0xc5,}}, /* Byte value: 0x6d */ + {{0xe1, 0x78, 0xfe, 0x32, 0x53, 0x1c, 0x5b, 0x16,}}, /* Byte value: 0x6e */ + {{0x36, 0xcb, 0x18, 0xc9, 0x87, 0x9a, 0x61, 0xa4,}}, /* Byte value: 0x6f */ + {{0x74, 0x02, 0x7d, 0x78, 0x46, 0xf2, 0x0a, 0xad,}}, /* Byte value: 0x70 */ + {{0xff, 0x4a, 0x31, 0x80, 0x8a, 0x89, 0xa1, 0xd8,}}, /* Byte value: 0x71 */ + {{0x3a, 0x01, 0xdf, 0x3c, 0x23, 0x79, 0x05, 0xb7,}}, /* Byte value: 0x72 */ + {{0x79, 0x38, 0x85, 0xe9, 0x44, 0x29, 0xd8, 0x92,}}, /* Byte value: 0x73 */ + {{0xdd, 0x1c, 0xa3, 0x95, 0x22, 0xf5, 0x6c, 0x49,}}, /* Byte value: 0x74 */ + {{0x54, 0x77, 0x91, 0xa5, 0x61, 0xfe, 0x68, 0x64,}}, /* Byte value: 0x75 */ + {{0x22, 0x56, 0x92, 0x15, 0xa8, 0x7c, 0xcd, 0x91,}}, /* Byte value: 0x76 */ + {{0x05, 0xb6, 0xc3, 0x37, 0x7b, 0xd8, 0x2b, 0x9c,}}, /* Byte value: 0x77 */ + {{0x88, 0x9b, 0x0d, 0x54, 0xe5, 0x33, 0xb2, 0x01,}}, /* Byte value: 0x78 */ + {{0x06, 0x65, 0x82, 0x9b, 0x52, 0x90, 0x32, 0xe8,}}, /* Byte value: 0x79 */ + {{0x53, 0xe2, 0x2c, 0x5a, 0x95, 0x56, 0xec, 0xa0,}}, /* Byte value: 0x7a */ + {{0x95, 0x7a, 0x83, 0x4a, 0x15, 0xee, 0x51, 0xbb,}}, /* Byte value: 0x7b */ + {{0xe9, 0xf4, 0xc5, 0x94, 0x2a, 0x1f, 0xa2, 0xb5,}}, /* Byte value: 0x7c */ + {{0xec, 0x42, 0x06, 0xa3, 0x51, 0xc7, 0x89, 0x29,}}, /* Byte value: 0x7d */ + {{0x97, 0x59, 0xfd, 0x82, 0x9a, 0x9e, 0xfe, 0xe3,}}, /* Byte value: 0x7e */ + {{0xd1, 0xd6, 0x64, 0x60, 0x86, 0x16, 0x08, 0x5a,}}, /* Byte value: 0x7f */ + {{0x69, 0xe3, 0xf3, 0x66, 0xb6, 0x2f, 0xe9, 0x17,}}, /* Byte value: 0x80 */ + {{0x6a, 0x30, 0xb2, 0xca, 0x9f, 0x67, 0xf0, 0x63,}}, /* Byte value: 0x81 */ + {{0x43, 0x39, 0x5a, 0xd5, 0x67, 0x50, 0xdd, 0x25,}}, /* Byte value: 0x82 */ + {{0x41, 0x1a, 0x24, 0x1d, 0xe8, 0x20, 0x72, 0x7d,}}, /* Byte value: 0x83 */ + {{0xae, 0x8b, 0x63, 0x12, 0x90, 0xaf, 0xe2, 0x20,}}, /* Byte value: 0x84 */ + {{0x0c, 0xca, 0xc7, 0xf5, 0xa4, 0xe3, 0x64, 0x13,}}, /* Byte value: 0x85 */ + {{0x7c, 0x8e, 0x46, 0xde, 0x3f, 0xf1, 0xf3, 0x0e,}}, /* Byte value: 0x86 */ + {{0x5e, 0xd8, 0xd4, 0xcb, 0x97, 0x8d, 0x3e, 0x9f,}}, /* Byte value: 0x87 */ + {{0x44, 0xac, 0xe7, 0x2a, 0x93, 0xf8, 0x59, 0xe1,}}, /* Byte value: 0x88 */ + {{0x25, 0xc3, 0x2f, 0xea, 0x5c, 0xd4, 0x49, 0x55,}}, /* Byte value: 0x89 */ + {{0x09, 0x7c, 0x04, 0xc2, 0xdf, 0x3b, 0x4f, 0x8f,}}, /* Byte value: 0x8a */ + {{0xbd, 0x83, 0x54, 0x31, 0x4b, 0xe1, 0xca, 0xd1,}}, /* Byte value: 0x8b */ + {{0x9f, 0xd5, 0xc6, 0x24, 0xe3, 0x9d, 0x07, 0x40,}}, /* Byte value: 0x8c */ + {{0x2e, 0x9c, 0x55, 0xe0, 0x0c, 0x9f, 0xa9, 0x82,}}, /* Byte value: 0x8d */ + {{0x1b, 0x84, 0x0c, 0x85, 0xa2, 0x4d, 0xd1, 0x52,}}, /* Byte value: 0x8e */ + {{0xd7, 0xb3, 0xe6, 0xfb, 0xd4, 0x86, 0x3a, 0xb2,}}, /* Byte value: 0x8f */ + {{0x8a, 0xb8, 0x73, 0x9c, 0x6a, 0x43, 0x1d, 0x59,}}, /* Byte value: 0x90 */ + {{0x0d, 0x3a, 0xf8, 0x91, 0x02, 0xdb, 0xd2, 0x3f,}}, /* Byte value: 0x91 */ + {{0x50, 0x31, 0x6d, 0xf6, 0xbc, 0x1e, 0xf5, 0xd4,}}, /* Byte value: 0x92 */ + {{0x24, 0x33, 0x10, 0x8e, 0xfa, 0xec, 0xff, 0x79,}}, /* Byte value: 0x93 */ + {{0xf2, 0x70, 0xc9, 0x11, 0x88, 0x52, 0x73, 0xe7,}}, /* Byte value: 0x94 */ + {{0x38, 0x22, 0xa1, 0xf4, 0xac, 0x09, 0xaa, 0xef,}}, /* Byte value: 0x95 */ + {{0x7b, 0x1b, 0xfb, 0x21, 0xcb, 0x59, 0x77, 0xca,}}, /* Byte value: 0x96 */ + {{0xa1, 0x92, 0xe5, 0x4b, 0x1d, 0x04, 0x9f, 0x47,}}, /* Byte value: 0x97 */ + {{0xbe, 0x50, 0x15, 0x9d, 0x62, 0xa9, 0xd3, 0xa5,}}, /* Byte value: 0x98 */ + {{0xa7, 0xf7, 0x67, 0xd0, 0x4f, 0x94, 0xad, 0xaf,}}, /* Byte value: 0x99 */ + {{0x99, 0xb0, 0x44, 0xbf, 0xb1, 0x0d, 0x35, 0xa8,}}, /* Byte value: 0x9a */ + {{0xf1, 0xa3, 0x88, 0xbd, 0xa1, 0x1a, 0x6a, 0x93,}}, /* Byte value: 0x9b */ + {{0xeb, 0xd7, 0xbb, 0x5c, 0xa5, 0x6f, 0x0d, 0xed,}}, /* Byte value: 0x9c */ + {{0x39, 0xd2, 0x9e, 0x90, 0x0a, 0x31, 0x1c, 0xc3,}}, /* Byte value: 0x9d */ + {{0xb7, 0x2c, 0x11, 0x5f, 0xbd, 0x92, 0x9c, 0x2a,}}, /* Byte value: 0x9e */ + {{0x1c, 0x11, 0xb1, 0x7a, 0x56, 0xe5, 0x55, 0x96,}}, /* Byte value: 0x9f */ + {{0x01, 0xf0, 0x3f, 0x64, 0xa6, 0x38, 0xb6, 0x2c,}}, /* Byte value: 0xa0 */ + {{0xef, 0x91, 0x47, 0x0f, 0x78, 0x8f, 0x90, 0x5d,}}, /* Byte value: 0xa1 */ + {{0x1f, 0xc2, 0xf0, 0xd6, 0x7f, 0xad, 0x4c, 0xe2,}}, /* Byte value: 0xa2 */ + {{0x92, 0xef, 0x3e, 0xb5, 0xe1, 0x46, 0xd5, 0x7f,}}, /* Byte value: 0xa3 */ + {{0x1a, 0x74, 0x33, 0xe1, 0x04, 0x75, 0x67, 0x7e,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x85, 0xa1, 0xf5, 0xc5, 0xe7, 0xe8, 0x60, 0x3e,}}, /* Byte value: 0xa6 */ + {{0x5c, 0xfb, 0xaa, 0x03, 0x18, 0xfd, 0x91, 0xc7,}}, /* Byte value: 0xa7 */ + {{0xed, 0xb2, 0x39, 0xc7, 0xf7, 0xff, 0x3f, 0x05,}}, /* Byte value: 0xa8 */ + {{0x56, 0x54, 0xef, 0x6d, 0xee, 0x8e, 0xc7, 0x3c,}}, /* Byte value: 0xa9 */ + {{0xc3, 0x2e, 0x6c, 0x27, 0xfb, 0x60, 0x96, 0x87,}}, /* Byte value: 0xaa */ + {{0x0f, 0x19, 0x86, 0x59, 0x8d, 0xab, 0x7d, 0x67,}}, /* Byte value: 0xab */ + {{0xe8, 0x04, 0xfa, 0xf0, 0x8c, 0x27, 0x14, 0x99,}}, /* Byte value: 0xac */ + {{0xc2, 0xde, 0x53, 0x43, 0x5d, 0x58, 0x20, 0xab,}}, /* Byte value: 0xad */ + {{0xd9, 0x5a, 0x5f, 0xc6, 0xff, 0x15, 0xf1, 0xf9,}}, /* Byte value: 0xae */ + {{0xe6, 0xed, 0x43, 0xcd, 0xa7, 0xb4, 0xdf, 0xd2,}}, /* Byte value: 0xaf */ + {{0xb6, 0xdc, 0x2e, 0x3b, 0x1b, 0xaa, 0x2a, 0x06,}}, /* Byte value: 0xb0 */ + {{0x11, 0x2b, 0x49, 0xeb, 0x54, 0x3e, 0x87, 0xa9,}}, /* Byte value: 0xb1 */ + {{0xc6, 0x98, 0xaf, 0x10, 0x80, 0xb8, 0xbd, 0x1b,}}, /* Byte value: 0xb2 */ + {{0x55, 0x87, 0xae, 0xc1, 0xc7, 0xc6, 0xde, 0x48,}}, /* Byte value: 0xb3 */ + {{0x94, 0x8a, 0xbc, 0x2e, 0xb3, 0xd6, 0xe7, 0x97,}}, /* Byte value: 0xb4 */ + {{0xb1, 0x49, 0x93, 0xc4, 0xef, 0x02, 0xae, 0xc2,}}, /* Byte value: 0xb5 */ + {{0x4b, 0xb5, 0x61, 0x73, 0x1e, 0x53, 0x24, 0x86,}}, /* Byte value: 0xb6 */ + {{0xb9, 0xc5, 0xa8, 0x62, 0x96, 0x01, 0x57, 0x61,}}, /* Byte value: 0xb7 */ + {{0x4f, 0xf3, 0x9d, 0x20, 0xc3, 0xb3, 0xb9, 0x36,}}, /* Byte value: 0xb8 */ + {{0xf6, 0x36, 0x35, 0x42, 0x55, 0xb2, 0xee, 0x57,}}, /* Byte value: 0xb9 */ + {{0x9b, 0x93, 0x3a, 0x77, 0x3e, 0x7d, 0x9a, 0xf0,}}, /* Byte value: 0xba */ + {{0xd2, 0x05, 0x25, 0xcc, 0xaf, 0x5e, 0x11, 0x2e,}}, /* Byte value: 0xbb */ + {{0x7f, 0x5d, 0x07, 0x72, 0x16, 0xb9, 0xea, 0x7a,}}, /* Byte value: 0xbc */ + {{0xde, 0xcf, 0xe2, 0x39, 0x0b, 0xbd, 0x75, 0x3d,}}, /* Byte value: 0xbd */ + {{0x75, 0xf2, 0x42, 0x1c, 0xe0, 0xca, 0xbc, 0x81,}}, /* Byte value: 0xbe */ + {{0x14, 0x9d, 0x8a, 0xdc, 0x2f, 0xe6, 0xac, 0x35,}}, /* Byte value: 0xbf */ + {{0x20, 0x75, 0xec, 0xdd, 0x27, 0x0c, 0x62, 0xc9,}}, /* Byte value: 0xc0 */ + {{0xdc, 0xec, 0x9c, 0xf1, 0x84, 0xcd, 0xda, 0x65,}}, /* Byte value: 0xc1 */ + {{0xac, 0xa8, 0x1d, 0xda, 0x1f, 0xdf, 0x4d, 0x78,}}, /* Byte value: 0xc2 */ + {{0xab, 0x3d, 0xa0, 0x25, 0xeb, 0x77, 0xc9, 0xbc,}}, /* Byte value: 0xc3 */ + {{0xf8, 0xdf, 0x8c, 0x7f, 0x7e, 0x21, 0x25, 0x1c,}}, /* Byte value: 0xc4 */ + {{0xfb, 0x0c, 0xcd, 0xd3, 0x57, 0x69, 0x3c, 0x68,}}, /* Byte value: 0xc5 */ + {{0xcd, 0xc7, 0xd5, 0x1a, 0xd0, 0xf3, 0x5d, 0xcc,}}, /* Byte value: 0xc6 */ + {{0xf0, 0x53, 0xb7, 0xd9, 0x07, 0x22, 0xdc, 0xbf,}}, /* Byte value: 0xc7 */ + {{0xee, 0x61, 0x78, 0x6b, 0xde, 0xb7, 0x26, 0x71,}}, /* Byte value: 0xc8 */ + {{0xce, 0x14, 0x94, 0xb6, 0xf9, 0xbb, 0x44, 0xb8,}}, /* Byte value: 0xc9 */ + {{0xe5, 0x3e, 0x02, 0x61, 0x8e, 0xfc, 0xc6, 0xa6,}}, /* Byte value: 0xca */ + {{0x7d, 0x7e, 0x79, 0xba, 0x99, 0xc9, 0x45, 0x22,}}, /* Byte value: 0xcb */ + {{0xb8, 0x35, 0x97, 0x06, 0x30, 0x39, 0xe1, 0x4d,}}, /* Byte value: 0xcc */ + {{0x04, 0x46, 0xfc, 0x53, 0xdd, 0xe0, 0x9d, 0xb0,}}, /* Byte value: 0xcd */ + {{0xaa, 0xcd, 0x9f, 0x41, 0x4d, 0x4f, 0x7f, 0x90,}}, /* Byte value: 0xce */ + {{0xf5, 0xe5, 0x74, 0xee, 0x7c, 0xfa, 0xf7, 0x23,}}, /* Byte value: 0xcf */ + {{0xc7, 0x68, 0x90, 0x74, 0x26, 0x80, 0x0b, 0x37,}}, /* Byte value: 0xd0 */ + {{0xa0, 0x62, 0xda, 0x2f, 0xbb, 0x3c, 0x29, 0x6b,}}, /* Byte value: 0xd1 */ + {{0x42, 0xc9, 0x65, 0xb1, 0xc1, 0x68, 0x6b, 0x09,}}, /* Byte value: 0xd2 */ + {{0xcb, 0xa2, 0x57, 0x81, 0x82, 0x63, 0x6f, 0x24,}}, /* Byte value: 0xd3 */ + {{0x71, 0xb4, 0xbe, 0x4f, 0x3d, 0x2a, 0x21, 0x31,}}, /* Byte value: 0xd4 */ + {{0xe3, 0x5b, 0x80, 0xfa, 0xdc, 0x6c, 0xf4, 0x4e,}}, /* Byte value: 0xd5 */ + {{0xfd, 0x69, 0x4f, 0x48, 0x05, 0xf9, 0x0e, 0x80,}}, /* Byte value: 0xd6 */ + {{0x90, 0xcc, 0x40, 0x7d, 0x6e, 0x36, 0x7a, 0x27,}}, /* Byte value: 0xd7 */ + {{0x02, 0x23, 0x7e, 0xc8, 0x8f, 0x70, 0xaf, 0x58,}}, /* Byte value: 0xd8 */ + {{0x26, 0x10, 0x6e, 0x46, 0x75, 0x9c, 0x50, 0x21,}}, /* Byte value: 0xd9 */ + {{0x96, 0xa9, 0xc2, 0xe6, 0x3c, 0xa6, 0x48, 0xcf,}}, /* Byte value: 0xda */ + {{0xcf, 0xe4, 0xab, 0xd2, 0x5f, 0x83, 0xf2, 0x94,}}, /* Byte value: 0xdb */ + {{0x89, 0x6b, 0x32, 0x30, 0x43, 0x0b, 0x04, 0x2d,}}, /* Byte value: 0xdc */ + {{0x49, 0x96, 0x1f, 0xbb, 0x91, 0x23, 0x8b, 0xde,}}, /* Byte value: 0xdd */ + {{0x2f, 0x6c, 0x6a, 0x84, 0xaa, 0xa7, 0x1f, 0xae,}}, /* Byte value: 0xde */ + {{0x52, 0x12, 0x13, 0x3e, 0x33, 0x6e, 0x5a, 0x8c,}}, /* Byte value: 0xdf */ + {{0xb4, 0xff, 0x50, 0xf3, 0x94, 0xda, 0x85, 0x5e,}}, /* Byte value: 0xe0 */ + {{0x08, 0x8c, 0x3b, 0xa6, 0x79, 0x03, 0xf9, 0xa3,}}, /* Byte value: 0xe1 */ + {{0x3f, 0xb7, 0x1c, 0x0b, 0x58, 0xa1, 0x2e, 0x2b,}}, /* Byte value: 0xe2 */ + {{0xd6, 0x43, 0xd9, 0x9f, 0x72, 0xbe, 0x8c, 0x9e,}}, /* Byte value: 0xe3 */ + {{0x23, 0xa6, 0xad, 0x71, 0x0e, 0x44, 0x7b, 0xbd,}}, /* Byte value: 0xe4 */ + {{0x4e, 0x03, 0xa2, 0x44, 0x65, 0x8b, 0x0f, 0x1a,}}, /* Byte value: 0xe5 */ + {{0x60, 0x9f, 0xf7, 0xa4, 0x69, 0x14, 0xa6, 0x98,}}, /* Byte value: 0xe6 */ + {{0x0b, 0x5f, 0x7a, 0x0a, 0x50, 0x4b, 0xe0, 0xd7,}}, /* Byte value: 0xe7 */ + {{0xc4, 0xbb, 0xd1, 0xd8, 0x0f, 0xc8, 0x12, 0x43,}}, /* Byte value: 0xe8 */ + {{0x35, 0x18, 0x59, 0x65, 0xae, 0xd2, 0x78, 0xd0,}}, /* Byte value: 0xe9 */ + {{0x0e, 0xe9, 0xb9, 0x3d, 0x2b, 0x93, 0xcb, 0x4b,}}, /* Byte value: 0xea */ + {{0x64, 0xd9, 0x0b, 0xf7, 0xb4, 0xf4, 0x3b, 0x28,}}, /* Byte value: 0xeb */ + {{0x3b, 0xf1, 0xe0, 0x58, 0x85, 0x41, 0xb3, 0x9b,}}, /* Byte value: 0xec */ + {{0x30, 0xae, 0x9a, 0x52, 0xd5, 0x0a, 0x53, 0x4c,}}, /* Byte value: 0xed */ + {{0xc5, 0x4b, 0xee, 0xbc, 0xa9, 0xf0, 0xa4, 0x6f,}}, /* Byte value: 0xee */ + {{0x6b, 0xc0, 0x8d, 0xae, 0x39, 0x5f, 0x46, 0x4f,}}, /* Byte value: 0xef */ + {{0x91, 0x3c, 0x7f, 0x19, 0xc8, 0x0e, 0xcc, 0x0b,}}, /* Byte value: 0xf0 */ + {{0x4c, 0x20, 0xdc, 0x8c, 0xea, 0xfb, 0xa0, 0x42,}}, /* Byte value: 0xf1 */ + {{0xb2, 0x9a, 0xd2, 0x68, 0xc6, 0x4a, 0xb7, 0xb6,}}, /* Byte value: 0xf2 */ + {{0xfe, 0xba, 0x0e, 0xe4, 0x2c, 0xb1, 0x17, 0xf4,}}, /* Byte value: 0xf3 */ + {{0xe7, 0x1d, 0x7c, 0xa9, 0x01, 0x8c, 0x69, 0xfe,}}, /* Byte value: 0xf4 */ + {{0x27, 0xe0, 0x51, 0x22, 0xd3, 0xa4, 0xe6, 0x0d,}}, /* Byte value: 0xf5 */ + {{0x8c, 0xdd, 0xf1, 0x07, 0x38, 0xd3, 0x2f, 0xb1,}}, /* Byte value: 0xf6 */ + {{0x3e, 0x47, 0x23, 0x6f, 0xfe, 0x99, 0x98, 0x07,}}, /* Byte value: 0xf7 */ + {{0x29, 0x09, 0xe8, 0x1f, 0xf8, 0x37, 0x2d, 0x46,}}, /* Byte value: 0xf8 */ + {{0x72, 0x67, 0xff, 0xe3, 0x14, 0x62, 0x38, 0x45,}}, /* Byte value: 0xf9 */ + {{0x2c, 0xbf, 0x2b, 0x28, 0x83, 0xef, 0x06, 0xda,}}, /* Byte value: 0xfa */ + {{0xa4, 0x24, 0x26, 0x7c, 0x66, 0xdc, 0xb4, 0xdb,}}, /* Byte value: 0xfb */ + {{0x8e, 0xfe, 0x8f, 0xcf, 0xb7, 0xa3, 0x80, 0xe9,}}, /* Byte value: 0xfc */ + {{0x51, 0xc1, 0x52, 0x92, 0x1a, 0x26, 0x43, 0xf8,}}, /* Byte value: 0xfd */ + {{0xc8, 0x71, 0x16, 0x2d, 0xab, 0x2b, 0x76, 0x50,}}, /* Byte value: 0xfe */ + {{0x16, 0xbe, 0xf4, 0x14, 0xa0, 0x96, 0x03, 0x6d,}}, /* Byte value: 0xff */ + }, + { /* Matrix row: 15 */ + {{0xfb, 0xd5, 0x0c, 0x7a, 0xc0, 0x80, 0x96, 0x19,}}, /* Byte value: 0x00 */ + {{0x08, 0xe0, 0x8c, 0xb2, 0x17, 0x1a, 0xce, 0x7b,}}, /* Byte value: 0x01 */ + {{0xcb, 0xd0, 0xa2, 0x50, 0xb2, 0xdc, 0x77, 0xc0,}}, /* Byte value: 0x02 */ + {{0x41, 0x10, 0x1a, 0x5e, 0x63, 0x42, 0xd6, 0x69,}}, /* Byte value: 0x03 */ + {{0x38, 0xe5, 0x22, 0x98, 0x65, 0x46, 0x2f, 0xa2,}}, /* Byte value: 0x04 */ + {{0xb3, 0x39, 0x6a, 0x11, 0x6f, 0x4a, 0xe7, 0x3c,}}, /* Byte value: 0x05 */ + {{0x1f, 0xb7, 0xc2, 0x06, 0x7d, 0x56, 0x4d, 0x08,}}, /* Byte value: 0x06 */ + {{0x88, 0xf8, 0x9b, 0xc3, 0xa4, 0x79, 0x73, 0xc7,}}, /* Byte value: 0x07 */ + {{0x32, 0x3d, 0x8d, 0xe7, 0x07, 0xbb, 0x33, 0xb7,}}, /* Byte value: 0x08 */ + {{0x7c, 0x99, 0x8e, 0x18, 0x37, 0x9b, 0xf7, 0x20,}}, /* Byte value: 0x09 */ + {{0x5c, 0x9f, 0xfb, 0x95, 0x6b, 0xf3, 0x49, 0x0f,}}, /* Byte value: 0x0a */ + {{0x02, 0x38, 0x23, 0xcd, 0x75, 0xe7, 0xd2, 0x6e,}}, /* Byte value: 0x0b */ + {{0xec, 0x82, 0x42, 0xce, 0xaa, 0xcc, 0x15, 0x6a,}}, /* Byte value: 0x0c */ + {{0x12, 0x3b, 0xf8, 0x6a, 0x5b, 0xd3, 0x8d, 0x98,}}, /* Byte value: 0x0d */ + {{0x7b, 0xcd, 0x1b, 0x0b, 0x73, 0xe3, 0x2b, 0xa5,}}, /* Byte value: 0x0e */ + {{0x5f, 0xbb, 0x28, 0xdf, 0xc5, 0x86, 0xf2, 0x56,}}, /* Byte value: 0x0f */ + {{0xc1, 0x08, 0x0d, 0x2f, 0xd0, 0x21, 0x6b, 0xd5,}}, /* Byte value: 0x10 */ + {{0x04, 0x70, 0x46, 0x59, 0xea, 0x0d, 0x67, 0xdc,}}, /* Byte value: 0x11 */ + {{0x76, 0x41, 0x21, 0x67, 0x55, 0x66, 0xeb, 0x35,}}, /* Byte value: 0x12 */ + {{0x6c, 0x9a, 0x55, 0xbf, 0x19, 0xaf, 0xa8, 0xd6,}}, /* Byte value: 0x13 */ + {{0x26, 0x4e, 0x10, 0x19, 0xc3, 0x82, 0x0b, 0x9d,}}, /* Byte value: 0x14 */ + {{0x0f, 0xb4, 0x19, 0xa1, 0x53, 0x62, 0x12, 0xfe,}}, /* Byte value: 0x15 */ + {{0x0c, 0x90, 0xca, 0xeb, 0xfd, 0x17, 0xa9, 0xa7,}}, /* Byte value: 0x16 */ + {{0xe0, 0x12, 0x88, 0x25, 0x57, 0xdb, 0xbc, 0xcd,}}, /* Byte value: 0x17 */ + {{0xe6, 0x5a, 0xed, 0xb1, 0xc8, 0x31, 0x09, 0x7f,}}, /* Byte value: 0x18 */ + {{0xd6, 0x5f, 0x43, 0x9b, 0xba, 0x6d, 0xe8, 0xa6,}}, /* Byte value: 0x19 */ + {{0x18, 0xe3, 0x57, 0x15, 0x39, 0x2e, 0x91, 0x8d,}}, /* Byte value: 0x1a */ + {{0x8e, 0xb0, 0xfe, 0x57, 0x3b, 0x93, 0xc6, 0x75,}}, /* Byte value: 0x1b */ + {{0x54, 0x7f, 0x77, 0x27, 0x7c, 0xe9, 0x87, 0x74,}}, /* Byte value: 0x1c */ + {{0xe4, 0x62, 0xce, 0x7c, 0xbd, 0xd6, 0xdb, 0x11,}}, /* Byte value: 0x1d */ + {{0xac, 0x8e, 0xa8, 0x17, 0x12, 0x1c, 0xaa, 0x34,}}, /* Byte value: 0x1e */ + {{0x69, 0xf6, 0xe3, 0x61, 0x28, 0x30, 0xa6, 0x3d,}}, /* Byte value: 0x1f */ + {{0xee, 0xba, 0x61, 0x03, 0xdf, 0x2b, 0xc7, 0x04,}}, /* Byte value: 0x20 */ + {{0xd9, 0xeb, 0x5a, 0x3a, 0xe9, 0x0f, 0xfa, 0x58,}}, /* Byte value: 0x21 */ + {{0xf7, 0x45, 0xc6, 0x91, 0x3d, 0x97, 0x3f, 0xbe,}}, /* Byte value: 0x22 */ + {{0xb9, 0xe1, 0xc5, 0x6e, 0x0d, 0xb7, 0xfb, 0x29,}}, /* Byte value: 0x23 */ + {{0x85, 0x74, 0xa1, 0xaf, 0x82, 0xfc, 0xb3, 0x57,}}, /* Byte value: 0x24 */ + {{0x1e, 0xab, 0x32, 0x81, 0xa6, 0xc4, 0x24, 0x3f,}}, /* Byte value: 0x25 */ + {{0x66, 0x42, 0xfa, 0xc0, 0x7b, 0x52, 0xb4, 0xc3,}}, /* Byte value: 0x26 */ + {{0x30, 0x05, 0xae, 0x2a, 0x72, 0x5c, 0xe1, 0xd9,}}, /* Byte value: 0x27 */ + {{0xd5, 0x7b, 0x90, 0xd1, 0x14, 0x18, 0x53, 0xff,}}, /* Byte value: 0x28 */ + {{0xa2, 0x26, 0x41, 0x31, 0x9a, 0xec, 0xd1, 0xfd,}}, /* Byte value: 0x29 */ + {{0xfc, 0x81, 0x99, 0x69, 0x84, 0xf8, 0x4a, 0x9c,}}, /* Byte value: 0x2a */ + {{0x60, 0x0a, 0x9f, 0x54, 0xe4, 0xb8, 0x01, 0x71,}}, /* Byte value: 0x2b */ + {{0xff, 0xa5, 0x4a, 0x23, 0x2a, 0x8d, 0xf1, 0xc5,}}, /* Byte value: 0x2c */ + {{0x6e, 0xa2, 0x76, 0x72, 0x6c, 0x48, 0x7a, 0xb8,}}, /* Byte value: 0x2d */ + {{0xea, 0xca, 0x27, 0x5a, 0x35, 0x26, 0xa0, 0xd8,}}, /* Byte value: 0x2e */ + {{0x83, 0x3c, 0xc4, 0x3b, 0x1d, 0x16, 0x06, 0xe5,}}, /* Byte value: 0x2f */ + {{0x15, 0x6f, 0x6d, 0x79, 0x1f, 0xab, 0x51, 0x1d,}}, /* Byte value: 0x30 */ + {{0xc0, 0x14, 0xfd, 0xa8, 0x0b, 0xb3, 0x02, 0xe2,}}, /* Byte value: 0x31 */ + {{0xdc, 0x87, 0xec, 0xe4, 0xd8, 0x90, 0xf4, 0xb3,}}, /* Byte value: 0x32 */ + {{0xb4, 0x6d, 0xff, 0x02, 0x2b, 0x32, 0x3b, 0xb9,}}, /* Byte value: 0x33 */ + {{0xeb, 0xd6, 0xd7, 0xdd, 0xee, 0xb4, 0xc9, 0xef,}}, /* Byte value: 0x34 */ + {{0xc8, 0xf4, 0x71, 0x1a, 0x1c, 0xa9, 0xcc, 0x99,}}, /* Byte value: 0x35 */ + {{0x84, 0x68, 0x51, 0x28, 0x59, 0x6e, 0xda, 0x60,}}, /* Byte value: 0x36 */ + {{0xe5, 0x7e, 0x3e, 0xfb, 0x66, 0x44, 0xb2, 0x26,}}, /* Byte value: 0x37 */ + {{0xa7, 0x4a, 0xf7, 0xef, 0xab, 0x73, 0xdf, 0x16,}}, /* Byte value: 0x38 */ + {{0x44, 0x7c, 0xac, 0x80, 0x52, 0xdd, 0xd8, 0x82,}}, /* Byte value: 0x39 */ + {{0xba, 0xc5, 0x16, 0x24, 0xa3, 0xc2, 0x40, 0x70,}}, /* Byte value: 0x3a */ + {{0x62, 0x32, 0xbc, 0x99, 0x91, 0x5f, 0xd3, 0x1f,}}, /* Byte value: 0x3b */ + {{0xf2, 0x29, 0x70, 0x4f, 0x0c, 0x08, 0x31, 0x55,}}, /* Byte value: 0x3c */ + {{0x53, 0x2b, 0xe2, 0x34, 0x38, 0x91, 0x5b, 0xf1,}}, /* Byte value: 0x3d */ + {{0x9a, 0xc3, 0x63, 0xa9, 0xff, 0xaa, 0xfe, 0x5f,}}, /* Byte value: 0x3e */ + {{0x10, 0x03, 0xdb, 0xa7, 0x2e, 0x34, 0x5f, 0xf6,}}, /* Byte value: 0x3f */ + {{0x1d, 0x8f, 0xe1, 0xcb, 0x08, 0xb1, 0x9f, 0x66,}}, /* Byte value: 0x40 */ + {{0x0a, 0xd8, 0xaf, 0x7f, 0x62, 0xfd, 0x1c, 0x15,}}, /* Byte value: 0x41 */ + {{0xd3, 0x33, 0xf5, 0x45, 0x8b, 0xf2, 0xe6, 0x4d,}}, /* Byte value: 0x42 */ + {{0xfd, 0x9d, 0x69, 0xee, 0x5f, 0x6a, 0x23, 0xab,}}, /* Byte value: 0x43 */ + {{0x73, 0x2d, 0x97, 0xb9, 0x64, 0xf9, 0xe5, 0xde,}}, /* Byte value: 0x44 */ + {{0xf1, 0x0d, 0xa3, 0x05, 0xa2, 0x7d, 0x8a, 0x0c,}}, /* Byte value: 0x45 */ + {{0x4a, 0xd4, 0x45, 0xa6, 0xda, 0x2d, 0xa3, 0x4b,}}, /* Byte value: 0x46 */ + {{0xa1, 0x02, 0x92, 0x7b, 0x34, 0x99, 0x6a, 0xa4,}}, /* Byte value: 0x47 */ + {{0xaa, 0xc6, 0xcd, 0x83, 0x8d, 0xf6, 0x1f, 0x86,}}, /* Byte value: 0x48 */ + {{0x74, 0x79, 0x02, 0xaa, 0x20, 0x81, 0x39, 0x5b,}}, /* Byte value: 0x49 */ + {{0x14, 0x73, 0x9d, 0xfe, 0xc4, 0x39, 0x38, 0x2a,}}, /* Byte value: 0x4a */ + {{0x39, 0xf9, 0xd2, 0x1f, 0xbe, 0xd4, 0x46, 0x95,}}, /* Byte value: 0x4b */ + {{0x95, 0x77, 0x7a, 0x08, 0xac, 0xc8, 0xec, 0xa1,}}, /* Byte value: 0x4c */ + {{0x5b, 0xcb, 0x6e, 0x86, 0x2f, 0x8b, 0x95, 0x8a,}}, /* Byte value: 0x4d */ + {{0x56, 0x47, 0x54, 0xea, 0x09, 0x0e, 0x55, 0x1a,}}, /* Byte value: 0x4e */ + {{0x8a, 0xc0, 0xb8, 0x0e, 0xd1, 0x9e, 0xa1, 0xa9,}}, /* Byte value: 0x4f */ + {{0xdf, 0xa3, 0x3f, 0xae, 0x76, 0xe5, 0x4f, 0xea,}}, /* Byte value: 0x50 */ + {{0xcd, 0x98, 0xc7, 0xc4, 0x2d, 0x36, 0xc2, 0x72,}}, /* Byte value: 0x51 */ + {{0x51, 0x13, 0xc1, 0xf9, 0x4d, 0x76, 0x89, 0x9f,}}, /* Byte value: 0x52 */ + {{0x34, 0x75, 0xe8, 0x73, 0x98, 0x51, 0x86, 0x05,}}, /* Byte value: 0x53 */ + {{0xf6, 0x59, 0x36, 0x16, 0xe6, 0x05, 0x56, 0x89,}}, /* Byte value: 0x54 */ + {{0x8d, 0x94, 0x2d, 0x1d, 0x95, 0xe6, 0x7d, 0x2c,}}, /* Byte value: 0x55 */ + {{0x6a, 0xd2, 0x30, 0x2b, 0x86, 0x45, 0x1d, 0x64,}}, /* Byte value: 0x56 */ + {{0xf3, 0x35, 0x80, 0xc8, 0xd7, 0x9a, 0x58, 0x62,}}, /* Byte value: 0x57 */ + {{0xf5, 0x7d, 0xe5, 0x5c, 0x48, 0x70, 0xed, 0xd0,}}, /* Byte value: 0x58 */ + {{0x11, 0x1f, 0x2b, 0x20, 0xf5, 0xa6, 0x36, 0xc1,}}, /* Byte value: 0x59 */ + {{0x9d, 0x97, 0xf6, 0xba, 0xbb, 0xd2, 0x22, 0xda,}}, /* Byte value: 0x5a */ + {{0x75, 0x65, 0xf2, 0x2d, 0xfb, 0x13, 0x50, 0x6c,}}, /* Byte value: 0x5b */ + {{0x19, 0xff, 0xa7, 0x92, 0xe2, 0xbc, 0xf8, 0xba,}}, /* Byte value: 0x5c */ + {{0x03, 0x24, 0xd3, 0x4a, 0xae, 0x75, 0xbb, 0x59,}}, /* Byte value: 0x5d */ + {{0x70, 0x09, 0x44, 0xf3, 0xca, 0x8c, 0x5e, 0x87,}}, /* Byte value: 0x5e */ + {{0x72, 0x31, 0x67, 0x3e, 0xbf, 0x6b, 0x8c, 0xe9,}}, /* Byte value: 0x5f */ + {{0x3a, 0xdd, 0x01, 0x55, 0x10, 0xa1, 0xfd, 0xcc,}}, /* Byte value: 0x60 */ + {{0x8b, 0xdc, 0x48, 0x89, 0x0a, 0x0c, 0xc8, 0x9e,}}, /* Byte value: 0x61 */ + {{0x33, 0x21, 0x7d, 0x60, 0xdc, 0x29, 0x5a, 0x80,}}, /* Byte value: 0x62 */ + {{0xc6, 0x5c, 0x98, 0x3c, 0x94, 0x59, 0xb7, 0x50,}}, /* Byte value: 0x63 */ + {{0x2f, 0xb2, 0x6c, 0x2c, 0x0f, 0x0a, 0xac, 0xd1,}}, /* Byte value: 0x64 */ + {{0x89, 0xe4, 0x6b, 0x44, 0x7f, 0xeb, 0x1a, 0xf0,}}, /* Byte value: 0x65 */ + {{0xbe, 0xb5, 0x50, 0x7d, 0x49, 0xcf, 0x27, 0xac,}}, /* Byte value: 0x66 */ + {{0xce, 0xbc, 0x14, 0x8e, 0x83, 0x43, 0x79, 0x2b,}}, /* Byte value: 0x67 */ + {{0xc4, 0x64, 0xbb, 0xf1, 0xe1, 0xbe, 0x65, 0x3e,}}, /* Byte value: 0x68 */ + {{0xfa, 0xc9, 0xfc, 0xfd, 0x1b, 0x12, 0xff, 0x2e,}}, /* Byte value: 0x69 */ + {{0x3b, 0xc1, 0xf1, 0xd2, 0xcb, 0x33, 0x94, 0xfb,}}, /* Byte value: 0x6a */ + {{0xdd, 0x9b, 0x1c, 0x63, 0x03, 0x02, 0x9d, 0x84,}}, /* Byte value: 0x6b */ + {{0x77, 0x5d, 0xd1, 0xe0, 0x8e, 0xf4, 0x82, 0x02,}}, /* Byte value: 0x6c */ + {{0xc5, 0x78, 0x4b, 0x76, 0x3a, 0x2c, 0x0c, 0x09,}}, /* Byte value: 0x6d */ + {{0x16, 0x4b, 0xbe, 0x33, 0xb1, 0xde, 0xea, 0x44,}}, /* Byte value: 0x6e */ + {{0xa4, 0x6e, 0x24, 0xa5, 0x05, 0x06, 0x64, 0x4f,}}, /* Byte value: 0x6f */ + {{0xad, 0x92, 0x58, 0x90, 0xc9, 0x8e, 0xc3, 0x03,}}, /* Byte value: 0x70 */ + {{0xd8, 0xf7, 0xaa, 0xbd, 0x32, 0x9d, 0x93, 0x6f,}}, /* Byte value: 0x71 */ + {{0xb7, 0x49, 0x2c, 0x48, 0x85, 0x47, 0x80, 0xe0,}}, /* Byte value: 0x72 */ + {{0x92, 0x23, 0xef, 0x1b, 0xe8, 0xb0, 0x30, 0x24,}}, /* Byte value: 0x73 */ + {{0x49, 0xf0, 0x96, 0xec, 0x74, 0x58, 0x18, 0x12,}}, /* Byte value: 0x74 */ + {{0x64, 0x7a, 0xd9, 0x0d, 0x0e, 0xb5, 0x66, 0xad,}}, /* Byte value: 0x75 */ + {{0x91, 0x07, 0x3c, 0x51, 0x46, 0xc5, 0x8b, 0x7d,}}, /* Byte value: 0x76 */ + {{0x9c, 0x8b, 0x06, 0x3d, 0x60, 0x40, 0x4b, 0xed,}}, /* Byte value: 0x77 */ + {{0x01, 0x1c, 0xf0, 0x87, 0xdb, 0x92, 0x69, 0x37,}}, /* Byte value: 0x78 */ + {{0xe8, 0xf2, 0x04, 0x97, 0x40, 0xc1, 0x72, 0xb6,}}, /* Byte value: 0x79 */ + {{0xa0, 0x1e, 0x62, 0xfc, 0xef, 0x0b, 0x03, 0x93,}}, /* Byte value: 0x7a */ + {{0xbb, 0xd9, 0xe6, 0xa3, 0x78, 0x50, 0x29, 0x47,}}, /* Byte value: 0x7b */ + {{0xb5, 0x71, 0x0f, 0x85, 0xf0, 0xa0, 0x52, 0x8e,}}, /* Byte value: 0x7c */ + {{0x29, 0xfa, 0x09, 0xb8, 0x90, 0xe0, 0x19, 0x63,}}, /* Byte value: 0x7d */ + {{0xe3, 0x36, 0x5b, 0x6f, 0xf9, 0xae, 0x07, 0x94,}}, /* Byte value: 0x7e */ + {{0x5a, 0xd7, 0x9e, 0x01, 0xf4, 0x19, 0xfc, 0xbd,}}, /* Byte value: 0x7f */ + {{0x17, 0x57, 0x4e, 0xb4, 0x6a, 0x4c, 0x83, 0x73,}}, /* Byte value: 0x80 */ + {{0x63, 0x2e, 0x4c, 0x1e, 0x4a, 0xcd, 0xba, 0x28,}}, /* Byte value: 0x81 */ + {{0x25, 0x6a, 0xc3, 0x53, 0x6d, 0xf7, 0xb0, 0xc4,}}, /* Byte value: 0x82 */ + {{0x7d, 0x85, 0x7e, 0x9f, 0xec, 0x09, 0x9e, 0x17,}}, /* Byte value: 0x83 */ + {{0x20, 0x06, 0x75, 0x8d, 0x5c, 0x68, 0xbe, 0x2f,}}, /* Byte value: 0x84 */ + {{0x13, 0x27, 0x08, 0xed, 0x80, 0x41, 0xe4, 0xaf,}}, /* Byte value: 0x85 */ + {{0x0e, 0xa8, 0xe9, 0x26, 0x88, 0xf0, 0x7b, 0xc9,}}, /* Byte value: 0x86 */ + {{0x9f, 0xaf, 0xd5, 0x77, 0xce, 0x35, 0xf0, 0xb4,}}, /* Byte value: 0x87 */ + {{0xe1, 0x0e, 0x78, 0xa2, 0x8c, 0x49, 0xd5, 0xfa,}}, /* Byte value: 0x88 */ + {{0x55, 0x63, 0x87, 0xa0, 0xa7, 0x7b, 0xee, 0x43,}}, /* Byte value: 0x89 */ + {{0x8f, 0xac, 0x0e, 0xd0, 0xe0, 0x01, 0xaf, 0x42,}}, /* Byte value: 0x8a */ + {{0xd1, 0x0b, 0xd6, 0x88, 0xfe, 0x15, 0x34, 0x23,}}, /* Byte value: 0x8b */ + {{0x40, 0x0c, 0xea, 0xd9, 0xb8, 0xd0, 0xbf, 0x5e,}}, /* Byte value: 0x8c */ + {{0x82, 0x20, 0x34, 0xbc, 0xc6, 0x84, 0x6f, 0xd2,}}, /* Byte value: 0x8d */ + {{0x52, 0x37, 0x12, 0xb3, 0xe3, 0x03, 0x32, 0xc6,}}, /* Byte value: 0x8e */ + {{0xb2, 0x25, 0x9a, 0x96, 0xb4, 0xd8, 0x8e, 0x0b,}}, /* Byte value: 0x8f */ + {{0x59, 0xf3, 0x4d, 0x4b, 0x5a, 0x6c, 0x47, 0xe4,}}, /* Byte value: 0x90 */ + {{0x3f, 0xb1, 0xb7, 0x8b, 0x21, 0x3e, 0xf3, 0x27,}}, /* Byte value: 0x91 */ + {{0xd4, 0x67, 0x60, 0x56, 0xcf, 0x8a, 0x3a, 0xc8,}}, /* Byte value: 0x92 */ + {{0x79, 0xf5, 0x38, 0xc6, 0x06, 0x04, 0xf9, 0xcb,}}, /* Byte value: 0x93 */ + {{0xe7, 0x46, 0x1d, 0x36, 0x13, 0xa3, 0x60, 0x48,}}, /* Byte value: 0x94 */ + {{0xef, 0xa6, 0x91, 0x84, 0x04, 0xb9, 0xae, 0x33,}}, /* Byte value: 0x95 */ + {{0xca, 0xcc, 0x52, 0xd7, 0x69, 0x4e, 0x1e, 0xf7,}}, /* Byte value: 0x96 */ + {{0x47, 0x58, 0x7f, 0xca, 0xfc, 0xa8, 0x63, 0xdb,}}, /* Byte value: 0x97 */ + {{0xa5, 0x72, 0xd4, 0x22, 0xde, 0x94, 0x0d, 0x78,}}, /* Byte value: 0x98 */ + {{0xaf, 0xaa, 0x7b, 0x5d, 0xbc, 0x69, 0x11, 0x6d,}}, /* Byte value: 0x99 */ + {{0xa8, 0xfe, 0xee, 0x4e, 0xf8, 0x11, 0xcd, 0xe8,}}, /* Byte value: 0x9a */ + {{0x93, 0x3f, 0x1f, 0x9c, 0x33, 0x22, 0x59, 0x13,}}, /* Byte value: 0x9b */ + {{0xed, 0x9e, 0xb2, 0x49, 0x71, 0x5e, 0x7c, 0x5d,}}, /* Byte value: 0x9c */ + {{0xc3, 0x30, 0x2e, 0xe2, 0xa5, 0xc6, 0xb9, 0xbb,}}, /* Byte value: 0x9d */ + {{0x2a, 0xde, 0xda, 0xf2, 0x3e, 0x95, 0xa2, 0x3a,}}, /* Byte value: 0x9e */ + {{0x96, 0x53, 0xa9, 0x42, 0x02, 0xbd, 0x57, 0xf8,}}, /* Byte value: 0x9f */ + {{0x2c, 0x96, 0xbf, 0x66, 0xa1, 0x7f, 0x17, 0x88,}}, /* Byte value: 0xa0 */ + {{0x5d, 0x83, 0x0b, 0x12, 0xb0, 0x61, 0x20, 0x38,}}, /* Byte value: 0xa1 */ + {{0xe2, 0x2a, 0xab, 0xe8, 0x22, 0x3c, 0x6e, 0xa3,}}, /* Byte value: 0xa2 */ + {{0x7f, 0xbd, 0x5d, 0x52, 0x99, 0xee, 0x4c, 0x79,}}, /* Byte value: 0xa3 */ + {{0x7e, 0xa1, 0xad, 0xd5, 0x42, 0x7c, 0x25, 0x4e,}}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}}, /* Byte value: 0xa5 */ + {{0x3e, 0xad, 0x47, 0x0c, 0xfa, 0xac, 0x9a, 0x10,}}, /* Byte value: 0xa6 */ + {{0xc7, 0x40, 0x68, 0xbb, 0x4f, 0xcb, 0xde, 0x67,}}, /* Byte value: 0xa7 */ + {{0x05, 0x6c, 0xb6, 0xde, 0x31, 0x9f, 0x0e, 0xeb,}}, /* Byte value: 0xa8 */ + {{0x3c, 0x95, 0x64, 0xc1, 0x8f, 0x4b, 0x48, 0x7e,}}, /* Byte value: 0xa9 */ + {{0x87, 0x4c, 0x82, 0x62, 0xf7, 0x1b, 0x61, 0x39,}}, /* Byte value: 0xaa */ + {{0x67, 0x5e, 0x0a, 0x47, 0xa0, 0xc0, 0xdd, 0xf4,}}, /* Byte value: 0xab */ + {{0x99, 0xe7, 0xb0, 0xe3, 0x51, 0xdf, 0x45, 0x06,}}, /* Byte value: 0xac */ + {{0xab, 0xda, 0x3d, 0x04, 0x56, 0x64, 0x76, 0xb1,}}, /* Byte value: 0xad */ + {{0xf9, 0xed, 0x2f, 0xb7, 0xb5, 0x67, 0x44, 0x77,}}, /* Byte value: 0xae */ + {{0xd2, 0x2f, 0x05, 0xc2, 0x50, 0x60, 0x8f, 0x7a,}}, /* Byte value: 0xaf */ + {{0x06, 0x48, 0x65, 0x94, 0x9f, 0xea, 0xb5, 0xb2,}}, /* Byte value: 0xb0 */ + {{0xa9, 0xe2, 0x1e, 0xc9, 0x23, 0x83, 0xa4, 0xdf,}}, /* Byte value: 0xb1 */ + {{0x1b, 0xc7, 0x84, 0x5f, 0x97, 0x5b, 0x2a, 0xd4,}}, /* Byte value: 0xb2 */ + {{0x48, 0xec, 0x66, 0x6b, 0xaf, 0xca, 0x71, 0x25,}}, /* Byte value: 0xb3 */ + {{0x97, 0x4f, 0x59, 0xc5, 0xd9, 0x2f, 0x3e, 0xcf,}}, /* Byte value: 0xb4 */ + {{0xc2, 0x2c, 0xde, 0x65, 0x7e, 0x54, 0xd0, 0x8c,}}, /* Byte value: 0xb5 */ + {{0x86, 0x50, 0x72, 0xe5, 0x2c, 0x89, 0x08, 0x0e,}}, /* Byte value: 0xb6 */ + {{0x61, 0x16, 0x6f, 0xd3, 0x3f, 0x2a, 0x68, 0x46,}}, /* Byte value: 0xb7 */ + {{0x36, 0x4d, 0xcb, 0xbe, 0xed, 0xb6, 0x54, 0x6b,}}, /* Byte value: 0xb8 */ + {{0x57, 0x5b, 0xa4, 0x6d, 0xd2, 0x9c, 0x3c, 0x2d,}}, /* Byte value: 0xb9 */ + {{0xf0, 0x11, 0x53, 0x82, 0x79, 0xef, 0xe3, 0x3b,}}, /* Byte value: 0xba */ + {{0x2e, 0xae, 0x9c, 0xab, 0xd4, 0x98, 0xc5, 0xe6,}}, /* Byte value: 0xbb */ + {{0x7a, 0xd1, 0xeb, 0x8c, 0xa8, 0x71, 0x42, 0x92,}}, /* Byte value: 0xbc */ + {{0x3d, 0x89, 0x94, 0x46, 0x54, 0xd9, 0x21, 0x49,}}, /* Byte value: 0xbd */ + {{0x81, 0x04, 0xe7, 0xf6, 0x68, 0xf1, 0xd4, 0x8b,}}, /* Byte value: 0xbe */ + {{0x35, 0x69, 0x18, 0xf4, 0x43, 0xc3, 0xef, 0x32,}}, /* Byte value: 0xbf */ + {{0xc9, 0xe8, 0x81, 0x9d, 0xc7, 0x3b, 0xa5, 0xae,}}, /* Byte value: 0xc0 */ + {{0x65, 0x66, 0x29, 0x8a, 0xd5, 0x27, 0x0f, 0x9a,}}, /* Byte value: 0xc1 */ + {{0x78, 0xe9, 0xc8, 0x41, 0xdd, 0x96, 0x90, 0xfc,}}, /* Byte value: 0xc2 */ + {{0xbc, 0x8d, 0x73, 0xb0, 0x3c, 0x28, 0xf5, 0xc2,}}, /* Byte value: 0xc3 */ + {{0x1c, 0x93, 0x11, 0x4c, 0xd3, 0x23, 0xf6, 0x51,}}, /* Byte value: 0xc4 */ + {{0x68, 0xea, 0x13, 0xe6, 0xf3, 0xa2, 0xcf, 0x0a,}}, /* Byte value: 0xc5 */ + {{0xcc, 0x84, 0x37, 0x43, 0xf6, 0xa4, 0xab, 0x45,}}, /* Byte value: 0xc6 */ + {{0xbf, 0xa9, 0xa0, 0xfa, 0x92, 0x5d, 0x4e, 0x9b,}}, /* Byte value: 0xc7 */ + {{0x71, 0x15, 0xb4, 0x74, 0x11, 0x1e, 0x37, 0xb0,}}, /* Byte value: 0xc8 */ + {{0xb8, 0xfd, 0x35, 0xe9, 0xd6, 0x25, 0x92, 0x1e,}}, /* Byte value: 0xc9 */ + {{0xa6, 0x56, 0x07, 0x68, 0x70, 0xe1, 0xb6, 0x21,}}, /* Byte value: 0xca */ + {{0x22, 0x3e, 0x56, 0x40, 0x29, 0x8f, 0x6c, 0x41,}}, /* Byte value: 0xcb */ + {{0x4d, 0x80, 0xd0, 0xb5, 0x9e, 0x55, 0x7f, 0xce,}}, /* Byte value: 0xcc */ + {{0xb0, 0x1d, 0xb9, 0x5b, 0xc1, 0x3f, 0x5c, 0x65,}}, /* Byte value: 0xcd */ + {{0x90, 0x1b, 0xcc, 0xd6, 0x9d, 0x57, 0xe2, 0x4a,}}, /* Byte value: 0xce */ + {{0x23, 0x22, 0xa6, 0xc7, 0xf2, 0x1d, 0x05, 0x76,}}, /* Byte value: 0xcf */ + {{0x37, 0x51, 0x3b, 0x39, 0x36, 0x24, 0x3d, 0x5c,}}, /* Byte value: 0xd0 */ + {{0x6b, 0xce, 0xc0, 0xac, 0x5d, 0xd7, 0x74, 0x53,}}, /* Byte value: 0xd1 */ + {{0x09, 0xfc, 0x7c, 0x35, 0xcc, 0x88, 0xa7, 0x4c,}}, /* Byte value: 0xd2 */ + {{0x24, 0x76, 0x33, 0xd4, 0xb6, 0x65, 0xd9, 0xf3,}}, /* Byte value: 0xd3 */ + {{0x31, 0x19, 0x5e, 0xad, 0xa9, 0xce, 0x88, 0xee,}}, /* Byte value: 0xd4 */ + {{0x4e, 0xa4, 0x03, 0xff, 0x30, 0x20, 0xc4, 0x97,}}, /* Byte value: 0xd5 */ + {{0x80, 0x18, 0x17, 0x71, 0xb3, 0x63, 0xbd, 0xbc,}}, /* Byte value: 0xd6 */ + {{0x27, 0x52, 0xe0, 0x9e, 0x18, 0x10, 0x62, 0xaa,}}, /* Byte value: 0xd7 */ + {{0x58, 0xef, 0xbd, 0xcc, 0x81, 0xfe, 0x2e, 0xd3,}}, /* Byte value: 0xd8 */ + {{0x21, 0x1a, 0x85, 0x0a, 0x87, 0xfa, 0xd7, 0x18,}}, /* Byte value: 0xd9 */ + {{0xcf, 0xa0, 0xe4, 0x09, 0x58, 0xd1, 0x10, 0x1c,}}, /* Byte value: 0xda */ + {{0x94, 0x6b, 0x8a, 0x8f, 0x77, 0x5a, 0x85, 0x96,}}, /* Byte value: 0xdb */ + {{0x2d, 0x8a, 0x4f, 0xe1, 0x7a, 0xed, 0x7e, 0xbf,}}, /* Byte value: 0xdc */ + {{0xde, 0xbf, 0xcf, 0x29, 0xad, 0x77, 0x26, 0xdd,}}, /* Byte value: 0xdd */ + {{0xae, 0xb6, 0x8b, 0xda, 0x67, 0xfb, 0x78, 0x5a,}}, /* Byte value: 0xde */ + {{0x8c, 0x88, 0xdd, 0x9a, 0x4e, 0x74, 0x14, 0x1b,}}, /* Byte value: 0xdf */ + {{0x5e, 0xa7, 0xd8, 0x58, 0x1e, 0x14, 0x9b, 0x61,}}, /* Byte value: 0xe0 */ + {{0xa3, 0x3a, 0xb1, 0xb6, 0x41, 0x7e, 0xb8, 0xca,}}, /* Byte value: 0xe1 */ + {{0x2b, 0xc2, 0x2a, 0x75, 0xe5, 0x07, 0xcb, 0x0d,}}, /* Byte value: 0xe2 */ + {{0x9e, 0xb3, 0x25, 0xf0, 0x15, 0xa7, 0x99, 0x83,}}, /* Byte value: 0xe3 */ + {{0xbd, 0x91, 0x83, 0x37, 0xe7, 0xba, 0x9c, 0xf5,}}, /* Byte value: 0xe4 */ + {{0x1a, 0xdb, 0x74, 0xd8, 0x4c, 0xc9, 0x43, 0xe3,}}, /* Byte value: 0xe5 */ + {{0x98, 0xfb, 0x40, 0x64, 0x8a, 0x4d, 0x2c, 0x31,}}, /* Byte value: 0xe6 */ + {{0xd7, 0x43, 0xb3, 0x1c, 0x61, 0xff, 0x81, 0x91,}}, /* Byte value: 0xe7 */ + {{0x43, 0x28, 0x39, 0x93, 0x16, 0xa5, 0x04, 0x07,}}, /* Byte value: 0xe8 */ + {{0xd0, 0x17, 0x26, 0x0f, 0x25, 0x87, 0x5d, 0x14,}}, /* Byte value: 0xe9 */ + {{0x4b, 0xc8, 0xb5, 0x21, 0x01, 0xbf, 0xca, 0x7c,}}, /* Byte value: 0xea */ + {{0x28, 0xe6, 0xf9, 0x3f, 0x4b, 0x72, 0x70, 0x54,}}, /* Byte value: 0xeb */ + {{0x9b, 0xdf, 0x93, 0x2e, 0x24, 0x38, 0x97, 0x68,}}, /* Byte value: 0xec */ + {{0x4c, 0x9c, 0x20, 0x32, 0x45, 0xc7, 0x16, 0xf9,}}, /* Byte value: 0xed */ + {{0x6f, 0xbe, 0x86, 0xf5, 0xb7, 0xda, 0x13, 0x8f,}}, /* Byte value: 0xee */ + {{0x4f, 0xb8, 0xf3, 0x78, 0xeb, 0xb2, 0xad, 0xa0,}}, /* Byte value: 0xef */ + {{0x0b, 0xc4, 0x5f, 0xf8, 0xb9, 0x6f, 0x75, 0x22,}}, /* Byte value: 0xf0 */ + {{0x42, 0x34, 0xc9, 0x14, 0xcd, 0x37, 0x6d, 0x30,}}, /* Byte value: 0xf1 */ + {{0xb6, 0x55, 0xdc, 0xcf, 0x5e, 0xd5, 0xe9, 0xd7,}}, /* Byte value: 0xf2 */ + {{0xf4, 0x61, 0x15, 0xdb, 0x93, 0xe2, 0x84, 0xe7,}}, /* Byte value: 0xf3 */ + {{0xfe, 0xb9, 0xba, 0xa4, 0xf1, 0x1f, 0x98, 0xf2,}}, /* Byte value: 0xf4 */ + {{0x0d, 0x8c, 0x3a, 0x6c, 0x26, 0x85, 0xc0, 0x90,}}, /* Byte value: 0xf5 */ + {{0xb1, 0x01, 0x49, 0xdc, 0x1a, 0xad, 0x35, 0x52,}}, /* Byte value: 0xf6 */ + {{0x07, 0x54, 0x95, 0x13, 0x44, 0x78, 0xdc, 0x85,}}, /* Byte value: 0xf7 */ + {{0x46, 0x44, 0x8f, 0x4d, 0x27, 0x3a, 0x0a, 0xec,}}, /* Byte value: 0xf8 */ + {{0x45, 0x60, 0x5c, 0x07, 0x89, 0x4f, 0xb1, 0xb5,}}, /* Byte value: 0xf9 */ + {{0xda, 0xcf, 0x89, 0x70, 0x47, 0x7a, 0x41, 0x01,}}, /* Byte value: 0xfa */ + {{0xdb, 0xd3, 0x79, 0xf7, 0x9c, 0xe8, 0x28, 0x36,}}, /* Byte value: 0xfb */ + {{0xe9, 0xee, 0xf4, 0x10, 0x9b, 0x53, 0x1b, 0x81,}}, /* Byte value: 0xfc */ + {{0xf8, 0xf1, 0xdf, 0x30, 0x6e, 0xf5, 0x2d, 0x40,}}, /* Byte value: 0xfd */ + {{0x50, 0x0f, 0x31, 0x7e, 0x96, 0xe4, 0xe0, 0xa8,}}, /* Byte value: 0xfe */ + {{0x6d, 0x86, 0xa5, 0x38, 0xc2, 0x3d, 0xc1, 0xe1,}}, /* Byte value: 0xff */ + }, +}; + +const union qword_t precomputedLSTableRight[16][256] = { + { /* Matrix row: 0 */ + {{0x19, 0x11, 0x87, 0x93, 0x1b, 0xc9, 0xae, 0xb5, }}, /* Byte value: 0x00 */ + {{0x7b, 0x32, 0xfc, 0xab, 0xf8, 0xfe, 0xf2, 0x0a, }}, /* Byte value: 0x01 */ + {{0xc0, 0xbd, 0xca, 0xef, 0x4e, 0x88, 0xc7, 0x89, }}, /* Byte value: 0x02 */ + {{0x69, 0xc4, 0x12, 0x3c, 0xd3, 0x93, 0x13, 0xc0, }}, /* Byte value: 0x03 */ + {{0xa2, 0x9e, 0xb1, 0xd7, 0xad, 0xbf, 0x9b, 0x36, }}, /* Byte value: 0x04 */ + {{0x3c, 0x70, 0x97, 0x29, 0x2f, 0xcb, 0xc0, 0xef, }}, /* Byte value: 0x05 */ + {{0x08, 0x35, 0x78, 0xfd, 0x96, 0x0f, 0xfe, 0x68, }}, /* Byte value: 0x06 */ + {{0xc7, 0x94, 0xe7, 0x89, 0xa3, 0xc5, 0x09, 0xaa, }}, /* Byte value: 0x07 */ + {{0xb7, 0x41, 0x72, 0x26, 0x6b, 0x9f, 0xb4, 0xdf, }}, /* Byte value: 0x08 */ + {{0x20, 0xd4, 0x23, 0x72, 0x1d, 0x3c, 0x7e, 0x63, }}, /* Byte value: 0x09 */ + {{0x0f, 0x1c, 0x55, 0x9b, 0x7b, 0x42, 0x30, 0x4b, }}, /* Byte value: 0x0a */ + {{0x6e, 0xed, 0x3f, 0x5a, 0x3e, 0xde, 0xdd, 0xe3, }}, /* Byte value: 0x0b */ + {{0x6a, 0x16, 0x03, 0xc5, 0x75, 0x38, 0xa2, 0xd7, }}, /* Byte value: 0x0c */ + {{0x98, 0x89, 0x04, 0xcf, 0x0d, 0xe1, 0xfa, 0xf7, }}, /* Byte value: 0x0d */ + {{0xa5, 0xb7, 0x9c, 0xb1, 0x40, 0xf2, 0x55, 0x15, }}, /* Byte value: 0x0e */ + {{0x56, 0x66, 0x94, 0xec, 0x5a, 0xf3, 0x62, 0x38, }}, /* Byte value: 0x0f */ + {{0xd5, 0x62, 0x09, 0x1e, 0x88, 0xa8, 0xe8, 0x60, }}, /* Byte value: 0x10 */ + {{0xdc, 0x19, 0x7e, 0xb4, 0x7c, 0x7f, 0x79, 0x05, }}, /* Byte value: 0x11 */ + {{0x35, 0x0b, 0xe0, 0x83, 0xdb, 0x1c, 0x51, 0x8a, }}, /* Byte value: 0x12 */ + {{0xd6, 0xb0, 0x18, 0xe7, 0x2e, 0x03, 0x59, 0x77, }}, /* Byte value: 0x13 */ + {{0x9d, 0x3c, 0x37, 0x07, 0x24, 0xdf, 0xea, 0xce, }}, /* Byte value: 0x14 */ + {{0xfe, 0x51, 0x43, 0x68, 0xa5, 0x30, 0xd9, 0x7c, }}, /* Byte value: 0x15 */ + {{0xa7, 0x2b, 0x82, 0x1f, 0x84, 0x81, 0x8b, 0x0f, }}, /* Byte value: 0x16 */ + {{0xcd, 0x3d, 0x81, 0xda, 0xf1, 0xb9, 0x29, 0xd8, }}, /* Byte value: 0x17 */ + {{0x7f, 0xc9, 0xc0, 0x34, 0xb3, 0x18, 0x8d, 0x3e, }}, /* Byte value: 0x18 */ + {{0xa6, 0x65, 0x8d, 0x48, 0xe6, 0x59, 0xe4, 0x02, }}, /* Byte value: 0x19 */ + {{0x8d, 0x56, 0xc7, 0x3e, 0xcb, 0xc1, 0xd5, 0x1e, }}, /* Byte value: 0x1a */ + {{0x75, 0x60, 0xa6, 0x67, 0xe1, 0x64, 0xad, 0x4c, }}, /* Byte value: 0x1b */ + {{0x74, 0x2e, 0xa9, 0x30, 0x83, 0xbc, 0xc2, 0x41, }}, /* Byte value: 0x1c */ + {{0x11, 0x24, 0xff, 0x6e, 0x8d, 0xc6, 0x50, 0xdd, }}, /* Byte value: 0x1d */ + {{0x34, 0x45, 0xef, 0xd4, 0xb9, 0xc4, 0x3e, 0x87, }}, /* Byte value: 0x1e */ + {{0x3d, 0x3e, 0x98, 0x7e, 0x4d, 0x13, 0xaf, 0xe2, }}, /* Byte value: 0x1f */ + {{0x04, 0xfb, 0x3c, 0x9f, 0x4b, 0xe6, 0x7f, 0x34, }}, /* Byte value: 0x20 */ + {{0x58, 0x34, 0xce, 0x20, 0x43, 0x69, 0x3d, 0x7e, }}, /* Byte value: 0x21 */ + {{0xbe, 0x3a, 0x05, 0x8c, 0x9f, 0x48, 0x25, 0xba, }}, /* Byte value: 0x22 */ + {{0x29, 0xaf, 0x54, 0xd8, 0xe9, 0xeb, 0xef, 0x06, }}, /* Byte value: 0x23 */ + {{0x57, 0x28, 0x9b, 0xbb, 0x38, 0x2b, 0x0d, 0x35, }}, /* Byte value: 0x24 */ + {{0x3f, 0xa2, 0x86, 0xd0, 0x89, 0x60, 0x71, 0xf8, }}, /* Byte value: 0x25 */ + {{0xc3, 0x6f, 0xdb, 0x16, 0xe8, 0x23, 0x76, 0x9e, }}, /* Byte value: 0x26 */ + {{0xd9, 0xac, 0x4d, 0x7c, 0x55, 0x41, 0x69, 0x3c, }}, /* Byte value: 0x27 */ + {{0xff, 0x1f, 0x4c, 0x3f, 0xc7, 0xe8, 0xb6, 0x71, }}, /* Byte value: 0x28 */ + {{0xfd, 0x83, 0x52, 0x91, 0x03, 0x9b, 0x68, 0x6b, }}, /* Byte value: 0x29 */ + {{0x9c, 0x72, 0x38, 0x50, 0x46, 0x07, 0x85, 0xc3, }}, /* Byte value: 0x2a */ + {{0x71, 0x9b, 0x9a, 0xf8, 0xaa, 0x82, 0xd2, 0x78, }}, /* Byte value: 0x2b */ + {{0xc5, 0x08, 0xf9, 0x27, 0x67, 0xb6, 0xd7, 0xb0, }}, /* Byte value: 0x2c */ + {{0xb8, 0x5d, 0x27, 0xbd, 0x10, 0xdd, 0x84, 0x94, }}, /* Byte value: 0x2d */ + {{0xd8, 0xe2, 0x42, 0x2b, 0x37, 0x99, 0x06, 0x31, }}, /* Byte value: 0x2e */ + {{0xe5, 0xdc, 0xda, 0x55, 0x7a, 0x8a, 0xa9, 0xd3, }}, /* Byte value: 0x2f */ + {{0x1d, 0xea, 0xbb, 0x0c, 0x50, 0x2f, 0xd1, 0x81, }}, /* Byte value: 0x30 */ + {{0xe2, 0xf5, 0xf7, 0x33, 0x97, 0xc7, 0x67, 0xf0, }}, /* Byte value: 0x31 */ + {{0xb3, 0xba, 0x4e, 0xb9, 0x20, 0x79, 0xcb, 0xeb, }}, /* Byte value: 0x32 */ + {{0xb9, 0x13, 0x28, 0xea, 0x72, 0x05, 0xeb, 0x99, }}, /* Byte value: 0x33 */ + {{0xef, 0x75, 0xbc, 0x06, 0x28, 0xf6, 0x89, 0xa1, }}, /* Byte value: 0x34 */ + {{0x99, 0xc7, 0x0b, 0x98, 0x6f, 0x39, 0x95, 0xfa, }}, /* Byte value: 0x35 */ + {{0x60, 0xbf, 0x65, 0x96, 0x27, 0x44, 0x82, 0xa5, }}, /* Byte value: 0x36 */ + {{0x26, 0xb3, 0x01, 0x43, 0x92, 0xa9, 0xdf, 0x4d, }}, /* Byte value: 0x37 */ + {{0x16, 0x0d, 0xd2, 0x08, 0x60, 0x8b, 0x9e, 0xfe, }}, /* Byte value: 0x38 */ + {{0x82, 0x4a, 0x92, 0xa5, 0xb0, 0x83, 0xe5, 0x55, }}, /* Byte value: 0x39 */ + {{0x70, 0xd5, 0x95, 0xaf, 0xc8, 0x5a, 0xbd, 0x75, }}, /* Byte value: 0x3a */ + {{0x1f, 0x76, 0xa5, 0xa2, 0x94, 0x5c, 0x0f, 0x9b, }}, /* Byte value: 0x3b */ + {{0x55, 0xb4, 0x85, 0x15, 0xfc, 0x58, 0xd3, 0x2f, }}, /* Byte value: 0x3c */ + {{0xf1, 0x4d, 0x16, 0xf3, 0xde, 0x72, 0xe9, 0x37, }}, /* Byte value: 0x3d */ + {{0x5f, 0x1d, 0xe3, 0x46, 0xae, 0x24, 0xf3, 0x5d, }}, /* Byte value: 0x3e */ + {{0xf6, 0x64, 0x3b, 0x95, 0x33, 0x3f, 0x27, 0x14, }}, /* Byte value: 0x3f */ + {{0x66, 0xd8, 0x47, 0xa7, 0xa8, 0xd1, 0x23, 0x8b, }}, /* Byte value: 0x40 */ + {{0x15, 0xdf, 0xc3, 0xf1, 0xc6, 0x20, 0x2f, 0xe9, }}, /* Byte value: 0x41 */ + {{0x4d, 0xeb, 0x0d, 0xd1, 0x85, 0x49, 0x12, 0x97, }}, /* Byte value: 0x42 */ + {{0xab, 0xe5, 0xc6, 0x7d, 0x59, 0x68, 0x0a, 0x53, }}, /* Byte value: 0x43 */ + {{0xde, 0x85, 0x60, 0x1a, 0xb8, 0x0c, 0xa7, 0x1f, }}, /* Byte value: 0x44 */ + {{0x0c, 0xce, 0x44, 0x62, 0xdd, 0xe9, 0x81, 0x5c, }}, /* Byte value: 0x45 */ + {{0x4b, 0x8c, 0x2f, 0xe0, 0x0a, 0xdc, 0xb3, 0xb9, }}, /* Byte value: 0x46 */ + {{0xa4, 0xf9, 0x93, 0xe6, 0x22, 0x2a, 0x3a, 0x18, }}, /* Byte value: 0x47 */ + {{0x86, 0xb1, 0xae, 0x3a, 0xfb, 0x65, 0x9a, 0x61, }}, /* Byte value: 0x48 */ + {{0x5b, 0xe6, 0xdf, 0xd9, 0xe5, 0xc2, 0x8c, 0x69, }}, /* Byte value: 0x49 */ + {{0x2a, 0x7d, 0x45, 0x21, 0x4f, 0x40, 0x5e, 0x11, }}, /* Byte value: 0x4a */ + {{0x95, 0x09, 0x4f, 0xfa, 0xb2, 0xd0, 0x14, 0xa6, }}, /* Byte value: 0x4b */ + {{0xa1, 0x4c, 0xa0, 0x2e, 0x0b, 0x14, 0x2a, 0x21, }}, /* Byte value: 0x4c */ + {{0x8a, 0x7f, 0xea, 0x58, 0x26, 0x8c, 0x1b, 0x3d, }}, /* Byte value: 0x4d */ + {{0x1a, 0xc3, 0x96, 0x6a, 0xbd, 0x62, 0x1f, 0xa2, }}, /* Byte value: 0x4e */ + {{0xa9, 0x79, 0xd8, 0xd3, 0x9d, 0x1b, 0xd4, 0x49, }}, /* Byte value: 0x4f */ + {{0xea, 0xc0, 0x8f, 0xce, 0x01, 0xc8, 0x99, 0x98, }}, /* Byte value: 0x50 */ + {{0x72, 0x49, 0x8b, 0x01, 0x0c, 0x29, 0x63, 0x6f, }}, /* Byte value: 0x51 */ + {{0x9f, 0xa0, 0x29, 0xa9, 0xe0, 0xac, 0x34, 0xd4, }}, /* Byte value: 0x52 */ + {{0x05, 0xb5, 0x33, 0xc8, 0x29, 0x3e, 0x10, 0x39, }}, /* Byte value: 0x53 */ + {{0x89, 0xad, 0xfb, 0xa1, 0x80, 0x27, 0xaa, 0x2a, }}, /* Byte value: 0x54 */ + {{0x2c, 0x1a, 0x67, 0x10, 0xc0, 0xd5, 0xff, 0x3f, }}, /* Byte value: 0x55 */ + {{0x64, 0x44, 0x59, 0x09, 0x6c, 0xa2, 0xfd, 0x91, }}, /* Byte value: 0x56 */ + {{0x62, 0x23, 0x7b, 0x38, 0xe3, 0x37, 0x5c, 0xbf, }}, /* Byte value: 0x57 */ + {{0xd0, 0xd7, 0x3a, 0xd6, 0xa1, 0x96, 0xf8, 0x59, }}, /* Byte value: 0x58 */ + {{0xc1, 0xf3, 0xc5, 0xb8, 0x2c, 0x50, 0xa8, 0x84, }}, /* Byte value: 0x59 */ + {{0xda, 0x7e, 0x5c, 0x85, 0xf3, 0xea, 0xd8, 0x2b, }}, /* Byte value: 0x5a */ + {{0x6c, 0x71, 0x21, 0xf4, 0xfa, 0xad, 0x03, 0xf9, }}, /* Byte value: 0x5b */ + {{0xba, 0xc1, 0x39, 0x13, 0xd4, 0xae, 0x5a, 0x8e, }}, /* Byte value: 0x5c */ + {{0x59, 0x7a, 0xc1, 0x77, 0x21, 0xb1, 0x52, 0x73, }}, /* Byte value: 0x5d */ + {{0x87, 0xff, 0xa1, 0x6d, 0x99, 0xbd, 0xf5, 0x6c, }}, /* Byte value: 0x5e */ + {{0xe9, 0x12, 0x9e, 0x37, 0xa7, 0x63, 0x28, 0x8f, }}, /* Byte value: 0x5f */ + {{0xcc, 0x73, 0x8e, 0x8d, 0x93, 0x61, 0x46, 0xd5, }}, /* Byte value: 0x60 */ + {{0x9e, 0xee, 0x26, 0xfe, 0x82, 0x74, 0x5b, 0xd9, }}, /* Byte value: 0x61 */ + {{0x80, 0xd6, 0x8c, 0x0b, 0x74, 0xf0, 0x3b, 0x4f, }}, /* Byte value: 0x62 */ + {{0x50, 0x01, 0xb6, 0xdd, 0xd5, 0x66, 0xc3, 0x16, }}, /* Byte value: 0x63 */ + {{0xd1, 0x99, 0x35, 0x81, 0xc3, 0x4e, 0x97, 0x54, }}, /* Byte value: 0x64 */ + {{0xf0, 0x03, 0x19, 0xa4, 0xbc, 0xaa, 0x86, 0x3a, }}, /* Byte value: 0x65 */ + {{0xac, 0xcc, 0xeb, 0x1b, 0xb4, 0x25, 0xc4, 0x70, }}, /* Byte value: 0x66 */ + {{0x2b, 0x33, 0x4a, 0x76, 0x2d, 0x98, 0x31, 0x1c, }}, /* Byte value: 0x67 */ + {{0x3e, 0xec, 0x89, 0x87, 0xeb, 0xb8, 0x1e, 0xf5, }}, /* Byte value: 0x68 */ + {{0x2e, 0x86, 0x79, 0xbe, 0x04, 0xa6, 0x21, 0x25, }}, /* Byte value: 0x69 */ + {{0xfb, 0xe4, 0x70, 0xa0, 0x8c, 0x0e, 0xc9, 0x45, }}, /* Byte value: 0x6a */ + {{0x84, 0x2d, 0xb0, 0x94, 0x3f, 0x16, 0x44, 0x7b, }}, /* Byte value: 0x6b */ + {{0x02, 0x9c, 0x1e, 0xae, 0xc4, 0x73, 0xde, 0x1a, }}, /* Byte value: 0x6c */ + {{0x09, 0x7b, 0x77, 0xaa, 0xf4, 0xd7, 0x91, 0x65, }}, /* Byte value: 0x6d */ + {{0x44, 0x90, 0x7a, 0x7b, 0x71, 0x9e, 0x83, 0xf2, }}, /* Byte value: 0x6e */ + {{0x4f, 0x77, 0x13, 0x7f, 0x41, 0x3a, 0xcc, 0x8d, }}, /* Byte value: 0x6f */ + {{0x03, 0xd2, 0x11, 0xf9, 0xa6, 0xab, 0xb1, 0x17, }}, /* Byte value: 0x70 */ + {{0x6f, 0xa3, 0x30, 0x0d, 0x5c, 0x06, 0xb2, 0xee, }}, /* Byte value: 0x71 */ + {{0xe0, 0x69, 0xe9, 0x9d, 0x53, 0xb4, 0xb9, 0xea, }}, /* Byte value: 0x72 */ + {{0x24, 0x2f, 0x1f, 0xed, 0x56, 0xda, 0x01, 0x57, }}, /* Byte value: 0x73 */ + {{0x12, 0xf6, 0xee, 0x97, 0x2b, 0x6d, 0xe1, 0xca, }}, /* Byte value: 0x74 */ + {{0xad, 0x82, 0xe4, 0x4c, 0xd6, 0xfd, 0xab, 0x7d, }}, /* Byte value: 0x75 */ + {{0x7d, 0x55, 0xde, 0x9a, 0x77, 0x6b, 0x53, 0x24, }}, /* Byte value: 0x76 */ + {{0xed, 0xe9, 0xa2, 0xa8, 0xec, 0x85, 0x57, 0xbb, }}, /* Byte value: 0x77 */ + {{0x37, 0x97, 0xfe, 0x2d, 0x1f, 0x6f, 0x8f, 0x90, }}, /* Byte value: 0x78 */ + {{0xb6, 0x0f, 0x7d, 0x71, 0x09, 0x47, 0xdb, 0xd2, }}, /* Byte value: 0x79 */ + {{0x93, 0x6e, 0x6d, 0xcb, 0x3d, 0x45, 0xb5, 0x88, }}, /* Byte value: 0x7a */ + {{0x47, 0x42, 0x6b, 0x82, 0xd7, 0x35, 0x32, 0xe5, }}, /* Byte value: 0x7b */ + {{0x8e, 0x84, 0xd6, 0xc7, 0x6d, 0x6a, 0x64, 0x09, }}, /* Byte value: 0x7c */ + {{0x63, 0x6d, 0x74, 0x6f, 0x81, 0xef, 0x33, 0xb2, }}, /* Byte value: 0x7d */ + {{0x94, 0x47, 0x40, 0xad, 0xd0, 0x08, 0x7b, 0xab, }}, /* Byte value: 0x7e */ + {{0xbd, 0xe8, 0x14, 0x75, 0x39, 0xe3, 0x94, 0xad, }}, /* Byte value: 0x7f */ + {{0x73, 0x07, 0x84, 0x56, 0x6e, 0xf1, 0x0c, 0x62, }}, /* Byte value: 0x80 */ + {{0x28, 0xe1, 0x5b, 0x8f, 0x8b, 0x33, 0x80, 0x0b, }}, /* Byte value: 0x81 */ + {{0xc4, 0x46, 0xf6, 0x70, 0x05, 0x6e, 0xb8, 0xbd, }}, /* Byte value: 0x82 */ + {{0x17, 0x43, 0xdd, 0x5f, 0x02, 0x53, 0xf1, 0xf3, }}, /* Byte value: 0x83 */ + {{0x2f, 0xc8, 0x76, 0xe9, 0x66, 0x7e, 0x4e, 0x28, }}, /* Byte value: 0x84 */ + {{0xaf, 0x1e, 0xfa, 0xe2, 0x12, 0x8e, 0x75, 0x67, }}, /* Byte value: 0x85 */ + {{0xc9, 0xc6, 0xbd, 0x45, 0xba, 0x5f, 0x56, 0xec, }}, /* Byte value: 0x86 */ + {{0xb4, 0x93, 0x63, 0xdf, 0xcd, 0x34, 0x05, 0xc8, }}, /* Byte value: 0x87 */ + {{0xfa, 0xaa, 0x7f, 0xf7, 0xee, 0xd6, 0xa6, 0x48, }}, /* Byte value: 0x88 */ + {{0x43, 0xb9, 0x57, 0x1d, 0x9c, 0xd3, 0x4d, 0xd1, }}, /* Byte value: 0x89 */ + {{0x42, 0xf7, 0x58, 0x4a, 0xfe, 0x0b, 0x22, 0xdc, }}, /* Byte value: 0x8a */ + {{0x23, 0x06, 0x32, 0x8b, 0xbb, 0x97, 0xcf, 0x74, }}, /* Byte value: 0x8b */ + {{0x5e, 0x53, 0xec, 0x11, 0xcc, 0xfc, 0x9c, 0x50, }}, /* Byte value: 0x8c */ + {{0xd2, 0x4b, 0x24, 0x78, 0x65, 0xe5, 0x26, 0x43, }}, /* Byte value: 0x8d */ + {{0xc6, 0xda, 0xe8, 0xde, 0xc1, 0x1d, 0x66, 0xa7, }}, /* Byte value: 0x8e */ + {{0x0b, 0xe7, 0x69, 0x04, 0x30, 0xa4, 0x4f, 0x7f, }}, /* Byte value: 0x8f */ + {{0xe4, 0x92, 0xd5, 0x02, 0x18, 0x52, 0xc6, 0xde, }}, /* Byte value: 0x90 */ + {{0x27, 0xfd, 0x0e, 0x14, 0xf0, 0x71, 0xb0, 0x40, }}, /* Byte value: 0x91 */ + {{0xc8, 0x88, 0xb2, 0x12, 0xd8, 0x87, 0x39, 0xe1, }}, /* Byte value: 0x92 */ + {{0xcb, 0x5a, 0xa3, 0xeb, 0x7e, 0x2c, 0x88, 0xf6, }}, /* Byte value: 0x93 */ + {{0x48, 0x5e, 0x3e, 0x19, 0xac, 0x77, 0x02, 0xae, }}, /* Byte value: 0x94 */ + {{0x33, 0x6c, 0xc2, 0xb2, 0x54, 0x89, 0xf0, 0xa4, }}, /* Byte value: 0x95 */ + {{0xf7, 0x2a, 0x34, 0xc2, 0x51, 0xe7, 0x48, 0x19, }}, /* Byte value: 0x96 */ + {{0xdb, 0x30, 0x53, 0xd2, 0x91, 0x32, 0xb7, 0x26, }}, /* Byte value: 0x97 */ + {{0x78, 0xe0, 0xed, 0x52, 0x5e, 0x55, 0x43, 0x1d, }}, /* Byte value: 0x98 */ + {{0x6d, 0x3f, 0x2e, 0xa3, 0x98, 0x75, 0x6c, 0xf4, }}, /* Byte value: 0x99 */ + {{0xe8, 0x5c, 0x91, 0x60, 0xc5, 0xbb, 0x47, 0x82, }}, /* Byte value: 0x9a */ + {{0x13, 0xb8, 0xe1, 0xc0, 0x49, 0xb5, 0x8e, 0xc7, }}, /* Byte value: 0x9b */ + {{0x5d, 0x81, 0xfd, 0xe8, 0x6a, 0x57, 0x2d, 0x47, }}, /* Byte value: 0x9c */ + {{0xbb, 0x8f, 0x36, 0x44, 0xb6, 0x76, 0x35, 0x83, }}, /* Byte value: 0x9d */ + {{0x3a, 0x17, 0xb5, 0x18, 0xa0, 0x5e, 0x61, 0xc1, }}, /* Byte value: 0x9e */ + {{0xf8, 0x36, 0x61, 0x59, 0x2a, 0xa5, 0x78, 0x52, }}, /* Byte value: 0x9f */ + {{0x88, 0xe3, 0xf4, 0xf6, 0xe2, 0xff, 0xc5, 0x27, }}, /* Byte value: 0xa0 */ + {{0x38, 0x8b, 0xab, 0xb6, 0x64, 0x2d, 0xbf, 0xdb, }}, /* Byte value: 0xa1 */ + {{0xa3, 0xd0, 0xbe, 0x80, 0xcf, 0x67, 0xf4, 0x3b, }}, /* Byte value: 0xa2 */ + {{0x79, 0xae, 0xe2, 0x05, 0x3c, 0x8d, 0x2c, 0x10, }}, /* Byte value: 0xa3 */ + {{0x4e, 0x39, 0x1c, 0x28, 0x23, 0xe2, 0xa3, 0x80, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x10, 0x6a, 0xf0, 0x39, 0xef, 0x1e, 0x3f, 0xd0, }}, /* Byte value: 0xa6 */ + {{0x67, 0x96, 0x48, 0xf0, 0xca, 0x09, 0x4c, 0x86, }}, /* Byte value: 0xa7 */ + {{0xeb, 0x8e, 0x80, 0x99, 0x63, 0x10, 0xf6, 0x95, }}, /* Byte value: 0xa8 */ + {{0x7e, 0x87, 0xcf, 0x63, 0xd1, 0xc0, 0xe2, 0x33, }}, /* Byte value: 0xa9 */ + {{0x39, 0xc5, 0xa4, 0xe1, 0x06, 0xf5, 0xd0, 0xd6, }}, /* Byte value: 0xaa */ + {{0xf4, 0xf8, 0x25, 0x3b, 0xf7, 0x4c, 0xf9, 0x0e, }}, /* Byte value: 0xab */ + {{0x06, 0x67, 0x22, 0x31, 0x8f, 0x95, 0xa1, 0x2e, }}, /* Byte value: 0xac */ + {{0xb1, 0x26, 0x50, 0x17, 0xe4, 0x0a, 0x15, 0xf1, }}, /* Byte value: 0xad */ + {{0x77, 0xfc, 0xb8, 0xc9, 0x25, 0x17, 0x73, 0x56, }}, /* Byte value: 0xae */ + {{0x7a, 0x7c, 0xf3, 0xfc, 0x9a, 0x26, 0x9d, 0x07, }}, /* Byte value: 0xaf */ + {{0xb2, 0xf4, 0x41, 0xee, 0x42, 0xa1, 0xa4, 0xe6, }}, /* Byte value: 0xb0 */ + {{0xdf, 0xcb, 0x6f, 0x4d, 0xda, 0xd4, 0xc8, 0x12, }}, /* Byte value: 0xb1 */ + {{0xd4, 0x2c, 0x06, 0x49, 0xea, 0x70, 0x87, 0x6d, }}, /* Byte value: 0xb2 */ + {{0x25, 0x61, 0x10, 0xba, 0x34, 0x02, 0x6e, 0x5a, }}, /* Byte value: 0xb3 */ + {{0xcf, 0xa1, 0x9f, 0x74, 0x35, 0xca, 0xf7, 0xc2, }}, /* Byte value: 0xb4 */ + {{0x8c, 0x18, 0xc8, 0x69, 0xa9, 0x19, 0xba, 0x13, }}, /* Byte value: 0xb5 */ + {{0x0e, 0x52, 0x5a, 0xcc, 0x19, 0x9a, 0x5f, 0x46, }}, /* Byte value: 0xb6 */ + {{0x46, 0x0c, 0x64, 0xd5, 0xb5, 0xed, 0x5d, 0xe8, }}, /* Byte value: 0xb7 */ + {{0x6b, 0x58, 0x0c, 0x92, 0x17, 0xe0, 0xcd, 0xda, }}, /* Byte value: 0xb8 */ + {{0x2d, 0x54, 0x68, 0x47, 0xa2, 0x0d, 0x90, 0x32, }}, /* Byte value: 0xb9 */ + {{0x3b, 0x59, 0xba, 0x4f, 0xc2, 0x86, 0x0e, 0xcc, }}, /* Byte value: 0xba */ + {{0xe6, 0x0e, 0xcb, 0xac, 0xdc, 0x21, 0x18, 0xc4, }}, /* Byte value: 0xbb */ + {{0x92, 0x20, 0x62, 0x9c, 0x5f, 0x9d, 0xda, 0x85, }}, /* Byte value: 0xbc */ + {{0x49, 0x10, 0x31, 0x4e, 0xce, 0xaf, 0x6d, 0xa3, }}, /* Byte value: 0xbd */ + {{0x8b, 0x31, 0xe5, 0x0f, 0x44, 0x54, 0x74, 0x30, }}, /* Byte value: 0xbe */ + {{0x32, 0x22, 0xcd, 0xe5, 0x36, 0x51, 0x9f, 0xa9, }}, /* Byte value: 0xbf */ + {{0xae, 0x50, 0xf5, 0xb5, 0x70, 0x56, 0x1a, 0x6a, }}, /* Byte value: 0xc0 */ + {{0x9a, 0x15, 0x1a, 0x61, 0xc9, 0x92, 0x24, 0xed, }}, /* Byte value: 0xc1 */ + {{0xfc, 0xcd, 0x5d, 0xc6, 0x61, 0x43, 0x07, 0x66, }}, /* Byte value: 0xc2 */ + {{0xc2, 0x21, 0xd4, 0x41, 0x8a, 0xfb, 0x19, 0x93, }}, /* Byte value: 0xc3 */ + {{0x51, 0x4f, 0xb9, 0x8a, 0xb7, 0xbe, 0xac, 0x1b, }}, /* Byte value: 0xc4 */ + {{0x0a, 0xa9, 0x66, 0x53, 0x52, 0x7c, 0x20, 0x72, }}, /* Byte value: 0xc5 */ + {{0x45, 0xde, 0x75, 0x2c, 0x13, 0x46, 0xec, 0xff, }}, /* Byte value: 0xc6 */ + {{0x9b, 0x5b, 0x15, 0x36, 0xab, 0x4a, 0x4b, 0xe0, }}, /* Byte value: 0xc7 */ + {{0xb0, 0x68, 0x5f, 0x40, 0x86, 0xd2, 0x7a, 0xfc, }}, /* Byte value: 0xc8 */ + {{0x1e, 0x38, 0xaa, 0xf5, 0xf6, 0x84, 0x60, 0x96, }}, /* Byte value: 0xc9 */ + {{0x21, 0x9a, 0x2c, 0x25, 0x7f, 0xe4, 0x11, 0x6e, }}, /* Byte value: 0xca */ + {{0x41, 0x25, 0x49, 0xb3, 0x58, 0xa0, 0x93, 0xcb, }}, /* Byte value: 0xcb */ + {{0xce, 0xef, 0x90, 0x23, 0x57, 0x12, 0x98, 0xcf, }}, /* Byte value: 0xcc */ + {{0x65, 0x0a, 0x56, 0x5e, 0x0e, 0x7a, 0x92, 0x9c, }}, /* Byte value: 0xcd */ + {{0x4a, 0xc2, 0x20, 0xb7, 0x68, 0x04, 0xdc, 0xb4, }}, /* Byte value: 0xce */ + {{0x76, 0xb2, 0xb7, 0x9e, 0x47, 0xcf, 0x1c, 0x5b, }}, /* Byte value: 0xcf */ + {{0x5c, 0xcf, 0xf2, 0xbf, 0x08, 0x8f, 0x42, 0x4a, }}, /* Byte value: 0xd0 */ + {{0x53, 0xd3, 0xa7, 0x24, 0x73, 0xcd, 0x72, 0x01, }}, /* Byte value: 0xd1 */ + {{0x4c, 0xa5, 0x02, 0x86, 0xe7, 0x91, 0x7d, 0x9a, }}, /* Byte value: 0xd2 */ + {{0xf3, 0xd1, 0x08, 0x5d, 0x1a, 0x01, 0x37, 0x2d, }}, /* Byte value: 0xd3 */ + {{0xee, 0x3b, 0xb3, 0x51, 0x4a, 0x2e, 0xe6, 0xac, }}, /* Byte value: 0xd4 */ + {{0x97, 0x95, 0x51, 0x54, 0x76, 0xa3, 0xca, 0xbc, }}, /* Byte value: 0xd5 */ + {{0xbc, 0xa6, 0x1b, 0x22, 0x5b, 0x3b, 0xfb, 0xa0, }}, /* Byte value: 0xd6 */ + {{0xaa, 0xab, 0xc9, 0x2a, 0x3b, 0xb0, 0x65, 0x5e, }}, /* Byte value: 0xd7 */ + {{0xd3, 0x05, 0x2b, 0x2f, 0x07, 0x3d, 0x49, 0x4e, }}, /* Byte value: 0xd8 */ + {{0x18, 0x5f, 0x88, 0xc4, 0x79, 0x11, 0xc1, 0xb8, }}, /* Byte value: 0xd9 */ + {{0x1c, 0xa4, 0xb4, 0x5b, 0x32, 0xf7, 0xbe, 0x8c, }}, /* Byte value: 0xda */ + {{0x96, 0xdb, 0x5e, 0x03, 0x14, 0x7b, 0xa5, 0xb1, }}, /* Byte value: 0xdb */ + {{0xbf, 0x74, 0x0a, 0xdb, 0xfd, 0x90, 0x4a, 0xb7, }}, /* Byte value: 0xdc */ + {{0xdd, 0x57, 0x71, 0xe3, 0x1e, 0xa7, 0x16, 0x08, }}, /* Byte value: 0xdd */ + {{0x5a, 0xa8, 0xd0, 0x8e, 0x87, 0x1a, 0xe3, 0x64, }}, /* Byte value: 0xde */ + {{0x1b, 0x8d, 0x99, 0x3d, 0xdf, 0xba, 0x70, 0xaf, }}, /* Byte value: 0xdf */ + {{0x61, 0xf1, 0x6a, 0xc1, 0x45, 0x9c, 0xed, 0xa8, }}, /* Byte value: 0xe0 */ + {{0xca, 0x14, 0xac, 0xbc, 0x1c, 0xf4, 0xe7, 0xfb, }}, /* Byte value: 0xe1 */ + {{0x0d, 0x80, 0x4b, 0x35, 0xbf, 0x31, 0xee, 0x51, }}, /* Byte value: 0xe2 */ + {{0x83, 0x04, 0x9d, 0xf2, 0xd2, 0x5b, 0x8a, 0x58, }}, /* Byte value: 0xe3 */ + {{0xf5, 0xb6, 0x2a, 0x6c, 0x95, 0x94, 0x96, 0x03, }}, /* Byte value: 0xe4 */ + {{0xe3, 0xbb, 0xf8, 0x64, 0xf5, 0x1f, 0x08, 0xfd, }}, /* Byte value: 0xe5 */ + {{0x31, 0xf0, 0xdc, 0x1c, 0x90, 0xfa, 0x2e, 0xbe, }}, /* Byte value: 0xe6 */ + {{0x91, 0xf2, 0x73, 0x65, 0xf9, 0x36, 0x6b, 0x92, }}, /* Byte value: 0xe7 */ + {{0x07, 0x29, 0x2d, 0x66, 0xed, 0x4d, 0xce, 0x23, }}, /* Byte value: 0xe8 */ + {{0x14, 0x91, 0xcc, 0xa6, 0xa4, 0xf8, 0x40, 0xe4, }}, /* Byte value: 0xe9 */ + {{0x7c, 0x1b, 0xd1, 0xcd, 0x15, 0xb3, 0x3c, 0x29, }}, /* Byte value: 0xea */ + {{0x54, 0xfa, 0x8a, 0x42, 0x9e, 0x80, 0xbc, 0x22, }}, /* Byte value: 0xeb */ + {{0x68, 0x8a, 0x1d, 0x6b, 0xb1, 0x4b, 0x7c, 0xcd, }}, /* Byte value: 0xec */ + {{0xf9, 0x78, 0x6e, 0x0e, 0x48, 0x7d, 0x17, 0x5f, }}, /* Byte value: 0xed */ + {{0x8f, 0xca, 0xd9, 0x90, 0x0f, 0xb2, 0x0b, 0x04, }}, /* Byte value: 0xee */ + {{0xa0, 0x02, 0xaf, 0x79, 0x69, 0xcc, 0x45, 0x2c, }}, /* Byte value: 0xef */ + {{0x22, 0x48, 0x3d, 0xdc, 0xd9, 0x4f, 0xa0, 0x79, }}, /* Byte value: 0xf0 */ + {{0x30, 0xbe, 0xd3, 0x4b, 0xf2, 0x22, 0x41, 0xb3, }}, /* Byte value: 0xf1 */ + {{0xd7, 0xfe, 0x17, 0xb0, 0x4c, 0xdb, 0x36, 0x7a, }}, /* Byte value: 0xf2 */ + {{0xe7, 0x40, 0xc4, 0xfb, 0xbe, 0xf9, 0x77, 0xc9, }}, /* Byte value: 0xf3 */ + {{0xf2, 0x9f, 0x07, 0x0a, 0x78, 0xd9, 0x58, 0x20, }}, /* Byte value: 0xf4 */ + {{0x90, 0xbc, 0x7c, 0x32, 0x9b, 0xee, 0x04, 0x9f, }}, /* Byte value: 0xf5 */ + {{0x52, 0x9d, 0xa8, 0x73, 0x11, 0x15, 0x1d, 0x0c, }}, /* Byte value: 0xf6 */ + {{0x85, 0x63, 0xbf, 0xc3, 0x5d, 0xce, 0x2b, 0x76, }}, /* Byte value: 0xf7 */ + {{0xec, 0xa7, 0xad, 0xff, 0x8e, 0x5d, 0x38, 0xb6, }}, /* Byte value: 0xf8 */ + {{0xb5, 0xdd, 0x6c, 0x88, 0xaf, 0xec, 0x6a, 0xc5, }}, /* Byte value: 0xf9 */ + {{0x01, 0x4e, 0x0f, 0x57, 0x62, 0xd8, 0x6f, 0x0d, }}, /* Byte value: 0xfa */ + {{0x36, 0xd9, 0xf1, 0x7a, 0x7d, 0xb7, 0xe0, 0x9d, }}, /* Byte value: 0xfb */ + {{0x81, 0x98, 0x83, 0x5c, 0x16, 0x28, 0x54, 0x42, }}, /* Byte value: 0xfc */ + {{0x40, 0x6b, 0x46, 0xe4, 0x3a, 0x78, 0xfc, 0xc6, }}, /* Byte value: 0xfd */ + {{0xa8, 0x37, 0xd7, 0x84, 0xff, 0xc3, 0xbb, 0x44, }}, /* Byte value: 0xfe */ + {{0xe1, 0x27, 0xe6, 0xca, 0x31, 0x6c, 0xd6, 0xe7, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 1 */ + {{0x7c, 0xd9, 0x9e, 0x49, 0x92, 0xd3, 0x50, 0x36, }}, /* Byte value: 0x00 */ + {{0xf4, 0x6c, 0x87, 0xe4, 0x0b, 0xa6, 0x9f, 0x33, }}, /* Byte value: 0x01 */ + {{0x01, 0x72, 0x0a, 0x54, 0xa8, 0x81, 0x94, 0x9c, }}, /* Byte value: 0x02 */ + {{0x53, 0x0a, 0x7b, 0xd1, 0x61, 0x1d, 0xb8, 0x65, }}, /* Byte value: 0x03 */ + {{0x89, 0xc7, 0x13, 0xf9, 0x31, 0xf4, 0x5b, 0x99, }}, /* Byte value: 0x04 */ + {{0x24, 0x53, 0xab, 0x81, 0xc1, 0x0c, 0xbd, 0x5e, }}, /* Byte value: 0x05 */ + {{0x67, 0x75, 0x70, 0x59, 0xb2, 0xd6, 0x51, 0xef, }}, /* Byte value: 0x06 */ + {{0x6f, 0x63, 0x20, 0xbc, 0xbb, 0x54, 0x7b, 0x85, }}, /* Byte value: 0x07 */ + {{0x40, 0xb0, 0xc5, 0x24, 0x48, 0x9a, 0x93, 0xd6, }}, /* Byte value: 0x08 */ + {{0x5f, 0x17, 0x03, 0xa7, 0x8d, 0xde, 0x87, 0x3a, }}, /* Byte value: 0x09 */ + {{0x09, 0x64, 0x5a, 0xb1, 0xa1, 0x03, 0xbe, 0xf6, }}, /* Byte value: 0x0a */ + {{0x3d, 0x1b, 0x51, 0x39, 0x72, 0xc8, 0x57, 0x7c, }}, /* Byte value: 0x0b */ + {{0xef, 0xc0, 0x69, 0xf4, 0x2b, 0xa3, 0x9e, 0xea, }}, /* Byte value: 0x0c */ + {{0x16, 0xc3, 0x9c, 0x32, 0x64, 0x47, 0xaa, 0x1a, }}, /* Byte value: 0x0d */ + {{0xe7, 0xd6, 0x39, 0x11, 0x22, 0x21, 0xb4, 0x80, }}, /* Byte value: 0x0e */ + {{0xcb, 0x93, 0xc2, 0x75, 0xea, 0xaf, 0x23, 0xb4, }}, /* Byte value: 0x0f */ + {{0xc8, 0x05, 0xdc, 0x89, 0xd1, 0xef, 0x5c, 0xd3, }}, /* Byte value: 0x10 */ + {{0x7a, 0x36, 0xa2, 0x72, 0xe4, 0x53, 0xae, 0xf8, }}, /* Byte value: 0x11 */ + {{0x96, 0x60, 0xd5, 0x7a, 0xf4, 0xb0, 0x4f, 0x75, }}, /* Byte value: 0x12 */ + {{0x74, 0xcf, 0xce, 0xac, 0x9b, 0x51, 0x7a, 0x5c, }}, /* Byte value: 0x13 */ + {{0x11, 0x5e, 0xaa, 0x5d, 0xba, 0x46, 0xc0, 0x48, }}, /* Byte value: 0x14 */ + {{0x4c, 0xad, 0xbd, 0x52, 0xa4, 0x59, 0xac, 0x89, }}, /* Byte value: 0x15 */ + {{0x8e, 0x5a, 0x25, 0x96, 0xef, 0xf5, 0x31, 0xcb, }}, /* Byte value: 0x16 */ + {{0x61, 0x9a, 0x4c, 0x62, 0xc4, 0x56, 0xaf, 0x21, }}, /* Byte value: 0x17 */ + {{0x26, 0xb7, 0xbf, 0x29, 0x52, 0xcd, 0x56, 0xa5, }}, /* Byte value: 0x18 */ + {{0x5b, 0x1c, 0x2b, 0x34, 0x68, 0x9f, 0x92, 0x0f, }}, /* Byte value: 0x19 */ + {{0xdf, 0xb4, 0x4a, 0xef, 0x1d, 0x29, 0x62, 0x55, }}, /* Byte value: 0x1a */ + {{0x28, 0x4e, 0xd3, 0xf7, 0x2d, 0xcf, 0x82, 0x01, }}, /* Byte value: 0x1b */ + {{0xfd, 0x08, 0xdd, 0x55, 0xaa, 0xa5, 0x21, 0xc5, }}, /* Byte value: 0x1c */ + {{0x1b, 0xac, 0xee, 0x10, 0x20, 0x05, 0x01, 0xd9, }}, /* Byte value: 0x1d */ + {{0x43, 0x26, 0xdb, 0xd8, 0x73, 0xda, 0xec, 0xb1, }}, /* Byte value: 0x1e */ + {{0xf1, 0x15, 0xa5, 0x23, 0x46, 0x66, 0x1e, 0x9a, }}, /* Byte value: 0x1f */ + {{0xd2, 0xdb, 0x38, 0xcd, 0x59, 0x6b, 0xc9, 0x96, }}, /* Byte value: 0x20 */ + {{0x17, 0xb1, 0x96, 0x66, 0xcc, 0xc6, 0x3e, 0x86, }}, /* Byte value: 0x21 */ + {{0xf2, 0x83, 0xbb, 0xdf, 0x7d, 0x26, 0x61, 0xfd, }}, /* Byte value: 0x22 */ + {{0xed, 0x24, 0x7d, 0x5c, 0xb8, 0x62, 0x75, 0x11, }}, /* Byte value: 0x23 */ + {{0x1e, 0xd5, 0xcc, 0xd7, 0x6d, 0xc5, 0x80, 0x70, }}, /* Byte value: 0x24 */ + {{0x98, 0x99, 0xb9, 0xa4, 0x8b, 0xb2, 0x9b, 0xd1, }}, /* Byte value: 0x25 */ + {{0xbd, 0xb8, 0x18, 0x71, 0xe2, 0x3f, 0xb2, 0x13, }}, /* Byte value: 0x26 */ + {{0x7d, 0xab, 0x94, 0x1d, 0x3a, 0x52, 0xc4, 0xaa, }}, /* Byte value: 0x27 */ + {{0x99, 0xeb, 0xb3, 0xf0, 0x23, 0x33, 0x0f, 0x4d, }}, /* Byte value: 0x28 */ + {{0xf0, 0x67, 0xaf, 0x77, 0xee, 0xe7, 0x8a, 0x06, }}, /* Byte value: 0x29 */ + {{0xc4, 0x18, 0xa4, 0xff, 0x3d, 0x2c, 0x63, 0x8c, }}, /* Byte value: 0x2a */ + {{0xfa, 0x95, 0xeb, 0x3a, 0x74, 0xa4, 0x4b, 0x97, }}, /* Byte value: 0x2b */ + {{0x06, 0xef, 0x3c, 0x3b, 0x76, 0x80, 0xfe, 0xce, }}, /* Byte value: 0x2c */ + {{0x49, 0xd4, 0x9f, 0x95, 0xe9, 0x99, 0x2d, 0x20, }}, /* Byte value: 0x2d */ + {{0xa8, 0xed, 0x9a, 0xbf, 0xbd, 0x38, 0x67, 0x6e, }}, /* Byte value: 0x2e */ + {{0x59, 0xf8, 0x3f, 0x9c, 0xfb, 0x5e, 0x79, 0xf4, }}, /* Byte value: 0x2f */ + {{0xae, 0x02, 0xa6, 0x84, 0xcb, 0xb8, 0x99, 0xa0, }}, /* Byte value: 0x30 */ + {{0x37, 0xe9, 0x15, 0x74, 0xe8, 0x8b, 0x96, 0xed, }}, /* Byte value: 0x31 */ + {{0x92, 0x6b, 0xfd, 0xe9, 0x11, 0xf1, 0x5a, 0x40, }}, /* Byte value: 0x32 */ + {{0x9c, 0x92, 0x91, 0x37, 0x6e, 0xf3, 0x8e, 0xe4, }}, /* Byte value: 0x33 */ + {{0x57, 0x01, 0x53, 0x42, 0x84, 0x5c, 0xad, 0x50, }}, /* Byte value: 0x34 */ + {{0xc3, 0x85, 0x92, 0x90, 0xe3, 0x2d, 0x09, 0xde, }}, /* Byte value: 0x35 */ + {{0xe1, 0x39, 0x05, 0x2a, 0x54, 0xa1, 0x4a, 0x4e, }}, /* Byte value: 0x36 */ + {{0xe4, 0x40, 0x27, 0xed, 0x19, 0x61, 0xcb, 0xe7, }}, /* Byte value: 0x37 */ + {{0x75, 0xbd, 0xc4, 0xf8, 0x33, 0xd0, 0xee, 0xc0, }}, /* Byte value: 0x38 */ + {{0xd6, 0xd0, 0x10, 0x5e, 0xbc, 0x2a, 0xdc, 0xa3, }}, /* Byte value: 0x39 */ + {{0x2f, 0xd3, 0xe5, 0x98, 0xf3, 0xce, 0xe8, 0x53, }}, /* Byte value: 0x3a */ + {{0xc7, 0x8e, 0xba, 0x03, 0x06, 0x6c, 0x1c, 0xeb, }}, /* Byte value: 0x3b */ + {{0x77, 0x59, 0xd0, 0x50, 0xa0, 0x11, 0x05, 0x3b, }}, /* Byte value: 0x3c */ + {{0x45, 0xc9, 0xe7, 0xe3, 0x05, 0x5a, 0x12, 0x7f, }}, /* Byte value: 0x3d */ + {{0x79, 0xa0, 0xbc, 0x8e, 0xdf, 0x13, 0xd1, 0x9f, }}, /* Byte value: 0x3e */ + {{0x2b, 0xd8, 0xcd, 0x0b, 0x16, 0x8f, 0xfd, 0x66, }}, /* Byte value: 0x3f */ + {{0x5a, 0x6e, 0x21, 0x60, 0xc0, 0x1e, 0x06, 0x93, }}, /* Byte value: 0x40 */ + {{0xc9, 0x77, 0xd6, 0xdd, 0x79, 0x6e, 0xc8, 0x4f, }}, /* Byte value: 0x41 */ + {{0xde, 0xc6, 0x40, 0xbb, 0xb5, 0xa8, 0xf6, 0xc9, }}, /* Byte value: 0x42 */ + {{0x3b, 0xf4, 0x6d, 0x02, 0x04, 0x48, 0xa9, 0xb2, }}, /* Byte value: 0x43 */ + {{0x13, 0xba, 0xbe, 0xf5, 0x29, 0x87, 0x2b, 0xb3, }}, /* Byte value: 0x44 */ + {{0xb5, 0xae, 0x48, 0x94, 0xeb, 0xbd, 0x98, 0x79, }}, /* Byte value: 0x45 */ + {{0x65, 0x91, 0x64, 0xf1, 0x21, 0x17, 0xba, 0x14, }}, /* Byte value: 0x46 */ + {{0x32, 0x90, 0x37, 0xb3, 0xa5, 0x4b, 0x17, 0x44, }}, /* Byte value: 0x47 */ + {{0x04, 0x0b, 0x28, 0x93, 0xe5, 0x41, 0x15, 0x35, }}, /* Byte value: 0x48 */ + {{0xab, 0x7b, 0x84, 0x43, 0x86, 0x78, 0x18, 0x09, }}, /* Byte value: 0x49 */ + {{0x51, 0xee, 0x6f, 0x79, 0xf2, 0xdc, 0x53, 0x9e, }}, /* Byte value: 0x4a */ + {{0x76, 0x2b, 0xda, 0x04, 0x08, 0x90, 0x91, 0xa7, }}, /* Byte value: 0x4b */ + {{0x35, 0x0d, 0x01, 0xdc, 0x7b, 0x4a, 0x7d, 0x16, }}, /* Byte value: 0x4c */ + {{0xb1, 0xa5, 0x60, 0x07, 0x0e, 0xfc, 0x8d, 0x4c, }}, /* Byte value: 0x4d */ + {{0xc0, 0x13, 0x8c, 0x6c, 0xd8, 0x6d, 0x76, 0xb9, }}, /* Byte value: 0x4e */ + {{0x52, 0x78, 0x71, 0x85, 0xc9, 0x9c, 0x2c, 0xf9, }}, /* Byte value: 0x4f */ + {{0x50, 0x9c, 0x65, 0x2d, 0x5a, 0x5d, 0xc7, 0x02, }}, /* Byte value: 0x50 */ + {{0x46, 0x5f, 0xf9, 0x1f, 0x3e, 0x1a, 0x6d, 0x18, }}, /* Byte value: 0x51 */ + {{0x78, 0xd2, 0xb6, 0xda, 0x77, 0x92, 0x45, 0x03, }}, /* Byte value: 0x52 */ + {{0x07, 0x9d, 0x36, 0x6f, 0xde, 0x01, 0x6a, 0x52, }}, /* Byte value: 0x53 */ + {{0x0d, 0x6f, 0x72, 0x22, 0x44, 0x42, 0xab, 0xc3, }}, /* Byte value: 0x54 */ + {{0xea, 0xb9, 0x4b, 0x33, 0x66, 0x63, 0x1f, 0x43, }}, /* Byte value: 0x55 */ + {{0x33, 0xe2, 0x3d, 0xe7, 0x0d, 0xca, 0x83, 0xd8, }}, /* Byte value: 0x56 */ + {{0x88, 0xb5, 0x19, 0xad, 0x99, 0x75, 0xcf, 0x05, }}, /* Byte value: 0x57 */ + {{0xcf, 0x98, 0xea, 0xe6, 0x0f, 0xee, 0x36, 0x81, }}, /* Byte value: 0x58 */ + {{0xd4, 0x34, 0x04, 0xf6, 0x2f, 0xeb, 0x37, 0x58, }}, /* Byte value: 0x59 */ + {{0xc1, 0x61, 0x86, 0x38, 0x70, 0xec, 0xe2, 0x25, }}, /* Byte value: 0x5a */ + {{0x54, 0x97, 0x4d, 0xbe, 0xbf, 0x1c, 0xd2, 0x37, }}, /* Byte value: 0x5b */ + {{0x20, 0x58, 0x83, 0x12, 0x24, 0x4d, 0xa8, 0x6b, }}, /* Byte value: 0x5c */ + {{0xc2, 0xf7, 0x98, 0xc4, 0x4b, 0xac, 0x9d, 0x42, }}, /* Byte value: 0x5d */ + {{0xd1, 0x4d, 0x26, 0x31, 0x62, 0x2b, 0xb6, 0xf1, }}, /* Byte value: 0x5e */ + {{0xec, 0x56, 0x77, 0x08, 0x10, 0xe3, 0xe1, 0x8d, }}, /* Byte value: 0x5f */ + {{0xb4, 0xdc, 0x42, 0xc0, 0x43, 0x3c, 0x0c, 0xe5, }}, /* Byte value: 0x60 */ + {{0xad, 0x94, 0xb8, 0x78, 0xf0, 0xf8, 0xe6, 0xc7, }}, /* Byte value: 0x61 */ + {{0xbf, 0x5c, 0x0c, 0xd9, 0x71, 0xfe, 0x59, 0xe8, }}, /* Byte value: 0x62 */ + {{0x70, 0xc4, 0xe6, 0x3f, 0x7e, 0x10, 0x6f, 0x69, }}, /* Byte value: 0x63 */ + {{0x1a, 0xde, 0xe4, 0x44, 0x88, 0x84, 0x95, 0x45, }}, /* Byte value: 0x64 */ + {{0x90, 0x8f, 0xe9, 0x41, 0x82, 0x30, 0xb1, 0xbb, }}, /* Byte value: 0x65 */ + {{0x55, 0xe5, 0x47, 0xea, 0x17, 0x9d, 0x46, 0xab, }}, /* Byte value: 0x66 */ + {{0x84, 0xa8, 0x61, 0xdb, 0x75, 0xb6, 0xf0, 0x5a, }}, /* Byte value: 0x67 */ + {{0x4d, 0xdf, 0xb7, 0x06, 0x0c, 0xd8, 0x38, 0x15, }}, /* Byte value: 0x68 */ + {{0x83, 0x35, 0x57, 0xb4, 0xab, 0xb7, 0x9a, 0x08, }}, /* Byte value: 0x69 */ + {{0x4b, 0x30, 0x8b, 0x3d, 0x7a, 0x58, 0xc6, 0xdb, }}, /* Byte value: 0x6a */ + {{0x6d, 0x87, 0x34, 0x14, 0x28, 0x95, 0x90, 0x7e, }}, /* Byte value: 0x6b */ + {{0x69, 0x8c, 0x1c, 0x87, 0xcd, 0xd4, 0x85, 0x4b, }}, /* Byte value: 0x6c */ + {{0xb2, 0x33, 0x7e, 0xfb, 0x35, 0xbc, 0xf2, 0x2b, }}, /* Byte value: 0x6d */ + {{0x6c, 0xf5, 0x3e, 0x40, 0x80, 0x14, 0x04, 0xe2, }}, /* Byte value: 0x6e */ + {{0xb7, 0x4a, 0x5c, 0x3c, 0x78, 0x7c, 0x73, 0x82, }}, /* Byte value: 0x6f */ + {{0xbc, 0xca, 0x12, 0x25, 0x4a, 0xbe, 0x26, 0x8f, }}, /* Byte value: 0x70 */ + {{0xe8, 0x5d, 0x5f, 0x9b, 0xf5, 0xa2, 0xf4, 0xb8, }}, /* Byte value: 0x71 */ + {{0x5e, 0x65, 0x09, 0xf3, 0x25, 0x5f, 0x13, 0xa6, }}, /* Byte value: 0x72 */ + {{0x8d, 0xcc, 0x3b, 0x6a, 0xd4, 0xb5, 0x4e, 0xac, }}, /* Byte value: 0x73 */ + {{0xa7, 0x66, 0xfc, 0x35, 0x6a, 0xbb, 0x27, 0x56, }}, /* Byte value: 0x74 */ + {{0x80, 0xa3, 0x49, 0x48, 0x90, 0xf7, 0xe5, 0x6f, }}, /* Byte value: 0x75 */ + {{0x4f, 0x3b, 0xa3, 0xae, 0x9f, 0x19, 0xd3, 0xee, }}, /* Byte value: 0x76 */ + {{0x3e, 0x8d, 0x4f, 0xc5, 0x49, 0x88, 0x28, 0x1b, }}, /* Byte value: 0x77 */ + {{0xff, 0xec, 0xc9, 0xfd, 0x39, 0x64, 0xca, 0x3e, }}, /* Byte value: 0x78 */ + {{0x95, 0xf6, 0xcb, 0x86, 0xcf, 0xf0, 0x30, 0x12, }}, /* Byte value: 0x79 */ + {{0xcd, 0x7c, 0xfe, 0x4e, 0x9c, 0x2f, 0xdd, 0x7a, }}, /* Byte value: 0x7a */ + {{0xd0, 0x3f, 0x2c, 0x65, 0xca, 0xaa, 0x22, 0x6d, }}, /* Byte value: 0x7b */ + {{0x63, 0x7e, 0x58, 0xca, 0x57, 0x97, 0x44, 0xda, }}, /* Byte value: 0x7c */ + {{0x5d, 0xf3, 0x17, 0x0f, 0x1e, 0x1f, 0x6c, 0xc1, }}, /* Byte value: 0x7d */ + {{0xa3, 0x6d, 0xd4, 0xa6, 0x8f, 0xfa, 0x32, 0x63, }}, /* Byte value: 0x7e */ + {{0x4e, 0x49, 0xa9, 0xfa, 0x37, 0x98, 0x47, 0x72, }}, /* Byte value: 0x7f */ + {{0x93, 0x19, 0xf7, 0xbd, 0xb9, 0x70, 0xce, 0xdc, }}, /* Byte value: 0x80 */ + {{0x38, 0x62, 0x73, 0xfe, 0x3f, 0x08, 0xd6, 0xd5, }}, /* Byte value: 0x81 */ + {{0xd3, 0xa9, 0x32, 0x99, 0xf1, 0xea, 0x5d, 0x0a, }}, /* Byte value: 0x82 */ + {{0xa0, 0xfb, 0xca, 0x5a, 0xb4, 0xba, 0x4d, 0x04, }}, /* Byte value: 0x83 */ + {{0x56, 0x73, 0x59, 0x16, 0x2c, 0xdd, 0x39, 0xcc, }}, /* Byte value: 0x84 */ + {{0xe9, 0x2f, 0x55, 0xcf, 0x5d, 0x23, 0x60, 0x24, }}, /* Byte value: 0x85 */ + {{0xb3, 0x41, 0x74, 0xaf, 0x9d, 0x3d, 0x66, 0xb7, }}, /* Byte value: 0x86 */ + {{0xfc, 0x7a, 0xd7, 0x01, 0x02, 0x24, 0xb5, 0x59, }}, /* Byte value: 0x87 */ + {{0x9e, 0x76, 0x85, 0x9f, 0xfd, 0x32, 0x65, 0x1f, }}, /* Byte value: 0x88 */ + {{0x02, 0xe4, 0x14, 0xa8, 0x93, 0xc1, 0xeb, 0xfb, }}, /* Byte value: 0x89 */ + {{0xd7, 0xa2, 0x1a, 0x0a, 0x14, 0xab, 0x48, 0x3f, }}, /* Byte value: 0x8a */ + {{0xe3, 0xdd, 0x11, 0x82, 0xc7, 0x60, 0xa1, 0xb5, }}, /* Byte value: 0x8b */ + {{0xac, 0xe6, 0xb2, 0x2c, 0x58, 0x79, 0x72, 0x5b, }}, /* Byte value: 0x8c */ + {{0xa6, 0x14, 0xf6, 0x61, 0xc2, 0x3a, 0xb3, 0xca, }}, /* Byte value: 0x8d */ + {{0xba, 0x25, 0x2e, 0x1e, 0x3c, 0x3e, 0xd8, 0x41, }}, /* Byte value: 0x8e */ + {{0xdb, 0xbf, 0x62, 0x7c, 0xf8, 0x68, 0x77, 0x60, }}, /* Byte value: 0x8f */ + {{0x8c, 0xbe, 0x31, 0x3e, 0x7c, 0x34, 0xda, 0x30, }}, /* Byte value: 0x90 */ + {{0x31, 0x06, 0x29, 0x4f, 0x9e, 0x0b, 0x68, 0x23, }}, /* Byte value: 0x91 */ + {{0x66, 0x07, 0x7a, 0x0d, 0x1a, 0x57, 0xc5, 0x73, }}, /* Byte value: 0x92 */ + {{0xda, 0xcd, 0x68, 0x28, 0x50, 0xe9, 0xe3, 0xfc, }}, /* Byte value: 0x93 */ + {{0xd9, 0x5b, 0x76, 0xd4, 0x6b, 0xa9, 0x9c, 0x9b, }}, /* Byte value: 0x94 */ + {{0x2d, 0x37, 0xf1, 0x30, 0x60, 0x0f, 0x03, 0xa8, }}, /* Byte value: 0x95 */ + {{0xfe, 0x9e, 0xc3, 0xa9, 0x91, 0xe5, 0x5e, 0xa2, }}, /* Byte value: 0x96 */ + {{0x14, 0x27, 0x88, 0x9a, 0xf7, 0x86, 0x41, 0xe1, }}, /* Byte value: 0x97 */ + {{0x48, 0xa6, 0x95, 0xc1, 0x41, 0x18, 0xb9, 0xbc, }}, /* Byte value: 0x98 */ + {{0x81, 0xd1, 0x43, 0x1c, 0x38, 0x76, 0x71, 0xf3, }}, /* Byte value: 0x99 */ + {{0x39, 0x10, 0x79, 0xaa, 0x97, 0x89, 0x42, 0x49, }}, /* Byte value: 0x9a */ + {{0x72, 0x20, 0xf2, 0x97, 0xed, 0xd1, 0x84, 0x92, }}, /* Byte value: 0x9b */ + {{0x10, 0x2c, 0xa0, 0x09, 0x12, 0xc7, 0x54, 0xd4, }}, /* Byte value: 0x9c */ + {{0xf5, 0x1e, 0x8d, 0xb0, 0xa3, 0x27, 0x0b, 0xaf, }}, /* Byte value: 0x9d */ + {{0x9f, 0x04, 0x8f, 0xcb, 0x55, 0xb3, 0xf1, 0x83, }}, /* Byte value: 0x9e */ + {{0xf7, 0xfa, 0x99, 0x18, 0x30, 0xe6, 0xe0, 0x54, }}, /* Byte value: 0x9f */ + {{0xd8, 0x29, 0x7c, 0x80, 0xc3, 0x28, 0x08, 0x07, }}, /* Byte value: 0xa0 */ + {{0xf6, 0x88, 0x93, 0x4c, 0x98, 0x67, 0x74, 0xc8, }}, /* Byte value: 0xa1 */ + {{0x5c, 0x81, 0x1d, 0x5b, 0xb6, 0x9e, 0xf8, 0x5d, }}, /* Byte value: 0xa2 */ + {{0x9d, 0xe0, 0x9b, 0x63, 0xc6, 0x72, 0x1a, 0x78, }}, /* Byte value: 0xa3 */ + {{0x62, 0x0c, 0x52, 0x9e, 0xff, 0x16, 0xd0, 0x46, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0xce, 0xea, 0xe0, 0xb2, 0xa7, 0x6f, 0xa2, 0x1d, }}, /* Byte value: 0xa6 */ + {{0x8f, 0x28, 0x2f, 0xc2, 0x47, 0x74, 0xa5, 0x57, }}, /* Byte value: 0xa7 */ + {{0x85, 0xda, 0x6b, 0x8f, 0xdd, 0x37, 0x64, 0xc6, }}, /* Byte value: 0xa8 */ + {{0xf3, 0xf1, 0xb1, 0x8b, 0xd5, 0xa7, 0xf5, 0x61, }}, /* Byte value: 0xa9 */ + {{0x23, 0xce, 0x9d, 0xee, 0x1f, 0x0d, 0xd7, 0x0c, }}, /* Byte value: 0xaa */ + {{0x42, 0x54, 0xd1, 0x8c, 0xdb, 0x5b, 0x78, 0x2d, }}, /* Byte value: 0xab */ + {{0xbb, 0x57, 0x24, 0x4a, 0x94, 0xbf, 0x4c, 0xdd, }}, /* Byte value: 0xac */ + {{0xfb, 0xe7, 0xe1, 0x6e, 0xdc, 0x25, 0xdf, 0x0b, }}, /* Byte value: 0xad */ + {{0x41, 0xc2, 0xcf, 0x70, 0xe0, 0x1b, 0x07, 0x4a, }}, /* Byte value: 0xae */ + {{0x21, 0x2a, 0x89, 0x46, 0x8c, 0xcc, 0x3c, 0xf7, }}, /* Byte value: 0xaf */ + {{0x47, 0x2d, 0xf3, 0x4b, 0x96, 0x9b, 0xf9, 0x84, }}, /* Byte value: 0xb0 */ + {{0xc6, 0xfc, 0xb0, 0x57, 0xae, 0xed, 0x88, 0x77, }}, /* Byte value: 0xb1 */ + {{0x1d, 0x43, 0xd2, 0x2b, 0x56, 0x85, 0xff, 0x17, }}, /* Byte value: 0xb2 */ + {{0x58, 0x8a, 0x35, 0xc8, 0x53, 0xdf, 0xed, 0x68, }}, /* Byte value: 0xb3 */ + {{0x08, 0x16, 0x50, 0xe5, 0x09, 0x82, 0x2a, 0x6a, }}, /* Byte value: 0xb4 */ + {{0x0a, 0xf2, 0x44, 0x4d, 0x9a, 0x43, 0xc1, 0x91, }}, /* Byte value: 0xb5 */ + {{0xdc, 0x22, 0x54, 0x13, 0x26, 0x69, 0x1d, 0x32, }}, /* Byte value: 0xb6 */ + {{0x05, 0x79, 0x22, 0xc7, 0x4d, 0xc0, 0x81, 0xa9, }}, /* Byte value: 0xb7 */ + {{0x3a, 0x86, 0x67, 0x56, 0xac, 0xc9, 0x3d, 0x2e, }}, /* Byte value: 0xb8 */ + {{0x3f, 0xff, 0x45, 0x91, 0xe1, 0x09, 0xbc, 0x87, }}, /* Byte value: 0xb9 */ + {{0x4a, 0x42, 0x81, 0x69, 0xd2, 0xd9, 0x52, 0x47, }}, /* Byte value: 0xba */ + {{0xe5, 0x32, 0x2d, 0xb9, 0xb1, 0xe0, 0x5f, 0x7b, }}, /* Byte value: 0xbb */ + {{0x18, 0x3a, 0xf0, 0xec, 0x1b, 0x45, 0x7e, 0xbe, }}, /* Byte value: 0xbc */ + {{0x0c, 0x1d, 0x78, 0x76, 0xec, 0xc3, 0x3f, 0x5f, }}, /* Byte value: 0xbd */ + {{0x64, 0xe3, 0x6e, 0xa5, 0x89, 0x96, 0x2e, 0x88, }}, /* Byte value: 0xbe */ + {{0xf8, 0x71, 0xff, 0x92, 0xe7, 0x65, 0xa0, 0x6c, }}, /* Byte value: 0xbf */ + {{0x3c, 0x69, 0x5b, 0x6d, 0xda, 0x49, 0xc3, 0xe0, }}, /* Byte value: 0xc0 */ + {{0x7f, 0x4f, 0x80, 0xb5, 0xa9, 0x93, 0x2f, 0x51, }}, /* Byte value: 0xc1 */ + {{0x25, 0x21, 0xa1, 0xd5, 0x69, 0x8d, 0x29, 0xc2, }}, /* Byte value: 0xc2 */ + {{0x68, 0xfe, 0x16, 0xd3, 0x65, 0x55, 0x11, 0xd7, }}, /* Byte value: 0xc3 */ + {{0xa5, 0x82, 0xe8, 0x9d, 0xf9, 0x7a, 0xcc, 0xad, }}, /* Byte value: 0xc4 */ + {{0x0e, 0xf9, 0x6c, 0xde, 0x7f, 0x02, 0xd4, 0xa4, }}, /* Byte value: 0xc5 */ + {{0xb9, 0xb3, 0x30, 0xe2, 0x07, 0x7e, 0xa7, 0x26, }}, /* Byte value: 0xc6 */ + {{0xaa, 0x09, 0x8e, 0x17, 0x2e, 0xf9, 0x8c, 0x95, }}, /* Byte value: 0xc7 */ + {{0x2e, 0xa1, 0xef, 0xcc, 0x5b, 0x4f, 0x7c, 0xcf, }}, /* Byte value: 0xc8 */ + {{0x12, 0xc8, 0xb4, 0xa1, 0x81, 0x06, 0xbf, 0x2f, }}, /* Byte value: 0xc9 */ + {{0x8a, 0x51, 0x0d, 0x05, 0x0a, 0xb4, 0x24, 0xfe, }}, /* Byte value: 0xca */ + {{0x6b, 0x68, 0x08, 0x2f, 0x5e, 0x15, 0x6e, 0xb0, }}, /* Byte value: 0xcb */ + {{0xdd, 0x50, 0x5e, 0x47, 0x8e, 0xe8, 0x89, 0xae, }}, /* Byte value: 0xcc */ + {{0xe6, 0xa4, 0x33, 0x45, 0x8a, 0xa0, 0x20, 0x1c, }}, /* Byte value: 0xcd */ + {{0xb0, 0xd7, 0x6a, 0x53, 0xa6, 0x7d, 0x19, 0xd0, }}, /* Byte value: 0xce */ + {{0x94, 0x84, 0xc1, 0xd2, 0x67, 0x71, 0xa4, 0x8e, }}, /* Byte value: 0xcf */ + {{0xc5, 0x6a, 0xae, 0xab, 0x95, 0xad, 0xf7, 0x10, }}, /* Byte value: 0xd0 */ + {{0xcc, 0x0e, 0xf4, 0x1a, 0x34, 0xae, 0x49, 0xe6, }}, /* Byte value: 0xd1 */ + {{0x0b, 0x80, 0x4e, 0x19, 0x32, 0xc2, 0x55, 0x0d, }}, /* Byte value: 0xd2 */ + {{0x2c, 0x45, 0xfb, 0x64, 0xc8, 0x8e, 0x97, 0x34, }}, /* Byte value: 0xd3 */ + {{0x82, 0x47, 0x5d, 0xe0, 0x03, 0x36, 0x0e, 0x94, }}, /* Byte value: 0xd4 */ + {{0x1f, 0xa7, 0xc6, 0x83, 0xc5, 0x44, 0x14, 0xec, }}, /* Byte value: 0xd5 */ + {{0x9b, 0x0f, 0xa7, 0x58, 0xb0, 0xf2, 0xe4, 0xb6, }}, /* Byte value: 0xd6 */ + {{0xee, 0xb2, 0x63, 0xa0, 0x83, 0x22, 0x0a, 0x76, }}, /* Byte value: 0xd7 */ + {{0x73, 0x52, 0xf8, 0xc3, 0x45, 0x50, 0x10, 0x0e, }}, /* Byte value: 0xd8 */ + {{0xa9, 0x9f, 0x90, 0xeb, 0x15, 0xb9, 0xf3, 0xf2, }}, /* Byte value: 0xd9 */ + {{0x7b, 0x44, 0xa8, 0x26, 0x4c, 0xd2, 0x3a, 0x64, }}, /* Byte value: 0xda */ + {{0xca, 0xe1, 0xc8, 0x21, 0x42, 0x2e, 0xb7, 0x28, }}, /* Byte value: 0xdb */ + {{0x27, 0xc5, 0xb5, 0x7d, 0xfa, 0x4c, 0xc2, 0x39, }}, /* Byte value: 0xdc */ + {{0xaf, 0x70, 0xac, 0xd0, 0x63, 0x39, 0x0d, 0x3c, }}, /* Byte value: 0xdd */ + {{0x7e, 0x3d, 0x8a, 0xe1, 0x01, 0x12, 0xbb, 0xcd, }}, /* Byte value: 0xde */ + {{0x15, 0x55, 0x82, 0xce, 0x5f, 0x07, 0xd5, 0x7d, }}, /* Byte value: 0xdf */ + {{0x34, 0x7f, 0x0b, 0x88, 0xd3, 0xcb, 0xe9, 0x8a, }}, /* Byte value: 0xe0 */ + {{0x0f, 0x8b, 0x66, 0x8a, 0xd7, 0x83, 0x40, 0x38, }}, /* Byte value: 0xe1 */ + {{0x60, 0xe8, 0x46, 0x36, 0x6c, 0xd7, 0x3b, 0xbd, }}, /* Byte value: 0xe2 */ + {{0x03, 0x96, 0x1e, 0xfc, 0x3b, 0x40, 0x7f, 0x67, }}, /* Byte value: 0xe3 */ + {{0x97, 0x12, 0xdf, 0x2e, 0x5c, 0x31, 0xdb, 0xe9, }}, /* Byte value: 0xe4 */ + {{0xe2, 0xaf, 0x1b, 0xd6, 0x6f, 0xe1, 0x35, 0x29, }}, /* Byte value: 0xe5 */ + {{0x44, 0xbb, 0xed, 0xb7, 0xad, 0xdb, 0x86, 0xe3, }}, /* Byte value: 0xe6 */ + {{0xa4, 0xf0, 0xe2, 0xc9, 0x51, 0xfb, 0x58, 0x31, }}, /* Byte value: 0xe7 */ + {{0x6e, 0x11, 0x2a, 0xe8, 0x13, 0xd5, 0xef, 0x19, }}, /* Byte value: 0xe8 */ + {{0x1c, 0x31, 0xd8, 0x7f, 0xfe, 0x04, 0x6b, 0x8b, }}, /* Byte value: 0xe9 */ + {{0x9a, 0x7d, 0xad, 0x0c, 0x18, 0x73, 0x70, 0x2a, }}, /* Byte value: 0xea */ + {{0xa2, 0x1f, 0xde, 0xf2, 0x27, 0x7b, 0xa6, 0xff, }}, /* Byte value: 0xeb */ + {{0x86, 0x4c, 0x75, 0x73, 0xe6, 0x77, 0x1b, 0xa1, }}, /* Byte value: 0xec */ + {{0x22, 0xbc, 0x97, 0xba, 0xb7, 0x8c, 0x43, 0x90, }}, /* Byte value: 0xed */ + {{0xb6, 0x38, 0x56, 0x68, 0xd0, 0xfd, 0xe7, 0x1e, }}, /* Byte value: 0xee */ + {{0xe0, 0x4b, 0x0f, 0x7e, 0xfc, 0x20, 0xde, 0xd2, }}, /* Byte value: 0xef */ + {{0x36, 0x9b, 0x1f, 0x20, 0x40, 0x0a, 0x02, 0x71, }}, /* Byte value: 0xf0 */ + {{0x91, 0xfd, 0xe3, 0x15, 0x2a, 0xb1, 0x25, 0x27, }}, /* Byte value: 0xf1 */ + {{0xa1, 0x89, 0xc0, 0x0e, 0x1c, 0x3b, 0xd9, 0x98, }}, /* Byte value: 0xf2 */ + {{0x30, 0x74, 0x23, 0x1b, 0x36, 0x8a, 0xfc, 0xbf, }}, /* Byte value: 0xf3 */ + {{0xf9, 0x03, 0xf5, 0xc6, 0x4f, 0xe4, 0x34, 0xf0, }}, /* Byte value: 0xf4 */ + {{0x71, 0xb6, 0xec, 0x6b, 0xd6, 0x91, 0xfb, 0xf5, }}, /* Byte value: 0xf5 */ + {{0x19, 0x48, 0xfa, 0xb8, 0xb3, 0xc4, 0xea, 0x22, }}, /* Byte value: 0xf6 */ + {{0xb8, 0xc1, 0x3a, 0xb6, 0xaf, 0xff, 0x33, 0xba, }}, /* Byte value: 0xf7 */ + {{0xeb, 0xcb, 0x41, 0x67, 0xce, 0xe2, 0x8b, 0xdf, }}, /* Byte value: 0xf8 */ + {{0x29, 0x3c, 0xd9, 0xa3, 0x85, 0x4e, 0x16, 0x9d, }}, /* Byte value: 0xf9 */ + {{0xd5, 0x46, 0x0e, 0xa2, 0x87, 0x6a, 0xa3, 0xc4, }}, /* Byte value: 0xfa */ + {{0x2a, 0xaa, 0xc7, 0x5f, 0xbe, 0x0e, 0x69, 0xfa, }}, /* Byte value: 0xfb */ + {{0x6a, 0x1a, 0x02, 0x7b, 0xf6, 0x94, 0xfa, 0x2c, }}, /* Byte value: 0xfc */ + {{0xbe, 0x2e, 0x06, 0x8d, 0xd9, 0x7f, 0xcd, 0x74, }}, /* Byte value: 0xfd */ + {{0x87, 0x3e, 0x7f, 0x27, 0x4e, 0xf6, 0x8f, 0x3d, }}, /* Byte value: 0xfe */ + {{0x8b, 0x23, 0x07, 0x51, 0xa2, 0x35, 0xb0, 0x62, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 2 */ + {{0x69, 0x19, 0x54, 0xd6, 0xaf, 0xcb, 0x37, 0x52, }}, /* Byte value: 0x00 */ + {{0x03, 0x7b, 0x5a, 0xc3, 0x52, 0x7d, 0x93, 0x1c, }}, /* Byte value: 0x01 */ + {{0x63, 0xc0, 0x4b, 0x19, 0x80, 0x06, 0xdb, 0x1a, }}, /* Byte value: 0x02 */ + {{0x20, 0x69, 0x0f, 0xf7, 0x4e, 0x29, 0x38, 0x02, }}, /* Byte value: 0x03 */ + {{0x09, 0xa2, 0x45, 0x0c, 0x7d, 0xb0, 0x7f, 0x54, }}, /* Byte value: 0x04 */ + {{0x72, 0x3c, 0x9b, 0xc2, 0x28, 0xd8, 0xb6, 0xae, }}, /* Byte value: 0x05 */ + {{0xad, 0x08, 0xae, 0x66, 0xb1, 0x91, 0xa0, 0xcf, }}, /* Byte value: 0x06 */ + {{0x33, 0xc7, 0xb3, 0xae, 0x3b, 0xa1, 0xb7, 0x1f, }}, /* Byte value: 0x07 */ + {{0x7a, 0xb7, 0xe8, 0x8f, 0xda, 0x43, 0xb8, 0x4f, }}, /* Byte value: 0x08 */ + {{0xf1, 0x20, 0xfd, 0x5b, 0x81, 0x01, 0xc5, 0xba, }}, /* Byte value: 0x09 */ + {{0xfd, 0x0f, 0x56, 0xd1, 0x0a, 0x36, 0xcc, 0xca, }}, /* Byte value: 0x0a */ + {{0x70, 0x6e, 0xf7, 0x40, 0xf5, 0x8e, 0x54, 0x07, }}, /* Byte value: 0x0b */ + {{0xc7, 0x6a, 0xa0, 0x73, 0x4c, 0x27, 0x04, 0x81, }}, /* Byte value: 0x0c */ + {{0x76, 0x98, 0x43, 0x05, 0x51, 0x74, 0xb1, 0x3f, }}, /* Byte value: 0x0d */ + {{0x59, 0xa5, 0xbd, 0xbb, 0xc6, 0x17, 0x13, 0x51, }}, /* Byte value: 0x0e */ + {{0xb5, 0x56, 0x3b, 0xb1, 0x64, 0xff, 0xb2, 0x2f, }}, /* Byte value: 0x0f */ + {{0x10, 0xd5, 0xe6, 0x9a, 0x27, 0xf5, 0x1c, 0x01, }}, /* Byte value: 0x10 */ + {{0xe0, 0xdc, 0x2d, 0x80, 0x29, 0xdf, 0xa8, 0x0e, }}, /* Byte value: 0x11 */ + {{0x82, 0x35, 0x50, 0xd8, 0x26, 0xf2, 0x02, 0xa1, }}, /* Byte value: 0x12 */ + {{0xf7, 0xd6, 0x49, 0x1e, 0x25, 0xfb, 0x20, 0x82, }}, /* Byte value: 0x13 */ + {{0x9c, 0x9d, 0x71, 0x4a, 0x57, 0x66, 0xf5, 0x79, }}, /* Byte value: 0x14 */ + {{0xab, 0xfe, 0x1a, 0x23, 0x15, 0x6b, 0x45, 0xf7, }}, /* Byte value: 0x15 */ + {{0xe3, 0xa7, 0x77, 0x43, 0x7b, 0xa2, 0x3b, 0x12, }}, /* Byte value: 0x16 */ + {{0x24, 0xcd, 0xd7, 0x30, 0x37, 0x85, 0x3f, 0x93, }}, /* Byte value: 0x17 */ + {{0xb4, 0x7f, 0x0d, 0xf0, 0xeb, 0xd4, 0xc3, 0x9a, }}, /* Byte value: 0x18 */ + {{0xbe, 0xa6, 0x12, 0x3f, 0xc4, 0x19, 0x2f, 0xd2, }}, /* Byte value: 0x19 */ + {{0x05, 0x8d, 0xee, 0x86, 0xf6, 0x87, 0x76, 0x24, }}, /* Byte value: 0x1a */ + {{0xa3, 0x75, 0x69, 0x6e, 0xe7, 0xf0, 0x4b, 0x16, }}, /* Byte value: 0x1b */ + {{0xfe, 0x74, 0x0c, 0x12, 0x58, 0x4b, 0x5f, 0xd6, }}, /* Byte value: 0x1c */ + {{0xc4, 0x11, 0xfa, 0xb0, 0x1e, 0x5a, 0x97, 0x9d, }}, /* Byte value: 0x1d */ + {{0xdf, 0x34, 0x35, 0xa4, 0x99, 0x49, 0x16, 0x61, }}, /* Byte value: 0x1e */ + {{0x2f, 0x3d, 0xfe, 0xbe, 0x97, 0x63, 0xa2, 0x6e, }}, /* Byte value: 0x1f */ + {{0xb7, 0x04, 0x57, 0x33, 0xb9, 0xa9, 0x50, 0x86, }}, /* Byte value: 0x20 */ + {{0x15, 0x58, 0x08, 0x1c, 0xd1, 0x72, 0x6a, 0x25, }}, /* Byte value: 0x21 */ + {{0x8a, 0xbe, 0x23, 0x95, 0xd4, 0x69, 0x0c, 0x40, }}, /* Byte value: 0x22 */ + {{0x01, 0x29, 0x36, 0x41, 0x8f, 0x2b, 0x71, 0xb5, }}, /* Byte value: 0x23 */ + {{0xe8, 0x57, 0x5e, 0xcd, 0xdb, 0x44, 0xa6, 0xef, }}, /* Byte value: 0x24 */ + {{0x95, 0x3f, 0x34, 0x46, 0x2a, 0xd6, 0x8a, 0x2d, }}, /* Byte value: 0x25 */ + {{0x84, 0xc3, 0xe4, 0x9d, 0x82, 0x08, 0xe7, 0x99, }}, /* Byte value: 0x26 */ + {{0x0a, 0xd9, 0x1f, 0xcf, 0x2f, 0xcd, 0xec, 0x48, }}, /* Byte value: 0x27 */ + {{0xf6, 0xff, 0x7f, 0x5f, 0xaa, 0xd0, 0x51, 0x37, }}, /* Byte value: 0x28 */ + {{0x4c, 0xfd, 0xb5, 0xa7, 0x17, 0x65, 0x79, 0x74, }}, /* Byte value: 0x29 */ + {{0xc1, 0x9c, 0x14, 0x36, 0xe8, 0xdd, 0xe1, 0xb9, }}, /* Byte value: 0x2a */ + {{0x14, 0x71, 0x3e, 0x5d, 0x5e, 0x59, 0x1b, 0x90, }}, /* Byte value: 0x2b */ + {{0x89, 0xc5, 0x79, 0x56, 0x86, 0x14, 0x9f, 0x5c, }}, /* Byte value: 0x2c */ + {{0x87, 0xb8, 0xbe, 0x5e, 0xd0, 0x75, 0x74, 0x85, }}, /* Byte value: 0x2d */ + {{0x57, 0xd8, 0x7a, 0xb3, 0x90, 0x76, 0xf8, 0x88, }}, /* Byte value: 0x2e */ + {{0x78, 0xe5, 0x84, 0x0d, 0x07, 0x15, 0x5a, 0xe6, }}, /* Byte value: 0x2f */ + {{0xde, 0x1d, 0x03, 0xe5, 0x16, 0x62, 0x67, 0xd4, }}, /* Byte value: 0x30 */ + {{0x28, 0xe2, 0x7c, 0xba, 0xbc, 0xb2, 0x36, 0xe3, }}, /* Byte value: 0x31 */ + {{0xcd, 0xb3, 0xbf, 0xbc, 0x63, 0xea, 0xe8, 0xc9, }}, /* Byte value: 0x32 */ + {{0xda, 0xb9, 0xdb, 0x22, 0x6f, 0xce, 0x60, 0x45, }}, /* Byte value: 0x33 */ + {{0x6f, 0xef, 0xe0, 0x93, 0x0b, 0x31, 0xd2, 0x6a, }}, /* Byte value: 0x34 */ + {{0x2b, 0x99, 0x26, 0x79, 0xee, 0xcf, 0xa5, 0xff, }}, /* Byte value: 0x35 */ + {{0xd0, 0x60, 0xc4, 0xed, 0x40, 0x03, 0x8c, 0x0d, }}, /* Byte value: 0x36 */ + {{0xfc, 0x26, 0x60, 0x90, 0x85, 0x1d, 0xbd, 0x7f, }}, /* Byte value: 0x37 */ + {{0x94, 0x16, 0x02, 0x07, 0xa5, 0xfd, 0xfb, 0x98, }}, /* Byte value: 0x38 */ + {{0xf8, 0x82, 0xb8, 0x57, 0xfc, 0xb1, 0xba, 0xee, }}, /* Byte value: 0x39 */ + {{0x49, 0x70, 0x5b, 0x21, 0xe1, 0xe2, 0x0f, 0x50, }}, /* Byte value: 0x3a */ + {{0x64, 0x1f, 0xc9, 0x1d, 0xab, 0xd7, 0x4f, 0x97, }}, /* Byte value: 0x3b */ + {{0x52, 0x55, 0x94, 0x35, 0x66, 0xf1, 0x8e, 0xac, }}, /* Byte value: 0x3c */ + {{0x56, 0xf1, 0x4c, 0xf2, 0x1f, 0x5d, 0x89, 0x3d, }}, /* Byte value: 0x3d */ + {{0x45, 0x5f, 0xf0, 0xab, 0x6a, 0xd5, 0x06, 0x20, }}, /* Byte value: 0x3e */ + {{0x06, 0xf6, 0xb4, 0x45, 0xa4, 0xfa, 0xe5, 0x38, }}, /* Byte value: 0x3f */ + {{0xdd, 0x66, 0x59, 0x26, 0x44, 0x1f, 0xf4, 0xc8, }}, /* Byte value: 0x40 */ + {{0x73, 0x15, 0xad, 0x83, 0xa7, 0xf3, 0xc7, 0x1b, }}, /* Byte value: 0x41 */ + {{0x66, 0x4d, 0xa5, 0x9f, 0x76, 0x81, 0xad, 0x3e, }}, /* Byte value: 0x42 */ + {{0xf9, 0xab, 0x8e, 0x16, 0x73, 0x9a, 0xcb, 0x5b, }}, /* Byte value: 0x43 */ + {{0x5a, 0xde, 0xe7, 0x78, 0x94, 0x6a, 0x80, 0x4d, }}, /* Byte value: 0x44 */ + {{0x1a, 0x0c, 0xf9, 0x55, 0x08, 0x38, 0xf0, 0x49, }}, /* Byte value: 0x45 */ + {{0x6b, 0x4b, 0x38, 0x54, 0x72, 0x9d, 0xd5, 0xfb, }}, /* Byte value: 0x46 */ + {{0x04, 0xa4, 0xd8, 0xc7, 0x79, 0xac, 0x07, 0x91, }}, /* Byte value: 0x47 */ + {{0x4f, 0x86, 0xef, 0x64, 0x45, 0x18, 0xea, 0x68, }}, /* Byte value: 0x48 */ + {{0xf2, 0x5b, 0xa7, 0x98, 0xd3, 0x7c, 0x56, 0xa6, }}, /* Byte value: 0x49 */ + {{0xe6, 0x2a, 0x99, 0xc5, 0x8d, 0x25, 0x4d, 0x36, }}, /* Byte value: 0x4a */ + {{0x31, 0x95, 0xdf, 0x2c, 0xe6, 0xf7, 0x55, 0xb6, }}, /* Byte value: 0x4b */ + {{0xee, 0xa1, 0xea, 0x88, 0x7f, 0xbe, 0x43, 0xd7, }}, /* Byte value: 0x4c */ + {{0x55, 0x8a, 0x16, 0x31, 0x4d, 0x20, 0x1a, 0x21, }}, /* Byte value: 0x4d */ + {{0x8e, 0x1a, 0xfb, 0x52, 0xad, 0xc5, 0x0b, 0xd1, }}, /* Byte value: 0x4e */ + {{0x43, 0xa9, 0x44, 0xee, 0xce, 0x2f, 0xe3, 0x18, }}, /* Byte value: 0x4f */ + {{0x85, 0xea, 0xd2, 0xdc, 0x0d, 0x23, 0x96, 0x2c, }}, /* Byte value: 0x50 */ + {{0xf3, 0x72, 0x91, 0xd9, 0x5c, 0x57, 0x27, 0x13, }}, /* Byte value: 0x51 */ + {{0x26, 0x9f, 0xbb, 0xb2, 0xea, 0xd3, 0xdd, 0x3a, }}, /* Byte value: 0x52 */ + {{0xea, 0x05, 0x32, 0x4f, 0x06, 0x12, 0x44, 0x46, }}, /* Byte value: 0x53 */ + {{0xb2, 0x89, 0xb9, 0xb5, 0x4f, 0x2e, 0x26, 0xa2, }}, /* Byte value: 0x54 */ + {{0xeb, 0x2c, 0x04, 0x0e, 0x89, 0x39, 0x35, 0xf3, }}, /* Byte value: 0x55 */ + {{0x67, 0x64, 0x93, 0xde, 0xf9, 0xaa, 0xdc, 0x8b, }}, /* Byte value: 0x56 */ + {{0x6a, 0x62, 0x0e, 0x15, 0xfd, 0xb6, 0xa4, 0x4e, }}, /* Byte value: 0x57 */ + {{0xfa, 0xd0, 0xd4, 0xd5, 0x21, 0xe7, 0x58, 0x47, }}, /* Byte value: 0x58 */ + {{0x3e, 0xc1, 0x2e, 0x65, 0x3f, 0xbd, 0xcf, 0xda, }}, /* Byte value: 0x59 */ + {{0xed, 0xda, 0xb0, 0x4b, 0x2d, 0xc3, 0xd0, 0xcb, }}, /* Byte value: 0x5a */ + {{0xca, 0x6c, 0x3d, 0xb8, 0x48, 0x3b, 0x7c, 0x44, }}, /* Byte value: 0x5b */ + {{0x3d, 0xba, 0x74, 0xa6, 0x6d, 0xc0, 0x5c, 0xc6, }}, /* Byte value: 0x5c */ + {{0x48, 0x59, 0x6d, 0x60, 0x6e, 0xc9, 0x7e, 0xe5, }}, /* Byte value: 0x5d */ + {{0x12, 0x87, 0x8a, 0x18, 0xfa, 0xa3, 0xfe, 0xa8, }}, /* Byte value: 0x5e */ + {{0x62, 0xe9, 0x7d, 0x58, 0x0f, 0x2d, 0xaa, 0xaf, }}, /* Byte value: 0x5f */ + {{0x79, 0xcc, 0xb2, 0x4c, 0x88, 0x3e, 0x2b, 0x53, }}, /* Byte value: 0x60 */ + {{0x7b, 0x9e, 0xde, 0xce, 0x55, 0x68, 0xc9, 0xfa, }}, /* Byte value: 0x61 */ + {{0x42, 0x80, 0x72, 0xaf, 0x41, 0x04, 0x92, 0xad, }}, /* Byte value: 0x62 */ + {{0xb8, 0x50, 0xa6, 0x7a, 0x60, 0xe3, 0xca, 0xea, }}, /* Byte value: 0x63 */ + {{0xa7, 0xd1, 0xb1, 0xa9, 0x9e, 0x5c, 0x4c, 0x87, }}, /* Byte value: 0x64 */ + {{0x0b, 0xf0, 0x29, 0x8e, 0xa0, 0xe6, 0x9d, 0xfd, }}, /* Byte value: 0x65 */ + {{0xa9, 0xac, 0x76, 0xa1, 0xc8, 0x3d, 0xa7, 0x5e, }}, /* Byte value: 0x66 */ + {{0xbb, 0x2b, 0xfc, 0xb9, 0x32, 0x9e, 0x59, 0xf6, }}, /* Byte value: 0x67 */ + {{0xc8, 0x3e, 0x51, 0x3a, 0x95, 0x6d, 0x9e, 0xed, }}, /* Byte value: 0x68 */ + {{0x51, 0x2e, 0xce, 0xf6, 0x34, 0x8c, 0x1d, 0xb0, }}, /* Byte value: 0x69 */ + {{0x41, 0xfb, 0x28, 0x6c, 0x13, 0x79, 0x01, 0xb1, }}, /* Byte value: 0x6a */ + {{0xf5, 0x84, 0x25, 0x9c, 0xf8, 0xad, 0xc2, 0x2b, }}, /* Byte value: 0x6b */ + {{0xba, 0x02, 0xca, 0xf8, 0xbd, 0xb5, 0x28, 0x43, }}, /* Byte value: 0x6c */ + {{0xf0, 0x09, 0xcb, 0x1a, 0x0e, 0x2a, 0xb4, 0x0f, }}, /* Byte value: 0x6d */ + {{0x96, 0x44, 0x6e, 0x85, 0x78, 0xab, 0x19, 0x31, }}, /* Byte value: 0x6e */ + {{0xdc, 0x4f, 0x6f, 0x67, 0xcb, 0x34, 0x85, 0x7d, }}, /* Byte value: 0x6f */ + {{0xe7, 0x03, 0xaf, 0x84, 0x02, 0x0e, 0x3c, 0x83, }}, /* Byte value: 0x70 */ + {{0x2d, 0x6f, 0x92, 0x3c, 0x4a, 0x35, 0x40, 0xc7, }}, /* Byte value: 0x71 */ + {{0x92, 0xe0, 0xb6, 0x42, 0x01, 0x07, 0x1e, 0xa0, }}, /* Byte value: 0x72 */ + {{0x46, 0x24, 0xaa, 0x68, 0x38, 0xa8, 0x95, 0x3c, }}, /* Byte value: 0x73 */ + {{0x23, 0x12, 0x55, 0x34, 0x1c, 0x54, 0xab, 0x1e, }}, /* Byte value: 0x74 */ + {{0xf4, 0xad, 0x13, 0xdd, 0x77, 0x86, 0xb3, 0x9e, }}, /* Byte value: 0x75 */ + {{0x0e, 0x7d, 0xc7, 0x08, 0x56, 0x61, 0xeb, 0xd9, }}, /* Byte value: 0x76 */ + {{0xd5, 0xed, 0x2a, 0x6b, 0xb6, 0x84, 0xfa, 0x29, }}, /* Byte value: 0x77 */ + {{0x38, 0x37, 0x9a, 0x20, 0x9b, 0x47, 0x2a, 0xe2, }}, /* Byte value: 0x78 */ + {{0x27, 0xb6, 0x8d, 0xf3, 0x65, 0xf8, 0xac, 0x8f, }}, /* Byte value: 0x79 */ + {{0x3c, 0x93, 0x42, 0xe7, 0xe2, 0xeb, 0x2d, 0x73, }}, /* Byte value: 0x7a */ + {{0x71, 0x47, 0xc1, 0x01, 0x7a, 0xa5, 0x25, 0xb2, }}, /* Byte value: 0x7b */ + {{0xe2, 0x8e, 0x41, 0x02, 0xf4, 0x89, 0x4a, 0xa7, }}, /* Byte value: 0x7c */ + {{0x37, 0x63, 0x6b, 0x69, 0x42, 0x0d, 0xb0, 0x8e, }}, /* Byte value: 0x7d */ + {{0x6c, 0x94, 0xba, 0x50, 0x59, 0x4c, 0x41, 0x76, }}, /* Byte value: 0x7e */ + {{0x6d, 0xbd, 0x8c, 0x11, 0xd6, 0x67, 0x30, 0xc3, }}, /* Byte value: 0x7f */ + {{0xae, 0x73, 0xf4, 0xa5, 0xe3, 0xec, 0x33, 0xd3, }}, /* Byte value: 0x80 */ + {{0x5c, 0x28, 0x53, 0x3d, 0x30, 0x90, 0x65, 0x75, }}, /* Byte value: 0x81 */ + {{0xd4, 0xc4, 0x1c, 0x2a, 0x39, 0xaf, 0x8b, 0x9c, }}, /* Byte value: 0x82 */ + {{0xc9, 0x17, 0x67, 0x7b, 0x1a, 0x46, 0xef, 0x58, }}, /* Byte value: 0x83 */ + {{0x0c, 0x2f, 0xab, 0x8a, 0x8b, 0x37, 0x09, 0x70, }}, /* Byte value: 0x84 */ + {{0x4e, 0xaf, 0xd9, 0x25, 0xca, 0x33, 0x9b, 0xdd, }}, /* Byte value: 0x85 */ + {{0x93, 0xc9, 0x80, 0x03, 0x8e, 0x2c, 0x6f, 0x15, }}, /* Byte value: 0x86 */ + {{0x9d, 0xb4, 0x47, 0x0b, 0xd8, 0x4d, 0x84, 0xcc, }}, /* Byte value: 0x87 */ + {{0x1c, 0xfa, 0x4d, 0x10, 0xac, 0xc2, 0x15, 0x71, }}, /* Byte value: 0x88 */ + {{0xc6, 0x43, 0x96, 0x32, 0xc3, 0x0c, 0x75, 0x34, }}, /* Byte value: 0x89 */ + {{0x9b, 0x42, 0xf3, 0x4e, 0x7c, 0xb7, 0x61, 0xf4, }}, /* Byte value: 0x8a */ + {{0x16, 0x23, 0x52, 0xdf, 0x83, 0x0f, 0xf9, 0x39, }}, /* Byte value: 0x8b */ + {{0x18, 0x5e, 0x95, 0xd7, 0xd5, 0x6e, 0x12, 0xe0, }}, /* Byte value: 0x8c */ + {{0x40, 0xd2, 0x1e, 0x2d, 0x9c, 0x52, 0x70, 0x04, }}, /* Byte value: 0x8d */ + {{0x6e, 0xc6, 0xd6, 0xd2, 0x84, 0x1a, 0xa3, 0xdf, }}, /* Byte value: 0x8e */ + {{0x4a, 0x0b, 0x01, 0xe2, 0xb3, 0x9f, 0x9c, 0x4c, }}, /* Byte value: 0x8f */ + {{0x25, 0xe4, 0xe1, 0x71, 0xb8, 0xae, 0x4e, 0x26, }}, /* Byte value: 0x90 */ + {{0xa1, 0x27, 0x05, 0xec, 0x3a, 0xa6, 0xa9, 0xbf, }}, /* Byte value: 0x91 */ + {{0xce, 0xc8, 0xe5, 0x7f, 0x31, 0x97, 0x7b, 0xd5, }}, /* Byte value: 0x92 */ + {{0x29, 0xcb, 0x4a, 0xfb, 0x33, 0x99, 0x47, 0x56, }}, /* Byte value: 0x93 */ + {{0x8c, 0x48, 0x97, 0xd0, 0x70, 0x93, 0xe9, 0x78, }}, /* Byte value: 0x94 */ + {{0x8f, 0x33, 0xcd, 0x13, 0x22, 0xee, 0x7a, 0x64, }}, /* Byte value: 0x95 */ + {{0x5b, 0xf7, 0xd1, 0x39, 0x1b, 0x41, 0xf1, 0xf8, }}, /* Byte value: 0x96 */ + {{0xb0, 0xdb, 0xd5, 0x37, 0x92, 0x78, 0xc4, 0x0b, }}, /* Byte value: 0x97 */ + {{0xe4, 0x78, 0xf5, 0x47, 0x50, 0x73, 0xaf, 0x9f, }}, /* Byte value: 0x98 */ + {{0x97, 0x6d, 0x58, 0xc4, 0xf7, 0x80, 0x68, 0x84, }}, /* Byte value: 0x99 */ + {{0x3f, 0xe8, 0x18, 0x24, 0xb0, 0x96, 0xbe, 0x6f, }}, /* Byte value: 0x9a */ + {{0x7e, 0x13, 0x30, 0x48, 0xa3, 0xef, 0xbf, 0xde, }}, /* Byte value: 0x9b */ + {{0xff, 0x5d, 0x3a, 0x53, 0xd7, 0x60, 0x2e, 0x63, }}, /* Byte value: 0x9c */ + {{0x60, 0xbb, 0x11, 0xda, 0xd2, 0x7b, 0x48, 0x06, }}, /* Byte value: 0x9d */ + {{0x7f, 0x3a, 0x06, 0x09, 0x2c, 0xc4, 0xce, 0x6b, }}, /* Byte value: 0x9e */ + {{0xa6, 0xf8, 0x87, 0xe8, 0x11, 0x77, 0x3d, 0x32, }}, /* Byte value: 0x9f */ + {{0xef, 0x88, 0xdc, 0xc9, 0xf0, 0x95, 0x32, 0x62, }}, /* Byte value: 0xa0 */ + {{0xc5, 0x38, 0xcc, 0xf1, 0x91, 0x71, 0xe6, 0x28, }}, /* Byte value: 0xa1 */ + {{0x54, 0xa3, 0x20, 0x70, 0xc2, 0x0b, 0x6b, 0x94, }}, /* Byte value: 0xa2 */ + {{0xb9, 0x79, 0x90, 0x3b, 0xef, 0xc8, 0xbb, 0x5f, }}, /* Byte value: 0xa3 */ + {{0x81, 0x4e, 0x0a, 0x1b, 0x74, 0x8f, 0x91, 0xbd, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x99, 0x10, 0x9f, 0xcc, 0xa1, 0xe1, 0x83, 0x5d, }}, /* Byte value: 0xa6 */ + {{0x80, 0x67, 0x3c, 0x5a, 0xfb, 0xa4, 0xe0, 0x08, }}, /* Byte value: 0xa7 */ + {{0xd8, 0xeb, 0xb7, 0xa0, 0xb2, 0x98, 0x82, 0xec, }}, /* Byte value: 0xa8 */ + {{0xe9, 0x7e, 0x68, 0x8c, 0x54, 0x6f, 0xd7, 0x5a, }}, /* Byte value: 0xa9 */ + {{0x98, 0x39, 0xa9, 0x8d, 0x2e, 0xca, 0xf2, 0xe8, }}, /* Byte value: 0xaa */ + {{0xbc, 0xf4, 0x7e, 0xbd, 0x19, 0x4f, 0xcd, 0x7b, }}, /* Byte value: 0xab */ + {{0x0d, 0x06, 0x9d, 0xcb, 0x04, 0x1c, 0x78, 0xc5, }}, /* Byte value: 0xac */ + {{0x77, 0xb1, 0x75, 0x44, 0xde, 0x5f, 0xc0, 0x8a, }}, /* Byte value: 0xad */ + {{0x19, 0x77, 0xa3, 0x96, 0x5a, 0x45, 0x63, 0x55, }}, /* Byte value: 0xae */ + {{0x5e, 0x7a, 0x3f, 0xbf, 0xed, 0xc6, 0x87, 0xdc, }}, /* Byte value: 0xaf */ + {{0x90, 0xb2, 0xda, 0xc0, 0xdc, 0x51, 0xfc, 0x09, }}, /* Byte value: 0xb0 */ + {{0x07, 0xdf, 0x82, 0x04, 0x2b, 0xd1, 0x94, 0x8d, }}, /* Byte value: 0xb1 */ + {{0x4d, 0xd4, 0x83, 0xe6, 0x98, 0x4e, 0x08, 0xc1, }}, /* Byte value: 0xb2 */ + {{0x1b, 0x25, 0xcf, 0x14, 0x87, 0x13, 0x81, 0xfc, }}, /* Byte value: 0xb3 */ + {{0x9e, 0xcf, 0x1d, 0xc8, 0x8a, 0x30, 0x17, 0xd0, }}, /* Byte value: 0xb4 */ + {{0x58, 0x8c, 0x8b, 0xfa, 0x49, 0x3c, 0x62, 0xe4, }}, /* Byte value: 0xb5 */ + {{0xa0, 0x0e, 0x33, 0xad, 0xb5, 0x8d, 0xd8, 0x0a, }}, /* Byte value: 0xb6 */ + {{0x2c, 0x46, 0xa4, 0x7d, 0xc5, 0x1e, 0x31, 0x72, }}, /* Byte value: 0xb7 */ + {{0x9a, 0x6b, 0xc5, 0x0f, 0xf3, 0x9c, 0x10, 0x41, }}, /* Byte value: 0xb8 */ + {{0xb6, 0x2d, 0x61, 0x72, 0x36, 0x82, 0x21, 0x33, }}, /* Byte value: 0xb9 */ + {{0x22, 0x3b, 0x63, 0x75, 0x93, 0x7f, 0xda, 0xab, }}, /* Byte value: 0xba */ + {{0x9f, 0xe6, 0x2b, 0x89, 0x05, 0x1b, 0x66, 0x65, }}, /* Byte value: 0xbb */ + {{0x61, 0x92, 0x27, 0x9b, 0x5d, 0x50, 0x39, 0xb3, }}, /* Byte value: 0xbc */ + {{0xd1, 0x49, 0xf2, 0xac, 0xcf, 0x28, 0xfd, 0xb8, }}, /* Byte value: 0xbd */ + {{0x08, 0x8b, 0x73, 0x4d, 0xf2, 0x9b, 0x0e, 0xe1, }}, /* Byte value: 0xbe */ + {{0xd2, 0x32, 0xa8, 0x6f, 0x9d, 0x55, 0x6e, 0xa4, }}, /* Byte value: 0xbf */ + {{0x13, 0xae, 0xbc, 0x59, 0x75, 0x88, 0x8f, 0x1d, }}, /* Byte value: 0xc0 */ + {{0xcc, 0x9a, 0x89, 0xfd, 0xec, 0xc1, 0x99, 0x7c, }}, /* Byte value: 0xc1 */ + {{0x11, 0xfc, 0xd0, 0xdb, 0xa8, 0xde, 0x6d, 0xb4, }}, /* Byte value: 0xc2 */ + {{0xd9, 0xc2, 0x81, 0xe1, 0x3d, 0xb3, 0xf3, 0x59, }}, /* Byte value: 0xc3 */ + {{0xe5, 0x51, 0xc3, 0x06, 0xdf, 0x58, 0xde, 0x2a, }}, /* Byte value: 0xc4 */ + {{0x17, 0x0a, 0x64, 0x9e, 0x0c, 0x24, 0x88, 0x8c, }}, /* Byte value: 0xc5 */ + {{0xcb, 0x45, 0x0b, 0xf9, 0xc7, 0x10, 0x0d, 0xf1, }}, /* Byte value: 0xc6 */ + {{0x91, 0x9b, 0xec, 0x81, 0x53, 0x7a, 0x8d, 0xbc, }}, /* Byte value: 0xc7 */ + {{0x2a, 0xb0, 0x10, 0x38, 0x61, 0xe4, 0xd4, 0x4a, }}, /* Byte value: 0xc8 */ + {{0x39, 0x1e, 0xac, 0x61, 0x14, 0x6c, 0x5b, 0x57, }}, /* Byte value: 0xc9 */ + {{0xac, 0x21, 0x98, 0x27, 0x3e, 0xba, 0xd1, 0x7a, }}, /* Byte value: 0xca */ + {{0x7c, 0x41, 0x5c, 0xca, 0x7e, 0xb9, 0x5d, 0x77, }}, /* Byte value: 0xcb */ + {{0xc3, 0xce, 0x78, 0xb4, 0x35, 0x8b, 0x03, 0x10, }}, /* Byte value: 0xcc */ + {{0x3a, 0x65, 0xf6, 0xa2, 0x46, 0x11, 0xc8, 0x4b, }}, /* Byte value: 0xcd */ + {{0x36, 0x4a, 0x5d, 0x28, 0xcd, 0x26, 0xc1, 0x3b, }}, /* Byte value: 0xce */ + {{0x44, 0x76, 0xc6, 0xea, 0xe5, 0xfe, 0x77, 0x95, }}, /* Byte value: 0xcf */ + {{0xa2, 0x5c, 0x5f, 0x2f, 0x68, 0xdb, 0x3a, 0xa3, }}, /* Byte value: 0xd0 */ + {{0x5f, 0x53, 0x09, 0xfe, 0x62, 0xed, 0xf6, 0x69, }}, /* Byte value: 0xd1 */ + {{0x3b, 0x4c, 0xc0, 0xe3, 0xc9, 0x3a, 0xb9, 0xfe, }}, /* Byte value: 0xd2 */ + {{0xec, 0xf3, 0x86, 0x0a, 0xa2, 0xe8, 0xa1, 0x7e, }}, /* Byte value: 0xd3 */ + {{0x32, 0xee, 0x85, 0xef, 0xb4, 0x8a, 0xc6, 0xaa, }}, /* Byte value: 0xd4 */ + {{0x8b, 0x97, 0x15, 0xd4, 0x5b, 0x42, 0x7d, 0xf5, }}, /* Byte value: 0xd5 */ + {{0x30, 0xbc, 0xe9, 0x6d, 0x69, 0xdc, 0x24, 0x03, }}, /* Byte value: 0xd6 */ + {{0xa4, 0xaa, 0xeb, 0x6a, 0xcc, 0x21, 0xdf, 0x9b, }}, /* Byte value: 0xd7 */ + {{0x1d, 0xd3, 0x7b, 0x51, 0x23, 0xe9, 0x64, 0xc4, }}, /* Byte value: 0xd8 */ + {{0x34, 0x18, 0x31, 0xaa, 0x10, 0x70, 0x23, 0x92, }}, /* Byte value: 0xd9 */ + {{0x83, 0x1c, 0x66, 0x99, 0xa9, 0xd9, 0x73, 0x14, }}, /* Byte value: 0xda */ + {{0xd6, 0x96, 0x70, 0xa8, 0xe4, 0xf9, 0x69, 0x35, }}, /* Byte value: 0xdb */ + {{0xd7, 0xbf, 0x46, 0xe9, 0x6b, 0xd2, 0x18, 0x80, }}, /* Byte value: 0xdc */ + {{0xbd, 0xdd, 0x48, 0xfc, 0x96, 0x64, 0xbc, 0xce, }}, /* Byte value: 0xdd */ + {{0xaf, 0x5a, 0xc2, 0xe4, 0x6c, 0xc7, 0x42, 0x66, }}, /* Byte value: 0xde */ + {{0xd3, 0x1b, 0x9e, 0x2e, 0x12, 0x7e, 0x1f, 0x11, }}, /* Byte value: 0xdf */ + {{0x8d, 0x61, 0xa1, 0x91, 0xff, 0xb8, 0x98, 0xcd, }}, /* Byte value: 0xe0 */ + {{0x74, 0xca, 0x2f, 0x87, 0x8c, 0x22, 0x53, 0x96, }}, /* Byte value: 0xe1 */ + {{0x47, 0x0d, 0x9c, 0x29, 0xb7, 0x83, 0xe4, 0x89, }}, /* Byte value: 0xe2 */ + {{0xa5, 0x83, 0xdd, 0x2b, 0x43, 0x0a, 0xae, 0x2e, }}, /* Byte value: 0xe3 */ + {{0xe1, 0xf5, 0x1b, 0xc1, 0xa6, 0xf4, 0xd9, 0xbb, }}, /* Byte value: 0xe4 */ + {{0x75, 0xe3, 0x19, 0xc6, 0x03, 0x09, 0x22, 0x23, }}, /* Byte value: 0xe5 */ + {{0x35, 0x31, 0x07, 0xeb, 0x9f, 0x5b, 0x52, 0x27, }}, /* Byte value: 0xe6 */ + {{0x86, 0x91, 0x88, 0x1f, 0x5f, 0x5e, 0x05, 0x30, }}, /* Byte value: 0xe7 */ + {{0x50, 0x07, 0xf8, 0xb7, 0xbb, 0xa7, 0x6c, 0x05, }}, /* Byte value: 0xe8 */ + {{0x2e, 0x14, 0xc8, 0xff, 0x18, 0x48, 0xd3, 0xdb, }}, /* Byte value: 0xe9 */ + {{0x53, 0x7c, 0xa2, 0x74, 0xe9, 0xda, 0xff, 0x19, }}, /* Byte value: 0xea */ + {{0x0f, 0x54, 0xf1, 0x49, 0xd9, 0x4a, 0x9a, 0x6c, }}, /* Byte value: 0xeb */ + {{0x7d, 0x68, 0x6a, 0x8b, 0xf1, 0x92, 0x2c, 0xc2, }}, /* Byte value: 0xec */ + {{0xfb, 0xf9, 0xe2, 0x94, 0xae, 0xcc, 0x29, 0xf2, }}, /* Byte value: 0xed */ + {{0xbf, 0x8f, 0x24, 0x7e, 0x4b, 0x32, 0x5e, 0x67, }}, /* Byte value: 0xee */ + {{0xb3, 0xa0, 0x8f, 0xf4, 0xc0, 0x05, 0x57, 0x17, }}, /* Byte value: 0xef */ + {{0x4b, 0x22, 0x37, 0xa3, 0x3c, 0xb4, 0xed, 0xf9, }}, /* Byte value: 0xf0 */ + {{0x68, 0x30, 0x62, 0x97, 0x20, 0xe0, 0x46, 0xe7, }}, /* Byte value: 0xf1 */ + {{0xaa, 0xd7, 0x2c, 0x62, 0x9a, 0x40, 0x34, 0x42, }}, /* Byte value: 0xf2 */ + {{0xc2, 0xe7, 0x4e, 0xf5, 0xba, 0xa0, 0x72, 0xa5, }}, /* Byte value: 0xf3 */ + {{0xb1, 0xf2, 0xe3, 0x76, 0x1d, 0x53, 0xb5, 0xbe, }}, /* Byte value: 0xf4 */ + {{0xdb, 0x90, 0xed, 0x63, 0xe0, 0xe5, 0x11, 0xf0, }}, /* Byte value: 0xf5 */ + {{0x02, 0x52, 0x6c, 0x82, 0xdd, 0x56, 0xe2, 0xa9, }}, /* Byte value: 0xf6 */ + {{0xa8, 0x85, 0x40, 0xe0, 0x47, 0x16, 0xd6, 0xeb, }}, /* Byte value: 0xf7 */ + {{0x88, 0xec, 0x4f, 0x17, 0x09, 0x3f, 0xee, 0xe9, }}, /* Byte value: 0xf8 */ + {{0xc0, 0xb5, 0x22, 0x77, 0x67, 0xf6, 0x90, 0x0c, }}, /* Byte value: 0xf9 */ + {{0x5d, 0x01, 0x65, 0x7c, 0xbf, 0xbb, 0x14, 0xc0, }}, /* Byte value: 0xfa */ + {{0x65, 0x36, 0xff, 0x5c, 0x24, 0xfc, 0x3e, 0x22, }}, /* Byte value: 0xfb */ + {{0x1f, 0x81, 0x17, 0xd3, 0xfe, 0xbf, 0x86, 0x6d, }}, /* Byte value: 0xfc */ + {{0x21, 0x40, 0x39, 0xb6, 0xc1, 0x02, 0x49, 0xb7, }}, /* Byte value: 0xfd */ + {{0x1e, 0xa8, 0x21, 0x92, 0x71, 0x94, 0xf7, 0xd8, }}, /* Byte value: 0xfe */ + {{0xcf, 0xe1, 0xd3, 0x3e, 0xbe, 0xbc, 0x0a, 0x60, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 3 */ + {{0x6d, 0x6b, 0xb6, 0x2d, 0xbf, 0x63, 0x8e, 0x1b, }}, /* Byte value: 0x00 */ + {{0xc6, 0x80, 0x29, 0xcb, 0xc0, 0xc9, 0x15, 0xf8, }}, /* Byte value: 0x01 */ + {{0xbc, 0xed, 0x40, 0xd2, 0x7a, 0x90, 0xf0, 0x4e, }}, /* Byte value: 0x02 */ + {{0x97, 0x9a, 0x27, 0xb6, 0xd7, 0x37, 0xe2, 0xd3, }}, /* Byte value: 0x03 */ + {{0x17, 0x06, 0xdf, 0x34, 0x05, 0x3a, 0x6b, 0xad, }}, /* Byte value: 0x04 */ + {{0x54, 0x61, 0x14, 0x71, 0xb0, 0x2d, 0x33, 0x2f, }}, /* Byte value: 0x05 */ + {{0x52, 0x33, 0xb9, 0x79, 0xcb, 0x0e, 0x0a, 0x96, }}, /* Byte value: 0x06 */ + {{0xfb, 0x57, 0xfc, 0x26, 0x9d, 0x04, 0x86, 0xa3, }}, /* Byte value: 0x07 */ + {{0x01, 0xa6, 0x6d, 0xbd, 0xf5, 0x50, 0xea, 0x6b, }}, /* Byte value: 0x08 */ + {{0x8b, 0xcc, 0xa1, 0x27, 0xaa, 0x38, 0x28, 0x1d, }}, /* Byte value: 0x09 */ + {{0x15, 0x89, 0x05, 0x8d, 0x2c, 0x9a, 0x7c, 0x7b, }}, /* Byte value: 0x0a */ + {{0xd0, 0x20, 0x9b, 0x42, 0x30, 0xa3, 0x94, 0x3e, }}, /* Byte value: 0x0b */ + {{0xf9, 0xd8, 0x26, 0x9f, 0xb4, 0xa4, 0x91, 0x75, }}, /* Byte value: 0x0c */ + {{0x9f, 0xe3, 0xc9, 0x17, 0x73, 0xf2, 0xbe, 0x0d, }}, /* Byte value: 0x0d */ + {{0x50, 0xbc, 0x63, 0xc0, 0xe2, 0xae, 0x1d, 0x40, }}, /* Byte value: 0x0e */ + {{0xad, 0xb9, 0x32, 0xee, 0x04, 0x89, 0xa2, 0x5a, }}, /* Byte value: 0x0f */ + {{0xaa, 0x4d, 0xf2, 0x5b, 0x8a, 0xfa, 0x71, 0x88, }}, /* Byte value: 0x10 */ + {{0x63, 0x40, 0xf5, 0x84, 0x60, 0x85, 0xeb, 0x7c, }}, /* Byte value: 0x11 */ + {{0x9d, 0x6c, 0x13, 0xae, 0x5a, 0x52, 0xa9, 0xdb, }}, /* Byte value: 0x12 */ + {{0xc4, 0x0f, 0xf3, 0x72, 0xe9, 0x69, 0x02, 0x2e, }}, /* Byte value: 0x13 */ + {{0x2d, 0x25, 0xca, 0x6c, 0xd6, 0x84, 0x2b, 0x24, }}, /* Byte value: 0x14 */ + {{0x1d, 0xf0, 0xeb, 0x2c, 0x88, 0x5f, 0x20, 0xa5, }}, /* Byte value: 0x15 */ + {{0xa5, 0xc0, 0xdc, 0x4f, 0xa0, 0x4c, 0xfe, 0x84, }}, /* Byte value: 0x16 */ + {{0x5c, 0x18, 0xfa, 0xd0, 0x14, 0xe8, 0x6f, 0xf1, }}, /* Byte value: 0x17 */ + {{0xef, 0x78, 0x94, 0x16, 0x44, 0xce, 0x10, 0xb3, }}, /* Byte value: 0x18 */ + {{0x3e, 0xfe, 0x62, 0xe9, 0x81, 0x3d, 0x6e, 0xe6, }}, /* Byte value: 0x19 */ + {{0x89, 0x43, 0x7b, 0x9e, 0x83, 0x98, 0x3f, 0xcb, }}, /* Byte value: 0x1a */ + {{0x48, 0x37, 0x92, 0xe0, 0xcd, 0x22, 0xf9, 0xe1, }}, /* Byte value: 0x1b */ + {{0xd3, 0x09, 0x2c, 0x46, 0xec, 0x53, 0x69, 0x83, }}, /* Byte value: 0x1c */ + {{0x3f, 0x58, 0x0f, 0x54, 0x74, 0x6d, 0x84, 0x8d, }}, /* Byte value: 0x1d */ + {{0x06, 0x52, 0xad, 0x08, 0x7b, 0x23, 0x39, 0xb9, }}, /* Byte value: 0x1e */ + {{0xcf, 0x5f, 0xaa, 0xd7, 0x91, 0x5c, 0xa3, 0x4d, }}, /* Byte value: 0x1f */ + {{0x29, 0xf8, 0xbd, 0xdd, 0x84, 0x07, 0x05, 0x4b, }}, /* Byte value: 0x20 */ + {{0x23, 0x0e, 0x89, 0xc5, 0x09, 0x62, 0x4e, 0x43, }}, /* Byte value: 0x21 */ + {{0xc8, 0xab, 0x6a, 0x62, 0x1f, 0x2f, 0x70, 0x9f, }}, /* Byte value: 0x22 */ + {{0x42, 0xc1, 0xa6, 0xf8, 0x40, 0x47, 0xb2, 0xe9, }}, /* Byte value: 0x23 */ + {{0x36, 0x87, 0x8c, 0x48, 0x25, 0xf8, 0x32, 0x38, }}, /* Byte value: 0x24 */ + {{0x3a, 0x23, 0x15, 0x58, 0xd3, 0xbe, 0x40, 0x89, }}, /* Byte value: 0x25 */ + {{0xd2, 0xaf, 0x41, 0xfb, 0x19, 0x03, 0x83, 0xe8, }}, /* Byte value: 0x26 */ + {{0xd1, 0x86, 0xf6, 0xff, 0xc5, 0xf3, 0x7e, 0x55, }}, /* Byte value: 0x27 */ + {{0x86, 0xce, 0x55, 0x8a, 0xa9, 0x2e, 0xb0, 0xc7, }}, /* Byte value: 0x28 */ + {{0x73, 0xb2, 0xea, 0x05, 0xeb, 0xcc, 0x53, 0x03, }}, /* Byte value: 0x29 */ + {{0xb6, 0x1b, 0x74, 0xca, 0xf7, 0xf5, 0xbb, 0x46, }}, /* Byte value: 0x2a */ + {{0x61, 0xcf, 0x2f, 0x3d, 0x49, 0x25, 0xfc, 0xaa, }}, /* Byte value: 0x2b */ + {{0x0e, 0x2b, 0x43, 0xa9, 0xdf, 0xe6, 0x65, 0x67, }}, /* Byte value: 0x2c */ + {{0x14, 0x2f, 0x68, 0x30, 0xd9, 0xca, 0x96, 0x10, }}, /* Byte value: 0x2d */ + {{0x4a, 0xb8, 0x48, 0x59, 0xe4, 0x82, 0xee, 0x37, }}, /* Byte value: 0x2e */ + {{0x85, 0xe7, 0xe2, 0x8e, 0x75, 0xde, 0x4d, 0x7a, }}, /* Byte value: 0x2f */ + {{0x44, 0x93, 0x0b, 0xf0, 0x3b, 0x64, 0x8b, 0x50, }}, /* Byte value: 0x30 */ + {{0xc2, 0x5d, 0x5e, 0x7a, 0x92, 0x4a, 0x3b, 0x97, }}, /* Byte value: 0x31 */ + {{0x28, 0x5e, 0xd0, 0x60, 0x71, 0x57, 0xef, 0x20, }}, /* Byte value: 0x32 */ + {{0x8f, 0x11, 0xd6, 0x96, 0xf8, 0xbb, 0x06, 0x72, }}, /* Byte value: 0x33 */ + {{0x22, 0xa8, 0xe4, 0x78, 0xfc, 0x32, 0xa4, 0x28, }}, /* Byte value: 0x34 */ + {{0x04, 0xdd, 0x77, 0xb1, 0x52, 0x83, 0x2e, 0x6f, }}, /* Byte value: 0x35 */ + {{0x5e, 0x97, 0x20, 0x69, 0x3d, 0x48, 0x78, 0x27, }}, /* Byte value: 0x36 */ + {{0x57, 0x48, 0xa3, 0x75, 0x6c, 0xdd, 0xce, 0x92, }}, /* Byte value: 0x37 */ + {{0x78, 0xe2, 0xb3, 0xa0, 0x93, 0xf9, 0xf2, 0x60, }}, /* Byte value: 0x38 */ + {{0x9c, 0xca, 0x7e, 0x13, 0xaf, 0x02, 0x43, 0xb0, }}, /* Byte value: 0x39 */ + {{0xfa, 0xf1, 0x91, 0x9b, 0x68, 0x54, 0x6c, 0xc8, }}, /* Byte value: 0x3a */ + {{0xb1, 0xef, 0xb4, 0x7f, 0x79, 0x86, 0x68, 0x94, }}, /* Byte value: 0x3b */ + {{0xc3, 0xfb, 0x33, 0xc7, 0x67, 0x1a, 0xd1, 0xfc, }}, /* Byte value: 0x3c */ + {{0x08, 0x79, 0xee, 0xa1, 0xa4, 0xc5, 0x5c, 0xde, }}, /* Byte value: 0x3d */ + {{0x64, 0xb4, 0x35, 0x31, 0xee, 0xf6, 0x38, 0xae, }}, /* Byte value: 0x3e */ + {{0x4f, 0xc3, 0x52, 0x55, 0x43, 0x51, 0x2a, 0x33, }}, /* Byte value: 0x3f */ + {{0x82, 0x13, 0x22, 0x3b, 0xfb, 0xad, 0x9e, 0xa8, }}, /* Byte value: 0x40 */ + {{0x16, 0xa0, 0xb2, 0x89, 0xf0, 0x6a, 0x81, 0xc6, }}, /* Byte value: 0x41 */ + {{0x35, 0xae, 0x3b, 0x4c, 0xf9, 0x08, 0xcf, 0x85, }}, /* Byte value: 0x42 */ + {{0xde, 0x0b, 0xd8, 0xeb, 0xef, 0x45, 0xf1, 0x59, }}, /* Byte value: 0x43 */ + {{0x96, 0x3c, 0x4a, 0x0b, 0x22, 0x67, 0x08, 0xb8, }}, /* Byte value: 0x44 */ + {{0x7b, 0xcb, 0x04, 0xa4, 0x4f, 0x09, 0x0f, 0xdd, }}, /* Byte value: 0x45 */ + {{0xe9, 0x2a, 0x39, 0x1e, 0x3f, 0xed, 0x29, 0x0a, }}, /* Byte value: 0x46 */ + {{0xcb, 0x82, 0xdd, 0x66, 0xc3, 0xdf, 0x8d, 0x22, }}, /* Byte value: 0x47 */ + {{0xb5, 0x32, 0xc3, 0xce, 0x2b, 0x05, 0x46, 0xfb, }}, /* Byte value: 0x48 */ + {{0x4d, 0x4c, 0x88, 0xec, 0x6a, 0xf1, 0x3d, 0xe5, }}, /* Byte value: 0x49 */ + {{0x2c, 0x83, 0xa7, 0xd1, 0x23, 0xd4, 0xc1, 0x4f, }}, /* Byte value: 0x4a */ + {{0x7f, 0x16, 0x73, 0x15, 0x1d, 0x8a, 0x21, 0xb2, }}, /* Byte value: 0x4b */ + {{0x79, 0x44, 0xde, 0x1d, 0x66, 0xa9, 0x18, 0x0b, }}, /* Byte value: 0x4c */ + {{0xce, 0xf9, 0xc7, 0x6a, 0x64, 0x0c, 0x49, 0x26, }}, /* Byte value: 0x4d */ + {{0x03, 0x29, 0xb7, 0x04, 0xdc, 0xf0, 0xfd, 0xbd, }}, /* Byte value: 0x4e */ + {{0x2b, 0x77, 0x67, 0x64, 0xad, 0xa7, 0x12, 0x9d, }}, /* Byte value: 0x4f */ + {{0x90, 0x6e, 0xe7, 0x03, 0x59, 0x44, 0x31, 0x01, }}, /* Byte value: 0x50 */ + {{0x0f, 0x8d, 0x2e, 0x14, 0x2a, 0xb6, 0x8f, 0x0c, }}, /* Byte value: 0x51 */ + {{0xd8, 0x59, 0x75, 0xe3, 0x94, 0x66, 0xc8, 0xe0, }}, /* Byte value: 0x52 */ + {{0xb2, 0xc6, 0x03, 0x7b, 0xa5, 0x76, 0x95, 0x29, }}, /* Byte value: 0x53 */ + {{0xa0, 0xbb, 0xc6, 0x43, 0x07, 0x9f, 0x3a, 0x80, }}, /* Byte value: 0x54 */ + {{0xf0, 0x07, 0xa5, 0x83, 0xe5, 0x31, 0x27, 0xc0, }}, /* Byte value: 0x55 */ + {{0x77, 0x6f, 0x9d, 0xb4, 0xb9, 0x4f, 0x7d, 0x6c, }}, /* Byte value: 0x56 */ + {{0xab, 0xeb, 0x9f, 0xe6, 0x7f, 0xaa, 0x9b, 0xe3, }}, /* Byte value: 0x57 */ + {{0x18, 0x8b, 0xf1, 0x20, 0x2f, 0x8c, 0xe4, 0xa1, }}, /* Byte value: 0x58 */ + {{0x27, 0xd3, 0xfe, 0x74, 0x5b, 0xe1, 0x60, 0x2c, }}, /* Byte value: 0x59 */ + {{0xbf, 0xc4, 0xf7, 0xd6, 0xa6, 0x60, 0x0d, 0xf3, }}, /* Byte value: 0x5a */ + {{0x25, 0x5c, 0x24, 0xcd, 0x72, 0x41, 0x77, 0xfa, }}, /* Byte value: 0x5b */ + {{0xe1, 0x53, 0xd7, 0xbf, 0x9b, 0x28, 0x75, 0xd4, }}, /* Byte value: 0x5c */ + {{0xb8, 0x30, 0x37, 0x63, 0x28, 0x13, 0xde, 0x21, }}, /* Byte value: 0x5d */ + {{0x2e, 0x0c, 0x7d, 0x68, 0x0a, 0x74, 0xd6, 0x99, }}, /* Byte value: 0x5e */ + {{0xfe, 0x2c, 0xe6, 0x2a, 0x3a, 0xd7, 0x42, 0xa7, }}, /* Byte value: 0x5f */ + {{0xc7, 0x26, 0x44, 0x76, 0x35, 0x99, 0xff, 0x93, }}, /* Byte value: 0x60 */ + {{0x43, 0x67, 0xcb, 0x45, 0xb5, 0x17, 0x58, 0x82, }}, /* Byte value: 0x61 */ + {{0x69, 0xb6, 0xc1, 0x9c, 0xed, 0xe0, 0xa0, 0x74, }}, /* Byte value: 0x62 */ + {{0x71, 0x3d, 0x30, 0xbc, 0xc2, 0x6c, 0x44, 0xd5, }}, /* Byte value: 0x63 */ + {{0x83, 0xb5, 0x4f, 0x86, 0x0e, 0xfd, 0x74, 0xc3, }}, /* Byte value: 0x64 */ + {{0x93, 0x47, 0x50, 0x07, 0x85, 0xb4, 0xcc, 0xbc, }}, /* Byte value: 0x65 */ + {{0x99, 0xb1, 0x64, 0x1f, 0x08, 0xd1, 0x87, 0xb4, }}, /* Byte value: 0x66 */ + {{0xb7, 0xbd, 0x19, 0x77, 0x02, 0xa5, 0x51, 0x2d, }}, /* Byte value: 0x67 */ + {{0xa1, 0x1d, 0xab, 0xfe, 0xf2, 0xcf, 0xd0, 0xeb, }}, /* Byte value: 0x68 */ + {{0x05, 0x7b, 0x1a, 0x0c, 0xa7, 0xd3, 0xc4, 0x04, }}, /* Byte value: 0x69 */ + {{0xaf, 0x36, 0xe8, 0x57, 0x2d, 0x29, 0xb5, 0x8c, }}, /* Byte value: 0x6a */ + {{0x40, 0x4e, 0x7c, 0x41, 0x69, 0xe7, 0xa5, 0x3f, }}, /* Byte value: 0x6b */ + {{0xf5, 0x7c, 0xbf, 0x8f, 0x42, 0xe2, 0xe3, 0xc4, }}, /* Byte value: 0x6c */ + {{0xc9, 0x0d, 0x07, 0xdf, 0xea, 0x7f, 0x9a, 0xf4, }}, /* Byte value: 0x6d */ + {{0xfc, 0xa3, 0x3c, 0x93, 0x13, 0x77, 0x55, 0x71, }}, /* Byte value: 0x6e */ + {{0xc0, 0xd2, 0x84, 0xc3, 0xbb, 0xea, 0x2c, 0x41, }}, /* Byte value: 0x6f */ + {{0x6e, 0x42, 0x01, 0x29, 0x63, 0x93, 0x73, 0xa6, }}, /* Byte value: 0x70 */ + {{0x4b, 0x1e, 0x25, 0xe4, 0x11, 0xd2, 0x04, 0x5c, }}, /* Byte value: 0x71 */ + {{0x37, 0x21, 0xe1, 0xf5, 0xd0, 0xa8, 0xd8, 0x53, }}, /* Byte value: 0x72 */ + {{0xa2, 0x34, 0x1c, 0xfa, 0x2e, 0x3f, 0x2d, 0x56, }}, /* Byte value: 0x73 */ + {{0x51, 0x1a, 0x0e, 0x7d, 0x17, 0xfe, 0xf7, 0x2b, }}, /* Byte value: 0x74 */ + {{0x02, 0x8f, 0xda, 0xb9, 0x29, 0xa0, 0x17, 0xd6, }}, /* Byte value: 0x75 */ + {{0x1a, 0x04, 0x2b, 0x99, 0x06, 0x2c, 0xf3, 0x77, }}, /* Byte value: 0x76 */ + {{0xd7, 0xd4, 0x5b, 0xf7, 0xbe, 0xd0, 0x47, 0xec, }}, /* Byte value: 0x77 */ + {{0x68, 0x10, 0xac, 0x21, 0x18, 0xb0, 0x4a, 0x1f, }}, /* Byte value: 0x78 */ + {{0x9a, 0x98, 0xd3, 0x1b, 0xd4, 0x21, 0x7a, 0x09, }}, /* Byte value: 0x79 */ + {{0xa3, 0x92, 0x71, 0x47, 0xdb, 0x6f, 0xc7, 0x3d, }}, /* Byte value: 0x7a */ + {{0x92, 0xe1, 0x3d, 0xba, 0x70, 0xe4, 0x26, 0xd7, }}, /* Byte value: 0x7b */ + {{0xe7, 0x01, 0x7a, 0xb7, 0xe0, 0x0b, 0x4c, 0x6d, }}, /* Byte value: 0x7c */ + {{0x30, 0xd5, 0x21, 0x40, 0x5e, 0xdb, 0x0b, 0x81, }}, /* Byte value: 0x7d */ + {{0xe4, 0x28, 0xcd, 0xb3, 0x3c, 0xfb, 0xb1, 0xd0, }}, /* Byte value: 0x7e */ + {{0xa6, 0xe9, 0x6b, 0x4b, 0x7c, 0xbc, 0x03, 0x39, }}, /* Byte value: 0x7f */ + {{0x94, 0xb3, 0x90, 0xb2, 0x0b, 0xc7, 0x1f, 0x6e, }}, /* Byte value: 0x80 */ + {{0xd9, 0xff, 0x18, 0x5e, 0x61, 0x36, 0x22, 0x8b, }}, /* Byte value: 0x81 */ + {{0x95, 0x15, 0xfd, 0x0f, 0xfe, 0x97, 0xf5, 0x05, }}, /* Byte value: 0x82 */ + {{0xe3, 0xdc, 0x0d, 0x06, 0xb2, 0x88, 0x62, 0x02, }}, /* Byte value: 0x83 */ + {{0x9e, 0x45, 0xa4, 0xaa, 0x86, 0xa2, 0x54, 0x66, }}, /* Byte value: 0x84 */ + {{0xf7, 0xf3, 0x65, 0x36, 0x6b, 0x42, 0xf4, 0x12, }}, /* Byte value: 0x85 */ + {{0x75, 0xe0, 0x47, 0x0d, 0x90, 0xef, 0x6a, 0xba, }}, /* Byte value: 0x86 */ + {{0x6f, 0xe4, 0x6c, 0x94, 0x96, 0xc3, 0x99, 0xcd, }}, /* Byte value: 0x87 */ + {{0x34, 0x08, 0x56, 0xf1, 0x0c, 0x58, 0x25, 0xee, }}, /* Byte value: 0x88 */ + {{0xbb, 0x19, 0x80, 0x67, 0xf4, 0xe3, 0x23, 0x9c, }}, /* Byte value: 0x89 */ + {{0x20, 0x27, 0x3e, 0xc1, 0xd5, 0x92, 0xb3, 0xfe, }}, /* Byte value: 0x8a */ + {{0xe5, 0x8e, 0xa0, 0x0e, 0xc9, 0xab, 0x5b, 0xbb, }}, /* Byte value: 0x8b */ + {{0xff, 0x8a, 0x8b, 0x97, 0xcf, 0x87, 0xa8, 0xcc, }}, /* Byte value: 0x8c */ + {{0xed, 0xf7, 0x4e, 0xaf, 0x6d, 0x6e, 0x07, 0x65, }}, /* Byte value: 0x8d */ + {{0x60, 0x69, 0x42, 0x80, 0xbc, 0x75, 0x16, 0xc1, }}, /* Byte value: 0x8e */ + {{0x3c, 0x71, 0xb8, 0x50, 0xa8, 0x9d, 0x79, 0x30, }}, /* Byte value: 0x8f */ + {{0x1e, 0xd9, 0x5c, 0x28, 0x54, 0xaf, 0xdd, 0x18, }}, /* Byte value: 0x90 */ + {{0xcc, 0x76, 0x1d, 0xd3, 0x4d, 0xac, 0x5e, 0xf0, }}, /* Byte value: 0x91 */ + {{0xee, 0xde, 0xf9, 0xab, 0xb1, 0x9e, 0xfa, 0xd8, }}, /* Byte value: 0x92 */ + {{0x80, 0x9c, 0xf8, 0x82, 0xd2, 0x0d, 0x89, 0x7e, }}, /* Byte value: 0x93 */ + {{0x87, 0x68, 0x38, 0x37, 0x5c, 0x7e, 0x5a, 0xac, }}, /* Byte value: 0x94 */ + {{0x41, 0xe8, 0x11, 0xfc, 0x9c, 0xb7, 0x4f, 0x54, }}, /* Byte value: 0x95 */ + {{0xd4, 0xfd, 0xec, 0xf3, 0x62, 0x20, 0xba, 0x51, }}, /* Byte value: 0x96 */ + {{0x24, 0xfa, 0x49, 0x70, 0x87, 0x11, 0x9d, 0x91, }}, /* Byte value: 0x97 */ + {{0xa8, 0xc2, 0x28, 0xe2, 0xa3, 0x5a, 0x66, 0x5e, }}, /* Byte value: 0x98 */ + {{0xbe, 0x62, 0x9a, 0x6b, 0x53, 0x30, 0xe7, 0x98, }}, /* Byte value: 0x99 */ + {{0x65, 0x12, 0x58, 0x8c, 0x1b, 0xa6, 0xd2, 0xc5, }}, /* Byte value: 0x9a */ + {{0xca, 0x24, 0xb0, 0xdb, 0x36, 0x8f, 0x67, 0x49, }}, /* Byte value: 0x9b */ + {{0x91, 0xc8, 0x8a, 0xbe, 0xac, 0x14, 0xdb, 0x6a, }}, /* Byte value: 0x9c */ + {{0x7a, 0x6d, 0x69, 0x19, 0xba, 0x59, 0xe5, 0xb6, }}, /* Byte value: 0x9d */ + {{0x88, 0xe5, 0x16, 0x23, 0x76, 0xc8, 0xd5, 0xa0, }}, /* Byte value: 0x9e */ + {{0xc1, 0x74, 0xe9, 0x7e, 0x4e, 0xba, 0xc6, 0x2a, }}, /* Byte value: 0x9f */ + {{0x3b, 0x85, 0x78, 0xe5, 0x26, 0xee, 0xaa, 0xe2, }}, /* Byte value: 0xa0 */ + {{0x7d, 0x99, 0xa9, 0xac, 0x34, 0x2a, 0x36, 0x64, }}, /* Byte value: 0xa1 */ + {{0x8c, 0x38, 0x61, 0x92, 0x24, 0x4b, 0xfb, 0xcf, }}, /* Byte value: 0xa2 */ + {{0x33, 0xfc, 0x96, 0x44, 0x82, 0x2b, 0xf6, 0x3c, }}, /* Byte value: 0xa3 */ + {{0x5b, 0xec, 0x3a, 0x65, 0x9a, 0x9b, 0xbc, 0x23, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0xa4, 0x66, 0xb1, 0xf2, 0x55, 0x1c, 0x14, 0xef, }}, /* Byte value: 0xa6 */ + {{0x19, 0x2d, 0x9c, 0x9d, 0xda, 0xdc, 0x0e, 0xca, }}, /* Byte value: 0xa7 */ + {{0x0b, 0x50, 0x59, 0xa5, 0x78, 0x35, 0xa1, 0x63, }}, /* Byte value: 0xa8 */ + {{0x74, 0x46, 0x2a, 0xb0, 0x65, 0xbf, 0x80, 0xd1, }}, /* Byte value: 0xa9 */ + {{0xe6, 0xa7, 0x17, 0x0a, 0x15, 0x5b, 0xa6, 0x06, }}, /* Byte value: 0xaa */ + {{0xba, 0xbf, 0xed, 0xda, 0x01, 0xb3, 0xc9, 0xf7, }}, /* Byte value: 0xab */ + {{0xdc, 0x84, 0x02, 0x52, 0xc6, 0xe5, 0xe6, 0x8f, }}, /* Byte value: 0xac */ + {{0xdd, 0x22, 0x6f, 0xef, 0x33, 0xb5, 0x0c, 0xe4, }}, /* Byte value: 0xad */ + {{0xbd, 0x4b, 0x2d, 0x6f, 0x8f, 0xc0, 0x1a, 0x25, }}, /* Byte value: 0xae */ + {{0x5d, 0xbe, 0x97, 0x6d, 0xe1, 0xb8, 0x85, 0x9a, }}, /* Byte value: 0xaf */ + {{0xb3, 0x60, 0x6e, 0xc6, 0x50, 0x26, 0x7f, 0x42, }}, /* Byte value: 0xb0 */ + {{0x0d, 0x02, 0xf4, 0xad, 0x03, 0x16, 0x98, 0xda, }}, /* Byte value: 0xb1 */ + {{0x31, 0x73, 0x4c, 0xfd, 0xab, 0x8b, 0xe1, 0xea, }}, /* Byte value: 0xb2 */ + {{0x39, 0x0a, 0xa2, 0x5c, 0x0f, 0x4e, 0xbd, 0x34, }}, /* Byte value: 0xb3 */ + {{0xa9, 0x64, 0x45, 0x5f, 0x56, 0x0a, 0x8c, 0x35, }}, /* Byte value: 0xb4 */ + {{0x12, 0x7d, 0xc5, 0x38, 0xa2, 0xe9, 0xaf, 0xa9, }}, /* Byte value: 0xb5 */ + {{0x8e, 0xb7, 0xbb, 0x2b, 0x0d, 0xeb, 0xec, 0x19, }}, /* Byte value: 0xb6 */ + {{0x09, 0xdf, 0x83, 0x1c, 0x51, 0x95, 0xb6, 0xb5, }}, /* Byte value: 0xb7 */ + {{0x62, 0xe6, 0x98, 0x39, 0x95, 0xd5, 0x01, 0x17, }}, /* Byte value: 0xb8 */ + {{0x6b, 0x39, 0x1b, 0x25, 0xc4, 0x40, 0xb7, 0xa2, }}, /* Byte value: 0xb9 */ + {{0x13, 0xdb, 0xa8, 0x85, 0x57, 0xb9, 0x45, 0xc2, }}, /* Byte value: 0xba */ + {{0xeb, 0xa5, 0xe3, 0xa7, 0x16, 0x4d, 0x3e, 0xdc, }}, /* Byte value: 0xbb */ + {{0x38, 0xac, 0xcf, 0xe1, 0xfa, 0x1e, 0x57, 0x5f, }}, /* Byte value: 0xbc */ + {{0x1c, 0x56, 0x86, 0x91, 0x7d, 0x0f, 0xca, 0xce, }}, /* Byte value: 0xbd */ + {{0x55, 0xc7, 0x79, 0xcc, 0x45, 0x7d, 0xd9, 0x44, }}, /* Byte value: 0xbe */ + {{0xda, 0xd6, 0xaf, 0x5a, 0xbd, 0xc6, 0xdf, 0x36, }}, /* Byte value: 0xbf */ + {{0x6c, 0xcd, 0xdb, 0x90, 0x4a, 0x33, 0x64, 0x70, }}, /* Byte value: 0xc0 */ + {{0x6a, 0x9f, 0x76, 0x98, 0x31, 0x10, 0x5d, 0xc9, }}, /* Byte value: 0xc1 */ + {{0xe8, 0x8c, 0x54, 0xa3, 0xca, 0xbd, 0xc3, 0x61, }}, /* Byte value: 0xc2 */ + {{0x49, 0x91, 0xff, 0x5d, 0x38, 0x72, 0x13, 0x8a, }}, /* Byte value: 0xc3 */ + {{0xea, 0x03, 0x8e, 0x1a, 0xe3, 0x1d, 0xd4, 0xb7, }}, /* Byte value: 0xc4 */ + {{0xa7, 0x4f, 0x06, 0xf6, 0x89, 0xec, 0xe9, 0x52, }}, /* Byte value: 0xc5 */ + {{0x67, 0x9d, 0x82, 0x35, 0x32, 0x06, 0xc5, 0x13, }}, /* Byte value: 0xc6 */ + {{0xf1, 0xa1, 0xc8, 0x3e, 0x10, 0x61, 0xcd, 0xab, }}, /* Byte value: 0xc7 */ + {{0x46, 0x1c, 0xd1, 0x49, 0x12, 0xc4, 0x9c, 0x86, }}, /* Byte value: 0xc8 */ + {{0x2a, 0xd1, 0x0a, 0xd9, 0x58, 0xf7, 0xf8, 0xf6, }}, /* Byte value: 0xc9 */ + {{0x10, 0xf2, 0x1f, 0x81, 0x8b, 0x49, 0xb8, 0x7f, }}, /* Byte value: 0xca */ + {{0x4e, 0x65, 0x3f, 0xe8, 0xb6, 0x01, 0xc0, 0x58, }}, /* Byte value: 0xcb */ + {{0x32, 0x5a, 0xfb, 0xf9, 0x77, 0x7b, 0x1c, 0x57, }}, /* Byte value: 0xcc */ + {{0xec, 0x51, 0x23, 0x12, 0x98, 0x3e, 0xed, 0x0e, }}, /* Byte value: 0xcd */ + {{0x72, 0x14, 0x87, 0xb8, 0x1e, 0x9c, 0xb9, 0x68, }}, /* Byte value: 0xce */ + {{0x26, 0x75, 0x93, 0xc9, 0xae, 0xb1, 0x8a, 0x47, }}, /* Byte value: 0xcf */ + {{0x0a, 0xf6, 0x34, 0x18, 0x8d, 0x65, 0x4b, 0x08, }}, /* Byte value: 0xd0 */ + {{0x1f, 0x7f, 0x31, 0x95, 0xa1, 0xff, 0x37, 0x73, }}, /* Byte value: 0xd1 */ + {{0xae, 0x90, 0x85, 0xea, 0xd8, 0x79, 0x5f, 0xe7, }}, /* Byte value: 0xd2 */ + {{0xfd, 0x05, 0x51, 0x2e, 0xe6, 0x27, 0xbf, 0x1a, }}, /* Byte value: 0xd3 */ + {{0xb9, 0x96, 0x5a, 0xde, 0xdd, 0x43, 0x34, 0x4a, }}, /* Byte value: 0xd4 */ + {{0x8a, 0x6a, 0xcc, 0x9a, 0x5f, 0x68, 0xc2, 0x76, }}, /* Byte value: 0xd5 */ + {{0x3d, 0xd7, 0xd5, 0xed, 0x5d, 0xcd, 0x93, 0x5b, }}, /* Byte value: 0xd6 */ + {{0x45, 0x35, 0x66, 0x4d, 0xce, 0x34, 0x61, 0x3b, }}, /* Byte value: 0xd7 */ + {{0x76, 0xc9, 0xf0, 0x09, 0x4c, 0x1f, 0x97, 0x07, }}, /* Byte value: 0xd8 */ + {{0xf6, 0x55, 0x08, 0x8b, 0x9e, 0x12, 0x1e, 0x79, }}, /* Byte value: 0xd9 */ + {{0xdf, 0xad, 0xb5, 0x56, 0x1a, 0x15, 0x1b, 0x32, }}, /* Byte value: 0xda */ + {{0x11, 0x54, 0x72, 0x3c, 0x7e, 0x19, 0x52, 0x14, }}, /* Byte value: 0xdb */ + {{0x53, 0x95, 0xd4, 0xc4, 0x3e, 0x5e, 0xe0, 0xfd, }}, /* Byte value: 0xdc */ + {{0xf8, 0x7e, 0x4b, 0x22, 0x41, 0xf4, 0x7b, 0x1e, }}, /* Byte value: 0xdd */ + {{0xd6, 0x72, 0x36, 0x4a, 0x4b, 0x80, 0xad, 0x87, }}, /* Byte value: 0xde */ + {{0x98, 0x17, 0x09, 0xa2, 0xfd, 0x81, 0x6d, 0xdf, }}, /* Byte value: 0xdf */ + {{0xc5, 0xa9, 0x9e, 0xcf, 0x1c, 0x39, 0xe8, 0x45, }}, /* Byte value: 0xe0 */ + {{0x1b, 0xa2, 0x46, 0x24, 0xf3, 0x7c, 0x19, 0x1c, }}, /* Byte value: 0xe1 */ + {{0xe0, 0xf5, 0xba, 0x02, 0x6e, 0x78, 0x9f, 0xbf, }}, /* Byte value: 0xe2 */ + {{0x07, 0xf4, 0xc0, 0xb5, 0x8e, 0x73, 0xd3, 0xd2, }}, /* Byte value: 0xe3 */ + {{0x21, 0x81, 0x53, 0x7c, 0x20, 0xc2, 0x59, 0x95, }}, /* Byte value: 0xe4 */ + {{0x59, 0x63, 0xe0, 0xdc, 0xb3, 0x3b, 0xab, 0xf5, }}, /* Byte value: 0xe5 */ + {{0xb4, 0x94, 0xae, 0x73, 0xde, 0x55, 0xac, 0x90, }}, /* Byte value: 0xe6 */ + {{0x56, 0xee, 0xce, 0xc8, 0x99, 0x8d, 0x24, 0xf9, }}, /* Byte value: 0xe7 */ + {{0x47, 0xba, 0xbc, 0xf4, 0xe7, 0x94, 0x76, 0xed, }}, /* Byte value: 0xe8 */ + {{0x8d, 0x9e, 0x0c, 0x2f, 0xd1, 0x1b, 0x11, 0xa4, }}, /* Byte value: 0xe9 */ + {{0x81, 0x3a, 0x95, 0x3f, 0x27, 0x5d, 0x63, 0x15, }}, /* Byte value: 0xea */ + {{0x58, 0xc5, 0x8d, 0x61, 0x46, 0x6b, 0x41, 0x9e, }}, /* Byte value: 0xeb */ + {{0x0c, 0xa4, 0x99, 0x10, 0xf6, 0x46, 0x72, 0xb1, }}, /* Byte value: 0xec */ + {{0x5a, 0x4a, 0x57, 0xd8, 0x6f, 0xcb, 0x56, 0x48, }}, /* Byte value: 0xed */ + {{0x7c, 0x3f, 0xc4, 0x11, 0xc1, 0x7a, 0xdc, 0x0f, }}, /* Byte value: 0xee */ + {{0xe2, 0x7a, 0x60, 0xbb, 0x47, 0xd8, 0x88, 0x69, }}, /* Byte value: 0xef */ + {{0x7e, 0xb0, 0x1e, 0xa8, 0xe8, 0xda, 0xcb, 0xd9, }}, /* Byte value: 0xf0 */ + {{0x2f, 0xaa, 0x10, 0xd5, 0xff, 0x24, 0x3c, 0xf2, }}, /* Byte value: 0xf1 */ + {{0x5f, 0x31, 0x4d, 0xd4, 0xc8, 0x18, 0x92, 0x4c, }}, /* Byte value: 0xf2 */ + {{0x70, 0x9b, 0x5d, 0x01, 0x37, 0x3c, 0xae, 0xbe, }}, /* Byte value: 0xf3 */ + {{0x66, 0x3b, 0xef, 0x88, 0xc7, 0x56, 0x2f, 0x78, }}, /* Byte value: 0xf4 */ + {{0xcd, 0xd0, 0x70, 0x6e, 0xb8, 0xfc, 0xb4, 0x9b, }}, /* Byte value: 0xf5 */ + {{0x84, 0x41, 0x8f, 0x33, 0x80, 0x8e, 0xa7, 0x11, }}, /* Byte value: 0xf6 */ + {{0xdb, 0x70, 0xc2, 0xe7, 0x48, 0x96, 0x35, 0x5d, }}, /* Byte value: 0xf7 */ + {{0x4c, 0xea, 0xe5, 0x51, 0x9f, 0xa1, 0xd7, 0x8e, }}, /* Byte value: 0xf8 */ + {{0xf4, 0xda, 0xd2, 0x32, 0xb7, 0xb2, 0x09, 0xaf, }}, /* Byte value: 0xf9 */ + {{0x9b, 0x3e, 0xbe, 0xa6, 0x21, 0x71, 0x90, 0x62, }}, /* Byte value: 0xfa */ + {{0xf3, 0x2e, 0x12, 0x87, 0x39, 0xc1, 0xda, 0x7d, }}, /* Byte value: 0xfb */ + {{0xf2, 0x88, 0x7f, 0x3a, 0xcc, 0x91, 0x30, 0x16, }}, /* Byte value: 0xfc */ + {{0xd5, 0x5b, 0x81, 0x4e, 0x97, 0x70, 0x50, 0x3a, }}, /* Byte value: 0xfd */ + {{0xb0, 0x49, 0xd9, 0xc2, 0x8c, 0xd6, 0x82, 0xff, }}, /* Byte value: 0xfe */ + {{0xac, 0x1f, 0x5f, 0x53, 0xf1, 0xd9, 0x48, 0x31, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 4 */ + {{0x9f, 0xbe, 0xcc, 0x92, 0x5e, 0x72, 0x11, 0x8f, }}, /* Byte value: 0x00 */ + {{0x27, 0x60, 0x9b, 0x0b, 0x90, 0xfb, 0x32, 0xb5, }}, /* Byte value: 0x01 */ + {{0x4d, 0x3d, 0x10, 0xa8, 0xb8, 0x2d, 0xbd, 0xb7, }}, /* Byte value: 0x02 */ + {{0x26, 0x8a, 0x79, 0x61, 0x18, 0xf3, 0xc4, 0xbf, }}, /* Byte value: 0x03 */ + {{0xf5, 0xe3, 0x47, 0x31, 0x76, 0xa4, 0x9e, 0x8d, }}, /* Byte value: 0x04 */ + {{0x43, 0x58, 0x05, 0xc1, 0xc4, 0x5d, 0x70, 0xdb, }}, /* Byte value: 0x05 */ + {{0x3f, 0x84, 0xbf, 0xb2, 0x0d, 0x3b, 0x35, 0x45, }}, /* Byte value: 0x06 */ + {{0x12, 0xaf, 0x3f, 0xbb, 0x84, 0x90, 0x94, 0xb4, }}, /* Byte value: 0x07 */ + {{0xab, 0x9b, 0x8a, 0x48, 0xc2, 0x11, 0x41, 0x84, }}, /* Byte value: 0x08 */ + {{0xfc, 0x55, 0xb9, 0x8d, 0x34, 0xec, 0xd4, 0xd7, }}, /* Byte value: 0x09 */ + {{0x60, 0x16, 0x90, 0xa1, 0x31, 0x86, 0x1c, 0x46, }}, /* Byte value: 0x0a */ + {{0x79, 0x18, 0x56, 0x72, 0x24, 0x4e, 0xed, 0xbc, }}, /* Byte value: 0x0b */ + {{0x87, 0x5a, 0xe8, 0x2b, 0xc3, 0xb2, 0x16, 0x7f, }}, /* Byte value: 0x0c */ + {{0x37, 0xd8, 0xa3, 0x64, 0xc7, 0x7b, 0x89, 0x15, }}, /* Byte value: 0x0d */ + {{0xaa, 0x71, 0x68, 0x22, 0x4a, 0x19, 0xb7, 0x8e, }}, /* Byte value: 0x0e */ + {{0xc4, 0x02, 0xed, 0xea, 0x07, 0xef, 0x66, 0xa4, }}, /* Byte value: 0x0f */ + {{0x13, 0x45, 0xdd, 0xd1, 0x0c, 0x98, 0x62, 0xbe, }}, /* Byte value: 0x10 */ + {{0xf2, 0x30, 0xac, 0xe4, 0x48, 0x9c, 0x19, 0xbb, }}, /* Byte value: 0x11 */ + {{0xa2, 0x2d, 0x74, 0xf4, 0x80, 0x59, 0x0b, 0xde, }}, /* Byte value: 0x12 */ + {{0xb2, 0x95, 0x4c, 0x9b, 0xd7, 0xd9, 0xb0, 0x7e, }}, /* Byte value: 0x13 */ + {{0x17, 0x6b, 0xd3, 0xba, 0x69, 0xb8, 0x3c, 0x96, }}, /* Byte value: 0x14 */ + {{0x71, 0x44, 0x4a, 0xa4, 0xee, 0x0e, 0x51, 0xec, }}, /* Byte value: 0x15 */ + {{0xd5, 0x50, 0x37, 0xef, 0xd8, 0x67, 0x2b, 0x0e, }}, /* Byte value: 0x16 */ + {{0x52, 0x0a, 0xdf, 0xc4, 0x1b, 0xd5, 0x3d, 0x71, }}, /* Byte value: 0x17 */ + {{0xd9, 0x22, 0x25, 0x52, 0x77, 0x07, 0xc9, 0x76, }}, /* Byte value: 0x18 */ + {{0x0b, 0xa1, 0xf9, 0x68, 0x91, 0x58, 0x65, 0x4e, }}, /* Byte value: 0x19 */ + {{0x69, 0xa0, 0x6e, 0x1d, 0x73, 0xce, 0x56, 0x1c, }}, /* Byte value: 0x1a */ + {{0x99, 0x87, 0xc5, 0x2d, 0xe8, 0x42, 0x60, 0xb3, }}, /* Byte value: 0x1b */ + {{0x47, 0x76, 0x0b, 0xaa, 0xa1, 0x7d, 0x2e, 0xf3, }}, /* Byte value: 0x1c */ + {{0xa0, 0x3a, 0x73, 0x20, 0x53, 0x49, 0x24, 0xca, }}, /* Byte value: 0x1d */ + {{0x7c, 0xdc, 0xba, 0x73, 0xc9, 0x66, 0x45, 0x9e, }}, /* Byte value: 0x1e */ + {{0x9d, 0xa9, 0xcb, 0x46, 0x8d, 0x62, 0x3e, 0x9b, }}, /* Byte value: 0x1f */ + {{0xfe, 0x42, 0xbe, 0x59, 0xe7, 0xfc, 0xfb, 0xc3, }}, /* Byte value: 0x20 */ + {{0x7a, 0xe5, 0xb3, 0xcc, 0x7f, 0x56, 0x34, 0xa2, }}, /* Byte value: 0x21 */ + {{0x4a, 0xee, 0xfb, 0x7d, 0x86, 0x15, 0x3a, 0x81, }}, /* Byte value: 0x22 */ + {{0x1d, 0x20, 0xc8, 0xb8, 0x70, 0xe8, 0xaf, 0xd2, }}, /* Byte value: 0x23 */ + {{0x1a, 0xf3, 0x23, 0x6d, 0x4e, 0xd0, 0x28, 0xe4, }}, /* Byte value: 0x24 */ + {{0xe2, 0x88, 0x94, 0x8b, 0x1f, 0x1c, 0xa2, 0x1b, }}, /* Byte value: 0x25 */ + {{0xec, 0xed, 0x81, 0xe2, 0x63, 0x6c, 0x6f, 0x77, }}, /* Byte value: 0x26 */ + {{0xd2, 0x83, 0xdc, 0x3a, 0xe6, 0x5f, 0xac, 0x38, }}, /* Byte value: 0x27 */ + {{0xaf, 0xb5, 0x84, 0x23, 0xa7, 0x31, 0x1f, 0xac, }}, /* Byte value: 0x28 */ + {{0xd0, 0x94, 0xdb, 0xee, 0x35, 0x4f, 0x83, 0x2c, }}, /* Byte value: 0x29 */ + {{0xc9, 0x9a, 0x1d, 0x3d, 0x20, 0x87, 0x72, 0xd6, }}, /* Byte value: 0x2a */ + {{0x67, 0xc5, 0x7b, 0x74, 0x0f, 0xbe, 0x9b, 0x70, }}, /* Byte value: 0x2b */ + {{0x6d, 0x8e, 0x60, 0x76, 0x16, 0xee, 0x08, 0x34, }}, /* Byte value: 0x2c */ + {{0xcb, 0x8d, 0x1a, 0xe9, 0xf3, 0x97, 0x5d, 0xc2, }}, /* Byte value: 0x2d */ + {{0x0c, 0x72, 0x12, 0xbd, 0xaf, 0x60, 0xe2, 0x78, }}, /* Byte value: 0x2e */ + {{0x91, 0xdb, 0xd9, 0xfb, 0x22, 0x02, 0xdc, 0xe3, }}, /* Byte value: 0x2f */ + {{0x61, 0xfc, 0x72, 0xcb, 0xb9, 0x8e, 0xea, 0x4c, }}, /* Byte value: 0x30 */ + {{0xce, 0x49, 0xf6, 0xe8, 0x1e, 0xbf, 0xf5, 0xe0, }}, /* Byte value: 0x31 */ + {{0x55, 0xd9, 0x34, 0x11, 0x25, 0xed, 0xba, 0x47, }}, /* Byte value: 0x32 */ + {{0x15, 0x7c, 0xd4, 0x6e, 0xba, 0xa8, 0x13, 0x82, }}, /* Byte value: 0x33 */ + {{0xd1, 0x7e, 0x39, 0x84, 0xbd, 0x47, 0x75, 0x26, }}, /* Byte value: 0x34 */ + {{0xe9, 0x29, 0x6d, 0xe3, 0x8e, 0x44, 0xc7, 0x55, }}, /* Byte value: 0x35 */ + {{0xc7, 0xff, 0x08, 0x54, 0x5c, 0xf7, 0xbf, 0xba, }}, /* Byte value: 0x36 */ + {{0x7d, 0x36, 0x58, 0x19, 0x41, 0x6e, 0xb3, 0x94, }}, /* Byte value: 0x37 */ + {{0xff, 0xa8, 0x5c, 0x33, 0x6f, 0xf4, 0x0d, 0xc9, }}, /* Byte value: 0x38 */ + {{0x09, 0xb6, 0xfe, 0xbc, 0x42, 0x48, 0x4a, 0x5a, }}, /* Byte value: 0x39 */ + {{0xb9, 0x34, 0xb5, 0xf3, 0x46, 0x81, 0xd5, 0x30, }}, /* Byte value: 0x3a */ + {{0x1e, 0xdd, 0x2d, 0x06, 0x2b, 0xf0, 0x76, 0xcc, }}, /* Byte value: 0x3b */ + {{0x65, 0xd2, 0x7c, 0xa0, 0xdc, 0xae, 0xb4, 0x64, }}, /* Byte value: 0x3c */ + {{0x11, 0x52, 0xda, 0x05, 0xdf, 0x88, 0x4d, 0xaa, }}, /* Byte value: 0x3d */ + {{0x25, 0x77, 0x9c, 0xdf, 0x43, 0xeb, 0x1d, 0xa1, }}, /* Byte value: 0x3e */ + {{0x4e, 0xc0, 0xf5, 0x16, 0xe3, 0x35, 0x64, 0xa9, }}, /* Byte value: 0x3f */ + {{0x46, 0x9c, 0xe9, 0xc0, 0x29, 0x75, 0xd8, 0xf9, }}, /* Byte value: 0x40 */ + {{0x5e, 0x78, 0xcd, 0x79, 0xb4, 0xb5, 0xdf, 0x09, }}, /* Byte value: 0x41 */ + {{0x24, 0x9d, 0x7e, 0xb5, 0xcb, 0xe3, 0xeb, 0xab, }}, /* Byte value: 0x42 */ + {{0x14, 0x96, 0x36, 0x04, 0x32, 0xa0, 0xe5, 0x88, }}, /* Byte value: 0x43 */ + {{0x8d, 0x11, 0xf3, 0x29, 0xda, 0xe2, 0x85, 0x3b, }}, /* Byte value: 0x44 */ + {{0xc1, 0xc6, 0x01, 0xeb, 0xea, 0xc7, 0xce, 0x86, }}, /* Byte value: 0x45 */ + {{0xa5, 0xfe, 0x9f, 0x21, 0xbe, 0x61, 0x8c, 0xe8, }}, /* Byte value: 0x46 */ + {{0x74, 0x80, 0xa6, 0xa5, 0x03, 0x26, 0xf9, 0xce, }}, /* Byte value: 0x47 */ + {{0xf7, 0xf4, 0x40, 0xe5, 0xa5, 0xb4, 0xb1, 0x99, }}, /* Byte value: 0x48 */ + {{0xdb, 0x35, 0x22, 0x86, 0xa4, 0x17, 0xe6, 0x62, }}, /* Byte value: 0x49 */ + {{0xbc, 0xf0, 0x59, 0xf2, 0xab, 0xa9, 0x7d, 0x12, }}, /* Byte value: 0x4a */ + {{0x28, 0xef, 0x6c, 0x08, 0x64, 0x83, 0x09, 0xd3, }}, /* Byte value: 0x4b */ + {{0x54, 0x33, 0xd6, 0x7b, 0xad, 0xe5, 0x4c, 0x4d, }}, /* Byte value: 0x4c */ + {{0x36, 0x32, 0x41, 0x0e, 0x4f, 0x73, 0x7f, 0x1f, }}, /* Byte value: 0x4d */ + {{0x3e, 0x6e, 0x5d, 0xd8, 0x85, 0x33, 0xc3, 0x4f, }}, /* Byte value: 0x4e */ + {{0x6b, 0xb7, 0x69, 0xc9, 0xa0, 0xde, 0x79, 0x08, }}, /* Byte value: 0x4f */ + {{0xf1, 0xcd, 0x49, 0x5a, 0x13, 0x84, 0xc0, 0xa5, }}, /* Byte value: 0x50 */ + {{0xc6, 0x15, 0xea, 0x3e, 0xd4, 0xff, 0x49, 0xb0, }}, /* Byte value: 0x51 */ + {{0x68, 0x4a, 0x8c, 0x77, 0xfb, 0xc6, 0xa0, 0x16, }}, /* Byte value: 0x52 */ + {{0x20, 0xb3, 0x70, 0xde, 0xae, 0xc3, 0xb5, 0x83, }}, /* Byte value: 0x53 */ + {{0x97, 0xe2, 0xd0, 0x44, 0x94, 0x32, 0xad, 0xdf, }}, /* Byte value: 0x54 */ + {{0x3d, 0x93, 0xb8, 0x66, 0xde, 0x2b, 0x1a, 0x51, }}, /* Byte value: 0x55 */ + {{0x39, 0xbd, 0xb6, 0x0d, 0xbb, 0x0b, 0x44, 0x79, }}, /* Byte value: 0x56 */ + {{0xb8, 0xde, 0x57, 0x99, 0xce, 0x89, 0x23, 0x3a, }}, /* Byte value: 0x57 */ + {{0x33, 0xf6, 0xad, 0x0f, 0xa2, 0x5b, 0xd7, 0x3d, }}, /* Byte value: 0x58 */ + {{0x93, 0xcc, 0xde, 0x2f, 0xf1, 0x12, 0xf3, 0xf7, }}, /* Byte value: 0x59 */ + {{0x73, 0x53, 0x4d, 0x70, 0x3d, 0x1e, 0x7e, 0xf8, }}, /* Byte value: 0x5a */ + {{0x06, 0x39, 0x09, 0xbf, 0xb6, 0x30, 0x71, 0x3c, }}, /* Byte value: 0x5b */ + {{0xb4, 0xac, 0x45, 0x24, 0x61, 0xe9, 0xc1, 0x42, }}, /* Byte value: 0x5c */ + {{0xa4, 0x14, 0x7d, 0x4b, 0x36, 0x69, 0x7a, 0xe2, }}, /* Byte value: 0x5d */ + {{0x29, 0x05, 0x8e, 0x62, 0xec, 0x8b, 0xff, 0xd9, }}, /* Byte value: 0x5e */ + {{0x50, 0x1d, 0xd8, 0x10, 0xc8, 0xc5, 0x12, 0x65, }}, /* Byte value: 0x5f */ + {{0x8c, 0xfb, 0x11, 0x43, 0x52, 0xea, 0x73, 0x31, }}, /* Byte value: 0x60 */ + {{0xb6, 0xbb, 0x42, 0xf0, 0xb2, 0xf9, 0xee, 0x56, }}, /* Byte value: 0x61 */ + {{0x76, 0x97, 0xa1, 0x71, 0xd0, 0x36, 0xd6, 0xda, }}, /* Byte value: 0x62 */ + {{0x45, 0x61, 0x0c, 0x7e, 0x72, 0x6d, 0x01, 0xe7, }}, /* Byte value: 0x63 */ + {{0xed, 0x07, 0x63, 0x88, 0xeb, 0x64, 0x99, 0x7d, }}, /* Byte value: 0x64 */ + {{0xcf, 0xa3, 0x14, 0x82, 0x96, 0xb7, 0x03, 0xea, }}, /* Byte value: 0x65 */ + {{0x4b, 0x04, 0x19, 0x17, 0x0e, 0x1d, 0xcc, 0x8b, }}, /* Byte value: 0x66 */ + {{0x62, 0x01, 0x97, 0x75, 0xe2, 0x96, 0x33, 0x52, }}, /* Byte value: 0x67 */ + {{0x3c, 0x79, 0x5a, 0x0c, 0x56, 0x23, 0xec, 0x5b, }}, /* Byte value: 0x68 */ + {{0x42, 0xb2, 0xe7, 0xab, 0x4c, 0x55, 0x86, 0xd1, }}, /* Byte value: 0x69 */ + {{0x51, 0xf7, 0x3a, 0x7a, 0x40, 0xcd, 0xe4, 0x6f, }}, /* Byte value: 0x6a */ + {{0x88, 0xd5, 0x1f, 0x28, 0x37, 0xca, 0x2d, 0x19, }}, /* Byte value: 0x6b */ + {{0x7f, 0x21, 0x5f, 0xcd, 0x92, 0x7e, 0x9c, 0x80, }}, /* Byte value: 0x6c */ + {{0xe1, 0x75, 0x71, 0x35, 0x44, 0x04, 0x7b, 0x05, }}, /* Byte value: 0x6d */ + {{0xc5, 0xe8, 0x0f, 0x80, 0x8f, 0xe7, 0x90, 0xae, }}, /* Byte value: 0x6e */ + {{0x5b, 0xbc, 0x21, 0x78, 0x59, 0x9d, 0x77, 0x2b, }}, /* Byte value: 0x6f */ + {{0xa1, 0xd0, 0x91, 0x4a, 0xdb, 0x41, 0xd2, 0xc0, }}, /* Byte value: 0x70 */ + {{0xa7, 0xe9, 0x98, 0xf5, 0x6d, 0x71, 0xa3, 0xfc, }}, /* Byte value: 0x71 */ + {{0xb1, 0x68, 0xa9, 0x25, 0x8c, 0xc1, 0x69, 0x60, }}, /* Byte value: 0x72 */ + {{0x02, 0x17, 0x07, 0xd4, 0xd3, 0x10, 0x2f, 0x14, }}, /* Byte value: 0x73 */ + {{0x01, 0xea, 0xe2, 0x6a, 0x88, 0x08, 0xf6, 0x0a, }}, /* Byte value: 0x74 */ + {{0x95, 0xf5, 0xd7, 0x90, 0x47, 0x22, 0x82, 0xcb, }}, /* Byte value: 0x75 */ + {{0xa6, 0x03, 0x7a, 0x9f, 0xe5, 0x79, 0x55, 0xf6, }}, /* Byte value: 0x76 */ + {{0xae, 0x5f, 0x66, 0x49, 0x2f, 0x39, 0xe9, 0xa6, }}, /* Byte value: 0x77 */ + {{0xdd, 0x0c, 0x2b, 0x39, 0x12, 0x27, 0x97, 0x5e, }}, /* Byte value: 0x78 */ + {{0x75, 0x6a, 0x44, 0xcf, 0x8b, 0x2e, 0x0f, 0xc4, }}, /* Byte value: 0x79 */ + {{0xa9, 0x8c, 0x8d, 0x9c, 0x11, 0x01, 0x6e, 0x90, }}, /* Byte value: 0x7a */ + {{0x64, 0x38, 0x9e, 0xca, 0x54, 0xa6, 0x42, 0x6e, }}, /* Byte value: 0x7b */ + {{0xc8, 0x70, 0xff, 0x57, 0xa8, 0x8f, 0x84, 0xdc, }}, /* Byte value: 0x7c */ + {{0x66, 0x2f, 0x99, 0x1e, 0x87, 0xb6, 0x6d, 0x7a, }}, /* Byte value: 0x7d */ + {{0xf6, 0x1e, 0xa2, 0x8f, 0x2d, 0xbc, 0x47, 0x93, }}, /* Byte value: 0x7e */ + {{0xeb, 0x3e, 0x6a, 0x37, 0x5d, 0x54, 0xe8, 0x41, }}, /* Byte value: 0x7f */ + {{0x18, 0xe4, 0x24, 0xb9, 0x9d, 0xc0, 0x07, 0xf0, }}, /* Byte value: 0x80 */ + {{0xc3, 0xd1, 0x06, 0x3f, 0x39, 0xd7, 0xe1, 0x92, }}, /* Byte value: 0x81 */ + {{0xb3, 0x7f, 0xae, 0xf1, 0x5f, 0xd1, 0x46, 0x74, }}, /* Byte value: 0x82 */ + {{0x21, 0x59, 0x92, 0xb4, 0x26, 0xcb, 0x43, 0x89, }}, /* Byte value: 0x83 */ + {{0x9c, 0x43, 0x29, 0x2c, 0x05, 0x6a, 0xc8, 0x91, }}, /* Byte value: 0x84 */ + {{0xea, 0xd4, 0x88, 0x5d, 0xd5, 0x5c, 0x1e, 0x4b, }}, /* Byte value: 0x85 */ + {{0xac, 0x48, 0x61, 0x9d, 0xfc, 0x29, 0xc6, 0xb2, }}, /* Byte value: 0x86 */ + {{0x0a, 0x4b, 0x1b, 0x02, 0x19, 0x50, 0x93, 0x44, }}, /* Byte value: 0x87 */ + {{0x8f, 0x06, 0xf4, 0xfd, 0x09, 0xf2, 0xaa, 0x2f, }}, /* Byte value: 0x88 */ + {{0x9a, 0x7a, 0x20, 0x93, 0xb3, 0x5a, 0xb9, 0xad, }}, /* Byte value: 0x89 */ + {{0x44, 0x8b, 0xee, 0x14, 0xfa, 0x65, 0xf7, 0xed, }}, /* Byte value: 0x8a */ + {{0x5d, 0x85, 0x28, 0xc7, 0xef, 0xad, 0x06, 0x17, }}, /* Byte value: 0x8b */ + {{0xfb, 0x86, 0x52, 0x58, 0x0a, 0xd4, 0x53, 0xe1, }}, /* Byte value: 0x8c */ + {{0x4c, 0xd7, 0xf2, 0xc2, 0x30, 0x25, 0x4b, 0xbd, }}, /* Byte value: 0x8d */ + {{0xcc, 0x5e, 0xf1, 0x3c, 0xcd, 0xaf, 0xda, 0xf4, }}, /* Byte value: 0x8e */ + {{0x9e, 0x54, 0x2e, 0xf8, 0xd6, 0x7a, 0xe7, 0x85, }}, /* Byte value: 0x8f */ + {{0x4f, 0x2a, 0x17, 0x7c, 0x6b, 0x3d, 0x92, 0xa3, }}, /* Byte value: 0x90 */ + {{0xa3, 0xc7, 0x96, 0x9e, 0x08, 0x51, 0xfd, 0xd4, }}, /* Byte value: 0x91 */ + {{0x72, 0xb9, 0xaf, 0x1a, 0xb5, 0x16, 0x88, 0xf2, }}, /* Byte value: 0x92 */ + {{0xd3, 0x69, 0x3e, 0x50, 0x6e, 0x57, 0x5a, 0x32, }}, /* Byte value: 0x93 */ + {{0x04, 0x2e, 0x0e, 0x6b, 0x65, 0x20, 0x5e, 0x28, }}, /* Byte value: 0x94 */ + {{0x23, 0x4e, 0x95, 0x60, 0xf5, 0xdb, 0x6c, 0x9d, }}, /* Byte value: 0x95 */ + {{0x90, 0x31, 0x3b, 0x91, 0xaa, 0x0a, 0x2a, 0xe9, }}, /* Byte value: 0x96 */ + {{0xad, 0xa2, 0x83, 0xf7, 0x74, 0x21, 0x30, 0xb8, }}, /* Byte value: 0x97 */ + {{0x86, 0xb0, 0x0a, 0x41, 0x4b, 0xba, 0xe0, 0x75, }}, /* Byte value: 0x98 */ + {{0xd8, 0xc8, 0xc7, 0x38, 0xff, 0x0f, 0x3f, 0x7c, }}, /* Byte value: 0x99 */ + {{0x8e, 0xec, 0x16, 0x97, 0x81, 0xfa, 0x5c, 0x25, }}, /* Byte value: 0x9a */ + {{0xdf, 0x1b, 0x2c, 0xed, 0xc1, 0x37, 0xb8, 0x4a, }}, /* Byte value: 0x9b */ + {{0x5a, 0x56, 0xc3, 0x12, 0xd1, 0x95, 0x81, 0x21, }}, /* Byte value: 0x9c */ + {{0x6a, 0x5d, 0x8b, 0xa3, 0x28, 0xd6, 0x8f, 0x02, }}, /* Byte value: 0x9d */ + {{0xc2, 0x3b, 0xe4, 0x55, 0xb1, 0xdf, 0x17, 0x98, }}, /* Byte value: 0x9e */ + {{0xf0, 0x27, 0xab, 0x30, 0x9b, 0x8c, 0x36, 0xaf, }}, /* Byte value: 0x9f */ + {{0x49, 0x13, 0x1e, 0xc3, 0xdd, 0x0d, 0xe3, 0x9f, }}, /* Byte value: 0xa0 */ + {{0xbd, 0x1a, 0xbb, 0x98, 0x23, 0xa1, 0x8b, 0x18, }}, /* Byte value: 0xa1 */ + {{0x2b, 0x12, 0x89, 0xb6, 0x3f, 0x9b, 0xd0, 0xcd, }}, /* Byte value: 0xa2 */ + {{0x58, 0x41, 0xc4, 0xc6, 0x02, 0x85, 0xae, 0x35, }}, /* Byte value: 0xa3 */ + {{0x85, 0x4d, 0xef, 0xff, 0x10, 0xa2, 0x39, 0x6b, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x7e, 0xcb, 0xbd, 0xa7, 0x1a, 0x76, 0x6a, 0x8a, }}, /* Byte value: 0xa6 */ + {{0x98, 0x6d, 0x27, 0x47, 0x60, 0x4a, 0x96, 0xb9, }}, /* Byte value: 0xa7 */ + {{0x2f, 0x3c, 0x87, 0xdd, 0x5a, 0xbb, 0x8e, 0xe5, }}, /* Byte value: 0xa8 */ + {{0x07, 0xd3, 0xeb, 0xd5, 0x3e, 0x38, 0x87, 0x36, }}, /* Byte value: 0xa9 */ + {{0x63, 0xeb, 0x75, 0x1f, 0x6a, 0x9e, 0xc5, 0x58, }}, /* Byte value: 0xaa */ + {{0x31, 0xe1, 0xaa, 0xdb, 0x71, 0x4b, 0xf8, 0x29, }}, /* Byte value: 0xab */ + {{0x81, 0x63, 0xe1, 0x94, 0x75, 0x82, 0x67, 0x43, }}, /* Byte value: 0xac */ + {{0x2a, 0xf8, 0x6b, 0xdc, 0xb7, 0x93, 0x26, 0xc7, }}, /* Byte value: 0xad */ + {{0xe6, 0xa6, 0x9a, 0xe0, 0x7a, 0x3c, 0xfc, 0x33, }}, /* Byte value: 0xae */ + {{0xf9, 0x91, 0x55, 0x8c, 0xd9, 0xc4, 0x7c, 0xf5, }}, /* Byte value: 0xaf */ + {{0x8b, 0x28, 0xfa, 0x96, 0x6c, 0xd2, 0xf4, 0x07, }}, /* Byte value: 0xb0 */ + {{0x53, 0xe0, 0x3d, 0xae, 0x93, 0xdd, 0xcb, 0x7b, }}, /* Byte value: 0xb1 */ + {{0xcd, 0xb4, 0x13, 0x56, 0x45, 0xa7, 0x2c, 0xfe, }}, /* Byte value: 0xb2 */ + {{0xdc, 0xe6, 0xc9, 0x53, 0x9a, 0x2f, 0x61, 0x54, }}, /* Byte value: 0xb3 */ + {{0x2d, 0x2b, 0x80, 0x09, 0x89, 0xab, 0xa1, 0xf1, }}, /* Byte value: 0xb4 */ + {{0xb7, 0x51, 0xa0, 0x9a, 0x3a, 0xf1, 0x18, 0x5c, }}, /* Byte value: 0xb5 */ + {{0xbe, 0xe7, 0x5e, 0x26, 0x78, 0xb9, 0x52, 0x06, }}, /* Byte value: 0xb6 */ + {{0xba, 0xc9, 0x50, 0x4d, 0x1d, 0x99, 0x0c, 0x2e, }}, /* Byte value: 0xb7 */ + {{0x59, 0xab, 0x26, 0xac, 0x8a, 0x8d, 0x58, 0x3f, }}, /* Byte value: 0xb8 */ + {{0xe3, 0x62, 0x76, 0xe1, 0x97, 0x14, 0x54, 0x11, }}, /* Byte value: 0xb9 */ + {{0x1c, 0xca, 0x2a, 0xd2, 0xf8, 0xe0, 0x59, 0xd8, }}, /* Byte value: 0xba */ + {{0x30, 0x0b, 0x48, 0xb1, 0xf9, 0x43, 0x0e, 0x23, }}, /* Byte value: 0xbb */ + {{0x77, 0x7d, 0x43, 0x1b, 0x58, 0x3e, 0x20, 0xd0, }}, /* Byte value: 0xbc */ + {{0xda, 0xdf, 0xc0, 0xec, 0x2c, 0x1f, 0x10, 0x68, }}, /* Byte value: 0xbd */ + {{0xe8, 0xc3, 0x8f, 0x89, 0x06, 0x4c, 0x31, 0x5f, }}, /* Byte value: 0xbe */ + {{0xfd, 0xbf, 0x5b, 0xe7, 0xbc, 0xe4, 0x22, 0xdd, }}, /* Byte value: 0xbf */ + {{0x34, 0x25, 0x46, 0xda, 0x9c, 0x63, 0x50, 0x0b, }}, /* Byte value: 0xc0 */ + {{0x48, 0xf9, 0xfc, 0xa9, 0x55, 0x05, 0x15, 0x95, }}, /* Byte value: 0xc1 */ + {{0x0e, 0x65, 0x15, 0x69, 0x7c, 0x70, 0xcd, 0x6c, }}, /* Byte value: 0xc2 */ + {{0x32, 0x1c, 0x4f, 0x65, 0x2a, 0x53, 0x21, 0x37, }}, /* Byte value: 0xc3 */ + {{0x9b, 0x90, 0xc2, 0xf9, 0x3b, 0x52, 0x4f, 0xa7, }}, /* Byte value: 0xc4 */ + {{0x40, 0xa5, 0xe0, 0x7f, 0x9f, 0x45, 0xa9, 0xc5, }}, /* Byte value: 0xc5 */ + {{0x1b, 0x19, 0xc1, 0x07, 0xc6, 0xd8, 0xde, 0xee, }}, /* Byte value: 0xc6 */ + {{0x96, 0x08, 0x32, 0x2e, 0x1c, 0x3a, 0x5b, 0xd5, }}, /* Byte value: 0xc7 */ + {{0xf4, 0x09, 0xa5, 0x5b, 0xfe, 0xac, 0x68, 0x87, }}, /* Byte value: 0xc8 */ + {{0xc0, 0x2c, 0xe3, 0x81, 0x62, 0xcf, 0x38, 0x8c, }}, /* Byte value: 0xc9 */ + {{0x22, 0xa4, 0x77, 0x0a, 0x7d, 0xd3, 0x9a, 0x97, }}, /* Byte value: 0xca */ + {{0xe5, 0x5b, 0x7f, 0x5e, 0x21, 0x24, 0x25, 0x2d, }}, /* Byte value: 0xcb */ + {{0xf3, 0xda, 0x4e, 0x8e, 0xc0, 0x94, 0xef, 0xb1, }}, /* Byte value: 0xcc */ + {{0xe7, 0x4c, 0x78, 0x8a, 0xf2, 0x34, 0x0a, 0x39, }}, /* Byte value: 0xcd */ + {{0x7b, 0x0f, 0x51, 0xa6, 0xf7, 0x5e, 0xc2, 0xa8, }}, /* Byte value: 0xce */ + {{0x38, 0x57, 0x54, 0x67, 0x33, 0x03, 0xb2, 0x73, }}, /* Byte value: 0xcf */ + {{0x84, 0xa7, 0x0d, 0x95, 0x98, 0xaa, 0xcf, 0x61, }}, /* Byte value: 0xd0 */ + {{0xe4, 0xb1, 0x9d, 0x34, 0xa9, 0x2c, 0xd3, 0x27, }}, /* Byte value: 0xd1 */ + {{0xfa, 0x6c, 0xb0, 0x32, 0x82, 0xdc, 0xa5, 0xeb, }}, /* Byte value: 0xd2 */ + {{0x6e, 0x73, 0x85, 0xc8, 0x4d, 0xf6, 0xd1, 0x2a, }}, /* Byte value: 0xd3 */ + {{0x0f, 0x8f, 0xf7, 0x03, 0xf4, 0x78, 0x3b, 0x66, }}, /* Byte value: 0xd4 */ + {{0x57, 0xce, 0x33, 0xc5, 0xf6, 0xfd, 0x95, 0x53, }}, /* Byte value: 0xd5 */ + {{0x35, 0xcf, 0xa4, 0xb0, 0x14, 0x6b, 0xa6, 0x01, }}, /* Byte value: 0xd6 */ + {{0xca, 0x67, 0xf8, 0x83, 0x7b, 0x9f, 0xab, 0xc8, }}, /* Byte value: 0xd7 */ + {{0x92, 0x26, 0x3c, 0x45, 0x79, 0x1a, 0x05, 0xfd, }}, /* Byte value: 0xd8 */ + {{0x41, 0x4f, 0x02, 0x15, 0x17, 0x4d, 0x5f, 0xcf, }}, /* Byte value: 0xd9 */ + {{0xbf, 0x0d, 0xbc, 0x4c, 0xf0, 0xb1, 0xa4, 0x0c, }}, /* Byte value: 0xda */ + {{0x89, 0x3f, 0xfd, 0x42, 0xbf, 0xc2, 0xdb, 0x13, }}, /* Byte value: 0xdb */ + {{0x94, 0x1f, 0x35, 0xfa, 0xcf, 0x2a, 0x74, 0xc1, }}, /* Byte value: 0xdc */ + {{0x2c, 0xc1, 0x62, 0x63, 0x01, 0xa3, 0x57, 0xfb, }}, /* Byte value: 0xdd */ + {{0x05, 0xc4, 0xec, 0x01, 0xed, 0x28, 0xa8, 0x22, }}, /* Byte value: 0xde */ + {{0xe0, 0x9f, 0x93, 0x5f, 0xcc, 0x0c, 0x8d, 0x0f, }}, /* Byte value: 0xdf */ + {{0x19, 0x0e, 0xc6, 0xd3, 0x15, 0xc8, 0xf1, 0xfa, }}, /* Byte value: 0xe0 */ + {{0x0d, 0x98, 0xf0, 0xd7, 0x27, 0x68, 0x14, 0x72, }}, /* Byte value: 0xe1 */ + {{0x1f, 0x37, 0xcf, 0x6c, 0xa3, 0xf8, 0x80, 0xc6, }}, /* Byte value: 0xe2 */ + {{0xd7, 0x47, 0x30, 0x3b, 0x0b, 0x77, 0x04, 0x1a, }}, /* Byte value: 0xe3 */ + {{0xef, 0x10, 0x64, 0x5c, 0x38, 0x74, 0xb6, 0x69, }}, /* Byte value: 0xe4 */ + {{0x10, 0xb8, 0x38, 0x6f, 0x57, 0x80, 0xbb, 0xa0, }}, /* Byte value: 0xe5 */ + {{0x5c, 0x6f, 0xca, 0xad, 0x67, 0xa5, 0xf0, 0x1d, }}, /* Byte value: 0xe6 */ + {{0xd6, 0xad, 0xd2, 0x51, 0x83, 0x7f, 0xf2, 0x10, }}, /* Byte value: 0xe7 */ + {{0x5f, 0x92, 0x2f, 0x13, 0x3c, 0xbd, 0x29, 0x03, }}, /* Byte value: 0xe8 */ + {{0x80, 0x89, 0x03, 0xfe, 0xfd, 0x8a, 0x91, 0x49, }}, /* Byte value: 0xe9 */ + {{0x78, 0xf2, 0xb4, 0x18, 0xac, 0x46, 0x1b, 0xb6, }}, /* Byte value: 0xea */ + {{0xbb, 0x23, 0xb2, 0x27, 0x95, 0x91, 0xfa, 0x24, }}, /* Byte value: 0xeb */ + {{0xf8, 0x7b, 0xb7, 0xe6, 0x51, 0xcc, 0x8a, 0xff, }}, /* Byte value: 0xec */ + {{0x2e, 0xd6, 0x65, 0xb7, 0xd2, 0xb3, 0x78, 0xef, }}, /* Byte value: 0xed */ + {{0x16, 0x81, 0x31, 0xd0, 0xe1, 0xb0, 0xca, 0x9c, }}, /* Byte value: 0xee */ + {{0x8a, 0xc2, 0x18, 0xfc, 0xe4, 0xda, 0x02, 0x0d, }}, /* Byte value: 0xef */ + {{0x83, 0x74, 0xe6, 0x40, 0xa6, 0x92, 0x48, 0x57, }}, /* Byte value: 0xf0 */ + {{0x82, 0x9e, 0x04, 0x2a, 0x2e, 0x9a, 0xbe, 0x5d, }}, /* Byte value: 0xf1 */ + {{0x6c, 0x64, 0x82, 0x1c, 0x9e, 0xe6, 0xfe, 0x3e, }}, /* Byte value: 0xf2 */ + {{0xee, 0xfa, 0x86, 0x36, 0xb0, 0x7c, 0x40, 0x63, }}, /* Byte value: 0xf3 */ + {{0xb0, 0x82, 0x4b, 0x4f, 0x04, 0xc9, 0x9f, 0x6a, }}, /* Byte value: 0xf4 */ + {{0x08, 0x5c, 0x1c, 0xd6, 0xca, 0x40, 0xbc, 0x50, }}, /* Byte value: 0xf5 */ + {{0x3a, 0x40, 0x53, 0xb3, 0xe0, 0x13, 0x9d, 0x67, }}, /* Byte value: 0xf6 */ + {{0x56, 0x24, 0xd1, 0xaf, 0x7e, 0xf5, 0x63, 0x59, }}, /* Byte value: 0xf7 */ + {{0x70, 0xae, 0xa8, 0xce, 0x66, 0x06, 0xa7, 0xe6, }}, /* Byte value: 0xf8 */ + {{0xd4, 0xba, 0xd5, 0x85, 0x50, 0x6f, 0xdd, 0x04, }}, /* Byte value: 0xf9 */ + {{0xde, 0xf1, 0xce, 0x87, 0x49, 0x3f, 0x4e, 0x40, }}, /* Byte value: 0xfa */ + {{0x03, 0xfd, 0xe5, 0xbe, 0x5b, 0x18, 0xd9, 0x1e, }}, /* Byte value: 0xfb */ + {{0xa8, 0x66, 0x6f, 0xf6, 0x99, 0x09, 0x98, 0x9a, }}, /* Byte value: 0xfc */ + {{0x3b, 0xaa, 0xb1, 0xd9, 0x68, 0x1b, 0x6b, 0x6d, }}, /* Byte value: 0xfd */ + {{0xb5, 0x46, 0xa7, 0x4e, 0xe9, 0xe1, 0x37, 0x48, }}, /* Byte value: 0xfe */ + {{0x6f, 0x99, 0x67, 0xa2, 0xc5, 0xfe, 0x27, 0x20, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 5 */ + {{0xbe, 0x20, 0xdb, 0x5a, 0xb5, 0x1a, 0xf0, 0xb4, }}, /* Byte value: 0x00 */ + {{0x60, 0xe7, 0xef, 0x55, 0x0a, 0x58, 0x62, 0xaa, }}, /* Byte value: 0x01 */ + {{0x3d, 0x37, 0xfc, 0x67, 0x89, 0x09, 0x7f, 0xce, }}, /* Byte value: 0x02 */ + {{0x8a, 0xf1, 0xb0, 0xaf, 0xc0, 0x8e, 0x0b, 0x9d, }}, /* Byte value: 0x03 */ + {{0xe3, 0xf0, 0xc8, 0x68, 0x36, 0x4b, 0xed, 0xd0, }}, /* Byte value: 0x04 */ + {{0x58, 0xf3, 0x40, 0xe2, 0xef, 0xc7, 0x04, 0x07, }}, /* Byte value: 0x05 */ + {{0x84, 0xf4, 0xeb, 0xf2, 0x68, 0xd9, 0xf3, 0x27, }}, /* Byte value: 0x06 */ + {{0xaf, 0x8f, 0x07, 0x4c, 0xaa, 0x91, 0x8d, 0x98, }}, /* Byte value: 0x07 */ + {{0x9b, 0x5e, 0x6c, 0xb9, 0xdf, 0x05, 0x76, 0xb1, }}, /* Byte value: 0x08 */ + {{0x55, 0x56, 0x2a, 0x4e, 0x63, 0xe2, 0x4a, 0x9c, }}, /* Byte value: 0x09 */ + {{0x16, 0x4c, 0x10, 0xd9, 0x4b, 0x41, 0x01, 0x71, }}, /* Byte value: 0x0a */ + {{0x18, 0x49, 0x4b, 0x84, 0xe3, 0x16, 0xf9, 0xcb, }}, /* Byte value: 0x0b */ + {{0x5a, 0x33, 0xdf, 0xfd, 0xd7, 0x9b, 0x61, 0x39, }}, /* Byte value: 0x0c */ + {{0xd8, 0x44, 0x56, 0x2e, 0xf7, 0xa6, 0x3d, 0x5c, }}, /* Byte value: 0x0d */ + {{0x71, 0x48, 0x33, 0x43, 0x15, 0xd3, 0x1f, 0x86, }}, /* Byte value: 0x0e */ + {{0x02, 0xc0, 0x9f, 0x1f, 0x38, 0x5c, 0x65, 0x3e, }}, /* Byte value: 0x0f */ + {{0x45, 0x99, 0x58, 0xb6, 0x60, 0x47, 0xe4, 0xaf, }}, /* Byte value: 0x10 */ + {{0x30, 0x92, 0x96, 0xcb, 0x05, 0x2c, 0x31, 0x55, }}, /* Byte value: 0x11 */ + {{0x2d, 0xf8, 0x8e, 0x9f, 0x8a, 0xac, 0xd1, 0xfd, }}, /* Byte value: 0x12 */ + {{0x95, 0x5b, 0x37, 0xe4, 0x77, 0x52, 0x8e, 0x0b, }}, /* Byte value: 0x13 */ + {{0x6b, 0xc1, 0xe7, 0xd8, 0xce, 0x99, 0x83, 0x73, }}, /* Byte value: 0x14 */ + {{0x44, 0xf9, 0xf6, 0x58, 0x7c, 0x69, 0x37, 0xb0, }}, /* Byte value: 0x15 */ + {{0x50, 0x75, 0x79, 0x9e, 0x0f, 0x74, 0x53, 0xff, }}, /* Byte value: 0x16 */ + {{0x0a, 0x46, 0xa6, 0x63, 0xd8, 0xef, 0x32, 0xc6, }}, /* Byte value: 0x17 */ + {{0x22, 0x9d, 0x7b, 0x2c, 0x3e, 0xd5, 0xfa, 0x58, }}, /* Byte value: 0x18 */ + {{0xa1, 0x8a, 0x5c, 0x11, 0x02, 0xc6, 0x75, 0x22, }}, /* Byte value: 0x19 */ + {{0xa0, 0xea, 0xf2, 0xff, 0x1e, 0xe8, 0xa6, 0x3d, }}, /* Byte value: 0x1a */ + {{0x87, 0x54, 0xda, 0x03, 0x4c, 0xab, 0x45, 0x06, }}, /* Byte value: 0x1b */ + {{0x76, 0xab, 0xff, 0x8c, 0x41, 0x19, 0x63, 0xdb, }}, /* Byte value: 0x1c */ + {{0x3a, 0xd4, 0x30, 0xa8, 0xdd, 0xc3, 0x03, 0x93, }}, /* Byte value: 0x1d */ + {{0xdc, 0x07, 0xab, 0x10, 0x87, 0x1e, 0xf7, 0x20, }}, /* Byte value: 0x1e */ + {{0xa9, 0x0c, 0x65, 0x6d, 0xe2, 0x75, 0x22, 0xda, }}, /* Byte value: 0x1f */ + {{0x42, 0x7a, 0x94, 0x79, 0x34, 0x8d, 0x98, 0xf2, }}, /* Byte value: 0x20 */ + {{0xe5, 0x73, 0xaa, 0x49, 0x7e, 0xaf, 0x42, 0x92, }}, /* Byte value: 0x21 */ + {{0xee, 0x55, 0xa2, 0xc4, 0xba, 0x6e, 0xa3, 0x4b, }}, /* Byte value: 0x22 */ + {{0x20, 0x5d, 0xe4, 0x33, 0x06, 0x89, 0x9f, 0x66, }}, /* Byte value: 0x23 */ + {{0xf3, 0x3f, 0xba, 0x90, 0x35, 0xee, 0x43, 0xe3, }}, /* Byte value: 0x24 */ + {{0x88, 0x31, 0x2f, 0xb0, 0xf8, 0xd2, 0x6e, 0xa3, }}, /* Byte value: 0x25 */ + {{0xed, 0xf5, 0x93, 0x35, 0x9e, 0x1c, 0x15, 0x6a, }}, /* Byte value: 0x26 */ + {{0x83, 0x17, 0x27, 0x3d, 0x3c, 0x13, 0x8f, 0x7a, }}, /* Byte value: 0x27 */ + {{0xb5, 0x06, 0xd3, 0xd7, 0x71, 0xdb, 0x11, 0x6d, }}, /* Byte value: 0x28 */ + {{0x94, 0x3b, 0x99, 0x0a, 0x6b, 0x7c, 0x5d, 0x14, }}, /* Byte value: 0x29 */ + {{0x9a, 0x3e, 0xc2, 0x57, 0xc3, 0x2b, 0xa5, 0xae, }}, /* Byte value: 0x2a */ + {{0xc5, 0x2e, 0x4e, 0x7a, 0x78, 0x26, 0xdd, 0xf4, }}, /* Byte value: 0x2b */ + {{0x8e, 0xb2, 0x4d, 0x91, 0xb0, 0x36, 0xc1, 0xe1, }}, /* Byte value: 0x2c */ + {{0x8d, 0x12, 0x7c, 0x60, 0x94, 0x44, 0x77, 0xc0, }}, /* Byte value: 0x2d */ + {{0x72, 0xe8, 0x02, 0xb2, 0x31, 0xa1, 0xa9, 0xa7, }}, /* Byte value: 0x2e */ + {{0xdb, 0xe4, 0x67, 0xdf, 0xd3, 0xd4, 0x8b, 0x7d, }}, /* Byte value: 0x2f */ + {{0xfc, 0x5a, 0x4f, 0x23, 0x81, 0x97, 0x68, 0x46, }}, /* Byte value: 0x30 */ + {{0x49, 0x5c, 0x9c, 0xf4, 0xf0, 0x4c, 0x79, 0x2b, }}, /* Byte value: 0x31 */ + {{0xd9, 0x24, 0xf8, 0xc0, 0xeb, 0x88, 0xee, 0x43, }}, /* Byte value: 0x32 */ + {{0x7c, 0xed, 0x59, 0xef, 0x99, 0xf6, 0x51, 0x1d, }}, /* Byte value: 0x33 */ + {{0x7e, 0x2d, 0xc6, 0xf0, 0xa1, 0xaa, 0x34, 0x23, }}, /* Byte value: 0x34 */ + {{0x29, 0xbb, 0x73, 0xa1, 0xfa, 0x14, 0x1b, 0x81, }}, /* Byte value: 0x35 */ + {{0xff, 0xfa, 0x7e, 0xd2, 0xa5, 0xe5, 0xde, 0x67, }}, /* Byte value: 0x36 */ + {{0x36, 0x11, 0xf4, 0xea, 0x4d, 0xc8, 0x9e, 0x17, }}, /* Byte value: 0x37 */ + {{0xa8, 0x6c, 0xcb, 0x83, 0xfe, 0x5b, 0xf1, 0xc5, }}, /* Byte value: 0x38 */ + {{0xb6, 0xa6, 0xe2, 0x26, 0x55, 0xa9, 0xa7, 0x4c, }}, /* Byte value: 0x39 */ + {{0x34, 0xd1, 0x6b, 0xf5, 0x75, 0x94, 0xfb, 0x29, }}, /* Byte value: 0x3a */ + {{0xdd, 0x67, 0x05, 0xfe, 0x9b, 0x30, 0x24, 0x3f, }}, /* Byte value: 0x3b */ + {{0xd2, 0x02, 0xf0, 0x4d, 0x2f, 0x49, 0x0f, 0x9a, }}, /* Byte value: 0x3c */ + {{0x52, 0xb5, 0xe6, 0x81, 0x37, 0x28, 0x36, 0xc1, }}, /* Byte value: 0x3d */ + {{0x77, 0xcb, 0x51, 0x62, 0x5d, 0x37, 0xb0, 0xc4, }}, /* Byte value: 0x3e */ + {{0xc0, 0x0d, 0x1d, 0xaa, 0x14, 0xb0, 0xc4, 0x97, }}, /* Byte value: 0x3f */ + {{0x9c, 0xbd, 0xa0, 0x76, 0x8b, 0xcf, 0x0a, 0xec, }}, /* Byte value: 0x40 */ + {{0x78, 0xae, 0xa4, 0xd1, 0xe9, 0x4e, 0x9b, 0x61, }}, /* Byte value: 0x41 */ + {{0x9d, 0xdd, 0x0e, 0x98, 0x97, 0xe1, 0xd9, 0xf3, }}, /* Byte value: 0x42 */ + {{0x96, 0xfb, 0x06, 0x15, 0x53, 0x20, 0x38, 0x2a, }}, /* Byte value: 0x43 */ + {{0x11, 0xaf, 0xdc, 0x16, 0x1f, 0x8b, 0x7d, 0x2c, }}, /* Byte value: 0x44 */ + {{0xc6, 0x8e, 0x7f, 0x8b, 0x5c, 0x54, 0x6b, 0xd5, }}, /* Byte value: 0x45 */ + {{0xfe, 0x9a, 0xd0, 0x3c, 0xb9, 0xcb, 0x0d, 0x78, }}, /* Byte value: 0x46 */ + {{0x80, 0xb7, 0x16, 0xcc, 0x18, 0x61, 0x39, 0x5b, }}, /* Byte value: 0x47 */ + {{0xf4, 0xdc, 0x76, 0x5f, 0x61, 0x24, 0x3f, 0xbe, }}, /* Byte value: 0x48 */ + {{0x35, 0xb1, 0xc5, 0x1b, 0x69, 0xba, 0x28, 0x36, }}, /* Byte value: 0x49 */ + {{0xf0, 0x9f, 0x8b, 0x61, 0x11, 0x9c, 0xf5, 0xc2, }}, /* Byte value: 0x4a */ + {{0xef, 0x35, 0x0c, 0x2a, 0xa6, 0x40, 0x70, 0x54, }}, /* Byte value: 0x4b */ + {{0x33, 0x32, 0xa7, 0x3a, 0x21, 0x5e, 0x87, 0x74, }}, /* Byte value: 0x4c */ + {{0x32, 0x52, 0x09, 0xd4, 0x3d, 0x70, 0x54, 0x6b, }}, /* Byte value: 0x4d */ + {{0x6e, 0xe2, 0xb4, 0x08, 0xa2, 0x0f, 0x9a, 0x10, }}, /* Byte value: 0x4e */ + {{0xb7, 0xc6, 0x4c, 0xc8, 0x49, 0x87, 0x74, 0x53, }}, /* Byte value: 0x4f */ + {{0xcd, 0xa8, 0x77, 0x06, 0x98, 0x95, 0x8a, 0x0c, }}, /* Byte value: 0x50 */ + {{0x15, 0xec, 0x21, 0x28, 0x6f, 0x33, 0xb7, 0x50, }}, /* Byte value: 0x51 */ + {{0x4a, 0xfc, 0xad, 0x05, 0xd4, 0x3e, 0xcf, 0x0a, }}, /* Byte value: 0x52 */ + {{0xb3, 0x85, 0xb1, 0xf6, 0x39, 0x3f, 0xbe, 0x2f, }}, /* Byte value: 0x53 */ + {{0xe2, 0x90, 0x66, 0x86, 0x2a, 0x65, 0x3e, 0xcf, }}, /* Byte value: 0x54 */ + {{0x93, 0xd8, 0x55, 0xc5, 0x3f, 0xb6, 0x21, 0x49, }}, /* Byte value: 0x55 */ + {{0xbd, 0x80, 0xea, 0xab, 0x91, 0x68, 0x46, 0x95, }}, /* Byte value: 0x56 */ + {{0xde, 0xc7, 0x34, 0x0f, 0xbf, 0x42, 0x92, 0x1e, }}, /* Byte value: 0x57 */ + {{0xf6, 0x1c, 0xe9, 0x40, 0x59, 0x78, 0x5a, 0x80, }}, /* Byte value: 0x58 */ + {{0xcc, 0xc8, 0xd9, 0xe8, 0x84, 0xbb, 0x59, 0x13, }}, /* Byte value: 0x59 */ + {{0x53, 0xd5, 0x48, 0x6f, 0x2b, 0x06, 0xe5, 0xde, }}, /* Byte value: 0x5a */ + {{0x39, 0x74, 0x01, 0x59, 0xf9, 0xb1, 0xb5, 0xb2, }}, /* Byte value: 0x5b */ + {{0xac, 0x2f, 0x36, 0xbd, 0x8e, 0xe3, 0x3b, 0xb9, }}, /* Byte value: 0x5c */ + {{0x14, 0x8c, 0x8f, 0xc6, 0x73, 0x1d, 0x64, 0x4f, }}, /* Byte value: 0x5d */ + {{0x05, 0x23, 0x53, 0xd0, 0x6c, 0x96, 0x19, 0x63, }}, /* Byte value: 0x5e */ + {{0x1d, 0x6a, 0x18, 0x54, 0x8f, 0x80, 0xe0, 0xa8, }}, /* Byte value: 0x5f */ + {{0xfb, 0xb9, 0x83, 0xec, 0xd5, 0x5d, 0x14, 0x1b, }}, /* Byte value: 0x60 */ + {{0xbb, 0x03, 0x88, 0x8a, 0xd9, 0x8c, 0xe9, 0xd7, }}, /* Byte value: 0x61 */ + {{0x97, 0x9b, 0xa8, 0xfb, 0x4f, 0x0e, 0xeb, 0x35, }}, /* Byte value: 0x62 */ + {{0x61, 0x87, 0x41, 0xbb, 0x16, 0x76, 0xb1, 0xb5, }}, /* Byte value: 0x63 */ + {{0x07, 0xe3, 0xcc, 0xcf, 0x54, 0xca, 0x7c, 0x5d, }}, /* Byte value: 0x64 */ + {{0xa3, 0x4a, 0xc3, 0x0e, 0x3a, 0x9a, 0x10, 0x1c, }}, /* Byte value: 0x65 */ + {{0x04, 0x43, 0xfd, 0x3e, 0x70, 0xb8, 0xca, 0x7c, }}, /* Byte value: 0x66 */ + {{0x01, 0x60, 0xae, 0xee, 0x1c, 0x2e, 0xd3, 0x1f, }}, /* Byte value: 0x67 */ + {{0x79, 0xce, 0x0a, 0x3f, 0xf5, 0x60, 0x48, 0x7e, }}, /* Byte value: 0x68 */ + {{0xb2, 0xe5, 0x1f, 0x18, 0x25, 0x11, 0x6d, 0x30, }}, /* Byte value: 0x69 */ + {{0xf7, 0x7c, 0x47, 0xae, 0x45, 0x56, 0x89, 0x9f, }}, /* Byte value: 0x6a */ + {{0xd5, 0xe1, 0x3c, 0x82, 0x7b, 0x83, 0x73, 0xc7, }}, /* Byte value: 0x6b */ + {{0x21, 0x3d, 0x4a, 0xdd, 0x1a, 0xa7, 0x4c, 0x79, }}, /* Byte value: 0x6c */ + {{0x75, 0x0b, 0xce, 0x7d, 0x65, 0x6b, 0xd5, 0xfa, }}, /* Byte value: 0x6d */ + {{0xe8, 0xd6, 0xc0, 0xe5, 0xf2, 0x8a, 0x0c, 0x09, }}, /* Byte value: 0x6e */ + {{0xbc, 0xe0, 0x44, 0x45, 0x8d, 0x46, 0x95, 0x8a, }}, /* Byte value: 0x6f */ + {{0xd0, 0xc2, 0x6f, 0x52, 0x17, 0x15, 0x6a, 0xa4, }}, /* Byte value: 0x70 */ + {{0xe9, 0xb6, 0x6e, 0x0b, 0xee, 0xa4, 0xdf, 0x16, }}, /* Byte value: 0x71 */ + {{0x68, 0x61, 0xd6, 0x29, 0xea, 0xeb, 0x35, 0x52, }}, /* Byte value: 0x72 */ + {{0x17, 0x2c, 0xbe, 0x37, 0x57, 0x6f, 0xd2, 0x6e, }}, /* Byte value: 0x73 */ + {{0xea, 0x16, 0x5f, 0xfa, 0xca, 0xd6, 0x69, 0x37, }}, /* Byte value: 0x74 */ + {{0xf5, 0xbc, 0xd8, 0xb1, 0x7d, 0x0a, 0xec, 0xa1, }}, /* Byte value: 0x75 */ + {{0x03, 0xa0, 0x31, 0xf1, 0x24, 0x72, 0xb6, 0x21, }}, /* Byte value: 0x76 */ + {{0x5f, 0x10, 0x8c, 0x2d, 0xbb, 0x0d, 0x78, 0x5a, }}, /* Byte value: 0x77 */ + {{0x0c, 0xc5, 0xc4, 0x42, 0x90, 0x0b, 0x9d, 0x84, }}, /* Byte value: 0x78 */ + {{0x6a, 0xa1, 0x49, 0x36, 0xd2, 0xb7, 0x50, 0x6c, }}, /* Byte value: 0x79 */ + {{0x8c, 0x72, 0xd2, 0x8e, 0x88, 0x6a, 0xa4, 0xdf, }}, /* Byte value: 0x7a */ + {{0x38, 0x14, 0xaf, 0xb7, 0xe5, 0x9f, 0x66, 0xad, }}, /* Byte value: 0x7b */ + {{0x70, 0x28, 0x9d, 0xad, 0x09, 0xfd, 0xcc, 0x99, }}, /* Byte value: 0x7c */ + {{0x2f, 0x38, 0x11, 0x80, 0xb2, 0xf0, 0xb4, 0xc3, }}, /* Byte value: 0x7d */ + {{0x1e, 0xca, 0x29, 0xa5, 0xab, 0xf2, 0x56, 0x89, }}, /* Byte value: 0x7e */ + {{0x3e, 0x97, 0xcd, 0x96, 0xad, 0x7b, 0xc9, 0xef, }}, /* Byte value: 0x7f */ + {{0xe4, 0x13, 0x04, 0xa7, 0x62, 0x81, 0x91, 0x8d, }}, /* Byte value: 0x80 */ + {{0xd1, 0xa2, 0xc1, 0xbc, 0x0b, 0x3b, 0xb9, 0xbb, }}, /* Byte value: 0x81 */ + {{0x7f, 0x4d, 0x68, 0x1e, 0xbd, 0x84, 0xe7, 0x3c, }}, /* Byte value: 0x82 */ + {{0x59, 0x93, 0xee, 0x0c, 0xf3, 0xe9, 0xd7, 0x18, }}, /* Byte value: 0x83 */ + {{0x43, 0x1a, 0x3a, 0x97, 0x28, 0xa3, 0x4b, 0xed, }}, /* Byte value: 0x84 */ + {{0xd4, 0x81, 0x92, 0x6c, 0x67, 0xad, 0xa0, 0xd8, }}, /* Byte value: 0x85 */ + {{0x48, 0x3c, 0x32, 0x1a, 0xec, 0x62, 0xaa, 0x34, }}, /* Byte value: 0x86 */ + {{0x4b, 0x9c, 0x03, 0xeb, 0xc8, 0x10, 0x1c, 0x15, }}, /* Byte value: 0x87 */ + {{0x06, 0x83, 0x62, 0x21, 0x48, 0xe4, 0xaf, 0x42, }}, /* Byte value: 0x88 */ + {{0x7a, 0x6e, 0x3b, 0xce, 0xd1, 0x12, 0xfe, 0x5f, }}, /* Byte value: 0x89 */ + {{0x8b, 0x91, 0x1e, 0x41, 0xdc, 0xa0, 0xd8, 0x82, }}, /* Byte value: 0x8a */ + {{0x85, 0x94, 0x45, 0x1c, 0x74, 0xf7, 0x20, 0x38, }}, /* Byte value: 0x8b */ + {{0x86, 0x34, 0x74, 0xed, 0x50, 0x85, 0x96, 0x19, }}, /* Byte value: 0x8c */ + {{0xd7, 0x21, 0xa3, 0x9d, 0x43, 0xdf, 0x16, 0xf9, }}, /* Byte value: 0x8d */ + {{0x5e, 0x70, 0x22, 0xc3, 0xa7, 0x23, 0xab, 0x45, }}, /* Byte value: 0x8e */ + {{0x54, 0x36, 0x84, 0xa0, 0x7f, 0xcc, 0x99, 0x83, }}, /* Byte value: 0x8f */ + {{0x2a, 0x1b, 0x42, 0x50, 0xde, 0x66, 0xad, 0xa0, }}, /* Byte value: 0x90 */ + {{0xc7, 0xee, 0xd1, 0x65, 0x40, 0x7a, 0xb8, 0xca, }}, /* Byte value: 0x91 */ + {{0xb9, 0xc3, 0x17, 0x95, 0xe1, 0xd0, 0x8c, 0xe9, }}, /* Byte value: 0x92 */ + {{0x69, 0x01, 0x78, 0xc7, 0xf6, 0xc5, 0xe6, 0x4d, }}, /* Byte value: 0x93 */ + {{0x2e, 0x58, 0xbf, 0x6e, 0xae, 0xde, 0x67, 0xdc, }}, /* Byte value: 0x94 */ + {{0x4e, 0xbf, 0x50, 0x3b, 0xa4, 0x86, 0x05, 0x76, }}, /* Byte value: 0x95 */ + {{0x31, 0xf2, 0x38, 0x25, 0x19, 0x02, 0xe2, 0x4a, }}, /* Byte value: 0x96 */ + {{0xa2, 0x2a, 0x6d, 0xe0, 0x26, 0xb4, 0xc3, 0x03, }}, /* Byte value: 0x97 */ + {{0xb0, 0x25, 0x80, 0x07, 0x1d, 0x4d, 0x08, 0x0e, }}, /* Byte value: 0x98 */ + {{0xc8, 0x8b, 0x24, 0xd6, 0xf4, 0x03, 0x93, 0x6f, }}, /* Byte value: 0x99 */ + {{0xec, 0x95, 0x3d, 0xdb, 0x82, 0x32, 0xc6, 0x75, }}, /* Byte value: 0x9a */ + {{0x1b, 0xe9, 0x7a, 0x75, 0xc7, 0x64, 0x4f, 0xea, }}, /* Byte value: 0x9b */ + {{0x56, 0xf6, 0x1b, 0xbf, 0x47, 0x90, 0xfc, 0xbd, }}, /* Byte value: 0x9c */ + {{0x5d, 0xd0, 0x13, 0x32, 0x83, 0x51, 0x1d, 0x64, }}, /* Byte value: 0x9d */ + {{0x3b, 0xb4, 0x9e, 0x46, 0xc1, 0xed, 0xd0, 0x8c, }}, /* Byte value: 0x9e */ + {{0x27, 0xbe, 0x28, 0xfc, 0x52, 0x43, 0xe3, 0x3b, }}, /* Byte value: 0x9f */ + {{0x13, 0x6f, 0x43, 0x09, 0x27, 0xd7, 0x18, 0x12, }}, /* Byte value: 0xa0 */ + {{0x1a, 0x89, 0xd4, 0x9b, 0xdb, 0x4a, 0x9c, 0xf5, }}, /* Byte value: 0xa1 */ + {{0x12, 0x0f, 0xed, 0xe7, 0x3b, 0xf9, 0xcb, 0x0d, }}, /* Byte value: 0xa2 */ + {{0x41, 0xda, 0xa5, 0x88, 0x10, 0xff, 0x2e, 0xd3, }}, /* Byte value: 0xa3 */ + {{0x4d, 0x1f, 0x61, 0xca, 0x80, 0xf4, 0xb3, 0x57, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0xcb, 0x2b, 0x15, 0x27, 0xd0, 0x71, 0x25, 0x4e, }}, /* Byte value: 0xa6 */ + {{0x6d, 0x42, 0x85, 0xf9, 0x86, 0x7d, 0x2c, 0x31, }}, /* Byte value: 0xa7 */ + {{0x3c, 0x57, 0x52, 0x89, 0x95, 0x27, 0xac, 0xd1, }}, /* Byte value: 0xa8 */ + {{0xd3, 0x62, 0x5e, 0xa3, 0x33, 0x67, 0xdc, 0x85, }}, /* Byte value: 0xa9 */ + {{0xeb, 0x76, 0xf1, 0x14, 0xd6, 0xf8, 0xba, 0x28, }}, /* Byte value: 0xaa */ + {{0xe1, 0x30, 0x57, 0x77, 0x0e, 0x17, 0x88, 0xee, }}, /* Byte value: 0xab */ + {{0x63, 0x47, 0xde, 0xa4, 0x2e, 0x2a, 0xd4, 0x8b, }}, /* Byte value: 0xac */ + {{0xf8, 0x19, 0xb2, 0x1d, 0xf1, 0x2f, 0xa2, 0x3a, }}, /* Byte value: 0xad */ + {{0xa6, 0x69, 0x90, 0xde, 0x56, 0x0c, 0x09, 0x7f, }}, /* Byte value: 0xae */ + {{0x91, 0x18, 0xca, 0xda, 0x07, 0xea, 0x44, 0x77, }}, /* Byte value: 0xaf */ + {{0x28, 0xdb, 0xdd, 0x4f, 0xe6, 0x3a, 0xc8, 0x9e, }}, /* Byte value: 0xb0 */ + {{0xe0, 0x50, 0xf9, 0x99, 0x12, 0x39, 0x5b, 0xf1, }}, /* Byte value: 0xb1 */ + {{0xb4, 0x66, 0x7d, 0x39, 0x6d, 0xf5, 0xc2, 0x72, }}, /* Byte value: 0xb2 */ + {{0xe6, 0xd3, 0x9b, 0xb8, 0x5a, 0xdd, 0xf4, 0xb3, }}, /* Byte value: 0xb3 */ + {{0x2b, 0x7b, 0xec, 0xbe, 0xc2, 0x48, 0x7e, 0xbf, }}, /* Byte value: 0xb4 */ + {{0x51, 0x15, 0xd7, 0x70, 0x13, 0x5a, 0x80, 0xe0, }}, /* Byte value: 0xb5 */ + {{0xe7, 0xb3, 0x35, 0x56, 0x46, 0xf3, 0x27, 0xac, }}, /* Byte value: 0xb6 */ + {{0xc9, 0xeb, 0x8a, 0x38, 0xe8, 0x2d, 0x40, 0x70, }}, /* Byte value: 0xb7 */ + {{0xab, 0xcc, 0xfa, 0x72, 0xda, 0x29, 0x47, 0xe4, }}, /* Byte value: 0xb8 */ + {{0x62, 0x27, 0x70, 0x4a, 0x32, 0x04, 0x07, 0x94, }}, /* Byte value: 0xb9 */ + {{0xca, 0x4b, 0xbb, 0xc9, 0xcc, 0x5f, 0xf6, 0x51, }}, /* Byte value: 0xba */ + {{0x0b, 0x26, 0x08, 0x8d, 0xc4, 0xc1, 0xe1, 0xd9, }}, /* Byte value: 0xbb */ + {{0x7d, 0x8d, 0xf7, 0x01, 0x85, 0xd8, 0x82, 0x02, }}, /* Byte value: 0xbc */ + {{0xdf, 0xa7, 0x9a, 0xe1, 0xa3, 0x6c, 0x41, 0x01, }}, /* Byte value: 0xbd */ + {{0xc3, 0xad, 0x2c, 0x5b, 0x30, 0xc2, 0x72, 0xb6, }}, /* Byte value: 0xbe */ + {{0xbf, 0x40, 0x75, 0xb4, 0xa9, 0x34, 0x23, 0xab, }}, /* Byte value: 0xbf */ + {{0x25, 0x7e, 0xb7, 0xe3, 0x6a, 0x1f, 0x86, 0x05, }}, /* Byte value: 0xc0 */ + {{0xf9, 0x79, 0x1c, 0xf3, 0xed, 0x01, 0x71, 0x25, }}, /* Byte value: 0xc1 */ + {{0x65, 0xc4, 0xbc, 0x85, 0x66, 0xce, 0x7b, 0xc9, }}, /* Byte value: 0xc2 */ + {{0x1c, 0x0a, 0xb6, 0xba, 0x93, 0xae, 0x33, 0xb7, }}, /* Byte value: 0xc3 */ + {{0x90, 0x78, 0x64, 0x34, 0x1b, 0xc4, 0x97, 0x68, }}, /* Byte value: 0xc4 */ + {{0xa5, 0xc9, 0xa1, 0x2f, 0x72, 0x7e, 0xbf, 0x5e, }}, /* Byte value: 0xc5 */ + {{0x19, 0x29, 0xe5, 0x6a, 0xff, 0x38, 0x2a, 0xd4, }}, /* Byte value: 0xc6 */ + {{0x08, 0x86, 0x39, 0x7c, 0xe0, 0xb3, 0x57, 0xf8, }}, /* Byte value: 0xc7 */ + {{0x09, 0xe6, 0x97, 0x92, 0xfc, 0x9d, 0x84, 0xe7, }}, /* Byte value: 0xc8 */ + {{0x2c, 0x98, 0x20, 0x71, 0x96, 0x82, 0x02, 0xe2, }}, /* Byte value: 0xc9 */ + {{0xa4, 0xa9, 0x0f, 0xc1, 0x6e, 0x50, 0x6c, 0x41, }}, /* Byte value: 0xca */ + {{0x5b, 0x53, 0x71, 0x13, 0xcb, 0xb5, 0xb2, 0x26, }}, /* Byte value: 0xcb */ + {{0xda, 0x84, 0xc9, 0x31, 0xcf, 0xfa, 0x58, 0x62, }}, /* Byte value: 0xcc */ + {{0x4c, 0x7f, 0xcf, 0x24, 0x9c, 0xda, 0x60, 0x48, }}, /* Byte value: 0xcd */ + {{0x0f, 0x65, 0xf5, 0xb3, 0xb4, 0x79, 0x2b, 0xa5, }}, /* Byte value: 0xce */ + {{0x57, 0x96, 0xb5, 0x51, 0x5b, 0xbe, 0x2f, 0xa2, }}, /* Byte value: 0xcf */ + {{0xa7, 0x09, 0x3e, 0x30, 0x4a, 0x22, 0xda, 0x60, }}, /* Byte value: 0xd0 */ + {{0xb1, 0x45, 0x2e, 0xe9, 0x01, 0x63, 0xdb, 0x11, }}, /* Byte value: 0xd1 */ + {{0x6c, 0x22, 0x2b, 0x17, 0x9a, 0x53, 0xff, 0x2e, }}, /* Byte value: 0xd2 */ + {{0x73, 0x88, 0xac, 0x5c, 0x2d, 0x8f, 0x7a, 0xb8, }}, /* Byte value: 0xd3 */ + {{0x8f, 0xd2, 0xe3, 0x7f, 0xac, 0x18, 0x12, 0xfe, }}, /* Byte value: 0xd4 */ + {{0xce, 0x08, 0x46, 0xf7, 0xbc, 0xe7, 0x3c, 0x2d, }}, /* Byte value: 0xd5 */ + {{0xcf, 0x68, 0xe8, 0x19, 0xa0, 0xc9, 0xef, 0x32, }}, /* Byte value: 0xd6 */ + {{0x67, 0x04, 0x23, 0x9a, 0x5e, 0x92, 0x1e, 0xf7, }}, /* Byte value: 0xd7 */ + {{0x26, 0xde, 0x86, 0x12, 0x4e, 0x6d, 0x30, 0x24, }}, /* Byte value: 0xd8 */ + {{0x4f, 0xdf, 0xfe, 0xd5, 0xb8, 0xa8, 0xd6, 0x69, }}, /* Byte value: 0xd9 */ + {{0x0d, 0xa5, 0x6a, 0xac, 0x8c, 0x25, 0x4e, 0x9b, }}, /* Byte value: 0xda */ + {{0x3f, 0xf7, 0x63, 0x78, 0xb1, 0x55, 0x1a, 0xf0, }}, /* Byte value: 0xdb */ + {{0x1f, 0xaa, 0x87, 0x4b, 0xb7, 0xdc, 0x85, 0x96, }}, /* Byte value: 0xdc */ + {{0xc1, 0x6d, 0xb3, 0x44, 0x08, 0x9e, 0x17, 0x88, }}, /* Byte value: 0xdd */ + {{0xc4, 0x4e, 0xe0, 0x94, 0x64, 0x08, 0x0e, 0xeb, }}, /* Byte value: 0xde */ + {{0x9f, 0x1d, 0x91, 0x87, 0xaf, 0xbd, 0xbc, 0xcd, }}, /* Byte value: 0xdf */ + {{0x0e, 0x05, 0x5b, 0x5d, 0xa8, 0x57, 0xf8, 0xba, }}, /* Byte value: 0xe0 */ + {{0x98, 0xfe, 0x5d, 0x48, 0xfb, 0x77, 0xc0, 0x90, }}, /* Byte value: 0xe1 */ + {{0x37, 0x71, 0x5a, 0x04, 0x51, 0xe6, 0x4d, 0x08, }}, /* Byte value: 0xe2 */ + {{0x47, 0x59, 0xc7, 0xa9, 0x58, 0x1b, 0x81, 0x91, }}, /* Byte value: 0xe3 */ + {{0x10, 0xcf, 0x72, 0xf8, 0x03, 0xa5, 0xae, 0x33, }}, /* Byte value: 0xe4 */ + {{0xb8, 0xa3, 0xb9, 0x7b, 0xfd, 0xfe, 0x5f, 0xf6, }}, /* Byte value: 0xe5 */ + {{0x6f, 0x82, 0x1a, 0xe6, 0xbe, 0x21, 0x49, 0x0f, }}, /* Byte value: 0xe6 */ + {{0xad, 0x4f, 0x98, 0x53, 0x92, 0xcd, 0xe8, 0xa6, }}, /* Byte value: 0xe7 */ + {{0x92, 0xb8, 0xfb, 0x2b, 0x23, 0x98, 0xf2, 0x56, }}, /* Byte value: 0xe8 */ + {{0x89, 0x51, 0x81, 0x5e, 0xe4, 0xfc, 0xbd, 0xbc, }}, /* Byte value: 0xe9 */ + {{0xf2, 0x5f, 0x14, 0x7e, 0x29, 0xc0, 0x90, 0xfc, }}, /* Byte value: 0xea */ + {{0x23, 0xfd, 0xd5, 0xc2, 0x22, 0xfb, 0x29, 0x47, }}, /* Byte value: 0xeb */ + {{0x7b, 0x0e, 0x95, 0x20, 0xcd, 0x3c, 0x2d, 0x40, }}, /* Byte value: 0xec */ + {{0xd6, 0x41, 0x0d, 0x73, 0x5f, 0xf1, 0xc5, 0xe6, }}, /* Byte value: 0xed */ + {{0x81, 0xd7, 0xb8, 0x22, 0x04, 0x4f, 0xea, 0x44, }}, /* Byte value: 0xee */ + {{0xc2, 0xcd, 0x82, 0xb5, 0x2c, 0xec, 0xa1, 0xa9, }}, /* Byte value: 0xef */ + {{0x74, 0x6b, 0x60, 0x93, 0x79, 0x45, 0x06, 0xe5, }}, /* Byte value: 0xf0 */ + {{0x9e, 0x7d, 0x3f, 0x69, 0xb3, 0x93, 0x6f, 0xd2, }}, /* Byte value: 0xf1 */ + {{0x64, 0xa4, 0x12, 0x6b, 0x7a, 0xe0, 0xa8, 0xd6, }}, /* Byte value: 0xf2 */ + {{0xfa, 0xd9, 0x2d, 0x02, 0xc9, 0x73, 0xc7, 0x04, }}, /* Byte value: 0xf3 */ + {{0x82, 0x77, 0x89, 0xd3, 0x20, 0x3d, 0x5c, 0x65, }}, /* Byte value: 0xf4 */ + {{0x5c, 0xb0, 0xbd, 0xdc, 0x9f, 0x7f, 0xce, 0x7b, }}, /* Byte value: 0xf5 */ + {{0x40, 0xba, 0x0b, 0x66, 0x0c, 0xd1, 0xfd, 0xcc, }}, /* Byte value: 0xf6 */ + {{0x24, 0x1e, 0x19, 0x0d, 0x76, 0x31, 0x55, 0x1a, }}, /* Byte value: 0xf7 */ + {{0xae, 0xef, 0xa9, 0xa2, 0xb6, 0xbf, 0x5e, 0x87, }}, /* Byte value: 0xf8 */ + {{0xba, 0x63, 0x26, 0x64, 0xc5, 0xa2, 0x3a, 0xc8, }}, /* Byte value: 0xf9 */ + {{0xf1, 0xff, 0x25, 0x8f, 0x0d, 0xb2, 0x26, 0xdd, }}, /* Byte value: 0xfa */ + {{0xfd, 0x3a, 0xe1, 0xcd, 0x9d, 0xb9, 0xbb, 0x59, }}, /* Byte value: 0xfb */ + {{0x66, 0x64, 0x8d, 0x74, 0x42, 0xbc, 0xcd, 0xe8, }}, /* Byte value: 0xfc */ + {{0xaa, 0xac, 0x54, 0x9c, 0xc6, 0x07, 0x94, 0xfb, }}, /* Byte value: 0xfd */ + {{0x46, 0x39, 0x69, 0x47, 0x44, 0x35, 0x52, 0x8e, }}, /* Byte value: 0xfe */ + {{0x99, 0x9e, 0xf3, 0xa6, 0xe7, 0x59, 0x13, 0x8f, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 6 */ + {{0xc5, 0x23, 0x88, 0xa8, 0x4b, 0xa0, 0x07, 0xfc, }}, /* Byte value: 0x00 */ + {{0x72, 0xc4, 0x53, 0xb4, 0x67, 0xfd, 0xe6, 0xee, }}, /* Byte value: 0x01 */ + {{0x2a, 0xfe, 0xa1, 0x96, 0xda, 0xeb, 0x16, 0xdd, }}, /* Byte value: 0x02 */ + {{0x89, 0x16, 0xef, 0x1e, 0x6b, 0xb3, 0x50, 0x11, }}, /* Byte value: 0x03 */ + {{0x9d, 0x19, 0x7a, 0x8a, 0xf6, 0xb6, 0xf7, 0xcf, }}, /* Byte value: 0x04 */ + {{0xa1, 0x08, 0x06, 0xf5, 0x92, 0xb9, 0xdd, 0x6e, }}, /* Byte value: 0x05 */ + {{0xcd, 0x25, 0x6b, 0x9f, 0xc7, 0xa2, 0x2e, 0x31, }}, /* Byte value: 0x06 */ + {{0x5e, 0xd9, 0x2a, 0xa5, 0xd8, 0xf6, 0x9e, 0x16, }}, /* Byte value: 0x07 */ + {{0x12, 0xec, 0x4d, 0x13, 0xf8, 0xe5, 0xc9, 0xfb, }}, /* Byte value: 0x08 */ + {{0xb2, 0x94, 0x6f, 0x39, 0x9a, 0xcd, 0xb8, 0xc4, }}, /* Byte value: 0x09 */ + {{0xb9, 0x02, 0xe0, 0xac, 0xc5, 0xbf, 0xa6, 0xfa, }}, /* Byte value: 0x0a */ + {{0xfd, 0x31, 0x64, 0x2d, 0x69, 0xae, 0xd8, 0xda, }}, /* Byte value: 0x0b */ + {{0x7a, 0xc2, 0xb0, 0x83, 0xeb, 0xff, 0xcf, 0x23, }}, /* Byte value: 0x0c */ + {{0x19, 0x7a, 0xc2, 0x86, 0xa7, 0x97, 0xd7, 0xc5, }}, /* Byte value: 0x0d */ + {{0xe9, 0x3e, 0xf1, 0xb9, 0xf4, 0xab, 0x7f, 0x04, }}, /* Byte value: 0x0e */ + {{0xdb, 0xca, 0xb6, 0x76, 0x79, 0x46, 0x12, 0x4d, }}, /* Byte value: 0x0f */ + {{0xa5, 0x0b, 0x96, 0x0f, 0xd4, 0xb8, 0x28, 0xe9, }}, /* Byte value: 0x10 */ + {{0x39, 0x62, 0xc8, 0x5a, 0xd2, 0x9f, 0x73, 0x77, }}, /* Byte value: 0x11 */ + {{0x3d, 0x61, 0x58, 0xa0, 0x94, 0x9e, 0x86, 0xf0, }}, /* Byte value: 0x12 */ + {{0x56, 0xdf, 0xc9, 0x92, 0x54, 0xf4, 0xb7, 0xdb, }}, /* Byte value: 0x13 */ + {{0xcf, 0xc5, 0x23, 0xe2, 0xe4, 0x43, 0xb5, 0x93, }}, /* Byte value: 0x14 */ + {{0x29, 0x6e, 0xcd, 0x34, 0x09, 0x9b, 0x21, 0x2e, }}, /* Byte value: 0x15 */ + {{0x4b, 0xa6, 0x9b, 0xee, 0xb5, 0x62, 0x95, 0x99, }}, /* Byte value: 0x16 */ + {{0x31, 0x64, 0x2b, 0x6d, 0x5e, 0x9d, 0x5a, 0xba, }}, /* Byte value: 0x17 */ + {{0xf5, 0x37, 0x87, 0x1a, 0xe5, 0xac, 0xf1, 0x17, }}, /* Byte value: 0x18 */ + {{0x1a, 0xea, 0xae, 0x24, 0x74, 0xe7, 0xe0, 0x36, }}, /* Byte value: 0x19 */ + {{0x96, 0x8f, 0xf5, 0x1f, 0xa9, 0xc4, 0xe9, 0xf1, }}, /* Byte value: 0x1a */ + {{0x9a, 0x8a, 0x86, 0xd2, 0x63, 0xc7, 0x35, 0xbb, }}, /* Byte value: 0x1b */ + {{0xcb, 0xc6, 0xb3, 0x18, 0xa2, 0x42, 0x40, 0x14, }}, /* Byte value: 0x1c */ + {{0x08, 0x06, 0xe3, 0x37, 0x8c, 0x02, 0x29, 0xcd, }}, /* Byte value: 0x1d */ + {{0x6c, 0x2d, 0x6d, 0x6a, 0x55, 0x1b, 0xf3, 0x5f, }}, /* Byte value: 0x1e */ + {{0xf0, 0x44, 0x33, 0x3f, 0x53, 0x3c, 0xa8, 0xc1, }}, /* Byte value: 0x1f */ + {{0x87, 0xf3, 0xd4, 0xae, 0x82, 0x51, 0x17, 0xf9, }}, /* Byte value: 0x20 */ + {{0x33, 0x84, 0x63, 0x10, 0x7d, 0x7c, 0xc1, 0x18, }}, /* Byte value: 0x21 */ + {{0x8e, 0x85, 0x13, 0x46, 0xfe, 0xc2, 0x92, 0x65, }}, /* Byte value: 0x22 */ + {{0x2e, 0xfd, 0x31, 0x6c, 0x9c, 0xea, 0xe3, 0x5a, }}, /* Byte value: 0x23 */ + {{0x8a, 0x86, 0x83, 0xbc, 0xb8, 0xc3, 0x67, 0xe2, }}, /* Byte value: 0x24 */ + {{0x52, 0xdc, 0x59, 0x68, 0x12, 0xf5, 0x42, 0x5c, }}, /* Byte value: 0x25 */ + {{0xd9, 0x2a, 0xfe, 0x0b, 0x5a, 0xa7, 0x89, 0xef, }}, /* Byte value: 0x26 */ + {{0xef, 0xdd, 0x29, 0x3e, 0x91, 0x4b, 0x11, 0x21, }}, /* Byte value: 0x27 */ + {{0x78, 0x22, 0xf8, 0xfe, 0xc8, 0x1e, 0x54, 0x81, }}, /* Byte value: 0x28 */ + {{0xda, 0xba, 0x92, 0xa9, 0x89, 0xd7, 0xbe, 0x1c, }}, /* Byte value: 0x29 */ + {{0x9e, 0x89, 0x16, 0x28, 0x25, 0xc6, 0xc0, 0x3c, }}, /* Byte value: 0x2a */ + {{0x1d, 0x79, 0x52, 0x7c, 0xe1, 0x96, 0x22, 0x42, }}, /* Byte value: 0x2b */ + {{0xfc, 0x41, 0x40, 0xf2, 0x99, 0x3f, 0x74, 0x8b, }}, /* Byte value: 0x2c */ + {{0xab, 0xee, 0xad, 0xbf, 0x3d, 0x5a, 0x6f, 0x01, }}, /* Byte value: 0x2d */ + {{0xbe, 0x91, 0x1c, 0xf4, 0x50, 0xce, 0x64, 0x8e, }}, /* Byte value: 0x2e */ + {{0x4e, 0xd5, 0x2f, 0xcb, 0x03, 0xf2, 0xcc, 0x4f, }}, /* Byte value: 0x2f */ + {{0x42, 0xd0, 0x5c, 0x06, 0xc9, 0xf1, 0x10, 0x05, }}, /* Byte value: 0x30 */ + {{0x3a, 0xf2, 0xa4, 0xf8, 0x01, 0xef, 0x44, 0x84, }}, /* Byte value: 0x31 */ + {{0x95, 0x1f, 0x99, 0xbd, 0x7a, 0xb4, 0xde, 0x02, }}, /* Byte value: 0x32 */ + {{0xfa, 0xa2, 0x98, 0x75, 0xfc, 0xdf, 0x1a, 0xae, }}, /* Byte value: 0x33 */ + {{0x21, 0x68, 0x2e, 0x03, 0x85, 0x99, 0x08, 0xe3, }}, /* Byte value: 0x34 */ + {{0x48, 0x36, 0xf7, 0x4c, 0x66, 0x12, 0xa2, 0x6a, }}, /* Byte value: 0x35 */ + {{0x15, 0x7f, 0xb1, 0x4b, 0x6d, 0x94, 0x0b, 0x8f, }}, /* Byte value: 0x36 */ + {{0x97, 0xff, 0xd1, 0xc0, 0x59, 0x55, 0x45, 0xa0, }}, /* Byte value: 0x37 */ + {{0x7c, 0x21, 0x68, 0x04, 0x8e, 0x1f, 0xa1, 0x06, }}, /* Byte value: 0x38 */ + {{0x2f, 0x8d, 0x15, 0xb3, 0x6c, 0x7b, 0x4f, 0x0b, }}, /* Byte value: 0x39 */ + {{0x4c, 0x35, 0x67, 0xb6, 0x20, 0x13, 0x57, 0xed, }}, /* Byte value: 0x3a */ + {{0xe0, 0x48, 0x36, 0x51, 0x88, 0x38, 0xfa, 0x98, }}, /* Byte value: 0x3b */ + {{0x28, 0x1e, 0xe9, 0xeb, 0xf9, 0x0a, 0x8d, 0x7f, }}, /* Byte value: 0x3c */ + {{0x90, 0x6c, 0x2d, 0x98, 0xcc, 0x24, 0x87, 0xd4, }}, /* Byte value: 0x3d */ + {{0x47, 0xa3, 0xe8, 0x23, 0x7f, 0x61, 0x49, 0xd3, }}, /* Byte value: 0x3e */ + {{0xe4, 0x4b, 0xa6, 0xab, 0xce, 0x39, 0x0f, 0x1f, }}, /* Byte value: 0x3f */ + {{0x30, 0x14, 0x0f, 0xb2, 0xae, 0x0c, 0xf6, 0xeb, }}, /* Byte value: 0x40 */ + {{0x8f, 0xf5, 0x37, 0x99, 0x0e, 0x53, 0x3e, 0x34, }}, /* Byte value: 0x41 */ + {{0xbc, 0x71, 0x54, 0x89, 0x73, 0x2f, 0xff, 0x2c, }}, /* Byte value: 0x42 */ + {{0x01, 0x70, 0x24, 0xdf, 0xf0, 0x91, 0xac, 0x51, }}, /* Byte value: 0x43 */ + {{0x9b, 0xfa, 0xa2, 0x0d, 0x93, 0x56, 0x99, 0xea, }}, /* Byte value: 0x44 */ + {{0x4a, 0xd6, 0xbf, 0x31, 0x45, 0xf3, 0x39, 0xc8, }}, /* Byte value: 0x45 */ + {{0x99, 0x1a, 0xea, 0x70, 0xb0, 0xb7, 0x02, 0x48, }}, /* Byte value: 0x46 */ + {{0xb8, 0x72, 0xc4, 0x73, 0x35, 0x2e, 0x0a, 0xab, }}, /* Byte value: 0x47 */ + {{0xa8, 0x7e, 0xc1, 0x1d, 0xee, 0x2a, 0x58, 0xf2, }}, /* Byte value: 0x48 */ + {{0xc0, 0x50, 0x3c, 0x8d, 0xfd, 0x30, 0x5e, 0x2a, }}, /* Byte value: 0x49 */ + {{0xdd, 0x29, 0x6e, 0xf1, 0x1c, 0xa6, 0x7c, 0x68, }}, /* Byte value: 0x4a */ + {{0x02, 0xe0, 0x48, 0x7d, 0x23, 0xe1, 0x9b, 0xa2, }}, /* Byte value: 0x4b */ + {{0x6e, 0xcd, 0x25, 0x17, 0x76, 0xfa, 0x68, 0xfd, }}, /* Byte value: 0x4c */ + {{0xe2, 0xa8, 0x7e, 0x2c, 0xab, 0xd9, 0x61, 0x3a, }}, /* Byte value: 0x4d */ + {{0x36, 0xf7, 0xd7, 0x35, 0xcb, 0xec, 0x98, 0xce, }}, /* Byte value: 0x4e */ + {{0xa3, 0xe8, 0x4e, 0x88, 0xb1, 0x58, 0x46, 0xcc, }}, /* Byte value: 0x4f */ + {{0xf7, 0xd7, 0xcf, 0x67, 0xc6, 0x4d, 0x6a, 0xb5, }}, /* Byte value: 0x50 */ + {{0xee, 0xad, 0x0d, 0xe1, 0x61, 0xda, 0xbd, 0x70, }}, /* Byte value: 0x51 */ + {{0x6d, 0x5d, 0x49, 0xb5, 0xa5, 0x8a, 0x5f, 0x0e, }}, /* Byte value: 0x52 */ + {{0xd6, 0xbf, 0xe1, 0x64, 0x43, 0xd4, 0x62, 0x56, }}, /* Byte value: 0x53 */ + {{0x11, 0x7c, 0x21, 0xb1, 0x2b, 0x95, 0xfe, 0x08, }}, /* Byte value: 0x54 */ + {{0xf8, 0x42, 0xd0, 0x08, 0xdf, 0x3e, 0x81, 0x0c, }}, /* Byte value: 0x55 */ + {{0x92, 0x8c, 0x65, 0xe5, 0xef, 0xc5, 0x1c, 0x76, }}, /* Byte value: 0x56 */ + {{0xb7, 0xe7, 0xdb, 0x1c, 0x2c, 0x5d, 0xe1, 0x12, }}, /* Byte value: 0x57 */ + {{0x73, 0xb4, 0x77, 0x6b, 0x97, 0x6c, 0x4a, 0xbf, }}, /* Byte value: 0x58 */ + {{0x7b, 0xb2, 0x94, 0x5c, 0x1b, 0x6e, 0x63, 0x72, }}, /* Byte value: 0x59 */ + {{0x1c, 0x09, 0x76, 0xa3, 0x11, 0x07, 0x8e, 0x13, }}, /* Byte value: 0x5a */ + {{0x5f, 0xa9, 0x0e, 0x7a, 0x28, 0x67, 0x32, 0x47, }}, /* Byte value: 0x5b */ + {{0x09, 0x76, 0xc7, 0xe8, 0x7c, 0x93, 0x85, 0x9c, }}, /* Byte value: 0x5c */ + {{0x62, 0xc8, 0x56, 0xda, 0xbc, 0xf9, 0xb4, 0xb7, }}, /* Byte value: 0x5d */ + {{0xf9, 0x32, 0xf4, 0xd7, 0x2f, 0xaf, 0x2d, 0x5d, }}, /* Byte value: 0x5e */ + {{0x04, 0x03, 0x90, 0xfa, 0x46, 0x01, 0xf5, 0x87, }}, /* Byte value: 0x5f */ + {{0x60, 0x28, 0x1e, 0xa7, 0x9f, 0x18, 0x2f, 0x15, }}, /* Byte value: 0x60 */ + {{0x3c, 0x11, 0x7c, 0x7f, 0x64, 0x0f, 0x2a, 0xa1, }}, /* Byte value: 0x61 */ + {{0x8d, 0x15, 0x7f, 0xe4, 0x2d, 0xb2, 0xa5, 0x96, }}, /* Byte value: 0x62 */ + {{0xfe, 0xa1, 0x08, 0x8f, 0xba, 0xde, 0xef, 0x29, }}, /* Byte value: 0x63 */ + {{0x22, 0xf8, 0x42, 0xa1, 0x56, 0xe9, 0x3f, 0x10, }}, /* Byte value: 0x64 */ + {{0xc1, 0x20, 0x18, 0x52, 0x0d, 0xa1, 0xf2, 0x7b, }}, /* Byte value: 0x65 */ + {{0x75, 0x57, 0xaf, 0xec, 0xf2, 0x8c, 0x24, 0x9a, }}, /* Byte value: 0x66 */ + {{0x8c, 0x65, 0x5b, 0x3b, 0xdd, 0x23, 0x09, 0xc7, }}, /* Byte value: 0x67 */ + {{0x03, 0x90, 0x6c, 0xa2, 0xd3, 0x70, 0x37, 0xf3, }}, /* Byte value: 0x68 */ + {{0x5a, 0xda, 0xba, 0x5f, 0x9e, 0xf7, 0x6b, 0x91, }}, /* Byte value: 0x69 */ + {{0xff, 0xd1, 0x2c, 0x50, 0x4a, 0x4f, 0x43, 0x78, }}, /* Byte value: 0x6a */ + {{0x0a, 0xe6, 0xab, 0x4a, 0xaf, 0xe3, 0xb2, 0x6f, }}, /* Byte value: 0x6b */ + {{0xa2, 0x98, 0x6a, 0x57, 0x41, 0xc9, 0xea, 0x9d, }}, /* Byte value: 0x6c */ + {{0x9c, 0x69, 0x5e, 0x55, 0x06, 0x27, 0x5b, 0x9e, }}, /* Byte value: 0x6d */ + {{0x20, 0x18, 0x0a, 0xdc, 0x75, 0x08, 0xa4, 0xb2, }}, /* Byte value: 0x6e */ + {{0x1e, 0xe9, 0x3e, 0xde, 0x32, 0xe6, 0x15, 0xb1, }}, /* Byte value: 0x6f */ + {{0xf3, 0xd4, 0x5f, 0x9d, 0x80, 0x4c, 0x9f, 0x32, }}, /* Byte value: 0x70 */ + {{0xac, 0x7d, 0x51, 0xe7, 0xa8, 0x2b, 0xad, 0x75, }}, /* Byte value: 0x71 */ + {{0x98, 0x6a, 0xce, 0xaf, 0x40, 0x26, 0xae, 0x19, }}, /* Byte value: 0x72 */ + {{0x35, 0x67, 0xbb, 0x97, 0x18, 0x9c, 0xaf, 0x3d, }}, /* Byte value: 0x73 */ + {{0xfb, 0xd2, 0xbc, 0xaa, 0x0c, 0x4e, 0xb6, 0xff, }}, /* Byte value: 0x74 */ + {{0x24, 0x1b, 0x9a, 0x26, 0x33, 0x09, 0x51, 0x35, }}, /* Byte value: 0x75 */ + {{0x57, 0xaf, 0xed, 0x4d, 0xa4, 0x65, 0x1b, 0x8a, }}, /* Byte value: 0x76 */ + {{0x83, 0xf0, 0x44, 0x54, 0xc4, 0x50, 0xe2, 0x7e, }}, /* Byte value: 0x77 */ + {{0x9f, 0xf9, 0x32, 0xf7, 0xd5, 0x57, 0x6c, 0x6d, }}, /* Byte value: 0x78 */ + {{0x43, 0xa0, 0x78, 0xd9, 0x39, 0x60, 0xbc, 0x54, }}, /* Byte value: 0x79 */ + {{0x27, 0x8b, 0xf6, 0x84, 0xe0, 0x79, 0x66, 0xc6, }}, /* Byte value: 0x7a */ + {{0xd3, 0xcc, 0x55, 0x41, 0xf5, 0x44, 0x3b, 0x80, }}, /* Byte value: 0x7b */ + {{0x65, 0x5b, 0xaa, 0x82, 0x29, 0x88, 0x76, 0xc3, }}, /* Byte value: 0x7c */ + {{0xe6, 0xab, 0xee, 0xd6, 0xed, 0xd8, 0x94, 0xbd, }}, /* Byte value: 0x7d */ + {{0x53, 0xac, 0x7d, 0xb7, 0xe2, 0x64, 0xee, 0x0d, }}, /* Byte value: 0x7e */ + {{0x7d, 0x51, 0x4c, 0xdb, 0x7e, 0x8e, 0x0d, 0x57, }}, /* Byte value: 0x7f */ + {{0xbf, 0xe1, 0x38, 0x2b, 0xa0, 0x5f, 0xc8, 0xdf, }}, /* Byte value: 0x80 */ + {{0x7f, 0xb1, 0x04, 0xa6, 0x5d, 0x6f, 0x96, 0xf5, }}, /* Byte value: 0x81 */ + {{0xad, 0x0d, 0x75, 0x38, 0x58, 0xba, 0x01, 0x24, }}, /* Byte value: 0x82 */ + {{0x2d, 0x6d, 0x5d, 0xce, 0x4f, 0x9a, 0xd4, 0xa9, }}, /* Byte value: 0x83 */ + {{0x0b, 0x96, 0x8f, 0x95, 0x5f, 0x72, 0x1e, 0x3e, }}, /* Byte value: 0x84 */ + {{0x86, 0x83, 0xf0, 0x71, 0x72, 0xc0, 0xbb, 0xa8, }}, /* Byte value: 0x85 */ + {{0xb6, 0x97, 0xff, 0xc3, 0xdc, 0xcc, 0x4d, 0x43, }}, /* Byte value: 0x86 */ + {{0xe1, 0x38, 0x12, 0x8e, 0x78, 0xa9, 0x56, 0xc9, }}, /* Byte value: 0x87 */ + {{0xae, 0x9d, 0x19, 0x9a, 0x8b, 0xca, 0x36, 0xd7, }}, /* Byte value: 0x88 */ + {{0x54, 0x3f, 0x81, 0xef, 0x77, 0x15, 0x2c, 0x79, }}, /* Byte value: 0x89 */ + {{0x05, 0x73, 0xb4, 0x25, 0xb6, 0x90, 0x59, 0xd6, }}, /* Byte value: 0x8a */ + {{0x41, 0x40, 0x30, 0xa4, 0x1a, 0x81, 0x27, 0xf6, }}, /* Byte value: 0x8b */ + {{0x16, 0xef, 0xdd, 0xe9, 0xbe, 0xe4, 0x3c, 0x7c, }}, /* Byte value: 0x8c */ + {{0xd1, 0x2c, 0x1d, 0x3c, 0xd6, 0xa5, 0xa0, 0x22, }}, /* Byte value: 0x8d */ + {{0x0f, 0x95, 0x1f, 0x6f, 0x19, 0x73, 0xeb, 0xb9, }}, /* Byte value: 0x8e */ + {{0x3e, 0xf1, 0x34, 0x02, 0x47, 0xee, 0xb1, 0x03, }}, /* Byte value: 0x8f */ + {{0x1f, 0x99, 0x1a, 0x01, 0xc2, 0x77, 0xb9, 0xe0, }}, /* Byte value: 0x90 */ + {{0xc6, 0xb3, 0xe4, 0x0a, 0x98, 0xd0, 0x30, 0x0f, }}, /* Byte value: 0x91 */ + {{0xe7, 0xdb, 0xca, 0x09, 0x1d, 0x49, 0x38, 0xec, }}, /* Byte value: 0x92 */ + {{0x14, 0x0f, 0x95, 0x94, 0x9d, 0x05, 0xa7, 0xde, }}, /* Byte value: 0x93 */ + {{0x6a, 0xce, 0xb5, 0xed, 0x30, 0xfb, 0x9d, 0x7a, }}, /* Byte value: 0x94 */ + {{0x18, 0x0a, 0xe6, 0x59, 0x57, 0x06, 0x7b, 0x94, }}, /* Byte value: 0x95 */ + {{0xb5, 0x07, 0x93, 0x61, 0x0f, 0xbc, 0x7a, 0xb0, }}, /* Byte value: 0x96 */ + {{0x4d, 0x45, 0x43, 0x69, 0xd0, 0x82, 0xfb, 0xbc, }}, /* Byte value: 0x97 */ + {{0x81, 0x10, 0x0c, 0x29, 0xe7, 0xb1, 0x79, 0xdc, }}, /* Byte value: 0x98 */ + {{0x0e, 0xe5, 0x3b, 0xb0, 0xe9, 0xe2, 0x47, 0xe8, }}, /* Byte value: 0x99 */ + {{0x55, 0x4f, 0xa5, 0x30, 0x87, 0x84, 0x80, 0x28, }}, /* Byte value: 0x9a */ + {{0xaa, 0x9e, 0x89, 0x60, 0xcd, 0xcb, 0xc3, 0x50, }}, /* Byte value: 0x9b */ + {{0xe5, 0x3b, 0x82, 0x74, 0x3e, 0xa8, 0xa3, 0x4e, }}, /* Byte value: 0x9c */ + {{0x58, 0x3a, 0xf2, 0x22, 0xbd, 0x16, 0xf0, 0x33, }}, /* Byte value: 0x9d */ + {{0x84, 0x63, 0xb8, 0x0c, 0x51, 0x21, 0x20, 0x0a, }}, /* Byte value: 0x9e */ + {{0x0c, 0x05, 0x73, 0xcd, 0xca, 0x03, 0xdc, 0x4a, }}, /* Byte value: 0x9f */ + {{0x40, 0x30, 0x14, 0x7b, 0xea, 0x10, 0x8b, 0xa7, }}, /* Byte value: 0xa0 */ + {{0x26, 0xfb, 0xd2, 0x5b, 0x10, 0xe8, 0xca, 0x97, }}, /* Byte value: 0xa1 */ + {{0xcc, 0x55, 0x4f, 0x40, 0x37, 0x33, 0x82, 0x60, }}, /* Byte value: 0xa2 */ + {{0xd0, 0x5c, 0x39, 0xe3, 0x26, 0x34, 0x0c, 0x73, }}, /* Byte value: 0xa3 */ + {{0x4f, 0xa5, 0x0b, 0x14, 0xf3, 0x63, 0x60, 0x1e, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x59, 0x4a, 0xd6, 0xfd, 0x4d, 0x87, 0x5c, 0x62, }}, /* Byte value: 0xa6 */ + {{0x61, 0x58, 0x3a, 0x78, 0x6f, 0x89, 0x83, 0x44, }}, /* Byte value: 0xa7 */ + {{0xa6, 0x9b, 0xfa, 0xad, 0x07, 0xc8, 0x1f, 0x1a, }}, /* Byte value: 0xa8 */ + {{0xa4, 0x7b, 0xb2, 0xd0, 0x24, 0x29, 0x84, 0xb8, }}, /* Byte value: 0xa9 */ + {{0x77, 0xb7, 0xe7, 0x91, 0xd1, 0x6d, 0xbf, 0x38, }}, /* Byte value: 0xaa */ + {{0x46, 0xd3, 0xcc, 0xfc, 0x8f, 0xf0, 0xe5, 0x82, }}, /* Byte value: 0xab */ + {{0x25, 0x6b, 0xbe, 0xf9, 0xc3, 0x98, 0xfd, 0x64, }}, /* Byte value: 0xac */ + {{0x37, 0x87, 0xf3, 0xea, 0x3b, 0x7d, 0x34, 0x9f, }}, /* Byte value: 0xad */ + {{0x38, 0x12, 0xec, 0x85, 0x22, 0x0e, 0xdf, 0x26, }}, /* Byte value: 0xae */ + {{0x23, 0x88, 0x66, 0x7e, 0xa6, 0x78, 0x93, 0x41, }}, /* Byte value: 0xaf */ + {{0xc4, 0x53, 0xac, 0x77, 0xbb, 0x31, 0xab, 0xad, }}, /* Byte value: 0xb0 */ + {{0xca, 0xb6, 0x97, 0xc7, 0x52, 0xd3, 0xec, 0x45, }}, /* Byte value: 0xb1 */ + {{0xf4, 0x47, 0xa3, 0xc5, 0x15, 0x3d, 0x5d, 0x46, }}, /* Byte value: 0xb2 */ + {{0x64, 0x2b, 0x8e, 0x5d, 0xd9, 0x19, 0xda, 0x92, }}, /* Byte value: 0xb3 */ + {{0x93, 0xfc, 0x41, 0x3a, 0x1f, 0x54, 0xb0, 0x27, }}, /* Byte value: 0xb4 */ + {{0xc7, 0xc3, 0xc0, 0xd5, 0x68, 0x41, 0x9c, 0x5e, }}, /* Byte value: 0xb5 */ + {{0xe8, 0x4e, 0xd5, 0x66, 0x04, 0x3a, 0xd3, 0x55, }}, /* Byte value: 0xb6 */ + {{0x82, 0x80, 0x60, 0x8b, 0x34, 0xc1, 0x4e, 0x2f, }}, /* Byte value: 0xb7 */ + {{0x2b, 0x8e, 0x85, 0x49, 0x2a, 0x7a, 0xba, 0x8c, }}, /* Byte value: 0xb8 */ + {{0xa9, 0x0e, 0xe5, 0xc2, 0x1e, 0xbb, 0xf4, 0xa3, }}, /* Byte value: 0xb9 */ + {{0xd5, 0x2f, 0x8d, 0xc6, 0x90, 0xa4, 0x55, 0xa5, }}, /* Byte value: 0xba */ + {{0xbd, 0x01, 0x70, 0x56, 0x83, 0xbe, 0x53, 0x7d, }}, /* Byte value: 0xbb */ + {{0x76, 0xc7, 0xc3, 0x4e, 0x21, 0xfc, 0x13, 0x69, }}, /* Byte value: 0xbc */ + {{0x3b, 0x82, 0x80, 0x27, 0xf1, 0x7e, 0xe8, 0xd5, }}, /* Byte value: 0xbd */ + {{0xb3, 0xe4, 0x4b, 0xe6, 0x6a, 0x5c, 0x14, 0x95, }}, /* Byte value: 0xbe */ + {{0x49, 0x46, 0xd3, 0x93, 0x96, 0x83, 0x0e, 0x3b, }}, /* Byte value: 0xbf */ + {{0xd7, 0xcf, 0xc5, 0xbb, 0xb3, 0x45, 0xce, 0x07, }}, /* Byte value: 0xc0 */ + {{0xbb, 0xe2, 0xa8, 0xd1, 0xe6, 0x5e, 0x3d, 0x58, }}, /* Byte value: 0xc1 */ + {{0x8b, 0xf6, 0xa7, 0x63, 0x48, 0x52, 0xcb, 0xb3, }}, /* Byte value: 0xc2 */ + {{0x88, 0x66, 0xcb, 0xc1, 0x9b, 0x22, 0xfc, 0x40, }}, /* Byte value: 0xc3 */ + {{0xaf, 0xed, 0x3d, 0x45, 0x7b, 0x5b, 0x9a, 0x86, }}, /* Byte value: 0xc4 */ + {{0x6f, 0xbd, 0x01, 0xc8, 0x86, 0x6b, 0xc4, 0xac, }}, /* Byte value: 0xc5 */ + {{0x71, 0x54, 0x3f, 0x16, 0xb4, 0x8d, 0xd1, 0x1d, }}, /* Byte value: 0xc6 */ + {{0xea, 0xae, 0x9d, 0x1b, 0x27, 0xdb, 0x48, 0xf7, }}, /* Byte value: 0xc7 */ + {{0x66, 0xcb, 0xc6, 0x20, 0xfa, 0xf8, 0x41, 0x30, }}, /* Byte value: 0xc8 */ + {{0xb1, 0x04, 0x03, 0x9b, 0x49, 0xbd, 0x8f, 0x37, }}, /* Byte value: 0xc9 */ + {{0xe3, 0xd8, 0x5a, 0xf3, 0x5b, 0x48, 0xcd, 0x6b, }}, /* Byte value: 0xca */ + {{0xf6, 0xa7, 0xeb, 0xb8, 0x36, 0xdc, 0xc6, 0xe4, }}, /* Byte value: 0xcb */ + {{0xc2, 0xb0, 0x74, 0xf0, 0xde, 0xd1, 0xc5, 0x88, }}, /* Byte value: 0xcc */ + {{0xc3, 0xc0, 0x50, 0x2f, 0x2e, 0x40, 0x69, 0xd9, }}, /* Byte value: 0xcd */ + {{0xc8, 0x56, 0xdf, 0xba, 0x71, 0x32, 0x77, 0xe7, }}, /* Byte value: 0xce */ + {{0x69, 0x5e, 0xd9, 0x4f, 0xe3, 0x8b, 0xaa, 0x89, }}, /* Byte value: 0xcf */ + {{0xb4, 0x77, 0xb7, 0xbe, 0xff, 0x2d, 0xd6, 0xe1, }}, /* Byte value: 0xd0 */ + {{0x0d, 0x75, 0x57, 0x12, 0x3a, 0x92, 0x70, 0x1b, }}, /* Byte value: 0xd1 */ + {{0xed, 0x3d, 0x61, 0x43, 0xb2, 0xaa, 0x8a, 0x83, }}, /* Byte value: 0xd2 */ + {{0x32, 0xf4, 0x47, 0xcf, 0x8d, 0xed, 0x6d, 0x49, }}, /* Byte value: 0xd3 */ + {{0x70, 0x24, 0x1b, 0xc9, 0x44, 0x1c, 0x7d, 0x4c, }}, /* Byte value: 0xd4 */ + {{0xa0, 0x78, 0x22, 0x2a, 0x62, 0x28, 0x71, 0x3f, }}, /* Byte value: 0xd5 */ + {{0x2c, 0x1d, 0x79, 0x11, 0xbf, 0x0b, 0x78, 0xf8, }}, /* Byte value: 0xd6 */ + {{0x50, 0x3c, 0x11, 0x15, 0x31, 0x14, 0xd9, 0xfe, }}, /* Byte value: 0xd7 */ + {{0x80, 0x60, 0x28, 0xf6, 0x17, 0x20, 0xd5, 0x8d, }}, /* Byte value: 0xd8 */ + {{0x94, 0x6f, 0xbd, 0x62, 0x8a, 0x25, 0x72, 0x53, }}, /* Byte value: 0xd9 */ + {{0x13, 0x9c, 0x69, 0xcc, 0x08, 0x74, 0x65, 0xaa, }}, /* Byte value: 0xda */ + {{0xf1, 0x34, 0x17, 0xe0, 0xa3, 0xad, 0x04, 0x90, }}, /* Byte value: 0xdb */ + {{0xdf, 0xc9, 0x26, 0x8c, 0x3f, 0x47, 0xe7, 0xca, }}, /* Byte value: 0xdc */ + {{0x68, 0x2e, 0xfd, 0x90, 0x13, 0x1a, 0x06, 0xd8, }}, /* Byte value: 0xdd */ + {{0x91, 0x1c, 0x09, 0x47, 0x3c, 0xb5, 0x2b, 0x85, }}, /* Byte value: 0xde */ + {{0x67, 0xbb, 0xe2, 0xff, 0x0a, 0x69, 0xed, 0x61, }}, /* Byte value: 0xdf */ + {{0x44, 0x33, 0x84, 0x81, 0xac, 0x11, 0x7e, 0x20, }}, /* Byte value: 0xe0 */ + {{0x45, 0x43, 0xa0, 0x5e, 0x5c, 0x80, 0xd2, 0x71, }}, /* Byte value: 0xe1 */ + {{0x1b, 0x9a, 0x8a, 0xfb, 0x84, 0x76, 0x4c, 0x67, }}, /* Byte value: 0xe2 */ + {{0x7e, 0xc1, 0x20, 0x79, 0xad, 0xfe, 0x3a, 0xa4, }}, /* Byte value: 0xe3 */ + {{0x17, 0x9f, 0xf9, 0x36, 0x4e, 0x75, 0x90, 0x2d, }}, /* Byte value: 0xe4 */ + {{0x6b, 0xbe, 0x91, 0x32, 0xc0, 0x6a, 0x31, 0x2b, }}, /* Byte value: 0xe5 */ + {{0xba, 0x92, 0x8c, 0x0e, 0x16, 0xcf, 0x91, 0x09, }}, /* Byte value: 0xe6 */ + {{0x85, 0x13, 0x9c, 0xd3, 0xa1, 0xb0, 0x8c, 0x5b, }}, /* Byte value: 0xe7 */ + {{0x74, 0x27, 0x8b, 0x33, 0x02, 0x1d, 0x88, 0xcb, }}, /* Byte value: 0xe8 */ + {{0xde, 0xb9, 0x02, 0x53, 0xcf, 0xd6, 0x4b, 0x9b, }}, /* Byte value: 0xe9 */ + {{0x06, 0xe3, 0xd8, 0x87, 0x65, 0xe0, 0x6e, 0x25, }}, /* Byte value: 0xea */ + {{0x79, 0x52, 0xdc, 0x21, 0x38, 0x8f, 0xf8, 0xd0, }}, /* Byte value: 0xeb */ + {{0xd8, 0x5a, 0xda, 0xd4, 0xaa, 0x36, 0x25, 0xbe, }}, /* Byte value: 0xec */ + {{0x5d, 0x49, 0x46, 0x07, 0x0b, 0x86, 0xa9, 0xe5, }}, /* Byte value: 0xed */ + {{0x34, 0x17, 0x9f, 0x48, 0xe8, 0x0d, 0x03, 0x6c, }}, /* Byte value: 0xee */ + {{0x3f, 0x81, 0x10, 0xdd, 0xb7, 0x7f, 0x1d, 0x52, }}, /* Byte value: 0xef */ + {{0x10, 0x0c, 0x05, 0x6e, 0xdb, 0x04, 0x52, 0x59, }}, /* Byte value: 0xf0 */ + {{0xeb, 0xde, 0xb9, 0xc4, 0xd7, 0x4a, 0xe4, 0xa6, }}, /* Byte value: 0xf1 */ + {{0x07, 0x93, 0xfc, 0x58, 0x95, 0x71, 0xc2, 0x74, }}, /* Byte value: 0xf2 */ + {{0xec, 0x4d, 0x45, 0x9c, 0x42, 0x3b, 0x26, 0xd2, }}, /* Byte value: 0xf3 */ + {{0x63, 0xb8, 0x72, 0x05, 0x4c, 0x68, 0x18, 0xe6, }}, /* Byte value: 0xf4 */ + {{0xd4, 0x5f, 0xa9, 0x19, 0x60, 0x35, 0xf9, 0xf4, }}, /* Byte value: 0xf5 */ + {{0x5c, 0x39, 0x62, 0xd8, 0xfb, 0x17, 0x05, 0xb4, }}, /* Byte value: 0xf6 */ + {{0x5b, 0xaa, 0x9e, 0x80, 0x6e, 0x66, 0xc7, 0xc0, }}, /* Byte value: 0xf7 */ + {{0xd2, 0xbc, 0x71, 0x9e, 0x05, 0xd5, 0x97, 0xd1, }}, /* Byte value: 0xf8 */ + {{0xb0, 0x74, 0x27, 0x44, 0xb9, 0x2c, 0x23, 0x66, }}, /* Byte value: 0xf9 */ + {{0x51, 0x4c, 0x35, 0xca, 0xc1, 0x85, 0x75, 0xaf, }}, /* Byte value: 0xfa */ + {{0xce, 0xb5, 0x07, 0x3d, 0x14, 0xd2, 0x19, 0xc2, }}, /* Byte value: 0xfb */ + {{0xdc, 0x59, 0x4a, 0x2e, 0xec, 0x37, 0xd0, 0x39, }}, /* Byte value: 0xfc */ + {{0xa7, 0xeb, 0xde, 0x72, 0xf7, 0x59, 0xb3, 0x4b, }}, /* Byte value: 0xfd */ + {{0xf2, 0xa4, 0x7b, 0x42, 0x70, 0xdd, 0x33, 0x63, }}, /* Byte value: 0xfe */ + {{0xc9, 0x26, 0xfb, 0x65, 0x81, 0xa3, 0xdb, 0xb6, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 7 */ + {{0x7c, 0xd4, 0xa4, 0x1b, 0xb3, 0x82, 0x0e, 0xb2, }}, /* Byte value: 0x00 */ + {{0xf4, 0x40, 0x38, 0xf8, 0x4c, 0x99, 0x0f, 0xec, }}, /* Byte value: 0x01 */ + {{0x01, 0x97, 0x34, 0x4e, 0xd8, 0x52, 0x2c, 0x9f, }}, /* Byte value: 0x02 */ + {{0x53, 0x4d, 0x04, 0xd3, 0xcd, 0xf8, 0xa0, 0x90, }}, /* Byte value: 0x03 */ + {{0x89, 0x03, 0xa8, 0xad, 0x27, 0x49, 0x2d, 0xc1, }}, /* Byte value: 0x04 */ + {{0x24, 0xd1, 0x9f, 0x2f, 0xda, 0x59, 0x79, 0x32, }}, /* Byte value: 0x05 */ + {{0x67, 0xf8, 0x5d, 0x96, 0x09, 0xc8, 0x5c, 0x46, }}, /* Byte value: 0x06 */ + {{0x6f, 0xca, 0x3e, 0xa3, 0x06, 0x1d, 0xff, 0x34, }}, /* Byte value: 0x07 */ + {{0x40, 0x53, 0x9e, 0x6b, 0x78, 0x67, 0x51, 0x16, }}, /* Byte value: 0x08 */ + {{0x5f, 0x66, 0xb7, 0x1d, 0x24, 0xa6, 0xb3, 0xdb, }}, /* Byte value: 0x09 */ + {{0x09, 0xa5, 0x57, 0x7b, 0xd7, 0x87, 0x8f, 0xed, }}, /* Byte value: 0x0a */ + {{0x3d, 0x10, 0x0e, 0x3e, 0x13, 0xb7, 0x73, 0x3b, }}, /* Byte value: 0x0b */ + {{0xef, 0x6c, 0xc1, 0x75, 0xf6, 0xd3, 0x5d, 0x18, }}, /* Byte value: 0x0c */ + {{0x16, 0x90, 0x7e, 0x0d, 0x8b, 0x46, 0x6d, 0x20, }}, /* Byte value: 0x0d */ + {{0xe7, 0x5e, 0xa2, 0x40, 0xf9, 0x06, 0xfe, 0x6a, }}, /* Byte value: 0x0e */ + {{0xcb, 0xbd, 0x5e, 0x5a, 0x2c, 0x8a, 0x24, 0x2a, }}, /* Byte value: 0x0f */ + {{0xc8, 0xc7, 0x02, 0x88, 0x87, 0x7c, 0x50, 0x48, }}, /* Byte value: 0x10 */ + {{0x7a, 0x20, 0x1c, 0x7c, 0x26, 0xad, 0xe6, 0x76, }}, /* Byte value: 0x11 */ + {{0x96, 0x36, 0x81, 0xdb, 0x7b, 0x88, 0xcf, 0x0c, }}, /* Byte value: 0x12 */ + {{0x74, 0xe6, 0xc7, 0x2e, 0xbc, 0x57, 0xad, 0xc0, }}, /* Byte value: 0x13 */ + {{0x11, 0xf3, 0xf2, 0x24, 0xc6, 0x3b, 0xa9, 0x7b, }}, /* Byte value: 0x14 */ + {{0x4c, 0x78, 0x2d, 0xa5, 0x91, 0x39, 0x42, 0x5d, }}, /* Byte value: 0x15 */ + {{0x8e, 0x60, 0x24, 0x84, 0x6a, 0x34, 0xe9, 0x9a, }}, /* Byte value: 0x16 */ + {{0x61, 0x0c, 0xe5, 0xf1, 0x9c, 0xe7, 0xb4, 0x82, }}, /* Byte value: 0x17 */ + {{0x26, 0x3c, 0xf7, 0xb3, 0xa9, 0xfd, 0x21, 0xcf, }}, /* Byte value: 0x18 */ + {{0x5b, 0x7f, 0x67, 0xe6, 0xc2, 0x2d, 0x03, 0xe2, }}, /* Byte value: 0x19 */ + {{0xdf, 0xc0, 0x48, 0xcb, 0xd4, 0x68, 0x11, 0xf7, }}, /* Byte value: 0x1a */ + {{0x28, 0xfa, 0x2c, 0xe1, 0x33, 0x07, 0x6a, 0x79, }}, /* Byte value: 0x1b */ + {{0xfd, 0xe5, 0x6f, 0x83, 0x9b, 0x1e, 0x80, 0x01, }}, /* Byte value: 0x1c */ + {{0x1b, 0x2c, 0xf9, 0x8d, 0xba, 0x4a, 0x52, 0xf4, }}, /* Byte value: 0x1d */ + {{0x43, 0x29, 0xc2, 0xb9, 0xd3, 0x91, 0x25, 0x74, }}, /* Byte value: 0x1e */ + {{0xf1, 0xce, 0xdc, 0x4d, 0x72, 0x40, 0x93, 0x4a, }}, /* Byte value: 0x1f */ + {{0xd2, 0x7c, 0xcf, 0x4b, 0xe5, 0x64, 0x2e, 0x23, }}, /* Byte value: 0x20 */ + {{0x17, 0x07, 0x4a, 0x43, 0x53, 0x14, 0x41, 0xbf, }}, /* Byte value: 0x21 */ + {{0xf2, 0xb4, 0x80, 0x9f, 0xd9, 0xb6, 0xe7, 0x28, }}, /* Byte value: 0x22 */ + {{0xed, 0x81, 0xa9, 0xe9, 0x85, 0x77, 0x05, 0xe5, }}, /* Byte value: 0x23 */ + {{0x1e, 0xa2, 0x1d, 0x38, 0x84, 0x93, 0xce, 0x52, }}, /* Byte value: 0x24 */ + {{0x98, 0xf0, 0x5a, 0x89, 0xe1, 0x72, 0x84, 0xba, }}, /* Byte value: 0x25 */ + {{0xbd, 0xb6, 0xf1, 0xe8, 0xe3, 0x79, 0xd1, 0x17, }}, /* Byte value: 0x26 */ + {{0x7d, 0x43, 0x90, 0x55, 0x6b, 0xd0, 0x22, 0x2d, }}, /* Byte value: 0x27 */ + {{0x99, 0x67, 0x6e, 0xc7, 0x39, 0x20, 0xa8, 0x25, }}, /* Byte value: 0x28 */ + {{0xf0, 0x59, 0xe8, 0x03, 0xaa, 0x12, 0xbf, 0xd5, }}, /* Byte value: 0x29 */ + {{0xc4, 0xec, 0xb1, 0x46, 0x6e, 0x22, 0x43, 0x03, }}, /* Byte value: 0x2a */ + {{0xfa, 0x86, 0xe3, 0xaa, 0xd6, 0x63, 0x44, 0x5a, }}, /* Byte value: 0x2b */ + {{0x06, 0xf4, 0xb8, 0x67, 0x95, 0x2f, 0xe8, 0xc4, }}, /* Byte value: 0x2c */ + {{0x49, 0xf6, 0xc9, 0x10, 0xaf, 0xe0, 0xde, 0xfb, }}, /* Byte value: 0x2d */ + {{0xa8, 0x5c, 0xd3, 0x37, 0xc3, 0xc9, 0xc8, 0x55, }}, /* Byte value: 0x2e */ + {{0x59, 0x92, 0x0f, 0x7a, 0xb1, 0x89, 0x5b, 0x1f, }}, /* Byte value: 0x2f */ + {{0xae, 0xa8, 0x6b, 0x50, 0x56, 0xe6, 0x20, 0x91, }}, /* Byte value: 0x30 */ + {{0x37, 0xcf, 0x05, 0x97, 0x6f, 0xc6, 0x88, 0xb4, }}, /* Byte value: 0x31 */ + {{0x92, 0x2f, 0x51, 0x20, 0x9d, 0x03, 0x7f, 0x35, }}, /* Byte value: 0x32 */ + {{0x9c, 0xe9, 0x8a, 0x72, 0x07, 0xf9, 0x34, 0x83, }}, /* Byte value: 0x33 */ + {{0x57, 0x54, 0xd4, 0x28, 0x2b, 0x73, 0x10, 0xa9, }}, /* Byte value: 0x34 */ + {{0xc3, 0x8f, 0x3d, 0x6f, 0x23, 0x5f, 0x87, 0x58, }}, /* Byte value: 0x35 */ + {{0xe1, 0xaa, 0x1a, 0x27, 0x6c, 0x29, 0x16, 0xae, }}, /* Byte value: 0x36 */ + {{0xe4, 0x24, 0xfe, 0x92, 0x52, 0xf0, 0x8a, 0x08, }}, /* Byte value: 0x37 */ + {{0x75, 0x71, 0xf3, 0x60, 0x64, 0x05, 0x81, 0x5f, }}, /* Byte value: 0x38 */ + {{0xd6, 0x65, 0x1f, 0xb0, 0x03, 0xef, 0x9e, 0x1a, }}, /* Byte value: 0x39 */ + {{0x2f, 0x99, 0xa0, 0xc8, 0x7e, 0x7a, 0xae, 0x22, }}, /* Byte value: 0x3a */ + {{0xc7, 0x96, 0xed, 0x94, 0xc5, 0xd4, 0x37, 0x61, }}, /* Byte value: 0x3b */ + {{0x77, 0x9c, 0x9b, 0xfc, 0x17, 0xa1, 0xd9, 0xa2, }}, /* Byte value: 0x3c */ + {{0x45, 0xdd, 0x7a, 0xde, 0x46, 0xbe, 0xcd, 0xb0, }}, /* Byte value: 0x3d */ + {{0x79, 0x5a, 0x40, 0xae, 0x8d, 0x5b, 0x92, 0x14, }}, /* Byte value: 0x3e */ + {{0x2b, 0x80, 0x70, 0x33, 0x98, 0xf1, 0x1e, 0x1b, }}, /* Byte value: 0x3f */ + {{0x5a, 0xe8, 0x53, 0xa8, 0x1a, 0x7f, 0x2f, 0x7d, }}, /* Byte value: 0x40 */ + {{0xc9, 0x50, 0x36, 0xc6, 0x5f, 0x2e, 0x7c, 0xd7, }}, /* Byte value: 0x41 */ + {{0xde, 0x57, 0x7c, 0x85, 0x0c, 0x3a, 0x3d, 0x68, }}, /* Byte value: 0x42 */ + {{0x3b, 0xe4, 0xb6, 0x59, 0x86, 0x98, 0x9b, 0xff, }}, /* Byte value: 0x43 */ + {{0x13, 0x1e, 0x9a, 0xb8, 0xb5, 0x9f, 0xf1, 0x86, }}, /* Byte value: 0x44 */ + {{0xb5, 0x84, 0x92, 0xdd, 0xec, 0xac, 0x72, 0x65, }}, /* Byte value: 0x45 */ + {{0x65, 0x15, 0x35, 0x0a, 0x7a, 0x6c, 0x04, 0xbb, }}, /* Byte value: 0x46 */ + {{0x32, 0x41, 0xe1, 0x22, 0x51, 0x1f, 0x14, 0x12, }}, /* Byte value: 0x47 */ + {{0x04, 0x19, 0xd0, 0xfb, 0xe6, 0x8b, 0xb0, 0x39, }}, /* Byte value: 0x48 */ + {{0xab, 0x26, 0x8f, 0xe5, 0x68, 0x3f, 0xbc, 0x37, }}, /* Byte value: 0x49 */ + {{0x51, 0xa0, 0x6c, 0x4f, 0xbe, 0x5c, 0xf8, 0x6d, }}, /* Byte value: 0x4a */ + {{0x76, 0x0b, 0xaf, 0xb2, 0xcf, 0xf3, 0xf5, 0x3d, }}, /* Byte value: 0x4b */ + {{0x35, 0x22, 0x6d, 0x0b, 0x1c, 0x62, 0xd0, 0x49, }}, /* Byte value: 0x4c */ + {{0xb1, 0x9d, 0x42, 0x26, 0x0a, 0x27, 0xc2, 0x5c, }}, /* Byte value: 0x4d */ + {{0xc0, 0xf5, 0x61, 0xbd, 0x88, 0xa9, 0xf3, 0x3a, }}, /* Byte value: 0x4e */ + {{0x52, 0xda, 0x30, 0x9d, 0x15, 0xaa, 0x8c, 0x0f, }}, /* Byte value: 0x4f */ + {{0x50, 0x37, 0x58, 0x01, 0x66, 0x0e, 0xd4, 0xf2, }}, /* Byte value: 0x50 */ + {{0x46, 0xa7, 0x26, 0x0c, 0xed, 0x48, 0xb9, 0xd2, }}, /* Byte value: 0x51 */ + {{0x78, 0xcd, 0x74, 0xe0, 0x55, 0x09, 0xbe, 0x8b, }}, /* Byte value: 0x52 */ + {{0x07, 0x63, 0x8c, 0x29, 0x4d, 0x7d, 0xc4, 0x5b, }}, /* Byte value: 0x53 */ + {{0x0d, 0xbc, 0x87, 0x80, 0x31, 0x0c, 0x3f, 0xd4, }}, /* Byte value: 0x54 */ + {{0xea, 0xe2, 0x25, 0xc0, 0xc8, 0x0a, 0xc1, 0xbe, }}, /* Byte value: 0x55 */ + {{0x33, 0xd6, 0xd5, 0x6c, 0x89, 0x4d, 0x38, 0x8d, }}, /* Byte value: 0x56 */ + {{0x88, 0x94, 0x9c, 0xe3, 0xff, 0x1b, 0x01, 0x5e, }}, /* Byte value: 0x57 */ + {{0xcf, 0xa4, 0x8e, 0xa1, 0xca, 0x01, 0x94, 0x13, }}, /* Byte value: 0x58 */ + {{0xd4, 0x88, 0x77, 0x2c, 0x70, 0x4b, 0xc6, 0xe7, }}, /* Byte value: 0x59 */ + {{0xc1, 0x62, 0x55, 0xf3, 0x50, 0xfb, 0xdf, 0xa5, }}, /* Byte value: 0x5a */ + {{0x54, 0x2e, 0x88, 0xfa, 0x80, 0x85, 0x64, 0xcb, }}, /* Byte value: 0x5b */ + {{0x20, 0xc8, 0x4f, 0xd4, 0x3c, 0xd2, 0xc9, 0x0b, }}, /* Byte value: 0x5c */ + {{0xc2, 0x18, 0x09, 0x21, 0xfb, 0x0d, 0xab, 0xc7, }}, /* Byte value: 0x5d */ + {{0xd1, 0x06, 0x93, 0x99, 0x4e, 0x92, 0x5a, 0x41, }}, /* Byte value: 0x5e */ + {{0xec, 0x16, 0x9d, 0xa7, 0x5d, 0x25, 0x29, 0x7a, }}, /* Byte value: 0x5f */ + {{0xb4, 0x13, 0xa6, 0x93, 0x34, 0xfe, 0x5e, 0xfa, }}, /* Byte value: 0x60 */ + {{0xad, 0xd2, 0x37, 0x82, 0xfd, 0x10, 0x54, 0xf3, }}, /* Byte value: 0x61 */ + {{0xbf, 0x5b, 0x99, 0x74, 0x90, 0xdd, 0x89, 0xea, }}, /* Byte value: 0x62 */ + {{0x70, 0xff, 0x17, 0xd5, 0x5a, 0xdc, 0x1d, 0xf9, }}, /* Byte value: 0x63 */ + {{0x1a, 0xbb, 0xcd, 0xc3, 0x62, 0x18, 0x7e, 0x6b, }}, /* Byte value: 0x64 */ + {{0x90, 0xc2, 0x39, 0xbc, 0xee, 0xa7, 0x27, 0xc8, }}, /* Byte value: 0x65 */ + {{0x55, 0xb9, 0xbc, 0xb4, 0x58, 0xd7, 0x48, 0x54, }}, /* Byte value: 0x66 */ + {{0x84, 0xbf, 0x2f, 0x2d, 0x16, 0x45, 0x12, 0x15, }}, /* Byte value: 0x67 */ + {{0x4d, 0xef, 0x19, 0xeb, 0x49, 0x6b, 0x6e, 0xc2, }}, /* Byte value: 0x68 */ + {{0x83, 0xdc, 0xa3, 0x04, 0x5b, 0x38, 0xd6, 0x4e, }}, /* Byte value: 0x69 */ + {{0x4b, 0x1b, 0xa1, 0x8c, 0xdc, 0x44, 0x86, 0x06, }}, /* Byte value: 0x6a */ + {{0x6d, 0x27, 0x56, 0x3f, 0x75, 0xb9, 0xa7, 0xc9, }}, /* Byte value: 0x6b */ + {{0x69, 0x3e, 0x86, 0xc4, 0x93, 0x32, 0x17, 0xf0, }}, /* Byte value: 0x6c */ + {{0xb2, 0xe7, 0x1e, 0xf4, 0xa1, 0xd1, 0xb6, 0x3e, }}, /* Byte value: 0x6d */ + {{0x6c, 0xb0, 0x62, 0x71, 0xad, 0xeb, 0x8b, 0x56, }}, /* Byte value: 0x6e */ + {{0xb7, 0x69, 0xfa, 0x41, 0x9f, 0x08, 0x2a, 0x98, }}, /* Byte value: 0x6f */ + {{0xbc, 0x21, 0xc5, 0xa6, 0x3b, 0x2b, 0xfd, 0x88, }}, /* Byte value: 0x70 */ + {{0xe8, 0x0f, 0x4d, 0x5c, 0xbb, 0xae, 0x99, 0x43, }}, /* Byte value: 0x71 */ + {{0x5e, 0xf1, 0x83, 0x53, 0xfc, 0xf4, 0x9f, 0x44, }}, /* Byte value: 0x72 */ + {{0x8d, 0x1a, 0x78, 0x56, 0xc1, 0xc2, 0x9d, 0xf8, }}, /* Byte value: 0x73 */ + {{0xa7, 0x0d, 0x3c, 0x2b, 0x81, 0x61, 0xaf, 0x7c, }}, /* Byte value: 0x74 */ + {{0x80, 0xa6, 0xff, 0xd6, 0xf0, 0xce, 0xa2, 0x2c, }}, /* Byte value: 0x75 */ + {{0x4f, 0x02, 0x71, 0x77, 0x3a, 0xcf, 0x36, 0x3f, }}, /* Byte value: 0x76 */ + {{0x3e, 0x6a, 0x52, 0xec, 0xb8, 0x41, 0x07, 0x59, }}, /* Byte value: 0x77 */ + {{0xff, 0x08, 0x07, 0x1f, 0xe8, 0xba, 0xd8, 0xfc, }}, /* Byte value: 0x78 */ + {{0x95, 0x4c, 0xdd, 0x09, 0xd0, 0x7e, 0xbb, 0x6e, }}, /* Byte value: 0x79 */ + {{0xcd, 0x49, 0xe6, 0x3d, 0xb9, 0xa5, 0xcc, 0xee, }}, /* Byte value: 0x7a */ + {{0xd0, 0x91, 0xa7, 0xd7, 0x96, 0xc0, 0x76, 0xde, }}, /* Byte value: 0x7b */ + {{0x63, 0xe1, 0x8d, 0x6d, 0xef, 0x43, 0xec, 0x7f, }}, /* Byte value: 0x7c */ + {{0x5d, 0x8b, 0xdf, 0x81, 0x57, 0x02, 0xeb, 0x26, }}, /* Byte value: 0x7d */ + {{0xa3, 0x14, 0xec, 0xd0, 0x67, 0xea, 0x1f, 0x45, }}, /* Byte value: 0x7e */ + {{0x4e, 0x95, 0x45, 0x39, 0xe2, 0x9d, 0x1a, 0xa0, }}, /* Byte value: 0x7f */ + {{0x93, 0xb8, 0x65, 0x6e, 0x45, 0x51, 0x53, 0xaa, }}, /* Byte value: 0x80 */ + {{0x38, 0x9e, 0xea, 0x8b, 0x2d, 0x6e, 0xef, 0x9d, }}, /* Byte value: 0x81 */ + {{0xd3, 0xeb, 0xfb, 0x05, 0x3d, 0x36, 0x02, 0xbc, }}, /* Byte value: 0x82 */ + {{0xa0, 0x6e, 0xb0, 0x02, 0xcc, 0x1c, 0x6b, 0x27, }}, /* Byte value: 0x83 */ + {{0x56, 0xc3, 0xe0, 0x66, 0xf3, 0x21, 0x3c, 0x36, }}, /* Byte value: 0x84 */ + {{0xe9, 0x98, 0x79, 0x12, 0x63, 0xfc, 0xb5, 0xdc, }}, /* Byte value: 0x85 */ + {{0xb3, 0x70, 0x2a, 0xba, 0x79, 0x83, 0x9a, 0xa1, }}, /* Byte value: 0x86 */ + {{0xfc, 0x72, 0x5b, 0xcd, 0x43, 0x4c, 0xac, 0x9e, }}, /* Byte value: 0x87 */ + {{0x9e, 0x04, 0xe2, 0xee, 0x74, 0x5d, 0x6c, 0x7e, }}, /* Byte value: 0x88 */ + {{0x02, 0xed, 0x68, 0x9c, 0x73, 0xa4, 0x58, 0xfd, }}, /* Byte value: 0x89 */ + {{0xd7, 0xf2, 0x2b, 0xfe, 0xdb, 0xbd, 0xb2, 0x85, }}, /* Byte value: 0x8a */ + {{0xe3, 0x47, 0x72, 0xbb, 0x1f, 0x8d, 0x4e, 0x53, }}, /* Byte value: 0x8b */ + {{0xac, 0x45, 0x03, 0xcc, 0x25, 0x42, 0x78, 0x6c, }}, /* Byte value: 0x8c */ + {{0xa6, 0x9a, 0x08, 0x65, 0x59, 0x33, 0x83, 0xe3, }}, /* Byte value: 0x8d */ + {{0xba, 0xd5, 0x7d, 0xc1, 0xae, 0x04, 0x15, 0x4c, }}, /* Byte value: 0x8e */ + {{0xdb, 0xd9, 0x98, 0x30, 0x32, 0xe3, 0xa1, 0xce, }}, /* Byte value: 0x8f */ + {{0x8c, 0x8d, 0x4c, 0x18, 0x19, 0x90, 0xb1, 0x67, }}, /* Byte value: 0x90 */ + {{0x31, 0x3b, 0xbd, 0xf0, 0xfa, 0xe9, 0x60, 0x70, }}, /* Byte value: 0x91 */ + {{0x66, 0x6f, 0x69, 0xd8, 0xd1, 0x9a, 0x70, 0xd9, }}, /* Byte value: 0x92 */ + {{0xda, 0x4e, 0xac, 0x7e, 0xea, 0xb1, 0x8d, 0x51, }}, /* Byte value: 0x93 */ + {{0xd9, 0x34, 0xf0, 0xac, 0x41, 0x47, 0xf9, 0x33, }}, /* Byte value: 0x94 */ + {{0x2d, 0x74, 0xc8, 0x54, 0x0d, 0xde, 0xf6, 0xdf, }}, /* Byte value: 0x95 */ + {{0xfe, 0x9f, 0x33, 0x51, 0x30, 0xe8, 0xf4, 0x63, }}, /* Byte value: 0x96 */ + {{0x14, 0x7d, 0x16, 0x91, 0xf8, 0xe2, 0x35, 0xdd, }}, /* Byte value: 0x97 */ + {{0x48, 0x61, 0xfd, 0x5e, 0x77, 0xb2, 0xf2, 0x64, }}, /* Byte value: 0x98 */ + {{0x81, 0x31, 0xcb, 0x98, 0x28, 0x9c, 0x8e, 0xb3, }}, /* Byte value: 0x99 */ + {{0x39, 0x09, 0xde, 0xc5, 0xf5, 0x3c, 0xc3, 0x02, }}, /* Byte value: 0x9a */ + {{0x72, 0x12, 0x7f, 0x49, 0x29, 0x78, 0x45, 0x04, }}, /* Byte value: 0x9b */ + {{0x10, 0x64, 0xc6, 0x6a, 0x1e, 0x69, 0x85, 0xe4, }}, /* Byte value: 0x9c */ + {{0xf5, 0xd7, 0x0c, 0xb6, 0x94, 0xcb, 0x23, 0x73, }}, /* Byte value: 0x9d */ + {{0x9f, 0x93, 0xd6, 0xa0, 0xac, 0x0f, 0x40, 0xe1, }}, /* Byte value: 0x9e */ + {{0xf7, 0x3a, 0x64, 0x2a, 0xe7, 0x6f, 0x7b, 0x8e, }}, /* Byte value: 0x9f */ + {{0xd8, 0xa3, 0xc4, 0xe2, 0x99, 0x15, 0xd5, 0xac, }}, /* Byte value: 0xa0 */ + {{0xf6, 0xad, 0x50, 0x64, 0x3f, 0x3d, 0x57, 0x11, }}, /* Byte value: 0xa1 */ + {{0x5c, 0x1c, 0xeb, 0xcf, 0x8f, 0x50, 0xc7, 0xb9, }}, /* Byte value: 0xa2 */ + {{0x9d, 0x7e, 0xbe, 0x3c, 0xdf, 0xab, 0x18, 0x1c, }}, /* Byte value: 0xa3 */ + {{0x62, 0x76, 0xb9, 0x23, 0x37, 0x11, 0xc0, 0xe0, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0xce, 0x33, 0xba, 0xef, 0x12, 0x53, 0xb8, 0x8c, }}, /* Byte value: 0xa6 */ + {{0x8f, 0xf7, 0x10, 0xca, 0xb2, 0x66, 0xc5, 0x05, }}, /* Byte value: 0xa7 */ + {{0x85, 0x28, 0x1b, 0x63, 0xce, 0x17, 0x3e, 0x8a, }}, /* Byte value: 0xa8 */ + {{0xf3, 0x23, 0xb4, 0xd1, 0x01, 0xe4, 0xcb, 0xb7, }}, /* Byte value: 0xa9 */ + {{0x23, 0xb2, 0x13, 0x06, 0x97, 0x24, 0xbd, 0x69, }}, /* Byte value: 0xaa */ + {{0x42, 0xbe, 0xf6, 0xf7, 0x0b, 0xc3, 0x09, 0xeb, }}, /* Byte value: 0xab */ + {{0xbb, 0x42, 0x49, 0x8f, 0x76, 0x56, 0x39, 0xd3, }}, /* Byte value: 0xac */ + {{0xfb, 0x11, 0xd7, 0xe4, 0x0e, 0x31, 0x68, 0xc5, }}, /* Byte value: 0xad */ + {{0x41, 0xc4, 0xaa, 0x25, 0xa0, 0x35, 0x7d, 0x89, }}, /* Byte value: 0xae */ + {{0x21, 0x5f, 0x7b, 0x9a, 0xe4, 0x80, 0xe5, 0x94, }}, /* Byte value: 0xaf */ + {{0x47, 0x30, 0x12, 0x42, 0x35, 0x1a, 0x95, 0x4d, }}, /* Byte value: 0xb0 */ + {{0xc6, 0x01, 0xd9, 0xda, 0x1d, 0x86, 0x1b, 0xfe, }}, /* Byte value: 0xb1 */ + {{0x1d, 0xd8, 0x41, 0xea, 0x2f, 0x65, 0xba, 0x30, }}, /* Byte value: 0xb2 */ + {{0x58, 0x05, 0x3b, 0x34, 0x69, 0xdb, 0x77, 0x80, }}, /* Byte value: 0xb3 */ + {{0x08, 0x32, 0x63, 0x35, 0x0f, 0xd5, 0xa3, 0x72, }}, /* Byte value: 0xb4 */ + {{0x0a, 0xdf, 0x0b, 0xa9, 0x7c, 0x71, 0xfb, 0x8f, }}, /* Byte value: 0xb5 */ + {{0xdc, 0xba, 0x14, 0x19, 0x7f, 0x9e, 0x65, 0x95, }}, /* Byte value: 0xb6 */ + {{0x05, 0x8e, 0xe4, 0xb5, 0x3e, 0xd9, 0x9c, 0xa6, }}, /* Byte value: 0xb7 */ + {{0x3a, 0x73, 0x82, 0x17, 0x5e, 0xca, 0xb7, 0x60, }}, /* Byte value: 0xb8 */ + {{0x3f, 0xfd, 0x66, 0xa2, 0x60, 0x13, 0x2b, 0xc6, }}, /* Byte value: 0xb9 */ + {{0x4a, 0x8c, 0x95, 0xc2, 0x04, 0x16, 0xaa, 0x99, }}, /* Byte value: 0xba */ + {{0xe5, 0xb3, 0xca, 0xdc, 0x8a, 0xa2, 0xa6, 0x97, }}, /* Byte value: 0xbb */ + {{0x18, 0x56, 0xa5, 0x5f, 0x11, 0xbc, 0x26, 0x96, }}, /* Byte value: 0xbc */ + {{0x0c, 0x2b, 0xb3, 0xce, 0xe9, 0x5e, 0x13, 0x4b, }}, /* Byte value: 0xbd */ + {{0x64, 0x82, 0x01, 0x44, 0xa2, 0x3e, 0x28, 0x24, }}, /* Byte value: 0xbe */ + {{0xf8, 0x6b, 0x8b, 0x36, 0xa5, 0xc7, 0x1c, 0xa7, }}, /* Byte value: 0xbf */ + {{0x3c, 0x87, 0x3a, 0x70, 0xcb, 0xe5, 0x5f, 0xa4, }}, /* Byte value: 0xc0 */ + {{0x7f, 0xae, 0xf8, 0xc9, 0x18, 0x74, 0x7a, 0xd0, }}, /* Byte value: 0xc1 */ + {{0x25, 0x46, 0xab, 0x61, 0x02, 0x0b, 0x55, 0xad, }}, /* Byte value: 0xc2 */ + {{0x68, 0xa9, 0xb2, 0x8a, 0x4b, 0x60, 0x3b, 0x6f, }}, /* Byte value: 0xc3 */ + {{0xa5, 0xe0, 0x54, 0xb7, 0xf2, 0xc5, 0xf7, 0x81, }}, /* Byte value: 0xc4 */ + {{0x0e, 0xc6, 0xdb, 0x52, 0x9a, 0xfa, 0x4b, 0xb6, }}, /* Byte value: 0xc5 */ + {{0xb9, 0xaf, 0x21, 0x13, 0x05, 0xf2, 0x61, 0x2e, }}, /* Byte value: 0xc6 */ + {{0xaa, 0xb1, 0xbb, 0xab, 0xb0, 0x6d, 0x90, 0xa8, }}, /* Byte value: 0xc7 */ + {{0x2e, 0x0e, 0x94, 0x86, 0xa6, 0x28, 0x82, 0xbd, }}, /* Byte value: 0xc8 */ + {{0x12, 0x89, 0xae, 0xf6, 0x6d, 0xcd, 0xdd, 0x19, }}, /* Byte value: 0xc9 */ + {{0x8a, 0x79, 0xf4, 0x7f, 0x8c, 0xbf, 0x59, 0xa3, }}, /* Byte value: 0xca */ + {{0x6b, 0xd3, 0xee, 0x58, 0xe0, 0x96, 0x4f, 0x0d, }}, /* Byte value: 0xcb */ + {{0xdd, 0x2d, 0x20, 0x57, 0xa7, 0xcc, 0x49, 0x0a, }}, /* Byte value: 0xcc */ + {{0xe6, 0xc9, 0x96, 0x0e, 0x21, 0x54, 0xd2, 0xf5, }}, /* Byte value: 0xcd */ + {{0xb0, 0x0a, 0x76, 0x68, 0xd2, 0x75, 0xee, 0xc3, }}, /* Byte value: 0xce */ + {{0x94, 0xdb, 0xe9, 0x47, 0x08, 0x2c, 0x97, 0xf1, }}, /* Byte value: 0xcf */ + {{0xc5, 0x7b, 0x85, 0x08, 0xb6, 0x70, 0x6f, 0x9c, }}, /* Byte value: 0xd0 */ + {{0xcc, 0xde, 0xd2, 0x73, 0x61, 0xf7, 0xe0, 0x71, }}, /* Byte value: 0xd1 */ + {{0x0b, 0x48, 0x3f, 0xe7, 0xa4, 0x23, 0xd7, 0x10, }}, /* Byte value: 0xd2 */ + {{0x2c, 0xe3, 0xfc, 0x1a, 0xd5, 0x8c, 0xda, 0x40, }}, /* Byte value: 0xd3 */ + {{0x82, 0x4b, 0x97, 0x4a, 0x83, 0x6a, 0xfa, 0xd1, }}, /* Byte value: 0xd4 */ + {{0x1f, 0x35, 0x29, 0x76, 0x5c, 0xc1, 0xe2, 0xcd, }}, /* Byte value: 0xd5 */ + {{0x9b, 0x8a, 0x06, 0x5b, 0x4a, 0x84, 0xf0, 0xd8, }}, /* Byte value: 0xd6 */ + {{0xee, 0xfb, 0xf5, 0x3b, 0x2e, 0x81, 0x71, 0x87, }}, /* Byte value: 0xd7 */ + {{0x73, 0x85, 0x4b, 0x07, 0xf1, 0x2a, 0x69, 0x9b, }}, /* Byte value: 0xd8 */ + {{0xa9, 0xcb, 0xe7, 0x79, 0x1b, 0x9b, 0xe4, 0xca, }}, /* Byte value: 0xd9 */ + {{0x7b, 0xb7, 0x28, 0x32, 0xfe, 0xff, 0xca, 0xe9, }}, /* Byte value: 0xda */ + {{0xca, 0x2a, 0x6a, 0x14, 0xf4, 0xd8, 0x08, 0xb5, }}, /* Byte value: 0xdb */ + {{0x27, 0xab, 0xc3, 0xfd, 0x71, 0xaf, 0x0d, 0x50, }}, /* Byte value: 0xdc */ + {{0xaf, 0x3f, 0x5f, 0x1e, 0x8e, 0xb4, 0x0c, 0x0e, }}, /* Byte value: 0xdd */ + {{0x7e, 0x39, 0xcc, 0x87, 0xc0, 0x26, 0x56, 0x4f, }}, /* Byte value: 0xde */ + {{0x15, 0xea, 0x22, 0xdf, 0x20, 0xb0, 0x19, 0x42, }}, /* Byte value: 0xdf */ + {{0x34, 0xb5, 0x59, 0x45, 0xc4, 0x30, 0xfc, 0xd6, }}, /* Byte value: 0xe0 */ + {{0x0f, 0x51, 0xef, 0x1c, 0x42, 0xa8, 0x67, 0x29, }}, /* Byte value: 0xe1 */ + {{0x60, 0x9b, 0xd1, 0xbf, 0x44, 0xb5, 0x98, 0x1d, }}, /* Byte value: 0xe2 */ + {{0x03, 0x7a, 0x5c, 0xd2, 0xab, 0xf6, 0x74, 0x62, }}, /* Byte value: 0xe3 */ + {{0x97, 0xa1, 0xb5, 0x95, 0xa3, 0xda, 0xe3, 0x93, }}, /* Byte value: 0xe4 */ + {{0xe2, 0xd0, 0x46, 0xf5, 0xc7, 0xdf, 0x62, 0xcc, }}, /* Byte value: 0xe5 */ + {{0x44, 0x4a, 0x4e, 0x90, 0x9e, 0xec, 0xe1, 0x2f, }}, /* Byte value: 0xe6 */ + {{0xa4, 0x77, 0x60, 0xf9, 0x2a, 0x97, 0xdb, 0x1e, }}, /* Byte value: 0xe7 */ + {{0x6e, 0x5d, 0x0a, 0xed, 0xde, 0x4f, 0xd3, 0xab, }}, /* Byte value: 0xe8 */ + {{0x1c, 0x4f, 0x75, 0xa4, 0xf7, 0x37, 0x96, 0xaf, }}, /* Byte value: 0xe9 */ + {{0x9a, 0x1d, 0x32, 0x15, 0x92, 0xd6, 0xdc, 0x47, }}, /* Byte value: 0xea */ + {{0xa2, 0x83, 0xd8, 0x9e, 0xbf, 0xb8, 0x33, 0xda, }}, /* Byte value: 0xeb */ + {{0x86, 0x52, 0x47, 0xb1, 0x65, 0xe1, 0x4a, 0xe8, }}, /* Byte value: 0xec */ + {{0x22, 0x25, 0x27, 0x48, 0x4f, 0x76, 0x91, 0xf6, }}, /* Byte value: 0xed */ + {{0xb6, 0xfe, 0xce, 0x0f, 0x47, 0x5a, 0x06, 0x07, }}, /* Byte value: 0xee */ + {{0xe0, 0x3d, 0x2e, 0x69, 0xb4, 0x7b, 0x3a, 0x31, }}, /* Byte value: 0xef */ + {{0x36, 0x58, 0x31, 0xd9, 0xb7, 0x94, 0xa4, 0x2b, }}, /* Byte value: 0xf0 */ + {{0x91, 0x55, 0x0d, 0xf2, 0x36, 0xf5, 0x0b, 0x57, }}, /* Byte value: 0xf1 */ + {{0xa1, 0xf9, 0x84, 0x4c, 0x14, 0x4e, 0x47, 0xb8, }}, /* Byte value: 0xf2 */ + {{0x30, 0xac, 0x89, 0xbe, 0x22, 0xbb, 0x4c, 0xef, }}, /* Byte value: 0xf3 */ + {{0xf9, 0xfc, 0xbf, 0x78, 0x7d, 0x95, 0x30, 0x38, }}, /* Byte value: 0xf4 */ + {{0x71, 0x68, 0x23, 0x9b, 0x82, 0x8e, 0x31, 0x66, }}, /* Byte value: 0xf5 */ + {{0x19, 0xc1, 0x91, 0x11, 0xc9, 0xee, 0x0a, 0x09, }}, /* Byte value: 0xf6 */ + {{0xb8, 0x38, 0x15, 0x5d, 0xdd, 0xa0, 0x4d, 0xb1, }}, /* Byte value: 0xf7 */ + {{0xeb, 0x75, 0x11, 0x8e, 0x10, 0x58, 0xed, 0x21, }}, /* Byte value: 0xf8 */ + {{0x29, 0x6d, 0x18, 0xaf, 0xeb, 0x55, 0x46, 0xe6, }}, /* Byte value: 0xf9 */ + {{0xd5, 0x1f, 0x43, 0x62, 0xa8, 0x19, 0xea, 0x78, }}, /* Byte value: 0xfa */ + {{0x2a, 0x17, 0x44, 0x7d, 0x40, 0xa3, 0x32, 0x84, }}, /* Byte value: 0xfb */ + {{0x6a, 0x44, 0xda, 0x16, 0x38, 0xc4, 0x63, 0x92, }}, /* Byte value: 0xfc */ + {{0xbe, 0xcc, 0xad, 0x3a, 0x48, 0x8f, 0xa5, 0x75, }}, /* Byte value: 0xfd */ + {{0x87, 0xc5, 0x73, 0xff, 0xbd, 0xb3, 0x66, 0x77, }}, /* Byte value: 0xfe */ + {{0x8b, 0xee, 0xc0, 0x31, 0x54, 0xed, 0x75, 0x3c, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 8 */ + {{0x10, 0xec, 0xae, 0xdf, 0x6a, 0x2d, 0x01, 0xfc, }}, /* Byte value: 0x00 */ + {{0x92, 0x7c, 0xf2, 0x2a, 0x20, 0xcb, 0xa0, 0xee, }}, /* Byte value: 0x01 */ + {{0xfa, 0x27, 0xc7, 0x23, 0xaa, 0xd2, 0x47, 0xdd, }}, /* Byte value: 0x02 */ + {{0x99, 0x88, 0x13, 0x07, 0xc7, 0xb6, 0x5d, 0x11, }}, /* Byte value: 0x03 */ + {{0x78, 0xb7, 0x9b, 0xd6, 0xe0, 0x34, 0xe6, 0xcf, }}, /* Byte value: 0x04 */ + {{0x98, 0xf6, 0xc0, 0x66, 0x89, 0x71, 0xe8, 0x6e, }}, /* Byte value: 0x05 */ + {{0x7a, 0x4b, 0xfe, 0x14, 0x7c, 0x79, 0x4f, 0x31, }}, /* Byte value: 0x06 */ + {{0xa6, 0xb0, 0x09, 0xcf, 0x65, 0x26, 0x32, 0x16, }}, /* Byte value: 0x07 */ + {{0x2f, 0xd4, 0xb4, 0x17, 0xc8, 0xbd, 0x6e, 0xfb, }}, /* Byte value: 0x08 */ + {{0x2b, 0xef, 0x7e, 0x50, 0x33, 0x27, 0xff, 0xc4, }}, /* Byte value: 0x09 */ + {{0x26, 0xdc, 0x30, 0xf8, 0xb3, 0x8d, 0x3a, 0xfa, }}, /* Byte value: 0x0a */ + {{0xc5, 0x1f, 0xdd, 0xeb, 0x08, 0x42, 0x28, 0xda, }}, /* Byte value: 0x0b */ + {{0xf8, 0xdb, 0xa2, 0xe1, 0x36, 0x9f, 0xee, 0x23, }}, /* Byte value: 0x0c */ + {{0x22, 0xe7, 0xfa, 0xbf, 0x48, 0x17, 0xab, 0xc5, }}, /* Byte value: 0x0d */ + {{0x24, 0x20, 0x55, 0x3a, 0x2f, 0xc0, 0x93, 0x04, }}, /* Byte value: 0x0e */ + {{0x60, 0x2d, 0x62, 0x87, 0xbf, 0xee, 0x06, 0x4d, }}, /* Byte value: 0x0f */ + {{0xad, 0x44, 0xe8, 0xe2, 0x82, 0x5b, 0xcf, 0xe9, }}, /* Byte value: 0x10 */ + {{0x49, 0x3e, 0x79, 0x15, 0x10, 0x84, 0x50, 0x77, }}, /* Byte value: 0x11 */ + {{0x7c, 0x8c, 0x51, 0x91, 0x1b, 0xae, 0x77, 0xf0, }}, /* Byte value: 0x12 */ + {{0xcc, 0x17, 0x59, 0x04, 0x73, 0x72, 0x7c, 0xdb, }}, /* Byte value: 0x13 */ + {{0x81, 0x12, 0xea, 0x56, 0x98, 0x6c, 0xbd, 0x93, }}, /* Byte value: 0x14 */ + {{0x9d, 0xb3, 0xd9, 0x40, 0x3c, 0x2c, 0xcc, 0x2e, }}, /* Byte value: 0x15 */ + {{0xdb, 0x42, 0x8b, 0x3f, 0x30, 0x4f, 0xf0, 0x99, }}, /* Byte value: 0x16 */ + {{0x23, 0x99, 0x29, 0xde, 0x06, 0xd0, 0x1e, 0xba, }}, /* Byte value: 0x17 */ + {{0xaf, 0xb8, 0x8d, 0x20, 0x1e, 0x16, 0x66, 0x17, }}, /* Byte value: 0x18 */ + {{0x45, 0x73, 0xe4, 0xdc, 0xde, 0xe9, 0x20, 0x36, }}, /* Byte value: 0x19 */ + {{0x75, 0x84, 0xd5, 0x7e, 0x60, 0x9e, 0x23, 0xf1, }}, /* Byte value: 0x1a */ + {{0x2a, 0x91, 0xad, 0x31, 0x7d, 0xe0, 0x4a, 0xbb, }}, /* Byte value: 0x1b */ + {{0xb4, 0xa0, 0xc2, 0xd2, 0x93, 0x46, 0x9a, 0x14, }}, /* Byte value: 0x1c */ + {{0x6a, 0xa7, 0x50, 0xcb, 0x16, 0x54, 0x4e, 0xcd, }}, /* Byte value: 0x1d */ + {{0xe2, 0xbd, 0x3e, 0x72, 0xf5, 0x08, 0xa7, 0x5f, }}, /* Byte value: 0x1e */ + {{0x06, 0xc7, 0xaf, 0x85, 0x67, 0xd7, 0x38, 0xc1, }}, /* Byte value: 0x1f */ + {{0x3d, 0xc4, 0x7f, 0x0a, 0x3e, 0xdd, 0xc6, 0xf9, }}, /* Byte value: 0x20 */ + {{0xd8, 0xc0, 0x3d, 0x9c, 0xe2, 0xc5, 0xec, 0x18, }}, /* Byte value: 0x21 */ + {{0xcb, 0xae, 0x25, 0xe0, 0x5a, 0x62, 0xf1, 0x65, }}, /* Byte value: 0x22 */ + {{0xcf, 0x95, 0xef, 0xa7, 0xa1, 0xf8, 0x60, 0x5a, }}, /* Byte value: 0x23 */ + {{0xfe, 0x1c, 0x0d, 0x64, 0x51, 0x48, 0xd6, 0xe2, }}, /* Byte value: 0x24 */ + {{0xf9, 0xa5, 0x71, 0x80, 0x78, 0x58, 0x5b, 0x5c, }}, /* Byte value: 0x25 */ + {{0x9b, 0x74, 0x76, 0xc5, 0x5b, 0xfb, 0xf4, 0xef, }}, /* Byte value: 0x26 */ + {{0xea, 0xcb, 0x69, 0xfc, 0xc0, 0xff, 0x46, 0x21, }}, /* Byte value: 0x27 */ + {{0x03, 0x82, 0xb6, 0xa3, 0xd2, 0x8a, 0x1c, 0x81, }}, /* Byte value: 0x28 */ + {{0xfc, 0xe0, 0x68, 0xa6, 0xcd, 0x05, 0x7f, 0x1c, }}, /* Byte value: 0x29 */ + {{0x1f, 0x23, 0x85, 0xb5, 0x76, 0xca, 0x6d, 0x3c, }}, /* Byte value: 0x2a */ + {{0x17, 0x55, 0xd2, 0x3b, 0x43, 0x3d, 0x8c, 0x42, }}, /* Byte value: 0x2b */ + {{0x59, 0xd2, 0xd7, 0xca, 0x7a, 0xa9, 0x51, 0x8b, }}, /* Byte value: 0x2c */ + {{0x09, 0x08, 0x84, 0xef, 0x7b, 0x30, 0x54, 0x01, }}, /* Byte value: 0x2d */ + {{0x74, 0xfa, 0x06, 0x1f, 0x2e, 0x59, 0x96, 0x8e, }}, /* Byte value: 0x2e */ + {{0x72, 0x3d, 0xa9, 0x9a, 0x49, 0x8e, 0xae, 0x4f, }}, /* Byte value: 0x2f */ + {{0x2d, 0x28, 0xd1, 0xd5, 0x54, 0xf0, 0xc7, 0x05, }}, /* Byte value: 0x30 */ + {{0x2e, 0xaa, 0x67, 0x76, 0x86, 0x7a, 0xdb, 0x84, }}, /* Byte value: 0x31 */ + {{0x12, 0x10, 0xcb, 0x1d, 0xf6, 0x60, 0xa8, 0x02, }}, /* Byte value: 0x32 */ + {{0x97, 0x39, 0xeb, 0x0c, 0x95, 0x96, 0x84, 0xae, }}, /* Byte value: 0x33 */ + {{0xf7, 0x14, 0x89, 0x8b, 0x2a, 0x78, 0x82, 0xe3, }}, /* Byte value: 0x34 */ + {{0xbc, 0xd6, 0x95, 0x5c, 0xa6, 0xb1, 0x7b, 0x6a, }}, /* Byte value: 0x35 */ + {{0x7d, 0xf2, 0x82, 0xf0, 0x55, 0x69, 0xc2, 0x8f, }}, /* Byte value: 0x36 */ + {{0xe9, 0x49, 0xdf, 0x5f, 0x12, 0x75, 0x5a, 0xa0, }}, /* Byte value: 0x37 */ + {{0x36, 0x30, 0x9e, 0x27, 0xd9, 0xa0, 0x3b, 0x06, }}, /* Byte value: 0x38 */ + {{0x53, 0x58, 0xe5, 0x86, 0xd3, 0x13, 0x19, 0x0b, }}, /* Byte value: 0x39 */ + {{0x89, 0x64, 0xbd, 0xd8, 0xad, 0x9b, 0x5c, 0xed, }}, /* Byte value: 0x3a */ + {{0xd2, 0x4a, 0x0f, 0xd0, 0x4b, 0x7f, 0xa4, 0x98, }}, /* Byte value: 0x3b */ + {{0x01, 0x7e, 0xd3, 0x61, 0x4e, 0xc7, 0xb5, 0x7f, }}, /* Byte value: 0x3c */ + {{0xbb, 0x6f, 0xe9, 0xb8, 0x8f, 0xa1, 0xf6, 0xd4, }}, /* Byte value: 0x3d */ + {{0x84, 0x57, 0xf3, 0x70, 0x2d, 0x31, 0x99, 0xd3, }}, /* Byte value: 0x3e */ + {{0xe7, 0xf8, 0x27, 0x54, 0x40, 0x55, 0x83, 0x1f, }}, /* Byte value: 0x3f */ + {{0xbf, 0x54, 0x23, 0xff, 0x74, 0x3b, 0x67, 0xeb, }}, /* Byte value: 0x40 */ + {{0x57, 0x63, 0x2f, 0xc1, 0x28, 0x89, 0x88, 0x34, }}, /* Byte value: 0x41 */ + {{0x8f, 0xa3, 0x12, 0x5d, 0xca, 0x4c, 0x64, 0x2c, }}, /* Byte value: 0x42 */ + {{0x9c, 0xcd, 0x0a, 0x21, 0x72, 0xeb, 0x79, 0x51, }}, /* Byte value: 0x43 */ + {{0xb6, 0x5c, 0xa7, 0x10, 0x0f, 0x0b, 0x33, 0xea, }}, /* Byte value: 0x44 */ + {{0x47, 0x8f, 0x81, 0x1e, 0x42, 0xa4, 0x89, 0xc8, }}, /* Byte value: 0x45 */ + {{0x4d, 0x05, 0xb3, 0x52, 0xeb, 0x1e, 0xc1, 0x48, }}, /* Byte value: 0x46 */ + {{0xba, 0x11, 0x3a, 0xd9, 0xc1, 0x66, 0x43, 0xab, }}, /* Byte value: 0x47 */ + {{0x6e, 0x9c, 0x9a, 0x8c, 0xed, 0xce, 0xdf, 0xf2, }}, /* Byte value: 0x48 */ + {{0xb9, 0x93, 0x8c, 0x7a, 0x13, 0xec, 0x5f, 0x2a, }}, /* Byte value: 0x49 */ + {{0xae, 0xc6, 0x5e, 0x41, 0x50, 0xd1, 0xd3, 0x68, }}, /* Byte value: 0x4a */ + {{0xfb, 0x59, 0x14, 0x42, 0xe4, 0x15, 0xf2, 0xa2, }}, /* Byte value: 0x4b */ + {{0x19, 0xe4, 0x2a, 0x30, 0x11, 0x1d, 0x55, 0xfd, }}, /* Byte value: 0x4c */ + {{0x29, 0x13, 0x1b, 0x92, 0xaf, 0x6a, 0x56, 0x3a, }}, /* Byte value: 0x4d */ + {{0x71, 0xbf, 0x1f, 0x39, 0x9b, 0x04, 0xb2, 0xce, }}, /* Byte value: 0x4e */ + {{0x63, 0xaf, 0xd4, 0x24, 0x6d, 0x64, 0x1a, 0xcc, }}, /* Byte value: 0x4f */ + {{0x54, 0xe1, 0x99, 0x62, 0xfa, 0x03, 0x94, 0xb5, }}, /* Byte value: 0x50 */ + {{0x76, 0x06, 0x63, 0xdd, 0xb2, 0x14, 0x3f, 0x70, }}, /* Byte value: 0x51 */ + {{0x7e, 0x70, 0x34, 0x53, 0x87, 0xe3, 0xde, 0x0e, }}, /* Byte value: 0x52 */ + {{0xa3, 0xf5, 0x10, 0xe9, 0xd0, 0x7b, 0x16, 0x56, }}, /* Byte value: 0x53 */ + {{0x48, 0x40, 0xaa, 0x74, 0x5e, 0x43, 0xe5, 0x08, }}, /* Byte value: 0x54 */ + {{0x6c, 0x60, 0xff, 0x4e, 0x71, 0x83, 0x76, 0x0c, }}, /* Byte value: 0x55 */ + {{0x40, 0x36, 0xfd, 0xfa, 0x6b, 0xb4, 0x04, 0x76, }}, /* Byte value: 0x56 */ + {{0x82, 0x90, 0x5c, 0xf5, 0x4a, 0xe6, 0xa1, 0x12, }}, /* Byte value: 0x57 */ + {{0x0e, 0xb1, 0xf8, 0x0b, 0x52, 0x20, 0xd9, 0xbf, }}, /* Byte value: 0x58 */ + {{0x64, 0x16, 0xa8, 0xc0, 0x44, 0x74, 0x97, 0x72, }}, /* Byte value: 0x59 */ + {{0x8b, 0x98, 0xd8, 0x1a, 0x31, 0xd6, 0xf5, 0x13, }}, /* Byte value: 0x5a */ + {{0x3a, 0x7d, 0x03, 0xee, 0x17, 0xcd, 0x4b, 0x47, }}, /* Byte value: 0x5b */ + {{0xf6, 0x6a, 0x5a, 0xea, 0x64, 0xbf, 0x37, 0x9c, }}, /* Byte value: 0x5c */ + {{0x46, 0xf1, 0x52, 0x7f, 0x0c, 0x63, 0x3c, 0xb7, }}, /* Byte value: 0x5d */ + {{0xf0, 0xad, 0xf5, 0x6f, 0x03, 0x68, 0x0f, 0x5d, }}, /* Byte value: 0x5e */ + {{0x35, 0xb2, 0x28, 0x84, 0x0b, 0x2a, 0x27, 0x87, }}, /* Byte value: 0x5f */ + {{0xbd, 0xa8, 0x46, 0x3d, 0xe8, 0x76, 0xce, 0x15, }}, /* Byte value: 0x60 */ + {{0xe0, 0x41, 0x5b, 0xb0, 0x69, 0x45, 0x0e, 0xa1, }}, /* Byte value: 0x61 */ + {{0xac, 0x3a, 0x3b, 0x83, 0xcc, 0x9c, 0x7a, 0x96, }}, /* Byte value: 0x62 */ + {{0xa2, 0x8b, 0xc3, 0x88, 0x9e, 0xbc, 0xa3, 0x29, }}, /* Byte value: 0x63 */ + {{0x90, 0x80, 0x97, 0xe8, 0xbc, 0x86, 0x09, 0x10, }}, /* Byte value: 0x64 */ + {{0x25, 0x5e, 0x86, 0x5b, 0x61, 0x07, 0x26, 0x7b, }}, /* Byte value: 0x65 */ + {{0xc0, 0x5a, 0xc4, 0xcd, 0xbd, 0x1f, 0x0c, 0x9a, }}, /* Byte value: 0x66 */ + {{0x30, 0xf7, 0x31, 0xa2, 0xbe, 0x77, 0x03, 0xc7, }}, /* Byte value: 0x67 */ + {{0x67, 0x94, 0x1e, 0x63, 0x96, 0xfe, 0x8b, 0xf3, }}, /* Byte value: 0x68 */ + {{0x93, 0x02, 0x21, 0x4b, 0x6e, 0x0c, 0x15, 0x91, }}, /* Byte value: 0x69 */ + {{0x3e, 0x46, 0xc9, 0xa9, 0xec, 0x57, 0xda, 0x78, }}, /* Byte value: 0x6a */ + {{0x91, 0xfe, 0x44, 0x89, 0xf2, 0x41, 0xbc, 0x6f, }}, /* Byte value: 0x6b */ + {{0xff, 0x62, 0xde, 0x05, 0x1f, 0x8f, 0x63, 0x9d, }}, /* Byte value: 0x6c */ + {{0xe4, 0x7a, 0x91, 0xf7, 0x92, 0xdf, 0x9f, 0x9e, }}, /* Byte value: 0x6d */ + {{0x6b, 0xd9, 0x83, 0xaa, 0x58, 0x93, 0xfb, 0xb2, }}, /* Byte value: 0x6e */ + {{0x70, 0xc1, 0xcc, 0x58, 0xd5, 0xc3, 0x07, 0xb1, }}, /* Byte value: 0x6f */ + {{0x61, 0x53, 0xb1, 0xe6, 0xf1, 0x29, 0xb3, 0x32, }}, /* Byte value: 0x70 */ + {{0x5b, 0x2e, 0xb2, 0x08, 0xe6, 0xe4, 0xf8, 0x75, }}, /* Byte value: 0x71 */ + {{0xd1, 0xc8, 0xb9, 0x73, 0x99, 0xf5, 0xb8, 0x19, }}, /* Byte value: 0x72 */ + {{0x16, 0x2b, 0x01, 0x5a, 0x0d, 0xfa, 0x39, 0x3d, }}, /* Byte value: 0x73 */ + {{0x0b, 0xf4, 0xe1, 0x2d, 0xe7, 0x7d, 0xfd, 0xff, }}, /* Byte value: 0x74 */ + {{0x5e, 0x6b, 0xab, 0x2e, 0x53, 0xb9, 0xdc, 0x35, }}, /* Byte value: 0x75 */ + {{0x50, 0xda, 0x53, 0x25, 0x01, 0x99, 0x05, 0x8a, }}, /* Byte value: 0x76 */ + {{0x08, 0x76, 0x57, 0x8e, 0x35, 0xf7, 0xe1, 0x7e, }}, /* Byte value: 0x77 */ + {{0x83, 0xee, 0x8f, 0x94, 0x04, 0x21, 0x14, 0x6d, }}, /* Byte value: 0x78 */ + {{0xb1, 0xe5, 0xdb, 0xf4, 0x26, 0x1b, 0xbe, 0x54, }}, /* Byte value: 0x79 */ + {{0x39, 0xff, 0xb5, 0x4d, 0xc5, 0x47, 0x57, 0xc6, }}, /* Byte value: 0x7a */ + {{0x0a, 0x8a, 0x32, 0x4c, 0xa9, 0xba, 0x48, 0x80, }}, /* Byte value: 0x7b */ + {{0x14, 0xd7, 0x64, 0x98, 0x91, 0xb7, 0x90, 0xc3, }}, /* Byte value: 0x7c */ + {{0x1c, 0xa1, 0x33, 0x16, 0xa4, 0x40, 0x71, 0xbd, }}, /* Byte value: 0x7d */ + {{0x65, 0x68, 0x7b, 0xa1, 0x0a, 0xb3, 0x22, 0x0d, }}, /* Byte value: 0x7e */ + {{0xaa, 0xfd, 0x94, 0x06, 0xab, 0x4b, 0x42, 0x57, }}, /* Byte value: 0x7f */ + {{0xe8, 0x37, 0x0c, 0x3e, 0x5c, 0xb2, 0xef, 0xdf, }}, /* Byte value: 0x80 */ + {{0x51, 0xa4, 0x80, 0x44, 0x4f, 0x5e, 0xb0, 0xf5, }}, /* Byte value: 0x81 */ + {{0xc7, 0xe3, 0xb8, 0x29, 0x94, 0x0f, 0x81, 0x24, }}, /* Byte value: 0x82 */ + {{0xa8, 0x01, 0xf1, 0xc4, 0x37, 0x06, 0xeb, 0xa9, }}, /* Byte value: 0x83 */ + {{0x0d, 0x33, 0x4e, 0xa8, 0x80, 0xaa, 0xc5, 0x3e, }}, /* Byte value: 0x84 */ + {{0xa1, 0x09, 0x75, 0x2b, 0x4c, 0x36, 0xbf, 0xa8, }}, /* Byte value: 0x85 */ + {{0x1e, 0x5d, 0x56, 0xd4, 0x38, 0x0d, 0xd8, 0x43, }}, /* Byte value: 0x86 */ + {{0x4e, 0x87, 0x05, 0xf1, 0x39, 0x94, 0xdd, 0xc9, }}, /* Byte value: 0x87 */ + {{0xa0, 0x77, 0xa6, 0x4a, 0x02, 0xf1, 0x0a, 0xd7, }}, /* Byte value: 0x88 */ + {{0x37, 0x4e, 0x4d, 0x46, 0x97, 0x67, 0x8e, 0x79, }}, /* Byte value: 0x89 */ + {{0xa9, 0x7f, 0x22, 0xa5, 0x79, 0xc1, 0x5e, 0xd6, }}, /* Byte value: 0x8a */ + {{0x4a, 0xbc, 0xcf, 0xb6, 0xc2, 0x0e, 0x4c, 0xf6, }}, /* Byte value: 0x8b */ + {{0x1a, 0x66, 0x9c, 0x93, 0xc3, 0x97, 0x49, 0x7c, }}, /* Byte value: 0x8c */ + {{0xf1, 0xd3, 0x26, 0x0e, 0x4d, 0xaf, 0xba, 0x22, }}, /* Byte value: 0x8d */ + {{0x38, 0x81, 0x66, 0x2c, 0x8b, 0x80, 0xe2, 0xb9, }}, /* Byte value: 0x8e */ + {{0x1b, 0x18, 0x4f, 0xf2, 0x8d, 0x50, 0xfc, 0x03, }}, /* Byte value: 0x8f */ + {{0xec, 0x0c, 0xc6, 0x79, 0xa7, 0x28, 0x7e, 0xe0, }}, /* Byte value: 0x90 */ + {{0x77, 0x78, 0xb0, 0xbc, 0xfc, 0xd3, 0x8a, 0x0f, }}, /* Byte value: 0x91 */ + {{0x80, 0x6c, 0x39, 0x37, 0xd6, 0xab, 0x08, 0xec, }}, /* Byte value: 0x92 */ + {{0xe1, 0x3f, 0x88, 0xd1, 0x27, 0x82, 0xbb, 0xde, }}, /* Byte value: 0x93 */ + {{0x2c, 0x56, 0x02, 0xb4, 0x1a, 0x37, 0x72, 0x7a, }}, /* Byte value: 0x94 */ + {{0xbe, 0x2a, 0xf0, 0x9e, 0x3a, 0xfc, 0xd2, 0x94, }}, /* Byte value: 0x95 */ + {{0x79, 0xc9, 0x48, 0xb7, 0xae, 0xf3, 0x53, 0xb0, }}, /* Byte value: 0x96 */ + {{0x15, 0xa9, 0xb7, 0xf9, 0xdf, 0x70, 0x25, 0xbc, }}, /* Byte value: 0x97 */ + {{0xf3, 0x2f, 0x43, 0xcc, 0xd1, 0xe2, 0x13, 0xdc, }}, /* Byte value: 0x98 */ + {{0xa4, 0x4c, 0x6c, 0x0d, 0xf9, 0x6b, 0x9b, 0xe8, }}, /* Byte value: 0x99 */ + {{0xab, 0x83, 0x47, 0x67, 0xe5, 0x8c, 0xf7, 0x28, }}, /* Byte value: 0x9a */ + {{0x95, 0xc5, 0x8e, 0xce, 0x09, 0xdb, 0x2d, 0x50, }}, /* Byte value: 0x9b */ + {{0x7b, 0x35, 0x2d, 0x75, 0x32, 0xbe, 0xfa, 0x4e, }}, /* Byte value: 0x9c */ + {{0x68, 0x5b, 0x35, 0x09, 0x8a, 0x19, 0xe7, 0x33, }}, /* Byte value: 0x9d */ + {{0x5a, 0x50, 0x61, 0x69, 0xa8, 0x23, 0x4d, 0x0a, }}, /* Byte value: 0x9e */ + {{0x5f, 0x15, 0x78, 0x4f, 0x1d, 0x7e, 0x69, 0x4a, }}, /* Byte value: 0x9f */ + {{0xd6, 0x71, 0xc5, 0x97, 0xb0, 0xe5, 0x35, 0xa7, }}, /* Byte value: 0xa0 */ + {{0xa5, 0x32, 0xbf, 0x6c, 0xb7, 0xac, 0x2e, 0x97, }}, /* Byte value: 0xa1 */ + {{0xe6, 0x86, 0xf4, 0x35, 0x0e, 0x92, 0x36, 0x60, }}, /* Byte value: 0xa2 */ + {{0x6d, 0x1e, 0x2c, 0x2f, 0x3f, 0x44, 0xc3, 0x73, }}, /* Byte value: 0xa3 */ + {{0xee, 0xf0, 0xa3, 0xbb, 0x3b, 0x65, 0xd7, 0x1e, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0xf4, 0x96, 0x3f, 0x28, 0xf8, 0xf2, 0x9e, 0x62, }}, /* Byte value: 0xa6 */ + {{0x21, 0x65, 0x4c, 0x1c, 0x9a, 0x9d, 0xb7, 0x44, }}, /* Byte value: 0xa7 */ + {{0xca, 0xd0, 0xf6, 0x81, 0x14, 0xa5, 0x44, 0x1a, }}, /* Byte value: 0xa8 */ + {{0x31, 0x89, 0xe2, 0xc3, 0xf0, 0xb0, 0xb6, 0xb8, }}, /* Byte value: 0xa9 */ + {{0x3b, 0x03, 0xd0, 0x8f, 0x59, 0x0a, 0xfe, 0x38, }}, /* Byte value: 0xaa */ + {{0x18, 0x9a, 0xf9, 0x51, 0x5f, 0xda, 0xe0, 0x82, }}, /* Byte value: 0xab */ + {{0xc2, 0xa6, 0xa1, 0x0f, 0x21, 0x52, 0xa5, 0x64, }}, /* Byte value: 0xac */ + {{0xed, 0x72, 0x15, 0x18, 0xe9, 0xef, 0xcb, 0x9f, }}, /* Byte value: 0xad */ + {{0xd5, 0xf3, 0x73, 0x34, 0x62, 0x6f, 0x29, 0x26, }}, /* Byte value: 0xae */ + {{0x0c, 0x4d, 0x9d, 0xc9, 0xce, 0x6d, 0x70, 0x41, }}, /* Byte value: 0xaf */ + {{0x8c, 0x21, 0xa4, 0xfe, 0x18, 0xc6, 0x78, 0xad, }}, /* Byte value: 0xb0 */ + {{0x28, 0x6d, 0xc8, 0xf3, 0xe1, 0xad, 0xe3, 0x45, }}, /* Byte value: 0xb1 */ + {{0x33, 0x75, 0x87, 0x01, 0x6c, 0xfd, 0x1f, 0x46, }}, /* Byte value: 0xb2 */ + {{0x88, 0x1a, 0x6e, 0xb9, 0xe3, 0x5c, 0xe9, 0x92, }}, /* Byte value: 0xb3 */ + {{0xdc, 0xfb, 0xf7, 0xdb, 0x19, 0x5f, 0x7d, 0x27, }}, /* Byte value: 0xb4 */ + {{0xeb, 0xb5, 0xba, 0x9d, 0x8e, 0x38, 0xf3, 0x5e, }}, /* Byte value: 0xb5 */ + {{0xb8, 0xed, 0x5f, 0x1b, 0x5d, 0x2b, 0xea, 0x55, }}, /* Byte value: 0xb6 */ + {{0x94, 0xbb, 0x5d, 0xaf, 0x47, 0x1c, 0x98, 0x2f, }}, /* Byte value: 0xb7 */ + {{0x66, 0xea, 0xcd, 0x02, 0xd8, 0x39, 0x3e, 0x8c, }}, /* Byte value: 0xb8 */ + {{0xf2, 0x51, 0x90, 0xad, 0x9f, 0x25, 0xa6, 0xa3, }}, /* Byte value: 0xb9 */ + {{0xc4, 0x61, 0x0e, 0x8a, 0x46, 0x85, 0x9d, 0xa5, }}, /* Byte value: 0xba */ + {{0x13, 0x6e, 0x18, 0x7c, 0xb8, 0xa7, 0x1d, 0x7d, }}, /* Byte value: 0xbb */ + {{0xa7, 0xce, 0xda, 0xae, 0x2b, 0xe1, 0x87, 0x69, }}, /* Byte value: 0xbc */ + {{0xb2, 0x67, 0x6d, 0x57, 0xf4, 0x91, 0xa2, 0xd5, }}, /* Byte value: 0xbd */ + {{0xb7, 0x22, 0x74, 0x71, 0x41, 0xcc, 0x86, 0x95, }}, /* Byte value: 0xbe */ + {{0x20, 0x1b, 0x9f, 0x7d, 0xd4, 0x5a, 0x02, 0x3b, }}, /* Byte value: 0xbf */ + {{0x3f, 0x38, 0x1a, 0xc8, 0xa2, 0x90, 0x6f, 0x07, }}, /* Byte value: 0xc0 */ + {{0xdd, 0x85, 0x24, 0xba, 0x57, 0x98, 0xc8, 0x58, }}, /* Byte value: 0xc1 */ + {{0x62, 0xd1, 0x07, 0x45, 0x23, 0xa3, 0xaf, 0xb3, }}, /* Byte value: 0xc2 */ + {{0x05, 0x45, 0x19, 0x26, 0xb5, 0x5d, 0x24, 0x40, }}, /* Byte value: 0xc3 */ + {{0x3c, 0xba, 0xac, 0x6b, 0x70, 0x1a, 0x73, 0x86, }}, /* Byte value: 0xc4 */ + {{0x85, 0x29, 0x20, 0x11, 0x63, 0xf6, 0x2c, 0xac, }}, /* Byte value: 0xc5 */ + {{0xf5, 0xe8, 0xec, 0x49, 0xb6, 0x35, 0x2b, 0x1d, }}, /* Byte value: 0xc6 */ + {{0x43, 0xb4, 0x4b, 0x59, 0xb9, 0x3e, 0x18, 0xf7, }}, /* Byte value: 0xc7 */ + {{0x73, 0x43, 0x7a, 0xfb, 0x07, 0x49, 0x1b, 0x30, }}, /* Byte value: 0xc8 */ + {{0x4c, 0x7b, 0x60, 0x33, 0xa5, 0xd9, 0x74, 0x37, }}, /* Byte value: 0xc9 */ + {{0xb5, 0xde, 0x11, 0xb3, 0xdd, 0x81, 0x2f, 0x6b, }}, /* Byte value: 0xca */ + {{0xc8, 0x2c, 0x93, 0x43, 0x88, 0xe8, 0xed, 0xe4, }}, /* Byte value: 0xcb */ + {{0x42, 0xca, 0x98, 0x38, 0xf7, 0xf9, 0xad, 0x88, }}, /* Byte value: 0xcc */ + {{0xde, 0x07, 0x92, 0x19, 0x85, 0x12, 0xd4, 0xd9, }}, /* Byte value: 0xcd */ + {{0xd3, 0x34, 0xdc, 0xb1, 0x05, 0xb8, 0x11, 0xe7, }}, /* Byte value: 0xce */ + {{0x4b, 0xc2, 0x1c, 0xd7, 0x8c, 0xc9, 0xf9, 0x89, }}, /* Byte value: 0xcf */ + {{0xe5, 0x04, 0x42, 0x96, 0xdc, 0x18, 0x2a, 0xe1, }}, /* Byte value: 0xd0 */ + {{0xc3, 0xd8, 0x72, 0x6e, 0x6f, 0x95, 0x10, 0x1b, }}, /* Byte value: 0xd1 */ + {{0x11, 0x92, 0x7d, 0xbe, 0x24, 0xea, 0xb4, 0x83, }}, /* Byte value: 0xd2 */ + {{0x44, 0x0d, 0x37, 0xbd, 0x90, 0x2e, 0x95, 0x49, }}, /* Byte value: 0xd3 */ + {{0x69, 0x25, 0xe6, 0x68, 0xc4, 0xde, 0x52, 0x4c, }}, /* Byte value: 0xd4 */ + {{0x04, 0x3b, 0xca, 0x47, 0xfb, 0x9a, 0x91, 0x3f, }}, /* Byte value: 0xd5 */ + {{0x34, 0xcc, 0xfb, 0xe5, 0x45, 0xed, 0x92, 0xf8, }}, /* Byte value: 0xd6 */ + {{0x02, 0xfc, 0x65, 0xc2, 0x9c, 0x4d, 0xa9, 0xfe, }}, /* Byte value: 0xd7 */ + {{0x6f, 0xe2, 0x49, 0xed, 0xa3, 0x09, 0x6a, 0x8d, }}, /* Byte value: 0xd8 */ + {{0x8e, 0xdd, 0xc1, 0x3c, 0x84, 0x8b, 0xd1, 0x53, }}, /* Byte value: 0xd9 */ + {{0xb3, 0x19, 0xbe, 0x36, 0xba, 0x56, 0x17, 0xaa, }}, /* Byte value: 0xda */ + {{0x9a, 0x0a, 0xa5, 0xa4, 0x15, 0x3c, 0x41, 0x90, }}, /* Byte value: 0xdb */ + {{0x55, 0x9f, 0x4a, 0x03, 0xb4, 0xc4, 0x21, 0xca, }}, /* Byte value: 0xdc */ + {{0xd7, 0x0f, 0x16, 0xf6, 0xfe, 0x22, 0x80, 0xd8, }}, /* Byte value: 0xdd */ + {{0x27, 0xa2, 0xe3, 0x99, 0xfd, 0x4a, 0x8f, 0x85, }}, /* Byte value: 0xde */ + {{0xef, 0x8e, 0x70, 0xda, 0x75, 0xa2, 0x62, 0x61, }}, /* Byte value: 0xdf */ + {{0xe3, 0xc3, 0xed, 0x13, 0xbb, 0xcf, 0x12, 0x20, }}, /* Byte value: 0xe0 */ + {{0x7f, 0x0e, 0xe7, 0x32, 0xc9, 0x24, 0x6b, 0x71, }}, /* Byte value: 0xe1 */ + {{0xd9, 0xbe, 0xee, 0xfd, 0xac, 0x02, 0x59, 0x67, }}, /* Byte value: 0xe2 */ + {{0xcd, 0x69, 0x8a, 0x65, 0x3d, 0xb5, 0xc9, 0xa4, }}, /* Byte value: 0xe3 */ + {{0x86, 0xab, 0x96, 0xb2, 0xb1, 0x7c, 0x30, 0x2d, }}, /* Byte value: 0xe4 */ + {{0xb0, 0x9b, 0x08, 0x95, 0x68, 0xdc, 0x0b, 0x2b, }}, /* Byte value: 0xe5 */ + {{0x41, 0x48, 0x2e, 0x9b, 0x25, 0x73, 0xb1, 0x09, }}, /* Byte value: 0xe6 */ + {{0xc6, 0x9d, 0x6b, 0x48, 0xda, 0xc8, 0x34, 0x5b, }}, /* Byte value: 0xe7 */ + {{0x5c, 0x97, 0xce, 0xec, 0xcf, 0xf4, 0x75, 0xcb, }}, /* Byte value: 0xe8 */ + {{0xc9, 0x52, 0x40, 0x22, 0xc6, 0x2f, 0x58, 0x9b, }}, /* Byte value: 0xe9 */ + {{0xce, 0xeb, 0x3c, 0xc6, 0xef, 0x3f, 0xd5, 0x25, }}, /* Byte value: 0xea */ + {{0x9f, 0x4f, 0xbc, 0x82, 0xa0, 0x61, 0x65, 0xd0, }}, /* Byte value: 0xeb */ + {{0x07, 0xb9, 0x7c, 0xe4, 0x29, 0x10, 0x8d, 0xbe, }}, /* Byte value: 0xec */ + {{0xc1, 0x24, 0x17, 0xac, 0xf3, 0xd8, 0xb9, 0xe5, }}, /* Byte value: 0xed */ + {{0x8a, 0xe6, 0x0b, 0x7b, 0x7f, 0x11, 0x40, 0x6c, }}, /* Byte value: 0xee */ + {{0x87, 0xd5, 0x45, 0xd3, 0xff, 0xbb, 0x85, 0x52, }}, /* Byte value: 0xef */ + {{0xd4, 0x8d, 0xa0, 0x55, 0x2c, 0xa8, 0x9c, 0x59, }}, /* Byte value: 0xf0 */ + {{0xdf, 0x79, 0x41, 0x78, 0xcb, 0xd5, 0x61, 0xa6, }}, /* Byte value: 0xf1 */ + {{0x52, 0x26, 0x36, 0xe7, 0x9d, 0xd4, 0xac, 0x74, }}, /* Byte value: 0xf2 */ + {{0x8d, 0x5f, 0x77, 0x9f, 0x56, 0x01, 0xcd, 0xd2, }}, /* Byte value: 0xf3 */ + {{0xda, 0x3c, 0x58, 0x5e, 0x7e, 0x88, 0x45, 0xe6, }}, /* Byte value: 0xf4 */ + {{0x58, 0xac, 0x04, 0xab, 0x34, 0x6e, 0xe4, 0xf4, }}, /* Byte value: 0xf5 */ + {{0x5d, 0xe9, 0x1d, 0x8d, 0x81, 0x33, 0xc0, 0xb4, }}, /* Byte value: 0xf6 */ + {{0x0f, 0xcf, 0x2b, 0x6a, 0x1c, 0xe7, 0x6c, 0xc0, }}, /* Byte value: 0xf7 */ + {{0x96, 0x47, 0x38, 0x6d, 0xdb, 0x51, 0x31, 0xd1, }}, /* Byte value: 0xf8 */ + {{0xd0, 0xb6, 0x6a, 0x12, 0xd7, 0x32, 0x0d, 0x66, }}, /* Byte value: 0xf9 */ + {{0x9e, 0x31, 0x6f, 0xe3, 0xee, 0xa6, 0xd0, 0xaf, }}, /* Byte value: 0xfa */ + {{0x1d, 0xdf, 0xe0, 0x77, 0xea, 0x87, 0xc4, 0xc2, }}, /* Byte value: 0xfb */ + {{0x32, 0x0b, 0x54, 0x60, 0x22, 0x3a, 0xaa, 0x39, }}, /* Byte value: 0xfc */ + {{0x56, 0x1d, 0xfc, 0xa0, 0x66, 0x4e, 0x3d, 0x4b, }}, /* Byte value: 0xfd */ + {{0xfd, 0x9e, 0xbb, 0xc7, 0x83, 0xc2, 0xca, 0x63, }}, /* Byte value: 0xfe */ + {{0x4f, 0xf9, 0xd6, 0x90, 0x77, 0x53, 0x68, 0xb6, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 9 */ + {{0xc0, 0x01, 0x6b, 0x3d, 0xc4, 0xa3, 0x83, 0xb4, }}, /* Byte value: 0x00 */ + {{0x17, 0xa0, 0x80, 0x59, 0xd2, 0xde, 0x39, 0xaa, }}, /* Byte value: 0x01 */ + {{0xb2, 0x47, 0xed, 0x28, 0x6d, 0x22, 0x15, 0xce, }}, /* Byte value: 0x02 */ + {{0x63, 0x5d, 0x9a, 0x2f, 0xd4, 0x54, 0xa5, 0x9d, }}, /* Byte value: 0x03 */ + {{0x65, 0xe6, 0x06, 0x4c, 0x7b, 0x5f, 0xaf, 0xd0, }}, /* Byte value: 0x04 */ + {{0x6f, 0xe8, 0x61, 0xe9, 0x49, 0x42, 0xb1, 0x07, }}, /* Byte value: 0x05 */ + {{0x7d, 0x4f, 0x33, 0x03, 0x82, 0x73, 0x87, 0x27, }}, /* Byte value: 0x06 */ + {{0xa4, 0x32, 0x57, 0x80, 0x6c, 0xa0, 0x2f, 0x98, }}, /* Byte value: 0x07 */ + {{0x07, 0x6e, 0xa6, 0x92, 0x7c, 0x57, 0x09, 0xb1, }}, /* Byte value: 0x08 */ + {{0x37, 0xff, 0xcc, 0x0c, 0x4d, 0x0f, 0x59, 0x9c, }}, /* Byte value: 0x09 */ + {{0x6b, 0x3a, 0x89, 0xab, 0x83, 0xf1, 0xbd, 0x71, }}, /* Byte value: 0x0a */ + {{0x75, 0x28, 0x20, 0x87, 0xd5, 0xd6, 0x9f, 0xcb, }}, /* Byte value: 0x0b */ + {{0xaa, 0xee, 0xd8, 0x67, 0x94, 0x0e, 0x3d, 0x39, }}, /* Byte value: 0x0c */ + {{0x5b, 0xab, 0xe3, 0x35, 0xb2, 0xa9, 0xed, 0x5c, }}, /* Byte value: 0x0d */ + {{0x73, 0x93, 0xbc, 0xe4, 0x7a, 0xdd, 0x95, 0x86, }}, /* Byte value: 0x0e */ + {{0xc5, 0x06, 0xb9, 0x8e, 0xdd, 0x4c, 0x8c, 0x3e, }}, /* Byte value: 0x0f */ + {{0xd0, 0xcf, 0x4d, 0xf6, 0x6a, 0x2a, 0xb3, 0xaf, }}, /* Byte value: 0x10 */ + {{0xea, 0x50, 0x40, 0xcd, 0x69, 0x6f, 0xfd, 0x55, }}, /* Byte value: 0x11 */ + {{0x55, 0x77, 0x6c, 0xd2, 0x4a, 0x07, 0xff, 0xfd, }}, /* Byte value: 0x12 */ + {{0x19, 0x7c, 0x0f, 0xbe, 0x2a, 0x70, 0x2b, 0x0b, }}, /* Byte value: 0x13 */ + {{0xc3, 0xbd, 0x25, 0xed, 0x72, 0x47, 0x86, 0x73, }}, /* Byte value: 0x14 */ + {{0x53, 0xcc, 0xf0, 0xb1, 0xe5, 0x0c, 0xf5, 0xb0, }}, /* Byte value: 0x15 */ + {{0xfd, 0xf0, 0xc0, 0x94, 0xbb, 0xb1, 0xc4, 0xff, }}, /* Byte value: 0x16 */ + {{0x57, 0x1e, 0x18, 0xf3, 0x2f, 0xbf, 0xf9, 0xc6, }}, /* Byte value: 0x17 */ + {{0xc8, 0x66, 0x78, 0xb9, 0x93, 0x06, 0x9b, 0x58, }}, /* Byte value: 0x18 */ + {{0xba, 0x20, 0xfe, 0xac, 0x3a, 0x87, 0x0d, 0x22, }}, /* Byte value: 0x19 */ + {{0x39, 0x23, 0x43, 0xeb, 0xb5, 0xa1, 0x4b, 0x3d, }}, /* Byte value: 0x1a */ + {{0x3b, 0x4a, 0x37, 0xca, 0xd0, 0x19, 0x4d, 0x06, }}, /* Byte value: 0x1b */ + {{0x7c, 0x9a, 0x09, 0xf2, 0x51, 0x2f, 0x84, 0xdb, }}, /* Byte value: 0x1c */ + {{0xbd, 0x4e, 0x58, 0x3e, 0x46, 0xd0, 0x04, 0x93, }}, /* Byte value: 0x1d */ + {{0x12, 0xa7, 0x52, 0xea, 0xcb, 0x31, 0x36, 0x20, }}, /* Byte value: 0x1e */ + {{0x28, 0x38, 0x5f, 0xd1, 0xc8, 0x74, 0x78, 0xda, }}, /* Byte value: 0x1f */ + {{0xdf, 0xc6, 0xf8, 0xe0, 0x41, 0xd8, 0xa2, 0xf2, }}, /* Byte value: 0x20 */ + {{0xe9, 0xec, 0x0e, 0x1d, 0xdf, 0x8b, 0xf8, 0x92, }}, /* Byte value: 0x21 */ + {{0x3d, 0xf1, 0xab, 0xa9, 0x7f, 0x12, 0x47, 0x4b, }}, /* Byte value: 0x22 */ + {{0x0d, 0x60, 0xc1, 0x37, 0x4e, 0x4a, 0x17, 0x66, }}, /* Byte value: 0x23 */ + {{0x82, 0xd6, 0x87, 0xb6, 0x5c, 0x7a, 0x45, 0xe3, }}, /* Byte value: 0x24 */ + {{0xa6, 0x5b, 0x23, 0xa1, 0x09, 0x18, 0x29, 0xa3, }}, /* Byte value: 0x25 */ + {{0x7b, 0xf4, 0xaf, 0x60, 0x2d, 0x78, 0x8d, 0x6a, }}, /* Byte value: 0x26 */ + {{0x72, 0x46, 0x86, 0x15, 0xa9, 0x81, 0x96, 0x7a, }}, /* Byte value: 0x27 */ + {{0x14, 0x1c, 0xce, 0x89, 0x64, 0x3a, 0x3c, 0x6d, }}, /* Byte value: 0x28 */ + {{0x9a, 0x7f, 0xb2, 0xf9, 0xa5, 0x56, 0x6d, 0x14, }}, /* Byte value: 0x29 */ + {{0x84, 0x6d, 0x1b, 0xd5, 0xf3, 0x71, 0x4f, 0xae, }}, /* Byte value: 0x2a */ + {{0xe4, 0x8c, 0xcf, 0x2a, 0x91, 0xc1, 0xef, 0xf4, }}, /* Byte value: 0x2b */ + {{0x2a, 0x51, 0x2b, 0xf0, 0xad, 0xcc, 0x7e, 0xe1, }}, /* Byte value: 0x2c */ + {{0x6c, 0x54, 0x2f, 0x39, 0xff, 0xa6, 0xb4, 0xc0, }}, /* Byte value: 0x2d */ + {{0x35, 0x96, 0xb8, 0x2d, 0x28, 0xb7, 0x5f, 0xa7, }}, /* Byte value: 0x2e */ + {{0x1d, 0xae, 0xe7, 0xfc, 0xe0, 0xc3, 0x27, 0x7d, }}, /* Byte value: 0x2f */ + {{0x1f, 0xc7, 0x93, 0xdd, 0x85, 0x7b, 0x21, 0x46, }}, /* Byte value: 0x30 */ + {{0x0b, 0xdb, 0x5d, 0x54, 0xe1, 0x41, 0x1d, 0x2b, }}, /* Byte value: 0x31 */ + {{0xd8, 0xa8, 0x5e, 0x72, 0x3d, 0x8f, 0xab, 0x43, }}, /* Byte value: 0x32 */ + {{0x2b, 0x84, 0x11, 0x01, 0x7e, 0x90, 0x7d, 0x1d, }}, /* Byte value: 0x33 */ + {{0xee, 0x82, 0xa8, 0x8f, 0xa3, 0xdc, 0xf1, 0x23, }}, /* Byte value: 0x34 */ + {{0x1c, 0x7b, 0xdd, 0x0d, 0x33, 0x9f, 0x24, 0x81, }}, /* Byte value: 0x35 */ + {{0x59, 0xc2, 0x97, 0x14, 0xd7, 0x11, 0xeb, 0x67, }}, /* Byte value: 0x36 */ + {{0x66, 0x5a, 0x48, 0x9c, 0xcd, 0xbb, 0xaa, 0x17, }}, /* Byte value: 0x37 */ + {{0xab, 0x3b, 0xe2, 0x96, 0x47, 0x52, 0x3e, 0xc5, }}, /* Byte value: 0x38 */ + {{0x52, 0x19, 0xca, 0x40, 0x36, 0x50, 0xf6, 0x4c, }}, /* Byte value: 0x39 */ + {{0xa3, 0x5c, 0xf1, 0x12, 0x10, 0xf7, 0x26, 0x29, }}, /* Byte value: 0x3a */ + {{0x91, 0xa4, 0xef, 0xad, 0x44, 0x17, 0x70, 0x3f, }}, /* Byte value: 0x3b */ + {{0x0c, 0xb5, 0xfb, 0xc6, 0x9d, 0x16, 0x14, 0x9a, }}, /* Byte value: 0x3c */ + {{0x38, 0xf6, 0x79, 0x1a, 0x66, 0xfd, 0x48, 0xc1, }}, /* Byte value: 0x3d */ + {{0xff, 0x99, 0xb4, 0xb5, 0xde, 0x09, 0xc2, 0xc4, }}, /* Byte value: 0x3e */ + {{0x2e, 0x83, 0xc3, 0xb2, 0x67, 0x7f, 0x72, 0x97, }}, /* Byte value: 0x3f */ + {{0x08, 0x67, 0x13, 0x84, 0x57, 0xa5, 0x18, 0xec, }}, /* Byte value: 0x40 */ + {{0x62, 0x88, 0xa0, 0xde, 0x07, 0x08, 0xa6, 0x61, }}, /* Byte value: 0x41 */ + {{0x8b, 0x64, 0xae, 0xc3, 0xd8, 0x83, 0x5e, 0xf3, }}, /* Byte value: 0x42 */ + {{0x5f, 0x79, 0x0b, 0x77, 0x78, 0x1a, 0xe1, 0x2a, }}, /* Byte value: 0x43 */ + {{0x64, 0x33, 0x3c, 0xbd, 0xa8, 0x03, 0xac, 0x2c, }}, /* Byte value: 0x44 */ + {{0xa2, 0x89, 0xcb, 0xe3, 0xc3, 0xab, 0x25, 0xd5, }}, /* Byte value: 0x45 */ + {{0xda, 0xc1, 0x2a, 0x53, 0x58, 0x37, 0xad, 0x78, }}, /* Byte value: 0x46 */ + {{0x34, 0x43, 0x82, 0xdc, 0xfb, 0xeb, 0x5c, 0x5b, }}, /* Byte value: 0x47 */ + {{0x8d, 0xdf, 0x32, 0xa0, 0x77, 0x88, 0x54, 0xbe, }}, /* Byte value: 0x48 */ + {{0x20, 0x5f, 0x4c, 0x55, 0x9f, 0xd1, 0x60, 0x36, }}, /* Byte value: 0x49 */ + {{0xc4, 0xd3, 0x83, 0x7f, 0x0e, 0x10, 0x8f, 0xc2, }}, /* Byte value: 0x4a */ + {{0xbe, 0xf2, 0x16, 0xee, 0xf0, 0x34, 0x01, 0x54, }}, /* Byte value: 0x4b */ + {{0xac, 0x55, 0x44, 0x04, 0x3b, 0x05, 0x37, 0x74, }}, /* Byte value: 0x4c */ + {{0x2f, 0x56, 0xf9, 0x43, 0xb4, 0x23, 0x71, 0x6b, }}, /* Byte value: 0x4d */ + {{0x09, 0xb2, 0x29, 0x75, 0x84, 0xf9, 0x1b, 0x10, }}, /* Byte value: 0x4e */ + {{0xd1, 0x1a, 0x77, 0x07, 0xb9, 0x76, 0xb0, 0x53, }}, /* Byte value: 0x4f */ + {{0x76, 0x94, 0x6e, 0x57, 0x63, 0x32, 0x9a, 0x0c, }}, /* Byte value: 0x50 */ + {{0x2d, 0x3f, 0x8d, 0x62, 0xd1, 0x9b, 0x77, 0x50, }}, /* Byte value: 0x51 */ + {{0x4d, 0xde, 0x59, 0x9d, 0xb3, 0x2b, 0xd7, 0x0a, }}, /* Byte value: 0x52 */ + {{0x98, 0x16, 0xc6, 0xd8, 0xc0, 0xee, 0x6b, 0x2f, }}, /* Byte value: 0x53 */ + {{0xe6, 0xe5, 0xbb, 0x0b, 0xf4, 0x79, 0xe9, 0xcf, }}, /* Byte value: 0x54 */ + {{0x95, 0x76, 0x07, 0xef, 0x8e, 0xa4, 0x7c, 0x49, }}, /* Byte value: 0x55 */ + {{0x86, 0x04, 0x6f, 0xf4, 0x96, 0xc9, 0x49, 0x95, }}, /* Byte value: 0x56 */ + {{0xd7, 0xa1, 0xeb, 0x64, 0x16, 0x7d, 0xba, 0x1e, }}, /* Byte value: 0x57 */ + {{0x48, 0xd9, 0x8b, 0x2e, 0xaa, 0xc4, 0xd8, 0x80, }}, /* Byte value: 0x58 */ + {{0xf5, 0x97, 0xd3, 0x10, 0xec, 0x14, 0xdc, 0x13, }}, /* Byte value: 0x59 */ + {{0xbb, 0xf5, 0xc4, 0x5d, 0xe9, 0xdb, 0x0e, 0xde, }}, /* Byte value: 0x5a */ + {{0xfb, 0x4b, 0x5c, 0xf7, 0x14, 0xba, 0xce, 0xb2, }}, /* Byte value: 0x5b */ + {{0xe2, 0x37, 0x53, 0x49, 0x3e, 0xca, 0xe5, 0xb9, }}, /* Byte value: 0x5c */ + {{0xae, 0x3c, 0x30, 0x25, 0x5e, 0xbd, 0x31, 0x4f, }}, /* Byte value: 0x5d */ + {{0xca, 0x0f, 0x0c, 0x98, 0xf6, 0xbe, 0x9d, 0x63, }}, /* Byte value: 0x5e */ + {{0xbf, 0x27, 0x2c, 0x1f, 0x23, 0x68, 0x02, 0xa8, }}, /* Byte value: 0x5f */ + {{0x10, 0xce, 0x26, 0xcb, 0xae, 0x89, 0x30, 0x1b, }}, /* Byte value: 0x60 */ + {{0x0a, 0x0e, 0x67, 0xa5, 0x32, 0x1d, 0x1e, 0xd7, }}, /* Byte value: 0x61 */ + {{0xdc, 0x7a, 0xb6, 0x30, 0xf7, 0x3c, 0xa7, 0x35, }}, /* Byte value: 0x62 */ + {{0x94, 0xa3, 0x3d, 0x1e, 0x5d, 0xf8, 0x7f, 0xb5, }}, /* Byte value: 0x63 */ + {{0x0f, 0x09, 0xb5, 0x16, 0x2b, 0xf2, 0x11, 0x5d, }}, /* Byte value: 0x64 */ + {{0x7f, 0x26, 0x47, 0x22, 0xe7, 0xcb, 0x81, 0x1c, }}, /* Byte value: 0x65 */ + {{0x49, 0x0c, 0xb1, 0xdf, 0x79, 0x98, 0xdb, 0x7c, }}, /* Byte value: 0x66 */ + {{0x83, 0x03, 0xbd, 0x47, 0x8f, 0x26, 0x46, 0x1f, }}, /* Byte value: 0x67 */ + {{0xe1, 0x8b, 0x1d, 0x99, 0x88, 0x2e, 0xe0, 0x7e, }}, /* Byte value: 0x68 */ + {{0x1b, 0x15, 0x7b, 0x9f, 0x4f, 0xc8, 0x2d, 0x30, }}, /* Byte value: 0x69 */ + {{0xcb, 0xda, 0x36, 0x69, 0x25, 0xe2, 0x9e, 0x9f, }}, /* Byte value: 0x6a */ + {{0x03, 0xbc, 0x4e, 0xd0, 0xb6, 0xe4, 0x05, 0xc7, }}, /* Byte value: 0x6b */ + {{0x8e, 0x63, 0x7c, 0x70, 0xc1, 0x6c, 0x51, 0x79, }}, /* Byte value: 0x6c */ + {{0x3a, 0x9f, 0x0d, 0x3b, 0x03, 0x45, 0x4e, 0xfa, }}, /* Byte value: 0x6d */ + {{0xb1, 0xfb, 0xa3, 0xf8, 0xdb, 0xc6, 0x10, 0x09, }}, /* Byte value: 0x6e */ + {{0x05, 0x07, 0xd2, 0xb3, 0x19, 0xef, 0x0f, 0x8a, }}, /* Byte value: 0x6f */ + {{0xc9, 0xb3, 0x42, 0x48, 0x40, 0x5a, 0x98, 0xa4, }}, /* Byte value: 0x70 */ + {{0x32, 0xf8, 0x1e, 0xbf, 0x54, 0xe0, 0x56, 0x16, }}, /* Byte value: 0x71 */ + {{0x85, 0xb8, 0x21, 0x24, 0x20, 0x2d, 0x4c, 0x52, }}, /* Byte value: 0x72 */ + {{0xe8, 0x39, 0x34, 0xec, 0x0c, 0xd7, 0xfb, 0x6e, }}, /* Byte value: 0x73 */ + {{0x74, 0xfd, 0x1a, 0x76, 0x06, 0x8a, 0x9c, 0x37, }}, /* Byte value: 0x74 */ + {{0x0e, 0xdc, 0x8f, 0xe7, 0xf8, 0xae, 0x12, 0xa1, }}, /* Byte value: 0x75 */ + {{0x46, 0x05, 0x04, 0xc9, 0x52, 0x6a, 0xca, 0x21, }}, /* Byte value: 0x76 */ + {{0x60, 0xe1, 0xd4, 0xff, 0x62, 0xb0, 0xa0, 0x5a, }}, /* Byte value: 0x77 */ + {{0xdb, 0x14, 0x10, 0xa2, 0x8b, 0x6b, 0xae, 0x84, }}, /* Byte value: 0x78 */ + {{0x40, 0xbe, 0x98, 0xaa, 0xfd, 0x61, 0xc0, 0x6c, }}, /* Byte value: 0x79 */ + {{0xef, 0x57, 0x92, 0x7e, 0x70, 0x80, 0xf2, 0xdf, }}, /* Byte value: 0x7a */ + {{0x78, 0x48, 0xe1, 0xb0, 0x9b, 0x9c, 0x88, 0xad, }}, /* Byte value: 0x7b */ + {{0xf0, 0x90, 0x01, 0xa3, 0xf5, 0xfb, 0xd3, 0x99, }}, /* Byte value: 0x7c */ + {{0x90, 0x71, 0xd5, 0x5c, 0x97, 0x4b, 0x73, 0xc3, }}, /* Byte value: 0x7d */ + {{0xf9, 0x22, 0x28, 0xd6, 0x71, 0x02, 0xc8, 0x89, }}, /* Byte value: 0x7e */ + {{0xf4, 0x42, 0xe9, 0xe1, 0x3f, 0x48, 0xdf, 0xef, }}, /* Byte value: 0x7f */ + {{0x6a, 0xef, 0xb3, 0x5a, 0x50, 0xad, 0xbe, 0x8d, }}, /* Byte value: 0x80 */ + {{0x4a, 0xb0, 0xff, 0x0f, 0xcf, 0x7c, 0xde, 0xbb, }}, /* Byte value: 0x81 */ + {{0x6d, 0x81, 0x15, 0xc8, 0x2c, 0xfa, 0xb7, 0x3c, }}, /* Byte value: 0x82 */ + {{0xec, 0xeb, 0xdc, 0xae, 0xc6, 0x64, 0xf7, 0x18, }}, /* Byte value: 0x83 */ + {{0x5c, 0xc5, 0x45, 0xa7, 0xce, 0xfe, 0xe4, 0xed, }}, /* Byte value: 0x84 */ + {{0x80, 0xbf, 0xf3, 0x97, 0x39, 0xc2, 0x43, 0xd8, }}, /* Byte value: 0x85 */ + {{0x88, 0xd8, 0xe0, 0x13, 0x6e, 0x67, 0x5b, 0x34, }}, /* Byte value: 0x86 */ + {{0xce, 0xdd, 0xe4, 0xda, 0x3c, 0x0d, 0x91, 0x15, }}, /* Byte value: 0x87 */ + {{0x8c, 0x0a, 0x08, 0x51, 0xa4, 0xd4, 0x57, 0x42, }}, /* Byte value: 0x88 */ + {{0xa7, 0x8e, 0x19, 0x50, 0xda, 0x44, 0x2a, 0x5f, }}, /* Byte value: 0x89 */ + {{0xe0, 0x5e, 0x27, 0x68, 0x5b, 0x72, 0xe3, 0x82, }}, /* Byte value: 0x8a */ + {{0xfe, 0x4c, 0x8e, 0x44, 0x0d, 0x55, 0xc1, 0x38, }}, /* Byte value: 0x8b */ + {{0xb8, 0x49, 0x8a, 0x8d, 0x5f, 0x3f, 0x0b, 0x19, }}, /* Byte value: 0x8c */ + {{0xc6, 0xba, 0xf7, 0x5e, 0x6b, 0xa8, 0x89, 0xf9, }}, /* Byte value: 0x8d */ + {{0xe3, 0xe2, 0x69, 0xb8, 0xed, 0x96, 0xe6, 0x45, }}, /* Byte value: 0x8e */ + {{0xb4, 0xfc, 0x71, 0x4b, 0xc2, 0x29, 0x1f, 0x83, }}, /* Byte value: 0x8f */ + {{0x5a, 0x7e, 0xd9, 0xc4, 0x61, 0xf5, 0xee, 0xa0, }}, /* Byte value: 0x90 */ + {{0x21, 0x8a, 0x76, 0xa4, 0x4c, 0x8d, 0x63, 0xca, }}, /* Byte value: 0x91 */ + {{0xcf, 0x08, 0xde, 0x2b, 0xef, 0x51, 0x92, 0xe9, }}, /* Byte value: 0x92 */ + {{0x06, 0xbb, 0x9c, 0x63, 0xaf, 0x0b, 0x0a, 0x4d, }}, /* Byte value: 0x93 */ + {{0x13, 0x72, 0x68, 0x1b, 0x18, 0x6d, 0x35, 0xdc, }}, /* Byte value: 0x94 */ + {{0x04, 0xd2, 0xe8, 0x42, 0xca, 0xb3, 0x0c, 0x76, }}, /* Byte value: 0x95 */ + {{0x69, 0x53, 0xfd, 0x8a, 0xe6, 0x49, 0xbb, 0x4a, }}, /* Byte value: 0x96 */ + {{0xfc, 0x25, 0xfa, 0x65, 0x68, 0xed, 0xc7, 0x03, }}, /* Byte value: 0x97 */ + {{0xde, 0x13, 0xc2, 0x11, 0x92, 0x84, 0xa1, 0x0e, }}, /* Byte value: 0x98 */ + {{0xbc, 0x9b, 0x62, 0xcf, 0x95, 0x8c, 0x07, 0x6f, }}, /* Byte value: 0x99 */ + {{0xf8, 0xf7, 0x12, 0x27, 0xa2, 0x5e, 0xcb, 0x75, }}, /* Byte value: 0x9a */ + {{0x33, 0x2d, 0x24, 0x4e, 0x87, 0xbc, 0x55, 0xea, }}, /* Byte value: 0x9b */ + {{0x71, 0xfa, 0xc8, 0xc5, 0x1f, 0x65, 0x93, 0xbd, }}, /* Byte value: 0x9c */ + {{0xa5, 0xe7, 0x6d, 0x71, 0xbf, 0xfc, 0x2c, 0x64, }}, /* Byte value: 0x9d */ + {{0x3e, 0x4d, 0xe5, 0x79, 0xc9, 0xf6, 0x42, 0x8c, }}, /* Byte value: 0x9e */ + {{0x02, 0x69, 0x74, 0x21, 0x65, 0xb8, 0x06, 0x3b, }}, /* Byte value: 0x9f */ + {{0xa1, 0x35, 0x85, 0x33, 0x75, 0x4f, 0x20, 0x12, }}, /* Byte value: 0xa0 */ + {{0xb0, 0x2e, 0x99, 0x09, 0x08, 0x9a, 0x13, 0xf5, }}, /* Byte value: 0xa1 */ + {{0x22, 0x36, 0x38, 0x74, 0xfa, 0x69, 0x66, 0x0d, }}, /* Byte value: 0xa2 */ + {{0x99, 0xc3, 0xfc, 0x29, 0x13, 0xb2, 0x68, 0xd3, }}, /* Byte value: 0xa3 */ + {{0x42, 0xd7, 0xec, 0x8b, 0x98, 0xd9, 0xc6, 0x57, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0xfa, 0x9e, 0x66, 0x06, 0xc7, 0xe6, 0xcd, 0x4e, }}, /* Byte value: 0xa6 */ + {{0x4f, 0xb7, 0x2d, 0xbc, 0xd6, 0x93, 0xd1, 0x31, }}, /* Byte value: 0xa7 */ + {{0x31, 0x44, 0x50, 0x6f, 0xe2, 0x04, 0x53, 0xd1, }}, /* Byte value: 0xa8 */ + {{0x8f, 0xb6, 0x46, 0x81, 0x12, 0x30, 0x52, 0x85, }}, /* Byte value: 0xa9 */ + {{0xf7, 0xfe, 0xa7, 0x31, 0x89, 0xac, 0xda, 0x28, }}, /* Byte value: 0xaa */ + {{0xa0, 0xe0, 0xbf, 0xc2, 0xa6, 0x13, 0x23, 0xee, }}, /* Byte value: 0xab */ + {{0x51, 0xa5, 0x84, 0x90, 0x80, 0xb4, 0xf3, 0x8b, }}, /* Byte value: 0xac */ + {{0x56, 0xcb, 0x22, 0x02, 0xfc, 0xe3, 0xfa, 0x3a, }}, /* Byte value: 0xad */ + {{0xb5, 0x29, 0x4b, 0xba, 0x11, 0x75, 0x1c, 0x7f, }}, /* Byte value: 0xae */ + {{0x50, 0x70, 0xbe, 0x61, 0x53, 0xe8, 0xf0, 0x77, }}, /* Byte value: 0xaf */ + {{0x9f, 0x78, 0x60, 0x4a, 0xbc, 0xb9, 0x62, 0x9e, }}, /* Byte value: 0xb0 */ + {{0x23, 0xe3, 0x02, 0x85, 0x29, 0x35, 0x65, 0xf1, }}, /* Byte value: 0xb1 */ + {{0x97, 0x1f, 0x73, 0xce, 0xeb, 0x1c, 0x7a, 0x72, }}, /* Byte value: 0xb2 */ + {{0xaf, 0xe9, 0x0a, 0xd4, 0x8d, 0xe1, 0x32, 0xb3, }}, /* Byte value: 0xb3 */ + {{0xd9, 0x7d, 0x64, 0x83, 0xee, 0xd3, 0xa8, 0xbf, }}, /* Byte value: 0xb4 */ + {{0x7e, 0xf3, 0x7d, 0xd3, 0x34, 0x97, 0x82, 0xe0, }}, /* Byte value: 0xb5 */ + {{0x2c, 0xea, 0xb7, 0x93, 0x02, 0xc7, 0x74, 0xac, }}, /* Byte value: 0xb6 */ + {{0x3f, 0x98, 0xdf, 0x88, 0x1a, 0xaa, 0x41, 0x70, }}, /* Byte value: 0xb7 */ + {{0xed, 0x3e, 0xe6, 0x5f, 0x15, 0x38, 0xf4, 0xe4, }}, /* Byte value: 0xb8 */ + {{0xd2, 0xa6, 0x39, 0xd7, 0x0f, 0x92, 0xb5, 0x94, }}, /* Byte value: 0xb9 */ + {{0x79, 0x9d, 0xdb, 0x41, 0x48, 0xc0, 0x8b, 0x51, }}, /* Byte value: 0xba */ + {{0xd4, 0x1d, 0xa5, 0xb4, 0xa0, 0x99, 0xbf, 0xd9, }}, /* Byte value: 0xbb */ + {{0xa8, 0x87, 0xac, 0x46, 0xf1, 0xb6, 0x3b, 0x02, }}, /* Byte value: 0xbc */ + {{0x54, 0xa2, 0x56, 0x23, 0x99, 0x5b, 0xfc, 0x01, }}, /* Byte value: 0xbd */ + {{0x68, 0x86, 0xc7, 0x7b, 0x35, 0x15, 0xb8, 0xb6, }}, /* Byte value: 0xbe */ + {{0x43, 0x02, 0xd6, 0x7a, 0x4b, 0x85, 0xc5, 0xab, }}, /* Byte value: 0xbf */ + {{0xc7, 0x6f, 0xcd, 0xaf, 0xb8, 0xf4, 0x8a, 0x05, }}, /* Byte value: 0xc0 */ + {{0xd5, 0xc8, 0x9f, 0x45, 0x73, 0xc5, 0xbc, 0x25, }}, /* Byte value: 0xc1 */ + {{0xdd, 0xaf, 0x8c, 0xc1, 0x24, 0x60, 0xa4, 0xc9, }}, /* Byte value: 0xc2 */ + {{0x3c, 0x24, 0x91, 0x58, 0xac, 0x4e, 0x44, 0xb7, }}, /* Byte value: 0xc3 */ + {{0xd3, 0x73, 0x03, 0x26, 0xdc, 0xce, 0xb6, 0x68, }}, /* Byte value: 0xc4 */ + {{0xf3, 0x2c, 0x4f, 0x73, 0x43, 0x1f, 0xd6, 0x5e, }}, /* Byte value: 0xc5 */ + {{0xf6, 0x2b, 0x9d, 0xc0, 0x5a, 0xf0, 0xd9, 0xd4, }}, /* Byte value: 0xc6 */ + {{0x92, 0x18, 0xa1, 0x7d, 0xf2, 0xf3, 0x75, 0xf8, }}, /* Byte value: 0xc7 */ + {{0x11, 0x1b, 0x1c, 0x3a, 0x7d, 0xd5, 0x33, 0xe7, }}, /* Byte value: 0xc8 */ + {{0xd6, 0x74, 0xd1, 0x95, 0xc5, 0x21, 0xb9, 0xe2, }}, /* Byte value: 0xc9 */ + {{0x70, 0x2f, 0xf2, 0x34, 0xcc, 0x39, 0x90, 0x41, }}, /* Byte value: 0xca */ + {{0x29, 0xed, 0x65, 0x20, 0x1b, 0x28, 0x7b, 0x26, }}, /* Byte value: 0xcb */ + {{0x9e, 0xad, 0x5a, 0xbb, 0x6f, 0xe5, 0x61, 0x62, }}, /* Byte value: 0xcc */ + {{0xc1, 0xd4, 0x51, 0xcc, 0x17, 0xff, 0x80, 0x48, }}, /* Byte value: 0xcd */ + {{0x9d, 0x11, 0x14, 0x6b, 0xd9, 0x01, 0x64, 0xa5, }}, /* Byte value: 0xce */ + {{0xf2, 0xf9, 0x75, 0x82, 0x90, 0x43, 0xd5, 0xa2, }}, /* Byte value: 0xcf */ + {{0x36, 0x2a, 0xf6, 0xfd, 0x9e, 0x53, 0x5a, 0x60, }}, /* Byte value: 0xd0 */ + {{0x5d, 0x10, 0x7f, 0x56, 0x1d, 0xa2, 0xe7, 0x11, }}, /* Byte value: 0xd1 */ + {{0xcc, 0xb4, 0x90, 0xfb, 0x59, 0xb5, 0x97, 0x2e, }}, /* Byte value: 0xd2 */ + {{0xb6, 0x95, 0x05, 0x6a, 0xa7, 0x91, 0x19, 0xb8, }}, /* Byte value: 0xd3 */ + {{0xa9, 0x52, 0x96, 0xb7, 0x22, 0xea, 0x38, 0xfe, }}, /* Byte value: 0xd4 */ + {{0x30, 0x91, 0x6a, 0x9e, 0x31, 0x58, 0x50, 0x2d, }}, /* Byte value: 0xd5 */ + {{0xb3, 0x92, 0xd7, 0xd9, 0xbe, 0x7e, 0x16, 0x32, }}, /* Byte value: 0xd6 */ + {{0x18, 0xa9, 0x35, 0x4f, 0xf9, 0x2c, 0x28, 0xf7, }}, /* Byte value: 0xd7 */ + {{0x81, 0x6a, 0xc9, 0x66, 0xea, 0x9e, 0x40, 0x24, }}, /* Byte value: 0xd8 */ + {{0x87, 0xd1, 0x55, 0x05, 0x45, 0x95, 0x4a, 0x69, }}, /* Byte value: 0xd9 */ + {{0x58, 0x17, 0xad, 0xe5, 0x04, 0x4d, 0xe8, 0x9b, }}, /* Byte value: 0xda */ + {{0x77, 0x41, 0x54, 0xa6, 0xb0, 0x6e, 0x99, 0xf0, }}, /* Byte value: 0xdb */ + {{0x7a, 0x21, 0x95, 0x91, 0xfe, 0x24, 0x8e, 0x96, }}, /* Byte value: 0xdc */ + {{0xad, 0x80, 0x7e, 0xf5, 0xe8, 0x59, 0x34, 0x88, }}, /* Byte value: 0xdd */ + {{0x67, 0x8f, 0x72, 0x6d, 0x1e, 0xe7, 0xa9, 0xeb, }}, /* Byte value: 0xde */ + {{0x4e, 0x62, 0x17, 0x4d, 0x05, 0xcf, 0xd2, 0xcd, }}, /* Byte value: 0xdf */ + {{0x1e, 0x12, 0xa9, 0x2c, 0x56, 0x27, 0x22, 0xba, }}, /* Byte value: 0xe0 */ + {{0x41, 0x6b, 0xa2, 0x5b, 0x2e, 0x3d, 0xc3, 0x90, }}, /* Byte value: 0xe1 */ + {{0xe5, 0x59, 0xf5, 0xdb, 0x42, 0x9d, 0xec, 0x08, }}, /* Byte value: 0xe2 */ + {{0x15, 0xc9, 0xf4, 0x78, 0xb7, 0x66, 0x3f, 0x91, }}, /* Byte value: 0xe3 */ + {{0xe7, 0x30, 0x81, 0xfa, 0x27, 0x25, 0xea, 0x33, }}, /* Byte value: 0xe4 */ + {{0x4c, 0x0b, 0x63, 0x6c, 0x60, 0x77, 0xd4, 0xf6, }}, /* Byte value: 0xe5 */ + {{0x8a, 0xb1, 0x94, 0x32, 0x0b, 0xdf, 0x5d, 0x0f, }}, /* Byte value: 0xe6 */ + {{0x61, 0x34, 0xee, 0x0e, 0xb1, 0xec, 0xa3, 0xa6, }}, /* Byte value: 0xe7 */ + {{0x16, 0x75, 0xba, 0xa8, 0x01, 0x82, 0x3a, 0x56, }}, /* Byte value: 0xe8 */ + {{0x25, 0x58, 0x9e, 0xe6, 0x86, 0x3e, 0x6f, 0xbc, }}, /* Byte value: 0xe9 */ + {{0x01, 0xd5, 0x3a, 0xf1, 0xd3, 0x5c, 0x03, 0xfc, }}, /* Byte value: 0xea */ + {{0x4b, 0x65, 0xc5, 0xfe, 0x1c, 0x20, 0xdd, 0x47, }}, /* Byte value: 0xeb */ + {{0x24, 0x8d, 0xa4, 0x17, 0x55, 0x62, 0x6c, 0x40, }}, /* Byte value: 0xec */ + {{0x45, 0xb9, 0x4a, 0x19, 0xe4, 0x8e, 0xcf, 0xe6, }}, /* Byte value: 0xed */ + {{0xb7, 0x40, 0x3f, 0x9b, 0x74, 0xcd, 0x1a, 0x44, }}, /* Byte value: 0xee */ + {{0xeb, 0x85, 0x7a, 0x3c, 0xba, 0x33, 0xfe, 0xa9, }}, /* Byte value: 0xef */ + {{0xb9, 0x9c, 0xb0, 0x7c, 0x8c, 0x63, 0x08, 0xe5, }}, /* Byte value: 0xf0 */ + {{0xcd, 0x61, 0xaa, 0x0a, 0x8a, 0xe9, 0x94, 0xd2, }}, /* Byte value: 0xf1 */ + {{0x5e, 0xac, 0x31, 0x86, 0xab, 0x46, 0xe2, 0xd6, }}, /* Byte value: 0xf2 */ + {{0x93, 0xcd, 0x9b, 0x8c, 0x21, 0xaf, 0x76, 0x04, }}, /* Byte value: 0xf3 */ + {{0xf1, 0x45, 0x3b, 0x52, 0x26, 0xa7, 0xd0, 0x65, }}, /* Byte value: 0xf4 */ + {{0x26, 0xe4, 0xd0, 0x36, 0x30, 0xda, 0x6a, 0x7b, }}, /* Byte value: 0xf5 */ + {{0x1a, 0xc0, 0x41, 0x6e, 0x9c, 0x94, 0x2e, 0xcc, }}, /* Byte value: 0xf6 */ + {{0x44, 0x6c, 0x70, 0xe8, 0x37, 0xd2, 0xcc, 0x1a, }}, /* Byte value: 0xf7 */ + {{0x27, 0x31, 0xea, 0xc7, 0xe3, 0x86, 0x69, 0x87, }}, /* Byte value: 0xf8 */ + {{0x89, 0x0d, 0xda, 0xe2, 0xbd, 0x3b, 0x58, 0xc8, }}, /* Byte value: 0xf9 */ + {{0x47, 0xd0, 0x3e, 0x38, 0x81, 0x36, 0xc9, 0xdd, }}, /* Byte value: 0xfa */ + {{0x9c, 0xc4, 0x2e, 0x9a, 0x0a, 0x5d, 0x67, 0x59, }}, /* Byte value: 0xfb */ + {{0x9b, 0xaa, 0x88, 0x08, 0x76, 0x0a, 0x6e, 0xe8, }}, /* Byte value: 0xfc */ + {{0x6e, 0x3d, 0x5b, 0x18, 0x9a, 0x1e, 0xb2, 0xfb, }}, /* Byte value: 0xfd */ + {{0x96, 0xca, 0x49, 0x3f, 0x38, 0x40, 0x79, 0x8e, }}, /* Byte value: 0xfe */ + {{0xc2, 0x68, 0x1f, 0x1c, 0xa1, 0x1b, 0x85, 0x8f, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 10 */ + {{0xe1, 0x5d, 0xa9, 0x18, 0x2c, 0xd1, 0xbe, 0x8f, }}, /* Byte value: 0x00 */ + {{0x50, 0xb3, 0x14, 0xdb, 0x6b, 0x25, 0x60, 0xb5, }}, /* Byte value: 0x01 */ + {{0xc2, 0x71, 0xd1, 0x87, 0x95, 0x0f, 0x3d, 0xb7, }}, /* Byte value: 0x02 */ + {{0xcf, 0xff, 0x43, 0x34, 0xeb, 0xa7, 0x8a, 0xbf, }}, /* Byte value: 0x03 */ + {{0x73, 0x9f, 0x6c, 0x44, 0xd2, 0xfb, 0xe3, 0x8d, }}, /* Byte value: 0x04 */ + {{0x74, 0x3f, 0x1d, 0xd4, 0x99, 0x1f, 0x58, 0xdb, }}, /* Byte value: 0x05 */ + {{0xc6, 0xdc, 0xd0, 0x47, 0x36, 0x48, 0x84, 0x45, }}, /* Byte value: 0x06 */ + {{0x19, 0xd2, 0x97, 0xf5, 0x14, 0x30, 0xaf, 0xb4, }}, /* Byte value: 0x07 */ + {{0x37, 0x70, 0x7d, 0xd9, 0xd3, 0x46, 0x9b, 0x84, }}, /* Byte value: 0x08 */ + {{0x9e, 0xf6, 0xc6, 0xdf, 0xd8, 0xe3, 0x55, 0xd7, }}, /* Byte value: 0x09 */ + {{0x1d, 0x7f, 0x96, 0x35, 0xb7, 0x77, 0x16, 0x46, }}, /* Byte value: 0x0a */ + {{0x14, 0x5c, 0x05, 0x46, 0x6a, 0x98, 0x18, 0xbc, }}, /* Byte value: 0x0b */ + {{0x77, 0x32, 0x6d, 0x84, 0x71, 0xbc, 0x5a, 0x7f, }}, /* Byte value: 0x0c */ + {{0xb4, 0xf9, 0x2d, 0x33, 0xbc, 0xd2, 0xd8, 0x15, }}, /* Byte value: 0x0d */ + {{0xa8, 0x3c, 0x2a, 0x36, 0x53, 0xc4, 0x71, 0x8e, }}, /* Byte value: 0x0e */ + {{0x03, 0x0d, 0x70, 0x50, 0xe8, 0xa3, 0x02, 0xa4, }}, /* Byte value: 0x0f */ + {{0x86, 0x9e, 0xc0, 0x1a, 0x94, 0xb2, 0x45, 0xbe, }}, /* Byte value: 0x10 */ + {{0x28, 0xb8, 0x0a, 0x8c, 0xd4, 0xf3, 0x30, 0xbb, }}, /* Byte value: 0x11 */ + {{0xda, 0x19, 0xd7, 0x42, 0xd9, 0x5e, 0x2d, 0xde, }}, /* Byte value: 0x12 */ + {{0x3e, 0x53, 0xee, 0xaa, 0x0e, 0xa9, 0x95, 0x7e, }}, /* Byte value: 0x13 */ + {{0xbf, 0x6d, 0x5f, 0x20, 0xd1, 0xff, 0x6b, 0x96, }}, /* Byte value: 0x14 */ + {{0x66, 0x79, 0xf8, 0x32, 0xe0, 0x02, 0x44, 0xec, }}, /* Byte value: 0x15 */ + {{0x78, 0x0b, 0x1e, 0x57, 0xbf, 0xd6, 0x50, 0x0e, }}, /* Byte value: 0x16 */ + {{0x0f, 0x39, 0x73, 0xd3, 0xce, 0x6a, 0x0a, 0x71, }}, /* Byte value: 0x17 */ + {{0x33, 0xdd, 0x7c, 0x19, 0x70, 0x01, 0x22, 0x76, }}, /* Byte value: 0x18 */ + {{0x10, 0xf1, 0x04, 0x86, 0xc9, 0xdf, 0xa1, 0x4e, }}, /* Byte value: 0x19 */ + {{0xf0, 0x16, 0x3c, 0xae, 0xbd, 0x6f, 0xa0, 0x1c, }}, /* Byte value: 0x1a */ + {{0x25, 0x36, 0x98, 0x3f, 0xaa, 0x5b, 0x87, 0xb3, }}, /* Byte value: 0x1b */ + {{0x4d, 0xcc, 0x82, 0xee, 0xdc, 0x52, 0x76, 0xf3, }}, /* Byte value: 0x1c */ + {{0x27, 0x81, 0x79, 0x5f, 0x1a, 0x99, 0x3a, 0xca, }}, /* Byte value: 0x1d */ + {{0xb2, 0xe3, 0xcd, 0x93, 0xaf, 0x57, 0xdc, 0x9e, }}, /* Byte value: 0x1e */ + {{0x1c, 0xc5, 0x07, 0x05, 0xef, 0x16, 0xa9, 0x9b, }}, /* Byte value: 0x1f */ + {{0x63, 0x6e, 0x68, 0xc2, 0x1b, 0x24, 0x42, 0xc3, }}, /* Byte value: 0x20 */ + {{0x76, 0x88, 0xfc, 0xb4, 0x29, 0xdd, 0xe5, 0xa2, }}, /* Byte value: 0x21 */ + {{0x99, 0x56, 0xb7, 0x4f, 0x93, 0x07, 0xee, 0x81, }}, /* Byte value: 0x22 */ + {{0x30, 0xd0, 0x0c, 0x49, 0x98, 0xa2, 0x20, 0xd2, }}, /* Byte value: 0x23 */ + {{0x6b, 0xf7, 0x6a, 0x81, 0x9e, 0xaa, 0xf3, 0xe4, }}, /* Byte value: 0x24 */ + {{0xcc, 0xf2, 0x33, 0x64, 0x03, 0x04, 0x88, 0x1b, }}, /* Byte value: 0x25 */ + {{0x7a, 0xbc, 0xff, 0x37, 0x0f, 0x14, 0xed, 0x77, }}, /* Byte value: 0x26 */ + {{0x23, 0x2c, 0x78, 0x9f, 0xb9, 0xde, 0x83, 0x38, }}, /* Byte value: 0x27 */ + {{0x0e, 0x83, 0xe2, 0xe3, 0x96, 0x0b, 0xb5, 0xac, }}, /* Byte value: 0x28 */ + {{0xde, 0xb4, 0xd6, 0x82, 0x7a, 0x19, 0x94, 0x2c, }}, /* Byte value: 0x29 */ + {{0xd7, 0x97, 0x45, 0xf1, 0xa7, 0xf6, 0x9a, 0xd6, }}, /* Byte value: 0x2a */ + {{0x46, 0x58, 0xf0, 0xfd, 0xb1, 0x7f, 0xc5, 0x70, }}, /* Byte value: 0x2b */ + {{0xc9, 0xe5, 0xa3, 0x94, 0xf8, 0x22, 0x8e, 0x34, }}, /* Byte value: 0x2c */ + {{0x2a, 0x0f, 0xeb, 0xec, 0x64, 0x31, 0x8d, 0xc2, }}, /* Byte value: 0x2d */ + {{0x4b, 0xd6, 0x62, 0x4e, 0xcf, 0xd7, 0x72, 0x78, }}, /* Byte value: 0x2e */ + {{0x57, 0x13, 0x65, 0x4b, 0x20, 0xc1, 0xdb, 0xe3, }}, /* Byte value: 0x2f */ + {{0x82, 0x33, 0xc1, 0xda, 0x37, 0xf5, 0xfc, 0x4c, }}, /* Byte value: 0x30 */ + {{0x8c, 0xb0, 0x23, 0x39, 0xa1, 0xfe, 0x49, 0xe0, }}, /* Byte value: 0x31 */ + {{0x54, 0x1e, 0x15, 0x1b, 0xc8, 0x62, 0xd9, 0x47, }}, /* Byte value: 0x32 */ + {{0x42, 0xf5, 0xf1, 0x3d, 0x12, 0x38, 0x7c, 0x82, }}, /* Byte value: 0x33 */ + {{0x41, 0xf8, 0x81, 0x6d, 0xfa, 0x9b, 0x7e, 0x26, }}, /* Byte value: 0x34 */ + {{0xdc, 0x03, 0x37, 0xe2, 0xca, 0xdb, 0x29, 0x55, }}, /* Byte value: 0x35 */ + {{0x61, 0xd9, 0x89, 0xa2, 0xab, 0xe6, 0xff, 0xba, }}, /* Byte value: 0x36 */ + {{0x2d, 0xaf, 0x9a, 0x7c, 0x2f, 0xd5, 0x36, 0x94, }}, /* Byte value: 0x37 */ + {{0xfc, 0x22, 0x3f, 0x2d, 0x9b, 0xa6, 0xa8, 0xc9, }}, /* Byte value: 0x38 */ + {{0xed, 0x69, 0xaa, 0x9b, 0x0a, 0x18, 0xb6, 0x5a, }}, /* Byte value: 0x39 */ + {{0x2e, 0xa2, 0xea, 0x2c, 0xc7, 0x76, 0x34, 0x30, }}, /* Byte value: 0x3a */ + {{0x52, 0x04, 0xf5, 0xbb, 0xdb, 0xe7, 0xdd, 0xcc, }}, /* Byte value: 0x3b */ + {{0xbb, 0xc0, 0x5e, 0xe0, 0x72, 0xb8, 0xd2, 0x64, }}, /* Byte value: 0x3c */ + {{0x7b, 0x06, 0x6e, 0x07, 0x57, 0x75, 0x52, 0xaa, }}, /* Byte value: 0x3d */ + {{0xad, 0x2b, 0xba, 0xc6, 0xa8, 0xe2, 0x77, 0xa1, }}, /* Byte value: 0x3e */ + {{0xa0, 0xa5, 0x28, 0x75, 0xd6, 0x4a, 0xc0, 0xa9, }}, /* Byte value: 0x3f */ + {{0xd2, 0x80, 0xd5, 0x01, 0x5c, 0xd0, 0x9c, 0xf9, }}, /* Byte value: 0x40 */ + {{0x44, 0xef, 0x11, 0x9d, 0x01, 0xbd, 0x78, 0x09, }}, /* Byte value: 0x41 */ + {{0x32, 0x67, 0xed, 0x29, 0x28, 0x60, 0x9d, 0xab, }}, /* Byte value: 0x42 */ + {{0xdd, 0xb9, 0xa6, 0xd2, 0x92, 0xba, 0x96, 0x88, }}, /* Byte value: 0x43 */ + {{0xf8, 0x8f, 0x3e, 0xed, 0x38, 0xe1, 0x11, 0x3b, }}, /* Byte value: 0x44 */ + {{0xa5, 0xb2, 0xb8, 0x85, 0x2d, 0x6c, 0xc6, 0x86, }}, /* Byte value: 0x45 */ + {{0x81, 0x3e, 0xb1, 0x8a, 0xdf, 0x56, 0xfe, 0xe8, }}, /* Byte value: 0x46 */ + {{0xc0, 0xc6, 0x30, 0xe7, 0x25, 0xcd, 0x80, 0xce, }}, /* Byte value: 0x47 */ + {{0x8e, 0x07, 0xc2, 0x59, 0x11, 0x3c, 0xf4, 0x99, }}, /* Byte value: 0x48 */ + {{0xce, 0x45, 0xd2, 0x04, 0xb3, 0xc6, 0x35, 0x62, }}, /* Byte value: 0x49 */ + {{0x88, 0x1d, 0x22, 0xf9, 0x02, 0xb9, 0xf0, 0x12, }}, /* Byte value: 0x4a */ + {{0x79, 0xb1, 0x8f, 0x67, 0xe7, 0xb7, 0xef, 0xd3, }}, /* Byte value: 0x4b */ + {{0xcb, 0x52, 0x42, 0xf4, 0x48, 0xe0, 0x33, 0x4d, }}, /* Byte value: 0x4c */ + {{0x2b, 0xb5, 0x7a, 0xdc, 0x3c, 0x50, 0x32, 0x1f, }}, /* Byte value: 0x4d */ + {{0x59, 0x90, 0x87, 0xa8, 0xb6, 0xca, 0x6e, 0x4f, }}, /* Byte value: 0x4e */ + {{0x0d, 0x8e, 0x92, 0xb3, 0x7e, 0xa8, 0xb7, 0x08, }}, /* Byte value: 0x4f */ + {{0x4a, 0x6c, 0xf3, 0x7e, 0x97, 0xb6, 0xcd, 0xa5, }}, /* Byte value: 0x50 */ + {{0xfe, 0x95, 0xde, 0x4d, 0x2b, 0x64, 0x15, 0xb0, }}, /* Byte value: 0x51 */ + {{0x6f, 0x5a, 0x6b, 0x41, 0x3d, 0xed, 0x4a, 0x16, }}, /* Byte value: 0x52 */ + {{0x0b, 0x94, 0x72, 0x13, 0x6d, 0x2d, 0xb3, 0x83, }}, /* Byte value: 0x53 */ + {{0x93, 0x78, 0x54, 0x6c, 0xa6, 0x4b, 0xe2, 0xdf, }}, /* Byte value: 0x54 */ + {{0x3b, 0x44, 0x7e, 0x5a, 0xf5, 0x8f, 0x93, 0x51, }}, /* Byte value: 0x55 */ + {{0x02, 0xb7, 0xe1, 0x60, 0xb0, 0xc2, 0xbd, 0x79, }}, /* Byte value: 0x56 */ + {{0xb1, 0xee, 0xbd, 0xc3, 0x47, 0xf4, 0xde, 0x3a, }}, /* Byte value: 0x57 */ + {{0x8d, 0x0a, 0xb2, 0x09, 0xf9, 0x9f, 0xf6, 0x3d, }}, /* Byte value: 0x58 */ + {{0xaa, 0x8b, 0xcb, 0x56, 0xe3, 0x06, 0xcc, 0xf7, }}, /* Byte value: 0x59 */ + {{0x9b, 0xe1, 0x56, 0x2f, 0x23, 0xc5, 0x53, 0xf8, }}, /* Byte value: 0x5a */ + {{0xc4, 0x6b, 0x31, 0x27, 0x86, 0x8a, 0x39, 0x3c, }}, /* Byte value: 0x5b */ + {{0xfa, 0x38, 0xdf, 0x8d, 0x88, 0x23, 0xac, 0x42, }}, /* Byte value: 0x5c */ + {{0x1e, 0x72, 0xe6, 0x65, 0x5f, 0xd4, 0x14, 0xe2, }}, /* Byte value: 0x5d */ + {{0xe6, 0xfd, 0xd8, 0x88, 0x67, 0x35, 0x05, 0xd9, }}, /* Byte value: 0x5e */ + {{0xf2, 0xa1, 0xdd, 0xce, 0x0d, 0xad, 0x1d, 0x65, }}, /* Byte value: 0x5f */ + {{0x67, 0xc3, 0x69, 0x02, 0xb8, 0x63, 0xfb, 0x31, }}, /* Byte value: 0x60 */ + {{0x07, 0xa0, 0x71, 0x90, 0x4b, 0xe4, 0xbb, 0x56, }}, /* Byte value: 0x61 */ + {{0x3d, 0x5e, 0x9e, 0xfa, 0xe6, 0x0a, 0x97, 0xda, }}, /* Byte value: 0x62 */ + {{0xb0, 0x54, 0x2c, 0xf3, 0x1f, 0x95, 0x61, 0xe7, }}, /* Byte value: 0x63 */ + {{0xe5, 0xf0, 0xa8, 0xd8, 0x8f, 0x96, 0x07, 0x7d, }}, /* Byte value: 0x64 */ + {{0x13, 0xfc, 0x74, 0xd6, 0x21, 0x7c, 0xa3, 0xea, }}, /* Byte value: 0x65 */ + {{0x06, 0x1a, 0xe0, 0xa0, 0x13, 0x85, 0x04, 0x8b, }}, /* Byte value: 0x66 */ + {{0xe0, 0xe7, 0x38, 0x28, 0x74, 0xb0, 0x01, 0x52, }}, /* Byte value: 0x67 */ + {{0xa4, 0x08, 0x29, 0xb5, 0x75, 0x0d, 0x79, 0x5b, }}, /* Byte value: 0x68 */ + {{0xeb, 0x73, 0x4a, 0x3b, 0x19, 0x9d, 0xb2, 0xd1, }}, /* Byte value: 0x69 */ + {{0x6d, 0xed, 0x8a, 0x21, 0x8d, 0x2f, 0xf7, 0x6f, }}, /* Byte value: 0x6a */ + {{0x5e, 0x30, 0xf6, 0x38, 0xfd, 0x2e, 0xd5, 0x19, }}, /* Byte value: 0x6b */ + {{0xd0, 0x37, 0x34, 0x61, 0xec, 0x12, 0x21, 0x80, }}, /* Byte value: 0x6c */ + {{0xae, 0x26, 0xca, 0x96, 0x40, 0x41, 0x75, 0x05, }}, /* Byte value: 0x6d */ + {{0x9c, 0x41, 0x27, 0xbf, 0x68, 0x21, 0xe8, 0xae, }}, /* Byte value: 0x6e */ + {{0xe2, 0x50, 0xd9, 0x48, 0xc4, 0x72, 0xbc, 0x2b, }}, /* Byte value: 0x6f */ + {{0xb8, 0xcd, 0x2e, 0xb0, 0x9a, 0x1b, 0xd0, 0xc0, }}, /* Byte value: 0x70 */ + {{0x7c, 0xa6, 0x1f, 0x97, 0x1c, 0x91, 0xe9, 0xfc, }}, /* Byte value: 0x71 */ + {{0x5c, 0x87, 0x17, 0x58, 0x4d, 0xec, 0x68, 0x60, }}, /* Byte value: 0x72 */ + {{0xfd, 0x98, 0xae, 0x1d, 0xc3, 0xc7, 0x17, 0x14, }}, /* Byte value: 0x73 */ + {{0x9f, 0x4c, 0x57, 0xef, 0x80, 0x82, 0xea, 0x0a, }}, /* Byte value: 0x74 */ + {{0x6e, 0xe0, 0xfa, 0x71, 0x65, 0x8c, 0xf5, 0xcb, }}, /* Byte value: 0x75 */ + {{0xe3, 0xea, 0x48, 0x78, 0x9c, 0x13, 0x03, 0xf6, }}, /* Byte value: 0x76 */ + {{0x91, 0xcf, 0xb5, 0x0c, 0x16, 0x89, 0x5f, 0xa6, }}, /* Byte value: 0x77 */ + {{0x0a, 0x2e, 0xe3, 0x23, 0x35, 0x4c, 0x0c, 0x5e, }}, /* Byte value: 0x78 */ + {{0x5f, 0x8a, 0x67, 0x08, 0xa5, 0x4f, 0x6a, 0xc4, }}, /* Byte value: 0x79 */ + {{0xca, 0xe8, 0xd3, 0xc4, 0x10, 0x81, 0x8c, 0x90, }}, /* Byte value: 0x7a */ + {{0x24, 0x8c, 0x09, 0x0f, 0xf2, 0x3a, 0x38, 0x6e, }}, /* Byte value: 0x7b */ + {{0x48, 0xdb, 0x12, 0x1e, 0x27, 0x74, 0x70, 0xdc, }}, /* Byte value: 0x7c */ + {{0xd9, 0x14, 0xa7, 0x12, 0x31, 0xfd, 0x2f, 0x7a, }}, /* Byte value: 0x7d */ + {{0x11, 0x4b, 0x95, 0xb6, 0x91, 0xbe, 0x1e, 0x93, }}, /* Byte value: 0x7e */ + {{0x21, 0x9b, 0x99, 0xff, 0x09, 0x1c, 0x3e, 0x41, }}, /* Byte value: 0x7f */ + {{0x96, 0x6f, 0xc4, 0x9c, 0x5d, 0x6d, 0xe4, 0xf0, }}, /* Byte value: 0x80 */ + {{0x58, 0x2a, 0x16, 0x98, 0xee, 0xab, 0xd1, 0x92, }}, /* Byte value: 0x81 */ + {{0xa1, 0x1f, 0xb9, 0x45, 0x8e, 0x2b, 0x7f, 0x74, }}, /* Byte value: 0x82 */ + {{0x94, 0xd8, 0x25, 0xfc, 0xed, 0xaf, 0x59, 0x89, }}, /* Byte value: 0x83 */ + {{0x83, 0x89, 0x50, 0xea, 0x6f, 0x94, 0x43, 0x91, }}, /* Byte value: 0x84 */ + {{0xbe, 0xd7, 0xce, 0x10, 0x89, 0x9e, 0xd4, 0x4b, }}, /* Byte value: 0x85 */ + {{0x6c, 0x57, 0x1b, 0x11, 0xd5, 0x4e, 0x48, 0xb2, }}, /* Byte value: 0x86 */ + {{0x8f, 0xbd, 0x53, 0x69, 0x49, 0x5d, 0x4b, 0x44, }}, /* Byte value: 0x87 */ + {{0x05, 0x17, 0x90, 0xf0, 0xfb, 0x26, 0x06, 0x2f, }}, /* Byte value: 0x88 */ + {{0x47, 0xe2, 0x61, 0xcd, 0xe9, 0x1e, 0x7a, 0xad, }}, /* Byte value: 0x89 */ + {{0x2f, 0x18, 0x7b, 0x1c, 0x9f, 0x17, 0x8b, 0xed, }}, /* Byte value: 0x8a */ + {{0x26, 0x3b, 0xe8, 0x6f, 0x42, 0xf8, 0x85, 0x17, }}, /* Byte value: 0x8b */ + {{0xc5, 0xd1, 0xa0, 0x17, 0xde, 0xeb, 0x86, 0xe1, }}, /* Byte value: 0x8c */ + {{0x5d, 0x3d, 0x86, 0x68, 0x15, 0x8d, 0xd7, 0xbd, }}, /* Byte value: 0x8d */ + {{0x71, 0x28, 0x8d, 0x24, 0x62, 0x39, 0x5e, 0xf4, }}, /* Byte value: 0x8e */ + {{0x7e, 0x11, 0xfe, 0xf7, 0xac, 0x53, 0x54, 0x85, }}, /* Byte value: 0x8f */ + {{0x3f, 0xe9, 0x7f, 0x9a, 0x56, 0xc8, 0x2a, 0xa3, }}, /* Byte value: 0x90 */ + {{0x45, 0x55, 0x80, 0xad, 0x59, 0xdc, 0xc7, 0xd4, }}, /* Byte value: 0x91 */ + {{0x04, 0xad, 0x01, 0xc0, 0xa3, 0x47, 0xb9, 0xf2, }}, /* Byte value: 0x92 */ + {{0xbc, 0x60, 0x2f, 0x70, 0x39, 0x5c, 0x69, 0x32, }}, /* Byte value: 0x93 */ + {{0x39, 0xf3, 0x9f, 0x3a, 0x45, 0x4d, 0x2e, 0x28, }}, /* Byte value: 0x94 */ + {{0x69, 0x40, 0x8b, 0xe1, 0x2e, 0x68, 0x4e, 0x9d, }}, /* Byte value: 0x95 */ + {{0xc8, 0x5f, 0x32, 0xa4, 0xa0, 0x43, 0x31, 0xe9, }}, /* Byte value: 0x96 */ + {{0xf3, 0x1b, 0x4c, 0xfe, 0x55, 0xcc, 0xa2, 0xb8, }}, /* Byte value: 0x97 */ + {{0xe8, 0x7e, 0x3a, 0x6b, 0xf1, 0x3e, 0xb0, 0x75, }}, /* Byte value: 0x98 */ + {{0xac, 0x91, 0x2b, 0xf6, 0xf0, 0x83, 0xc8, 0x7c, }}, /* Byte value: 0x99 */ + {{0x9a, 0x5b, 0xc7, 0x1f, 0x7b, 0xa4, 0xec, 0x25, }}, /* Byte value: 0x9a */ + {{0xf7, 0xb6, 0x4d, 0x3e, 0xf6, 0x8b, 0x1b, 0x4a, }}, /* Byte value: 0x9b */ + {{0x7d, 0x1c, 0x8e, 0xa7, 0x44, 0xf0, 0x56, 0x21, }}, /* Byte value: 0x9c */ + {{0x92, 0xc2, 0xc5, 0x5c, 0xfe, 0x2a, 0x5d, 0x02, }}, /* Byte value: 0x9d */ + {{0xc7, 0x66, 0x41, 0x77, 0x6e, 0x29, 0x3b, 0x98, }}, /* Byte value: 0x9e */ + {{0xd5, 0x20, 0xa4, 0x91, 0x17, 0x34, 0x27, 0xaf, }}, /* Byte value: 0x9f */ + {{0xfb, 0x82, 0x4e, 0xbd, 0xd0, 0x42, 0x13, 0x9f, }}, /* Byte value: 0xa0 */ + {{0x17, 0x51, 0x75, 0x16, 0x82, 0x3b, 0x1a, 0x18, }}, /* Byte value: 0xa1 */ + {{0x1b, 0x65, 0x76, 0x95, 0xa4, 0xf2, 0x12, 0xcd, }}, /* Byte value: 0xa2 */ + {{0x80, 0x84, 0x20, 0xba, 0x87, 0x37, 0x41, 0x35, }}, /* Byte value: 0xa3 */ + {{0x8a, 0xaa, 0xc3, 0x99, 0xb2, 0x7b, 0x4d, 0x6b, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x4f, 0x7b, 0x63, 0x8e, 0x6c, 0x90, 0xcb, 0x8a, }}, /* Byte value: 0xa6 */ + {{0xba, 0x7a, 0xcf, 0xd0, 0x2a, 0xd9, 0x6d, 0xb9, }}, /* Byte value: 0xa7 */ + {{0x22, 0x96, 0xe9, 0xaf, 0xe1, 0xbf, 0x3c, 0xe5, }}, /* Byte value: 0xa8 */ + {{0x5b, 0x27, 0x66, 0xc8, 0x06, 0x08, 0xd3, 0x36, }}, /* Byte value: 0xa9 */ + {{0x7f, 0xab, 0x6f, 0xc7, 0xf4, 0x32, 0xeb, 0x58, }}, /* Byte value: 0xaa */ + {{0x70, 0x92, 0x1c, 0x14, 0x3a, 0x58, 0xe1, 0x29, }}, /* Byte value: 0xab */ + {{0xb3, 0x59, 0x5c, 0xa3, 0xf7, 0x36, 0x63, 0x43, }}, /* Byte value: 0xac */ + {{0x84, 0x29, 0x21, 0x7a, 0x24, 0x70, 0xf8, 0xc7, }}, /* Byte value: 0xad */ + {{0xf5, 0x01, 0xac, 0x5e, 0x46, 0x49, 0xa6, 0x33, }}, /* Byte value: 0xae */ + {{0x38, 0x49, 0x0e, 0x0a, 0x1d, 0x2c, 0x91, 0xf5, }}, /* Byte value: 0xaf */ + {{0x3c, 0xe4, 0x0f, 0xca, 0xbe, 0x6b, 0x28, 0x07, }}, /* Byte value: 0xb0 */ + {{0x90, 0x75, 0x24, 0x3c, 0x4e, 0xe8, 0xe0, 0x7b, }}, /* Byte value: 0xb1 */ + {{0xee, 0x64, 0xda, 0xcb, 0xe2, 0xbb, 0xb4, 0xfe, }}, /* Byte value: 0xb2 */ + {{0x95, 0x62, 0xb4, 0xcc, 0xb5, 0xce, 0xe6, 0x54, }}, /* Byte value: 0xb3 */ + {{0xdf, 0x0e, 0x47, 0xb2, 0x22, 0x78, 0x2b, 0xf1, }}, /* Byte value: 0xb4 */ + {{0x98, 0xec, 0x26, 0x7f, 0xcb, 0x66, 0x51, 0x5c, }}, /* Byte value: 0xb5 */ + {{0x75, 0x85, 0x8c, 0xe4, 0xc1, 0x7e, 0xe7, 0x06, }}, /* Byte value: 0xb6 */ + {{0x4c, 0x76, 0x13, 0xde, 0x84, 0x33, 0xc9, 0x2e, }}, /* Byte value: 0xb7 */ + {{0x1f, 0xc8, 0x77, 0x55, 0x07, 0xb5, 0xab, 0x3f, }}, /* Byte value: 0xb8 */ + {{0x53, 0xbe, 0x64, 0x8b, 0x83, 0x86, 0x62, 0x11, }}, /* Byte value: 0xb9 */ + {{0xaf, 0x9c, 0x5b, 0xa6, 0x18, 0x20, 0xca, 0xd8, }}, /* Byte value: 0xba */ + {{0xef, 0xde, 0x4b, 0xfb, 0xba, 0xda, 0x0b, 0x23, }}, /* Byte value: 0xbb */ + {{0xa2, 0x12, 0xc9, 0x15, 0x66, 0x88, 0x7d, 0xd0, }}, /* Byte value: 0xbc */ + {{0x51, 0x09, 0x85, 0xeb, 0x33, 0x44, 0xdf, 0x68, }}, /* Byte value: 0xbd */ + {{0x43, 0x4f, 0x60, 0x0d, 0x4a, 0x59, 0xc3, 0x5f, }}, /* Byte value: 0xbe */ + {{0x01, 0xba, 0x91, 0x30, 0x58, 0x61, 0xbf, 0xdd, }}, /* Byte value: 0xbf */ + {{0xd6, 0x2d, 0xd4, 0xc1, 0xff, 0x97, 0x25, 0x0b, }}, /* Byte value: 0xc0 */ + {{0x64, 0xce, 0x19, 0x52, 0x50, 0xc0, 0xf9, 0x95, }}, /* Byte value: 0xc1 */ + {{0xb6, 0x4e, 0xcc, 0x53, 0x0c, 0x10, 0x65, 0x6c, }}, /* Byte value: 0xc2 */ + {{0x12, 0x46, 0xe5, 0xe6, 0x79, 0x1d, 0x1c, 0x37, }}, /* Byte value: 0xc3 */ + {{0xd8, 0xae, 0x36, 0x22, 0x69, 0x9c, 0x90, 0xa7, }}, /* Byte value: 0xc4 */ + {{0x16, 0xeb, 0xe4, 0x26, 0xda, 0x5a, 0xa5, 0xc5, }}, /* Byte value: 0xc5 */ + {{0xf4, 0xbb, 0x3d, 0x6e, 0x1e, 0x28, 0x19, 0xee, }}, /* Byte value: 0xc6 */ + {{0x0c, 0x34, 0x03, 0x83, 0x26, 0xc9, 0x08, 0xd5, }}, /* Byte value: 0xc7 */ + {{0xec, 0xd3, 0x3b, 0xab, 0x52, 0x79, 0x09, 0x87, }}, /* Byte value: 0xc8 */ + {{0x3a, 0xfe, 0xef, 0x6a, 0xad, 0xee, 0x2c, 0x8c, }}, /* Byte value: 0xc9 */ + {{0xf6, 0x0c, 0xdc, 0x0e, 0xae, 0xea, 0xa4, 0x97, }}, /* Byte value: 0xca */ + {{0x97, 0xd5, 0x55, 0xac, 0x05, 0x0c, 0x5b, 0x2d, }}, /* Byte value: 0xcb */ + {{0xb7, 0xf4, 0x5d, 0x63, 0x54, 0x71, 0xda, 0xb1, }}, /* Byte value: 0xcc */ + {{0x6a, 0x4d, 0xfb, 0xb1, 0xc6, 0xcb, 0x4c, 0x39, }}, /* Byte value: 0xcd */ + {{0xe9, 0xc4, 0xab, 0x5b, 0xa9, 0x5f, 0x0f, 0xa8, }}, /* Byte value: 0xce */ + {{0x9d, 0xfb, 0xb6, 0x8f, 0x30, 0x40, 0x57, 0x73, }}, /* Byte value: 0xcf */ + {{0x15, 0xe6, 0x94, 0x76, 0x32, 0xf9, 0xa7, 0x61, }}, /* Byte value: 0xd0 */ + {{0x08, 0x99, 0x02, 0x43, 0x85, 0x8e, 0xb1, 0x27, }}, /* Byte value: 0xd1 */ + {{0x5a, 0x9d, 0xf7, 0xf8, 0x5e, 0x69, 0x6c, 0xeb, }}, /* Byte value: 0xd2 */ + {{0xab, 0x31, 0x5a, 0x66, 0xbb, 0x67, 0x73, 0x2a, }}, /* Byte value: 0xd3 */ + {{0x29, 0x02, 0x9b, 0xbc, 0x8c, 0x92, 0x8f, 0x66, }}, /* Byte value: 0xd4 */ + {{0xa9, 0x86, 0xbb, 0x06, 0x0b, 0xa5, 0xce, 0x53, }}, /* Byte value: 0xd5 */ + {{0x49, 0x61, 0x83, 0x2e, 0x7f, 0x15, 0xcf, 0x01, }}, /* Byte value: 0xd6 */ + {{0xb5, 0x43, 0xbc, 0x03, 0xe4, 0xb3, 0x67, 0xc8, }}, /* Byte value: 0xd7 */ + {{0x35, 0xc7, 0x9c, 0xb9, 0x63, 0x84, 0x26, 0xfd, }}, /* Byte value: 0xd8 */ + {{0x89, 0xa7, 0xb3, 0xc9, 0x5a, 0xd8, 0x4f, 0xcf, }}, /* Byte value: 0xd9 */ + {{0xea, 0xc9, 0xdb, 0x0b, 0x41, 0xfc, 0x0d, 0x0c, }}, /* Byte value: 0xda */ + {{0xc1, 0x7c, 0xa1, 0xd7, 0x7d, 0xac, 0x3f, 0x13, }}, /* Byte value: 0xdb */ + {{0xf1, 0xac, 0xad, 0x9e, 0xe5, 0x0e, 0x1f, 0xc1, }}, /* Byte value: 0xdc */ + {{0x40, 0x42, 0x10, 0x5d, 0xa2, 0xfa, 0xc1, 0xfb, }}, /* Byte value: 0xdd */ + {{0xa6, 0xbf, 0xc8, 0xd5, 0xc5, 0xcf, 0xc4, 0x22, }}, /* Byte value: 0xde */ + {{0x31, 0x6a, 0x9d, 0x79, 0xc0, 0xc3, 0x9f, 0x0f, }}, /* Byte value: 0xdf */ + {{0x09, 0x23, 0x93, 0x73, 0xdd, 0xef, 0x0e, 0xfa, }}, /* Byte value: 0xe0 */ + {{0xd4, 0x9a, 0x35, 0xa1, 0x4f, 0x55, 0x98, 0x72, }}, /* Byte value: 0xe1 */ + {{0xcd, 0x48, 0xa2, 0x54, 0x5b, 0x65, 0x37, 0xc6, }}, /* Byte value: 0xe2 */ + {{0x85, 0x93, 0xb0, 0x4a, 0x7c, 0x11, 0x47, 0x1a, }}, /* Byte value: 0xe3 */ + {{0x18, 0x68, 0x06, 0xc5, 0x4c, 0x51, 0x10, 0x69, }}, /* Byte value: 0xe4 */ + {{0xe4, 0x4a, 0x39, 0xe8, 0xd7, 0xf7, 0xb8, 0xa0, }}, /* Byte value: 0xe5 */ + {{0xb9, 0x77, 0xbf, 0x80, 0xc2, 0x7a, 0x6f, 0x1d, }}, /* Byte value: 0xe6 */ + {{0x1a, 0xdf, 0xe7, 0xa5, 0xfc, 0x93, 0xad, 0x10, }}, /* Byte value: 0xe7 */ + {{0xdb, 0xa3, 0x46, 0x72, 0x81, 0x3f, 0x92, 0x03, }}, /* Byte value: 0xe8 */ + {{0x2c, 0x15, 0x0b, 0x4c, 0x77, 0xb4, 0x89, 0x49, }}, /* Byte value: 0xe9 */ + {{0x8b, 0x10, 0x52, 0xa9, 0xea, 0x1a, 0xf2, 0xb6, }}, /* Byte value: 0xea */ + {{0xd3, 0x3a, 0x44, 0x31, 0x04, 0xb1, 0x23, 0x24, }}, /* Byte value: 0xeb */ + {{0xa7, 0x05, 0x59, 0xe5, 0x9d, 0xae, 0x7b, 0xff, }}, /* Byte value: 0xec */ + {{0xbd, 0xda, 0xbe, 0x40, 0x61, 0x3d, 0xd6, 0xef, }}, /* Byte value: 0xed */ + {{0x20, 0x21, 0x08, 0xcf, 0x51, 0x7d, 0x81, 0x9c, }}, /* Byte value: 0xee */ + {{0xa3, 0xa8, 0x58, 0x25, 0x3e, 0xe9, 0xc2, 0x0d, }}, /* Byte value: 0xef */ + {{0x4e, 0xc1, 0xf2, 0xbe, 0x34, 0xf1, 0x74, 0x57, }}, /* Byte value: 0xf0 */ + {{0xd1, 0x8d, 0xa5, 0x51, 0xb4, 0x73, 0x9e, 0x5d, }}, /* Byte value: 0xf1 */ + {{0x56, 0xa9, 0xf4, 0x7b, 0x78, 0xa0, 0x64, 0x3e, }}, /* Byte value: 0xf2 */ + {{0x87, 0x24, 0x51, 0x2a, 0xcc, 0xd3, 0xfa, 0x63, }}, /* Byte value: 0xf3 */ + {{0xc3, 0xcb, 0x40, 0xb7, 0xcd, 0x6e, 0x82, 0x6a, }}, /* Byte value: 0xf4 */ + {{0x72, 0x25, 0xfd, 0x74, 0x8a, 0x9a, 0x5c, 0x50, }}, /* Byte value: 0xf5 */ + {{0x60, 0x63, 0x18, 0x92, 0xf3, 0x87, 0x40, 0x67, }}, /* Byte value: 0xf6 */ + {{0x36, 0xca, 0xec, 0xe9, 0x8b, 0x27, 0x24, 0x59, }}, /* Byte value: 0xf7 */ + {{0xf9, 0x35, 0xaf, 0xdd, 0x60, 0x80, 0xae, 0xe6, }}, /* Byte value: 0xf8 */ + {{0xe7, 0x47, 0x49, 0xb8, 0x3f, 0x54, 0xba, 0x04, }}, /* Byte value: 0xf9 */ + {{0x68, 0xfa, 0x1a, 0xd1, 0x76, 0x09, 0xf1, 0x40, }}, /* Byte value: 0xfa */ + {{0x62, 0xd4, 0xf9, 0xf2, 0x43, 0x45, 0xfd, 0x1e, }}, /* Byte value: 0xfb */ + {{0x55, 0xa4, 0x84, 0x2b, 0x90, 0x03, 0x66, 0x9a, }}, /* Byte value: 0xfc */ + {{0xff, 0x2f, 0x4f, 0x7d, 0x73, 0x05, 0xaa, 0x6d, }}, /* Byte value: 0xfd */ + {{0x65, 0x74, 0x88, 0x62, 0x08, 0xa1, 0x46, 0x48, }}, /* Byte value: 0xfe */ + {{0x34, 0x7d, 0x0d, 0x89, 0x3b, 0xe5, 0x99, 0x20, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 11 */ + {{0xfc, 0x5e, 0x38, 0x3f, 0x3f, 0x68, 0x53, 0x1b, }}, /* Byte value: 0x00 */ + {{0xee, 0x90, 0x3c, 0xda, 0xda, 0xa3, 0xbc, 0xf8, }}, /* Byte value: 0x01 */ + {{0xdd, 0xb8, 0xb0, 0xa6, 0xa6, 0x24, 0x5d, 0x4e, }}, /* Byte value: 0x02 */ + {{0x11, 0x18, 0xc5, 0x95, 0x95, 0x7d, 0x5f, 0xd3, }}, /* Byte value: 0x03 */ + {{0xcf, 0x76, 0xb4, 0x43, 0x43, 0xef, 0xb2, 0xad, }}, /* Byte value: 0x04 */ + {{0x6e, 0xc4, 0x27, 0xfa, 0xfa, 0x9a, 0x46, 0x2f, }}, /* Byte value: 0x05 */ + {{0x31, 0x0d, 0xb3, 0x9d, 0x9d, 0xe2, 0x80, 0x96, }}, /* Byte value: 0x06 */ + {{0x16, 0x84, 0x7a, 0xe4, 0xe4, 0x01, 0x2d, 0xa3, }}, /* Byte value: 0x07 */ + {{0xfb, 0xc2, 0x87, 0x4e, 0x4e, 0x14, 0x21, 0x6b, }}, /* Byte value: 0x08 */ + {{0xc4, 0x34, 0x89, 0x31, 0x31, 0x0e, 0x45, 0x1d, }}, /* Byte value: 0x09 */ + {{0xfa, 0x31, 0x79, 0xdf, 0xdf, 0xc7, 0xf0, 0x7b, }}, /* Byte value: 0x0a */ + {{0xda, 0x24, 0x0f, 0xd7, 0xd7, 0x58, 0x2f, 0x3e, }}, /* Byte value: 0x0b */ + {{0x23, 0xc3, 0xb7, 0x78, 0x78, 0x29, 0x6f, 0x75, }}, /* Byte value: 0x0c */ + {{0xc5, 0xc7, 0x77, 0xa0, 0xa0, 0xdd, 0x94, 0x0d, }}, /* Byte value: 0x0d */ + {{0x04, 0x4a, 0x7e, 0x01, 0x01, 0xca, 0xc2, 0x40, }}, /* Byte value: 0x0e */ + {{0x4d, 0x07, 0x90, 0x82, 0x82, 0xb3, 0x29, 0x5a, }}, /* Byte value: 0x0f */ + {{0xe9, 0x0c, 0x83, 0xab, 0xab, 0xdf, 0xce, 0x88, }}, /* Byte value: 0x10 */ + {{0x77, 0x48, 0x1e, 0x6d, 0x6d, 0xb0, 0x5e, 0x7c, }}, /* Byte value: 0x11 */ + {{0xf0, 0x80, 0xba, 0x3c, 0x3c, 0xf5, 0xd6, 0xdb, }}, /* Byte value: 0x12 */ + {{0xdb, 0xd7, 0xf1, 0x46, 0x46, 0x8b, 0xfe, 0x2e, }}, /* Byte value: 0x13 */ + {{0x93, 0x69, 0xe1, 0x54, 0x54, 0x21, 0xc4, 0x24, }}, /* Byte value: 0x14 */ + {{0x2e, 0xee, 0xcb, 0xea, 0xea, 0x67, 0x3b, 0xa5, }}, /* Byte value: 0x15 */ + {{0x99, 0xd8, 0x22, 0xb7, 0xb7, 0x13, 0xe2, 0x84, }}, /* Byte value: 0x16 */ + {{0xba, 0x1b, 0x95, 0xcf, 0xcf, 0x3a, 0x8d, 0xf1, }}, /* Byte value: 0x17 */ + {{0x17, 0x77, 0x84, 0x75, 0x75, 0xd2, 0xfc, 0xb3, }}, /* Byte value: 0x18 */ + {{0x36, 0x91, 0x0c, 0xec, 0xec, 0x9e, 0xf2, 0xe6, }}, /* Byte value: 0x19 */ + {{0xf1, 0x73, 0x44, 0xad, 0xad, 0x26, 0x07, 0xcb, }}, /* Byte value: 0x1a */ + {{0xbb, 0xe8, 0x6b, 0x5e, 0x5e, 0xe9, 0x5c, 0xe1, }}, /* Byte value: 0x1b */ + {{0x14, 0xa1, 0x45, 0x05, 0x05, 0x64, 0x4c, 0x83, }}, /* Byte value: 0x1c */ + {{0xcd, 0x53, 0x8b, 0xa2, 0xa2, 0x8a, 0xd3, 0x8d, }}, /* Byte value: 0x1d */ + {{0x5f, 0xc9, 0x94, 0x67, 0x67, 0x78, 0xc6, 0xb9, }}, /* Byte value: 0x1e */ + {{0xc1, 0x8d, 0x09, 0xa1, 0xa1, 0x17, 0x56, 0x4d, }}, /* Byte value: 0x1f */ + {{0xf9, 0xe7, 0xb8, 0xaf, 0xaf, 0x71, 0x40, 0x4b, }}, /* Byte value: 0x20 */ + {{0x18, 0x7f, 0xc7, 0x06, 0x06, 0xf9, 0xc9, 0x43, }}, /* Byte value: 0x21 */ + {{0x65, 0x86, 0x1a, 0x88, 0x88, 0x7b, 0xb1, 0x9f, }}, /* Byte value: 0x22 */ + {{0x5a, 0x70, 0x14, 0xf7, 0xf7, 0x61, 0xd5, 0xe9, }}, /* Byte value: 0x23 */ + {{0xe2, 0x4e, 0xbe, 0xd9, 0xd9, 0x3e, 0x39, 0x38, }}, /* Byte value: 0x24 */ + {{0x5c, 0x1f, 0x55, 0x17, 0x17, 0xce, 0x76, 0x89, }}, /* Byte value: 0x25 */ + {{0xef, 0x63, 0xc2, 0x4b, 0x4b, 0x70, 0x6d, 0xe8, }}, /* Byte value: 0x26 */ + {{0x21, 0xe6, 0x88, 0x99, 0x99, 0x4c, 0x0e, 0x55, }}, /* Byte value: 0x27 */ + {{0x81, 0xa7, 0xe5, 0xb1, 0xb1, 0xea, 0x2b, 0xc7, }}, /* Byte value: 0x28 */ + {{0x1c, 0x35, 0xb9, 0x07, 0x07, 0x33, 0x0b, 0x03, }}, /* Byte value: 0x29 */ + {{0x3c, 0x20, 0xcf, 0x0f, 0x0f, 0xac, 0xd4, 0x46, }}, /* Byte value: 0x2a */ + {{0x42, 0x0f, 0xd3, 0xf1, 0xf1, 0x98, 0x1c, 0xaa, }}, /* Byte value: 0x2b */ + {{0x8b, 0x16, 0x26, 0x52, 0x52, 0xd8, 0x0d, 0x67, }}, /* Byte value: 0x2c */ + {{0x01, 0xf3, 0xfe, 0x91, 0x91, 0xd3, 0xd1, 0x10, }}, /* Byte value: 0x2d */ + {{0x8e, 0xaf, 0xa6, 0xc2, 0xc2, 0xc1, 0x1e, 0x37, }}, /* Byte value: 0x2e */ + {{0x4f, 0x22, 0xaf, 0x63, 0x63, 0xd6, 0x48, 0x7a, }}, /* Byte value: 0x2f */ + {{0x05, 0xb9, 0x80, 0x90, 0x90, 0x19, 0x13, 0x50, }}, /* Byte value: 0x30 */ + {{0x84, 0x1e, 0x65, 0x21, 0x21, 0xf3, 0x38, 0x97, }}, /* Byte value: 0x31 */ + {{0x02, 0x25, 0x3f, 0xe1, 0xe1, 0x65, 0x61, 0x20, }}, /* Byte value: 0x32 */ + {{0xae, 0xba, 0xd0, 0xca, 0xca, 0x5e, 0xc1, 0x72, }}, /* Byte value: 0x33 */ + {{0xe3, 0xbd, 0x40, 0x48, 0x48, 0xed, 0xe8, 0x28, }}, /* Byte value: 0x34 */ + {{0x6a, 0x8e, 0x59, 0xfb, 0xfb, 0x50, 0x84, 0x6f, }}, /* Byte value: 0x35 */ + {{0x8f, 0x5c, 0x58, 0x53, 0x53, 0x12, 0xcf, 0x27, }}, /* Byte value: 0x36 */ + {{0xa0, 0x41, 0x6d, 0x28, 0x28, 0xa6, 0x25, 0x92, }}, /* Byte value: 0x37 */ + {{0x06, 0x6f, 0x41, 0xe0, 0xe0, 0xaf, 0xa3, 0x60, }}, /* Byte value: 0x38 */ + {{0x0b, 0x42, 0x3d, 0x72, 0x72, 0xe1, 0xf7, 0xb0, }}, /* Byte value: 0x39 */ + {{0xed, 0x46, 0xfd, 0xaa, 0xaa, 0x15, 0x0c, 0xc8, }}, /* Byte value: 0x3a */ + {{0x98, 0x2b, 0xdc, 0x26, 0x26, 0xc0, 0x33, 0x94, }}, /* Byte value: 0x3b */ + {{0x7f, 0xdc, 0xe2, 0x6f, 0x6f, 0xe7, 0x19, 0xfc, }}, /* Byte value: 0x3c */ + {{0xd4, 0xdf, 0xb2, 0x35, 0x35, 0xa0, 0xcb, 0xde, }}, /* Byte value: 0x3d */ + {{0xd3, 0x43, 0x0d, 0x44, 0x44, 0xdc, 0xb9, 0xae, }}, /* Byte value: 0x3e */ + {{0x1f, 0xe3, 0x78, 0x77, 0x77, 0x85, 0xbb, 0x33, }}, /* Byte value: 0x3f */ + {{0xeb, 0x29, 0xbc, 0x4a, 0x4a, 0xba, 0xaf, 0xa8, }}, /* Byte value: 0x40 */ + {{0x34, 0xb4, 0x33, 0x0d, 0x0d, 0xfb, 0x93, 0xc6, }}, /* Byte value: 0x41 */ + {{0x2c, 0xcb, 0xf4, 0x0b, 0x0b, 0x02, 0x5a, 0x85, }}, /* Byte value: 0x42 */ + {{0x51, 0x32, 0x29, 0x85, 0x85, 0x80, 0x22, 0x59, }}, /* Byte value: 0x43 */ + {{0xea, 0xda, 0x42, 0xdb, 0xdb, 0x69, 0x7e, 0xb8, }}, /* Byte value: 0x44 */ + {{0xc8, 0xea, 0x0b, 0x32, 0x32, 0x93, 0xc0, 0xdd, }}, /* Byte value: 0x45 */ + {{0x48, 0xbe, 0x10, 0x12, 0x12, 0xaa, 0x3a, 0x0a, }}, /* Byte value: 0x46 */ + {{0xab, 0x03, 0x50, 0x5a, 0x5a, 0x47, 0xd2, 0x22, }}, /* Byte value: 0x47 */ + {{0xf2, 0xa5, 0x85, 0xdd, 0xdd, 0x90, 0xb7, 0xfb, }}, /* Byte value: 0x48 */ + {{0x2a, 0xa4, 0xb5, 0xeb, 0xeb, 0xad, 0xf9, 0xe5, }}, /* Byte value: 0x49 */ + {{0x68, 0xab, 0x66, 0x1a, 0x1a, 0x35, 0xe5, 0x4f, }}, /* Byte value: 0x4a */ + {{0xa2, 0x64, 0x52, 0xc9, 0xc9, 0xc3, 0x44, 0xb2, }}, /* Byte value: 0x4b */ + {{0xfd, 0xad, 0xc6, 0xae, 0xae, 0xbb, 0x82, 0x0b, }}, /* Byte value: 0x4c */ + {{0x3a, 0x4f, 0x8e, 0xef, 0xef, 0x03, 0x77, 0x26, }}, /* Byte value: 0x4d */ + {{0xce, 0x85, 0x4a, 0xd2, 0xd2, 0x3c, 0x63, 0xbd, }}, /* Byte value: 0x4e */ + {{0xcc, 0xa0, 0x75, 0x33, 0x33, 0x59, 0x02, 0x9d, }}, /* Byte value: 0x4f */ + {{0xb5, 0x13, 0xd6, 0xbc, 0xbc, 0x11, 0xb8, 0x01, }}, /* Byte value: 0x50 */ + {{0x70, 0xd4, 0xa1, 0x1c, 0x1c, 0xcc, 0x2c, 0x0c, }}, /* Byte value: 0x51 */ + {{0x0e, 0xfb, 0xbd, 0xe2, 0xe2, 0xf8, 0xe4, 0xe0, }}, /* Byte value: 0x52 */ + {{0x56, 0xae, 0x96, 0xf4, 0xf4, 0xfc, 0x50, 0x29, }}, /* Byte value: 0x53 */ + {{0x08, 0x94, 0xfc, 0x02, 0x02, 0x57, 0x47, 0x80, }}, /* Byte value: 0x54 */ + {{0x0c, 0xde, 0x82, 0x03, 0x03, 0x9d, 0x85, 0xc0, }}, /* Byte value: 0x55 */ + {{0x76, 0xbb, 0xe0, 0xfc, 0xfc, 0x63, 0x8f, 0x6c, }}, /* Byte value: 0x56 */ + {{0x12, 0xce, 0x04, 0xe5, 0xe5, 0xcb, 0xef, 0xe3, }}, /* Byte value: 0x57 */ + {{0xbf, 0xa2, 0x15, 0x5f, 0x5f, 0x23, 0x9e, 0xa1, }}, /* Byte value: 0x58 */ + {{0x72, 0xf1, 0x9e, 0xfd, 0xfd, 0xa9, 0x4d, 0x2c, }}, /* Byte value: 0x59 */ + {{0x13, 0x3d, 0xfa, 0x74, 0x74, 0x18, 0x3e, 0xf3, }}, /* Byte value: 0x5a */ + {{0x47, 0xb6, 0x53, 0x61, 0x61, 0x81, 0x0f, 0xfa, }}, /* Byte value: 0x5b */ + {{0x9c, 0x61, 0xa2, 0x27, 0x27, 0x0a, 0xf1, 0xd4, }}, /* Byte value: 0x5c */ + {{0xb7, 0x36, 0xe9, 0x5d, 0x5d, 0x74, 0xd9, 0x21, }}, /* Byte value: 0x5d */ + {{0x5d, 0xec, 0xab, 0x86, 0x86, 0x1d, 0xa7, 0x99, }}, /* Byte value: 0x5e */ + {{0x87, 0xc8, 0xa4, 0x51, 0x51, 0x45, 0x88, 0xa7, }}, /* Byte value: 0x5f */ + {{0x15, 0x52, 0xbb, 0x94, 0x94, 0xb7, 0x9d, 0x93, }}, /* Byte value: 0x60 */ + {{0xa1, 0xb2, 0x93, 0xb9, 0xb9, 0x75, 0xf4, 0x82, }}, /* Byte value: 0x61 */ + {{0x96, 0xd0, 0x61, 0xc4, 0xc4, 0x38, 0xd7, 0x74, }}, /* Byte value: 0x62 */ + {{0x29, 0x72, 0x74, 0x9b, 0x9b, 0x1b, 0x49, 0xd5, }}, /* Byte value: 0x63 */ + {{0x10, 0xeb, 0x3b, 0x04, 0x04, 0xae, 0x8e, 0xc3, }}, /* Byte value: 0x64 */ + {{0x7b, 0x96, 0x9c, 0x6e, 0x6e, 0x2d, 0xdb, 0xbc, }}, /* Byte value: 0x65 */ + {{0x9a, 0x0e, 0xe3, 0xc7, 0xc7, 0xa5, 0x52, 0xb4, }}, /* Byte value: 0x66 */ + {{0xc7, 0xe2, 0x48, 0x41, 0x41, 0xb8, 0xf5, 0x2d, }}, /* Byte value: 0x67 */ + {{0xf3, 0x56, 0x7b, 0x4c, 0x4c, 0x43, 0x66, 0xeb, }}, /* Byte value: 0x68 */ + {{0x91, 0x4c, 0xde, 0xb5, 0xb5, 0x44, 0xa5, 0x04, }}, /* Byte value: 0x69 */ + {{0x78, 0x40, 0x5d, 0x1e, 0x1e, 0x9b, 0x6b, 0x8c, }}, /* Byte value: 0x6a */ + {{0x6f, 0x37, 0xd9, 0x6b, 0x6b, 0x49, 0x97, 0x3f, }}, /* Byte value: 0x6b */ + {{0x9d, 0x92, 0x5c, 0xb6, 0xb6, 0xd9, 0x20, 0xc4, }}, /* Byte value: 0x6c */ + {{0x9e, 0x44, 0x9d, 0xc6, 0xc6, 0x6f, 0x90, 0xf4, }}, /* Byte value: 0x6d */ + {{0xb2, 0x8f, 0x69, 0xcd, 0xcd, 0x6d, 0xca, 0x71, }}, /* Byte value: 0x6e */ + {{0xb1, 0x59, 0xa8, 0xbd, 0xbd, 0xdb, 0x7a, 0x41, }}, /* Byte value: 0x6f */ + {{0x32, 0xdb, 0x72, 0xed, 0xed, 0x54, 0x30, 0xa6, }}, /* Byte value: 0x70 */ + {{0x75, 0x6d, 0x21, 0x8c, 0x8c, 0xd5, 0x3f, 0x5c, }}, /* Byte value: 0x71 */ + {{0x19, 0x8c, 0x39, 0x97, 0x97, 0x2a, 0x18, 0x53, }}, /* Byte value: 0x72 */ + {{0x3d, 0xd3, 0x31, 0x9e, 0x9e, 0x7f, 0x05, 0x56, }}, /* Byte value: 0x73 */ + {{0xff, 0x88, 0xf9, 0x4f, 0x4f, 0xde, 0xe3, 0x2b, }}, /* Byte value: 0x74 */ + {{0x35, 0x47, 0xcd, 0x9c, 0x9c, 0x28, 0x42, 0xd6, }}, /* Byte value: 0x75 */ + {{0x8a, 0xe5, 0xd8, 0xc3, 0xc3, 0x0b, 0xdc, 0x77, }}, /* Byte value: 0x76 */ + {{0x7e, 0x2f, 0x1c, 0xfe, 0xfe, 0x34, 0xc8, 0xec, }}, /* Byte value: 0x77 */ + {{0x6d, 0x12, 0xe6, 0x8a, 0x8a, 0x2c, 0xf6, 0x1f, }}, /* Byte value: 0x78 */ + {{0x54, 0x8b, 0xa9, 0x15, 0x15, 0x99, 0x31, 0x09, }}, /* Byte value: 0x79 */ + {{0xc6, 0x11, 0xb6, 0xd0, 0xd0, 0x6b, 0x24, 0x3d, }}, /* Byte value: 0x7a */ + {{0x80, 0x54, 0x1b, 0x20, 0x20, 0x39, 0xfa, 0xd7, }}, /* Byte value: 0x7b */ + {{0xc3, 0xa8, 0x36, 0x40, 0x40, 0x72, 0x37, 0x6d, }}, /* Byte value: 0x7c */ + {{0xbd, 0x87, 0x2a, 0xbe, 0xbe, 0x46, 0xff, 0x81, }}, /* Byte value: 0x7d */ + {{0x0d, 0x2d, 0x7c, 0x92, 0x92, 0x4e, 0x54, 0xd0, }}, /* Byte value: 0x7e */ + {{0x57, 0x5d, 0x68, 0x65, 0x65, 0x2f, 0x81, 0x39, }}, /* Byte value: 0x7f */ + {{0xdf, 0x9d, 0x8f, 0x47, 0x47, 0x41, 0x3c, 0x6e, }}, /* Byte value: 0x80 */ + {{0xf5, 0x39, 0x3a, 0xac, 0xac, 0xec, 0xc5, 0x8b, }}, /* Byte value: 0x81 */ + {{0x24, 0x5f, 0x08, 0x09, 0x09, 0x55, 0x1d, 0x05, }}, /* Byte value: 0x82 */ + {{0xa9, 0x26, 0x6f, 0xbb, 0xbb, 0x22, 0xb3, 0x02, }}, /* Byte value: 0x83 */ + {{0x3e, 0x05, 0xf0, 0xee, 0xee, 0xc9, 0xb5, 0x66, }}, /* Byte value: 0x84 */ + {{0xa8, 0xd5, 0x91, 0x2a, 0x2a, 0xf1, 0x62, 0x12, }}, /* Byte value: 0x85 */ + {{0x43, 0xfc, 0x2d, 0x60, 0x60, 0x4b, 0xcd, 0xba, }}, /* Byte value: 0x86 */ + {{0xc9, 0x19, 0xf5, 0xa3, 0xa3, 0x40, 0x11, 0xcd, }}, /* Byte value: 0x87 */ + {{0xd7, 0x09, 0x73, 0x45, 0x45, 0x16, 0x7b, 0xee, }}, /* Byte value: 0x88 */ + {{0x79, 0xb3, 0xa3, 0x8f, 0x8f, 0x48, 0xba, 0x9c, }}, /* Byte value: 0x89 */ + {{0xd6, 0xfa, 0x8d, 0xd4, 0xd4, 0xc5, 0xaa, 0xfe, }}, /* Byte value: 0x8a */ + {{0xf6, 0xef, 0xfb, 0xdc, 0xdc, 0x5a, 0x75, 0xbb, }}, /* Byte value: 0x8b */ + {{0x7c, 0x0a, 0x23, 0x1f, 0x1f, 0x51, 0xa9, 0xcc, }}, /* Byte value: 0x8c */ + {{0x22, 0x30, 0x49, 0xe9, 0xe9, 0xfa, 0xbe, 0x65, }}, /* Byte value: 0x8d */ + {{0xb9, 0xcd, 0x54, 0xbf, 0xbf, 0x8c, 0x3d, 0xc1, }}, /* Byte value: 0x8e */ + {{0x03, 0xd6, 0xc1, 0x70, 0x70, 0xb6, 0xb0, 0x30, }}, /* Byte value: 0x8f */ + {{0xe0, 0x6b, 0x81, 0x38, 0x38, 0x5b, 0x58, 0x18, }}, /* Byte value: 0x90 */ + {{0x0f, 0x08, 0x43, 0x73, 0x73, 0x2b, 0x35, 0xf0, }}, /* Byte value: 0x91 */ + {{0xec, 0xb5, 0x03, 0x3b, 0x3b, 0xc6, 0xdd, 0xd8, }}, /* Byte value: 0x92 */ + {{0xde, 0x6e, 0x71, 0xd6, 0xd6, 0x92, 0xed, 0x7e, }}, /* Byte value: 0x93 */ + {{0x7a, 0x65, 0x62, 0xff, 0xff, 0xfe, 0x0a, 0xac, }}, /* Byte value: 0x94 */ + {{0x94, 0xf5, 0x5e, 0x25, 0x25, 0x5d, 0xb6, 0x54, }}, /* Byte value: 0x95 */ + {{0xb0, 0xaa, 0x56, 0x2c, 0x2c, 0x08, 0xab, 0x51, }}, /* Byte value: 0x96 */ + {{0xbc, 0x74, 0xd4, 0x2f, 0x2f, 0x95, 0x2e, 0x91, }}, /* Byte value: 0x97 */ + {{0xdc, 0x4b, 0x4e, 0x37, 0x37, 0xf7, 0x8c, 0x5e, }}, /* Byte value: 0x98 */ + {{0xe8, 0xff, 0x7d, 0x3a, 0x3a, 0x0c, 0x1f, 0x98, }}, /* Byte value: 0x99 */ + {{0x28, 0x81, 0x8a, 0x0a, 0x0a, 0xc8, 0x98, 0xc5, }}, /* Byte value: 0x9a */ + {{0x50, 0xc1, 0xd7, 0x14, 0x14, 0x53, 0xf3, 0x49, }}, /* Byte value: 0x9b */ + {{0x4e, 0xd1, 0x51, 0xf2, 0xf2, 0x05, 0x99, 0x6a, }}, /* Byte value: 0x9c */ + {{0x33, 0x28, 0x8c, 0x7c, 0x7c, 0x87, 0xe1, 0xb6, }}, /* Byte value: 0x9d */ + {{0x0a, 0xb1, 0xc3, 0xe3, 0xe3, 0x32, 0x26, 0xa0, }}, /* Byte value: 0x9e */ + {{0x4a, 0x9b, 0x2f, 0xf3, 0xf3, 0xcf, 0x5b, 0x2a, }}, /* Byte value: 0x9f */ + {{0xa7, 0xdd, 0xd2, 0x59, 0x59, 0xda, 0x57, 0xe2, }}, /* Byte value: 0xa0 */ + {{0x97, 0x23, 0x9f, 0x55, 0x55, 0xeb, 0x06, 0x64, }}, /* Byte value: 0xa1 */ + {{0x60, 0x3f, 0x9a, 0x18, 0x18, 0x62, 0xa2, 0xcf, }}, /* Byte value: 0xa2 */ + {{0x73, 0x02, 0x60, 0x6c, 0x6c, 0x7a, 0x9c, 0x3c, }}, /* Byte value: 0xa3 */ + {{0x1e, 0x10, 0x86, 0xe6, 0xe6, 0x56, 0x6a, 0x23, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x62, 0x1a, 0xa5, 0xf9, 0xf9, 0x07, 0xc3, 0xef, }}, /* Byte value: 0xa6 */ + {{0x44, 0x60, 0x92, 0x11, 0x11, 0x37, 0xbf, 0xca, }}, /* Byte value: 0xa7 */ + {{0x1a, 0x5a, 0xf8, 0xe7, 0xe7, 0x9c, 0xa8, 0x63, }}, /* Byte value: 0xa8 */ + {{0xb8, 0x3e, 0xaa, 0x2e, 0x2e, 0x5f, 0xec, 0xd1, }}, /* Byte value: 0xa9 */ + {{0x38, 0x6a, 0xb1, 0x0e, 0x0e, 0x66, 0x16, 0x06, }}, /* Byte value: 0xaa */ + {{0x82, 0x71, 0x24, 0xc1, 0xc1, 0x5c, 0x9b, 0xf7, }}, /* Byte value: 0xab */ + {{0x64, 0x75, 0xe4, 0x19, 0x19, 0xa8, 0x60, 0x8f, }}, /* Byte value: 0xac */ + {{0x9f, 0xb7, 0x63, 0x57, 0x57, 0xbc, 0x41, 0xe4, }}, /* Byte value: 0xad */ + {{0x26, 0x7a, 0x37, 0xe8, 0xe8, 0x30, 0x7c, 0x25, }}, /* Byte value: 0xae */ + {{0x41, 0xd9, 0x12, 0x81, 0x81, 0x2e, 0xac, 0x9a, }}, /* Byte value: 0xaf */ + {{0xad, 0x6c, 0x11, 0xba, 0xba, 0xe8, 0x71, 0x42, }}, /* Byte value: 0xb0 */ + {{0x45, 0x93, 0x6c, 0x80, 0x80, 0xe4, 0x6e, 0xda, }}, /* Byte value: 0xb1 */ + {{0x46, 0x45, 0xad, 0xf0, 0xf0, 0x52, 0xde, 0xea, }}, /* Byte value: 0xb2 */ + {{0x92, 0x9a, 0x1f, 0xc5, 0xc5, 0xf2, 0x15, 0x34, }}, /* Byte value: 0xb3 */ + {{0x27, 0x89, 0xc9, 0x79, 0x79, 0xe3, 0xad, 0x35, }}, /* Byte value: 0xb4 */ + {{0x5e, 0x3a, 0x6a, 0xf6, 0xf6, 0xab, 0x17, 0xa9, }}, /* Byte value: 0xb5 */ + {{0x55, 0x78, 0x57, 0x84, 0x84, 0x4a, 0xe0, 0x19, }}, /* Byte value: 0xb6 */ + {{0x2f, 0x1d, 0x35, 0x7b, 0x7b, 0xb4, 0xea, 0xb5, }}, /* Byte value: 0xb7 */ + {{0x8c, 0x8a, 0x99, 0x23, 0x23, 0xa4, 0x7f, 0x17, }}, /* Byte value: 0xb8 */ + {{0xa3, 0x97, 0xac, 0x58, 0x58, 0x10, 0x95, 0xa2, }}, /* Byte value: 0xb9 */ + {{0xa5, 0xf8, 0xed, 0xb8, 0xb8, 0xbf, 0x36, 0xc2, }}, /* Byte value: 0xba */ + {{0x7d, 0xf9, 0xdd, 0x8e, 0x8e, 0x82, 0x78, 0xdc, }}, /* Byte value: 0xbb */ + {{0x69, 0x58, 0x98, 0x8b, 0x8b, 0xe6, 0x34, 0x5f, }}, /* Byte value: 0xbc */ + {{0xd5, 0x2c, 0x4c, 0xa4, 0xa4, 0x73, 0x1a, 0xce, }}, /* Byte value: 0xbd */ + {{0x95, 0x06, 0xa0, 0xb4, 0xb4, 0x8e, 0x67, 0x44, }}, /* Byte value: 0xbe */ + {{0x3b, 0xbc, 0x70, 0x7e, 0x7e, 0xd0, 0xa6, 0x36, }}, /* Byte value: 0xbf */ + {{0x07, 0x9c, 0xbf, 0x71, 0x71, 0x7c, 0x72, 0x70, }}, /* Byte value: 0xc0 */ + {{0x58, 0x55, 0x2b, 0x16, 0x16, 0x04, 0xb4, 0xc9, }}, /* Byte value: 0xc1 */ + {{0xb3, 0x7c, 0x97, 0x5c, 0x5c, 0xbe, 0x1b, 0x61, }}, /* Byte value: 0xc2 */ + {{0x40, 0x2a, 0xec, 0x10, 0x10, 0xfd, 0x7d, 0x8a, }}, /* Byte value: 0xc3 */ + {{0x86, 0x3b, 0x5a, 0xc0, 0xc0, 0x96, 0x59, 0xb7, }}, /* Byte value: 0xc4 */ + {{0xac, 0x9f, 0xef, 0x2b, 0x2b, 0x3b, 0xa0, 0x52, }}, /* Byte value: 0xc5 */ + {{0x1d, 0xc6, 0x47, 0x96, 0x96, 0xe0, 0xda, 0x13, }}, /* Byte value: 0xc6 */ + {{0xf7, 0x1c, 0x05, 0x4d, 0x4d, 0x89, 0xa4, 0xab, }}, /* Byte value: 0xc7 */ + {{0x30, 0xfe, 0x4d, 0x0c, 0x0c, 0x31, 0x51, 0x86, }}, /* Byte value: 0xc8 */ + {{0x37, 0x62, 0xf2, 0x7d, 0x7d, 0x4d, 0x23, 0xf6, }}, /* Byte value: 0xc9 */ + {{0x6b, 0x7d, 0xa7, 0x6a, 0x6a, 0x83, 0x55, 0x7f, }}, /* Byte value: 0xca */ + {{0xe4, 0x21, 0xff, 0x39, 0x39, 0x91, 0x9a, 0x58, }}, /* Byte value: 0xcb */ + {{0x88, 0xc0, 0xe7, 0x22, 0x22, 0x6e, 0xbd, 0x57, }}, /* Byte value: 0xcc */ + {{0xd9, 0xf2, 0xce, 0xa7, 0xa7, 0xee, 0x9f, 0x0e, }}, /* Byte value: 0xcd */ + {{0xe7, 0xf7, 0x3e, 0x49, 0x49, 0x27, 0x2a, 0x68, }}, /* Byte value: 0xce */ + {{0x89, 0x33, 0x19, 0xb3, 0xb3, 0xbd, 0x6c, 0x47, }}, /* Byte value: 0xcf */ + {{0xe1, 0x98, 0x7f, 0xa9, 0xa9, 0x88, 0x89, 0x08, }}, /* Byte value: 0xd0 */ + {{0x1b, 0xa9, 0x06, 0x76, 0x76, 0x4f, 0x79, 0x73, }}, /* Byte value: 0xd1 */ + {{0x83, 0x82, 0xda, 0x50, 0x50, 0x8f, 0x4a, 0xe7, }}, /* Byte value: 0xd2 */ + {{0x49, 0x4d, 0xee, 0x83, 0x83, 0x79, 0xeb, 0x1a, }}, /* Byte value: 0xd3 */ + {{0x4c, 0xf4, 0x6e, 0x13, 0x13, 0x60, 0xf8, 0x4a, }}, /* Byte value: 0xd4 */ + {{0x3f, 0xf6, 0x0e, 0x7f, 0x7f, 0x1a, 0x64, 0x76, }}, /* Byte value: 0xd5 */ + {{0xf8, 0x14, 0x46, 0x3e, 0x3e, 0xa2, 0x91, 0x5b, }}, /* Byte value: 0xd6 */ + {{0xfe, 0x7b, 0x07, 0xde, 0xde, 0x0d, 0x32, 0x3b, }}, /* Byte value: 0xd7 */ + {{0x8d, 0x79, 0x67, 0xb2, 0xb2, 0x77, 0xae, 0x07, }}, /* Byte value: 0xd8 */ + {{0x53, 0x17, 0x16, 0x64, 0x64, 0xe5, 0x43, 0x79, }}, /* Byte value: 0xd9 */ + {{0xaa, 0xf0, 0xae, 0xcb, 0xcb, 0x94, 0x03, 0x32, }}, /* Byte value: 0xda */ + {{0x90, 0xbf, 0x20, 0x24, 0x24, 0x97, 0x74, 0x14, }}, /* Byte value: 0xdb */ + {{0xca, 0xcf, 0x34, 0xd3, 0xd3, 0xf6, 0xa1, 0xfd, }}, /* Byte value: 0xdc */ + {{0xd8, 0x01, 0x30, 0x36, 0x36, 0x3d, 0x4e, 0x1e, }}, /* Byte value: 0xdd */ + {{0x85, 0xed, 0x9b, 0xb0, 0xb0, 0x20, 0xe9, 0x87, }}, /* Byte value: 0xde */ + {{0x61, 0xcc, 0x64, 0x89, 0x89, 0xb1, 0x73, 0xdf, }}, /* Byte value: 0xdf */ + {{0x20, 0x15, 0x76, 0x08, 0x08, 0x9f, 0xdf, 0x45, }}, /* Byte value: 0xe0 */ + {{0x71, 0x27, 0x5f, 0x8d, 0x8d, 0x1f, 0xfd, 0x1c, }}, /* Byte value: 0xe1 */ + {{0x67, 0xa3, 0x25, 0x69, 0x69, 0x1e, 0xd0, 0xbf, }}, /* Byte value: 0xe2 */ + {{0xa4, 0x0b, 0x13, 0x29, 0x29, 0x6c, 0xe7, 0xd2, }}, /* Byte value: 0xe3 */ + {{0x2d, 0x38, 0x0a, 0x9a, 0x9a, 0xd1, 0x8b, 0x95, }}, /* Byte value: 0xe4 */ + {{0x2b, 0x57, 0x4b, 0x7a, 0x7a, 0x7e, 0x28, 0xf5, }}, /* Byte value: 0xe5 */ + {{0x09, 0x67, 0x02, 0x93, 0x93, 0x84, 0x96, 0x90, }}, /* Byte value: 0xe6 */ + {{0x5b, 0x83, 0xea, 0x66, 0x66, 0xb2, 0x04, 0xf9, }}, /* Byte value: 0xe7 */ + {{0xcb, 0x3c, 0xca, 0x42, 0x42, 0x25, 0x70, 0xed, }}, /* Byte value: 0xe8 */ + {{0x9b, 0xfd, 0x1d, 0x56, 0x56, 0x76, 0x83, 0xa4, }}, /* Byte value: 0xe9 */ + {{0x25, 0xac, 0xf6, 0x98, 0x98, 0x86, 0xcc, 0x15, }}, /* Byte value: 0xea */ + {{0xd0, 0x95, 0xcc, 0x34, 0x34, 0x6a, 0x09, 0x9e, }}, /* Byte value: 0xeb */ + {{0xbe, 0x51, 0xeb, 0xce, 0xce, 0xf0, 0x4f, 0xb1, }}, /* Byte value: 0xec */ + {{0xe5, 0xd2, 0x01, 0xa8, 0xa8, 0x42, 0x4b, 0x48, }}, /* Byte value: 0xed */ + {{0x6c, 0xe1, 0x18, 0x1b, 0x1b, 0xff, 0x27, 0x0f, }}, /* Byte value: 0xee */ + {{0x52, 0xe4, 0xe8, 0xf5, 0xf5, 0x36, 0x92, 0x69, }}, /* Byte value: 0xef */ + {{0x59, 0xa6, 0xd5, 0x87, 0x87, 0xd7, 0x65, 0xd9, }}, /* Byte value: 0xf0 */ + {{0xa6, 0x2e, 0x2c, 0xc8, 0xc8, 0x09, 0x86, 0xf2, }}, /* Byte value: 0xf1 */ + {{0x74, 0x9e, 0xdf, 0x1d, 0x1d, 0x06, 0xee, 0x4c, }}, /* Byte value: 0xf2 */ + {{0xd2, 0xb0, 0xf3, 0xd5, 0xd5, 0x0f, 0x68, 0xbe, }}, /* Byte value: 0xf3 */ + {{0xe6, 0x04, 0xc0, 0xd8, 0xd8, 0xf4, 0xfb, 0x78, }}, /* Byte value: 0xf4 */ + {{0xf4, 0xca, 0xc4, 0x3d, 0x3d, 0x3f, 0x14, 0x9b, }}, /* Byte value: 0xf5 */ + {{0xb4, 0xe0, 0x28, 0x2d, 0x2d, 0xc2, 0x69, 0x11, }}, /* Byte value: 0xf6 */ + {{0xc0, 0x7e, 0xf7, 0x30, 0x30, 0xc4, 0x87, 0x5d, }}, /* Byte value: 0xf7 */ + {{0xd1, 0x66, 0x32, 0xa5, 0xa5, 0xb9, 0xd8, 0x8e, }}, /* Byte value: 0xf8 */ + {{0x66, 0x50, 0xdb, 0xf8, 0xf8, 0xcd, 0x01, 0xaf, }}, /* Byte value: 0xf9 */ + {{0xaf, 0x49, 0x2e, 0x5b, 0x5b, 0x8d, 0x10, 0x62, }}, /* Byte value: 0xfa */ + {{0xc2, 0x5b, 0xc8, 0xd1, 0xd1, 0xa1, 0xe6, 0x7d, }}, /* Byte value: 0xfb */ + {{0x39, 0x99, 0x4f, 0x9f, 0x9f, 0xb5, 0xc7, 0x16, }}, /* Byte value: 0xfc */ + {{0x4b, 0x68, 0xd1, 0x62, 0x62, 0x1c, 0x8a, 0x3a, }}, /* Byte value: 0xfd */ + {{0x63, 0xe9, 0x5b, 0x68, 0x68, 0xd4, 0x12, 0xff, }}, /* Byte value: 0xfe */ + {{0xb6, 0xc5, 0x17, 0xcc, 0xcc, 0xa7, 0x08, 0x31, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 12 */ + {{0x5a, 0x2f, 0xf9, 0x1c, 0x4c, 0xf2, 0x1a, 0x52, }}, /* Byte value: 0x00 */ + {{0x55, 0x48, 0x8b, 0x1e, 0x81, 0xe1, 0x58, 0x1c, }}, /* Byte value: 0x01 */ + {{0x67, 0x5c, 0x45, 0x58, 0xcc, 0xf1, 0x09, 0x1a, }}, /* Byte value: 0x02 */ + {{0xaf, 0x0c, 0xfb, 0x83, 0x3b, 0xb1, 0x8e, 0x02, }}, /* Byte value: 0x03 */ + {{0x68, 0x3b, 0x37, 0x5a, 0x01, 0xe2, 0x4b, 0x54, }}, /* Byte value: 0x04 */ + {{0xe2, 0x62, 0xa0, 0xf2, 0x4f, 0x17, 0xc7, 0xae, }}, /* Byte value: 0x05 */ + {{0xf2, 0xe7, 0x81, 0xb8, 0xe9, 0x6d, 0xd9, 0xcf, }}, /* Byte value: 0x06 */ + {{0x4c, 0x42, 0xec, 0x3d, 0x46, 0xe9, 0x91, 0x1f, }}, /* Byte value: 0x07 */ + {{0xb9, 0x61, 0xee, 0xa2, 0x31, 0xaa, 0x05, 0x4f, }}, /* Byte value: 0x08 */ + {{0x4e, 0x1a, 0x41, 0xa5, 0x22, 0x77, 0xe2, 0xba, }}, /* Byte value: 0x09 */ + {{0xd9, 0xf9, 0x28, 0xdd, 0x63, 0x75, 0x41, 0xca, }}, /* Byte value: 0x0a */ + {{0x84, 0x12, 0x52, 0xe6, 0xb1, 0xa9, 0x16, 0x07, }}, /* Byte value: 0x0b */ + {{0xfd, 0x80, 0xf3, 0xba, 0x24, 0x7e, 0x9b, 0x81, }}, /* Byte value: 0x0c */ + {{0x2e, 0x82, 0x87, 0xda, 0x70, 0xa8, 0xa6, 0x3f, }}, /* Byte value: 0x0d */ + {{0x43, 0x25, 0x9e, 0x3f, 0x8b, 0xfa, 0xd3, 0x51, }}, /* Byte value: 0x0e */ + {{0x1f, 0xe2, 0x53, 0x48, 0x6b, 0x69, 0x5c, 0x2f, }}, /* Byte value: 0x0f */ + {{0xb6, 0x06, 0x9c, 0xa0, 0xfc, 0xb9, 0x47, 0x01, }}, /* Byte value: 0x10 */ + {{0xcb, 0x24, 0xa4, 0x0f, 0xa1, 0x91, 0x2c, 0x0e, }}, /* Byte value: 0x11 */ + {{0x9f, 0x40, 0x98, 0x5d, 0x12, 0x3f, 0xac, 0xa1, }}, /* Byte value: 0x12 */ + {{0xe4, 0x8a, 0x94, 0x99, 0xe3, 0x76, 0x52, 0x82, }}, /* Byte value: 0x13 */ + {{0xd8, 0xd5, 0x9f, 0x91, 0x51, 0x3a, 0x99, 0x79, }}, /* Byte value: 0x14 */ + {{0x58, 0x77, 0x54, 0x84, 0x28, 0x6c, 0x69, 0xf7, }}, /* Byte value: 0x15 */ + {{0x9e, 0x6c, 0x2f, 0x11, 0x20, 0x70, 0x74, 0x12, }}, /* Byte value: 0x16 */ + {{0x63, 0xec, 0xdc, 0xab, 0x04, 0x0e, 0xef, 0x93, }}, /* Byte value: 0x17 */ + {{0x2c, 0xda, 0x2a, 0x42, 0x14, 0x36, 0xd5, 0x9a, }}, /* Byte value: 0x18 */ + {{0x11, 0xa9, 0x96, 0x06, 0x94, 0x35, 0xc6, 0xd2, }}, /* Byte value: 0x19 */ + {{0xff, 0xd8, 0x5e, 0x22, 0x40, 0xe0, 0xe8, 0x24, }}, /* Byte value: 0x1a */ + {{0x03, 0x74, 0x1a, 0xd4, 0x56, 0xd1, 0xab, 0x16, }}, /* Byte value: 0x1b */ + {{0x8c, 0xb1, 0xa3, 0xc3, 0xe2, 0x94, 0x19, 0xd6, }}, /* Byte value: 0x1c */ + {{0xa8, 0xc8, 0x78, 0xa4, 0xa5, 0x9f, 0xc3, 0x9d, }}, /* Byte value: 0x1d */ + {{0x10, 0x85, 0x21, 0x4a, 0xa6, 0x7a, 0x1e, 0x61, }}, /* Byte value: 0x1e */ + {{0x6d, 0xa7, 0x19, 0xe5, 0xfb, 0x52, 0x75, 0x6e, }}, /* Byte value: 0x1f */ + {{0x79, 0x92, 0xa1, 0x5c, 0x95, 0xd7, 0x8d, 0x86, }}, /* Byte value: 0x20 */ + {{0x49, 0xde, 0xc2, 0x82, 0xbc, 0x59, 0xaf, 0x25, }}, /* Byte value: 0x21 */ + {{0xc4, 0x43, 0xd6, 0x0d, 0x6c, 0x82, 0x6e, 0x40, }}, /* Byte value: 0x22 */ + {{0x33, 0x38, 0x79, 0x0a, 0x7f, 0x5f, 0x89, 0xb5, }}, /* Byte value: 0x23 */ + {{0x90, 0x27, 0xea, 0x5f, 0xdf, 0x2c, 0xee, 0xef, }}, /* Byte value: 0x24 */ + {{0xb0, 0xee, 0xa8, 0xcb, 0x50, 0xd8, 0xd2, 0x2d, }}, /* Byte value: 0x25 */ + {{0x35, 0xd0, 0x4d, 0x61, 0xd3, 0x3e, 0x1c, 0x99, }}, /* Byte value: 0x26 */ + {{0x3d, 0x73, 0xbc, 0x44, 0x80, 0x03, 0x13, 0x48, }}, /* Byte value: 0x27 */ + {{0xd7, 0xb2, 0xed, 0x93, 0x9c, 0x29, 0xdb, 0x37, }}, /* Byte value: 0x28 */ + {{0x0a, 0xfb, 0x5c, 0xbd, 0x37, 0xa3, 0x7c, 0x74, }}, /* Byte value: 0x29 */ + {{0x57, 0x10, 0x26, 0x86, 0xe5, 0x7f, 0x2b, 0xb9, }}, /* Byte value: 0x2a */ + {{0x7a, 0xe6, 0xbb, 0x88, 0xc3, 0x06, 0x26, 0x90, }}, /* Byte value: 0x2b */ + {{0x91, 0x0b, 0x5d, 0x13, 0xed, 0x63, 0x36, 0x5c, }}, /* Byte value: 0x2c */ + {{0x60, 0x98, 0xc6, 0x7f, 0x52, 0xdf, 0x44, 0x85, }}, /* Byte value: 0x2d */ + {{0xb2, 0xb6, 0x05, 0x53, 0x34, 0x46, 0xa1, 0x88, }}, /* Byte value: 0x2e */ + {{0xdf, 0x11, 0x1c, 0xb6, 0xcf, 0x14, 0xd4, 0xe6, }}, /* Byte value: 0x2f */ + {{0x23, 0xbd, 0x58, 0x40, 0xd9, 0x25, 0x97, 0xd4, }}, /* Byte value: 0x30 */ + {{0xf4, 0x0f, 0xb5, 0xd3, 0x45, 0x0c, 0x4c, 0xe3, }}, /* Byte value: 0x31 */ + {{0xc0, 0xf3, 0x4f, 0xfe, 0xa4, 0x7d, 0x88, 0xc9, }}, /* Byte value: 0x32 */ + {{0xef, 0x5d, 0x7f, 0x68, 0xe6, 0x9a, 0xf6, 0x45, }}, /* Byte value: 0x33 */ + {{0xf0, 0xbf, 0x2c, 0x20, 0x8d, 0xf3, 0xaa, 0x6a, }}, /* Byte value: 0x34 */ + {{0xa1, 0x47, 0x3e, 0xcd, 0xc4, 0xed, 0x14, 0xff, }}, /* Byte value: 0x35 */ + {{0xd2, 0x2e, 0xc3, 0x2c, 0x66, 0x99, 0xe5, 0x0d, }}, /* Byte value: 0x36 */ + {{0xea, 0xc1, 0x51, 0xd7, 0x1c, 0x2a, 0xc8, 0x7f, }}, /* Byte value: 0x37 */ + {{0x83, 0xd6, 0xd1, 0xc1, 0x2f, 0x87, 0x5b, 0x98, }}, /* Byte value: 0x38 */ + {{0x26, 0x21, 0x76, 0xff, 0x23, 0x95, 0xa9, 0xee, }}, /* Byte value: 0x39 */ + {{0xf5, 0x23, 0x02, 0x9f, 0x77, 0x43, 0x94, 0x50, }}, /* Byte value: 0x3a */ + {{0xfe, 0xf4, 0xe9, 0x6e, 0x72, 0xaf, 0x30, 0x97, }}, /* Byte value: 0x3b */ + {{0x4d, 0x6e, 0x5b, 0x71, 0x74, 0xa6, 0x49, 0xac, }}, /* Byte value: 0x3c */ + {{0x81, 0x8e, 0x7c, 0x59, 0x4b, 0x19, 0x28, 0x3d, }}, /* Byte value: 0x3d */ + {{0x62, 0xc0, 0x6b, 0xe7, 0x36, 0x41, 0x37, 0x20, }}, /* Byte value: 0x3e */ + {{0xaa, 0x90, 0xd5, 0x3c, 0xc1, 0x01, 0xb0, 0x38, }}, /* Byte value: 0x3f */ + {{0x76, 0xf5, 0xd3, 0x5e, 0x58, 0xc4, 0xcf, 0xc8, }}, /* Byte value: 0x40 */ + {{0xd1, 0x5a, 0xd9, 0xf8, 0x30, 0x48, 0x4e, 0x1b, }}, /* Byte value: 0x41 */ + {{0x98, 0x84, 0x1b, 0x7a, 0x8c, 0x11, 0xe1, 0x3e, }}, /* Byte value: 0x42 */ + {{0x15, 0x19, 0x0f, 0xf5, 0x5c, 0xca, 0x20, 0x5b, }}, /* Byte value: 0x43 */ + {{0x16, 0x6d, 0x15, 0x21, 0x0a, 0x1b, 0x8b, 0x4d, }}, /* Byte value: 0x44 */ + {{0x8b, 0x75, 0x20, 0xe4, 0x7c, 0xba, 0x54, 0x49, }}, /* Byte value: 0x45 */ + {{0x3c, 0x5f, 0x0b, 0x08, 0xb2, 0x4c, 0xcb, 0xfb, }}, /* Byte value: 0x46 */ + {{0xcc, 0xe0, 0x27, 0x28, 0x3f, 0xbf, 0x61, 0x91, }}, /* Byte value: 0x47 */ + {{0x5f, 0xb3, 0xd7, 0xa3, 0xb6, 0x42, 0x24, 0x68, }}, /* Byte value: 0x48 */ + {{0x1b, 0x52, 0xca, 0xbb, 0xa3, 0x96, 0xba, 0xa6, }}, /* Byte value: 0x49 */ + {{0x61, 0xb4, 0x71, 0x33, 0x60, 0x90, 0x9c, 0x36, }}, /* Byte value: 0x4a */ + {{0x2a, 0x32, 0x1e, 0x29, 0xb8, 0x57, 0x40, 0xb6, }}, /* Byte value: 0x4b */ + {{0x3a, 0xb7, 0x3f, 0x63, 0x1e, 0x2d, 0x5e, 0xd7, }}, /* Byte value: 0x4c */ + {{0xd4, 0xc6, 0xf7, 0x47, 0xca, 0xf8, 0x70, 0x21, }}, /* Byte value: 0x4d */ + {{0x08, 0xa3, 0xf1, 0x25, 0x53, 0x3d, 0x0f, 0xd1, }}, /* Byte value: 0x4e */ + {{0xc8, 0x50, 0xbe, 0xdb, 0xf7, 0x40, 0x87, 0x18, }}, /* Byte value: 0x4f */ + {{0x06, 0xe8, 0x34, 0x6b, 0xac, 0x61, 0x95, 0x2c, }}, /* Byte value: 0x50 */ + {{0x28, 0x6a, 0xb3, 0xb1, 0xdc, 0xc9, 0x33, 0x13, }}, /* Byte value: 0x51 */ + {{0x05, 0x9c, 0x2e, 0xbf, 0xfa, 0xb0, 0x3e, 0x3a, }}, /* Byte value: 0x52 */ + {{0xf6, 0x57, 0x18, 0x4b, 0x21, 0x92, 0x3f, 0x46, }}, /* Byte value: 0x53 */ + {{0x86, 0x4a, 0xff, 0x7e, 0xd5, 0x37, 0x65, 0xa2, }}, /* Byte value: 0x54 */ + {{0xc5, 0x6f, 0x61, 0x41, 0x5e, 0xcd, 0xb6, 0xf3, }}, /* Byte value: 0x55 */ + {{0xab, 0xbc, 0x62, 0x70, 0xf3, 0x4e, 0x68, 0x8b, }}, /* Byte value: 0x56 */ + {{0x0f, 0x67, 0x72, 0x02, 0xcd, 0x13, 0x42, 0x4e, }}, /* Byte value: 0x57 */ + {{0x40, 0x51, 0x84, 0xeb, 0xdd, 0x2b, 0x78, 0x47, }}, /* Byte value: 0x58 */ + {{0xe8, 0x99, 0xfc, 0x4f, 0x78, 0xb4, 0xbb, 0xda, }}, /* Byte value: 0x59 */ + {{0x6f, 0xff, 0xb4, 0x7d, 0x9f, 0xcc, 0x06, 0xcb, }}, /* Byte value: 0x5a */ + {{0x59, 0x5b, 0xe3, 0xc8, 0x1a, 0x23, 0xb1, 0x44, }}, /* Byte value: 0x5b */ + {{0xbd, 0xd1, 0x77, 0x51, 0xf9, 0x55, 0xe3, 0xc6, }}, /* Byte value: 0x5c */ + {{0xc6, 0x1b, 0x7b, 0x95, 0x08, 0x1c, 0x1d, 0xe5, }}, /* Byte value: 0x5d */ + {{0xd0, 0x76, 0x6e, 0xb4, 0x02, 0x07, 0x96, 0xa8, }}, /* Byte value: 0x5e */ + {{0x54, 0x64, 0x3c, 0x52, 0xb3, 0xae, 0x80, 0xaf, }}, /* Byte value: 0x5f */ + {{0xec, 0x29, 0x65, 0xbc, 0xb0, 0x4b, 0x5d, 0x53, }}, /* Byte value: 0x60 */ + {{0x8a, 0x59, 0x97, 0xa8, 0x4e, 0xf5, 0x8c, 0xfa, }}, /* Byte value: 0x61 */ + {{0xfb, 0x68, 0xc7, 0xd1, 0x88, 0x1f, 0x0e, 0xad, }}, /* Byte value: 0x62 */ + {{0xbb, 0x39, 0x43, 0x3a, 0x55, 0x34, 0x76, 0xea, }}, /* Byte value: 0x63 */ + {{0xcf, 0x94, 0x3d, 0xfc, 0x69, 0x6e, 0xca, 0x87, }}, /* Byte value: 0x64 */ + {{0x0e, 0x4b, 0xc5, 0x4e, 0xff, 0x5c, 0x9a, 0xfd, }}, /* Byte value: 0x65 */ + {{0x3e, 0x07, 0xa6, 0x90, 0xd6, 0xd2, 0xb8, 0x5e, }}, /* Byte value: 0x66 */ + {{0xee, 0x71, 0xc8, 0x24, 0xd4, 0xd5, 0x2e, 0xf6, }}, /* Byte value: 0x67 */ + {{0x3f, 0x2b, 0x11, 0xdc, 0xe4, 0x9d, 0x60, 0xed, }}, /* Byte value: 0x68 */ + {{0x18, 0x26, 0xd0, 0x6f, 0xf5, 0x47, 0x11, 0xb0, }}, /* Byte value: 0x69 */ + {{0xae, 0x20, 0x4c, 0xcf, 0x09, 0xfe, 0x56, 0xb1, }}, /* Byte value: 0x6a */ + {{0x82, 0xfa, 0x66, 0x8d, 0x1d, 0xc8, 0x83, 0x2b, }}, /* Byte value: 0x6b */ + {{0xdd, 0x49, 0xb1, 0x2e, 0xab, 0x8a, 0xa7, 0x43, }}, /* Byte value: 0x6c */ + {{0x7d, 0x22, 0x38, 0xaf, 0x5d, 0x28, 0x6b, 0x0f, }}, /* Byte value: 0x6d */ + {{0xe5, 0xa6, 0x23, 0xd5, 0xd1, 0x39, 0x8a, 0x31, }}, /* Byte value: 0x6e */ + {{0x45, 0xcd, 0xaa, 0x54, 0x27, 0x9b, 0x46, 0x7d, }}, /* Byte value: 0x6f */ + {{0x52, 0x8c, 0x08, 0x39, 0x1f, 0xcf, 0x15, 0x83, }}, /* Byte value: 0x70 */ + {{0x0b, 0xd7, 0xeb, 0xf1, 0x05, 0xec, 0xa4, 0xc7, }}, /* Byte value: 0x71 */ + {{0x29, 0x46, 0x04, 0xfd, 0xee, 0x86, 0xeb, 0xa0, }}, /* Byte value: 0x72 */ + {{0x37, 0x88, 0xe0, 0xf9, 0xb7, 0xa0, 0x6f, 0x3c, }}, /* Byte value: 0x73 */ + {{0xfa, 0x44, 0x70, 0x9d, 0xba, 0x50, 0xd6, 0x1e, }}, /* Byte value: 0x74 */ + {{0xb1, 0xc2, 0x1f, 0x87, 0x62, 0x97, 0x0a, 0x9e, }}, /* Byte value: 0x75 */ + {{0xf1, 0x93, 0x9b, 0x6c, 0xbf, 0xbc, 0x72, 0xd9, }}, /* Byte value: 0x76 */ + {{0x2d, 0xf6, 0x9d, 0x0e, 0x26, 0x79, 0x0d, 0x29, }}, /* Byte value: 0x77 */ + {{0x42, 0x09, 0x29, 0x73, 0xb9, 0xb5, 0x0b, 0xe2, }}, /* Byte value: 0x78 */ + {{0x36, 0xa4, 0x57, 0xb5, 0x85, 0xef, 0xb7, 0x8f, }}, /* Byte value: 0x79 */ + {{0x8e, 0xe9, 0x0e, 0x5b, 0x86, 0x0a, 0x6a, 0x73, }}, /* Byte value: 0x7a */ + {{0xb7, 0x2a, 0x2b, 0xec, 0xce, 0xf6, 0x9f, 0xb2, }}, /* Byte value: 0x7b */ + {{0xad, 0x54, 0x56, 0x1b, 0x5f, 0x2f, 0xfd, 0xa7, }}, /* Byte value: 0x7c */ + {{0x80, 0xa2, 0xcb, 0x15, 0x79, 0x56, 0xf0, 0x8e, }}, /* Byte value: 0x7d */ + {{0xa5, 0xf7, 0xa7, 0x3e, 0x0c, 0x12, 0xf2, 0x76, }}, /* Byte value: 0x7e */ + {{0x96, 0xcf, 0xde, 0x34, 0x73, 0x4d, 0x7b, 0xc3, }}, /* Byte value: 0x7f */ + {{0xa7, 0xaf, 0x0a, 0xa6, 0x68, 0x8c, 0x81, 0xd3, }}, /* Byte value: 0x80 */ + {{0xbc, 0xfd, 0xc0, 0x1d, 0xcb, 0x1a, 0x3b, 0x75, }}, /* Byte value: 0x81 */ + {{0x1e, 0xce, 0xe4, 0x04, 0x59, 0x26, 0x84, 0x9c, }}, /* Byte value: 0x82 */ + {{0x0c, 0x13, 0x68, 0xd6, 0x9b, 0xc2, 0xe9, 0x58, }}, /* Byte value: 0x83 */ + {{0x97, 0xe3, 0x69, 0x78, 0x41, 0x02, 0xa3, 0x70, }}, /* Byte value: 0x84 */ + {{0x6c, 0x8b, 0xae, 0xa9, 0xc9, 0x1d, 0xad, 0xdd, }}, /* Byte value: 0x85 */ + {{0x1a, 0x7e, 0x7d, 0xf7, 0x91, 0xd9, 0x62, 0x15, }}, /* Byte value: 0x86 */ + {{0xeb, 0xed, 0xe6, 0x9b, 0x2e, 0x65, 0x10, 0xcc, }}, /* Byte value: 0x87 */ + {{0x21, 0xe5, 0xf5, 0xd8, 0xbd, 0xbb, 0xe4, 0x71, }}, /* Byte value: 0x88 */ + {{0xce, 0xb8, 0x8a, 0xb0, 0x5b, 0x21, 0x12, 0x34, }}, /* Byte value: 0x89 */ + {{0x41, 0x7d, 0x33, 0xa7, 0xef, 0x64, 0xa0, 0xf4, }}, /* Byte value: 0x8a */ + {{0x1c, 0x96, 0x49, 0x9c, 0x3d, 0xb8, 0xf7, 0x39, }}, /* Byte value: 0x8b */ + {{0xed, 0x05, 0xd2, 0xf0, 0x82, 0x04, 0x85, 0xe0, }}, /* Byte value: 0x8c */ + {{0x9d, 0x18, 0x35, 0xc5, 0x76, 0xa1, 0xdf, 0x04, }}, /* Byte value: 0x8d */ + {{0xc3, 0x87, 0x55, 0x2a, 0xf2, 0xac, 0x23, 0xdf, }}, /* Byte value: 0x8e */ + {{0xa0, 0x6b, 0x89, 0x81, 0xf6, 0xa2, 0xcc, 0x4c, }}, /* Byte value: 0x8f */ + {{0x50, 0xd4, 0xa5, 0xa1, 0x7b, 0x51, 0x66, 0x26, }}, /* Byte value: 0x90 */ + {{0x65, 0x04, 0xe8, 0xc0, 0xa8, 0x6f, 0x7a, 0xbf, }}, /* Byte value: 0x91 */ + {{0x95, 0xbb, 0xc4, 0xe0, 0x25, 0x9c, 0xd0, 0xd5, }}, /* Byte value: 0x92 */ + {{0xc7, 0x37, 0xcc, 0xd9, 0x3a, 0x53, 0xc5, 0x56, }}, /* Byte value: 0x93 */ + {{0x6e, 0xd3, 0x03, 0x31, 0xad, 0x83, 0xde, 0x78, }}, /* Byte value: 0x94 */ + {{0x3b, 0x9b, 0x88, 0x2f, 0x2c, 0x62, 0x86, 0x64, }}, /* Byte value: 0x95 */ + {{0x25, 0x55, 0x6c, 0x2b, 0x75, 0x44, 0x02, 0xf8, }}, /* Byte value: 0x96 */ + {{0xe0, 0x3a, 0x0d, 0x6a, 0x2b, 0x89, 0xb4, 0x0b, }}, /* Byte value: 0x97 */ + {{0x07, 0xc4, 0x83, 0x27, 0x9e, 0x2e, 0x4d, 0x9f, }}, /* Byte value: 0x98 */ + {{0xd6, 0x9e, 0x5a, 0xdf, 0xae, 0x66, 0x03, 0x84, }}, /* Byte value: 0x99 */ + {{0xdb, 0xa1, 0x85, 0x45, 0x07, 0xeb, 0x32, 0x6f, }}, /* Byte value: 0x9a */ + {{0x75, 0x81, 0xc9, 0x8a, 0x0e, 0x15, 0x64, 0xde, }}, /* Byte value: 0x9b */ + {{0xbf, 0x89, 0xda, 0xc9, 0x9d, 0xcb, 0x90, 0x63, }}, /* Byte value: 0x9c */ + {{0x32, 0x14, 0xce, 0x46, 0x4d, 0x10, 0x51, 0x06, }}, /* Byte value: 0x9d */ + {{0x46, 0xb9, 0xb0, 0x80, 0x71, 0x4a, 0xed, 0x6b, }}, /* Byte value: 0x9e */ + {{0xfc, 0xac, 0x44, 0xf6, 0x16, 0x31, 0x43, 0x32, }}, /* Byte value: 0x9f */ + {{0x09, 0x8f, 0x46, 0x69, 0x61, 0x72, 0xd7, 0x62, }}, /* Byte value: 0xa0 */ + {{0x9b, 0xf0, 0x01, 0xae, 0xda, 0xc0, 0x4a, 0x28, }}, /* Byte value: 0xa1 */ + {{0xe7, 0xfe, 0x8e, 0x4d, 0xb5, 0xa7, 0xf9, 0x94, }}, /* Byte value: 0xa2 */ + {{0x88, 0x01, 0x3a, 0x30, 0x2a, 0x6b, 0xff, 0x5f, }}, /* Byte value: 0xa3 */ + {{0xca, 0x08, 0x13, 0x43, 0x93, 0xde, 0xf4, 0xbd, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x27, 0x0d, 0xc1, 0xb3, 0x11, 0xda, 0x71, 0x5d, }}, /* Byte value: 0xa6 */ + {{0xf9, 0x30, 0x6a, 0x49, 0xec, 0x81, 0x7d, 0x08, }}, /* Byte value: 0xa7 */ + {{0x89, 0x2d, 0x8d, 0x7c, 0x18, 0x24, 0x27, 0xec, }}, /* Byte value: 0xa8 */ + {{0xa3, 0x1f, 0x93, 0x55, 0xa0, 0x73, 0x67, 0x5a, }}, /* Byte value: 0xa9 */ + {{0x14, 0x35, 0xb8, 0xb9, 0x6e, 0x85, 0xf8, 0xe8, }}, /* Byte value: 0xaa */ + {{0x77, 0xd9, 0x64, 0x12, 0x6a, 0x8b, 0x17, 0x7b, }}, /* Byte value: 0xab */ + {{0xa4, 0xdb, 0x10, 0x72, 0x3e, 0x5d, 0x2a, 0xc5, }}, /* Byte value: 0xac */ + {{0x1d, 0xba, 0xfe, 0xd0, 0x0f, 0xf7, 0x2f, 0x8a, }}, /* Byte value: 0xad */ + {{0xde, 0x3d, 0xab, 0xfa, 0xfd, 0x5b, 0x0c, 0x55, }}, /* Byte value: 0xae */ + {{0xda, 0x8d, 0x32, 0x09, 0x35, 0xa4, 0xea, 0xdc, }}, /* Byte value: 0xaf */ + {{0x4f, 0x36, 0xf6, 0xe9, 0x10, 0x38, 0x3a, 0x09, }}, /* Byte value: 0xb0 */ + {{0x99, 0xa8, 0xac, 0x36, 0xbe, 0x5e, 0x39, 0x8d, }}, /* Byte value: 0xb1 */ + {{0x39, 0xc3, 0x25, 0xb7, 0x48, 0xfc, 0xf5, 0xc1, }}, /* Byte value: 0xb2 */ + {{0xb8, 0x4d, 0x59, 0xee, 0x03, 0xe5, 0xdd, 0xfc, }}, /* Byte value: 0xb3 */ + {{0xbe, 0xa5, 0x6d, 0x85, 0xaf, 0x84, 0x48, 0xd0, }}, /* Byte value: 0xb4 */ + {{0x70, 0x1d, 0xe7, 0x35, 0xf4, 0xa5, 0x5a, 0xe4, }}, /* Byte value: 0xb5 */ + {{0x56, 0x3c, 0x91, 0xca, 0xd7, 0x30, 0xf3, 0x0a, }}, /* Byte value: 0xb6 */ + {{0x38, 0xef, 0x92, 0xfb, 0x7a, 0xb3, 0x2d, 0x72, }}, /* Byte value: 0xb7 */ + {{0x72, 0x45, 0x4a, 0xad, 0x90, 0x3b, 0x29, 0x41, }}, /* Byte value: 0xb8 */ + {{0x4a, 0xaa, 0xd8, 0x56, 0xea, 0x88, 0x04, 0x33, }}, /* Byte value: 0xb9 */ + {{0xc9, 0x7c, 0x09, 0x97, 0xc5, 0x0f, 0x5f, 0xab, }}, /* Byte value: 0xba */ + {{0x8d, 0x9d, 0x14, 0x8f, 0xd0, 0xdb, 0xc1, 0x65, }}, /* Byte value: 0xbb */ + {{0x01, 0x2c, 0xb7, 0x4c, 0x32, 0x4f, 0xd8, 0xb3, }}, /* Byte value: 0xbc */ + {{0xe1, 0x16, 0xba, 0x26, 0x19, 0xc6, 0x6c, 0xb8, }}, /* Byte value: 0xbd */ + {{0x5b, 0x03, 0x4e, 0x50, 0x7e, 0xbd, 0xc2, 0xe1, }}, /* Byte value: 0xbe */ + {{0xb4, 0x5e, 0x31, 0x38, 0x98, 0x27, 0x34, 0xa4, }}, /* Byte value: 0xbf */ + {{0xe3, 0x4e, 0x17, 0xbe, 0x7d, 0x58, 0x1f, 0x1d, }}, /* Byte value: 0xc0 */ + {{0xf3, 0xcb, 0x36, 0xf4, 0xdb, 0x22, 0x01, 0x7c, }}, /* Byte value: 0xc1 */ + {{0x85, 0x3e, 0xe5, 0xaa, 0x83, 0xe6, 0xce, 0xb4, }}, /* Byte value: 0xc2 */ + {{0xba, 0x15, 0xf4, 0x76, 0x67, 0x7b, 0xae, 0x59, }}, /* Byte value: 0xc3 */ + {{0x34, 0xfc, 0xfa, 0x2d, 0xe1, 0x71, 0xc4, 0x2a, }}, /* Byte value: 0xc4 */ + {{0x2f, 0xae, 0x30, 0x96, 0x42, 0xe7, 0x7e, 0x8c, }}, /* Byte value: 0xc5 */ + {{0x6a, 0x63, 0x9a, 0xc2, 0x65, 0x7c, 0x38, 0xf1, }}, /* Byte value: 0xc6 */ + {{0x7c, 0x0e, 0x8f, 0xe3, 0x6f, 0x67, 0xb3, 0xbc, }}, /* Byte value: 0xc7 */ + {{0x92, 0x7f, 0x47, 0xc7, 0xbb, 0xb2, 0x9d, 0x4a, }}, /* Byte value: 0xc8 */ + {{0x71, 0x31, 0x50, 0x79, 0xc6, 0xea, 0x82, 0x57, }}, /* Byte value: 0xc9 */ + {{0xc1, 0xdf, 0xf8, 0xb2, 0x96, 0x32, 0x50, 0x7a, }}, /* Byte value: 0xca */ + {{0x13, 0xf1, 0x3b, 0x9e, 0xf0, 0xab, 0xb5, 0x77, }}, /* Byte value: 0xcb */ + {{0x31, 0x60, 0xd4, 0x92, 0x1b, 0xc1, 0xfa, 0x10, }}, /* Byte value: 0xcc */ + {{0x24, 0x79, 0xdb, 0x67, 0x47, 0x0b, 0xda, 0x4b, }}, /* Byte value: 0xcd */ + {{0xb3, 0x9a, 0xb2, 0x1f, 0x06, 0x09, 0x79, 0x3b, }}, /* Byte value: 0xce */ + {{0x51, 0xf8, 0x12, 0xed, 0x49, 0x1e, 0xbe, 0x95, }}, /* Byte value: 0xcf */ + {{0x30, 0x4c, 0x63, 0xde, 0x29, 0x8e, 0x22, 0xa3, }}, /* Byte value: 0xd0 */ + {{0xe9, 0xb5, 0x4b, 0x03, 0x4a, 0xfb, 0x63, 0x69, }}, /* Byte value: 0xd1 */ + {{0x17, 0x41, 0xa2, 0x6d, 0x38, 0x54, 0x53, 0xfe, }}, /* Byte value: 0xd2 */ + {{0x5c, 0xc7, 0xcd, 0x77, 0xe0, 0x93, 0x8f, 0x7e, }}, /* Byte value: 0xd3 */ + {{0x7f, 0x7a, 0x95, 0x37, 0x39, 0xb6, 0x18, 0xaa, }}, /* Byte value: 0xd4 */ + {{0xf7, 0x7b, 0xaf, 0x07, 0x13, 0xdd, 0xe7, 0xf5, }}, /* Byte value: 0xd5 */ + {{0x19, 0x0a, 0x67, 0x23, 0xc7, 0x08, 0xc9, 0x03, }}, /* Byte value: 0xd6 */ + {{0x9a, 0xdc, 0xb6, 0xe2, 0xe8, 0x8f, 0x92, 0x9b, }}, /* Byte value: 0xd7 */ + {{0x12, 0xdd, 0x8c, 0xd2, 0xc2, 0xe4, 0x6d, 0xc4, }}, /* Byte value: 0xd8 */ + {{0xd5, 0xea, 0x40, 0x0b, 0xf8, 0xb7, 0xa8, 0x92, }}, /* Byte value: 0xd9 */ + {{0xac, 0x78, 0xe1, 0x57, 0x6d, 0x60, 0x25, 0x14, }}, /* Byte value: 0xda */ + {{0x78, 0xbe, 0x16, 0x10, 0xa7, 0x98, 0x55, 0x35, }}, /* Byte value: 0xdb */ + {{0x4b, 0x86, 0x6f, 0x1a, 0xd8, 0xc7, 0xdc, 0x80, }}, /* Byte value: 0xdc */ + {{0x44, 0xe1, 0x1d, 0x18, 0x15, 0xd4, 0x9e, 0xce, }}, /* Byte value: 0xdd */ + {{0x94, 0x97, 0x73, 0xac, 0x17, 0xd3, 0x08, 0x66, }}, /* Byte value: 0xde */ + {{0x87, 0x66, 0x48, 0x32, 0xe7, 0x78, 0xbd, 0x11, }}, /* Byte value: 0xdf */ + {{0x5d, 0xeb, 0x7a, 0x3b, 0xd2, 0xdc, 0x57, 0xcd, }}, /* Byte value: 0xe0 */ + {{0x48, 0xf2, 0x75, 0xce, 0x8e, 0x16, 0x77, 0x96, }}, /* Byte value: 0xe1 */ + {{0x04, 0xb0, 0x99, 0xf3, 0xc8, 0xff, 0xe6, 0x89, }}, /* Byte value: 0xe2 */ + {{0xa9, 0xe4, 0xcf, 0xe8, 0x97, 0xd0, 0x1b, 0x2e, }}, /* Byte value: 0xe3 */ + {{0xf8, 0x1c, 0xdd, 0x05, 0xde, 0xce, 0xa5, 0xbb, }}, /* Byte value: 0xe4 */ + {{0x7b, 0xca, 0x0c, 0xc4, 0xf1, 0x49, 0xfe, 0x23, }}, /* Byte value: 0xe5 */ + {{0xe6, 0xd2, 0x39, 0x01, 0x87, 0xe8, 0x21, 0x27, }}, /* Byte value: 0xe6 */ + {{0x53, 0xa0, 0xbf, 0x75, 0x2d, 0x80, 0xcd, 0x30, }}, /* Byte value: 0xe7 */ + {{0x2b, 0x1e, 0xa9, 0x65, 0x8a, 0x18, 0x98, 0x05, }}, /* Byte value: 0xe8 */ + {{0x5e, 0x9f, 0x60, 0xef, 0x84, 0x0d, 0xfc, 0xdb, }}, /* Byte value: 0xe9 */ + {{0x7e, 0x56, 0x22, 0x7b, 0x0b, 0xf9, 0xc0, 0x19, }}, /* Byte value: 0xea */ + {{0xc2, 0xab, 0xe2, 0x66, 0xc0, 0xe3, 0xfb, 0x6c, }}, /* Byte value: 0xeb */ + {{0x20, 0xc9, 0x42, 0x94, 0x8f, 0xf4, 0x3c, 0xc2, }}, /* Byte value: 0xec */ + {{0x73, 0x69, 0xfd, 0xe1, 0xa2, 0x74, 0xf1, 0xf2, }}, /* Byte value: 0xed */ + {{0x22, 0x91, 0xef, 0x0c, 0xeb, 0x6a, 0x4f, 0x67, }}, /* Byte value: 0xee */ + {{0xb5, 0x72, 0x86, 0x74, 0xaa, 0x68, 0xec, 0x17, }}, /* Byte value: 0xef */ + {{0x93, 0x53, 0xf0, 0x8b, 0x89, 0xfd, 0x45, 0xf9, }}, /* Byte value: 0xf0 */ + {{0x69, 0x17, 0x80, 0x16, 0x33, 0xad, 0x93, 0xe7, }}, /* Byte value: 0xf1 */ + {{0x6b, 0x4f, 0x2d, 0x8e, 0x57, 0x33, 0xe0, 0x42, }}, /* Byte value: 0xf2 */ + {{0x02, 0x58, 0xad, 0x98, 0x64, 0x9e, 0x73, 0xa5, }}, /* Byte value: 0xf3 */ + {{0xd3, 0x02, 0x74, 0x60, 0x54, 0xd6, 0x3d, 0xbe, }}, /* Byte value: 0xf4 */ + {{0xdc, 0x65, 0x06, 0x62, 0x99, 0xc5, 0x7f, 0xf0, }}, /* Byte value: 0xf5 */ + {{0x66, 0x70, 0xf2, 0x14, 0xfe, 0xbe, 0xd1, 0xa9, }}, /* Byte value: 0xf6 */ + {{0x0d, 0x3f, 0xdf, 0x9a, 0xa9, 0x8d, 0x31, 0xeb, }}, /* Byte value: 0xf7 */ + {{0xa2, 0x33, 0x24, 0x19, 0x92, 0x3c, 0xbf, 0xe9, }}, /* Byte value: 0xf8 */ + {{0x64, 0x28, 0x5f, 0x8c, 0x9a, 0x20, 0xa2, 0x0c, }}, /* Byte value: 0xf9 */ + {{0x8f, 0xc5, 0xb9, 0x17, 0xb4, 0x45, 0xb2, 0xc0, }}, /* Byte value: 0xfa */ + {{0xcd, 0xcc, 0x90, 0x64, 0x0d, 0xf0, 0xb9, 0x22, }}, /* Byte value: 0xfb */ + {{0x74, 0xad, 0x7e, 0xc6, 0x3c, 0x5a, 0xbc, 0x6d, }}, /* Byte value: 0xfc */ + {{0x9c, 0x34, 0x82, 0x89, 0x44, 0xee, 0x07, 0xb7, }}, /* Byte value: 0xfd */ + {{0x47, 0x95, 0x07, 0xcc, 0x43, 0x05, 0x35, 0xd8, }}, /* Byte value: 0xfe */ + {{0xa6, 0x83, 0xbd, 0xea, 0x5a, 0xc3, 0x59, 0x60, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 13 */ + {{0x79, 0x58, 0x80, 0x80, 0x75, 0x80, 0xb7, 0x36, }}, /* Byte value: 0x00 */ + {{0x91, 0xd6, 0x1a, 0x1a, 0x1d, 0x1a, 0x89, 0x33, }}, /* Byte value: 0x01 */ + {{0x99, 0xe9, 0xdc, 0xdc, 0x3b, 0xdc, 0x07, 0x9c, }}, /* Byte value: 0x02 */ + {{0xb9, 0x15, 0x42, 0x42, 0xa3, 0x42, 0x7a, 0x65, }}, /* Byte value: 0x03 */ + {{0x71, 0x67, 0x46, 0x46, 0x53, 0x46, 0x39, 0x99, }}, /* Byte value: 0x04 */ + {{0xea, 0xf1, 0x4a, 0x4a, 0x80, 0x4a, 0xfc, 0x5e, }}, /* Byte value: 0x05 */ + {{0xd7, 0x6c, 0x56, 0x56, 0x15, 0x56, 0xf6, 0xef, }}, /* Byte value: 0x06 */ + {{0x95, 0x28, 0x79, 0x79, 0x0e, 0x79, 0xce, 0x85, }}, /* Byte value: 0x07 */ + {{0x55, 0x65, 0xbb, 0xbb, 0xd8, 0xbb, 0x03, 0xd6, }}, /* Byte value: 0x08 */ + {{0xda, 0x73, 0x9b, 0x9b, 0x54, 0x9b, 0x5e, 0x3a, }}, /* Byte value: 0x09 */ + {{0xdb, 0xad, 0xf3, 0xf3, 0x20, 0xf3, 0x3f, 0xf6, }}, /* Byte value: 0x0a */ + {{0xb5, 0xd4, 0xe7, 0xe7, 0x96, 0xe7, 0xb3, 0x7c, }}, /* Byte value: 0x0b */ + {{0x3f, 0xe2, 0xcc, 0xcc, 0x7d, 0xcc, 0xc8, 0xea, }}, /* Byte value: 0x0c */ + {{0x54, 0xbb, 0xd3, 0xd3, 0xac, 0xd3, 0x62, 0x1a, }}, /* Byte value: 0x0d */ + {{0x7d, 0xa6, 0xe3, 0xe3, 0x66, 0xe3, 0xf0, 0x80, }}, /* Byte value: 0x0e */ + {{0xd5, 0x13, 0x86, 0x86, 0xfd, 0x86, 0x34, 0xb4, }}, /* Byte value: 0x0f */ + {{0xbd, 0xeb, 0x21, 0x21, 0xb0, 0x21, 0x3d, 0xd3, }}, /* Byte value: 0x10 */ + {{0xa9, 0x6b, 0x0d, 0x0d, 0xef, 0x0d, 0xa5, 0xf8, }}, /* Byte value: 0x11 */ + {{0xfe, 0x71, 0x66, 0x66, 0xdf, 0x66, 0x64, 0x75, }}, /* Byte value: 0x12 */ + {{0x3b, 0x1c, 0xaf, 0xaf, 0x6e, 0xaf, 0x8f, 0x5c, }}, /* Byte value: 0x13 */ + {{0x1d, 0x61, 0x82, 0x82, 0x0d, 0x82, 0x77, 0x48, }}, /* Byte value: 0x14 */ + {{0x36, 0x03, 0x62, 0x62, 0x2f, 0x62, 0x27, 0x89, }}, /* Byte value: 0x15 */ + {{0x38, 0xbd, 0x17, 0x17, 0xf2, 0x17, 0x2c, 0xcb, }}, /* Byte value: 0x16 */ + {{0x07, 0x5f, 0xdb, 0xdb, 0x8f, 0xdb, 0xe4, 0x21, }}, /* Byte value: 0x17 */ + {{0x1b, 0xe0, 0x31, 0x31, 0xf6, 0x31, 0xf2, 0xa5, }}, /* Byte value: 0x18 */ + {{0xfb, 0x51, 0x6d, 0x6d, 0xb8, 0x6d, 0x42, 0x0f, }}, /* Byte value: 0x19 */ + {{0x70, 0xb9, 0x2e, 0x2e, 0x27, 0x2e, 0x58, 0x55, }}, /* Byte value: 0x1a */ + {{0x89, 0x97, 0x93, 0x93, 0x77, 0x93, 0xd8, 0x01, }}, /* Byte value: 0x1b */ + {{0x4a, 0x7b, 0xe9, 0xe9, 0x3d, 0xe9, 0xb6, 0xc5, }}, /* Byte value: 0x1c */ + {{0xae, 0x34, 0xd6, 0xd6, 0x60, 0xd6, 0x41, 0xd9, }}, /* Byte value: 0x1d */ + {{0x3d, 0x9d, 0x1c, 0x1c, 0x95, 0x1c, 0x0a, 0xb1, }}, /* Byte value: 0x1e */ + {{0x29, 0x1d, 0x30, 0x30, 0xca, 0x30, 0x92, 0x9a, }}, /* Byte value: 0x1f */ + {{0x8a, 0x36, 0x2b, 0x2b, 0xeb, 0x2b, 0x7b, 0x96, }}, /* Byte value: 0x20 */ + {{0xcd, 0x52, 0x0f, 0x0f, 0x97, 0x0f, 0x65, 0x86, }}, /* Byte value: 0x21 */ + {{0x41, 0xe5, 0x97, 0x97, 0x87, 0x97, 0x9b, 0xfd, }}, /* Byte value: 0x22 */ + {{0xce, 0xf3, 0xb7, 0xb7, 0x0b, 0xb7, 0xc6, 0x11, }}, /* Byte value: 0x23 */ + {{0x16, 0xff, 0xfc, 0xfc, 0xb7, 0xfc, 0x5a, 0x70, }}, /* Byte value: 0x24 */ + {{0x6c, 0x06, 0xc4, 0xc4, 0x5e, 0xc4, 0x4e, 0xd1, }}, /* Byte value: 0x25 */ + {{0x1f, 0x1e, 0x52, 0x52, 0xe5, 0x52, 0xb5, 0x13, }}, /* Byte value: 0x26 */ + {{0xe0, 0xb1, 0x5c, 0x5c, 0x4e, 0x5c, 0xb0, 0xaa, }}, /* Byte value: 0x27 */ + {{0xf5, 0xef, 0x18, 0x18, 0x65, 0x18, 0x49, 0x4d, }}, /* Byte value: 0x28 */ + {{0xb0, 0xf4, 0xec, 0xec, 0xf1, 0xec, 0x95, 0x06, }}, /* Byte value: 0x29 */ + {{0xde, 0x8d, 0xf8, 0xf8, 0x47, 0xf8, 0x19, 0x8c, }}, /* Byte value: 0x2a */ + {{0x03, 0xa1, 0xb8, 0xb8, 0x9c, 0xb8, 0xa3, 0x97, }}, /* Byte value: 0x2b */ + {{0xd0, 0x33, 0x8d, 0x8d, 0x9a, 0x8d, 0x12, 0xce, }}, /* Byte value: 0x2c */ + {{0x8e, 0xc8, 0x48, 0x48, 0xf8, 0x48, 0x3c, 0x20, }}, /* Byte value: 0x2d */ + {{0x23, 0x5d, 0x26, 0x26, 0x04, 0x26, 0xde, 0x6e, }}, /* Byte value: 0x2e */ + {{0x0a, 0x40, 0x16, 0x16, 0xce, 0x16, 0x4c, 0xf4, }}, /* Byte value: 0x2f */ + {{0xf3, 0x6e, 0xab, 0xab, 0x9e, 0xab, 0xcc, 0xa0, }}, /* Byte value: 0x30 */ + {{0x06, 0x81, 0xb3, 0xb3, 0xfb, 0xb3, 0x85, 0xed, }}, /* Byte value: 0x31 */ + {{0xdf, 0x53, 0x90, 0x90, 0x33, 0x90, 0x78, 0x40, }}, /* Byte value: 0x32 */ + {{0x4d, 0x24, 0x32, 0x32, 0xb2, 0x32, 0x52, 0xe4, }}, /* Byte value: 0x33 */ + {{0x98, 0x37, 0xb4, 0xb4, 0x4f, 0xb4, 0x66, 0x50, }}, /* Byte value: 0x34 */ + {{0x97, 0x57, 0xa9, 0xa9, 0xe6, 0xa9, 0x0c, 0xde, }}, /* Byte value: 0x35 */ + {{0xad, 0x95, 0x6e, 0x6e, 0xfc, 0x6e, 0xe2, 0x4e, }}, /* Byte value: 0x36 */ + {{0x15, 0x5e, 0x44, 0x44, 0x2b, 0x44, 0xf9, 0xe7, }}, /* Byte value: 0x37 */ + {{0xa2, 0xf5, 0x73, 0x73, 0x55, 0x73, 0x88, 0xc0, }}, /* Byte value: 0x38 */ + {{0xab, 0x14, 0xdd, 0xdd, 0x07, 0xdd, 0x67, 0xa3, }}, /* Byte value: 0x39 */ + {{0xc0, 0x4d, 0xc2, 0xc2, 0xd6, 0xc2, 0xcd, 0x53, }}, /* Byte value: 0x3a */ + {{0xb6, 0x75, 0x5f, 0x5f, 0x0a, 0x5f, 0x10, 0xeb, }}, /* Byte value: 0x3b */ + {{0x53, 0xe4, 0x08, 0x08, 0x23, 0x08, 0x86, 0x3b, }}, /* Byte value: 0x3c */ + {{0xed, 0xae, 0x91, 0x91, 0x0f, 0x91, 0x18, 0x7f, }}, /* Byte value: 0x3d */ + {{0xc1, 0x93, 0xaa, 0xaa, 0xa2, 0xaa, 0xac, 0x9f, }}, /* Byte value: 0x3e */ + {{0xe1, 0x6f, 0x34, 0x34, 0x3a, 0x34, 0xd1, 0x66, }}, /* Byte value: 0x3f */ + {{0x62, 0xb8, 0xb1, 0xb1, 0x83, 0xb1, 0x45, 0x93, }}, /* Byte value: 0x40 */ + {{0x24, 0x02, 0xfd, 0xfd, 0x8b, 0xfd, 0x3a, 0x4f, }}, /* Byte value: 0x41 */ + {{0xe9, 0x50, 0xf2, 0xf2, 0x1c, 0xf2, 0x5f, 0xc9, }}, /* Byte value: 0x42 */ + {{0x65, 0xe7, 0x6a, 0x6a, 0x0c, 0x6a, 0xa1, 0xb2, }}, /* Byte value: 0x43 */ + {{0xec, 0x70, 0xf9, 0xf9, 0x7b, 0xf9, 0x79, 0xb3, }}, /* Byte value: 0x44 */ + {{0x5d, 0x5a, 0x7d, 0x7d, 0xfe, 0x7d, 0x8d, 0x79, }}, /* Byte value: 0x45 */ + {{0x26, 0x7d, 0x2d, 0x2d, 0x63, 0x2d, 0xf8, 0x14, }}, /* Byte value: 0x46 */ + {{0xbe, 0x4a, 0x99, 0x99, 0x2c, 0x99, 0x9e, 0x44, }}, /* Byte value: 0x47 */ + {{0x21, 0x22, 0xf6, 0xf6, 0xec, 0xf6, 0x1c, 0x35, }}, /* Byte value: 0x48 */ + {{0x4b, 0xa5, 0x81, 0x81, 0x49, 0x81, 0xd7, 0x09, }}, /* Byte value: 0x49 */ + {{0x48, 0x04, 0x39, 0x39, 0xd5, 0x39, 0x74, 0x9e, }}, /* Byte value: 0x4a */ + {{0xca, 0x0d, 0xd4, 0xd4, 0x18, 0xd4, 0x81, 0xa7, }}, /* Byte value: 0x4b */ + {{0xf7, 0x90, 0xc8, 0xc8, 0x8d, 0xc8, 0x8b, 0x16, }}, /* Byte value: 0x4c */ + {{0x7c, 0x78, 0x8b, 0x8b, 0x12, 0x8b, 0x91, 0x4c, }}, /* Byte value: 0x4d */ + {{0xff, 0xaf, 0x0e, 0x0e, 0xab, 0x0e, 0x05, 0xb9, }}, /* Byte value: 0x4e */ + {{0x20, 0xfc, 0x9e, 0x9e, 0x98, 0x9e, 0x7d, 0xf9, }}, /* Byte value: 0x4f */ + {{0xd1, 0xed, 0xe5, 0xe5, 0xee, 0xe5, 0x73, 0x02, }}, /* Byte value: 0x50 */ + {{0x85, 0x56, 0x36, 0x36, 0x42, 0x36, 0x11, 0x18, }}, /* Byte value: 0x51 */ + {{0x58, 0x7a, 0x76, 0x76, 0x99, 0x76, 0xab, 0x03, }}, /* Byte value: 0x52 */ + {{0x49, 0xda, 0x51, 0x51, 0xa1, 0x51, 0x15, 0x52, }}, /* Byte value: 0x53 */ + {{0xfa, 0x8f, 0x05, 0x05, 0xcc, 0x05, 0x23, 0xc3, }}, /* Byte value: 0x54 */ + {{0x87, 0x29, 0xe6, 0xe6, 0xaa, 0xe6, 0xd3, 0x43, }}, /* Byte value: 0x55 */ + {{0x27, 0xa3, 0x45, 0x45, 0x17, 0x45, 0x99, 0xd8, }}, /* Byte value: 0x56 */ + {{0xe8, 0x8e, 0x9a, 0x9a, 0x68, 0x9a, 0x3e, 0x05, }}, /* Byte value: 0x57 */ + {{0xf4, 0x31, 0x70, 0x70, 0x11, 0x70, 0x28, 0x81, }}, /* Byte value: 0x58 */ + {{0x5a, 0x05, 0xa6, 0xa6, 0x71, 0xa6, 0x69, 0x58, }}, /* Byte value: 0x59 */ + {{0x66, 0x46, 0xd2, 0xd2, 0x90, 0xd2, 0x02, 0x25, }}, /* Byte value: 0x5a */ + {{0xf0, 0xcf, 0x13, 0x13, 0x02, 0x13, 0x6f, 0x37, }}, /* Byte value: 0x5b */ + {{0xcb, 0xd3, 0xbc, 0xbc, 0x6c, 0xbc, 0xe0, 0x6b, }}, /* Byte value: 0x5c */ + {{0x0e, 0xbe, 0x75, 0x75, 0xdd, 0x75, 0x0b, 0x42, }}, /* Byte value: 0x5d */ + {{0xe2, 0xce, 0x8c, 0x8c, 0xa6, 0x8c, 0x72, 0xf1, }}, /* Byte value: 0x5e */ + {{0x57, 0x1a, 0x6b, 0x6b, 0x30, 0x6b, 0xc1, 0x8d, }}, /* Byte value: 0x5f */ + {{0xc4, 0xb3, 0xa1, 0xa1, 0xc5, 0xa1, 0x8a, 0xe5, }}, /* Byte value: 0x60 */ + {{0x9b, 0x96, 0x0c, 0x0c, 0xd3, 0x0c, 0xc5, 0xc7, }}, /* Byte value: 0x61 */ + {{0xee, 0x0f, 0x29, 0x29, 0x93, 0x29, 0xbb, 0xe8, }}, /* Byte value: 0x62 */ + {{0x1a, 0x3e, 0x59, 0x59, 0x82, 0x59, 0x93, 0x69, }}, /* Byte value: 0x63 */ + {{0x37, 0xdd, 0x0a, 0x0a, 0x5b, 0x0a, 0x46, 0x45, }}, /* Byte value: 0x64 */ + {{0x2e, 0x42, 0xeb, 0xeb, 0x45, 0xeb, 0x76, 0xbb, }}, /* Byte value: 0x65 */ + {{0x69, 0x26, 0xcf, 0xcf, 0x39, 0xcf, 0x68, 0xab, }}, /* Byte value: 0x66 */ + {{0x8b, 0xe8, 0x43, 0x43, 0x9f, 0x43, 0x1a, 0x5a, }}, /* Byte value: 0x67 */ + {{0xaf, 0xea, 0xbe, 0xbe, 0x14, 0xbe, 0x20, 0x15, }}, /* Byte value: 0x68 */ + {{0xc2, 0x32, 0x12, 0x12, 0x3e, 0x12, 0x0f, 0x08, }}, /* Byte value: 0x69 */ + {{0x7f, 0xd9, 0x33, 0x33, 0x8e, 0x33, 0x32, 0xdb, }}, /* Byte value: 0x6a */ + {{0x64, 0x39, 0x02, 0x02, 0x78, 0x02, 0xc0, 0x7e, }}, /* Byte value: 0x6b */ + {{0x45, 0x1b, 0xf4, 0xf4, 0x94, 0xf4, 0xdc, 0x4b, }}, /* Byte value: 0x6c */ + {{0x14, 0x80, 0x2c, 0x2c, 0x5f, 0x2c, 0x98, 0x2b, }}, /* Byte value: 0x6d */ + {{0xfd, 0xd0, 0xde, 0xde, 0x43, 0xde, 0xc7, 0xe2, }}, /* Byte value: 0x6e */ + {{0xac, 0x4b, 0x06, 0x06, 0x88, 0x06, 0x83, 0x82, }}, /* Byte value: 0x6f */ + {{0x86, 0xf7, 0x8e, 0x8e, 0xde, 0x8e, 0xb2, 0x8f, }}, /* Byte value: 0x70 */ + {{0x76, 0x38, 0x9d, 0x9d, 0xdc, 0x9d, 0xdd, 0xb8, }}, /* Byte value: 0x71 */ + {{0x43, 0x9a, 0x47, 0x47, 0x6f, 0x47, 0x59, 0xa6, }}, /* Byte value: 0x72 */ + {{0x50, 0x45, 0xb0, 0xb0, 0xbf, 0xb0, 0x25, 0xac, }}, /* Byte value: 0x73 */ + {{0x28, 0xc3, 0x58, 0x58, 0xbe, 0x58, 0xf3, 0x56, }}, /* Byte value: 0x74 */ + {{0xaa, 0xca, 0xb5, 0xb5, 0x73, 0xb5, 0x06, 0x6f, }}, /* Byte value: 0x75 */ + {{0x5e, 0xfb, 0xc5, 0xc5, 0x62, 0xc5, 0x2e, 0xee, }}, /* Byte value: 0x76 */ + {{0xdd, 0x2c, 0x40, 0x40, 0xdb, 0x40, 0xba, 0x1b, }}, /* Byte value: 0x77 */ + {{0xbb, 0x6a, 0x92, 0x92, 0x4b, 0x92, 0xb8, 0x3e, }}, /* Byte value: 0x78 */ + {{0x96, 0x89, 0xc1, 0xc1, 0x92, 0xc1, 0x6d, 0x12, }}, /* Byte value: 0x79 */ + {{0x05, 0x20, 0x0b, 0x0b, 0x67, 0x0b, 0x26, 0x7a, }}, /* Byte value: 0x7a */ + {{0x7b, 0x27, 0x50, 0x50, 0x9d, 0x50, 0x75, 0x6d, }}, /* Byte value: 0x7b */ + {{0xf6, 0x4e, 0xa0, 0xa0, 0xf9, 0xa0, 0xea, 0xda, }}, /* Byte value: 0x7c */ + {{0x2b, 0x62, 0xe0, 0xe0, 0x22, 0xe0, 0x50, 0xc1, }}, /* Byte value: 0x7d */ + {{0x09, 0xe1, 0xae, 0xae, 0x52, 0xae, 0xef, 0x63, }}, /* Byte value: 0x7e */ + {{0xc7, 0x12, 0x19, 0x19, 0x59, 0x19, 0x29, 0x72, }}, /* Byte value: 0x7f */ + {{0x46, 0xba, 0x4c, 0x4c, 0x08, 0x4c, 0x7f, 0xdc, }}, /* Byte value: 0x80 */ + {{0x0d, 0x1f, 0xcd, 0xcd, 0x41, 0xcd, 0xa8, 0xd5, }}, /* Byte value: 0x81 */ + {{0x13, 0xdf, 0xf7, 0xf7, 0xd0, 0xf7, 0x7c, 0x0a, }}, /* Byte value: 0x82 */ + {{0x61, 0x19, 0x09, 0x09, 0x1f, 0x09, 0xe6, 0x04, }}, /* Byte value: 0x83 */ + {{0x01, 0xde, 0x68, 0x68, 0x74, 0x68, 0x61, 0xcc, }}, /* Byte value: 0x84 */ + {{0xef, 0xd1, 0x41, 0x41, 0xe7, 0x41, 0xda, 0x24, }}, /* Byte value: 0x85 */ + {{0x8d, 0x69, 0xf0, 0xf0, 0x64, 0xf0, 0x9f, 0xb7, }}, /* Byte value: 0x86 */ + {{0xd3, 0x92, 0x35, 0x35, 0x06, 0x35, 0xb1, 0x59, }}, /* Byte value: 0x87 */ + {{0xbc, 0x35, 0x49, 0x49, 0xc4, 0x49, 0x5c, 0x1f, }}, /* Byte value: 0x88 */ + {{0xf1, 0x11, 0x7b, 0x7b, 0x76, 0x7b, 0x0e, 0xfb, }}, /* Byte value: 0x89 */ + {{0x32, 0xfd, 0x01, 0x01, 0x3c, 0x01, 0x60, 0x3f, }}, /* Byte value: 0x8a */ + {{0x5c, 0x84, 0x15, 0x15, 0x8a, 0x15, 0xec, 0xb5, }}, /* Byte value: 0x8b */ + {{0x02, 0x7f, 0xd0, 0xd0, 0xe8, 0xd0, 0xc2, 0x5b, }}, /* Byte value: 0x8c */ + {{0xb1, 0x2a, 0x84, 0x84, 0x85, 0x84, 0xf4, 0xca, }}, /* Byte value: 0x8d */ + {{0x56, 0xc4, 0x03, 0x03, 0x44, 0x03, 0xa0, 0x41, }}, /* Byte value: 0x8e */ + {{0x51, 0x9b, 0xd8, 0xd8, 0xcb, 0xd8, 0x44, 0x60, }}, /* Byte value: 0x8f */ + {{0xc9, 0xac, 0x6c, 0x6c, 0x84, 0x6c, 0x22, 0x30, }}, /* Byte value: 0x90 */ + {{0xd6, 0xb2, 0x3e, 0x3e, 0x61, 0x3e, 0x97, 0x23, }}, /* Byte value: 0x91 */ + {{0x4e, 0x85, 0x8a, 0x8a, 0x2e, 0x8a, 0xf1, 0x73, }}, /* Byte value: 0x92 */ + {{0xc8, 0x72, 0x04, 0x04, 0xf0, 0x04, 0x43, 0xfc, }}, /* Byte value: 0x93 */ + {{0xa0, 0x8a, 0xa3, 0xa3, 0xbd, 0xa3, 0x4a, 0x9b, }}, /* Byte value: 0x94 */ + {{0x31, 0x5c, 0xb9, 0xb9, 0xa0, 0xb9, 0xc3, 0xa8, }}, /* Byte value: 0x95 */ + {{0x22, 0x83, 0x4e, 0x4e, 0x70, 0x4e, 0xbf, 0xa2, }}, /* Byte value: 0x96 */ + {{0xa5, 0xaa, 0xa8, 0xa8, 0xda, 0xa8, 0x6c, 0xe1, }}, /* Byte value: 0x97 */ + {{0x17, 0x21, 0x94, 0x94, 0xc3, 0x94, 0x3b, 0xbc, }}, /* Byte value: 0x98 */ + {{0x33, 0x23, 0x69, 0x69, 0x48, 0x69, 0x01, 0xf3, }}, /* Byte value: 0x99 */ + {{0x94, 0xf6, 0x11, 0x11, 0x7a, 0x11, 0xaf, 0x49, }}, /* Byte value: 0x9a */ + {{0xeb, 0x2f, 0x22, 0x22, 0xf4, 0x22, 0x9d, 0x92, }}, /* Byte value: 0x9b */ + {{0x84, 0x88, 0x5e, 0x5e, 0x36, 0x5e, 0x70, 0xd4, }}, /* Byte value: 0x9c */ + {{0x08, 0x3f, 0xc6, 0xc6, 0x26, 0xc6, 0x8e, 0xaf, }}, /* Byte value: 0x9d */ + {{0x25, 0xdc, 0x95, 0x95, 0xff, 0x95, 0x5b, 0x83, }}, /* Byte value: 0x9e */ + {{0xf9, 0x2e, 0xbd, 0xbd, 0x50, 0xbd, 0x80, 0x54, }}, /* Byte value: 0x9f */ + {{0x39, 0x63, 0x7f, 0x7f, 0x86, 0x7f, 0x4d, 0x07, }}, /* Byte value: 0xa0 */ + {{0x60, 0xc7, 0x61, 0x61, 0x6b, 0x61, 0x87, 0xc8, }}, /* Byte value: 0xa1 */ + {{0xb2, 0x8b, 0x3c, 0x3c, 0x19, 0x3c, 0x57, 0x5d, }}, /* Byte value: 0xa2 */ + {{0xd4, 0xcd, 0xee, 0xee, 0x89, 0xee, 0x55, 0x78, }}, /* Byte value: 0xa3 */ + {{0x6f, 0xa7, 0x7c, 0x7c, 0xc2, 0x7c, 0xed, 0x46, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x6d, 0xd8, 0xac, 0xac, 0x2a, 0xac, 0x2f, 0x1d, }}, /* Byte value: 0xa6 */ + {{0xa1, 0x54, 0xcb, 0xcb, 0xc9, 0xcb, 0x2b, 0x57, }}, /* Byte value: 0xa7 */ + {{0x12, 0x01, 0x9f, 0x9f, 0xa4, 0x9f, 0x1d, 0xc6, }}, /* Byte value: 0xa8 */ + {{0xd8, 0x0c, 0x4b, 0x4b, 0xbc, 0x4b, 0x9c, 0x61, }}, /* Byte value: 0xa9 */ + {{0xa3, 0x2b, 0x1b, 0x1b, 0x21, 0x1b, 0xe9, 0x0c, }}, /* Byte value: 0xaa */ + {{0xa4, 0x74, 0xc0, 0xc0, 0xae, 0xc0, 0x0d, 0x2d, }}, /* Byte value: 0xab */ + {{0xcf, 0x2d, 0xdf, 0xdf, 0x7f, 0xdf, 0xa7, 0xdd, }}, /* Byte value: 0xac */ + {{0x9a, 0x48, 0x64, 0x64, 0xa7, 0x64, 0xa4, 0x0b, }}, /* Byte value: 0xad */ + {{0xcc, 0x8c, 0x67, 0x67, 0xe3, 0x67, 0x04, 0x4a, }}, /* Byte value: 0xae */ + {{0x52, 0x3a, 0x60, 0x60, 0x57, 0x60, 0xe7, 0xf7, }}, /* Byte value: 0xaf */ + {{0x1c, 0xbf, 0xea, 0xea, 0x79, 0xea, 0x16, 0x84, }}, /* Byte value: 0xb0 */ + {{0x2f, 0x9c, 0x83, 0x83, 0x31, 0x83, 0x17, 0x77, }}, /* Byte value: 0xb1 */ + {{0x7e, 0x07, 0x5b, 0x5b, 0xfa, 0x5b, 0x53, 0x17, }}, /* Byte value: 0xb2 */ + {{0x93, 0xa9, 0xca, 0xca, 0xf5, 0xca, 0x4b, 0x68, }}, /* Byte value: 0xb3 */ + {{0x42, 0x44, 0x2f, 0x2f, 0x1b, 0x2f, 0x38, 0x6a, }}, /* Byte value: 0xb4 */ + {{0xb3, 0x55, 0x54, 0x54, 0x6d, 0x54, 0x36, 0x91, }}, /* Byte value: 0xb5 */ + {{0x18, 0x41, 0x89, 0x89, 0x6a, 0x89, 0x51, 0x32, }}, /* Byte value: 0xb6 */ + {{0xb8, 0xcb, 0x2a, 0x2a, 0xd7, 0x2a, 0x1b, 0xa9, }}, /* Byte value: 0xb7 */ + {{0xfc, 0x0e, 0xb6, 0xb6, 0x37, 0xb6, 0xa6, 0x2e, }}, /* Byte value: 0xb8 */ + {{0x44, 0xc5, 0x9c, 0x9c, 0xe0, 0x9c, 0xbd, 0x87, }}, /* Byte value: 0xb9 */ + {{0xe6, 0x30, 0xef, 0xef, 0xb5, 0xef, 0x35, 0x47, }}, /* Byte value: 0xba */ + {{0x8c, 0xb7, 0x98, 0x98, 0x10, 0x98, 0xfe, 0x7b, }}, /* Byte value: 0xbb */ + {{0xc6, 0xcc, 0x71, 0x71, 0x2d, 0x71, 0x48, 0xbe, }}, /* Byte value: 0xbc */ + {{0x63, 0x66, 0xd9, 0xd9, 0xf7, 0xd9, 0x24, 0x5f, }}, /* Byte value: 0xbd */ + {{0xbf, 0x94, 0xf1, 0xf1, 0x58, 0xf1, 0xff, 0x88, }}, /* Byte value: 0xbe */ + {{0xf2, 0xb0, 0xc3, 0xc3, 0xea, 0xc3, 0xad, 0x6c, }}, /* Byte value: 0xbf */ + {{0x2c, 0x3d, 0x3b, 0x3b, 0xad, 0x3b, 0xb4, 0xe0, }}, /* Byte value: 0xc0 */ + {{0x11, 0xa0, 0x27, 0x27, 0x38, 0x27, 0xbe, 0x51, }}, /* Byte value: 0xc1 */ + {{0x73, 0x18, 0x96, 0x96, 0xbb, 0x96, 0xfb, 0xc2, }}, /* Byte value: 0xc2 */ + {{0xdc, 0xf2, 0x28, 0x28, 0xaf, 0x28, 0xdb, 0xd7, }}, /* Byte value: 0xc3 */ + {{0xd9, 0xd2, 0x23, 0x23, 0xc8, 0x23, 0xfd, 0xad, }}, /* Byte value: 0xc4 */ + {{0x92, 0x77, 0xa2, 0xa2, 0x81, 0xa2, 0x2a, 0xa4, }}, /* Byte value: 0xc5 */ + {{0x3e, 0x3c, 0xa4, 0xa4, 0x09, 0xa4, 0xa9, 0x26, }}, /* Byte value: 0xc6 */ + {{0xd2, 0x4c, 0x5d, 0x5d, 0x72, 0x5d, 0xd0, 0x95, }}, /* Byte value: 0xc7 */ + {{0x59, 0xa4, 0x1e, 0x1e, 0xed, 0x1e, 0xca, 0xcf, }}, /* Byte value: 0xc8 */ + {{0x75, 0x99, 0x25, 0x25, 0x40, 0x25, 0x7e, 0x2f, }}, /* Byte value: 0xc9 */ + {{0x19, 0x9f, 0xe1, 0xe1, 0x1e, 0xe1, 0x30, 0xfe, }}, /* Byte value: 0xca */ + {{0xb4, 0x0a, 0x8f, 0x8f, 0xe2, 0x8f, 0xd2, 0xb0, }}, /* Byte value: 0xcb */ + {{0x81, 0xa8, 0x55, 0x55, 0x51, 0x55, 0x56, 0xae, }}, /* Byte value: 0xcc */ + {{0xe4, 0x4f, 0x3f, 0x3f, 0x5d, 0x3f, 0xf7, 0x1c, }}, /* Byte value: 0xcd */ + {{0xe5, 0x91, 0x57, 0x57, 0x29, 0x57, 0x96, 0xd0, }}, /* Byte value: 0xce */ + {{0x0f, 0x60, 0x1d, 0x1d, 0xa9, 0x1d, 0x6a, 0x8e, }}, /* Byte value: 0xcf */ + {{0x47, 0x64, 0x24, 0x24, 0x7c, 0x24, 0x1e, 0x10, }}, /* Byte value: 0xd0 */ + {{0x9c, 0xc9, 0xd7, 0xd7, 0x5c, 0xd7, 0x21, 0xe6, }}, /* Byte value: 0xd1 */ + {{0x2a, 0xbc, 0x88, 0x88, 0x56, 0x88, 0x31, 0x0d, }}, /* Byte value: 0xd2 */ + {{0xa8, 0xb5, 0x65, 0x65, 0x9b, 0x65, 0xc4, 0x34, }}, /* Byte value: 0xd3 */ + {{0x5b, 0xdb, 0xce, 0xce, 0x05, 0xce, 0x08, 0x94, }}, /* Byte value: 0xd4 */ + {{0x8f, 0x16, 0x20, 0x20, 0x8c, 0x20, 0x5d, 0xec, }}, /* Byte value: 0xd5 */ + {{0x04, 0xfe, 0x63, 0x63, 0x13, 0x63, 0x47, 0xb6, }}, /* Byte value: 0xd6 */ + {{0xa6, 0x0b, 0x10, 0x10, 0x46, 0x10, 0xcf, 0x76, }}, /* Byte value: 0xd7 */ + {{0x72, 0xc6, 0xfe, 0xfe, 0xcf, 0xfe, 0x9a, 0x0e, }}, /* Byte value: 0xd8 */ + {{0xba, 0xb4, 0xfa, 0xfa, 0x3f, 0xfa, 0xd9, 0xf2, }}, /* Byte value: 0xd9 */ + {{0x30, 0x82, 0xd1, 0xd1, 0xd4, 0xd1, 0xa2, 0x64, }}, /* Byte value: 0xda */ + {{0x4c, 0xfa, 0x5a, 0x5a, 0xc6, 0x5a, 0x33, 0x28, }}, /* Byte value: 0xdb */ + {{0x82, 0x09, 0xed, 0xed, 0xcd, 0xed, 0xf5, 0x39, }}, /* Byte value: 0xdc */ + {{0x6a, 0x87, 0x77, 0x77, 0xa5, 0x77, 0xcb, 0x3c, }}, /* Byte value: 0xdd */ + {{0x88, 0x49, 0xfb, 0xfb, 0x03, 0xfb, 0xb9, 0xcd, }}, /* Byte value: 0xde */ + {{0x3c, 0x43, 0x74, 0x74, 0xe1, 0x74, 0x6b, 0x7d, }}, /* Byte value: 0xdf */ + {{0x6e, 0x79, 0x14, 0x14, 0xb6, 0x14, 0x8c, 0x8a, }}, /* Byte value: 0xe0 */ + {{0x0b, 0x9e, 0x7e, 0x7e, 0xba, 0x7e, 0x2d, 0x38, }}, /* Byte value: 0xe1 */ + {{0x9e, 0xb6, 0x07, 0x07, 0xb4, 0x07, 0xe3, 0xbd, }}, /* Byte value: 0xe2 */ + {{0x68, 0xf8, 0xa7, 0xa7, 0x4d, 0xa7, 0x09, 0x67, }}, /* Byte value: 0xe3 */ + {{0x67, 0x98, 0xba, 0xba, 0xe4, 0xba, 0x63, 0xe9, }}, /* Byte value: 0xe4 */ + {{0xc5, 0x6d, 0xc9, 0xc9, 0xb1, 0xc9, 0xeb, 0x29, }}, /* Byte value: 0xe5 */ + {{0x74, 0x47, 0x4d, 0x4d, 0x34, 0x4d, 0x1f, 0xe3, }}, /* Byte value: 0xe6 */ + {{0x40, 0x3b, 0xff, 0xff, 0xf3, 0xff, 0xfa, 0x31, }}, /* Byte value: 0xe7 */ + {{0x0c, 0xc1, 0xa5, 0xa5, 0x35, 0xa5, 0xc9, 0x19, }}, /* Byte value: 0xe8 */ + {{0xe7, 0xee, 0x87, 0x87, 0xc1, 0x87, 0x54, 0x8b, }}, /* Byte value: 0xe9 */ + {{0x9d, 0x17, 0xbf, 0xbf, 0x28, 0xbf, 0x40, 0x2a, }}, /* Byte value: 0xea */ + {{0x90, 0x08, 0x72, 0x72, 0x69, 0x72, 0xe8, 0xff, }}, /* Byte value: 0xeb */ + {{0x7a, 0xf9, 0x38, 0x38, 0xe9, 0x38, 0x14, 0xa1, }}, /* Byte value: 0xec */ + {{0x3a, 0xc2, 0xc7, 0xc7, 0x1a, 0xc7, 0xee, 0x90, }}, /* Byte value: 0xed */ + {{0x35, 0xa2, 0xda, 0xda, 0xb3, 0xda, 0x84, 0x1e, }}, /* Byte value: 0xee */ + {{0x34, 0x7c, 0xb2, 0xb2, 0xc7, 0xb2, 0xe5, 0xd2, }}, /* Byte value: 0xef */ + {{0x9f, 0x68, 0x6f, 0x6f, 0xc0, 0x6f, 0x82, 0x71, }}, /* Byte value: 0xf0 */ + {{0xb7, 0xab, 0x37, 0x37, 0x7e, 0x37, 0x71, 0x27, }}, /* Byte value: 0xf1 */ + {{0xf8, 0xf0, 0xd5, 0xd5, 0x24, 0xd5, 0xe1, 0x98, }}, /* Byte value: 0xf2 */ + {{0x4f, 0x5b, 0xe2, 0xe2, 0x5a, 0xe2, 0x90, 0xbf, }}, /* Byte value: 0xf3 */ + {{0x6b, 0x59, 0x1f, 0x1f, 0xd1, 0x1f, 0xaa, 0xf0, }}, /* Byte value: 0xf4 */ + {{0x83, 0xd7, 0x85, 0x85, 0xb9, 0x85, 0x94, 0xf5, }}, /* Byte value: 0xf5 */ + {{0x5f, 0x25, 0xad, 0xad, 0x16, 0xad, 0x4f, 0x22, }}, /* Byte value: 0xf6 */ + {{0xa7, 0xd5, 0x78, 0x78, 0x32, 0x78, 0xae, 0xba, }}, /* Byte value: 0xf7 */ + {{0x1e, 0xc0, 0x3a, 0x3a, 0x91, 0x3a, 0xd4, 0xdf, }}, /* Byte value: 0xf8 */ + {{0x10, 0x7e, 0x4f, 0x4f, 0x4c, 0x4f, 0xdf, 0x9d, }}, /* Byte value: 0xf9 */ + {{0xc3, 0xec, 0x7a, 0x7a, 0x4a, 0x7a, 0x6e, 0xc4, }}, /* Byte value: 0xfa */ + {{0x78, 0x86, 0xe8, 0xe8, 0x01, 0xe8, 0xd6, 0xfa, }}, /* Byte value: 0xfb */ + {{0x2d, 0xe3, 0x53, 0x53, 0xd9, 0x53, 0xd5, 0x2c, }}, /* Byte value: 0xfc */ + {{0x77, 0xe6, 0xf5, 0xf5, 0xa8, 0xf5, 0xbc, 0x74, }}, /* Byte value: 0xfd */ + {{0xe3, 0x10, 0xe4, 0xe4, 0xd2, 0xe4, 0x13, 0x3d, }}, /* Byte value: 0xfe */ + {{0x80, 0x76, 0x3d, 0x3d, 0x25, 0x3d, 0x37, 0x62, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 14 */ + {{0x47, 0x1c, 0xd5, 0xc8, 0x66, 0x2c, 0x64, 0xb5, }}, /* Byte value: 0x00 */ + {{0xeb, 0x1e, 0xe0, 0x5e, 0xac, 0x6b, 0x2f, 0x0a, }}, /* Byte value: 0x01 */ + {{0x78, 0x58, 0xd0, 0xcf, 0x08, 0x95, 0x86, 0x89, }}, /* Byte value: 0x02 */ + {{0x71, 0x83, 0x10, 0xce, 0xdd, 0xeb, 0x67, 0xc0, }}, /* Byte value: 0x03 */ + {{0xd4, 0x5a, 0xe5, 0x59, 0xc2, 0xd2, 0xcd, 0x36, }}, /* Byte value: 0x04 */ + {{0xf8, 0xf2, 0x39, 0x23, 0xe3, 0x99, 0xf0, 0xef, }}, /* Byte value: 0x05 */ + {{0x05, 0xb8, 0xb7, 0x40, 0xbe, 0x36, 0x20, 0x68, }}, /* Byte value: 0x06 */ + {{0x43, 0x3d, 0xf8, 0xf7, 0xfe, 0x14, 0x9a, 0xaa, }}, /* Byte value: 0x07 */ + {{0x75, 0xa2, 0x3d, 0xf1, 0x45, 0xd3, 0x99, 0xdf, }}, /* Byte value: 0x08 */ + {{0x14, 0xa5, 0x99, 0xc3, 0xbd, 0xd8, 0x80, 0x63, }}, /* Byte value: 0x09 */ + {{0x3e, 0xdd, 0x9f, 0x78, 0x48, 0xb7, 0x3c, 0x4b, }}, /* Byte value: 0x0a */ + {{0x4a, 0xe6, 0x38, 0xf6, 0x2b, 0x6a, 0x7b, 0xe3, }}, /* Byte value: 0x0b */ + {{0xa9, 0xba, 0x82, 0xd6, 0x74, 0x71, 0x6b, 0xd7, }}, /* Byte value: 0x0c */ + {{0x5f, 0xda, 0x3b, 0x4a, 0xb0, 0xbc, 0x25, 0xf7, }}, /* Byte value: 0x0d */ + {{0xef, 0x3f, 0xcd, 0x61, 0x34, 0x53, 0xd1, 0x15, }}, /* Byte value: 0x0e */ + {{0x51, 0x48, 0xbb, 0xf5, 0x97, 0xe8, 0x9b, 0x38, }}, /* Byte value: 0x0f */ + {{0xd9, 0xa0, 0x08, 0x67, 0x8f, 0x94, 0xd2, 0x60, }}, /* Byte value: 0x10 */ + {{0x94, 0x0f, 0x70, 0x2f, 0x56, 0xd4, 0xf6, 0x05, }}, /* Byte value: 0x11 */ + {{0xb5, 0x5d, 0x41, 0x6b, 0x3a, 0xd9, 0xd4, 0x8a, }}, /* Byte value: 0x12 */ + {{0x01, 0x99, 0x9a, 0x7f, 0x26, 0x0e, 0xde, 0x77, }}, /* Byte value: 0x13 */ + {{0xf4, 0x91, 0x4e, 0x62, 0x88, 0xd1, 0x31, 0xce, }}, /* Byte value: 0x14 */ + {{0x10, 0x84, 0xb4, 0xfc, 0x25, 0xe0, 0x7e, 0x7c, }}, /* Byte value: 0x15 */ + {{0x7f, 0x11, 0x90, 0x71, 0xfa, 0xbf, 0xd9, 0x0f, }}, /* Byte value: 0x16 */ + {{0xd6, 0xab, 0x12, 0xa7, 0x8e, 0xce, 0xb2, 0xd8, }}, /* Byte value: 0x17 */ + {{0x08, 0x42, 0x5a, 0x7e, 0xf3, 0x70, 0x3f, 0x3e, }}, /* Byte value: 0x18 */ + {{0x37, 0x06, 0x5f, 0x79, 0x9d, 0xc9, 0xdd, 0x02, }}, /* Byte value: 0x19 */ + {{0xfe, 0x22, 0xe3, 0xe2, 0x37, 0xbd, 0x71, 0x1e, }}, /* Byte value: 0x1a */ + {{0x9d, 0xd4, 0xb0, 0x2e, 0x83, 0xaa, 0x17, 0x4c, }}, /* Byte value: 0x1b */ + {{0xd5, 0xc3, 0x7f, 0x26, 0xe4, 0xdc, 0x13, 0x41, }}, /* Byte value: 0x1c */ + {{0x42, 0xa4, 0x62, 0x88, 0xd8, 0x1a, 0x44, 0xdd, }}, /* Byte value: 0x1d */ + {{0xfd, 0x4a, 0x8e, 0x63, 0x5d, 0xaf, 0xd0, 0x87, }}, /* Byte value: 0x1e */ + {{0xb0, 0xe5, 0xf6, 0x2b, 0x84, 0xef, 0xf4, 0xe2, }}, /* Byte value: 0x1f */ + {{0xe3, 0x5c, 0xba, 0x20, 0x5f, 0x1b, 0x10, 0x34, }}, /* Byte value: 0x20 */ + {{0x27, 0x82, 0xeb, 0x85, 0xb8, 0x29, 0xa3, 0x7e, }}, /* Byte value: 0x21 */ + {{0x38, 0x0d, 0x45, 0xb9, 0x9c, 0x93, 0xbd, 0xba, }}, /* Byte value: 0x22 */ + {{0x59, 0x0a, 0xe1, 0x8b, 0x64, 0x98, 0xa4, 0x06, }}, /* Byte value: 0x23 */ + {{0x19, 0x5f, 0x74, 0xfd, 0xf0, 0x9e, 0x9f, 0x35, }}, /* Byte value: 0x24 */ + {{0x20, 0xcb, 0xab, 0x3b, 0x4a, 0x03, 0xfc, 0xf8, }}, /* Byte value: 0x25 */ + {{0xa0, 0x61, 0x42, 0xd7, 0xa1, 0x0f, 0x8a, 0x9e, }}, /* Byte value: 0x26 */ + {{0x3f, 0x44, 0x05, 0x07, 0x6e, 0xb9, 0xe2, 0x3c, }}, /* Byte value: 0x27 */ + {{0x58, 0x93, 0x7b, 0xf4, 0x42, 0x96, 0x7a, 0x71, }}, /* Byte value: 0x28 */ + {{0xc8, 0xbd, 0x26, 0xe4, 0x8c, 0x7a, 0x72, 0x6b, }}, /* Byte value: 0x29 */ + {{0xbc, 0x86, 0x81, 0x6a, 0xef, 0xa7, 0x35, 0xc3, }}, /* Byte value: 0x2a */ + {{0x7e, 0x88, 0x0a, 0x0e, 0xdc, 0xb1, 0x07, 0x78, }}, /* Byte value: 0x2b */ + {{0xd3, 0x13, 0xa5, 0xe7, 0x30, 0xf8, 0x92, 0xb0, }}, /* Byte value: 0x2c */ + {{0x4b, 0x7f, 0xa2, 0x89, 0x0d, 0x64, 0xa5, 0x94, }}, /* Byte value: 0x2d */ + {{0x77, 0x53, 0xca, 0x0f, 0x09, 0xcf, 0xe6, 0x31, }}, /* Byte value: 0x2e */ + {{0xc7, 0xb6, 0x3c, 0x24, 0x8d, 0x20, 0x12, 0xd3, }}, /* Byte value: 0x2f */ + {{0xa4, 0x40, 0x6f, 0xe8, 0x39, 0x37, 0x74, 0x81, }}, /* Byte value: 0x30 */ + {{0xfc, 0xd3, 0x14, 0x1c, 0x7b, 0xa1, 0x0e, 0xf0, }}, /* Byte value: 0x31 */ + {{0x96, 0xfe, 0x87, 0xd1, 0x1a, 0xc8, 0x89, 0xeb, }}, /* Byte value: 0x32 */ + {{0x03, 0x68, 0x6d, 0x81, 0x6a, 0x12, 0xa1, 0x99, }}, /* Byte value: 0x33 */ + {{0x52, 0x20, 0xd6, 0x74, 0xfd, 0xfa, 0x3a, 0xa1, }}, /* Byte value: 0x34 */ + {{0x17, 0xcd, 0xf4, 0x42, 0xd7, 0xca, 0x21, 0xfa, }}, /* Byte value: 0x35 */ + {{0x3c, 0x2c, 0x68, 0x86, 0x04, 0xab, 0x43, 0xa5, }}, /* Byte value: 0x36 */ + {{0x67, 0xd7, 0x7e, 0xf3, 0x2c, 0x2f, 0x98, 0x4d, }}, /* Byte value: 0x37 */ + {{0x79, 0xc1, 0x4a, 0xb0, 0x2e, 0x9b, 0x58, 0xfe, }}, /* Byte value: 0x38 */ + {{0xc0, 0xff, 0x7c, 0x9a, 0x7f, 0x0a, 0x4d, 0x55, }}, /* Byte value: 0x39 */ + {{0x36, 0x9f, 0xc5, 0x06, 0xbb, 0xc7, 0x03, 0x75, }}, /* Byte value: 0x3a */ + {{0x34, 0x6e, 0x32, 0xf8, 0xf7, 0xdb, 0x7c, 0x9b, }}, /* Byte value: 0x3b */ + {{0x89, 0x71, 0x29, 0xed, 0x3e, 0x72, 0x97, 0x2f, }}, /* Byte value: 0x3c */ + {{0x2e, 0x59, 0x2b, 0x84, 0x6d, 0x57, 0x42, 0x37, }}, /* Byte value: 0x3d */ + {{0x1c, 0xe7, 0xc3, 0xbd, 0x4e, 0xa8, 0xbf, 0x5d, }}, /* Byte value: 0x3e */ + {{0x15, 0x3c, 0x03, 0xbc, 0x9b, 0xd6, 0x5e, 0x14, }}, /* Byte value: 0x3f */ + {{0x4f, 0x5e, 0x8f, 0xb6, 0x95, 0x5c, 0x5b, 0x8b, }}, /* Byte value: 0x40 */ + {{0xa1, 0xf8, 0xd8, 0xa8, 0x87, 0x01, 0x54, 0xe9, }}, /* Byte value: 0x41 */ + {{0x86, 0x7a, 0x33, 0x2d, 0x3f, 0x28, 0xf7, 0x97, }}, /* Byte value: 0x42 */ + {{0x99, 0xf5, 0x9d, 0x11, 0x1b, 0x92, 0xe9, 0x53, }}, /* Byte value: 0x43 */ + {{0x04, 0x21, 0x2d, 0x3f, 0x98, 0x38, 0xfe, 0x1f, }}, /* Byte value: 0x44 */ + {{0xe6, 0xe4, 0x0d, 0x60, 0xe1, 0x2d, 0x30, 0x5c, }}, /* Byte value: 0x45 */ + {{0xf5, 0x08, 0xd4, 0x1d, 0xae, 0xdf, 0xef, 0xb9, }}, /* Byte value: 0x46 */ + {{0xa7, 0x28, 0x02, 0x69, 0x53, 0x25, 0xd5, 0x18, }}, /* Byte value: 0x47 */ + {{0x23, 0xa3, 0xc6, 0xba, 0x20, 0x11, 0x5d, 0x61, }}, /* Byte value: 0x48 */ + {{0xff, 0xbb, 0x79, 0x9d, 0x11, 0xb3, 0xaf, 0x69, }}, /* Byte value: 0x49 */ + {{0x81, 0x33, 0x73, 0x93, 0xcd, 0x02, 0xa8, 0x11, }}, /* Byte value: 0x4a */ + {{0xf1, 0x29, 0xf9, 0x22, 0x36, 0xe7, 0x11, 0xa6, }}, /* Byte value: 0x4b */ + {{0x0c, 0x63, 0x77, 0x41, 0x6b, 0x48, 0xc1, 0x21, }}, /* Byte value: 0x4c */ + {{0xc5, 0x47, 0xcb, 0xda, 0xc1, 0x3c, 0x6d, 0x3d, }}, /* Byte value: 0x4d */ + {{0x9f, 0x25, 0x47, 0xd0, 0xcf, 0xb6, 0x68, 0xa2, }}, /* Byte value: 0x4e */ + {{0x09, 0xdb, 0xc0, 0x01, 0xd5, 0x7e, 0xe1, 0x49, }}, /* Byte value: 0x4f */ + {{0xf9, 0x6b, 0xa3, 0x5c, 0xc5, 0x97, 0x2e, 0x98, }}, /* Byte value: 0x50 */ + {{0xa6, 0xb1, 0x98, 0x16, 0x75, 0x2b, 0x0b, 0x6f, }}, /* Byte value: 0x51 */ + {{0x64, 0xbf, 0x13, 0x72, 0x46, 0x3d, 0x39, 0xd4, }}, /* Byte value: 0x52 */ + {{0xab, 0x4b, 0x75, 0x28, 0x38, 0x6d, 0x14, 0x39, }}, /* Byte value: 0x53 */ + {{0x1d, 0x7e, 0x59, 0xc2, 0x68, 0xa6, 0x61, 0x2a, }}, /* Byte value: 0x54 */ + {{0xf2, 0x41, 0x94, 0xa3, 0x5c, 0xf5, 0xb0, 0x3f, }}, /* Byte value: 0x55 */ + {{0xdf, 0x70, 0xd2, 0xa6, 0x5b, 0xb0, 0x53, 0x91, }}, /* Byte value: 0x56 */ + {{0xac, 0x02, 0x35, 0x96, 0xca, 0x47, 0x4b, 0xbf, }}, /* Byte value: 0x57 */ + {{0x72, 0xeb, 0x7d, 0x4f, 0xb7, 0xf9, 0xc6, 0x59, }}, /* Byte value: 0x58 */ + {{0x30, 0x4f, 0x1f, 0xc7, 0x6f, 0xe3, 0x82, 0x84, }}, /* Byte value: 0x59 */ + {{0xe7, 0x7d, 0x97, 0x1f, 0xc7, 0x23, 0xee, 0x2b, }}, /* Byte value: 0x5a */ + {{0xda, 0xc8, 0x65, 0xe6, 0xe5, 0x86, 0x73, 0xf9, }}, /* Byte value: 0x5b */ + {{0xdb, 0x51, 0xff, 0x99, 0xc3, 0x88, 0xad, 0x8e, }}, /* Byte value: 0x5c */ + {{0x6f, 0x95, 0x24, 0x8d, 0xdf, 0x5f, 0xa7, 0x73, }}, /* Byte value: 0x5d */ + {{0x6b, 0xb4, 0x09, 0xb2, 0x47, 0x67, 0x59, 0x6c, }}, /* Byte value: 0x5e */ + {{0x21, 0x52, 0x31, 0x44, 0x6c, 0x0d, 0x22, 0x8f, }}, /* Byte value: 0x5f */ + {{0x9e, 0xbc, 0xdd, 0xaf, 0xe9, 0xb8, 0xb6, 0xd5, }}, /* Byte value: 0x60 */ + {{0x2c, 0xa8, 0xdc, 0x7a, 0x21, 0x4b, 0x3d, 0xd9, }}, /* Byte value: 0x61 */ + {{0x50, 0xd1, 0x21, 0x8a, 0xb1, 0xe6, 0x45, 0x4f, }}, /* Byte value: 0x62 */ + {{0x22, 0x3a, 0x5c, 0xc5, 0x06, 0x1f, 0x83, 0x16, }}, /* Byte value: 0x63 */ + {{0x3a, 0xfc, 0xb2, 0x47, 0xd0, 0x8f, 0xc2, 0x54, }}, /* Byte value: 0x64 */ + {{0x66, 0x4e, 0xe4, 0x8c, 0x0a, 0x21, 0x46, 0x3a, }}, /* Byte value: 0x65 */ + {{0xa2, 0x90, 0xb5, 0x29, 0xed, 0x13, 0xf5, 0x70, }}, /* Byte value: 0x66 */ + {{0xc9, 0x24, 0xbc, 0x9b, 0xaa, 0x74, 0xac, 0x1c, }}, /* Byte value: 0x67 */ + {{0x68, 0xdc, 0x64, 0x33, 0x2d, 0x75, 0xf8, 0xf5, }}, /* Byte value: 0x68 */ + {{0x62, 0x6f, 0xc9, 0xb3, 0x92, 0x19, 0xb8, 0x25, }}, /* Byte value: 0x69 */ + {{0xbb, 0xcf, 0xc1, 0xd4, 0x1d, 0x8d, 0x6a, 0x45, }}, /* Byte value: 0x6a */ + {{0xb3, 0x8d, 0x9b, 0xaa, 0xee, 0xfd, 0x55, 0x7b, }}, /* Byte value: 0x6b */ + {{0x90, 0x2e, 0x5d, 0x10, 0xce, 0xec, 0x08, 0x1a, }}, /* Byte value: 0x6c */ + {{0x4d, 0xaf, 0x78, 0x48, 0xd9, 0x40, 0x24, 0x65, }}, /* Byte value: 0x6d */ + {{0xcb, 0xd5, 0x4b, 0x65, 0xe6, 0x68, 0xd3, 0xf2, }}, /* Byte value: 0x6e */ + {{0x16, 0x54, 0x6e, 0x3d, 0xf1, 0xc4, 0xff, 0x8d, }}, /* Byte value: 0x6f */ + {{0xd8, 0x39, 0x92, 0x18, 0xa9, 0x9a, 0x0c, 0x17, }}, /* Byte value: 0x70 */ + {{0x02, 0xf1, 0xf7, 0xfe, 0x4c, 0x1c, 0x7f, 0xee, }}, /* Byte value: 0x71 */ + {{0x6c, 0xfd, 0x49, 0x0c, 0xb5, 0x4d, 0x06, 0xea, }}, /* Byte value: 0x72 */ + {{0xf7, 0xf9, 0x23, 0xe3, 0xe2, 0xc3, 0x90, 0x57, }}, /* Byte value: 0x73 */ + {{0x9a, 0x9d, 0xf0, 0x90, 0x71, 0x80, 0x48, 0xca, }}, /* Byte value: 0x74 */ + {{0xea, 0x87, 0x7a, 0x21, 0x8a, 0x65, 0xf1, 0x7d, }}, /* Byte value: 0x75 */ + {{0x98, 0x6c, 0x07, 0x6e, 0x3d, 0x9c, 0x37, 0x24, }}, /* Byte value: 0x76 */ + {{0xc2, 0x0e, 0x8b, 0x64, 0x33, 0x16, 0x32, 0xbb, }}, /* Byte value: 0x77 */ + {{0x25, 0x73, 0x1c, 0x7b, 0xf4, 0x35, 0xdc, 0x90, }}, /* Byte value: 0x78 */ + {{0x3d, 0xb5, 0xf2, 0xf9, 0x22, 0xa5, 0x9d, 0xd2, }}, /* Byte value: 0x79 */ + {{0x82, 0x5b, 0x1e, 0x12, 0xa7, 0x10, 0x09, 0x88, }}, /* Byte value: 0x7a */ + {{0x13, 0xec, 0xd9, 0x7d, 0x4f, 0xf2, 0xdf, 0xe5, }}, /* Byte value: 0x7b */ + {{0x26, 0x1b, 0x71, 0xfa, 0x9e, 0x27, 0x7d, 0x09, }}, /* Byte value: 0x7c */ + {{0xe4, 0x15, 0xfa, 0x9e, 0xad, 0x31, 0x4f, 0xb2, }}, /* Byte value: 0x7d */ + {{0xb9, 0x3e, 0x36, 0x2a, 0x51, 0x91, 0x15, 0xab, }}, /* Byte value: 0x7e */ + {{0xe0, 0x34, 0xd7, 0xa1, 0x35, 0x09, 0xb1, 0xad, }}, /* Byte value: 0x7f */ + {{0xee, 0xa6, 0x57, 0x1e, 0x12, 0x5d, 0x0f, 0x62, }}, /* Byte value: 0x80 */ + {{0x11, 0x1d, 0x2e, 0x83, 0x03, 0xee, 0xa0, 0x0b, }}, /* Byte value: 0x81 */ + {{0x9b, 0x04, 0x6a, 0xef, 0x57, 0x8e, 0x96, 0xbd, }}, /* Byte value: 0x82 */ + {{0x31, 0xd6, 0x85, 0xb8, 0x49, 0xed, 0x5c, 0xf3, }}, /* Byte value: 0x83 */ + {{0x2a, 0x78, 0x06, 0xbb, 0xf5, 0x6f, 0xbc, 0x28, }}, /* Byte value: 0x84 */ + {{0x7a, 0xa9, 0x27, 0x31, 0x44, 0x89, 0xf9, 0x67, }}, /* Byte value: 0x85 */ + {{0x35, 0xf7, 0xa8, 0x87, 0xd1, 0xd5, 0xa2, 0xec, }}, /* Byte value: 0x86 */ + {{0xad, 0x9b, 0xaf, 0xe9, 0xec, 0x49, 0x95, 0xc8, }}, /* Byte value: 0x87 */ + {{0xf3, 0xd8, 0x0e, 0xdc, 0x7a, 0xfb, 0x6e, 0x48, }}, /* Byte value: 0x88 */ + {{0xf0, 0xb0, 0x63, 0x5d, 0x10, 0xe9, 0xcf, 0xd1, }}, /* Byte value: 0x89 */ + {{0xb8, 0xa7, 0xac, 0x55, 0x77, 0x9f, 0xcb, 0xdc, }}, /* Byte value: 0x8a */ + {{0xcc, 0x9c, 0x0b, 0xdb, 0x14, 0x42, 0x8c, 0x74, }}, /* Byte value: 0x8b */ + {{0x54, 0xf0, 0x0c, 0xb5, 0x29, 0xde, 0xbb, 0x50, }}, /* Byte value: 0x8c */ + {{0xe2, 0xc5, 0x20, 0x5f, 0x79, 0x15, 0xce, 0x43, }}, /* Byte value: 0x8d */ + {{0x0b, 0x2a, 0x37, 0xff, 0x99, 0x62, 0x9e, 0xa7, }}, /* Byte value: 0x8e */ + {{0xdd, 0x81, 0x25, 0x58, 0x17, 0xac, 0x2c, 0x7f, }}, /* Byte value: 0x8f */ + {{0x8f, 0xa1, 0xf3, 0x2c, 0xea, 0x56, 0x16, 0xde, }}, /* Byte value: 0x90 */ + {{0x2f, 0xc0, 0xb1, 0xfb, 0x4b, 0x59, 0x9c, 0x40, }}, /* Byte value: 0x91 */ + {{0x7d, 0xe0, 0x67, 0x8f, 0xb6, 0xa3, 0xa6, 0xe1, }}, /* Byte value: 0x92 */ + {{0xa5, 0xd9, 0xf5, 0x97, 0x1f, 0x39, 0xaa, 0xf6, }}, /* Byte value: 0x93 */ + {{0x2d, 0x31, 0x46, 0x05, 0x07, 0x45, 0xe3, 0xae, }}, /* Byte value: 0x94 */ + {{0xc6, 0x2f, 0xa6, 0x5b, 0xab, 0x2e, 0xcc, 0xa4, }}, /* Byte value: 0x95 */ + {{0x5d, 0x2b, 0xcc, 0xb4, 0xfc, 0xa0, 0x5a, 0x19, }}, /* Byte value: 0x96 */ + {{0xaf, 0x6a, 0x58, 0x17, 0xa0, 0x55, 0xea, 0x26, }}, /* Byte value: 0x97 */ + {{0x33, 0x27, 0x72, 0x46, 0x05, 0xf1, 0x23, 0x1d, }}, /* Byte value: 0x98 */ + {{0x92, 0xdf, 0xaa, 0xee, 0x82, 0xf0, 0x77, 0xf4, }}, /* Byte value: 0x99 */ + {{0x69, 0x45, 0xfe, 0x4c, 0x0b, 0x7b, 0x26, 0x82, }}, /* Byte value: 0x9a */ + {{0xd2, 0x8a, 0x3f, 0x98, 0x16, 0xf6, 0x4c, 0xc7, }}, /* Byte value: 0x9b */ + {{0x8c, 0xc9, 0x9e, 0xad, 0x80, 0x44, 0xb7, 0x47, }}, /* Byte value: 0x9c */ + {{0x93, 0x46, 0x30, 0x91, 0xa4, 0xfe, 0xa9, 0x83, }}, /* Byte value: 0x9d */ + {{0x8b, 0x80, 0xde, 0x13, 0x72, 0x6e, 0xe8, 0xc1, }}, /* Byte value: 0x9e */ + {{0x63, 0xf6, 0x53, 0xcc, 0xb4, 0x17, 0x66, 0x52, }}, /* Byte value: 0x9f */ + {{0x55, 0x69, 0x96, 0xca, 0x0f, 0xd0, 0x65, 0x27, }}, /* Byte value: 0xa0 */ + {{0x1b, 0xae, 0x83, 0x03, 0xbc, 0x82, 0xe0, 0xdb, }}, /* Byte value: 0xa1 */ + {{0x9c, 0x4d, 0x2a, 0x51, 0xa5, 0xa4, 0xc9, 0x3b, }}, /* Byte value: 0xa2 */ + {{0x7b, 0x30, 0xbd, 0x4e, 0x62, 0x87, 0x27, 0x10, }}, /* Byte value: 0xa3 */ + {{0x5e, 0x43, 0xa1, 0x35, 0x96, 0xb2, 0xfb, 0x80, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x0a, 0xb3, 0xad, 0x80, 0xbf, 0x6c, 0x40, 0xd0, }}, /* Byte value: 0xa6 */ + {{0x07, 0x49, 0x40, 0xbe, 0xf2, 0x2a, 0x5f, 0x86, }}, /* Byte value: 0xa7 */ + {{0xb1, 0x7c, 0x6c, 0x54, 0xa2, 0xe1, 0x2a, 0x95, }}, /* Byte value: 0xa8 */ + {{0x40, 0x55, 0x95, 0x76, 0x94, 0x06, 0x3b, 0x33, }}, /* Byte value: 0xa9 */ + {{0x53, 0xb9, 0x4c, 0x0b, 0xdb, 0xf4, 0xe4, 0xd6, }}, /* Byte value: 0xaa */ + {{0x85, 0x12, 0x5e, 0xac, 0x55, 0x3a, 0x56, 0x0e, }}, /* Byte value: 0xab */ + {{0x73, 0x72, 0xe7, 0x30, 0x91, 0xf7, 0x18, 0x2e, }}, /* Byte value: 0xac */ + {{0x06, 0xd0, 0xda, 0xc1, 0xd4, 0x24, 0x81, 0xf1, }}, /* Byte value: 0xad */ + {{0x0d, 0xfa, 0xed, 0x3e, 0x4d, 0x46, 0x1f, 0x56, }}, /* Byte value: 0xae */ + {{0xa3, 0x09, 0x2f, 0x56, 0xcb, 0x1d, 0x2b, 0x07, }}, /* Byte value: 0xaf */ + {{0xde, 0xe9, 0x48, 0xd9, 0x7d, 0xbe, 0x8d, 0xe6, }}, /* Byte value: 0xb0 */ + {{0x4c, 0x36, 0xe2, 0x37, 0xff, 0x4e, 0xfa, 0x12, }}, /* Byte value: 0xb1 */ + {{0x91, 0xb7, 0xc7, 0x6f, 0xe8, 0xe2, 0xd6, 0x6d, }}, /* Byte value: 0xb2 */ + {{0xbf, 0xee, 0xec, 0xeb, 0x85, 0xb5, 0x94, 0x5a, }}, /* Byte value: 0xb3 */ + {{0x46, 0x85, 0x4f, 0xb7, 0x40, 0x22, 0xba, 0xc2, }}, /* Byte value: 0xb4 */ + {{0xb6, 0x35, 0x2c, 0xea, 0x50, 0xcb, 0x75, 0x13, }}, /* Byte value: 0xb5 */ + {{0x76, 0xca, 0x50, 0x70, 0x2f, 0xc1, 0x38, 0x46, }}, /* Byte value: 0xb6 */ + {{0x5b, 0xfb, 0x16, 0x75, 0x28, 0x84, 0xdb, 0xe8, }}, /* Byte value: 0xb7 */ + {{0xe1, 0xad, 0x4d, 0xde, 0x13, 0x07, 0x6f, 0xda, }}, /* Byte value: 0xb8 */ + {{0xba, 0x56, 0x5b, 0xab, 0x3b, 0x83, 0xb4, 0x32, }}, /* Byte value: 0xb9 */ + {{0xc3, 0x97, 0x11, 0x1b, 0x15, 0x18, 0xec, 0xcc, }}, /* Byte value: 0xba */ + {{0x1f, 0x8f, 0xae, 0x3c, 0x24, 0xba, 0x1e, 0xc4, }}, /* Byte value: 0xbb */ + {{0xca, 0x4c, 0xd1, 0x1a, 0xc0, 0x66, 0x0d, 0x85, }}, /* Byte value: 0xbc */ + {{0x65, 0x26, 0x89, 0x0d, 0x60, 0x33, 0xe7, 0xa3, }}, /* Byte value: 0xbd */ + {{0x8d, 0x50, 0x04, 0xd2, 0xa6, 0x4a, 0x69, 0x30, }}, /* Byte value: 0xbe */ + {{0x8e, 0x38, 0x69, 0x53, 0xcc, 0x58, 0xc8, 0xa9, }}, /* Byte value: 0xbf */ + {{0x32, 0xbe, 0xe8, 0x39, 0x23, 0xff, 0xfd, 0x6a, }}, /* Byte value: 0xc0 */ + {{0xcf, 0xf4, 0x66, 0x5a, 0x7e, 0x50, 0x2d, 0xed, }}, /* Byte value: 0xc1 */ + {{0x80, 0xaa, 0xe9, 0xec, 0xeb, 0x0c, 0x76, 0x66, }}, /* Byte value: 0xc2 */ + {{0xe8, 0x76, 0x8d, 0xdf, 0xc6, 0x79, 0x8e, 0x93, }}, /* Byte value: 0xc3 */ + {{0x6a, 0x2d, 0x93, 0xcd, 0x61, 0x69, 0x87, 0x1b, }}, /* Byte value: 0xc4 */ + {{0x95, 0x96, 0xea, 0x50, 0x70, 0xda, 0x28, 0x72, }}, /* Byte value: 0xc5 */ + {{0x83, 0xc2, 0x84, 0x6d, 0x81, 0x1e, 0xd7, 0xff, }}, /* Byte value: 0xc6 */ + {{0x87, 0xe3, 0xa9, 0x52, 0x19, 0x26, 0x29, 0xe0, }}, /* Byte value: 0xc7 */ + {{0x4e, 0xc7, 0x15, 0xc9, 0xb3, 0x52, 0x85, 0xfc, }}, /* Byte value: 0xc8 */ + {{0x7c, 0x79, 0xfd, 0xf0, 0x90, 0xad, 0x78, 0x96, }}, /* Byte value: 0xc9 */ + {{0x5c, 0xb2, 0x56, 0xcb, 0xda, 0xae, 0x84, 0x6e, }}, /* Byte value: 0xca */ + {{0x60, 0x9e, 0x3e, 0x4d, 0xde, 0x05, 0xc7, 0xcb, }}, /* Byte value: 0xcb */ + {{0x0e, 0x92, 0x80, 0xbf, 0x27, 0x54, 0xbe, 0xcf, }}, /* Byte value: 0xcc */ + {{0x97, 0x67, 0x1d, 0xae, 0x3c, 0xc6, 0x57, 0x9c, }}, /* Byte value: 0xcd */ + {{0xbd, 0x1f, 0x1b, 0x15, 0xc9, 0xa9, 0xeb, 0xb4, }}, /* Byte value: 0xce */ + {{0x45, 0xed, 0x22, 0x36, 0x2a, 0x30, 0x1b, 0x5b, }}, /* Byte value: 0xcf */ + {{0xc4, 0xde, 0x51, 0xa5, 0xe7, 0x32, 0xb3, 0x4a, }}, /* Byte value: 0xd0 */ + {{0xfa, 0x03, 0xce, 0xdd, 0xaf, 0x85, 0x8f, 0x01, }}, /* Byte value: 0xd1 */ + {{0xce, 0x6d, 0xfc, 0x25, 0x58, 0x5e, 0xf3, 0x9a, }}, /* Byte value: 0xd2 */ + {{0xbe, 0x77, 0x76, 0x94, 0xa3, 0xbb, 0x4a, 0x2d, }}, /* Byte value: 0xd3 */ + {{0x1a, 0x37, 0x19, 0x7c, 0x9a, 0x8c, 0x3e, 0xac, }}, /* Byte value: 0xd4 */ + {{0x61, 0x07, 0xa4, 0x32, 0xf8, 0x0b, 0x19, 0xbc, }}, /* Byte value: 0xd5 */ + {{0xa8, 0x23, 0x18, 0xa9, 0x52, 0x7f, 0xb5, 0xa0, }}, /* Byte value: 0xd6 */ + {{0xd1, 0xe2, 0x52, 0x19, 0x7c, 0xe4, 0xed, 0x5e, }}, /* Byte value: 0xd7 */ + {{0xaa, 0xd2, 0xef, 0x57, 0x1e, 0x63, 0xca, 0x4e, }}, /* Byte value: 0xd8 */ + {{0x0f, 0x0b, 0x1a, 0xc0, 0x01, 0x5a, 0x60, 0xb8, }}, /* Byte value: 0xd9 */ + {{0xec, 0x57, 0xa0, 0xe0, 0x5e, 0x41, 0x70, 0x8c, }}, /* Byte value: 0xda */ + {{0x29, 0x10, 0x6b, 0x3a, 0x9f, 0x7d, 0x1d, 0xb1, }}, /* Byte value: 0xdb */ + {{0x70, 0x1a, 0x8a, 0xb1, 0xfb, 0xe5, 0xb9, 0xb7, }}, /* Byte value: 0xdc */ + {{0xdc, 0x18, 0xbf, 0x27, 0x31, 0xa2, 0xf2, 0x08, }}, /* Byte value: 0xdd */ + {{0xb7, 0xac, 0xb6, 0x95, 0x76, 0xc5, 0xab, 0x64, }}, /* Byte value: 0xde */ + {{0xd7, 0x32, 0x88, 0xd8, 0xa8, 0xc0, 0x6c, 0xaf, }}, /* Byte value: 0xdf */ + {{0x74, 0x3b, 0xa7, 0x8e, 0x63, 0xdd, 0x47, 0xa8, }}, /* Byte value: 0xe0 */ + {{0xed, 0xce, 0x3a, 0x9f, 0x78, 0x4f, 0xae, 0xfb, }}, /* Byte value: 0xe1 */ + {{0xae, 0xf3, 0xc2, 0x68, 0x86, 0x5b, 0x34, 0x51, }}, /* Byte value: 0xe2 */ + {{0x88, 0xe8, 0xb3, 0x92, 0x18, 0x7c, 0x49, 0x58, }}, /* Byte value: 0xe3 */ + {{0xcd, 0x05, 0x91, 0xa4, 0x32, 0x4c, 0x52, 0x03, }}, /* Byte value: 0xe4 */ + {{0xb4, 0xc4, 0xdb, 0x14, 0x1c, 0xd7, 0x0a, 0xfd, }}, /* Byte value: 0xe5 */ + {{0x56, 0x01, 0xfb, 0x4b, 0x65, 0xc2, 0xc4, 0xbe, }}, /* Byte value: 0xe6 */ + {{0x12, 0x75, 0x43, 0x02, 0x69, 0xfc, 0x01, 0x92, }}, /* Byte value: 0xe7 */ + {{0x3b, 0x65, 0x28, 0x38, 0xf6, 0x81, 0x1c, 0x23, }}, /* Byte value: 0xe8 */ + {{0xe9, 0xef, 0x17, 0xa0, 0xe0, 0x77, 0x50, 0xe4, }}, /* Byte value: 0xe9 */ + {{0xd0, 0x7b, 0xc8, 0x66, 0x5a, 0xea, 0x33, 0x29, }}, /* Byte value: 0xea */ + {{0xc1, 0x66, 0xe6, 0xe5, 0x59, 0x04, 0x93, 0x22, }}, /* Byte value: 0xeb */ + {{0x39, 0x94, 0xdf, 0xc6, 0xba, 0x9d, 0x63, 0xcd, }}, /* Byte value: 0xec */ + {{0x2b, 0xe1, 0x9c, 0xc4, 0xd3, 0x61, 0x62, 0x5f, }}, /* Byte value: 0xed */ + {{0x6e, 0x0c, 0xbe, 0xf2, 0xf9, 0x51, 0x79, 0x04, }}, /* Byte value: 0xee */ + {{0x44, 0x74, 0xb8, 0x49, 0x0c, 0x3e, 0xc5, 0x2c, }}, /* Byte value: 0xef */ + {{0x84, 0x8b, 0xc4, 0xd3, 0x73, 0x34, 0x88, 0x79, }}, /* Byte value: 0xf0 */ + {{0x1e, 0x16, 0x34, 0x43, 0x02, 0xb4, 0xc0, 0xb3, }}, /* Byte value: 0xf1 */ + {{0x49, 0x8e, 0x55, 0x77, 0x41, 0x78, 0xda, 0x7a, }}, /* Byte value: 0xf2 */ + {{0x57, 0x98, 0x61, 0x34, 0x43, 0xcc, 0x1a, 0xc9, }}, /* Byte value: 0xf3 */ + {{0xf6, 0x60, 0xb9, 0x9c, 0xc4, 0xcd, 0x4e, 0x20, }}, /* Byte value: 0xf4 */ + {{0x5a, 0x62, 0x8c, 0x0a, 0x0e, 0x8a, 0x05, 0x9f, }}, /* Byte value: 0xf5 */ + {{0xb2, 0x14, 0x01, 0xd5, 0xc8, 0xf3, 0x8b, 0x0c, }}, /* Byte value: 0xf6 */ + {{0xfb, 0x9a, 0x54, 0xa2, 0x89, 0x8b, 0x51, 0x76, }}, /* Byte value: 0xf7 */ + {{0x8a, 0x19, 0x44, 0x6c, 0x54, 0x60, 0x36, 0xb6, }}, /* Byte value: 0xf8 */ + {{0xe5, 0x8c, 0x60, 0xe1, 0x8b, 0x3f, 0x91, 0xc5, }}, /* Byte value: 0xf9 */ + {{0x48, 0x17, 0xcf, 0x08, 0x67, 0x76, 0x04, 0x0d, }}, /* Byte value: 0xfa */ + {{0x6d, 0x64, 0xd3, 0x73, 0x93, 0x43, 0xd8, 0x9d, }}, /* Byte value: 0xfb */ + {{0x18, 0xc6, 0xee, 0x82, 0xd6, 0x90, 0x41, 0x42, }}, /* Byte value: 0xfc */ + {{0x28, 0x89, 0xf1, 0x45, 0xb9, 0x73, 0xc3, 0xc6, }}, /* Byte value: 0xfd */ + {{0x41, 0xcc, 0x0f, 0x09, 0xb2, 0x08, 0xe5, 0x44, }}, /* Byte value: 0xfe */ + {{0x24, 0xea, 0x86, 0x04, 0xd2, 0x3b, 0x02, 0xe7, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 15 */ + {{0x11, 0x87, 0x93, 0x1b, 0xc9, 0xae, 0xb5, 0xfc, }}, /* Byte value: 0x00 */ + {{0x32, 0xfc, 0xab, 0xf8, 0xfe, 0xf2, 0x0a, 0xee, }}, /* Byte value: 0x01 */ + {{0xbd, 0xca, 0xef, 0x4e, 0x88, 0xc7, 0x89, 0xdd, }}, /* Byte value: 0x02 */ + {{0xc4, 0x12, 0x3c, 0xd3, 0x93, 0x13, 0xc0, 0x11, }}, /* Byte value: 0x03 */ + {{0x9e, 0xb1, 0xd7, 0xad, 0xbf, 0x9b, 0x36, 0xcf, }}, /* Byte value: 0x04 */ + {{0x70, 0x97, 0x29, 0x2f, 0xcb, 0xc0, 0xef, 0x6e, }}, /* Byte value: 0x05 */ + {{0x35, 0x78, 0xfd, 0x96, 0x0f, 0xfe, 0x68, 0x31, }}, /* Byte value: 0x06 */ + {{0x94, 0xe7, 0x89, 0xa3, 0xc5, 0x09, 0xaa, 0x16, }}, /* Byte value: 0x07 */ + {{0x41, 0x72, 0x26, 0x6b, 0x9f, 0xb4, 0xdf, 0xfb, }}, /* Byte value: 0x08 */ + {{0xd4, 0x23, 0x72, 0x1d, 0x3c, 0x7e, 0x63, 0xc4, }}, /* Byte value: 0x09 */ + {{0x1c, 0x55, 0x9b, 0x7b, 0x42, 0x30, 0x4b, 0xfa, }}, /* Byte value: 0x0a */ + {{0xed, 0x3f, 0x5a, 0x3e, 0xde, 0xdd, 0xe3, 0xda, }}, /* Byte value: 0x0b */ + {{0x16, 0x03, 0xc5, 0x75, 0x38, 0xa2, 0xd7, 0x23, }}, /* Byte value: 0x0c */ + {{0x89, 0x04, 0xcf, 0x0d, 0xe1, 0xfa, 0xf7, 0xc5, }}, /* Byte value: 0x0d */ + {{0xb7, 0x9c, 0xb1, 0x40, 0xf2, 0x55, 0x15, 0x04, }}, /* Byte value: 0x0e */ + {{0x66, 0x94, 0xec, 0x5a, 0xf3, 0x62, 0x38, 0x4d, }}, /* Byte value: 0x0f */ + {{0x62, 0x09, 0x1e, 0x88, 0xa8, 0xe8, 0x60, 0xe9, }}, /* Byte value: 0x10 */ + {{0x19, 0x7e, 0xb4, 0x7c, 0x7f, 0x79, 0x05, 0x77, }}, /* Byte value: 0x11 */ + {{0x0b, 0xe0, 0x83, 0xdb, 0x1c, 0x51, 0x8a, 0xf0, }}, /* Byte value: 0x12 */ + {{0xb0, 0x18, 0xe7, 0x2e, 0x03, 0x59, 0x77, 0xdb, }}, /* Byte value: 0x13 */ + {{0x3c, 0x37, 0x07, 0x24, 0xdf, 0xea, 0xce, 0x93, }}, /* Byte value: 0x14 */ + {{0x51, 0x43, 0x68, 0xa5, 0x30, 0xd9, 0x7c, 0x2e, }}, /* Byte value: 0x15 */ + {{0x2b, 0x82, 0x1f, 0x84, 0x81, 0x8b, 0x0f, 0x99, }}, /* Byte value: 0x16 */ + {{0x3d, 0x81, 0xda, 0xf1, 0xb9, 0x29, 0xd8, 0xba, }}, /* Byte value: 0x17 */ + {{0xc9, 0xc0, 0x34, 0xb3, 0x18, 0x8d, 0x3e, 0x17, }}, /* Byte value: 0x18 */ + {{0x65, 0x8d, 0x48, 0xe6, 0x59, 0xe4, 0x02, 0x36, }}, /* Byte value: 0x19 */ + {{0x56, 0xc7, 0x3e, 0xcb, 0xc1, 0xd5, 0x1e, 0xf1, }}, /* Byte value: 0x1a */ + {{0x60, 0xa6, 0x67, 0xe1, 0x64, 0xad, 0x4c, 0xbb, }}, /* Byte value: 0x1b */ + {{0x2e, 0xa9, 0x30, 0x83, 0xbc, 0xc2, 0x41, 0x14, }}, /* Byte value: 0x1c */ + {{0x24, 0xff, 0x6e, 0x8d, 0xc6, 0x50, 0xdd, 0xcd, }}, /* Byte value: 0x1d */ + {{0x45, 0xef, 0xd4, 0xb9, 0xc4, 0x3e, 0x87, 0x5f, }}, /* Byte value: 0x1e */ + {{0x3e, 0x98, 0x7e, 0x4d, 0x13, 0xaf, 0xe2, 0xc1, }}, /* Byte value: 0x1f */ + {{0xfb, 0x3c, 0x9f, 0x4b, 0xe6, 0x7f, 0x34, 0xf9, }}, /* Byte value: 0x20 */ + {{0x34, 0xce, 0x20, 0x43, 0x69, 0x3d, 0x7e, 0x18, }}, /* Byte value: 0x21 */ + {{0x3a, 0x05, 0x8c, 0x9f, 0x48, 0x25, 0xba, 0x65, }}, /* Byte value: 0x22 */ + {{0xaf, 0x54, 0xd8, 0xe9, 0xeb, 0xef, 0x06, 0x5a, }}, /* Byte value: 0x23 */ + {{0x28, 0x9b, 0xbb, 0x38, 0x2b, 0x0d, 0x35, 0xe2, }}, /* Byte value: 0x24 */ + {{0xa2, 0x86, 0xd0, 0x89, 0x60, 0x71, 0xf8, 0x5c, }}, /* Byte value: 0x25 */ + {{0x6f, 0xdb, 0x16, 0xe8, 0x23, 0x76, 0x9e, 0xef, }}, /* Byte value: 0x26 */ + {{0xac, 0x4d, 0x7c, 0x55, 0x41, 0x69, 0x3c, 0x21, }}, /* Byte value: 0x27 */ + {{0x1f, 0x4c, 0x3f, 0xc7, 0xe8, 0xb6, 0x71, 0x81, }}, /* Byte value: 0x28 */ + {{0x83, 0x52, 0x91, 0x03, 0x9b, 0x68, 0x6b, 0x1c, }}, /* Byte value: 0x29 */ + {{0x72, 0x38, 0x50, 0x46, 0x07, 0x85, 0xc3, 0x3c, }}, /* Byte value: 0x2a */ + {{0x9b, 0x9a, 0xf8, 0xaa, 0x82, 0xd2, 0x78, 0x42, }}, /* Byte value: 0x2b */ + {{0x08, 0xf9, 0x27, 0x67, 0xb6, 0xd7, 0xb0, 0x8b, }}, /* Byte value: 0x2c */ + {{0x5d, 0x27, 0xbd, 0x10, 0xdd, 0x84, 0x94, 0x01, }}, /* Byte value: 0x2d */ + {{0xe2, 0x42, 0x2b, 0x37, 0x99, 0x06, 0x31, 0x8e, }}, /* Byte value: 0x2e */ + {{0xdc, 0xda, 0x55, 0x7a, 0x8a, 0xa9, 0xd3, 0x4f, }}, /* Byte value: 0x2f */ + {{0xea, 0xbb, 0x0c, 0x50, 0x2f, 0xd1, 0x81, 0x05, }}, /* Byte value: 0x30 */ + {{0xf5, 0xf7, 0x33, 0x97, 0xc7, 0x67, 0xf0, 0x84, }}, /* Byte value: 0x31 */ + {{0xba, 0x4e, 0xb9, 0x20, 0x79, 0xcb, 0xeb, 0x02, }}, /* Byte value: 0x32 */ + {{0x13, 0x28, 0xea, 0x72, 0x05, 0xeb, 0x99, 0xae, }}, /* Byte value: 0x33 */ + {{0x75, 0xbc, 0x06, 0x28, 0xf6, 0x89, 0xa1, 0xe3, }}, /* Byte value: 0x34 */ + {{0xc7, 0x0b, 0x98, 0x6f, 0x39, 0x95, 0xfa, 0x6a, }}, /* Byte value: 0x35 */ + {{0xbf, 0x65, 0x96, 0x27, 0x44, 0x82, 0xa5, 0x8f, }}, /* Byte value: 0x36 */ + {{0xb3, 0x01, 0x43, 0x92, 0xa9, 0xdf, 0x4d, 0xa0, }}, /* Byte value: 0x37 */ + {{0x0d, 0xd2, 0x08, 0x60, 0x8b, 0x9e, 0xfe, 0x06, }}, /* Byte value: 0x38 */ + {{0x4a, 0x92, 0xa5, 0xb0, 0x83, 0xe5, 0x55, 0x0b, }}, /* Byte value: 0x39 */ + {{0xd5, 0x95, 0xaf, 0xc8, 0x5a, 0xbd, 0x75, 0xed, }}, /* Byte value: 0x3a */ + {{0x76, 0xa5, 0xa2, 0x94, 0x5c, 0x0f, 0x9b, 0x98, }}, /* Byte value: 0x3b */ + {{0xb4, 0x85, 0x15, 0xfc, 0x58, 0xd3, 0x2f, 0x7f, }}, /* Byte value: 0x3c */ + {{0x4d, 0x16, 0xf3, 0xde, 0x72, 0xe9, 0x37, 0xd4, }}, /* Byte value: 0x3d */ + {{0x1d, 0xe3, 0x46, 0xae, 0x24, 0xf3, 0x5d, 0xd3, }}, /* Byte value: 0x3e */ + {{0x64, 0x3b, 0x95, 0x33, 0x3f, 0x27, 0x14, 0x1f, }}, /* Byte value: 0x3f */ + {{0xd8, 0x47, 0xa7, 0xa8, 0xd1, 0x23, 0x8b, 0xeb, }}, /* Byte value: 0x40 */ + {{0xdf, 0xc3, 0xf1, 0xc6, 0x20, 0x2f, 0xe9, 0x34, }}, /* Byte value: 0x41 */ + {{0xeb, 0x0d, 0xd1, 0x85, 0x49, 0x12, 0x97, 0x2c, }}, /* Byte value: 0x42 */ + {{0xe5, 0xc6, 0x7d, 0x59, 0x68, 0x0a, 0x53, 0x51, }}, /* Byte value: 0x43 */ + {{0x85, 0x60, 0x1a, 0xb8, 0x0c, 0xa7, 0x1f, 0xea, }}, /* Byte value: 0x44 */ + {{0xce, 0x44, 0x62, 0xdd, 0xe9, 0x81, 0x5c, 0xc8, }}, /* Byte value: 0x45 */ + {{0x8c, 0x2f, 0xe0, 0x0a, 0xdc, 0xb3, 0xb9, 0x48, }}, /* Byte value: 0x46 */ + {{0xf9, 0x93, 0xe6, 0x22, 0x2a, 0x3a, 0x18, 0xab, }}, /* Byte value: 0x47 */ + {{0xb1, 0xae, 0x3a, 0xfb, 0x65, 0x9a, 0x61, 0xf2, }}, /* Byte value: 0x48 */ + {{0xe6, 0xdf, 0xd9, 0xe5, 0xc2, 0x8c, 0x69, 0x2a, }}, /* Byte value: 0x49 */ + {{0x7d, 0x45, 0x21, 0x4f, 0x40, 0x5e, 0x11, 0x68, }}, /* Byte value: 0x4a */ + {{0x09, 0x4f, 0xfa, 0xb2, 0xd0, 0x14, 0xa6, 0xa2, }}, /* Byte value: 0x4b */ + {{0x4c, 0xa0, 0x2e, 0x0b, 0x14, 0x2a, 0x21, 0xfd, }}, /* Byte value: 0x4c */ + {{0x7f, 0xea, 0x58, 0x26, 0x8c, 0x1b, 0x3d, 0x3a, }}, /* Byte value: 0x4d */ + {{0xc3, 0x96, 0x6a, 0xbd, 0x62, 0x1f, 0xa2, 0xce, }}, /* Byte value: 0x4e */ + {{0x79, 0xd8, 0xd3, 0x9d, 0x1b, 0xd4, 0x49, 0xcc, }}, /* Byte value: 0x4f */ + {{0xc0, 0x8f, 0xce, 0x01, 0xc8, 0x99, 0x98, 0xb5, }}, /* Byte value: 0x50 */ + {{0x49, 0x8b, 0x01, 0x0c, 0x29, 0x63, 0x6f, 0x70, }}, /* Byte value: 0x51 */ + {{0xa0, 0x29, 0xa9, 0xe0, 0xac, 0x34, 0xd4, 0x0e, }}, /* Byte value: 0x52 */ + {{0xb5, 0x33, 0xc8, 0x29, 0x3e, 0x10, 0x39, 0x56, }}, /* Byte value: 0x53 */ + {{0xad, 0xfb, 0xa1, 0x80, 0x27, 0xaa, 0x2a, 0x08, }}, /* Byte value: 0x54 */ + {{0x1a, 0x67, 0x10, 0xc0, 0xd5, 0xff, 0x3f, 0x0c, }}, /* Byte value: 0x55 */ + {{0x44, 0x59, 0x09, 0x6c, 0xa2, 0xfd, 0x91, 0x76, }}, /* Byte value: 0x56 */ + {{0x23, 0x7b, 0x38, 0xe3, 0x37, 0x5c, 0xbf, 0x12, }}, /* Byte value: 0x57 */ + {{0xd7, 0x3a, 0xd6, 0xa1, 0x96, 0xf8, 0x59, 0xbf, }}, /* Byte value: 0x58 */ + {{0xf3, 0xc5, 0xb8, 0x2c, 0x50, 0xa8, 0x84, 0x72, }}, /* Byte value: 0x59 */ + {{0x7e, 0x5c, 0x85, 0xf3, 0xea, 0xd8, 0x2b, 0x13, }}, /* Byte value: 0x5a */ + {{0x71, 0x21, 0xf4, 0xfa, 0xad, 0x03, 0xf9, 0x47, }}, /* Byte value: 0x5b */ + {{0xc1, 0x39, 0x13, 0xd4, 0xae, 0x5a, 0x8e, 0x9c, }}, /* Byte value: 0x5c */ + {{0x7a, 0xc1, 0x77, 0x21, 0xb1, 0x52, 0x73, 0xb7, }}, /* Byte value: 0x5d */ + {{0xff, 0xa1, 0x6d, 0x99, 0xbd, 0xf5, 0x6c, 0x5d, }}, /* Byte value: 0x5e */ + {{0x12, 0x9e, 0x37, 0xa7, 0x63, 0x28, 0x8f, 0x87, }}, /* Byte value: 0x5f */ + {{0x73, 0x8e, 0x8d, 0x93, 0x61, 0x46, 0xd5, 0x15, }}, /* Byte value: 0x60 */ + {{0xee, 0x26, 0xfe, 0x82, 0x74, 0x5b, 0xd9, 0xa1, }}, /* Byte value: 0x61 */ + {{0xd6, 0x8c, 0x0b, 0x74, 0xf0, 0x3b, 0x4f, 0x96, }}, /* Byte value: 0x62 */ + {{0x01, 0xb6, 0xdd, 0xd5, 0x66, 0xc3, 0x16, 0x29, }}, /* Byte value: 0x63 */ + {{0x99, 0x35, 0x81, 0xc3, 0x4e, 0x97, 0x54, 0x10, }}, /* Byte value: 0x64 */ + {{0x03, 0x19, 0xa4, 0xbc, 0xaa, 0x86, 0x3a, 0x7b, }}, /* Byte value: 0x65 */ + {{0xcc, 0xeb, 0x1b, 0xb4, 0x25, 0xc4, 0x70, 0x9a, }}, /* Byte value: 0x66 */ + {{0x33, 0x4a, 0x76, 0x2d, 0x98, 0x31, 0x1c, 0xc7, }}, /* Byte value: 0x67 */ + {{0xec, 0x89, 0x87, 0xeb, 0xb8, 0x1e, 0xf5, 0xf3, }}, /* Byte value: 0x68 */ + {{0x86, 0x79, 0xbe, 0x04, 0xa6, 0x21, 0x25, 0x91, }}, /* Byte value: 0x69 */ + {{0xe4, 0x70, 0xa0, 0x8c, 0x0e, 0xc9, 0x45, 0x78, }}, /* Byte value: 0x6a */ + {{0x2d, 0xb0, 0x94, 0x3f, 0x16, 0x44, 0x7b, 0x6f, }}, /* Byte value: 0x6b */ + {{0x9c, 0x1e, 0xae, 0xc4, 0x73, 0xde, 0x1a, 0x9d, }}, /* Byte value: 0x6c */ + {{0x7b, 0x77, 0xaa, 0xf4, 0xd7, 0x91, 0x65, 0x9e, }}, /* Byte value: 0x6d */ + {{0x90, 0x7a, 0x7b, 0x71, 0x9e, 0x83, 0xf2, 0xb2, }}, /* Byte value: 0x6e */ + {{0x77, 0x13, 0x7f, 0x41, 0x3a, 0xcc, 0x8d, 0xb1, }}, /* Byte value: 0x6f */ + {{0xd2, 0x11, 0xf9, 0xa6, 0xab, 0xb1, 0x17, 0x32, }}, /* Byte value: 0x70 */ + {{0xa3, 0x30, 0x0d, 0x5c, 0x06, 0xb2, 0xee, 0x75, }}, /* Byte value: 0x71 */ + {{0x69, 0xe9, 0x9d, 0x53, 0xb4, 0xb9, 0xea, 0x19, }}, /* Byte value: 0x72 */ + {{0x2f, 0x1f, 0xed, 0x56, 0xda, 0x01, 0x57, 0x3d, }}, /* Byte value: 0x73 */ + {{0xf6, 0xee, 0x97, 0x2b, 0x6d, 0xe1, 0xca, 0xff, }}, /* Byte value: 0x74 */ + {{0x82, 0xe4, 0x4c, 0xd6, 0xfd, 0xab, 0x7d, 0x35, }}, /* Byte value: 0x75 */ + {{0x55, 0xde, 0x9a, 0x77, 0x6b, 0x53, 0x24, 0x8a, }}, /* Byte value: 0x76 */ + {{0xe9, 0xa2, 0xa8, 0xec, 0x85, 0x57, 0xbb, 0x7e, }}, /* Byte value: 0x77 */ + {{0x97, 0xfe, 0x2d, 0x1f, 0x6f, 0x8f, 0x90, 0x6d, }}, /* Byte value: 0x78 */ + {{0x0f, 0x7d, 0x71, 0x09, 0x47, 0xdb, 0xd2, 0x54, }}, /* Byte value: 0x79 */ + {{0x6e, 0x6d, 0xcb, 0x3d, 0x45, 0xb5, 0x88, 0xc6, }}, /* Byte value: 0x7a */ + {{0x42, 0x6b, 0x82, 0xd7, 0x35, 0x32, 0xe5, 0x80, }}, /* Byte value: 0x7b */ + {{0x84, 0xd6, 0xc7, 0x6d, 0x6a, 0x64, 0x09, 0xc3, }}, /* Byte value: 0x7c */ + {{0x6d, 0x74, 0x6f, 0x81, 0xef, 0x33, 0xb2, 0xbd, }}, /* Byte value: 0x7d */ + {{0x47, 0x40, 0xad, 0xd0, 0x08, 0x7b, 0xab, 0x0d, }}, /* Byte value: 0x7e */ + {{0xe8, 0x14, 0x75, 0x39, 0xe3, 0x94, 0xad, 0x57, }}, /* Byte value: 0x7f */ + {{0x07, 0x84, 0x56, 0x6e, 0xf1, 0x0c, 0x62, 0xdf, }}, /* Byte value: 0x80 */ + {{0xe1, 0x5b, 0x8f, 0x8b, 0x33, 0x80, 0x0b, 0xf5, }}, /* Byte value: 0x81 */ + {{0x46, 0xf6, 0x70, 0x05, 0x6e, 0xb8, 0xbd, 0x24, }}, /* Byte value: 0x82 */ + {{0x43, 0xdd, 0x5f, 0x02, 0x53, 0xf1, 0xf3, 0xa9, }}, /* Byte value: 0x83 */ + {{0xc8, 0x76, 0xe9, 0x66, 0x7e, 0x4e, 0x28, 0x3e, }}, /* Byte value: 0x84 */ + {{0x1e, 0xfa, 0xe2, 0x12, 0x8e, 0x75, 0x67, 0xa8, }}, /* Byte value: 0x85 */ + {{0xc6, 0xbd, 0x45, 0xba, 0x5f, 0x56, 0xec, 0x43, }}, /* Byte value: 0x86 */ + {{0x93, 0x63, 0xdf, 0xcd, 0x34, 0x05, 0xc8, 0xc9, }}, /* Byte value: 0x87 */ + {{0xaa, 0x7f, 0xf7, 0xee, 0xd6, 0xa6, 0x48, 0xd7, }}, /* Byte value: 0x88 */ + {{0xb9, 0x57, 0x1d, 0x9c, 0xd3, 0x4d, 0xd1, 0x79, }}, /* Byte value: 0x89 */ + {{0xf7, 0x58, 0x4a, 0xfe, 0x0b, 0x22, 0xdc, 0xd6, }}, /* Byte value: 0x8a */ + {{0x06, 0x32, 0x8b, 0xbb, 0x97, 0xcf, 0x74, 0xf6, }}, /* Byte value: 0x8b */ + {{0x53, 0xec, 0x11, 0xcc, 0xfc, 0x9c, 0x50, 0x7c, }}, /* Byte value: 0x8c */ + {{0x4b, 0x24, 0x78, 0x65, 0xe5, 0x26, 0x43, 0x22, }}, /* Byte value: 0x8d */ + {{0xda, 0xe8, 0xde, 0xc1, 0x1d, 0x66, 0xa7, 0xb9, }}, /* Byte value: 0x8e */ + {{0xe7, 0x69, 0x04, 0x30, 0xa4, 0x4f, 0x7f, 0x03, }}, /* Byte value: 0x8f */ + {{0x92, 0xd5, 0x02, 0x18, 0x52, 0xc6, 0xde, 0xe0, }}, /* Byte value: 0x90 */ + {{0xfd, 0x0e, 0x14, 0xf0, 0x71, 0xb0, 0x40, 0x0f, }}, /* Byte value: 0x91 */ + {{0x88, 0xb2, 0x12, 0xd8, 0x87, 0x39, 0xe1, 0xec, }}, /* Byte value: 0x92 */ + {{0x5a, 0xa3, 0xeb, 0x7e, 0x2c, 0x88, 0xf6, 0xde, }}, /* Byte value: 0x93 */ + {{0x5e, 0x3e, 0x19, 0xac, 0x77, 0x02, 0xae, 0x7a, }}, /* Byte value: 0x94 */ + {{0x6c, 0xc2, 0xb2, 0x54, 0x89, 0xf0, 0xa4, 0x94, }}, /* Byte value: 0x95 */ + {{0x2a, 0x34, 0xc2, 0x51, 0xe7, 0x48, 0x19, 0xb0, }}, /* Byte value: 0x96 */ + {{0x30, 0x53, 0xd2, 0x91, 0x32, 0xb7, 0x26, 0xbc, }}, /* Byte value: 0x97 */ + {{0xe0, 0xed, 0x52, 0x5e, 0x55, 0x43, 0x1d, 0xdc, }}, /* Byte value: 0x98 */ + {{0x3f, 0x2e, 0xa3, 0x98, 0x75, 0x6c, 0xf4, 0xe8, }}, /* Byte value: 0x99 */ + {{0x5c, 0x91, 0x60, 0xc5, 0xbb, 0x47, 0x82, 0x28, }}, /* Byte value: 0x9a */ + {{0xb8, 0xe1, 0xc0, 0x49, 0xb5, 0x8e, 0xc7, 0x50, }}, /* Byte value: 0x9b */ + {{0x81, 0xfd, 0xe8, 0x6a, 0x57, 0x2d, 0x47, 0x4e, }}, /* Byte value: 0x9c */ + {{0x8f, 0x36, 0x44, 0xb6, 0x76, 0x35, 0x83, 0x33, }}, /* Byte value: 0x9d */ + {{0x17, 0xb5, 0x18, 0xa0, 0x5e, 0x61, 0xc1, 0x0a, }}, /* Byte value: 0x9e */ + {{0x36, 0x61, 0x59, 0x2a, 0xa5, 0x78, 0x52, 0x4a, }}, /* Byte value: 0x9f */ + {{0xe3, 0xf4, 0xf6, 0xe2, 0xff, 0xc5, 0x27, 0xa7, }}, /* Byte value: 0xa0 */ + {{0x8b, 0xab, 0xb6, 0x64, 0x2d, 0xbf, 0xdb, 0x97, }}, /* Byte value: 0xa1 */ + {{0xd0, 0xbe, 0x80, 0xcf, 0x67, 0xf4, 0x3b, 0x60, }}, /* Byte value: 0xa2 */ + {{0xae, 0xe2, 0x05, 0x3c, 0x8d, 0x2c, 0x10, 0x73, }}, /* Byte value: 0xa3 */ + {{0x39, 0x1c, 0x28, 0x23, 0xe2, 0xa3, 0x80, 0x1e, }}, /* Byte value: 0xa4 */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xa5 */ + {{0x6a, 0xf0, 0x39, 0xef, 0x1e, 0x3f, 0xd0, 0x62, }}, /* Byte value: 0xa6 */ + {{0x96, 0x48, 0xf0, 0xca, 0x09, 0x4c, 0x86, 0x44, }}, /* Byte value: 0xa7 */ + {{0x8e, 0x80, 0x99, 0x63, 0x10, 0xf6, 0x95, 0x1a, }}, /* Byte value: 0xa8 */ + {{0x87, 0xcf, 0x63, 0xd1, 0xc0, 0xe2, 0x33, 0xb8, }}, /* Byte value: 0xa9 */ + {{0xc5, 0xa4, 0xe1, 0x06, 0xf5, 0xd0, 0xd6, 0x38, }}, /* Byte value: 0xaa */ + {{0xf8, 0x25, 0x3b, 0xf7, 0x4c, 0xf9, 0x0e, 0x82, }}, /* Byte value: 0xab */ + {{0x67, 0x22, 0x31, 0x8f, 0x95, 0xa1, 0x2e, 0x64, }}, /* Byte value: 0xac */ + {{0x26, 0x50, 0x17, 0xe4, 0x0a, 0x15, 0xf1, 0x9f, }}, /* Byte value: 0xad */ + {{0xfc, 0xb8, 0xc9, 0x25, 0x17, 0x73, 0x56, 0x26, }}, /* Byte value: 0xae */ + {{0x7c, 0xf3, 0xfc, 0x9a, 0x26, 0x9d, 0x07, 0x41, }}, /* Byte value: 0xaf */ + {{0xf4, 0x41, 0xee, 0x42, 0xa1, 0xa4, 0xe6, 0xad, }}, /* Byte value: 0xb0 */ + {{0xcb, 0x6f, 0x4d, 0xda, 0xd4, 0xc8, 0x12, 0x45, }}, /* Byte value: 0xb1 */ + {{0x2c, 0x06, 0x49, 0xea, 0x70, 0x87, 0x6d, 0x46, }}, /* Byte value: 0xb2 */ + {{0x61, 0x10, 0xba, 0x34, 0x02, 0x6e, 0x5a, 0x92, }}, /* Byte value: 0xb3 */ + {{0xa1, 0x9f, 0x74, 0x35, 0xca, 0xf7, 0xc2, 0x27, }}, /* Byte value: 0xb4 */ + {{0x18, 0xc8, 0x69, 0xa9, 0x19, 0xba, 0x13, 0x5e, }}, /* Byte value: 0xb5 */ + {{0x52, 0x5a, 0xcc, 0x19, 0x9a, 0x5f, 0x46, 0x55, }}, /* Byte value: 0xb6 */ + {{0x0c, 0x64, 0xd5, 0xb5, 0xed, 0x5d, 0xe8, 0x2f, }}, /* Byte value: 0xb7 */ + {{0x58, 0x0c, 0x92, 0x17, 0xe0, 0xcd, 0xda, 0x8c, }}, /* Byte value: 0xb8 */ + {{0x54, 0x68, 0x47, 0xa2, 0x0d, 0x90, 0x32, 0xa3, }}, /* Byte value: 0xb9 */ + {{0x59, 0xba, 0x4f, 0xc2, 0x86, 0x0e, 0xcc, 0xa5, }}, /* Byte value: 0xba */ + {{0x0e, 0xcb, 0xac, 0xdc, 0x21, 0x18, 0xc4, 0x7d, }}, /* Byte value: 0xbb */ + {{0x20, 0x62, 0x9c, 0x5f, 0x9d, 0xda, 0x85, 0x69, }}, /* Byte value: 0xbc */ + {{0x10, 0x31, 0x4e, 0xce, 0xaf, 0x6d, 0xa3, 0xd5, }}, /* Byte value: 0xbd */ + {{0x31, 0xe5, 0x0f, 0x44, 0x54, 0x74, 0x30, 0x95, }}, /* Byte value: 0xbe */ + {{0x22, 0xcd, 0xe5, 0x36, 0x51, 0x9f, 0xa9, 0x3b, }}, /* Byte value: 0xbf */ + {{0x50, 0xf5, 0xb5, 0x70, 0x56, 0x1a, 0x6a, 0x07, }}, /* Byte value: 0xc0 */ + {{0x15, 0x1a, 0x61, 0xc9, 0x92, 0x24, 0xed, 0x58, }}, /* Byte value: 0xc1 */ + {{0xcd, 0x5d, 0xc6, 0x61, 0x43, 0x07, 0x66, 0xb3, }}, /* Byte value: 0xc2 */ + {{0x21, 0xd4, 0x41, 0x8a, 0xfb, 0x19, 0x93, 0x40, }}, /* Byte value: 0xc3 */ + {{0x4f, 0xb9, 0x8a, 0xb7, 0xbe, 0xac, 0x1b, 0x86, }}, /* Byte value: 0xc4 */ + {{0xa9, 0x66, 0x53, 0x52, 0x7c, 0x20, 0x72, 0xac, }}, /* Byte value: 0xc5 */ + {{0xde, 0x75, 0x2c, 0x13, 0x46, 0xec, 0xff, 0x1d, }}, /* Byte value: 0xc6 */ + {{0x5b, 0x15, 0x36, 0xab, 0x4a, 0x4b, 0xe0, 0xf7, }}, /* Byte value: 0xc7 */ + {{0x68, 0x5f, 0x40, 0x86, 0xd2, 0x7a, 0xfc, 0x30, }}, /* Byte value: 0xc8 */ + {{0x38, 0xaa, 0xf5, 0xf6, 0x84, 0x60, 0x96, 0x37, }}, /* Byte value: 0xc9 */ + {{0x9a, 0x2c, 0x25, 0x7f, 0xe4, 0x11, 0x6e, 0x6b, }}, /* Byte value: 0xca */ + {{0x25, 0x49, 0xb3, 0x58, 0xa0, 0x93, 0xcb, 0xe4, }}, /* Byte value: 0xcb */ + {{0xef, 0x90, 0x23, 0x57, 0x12, 0x98, 0xcf, 0x88, }}, /* Byte value: 0xcc */ + {{0x0a, 0x56, 0x5e, 0x0e, 0x7a, 0x92, 0x9c, 0xd9, }}, /* Byte value: 0xcd */ + {{0xc2, 0x20, 0xb7, 0x68, 0x04, 0xdc, 0xb4, 0xe7, }}, /* Byte value: 0xce */ + {{0xb2, 0xb7, 0x9e, 0x47, 0xcf, 0x1c, 0x5b, 0x89, }}, /* Byte value: 0xcf */ + {{0xcf, 0xf2, 0xbf, 0x08, 0x8f, 0x42, 0x4a, 0xe1, }}, /* Byte value: 0xd0 */ + {{0xd3, 0xa7, 0x24, 0x73, 0xcd, 0x72, 0x01, 0x1b, }}, /* Byte value: 0xd1 */ + {{0xa5, 0x02, 0x86, 0xe7, 0x91, 0x7d, 0x9a, 0x83, }}, /* Byte value: 0xd2 */ + {{0xd1, 0x08, 0x5d, 0x1a, 0x01, 0x37, 0x2d, 0x49, }}, /* Byte value: 0xd3 */ + {{0x3b, 0xb3, 0x51, 0x4a, 0x2e, 0xe6, 0xac, 0x4c, }}, /* Byte value: 0xd4 */ + {{0x95, 0x51, 0x54, 0x76, 0xa3, 0xca, 0xbc, 0x3f, }}, /* Byte value: 0xd5 */ + {{0xa6, 0x1b, 0x22, 0x5b, 0x3b, 0xfb, 0xa0, 0xf8, }}, /* Byte value: 0xd6 */ + {{0xab, 0xc9, 0x2a, 0x3b, 0xb0, 0x65, 0x5e, 0xfe, }}, /* Byte value: 0xd7 */ + {{0x05, 0x2b, 0x2f, 0x07, 0x3d, 0x49, 0x4e, 0x8d, }}, /* Byte value: 0xd8 */ + {{0x5f, 0x88, 0xc4, 0x79, 0x11, 0xc1, 0xb8, 0x53, }}, /* Byte value: 0xd9 */ + {{0xa4, 0xb4, 0x5b, 0x32, 0xf7, 0xbe, 0x8c, 0xaa, }}, /* Byte value: 0xda */ + {{0xdb, 0x5e, 0x03, 0x14, 0x7b, 0xa5, 0xb1, 0x90, }}, /* Byte value: 0xdb */ + {{0x74, 0x0a, 0xdb, 0xfd, 0x90, 0x4a, 0xb7, 0xca, }}, /* Byte value: 0xdc */ + {{0x57, 0x71, 0xe3, 0x1e, 0xa7, 0x16, 0x08, 0xd8, }}, /* Byte value: 0xdd */ + {{0xa8, 0xd0, 0x8e, 0x87, 0x1a, 0xe3, 0x64, 0x85, }}, /* Byte value: 0xde */ + {{0x8d, 0x99, 0x3d, 0xdf, 0xba, 0x70, 0xaf, 0x61, }}, /* Byte value: 0xdf */ + {{0xf1, 0x6a, 0xc1, 0x45, 0x9c, 0xed, 0xa8, 0x20, }}, /* Byte value: 0xe0 */ + {{0x14, 0xac, 0xbc, 0x1c, 0xf4, 0xe7, 0xfb, 0x71, }}, /* Byte value: 0xe1 */ + {{0x80, 0x4b, 0x35, 0xbf, 0x31, 0xee, 0x51, 0x67, }}, /* Byte value: 0xe2 */ + {{0x04, 0x9d, 0xf2, 0xd2, 0x5b, 0x8a, 0x58, 0xa4, }}, /* Byte value: 0xe3 */ + {{0xb6, 0x2a, 0x6c, 0x95, 0x94, 0x96, 0x03, 0x2d, }}, /* Byte value: 0xe4 */ + {{0xbb, 0xf8, 0x64, 0xf5, 0x1f, 0x08, 0xfd, 0x2b, }}, /* Byte value: 0xe5 */ + {{0xf0, 0xdc, 0x1c, 0x90, 0xfa, 0x2e, 0xbe, 0x09, }}, /* Byte value: 0xe6 */ + {{0xf2, 0x73, 0x65, 0xf9, 0x36, 0x6b, 0x92, 0x5b, }}, /* Byte value: 0xe7 */ + {{0x29, 0x2d, 0x66, 0xed, 0x4d, 0xce, 0x23, 0xcb, }}, /* Byte value: 0xe8 */ + {{0x91, 0xcc, 0xa6, 0xa4, 0xf8, 0x40, 0xe4, 0x9b, }}, /* Byte value: 0xe9 */ + {{0x1b, 0xd1, 0xcd, 0x15, 0xb3, 0x3c, 0x29, 0x25, }}, /* Byte value: 0xea */ + {{0xfa, 0x8a, 0x42, 0x9e, 0x80, 0xbc, 0x22, 0xd0, }}, /* Byte value: 0xeb */ + {{0x8a, 0x1d, 0x6b, 0xb1, 0x4b, 0x7c, 0xcd, 0xbe, }}, /* Byte value: 0xec */ + {{0x78, 0x6e, 0x0e, 0x48, 0x7d, 0x17, 0x5f, 0xe5, }}, /* Byte value: 0xed */ + {{0xca, 0xd9, 0x90, 0x0f, 0xb2, 0x0b, 0x04, 0x6c, }}, /* Byte value: 0xee */ + {{0x02, 0xaf, 0x79, 0x69, 0xcc, 0x45, 0x2c, 0x52, }}, /* Byte value: 0xef */ + {{0x48, 0x3d, 0xdc, 0xd9, 0x4f, 0xa0, 0x79, 0x59, }}, /* Byte value: 0xf0 */ + {{0xbe, 0xd3, 0x4b, 0xf2, 0x22, 0x41, 0xb3, 0xa6, }}, /* Byte value: 0xf1 */ + {{0xfe, 0x17, 0xb0, 0x4c, 0xdb, 0x36, 0x7a, 0x74, }}, /* Byte value: 0xf2 */ + {{0x40, 0xc4, 0xfb, 0xbe, 0xf9, 0x77, 0xc9, 0xd2, }}, /* Byte value: 0xf3 */ + {{0x9f, 0x07, 0x0a, 0x78, 0xd9, 0x58, 0x20, 0xe6, }}, /* Byte value: 0xf4 */ + {{0xbc, 0x7c, 0x32, 0x9b, 0xee, 0x04, 0x9f, 0xf4, }}, /* Byte value: 0xf5 */ + {{0x9d, 0xa8, 0x73, 0x11, 0x15, 0x1d, 0x0c, 0xb4, }}, /* Byte value: 0xf6 */ + {{0x63, 0xbf, 0xc3, 0x5d, 0xce, 0x2b, 0x76, 0xc0, }}, /* Byte value: 0xf7 */ + {{0xa7, 0xad, 0xff, 0x8e, 0x5d, 0x38, 0xb6, 0xd1, }}, /* Byte value: 0xf8 */ + {{0xdd, 0x6c, 0x88, 0xaf, 0xec, 0x6a, 0xc5, 0x66, }}, /* Byte value: 0xf9 */ + {{0x4e, 0x0f, 0x57, 0x62, 0xd8, 0x6f, 0x0d, 0xaf, }}, /* Byte value: 0xfa */ + {{0xd9, 0xf1, 0x7a, 0x7d, 0xb7, 0xe0, 0x9d, 0xc2, }}, /* Byte value: 0xfb */ + {{0x98, 0x83, 0x5c, 0x16, 0x28, 0x54, 0x42, 0x39, }}, /* Byte value: 0xfc */ + {{0x6b, 0x46, 0xe4, 0x3a, 0x78, 0xfc, 0xc6, 0x4b, }}, /* Byte value: 0xfd */ + {{0x37, 0xd7, 0x84, 0xff, 0xc3, 0xbb, 0x44, 0x63, }}, /* Byte value: 0xfe */ + {{0x27, 0xe6, 0xca, 0x31, 0x6c, 0xd6, 0xe7, 0xb6, }}, /* Byte value: 0xff */ + }, +}; + +const union qword_t precomputedInversedLSTableLeft[16][256] = { + { /* Matrix row: 0 */ + {{0xa5, 0xcc, 0x0e, 0x86, 0xc2, 0x4f, 0xba, 0x59, }}, /* Byte value: 0x00 */ + {{0x2d, 0x03, 0x96, 0x94, 0x95, 0x6c, 0x2a, 0xb6, }}, /* Byte value: 0x01 */ + {{0x32, 0x17, 0xb1, 0xab, 0xa6, 0xf9, 0x11, 0xd2, }}, /* Byte value: 0x02 */ + {{0x8f, 0xa5, 0x82, 0x44, 0x27, 0x96, 0x65, 0xbf, }}, /* Byte value: 0x03 */ + {{0x0e, 0xd4, 0x34, 0xac, 0xe0, 0xa9, 0x29, 0xa0, }}, /* Byte value: 0x04 */ + {{0x30, 0xfc, 0x7a, 0xd2, 0x86, 0x40, 0x5f, 0x68, }}, /* Byte value: 0x05 */ + {{0x38, 0xd6, 0xd0, 0xf5, 0x06, 0xe1, 0xa4, 0xc5, }}, /* Byte value: 0x06 */ + {{0xc0, 0x76, 0x2b, 0xce, 0x5d, 0xc3, 0xbf, 0x63, }}, /* Byte value: 0x07 */ + {{0x54, 0xd2, 0xdb, 0x47, 0x09, 0x71, 0x7d, 0x0f, }}, /* Byte value: 0x08 */ + {{0xe6, 0x20, 0x58, 0xd9, 0x78, 0x0a, 0x07, 0x9f, }}, /* Byte value: 0x09 */ + {{0x9e, 0x65, 0x91, 0xd7, 0xf4, 0xaa, 0x77, 0x7b, }}, /* Byte value: 0x0a */ + {{0x39, 0x42, 0x54, 0x28, 0x16, 0x5c, 0x83, 0x98, }}, /* Byte value: 0x0b */ + {{0x55, 0x46, 0x5f, 0x9a, 0x19, 0xcc, 0x5a, 0x52, }}, /* Byte value: 0x0c */ + {{0x7e, 0xbb, 0x57, 0x85, 0xec, 0xa8, 0xa2, 0xe9, }}, /* Byte value: 0x0d */ + {{0x52, 0x2c, 0x45, 0xcc, 0x69, 0x79, 0xaf, 0x02, }}, /* Byte value: 0x0e */ + {{0x91, 0x25, 0x21, 0xa6, 0x04, 0xbe, 0x79, 0x86, }}, /* Byte value: 0x0f */ + {{0x64, 0x2e, 0xa1, 0x95, 0x8f, 0x31, 0x22, 0x67, }}, /* Byte value: 0x10 */ + {{0x03, 0x7f, 0x4f, 0xa4, 0x30, 0x04, 0x69, 0xe7, }}, /* Byte value: 0x11 */ + {{0x57, 0xad, 0x94, 0xe3, 0x39, 0x75, 0x14, 0xe8, }}, /* Byte value: 0x12 */ + {{0x5a, 0x06, 0xef, 0xeb, 0xe9, 0xd8, 0x54, 0xaf, }}, /* Byte value: 0x13 */ + {{0x1c, 0x6b, 0x68, 0x9b, 0x03, 0x91, 0x52, 0x83, }}, /* Byte value: 0x14 */ + {{0x60, 0x3b, 0xf4, 0x67, 0xcf, 0x80, 0xbe, 0xd0, }}, /* Byte value: 0x15 */ + {{0x07, 0x6a, 0x1a, 0x56, 0x70, 0xb5, 0xf5, 0x50, }}, /* Byte value: 0x16 */ + {{0x18, 0x7e, 0x3d, 0x69, 0x43, 0x20, 0xce, 0x34, }}, /* Byte value: 0x17 */ + {{0x21, 0x3c, 0x69, 0x41, 0x55, 0x7c, 0x4d, 0xac, }}, /* Byte value: 0x18 */ + {{0x72, 0x84, 0xa8, 0x50, 0x2c, 0xb8, 0xc5, 0xf3, }}, /* Byte value: 0x19 */ + {{0xa8, 0x67, 0x75, 0x8e, 0x12, 0xe2, 0xfa, 0x1e, }}, /* Byte value: 0x1a */ + {{0xd1, 0xb6, 0x38, 0x5d, 0x8e, 0xff, 0xad, 0xa7, }}, /* Byte value: 0x1b */ + {{0x29, 0x16, 0xc3, 0x66, 0xd5, 0xdd, 0xb6, 0x01, }}, /* Byte value: 0x1c */ + {{0xc6, 0x88, 0xb5, 0x45, 0x3d, 0xcb, 0x6d, 0x6e, }}, /* Byte value: 0x1d */ + {{0xa4, 0x58, 0x8a, 0x5b, 0xd2, 0xf2, 0x9d, 0x04, }}, /* Byte value: 0x1e */ + {{0x3f, 0xbc, 0xca, 0xa3, 0x76, 0x54, 0x51, 0x95, }}, /* Byte value: 0x1f */ + {{0xe0, 0xde, 0xc6, 0x52, 0x18, 0x02, 0xd5, 0x92, }}, /* Byte value: 0x20 */ + {{0x27, 0xc2, 0xf7, 0xca, 0x35, 0x74, 0x9f, 0xa1, }}, /* Byte value: 0x21 */ + {{0x8d, 0x4e, 0x49, 0x3d, 0x07, 0x2f, 0x2b, 0x05, }}, /* Byte value: 0x22 */ + {{0x0c, 0x3f, 0xff, 0xd5, 0xc0, 0x10, 0x67, 0x1a, }}, /* Byte value: 0x23 */ + {{0x82, 0x0e, 0xf9, 0x4c, 0xf7, 0x3b, 0x25, 0xf8, }}, /* Byte value: 0x24 */ + {{0xea, 0x1f, 0xa7, 0x0c, 0xb8, 0x1a, 0x60, 0x85, }}, /* Byte value: 0x25 */ + {{0xae, 0x99, 0xeb, 0x05, 0x72, 0xea, 0x28, 0x13, }}, /* Byte value: 0x26 */ + {{0xb4, 0x0c, 0x1d, 0x15, 0x11, 0x73, 0xa8, 0x9d, }}, /* Byte value: 0x27 */ + {{0x9a, 0x70, 0xc4, 0x25, 0xb4, 0x1b, 0xeb, 0xcc, }}, /* Byte value: 0x28 */ + {{0x63, 0x44, 0xbb, 0xc3, 0xff, 0x84, 0xd7, 0x37, }}, /* Byte value: 0x29 */ + {{0x49, 0x2d, 0x37, 0x01, 0x1a, 0x5d, 0x08, 0xd1, }}, /* Byte value: 0x2a */ + {{0xe5, 0x5f, 0x17, 0x7d, 0x48, 0x0e, 0x6e, 0x78, }}, /* Byte value: 0x2b */ + {{0x42, 0x78, 0xd2, 0x82, 0xaa, 0xf8, 0x9a, 0x9b, }}, /* Byte value: 0x2c */ + {{0xe4, 0xcb, 0x93, 0xa0, 0x58, 0xb3, 0x49, 0x25, }}, /* Byte value: 0x2d */ + {{0x15, 0xd5, 0x46, 0x61, 0x93, 0x8d, 0x8e, 0x73, }}, /* Byte value: 0x2e */ + {{0xb7, 0x73, 0x52, 0xb1, 0x21, 0x77, 0xc1, 0x7a, }}, /* Byte value: 0x2f */ + {{0xc8, 0x5c, 0x81, 0xe9, 0xdd, 0x62, 0x44, 0xce, }}, /* Byte value: 0x30 */ + {{0x06, 0xfe, 0x9e, 0x8b, 0x60, 0x08, 0xd2, 0x0d, }}, /* Byte value: 0x31 */ + {{0x70, 0x6f, 0x63, 0x29, 0x0c, 0x01, 0x8b, 0x49, }}, /* Byte value: 0x32 */ + {{0x9d, 0x1a, 0xde, 0x73, 0xc4, 0xae, 0x1e, 0x9c, }}, /* Byte value: 0x33 */ + {{0x41, 0x07, 0x9d, 0x26, 0x9a, 0xfc, 0xf3, 0x7c, }}, /* Byte value: 0x34 */ + {{0x75, 0xee, 0xb2, 0x06, 0x5c, 0x0d, 0x30, 0xa3, }}, /* Byte value: 0x35 */ + {{0x19, 0xea, 0xb9, 0xb4, 0x53, 0x9d, 0xe9, 0x69, }}, /* Byte value: 0x36 */ + {{0xc9, 0xc8, 0x05, 0x34, 0xcd, 0xdf, 0x63, 0x93, }}, /* Byte value: 0x37 */ + {{0xaa, 0x8c, 0xbe, 0xf7, 0x32, 0x5b, 0xb4, 0xa4, }}, /* Byte value: 0x38 */ + {{0xfc, 0xb5, 0xae, 0xc9, 0x1b, 0x93, 0x87, 0x11, }}, /* Byte value: 0x39 */ + {{0x4d, 0x38, 0x62, 0xf3, 0x5a, 0xec, 0x94, 0x66, }}, /* Byte value: 0x3a */ + {{0xbf, 0x59, 0xf8, 0x96, 0xa1, 0xd6, 0x3a, 0xd7, }}, /* Byte value: 0x3b */ + {{0x2a, 0x69, 0x8c, 0xc2, 0xe5, 0xd9, 0xdf, 0xe6, }}, /* Byte value: 0x3c */ + {{0x73, 0x10, 0x2c, 0x8d, 0x3c, 0x05, 0xe2, 0xae, }}, /* Byte value: 0x3d */ + {{0x84, 0xf0, 0x67, 0xc7, 0x97, 0x33, 0xf7, 0xf5, }}, /* Byte value: 0x3e */ + {{0xd5, 0xa3, 0x6d, 0xaf, 0xce, 0x4e, 0x31, 0x10, }}, /* Byte value: 0x3f */ + {{0xc3, 0x09, 0x64, 0x6a, 0x6d, 0xc7, 0xd6, 0x84, }}, /* Byte value: 0x40 */ + {{0xaf, 0x0d, 0x6f, 0xd8, 0x62, 0x57, 0x0f, 0x4e, }}, /* Byte value: 0x41 */ + {{0x2b, 0xfd, 0x08, 0x1f, 0xf5, 0x64, 0xf8, 0xbb, }}, /* Byte value: 0x42 */ + {{0x86, 0x1b, 0xac, 0xbe, 0xb7, 0x8a, 0xb9, 0x4f, }}, /* Byte value: 0x43 */ + {{0xa7, 0x27, 0xc5, 0xff, 0xe2, 0xf6, 0xf4, 0xe3, }}, /* Byte value: 0x44 */ + {{0xb1, 0x8d, 0xcc, 0x3a, 0x41, 0x7f, 0x13, 0x77, }}, /* Byte value: 0x45 */ + {{0xb2, 0xf2, 0x83, 0x9e, 0x71, 0x7b, 0x7a, 0x90, }}, /* Byte value: 0x46 */ + {{0x5b, 0x92, 0x6b, 0x36, 0xf9, 0x65, 0x73, 0xf2, }}, /* Byte value: 0x47 */ + {{0x46, 0x6d, 0x87, 0x70, 0xea, 0x49, 0x06, 0x2c, }}, /* Byte value: 0x48 */ + {{0xd3, 0x5d, 0xf3, 0x24, 0xae, 0x46, 0xe3, 0x1d, }}, /* Byte value: 0x49 */ + {{0x9f, 0xf1, 0x15, 0x0a, 0xe4, 0x17, 0x50, 0x26, }}, /* Byte value: 0x4a */ + {{0xfd, 0x21, 0x2a, 0x14, 0x0b, 0x2e, 0xa0, 0x4c, }}, /* Byte value: 0x4b */ + {{0xd4, 0x37, 0xe9, 0x72, 0xde, 0xf3, 0x16, 0x4d, }}, /* Byte value: 0x4c */ + {{0x0f, 0x40, 0xb0, 0x71, 0xf0, 0x14, 0x0e, 0xfd, }}, /* Byte value: 0x4d */ + {{0x9c, 0x8e, 0x5a, 0xae, 0xd4, 0x13, 0x39, 0xc1, }}, /* Byte value: 0x4e */ + {{0x2f, 0xe8, 0x5d, 0xed, 0xb5, 0xd5, 0x64, 0x0c, }}, /* Byte value: 0x4f */ + {{0x9b, 0xe4, 0x40, 0xf8, 0xa4, 0xa6, 0xcc, 0x91, }}, /* Byte value: 0x50 */ + {{0x43, 0xec, 0x56, 0x5f, 0xba, 0x45, 0xbd, 0xc6, }}, /* Byte value: 0x51 */ + {{0xef, 0x9e, 0x76, 0x23, 0xe8, 0x16, 0xdb, 0x6f, }}, /* Byte value: 0x52 */ + {{0xd9, 0x9c, 0x92, 0x7a, 0x0e, 0x5e, 0x56, 0x0a, }}, /* Byte value: 0x53 */ + {{0x79, 0xd1, 0x4d, 0xd3, 0x9c, 0x1d, 0x57, 0xb9, }}, /* Byte value: 0x54 */ + {{0xb6, 0xe7, 0xd6, 0x6c, 0x31, 0xca, 0xe6, 0x27, }}, /* Byte value: 0x55 */ + {{0x53, 0xb8, 0xc1, 0x11, 0x79, 0xc4, 0x88, 0x5f, }}, /* Byte value: 0x56 */ + {{0x7f, 0x2f, 0xd3, 0x58, 0xfc, 0x15, 0x85, 0xb4, }}, /* Byte value: 0x57 */ + {{0xc1, 0xe2, 0xaf, 0x13, 0x4d, 0x7e, 0x98, 0x3e, }}, /* Byte value: 0x58 */ + {{0xf0, 0x8a, 0x51, 0x1c, 0xdb, 0x83, 0xe0, 0x0b, }}, /* Byte value: 0x59 */ + {{0x23, 0xd7, 0xa2, 0x38, 0x75, 0xc5, 0x03, 0x16, }}, /* Byte value: 0x5a */ + {{0xe7, 0xb4, 0xdc, 0x04, 0x68, 0xb7, 0x20, 0xc2, }}, /* Byte value: 0x5b */ + {{0x25, 0x29, 0x3c, 0xb3, 0x15, 0xcd, 0xd1, 0x1b, }}, /* Byte value: 0x5c */ + {{0x5e, 0x13, 0xba, 0x19, 0xa9, 0x69, 0xc8, 0x18, }}, /* Byte value: 0x5d */ + {{0xb5, 0x98, 0x99, 0xc8, 0x01, 0xce, 0x8f, 0xc0, }}, /* Byte value: 0x5e */ + {{0x1e, 0x80, 0xa3, 0xe2, 0x23, 0x28, 0x1c, 0x39, }}, /* Byte value: 0x5f */ + {{0xa2, 0xa6, 0x14, 0xd0, 0xb2, 0xfa, 0x4f, 0x09, }}, /* Byte value: 0x60 */ + {{0xdf, 0x62, 0x0c, 0xf1, 0x6e, 0x56, 0x84, 0x07, }}, /* Byte value: 0x61 */ + {{0xa6, 0xb3, 0x41, 0x22, 0xf2, 0x4b, 0xd3, 0xbe, }}, /* Byte value: 0x62 */ + {{0xfe, 0x5e, 0x65, 0xb0, 0x3b, 0x2a, 0xc9, 0xab, }}, /* Byte value: 0x63 */ + {{0xac, 0x72, 0x20, 0x7c, 0x52, 0x53, 0x66, 0xa9, }}, /* Byte value: 0x64 */ + {{0x22, 0x43, 0x26, 0xe5, 0x65, 0x78, 0x24, 0x4b, }}, /* Byte value: 0x65 */ + {{0xf9, 0x34, 0x7f, 0xe6, 0x4b, 0x9f, 0x3c, 0xfb, }}, /* Byte value: 0x66 */ + {{0xe2, 0x35, 0x0d, 0x2b, 0x38, 0xbb, 0x9b, 0x28, }}, /* Byte value: 0x67 */ + {{0x4a, 0x52, 0x78, 0xa5, 0x2a, 0x59, 0x61, 0x36, }}, /* Byte value: 0x68 */ + {{0xbc, 0x26, 0xb7, 0x32, 0x91, 0xd2, 0x53, 0x30, }}, /* Byte value: 0x69 */ + {{0x35, 0x7d, 0xab, 0xfd, 0xd6, 0x4c, 0xe4, 0x82, }}, /* Byte value: 0x6a */ + {{0xca, 0xb7, 0x4a, 0x90, 0xfd, 0xdb, 0x0a, 0x74, }}, /* Byte value: 0x6b */ + {{0xee, 0x0a, 0xf2, 0xfe, 0xf8, 0xab, 0xfc, 0x32, }}, /* Byte value: 0x6c */ + {{0x78, 0x45, 0xc9, 0x0e, 0x8c, 0xa0, 0x70, 0xe4, }}, /* Byte value: 0x6d */ + {{0x05, 0x81, 0xd1, 0x2f, 0x50, 0x0c, 0xbb, 0xea, }}, /* Byte value: 0x6e */ + {{0x6b, 0x6e, 0x11, 0xe4, 0x7f, 0x25, 0x2c, 0x9a, }}, /* Byte value: 0x6f */ + {{0x51, 0x53, 0x0a, 0x68, 0x59, 0x7d, 0xc6, 0xe5, }}, /* Byte value: 0x70 */ + {{0xe1, 0x4a, 0x42, 0x8f, 0x08, 0xbf, 0xf2, 0xcf, }}, /* Byte value: 0x71 */ + {{0x59, 0x79, 0xa0, 0x4f, 0xd9, 0xdc, 0x3d, 0x48, }}, /* Byte value: 0x72 */ + {{0xa3, 0x32, 0x90, 0x0d, 0xa2, 0x47, 0x68, 0x54, }}, /* Byte value: 0x73 */ + {{0xf2, 0x61, 0x9a, 0x65, 0xfb, 0x3a, 0xae, 0xb1, }}, /* Byte value: 0x74 */ + {{0x71, 0xfb, 0xe7, 0xf4, 0x1c, 0xbc, 0xac, 0x14, }}, /* Byte value: 0x75 */ + {{0x56, 0x39, 0x10, 0x3e, 0x29, 0xc8, 0x33, 0xb5, }}, /* Byte value: 0x76 */ + {{0x11, 0xc0, 0x13, 0x93, 0xd3, 0x3c, 0x12, 0xc4, }}, /* Byte value: 0x77 */ + {{0x6a, 0xfa, 0x95, 0x39, 0x6f, 0x98, 0x0b, 0xc7, }}, /* Byte value: 0x78 */ + {{0x89, 0x5b, 0x1c, 0xcf, 0x47, 0x9e, 0xb7, 0xb2, }}, /* Byte value: 0x79 */ + {{0x94, 0xa4, 0xf0, 0x89, 0x54, 0xb2, 0xc2, 0x6c, }}, /* Byte value: 0x7a */ + {{0x65, 0xba, 0x25, 0x48, 0x9f, 0x8c, 0x05, 0x3a, }}, /* Byte value: 0x7b */ + {{0x8c, 0xda, 0xcd, 0xe0, 0x17, 0x92, 0x0c, 0x58, }}, /* Byte value: 0x7c */ + {{0xbb, 0x4c, 0xad, 0x64, 0xe1, 0x67, 0xa6, 0x60, }}, /* Byte value: 0x7d */ + {{0x77, 0x05, 0x79, 0x7f, 0x7c, 0xb4, 0x7e, 0x19, }}, /* Byte value: 0x7e */ + {{0x3c, 0xc3, 0x85, 0x07, 0x46, 0x50, 0x38, 0x72, }}, /* Byte value: 0x7f */ + {{0x7b, 0x3a, 0x86, 0xaa, 0xbc, 0xa4, 0x19, 0x03, }}, /* Byte value: 0x80 */ + {{0x28, 0x82, 0x47, 0xbb, 0xc5, 0x60, 0x91, 0x5c, }}, /* Byte value: 0x81 */ + {{0xab, 0x18, 0x3a, 0x2a, 0x22, 0xe6, 0x93, 0xf9, }}, /* Byte value: 0x82 */ + {{0xd2, 0xc9, 0x77, 0xf9, 0xbe, 0xfb, 0xc4, 0x40, }}, /* Byte value: 0x83 */ + {{0x31, 0x68, 0xfe, 0x0f, 0x96, 0xfd, 0x78, 0x35, }}, /* Byte value: 0x84 */ + {{0xde, 0xf6, 0x88, 0x2c, 0x7e, 0xeb, 0xa3, 0x5a, }}, /* Byte value: 0x85 */ + {{0xc4, 0x63, 0x7e, 0x3c, 0x1d, 0x72, 0x23, 0xd4, }}, /* Byte value: 0x86 */ + {{0x5f, 0x87, 0x3e, 0xc4, 0xb9, 0xd4, 0xef, 0x45, }}, /* Byte value: 0x87 */ + {{0xcc, 0x49, 0xd4, 0x1b, 0x9d, 0xd3, 0xd8, 0x79, }}, /* Byte value: 0x88 */ + {{0xcf, 0x36, 0x9b, 0xbf, 0xad, 0xd7, 0xb1, 0x9e, }}, /* Byte value: 0x89 */ + {{0x76, 0x91, 0xfd, 0xa2, 0x6c, 0x09, 0x59, 0x44, }}, /* Byte value: 0x8a */ + {{0x2c, 0x97, 0x12, 0x49, 0x85, 0xd1, 0x0d, 0xeb, }}, /* Byte value: 0x8b */ + {{0xb8, 0x33, 0xe2, 0xc0, 0xd1, 0x63, 0xcf, 0x87, }}, /* Byte value: 0x8c */ + {{0xd8, 0x08, 0x16, 0xa7, 0x1e, 0xe3, 0x71, 0x57, }}, /* Byte value: 0x8d */ + {{0x2e, 0x7c, 0xd9, 0x30, 0xa5, 0x68, 0x43, 0x51, }}, /* Byte value: 0x8e */ + {{0x36, 0x02, 0xe4, 0x59, 0xe6, 0x48, 0x8d, 0x65, }}, /* Byte value: 0x8f */ + {{0xdb, 0x77, 0x59, 0x03, 0x2e, 0xe7, 0x18, 0xb0, }}, /* Byte value: 0x90 */ + {{0x69, 0x85, 0xda, 0x9d, 0x5f, 0x9c, 0x62, 0x20, }}, /* Byte value: 0x91 */ + {{0xb3, 0x66, 0x07, 0x43, 0x61, 0xc6, 0x5d, 0xcd, }}, /* Byte value: 0x92 */ + {{0x14, 0x41, 0xc2, 0xbc, 0x83, 0x30, 0xa9, 0x2e, }}, /* Byte value: 0x93 */ + {{0x95, 0x30, 0x74, 0x54, 0x44, 0x0f, 0xe5, 0x31, }}, /* Byte value: 0x94 */ + {{0xbe, 0xcd, 0x7c, 0x4b, 0xb1, 0x6b, 0x1d, 0x8a, }}, /* Byte value: 0x95 */ + {{0x62, 0xd0, 0x3f, 0x1e, 0xef, 0x39, 0xf0, 0x6a, }}, /* Byte value: 0x96 */ + {{0xa1, 0xd9, 0x5b, 0x74, 0x82, 0xfe, 0x26, 0xee, }}, /* Byte value: 0x97 */ + {{0x3b, 0xa9, 0x9f, 0x51, 0x36, 0xe5, 0xcd, 0x22, }}, /* Byte value: 0x98 */ + {{0x16, 0xaa, 0x09, 0xc5, 0xa3, 0x89, 0xe7, 0x94, }}, /* Byte value: 0x99 */ + {{0x66, 0xc5, 0x6a, 0xec, 0xaf, 0x88, 0x6c, 0xdd, }}, /* Byte value: 0x9a */ + {{0xe9, 0x60, 0xe8, 0xa8, 0x88, 0x1e, 0x09, 0x62, }}, /* Byte value: 0x9b */ + {{0x5c, 0xf8, 0x71, 0x60, 0x89, 0xd0, 0x86, 0xa2, }}, /* Byte value: 0x9c */ + {{0x6c, 0x04, 0x0b, 0xb2, 0x0f, 0x90, 0xd9, 0xca, }}, /* Byte value: 0x9d */ + {{0x6d, 0x90, 0x8f, 0x6f, 0x1f, 0x2d, 0xfe, 0x97, }}, /* Byte value: 0x9e */ + {{0xad, 0xe6, 0xa4, 0xa1, 0x42, 0xee, 0x41, 0xf4, }}, /* Byte value: 0x9f */ + {{0x37, 0x96, 0x60, 0x84, 0xf6, 0xf5, 0xaa, 0x38, }}, /* Byte value: 0xa0 */ + {{0x61, 0xaf, 0x70, 0xba, 0xdf, 0x3d, 0x99, 0x8d, }}, /* Byte value: 0xa1 */ + {{0x4b, 0xc6, 0xfc, 0x78, 0x3a, 0xe4, 0x46, 0x6b, }}, /* Byte value: 0xa2 */ + {{0xb9, 0xa7, 0x66, 0x1d, 0xc1, 0xde, 0xe8, 0xda, }}, /* Byte value: 0xa3 */ + {{0xe3, 0xa1, 0x89, 0xf6, 0x28, 0x06, 0xbc, 0x75, }}, /* Byte value: 0xa4 */ + {{0xba, 0xd8, 0x29, 0xb9, 0xf1, 0xda, 0x81, 0x3d, }}, /* Byte value: 0xa5 */ + {{0xf1, 0x1e, 0xd5, 0xc1, 0xcb, 0x3e, 0xc7, 0x56, }}, /* Byte value: 0xa6 */ + {{0xa0, 0x4d, 0xdf, 0xa9, 0x92, 0x43, 0x01, 0xb3, }}, /* Byte value: 0xa7 */ + {{0x85, 0x64, 0xe3, 0x1a, 0x87, 0x8e, 0xd0, 0xa8, }}, /* Byte value: 0xa8 */ + {{0x83, 0x9a, 0x7d, 0x91, 0xe7, 0x86, 0x02, 0xa5, }}, /* Byte value: 0xa9 */ + {{0xda, 0xe3, 0xdd, 0xde, 0x3e, 0x5a, 0x3f, 0xed, }}, /* Byte value: 0xaa */ + {{0x47, 0xf9, 0x03, 0xad, 0xfa, 0xf4, 0x21, 0x71, }}, /* Byte value: 0xab */ + {{0xc5, 0xf7, 0xfa, 0xe1, 0x0d, 0xcf, 0x04, 0x89, }}, /* Byte value: 0xac */ + {{0xb0, 0x19, 0x48, 0xe7, 0x51, 0xc2, 0x34, 0x2a, }}, /* Byte value: 0xad */ + {{0x33, 0x83, 0x35, 0x76, 0xb6, 0x44, 0x36, 0x8f, }}, /* Byte value: 0xae */ + {{0xfa, 0x4b, 0x30, 0x42, 0x7b, 0x9b, 0x55, 0x1c, }}, /* Byte value: 0xaf */ + {{0x96, 0x4f, 0x3b, 0xf0, 0x74, 0x0b, 0x8c, 0xd6, }}, /* Byte value: 0xb0 */ + {{0x6f, 0x7b, 0x44, 0x16, 0x3f, 0x94, 0xb0, 0x2d, }}, /* Byte value: 0xb1 */ + {{0x6e, 0xef, 0xc0, 0xcb, 0x2f, 0x29, 0x97, 0x70, }}, /* Byte value: 0xb2 */ + {{0xc2, 0x9d, 0xe0, 0xb7, 0x7d, 0x7a, 0xf1, 0xd9, }}, /* Byte value: 0xb3 */ + {{0xf6, 0x74, 0xcf, 0x97, 0xbb, 0x8b, 0x32, 0x06, }}, /* Byte value: 0xb4 */ + {{0x50, 0xc7, 0x8e, 0xb5, 0x49, 0xc0, 0xe1, 0xb8, }}, /* Byte value: 0xb5 */ + {{0xff, 0xca, 0xe1, 0x6d, 0x2b, 0x97, 0xee, 0xf6, }}, /* Byte value: 0xb6 */ + {{0x5d, 0x6c, 0xf5, 0xbd, 0x99, 0x6d, 0xa1, 0xff, }}, /* Byte value: 0xb7 */ + {{0xa9, 0xf3, 0xf1, 0x53, 0x02, 0x5f, 0xdd, 0x43, }}, /* Byte value: 0xb8 */ + {{0x8e, 0x31, 0x06, 0x99, 0x37, 0x2b, 0x42, 0xe2, }}, /* Byte value: 0xb9 */ + {{0x17, 0x3e, 0x8d, 0x18, 0xb3, 0x34, 0xc0, 0xc9, }}, /* Byte value: 0xba */ + {{0x1b, 0x01, 0x72, 0xcd, 0x73, 0x24, 0xa7, 0xd3, }}, /* Byte value: 0xbb */ + {{0x97, 0xdb, 0xbf, 0x2d, 0x64, 0xb6, 0xab, 0x8b, }}, /* Byte value: 0xbc */ + {{0x7d, 0xc4, 0x18, 0x21, 0xdc, 0xac, 0xcb, 0x0e, }}, /* Byte value: 0xbd */ + {{0xec, 0xe1, 0x39, 0x87, 0xd8, 0x12, 0xb2, 0x88, }}, /* Byte value: 0xbe */ + {{0x58, 0xed, 0x24, 0x92, 0xc9, 0x61, 0x1a, 0x15, }}, /* Byte value: 0xbf */ + {{0xf7, 0xe0, 0x4b, 0x4a, 0xab, 0x36, 0x15, 0x5b, }}, /* Byte value: 0xc0 */ + {{0x1f, 0x14, 0x27, 0x3f, 0x33, 0x95, 0x3b, 0x64, }}, /* Byte value: 0xc1 */ + {{0xfb, 0xdf, 0xb4, 0x9f, 0x6b, 0x26, 0x72, 0x41, }}, /* Byte value: 0xc2 */ + {{0x7c, 0x50, 0x9c, 0xfc, 0xcc, 0x11, 0xec, 0x53, }}, /* Byte value: 0xc3 */ + {{0x09, 0xbe, 0x2e, 0xfa, 0x90, 0x1c, 0xdc, 0xf0, }}, /* Byte value: 0xc4 */ + {{0x0d, 0xab, 0x7b, 0x08, 0xd0, 0xad, 0x40, 0x47, }}, /* Byte value: 0xc5 */ + {{0x7a, 0xae, 0x02, 0x77, 0xac, 0x19, 0x3e, 0x5e, }}, /* Byte value: 0xc6 */ + {{0x67, 0x51, 0xee, 0x31, 0xbf, 0x35, 0x4b, 0x80, }}, /* Byte value: 0xc7 */ + {{0x45, 0x12, 0xc8, 0xd4, 0xda, 0x4d, 0x6f, 0xcb, }}, /* Byte value: 0xc8 */ + {{0x87, 0x8f, 0x28, 0x63, 0xa7, 0x37, 0x9e, 0x12, }}, /* Byte value: 0xc9 */ + {{0xdc, 0x1d, 0x43, 0x55, 0x5e, 0x52, 0xed, 0xe0, }}, /* Byte value: 0xca */ + {{0xe8, 0xf4, 0x6c, 0x75, 0x98, 0xa3, 0x2e, 0x3f, }}, /* Byte value: 0xcb */ + {{0x4f, 0xd3, 0xa9, 0x8a, 0x7a, 0x55, 0xda, 0xdc, }}, /* Byte value: 0xcc */ + {{0x1d, 0xff, 0xec, 0x46, 0x13, 0x2c, 0x75, 0xde, }}, /* Byte value: 0xcd */ + {{0x4e, 0x47, 0x2d, 0x57, 0x6a, 0xe8, 0xfd, 0x81, }}, /* Byte value: 0xce */ + {{0x04, 0x15, 0x55, 0xf2, 0x40, 0xb1, 0x9c, 0xb7, }}, /* Byte value: 0xcf */ + {{0xeb, 0x8b, 0x23, 0xd1, 0xa8, 0xa7, 0x47, 0xd8, }}, /* Byte value: 0xd0 */ + {{0xf8, 0xa0, 0xfb, 0x3b, 0x5b, 0x22, 0x1b, 0xa6, }}, /* Byte value: 0xd1 */ + {{0xf3, 0xf5, 0x1e, 0xb8, 0xeb, 0x87, 0x89, 0xec, }}, /* Byte value: 0xd2 */ + {{0x3e, 0x28, 0x4e, 0x7e, 0x66, 0xe9, 0x76, 0xc8, }}, /* Byte value: 0xd3 */ + {{0x3d, 0x57, 0x01, 0xda, 0x56, 0xed, 0x1f, 0x2f, }}, /* Byte value: 0xd4 */ + {{0xbd, 0xb2, 0x33, 0xef, 0x81, 0x6f, 0x74, 0x6d, }}, /* Byte value: 0xd5 */ + {{0x8a, 0x24, 0x53, 0x6b, 0x77, 0x9a, 0xde, 0x55, }}, /* Byte value: 0xd6 */ + {{0x88, 0xcf, 0x98, 0x12, 0x57, 0x23, 0x90, 0xef, }}, /* Byte value: 0xd7 */ + {{0xdd, 0x89, 0xc7, 0x88, 0x4e, 0xef, 0xca, 0xbd, }}, /* Byte value: 0xd8 */ + {{0xcd, 0xdd, 0x50, 0xc6, 0x8d, 0x6e, 0xff, 0x24, }}, /* Byte value: 0xd9 */ + {{0x0b, 0x55, 0xe5, 0x83, 0xb0, 0xa5, 0x92, 0x4a, }}, /* Byte value: 0xda */ + {{0x13, 0x2b, 0xd8, 0xea, 0xf3, 0x85, 0x5c, 0x7e, }}, /* Byte value: 0xdb */ + {{0x98, 0x9b, 0x0f, 0x5c, 0x94, 0xa2, 0xa5, 0x76, }}, /* Byte value: 0xdc */ + {{0x02, 0xeb, 0xcb, 0x79, 0x20, 0xb9, 0x4e, 0xba, }}, /* Byte value: 0xdd */ + {{0x93, 0xce, 0xea, 0xdf, 0x24, 0x07, 0x37, 0x3c, }}, /* Byte value: 0xde */ + {{0x80, 0xe5, 0x32, 0x35, 0xd7, 0x82, 0x6b, 0x42, }}, /* Byte value: 0xdf */ + {{0x90, 0xb1, 0xa5, 0x7b, 0x14, 0x03, 0x5e, 0xdb, }}, /* Byte value: 0xe0 */ + {{0xd0, 0x22, 0xbc, 0x80, 0x9e, 0x42, 0x8a, 0xfa, }}, /* Byte value: 0xe1 */ + {{0x24, 0xbd, 0xb8, 0x6e, 0x05, 0x70, 0xf6, 0x46, }}, /* Byte value: 0xe2 */ + {{0x34, 0xe9, 0x2f, 0x20, 0xc6, 0xf1, 0xc3, 0xdf, }}, /* Byte value: 0xe3 */ + {{0xcb, 0x23, 0xce, 0x4d, 0xed, 0x66, 0x2d, 0x29, }}, /* Byte value: 0xe4 */ + {{0xed, 0x75, 0xbd, 0x5a, 0xc8, 0xaf, 0x95, 0xd5, }}, /* Byte value: 0xe5 */ + {{0xf4, 0x9f, 0x04, 0xee, 0x9b, 0x32, 0x7c, 0xbc, }}, /* Byte value: 0xe6 */ + {{0xce, 0xa2, 0x1f, 0x62, 0xbd, 0x6a, 0x96, 0xc3, }}, /* Byte value: 0xe7 */ + {{0x99, 0x0f, 0x8b, 0x81, 0x84, 0x1f, 0x82, 0x2b, }}, /* Byte value: 0xe8 */ + {{0x10, 0x54, 0x97, 0x4e, 0xc3, 0x81, 0x35, 0x99, }}, /* Byte value: 0xe9 */ + {{0x44, 0x86, 0x4c, 0x09, 0xca, 0xf0, 0x48, 0x96, }}, /* Byte value: 0xea */ + {{0x40, 0x93, 0x19, 0xfb, 0x8a, 0x41, 0xd4, 0x21, }}, /* Byte value: 0xeb */ + {{0x92, 0x5a, 0x6e, 0x02, 0x34, 0xba, 0x10, 0x61, }}, /* Byte value: 0xec */ + {{0x3a, 0x3d, 0x1b, 0x8c, 0x26, 0x58, 0xea, 0x7f, }}, /* Byte value: 0xed */ + {{0x01, 0x94, 0x84, 0xdd, 0x10, 0xbd, 0x27, 0x5d, }}, /* Byte value: 0xee */ + {{0x26, 0x56, 0x73, 0x17, 0x25, 0xc9, 0xb8, 0xfc, }}, /* Byte value: 0xef */ + {{0x12, 0xbf, 0x5c, 0x37, 0xe3, 0x38, 0x7b, 0x23, }}, /* Byte value: 0xf0 */ + {{0x1a, 0x95, 0xf6, 0x10, 0x63, 0x99, 0x80, 0x8e, }}, /* Byte value: 0xf1 */ + {{0x48, 0xb9, 0xb3, 0xdc, 0x0a, 0xe0, 0x2f, 0x8c, }}, /* Byte value: 0xf2 */ + {{0x68, 0x11, 0x5e, 0x40, 0x4f, 0x21, 0x45, 0x7d, }}, /* Byte value: 0xf3 */ + {{0xf5, 0x0b, 0x80, 0x33, 0x8b, 0x8f, 0x5b, 0xe1, }}, /* Byte value: 0xf4 */ + {{0x81, 0x71, 0xb6, 0xe8, 0xc7, 0x3f, 0x4c, 0x1f, }}, /* Byte value: 0xf5 */ + {{0x8b, 0xb0, 0xd7, 0xb6, 0x67, 0x27, 0xf9, 0x08, }}, /* Byte value: 0xf6 */ + {{0xc7, 0x1c, 0x31, 0x98, 0x2d, 0x76, 0x4a, 0x33, }}, /* Byte value: 0xf7 */ + {{0xd6, 0xdc, 0x22, 0x0b, 0xfe, 0x4a, 0x58, 0xf7, }}, /* Byte value: 0xf8 */ + {{0x20, 0xa8, 0xed, 0x9c, 0x45, 0xc1, 0x6a, 0xf1, }}, /* Byte value: 0xf9 */ + {{0x0a, 0xc1, 0x61, 0x5e, 0xa0, 0x18, 0xb5, 0x17, }}, /* Byte value: 0xfa */ + {{0x08, 0x2a, 0xaa, 0x27, 0x80, 0xa1, 0xfb, 0xad, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x4c, 0xac, 0xe6, 0x2e, 0x4a, 0x51, 0xb3, 0x3b, }}, /* Byte value: 0xfd */ + {{0xd7, 0x48, 0xa6, 0xd6, 0xee, 0xf7, 0x7f, 0xaa, }}, /* Byte value: 0xfe */ + {{0x74, 0x7a, 0x36, 0xdb, 0x4c, 0xb0, 0x17, 0xfe, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 1 */ + {{0xcc, 0xec, 0x18, 0x15, 0x1b, 0x11, 0x97, 0xc3, }}, /* Byte value: 0x00 */ + {{0x03, 0x52, 0x4c, 0x32, 0xa4, 0x91, 0x05, 0xcd, }}, /* Byte value: 0x01 */ + {{0x17, 0x0c, 0x9a, 0xa9, 0x18, 0x92, 0x39, 0xd8, }}, /* Byte value: 0x02 */ + {{0xa5, 0x43, 0xab, 0x04, 0x86, 0x68, 0x2c, 0x3c, }}, /* Byte value: 0x03 */ + {{0xd4, 0x39, 0x3d, 0x46, 0x72, 0x13, 0xbf, 0x64, }}, /* Byte value: 0x04 */ + {{0xfc, 0x85, 0x52, 0xb3, 0xc9, 0x15, 0xc7, 0x4e, }}, /* Byte value: 0x05 */ + {{0xd6, 0xe4, 0xf4, 0xdb, 0x0b, 0x4c, 0xb9, 0x53, }}, /* Byte value: 0x06 */ + {{0x76, 0x51, 0x8b, 0x89, 0xa2, 0x54, 0x9a, 0xfb, }}, /* Byte value: 0x07 */ + {{0xd2, 0x9d, 0xa5, 0x22, 0xf9, 0xf2, 0xb5, 0x3d, }}, /* Byte value: 0x08 */ + {{0x20, 0x4e, 0xcd, 0xc4, 0x9c, 0xb9, 0x60, 0xf6, }}, /* Byte value: 0x09 */ + {{0x65, 0x24, 0x40, 0xd9, 0x48, 0x78, 0xaf, 0x4d, }}, /* Byte value: 0x0a */ + {{0x42, 0x41, 0x90, 0xd6, 0x82, 0xee, 0xc6, 0x18, }}, /* Byte value: 0x0b */ + {{0x46, 0x38, 0xc1, 0x2f, 0x70, 0x50, 0xca, 0x76, }}, /* Byte value: 0x0c */ + {{0xbb, 0x32, 0x16, 0x33, 0x64, 0x8b, 0x0e, 0xc2, }}, /* Byte value: 0x0d */ + {{0x2c, 0xc5, 0x3e, 0x0c, 0x49, 0xb8, 0x74, 0x44, }}, /* Byte value: 0x0e */ + {{0x25, 0xb8, 0x19, 0x92, 0xb3, 0xc9, 0x6f, 0x62, }}, /* Byte value: 0x0f */ + {{0x2e, 0x18, 0xf7, 0x91, 0x30, 0xe7, 0x72, 0x73, }}, /* Byte value: 0x10 */ + {{0x7f, 0x2c, 0xac, 0x17, 0x58, 0x25, 0x81, 0xdd, }}, /* Byte value: 0x11 */ + {{0xad, 0xb1, 0x09, 0x35, 0xa1, 0xd7, 0x34, 0xe0, }}, /* Byte value: 0x12 */ + {{0x06, 0xa4, 0x98, 0x64, 0x8b, 0xe1, 0x0a, 0x59, }}, /* Byte value: 0x13 */ + {{0x6b, 0x72, 0x7a, 0x8c, 0xe4, 0x26, 0xbd, 0xc8, }}, /* Byte value: 0x14 */ + {{0x3b, 0xc9, 0xa4, 0xa5, 0x51, 0x2a, 0x4d, 0x9c, }}, /* Byte value: 0x15 */ + {{0x6a, 0xfd, 0xff, 0x23, 0x39, 0xe8, 0xbe, 0x32, }}, /* Byte value: 0x16 */ + {{0x7e, 0xa3, 0x29, 0xb8, 0x85, 0xeb, 0x82, 0x27, }}, /* Byte value: 0x17 */ + {{0x3c, 0xe2, 0xb9, 0x6e, 0x07, 0x05, 0x44, 0x3f, }}, /* Byte value: 0x18 */ + {{0x84, 0x82, 0xe3, 0x6f, 0xc7, 0x1f, 0x4f, 0x30, }}, /* Byte value: 0x19 */ + {{0x67, 0xf9, 0x89, 0x44, 0x31, 0x27, 0xa9, 0x7a, }}, /* Byte value: 0x1a */ + {{0xb6, 0x36, 0x60, 0x54, 0x6c, 0x44, 0x19, 0x8a, }}, /* Byte value: 0x1b */ + {{0x16, 0x83, 0x1f, 0x06, 0xc5, 0x5c, 0x3a, 0x22, }}, /* Byte value: 0x1c */ + {{0x88, 0x09, 0x10, 0xa7, 0x12, 0x1e, 0x5b, 0x82, }}, /* Byte value: 0x1d */ + {{0x58, 0x49, 0x7c, 0x18, 0x92, 0xb3, 0xe8, 0x88, }}, /* Byte value: 0x1e */ + {{0xbc, 0x19, 0x0b, 0xf8, 0x32, 0xa4, 0x07, 0x61, }}, /* Byte value: 0x1f */ + {{0xde, 0x16, 0x56, 0xea, 0x2c, 0xf3, 0xa1, 0x8f, }}, /* Byte value: 0x20 */ + {{0xc2, 0xba, 0x22, 0x40, 0xb7, 0x4f, 0x85, 0x46, }}, /* Byte value: 0x21 */ + {{0x4e, 0xca, 0x63, 0x1e, 0x57, 0xef, 0xd2, 0xaa, }}, /* Byte value: 0x22 */ + {{0x3f, 0xb0, 0xf5, 0x5c, 0xa3, 0x94, 0x41, 0xf2, }}, /* Byte value: 0x23 */ + {{0x0e, 0x56, 0x3a, 0x55, 0xac, 0x5e, 0x12, 0x85, }}, /* Byte value: 0x24 */ + {{0x1f, 0xfe, 0x38, 0x98, 0x3f, 0x2d, 0x21, 0x04, }}, /* Byte value: 0x25 */ + {{0x99, 0xa1, 0x12, 0x6a, 0x81, 0x6d, 0x68, 0x03, }}, /* Byte value: 0x26 */ + {{0x0c, 0x8b, 0xf3, 0xc8, 0xd5, 0x01, 0x14, 0xb2, }}, /* Byte value: 0x27 */ + {{0x70, 0xf5, 0x13, 0xed, 0x29, 0xb5, 0x90, 0xa2, }}, /* Byte value: 0x28 */ + {{0x44, 0xe5, 0x08, 0xb2, 0x09, 0x0f, 0xcc, 0x41, }}, /* Byte value: 0x29 */ + {{0x2d, 0x4a, 0xbb, 0xa3, 0x94, 0x76, 0x77, 0xbe, }}, /* Byte value: 0x2a */ + {{0x5f, 0x62, 0x61, 0xd3, 0xc4, 0x9c, 0xe1, 0x2b, }}, /* Byte value: 0x2b */ + {{0x78, 0x07, 0xb1, 0xdc, 0x0e, 0x0a, 0x88, 0x7e, }}, /* Byte value: 0x2c */ + {{0xcb, 0xc7, 0x05, 0xde, 0x4d, 0x3e, 0x9e, 0x60, }}, /* Byte value: 0x2d */ + {{0xd5, 0xb6, 0xb8, 0xe9, 0xaf, 0xdd, 0xbc, 0x9e, }}, /* Byte value: 0x2e */ + {{0x73, 0xa7, 0x5f, 0xdf, 0x8d, 0x24, 0x95, 0x6f, }}, /* Byte value: 0x2f */ + {{0x5c, 0x30, 0x2d, 0xe1, 0x60, 0x0d, 0xe4, 0xe6, }}, /* Byte value: 0x30 */ + {{0xfe, 0x58, 0x9b, 0x2e, 0xb0, 0x4a, 0xc1, 0x79, }}, /* Byte value: 0x31 */ + {{0x6f, 0x0b, 0x2b, 0x75, 0x16, 0x98, 0xb1, 0xa6, }}, /* Byte value: 0x32 */ + {{0x1a, 0x08, 0xec, 0xce, 0x10, 0x5d, 0x2e, 0x90, }}, /* Byte value: 0x33 */ + {{0x07, 0x2b, 0x1d, 0xcb, 0x56, 0x2f, 0x09, 0xa3, }}, /* Byte value: 0x34 */ + {{0xee, 0x7f, 0x1c, 0x4c, 0xfe, 0xf7, 0xf1, 0x02, }}, /* Byte value: 0x35 */ + {{0xea, 0x06, 0x4d, 0xb5, 0x0c, 0x49, 0xfd, 0x6c, }}, /* Byte value: 0x36 */ + {{0xc8, 0x95, 0x49, 0xec, 0xe9, 0xaf, 0x9b, 0xad, }}, /* Byte value: 0x37 */ + {{0x8c, 0x70, 0x41, 0x5e, 0xe0, 0xa0, 0x57, 0xec, }}, /* Byte value: 0x38 */ + {{0xb5, 0x64, 0x2c, 0x66, 0xc8, 0xd5, 0x1c, 0x47, }}, /* Byte value: 0x39 */ + {{0x38, 0x9b, 0xe8, 0x97, 0xf5, 0xbb, 0x48, 0x51, }}, /* Byte value: 0x3a */ + {{0x59, 0xc6, 0xf9, 0xb7, 0x4f, 0x7d, 0xeb, 0x72, }}, /* Byte value: 0x3b */ + {{0x69, 0xaf, 0xb3, 0x11, 0x9d, 0x79, 0xbb, 0xff, }}, /* Byte value: 0x3c */ + {{0x10, 0x27, 0x87, 0x62, 0x4e, 0xbd, 0x30, 0x7b, }}, /* Byte value: 0x3d */ + {{0xf0, 0x0e, 0xa1, 0x7b, 0x1c, 0x14, 0xd3, 0xfc, }}, /* Byte value: 0x3e */ + {{0xa3, 0xe7, 0x33, 0x60, 0x0d, 0x89, 0x26, 0x65, }}, /* Byte value: 0x3f */ + {{0x09, 0x7d, 0x27, 0x9e, 0xfa, 0x71, 0x1b, 0x26, }}, /* Byte value: 0x40 */ + {{0x0d, 0x04, 0x76, 0x67, 0x08, 0xcf, 0x17, 0x48, }}, /* Byte value: 0x41 */ + {{0xfd, 0x0a, 0xd7, 0x1c, 0x14, 0xdb, 0xc4, 0xb4, }}, /* Byte value: 0x42 */ + {{0x1b, 0x87, 0x69, 0x61, 0xcd, 0x93, 0x2d, 0x6a, }}, /* Byte value: 0x43 */ + {{0x27, 0x65, 0xd0, 0x0f, 0xca, 0x96, 0x69, 0x55, }}, /* Byte value: 0x44 */ + {{0x8d, 0xff, 0xc4, 0xf1, 0x3d, 0x6e, 0x54, 0x16, }}, /* Byte value: 0x45 */ + {{0xf2, 0xd3, 0x68, 0xe6, 0x65, 0x4b, 0xd5, 0xcb, }}, /* Byte value: 0x46 */ + {{0x92, 0x01, 0xfc, 0x69, 0x02, 0x43, 0x75, 0x12, }}, /* Byte value: 0x47 */ + {{0x6d, 0xd6, 0xe2, 0xe8, 0x6f, 0xc7, 0xb7, 0x91, }}, /* Byte value: 0x48 */ + {{0x5d, 0xbf, 0xa8, 0x4e, 0xbd, 0xc3, 0xe7, 0x1c, }}, /* Byte value: 0x49 */ + {{0xf1, 0x81, 0x24, 0xd4, 0xc1, 0xda, 0xd0, 0x06, }}, /* Byte value: 0x4a */ + {{0x21, 0xc1, 0x48, 0x6b, 0x41, 0x77, 0x63, 0x0c, }}, /* Byte value: 0x4b */ + {{0x37, 0x42, 0x57, 0x6d, 0x84, 0x2b, 0x59, 0x2e, }}, /* Byte value: 0x4c */ + {{0x40, 0x9c, 0x59, 0x4b, 0xfb, 0xb1, 0xc0, 0x2f, }}, /* Byte value: 0x4d */ + {{0x8e, 0xad, 0x88, 0xc3, 0x99, 0xff, 0x51, 0xdb, }}, /* Byte value: 0x4e */ + {{0xe8, 0xdb, 0x84, 0x28, 0x75, 0x16, 0xfb, 0x5b, }}, /* Byte value: 0x4f */ + {{0xe4, 0x50, 0x77, 0xe0, 0xa0, 0x17, 0xef, 0xe9, }}, /* Byte value: 0x50 */ + {{0xec, 0xa2, 0xd5, 0xd1, 0x87, 0xa8, 0xf7, 0x35, }}, /* Byte value: 0x51 */ + {{0x9e, 0x8a, 0x0f, 0xa1, 0xd7, 0x42, 0x61, 0xa0, }}, /* Byte value: 0x52 */ + {{0x9c, 0x57, 0xc6, 0x3c, 0xae, 0x1d, 0x67, 0x97, }}, /* Byte value: 0x53 */ + {{0xd1, 0xcf, 0xe9, 0x10, 0x5d, 0x63, 0xb0, 0xf0, }}, /* Byte value: 0x54 */ + {{0xe7, 0x02, 0x3b, 0xd2, 0x04, 0x86, 0xea, 0x24, }}, /* Byte value: 0x55 */ + {{0xb8, 0x60, 0x5a, 0x01, 0xc0, 0x1a, 0x0b, 0x0f, }}, /* Byte value: 0x56 */ + {{0x2f, 0x97, 0x72, 0x3e, 0xed, 0x29, 0x71, 0x89, }}, /* Byte value: 0x57 */ + {{0xe2, 0xf4, 0xef, 0x84, 0x2b, 0xf6, 0xe5, 0xb0, }}, /* Byte value: 0x58 */ + {{0x8a, 0xd4, 0xd9, 0x3a, 0x6b, 0x41, 0x5d, 0xb5, }}, /* Byte value: 0x59 */ + {{0xd7, 0x6b, 0x71, 0x74, 0xd6, 0x82, 0xba, 0xa9, }}, /* Byte value: 0x5a */ + {{0xb4, 0xeb, 0xa9, 0xc9, 0x15, 0x1b, 0x1f, 0xbd, }}, /* Byte value: 0x5b */ + {{0x29, 0x33, 0xea, 0x5a, 0x66, 0xc8, 0x7b, 0xd0, }}, /* Byte value: 0x5c */ + {{0x13, 0x75, 0xcb, 0x50, 0xea, 0x2c, 0x35, 0xb6, }}, /* Byte value: 0x5d */ + {{0x98, 0x2e, 0x97, 0xc5, 0x5c, 0xa3, 0x6b, 0xf9, }}, /* Byte value: 0x5e */ + {{0x80, 0xfb, 0xb2, 0x96, 0x35, 0xa1, 0x43, 0x5e, }}, /* Byte value: 0x5f */ + {{0xa6, 0x11, 0xe7, 0x36, 0x22, 0xf9, 0x29, 0xf1, }}, /* Byte value: 0x60 */ + {{0x62, 0x0f, 0x5d, 0x12, 0x1e, 0x57, 0xa6, 0xee, }}, /* Byte value: 0x61 */ + {{0xb3, 0xc0, 0xb4, 0x02, 0x43, 0x34, 0x16, 0x1e, }}, /* Byte value: 0x62 */ + {{0x5e, 0xed, 0xe4, 0x7c, 0x19, 0x52, 0xe2, 0xd1, }}, /* Byte value: 0x63 */ + {{0x72, 0x28, 0xda, 0x70, 0x50, 0xea, 0x96, 0x95, }}, /* Byte value: 0x64 */ + {{0x43, 0xce, 0x15, 0x79, 0x5f, 0x20, 0xc5, 0xe2, }}, /* Byte value: 0x65 */ + {{0x34, 0x10, 0x1b, 0x5f, 0x20, 0xba, 0x5c, 0xe3, }}, /* Byte value: 0x66 */ + {{0x35, 0x9f, 0x9e, 0xf0, 0xfd, 0x74, 0x5f, 0x19, }}, /* Byte value: 0x67 */ + {{0x52, 0x66, 0x17, 0xb4, 0xcc, 0x53, 0xf6, 0x63, }}, /* Byte value: 0x68 */ + {{0x26, 0xea, 0x55, 0xa0, 0x17, 0x58, 0x6a, 0xaf, }}, /* Byte value: 0x69 */ + {{0x7d, 0xf1, 0x65, 0x8a, 0x21, 0x7a, 0x87, 0xea, }}, /* Byte value: 0x6a */ + {{0xb7, 0xb9, 0xe5, 0xfb, 0xb1, 0x8a, 0x1a, 0x70, }}, /* Byte value: 0x6b */ + {{0x0a, 0x2f, 0x6b, 0xac, 0x5e, 0xe0, 0x1e, 0xeb, }}, /* Byte value: 0x6c */ + {{0x45, 0x6a, 0x8d, 0x1d, 0xd4, 0xc1, 0xcf, 0xbb, }}, /* Byte value: 0x6d */ + {{0x81, 0x74, 0x37, 0x39, 0xe8, 0x6f, 0x40, 0xa4, }}, /* Byte value: 0x6e */ + {{0x6e, 0x84, 0xae, 0xda, 0xcb, 0x56, 0xb2, 0x5c, }}, /* Byte value: 0x6f */ + {{0x53, 0xe9, 0x92, 0x1b, 0x11, 0x9d, 0xf5, 0x99, }}, /* Byte value: 0x70 */ + {{0x4a, 0xb3, 0x32, 0xe7, 0xa5, 0x51, 0xde, 0xc4, }}, /* Byte value: 0x71 */ + {{0x79, 0x88, 0x34, 0x73, 0xd3, 0xc4, 0x8b, 0x84, }}, /* Byte value: 0x72 */ + {{0x32, 0xb4, 0x83, 0x3b, 0xab, 0x5b, 0x56, 0xba, }}, /* Byte value: 0x73 */ + {{0x61, 0x5d, 0x11, 0x20, 0xba, 0xc6, 0xa3, 0x23, }}, /* Byte value: 0x74 */ + {{0xfb, 0xae, 0x4f, 0x78, 0x9f, 0x3a, 0xce, 0xed, }}, /* Byte value: 0x75 */ + {{0x39, 0x14, 0x6d, 0x38, 0x28, 0x75, 0x4b, 0xab, }}, /* Byte value: 0x76 */ + {{0xc0, 0x67, 0xeb, 0xdd, 0xce, 0x10, 0x83, 0x71, }}, /* Byte value: 0x77 */ + {{0xfa, 0x21, 0xca, 0xd7, 0x42, 0xf4, 0xcd, 0x17, }}, /* Byte value: 0x78 */ + {{0x5b, 0x1b, 0x30, 0x2a, 0x36, 0x22, 0xed, 0x45, }}, /* Byte value: 0x79 */ + {{0xa4, 0xcc, 0x2e, 0xab, 0x5b, 0xa6, 0x2f, 0xc6, }}, /* Byte value: 0x7a */ + {{0xba, 0xbd, 0x93, 0x9c, 0xb9, 0x45, 0x0d, 0x38, }}, /* Byte value: 0x7b */ + {{0xda, 0x6f, 0x07, 0x13, 0xde, 0x4d, 0xad, 0xe1, }}, /* Byte value: 0x7c */ + {{0x4c, 0x17, 0xaa, 0x83, 0x2e, 0xb0, 0xd4, 0x9d, }}, /* Byte value: 0x7d */ + {{0x05, 0xf6, 0xd4, 0x56, 0x2f, 0x70, 0x0f, 0x94, }}, /* Byte value: 0x7e */ + {{0xc3, 0x35, 0xa7, 0xef, 0x6a, 0x81, 0x86, 0xbc, }}, /* Byte value: 0x7f */ + {{0x3a, 0x46, 0x21, 0x0a, 0x8c, 0xe4, 0x4e, 0x66, }}, /* Byte value: 0x80 */ + {{0x82, 0x26, 0x7b, 0x0b, 0x4c, 0xfe, 0x45, 0x69, }}, /* Byte value: 0x81 */ + {{0x18, 0xd5, 0x25, 0x53, 0x69, 0x02, 0x28, 0xa7, }}, /* Byte value: 0x82 */ + {{0xc9, 0x1a, 0xcc, 0x43, 0x34, 0x61, 0x98, 0x57, }}, /* Byte value: 0x83 */ + {{0x68, 0x20, 0x36, 0xbe, 0x40, 0xb7, 0xb8, 0x05, }}, /* Byte value: 0x84 */ + {{0xf6, 0xaa, 0x39, 0x1f, 0x97, 0xf5, 0xd9, 0xa5, }}, /* Byte value: 0x85 */ + {{0x63, 0x80, 0xd8, 0xbd, 0xc3, 0x99, 0xa5, 0x14, }}, /* Byte value: 0x86 */ + {{0x87, 0xd0, 0xaf, 0x5d, 0x63, 0x8e, 0x4a, 0xfd, }}, /* Byte value: 0x87 */ + {{0x49, 0xe1, 0x7e, 0xd5, 0x01, 0xc0, 0xdb, 0x09, }}, /* Byte value: 0x88 */ + {{0x36, 0xcd, 0xd2, 0xc2, 0x59, 0xe5, 0x5a, 0xd4, }}, /* Byte value: 0x89 */ + {{0x91, 0x53, 0xb0, 0x5b, 0xa6, 0xd2, 0x70, 0xdf, }}, /* Byte value: 0x8a */ + {{0x97, 0xf7, 0x28, 0x3f, 0x2d, 0x33, 0x7a, 0x86, }}, /* Byte value: 0x8b */ + {{0x33, 0x3b, 0x06, 0x94, 0x76, 0x95, 0x55, 0x40, }}, /* Byte value: 0x8c */ + {{0x08, 0xf2, 0xa2, 0x31, 0x27, 0xbf, 0x18, 0xdc, }}, /* Byte value: 0x8d */ + {{0x7c, 0x7e, 0xe0, 0x25, 0xfc, 0xb4, 0x84, 0x10, }}, /* Byte value: 0x8e */ + {{0x02, 0xdd, 0xc9, 0x9d, 0x79, 0x5f, 0x06, 0x37, }}, /* Byte value: 0x8f */ + {{0x77, 0xde, 0x0e, 0x26, 0x7f, 0x9a, 0x99, 0x01, }}, /* Byte value: 0x90 */ + {{0x85, 0x0d, 0x66, 0xc0, 0x1a, 0xd1, 0x4c, 0xca, }}, /* Byte value: 0x91 */ + {{0x66, 0x76, 0x0c, 0xeb, 0xec, 0xe9, 0xaa, 0x80, }}, /* Byte value: 0x92 */ + {{0x41, 0x13, 0xdc, 0xe4, 0x26, 0x7f, 0xc3, 0xd5, }}, /* Byte value: 0x93 */ + {{0x30, 0x69, 0x4a, 0xa6, 0xd2, 0x04, 0x50, 0x8d, }}, /* Byte value: 0x94 */ + {{0xcd, 0x63, 0x9d, 0xba, 0xc6, 0xdf, 0x94, 0x39, }}, /* Byte value: 0x95 */ + {{0xd0, 0x40, 0x6c, 0xbf, 0x80, 0xad, 0xb3, 0x0a, }}, /* Byte value: 0x96 */ + {{0xd9, 0x3d, 0x4b, 0x21, 0x7a, 0xdc, 0xa8, 0x2c, }}, /* Byte value: 0x97 */ + {{0xa9, 0xc8, 0x58, 0xcc, 0x53, 0x69, 0x38, 0x8e, }}, /* Byte value: 0x98 */ + {{0xaa, 0x9a, 0x14, 0xfe, 0xf7, 0xf8, 0x3d, 0x43, }}, /* Byte value: 0x99 */ + {{0xc5, 0x91, 0x3f, 0x8b, 0xe1, 0x60, 0x8c, 0xe5, }}, /* Byte value: 0x9a */ + {{0x60, 0xd2, 0x94, 0x8f, 0x67, 0x08, 0xa0, 0xd9, }}, /* Byte value: 0x9b */ + {{0xf8, 0xfc, 0x03, 0x4a, 0x3b, 0xab, 0xcb, 0x20, }}, /* Byte value: 0x9c */ + {{0x04, 0x79, 0x51, 0xf9, 0xf2, 0xbe, 0x0c, 0x6e, }}, /* Byte value: 0x9d */ + {{0x90, 0xdc, 0x35, 0xf4, 0x7b, 0x1c, 0x73, 0x25, }}, /* Byte value: 0x9e */ + {{0xe6, 0x8d, 0xbe, 0x7d, 0xd9, 0x48, 0xe9, 0xde, }}, /* Byte value: 0x9f */ + {{0x96, 0x78, 0xad, 0x90, 0xf0, 0xfd, 0x79, 0x7c, }}, /* Byte value: 0xa0 */ + {{0xaf, 0x6c, 0xc0, 0xa8, 0xd8, 0x88, 0x32, 0xd7, }}, /* Byte value: 0xa1 */ + {{0xc6, 0xc3, 0x73, 0xb9, 0x45, 0xf1, 0x89, 0x28, }}, /* Byte value: 0xa2 */ + {{0xa7, 0x9e, 0x62, 0x99, 0xff, 0x37, 0x2a, 0x0b, }}, /* Byte value: 0xa3 */ + {{0xa1, 0x3a, 0xfa, 0xfd, 0x74, 0xd6, 0x20, 0x52, }}, /* Byte value: 0xa4 */ + {{0xd8, 0xb2, 0xce, 0x8e, 0xa7, 0x12, 0xab, 0xd6, }}, /* Byte value: 0xa5 */ + {{0x1e, 0x71, 0xbd, 0x37, 0xe2, 0xe3, 0x22, 0xfe, }}, /* Byte value: 0xa6 */ + {{0x4d, 0x98, 0x2f, 0x2c, 0xf3, 0x7e, 0xd7, 0x67, }}, /* Byte value: 0xa7 */ + {{0x64, 0xab, 0xc5, 0x76, 0x95, 0xb6, 0xac, 0xb7, }}, /* Byte value: 0xa8 */ + {{0x9a, 0xf3, 0x5e, 0x58, 0x25, 0xfc, 0x6d, 0xce, }}, /* Byte value: 0xa9 */ + {{0xe3, 0x7b, 0x6a, 0x2b, 0xf6, 0x38, 0xe6, 0x4a, }}, /* Byte value: 0xaa */ + {{0xf9, 0x73, 0x86, 0xe5, 0xe6, 0x65, 0xc8, 0xda, }}, /* Byte value: 0xab */ + {{0xf7, 0x25, 0xbc, 0xb0, 0x4a, 0x3b, 0xda, 0x5f, }}, /* Byte value: 0xac */ + {{0x19, 0x5a, 0xa0, 0xfc, 0xb4, 0xcc, 0x2b, 0x5d, }}, /* Byte value: 0xad */ + {{0x83, 0xa9, 0xfe, 0xa4, 0x91, 0x30, 0x46, 0x93, }}, /* Byte value: 0xae */ + {{0x4b, 0x3c, 0xb7, 0x48, 0x78, 0x9f, 0xdd, 0x3e, }}, /* Byte value: 0xaf */ + {{0x4f, 0x45, 0xe6, 0xb1, 0x8a, 0x21, 0xd1, 0x50, }}, /* Byte value: 0xb0 */ + {{0x7b, 0x55, 0xfd, 0xee, 0xaa, 0x9b, 0x8d, 0xb3, }}, /* Byte value: 0xb1 */ + {{0xef, 0xf0, 0x99, 0xe3, 0x23, 0x39, 0xf2, 0xf8, }}, /* Byte value: 0xb2 */ + {{0x9d, 0xd8, 0x43, 0x93, 0x73, 0xd3, 0x64, 0x6d, }}, /* Byte value: 0xb3 */ + {{0x74, 0x8c, 0x42, 0x14, 0xdb, 0x0b, 0x9c, 0xcc, }}, /* Byte value: 0xb4 */ + {{0xc7, 0x4c, 0xf6, 0x16, 0x98, 0x3f, 0x8a, 0xd2, }}, /* Byte value: 0xb5 */ + {{0xca, 0x48, 0x80, 0x71, 0x90, 0xf0, 0x9d, 0x9a, }}, /* Byte value: 0xb6 */ + {{0x6c, 0x59, 0x67, 0x47, 0xb2, 0x09, 0xb4, 0x6b, }}, /* Byte value: 0xb7 */ + {{0xf3, 0x5c, 0xed, 0x49, 0xb8, 0x85, 0xd6, 0x31, }}, /* Byte value: 0xb8 */ + {{0x31, 0xe6, 0xcf, 0x09, 0x0f, 0xca, 0x53, 0x77, }}, /* Byte value: 0xb9 */ + {{0x3e, 0x3f, 0x70, 0xf3, 0x7e, 0x5a, 0x42, 0x08, }}, /* Byte value: 0xba */ + {{0x01, 0x8f, 0x85, 0xaf, 0xdd, 0xce, 0x03, 0xfa, }}, /* Byte value: 0xbb */ + {{0xdb, 0xe0, 0x82, 0xbc, 0x03, 0x83, 0xae, 0x1b, }}, /* Byte value: 0xbc */ + {{0xc4, 0x1e, 0xba, 0x24, 0x3c, 0xae, 0x8f, 0x1f, }}, /* Byte value: 0xbd */ + {{0xe1, 0xa6, 0xa3, 0xb6, 0x8f, 0x67, 0xe0, 0x7d, }}, /* Byte value: 0xbe */ + {{0xed, 0x2d, 0x50, 0x7e, 0x5a, 0x66, 0xf4, 0xcf, }}, /* Byte value: 0xbf */ + {{0xe0, 0x29, 0x26, 0x19, 0x52, 0xa9, 0xe3, 0x87, }}, /* Byte value: 0xc0 */ + {{0x14, 0x5e, 0xd6, 0x9b, 0xbc, 0x03, 0x3c, 0x15, }}, /* Byte value: 0xc1 */ + {{0xdf, 0x99, 0xd3, 0x45, 0xf1, 0x3d, 0xa2, 0x75, }}, /* Byte value: 0xc2 */ + {{0x50, 0xbb, 0xde, 0x29, 0xb5, 0x0c, 0xf0, 0x54, }}, /* Byte value: 0xc3 */ + {{0xbe, 0xc4, 0xc2, 0x65, 0x4b, 0xfb, 0x01, 0x56, }}, /* Byte value: 0xc4 */ + {{0xab, 0x15, 0x91, 0x51, 0x2a, 0x36, 0x3e, 0xb9, }}, /* Byte value: 0xc5 */ + {{0xae, 0xe3, 0x45, 0x07, 0x05, 0x46, 0x31, 0x2d, }}, /* Byte value: 0xc6 */ + {{0x51, 0x34, 0x5b, 0x86, 0x68, 0xc2, 0xf3, 0xae, }}, /* Byte value: 0xc7 */ + {{0x12, 0xfa, 0x4e, 0xff, 0x37, 0xe2, 0x36, 0x4c, }}, /* Byte value: 0xc8 */ + {{0x8f, 0x22, 0x0d, 0x6c, 0x44, 0x31, 0x52, 0x21, }}, /* Byte value: 0xc9 */ + {{0x1d, 0x23, 0xf1, 0x05, 0x46, 0x72, 0x27, 0x33, }}, /* Byte value: 0xca */ + {{0xf4, 0x77, 0xf0, 0x82, 0xee, 0xaa, 0xdf, 0x92, }}, /* Byte value: 0xcb */ + {{0xd3, 0x12, 0x20, 0x8d, 0x24, 0x3c, 0xb6, 0xc7, }}, /* Byte value: 0xcc */ + {{0xff, 0xd7, 0x1e, 0x81, 0x6d, 0x84, 0xc2, 0x83, }}, /* Byte value: 0xcd */ + {{0x47, 0xb7, 0x44, 0x80, 0xad, 0x9e, 0xc9, 0x8c, }}, /* Byte value: 0xce */ + {{0x15, 0xd1, 0x53, 0x34, 0x61, 0xcd, 0x3f, 0xef, }}, /* Byte value: 0xcf */ + {{0x8b, 0x5b, 0x5c, 0x95, 0xb6, 0x8f, 0x5e, 0x4f, }}, /* Byte value: 0xd0 */ + {{0xa0, 0xb5, 0x7f, 0x52, 0xa9, 0x18, 0x23, 0xa8, }}, /* Byte value: 0xd1 */ + {{0xf5, 0xf8, 0x75, 0x2d, 0x33, 0x64, 0xdc, 0x68, }}, /* Byte value: 0xd2 */ + {{0x28, 0xbc, 0x6f, 0xf5, 0xbb, 0x06, 0x78, 0x2a, }}, /* Byte value: 0xd3 */ + {{0x57, 0x90, 0xc3, 0xe2, 0xe3, 0x23, 0xf9, 0xf7, }}, /* Byte value: 0xd4 */ + {{0xb2, 0x4f, 0x31, 0xad, 0x9e, 0xfa, 0x15, 0xe4, }}, /* Byte value: 0xd5 */ + {{0x24, 0x37, 0x9c, 0x3d, 0x6e, 0x07, 0x6c, 0x98, }}, /* Byte value: 0xd6 */ + {{0xcf, 0xbe, 0x54, 0x27, 0xbf, 0x80, 0x92, 0x0e, }}, /* Byte value: 0xd7 */ + {{0x89, 0x86, 0x95, 0x08, 0xcf, 0xd0, 0x58, 0x78, }}, /* Byte value: 0xd8 */ + {{0xdd, 0x44, 0x1a, 0xd8, 0x88, 0x62, 0xa4, 0x42, }}, /* Byte value: 0xd9 */ + {{0x55, 0x4d, 0x0a, 0x7f, 0x9a, 0x7c, 0xff, 0xc0, }}, /* Byte value: 0xda */ + {{0x2b, 0xee, 0x23, 0xc7, 0x1f, 0x97, 0x7d, 0xe7, }}, /* Byte value: 0xdb */ + {{0x9b, 0x7c, 0xdb, 0xf7, 0xf8, 0x32, 0x6e, 0x34, }}, /* Byte value: 0xdc */ + {{0xeb, 0x89, 0xc8, 0x1a, 0xd1, 0x87, 0xfe, 0x96, }}, /* Byte value: 0xdd */ + {{0xce, 0x31, 0xd1, 0x88, 0x62, 0x4e, 0x91, 0xf4, }}, /* Byte value: 0xde */ + {{0xe5, 0xdf, 0xf2, 0x4f, 0x7d, 0xd9, 0xec, 0x13, }}, /* Byte value: 0xdf */ + {{0xb1, 0x1d, 0x7d, 0x9f, 0x3a, 0x6b, 0x10, 0x29, }}, /* Byte value: 0xe0 */ + {{0x22, 0x93, 0x04, 0x59, 0xe5, 0xe6, 0x66, 0xc1, }}, /* Byte value: 0xe1 */ + {{0xbd, 0x96, 0x8e, 0x57, 0xef, 0x6a, 0x04, 0x9b, }}, /* Byte value: 0xe2 */ + {{0xe9, 0x54, 0x01, 0x87, 0xa8, 0xd8, 0xf8, 0xa1, }}, /* Byte value: 0xe3 */ + {{0x23, 0x1c, 0x81, 0xf6, 0x38, 0x28, 0x65, 0x3b, }}, /* Byte value: 0xe4 */ + {{0x75, 0x03, 0xc7, 0xbb, 0x06, 0xc5, 0x9f, 0x36, }}, /* Byte value: 0xe5 */ + {{0x9f, 0x05, 0x8a, 0x0e, 0x0a, 0x8c, 0x62, 0x5a, }}, /* Byte value: 0xe6 */ + {{0xa2, 0x68, 0xb6, 0xcf, 0xd0, 0x47, 0x25, 0x9f, }}, /* Byte value: 0xe7 */ + {{0x0f, 0xd9, 0xbf, 0xfa, 0x71, 0x90, 0x11, 0x7f, }}, /* Byte value: 0xe8 */ + {{0x54, 0xc2, 0x8f, 0xd0, 0x47, 0xb2, 0xfc, 0x3a, }}, /* Byte value: 0xe9 */ + {{0x86, 0x5f, 0x2a, 0xf2, 0xbe, 0x40, 0x49, 0x07, }}, /* Byte value: 0xea */ + {{0x93, 0x8e, 0x79, 0xc6, 0xdf, 0x8d, 0x76, 0xe8, }}, /* Byte value: 0xeb */ + {{0x5a, 0x94, 0xb5, 0x85, 0xeb, 0xec, 0xee, 0xbf, }}, /* Byte value: 0xec */ + {{0x3d, 0x6d, 0x3c, 0xc1, 0xda, 0xcb, 0x47, 0xc5, }}, /* Byte value: 0xed */ + {{0x94, 0xa5, 0x64, 0x0d, 0x89, 0xa2, 0x7f, 0x4b, }}, /* Byte value: 0xee */ + {{0x56, 0x1f, 0x46, 0x4d, 0x3e, 0xed, 0xfa, 0x0d, }}, /* Byte value: 0xef */ + {{0xbf, 0x4b, 0x47, 0xca, 0x96, 0x35, 0x02, 0xac, }}, /* Byte value: 0xf0 */ + {{0x95, 0x2a, 0xe1, 0xa2, 0x54, 0x6c, 0x7c, 0xb1, }}, /* Byte value: 0xf1 */ + {{0xb9, 0xef, 0xdf, 0xae, 0x1d, 0xd4, 0x08, 0xf5, }}, /* Byte value: 0xf2 */ + {{0x11, 0xa8, 0x02, 0xcd, 0x93, 0x73, 0x33, 0x81, }}, /* Byte value: 0xf3 */ + {{0x0b, 0xa0, 0xee, 0x03, 0x83, 0x2e, 0x1d, 0x11, }}, /* Byte value: 0xf4 */ + {{0x71, 0x7a, 0x96, 0x42, 0xf4, 0x7b, 0x93, 0x58, }}, /* Byte value: 0xf5 */ + {{0xb0, 0x92, 0xf8, 0x30, 0xe7, 0xa5, 0x13, 0xd3, }}, /* Byte value: 0xf6 */ + {{0x1c, 0xac, 0x74, 0xaa, 0x9b, 0xbc, 0x24, 0xc9, }}, /* Byte value: 0xf7 */ + {{0xdc, 0xcb, 0x9f, 0x77, 0x55, 0xac, 0xa7, 0xb8, }}, /* Byte value: 0xf8 */ + {{0xa8, 0x47, 0xdd, 0x63, 0x8e, 0xa7, 0x3b, 0x74, }}, /* Byte value: 0xf9 */ + {{0xc1, 0xe8, 0x6e, 0x72, 0x13, 0xde, 0x80, 0x8b, }}, /* Byte value: 0xfa */ + {{0x2a, 0x61, 0xa6, 0x68, 0xc2, 0x59, 0x7e, 0x1d, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xac, 0x3e, 0x8c, 0x9a, 0x7c, 0x19, 0x37, 0x1a, }}, /* Byte value: 0xfd */ + {{0x48, 0x6e, 0xfb, 0x7a, 0xdc, 0x0e, 0xd8, 0xf3, }}, /* Byte value: 0xfe */ + {{0x7a, 0xda, 0x78, 0x41, 0x77, 0x55, 0x8e, 0x49, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 2 */ + {{0x47, 0x35, 0xef, 0xb5, 0xef, 0xef, 0x30, 0xe6, }}, /* Byte value: 0x00 */ + {{0xe9, 0x63, 0xba, 0xe4, 0xba, 0xba, 0x98, 0x67, }}, /* Byte value: 0x01 */ + {{0x8f, 0xb2, 0x8e, 0xde, 0x8e, 0x8e, 0xf7, 0x86, }}, /* Byte value: 0x02 */ + {{0x4e, 0xe2, 0x6e, 0xfc, 0x6e, 0x6e, 0x95, 0xad, }}, /* Byte value: 0x03 */ + {{0x03, 0xab, 0x76, 0x99, 0x76, 0x76, 0x7a, 0x58, }}, /* Byte value: 0x04 */ + {{0xcf, 0xca, 0x1e, 0xed, 0x1e, 0x1e, 0xa4, 0x59, }}, /* Byte value: 0x05 */ + {{0x0c, 0xe9, 0x1b, 0x21, 0x1b, 0x1b, 0x2b, 0xa3, }}, /* Byte value: 0x06 */ + {{0xba, 0xae, 0x78, 0x32, 0x78, 0x78, 0xd5, 0xa7, }}, /* Byte value: 0x07 */ + {{0x12, 0x6d, 0xc1, 0x92, 0xc1, 0xc1, 0x89, 0x96, }}, /* Byte value: 0x08 */ + {{0xf0, 0xaa, 0x1f, 0xd1, 0x1f, 0x1f, 0x59, 0x6b, }}, /* Byte value: 0x09 */ + {{0x2b, 0x98, 0x2c, 0x5f, 0x2c, 0x2c, 0x80, 0x14, }}, /* Byte value: 0x0a */ + {{0x2c, 0xd5, 0x53, 0xd9, 0x53, 0x53, 0xe3, 0x2d, }}, /* Byte value: 0x0b */ + {{0x32, 0x51, 0x89, 0x6a, 0x89, 0x89, 0x41, 0x18, }}, /* Byte value: 0x0c */ + {{0x1b, 0xba, 0x40, 0xdb, 0x40, 0x40, 0x2c, 0xdd, }}, /* Byte value: 0x0d */ + {{0xd2, 0xe5, 0xb2, 0xc7, 0xb2, 0xb2, 0x7c, 0x34, }}, /* Byte value: 0x0e */ + {{0x08, 0x0f, 0x12, 0x3e, 0x12, 0x12, 0x32, 0xc2, }}, /* Byte value: 0x0f */ + {{0xdd, 0xa7, 0xdf, 0x7f, 0xdf, 0xdf, 0x2d, 0xcf, }}, /* Byte value: 0x10 */ + {{0x60, 0x44, 0xd8, 0xcb, 0xd8, 0xd8, 0x9b, 0x51, }}, /* Byte value: 0x11 */ + {{0x72, 0x29, 0x19, 0x59, 0x19, 0x19, 0x12, 0xc7, }}, /* Byte value: 0x12 */ + {{0x11, 0xc6, 0xb7, 0x0b, 0xb7, 0xb7, 0xf3, 0xce, }}, /* Byte value: 0x13 */ + {{0x06, 0x95, 0xec, 0xf1, 0xec, 0xec, 0xf4, 0xb0, }}, /* Byte value: 0x14 */ + {{0x5d, 0x57, 0x3c, 0x19, 0x3c, 0x3c, 0x8b, 0xb2, }}, /* Byte value: 0x15 */ + {{0xe0, 0xb4, 0x3b, 0xad, 0x3b, 0x3b, 0x3d, 0x2c, }}, /* Byte value: 0x16 */ + {{0x86, 0x65, 0x0f, 0x97, 0x0f, 0x0f, 0x52, 0xcd, }}, /* Byte value: 0x17 */ + {{0xaa, 0xb0, 0x5c, 0x4e, 0x5c, 0x5c, 0xb1, 0xe0, }}, /* Byte value: 0x18 */ + {{0x58, 0x69, 0xa6, 0x71, 0xa6, 0xa6, 0x05, 0x5a, }}, /* Byte value: 0x19 */ + {{0x24, 0xda, 0x41, 0xe7, 0x41, 0x41, 0xd1, 0xef, }}, /* Byte value: 0x1a */ + {{0xdf, 0xd4, 0x3a, 0x91, 0x3a, 0x3a, 0xc0, 0x1e, }}, /* Byte value: 0x1b */ + {{0x69, 0x93, 0x59, 0x82, 0x59, 0x59, 0x3e, 0x1a, }}, /* Byte value: 0x1c */ + {{0x7a, 0x26, 0x0b, 0x67, 0x0b, 0x0b, 0x20, 0x05, }}, /* Byte value: 0x1d */ + {{0x67, 0x09, 0xa7, 0x4d, 0xa7, 0xa7, 0xf8, 0x68, }}, /* Byte value: 0x1e */ + {{0xec, 0x5d, 0x20, 0x8c, 0x20, 0x20, 0x16, 0x8f, }}, /* Byte value: 0x1f */ + {{0x30, 0x22, 0x6c, 0x84, 0x6c, 0x6c, 0xac, 0xc9, }}, /* Byte value: 0x20 */ + {{0x6a, 0x38, 0x2f, 0x1b, 0x2f, 0x2f, 0x44, 0x42, }}, /* Byte value: 0x21 */ + {{0x0e, 0x9a, 0xfe, 0xcf, 0xfe, 0xfe, 0xc6, 0x72, }}, /* Byte value: 0x22 */ + {{0x43, 0xd3, 0xe6, 0xaa, 0xe6, 0xe6, 0x29, 0x87, }}, /* Byte value: 0x23 */ + {{0x2d, 0x0d, 0xc0, 0xae, 0xc0, 0xc0, 0x74, 0xa4, }}, /* Byte value: 0x24 */ + {{0xb3, 0x79, 0xf9, 0x7b, 0xf9, 0xf9, 0x70, 0xec, }}, /* Byte value: 0x25 */ + {{0xe4, 0x52, 0x32, 0xb2, 0x32, 0x32, 0x24, 0x4d, }}, /* Byte value: 0x26 */ + {{0x22, 0x4f, 0xad, 0x16, 0xad, 0xad, 0x25, 0x5f, }}, /* Byte value: 0x27 */ + {{0xab, 0x68, 0xcf, 0x39, 0xcf, 0xcf, 0x26, 0x69, }}, /* Byte value: 0x28 */ + {{0x3d, 0x13, 0xe4, 0xd2, 0xe4, 0xe4, 0x10, 0xe3, }}, /* Byte value: 0x29 */ + {{0x34, 0xc4, 0x65, 0x9b, 0x65, 0x65, 0xb5, 0xa8, }}, /* Byte value: 0x2a */ + {{0x90, 0xee, 0xc7, 0x1a, 0xc7, 0xc7, 0xc2, 0x3a, }}, /* Byte value: 0x2b */ + {{0x97, 0xa3, 0xb8, 0x9c, 0xb8, 0xb8, 0xa1, 0x03, }}, /* Byte value: 0x2c */ + {{0xb0, 0xd2, 0x8f, 0xe2, 0x8f, 0x8f, 0x0a, 0xb4, }}, /* Byte value: 0x2d */ + {{0xe5, 0x8a, 0xa1, 0xc5, 0xa1, 0xa1, 0xb3, 0xc4, }}, /* Byte value: 0x2e */ + {{0x42, 0x0b, 0x75, 0xdd, 0x75, 0x75, 0xbe, 0x0e, }}, /* Byte value: 0x2f */ + {{0x79, 0x8d, 0x7d, 0xfe, 0x7d, 0x7d, 0x5a, 0x5d, }}, /* Byte value: 0x30 */ + {{0xc0, 0x88, 0x73, 0x55, 0x73, 0x73, 0xf5, 0xa2, }}, /* Byte value: 0x31 */ + {{0x18, 0x11, 0x36, 0x42, 0x36, 0x36, 0x56, 0x85, }}, /* Byte value: 0x32 */ + {{0x4b, 0xdc, 0xf4, 0x94, 0xf4, 0xf4, 0x1b, 0x45, }}, /* Byte value: 0x33 */ + {{0xf7, 0xe7, 0x60, 0x57, 0x60, 0x60, 0x3a, 0x52, }}, /* Byte value: 0x34 */ + {{0xb8, 0xdd, 0x9d, 0xdc, 0x9d, 0x9d, 0x38, 0x76, }}, /* Byte value: 0x35 */ + {{0xa6, 0x59, 0x47, 0x6f, 0x47, 0x47, 0x9a, 0x43, }}, /* Byte value: 0x36 */ + {{0x59, 0xb1, 0x35, 0x06, 0x35, 0x35, 0x92, 0xd3, }}, /* Byte value: 0x37 */ + {{0x64, 0xa2, 0xd1, 0xd4, 0xd1, 0xd1, 0x82, 0x30, }}, /* Byte value: 0x38 */ + {{0x36, 0xb7, 0x80, 0x75, 0x80, 0x80, 0x58, 0x79, }}, /* Byte value: 0x39 */ + {{0xb4, 0x34, 0x86, 0xfd, 0x86, 0x86, 0x13, 0xd5, }}, /* Byte value: 0x3a */ + {{0x81, 0x28, 0x70, 0x11, 0x70, 0x70, 0x31, 0xf4, }}, /* Byte value: 0x3b */ + {{0x09, 0xd7, 0x81, 0x49, 0x81, 0x81, 0xa5, 0x4b, }}, /* Byte value: 0x3c */ + {{0x78, 0x55, 0xee, 0x89, 0xee, 0xee, 0xcd, 0xd4, }}, /* Byte value: 0x3d */ + {{0xed, 0x85, 0xb3, 0xfb, 0xb3, 0xb3, 0x81, 0x06, }}, /* Byte value: 0x3e */ + {{0x5f, 0x24, 0xd9, 0xf7, 0xd9, 0xd9, 0x66, 0x63, }}, /* Byte value: 0x3f */ + {{0xda, 0xea, 0xa0, 0xf9, 0xa0, 0xa0, 0x4e, 0xf6, }}, /* Byte value: 0x40 */ + {{0xc4, 0x6e, 0x7a, 0x4a, 0x7a, 0x7a, 0xec, 0xc3, }}, /* Byte value: 0x41 */ + {{0x29, 0xeb, 0xc9, 0xb1, 0xc9, 0xc9, 0x6d, 0xc5, }}, /* Byte value: 0x42 */ + {{0xad, 0xfd, 0x23, 0xc8, 0x23, 0x23, 0xd2, 0xd9, }}, /* Byte value: 0x43 */ + {{0x07, 0x4d, 0x7f, 0x86, 0x7f, 0x7f, 0x63, 0x39, }}, /* Byte value: 0x44 */ + {{0x82, 0x83, 0x06, 0x88, 0x06, 0x06, 0x4b, 0xac, }}, /* Byte value: 0x45 */ + {{0xe2, 0xc7, 0xde, 0x43, 0xde, 0xde, 0xd0, 0xfd, }}, /* Byte value: 0x46 */ + {{0x31, 0xfa, 0xff, 0xf3, 0xff, 0xff, 0x3b, 0x40, }}, /* Byte value: 0x47 */ + {{0x17, 0x53, 0x5b, 0xfa, 0x5b, 0x5b, 0x07, 0x7e, }}, /* Byte value: 0x48 */ + {{0x9f, 0xac, 0xaa, 0xa2, 0xaa, 0xaa, 0x93, 0xc1, }}, /* Byte value: 0x49 */ + {{0x0b, 0xa4, 0x64, 0xa7, 0x64, 0x64, 0x48, 0x9a, }}, /* Byte value: 0x4a */ + {{0x16, 0x8b, 0xc8, 0x8d, 0xc8, 0xc8, 0x90, 0xf7, }}, /* Byte value: 0x4b */ + {{0x7f, 0x18, 0x91, 0x0f, 0x91, 0x91, 0xae, 0xed, }}, /* Byte value: 0x4c */ + {{0x23, 0x97, 0x3e, 0x61, 0x3e, 0x3e, 0xb2, 0xd6, }}, /* Byte value: 0x4d */ + {{0x6b, 0xe0, 0xbc, 0x6c, 0xbc, 0xbc, 0xd3, 0xcb, }}, /* Byte value: 0x4e */ + {{0xa9, 0x1b, 0x2a, 0xd7, 0x2a, 0x2a, 0xcb, 0xb8, }}, /* Byte value: 0x4f */ + {{0x8b, 0x54, 0x87, 0xc1, 0x87, 0x87, 0xee, 0xe7, }}, /* Byte value: 0x50 */ + {{0xb7, 0x9f, 0xf0, 0x64, 0xf0, 0xf0, 0x69, 0x8d, }}, /* Byte value: 0x51 */ + {{0x13, 0xb5, 0x52, 0xe5, 0x52, 0x52, 0x1e, 0x1f, }}, /* Byte value: 0x52 */ + {{0x1c, 0xf7, 0x3f, 0x5d, 0x3f, 0x3f, 0x4f, 0xe4, }}, /* Byte value: 0x53 */ + {{0xfb, 0x0e, 0x7b, 0x76, 0x7b, 0x7b, 0x11, 0xf1, }}, /* Byte value: 0x54 */ + {{0x62, 0x37, 0x3d, 0x25, 0x3d, 0x3d, 0x76, 0x80, }}, /* Byte value: 0x55 */ + {{0xf2, 0xd9, 0xfa, 0x3f, 0xfa, 0xfa, 0xb4, 0xba, }}, /* Byte value: 0x56 */ + {{0x3b, 0x86, 0x08, 0x23, 0x08, 0x08, 0xe4, 0x53, }}, /* Byte value: 0x57 */ + {{0x9a, 0x92, 0x30, 0xca, 0x30, 0x30, 0x1d, 0x29, }}, /* Byte value: 0x58 */ + {{0x75, 0x64, 0x66, 0xdf, 0x66, 0x66, 0x71, 0xfe, }}, /* Byte value: 0x59 */ + {{0xea, 0xc8, 0xcc, 0x7d, 0xcc, 0xcc, 0xe2, 0x3f, }}, /* Byte value: 0x5a */ + {{0xd0, 0x96, 0x57, 0x29, 0x57, 0x57, 0x91, 0xe5, }}, /* Byte value: 0x5b */ + {{0x2a, 0x40, 0xbf, 0x28, 0xbf, 0xbf, 0x17, 0x9d, }}, /* Byte value: 0x5c */ + {{0x91, 0x36, 0x54, 0x6d, 0x54, 0x54, 0x55, 0xb3, }}, /* Byte value: 0x5d */ + {{0x02, 0x73, 0xe5, 0xee, 0xe5, 0xe5, 0xed, 0xd1, }}, /* Byte value: 0x5e */ + {{0x46, 0xed, 0x7c, 0xc2, 0x7c, 0x7c, 0xa7, 0x6f, }}, /* Byte value: 0x5f */ + {{0xa7, 0x81, 0xd4, 0x18, 0xd4, 0xd4, 0x0d, 0xca, }}, /* Byte value: 0x60 */ + {{0xdc, 0x7f, 0x4c, 0x08, 0x4c, 0x4c, 0xba, 0x46, }}, /* Byte value: 0x61 */ + {{0x27, 0x71, 0x37, 0x7e, 0x37, 0x37, 0xab, 0xb7, }}, /* Byte value: 0x62 */ + {{0x76, 0xcf, 0x10, 0x46, 0x10, 0x10, 0x0b, 0xa6, }}, /* Byte value: 0x63 */ + {{0xa4, 0x2a, 0xa2, 0x81, 0xa2, 0xa2, 0x77, 0x92, }}, /* Byte value: 0x64 */ + {{0xca, 0xf4, 0x84, 0x85, 0x84, 0x84, 0x2a, 0xb1, }}, /* Byte value: 0x65 */ + {{0x96, 0x7b, 0x2b, 0xeb, 0x2b, 0x2b, 0x36, 0x8a, }}, /* Byte value: 0x66 */ + {{0x70, 0x5a, 0xfc, 0xb7, 0xfc, 0xfc, 0xff, 0x16, }}, /* Byte value: 0x67 */ + {{0x54, 0x80, 0xbd, 0x50, 0xbd, 0xbd, 0x2e, 0xf9, }}, /* Byte value: 0x68 */ + {{0xe1, 0x6c, 0xa8, 0xda, 0xa8, 0xa8, 0xaa, 0xa5, }}, /* Byte value: 0x69 */ + {{0x6f, 0x06, 0xb5, 0x73, 0xb5, 0xb5, 0xca, 0xaa, }}, /* Byte value: 0x6a */ + {{0x39, 0xf5, 0xed, 0xcd, 0xed, 0xed, 0x09, 0x82, }}, /* Byte value: 0x6b */ + {{0x33, 0x89, 0x1a, 0x1d, 0x1a, 0x1a, 0xd6, 0x91, }}, /* Byte value: 0x6c */ + {{0xdb, 0x32, 0x33, 0x8e, 0x33, 0x33, 0xd9, 0x7f, }}, /* Byte value: 0x6d */ + {{0xa0, 0xcc, 0xab, 0x9e, 0xab, 0xab, 0x6e, 0xf3, }}, /* Byte value: 0x6e */ + {{0xfe, 0x30, 0xe1, 0x1e, 0xe1, 0xe1, 0x9f, 0x19, }}, /* Byte value: 0x6f */ + {{0xb2, 0xa1, 0x6a, 0x0c, 0x6a, 0x6a, 0xe7, 0x65, }}, /* Byte value: 0x70 */ + {{0x10, 0x1e, 0x24, 0x7c, 0x24, 0x24, 0x64, 0x47, }}, /* Byte value: 0x71 */ + {{0x71, 0x82, 0x6f, 0xc0, 0x6f, 0x6f, 0x68, 0x9f, }}, /* Byte value: 0x72 */ + {{0x87, 0xbd, 0x9c, 0xe0, 0x9c, 0x9c, 0xc5, 0x44, }}, /* Byte value: 0x73 */ + {{0x35, 0x1c, 0xf6, 0xec, 0xf6, 0xf6, 0x22, 0x21, }}, /* Byte value: 0x74 */ + {{0x38, 0x2d, 0x7e, 0xba, 0x7e, 0x7e, 0x9e, 0x0b, }}, /* Byte value: 0x75 */ + {{0x52, 0x15, 0x51, 0xa1, 0x51, 0x51, 0xda, 0x49, }}, /* Byte value: 0x76 */ + {{0x65, 0x7a, 0x42, 0xa3, 0x42, 0x42, 0x15, 0xb9, }}, /* Byte value: 0x77 */ + {{0xde, 0x0c, 0xa9, 0xe6, 0xa9, 0xa9, 0x57, 0x97, }}, /* Byte value: 0x78 */ + {{0x8e, 0x6a, 0x1d, 0xa9, 0x1d, 0x1d, 0x60, 0x0f, }}, /* Byte value: 0x79 */ + {{0xa8, 0xc3, 0xb9, 0xa0, 0xb9, 0xb9, 0x5c, 0x31, }}, /* Byte value: 0x7a */ + {{0xfd, 0x9b, 0x97, 0x87, 0x97, 0x97, 0xe5, 0x41, }}, /* Byte value: 0x7b */ + {{0x2e, 0xa6, 0xb6, 0x37, 0xb6, 0xb6, 0x0e, 0xfc, }}, /* Byte value: 0x7c */ + {{0x01, 0xd8, 0x93, 0x77, 0x93, 0x93, 0x97, 0x89, }}, /* Byte value: 0x7d */ + {{0xf8, 0xa5, 0x0d, 0xef, 0x0d, 0x0d, 0x6b, 0xa9, }}, /* Byte value: 0x7e */ + {{0x8c, 0x19, 0xf8, 0x47, 0xf8, 0xf8, 0x8d, 0xde, }}, /* Byte value: 0x7f */ + {{0xbb, 0x76, 0xeb, 0x45, 0xeb, 0xeb, 0x42, 0x2e, }}, /* Byte value: 0x80 */ + {{0x49, 0xaf, 0x11, 0x7a, 0x11, 0x11, 0xf6, 0x94, }}, /* Byte value: 0x81 */ + {{0x44, 0x9e, 0x99, 0x2c, 0x99, 0x99, 0x4a, 0xbe, }}, /* Byte value: 0x82 */ + {{0xbf, 0x90, 0xe2, 0x5a, 0xe2, 0xe2, 0x5b, 0x4f, }}, /* Byte value: 0x83 */ + {{0xef, 0xf6, 0x56, 0x15, 0x56, 0x56, 0x6c, 0xd7, }}, /* Byte value: 0x84 */ + {{0xfc, 0x43, 0x04, 0xf0, 0x04, 0x04, 0x72, 0xc8, }}, /* Byte value: 0x85 */ + {{0x3a, 0x5e, 0x9b, 0x54, 0x9b, 0x9b, 0x73, 0xda, }}, /* Byte value: 0x86 */ + {{0xb1, 0x0a, 0x1c, 0x95, 0x1c, 0x1c, 0x9d, 0x3d, }}, /* Byte value: 0x87 */ + {{0xf9, 0x7d, 0x9e, 0x98, 0x9e, 0x9e, 0xfc, 0x20, }}, /* Byte value: 0x88 */ + {{0x99, 0x39, 0x46, 0x53, 0x46, 0x46, 0x67, 0x71, }}, /* Byte value: 0x89 */ + {{0xd8, 0x99, 0x45, 0x17, 0x45, 0x45, 0xa3, 0x27, }}, /* Byte value: 0x8a */ + {{0xc9, 0x5f, 0xf2, 0x1c, 0xf2, 0xf2, 0x50, 0xe9, }}, /* Byte value: 0x8b */ + {{0x61, 0x9c, 0x4b, 0xbc, 0x4b, 0x4b, 0x0c, 0xd8, }}, /* Byte value: 0x8c */ + {{0x3c, 0xcb, 0x77, 0xa5, 0x77, 0x77, 0x87, 0x6a, }}, /* Byte value: 0x8d */ + {{0x89, 0x27, 0x62, 0x2f, 0x62, 0x62, 0x03, 0x36, }}, /* Byte value: 0x8e */ + {{0x0f, 0x42, 0x6d, 0xb8, 0x6d, 0x6d, 0x51, 0xfb, }}, /* Byte value: 0x8f */ + {{0x5c, 0x8f, 0xaf, 0x6e, 0xaf, 0xaf, 0x1c, 0x3b, }}, /* Byte value: 0x90 */ + {{0xbe, 0x48, 0x71, 0x2d, 0x71, 0x71, 0xcc, 0xc6, }}, /* Byte value: 0x91 */ + {{0xc2, 0xfb, 0x96, 0xbb, 0x96, 0x96, 0x18, 0x73, }}, /* Byte value: 0x92 */ + {{0xc5, 0xb6, 0xe9, 0x3d, 0xe9, 0xe9, 0x7b, 0x4a, }}, /* Byte value: 0x93 */ + {{0x88, 0xff, 0xf1, 0x58, 0xf1, 0xf1, 0x94, 0xbf, }}, /* Byte value: 0x94 */ + {{0xa1, 0x14, 0x38, 0xe9, 0x38, 0x38, 0xf9, 0x7a, }}, /* Byte value: 0x95 */ + {{0x1d, 0x2f, 0xac, 0x2a, 0xac, 0xac, 0xd8, 0x6d, }}, /* Byte value: 0x96 */ + {{0xc7, 0xc5, 0x0c, 0xd3, 0x0c, 0x0c, 0x96, 0x9b, }}, /* Byte value: 0x97 */ + {{0x6c, 0xad, 0xc3, 0xea, 0xc3, 0xc3, 0xb0, 0xf2, }}, /* Byte value: 0x98 */ + {{0x85, 0xce, 0x79, 0x0e, 0x79, 0x79, 0x28, 0x95, }}, /* Byte value: 0x99 */ + {{0x9d, 0xdf, 0x4f, 0x4c, 0x4f, 0x4f, 0x7e, 0x10, }}, /* Byte value: 0x9a */ + {{0xd3, 0x3d, 0x21, 0xb0, 0x21, 0x21, 0xeb, 0xbd, }}, /* Byte value: 0x9b */ + {{0xd1, 0x4e, 0xc4, 0x5e, 0xc4, 0xc4, 0x06, 0x6c, }}, /* Byte value: 0x9c */ + {{0x1e, 0x84, 0xda, 0xb3, 0xda, 0xda, 0xa2, 0x35, }}, /* Byte value: 0x9d */ + {{0x3e, 0xb8, 0x92, 0x4b, 0x92, 0x92, 0x6a, 0xbb, }}, /* Byte value: 0x9e */ + {{0x84, 0x16, 0xea, 0x79, 0xea, 0xea, 0xbf, 0x1c, }}, /* Byte value: 0x9f */ + {{0x2f, 0x7e, 0x25, 0x40, 0x25, 0x25, 0x99, 0x75, }}, /* Byte value: 0xa0 */ + {{0x7d, 0x6b, 0x74, 0xe1, 0x74, 0x74, 0x43, 0x3c, }}, /* Byte value: 0xa1 */ + {{0x74, 0xbc, 0xf5, 0xa8, 0xf5, 0xf5, 0xe6, 0x77, }}, /* Byte value: 0xa2 */ + {{0x41, 0xa0, 0x03, 0x44, 0x03, 0x03, 0xc4, 0x56, }}, /* Byte value: 0xa3 */ + {{0x50, 0x66, 0xb4, 0x4f, 0xb4, 0xb4, 0x37, 0x98, }}, /* Byte value: 0xa4 */ + {{0x21, 0xe4, 0xdb, 0x8f, 0xdb, 0xdb, 0x5f, 0x07, }}, /* Byte value: 0xa5 */ + {{0x55, 0x58, 0x2e, 0x27, 0x2e, 0x2e, 0xb9, 0x70, }}, /* Byte value: 0xa6 */ + {{0xe7, 0xf9, 0x44, 0x2b, 0x44, 0x44, 0x5e, 0x15, }}, /* Byte value: 0xa7 */ + {{0xcd, 0xb9, 0xfb, 0x03, 0xfb, 0xfb, 0x49, 0x88, }}, /* Byte value: 0xa8 */ + {{0x0d, 0x31, 0x88, 0x56, 0x88, 0x88, 0xbc, 0x2a, }}, /* Byte value: 0xa9 */ + {{0x7c, 0xb3, 0xe7, 0x96, 0xe7, 0xe7, 0xd4, 0xb5, }}, /* Byte value: 0xaa */ + {{0x37, 0x6f, 0x13, 0x02, 0x13, 0x13, 0xcf, 0xf0, }}, /* Byte value: 0xab */ + {{0x1a, 0x62, 0xd3, 0xac, 0xd3, 0xd3, 0xbb, 0x54, }}, /* Byte value: 0xac */ + {{0xa2, 0xbf, 0x4e, 0x70, 0x4e, 0x4e, 0x83, 0x22, }}, /* Byte value: 0xad */ + {{0xaf, 0x8e, 0xc6, 0x26, 0xc6, 0xc6, 0x3f, 0x08, }}, /* Byte value: 0xae */ + {{0xf6, 0x3f, 0xf3, 0x20, 0xf3, 0xf3, 0xad, 0xdb, }}, /* Byte value: 0xaf */ + {{0xe8, 0xbb, 0x29, 0x93, 0x29, 0x29, 0x0f, 0xee, }}, /* Byte value: 0xb0 */ + {{0x7e, 0xc0, 0x02, 0x78, 0x02, 0x02, 0x39, 0x64, }}, /* Byte value: 0xb1 */ + {{0x5e, 0xfc, 0x4a, 0x80, 0x4a, 0x4a, 0xf1, 0xea, }}, /* Byte value: 0xb2 */ + {{0xfa, 0xd6, 0xe8, 0x01, 0xe8, 0xe8, 0x86, 0x78, }}, /* Byte value: 0xb3 */ + {{0xb5, 0xec, 0x15, 0x8a, 0x15, 0x15, 0x84, 0x5c, }}, /* Byte value: 0xb4 */ + {{0x92, 0x9d, 0x22, 0xf4, 0x22, 0x22, 0x2f, 0xeb, }}, /* Byte value: 0xb5 */ + {{0x56, 0xf3, 0x58, 0xbe, 0x58, 0x58, 0xc3, 0x28, }}, /* Byte value: 0xb6 */ + {{0xf1, 0x72, 0x8c, 0xa6, 0x8c, 0x8c, 0xce, 0xe2, }}, /* Byte value: 0xb7 */ + {{0x04, 0xe6, 0x09, 0x1f, 0x09, 0x09, 0x19, 0x61, }}, /* Byte value: 0xb8 */ + {{0x6e, 0xde, 0x26, 0x04, 0x26, 0x26, 0x5d, 0x23, }}, /* Byte value: 0xb9 */ + {{0xa5, 0xf2, 0x31, 0xf6, 0x31, 0x31, 0xe0, 0x1b, }}, /* Byte value: 0xba */ + {{0xe6, 0x21, 0xd7, 0x5c, 0xd7, 0xd7, 0xc9, 0x9c, }}, /* Byte value: 0xbb */ + {{0xc8, 0x87, 0x61, 0x6b, 0x61, 0x61, 0xc7, 0x60, }}, /* Byte value: 0xbc */ + {{0x7b, 0xfe, 0x98, 0x10, 0x98, 0x98, 0xb7, 0x8c, }}, /* Byte value: 0xbd */ + {{0x73, 0xf1, 0x8a, 0x2e, 0x8a, 0x8a, 0x85, 0x4e, }}, /* Byte value: 0xbe */ + {{0x51, 0xbe, 0x27, 0x38, 0x27, 0x27, 0xa0, 0x11, }}, /* Byte value: 0xbf */ + {{0x95, 0xd0, 0x5d, 0x72, 0x5d, 0x5d, 0x4c, 0xd2, }}, /* Byte value: 0xc0 */ + {{0x66, 0xd1, 0x34, 0x3a, 0x34, 0x34, 0x6f, 0xe1, }}, /* Byte value: 0xc1 */ + {{0xd6, 0x03, 0xbb, 0xd8, 0xbb, 0xbb, 0x65, 0x55, }}, /* Byte value: 0xc2 */ + {{0x5b, 0xc2, 0xd0, 0xe8, 0xd0, 0xd0, 0x7f, 0x02, }}, /* Byte value: 0xc3 */ + {{0xe3, 0x1f, 0x4d, 0x34, 0x4d, 0x4d, 0x47, 0x74, }}, /* Byte value: 0xc4 */ + {{0x63, 0xef, 0xae, 0x52, 0xae, 0xae, 0xe1, 0x09, }}, /* Byte value: 0xc5 */ + {{0x9b, 0x4a, 0xa3, 0xbd, 0xa3, 0xa3, 0x8a, 0xa0, }}, /* Byte value: 0xc6 */ + {{0xbd, 0xe3, 0x07, 0xb4, 0x07, 0x07, 0xb6, 0x9e, }}, /* Byte value: 0xc7 */ + {{0x77, 0x17, 0x83, 0x31, 0x83, 0x83, 0x9c, 0x2f, }}, /* Byte value: 0xc8 */ + {{0x8d, 0xc1, 0x6b, 0x30, 0x6b, 0x6b, 0x1a, 0x57, }}, /* Byte value: 0xc9 */ + {{0xbc, 0x3b, 0x94, 0xc3, 0x94, 0x94, 0x21, 0x17, }}, /* Byte value: 0xca */ + {{0xf3, 0x01, 0x69, 0x48, 0x69, 0x69, 0x23, 0x33, }}, /* Byte value: 0xcb */ + {{0xf4, 0x4c, 0x16, 0xce, 0x16, 0x16, 0x40, 0x0a, }}, /* Byte value: 0xcc */ + {{0x26, 0xa9, 0xa4, 0x09, 0xa4, 0xa4, 0x3c, 0x3e, }}, /* Byte value: 0xcd */ + {{0xd4, 0x70, 0x5e, 0x36, 0x5e, 0x5e, 0x88, 0x84, }}, /* Byte value: 0xce */ + {{0x80, 0xf0, 0xe3, 0x66, 0xe3, 0xe3, 0xa6, 0x7d, }}, /* Byte value: 0xcf */ + {{0x93, 0x45, 0xb1, 0x83, 0xb1, 0xb1, 0xb8, 0x62, }}, /* Byte value: 0xd0 */ + {{0xb6, 0x47, 0x63, 0x13, 0x63, 0x63, 0xfe, 0x04, }}, /* Byte value: 0xd1 */ + {{0x15, 0x20, 0xbe, 0x14, 0xbe, 0xbe, 0xea, 0xaf, }}, /* Byte value: 0xd2 */ + {{0xcc, 0x61, 0x68, 0x74, 0x68, 0x68, 0xde, 0x01, }}, /* Byte value: 0xd3 */ + {{0xac, 0x25, 0xb0, 0xbf, 0xb0, 0xb0, 0x45, 0x50, }}, /* Byte value: 0xd4 */ + {{0xc1, 0x50, 0xe0, 0x22, 0xe0, 0xe0, 0x62, 0x2b, }}, /* Byte value: 0xd5 */ + {{0xee, 0x2e, 0xc5, 0x62, 0xc5, 0xc5, 0xfb, 0x5e, }}, /* Byte value: 0xd6 */ + {{0xae, 0x56, 0x55, 0x51, 0x55, 0x55, 0xa8, 0x81, }}, /* Byte value: 0xd7 */ + {{0x9c, 0x07, 0xdc, 0x3b, 0xdc, 0xdc, 0xe9, 0x99, }}, /* Byte value: 0xd8 */ + {{0xd9, 0x41, 0xd6, 0x60, 0xd6, 0xd6, 0x34, 0xae, }}, /* Byte value: 0xd9 */ + {{0xa3, 0x67, 0xdd, 0x07, 0xdd, 0xdd, 0x14, 0xab, }}, /* Byte value: 0xda */ + {{0x25, 0x02, 0xd2, 0x90, 0xd2, 0xd2, 0x46, 0x66, }}, /* Byte value: 0xdb */ + {{0xeb, 0x10, 0x5f, 0x0a, 0x5f, 0x5f, 0x75, 0xb6, }}, /* Byte value: 0xdc */ + {{0x40, 0x78, 0x90, 0x33, 0x90, 0x90, 0x53, 0xdf, }}, /* Byte value: 0xdd */ + {{0x48, 0x77, 0x82, 0x0d, 0x82, 0x82, 0x61, 0x1d, }}, /* Byte value: 0xde */ + {{0x6d, 0x75, 0x50, 0x9d, 0x50, 0x50, 0x27, 0x7b, }}, /* Byte value: 0xdf */ + {{0x28, 0x33, 0x5a, 0xc6, 0x5a, 0x5a, 0xfa, 0x4c, }}, /* Byte value: 0xe0 */ + {{0xff, 0xe8, 0x72, 0x69, 0x72, 0x72, 0x08, 0x90, }}, /* Byte value: 0xe1 */ + {{0x0a, 0x7c, 0xf7, 0xd0, 0xf7, 0xf7, 0xdf, 0x13, }}, /* Byte value: 0xe2 */ + {{0x4f, 0x3a, 0xfd, 0x8b, 0xfd, 0xfd, 0x02, 0x24, }}, /* Byte value: 0xe3 */ + {{0x19, 0xc9, 0xa5, 0x35, 0xa5, 0xa5, 0xc1, 0x0c, }}, /* Byte value: 0xe4 */ + {{0x53, 0xcd, 0xc2, 0xd6, 0xc2, 0xc2, 0x4d, 0xc0, }}, /* Byte value: 0xe5 */ + {{0xf5, 0x94, 0x85, 0xb9, 0x85, 0x85, 0xd7, 0x83, }}, /* Byte value: 0xe6 */ + {{0xb9, 0x05, 0x0e, 0xab, 0x0e, 0x0e, 0xaf, 0xff, }}, /* Byte value: 0xe7 */ + {{0xcb, 0x2c, 0x17, 0xf2, 0x17, 0x17, 0xbd, 0x38, }}, /* Byte value: 0xe8 */ + {{0x45, 0x46, 0x0a, 0x5b, 0x0a, 0x0a, 0xdd, 0x37, }}, /* Byte value: 0xe9 */ + {{0x57, 0x2b, 0xcb, 0xc9, 0xcb, 0xcb, 0x54, 0xa1, }}, /* Byte value: 0xea */ + {{0xd7, 0xdb, 0x28, 0xaf, 0x28, 0x28, 0xf2, 0xdc, }}, /* Byte value: 0xeb */ + {{0x68, 0x4b, 0xca, 0xf5, 0xca, 0xca, 0xa9, 0x93, }}, /* Byte value: 0xec */ + {{0x4c, 0x91, 0x8b, 0x12, 0x8b, 0x8b, 0x78, 0x7c, }}, /* Byte value: 0xed */ + {{0x20, 0x3c, 0x48, 0xf8, 0x48, 0x48, 0xc8, 0x8e, }}, /* Byte value: 0xee */ + {{0x4a, 0x04, 0x67, 0xe3, 0x67, 0x67, 0x8c, 0xcc, }}, /* Byte value: 0xef */ + {{0x05, 0x3e, 0x9a, 0x68, 0x9a, 0x9a, 0x8e, 0xe8, }}, /* Byte value: 0xf0 */ + {{0xc6, 0x1d, 0x9f, 0xa4, 0x9f, 0x9f, 0x01, 0x12, }}, /* Byte value: 0xf1 */ + {{0x14, 0xf8, 0x2d, 0x63, 0x2d, 0x2d, 0x7d, 0x26, }}, /* Byte value: 0xf2 */ + {{0x9e, 0x74, 0x39, 0xd5, 0x39, 0x39, 0x04, 0x48, }}, /* Byte value: 0xf3 */ + {{0xd5, 0xa8, 0xcd, 0x41, 0xcd, 0xcd, 0x1f, 0x0d, }}, /* Byte value: 0xf4 */ + {{0x4d, 0x49, 0x18, 0x65, 0x18, 0x18, 0xef, 0xf5, }}, /* Byte value: 0xf5 */ + {{0xce, 0x12, 0x8d, 0x9a, 0x8d, 0x8d, 0x33, 0xd0, }}, /* Byte value: 0xf6 */ + {{0x5a, 0x1a, 0x43, 0x9f, 0x43, 0x43, 0xe8, 0x8b, }}, /* Byte value: 0xf7 */ + {{0x3f, 0x60, 0x01, 0x3c, 0x01, 0x01, 0xfd, 0x32, }}, /* Byte value: 0xf8 */ + {{0x8a, 0x8c, 0x14, 0xb6, 0x14, 0x14, 0x79, 0x6e, }}, /* Byte value: 0xf9 */ + {{0x83, 0x5b, 0x95, 0xff, 0x95, 0x95, 0xdc, 0x25, }}, /* Byte value: 0xfa */ + {{0xc3, 0x23, 0x05, 0xcc, 0x05, 0x05, 0x8f, 0xfa, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x94, 0x08, 0xce, 0x05, 0xce, 0xce, 0xdb, 0x5b, }}, /* Byte value: 0xfd */ + {{0x1f, 0x5c, 0x49, 0xc4, 0x49, 0x49, 0x35, 0xbc, }}, /* Byte value: 0xfe */ + {{0x98, 0xe1, 0xd5, 0x24, 0xd5, 0xd5, 0xf0, 0xf8, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 3 */ + {{0xab, 0x5f, 0x0f, 0xc5, 0x97, 0x09, 0x7c, 0xc9, }}, /* Byte value: 0x00 */ + {{0xbb, 0xa5, 0xce, 0xde, 0x05, 0xdd, 0x1c, 0xf8, }}, /* Byte value: 0x01 */ + {{0x83, 0x15, 0xcf, 0x1f, 0x39, 0x08, 0x8c, 0x52, }}, /* Byte value: 0x02 */ + {{0x0d, 0xe5, 0x99, 0x66, 0x2c, 0xc3, 0x2e, 0xd2, }}, /* Byte value: 0x03 */ + {{0x3a, 0x3e, 0xb0, 0xfa, 0xbf, 0x2e, 0x9c, 0x05, }}, /* Byte value: 0x04 */ + {{0x4a, 0x9d, 0xb2, 0xbb, 0xc7, 0x47, 0x7f, 0x92, }}, /* Byte value: 0x05 */ + {{0xe8, 0xf8, 0x85, 0x6e, 0xb9, 0xb8, 0x35, 0x14, }}, /* Byte value: 0x06 */ + {{0xeb, 0x31, 0x8d, 0xa9, 0x9a, 0xdf, 0x3f, 0x0d, }}, /* Byte value: 0x07 */ + {{0x8f, 0xb7, 0xef, 0x85, 0xb5, 0x57, 0xa4, 0x36, }}, /* Byte value: 0x08 */ + {{0xbe, 0x3d, 0xd6, 0x54, 0x60, 0x74, 0x02, 0xd3, }}, /* Byte value: 0x09 */ + {{0x0f, 0x6b, 0x28, 0x5d, 0xaf, 0x38, 0x22, 0x7d, }}, /* Byte value: 0x0a */ + {{0x6d, 0xbc, 0x5a, 0x3c, 0xc6, 0x7e, 0xad, 0x74, }}, /* Byte value: 0x0b */ + {{0x0a, 0xf3, 0x30, 0xd7, 0xca, 0x91, 0x3c, 0x56, }}, /* Byte value: 0x0c */ + {{0x29, 0x0d, 0x79, 0x26, 0x0e, 0x9d, 0xf6, 0x2d, }}, /* Byte value: 0x0d */ + {{0x17, 0xec, 0x68, 0xaa, 0x74, 0x86, 0x72, 0xb5, }}, /* Byte value: 0x0e */ + {{0xb0, 0x11, 0x47, 0xf5, 0x6f, 0xd0, 0x26, 0x18, }}, /* Byte value: 0x0f */ + {{0xc5, 0x2a, 0x5d, 0x3e, 0x72, 0x10, 0xdb, 0xa4, }}, /* Byte value: 0x10 */ + {{0x4c, 0xcc, 0xa2, 0xf6, 0x81, 0x89, 0x6b, 0xa0, }}, /* Byte value: 0x11 */ + {{0xc3, 0x7b, 0x4d, 0x73, 0x34, 0xde, 0xcf, 0x96, }}, /* Byte value: 0x12 */ + {{0xb5, 0x89, 0x5f, 0x7f, 0x0a, 0x79, 0x38, 0x33, }}, /* Byte value: 0x13 */ + {{0x74, 0x7c, 0xa3, 0x37, 0xbd, 0x5c, 0xfb, 0x0a, }}, /* Byte value: 0x14 */ + {{0x94, 0xf9, 0xa7, 0xb5, 0x4d, 0x8e, 0xfe, 0xe7, }}, /* Byte value: 0x15 */ + {{0x1d, 0x1f, 0x58, 0x7d, 0xbe, 0x17, 0x4e, 0xe3, }}, /* Byte value: 0x16 */ + {{0x25, 0xaf, 0x59, 0xbc, 0x82, 0xc2, 0xde, 0x49, }}, /* Byte value: 0x17 */ + {{0x48, 0x13, 0x03, 0x80, 0x44, 0xbc, 0x73, 0x3d, }}, /* Byte value: 0x18 */ + {{0xda, 0xbb, 0xb4, 0x78, 0x4f, 0xfc, 0x99, 0xe8, }}, /* Byte value: 0x19 */ + {{0xdd, 0xad, 0x1d, 0xc9, 0xa9, 0xae, 0x8b, 0x6c, }}, /* Byte value: 0x1a */ + {{0xe9, 0xbf, 0x3c, 0x92, 0x19, 0x24, 0x33, 0xa2, }}, /* Byte value: 0x1b */ + {{0xea, 0x76, 0x34, 0x55, 0x3a, 0x43, 0x39, 0xbb, }}, /* Byte value: 0x1c */ + {{0x73, 0x6a, 0x0a, 0x86, 0x5b, 0x0e, 0xe9, 0x8e, }}, /* Byte value: 0x1d */ + {{0x2e, 0x1b, 0xd0, 0x97, 0xe8, 0xcf, 0xe4, 0xa9, }}, /* Byte value: 0x1e */ + {{0xf5, 0xe7, 0xdd, 0x13, 0x07, 0xaf, 0x7b, 0xf7, }}, /* Byte value: 0x1f */ + {{0x26, 0x66, 0x51, 0x7b, 0xa1, 0xa5, 0xd4, 0x50, }}, /* Byte value: 0x20 */ + {{0xd0, 0x48, 0x84, 0xaf, 0x85, 0x6d, 0xa5, 0xbe, }}, /* Byte value: 0x21 */ + {{0xc4, 0x6d, 0xe4, 0xc2, 0xd2, 0x8c, 0xdd, 0x12, }}, /* Byte value: 0x22 */ + {{0xf3, 0xb6, 0xcd, 0x5e, 0x41, 0x61, 0x6f, 0xc5, }}, /* Byte value: 0x23 */ + {{0x7b, 0x17, 0x8b, 0x6a, 0x12, 0x64, 0xd9, 0x77, }}, /* Byte value: 0x24 */ + {{0x4d, 0x8b, 0x1b, 0x0a, 0x21, 0x15, 0x6d, 0x16, }}, /* Byte value: 0x25 */ + {{0x45, 0xf6, 0x9a, 0xe6, 0x68, 0x7f, 0x5d, 0xef, }}, /* Byte value: 0x26 */ + {{0xa9, 0xd1, 0xbe, 0xfe, 0x14, 0xf2, 0x70, 0x66, }}, /* Byte value: 0x27 */ + {{0x5e, 0xb8, 0xd2, 0xd6, 0x90, 0xa6, 0x07, 0x3e, }}, /* Byte value: 0x28 */ + {{0xd8, 0x35, 0x05, 0x43, 0xcc, 0x07, 0x95, 0x47, }}, /* Byte value: 0x29 */ + {{0x7e, 0x8f, 0x93, 0xe0, 0x77, 0xcd, 0xc7, 0x5c, }}, /* Byte value: 0x2a */ + {{0xf2, 0xf1, 0x74, 0xa2, 0xe1, 0xfd, 0x69, 0x73, }}, /* Byte value: 0x2b */ + {{0x90, 0x26, 0x06, 0xc3, 0x88, 0xbb, 0xe6, 0x7a, }}, /* Byte value: 0x2c */ + {{0x77, 0xb5, 0xab, 0xf0, 0x9e, 0x3b, 0xf1, 0x13, }}, /* Byte value: 0x2d */ + {{0x53, 0x5d, 0x4b, 0xb0, 0xbc, 0x65, 0x29, 0xec, }}, /* Byte value: 0x2e */ + {{0xe5, 0x1d, 0x1c, 0x08, 0x95, 0x7b, 0x1b, 0xc6, }}, /* Byte value: 0x2f */ + {{0x49, 0x54, 0xba, 0x7c, 0xe4, 0x20, 0x75, 0x8b, }}, /* Byte value: 0x30 */ + {{0x98, 0x5b, 0x87, 0x2f, 0xc1, 0xd1, 0xd6, 0x83, }}, /* Byte value: 0x31 */ + {{0x13, 0x33, 0xc9, 0xdc, 0xb1, 0xb3, 0x6a, 0x28, }}, /* Byte value: 0x32 */ + {{0x43, 0xa7, 0x8a, 0xab, 0x2e, 0xb1, 0x49, 0xdd, }}, /* Byte value: 0x33 */ + {{0xdc, 0xea, 0xa4, 0x35, 0x09, 0x32, 0x8d, 0xda, }}, /* Byte value: 0x34 */ + {{0xc7, 0xa4, 0xec, 0x05, 0xf1, 0xeb, 0xd7, 0x0b, }}, /* Byte value: 0x35 */ + {{0xa0, 0xeb, 0x86, 0xee, 0xfd, 0x04, 0x46, 0x29, }}, /* Byte value: 0x36 */ + {{0xcc, 0x10, 0x65, 0x2e, 0x9b, 0xe6, 0xed, 0xeb, }}, /* Byte value: 0x37 */ + {{0x14, 0x25, 0x60, 0x6d, 0x57, 0xe1, 0x78, 0xac, }}, /* Byte value: 0x38 */ + {{0x52, 0x1a, 0xf2, 0x4c, 0x1c, 0xf9, 0x2f, 0x5a, }}, /* Byte value: 0x39 */ + {{0x2f, 0x5c, 0x69, 0x6b, 0x48, 0x53, 0xe2, 0x1f, }}, /* Byte value: 0x3a */ + {{0x47, 0x78, 0x2b, 0xdd, 0xeb, 0x84, 0x51, 0x40, }}, /* Byte value: 0x3b */ + {{0xa6, 0xba, 0x96, 0xa3, 0xbb, 0xca, 0x52, 0x1b, }}, /* Byte value: 0x3c */ + {{0x5f, 0xff, 0x6b, 0x2a, 0x30, 0x3a, 0x01, 0x88, }}, /* Byte value: 0x3d */ + {{0xe3, 0x4c, 0x0c, 0x45, 0xd3, 0xb5, 0x0f, 0xf4, }}, /* Byte value: 0x3e */ + {{0xb8, 0x6c, 0xc6, 0x19, 0x26, 0xba, 0x16, 0xe1, }}, /* Byte value: 0x3f */ + {{0xa7, 0xfd, 0x2f, 0x5f, 0x1b, 0x56, 0x54, 0xad, }}, /* Byte value: 0x40 */ + {{0xc0, 0xb2, 0x45, 0xb4, 0x17, 0xb9, 0xc5, 0x8f, }}, /* Byte value: 0x41 */ + {{0x23, 0xfe, 0x49, 0xf1, 0xc4, 0x0c, 0xca, 0x7b, }}, /* Byte value: 0x42 */ + {{0x2a, 0xc4, 0x71, 0xe1, 0x2d, 0xfa, 0xfc, 0x34, }}, /* Byte value: 0x43 */ + {{0x62, 0xd7, 0x72, 0x61, 0x69, 0x46, 0x8f, 0x09, }}, /* Byte value: 0x44 */ + {{0x7d, 0x46, 0x9b, 0x27, 0x54, 0xaa, 0xcd, 0x45, }}, /* Byte value: 0x45 */ + {{0x31, 0x8a, 0x39, 0xd1, 0xd5, 0x23, 0xa6, 0xe5, }}, /* Byte value: 0x46 */ + {{0x30, 0xcd, 0x80, 0x2d, 0x75, 0xbf, 0xa0, 0x53, }}, /* Byte value: 0x47 */ + {{0xc1, 0xf5, 0xfc, 0x48, 0xb7, 0x25, 0xc3, 0x39, }}, /* Byte value: 0x48 */ + {{0x20, 0x37, 0x41, 0x36, 0xe7, 0x6b, 0xc0, 0x62, }}, /* Byte value: 0x49 */ + {{0x8a, 0x2f, 0xf7, 0x0f, 0xd0, 0xfe, 0xba, 0x1d, }}, /* Byte value: 0x4a */ + {{0xd7, 0x5e, 0x2d, 0x1e, 0x63, 0x3f, 0xb7, 0x3a, }}, /* Byte value: 0x4b */ + {{0x3d, 0x28, 0x19, 0x4b, 0x59, 0x7c, 0x8e, 0x81, }}, /* Byte value: 0x4c */ + {{0xbf, 0x7a, 0x6f, 0xa8, 0xc0, 0xe8, 0x04, 0x65, }}, /* Byte value: 0x4d */ + {{0xc6, 0xe3, 0x55, 0xf9, 0x51, 0x77, 0xd1, 0xbd, }}, /* Byte value: 0x4e */ + {{0x72, 0x2d, 0xb3, 0x7a, 0xfb, 0x92, 0xef, 0x38, }}, /* Byte value: 0x4f */ + {{0xdb, 0xfc, 0x0d, 0x84, 0xef, 0x60, 0x9f, 0x5e, }}, /* Byte value: 0x50 */ + {{0x15, 0x62, 0xd9, 0x91, 0xf7, 0x7d, 0x7e, 0x1a, }}, /* Byte value: 0x51 */ + {{0x99, 0x1c, 0x3e, 0xd3, 0x61, 0x4d, 0xd0, 0x35, }}, /* Byte value: 0x52 */ + {{0x4b, 0xda, 0x0b, 0x47, 0x67, 0xdb, 0x79, 0x24, }}, /* Byte value: 0x53 */ + {{0x34, 0x12, 0x21, 0x5b, 0xb0, 0x8a, 0xb8, 0xce, }}, /* Byte value: 0x54 */ + {{0x60, 0x59, 0xc3, 0x5a, 0xea, 0xbd, 0x83, 0xa6, }}, /* Byte value: 0x55 */ + {{0x92, 0xa8, 0xb7, 0xf8, 0x0b, 0x40, 0xea, 0xd5, }}, /* Byte value: 0x56 */ + {{0xac, 0x49, 0xa6, 0x74, 0x71, 0x5b, 0x6e, 0x4d, }}, /* Byte value: 0x57 */ + {{0x6e, 0x75, 0x52, 0xfb, 0xe5, 0x19, 0xa7, 0x6d, }}, /* Byte value: 0x58 */ + {{0xa1, 0xac, 0x3f, 0x12, 0x5d, 0x98, 0x40, 0x9f, }}, /* Byte value: 0x59 */ + {{0x81, 0x9b, 0x7e, 0x24, 0xba, 0xf3, 0x80, 0xfd, }}, /* Byte value: 0x5a */ + {{0x3b, 0x79, 0x09, 0x06, 0x1f, 0xb2, 0x9a, 0xb3, }}, /* Byte value: 0x5b */ + {{0x19, 0xc0, 0xf9, 0x0b, 0x7b, 0x22, 0x56, 0x7e, }}, /* Byte value: 0x5c */ + {{0xe4, 0x5a, 0xa5, 0xf4, 0x35, 0xe7, 0x1d, 0x70, }}, /* Byte value: 0x5d */ + {{0x2c, 0x95, 0x61, 0xac, 0x6b, 0x34, 0xe8, 0x06, }}, /* Byte value: 0x5e */ + {{0xbd, 0xf4, 0xde, 0x93, 0x43, 0x13, 0x08, 0xca, }}, /* Byte value: 0x5f */ + {{0xb6, 0x40, 0x57, 0xb8, 0x29, 0x1e, 0x32, 0x2a, }}, /* Byte value: 0x60 */ + {{0xd3, 0x81, 0x8c, 0x68, 0xa6, 0x0a, 0xaf, 0xa7, }}, /* Byte value: 0x61 */ + {{0xe7, 0x93, 0xad, 0x33, 0x16, 0x80, 0x17, 0x69, }}, /* Byte value: 0x62 */ + {{0x9b, 0x92, 0x8f, 0xe8, 0xe2, 0xb6, 0xdc, 0x9a, }}, /* Byte value: 0x63 */ + {{0x8c, 0x7e, 0xe7, 0x42, 0x96, 0x30, 0xae, 0x2f, }}, /* Byte value: 0x64 */ + {{0x04, 0xdf, 0xa1, 0x76, 0xc5, 0x35, 0x18, 0x9d, }}, /* Byte value: 0x65 */ + {{0x86, 0x8d, 0xd7, 0x95, 0x5c, 0xa1, 0x92, 0x79, }}, /* Byte value: 0x66 */ + {{0xef, 0xee, 0x2c, 0xdf, 0x5f, 0xea, 0x27, 0x90, }}, /* Byte value: 0x67 */ + {{0x32, 0x43, 0x31, 0x16, 0xf6, 0x44, 0xac, 0xfc, }}, /* Byte value: 0x68 */ + {{0x0b, 0xb4, 0x89, 0x2b, 0x6a, 0x0d, 0x3a, 0xe0, }}, /* Byte value: 0x69 */ + {{0x9e, 0x0a, 0x97, 0x62, 0x87, 0x1f, 0xc2, 0xb1, }}, /* Byte value: 0x6a */ + {{0x80, 0xdc, 0xc7, 0xd8, 0x1a, 0x6f, 0x86, 0x4b, }}, /* Byte value: 0x6b */ + {{0x1c, 0x58, 0xe1, 0x81, 0x1e, 0x8b, 0x48, 0x55, }}, /* Byte value: 0x6c */ + {{0xb1, 0x56, 0xfe, 0x09, 0xcf, 0x4c, 0x20, 0xae, }}, /* Byte value: 0x6d */ + {{0xd4, 0x97, 0x25, 0xd9, 0x40, 0x58, 0xbd, 0x23, }}, /* Byte value: 0x6e */ + {{0x7a, 0x50, 0x32, 0x96, 0xb2, 0xf8, 0xdf, 0xc1, }}, /* Byte value: 0x6f */ + {{0x5b, 0x20, 0xca, 0x5c, 0xf5, 0x0f, 0x19, 0x15, }}, /* Byte value: 0x70 */ + {{0xa3, 0x22, 0x8e, 0x29, 0xde, 0x63, 0x4c, 0x30, }}, /* Byte value: 0x71 */ + {{0xf9, 0x45, 0xfd, 0x89, 0x8b, 0xf0, 0x53, 0x93, }}, /* Byte value: 0x72 */ + {{0x33, 0x04, 0x88, 0xea, 0x56, 0xd8, 0xaa, 0x4a, }}, /* Byte value: 0x73 */ + {{0x68, 0x24, 0x42, 0xb6, 0xa3, 0xd7, 0xb3, 0x5f, }}, /* Byte value: 0x74 */ + {{0x96, 0x77, 0x16, 0x8e, 0xce, 0x75, 0xf2, 0x48, }}, /* Byte value: 0x75 */ + {{0x46, 0x3f, 0x92, 0x21, 0x4b, 0x18, 0x57, 0xf6, }}, /* Byte value: 0x76 */ + {{0x02, 0x8e, 0xb1, 0x3b, 0x83, 0xfb, 0x0c, 0xaf, }}, /* Byte value: 0x77 */ + {{0xff, 0x14, 0xed, 0xc4, 0xcd, 0x3e, 0x47, 0xa1, }}, /* Byte value: 0x78 */ + {{0x95, 0xbe, 0x1e, 0x49, 0xed, 0x12, 0xf8, 0x51, }}, /* Byte value: 0x79 */ + {{0x64, 0x86, 0x62, 0x2c, 0x2f, 0x88, 0x9b, 0x3b, }}, /* Byte value: 0x7a */ + {{0x40, 0x6e, 0x82, 0x6c, 0x0d, 0xd6, 0x43, 0xc4, }}, /* Byte value: 0x7b */ + {{0x41, 0x29, 0x3b, 0x90, 0xad, 0x4a, 0x45, 0x72, }}, /* Byte value: 0x7c */ + {{0x16, 0xab, 0xd1, 0x56, 0xd4, 0x1a, 0x74, 0x03, }}, /* Byte value: 0x7d */ + {{0x0e, 0x2c, 0x91, 0xa1, 0x0f, 0xa4, 0x24, 0xcb, }}, /* Byte value: 0x7e */ + {{0xb9, 0x2b, 0x7f, 0xe5, 0x86, 0x26, 0x10, 0x57, }}, /* Byte value: 0x7f */ + {{0xfd, 0x9a, 0x5c, 0xff, 0x4e, 0xc5, 0x4b, 0x0e, }}, /* Byte value: 0x80 */ + {{0x6f, 0x32, 0xeb, 0x07, 0x45, 0x85, 0xa1, 0xdb, }}, /* Byte value: 0x81 */ + {{0x91, 0x61, 0xbf, 0x3f, 0x28, 0x27, 0xe0, 0xcc, }}, /* Byte value: 0x82 */ + {{0xa5, 0x73, 0x9e, 0x64, 0x98, 0xad, 0x58, 0x02, }}, /* Byte value: 0x83 */ + {{0xcf, 0xd9, 0x6d, 0xe9, 0xb8, 0x81, 0xe7, 0xf2, }}, /* Byte value: 0x84 */ + {{0x56, 0xc5, 0x53, 0x3a, 0xd9, 0xcc, 0x37, 0xc7, }}, /* Byte value: 0x85 */ + {{0xba, 0xe2, 0x77, 0x22, 0xa5, 0x41, 0x1a, 0x4e, }}, /* Byte value: 0x86 */ + {{0x61, 0x1e, 0x7a, 0xa6, 0x4a, 0x21, 0x85, 0x10, }}, /* Byte value: 0x87 */ + {{0x18, 0x87, 0x40, 0xf7, 0xdb, 0xbe, 0x50, 0xc8, }}, /* Byte value: 0x88 */ + {{0x54, 0x4b, 0xe2, 0x01, 0x5a, 0x37, 0x3b, 0x68, }}, /* Byte value: 0x89 */ + {{0x8b, 0x68, 0x4e, 0xf3, 0x70, 0x62, 0xbc, 0xab, }}, /* Byte value: 0x8a */ + {{0x3e, 0xe1, 0x11, 0x8c, 0x7a, 0x1b, 0x84, 0x98, }}, /* Byte value: 0x8b */ + {{0x5a, 0x67, 0x73, 0xa0, 0x55, 0x93, 0x1f, 0xa3, }}, /* Byte value: 0x8c */ + {{0xce, 0x9e, 0xd4, 0x15, 0x18, 0x1d, 0xe1, 0x44, }}, /* Byte value: 0x8d */ + {{0xf7, 0x69, 0x6c, 0x28, 0x84, 0x54, 0x77, 0x58, }}, /* Byte value: 0x8e */ + {{0xd2, 0xc6, 0x35, 0x94, 0x06, 0x96, 0xa9, 0x11, }}, /* Byte value: 0x8f */ + {{0x82, 0x52, 0x76, 0xe3, 0x99, 0x94, 0x8a, 0xe4, }}, /* Byte value: 0x90 */ + {{0xb3, 0xd8, 0x4f, 0x32, 0x4c, 0xb7, 0x2c, 0x01, }}, /* Byte value: 0x91 */ + {{0xb4, 0xce, 0xe6, 0x83, 0xaa, 0xe5, 0x3e, 0x85, }}, /* Byte value: 0x92 */ + {{0xd6, 0x19, 0x94, 0xe2, 0xc3, 0xa3, 0xb1, 0x8c, }}, /* Byte value: 0x93 */ + {{0xe1, 0xc2, 0xbd, 0x7e, 0x50, 0x4e, 0x03, 0x5b, }}, /* Byte value: 0x94 */ + {{0xc2, 0x3c, 0xf4, 0x8f, 0x94, 0x42, 0xc9, 0x20, }}, /* Byte value: 0x95 */ + {{0x5d, 0x71, 0xda, 0x11, 0xb3, 0xc1, 0x0d, 0x27, }}, /* Byte value: 0x96 */ + {{0xfa, 0x8c, 0xf5, 0x4e, 0xa8, 0x97, 0x59, 0x8a, }}, /* Byte value: 0x97 */ + {{0xa4, 0x34, 0x27, 0x98, 0x38, 0x31, 0x5e, 0xb4, }}, /* Byte value: 0x98 */ + {{0x1f, 0x91, 0xe9, 0x46, 0x3d, 0xec, 0x42, 0x4c, }}, /* Byte value: 0x99 */ + {{0x0c, 0xa2, 0x20, 0x9a, 0x8c, 0x5f, 0x28, 0x64, }}, /* Byte value: 0x9a */ + {{0x01, 0x47, 0xb9, 0xfc, 0xa0, 0x9c, 0x06, 0xb6, }}, /* Byte value: 0x9b */ + {{0x2d, 0xd2, 0xd8, 0x50, 0xcb, 0xa8, 0xee, 0xb0, }}, /* Byte value: 0x9c */ + {{0x67, 0x4f, 0x6a, 0xeb, 0x0c, 0xef, 0x91, 0x22, }}, /* Byte value: 0x9d */ + {{0xe2, 0x0b, 0xb5, 0xb9, 0x73, 0x29, 0x09, 0x42, }}, /* Byte value: 0x9e */ + {{0x09, 0x3a, 0x38, 0x10, 0xe9, 0xf6, 0x36, 0x4f, }}, /* Byte value: 0x9f */ + {{0x57, 0x82, 0xea, 0xc6, 0x79, 0x50, 0x31, 0x71, }}, /* Byte value: 0xa0 */ + {{0x11, 0xbd, 0x78, 0xe7, 0x32, 0x48, 0x66, 0x87, }}, /* Byte value: 0xa1 */ + {{0xb7, 0x07, 0xee, 0x44, 0x89, 0x82, 0x34, 0x9c, }}, /* Byte value: 0xa2 */ + {{0xdf, 0x23, 0xac, 0xf2, 0x2a, 0x55, 0x87, 0xc3, }}, /* Byte value: 0xa3 */ + {{0x6a, 0xaa, 0xf3, 0x8d, 0x20, 0x2c, 0xbf, 0xf0, }}, /* Byte value: 0xa4 */ + {{0x93, 0xef, 0x0e, 0x04, 0xab, 0xdc, 0xec, 0x63, }}, /* Byte value: 0xa5 */ + {{0x24, 0xe8, 0xe0, 0x40, 0x22, 0x5e, 0xd8, 0xff, }}, /* Byte value: 0xa6 */ + {{0x7f, 0xc8, 0x2a, 0x1c, 0xd7, 0x51, 0xc1, 0xea, }}, /* Byte value: 0xa7 */ + {{0x66, 0x08, 0xd3, 0x17, 0xac, 0x73, 0x97, 0x94, }}, /* Byte value: 0xa8 */ + {{0xfe, 0x53, 0x54, 0x38, 0x6d, 0xa2, 0x41, 0x17, }}, /* Byte value: 0xa9 */ + {{0x07, 0x16, 0xa9, 0xb1, 0xe6, 0x52, 0x12, 0x84, }}, /* Byte value: 0xaa */ + {{0x44, 0xb1, 0x23, 0x1a, 0xc8, 0xe3, 0x5b, 0x59, }}, /* Byte value: 0xab */ + {{0x3f, 0xa6, 0xa8, 0x70, 0xda, 0x87, 0x82, 0x2e, }}, /* Byte value: 0xac */ + {{0xf8, 0x02, 0x44, 0x75, 0x2b, 0x6c, 0x55, 0x25, }}, /* Byte value: 0xad */ + {{0x06, 0x51, 0x10, 0x4d, 0x46, 0xce, 0x14, 0x32, }}, /* Byte value: 0xae */ + {{0xca, 0x41, 0x75, 0x63, 0xdd, 0x28, 0xf9, 0xd9, }}, /* Byte value: 0xaf */ + {{0xad, 0x0e, 0x1f, 0x88, 0xd1, 0xc7, 0x68, 0xfb, }}, /* Byte value: 0xb0 */ + {{0x2b, 0x83, 0xc8, 0x1d, 0x8d, 0x66, 0xfa, 0x82, }}, /* Byte value: 0xb1 */ + {{0xae, 0xc7, 0x17, 0x4f, 0xf2, 0xa0, 0x62, 0xe2, }}, /* Byte value: 0xb2 */ + {{0x22, 0xb9, 0xf0, 0x0d, 0x64, 0x90, 0xcc, 0xcd, }}, /* Byte value: 0xb3 */ + {{0x39, 0xf7, 0xb8, 0x3d, 0x9c, 0x49, 0x96, 0x1c, }}, /* Byte value: 0xb4 */ + {{0xde, 0x64, 0x15, 0x0e, 0x8a, 0xc9, 0x81, 0x75, }}, /* Byte value: 0xb5 */ + {{0x1e, 0xd6, 0x50, 0xba, 0x9d, 0x70, 0x44, 0xfa, }}, /* Byte value: 0xb6 */ + {{0xa8, 0x96, 0x07, 0x02, 0xb4, 0x6e, 0x76, 0xd0, }}, /* Byte value: 0xb7 */ + {{0x58, 0xe9, 0xc2, 0x9b, 0xd6, 0x68, 0x13, 0x0c, }}, /* Byte value: 0xb8 */ + {{0x88, 0xa1, 0x46, 0x34, 0x53, 0x05, 0xb6, 0xb2, }}, /* Byte value: 0xb9 */ + {{0x9a, 0xd5, 0x36, 0x14, 0x42, 0x2a, 0xda, 0x2c, }}, /* Byte value: 0xba */ + {{0x69, 0x63, 0xfb, 0x4a, 0x03, 0x4b, 0xb5, 0xe9, }}, /* Byte value: 0xbb */ + {{0x28, 0x4a, 0xc0, 0xda, 0xae, 0x01, 0xf0, 0x9b, }}, /* Byte value: 0xbc */ + {{0x65, 0xc1, 0xdb, 0xd0, 0x8f, 0x14, 0x9d, 0x8d, }}, /* Byte value: 0xbd */ + {{0xd5, 0xd0, 0x9c, 0x25, 0xe0, 0xc4, 0xbb, 0x95, }}, /* Byte value: 0xbe */ + {{0x7c, 0x01, 0x22, 0xdb, 0xf4, 0x36, 0xcb, 0xf3, }}, /* Byte value: 0xbf */ + {{0xbc, 0xb3, 0x67, 0x6f, 0xe3, 0x8f, 0x0e, 0x7c, }}, /* Byte value: 0xc0 */ + {{0x38, 0xb0, 0x01, 0xc1, 0x3c, 0xd5, 0x90, 0xaa, }}, /* Byte value: 0xc1 */ + {{0x4f, 0x05, 0xaa, 0x31, 0xa2, 0xee, 0x61, 0xb9, }}, /* Byte value: 0xc2 */ + {{0xe0, 0x85, 0x04, 0x82, 0xf0, 0xd2, 0x05, 0xed, }}, /* Byte value: 0xc3 */ + {{0x27, 0x21, 0xe8, 0x87, 0x01, 0x39, 0xd2, 0xe6, }}, /* Byte value: 0xc4 */ + {{0x76, 0xf2, 0x12, 0x0c, 0x3e, 0xa7, 0xf7, 0xa5, }}, /* Byte value: 0xc5 */ + {{0x78, 0xde, 0x83, 0xad, 0x31, 0x03, 0xd3, 0x6e, }}, /* Byte value: 0xc6 */ + {{0x89, 0xe6, 0xff, 0xc8, 0xf3, 0x99, 0xb0, 0x04, }}, /* Byte value: 0xc7 */ + {{0x8d, 0x39, 0x5e, 0xbe, 0x36, 0xac, 0xa8, 0x99, }}, /* Byte value: 0xc8 */ + {{0xaf, 0x80, 0xae, 0xb3, 0x52, 0x3c, 0x64, 0x54, }}, /* Byte value: 0xc9 */ + {{0x9f, 0x4d, 0x2e, 0x9e, 0x27, 0x83, 0xc4, 0x07, }}, /* Byte value: 0xca */ + {{0x84, 0x03, 0x66, 0xae, 0xdf, 0x5a, 0x9e, 0xd6, }}, /* Byte value: 0xcb */ + {{0xe6, 0xd4, 0x14, 0xcf, 0xb6, 0x1c, 0x11, 0xdf, }}, /* Byte value: 0xcc */ + {{0xf1, 0x38, 0x7c, 0x65, 0xc2, 0x9a, 0x63, 0x6a, }}, /* Byte value: 0xcd */ + {{0x63, 0x90, 0xcb, 0x9d, 0xc9, 0xda, 0x89, 0xbf, }}, /* Byte value: 0xce */ + {{0x51, 0xd3, 0xfa, 0x8b, 0x3f, 0x9e, 0x25, 0x43, }}, /* Byte value: 0xcf */ + {{0xc8, 0xcf, 0xc4, 0x58, 0x5e, 0xd3, 0xf5, 0x76, }}, /* Byte value: 0xd0 */ + {{0x03, 0xc9, 0x08, 0xc7, 0x23, 0x67, 0x0a, 0x19, }}, /* Byte value: 0xd1 */ + {{0xed, 0x60, 0x9d, 0xe4, 0xdc, 0x11, 0x2b, 0x3f, }}, /* Byte value: 0xd2 */ + {{0x70, 0xa3, 0x02, 0x41, 0x78, 0x69, 0xe3, 0x97, }}, /* Byte value: 0xd3 */ + {{0x3c, 0x6f, 0xa0, 0xb7, 0xf9, 0xe0, 0x88, 0x37, }}, /* Byte value: 0xd4 */ + {{0x8e, 0xf0, 0x56, 0x79, 0x15, 0xcb, 0xa2, 0x80, }}, /* Byte value: 0xd5 */ + {{0xd9, 0x72, 0xbc, 0xbf, 0x6c, 0x9b, 0x93, 0xf1, }}, /* Byte value: 0xd6 */ + {{0x10, 0xfa, 0xc1, 0x1b, 0x92, 0xd4, 0x60, 0x31, }}, /* Byte value: 0xd7 */ + {{0x1a, 0x09, 0xf1, 0xcc, 0x58, 0x45, 0x5c, 0x67, }}, /* Byte value: 0xd8 */ + {{0x9d, 0xc3, 0x9f, 0xa5, 0xa4, 0x78, 0xc8, 0xa8, }}, /* Byte value: 0xd9 */ + {{0xee, 0xa9, 0x95, 0x23, 0xff, 0x76, 0x21, 0x26, }}, /* Byte value: 0xda */ + {{0xcb, 0x06, 0xcc, 0x9f, 0x7d, 0xb4, 0xff, 0x6f, }}, /* Byte value: 0xdb */ + {{0x97, 0x30, 0xaf, 0x72, 0x6e, 0xe9, 0xf4, 0xfe, }}, /* Byte value: 0xdc */ + {{0xc9, 0x88, 0x7d, 0xa4, 0xfe, 0x4f, 0xf3, 0xc0, }}, /* Byte value: 0xdd */ + {{0x79, 0x99, 0x3a, 0x51, 0x91, 0x9f, 0xd5, 0xd8, }}, /* Byte value: 0xde */ + {{0xb2, 0x9f, 0xf6, 0xce, 0xec, 0x2b, 0x2a, 0xb7, }}, /* Byte value: 0xdf */ + {{0x35, 0x55, 0x98, 0xa7, 0x10, 0x16, 0xbe, 0x78, }}, /* Byte value: 0xe0 */ + {{0x6c, 0xfb, 0xe3, 0xc0, 0x66, 0xe2, 0xab, 0xc2, }}, /* Byte value: 0xe1 */ + {{0x9c, 0x84, 0x26, 0x59, 0x04, 0xe4, 0xce, 0x1e, }}, /* Byte value: 0xe2 */ + {{0x1b, 0x4e, 0x48, 0x30, 0xf8, 0xd9, 0x5a, 0xd1, }}, /* Byte value: 0xe3 */ + {{0x05, 0x98, 0x18, 0x8a, 0x65, 0xa9, 0x1e, 0x2b, }}, /* Byte value: 0xe4 */ + {{0x50, 0x94, 0x43, 0x77, 0x9f, 0x02, 0x23, 0xf5, }}, /* Byte value: 0xe5 */ + {{0xf0, 0x7f, 0xc5, 0x99, 0x62, 0x06, 0x65, 0xdc, }}, /* Byte value: 0xe6 */ + {{0xd1, 0x0f, 0x3d, 0x53, 0x25, 0xf1, 0xa3, 0x08, }}, /* Byte value: 0xe7 */ + {{0x12, 0x74, 0x70, 0x20, 0x11, 0x2f, 0x6c, 0x9e, }}, /* Byte value: 0xe8 */ + {{0x87, 0xca, 0x6e, 0x69, 0xfc, 0x3d, 0x94, 0xcf, }}, /* Byte value: 0xe9 */ + {{0x08, 0x7d, 0x81, 0xec, 0x49, 0x6a, 0x30, 0xf9, }}, /* Byte value: 0xea */ + {{0x59, 0xae, 0x7b, 0x67, 0x76, 0xf4, 0x15, 0xba, }}, /* Byte value: 0xeb */ + {{0xfc, 0xdd, 0xe5, 0x03, 0xee, 0x59, 0x4d, 0xb8, }}, /* Byte value: 0xec */ + {{0x21, 0x70, 0xf8, 0xca, 0x47, 0xf7, 0xc6, 0xd4, }}, /* Byte value: 0xed */ + {{0x85, 0x44, 0xdf, 0x52, 0x7f, 0xc6, 0x98, 0x60, }}, /* Byte value: 0xee */ + {{0x55, 0x0c, 0x5b, 0xfd, 0xfa, 0xab, 0x3d, 0xde, }}, /* Byte value: 0xef */ + {{0x4e, 0x42, 0x13, 0xcd, 0x02, 0x72, 0x67, 0x0f, }}, /* Byte value: 0xf0 */ + {{0xec, 0x27, 0x24, 0x18, 0x7c, 0x8d, 0x2d, 0x89, }}, /* Byte value: 0xf1 */ + {{0xfb, 0xcb, 0x4c, 0xb2, 0x08, 0x0b, 0x5f, 0x3c, }}, /* Byte value: 0xf2 */ + {{0x36, 0x9c, 0x90, 0x60, 0x33, 0x71, 0xb4, 0x61, }}, /* Byte value: 0xf3 */ + {{0x75, 0x3b, 0x1a, 0xcb, 0x1d, 0xc0, 0xfd, 0xbc, }}, /* Byte value: 0xf4 */ + {{0x37, 0xdb, 0x29, 0x9c, 0x93, 0xed, 0xb2, 0xd7, }}, /* Byte value: 0xf5 */ + {{0x5c, 0x36, 0x63, 0xed, 0x13, 0x5d, 0x0b, 0x91, }}, /* Byte value: 0xf6 */ + {{0xf6, 0x2e, 0xd5, 0xd4, 0x24, 0xc8, 0x71, 0xee, }}, /* Byte value: 0xf7 */ + {{0xf4, 0xa0, 0x64, 0xef, 0xa7, 0x33, 0x7d, 0x41, }}, /* Byte value: 0xf8 */ + {{0xcd, 0x57, 0xdc, 0xd2, 0x3b, 0x7a, 0xeb, 0x5d, }}, /* Byte value: 0xf9 */ + {{0x6b, 0xed, 0x4a, 0x71, 0x80, 0xb0, 0xb9, 0x46, }}, /* Byte value: 0xfa */ + {{0xa2, 0x65, 0x37, 0xd5, 0x7e, 0xff, 0x4a, 0x86, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xaa, 0x18, 0xb6, 0x39, 0x37, 0x95, 0x7a, 0x7f, }}, /* Byte value: 0xfd */ + {{0x71, 0xe4, 0xbb, 0xbd, 0xd8, 0xf5, 0xe5, 0x21, }}, /* Byte value: 0xfe */ + {{0x42, 0xe0, 0x33, 0x57, 0x8e, 0x2d, 0x4f, 0x6b, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 4 */ + {{0xc2, 0x36, 0xbf, 0xb8, 0xb8, 0xed, 0xf8, 0xa5, }}, /* Byte value: 0x00 */ + {{0x95, 0x8b, 0xd1, 0x9a, 0x9a, 0x0a, 0x38, 0x2d, }}, /* Byte value: 0x01 */ + {{0xa6, 0x30, 0x54, 0xed, 0xed, 0x72, 0xdb, 0x32, }}, /* Byte value: 0x02 */ + {{0x27, 0xcf, 0x12, 0x53, 0x53, 0x58, 0x5c, 0x8f, }}, /* Byte value: 0x03 */ + {{0xe0, 0xe4, 0xf8, 0xe2, 0xe2, 0xbd, 0xfb, 0x0e, }}, /* Byte value: 0x04 */ + {{0x86, 0x51, 0x31, 0x0c, 0x0c, 0x4d, 0xfe, 0x30, }}, /* Byte value: 0x05 */ + {{0x06, 0x16, 0x66, 0x0e, 0x0e, 0xb1, 0x6a, 0x38, }}, /* Byte value: 0x06 */ + {{0x5d, 0x87, 0xc4, 0x30, 0x30, 0xf7, 0x7e, 0xc0, }}, /* Byte value: 0x07 */ + {{0x09, 0x31, 0x99, 0x15, 0x15, 0xa9, 0x8b, 0x54, }}, /* Byte value: 0x08 */ + {{0x78, 0xfb, 0xf4, 0xd8, 0xd8, 0xc0, 0x04, 0xe6, }}, /* Byte value: 0x09 */ + {{0xf4, 0x90, 0x6f, 0xc6, 0xc6, 0x9d, 0x44, 0x9e, }}, /* Byte value: 0x0a */ + {{0x16, 0xc7, 0xb5, 0x9f, 0x9f, 0x4f, 0x99, 0x39, }}, /* Byte value: 0x0b */ + {{0x19, 0xe0, 0x4a, 0x84, 0x84, 0x57, 0x78, 0x55, }}, /* Byte value: 0x0c */ + {{0xec, 0xc8, 0x34, 0xfe, 0xfe, 0x1c, 0x2f, 0x7e, }}, /* Byte value: 0x0d */ + {{0x69, 0x92, 0x36, 0xf5, 0xf5, 0xe8, 0xe4, 0x52, }}, /* Byte value: 0x0e */ + {{0x04, 0xa5, 0x44, 0xb5, 0xb5, 0xde, 0x4c, 0x91, }}, /* Byte value: 0x0f */ + {{0x8f, 0x60, 0xa8, 0x19, 0x19, 0xe4, 0x75, 0x64, }}, /* Byte value: 0x10 */ + {{0x30, 0xb0, 0xb6, 0x70, 0x70, 0xc1, 0xd6, 0x03, }}, /* Byte value: 0x11 */ + {{0x39, 0x81, 0x2f, 0x65, 0x65, 0x68, 0x5d, 0x57, }}, /* Byte value: 0x12 */ + {{0xe9, 0xd5, 0x61, 0xf7, 0xf7, 0x14, 0x70, 0x5a, }}, /* Byte value: 0x13 */ + {{0x03, 0x0b, 0x33, 0x07, 0x07, 0xb9, 0x35, 0x1c, }}, /* Byte value: 0x14 */ + {{0xcf, 0xa2, 0x62, 0x18, 0x18, 0x9a, 0x3f, 0x60, }}, /* Byte value: 0x15 */ + {{0x70, 0x72, 0x7c, 0x71, 0x71, 0xbf, 0x9c, 0x07, }}, /* Byte value: 0x16 */ + {{0x43, 0xc9, 0xf9, 0x06, 0x06, 0xc7, 0x7f, 0x18, }}, /* Byte value: 0x17 */ + {{0x55, 0x0e, 0x4c, 0x99, 0x99, 0x88, 0xe6, 0x21, }}, /* Byte value: 0x18 */ + {{0x2c, 0x4d, 0xa9, 0xfd, 0xfd, 0x9e, 0xf1, 0x72, }}, /* Byte value: 0x19 */ + {{0x12, 0x62, 0xf1, 0x2a, 0x2a, 0x91, 0xd5, 0xa8, }}, /* Byte value: 0x1a */ + {{0x8e, 0xd8, 0xb9, 0xa5, 0xa5, 0x32, 0x66, 0xd1, }}, /* Byte value: 0x1b */ + {{0xd5, 0x49, 0x1b, 0x9b, 0x9b, 0x74, 0x72, 0x29, }}, /* Byte value: 0x1c */ + {{0x3d, 0x24, 0x6b, 0xd0, 0xd0, 0xb6, 0x11, 0xc6, }}, /* Byte value: 0x1d */ + {{0xd2, 0xe7, 0x6c, 0x29, 0x29, 0x13, 0x0b, 0xa4, }}, /* Byte value: 0x1e */ + {{0x76, 0x64, 0x1a, 0x7f, 0x7f, 0x0e, 0xf6, 0x3f, }}, /* Byte value: 0x1f */ + {{0x18, 0x58, 0x5b, 0x38, 0x38, 0x81, 0x6b, 0xe0, }}, /* Byte value: 0x20 */ + {{0x35, 0xad, 0xe3, 0x79, 0x79, 0xc9, 0x89, 0x27, }}, /* Byte value: 0x21 */ + {{0x07, 0xae, 0x77, 0xb2, 0xb2, 0x67, 0x79, 0x8d, }}, /* Byte value: 0x22 */ + {{0xc0, 0x85, 0x9d, 0x03, 0x03, 0x82, 0xde, 0x0c, }}, /* Byte value: 0x23 */ + {{0xf7, 0x9b, 0x5c, 0xc1, 0xc1, 0x24, 0x71, 0x82, }}, /* Byte value: 0x24 */ + {{0xb8, 0x7e, 0x69, 0xdb, 0xdb, 0x42, 0xda, 0xea, }}, /* Byte value: 0x25 */ + {{0x72, 0xc1, 0x5e, 0xca, 0xca, 0xd0, 0xba, 0xae, }}, /* Byte value: 0x26 */ + {{0x11, 0x69, 0xc2, 0x2d, 0x2d, 0x28, 0xe0, 0xb4, }}, /* Byte value: 0x27 */ + {{0xb4, 0x52, 0xa5, 0xc7, 0xc7, 0xe3, 0x0e, 0x9a, }}, /* Byte value: 0x28 */ + {{0xff, 0x12, 0xd4, 0x68, 0x68, 0x5b, 0xe9, 0x63, }}, /* Byte value: 0x29 */ + {{0x1a, 0xeb, 0x79, 0x83, 0x83, 0xee, 0x4d, 0x49, }}, /* Byte value: 0x2a */ + {{0x48, 0x4b, 0x42, 0xa8, 0xa8, 0x01, 0xd2, 0xe5, }}, /* Byte value: 0x2b */ + {{0xaa, 0x1c, 0x98, 0xf1, 0xf1, 0xd3, 0x0f, 0x42, }}, /* Byte value: 0x2c */ + {{0x58, 0x9a, 0x91, 0x39, 0x39, 0xff, 0x21, 0xe4, }}, /* Byte value: 0x2d */ + {{0x93, 0x9d, 0xb7, 0x94, 0x94, 0xbb, 0x52, 0x15, }}, /* Byte value: 0x2e */ + {{0x21, 0xd9, 0x74, 0x5d, 0x5d, 0xe9, 0x36, 0xb7, }}, /* Byte value: 0x2f */ + {{0xdd, 0xc0, 0x93, 0x32, 0x32, 0x0b, 0xea, 0xc8, }}, /* Byte value: 0x30 */ + {{0x60, 0xa3, 0xaf, 0xe0, 0xe0, 0x41, 0x6f, 0x06, }}, /* Byte value: 0x31 */ + {{0x0c, 0x2c, 0xcc, 0x1c, 0x1c, 0xa1, 0xd4, 0x70, }}, /* Byte value: 0x32 */ + {{0xc4, 0x20, 0xd9, 0xb6, 0xb6, 0x5c, 0x92, 0x9d, }}, /* Byte value: 0x33 */ + {{0x9a, 0xac, 0x2e, 0x81, 0x81, 0x12, 0xd9, 0x41, }}, /* Byte value: 0x34 */ + {{0x5c, 0x3f, 0xd5, 0x8c, 0x8c, 0x21, 0x6d, 0x75, }}, /* Byte value: 0x35 */ + {{0x53, 0x18, 0x2a, 0x97, 0x97, 0x39, 0x8c, 0x19, }}, /* Byte value: 0x36 */ + {{0xcd, 0x11, 0x40, 0xa3, 0xa3, 0xf5, 0x19, 0xc9, }}, /* Byte value: 0x37 */ + {{0x32, 0x03, 0x94, 0xcb, 0xcb, 0xae, 0xf0, 0xaa, }}, /* Byte value: 0x38 */ + {{0x1b, 0x53, 0x68, 0x3f, 0x3f, 0x38, 0x5e, 0xfc, }}, /* Byte value: 0x39 */ + {{0x5a, 0x29, 0xb3, 0x82, 0x82, 0x90, 0x07, 0x4d, }}, /* Byte value: 0x3a */ + {{0xa1, 0x9e, 0x23, 0x5f, 0x5f, 0x15, 0xa2, 0xbf, }}, /* Byte value: 0x3b */ + {{0xe5, 0xf9, 0xad, 0xeb, 0xeb, 0xb5, 0xa4, 0x2a, }}, /* Byte value: 0x3c */ + {{0x3c, 0x9c, 0x7a, 0x6c, 0x6c, 0x60, 0x02, 0x73, }}, /* Byte value: 0x3d */ + {{0x97, 0x38, 0xf3, 0x21, 0x21, 0x65, 0x1e, 0x84, }}, /* Byte value: 0x3e */ + {{0xce, 0x1a, 0x73, 0xa4, 0xa4, 0x4c, 0x2c, 0xd5, }}, /* Byte value: 0x3f */ + {{0x6d, 0x37, 0x72, 0x40, 0x40, 0x36, 0xa8, 0xc3, }}, /* Byte value: 0x40 */ + {{0x62, 0x10, 0x8d, 0x5b, 0x5b, 0x2e, 0x49, 0xaf, }}, /* Byte value: 0x41 */ + {{0xf5, 0x28, 0x7e, 0x7a, 0x7a, 0x4b, 0x57, 0x2b, }}, /* Byte value: 0x42 */ + {{0xb7, 0x59, 0x96, 0xc0, 0xc0, 0x5a, 0x3b, 0x86, }}, /* Byte value: 0x43 */ + {{0xe2, 0x57, 0xda, 0x59, 0x59, 0xd2, 0xdd, 0xa7, }}, /* Byte value: 0x44 */ + {{0x41, 0x7a, 0xdb, 0xbd, 0xbd, 0xa8, 0x59, 0xb1, }}, /* Byte value: 0x45 */ + {{0x71, 0xca, 0x6d, 0xcd, 0xcd, 0x69, 0x8f, 0xb2, }}, /* Byte value: 0x46 */ + {{0xf9, 0x04, 0xb2, 0x66, 0x66, 0xea, 0x83, 0x5b, }}, /* Byte value: 0x47 */ + {{0xea, 0xde, 0x52, 0xf0, 0xf0, 0xad, 0x45, 0x46, }}, /* Byte value: 0x48 */ + {{0xae, 0xb9, 0xdc, 0x44, 0x44, 0x0d, 0x43, 0xd3, }}, /* Byte value: 0x49 */ + {{0xe4, 0x41, 0xbc, 0x57, 0x57, 0x63, 0xb7, 0x9f, }}, /* Byte value: 0x4a */ + {{0x0b, 0x82, 0xbb, 0xae, 0xae, 0xc6, 0xad, 0xfd, }}, /* Byte value: 0x4b */ + {{0xde, 0xcb, 0xa0, 0x35, 0x35, 0xb2, 0xdf, 0xd4, }}, /* Byte value: 0x4c */ + {{0xf0, 0x35, 0x2b, 0x73, 0x73, 0x43, 0x08, 0x0f, }}, /* Byte value: 0x4d */ + {{0xd4, 0xf1, 0x0a, 0x27, 0x27, 0xa2, 0x61, 0x9c, }}, /* Byte value: 0x4e */ + {{0xb5, 0xea, 0xb4, 0x7b, 0x7b, 0x35, 0x1d, 0x2f, }}, /* Byte value: 0x4f */ + {{0xa4, 0x83, 0x76, 0x56, 0x56, 0x1d, 0xfd, 0x9b, }}, /* Byte value: 0x50 */ + {{0xba, 0xcd, 0x4b, 0x60, 0x60, 0x2d, 0xfc, 0x43, }}, /* Byte value: 0x51 */ + {{0xe8, 0x6d, 0x70, 0x4b, 0x4b, 0xc2, 0x63, 0xef, }}, /* Byte value: 0x52 */ + {{0x0e, 0x9f, 0xee, 0xa7, 0xa7, 0xce, 0xf2, 0xd9, }}, /* Byte value: 0x53 */ + {{0x9c, 0xba, 0x48, 0x8f, 0x8f, 0xa3, 0xb3, 0x79, }}, /* Byte value: 0x54 */ + {{0x31, 0x08, 0xa7, 0xcc, 0xcc, 0x17, 0xc5, 0xb6, }}, /* Byte value: 0x55 */ + {{0x79, 0x43, 0xe5, 0x64, 0x64, 0x16, 0x17, 0x53, }}, /* Byte value: 0x56 */ + {{0xfc, 0x19, 0xe7, 0x6f, 0x6f, 0xe2, 0xdc, 0x7f, }}, /* Byte value: 0x57 */ + {{0x4d, 0x56, 0x17, 0xa1, 0xa1, 0x09, 0x8d, 0xc1, }}, /* Byte value: 0x58 */ + {{0xdb, 0xd6, 0xf5, 0x3c, 0x3c, 0xba, 0x80, 0xf0, }}, /* Byte value: 0x59 */ + {{0x75, 0x6f, 0x29, 0x78, 0x78, 0xb7, 0xc3, 0x23, }}, /* Byte value: 0x5a */ + {{0x68, 0x2a, 0x27, 0x49, 0x49, 0x3e, 0xf7, 0xe7, }}, /* Byte value: 0x5b */ + {{0x15, 0xcc, 0x86, 0x98, 0x98, 0xf6, 0xac, 0x25, }}, /* Byte value: 0x5c */ + {{0xa9, 0x17, 0xab, 0xf6, 0xf6, 0x6a, 0x3a, 0x5e, }}, /* Byte value: 0x5d */ + {{0x01, 0xb8, 0x11, 0xbc, 0xbc, 0xd6, 0x13, 0xb5, }}, /* Byte value: 0x5e */ + {{0x23, 0x6a, 0x56, 0xe6, 0xe6, 0x86, 0x10, 0x1e, }}, /* Byte value: 0x5f */ + {{0xb2, 0x44, 0xc3, 0xc9, 0xc9, 0x52, 0x64, 0xa2, }}, /* Byte value: 0x60 */ + {{0x6e, 0x3c, 0x41, 0x47, 0x47, 0x8f, 0x9d, 0xdf, }}, /* Byte value: 0x61 */ + {{0xf2, 0x86, 0x09, 0xc8, 0xc8, 0x2c, 0x2e, 0xa6, }}, /* Byte value: 0x62 */ + {{0x3b, 0x32, 0x0d, 0xde, 0xde, 0x07, 0x7b, 0xfe, }}, /* Byte value: 0x63 */ + {{0x52, 0xa0, 0x3b, 0x2b, 0x2b, 0xef, 0x9f, 0xac, }}, /* Byte value: 0x64 */ + {{0x65, 0xbe, 0xfa, 0xe9, 0xe9, 0x49, 0x30, 0x22, }}, /* Byte value: 0x65 */ + {{0x4b, 0x40, 0x71, 0xaf, 0xaf, 0xb8, 0xe7, 0xf9, }}, /* Byte value: 0x66 */ + {{0x38, 0x39, 0x3e, 0xd9, 0xd9, 0xbe, 0x4e, 0xe2, }}, /* Byte value: 0x67 */ + {{0x2a, 0x5b, 0xcf, 0xf3, 0xf3, 0x2f, 0x9b, 0x4a, }}, /* Byte value: 0x68 */ + {{0x91, 0x2e, 0x95, 0x2f, 0x2f, 0xd4, 0x74, 0xbc, }}, /* Byte value: 0x69 */ + {{0xd6, 0x42, 0x28, 0x9c, 0x9c, 0xcd, 0x47, 0x35, }}, /* Byte value: 0x6a */ + {{0xfd, 0xa1, 0xf6, 0xd3, 0xd3, 0x34, 0xcf, 0xca, }}, /* Byte value: 0x6b */ + {{0xf8, 0xbc, 0xa3, 0xda, 0xda, 0x3c, 0x90, 0xee, }}, /* Byte value: 0x6c */ + {{0x8c, 0x6b, 0x9b, 0x1e, 0x1e, 0x5d, 0x40, 0x78, }}, /* Byte value: 0x6d */ + {{0x50, 0x13, 0x19, 0x90, 0x90, 0x80, 0xb9, 0x05, }}, /* Byte value: 0x6e */ + {{0x7f, 0x55, 0x83, 0x6a, 0x6a, 0xa7, 0x7d, 0x6b, }}, /* Byte value: 0x6f */ + {{0x59, 0x22, 0x80, 0x85, 0x85, 0x29, 0x32, 0x51, }}, /* Byte value: 0x70 */ + {{0x08, 0x89, 0x88, 0xa9, 0xa9, 0x7f, 0x98, 0xe1, }}, /* Byte value: 0x71 */ + {{0xd9, 0x65, 0xd7, 0x87, 0x87, 0xd5, 0xa6, 0x59, }}, /* Byte value: 0x72 */ + {{0xa2, 0x95, 0x10, 0x58, 0x58, 0xac, 0x97, 0xa3, }}, /* Byte value: 0x73 */ + {{0xfb, 0xb7, 0x90, 0xdd, 0xdd, 0x85, 0xa5, 0xf2, }}, /* Byte value: 0x74 */ + {{0x1c, 0xfd, 0x1f, 0x8d, 0x8d, 0x5f, 0x27, 0x71, }}, /* Byte value: 0x75 */ + {{0x29, 0x50, 0xfc, 0xf4, 0xf4, 0x96, 0xae, 0x56, }}, /* Byte value: 0x76 */ + {{0xd3, 0x5f, 0x7d, 0x95, 0x95, 0xc5, 0x18, 0x11, }}, /* Byte value: 0x77 */ + {{0x6f, 0x84, 0x50, 0xfb, 0xfb, 0x59, 0x8e, 0x6a, }}, /* Byte value: 0x78 */ + {{0x47, 0x6c, 0xbd, 0xb3, 0xb3, 0x19, 0x33, 0x89, }}, /* Byte value: 0x79 */ + {{0x54, 0xb6, 0x5d, 0x25, 0x25, 0x5e, 0xf5, 0x94, }}, /* Byte value: 0x7a */ + {{0x9f, 0xb1, 0x7b, 0x88, 0x88, 0x1a, 0x86, 0x65, }}, /* Byte value: 0x7b */ + {{0x17, 0x7f, 0xa4, 0x23, 0x23, 0x99, 0x8a, 0x8c, }}, /* Byte value: 0x7c */ + {{0xe1, 0x5c, 0xe9, 0x5e, 0x5e, 0x6b, 0xe8, 0xbb, }}, /* Byte value: 0x7d */ + {{0x7c, 0x5e, 0xb0, 0x6d, 0x6d, 0x1e, 0x48, 0x77, }}, /* Byte value: 0x7e */ + {{0x46, 0xd4, 0xac, 0x0f, 0x0f, 0xcf, 0x20, 0x3c, }}, /* Byte value: 0x7f */ + {{0xbc, 0xdb, 0x2d, 0x6e, 0x6e, 0x9c, 0x96, 0x7b, }}, /* Byte value: 0x80 */ + {{0xc5, 0x98, 0xc8, 0x0a, 0x0a, 0x8a, 0x81, 0x28, }}, /* Byte value: 0x81 */ + {{0x22, 0xd2, 0x47, 0x5a, 0x5a, 0x50, 0x03, 0xab, }}, /* Byte value: 0x82 */ + {{0xbe, 0x68, 0x0f, 0xd5, 0xd5, 0xf3, 0xb0, 0xd2, }}, /* Byte value: 0x83 */ + {{0x96, 0x80, 0xe2, 0x9d, 0x9d, 0xb3, 0x0d, 0x31, }}, /* Byte value: 0x84 */ + {{0x7e, 0xed, 0x92, 0xd6, 0xd6, 0x71, 0x6e, 0xde, }}, /* Byte value: 0x85 */ + {{0x1d, 0x45, 0x0e, 0x31, 0x31, 0x89, 0x34, 0xc4, }}, /* Byte value: 0x86 */ + {{0xb9, 0xc6, 0x78, 0x67, 0x67, 0x94, 0xc9, 0x5f, }}, /* Byte value: 0x87 */ + {{0x9d, 0x02, 0x59, 0x33, 0x33, 0x75, 0xa0, 0xcc, }}, /* Byte value: 0x88 */ + {{0xad, 0xb2, 0xef, 0x43, 0x43, 0xb4, 0x76, 0xcf, }}, /* Byte value: 0x89 */ + {{0x6c, 0x8f, 0x63, 0xfc, 0xfc, 0xe0, 0xbb, 0x76, }}, /* Byte value: 0x8a */ + {{0x85, 0x5a, 0x02, 0x0b, 0x0b, 0xf4, 0xcb, 0x2c, }}, /* Byte value: 0x8b */ + {{0xd1, 0xec, 0x5f, 0x2e, 0x2e, 0xaa, 0x3e, 0xb8, }}, /* Byte value: 0x8c */ + {{0x1e, 0x4e, 0x3d, 0x36, 0x36, 0x30, 0x01, 0xd8, }}, /* Byte value: 0x8d */ + {{0xa5, 0x3b, 0x67, 0xea, 0xea, 0xcb, 0xee, 0x2e, }}, /* Byte value: 0x8e */ + {{0xe6, 0xf2, 0x9e, 0xec, 0xec, 0x0c, 0x91, 0x36, }}, /* Byte value: 0x8f */ + {{0x2e, 0xfe, 0x8b, 0x46, 0x46, 0xf1, 0xd7, 0xdb, }}, /* Byte value: 0x90 */ + {{0x5f, 0x34, 0xe6, 0x8b, 0x8b, 0x98, 0x58, 0x69, }}, /* Byte value: 0x91 */ + {{0x61, 0x1b, 0xbe, 0x5c, 0x5c, 0x97, 0x7c, 0xb3, }}, /* Byte value: 0x92 */ + {{0x83, 0x4c, 0x64, 0x05, 0x05, 0x45, 0xa1, 0x14, }}, /* Byte value: 0x93 */ + {{0x44, 0x67, 0x8e, 0xb4, 0xb4, 0xa0, 0x06, 0x95, }}, /* Byte value: 0x94 */ + {{0xb1, 0x4f, 0xf0, 0xce, 0xce, 0xeb, 0x51, 0xbe, }}, /* Byte value: 0x95 */ + {{0xef, 0xc3, 0x07, 0xf9, 0xf9, 0xa5, 0x1a, 0x62, }}, /* Byte value: 0x96 */ + {{0x82, 0xf4, 0x75, 0xb9, 0xb9, 0x93, 0xb2, 0xa1, }}, /* Byte value: 0x97 */ + {{0x36, 0xa6, 0xd0, 0x7e, 0x7e, 0x70, 0xbc, 0x3b, }}, /* Byte value: 0x98 */ + {{0xa3, 0x2d, 0x01, 0xe4, 0xe4, 0x7a, 0x84, 0x16, }}, /* Byte value: 0x99 */ + {{0xaf, 0x01, 0xcd, 0xf8, 0xf8, 0xdb, 0x50, 0x66, }}, /* Byte value: 0x9a */ + {{0x88, 0xce, 0xdf, 0xab, 0xab, 0x83, 0x0c, 0xe9, }}, /* Byte value: 0x9b */ + {{0x89, 0x76, 0xce, 0x17, 0x17, 0x55, 0x1f, 0x5c, }}, /* Byte value: 0x9c */ + {{0x0f, 0x27, 0xff, 0x1b, 0x1b, 0x18, 0xe1, 0x6c, }}, /* Byte value: 0x9d */ + {{0x1f, 0xf6, 0x2c, 0x8a, 0x8a, 0xe6, 0x12, 0x6d, }}, /* Byte value: 0x9e */ + {{0x42, 0x71, 0xe8, 0xba, 0xba, 0x11, 0x6c, 0xad, }}, /* Byte value: 0x9f */ + {{0xf6, 0x23, 0x4d, 0x7d, 0x7d, 0xf2, 0x62, 0x37, }}, /* Byte value: 0xa0 */ + {{0xdf, 0x73, 0xb1, 0x89, 0x89, 0x64, 0xcc, 0x61, }}, /* Byte value: 0xa1 */ + {{0x3a, 0x8a, 0x1c, 0x62, 0x62, 0xd1, 0x68, 0x4b, }}, /* Byte value: 0xa2 */ + {{0xc1, 0x3d, 0x8c, 0xbf, 0xbf, 0x54, 0xcd, 0xb9, }}, /* Byte value: 0xa3 */ + {{0x28, 0xe8, 0xed, 0x48, 0x48, 0x40, 0xbd, 0xe3, }}, /* Byte value: 0xa4 */ + {{0xf1, 0x8d, 0x3a, 0xcf, 0xcf, 0x95, 0x1b, 0xba, }}, /* Byte value: 0xa5 */ + {{0xcb, 0x07, 0x26, 0xad, 0xad, 0x44, 0x73, 0xf1, }}, /* Byte value: 0xa6 */ + {{0x92, 0x25, 0xa6, 0x28, 0x28, 0x6d, 0x41, 0xa0, }}, /* Byte value: 0xa7 */ + {{0x87, 0xe9, 0x20, 0xb0, 0xb0, 0x9b, 0xed, 0x85, }}, /* Byte value: 0xa8 */ + {{0xe7, 0x4a, 0x8f, 0x50, 0x50, 0xda, 0x82, 0x83, }}, /* Byte value: 0xa9 */ + {{0x3e, 0x2f, 0x58, 0xd7, 0xd7, 0x0f, 0x24, 0xda, }}, /* Byte value: 0xaa */ + {{0xfa, 0x0f, 0x81, 0x61, 0x61, 0x53, 0xb6, 0x47, }}, /* Byte value: 0xab */ + {{0x0d, 0x94, 0xdd, 0xa0, 0xa0, 0x77, 0xc7, 0xc5, }}, /* Byte value: 0xac */ + {{0x51, 0xab, 0x08, 0x2c, 0x2c, 0x56, 0xaa, 0xb0, }}, /* Byte value: 0xad */ + {{0xb6, 0xe1, 0x87, 0x7c, 0x7c, 0x8c, 0x28, 0x33, }}, /* Byte value: 0xae */ + {{0x7b, 0xf0, 0xc7, 0xdf, 0xdf, 0x79, 0x31, 0xfa, }}, /* Byte value: 0xaf */ + {{0x74, 0xd7, 0x38, 0xc4, 0xc4, 0x61, 0xd0, 0x96, }}, /* Byte value: 0xb0 */ + {{0x3f, 0x97, 0x49, 0x6b, 0x6b, 0xd9, 0x37, 0x6f, }}, /* Byte value: 0xb1 */ + {{0x2f, 0x46, 0x9a, 0xfa, 0xfa, 0x27, 0xc4, 0x6e, }}, /* Byte value: 0xb2 */ + {{0x7d, 0xe6, 0xa1, 0xd1, 0xd1, 0xc8, 0x5b, 0xc2, }}, /* Byte value: 0xb3 */ + {{0xbb, 0x75, 0x5a, 0xdc, 0xdc, 0xfb, 0xef, 0xf6, }}, /* Byte value: 0xb4 */ + {{0x49, 0xf3, 0x53, 0x14, 0x14, 0xd7, 0xc1, 0x50, }}, /* Byte value: 0xb5 */ + {{0x2b, 0xe3, 0xde, 0x4f, 0x4f, 0xf9, 0x88, 0xff, }}, /* Byte value: 0xb6 */ + {{0x99, 0xa7, 0x1d, 0x86, 0x86, 0xab, 0xec, 0x5d, }}, /* Byte value: 0xb7 */ + {{0x02, 0xb3, 0x22, 0xbb, 0xbb, 0x6f, 0x26, 0xa9, }}, /* Byte value: 0xb8 */ + {{0x37, 0x1e, 0xc1, 0xc2, 0xc2, 0xa6, 0xaf, 0x8e, }}, /* Byte value: 0xb9 */ + {{0xb3, 0xfc, 0xd2, 0x75, 0x75, 0x84, 0x77, 0x17, }}, /* Byte value: 0xba */ + {{0x73, 0x79, 0x4f, 0x76, 0x76, 0x06, 0xa9, 0x1b, }}, /* Byte value: 0xbb */ + {{0x64, 0x06, 0xeb, 0x55, 0x55, 0x9f, 0x23, 0x97, }}, /* Byte value: 0xbc */ + {{0xdc, 0x78, 0x82, 0x8e, 0x8e, 0xdd, 0xf9, 0x7d, }}, /* Byte value: 0xbd */ + {{0xd8, 0xdd, 0xc6, 0x3b, 0x3b, 0x03, 0xb5, 0xec, }}, /* Byte value: 0xbe */ + {{0xc9, 0xb4, 0x04, 0x16, 0x16, 0x2b, 0x55, 0x58, }}, /* Byte value: 0xbf */ + {{0xab, 0xa4, 0x89, 0x4d, 0x4d, 0x05, 0x1c, 0xf7, }}, /* Byte value: 0xc0 */ + {{0x33, 0xbb, 0x85, 0x77, 0x77, 0x78, 0xe3, 0x1f, }}, /* Byte value: 0xc1 */ + {{0x6b, 0x21, 0x14, 0x4e, 0x4e, 0x87, 0xc2, 0xfb, }}, /* Byte value: 0xc2 */ + {{0xcc, 0xa9, 0x51, 0x1f, 0x1f, 0x23, 0x0a, 0x7c, }}, /* Byte value: 0xc3 */ + {{0x90, 0x96, 0x84, 0x93, 0x93, 0x02, 0x67, 0x09, }}, /* Byte value: 0xc4 */ + {{0xd0, 0x54, 0x4e, 0x92, 0x92, 0x7c, 0x2d, 0x0d, }}, /* Byte value: 0xc5 */ + {{0xac, 0x0a, 0xfe, 0xff, 0xff, 0x62, 0x65, 0x7a, }}, /* Byte value: 0xc6 */ + {{0xbf, 0xd0, 0x1e, 0x69, 0x69, 0x25, 0xa3, 0x67, }}, /* Byte value: 0xc7 */ + {{0xda, 0x6e, 0xe4, 0x80, 0x80, 0x6c, 0x93, 0x45, }}, /* Byte value: 0xc8 */ + {{0xa7, 0x88, 0x45, 0x51, 0x51, 0xa4, 0xc8, 0x87, }}, /* Byte value: 0xc9 */ + {{0x5e, 0x8c, 0xf7, 0x37, 0x37, 0x4e, 0x4b, 0xdc, }}, /* Byte value: 0xca */ + {{0x98, 0x1f, 0x0c, 0x3a, 0x3a, 0x7d, 0xff, 0xe8, }}, /* Byte value: 0xcb */ + {{0x7a, 0x48, 0xd6, 0x63, 0x63, 0xaf, 0x22, 0x4f, }}, /* Byte value: 0xcc */ + {{0x13, 0xda, 0xe0, 0x96, 0x96, 0x47, 0xc6, 0x1d, }}, /* Byte value: 0xcd */ + {{0x6a, 0x99, 0x05, 0xf2, 0xf2, 0x51, 0xd1, 0x4e, }}, /* Byte value: 0xce */ + {{0x40, 0xc2, 0xca, 0x01, 0x01, 0x7e, 0x4a, 0x04, }}, /* Byte value: 0xcf */ + {{0xa8, 0xaf, 0xba, 0x4a, 0x4a, 0xbc, 0x29, 0xeb, }}, /* Byte value: 0xd0 */ + {{0x5b, 0x91, 0xa2, 0x3e, 0x3e, 0x46, 0x14, 0xf8, }}, /* Byte value: 0xd1 */ + {{0xeb, 0x66, 0x43, 0x4c, 0x4c, 0x7b, 0x56, 0xf3, }}, /* Byte value: 0xd2 */ + {{0x66, 0xb5, 0xc9, 0xee, 0xee, 0xf0, 0x05, 0x3e, }}, /* Byte value: 0xd3 */ + {{0x56, 0x05, 0x7f, 0x9e, 0x9e, 0x31, 0xd3, 0x3d, }}, /* Byte value: 0xd4 */ + {{0x81, 0xff, 0x46, 0xbe, 0xbe, 0x2a, 0x87, 0xbd, }}, /* Byte value: 0xd5 */ + {{0x77, 0xdc, 0x0b, 0xc3, 0xc3, 0xd8, 0xe5, 0x8a, }}, /* Byte value: 0xd6 */ + {{0x57, 0xbd, 0x6e, 0x22, 0x22, 0xe7, 0xc0, 0x88, }}, /* Byte value: 0xd7 */ + {{0x4e, 0x5d, 0x24, 0xa6, 0xa6, 0xb0, 0xb8, 0xdd, }}, /* Byte value: 0xd8 */ + {{0x8d, 0xd3, 0x8a, 0xa2, 0xa2, 0x8b, 0x53, 0xcd, }}, /* Byte value: 0xd9 */ + {{0xb0, 0xf7, 0xe1, 0x72, 0x72, 0x3d, 0x42, 0x0b, }}, /* Byte value: 0xda */ + {{0xf3, 0x3e, 0x18, 0x74, 0x74, 0xfa, 0x3d, 0x13, }}, /* Byte value: 0xdb */ + {{0x94, 0x33, 0xc0, 0x26, 0x26, 0xdc, 0x2b, 0x98, }}, /* Byte value: 0xdc */ + {{0x20, 0x61, 0x65, 0xe1, 0xe1, 0x3f, 0x25, 0x02, }}, /* Byte value: 0xdd */ + {{0x24, 0xc4, 0x21, 0x54, 0x54, 0xe1, 0x69, 0x93, }}, /* Byte value: 0xde */ + {{0xd7, 0xfa, 0x39, 0x20, 0x20, 0x1b, 0x54, 0x80, }}, /* Byte value: 0xdf */ + {{0x14, 0x74, 0x97, 0x24, 0x24, 0x20, 0xbf, 0x90, }}, /* Byte value: 0xe0 */ + {{0x9e, 0x09, 0x6a, 0x34, 0x34, 0xcc, 0x95, 0xd0, }}, /* Byte value: 0xe1 */ + {{0x05, 0x1d, 0x55, 0x09, 0x09, 0x08, 0x5f, 0x24, }}, /* Byte value: 0xe2 */ + {{0xc6, 0x93, 0xfb, 0x0d, 0x0d, 0x33, 0xb4, 0x34, }}, /* Byte value: 0xe3 */ + {{0xed, 0x70, 0x25, 0x42, 0x42, 0xca, 0x3c, 0xcb, }}, /* Byte value: 0xe4 */ + {{0xc8, 0x0c, 0x15, 0xaa, 0xaa, 0xfd, 0x46, 0xed, }}, /* Byte value: 0xe5 */ + {{0x9b, 0x14, 0x3f, 0x3d, 0x3d, 0xc4, 0xca, 0xf4, }}, /* Byte value: 0xe6 */ + {{0xbd, 0x63, 0x3c, 0xd2, 0xd2, 0x4a, 0x85, 0xce, }}, /* Byte value: 0xe7 */ + {{0x84, 0xe2, 0x13, 0xb7, 0xb7, 0x22, 0xd8, 0x99, }}, /* Byte value: 0xe8 */ + {{0xc3, 0x8e, 0xae, 0x04, 0x04, 0x3b, 0xeb, 0x10, }}, /* Byte value: 0xe9 */ + {{0xca, 0xbf, 0x37, 0x11, 0x11, 0x92, 0x60, 0x44, }}, /* Byte value: 0xea */ + {{0x8a, 0x7d, 0xfd, 0x10, 0x10, 0xec, 0x2a, 0x40, }}, /* Byte value: 0xeb */ + {{0x34, 0x15, 0xf2, 0xc5, 0xc5, 0x1f, 0x9a, 0x92, }}, /* Byte value: 0xec */ + {{0x26, 0x77, 0x03, 0xef, 0xef, 0x8e, 0x4f, 0x3a, }}, /* Byte value: 0xed */ + {{0x10, 0xd1, 0xd3, 0x91, 0x91, 0xfe, 0xf3, 0x01, }}, /* Byte value: 0xee */ + {{0x25, 0x7c, 0x30, 0xe8, 0xe8, 0x37, 0x7a, 0x26, }}, /* Byte value: 0xef */ + {{0xe3, 0xef, 0xcb, 0xe5, 0xe5, 0x04, 0xce, 0x12, }}, /* Byte value: 0xf0 */ + {{0x63, 0xa8, 0x9c, 0xe7, 0xe7, 0xf8, 0x5a, 0x1a, }}, /* Byte value: 0xf1 */ + {{0x0a, 0x3a, 0xaa, 0x12, 0x12, 0x10, 0xbe, 0x48, }}, /* Byte value: 0xf2 */ + {{0x4f, 0xe5, 0x35, 0x1a, 0x1a, 0x66, 0xab, 0x68, }}, /* Byte value: 0xf3 */ + {{0x8b, 0xc5, 0xec, 0xac, 0xac, 0x3a, 0x39, 0xf5, }}, /* Byte value: 0xf4 */ + {{0xc7, 0x2b, 0xea, 0xb1, 0xb1, 0xe5, 0xa7, 0x81, }}, /* Byte value: 0xf5 */ + {{0x67, 0x0d, 0xd8, 0x52, 0x52, 0x26, 0x16, 0x8b, }}, /* Byte value: 0xf6 */ + {{0x2d, 0xf5, 0xb8, 0x41, 0x41, 0x48, 0xe2, 0xc7, }}, /* Byte value: 0xf7 */ + {{0xfe, 0xaa, 0xc5, 0xd4, 0xd4, 0x8d, 0xfa, 0xd6, }}, /* Byte value: 0xf8 */ + {{0x45, 0xdf, 0x9f, 0x08, 0x08, 0x76, 0x15, 0x20, }}, /* Byte value: 0xf9 */ + {{0xa0, 0x26, 0x32, 0xe3, 0xe3, 0xc3, 0xb1, 0x0a, }}, /* Byte value: 0xfa */ + {{0x80, 0x47, 0x57, 0x02, 0x02, 0xfc, 0x94, 0x08, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x4a, 0xf8, 0x60, 0x13, 0x13, 0x6e, 0xf4, 0x4c, }}, /* Byte value: 0xfd */ + {{0xee, 0x7b, 0x16, 0x45, 0x45, 0x73, 0x09, 0xd7, }}, /* Byte value: 0xfe */ + {{0x4c, 0xee, 0x06, 0x1d, 0x1d, 0xdf, 0x9e, 0x74, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 5 */ + {{0xd8, 0xca, 0x20, 0x18, 0xa6, 0x5b, 0x9c, 0xaf, }}, /* Byte value: 0x00 */ + {{0x69, 0x10, 0x51, 0x4c, 0xc5, 0x06, 0x68, 0x18, }}, /* Byte value: 0x01 */ + {{0xc0, 0xd0, 0x1b, 0x9a, 0xb0, 0x2e, 0xcd, 0xb8, }}, /* Byte value: 0x02 */ + {{0xba, 0xff, 0xe6, 0xab, 0xa2, 0x89, 0xd9, 0x61, }}, /* Byte value: 0x03 */ + {{0x16, 0x4a, 0xed, 0x3d, 0x41, 0x6b, 0x5a, 0x6f, }}, /* Byte value: 0x04 */ + {{0x87, 0x09, 0x79, 0x52, 0xab, 0x3b, 0xd3, 0xec, }}, /* Byte value: 0x05 */ + {{0x58, 0xeb, 0x32, 0xf4, 0xc7, 0x6f, 0xab, 0x7f, }}, /* Byte value: 0x06 */ + {{0x59, 0x24, 0x27, 0x8b, 0xe9, 0xec, 0xca, 0x36, }}, /* Byte value: 0x07 */ + {{0xc4, 0x6a, 0x4f, 0xa5, 0x08, 0x67, 0x8a, 0x5f, }}, /* Byte value: 0x08 */ + {{0x6a, 0x82, 0x6e, 0xcd, 0xb7, 0x40, 0xcb, 0xc3, }}, /* Byte value: 0x09 */ + {{0x05, 0x75, 0x41, 0x40, 0x96, 0xca, 0x26, 0xae, }}, /* Byte value: 0x0a */ + {{0x9a, 0x66, 0x03, 0x90, 0x2b, 0x84, 0xa4, 0x55, }}, /* Byte value: 0x0b */ + {{0x06, 0xe7, 0x7e, 0xc1, 0xe4, 0x8c, 0x85, 0x75, }}, /* Byte value: 0x0c */ + {{0xa6, 0x5f, 0x89, 0x16, 0x0c, 0xb5, 0xcf, 0x91, }}, /* Byte value: 0x0d */ + {{0x0d, 0xc2, 0xe9, 0x3e, 0x25, 0x58, 0xa8, 0xa3, }}, /* Byte value: 0x0e */ + {{0xd1, 0xb2, 0x9d, 0x19, 0x3b, 0x4a, 0x73, 0xeb, }}, /* Byte value: 0x0f */ + {{0x43, 0x63, 0x36, 0xf7, 0xa3, 0x5c, 0x59, 0xb3, }}, /* Byte value: 0x10 */ + {{0x85, 0x54, 0x53, 0xac, 0xf7, 0xfe, 0x11, 0x7e, }}, /* Byte value: 0x11 */ + {{0x41, 0x3e, 0x1c, 0x09, 0xff, 0x99, 0x9b, 0x21, }}, /* Byte value: 0x12 */ + {{0xd2, 0x20, 0xa2, 0x98, 0x49, 0x0c, 0xd0, 0x30, }}, /* Byte value: 0x13 */ + {{0x2c, 0x94, 0x19, 0x7a, 0x82, 0xd6, 0xb4, 0xde, }}, /* Byte value: 0x14 */ + {{0xcd, 0x12, 0xf2, 0xa4, 0x95, 0x76, 0x65, 0x1b, }}, /* Byte value: 0x15 */ + {{0x0b, 0x25, 0x97, 0xff, 0xc1, 0xd4, 0x2d, 0xd6, }}, /* Byte value: 0x16 */ + {{0xa2, 0xe5, 0xdd, 0x29, 0xb4, 0xfc, 0x88, 0x76, }}, /* Byte value: 0x17 */ + {{0x38, 0x83, 0xde, 0xb9, 0x9f, 0x78, 0x2c, 0x23, }}, /* Byte value: 0x18 */ + {{0xf7, 0xcc, 0x06, 0xe3, 0x56, 0xcb, 0x8b, 0xaa, }}, /* Byte value: 0x19 */ + {{0x4b, 0xd4, 0x9e, 0x89, 0x10, 0xce, 0xd7, 0xbe, }}, /* Byte value: 0x1a */ + {{0xe6, 0xae, 0x80, 0x60, 0xdd, 0xaf, 0x35, 0xf9, }}, /* Byte value: 0x1b */ + {{0xe7, 0x61, 0x95, 0x1f, 0xf3, 0x2c, 0x54, 0xb0, }}, /* Byte value: 0x1c */ + {{0x90, 0x8c, 0x81, 0x10, 0xc4, 0xd3, 0xe8, 0xca, }}, /* Byte value: 0x1d */ + {{0x1a, 0x47, 0x11, 0x7c, 0x4a, 0xb0, 0x93, 0x85, }}, /* Byte value: 0x1e */ + {{0x53, 0xce, 0xa5, 0x0b, 0x06, 0xbb, 0x86, 0xa9, }}, /* Byte value: 0x1f */ + {{0xa3, 0x2a, 0xc8, 0x56, 0x9a, 0x7f, 0xe9, 0x3f, }}, /* Byte value: 0x20 */ + {{0xf1, 0x2b, 0x78, 0x22, 0xb2, 0x47, 0x0e, 0xdf, }}, /* Byte value: 0x21 */ + {{0xfd, 0x26, 0x84, 0x63, 0xb9, 0x9c, 0xc7, 0x35, }}, /* Byte value: 0x22 */ + {{0x51, 0x93, 0x8f, 0xf5, 0x5a, 0x7e, 0x44, 0x3b, }}, /* Byte value: 0x23 */ + {{0x29, 0xe1, 0x58, 0x3a, 0x14, 0x1c, 0x92, 0x70, }}, /* Byte value: 0x24 */ + {{0x3b, 0x11, 0xe1, 0x38, 0xed, 0x3e, 0x8f, 0xf8, }}, /* Byte value: 0x25 */ + {{0x82, 0x7c, 0x38, 0x12, 0x3d, 0xf1, 0xf5, 0x42, }}, /* Byte value: 0x26 */ + {{0x67, 0x40, 0x87, 0xf3, 0x92, 0x18, 0x63, 0x60, }}, /* Byte value: 0x27 */ + {{0x8b, 0x04, 0x85, 0x13, 0xa0, 0xe0, 0x1a, 0x06, }}, /* Byte value: 0x28 */ + {{0x48, 0x46, 0xa1, 0x08, 0x62, 0x88, 0x74, 0x65, }}, /* Byte value: 0x29 */ + {{0x2a, 0x73, 0x67, 0xbb, 0x66, 0x5a, 0x31, 0xab, }}, /* Byte value: 0x2a */ + {{0xef, 0xd6, 0x3d, 0x61, 0x40, 0xbe, 0xda, 0xbd, }}, /* Byte value: 0x2b */ + {{0x70, 0xc5, 0x7f, 0xb1, 0xfd, 0xf0, 0x58, 0x46, }}, /* Byte value: 0x2c */ + {{0x2d, 0x5b, 0x0c, 0x05, 0xac, 0x55, 0xd5, 0x97, }}, /* Byte value: 0x2d */ + {{0x31, 0xfb, 0x63, 0xb8, 0x02, 0x69, 0xc3, 0x67, }}, /* Byte value: 0x2e */ + {{0xe2, 0x14, 0xd4, 0x5f, 0x65, 0xe6, 0x72, 0x1e, }}, /* Byte value: 0x2f */ + {{0x86, 0xc6, 0x6c, 0x2d, 0x85, 0xb8, 0xb2, 0xa5, }}, /* Byte value: 0x30 */ + {{0xc9, 0xa8, 0xa6, 0x9b, 0x2d, 0x3f, 0x22, 0xfc, }}, /* Byte value: 0x31 */ + {{0xb0, 0x15, 0x64, 0x2b, 0x4d, 0xde, 0x95, 0xfe, }}, /* Byte value: 0x32 */ + {{0x80, 0x21, 0x12, 0xec, 0x61, 0x34, 0x37, 0xd0, }}, /* Byte value: 0x33 */ + {{0xf5, 0x91, 0x2c, 0x1d, 0x0a, 0x0e, 0x49, 0x38, }}, /* Byte value: 0x34 */ + {{0xfc, 0xe9, 0x91, 0x1c, 0x97, 0x1f, 0xa6, 0x7c, }}, /* Byte value: 0x35 */ + {{0x60, 0x68, 0xec, 0x4d, 0x58, 0x17, 0x87, 0x5c, }}, /* Byte value: 0x36 */ + {{0x44, 0x4b, 0x5d, 0x49, 0x69, 0x53, 0xbd, 0x8f, }}, /* Byte value: 0x37 */ + {{0x0c, 0x0d, 0xfc, 0x41, 0x0b, 0xdb, 0xc9, 0xea, }}, /* Byte value: 0x38 */ + {{0x8f, 0xbe, 0xd1, 0x2c, 0x18, 0xa9, 0x5d, 0xe1, }}, /* Byte value: 0x39 */ + {{0xa4, 0x02, 0xa3, 0xe8, 0x50, 0x70, 0x0d, 0x03, }}, /* Byte value: 0x3a */ + {{0x3d, 0xf6, 0x9f, 0xf9, 0x09, 0xb2, 0x0a, 0x8d, }}, /* Byte value: 0x3b */ + {{0x62, 0x35, 0xc6, 0xb3, 0x04, 0xd2, 0x45, 0xce, }}, /* Byte value: 0x3c */ + {{0x35, 0x41, 0x37, 0x87, 0xba, 0x20, 0x84, 0x80, }}, /* Byte value: 0x3d */ + {{0xe0, 0x49, 0xfe, 0xa1, 0x39, 0x23, 0xb0, 0x8c, }}, /* Byte value: 0x3e */ + {{0x68, 0xdf, 0x44, 0x33, 0xeb, 0x85, 0x09, 0x51, }}, /* Byte value: 0x3f */ + {{0xdc, 0x70, 0x74, 0x27, 0x1e, 0x12, 0xdb, 0x48, }}, /* Byte value: 0x40 */ + {{0x40, 0xf1, 0x09, 0x76, 0xd1, 0x1a, 0xfa, 0x68, }}, /* Byte value: 0x41 */ + {{0xa0, 0xb8, 0xf7, 0xd7, 0xe8, 0x39, 0x4a, 0xe4, }}, /* Byte value: 0x42 */ + {{0xa7, 0x90, 0x9c, 0x69, 0x22, 0x36, 0xae, 0xd8, }}, /* Byte value: 0x43 */ + {{0x9f, 0x13, 0x42, 0xd0, 0xbd, 0x4e, 0x82, 0xfb, }}, /* Byte value: 0x44 */ + {{0x2b, 0xbc, 0x72, 0xc4, 0x48, 0xd9, 0x50, 0xe2, }}, /* Byte value: 0x45 */ + {{0xae, 0xe8, 0x21, 0x68, 0xbf, 0x27, 0x41, 0x9c, }}, /* Byte value: 0x46 */ + {{0x10, 0xad, 0x93, 0xfc, 0xa5, 0xe7, 0xdf, 0x1a, }}, /* Byte value: 0x47 */ + {{0xfe, 0xb4, 0xbb, 0xe2, 0xcb, 0xda, 0x64, 0xee, }}, /* Byte value: 0x48 */ + {{0xa1, 0x77, 0xe2, 0xa8, 0xc6, 0xba, 0x2b, 0xad, }}, /* Byte value: 0x49 */ + {{0xc7, 0xf8, 0x70, 0x24, 0x7a, 0x21, 0x29, 0x84, }}, /* Byte value: 0x4a */ + {{0x4d, 0x33, 0xe0, 0x48, 0xf4, 0x42, 0x52, 0xcb, }}, /* Byte value: 0x4b */ + {{0xaa, 0x52, 0x75, 0x57, 0x07, 0x6e, 0x06, 0x7b, }}, /* Byte value: 0x4c */ + {{0xd4, 0xc7, 0xdc, 0x59, 0xad, 0x80, 0x55, 0x45, }}, /* Byte value: 0x4d */ + {{0x42, 0xac, 0x23, 0x88, 0x8d, 0xdf, 0x38, 0xfa, }}, /* Byte value: 0x4e */ + {{0x2e, 0xc9, 0x33, 0x84, 0xde, 0x13, 0x76, 0x4c, }}, /* Byte value: 0x4f */ + {{0x49, 0x89, 0xb4, 0x77, 0x4c, 0x0b, 0x15, 0x2c, }}, /* Byte value: 0x50 */ + {{0xb2, 0x48, 0x4e, 0xd5, 0x11, 0x1b, 0x57, 0x6c, }}, /* Byte value: 0x51 */ + {{0x77, 0xed, 0x14, 0x0f, 0x37, 0xff, 0xbc, 0x7a, }}, /* Byte value: 0x52 */ + {{0x39, 0x4c, 0xcb, 0xc6, 0xb1, 0xfb, 0x4d, 0x6a, }}, /* Byte value: 0x53 */ + {{0xad, 0x7a, 0x1e, 0xe9, 0xcd, 0x61, 0xe2, 0x47, }}, /* Byte value: 0x54 */ + {{0x20, 0x99, 0xe5, 0x3b, 0x89, 0x0d, 0x7d, 0x34, }}, /* Byte value: 0x55 */ + {{0xcf, 0x4f, 0xd8, 0x5a, 0xc9, 0xb3, 0xa7, 0x89, }}, /* Byte value: 0x56 */ + {{0x64, 0xd2, 0xb8, 0x72, 0xe0, 0x5e, 0xc0, 0xbb, }}, /* Byte value: 0x57 */ + {{0x9b, 0xa9, 0x16, 0xef, 0x05, 0x07, 0xc5, 0x1c, }}, /* Byte value: 0x58 */ + {{0xde, 0x2d, 0x5e, 0xd9, 0x42, 0xd7, 0x19, 0xda, }}, /* Byte value: 0x59 */ + {{0x7f, 0x5a, 0xbc, 0x71, 0x84, 0x6d, 0x32, 0x77, }}, /* Byte value: 0x5a */ + {{0xa8, 0x0f, 0x5f, 0xa9, 0x5b, 0xab, 0xc4, 0xe9, }}, /* Byte value: 0x5b */ + {{0xb6, 0xf2, 0x1a, 0xea, 0xa9, 0x52, 0x10, 0x8b, }}, /* Byte value: 0x5c */ + {{0x5c, 0x51, 0x66, 0xcb, 0x7f, 0x26, 0xec, 0x98, }}, /* Byte value: 0x5d */ + {{0xa5, 0xcd, 0xb6, 0x97, 0x7e, 0xf3, 0x6c, 0x4a, }}, /* Byte value: 0x5e */ + {{0x6b, 0x4d, 0x7b, 0xb2, 0x99, 0xc3, 0xaa, 0x8a, }}, /* Byte value: 0x5f */ + {{0xd3, 0xef, 0xb7, 0xe7, 0x67, 0x8f, 0xb1, 0x79, }}, /* Byte value: 0x60 */ + {{0xf0, 0xe4, 0x6d, 0x5d, 0x9c, 0xc4, 0x6f, 0x96, }}, /* Byte value: 0x61 */ + {{0x5d, 0x9e, 0x73, 0xb4, 0x51, 0xa5, 0x8d, 0xd1, }}, /* Byte value: 0x62 */ + {{0xc8, 0x67, 0xb3, 0xe4, 0x03, 0xbc, 0x43, 0xb5, }}, /* Byte value: 0x63 */ + {{0xc5, 0xa5, 0x5a, 0xda, 0x26, 0xe4, 0xeb, 0x16, }}, /* Byte value: 0x64 */ + {{0xbd, 0xd7, 0x8d, 0x15, 0x68, 0x86, 0x3d, 0x5d, }}, /* Byte value: 0x65 */ + {{0xc3, 0x42, 0x24, 0x1b, 0xc2, 0x68, 0x6e, 0x63, }}, /* Byte value: 0x66 */ + {{0xe4, 0xf3, 0xaa, 0x9e, 0x81, 0x6a, 0xf7, 0x6b, }}, /* Byte value: 0x67 */ + {{0xaf, 0x27, 0x34, 0x17, 0x91, 0xa4, 0x20, 0xd5, }}, /* Byte value: 0x68 */ + {{0xb8, 0xa2, 0xcc, 0x55, 0xfe, 0x4c, 0x1b, 0xf3, }}, /* Byte value: 0x69 */ + {{0xcb, 0xf5, 0x8c, 0x65, 0x71, 0xfa, 0xe0, 0x6e, }}, /* Byte value: 0x6a */ + {{0xc1, 0x1f, 0x0e, 0xe5, 0x9e, 0xad, 0xac, 0xf1, }}, /* Byte value: 0x6b */ + {{0xb5, 0x60, 0x25, 0x6b, 0xdb, 0x14, 0xb3, 0x50, }}, /* Byte value: 0x6c */ + {{0x6f, 0xf7, 0x2f, 0x8d, 0x21, 0x8a, 0xed, 0x6d, }}, /* Byte value: 0x6d */ + {{0x4c, 0xfc, 0xf5, 0x37, 0xda, 0xc1, 0x33, 0x82, }}, /* Byte value: 0x6e */ + {{0x97, 0xa4, 0xea, 0xae, 0x0e, 0xdc, 0x0c, 0xf6, }}, /* Byte value: 0x6f */ + {{0x88, 0x96, 0xba, 0x92, 0xd2, 0xa6, 0xb9, 0xdd, }}, /* Byte value: 0x70 */ + {{0x61, 0xa7, 0xf9, 0x32, 0x76, 0x94, 0xe6, 0x15, }}, /* Byte value: 0x71 */ + {{0x57, 0x74, 0xf1, 0x34, 0xbe, 0xf2, 0xc1, 0x4e, }}, /* Byte value: 0x72 */ + {{0x11, 0x62, 0x86, 0x83, 0x8b, 0x64, 0xbe, 0x53, }}, /* Byte value: 0x73 */ + {{0x99, 0xf4, 0x3c, 0x11, 0x59, 0xc2, 0x07, 0x8e, }}, /* Byte value: 0x74 */ + {{0x72, 0x98, 0x55, 0x4f, 0xa1, 0x35, 0x9a, 0xd4, }}, /* Byte value: 0x75 */ + {{0x83, 0xb3, 0x2d, 0x6d, 0x13, 0x72, 0x94, 0x0b, }}, /* Byte value: 0x76 */ + {{0xbf, 0x8a, 0xa7, 0xeb, 0x34, 0x43, 0xff, 0xcf, }}, /* Byte value: 0x77 */ + {{0x55, 0x29, 0xdb, 0xca, 0xe2, 0x37, 0x03, 0xdc, }}, /* Byte value: 0x78 */ + {{0x73, 0x57, 0x40, 0x30, 0x8f, 0xb6, 0xfb, 0x9d, }}, /* Byte value: 0x79 */ + {{0x9d, 0x4e, 0x68, 0x2e, 0xe1, 0x8b, 0x40, 0x69, }}, /* Byte value: 0x7a */ + {{0x81, 0xee, 0x07, 0x93, 0x4f, 0xb7, 0x56, 0x99, }}, /* Byte value: 0x7b */ + {{0x3f, 0xab, 0xb5, 0x07, 0x55, 0x77, 0xc8, 0x1f, }}, /* Byte value: 0x7c */ + {{0xb3, 0x87, 0x5b, 0xaa, 0x3f, 0x98, 0x36, 0x25, }}, /* Byte value: 0x7d */ + {{0xbb, 0x30, 0xf3, 0xd4, 0x8c, 0x0a, 0xb8, 0x28, }}, /* Byte value: 0x7e */ + {{0xd6, 0x9a, 0xf6, 0xa7, 0xf1, 0x45, 0x97, 0xd7, }}, /* Byte value: 0x7f */ + {{0xea, 0xa3, 0x7c, 0x21, 0xd6, 0x74, 0xfc, 0x13, }}, /* Byte value: 0x80 */ + {{0x25, 0xec, 0xa4, 0x7b, 0x1f, 0xc7, 0x5b, 0x9a, }}, /* Byte value: 0x81 */ + {{0xce, 0x80, 0xcd, 0x25, 0xe7, 0x30, 0xc6, 0xc0, }}, /* Byte value: 0x82 */ + {{0x63, 0xfa, 0xd3, 0xcc, 0x2a, 0x51, 0x24, 0x87, }}, /* Byte value: 0x83 */ + {{0x45, 0x84, 0x48, 0x36, 0x47, 0xd0, 0xdc, 0xc6, }}, /* Byte value: 0x84 */ + {{0x32, 0x69, 0x5c, 0x39, 0x70, 0x2f, 0x60, 0xbc, }}, /* Byte value: 0x85 */ + {{0xd7, 0x55, 0xe3, 0xd8, 0xdf, 0xc6, 0xf6, 0x9e, }}, /* Byte value: 0x86 */ + {{0x9e, 0xdc, 0x57, 0xaf, 0x93, 0xcd, 0xe3, 0xb2, }}, /* Byte value: 0x87 */ + {{0x08, 0xb7, 0xa8, 0x7e, 0xb3, 0x92, 0x8e, 0x0d, }}, /* Byte value: 0x88 */ + {{0x8d, 0xe3, 0xfb, 0xd2, 0x44, 0x6c, 0x9f, 0x73, }}, /* Byte value: 0x89 */ + {{0x79, 0xbd, 0xc2, 0xb0, 0x60, 0xe1, 0xb7, 0x02, }}, /* Byte value: 0x8a */ + {{0xab, 0x9d, 0x60, 0x28, 0x29, 0xed, 0x67, 0x32, }}, /* Byte value: 0x8b */ + {{0x36, 0xd3, 0x08, 0x06, 0xc8, 0x66, 0x27, 0x5b, }}, /* Byte value: 0x8c */ + {{0xfb, 0xc1, 0xfa, 0xa2, 0x5d, 0x10, 0x42, 0x40, }}, /* Byte value: 0x8d */ + {{0xec, 0x44, 0x02, 0xe0, 0x32, 0xf8, 0x79, 0x66, }}, /* Byte value: 0x8e */ + {{0x4e, 0xa1, 0xdf, 0xc9, 0x86, 0x04, 0xf1, 0x10, }}, /* Byte value: 0x8f */ + {{0x7e, 0x95, 0xa9, 0x0e, 0xaa, 0xee, 0x53, 0x3e, }}, /* Byte value: 0x90 */ + {{0xd0, 0x7d, 0x88, 0x66, 0x15, 0xc9, 0x12, 0xa2, }}, /* Byte value: 0x91 */ + {{0x6c, 0x65, 0x10, 0x0c, 0x53, 0xcc, 0x4e, 0xb6, }}, /* Byte value: 0x92 */ + {{0xf3, 0x76, 0x52, 0xdc, 0xee, 0x82, 0xcc, 0x4d, }}, /* Byte value: 0x93 */ + {{0x5f, 0xc3, 0x59, 0x4a, 0x0d, 0x60, 0x4f, 0x43, }}, /* Byte value: 0x94 */ + {{0xff, 0x7b, 0xae, 0x9d, 0xe5, 0x59, 0x05, 0xa7, }}, /* Byte value: 0x95 */ + {{0x8a, 0xcb, 0x90, 0x6c, 0x8e, 0x63, 0x7b, 0x4f, }}, /* Byte value: 0x96 */ + {{0x56, 0xbb, 0xe4, 0x4b, 0x90, 0x71, 0xa0, 0x07, }}, /* Byte value: 0x97 */ + {{0xdd, 0xbf, 0x61, 0x58, 0x30, 0x91, 0xba, 0x01, }}, /* Byte value: 0x98 */ + {{0xb4, 0xaf, 0x30, 0x14, 0xf5, 0x97, 0xd2, 0x19, }}, /* Byte value: 0x99 */ + {{0x04, 0xba, 0x54, 0x3f, 0xb8, 0x49, 0x47, 0xe7, }}, /* Byte value: 0x9a */ + {{0xbe, 0x45, 0xb2, 0x94, 0x1a, 0xc0, 0x9e, 0x86, }}, /* Byte value: 0x9b */ + {{0x1b, 0x88, 0x04, 0x03, 0x64, 0x33, 0xf2, 0xcc, }}, /* Byte value: 0x9c */ + {{0x9c, 0x81, 0x7d, 0x51, 0xcf, 0x08, 0x21, 0x20, }}, /* Byte value: 0x9d */ + {{0x5e, 0x0c, 0x4c, 0x35, 0x23, 0xe3, 0x2e, 0x0a, }}, /* Byte value: 0x9e */ + {{0x07, 0x28, 0x6b, 0xbe, 0xca, 0x0f, 0xe4, 0x3c, }}, /* Byte value: 0x9f */ + {{0x8c, 0x2c, 0xee, 0xad, 0x6a, 0xef, 0xfe, 0x3a, }}, /* Byte value: 0xa0 */ + {{0x0f, 0x9f, 0xc3, 0xc0, 0x79, 0x9d, 0x6a, 0x31, }}, /* Byte value: 0xa1 */ + {{0x6d, 0xaa, 0x05, 0x73, 0x7d, 0x4f, 0x2f, 0xff, }}, /* Byte value: 0xa2 */ + {{0xf4, 0x5e, 0x39, 0x62, 0x24, 0x8d, 0x28, 0x71, }}, /* Byte value: 0xa3 */ + {{0x26, 0x7e, 0x9b, 0xfa, 0x6d, 0x81, 0xf8, 0x41, }}, /* Byte value: 0xa4 */ + {{0x71, 0x0a, 0x6a, 0xce, 0xd3, 0x73, 0x39, 0x0f, }}, /* Byte value: 0xa5 */ + {{0x1c, 0xa0, 0x6f, 0xbd, 0xae, 0x3c, 0x16, 0xf0, }}, /* Byte value: 0xa6 */ + {{0x94, 0x36, 0xd5, 0x2f, 0x7c, 0x9a, 0xaf, 0x2d, }}, /* Byte value: 0xa7 */ + {{0x22, 0xc4, 0xcf, 0xc5, 0xd5, 0xc8, 0xbf, 0xa6, }}, /* Byte value: 0xa8 */ + {{0xeb, 0x6c, 0x69, 0x5e, 0xf8, 0xf7, 0x9d, 0x5a, }}, /* Byte value: 0xa9 */ + {{0xbc, 0x18, 0x98, 0x6a, 0x46, 0x05, 0x5c, 0x14, }}, /* Byte value: 0xaa */ + {{0x3c, 0x39, 0x8a, 0x86, 0x27, 0x31, 0x6b, 0xc4, }}, /* Byte value: 0xab */ + {{0x15, 0xd8, 0xd2, 0xbc, 0x33, 0x2d, 0xf9, 0xb4, }}, /* Byte value: 0xac */ + {{0xe9, 0x31, 0x43, 0xa0, 0xa4, 0x32, 0x5f, 0xc8, }}, /* Byte value: 0xad */ + {{0x02, 0x5d, 0x2a, 0xfe, 0x5c, 0xc5, 0xc2, 0x92, }}, /* Byte value: 0xae */ + {{0x46, 0x16, 0x77, 0xb7, 0x35, 0x96, 0x7f, 0x1d, }}, /* Byte value: 0xaf */ + {{0xda, 0x97, 0x0a, 0xe6, 0xfa, 0x9e, 0x5e, 0x3d, }}, /* Byte value: 0xb0 */ + {{0x19, 0xd5, 0x2e, 0xfd, 0x38, 0xf6, 0x30, 0x5e, }}, /* Byte value: 0xb1 */ + {{0xdb, 0x58, 0x1f, 0x99, 0xd4, 0x1d, 0x3f, 0x74, }}, /* Byte value: 0xb2 */ + {{0x1e, 0xfd, 0x45, 0x43, 0xf2, 0xf9, 0xd4, 0x62, }}, /* Byte value: 0xb3 */ + {{0x17, 0x85, 0xf8, 0x42, 0x6f, 0xe8, 0x3b, 0x26, }}, /* Byte value: 0xb4 */ + {{0x4a, 0x1b, 0x8b, 0xf6, 0x3e, 0x4d, 0xb6, 0xf7, }}, /* Byte value: 0xb5 */ + {{0x0a, 0xea, 0x82, 0x80, 0xef, 0x57, 0x4c, 0x9f, }}, /* Byte value: 0xb6 */ + {{0xd9, 0x05, 0x35, 0x67, 0x88, 0xd8, 0xfd, 0xe6, }}, /* Byte value: 0xb7 */ + {{0x89, 0x59, 0xaf, 0xed, 0xfc, 0x25, 0xd8, 0x94, }}, /* Byte value: 0xb8 */ + {{0x78, 0x72, 0xd7, 0xcf, 0x4e, 0x62, 0xd6, 0x4b, }}, /* Byte value: 0xb9 */ + {{0x76, 0x22, 0x01, 0x70, 0x19, 0x7c, 0xdd, 0x33, }}, /* Byte value: 0xba */ + {{0x27, 0xb1, 0x8e, 0x85, 0x43, 0x02, 0x99, 0x08, }}, /* Byte value: 0xbb */ + {{0x18, 0x1a, 0x3b, 0x82, 0x16, 0x75, 0x51, 0x17, }}, /* Byte value: 0xbc */ + {{0x23, 0x0b, 0xda, 0xba, 0xfb, 0x4b, 0xde, 0xef, }}, /* Byte value: 0xbd */ + {{0xf2, 0xb9, 0x47, 0xa3, 0xc0, 0x01, 0xad, 0x04, }}, /* Byte value: 0xbe */ + {{0x95, 0xf9, 0xc0, 0x50, 0x52, 0x19, 0xce, 0x64, }}, /* Byte value: 0xbf */ + {{0xd5, 0x08, 0xc9, 0x26, 0x83, 0x03, 0x34, 0x0c, }}, /* Byte value: 0xc0 */ + {{0xa9, 0xc0, 0x4a, 0xd6, 0x75, 0x28, 0xa5, 0xa0, }}, /* Byte value: 0xc1 */ + {{0x84, 0x9b, 0x46, 0xd3, 0xd9, 0x7d, 0x70, 0x37, }}, /* Byte value: 0xc2 */ + {{0xe1, 0x86, 0xeb, 0xde, 0x17, 0xa0, 0xd1, 0xc5, }}, /* Byte value: 0xc3 */ + {{0x1d, 0x6f, 0x7a, 0xc2, 0x80, 0xbf, 0x77, 0xb9, }}, /* Byte value: 0xc4 */ + {{0x93, 0x1e, 0xbe, 0x91, 0xb6, 0x95, 0x4b, 0x11, }}, /* Byte value: 0xc5 */ + {{0x28, 0x2e, 0x4d, 0x45, 0x3a, 0x9f, 0xf3, 0x39, }}, /* Byte value: 0xc6 */ + {{0xc6, 0x37, 0x65, 0x5b, 0x54, 0xa2, 0x48, 0xcd, }}, /* Byte value: 0xc7 */ + {{0x7b, 0xe0, 0xe8, 0x4e, 0x3c, 0x24, 0x75, 0x90, }}, /* Byte value: 0xc8 */ + {{0x65, 0x1d, 0xad, 0x0d, 0xce, 0xdd, 0xa1, 0xf2, }}, /* Byte value: 0xc9 */ + {{0x75, 0xb0, 0x3e, 0xf1, 0x6b, 0x3a, 0x7e, 0xe8, }}, /* Byte value: 0xca */ + {{0x7c, 0xc8, 0x83, 0xf0, 0xf6, 0x2b, 0x91, 0xac, }}, /* Byte value: 0xcb */ + {{0xe3, 0xdb, 0xc1, 0x20, 0x4b, 0x65, 0x13, 0x57, }}, /* Byte value: 0xcc */ + {{0xee, 0x19, 0x28, 0x1e, 0x6e, 0x3d, 0xbb, 0xf4, }}, /* Byte value: 0xcd */ + {{0x21, 0x56, 0xf0, 0x44, 0xa7, 0x8e, 0x1c, 0x7d, }}, /* Byte value: 0xce */ + {{0x8e, 0x71, 0xc4, 0x53, 0x36, 0x2a, 0x3c, 0xa8, }}, /* Byte value: 0xcf */ + {{0xf9, 0x9c, 0xd0, 0x5c, 0x01, 0xd5, 0x80, 0xd2, }}, /* Byte value: 0xd0 */ + {{0x01, 0xcf, 0x15, 0x7f, 0x2e, 0x83, 0x61, 0x49, }}, /* Byte value: 0xd1 */ + {{0x5b, 0x79, 0x0d, 0x75, 0xb5, 0x29, 0x08, 0xa4, }}, /* Byte value: 0xd2 */ + {{0x91, 0x43, 0x94, 0x6f, 0xea, 0x50, 0x89, 0x83, }}, /* Byte value: 0xd3 */ + {{0x14, 0x17, 0xc7, 0xc3, 0x1d, 0xae, 0x98, 0xfd, }}, /* Byte value: 0xd4 */ + {{0x7a, 0x2f, 0xfd, 0x31, 0x12, 0xa7, 0x14, 0xd9, }}, /* Byte value: 0xd5 */ + {{0xf6, 0x03, 0x13, 0x9c, 0x78, 0x48, 0xea, 0xe3, }}, /* Byte value: 0xd6 */ + {{0xb1, 0xda, 0x71, 0x54, 0x63, 0x5d, 0xf4, 0xb7, }}, /* Byte value: 0xd7 */ + {{0xb7, 0x3d, 0x0f, 0x95, 0x87, 0xd1, 0x71, 0xc2, }}, /* Byte value: 0xd8 */ + {{0xca, 0x3a, 0x99, 0x1a, 0x5f, 0x79, 0x81, 0x27, }}, /* Byte value: 0xd9 */ + {{0x5a, 0xb6, 0x18, 0x0a, 0x9b, 0xaa, 0x69, 0xed, }}, /* Byte value: 0xda */ + {{0xf8, 0x53, 0xc5, 0x23, 0x2f, 0x56, 0xe1, 0x9b, }}, /* Byte value: 0xdb */ + {{0xcc, 0xdd, 0xe7, 0xdb, 0xbb, 0xf5, 0x04, 0x52, }}, /* Byte value: 0xdc */ + {{0x47, 0xd9, 0x62, 0xc8, 0x1b, 0x15, 0x1e, 0x54, }}, /* Byte value: 0xdd */ + {{0x96, 0x6b, 0xff, 0xd1, 0x20, 0x5f, 0x6d, 0xbf, }}, /* Byte value: 0xde */ + {{0x6e, 0x38, 0x3a, 0xf2, 0x0f, 0x09, 0x8c, 0x24, }}, /* Byte value: 0xdf */ + {{0x13, 0x3f, 0xac, 0x7d, 0xd7, 0xa1, 0x7c, 0xc1, }}, /* Byte value: 0xe0 */ + {{0x24, 0x23, 0xb1, 0x04, 0x31, 0x44, 0x3a, 0xd3, }}, /* Byte value: 0xe1 */ + {{0x74, 0x7f, 0x2b, 0x8e, 0x45, 0xb9, 0x1f, 0xa1, }}, /* Byte value: 0xe2 */ + {{0x09, 0x78, 0xbd, 0x01, 0x9d, 0x11, 0xef, 0x44, }}, /* Byte value: 0xe3 */ + {{0x03, 0x92, 0x3f, 0x81, 0x72, 0x46, 0xa3, 0xdb, }}, /* Byte value: 0xe4 */ + {{0x30, 0x34, 0x76, 0xc7, 0x2c, 0xea, 0xa2, 0x2e, }}, /* Byte value: 0xe5 */ + {{0x50, 0x5c, 0x9a, 0x8a, 0x74, 0xfd, 0x25, 0x72, }}, /* Byte value: 0xe6 */ + {{0x4f, 0x6e, 0xca, 0xb6, 0xa8, 0x87, 0x90, 0x59, }}, /* Byte value: 0xe7 */ + {{0x0e, 0x50, 0xd6, 0xbf, 0x57, 0x1e, 0x0b, 0x78, }}, /* Byte value: 0xe8 */ + {{0x7d, 0x07, 0x96, 0x8f, 0xd8, 0xa8, 0xf0, 0xe5, }}, /* Byte value: 0xe9 */ + {{0xb9, 0x6d, 0xd9, 0x2a, 0xd0, 0xcf, 0x7a, 0xba, }}, /* Byte value: 0xea */ + {{0x37, 0x1c, 0x1d, 0x79, 0xe6, 0xe5, 0x46, 0x12, }}, /* Byte value: 0xeb */ + {{0x54, 0xe6, 0xce, 0xb5, 0xcc, 0xb4, 0x62, 0x95, }}, /* Byte value: 0xec */ + {{0x1f, 0x32, 0x50, 0x3c, 0xdc, 0x7a, 0xb5, 0x2b, }}, /* Byte value: 0xed */ + {{0xc2, 0x8d, 0x31, 0x64, 0xec, 0xeb, 0x0f, 0x2a, }}, /* Byte value: 0xee */ + {{0x33, 0xa6, 0x49, 0x46, 0x5e, 0xac, 0x01, 0xf5, }}, /* Byte value: 0xef */ + {{0x3a, 0xde, 0xf4, 0x47, 0xc3, 0xbd, 0xee, 0xb1, }}, /* Byte value: 0xf0 */ + {{0xe5, 0x3c, 0xbf, 0xe1, 0xaf, 0xe9, 0x96, 0x22, }}, /* Byte value: 0xf1 */ + {{0xe8, 0xfe, 0x56, 0xdf, 0x8a, 0xb1, 0x3e, 0x81, }}, /* Byte value: 0xf2 */ + {{0x12, 0xf0, 0xb9, 0x02, 0xf9, 0x22, 0x1d, 0x88, }}, /* Byte value: 0xf3 */ + {{0x92, 0xd1, 0xab, 0xee, 0x98, 0x16, 0x2a, 0x58, }}, /* Byte value: 0xf4 */ + {{0xac, 0xb5, 0x0b, 0x96, 0xe3, 0xe2, 0x83, 0x0e, }}, /* Byte value: 0xf5 */ + {{0x34, 0x8e, 0x22, 0xf8, 0x94, 0xa3, 0xe5, 0xc9, }}, /* Byte value: 0xf6 */ + {{0x52, 0x01, 0xb0, 0x74, 0x28, 0x38, 0xe7, 0xe0, }}, /* Byte value: 0xf7 */ + {{0xed, 0x8b, 0x17, 0x9f, 0x1c, 0x7b, 0x18, 0x2f, }}, /* Byte value: 0xf8 */ + {{0xfa, 0x0e, 0xef, 0xdd, 0x73, 0x93, 0x23, 0x09, }}, /* Byte value: 0xf9 */ + {{0x98, 0x3b, 0x29, 0x6e, 0x77, 0x41, 0x66, 0xc7, }}, /* Byte value: 0xfa */ + {{0xdf, 0xe2, 0x4b, 0xa6, 0x6c, 0x54, 0x78, 0x93, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x66, 0x8f, 0x92, 0x8c, 0xbc, 0x9b, 0x02, 0x29, }}, /* Byte value: 0xfd */ + {{0x2f, 0x06, 0x26, 0xfb, 0xf0, 0x90, 0x17, 0x05, }}, /* Byte value: 0xfe */ + {{0x3e, 0x64, 0xa0, 0x78, 0x7b, 0xf4, 0xa9, 0x56, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 6 */ + {{0x51, 0x8b, 0xc0, 0x48, 0x41, 0xdb, 0x9d, 0x79, }}, /* Byte value: 0x00 */ + {{0x33, 0xea, 0x25, 0x27, 0xfa, 0x81, 0x30, 0xe7, }}, /* Byte value: 0x01 */ + {{0xa4, 0x98, 0x5a, 0x40, 0x48, 0x42, 0xb3, 0xc9, }}, /* Byte value: 0x02 */ + {{0x67, 0xeb, 0x11, 0xd7, 0x14, 0x97, 0xc2, 0x59, }}, /* Byte value: 0x03 */ + {{0x0a, 0xd7, 0x2b, 0xb3, 0x9d, 0x59, 0xde, 0x4d, }}, /* Byte value: 0x04 */ + {{0xe7, 0x33, 0xd5, 0x7d, 0x3a, 0x1c, 0x1b, 0x11, }}, /* Byte value: 0x05 */ + {{0x28, 0xda, 0xac, 0x89, 0x31, 0xa7, 0xfe, 0xf7, }}, /* Byte value: 0x06 */ + {{0x1a, 0xcc, 0xd2, 0x37, 0xe8, 0x70, 0x6c, 0x44, }}, /* Byte value: 0x07 */ + {{0x6c, 0xc0, 0x61, 0xfd, 0xaa, 0x98, 0xbe, 0x40, }}, /* Byte value: 0x08 */ + {{0x65, 0xd0, 0xa7, 0x26, 0x52, 0x3b, 0x45, 0xf1, }}, /* Byte value: 0x09 */ + {{0xfa, 0x4e, 0x45, 0x03, 0x3b, 0x0d, 0x9f, 0x3a, }}, /* Byte value: 0x0a */ + {{0xe8, 0x6e, 0x0a, 0x76, 0x08, 0x88, 0xaa, 0x9b, }}, /* Byte value: 0x0b */ + {{0xac, 0x74, 0xc7, 0x02, 0x93, 0xb7, 0xea, 0x2c, }}, /* Byte value: 0x0c */ + {{0x5a, 0xa0, 0xb0, 0x62, 0xff, 0xd4, 0xe1, 0x60, }}, /* Byte value: 0x0d */ + {{0xa9, 0xfe, 0x33, 0xba, 0x3c, 0x7a, 0x85, 0xeb, }}, /* Byte value: 0x0e */ + {{0x30, 0x2d, 0xc8, 0x4f, 0x9f, 0x7b, 0x15, 0x1b, }}, /* Byte value: 0x0f */ + {{0x8b, 0xf3, 0xb4, 0x80, 0x90, 0x84, 0xa5, 0x51, }}, /* Byte value: 0x10 */ + {{0x83, 0x1f, 0x29, 0xc2, 0x4b, 0x71, 0xfc, 0xb4, }}, /* Byte value: 0x11 */ + {{0xef, 0xdf, 0x48, 0x3f, 0xe1, 0xe9, 0x42, 0xf4, }}, /* Byte value: 0x12 */ + {{0x66, 0x17, 0x4a, 0x4e, 0x37, 0xc1, 0x60, 0x0d, }}, /* Byte value: 0x13 */ + {{0x14, 0x6d, 0x56, 0xa5, 0xf9, 0xb2, 0x7f, 0x9a, }}, /* Byte value: 0x14 */ + {{0x0d, 0x66, 0x69, 0xfa, 0x74, 0x38, 0x36, 0x22, }}, /* Byte value: 0x15 */ + {{0x05, 0x8a, 0xf4, 0xb8, 0xaf, 0xcd, 0x6f, 0xc7, }}, /* Byte value: 0x16 */ + {{0x92, 0xf8, 0x8b, 0xdf, 0x1d, 0x0e, 0xec, 0xe9, }}, /* Byte value: 0x17 */ + {{0x7a, 0x96, 0x81, 0xa9, 0x15, 0x86, 0x46, 0x72, }}, /* Byte value: 0x18 */ + {{0x13, 0xdc, 0x14, 0xec, 0x10, 0xd3, 0x97, 0xf5, }}, /* Byte value: 0x19 */ + {{0xd8, 0x43, 0xc2, 0x39, 0x97, 0xf3, 0xbf, 0x80, }}, /* Byte value: 0x1a */ + {{0x87, 0x69, 0x86, 0xe3, 0xc7, 0xea, 0x31, 0x27, }}, /* Byte value: 0x1b */ + {{0xb5, 0x7f, 0xf8, 0x5d, 0x1e, 0x3d, 0xa3, 0x94, }}, /* Byte value: 0x1c */ + {{0xdf, 0xf2, 0x80, 0x70, 0x7e, 0x92, 0x57, 0xef, }}, /* Byte value: 0x1d */ + {{0x91, 0x3f, 0x66, 0xb7, 0x78, 0xf4, 0xc9, 0x15, }}, /* Byte value: 0x1e */ + {{0x2d, 0x50, 0x58, 0x31, 0x9e, 0x6a, 0x91, 0x30, }}, /* Byte value: 0x1f */ + {{0xa0, 0xee, 0xf5, 0x61, 0xc4, 0xd9, 0x7e, 0x5a, }}, /* Byte value: 0x20 */ + {{0xbf, 0xa8, 0xd3, 0xee, 0x83, 0x64, 0x7d, 0xd9, }}, /* Byte value: 0x21 */ + {{0x24, 0x40, 0x9e, 0xea, 0x66, 0xc9, 0x6a, 0x81, }}, /* Byte value: 0x22 */ + {{0x49, 0x7c, 0xa4, 0x8e, 0xef, 0x07, 0x76, 0x95, }}, /* Byte value: 0x23 */ + {{0xee, 0x23, 0x13, 0xa6, 0xc2, 0xbf, 0xe0, 0xa0, }}, /* Byte value: 0x24 */ + {{0x2c, 0xac, 0x03, 0xa8, 0xbd, 0x3c, 0x33, 0x64, }}, /* Byte value: 0x25 */ + {{0x1d, 0x7d, 0x90, 0x7e, 0x01, 0x11, 0x84, 0x2b, }}, /* Byte value: 0x26 */ + {{0xcc, 0x2e, 0x94, 0x9c, 0x6e, 0x41, 0xc0, 0x1a, }}, /* Byte value: 0x27 */ + {{0x7c, 0xdb, 0x98, 0x79, 0xdf, 0xb1, 0x0c, 0x49, }}, /* Byte value: 0x28 */ + {{0x8e, 0x79, 0x40, 0x38, 0x3f, 0x49, 0xca, 0x96, }}, /* Byte value: 0x29 */ + {{0xb8, 0x19, 0x91, 0xa7, 0x6a, 0x05, 0x95, 0xb6, }}, /* Byte value: 0x2a */ + {{0xe6, 0xcf, 0x8e, 0xe4, 0x19, 0x4a, 0xb9, 0x45, }}, /* Byte value: 0x2b */ + {{0xf4, 0xef, 0xc1, 0x91, 0x2a, 0xcf, 0x8c, 0xe4, }}, /* Byte value: 0x2c */ + {{0x26, 0x7b, 0x28, 0x1b, 0x20, 0x65, 0xed, 0x29, }}, /* Byte value: 0x2d */ + {{0x1b, 0x30, 0x89, 0xae, 0xcb, 0x26, 0xce, 0x10, }}, /* Byte value: 0x2e */ + {{0x4f, 0x31, 0xbd, 0x5e, 0x25, 0x30, 0x3c, 0xae, }}, /* Byte value: 0x2f */ + {{0xd5, 0x25, 0xab, 0xc3, 0xe3, 0xcb, 0x89, 0xa2, }}, /* Byte value: 0x30 */ + {{0xc5, 0x3e, 0x52, 0x47, 0x96, 0xe2, 0x3b, 0xab, }}, /* Byte value: 0x31 */ + {{0x50, 0x77, 0x9b, 0xd1, 0x62, 0x8d, 0x3f, 0x2d, }}, /* Byte value: 0x32 */ + {{0x79, 0x51, 0x6c, 0xc1, 0x70, 0x7c, 0x63, 0x8e, }}, /* Byte value: 0x33 */ + {{0x77, 0xf0, 0xe8, 0x53, 0x61, 0xbe, 0x70, 0x50, }}, /* Byte value: 0x34 */ + {{0x16, 0x56, 0xe0, 0x54, 0xbf, 0x1e, 0xf8, 0x32, }}, /* Byte value: 0x35 */ + {{0x52, 0x4c, 0x2d, 0x20, 0x24, 0x21, 0xb8, 0x85, }}, /* Byte value: 0x36 */ + {{0x15, 0x91, 0x0d, 0x3c, 0xda, 0xe4, 0xdd, 0xce, }}, /* Byte value: 0x37 */ + {{0x9b, 0xe8, 0x4d, 0x04, 0xe5, 0xad, 0x17, 0x58, }}, /* Byte value: 0x38 */ + {{0xb4, 0x83, 0xa3, 0xc4, 0x3d, 0x6b, 0x01, 0xc0, }}, /* Byte value: 0x39 */ + {{0x3e, 0x8c, 0x4c, 0xdd, 0x8e, 0xb9, 0x06, 0xc5, }}, /* Byte value: 0x3a */ + {{0x80, 0xd8, 0xc4, 0xaa, 0x2e, 0x8b, 0xd9, 0x48, }}, /* Byte value: 0x3b */ + {{0x36, 0x60, 0xd1, 0x9f, 0x55, 0x4c, 0x5f, 0x20, }}, /* Byte value: 0x3c */ + {{0xd3, 0x68, 0xb2, 0x13, 0x29, 0xfc, 0xc3, 0x99, }}, /* Byte value: 0x3d */ + {{0x2b, 0x1d, 0x41, 0xe1, 0x54, 0x5d, 0xdb, 0x0b, }}, /* Byte value: 0x3e */ + {{0x01, 0xfc, 0x5b, 0x99, 0x23, 0x56, 0xa2, 0x54, }}, /* Byte value: 0x3f */ + {{0x99, 0xd3, 0xfb, 0xf5, 0xa3, 0x01, 0x90, 0xf0, }}, /* Byte value: 0x40 */ + {{0xdd, 0xc9, 0x36, 0x81, 0x38, 0x3e, 0xd0, 0x47, }}, /* Byte value: 0x41 */ + {{0xf6, 0xd4, 0x77, 0x60, 0x6c, 0x63, 0x0b, 0x4c, }}, /* Byte value: 0x42 */ + {{0x68, 0xb6, 0xce, 0xdc, 0x26, 0x03, 0x73, 0xd3, }}, /* Byte value: 0x43 */ + {{0x12, 0x20, 0x4f, 0x75, 0x33, 0x85, 0x35, 0xa1, }}, /* Byte value: 0x44 */ + {{0x8a, 0x0f, 0xef, 0x19, 0xb3, 0xd2, 0x07, 0x05, }}, /* Byte value: 0x45 */ + {{0x09, 0x10, 0xc6, 0xdb, 0xf8, 0xa3, 0xfb, 0xb1, }}, /* Byte value: 0x46 */ + {{0xa6, 0xa3, 0xec, 0xb1, 0x0e, 0xee, 0x34, 0x61, }}, /* Byte value: 0x47 */ + {{0x72, 0x7a, 0x1c, 0xeb, 0xce, 0x73, 0x1f, 0x97, }}, /* Byte value: 0x48 */ + {{0xc4, 0xc2, 0x09, 0xde, 0xb5, 0xb4, 0x99, 0xff, }}, /* Byte value: 0x49 */ + {{0x3a, 0xfa, 0xe3, 0xfc, 0x02, 0x22, 0xcb, 0x56, }}, /* Byte value: 0x4a */ + {{0x74, 0x37, 0x05, 0x3b, 0x04, 0x44, 0x55, 0xac, }}, /* Byte value: 0x4b */ + {{0xc1, 0x48, 0xfd, 0x66, 0x1a, 0x79, 0xf6, 0x38, }}, /* Byte value: 0x4c */ + {{0xca, 0x63, 0x8d, 0x4c, 0xa4, 0x76, 0x8a, 0x21, }}, /* Byte value: 0x4d */ + {{0xb9, 0xe5, 0xca, 0x3e, 0x49, 0x53, 0x37, 0xe2, }}, /* Byte value: 0x4e */ + {{0x70, 0x41, 0xaa, 0x1a, 0x88, 0xdf, 0x98, 0x3f, }}, /* Byte value: 0x4f */ + {{0xbc, 0x6f, 0x3e, 0x86, 0xe6, 0x9e, 0x58, 0x25, }}, /* Byte value: 0x50 */ + {{0x34, 0x5b, 0x67, 0x6e, 0x13, 0xe0, 0xd8, 0x88, }}, /* Byte value: 0x51 */ + {{0x6a, 0x8d, 0x78, 0x2d, 0x60, 0xaf, 0xf4, 0x7b, }}, /* Byte value: 0x52 */ + {{0x48, 0x80, 0xff, 0x17, 0xcc, 0x51, 0xd4, 0xc1, }}, /* Byte value: 0x53 */ + {{0x5f, 0x2a, 0x44, 0xda, 0x50, 0x19, 0x8e, 0xa7, }}, /* Byte value: 0x54 */ + {{0x8f, 0x85, 0x1b, 0xa1, 0x1c, 0x1f, 0x68, 0xc2, }}, /* Byte value: 0x55 */ + {{0x69, 0x4a, 0x95, 0x45, 0x05, 0x55, 0xd1, 0x87, }}, /* Byte value: 0x56 */ + {{0x9a, 0x14, 0x16, 0x9d, 0xc6, 0xfb, 0xb5, 0x0c, }}, /* Byte value: 0x57 */ + {{0xda, 0x78, 0x74, 0xc8, 0xd1, 0x5f, 0x38, 0x28, }}, /* Byte value: 0x58 */ + {{0xfd, 0xff, 0x07, 0x4a, 0xd2, 0x6c, 0x77, 0x55, }}, /* Byte value: 0x59 */ + {{0x39, 0x3d, 0x0e, 0x94, 0x67, 0xd8, 0xee, 0xaa, }}, /* Byte value: 0x5a */ + {{0xa5, 0x64, 0x01, 0xd9, 0x6b, 0x14, 0x11, 0x9d, }}, /* Byte value: 0x5b */ + {{0xfc, 0x03, 0x5c, 0xd3, 0xf1, 0x3a, 0xd5, 0x01, }}, /* Byte value: 0x5c */ + {{0xe0, 0x82, 0x97, 0x34, 0xd3, 0x7d, 0xf3, 0x7e, }}, /* Byte value: 0x5d */ + {{0x0c, 0x9a, 0x32, 0x63, 0x57, 0x6e, 0x94, 0x76, }}, /* Byte value: 0x5e */ + {{0x57, 0xc6, 0xd9, 0x98, 0x8b, 0xec, 0xd7, 0x42, }}, /* Byte value: 0x5f */ + {{0x54, 0x01, 0x34, 0xf0, 0xee, 0x16, 0xf2, 0xbe, }}, /* Byte value: 0x60 */ + {{0x8d, 0xbe, 0xad, 0x50, 0x5a, 0xb3, 0xef, 0x6a, }}, /* Byte value: 0x61 */ + {{0xd2, 0x94, 0xe9, 0x8a, 0x0a, 0xaa, 0x61, 0xcd, }}, /* Byte value: 0x62 */ + {{0xf7, 0x28, 0x2c, 0xf9, 0x4f, 0x35, 0xa9, 0x18, }}, /* Byte value: 0x63 */ + {{0x5e, 0xd6, 0x1f, 0x43, 0x73, 0x4f, 0x2c, 0xf3, }}, /* Byte value: 0x64 */ + {{0xf9, 0x89, 0xa8, 0x6b, 0x5e, 0xf7, 0xba, 0xc6, }}, /* Byte value: 0x65 */ + {{0xf2, 0xa2, 0xd8, 0x41, 0xe0, 0xf8, 0xc6, 0xdf, }}, /* Byte value: 0x66 */ + {{0xe3, 0x45, 0x7a, 0x5c, 0xb6, 0x87, 0xd6, 0x82, }}, /* Byte value: 0x67 */ + {{0x3b, 0x06, 0xb8, 0x65, 0x21, 0x74, 0x69, 0x02, }}, /* Byte value: 0x68 */ + {{0x03, 0xc7, 0xed, 0x68, 0x65, 0xfa, 0x25, 0xfc, }}, /* Byte value: 0x69 */ + {{0xa1, 0x12, 0xae, 0xf8, 0xe7, 0x8f, 0xdc, 0x0e, }}, /* Byte value: 0x6a */ + {{0x96, 0x8e, 0x24, 0xfe, 0x91, 0x95, 0x21, 0x7a, }}, /* Byte value: 0x6b */ + {{0xaa, 0x39, 0xde, 0xd2, 0x59, 0x80, 0xa0, 0x17, }}, /* Byte value: 0x6c */ + {{0x9f, 0x9e, 0xe2, 0x25, 0x69, 0x36, 0xda, 0xcb, }}, /* Byte value: 0x6d */ + {{0x46, 0x21, 0x7b, 0x85, 0xdd, 0x93, 0xc7, 0x1f, }}, /* Byte value: 0x6e */ + {{0x41, 0x90, 0x39, 0xcc, 0x34, 0xf2, 0x2f, 0x70, }}, /* Byte value: 0x6f */ + {{0x2a, 0xe1, 0x1a, 0x78, 0x77, 0x0b, 0x79, 0x5f, }}, /* Byte value: 0x70 */ + {{0x60, 0x5a, 0x53, 0x9e, 0xfd, 0xf6, 0x2a, 0x36, }}, /* Byte value: 0x71 */ + {{0xe5, 0x08, 0x63, 0x8c, 0x7c, 0xb0, 0x9c, 0xb9, }}, /* Byte value: 0x72 */ + {{0x94, 0xb5, 0x92, 0x0f, 0xd7, 0x39, 0xa6, 0xd2, }}, /* Byte value: 0x73 */ + {{0xbe, 0x54, 0x88, 0x77, 0xa0, 0x32, 0xdf, 0x8d, }}, /* Byte value: 0x74 */ + {{0x90, 0xc3, 0x3d, 0x2e, 0x5b, 0xa2, 0x6b, 0x41, }}, /* Byte value: 0x75 */ + {{0x2f, 0x6b, 0xee, 0xc0, 0xd8, 0xc6, 0x16, 0x98, }}, /* Byte value: 0x76 */ + {{0x9d, 0xa5, 0x54, 0xd4, 0x2f, 0x9a, 0x5d, 0x63, }}, /* Byte value: 0x77 */ + {{0x81, 0x24, 0x9f, 0x33, 0x0d, 0xdd, 0x7b, 0x1c, }}, /* Byte value: 0x78 */ + {{0xa2, 0xd5, 0x43, 0x90, 0x82, 0x75, 0xf9, 0xf2, }}, /* Byte value: 0x79 */ + {{0x76, 0x0c, 0xb3, 0xca, 0x42, 0xe8, 0xd2, 0x04, }}, /* Byte value: 0x7a */ + {{0x4b, 0x47, 0x12, 0x7f, 0xa9, 0xab, 0xf1, 0x3d, }}, /* Byte value: 0x7b */ + {{0xe4, 0xf4, 0x38, 0x15, 0x5f, 0xe6, 0x3e, 0xed, }}, /* Byte value: 0x7c */ + {{0x06, 0x4d, 0x19, 0xd0, 0xca, 0x37, 0x4a, 0x3b, }}, /* Byte value: 0x7d */ + {{0x55, 0xfd, 0x6f, 0x69, 0xcd, 0x40, 0x50, 0xea, }}, /* Byte value: 0x7e */ + {{0xae, 0x4f, 0x71, 0xf3, 0xd5, 0x1b, 0x6d, 0x84, }}, /* Byte value: 0x7f */ + {{0x1c, 0x81, 0xcb, 0xe7, 0x22, 0x47, 0x26, 0x7f, }}, /* Byte value: 0x80 */ + {{0x75, 0xcb, 0x5e, 0xa2, 0x27, 0x12, 0xf7, 0xf8, }}, /* Byte value: 0x81 */ + {{0x5b, 0x5c, 0xeb, 0xfb, 0xdc, 0x82, 0x43, 0x34, }}, /* Byte value: 0x82 */ + {{0x04, 0x76, 0xaf, 0x21, 0x8c, 0x9b, 0xcd, 0x93, }}, /* Byte value: 0x83 */ + {{0x27, 0x87, 0x73, 0x82, 0x03, 0x33, 0x4f, 0x7d, }}, /* Byte value: 0x84 */ + {{0x4d, 0x0a, 0x0b, 0xaf, 0x63, 0x9c, 0xbb, 0x06, }}, /* Byte value: 0x85 */ + {{0x9c, 0x59, 0x0f, 0x4d, 0x0c, 0xcc, 0xff, 0x37, }}, /* Byte value: 0x86 */ + {{0x20, 0x36, 0x31, 0xcb, 0xea, 0x52, 0xa7, 0x12, }}, /* Byte value: 0x87 */ + {{0x53, 0xb0, 0x76, 0xb9, 0x07, 0x77, 0x1a, 0xd1, }}, /* Byte value: 0x88 */ + {{0xd0, 0xaf, 0x5f, 0x7b, 0x4c, 0x06, 0xe6, 0x65, }}, /* Byte value: 0x89 */ + {{0x95, 0x49, 0xc9, 0x96, 0xf4, 0x6f, 0x04, 0x86, }}, /* Byte value: 0x8a */ + {{0xf3, 0x5e, 0x83, 0xd8, 0xc3, 0xae, 0x64, 0x8b, }}, /* Byte value: 0x8b */ + {{0x85, 0x52, 0x30, 0x12, 0x81, 0x46, 0xb6, 0x8f, }}, /* Byte value: 0x8c */ + {{0x88, 0x34, 0x59, 0xe8, 0xf5, 0x7e, 0x80, 0xad, }}, /* Byte value: 0x8d */ + {{0xb0, 0xf5, 0x0c, 0xe5, 0xb1, 0xf0, 0xcc, 0x53, }}, /* Byte value: 0x8e */ + {{0x22, 0x0d, 0x87, 0x3a, 0xac, 0xfe, 0x20, 0xba, }}, /* Byte value: 0x8f */ + {{0x0b, 0x2b, 0x70, 0x2a, 0xbe, 0x0f, 0x7c, 0x19, }}, /* Byte value: 0x90 */ + {{0x02, 0x3b, 0xb6, 0xf1, 0x46, 0xac, 0x87, 0xa8, }}, /* Byte value: 0x91 */ + {{0xc9, 0xa4, 0x60, 0x24, 0xc1, 0x8c, 0xaf, 0xdd, }}, /* Byte value: 0x92 */ + {{0xdb, 0x84, 0x2f, 0x51, 0xf2, 0x09, 0x9a, 0x7c, }}, /* Byte value: 0x93 */ + {{0xb6, 0xb8, 0x15, 0x35, 0x7b, 0xc7, 0x86, 0x68, }}, /* Byte value: 0x94 */ + {{0x40, 0x6c, 0x62, 0x55, 0x17, 0xa4, 0x8d, 0x24, }}, /* Byte value: 0x95 */ + {{0x4e, 0xcd, 0xe6, 0xc7, 0x06, 0x66, 0x9e, 0xfa, }}, /* Byte value: 0x96 */ + {{0xd7, 0x1e, 0x1d, 0x32, 0xa5, 0x67, 0x0e, 0x0a, }}, /* Byte value: 0x97 */ + {{0xab, 0xc5, 0x85, 0x4b, 0x7a, 0xd6, 0x02, 0x43, }}, /* Byte value: 0x98 */ + {{0x98, 0x2f, 0xa0, 0x6c, 0x80, 0x57, 0x32, 0xa4, }}, /* Byte value: 0x99 */ + {{0xc8, 0x58, 0x3b, 0xbd, 0xe2, 0xda, 0x0d, 0x89, }}, /* Byte value: 0x9a */ + {{0xaf, 0xb3, 0x2a, 0x6a, 0xf6, 0x4d, 0xcf, 0xd0, }}, /* Byte value: 0x9b */ + {{0xa3, 0x29, 0x18, 0x09, 0xa1, 0x23, 0x5b, 0xa6, }}, /* Byte value: 0x9c */ + {{0x44, 0x1a, 0xcd, 0x74, 0x9b, 0x3f, 0x40, 0xb7, }}, /* Byte value: 0x9d */ + {{0x84, 0xae, 0x6b, 0x8b, 0xa2, 0x10, 0x14, 0xdb, }}, /* Byte value: 0x9e */ + {{0x9e, 0x62, 0xb9, 0xbc, 0x4a, 0x60, 0x78, 0x9f, }}, /* Byte value: 0x9f */ + {{0xe2, 0xb9, 0x21, 0xc5, 0x95, 0xd1, 0x74, 0xd6, }}, /* Byte value: 0xa0 */ + {{0xcd, 0xd2, 0xcf, 0x05, 0x4d, 0x17, 0x62, 0x4e, }}, /* Byte value: 0xa1 */ + {{0xfb, 0xb2, 0x1e, 0x9a, 0x18, 0x5b, 0x3d, 0x6e, }}, /* Byte value: 0xa2 */ + {{0x45, 0xe6, 0x96, 0xed, 0xb8, 0x69, 0xe2, 0xe3, }}, /* Byte value: 0xa3 */ + {{0x23, 0xf1, 0xdc, 0xa3, 0x8f, 0xa8, 0x82, 0xee, }}, /* Byte value: 0xa4 */ + {{0xc6, 0xf9, 0xbf, 0x2f, 0xf3, 0x18, 0x1e, 0x57, }}, /* Byte value: 0xa5 */ + {{0x3d, 0x4b, 0xa1, 0xb5, 0xeb, 0x43, 0x23, 0x39, }}, /* Byte value: 0xa6 */ + {{0x17, 0xaa, 0xbb, 0xcd, 0x9c, 0x48, 0x5a, 0x66, }}, /* Byte value: 0xa7 */ + {{0xeb, 0xa9, 0xe7, 0x1e, 0x6d, 0x72, 0x8f, 0x67, }}, /* Byte value: 0xa8 */ + {{0x2e, 0x97, 0xb5, 0x59, 0xfb, 0x90, 0xb4, 0xcc, }}, /* Byte value: 0xa9 */ + {{0xcb, 0x9f, 0xd6, 0xd5, 0x87, 0x20, 0x28, 0x75, }}, /* Byte value: 0xaa */ + {{0xb2, 0xce, 0xba, 0x14, 0xf7, 0x5c, 0x4b, 0xfb, }}, /* Byte value: 0xab */ + {{0x5c, 0xed, 0xa9, 0xb2, 0x35, 0xe3, 0xab, 0x5b, }}, /* Byte value: 0xac */ + {{0x4a, 0xbb, 0x49, 0xe6, 0x8a, 0xfd, 0x53, 0x69, }}, /* Byte value: 0xad */ + {{0x64, 0x2c, 0xfc, 0xbf, 0x71, 0x6d, 0xe7, 0xa5, }}, /* Byte value: 0xae */ + {{0x71, 0xbd, 0xf1, 0x83, 0xab, 0x89, 0x3a, 0x6b, }}, /* Byte value: 0xaf */ + {{0x35, 0xa7, 0x3c, 0xf7, 0x30, 0xb6, 0x7a, 0xdc, }}, /* Byte value: 0xb0 */ + {{0xc7, 0x05, 0xe4, 0xb6, 0xd0, 0x4e, 0xbc, 0x03, }}, /* Byte value: 0xb1 */ + {{0x07, 0xb1, 0x42, 0x49, 0xe9, 0x61, 0xe8, 0x6f, }}, /* Byte value: 0xb2 */ + {{0x59, 0x67, 0x5d, 0x0a, 0x9a, 0x2e, 0xc4, 0x9c, }}, /* Byte value: 0xb3 */ + {{0x38, 0xc1, 0x55, 0x0d, 0x44, 0x8e, 0x4c, 0xfe, }}, /* Byte value: 0xb4 */ + {{0xea, 0x55, 0xbc, 0x87, 0x4e, 0x24, 0x2d, 0x33, }}, /* Byte value: 0xb5 */ + {{0x37, 0x9c, 0x8a, 0x06, 0x76, 0x1a, 0xfd, 0x74, }}, /* Byte value: 0xb6 */ + {{0x63, 0x9d, 0xbe, 0xf6, 0x98, 0x0c, 0x0f, 0xca, }}, /* Byte value: 0xb7 */ + {{0x18, 0xf7, 0x64, 0xc6, 0xae, 0xdc, 0xeb, 0xec, }}, /* Byte value: 0xb8 */ + {{0xa7, 0x5f, 0xb7, 0x28, 0x2d, 0xb8, 0x96, 0x35, }}, /* Byte value: 0xb9 */ + {{0x58, 0x9b, 0x06, 0x93, 0xb9, 0x78, 0x66, 0xc8, }}, /* Byte value: 0xba */ + {{0x11, 0xe7, 0xa2, 0x1d, 0x56, 0x7f, 0x10, 0x5d, }}, /* Byte value: 0xbb */ + {{0xf5, 0x13, 0x9a, 0x08, 0x09, 0x99, 0x2e, 0xb0, }}, /* Byte value: 0xbc */ + {{0xd9, 0xbf, 0x99, 0xa0, 0xb4, 0xa5, 0x1d, 0xd4, }}, /* Byte value: 0xbd */ + {{0xe9, 0x92, 0x51, 0xef, 0x2b, 0xde, 0x08, 0xcf, }}, /* Byte value: 0xbe */ + {{0x25, 0xbc, 0xc5, 0x73, 0x45, 0x9f, 0xc8, 0xd5, }}, /* Byte value: 0xbf */ + {{0xf8, 0x75, 0xf3, 0xf2, 0x7d, 0xa1, 0x18, 0x92, }}, /* Byte value: 0xc0 */ + {{0x97, 0x72, 0x7f, 0x67, 0xb2, 0xc3, 0x83, 0x2e, }}, /* Byte value: 0xc1 */ + {{0xb1, 0x09, 0x57, 0x7c, 0x92, 0xa6, 0x6e, 0x07, }}, /* Byte value: 0xc2 */ + {{0x19, 0x0b, 0x3f, 0x5f, 0x8d, 0x8a, 0x49, 0xb8, }}, /* Byte value: 0xc3 */ + {{0x0f, 0x5d, 0xdf, 0x0b, 0x32, 0x94, 0xb1, 0x8a, }}, /* Byte value: 0xc4 */ + {{0x89, 0xc8, 0x02, 0x71, 0xd6, 0x28, 0x22, 0xf9, }}, /* Byte value: 0xc5 */ + {{0xdc, 0x35, 0x6d, 0x18, 0x1b, 0x68, 0x72, 0x13, }}, /* Byte value: 0xc6 */ + {{0x08, 0xec, 0x9d, 0x42, 0xdb, 0xf5, 0x59, 0xe5, }}, /* Byte value: 0xc7 */ + {{0xf1, 0x65, 0x35, 0x29, 0x85, 0x02, 0xe3, 0x23, }}, /* Byte value: 0xc8 */ + {{0xa8, 0x02, 0x68, 0x23, 0x1f, 0x2c, 0x27, 0xbf, }}, /* Byte value: 0xc9 */ + {{0x0e, 0xa1, 0x84, 0x92, 0x11, 0xc2, 0x13, 0xde, }}, /* Byte value: 0xca */ + {{0x6f, 0x07, 0x8c, 0x95, 0xcf, 0x62, 0x9b, 0xbc, }}, /* Byte value: 0xcb */ + {{0x7d, 0x27, 0xc3, 0xe0, 0xfc, 0xe7, 0xae, 0x1d, }}, /* Byte value: 0xcc */ + {{0xd4, 0xd9, 0xf0, 0x5a, 0xc0, 0x9d, 0x2b, 0xf6, }}, /* Byte value: 0xcd */ + {{0xbd, 0x93, 0x65, 0x1f, 0xc5, 0xc8, 0xfa, 0x71, }}, /* Byte value: 0xce */ + {{0x86, 0x95, 0xdd, 0x7a, 0xe4, 0xbc, 0x93, 0x73, }}, /* Byte value: 0xcf */ + {{0xec, 0x18, 0xa5, 0x57, 0x84, 0x13, 0x67, 0x08, }}, /* Byte value: 0xd0 */ + {{0x32, 0x16, 0x7e, 0xbe, 0xd9, 0xd7, 0x92, 0xb3, }}, /* Byte value: 0xd1 */ + {{0x7e, 0xe0, 0x2e, 0x88, 0x99, 0x1d, 0x8b, 0xe1, }}, /* Byte value: 0xd2 */ + {{0xed, 0xe4, 0xfe, 0xce, 0xa7, 0x45, 0xc5, 0x5c, }}, /* Byte value: 0xd3 */ + {{0x6e, 0xfb, 0xd7, 0x0c, 0xec, 0x34, 0x39, 0xe8, }}, /* Byte value: 0xd4 */ + {{0xc3, 0x73, 0x4b, 0x97, 0x5c, 0xd5, 0x71, 0x90, }}, /* Byte value: 0xd5 */ + {{0x21, 0xca, 0x6a, 0x52, 0xc9, 0x04, 0x05, 0x46, }}, /* Byte value: 0xd6 */ + {{0x62, 0x61, 0xe5, 0x6f, 0xbb, 0x5a, 0xad, 0x9e, }}, /* Byte value: 0xd7 */ + {{0xce, 0x15, 0x22, 0x6d, 0x28, 0xed, 0x47, 0xb2, }}, /* Byte value: 0xd8 */ + {{0x93, 0x04, 0xd0, 0x46, 0x3e, 0x58, 0x4e, 0xbd, }}, /* Byte value: 0xd9 */ + {{0x4c, 0xf6, 0x50, 0x36, 0x40, 0xca, 0x19, 0x52, }}, /* Byte value: 0xda */ + {{0xde, 0x0e, 0xdb, 0xe9, 0x5d, 0xc4, 0xf5, 0xbb, }}, /* Byte value: 0xdb */ + {{0x3f, 0x70, 0x17, 0x44, 0xad, 0xef, 0xa4, 0x91, }}, /* Byte value: 0xdc */ + {{0x43, 0xab, 0x8f, 0x3d, 0x72, 0x5e, 0xa8, 0xd8, }}, /* Byte value: 0xdd */ + {{0x73, 0x86, 0x47, 0x72, 0xed, 0x25, 0xbd, 0xc3, }}, /* Byte value: 0xde */ + {{0xad, 0x88, 0x9c, 0x9b, 0xb0, 0xe1, 0x48, 0x78, }}, /* Byte value: 0xdf */ + {{0xf0, 0x99, 0x6e, 0xb0, 0xa6, 0x54, 0x41, 0x77, }}, /* Byte value: 0xe0 */ + {{0x47, 0xdd, 0x20, 0x1c, 0xfe, 0xc5, 0x65, 0x4b, }}, /* Byte value: 0xe1 */ + {{0x3c, 0xb7, 0xfa, 0x2c, 0xc8, 0x15, 0x81, 0x6d, }}, /* Byte value: 0xe2 */ + {{0x61, 0xa6, 0x08, 0x07, 0xde, 0xa0, 0x88, 0x62, }}, /* Byte value: 0xe3 */ + {{0x56, 0x3a, 0x82, 0x01, 0xa8, 0xba, 0x75, 0x16, }}, /* Byte value: 0xe4 */ + {{0x29, 0x26, 0xf7, 0x10, 0x12, 0xf1, 0x5c, 0xa3, }}, /* Byte value: 0xe5 */ + {{0x7b, 0x6a, 0xda, 0x30, 0x36, 0xd0, 0xe4, 0x26, }}, /* Byte value: 0xe6 */ + {{0x10, 0x1b, 0xf9, 0x84, 0x75, 0x29, 0xb2, 0x09, }}, /* Byte value: 0xe7 */ + {{0xff, 0xc4, 0xb1, 0xbb, 0x94, 0xc0, 0xf0, 0xfd, }}, /* Byte value: 0xe8 */ + {{0x5d, 0x11, 0xf2, 0x2b, 0x16, 0xb5, 0x09, 0x0f, }}, /* Byte value: 0xe9 */ + {{0x31, 0xd1, 0x93, 0xd6, 0xbc, 0x2d, 0xb7, 0x4f, }}, /* Byte value: 0xea */ + {{0xb7, 0x44, 0x4e, 0xac, 0x58, 0x91, 0x24, 0x3c, }}, /* Byte value: 0xeb */ + {{0xb3, 0x32, 0xe1, 0x8d, 0xd4, 0x0a, 0xe9, 0xaf, }}, /* Byte value: 0xec */ + {{0x6b, 0x71, 0x23, 0xb4, 0x43, 0xf9, 0x56, 0x2f, }}, /* Byte value: 0xed */ + {{0xc0, 0xb4, 0xa6, 0xff, 0x39, 0x2f, 0x54, 0x6c, }}, /* Byte value: 0xee */ + {{0x7f, 0x1c, 0x75, 0x11, 0xba, 0x4b, 0x29, 0xb5, }}, /* Byte value: 0xef */ + {{0x1e, 0xba, 0x7d, 0x16, 0x64, 0xeb, 0xa1, 0xd7, }}, /* Byte value: 0xf0 */ + {{0xd1, 0x53, 0x04, 0xe2, 0x6f, 0x50, 0x44, 0x31, }}, /* Byte value: 0xf1 */ + {{0x78, 0xad, 0x37, 0x58, 0x53, 0x2a, 0xc1, 0xda, }}, /* Byte value: 0xf2 */ + {{0xc2, 0x8f, 0x10, 0x0e, 0x7f, 0x83, 0xd3, 0xc4, }}, /* Byte value: 0xf3 */ + {{0xbb, 0xde, 0x7c, 0xcf, 0x0f, 0xff, 0xb0, 0x4a, }}, /* Byte value: 0xf4 */ + {{0x6d, 0x3c, 0x3a, 0x64, 0x89, 0xce, 0x1c, 0x14, }}, /* Byte value: 0xf5 */ + {{0xe1, 0x7e, 0xcc, 0xad, 0xf0, 0x2b, 0x51, 0x2a, }}, /* Byte value: 0xf6 */ + {{0x1f, 0x46, 0x26, 0x8f, 0x47, 0xbd, 0x03, 0x83, }}, /* Byte value: 0xf7 */ + {{0x82, 0xe3, 0x72, 0x5b, 0x68, 0x27, 0x5e, 0xe0, }}, /* Byte value: 0xf8 */ + {{0xba, 0x22, 0x27, 0x56, 0x2c, 0xa9, 0x12, 0x1e, }}, /* Byte value: 0xf9 */ + {{0x8c, 0x42, 0xf6, 0xc9, 0x79, 0xe5, 0x4d, 0x3e, }}, /* Byte value: 0xfa */ + {{0xcf, 0xe9, 0x79, 0xf4, 0x0b, 0xbb, 0xe5, 0xe6, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xfe, 0x38, 0xea, 0x22, 0xb7, 0x96, 0x52, 0xa9, }}, /* Byte value: 0xfd */ + {{0x42, 0x57, 0xd4, 0xa4, 0x51, 0x08, 0x0a, 0x8c, }}, /* Byte value: 0xfe */ + {{0xd6, 0xe2, 0x46, 0xab, 0x86, 0x31, 0xac, 0x5e, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 7 */ + {{0xa5, 0x9d, 0x85, 0x46, 0x8a, 0x0e, 0x61, 0xc4, }}, /* Byte value: 0x00 */ + {{0x2d, 0x30, 0x7c, 0xb1, 0xb2, 0x96, 0xab, 0x86, }}, /* Byte value: 0x01 */ + {{0x32, 0xb3, 0x29, 0xf1, 0xe6, 0xb1, 0x53, 0x61, }}, /* Byte value: 0x02 */ + {{0x8f, 0xc2, 0x69, 0x55, 0xf0, 0x82, 0xf2, 0x7d, }}, /* Byte value: 0x03 */ + {{0x0e, 0xde, 0xe3, 0x87, 0x53, 0x34, 0x70, 0x7e, }}, /* Byte value: 0x04 */ + {{0x30, 0x1b, 0x49, 0x07, 0xfb, 0x7a, 0x43, 0x73, }}, /* Byte value: 0x05 */ + {{0x38, 0xfe, 0x0a, 0x59, 0x8f, 0xd0, 0x03, 0x3b, }}, /* Byte value: 0x06 */ + {{0xc0, 0x6c, 0xe7, 0x1c, 0x6a, 0x2b, 0xcf, 0x0f, }}, /* Byte value: 0x07 */ + {{0x54, 0xbe, 0x1b, 0x26, 0xf4, 0xdb, 0xe5, 0xb1, }}, /* Byte value: 0x08 */ + {{0xe6, 0x45, 0x88, 0x7e, 0x5e, 0x58, 0x3c, 0xda, }}, /* Byte value: 0x09 */ + {{0x9e, 0x9f, 0xdf, 0x92, 0xf7, 0x91, 0x7a, 0xe4, }}, /* Byte value: 0x0a */ + {{0x39, 0xaa, 0x3a, 0x22, 0x60, 0x54, 0x0b, 0x32, }}, /* Byte value: 0x0b */ + {{0x55, 0xea, 0x2b, 0x5d, 0x1b, 0x5f, 0xed, 0xb8, }}, /* Byte value: 0x0c */ + {{0x7e, 0xe1, 0xf7, 0x35, 0x8e, 0x57, 0x76, 0x08, }}, /* Byte value: 0x0d */ + {{0x52, 0x85, 0xbb, 0xff, 0xd3, 0x45, 0xd5, 0x87, }}, /* Byte value: 0x0e */ + {{0x91, 0x15, 0x0c, 0x6e, 0x4b, 0x21, 0x02, 0x93, }}, /* Byte value: 0x0f */ + {{0x64, 0xa5, 0x52, 0x21, 0x0f, 0xa1, 0xa6, 0xc2, }}, /* Byte value: 0x10 */ + {{0x03, 0xfc, 0x50, 0x8d, 0xf2, 0x4f, 0x18, 0x1b, }}, /* Byte value: 0x11 */ + {{0x57, 0x42, 0x4b, 0xab, 0x06, 0x94, 0xfd, 0xaa, }}, /* Byte value: 0x12 */ + {{0x5a, 0x60, 0xf8, 0xa1, 0xa7, 0xef, 0x95, 0xcf, }}, /* Byte value: 0x13 */ + {{0x1c, 0x7f, 0x05, 0xcd, 0xa6, 0x68, 0xe0, 0xfc, }}, /* Byte value: 0x14 */ + {{0x60, 0x36, 0x92, 0x0e, 0x35, 0xf4, 0x86, 0xe6, }}, /* Byte value: 0x15 */ + {{0x07, 0x6f, 0x90, 0xa2, 0xc8, 0x1a, 0x38, 0x3f, }}, /* Byte value: 0x16 */ + {{0x18, 0xec, 0xc5, 0xe2, 0x9c, 0x3d, 0xc0, 0xd8, }}, /* Byte value: 0x17 */ + {{0x21, 0x46, 0xff, 0xc0, 0xfc, 0x69, 0xcb, 0xea, }}, /* Byte value: 0x18 */ + {{0x72, 0x97, 0x74, 0x44, 0xc0, 0xa8, 0x16, 0x64, }}, /* Byte value: 0x19 */ + {{0xa8, 0xbf, 0x36, 0x4c, 0x2b, 0x75, 0x09, 0xa1, }}, /* Byte value: 0x1a */ + {{0xd1, 0x31, 0x51, 0xdb, 0x6d, 0x38, 0x47, 0x96, }}, /* Byte value: 0x1b */ + {{0x29, 0xa3, 0xbc, 0x9e, 0x88, 0xc3, 0x8b, 0xa2, }}, /* Byte value: 0x1c */ + {{0xc6, 0x57, 0x47, 0xc5, 0x4d, 0xb5, 0xff, 0x39, }}, /* Byte value: 0x1d */ + {{0xa4, 0xc9, 0xb5, 0x3d, 0x65, 0x8a, 0x69, 0xcd, }}, /* Byte value: 0x1e */ + {{0x3f, 0x91, 0x9a, 0xfb, 0x47, 0xca, 0x3b, 0x04, }}, /* Byte value: 0x1f */ + {{0xe0, 0x7e, 0x28, 0xa7, 0x79, 0xc6, 0x0c, 0xec, }}, /* Byte value: 0x20 */ + {{0x27, 0x7d, 0x5f, 0x19, 0xdb, 0xf7, 0xfb, 0xdc, }}, /* Byte value: 0x21 */ + {{0x8d, 0x6a, 0x09, 0xa3, 0xed, 0x49, 0xe2, 0x6f, }}, /* Byte value: 0x22 */ + {{0x0c, 0x76, 0x83, 0x71, 0x4e, 0xff, 0x60, 0x6c, }}, /* Byte value: 0x23 */ + {{0x82, 0xe0, 0xda, 0x5f, 0x51, 0xf9, 0x9a, 0x18, }}, /* Byte value: 0x24 */ + {{0xea, 0x33, 0x0b, 0x0f, 0x10, 0xa7, 0x5c, 0xb6, }}, /* Byte value: 0x25 */ + {{0xae, 0x84, 0x96, 0x95, 0x0c, 0xeb, 0x39, 0x97, }}, /* Byte value: 0x26 */ + {{0xb4, 0xc0, 0x33, 0x81, 0x8d, 0x1d, 0xe9, 0x5d, }}, /* Byte value: 0x27 */ + {{0x9a, 0x0c, 0x1f, 0xbd, 0xcd, 0xc4, 0x5a, 0xc0, }}, /* Byte value: 0x28 */ + {{0x63, 0xca, 0xc2, 0x83, 0xc7, 0xbb, 0x9e, 0xfd, }}, /* Byte value: 0x29 */ + {{0x49, 0x95, 0x2e, 0x90, 0xbd, 0x37, 0x0d, 0x44, }}, /* Byte value: 0x2a */ + {{0xe5, 0xb9, 0xd8, 0xf3, 0xac, 0x17, 0x24, 0xc1, }}, /* Byte value: 0x2b */ + {{0x42, 0x8c, 0x3d, 0x43, 0x3b, 0xd2, 0x55, 0x17, }}, /* Byte value: 0x2c */ + {{0xe4, 0xed, 0xe8, 0x88, 0x43, 0x93, 0x2c, 0xc8, }}, /* Byte value: 0x2d */ + {{0x15, 0xce, 0x76, 0xe8, 0x3d, 0x46, 0xa8, 0xbd, }}, /* Byte value: 0x2e */ + {{0xb7, 0x3c, 0x63, 0x0c, 0x7f, 0x52, 0xf1, 0x46, }}, /* Byte value: 0x2f */ + {{0xc8, 0x89, 0xa4, 0x42, 0x1e, 0x81, 0x8f, 0x47, }}, /* Byte value: 0x30 */ + {{0x06, 0x3b, 0xa0, 0xd9, 0x27, 0x9e, 0x30, 0x36, }}, /* Byte value: 0x31 */ + {{0x70, 0x3f, 0x14, 0xb2, 0xdd, 0x63, 0x06, 0x76, }}, /* Byte value: 0x32 */ + {{0x9d, 0x63, 0x8f, 0x1f, 0x05, 0xde, 0x62, 0xff, }}, /* Byte value: 0x33 */ + {{0x41, 0x70, 0x6d, 0xce, 0xc9, 0x9d, 0x4d, 0x0c, }}, /* Byte value: 0x34 */ + {{0x75, 0xf8, 0xe4, 0xe6, 0x08, 0xb2, 0x2e, 0x5b, }}, /* Byte value: 0x35 */ + {{0x19, 0xb8, 0xf5, 0x99, 0x73, 0xb9, 0xc8, 0xd1, }}, /* Byte value: 0x36 */ + {{0xc9, 0xdd, 0x94, 0x39, 0xf1, 0x05, 0x87, 0x4e, }}, /* Byte value: 0x37 */ + {{0xaa, 0x17, 0x56, 0xba, 0x36, 0xbe, 0x19, 0xb3, }}, /* Byte value: 0x38 */ + {{0xfc, 0x01, 0x2d, 0x6a, 0xdf, 0xae, 0xec, 0x10, }}, /* Byte value: 0x39 */ + {{0x4d, 0x06, 0xee, 0xbf, 0x87, 0x62, 0x2d, 0x60, }}, /* Byte value: 0x3a */ + {{0xbf, 0xd9, 0x20, 0x52, 0x0b, 0xf8, 0xb1, 0x0e, }}, /* Byte value: 0x3b */ + {{0x2a, 0x5f, 0xec, 0x13, 0x7a, 0x8c, 0x93, 0xb9, }}, /* Byte value: 0x3c */ + {{0x73, 0xc3, 0x44, 0x3f, 0x2f, 0x2c, 0x1e, 0x6d, }}, /* Byte value: 0x3d */ + {{0x84, 0xdb, 0x7a, 0x86, 0x76, 0x67, 0xaa, 0x2e, }}, /* Byte value: 0x3e */ + {{0xd5, 0xa2, 0x91, 0xf4, 0x57, 0x6d, 0x67, 0xb2, }}, /* Byte value: 0x3f */ + {{0xc3, 0x90, 0xb7, 0x91, 0x98, 0x64, 0xd7, 0x14, }}, /* Byte value: 0x40 */ + {{0xaf, 0xd0, 0xa6, 0xee, 0xe3, 0x6f, 0x31, 0x9e, }}, /* Byte value: 0x41 */ + {{0x2b, 0x0b, 0xdc, 0x68, 0x95, 0x08, 0x9b, 0xb0, }}, /* Byte value: 0x42 */ + {{0x86, 0x73, 0x1a, 0x70, 0x6b, 0xac, 0xba, 0x3c, }}, /* Byte value: 0x43 */ + {{0xa7, 0x35, 0xe5, 0xb0, 0x97, 0xc5, 0x71, 0xd6, }}, /* Byte value: 0x44 */ + {{0xb1, 0x07, 0xc3, 0xd5, 0x58, 0xcc, 0xc1, 0x70, }}, /* Byte value: 0x45 */ + {{0xb2, 0xfb, 0x93, 0x58, 0xaa, 0x83, 0xd9, 0x6b, }}, /* Byte value: 0x46 */ + {{0x5b, 0x34, 0xc8, 0xda, 0x48, 0x6b, 0x9d, 0xc6, }}, /* Byte value: 0x47 */ + {{0x46, 0x1f, 0xfd, 0x6c, 0x01, 0x87, 0x75, 0x33, }}, /* Byte value: 0x48 */ + {{0xd3, 0x99, 0x31, 0x2d, 0x70, 0xf3, 0x57, 0x84, }}, /* Byte value: 0x49 */ + {{0x9f, 0xcb, 0xef, 0xe9, 0x18, 0x15, 0x72, 0xed, }}, /* Byte value: 0x4a */ + {{0xfd, 0x55, 0x1d, 0x11, 0x30, 0x2a, 0xe4, 0x19, }}, /* Byte value: 0x4b */ + {{0xd4, 0xf6, 0xa1, 0x8f, 0xb8, 0xe9, 0x6f, 0xbb, }}, /* Byte value: 0x4c */ + {{0x0f, 0x8a, 0xd3, 0xfc, 0xbc, 0xb0, 0x78, 0x77, }}, /* Byte value: 0x4d */ + {{0x9c, 0x37, 0xbf, 0x64, 0xea, 0x5a, 0x6a, 0xf6, }}, /* Byte value: 0x4e */ + {{0x2f, 0x98, 0x1c, 0x47, 0xaf, 0x5d, 0xbb, 0x94, }}, /* Byte value: 0x4f */ + {{0x9b, 0x58, 0x2f, 0xc6, 0x22, 0x40, 0x52, 0xc9, }}, /* Byte value: 0x50 */ + {{0x43, 0xd8, 0x0d, 0x38, 0xd4, 0x56, 0x5d, 0x1e, }}, /* Byte value: 0x51 */ + {{0xef, 0xf4, 0xfb, 0x5b, 0xc5, 0x76, 0x74, 0x9b, }}, /* Byte value: 0x52 */ + {{0xd9, 0xd4, 0x12, 0x85, 0x19, 0x92, 0x07, 0xde, }}, /* Byte value: 0x53 */ + {{0x79, 0x8e, 0x67, 0x97, 0x46, 0x4d, 0x4e, 0x37, }}, /* Byte value: 0x54 */ + {{0xb6, 0x68, 0x53, 0x77, 0x90, 0xd6, 0xf9, 0x4f, }}, /* Byte value: 0x55 */ + {{0x53, 0xd1, 0x8b, 0x84, 0x3c, 0xc1, 0xdd, 0x8e, }}, /* Byte value: 0x56 */ + {{0x7f, 0xb5, 0xc7, 0x4e, 0x61, 0xd3, 0x7e, 0x01, }}, /* Byte value: 0x57 */ + {{0xc1, 0x38, 0xd7, 0x67, 0x85, 0xaf, 0xc7, 0x06, }}, /* Byte value: 0x58 */ + {{0xf0, 0x77, 0xae, 0x1b, 0x91, 0x51, 0x8c, 0x7c, }}, /* Byte value: 0x59 */ + {{0x23, 0xee, 0x9f, 0x36, 0xe1, 0xa2, 0xdb, 0xf8, }}, /* Byte value: 0x5a */ + {{0xe7, 0x11, 0xb8, 0x05, 0xb1, 0xdc, 0x34, 0xd3, }}, /* Byte value: 0x5b */ + {{0x25, 0xd5, 0x3f, 0xef, 0xc6, 0x3c, 0xeb, 0xce, }}, /* Byte value: 0x5c */ + {{0x5e, 0xf3, 0x38, 0x8e, 0x9d, 0xba, 0xb5, 0xeb, }}, /* Byte value: 0x5d */ + {{0xb5, 0x94, 0x03, 0xfa, 0x62, 0x99, 0xe1, 0x54, }}, /* Byte value: 0x5e */ + {{0x1e, 0xd7, 0x65, 0x3b, 0xbb, 0xa3, 0xf0, 0xee, }}, /* Byte value: 0x5f */ + {{0xa2, 0xf2, 0x15, 0xe4, 0x42, 0x14, 0x59, 0xfb, }}, /* Byte value: 0x60 */ + {{0xdf, 0xef, 0xb2, 0x5c, 0x3e, 0x0c, 0x37, 0xe8, }}, /* Byte value: 0x61 */ + {{0xa6, 0x61, 0xd5, 0xcb, 0x78, 0x41, 0x79, 0xdf, }}, /* Byte value: 0x62 */ + {{0xfe, 0xa9, 0x4d, 0x9c, 0xc2, 0x65, 0xfc, 0x02, }}, /* Byte value: 0x63 */ + {{0xac, 0x2c, 0xf6, 0x63, 0x11, 0x20, 0x29, 0x85, }}, /* Byte value: 0x64 */ + {{0x22, 0xba, 0xaf, 0x4d, 0x0e, 0x26, 0xd3, 0xf1, }}, /* Byte value: 0x65 */ + {{0xf9, 0xc6, 0xdd, 0x3e, 0x0a, 0x7f, 0xc4, 0x3d, }}, /* Byte value: 0x66 */ + {{0xe2, 0xd6, 0x48, 0x51, 0x64, 0x0d, 0x1c, 0xfe, }}, /* Byte value: 0x67 */ + {{0x4a, 0x69, 0x7e, 0x1d, 0x4f, 0x78, 0x15, 0x5f, }}, /* Byte value: 0x68 */ + {{0xbc, 0x25, 0x70, 0xdf, 0xf9, 0xb7, 0xa9, 0x15, }}, /* Byte value: 0x69 */ + {{0x35, 0xdc, 0xb9, 0x53, 0x2e, 0xab, 0x6b, 0x5e, }}, /* Byte value: 0x6a */ + {{0xca, 0x21, 0xc4, 0xb4, 0x03, 0x4a, 0x9f, 0x55, }}, /* Byte value: 0x6b */ + {{0xee, 0xa0, 0xcb, 0x20, 0x2a, 0xf2, 0x7c, 0x92, }}, /* Byte value: 0x6c */ + {{0x78, 0xda, 0x57, 0xec, 0xa9, 0xc9, 0x46, 0x3e, }}, /* Byte value: 0x6d */ + {{0x05, 0xc7, 0xf0, 0x54, 0xd5, 0xd1, 0x28, 0x2d, }}, /* Byte value: 0x6e */ + {{0x6b, 0x2f, 0x81, 0xdd, 0xb3, 0x11, 0xde, 0xb5, }}, /* Byte value: 0x6f */ + {{0x51, 0x79, 0xeb, 0x72, 0x21, 0x0a, 0xcd, 0x9c, }}, /* Byte value: 0x70 */ + {{0xe1, 0x2a, 0x18, 0xdc, 0x96, 0x42, 0x04, 0xe5, }}, /* Byte value: 0x71 */ + {{0x59, 0x9c, 0xa8, 0x2c, 0x55, 0xa0, 0x8d, 0xd4, }}, /* Byte value: 0x72 */ + {{0xa3, 0xa6, 0x25, 0x9f, 0xad, 0x90, 0x51, 0xf2, }}, /* Byte value: 0x73 */ + {{0xf2, 0xdf, 0xce, 0xed, 0x8c, 0x9a, 0x9c, 0x6e, }}, /* Byte value: 0x74 */ + {{0x71, 0x6b, 0x24, 0xc9, 0x32, 0xe7, 0x0e, 0x7f, }}, /* Byte value: 0x75 */ + {{0x56, 0x16, 0x7b, 0xd0, 0xe9, 0x10, 0xf5, 0xa3, }}, /* Byte value: 0x76 */ + {{0x11, 0x5d, 0xb6, 0xc7, 0x07, 0x13, 0x88, 0x99, }}, /* Byte value: 0x77 */ + {{0x6a, 0x7b, 0xb1, 0xa6, 0x5c, 0x95, 0xd6, 0xbc, }}, /* Byte value: 0x78 */ + {{0x89, 0xf9, 0xc9, 0x8c, 0xd7, 0x1c, 0xc2, 0x4b, }}, /* Byte value: 0x79 */ + {{0x94, 0xd2, 0xfc, 0x3a, 0x9e, 0xf0, 0x2a, 0xbe, }}, /* Byte value: 0x7a */ + {{0x65, 0xf1, 0x62, 0x5a, 0xe0, 0x25, 0xae, 0xcb, }}, /* Byte value: 0x7b */ + {{0x8c, 0x3e, 0x39, 0xd8, 0x02, 0xcd, 0xea, 0x66, }}, /* Byte value: 0x7c */ + {{0xbb, 0x4a, 0xe0, 0x7d, 0x31, 0xad, 0x91, 0x2a, }}, /* Byte value: 0x7d */ + {{0x77, 0x50, 0x84, 0x10, 0x15, 0x79, 0x3e, 0x49, }}, /* Byte value: 0x7e */ + {{0x3c, 0x6d, 0xca, 0x76, 0xb5, 0x85, 0x23, 0x1f, }}, /* Byte value: 0x7f */ + {{0x7b, 0x26, 0x07, 0x61, 0x5b, 0x86, 0x5e, 0x25, }}, /* Byte value: 0x80 */ + {{0x28, 0xf7, 0x8c, 0xe5, 0x67, 0x47, 0x83, 0xab, }}, /* Byte value: 0x81 */ + {{0xab, 0x43, 0x66, 0xc1, 0xd9, 0x3a, 0x11, 0xba, }}, /* Byte value: 0x82 */ + {{0xd2, 0xcd, 0x01, 0x56, 0x9f, 0x77, 0x5f, 0x8d, }}, /* Byte value: 0x83 */ + {{0x31, 0x4f, 0x79, 0x7c, 0x14, 0xfe, 0x4b, 0x7a, }}, /* Byte value: 0x84 */ + {{0xde, 0xbb, 0x82, 0x27, 0xd1, 0x88, 0x3f, 0xe1, }}, /* Byte value: 0x85 */ + {{0xc4, 0xff, 0x27, 0x33, 0x50, 0x7e, 0xef, 0x2b, }}, /* Byte value: 0x86 */ + {{0x5f, 0xa7, 0x08, 0xf5, 0x72, 0x3e, 0xbd, 0xe2, }}, /* Byte value: 0x87 */ + {{0xcc, 0x1a, 0x64, 0x6d, 0x24, 0xd4, 0xaf, 0x63, }}, /* Byte value: 0x88 */ + {{0xcf, 0xe6, 0x34, 0xe0, 0xd6, 0x9b, 0xb7, 0x78, }}, /* Byte value: 0x89 */ + {{0x76, 0x04, 0xb4, 0x6b, 0xfa, 0xfd, 0x36, 0x40, }}, /* Byte value: 0x8a */ + {{0x2c, 0x64, 0x4c, 0xca, 0x5d, 0x12, 0xa3, 0x8f, }}, /* Byte value: 0x8b */ + {{0xb8, 0xb6, 0xb0, 0xf0, 0xc3, 0xe2, 0x89, 0x31, }}, /* Byte value: 0x8c */ + {{0xd8, 0x80, 0x22, 0xfe, 0xf6, 0x16, 0x0f, 0xd7, }}, /* Byte value: 0x8d */ + {{0x2e, 0xcc, 0x2c, 0x3c, 0x40, 0xd9, 0xb3, 0x9d, }}, /* Byte value: 0x8e */ + {{0x36, 0x20, 0xe9, 0xde, 0xdc, 0xe4, 0x73, 0x45, }}, /* Byte value: 0x8f */ + {{0xdb, 0x7c, 0x72, 0x73, 0x04, 0x59, 0x17, 0xcc, }}, /* Byte value: 0x90 */ + {{0x69, 0x87, 0xe1, 0x2b, 0xae, 0xda, 0xce, 0xa7, }}, /* Byte value: 0x91 */ + {{0xb3, 0xaf, 0xa3, 0x23, 0x45, 0x07, 0xd1, 0x62, }}, /* Byte value: 0x92 */ + {{0x14, 0x9a, 0x46, 0x93, 0xd2, 0xc2, 0xa0, 0xb4, }}, /* Byte value: 0x93 */ + {{0x95, 0x86, 0xcc, 0x41, 0x71, 0x74, 0x22, 0xb7, }}, /* Byte value: 0x94 */ + {{0xbe, 0x8d, 0x10, 0x29, 0xe4, 0x7c, 0xb9, 0x07, }}, /* Byte value: 0x95 */ + {{0x62, 0x9e, 0xf2, 0xf8, 0x28, 0x3f, 0x96, 0xf4, }}, /* Byte value: 0x96 */ + {{0xa1, 0x0e, 0x45, 0x69, 0xb0, 0x5b, 0x41, 0xe0, }}, /* Byte value: 0x97 */ + {{0x3b, 0x02, 0x5a, 0xd4, 0x7d, 0x9f, 0x1b, 0x20, }}, /* Byte value: 0x98 */ + {{0x16, 0x32, 0x26, 0x65, 0xcf, 0x09, 0xb0, 0xa6, }}, /* Byte value: 0x99 */ + {{0x66, 0x0d, 0x32, 0xd7, 0x12, 0x6a, 0xb6, 0xd0, }}, /* Byte value: 0x9a */ + {{0xe9, 0xcf, 0x5b, 0x82, 0xe2, 0xe8, 0x44, 0xad, }}, /* Byte value: 0x9b */ + {{0x5c, 0x5b, 0x58, 0x78, 0x80, 0x71, 0xa5, 0xf9, }}, /* Byte value: 0x9c */ + {{0x6c, 0x40, 0x11, 0x7f, 0x7b, 0x0b, 0xe6, 0x8a, }}, /* Byte value: 0x9d */ + {{0x6d, 0x14, 0x21, 0x04, 0x94, 0x8f, 0xee, 0x83, }}, /* Byte value: 0x9e */ + {{0xad, 0x78, 0xc6, 0x18, 0xfe, 0xa4, 0x21, 0x8c, }}, /* Byte value: 0x9f */ + {{0x37, 0x74, 0xd9, 0xa5, 0x33, 0x60, 0x7b, 0x4c, }}, /* Byte value: 0xa0 */ + {{0x61, 0x62, 0xa2, 0x75, 0xda, 0x70, 0x8e, 0xef, }}, /* Byte value: 0xa1 */ + {{0x4b, 0x3d, 0x4e, 0x66, 0xa0, 0xfc, 0x1d, 0x56, }}, /* Byte value: 0xa2 */ + {{0xb9, 0xe2, 0x80, 0x8b, 0x2c, 0x66, 0x81, 0x38, }}, /* Byte value: 0xa3 */ + {{0xe3, 0x82, 0x78, 0x2a, 0x8b, 0x89, 0x14, 0xf7, }}, /* Byte value: 0xa4 */ + {{0xba, 0x1e, 0xd0, 0x06, 0xde, 0x29, 0x99, 0x23, }}, /* Byte value: 0xa5 */ + {{0xf1, 0x23, 0x9e, 0x60, 0x7e, 0xd5, 0x84, 0x75, }}, /* Byte value: 0xa6 */ + {{0xa0, 0x5a, 0x75, 0x12, 0x5f, 0xdf, 0x49, 0xe9, }}, /* Byte value: 0xa7 */ + {{0x85, 0x8f, 0x4a, 0xfd, 0x99, 0xe3, 0xa2, 0x27, }}, /* Byte value: 0xa8 */ + {{0x83, 0xb4, 0xea, 0x24, 0xbe, 0x7d, 0x92, 0x11, }}, /* Byte value: 0xa9 */ + {{0xda, 0x28, 0x42, 0x08, 0xeb, 0xdd, 0x1f, 0xc5, }}, /* Byte value: 0xaa */ + {{0x47, 0x4b, 0xcd, 0x17, 0xee, 0x03, 0x7d, 0x3a, }}, /* Byte value: 0xab */ + {{0xc5, 0xab, 0x17, 0x48, 0xbf, 0xfa, 0xe7, 0x22, }}, /* Byte value: 0xac */ + {{0xb0, 0x53, 0xf3, 0xae, 0xb7, 0x48, 0xc9, 0x79, }}, /* Byte value: 0xad */ + {{0x33, 0xe7, 0x19, 0x8a, 0x09, 0x35, 0x5b, 0x68, }}, /* Byte value: 0xae */ + {{0xfa, 0x3a, 0x8d, 0xb3, 0xf8, 0x30, 0xdc, 0x26, }}, /* Byte value: 0xaf */ + {{0x96, 0x7a, 0x9c, 0xcc, 0x83, 0x3b, 0x3a, 0xac, }}, /* Byte value: 0xb0 */ + {{0x6f, 0xbc, 0x41, 0xf2, 0x89, 0x44, 0xfe, 0x91, }}, /* Byte value: 0xb1 */ + {{0x6e, 0xe8, 0x71, 0x89, 0x66, 0xc0, 0xf6, 0x98, }}, /* Byte value: 0xb2 */ + {{0xc2, 0xc4, 0x87, 0xea, 0x77, 0xe0, 0xdf, 0x1d, }}, /* Byte value: 0xb3 */ + {{0xf6, 0x4c, 0x0e, 0xc2, 0xb6, 0xcf, 0xbc, 0x4a, }}, /* Byte value: 0xb4 */ + {{0x50, 0x2d, 0xdb, 0x09, 0xce, 0x8e, 0xc5, 0x95, }}, /* Byte value: 0xb5 */ + {{0xff, 0xfd, 0x7d, 0xe7, 0x2d, 0xe1, 0xf4, 0x0b, }}, /* Byte value: 0xb6 */ + {{0x5d, 0x0f, 0x68, 0x03, 0x6f, 0xf5, 0xad, 0xf0, }}, /* Byte value: 0xb7 */ + {{0xa9, 0xeb, 0x06, 0x37, 0xc4, 0xf1, 0x01, 0xa8, }}, /* Byte value: 0xb8 */ + {{0x8e, 0x96, 0x59, 0x2e, 0x1f, 0x06, 0xfa, 0x74, }}, /* Byte value: 0xb9 */ + {{0x17, 0x66, 0x16, 0x1e, 0x20, 0x8d, 0xb8, 0xaf, }}, /* Byte value: 0xba */ + {{0x1b, 0x10, 0x95, 0x6f, 0x6e, 0x72, 0xd8, 0xc3, }}, /* Byte value: 0xbb */ + {{0x97, 0x2e, 0xac, 0xb7, 0x6c, 0xbf, 0x32, 0xa5, }}, /* Byte value: 0xbc */ + {{0x7d, 0x1d, 0xa7, 0xb8, 0x7c, 0x18, 0x6e, 0x13, }}, /* Byte value: 0xbd */ + {{0xec, 0x08, 0xab, 0xd6, 0x37, 0x39, 0x6c, 0x80, }}, /* Byte value: 0xbe */ + {{0x58, 0xc8, 0x98, 0x57, 0xba, 0x24, 0x85, 0xdd, }}, /* Byte value: 0xbf */ + {{0xf7, 0x18, 0x3e, 0xb9, 0x59, 0x4b, 0xb4, 0x43, }}, /* Byte value: 0xc0 */ + {{0x1f, 0x83, 0x55, 0x40, 0x54, 0x27, 0xf8, 0xe7, }}, /* Byte value: 0xc1 */ + {{0xfb, 0x6e, 0xbd, 0xc8, 0x17, 0xb4, 0xd4, 0x2f, }}, /* Byte value: 0xc2 */ + {{0x7c, 0x49, 0x97, 0xc3, 0x93, 0x9c, 0x66, 0x1a, }}, /* Byte value: 0xc3 */ + {{0x09, 0xb1, 0x73, 0x25, 0x9b, 0x2e, 0x48, 0x41, }}, /* Byte value: 0xc4 */ + {{0x0d, 0x22, 0xb3, 0x0a, 0xa1, 0x7b, 0x68, 0x65, }}, /* Byte value: 0xc5 */ + {{0x7a, 0x72, 0x37, 0x1a, 0xb4, 0x02, 0x56, 0x2c, }}, /* Byte value: 0xc6 */ + {{0x67, 0x59, 0x02, 0xac, 0xfd, 0xee, 0xbe, 0xd9, }}, /* Byte value: 0xc7 */ + {{0x45, 0xe3, 0xad, 0xe1, 0xf3, 0xc8, 0x6d, 0x28, }}, /* Byte value: 0xc8 */ + {{0x87, 0x27, 0x2a, 0x0b, 0x84, 0x28, 0xb2, 0x35, }}, /* Byte value: 0xc9 */ + {{0xdc, 0x13, 0xe2, 0xd1, 0xcc, 0x43, 0x2f, 0xf3, }}, /* Byte value: 0xca */ + {{0xe8, 0x9b, 0x6b, 0xf9, 0x0d, 0x6c, 0x4c, 0xa4, }}, /* Byte value: 0xcb */ + {{0x4f, 0xae, 0x8e, 0x49, 0x9a, 0xa9, 0x3d, 0x72, }}, /* Byte value: 0xcc */ + {{0x1d, 0x2b, 0x35, 0xb6, 0x49, 0xec, 0xe8, 0xf5, }}, /* Byte value: 0xcd */ + {{0x4e, 0xfa, 0xbe, 0x32, 0x75, 0x2d, 0x35, 0x7b, }}, /* Byte value: 0xce */ + {{0x04, 0x93, 0xc0, 0x2f, 0x3a, 0x55, 0x20, 0x24, }}, /* Byte value: 0xcf */ + {{0xeb, 0x67, 0x3b, 0x74, 0xff, 0x23, 0x54, 0xbf, }}, /* Byte value: 0xd0 */ + {{0xf8, 0x92, 0xed, 0x45, 0xe5, 0xfb, 0xcc, 0x34, }}, /* Byte value: 0xd1 */ + {{0xf3, 0x8b, 0xfe, 0x96, 0x63, 0x1e, 0x94, 0x67, }}, /* Byte value: 0xd2 */ + {{0x3e, 0xc5, 0xaa, 0x80, 0xa8, 0x4e, 0x33, 0x0d, }}, /* Byte value: 0xd3 */ + {{0x3d, 0x39, 0xfa, 0x0d, 0x5a, 0x01, 0x2b, 0x16, }}, /* Byte value: 0xd4 */ + {{0xbd, 0x71, 0x40, 0xa4, 0x16, 0x33, 0xa1, 0x1c, }}, /* Byte value: 0xd5 */ + {{0x8a, 0x05, 0x99, 0x01, 0x25, 0x53, 0xda, 0x50, }}, /* Byte value: 0xd6 */ + {{0x88, 0xad, 0xf9, 0xf7, 0x38, 0x98, 0xca, 0x42, }}, /* Byte value: 0xd7 */ + {{0xdd, 0x47, 0xd2, 0xaa, 0x23, 0xc7, 0x27, 0xfa, }}, /* Byte value: 0xd8 */ + {{0xcd, 0x4e, 0x54, 0x16, 0xcb, 0x50, 0xa7, 0x6a, }}, /* Byte value: 0xd9 */ + {{0x0b, 0x19, 0x13, 0xd3, 0x86, 0xe5, 0x58, 0x53, }}, /* Byte value: 0xda */ + {{0x13, 0xf5, 0xd6, 0x31, 0x1a, 0xd8, 0x98, 0x8b, }}, /* Byte value: 0xdb */ + {{0x98, 0xa4, 0x7f, 0x4b, 0xd0, 0x0f, 0x4a, 0xd2, }}, /* Byte value: 0xdc */ + {{0x02, 0xa8, 0x60, 0xf6, 0x1d, 0xcb, 0x10, 0x12, }}, /* Byte value: 0xdd */ + {{0x93, 0xbd, 0x6c, 0x98, 0x56, 0xea, 0x12, 0x81, }}, /* Byte value: 0xde */ + {{0x80, 0x48, 0xba, 0xa9, 0x4c, 0x32, 0x8a, 0x0a, }}, /* Byte value: 0xdf */ + {{0x90, 0x41, 0x3c, 0x15, 0xa4, 0xa5, 0x0a, 0x9a, }}, /* Byte value: 0xe0 */ + {{0xd0, 0x65, 0x61, 0xa0, 0x82, 0xbc, 0x4f, 0x9f, }}, /* Byte value: 0xe1 */ + {{0x24, 0x81, 0x0f, 0x94, 0x29, 0xb8, 0xe3, 0xc7, }}, /* Byte value: 0xe2 */ + {{0x34, 0x88, 0x89, 0x28, 0xc1, 0x2f, 0x63, 0x57, }}, /* Byte value: 0xe3 */ + {{0xcb, 0x75, 0xf4, 0xcf, 0xec, 0xce, 0x97, 0x5c, }}, /* Byte value: 0xe4 */ + {{0xed, 0x5c, 0x9b, 0xad, 0xd8, 0xbd, 0x64, 0x89, }}, /* Byte value: 0xe5 */ + {{0xf4, 0xe4, 0x6e, 0x34, 0xab, 0x04, 0xac, 0x58, }}, /* Byte value: 0xe6 */ + {{0xce, 0xb2, 0x04, 0x9b, 0x39, 0x1f, 0xbf, 0x71, }}, /* Byte value: 0xe7 */ + {{0x99, 0xf0, 0x4f, 0x30, 0x3f, 0x8b, 0x42, 0xdb, }}, /* Byte value: 0xe8 */ + {{0x10, 0x09, 0x86, 0xbc, 0xe8, 0x97, 0x80, 0x90, }}, /* Byte value: 0xe9 */ + {{0x44, 0xb7, 0x9d, 0x9a, 0x1c, 0x4c, 0x65, 0x21, }}, /* Byte value: 0xea */ + {{0x40, 0x24, 0x5d, 0xb5, 0x26, 0x19, 0x45, 0x05, }}, /* Byte value: 0xeb */ + {{0x92, 0xe9, 0x5c, 0xe3, 0xb9, 0x6e, 0x1a, 0x88, }}, /* Byte value: 0xec */ + {{0x3a, 0x56, 0x6a, 0xaf, 0x92, 0x1b, 0x13, 0x29, }}, /* Byte value: 0xed */ + {{0x01, 0x54, 0x30, 0x7b, 0xef, 0x84, 0x08, 0x09, }}, /* Byte value: 0xee */ + {{0x26, 0x29, 0x6f, 0x62, 0x34, 0x73, 0xf3, 0xd5, }}, /* Byte value: 0xef */ + {{0x12, 0xa1, 0xe6, 0x4a, 0xf5, 0x5c, 0x90, 0x82, }}, /* Byte value: 0xf0 */ + {{0x1a, 0x44, 0xa5, 0x14, 0x81, 0xf6, 0xd0, 0xca, }}, /* Byte value: 0xf1 */ + {{0x48, 0xc1, 0x1e, 0xeb, 0x52, 0xb3, 0x05, 0x4d, }}, /* Byte value: 0xf2 */ + {{0x68, 0xd3, 0xd1, 0x50, 0x41, 0x5e, 0xc6, 0xae, }}, /* Byte value: 0xf3 */ + {{0xf5, 0xb0, 0x5e, 0x4f, 0x44, 0x80, 0xa4, 0x51, }}, /* Byte value: 0xf4 */ + {{0x81, 0x1c, 0x8a, 0xd2, 0xa3, 0xb6, 0x82, 0x03, }}, /* Byte value: 0xf5 */ + {{0x8b, 0x51, 0xa9, 0x7a, 0xca, 0xd7, 0xd2, 0x59, }}, /* Byte value: 0xf6 */ + {{0xc7, 0x03, 0x77, 0xbe, 0xa2, 0x31, 0xf7, 0x30, }}, /* Byte value: 0xf7 */ + {{0xd6, 0x5e, 0xc1, 0x79, 0xa5, 0x22, 0x7f, 0xa9, }}, /* Byte value: 0xf8 */ + {{0x20, 0x12, 0xcf, 0xbb, 0x13, 0xed, 0xc3, 0xe3, }}, /* Byte value: 0xf9 */ + {{0x0a, 0x4d, 0x23, 0xa8, 0x69, 0x61, 0x50, 0x5a, }}, /* Byte value: 0xfa */ + {{0x08, 0xe5, 0x43, 0x5e, 0x74, 0xaa, 0x40, 0x48, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x4c, 0x52, 0xde, 0xc4, 0x68, 0xe6, 0x25, 0x69, }}, /* Byte value: 0xfd */ + {{0xd7, 0x0a, 0xf1, 0x02, 0x4a, 0xa6, 0x77, 0xa0, }}, /* Byte value: 0xfe */ + {{0x74, 0xac, 0xd4, 0x9d, 0xe7, 0x36, 0x26, 0x52, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 8 */ + {{0x99, 0xaa, 0x16, 0x04, 0xc2, 0x95, 0x8c, 0x4a, }}, /* Byte value: 0x00 */ + {{0x93, 0xe3, 0xda, 0xa3, 0x95, 0xb5, 0xa1, 0x97, }}, /* Byte value: 0x01 */ + {{0x88, 0xfd, 0x2b, 0x3b, 0xa6, 0xc5, 0x21, 0xbc, }}, /* Byte value: 0x02 */ + {{0xae, 0x16, 0x29, 0x6c, 0x27, 0x1a, 0xaa, 0xe1, }}, /* Byte value: 0x03 */ + {{0x8b, 0xbe, 0x09, 0x55, 0xe0, 0x74, 0xcd, 0x78, }}, /* Byte value: 0x04 */ + {{0xbd, 0x82, 0x28, 0xa6, 0x86, 0x94, 0x0e, 0x2e, }}, /* Byte value: 0x05 */ + {{0x69, 0xbd, 0x24, 0x97, 0x06, 0x13, 0xb2, 0x23, }}, /* Byte value: 0x06 */ + {{0xb1, 0x4d, 0xa0, 0xdd, 0x5d, 0x15, 0x38, 0xb8, }}, /* Byte value: 0x07 */ + {{0x6e, 0xbb, 0x7e, 0xd0, 0x09, 0xdd, 0x4c, 0x95, }}, /* Byte value: 0x08 */ + {{0x38, 0x30, 0x95, 0x7d, 0x78, 0xbf, 0xfc, 0xf9, }}, /* Byte value: 0x09 */ + {{0x3e, 0xb6, 0xd1, 0xa1, 0xf4, 0x1e, 0xe7, 0xb2, }}, /* Byte value: 0x0a */ + {{0x92, 0x63, 0xc4, 0x38, 0x16, 0xda, 0x44, 0x6a, }}, /* Byte value: 0x0b */ + {{0x95, 0x65, 0x9e, 0x7f, 0x19, 0x14, 0xba, 0xdc, }}, /* Byte value: 0x0c */ + {{0x59, 0x07, 0x41, 0xb8, 0xec, 0x52, 0x6a, 0x3e, }}, /* Byte value: 0x0d */ + {{0x31, 0x3a, 0x7b, 0xb4, 0x69, 0x2e, 0x3d, 0xe0, }}, /* Byte value: 0x0e */ + {{0x4e, 0xd6, 0x38, 0x5b, 0x04, 0xa3, 0xdc, 0x83, }}, /* Byte value: 0x0f */ + {{0xd3, 0x39, 0x56, 0x76, 0x8f, 0x49, 0x42, 0xbb, }}, /* Byte value: 0x10 */ + {{0xce, 0xa1, 0xe3, 0x32, 0x30, 0x98, 0xd9, 0xdb, }}, /* Byte value: 0x11 */ + {{0xa0, 0x1a, 0x9d, 0xe2, 0x39, 0x45, 0x95, 0x4e, }}, /* Byte value: 0x12 */ + {{0xe5, 0x05, 0x77, 0x85, 0xe9, 0xa9, 0x81, 0xed, }}, /* Byte value: 0x13 */ + {{0xd5, 0xbf, 0x12, 0xaa, 0x03, 0xe8, 0x59, 0xf0, }}, /* Byte value: 0x14 */ + {{0xb9, 0xc7, 0x50, 0x8f, 0xcf, 0xeb, 0x1c, 0x5c, }}, /* Byte value: 0x15 */ + {{0xa4, 0x5f, 0xe5, 0xcb, 0x70, 0x3a, 0x87, 0x3c, }}, /* Byte value: 0x16 */ + {{0xbf, 0x41, 0x14, 0x53, 0x43, 0x4a, 0x07, 0x17, }}, /* Byte value: 0x17 */ + {{0x2d, 0x22, 0xd0, 0x6b, 0x55, 0x90, 0x43, 0x7d, }}, /* Byte value: 0x18 */ + {{0xe7, 0xc6, 0x4b, 0x70, 0x2c, 0x77, 0x88, 0xd4, }}, /* Byte value: 0x19 */ + {{0xdc, 0xb5, 0xfc, 0x63, 0x12, 0x79, 0x98, 0xe9, }}, /* Byte value: 0x1a */ + {{0x21, 0xed, 0x58, 0x10, 0x8e, 0x11, 0x75, 0xeb, }}, /* Byte value: 0x1b */ + {{0xf9, 0x1d, 0xdc, 0x5a, 0xd5, 0x17, 0xff, 0x70, }}, /* Byte value: 0x1c */ + {{0xee, 0xcc, 0xa5, 0xb9, 0x3d, 0xe6, 0x49, 0xcd, }}, /* Byte value: 0x1d */ + {{0x62, 0x74, 0xf6, 0xab, 0xd2, 0x5c, 0x7a, 0x03, }}, /* Byte value: 0x1e */ + {{0xcd, 0xe2, 0xc1, 0x5c, 0x76, 0x29, 0x35, 0x1f, }}, /* Byte value: 0x1f */ + {{0x67, 0xb1, 0x90, 0x19, 0x18, 0x4c, 0x8d, 0x8c, }}, /* Byte value: 0x20 */ + {{0x72, 0xa3, 0xd5, 0x0f, 0x35, 0x63, 0x32, 0x08, }}, /* Byte value: 0x21 */ + {{0x9b, 0x69, 0x2a, 0xf1, 0x07, 0x4b, 0x85, 0x73, }}, /* Byte value: 0x22 */ + {{0xbe, 0xc1, 0x0a, 0xc8, 0xc0, 0x25, 0xe2, 0xea, }}, /* Byte value: 0x23 */ + {{0xeb, 0x09, 0xc3, 0x0b, 0xf7, 0xf6, 0xbe, 0x42, }}, /* Byte value: 0x24 */ + {{0x86, 0xf1, 0x9f, 0xb5, 0xb8, 0x9a, 0x1e, 0x13, }}, /* Byte value: 0x25 */ + {{0x83, 0x34, 0xf9, 0x07, 0x72, 0x8a, 0xe9, 0x9c, }}, /* Byte value: 0x26 */ + {{0x09, 0x0a, 0xee, 0xc9, 0x11, 0x91, 0xc1, 0x19, }}, /* Byte value: 0x27 */ + {{0x54, 0x48, 0xd7, 0x58, 0xb4, 0xbc, 0xb9, 0x55, }}, /* Byte value: 0x28 */ + {{0x77, 0x66, 0xb3, 0xbd, 0xff, 0x73, 0xc5, 0x87, }}, /* Byte value: 0x29 */ + {{0x40, 0xda, 0x8c, 0xd5, 0x1a, 0xfc, 0xe3, 0x2c, }}, /* Byte value: 0x2a */ + {{0xf6, 0x91, 0x76, 0x4f, 0x48, 0x27, 0x25, 0x22, }}, /* Byte value: 0x2b */ + {{0x5a, 0x44, 0x63, 0xd6, 0xaa, 0xe3, 0x86, 0xfa, }}, /* Byte value: 0x2c */ + {{0x0d, 0x4f, 0x96, 0xe0, 0x58, 0xee, 0xd3, 0x6b, }}, /* Byte value: 0x2d */ + {{0xfa, 0x5e, 0xfe, 0x34, 0x93, 0xa6, 0x13, 0xb4, }}, /* Byte value: 0x2e */ + {{0xc7, 0xab, 0x0d, 0xfb, 0x21, 0x09, 0x18, 0xc2, }}, /* Byte value: 0x2f */ + {{0x65, 0x72, 0xac, 0xec, 0xdd, 0x92, 0x84, 0xb5, }}, /* Byte value: 0x30 */ + {{0x5f, 0x81, 0x05, 0x64, 0x60, 0xf3, 0x71, 0x75, }}, /* Byte value: 0x31 */ + {{0xd2, 0xb9, 0x48, 0xed, 0x0c, 0x26, 0xa7, 0x46, }}, /* Byte value: 0x32 */ + {{0xf0, 0x17, 0x32, 0x93, 0xc4, 0x86, 0x3e, 0x69, }}, /* Byte value: 0x33 */ + {{0x94, 0xe5, 0x80, 0xe4, 0x9a, 0x7b, 0x5f, 0x21, }}, /* Byte value: 0x34 */ + {{0x43, 0x99, 0xae, 0xbb, 0x5c, 0x4d, 0x0f, 0xe8, }}, /* Byte value: 0x35 */ + {{0x44, 0x9f, 0xf4, 0xfc, 0x53, 0x83, 0xf1, 0x5e, }}, /* Byte value: 0x36 */ + {{0x9e, 0xac, 0x4c, 0x43, 0xcd, 0x5b, 0x72, 0xfc, }}, /* Byte value: 0x37 */ + {{0xe9, 0xca, 0xff, 0xfe, 0x32, 0x28, 0xb7, 0x7b, }}, /* Byte value: 0x38 */ + {{0xb2, 0x0e, 0x82, 0xb3, 0x1b, 0xa4, 0xd4, 0x7c, }}, /* Byte value: 0x39 */ + {{0x2a, 0x24, 0x8a, 0x2c, 0x5a, 0x5e, 0xbd, 0xcb, }}, /* Byte value: 0x3a */ + {{0x13, 0x94, 0x01, 0xca, 0xa1, 0x8e, 0xa4, 0xcf, }}, /* Byte value: 0x3b */ + {{0x37, 0xbc, 0x3f, 0x68, 0xe5, 0x8f, 0x26, 0xab, }}, /* Byte value: 0x3c */ + {{0x1c, 0x18, 0xab, 0xdf, 0x3c, 0xbe, 0x7e, 0x9d, }}, /* Byte value: 0x3d */ + {{0xb4, 0x88, 0xc6, 0x6f, 0x97, 0x05, 0xcf, 0x37, }}, /* Byte value: 0x3e */ + {{0x4b, 0x13, 0x5e, 0xe9, 0xce, 0xb3, 0x2b, 0x0c, }}, /* Byte value: 0x3f */ + {{0x7f, 0xec, 0x43, 0xef, 0x6d, 0x8d, 0xe1, 0x63, }}, /* Byte value: 0x40 */ + {{0x78, 0xea, 0x19, 0xa8, 0x62, 0x43, 0x1f, 0xd5, }}, /* Byte value: 0x41 */ + {{0xcc, 0x62, 0xdf, 0xc7, 0xf5, 0x46, 0xd0, 0xe2, }}, /* Byte value: 0x42 */ + {{0x81, 0xf7, 0xc5, 0xf2, 0xb7, 0x54, 0xe0, 0xa5, }}, /* Byte value: 0x43 */ + {{0xac, 0xd5, 0x15, 0x99, 0xe2, 0xc4, 0xa3, 0xd8, }}, /* Byte value: 0x44 */ + {{0x98, 0x2a, 0x08, 0x9f, 0x41, 0xfa, 0x69, 0xb7, }}, /* Byte value: 0x45 */ + {{0x56, 0x8b, 0xeb, 0xad, 0x71, 0x62, 0xb0, 0x6c, }}, /* Byte value: 0x46 */ + {{0x1e, 0xdb, 0x97, 0x2a, 0xf9, 0x60, 0x77, 0xa4, }}, /* Byte value: 0x47 */ + {{0x30, 0xba, 0x65, 0x2f, 0xea, 0x41, 0xd8, 0x1d, }}, /* Byte value: 0x48 */ + {{0x14, 0x92, 0x5b, 0x8d, 0xae, 0x40, 0x5a, 0x79, }}, /* Byte value: 0x49 */ + {{0xc5, 0x68, 0x31, 0x0e, 0xe4, 0xd7, 0x11, 0xfb, }}, /* Byte value: 0x4a */ + {{0x49, 0xd0, 0x62, 0x1c, 0x0b, 0x6d, 0x22, 0x35, }}, /* Byte value: 0x4b */ + {{0xb0, 0xcd, 0xbe, 0x46, 0xde, 0x7a, 0xdd, 0x45, }}, /* Byte value: 0x4c */ + {{0x70, 0x60, 0xe9, 0xfa, 0xf0, 0xbd, 0x3b, 0x31, }}, /* Byte value: 0x4d */ + {{0x0b, 0xc9, 0xd2, 0x3c, 0xd4, 0x4f, 0xc8, 0x20, }}, /* Byte value: 0x4e */ + {{0xa6, 0x9c, 0xd9, 0x3e, 0xb5, 0xe4, 0x8e, 0x05, }}, /* Byte value: 0x4f */ + {{0xaf, 0x96, 0x37, 0xf7, 0xa4, 0x75, 0x4f, 0x1c, }}, /* Byte value: 0x50 */ + {{0xa1, 0x9a, 0x83, 0x79, 0xba, 0x2a, 0x70, 0xb3, }}, /* Byte value: 0x51 */ + {{0x17, 0xd1, 0x79, 0xe3, 0xe8, 0xf1, 0xb6, 0xbd, }}, /* Byte value: 0x52 */ + {{0xf5, 0xd2, 0x54, 0x21, 0x0e, 0x96, 0xc9, 0xe6, }}, /* Byte value: 0x53 */ + {{0xfd, 0x58, 0xa4, 0x73, 0x9c, 0x68, 0xed, 0x02, }}, /* Byte value: 0x54 */ + {{0x3c, 0x75, 0xed, 0x54, 0x31, 0xc0, 0xee, 0x8b, }}, /* Byte value: 0x55 */ + {{0xca, 0xe4, 0x9b, 0x1b, 0x79, 0xe7, 0xcb, 0xa9, }}, /* Byte value: 0x56 */ + {{0xa2, 0xd9, 0xa1, 0x17, 0xfc, 0x9b, 0x9c, 0x77, }}, /* Byte value: 0x57 */ + {{0x4a, 0x93, 0x40, 0x72, 0x4d, 0xdc, 0xce, 0xf1, }}, /* Byte value: 0x58 */ + {{0x0c, 0xcf, 0x88, 0x7b, 0xdb, 0x81, 0x36, 0x96, }}, /* Byte value: 0x59 */ + {{0x18, 0x5d, 0xd3, 0xf6, 0x75, 0xc1, 0x6c, 0xef, }}, /* Byte value: 0x5a */ + {{0xc3, 0xee, 0x75, 0xd2, 0x68, 0x76, 0x0a, 0xb0, }}, /* Byte value: 0x5b */ + {{0x47, 0xdc, 0xd6, 0x92, 0x15, 0x32, 0x1d, 0x9a, }}, /* Byte value: 0x5c */ + {{0x8f, 0xfb, 0x71, 0x7c, 0xa9, 0x0b, 0xdf, 0x0a, }}, /* Byte value: 0x5d */ + {{0xf2, 0xd4, 0x0e, 0x66, 0x01, 0x58, 0x37, 0x50, }}, /* Byte value: 0x5e */ + {{0xe0, 0xc0, 0x11, 0x37, 0x23, 0xb9, 0x76, 0x62, }}, /* Byte value: 0x5f */ + {{0x3d, 0xf5, 0xf3, 0xcf, 0xb2, 0xaf, 0x0b, 0x76, }}, /* Byte value: 0x60 */ + {{0xaa, 0x53, 0x51, 0x45, 0x6e, 0x65, 0xb8, 0x93, }}, /* Byte value: 0x61 */ + {{0x57, 0x0b, 0xf5, 0x36, 0xf2, 0x0d, 0x55, 0x91, }}, /* Byte value: 0x62 */ + {{0x87, 0x71, 0x81, 0x2e, 0x3b, 0xf5, 0xfb, 0xee, }}, /* Byte value: 0x63 */ + {{0xb6, 0x4b, 0xfa, 0x9a, 0x52, 0xdb, 0xc6, 0x0e, }}, /* Byte value: 0x64 */ + {{0xe3, 0x83, 0x33, 0x59, 0x65, 0x08, 0x9a, 0xa6, }}, /* Byte value: 0x65 */ + {{0x23, 0x2e, 0x64, 0xe5, 0x4b, 0xcf, 0x7c, 0xd2, }}, /* Byte value: 0x66 */ + {{0x52, 0xce, 0x93, 0x84, 0x38, 0x1d, 0xa2, 0x1e, }}, /* Byte value: 0x67 */ + {{0x8e, 0x7b, 0x6f, 0xe7, 0x2a, 0x64, 0x3a, 0xf7, }}, /* Byte value: 0x68 */ + {{0xdd, 0x35, 0xe2, 0xf8, 0x91, 0x16, 0x7d, 0x14, }}, /* Byte value: 0x69 */ + {{0x2c, 0xa2, 0xce, 0xf0, 0xd6, 0xff, 0xa6, 0x80, }}, /* Byte value: 0x6a */ + {{0x50, 0x0d, 0xaf, 0x71, 0xfd, 0xc3, 0xab, 0x27, }}, /* Byte value: 0x6b */ + {{0xec, 0x0f, 0x99, 0x4c, 0xf8, 0x38, 0x40, 0xf4, }}, /* Byte value: 0x6c */ + {{0x06, 0x86, 0x44, 0xdc, 0x8c, 0xa1, 0x1b, 0x4b, }}, /* Byte value: 0x6d */ + {{0x91, 0x20, 0xe6, 0x56, 0x50, 0x6b, 0xa8, 0xae, }}, /* Byte value: 0x6e */ + {{0xa3, 0x59, 0xbf, 0x8c, 0x7f, 0xf4, 0x79, 0x8a, }}, /* Byte value: 0x6f */ + {{0xff, 0x9b, 0x98, 0x86, 0x59, 0xb6, 0xe4, 0x3b, }}, /* Byte value: 0x70 */ + {{0x9c, 0x6f, 0x70, 0xb6, 0x08, 0x85, 0x7b, 0xc5, }}, /* Byte value: 0x71 */ + {{0x2b, 0xa4, 0x94, 0xb7, 0xd9, 0x31, 0x58, 0x36, }}, /* Byte value: 0x72 */ + {{0xc6, 0x2b, 0x13, 0x60, 0xa2, 0x66, 0xfd, 0x3f, }}, /* Byte value: 0x73 */ + {{0x39, 0xb0, 0x8b, 0xe6, 0xfb, 0xd0, 0x19, 0x04, }}, /* Byte value: 0x74 */ + {{0x29, 0x67, 0xa8, 0x42, 0x1c, 0xef, 0x51, 0x0f, }}, /* Byte value: 0x75 */ + {{0x5b, 0xc4, 0x7d, 0x4d, 0x29, 0x8c, 0x63, 0x07, }}, /* Byte value: 0x76 */ + {{0x90, 0xa0, 0xf8, 0xcd, 0xd3, 0x04, 0x4d, 0x53, }}, /* Byte value: 0x77 */ + {{0x58, 0x87, 0x5f, 0x23, 0x6f, 0x3d, 0x8f, 0xc3, }}, /* Byte value: 0x78 */ + {{0xf1, 0x97, 0x2c, 0x08, 0x47, 0xe9, 0xdb, 0x94, }}, /* Byte value: 0x79 */ + {{0xdf, 0xf6, 0xde, 0x0d, 0x54, 0xc8, 0x74, 0x2d, }}, /* Byte value: 0x7a */ + {{0x28, 0xe7, 0xb6, 0xd9, 0x9f, 0x80, 0xb4, 0xf2, }}, /* Byte value: 0x7b */ + {{0x60, 0xb7, 0xca, 0x5e, 0x17, 0x82, 0x73, 0x3a, }}, /* Byte value: 0x7c */ + {{0x79, 0x6a, 0x07, 0x33, 0xe1, 0x2c, 0xfa, 0x28, }}, /* Byte value: 0x7d */ + {{0x76, 0xe6, 0xad, 0x26, 0x7c, 0x1c, 0x20, 0x7a, }}, /* Byte value: 0x7e */ + {{0x03, 0x43, 0x22, 0x6e, 0x46, 0xb1, 0xec, 0xc4, }}, /* Byte value: 0x7f */ + {{0xc8, 0x27, 0xa7, 0xee, 0xbc, 0x39, 0xc2, 0x90, }}, /* Byte value: 0x80 */ + {{0x02, 0xc3, 0x3c, 0xf5, 0xc5, 0xde, 0x09, 0x39, }}, /* Byte value: 0x81 */ + {{0x12, 0x14, 0x1f, 0x51, 0x22, 0xe1, 0x41, 0x32, }}, /* Byte value: 0x82 */ + {{0xef, 0x4c, 0xbb, 0x22, 0xbe, 0x89, 0xac, 0x30, }}, /* Byte value: 0x83 */ + {{0x46, 0x5c, 0xc8, 0x09, 0x96, 0x5d, 0xf8, 0x67, }}, /* Byte value: 0x84 */ + {{0x51, 0x8d, 0xb1, 0xea, 0x7e, 0xac, 0x4e, 0xda, }}, /* Byte value: 0x85 */ + {{0xdb, 0xb3, 0xa6, 0x24, 0x1d, 0xb7, 0x66, 0x5f, }}, /* Byte value: 0x86 */ + {{0x74, 0x25, 0x91, 0xd3, 0xb9, 0xc2, 0x29, 0x43, }}, /* Byte value: 0x87 */ + {{0x0f, 0x8c, 0xaa, 0x15, 0x9d, 0x30, 0xda, 0x52, }}, /* Byte value: 0x88 */ + {{0xc1, 0x2d, 0x49, 0x27, 0xad, 0xa8, 0x03, 0x89, }}, /* Byte value: 0x89 */ + {{0x8d, 0x38, 0x4d, 0x89, 0x6c, 0xd5, 0xd6, 0x33, }}, /* Byte value: 0x8a */ + {{0x68, 0x3d, 0x3a, 0x0c, 0x85, 0x7c, 0x57, 0xde, }}, /* Byte value: 0x8b */ + {{0xb7, 0xcb, 0xe4, 0x01, 0xd1, 0xb4, 0x23, 0xf3, }}, /* Byte value: 0x8c */ + {{0x0e, 0x0c, 0xb4, 0x8e, 0x1e, 0x5f, 0x3f, 0xaf, }}, /* Byte value: 0x8d */ + {{0x5d, 0x42, 0x39, 0x91, 0xa5, 0x2d, 0x78, 0x4c, }}, /* Byte value: 0x8e */ + {{0xe2, 0x03, 0x2d, 0xc2, 0xe6, 0x67, 0x7f, 0x5b, }}, /* Byte value: 0x8f */ + {{0xc0, 0xad, 0x57, 0xbc, 0x2e, 0xc7, 0xe6, 0x74, }}, /* Byte value: 0x90 */ + {{0x96, 0x26, 0xbc, 0x11, 0x5f, 0xa5, 0x56, 0x18, }}, /* Byte value: 0x91 */ + {{0xad, 0x55, 0x0b, 0x02, 0x61, 0xab, 0x46, 0x25, }}, /* Byte value: 0x92 */ + {{0x01, 0x80, 0x1e, 0x9b, 0x83, 0x6f, 0xe5, 0xfd, }}, /* Byte value: 0x93 */ + {{0x24, 0x28, 0x3e, 0xa2, 0x44, 0x01, 0x82, 0x64, }}, /* Byte value: 0x94 */ + {{0xe8, 0x4a, 0xe1, 0x65, 0xb1, 0x47, 0x52, 0x86, }}, /* Byte value: 0x95 */ + {{0x8c, 0xb8, 0x53, 0x12, 0xef, 0xba, 0x33, 0xce, }}, /* Byte value: 0x96 */ + {{0xf3, 0x54, 0x10, 0xfd, 0x82, 0x37, 0xd2, 0xad, }}, /* Byte value: 0x97 */ + {{0xa7, 0x1c, 0xc7, 0xa5, 0x36, 0x8b, 0x6b, 0xf8, }}, /* Byte value: 0x98 */ + {{0x34, 0xff, 0x1d, 0x06, 0xa3, 0x3e, 0xca, 0x6f, }}, /* Byte value: 0x99 */ + {{0xe6, 0x46, 0x55, 0xeb, 0xaf, 0x18, 0x6d, 0x29, }}, /* Byte value: 0x9a */ + {{0x48, 0x50, 0x7c, 0x87, 0x88, 0x02, 0xc7, 0xc8, }}, /* Byte value: 0x9b */ + {{0xba, 0x84, 0x72, 0xe1, 0x89, 0x5a, 0xf0, 0x98, }}, /* Byte value: 0x9c */ + {{0x07, 0x06, 0x5a, 0x47, 0x0f, 0xce, 0xfe, 0xb6, }}, /* Byte value: 0x9d */ + {{0xfc, 0xd8, 0xba, 0xe8, 0x1f, 0x07, 0x08, 0xff, }}, /* Byte value: 0x9e */ + {{0x4d, 0x95, 0x1a, 0x35, 0x42, 0x12, 0x30, 0x47, }}, /* Byte value: 0x9f */ + {{0x19, 0xdd, 0xcd, 0x6d, 0xf6, 0xae, 0x89, 0x12, }}, /* Byte value: 0xa0 */ + {{0x42, 0x19, 0xb0, 0x20, 0xdf, 0x22, 0xea, 0x15, }}, /* Byte value: 0xa1 */ + {{0x75, 0xa5, 0x8f, 0x48, 0x3a, 0xad, 0xcc, 0xbe, }}, /* Byte value: 0xa2 */ + {{0x4c, 0x15, 0x04, 0xae, 0xc1, 0x7d, 0xd5, 0xba, }}, /* Byte value: 0xa3 */ + {{0xa9, 0x10, 0x73, 0x2b, 0x28, 0xd4, 0x54, 0x57, }}, /* Byte value: 0xa4 */ + {{0x82, 0xb4, 0xe7, 0x9c, 0xf1, 0xe5, 0x0c, 0x61, }}, /* Byte value: 0xa5 */ + {{0xf7, 0x11, 0x68, 0xd4, 0xcb, 0x48, 0xc0, 0xdf, }}, /* Byte value: 0xa6 */ + {{0x08, 0x8a, 0xf0, 0x52, 0x92, 0xfe, 0x24, 0xe4, }}, /* Byte value: 0xa7 */ + {{0x4f, 0x56, 0x26, 0xc0, 0x87, 0xcc, 0x39, 0x7e, }}, /* Byte value: 0xa8 */ + {{0x10, 0xd7, 0x23, 0xa4, 0xe7, 0x3f, 0x48, 0x0b, }}, /* Byte value: 0xa9 */ + {{0x3b, 0x73, 0xb7, 0x13, 0x3e, 0x0e, 0x10, 0x3d, }}, /* Byte value: 0xaa */ + {{0xcb, 0x64, 0x85, 0x80, 0xfa, 0x88, 0x2e, 0x54, }}, /* Byte value: 0xab */ + {{0x20, 0x6d, 0x46, 0x8b, 0x0d, 0x7e, 0x90, 0x16, }}, /* Byte value: 0xac */ + {{0x63, 0xf4, 0xe8, 0x30, 0x51, 0x33, 0x9f, 0xfe, }}, /* Byte value: 0xad */ + {{0x73, 0x23, 0xcb, 0x94, 0xb6, 0x0c, 0xd7, 0xf5, }}, /* Byte value: 0xae */ + {{0xed, 0x8f, 0x87, 0xd7, 0x7b, 0x57, 0xa5, 0x09, }}, /* Byte value: 0xaf */ + {{0xea, 0x89, 0xdd, 0x90, 0x74, 0x99, 0x5b, 0xbf, }}, /* Byte value: 0xb0 */ + {{0xc9, 0xa7, 0xb9, 0x75, 0x3f, 0x56, 0x27, 0x6d, }}, /* Byte value: 0xb1 */ + {{0x32, 0x79, 0x59, 0xda, 0x2f, 0x9f, 0xd1, 0x24, }}, /* Byte value: 0xb2 */ + {{0x84, 0x32, 0xa3, 0x40, 0x7d, 0x44, 0x17, 0x2a, }}, /* Byte value: 0xb3 */ + {{0x53, 0x4e, 0x8d, 0x1f, 0xbb, 0x72, 0x47, 0xe3, }}, /* Byte value: 0xb4 */ + {{0x04, 0x45, 0x78, 0x29, 0x49, 0x7f, 0x12, 0x72, }}, /* Byte value: 0xb5 */ + {{0x7c, 0xaf, 0x61, 0x81, 0x2b, 0x3c, 0x0d, 0xa7, }}, /* Byte value: 0xb6 */ + {{0x41, 0x5a, 0x92, 0x4e, 0x99, 0x93, 0x06, 0xd1, }}, /* Byte value: 0xb7 */ + {{0x27, 0x6b, 0x1c, 0xcc, 0x02, 0xb0, 0x6e, 0xa0, }}, /* Byte value: 0xb8 */ + {{0x55, 0xc8, 0xc9, 0xc3, 0x37, 0xd3, 0x5c, 0xa8, }}, /* Byte value: 0xb9 */ + {{0xcf, 0x21, 0xfd, 0xa9, 0xb3, 0xf7, 0x3c, 0x26, }}, /* Byte value: 0xba */ + {{0x71, 0xe0, 0xf7, 0x61, 0x73, 0xd2, 0xde, 0xcc, }}, /* Byte value: 0xbb */ + {{0x11, 0x57, 0x3d, 0x3f, 0x64, 0x50, 0xad, 0xf6, }}, /* Byte value: 0xbc */ + {{0x97, 0xa6, 0xa2, 0x8a, 0xdc, 0xca, 0xb3, 0xe5, }}, /* Byte value: 0xbd */ + {{0xd9, 0x70, 0x9a, 0xd1, 0xd8, 0x69, 0x6f, 0x66, }}, /* Byte value: 0xbe */ + {{0xd0, 0x7a, 0x74, 0x18, 0xc9, 0xf8, 0xae, 0x7f, }}, /* Byte value: 0xbf */ + {{0xa8, 0x90, 0x6d, 0xb0, 0xab, 0xbb, 0xb1, 0xaa, }}, /* Byte value: 0xc0 */ + {{0x1b, 0x1e, 0xf1, 0x98, 0x33, 0x70, 0x80, 0x2b, }}, /* Byte value: 0xc1 */ + {{0x16, 0x51, 0x67, 0x78, 0x6b, 0x9e, 0x53, 0x40, }}, /* Byte value: 0xc2 */ + {{0x6c, 0x78, 0x42, 0x25, 0xcc, 0x03, 0x45, 0xac, }}, /* Byte value: 0xc3 */ + {{0x2f, 0xe1, 0xec, 0x9e, 0x90, 0x4e, 0x4a, 0x44, }}, /* Byte value: 0xc4 */ + {{0x45, 0x1f, 0xea, 0x67, 0xd0, 0xec, 0x14, 0xa3, }}, /* Byte value: 0xc5 */ + {{0x33, 0xf9, 0x47, 0x41, 0xac, 0xf0, 0x34, 0xd9, }}, /* Byte value: 0xc6 */ + {{0x1d, 0x98, 0xb5, 0x44, 0xbf, 0xd1, 0x9b, 0x60, }}, /* Byte value: 0xc7 */ + {{0xfe, 0x1b, 0x86, 0x1d, 0xda, 0xd9, 0x01, 0xc6, }}, /* Byte value: 0xc8 */ + {{0x7a, 0x29, 0x25, 0x5d, 0xa7, 0x9d, 0x16, 0xec, }}, /* Byte value: 0xc9 */ + {{0x64, 0xf2, 0xb2, 0x77, 0x5e, 0xfd, 0x61, 0x48, }}, /* Byte value: 0xca */ + {{0xb3, 0x8e, 0x9c, 0x28, 0x98, 0xcb, 0x31, 0x81, }}, /* Byte value: 0xcb */ + {{0x1f, 0x5b, 0x89, 0xb1, 0x7a, 0x0f, 0x92, 0x59, }}, /* Byte value: 0xcc */ + {{0x2e, 0x61, 0xf2, 0x05, 0x13, 0x21, 0xaf, 0xb9, }}, /* Byte value: 0xcd */ + {{0xe4, 0x85, 0x69, 0x1e, 0x6a, 0xc6, 0x64, 0x10, }}, /* Byte value: 0xce */ + {{0x6a, 0xfe, 0x06, 0xf9, 0x40, 0xa2, 0x5e, 0xe7, }}, /* Byte value: 0xcf */ + {{0x7d, 0x2f, 0x7f, 0x1a, 0xa8, 0x53, 0xe8, 0x5a, }}, /* Byte value: 0xd0 */ + {{0xd8, 0xf0, 0x84, 0x4a, 0x5b, 0x06, 0x8a, 0x9b, }}, /* Byte value: 0xd1 */ + {{0xc2, 0x6e, 0x6b, 0x49, 0xeb, 0x19, 0xef, 0x4d, }}, /* Byte value: 0xd2 */ + {{0x36, 0x3c, 0x21, 0xf3, 0x66, 0xe0, 0xc3, 0x56, }}, /* Byte value: 0xd3 */ + {{0xf8, 0x9d, 0xc2, 0xc1, 0x56, 0x78, 0x1a, 0x8d, }}, /* Byte value: 0xd4 */ + {{0x26, 0xeb, 0x02, 0x57, 0x81, 0xdf, 0x8b, 0x5d, }}, /* Byte value: 0xd5 */ + {{0x3f, 0x36, 0xcf, 0x3a, 0x77, 0x71, 0x02, 0x4f, }}, /* Byte value: 0xd6 */ + {{0x0a, 0x49, 0xcc, 0xa7, 0x57, 0x20, 0x2d, 0xdd, }}, /* Byte value: 0xd7 */ + {{0x9f, 0x2c, 0x52, 0xd8, 0x4e, 0x34, 0x97, 0x01, }}, /* Byte value: 0xd8 */ + {{0xf4, 0x52, 0x4a, 0xba, 0x8d, 0xf9, 0x2c, 0x1b, }}, /* Byte value: 0xd9 */ + {{0x1a, 0x9e, 0xef, 0x03, 0xb0, 0x1f, 0x65, 0xd6, }}, /* Byte value: 0xda */ + {{0xa5, 0xdf, 0xfb, 0x50, 0xf3, 0x55, 0x62, 0xc1, }}, /* Byte value: 0xdb */ + {{0x61, 0x37, 0xd4, 0xc5, 0x94, 0xed, 0x96, 0xc7, }}, /* Byte value: 0xdc */ + {{0x35, 0x7f, 0x03, 0x9d, 0x20, 0x51, 0x2f, 0x92, }}, /* Byte value: 0xdd */ + {{0x7b, 0xa9, 0x3b, 0xc6, 0x24, 0xf2, 0xf3, 0x11, }}, /* Byte value: 0xde */ + {{0xde, 0x76, 0xc0, 0x96, 0xd7, 0xa7, 0x91, 0xd0, }}, /* Byte value: 0xdf */ + {{0xb5, 0x08, 0xd8, 0xf4, 0x14, 0x6a, 0x2a, 0xca, }}, /* Byte value: 0xe0 */ + {{0xda, 0x33, 0xb8, 0xbf, 0x9e, 0xd8, 0x83, 0xa2, }}, /* Byte value: 0xe1 */ + {{0xbc, 0x02, 0x36, 0x3d, 0x05, 0xfb, 0xeb, 0xd3, }}, /* Byte value: 0xe2 */ + {{0xd7, 0x7c, 0x2e, 0x5f, 0xc6, 0x36, 0x50, 0xc9, }}, /* Byte value: 0xe3 */ + {{0xab, 0xd3, 0x4f, 0xde, 0xed, 0x0a, 0x5d, 0x6e, }}, /* Byte value: 0xe4 */ + {{0x22, 0xae, 0x7a, 0x7e, 0xc8, 0xa0, 0x99, 0x2f, }}, /* Byte value: 0xe5 */ + {{0x66, 0x31, 0x8e, 0x82, 0x9b, 0x23, 0x68, 0x71, }}, /* Byte value: 0xe6 */ + {{0x3a, 0xf3, 0xa9, 0x88, 0xbd, 0x61, 0xf5, 0xc0, }}, /* Byte value: 0xe7 */ + {{0x9a, 0xe9, 0x34, 0x6a, 0x84, 0x24, 0x60, 0x8e, }}, /* Byte value: 0xe8 */ + {{0x6b, 0x7e, 0x18, 0x62, 0xc3, 0xcd, 0xbb, 0x1a, }}, /* Byte value: 0xe9 */ + {{0x05, 0xc5, 0x66, 0xb2, 0xca, 0x10, 0xf7, 0x8f, }}, /* Byte value: 0xea */ + {{0x6f, 0x3b, 0x60, 0x4b, 0x8a, 0xb2, 0xa9, 0x68, }}, /* Byte value: 0xeb */ + {{0x80, 0x77, 0xdb, 0x69, 0x34, 0x3b, 0x05, 0x58, }}, /* Byte value: 0xec */ + {{0x5c, 0xc2, 0x27, 0x0a, 0x26, 0x42, 0x9d, 0xb1, }}, /* Byte value: 0xed */ + {{0xfb, 0xde, 0xe0, 0xaf, 0x10, 0xc9, 0xf6, 0x49, }}, /* Byte value: 0xee */ + {{0x89, 0x7d, 0x35, 0xa0, 0x25, 0xaa, 0xc4, 0x41, }}, /* Byte value: 0xef */ + {{0x5e, 0x01, 0x1b, 0xff, 0xe3, 0x9c, 0x94, 0x88, }}, /* Byte value: 0xf0 */ + {{0x8a, 0x3e, 0x17, 0xce, 0x63, 0x1b, 0x28, 0x85, }}, /* Byte value: 0xf1 */ + {{0xbb, 0x04, 0x6c, 0x7a, 0x0a, 0x35, 0x15, 0x65, }}, /* Byte value: 0xf2 */ + {{0x6d, 0xf8, 0x5c, 0xbe, 0x4f, 0x6c, 0xa0, 0x51, }}, /* Byte value: 0xf3 */ + {{0x9d, 0xef, 0x6e, 0x2d, 0x8b, 0xea, 0x9e, 0x38, }}, /* Byte value: 0xf4 */ + {{0x25, 0xa8, 0x20, 0x39, 0xc7, 0x6e, 0x67, 0x99, }}, /* Byte value: 0xf5 */ + {{0xc4, 0xe8, 0x2f, 0x95, 0x67, 0xb8, 0xf4, 0x06, }}, /* Byte value: 0xf6 */ + {{0x15, 0x12, 0x45, 0x16, 0x2d, 0x2f, 0xbf, 0x84, }}, /* Byte value: 0xf7 */ + {{0x85, 0xb2, 0xbd, 0xdb, 0xfe, 0x2b, 0xf2, 0xd7, }}, /* Byte value: 0xf8 */ + {{0xd6, 0xfc, 0x30, 0xc4, 0x45, 0x59, 0xb5, 0x34, }}, /* Byte value: 0xf9 */ + {{0xe1, 0x40, 0x0f, 0xac, 0xa0, 0xd6, 0x93, 0x9f, }}, /* Byte value: 0xfa */ + {{0xd4, 0x3f, 0x0c, 0x31, 0x80, 0x87, 0xbc, 0x0d, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xd1, 0xfa, 0x6a, 0x83, 0x4a, 0x97, 0x4b, 0x82, }}, /* Byte value: 0xfd */ + {{0x7e, 0x6c, 0x5d, 0x74, 0xee, 0xe2, 0x04, 0x9e, }}, /* Byte value: 0xfe */ + {{0xb8, 0x47, 0x4e, 0x14, 0x4c, 0x84, 0xf9, 0xa1, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 9 */ + {{0xa5, 0x55, 0xa4, 0x90, 0xc6, 0x8d, 0x2f, 0xd5, }}, /* Byte value: 0x00 */ + {{0x2d, 0x90, 0x75, 0x4e, 0x36, 0xf9, 0x9f, 0x17, }}, /* Byte value: 0x01 */ + {{0x32, 0x9f, 0x4c, 0x80, 0x9d, 0x5f, 0xd4, 0xf3, }}, /* Byte value: 0x02 */ + {{0x8f, 0x0b, 0x94, 0x6d, 0x4b, 0xb1, 0x7f, 0x15, }}, /* Byte value: 0x03 */ + {{0x0e, 0x5f, 0x8a, 0xa5, 0xb5, 0x49, 0x5d, 0x6d, }}, /* Byte value: 0x04 */ + {{0x30, 0x41, 0xf8, 0xfa, 0x20, 0xc6, 0xcb, 0x66, }}, /* Byte value: 0x05 */ + {{0x38, 0xbf, 0x6d, 0xd1, 0x91, 0xe7, 0xb7, 0x77, }}, /* Byte value: 0x06 */ + {{0xc0, 0xc7, 0x66, 0x6e, 0x80, 0x9e, 0xaa, 0x5b, }}, /* Byte value: 0x07 */ + {{0x54, 0xbc, 0x60, 0x39, 0xd9, 0x78, 0xa0, 0x43, }}, /* Byte value: 0x08 */ + {{0xe6, 0x18, 0x68, 0x4c, 0x05, 0x72, 0xb8, 0x63, }}, /* Byte value: 0x09 */ + {{0x9e, 0x5b, 0x27, 0x06, 0x55, 0x5e, 0x69, 0x9c, }}, /* Byte value: 0x0a */ + {{0x39, 0xd0, 0x37, 0xec, 0x2e, 0x4a, 0x59, 0xdc, }}, /* Byte value: 0x0b */ + {{0x55, 0xd3, 0x3a, 0x04, 0x66, 0xd5, 0x4e, 0xe8, }}, /* Byte value: 0x0c */ + {{0x7e, 0xe2, 0x50, 0xc4, 0x54, 0x44, 0xf0, 0x83, }}, /* Byte value: 0x0d */ + {{0x52, 0x1d, 0x7f, 0xb7, 0xdd, 0x10, 0x81, 0x3f, }}, /* Byte value: 0x0e */ + {{0x91, 0x6b, 0xf7, 0x9e, 0x5f, 0xba, 0xda, 0x5a, }}, /* Byte value: 0x0f */ + {{0x64, 0xfd, 0x98, 0xc3, 0xf9, 0xbe, 0x6b, 0x25, }}, /* Byte value: 0x10 */ + {{0x03, 0xb1, 0xee, 0x47, 0x02, 0x34, 0xf1, 0x3e, }}, /* Byte value: 0x11 */ + {{0x57, 0x0d, 0x8e, 0x7e, 0xdb, 0x4c, 0x51, 0x7d, }}, /* Byte value: 0x12 */ + {{0x5a, 0xe3, 0xea, 0x9c, 0x6c, 0x31, 0xfd, 0x2e, }}, /* Byte value: 0x13 */ + {{0x1c, 0xbe, 0xd7, 0x89, 0xa9, 0x92, 0xba, 0xda, }}, /* Byte value: 0x14 */ + {{0x60, 0x82, 0x33, 0x37, 0x40, 0x4f, 0x55, 0xcc, }}, /* Byte value: 0x15 */ + {{0x07, 0xce, 0x45, 0xb3, 0xbb, 0xc5, 0xcf, 0xd7, }}, /* Byte value: 0x16 */ + {{0x18, 0xc1, 0x7c, 0x7d, 0x10, 0x63, 0x84, 0x33, }}, /* Byte value: 0x17 */ + {{0x21, 0x11, 0x4b, 0x91, 0x3e, 0x29, 0xdd, 0xef, }}, /* Byte value: 0x18 */ + {{0x72, 0x63, 0x6e, 0x1b, 0x5c, 0x94, 0xb2, 0x7b, }}, /* Byte value: 0x19 */ + {{0xa8, 0xbb, 0xc0, 0x72, 0x71, 0xf0, 0x83, 0x86, }}, /* Byte value: 0x1a */ + {{0xd1, 0x97, 0xd5, 0x05, 0x9e, 0x71, 0xbc, 0xd2, }}, /* Byte value: 0x1b */ + {{0x29, 0xef, 0xde, 0xba, 0x8f, 0x08, 0xa1, 0xfe, }}, /* Byte value: 0x1c */ + {{0xc6, 0x66, 0x79, 0xe0, 0x84, 0xf6, 0x8b, 0x27, }}, /* Byte value: 0x1d */ + {{0xa4, 0x3a, 0xfe, 0xad, 0x79, 0x20, 0xc1, 0x7e, }}, /* Byte value: 0x1e */ + {{0x3f, 0x71, 0x28, 0x62, 0x2a, 0x22, 0x78, 0xa0, }}, /* Byte value: 0x1f */ + {{0xe0, 0xb9, 0x77, 0xc2, 0x01, 0x1a, 0x99, 0x1f, }}, /* Byte value: 0x20 */ + {{0x27, 0xb0, 0x54, 0x1f, 0x3a, 0x41, 0xfc, 0x93, }}, /* Byte value: 0x21 */ + {{0x8d, 0xd5, 0x20, 0x17, 0xf6, 0x28, 0x60, 0x80, }}, /* Byte value: 0x22 */ + {{0x0c, 0x81, 0x3e, 0xdf, 0x08, 0xd0, 0x42, 0xf8, }}, /* Byte value: 0x23 */ + {{0x82, 0xe5, 0xf0, 0x8f, 0xfc, 0xcc, 0xd3, 0x46, }}, /* Byte value: 0x24 */ + {{0xea, 0x99, 0x56, 0x93, 0x0d, 0xa2, 0xfa, 0x9b, }}, /* Byte value: 0x25 */ + {{0xae, 0x1a, 0xdf, 0xfc, 0x75, 0x98, 0xa2, 0xfa, }}, /* Byte value: 0x26 */ + {{0xb4, 0x05, 0x17, 0xfb, 0xd8, 0x62, 0x39, 0x5c, }}, /* Byte value: 0x27 */ + {{0x9a, 0x24, 0x8c, 0xf2, 0xec, 0xaf, 0x57, 0x75, }}, /* Byte value: 0x28 */ + {{0x63, 0x33, 0xdd, 0x70, 0x42, 0x7b, 0xa4, 0xf2, }}, /* Byte value: 0x29 */ + {{0x49, 0x6d, 0xed, 0x8d, 0xcf, 0x47, 0xf4, 0x32, }}, /* Byte value: 0x2a */ + {{0xe5, 0xa9, 0x86, 0x0b, 0x07, 0x46, 0x49, 0x5d, }}, /* Byte value: 0x2b */ + {{0x42, 0x22, 0x96, 0xe1, 0x7c, 0x52, 0x79, 0x1d, }}, /* Byte value: 0x2c */ + {{0xe4, 0xc6, 0xdc, 0x36, 0xb8, 0xeb, 0xa7, 0xf6, }}, /* Byte value: 0x2d */ + {{0x15, 0x2f, 0x18, 0x9f, 0xa7, 0x1e, 0x28, 0x60, }}, /* Byte value: 0x2e */ + {{0xb7, 0xb4, 0xf9, 0xbc, 0xda, 0x56, 0xc8, 0x62, }}, /* Byte value: 0x2f */ + {{0xc8, 0x39, 0xf3, 0x45, 0x31, 0xbf, 0xd6, 0x4a, }}, /* Byte value: 0x30 */ + {{0x06, 0xa1, 0x1f, 0x8e, 0x04, 0x68, 0x21, 0x7c, }}, /* Byte value: 0x31 */ + {{0x70, 0xbd, 0xda, 0x61, 0xe1, 0x0d, 0xad, 0xee, }}, /* Byte value: 0x32 */ + {{0x9d, 0xea, 0xc9, 0x41, 0x57, 0x6a, 0x98, 0xa2, }}, /* Byte value: 0x33 */ + {{0x41, 0x93, 0x78, 0xa6, 0x7e, 0x66, 0x88, 0x23, }}, /* Byte value: 0x34 */ + {{0x75, 0xad, 0x2b, 0xa8, 0xe7, 0x51, 0x7d, 0xac, }}, /* Byte value: 0x35 */ + {{0x19, 0xae, 0x26, 0x40, 0xaf, 0xce, 0x6a, 0x98, }}, /* Byte value: 0x36 */ + {{0xc9, 0x56, 0xa9, 0x78, 0x8e, 0x12, 0x38, 0xe1, }}, /* Byte value: 0x37 */ + {{0xaa, 0x65, 0x74, 0x08, 0xcc, 0x69, 0x9c, 0x13, }}, /* Byte value: 0x38 */ + {{0xfc, 0x07, 0xa0, 0x4b, 0xa8, 0x88, 0x23, 0xc5, }}, /* Byte value: 0x39 */ + {{0x4d, 0x12, 0x46, 0x79, 0x76, 0xb6, 0xca, 0xdb, }}, /* Byte value: 0x3a */ + {{0xbf, 0x4a, 0x6c, 0x97, 0x6b, 0x77, 0xb4, 0x73, }}, /* Byte value: 0x3b */ + {{0x2a, 0x5e, 0x30, 0xfd, 0x8d, 0x3c, 0x50, 0xc0, }}, /* Byte value: 0x3c */ + {{0x73, 0x0c, 0x34, 0x26, 0xe3, 0x39, 0x5c, 0xd0, }}, /* Byte value: 0x3d */ + {{0x84, 0x44, 0xef, 0x01, 0xf8, 0xa4, 0xf2, 0x3a, }}, /* Byte value: 0x3e */ + {{0xd5, 0xe8, 0x7e, 0xf1, 0x27, 0x80, 0x82, 0x3b, }}, /* Byte value: 0x3f */ + {{0xc3, 0x76, 0x88, 0x29, 0x82, 0xaa, 0x5b, 0x65, }}, /* Byte value: 0x40 */ + {{0xaf, 0x75, 0x85, 0xc1, 0xca, 0x35, 0x4c, 0x51, }}, /* Byte value: 0x41 */ + {{0x2b, 0x31, 0x6a, 0xc0, 0x32, 0x91, 0xbe, 0x6b, }}, /* Byte value: 0x42 */ + {{0x86, 0x9a, 0x5b, 0x7b, 0x45, 0x3d, 0xed, 0xaf, }}, /* Byte value: 0x43 */ + {{0xa7, 0x8b, 0x10, 0xea, 0x7b, 0x14, 0x30, 0x40, }}, /* Byte value: 0x44 */ + {{0xb1, 0x15, 0xe6, 0x32, 0xde, 0x3e, 0xe9, 0x1e, }}, /* Byte value: 0x45 */ + {{0xb2, 0xa4, 0x08, 0x75, 0xdc, 0x0a, 0x18, 0x20, }}, /* Byte value: 0x46 */ + {{0x5b, 0x8c, 0xb0, 0xa1, 0xd3, 0x9c, 0x13, 0x85, }}, /* Byte value: 0x47 */ + {{0x46, 0x5d, 0x3d, 0x15, 0xc5, 0xa3, 0x47, 0xf4, }}, /* Byte value: 0x48 */ + {{0xd3, 0x49, 0x61, 0x7f, 0x23, 0xe8, 0xa3, 0x47, }}, /* Byte value: 0x49 */ + {{0x9f, 0x34, 0x7d, 0x3b, 0xea, 0xf3, 0x87, 0x37, }}, /* Byte value: 0x4a */ + {{0xfd, 0x68, 0xfa, 0x76, 0x17, 0x25, 0xcd, 0x6e, }}, /* Byte value: 0x4b */ + {{0xd4, 0x87, 0x24, 0xcc, 0x98, 0x2d, 0x6c, 0x90, }}, /* Byte value: 0x4c */ + {{0x0f, 0x30, 0xd0, 0x98, 0x0a, 0xe4, 0xb3, 0xc6, }}, /* Byte value: 0x4d */ + {{0x9c, 0x85, 0x93, 0x7c, 0xe8, 0xc7, 0x76, 0x09, }}, /* Byte value: 0x4e */ + {{0x2f, 0x4e, 0xc1, 0x34, 0x8b, 0x60, 0x80, 0x82, }}, /* Byte value: 0x4f */ + {{0x9b, 0x4b, 0xd6, 0xcf, 0x53, 0x02, 0xb9, 0xde, }}, /* Byte value: 0x50 */ + {{0x43, 0x4d, 0xcc, 0xdc, 0xc3, 0xff, 0x97, 0xb6, }}, /* Byte value: 0x51 */ + {{0xef, 0x89, 0xa7, 0x5a, 0x0b, 0xfe, 0x2a, 0xd9, }}, /* Byte value: 0x52 */ + {{0xd9, 0x69, 0x40, 0x2e, 0x2f, 0x50, 0xc0, 0xc3, }}, /* Byte value: 0x53 */ + {{0x79, 0x2c, 0x15, 0x77, 0xef, 0x81, 0x3f, 0x54, }}, /* Byte value: 0x54 */ + {{0xb6, 0xdb, 0xa3, 0x81, 0x65, 0xfb, 0x26, 0xc9, }}, /* Byte value: 0x55 */ + {{0x53, 0x72, 0x25, 0x8a, 0x62, 0xbd, 0x6f, 0x94, }}, /* Byte value: 0x56 */ + {{0x7f, 0x8d, 0x0a, 0xf9, 0xeb, 0xe9, 0x1e, 0x28, }}, /* Byte value: 0x57 */ + {{0xc1, 0xa8, 0x3c, 0x53, 0x3f, 0x33, 0x44, 0xf0, }}, /* Byte value: 0x58 */ + {{0xf0, 0x86, 0x9e, 0x94, 0xa0, 0x58, 0x61, 0x3d, }}, /* Byte value: 0x59 */ + {{0x23, 0xcf, 0xff, 0xeb, 0x83, 0xb0, 0xc2, 0x7a, }}, /* Byte value: 0x5a */ + {{0xe7, 0x77, 0x32, 0x71, 0xba, 0xdf, 0x56, 0xc8, }}, /* Byte value: 0x5b */ + {{0x25, 0x6e, 0xe0, 0x65, 0x87, 0xd8, 0xe3, 0x06, }}, /* Byte value: 0x5c */ + {{0x5e, 0x9c, 0x41, 0x68, 0xd5, 0xc0, 0xc3, 0xc7, }}, /* Byte value: 0x5d */ + {{0xb5, 0x6a, 0x4d, 0xc6, 0x67, 0xcf, 0xd7, 0xf7, }}, /* Byte value: 0x5e */ + {{0x1e, 0x60, 0x63, 0xf3, 0x14, 0x0b, 0xa5, 0x4f, }}, /* Byte value: 0x5f */ + {{0xa2, 0x9b, 0xe1, 0x23, 0x7d, 0x48, 0xe0, 0x02, }}, /* Byte value: 0x60 */ + {{0xdf, 0xc8, 0x5f, 0xa0, 0x2b, 0x38, 0xe1, 0xbf, }}, /* Byte value: 0x61 */ + {{0xa6, 0xe4, 0x4a, 0xd7, 0xc4, 0xb9, 0xde, 0xeb, }}, /* Byte value: 0x62 */ + {{0xfe, 0xd9, 0x14, 0x31, 0x15, 0x11, 0x3c, 0x50, }}, /* Byte value: 0x63 */ + {{0xac, 0xc4, 0x6b, 0x86, 0xc8, 0x01, 0xbd, 0x6f, }}, /* Byte value: 0x64 */ + {{0x22, 0xa0, 0xa5, 0xd6, 0x3c, 0x1d, 0x2c, 0xd1, }}, /* Byte value: 0x65 */ + {{0xf9, 0x17, 0x51, 0x82, 0xae, 0xd4, 0xf3, 0x87, }}, /* Byte value: 0x66 */ + {{0xe2, 0x67, 0xc3, 0xb8, 0xbc, 0x83, 0x86, 0x8a, }}, /* Byte value: 0x67 */ + {{0x4a, 0xdc, 0x03, 0xca, 0xcd, 0x73, 0x05, 0x0c, }}, /* Byte value: 0x68 */ + {{0xbc, 0xfb, 0x82, 0xd0, 0x69, 0x43, 0x45, 0x4d, }}, /* Byte value: 0x69 */ + {{0x35, 0x51, 0x09, 0x33, 0x26, 0x9a, 0x1b, 0x24, }}, /* Byte value: 0x6a */ + {{0xca, 0xe7, 0x47, 0x3f, 0x8c, 0x26, 0xc9, 0xdf, }}, /* Byte value: 0x6b */ + {{0xee, 0xe6, 0xfd, 0x67, 0xb4, 0x53, 0xc4, 0x72, }}, /* Byte value: 0x6c */ + {{0x78, 0x43, 0x4f, 0x4a, 0x50, 0x2c, 0xd1, 0xff, }}, /* Byte value: 0x6d */ + {{0x05, 0x10, 0xf1, 0xc9, 0x06, 0x5c, 0xd0, 0x42, }}, /* Byte value: 0x6e */ + {{0x6b, 0xcd, 0x48, 0x5b, 0xf3, 0x5a, 0xd8, 0xe3, }}, /* Byte value: 0x6f */ + {{0x51, 0xac, 0x91, 0xf0, 0xdf, 0x24, 0x70, 0x01, }}, /* Byte value: 0x70 */ + {{0xe1, 0xd6, 0x2d, 0xff, 0xbe, 0xb7, 0x77, 0xb4, }}, /* Byte value: 0x71 */ + {{0x59, 0x52, 0x04, 0xdb, 0x6e, 0x05, 0x0c, 0x10, }}, /* Byte value: 0x72 */ + {{0xa3, 0xf4, 0xbb, 0x1e, 0xc2, 0xe5, 0x0e, 0xa9, }}, /* Byte value: 0x73 */ + {{0xf2, 0x58, 0x2a, 0xee, 0x1d, 0xc1, 0x7e, 0xa8, }}, /* Byte value: 0x74 */ + {{0x71, 0xd2, 0x80, 0x5c, 0x5e, 0xa0, 0x43, 0x45, }}, /* Byte value: 0x75 */ + {{0x56, 0x62, 0xd4, 0x43, 0x64, 0xe1, 0xbf, 0xd6, }}, /* Byte value: 0x76 */ + {{0x11, 0x50, 0xb3, 0x6b, 0x1e, 0xef, 0x16, 0x89, }}, /* Byte value: 0x77 */ + {{0x6a, 0xa2, 0x12, 0x66, 0x4c, 0xf7, 0x36, 0x48, }}, /* Byte value: 0x78 */ + {{0x89, 0xaa, 0x8b, 0xe3, 0x4f, 0xd9, 0x5e, 0x69, }}, /* Byte value: 0x79 */ + {{0x94, 0x7b, 0x06, 0x57, 0x59, 0xe6, 0x0a, 0x18, }}, /* Byte value: 0x7a */ + {{0x65, 0x92, 0xc2, 0xfe, 0x46, 0x13, 0x85, 0x8e, }}, /* Byte value: 0x7b */ + {{0x8c, 0xba, 0x7a, 0x2a, 0x49, 0x85, 0x8e, 0x2b, }}, /* Byte value: 0x7c */ + {{0xbb, 0x35, 0xc7, 0x63, 0xd2, 0x86, 0x8a, 0x9a, }}, /* Byte value: 0x7d */ + {{0x77, 0x73, 0x9f, 0xd2, 0x5a, 0xc8, 0x62, 0x39, }}, /* Byte value: 0x7e */ + {{0x3c, 0xc0, 0xc6, 0x25, 0x28, 0x16, 0x89, 0x9e, }}, /* Byte value: 0x7f */ + {{0x7b, 0xf2, 0xa1, 0x0d, 0x52, 0x18, 0x20, 0xc1, }}, /* Byte value: 0x80 */ + {{0x28, 0x80, 0x84, 0x87, 0x30, 0xa5, 0x4f, 0x55, }}, /* Byte value: 0x81 */ + {{0xab, 0x0a, 0x2e, 0x35, 0x73, 0xc4, 0x72, 0xb8, }}, /* Byte value: 0x82 */ + {{0xd2, 0x26, 0x3b, 0x42, 0x9c, 0x45, 0x4d, 0xec, }}, /* Byte value: 0x83 */ + {{0x31, 0x2e, 0xa2, 0xc7, 0x9f, 0x6b, 0x25, 0xcd, }}, /* Byte value: 0x84 */ + {{0xde, 0xa7, 0x05, 0x9d, 0x94, 0x95, 0x0f, 0x14, }}, /* Byte value: 0x85 */ + {{0xc4, 0xb8, 0xcd, 0x9a, 0x39, 0x6f, 0x94, 0xb2, }}, /* Byte value: 0x86 */ + {{0x5f, 0xf3, 0x1b, 0x55, 0x6a, 0x6d, 0x2d, 0x6c, }}, /* Byte value: 0x87 */ + {{0xcc, 0x46, 0x58, 0xb1, 0x88, 0x4e, 0xe8, 0xa3, }}, /* Byte value: 0x88 */ + {{0xcf, 0xf7, 0xb6, 0xf6, 0x8a, 0x7a, 0x19, 0x9d, }}, /* Byte value: 0x89 */ + {{0x76, 0x1c, 0xc5, 0xef, 0xe5, 0x65, 0x8c, 0x92, }}, /* Byte value: 0x8a */ + {{0x2c, 0xff, 0x2f, 0x73, 0x89, 0x54, 0x71, 0xbc, }}, /* Byte value: 0x8b */ + {{0xb8, 0x84, 0x29, 0x24, 0xd0, 0xb2, 0x7b, 0xa4, }}, /* Byte value: 0x8c */ + {{0xd8, 0x06, 0x1a, 0x13, 0x90, 0xfd, 0x2e, 0x68, }}, /* Byte value: 0x8d */ + {{0x2e, 0x21, 0x9b, 0x09, 0x34, 0xcd, 0x6e, 0x29, }}, /* Byte value: 0x8e */ + {{0x36, 0xe0, 0xe7, 0x74, 0x24, 0xae, 0xea, 0x1a, }}, /* Byte value: 0x8f */ + {{0xdb, 0xb7, 0xf4, 0x54, 0x92, 0xc9, 0xdf, 0x56, }}, /* Byte value: 0x90 */ + {{0x69, 0x13, 0xfc, 0x21, 0x4e, 0xc3, 0xc7, 0x76, }}, /* Byte value: 0x91 */ + {{0xb3, 0xcb, 0x52, 0x48, 0x63, 0xa7, 0xf6, 0x8b, }}, /* Byte value: 0x92 */ + {{0x14, 0x40, 0x42, 0xa2, 0x18, 0xb3, 0xc6, 0xcb, }}, /* Byte value: 0x93 */ + {{0x95, 0x14, 0x5c, 0x6a, 0xe6, 0x4b, 0xe4, 0xb3, }}, /* Byte value: 0x94 */ + {{0xbe, 0x25, 0x36, 0xaa, 0xd4, 0xda, 0x5a, 0xd8, }}, /* Byte value: 0x95 */ + {{0x62, 0x5c, 0x87, 0x4d, 0xfd, 0xd6, 0x4a, 0x59, }}, /* Byte value: 0x96 */ + {{0xa1, 0x2a, 0x0f, 0x64, 0x7f, 0x7c, 0x11, 0x3c, }}, /* Byte value: 0x97 */ + {{0x3b, 0x0e, 0x83, 0x96, 0x93, 0xd3, 0x46, 0x49, }}, /* Byte value: 0x98 */ + {{0x16, 0x9e, 0xf6, 0xd8, 0xa5, 0x2a, 0xd9, 0x5e, }}, /* Byte value: 0x99 */ + {{0x66, 0x23, 0x2c, 0xb9, 0x44, 0x27, 0x74, 0xb0, }}, /* Byte value: 0x9a */ + {{0xe9, 0x28, 0xb8, 0xd4, 0x0f, 0x96, 0x0b, 0xa5, }}, /* Byte value: 0x9b */ + {{0x5c, 0x42, 0xf5, 0x12, 0x68, 0x59, 0xdc, 0x52, }}, /* Byte value: 0x9c */ + {{0x6c, 0x03, 0x0d, 0xe8, 0x48, 0x9f, 0x17, 0x34, }}, /* Byte value: 0x9d */ + {{0x6d, 0x6c, 0x57, 0xd5, 0xf7, 0x32, 0xf9, 0x9f, }}, /* Byte value: 0x9e */ + {{0xad, 0xab, 0x31, 0xbb, 0x77, 0xac, 0x53, 0xc4, }}, /* Byte value: 0x9f */ + {{0x37, 0x8f, 0xbd, 0x49, 0x9b, 0x03, 0x04, 0xb1, }}, /* Byte value: 0xa0 */ + {{0x61, 0xed, 0x69, 0x0a, 0xff, 0xe2, 0xbb, 0x67, }}, /* Byte value: 0xa1 */ + {{0x4b, 0xb3, 0x59, 0xf7, 0x72, 0xde, 0xeb, 0xa7, }}, /* Byte value: 0xa2 */ + {{0xb9, 0xeb, 0x73, 0x19, 0x6f, 0x1f, 0x95, 0x0f, }}, /* Byte value: 0xa3 */ + {{0xe3, 0x08, 0x99, 0x85, 0x03, 0x2e, 0x68, 0x21, }}, /* Byte value: 0xa4 */ + {{0xba, 0x5a, 0x9d, 0x5e, 0x6d, 0x2b, 0x64, 0x31, }}, /* Byte value: 0xa5 */ + {{0xf1, 0xe9, 0xc4, 0xa9, 0x1f, 0xf5, 0x8f, 0x96, }}, /* Byte value: 0xa6 */ + {{0xa0, 0x45, 0x55, 0x59, 0xc0, 0xd1, 0xff, 0x97, }}, /* Byte value: 0xa7 */ + {{0x85, 0x2b, 0xb5, 0x3c, 0x47, 0x09, 0x1c, 0x91, }}, /* Byte value: 0xa8 */ + {{0x83, 0x8a, 0xaa, 0xb2, 0x43, 0x61, 0x3d, 0xed, }}, /* Byte value: 0xa9 */ + {{0xda, 0xd8, 0xae, 0x69, 0x2d, 0x64, 0x31, 0xfd, }}, /* Byte value: 0xaa */ + {{0x47, 0x32, 0x67, 0x28, 0x7a, 0x0e, 0xa9, 0x5f, }}, /* Byte value: 0xab */ + {{0xc5, 0xd7, 0x97, 0xa7, 0x86, 0xc2, 0x7a, 0x19, }}, /* Byte value: 0xac */ + {{0xb0, 0x7a, 0xbc, 0x0f, 0x61, 0x93, 0x07, 0xb5, }}, /* Byte value: 0xad */ + {{0x33, 0xf0, 0x16, 0xbd, 0x22, 0xf2, 0x3a, 0x58, }}, /* Byte value: 0xae */ + {{0xfa, 0xa6, 0xbf, 0xc5, 0xac, 0xe0, 0x02, 0xb9, }}, /* Byte value: 0xaf */ + {{0x96, 0xa5, 0xb2, 0x2d, 0xe4, 0x7f, 0x15, 0x8d, }}, /* Byte value: 0xb0 */ + {{0x6f, 0xb2, 0xe3, 0xaf, 0x4a, 0xab, 0xe6, 0x0a, }}, /* Byte value: 0xb1 */ + {{0x6e, 0xdd, 0xb9, 0x92, 0xf5, 0x06, 0x08, 0xa1, }}, /* Byte value: 0xb2 */ + {{0xc2, 0x19, 0xd2, 0x14, 0x3d, 0x07, 0xb5, 0xce, }}, /* Byte value: 0xb3 */ + {{0xf6, 0x27, 0x81, 0x1a, 0xa4, 0x30, 0x40, 0x41, }}, /* Byte value: 0xb4 */ + {{0x50, 0xc3, 0xcb, 0xcd, 0x60, 0x89, 0x9e, 0xaa, }}, /* Byte value: 0xb5 */ + {{0xff, 0xb6, 0x4e, 0x0c, 0xaa, 0xbc, 0xd2, 0xfb, }}, /* Byte value: 0xb6 */ + {{0x5d, 0x2d, 0xaf, 0x2f, 0xd7, 0xf4, 0x32, 0xf9, }}, /* Byte value: 0xb7 */ + {{0xa9, 0xd4, 0x9a, 0x4f, 0xce, 0x5d, 0x6d, 0x2d, }}, /* Byte value: 0xb8 */ + {{0x8e, 0x64, 0xce, 0x50, 0xf4, 0x1c, 0x91, 0xbe, }}, /* Byte value: 0xb9 */ + {{0x17, 0xf1, 0xac, 0xe5, 0x1a, 0x87, 0x37, 0xf5, }}, /* Byte value: 0xba */ + {{0x1b, 0x70, 0x92, 0x3a, 0x12, 0x57, 0x75, 0x0d, }}, /* Byte value: 0xbb */ + {{0x97, 0xca, 0xe8, 0x10, 0x5b, 0xd2, 0xfb, 0x26, }}, /* Byte value: 0xbc */ + {{0x7d, 0x53, 0xbe, 0x83, 0x56, 0x70, 0x01, 0xbd, }}, /* Byte value: 0xbd */ + {{0xec, 0x38, 0x49, 0x1d, 0x09, 0xca, 0xdb, 0xe7, }}, /* Byte value: 0xbe */ + {{0x58, 0x3d, 0x5e, 0xe6, 0xd1, 0xa8, 0xe2, 0xbb, }}, /* Byte value: 0xbf */ + {{0xf7, 0x48, 0xdb, 0x27, 0x1b, 0x9d, 0xae, 0xea, }}, /* Byte value: 0xc0 */ + {{0x1f, 0x0f, 0x39, 0xce, 0xab, 0xa6, 0x4b, 0xe4, }}, /* Byte value: 0xc1 */ + {{0xfb, 0xc9, 0xe5, 0xf8, 0x13, 0x4d, 0xec, 0x12, }}, /* Byte value: 0xc2 */ + {{0x7c, 0x3c, 0xe4, 0xbe, 0xe9, 0xdd, 0xef, 0x16, }}, /* Byte value: 0xc3 */ + {{0x09, 0x91, 0xcf, 0x16, 0x0e, 0x8c, 0x92, 0xba, }}, /* Byte value: 0xc4 */ + {{0x0d, 0xee, 0x64, 0xe2, 0xb7, 0x7d, 0xac, 0x53, }}, /* Byte value: 0xc5 */ + {{0x7a, 0x9d, 0xfb, 0x30, 0xed, 0xb5, 0xce, 0x6a, }}, /* Byte value: 0xc6 */ + {{0x67, 0x4c, 0x76, 0x84, 0xfb, 0x8a, 0x9a, 0x1b, }}, /* Byte value: 0xc7 */ + {{0x45, 0xec, 0xd3, 0x52, 0xc7, 0x97, 0xb6, 0xca, }}, /* Byte value: 0xc8 */ + {{0x87, 0xf5, 0x01, 0x46, 0xfa, 0x90, 0x03, 0x04, }}, /* Byte value: 0xc9 */ + {{0xdc, 0x79, 0xb1, 0xe7, 0x29, 0x0c, 0x10, 0x81, }}, /* Byte value: 0xca */ + {{0xe8, 0x47, 0xe2, 0xe9, 0xb0, 0x3b, 0xe5, 0x0e, }}, /* Byte value: 0xcb */ + {{0x4f, 0xcc, 0xf2, 0x03, 0xcb, 0x2f, 0xd5, 0x4e, }}, /* Byte value: 0xcc */ + {{0x1d, 0xd1, 0x8d, 0xb4, 0x16, 0x3f, 0x54, 0x71, }}, /* Byte value: 0xcd */ + {{0x4e, 0xa3, 0xa8, 0x3e, 0x74, 0x82, 0x3b, 0xe5, }}, /* Byte value: 0xce */ + {{0x04, 0x7f, 0xab, 0xf4, 0xb9, 0xf1, 0x3e, 0xe9, }}, /* Byte value: 0xcf */ + {{0xeb, 0xf6, 0x0c, 0xae, 0xb2, 0x0f, 0x14, 0x30, }}, /* Byte value: 0xd0 */ + {{0xf8, 0x78, 0x0b, 0xbf, 0x11, 0x79, 0x1d, 0x2c, }}, /* Byte value: 0xd1 */ + {{0xf3, 0x37, 0x70, 0xd3, 0xa2, 0x6c, 0x90, 0x03, }}, /* Byte value: 0xd2 */ + {{0x3e, 0x1e, 0x72, 0x5f, 0x95, 0x8f, 0x96, 0x0b, }}, /* Byte value: 0xd3 */ + {{0x3d, 0xaf, 0x9c, 0x18, 0x97, 0xbb, 0x67, 0x35, }}, /* Byte value: 0xd4 */ + {{0xbd, 0x94, 0xd8, 0xed, 0xd6, 0xee, 0xab, 0xe6, }}, /* Byte value: 0xd5 */ + {{0x8a, 0x1b, 0x65, 0xa4, 0x4d, 0xed, 0xaf, 0x57, }}, /* Byte value: 0xd6 */ + {{0x88, 0xc5, 0xd1, 0xde, 0xf0, 0x74, 0xb0, 0xc2, }}, /* Byte value: 0xd7 */ + {{0xdd, 0x16, 0xeb, 0xda, 0x96, 0xa1, 0xfe, 0x2a, }}, /* Byte value: 0xd8 */ + {{0xcd, 0x29, 0x02, 0x8c, 0x37, 0xe3, 0x06, 0x08, }}, /* Byte value: 0xd9 */ + {{0x0b, 0x4f, 0x7b, 0x6c, 0xb3, 0x15, 0x8d, 0x2f, }}, /* Byte value: 0xda */ + {{0x13, 0x8e, 0x07, 0x11, 0xa3, 0x76, 0x09, 0x1c, }}, /* Byte value: 0xdb */ + {{0x98, 0xfa, 0x38, 0x88, 0x51, 0x36, 0x48, 0xe0, }}, /* Byte value: 0xdc */ + {{0x02, 0xde, 0xb4, 0x7a, 0xbd, 0x99, 0x1f, 0x95, }}, /* Byte value: 0xdd */ + {{0x93, 0xb5, 0x43, 0xe4, 0xe2, 0x23, 0xc5, 0xcf, }}, /* Byte value: 0xde */ + {{0x80, 0x3b, 0x44, 0xf5, 0x41, 0x55, 0xcc, 0xd3, }}, /* Byte value: 0xdf */ + {{0x90, 0x04, 0xad, 0xa3, 0xe0, 0x17, 0x34, 0xf1, }}, /* Byte value: 0xe0 */ + {{0xd0, 0xf8, 0x8f, 0x38, 0x21, 0xdc, 0x52, 0x79, }}, /* Byte value: 0xe1 */ + {{0x24, 0x01, 0xba, 0x58, 0x38, 0x75, 0x0d, 0xad, }}, /* Byte value: 0xe2 */ + {{0x34, 0x3e, 0x53, 0x0e, 0x99, 0x37, 0xf5, 0x8f, }}, /* Byte value: 0xe3 */ + {{0xcb, 0x88, 0x1d, 0x02, 0x33, 0x8b, 0x27, 0x74, }}, /* Byte value: 0xe4 */ + {{0xed, 0x57, 0x13, 0x20, 0xb6, 0x67, 0x35, 0x4c, }}, /* Byte value: 0xe5 */ + {{0xf4, 0xf9, 0x35, 0x60, 0x19, 0xa9, 0x5f, 0xd4, }}, /* Byte value: 0xe6 */ + {{0xce, 0x98, 0xec, 0xcb, 0x35, 0xd7, 0xf7, 0x36, }}, /* Byte value: 0xe7 */ + {{0x99, 0x95, 0x62, 0xb5, 0xee, 0x9b, 0xa6, 0x4b, }}, /* Byte value: 0xe8 */ + {{0x10, 0x3f, 0xe9, 0x56, 0xa1, 0x42, 0xf8, 0x22, }}, /* Byte value: 0xe9 */ + {{0x44, 0x83, 0x89, 0x6f, 0x78, 0x3a, 0x58, 0x61, }}, /* Byte value: 0xea */ + {{0x40, 0xfc, 0x22, 0x9b, 0xc1, 0xcb, 0x66, 0x88, }}, /* Byte value: 0xeb */ + {{0x92, 0xda, 0x19, 0xd9, 0x5d, 0x8e, 0x2b, 0x64, }}, /* Byte value: 0xec */ + {{0x3a, 0x61, 0xd9, 0xab, 0x2c, 0x7e, 0xa8, 0xe2, }}, /* Byte value: 0xed */ + {{0x01, 0x6f, 0x5a, 0x3d, 0xbf, 0xad, 0xee, 0xab, }}, /* Byte value: 0xee */ + {{0x26, 0xdf, 0x0e, 0x22, 0x85, 0xec, 0x12, 0x38, }}, /* Byte value: 0xef */ + {{0x12, 0xe1, 0x5d, 0x2c, 0x1c, 0xdb, 0xe7, 0xb7, }}, /* Byte value: 0xf0 */ + {{0x1a, 0x1f, 0xc8, 0x07, 0xad, 0xfa, 0x9b, 0xa6, }}, /* Byte value: 0xf1 */ + {{0x48, 0x02, 0xb7, 0xb0, 0x70, 0xea, 0x1a, 0x99, }}, /* Byte value: 0xf2 */ + {{0x68, 0x7c, 0xa6, 0x1c, 0xf1, 0x6e, 0x29, 0xdd, }}, /* Byte value: 0xf3 */ + {{0xf5, 0x96, 0x6f, 0x5d, 0xa6, 0x04, 0xb1, 0x7f, }}, /* Byte value: 0xf4 */ + {{0x81, 0x54, 0x1e, 0xc8, 0xfe, 0xf8, 0x22, 0x78, }}, /* Byte value: 0xf5 */ + {{0x8b, 0x74, 0x3f, 0x99, 0xf2, 0x40, 0x41, 0xfc, }}, /* Byte value: 0xf6 */ + {{0xc7, 0x09, 0x23, 0xdd, 0x3b, 0x5b, 0x65, 0x8c, }}, /* Byte value: 0xf7 */ + {{0xd6, 0x59, 0x90, 0xb6, 0x25, 0xb4, 0x73, 0x05, }}, /* Byte value: 0xf8 */ + {{0x20, 0x7e, 0x11, 0xac, 0x81, 0x84, 0x33, 0x44, }}, /* Byte value: 0xf9 */ + {{0x0a, 0x20, 0x21, 0x51, 0x0c, 0xb8, 0x63, 0x84, }}, /* Byte value: 0xfa */ + {{0x08, 0xfe, 0x95, 0x2b, 0xb1, 0x21, 0x7c, 0x11, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x4c, 0x7d, 0x1c, 0x44, 0xc9, 0x1b, 0x24, 0x70, }}, /* Byte value: 0xfd */ + {{0xd7, 0x36, 0xca, 0x8b, 0x9a, 0x19, 0x9d, 0xae, }}, /* Byte value: 0xfe */ + {{0x74, 0xc2, 0x71, 0x95, 0x58, 0xfc, 0x93, 0x07, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 10 */ + {{0x51, 0xf6, 0x5f, 0xcc, 0xc9, 0xbb, 0x4b, 0xca, }}, /* Byte value: 0x00 */ + {{0x33, 0xae, 0xa5, 0x03, 0xf8, 0x72, 0xcf, 0x10, }}, /* Byte value: 0x01 */ + {{0xa4, 0x6a, 0x15, 0x17, 0x52, 0x6f, 0xc2, 0xd0, }}, /* Byte value: 0x02 */ + {{0x67, 0xde, 0xe5, 0xa5, 0xd2, 0x7e, 0xfa, 0xff, }}, /* Byte value: 0x03 */ + {{0x0a, 0xcf, 0x3e, 0xd4, 0x05, 0xad, 0xfc, 0x4a, }}, /* Byte value: 0x04 */ + {{0xe7, 0x84, 0x9d, 0xfc, 0x92, 0x97, 0xe6, 0x09, }}, /* Byte value: 0x05 */ + {{0x28, 0xba, 0xf8, 0xd6, 0x14, 0xf1, 0x76, 0xeb, }}, /* Byte value: 0x06 */ + {{0x1a, 0x55, 0x31, 0x76, 0x0d, 0x19, 0x1e, 0x24, }}, /* Byte value: 0x07 */ + {{0x6c, 0x50, 0xb7, 0xd2, 0x36, 0x49, 0xa1, 0x6a, }}, /* Byte value: 0x08 */ + {{0x65, 0x5c, 0x3d, 0x20, 0xd3, 0x89, 0x77, 0x82, }}, /* Byte value: 0x09 */ + {{0xfa, 0xd5, 0x6b, 0x65, 0x7d, 0xce, 0x0b, 0x75, }}, /* Byte value: 0x0a */ + {{0xe8, 0xcd, 0xbc, 0x42, 0x74, 0x8d, 0x64, 0x66, }}, /* Byte value: 0x0b */ + {{0xac, 0x27, 0xf3, 0x46, 0x56, 0x35, 0xb3, 0xe7, }}, /* Byte value: 0x0c */ + {{0x5a, 0x78, 0x0d, 0xbb, 0x2d, 0x8c, 0x10, 0x5f, }}, /* Byte value: 0x0d */ + {{0xa9, 0xa1, 0xec, 0x2c, 0xb5, 0x82, 0xcd, 0xc2, }}, /* Byte value: 0x0e */ + {{0x30, 0x6d, 0x11, 0x25, 0x18, 0x1f, 0xe5, 0xb2, }}, /* Byte value: 0x0f */ + {{0x8b, 0xd4, 0x2a, 0x2e, 0xa4, 0xde, 0x47, 0x63, }}, /* Byte value: 0x10 */ + {{0x83, 0x99, 0xcc, 0x7f, 0xa0, 0x84, 0x36, 0x54, }}, /* Byte value: 0x11 */ + {{0xef, 0xc9, 0x7b, 0xad, 0x96, 0xcd, 0x97, 0x3e, }}, /* Byte value: 0x12 */ + {{0x66, 0x9f, 0x89, 0x06, 0x33, 0xe4, 0x5d, 0x20, }}, /* Byte value: 0x13 */ + {{0x14, 0x5d, 0x7c, 0x6b, 0x0a, 0x99, 0x3b, 0x94, }}, /* Byte value: 0x14 */ + {{0x0d, 0xcb, 0xf9, 0x3b, 0xe7, 0xed, 0x0f, 0x12, }}, /* Byte value: 0x15 */ + {{0x05, 0x86, 0x1f, 0x6a, 0xe3, 0xb7, 0x7e, 0x25, }}, /* Byte value: 0x16 */ + {{0x92, 0x42, 0xaf, 0x7e, 0x49, 0xaa, 0x73, 0xe5, }}, /* Byte value: 0x17 */ + {{0x7a, 0x8f, 0x13, 0x3c, 0x3d, 0x27, 0x17, 0x83, }}, /* Byte value: 0x18 */ + {{0x13, 0x59, 0xbb, 0x84, 0xe8, 0xd9, 0xc8, 0xcc, }}, /* Byte value: 0x19 */ + {{0xd8, 0xa0, 0xad, 0x67, 0x6c, 0x92, 0x81, 0xd4, }}, /* Byte value: 0x1a */ + {{0x87, 0x5e, 0xbf, 0xb6, 0xa2, 0xa9, 0xef, 0xae, }}, /* Byte value: 0x1b */ + {{0xb5, 0xb1, 0x76, 0x16, 0xbb, 0x41, 0x87, 0x61, }}, /* Byte value: 0x1c */ + {{0xdf, 0xa4, 0x6a, 0x88, 0x8e, 0xd2, 0x72, 0x8c, }}, /* Byte value: 0x1d */ + {{0x91, 0x81, 0x1b, 0x58, 0xa9, 0xc7, 0x59, 0x47, }}, /* Byte value: 0x1e */ + {{0x2d, 0x3c, 0xe7, 0xbc, 0xf7, 0x46, 0x08, 0xce, }}, /* Byte value: 0x1f */ + {{0xa0, 0xad, 0x66, 0xde, 0x50, 0x42, 0x1b, 0x2a, }}, /* Byte value: 0x20 */ + {{0xbf, 0x7e, 0x48, 0xc2, 0xbe, 0xec, 0x7b, 0x2b, }}, /* Byte value: 0x21 */ + {{0x24, 0x30, 0x6d, 0x4e, 0x12, 0x86, 0xde, 0x26, }}, /* Byte value: 0x22 */ + {{0x49, 0x21, 0xb6, 0x3f, 0xc5, 0x55, 0xd8, 0x93, }}, /* Byte value: 0x23 */ + {{0xee, 0x88, 0x17, 0x0e, 0x77, 0x57, 0x30, 0xe1, }}, /* Byte value: 0x24 */ + {{0x2c, 0x7d, 0x8b, 0x1f, 0x16, 0xdc, 0xaf, 0x11, }}, /* Byte value: 0x25 */ + {{0x1d, 0x51, 0xf6, 0x99, 0xef, 0x59, 0xed, 0x7c, }}, /* Byte value: 0x26 */ + {{0xcc, 0xfd, 0xd1, 0x0c, 0x66, 0x0b, 0xba, 0x40, }}, /* Byte value: 0x27 */ + {{0x7c, 0xca, 0xb8, 0x70, 0x3e, 0xfd, 0x43, 0x04, }}, /* Byte value: 0x28 */ + {{0x8e, 0x52, 0x35, 0x44, 0x47, 0x69, 0x39, 0x46, }}, /* Byte value: 0x29 */ + {{0xb8, 0x7a, 0x8f, 0x2d, 0x5c, 0xac, 0x88, 0x73, }}, /* Byte value: 0x2a */ + {{0xe6, 0xc5, 0xf1, 0x5f, 0x73, 0x0d, 0x41, 0xd6, }}, /* Byte value: 0x2b */ + {{0xf4, 0xdd, 0x26, 0x78, 0x7a, 0x4e, 0x2e, 0xc5, }}, /* Byte value: 0x2c */ + {{0x26, 0xb2, 0xb5, 0xcb, 0x13, 0x71, 0x53, 0x5b, }}, /* Byte value: 0x2d */ + {{0x1b, 0x14, 0x5d, 0xd5, 0xec, 0x83, 0xb9, 0xfb, }}, /* Byte value: 0x2e */ + {{0x4f, 0x64, 0x1d, 0x73, 0xc6, 0x8f, 0x8c, 0x14, }}, /* Byte value: 0x2f */ + {{0xd5, 0x6b, 0x54, 0x5c, 0x8b, 0x7f, 0x8e, 0xc6, }}, /* Byte value: 0x30 */ + {{0xc5, 0xf1, 0x5b, 0xfe, 0x83, 0xcb, 0x6c, 0xa8, }}, /* Byte value: 0x31 */ + {{0x50, 0xb7, 0x33, 0x6f, 0x28, 0x21, 0xec, 0x15, }}, /* Byte value: 0x32 */ + {{0x79, 0x4c, 0xa7, 0x1a, 0xdd, 0x4a, 0x3d, 0x21, }}, /* Byte value: 0x33 */ + {{0x77, 0x44, 0xea, 0x07, 0xda, 0xca, 0x18, 0x91, }}, /* Byte value: 0x34 */ + {{0x16, 0xdf, 0xa4, 0xee, 0x0b, 0x6e, 0xb6, 0xe9, }}, /* Byte value: 0x35 */ + {{0x52, 0x35, 0xeb, 0xea, 0x29, 0xd6, 0x61, 0x68, }}, /* Byte value: 0x36 */ + {{0x15, 0x1c, 0x10, 0xc8, 0xeb, 0x03, 0x9c, 0x4b, }}, /* Byte value: 0x37 */ + {{0x9b, 0x4e, 0x25, 0x8c, 0xac, 0x6a, 0xa5, 0x0d, }}, /* Byte value: 0x38 */ + {{0xb4, 0xf0, 0x1a, 0xb5, 0x5a, 0xdb, 0x20, 0xbe, }}, /* Byte value: 0x39 */ + {{0x3e, 0x65, 0x5c, 0x38, 0x1f, 0x9f, 0xc0, 0x02, }}, /* Byte value: 0x3a */ + {{0x80, 0x5a, 0x78, 0x59, 0x40, 0xe9, 0x1c, 0xf6, }}, /* Byte value: 0x3b */ + {{0x36, 0x28, 0xba, 0x69, 0x1b, 0xc5, 0xb1, 0x35, }}, /* Byte value: 0x3c */ + {{0xd3, 0x2e, 0xff, 0x10, 0x88, 0xa5, 0xda, 0x41, }}, /* Byte value: 0x3d */ + {{0x2b, 0x79, 0x4c, 0xf0, 0xf4, 0x9c, 0x5c, 0x49, }}, /* Byte value: 0x3e */ + {{0x01, 0x41, 0x6c, 0xa3, 0xe1, 0x9a, 0xa7, 0xdf, }}, /* Byte value: 0x3f */ + {{0x99, 0xcc, 0xfd, 0x09, 0xad, 0x9d, 0x28, 0x70, }}, /* Byte value: 0x40 */ + {{0xdd, 0x26, 0xb2, 0x0d, 0x8f, 0x25, 0xff, 0xf1, }}, /* Byte value: 0x41 */ + {{0xf6, 0x5f, 0xfe, 0xfd, 0x7b, 0xb9, 0xa3, 0xb8, }}, /* Byte value: 0x42 */ + {{0x68, 0x97, 0xc4, 0x1b, 0x34, 0x64, 0x78, 0x90, }}, /* Byte value: 0x43 */ + {{0x12, 0x18, 0xd7, 0x27, 0x09, 0x43, 0x6f, 0x13, }}, /* Byte value: 0x44 */ + {{0x8a, 0x95, 0x46, 0x8d, 0x45, 0x44, 0xe0, 0xbc, }}, /* Byte value: 0x45 */ + {{0x09, 0x0c, 0x8a, 0xf2, 0xe5, 0xc0, 0xd6, 0xe8, }}, /* Byte value: 0x46 */ + {{0xa6, 0xe8, 0xcd, 0x92, 0x53, 0x98, 0x4f, 0xad, }}, /* Byte value: 0x47 */ + {{0x72, 0xc2, 0xf5, 0x6d, 0x39, 0x7d, 0x66, 0xb4, }}, /* Byte value: 0x48 */ + {{0xc4, 0xb0, 0x37, 0x5d, 0x62, 0x51, 0xcb, 0x77, }}, /* Byte value: 0x49 */ + {{0x3a, 0xa2, 0x2f, 0xf1, 0x1d, 0xb2, 0x19, 0xf8, }}, /* Byte value: 0x4a */ + {{0x74, 0x87, 0x5e, 0x21, 0x3a, 0xa7, 0x32, 0x33, }}, /* Byte value: 0x4b */ + {{0xc1, 0x36, 0x28, 0x37, 0x81, 0xe6, 0xb5, 0x52, }}, /* Byte value: 0x4c */ + {{0xca, 0xb8, 0x7a, 0x40, 0x65, 0xd1, 0xee, 0xc7, }}, /* Byte value: 0x4d */ + {{0xb9, 0x3b, 0xe3, 0x8e, 0xbd, 0x36, 0x2f, 0xac, }}, /* Byte value: 0x4e */ + {{0x70, 0x40, 0x2d, 0xe8, 0x38, 0x8a, 0xeb, 0xc9, }}, /* Byte value: 0x4f */ + {{0xbc, 0xbd, 0xfc, 0xe4, 0x5e, 0x81, 0x51, 0x89, }}, /* Byte value: 0x50 */ + {{0x34, 0xaa, 0x62, 0xec, 0x1a, 0x32, 0x3c, 0x48, }}, /* Byte value: 0x51 */ + {{0x6a, 0x15, 0x1c, 0x9e, 0x35, 0x93, 0xf5, 0xed, }}, /* Byte value: 0x52 */ + {{0x48, 0x60, 0xda, 0x9c, 0x24, 0xcf, 0x7f, 0x4c, }}, /* Byte value: 0x53 */ + {{0x5f, 0xfe, 0x12, 0xd1, 0xce, 0x3b, 0x6e, 0x7a, }}, /* Byte value: 0x54 */ + {{0x8f, 0x13, 0x59, 0xe7, 0xa6, 0xf3, 0x9e, 0x99, }}, /* Byte value: 0x55 */ + {{0x69, 0xd6, 0xa8, 0xb8, 0xd5, 0xfe, 0xdf, 0x4f, }}, /* Byte value: 0x56 */ + {{0x9a, 0x0f, 0x49, 0x2f, 0x4d, 0xf0, 0x02, 0xd2, }}, /* Byte value: 0x57 */ + {{0xda, 0x22, 0x75, 0xe2, 0x6d, 0x65, 0x0c, 0xa9, }}, /* Byte value: 0x58 */ + {{0xfd, 0xd1, 0xac, 0x8a, 0x9f, 0x8e, 0xf8, 0x2d, }}, /* Byte value: 0x59 */ + {{0x39, 0x61, 0x9b, 0xd7, 0xfd, 0xdf, 0x33, 0x5a, }}, /* Byte value: 0x5a */ + {{0xa5, 0x2b, 0x79, 0xb4, 0xb3, 0xf5, 0x65, 0x0f, }}, /* Byte value: 0x5b */ + {{0xfc, 0x90, 0xc0, 0x29, 0x7e, 0x14, 0x5f, 0xf2, }}, /* Byte value: 0x5c */ + {{0xe0, 0x80, 0x5a, 0x13, 0x70, 0xd7, 0x15, 0x51, }}, /* Byte value: 0x5d */ + {{0x0c, 0x8a, 0x95, 0x98, 0x06, 0x77, 0xa8, 0xcd, }}, /* Byte value: 0x5e */ + {{0x57, 0xb3, 0xf4, 0x80, 0xca, 0x61, 0x1f, 0x4d, }}, /* Byte value: 0x5f */ + {{0x54, 0x70, 0x40, 0xa6, 0x2a, 0x0c, 0x35, 0xef, }}, /* Byte value: 0x60 */ + {{0x8d, 0x91, 0x81, 0x62, 0xa7, 0x04, 0x13, 0xe4, }}, /* Byte value: 0x61 */ + {{0xd2, 0x6f, 0x93, 0xb3, 0x69, 0x3f, 0x7d, 0x9e, }}, /* Byte value: 0x62 */ + {{0xf7, 0x1e, 0x92, 0x5e, 0x9a, 0x23, 0x04, 0x67, }}, /* Byte value: 0x63 */ + {{0x5e, 0xbf, 0x7e, 0x72, 0x2f, 0xa1, 0xc9, 0xa5, }}, /* Byte value: 0x64 */ + {{0xf9, 0x16, 0xdf, 0x43, 0x9d, 0xa3, 0x21, 0xd7, }}, /* Byte value: 0x65 */ + {{0xf2, 0x98, 0x8d, 0x34, 0x79, 0x94, 0x7a, 0x42, }}, /* Byte value: 0x66 */ + {{0xe3, 0x43, 0xee, 0x35, 0x90, 0xba, 0x3f, 0xf3, }}, /* Byte value: 0x67 */ + {{0x3b, 0xe3, 0x43, 0x52, 0xfc, 0x28, 0xbe, 0x27, }}, /* Byte value: 0x68 */ + {{0x03, 0xc3, 0xb4, 0x26, 0xe0, 0x6d, 0x2a, 0xa2, }}, /* Byte value: 0x69 */ + {{0xa1, 0xec, 0x0a, 0x7d, 0xb1, 0xd8, 0xbc, 0xf5, }}, /* Byte value: 0x6a */ + {{0x96, 0x85, 0xdc, 0xb7, 0x4b, 0x87, 0xaa, 0x1f, }}, /* Byte value: 0x6b */ + {{0xaa, 0x62, 0x58, 0x0a, 0x55, 0xef, 0xe7, 0x60, }}, /* Byte value: 0x6c */ + {{0x9f, 0x89, 0x56, 0x45, 0xae, 0x47, 0x7c, 0xf7, }}, /* Byte value: 0x6d */ + {{0x46, 0x68, 0x97, 0x81, 0x23, 0x4f, 0x5a, 0xfc, }}, /* Byte value: 0x6e */ + {{0x41, 0x6c, 0x50, 0x6e, 0xc1, 0x0f, 0xa9, 0xa4, }}, /* Byte value: 0x6f */ + {{0x2a, 0x38, 0x20, 0x53, 0x15, 0x06, 0xfb, 0x96, }}, /* Byte value: 0x70 */ + {{0x60, 0xda, 0x22, 0x4a, 0x30, 0x3e, 0x09, 0xa7, }}, /* Byte value: 0x71 */ + {{0xe5, 0x06, 0x45, 0x79, 0x93, 0x60, 0x6b, 0x74, }}, /* Byte value: 0x72 */ + {{0x94, 0x07, 0x04, 0x32, 0x4a, 0x70, 0x27, 0x62, }}, /* Byte value: 0x73 */ + {{0xbe, 0x3f, 0x24, 0x61, 0x5f, 0x76, 0xdc, 0xf4, }}, /* Byte value: 0x74 */ + {{0x90, 0xc0, 0x77, 0xfb, 0x48, 0x5d, 0xfe, 0x98, }}, /* Byte value: 0x75 */ + {{0x2f, 0xbe, 0x3f, 0x39, 0xf6, 0xb1, 0x85, 0xb3, }}, /* Byte value: 0x76 */ + {{0x9d, 0x0b, 0x8e, 0xc0, 0xaf, 0xb0, 0xf1, 0x8a, }}, /* Byte value: 0x77 */ + {{0x81, 0x1b, 0x14, 0xfa, 0xa1, 0x73, 0xbb, 0x29, }}, /* Byte value: 0x78 */ + {{0xa2, 0x2f, 0xbe, 0x5b, 0x51, 0xb5, 0x96, 0x57, }}, /* Byte value: 0x79 */ + {{0x76, 0x05, 0x86, 0xa4, 0x3b, 0x50, 0xbf, 0x4e, }}, /* Byte value: 0x7a */ + {{0x4b, 0xa3, 0x6e, 0xba, 0xc4, 0xa2, 0x55, 0xee, }}, /* Byte value: 0x7b */ + {{0xe4, 0x47, 0x29, 0xda, 0x72, 0xfa, 0xcc, 0xab, }}, /* Byte value: 0x7c */ + {{0x06, 0x45, 0xab, 0x4c, 0x03, 0xda, 0x54, 0x87, }}, /* Byte value: 0x7d */ + {{0x55, 0x31, 0x2c, 0x05, 0xcb, 0x96, 0x92, 0x30, }}, /* Byte value: 0x7e */ + {{0xae, 0xa5, 0x2b, 0xc3, 0x57, 0xc2, 0x3e, 0x9a, }}, /* Byte value: 0x7f */ + {{0x1c, 0x10, 0x9a, 0x3a, 0x0e, 0xc3, 0x4a, 0xa3, }}, /* Byte value: 0x80 */ + {{0x75, 0xc6, 0x32, 0x82, 0xdb, 0x3d, 0x95, 0xec, }}, /* Byte value: 0x81 */ + {{0x5b, 0x39, 0x61, 0x18, 0xcc, 0x16, 0xb7, 0x80, }}, /* Byte value: 0x82 */ + {{0x04, 0xc7, 0x73, 0xc9, 0x02, 0x2d, 0xd9, 0xfa, }}, /* Byte value: 0x83 */ + {{0x27, 0xf3, 0xd9, 0x68, 0xf2, 0xeb, 0xf4, 0x84, }}, /* Byte value: 0x84 */ + {{0x4d, 0xe6, 0xc5, 0xf6, 0xc7, 0x78, 0x01, 0x69, }}, /* Byte value: 0x85 */ + {{0x9c, 0x4a, 0xe2, 0x63, 0x4e, 0x2a, 0x56, 0x55, }}, /* Byte value: 0x86 */ + {{0x20, 0xf7, 0x1e, 0x87, 0x10, 0xab, 0x07, 0xdc, }}, /* Byte value: 0x87 */ + {{0x53, 0x74, 0x87, 0x49, 0xc8, 0x4c, 0xc6, 0xb7, }}, /* Byte value: 0x88 */ + {{0xd0, 0xed, 0x4b, 0x36, 0x68, 0xc8, 0xf0, 0xe3, }}, /* Byte value: 0x89 */ + {{0x95, 0x46, 0x68, 0x91, 0xab, 0xea, 0x80, 0xbd, }}, /* Byte value: 0x8a */ + {{0xf3, 0xd9, 0xe1, 0x97, 0x98, 0x0e, 0xdd, 0x9d, }}, /* Byte value: 0x8b */ + {{0x85, 0xdc, 0x67, 0x33, 0xa3, 0x5e, 0x62, 0xd3, }}, /* Byte value: 0x8c */ + {{0x88, 0x17, 0x9e, 0x08, 0x44, 0xb3, 0x6d, 0xc1, }}, /* Byte value: 0x8d */ + {{0xb0, 0x37, 0x69, 0x7c, 0x58, 0xf6, 0xf9, 0x44, }}, /* Byte value: 0x8e */ + {{0x22, 0x75, 0xc6, 0x02, 0x11, 0x5c, 0x8a, 0xa1, }}, /* Byte value: 0x8f */ + {{0x0b, 0x8e, 0x52, 0x77, 0xe4, 0x37, 0x5b, 0x95, }}, /* Byte value: 0x90 */ + {{0x02, 0x82, 0xd8, 0x85, 0x01, 0xf7, 0x8d, 0x7d, }}, /* Byte value: 0x91 */ + {{0xc9, 0x7b, 0xce, 0x66, 0x85, 0xbc, 0xc4, 0x65, }}, /* Byte value: 0x92 */ + {{0xdb, 0x63, 0x19, 0x41, 0x8c, 0xff, 0xab, 0x76, }}, /* Byte value: 0x93 */ + {{0xb6, 0x72, 0xc2, 0x30, 0x5b, 0x2c, 0xad, 0xc3, }}, /* Byte value: 0x94 */ + {{0x40, 0x2d, 0x3c, 0xcd, 0x20, 0x95, 0x0e, 0x7b, }}, /* Byte value: 0x95 */ + {{0x4e, 0x25, 0x71, 0xd0, 0x27, 0x15, 0x2b, 0xcb, }}, /* Byte value: 0x96 */ + {{0xd7, 0xe9, 0x8c, 0xd9, 0x8a, 0x88, 0x03, 0xbb, }}, /* Byte value: 0x97 */ + {{0xab, 0x23, 0x34, 0xa9, 0xb4, 0x75, 0x40, 0xbf, }}, /* Byte value: 0x98 */ + {{0x98, 0x8d, 0x91, 0xaa, 0x4c, 0x07, 0x8f, 0xaf, }}, /* Byte value: 0x99 */ + {{0xc8, 0x3a, 0xa2, 0xc5, 0x64, 0x26, 0x63, 0xba, }}, /* Byte value: 0x9a */ + {{0xaf, 0xe4, 0x47, 0x60, 0xb6, 0x58, 0x99, 0x45, }}, /* Byte value: 0x9b */ + {{0xa3, 0x6e, 0xd2, 0xf8, 0xb0, 0x2f, 0x31, 0x88, }}, /* Byte value: 0x9c */ + {{0x44, 0xea, 0x4f, 0x04, 0x22, 0xb8, 0xd7, 0x81, }}, /* Byte value: 0x9d */ + {{0x84, 0x9d, 0x0b, 0x90, 0x42, 0xc4, 0xc5, 0x0c, }}, /* Byte value: 0x9e */ + {{0x9e, 0xc8, 0x3a, 0xe6, 0x4f, 0xdd, 0xdb, 0x28, }}, /* Byte value: 0x9f */ + {{0xe2, 0x02, 0x82, 0x96, 0x71, 0x20, 0x98, 0x2c, }}, /* Byte value: 0xa0 */ + {{0xcd, 0xbc, 0xbd, 0xaf, 0x87, 0x91, 0x1d, 0x9f, }}, /* Byte value: 0xa1 */ + {{0xfb, 0x94, 0x07, 0xc6, 0x9c, 0x54, 0xac, 0xaa, }}, /* Byte value: 0xa2 */ + {{0x45, 0xab, 0x23, 0xa7, 0xc3, 0x22, 0x70, 0x5e, }}, /* Byte value: 0xa3 */ + {{0x23, 0x34, 0xaa, 0xa1, 0xf0, 0xc6, 0x2d, 0x7e, }}, /* Byte value: 0xa4 */ + {{0xc6, 0x32, 0xef, 0xd8, 0x63, 0xa6, 0x46, 0x0a, }}, /* Byte value: 0xa5 */ + {{0x3d, 0xa6, 0xe8, 0x1e, 0xff, 0xf2, 0xea, 0xa0, }}, /* Byte value: 0xa6 */ + {{0x17, 0x9e, 0xc8, 0x4d, 0xea, 0xf4, 0x11, 0x36, }}, /* Byte value: 0xa7 */ + {{0xeb, 0x0e, 0x08, 0x64, 0x94, 0xe0, 0x4e, 0xc4, }}, /* Byte value: 0xa8 */ + {{0x2e, 0xff, 0x53, 0x9a, 0x17, 0x2b, 0x22, 0x6c, }}, /* Byte value: 0xa9 */ + {{0xcb, 0xf9, 0x16, 0xe3, 0x84, 0x4b, 0x49, 0x18, }}, /* Byte value: 0xaa */ + {{0xb2, 0xb5, 0xb1, 0xf9, 0x59, 0x01, 0x74, 0x39, }}, /* Byte value: 0xab */ + {{0x5c, 0x3d, 0xa6, 0xf7, 0x2e, 0x56, 0x44, 0xd8, }}, /* Byte value: 0xac */ + {{0x4a, 0xe2, 0x02, 0x19, 0x25, 0x38, 0xf2, 0x31, }}, /* Byte value: 0xad */ + {{0x64, 0x1d, 0x51, 0x83, 0x32, 0x13, 0xd0, 0x5d, }}, /* Byte value: 0xae */ + {{0x71, 0x01, 0x41, 0x4b, 0xd9, 0x10, 0x4c, 0x16, }}, /* Byte value: 0xaf */ + {{0x35, 0xeb, 0x0e, 0x4f, 0xfb, 0xa8, 0x9b, 0x97, }}, /* Byte value: 0xb0 */ + {{0xc7, 0x73, 0x83, 0x7b, 0x82, 0x3c, 0xe1, 0xd5, }}, /* Byte value: 0xb1 */ + {{0x07, 0x04, 0xc7, 0xef, 0xe2, 0x40, 0xf3, 0x58, }}, /* Byte value: 0xb2 */ + {{0x59, 0xbb, 0xb9, 0x9d, 0xcd, 0xe1, 0x3a, 0xfd, }}, /* Byte value: 0xb3 */ + {{0x38, 0x20, 0xf7, 0x74, 0x1c, 0x45, 0x94, 0x85, }}, /* Byte value: 0xb4 */ + {{0xea, 0x4f, 0x64, 0xc7, 0x75, 0x7a, 0xe9, 0x1b, }}, /* Byte value: 0xb5 */ + {{0x37, 0x69, 0xd6, 0xca, 0xfa, 0x5f, 0x16, 0xea, }}, /* Byte value: 0xb6 */ + {{0x63, 0x19, 0x96, 0x6c, 0xd0, 0x53, 0x23, 0x05, }}, /* Byte value: 0xb7 */ + {{0x18, 0xd7, 0xe9, 0xf3, 0x0c, 0xee, 0x93, 0x59, }}, /* Byte value: 0xb8 */ + {{0xa7, 0xa9, 0xa1, 0x31, 0xb2, 0x02, 0xe8, 0x72, }}, /* Byte value: 0xb9 */ + {{0x58, 0xfa, 0xd5, 0x3e, 0x2c, 0x7b, 0x9d, 0x22, }}, /* Byte value: 0xba */ + {{0x11, 0xdb, 0x63, 0x01, 0xe9, 0x2e, 0x45, 0xb1, }}, /* Byte value: 0xbb */ + {{0xf5, 0x9c, 0x4a, 0xdb, 0x9b, 0xd4, 0x89, 0x1a, }}, /* Byte value: 0xbc */ + {{0xd9, 0xe1, 0xc1, 0xc4, 0x8d, 0x08, 0x26, 0x0b, }}, /* Byte value: 0xbd */ + {{0xe9, 0x8c, 0xd0, 0xe1, 0x95, 0x17, 0xc3, 0xb9, }}, /* Byte value: 0xbe */ + {{0x25, 0x71, 0x01, 0xed, 0xf3, 0x1c, 0x79, 0xf9, }}, /* Byte value: 0xbf */ + {{0xf8, 0x57, 0xb3, 0xe0, 0x7c, 0x39, 0x86, 0x08, }}, /* Byte value: 0xc0 */ + {{0x97, 0xc4, 0xb0, 0x14, 0xaa, 0x1d, 0x0d, 0xc0, }}, /* Byte value: 0xc1 */ + {{0xb1, 0x76, 0x05, 0xdf, 0xb9, 0x6c, 0x5e, 0x9b, }}, /* Byte value: 0xc2 */ + {{0x19, 0x96, 0x85, 0x50, 0xed, 0x74, 0x34, 0x86, }}, /* Byte value: 0xc3 */ + {{0x0f, 0x49, 0x21, 0xbe, 0xe6, 0x1a, 0x82, 0x6f, }}, /* Byte value: 0xc4 */ + {{0x89, 0x56, 0xf2, 0xab, 0xa5, 0x29, 0xca, 0x1e, }}, /* Byte value: 0xc5 */ + {{0xdc, 0x67, 0xde, 0xae, 0x6e, 0xbf, 0x58, 0x2e, }}, /* Byte value: 0xc6 */ + {{0x08, 0x4d, 0xe6, 0x51, 0x04, 0x5a, 0x71, 0x37, }}, /* Byte value: 0xc7 */ + {{0xf1, 0x5b, 0x39, 0x12, 0x99, 0xf9, 0x50, 0xe0, }}, /* Byte value: 0xc8 */ + {{0xa8, 0xe0, 0x80, 0x8f, 0x54, 0x18, 0x6a, 0x1d, }}, /* Byte value: 0xc9 */ + {{0x0e, 0x08, 0x4d, 0x1d, 0x07, 0x80, 0x25, 0xb0, }}, /* Byte value: 0xca */ + {{0x6f, 0x93, 0x03, 0xf4, 0xd6, 0x24, 0x8b, 0xc8, }}, /* Byte value: 0xcb */ + {{0x7d, 0x8b, 0xd4, 0xd3, 0xdf, 0x67, 0xe4, 0xdb, }}, /* Byte value: 0xcc */ + {{0xd4, 0x2a, 0x38, 0xff, 0x6a, 0xe5, 0x29, 0x19, }}, /* Byte value: 0xcd */ + {{0xbd, 0xfc, 0x90, 0x47, 0xbf, 0x1b, 0xf6, 0x56, }}, /* Byte value: 0xce */ + {{0x86, 0x1f, 0xd3, 0x15, 0x43, 0x33, 0x48, 0x71, }}, /* Byte value: 0xcf */ + {{0xec, 0x0a, 0xcf, 0x8b, 0x76, 0xa0, 0xbd, 0x9c, }}, /* Byte value: 0xd0 */ + {{0x32, 0xef, 0xc9, 0xa0, 0x19, 0xe8, 0x68, 0xcf, }}, /* Byte value: 0xd1 */ + {{0x7e, 0x48, 0x60, 0xf5, 0x3f, 0x0a, 0xce, 0x79, }}, /* Byte value: 0xd2 */ + {{0xed, 0x4b, 0xa3, 0x28, 0x97, 0x3a, 0x1a, 0x43, }}, /* Byte value: 0xd3 */ + {{0x6e, 0xd2, 0x6f, 0x57, 0x37, 0xbe, 0x2c, 0x17, }}, /* Byte value: 0xd4 */ + {{0xc3, 0xb4, 0xf0, 0xb2, 0x80, 0x11, 0x38, 0x2f, }}, /* Byte value: 0xd5 */ + {{0x21, 0xb6, 0x72, 0x24, 0xf1, 0x31, 0xa0, 0x03, }}, /* Byte value: 0xd6 */ + {{0x62, 0x58, 0xfa, 0xcf, 0x31, 0xc9, 0x84, 0xda, }}, /* Byte value: 0xd7 */ + {{0xce, 0x7f, 0x09, 0x89, 0x67, 0xfc, 0x37, 0x3d, }}, /* Byte value: 0xd8 */ + {{0x93, 0x03, 0xc3, 0xdd, 0xa8, 0x30, 0xd4, 0x3a, }}, /* Byte value: 0xd9 */ + {{0x4c, 0xa7, 0xa9, 0x55, 0x26, 0xe2, 0xa6, 0xb6, }}, /* Byte value: 0xda */ + {{0xde, 0xe5, 0x06, 0x2b, 0x6f, 0x48, 0xd5, 0x53, }}, /* Byte value: 0xdb */ + {{0x3f, 0x24, 0x30, 0x9b, 0xfe, 0x05, 0x67, 0xdd, }}, /* Byte value: 0xdc */ + {{0x43, 0xee, 0x88, 0xeb, 0xc0, 0xf8, 0x24, 0xd9, }}, /* Byte value: 0xdd */ + {{0x73, 0x83, 0x99, 0xce, 0xd8, 0xe7, 0xc1, 0x6b, }}, /* Byte value: 0xde */ + {{0xad, 0x66, 0x9f, 0xe5, 0xb7, 0xaf, 0x14, 0x38, }}, /* Byte value: 0xdf */ + {{0xf0, 0x1a, 0x55, 0xb1, 0x78, 0x63, 0xf7, 0x3f, }}, /* Byte value: 0xe0 */ + {{0x47, 0x29, 0xfb, 0x22, 0xc2, 0xd5, 0xfd, 0x23, }}, /* Byte value: 0xe1 */ + {{0x3c, 0xe7, 0x84, 0xbd, 0x1e, 0x68, 0x4d, 0x7f, }}, /* Byte value: 0xe2 */ + {{0x61, 0x9b, 0x4e, 0xe9, 0xd1, 0xa4, 0xae, 0x78, }}, /* Byte value: 0xe3 */ + {{0x56, 0xf2, 0x98, 0x23, 0x2b, 0xfb, 0xb8, 0x92, }}, /* Byte value: 0xe4 */ + {{0x29, 0xfb, 0x94, 0x75, 0xf5, 0x6b, 0xd1, 0x34, }}, /* Byte value: 0xe5 */ + {{0x7b, 0xce, 0x7f, 0x9f, 0xdc, 0xbd, 0xb0, 0x5c, }}, /* Byte value: 0xe6 */ + {{0x10, 0x9a, 0x0f, 0xa2, 0x08, 0xb4, 0xe2, 0x6e, }}, /* Byte value: 0xe7 */ + {{0xff, 0x53, 0x74, 0x0f, 0x9e, 0x79, 0x75, 0x50, }}, /* Byte value: 0xe8 */ + {{0x5d, 0x7c, 0xca, 0x54, 0xcf, 0xcc, 0xe3, 0x07, }}, /* Byte value: 0xe9 */ + {{0x31, 0x2c, 0x7d, 0x86, 0xf9, 0x85, 0x42, 0x6d, }}, /* Byte value: 0xea */ + {{0xb7, 0x33, 0xae, 0x93, 0xba, 0xb6, 0x0a, 0x1c, }}, /* Byte value: 0xeb */ + {{0xb3, 0xf4, 0xdd, 0x5a, 0xb8, 0x9b, 0xd3, 0xe6, }}, /* Byte value: 0xec */ + {{0x6b, 0x54, 0x70, 0x3d, 0xd4, 0x09, 0x52, 0x32, }}, /* Byte value: 0xed */ + {{0xc0, 0x77, 0x44, 0x94, 0x60, 0x7c, 0x12, 0x8d, }}, /* Byte value: 0xee */ + {{0x7f, 0x09, 0x0c, 0x56, 0xde, 0x90, 0x69, 0xa6, }}, /* Byte value: 0xef */ + {{0x1e, 0x92, 0x42, 0xbf, 0x0f, 0x34, 0xc7, 0xde, }}, /* Byte value: 0xf0 */ + {{0xd1, 0xac, 0x27, 0x95, 0x89, 0x52, 0x57, 0x3c, }}, /* Byte value: 0xf1 */ + {{0x78, 0x0d, 0xcb, 0xb9, 0x3c, 0xd0, 0x9a, 0xfe, }}, /* Byte value: 0xf2 */ + {{0xc2, 0xf5, 0x9c, 0x11, 0x61, 0x8b, 0x9f, 0xf0, }}, /* Byte value: 0xf3 */ + {{0xbb, 0xb9, 0x3b, 0x0b, 0xbc, 0xc1, 0xa2, 0xd1, }}, /* Byte value: 0xf4 */ + {{0x6d, 0x11, 0xdb, 0x71, 0xd7, 0xd3, 0x06, 0xb5, }}, /* Byte value: 0xf5 */ + {{0xe1, 0xc1, 0x36, 0xb0, 0x91, 0x4d, 0xb2, 0x8e, }}, /* Byte value: 0xf6 */ + {{0x1f, 0xd3, 0x2e, 0x1c, 0xee, 0xae, 0x60, 0x01, }}, /* Byte value: 0xf7 */ + {{0x82, 0xd8, 0xa0, 0xdc, 0x41, 0x1e, 0x91, 0x8b, }}, /* Byte value: 0xf8 */ + {{0xba, 0xf8, 0x57, 0xa8, 0x5d, 0x5b, 0x05, 0x0e, }}, /* Byte value: 0xf9 */ + {{0x8c, 0xd0, 0xed, 0xc1, 0x46, 0x9e, 0xb4, 0x3b, }}, /* Byte value: 0xfa */ + {{0xcf, 0x3e, 0x65, 0x2a, 0x86, 0x66, 0x90, 0xe2, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xfe, 0x12, 0x18, 0xac, 0x7f, 0xe3, 0xd2, 0x8f, }}, /* Byte value: 0xfd */ + {{0x42, 0xaf, 0xe4, 0x48, 0x21, 0x62, 0x83, 0x06, }}, /* Byte value: 0xfe */ + {{0xd6, 0xa8, 0xe0, 0x7a, 0x6b, 0x12, 0xa4, 0x64, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 11 */ + {{0xd8, 0x59, 0xe0, 0xf8, 0xd2, 0x2a, 0xca, 0x1c, }}, /* Byte value: 0x00 */ + {{0x69, 0xb6, 0x74, 0x38, 0x5c, 0x64, 0x10, 0xef, }}, /* Byte value: 0x01 */ + {{0xc0, 0xd2, 0x41, 0xdb, 0x4a, 0x91, 0xd0, 0xa1, }}, /* Byte value: 0x02 */ + {{0xba, 0xbf, 0xf7, 0x5c, 0x54, 0x08, 0xff, 0xc7, }}, /* Byte value: 0x03 */ + {{0x16, 0xa0, 0xc6, 0xfb, 0x77, 0x8c, 0x4a, 0x68, }}, /* Byte value: 0x04 */ + {{0x87, 0x68, 0xac, 0xfe, 0x5b, 0xa5, 0x09, 0xf4, }}, /* Byte value: 0x05 */ + {{0x58, 0xc5, 0x9e, 0x6a, 0x1f, 0x75, 0xeb, 0x63, }}, /* Byte value: 0x06 */ + {{0x59, 0x63, 0xf5, 0x7e, 0xaf, 0xd1, 0x24, 0x56, }}, /* Byte value: 0x07 */ + {{0xc4, 0x0f, 0x2e, 0x8b, 0xcf, 0x44, 0x6a, 0x75, }}, /* Byte value: 0x08 */ + {{0x6a, 0x9f, 0xc9, 0x04, 0x4f, 0x4b, 0x82, 0xb0, }}, /* Byte value: 0x09 */ + {{0x05, 0x7b, 0x04, 0x44, 0x35, 0x71, 0x75, 0xe1, }}, /* Byte value: 0x0a */ + {{0x9a, 0x98, 0x09, 0x99, 0xf6, 0x6f, 0x66, 0xa8, }}, /* Byte value: 0x0b */ + {{0x06, 0x52, 0xb9, 0x78, 0x26, 0x5e, 0xe7, 0xbe, }}, /* Byte value: 0x0c */ + {{0xa6, 0xe9, 0x39, 0x2f, 0x49, 0x66, 0x5f, 0xae, }}, /* Byte value: 0x0d */ + {{0x0d, 0x02, 0xda, 0xe4, 0xfc, 0x18, 0xc2, 0x8a, }}, /* Byte value: 0x0e */ + {{0xd1, 0x86, 0x55, 0x4c, 0xab, 0xe7, 0xb2, 0x42, }}, /* Byte value: 0x0f */ + {{0x43, 0x67, 0x82, 0x75, 0x94, 0xe1, 0x63, 0x81, }}, /* Byte value: 0x10 */ + {{0x85, 0xe7, 0x7a, 0xd6, 0xf8, 0x2e, 0x54, 0x9e, }}, /* Byte value: 0x11 */ + {{0x41, 0xe8, 0x54, 0x5d, 0x37, 0x6a, 0x3e, 0xeb, }}, /* Byte value: 0x12 */ + {{0xd2, 0xaf, 0xe8, 0x70, 0xb8, 0xc8, 0x20, 0x1d, }}, /* Byte value: 0x13 */ + {{0x2c, 0x83, 0x4f, 0x35, 0xee, 0xdb, 0x94, 0xd0, }}, /* Byte value: 0x14 */ + {{0xcd, 0xd0, 0x9b, 0x3f, 0xb6, 0x89, 0x12, 0x2b, }}, /* Byte value: 0x15 */ + {{0x0b, 0x50, 0x63, 0x9c, 0xda, 0x46, 0x25, 0x34, }}, /* Byte value: 0x16 */ + {{0xa2, 0x34, 0x56, 0x7f, 0xcc, 0xb3, 0xe5, 0x7a, }}, /* Byte value: 0x17 */ + {{0x38, 0xac, 0x5f, 0xe6, 0x3a, 0xdc, 0x83, 0xd2, }}, /* Byte value: 0x18 */ + {{0xf7, 0xf3, 0x12, 0xf1, 0x2f, 0xde, 0xcc, 0x93, }}, /* Byte value: 0x19 */ + {{0x4b, 0x1e, 0x5c, 0xd5, 0x5d, 0x88, 0xd4, 0xea, }}, /* Byte value: 0x1a */ + {{0xe6, 0xa7, 0x06, 0x66, 0xce, 0xa8, 0xae, 0x70, }}, /* Byte value: 0x1b */ + {{0xe7, 0x01, 0x6d, 0x72, 0x7e, 0x0c, 0x61, 0x45, }}, /* Byte value: 0x1c */ + {{0x90, 0x6e, 0x01, 0x11, 0x9c, 0x8d, 0x8c, 0xa9, }}, /* Byte value: 0x1d */ + {{0x1a, 0x04, 0x77, 0x0b, 0x3b, 0x30, 0x47, 0xd7, }}, /* Byte value: 0x1e */ + {{0x53, 0x95, 0xfd, 0xf6, 0xc5, 0x33, 0xce, 0x57, }}, /* Byte value: 0x1f */ + {{0xa3, 0x92, 0x3d, 0x6b, 0x7c, 0x17, 0x2a, 0x4f, }}, /* Byte value: 0x20 */ + {{0xf1, 0xa1, 0xab, 0x89, 0x09, 0x80, 0x2b, 0x2d, }}, /* Byte value: 0x21 */ + {{0xfd, 0x05, 0x1a, 0x79, 0x45, 0x3c, 0x26, 0x92, }}, /* Byte value: 0x22 */ + {{0x51, 0x1a, 0x2b, 0xde, 0x66, 0xb8, 0x93, 0x3d, }}, /* Byte value: 0x23 */ + {{0x29, 0xf8, 0x4b, 0x71, 0xdb, 0xaa, 0xe1, 0x31, }}, /* Byte value: 0x24 */ + {{0x3b, 0x85, 0xe2, 0xda, 0x29, 0xf3, 0x11, 0x8d, }}, /* Byte value: 0x25 */ + {{0x82, 0x13, 0xa8, 0xba, 0x6e, 0xd4, 0x7c, 0x15, }}, /* Byte value: 0x26 */ + {{0x67, 0x9d, 0x13, 0xe0, 0xb3, 0x53, 0x40, 0x3a, }}, /* Byte value: 0x27 */ + {{0x8b, 0xcc, 0x1d, 0x0e, 0x17, 0x19, 0x04, 0x4b, }}, /* Byte value: 0x28 */ + {{0x48, 0x37, 0xe1, 0xe9, 0x4e, 0xa7, 0x46, 0xb5, }}, /* Byte value: 0x29 */ + {{0x2a, 0xd1, 0xf6, 0x4d, 0xc8, 0x85, 0x73, 0x6e, }}, /* Byte value: 0x2a */ + {{0xef, 0x78, 0xb3, 0xd2, 0xb7, 0x65, 0xd6, 0x2e, }}, /* Byte value: 0x2b */ + {{0x70, 0x9b, 0xbe, 0x0f, 0x74, 0x7b, 0xc5, 0x67, }}, /* Byte value: 0x2c */ + {{0x2d, 0x25, 0x24, 0x21, 0x5e, 0x7f, 0x5b, 0xe5, }}, /* Byte value: 0x2d */ + {{0x31, 0x73, 0xea, 0x52, 0x43, 0x11, 0xfb, 0x8c, }}, /* Byte value: 0x2e */ + {{0xe2, 0x7a, 0x69, 0x36, 0x4b, 0x7d, 0x14, 0xa4, }}, /* Byte value: 0x2f */ + {{0x86, 0xce, 0xc7, 0xea, 0xeb, 0x01, 0xc6, 0xc1, }}, /* Byte value: 0x30 */ + {{0xc9, 0x0d, 0xf4, 0x6f, 0x33, 0x5c, 0xa8, 0xff, }}, /* Byte value: 0x31 */ + {{0xb0, 0x49, 0xff, 0xd4, 0x3e, 0xea, 0x15, 0xc6, }}, /* Byte value: 0x32 */ + {{0x80, 0x9c, 0x7e, 0x92, 0xcd, 0x5f, 0x21, 0x7f, }}, /* Byte value: 0x33 */ + {{0xf5, 0x7c, 0xc4, 0xd9, 0x8c, 0x55, 0x91, 0xf9, }}, /* Byte value: 0x34 */ + {{0xfc, 0xa3, 0x71, 0x6d, 0xf5, 0x98, 0xe9, 0xa7, }}, /* Byte value: 0x35 */ + {{0x60, 0x69, 0xc1, 0x8c, 0x25, 0xa9, 0x68, 0xb1, }}, /* Byte value: 0x36 */ + {{0x44, 0x93, 0x50, 0x19, 0x02, 0x1b, 0x4b, 0x0a, }}, /* Byte value: 0x37 */ + {{0x0c, 0xa4, 0xb1, 0xf0, 0x4c, 0xbc, 0x0d, 0xbf, }}, /* Byte value: 0x38 */ + {{0x8f, 0x11, 0x72, 0x5e, 0x92, 0xcc, 0xbe, 0x9f, }}, /* Byte value: 0x39 */ + {{0xa4, 0x66, 0xef, 0x07, 0xea, 0xed, 0x02, 0xc4, }}, /* Byte value: 0x3a */ + {{0x3d, 0xd7, 0x5b, 0xa2, 0x0f, 0xad, 0xf6, 0x33, }}, /* Byte value: 0x3b */ + {{0x62, 0xe6, 0x17, 0xa4, 0x86, 0x22, 0x35, 0xdb, }}, /* Byte value: 0x3c */ + {{0x35, 0xae, 0x85, 0x02, 0xc6, 0xc4, 0x41, 0x58, }}, /* Byte value: 0x3d */ + {{0xe0, 0xf5, 0xbf, 0x1e, 0xe8, 0xf6, 0x49, 0xce, }}, /* Byte value: 0x3e */ + {{0x68, 0x10, 0x1f, 0x2c, 0xec, 0xc0, 0xdf, 0xda, }}, /* Byte value: 0x3f */ + {{0xdc, 0x84, 0x8f, 0xa8, 0x57, 0xff, 0x70, 0xc8, }}, /* Byte value: 0x40 */ + {{0x40, 0x4e, 0x3f, 0x49, 0x87, 0xce, 0xf1, 0xde, }}, /* Byte value: 0x41 */ + {{0xa0, 0xbb, 0x80, 0x57, 0x6f, 0x38, 0xb8, 0x10, }}, /* Byte value: 0x42 */ + {{0xa7, 0x4f, 0x52, 0x3b, 0xf9, 0xc2, 0x90, 0x9b, }}, /* Byte value: 0x43 */ + {{0x9f, 0xe3, 0x0d, 0xdd, 0xc3, 0x1e, 0x13, 0x49, }}, /* Byte value: 0x44 */ + {{0x2b, 0x77, 0x9d, 0x59, 0x78, 0x21, 0xbc, 0x5b, }}, /* Byte value: 0x45 */ + {{0xae, 0x90, 0xe7, 0x8f, 0x80, 0x0f, 0xe8, 0xc5, }}, /* Byte value: 0x46 */ + {{0x10, 0xf2, 0x7f, 0x83, 0x51, 0xd2, 0xad, 0xd6, }}, /* Byte value: 0x47 */ + {{0xfe, 0x2c, 0xa7, 0x45, 0x56, 0x13, 0xb4, 0xcd, }}, /* Byte value: 0x48 */ + {{0xa1, 0x1d, 0xeb, 0x43, 0xdf, 0x9c, 0x77, 0x25, }}, /* Byte value: 0x49 */ + {{0xc7, 0x26, 0x93, 0xb7, 0xdc, 0x6b, 0xf8, 0x2a, }}, /* Byte value: 0x4a */ + {{0x4d, 0x4c, 0xe5, 0xad, 0x7b, 0xd6, 0x33, 0x54, }}, /* Byte value: 0x4b */ + {{0xaa, 0x4d, 0x88, 0xdf, 0x05, 0xda, 0x52, 0x11, }}, /* Byte value: 0x4c */ + {{0xd4, 0xfd, 0x51, 0x08, 0x9e, 0x96, 0xc7, 0xa3, }}, /* Byte value: 0x4d */ + {{0x42, 0xc1, 0xe9, 0x61, 0x24, 0x45, 0xac, 0xb4, }}, /* Byte value: 0x4e */ + {{0x2e, 0x0c, 0x99, 0x1d, 0x4d, 0x50, 0xc9, 0xba, }}, /* Byte value: 0x4f */ + {{0x49, 0x91, 0x8a, 0xfd, 0xfe, 0x03, 0x89, 0x80, }}, /* Byte value: 0x50 */ + {{0xb2, 0xc6, 0x29, 0xfc, 0x9d, 0x61, 0x48, 0xac, }}, /* Byte value: 0x51 */ + {{0x77, 0x6f, 0x6c, 0x63, 0xe2, 0x81, 0xed, 0xec, }}, /* Byte value: 0x52 */ + {{0x39, 0x0a, 0x34, 0xf2, 0x8a, 0x78, 0x4c, 0xe7, }}, /* Byte value: 0x53 */ + {{0xad, 0xb9, 0x5a, 0xb3, 0x93, 0x20, 0x7a, 0x9a, }}, /* Byte value: 0x54 */ + {{0x20, 0x27, 0xfe, 0xc5, 0xa2, 0x67, 0x99, 0x6f, }}, /* Byte value: 0x55 */ + {{0xcf, 0x5f, 0x4d, 0x17, 0x15, 0x02, 0x4f, 0x41, }}, /* Byte value: 0x56 */ + {{0x64, 0xb4, 0xae, 0xdc, 0xa0, 0x7c, 0xd2, 0x65, }}, /* Byte value: 0x57 */ + {{0x9b, 0x3e, 0x62, 0x8d, 0x46, 0xcb, 0xa9, 0x9d, }}, /* Byte value: 0x58 */ + {{0xde, 0x0b, 0x59, 0x80, 0xf4, 0x74, 0x2d, 0xa2, }}, /* Byte value: 0x59 */ + {{0x7f, 0x16, 0xb2, 0xc3, 0x2b, 0xe8, 0x5a, 0x87, }}, /* Byte value: 0x5a */ + {{0xa8, 0xc2, 0x5e, 0xf7, 0xa6, 0x51, 0x0f, 0x7b, }}, /* Byte value: 0x5b */ + {{0xb6, 0x1b, 0x46, 0xac, 0x18, 0xb4, 0xf2, 0x78, }}, /* Byte value: 0x5c */ + {{0x5c, 0x18, 0xf1, 0x3a, 0x9a, 0xa0, 0x51, 0xb7, }}, /* Byte value: 0x5d */ + {{0xa5, 0xc0, 0x84, 0x13, 0x5a, 0x49, 0xcd, 0xf1, }}, /* Byte value: 0x5e */ + {{0x6b, 0x39, 0xa2, 0x10, 0xff, 0xef, 0x4d, 0x85, }}, /* Byte value: 0x5f */ + {{0xd3, 0x09, 0x83, 0x64, 0x08, 0x6c, 0xef, 0x28, }}, /* Byte value: 0x60 */ + {{0xf0, 0x07, 0xc0, 0x9d, 0xb9, 0x24, 0xe4, 0x18, }}, /* Byte value: 0x61 */ + {{0x5d, 0xbe, 0x9a, 0x2e, 0x2a, 0x04, 0x9e, 0x82, }}, /* Byte value: 0x62 */ + {{0xc8, 0xab, 0x9f, 0x7b, 0x83, 0xf8, 0x67, 0xca, }}, /* Byte value: 0x63 */ + {{0xc5, 0xa9, 0x45, 0x9f, 0x7f, 0xe0, 0xa5, 0x40, }}, /* Byte value: 0x64 */ + {{0xbd, 0x4b, 0x25, 0x30, 0xc2, 0xf2, 0xd7, 0x4c, }}, /* Byte value: 0x65 */ + {{0xc3, 0xfb, 0xfc, 0xe7, 0x59, 0xbe, 0x42, 0xfe, }}, /* Byte value: 0x66 */ + {{0xe4, 0x28, 0xd0, 0x4e, 0x6d, 0x23, 0xf3, 0x1a, }}, /* Byte value: 0x67 */ + {{0xaf, 0x36, 0x8c, 0x9b, 0x30, 0xab, 0x27, 0xf0, }}, /* Byte value: 0x68 */ + {{0xb8, 0x30, 0x21, 0x74, 0xf7, 0x83, 0xa2, 0xad, }}, /* Byte value: 0x69 */ + {{0xcb, 0x82, 0x22, 0x47, 0x90, 0xd7, 0xf5, 0x95, }}, /* Byte value: 0x6a */ + {{0xc1, 0x74, 0x2a, 0xcf, 0xfa, 0x35, 0x1f, 0x94, }}, /* Byte value: 0x6b */ + {{0xb5, 0x32, 0xfb, 0x90, 0x0b, 0x9b, 0x60, 0x27, }}, /* Byte value: 0x6c */ + {{0x6f, 0xe4, 0xcd, 0x40, 0x7a, 0x3a, 0xf7, 0x51, }}, /* Byte value: 0x6d */ + {{0x4c, 0xea, 0x8e, 0xb9, 0xcb, 0x72, 0xfc, 0x61, }}, /* Byte value: 0x6e */ + {{0x97, 0x9a, 0xd3, 0x7d, 0x0a, 0x77, 0xa4, 0x22, }}, /* Byte value: 0x6f */ + {{0x88, 0xe5, 0xa0, 0x32, 0x04, 0x36, 0x96, 0x14, }}, /* Byte value: 0x70 */ + {{0x61, 0xcf, 0xaa, 0x98, 0x95, 0x0d, 0xa7, 0x84, }}, /* Byte value: 0x71 */ + {{0x57, 0x48, 0x92, 0xa6, 0x40, 0xe6, 0x74, 0x83, }}, /* Byte value: 0x72 */ + {{0x11, 0x54, 0x14, 0x97, 0xe1, 0x76, 0x62, 0xe3, }}, /* Byte value: 0x73 */ + {{0x99, 0xb1, 0xb4, 0xa5, 0xe5, 0x40, 0xf4, 0xf7, }}, /* Byte value: 0x74 */ + {{0x72, 0x14, 0x68, 0x27, 0xd7, 0xf0, 0x98, 0x0d, }}, /* Byte value: 0x75 */ + {{0x83, 0xb5, 0xc3, 0xae, 0xde, 0x70, 0xb3, 0x20, }}, /* Byte value: 0x76 */ + {{0xbf, 0xc4, 0xf3, 0x18, 0x61, 0x79, 0x8a, 0x26, }}, /* Byte value: 0x77 */ + {{0x55, 0xc7, 0x44, 0x8e, 0xe3, 0x6d, 0x29, 0xe9, }}, /* Byte value: 0x78 */ + {{0x73, 0xb2, 0x03, 0x33, 0x67, 0x54, 0x57, 0x38, }}, /* Byte value: 0x79 */ + {{0x9d, 0x6c, 0xdb, 0xf5, 0x60, 0x95, 0x4e, 0x23, }}, /* Byte value: 0x7a */ + {{0x81, 0x3a, 0x15, 0x86, 0x7d, 0xfb, 0xee, 0x4a, }}, /* Byte value: 0x7b */ + {{0x3f, 0x58, 0x8d, 0x8a, 0xac, 0x26, 0xab, 0x59, }}, /* Byte value: 0x7c */ + {{0xb3, 0x60, 0x42, 0xe8, 0x2d, 0xc5, 0x87, 0x99, }}, /* Byte value: 0x7d */ + {{0xbb, 0x19, 0x9c, 0x48, 0xe4, 0xac, 0x30, 0xf2, }}, /* Byte value: 0x7e */ + {{0xd6, 0x72, 0x87, 0x20, 0x3d, 0x1d, 0x9a, 0xc9, }}, /* Byte value: 0x7f */ + {{0xea, 0x03, 0xb7, 0x96, 0x82, 0x14, 0xa3, 0xcf, }}, /* Byte value: 0x80 */ + {{0x25, 0x5c, 0xfa, 0x81, 0x97, 0x16, 0xec, 0x8e, }}, /* Byte value: 0x81 */ + {{0xce, 0xf9, 0x26, 0x03, 0xa5, 0xa6, 0x80, 0x74, }}, /* Byte value: 0x82 */ + {{0x63, 0x40, 0x7c, 0xb0, 0x36, 0x86, 0xfa, 0xee, }}, /* Byte value: 0x83 */ + {{0x45, 0x35, 0x3b, 0x0d, 0xb2, 0xbf, 0x84, 0x3f, }}, /* Byte value: 0x84 */ + {{0x32, 0x5a, 0x57, 0x6e, 0x50, 0x3e, 0x69, 0xd3, }}, /* Byte value: 0x85 */ + {{0xd7, 0xd4, 0xec, 0x34, 0x8d, 0xb9, 0x55, 0xfc, }}, /* Byte value: 0x86 */ + {{0x9e, 0x45, 0x66, 0xc9, 0x73, 0xba, 0xdc, 0x7c, }}, /* Byte value: 0x87 */ + {{0x08, 0x79, 0xde, 0xa0, 0xc9, 0x69, 0xb7, 0x6b, }}, /* Byte value: 0x88 */ + {{0x8d, 0x9e, 0xa4, 0x76, 0x31, 0x47, 0xe3, 0xf5, }}, /* Byte value: 0x89 */ + {{0x79, 0x44, 0x0b, 0xbb, 0x0d, 0xb6, 0xbd, 0x39, }}, /* Byte value: 0x8a */ + {{0xab, 0xeb, 0xe3, 0xcb, 0xb5, 0x7e, 0x9d, 0x24, }}, /* Byte value: 0x8b */ + {{0x36, 0x87, 0x38, 0x3e, 0xd5, 0xeb, 0xd3, 0x07, }}, /* Byte value: 0x8c */ + {{0xfb, 0x57, 0xa3, 0x01, 0x63, 0x62, 0xc1, 0x2c, }}, /* Byte value: 0x8d */ + {{0xec, 0x51, 0x0e, 0xee, 0xa4, 0x4a, 0x44, 0x71, }}, /* Byte value: 0x8e */ + {{0x4e, 0x65, 0x58, 0x91, 0x68, 0xf9, 0xa1, 0x0b, }}, /* Byte value: 0x8f */ + {{0x7e, 0xb0, 0xd9, 0xd7, 0x9b, 0x4c, 0x95, 0xb2, }}, /* Byte value: 0x90 */ + {{0xd0, 0x20, 0x3e, 0x58, 0x1b, 0x43, 0x7d, 0x77, }}, /* Byte value: 0x91 */ + {{0x6c, 0xcd, 0x70, 0x7c, 0x69, 0x15, 0x65, 0x0e, }}, /* Byte value: 0x92 */ + {{0xf3, 0x2e, 0x7d, 0xa1, 0xaa, 0x0b, 0x76, 0x47, }}, /* Byte value: 0x93 */ + {{0x5f, 0x31, 0x4c, 0x06, 0x89, 0x8f, 0xc3, 0xe8, }}, /* Byte value: 0x94 */ + {{0xff, 0x8a, 0xcc, 0x51, 0xe6, 0xb7, 0x7b, 0xf8, }}, /* Byte value: 0x95 */ + {{0x8a, 0x6a, 0x76, 0x1a, 0xa7, 0xbd, 0xcb, 0x7e, }}, /* Byte value: 0x96 */ + {{0x56, 0xee, 0xf9, 0xb2, 0xf0, 0x42, 0xbb, 0xb6, }}, /* Byte value: 0x97 */ + {{0xdd, 0x22, 0xe4, 0xbc, 0xe7, 0x5b, 0xbf, 0xfd, }}, /* Byte value: 0x98 */ + {{0xb4, 0x94, 0x90, 0x84, 0xbb, 0x3f, 0xaf, 0x12, }}, /* Byte value: 0x99 */ + {{0x04, 0xdd, 0x6f, 0x50, 0x85, 0xd5, 0xba, 0xd4, }}, /* Byte value: 0x9a */ + {{0xbe, 0x62, 0x98, 0x0c, 0xd1, 0xdd, 0x45, 0x13, }}, /* Byte value: 0x9b */ + {{0x1b, 0xa2, 0x1c, 0x1f, 0x8b, 0x94, 0x88, 0xe2, }}, /* Byte value: 0x9c */ + {{0x9c, 0xca, 0xb0, 0xe1, 0xd0, 0x31, 0x81, 0x16, }}, /* Byte value: 0x9d */ + {{0x5e, 0x97, 0x27, 0x12, 0x39, 0x2b, 0x0c, 0xdd, }}, /* Byte value: 0x9e */ + {{0x07, 0xf4, 0xd2, 0x6c, 0x96, 0xfa, 0x28, 0x8b, }}, /* Byte value: 0x9f */ + {{0x8c, 0x38, 0xcf, 0x62, 0x81, 0xe3, 0x2c, 0xc0, }}, /* Byte value: 0xa0 */ + {{0x0f, 0x8d, 0x0c, 0xcc, 0x5f, 0x93, 0x9f, 0xe0, }}, /* Byte value: 0xa1 */ + {{0x6d, 0x6b, 0x1b, 0x68, 0xd9, 0xb1, 0xaa, 0x3b, }}, /* Byte value: 0xa2 */ + {{0xf4, 0xda, 0xaf, 0xcd, 0x3c, 0xf1, 0x5e, 0xcc, }}, /* Byte value: 0xa3 */ + {{0x26, 0x75, 0x47, 0xbd, 0x84, 0x39, 0x7e, 0xd1, }}, /* Byte value: 0xa4 */ + {{0x71, 0x3d, 0xd5, 0x1b, 0xc4, 0xdf, 0x0a, 0x52, }}, /* Byte value: 0xa5 */ + {{0x1c, 0x56, 0xce, 0x73, 0x1d, 0x6e, 0xa0, 0x69, }}, /* Byte value: 0xa6 */ + {{0x94, 0xb3, 0x6e, 0x41, 0x19, 0x58, 0x36, 0x7d, }}, /* Byte value: 0xa7 */ + {{0x22, 0xa8, 0x28, 0xed, 0x01, 0xec, 0xc4, 0x05, }}, /* Byte value: 0xa8 */ + {{0xeb, 0xa5, 0xdc, 0x82, 0x32, 0xb0, 0x6c, 0xfa, }}, /* Byte value: 0xa9 */ + {{0xbc, 0xed, 0x4e, 0x24, 0x72, 0x56, 0x18, 0x79, }}, /* Byte value: 0xaa */ + {{0x3c, 0x71, 0x30, 0xb6, 0xbf, 0x09, 0x39, 0x06, }}, /* Byte value: 0xab */ + {{0x15, 0x89, 0x7b, 0xc7, 0x64, 0xa3, 0xd8, 0x37, }}, /* Byte value: 0xac */ + {{0xe9, 0x2a, 0x0a, 0xaa, 0x91, 0x3b, 0x31, 0x90, }}, /* Byte value: 0xad */ + {{0x02, 0x8f, 0xd6, 0x28, 0xa3, 0x8b, 0x5d, 0x6a, }}, /* Byte value: 0xae */ + {{0x46, 0x1c, 0x86, 0x31, 0xa1, 0x90, 0x16, 0x60, }}, /* Byte value: 0xaf */ + {{0xda, 0xd6, 0x36, 0xd0, 0x71, 0xa1, 0x97, 0x76, }}, /* Byte value: 0xb0 */ + {{0x19, 0x2d, 0xca, 0x37, 0x28, 0x1f, 0xd5, 0x88, }}, /* Byte value: 0xb1 */ + {{0xdb, 0x70, 0x5d, 0xc4, 0xc1, 0x05, 0x58, 0x43, }}, /* Byte value: 0xb2 */ + {{0x1e, 0xd9, 0x18, 0x5b, 0xbe, 0xe5, 0xfd, 0x03, }}, /* Byte value: 0xb3 */ + {{0x17, 0x06, 0xad, 0xef, 0xc7, 0x28, 0x85, 0x5d, }}, /* Byte value: 0xb4 */ + {{0x4a, 0xb8, 0x37, 0xc1, 0xed, 0x2c, 0x1b, 0xdf, }}, /* Byte value: 0xb5 */ + {{0x0a, 0xf6, 0x08, 0x88, 0x6a, 0xe2, 0xea, 0x01, }}, /* Byte value: 0xb6 */ + {{0xd9, 0xff, 0x8b, 0xec, 0x62, 0x8e, 0x05, 0x29, }}, /* Byte value: 0xb7 */ + {{0x89, 0x43, 0xcb, 0x26, 0xb4, 0x92, 0x59, 0x21, }}, /* Byte value: 0xb8 */ + {{0x78, 0xe2, 0x60, 0xaf, 0xbd, 0x12, 0x72, 0x0c, }}, /* Byte value: 0xb9 */ + {{0x76, 0xc9, 0x07, 0x77, 0x52, 0x25, 0x22, 0xd9, }}, /* Byte value: 0xba */ + {{0x27, 0xd3, 0x2c, 0xa9, 0x34, 0x9d, 0xb1, 0xe4, }}, /* Byte value: 0xbb */ + {{0x18, 0x8b, 0xa1, 0x23, 0x98, 0xbb, 0x1a, 0xbd, }}, /* Byte value: 0xbc */ + {{0x23, 0x0e, 0x43, 0xf9, 0xb1, 0x48, 0x0b, 0x30, }}, /* Byte value: 0xbd */ + {{0xf2, 0x88, 0x16, 0xb5, 0x1a, 0xaf, 0xb9, 0x72, }}, /* Byte value: 0xbe */ + {{0x95, 0x15, 0x05, 0x55, 0xa9, 0xfc, 0xf9, 0x48, }}, /* Byte value: 0xbf */ + {{0xd5, 0x5b, 0x3a, 0x1c, 0x2e, 0x32, 0x08, 0x96, }}, /* Byte value: 0xc0 */ + {{0xa9, 0x64, 0x35, 0xe3, 0x16, 0xf5, 0xc0, 0x4e, }}, /* Byte value: 0xc1 */ + {{0x84, 0x41, 0x11, 0xc2, 0x48, 0x8a, 0x9b, 0xab, }}, /* Byte value: 0xc2 */ + {{0xe1, 0x53, 0xd4, 0x0a, 0x58, 0x52, 0x86, 0xfb, }}, /* Byte value: 0xc3 */ + {{0x1d, 0xf0, 0xa5, 0x67, 0xad, 0xca, 0x6f, 0x5c, }}, /* Byte value: 0xc4 */ + {{0x93, 0x47, 0xbc, 0x2d, 0x8f, 0xa2, 0x1e, 0xf6, }}, /* Byte value: 0xc5 */ + {{0x28, 0x5e, 0x20, 0x65, 0x6b, 0x0e, 0x2e, 0x04, }}, /* Byte value: 0xc6 */ + {{0xc6, 0x80, 0xf8, 0xa3, 0x6c, 0xcf, 0x37, 0x1f, }}, /* Byte value: 0xc7 */ + {{0x7b, 0xcb, 0xdd, 0x93, 0xae, 0x3d, 0xe0, 0x53, }}, /* Byte value: 0xc8 */ + {{0x65, 0x12, 0xc5, 0xc8, 0x10, 0xd8, 0x1d, 0x50, }}, /* Byte value: 0xc9 */ + {{0x75, 0xe0, 0xba, 0x4b, 0x41, 0x0a, 0xb0, 0x86, }}, /* Byte value: 0xca */ + {{0x7c, 0x3f, 0x0f, 0xff, 0x38, 0xc7, 0xc8, 0xd8, }}, /* Byte value: 0xcb */ + {{0xe3, 0xdc, 0x02, 0x22, 0xfb, 0xd9, 0xdb, 0x91, }}, /* Byte value: 0xcc */ + {{0xee, 0xde, 0xd8, 0xc6, 0x07, 0xc1, 0x19, 0x1b, }}, /* Byte value: 0xcd */ + {{0x21, 0x81, 0x95, 0xd1, 0x12, 0xc3, 0x56, 0x5a, }}, /* Byte value: 0xce */ + {{0x8e, 0xb7, 0x19, 0x4a, 0x22, 0x68, 0x71, 0xaa, }}, /* Byte value: 0xcf */ + {{0xf9, 0xd8, 0x75, 0x29, 0xc0, 0xe9, 0x9c, 0x46, }}, /* Byte value: 0xd0 */ + {{0x01, 0xa6, 0x6b, 0x14, 0xb0, 0xa4, 0xcf, 0x35, }}, /* Byte value: 0xd1 */ + {{0x5b, 0xec, 0x23, 0x56, 0x0c, 0x5a, 0x79, 0x3c, }}, /* Byte value: 0xd2 */ + {{0x91, 0xc8, 0x6a, 0x05, 0x2c, 0x29, 0x43, 0x9c, }}, /* Byte value: 0xd3 */ + {{0x14, 0x2f, 0x10, 0xd3, 0xd4, 0x07, 0x17, 0x02, }}, /* Byte value: 0xd4 */ + {{0x7a, 0x6d, 0xb6, 0x87, 0x1e, 0x99, 0x2f, 0x66, }}, /* Byte value: 0xd5 */ + {{0xf6, 0x55, 0x79, 0xe5, 0x9f, 0x7a, 0x03, 0xa6, }}, /* Byte value: 0xd6 */ + {{0xb1, 0xef, 0x94, 0xc0, 0x8e, 0x4e, 0xda, 0xf3, }}, /* Byte value: 0xd7 */ + {{0xb7, 0xbd, 0x2d, 0xb8, 0xa8, 0x10, 0x3d, 0x4d, }}, /* Byte value: 0xd8 */ + {{0xca, 0x24, 0x49, 0x53, 0x20, 0x73, 0x3a, 0xa0, }}, /* Byte value: 0xd9 */ + {{0x5a, 0x4a, 0x48, 0x42, 0xbc, 0xfe, 0xb6, 0x09, }}, /* Byte value: 0xda */ + {{0xf8, 0x7e, 0x1e, 0x3d, 0x70, 0x4d, 0x53, 0x73, }}, /* Byte value: 0xdb */ + {{0xcc, 0x76, 0xf0, 0x2b, 0x06, 0x2d, 0xdd, 0x1e, }}, /* Byte value: 0xdc */ + {{0x47, 0xba, 0xed, 0x25, 0x11, 0x34, 0xd9, 0x55, }}, /* Byte value: 0xdd */ + {{0x96, 0x3c, 0xb8, 0x69, 0xba, 0xd3, 0x6b, 0x17, }}, /* Byte value: 0xde */ + {{0x6e, 0x42, 0xa6, 0x54, 0xca, 0x9e, 0x38, 0x64, }}, /* Byte value: 0xdf */ + {{0x13, 0xdb, 0xc2, 0xbf, 0x42, 0xfd, 0x3f, 0x89, }}, /* Byte value: 0xe0 */ + {{0x24, 0xfa, 0x91, 0x95, 0x27, 0xb2, 0x23, 0xbb, }}, /* Byte value: 0xe1 */ + {{0x74, 0x46, 0xd1, 0x5f, 0xf1, 0xae, 0x7f, 0xb3, }}, /* Byte value: 0xe2 */ + {{0x09, 0xdf, 0xb5, 0xb4, 0x79, 0xcd, 0x78, 0x5e, }}, /* Byte value: 0xe3 */ + {{0x03, 0x29, 0xbd, 0x3c, 0x13, 0x2f, 0x92, 0x5f, }}, /* Byte value: 0xe4 */ + {{0x30, 0xd5, 0x81, 0x46, 0xf3, 0xb5, 0x34, 0xb9, }}, /* Byte value: 0xe5 */ + {{0x50, 0xbc, 0x40, 0xca, 0xd6, 0x1c, 0x5c, 0x08, }}, /* Byte value: 0xe6 */ + {{0x4f, 0xc3, 0x33, 0x85, 0xd8, 0x5d, 0x6e, 0x3e, }}, /* Byte value: 0xe7 */ + {{0x0e, 0x2b, 0x67, 0xd8, 0xef, 0x37, 0x50, 0xd5, }}, /* Byte value: 0xe8 */ + {{0x7d, 0x99, 0x64, 0xeb, 0x88, 0x63, 0x07, 0xed, }}, /* Byte value: 0xe9 */ + {{0xb9, 0x96, 0x4a, 0x60, 0x47, 0x27, 0x6d, 0x98, }}, /* Byte value: 0xea */ + {{0x37, 0x21, 0x53, 0x2a, 0x65, 0x4f, 0x1c, 0x32, }}, /* Byte value: 0xeb */ + {{0x54, 0x61, 0x2f, 0x9a, 0x53, 0xc9, 0xe6, 0xdc, }}, /* Byte value: 0xec */ + {{0x1f, 0x7f, 0x73, 0x4f, 0x0e, 0x41, 0x32, 0x36, }}, /* Byte value: 0xed */ + {{0xc2, 0x5d, 0x97, 0xf3, 0xe9, 0x1a, 0x8d, 0xcb, }}, /* Byte value: 0xee */ + {{0x33, 0xfc, 0x3c, 0x7a, 0xe0, 0x9a, 0xa6, 0xe6, }}, /* Byte value: 0xef */ + {{0x3a, 0x23, 0x89, 0xce, 0x99, 0x57, 0xde, 0xb8, }}, /* Byte value: 0xf0 */ + {{0xe5, 0x8e, 0xbb, 0x5a, 0xdd, 0x87, 0x3c, 0x2f, }}, /* Byte value: 0xf1 */ + {{0xe8, 0x8c, 0x61, 0xbe, 0x21, 0x9f, 0xfe, 0xa5, }}, /* Byte value: 0xf2 */ + {{0x12, 0x7d, 0xa9, 0xab, 0xf2, 0x59, 0xf0, 0xbc, }}, /* Byte value: 0xf3 */ + {{0x92, 0xe1, 0xd7, 0x39, 0x3f, 0x06, 0xd1, 0xc3, }}, /* Byte value: 0xf4 */ + {{0xac, 0x1f, 0x31, 0xa7, 0x23, 0x84, 0xb5, 0xaf, }}, /* Byte value: 0xf5 */ + {{0x34, 0x08, 0xee, 0x16, 0x76, 0x60, 0x8e, 0x6d, }}, /* Byte value: 0xf6 */ + {{0x52, 0x33, 0x96, 0xe2, 0x75, 0x97, 0x01, 0x62, }}, /* Byte value: 0xf7 */ + {{0xed, 0xf7, 0x65, 0xfa, 0x14, 0xee, 0x8b, 0x44, }}, /* Byte value: 0xf8 */ + {{0xfa, 0xf1, 0xc8, 0x15, 0xd3, 0xc6, 0x0e, 0x19, }}, /* Byte value: 0xf9 */ + {{0x98, 0x17, 0xdf, 0xb1, 0x55, 0xe4, 0x3b, 0xc2, }}, /* Byte value: 0xfa */ + {{0xdf, 0xad, 0x32, 0x94, 0x44, 0xd0, 0xe2, 0x97, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x66, 0x3b, 0x78, 0xf4, 0x03, 0xf7, 0x8f, 0x0f, }}, /* Byte value: 0xfd */ + {{0x2f, 0xaa, 0xf2, 0x09, 0xfd, 0xf4, 0x06, 0x8f, }}, /* Byte value: 0xfe */ + {{0x3e, 0xfe, 0xe6, 0x9e, 0x1c, 0x82, 0x64, 0x6c, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 12 */ + {{0xc2, 0x45, 0xb9, 0x57, 0x85, 0xa8, 0xdb, 0x13, }}, /* Byte value: 0x00 */ + {{0x95, 0x59, 0xc2, 0x20, 0x7c, 0x53, 0x81, 0x21, }}, /* Byte value: 0x01 */ + {{0xa6, 0x73, 0x93, 0x63, 0x29, 0x01, 0x42, 0x6e, }}, /* Byte value: 0x02 */ + {{0x27, 0x78, 0x48, 0x3d, 0x69, 0x20, 0x97, 0x5e, }}, /* Byte value: 0x03 */ + {{0xe0, 0xc8, 0x66, 0x94, 0xe3, 0x75, 0x59, 0xd8, }}, /* Byte value: 0x04 */ + {{0x86, 0x9c, 0xc4, 0x12, 0x49, 0xd1, 0x1c, 0x46, }}, /* Byte value: 0x05 */ + {{0x06, 0xa6, 0x5b, 0x15, 0x0a, 0x17, 0xa7, 0xe6, }}, /* Byte value: 0x06 */ + {{0x5d, 0x35, 0x96, 0x48, 0xe7, 0xc2, 0x70, 0xdb, }}, /* Byte value: 0x07 */ + {{0x09, 0x7a, 0x21, 0xd4, 0x1b, 0xd3, 0x98, 0x9a, }}, /* Byte value: 0x08 */ + {{0x78, 0x2f, 0x56, 0xc7, 0x88, 0xef, 0x3b, 0x66, }}, /* Byte value: 0x09 */ + {{0xf4, 0x9a, 0x7f, 0xea, 0xdf, 0x07, 0x0d, 0xc9, }}, /* Byte value: 0x0a */ + {{0x16, 0x30, 0x91, 0xcc, 0x3a, 0x7f, 0x88, 0xf2, }}, /* Byte value: 0x0b */ + {{0x19, 0xec, 0xeb, 0x0d, 0x2b, 0xbb, 0xb7, 0x8e, }}, /* Byte value: 0x0c */ + {{0xec, 0x47, 0xd0, 0xbe, 0xf7, 0x5b, 0xd4, 0xd7, }}, /* Byte value: 0x0d */ + {{0x69, 0x88, 0xd8, 0x47, 0xbb, 0x60, 0x7a, 0xe2, }}, /* Byte value: 0x0e */ + {{0x04, 0xc4, 0xd3, 0xa7, 0x0c, 0x1a, 0x7b, 0x05, }}, /* Byte value: 0x0f */ + {{0x8f, 0xe6, 0xe5, 0xc6, 0x52, 0x02, 0x84, 0xdc, }}, /* Byte value: 0x10 */ + {{0x30, 0x79, 0x9d, 0xa8, 0x50, 0xb8, 0x71, 0x3c, }}, /* Byte value: 0x11 */ + {{0x39, 0x03, 0xbc, 0x7c, 0x4b, 0x6b, 0xe9, 0xa6, }}, /* Byte value: 0x12 */ + {{0xe9, 0xb2, 0x47, 0x40, 0xf8, 0xa6, 0xc1, 0x42, }}, /* Byte value: 0x13 */ + {{0x03, 0x53, 0xcc, 0xeb, 0x05, 0xea, 0xb2, 0x73, }}, /* Byte value: 0x14 */ + {{0xcf, 0xfb, 0x4b, 0x24, 0x92, 0x61, 0x38, 0x8c, }}, /* Byte value: 0x15 */ + {{0x70, 0x64, 0x33, 0x4a, 0x90, 0xdb, 0xcd, 0x6c, }}, /* Byte value: 0x16 */ + {{0x43, 0x4e, 0x62, 0x09, 0xc5, 0x89, 0x0e, 0x23, }}, /* Byte value: 0x17 */ + {{0x55, 0x7e, 0xf3, 0xc5, 0xff, 0xf6, 0x86, 0xd1, }}, /* Byte value: 0x18 */ + {{0x2c, 0x60, 0xe1, 0x5b, 0x74, 0xfe, 0xd3, 0x27, }}, /* Byte value: 0x19 */ + {{0x12, 0xf4, 0x42, 0x6b, 0x36, 0x65, 0xf3, 0xf7, }}, /* Byte value: 0x1a */ + {{0x8e, 0xd7, 0xa1, 0x9f, 0x51, 0xe5, 0xea, 0x4c, }}, /* Byte value: 0x1b */ + {{0xd5, 0x44, 0x6c, 0xc2, 0xbc, 0x30, 0x3d, 0x71, }}, /* Byte value: 0x1c */ + {{0x3d, 0xc7, 0x6f, 0xdb, 0x47, 0x71, 0x92, 0xa3, }}, /* Byte value: 0x1d */ + {{0xd2, 0xd3, 0x73, 0x8e, 0xb5, 0xc0, 0xf4, 0x07, }}, /* Byte value: 0x1e */ + {{0x76, 0xc2, 0x68, 0x5f, 0x9a, 0xcc, 0x6a, 0x8a, }}, /* Byte value: 0x1f */ + {{0x18, 0xdd, 0xaf, 0x54, 0x28, 0x5c, 0xd9, 0x1e, }}, /* Byte value: 0x20 */ + {{0x35, 0x8c, 0x0a, 0x56, 0x5f, 0x45, 0x64, 0xa9, }}, /* Byte value: 0x21 */ + {{0x07, 0x97, 0x1f, 0x4c, 0x09, 0xf0, 0xc9, 0x76, }}, /* Byte value: 0x22 */ + {{0xc0, 0x27, 0x31, 0xe5, 0x83, 0xa5, 0x07, 0xf0, }}, /* Byte value: 0x23 */ + {{0xf7, 0xc9, 0xb3, 0x01, 0xda, 0xed, 0xbf, 0xba, }}, /* Byte value: 0x24 */ + {{0xb8, 0x08, 0x67, 0x22, 0x0b, 0x4a, 0x3c, 0x96, }}, /* Byte value: 0x25 */ + {{0x72, 0x06, 0xbb, 0xf8, 0x96, 0xd6, 0x11, 0x8f, }}, /* Byte value: 0x26 */ + {{0x11, 0xa7, 0x8e, 0x80, 0x33, 0x8f, 0x41, 0x84, }}, /* Byte value: 0x27 */ + {{0xb4, 0x87, 0xd1, 0x08, 0x1f, 0x64, 0xb1, 0x99, }}, /* Byte value: 0x28 */ + {{0xff, 0x82, 0xd6, 0x8c, 0xc2, 0xd9, 0x49, 0xb0, }}, /* Byte value: 0x29 */ + {{0x1a, 0xbf, 0x27, 0xe6, 0x2e, 0x51, 0x05, 0xfd, }}, /* Byte value: 0x2a */ + {{0x48, 0x56, 0xcb, 0x6f, 0xd8, 0x57, 0x4a, 0x5a, }}, /* Byte value: 0x2b */ + {{0xaa, 0xfc, 0x25, 0x49, 0x3d, 0x2f, 0xcf, 0x61, }}, /* Byte value: 0x2c */ + {{0x58, 0xc0, 0x01, 0xb6, 0xe8, 0x3f, 0x65, 0x4e, }}, /* Byte value: 0x2d */ + {{0x93, 0xff, 0x99, 0x35, 0x76, 0x44, 0x26, 0xc7, }}, /* Byte value: 0x2e */ + {{0x21, 0xde, 0x13, 0x28, 0x63, 0x37, 0x30, 0xb8, }}, /* Byte value: 0x2f */ + {{0xdd, 0x0f, 0x09, 0x4f, 0xa4, 0x04, 0xcb, 0x7b, }}, /* Byte value: 0x30 */ + {{0x60, 0xf2, 0xf9, 0x93, 0xa0, 0xb3, 0xe2, 0x78, }}, /* Byte value: 0x31 */ + {{0x0c, 0x8f, 0xb6, 0x2a, 0x14, 0x2e, 0x8d, 0x0f, }}, /* Byte value: 0x32 */ + {{0xc4, 0xe3, 0xe2, 0x42, 0x8f, 0xbf, 0x7c, 0xf5, }}, /* Byte value: 0x33 */ + {{0x9a, 0x85, 0xb8, 0xe1, 0x6d, 0x97, 0xbe, 0x5d, }}, /* Byte value: 0x34 */ + {{0x5c, 0x04, 0xd2, 0x11, 0xe4, 0x25, 0x1e, 0x4b, }}, /* Byte value: 0x35 */ + {{0x53, 0xd8, 0xa8, 0xd0, 0xf5, 0xe1, 0x21, 0x37, }}, /* Byte value: 0x36 */ + {{0xcd, 0x99, 0xc3, 0x96, 0x94, 0x6c, 0xe4, 0x6f, }}, /* Byte value: 0x37 */ + {{0x32, 0x1b, 0x15, 0x1a, 0x56, 0xb5, 0xad, 0xdf, }}, /* Byte value: 0x38 */ + {{0x1b, 0x8e, 0x63, 0xbf, 0x2d, 0xb6, 0x6b, 0x6d, }}, /* Byte value: 0x39 */ + {{0x5a, 0xa2, 0x89, 0x04, 0xee, 0x32, 0xb9, 0xad, }}, /* Byte value: 0x3a */ + {{0xa1, 0xe4, 0x8c, 0x2f, 0x20, 0xf1, 0x8b, 0x18, }}, /* Byte value: 0x3b */ + {{0xe5, 0x3d, 0xf1, 0x6a, 0xec, 0x88, 0x4c, 0x4d, }}, /* Byte value: 0x3c */ + {{0x3c, 0xf6, 0x2b, 0x82, 0x44, 0x96, 0xfc, 0x33, }}, /* Byte value: 0x3d */ + {{0x97, 0x3b, 0x4a, 0x92, 0x7a, 0x5e, 0x5d, 0xc2, }}, /* Byte value: 0x3e */ + {{0xce, 0xca, 0x0f, 0x7d, 0x91, 0x86, 0x56, 0x1c, }}, /* Byte value: 0x3f */ + {{0x6d, 0x4c, 0x0b, 0xe0, 0xb7, 0x7a, 0x01, 0xe7, }}, /* Byte value: 0x40 */ + {{0x62, 0x90, 0x71, 0x21, 0xa6, 0xbe, 0x3e, 0x9b, }}, /* Byte value: 0x41 */ + {{0xf5, 0xab, 0x3b, 0xb3, 0xdc, 0xe0, 0x63, 0x59, }}, /* Byte value: 0x42 */ + {{0xb7, 0xd4, 0x1d, 0xe3, 0x1a, 0x8e, 0x03, 0xea, }}, /* Byte value: 0x43 */ + {{0xe2, 0xaa, 0xee, 0x26, 0xe5, 0x78, 0x85, 0x3b, }}, /* Byte value: 0x44 */ + {{0x41, 0x2c, 0xea, 0xbb, 0xc3, 0x84, 0xd2, 0xc0, }}, /* Byte value: 0x45 */ + {{0x71, 0x55, 0x77, 0x13, 0x93, 0x3c, 0xa3, 0xfc, }}, /* Byte value: 0x46 */ + {{0xf9, 0x24, 0x8d, 0x99, 0xc8, 0xce, 0xee, 0x56, }}, /* Byte value: 0x47 */ + {{0xea, 0xe1, 0x8b, 0xab, 0xfd, 0x4c, 0x73, 0x31, }}, /* Byte value: 0x48 */ + {{0xae, 0x38, 0xf6, 0xee, 0x31, 0x35, 0xb4, 0x64, }}, /* Byte value: 0x49 */ + {{0xe4, 0x0c, 0xb5, 0x33, 0xef, 0x6f, 0x22, 0xdd, }}, /* Byte value: 0x4a */ + {{0x0b, 0x18, 0xa9, 0x66, 0x1d, 0xde, 0x44, 0x79, }}, /* Byte value: 0x4b */ + {{0xde, 0x5c, 0xc5, 0xa4, 0xa1, 0xee, 0x79, 0x08, }}, /* Byte value: 0x4c */ + {{0xf0, 0x5e, 0xac, 0x4d, 0xd3, 0x1d, 0x76, 0xcc, }}, /* Byte value: 0x4d */ + {{0xd4, 0x75, 0x28, 0x9b, 0xbf, 0xd7, 0x53, 0xe1, }}, /* Byte value: 0x4e */ + {{0xb5, 0xb6, 0x95, 0x51, 0x1c, 0x83, 0xdf, 0x09, }}, /* Byte value: 0x4f */ + {{0xa4, 0x11, 0x1b, 0xd1, 0x2f, 0x0c, 0x9e, 0x8d, }}, /* Byte value: 0x50 */ + {{0xba, 0x6a, 0xef, 0x90, 0x0d, 0x47, 0xe0, 0x75, }}, /* Byte value: 0x51 */ + {{0xe8, 0x83, 0x03, 0x19, 0xfb, 0x41, 0xaf, 0xd2, }}, /* Byte value: 0x52 */ + {{0x0e, 0xed, 0x3e, 0x98, 0x12, 0x23, 0x51, 0xec, }}, /* Byte value: 0x53 */ + {{0x9c, 0x23, 0xe3, 0xf4, 0x67, 0x80, 0x19, 0xbb, }}, /* Byte value: 0x54 */ + {{0x31, 0x48, 0xd9, 0xf1, 0x53, 0x5f, 0x1f, 0xac, }}, /* Byte value: 0x55 */ + {{0x79, 0x1e, 0x12, 0x9e, 0x8b, 0x08, 0x55, 0xf6, }}, /* Byte value: 0x56 */ + {{0xfc, 0xd1, 0x1a, 0x67, 0xc7, 0x33, 0xfb, 0xc3, }}, /* Byte value: 0x57 */ + {{0x4d, 0xa3, 0x5c, 0x91, 0xd7, 0xaa, 0x5f, 0xcf, }}, /* Byte value: 0x58 */ + {{0xdb, 0xa9, 0x52, 0x5a, 0xae, 0x13, 0x6c, 0x9d, }}, /* Byte value: 0x59 */ + {{0x75, 0x91, 0xa4, 0xb4, 0x9f, 0x26, 0xd8, 0xf9, }}, /* Byte value: 0x5a */ + {{0x68, 0xb9, 0x9c, 0x1e, 0xb8, 0x87, 0x14, 0x72, }}, /* Byte value: 0x5b */ + {{0x15, 0x63, 0x5d, 0x27, 0x3f, 0x95, 0x3a, 0x81, }}, /* Byte value: 0x5c */ + {{0xa9, 0xaf, 0xe9, 0xa2, 0x38, 0xc5, 0x7d, 0x12, }}, /* Byte value: 0x5d */ + {{0x01, 0x31, 0x44, 0x59, 0x03, 0xe7, 0x6e, 0x90, }}, /* Byte value: 0x5e */ + {{0x23, 0xbc, 0x9b, 0x9a, 0x65, 0x3a, 0xec, 0x5b, }}, /* Byte value: 0x5f */ + {{0xb2, 0x21, 0x8a, 0x1d, 0x15, 0x73, 0x16, 0x7f, }}, /* Byte value: 0x60 */ + {{0x6e, 0x1f, 0xc7, 0x0b, 0xb2, 0x90, 0xb3, 0x94, }}, /* Byte value: 0x61 */ + {{0xf2, 0x3c, 0x24, 0xff, 0xd5, 0x10, 0xaa, 0x2f, }}, /* Byte value: 0x62 */ + {{0x3b, 0x61, 0x34, 0xce, 0x4d, 0x66, 0x35, 0x45, }}, /* Byte value: 0x63 */ + {{0x52, 0xe9, 0xec, 0x89, 0xf6, 0x06, 0x4f, 0xa7, }}, /* Byte value: 0x64 */ + {{0x65, 0x07, 0x6e, 0x6d, 0xaf, 0x4e, 0xf7, 0xed, }}, /* Byte value: 0x65 */ + {{0x4b, 0x05, 0x07, 0x84, 0xdd, 0xbd, 0xf8, 0x29, }}, /* Byte value: 0x66 */ + {{0x38, 0x32, 0xf8, 0x25, 0x48, 0x8c, 0x87, 0x36, }}, /* Byte value: 0x67 */ + {{0x2a, 0xc6, 0xba, 0x4e, 0x7e, 0xe9, 0x74, 0xc1, }}, /* Byte value: 0x68 */ + {{0x91, 0x9d, 0x11, 0x87, 0x70, 0x49, 0xfa, 0x24, }}, /* Byte value: 0x69 */ + {{0xd6, 0x17, 0xa0, 0x29, 0xb9, 0xda, 0x8f, 0x02, }}, /* Byte value: 0x6a */ + {{0xfd, 0xe0, 0x5e, 0x3e, 0xc4, 0xd4, 0x95, 0x53, }}, /* Byte value: 0x6b */ + {{0xf8, 0x15, 0xc9, 0xc0, 0xcb, 0x29, 0x80, 0xc6, }}, /* Byte value: 0x6c */ + {{0x8c, 0xb5, 0x29, 0x2d, 0x57, 0xe8, 0x36, 0xaf, }}, /* Byte value: 0x6d */ + {{0x50, 0x8b, 0x64, 0x3b, 0xf0, 0x0b, 0x93, 0x44, }}, /* Byte value: 0x6e */ + {{0x7f, 0xb8, 0x49, 0x8b, 0x81, 0x1f, 0xf2, 0x10, }}, /* Byte value: 0x6f */ + {{0x59, 0xf1, 0x45, 0xef, 0xeb, 0xd8, 0x0b, 0xde, }}, /* Byte value: 0x70 */ + {{0x08, 0x4b, 0x65, 0x8d, 0x18, 0x34, 0xf6, 0x0a, }}, /* Byte value: 0x71 */ + {{0xd9, 0xcb, 0xda, 0xe8, 0xa8, 0x1e, 0xb0, 0x7e, }}, /* Byte value: 0x72 */ + {{0xa2, 0xb7, 0x40, 0xc4, 0x25, 0x1b, 0x39, 0x6b, }}, /* Byte value: 0x73 */ + {{0xfb, 0x46, 0x05, 0x2b, 0xce, 0xc3, 0x32, 0xb5, }}, /* Byte value: 0x74 */ + {{0x1c, 0x19, 0x7c, 0xf3, 0x24, 0x46, 0xa2, 0x1b, }}, /* Byte value: 0x75 */ + {{0x29, 0x95, 0x76, 0xa5, 0x7b, 0x03, 0xc6, 0xb2, }}, /* Byte value: 0x76 */ + {{0xd3, 0xe2, 0x37, 0xd7, 0xb6, 0x27, 0x9a, 0x97, }}, /* Byte value: 0x77 */ + {{0x6f, 0x2e, 0x83, 0x52, 0xb1, 0x77, 0xdd, 0x04, }}, /* Byte value: 0x78 */ + {{0x47, 0x8a, 0xb1, 0xae, 0xc9, 0x93, 0x75, 0x26, }}, /* Byte value: 0x79 */ + {{0x54, 0x4f, 0xb7, 0x9c, 0xfc, 0x11, 0xe8, 0x41, }}, /* Byte value: 0x7a */ + {{0x9f, 0x70, 0x2f, 0x1f, 0x62, 0x6a, 0xab, 0xc8, }}, /* Byte value: 0x7b */ + {{0x17, 0x01, 0xd5, 0x95, 0x39, 0x98, 0xe6, 0x62, }}, /* Byte value: 0x7c */ + {{0xe1, 0xf9, 0x22, 0xcd, 0xe0, 0x92, 0x37, 0x48, }}, /* Byte value: 0x7d */ + {{0x7c, 0xeb, 0x85, 0x60, 0x84, 0xf5, 0x40, 0x63, }}, /* Byte value: 0x7e */ + {{0x46, 0xbb, 0xf5, 0xf7, 0xca, 0x74, 0x1b, 0xb6, }}, /* Byte value: 0x7f */ + {{0xbc, 0xcc, 0xb4, 0x85, 0x07, 0x50, 0x47, 0x93, }}, /* Byte value: 0x80 */ + {{0xc5, 0xd2, 0xa6, 0x1b, 0x8c, 0x58, 0x12, 0x65, }}, /* Byte value: 0x81 */ + {{0x22, 0x8d, 0xdf, 0xc3, 0x66, 0xdd, 0x82, 0xcb, }}, /* Byte value: 0x82 */ + {{0xbe, 0xae, 0x3c, 0x37, 0x01, 0x5d, 0x9b, 0x70, }}, /* Byte value: 0x83 */ + {{0x96, 0x0a, 0x0e, 0xcb, 0x79, 0xb9, 0x33, 0x52, }}, /* Byte value: 0x84 */ + {{0x7e, 0x89, 0x0d, 0xd2, 0x82, 0xf8, 0x9c, 0x80, }}, /* Byte value: 0x85 */ + {{0x1d, 0x28, 0x38, 0xaa, 0x27, 0xa1, 0xcc, 0x8b, }}, /* Byte value: 0x86 */ + {{0xb9, 0x39, 0x23, 0x7b, 0x08, 0xad, 0x52, 0x06, }}, /* Byte value: 0x87 */ + {{0x9d, 0x12, 0xa7, 0xad, 0x64, 0x67, 0x77, 0x2b, }}, /* Byte value: 0x88 */ + {{0xad, 0x6b, 0x3a, 0x05, 0x34, 0xdf, 0x06, 0x17, }}, /* Byte value: 0x89 */ + {{0x6c, 0x7d, 0x4f, 0xb9, 0xb4, 0x9d, 0x6f, 0x77, }}, /* Byte value: 0x8a */ + {{0x85, 0xcf, 0x08, 0xf9, 0x4c, 0x3b, 0xae, 0x35, }}, /* Byte value: 0x8b */ + {{0xd1, 0x80, 0xbf, 0x65, 0xb0, 0x2a, 0x46, 0x74, }}, /* Byte value: 0x8c */ + {{0x1e, 0x7b, 0xf4, 0x41, 0x22, 0x4b, 0x7e, 0xf8, }}, /* Byte value: 0x8d */ + {{0xa5, 0x20, 0x5f, 0x88, 0x2c, 0xeb, 0xf0, 0x1d, }}, /* Byte value: 0x8e */ + {{0xe6, 0x6e, 0x3d, 0x81, 0xe9, 0x62, 0xfe, 0x3e, }}, /* Byte value: 0x8f */ + {{0x2e, 0x02, 0x69, 0xe9, 0x72, 0xf3, 0x0f, 0xc4, }}, /* Byte value: 0x90 */ + {{0x5f, 0x57, 0x1e, 0xfa, 0xe1, 0xcf, 0xac, 0x38, }}, /* Byte value: 0x91 */ + {{0x61, 0xc3, 0xbd, 0xca, 0xa3, 0x54, 0x8c, 0xe8, }}, /* Byte value: 0x92 */ + {{0x83, 0x69, 0x53, 0xec, 0x46, 0x2c, 0x09, 0xd3, }}, /* Byte value: 0x93 */ + {{0x44, 0xd9, 0x7d, 0x45, 0xcc, 0x79, 0xc7, 0x55, }}, /* Byte value: 0x94 */ + {{0xb1, 0x72, 0x46, 0xf6, 0x10, 0x99, 0xa4, 0x0c, }}, /* Byte value: 0x95 */ + {{0xef, 0x14, 0x1c, 0x55, 0xf2, 0xb1, 0x66, 0xa4, }}, /* Byte value: 0x96 */ + {{0x82, 0x58, 0x17, 0xb5, 0x45, 0xcb, 0x67, 0x43, }}, /* Byte value: 0x97 */ + {{0x36, 0xdf, 0xc6, 0xbd, 0x5a, 0xaf, 0xd6, 0xda, }}, /* Byte value: 0x98 */ + {{0xa3, 0x86, 0x04, 0x9d, 0x26, 0xfc, 0x57, 0xfb, }}, /* Byte value: 0x99 */ + {{0xaf, 0x09, 0xb2, 0xb7, 0x32, 0xd2, 0xda, 0xf4, }}, /* Byte value: 0x9a */ + {{0x88, 0x71, 0xfa, 0x8a, 0x5b, 0xf2, 0x4d, 0xaa, }}, /* Byte value: 0x9b */ + {{0x89, 0x40, 0xbe, 0xd3, 0x58, 0x15, 0x23, 0x3a, }}, /* Byte value: 0x9c */ + {{0x0f, 0xdc, 0x7a, 0xc1, 0x11, 0xc4, 0x3f, 0x7c, }}, /* Byte value: 0x9d */ + {{0x1f, 0x4a, 0xb0, 0x18, 0x21, 0xac, 0x10, 0x68, }}, /* Byte value: 0x9e */ + {{0x42, 0x7f, 0x26, 0x50, 0xc6, 0x6e, 0x60, 0xb3, }}, /* Byte value: 0x9f */ + {{0xf6, 0xf8, 0xf7, 0x58, 0xd9, 0x0a, 0xd1, 0x2a, }}, /* Byte value: 0xa0 */ + {{0xdf, 0x6d, 0x81, 0xfd, 0xa2, 0x09, 0x17, 0x98, }}, /* Byte value: 0xa1 */ + {{0x3a, 0x50, 0x70, 0x97, 0x4e, 0x81, 0x5b, 0xd5, }}, /* Byte value: 0xa2 */ + {{0xc1, 0x16, 0x75, 0xbc, 0x80, 0x42, 0x69, 0x60, }}, /* Byte value: 0xa3 */ + {{0x28, 0xa4, 0x32, 0xfc, 0x78, 0xe4, 0xa8, 0x22, }}, /* Byte value: 0xa4 */ + {{0xf1, 0x6f, 0xe8, 0x14, 0xd0, 0xfa, 0x18, 0x5c, }}, /* Byte value: 0xa5 */ + {{0xcb, 0x3f, 0x98, 0x83, 0x9e, 0x7b, 0x43, 0x89, }}, /* Byte value: 0xa6 */ + {{0x92, 0xce, 0xdd, 0x6c, 0x75, 0xa3, 0x48, 0x57, }}, /* Byte value: 0xa7 */ + {{0x87, 0xad, 0x80, 0x4b, 0x4a, 0x36, 0x72, 0xd6, }}, /* Byte value: 0xa8 */ + {{0xe7, 0x5f, 0x79, 0xd8, 0xea, 0x85, 0x90, 0xae, }}, /* Byte value: 0xa9 */ + {{0x3e, 0x94, 0xa3, 0x30, 0x42, 0x9b, 0x20, 0xd0, }}, /* Byte value: 0xaa */ + {{0xfa, 0x77, 0x41, 0x72, 0xcd, 0x24, 0x5c, 0x25, }}, /* Byte value: 0xab */ + {{0x0d, 0xbe, 0xf2, 0x73, 0x17, 0xc9, 0xe3, 0x9f, }}, /* Byte value: 0xac */ + {{0x51, 0xba, 0x20, 0x62, 0xf3, 0xec, 0xfd, 0xd4, }}, /* Byte value: 0xad */ + {{0xb6, 0xe5, 0x59, 0xba, 0x19, 0x69, 0x6d, 0x7a, }}, /* Byte value: 0xae */ + {{0x7b, 0x7c, 0x9a, 0x2c, 0x8d, 0x05, 0x89, 0x15, }}, /* Byte value: 0xaf */ + {{0x74, 0xa0, 0xe0, 0xed, 0x9c, 0xc1, 0xb6, 0x69, }}, /* Byte value: 0xb0 */ + {{0x3f, 0xa5, 0xe7, 0x69, 0x41, 0x7c, 0x4e, 0x40, }}, /* Byte value: 0xb1 */ + {{0x2f, 0x33, 0x2d, 0xb0, 0x71, 0x14, 0x61, 0x54, }}, /* Byte value: 0xb2 */ + {{0x7d, 0xda, 0xc1, 0x39, 0x87, 0x12, 0x2e, 0xf3, }}, /* Byte value: 0xb3 */ + {{0xbb, 0x5b, 0xab, 0xc9, 0x0e, 0xa0, 0x8e, 0xe5, }}, /* Byte value: 0xb4 */ + {{0x49, 0x67, 0x8f, 0x36, 0xdb, 0xb0, 0x24, 0xca, }}, /* Byte value: 0xb5 */ + {{0x2b, 0xf7, 0xfe, 0x17, 0x7d, 0x0e, 0x1a, 0x51, }}, /* Byte value: 0xb6 */ + {{0x99, 0xd6, 0x74, 0x0a, 0x68, 0x7d, 0x0c, 0x2e, }}, /* Byte value: 0xb7 */ + {{0x02, 0x62, 0x88, 0xb2, 0x06, 0x0d, 0xdc, 0xe3, }}, /* Byte value: 0xb8 */ + {{0x37, 0xee, 0x82, 0xe4, 0x59, 0x48, 0xb8, 0x4a, }}, /* Byte value: 0xb9 */ + {{0xb3, 0x10, 0xce, 0x44, 0x16, 0x94, 0x78, 0xef, }}, /* Byte value: 0xba */ + {{0x73, 0x37, 0xff, 0xa1, 0x95, 0x31, 0x7f, 0x1f, }}, /* Byte value: 0xbb */ + {{0x64, 0x36, 0x2a, 0x34, 0xac, 0xa9, 0x99, 0x7d, }}, /* Byte value: 0xbc */ + {{0xdc, 0x3e, 0x4d, 0x16, 0xa7, 0xe3, 0xa5, 0xeb, }}, /* Byte value: 0xbd */ + {{0xd8, 0xfa, 0x9e, 0xb1, 0xab, 0xf9, 0xde, 0xee, }}, /* Byte value: 0xbe */ + {{0xc9, 0x5d, 0x10, 0x31, 0x98, 0x76, 0x9f, 0x6a, }}, /* Byte value: 0xbf */ + {{0xab, 0xcd, 0x61, 0x10, 0x3e, 0xc8, 0xa1, 0xf1, }}, /* Byte value: 0xc0 */ + {{0x33, 0x2a, 0x51, 0x43, 0x55, 0x52, 0xc3, 0x4f, }}, /* Byte value: 0xc1 */ + {{0x6b, 0xea, 0x50, 0xf5, 0xbd, 0x6d, 0xa6, 0x01, }}, /* Byte value: 0xc2 */ + {{0xcc, 0xa8, 0x87, 0xcf, 0x97, 0x8b, 0x8a, 0xff, }}, /* Byte value: 0xc3 */ + {{0x90, 0xac, 0x55, 0xde, 0x73, 0xae, 0x94, 0xb4, }}, /* Byte value: 0xc4 */ + {{0xd0, 0xb1, 0xfb, 0x3c, 0xb3, 0xcd, 0x28, 0xe4, }}, /* Byte value: 0xc5 */ + {{0xac, 0x5a, 0x7e, 0x5c, 0x37, 0x38, 0x68, 0x87, }}, /* Byte value: 0xc6 */ + {{0xbf, 0x9f, 0x78, 0x6e, 0x02, 0xba, 0xf5, 0xe0, }}, /* Byte value: 0xc7 */ + {{0xda, 0x98, 0x16, 0x03, 0xad, 0xf4, 0x02, 0x0d, }}, /* Byte value: 0xc8 */ + {{0xa7, 0x42, 0xd7, 0x3a, 0x2a, 0xe6, 0x2c, 0xfe, }}, /* Byte value: 0xc9 */ + {{0x5e, 0x66, 0x5a, 0xa3, 0xe2, 0x28, 0xc2, 0xa8, }}, /* Byte value: 0xca */ + {{0x98, 0xe7, 0x30, 0x53, 0x6b, 0x9a, 0x62, 0xbe, }}, /* Byte value: 0xcb */ + {{0x7a, 0x4d, 0xde, 0x75, 0x8e, 0xe2, 0xe7, 0x85, }}, /* Byte value: 0xcc */ + {{0x13, 0xc5, 0x06, 0x32, 0x35, 0x82, 0x9d, 0x67, }}, /* Byte value: 0xcd */ + {{0x6a, 0xdb, 0x14, 0xac, 0xbe, 0x8a, 0xc8, 0x91, }}, /* Byte value: 0xce */ + {{0x40, 0x1d, 0xae, 0xe2, 0xc0, 0x63, 0xbc, 0x50, }}, /* Byte value: 0xcf */ + {{0xa8, 0x9e, 0xad, 0xfb, 0x3b, 0x22, 0x13, 0x82, }}, /* Byte value: 0xd0 */ + {{0x5b, 0x93, 0xcd, 0x5d, 0xed, 0xd5, 0xd7, 0x3d, }}, /* Byte value: 0xd1 */ + {{0xeb, 0xd0, 0xcf, 0xf2, 0xfe, 0xab, 0x1d, 0xa1, }}, /* Byte value: 0xd2 */ + {{0x66, 0x54, 0xa2, 0x86, 0xaa, 0xa4, 0x45, 0x9e, }}, /* Byte value: 0xd3 */ + {{0x56, 0x2d, 0x3f, 0x2e, 0xfa, 0x1c, 0x34, 0xa2, }}, /* Byte value: 0xd4 */ + {{0x81, 0x0b, 0xdb, 0x5e, 0x40, 0x21, 0xd5, 0x30, }}, /* Byte value: 0xd5 */ + {{0x77, 0xf3, 0x2c, 0x06, 0x99, 0x2b, 0x04, 0x1a, }}, /* Byte value: 0xd6 */ + {{0x57, 0x1c, 0x7b, 0x77, 0xf9, 0xfb, 0x5a, 0x32, }}, /* Byte value: 0xd7 */ + {{0x4e, 0xf0, 0x90, 0x7a, 0xd2, 0x40, 0xed, 0xbc, }}, /* Byte value: 0xd8 */ + {{0x8d, 0x84, 0x6d, 0x74, 0x54, 0x0f, 0x58, 0x3f, }}, /* Byte value: 0xd9 */ + {{0xb0, 0x43, 0x02, 0xaf, 0x13, 0x7e, 0xca, 0x9c, }}, /* Byte value: 0xda */ + {{0xf3, 0x0d, 0x60, 0xa6, 0xd6, 0xf7, 0xc4, 0xbf, }}, /* Byte value: 0xdb */ + {{0x94, 0x68, 0x86, 0x79, 0x7f, 0xb4, 0xef, 0xb1, }}, /* Byte value: 0xdc */ + {{0x20, 0xef, 0x57, 0x71, 0x60, 0xd0, 0x5e, 0x28, }}, /* Byte value: 0xdd */ + {{0x24, 0x2b, 0x84, 0xd6, 0x6c, 0xca, 0x25, 0x2d, }}, /* Byte value: 0xde */ + {{0xd7, 0x26, 0xe4, 0x70, 0xba, 0x3d, 0xe1, 0x92, }}, /* Byte value: 0xdf */ + {{0x14, 0x52, 0x19, 0x7e, 0x3c, 0x72, 0x54, 0x11, }}, /* Byte value: 0xe0 */ + {{0x9e, 0x41, 0x6b, 0x46, 0x61, 0x8d, 0xc5, 0x58, }}, /* Byte value: 0xe1 */ + {{0x05, 0xf5, 0x97, 0xfe, 0x0f, 0xfd, 0x15, 0x95, }}, /* Byte value: 0xe2 */ + {{0xc6, 0x81, 0x6a, 0xf0, 0x89, 0xb2, 0xa0, 0x16, }}, /* Byte value: 0xe3 */ + {{0xed, 0x76, 0x94, 0xe7, 0xf4, 0xbc, 0xba, 0x47, }}, /* Byte value: 0xe4 */ + {{0xc8, 0x6c, 0x54, 0x68, 0x9b, 0x91, 0xf1, 0xfa, }}, /* Byte value: 0xe5 */ + {{0x9b, 0xb4, 0xfc, 0xb8, 0x6e, 0x70, 0xd0, 0xcd, }}, /* Byte value: 0xe6 */ + {{0xbd, 0xfd, 0xf0, 0xdc, 0x04, 0xb7, 0x29, 0x03, }}, /* Byte value: 0xe7 */ + {{0x84, 0xfe, 0x4c, 0xa0, 0x4f, 0xdc, 0xc0, 0xa5, }}, /* Byte value: 0xe8 */ + {{0xc3, 0x74, 0xfd, 0x0e, 0x86, 0x4f, 0xb5, 0x83, }}, /* Byte value: 0xe9 */ + {{0xca, 0x0e, 0xdc, 0xda, 0x9d, 0x9c, 0x2d, 0x19, }}, /* Byte value: 0xea */ + {{0x8a, 0x13, 0x72, 0x38, 0x5d, 0xff, 0x91, 0x49, }}, /* Byte value: 0xeb */ + {{0x34, 0xbd, 0x4e, 0x0f, 0x5c, 0xa2, 0x0a, 0x39, }}, /* Byte value: 0xec */ + {{0x26, 0x49, 0x0c, 0x64, 0x6a, 0xc7, 0xf9, 0xce, }}, /* Byte value: 0xed */ + {{0x10, 0x96, 0xca, 0xd9, 0x30, 0x68, 0x2f, 0x14, }}, /* Byte value: 0xee */ + {{0x25, 0x1a, 0xc0, 0x8f, 0x6f, 0x2d, 0x4b, 0xbd, }}, /* Byte value: 0xef */ + {{0xe3, 0x9b, 0xaa, 0x7f, 0xe6, 0x9f, 0xeb, 0xab, }}, /* Byte value: 0xf0 */ + {{0x63, 0xa1, 0x35, 0x78, 0xa5, 0x59, 0x50, 0x0b, }}, /* Byte value: 0xf1 */ + {{0x0a, 0x29, 0xed, 0x3f, 0x1e, 0x39, 0x2a, 0xe9, }}, /* Byte value: 0xf2 */ + {{0x4f, 0xc1, 0xd4, 0x23, 0xd1, 0xa7, 0x83, 0x2c, }}, /* Byte value: 0xf3 */ + {{0x8b, 0x22, 0x36, 0x61, 0x5e, 0x18, 0xff, 0xd9, }}, /* Byte value: 0xf4 */ + {{0xc7, 0xb0, 0x2e, 0xa9, 0x8a, 0x55, 0xce, 0x86, }}, /* Byte value: 0xf5 */ + {{0x67, 0x65, 0xe6, 0xdf, 0xa9, 0x43, 0x2b, 0x0e, }}, /* Byte value: 0xf6 */ + {{0x2d, 0x51, 0xa5, 0x02, 0x77, 0x19, 0xbd, 0xb7, }}, /* Byte value: 0xf7 */ + {{0xfe, 0xb3, 0x92, 0xd5, 0xc1, 0x3e, 0x27, 0x20, }}, /* Byte value: 0xf8 */ + {{0x45, 0xe8, 0x39, 0x1c, 0xcf, 0x9e, 0xa9, 0xc5, }}, /* Byte value: 0xf9 */ + {{0xa0, 0xd5, 0xc8, 0x76, 0x23, 0x16, 0xe5, 0x88, }}, /* Byte value: 0xfa */ + {{0x80, 0x3a, 0x9f, 0x07, 0x43, 0xc6, 0xbb, 0xa0, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x4a, 0x34, 0x43, 0xdd, 0xde, 0x5a, 0x96, 0xb9, }}, /* Byte value: 0xfd */ + {{0xee, 0x25, 0x58, 0x0c, 0xf1, 0x56, 0x08, 0x34, }}, /* Byte value: 0xfe */ + {{0x4c, 0x92, 0x18, 0xc8, 0xd4, 0x4d, 0x31, 0x5f, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 13 */ + {{0xab, 0xda, 0x7f, 0x93, 0x75, 0x63, 0x3b, 0x22, }}, /* Byte value: 0x00 */ + {{0xbb, 0xd9, 0xf4, 0xa6, 0xc1, 0x1b, 0xf5, 0xe1, }}, /* Byte value: 0x01 */ + {{0x83, 0x3c, 0x0e, 0x02, 0x84, 0xaf, 0x03, 0xe7, }}, /* Byte value: 0x02 */ + {{0x0d, 0x8c, 0x03, 0x40, 0xed, 0xc4, 0x60, 0xd0, }}, /* Byte value: 0x03 */ + {{0x3a, 0xdd, 0xd3, 0xea, 0xb2, 0xbb, 0x9f, 0x26, }}, /* Byte value: 0x04 */ + {{0x4a, 0xd4, 0xe4, 0x61, 0x38, 0x10, 0xb0, 0x2a, }}, /* Byte value: 0x05 */ + {{0xe8, 0xf2, 0xca, 0x2e, 0x8d, 0xa9, 0x39, 0x98, }}, /* Byte value: 0x06 */ + {{0xeb, 0xd6, 0x16, 0x47, 0xe0, 0x40, 0x85, 0xa8, }}, /* Byte value: 0x07 */ + {{0x8f, 0xac, 0xf8, 0x65, 0xf3, 0x8d, 0xb6, 0x27, }}, /* Byte value: 0x08 */ + {{0xbe, 0xb5, 0x53, 0x1d, 0x76, 0xe3, 0xf2, 0xb1, }}, /* Byte value: 0x09 */ + {{0x0f, 0xb4, 0x2a, 0x0e, 0x1a, 0xcb, 0x09, 0xf0, }}, /* Byte value: 0x0a */ + {{0x6d, 0x86, 0xbf, 0xfe, 0xd3, 0x17, 0x81, 0x1f, }}, /* Byte value: 0x0b */ + {{0x0a, 0xd8, 0x8d, 0xb5, 0xad, 0x33, 0x0e, 0xa0, }}, /* Byte value: 0x0c */ + {{0x29, 0xfa, 0x84, 0xb6, 0x6b, 0x2a, 0xed, 0xd5, }}, /* Byte value: 0x0d */ + {{0x17, 0x57, 0x05, 0xc0, 0xf4, 0x8f, 0xa0, 0xb3, }}, /* Byte value: 0x0e */ + {{0xb0, 0x1d, 0x8c, 0x34, 0xf6, 0xce, 0x2e, 0x51, }}, /* Byte value: 0x0f */ + {{0xc5, 0x78, 0x1c, 0x04, 0xcb, 0x9d, 0x06, 0x0d, }}, /* Byte value: 0x10 */ + {{0x4c, 0x9c, 0x9f, 0xb3, 0xe2, 0x01, 0x0b, 0x4a, }}, /* Byte value: 0x11 */ + {{0xc3, 0x30, 0x67, 0xd6, 0x11, 0x8c, 0xbd, 0x6d, }}, /* Byte value: 0x12 */ + {{0xb5, 0x71, 0x2b, 0x8f, 0x41, 0x36, 0x29, 0x01, }}, /* Byte value: 0x13 */ + {{0x74, 0x79, 0x65, 0x17, 0xa7, 0xb5, 0xfd, 0x4c, }}, /* Byte value: 0x14 */ + {{0x94, 0x6b, 0x0b, 0xc2, 0x70, 0x20, 0xa3, 0x54, }}, /* Byte value: 0x15 */ + {{0x1d, 0x8f, 0x88, 0x75, 0x59, 0xbc, 0xae, 0x13, }}, /* Byte value: 0x16 */ + {{0x25, 0x6a, 0x72, 0xd1, 0x1c, 0x08, 0x58, 0x15, }}, /* Byte value: 0x17 */ + {{0x48, 0xec, 0xcd, 0x2f, 0xcf, 0x1f, 0xd9, 0x0a, }}, /* Byte value: 0x18 */ + {{0xda, 0xcf, 0xbd, 0x3f, 0x65, 0x2e, 0xc1, 0x3e, }}, /* Byte value: 0x19 */ + {{0xdd, 0x9b, 0x33, 0xca, 0x25, 0xd9, 0xaf, 0x4e, }}, /* Byte value: 0x1a */ + {{0xe9, 0xee, 0x3f, 0x09, 0x17, 0x4f, 0xec, 0x88, }}, /* Byte value: 0x1b */ + {{0xea, 0xca, 0xe3, 0x60, 0x7a, 0xa6, 0x50, 0xb8, }}, /* Byte value: 0x1c */ + {{0x73, 0x2d, 0xeb, 0xe2, 0xe7, 0x42, 0x93, 0x3c, }}, /* Byte value: 0x1d */ + {{0x2e, 0xae, 0x0a, 0x43, 0x2b, 0xdd, 0x83, 0xa5, }}, /* Byte value: 0x1e */ + {{0xf5, 0x7d, 0x42, 0x5b, 0xd4, 0x15, 0x97, 0x8b, }}, /* Byte value: 0x1f */ + {{0x26, 0x4e, 0xae, 0xb8, 0x71, 0xe1, 0xe4, 0x25, }}, /* Byte value: 0x20 */ + {{0xd0, 0x17, 0x30, 0x8a, 0xc8, 0x1d, 0xcf, 0x9e, }}, /* Byte value: 0x21 */ + {{0xc4, 0x64, 0xe9, 0x23, 0x51, 0x7b, 0xd3, 0x1d, }}, /* Byte value: 0x22 */ + {{0xf3, 0x35, 0x39, 0x89, 0x0e, 0x04, 0x2c, 0xeb, }}, /* Byte value: 0x23 */ + {{0x7b, 0xcd, 0x4f, 0x19, 0xbd, 0x7e, 0xf4, 0xbc, }}, /* Byte value: 0x24 */ + {{0x4d, 0x80, 0x6a, 0x94, 0x78, 0xe7, 0xde, 0x5a, }}, /* Byte value: 0x25 */ + {{0x45, 0x60, 0xce, 0x6f, 0x22, 0xdb, 0xb9, 0xda, }}, /* Byte value: 0x26 */ + {{0xa9, 0xe2, 0x56, 0xdd, 0x82, 0x6c, 0x52, 0x02, }}, /* Byte value: 0x27 */ + {{0x5e, 0xa7, 0x3d, 0xc8, 0xa1, 0x76, 0xac, 0xa9, }}, /* Byte value: 0x28 */ + {{0xd8, 0xf7, 0x94, 0x71, 0x92, 0x21, 0xa8, 0x1e, }}, /* Byte value: 0x29 */ + {{0x7e, 0xa1, 0xe8, 0xa2, 0x0a, 0x86, 0xf3, 0xec, }}, /* Byte value: 0x2a */ + {{0xf2, 0x29, 0xcc, 0xae, 0x94, 0xe2, 0xf9, 0xfb, }}, /* Byte value: 0x2b */ + {{0x90, 0x1b, 0x59, 0x5e, 0x5d, 0x3e, 0x71, 0x14, }}, /* Byte value: 0x2c */ + {{0x77, 0x5d, 0xb9, 0x7e, 0xca, 0x5c, 0x41, 0x7c, }}, /* Byte value: 0x2d */ + {{0x53, 0x2b, 0x3e, 0x88, 0x4c, 0xb2, 0xcc, 0x79, }}, /* Byte value: 0x2e */ + {{0xe5, 0x7e, 0xc9, 0x6e, 0x60, 0x6d, 0x59, 0x48, }}, /* Byte value: 0x2f */ + {{0x49, 0xf0, 0x38, 0x08, 0x55, 0xf9, 0x0c, 0x1a, }}, /* Byte value: 0x30 */ + {{0x98, 0xfb, 0xfd, 0xa5, 0x07, 0x02, 0x16, 0x94, }}, /* Byte value: 0x31 */ + {{0x13, 0x27, 0x57, 0x5c, 0xd9, 0x91, 0x72, 0xf3, }}, /* Byte value: 0x32 */ + {{0x43, 0x28, 0xb5, 0xbd, 0xf8, 0xca, 0x02, 0xba, }}, /* Byte value: 0x33 */ + {{0xdc, 0x87, 0xc6, 0xed, 0xbf, 0x3f, 0x7a, 0x5e, }}, /* Byte value: 0x34 */ + {{0xc7, 0x40, 0x35, 0x4a, 0x3c, 0x92, 0x6f, 0x2d, }}, /* Byte value: 0x35 */ + {{0xa0, 0x1e, 0x07, 0x01, 0x42, 0xb6, 0xe0, 0x92, }}, /* Byte value: 0x36 */ + {{0xcc, 0x84, 0x4d, 0xd8, 0x0b, 0x47, 0xb4, 0x9d, }}, /* Byte value: 0x37 */ + {{0x14, 0x73, 0xd9, 0xa9, 0x99, 0x66, 0x1c, 0x83, }}, /* Byte value: 0x38 */ + {{0x52, 0x37, 0xcb, 0xaf, 0xd6, 0x54, 0x19, 0x69, }}, /* Byte value: 0x39 */ + {{0x2f, 0xb2, 0xff, 0x64, 0xb1, 0x3b, 0x56, 0xb5, }}, /* Byte value: 0x3a */ + {{0x47, 0x58, 0xe7, 0x21, 0xd5, 0xd4, 0xd0, 0xfa, }}, /* Byte value: 0x3b */ + {{0xa6, 0x56, 0x7c, 0xd3, 0x98, 0xa7, 0x5b, 0xf2, }}, /* Byte value: 0x3c */ + {{0x5f, 0xbb, 0xc8, 0xef, 0x3b, 0x90, 0x79, 0xb9, }}, /* Byte value: 0x3d */ + {{0xe3, 0x36, 0xb2, 0xbc, 0xba, 0x7c, 0xe2, 0x28, }}, /* Byte value: 0x3e */ + {{0xb8, 0xfd, 0x28, 0xcf, 0xac, 0xf2, 0x49, 0xd1, }}, /* Byte value: 0x3f */ + {{0xa7, 0x4a, 0x89, 0xf4, 0x02, 0x41, 0x8e, 0xe2, }}, /* Byte value: 0x40 */ + {{0xc0, 0x14, 0xbb, 0xbf, 0x7c, 0x65, 0x01, 0x5d, }}, /* Byte value: 0x41 */ + {{0x23, 0x22, 0x09, 0x03, 0xc6, 0x19, 0xe3, 0x75, }}, /* Byte value: 0x42 */ + {{0x2a, 0xde, 0x58, 0xdf, 0x06, 0xc3, 0x51, 0xe5, }}, /* Byte value: 0x43 */ + {{0x62, 0x32, 0x95, 0xf0, 0xc9, 0xdc, 0x88, 0xef, }}, /* Byte value: 0x44 */ + {{0x7d, 0x85, 0x34, 0xcb, 0x67, 0x6f, 0x4f, 0xdc, }}, /* Byte value: 0x45 */ + {{0x31, 0x19, 0xab, 0x78, 0x85, 0x6e, 0x44, 0x96, }}, /* Byte value: 0x46 */ + {{0x30, 0x05, 0x5e, 0x5f, 0x1f, 0x88, 0x91, 0x86, }}, /* Byte value: 0x47 */ + {{0xc1, 0x08, 0x4e, 0x98, 0xe6, 0x83, 0xd4, 0x4d, }}, /* Byte value: 0x48 */ + {{0x20, 0x06, 0xd5, 0x6a, 0xab, 0xf0, 0x5f, 0x45, }}, /* Byte value: 0x49 */ + {{0x8a, 0xc0, 0x5f, 0xde, 0x44, 0x75, 0xb1, 0x77, }}, /* Byte value: 0x4a */ + {{0xd7, 0x43, 0xbe, 0x7f, 0x88, 0xea, 0xa1, 0xee, }}, /* Byte value: 0x4b */ + {{0x3d, 0x89, 0x5d, 0x1f, 0xf2, 0x4c, 0xf1, 0x56, }}, /* Byte value: 0x4c */ + {{0xbf, 0xa9, 0xa6, 0x3a, 0xec, 0x05, 0x27, 0xa1, }}, /* Byte value: 0x4d */ + {{0xc6, 0x5c, 0xc0, 0x6d, 0xa6, 0x74, 0xba, 0x3d, }}, /* Byte value: 0x4e */ + {{0x72, 0x31, 0x1e, 0xc5, 0x7d, 0xa4, 0x46, 0x2c, }}, /* Byte value: 0x4f */ + {{0xdb, 0xd3, 0x48, 0x18, 0xff, 0xc8, 0x14, 0x2e, }}, /* Byte value: 0x50 */ + {{0x15, 0x6f, 0x2c, 0x8e, 0x03, 0x80, 0xc9, 0x93, }}, /* Byte value: 0x51 */ + {{0x99, 0xe7, 0x08, 0x82, 0x9d, 0xe4, 0xc3, 0x84, }}, /* Byte value: 0x52 */ + {{0x4b, 0xc8, 0x11, 0x46, 0xa2, 0xf6, 0x65, 0x3a, }}, /* Byte value: 0x53 */ + {{0x34, 0x75, 0x0c, 0xc3, 0x32, 0x96, 0x43, 0xc6, }}, /* Byte value: 0x54 */ + {{0x60, 0x0a, 0xbc, 0xbe, 0x3e, 0xd3, 0xe1, 0xcf, }}, /* Byte value: 0x55 */ + {{0x92, 0x23, 0x70, 0x10, 0xaa, 0x31, 0x18, 0x34, }}, /* Byte value: 0x56 */ + {{0xac, 0x8e, 0xf1, 0x66, 0x35, 0x94, 0x55, 0x52, }}, /* Byte value: 0x57 */ + {{0x6e, 0xa2, 0x63, 0x97, 0xbe, 0xfe, 0x3d, 0x2f, }}, /* Byte value: 0x58 */ + {{0xa1, 0x02, 0xf2, 0x26, 0xd8, 0x50, 0x35, 0x82, }}, /* Byte value: 0x59 */ + {{0x81, 0x04, 0x27, 0x4c, 0x73, 0xa0, 0x6a, 0xc7, }}, /* Byte value: 0x5a */ + {{0x3b, 0xc1, 0x26, 0xcd, 0x28, 0x5d, 0x4a, 0x36, }}, /* Byte value: 0x5b */ + {{0x19, 0xff, 0xda, 0xe9, 0x74, 0xa2, 0x7c, 0x53, }}, /* Byte value: 0x5c */ + {{0xe4, 0x62, 0x3c, 0x49, 0xfa, 0x8b, 0x8c, 0x58, }}, /* Byte value: 0x5d */ + {{0x2c, 0x96, 0x23, 0x0d, 0xdc, 0xd2, 0xea, 0x85, }}, /* Byte value: 0x5e */ + {{0xbd, 0x91, 0x8f, 0x74, 0x1b, 0x0a, 0x4e, 0x81, }}, /* Byte value: 0x5f */ + {{0xb6, 0x55, 0xf7, 0xe6, 0x2c, 0xdf, 0x95, 0x31, }}, /* Byte value: 0x60 */ + {{0xd3, 0x33, 0xec, 0xe3, 0xa5, 0xf4, 0x73, 0xae, }}, /* Byte value: 0x61 */ + {{0xe7, 0x46, 0xe0, 0x20, 0x97, 0x62, 0x30, 0x68, }}, /* Byte value: 0x62 */ + {{0x9b, 0xdf, 0x21, 0xcc, 0x6a, 0xeb, 0xaa, 0xa4, }}, /* Byte value: 0x63 */ + {{0x8c, 0x88, 0x24, 0x0c, 0x9e, 0x64, 0x0a, 0x17, }}, /* Byte value: 0x64 */ + {{0x04, 0x70, 0x52, 0x9c, 0x2d, 0x1e, 0xd2, 0x40, }}, /* Byte value: 0x65 */ + {{0x86, 0x50, 0xa9, 0xb9, 0x33, 0x57, 0x04, 0xb7, }}, /* Byte value: 0x66 */ + {{0xef, 0xa6, 0x44, 0xdb, 0xcd, 0x5e, 0x57, 0xe8, }}, /* Byte value: 0x67 */ + {{0x32, 0x3d, 0x77, 0x11, 0xe8, 0x87, 0xf8, 0xa6, }}, /* Byte value: 0x68 */ + {{0x0b, 0xc4, 0x78, 0x92, 0x37, 0xd5, 0xdb, 0xb0, }}, /* Byte value: 0x69 */ + {{0x9e, 0xb3, 0x86, 0x77, 0xdd, 0x13, 0xad, 0xf4, }}, /* Byte value: 0x6a */ + {{0x80, 0x18, 0xd2, 0x6b, 0xe9, 0x46, 0xbf, 0xd7, }}, /* Byte value: 0x6b */ + {{0x1c, 0x93, 0x7d, 0x52, 0xc3, 0x5a, 0x7b, 0x03, }}, /* Byte value: 0x6c */ + {{0xb1, 0x01, 0x79, 0x13, 0x6c, 0x28, 0xfb, 0x41, }}, /* Byte value: 0x6d */ + {{0xd4, 0x67, 0x62, 0x16, 0xe5, 0x03, 0x1d, 0xde, }}, /* Byte value: 0x6e */ + {{0x7a, 0xd1, 0xba, 0x3e, 0x27, 0x98, 0x21, 0xac, }}, /* Byte value: 0x6f */ + {{0x5b, 0xcb, 0x9a, 0x73, 0x16, 0x8e, 0xab, 0xf9, }}, /* Byte value: 0x70 */ + {{0xa3, 0x3a, 0xdb, 0x68, 0x2f, 0x5f, 0x5c, 0xa2, }}, /* Byte value: 0x71 */ + {{0xf9, 0xed, 0xb4, 0x3c, 0xa3, 0x37, 0x22, 0x4b, }}, /* Byte value: 0x72 */ + {{0x33, 0x21, 0x82, 0x36, 0x72, 0x61, 0x2d, 0xb6, }}, /* Byte value: 0x73 */ + {{0x68, 0xea, 0x18, 0x45, 0x64, 0xef, 0x86, 0x4f, }}, /* Byte value: 0x74 */ + {{0x96, 0x53, 0x22, 0x8c, 0x87, 0x2f, 0xca, 0x74, }}, /* Byte value: 0x75 */ + {{0x46, 0x44, 0x12, 0x06, 0x4f, 0x32, 0x05, 0xea, }}, /* Byte value: 0x76 */ + {{0x02, 0x38, 0x29, 0x4e, 0xf7, 0x0f, 0x69, 0x20, }}, /* Byte value: 0x77 */ + {{0xff, 0xa5, 0xcf, 0xee, 0x79, 0x26, 0x99, 0x2b, }}, /* Byte value: 0x78 */ + {{0x95, 0x77, 0xfe, 0xe5, 0xea, 0xc6, 0x76, 0x44, }}, /* Byte value: 0x79 */ + {{0x64, 0x7a, 0xee, 0x22, 0x13, 0xcd, 0x33, 0x8f, }}, /* Byte value: 0x7a */ + {{0x40, 0x0c, 0x69, 0xd4, 0x95, 0x23, 0xbe, 0x8a, }}, /* Byte value: 0x7b */ + {{0x41, 0x10, 0x9c, 0xf3, 0x0f, 0xc5, 0x6b, 0x9a, }}, /* Byte value: 0x7c */ + {{0x16, 0x4b, 0xf0, 0xe7, 0x6e, 0x69, 0x75, 0xa3, }}, /* Byte value: 0x7d */ + {{0x0e, 0xa8, 0xdf, 0x29, 0x80, 0x2d, 0xdc, 0xe0, }}, /* Byte value: 0x7e */ + {{0xb9, 0xe1, 0xdd, 0xe8, 0x36, 0x14, 0x9c, 0xc1, }}, /* Byte value: 0x7f */ + {{0xfd, 0x9d, 0xe6, 0xa0, 0x8e, 0x29, 0xf0, 0x0b, }}, /* Byte value: 0x80 */ + {{0x6f, 0xbe, 0x96, 0xb0, 0x24, 0x18, 0xe8, 0x3f, }}, /* Byte value: 0x81 */ + {{0x91, 0x07, 0xac, 0x79, 0xc7, 0xd8, 0xa4, 0x04, }}, /* Byte value: 0x82 */ + {{0xa5, 0x72, 0xa0, 0xba, 0xf5, 0x4e, 0xe7, 0xc2, }}, /* Byte value: 0x83 */ + {{0xcf, 0xa0, 0x91, 0xb1, 0x66, 0xae, 0x08, 0xad, }}, /* Byte value: 0x84 */ + {{0x56, 0x47, 0x99, 0x33, 0xfb, 0x4a, 0xcb, 0x29, }}, /* Byte value: 0x85 */ + {{0xba, 0xc5, 0x01, 0x81, 0x5b, 0xfd, 0x20, 0xf1, }}, /* Byte value: 0x86 */ + {{0x61, 0x16, 0x49, 0x99, 0xa4, 0x35, 0x34, 0xdf, }}, /* Byte value: 0x87 */ + {{0x18, 0xe3, 0x2f, 0xce, 0xee, 0x44, 0xa9, 0x43, }}, /* Byte value: 0x88 */ + {{0x54, 0x7f, 0xb0, 0x7d, 0x0c, 0x45, 0xa2, 0x09, }}, /* Byte value: 0x89 */ + {{0x8b, 0xdc, 0xaa, 0xf9, 0xde, 0x93, 0x64, 0x67, }}, /* Byte value: 0x8a */ + {{0x3e, 0xad, 0x81, 0x76, 0x9f, 0xa5, 0x4d, 0x66, }}, /* Byte value: 0x8b */ + {{0x5a, 0xd7, 0x6f, 0x54, 0x8c, 0x68, 0x7e, 0xe9, }}, /* Byte value: 0x8c */ + {{0xce, 0xbc, 0x64, 0x96, 0xfc, 0x48, 0xdd, 0xbd, }}, /* Byte value: 0x8d */ + {{0xf7, 0x45, 0x6b, 0x15, 0x23, 0x1a, 0xfe, 0xab, }}, /* Byte value: 0x8e */ + {{0xd2, 0x2f, 0x19, 0xc4, 0x3f, 0x12, 0xa6, 0xbe, }}, /* Byte value: 0x8f */ + {{0x82, 0x20, 0xfb, 0x25, 0x1e, 0x49, 0xd6, 0xf7, }}, /* Byte value: 0x90 */ + {{0xb3, 0x39, 0x50, 0x5d, 0x9b, 0x27, 0x92, 0x61, }}, /* Byte value: 0x91 */ + {{0xb4, 0x6d, 0xde, 0xa8, 0xdb, 0xd0, 0xfc, 0x11, }}, /* Byte value: 0x92 */ + {{0xd6, 0x5f, 0x4b, 0x58, 0x12, 0x0c, 0x74, 0xfe, }}, /* Byte value: 0x93 */ + {{0xe1, 0x0e, 0x9b, 0xf2, 0x4d, 0x73, 0x8b, 0x08, }}, /* Byte value: 0x94 */ + {{0xc2, 0x2c, 0x92, 0xf1, 0x8b, 0x6a, 0x68, 0x7d, }}, /* Byte value: 0x95 */ + {{0x5d, 0x83, 0xe1, 0xa1, 0xcc, 0x9f, 0x10, 0x99, }}, /* Byte value: 0x96 */ + {{0xfa, 0xc9, 0x68, 0x55, 0xce, 0xde, 0x9e, 0x7b, }}, /* Byte value: 0x97 */ + {{0xa4, 0x6e, 0x55, 0x9d, 0x6f, 0xa8, 0x32, 0xd2, }}, /* Byte value: 0x98 */ + {{0x1f, 0xb7, 0xa1, 0x3b, 0xae, 0xb3, 0xc7, 0x33, }}, /* Byte value: 0x99 */ + {{0x0c, 0x90, 0xf6, 0x67, 0x77, 0x22, 0xb5, 0xc0, }}, /* Byte value: 0x9a */ + {{0x01, 0x1c, 0xf5, 0x27, 0x9a, 0xe6, 0xd5, 0x10, }}, /* Byte value: 0x9b */ + {{0x2d, 0x8a, 0xd6, 0x2a, 0x46, 0x34, 0x3f, 0x95, }}, /* Byte value: 0x9c */ + {{0x67, 0x5e, 0x32, 0x4b, 0x7e, 0x24, 0x8f, 0xbf, }}, /* Byte value: 0x9d */ + {{0xe2, 0x2a, 0x47, 0x9b, 0x20, 0x9a, 0x37, 0x38, }}, /* Byte value: 0x9e */ + {{0x09, 0xfc, 0x51, 0xdc, 0xc0, 0xda, 0xb2, 0x90, }}, /* Byte value: 0x9f */ + {{0x57, 0x5b, 0x6c, 0x14, 0x61, 0xac, 0x1e, 0x39, }}, /* Byte value: 0xa0 */ + {{0x11, 0x1f, 0x7e, 0x12, 0x2e, 0x9e, 0x1b, 0xd3, }}, /* Byte value: 0xa1 */ + {{0xb7, 0x49, 0x02, 0xc1, 0xb6, 0x39, 0x40, 0x21, }}, /* Byte value: 0xa2 */ + {{0xdf, 0xa3, 0x1a, 0x84, 0xd2, 0xd6, 0xc6, 0x6e, }}, /* Byte value: 0xa3 */ + {{0x6a, 0xd2, 0x31, 0x0b, 0x93, 0xe0, 0xef, 0x6f, }}, /* Byte value: 0xa4 */ + {{0x93, 0x3f, 0x85, 0x37, 0x30, 0xd7, 0xcd, 0x24, }}, /* Byte value: 0xa5 */ + {{0x24, 0x76, 0x87, 0xf6, 0x86, 0xee, 0x8d, 0x05, }}, /* Byte value: 0xa6 */ + {{0x7f, 0xbd, 0x1d, 0x85, 0x90, 0x60, 0x26, 0xfc, }}, /* Byte value: 0xa7 */ + {{0x66, 0x42, 0xc7, 0x6c, 0xe4, 0xc2, 0x5a, 0xaf, }}, /* Byte value: 0xa8 */ + {{0xfe, 0xb9, 0x3a, 0xc9, 0xe3, 0xc0, 0x4c, 0x3b, }}, /* Byte value: 0xa9 */ + {{0x07, 0x54, 0x8e, 0xf5, 0x40, 0xf7, 0x6e, 0x70, }}, /* Byte value: 0xaa */ + {{0x44, 0x7c, 0x3b, 0x48, 0xb8, 0x3d, 0x6c, 0xca, }}, /* Byte value: 0xab */ + {{0x3f, 0xb1, 0x74, 0x51, 0x05, 0x43, 0x98, 0x76, }}, /* Byte value: 0xac */ + {{0xf8, 0xf1, 0x41, 0x1b, 0x39, 0xd1, 0xf7, 0x5b, }}, /* Byte value: 0xad */ + {{0x06, 0x48, 0x7b, 0xd2, 0xda, 0x11, 0xbb, 0x60, }}, /* Byte value: 0xae */ + {{0xca, 0xcc, 0x36, 0x0a, 0xd1, 0x56, 0x0f, 0xfd, }}, /* Byte value: 0xaf */ + {{0xad, 0x92, 0x04, 0x41, 0xaf, 0x72, 0x80, 0x42, }}, /* Byte value: 0xb0 */ + {{0x2b, 0xc2, 0xad, 0xf8, 0x9c, 0x25, 0x84, 0xf5, }}, /* Byte value: 0xb1 */ + {{0xae, 0xb6, 0xd8, 0x28, 0xc2, 0x9b, 0x3c, 0x72, }}, /* Byte value: 0xb2 */ + {{0x22, 0x3e, 0xfc, 0x24, 0x5c, 0xff, 0x36, 0x65, }}, /* Byte value: 0xb3 */ + {{0x39, 0xf9, 0x0f, 0x83, 0xdf, 0x52, 0x23, 0x16, }}, /* Byte value: 0xb4 */ + {{0xde, 0xbf, 0xef, 0xa3, 0x48, 0x30, 0x13, 0x7e, }}, /* Byte value: 0xb5 */ + {{0x1e, 0xab, 0x54, 0x1c, 0x34, 0x55, 0x12, 0x23, }}, /* Byte value: 0xb6 */ + {{0xa8, 0xfe, 0xa3, 0xfa, 0x18, 0x8a, 0x87, 0x12, }}, /* Byte value: 0xb7 */ + {{0x58, 0xef, 0x46, 0x1a, 0x7b, 0x67, 0x17, 0xc9, }}, /* Byte value: 0xb8 */ + {{0x88, 0xf8, 0x76, 0x90, 0xb3, 0x7a, 0xd8, 0x57, }}, /* Byte value: 0xb9 */ + {{0x9a, 0xc3, 0xd4, 0xeb, 0xf0, 0x0d, 0x7f, 0xb4, }}, /* Byte value: 0xba */ + {{0x69, 0xf6, 0xed, 0x62, 0xfe, 0x09, 0x53, 0x5f, }}, /* Byte value: 0xbb */ + {{0x28, 0xe6, 0x71, 0x91, 0xf1, 0xcc, 0x38, 0xc5, }}, /* Byte value: 0xbc */ + {{0x65, 0x66, 0x1b, 0x05, 0x89, 0x2b, 0xe6, 0x9f, }}, /* Byte value: 0xbd */ + {{0xd5, 0x7b, 0x97, 0x31, 0x7f, 0xe5, 0xc8, 0xce, }}, /* Byte value: 0xbe */ + {{0x7c, 0x99, 0xc1, 0xec, 0xfd, 0x89, 0x9a, 0xcc, }}, /* Byte value: 0xbf */ + {{0xbc, 0x8d, 0x7a, 0x53, 0x81, 0xec, 0x9b, 0x91, }}, /* Byte value: 0xc0 */ + {{0x38, 0xe5, 0xfa, 0xa4, 0x45, 0xb4, 0xf6, 0x06, }}, /* Byte value: 0xc1 */ + {{0x4f, 0xb8, 0x43, 0xda, 0x8f, 0xe8, 0xb7, 0x7a, }}, /* Byte value: 0xc2 */ + {{0xe0, 0x12, 0x6e, 0xd5, 0xd7, 0x95, 0x5e, 0x18, }}, /* Byte value: 0xc3 */ + {{0x27, 0x52, 0x5b, 0x9f, 0xeb, 0x07, 0x31, 0x35, }}, /* Byte value: 0xc4 */ + {{0x76, 0x41, 0x4c, 0x59, 0x50, 0xba, 0x94, 0x6c, }}, /* Byte value: 0xc5 */ + {{0x78, 0xe9, 0x93, 0x70, 0xd0, 0x97, 0x48, 0x8c, }}, /* Byte value: 0xc6 */ + {{0x89, 0xe4, 0x83, 0xb7, 0x29, 0x9c, 0x0d, 0x47, }}, /* Byte value: 0xc7 */ + {{0x8d, 0x94, 0xd1, 0x2b, 0x04, 0x82, 0xdf, 0x07, }}, /* Byte value: 0xc8 */ + {{0xaf, 0xaa, 0x2d, 0x0f, 0x58, 0x7d, 0xe9, 0x62, }}, /* Byte value: 0xc9 */ + {{0x9f, 0xaf, 0x73, 0x50, 0x47, 0xf5, 0x78, 0xe4, }}, /* Byte value: 0xca */ + {{0x84, 0x68, 0x80, 0xf7, 0xc4, 0x58, 0x6d, 0x97, }}, /* Byte value: 0xcb */ + {{0xe6, 0x5a, 0x15, 0x07, 0x0d, 0x84, 0xe5, 0x78, }}, /* Byte value: 0xcc */ + {{0xf1, 0x0d, 0x10, 0xc7, 0xf9, 0x0b, 0x45, 0xcb, }}, /* Byte value: 0xcd */ + {{0x63, 0x2e, 0x60, 0xd7, 0x53, 0x3a, 0x5d, 0xff, }}, /* Byte value: 0xce */ + {{0x51, 0x13, 0x17, 0xc6, 0xbb, 0xbd, 0xa5, 0x59, }}, /* Byte value: 0xcf */ + {{0xc8, 0xf4, 0x1f, 0x44, 0x26, 0x59, 0x66, 0xdd, }}, /* Byte value: 0xd0 */ + {{0x03, 0x24, 0xdc, 0x69, 0x6d, 0xe9, 0xbc, 0x30, }}, /* Byte value: 0xd1 */ + {{0xed, 0x9e, 0x6d, 0x95, 0x3a, 0x51, 0x3e, 0xc8, }}, /* Byte value: 0xd2 */ + {{0x70, 0x09, 0x37, 0x8b, 0x8a, 0xab, 0x2f, 0x0c, }}, /* Byte value: 0xd3 */ + {{0x3c, 0x95, 0xa8, 0x38, 0x68, 0xaa, 0x24, 0x46, }}, /* Byte value: 0xd4 */ + {{0x8e, 0xb0, 0x0d, 0x42, 0x69, 0x6b, 0x63, 0x37, }}, /* Byte value: 0xd5 */ + {{0xd9, 0xeb, 0x61, 0x56, 0x08, 0xc7, 0x7d, 0x0e, }}, /* Byte value: 0xd6 */ + {{0x10, 0x03, 0x8b, 0x35, 0xb4, 0x78, 0xce, 0xc3, }}, /* Byte value: 0xd7 */ + {{0x1a, 0xdb, 0x06, 0x80, 0x19, 0x4b, 0xc0, 0x63, }}, /* Byte value: 0xd8 */ + {{0x9d, 0x97, 0x5a, 0x1e, 0xb0, 0xfa, 0x11, 0xc4, }}, /* Byte value: 0xd9 */ + {{0xee, 0xba, 0xb1, 0xfc, 0x57, 0xb8, 0x82, 0xf8, }}, /* Byte value: 0xda */ + {{0xcb, 0xd0, 0xc3, 0x2d, 0x4b, 0xb0, 0xda, 0xed, }}, /* Byte value: 0xdb */ + {{0x97, 0x4f, 0xd7, 0xab, 0x1d, 0xc9, 0x1f, 0x64, }}, /* Byte value: 0xdc */ + {{0xc9, 0xe8, 0xea, 0x63, 0xbc, 0xbf, 0xb3, 0xcd, }}, /* Byte value: 0xdd */ + {{0x79, 0xf5, 0x66, 0x57, 0x4a, 0x71, 0x9d, 0x9c, }}, /* Byte value: 0xde */ + {{0xb2, 0x25, 0xa5, 0x7a, 0x01, 0xc1, 0x47, 0x71, }}, /* Byte value: 0xdf */ + {{0x35, 0x69, 0xf9, 0xe4, 0xa8, 0x70, 0x96, 0xd6, }}, /* Byte value: 0xe0 */ + {{0x6c, 0x9a, 0x4a, 0xd9, 0x49, 0xf1, 0x54, 0x0f, }}, /* Byte value: 0xe1 */ + {{0x9c, 0x8b, 0xaf, 0x39, 0x2a, 0x1c, 0xc4, 0xd4, }}, /* Byte value: 0xe2 */ + {{0x1b, 0xc7, 0xf3, 0xa7, 0x83, 0xad, 0x15, 0x73, }}, /* Byte value: 0xe3 */ + {{0x05, 0x6c, 0xa7, 0xbb, 0xb7, 0xf8, 0x07, 0x50, }}, /* Byte value: 0xe4 */ + {{0x50, 0x0f, 0xe2, 0xe1, 0x21, 0x5b, 0x70, 0x49, }}, /* Byte value: 0xe5 */ + {{0xf0, 0x11, 0xe5, 0xe0, 0x63, 0xed, 0x90, 0xdb, }}, /* Byte value: 0xe6 */ + {{0xd1, 0x0b, 0xc5, 0xad, 0x52, 0xfb, 0x1a, 0x8e, }}, /* Byte value: 0xe7 */ + {{0x12, 0x3b, 0xa2, 0x7b, 0x43, 0x77, 0xa7, 0xe3, }}, /* Byte value: 0xe8 */ + {{0x87, 0x4c, 0x5c, 0x9e, 0xa9, 0xb1, 0xd1, 0xa7, }}, /* Byte value: 0xe9 */ + {{0x08, 0xe0, 0xa4, 0xfb, 0x5a, 0x3c, 0x67, 0x80, }}, /* Byte value: 0xea */ + {{0x59, 0xf3, 0xb3, 0x3d, 0xe1, 0x81, 0xc2, 0xd9, }}, /* Byte value: 0xeb */ + {{0xfc, 0x81, 0x13, 0x87, 0x14, 0xcf, 0x25, 0x1b, }}, /* Byte value: 0xec */ + {{0x21, 0x1a, 0x20, 0x4d, 0x31, 0x16, 0x8a, 0x55, }}, /* Byte value: 0xed */ + {{0x85, 0x74, 0x75, 0xd0, 0x5e, 0xbe, 0xb8, 0x87, }}, /* Byte value: 0xee */ + {{0x55, 0x63, 0x45, 0x5a, 0x96, 0xa3, 0x77, 0x19, }}, /* Byte value: 0xef */ + {{0x4e, 0xa4, 0xb6, 0xfd, 0x15, 0x0e, 0x62, 0x6a, }}, /* Byte value: 0xf0 */ + {{0xec, 0x82, 0x98, 0xb2, 0xa0, 0xb7, 0xeb, 0xd8, }}, /* Byte value: 0xf1 */ + {{0xfb, 0xd5, 0x9d, 0x72, 0x54, 0x38, 0x4b, 0x6b, }}, /* Byte value: 0xf2 */ + {{0x36, 0x4d, 0x25, 0x8d, 0xc5, 0x99, 0x2a, 0xe6, }}, /* Byte value: 0xf3 */ + {{0x75, 0x65, 0x90, 0x30, 0x3d, 0x53, 0x28, 0x5c, }}, /* Byte value: 0xf4 */ + {{0x37, 0x51, 0xd0, 0xaa, 0x5f, 0x7f, 0xff, 0xf6, }}, /* Byte value: 0xf5 */ + {{0x5c, 0x9f, 0x14, 0x86, 0x56, 0x79, 0xc5, 0x89, }}, /* Byte value: 0xf6 */ + {{0xf6, 0x59, 0x9e, 0x32, 0xb9, 0xfc, 0x2b, 0xbb, }}, /* Byte value: 0xf7 */ + {{0xf4, 0x61, 0xb7, 0x7c, 0x4e, 0xf3, 0x42, 0x9b, }}, /* Byte value: 0xf8 */ + {{0xcd, 0x98, 0xb8, 0xff, 0x91, 0xa1, 0x61, 0x8d, }}, /* Byte value: 0xf9 */ + {{0x6b, 0xce, 0xc4, 0x2c, 0x09, 0x06, 0x3a, 0x7f, }}, /* Byte value: 0xfa */ + {{0xa2, 0x26, 0x2e, 0x4f, 0xb5, 0xb9, 0x89, 0xb2, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xaa, 0xc6, 0x8a, 0xb4, 0xef, 0x85, 0xee, 0x32, }}, /* Byte value: 0xfd */ + {{0x71, 0x15, 0xc2, 0xac, 0x10, 0x4d, 0xfa, 0x1c, }}, /* Byte value: 0xfe */ + {{0x42, 0x34, 0x40, 0x9a, 0x62, 0x2c, 0xd7, 0xaa, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 14 */ + {{0x47, 0x52, 0xd9, 0xd2, 0x69, 0x81, 0x42, 0x4a, }}, /* Byte value: 0x00 */ + {{0xe9, 0xdb, 0x31, 0x5c, 0x2e, 0xdf, 0x12, 0x97, }}, /* Byte value: 0x01 */ + {{0x8f, 0x26, 0xbe, 0x4a, 0x25, 0x12, 0xca, 0xbc, }}, /* Byte value: 0x02 */ + {{0x4e, 0x4a, 0xa1, 0x54, 0x2a, 0x05, 0x39, 0xe1, }}, /* Byte value: 0x03 */ + {{0x03, 0x45, 0x92, 0x77, 0xda, 0xb6, 0xd2, 0x78, }}, /* Byte value: 0x04 */ + {{0xcf, 0x7c, 0x4f, 0x5b, 0xcc, 0xef, 0xa1, 0x2e, }}, /* Byte value: 0x05 */ + {{0x0c, 0xd7, 0x0d, 0x1f, 0xee, 0x9d, 0xce, 0x23, }}, /* Byte value: 0x06 */ + {{0xba, 0x33, 0xff, 0xaf, 0xb6, 0x3a, 0xc1, 0xb8, }}, /* Byte value: 0x07 */ + {{0x12, 0x30, 0xf0, 0xcf, 0x86, 0xcb, 0xf6, 0x95, }}, /* Byte value: 0x08 */ + {{0xf0, 0x34, 0xe4, 0x4f, 0xc6, 0xf5, 0x03, 0xf9, }}, /* Byte value: 0x09 */ + {{0x2b, 0xf2, 0xbc, 0x35, 0xfb, 0x7e, 0x33, 0xb2, }}, /* Byte value: 0x0a */ + {{0x2c, 0xfa, 0x94, 0xf6, 0x7b, 0x02, 0x1a, 0x6a, }}, /* Byte value: 0x0b */ + {{0x32, 0x1d, 0x69, 0x26, 0x13, 0x54, 0x22, 0xdc, }}, /* Byte value: 0x0c */ + {{0x1b, 0x28, 0x88, 0x49, 0xc5, 0x4f, 0x8d, 0x3e, }}, /* Byte value: 0x0d */ + {{0xd2, 0xde, 0x20, 0xfc, 0x7e, 0x0f, 0x4b, 0xe0, }}, /* Byte value: 0x0e */ + {{0x08, 0x9a, 0xb7, 0xab, 0xb4, 0x57, 0x35, 0x83, }}, /* Byte value: 0x0f */ + {{0xdd, 0x4c, 0xbf, 0x94, 0x4a, 0x24, 0x57, 0xbb, }}, /* Byte value: 0x10 */ + {{0x60, 0x77, 0x68, 0xf8, 0x7c, 0x62, 0xbf, 0xdb, }}, /* Byte value: 0x11 */ + {{0x72, 0x47, 0x98, 0x37, 0xfa, 0xa9, 0x49, 0x4e, }}, /* Byte value: 0x12 */ + {{0x11, 0x75, 0x62, 0xb8, 0x5c, 0x7d, 0x24, 0xed, }}, /* Byte value: 0x13 */ + {{0x06, 0x8a, 0xe7, 0xee, 0x77, 0xaf, 0x67, 0xf0, }}, /* Byte value: 0x14 */ + {{0x5d, 0xf8, 0x9e, 0xb6, 0x5b, 0x1d, 0x81, 0x5c, }}, /* Byte value: 0x15 */ + {{0xe0, 0xc3, 0x49, 0xda, 0x6d, 0x5b, 0x69, 0x3c, }}, /* Byte value: 0x16 */ + {{0x86, 0x3e, 0xc6, 0xcc, 0x66, 0x96, 0xb1, 0x17, }}, /* Byte value: 0x17 */ + {{0xaa, 0xc4, 0x52, 0x3a, 0x1d, 0x94, 0xab, 0x7d, }}, /* Byte value: 0x18 */ + {{0x58, 0x37, 0xeb, 0x2f, 0xf6, 0x04, 0x34, 0xd4, }}, /* Byte value: 0x19 */ + {{0x24, 0x60, 0x23, 0x5d, 0xcf, 0x55, 0x2f, 0xe9, }}, /* Byte value: 0x1a */ + {{0xdf, 0x8b, 0xe2, 0xce, 0x67, 0x41, 0xcb, 0xeb, }}, /* Byte value: 0x1b */ + {{0x69, 0x6f, 0x10, 0x7e, 0x3f, 0xe6, 0xc4, 0x70, }}, /* Byte value: 0x1c */ + {{0x7a, 0xdd, 0x2f, 0x9c, 0x4e, 0xfe, 0x7c, 0xcd, }}, /* Byte value: 0x1d */ + {{0x67, 0x7f, 0x40, 0x3b, 0xfc, 0x1e, 0x96, 0x03, }}, /* Byte value: 0x1e */ + {{0xec, 0x14, 0x44, 0xc5, 0x83, 0xc6, 0xa7, 0x1f, }}, /* Byte value: 0x1f */ + {{0x30, 0xda, 0x34, 0x7c, 0x3e, 0x31, 0xbe, 0x8c, }}, /* Byte value: 0x20 */ + {{0x6a, 0x2a, 0x82, 0x09, 0xe5, 0x50, 0x16, 0x08, }}, /* Byte value: 0x21 */ + {{0x0e, 0x10, 0x50, 0x45, 0xc3, 0xf8, 0x52, 0x73, }}, /* Byte value: 0x22 */ + {{0x43, 0x1f, 0x63, 0x66, 0x33, 0x4b, 0xb9, 0xea, }}, /* Byte value: 0x23 */ + {{0x2d, 0x78, 0x5b, 0xdb, 0x8c, 0xd1, 0x54, 0x42, }}, /* Byte value: 0x24 */ + {{0xb3, 0x2b, 0x87, 0x29, 0xf5, 0xbe, 0xba, 0x13, }}, /* Byte value: 0x25 */ + {{0xe4, 0x8e, 0xf3, 0x6e, 0x37, 0x91, 0x92, 0x9c, }}, /* Byte value: 0x26 */ + {{0x22, 0xea, 0xc4, 0xb3, 0xb8, 0xfa, 0x48, 0x19, }}, /* Byte value: 0x27 */ + {{0xab, 0x46, 0x9d, 0x17, 0xea, 0x47, 0xe5, 0x55, }}, /* Byte value: 0x28 */ + {{0x3d, 0x8f, 0xf6, 0x4e, 0x27, 0x7f, 0x3e, 0x87, }}, /* Byte value: 0x29 */ + {{0x34, 0x97, 0x8e, 0xc8, 0x64, 0xfb, 0x45, 0x2c, }}, /* Byte value: 0x2a */ + {{0x90, 0x43, 0x8c, 0xb7, 0xba, 0x97, 0xbc, 0x22, }}, /* Byte value: 0x2b */ + {{0x97, 0x4b, 0xa4, 0x74, 0x3a, 0xeb, 0x95, 0xfa, }}, /* Byte value: 0x2c */ + {{0xb0, 0x6e, 0x15, 0x5e, 0x2f, 0x08, 0x68, 0x6b, }}, /* Byte value: 0x2d */ + {{0xe5, 0x0c, 0x3c, 0x43, 0xc0, 0x42, 0xdc, 0xb4, }}, /* Byte value: 0x2e */ + {{0x42, 0x9d, 0xac, 0x4b, 0xc4, 0x98, 0xf7, 0xc2, }}, /* Byte value: 0x2f */ + {{0x79, 0x98, 0xbd, 0xeb, 0x94, 0x48, 0xae, 0xb5, }}, /* Byte value: 0x30 */ + {{0xc0, 0xee, 0xd0, 0x33, 0xf8, 0xc4, 0xbd, 0x75, }}, /* Byte value: 0x31 */ + {{0x18, 0x6d, 0x1a, 0x3e, 0x1f, 0xf9, 0x5f, 0x46, }}, /* Byte value: 0x32 */ + {{0x4b, 0x85, 0xd4, 0xcd, 0x87, 0x1c, 0x8c, 0x69, }}, /* Byte value: 0x33 */ + {{0xf7, 0x3c, 0xcc, 0x8c, 0x46, 0x89, 0x2a, 0x21, }}, /* Byte value: 0x34 */ + {{0xb8, 0xf4, 0xa2, 0xf5, 0x9b, 0x5f, 0x5d, 0xe8, }}, /* Byte value: 0x35 */ + {{0xa6, 0x13, 0x5f, 0x25, 0xf3, 0x09, 0x65, 0x5e, }}, /* Byte value: 0x36 */ + {{0x59, 0xb5, 0x24, 0x02, 0x01, 0xd7, 0x7a, 0xfc, }}, /* Byte value: 0x37 */ + {{0x64, 0x3a, 0xd2, 0x4c, 0x26, 0xa8, 0x44, 0x7b, }}, /* Byte value: 0x38 */ + {{0x36, 0x50, 0xd3, 0x92, 0x49, 0x9e, 0xd9, 0x7c, }}, /* Byte value: 0x39 */ + {{0xb4, 0x23, 0xaf, 0xea, 0x75, 0xc2, 0x93, 0xcb, }}, /* Byte value: 0x3a */ + {{0x81, 0x36, 0xee, 0x0f, 0xe6, 0xea, 0x98, 0xcf, }}, /* Byte value: 0x3b */ + {{0x09, 0x18, 0x78, 0x86, 0x43, 0x84, 0x7b, 0xab, }}, /* Byte value: 0x3c */ + {{0x78, 0x1a, 0x72, 0xc6, 0x63, 0x9b, 0xe0, 0x9d, }}, /* Byte value: 0x3d */ + {{0xed, 0x96, 0x8b, 0xe8, 0x74, 0x15, 0xe9, 0x37, }}, /* Byte value: 0x3e */ + {{0x5f, 0x3f, 0xc3, 0xec, 0x76, 0x78, 0x1d, 0x0c, }}, /* Byte value: 0x3f */ + {{0xda, 0x44, 0x97, 0x57, 0xca, 0x58, 0x7e, 0x63, }}, /* Byte value: 0x40 */ + {{0xc4, 0xa3, 0x6a, 0x87, 0xa2, 0x0e, 0x46, 0xd5, }}, /* Byte value: 0x41 */ + {{0x29, 0x35, 0xe1, 0x6f, 0xd6, 0x1b, 0xaf, 0xe2, }}, /* Byte value: 0x42 */ + {{0xad, 0xcc, 0x7a, 0xf9, 0x9d, 0xe8, 0x82, 0xa5, }}, /* Byte value: 0x43 */ + {{0x07, 0x08, 0x28, 0xc3, 0x80, 0x7c, 0x29, 0xd8, }}, /* Byte value: 0x44 */ + {{0x82, 0x73, 0x7c, 0x78, 0x3c, 0x5c, 0x4a, 0xb7, }}, /* Byte value: 0x45 */ + {{0xe2, 0x04, 0x14, 0x80, 0x40, 0x3e, 0xf5, 0x6c, }}, /* Byte value: 0x46 */ + {{0x31, 0x58, 0xfb, 0x51, 0xc9, 0xe2, 0xf0, 0xa4, }}, /* Byte value: 0x47 */ + {{0x17, 0xff, 0x85, 0x56, 0x2b, 0xd2, 0x43, 0x1d, }}, /* Byte value: 0x48 */ + {{0x9f, 0xd1, 0x13, 0xdf, 0x8e, 0xbc, 0xa0, 0x79, }}, /* Byte value: 0x49 */ + {{0x0b, 0xdf, 0x25, 0xdc, 0x6e, 0xe1, 0xe7, 0xfb, }}, /* Byte value: 0x4a */ + {{0x16, 0x7d, 0x4a, 0x7b, 0xdc, 0x01, 0x0d, 0x35, }}, /* Byte value: 0x4b */ + {{0x7f, 0x12, 0x5a, 0x05, 0xe3, 0xe7, 0xc9, 0x45, }}, /* Byte value: 0x4c */ + {{0x23, 0x68, 0x0b, 0x9e, 0x4f, 0x29, 0x06, 0x31, }}, /* Byte value: 0x4d */ + {{0x6b, 0xa8, 0x4d, 0x24, 0x12, 0x83, 0x58, 0x20, }}, /* Byte value: 0x4e */ + {{0xa9, 0x81, 0xc0, 0x4d, 0xc7, 0x22, 0x79, 0x05, }}, /* Byte value: 0x4f */ + {{0x8b, 0x6b, 0x04, 0xfe, 0x7f, 0xd8, 0x31, 0x1c, }}, /* Byte value: 0x50 */ + {{0xb7, 0x66, 0x3d, 0x9d, 0xaf, 0x74, 0x41, 0xb3, }}, /* Byte value: 0x51 */ + {{0x13, 0xb2, 0x3f, 0xe2, 0x71, 0x18, 0xb8, 0xbd, }}, /* Byte value: 0x52 */ + {{0x1c, 0x20, 0xa0, 0x8a, 0x45, 0x33, 0xa4, 0xe6, }}, /* Byte value: 0x53 */ + {{0xfb, 0xeb, 0xc1, 0x93, 0xa8, 0x14, 0xe4, 0x02, }}, /* Byte value: 0x54 */ + {{0x62, 0xb0, 0x35, 0xa2, 0x51, 0x07, 0x23, 0x8b, }}, /* Byte value: 0x55 */ + {{0xf2, 0xf3, 0xb9, 0x15, 0xeb, 0x90, 0x9f, 0xa9, }}, /* Byte value: 0x56 */ + {{0x3b, 0x05, 0x11, 0xa0, 0x50, 0xd0, 0x59, 0x77, }}, /* Byte value: 0x57 */ + {{0x9a, 0x1e, 0x66, 0x46, 0x23, 0xa5, 0x15, 0xf1, }}, /* Byte value: 0x58 */ + {{0x75, 0x4f, 0xb0, 0xf4, 0x7a, 0xd5, 0x60, 0x96, }}, /* Byte value: 0x59 */ + {{0xea, 0x9e, 0xa3, 0x2b, 0xf4, 0x69, 0xc0, 0xef, }}, /* Byte value: 0x5a */ + {{0xd0, 0x19, 0x7d, 0xa6, 0x53, 0x6a, 0xd7, 0xb0, }}, /* Byte value: 0x5b */ + {{0x2a, 0x70, 0x73, 0x18, 0x0c, 0xad, 0x7d, 0x9a, }}, /* Byte value: 0x5c */ + {{0x91, 0xc1, 0x43, 0x9a, 0x4d, 0x44, 0xf2, 0x0a, }}, /* Byte value: 0x5d */ + {{0x02, 0xc7, 0x5d, 0x5a, 0x2d, 0x65, 0x9c, 0x50, }}, /* Byte value: 0x5e */ + {{0x46, 0xd0, 0x16, 0xff, 0x9e, 0x52, 0x0c, 0x62, }}, /* Byte value: 0x5f */ + {{0xa7, 0x91, 0x90, 0x08, 0x04, 0xda, 0x2b, 0x76, }}, /* Byte value: 0x60 */ + {{0xdc, 0xce, 0x70, 0xb9, 0xbd, 0xf7, 0x19, 0x93, }}, /* Byte value: 0x61 */ + {{0x27, 0x25, 0xb1, 0x2a, 0x15, 0xe3, 0xfd, 0x91, }}, /* Byte value: 0x62 */ + {{0x76, 0x0a, 0x22, 0x83, 0xa0, 0x63, 0xb2, 0xee, }}, /* Byte value: 0x63 */ + {{0xa4, 0xd4, 0x02, 0x7f, 0xde, 0x6c, 0xf9, 0x0e, }}, /* Byte value: 0x64 */ + {{0xca, 0xb3, 0x3a, 0xc2, 0x61, 0xf6, 0x14, 0xa6, }}, /* Byte value: 0x65 */ + {{0x96, 0xc9, 0x6b, 0x59, 0xcd, 0x38, 0xdb, 0xd2, }}, /* Byte value: 0x66 */ + {{0x70, 0x80, 0xc5, 0x6d, 0xd7, 0xcc, 0xd5, 0x1e, }}, /* Byte value: 0x67 */ + {{0x54, 0xe0, 0xe6, 0x30, 0x18, 0x99, 0xfa, 0xf7, }}, /* Byte value: 0x68 */ + {{0xe1, 0x41, 0x86, 0xf7, 0x9a, 0x88, 0x27, 0x14, }}, /* Byte value: 0x69 */ + {{0x6f, 0xe5, 0xf7, 0x90, 0x48, 0x49, 0xa3, 0x80, }}, /* Byte value: 0x6a */ + {{0x39, 0xc2, 0x4c, 0xfa, 0x7d, 0xb5, 0xc5, 0x27, }}, /* Byte value: 0x6b */ + {{0x33, 0x9f, 0xa6, 0x0b, 0xe4, 0x87, 0x6c, 0xf4, }}, /* Byte value: 0x6c */ + {{0xdb, 0xc6, 0x58, 0x7a, 0x3d, 0x8b, 0x30, 0x4b, }}, /* Byte value: 0x6d */ + {{0xa0, 0x99, 0xb8, 0xcb, 0x84, 0xa6, 0x02, 0xae, }}, /* Byte value: 0x6e */ + {{0xfe, 0x24, 0xb4, 0x0a, 0x05, 0x0d, 0x51, 0x8a, }}, /* Byte value: 0x6f */ + {{0xb2, 0xa9, 0x48, 0x04, 0x02, 0x6d, 0xf4, 0x3b, }}, /* Byte value: 0x70 */ + {{0x10, 0xf7, 0xad, 0x95, 0xab, 0xae, 0x6a, 0xc5, }}, /* Byte value: 0x71 */ + {{0x71, 0x02, 0x0a, 0x40, 0x20, 0x1f, 0x9b, 0x36, }}, /* Byte value: 0x72 */ + {{0x87, 0xbc, 0x09, 0xe1, 0x91, 0x45, 0xff, 0x3f, }}, /* Byte value: 0x73 */ + {{0x35, 0x15, 0x41, 0xe5, 0x93, 0x28, 0x0b, 0x04, }}, /* Byte value: 0x74 */ + {{0x38, 0x40, 0x83, 0xd7, 0x8a, 0x66, 0x8b, 0x0f, }}, /* Byte value: 0x75 */ + {{0x52, 0x6a, 0x01, 0xde, 0x6f, 0x36, 0x9d, 0x07, }}, /* Byte value: 0x76 */ + {{0x65, 0xb8, 0x1d, 0x61, 0xd1, 0x7b, 0x0a, 0x53, }}, /* Byte value: 0x77 */ + {{0xde, 0x09, 0x2d, 0xe3, 0x90, 0x92, 0x85, 0xc3, }}, /* Byte value: 0x78 */ + {{0x8e, 0xa4, 0x71, 0x67, 0xd2, 0xc1, 0x84, 0x94, }}, /* Byte value: 0x79 */ + {{0xa8, 0x03, 0x0f, 0x60, 0x30, 0xf1, 0x37, 0x2d, }}, /* Byte value: 0x7a */ + {{0xfd, 0x61, 0x26, 0x7d, 0xdf, 0xbb, 0x83, 0xf2, }}, /* Byte value: 0x7b */ + {{0x2e, 0x3d, 0xc9, 0xac, 0x56, 0x67, 0x86, 0x3a, }}, /* Byte value: 0x7c */ + {{0x01, 0x82, 0xcf, 0x2d, 0xf7, 0xd3, 0x4e, 0x28, }}, /* Byte value: 0x7d */ + {{0xf8, 0xae, 0x53, 0xe4, 0x72, 0xa2, 0x36, 0x7a, }}, /* Byte value: 0x7e */ + {{0x8c, 0x63, 0x2c, 0x3d, 0xff, 0xa4, 0x18, 0xc4, }}, /* Byte value: 0x7f */ + {{0xbb, 0xb1, 0x30, 0x82, 0x41, 0xe9, 0x8f, 0x90, }}, /* Byte value: 0x80 */ + {{0x49, 0x42, 0x89, 0x97, 0xaa, 0x79, 0x10, 0x39, }}, /* Byte value: 0x81 */ + {{0x44, 0x17, 0x4b, 0xa5, 0xb3, 0x37, 0x90, 0x32, }}, /* Byte value: 0x82 */ + {{0xbf, 0xfc, 0x8a, 0x36, 0x1b, 0x23, 0x74, 0x30, }}, /* Byte value: 0x83 */ + {{0xef, 0x51, 0xd6, 0xb2, 0x59, 0x70, 0x75, 0x67, }}, /* Byte value: 0x84 */ + {{0xfc, 0xe3, 0xe9, 0x50, 0x28, 0x68, 0xcd, 0xda, }}, /* Byte value: 0x85 */ + {{0x3a, 0x87, 0xde, 0x8d, 0xa7, 0x03, 0x17, 0x5f, }}, /* Byte value: 0x86 */ + {{0xb1, 0xec, 0xda, 0x73, 0xd8, 0xdb, 0x26, 0x43, }}, /* Byte value: 0x87 */ + {{0xf9, 0x2c, 0x9c, 0xc9, 0x85, 0x71, 0x78, 0x52, }}, /* Byte value: 0x88 */ + {{0x99, 0x5b, 0xf4, 0x31, 0xf9, 0x13, 0xc7, 0x89, }}, /* Byte value: 0x89 */ + {{0xd8, 0x83, 0xca, 0x0d, 0xe7, 0x3d, 0xe2, 0x33, }}, /* Byte value: 0x8a */ + {{0xc9, 0xf6, 0xa8, 0xb5, 0xbb, 0x40, 0xc6, 0xde, }}, /* Byte value: 0x8b */ + {{0x61, 0xf5, 0xa7, 0xd5, 0x8b, 0xb1, 0xf1, 0xf3, }}, /* Byte value: 0x8c */ + {{0x3c, 0x0d, 0x39, 0x63, 0xd0, 0xac, 0x70, 0xaf, }}, /* Byte value: 0x8d */ + {{0x89, 0xac, 0x59, 0xa4, 0x52, 0xbd, 0xad, 0x4c, }}, /* Byte value: 0x8e */ + {{0x0f, 0x92, 0x9f, 0x68, 0x34, 0x2b, 0x1c, 0x5b, }}, /* Byte value: 0x8f */ + {{0x5c, 0x7a, 0x51, 0x9b, 0xac, 0xce, 0xcf, 0x74, }}, /* Byte value: 0x90 */ + {{0xbe, 0x7e, 0x45, 0x1b, 0xec, 0xf0, 0x3a, 0x18, }}, /* Byte value: 0x91 */ + {{0xc2, 0x29, 0x8d, 0x69, 0xd5, 0xa1, 0x21, 0x25, }}, /* Byte value: 0x92 */ + {{0xc5, 0x21, 0xa5, 0xaa, 0x55, 0xdd, 0x08, 0xfd, }}, /* Byte value: 0x93 */ + {{0x88, 0x2e, 0x96, 0x89, 0xa5, 0x6e, 0xe3, 0x64, }}, /* Byte value: 0x94 */ + {{0xa1, 0x1b, 0x77, 0xe6, 0x73, 0x75, 0x4c, 0x86, }}, /* Byte value: 0x95 */ + {{0x1d, 0xa2, 0x6f, 0xa7, 0xb2, 0xe0, 0xea, 0xce, }}, /* Byte value: 0x96 */ + {{0xc7, 0xe6, 0xf8, 0xf0, 0x78, 0xb8, 0x94, 0xad, }}, /* Byte value: 0x97 */ + {{0x6c, 0xa0, 0x65, 0xe7, 0x92, 0xff, 0x71, 0xf8, }}, /* Byte value: 0x98 */ + {{0x85, 0x7b, 0x54, 0xbb, 0xbc, 0x20, 0x63, 0x6f, }}, /* Byte value: 0x99 */ + {{0x9d, 0x16, 0x4e, 0x85, 0xa3, 0xd9, 0x3c, 0x29, }}, /* Byte value: 0x9a */ + {{0xd3, 0x5c, 0xef, 0xd1, 0x89, 0xdc, 0x05, 0xc8, }}, /* Byte value: 0x9b */ + {{0xd1, 0x9b, 0xb2, 0x8b, 0xa4, 0xb9, 0x99, 0x98, }}, /* Byte value: 0x9c */ + {{0x1e, 0xe7, 0xfd, 0xd0, 0x68, 0x56, 0x38, 0xb6, }}, /* Byte value: 0x9d */ + {{0x3e, 0xca, 0x64, 0x39, 0xfd, 0xc9, 0xec, 0xff, }}, /* Byte value: 0x9e */ + {{0x84, 0xf9, 0x9b, 0x96, 0x4b, 0xf3, 0x2d, 0x47, }}, /* Byte value: 0x9f */ + {{0x2f, 0xbf, 0x06, 0x81, 0xa1, 0xb4, 0xc8, 0x12, }}, /* Byte value: 0xa0 */ + {{0x7d, 0xd5, 0x07, 0x5f, 0xce, 0x82, 0x55, 0x15, }}, /* Byte value: 0xa1 */ + {{0x74, 0xcd, 0x7f, 0xd9, 0x8d, 0x06, 0x2e, 0xbe, }}, /* Byte value: 0xa2 */ + {{0x41, 0xd8, 0x3e, 0x3c, 0x1e, 0x2e, 0x25, 0xba, }}, /* Byte value: 0xa3 */ + {{0x50, 0xad, 0x5c, 0x84, 0x42, 0x53, 0x01, 0x57, }}, /* Byte value: 0xa4 */ + {{0x21, 0xaf, 0x56, 0xc4, 0x62, 0x4c, 0x9a, 0x61, }}, /* Byte value: 0xa5 */ + {{0x55, 0x62, 0x29, 0x1d, 0xef, 0x4a, 0xb4, 0xdf, }}, /* Byte value: 0xa6 */ + {{0xe7, 0xcb, 0x61, 0x19, 0xed, 0x27, 0x40, 0xe4, }}, /* Byte value: 0xa7 */ + {{0xcd, 0xbb, 0x12, 0x01, 0xe1, 0x8a, 0x3d, 0x7e, }}, /* Byte value: 0xa8 */ + {{0x0d, 0x55, 0xc2, 0x32, 0x19, 0x4e, 0x80, 0x0b, }}, /* Byte value: 0xa9 */ + {{0x7c, 0x57, 0xc8, 0x72, 0x39, 0x51, 0x1b, 0x3d, }}, /* Byte value: 0xaa */ + {{0x37, 0xd2, 0x1c, 0xbf, 0xbe, 0x4d, 0x97, 0x54, }}, /* Byte value: 0xab */ + {{0x1a, 0xaa, 0x47, 0x64, 0x32, 0x9c, 0xc3, 0x16, }}, /* Byte value: 0xac */ + {{0xa2, 0x5e, 0xe5, 0x91, 0xa9, 0xc3, 0x9e, 0xfe, }}, /* Byte value: 0xad */ + {{0xaf, 0x0b, 0x27, 0xa3, 0xb0, 0x8d, 0x1e, 0xf5, }}, /* Byte value: 0xae */ + {{0xf6, 0xbe, 0x03, 0xa1, 0xb1, 0x5a, 0x64, 0x09, }}, /* Byte value: 0xaf */ + {{0xe8, 0x59, 0xfe, 0x71, 0xd9, 0x0c, 0x5c, 0xbf, }}, /* Byte value: 0xb0 */ + {{0x7e, 0x90, 0x95, 0x28, 0x14, 0x34, 0x87, 0x6d, }}, /* Byte value: 0xb1 */ + {{0x5e, 0xbd, 0x0c, 0xc1, 0x81, 0xab, 0x53, 0x24, }}, /* Byte value: 0xb2 */ + {{0xfa, 0x69, 0x0e, 0xbe, 0x5f, 0xc7, 0xaa, 0x2a, }}, /* Byte value: 0xb3 */ + {{0xb5, 0xa1, 0x60, 0xc7, 0x82, 0x11, 0xdd, 0xe3, }}, /* Byte value: 0xb4 */ + {{0x92, 0x84, 0xd1, 0xed, 0x97, 0xf2, 0x20, 0x72, }}, /* Byte value: 0xb5 */ + {{0x56, 0x27, 0xbb, 0x6a, 0x35, 0xfc, 0x66, 0xa7, }}, /* Byte value: 0xb6 */ + {{0xf1, 0xb6, 0x2b, 0x62, 0x31, 0x26, 0x4d, 0xd1, }}, /* Byte value: 0xb7 */ + {{0x04, 0x4d, 0xba, 0xb4, 0x5a, 0xca, 0xfb, 0xa0, }}, /* Byte value: 0xb8 */ + {{0x6e, 0x67, 0x38, 0xbd, 0xbf, 0x9a, 0xed, 0xa8, }}, /* Byte value: 0xb9 */ + {{0xa5, 0x56, 0xcd, 0x52, 0x29, 0xbf, 0xb7, 0x26, }}, /* Byte value: 0xba */ + {{0xe6, 0x49, 0xae, 0x34, 0x1a, 0xf4, 0x0e, 0xcc, }}, /* Byte value: 0xbb */ + {{0xc8, 0x74, 0x67, 0x98, 0x4c, 0x93, 0x88, 0xf6, }}, /* Byte value: 0xbc */ + {{0x7b, 0x5f, 0xe0, 0xb1, 0xb9, 0x2d, 0x32, 0xe5, }}, /* Byte value: 0xbd */ + {{0x73, 0xc5, 0x57, 0x1a, 0x0d, 0x7a, 0x07, 0x66, }}, /* Byte value: 0xbe */ + {{0x51, 0x2f, 0x93, 0xa9, 0xb5, 0x80, 0x4f, 0x7f, }}, /* Byte value: 0xbf */ + {{0x95, 0x8c, 0xf9, 0x2e, 0x17, 0x8e, 0x09, 0xaa, }}, /* Byte value: 0xc0 */ + {{0x66, 0xfd, 0x8f, 0x16, 0x0b, 0xcd, 0xd8, 0x2b, }}, /* Byte value: 0xc1 */ + {{0xd6, 0x93, 0x9a, 0x48, 0x24, 0xc5, 0xb0, 0x40, }}, /* Byte value: 0xc2 */ + {{0x5b, 0x72, 0x79, 0x58, 0x2c, 0xb2, 0xe6, 0xac, }}, /* Byte value: 0xc3 */ + {{0xe3, 0x86, 0xdb, 0xad, 0xb7, 0xed, 0xbb, 0x44, }}, /* Byte value: 0xc4 */ + {{0x63, 0x32, 0xfa, 0x8f, 0xa6, 0xd4, 0x6d, 0xa3, }}, /* Byte value: 0xc5 */ + {{0x9b, 0x9c, 0xa9, 0x6b, 0xd4, 0x76, 0x5b, 0xd9, }}, /* Byte value: 0xc6 */ + {{0xbd, 0x3b, 0xd7, 0x6c, 0x36, 0x46, 0xe8, 0x60, }}, /* Byte value: 0xc7 */ + {{0x77, 0x88, 0xed, 0xae, 0x57, 0xb0, 0xfc, 0xc6, }}, /* Byte value: 0xc8 */ + {{0x8d, 0xe1, 0xe3, 0x10, 0x08, 0x77, 0x56, 0xec, }}, /* Byte value: 0xc9 */ + {{0xbc, 0xb9, 0x18, 0x41, 0xc1, 0x95, 0xa6, 0x48, }}, /* Byte value: 0xca */ + {{0xf3, 0x71, 0x76, 0x38, 0x1c, 0x43, 0xd1, 0x81, }}, /* Byte value: 0xcb */ + {{0xf4, 0x79, 0x5e, 0xfb, 0x9c, 0x3f, 0xf8, 0x59, }}, /* Byte value: 0xcc */ + {{0x26, 0xa7, 0x7e, 0x07, 0xe2, 0x30, 0xb3, 0xb9, }}, /* Byte value: 0xcd */ + {{0xd4, 0x54, 0xc7, 0x12, 0x09, 0xa0, 0x2c, 0x10, }}, /* Byte value: 0xce */ + {{0x80, 0xb4, 0x21, 0x22, 0x11, 0x39, 0xd6, 0xe7, }}, /* Byte value: 0xcf */ + {{0x93, 0x06, 0x1e, 0xc0, 0x60, 0x21, 0x6e, 0x5a, }}, /* Byte value: 0xd0 */ + {{0xb6, 0xe4, 0xf2, 0xb0, 0x58, 0xa7, 0x0f, 0x9b, }}, /* Byte value: 0xd1 */ + {{0x15, 0x38, 0xd8, 0x0c, 0x06, 0xb7, 0xdf, 0x4d, }}, /* Byte value: 0xd2 */ + {{0xcc, 0x39, 0xdd, 0x2c, 0x16, 0x59, 0x73, 0x56, }}, /* Byte value: 0xd3 */ + {{0xac, 0x4e, 0xb5, 0xd4, 0x6a, 0x3b, 0xcc, 0x8d, }}, /* Byte value: 0xd4 */ + {{0xc1, 0x6c, 0x1f, 0x1e, 0x0f, 0x17, 0xf3, 0x5d, }}, /* Byte value: 0xd5 */ + {{0xee, 0xd3, 0x19, 0x9f, 0xae, 0xa3, 0x3b, 0x4f, }}, /* Byte value: 0xd6 */ + {{0xae, 0x89, 0xe8, 0x8e, 0x47, 0x5e, 0x50, 0xdd, }}, /* Byte value: 0xd7 */ + {{0x9c, 0x94, 0x81, 0xa8, 0x54, 0x0a, 0x72, 0x01, }}, /* Byte value: 0xd8 */ + {{0xd9, 0x01, 0x05, 0x20, 0x10, 0xee, 0xac, 0x1b, }}, /* Byte value: 0xd9 */ + {{0xa3, 0xdc, 0x2a, 0xbc, 0x5e, 0x10, 0xd0, 0xd6, }}, /* Byte value: 0xda */ + {{0x25, 0xe2, 0xec, 0x70, 0x38, 0x86, 0x61, 0xc1, }}, /* Byte value: 0xdb */ + {{0xeb, 0x1c, 0x6c, 0x06, 0x03, 0xba, 0x8e, 0xc7, }}, /* Byte value: 0xdc */ + {{0x40, 0x5a, 0xf1, 0x11, 0xe9, 0xfd, 0x6b, 0x92, }}, /* Byte value: 0xdd */ + {{0x48, 0xc0, 0x46, 0xba, 0x5d, 0xaa, 0x5e, 0x11, }}, /* Byte value: 0xde */ + {{0x6d, 0x22, 0xaa, 0xca, 0x65, 0x2c, 0x3f, 0xd0, }}, /* Byte value: 0xdf */ + {{0x28, 0xb7, 0x2e, 0x42, 0x21, 0xc8, 0xe1, 0xca, }}, /* Byte value: 0xe0 */ + {{0xff, 0xa6, 0x7b, 0x27, 0xf2, 0xde, 0x1f, 0xa2, }}, /* Byte value: 0xe1 */ + {{0x0a, 0x5d, 0xea, 0xf1, 0x99, 0x32, 0xa9, 0xd3, }}, /* Byte value: 0xe2 */ + {{0x4f, 0xc8, 0x6e, 0x79, 0xdd, 0xd6, 0x77, 0xc9, }}, /* Byte value: 0xe3 */ + {{0x19, 0xef, 0xd5, 0x13, 0xe8, 0x2a, 0x11, 0x6e, }}, /* Byte value: 0xe4 */ + {{0x53, 0xe8, 0xce, 0xf3, 0x98, 0xe5, 0xd3, 0x2f, }}, /* Byte value: 0xe5 */ + {{0xf5, 0xfb, 0x91, 0xd6, 0x6b, 0xec, 0xb6, 0x71, }}, /* Byte value: 0xe6 */ + {{0xb9, 0x76, 0x6d, 0xd8, 0x6c, 0x8c, 0x13, 0xc0, }}, /* Byte value: 0xe7 */ + {{0xcb, 0x31, 0xf5, 0xef, 0x96, 0x25, 0x5a, 0x8e, }}, /* Byte value: 0xe8 */ + {{0x45, 0x95, 0x84, 0x88, 0x44, 0xe4, 0xde, 0x1a, }}, /* Byte value: 0xe9 */ + {{0x57, 0xa5, 0x74, 0x47, 0xc2, 0x2f, 0x28, 0x8f, }}, /* Byte value: 0xea */ + {{0xd7, 0x11, 0x55, 0x65, 0xd3, 0x16, 0xfe, 0x68, }}, /* Byte value: 0xeb */ + {{0x68, 0xed, 0xdf, 0x53, 0xc8, 0x35, 0x8a, 0x58, }}, /* Byte value: 0xec */ + {{0x4c, 0x8d, 0xfc, 0x0e, 0x07, 0x60, 0xa5, 0xb1, }}, /* Byte value: 0xed */ + {{0x20, 0x2d, 0x99, 0xe9, 0x95, 0x9f, 0xd4, 0x49, }}, /* Byte value: 0xee */ + {{0x4a, 0x07, 0x1b, 0xe0, 0x70, 0xcf, 0xc2, 0x41, }}, /* Byte value: 0xef */ + {{0x05, 0xcf, 0x75, 0x99, 0xad, 0x19, 0xb5, 0x88, }}, /* Byte value: 0xf0 */ + {{0xc6, 0x64, 0x37, 0xdd, 0x8f, 0x6b, 0xda, 0x85, }}, /* Byte value: 0xf1 */ + {{0x14, 0xba, 0x17, 0x21, 0xf1, 0x64, 0x91, 0x65, }}, /* Byte value: 0xf2 */ + {{0x9e, 0x53, 0xdc, 0xf2, 0x79, 0x6f, 0xee, 0x51, }}, /* Byte value: 0xf3 */ + {{0xd5, 0xd6, 0x08, 0x3f, 0xfe, 0x73, 0x62, 0x38, }}, /* Byte value: 0xf4 */ + {{0x4d, 0x0f, 0x33, 0x23, 0xf0, 0xb3, 0xeb, 0x99, }}, /* Byte value: 0xf5 */ + {{0xce, 0xfe, 0x80, 0x76, 0x3b, 0x3c, 0xef, 0x06, }}, /* Byte value: 0xf6 */ + {{0x5a, 0xf0, 0xb6, 0x75, 0xdb, 0x61, 0xa8, 0x84, }}, /* Byte value: 0xf7 */ + {{0x3f, 0x48, 0xab, 0x14, 0x0a, 0x1a, 0xa2, 0xd7, }}, /* Byte value: 0xf8 */ + {{0x8a, 0xe9, 0xcb, 0xd3, 0x88, 0x0b, 0x7f, 0x34, }}, /* Byte value: 0xf9 */ + {{0x83, 0xf1, 0xb3, 0x55, 0xcb, 0x8f, 0x04, 0x9f, }}, /* Byte value: 0xfa */ + {{0xc3, 0xab, 0x42, 0x44, 0x22, 0x72, 0x6f, 0x0d, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x94, 0x0e, 0x36, 0x03, 0xe0, 0x5d, 0x47, 0x82, }}, /* Byte value: 0xfd */ + {{0x1f, 0x65, 0x32, 0xfd, 0x9f, 0x85, 0x76, 0x9e, }}, /* Byte value: 0xfe */ + {{0x98, 0xd9, 0x3b, 0x1c, 0x0e, 0xc0, 0x89, 0xa1, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 15 */ + {{0xcc, 0x0e, 0x86, 0xc2, 0x4f, 0xba, 0x59, 0x3b, }}, /* Byte value: 0x00 */ + {{0x03, 0x96, 0x94, 0x95, 0x6c, 0x2a, 0xb6, 0xf5, }}, /* Byte value: 0x01 */ + {{0x17, 0xb1, 0xab, 0xa6, 0xf9, 0x11, 0xd2, 0x03, }}, /* Byte value: 0x02 */ + {{0xa5, 0x82, 0x44, 0x27, 0x96, 0x65, 0xbf, 0x60, }}, /* Byte value: 0x03 */ + {{0xd4, 0x34, 0xac, 0xe0, 0xa9, 0x29, 0xa0, 0x9f, }}, /* Byte value: 0x04 */ + {{0xfc, 0x7a, 0xd2, 0x86, 0x40, 0x5f, 0x68, 0xb0, }}, /* Byte value: 0x05 */ + {{0xd6, 0xd0, 0xf5, 0x06, 0xe1, 0xa4, 0xc5, 0x39, }}, /* Byte value: 0x06 */ + {{0x76, 0x2b, 0xce, 0x5d, 0xc3, 0xbf, 0x63, 0x85, }}, /* Byte value: 0x07 */ + {{0xd2, 0xdb, 0x47, 0x09, 0x71, 0x7d, 0x0f, 0xb6, }}, /* Byte value: 0x08 */ + {{0x20, 0x58, 0xd9, 0x78, 0x0a, 0x07, 0x9f, 0xf2, }}, /* Byte value: 0x09 */ + {{0x65, 0x91, 0xd7, 0xf4, 0xaa, 0x77, 0x7b, 0x09, }}, /* Byte value: 0x0a */ + {{0x42, 0x54, 0x28, 0x16, 0x5c, 0x83, 0x98, 0x81, }}, /* Byte value: 0x0b */ + {{0x46, 0x5f, 0x9a, 0x19, 0xcc, 0x5a, 0x52, 0x0e, }}, /* Byte value: 0x0c */ + {{0xbb, 0x57, 0x85, 0xec, 0xa8, 0xa2, 0xe9, 0xed, }}, /* Byte value: 0x0d */ + {{0x2c, 0x45, 0xcc, 0x69, 0x79, 0xaf, 0x02, 0xa0, }}, /* Byte value: 0x0e */ + {{0x25, 0x21, 0xa6, 0x04, 0xbe, 0x79, 0x86, 0x2e, }}, /* Byte value: 0x0f */ + {{0x2e, 0xa1, 0x95, 0x8f, 0x31, 0x22, 0x67, 0x06, }}, /* Byte value: 0x10 */ + {{0x7f, 0x4f, 0xa4, 0x30, 0x04, 0x69, 0xe7, 0x0b, }}, /* Byte value: 0x11 */ + {{0xad, 0x94, 0xe3, 0x39, 0x75, 0x14, 0xe8, 0xbd, }}, /* Byte value: 0x12 */ + {{0x06, 0xef, 0xeb, 0xe9, 0xd8, 0x54, 0xaf, 0x29, }}, /* Byte value: 0x13 */ + {{0x6b, 0x68, 0x9b, 0x03, 0x91, 0x52, 0x83, 0xfd, }}, /* Byte value: 0x14 */ + {{0x3b, 0xf4, 0x67, 0xcf, 0x80, 0xbe, 0xd0, 0xa3, }}, /* Byte value: 0x15 */ + {{0x6a, 0x1a, 0x56, 0x70, 0xb5, 0xf5, 0x50, 0xae, }}, /* Byte value: 0x16 */ + {{0x7e, 0x3d, 0x69, 0x43, 0x20, 0xce, 0x34, 0x58, }}, /* Byte value: 0x17 */ + {{0x3c, 0x69, 0x41, 0x55, 0x7c, 0x4d, 0xac, 0xd9, }}, /* Byte value: 0x18 */ + {{0x84, 0xa8, 0x50, 0x2c, 0xb8, 0xc5, 0xf3, 0xc1, }}, /* Byte value: 0x19 */ + {{0x67, 0x75, 0x8e, 0x12, 0xe2, 0xfa, 0x1e, 0xaf, }}, /* Byte value: 0x1a */ + {{0xb6, 0x38, 0x5d, 0x8e, 0xff, 0xad, 0xa7, 0xec, }}, /* Byte value: 0x1b */ + {{0x16, 0xc3, 0x66, 0xd5, 0xdd, 0xb6, 0x01, 0x50, }}, /* Byte value: 0x1c */ + {{0x88, 0xb5, 0x45, 0x3d, 0xcb, 0x6d, 0x6e, 0x93, }}, /* Byte value: 0x1d */ + {{0x58, 0x8a, 0x5b, 0xd2, 0xf2, 0x9d, 0x04, 0x83, }}, /* Byte value: 0x1e */ + {{0xbc, 0xca, 0xa3, 0x76, 0x54, 0x51, 0x95, 0x97, }}, /* Byte value: 0x1f */ + {{0xde, 0xc6, 0x52, 0x18, 0x02, 0xd5, 0x92, 0xe4, }}, /* Byte value: 0x20 */ + {{0xc2, 0xf7, 0xca, 0x35, 0x74, 0x9f, 0xa1, 0xcf, }}, /* Byte value: 0x21 */ + {{0x4e, 0x49, 0x3d, 0x07, 0x2f, 0x2b, 0x05, 0xd3, }}, /* Byte value: 0x22 */ + {{0x3f, 0xff, 0xd5, 0xc0, 0x10, 0x67, 0x1a, 0x2c, }}, /* Byte value: 0x23 */ + {{0x0e, 0xf9, 0x4c, 0xf7, 0x3b, 0x25, 0xf8, 0xf4, }}, /* Byte value: 0x24 */ + {{0x1f, 0xa7, 0x0c, 0xb8, 0x1a, 0x60, 0x85, 0xde, }}, /* Byte value: 0x25 */ + {{0x99, 0xeb, 0x05, 0x72, 0xea, 0x28, 0x13, 0xb9, }}, /* Byte value: 0x26 */ + {{0x0c, 0x1d, 0x15, 0x11, 0x73, 0xa8, 0x9d, 0x52, }}, /* Byte value: 0x27 */ + {{0x70, 0xc4, 0x25, 0xb4, 0x1b, 0xeb, 0xcc, 0xac, }}, /* Byte value: 0x28 */ + {{0x44, 0xbb, 0xc3, 0xff, 0x84, 0xd7, 0x37, 0xa8, }}, /* Byte value: 0x29 */ + {{0x2d, 0x37, 0x01, 0x1a, 0x5d, 0x08, 0xd1, 0xf3, }}, /* Byte value: 0x2a */ + {{0x5f, 0x17, 0x7d, 0x48, 0x0e, 0x6e, 0x78, 0xf9, }}, /* Byte value: 0x2b */ + {{0x78, 0xd2, 0x82, 0xaa, 0xf8, 0x9a, 0x9b, 0x71, }}, /* Byte value: 0x2c */ + {{0xcb, 0x93, 0xa0, 0x58, 0xb3, 0x49, 0x25, 0x41, }}, /* Byte value: 0x2d */ + {{0xd5, 0x46, 0x61, 0x93, 0x8d, 0x8e, 0x73, 0xcc, }}, /* Byte value: 0x2e */ + {{0x73, 0x52, 0xb1, 0x21, 0x77, 0xc1, 0x7a, 0x59, }}, /* Byte value: 0x2f */ + {{0x5c, 0x81, 0xe9, 0xdd, 0x62, 0x44, 0xce, 0x0c, }}, /* Byte value: 0x30 */ + {{0xfe, 0x9e, 0x8b, 0x60, 0x08, 0xd2, 0x0d, 0x16, }}, /* Byte value: 0x31 */ + {{0x6f, 0x63, 0x29, 0x0c, 0x01, 0x8b, 0x49, 0x72, }}, /* Byte value: 0x32 */ + {{0x1a, 0xde, 0x73, 0xc4, 0xae, 0x1e, 0x9c, 0x02, }}, /* Byte value: 0x33 */ + {{0x07, 0x9d, 0x26, 0x9a, 0xfc, 0xf3, 0x7c, 0x7a, }}, /* Byte value: 0x34 */ + {{0xee, 0xb2, 0x06, 0x5c, 0x0d, 0x30, 0xa3, 0x6f, }}, /* Byte value: 0x35 */ + {{0xea, 0xb9, 0xb4, 0x53, 0x9d, 0xe9, 0x69, 0xe0, }}, /* Byte value: 0x36 */ + {{0xc8, 0x05, 0x34, 0xcd, 0xdf, 0x63, 0x93, 0xb4, }}, /* Byte value: 0x37 */ + {{0x8c, 0xbe, 0xf7, 0x32, 0x5b, 0xb4, 0xa4, 0x1c, }}, /* Byte value: 0x38 */ + {{0xb5, 0xae, 0xc9, 0x1b, 0x93, 0x87, 0x11, 0x19, }}, /* Byte value: 0x39 */ + {{0x38, 0x62, 0xf3, 0x5a, 0xec, 0x94, 0x66, 0x56, }}, /* Byte value: 0x3a */ + {{0x59, 0xf8, 0x96, 0xa1, 0xd6, 0x3a, 0xd7, 0xd0, }}, /* Byte value: 0x3b */ + {{0x69, 0x8c, 0xc2, 0xe5, 0xd9, 0xdf, 0xe6, 0x5b, }}, /* Byte value: 0x3c */ + {{0x10, 0x2c, 0x8d, 0x3c, 0x05, 0xe2, 0xae, 0x79, }}, /* Byte value: 0x3d */ + {{0xf0, 0x67, 0xc7, 0x97, 0x33, 0xf7, 0xf5, 0xe2, }}, /* Byte value: 0x3e */ + {{0xa3, 0x6d, 0xaf, 0xce, 0x4e, 0x31, 0x10, 0x49, }}, /* Byte value: 0x3f */ + {{0x09, 0x64, 0x6a, 0x6d, 0xc7, 0xd6, 0x84, 0x8e, }}, /* Byte value: 0x40 */ + {{0x0d, 0x6f, 0xd8, 0x62, 0x57, 0x0f, 0x4e, 0x01, }}, /* Byte value: 0x41 */ + {{0xfd, 0x08, 0x1f, 0xf5, 0x64, 0xf8, 0xbb, 0xe3, }}, /* Byte value: 0x42 */ + {{0x1b, 0xac, 0xbe, 0xb7, 0x8a, 0xb9, 0x4f, 0x51, }}, /* Byte value: 0x43 */ + {{0x27, 0xc5, 0xff, 0xe2, 0xf6, 0xf4, 0xe3, 0x88, }}, /* Byte value: 0x44 */ + {{0x8d, 0xcc, 0x3a, 0x41, 0x7f, 0x13, 0x77, 0x4f, }}, /* Byte value: 0x45 */ + {{0xf2, 0x83, 0x9e, 0x71, 0x7b, 0x7a, 0x90, 0x44, }}, /* Byte value: 0x46 */ + {{0x92, 0x6b, 0x36, 0xf9, 0x65, 0x73, 0xf2, 0x91, }}, /* Byte value: 0x47 */ + {{0x6d, 0x87, 0x70, 0xea, 0x49, 0x06, 0x2c, 0xd4, }}, /* Byte value: 0x48 */ + {{0x5d, 0xf3, 0x24, 0xae, 0x46, 0xe3, 0x1d, 0x5f, }}, /* Byte value: 0x49 */ + {{0xf1, 0x15, 0x0a, 0xe4, 0x17, 0x50, 0x26, 0xb1, }}, /* Byte value: 0x4a */ + {{0x21, 0x2a, 0x14, 0x0b, 0x2e, 0xa0, 0x4c, 0xa1, }}, /* Byte value: 0x4b */ + {{0x37, 0xe9, 0x72, 0xde, 0xf3, 0x16, 0x4d, 0xf1, }}, /* Byte value: 0x4c */ + {{0x40, 0xb0, 0x71, 0xf0, 0x14, 0x0e, 0xfd, 0x27, }}, /* Byte value: 0x4d */ + {{0x8e, 0x5a, 0xae, 0xd4, 0x13, 0x39, 0xc1, 0xba, }}, /* Byte value: 0x4e */ + {{0xe8, 0x5d, 0xed, 0xb5, 0xd5, 0x64, 0x0c, 0x46, }}, /* Byte value: 0x4f */ + {{0xe4, 0x40, 0xf8, 0xa4, 0xa6, 0xcc, 0x91, 0x14, }}, /* Byte value: 0x50 */ + {{0xec, 0x56, 0x5f, 0xba, 0x45, 0xbd, 0xc6, 0xc9, }}, /* Byte value: 0x51 */ + {{0x9e, 0x76, 0x23, 0xe8, 0x16, 0xdb, 0x6f, 0xc3, }}, /* Byte value: 0x52 */ + {{0x9c, 0x92, 0x7a, 0x0e, 0x5e, 0x56, 0x0a, 0x65, }}, /* Byte value: 0x53 */ + {{0xd1, 0x4d, 0xd3, 0x9c, 0x1d, 0x57, 0xb9, 0x43, }}, /* Byte value: 0x54 */ + {{0xe7, 0xd6, 0x6c, 0x31, 0xca, 0xe6, 0x27, 0xe1, }}, /* Byte value: 0x55 */ + {{0xb8, 0xc1, 0x11, 0x79, 0xc4, 0x88, 0x5f, 0x18, }}, /* Byte value: 0x56 */ + {{0x2f, 0xd3, 0x58, 0xfc, 0x15, 0x85, 0xb4, 0x55, }}, /* Byte value: 0x57 */ + {{0xe2, 0xaf, 0x13, 0x4d, 0x7e, 0x98, 0x3e, 0x3d, }}, /* Byte value: 0x58 */ + {{0x8a, 0x51, 0x1c, 0xdb, 0x83, 0xe0, 0x0b, 0x35, }}, /* Byte value: 0x59 */ + {{0xd7, 0xa2, 0x38, 0x75, 0xc5, 0x03, 0x16, 0x6a, }}, /* Byte value: 0x5a */ + {{0xb4, 0xdc, 0x04, 0x68, 0xb7, 0x20, 0xc2, 0x4a, }}, /* Byte value: 0x5b */ + {{0x29, 0x3c, 0xb3, 0x15, 0xcd, 0xd1, 0x1b, 0x7c, }}, /* Byte value: 0x5c */ + {{0x13, 0xba, 0x19, 0xa9, 0x69, 0xc8, 0x18, 0x8c, }}, /* Byte value: 0x5d */ + {{0x98, 0x99, 0xc8, 0x01, 0xce, 0x8f, 0xc0, 0xea, }}, /* Byte value: 0x5e */ + {{0x80, 0xa3, 0xe2, 0x23, 0x28, 0x1c, 0x39, 0x4e, }}, /* Byte value: 0x5f */ + {{0xa6, 0x14, 0xd0, 0xb2, 0xfa, 0x4f, 0x09, 0x95, }}, /* Byte value: 0x60 */ + {{0x62, 0x0c, 0xf1, 0x6e, 0x56, 0x84, 0x07, 0x73, }}, /* Byte value: 0x61 */ + {{0xb3, 0x41, 0x22, 0xf2, 0x4b, 0xd3, 0xbe, 0x30, }}, /* Byte value: 0x62 */ + {{0x5e, 0x65, 0xb0, 0x3b, 0x2a, 0xc9, 0xab, 0xaa, }}, /* Byte value: 0x63 */ + {{0x72, 0x20, 0x7c, 0x52, 0x53, 0x66, 0xa9, 0x0a, }}, /* Byte value: 0x64 */ + {{0x43, 0x26, 0xe5, 0x65, 0x78, 0x24, 0x4b, 0xd2, }}, /* Byte value: 0x65 */ + {{0x34, 0x7f, 0xe6, 0x4b, 0x9f, 0x3c, 0xfb, 0x04, }}, /* Byte value: 0x66 */ + {{0x35, 0x0d, 0x2b, 0x38, 0xbb, 0x9b, 0x28, 0x57, }}, /* Byte value: 0x67 */ + {{0x52, 0x78, 0xa5, 0x2a, 0x59, 0x61, 0x36, 0xf8, }}, /* Byte value: 0x68 */ + {{0x26, 0xb7, 0x32, 0x91, 0xd2, 0x53, 0x30, 0xdb, }}, /* Byte value: 0x69 */ + {{0x7d, 0xab, 0xfd, 0xd6, 0x4c, 0xe4, 0x82, 0xad, }}, /* Byte value: 0x6a */ + {{0xb7, 0x4a, 0x90, 0xfd, 0xdb, 0x0a, 0x74, 0xbf, }}, /* Byte value: 0x6b */ + {{0x0a, 0xf2, 0xfe, 0xf8, 0xab, 0xfc, 0x32, 0x7b, }}, /* Byte value: 0x6c */ + {{0x45, 0xc9, 0x0e, 0x8c, 0xa0, 0x70, 0xe4, 0xfb, }}, /* Byte value: 0x6d */ + {{0x81, 0xd1, 0x2f, 0x50, 0x0c, 0xbb, 0xea, 0x1d, }}, /* Byte value: 0x6e */ + {{0x6e, 0x11, 0xe4, 0x7f, 0x25, 0x2c, 0x9a, 0x21, }}, /* Byte value: 0x6f */ + {{0x53, 0x0a, 0x68, 0x59, 0x7d, 0xc6, 0xe5, 0xab, }}, /* Byte value: 0x70 */ + {{0x4a, 0x42, 0x8f, 0x08, 0xbf, 0xf2, 0xcf, 0x5c, }}, /* Byte value: 0x71 */ + {{0x79, 0xa0, 0x4f, 0xd9, 0xdc, 0x3d, 0x48, 0x22, }}, /* Byte value: 0x72 */ + {{0x32, 0x90, 0x0d, 0xa2, 0x47, 0x68, 0x54, 0x2d, }}, /* Byte value: 0x73 */ + {{0x61, 0x9a, 0x65, 0xfb, 0x3a, 0xae, 0xb1, 0x86, }}, /* Byte value: 0x74 */ + {{0xfb, 0xe7, 0xf4, 0x1c, 0xbc, 0xac, 0x14, 0xca, }}, /* Byte value: 0x75 */ + {{0x39, 0x10, 0x3e, 0x29, 0xc8, 0x33, 0xb5, 0x05, }}, /* Byte value: 0x76 */ + {{0xc0, 0x13, 0x93, 0xd3, 0x3c, 0x12, 0xc4, 0x69, }}, /* Byte value: 0x77 */ + {{0xfa, 0x95, 0x39, 0x6f, 0x98, 0x0b, 0xc7, 0x99, }}, /* Byte value: 0x78 */ + {{0x5b, 0x1c, 0xcf, 0x47, 0x9e, 0xb7, 0xb2, 0x76, }}, /* Byte value: 0x79 */ + {{0xa4, 0xf0, 0x89, 0x54, 0xb2, 0xc2, 0x6c, 0x33, }}, /* Byte value: 0x7a */ + {{0xba, 0x25, 0x48, 0x9f, 0x8c, 0x05, 0x3a, 0xbe, }}, /* Byte value: 0x7b */ + {{0xda, 0xcd, 0xe0, 0x17, 0x92, 0x0c, 0x58, 0x6b, }}, /* Byte value: 0x7c */ + {{0x4c, 0xad, 0x64, 0xe1, 0x67, 0xa6, 0x60, 0x75, }}, /* Byte value: 0x7d */ + {{0x05, 0x79, 0x7f, 0x7c, 0xb4, 0x7e, 0x19, 0xdc, }}, /* Byte value: 0x7e */ + {{0xc3, 0x85, 0x07, 0x46, 0x50, 0x38, 0x72, 0x9c, }}, /* Byte value: 0x7f */ + {{0x3a, 0x86, 0xaa, 0xbc, 0xa4, 0x19, 0x03, 0xf0, }}, /* Byte value: 0x80 */ + {{0x82, 0x47, 0xbb, 0xc5, 0x60, 0x91, 0x5c, 0xe8, }}, /* Byte value: 0x81 */ + {{0x18, 0x3a, 0x2a, 0x22, 0xe6, 0x93, 0xf9, 0xa4, }}, /* Byte value: 0x82 */ + {{0xc9, 0x77, 0xf9, 0xbe, 0xfb, 0xc4, 0x40, 0xe7, }}, /* Byte value: 0x83 */ + {{0x68, 0xfe, 0x0f, 0x96, 0xfd, 0x78, 0x35, 0x08, }}, /* Byte value: 0x84 */ + {{0xf6, 0x88, 0x2c, 0x7e, 0xeb, 0xa3, 0x5a, 0xcb, }}, /* Byte value: 0x85 */ + {{0x63, 0x7e, 0x3c, 0x1d, 0x72, 0x23, 0xd4, 0x20, }}, /* Byte value: 0x86 */ + {{0x87, 0x3e, 0xc4, 0xb9, 0xd4, 0xef, 0x45, 0x34, }}, /* Byte value: 0x87 */ + {{0x49, 0xd4, 0x1b, 0x9d, 0xd3, 0xd8, 0x79, 0xa9, }}, /* Byte value: 0x88 */ + {{0x36, 0x9b, 0xbf, 0xad, 0xd7, 0xb1, 0x9e, 0xa2, }}, /* Byte value: 0x89 */ + {{0x91, 0xfd, 0xa2, 0x6c, 0x09, 0x59, 0x44, 0x64, }}, /* Byte value: 0x8a */ + {{0x97, 0x12, 0x49, 0x85, 0xd1, 0x0d, 0xeb, 0x4d, }}, /* Byte value: 0x8b */ + {{0x33, 0xe2, 0xc0, 0xd1, 0x63, 0xcf, 0x87, 0x7e, }}, /* Byte value: 0x8c */ + {{0x08, 0x16, 0xa7, 0x1e, 0xe3, 0x71, 0x57, 0xdd, }}, /* Byte value: 0x8d */ + {{0x7c, 0xd9, 0x30, 0xa5, 0x68, 0x43, 0x51, 0xfe, }}, /* Byte value: 0x8e */ + {{0x02, 0xe4, 0x59, 0xe6, 0x48, 0x8d, 0x65, 0xa6, }}, /* Byte value: 0x8f */ + {{0x77, 0x59, 0x03, 0x2e, 0xe7, 0x18, 0xb0, 0xd6, }}, /* Byte value: 0x90 */ + {{0x85, 0xda, 0x9d, 0x5f, 0x9c, 0x62, 0x20, 0x92, }}, /* Byte value: 0x91 */ + {{0x66, 0x07, 0x43, 0x61, 0xc6, 0x5d, 0xcd, 0xfc, }}, /* Byte value: 0x92 */ + {{0x41, 0xc2, 0xbc, 0x83, 0x30, 0xa9, 0x2e, 0x74, }}, /* Byte value: 0x93 */ + {{0x30, 0x74, 0x54, 0x44, 0x0f, 0xe5, 0x31, 0x8b, }}, /* Byte value: 0x94 */ + {{0xcd, 0x7c, 0x4b, 0xb1, 0x6b, 0x1d, 0x8a, 0x68, }}, /* Byte value: 0x95 */ + {{0xd0, 0x3f, 0x1e, 0xef, 0x39, 0xf0, 0x6a, 0x10, }}, /* Byte value: 0x96 */ + {{0xd9, 0x5b, 0x74, 0x82, 0xfe, 0x26, 0xee, 0x9e, }}, /* Byte value: 0x97 */ + {{0xa9, 0x9f, 0x51, 0x36, 0xe5, 0xcd, 0x22, 0x32, }}, /* Byte value: 0x98 */ + {{0xaa, 0x09, 0xc5, 0xa3, 0x89, 0xe7, 0x94, 0xc7, }}, /* Byte value: 0x99 */ + {{0xc5, 0x6a, 0xec, 0xaf, 0x88, 0x6c, 0xdd, 0xb5, }}, /* Byte value: 0x9a */ + {{0x60, 0xe8, 0xa8, 0x88, 0x1e, 0x09, 0x62, 0xd5, }}, /* Byte value: 0x9b */ + {{0xf8, 0x71, 0x60, 0x89, 0xd0, 0x86, 0xa2, 0x3f, }}, /* Byte value: 0x9c */ + {{0x04, 0x0b, 0xb2, 0x0f, 0x90, 0xd9, 0xca, 0x8f, }}, /* Byte value: 0x9d */ + {{0x90, 0x8f, 0x6f, 0x1f, 0x2d, 0xfe, 0x97, 0x37, }}, /* Byte value: 0x9e */ + {{0xe6, 0xa4, 0xa1, 0x42, 0xee, 0x41, 0xf4, 0xb2, }}, /* Byte value: 0x9f */ + {{0x96, 0x60, 0x84, 0xf6, 0xf5, 0xaa, 0x38, 0x1e, }}, /* Byte value: 0xa0 */ + {{0xaf, 0x70, 0xba, 0xdf, 0x3d, 0x99, 0x8d, 0x1b, }}, /* Byte value: 0xa1 */ + {{0xc6, 0xfc, 0x78, 0x3a, 0xe4, 0x46, 0x6b, 0x40, }}, /* Byte value: 0xa2 */ + {{0xa7, 0x66, 0x1d, 0xc1, 0xde, 0xe8, 0xda, 0xc6, }}, /* Byte value: 0xa3 */ + {{0xa1, 0x89, 0xf6, 0x28, 0x06, 0xbc, 0x75, 0xef, }}, /* Byte value: 0xa4 */ + {{0xd8, 0x29, 0xb9, 0xf1, 0xda, 0x81, 0x3d, 0xcd, }}, /* Byte value: 0xa5 */ + {{0x1e, 0xd5, 0xc1, 0xcb, 0x3e, 0xc7, 0x56, 0x8d, }}, /* Byte value: 0xa6 */ + {{0x4d, 0xdf, 0xa9, 0x92, 0x43, 0x01, 0xb3, 0x26, }}, /* Byte value: 0xa7 */ + {{0x64, 0xe3, 0x1a, 0x87, 0x8e, 0xd0, 0xa8, 0x5a, }}, /* Byte value: 0xa8 */ + {{0x9a, 0x7d, 0x91, 0xe7, 0x86, 0x02, 0xa5, 0x4c, }}, /* Byte value: 0xa9 */ + {{0xe3, 0xdd, 0xde, 0x3e, 0x5a, 0x3f, 0xed, 0x6e, }}, /* Byte value: 0xaa */ + {{0xf9, 0x03, 0xad, 0xfa, 0xf4, 0x21, 0x71, 0x6c, }}, /* Byte value: 0xab */ + {{0xf7, 0xfa, 0xe1, 0x0d, 0xcf, 0x04, 0x89, 0x98, }}, /* Byte value: 0xac */ + {{0x19, 0x48, 0xe7, 0x51, 0xc2, 0x34, 0x2a, 0xf7, }}, /* Byte value: 0xad */ + {{0x83, 0x35, 0x76, 0xb6, 0x44, 0x36, 0x8f, 0xbb, }}, /* Byte value: 0xae */ + {{0x4b, 0x30, 0x42, 0x7b, 0x9b, 0x55, 0x1c, 0x0f, }}, /* Byte value: 0xaf */ + {{0x4f, 0x3b, 0xf0, 0x74, 0x0b, 0x8c, 0xd6, 0x80, }}, /* Byte value: 0xb0 */ + {{0x7b, 0x44, 0x16, 0x3f, 0x94, 0xb0, 0x2d, 0x84, }}, /* Byte value: 0xb1 */ + {{0xef, 0xc0, 0xcb, 0x2f, 0x29, 0x97, 0x70, 0x3c, }}, /* Byte value: 0xb2 */ + {{0x9d, 0xe0, 0xb7, 0x7d, 0x7a, 0xf1, 0xd9, 0x36, }}, /* Byte value: 0xb3 */ + {{0x74, 0xcf, 0x97, 0xbb, 0x8b, 0x32, 0x06, 0x23, }}, /* Byte value: 0xb4 */ + {{0xc7, 0x8e, 0xb5, 0x49, 0xc0, 0xe1, 0xb8, 0x13, }}, /* Byte value: 0xb5 */ + {{0xca, 0xe1, 0x6d, 0x2b, 0x97, 0xee, 0xf6, 0x12, }}, /* Byte value: 0xb6 */ + {{0x6c, 0xf5, 0xbd, 0x99, 0x6d, 0xa1, 0xff, 0x87, }}, /* Byte value: 0xb7 */ + {{0xf3, 0xf1, 0x53, 0x02, 0x5f, 0xdd, 0x43, 0x17, }}, /* Byte value: 0xb8 */ + {{0x31, 0x06, 0x99, 0x37, 0x2b, 0x42, 0xe2, 0xd8, }}, /* Byte value: 0xb9 */ + {{0x3e, 0x8d, 0x18, 0xb3, 0x34, 0xc0, 0xc9, 0x7f, }}, /* Byte value: 0xba */ + {{0x01, 0x72, 0xcd, 0x73, 0x24, 0xa7, 0xd3, 0x53, }}, /* Byte value: 0xbb */ + {{0xdb, 0xbf, 0x2d, 0x64, 0xb6, 0xab, 0x8b, 0x38, }}, /* Byte value: 0xbc */ + {{0xc4, 0x18, 0x21, 0xdc, 0xac, 0xcb, 0x0e, 0xe6, }}, /* Byte value: 0xbd */ + {{0xe1, 0x39, 0x87, 0xd8, 0x12, 0xb2, 0x88, 0xc8, }}, /* Byte value: 0xbe */ + {{0xed, 0x24, 0x92, 0xc9, 0x61, 0x1a, 0x15, 0x9a, }}, /* Byte value: 0xbf */ + {{0xe0, 0x4b, 0x4a, 0xab, 0x36, 0x15, 0x5b, 0x9b, }}, /* Byte value: 0xc0 */ + {{0x14, 0x27, 0x3f, 0x33, 0x95, 0x3b, 0x64, 0xf6, }}, /* Byte value: 0xc1 */ + {{0xdf, 0xb4, 0x9f, 0x6b, 0x26, 0x72, 0x41, 0xb7, }}, /* Byte value: 0xc2 */ + {{0x50, 0x9c, 0xfc, 0xcc, 0x11, 0xec, 0x53, 0x5e, }}, /* Byte value: 0xc3 */ + {{0xbe, 0x2e, 0xfa, 0x90, 0x1c, 0xdc, 0xf0, 0x31, }}, /* Byte value: 0xc4 */ + {{0xab, 0x7b, 0x08, 0xd0, 0xad, 0x40, 0x47, 0x94, }}, /* Byte value: 0xc5 */ + {{0xae, 0x02, 0x77, 0xac, 0x19, 0x3e, 0x5e, 0x48, }}, /* Byte value: 0xc6 */ + {{0x51, 0xee, 0x31, 0xbf, 0x35, 0x4b, 0x80, 0x0d, }}, /* Byte value: 0xc7 */ + {{0x12, 0xc8, 0xd4, 0xda, 0x4d, 0x6f, 0xcb, 0xdf, }}, /* Byte value: 0xc8 */ + {{0x8f, 0x28, 0x63, 0xa7, 0x37, 0x9e, 0x12, 0xe9, }}, /* Byte value: 0xc9 */ + {{0x1d, 0x43, 0x55, 0x5e, 0x52, 0xed, 0xe0, 0x78, }}, /* Byte value: 0xca */ + {{0xf4, 0x6c, 0x75, 0x98, 0xa3, 0x2e, 0x3f, 0x6d, }}, /* Byte value: 0xcb */ + {{0xd3, 0xa9, 0x8a, 0x7a, 0x55, 0xda, 0xdc, 0xe5, }}, /* Byte value: 0xcc */ + {{0xff, 0xec, 0x46, 0x13, 0x2c, 0x75, 0xde, 0x45, }}, /* Byte value: 0xcd */ + {{0x47, 0x2d, 0x57, 0x6a, 0xe8, 0xfd, 0x81, 0x5d, }}, /* Byte value: 0xce */ + {{0x15, 0x55, 0xf2, 0x40, 0xb1, 0x9c, 0xb7, 0xa5, }}, /* Byte value: 0xcf */ + {{0x8b, 0x23, 0xd1, 0xa8, 0xa7, 0x47, 0xd8, 0x66, }}, /* Byte value: 0xd0 */ + {{0xa0, 0xfb, 0x3b, 0x5b, 0x22, 0x1b, 0xa6, 0xbc, }}, /* Byte value: 0xd1 */ + {{0xf5, 0x1e, 0xb8, 0xeb, 0x87, 0x89, 0xec, 0x3e, }}, /* Byte value: 0xd2 */ + {{0x28, 0x4e, 0x7e, 0x66, 0xe9, 0x76, 0xc8, 0x2f, }}, /* Byte value: 0xd3 */ + {{0x57, 0x01, 0xda, 0x56, 0xed, 0x1f, 0x2f, 0x24, }}, /* Byte value: 0xd4 */ + {{0xb2, 0x33, 0xef, 0x81, 0x6f, 0x74, 0x6d, 0x63, }}, /* Byte value: 0xd5 */ + {{0x24, 0x53, 0x6b, 0x77, 0x9a, 0xde, 0x55, 0x7d, }}, /* Byte value: 0xd6 */ + {{0xcf, 0x98, 0x12, 0x57, 0x23, 0x90, 0xef, 0xce, }}, /* Byte value: 0xd7 */ + {{0x89, 0xc7, 0x88, 0x4e, 0xef, 0xca, 0xbd, 0xc0, }}, /* Byte value: 0xd8 */ + {{0xdd, 0x50, 0xc6, 0x8d, 0x6e, 0xff, 0x24, 0x11, }}, /* Byte value: 0xd9 */ + {{0x55, 0xe5, 0x83, 0xb0, 0xa5, 0x92, 0x4a, 0x82, }}, /* Byte value: 0xda */ + {{0x2b, 0xd8, 0xea, 0xf3, 0x85, 0x5c, 0x7e, 0xda, }}, /* Byte value: 0xdb */ + {{0x9b, 0x0f, 0x5c, 0x94, 0xa2, 0xa5, 0x76, 0x1f, }}, /* Byte value: 0xdc */ + {{0xeb, 0xcb, 0x79, 0x20, 0xb9, 0x4e, 0xba, 0xb3, }}, /* Byte value: 0xdd */ + {{0xce, 0xea, 0xdf, 0x24, 0x07, 0x37, 0x3c, 0x9d, }}, /* Byte value: 0xde */ + {{0xe5, 0x32, 0x35, 0xd7, 0x82, 0x6b, 0x42, 0x47, }}, /* Byte value: 0xdf */ + {{0xb1, 0xa5, 0x7b, 0x14, 0x03, 0x5e, 0xdb, 0x96, }}, /* Byte value: 0xe0 */ + {{0x22, 0xbc, 0x80, 0x9e, 0x42, 0x8a, 0xfa, 0x54, }}, /* Byte value: 0xe1 */ + {{0xbd, 0xb8, 0x6e, 0x05, 0x70, 0xf6, 0x46, 0xc4, }}, /* Byte value: 0xe2 */ + {{0xe9, 0x2f, 0x20, 0xc6, 0xf1, 0xc3, 0xdf, 0x15, }}, /* Byte value: 0xe3 */ + {{0x23, 0xce, 0x4d, 0xed, 0x66, 0x2d, 0x29, 0x07, }}, /* Byte value: 0xe4 */ + {{0x75, 0xbd, 0x5a, 0xc8, 0xaf, 0x95, 0xd5, 0x70, }}, /* Byte value: 0xe5 */ + {{0x9f, 0x04, 0xee, 0x9b, 0x32, 0x7c, 0xbc, 0x90, }}, /* Byte value: 0xe6 */ + {{0xa2, 0x1f, 0x62, 0xbd, 0x6a, 0x96, 0xc3, 0x1a, }}, /* Byte value: 0xe7 */ + {{0x0f, 0x8b, 0x81, 0x84, 0x1f, 0x82, 0x2b, 0xa7, }}, /* Byte value: 0xe8 */ + {{0x54, 0x97, 0x4e, 0xc3, 0x81, 0x35, 0x99, 0xd1, }}, /* Byte value: 0xe9 */ + {{0x86, 0x4c, 0x09, 0xca, 0xf0, 0x48, 0x96, 0x67, }}, /* Byte value: 0xea */ + {{0x93, 0x19, 0xfb, 0x8a, 0x41, 0xd4, 0x21, 0xc2, }}, /* Byte value: 0xeb */ + {{0x5a, 0x6e, 0x02, 0x34, 0xba, 0x10, 0x61, 0x25, }}, /* Byte value: 0xec */ + {{0x3d, 0x1b, 0x8c, 0x26, 0x58, 0xea, 0x7f, 0x8a, }}, /* Byte value: 0xed */ + {{0x94, 0x84, 0xdd, 0x10, 0xbd, 0x27, 0x5d, 0xb8, }}, /* Byte value: 0xee */ + {{0x56, 0x73, 0x17, 0x25, 0xc9, 0xb8, 0xfc, 0x77, }}, /* Byte value: 0xef */ + {{0xbf, 0x5c, 0x37, 0xe3, 0x38, 0x7b, 0x23, 0x62, }}, /* Byte value: 0xf0 */ + {{0x95, 0xf6, 0x10, 0x63, 0x99, 0x80, 0x8e, 0xeb, }}, /* Byte value: 0xf1 */ + {{0xb9, 0xb3, 0xdc, 0x0a, 0xe0, 0x2f, 0x8c, 0x4b, }}, /* Byte value: 0xf2 */ + {{0x11, 0x5e, 0x40, 0x4f, 0x21, 0x45, 0x7d, 0x2a, }}, /* Byte value: 0xf3 */ + {{0x0b, 0x80, 0x33, 0x8b, 0x8f, 0x5b, 0xe1, 0x28, }}, /* Byte value: 0xf4 */ + {{0x71, 0xb6, 0xe8, 0xc7, 0x3f, 0x4c, 0x1f, 0xff, }}, /* Byte value: 0xf5 */ + {{0xb0, 0xd7, 0xb6, 0x67, 0x27, 0xf9, 0x08, 0xc5, }}, /* Byte value: 0xf6 */ + {{0x1c, 0x31, 0x98, 0x2d, 0x76, 0x4a, 0x33, 0x2b, }}, /* Byte value: 0xf7 */ + {{0xdc, 0x22, 0x0b, 0xfe, 0x4a, 0x58, 0xf7, 0x42, }}, /* Byte value: 0xf8 */ + {{0xa8, 0xed, 0x9c, 0x45, 0xc1, 0x6a, 0xf1, 0x61, }}, /* Byte value: 0xf9 */ + {{0xc1, 0x61, 0x5e, 0xa0, 0x18, 0xb5, 0x17, 0x3a, }}, /* Byte value: 0xfa */ + {{0x2a, 0xaa, 0x27, 0x80, 0xa1, 0xfb, 0xad, 0x89, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xac, 0xe6, 0x2e, 0x4a, 0x51, 0xb3, 0x3b, 0xee, }}, /* Byte value: 0xfd */ + {{0x48, 0xa6, 0xd6, 0xee, 0xf7, 0x7f, 0xaa, 0xfa, }}, /* Byte value: 0xfe */ + {{0x7a, 0x36, 0xdb, 0x4c, 0xb0, 0x17, 0xfe, 0xd7, }}, /* Byte value: 0xff */ + }, +}; + +const union qword_t precomputedInversedLSTableRight[16][256] = { + { /* Matrix row: 0 */ + {{0x3b, 0xe3, 0xef, 0x79, 0x82, 0x53, 0x11, 0xf0, }}, /* Byte value: 0x00 */ + {{0xf5, 0x9c, 0xba, 0xe7, 0x37, 0x83, 0x91, 0xbd, }}, /* Byte value: 0x01 */ + {{0x03, 0xc3, 0x8e, 0xc9, 0x90, 0x58, 0x92, 0xad, }}, /* Byte value: 0x02 */ + {{0x60, 0xda, 0x6e, 0x59, 0x28, 0x51, 0x68, 0x84, }}, /* Byte value: 0x03 */ + {{0x9f, 0x89, 0x76, 0x4d, 0xf9, 0xc1, 0x13, 0x51, }}, /* Byte value: 0x04 */ + {{0xb0, 0x37, 0x1e, 0x11, 0x74, 0xb4, 0x15, 0x71, }}, /* Byte value: 0x05 */ + {{0x39, 0x61, 0x1b, 0xf7, 0x62, 0x82, 0x4c, 0x87, }}, /* Byte value: 0x06 */ + {{0x85, 0xdc, 0x78, 0x44, 0x13, 0x95, 0x54, 0x07, }}, /* Byte value: 0x07 */ + {{0xb6, 0x72, 0xc1, 0x40, 0x97, 0x04, 0xf2, 0xe8, }}, /* Byte value: 0x08 */ + {{0xf2, 0x98, 0x1f, 0xf1, 0xa4, 0xba, 0xb9, 0xfe, }}, /* Byte value: 0x09 */ + {{0x09, 0x0c, 0x2c, 0x3a, 0x76, 0x4b, 0x78, 0xc5, }}, /* Byte value: 0x0a */ + {{0x81, 0x1b, 0x53, 0x9b, 0x10, 0xf4, 0xee, 0xe9, }}, /* Byte value: 0x0b */ + {{0x0e, 0x08, 0x89, 0x2c, 0xe5, 0x72, 0x50, 0x86, }}, /* Byte value: 0x0c */ + {{0xed, 0x4b, 0x40, 0x60, 0x3d, 0x06, 0x8b, 0x9c, }}, /* Byte value: 0x0d */ + {{0xa0, 0xad, 0xb2, 0xeb, 0x78, 0xf3, 0xb8, 0x4f, }}, /* Byte value: 0x0e */ + {{0x2e, 0xff, 0x12, 0x1b, 0xfd, 0xfc, 0xc9, 0xfa, }}, /* Byte value: 0x0f */ + {{0x06, 0x45, 0xdf, 0x51, 0xe3, 0xb0, 0xe7, 0x99, }}, /* Byte value: 0x10 */ + {{0x0b, 0x8e, 0xd8, 0xb4, 0x96, 0x9a, 0x25, 0xb2, }}, /* Byte value: 0x11 */ + {{0xbd, 0xfc, 0x19, 0xf4, 0x01, 0x9e, 0xd7, 0x5a, }}, /* Byte value: 0x12 */ + {{0x29, 0xfb, 0xb7, 0x0d, 0x6e, 0xc5, 0xe1, 0xb9, }}, /* Byte value: 0x13 */ + {{0xfd, 0xd1, 0xec, 0x9a, 0x31, 0x41, 0x26, 0xa2, }}, /* Byte value: 0x14 */ + {{0xa3, 0x6e, 0x3c, 0x22, 0xe8, 0xab, 0x2a, 0xe2, }}, /* Byte value: 0x15 */ + {{0xae, 0xa5, 0x3b, 0xc7, 0x9d, 0x81, 0xe8, 0xc9, }}, /* Byte value: 0x16 */ + {{0x58, 0xfa, 0x0f, 0xe9, 0x3a, 0x5a, 0xeb, 0xd9, }}, /* Byte value: 0x17 */ + {{0xd9, 0xe1, 0x5c, 0x72, 0x2a, 0xae, 0x05, 0x30, }}, /* Byte value: 0x18 */ + {{0xc1, 0x36, 0xa6, 0xf5, 0x20, 0x2b, 0x1f, 0x11, }}, /* Byte value: 0x19 */ + {{0xaf, 0xe4, 0x41, 0x80, 0xed, 0x08, 0x27, 0x13, }}, /* Byte value: 0x1a */ + {{0xec, 0x0a, 0x3a, 0x27, 0x4d, 0x8f, 0x44, 0x46, }}, /* Byte value: 0x1b */ + {{0x50, 0xb7, 0x59, 0x94, 0x3c, 0x98, 0x5c, 0xc6, }}, /* Byte value: 0x1c */ + {{0x93, 0x03, 0x0b, 0xef, 0xfc, 0x62, 0x1e, 0xa0, }}, /* Byte value: 0x1d */ + {{0x83, 0x99, 0xa7, 0x15, 0xf0, 0x25, 0xb3, 0x9e, }}, /* Byte value: 0x1e */ + {{0x97, 0xc4, 0x20, 0x30, 0xff, 0x03, 0xa4, 0x4e, }}, /* Byte value: 0x1f */ + {{0xe4, 0x47, 0x6c, 0x5a, 0x4b, 0x4d, 0xf3, 0x59, }}, /* Byte value: 0x20 */ + {{0xcf, 0x3e, 0x2f, 0xd9, 0xc5, 0x59, 0x4f, 0x97, }}, /* Byte value: 0x21 */ + {{0xd3, 0x2e, 0xfe, 0x81, 0xcc, 0xbd, 0xef, 0x58, }}, /* Byte value: 0x22 */ + {{0x2c, 0x7d, 0xe6, 0x95, 0x1d, 0x2d, 0x94, 0x8d, }}, /* Byte value: 0x23 */ + {{0xf4, 0xdd, 0xc0, 0xa0, 0x47, 0x0a, 0x5e, 0x67, }}, /* Byte value: 0x24 */ + {{0xde, 0xe5, 0xf9, 0x64, 0xb9, 0x97, 0x2d, 0x73, }}, /* Byte value: 0x25 */ + {{0xb9, 0x3b, 0x32, 0x2b, 0x02, 0xff, 0x6d, 0xb4, }}, /* Byte value: 0x26 */ + {{0x52, 0x35, 0xad, 0x1a, 0xdc, 0x49, 0x01, 0xb1, }}, /* Byte value: 0x27 */ + {{0xac, 0x27, 0xcf, 0x49, 0x7d, 0x50, 0xb5, 0xbe, }}, /* Byte value: 0x28 */ + {{0xa8, 0xe0, 0xe4, 0x96, 0x7e, 0x31, 0x0f, 0x50, }}, /* Byte value: 0x29 */ + {{0xf3, 0xd9, 0x65, 0xb6, 0xd4, 0x33, 0x76, 0x24, }}, /* Byte value: 0x2a */ + {{0xf9, 0x16, 0xc7, 0x45, 0x32, 0x20, 0x9c, 0x4c, }}, /* Byte value: 0x2b */ + {{0x71, 0x01, 0xb8, 0xe4, 0x54, 0x9f, 0x0a, 0x60, }}, /* Byte value: 0x2c */ + {{0x41, 0x6c, 0x8f, 0x29, 0x40, 0x56, 0x3e, 0x22, }}, /* Byte value: 0x2d */ + {{0xcc, 0xfd, 0xa1, 0x10, 0x55, 0x01, 0xdd, 0x3a, }}, /* Byte value: 0x2e */ + {{0x59, 0xbb, 0x75, 0xae, 0x4a, 0xd3, 0x24, 0x03, }}, /* Byte value: 0x2f */ + {{0x0c, 0x8a, 0x7d, 0xa2, 0x05, 0xa3, 0x0d, 0xf1, }}, /* Byte value: 0x30 */ + {{0x16, 0xdf, 0x73, 0xab, 0xef, 0xf7, 0x4a, 0xa7, }}, /* Byte value: 0x31 */ + {{0x72, 0xc2, 0x36, 0x2d, 0xc4, 0xc7, 0x98, 0xcd, }}, /* Byte value: 0x32 */ + {{0x02, 0x82, 0xf4, 0x8e, 0xe0, 0xd1, 0x5d, 0x77, }}, /* Byte value: 0x33 */ + {{0x7a, 0x8f, 0x60, 0x50, 0xc2, 0x05, 0x2f, 0xd2, }}, /* Byte value: 0x34 */ + {{0x6f, 0x93, 0x9d, 0x32, 0xbd, 0xaa, 0xf7, 0xd8, }}, /* Byte value: 0x35 */ + {{0xe0, 0x80, 0x47, 0x85, 0x48, 0x2c, 0x49, 0xb7, }}, /* Byte value: 0x36 */ + {{0xb4, 0xf0, 0x35, 0xce, 0x77, 0xd5, 0xaf, 0x9f, }}, /* Byte value: 0x37 */ + {{0x1c, 0x10, 0xd1, 0x58, 0x09, 0xe4, 0xa0, 0xcf, }}, /* Byte value: 0x38 */ + {{0x19, 0x96, 0x80, 0xc0, 0x7a, 0x0c, 0xd5, 0xfb, }}, /* Byte value: 0x39 */ + {{0x56, 0xf2, 0x86, 0xc5, 0xdf, 0x28, 0xbb, 0x5f, }}, /* Byte value: 0x3a */ + {{0xd0, 0xed, 0x70, 0x48, 0x5c, 0xe5, 0x7d, 0xf5, }}, /* Byte value: 0x3b */ + {{0x5b, 0x39, 0x81, 0x20, 0xaa, 0x02, 0x79, 0x74, }}, /* Byte value: 0x3c */ + {{0x79, 0x4c, 0xee, 0x99, 0x52, 0x5d, 0xbd, 0x7f, }}, /* Byte value: 0x3d */ + {{0xe2, 0x02, 0xb3, 0x0b, 0xa8, 0xfd, 0x14, 0xc0, }}, /* Byte value: 0x3e */ + {{0x49, 0x21, 0xd9, 0x54, 0x46, 0x94, 0x89, 0x3d, }}, /* Byte value: 0x3f */ + {{0x8e, 0x52, 0xa0, 0xf0, 0x85, 0x0f, 0x71, 0xb5, }}, /* Byte value: 0x40 */ + {{0x01, 0x41, 0x7a, 0x47, 0x70, 0x89, 0xcf, 0xda, }}, /* Byte value: 0x41 */ + {{0xe3, 0x43, 0xc9, 0x4c, 0xd8, 0x74, 0xdb, 0x1a, }}, /* Byte value: 0x42 */ + {{0x51, 0xf6, 0x23, 0xd3, 0x4c, 0x11, 0x93, 0x1c, }}, /* Byte value: 0x43 */ + {{0x88, 0x17, 0x7f, 0xa1, 0x66, 0xbf, 0x96, 0x2c, }}, /* Byte value: 0x44 */ + {{0x4f, 0x64, 0x06, 0x05, 0xa5, 0x24, 0x6e, 0xa4, }}, /* Byte value: 0x45 */ + {{0x44, 0xea, 0xde, 0xb1, 0x33, 0xbe, 0x4b, 0x16, }}, /* Byte value: 0x46 */ + {{0x91, 0x81, 0xff, 0x61, 0x1c, 0xb3, 0x43, 0xd7, }}, /* Byte value: 0x47 */ + {{0xd4, 0x2a, 0x5b, 0x97, 0x5f, 0x84, 0xc7, 0x1b, }}, /* Byte value: 0x48 */ + {{0x5f, 0xfe, 0xaa, 0xff, 0xa9, 0x63, 0xc3, 0x9a, }}, /* Byte value: 0x49 */ + {{0xb1, 0x76, 0x64, 0x56, 0x04, 0x3d, 0xda, 0xab, }}, /* Byte value: 0x4a */ + {{0xa1, 0xec, 0xc8, 0xac, 0x08, 0x7a, 0x77, 0x95, }}, /* Byte value: 0x4b */ + {{0xf1, 0x5b, 0x91, 0x38, 0x34, 0xe2, 0x2b, 0x53, }}, /* Byte value: 0x4c */ + {{0x27, 0xf3, 0x3e, 0x21, 0x8b, 0xb7, 0xb1, 0x3f, }}, /* Byte value: 0x4d */ + {{0xba, 0xf8, 0xbc, 0xe2, 0x92, 0xa7, 0xff, 0x19, }}, /* Byte value: 0x4e */ + {{0x46, 0x68, 0x2a, 0x3f, 0xd3, 0x6f, 0x16, 0x61, }}, /* Byte value: 0x4f */ + {{0x14, 0x5d, 0x87, 0x25, 0x0f, 0x26, 0x17, 0xd0, }}, /* Byte value: 0x50 */ + {{0xc9, 0x7b, 0xf0, 0x88, 0x26, 0xe9, 0xa8, 0x0e, }}, /* Byte value: 0x51 */ + {{0xc3, 0xb4, 0x52, 0x7b, 0xc0, 0xfa, 0x42, 0x66, }}, /* Byte value: 0x52 */ + {{0x65, 0x5c, 0x3f, 0xc1, 0x5b, 0xb9, 0x1d, 0xb0, }}, /* Byte value: 0x53 */ + {{0x43, 0xee, 0x7b, 0xa7, 0xa0, 0x87, 0x63, 0x55, }}, /* Byte value: 0x54 */ + {{0xe1, 0xc1, 0x3d, 0xc2, 0x38, 0xa5, 0x86, 0x6d, }}, /* Byte value: 0x55 */ + {{0x18, 0xd7, 0xfa, 0x87, 0x0a, 0x85, 0x1a, 0x21, }}, /* Byte value: 0x56 */ + {{0x55, 0x31, 0x08, 0x0c, 0x4f, 0x70, 0x29, 0xf2, }}, /* Byte value: 0x57 */ + {{0x3d, 0xa6, 0x30, 0x28, 0x61, 0xe3, 0xf6, 0x69, }}, /* Byte value: 0x58 */ + {{0x35, 0xeb, 0x66, 0x55, 0x67, 0x21, 0x41, 0x76, }}, /* Byte value: 0x59 */ + {{0x6a, 0x15, 0xcc, 0xaa, 0xce, 0x42, 0x82, 0xec, }}, /* Byte value: 0x5a */ + {{0x4a, 0xe2, 0x57, 0x9d, 0xd6, 0xcc, 0x1b, 0x90, }}, /* Byte value: 0x5b */ + {{0x7c, 0xca, 0xbf, 0x01, 0x21, 0xb5, 0xc8, 0x4b, }}, /* Byte value: 0x5c */ + {{0x8c, 0xd0, 0x54, 0x7e, 0x65, 0xde, 0x2c, 0xc2, }}, /* Byte value: 0x5d */ + {{0xea, 0x4f, 0xe5, 0x76, 0xae, 0x3f, 0xa3, 0xdf, }}, /* Byte value: 0x5e */ + {{0x4e, 0x25, 0x7c, 0x42, 0xd5, 0xad, 0xa1, 0x7e, }}, /* Byte value: 0x5f */ + {{0x95, 0x46, 0xd4, 0xbe, 0x1f, 0xd2, 0xf9, 0x39, }}, /* Byte value: 0x60 */ + {{0x73, 0x83, 0x4c, 0x6a, 0xb4, 0x4e, 0x57, 0x17, }}, /* Byte value: 0x61 */ + {{0x30, 0x6d, 0x37, 0xcd, 0x14, 0xc9, 0x34, 0x42, }}, /* Byte value: 0x62 */ + {{0xaa, 0x62, 0x10, 0x18, 0x9e, 0xe0, 0x52, 0x27, }}, /* Byte value: 0x63 */ + {{0x0a, 0xcf, 0xa2, 0xf3, 0xe6, 0x13, 0xea, 0x68, }}, /* Byte value: 0x64 */ + {{0xd2, 0x6f, 0x84, 0xc6, 0xbc, 0x34, 0x20, 0x82, }}, /* Byte value: 0x65 */ + {{0x04, 0xc7, 0x2b, 0xdf, 0x03, 0x61, 0xba, 0xee, }}, /* Byte value: 0x66 */ + {{0x57, 0xb3, 0xfc, 0x82, 0xaf, 0xa1, 0x74, 0x85, }}, /* Byte value: 0x67 */ + {{0xf8, 0x57, 0xbd, 0x02, 0x42, 0xa9, 0x53, 0x96, }}, /* Byte value: 0x68 */ + {{0xdb, 0x63, 0xa8, 0xfc, 0xca, 0x7f, 0x58, 0x47, }}, /* Byte value: 0x69 */ + {{0xad, 0x66, 0xb5, 0x0e, 0x0d, 0xd9, 0x7a, 0x64, }}, /* Byte value: 0x6a */ + {{0xbf, 0x7e, 0xed, 0x7a, 0xe1, 0x4f, 0x8a, 0x2d, }}, /* Byte value: 0x6b */ + {{0x7b, 0xce, 0x1a, 0x17, 0xb2, 0x8c, 0xe0, 0x08, }}, /* Byte value: 0x6c */ + {{0xfb, 0x94, 0x33, 0xcb, 0xd2, 0xf1, 0xc1, 0x3b, }}, /* Byte value: 0x6d */ + {{0x1d, 0x51, 0xab, 0x1f, 0x79, 0x6d, 0x6f, 0x15, }}, /* Byte value: 0x6e */ + {{0x21, 0xb6, 0xe1, 0x70, 0x68, 0x07, 0x56, 0xa6, }}, /* Byte value: 0x6f */ + {{0xab, 0x23, 0x6a, 0x5f, 0xee, 0x69, 0x9d, 0xfd, }}, /* Byte value: 0x70 */ + {{0x5c, 0x3d, 0x24, 0x36, 0x39, 0x3b, 0x51, 0x37, }}, /* Byte value: 0x71 */ + {{0x22, 0x75, 0x6f, 0xb9, 0xf8, 0x5f, 0xc4, 0x0b, }}, /* Byte value: 0x72 */ + {{0x2d, 0x3c, 0x9c, 0xd2, 0x6d, 0xa4, 0x5b, 0x57, }}, /* Byte value: 0x73 */ + {{0x86, 0x1f, 0xf6, 0x8d, 0x83, 0xcd, 0xc6, 0xaa, }}, /* Byte value: 0x74 */ + {{0xca, 0xb8, 0x7e, 0x41, 0xb6, 0xb1, 0x3a, 0xa3, }}, /* Byte value: 0x75 */ + {{0x05, 0x86, 0x51, 0x98, 0x73, 0xe8, 0x75, 0x34, }}, /* Byte value: 0x76 */ + {{0x69, 0xd6, 0x42, 0x63, 0x5e, 0x1a, 0x10, 0x41, }}, /* Byte value: 0x77 */ + {{0x99, 0xcc, 0xa9, 0x1c, 0x1a, 0x71, 0xf4, 0xc8, }}, /* Byte value: 0x78 */ + {{0x76, 0x05, 0x1d, 0xf2, 0xc7, 0xa6, 0x22, 0x23, }}, /* Byte value: 0x79 */ + {{0x33, 0xae, 0xb9, 0x04, 0x84, 0x91, 0xa6, 0xef, }}, /* Byte value: 0x7a */ + {{0xbe, 0x3f, 0x97, 0x3d, 0x91, 0xc6, 0x45, 0xf7, }}, /* Byte value: 0x7b */ + {{0x6b, 0x54, 0xb6, 0xed, 0xbe, 0xcb, 0x4d, 0x36, }}, /* Byte value: 0x7c */ + {{0x75, 0xc6, 0x93, 0x3b, 0x57, 0xfe, 0xb0, 0x8e, }}, /* Byte value: 0x7d */ + {{0xdc, 0x67, 0x0d, 0xea, 0x59, 0x46, 0x70, 0x04, }}, /* Byte value: 0x7e */ + {{0x9c, 0x4a, 0xf8, 0x84, 0x69, 0x99, 0x81, 0xfc, }}, /* Byte value: 0x7f */ + {{0xf0, 0x1a, 0xeb, 0x7f, 0x44, 0x6b, 0xe4, 0x89, }}, /* Byte value: 0x80 */ + {{0xe8, 0xcd, 0x11, 0xf8, 0x4e, 0xee, 0xfe, 0xa8, }}, /* Byte value: 0x81 */ + {{0xa4, 0x6a, 0x99, 0x34, 0x7b, 0x92, 0x02, 0xa1, }}, /* Byte value: 0x82 */ + {{0xe7, 0x84, 0xe2, 0x93, 0xdb, 0x15, 0x61, 0xf4, }}, /* Byte value: 0x83 */ + {{0x08, 0x4d, 0x56, 0x7d, 0x06, 0xc2, 0xb7, 0x1f, }}, /* Byte value: 0x84 */ + {{0xcb, 0xf9, 0x04, 0x06, 0xc6, 0x38, 0xf5, 0x79, }}, /* Byte value: 0x85 */ + {{0x20, 0xf7, 0x9b, 0x37, 0x18, 0x8e, 0x99, 0x7c, }}, /* Byte value: 0x86 */ + {{0x34, 0xaa, 0x1c, 0x12, 0x17, 0xa8, 0x8e, 0xac, }}, /* Byte value: 0x87 */ + {{0xa9, 0xa1, 0x9e, 0xd1, 0x0e, 0xb8, 0xc0, 0x8a, }}, /* Byte value: 0x88 */ + {{0xa2, 0x2f, 0x46, 0x65, 0x98, 0x22, 0xe5, 0x38, }}, /* Byte value: 0x89 */ + {{0x64, 0x1d, 0x45, 0x86, 0x2b, 0x30, 0xd2, 0x6a, }}, /* Byte value: 0x8a */ + {{0x4d, 0xe6, 0xf2, 0x8b, 0x45, 0xf5, 0x33, 0xd3, }}, /* Byte value: 0x8b */ + {{0x7e, 0x48, 0x4b, 0x8f, 0xc1, 0x64, 0x95, 0x3c, }}, /* Byte value: 0x8c */ + {{0xdd, 0x26, 0x77, 0xad, 0x29, 0xcf, 0xbf, 0xde, }}, /* Byte value: 0x8d */ + {{0xfe, 0x12, 0x62, 0x53, 0xa1, 0x19, 0xb4, 0x0f, }}, /* Byte value: 0x8e */ + {{0xa6, 0xe8, 0x6d, 0xba, 0x9b, 0x43, 0x5f, 0xd6, }}, /* Byte value: 0x8f */ + {{0xd6, 0xa8, 0xaf, 0x19, 0xbf, 0x55, 0x9a, 0x6c, }}, /* Byte value: 0x90 */ + {{0x92, 0x42, 0x71, 0xa8, 0x8c, 0xeb, 0xd1, 0x7a, }}, /* Byte value: 0x91 */ + {{0xfc, 0x90, 0x96, 0xdd, 0x41, 0xc8, 0xe9, 0x78, }}, /* Byte value: 0x92 */ + {{0x74, 0x87, 0xe9, 0x7c, 0x27, 0x77, 0x7f, 0x54, }}, /* Byte value: 0x93 */ + {{0x8b, 0xd4, 0xf1, 0x68, 0xf6, 0xe7, 0x04, 0x81, }}, /* Byte value: 0x94 */ + {{0x68, 0x97, 0x38, 0x24, 0x2e, 0x93, 0xdf, 0x9b, }}, /* Byte value: 0x95 */ + {{0x10, 0x9a, 0xac, 0xfa, 0x0c, 0x47, 0xad, 0x3e, }}, /* Byte value: 0x96 */ + {{0x9e, 0xc8, 0x0c, 0x0a, 0x89, 0x48, 0xdc, 0x8b, }}, /* Byte value: 0x97 */ + {{0x32, 0xef, 0xc3, 0x43, 0xf4, 0x18, 0x69, 0x35, }}, /* Byte value: 0x98 */ + {{0xc7, 0x73, 0x79, 0xa4, 0xc3, 0x9b, 0xf8, 0x88, }}, /* Byte value: 0x99 */ + {{0xb5, 0xb1, 0x4f, 0x89, 0x07, 0x5c, 0x60, 0x45, }}, /* Byte value: 0x9a */ + {{0xd5, 0x6b, 0x21, 0xd0, 0x2f, 0x0d, 0x08, 0xc1, }}, /* Byte value: 0x9b */ + {{0x3f, 0x24, 0xc4, 0xa6, 0x81, 0x32, 0xab, 0x1e, }}, /* Byte value: 0x9c */ + {{0x8f, 0x13, 0xda, 0xb7, 0xf5, 0x86, 0xbe, 0x6f, }}, /* Byte value: 0x9d */ + {{0x37, 0x69, 0x92, 0xdb, 0x87, 0xf0, 0x1c, 0x01, }}, /* Byte value: 0x9e */ + {{0xb2, 0xb5, 0xea, 0x9f, 0x94, 0x65, 0x48, 0x06, }}, /* Byte value: 0x9f */ + {{0x1e, 0x92, 0x25, 0xd6, 0xe9, 0x35, 0xfd, 0xb8, }}, /* Byte value: 0xa0 */ + {{0x1b, 0x14, 0x74, 0x4e, 0x9a, 0xdd, 0x88, 0x8c, }}, /* Byte value: 0xa1 */ + {{0x40, 0x2d, 0xf5, 0x6e, 0x30, 0xdf, 0xf1, 0xf8, }}, /* Byte value: 0xa2 */ + {{0xc6, 0x32, 0x03, 0xe3, 0xb3, 0x12, 0x37, 0x52, }}, /* Byte value: 0xa3 */ + {{0xef, 0xc9, 0xb4, 0xee, 0xdd, 0xd7, 0xd6, 0xeb, }}, /* Byte value: 0xa4 */ + {{0xcd, 0xbc, 0xdb, 0x57, 0x25, 0x88, 0x12, 0xe0, }}, /* Byte value: 0xa5 */ + {{0x8d, 0x91, 0x2e, 0x39, 0x15, 0x57, 0xe3, 0x18, }}, /* Byte value: 0xa6 */ + {{0x26, 0xb2, 0x44, 0x66, 0xfb, 0x3e, 0x7e, 0xe5, }}, /* Byte value: 0xa7 */ + {{0x5a, 0x78, 0xfb, 0x67, 0xda, 0x8b, 0xb6, 0xae, }}, /* Byte value: 0xa8 */ + {{0x4c, 0xa7, 0x88, 0xcc, 0x35, 0x7c, 0xfc, 0x09, }}, /* Byte value: 0xa9 */ + {{0x6e, 0xd2, 0xe7, 0x75, 0xcd, 0x23, 0x38, 0x02, }}, /* Byte value: 0xaa */ + {{0x6c, 0x50, 0x13, 0xfb, 0x2d, 0xf2, 0x65, 0x75, }}, /* Byte value: 0xab */ + {{0x98, 0x8d, 0xd3, 0x5b, 0x6a, 0xf8, 0x3b, 0x12, }}, /* Byte value: 0xac */ + {{0xf7, 0x1e, 0x4e, 0x69, 0xd7, 0x52, 0xcc, 0xca, }}, /* Byte value: 0xad */ + {{0xbb, 0xb9, 0xc6, 0xa5, 0xe2, 0x2e, 0x30, 0xc3, }}, /* Byte value: 0xae */ + {{0x0f, 0x49, 0xf3, 0x6b, 0x95, 0xfb, 0x9f, 0x5c, }}, /* Byte value: 0xaf */ + {{0x80, 0x5a, 0x29, 0xdc, 0x60, 0x7d, 0x21, 0x33, }}, /* Byte value: 0xb0 */ + {{0x84, 0x9d, 0x02, 0x03, 0x63, 0x1c, 0x9b, 0xdd, }}, /* Byte value: 0xb1 */ + {{0x3c, 0xe7, 0x4a, 0x6f, 0x11, 0x6a, 0x39, 0xb3, }}, /* Byte value: 0xb2 */ + {{0x36, 0x28, 0xe8, 0x9c, 0xf7, 0x79, 0xd3, 0xdb, }}, /* Byte value: 0xb3 */ + {{0x23, 0x34, 0x15, 0xfe, 0x88, 0xd6, 0x0b, 0xd1, }}, /* Byte value: 0xb4 */ + {{0x13, 0x59, 0x22, 0x33, 0x9c, 0x1f, 0x3f, 0x93, }}, /* Byte value: 0xb5 */ + {{0x12, 0x18, 0x58, 0x74, 0xec, 0x96, 0xf0, 0x49, }}, /* Byte value: 0xb6 */ + {{0x87, 0x5e, 0x8c, 0xca, 0xf3, 0x44, 0x09, 0x70, }}, /* Byte value: 0xb7 */ + {{0x17, 0x9e, 0x09, 0xec, 0x9f, 0x7e, 0x85, 0x7d, }}, /* Byte value: 0xb8 */ + {{0xd8, 0xa0, 0x26, 0x35, 0x5a, 0x27, 0xca, 0xea, }}, /* Byte value: 0xb9 */ + {{0x7f, 0x09, 0x31, 0xc8, 0xb1, 0xed, 0x5a, 0xe6, }}, /* Byte value: 0xba */ + {{0x53, 0x74, 0xd7, 0x5d, 0xac, 0xc0, 0xce, 0x6b, }}, /* Byte value: 0xbb */ + {{0x38, 0x20, 0x61, 0xb0, 0x12, 0x0b, 0x83, 0x5d, }}, /* Byte value: 0xbc */ + {{0xe6, 0xc5, 0x98, 0xd4, 0xab, 0x9c, 0xae, 0x2e, }}, /* Byte value: 0xbd */ + {{0xc8, 0x3a, 0x8a, 0xcf, 0x56, 0x60, 0x67, 0xd4, }}, /* Byte value: 0xbe */ + {{0x9a, 0x0f, 0x27, 0xd5, 0x8a, 0x29, 0x66, 0x65, }}, /* Byte value: 0xbf */ + {{0x9b, 0x4e, 0x5d, 0x92, 0xfa, 0xa0, 0xa9, 0xbf, }}, /* Byte value: 0xc0 */ + {{0xf6, 0x5f, 0x34, 0x2e, 0xa7, 0xdb, 0x03, 0x10, }}, /* Byte value: 0xc1 */ + {{0xb7, 0x33, 0xbb, 0x07, 0xe7, 0x8d, 0x3d, 0x32, }}, /* Byte value: 0xc2 */ + {{0x5e, 0xbf, 0xd0, 0xb8, 0xd9, 0xea, 0x0c, 0x40, }}, /* Byte value: 0xc3 */ + {{0x31, 0x2c, 0x4d, 0x8a, 0x64, 0x40, 0xfb, 0x98, }}, /* Byte value: 0xc4 */ + {{0x94, 0x07, 0xae, 0xf9, 0x6f, 0x5b, 0x36, 0xe3, }}, /* Byte value: 0xc5 */ + {{0x48, 0x60, 0xa3, 0x13, 0x36, 0x1d, 0x46, 0xe7, }}, /* Byte value: 0xc6 */ + {{0x0d, 0xcb, 0x07, 0xe5, 0x75, 0x2a, 0xc2, 0x2b, }}, /* Byte value: 0xc7 */ + {{0xdf, 0xa4, 0x83, 0x23, 0xc9, 0x1e, 0xe2, 0xa9, }}, /* Byte value: 0xc8 */ + {{0xe9, 0x8c, 0x6b, 0xbf, 0x3e, 0x67, 0x31, 0x72, }}, /* Byte value: 0xc9 */ + {{0x78, 0x0d, 0x94, 0xde, 0x22, 0xd4, 0x72, 0xa5, }}, /* Byte value: 0xca */ + {{0x6d, 0x11, 0x69, 0xbc, 0x5d, 0x7b, 0xaa, 0xaf, }}, /* Byte value: 0xcb */ + {{0xe5, 0x06, 0x16, 0x1d, 0x3b, 0xc4, 0x3c, 0x83, }}, /* Byte value: 0xcc */ + {{0x45, 0xab, 0xa4, 0xf6, 0x43, 0x37, 0x84, 0xcc, }}, /* Byte value: 0xcd */ + {{0x5d, 0x7c, 0x5e, 0x71, 0x49, 0xb2, 0x9e, 0xed, }}, /* Byte value: 0xce */ + {{0xa5, 0x2b, 0xe3, 0x73, 0x0b, 0x1b, 0xcd, 0x7b, }}, /* Byte value: 0xcf */ + {{0x66, 0x9f, 0xb1, 0x08, 0xcb, 0xe1, 0x8f, 0x1d, }}, /* Byte value: 0xd0 */ + {{0xbc, 0xbd, 0x63, 0xb3, 0x71, 0x17, 0x18, 0x80, }}, /* Byte value: 0xd1 */ + {{0x3e, 0x65, 0xbe, 0xe1, 0xf1, 0xbb, 0x64, 0xc4, }}, /* Byte value: 0xd2 */ + {{0x2f, 0xbe, 0x68, 0x5c, 0x8d, 0x75, 0x06, 0x20, }}, /* Byte value: 0xd3 */ + {{0x24, 0x30, 0xb0, 0xe8, 0x1b, 0xef, 0x23, 0x92, }}, /* Byte value: 0xd4 */ + {{0x63, 0x19, 0xe0, 0x90, 0xb8, 0x09, 0xfa, 0x29, }}, /* Byte value: 0xd5 */ + {{0x7d, 0x8b, 0xc5, 0x46, 0x51, 0x3c, 0x07, 0x91, }}, /* Byte value: 0xd6 */ + {{0xce, 0x7f, 0x55, 0x9e, 0xb5, 0xd0, 0x80, 0x4d, }}, /* Byte value: 0xd7 */ + {{0xc0, 0x77, 0xdc, 0xb2, 0x50, 0xa2, 0xd0, 0xcb, }}, /* Byte value: 0xd8 */ + {{0x11, 0xdb, 0xd6, 0xbd, 0x7c, 0xce, 0x62, 0xe4, }}, /* Byte value: 0xd9 */ + {{0x82, 0xd8, 0xdd, 0x52, 0x80, 0xac, 0x7c, 0x44, }}, /* Byte value: 0xda */ + {{0xda, 0x22, 0xd2, 0xbb, 0xba, 0xf6, 0x97, 0x9d, }}, /* Byte value: 0xdb */ + {{0x1f, 0xd3, 0x5f, 0x91, 0x99, 0xbc, 0x32, 0x62, }}, /* Byte value: 0xdc */ + {{0xb3, 0xf4, 0x90, 0xd8, 0xe4, 0xec, 0x87, 0xdc, }}, /* Byte value: 0xdd */ + {{0x9d, 0x0b, 0x82, 0xc3, 0x19, 0x10, 0x4e, 0x26, }}, /* Byte value: 0xde */ + {{0x47, 0x29, 0x50, 0x78, 0xa3, 0xe6, 0xd9, 0xbb, }}, /* Byte value: 0xdf */ + {{0x96, 0x85, 0x5a, 0x77, 0x8f, 0x8a, 0x6b, 0x94, }}, /* Byte value: 0xe0 */ + {{0x54, 0x70, 0x72, 0x4b, 0x3f, 0xf9, 0xe6, 0x28, }}, /* Byte value: 0xe1 */ + {{0xc4, 0xb0, 0xf7, 0x6d, 0x53, 0xc3, 0x6a, 0x25, }}, /* Byte value: 0xe2 */ + {{0x15, 0x1c, 0xfd, 0x62, 0x7f, 0xaf, 0xd8, 0x0a, }}, /* Byte value: 0xe3 */ + {{0x07, 0x04, 0xa5, 0x16, 0x93, 0x39, 0x28, 0x43, }}, /* Byte value: 0xe4 */ + {{0x70, 0x40, 0xc2, 0xa3, 0x24, 0x16, 0xc5, 0xba, }}, /* Byte value: 0xe5 */ + {{0x90, 0xc0, 0x85, 0x26, 0x6c, 0x3a, 0x8c, 0x0d, }}, /* Byte value: 0xe6 */ + {{0x1a, 0x55, 0x0e, 0x09, 0xea, 0x54, 0x47, 0x56, }}, /* Byte value: 0xe7 */ + {{0xa7, 0xa9, 0x17, 0xfd, 0xeb, 0xca, 0x90, 0x0c, }}, /* Byte value: 0xe8 */ + {{0xd1, 0xac, 0x0a, 0x0f, 0x2c, 0x6c, 0xb2, 0x2f, }}, /* Byte value: 0xe9 */ + {{0x67, 0xde, 0xcb, 0x4f, 0xbb, 0x68, 0x40, 0xc7, }}, /* Byte value: 0xea */ + {{0xc2, 0xf5, 0x28, 0x3c, 0xb0, 0x73, 0x8d, 0xbc, }}, /* Byte value: 0xeb */ + {{0x25, 0x71, 0xca, 0xaf, 0x6b, 0x66, 0xec, 0x48, }}, /* Byte value: 0xec */ + {{0x8a, 0x95, 0x8b, 0x2f, 0x86, 0x6e, 0xcb, 0x5b, }}, /* Byte value: 0xed */ + {{0xb8, 0x7a, 0x48, 0x6c, 0x72, 0x76, 0xa2, 0x6e, }}, /* Byte value: 0xee */ + {{0x77, 0x44, 0x67, 0xb5, 0xb7, 0x2f, 0xed, 0xf9, }}, /* Byte value: 0xef */ + {{0x62, 0x58, 0x9a, 0xd7, 0xc8, 0x80, 0x35, 0xf3, }}, /* Byte value: 0xf0 */ + {{0xeb, 0x0e, 0x9f, 0x31, 0xde, 0xb6, 0x6c, 0x05, }}, /* Byte value: 0xf1 */ + {{0x4b, 0xa3, 0x2d, 0xda, 0xa6, 0x45, 0xd4, 0x4a, }}, /* Byte value: 0xf2 */ + {{0x2a, 0x38, 0x39, 0xc4, 0xfe, 0x9d, 0x73, 0x14, }}, /* Byte value: 0xf3 */ + {{0x28, 0xba, 0xcd, 0x4a, 0x1e, 0x4c, 0x2e, 0x63, }}, /* Byte value: 0xf4 */ + {{0xff, 0x53, 0x18, 0x14, 0xd1, 0x90, 0x7b, 0xd5, }}, /* Byte value: 0xf5 */ + {{0xc5, 0xf1, 0x8d, 0x2a, 0x23, 0x4a, 0xa5, 0xff, }}, /* Byte value: 0xf6 */ + {{0x2b, 0x79, 0x43, 0x83, 0x8e, 0x14, 0xbc, 0xce, }}, /* Byte value: 0xf7 */ + {{0x42, 0xaf, 0x01, 0xe0, 0xd0, 0x0e, 0xac, 0x8f, }}, /* Byte value: 0xf8 */ + {{0x61, 0x9b, 0x14, 0x1e, 0x58, 0xd8, 0xa7, 0x5e, }}, /* Byte value: 0xf9 */ + {{0x3a, 0xa2, 0x95, 0x3e, 0xf2, 0xda, 0xde, 0x2a, }}, /* Byte value: 0xfa */ + {{0x89, 0x56, 0x05, 0xe6, 0x16, 0x36, 0x59, 0xf6, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xee, 0x88, 0xce, 0xa9, 0xad, 0x5e, 0x19, 0x31, }}, /* Byte value: 0xfd */ + {{0xfa, 0xd5, 0x49, 0x8c, 0xa2, 0x78, 0x0e, 0xe1, }}, /* Byte value: 0xfe */ + {{0xd7, 0xe9, 0xd5, 0x5e, 0xcf, 0xdc, 0x55, 0xb6, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 1 */ + {{0xf0, 0x9a, 0x7d, 0x3e, 0x77, 0x3a, 0x93, 0x9b, }}, /* Byte value: 0x00 */ + {{0xbd, 0x7b, 0x44, 0x0e, 0x71, 0xad, 0xa6, 0x23, }}, /* Byte value: 0x01 */ + {{0xad, 0x0a, 0xf2, 0x46, 0x78, 0x7d, 0x02, 0x74, }}, /* Byte value: 0x02 */ + {{0x84, 0x83, 0x35, 0x17, 0xdb, 0x7b, 0x40, 0x98, }}, /* Byte value: 0x03 */ + {{0x51, 0xc4, 0x18, 0x4e, 0x79, 0x1b, 0xea, 0x40, }}, /* Byte value: 0x04 */ + {{0x71, 0x26, 0xb7, 0xde, 0x6b, 0x78, 0x61, 0xee, }}, /* Byte value: 0x05 */ + {{0x87, 0x96, 0x60, 0xfb, 0x27, 0x6c, 0x2e, 0xc3, }}, /* Byte value: 0x06 */ + {{0x07, 0x98, 0x99, 0xfe, 0x6f, 0x23, 0x47, 0x3e, }}, /* Byte value: 0x07 */ + {{0xe8, 0x32, 0x90, 0x52, 0x9b, 0x82, 0x65, 0x06, }}, /* Byte value: 0x08 */ + {{0xfe, 0x69, 0x8c, 0x01, 0xa9, 0x7c, 0x1d, 0xe7, }}, /* Byte value: 0x09 */ + {{0xc5, 0x36, 0x9b, 0x11, 0xab, 0xb0, 0x0e, 0x8f, }}, /* Byte value: 0x0a */ + {{0xe9, 0x80, 0xa3, 0xb7, 0xcf, 0x8f, 0xfe, 0x8e, }}, /* Byte value: 0x0b */ + {{0x86, 0x24, 0x53, 0x1e, 0x73, 0x61, 0xb5, 0x4b, }}, /* Byte value: 0x0c */ + {{0x9c, 0x2b, 0xd8, 0x7b, 0x37, 0xc3, 0xb6, 0x05, }}, /* Byte value: 0x0d */ + {{0x4f, 0x46, 0x5f, 0x39, 0xae, 0x8d, 0xc0, 0x6b, }}, /* Byte value: 0x0e */ + {{0xfa, 0xe4, 0x40, 0x13, 0x3a, 0x48, 0x34, 0x82, }}, /* Byte value: 0x0f */ + {{0x99, 0x14, 0x27, 0x8c, 0xf0, 0xfa, 0x04, 0xe8, }}, /* Byte value: 0x10 */ + {{0xb2, 0x3a, 0x86, 0xd4, 0xfb, 0xe6, 0xb3, 0xd7, }}, /* Byte value: 0x11 */ + {{0x5a, 0x08, 0x16, 0x86, 0x60, 0x64, 0xd6, 0xd1, }}, /* Byte value: 0x12 */ + {{0xb9, 0xf6, 0x88, 0x1c, 0xe2, 0x99, 0x8f, 0x46, }}, /* Byte value: 0x13 */ + {{0xa2, 0x4b, 0x30, 0x9c, 0xf2, 0x36, 0x17, 0x80, }}, /* Byte value: 0x14 */ + {{0xe2, 0x4c, 0xad, 0x7f, 0xd6, 0xf0, 0xc2, 0x1f, }}, /* Byte value: 0x15 */ + {{0xc9, 0x62, 0x0c, 0x27, 0xdd, 0xec, 0x75, 0x20, }}, /* Byte value: 0x16 */ + {{0xd9, 0x13, 0xba, 0x6f, 0xd4, 0x3c, 0xd1, 0x77, }}, /* Byte value: 0x17 */ + {{0x30, 0x93, 0x19, 0xd8, 0x1b, 0xb3, 0x2f, 0xf9, }}, /* Byte value: 0x18 */ + {{0x11, 0xc3, 0x85, 0xad, 0x5d, 0xdd, 0x3f, 0xdf, }}, /* Byte value: 0x19 */ + {{0x13, 0x64, 0xe3, 0xa4, 0xf5, 0xc7, 0xca, 0x0c, }}, /* Byte value: 0x1a */ + {{0x46, 0x2d, 0x37, 0xf8, 0x1f, 0xe8, 0x09, 0x29, }}, /* Byte value: 0x1b */ + {{0xc6, 0x23, 0xce, 0xfd, 0x57, 0xa7, 0x60, 0xd4, }}, /* Byte value: 0x1c */ + {{0xa0, 0xec, 0x56, 0x95, 0x5a, 0x2c, 0xe2, 0x53, }}, /* Byte value: 0x1d */ + {{0x9e, 0x8c, 0xbe, 0x72, 0x9f, 0xd9, 0x43, 0xd6, }}, /* Byte value: 0x1e */ + {{0x4e, 0xf4, 0x6c, 0xdc, 0xfa, 0x80, 0x5b, 0xe3, }}, /* Byte value: 0x1f */ + {{0x59, 0x1d, 0x43, 0x6a, 0x9c, 0x73, 0xb8, 0x8a, }}, /* Byte value: 0x20 */ + {{0x97, 0xe7, 0xd6, 0xb3, 0x2e, 0xbc, 0x8a, 0x94, }}, /* Byte value: 0x21 */ + {{0x58, 0xaf, 0x70, 0x8f, 0xc8, 0x7e, 0x23, 0x02, }}, /* Byte value: 0x22 */ + {{0x8d, 0xe8, 0x5d, 0xd6, 0x6a, 0x1e, 0x89, 0xda, }}, /* Byte value: 0x23 */ + {{0x67, 0x7d, 0xab, 0x8d, 0x59, 0x86, 0x19, 0x0f, }}, /* Byte value: 0x24 */ + {{0x73, 0x81, 0xd1, 0xd7, 0xc3, 0x62, 0x94, 0x3d, }}, /* Byte value: 0x25 */ + {{0xb4, 0x10, 0x2c, 0xcf, 0xc0, 0xc8, 0x6f, 0x61, }}, /* Byte value: 0x26 */ + {{0xb1, 0x2f, 0xd3, 0x38, 0x07, 0xf1, 0xdd, 0x8c, }}, /* Byte value: 0x27 */ + {{0xbe, 0x6e, 0x11, 0xe2, 0x8d, 0xba, 0xc8, 0x78, }}, /* Byte value: 0x28 */ + {{0x50, 0x76, 0x2b, 0xab, 0x2d, 0x16, 0x71, 0xc8, }}, /* Byte value: 0x29 */ + {{0x24, 0x6f, 0x63, 0x82, 0x81, 0x57, 0xa2, 0xcb, }}, /* Byte value: 0x2a */ + {{0x4c, 0x53, 0x0a, 0xd5, 0x52, 0x9a, 0xae, 0x30, }}, /* Byte value: 0x2b */ + {{0x60, 0xe5, 0x32, 0x73, 0x36, 0xa5, 0x5e, 0x31, }}, /* Byte value: 0x2c */ + {{0x22, 0x45, 0xc9, 0x99, 0xba, 0x79, 0x7e, 0x7d, }}, /* Byte value: 0x2d */ + {{0x3a, 0xed, 0x24, 0xf5, 0x56, 0xc1, 0x88, 0xe0, }}, /* Byte value: 0x2e */ + {{0x03, 0x15, 0x55, 0xec, 0xfc, 0x17, 0x6e, 0x5b, }}, /* Byte value: 0x2f */ + {{0xf1, 0x28, 0x4e, 0xdb, 0x23, 0x37, 0x08, 0x13, }}, /* Byte value: 0x30 */ + {{0xa7, 0x74, 0xcf, 0x6b, 0x35, 0x0f, 0xa5, 0x6d, }}, /* Byte value: 0x31 */ + {{0xcd, 0xef, 0xc0, 0x35, 0x4e, 0xd8, 0x5c, 0x45, }}, /* Byte value: 0x32 */ + {{0x77, 0x0c, 0x1d, 0xc5, 0x50, 0x56, 0xbd, 0x58, }}, /* Byte value: 0x33 */ + {{0xd2, 0xdf, 0xb4, 0xa7, 0xcd, 0x43, 0xed, 0xe6, }}, /* Byte value: 0x34 */ + {{0xd8, 0xa1, 0x89, 0x8a, 0x80, 0x31, 0x4a, 0xff, }}, /* Byte value: 0x35 */ + {{0xb7, 0x05, 0x79, 0x23, 0x3c, 0xdf, 0x01, 0x3a, }}, /* Byte value: 0x36 */ + {{0x9f, 0x3e, 0x8d, 0x97, 0xcb, 0xd4, 0xd8, 0x5e, }}, /* Byte value: 0x37 */ + {{0xcf, 0x48, 0xa6, 0x3c, 0xe6, 0xc2, 0xa9, 0x96, }}, /* Byte value: 0x38 */ + {{0xfb, 0x56, 0x73, 0xf6, 0x6e, 0x45, 0xaf, 0x0a, }}, /* Byte value: 0x39 */ + {{0x5f, 0x37, 0xe9, 0x71, 0xa7, 0x5d, 0x64, 0x3c, }}, /* Byte value: 0x3a */ + {{0xf5, 0xa5, 0x82, 0xc9, 0xb0, 0x03, 0x21, 0x76, }}, /* Byte value: 0x3b */ + {{0x74, 0x19, 0x48, 0x29, 0xac, 0x41, 0xd3, 0x03, }}, /* Byte value: 0x3c */ + {{0x7f, 0xd5, 0x46, 0xe1, 0xb5, 0x3e, 0xef, 0x92, }}, /* Byte value: 0x3d */ + {{0xc0, 0x09, 0x64, 0xe6, 0x6c, 0x89, 0xbc, 0x62, }}, /* Byte value: 0x3e */ + {{0x3d, 0x75, 0xbd, 0x0b, 0x39, 0xe2, 0xcf, 0xde, }}, /* Byte value: 0x3f */ + {{0xb5, 0xa2, 0x1f, 0x2a, 0x94, 0xc5, 0xf4, 0xe9, }}, /* Byte value: 0x40 */ + {{0xda, 0x06, 0xef, 0x83, 0x28, 0x2b, 0xbf, 0x2c, }}, /* Byte value: 0x41 */ + {{0x1a, 0x0f, 0x8b, 0x65, 0x44, 0xa2, 0x03, 0x4e, }}, /* Byte value: 0x42 */ + {{0x1c, 0x25, 0x21, 0x7e, 0x7f, 0x8c, 0xdf, 0xf8, }}, /* Byte value: 0x43 */ + {{0x2c, 0xb6, 0x38, 0xa6, 0x64, 0x3f, 0xf0, 0x01, }}, /* Byte value: 0x44 */ + {{0xa4, 0x61, 0x9a, 0x87, 0xc9, 0x18, 0xcb, 0x36, }}, /* Byte value: 0x45 */ + {{0x16, 0x5b, 0x1c, 0x53, 0x32, 0xfe, 0x78, 0xe1, }}, /* Byte value: 0x46 */ + {{0xd7, 0xe0, 0x4b, 0x50, 0x0a, 0x7a, 0x5f, 0x0b, }}, /* Byte value: 0x47 */ + {{0x1b, 0xbd, 0xb8, 0x80, 0x10, 0xaf, 0x98, 0xc6, }}, /* Byte value: 0x48 */ + {{0x9a, 0x01, 0x72, 0x60, 0x0c, 0xed, 0x6a, 0xb3, }}, /* Byte value: 0x49 */ + {{0xab, 0x20, 0x58, 0x5d, 0x43, 0x53, 0xde, 0xc2, }}, /* Byte value: 0x4a */ + {{0x95, 0x40, 0xb0, 0xba, 0x86, 0xa6, 0x7f, 0x47, }}, /* Byte value: 0x4b */ + {{0x53, 0x63, 0x7e, 0x47, 0xd1, 0x01, 0x1f, 0x93, }}, /* Byte value: 0x4c */ + {{0x3f, 0xd2, 0xdb, 0x02, 0x91, 0xf8, 0x3a, 0x0d, }}, /* Byte value: 0x4d */ + {{0x19, 0x1a, 0xde, 0x89, 0xb8, 0xb5, 0x6d, 0x15, }}, /* Byte value: 0x4e */ + {{0x61, 0x57, 0x01, 0x96, 0x62, 0xa8, 0xc5, 0xb9, }}, /* Byte value: 0x4f */ + {{0xd0, 0x78, 0xd2, 0xae, 0x65, 0x59, 0x18, 0x35, }}, /* Byte value: 0x50 */ + {{0x0e, 0xf3, 0xf1, 0x3f, 0xde, 0x46, 0x8e, 0x7c, }}, /* Byte value: 0x51 */ + {{0x66, 0xcf, 0x98, 0x68, 0x0d, 0x8b, 0x82, 0x87, }}, /* Byte value: 0x52 */ + {{0xb0, 0x9d, 0xe0, 0xdd, 0x53, 0xfc, 0x46, 0x04, }}, /* Byte value: 0x53 */ + {{0x55, 0x49, 0xd4, 0x5c, 0xea, 0x2f, 0xc3, 0x25, }}, /* Byte value: 0x54 */ + {{0x6d, 0x03, 0x96, 0xa0, 0x14, 0xf4, 0xbe, 0x16, }}, /* Byte value: 0x55 */ + {{0x21, 0x50, 0x9c, 0x75, 0x46, 0x6e, 0x10, 0x26, }}, /* Byte value: 0x56 */ + {{0xf2, 0x3d, 0x1b, 0x37, 0xdf, 0x20, 0x66, 0x48, }}, /* Byte value: 0x57 */ + {{0x69, 0x8e, 0x5a, 0xb2, 0x87, 0xc0, 0x97, 0x73, }}, /* Byte value: 0x58 */ + {{0x76, 0xbe, 0x2e, 0x20, 0x04, 0x5b, 0x26, 0xd0, }}, /* Byte value: 0x59 */ + {{0xec, 0xbf, 0x5c, 0x40, 0x08, 0xb6, 0x4c, 0x63, }}, /* Byte value: 0x5a */ + {{0x90, 0x7f, 0x4f, 0x4d, 0x41, 0x9f, 0xcd, 0xaa, }}, /* Byte value: 0x5b */ + {{0x4b, 0xcb, 0x93, 0x2b, 0x3d, 0xb9, 0xe9, 0x0e, }}, /* Byte value: 0x5c */ + {{0xc2, 0xae, 0x02, 0xef, 0xc4, 0x93, 0x49, 0xb1, }}, /* Byte value: 0x5d */ + {{0xdf, 0x39, 0x10, 0x74, 0xef, 0x12, 0x0d, 0xc1, }}, /* Byte value: 0x5e */ + {{0x7e, 0x67, 0x75, 0x04, 0xe1, 0x33, 0x74, 0x1a, }}, /* Byte value: 0x5f */ + {{0x39, 0xf8, 0x71, 0x19, 0xaa, 0xd6, 0xe6, 0xbb, }}, /* Byte value: 0x60 */ + {{0x17, 0xe9, 0x2f, 0xb6, 0x66, 0xf3, 0xe3, 0x69, }}, /* Byte value: 0x61 */ + {{0x42, 0xa0, 0xfb, 0xea, 0x8c, 0xdc, 0x20, 0x4c, }}, /* Byte value: 0x62 */ + {{0x27, 0x7a, 0x36, 0x6e, 0x7d, 0x40, 0xcc, 0x90, }}, /* Byte value: 0x63 */ + {{0x68, 0x3c, 0x69, 0x57, 0xd3, 0xcd, 0x0c, 0xfb, }}, /* Byte value: 0x64 */ + {{0x82, 0xa9, 0x9f, 0x0c, 0xe0, 0x55, 0x9c, 0x2e, }}, /* Byte value: 0x65 */ + {{0xee, 0x18, 0x3a, 0x49, 0xa0, 0xac, 0xb9, 0xb0, }}, /* Byte value: 0x66 */ + {{0x85, 0x31, 0x06, 0xf2, 0x8f, 0x76, 0xdb, 0x10, }}, /* Byte value: 0x67 */ + {{0x96, 0x55, 0xe5, 0x56, 0x7a, 0xb1, 0x11, 0x1c, }}, /* Byte value: 0x68 */ + {{0x47, 0x9f, 0x04, 0x1d, 0x4b, 0xe5, 0x92, 0xa1, }}, /* Byte value: 0x69 */ + {{0x64, 0x68, 0xfe, 0x61, 0xa5, 0x91, 0x77, 0x54, }}, /* Byte value: 0x6a */ + {{0x2d, 0x04, 0x0b, 0x43, 0x30, 0x32, 0x6b, 0x89, }}, /* Byte value: 0x6b */ + {{0x08, 0xd9, 0x5b, 0x24, 0xe5, 0x68, 0x52, 0xca, }}, /* Byte value: 0x6c */ + {{0x3b, 0x5f, 0x17, 0x10, 0x02, 0xcc, 0x13, 0x68, }}, /* Byte value: 0x6d */ + {{0x15, 0x4e, 0x49, 0xbf, 0xce, 0xe9, 0x16, 0xba, }}, /* Byte value: 0x6e */ + {{0xa6, 0xc6, 0xfc, 0x8e, 0x61, 0x02, 0x3e, 0xe5, }}, /* Byte value: 0x6f */ + {{0xfd, 0x7c, 0xd9, 0xed, 0x55, 0x6b, 0x73, 0xbc, }}, /* Byte value: 0x70 */ + {{0x37, 0x0b, 0x80, 0x26, 0x74, 0x90, 0x68, 0xc7, }}, /* Byte value: 0x71 */ + {{0x0b, 0xcc, 0x0e, 0xc8, 0x19, 0x7f, 0x3c, 0x91, }}, /* Byte value: 0x72 */ + {{0x57, 0xee, 0xb2, 0x55, 0x42, 0x35, 0x36, 0xf6, }}, /* Byte value: 0x73 */ + {{0xaa, 0x92, 0x6b, 0xb8, 0x17, 0x5e, 0x45, 0x4a, }}, /* Byte value: 0x74 */ + {{0xa3, 0xf9, 0x03, 0x79, 0xa6, 0x3b, 0x8c, 0x08, }}, /* Byte value: 0x75 */ + {{0x34, 0x1e, 0xd5, 0xca, 0x88, 0x87, 0x06, 0x9c, }}, /* Byte value: 0x76 */ + {{0x41, 0xb5, 0xae, 0x06, 0x70, 0xcb, 0x4e, 0x17, }}, /* Byte value: 0x77 */ + {{0xc8, 0xd0, 0x3f, 0xc2, 0x89, 0xe1, 0xee, 0xa8, }}, /* Byte value: 0x78 */ + {{0x23, 0xf7, 0xfa, 0x7c, 0xee, 0x74, 0xe5, 0xf5, }}, /* Byte value: 0x79 */ + {{0xef, 0xaa, 0x09, 0xac, 0xf4, 0xa1, 0x22, 0x38, }}, /* Byte value: 0x7a */ + {{0xf7, 0x02, 0xe4, 0xc0, 0x18, 0x19, 0xd4, 0xa5, }}, /* Byte value: 0x7b */ + {{0x36, 0xb9, 0xb3, 0xc3, 0x20, 0x9d, 0xf3, 0x4f, }}, /* Byte value: 0x7c */ + {{0x8e, 0xfd, 0x08, 0x3a, 0x96, 0x09, 0xe7, 0x81, }}, /* Byte value: 0x7d */ + {{0x04, 0x8d, 0xcc, 0x12, 0x93, 0x34, 0x29, 0x65, }}, /* Byte value: 0x7e */ + {{0xfc, 0xce, 0xea, 0x08, 0x01, 0x66, 0xe8, 0x34, }}, /* Byte value: 0x7f */ + {{0x89, 0x65, 0x91, 0xc4, 0xf9, 0x2a, 0xa0, 0xbf, }}, /* Byte value: 0x80 */ + {{0xa8, 0x35, 0x0d, 0xb1, 0xbf, 0x44, 0xb0, 0x99, }}, /* Byte value: 0x81 */ + {{0xa1, 0x5e, 0x65, 0x70, 0x0e, 0x21, 0x79, 0xdb, }}, /* Byte value: 0x82 */ + {{0xf4, 0x17, 0xb1, 0x2c, 0xe4, 0x0e, 0xba, 0xfe, }}, /* Byte value: 0x83 */ + {{0x1f, 0x30, 0x74, 0x92, 0x83, 0x9b, 0xb1, 0xa3, }}, /* Byte value: 0x84 */ + {{0x79, 0xff, 0xec, 0xfa, 0x8e, 0x10, 0x33, 0x24, }}, /* Byte value: 0x85 */ + {{0x7c, 0xc0, 0x13, 0x0d, 0x49, 0x29, 0x81, 0xc9, }}, /* Byte value: 0x86 */ + {{0xac, 0xb8, 0xc1, 0xa3, 0x2c, 0x70, 0x99, 0xfc, }}, /* Byte value: 0x87 */ + {{0x8a, 0x70, 0xc4, 0x28, 0x05, 0x3d, 0xce, 0xe4, }}, /* Byte value: 0x88 */ + {{0x38, 0x4a, 0x42, 0xfc, 0xfe, 0xdb, 0x7d, 0x33, }}, /* Byte value: 0x89 */ + {{0x6a, 0x9b, 0x0f, 0x5e, 0x7b, 0xd7, 0xf9, 0x28, }}, /* Byte value: 0x8a */ + {{0xd3, 0x6d, 0x87, 0x42, 0x99, 0x4e, 0x76, 0x6e, }}, /* Byte value: 0x8b */ + {{0x3c, 0xc7, 0x8e, 0xee, 0x6d, 0xef, 0x54, 0x56, }}, /* Byte value: 0x8c */ + {{0xde, 0x8b, 0x23, 0x91, 0xbb, 0x1f, 0x96, 0x49, }}, /* Byte value: 0x8d */ + {{0x0f, 0x41, 0xc2, 0xda, 0x8a, 0x4b, 0x15, 0xf4, }}, /* Byte value: 0x8e */ + {{0xd6, 0x52, 0x78, 0xb5, 0x5e, 0x77, 0xc4, 0x83, }}, /* Byte value: 0x8f */ + {{0x6c, 0xb1, 0xa5, 0x45, 0x40, 0xf9, 0x25, 0x9e, }}, /* Byte value: 0x90 */ + {{0x7a, 0xea, 0xb9, 0x16, 0x72, 0x07, 0x5d, 0x7f, }}, /* Byte value: 0x91 */ + {{0x78, 0x4d, 0xdf, 0x1f, 0xda, 0x1d, 0xa8, 0xac, }}, /* Byte value: 0x92 */ + {{0x54, 0xfb, 0xe7, 0xb9, 0xbe, 0x22, 0x58, 0xad, }}, /* Byte value: 0x93 */ + {{0x81, 0xbc, 0xca, 0xe0, 0x1c, 0x42, 0xf2, 0x75, }}, /* Byte value: 0x94 */ + {{0x9b, 0xb3, 0x41, 0x85, 0x58, 0xe0, 0xf1, 0x3b, }}, /* Byte value: 0x95 */ + {{0x3e, 0x60, 0xe8, 0xe7, 0xc5, 0xf5, 0xa1, 0x85, }}, /* Byte value: 0x96 */ + {{0x8b, 0xc2, 0xf7, 0xcd, 0x51, 0x30, 0x55, 0x6c, }}, /* Byte value: 0x97 */ + {{0x35, 0xac, 0xe6, 0x2f, 0xdc, 0x8a, 0x9d, 0x14, }}, /* Byte value: 0x98 */ + {{0x88, 0xd7, 0xa2, 0x21, 0xad, 0x27, 0x3b, 0x37, }}, /* Byte value: 0x99 */ + {{0x45, 0x38, 0x62, 0x14, 0xe3, 0xff, 0x67, 0x72, }}, /* Byte value: 0x9a */ + {{0xc1, 0xbb, 0x57, 0x03, 0x38, 0x84, 0x27, 0xea, }}, /* Byte value: 0x9b */ + {{0x1e, 0x82, 0x47, 0x77, 0xd7, 0x96, 0x2a, 0x2b, }}, /* Byte value: 0x9c */ + {{0x6f, 0xa4, 0xf0, 0xa9, 0xbc, 0xee, 0x4b, 0xc5, }}, /* Byte value: 0x9d */ + {{0x01, 0xb2, 0x33, 0xe5, 0x54, 0x0d, 0x9b, 0x88, }}, /* Byte value: 0x9e */ + {{0x06, 0x2a, 0xaa, 0x1b, 0x3b, 0x2e, 0xdc, 0xb6, }}, /* Byte value: 0x9f */ + {{0xb8, 0x44, 0xbb, 0xf9, 0xb6, 0x94, 0x14, 0xce, }}, /* Byte value: 0xa0 */ + {{0x8c, 0x5a, 0x6e, 0x33, 0x3e, 0x13, 0x12, 0x52, }}, /* Byte value: 0xa1 */ + {{0xf8, 0x43, 0x26, 0x1a, 0x92, 0x52, 0xc1, 0x51, }}, /* Byte value: 0xa2 */ + {{0x52, 0xd1, 0x4d, 0xa2, 0x85, 0x0c, 0x84, 0x1b, }}, /* Byte value: 0xa3 */ + {{0xeb, 0x27, 0xc5, 0xbe, 0x67, 0x95, 0x0b, 0x5d, }}, /* Byte value: 0xa4 */ + {{0xe0, 0xeb, 0xcb, 0x76, 0x7e, 0xea, 0x37, 0xcc, }}, /* Byte value: 0xa5 */ + {{0x18, 0xa8, 0xed, 0x6c, 0xec, 0xb8, 0xf6, 0x9d, }}, /* Byte value: 0xa6 */ + {{0xe5, 0xd4, 0x34, 0x81, 0xb9, 0xd3, 0x85, 0x21, }}, /* Byte value: 0xa7 */ + {{0xae, 0x1f, 0xa7, 0xaa, 0x84, 0x6a, 0x6c, 0x2f, }}, /* Byte value: 0xa8 */ + {{0x09, 0x6b, 0x68, 0xc1, 0xb1, 0x65, 0xc9, 0x42, }}, /* Byte value: 0xa9 */ + {{0x02, 0xa7, 0x66, 0x09, 0xa8, 0x1a, 0xf5, 0xd3, }}, /* Byte value: 0xaa */ + {{0x75, 0xab, 0x7b, 0xcc, 0xf8, 0x4c, 0x48, 0x8b, }}, /* Byte value: 0xab */ + {{0x12, 0xd6, 0xd0, 0x41, 0xa1, 0xca, 0x51, 0x84, }}, /* Byte value: 0xac */ + {{0xca, 0x77, 0x59, 0xcb, 0x21, 0xfb, 0x1b, 0x7b, }}, /* Byte value: 0xad */ + {{0xc3, 0x1c, 0x31, 0x0a, 0x90, 0x9e, 0xd2, 0x39, }}, /* Byte value: 0xae */ + {{0x5c, 0x22, 0xbc, 0x9d, 0x5b, 0x4a, 0x0a, 0x67, }}, /* Byte value: 0xaf */ + {{0x33, 0x86, 0x4c, 0x34, 0xe7, 0xa4, 0x41, 0xa2, }}, /* Byte value: 0xb0 */ + {{0xdd, 0x9e, 0x76, 0x7d, 0x47, 0x08, 0xf8, 0x12, }}, /* Byte value: 0xb1 */ + {{0xb3, 0x88, 0xb5, 0x31, 0xaf, 0xeb, 0x28, 0x5f, }}, /* Byte value: 0xb2 */ + {{0xdb, 0xb4, 0xdc, 0x66, 0x7c, 0x26, 0x24, 0xa4, }}, /* Byte value: 0xb3 */ + {{0xd1, 0xca, 0xe1, 0x4b, 0x31, 0x54, 0x83, 0xbd, }}, /* Byte value: 0xb4 */ + {{0x93, 0x6a, 0x1a, 0xa1, 0xbd, 0x88, 0xa3, 0xf1, }}, /* Byte value: 0xb5 */ + {{0x49, 0x6c, 0xf5, 0x22, 0x95, 0xa3, 0x1c, 0xdd, }}, /* Byte value: 0xb6 */ + {{0x70, 0x94, 0x84, 0x3b, 0x3f, 0x75, 0xfa, 0x66, }}, /* Byte value: 0xb7 */ + {{0x7d, 0x72, 0x20, 0xe8, 0x1d, 0x24, 0x1a, 0x41, }}, /* Byte value: 0xb8 */ + {{0xea, 0x95, 0xf6, 0x5b, 0x33, 0x98, 0x90, 0xd5, }}, /* Byte value: 0xb9 */ + {{0xe6, 0xc1, 0x61, 0x6d, 0x45, 0xc4, 0xeb, 0x7a, }}, /* Byte value: 0xba */ + {{0x6b, 0x29, 0x3c, 0xbb, 0x2f, 0xda, 0x62, 0xa0, }}, /* Byte value: 0xbb */ + {{0x5d, 0x90, 0x8f, 0x78, 0x0f, 0x47, 0x91, 0xef, }}, /* Byte value: 0xbc */ + {{0x2e, 0x11, 0x5e, 0xaf, 0xcc, 0x25, 0x05, 0xd2, }}, /* Byte value: 0xbd */ + {{0xd4, 0xf5, 0x1e, 0xbc, 0xf6, 0x6d, 0x31, 0x50, }}, /* Byte value: 0xbe */ + {{0x65, 0xda, 0xcd, 0x84, 0xf1, 0x9c, 0xec, 0xdc, }}, /* Byte value: 0xbf */ + {{0xbf, 0xdc, 0x22, 0x07, 0xd9, 0xb7, 0x53, 0xf0, }}, /* Byte value: 0xc0 */ + {{0x10, 0x71, 0xb6, 0x48, 0x09, 0xd0, 0xa4, 0x57, }}, /* Byte value: 0xc1 */ + {{0x32, 0x34, 0x7f, 0xd1, 0xb3, 0xa9, 0xda, 0x2a, }}, /* Byte value: 0xc2 */ + {{0x40, 0x07, 0x9d, 0xe3, 0x24, 0xc6, 0xd5, 0x9f, }}, /* Byte value: 0xc3 */ + {{0x98, 0xa6, 0x14, 0x69, 0xa4, 0xf7, 0x9f, 0x60, }}, /* Byte value: 0xc4 */ + {{0xe3, 0xfe, 0x9e, 0x9a, 0x82, 0xfd, 0x59, 0x97, }}, /* Byte value: 0xc5 */ + {{0xe7, 0x73, 0x52, 0x88, 0x11, 0xc9, 0x70, 0xf2, }}, /* Byte value: 0xc6 */ + {{0x2b, 0x2e, 0xa1, 0x58, 0x0b, 0x1c, 0xb7, 0x3f, }}, /* Byte value: 0xc7 */ + {{0xa9, 0x87, 0x3e, 0x54, 0xeb, 0x49, 0x2b, 0x11, }}, /* Byte value: 0xc8 */ + {{0x72, 0x33, 0xe2, 0x32, 0x97, 0x6f, 0x0f, 0xb5, }}, /* Byte value: 0xc9 */ + {{0xa5, 0xd3, 0xa9, 0x62, 0x9d, 0x15, 0x50, 0xbe, }}, /* Byte value: 0xca */ + {{0xaf, 0xad, 0x94, 0x4f, 0xd0, 0x67, 0xf7, 0xa7, }}, /* Byte value: 0xcb */ + {{0x83, 0x1b, 0xac, 0xe9, 0xb4, 0x58, 0x07, 0xa6, }}, /* Byte value: 0xcc */ + {{0xcc, 0x5d, 0xf3, 0xd0, 0x1a, 0xd5, 0xc7, 0xcd, }}, /* Byte value: 0xcd */ + {{0xed, 0x0d, 0x6f, 0xa5, 0x5c, 0xbb, 0xd7, 0xeb, }}, /* Byte value: 0xce */ + {{0x7b, 0x58, 0x8a, 0xf3, 0x26, 0x0a, 0xc6, 0xf7, }}, /* Byte value: 0xcf */ + {{0x1d, 0x97, 0x12, 0x9b, 0x2b, 0x81, 0x44, 0x70, }}, /* Byte value: 0xd0 */ + {{0x80, 0x0e, 0xf9, 0x05, 0x48, 0x4f, 0x69, 0xfd, }}, /* Byte value: 0xd1 */ + {{0xc4, 0x84, 0xa8, 0xf4, 0xff, 0xbd, 0x95, 0x07, }}, /* Byte value: 0xd2 */ + {{0x20, 0xe2, 0xaf, 0x90, 0x12, 0x63, 0x8b, 0xae, }}, /* Byte value: 0xd3 */ + {{0x92, 0xd8, 0x29, 0x44, 0xe9, 0x85, 0x38, 0x79, }}, /* Byte value: 0xd4 */ + {{0x29, 0x89, 0xc7, 0x51, 0xa3, 0x06, 0x42, 0xec, }}, /* Byte value: 0xd5 */ + {{0x91, 0xcd, 0x7c, 0xa8, 0x15, 0x92, 0x56, 0x22, }}, /* Byte value: 0xd6 */ + {{0x4d, 0xe1, 0x39, 0x30, 0x06, 0x97, 0x35, 0xb8, }}, /* Byte value: 0xd7 */ + {{0xcb, 0xc5, 0x6a, 0x2e, 0x75, 0xf6, 0x80, 0xf3, }}, /* Byte value: 0xd8 */ + {{0xe4, 0x66, 0x07, 0x64, 0xed, 0xde, 0x1e, 0xa9, }}, /* Byte value: 0xd9 */ + {{0x44, 0x8a, 0x51, 0xf1, 0xb7, 0xf2, 0xfc, 0xfa, }}, /* Byte value: 0xda */ + {{0x9d, 0x99, 0xeb, 0x9e, 0x63, 0xce, 0x2d, 0x8d, }}, /* Byte value: 0xdb */ + {{0x62, 0x42, 0x54, 0x7a, 0x9e, 0xbf, 0xab, 0xe2, }}, /* Byte value: 0xdc */ + {{0xdc, 0x2c, 0x45, 0x98, 0x13, 0x05, 0x63, 0x9a, }}, /* Byte value: 0xdd */ + {{0x26, 0xc8, 0x05, 0x8b, 0x29, 0x4d, 0x57, 0x18, }}, /* Byte value: 0xde */ + {{0xbb, 0x51, 0xee, 0x15, 0x4a, 0x83, 0x7a, 0x95, }}, /* Byte value: 0xdf */ + {{0x94, 0xf2, 0x83, 0x5f, 0xd2, 0xab, 0xe4, 0xcf, }}, /* Byte value: 0xe0 */ + {{0x28, 0x3b, 0xf4, 0xb4, 0xf7, 0x0b, 0xd9, 0x64, }}, /* Byte value: 0xe1 */ + {{0x25, 0xdd, 0x50, 0x67, 0xd5, 0x5a, 0x39, 0x43, }}, /* Byte value: 0xe2 */ + {{0x0a, 0x7e, 0x3d, 0x2d, 0x4d, 0x72, 0xa7, 0x19, }}, /* Byte value: 0xe3 */ + {{0x43, 0x12, 0xc8, 0x0f, 0xd8, 0xd1, 0xbb, 0xc4, }}, /* Byte value: 0xe4 */ + {{0xba, 0xe3, 0xdd, 0xf0, 0x1e, 0x8e, 0xe1, 0x1d, }}, /* Byte value: 0xe5 */ + {{0x0d, 0xe6, 0xa4, 0xd3, 0x22, 0x51, 0xe0, 0x27, }}, /* Byte value: 0xe6 */ + {{0x56, 0x5c, 0x81, 0xb0, 0x16, 0x38, 0xad, 0x7e, }}, /* Byte value: 0xe7 */ + {{0x0c, 0x54, 0x97, 0x36, 0x76, 0x5c, 0x7b, 0xaf, }}, /* Byte value: 0xe8 */ + {{0x2f, 0xa3, 0x6d, 0x4a, 0x98, 0x28, 0x9e, 0x5a, }}, /* Byte value: 0xe9 */ + {{0xc7, 0x91, 0xfd, 0x18, 0x03, 0xaa, 0xfb, 0x5c, }}, /* Byte value: 0xea */ + {{0xbc, 0xc9, 0x77, 0xeb, 0x25, 0xa0, 0x3d, 0xab, }}, /* Byte value: 0xeb */ + {{0x48, 0xde, 0xc6, 0xc7, 0xc1, 0xae, 0x87, 0x55, }}, /* Byte value: 0xec */ + {{0x5b, 0xba, 0x25, 0x63, 0x34, 0x69, 0x4d, 0x59, }}, /* Byte value: 0xed */ + {{0x6e, 0x16, 0xc3, 0x4c, 0xe8, 0xe3, 0xd0, 0x4d, }}, /* Byte value: 0xee */ + {{0xf9, 0xf1, 0x15, 0xff, 0xc6, 0x5f, 0x5a, 0xd9, }}, /* Byte value: 0xef */ + {{0xf3, 0x8f, 0x28, 0xd2, 0x8b, 0x2d, 0xfd, 0xc0, }}, /* Byte value: 0xf0 */ + {{0x05, 0x3f, 0xff, 0xf7, 0xc7, 0x39, 0xb2, 0xed, }}, /* Byte value: 0xf1 */ + {{0x4a, 0x79, 0xa0, 0xce, 0x69, 0xb4, 0x72, 0x86, }}, /* Byte value: 0xf2 */ + {{0x14, 0xfc, 0x7a, 0x5a, 0x9a, 0xe4, 0x8d, 0x32, }}, /* Byte value: 0xf3 */ + {{0x63, 0xf0, 0x67, 0x9f, 0xca, 0xb2, 0x30, 0x6a, }}, /* Byte value: 0xf4 */ + {{0xd5, 0x47, 0x2d, 0x59, 0xa2, 0x60, 0xaa, 0xd8, }}, /* Byte value: 0xf5 */ + {{0xff, 0xdb, 0xbf, 0xe4, 0xfd, 0x71, 0x86, 0x6f, }}, /* Byte value: 0xf6 */ + {{0xce, 0xfa, 0x95, 0xd9, 0xb2, 0xcf, 0x32, 0x1e, }}, /* Byte value: 0xf7 */ + {{0x8f, 0x4f, 0x3b, 0xdf, 0xc2, 0x04, 0x7c, 0x09, }}, /* Byte value: 0xf8 */ + {{0x5e, 0x85, 0xda, 0x94, 0xf3, 0x50, 0xff, 0xb4, }}, /* Byte value: 0xf9 */ + {{0x2a, 0x9c, 0x92, 0xbd, 0x5f, 0x11, 0x2c, 0xb7, }}, /* Byte value: 0xfa */ + {{0xf6, 0xb0, 0xd7, 0x25, 0x4c, 0x14, 0x4f, 0x2d, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x31, 0x21, 0x2a, 0x3d, 0x4f, 0xbe, 0xb4, 0x71, }}, /* Byte value: 0xfd */ + {{0xe1, 0x59, 0xf8, 0x93, 0x2a, 0xe7, 0xac, 0x44, }}, /* Byte value: 0xfe */ + {{0xb6, 0xb7, 0x4a, 0xc6, 0x68, 0xd2, 0x9a, 0xb2, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 2 */ + {{0xaf, 0xa0, 0x89, 0x86, 0x13, 0x85, 0x5f, 0xe6, }}, /* Byte value: 0x00 */ + {{0x18, 0xd6, 0x5a, 0x94, 0x21, 0x7c, 0xa5, 0x67, }}, /* Byte value: 0x01 */ + {{0xb8, 0x77, 0x64, 0xab, 0x6e, 0x29, 0x15, 0x86, }}, /* Byte value: 0x02 */ + {{0x61, 0xf8, 0xdd, 0x44, 0x5e, 0x69, 0xe5, 0xad, }}, /* Byte value: 0x03 */ + {{0x6f, 0xdf, 0x1c, 0xac, 0xd8, 0xe3, 0x3e, 0x58, }}, /* Byte value: 0x04 */ + {{0xec, 0x5e, 0x60, 0xd2, 0x46, 0x49, 0x9d, 0x59, }}, /* Byte value: 0x05 */ + {{0x7f, 0xfa, 0x70, 0xf5, 0xe6, 0x0a, 0xf8, 0xa3, }}, /* Byte value: 0x06 */ + {{0x36, 0xbb, 0x43, 0xce, 0xdb, 0xe7, 0x31, 0xa7, }}, /* Byte value: 0x07 */ + {{0x5f, 0xb0, 0xa8, 0x47, 0x9a, 0x1b, 0xb7, 0x96, }}, /* Byte value: 0x08 */ + {{0xc3, 0x15, 0x0f, 0xd9, 0x66, 0x88, 0x3d, 0x6b, }}, /* Byte value: 0x09 */ + {{0xae, 0x86, 0xff, 0xd7, 0xc9, 0xdf, 0x6b, 0x14, }}, /* Byte value: 0x0a */ + {{0x55, 0x0f, 0x72, 0x28, 0xf2, 0x3a, 0xbc, 0x2d, }}, /* Byte value: 0x0b */ + {{0x75, 0x45, 0xaa, 0x9a, 0x8e, 0x2b, 0xf3, 0x18, }}, /* Byte value: 0x0c */ + {{0x91, 0xe8, 0xfc, 0x85, 0xd7, 0xf7, 0x0d, 0xdd, }}, /* Byte value: 0x0d */ + {{0xa3, 0xcb, 0xa4, 0xcc, 0xe2, 0xbb, 0xec, 0x34, }}, /* Byte value: 0x0e */ + {{0xeb, 0xac, 0xe1, 0xa6, 0x05, 0x0c, 0x11, 0xc2, }}, /* Byte value: 0x0f */ + {{0xb3, 0xee, 0xc8, 0x95, 0xdc, 0x52, 0x2a, 0xcf, }}, /* Byte value: 0x10 */ + {{0x7e, 0xdc, 0x06, 0xa4, 0x3c, 0x50, 0xcc, 0x51, }}, /* Byte value: 0x11 */ + {{0x21, 0x6c, 0xae, 0xe3, 0xa6, 0x4b, 0x7b, 0xc7, }}, /* Byte value: 0x12 */ + {{0x30, 0x6f, 0xb4, 0xeb, 0x42, 0xf8, 0x89, 0xce, }}, /* Byte value: 0x13 */ + {{0xde, 0x7d, 0x38, 0x9b, 0x73, 0x05, 0x7c, 0xb0, }}, /* Byte value: 0x14 */ + {{0x1b, 0xbc, 0xc0, 0x67, 0x8c, 0x92, 0xf9, 0xb2, }}, /* Byte value: 0x15 */ + {{0xd6, 0x8e, 0x0e, 0x56, 0x6c, 0x90, 0x1f, 0x2c, }}, /* Byte value: 0x16 */ + {{0x76, 0x2f, 0x30, 0x69, 0x23, 0xc5, 0xaf, 0xcd, }}, /* Byte value: 0x17 */ + {{0x23, 0x20, 0x42, 0x41, 0xd1, 0xff, 0x13, 0xe0, }}, /* Byte value: 0x18 */ + {{0xaa, 0x1e, 0xe4, 0x50, 0x27, 0x74, 0xbb, 0x5a, }}, /* Byte value: 0x19 */ + {{0xbe, 0xa3, 0x93, 0x8e, 0xf7, 0x36, 0xad, 0xef, }}, /* Byte value: 0x1a */ + {{0xf9, 0xc5, 0x61, 0x5d, 0x4c, 0x51, 0xbf, 0x1e, }}, /* Byte value: 0x1b */ + {{0xb0, 0x84, 0x52, 0x66, 0x71, 0xbc, 0x76, 0x1a, }}, /* Byte value: 0x1c */ + {{0xca, 0xc0, 0x4f, 0x45, 0xa3, 0x47, 0x6a, 0x05, }}, /* Byte value: 0x1d */ + {{0x85, 0x55, 0x8b, 0x5b, 0x07, 0xb5, 0x1b, 0x68, }}, /* Byte value: 0x1e */ + {{0xa9, 0x74, 0x7e, 0xa3, 0x8a, 0x9a, 0xe7, 0x8f, }}, /* Byte value: 0x1f */ + {{0x3f, 0x6e, 0x03, 0x52, 0x1e, 0x28, 0x66, 0xc9, }}, /* Byte value: 0x20 */ + {{0xdf, 0x5b, 0x4e, 0xca, 0xa9, 0x5f, 0x48, 0x42, }}, /* Byte value: 0x21 */ + {{0x35, 0xd1, 0xd9, 0x3d, 0x76, 0x09, 0x6d, 0x72, }}, /* Byte value: 0x22 */ + {{0x3b, 0xf6, 0x18, 0xd5, 0xf0, 0x83, 0xb6, 0x87, }}, /* Byte value: 0x23 */ + {{0x70, 0xfb, 0xc7, 0x4c, 0xba, 0xda, 0x17, 0xa4, }}, /* Byte value: 0x24 */ + {{0xf8, 0xe3, 0x17, 0x0c, 0x96, 0x0b, 0x8b, 0xec, }}, /* Byte value: 0x25 */ + {{0x42, 0xd8, 0x9f, 0x05, 0x8f, 0x96, 0xf6, 0x4d, }}, /* Byte value: 0x26 */ + {{0x60, 0xde, 0xab, 0x15, 0x84, 0x33, 0xd1, 0x5f, }}, /* Byte value: 0x27 */ + {{0x06, 0xd4, 0xf7, 0x25, 0x99, 0x1f, 0xb8, 0x69, }}, /* Byte value: 0x28 */ + {{0x65, 0x60, 0xc6, 0xc3, 0xb0, 0xc2, 0x35, 0xe3, }}, /* Byte value: 0x29 */ + {{0xab, 0x38, 0x92, 0x01, 0xfd, 0x2e, 0x8f, 0xa8, }}, /* Byte value: 0x2a */ + {{0xbd, 0xc9, 0x09, 0x7d, 0x5a, 0xd8, 0xf1, 0x3a, }}, /* Byte value: 0x2b */ + {{0x46, 0x40, 0x84, 0x82, 0x61, 0x3d, 0x26, 0x03, }}, /* Byte value: 0x2c */ + {{0x97, 0x3c, 0x0b, 0xa0, 0x4e, 0xe8, 0xb5, 0xb4, }}, /* Byte value: 0x2d */ + {{0x67, 0x2c, 0x2a, 0x61, 0xc7, 0x76, 0x5d, 0xc4, }}, /* Byte value: 0x2e */ + {{0x1e, 0x02, 0xad, 0xb1, 0xb8, 0x63, 0x1d, 0x0e, }}, /* Byte value: 0x2f */ + {{0xa5, 0x1f, 0x53, 0xe9, 0x7b, 0xa4, 0x54, 0x5d, }}, /* Byte value: 0x30 */ + {{0xfc, 0x7b, 0x0c, 0x8b, 0x78, 0xa0, 0x5b, 0xa2, }}, /* Byte value: 0x31 */ + {{0xfe, 0x37, 0xe0, 0x29, 0x0f, 0x14, 0x33, 0x85, }}, /* Byte value: 0x32 */ + {{0xd0, 0x5a, 0xf9, 0x73, 0xf5, 0x8f, 0xa7, 0x45, }}, /* Byte value: 0x33 */ + {{0x38, 0x9c, 0x82, 0x26, 0x5d, 0x6d, 0xea, 0x52, }}, /* Byte value: 0x34 */ + {{0x7c, 0x90, 0xea, 0x06, 0x4b, 0xe4, 0xa4, 0x76, }}, /* Byte value: 0x35 */ + {{0x5c, 0xda, 0x32, 0xb4, 0x37, 0xf5, 0xeb, 0x43, }}, /* Byte value: 0x36 */ + {{0x8f, 0xea, 0x51, 0x34, 0x6f, 0x94, 0x10, 0xd3, }}, /* Byte value: 0x37 */ + {{0xea, 0x8a, 0x97, 0xf7, 0xdf, 0x56, 0x25, 0x30, }}, /* Byte value: 0x38 */ + {{0xe1, 0x13, 0x3b, 0xc9, 0x6d, 0x2d, 0x1a, 0x79, }}, /* Byte value: 0x39 */ + {{0x03, 0x6a, 0x9a, 0xf3, 0xad, 0xee, 0x5c, 0xd5, }}, /* Byte value: 0x3a */ + {{0x8d, 0xa6, 0xbd, 0x96, 0x18, 0x20, 0x78, 0xf4, }}, /* Byte value: 0x3b */ + {{0xce, 0x58, 0x54, 0xc2, 0x4d, 0xec, 0xba, 0x4b, }}, /* Byte value: 0x3c */ + {{0x80, 0xeb, 0xe6, 0x8d, 0x33, 0x44, 0xff, 0xd4, }}, /* Byte value: 0x3d */ + {{0x8c, 0x80, 0xcb, 0xc7, 0xc2, 0x7a, 0x4c, 0x06, }}, /* Byte value: 0x3e */ + {{0x51, 0x97, 0x69, 0xaf, 0x1c, 0x91, 0x6c, 0x63, }}, /* Byte value: 0x3f */ + {{0x48, 0x67, 0x45, 0x6a, 0xe7, 0xb7, 0xfd, 0xf6, }}, /* Byte value: 0x40 */ + {{0x68, 0x2d, 0x9d, 0xd8, 0x9b, 0xa6, 0xb2, 0xc3, }}, /* Byte value: 0x41 */ + {{0xe4, 0xad, 0x56, 0x1f, 0x59, 0xdc, 0xfe, 0xc5, }}, /* Byte value: 0x42 */ + {{0xd8, 0xa9, 0xcf, 0xbe, 0xea, 0x1a, 0xc4, 0xd9, }}, /* Byte value: 0x43 */ + {{0xfb, 0x89, 0x8d, 0xff, 0x3b, 0xe5, 0xd7, 0x39, }}, /* Byte value: 0x44 */ + {{0xe2, 0x79, 0xa1, 0x3a, 0xc0, 0xc3, 0x46, 0xac, }}, /* Byte value: 0x45 */ + {{0x9c, 0xa5, 0xa7, 0x9e, 0xfc, 0x93, 0x8a, 0xfd, }}, /* Byte value: 0x46 */ + {{0x1a, 0x9a, 0xb6, 0x36, 0x56, 0xc8, 0xcd, 0x40, }}, /* Byte value: 0x47 */ + {{0xee, 0x12, 0x8c, 0x70, 0x31, 0xfd, 0xf5, 0x7e, }}, /* Byte value: 0x48 */ + {{0xad, 0xec, 0x65, 0x24, 0x64, 0x31, 0x37, 0xc1, }}, /* Byte value: 0x49 */ + {{0x84, 0x73, 0xfd, 0x0a, 0xdd, 0xef, 0x2f, 0x9a, }}, /* Byte value: 0x4a */ + {{0xcb, 0xe6, 0x39, 0x14, 0x79, 0x1d, 0x5e, 0xf7, }}, /* Byte value: 0x4b */ + {{0x7b, 0x62, 0x6b, 0x72, 0x08, 0xa1, 0x28, 0xed, }}, /* Byte value: 0x4c */ + {{0x45, 0x2a, 0x1e, 0x71, 0xcc, 0xd3, 0x7a, 0xd6, }}, /* Byte value: 0x4d */ + {{0xfa, 0xaf, 0xfb, 0xae, 0xe1, 0xbf, 0xe3, 0xcb, }}, /* Byte value: 0x4e */ + {{0x4c, 0xff, 0x5e, 0xed, 0x09, 0x1c, 0x2d, 0xb8, }}, /* Byte value: 0x4f */ + {{0x2c, 0x21, 0xf5, 0xf8, 0x8d, 0x2f, 0xfc, 0xe7, }}, /* Byte value: 0x50 */ + {{0x6c, 0xb5, 0x86, 0x5f, 0x75, 0x0d, 0x62, 0x8d, }}, /* Byte value: 0x51 */ + {{0x7a, 0x44, 0x1d, 0x23, 0xd2, 0xfb, 0x1c, 0x1f, }}, /* Byte value: 0x52 */ + {{0x6a, 0x61, 0x71, 0x7a, 0xec, 0x12, 0xda, 0xe4, }}, /* Byte value: 0x53 */ + {{0x47, 0x66, 0xf2, 0xd3, 0xbb, 0x67, 0x12, 0xf1, }}, /* Byte value: 0x54 */ + {{0x34, 0xf7, 0xaf, 0x6c, 0xac, 0x53, 0x59, 0x80, }}, /* Byte value: 0x55 */ + {{0x89, 0x3e, 0xa6, 0x11, 0xf6, 0x8b, 0xa8, 0xba, }}, /* Byte value: 0x56 */ + {{0xbb, 0x1d, 0xfe, 0x58, 0xc3, 0xc7, 0x49, 0x53, }}, /* Byte value: 0x57 */ + {{0x1c, 0x4e, 0x41, 0x13, 0xcf, 0xd7, 0x75, 0x29, }}, /* Byte value: 0x58 */ + {{0xda, 0xe5, 0x23, 0x1c, 0x9d, 0xae, 0xac, 0xfe, }}, /* Byte value: 0x59 */ + {{0x77, 0x09, 0x46, 0x38, 0xf9, 0x9f, 0x9b, 0x3f, }}, /* Byte value: 0x5a */ + {{0xe9, 0xe0, 0x0d, 0x04, 0x72, 0xb8, 0x79, 0xe5, }}, /* Byte value: 0x5b */ + {{0x8b, 0x72, 0x4a, 0xb3, 0x81, 0x3f, 0xc0, 0x9d, }}, /* Byte value: 0x5c */ + {{0x98, 0x3d, 0xbc, 0x19, 0x12, 0x38, 0x5a, 0xb3, }}, /* Byte value: 0x5d */ + {{0x4a, 0x2b, 0xa9, 0xc8, 0x90, 0x03, 0x95, 0xd1, }}, /* Byte value: 0x5e */ + {{0x8a, 0x54, 0x3c, 0xe2, 0x5b, 0x65, 0xf4, 0x6f, }}, /* Byte value: 0x5f */ + {{0x79, 0x2e, 0x87, 0xd0, 0x7f, 0x15, 0x40, 0xca, }}, /* Byte value: 0x60 */ + {{0x96, 0x1a, 0x7d, 0xf1, 0x94, 0xb2, 0x81, 0x46, }}, /* Byte value: 0x61 */ + {{0xd1, 0x7c, 0x8f, 0x22, 0x2f, 0xd5, 0x93, 0xb7, }}, /* Byte value: 0x62 */ + {{0xb5, 0x3a, 0x3f, 0xb0, 0x45, 0x4d, 0x92, 0xa6, }}, /* Byte value: 0x63 */ + {{0x16, 0xf1, 0x9b, 0x7c, 0xa7, 0xf6, 0x7e, 0x92, }}, /* Byte value: 0x64 */ + {{0x5d, 0xfc, 0x44, 0xe5, 0xed, 0xaf, 0xdf, 0xb1, }}, /* Byte value: 0x65 */ + {{0x63, 0xb4, 0x31, 0xe6, 0x29, 0xdd, 0x8d, 0x8a, }}, /* Byte value: 0x66 */ + {{0x6b, 0x47, 0x07, 0x2b, 0x36, 0x48, 0xee, 0x16, }}, /* Byte value: 0x67 */ + {{0xd5, 0xe4, 0x94, 0xa5, 0xc1, 0x7e, 0x43, 0xf9, }}, /* Byte value: 0x68 */ + {{0xf3, 0x7a, 0xbb, 0x32, 0x24, 0x70, 0xb4, 0xa5, }}, /* Byte value: 0x69 */ + {{0x6e, 0xf9, 0x6a, 0xfd, 0x02, 0xb9, 0x0a, 0xaa, }}, /* Byte value: 0x6a */ + {{0xf1, 0x36, 0x57, 0x90, 0x53, 0xc4, 0xdc, 0x82, }}, /* Byte value: 0x6b */ + {{0x50, 0xb1, 0x1f, 0xfe, 0xc6, 0xcb, 0x58, 0x91, }}, /* Byte value: 0x6c */ + {{0x6d, 0x93, 0xf0, 0x0e, 0xaf, 0x57, 0x56, 0x7f, }}, /* Byte value: 0x6d */ + {{0x82, 0xa7, 0x0a, 0x2f, 0x44, 0xf0, 0x97, 0xf3, }}, /* Byte value: 0x6e */ + {{0xf6, 0xc4, 0xd6, 0xe4, 0x10, 0x81, 0x50, 0x19, }}, /* Byte value: 0x6f */ + {{0xdd, 0x17, 0xa2, 0x68, 0xde, 0xeb, 0x20, 0x65, }}, /* Byte value: 0x70 */ + {{0x15, 0x9b, 0x01, 0x8f, 0x0a, 0x18, 0x22, 0x47, }}, /* Byte value: 0x71 */ + {{0x4e, 0xb3, 0xb2, 0x4f, 0x7e, 0xa8, 0x45, 0x9f, }}, /* Byte value: 0x72 */ + {{0x53, 0xdb, 0x85, 0x0d, 0x6b, 0x25, 0x04, 0x44, }}, /* Byte value: 0x73 */ + {{0x8e, 0xcc, 0x27, 0x65, 0xb5, 0xce, 0x24, 0x21, }}, /* Byte value: 0x74 */ + {{0xd4, 0xc2, 0xe2, 0xf4, 0x1b, 0x24, 0x77, 0x0b, }}, /* Byte value: 0x75 */ + {{0x0b, 0x99, 0xac, 0x3e, 0xb2, 0x7b, 0x3f, 0x49, }}, /* Byte value: 0x76 */ + {{0xcf, 0x7e, 0x22, 0x93, 0x97, 0xb6, 0x8e, 0xb9, }}, /* Byte value: 0x77 */ + {{0xdc, 0x31, 0xd4, 0x39, 0x04, 0xb1, 0x14, 0x97, }}, /* Byte value: 0x78 */ + {{0x9d, 0x83, 0xd1, 0xcf, 0x26, 0xc9, 0xbe, 0x0f, }}, /* Byte value: 0x79 */ + {{0x69, 0x0b, 0xeb, 0x89, 0x41, 0xfc, 0x86, 0x31, }}, /* Byte value: 0x7a */ + {{0x99, 0x1b, 0xca, 0x48, 0xc8, 0x62, 0x6e, 0x41, }}, /* Byte value: 0x7b */ + {{0x1f, 0x24, 0xdb, 0xe0, 0x62, 0x39, 0x29, 0xfc, }}, /* Byte value: 0x7c */ + {{0x25, 0xf4, 0xb5, 0x64, 0x48, 0xe0, 0xab, 0x89, }}, /* Byte value: 0x7d */ + {{0x28, 0xb9, 0xee, 0x7f, 0x63, 0x84, 0x2c, 0xa9, }}, /* Byte value: 0x7e */ + {{0xd7, 0xa8, 0x78, 0x07, 0xb6, 0xca, 0x2b, 0xde, }}, /* Byte value: 0x7f */ + {{0x13, 0x4f, 0xf6, 0xaa, 0x93, 0x07, 0x9a, 0x2e, }}, /* Byte value: 0x80 */ + {{0x9a, 0x71, 0x50, 0xbb, 0x65, 0x8c, 0x32, 0x94, }}, /* Byte value: 0x81 */ + {{0xc0, 0x7f, 0x95, 0x2a, 0xcb, 0x66, 0x61, 0xbe, }}, /* Byte value: 0x82 */ + {{0x87, 0x19, 0x67, 0xf9, 0x70, 0x01, 0x73, 0x4f, }}, /* Byte value: 0x83 */ + {{0xc6, 0xab, 0x62, 0x0f, 0x52, 0x79, 0xd9, 0xd7, }}, /* Byte value: 0x84 */ + {{0xbc, 0xef, 0x7f, 0x2c, 0x80, 0x82, 0xc5, 0xc8, }}, /* Byte value: 0x85 */ + {{0x9e, 0xe9, 0x4b, 0x3c, 0x8b, 0x27, 0xe2, 0xda, }}, /* Byte value: 0x86 */ + {{0xb2, 0xc8, 0xbe, 0xc4, 0x06, 0x08, 0x1e, 0x3d, }}, /* Byte value: 0x87 */ + {{0x0d, 0x4d, 0x5b, 0x1b, 0x2b, 0x64, 0x87, 0x20, }}, /* Byte value: 0x88 */ + {{0x73, 0x91, 0x5d, 0xbf, 0x17, 0x34, 0x4b, 0x71, }}, /* Byte value: 0x89 */ + {{0x02, 0x4c, 0xec, 0xa2, 0x77, 0xb4, 0x68, 0x27, }}, /* Byte value: 0x8a */ + {{0x32, 0x23, 0x58, 0x49, 0x35, 0x4c, 0xe1, 0xe9, }}, /* Byte value: 0x8b */ + {{0x5b, 0x28, 0xb3, 0xc0, 0x74, 0xb0, 0x67, 0xd8, }}, /* Byte value: 0x8c */ + {{0x40, 0x94, 0x73, 0xa7, 0xf8, 0x22, 0x9e, 0x6a, }}, /* Byte value: 0x8d */ + {{0x66, 0x0a, 0x5c, 0x30, 0x1d, 0x2c, 0x69, 0x36, }}, /* Byte value: 0x8e */ + {{0x10, 0x25, 0x6c, 0x59, 0x3e, 0xe9, 0xc6, 0xfb, }}, /* Byte value: 0x8f */ + {{0x3e, 0x48, 0x75, 0x03, 0xc4, 0x72, 0x52, 0x3b, }}, /* Byte value: 0x90 */ + {{0xa2, 0xed, 0xd2, 0x9d, 0x38, 0xe1, 0xd8, 0xc6, }}, /* Byte value: 0x91 */ + {{0xb6, 0x50, 0xa5, 0x43, 0xe8, 0xa3, 0xce, 0x73, }}, /* Byte value: 0x92 */ + {{0x4d, 0xd9, 0x28, 0xbc, 0xd3, 0x46, 0x19, 0x4a, }}, /* Byte value: 0x93 */ + {{0x43, 0xfe, 0xe9, 0x54, 0x55, 0xcc, 0xc2, 0xbf, }}, /* Byte value: 0x94 */ + {{0xa7, 0x53, 0xbf, 0x4b, 0x0c, 0x10, 0x3c, 0x7a, }}, /* Byte value: 0x95 */ + {{0x4f, 0x95, 0xc4, 0x1e, 0xa4, 0xf2, 0x71, 0x6d, }}, /* Byte value: 0x96 */ + {{0x07, 0xf2, 0x81, 0x74, 0x43, 0x45, 0x8c, 0x9b, }}, /* Byte value: 0x97 */ + {{0x01, 0x26, 0x76, 0x51, 0xda, 0x5a, 0x34, 0xf2, }}, /* Byte value: 0x98 */ + {{0x19, 0xf0, 0x2c, 0xc5, 0xfb, 0x26, 0x91, 0x95, }}, /* Byte value: 0x99 */ + {{0xe7, 0xc7, 0xcc, 0xec, 0xf4, 0x32, 0xa2, 0x10, }}, /* Byte value: 0x9a */ + {{0x86, 0x3f, 0x11, 0xa8, 0xaa, 0x5b, 0x47, 0xbd, }}, /* Byte value: 0x9b */ + {{0xcc, 0x14, 0xb8, 0x60, 0x3a, 0x58, 0xd2, 0x6c, }}, /* Byte value: 0x9c */ + {{0x20, 0x4a, 0xd8, 0xb2, 0x7c, 0x11, 0x4f, 0x35, }}, /* Byte value: 0x9d */ + {{0x0a, 0xbf, 0xda, 0x6f, 0x68, 0x21, 0x0b, 0xbb, }}, /* Byte value: 0x9e */ + {{0x3c, 0x04, 0x99, 0xa1, 0xb3, 0xc6, 0x3a, 0x1c, }}, /* Byte value: 0x9f */ + {{0x3a, 0xd0, 0x6e, 0x84, 0x2a, 0xd9, 0x82, 0x75, }}, /* Byte value: 0xa0 */ + {{0x31, 0x49, 0xc2, 0xba, 0x98, 0xa2, 0xbd, 0x3c, }}, /* Byte value: 0xa1 */ + {{0xff, 0x11, 0x96, 0x78, 0xd5, 0x4e, 0x07, 0x77, }}, /* Byte value: 0xa2 */ + {{0x71, 0xdd, 0xb1, 0x1d, 0x60, 0x80, 0x23, 0x56, }}, /* Byte value: 0xa3 */ + {{0x41, 0xb2, 0x05, 0xf6, 0x22, 0x78, 0xaa, 0x98, }}, /* Byte value: 0xa4 */ + {{0x0f, 0x01, 0xb7, 0xb9, 0x5c, 0xd0, 0xef, 0x07, }}, /* Byte value: 0xa5 */ + {{0xf0, 0x10, 0x21, 0xc1, 0x89, 0x9e, 0xe8, 0x70, }}, /* Byte value: 0xa6 */ + {{0x2d, 0x07, 0x83, 0xa9, 0x57, 0x75, 0xc8, 0x15, }}, /* Byte value: 0xa7 */ + {{0xa6, 0x75, 0xc9, 0x1a, 0xd6, 0x4a, 0x08, 0x88, }}, /* Byte value: 0xa8 */ + {{0x5a, 0x0e, 0xc5, 0x91, 0xae, 0xea, 0x53, 0x2a, }}, /* Byte value: 0xa9 */ + {{0x14, 0xbd, 0x77, 0xde, 0xd0, 0x42, 0x16, 0xb5, }}, /* Byte value: 0xaa */ + {{0xc4, 0xe7, 0x8e, 0xad, 0x25, 0xcd, 0xb1, 0xf0, }}, /* Byte value: 0xab */ + {{0xb4, 0x1c, 0x49, 0xe1, 0x9f, 0x17, 0xa6, 0x54, }}, /* Byte value: 0xac */ + {{0xc8, 0x8c, 0xa3, 0xe7, 0xd4, 0xf3, 0x02, 0x22, }}, /* Byte value: 0xad */ + {{0x92, 0x82, 0x66, 0x76, 0x7a, 0x19, 0x51, 0x08, }}, /* Byte value: 0xae */ + {{0x1d, 0x68, 0x37, 0x42, 0x15, 0x8d, 0x41, 0xdb, }}, /* Byte value: 0xaf */ + {{0x3d, 0x22, 0xef, 0xf0, 0x69, 0x9c, 0x0e, 0xee, }}, /* Byte value: 0xb0 */ + {{0x5e, 0x96, 0xde, 0x16, 0x40, 0x41, 0x83, 0x64, }}, /* Byte value: 0xb1 */ + {{0x74, 0x63, 0xdc, 0xcb, 0x54, 0x71, 0xc7, 0xea, }}, /* Byte value: 0xb2 */ + {{0x62, 0x92, 0x47, 0xb7, 0xf3, 0x87, 0xb9, 0x78, }}, /* Byte value: 0xb3 */ + {{0x26, 0x9e, 0x2f, 0x97, 0xe5, 0x0e, 0xf7, 0x5c, }}, /* Byte value: 0xb4 */ + {{0xf7, 0xe2, 0xa0, 0xb5, 0xca, 0xdb, 0x64, 0xeb, }}, /* Byte value: 0xb5 */ + {{0x9f, 0xcf, 0x3d, 0x6d, 0x51, 0x7d, 0xd6, 0x28, }}, /* Byte value: 0xb6 */ + {{0xe6, 0xe1, 0xba, 0xbd, 0x2e, 0x68, 0x96, 0xe2, }}, /* Byte value: 0xb7 */ + {{0x94, 0x56, 0x91, 0x53, 0xe3, 0x06, 0xe9, 0x61, }}, /* Byte value: 0xb8 */ + {{0x4b, 0x0d, 0xdf, 0x99, 0x4a, 0x59, 0xa1, 0x23, }}, /* Byte value: 0xb9 */ + {{0x33, 0x05, 0x2e, 0x18, 0xef, 0x16, 0xd5, 0x1b, }}, /* Byte value: 0xba */ + {{0x08, 0xf3, 0x36, 0xcd, 0x1f, 0x95, 0x63, 0x9c, }}, /* Byte value: 0xbb */ + {{0x17, 0xd7, 0xed, 0x2d, 0x7d, 0xac, 0x4a, 0x60, }}, /* Byte value: 0xbc */ + {{0xef, 0x34, 0xfa, 0x21, 0xeb, 0xa7, 0xc1, 0x8c, }}, /* Byte value: 0xbd */ + {{0x04, 0x98, 0x1b, 0x87, 0xee, 0xab, 0xd0, 0x4e, }}, /* Byte value: 0xbe */ + {{0x64, 0x46, 0xb0, 0x92, 0x6a, 0x98, 0x01, 0x11, }}, /* Byte value: 0xbf */ + {{0x0c, 0x6b, 0x2d, 0x4a, 0xf1, 0x3e, 0xb3, 0xd2, }}, /* Byte value: 0xc0 */ + {{0xa0, 0xa1, 0x3e, 0x3f, 0x4f, 0x55, 0xb0, 0xe1, }}, /* Byte value: 0xc1 */ + {{0x37, 0x9d, 0x35, 0x9f, 0x01, 0xbd, 0x05, 0x55, }}, /* Byte value: 0xc2 */ + {{0xc5, 0xc1, 0xf8, 0xfc, 0xff, 0x97, 0x85, 0x02, }}, /* Byte value: 0xc3 */ + {{0xb9, 0x51, 0x12, 0xfa, 0xb4, 0x73, 0x21, 0x74, }}, /* Byte value: 0xc4 */ + {{0x11, 0x03, 0x1a, 0x08, 0xe4, 0xb3, 0xf2, 0x09, }}, /* Byte value: 0xc5 */ + {{0x39, 0xba, 0xf4, 0x77, 0x87, 0x37, 0xde, 0xa0, }}, /* Byte value: 0xc6 */ + {{0xcd, 0x32, 0xce, 0x31, 0xe0, 0x02, 0xe6, 0x9e, }}, /* Byte value: 0xc7 */ + {{0x90, 0xce, 0x8a, 0xd4, 0x0d, 0xad, 0x39, 0x2f, }}, /* Byte value: 0xc8 */ + {{0xf2, 0x5c, 0xcd, 0x63, 0xfe, 0x2a, 0x80, 0x57, }}, /* Byte value: 0xc9 */ + {{0xe8, 0xc6, 0x7b, 0x55, 0xa8, 0xe2, 0x4d, 0x17, }}, /* Byte value: 0xca */ + {{0xac, 0xca, 0x13, 0x75, 0xbe, 0x6b, 0x03, 0x33, }}, /* Byte value: 0xcb */ + {{0x57, 0x43, 0x9e, 0x8a, 0x85, 0x8e, 0xd4, 0x0a, }}, /* Byte value: 0xcc */ + {{0xf4, 0x88, 0x3a, 0x46, 0x67, 0x35, 0x38, 0x3e, }}, /* Byte value: 0xcd */ + {{0x7d, 0xb6, 0x9c, 0x57, 0x91, 0xbe, 0x90, 0x84, }}, /* Byte value: 0xce */ + {{0xa8, 0x52, 0x08, 0xf2, 0x50, 0xc0, 0xd3, 0x7d, }}, /* Byte value: 0xcf */ + {{0xd2, 0x16, 0x15, 0xd1, 0x82, 0x3b, 0xcf, 0x62, }}, /* Byte value: 0xd0 */ + {{0x49, 0x41, 0x33, 0x3b, 0x3d, 0xed, 0xc9, 0x04, }}, /* Byte value: 0xd1 */ + {{0xa4, 0x39, 0x25, 0xb8, 0xa1, 0xfe, 0x60, 0xaf, }}, /* Byte value: 0xd2 */ + {{0x83, 0x81, 0x7c, 0x7e, 0x9e, 0xaa, 0xa3, 0x01, }}, /* Byte value: 0xd3 */ + {{0xfd, 0x5d, 0x7a, 0xda, 0xa2, 0xfa, 0x6f, 0x50, }}, /* Byte value: 0xd4 */ + {{0xd9, 0x8f, 0xb9, 0xef, 0x30, 0x40, 0xf0, 0x2b, }}, /* Byte value: 0xd5 */ + {{0xe3, 0x5f, 0xd7, 0x6b, 0x1a, 0x99, 0x72, 0x5e, }}, /* Byte value: 0xd6 */ + {{0xb7, 0x76, 0xd3, 0x12, 0x32, 0xf9, 0xfa, 0x81, }}, /* Byte value: 0xd7 */ + {{0xc2, 0x33, 0x79, 0x88, 0xbc, 0xd2, 0x09, 0x99, }}, /* Byte value: 0xd8 */ + {{0x27, 0xb8, 0x59, 0xc6, 0x3f, 0x54, 0xc3, 0xae, }}, /* Byte value: 0xd9 */ + {{0xed, 0x78, 0x16, 0x83, 0x9c, 0x13, 0xa9, 0xab, }}, /* Byte value: 0xda */ + {{0x9b, 0x57, 0x26, 0xea, 0xbf, 0xd6, 0x06, 0x66, }}, /* Byte value: 0xdb */ + {{0x52, 0xfd, 0xf3, 0x5c, 0xb1, 0x7f, 0x30, 0xb6, }}, /* Byte value: 0xdc */ + {{0x54, 0x29, 0x04, 0x79, 0x28, 0x60, 0x88, 0xdf, }}, /* Byte value: 0xdd */ + {{0xbf, 0x85, 0xe5, 0xdf, 0x2d, 0x6c, 0x99, 0x1d, }}, /* Byte value: 0xde */ + {{0x24, 0xd2, 0xc3, 0x35, 0x92, 0xba, 0x9f, 0x7b, }}, /* Byte value: 0xdf */ + {{0xc1, 0x59, 0xe3, 0x7b, 0x11, 0x3c, 0x55, 0x4c, }}, /* Byte value: 0xe0 */ + {{0xd3, 0x30, 0x63, 0x80, 0x58, 0x61, 0xfb, 0x90, }}, /* Byte value: 0xe1 */ + {{0xa1, 0x87, 0x48, 0x6e, 0x95, 0x0f, 0x84, 0x13, }}, /* Byte value: 0xe2 */ + {{0x44, 0x0c, 0x68, 0x20, 0x16, 0x89, 0x4e, 0x24, }}, /* Byte value: 0xe3 */ + {{0xdb, 0xc3, 0x55, 0x4d, 0x47, 0xf4, 0x98, 0x0c, }}, /* Byte value: 0xe4 */ + {{0x2e, 0x6d, 0x19, 0x5a, 0xfa, 0x9b, 0x94, 0xc0, }}, /* Byte value: 0xe5 */ + {{0x72, 0xb7, 0x2b, 0xee, 0xcd, 0x6e, 0x7f, 0x83, }}, /* Byte value: 0xe6 */ + {{0x59, 0x64, 0x5f, 0x62, 0x03, 0x04, 0x0f, 0xff, }}, /* Byte value: 0xe7 */ + {{0x78, 0x08, 0xf1, 0x81, 0xa5, 0x4f, 0x74, 0x38, }}, /* Byte value: 0xe8 */ + {{0xe5, 0x8b, 0x20, 0x4e, 0x83, 0x86, 0xca, 0x37, }}, /* Byte value: 0xe9 */ + {{0xba, 0x3b, 0x88, 0x09, 0x19, 0x9d, 0x7d, 0xa1, }}, /* Byte value: 0xea */ + {{0x12, 0x69, 0x80, 0xfb, 0x49, 0x5d, 0xae, 0xdc, }}, /* Byte value: 0xeb */ + {{0x95, 0x70, 0xe7, 0x02, 0x39, 0x5c, 0xdd, 0x93, }}, /* Byte value: 0xec */ + {{0x2b, 0xd3, 0x74, 0x8c, 0xce, 0x6a, 0x70, 0x7c, }}, /* Byte value: 0xed */ + {{0x2a, 0xf5, 0x02, 0xdd, 0x14, 0x30, 0x44, 0x8e, }}, /* Byte value: 0xee */ + {{0xf5, 0xae, 0x4c, 0x17, 0xbd, 0x6f, 0x0c, 0xcc, }}, /* Byte value: 0xef */ + {{0xb1, 0xa2, 0x24, 0x37, 0xab, 0xe6, 0x42, 0xe8, }}, /* Byte value: 0xf0 */ + {{0x22, 0x06, 0x34, 0x10, 0x0b, 0xa5, 0x27, 0x12, }}, /* Byte value: 0xf1 */ + {{0x81, 0xcd, 0x90, 0xdc, 0xe9, 0x1e, 0xcb, 0x26, }}, /* Byte value: 0xf2 */ + {{0x88, 0x18, 0xd0, 0x40, 0x2c, 0xd1, 0x9c, 0x48, }}, /* Byte value: 0xf3 */ + {{0x58, 0x42, 0x29, 0x33, 0xd9, 0x5e, 0x3b, 0x0d, }}, /* Byte value: 0xf4 */ + {{0x0e, 0x27, 0xc1, 0xe8, 0x86, 0x8a, 0xdb, 0xf5, }}, /* Byte value: 0xf5 */ + {{0xc9, 0xaa, 0xd5, 0xb6, 0x0e, 0xa9, 0x36, 0xd0, }}, /* Byte value: 0xf6 */ + {{0xe0, 0x35, 0x4d, 0x98, 0xb7, 0x77, 0x2e, 0x8b, }}, /* Byte value: 0xf7 */ + {{0x2f, 0x4b, 0x6f, 0x0b, 0x20, 0xc1, 0xa0, 0x32, }}, /* Byte value: 0xf8 */ + {{0x09, 0xd5, 0x40, 0x9c, 0xc5, 0xcf, 0x57, 0x6e, }}, /* Byte value: 0xf9 */ + {{0xc7, 0x8d, 0x14, 0x5e, 0x88, 0x23, 0xed, 0x25, }}, /* Byte value: 0xfa */ + {{0x93, 0xa4, 0x10, 0x27, 0xa0, 0x43, 0x65, 0xfa, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x29, 0x9f, 0x98, 0x2e, 0xb9, 0xde, 0x18, 0x5b, }}, /* Byte value: 0xfd */ + {{0x05, 0xbe, 0x6d, 0xd6, 0x34, 0xf1, 0xe4, 0xbc, }}, /* Byte value: 0xfe */ + {{0x56, 0x65, 0xe8, 0xdb, 0x5f, 0xd4, 0xe0, 0xf8, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 3 */ + {{0x42, 0xc5, 0x39, 0xbd, 0xfd, 0x81, 0x87, 0xfe, }}, /* Byte value: 0x00 */ + {{0x12, 0xde, 0x45, 0x61, 0xc3, 0xdf, 0xcc, 0x2b, }}, /* Byte value: 0x01 */ + {{0xca, 0x1f, 0xff, 0xa8, 0x9e, 0x12, 0xd5, 0x1c, }}, /* Byte value: 0x02 */ + {{0x39, 0x66, 0x56, 0x24, 0x2b, 0x05, 0x5f, 0x06, }}, /* Byte value: 0x03 */ + {{0xd2, 0xfa, 0x54, 0x33, 0x2a, 0xb6, 0x28, 0x65, }}, /* Byte value: 0x04 */ + {{0xa1, 0xbb, 0xe3, 0x62, 0x90, 0xef, 0x1a, 0x0b, }}, /* Byte value: 0x05 */ + {{0xce, 0x6e, 0x93, 0xcc, 0xa8, 0x9d, 0xa0, 0x57, }}, /* Byte value: 0x06 */ + {{0xc1, 0xa9, 0x0a, 0x4b, 0x05, 0x3a, 0x68, 0x2c, }}, /* Byte value: 0x07 */ + {{0xf6, 0x85, 0xde, 0xf1, 0x6f, 0xcb, 0x73, 0x33, }}, /* Byte value: 0x08 */ + {{0x03, 0x54, 0x2d, 0x2b, 0xf7, 0xf5, 0x57, 0xa6, }}, /* Byte value: 0x09 */ + {{0x33, 0x5d, 0xb8, 0xde, 0x5c, 0x7e, 0x6e, 0x54, }}, /* Byte value: 0x0a */ + {{0x1a, 0x3c, 0x9d, 0xa9, 0xaf, 0x02, 0x26, 0xbd, }}, /* Byte value: 0x0b */ + {{0x22, 0xd7, 0xd0, 0x94, 0x68, 0x54, 0xf5, 0xd9, }}, /* Byte value: 0x0c */ + {{0x8d, 0x26, 0xb1, 0x68, 0xb9, 0x4f, 0xab, 0xcb, }}, /* Byte value: 0x0d */ + {{0x4b, 0xaa, 0xfa, 0x6c, 0x7d, 0x0f, 0xe1, 0x0a, }}, /* Byte value: 0x0e */ + {{0x35, 0xf5, 0xe2, 0x88, 0x71, 0x57, 0xc0, 0xdb, }}, /* Byte value: 0x0f */ + {{0x57, 0x3e, 0x3d, 0x93, 0xff, 0x24, 0x69, 0x38, }}, /* Byte value: 0x10 */ + {{0xbf, 0xf6, 0x12, 0xaf, 0x09, 0x62, 0x49, 0xfd, }}, /* Byte value: 0x11 */ + {{0x49, 0x73, 0xcc, 0x5e, 0x66, 0xa9, 0x3a, 0xce, }}, /* Byte value: 0x12 */ + {{0x24, 0x7f, 0x8a, 0xc2, 0x45, 0x7d, 0x5b, 0x56, }}, /* Byte value: 0x13 */ + {{0x67, 0x37, 0xa8, 0x66, 0x54, 0xaf, 0x50, 0xca, }}, /* Byte value: 0x14 */ + {{0x81, 0xb5, 0x05, 0xc4, 0xe3, 0x1d, 0x34, 0x16, }}, /* Byte value: 0x15 */ + {{0x69, 0x7d, 0x2a, 0xf8, 0x15, 0x5b, 0x14, 0xd3, }}, /* Byte value: 0x16 */ + {{0xb1, 0xbc, 0x90, 0x31, 0x48, 0x96, 0x0d, 0xe4, }}, /* Byte value: 0x17 */ + {{0xab, 0x80, 0x0d, 0x98, 0xe7, 0x94, 0x2b, 0x59, }}, /* Byte value: 0x18 */ + {{0x34, 0x78, 0xf9, 0x91, 0x9d, 0x04, 0x4c, 0xb9, }}, /* Byte value: 0x19 */ + {{0x2f, 0xc9, 0x7f, 0x21, 0xde, 0x55, 0xe6, 0x66, }}, /* Byte value: 0x1a */ + {{0xcb, 0x92, 0xe4, 0xb1, 0x72, 0x41, 0x59, 0x7e, }}, /* Byte value: 0x1b */ + {{0xc4, 0x55, 0x7d, 0x36, 0xdf, 0xe6, 0x91, 0x05, }}, /* Byte value: 0x1c */ + {{0x7c, 0x86, 0x2e, 0xd6, 0x17, 0xfe, 0xfa, 0x15, }}, /* Byte value: 0x1d */ + {{0x96, 0x97, 0x37, 0xd8, 0xfa, 0x1e, 0x01, 0x14, }}, /* Byte value: 0x1e */ + {{0xa7, 0x13, 0xb9, 0x34, 0xbd, 0xc6, 0xb4, 0x84, }}, /* Byte value: 0x1f */ + {{0xbe, 0x7b, 0x09, 0xb6, 0xe5, 0x31, 0xc5, 0x9f, }}, /* Byte value: 0x20 */ + {{0x16, 0xaf, 0x29, 0x05, 0xf5, 0x50, 0xb9, 0x60, }}, /* Byte value: 0x21 */ + {{0x52, 0xc2, 0x4a, 0xee, 0x25, 0xf8, 0x90, 0x11, }}, /* Byte value: 0x22 */ + {{0xb9, 0x5e, 0x48, 0xf9, 0x24, 0x4b, 0xe7, 0x72, }}, /* Byte value: 0x23 */ + {{0x54, 0x6a, 0x10, 0xb8, 0x08, 0xd1, 0x3e, 0x9e, }}, /* Byte value: 0x24 */ + {{0xba, 0x0a, 0x65, 0xd2, 0xd3, 0xbe, 0xb0, 0xd4, }}, /* Byte value: 0x25 */ + {{0x92, 0xe6, 0x5b, 0xbc, 0xcc, 0x91, 0x74, 0x5f, }}, /* Byte value: 0x26 */ + {{0x48, 0xfe, 0xd7, 0x47, 0x8a, 0xfa, 0xb6, 0xac, }}, /* Byte value: 0x27 */ + {{0xe5, 0xd6, 0x80, 0x89, 0x40, 0x47, 0x33, 0x7a, }}, /* Byte value: 0x28 */ + {{0x3e, 0x43, 0x17, 0x6b, 0xea, 0x7f, 0x7d, 0xeb, }}, /* Byte value: 0x29 */ + {{0x45, 0xe0, 0x78, 0xf2, 0x3c, 0xfb, 0xa5, 0x13, }}, /* Byte value: 0x2a */ + {{0xbc, 0xa2, 0x3f, 0x84, 0xfe, 0x97, 0x1e, 0x5b, }}, /* Byte value: 0x2b */ + {{0x95, 0xc3, 0x1a, 0xf3, 0x0d, 0xeb, 0x56, 0xb2, }}, /* Byte value: 0x2c */ + {{0x68, 0xf0, 0x31, 0xe1, 0xf9, 0x08, 0x98, 0xb1, }}, /* Byte value: 0x2d */ + {{0xdc, 0xb0, 0xd6, 0xad, 0x6b, 0x42, 0x6c, 0x7c, }}, /* Byte value: 0x2e */ + {{0xf7, 0x08, 0xc5, 0xe8, 0x83, 0x98, 0xff, 0x51, }}, /* Byte value: 0x2f */ + {{0xae, 0x7c, 0x7a, 0xe5, 0x3d, 0x48, 0xd2, 0x70, }}, /* Byte value: 0x30 */ + {{0xbd, 0x2f, 0x24, 0x9d, 0x12, 0xc4, 0x92, 0x39, }}, /* Byte value: 0x31 */ + {{0x5f, 0xdc, 0xe5, 0x5b, 0x93, 0xf9, 0x83, 0xae, }}, /* Byte value: 0x32 */ + {{0x8c, 0xab, 0xaa, 0x71, 0x55, 0x1c, 0x27, 0xa9, }}, /* Byte value: 0x33 */ + {{0x2a, 0x35, 0x08, 0x5c, 0x04, 0x89, 0x1f, 0x4f, }}, /* Byte value: 0x34 */ + {{0x5d, 0x05, 0xd3, 0x69, 0x88, 0x5f, 0x58, 0x6a, }}, /* Byte value: 0x35 */ + {{0x65, 0xee, 0x9e, 0x54, 0x4f, 0x09, 0x8b, 0x0e, }}, /* Byte value: 0x36 */ + {{0x7a, 0x2e, 0x74, 0x80, 0x3a, 0xd7, 0x54, 0x9a, }}, /* Byte value: 0x37 */ + {{0x44, 0x6d, 0x63, 0xeb, 0xd0, 0xa8, 0x29, 0x71, }}, /* Byte value: 0x38 */ + {{0xd9, 0x4c, 0xa1, 0xd0, 0xb1, 0x9e, 0x95, 0x55, }}, /* Byte value: 0x39 */ + {{0x93, 0x6b, 0x40, 0xa5, 0x20, 0xc2, 0xf8, 0x3d, }}, /* Byte value: 0x3a */ + {{0x98, 0xdd, 0xb5, 0x46, 0xbb, 0xea, 0x45, 0x0d, }}, /* Byte value: 0x3b */ + {{0x7b, 0xa3, 0x6f, 0x99, 0xd6, 0x84, 0xd8, 0xf8, }}, /* Byte value: 0x3c */ + {{0xe0, 0x2a, 0xf7, 0xf4, 0x9a, 0x9b, 0xca, 0x53, }}, /* Byte value: 0x3d */ + {{0xe9, 0x45, 0x34, 0x25, 0x1a, 0x15, 0xac, 0xa7, }}, /* Byte value: 0x3e */ + {{0x1d, 0x19, 0xdc, 0xe6, 0x6e, 0x78, 0x04, 0x50, }}, /* Byte value: 0x3f */ + {{0x7e, 0x5f, 0x18, 0xe4, 0x0c, 0x58, 0x21, 0xd1, }}, /* Byte value: 0x40 */ + {{0x46, 0xb4, 0x55, 0xd9, 0xcb, 0x0e, 0xf2, 0xb5, }}, /* Byte value: 0x41 */ + {{0xaf, 0xf1, 0x61, 0xfc, 0xd1, 0x1b, 0x5e, 0x12, }}, /* Byte value: 0x42 */ + {{0x82, 0xe1, 0x28, 0xef, 0x14, 0xe8, 0x63, 0xb0, }}, /* Byte value: 0x43 */ + {{0x29, 0x61, 0x25, 0x77, 0xf3, 0x7c, 0x48, 0xe9, }}, /* Byte value: 0x44 */ + {{0x4a, 0x27, 0xe1, 0x75, 0x91, 0x5c, 0x6d, 0x68, }}, /* Byte value: 0x45 */ + {{0xf5, 0xd1, 0xf3, 0xda, 0x98, 0x3e, 0x24, 0x95, }}, /* Byte value: 0x46 */ + {{0xf0, 0x2d, 0x84, 0xa7, 0x42, 0xe2, 0xdd, 0xbc, }}, /* Byte value: 0x47 */ + {{0x43, 0x48, 0x22, 0xa4, 0x11, 0xd2, 0x0b, 0x9c, }}, /* Byte value: 0x48 */ + {{0xa0, 0x36, 0xf8, 0x7b, 0x7c, 0xbc, 0x96, 0x69, }}, /* Byte value: 0x49 */ + {{0xe7, 0x0f, 0xb6, 0xbb, 0x5b, 0xe1, 0xe8, 0xbe, }}, /* Byte value: 0x4a */ + {{0x0d, 0x1e, 0xaf, 0xb5, 0xb6, 0x01, 0x13, 0xbf, }}, /* Byte value: 0x4b */ + {{0xc9, 0x4b, 0xd2, 0x83, 0x69, 0xe7, 0x82, 0xba, }}, /* Byte value: 0x4c */ + {{0x06, 0xa8, 0x5a, 0x56, 0x2d, 0x29, 0xae, 0x8f, }}, /* Byte value: 0x4d */ + {{0x58, 0xf9, 0xa4, 0x14, 0x52, 0x83, 0xa1, 0x43, }}, /* Byte value: 0x4e */ + {{0x79, 0x7a, 0x59, 0xab, 0xcd, 0x22, 0x03, 0x3c, }}, /* Byte value: 0x4f */ + {{0x31, 0x84, 0x8e, 0xec, 0x47, 0xd8, 0xb5, 0x90, }}, /* Byte value: 0x50 */ + {{0x41, 0x91, 0x14, 0x96, 0x0a, 0x74, 0xd0, 0x58, }}, /* Byte value: 0x51 */ + {{0xb8, 0xd3, 0x53, 0xe0, 0xc8, 0x18, 0x6b, 0x10, }}, /* Byte value: 0x52 */ + {{0xa4, 0x47, 0x94, 0x1f, 0x4a, 0x33, 0xe3, 0x22, }}, /* Byte value: 0x53 */ + {{0xe4, 0x5b, 0x9b, 0x90, 0xac, 0x14, 0xbf, 0x18, }}, /* Byte value: 0x54 */ + {{0x23, 0x5a, 0xcb, 0x8d, 0x84, 0x07, 0x79, 0xbb, }}, /* Byte value: 0x55 */ + {{0x9f, 0xf8, 0xf4, 0x09, 0x7a, 0x90, 0x67, 0xe0, }}, /* Byte value: 0x56 */ + {{0x59, 0x74, 0xbf, 0x0d, 0xbe, 0xd0, 0x2d, 0x21, }}, /* Byte value: 0x57 */ + {{0x15, 0xfb, 0x04, 0x2e, 0x02, 0xa5, 0xee, 0xc6, }}, /* Byte value: 0x58 */ + {{0x60, 0x12, 0xe9, 0x29, 0x95, 0xd5, 0x72, 0x27, }}, /* Byte value: 0x59 */ + {{0xc0, 0x24, 0x11, 0x52, 0xe9, 0x69, 0xe4, 0x4e, }}, /* Byte value: 0x5a */ + {{0xd7, 0x06, 0x23, 0x4e, 0xf0, 0x6a, 0xd1, 0x4c, }}, /* Byte value: 0x5b */ + {{0x7d, 0x0b, 0x35, 0xcf, 0xfb, 0xad, 0x76, 0x77, }}, /* Byte value: 0x5c */ + {{0xf2, 0xf4, 0xb2, 0x95, 0x59, 0x44, 0x06, 0x78, }}, /* Byte value: 0x5d */ + {{0x9c, 0xac, 0xd9, 0x22, 0x8d, 0x65, 0x30, 0x46, }}, /* Byte value: 0x5e */ + {{0x0c, 0x93, 0xb4, 0xac, 0x5a, 0x52, 0x9f, 0xdd, }}, /* Byte value: 0x5f */ + {{0x2b, 0xb8, 0x13, 0x45, 0xe8, 0xda, 0x93, 0x2d, }}, /* Byte value: 0x60 */ + {{0x19, 0x68, 0xb0, 0x82, 0x58, 0xf7, 0x71, 0x1b, }}, /* Byte value: 0x61 */ + {{0xfd, 0x33, 0x2b, 0x12, 0xf4, 0xe3, 0xce, 0x03, }}, /* Byte value: 0x62 */ + {{0xb2, 0xe8, 0xbd, 0x1a, 0xbf, 0x63, 0x5a, 0x42, }}, /* Byte value: 0x63 */ + {{0xf9, 0x42, 0x47, 0x76, 0xc2, 0x6c, 0xbb, 0x48, }}, /* Byte value: 0x64 */ + {{0x14, 0x76, 0x1f, 0x37, 0xee, 0xf6, 0x62, 0xa4, }}, /* Byte value: 0x65 */ + {{0xdb, 0x95, 0x97, 0xe2, 0xaa, 0x38, 0x4e, 0x91, }}, /* Byte value: 0x66 */ + {{0xd5, 0xdf, 0x15, 0x7c, 0xeb, 0xcc, 0x0a, 0x88, }}, /* Byte value: 0x67 */ + {{0xfa, 0x16, 0x6a, 0x5d, 0x35, 0x99, 0xec, 0xee, }}, /* Byte value: 0x68 */ + {{0x27, 0x2b, 0xa7, 0xe9, 0xb2, 0x88, 0x0c, 0xf0, }}, /* Byte value: 0x69 */ + {{0xa3, 0x62, 0xd5, 0x50, 0x8b, 0x49, 0xc1, 0xcf, }}, /* Byte value: 0x6a */ + {{0xc5, 0xd8, 0x66, 0x2f, 0x33, 0xb5, 0x1d, 0x67, }}, /* Byte value: 0x6b */ + {{0x6c, 0x81, 0x5d, 0x85, 0xcf, 0x87, 0xed, 0xfa, }}, /* Byte value: 0x6c */ + {{0x30, 0x09, 0x95, 0xf5, 0xab, 0x8b, 0x39, 0xf2, }}, /* Byte value: 0x6d */ + {{0x02, 0xd9, 0x36, 0x32, 0x1b, 0xa6, 0xdb, 0xc4, }}, /* Byte value: 0x6e */ + {{0x51, 0x96, 0x67, 0xc5, 0xd2, 0x0d, 0xc7, 0xb7, }}, /* Byte value: 0x6f */ + {{0xf4, 0x5c, 0xe8, 0xc3, 0x74, 0x6d, 0xa8, 0xf7, }}, /* Byte value: 0x70 */ + {{0x6a, 0x29, 0x07, 0xd3, 0xe2, 0xae, 0x43, 0x75, }}, /* Byte value: 0x71 */ + {{0x9b, 0x89, 0x98, 0x6d, 0x4c, 0x1f, 0x12, 0xab, }}, /* Byte value: 0x72 */ + {{0xff, 0xea, 0x1d, 0x20, 0xef, 0x45, 0x15, 0xc7, }}, /* Byte value: 0x73 */ + {{0x0b, 0xb6, 0xf5, 0xe3, 0x9b, 0x28, 0xbd, 0x30, }}, /* Byte value: 0x74 */ + {{0x8b, 0x8e, 0xeb, 0x3e, 0x94, 0x66, 0x05, 0x44, }}, /* Byte value: 0x75 */ + {{0x9d, 0x21, 0xc2, 0x3b, 0x61, 0x36, 0xbc, 0x24, }}, /* Byte value: 0x76 */ + {{0x0a, 0x3b, 0xee, 0xfa, 0x77, 0x7b, 0x31, 0x52, }}, /* Byte value: 0x77 */ + {{0x85, 0xc4, 0x69, 0xa0, 0xd5, 0x92, 0x41, 0x5d, }}, /* Byte value: 0x78 */ + {{0x84, 0x49, 0x72, 0xb9, 0x39, 0xc1, 0xcd, 0x3f, }}, /* Byte value: 0x79 */ + {{0x37, 0x2c, 0xd4, 0xba, 0x6a, 0xf1, 0x1b, 0x1f, }}, /* Byte value: 0x7a */ + {{0x83, 0x6c, 0x33, 0xf6, 0xf8, 0xbb, 0xef, 0xd2, }}, /* Byte value: 0x7b */ + {{0x86, 0x90, 0x44, 0x8b, 0x22, 0x67, 0x16, 0xfb, }}, /* Byte value: 0x7c */ + {{0x4e, 0x56, 0x8d, 0x11, 0xa7, 0xd3, 0x18, 0x23, }}, /* Byte value: 0x7d */ + {{0x36, 0xa1, 0xcf, 0xa3, 0x86, 0xa2, 0x97, 0x7d, }}, /* Byte value: 0x7e */ + {{0x18, 0xe5, 0xab, 0x9b, 0xb4, 0xa4, 0xfd, 0x79, }}, /* Byte value: 0x7f */ + {{0x8f, 0xff, 0x87, 0x5a, 0xa2, 0xe9, 0x70, 0x0f, }}, /* Byte value: 0x80 */ + {{0x10, 0x07, 0x73, 0x53, 0xd8, 0x79, 0x17, 0xef, }}, /* Byte value: 0x81 */ + {{0x90, 0x3f, 0x6d, 0x8e, 0xd7, 0x37, 0xaf, 0x9b, }}, /* Byte value: 0x82 */ + {{0x74, 0x64, 0xf6, 0x1e, 0x7b, 0x23, 0x10, 0x83, }}, /* Byte value: 0x83 */ + {{0x75, 0xe9, 0xed, 0x07, 0x97, 0x70, 0x9c, 0xe1, }}, /* Byte value: 0x84 */ + {{0xcd, 0x3a, 0xbe, 0xe7, 0x5f, 0x68, 0xf7, 0xf1, }}, /* Byte value: 0x85 */ + {{0x17, 0x22, 0x32, 0x1c, 0x19, 0x03, 0x35, 0x02, }}, /* Byte value: 0x86 */ + {{0x26, 0xa6, 0xbc, 0xf0, 0x5e, 0xdb, 0x80, 0x92, }}, /* Byte value: 0x87 */ + {{0x78, 0xf7, 0x42, 0xb2, 0x21, 0x71, 0x8f, 0x5e, }}, /* Byte value: 0x88 */ + {{0xc7, 0x01, 0x50, 0x1d, 0x28, 0x13, 0xc6, 0xa3, }}, /* Byte value: 0x89 */ + {{0xe2, 0xf3, 0xc1, 0xc6, 0x81, 0x3d, 0x11, 0x97, }}, /* Byte value: 0x8a */ + {{0xc6, 0x8c, 0x4b, 0x04, 0xc4, 0x40, 0x4a, 0xc1, }}, /* Byte value: 0x8b */ + {{0xf1, 0xa0, 0x9f, 0xbe, 0xae, 0xb1, 0x51, 0xde, }}, /* Byte value: 0x8c */ + {{0x70, 0x15, 0x9a, 0x7a, 0x4d, 0xac, 0x65, 0xc8, }}, /* Byte value: 0x8d */ + {{0xad, 0x28, 0x57, 0xce, 0xca, 0xbd, 0x85, 0xd6, }}, /* Byte value: 0x8e */ + {{0x1c, 0x94, 0xc7, 0xff, 0x82, 0x2b, 0x88, 0x32, }}, /* Byte value: 0x8f */ + {{0xcf, 0xe3, 0x88, 0xd5, 0x44, 0xce, 0x2c, 0x35, }}, /* Byte value: 0x90 */ + {{0x3a, 0x32, 0x7b, 0x0f, 0xdc, 0xf0, 0x08, 0xa0, }}, /* Byte value: 0x91 */ + {{0x21, 0x83, 0xfd, 0xbf, 0x9f, 0xa1, 0xa2, 0x7f, }}, /* Byte value: 0x92 */ + {{0x08, 0xe2, 0xd8, 0xc8, 0x6c, 0xdd, 0xea, 0x96, }}, /* Byte value: 0x93 */ + {{0xe3, 0x7e, 0xda, 0xdf, 0x6d, 0x6e, 0x9d, 0xf5, }}, /* Byte value: 0x94 */ + {{0x4c, 0x8f, 0xbb, 0x23, 0xbc, 0x75, 0xc3, 0xe7, }}, /* Byte value: 0x95 */ + {{0xea, 0x11, 0x19, 0x0e, 0xed, 0xe0, 0xfb, 0x01, }}, /* Byte value: 0x96 */ + {{0x94, 0x4e, 0x01, 0xea, 0xe1, 0xb8, 0xda, 0xd0, }}, /* Byte value: 0x97 */ + {{0x71, 0x98, 0x81, 0x63, 0xa1, 0xff, 0xe9, 0xaa, }}, /* Byte value: 0x98 */ + {{0x63, 0x46, 0xc4, 0x02, 0x62, 0x20, 0x25, 0x81, }}, /* Byte value: 0x99 */ + {{0x3c, 0x9a, 0x21, 0x59, 0xf1, 0xd9, 0xa6, 0x2f, }}, /* Byte value: 0x9a */ + {{0x05, 0xfc, 0x77, 0x7d, 0xda, 0xdc, 0xf9, 0x29, }}, /* Byte value: 0x9b */ + {{0x99, 0x50, 0xae, 0x5f, 0x57, 0xb9, 0xc9, 0x6f, }}, /* Byte value: 0x9c */ + {{0x38, 0xeb, 0x4d, 0x3d, 0xc7, 0x56, 0xd3, 0x64, }}, /* Byte value: 0x9d */ + {{0xec, 0xb9, 0x43, 0x58, 0xc0, 0xc9, 0x55, 0x8e, }}, /* Byte value: 0x9e */ + {{0x2d, 0x10, 0x49, 0x13, 0xc5, 0xf3, 0x3d, 0xa2, }}, /* Byte value: 0x9f */ + {{0xc8, 0xc6, 0xc9, 0x9a, 0x85, 0xb4, 0x0e, 0xd8, }}, /* Byte value: 0xa0 */ + {{0x55, 0xe7, 0x0b, 0xa1, 0xe4, 0x82, 0xb2, 0xfc, }}, /* Byte value: 0xa1 */ + {{0x2e, 0x44, 0x64, 0x38, 0x32, 0x06, 0x6a, 0x04, }}, /* Byte value: 0xa2 */ + {{0x25, 0xf2, 0x91, 0xdb, 0xa9, 0x2e, 0xd7, 0x34, }}, /* Byte value: 0xa3 */ + {{0x01, 0x8d, 0x1b, 0x19, 0xec, 0x53, 0x8c, 0x62, }}, /* Byte value: 0xa4 */ + {{0x9a, 0x04, 0x83, 0x74, 0xa0, 0x4c, 0x9e, 0xc9, }}, /* Byte value: 0xa5 */ + {{0xb4, 0x40, 0xe7, 0x4c, 0x92, 0x4a, 0xf4, 0xcd, }}, /* Byte value: 0xa6 */ + {{0x40, 0x1c, 0x0f, 0x8f, 0xe6, 0x27, 0x5c, 0x3a, }}, /* Byte value: 0xa7 */ + {{0x3d, 0x17, 0x3a, 0x40, 0x1d, 0x8a, 0x2a, 0x4d, }}, /* Byte value: 0xa8 */ + {{0x80, 0x38, 0x1e, 0xdd, 0x0f, 0x4e, 0xb8, 0x74, }}, /* Byte value: 0xa9 */ + {{0x1b, 0xb1, 0x86, 0xb0, 0x43, 0x51, 0xaa, 0xdf, }}, /* Byte value: 0xaa */ + {{0x97, 0x1a, 0x2c, 0xc1, 0x16, 0x4d, 0x8d, 0x76, }}, /* Byte value: 0xab */ + {{0xc3, 0x70, 0x3c, 0x79, 0x1e, 0x9c, 0xb3, 0xe8, }}, /* Byte value: 0xac */ + {{0x9e, 0x75, 0xef, 0x10, 0x96, 0xc3, 0xeb, 0x82, }}, /* Byte value: 0xad */ + {{0x1e, 0x4d, 0xf1, 0xcd, 0x99, 0x8d, 0x53, 0xf6, }}, /* Byte value: 0xae */ + {{0x64, 0x63, 0x85, 0x4d, 0xa3, 0x5a, 0x07, 0x6c, }}, /* Byte value: 0xaf */ + {{0x5c, 0x88, 0xc8, 0x70, 0x64, 0x0c, 0xd4, 0x08, }}, /* Byte value: 0xb0 */ + {{0x87, 0x1d, 0x5f, 0x92, 0xce, 0x34, 0x9a, 0x99, }}, /* Byte value: 0xb1 */ + {{0x53, 0x4f, 0x51, 0xf7, 0xc9, 0xab, 0x1c, 0x73, }}, /* Byte value: 0xb2 */ + {{0xaa, 0x0d, 0x16, 0x81, 0x0b, 0xc7, 0xa7, 0x3b, }}, /* Byte value: 0xb3 */ + {{0xdd, 0x3d, 0xcd, 0xb4, 0x87, 0x11, 0xe0, 0x1e, }}, /* Byte value: 0xb4 */ + {{0x20, 0x0e, 0xe6, 0xa6, 0x73, 0xf2, 0x2e, 0x1d, }}, /* Byte value: 0xb5 */ + {{0x66, 0xba, 0xb3, 0x7f, 0xb8, 0xfc, 0xdc, 0xa8, }}, /* Byte value: 0xb6 */ + {{0x4d, 0x02, 0xa0, 0x3a, 0x50, 0x26, 0x4f, 0x85, }}, /* Byte value: 0xb7 */ + {{0xfb, 0x9b, 0x71, 0x44, 0xd9, 0xca, 0x60, 0x8c, }}, /* Byte value: 0xb8 */ + {{0xed, 0x34, 0x58, 0x41, 0x2c, 0x9a, 0xd9, 0xec, }}, /* Byte value: 0xb9 */ + {{0xb7, 0x14, 0xca, 0x67, 0x65, 0xbf, 0xa3, 0x6b, }}, /* Byte value: 0xba */ + {{0x0e, 0x4a, 0x82, 0x9e, 0x41, 0xf4, 0x44, 0x19, }}, /* Byte value: 0xbb */ + {{0x88, 0xda, 0xc6, 0x15, 0x63, 0x93, 0x52, 0xe2, }}, /* Byte value: 0xbc */ + {{0x32, 0xd0, 0xa3, 0xc7, 0xb0, 0x2d, 0xe2, 0x36, }}, /* Byte value: 0xbd */ + {{0x07, 0x25, 0x41, 0x4f, 0xc1, 0x7a, 0x22, 0xed, }}, /* Byte value: 0xbe */ + {{0x4f, 0xdb, 0x96, 0x08, 0x4b, 0x80, 0x94, 0x41, }}, /* Byte value: 0xbf */ + {{0x09, 0x6f, 0xc3, 0xd1, 0x80, 0x8e, 0x66, 0xf4, }}, /* Byte value: 0xc0 */ + {{0xd8, 0xc1, 0xba, 0xc9, 0x5d, 0xcd, 0x19, 0x37, }}, /* Byte value: 0xc1 */ + {{0xb0, 0x31, 0x8b, 0x28, 0xa4, 0xc5, 0x81, 0x86, }}, /* Byte value: 0xc2 */ + {{0xe6, 0x82, 0xad, 0xa2, 0xb7, 0xb2, 0x64, 0xdc, }}, /* Byte value: 0xc3 */ + {{0xbb, 0x87, 0x7e, 0xcb, 0x3f, 0xed, 0x3c, 0xb6, }}, /* Byte value: 0xc4 */ + {{0x6d, 0x0c, 0x46, 0x9c, 0x23, 0xd4, 0x61, 0x98, }}, /* Byte value: 0xc5 */ + {{0x5b, 0xad, 0x89, 0x3f, 0xa5, 0x76, 0xf6, 0xe5, }}, /* Byte value: 0xc6 */ + {{0xe8, 0xc8, 0x2f, 0x3c, 0xf6, 0x46, 0x20, 0xc5, }}, /* Byte value: 0xc7 */ + {{0xfc, 0xbe, 0x30, 0x0b, 0x18, 0xb0, 0x42, 0x61, }}, /* Byte value: 0xc8 */ + {{0x56, 0xb3, 0x26, 0x8a, 0x13, 0x77, 0xe5, 0x5a, }}, /* Byte value: 0xc9 */ + {{0xa6, 0x9e, 0xa2, 0x2d, 0x51, 0x95, 0x38, 0xe6, }}, /* Byte value: 0xca */ + {{0xd1, 0xae, 0x79, 0x18, 0xdd, 0x43, 0x7f, 0xc3, }}, /* Byte value: 0xcb */ + {{0xf8, 0xcf, 0x5c, 0x6f, 0x2e, 0x3f, 0x37, 0x2a, }}, /* Byte value: 0xcc */ + {{0xb3, 0x65, 0xa6, 0x03, 0x53, 0x30, 0xd6, 0x20, }}, /* Byte value: 0xcd */ + {{0x2c, 0x9d, 0x52, 0x0a, 0x29, 0xa0, 0xb1, 0xc0, }}, /* Byte value: 0xce */ + {{0xd6, 0x8b, 0x38, 0x57, 0x1c, 0x39, 0x5d, 0x2e, }}, /* Byte value: 0xcf */ + {{0x6e, 0x58, 0x6b, 0xb7, 0xd4, 0x21, 0x36, 0x3e, }}, /* Byte value: 0xd0 */ + {{0x0f, 0xc7, 0x99, 0x87, 0xad, 0xa7, 0xc8, 0x7b, }}, /* Byte value: 0xd1 */ + {{0xdf, 0xe4, 0xfb, 0x86, 0x9c, 0xb7, 0x3b, 0xda, }}, /* Byte value: 0xd2 */ + {{0x73, 0x41, 0xb7, 0x51, 0xba, 0x59, 0x32, 0x6e, }}, /* Byte value: 0xd3 */ + {{0xcc, 0xb7, 0xa5, 0xfe, 0xb3, 0x3b, 0x7b, 0x93, }}, /* Byte value: 0xd4 */ + {{0xf3, 0x79, 0xa9, 0x8c, 0xb5, 0x17, 0x8a, 0x1a, }}, /* Byte value: 0xd5 */ + {{0x3b, 0xbf, 0x60, 0x16, 0x30, 0xa3, 0x84, 0xc2, }}, /* Byte value: 0xd6 */ + {{0x50, 0x1b, 0x7c, 0xdc, 0x3e, 0x5e, 0x4b, 0xd5, }}, /* Byte value: 0xd7 */ + {{0x72, 0xcc, 0xac, 0x48, 0x56, 0x0a, 0xbe, 0x0c, }}, /* Byte value: 0xd8 */ + {{0xac, 0xa5, 0x4c, 0xd7, 0x26, 0xee, 0x09, 0xb4, }}, /* Byte value: 0xd9 */ + {{0xd0, 0x23, 0x62, 0x01, 0x31, 0x10, 0xf3, 0xa1, }}, /* Byte value: 0xda */ + {{0x61, 0x9f, 0xf2, 0x30, 0x79, 0x86, 0xfe, 0x45, }}, /* Byte value: 0xdb */ + {{0x8e, 0x72, 0x9c, 0x43, 0x4e, 0xba, 0xfc, 0x6d, }}, /* Byte value: 0xdc */ + {{0x6b, 0xa4, 0x1c, 0xca, 0x0e, 0xfd, 0xcf, 0x17, }}, /* Byte value: 0xdd */ + {{0x5e, 0x51, 0xfe, 0x42, 0x7f, 0xaa, 0x0f, 0xcc, }}, /* Byte value: 0xde */ + {{0x3f, 0xce, 0x0c, 0x72, 0x06, 0x2c, 0xf1, 0x89, }}, /* Byte value: 0xdf */ + {{0xe1, 0xa7, 0xec, 0xed, 0x76, 0xc8, 0x46, 0x31, }}, /* Byte value: 0xe0 */ + {{0x1f, 0xc0, 0xea, 0xd4, 0x75, 0xde, 0xdf, 0x94, }}, /* Byte value: 0xe1 */ + {{0xa9, 0x59, 0x3b, 0xaa, 0xfc, 0x32, 0xf0, 0x9d, }}, /* Byte value: 0xe2 */ + {{0x77, 0x30, 0xdb, 0x35, 0x8c, 0xd6, 0x47, 0x25, }}, /* Byte value: 0xe3 */ + {{0x11, 0x8a, 0x68, 0x4a, 0x34, 0x2a, 0x9b, 0x8d, }}, /* Byte value: 0xe4 */ + {{0xd3, 0x77, 0x4f, 0x2a, 0xc6, 0xe5, 0xa4, 0x07, }}, /* Byte value: 0xe5 */ + {{0xb6, 0x99, 0xd1, 0x7e, 0x89, 0xec, 0x2f, 0x09, }}, /* Byte value: 0xe6 */ + {{0x13, 0x53, 0x5e, 0x78, 0x2f, 0x8c, 0x40, 0x49, }}, /* Byte value: 0xe7 */ + {{0x5a, 0x20, 0x92, 0x26, 0x49, 0x25, 0x7a, 0x87, }}, /* Byte value: 0xe8 */ + {{0xde, 0x69, 0xe0, 0x9f, 0x70, 0xe4, 0xb7, 0xb8, }}, /* Byte value: 0xe9 */ + {{0x28, 0xec, 0x3e, 0x6e, 0x1f, 0x2f, 0xc4, 0x8b, }}, /* Byte value: 0xea */ + {{0xfe, 0x67, 0x06, 0x39, 0x03, 0x16, 0x99, 0xa5, }}, /* Byte value: 0xeb */ + {{0x8a, 0x03, 0xf0, 0x27, 0x78, 0x35, 0x89, 0x26, }}, /* Byte value: 0xec */ + {{0xa5, 0xca, 0x8f, 0x06, 0xa6, 0x60, 0x6f, 0x40, }}, /* Byte value: 0xed */ + {{0xd4, 0x52, 0x0e, 0x65, 0x07, 0x9f, 0x86, 0xea, }}, /* Byte value: 0xee */ + {{0xc2, 0xfd, 0x27, 0x60, 0xf2, 0xcf, 0x3f, 0x8a, }}, /* Byte value: 0xef */ + {{0xb5, 0xcd, 0xfc, 0x55, 0x7e, 0x19, 0x78, 0xaf, }}, /* Byte value: 0xf0 */ + {{0xda, 0x18, 0x8c, 0xfb, 0x46, 0x6b, 0xc2, 0xf3, }}, /* Byte value: 0xf1 */ + {{0x91, 0xb2, 0x76, 0x97, 0x3b, 0x64, 0x23, 0xf9, }}, /* Byte value: 0xf2 */ + {{0xee, 0x60, 0x75, 0x6a, 0xdb, 0x6f, 0x8e, 0x4a, }}, /* Byte value: 0xf3 */ + {{0x62, 0xcb, 0xdf, 0x1b, 0x8e, 0x73, 0xa9, 0xe3, }}, /* Byte value: 0xf4 */ + {{0xeb, 0x9c, 0x02, 0x17, 0x01, 0xb3, 0x77, 0x63, }}, /* Byte value: 0xf5 */ + {{0xef, 0xed, 0x6e, 0x73, 0x37, 0x3c, 0x02, 0x28, }}, /* Byte value: 0xf6 */ + {{0xa8, 0xd4, 0x20, 0xb3, 0x10, 0x61, 0x7c, 0xff, }}, /* Byte value: 0xf7 */ + {{0xa2, 0xef, 0xce, 0x49, 0x67, 0x1a, 0x4d, 0xad, }}, /* Byte value: 0xf8 */ + {{0x7f, 0xd2, 0x03, 0xfd, 0xe0, 0x0b, 0xad, 0xb3, }}, /* Byte value: 0xf9 */ + {{0x04, 0x71, 0x6c, 0x64, 0x36, 0x8f, 0x75, 0x4b, }}, /* Byte value: 0xfa */ + {{0x6f, 0xd5, 0x70, 0xae, 0x38, 0x72, 0xba, 0x5c, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x47, 0x39, 0x4e, 0xc0, 0x27, 0x5d, 0x7e, 0xd7, }}, /* Byte value: 0xfd */ + {{0x76, 0xbd, 0xc0, 0x2c, 0x60, 0x85, 0xcb, 0x47, }}, /* Byte value: 0xfe */ + {{0x89, 0x57, 0xdd, 0x0c, 0x8f, 0xc0, 0xde, 0x80, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 4 */ + {{0xff, 0x6a, 0x2d, 0xa5, 0x4a, 0x84, 0x52, 0x5c, }}, /* Byte value: 0x00 */ + {{0x73, 0xc6, 0x2f, 0x2d, 0x97, 0x24, 0xdb, 0x4d, }}, /* Byte value: 0x01 */ + {{0x62, 0xa7, 0x28, 0x32, 0xbc, 0x57, 0x26, 0x97, }}, /* Byte value: 0x02 */ + {{0x1d, 0x07, 0x49, 0x8f, 0xe1, 0x72, 0x4a, 0xc8, }}, /* Byte value: 0x03 */ + {{0xe1, 0x95, 0x96, 0x0e, 0x78, 0x67, 0x45, 0x71, }}, /* Byte value: 0x04 */ + {{0xc3, 0x57, 0x98, 0x30, 0x2e, 0x81, 0x7c, 0x06, }}, /* Byte value: 0x05 */ + {{0x02, 0x11, 0x1d, 0x38, 0x23, 0x5f, 0xd7, 0x07, }}, /* Byte value: 0x06 */ + {{0x8a, 0x9f, 0x25, 0xc0, 0xb8, 0x41, 0x33, 0x18, }}, /* Byte value: 0x07 */ + {{0x07, 0xda, 0xc8, 0x54, 0x95, 0x2f, 0x30, 0xeb, }}, /* Byte value: 0x08 */ + {{0x28, 0x97, 0x67, 0xe6, 0xf9, 0x06, 0x34, 0x6c, }}, /* Byte value: 0x09 */ + {{0xed, 0xf3, 0xd8, 0x9e, 0xb2, 0x66, 0xf2, 0x63, }}, /* Byte value: 0x0a */ + {{0xb3, 0x69, 0x45, 0x39, 0x6a, 0x34, 0xfa, 0xae, }}, /* Byte value: 0x0b */ + {{0xb6, 0xa2, 0x90, 0x55, 0xdc, 0x44, 0x1d, 0x42, }}, /* Byte value: 0x0c */ + {{0xe5, 0xb7, 0xac, 0x7e, 0x3e, 0xd9, 0x28, 0x7f, }}, /* Byte value: 0x0d */ + {{0x27, 0x09, 0xdb, 0x52, 0xe0, 0x96, 0xde, 0x9b, }}, /* Byte value: 0x0e */ + {{0xbd, 0x1e, 0x16, 0x91, 0x83, 0x6a, 0x9a, 0xbb, }}, /* Byte value: 0x0f */ + {{0xc4, 0x8d, 0x50, 0x64, 0xbb, 0xae, 0x4c, 0xed, }}, /* Byte value: 0x10 */ + {{0x10, 0x88, 0xe8, 0x03, 0xdb, 0xbd, 0x77, 0x38, }}, /* Byte value: 0x11 */ + {{0x17, 0x52, 0x20, 0x57, 0x4e, 0x92, 0x47, 0xd3, }}, /* Byte value: 0x12 */ + {{0xe6, 0x4f, 0x5e, 0x5a, 0xed, 0x48, 0x75, 0x9a, }}, /* Byte value: 0x13 */ + {{0x01, 0xe9, 0xef, 0x1c, 0xf0, 0xce, 0x8a, 0xe2, }}, /* Byte value: 0x14 */ + {{0x45, 0xae, 0xf3, 0x60, 0x5c, 0xc1, 0xf8, 0x0c, }}, /* Byte value: 0x15 */ + {{0x91, 0xab, 0x4b, 0x07, 0x3c, 0xd2, 0xc3, 0xd9, }}, /* Byte value: 0x16 */ + {{0x80, 0xca, 0x4c, 0x18, 0x17, 0xa1, 0x3e, 0x03, }}, /* Byte value: 0x17 */ + {{0x33, 0xa3, 0x09, 0x21, 0x7d, 0x95, 0xc4, 0xad, }}, /* Byte value: 0x18 */ + {{0xa5, 0xd2, 0x8a, 0x72, 0xd4, 0x68, 0x37, 0x9f, }}, /* Byte value: 0x19 */ + {{0x0e, 0x77, 0x53, 0xa8, 0xe9, 0x5e, 0x60, 0x15, }}, /* Byte value: 0x1a */ + {{0x7a, 0x6b, 0xb4, 0xd1, 0xeb, 0x55, 0x8b, 0xb3, }}, /* Byte value: 0x1b */ + {{0xf2, 0xe5, 0x8c, 0x29, 0x70, 0x4b, 0x6f, 0xac, }}, /* Byte value: 0x1c */ + {{0xaa, 0x4c, 0x36, 0xc6, 0xcd, 0xf8, 0xdd, 0x68, }}, /* Byte value: 0x1d */ + {{0x4e, 0x12, 0x75, 0xa4, 0x03, 0xef, 0x7f, 0xf5, }}, /* Byte value: 0x1e */ + {{0x93, 0xba, 0x56, 0x3f, 0x1f, 0x8d, 0x14, 0xde, }}, /* Byte value: 0x1f */ + {{0x08, 0x44, 0x74, 0xe0, 0x8c, 0xbf, 0xda, 0x1c, }}, /* Byte value: 0x20 */ + {{0x13, 0x70, 0x1a, 0x27, 0x08, 0x2c, 0x2a, 0xdd, }}, /* Byte value: 0x21 */ + {{0xbc, 0xf7, 0xf9, 0x8d, 0x73, 0xa4, 0x10, 0x59, }}, /* Byte value: 0x22 */ + {{0x40, 0x65, 0x26, 0x0c, 0xea, 0xb1, 0x1f, 0xe0, }}, /* Byte value: 0x23 */ + {{0xec, 0x1a, 0x37, 0x82, 0x42, 0xa8, 0x78, 0x81, }}, /* Byte value: 0x24 */ + {{0x68, 0xf2, 0x41, 0xea, 0x13, 0xb7, 0x2b, 0x8c, }}, /* Byte value: 0x25 */ + {{0x2e, 0xa4, 0x40, 0xae, 0x9c, 0xe7, 0x8e, 0x65, }}, /* Byte value: 0x26 */ + {{0x0f, 0x9e, 0xbc, 0xb4, 0x19, 0x90, 0xea, 0xf7, }}, /* Byte value: 0x27 */ + {{0x6c, 0xd0, 0x7b, 0x9a, 0x55, 0x09, 0x46, 0x82, }}, /* Byte value: 0x28 */ + {{0x55, 0x26, 0x1b, 0x63, 0x87, 0x7c, 0x8f, 0x34, }}, /* Byte value: 0x29 */ + {{0xb7, 0x4b, 0x7f, 0x49, 0x2c, 0x8a, 0x97, 0xa0, }}, /* Byte value: 0x2a */ + {{0x38, 0x1f, 0x8f, 0xe5, 0x22, 0xbb, 0x43, 0x54, }}, /* Byte value: 0x2b */ + {{0x66, 0x85, 0x12, 0x42, 0xfa, 0xe9, 0x4b, 0x99, }}, /* Byte value: 0x2c */ + {{0x89, 0x67, 0xd7, 0xe4, 0x6b, 0xd0, 0x6e, 0xfd, }}, /* Byte value: 0x2d */ + {{0x71, 0xd7, 0x32, 0x15, 0xb4, 0x7b, 0x0c, 0x4a, }}, /* Byte value: 0x2e */ + {{0x1f, 0x16, 0x54, 0xb7, 0xc2, 0x2d, 0x9d, 0xcf, }}, /* Byte value: 0x2f */ + {{0x4b, 0xd9, 0xa0, 0xc8, 0xb5, 0x9f, 0x98, 0x19, }}, /* Byte value: 0x30 */ + {{0x20, 0xd3, 0x13, 0x06, 0x75, 0xb9, 0xee, 0x70, }}, /* Byte value: 0x31 */ + {{0x04, 0x22, 0x3a, 0x70, 0x46, 0xbe, 0x6d, 0x0e, }}, /* Byte value: 0x32 */ + {{0xfd, 0x7b, 0x30, 0x9d, 0x69, 0xdb, 0x85, 0x5b, }}, /* Byte value: 0x33 */ + {{0x76, 0x0d, 0xfa, 0x41, 0x21, 0x54, 0x3c, 0xa1, }}, /* Byte value: 0x34 */ + {{0x34, 0x79, 0xc1, 0x75, 0xe8, 0xba, 0xf4, 0x46, }}, /* Byte value: 0x35 */ + {{0x31, 0xb2, 0x14, 0x19, 0x5e, 0xca, 0x13, 0xaa, }}, /* Byte value: 0x36 */ + {{0xfa, 0xa1, 0xf8, 0xc9, 0xfc, 0xf4, 0xb5, 0xb0, }}, /* Byte value: 0x37 */ + {{0xaf, 0x87, 0xe3, 0xaa, 0x7b, 0x88, 0x3a, 0x84, }}, /* Byte value: 0x38 */ + {{0x09, 0xad, 0x9b, 0xfc, 0x7c, 0x71, 0x50, 0xfe, }}, /* Byte value: 0x39 */ + {{0x36, 0x68, 0xdc, 0x4d, 0xcb, 0xe5, 0x23, 0x41, }}, /* Byte value: 0x3a */ + {{0xde, 0x50, 0xd1, 0xbf, 0xcf, 0xf3, 0x36, 0xce, }}, /* Byte value: 0x3b */ + {{0xe2, 0x6d, 0x64, 0x2a, 0xab, 0xf6, 0x18, 0x94, }}, /* Byte value: 0x3c */ + {{0x14, 0xaa, 0xd2, 0x73, 0x9d, 0x03, 0x1a, 0x36, }}, /* Byte value: 0x3d */ + {{0xcc, 0xc9, 0x24, 0x84, 0x37, 0x11, 0x96, 0xf1, }}, /* Byte value: 0x3e */ + {{0xfb, 0x48, 0x17, 0xd5, 0x0c, 0x3a, 0x3f, 0x52, }}, /* Byte value: 0x3f */ + {{0x9a, 0x17, 0xcd, 0xc3, 0x63, 0xfc, 0x44, 0x20, }}, /* Byte value: 0x40 */ + {{0x9f, 0xdc, 0x18, 0xaf, 0xd5, 0x8c, 0xa3, 0xcc, }}, /* Byte value: 0x41 */ + {{0x53, 0x15, 0x3c, 0x2b, 0xe2, 0x9d, 0x35, 0x3d, }}, /* Byte value: 0x42 */ + {{0x6d, 0x39, 0x94, 0x86, 0xa5, 0xc7, 0xcc, 0x60, }}, /* Byte value: 0x43 */ + {{0x5e, 0x9a, 0x9d, 0xa7, 0xd8, 0x52, 0x08, 0xcd, }}, /* Byte value: 0x44 */ + {{0x3f, 0xc5, 0x47, 0xb1, 0xb7, 0x94, 0x73, 0xbf, }}, /* Byte value: 0x45 */ + {{0x2f, 0x4d, 0xaf, 0xb2, 0x6c, 0x29, 0x04, 0x87, }}, /* Byte value: 0x46 */ + {{0x57, 0x37, 0x06, 0x5b, 0xa4, 0x23, 0x58, 0x33, }}, /* Byte value: 0x47 */ + {{0xe7, 0xa6, 0xb1, 0x46, 0x1d, 0x86, 0xff, 0x78, }}, /* Byte value: 0x48 */ + {{0xdb, 0x9b, 0x04, 0xd3, 0x79, 0x83, 0xd1, 0x22, }}, /* Byte value: 0x49 */ + {{0x5c, 0x8b, 0x80, 0x9f, 0xfb, 0x0d, 0xdf, 0xca, }}, /* Byte value: 0x4a */ + {{0xb8, 0xd5, 0xc3, 0xfd, 0x35, 0x1a, 0x7d, 0x57, }}, /* Byte value: 0x4b */ + {{0x4a, 0x30, 0x4f, 0xd4, 0x45, 0x51, 0x12, 0xfb, }}, /* Byte value: 0x4c */ + {{0x50, 0xed, 0xce, 0x0f, 0x31, 0x0c, 0x68, 0xd8, }}, /* Byte value: 0x4d */ + {{0x4c, 0x03, 0x68, 0x9c, 0x20, 0xb0, 0xa8, 0xf2, }}, /* Byte value: 0x4e */ + {{0xd2, 0x36, 0x9f, 0x2f, 0x05, 0xf2, 0x81, 0xdc, }}, /* Byte value: 0x4f */ + {{0xdd, 0xa8, 0x23, 0x9b, 0x1c, 0x62, 0x6b, 0x2b, }}, /* Byte value: 0x50 */ + {{0xd7, 0xfd, 0x4a, 0x43, 0xb3, 0x82, 0x66, 0x30, }}, /* Byte value: 0x51 */ + {{0x58, 0xa9, 0xba, 0xef, 0xbd, 0xb3, 0xb2, 0xc4, }}, /* Byte value: 0x52 */ + {{0xbb, 0x2d, 0x31, 0xd9, 0xe6, 0x8b, 0x20, 0xb2, }}, /* Byte value: 0x53 */ + {{0x74, 0x1c, 0xe7, 0x79, 0x02, 0x0b, 0xeb, 0xa6, }}, /* Byte value: 0x54 */ + {{0xae, 0x6e, 0x0c, 0xb6, 0x8b, 0x46, 0xb0, 0x66, }}, /* Byte value: 0x55 */ + {{0x96, 0x71, 0x83, 0x53, 0xa9, 0xfd, 0xf3, 0x32, }}, /* Byte value: 0x56 */ + {{0x54, 0xcf, 0xf4, 0x7f, 0x77, 0xb2, 0x05, 0xd6, }}, /* Byte value: 0x57 */ + {{0x3b, 0xe7, 0x7d, 0xc1, 0xf1, 0x2a, 0x1e, 0xb1, }}, /* Byte value: 0x58 */ + {{0x49, 0xc8, 0xbd, 0xf0, 0x96, 0xc0, 0x4f, 0x1e, }}, /* Byte value: 0x59 */ + {{0x92, 0x53, 0xb9, 0x23, 0xef, 0x43, 0x9e, 0x3c, }}, /* Byte value: 0x5a */ + {{0x99, 0xef, 0x3f, 0xe7, 0xb0, 0x6d, 0x19, 0xc5, }}, /* Byte value: 0x5b */ + {{0xb2, 0x80, 0xaa, 0x25, 0x9a, 0xfa, 0x70, 0x4c, }}, /* Byte value: 0x5c */ + {{0x67, 0x6c, 0xfd, 0x5e, 0x0a, 0x27, 0xc1, 0x7b, }}, /* Byte value: 0x5d */ + {{0xbe, 0xe6, 0xe4, 0xb5, 0x50, 0xfb, 0xc7, 0x5e, }}, /* Byte value: 0x5e */ + {{0xa0, 0x19, 0x5f, 0x1e, 0x62, 0x18, 0xd0, 0x73, }}, /* Byte value: 0x5f */ + {{0x6e, 0xc1, 0x66, 0xa2, 0x76, 0x56, 0x91, 0x85, }}, /* Byte value: 0x60 */ + {{0x9b, 0xfe, 0x22, 0xdf, 0x93, 0x32, 0xce, 0xc2, }}, /* Byte value: 0x61 */ + {{0xef, 0xe2, 0xc5, 0xa6, 0x91, 0x39, 0x25, 0x64, }}, /* Byte value: 0x62 */ + {{0xa8, 0x5d, 0x2b, 0xfe, 0xee, 0xa7, 0x0a, 0x6f, }}, /* Byte value: 0x63 */ + {{0x8f, 0x54, 0xf0, 0xac, 0x0e, 0x31, 0xd4, 0xf4, }}, /* Byte value: 0x64 */ + {{0x23, 0x2b, 0xe1, 0x22, 0xa6, 0x28, 0xb3, 0x95, }}, /* Byte value: 0x65 */ + {{0x39, 0xf6, 0x60, 0xf9, 0xd2, 0x75, 0xc9, 0xb6, }}, /* Byte value: 0x66 */ + {{0xa9, 0xb4, 0xc4, 0xe2, 0x1e, 0x69, 0x80, 0x8d, }}, /* Byte value: 0x67 */ + {{0xa7, 0xc3, 0x97, 0x4a, 0xf7, 0x37, 0xe0, 0x98, }}, /* Byte value: 0x68 */ + {{0xce, 0xd8, 0x39, 0xbc, 0x14, 0x4e, 0x41, 0xf6, }}, /* Byte value: 0x69 */ + {{0xf3, 0x0c, 0x63, 0x35, 0x80, 0x85, 0xe5, 0x4e, }}, /* Byte value: 0x6a */ + {{0xea, 0x29, 0x10, 0xca, 0x27, 0x49, 0xc2, 0x88, }}, /* Byte value: 0x6b */ + {{0xe9, 0xd1, 0xe2, 0xee, 0xf4, 0xd8, 0x9f, 0x6d, }}, /* Byte value: 0x6c */ + {{0xc5, 0x64, 0xbf, 0x78, 0x4b, 0x60, 0xc6, 0x0f, }}, /* Byte value: 0x6d */ + {{0x30, 0x5b, 0xfb, 0x05, 0xae, 0x04, 0x99, 0x48, }}, /* Byte value: 0x6e */ + {{0x94, 0x60, 0x9e, 0x6b, 0x8a, 0xa2, 0x24, 0x35, }}, /* Byte value: 0x6f */ + {{0x37, 0x81, 0x33, 0x51, 0x3b, 0x2b, 0xa9, 0xa3, }}, /* Byte value: 0x70 */ + {{0xb9, 0x3c, 0x2c, 0xe1, 0xc5, 0xd4, 0xf7, 0xb5, }}, /* Byte value: 0x71 */ + {{0xf6, 0xc7, 0xb6, 0x59, 0x36, 0xf5, 0x02, 0xa2, }}, /* Byte value: 0x72 */ + {{0xdf, 0xb9, 0x3e, 0xa3, 0x3f, 0x3d, 0xbc, 0x2c, }}, /* Byte value: 0x73 */ + {{0xe8, 0x38, 0x0d, 0xf2, 0x04, 0x16, 0x15, 0x8f, }}, /* Byte value: 0x74 */ + {{0xb5, 0x5a, 0x62, 0x71, 0x0f, 0xd5, 0x40, 0xa7, }}, /* Byte value: 0x75 */ + {{0xa6, 0x2a, 0x78, 0x56, 0x07, 0xf9, 0x6a, 0x7a, }}, /* Byte value: 0x76 */ + {{0xf0, 0xf4, 0x91, 0x11, 0x53, 0x14, 0xb8, 0xab, }}, /* Byte value: 0x77 */ + {{0x25, 0x18, 0xc6, 0x6a, 0xc3, 0xc9, 0x09, 0x9c, }}, /* Byte value: 0x78 */ + {{0x3d, 0xd4, 0x5a, 0x89, 0x94, 0xcb, 0xa4, 0xb8, }}, /* Byte value: 0x79 */ + {{0x8d, 0x45, 0xed, 0x94, 0x2d, 0x6e, 0x03, 0xf3, }}, /* Byte value: 0x7a */ + {{0x75, 0xf5, 0x08, 0x65, 0xf2, 0xc5, 0x61, 0x44, }}, /* Byte value: 0x7b */ + {{0x0d, 0x8f, 0xa1, 0x8c, 0x3a, 0xcf, 0x3d, 0xf0, }}, /* Byte value: 0x7c */ + {{0x5f, 0x73, 0x72, 0xbb, 0x28, 0x9c, 0x82, 0x2f, }}, /* Byte value: 0x7d */ + {{0x95, 0x89, 0x71, 0x77, 0x7a, 0x6c, 0xae, 0xd7, }}, /* Byte value: 0x7e */ + {{0x83, 0x32, 0xbe, 0x3c, 0xc4, 0x30, 0x63, 0xe6, }}, /* Byte value: 0x7f */ + {{0xd5, 0xec, 0x57, 0x7b, 0x90, 0xdd, 0xb1, 0x37, }}, /* Byte value: 0x80 */ + {{0x43, 0x9d, 0xd4, 0x28, 0x39, 0x20, 0x42, 0x05, }}, /* Byte value: 0x81 */ + {{0x1e, 0xff, 0xbb, 0xab, 0x32, 0xe3, 0x17, 0x2d, }}, /* Byte value: 0x82 */ + {{0x6a, 0xe3, 0x5c, 0xd2, 0x30, 0xe8, 0xfc, 0x8b, }}, /* Byte value: 0x83 */ + {{0x72, 0x2f, 0xc0, 0x31, 0x67, 0xea, 0x51, 0xaf, }}, /* Byte value: 0x84 */ + {{0x2a, 0x86, 0x7a, 0xde, 0xda, 0x59, 0xe3, 0x6b, }}, /* Byte value: 0x85 */ + {{0x0b, 0xbc, 0x86, 0xc4, 0x5f, 0x2e, 0x87, 0xf9, }}, /* Byte value: 0x86 */ + {{0xd6, 0x14, 0xa5, 0x5f, 0x43, 0x4c, 0xec, 0xd2, }}, /* Byte value: 0x87 */ + {{0xca, 0xfa, 0x03, 0xcc, 0x52, 0xf0, 0x2c, 0xf8, }}, /* Byte value: 0x88 */ + {{0xda, 0x72, 0xeb, 0xcf, 0x89, 0x4d, 0x5b, 0xc0, }}, /* Byte value: 0x89 */ + {{0x24, 0xf1, 0x29, 0x76, 0x33, 0x07, 0x83, 0x7e, }}, /* Byte value: 0x8a */ + {{0xc2, 0xbe, 0x77, 0x2c, 0xde, 0x4f, 0xf6, 0xe4, }}, /* Byte value: 0x8b */ + {{0x4f, 0xfb, 0x9a, 0xb8, 0xf3, 0x21, 0xf5, 0x17, }}, /* Byte value: 0x8c */ + {{0x0a, 0x55, 0x69, 0xd8, 0xaf, 0xe0, 0x0d, 0x1b, }}, /* Byte value: 0x8d */ + {{0x63, 0x4e, 0xc7, 0x2e, 0x4c, 0x99, 0xac, 0x75, }}, /* Byte value: 0x8e */ + {{0xe3, 0x84, 0x8b, 0x36, 0x5b, 0x38, 0x92, 0x76, }}, /* Byte value: 0x8f */ + {{0x1a, 0xdd, 0x81, 0xdb, 0x74, 0x5d, 0x7a, 0x23, }}, /* Byte value: 0x90 */ + {{0x35, 0x90, 0x2e, 0x69, 0x18, 0x74, 0x7e, 0xa4, }}, /* Byte value: 0x91 */ + {{0x9e, 0x35, 0xf7, 0xb3, 0x25, 0x42, 0x29, 0x2e, }}, /* Byte value: 0x92 */ + {{0xc0, 0xaf, 0x6a, 0x14, 0xfd, 0x10, 0x21, 0xe3, }}, /* Byte value: 0x93 */ + {{0x3c, 0x3d, 0xb5, 0x95, 0x64, 0x05, 0x2e, 0x5a, }}, /* Byte value: 0x94 */ + {{0x6f, 0x28, 0x89, 0xbe, 0x86, 0x98, 0x1b, 0x67, }}, /* Byte value: 0x95 */ + {{0xe4, 0x5e, 0x43, 0x62, 0xce, 0x17, 0xa2, 0x9d, }}, /* Byte value: 0x96 */ + {{0x7e, 0x49, 0x8e, 0xa1, 0xad, 0xeb, 0xe6, 0xbd, }}, /* Byte value: 0x97 */ + {{0x12, 0x99, 0xf5, 0x3b, 0xf8, 0xe2, 0xa0, 0x3f, }}, /* Byte value: 0x98 */ + {{0x61, 0x5f, 0xda, 0x16, 0x6f, 0xc6, 0x7b, 0x72, }}, /* Byte value: 0x99 */ + {{0x65, 0x7d, 0xe0, 0x66, 0x29, 0x78, 0x16, 0x7c, }}, /* Byte value: 0x9a */ + {{0x78, 0x7a, 0xa9, 0xe9, 0xc8, 0x0a, 0x5c, 0xb4, }}, /* Byte value: 0x9b */ + {{0xc6, 0x9c, 0x4d, 0x5c, 0x98, 0xf1, 0x9b, 0xea, }}, /* Byte value: 0x9c */ + {{0x05, 0xcb, 0xd5, 0x6c, 0xb6, 0x70, 0xe7, 0xec, }}, /* Byte value: 0x9d */ + {{0xb4, 0xb3, 0x8d, 0x6d, 0xff, 0x1b, 0xca, 0x45, }}, /* Byte value: 0x9e */ + {{0x3e, 0x2c, 0xa8, 0xad, 0x47, 0x5a, 0xf9, 0x5d, }}, /* Byte value: 0x9f */ + {{0x52, 0xfc, 0xd3, 0x37, 0x12, 0x53, 0xbf, 0xdf, }}, /* Byte value: 0xa0 */ + {{0xf4, 0xd6, 0xab, 0x61, 0x15, 0xaa, 0xd5, 0xa5, }}, /* Byte value: 0xa1 */ + {{0x16, 0xbb, 0xcf, 0x4b, 0xbe, 0x5c, 0xcd, 0x31, }}, /* Byte value: 0xa2 */ + {{0xfe, 0x83, 0xc2, 0xb9, 0xba, 0x4a, 0xd8, 0xbe, }}, /* Byte value: 0xa3 */ + {{0x18, 0xcc, 0x9c, 0xe3, 0x57, 0x02, 0xad, 0x24, }}, /* Byte value: 0xa4 */ + {{0xee, 0x0b, 0x2a, 0xba, 0x61, 0xf7, 0xaf, 0x86, }}, /* Byte value: 0xa5 */ + {{0xf8, 0xb0, 0xe5, 0xf1, 0xdf, 0xab, 0x62, 0xb7, }}, /* Byte value: 0xa6 */ + {{0xcf, 0x31, 0xd6, 0xa0, 0xe4, 0x80, 0xcb, 0x14, }}, /* Byte value: 0xa7 */ + {{0x7d, 0xb1, 0x7c, 0x85, 0x7e, 0x7a, 0xbb, 0x58, }}, /* Byte value: 0xa8 */ + {{0x5d, 0x62, 0x6f, 0x83, 0x0b, 0xc3, 0x55, 0x28, }}, /* Byte value: 0xa9 */ + {{0xab, 0xa5, 0xd9, 0xda, 0x3d, 0x36, 0x57, 0x8a, }}, /* Byte value: 0xaa */ + {{0x56, 0xde, 0xe9, 0x47, 0x54, 0xed, 0xd2, 0xd1, }}, /* Byte value: 0xab */ + {{0xba, 0xc4, 0xde, 0xc5, 0x16, 0x45, 0xaa, 0x50, }}, /* Byte value: 0xac */ + {{0x8e, 0xbd, 0x1f, 0xb0, 0xfe, 0xff, 0x5e, 0x16, }}, /* Byte value: 0xad */ + {{0xd3, 0xdf, 0x70, 0x33, 0xf5, 0x3c, 0x0b, 0x3e, }}, /* Byte value: 0xae */ + {{0x29, 0x7e, 0x88, 0xfa, 0x09, 0xc8, 0xbe, 0x8e, }}, /* Byte value: 0xaf */ + {{0x2c, 0xb5, 0x5d, 0x96, 0xbf, 0xb8, 0x59, 0x62, }}, /* Byte value: 0xb0 */ + {{0x15, 0x43, 0x3d, 0x6f, 0x6d, 0xcd, 0x90, 0xd4, }}, /* Byte value: 0xb1 */ + {{0xa4, 0x3b, 0x65, 0x6e, 0x24, 0xa6, 0xbd, 0x7d, }}, /* Byte value: 0xb2 */ + {{0x2b, 0x6f, 0x95, 0xc2, 0x2a, 0x97, 0x69, 0x89, }}, /* Byte value: 0xb3 */ + {{0x69, 0x1b, 0xae, 0xf6, 0xe3, 0x79, 0xa1, 0x6e, }}, /* Byte value: 0xb4 */ + {{0x86, 0xf9, 0x6b, 0x50, 0x72, 0x40, 0x84, 0x0a, }}, /* Byte value: 0xb5 */ + {{0x19, 0x25, 0x73, 0xff, 0xa7, 0xcc, 0x27, 0xc6, }}, /* Byte value: 0xb6 */ + {{0x77, 0xe4, 0x15, 0x5d, 0xd1, 0x9a, 0xb6, 0x43, }}, /* Byte value: 0xb7 */ + {{0xbf, 0x0f, 0x0b, 0xa9, 0xa0, 0x35, 0x4d, 0xbc, }}, /* Byte value: 0xb8 */ + {{0xac, 0x7f, 0x11, 0x8e, 0xa8, 0x19, 0x67, 0x61, }}, /* Byte value: 0xb9 */ + {{0xd0, 0x27, 0x82, 0x17, 0x26, 0xad, 0x56, 0xdb, }}, /* Byte value: 0xba */ + {{0x90, 0x42, 0xa4, 0x1b, 0xcc, 0x1c, 0x49, 0x3b, }}, /* Byte value: 0xbb */ + {{0x9d, 0xcd, 0x05, 0x97, 0xf6, 0xd3, 0x74, 0xcb, }}, /* Byte value: 0xbc */ + {{0xf5, 0x3f, 0x44, 0x7d, 0xe5, 0x64, 0x5f, 0x47, }}, /* Byte value: 0xbd */ + {{0x48, 0x21, 0x52, 0xec, 0x66, 0x0e, 0xc5, 0xfc, }}, /* Byte value: 0xbe */ + {{0x47, 0xbf, 0xee, 0x58, 0x7f, 0x9e, 0x2f, 0x0b, }}, /* Byte value: 0xbf */ + {{0xd8, 0x63, 0xf6, 0xf7, 0xaa, 0x12, 0x8c, 0xc7, }}, /* Byte value: 0xc0 */ + {{0x11, 0x61, 0x07, 0x1f, 0x2b, 0x73, 0xfd, 0xda, }}, /* Byte value: 0xc1 */ + {{0x98, 0x06, 0xd0, 0xfb, 0x40, 0xa3, 0x93, 0x27, }}, /* Byte value: 0xc2 */ + {{0x44, 0x47, 0x1c, 0x7c, 0xac, 0x0f, 0x72, 0xee, }}, /* Byte value: 0xc3 */ + {{0x70, 0x3e, 0xdd, 0x09, 0x44, 0xb5, 0x86, 0xa8, }}, /* Byte value: 0xc4 */ + {{0xf1, 0x1d, 0x7e, 0x0d, 0xa3, 0xda, 0x32, 0x49, }}, /* Byte value: 0xc5 */ + {{0x64, 0x94, 0x0f, 0x7a, 0xd9, 0xb6, 0x9c, 0x9e, }}, /* Byte value: 0xc6 */ + {{0xd4, 0x05, 0xb8, 0x67, 0x60, 0x13, 0x3b, 0xd5, }}, /* Byte value: 0xc7 */ + {{0xf7, 0x2e, 0x59, 0x45, 0xc6, 0x3b, 0x88, 0x40, }}, /* Byte value: 0xc8 */ + {{0xdc, 0x41, 0xcc, 0x87, 0xec, 0xac, 0xe1, 0xc9, }}, /* Byte value: 0xc9 */ + {{0x8b, 0x76, 0xca, 0xdc, 0x48, 0x8f, 0xb9, 0xfa, }}, /* Byte value: 0xca */ + {{0xc9, 0x02, 0xf1, 0xe8, 0x81, 0x61, 0x71, 0x1d, }}, /* Byte value: 0xcb */ + {{0x97, 0x98, 0x6c, 0x4f, 0x59, 0x33, 0x79, 0xd0, }}, /* Byte value: 0xcc */ + {{0xb0, 0x91, 0xb7, 0x1d, 0xb9, 0xa5, 0xa7, 0x4b, }}, /* Byte value: 0xcd */ + {{0x26, 0xe0, 0x34, 0x4e, 0x10, 0x58, 0x54, 0x79, }}, /* Byte value: 0xce */ + {{0x81, 0x23, 0xa3, 0x04, 0xe7, 0x6f, 0xb4, 0xe1, }}, /* Byte value: 0xcf */ + {{0xd9, 0x8a, 0x19, 0xeb, 0x5a, 0xdc, 0x06, 0x25, }}, /* Byte value: 0xd0 */ + {{0x88, 0x8e, 0x38, 0xf8, 0x9b, 0x1e, 0xe4, 0x1f, }}, /* Byte value: 0xd1 */ + {{0x59, 0x40, 0x55, 0xf3, 0x4d, 0x7d, 0x38, 0x26, }}, /* Byte value: 0xd2 */ + {{0x22, 0xc2, 0x0e, 0x3e, 0x56, 0xe6, 0x39, 0x77, }}, /* Byte value: 0xd3 */ + {{0x32, 0x4a, 0xe6, 0x3d, 0x8d, 0x5b, 0x4e, 0x4f, }}, /* Byte value: 0xd4 */ + {{0x7f, 0xa0, 0x61, 0xbd, 0x5d, 0x25, 0x6c, 0x5f, }}, /* Byte value: 0xd5 */ + {{0x2d, 0x5c, 0xb2, 0x8a, 0x4f, 0x76, 0xd3, 0x80, }}, /* Byte value: 0xd6 */ + {{0x8c, 0xac, 0x02, 0x88, 0xdd, 0xa0, 0x89, 0x11, }}, /* Byte value: 0xd7 */ + {{0x3a, 0x0e, 0x92, 0xdd, 0x01, 0xe4, 0x94, 0x53, }}, /* Byte value: 0xd8 */ + {{0x7b, 0x82, 0x5b, 0xcd, 0x1b, 0x9b, 0x01, 0x51, }}, /* Byte value: 0xd9 */ + {{0xd1, 0xce, 0x6d, 0x0b, 0xd6, 0x63, 0xdc, 0x39, }}, /* Byte value: 0xda */ + {{0x51, 0x04, 0x21, 0x13, 0xc1, 0xc2, 0xe2, 0x3a, }}, /* Byte value: 0xdb */ + {{0xcd, 0x20, 0xcb, 0x98, 0xc7, 0xdf, 0x1c, 0x13, }}, /* Byte value: 0xdc */ + {{0xa1, 0xf0, 0xb0, 0x02, 0x92, 0xd6, 0x5a, 0x91, }}, /* Byte value: 0xdd */ + {{0x1c, 0xee, 0xa6, 0x93, 0x11, 0xbc, 0xc0, 0x2a, }}, /* Byte value: 0xde */ + {{0x4d, 0xea, 0x87, 0x80, 0xd0, 0x7e, 0x22, 0x10, }}, /* Byte value: 0xdf */ + {{0x0c, 0x66, 0x4e, 0x90, 0xca, 0x01, 0xb7, 0x12, }}, /* Byte value: 0xe0 */ + {{0xcb, 0x13, 0xec, 0xd0, 0xa2, 0x3e, 0xa6, 0x1a, }}, /* Byte value: 0xe1 */ + {{0x03, 0xf8, 0xf2, 0x24, 0xd3, 0x91, 0x5d, 0xe5, }}, /* Byte value: 0xe2 */ + {{0x42, 0x74, 0x3b, 0x34, 0xc9, 0xee, 0xc8, 0xe7, }}, /* Byte value: 0xe3 */ + {{0x5b, 0x51, 0x48, 0xcb, 0x6e, 0x22, 0xef, 0x21, }}, /* Byte value: 0xe4 */ + {{0xf9, 0x59, 0x0a, 0xed, 0x2f, 0x65, 0xe8, 0x55, }}, /* Byte value: 0xe5 */ + {{0xc8, 0xeb, 0x1e, 0xf4, 0x71, 0xaf, 0xfb, 0xff, }}, /* Byte value: 0xe6 */ + {{0x6b, 0x0a, 0xb3, 0xce, 0xc0, 0x26, 0x76, 0x69, }}, /* Byte value: 0xe7 */ + {{0x7c, 0x58, 0x93, 0x99, 0x8e, 0xb4, 0x31, 0xba, }}, /* Byte value: 0xe8 */ + {{0x41, 0x8c, 0xc9, 0x10, 0x1a, 0x7f, 0x95, 0x02, }}, /* Byte value: 0xe9 */ + {{0x46, 0x56, 0x01, 0x44, 0x8f, 0x50, 0xa5, 0xe9, }}, /* Byte value: 0xea */ + {{0xc7, 0x75, 0xa2, 0x40, 0x68, 0x3f, 0x11, 0x08, }}, /* Byte value: 0xeb */ + {{0xad, 0x96, 0xfe, 0x92, 0x58, 0xd7, 0xed, 0x83, }}, /* Byte value: 0xec */ + {{0xa3, 0xe1, 0xad, 0x3a, 0xb1, 0x89, 0x8d, 0x96, }}, /* Byte value: 0xed */ + {{0xb1, 0x78, 0x58, 0x01, 0x49, 0x6b, 0x2d, 0xa9, }}, /* Byte value: 0xee */ + {{0xa2, 0x08, 0x42, 0x26, 0x41, 0x47, 0x07, 0x74, }}, /* Byte value: 0xef */ + {{0xe0, 0x7c, 0x79, 0x12, 0x88, 0xa9, 0xcf, 0x93, }}, /* Byte value: 0xf0 */ + {{0x21, 0x3a, 0xfc, 0x1a, 0x85, 0x77, 0x64, 0x92, }}, /* Byte value: 0xf1 */ + {{0x06, 0x33, 0x27, 0x48, 0x65, 0xe1, 0xba, 0x09, }}, /* Byte value: 0xf2 */ + {{0x84, 0xe8, 0x76, 0x68, 0x51, 0x1f, 0x53, 0x0d, }}, /* Byte value: 0xf3 */ + {{0x79, 0x93, 0x46, 0xf5, 0x38, 0xc4, 0xd6, 0x56, }}, /* Byte value: 0xf4 */ + {{0xfc, 0x92, 0xdf, 0x81, 0x99, 0x15, 0x0f, 0xb9, }}, /* Byte value: 0xf5 */ + {{0x9c, 0x24, 0xea, 0x8b, 0x06, 0x1d, 0xfe, 0x29, }}, /* Byte value: 0xf6 */ + {{0x1b, 0x34, 0x6e, 0xc7, 0x84, 0x93, 0xf0, 0xc1, }}, /* Byte value: 0xf7 */ + {{0xeb, 0xc0, 0xff, 0xd6, 0xd7, 0x87, 0x48, 0x6a, }}, /* Byte value: 0xf8 */ + {{0x82, 0xdb, 0x51, 0x20, 0x34, 0xfe, 0xe9, 0x04, }}, /* Byte value: 0xf9 */ + {{0x60, 0xb6, 0x35, 0x0a, 0x9f, 0x08, 0xf1, 0x90, }}, /* Byte value: 0xfa */ + {{0xc1, 0x46, 0x85, 0x08, 0x0d, 0xde, 0xab, 0x01, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x87, 0x10, 0x84, 0x4c, 0x82, 0x8e, 0x0e, 0xe8, }}, /* Byte value: 0xfd */ + {{0x5a, 0xb8, 0xa7, 0xd7, 0x9e, 0xec, 0x65, 0xc3, }}, /* Byte value: 0xfe */ + {{0x85, 0x01, 0x99, 0x74, 0xa1, 0xd1, 0xd9, 0xef, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 5 */ + {{0x78, 0xd9, 0x1d, 0x80, 0x8c, 0x85, 0x3b, 0x8c, }}, /* Byte value: 0x00 */ + {{0xbf, 0x31, 0xb7, 0x87, 0xa1, 0x7c, 0xf5, 0xa1, }}, /* Byte value: 0x01 */ + {{0xb7, 0xbe, 0xdf, 0x6c, 0x21, 0x29, 0x03, 0x21, }}, /* Byte value: 0x02 */ + {{0x42, 0xa1, 0xdc, 0x1e, 0xaa, 0x69, 0x60, 0xaa, }}, /* Byte value: 0x03 */ + {{0xc9, 0x92, 0xec, 0x32, 0xcd, 0xe3, 0x9f, 0xcd, }}, /* Byte value: 0x04 */ + {{0xd9, 0x4f, 0x3c, 0x27, 0x0e, 0x49, 0xb0, 0x0e, }}, /* Byte value: 0x05 */ + {{0xa2, 0x0d, 0x36, 0xc8, 0xb2, 0x0a, 0x39, 0xb2, }}, /* Byte value: 0x06 */ + {{0xe2, 0xff, 0xf0, 0x9c, 0x38, 0xe7, 0x85, 0x38, }}, /* Byte value: 0x07 */ + {{0x74, 0xf0, 0x41, 0xff, 0x4c, 0x1b, 0xb6, 0x4c, }}, /* Byte value: 0x08 */ + {{0x7f, 0xe4, 0x3e, 0x7b, 0xfc, 0x88, 0xf2, 0xfc, }}, /* Byte value: 0x09 */ + {{0x83, 0xbc, 0x58, 0xc7, 0xe7, 0xdf, 0x09, 0xe7, }}, /* Byte value: 0x0a */ + {{0x95, 0x94, 0xa6, 0x0c, 0x44, 0x3a, 0x81, 0x44, }}, /* Byte value: 0x0b */ + {{0x43, 0x69, 0xd1, 0x3b, 0xba, 0x2b, 0x0e, 0xba, }}, /* Byte value: 0x0c */ + {{0x4e, 0x88, 0x80, 0x61, 0x6a, 0xf7, 0xed, 0x6a, }}, /* Byte value: 0x0d */ + {{0xc6, 0x20, 0xa7, 0x22, 0x3d, 0xbb, 0xa0, 0x3d, }}, /* Byte value: 0x0e */ + {{0x7d, 0xb7, 0x24, 0x31, 0xdc, 0x0c, 0x2e, 0xdc, }}, /* Byte value: 0x0f */ + {{0xad, 0xbf, 0x7d, 0xd8, 0x42, 0x52, 0x06, 0x42, }}, /* Byte value: 0x10 */ + {{0x59, 0x68, 0x73, 0x8f, 0xd9, 0x50, 0x0b, 0xd9, }}, /* Byte value: 0x11 */ + {{0x2d, 0x98, 0x32, 0x70, 0x95, 0x4b, 0xbd, 0x95, }}, /* Byte value: 0x12 */ + {{0xbd, 0x62, 0xad, 0xcd, 0x81, 0xf8, 0x29, 0x81, }}, /* Byte value: 0x13 */ + {{0x51, 0xe7, 0x1b, 0x64, 0x59, 0x05, 0xfd, 0x59, }}, /* Byte value: 0x14 */ + {{0x71, 0x9e, 0x78, 0x4e, 0x1c, 0x92, 0xa3, 0x1c, }}, /* Byte value: 0x15 */ + {{0x85, 0x49, 0x76, 0x19, 0x87, 0x90, 0xae, 0x87, }}, /* Byte value: 0x16 */ + {{0x8d, 0xc6, 0x1e, 0xf2, 0x07, 0xc5, 0x58, 0x07, }}, /* Byte value: 0x17 */ + {{0x18, 0x52, 0xb8, 0xfe, 0x43, 0xff, 0xd9, 0x43, }}, /* Byte value: 0x18 */ + {{0xe9, 0xeb, 0x8f, 0x18, 0x88, 0x74, 0xc1, 0x88, }}, /* Byte value: 0x19 */ + {{0xe8, 0x23, 0x82, 0x3d, 0x98, 0x36, 0xaf, 0x98, }}, /* Byte value: 0x1a */ + {{0x23, 0xe2, 0x74, 0x45, 0x75, 0x51, 0xec, 0x75, }}, /* Byte value: 0x1b */ + {{0x63, 0x10, 0xb2, 0x11, 0xff, 0xbc, 0x50, 0xff, }}, /* Byte value: 0x1c */ + {{0x50, 0x2f, 0x16, 0x41, 0x49, 0x47, 0x93, 0x49, }}, /* Byte value: 0x1d */ + {{0x4f, 0x40, 0x8d, 0x44, 0x7a, 0xb5, 0x83, 0x7a, }}, /* Byte value: 0x1e */ + {{0x27, 0x44, 0x40, 0xd1, 0x35, 0x9a, 0x97, 0x35, }}, /* Byte value: 0x1f */ + {{0xcd, 0x34, 0xd8, 0xa6, 0x8d, 0x28, 0xe4, 0x8d, }}, /* Byte value: 0x20 */ + {{0xaa, 0x82, 0x5e, 0x23, 0x32, 0x5f, 0xcf, 0x32, }}, /* Byte value: 0x21 */ + {{0x2c, 0x50, 0x3f, 0x55, 0x85, 0x09, 0xd3, 0x85, }}, /* Byte value: 0x22 */ + {{0xa7, 0x63, 0x0f, 0x79, 0xe2, 0x83, 0x2c, 0xe2, }}, /* Byte value: 0x23 */ + {{0xd2, 0x5b, 0x43, 0xa3, 0xbe, 0xda, 0xf4, 0xbe, }}, /* Byte value: 0x24 */ + {{0xd8, 0x87, 0x31, 0x02, 0x1e, 0x0b, 0xde, 0x1e, }}, /* Byte value: 0x25 */ + {{0x5a, 0xf3, 0x64, 0xe0, 0xe9, 0x96, 0xb9, 0xe9, }}, /* Byte value: 0x26 */ + {{0xb9, 0xc4, 0x99, 0x59, 0xc1, 0x33, 0x52, 0xc1, }}, /* Byte value: 0x27 */ + {{0x5f, 0x9d, 0x5d, 0x51, 0xb9, 0x1f, 0xac, 0xb9, }}, /* Byte value: 0x28 */ + {{0x28, 0xf6, 0x0b, 0xc1, 0xc5, 0xc2, 0xa8, 0xc5, }}, /* Byte value: 0x29 */ + {{0x12, 0x8e, 0xca, 0x5f, 0xe3, 0x2e, 0xf3, 0xe3, }}, /* Byte value: 0x2a */ + {{0x26, 0x8c, 0x4d, 0xf4, 0x25, 0xd8, 0xf9, 0x25, }}, /* Byte value: 0x2b */ + {{0x30, 0xa4, 0xb3, 0x3f, 0x86, 0x3d, 0x71, 0x86, }}, /* Byte value: 0x2c */ + {{0x11, 0x15, 0xdd, 0x30, 0xd3, 0xe8, 0x41, 0xd3, }}, /* Byte value: 0x2d */ + {{0x1d, 0x3c, 0x81, 0x4f, 0x13, 0x76, 0xcc, 0x13, }}, /* Byte value: 0x2e */ + {{0xe0, 0xac, 0xea, 0xd6, 0x18, 0x63, 0x59, 0x18, }}, /* Byte value: 0x2f */ + {{0x99, 0xbd, 0xfa, 0x73, 0x84, 0xa4, 0x0c, 0x84, }}, /* Byte value: 0x30 */ + {{0xb2, 0xd0, 0xe6, 0xdd, 0x71, 0xa0, 0x16, 0x71, }}, /* Byte value: 0x31 */ + {{0x87, 0x1a, 0x6c, 0x53, 0xa7, 0x14, 0x72, 0xa7, }}, /* Byte value: 0x32 */ + {{0xda, 0xd4, 0x2b, 0x48, 0x3e, 0x8f, 0x02, 0x3e, }}, /* Byte value: 0x33 */ + {{0x69, 0xcc, 0xc0, 0xb0, 0x5f, 0x6d, 0x7a, 0x5f, }}, /* Byte value: 0x34 */ + {{0x6c, 0xa2, 0xf9, 0x01, 0x0f, 0xe4, 0x6f, 0x0f, }}, /* Byte value: 0x35 */ + {{0xba, 0x5f, 0x8e, 0x36, 0xf1, 0xf5, 0xe0, 0xf1, }}, /* Byte value: 0x36 */ + {{0xae, 0x24, 0x6a, 0xb7, 0x72, 0x94, 0xb4, 0x72, }}, /* Byte value: 0x37 */ + {{0x86, 0xd2, 0x61, 0x76, 0xb7, 0x56, 0x1c, 0xb7, }}, /* Byte value: 0x38 */ + {{0x9c, 0xd3, 0xc3, 0xc2, 0xd4, 0x2d, 0x19, 0xd4, }}, /* Byte value: 0x39 */ + {{0xce, 0xaf, 0xcf, 0xc9, 0xbd, 0xee, 0x56, 0xbd, }}, /* Byte value: 0x3a */ + {{0x9b, 0xee, 0xe0, 0x39, 0xa4, 0x20, 0xd0, 0xa4, }}, /* Byte value: 0x3b */ + {{0x3a, 0x78, 0xc1, 0x9e, 0x26, 0xec, 0x5b, 0x26, }}, /* Byte value: 0x3c */ + {{0xde, 0x72, 0x1f, 0xdc, 0x7e, 0x44, 0x79, 0x7e, }}, /* Byte value: 0x3d */ + {{0x60, 0x8b, 0xa5, 0x7e, 0xcf, 0x7a, 0xe2, 0xcf, }}, /* Byte value: 0x3e */ + {{0xff, 0xc3, 0x71, 0xd3, 0x2b, 0x91, 0x49, 0x2b, }}, /* Byte value: 0x3f */ + {{0xbb, 0x97, 0x83, 0x13, 0xe1, 0xb7, 0x8e, 0xe1, }}, /* Byte value: 0x40 */ + {{0x6d, 0x6a, 0xf4, 0x24, 0x1f, 0xa6, 0x01, 0x1f, }}, /* Byte value: 0x41 */ + {{0x0d, 0xe1, 0x51, 0x5a, 0xd0, 0xdc, 0xe3, 0xd0, }}, /* Byte value: 0x42 */ + {{0x0e, 0x7a, 0x46, 0x35, 0xe0, 0x1a, 0x51, 0xe0, }}, /* Byte value: 0x43 */ + {{0x16, 0x28, 0xfe, 0xcb, 0xa3, 0xe5, 0x88, 0xa3, }}, /* Byte value: 0x44 */ + {{0x52, 0x7c, 0x0c, 0x0b, 0x69, 0xc3, 0x4f, 0x69, }}, /* Byte value: 0x45 */ + {{0x0b, 0x14, 0x7f, 0x84, 0xb0, 0x93, 0x44, 0xb0, }}, /* Byte value: 0x46 */ + {{0x8a, 0xfb, 0x3d, 0x09, 0x77, 0xc8, 0x91, 0x77, }}, /* Byte value: 0x47 */ + {{0xec, 0x85, 0xb6, 0xa9, 0xd8, 0xfd, 0xd4, 0xd8, }}, /* Byte value: 0x48 */ + {{0x4d, 0x13, 0x97, 0x0e, 0x5a, 0x31, 0x5f, 0x5a, }}, /* Byte value: 0x49 */ + {{0xb4, 0x25, 0xc8, 0x03, 0x11, 0xef, 0xb1, 0x11, }}, /* Byte value: 0x4a */ + {{0xab, 0x4a, 0x53, 0x06, 0x22, 0x1d, 0xa1, 0x22, }}, /* Byte value: 0x4b */ + {{0xc8, 0x5a, 0xe1, 0x17, 0xdd, 0xa1, 0xf1, 0xdd, }}, /* Byte value: 0x4c */ + {{0xfe, 0x0b, 0x7c, 0xf6, 0x3b, 0xd3, 0x27, 0x3b, }}, /* Byte value: 0x4d */ + {{0xed, 0x4d, 0xbb, 0x8c, 0xc8, 0xbf, 0xba, 0xc8, }}, /* Byte value: 0x4e */ + {{0xd1, 0xc0, 0x54, 0xcc, 0x8e, 0x1c, 0x46, 0x8e, }}, /* Byte value: 0x4f */ + {{0x68, 0x04, 0xcd, 0x95, 0x4f, 0x2f, 0x14, 0x4f, }}, /* Byte value: 0x50 */ + {{0x07, 0x3d, 0x23, 0xfb, 0x70, 0x0d, 0xc9, 0x70, }}, /* Byte value: 0x51 */ + {{0x33, 0x3f, 0xa4, 0x50, 0xb6, 0xfb, 0xc3, 0xb6, }}, /* Byte value: 0x52 */ + {{0x58, 0xa0, 0x7e, 0xaa, 0xc9, 0x12, 0x65, 0xc9, }}, /* Byte value: 0x53 */ + {{0xcb, 0xc1, 0xf6, 0x78, 0xed, 0x67, 0x43, 0xed, }}, /* Byte value: 0x54 */ + {{0xd7, 0x35, 0x7a, 0x12, 0xee, 0x53, 0xe1, 0xee, }}, /* Byte value: 0x55 */ + {{0xf1, 0xb9, 0x37, 0xe6, 0xcb, 0x8b, 0x18, 0xcb, }}, /* Byte value: 0x56 */ + {{0x79, 0x11, 0x10, 0xa5, 0x9c, 0xc7, 0x55, 0x9c, }}, /* Byte value: 0x57 */ + {{0xd5, 0x66, 0x60, 0x58, 0xce, 0xd7, 0x3d, 0xce, }}, /* Byte value: 0x58 */ + {{0x3b, 0xb0, 0xcc, 0xbb, 0x36, 0xae, 0x35, 0x36, }}, /* Byte value: 0x59 */ + {{0x76, 0xa3, 0x5b, 0xb5, 0x6c, 0x9f, 0x6a, 0x6c, }}, /* Byte value: 0x5a */ + {{0x48, 0x7d, 0xae, 0xbf, 0x0a, 0xb8, 0x4a, 0x0a, }}, /* Byte value: 0x5b */ + {{0xc4, 0x73, 0xbd, 0x68, 0x1d, 0x3f, 0x7c, 0x1d, }}, /* Byte value: 0x5c */ + {{0x61, 0x43, 0xa8, 0x5b, 0xdf, 0x38, 0x8c, 0xdf, }}, /* Byte value: 0x5d */ + {{0x8e, 0x5d, 0x09, 0x9d, 0x37, 0x03, 0xea, 0x37, }}, /* Byte value: 0x5e */ + {{0x3f, 0x16, 0xf8, 0x2f, 0x76, 0x65, 0x4e, 0x76, }}, /* Byte value: 0x5f */ + {{0xfd, 0x90, 0x6b, 0x99, 0x0b, 0x15, 0x95, 0x0b, }}, /* Byte value: 0x60 */ + {{0xea, 0x70, 0x98, 0x77, 0xb8, 0xb2, 0x73, 0xb8, }}, /* Byte value: 0x61 */ + {{0x21, 0xb1, 0x6e, 0x0f, 0x55, 0xd5, 0x30, 0x55, }}, /* Byte value: 0x62 */ + {{0xf2, 0x22, 0x20, 0x89, 0xfb, 0x4d, 0xaa, 0xfb, }}, /* Byte value: 0x63 */ + {{0x34, 0x02, 0x87, 0xab, 0xc6, 0xf6, 0x0a, 0xc6, }}, /* Byte value: 0x64 */ + {{0x41, 0x3a, 0xcb, 0x71, 0x9a, 0xaf, 0xd2, 0x9a, }}, /* Byte value: 0x65 */ + {{0x77, 0x6b, 0x56, 0x90, 0x7c, 0xdd, 0x04, 0x7c, }}, /* Byte value: 0x66 */ + {{0xa3, 0xc5, 0x3b, 0xed, 0xa2, 0x48, 0x57, 0xa2, }}, /* Byte value: 0x67 */ + {{0x4b, 0xe6, 0xb9, 0xd0, 0x3a, 0x7e, 0xf8, 0x3a, }}, /* Byte value: 0x68 */ + {{0xc2, 0x86, 0x93, 0xb6, 0x7d, 0x70, 0xdb, 0x7d, }}, /* Byte value: 0x69 */ + {{0x32, 0xf7, 0xa9, 0x75, 0xa6, 0xb9, 0xad, 0xa6, }}, /* Byte value: 0x6a */ + {{0xf7, 0x4c, 0x19, 0x38, 0xab, 0xc4, 0xbf, 0xab, }}, /* Byte value: 0x6b */ + {{0x04, 0xa6, 0x34, 0x94, 0x40, 0xcb, 0x7b, 0x40, }}, /* Byte value: 0x6c */ + {{0xfc, 0x58, 0x66, 0xbc, 0x1b, 0x57, 0xfb, 0x1b, }}, /* Byte value: 0x6d */ + {{0xeb, 0xb8, 0x95, 0x52, 0xa8, 0xf0, 0x1d, 0xa8, }}, /* Byte value: 0x6e */ + {{0x53, 0xb4, 0x01, 0x2e, 0x79, 0x81, 0x21, 0x79, }}, /* Byte value: 0x6f */ + {{0x9f, 0x48, 0xd4, 0xad, 0xe4, 0xeb, 0xab, 0xe4, }}, /* Byte value: 0x70 */ + {{0xfa, 0xad, 0x48, 0x62, 0x7b, 0x18, 0x5c, 0x7b, }}, /* Byte value: 0x71 */ + {{0xe4, 0x0a, 0xde, 0x42, 0x58, 0xa8, 0x22, 0x58, }}, /* Byte value: 0x72 */ + {{0xca, 0x09, 0xfb, 0x5d, 0xfd, 0x25, 0x2d, 0xfd, }}, /* Byte value: 0x73 */ + {{0x55, 0x41, 0x2f, 0xf0, 0x19, 0xce, 0x86, 0x19, }}, /* Byte value: 0x74 */ + {{0xb0, 0x83, 0xfc, 0x97, 0x51, 0x24, 0xca, 0x51, }}, /* Byte value: 0x75 */ + {{0x1a, 0x01, 0xa2, 0xb4, 0x63, 0x7b, 0x05, 0x63, }}, /* Byte value: 0x76 */ + {{0xc1, 0x1d, 0x84, 0xd9, 0x4d, 0xb6, 0x69, 0x4d, }}, /* Byte value: 0x77 */ + {{0x64, 0x2d, 0x91, 0xea, 0x8f, 0xb1, 0x99, 0x8f, }}, /* Byte value: 0x78 */ + {{0xf0, 0x71, 0x3a, 0xc3, 0xdb, 0xc9, 0x76, 0xdb, }}, /* Byte value: 0x79 */ + {{0x96, 0x0f, 0xb1, 0x63, 0x74, 0xfc, 0x33, 0x74, }}, /* Byte value: 0x7a */ + {{0x9a, 0x26, 0xed, 0x1c, 0xb4, 0x62, 0xbe, 0xb4, }}, /* Byte value: 0x7b */ + {{0x1b, 0xc9, 0xaf, 0x91, 0x73, 0x39, 0x6b, 0x73, }}, /* Byte value: 0x7c */ + {{0x47, 0xcf, 0xe5, 0xaf, 0xfa, 0xe0, 0x75, 0xfa, }}, /* Byte value: 0x7d */ + {{0x02, 0x53, 0x1a, 0x4a, 0x20, 0x84, 0xdc, 0x20, }}, /* Byte value: 0x7e */ + {{0x7e, 0x2c, 0x33, 0x5e, 0xec, 0xca, 0x9c, 0xec, }}, /* Byte value: 0x7f */ + {{0xa5, 0x30, 0x15, 0x33, 0xc2, 0x07, 0xf0, 0xc2, }}, /* Byte value: 0x80 */ + {{0x54, 0x89, 0x22, 0xd5, 0x09, 0x8c, 0xe8, 0x09, }}, /* Byte value: 0x81 */ + {{0xb1, 0x4b, 0xf1, 0xb2, 0x41, 0x66, 0xa4, 0x41, }}, /* Byte value: 0x82 */ + {{0x7a, 0x8a, 0x07, 0xca, 0xac, 0x01, 0xe7, 0xac, }}, /* Byte value: 0x83 */ + {{0xee, 0xd6, 0xac, 0xe3, 0xf8, 0x79, 0x08, 0xf8, }}, /* Byte value: 0x84 */ + {{0xdd, 0xe9, 0x08, 0xb3, 0x4e, 0x82, 0xcb, 0x4e, }}, /* Byte value: 0x85 */ + {{0x3e, 0xde, 0xf5, 0x0a, 0x66, 0x27, 0x20, 0x66, }}, /* Byte value: 0x86 */ + {{0x56, 0xda, 0x38, 0x9f, 0x29, 0x08, 0x34, 0x29, }}, /* Byte value: 0x87 */ + {{0x45, 0x9c, 0xff, 0xe5, 0xda, 0x64, 0xa9, 0xda, }}, /* Byte value: 0x88 */ + {{0x1c, 0xf4, 0x8c, 0x6a, 0x03, 0x34, 0xa2, 0x03, }}, /* Byte value: 0x89 */ + {{0x35, 0xca, 0x8a, 0x8e, 0xd6, 0xb4, 0x64, 0xd6, }}, /* Byte value: 0x8a */ + {{0x88, 0xa8, 0x27, 0x43, 0x57, 0x4c, 0x4d, 0x57, }}, /* Byte value: 0x8b */ + {{0x1e, 0xa7, 0x96, 0x20, 0x23, 0xb0, 0x7e, 0x23, }}, /* Byte value: 0x8c */ + {{0x6f, 0x39, 0xee, 0x6e, 0x3f, 0x22, 0xdd, 0x3f, }}, /* Byte value: 0x8d */ + {{0xe6, 0x59, 0xc4, 0x08, 0x78, 0x2c, 0xfe, 0x78, }}, /* Byte value: 0x8e */ + {{0x6b, 0x9f, 0xda, 0xfa, 0x7f, 0xe9, 0xa6, 0x7f, }}, /* Byte value: 0x8f */ + {{0x36, 0x51, 0x9d, 0xe1, 0xe6, 0x72, 0xd6, 0xe6, }}, /* Byte value: 0x90 */ + {{0x3d, 0x45, 0xe2, 0x65, 0x56, 0xe1, 0x92, 0x56, }}, /* Byte value: 0x91 */ + {{0x3c, 0x8d, 0xef, 0x40, 0x46, 0xa3, 0xfc, 0x46, }}, /* Byte value: 0x92 */ + {{0x2a, 0xa5, 0x11, 0x8b, 0xe5, 0x46, 0x74, 0xe5, }}, /* Byte value: 0x93 */ + {{0xa1, 0x96, 0x21, 0xa7, 0x82, 0xcc, 0x8b, 0x82, }}, /* Byte value: 0x94 */ + {{0xac, 0x77, 0x70, 0xfd, 0x52, 0x10, 0x68, 0x52, }}, /* Byte value: 0x95 */ + {{0x1f, 0x6f, 0x9b, 0x05, 0x33, 0xf2, 0x10, 0x33, }}, /* Byte value: 0x96 */ + {{0xa4, 0xf8, 0x18, 0x16, 0xd2, 0x45, 0x9e, 0xd2, }}, /* Byte value: 0x97 */ + {{0xfb, 0x65, 0x45, 0x47, 0x6b, 0x5a, 0x32, 0x6b, }}, /* Byte value: 0x98 */ + {{0x44, 0x54, 0xf2, 0xc0, 0xca, 0x26, 0xc7, 0xca, }}, /* Byte value: 0x99 */ + {{0xc3, 0x4e, 0x9e, 0x93, 0x6d, 0x32, 0xb5, 0x6d, }}, /* Byte value: 0x9a */ + {{0x81, 0xef, 0x42, 0x8d, 0xc7, 0x5b, 0xd5, 0xc7, }}, /* Byte value: 0x9b */ + {{0x0f, 0xb2, 0x4b, 0x10, 0xf0, 0x58, 0x3f, 0xf0, }}, /* Byte value: 0x9c */ + {{0xd6, 0xfd, 0x77, 0x37, 0xfe, 0x11, 0x8f, 0xfe, }}, /* Byte value: 0x9d */ + {{0xe1, 0x64, 0xe7, 0xf3, 0x08, 0x21, 0x37, 0x08, }}, /* Byte value: 0x9e */ + {{0x03, 0x9b, 0x17, 0x6f, 0x30, 0xc6, 0xb2, 0x30, }}, /* Byte value: 0x9f */ + {{0x5c, 0x06, 0x4a, 0x3e, 0x89, 0xd9, 0x1e, 0x89, }}, /* Byte value: 0xa0 */ + {{0x46, 0x07, 0xe8, 0x8a, 0xea, 0xa2, 0x1b, 0xea, }}, /* Byte value: 0xa1 */ + {{0x7c, 0x7f, 0x29, 0x14, 0xcc, 0x4e, 0x40, 0xcc, }}, /* Byte value: 0xa2 */ + {{0x29, 0x3e, 0x06, 0xe4, 0xd5, 0x80, 0xc6, 0xd5, }}, /* Byte value: 0xa3 */ + {{0x94, 0x5c, 0xab, 0x29, 0x54, 0x78, 0xef, 0x54, }}, /* Byte value: 0xa4 */ + {{0x70, 0x56, 0x75, 0x6b, 0x0c, 0xd0, 0xcd, 0x0c, }}, /* Byte value: 0xa5 */ + {{0x0c, 0x29, 0x5c, 0x7f, 0xc0, 0x9e, 0x8d, 0xc0, }}, /* Byte value: 0xa6 */ + {{0x93, 0x61, 0x88, 0xd2, 0x24, 0x75, 0x26, 0x24, }}, /* Byte value: 0xa7 */ + {{0x57, 0x12, 0x35, 0xba, 0x39, 0x4a, 0x5a, 0x39, }}, /* Byte value: 0xa8 */ + {{0xe5, 0xc2, 0xd3, 0x67, 0x48, 0xea, 0x4c, 0x48, }}, /* Byte value: 0xa9 */ + {{0x01, 0xc8, 0x0d, 0x25, 0x10, 0x42, 0x6e, 0x10, }}, /* Byte value: 0xaa */ + {{0xdb, 0x1c, 0x26, 0x6d, 0x2e, 0xcd, 0x6c, 0x2e, }}, /* Byte value: 0xab */ + {{0x09, 0x47, 0x65, 0xce, 0x90, 0x17, 0x98, 0x90, }}, /* Byte value: 0xac */ + {{0x65, 0xe5, 0x9c, 0xcf, 0x9f, 0xf3, 0xf7, 0x9f, }}, /* Byte value: 0xad */ + {{0x80, 0x27, 0x4f, 0xa8, 0xd7, 0x19, 0xbb, 0xd7, }}, /* Byte value: 0xae */ + {{0x2e, 0x03, 0x25, 0x1f, 0xa5, 0x8d, 0x0f, 0xa5, }}, /* Byte value: 0xaf */ + {{0xf8, 0xfe, 0x52, 0x28, 0x5b, 0x9c, 0x80, 0x5b, }}, /* Byte value: 0xb0 */ + {{0x8f, 0x95, 0x04, 0xb8, 0x27, 0x41, 0x84, 0x27, }}, /* Byte value: 0xb1 */ + {{0xb8, 0x0c, 0x94, 0x7c, 0xd1, 0x71, 0x3c, 0xd1, }}, /* Byte value: 0xb2 */ + {{0x8c, 0x0e, 0x13, 0xd7, 0x17, 0x87, 0x36, 0x17, }}, /* Byte value: 0xb3 */ + {{0x89, 0x60, 0x2a, 0x66, 0x47, 0x0e, 0x23, 0x47, }}, /* Byte value: 0xb4 */ + {{0xa8, 0xd1, 0x44, 0x69, 0x12, 0xdb, 0x13, 0x12, }}, /* Byte value: 0xb5 */ + {{0xc5, 0xbb, 0xb0, 0x4d, 0x0d, 0x7d, 0x12, 0x0d, }}, /* Byte value: 0xb6 */ + {{0x38, 0x2b, 0xdb, 0xd4, 0x06, 0x68, 0x87, 0x06, }}, /* Byte value: 0xb7 */ + {{0xdf, 0xba, 0x12, 0xf9, 0x6e, 0x06, 0x17, 0x6e, }}, /* Byte value: 0xb8 */ + {{0x75, 0x38, 0x4c, 0xda, 0x5c, 0x59, 0xd8, 0x5c, }}, /* Byte value: 0xb9 */ + {{0x73, 0xcd, 0x62, 0x04, 0x3c, 0x16, 0x7f, 0x3c, }}, /* Byte value: 0xba */ + {{0xd4, 0xae, 0x6d, 0x7d, 0xde, 0x95, 0x53, 0xde, }}, /* Byte value: 0xbb */ + {{0xcf, 0x67, 0xc2, 0xec, 0xad, 0xac, 0x38, 0xad, }}, /* Byte value: 0xbc */ + {{0x17, 0xe0, 0xf3, 0xee, 0xb3, 0xa7, 0xe6, 0xb3, }}, /* Byte value: 0xbd */ + {{0x6a, 0x57, 0xd7, 0xdf, 0x6f, 0xab, 0xc8, 0x6f, }}, /* Byte value: 0xbe */ + {{0xd3, 0x93, 0x4e, 0x86, 0xae, 0x98, 0x9a, 0xae, }}, /* Byte value: 0xbf */ + {{0xbe, 0xf9, 0xba, 0xa2, 0xb1, 0x3e, 0x9b, 0xb1, }}, /* Byte value: 0xc0 */ + {{0x08, 0x8f, 0x68, 0xeb, 0x80, 0x55, 0xf6, 0x80, }}, /* Byte value: 0xc1 */ + {{0x19, 0x9a, 0xb5, 0xdb, 0x53, 0xbd, 0xb7, 0x53, }}, /* Byte value: 0xc2 */ + {{0x20, 0x79, 0x63, 0x2a, 0x45, 0x97, 0x5e, 0x45, }}, /* Byte value: 0xc3 */ + {{0x4c, 0xdb, 0x9a, 0x2b, 0x4a, 0x73, 0x31, 0x4a, }}, /* Byte value: 0xc4 */ + {{0x90, 0xfa, 0x9f, 0xbd, 0x14, 0xb3, 0x94, 0x14, }}, /* Byte value: 0xc5 */ + {{0x92, 0xa9, 0x85, 0xf7, 0x34, 0x37, 0x48, 0x34, }}, /* Byte value: 0xc6 */ + {{0xf4, 0xd7, 0x0e, 0x57, 0x9b, 0x02, 0x0d, 0x9b, }}, /* Byte value: 0xc7 */ + {{0xb5, 0xed, 0xc5, 0x26, 0x01, 0xad, 0xdf, 0x01, }}, /* Byte value: 0xc8 */ + {{0x39, 0xe3, 0xd6, 0xf1, 0x16, 0x2a, 0xe9, 0x16, }}, /* Byte value: 0xc9 */ + {{0xb3, 0x18, 0xeb, 0xf8, 0x61, 0xe2, 0x78, 0x61, }}, /* Byte value: 0xca */ + {{0xb6, 0x76, 0xd2, 0x49, 0x31, 0x6b, 0x6d, 0x31, }}, /* Byte value: 0xcb */ + {{0xa0, 0x5e, 0x2c, 0x82, 0x92, 0x8e, 0xe5, 0x92, }}, /* Byte value: 0xcc */ + {{0x66, 0x7e, 0x8b, 0xa0, 0xaf, 0x35, 0x45, 0xaf, }}, /* Byte value: 0xcd */ + {{0x97, 0xc7, 0xbc, 0x46, 0x64, 0xbe, 0x5d, 0x64, }}, /* Byte value: 0xce */ + {{0xdc, 0x21, 0x05, 0x96, 0x5e, 0xc0, 0xa5, 0x5e, }}, /* Byte value: 0xcf */ + {{0xef, 0x1e, 0xa1, 0xc6, 0xe8, 0x3b, 0x66, 0xe8, }}, /* Byte value: 0xd0 */ + {{0x40, 0xf2, 0xc6, 0x54, 0x8a, 0xed, 0xbc, 0x8a, }}, /* Byte value: 0xd1 */ + {{0x62, 0xd8, 0xbf, 0x34, 0xef, 0xfe, 0x3e, 0xef, }}, /* Byte value: 0xd2 */ + {{0x10, 0xdd, 0xd0, 0x15, 0xc3, 0xaa, 0x2f, 0xc3, }}, /* Byte value: 0xd3 */ + {{0x49, 0xb5, 0xa3, 0x9a, 0x1a, 0xfa, 0x24, 0x1a, }}, /* Byte value: 0xd4 */ + {{0xf5, 0x1f, 0x03, 0x72, 0x8b, 0x40, 0x63, 0x8b, }}, /* Byte value: 0xd5 */ + {{0xa9, 0x19, 0x49, 0x4c, 0x02, 0x99, 0x7d, 0x02, }}, /* Byte value: 0xd6 */ + {{0xc7, 0xe8, 0xaa, 0x07, 0x2d, 0xf9, 0xce, 0x2d, }}, /* Byte value: 0xd7 */ + {{0x84, 0x81, 0x7b, 0x3c, 0x97, 0xd2, 0xc0, 0x97, }}, /* Byte value: 0xd8 */ + {{0x72, 0x05, 0x6f, 0x21, 0x2c, 0x54, 0x11, 0x2c, }}, /* Byte value: 0xd9 */ + {{0x22, 0x2a, 0x79, 0x60, 0x65, 0x13, 0x82, 0x65, }}, /* Byte value: 0xda */ + {{0xaf, 0xec, 0x67, 0x92, 0x62, 0xd6, 0xda, 0x62, }}, /* Byte value: 0xdb */ + {{0x31, 0x6c, 0xbe, 0x1a, 0x96, 0x7f, 0x1f, 0x96, }}, /* Byte value: 0xdc */ + {{0x6e, 0xf1, 0xe3, 0x4b, 0x2f, 0x60, 0xb3, 0x2f, }}, /* Byte value: 0xdd */ + {{0x13, 0x46, 0xc7, 0x7a, 0xf3, 0x6c, 0x9d, 0xf3, }}, /* Byte value: 0xde */ + {{0xbc, 0xaa, 0xa0, 0xe8, 0x91, 0xba, 0x47, 0x91, }}, /* Byte value: 0xdf */ + {{0x4a, 0x2e, 0xb4, 0xf5, 0x2a, 0x3c, 0x96, 0x2a, }}, /* Byte value: 0xe0 */ + {{0x14, 0x7b, 0xe4, 0x81, 0x83, 0x61, 0x54, 0x83, }}, /* Byte value: 0xe1 */ + {{0xf3, 0xea, 0x2d, 0xac, 0xeb, 0x0f, 0xc4, 0xeb, }}, /* Byte value: 0xe2 */ + {{0x05, 0x6e, 0x39, 0xb1, 0x50, 0x89, 0x15, 0x50, }}, /* Byte value: 0xe3 */ + {{0xc0, 0xd5, 0x89, 0xfc, 0x5d, 0xf4, 0x07, 0x5d, }}, /* Byte value: 0xe4 */ + {{0x5d, 0xce, 0x47, 0x1b, 0x99, 0x9b, 0x70, 0x99, }}, /* Byte value: 0xe5 */ + {{0xe7, 0x91, 0xc9, 0x2d, 0x68, 0x6e, 0x90, 0x68, }}, /* Byte value: 0xe6 */ + {{0x2b, 0x6d, 0x1c, 0xae, 0xf5, 0x04, 0x1a, 0xf5, }}, /* Byte value: 0xe7 */ + {{0x06, 0xf5, 0x2e, 0xde, 0x60, 0x4f, 0xa7, 0x60, }}, /* Byte value: 0xe8 */ + {{0xf6, 0x84, 0x14, 0x1d, 0xbb, 0x86, 0xd1, 0xbb, }}, /* Byte value: 0xe9 */ + {{0x82, 0x74, 0x55, 0xe2, 0xf7, 0x9d, 0x67, 0xf7, }}, /* Byte value: 0xea */ + {{0x5e, 0x55, 0x50, 0x74, 0xa9, 0x5d, 0xc2, 0xa9, }}, /* Byte value: 0xeb */ + {{0x24, 0xdf, 0x57, 0xbe, 0x05, 0x5c, 0x25, 0x05, }}, /* Byte value: 0xec */ + {{0xcc, 0xfc, 0xd5, 0x83, 0x9d, 0x6a, 0x8a, 0x9d, }}, /* Byte value: 0xed */ + {{0x37, 0x99, 0x90, 0xc4, 0xf6, 0x30, 0xb8, 0xf6, }}, /* Byte value: 0xee */ + {{0x9d, 0x1b, 0xce, 0xe7, 0xc4, 0x6f, 0x77, 0xc4, }}, /* Byte value: 0xef */ + {{0x98, 0x75, 0xf7, 0x56, 0x94, 0xe6, 0x62, 0x94, }}, /* Byte value: 0xf0 */ + {{0xe3, 0x37, 0xfd, 0xb9, 0x28, 0xa5, 0xeb, 0x28, }}, /* Byte value: 0xf1 */ + {{0x25, 0x17, 0x5a, 0x9b, 0x15, 0x1e, 0x4b, 0x15, }}, /* Byte value: 0xf2 */ + {{0x0a, 0xdc, 0x72, 0xa1, 0xa0, 0xd1, 0x2a, 0xa0, }}, /* Byte value: 0xf3 */ + {{0xd0, 0x08, 0x59, 0xe9, 0x9e, 0x5e, 0x28, 0x9e, }}, /* Byte value: 0xf4 */ + {{0x8b, 0x33, 0x30, 0x2c, 0x67, 0x8a, 0xff, 0x67, }}, /* Byte value: 0xf5 */ + {{0x9e, 0x80, 0xd9, 0x88, 0xf4, 0xa9, 0xc5, 0xf4, }}, /* Byte value: 0xf6 */ + {{0x67, 0xb6, 0x86, 0x85, 0xbf, 0x77, 0x2b, 0xbf, }}, /* Byte value: 0xf7 */ + {{0xa6, 0xab, 0x02, 0x5c, 0xf2, 0xc1, 0x42, 0xf2, }}, /* Byte value: 0xf8 */ + {{0x2f, 0xcb, 0x28, 0x3a, 0xb5, 0xcf, 0x61, 0xb5, }}, /* Byte value: 0xf9 */ + {{0x15, 0xb3, 0xe9, 0xa4, 0x93, 0x23, 0x3a, 0x93, }}, /* Byte value: 0xfa */ + {{0x7b, 0x42, 0x0a, 0xef, 0xbc, 0x43, 0x89, 0xbc, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xf9, 0x36, 0x5f, 0x0d, 0x4b, 0xde, 0xee, 0x4b, }}, /* Byte value: 0xfd */ + {{0x91, 0x32, 0x92, 0x98, 0x04, 0xf1, 0xfa, 0x04, }}, /* Byte value: 0xfe */ + {{0x5b, 0x3b, 0x69, 0xc5, 0xf9, 0xd4, 0xd7, 0xf9, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 6 */ + {{0x04, 0x5b, 0xb3, 0x42, 0x6e, 0xe5, 0x18, 0xc6, }}, /* Byte value: 0x00 */ + {{0xa3, 0x06, 0xf7, 0x12, 0x65, 0x8f, 0x4c, 0x36, }}, /* Byte value: 0x01 */ + {{0x3b, 0x2e, 0x19, 0xca, 0x9c, 0x04, 0x9a, 0x9d, }}, /* Byte value: 0x02 */ + {{0x6c, 0x89, 0xa6, 0x39, 0x6b, 0x80, 0xab, 0x4b, }}, /* Byte value: 0x03 */ + {{0x55, 0x6b, 0x07, 0xd2, 0xc0, 0x17, 0x3d, 0xb5, }}, /* Byte value: 0x04 */ + {{0xa6, 0x3b, 0x18, 0xa1, 0xf1, 0xc2, 0x52, 0x20, }}, /* Byte value: 0x05 */ + {{0x97, 0x6f, 0x1c, 0xce, 0x86, 0x5c, 0xf4, 0x91, }}, /* Byte value: 0x06 */ + {{0xdd, 0xec, 0x60, 0xc1, 0x42, 0x8e, 0x8b, 0x80, }}, /* Byte value: 0x07 */ + {{0xd0, 0x67, 0x2a, 0xf6, 0x0a, 0xca, 0xa5, 0xd9, }}, /* Byte value: 0x08 */ + {{0x7d, 0x40, 0x73, 0x03, 0xea, 0x3a, 0xcd, 0x05, }}, /* Byte value: 0x09 */ + {{0xa1, 0xca, 0x4f, 0x33, 0x52, 0x1c, 0x40, 0x55, }}, /* Byte value: 0x0a */ + {{0x38, 0x84, 0xfd, 0x1a, 0x51, 0x3f, 0x90, 0x2e, }}, /* Byte value: 0x0b */ + {{0x7f, 0x8c, 0xcb, 0x22, 0xdd, 0xa9, 0xc1, 0x66, }}, /* Byte value: 0x0c */ + {{0xb8, 0xb5, 0x3f, 0x8d, 0x0f, 0xaf, 0x16, 0x54, }}, /* Byte value: 0x0d */ + {{0xb4, 0x58, 0x29, 0x4b, 0xbd, 0x43, 0x3e, 0xdd, }}, /* Byte value: 0x0e */ + {{0x5b, 0x4a, 0xa9, 0x35, 0x45, 0x68, 0x19, 0x5f, }}, /* Byte value: 0x0f */ + {{0x76, 0x5c, 0x32, 0x57, 0xfb, 0x08, 0xf7, 0xf9, }}, /* Byte value: 0x10 */ + {{0x32, 0xfe, 0xe0, 0xbf, 0xba, 0xa5, 0xac, 0x02, }}, /* Byte value: 0x11 */ + {{0xe2, 0x99, 0xca, 0x49, 0xb0, 0x6f, 0x09, 0xdb, }}, /* Byte value: 0x12 */ + {{0x85, 0x0c, 0x2d, 0x24, 0xca, 0xdd, 0x98, 0x6c, }}, /* Byte value: 0x13 */ + {{0xaa, 0xd6, 0x0e, 0x67, 0x43, 0x2e, 0x7a, 0xa9, }}, /* Byte value: 0x14 */ + {{0x8f, 0x76, 0x30, 0x81, 0x21, 0x47, 0xa4, 0x40, }}, /* Byte value: 0x15 */ + {{0xcb, 0xd4, 0xe2, 0x69, 0x60, 0xea, 0xff, 0xbb, }}, /* Byte value: 0x16 */ + {{0x53, 0xfc, 0x0c, 0xb1, 0x99, 0x61, 0x29, 0x10, }}, /* Byte value: 0x17 */ + {{0x6b, 0x78, 0xf1, 0xab, 0xc8, 0x5e, 0xb9, 0x3e, }}, /* Byte value: 0x18 */ + {{0x70, 0xcb, 0x39, 0x34, 0xa2, 0x7e, 0xe3, 0x5c, }}, /* Byte value: 0x19 */ + {{0x63, 0xce, 0x54, 0x2f, 0x14, 0x57, 0x89, 0x71, }}, /* Byte value: 0x1a */ + {{0x10, 0xaf, 0x89, 0xcb, 0x7b, 0x12, 0x60, 0x9e, }}, /* Byte value: 0x1b */ + {{0x5a, 0x2c, 0xf5, 0xc4, 0xbf, 0xc0, 0x1f, 0x8f, }}, /* Byte value: 0x1c */ + {{0xb9, 0xd3, 0x63, 0x7c, 0xf5, 0x07, 0x10, 0x84, }}, /* Byte value: 0x1d */ + {{0xab, 0xb0, 0x52, 0x96, 0xb9, 0x86, 0x7c, 0x79, }}, /* Byte value: 0x1e */ + {{0x5c, 0xbb, 0xfe, 0xa7, 0xe6, 0xb6, 0x0b, 0x2a, }}, /* Byte value: 0x1f */ + {{0x19, 0x7f, 0x70, 0xbe, 0x5d, 0xb3, 0x56, 0x01, }}, /* Byte value: 0x20 */ + {{0x0f, 0x47, 0xf2, 0x16, 0x7f, 0xd7, 0x22, 0x3a, }}, /* Byte value: 0x21 */ + {{0xf1, 0x9c, 0xa7, 0x52, 0x06, 0x46, 0x63, 0xf6, }}, /* Byte value: 0x22 */ + {{0xc8, 0x7e, 0x06, 0xb9, 0xad, 0xd1, 0xf5, 0x08, }}, /* Byte value: 0x23 */ + {{0x0b, 0x1c, 0x41, 0x54, 0x11, 0x32, 0x3a, 0xfc, }}, /* Byte value: 0x24 */ + {{0xb5, 0x3e, 0x75, 0xba, 0x47, 0xeb, 0x38, 0x0d, }}, /* Byte value: 0x25 */ + {{0x07, 0xf1, 0x57, 0x92, 0xa3, 0xde, 0x12, 0x75, }}, /* Byte value: 0x26 */ + {{0xc9, 0x18, 0x5a, 0x48, 0x57, 0x79, 0xf3, 0xd8, }}, /* Byte value: 0x27 */ + {{0x58, 0xe0, 0x4d, 0xe5, 0x88, 0x53, 0x13, 0xec, }}, /* Byte value: 0x28 */ + {{0xbd, 0x88, 0xd0, 0x3e, 0x9b, 0xe2, 0x08, 0x42, }}, /* Byte value: 0x29 */ + {{0xd5, 0x5a, 0xc5, 0x45, 0x9e, 0x87, 0xbb, 0xcf, }}, /* Byte value: 0x2a */ + {{0x4f, 0xbe, 0x93, 0xbc, 0x50, 0x9f, 0x61, 0x07, }}, /* Byte value: 0x2b */ + {{0xd6, 0xf0, 0x21, 0x95, 0x53, 0xbc, 0xb1, 0x7c, }}, /* Byte value: 0x2c */ + {{0xe0, 0x55, 0x72, 0x68, 0x87, 0xfc, 0x05, 0xb8, }}, /* Byte value: 0x2d */ + {{0x34, 0x69, 0xeb, 0xdc, 0xe3, 0xd3, 0xb8, 0xa7, }}, /* Byte value: 0x2e */ + {{0xfb, 0xe6, 0xba, 0xf7, 0xed, 0xdc, 0x5f, 0xda, }}, /* Byte value: 0x2f */ + {{0xec, 0xb8, 0x64, 0xae, 0x35, 0x10, 0x2d, 0x31, }}, /* Byte value: 0x30 */ + {{0x64, 0x3f, 0x03, 0xbd, 0xb7, 0x89, 0x9b, 0x04, }}, /* Byte value: 0x31 */ + {{0xed, 0xde, 0x38, 0x5f, 0xcf, 0xb8, 0x2b, 0xe1, }}, /* Byte value: 0x32 */ + {{0x93, 0x34, 0xaf, 0x8c, 0xe8, 0xb9, 0xec, 0x57, }}, /* Byte value: 0x33 */ + {{0xe4, 0x0e, 0xc1, 0x2a, 0xe9, 0x19, 0x1d, 0x7e, }}, /* Byte value: 0x34 */ + {{0xbb, 0x1f, 0xdb, 0x5d, 0xc2, 0x94, 0x1c, 0xe7, }}, /* Byte value: 0x35 */ + {{0xfc, 0x17, 0xed, 0x65, 0x4e, 0x02, 0x4d, 0xaf, }}, /* Byte value: 0x36 */ + {{0x43, 0x53, 0x85, 0x7a, 0xe2, 0x73, 0x49, 0x8e, }}, /* Byte value: 0x37 */ + {{0xfe, 0xdb, 0x55, 0x44, 0x79, 0x91, 0x41, 0xcc, }}, /* Byte value: 0x38 */ + {{0xb3, 0xa9, 0x7e, 0xd9, 0x1e, 0x9d, 0x2c, 0xa8, }}, /* Byte value: 0x39 */ + {{0x2c, 0x70, 0xc7, 0x93, 0x44, 0xc8, 0xe8, 0x76, }}, /* Byte value: 0x3a */ + {{0xca, 0xb2, 0xbe, 0x98, 0x9a, 0x42, 0xf9, 0x6b, }}, /* Byte value: 0x3b */ + {{0x68, 0xd2, 0x15, 0x7b, 0x05, 0x65, 0xb3, 0x8d, }}, /* Byte value: 0x3c */ + {{0xdf, 0x20, 0xd8, 0xe0, 0x75, 0x1d, 0x87, 0xe3, }}, /* Byte value: 0x3d */ + {{0x6f, 0x23, 0x42, 0xe9, 0xa6, 0xbb, 0xa1, 0xf8, }}, /* Byte value: 0x3e */ + {{0xe9, 0x85, 0x8b, 0x1d, 0xa1, 0x5d, 0x33, 0x27, }}, /* Byte value: 0x3f */ + {{0xef, 0x12, 0x80, 0x7e, 0xf8, 0x2b, 0x27, 0x82, }}, /* Byte value: 0x40 */ + {{0xa8, 0x1a, 0xb6, 0x46, 0x74, 0xbd, 0x76, 0xca, }}, /* Byte value: 0x41 */ + {{0xc7, 0x39, 0xf4, 0xaf, 0xd2, 0x06, 0xd7, 0x32, }}, /* Byte value: 0x42 */ + {{0xf2, 0x36, 0x43, 0x82, 0xcb, 0x7d, 0x69, 0x45, }}, /* Byte value: 0x43 */ + {{0x99, 0x4e, 0xb2, 0x29, 0x03, 0x23, 0xd0, 0x7b, }}, /* Byte value: 0x44 */ + {{0x9f, 0xd9, 0xb9, 0x4a, 0x5a, 0x55, 0xc4, 0xde, }}, /* Byte value: 0x45 */ + {{0xad, 0x27, 0x59, 0xf5, 0xe0, 0xf0, 0x68, 0xdc, }}, /* Byte value: 0x46 */ + {{0x2a, 0xe7, 0xcc, 0xf0, 0x1d, 0xbe, 0xfc, 0xd3, }}, /* Byte value: 0x47 */ + {{0x2f, 0xda, 0x23, 0x43, 0x89, 0xf3, 0xe2, 0xc5, }}, /* Byte value: 0x48 */ + {{0x8d, 0xba, 0x88, 0xa0, 0x16, 0xd4, 0xa8, 0x23, }}, /* Byte value: 0x49 */ + {{0x0e, 0x21, 0xae, 0xe7, 0x85, 0x7f, 0x24, 0xea, }}, /* Byte value: 0x4a */ + {{0x1c, 0x42, 0x9f, 0x0d, 0xc9, 0xfe, 0x48, 0x17, }}, /* Byte value: 0x4b */ + {{0x46, 0x6e, 0x6a, 0xc9, 0x76, 0x3e, 0x57, 0x98, }}, /* Byte value: 0x4c */ + {{0xfa, 0x80, 0xe6, 0x06, 0x17, 0x74, 0x59, 0x0a, }}, /* Byte value: 0x4d */ + {{0x3c, 0xdf, 0x4e, 0x58, 0x3f, 0xda, 0x88, 0xe8, }}, /* Byte value: 0x4e */ + {{0x3e, 0x13, 0xf6, 0x79, 0x08, 0x49, 0x84, 0x8b, }}, /* Byte value: 0x4f */ + {{0xf7, 0x0b, 0xac, 0x31, 0x5f, 0x30, 0x77, 0x53, }}, /* Byte value: 0x50 */ + {{0x79, 0x1b, 0xc0, 0x41, 0x84, 0xdf, 0xd5, 0xc3, }}, /* Byte value: 0x51 */ + {{0xe3, 0xff, 0x96, 0xb8, 0x4a, 0xc7, 0x0f, 0x0b, }}, /* Byte value: 0x52 */ + {{0x21, 0xfb, 0x8d, 0xa4, 0x0c, 0x8c, 0xc6, 0x2f, }}, /* Byte value: 0x53 */ + {{0x73, 0x61, 0xdd, 0xe4, 0x6f, 0x45, 0xe9, 0xef, }}, /* Byte value: 0x54 */ + {{0x54, 0x0d, 0x5b, 0x23, 0x3a, 0xbf, 0x3b, 0x65, }}, /* Byte value: 0x55 */ + {{0x1b, 0xb3, 0xc8, 0x9f, 0x6a, 0x20, 0x5a, 0x62, }}, /* Byte value: 0x56 */ + {{0x17, 0x5e, 0xde, 0x59, 0xd8, 0xcc, 0x72, 0xeb, }}, /* Byte value: 0x57 */ + {{0x72, 0x07, 0x81, 0x15, 0x95, 0xed, 0xef, 0x3f, }}, /* Byte value: 0x58 */ + {{0x7b, 0xd7, 0x78, 0x60, 0xb3, 0x4c, 0xd9, 0xa0, }}, /* Byte value: 0x59 */ + {{0xf6, 0x6d, 0xf0, 0xc0, 0xa5, 0x98, 0x71, 0x83, }}, /* Byte value: 0x5a */ + {{0xd2, 0xab, 0x92, 0xd7, 0x3d, 0x59, 0xa9, 0xba, }}, /* Byte value: 0x5b */ + {{0x92, 0x52, 0xf3, 0x7d, 0x12, 0x11, 0xea, 0x87, }}, /* Byte value: 0x5c */ + {{0x7c, 0x26, 0x2f, 0xf2, 0x10, 0x92, 0xcb, 0xd5, }}, /* Byte value: 0x5d */ + {{0x66, 0xf3, 0xbb, 0x9c, 0x80, 0x1a, 0x97, 0x67, }}, /* Byte value: 0x5e */ + {{0x37, 0xc3, 0x0f, 0x0c, 0x2e, 0xe8, 0xb2, 0x14, }}, /* Byte value: 0x5f */ + {{0xcf, 0x8f, 0x51, 0x2b, 0x0e, 0x0f, 0xe7, 0x7d, }}, /* Byte value: 0x60 */ + {{0x45, 0xc4, 0x8e, 0x19, 0xbb, 0x05, 0x5d, 0x2b, }}, /* Byte value: 0x61 */ + {{0x36, 0xa5, 0x53, 0xfd, 0xd4, 0x40, 0xb4, 0xc4, }}, /* Byte value: 0x62 */ + {{0x2e, 0xbc, 0x7f, 0xb2, 0x73, 0x5b, 0xe4, 0x15, }}, /* Byte value: 0x63 */ + {{0x9a, 0xe4, 0x56, 0xf9, 0xce, 0x18, 0xda, 0xc8, }}, /* Byte value: 0x64 */ + {{0x59, 0x86, 0x11, 0x14, 0x72, 0xfb, 0x15, 0x3c, }}, /* Byte value: 0x65 */ + {{0xe5, 0x68, 0x9d, 0xdb, 0x13, 0xb1, 0x1b, 0xae, }}, /* Byte value: 0x66 */ + {{0x84, 0x6a, 0x71, 0xd5, 0x30, 0x75, 0x9e, 0xbc, }}, /* Byte value: 0x67 */ + {{0xe7, 0xa4, 0x25, 0xfa, 0x24, 0x22, 0x17, 0xcd, }}, /* Byte value: 0x68 */ + {{0xf8, 0x4c, 0x5e, 0x27, 0x20, 0xe7, 0x55, 0x69, }}, /* Byte value: 0x69 */ + {{0xf0, 0xfa, 0xfb, 0xa3, 0xfc, 0xee, 0x65, 0x26, }}, /* Byte value: 0x6a */ + {{0x71, 0xad, 0x65, 0xc5, 0x58, 0xd6, 0xe5, 0x8c, }}, /* Byte value: 0x6b */ + {{0x4c, 0x14, 0x77, 0x6c, 0x9d, 0xa4, 0x6b, 0xb4, }}, /* Byte value: 0x6c */ + {{0xdc, 0x8a, 0x3c, 0x30, 0xb8, 0x26, 0x8d, 0x50, }}, /* Byte value: 0x6d */ + {{0x56, 0xc1, 0xe3, 0x02, 0x0d, 0x2c, 0x37, 0x06, }}, /* Byte value: 0x6e */ + {{0x8c, 0xdc, 0xd4, 0x51, 0xec, 0x7c, 0xae, 0xf3, }}, /* Byte value: 0x6f */ + {{0x86, 0xa6, 0xc9, 0xf4, 0x07, 0xe6, 0x92, 0xdf, }}, /* Byte value: 0x70 */ + {{0xb6, 0x94, 0x91, 0x6a, 0x8a, 0xd0, 0x32, 0xbe, }}, /* Byte value: 0x71 */ + {{0xb7, 0xf2, 0xcd, 0x9b, 0x70, 0x78, 0x34, 0x6e, }}, /* Byte value: 0x72 */ + {{0x60, 0x64, 0xb0, 0xff, 0xd9, 0x6c, 0x83, 0xc2, }}, /* Byte value: 0x73 */ + {{0xe6, 0xc2, 0x79, 0x0b, 0xde, 0x8a, 0x11, 0x1d, }}, /* Byte value: 0x74 */ + {{0x42, 0x35, 0xd9, 0x8b, 0x18, 0xdb, 0x4f, 0x5e, }}, /* Byte value: 0x75 */ + {{0x4d, 0x72, 0x2b, 0x9d, 0x67, 0x0c, 0x6d, 0x64, }}, /* Byte value: 0x76 */ + {{0xcd, 0x43, 0xe9, 0x0a, 0x39, 0x9c, 0xeb, 0x1e, }}, /* Byte value: 0x77 */ + {{0x23, 0x37, 0x35, 0x85, 0x3b, 0x1f, 0xca, 0x4c, }}, /* Byte value: 0x78 */ + {{0x08, 0xb6, 0xa5, 0x84, 0xdc, 0x09, 0x30, 0x4f, }}, /* Byte value: 0x79 */ + {{0x0d, 0x8b, 0x4a, 0x37, 0x48, 0x44, 0x2e, 0x59, }}, /* Byte value: 0x7a */ + {{0xd9, 0xb7, 0xd3, 0x83, 0x2c, 0x6b, 0x93, 0x46, }}, /* Byte value: 0x7b */ + {{0x5e, 0x77, 0x46, 0x86, 0xd1, 0x25, 0x07, 0x49, }}, /* Byte value: 0x7c */ + {{0x33, 0x98, 0xbc, 0x4e, 0x40, 0x0d, 0xaa, 0xd2, }}, /* Byte value: 0x7d */ + {{0x26, 0x0a, 0xda, 0x36, 0xaf, 0x52, 0xd4, 0x5a, }}, /* Byte value: 0x7e */ + {{0x6e, 0x45, 0x1e, 0x18, 0x5c, 0x13, 0xa7, 0x28, }}, /* Byte value: 0x7f */ + {{0xee, 0x74, 0xdc, 0x8f, 0x02, 0x83, 0x21, 0x52, }}, /* Byte value: 0x80 */ + {{0xf5, 0xc7, 0x14, 0x10, 0x68, 0xa3, 0x7b, 0x30, }}, /* Byte value: 0x81 */ + {{0x51, 0x30, 0xb4, 0x90, 0xae, 0xf2, 0x25, 0x73, }}, /* Byte value: 0x82 */ + {{0x22, 0x51, 0x69, 0x74, 0xc1, 0xb7, 0xcc, 0x9c, }}, /* Byte value: 0x83 */ + {{0x09, 0xd0, 0xf9, 0x75, 0x26, 0xa1, 0x36, 0x9f, }}, /* Byte value: 0x84 */ + {{0xea, 0x2f, 0x6f, 0xcd, 0x6c, 0x66, 0x39, 0x94, }}, /* Byte value: 0x85 */ + {{0x24, 0xc6, 0x62, 0x17, 0x98, 0xc1, 0xd8, 0x39, }}, /* Byte value: 0x86 */ + {{0xd3, 0xcd, 0xce, 0x26, 0xc7, 0xf1, 0xaf, 0x6a, }}, /* Byte value: 0x87 */ + {{0x15, 0x92, 0x66, 0x78, 0xef, 0x5f, 0x7e, 0x88, }}, /* Byte value: 0x88 */ + {{0x27, 0x6c, 0x86, 0xc7, 0x55, 0xfa, 0xd2, 0x8a, }}, /* Byte value: 0x89 */ + {{0x89, 0xe1, 0x3b, 0xe2, 0x78, 0x31, 0xb0, 0xe5, }}, /* Byte value: 0x8a */ + {{0x0c, 0xed, 0x16, 0xc6, 0xb2, 0xec, 0x28, 0x89, }}, /* Byte value: 0x8b */ + {{0x01, 0x66, 0x5c, 0xf1, 0xfa, 0xa8, 0x06, 0xd0, }}, /* Byte value: 0x8c */ + {{0x8e, 0x10, 0x6c, 0x70, 0xdb, 0xef, 0xa2, 0x90, }}, /* Byte value: 0x8d */ + {{0x91, 0xf8, 0x17, 0xad, 0xdf, 0x2a, 0xe0, 0x34, }}, /* Byte value: 0x8e */ + {{0xc2, 0x04, 0x1b, 0x1c, 0x46, 0x4b, 0xc9, 0x24, }}, /* Byte value: 0x8f */ + {{0xbc, 0xee, 0x8c, 0xcf, 0x61, 0x4a, 0x0e, 0x92, }}, /* Byte value: 0x90 */ + {{0x11, 0xc9, 0xd5, 0x3a, 0x81, 0xba, 0x66, 0x4e, }}, /* Byte value: 0x91 */ + {{0x02, 0xcc, 0xb8, 0x21, 0x37, 0x93, 0x0c, 0x63, }}, /* Byte value: 0x92 */ + {{0x9b, 0x82, 0x0a, 0x08, 0x34, 0xb0, 0xdc, 0x18, }}, /* Byte value: 0x93 */ + {{0xa2, 0x60, 0xab, 0xe3, 0x9f, 0x27, 0x4a, 0xe6, }}, /* Byte value: 0x94 */ + {{0x65, 0x59, 0x5f, 0x4c, 0x4d, 0x21, 0x9d, 0xd4, }}, /* Byte value: 0x95 */ + {{0x12, 0x63, 0x31, 0xea, 0x4c, 0x81, 0x6c, 0xfd, }}, /* Byte value: 0x96 */ + {{0xfd, 0x71, 0xb1, 0x94, 0xb4, 0xaa, 0x4b, 0x7f, }}, /* Byte value: 0x97 */ + {{0xa5, 0x91, 0xfc, 0x71, 0x3c, 0xf9, 0x58, 0x93, }}, /* Byte value: 0x98 */ + {{0x06, 0x97, 0x0b, 0x63, 0x59, 0x76, 0x14, 0xa5, }}, /* Byte value: 0x99 */ + {{0xeb, 0x49, 0x33, 0x3c, 0x96, 0xce, 0x3f, 0x44, }}, /* Byte value: 0x9a */ + {{0x87, 0xc0, 0x95, 0x05, 0xfd, 0x4e, 0x94, 0x0f, }}, /* Byte value: 0x9b */ + {{0xe1, 0x33, 0x2e, 0x99, 0x7d, 0x54, 0x03, 0x68, }}, /* Byte value: 0x9c */ + {{0x47, 0x08, 0x36, 0x38, 0x8c, 0x96, 0x51, 0x48, }}, /* Byte value: 0x9d */ + {{0xe8, 0xe3, 0xd7, 0xec, 0x5b, 0xf5, 0x35, 0xf7, }}, /* Byte value: 0x9e */ + {{0x35, 0x0f, 0xb7, 0x2d, 0x19, 0x7b, 0xbe, 0x77, }}, /* Byte value: 0x9f */ + {{0x6d, 0xef, 0xfa, 0xc8, 0x91, 0x28, 0xad, 0x9b, }}, /* Byte value: 0xa0 */ + {{0x20, 0x9d, 0xd1, 0x55, 0xf6, 0x24, 0xc0, 0xff, }}, /* Byte value: 0xa1 */ + {{0x48, 0x4f, 0xc4, 0x2e, 0xf3, 0x41, 0x73, 0x72, }}, /* Byte value: 0xa2 */ + {{0xae, 0x8d, 0xbd, 0x25, 0x2d, 0xcb, 0x62, 0x6f, }}, /* Byte value: 0xa3 */ + {{0x2b, 0x81, 0x90, 0x01, 0xe7, 0x16, 0xfa, 0x03, }}, /* Byte value: 0xa4 */ + {{0x9c, 0x73, 0x5d, 0x9a, 0x97, 0x6e, 0xce, 0x6d, }}, /* Byte value: 0xa5 */ + {{0xd4, 0x3c, 0x99, 0xb4, 0x64, 0x2f, 0xbd, 0x1f, }}, /* Byte value: 0xa6 */ + {{0x52, 0x9a, 0x50, 0x40, 0x63, 0xc9, 0x2f, 0xc0, }}, /* Byte value: 0xa7 */ + {{0xc0, 0xc8, 0xa3, 0x3d, 0x71, 0xd8, 0xc5, 0x47, }}, /* Byte value: 0xa8 */ + {{0xa4, 0xf7, 0xa0, 0x80, 0xc6, 0x51, 0x5e, 0x43, }}, /* Byte value: 0xa9 */ + {{0x13, 0x05, 0x6d, 0x1b, 0xb6, 0x29, 0x6a, 0x2d, }}, /* Byte value: 0xaa */ + {{0x80, 0x31, 0xc2, 0x97, 0x5e, 0x90, 0x86, 0x7a, }}, /* Byte value: 0xab */ + {{0x8b, 0x2d, 0x83, 0xc3, 0x4f, 0xa2, 0xbc, 0x86, }}, /* Byte value: 0xac */ + {{0x30, 0x32, 0x58, 0x9e, 0x8d, 0x36, 0xa0, 0x61, }}, /* Byte value: 0xad */ + {{0x94, 0xc5, 0xf8, 0x1e, 0x4b, 0x67, 0xfe, 0x22, }}, /* Byte value: 0xae */ + {{0xd7, 0x96, 0x7d, 0x64, 0xa9, 0x14, 0xb7, 0xac, }}, /* Byte value: 0xaf */ + {{0x90, 0x9e, 0x4b, 0x5c, 0x25, 0x82, 0xe6, 0xe4, }}, /* Byte value: 0xb0 */ + {{0x75, 0xf6, 0xd6, 0x87, 0x36, 0x33, 0xfd, 0x4a, }}, /* Byte value: 0xb1 */ + {{0xda, 0x1d, 0x37, 0x53, 0xe1, 0x50, 0x99, 0xf5, }}, /* Byte value: 0xb2 */ + {{0x40, 0xf9, 0x61, 0xaa, 0x2f, 0x48, 0x43, 0x3d, }}, /* Byte value: 0xb3 */ + {{0x1f, 0xe8, 0x7b, 0xdd, 0x04, 0xc5, 0x42, 0xa4, }}, /* Byte value: 0xb4 */ + {{0x29, 0x4d, 0x28, 0x20, 0xd0, 0x85, 0xf6, 0x60, }}, /* Byte value: 0xb5 */ + {{0x81, 0x57, 0x9e, 0x66, 0xa4, 0x38, 0x80, 0xaa, }}, /* Byte value: 0xb6 */ + {{0x4e, 0xd8, 0xcf, 0x4d, 0xaa, 0x37, 0x67, 0xd7, }}, /* Byte value: 0xb7 */ + {{0xcc, 0x25, 0xb5, 0xfb, 0xc3, 0x34, 0xed, 0xce, }}, /* Byte value: 0xb8 */ + {{0xc3, 0x62, 0x47, 0xed, 0xbc, 0xe3, 0xcf, 0xf4, }}, /* Byte value: 0xb9 */ + {{0xa9, 0x7c, 0xea, 0xb7, 0x8e, 0x15, 0x70, 0x1a, }}, /* Byte value: 0xba */ + {{0x61, 0x02, 0xec, 0x0e, 0x23, 0xc4, 0x85, 0x12, }}, /* Byte value: 0xbb */ + {{0x3f, 0x75, 0xaa, 0x88, 0xf2, 0xe1, 0x82, 0x5b, }}, /* Byte value: 0xbc */ + {{0x8a, 0x4b, 0xdf, 0x32, 0xb5, 0x0a, 0xba, 0x56, }}, /* Byte value: 0xbd */ + {{0xd1, 0x01, 0x76, 0x07, 0xf0, 0x62, 0xa3, 0x09, }}, /* Byte value: 0xbe */ + {{0x18, 0x19, 0x2c, 0x4f, 0xa7, 0x1b, 0x50, 0xd1, }}, /* Byte value: 0xbf */ + {{0xb0, 0x03, 0x9a, 0x09, 0xd3, 0xa6, 0x26, 0x1b, }}, /* Byte value: 0xc0 */ + {{0x98, 0x28, 0xee, 0xd8, 0xf9, 0x8b, 0xd6, 0xab, }}, /* Byte value: 0xc1 */ + {{0x78, 0x7d, 0x9c, 0xb0, 0x7e, 0x77, 0xd3, 0x13, }}, /* Byte value: 0xc2 */ + {{0x25, 0xa0, 0x3e, 0xe6, 0x62, 0x69, 0xde, 0xe9, }}, /* Byte value: 0xc3 */ + {{0x9e, 0xbf, 0xe5, 0xbb, 0xa0, 0xfd, 0xc2, 0x0e, }}, /* Byte value: 0xc4 */ + {{0x67, 0x95, 0xe7, 0x6d, 0x7a, 0xb2, 0x91, 0xb7, }}, /* Byte value: 0xc5 */ + {{0x41, 0x9f, 0x3d, 0x5b, 0xd5, 0xe0, 0x45, 0xed, }}, /* Byte value: 0xc6 */ + {{0x44, 0xa2, 0xd2, 0xe8, 0x41, 0xad, 0x5b, 0xfb, }}, /* Byte value: 0xc7 */ + {{0x1d, 0x24, 0xc3, 0xfc, 0x33, 0x56, 0x4e, 0xc7, }}, /* Byte value: 0xc8 */ + {{0x5d, 0xdd, 0xa2, 0x56, 0x1c, 0x1e, 0x0d, 0xfa, }}, /* Byte value: 0xc9 */ + {{0x77, 0x3a, 0x6e, 0xa6, 0x01, 0xa0, 0xf1, 0x29, }}, /* Byte value: 0xca */ + {{0x28, 0x2b, 0x74, 0xd1, 0x2a, 0x2d, 0xf0, 0xb0, }}, /* Byte value: 0xcb */ + {{0xb1, 0x65, 0xc6, 0xf8, 0x29, 0x0e, 0x20, 0xcb, }}, /* Byte value: 0xcc */ + {{0x05, 0x3d, 0xef, 0xb3, 0x94, 0x4d, 0x1e, 0x16, }}, /* Byte value: 0xcd */ + {{0x1e, 0x8e, 0x27, 0x2c, 0xfe, 0x6d, 0x44, 0x74, }}, /* Byte value: 0xce */ + {{0xf9, 0x2a, 0x02, 0xd6, 0xda, 0x4f, 0x53, 0xb9, }}, /* Byte value: 0xcf */ + {{0x1a, 0xd5, 0x94, 0x6e, 0x90, 0x88, 0x5c, 0xb2, }}, /* Byte value: 0xd0 */ + {{0x4a, 0x83, 0x7c, 0x0f, 0xc4, 0xd2, 0x7f, 0x11, }}, /* Byte value: 0xd1 */ + {{0x49, 0x29, 0x98, 0xdf, 0x09, 0xe9, 0x75, 0xa2, }}, /* Byte value: 0xd2 */ + {{0xf3, 0x50, 0x1f, 0x73, 0x31, 0xd5, 0x6f, 0x95, }}, /* Byte value: 0xd3 */ + {{0xc1, 0xae, 0xff, 0xcc, 0x8b, 0x70, 0xc3, 0x97, }}, /* Byte value: 0xd4 */ + {{0x57, 0xa7, 0xbf, 0xf3, 0xf7, 0x84, 0x31, 0xd6, }}, /* Byte value: 0xd5 */ + {{0x3a, 0x48, 0x45, 0x3b, 0x66, 0xac, 0x9c, 0x4d, }}, /* Byte value: 0xd6 */ + {{0xa7, 0x5d, 0x44, 0x50, 0x0b, 0x6a, 0x54, 0xf0, }}, /* Byte value: 0xd7 */ + {{0xd8, 0xd1, 0x8f, 0x72, 0xd6, 0xc3, 0x95, 0x96, }}, /* Byte value: 0xd8 */ + {{0xba, 0x79, 0x87, 0xac, 0x38, 0x3c, 0x1a, 0x37, }}, /* Byte value: 0xd9 */ + {{0x03, 0xaa, 0xe4, 0xd0, 0xcd, 0x3b, 0x0a, 0xb3, }}, /* Byte value: 0xda */ + {{0x50, 0x56, 0xe8, 0x61, 0x54, 0x5a, 0x23, 0xa3, }}, /* Byte value: 0xdb */ + {{0xc5, 0xf5, 0x4c, 0x8e, 0xe5, 0x95, 0xdb, 0x51, }}, /* Byte value: 0xdc */ + {{0x9d, 0x15, 0x01, 0x6b, 0x6d, 0xc6, 0xc8, 0xbd, }}, /* Byte value: 0xdd */ + {{0xc6, 0x5f, 0xa8, 0x5e, 0x28, 0xae, 0xd1, 0xe2, }}, /* Byte value: 0xde */ + {{0x96, 0x09, 0x40, 0x3f, 0x7c, 0xf4, 0xf2, 0x41, }}, /* Byte value: 0xdf */ + {{0xf4, 0xa1, 0x48, 0xe1, 0x92, 0x0b, 0x7d, 0xe0, }}, /* Byte value: 0xe0 */ + {{0xbf, 0x44, 0x68, 0x1f, 0xac, 0x71, 0x04, 0x21, }}, /* Byte value: 0xe1 */ + {{0x3d, 0xb9, 0x12, 0xa9, 0xc5, 0x72, 0x8e, 0x38, }}, /* Byte value: 0xe2 */ + {{0x5f, 0x11, 0x1a, 0x77, 0x2b, 0x8d, 0x01, 0x99, }}, /* Byte value: 0xe3 */ + {{0xde, 0x46, 0x84, 0x11, 0x8f, 0xb5, 0x81, 0x33, }}, /* Byte value: 0xe4 */ + {{0x7e, 0xea, 0x97, 0xd3, 0x27, 0x01, 0xc7, 0xb6, }}, /* Byte value: 0xe5 */ + {{0x82, 0xfd, 0x7a, 0xb6, 0x69, 0x03, 0x8a, 0x19, }}, /* Byte value: 0xe6 */ + {{0x88, 0x87, 0x67, 0x13, 0x82, 0x99, 0xb6, 0x35, }}, /* Byte value: 0xe7 */ + {{0x6a, 0x1e, 0xad, 0x5a, 0x32, 0xf6, 0xbf, 0xee, }}, /* Byte value: 0xe8 */ + {{0x62, 0xa8, 0x08, 0xde, 0xee, 0xff, 0x8f, 0xa1, }}, /* Byte value: 0xe9 */ + {{0xb2, 0xcf, 0x22, 0x28, 0xe4, 0x35, 0x2a, 0x78, }}, /* Byte value: 0xea */ + {{0x4b, 0xe5, 0x20, 0xfe, 0x3e, 0x7a, 0x79, 0xc1, }}, /* Byte value: 0xeb */ + {{0x69, 0xb4, 0x49, 0x8a, 0xff, 0xcd, 0xb5, 0x5d, }}, /* Byte value: 0xec */ + {{0x0a, 0x7a, 0x1d, 0xa5, 0xeb, 0x9a, 0x3c, 0x2c, }}, /* Byte value: 0xed */ + {{0xaf, 0xeb, 0xe1, 0xd4, 0xd7, 0x63, 0x64, 0xbf, }}, /* Byte value: 0xee */ + {{0xa0, 0xac, 0x13, 0xc2, 0xa8, 0xb4, 0x46, 0x85, }}, /* Byte value: 0xef */ + {{0xff, 0xbd, 0x09, 0xb5, 0x83, 0x39, 0x47, 0x1c, }}, /* Byte value: 0xf0 */ + {{0xce, 0xe9, 0x0d, 0xda, 0xf4, 0xa7, 0xe1, 0xad, }}, /* Byte value: 0xf1 */ + {{0x7a, 0xb1, 0x24, 0x91, 0x49, 0xe4, 0xdf, 0x70, }}, /* Byte value: 0xf2 */ + {{0xbe, 0x22, 0x34, 0xee, 0x56, 0xd9, 0x02, 0xf1, }}, /* Byte value: 0xf3 */ + {{0x2d, 0x16, 0x9b, 0x62, 0xbe, 0x60, 0xee, 0xa6, }}, /* Byte value: 0xf4 */ + {{0x39, 0xe2, 0xa1, 0xeb, 0xab, 0x97, 0x96, 0xfe, }}, /* Byte value: 0xf5 */ + {{0x95, 0xa3, 0xa4, 0xef, 0xb1, 0xcf, 0xf8, 0xf2, }}, /* Byte value: 0xf6 */ + {{0x16, 0x38, 0x82, 0xa8, 0x22, 0x64, 0x74, 0x3b, }}, /* Byte value: 0xf7 */ + {{0xdb, 0x7b, 0x6b, 0xa2, 0x1b, 0xf8, 0x9f, 0x25, }}, /* Byte value: 0xf8 */ + {{0xc4, 0x93, 0x10, 0x7f, 0x1f, 0x3d, 0xdd, 0x81, }}, /* Byte value: 0xf9 */ + {{0xac, 0x41, 0x05, 0x04, 0x1a, 0x58, 0x6e, 0x0c, }}, /* Byte value: 0xfa */ + {{0x31, 0x54, 0x04, 0x6f, 0x77, 0x9e, 0xa6, 0xb1, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x83, 0x9b, 0x26, 0x47, 0x93, 0xab, 0x8c, 0xc9, }}, /* Byte value: 0xfd */ + {{0x74, 0x90, 0x8a, 0x76, 0xcc, 0x9b, 0xfb, 0x9a, }}, /* Byte value: 0xfe */ + {{0x14, 0xf4, 0x3a, 0x89, 0x15, 0xf7, 0x78, 0x58, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 7 */ + {{0x42, 0xe7, 0xb4, 0xca, 0xc0, 0x3d, 0xf4, 0xe8, }}, /* Byte value: 0x00 */ + {{0x12, 0x3f, 0xbc, 0x10, 0x25, 0xe6, 0x1e, 0xf1, }}, /* Byte value: 0x01 */ + {{0xca, 0xf8, 0xa0, 0xd0, 0x5a, 0xc4, 0x96, 0x37, }}, /* Byte value: 0x02 */ + {{0x39, 0xb6, 0xe7, 0xff, 0x11, 0x3a, 0xe8, 0x2f, }}, /* Byte value: 0x03 */ + {{0xd2, 0xdc, 0x1d, 0x4a, 0x2b, 0x01, 0x04, 0x6c, }}, /* Byte value: 0x04 */ + {{0xa1, 0x91, 0x25, 0x09, 0xd5, 0x45, 0xd7, 0x23, }}, /* Byte value: 0x05 */ + {{0xce, 0xf6, 0x74, 0xeb, 0xac, 0x04, 0x10, 0x73, }}, /* Byte value: 0x06 */ + {{0xc1, 0x01, 0x94, 0x24, 0xd2, 0xd7, 0xda, 0x8c, }}, /* Byte value: 0x07 */ + {{0xf6, 0xa2, 0xa6, 0x6a, 0x61, 0x0e, 0x38, 0x4d, }}, /* Byte value: 0x08 */ + {{0x03, 0xe5, 0x5f, 0x82, 0xa7, 0x50, 0x83, 0x33, }}, /* Byte value: 0x09 */ + {{0x33, 0xad, 0xe6, 0x75, 0x45, 0x19, 0x64, 0x85, }}, /* Byte value: 0x0a */ + {{0x1a, 0x23, 0xd7, 0x66, 0x0a, 0xa5, 0xd1, 0x79, }}, /* Byte value: 0x0b */ + {{0x22, 0x77, 0x05, 0xe7, 0xc7, 0xaf, 0xf9, 0x47, }}, /* Byte value: 0x0c */ + {{0x8d, 0xf3, 0xf5, 0x5f, 0xb0, 0x09, 0x24, 0x8a, }}, /* Byte value: 0x0d */ + {{0x4b, 0x19, 0xea, 0xc2, 0x33, 0x4e, 0xfb, 0x71, }}, /* Byte value: 0x0e */ + {{0x35, 0xa4, 0x58, 0xb2, 0xc8, 0xb9, 0xa1, 0xe3, }}, /* Byte value: 0x0f */ + {{0x57, 0x33, 0x83, 0x63, 0xb4, 0x4b, 0xef, 0x6e, }}, /* Byte value: 0x10 */ + {{0xbf, 0xbc, 0x26, 0x54, 0x29, 0x20, 0x80, 0x1e, }}, /* Byte value: 0x11 */ + {{0x49, 0x1e, 0x80, 0x3e, 0x48, 0x2e, 0xb8, 0x53, }}, /* Byte value: 0x12 */ + {{0x24, 0x7e, 0xbb, 0x20, 0x4a, 0x0f, 0x3c, 0x21, }}, /* Byte value: 0x13 */ + {{0x67, 0x7b, 0x3a, 0x94, 0x56, 0x02, 0x08, 0xd8, }}, /* Byte value: 0x14 */ + {{0x81, 0xe1, 0x4a, 0x12, 0x69, 0x8a, 0x6d, 0x46, }}, /* Byte value: 0x15 */ + {{0x69, 0x6e, 0xef, 0x25, 0xf4, 0xe1, 0x02, 0x36, }}, /* Byte value: 0x16 */ + {{0xb1, 0xa9, 0xf3, 0xe5, 0x8b, 0xc3, 0x8a, 0xf0, }}, /* Byte value: 0x17 */ + {{0xab, 0x8a, 0x24, 0x83, 0x81, 0x66, 0x5b, 0x89, }}, /* Byte value: 0x18 */ + {{0x34, 0x46, 0x6d, 0xcc, 0x14, 0x89, 0x61, 0xf2, }}, /* Byte value: 0x19 */ + {{0x2f, 0x87, 0x8f, 0xd4, 0xc2, 0x1c, 0x70, 0x9a, }}, /* Byte value: 0x1a */ + {{0xcb, 0x1a, 0x95, 0xae, 0x86, 0xf4, 0x56, 0x26, }}, /* Byte value: 0x1b */ + {{0xc4, 0xed, 0x75, 0x61, 0xf8, 0x27, 0x9c, 0xd9, }}, /* Byte value: 0x1c */ + {{0x7c, 0xba, 0xd8, 0x8c, 0x80, 0x97, 0x19, 0xb0, }}, /* Byte value: 0x1d */ + {{0x96, 0x32, 0x17, 0x47, 0x66, 0x9c, 0x35, 0xe2, }}, /* Byte value: 0x1e */ + {{0xa7, 0x98, 0x9b, 0xce, 0x58, 0xe5, 0x12, 0x45, }}, /* Byte value: 0x1f */ + {{0xbe, 0x5e, 0x13, 0x2a, 0xf5, 0x10, 0x40, 0x0f, }}, /* Byte value: 0x20 */ + {{0x16, 0x31, 0x68, 0x2b, 0xd3, 0x26, 0x98, 0xb5, }}, /* Byte value: 0x21 */ + {{0x52, 0xdf, 0x62, 0x26, 0x9e, 0xbb, 0xa9, 0x3b, }}, /* Byte value: 0x22 */ + {{0xb9, 0xb5, 0x98, 0x93, 0xa4, 0x80, 0x45, 0x78, }}, /* Byte value: 0x23 */ + {{0x54, 0xd6, 0xdc, 0xe1, 0x13, 0x1b, 0x6c, 0x5d, }}, /* Byte value: 0x24 */ + {{0xba, 0x50, 0xc7, 0x11, 0x03, 0xd0, 0xc6, 0x4b, }}, /* Byte value: 0x25 */ + {{0x92, 0x3c, 0xc3, 0x7c, 0x90, 0x5c, 0xb3, 0xa6, }}, /* Byte value: 0x26 */ + {{0x48, 0xfc, 0xb5, 0x40, 0x94, 0x1e, 0x78, 0x42, }}, /* Byte value: 0x27 */ + {{0xe5, 0x7f, 0x2f, 0x04, 0x98, 0xd8, 0xe6, 0xad, }}, /* Byte value: 0x28 */ + {{0x3e, 0x5d, 0x6c, 0x46, 0x40, 0xaa, 0xed, 0x58, }}, /* Byte value: 0x29 */ + {{0x45, 0x0c, 0x3f, 0x73, 0x91, 0xad, 0xf1, 0x9f, }}, /* Byte value: 0x2a */ + {{0xbc, 0x59, 0x79, 0xd6, 0x8e, 0x70, 0x03, 0x2d, }}, /* Byte value: 0x2b */ + {{0x95, 0xd7, 0x48, 0xc5, 0xc1, 0xcc, 0xb6, 0xd1, }}, /* Byte value: 0x2c */ + {{0x68, 0x8c, 0xda, 0x5b, 0x28, 0xd1, 0xc2, 0x27, }}, /* Byte value: 0x2d */ + {{0xdc, 0xc9, 0xc8, 0xfb, 0x89, 0xe2, 0x0e, 0x82, }}, /* Byte value: 0x2e */ + {{0xf7, 0x40, 0x93, 0x14, 0xbd, 0x3e, 0xf8, 0x5c, }}, /* Byte value: 0x2f */ + {{0xae, 0x66, 0xc5, 0xc6, 0xab, 0x96, 0x1d, 0xdc, }}, /* Byte value: 0x30 */ + {{0xbd, 0xbb, 0x4c, 0xa8, 0x52, 0x40, 0xc3, 0x3c, }}, /* Byte value: 0x31 */ + {{0x5f, 0x2f, 0xe8, 0x15, 0x9b, 0x08, 0x20, 0xe6, }}, /* Byte value: 0x32 */ + {{0x8c, 0x11, 0xc0, 0x21, 0x6c, 0x39, 0xe4, 0x9b, }}, /* Byte value: 0x33 */ + {{0x2a, 0x6b, 0x6e, 0x91, 0xe8, 0xec, 0x36, 0xcf, }}, /* Byte value: 0x34 */ + {{0x5d, 0x28, 0x82, 0xe9, 0xe0, 0x68, 0x63, 0xc4, }}, /* Byte value: 0x35 */ + {{0x65, 0x7c, 0x50, 0x68, 0x2d, 0x62, 0x4b, 0xfa, }}, /* Byte value: 0x36 */ + {{0x7a, 0xb3, 0x66, 0x4b, 0x0d, 0x37, 0xdc, 0xd6, }}, /* Byte value: 0x37 */ + {{0x44, 0xee, 0x0a, 0x0d, 0x4d, 0x9d, 0x31, 0x8e, }}, /* Byte value: 0x38 */ + {{0xd9, 0x25, 0x29, 0xbe, 0xa3, 0x12, 0x48, 0xd7, }}, /* Byte value: 0x39 */ + {{0x93, 0xde, 0xf6, 0x02, 0x4c, 0x6c, 0x73, 0xb7, }}, /* Byte value: 0x3a */ + {{0x98, 0x27, 0xc2, 0xf6, 0xc4, 0x7f, 0x3f, 0x0c, }}, /* Byte value: 0x3b */ + {{0x7b, 0x51, 0x53, 0x35, 0xd1, 0x07, 0x1c, 0xc7, }}, /* Byte value: 0x3c */ + {{0xe0, 0x93, 0xce, 0x41, 0xb2, 0x28, 0xa0, 0xf8, }}, /* Byte value: 0x3d */ + {{0xe9, 0x6d, 0x90, 0x49, 0x41, 0x5b, 0xaf, 0x61, }}, /* Byte value: 0x3e */ + {{0x1d, 0xc8, 0x5c, 0xdf, 0x5b, 0x35, 0xd4, 0x0e, }}, /* Byte value: 0x3f */ + {{0x7e, 0xbd, 0xb2, 0x70, 0xfb, 0xf7, 0x5a, 0x92, }}, /* Byte value: 0x40 */ + {{0x46, 0xe9, 0x60, 0xf1, 0x36, 0xfd, 0x72, 0xac, }}, /* Byte value: 0x41 */ + {{0xaf, 0x84, 0xf0, 0xb8, 0x77, 0xa6, 0xdd, 0xcd, }}, /* Byte value: 0x42 */ + {{0x82, 0x04, 0x15, 0x90, 0xce, 0xda, 0xee, 0x75, }}, /* Byte value: 0x43 */ + {{0x29, 0x8e, 0x31, 0x13, 0x4f, 0xbc, 0xb5, 0xfc, }}, /* Byte value: 0x44 */ + {{0x4a, 0xfb, 0xdf, 0xbc, 0xef, 0x7e, 0x3b, 0x60, }}, /* Byte value: 0x45 */ + {{0xf5, 0x47, 0xf9, 0xe8, 0xc6, 0x5e, 0xbb, 0x7e, }}, /* Byte value: 0x46 */ + {{0xf0, 0xab, 0x18, 0xad, 0xec, 0xae, 0xfd, 0x2b, }}, /* Byte value: 0x47 */ + {{0x43, 0x05, 0x81, 0xb4, 0x1c, 0x0d, 0x34, 0xf9, }}, /* Byte value: 0x48 */ + {{0xa0, 0x73, 0x10, 0x77, 0x09, 0x75, 0x17, 0x32, }}, /* Byte value: 0x49 */ + {{0xe7, 0x78, 0x45, 0xf8, 0xe3, 0xb8, 0xa5, 0x8f, }}, /* Byte value: 0x4a */ + {{0x0d, 0xf0, 0x8a, 0x33, 0x05, 0xb3, 0x89, 0xdd, }}, /* Byte value: 0x4b */ + {{0xc9, 0x1d, 0xff, 0x52, 0xfd, 0x94, 0x15, 0x04, }}, /* Byte value: 0x4c */ + {{0x06, 0x09, 0xbe, 0xc7, 0x8d, 0xa0, 0xc5, 0x66, }}, /* Byte value: 0x4d */ + {{0x58, 0xc4, 0x63, 0xac, 0xca, 0x98, 0x25, 0x91, }}, /* Byte value: 0x4e */ + {{0x79, 0x56, 0x39, 0xc9, 0xaa, 0x67, 0x5f, 0xe5, }}, /* Byte value: 0x4f */ + {{0x31, 0xaa, 0x8c, 0x89, 0x3e, 0x79, 0x27, 0xa7, }}, /* Byte value: 0x50 */ + {{0x41, 0x02, 0xeb, 0x48, 0x67, 0x6d, 0x77, 0xdb, }}, /* Byte value: 0x51 */ + {{0xb8, 0x57, 0xad, 0xed, 0x78, 0xb0, 0x85, 0x69, }}, /* Byte value: 0x52 */ + {{0xa4, 0x7d, 0xc4, 0x4c, 0xff, 0xb5, 0x91, 0x76, }}, /* Byte value: 0x53 */ + {{0xe4, 0x9d, 0x1a, 0x7a, 0x44, 0xe8, 0x26, 0xbc, }}, /* Byte value: 0x54 */ + {{0x23, 0x95, 0x30, 0x99, 0x1b, 0x9f, 0x39, 0x56, }}, /* Byte value: 0x55 */ + {{0x9f, 0xcc, 0x49, 0x4f, 0x95, 0xef, 0x3a, 0x7b, }}, /* Byte value: 0x56 */ + {{0x59, 0x26, 0x56, 0xd2, 0x16, 0xa8, 0xe5, 0x80, }}, /* Byte value: 0x57 */ + {{0x15, 0xd4, 0x37, 0xa9, 0x74, 0x76, 0x1b, 0x86, }}, /* Byte value: 0x58 */ + {{0x60, 0x90, 0xb1, 0x2d, 0x07, 0x92, 0x0d, 0xaf, }}, /* Byte value: 0x59 */ + {{0xc0, 0xe3, 0xa1, 0x5a, 0x0e, 0xe7, 0x1a, 0x9d, }}, /* Byte value: 0x5a */ + {{0xd7, 0x30, 0xfc, 0x0f, 0x01, 0xf1, 0x42, 0x39, }}, /* Byte value: 0x5b */ + {{0x7d, 0x58, 0xed, 0xf2, 0x5c, 0xa7, 0xd9, 0xa1, }}, /* Byte value: 0x5c */ + {{0xf2, 0xac, 0x72, 0x51, 0x97, 0xce, 0xbe, 0x09, }}, /* Byte value: 0x5d */ + {{0x9c, 0x29, 0x16, 0xcd, 0x32, 0xbf, 0xb9, 0x48, }}, /* Byte value: 0x5e */ + {{0x0c, 0x12, 0xbf, 0x4d, 0xd9, 0x83, 0x49, 0xcc, }}, /* Byte value: 0x5f */ + {{0x2b, 0x89, 0x5b, 0xef, 0x34, 0xdc, 0xf6, 0xde, }}, /* Byte value: 0x60 */ + {{0x19, 0xc6, 0x88, 0xe4, 0xad, 0xf5, 0x52, 0x4a, }}, /* Byte value: 0x61 */ + {{0xfd, 0x5b, 0x92, 0x9e, 0xe9, 0x1d, 0x74, 0xf6, }}, /* Byte value: 0x62 */ + {{0xb2, 0x4c, 0xac, 0x67, 0x2c, 0x93, 0x09, 0xc3, }}, /* Byte value: 0x63 */ + {{0xf9, 0x55, 0x46, 0xa5, 0x1f, 0xdd, 0xf2, 0xb2, }}, /* Byte value: 0x64 */ + {{0x14, 0x36, 0x02, 0xd7, 0xa8, 0x46, 0xdb, 0x97, }}, /* Byte value: 0x65 */ + {{0xdb, 0x22, 0x43, 0x42, 0xd8, 0x72, 0x0b, 0xf5, }}, /* Byte value: 0x66 */ + {{0xd5, 0x37, 0x96, 0xf3, 0x7a, 0x91, 0x01, 0x1b, }}, /* Byte value: 0x67 */ + {{0xfa, 0xb0, 0x19, 0x27, 0xb8, 0x8d, 0x71, 0x81, }}, /* Byte value: 0x68 */ + {{0x27, 0x9b, 0xe4, 0xa2, 0xed, 0x5f, 0xbf, 0x12, }}, /* Byte value: 0x69 */ + {{0xa3, 0x96, 0x4f, 0xf5, 0xae, 0x25, 0x94, 0x01, }}, /* Byte value: 0x6a */ + {{0xc5, 0x0f, 0x40, 0x1f, 0x24, 0x17, 0x5c, 0xc8, }}, /* Byte value: 0x6b */ + {{0x6c, 0x82, 0x0e, 0x60, 0xde, 0x11, 0x44, 0x63, }}, /* Byte value: 0x6c */ + {{0x30, 0x48, 0xb9, 0xf7, 0xe2, 0x49, 0xe7, 0xb6, }}, /* Byte value: 0x6d */ + {{0x02, 0x07, 0x6a, 0xfc, 0x7b, 0x60, 0x43, 0x22, }}, /* Byte value: 0x6e */ + {{0x51, 0x3a, 0x3d, 0xa4, 0x39, 0xeb, 0x2a, 0x08, }}, /* Byte value: 0x6f */ + {{0xf4, 0xa5, 0xcc, 0x96, 0x1a, 0x6e, 0x7b, 0x6f, }}, /* Byte value: 0x70 */ + {{0x6a, 0x8b, 0xb0, 0xa7, 0x53, 0xb1, 0x81, 0x05, }}, /* Byte value: 0x71 */ + {{0x9b, 0xc2, 0x9d, 0x74, 0x63, 0x2f, 0xbc, 0x3f, }}, /* Byte value: 0x72 */ + {{0xff, 0x5c, 0xf8, 0x62, 0x92, 0x7d, 0x37, 0xd4, }}, /* Byte value: 0x73 */ + {{0x0b, 0xf9, 0x34, 0xf4, 0x88, 0x13, 0x4c, 0xbb, }}, /* Byte value: 0x74 */ + {{0x8b, 0xfa, 0x4b, 0x98, 0x3d, 0xa9, 0xe1, 0xec, }}, /* Byte value: 0x75 */ + {{0x9d, 0xcb, 0x23, 0xb3, 0xee, 0x8f, 0x79, 0x59, }}, /* Byte value: 0x76 */ + {{0x0a, 0x1b, 0x01, 0x8a, 0x54, 0x23, 0x8c, 0xaa, }}, /* Byte value: 0x77 */ + {{0x85, 0xef, 0x9e, 0x29, 0x9f, 0x4a, 0xeb, 0x02, }}, /* Byte value: 0x78 */ + {{0x84, 0x0d, 0xab, 0x57, 0x43, 0x7a, 0x2b, 0x13, }}, /* Byte value: 0x79 */ + {{0x37, 0xa3, 0x32, 0x4e, 0xb3, 0xd9, 0xe2, 0xc1, }}, /* Byte value: 0x7a */ + {{0x83, 0xe6, 0x20, 0xee, 0x12, 0xea, 0x2e, 0x64, }}, /* Byte value: 0x7b */ + {{0x86, 0x0a, 0xc1, 0xab, 0x38, 0x1a, 0x68, 0x31, }}, /* Byte value: 0x7c */ + {{0x4e, 0xf5, 0x0b, 0x87, 0x19, 0xbe, 0xbd, 0x24, }}, /* Byte value: 0x7d */ + {{0x36, 0x41, 0x07, 0x30, 0x6f, 0xe9, 0x22, 0xd0, }}, /* Byte value: 0x7e */ + {{0x18, 0x24, 0xbd, 0x9a, 0x71, 0xc5, 0x92, 0x5b, }}, /* Byte value: 0x7f */ + {{0x8f, 0xf4, 0x9f, 0xa3, 0xcb, 0x69, 0x67, 0xa8, }}, /* Byte value: 0x80 */ + {{0x10, 0x38, 0xd6, 0xec, 0x5e, 0x86, 0x5d, 0xd3, }}, /* Byte value: 0x81 */ + {{0x90, 0x3b, 0xa9, 0x80, 0xeb, 0x3c, 0xf0, 0x84, }}, /* Byte value: 0x82 */ + {{0x74, 0xa6, 0xb3, 0xfa, 0xaf, 0xd4, 0xd6, 0x38, }}, /* Byte value: 0x83 */ + {{0x75, 0x44, 0x86, 0x84, 0x73, 0xe4, 0x16, 0x29, }}, /* Byte value: 0x84 */ + {{0xcd, 0x13, 0x2b, 0x69, 0x0b, 0x54, 0x93, 0x40, }}, /* Byte value: 0x85 */ + {{0x17, 0xd3, 0x5d, 0x55, 0x0f, 0x16, 0x58, 0xa4, }}, /* Byte value: 0x86 */ + {{0x26, 0x79, 0xd1, 0xdc, 0x31, 0x6f, 0x7f, 0x03, }}, /* Byte value: 0x87 */ + {{0x78, 0xb4, 0x0c, 0xb7, 0x76, 0x57, 0x9f, 0xf4, }}, /* Byte value: 0x88 */ + {{0xc7, 0x08, 0x2a, 0xe3, 0x5f, 0x77, 0x1f, 0xea, }}, /* Byte value: 0x89 */ + {{0xe2, 0x94, 0xa4, 0xbd, 0xc9, 0x48, 0xe3, 0xda, }}, /* Byte value: 0x8a */ + {{0xc6, 0xea, 0x1f, 0x9d, 0x83, 0x47, 0xdf, 0xfb, }}, /* Byte value: 0x8b */ + {{0xf1, 0x49, 0x2d, 0xd3, 0x30, 0x9e, 0x3d, 0x3a, }}, /* Byte value: 0x8c */ + {{0x70, 0xa8, 0x67, 0xc1, 0x59, 0x14, 0x50, 0x7c, }}, /* Byte value: 0x8d */ + {{0xad, 0x83, 0x9a, 0x44, 0x0c, 0xc6, 0x9e, 0xef, }}, /* Byte value: 0x8e */ + {{0x1c, 0x2a, 0x69, 0xa1, 0x87, 0x05, 0x14, 0x1f, }}, /* Byte value: 0x8f */ + {{0xcf, 0x14, 0x41, 0x95, 0x70, 0x34, 0xd0, 0x62, }}, /* Byte value: 0x90 */ + {{0x3a, 0x53, 0xb8, 0x7d, 0xb6, 0x6a, 0x6b, 0x1c, }}, /* Byte value: 0x91 */ + {{0x21, 0x92, 0x5a, 0x65, 0x60, 0xff, 0x7a, 0x74, }}, /* Byte value: 0x92 */ + {{0x08, 0x1c, 0x6b, 0x76, 0x2f, 0x43, 0xcf, 0x88, }}, /* Byte value: 0x93 */ + {{0xe3, 0x76, 0x91, 0xc3, 0x15, 0x78, 0x23, 0xcb, }}, /* Byte value: 0x94 */ + {{0x4c, 0xf2, 0x61, 0x7b, 0x62, 0xde, 0xfe, 0x06, }}, /* Byte value: 0x95 */ + {{0xea, 0x88, 0xcf, 0xcb, 0xe6, 0x0b, 0x2c, 0x52, }}, /* Byte value: 0x96 */ + {{0x94, 0x35, 0x7d, 0xbb, 0x1d, 0xfc, 0x76, 0xc0, }}, /* Byte value: 0x97 */ + {{0x71, 0x4a, 0x52, 0xbf, 0x85, 0x24, 0x90, 0x6d, }}, /* Byte value: 0x98 */ + {{0x63, 0x75, 0xee, 0xaf, 0xa0, 0xc2, 0x8e, 0x9c, }}, /* Byte value: 0x99 */ + {{0x3c, 0x5a, 0x06, 0xba, 0x3b, 0xca, 0xae, 0x7a, }}, /* Byte value: 0x9a */ + {{0x05, 0xec, 0xe1, 0x45, 0x2a, 0xf0, 0x46, 0x55, }}, /* Byte value: 0x9b */ + {{0x99, 0xc5, 0xf7, 0x88, 0x18, 0x4f, 0xff, 0x1d, }}, /* Byte value: 0x9c */ + {{0x38, 0x54, 0xd2, 0x81, 0xcd, 0x0a, 0x28, 0x3e, }}, /* Byte value: 0x9d */ + {{0xec, 0x81, 0x71, 0x0c, 0x6b, 0xab, 0xe9, 0x34, }}, /* Byte value: 0x9e */ + {{0x2d, 0x80, 0xe5, 0x28, 0xb9, 0x7c, 0x33, 0xb8, }}, /* Byte value: 0x9f */ + {{0xc8, 0xff, 0xca, 0x2c, 0x21, 0xa4, 0xd5, 0x15, }}, /* Byte value: 0xa0 */ + {{0x55, 0x34, 0xe9, 0x9f, 0xcf, 0x2b, 0xac, 0x4c, }}, /* Byte value: 0xa1 */ + {{0x2e, 0x65, 0xba, 0xaa, 0x1e, 0x2c, 0xb0, 0x8b, }}, /* Byte value: 0xa2 */ + {{0x25, 0x9c, 0x8e, 0x5e, 0x96, 0x3f, 0xfc, 0x30, }}, /* Byte value: 0xa3 */ + {{0x01, 0xe2, 0x35, 0x7e, 0xdc, 0x30, 0xc0, 0x11, }}, /* Byte value: 0xa4 */ + {{0x9a, 0x20, 0xa8, 0x0a, 0xbf, 0x1f, 0x7c, 0x2e, }}, /* Byte value: 0xa5 */ + {{0xb4, 0x45, 0x12, 0xa0, 0xa1, 0x33, 0xcc, 0xa5, }}, /* Byte value: 0xa6 */ + {{0x40, 0xe0, 0xde, 0x36, 0xbb, 0x5d, 0xb7, 0xca, }}, /* Byte value: 0xa7 */ + {{0x3d, 0xb8, 0x33, 0xc4, 0xe7, 0xfa, 0x6e, 0x6b, }}, /* Byte value: 0xa8 */ + {{0x80, 0x03, 0x7f, 0x6c, 0xb5, 0xba, 0xad, 0x57, }}, /* Byte value: 0xa9 */ + {{0x1b, 0xc1, 0xe2, 0x18, 0xd6, 0x95, 0x11, 0x68, }}, /* Byte value: 0xaa */ + {{0x97, 0xd0, 0x22, 0x39, 0xba, 0xac, 0xf5, 0xf3, }}, /* Byte value: 0xab */ + {{0xc3, 0x06, 0xfe, 0xd8, 0xa9, 0xb7, 0x99, 0xae, }}, /* Byte value: 0xac */ + {{0x9e, 0x2e, 0x7c, 0x31, 0x49, 0xdf, 0xfa, 0x6a, }}, /* Byte value: 0xad */ + {{0x1e, 0x2d, 0x03, 0x5d, 0xfc, 0x65, 0x57, 0x3d, }}, /* Byte value: 0xae */ + {{0x64, 0x9e, 0x65, 0x16, 0xf1, 0x52, 0x8b, 0xeb, }}, /* Byte value: 0xaf */ + {{0x5c, 0xca, 0xb7, 0x97, 0x3c, 0x58, 0xa3, 0xd5, }}, /* Byte value: 0xb0 */ + {{0x87, 0xe8, 0xf4, 0xd5, 0xe4, 0x2a, 0xa8, 0x20, }}, /* Byte value: 0xb1 */ + {{0x53, 0x3d, 0x57, 0x58, 0x42, 0x8b, 0x69, 0x2a, }}, /* Byte value: 0xb2 */ + {{0xaa, 0x68, 0x11, 0xfd, 0x5d, 0x56, 0x9b, 0x98, }}, /* Byte value: 0xb3 */ + {{0xdd, 0x2b, 0xfd, 0x85, 0x55, 0xd2, 0xce, 0x93, }}, /* Byte value: 0xb4 */ + {{0x20, 0x70, 0x6f, 0x1b, 0xbc, 0xcf, 0xba, 0x65, }}, /* Byte value: 0xb5 */ + {{0x66, 0x99, 0x0f, 0xea, 0x8a, 0x32, 0xc8, 0xc9, }}, /* Byte value: 0xb6 */ + {{0x4d, 0x10, 0x54, 0x05, 0xbe, 0xee, 0x3e, 0x17, }}, /* Byte value: 0xb7 */ + {{0xfb, 0x52, 0x2c, 0x59, 0x64, 0xbd, 0xb1, 0x90, }}, /* Byte value: 0xb8 */ + {{0xed, 0x63, 0x44, 0x72, 0xb7, 0x9b, 0x29, 0x25, }}, /* Byte value: 0xb9 */ + {{0xb7, 0xa0, 0x4d, 0x22, 0x06, 0x63, 0x4f, 0x96, }}, /* Byte value: 0xba */ + {{0x0e, 0x15, 0xd5, 0xb1, 0xa2, 0xe3, 0x0a, 0xee, }}, /* Byte value: 0xbb */ + {{0x88, 0x1f, 0x14, 0x1a, 0x9a, 0xf9, 0x62, 0xdf, }}, /* Byte value: 0xbc */ + {{0x32, 0x4f, 0xd3, 0x0b, 0x99, 0x29, 0xa4, 0x94, }}, /* Byte value: 0xbd */ + {{0x07, 0xeb, 0x8b, 0xb9, 0x51, 0x90, 0x05, 0x77, }}, /* Byte value: 0xbe */ + {{0x4f, 0x17, 0x3e, 0xf9, 0xc5, 0x8e, 0x7d, 0x35, }}, /* Byte value: 0xbf */ + {{0x09, 0xfe, 0x5e, 0x08, 0xf3, 0x73, 0x0f, 0x99, }}, /* Byte value: 0xc0 */ + {{0xd8, 0xc7, 0x1c, 0xc0, 0x7f, 0x22, 0x88, 0xc6, }}, /* Byte value: 0xc1 */ + {{0xb0, 0x4b, 0xc6, 0x9b, 0x57, 0xf3, 0x4a, 0xe1, }}, /* Byte value: 0xc2 */ + {{0xe6, 0x9a, 0x70, 0x86, 0x3f, 0x88, 0x65, 0x9e, }}, /* Byte value: 0xc3 */ + {{0xbb, 0xb2, 0xf2, 0x6f, 0xdf, 0xe0, 0x06, 0x5a, }}, /* Byte value: 0xc4 */ + {{0x6d, 0x60, 0x3b, 0x1e, 0x02, 0x21, 0x84, 0x72, }}, /* Byte value: 0xc5 */ + {{0x5b, 0x21, 0x3c, 0x2e, 0x6d, 0xc8, 0xa6, 0xa2, }}, /* Byte value: 0xc6 */ + {{0xe8, 0x8f, 0xa5, 0x37, 0x9d, 0x6b, 0x6f, 0x70, }}, /* Byte value: 0xc7 */ + {{0xfc, 0xb9, 0xa7, 0xe0, 0x35, 0x2d, 0xb4, 0xe7, }}, /* Byte value: 0xc8 */ + {{0x56, 0xd1, 0xb6, 0x1d, 0x68, 0x7b, 0x2f, 0x7f, }}, /* Byte value: 0xc9 */ + {{0xa6, 0x7a, 0xae, 0xb0, 0x84, 0xd5, 0xd2, 0x54, }}, /* Byte value: 0xca */ + {{0xd1, 0x39, 0x42, 0xc8, 0x8c, 0x51, 0x87, 0x5f, }}, /* Byte value: 0xcb */ + {{0xf8, 0xb7, 0x73, 0xdb, 0xc3, 0xed, 0x32, 0xa3, }}, /* Byte value: 0xcc */ + {{0xb3, 0xae, 0x99, 0x19, 0xf0, 0xa3, 0xc9, 0xd2, }}, /* Byte value: 0xcd */ + {{0x2c, 0x62, 0xd0, 0x56, 0x65, 0x4c, 0xf3, 0xa9, }}, /* Byte value: 0xce */ + {{0xd6, 0xd2, 0xc9, 0x71, 0xdd, 0xc1, 0x82, 0x28, }}, /* Byte value: 0xcf */ + {{0x6e, 0x85, 0x64, 0x9c, 0xa5, 0x71, 0x07, 0x41, }}, /* Byte value: 0xd0 */ + {{0x0f, 0xf7, 0xe0, 0xcf, 0x7e, 0xd3, 0xca, 0xff, }}, /* Byte value: 0xd1 */ + {{0xdf, 0x2c, 0x97, 0x79, 0x2e, 0xb2, 0x8d, 0xb1, }}, /* Byte value: 0xd2 */ + {{0x73, 0x4d, 0x38, 0x43, 0xfe, 0x44, 0xd3, 0x4f, }}, /* Byte value: 0xd3 */ + {{0xcc, 0xf1, 0x1e, 0x17, 0xd7, 0x64, 0x53, 0x51, }}, /* Byte value: 0xd4 */ + {{0xf3, 0x4e, 0x47, 0x2f, 0x4b, 0xfe, 0x7e, 0x18, }}, /* Byte value: 0xd5 */ + {{0x3b, 0xb1, 0x8d, 0x03, 0x6a, 0x5a, 0xab, 0x0d, }}, /* Byte value: 0xd6 */ + {{0x50, 0xd8, 0x08, 0xda, 0xe5, 0xdb, 0xea, 0x19, }}, /* Byte value: 0xd7 */ + {{0x72, 0xaf, 0x0d, 0x3d, 0x22, 0x74, 0x13, 0x5e, }}, /* Byte value: 0xd8 */ + {{0xac, 0x61, 0xaf, 0x3a, 0xd0, 0xf6, 0x5e, 0xfe, }}, /* Byte value: 0xd9 */ + {{0xd0, 0xdb, 0x77, 0xb6, 0x50, 0x61, 0x47, 0x4e, }}, /* Byte value: 0xda */ + {{0x61, 0x72, 0x84, 0x53, 0xdb, 0xa2, 0xcd, 0xbe, }}, /* Byte value: 0xdb */ + {{0x8e, 0x16, 0xaa, 0xdd, 0x17, 0x59, 0xa7, 0xb9, }}, /* Byte value: 0xdc */ + {{0x6b, 0x69, 0x85, 0xd9, 0x8f, 0x81, 0x41, 0x14, }}, /* Byte value: 0xdd */ + {{0x5e, 0xcd, 0xdd, 0x6b, 0x47, 0x38, 0xe0, 0xf7, }}, /* Byte value: 0xde */ + {{0x3f, 0xbf, 0x59, 0x38, 0x9c, 0x9a, 0x2d, 0x49, }}, /* Byte value: 0xdf */ + {{0xe1, 0x71, 0xfb, 0x3f, 0x6e, 0x18, 0x60, 0xe9, }}, /* Byte value: 0xe0 */ + {{0x1f, 0xcf, 0x36, 0x23, 0x20, 0x55, 0x97, 0x2c, }}, /* Byte value: 0xe1 */ + {{0xa9, 0x8d, 0x4e, 0x7f, 0xfa, 0x06, 0x18, 0xab, }}, /* Byte value: 0xe2 */ + {{0x77, 0x43, 0xec, 0x78, 0x08, 0x84, 0x55, 0x0b, }}, /* Byte value: 0xe3 */ + {{0x11, 0xda, 0xe3, 0x92, 0x82, 0xb6, 0x9d, 0xc2, }}, /* Byte value: 0xe4 */ + {{0xd3, 0x3e, 0x28, 0x34, 0xf7, 0x31, 0xc4, 0x7d, }}, /* Byte value: 0xe5 */ + {{0xb6, 0x42, 0x78, 0x5c, 0xda, 0x53, 0x8f, 0x87, }}, /* Byte value: 0xe6 */ + {{0x13, 0xdd, 0x89, 0x6e, 0xf9, 0xd6, 0xde, 0xe0, }}, /* Byte value: 0xe7 */ + {{0x5a, 0xc3, 0x09, 0x50, 0xb1, 0xf8, 0x66, 0xb3, }}, /* Byte value: 0xe8 */ + {{0xde, 0xce, 0xa2, 0x07, 0xf2, 0x82, 0x4d, 0xa0, }}, /* Byte value: 0xe9 */ + {{0x28, 0x6c, 0x04, 0x6d, 0x93, 0x8c, 0x75, 0xed, }}, /* Byte value: 0xea */ + {{0xfe, 0xbe, 0xcd, 0x1c, 0x4e, 0x4d, 0xf7, 0xc5, }}, /* Byte value: 0xeb */ + {{0x8a, 0x18, 0x7e, 0xe6, 0xe1, 0x99, 0x21, 0xfd, }}, /* Byte value: 0xec */ + {{0xa5, 0x9f, 0xf1, 0x32, 0x23, 0x85, 0x51, 0x67, }}, /* Byte value: 0xed */ + {{0xd4, 0xd5, 0xa3, 0x8d, 0xa6, 0xa1, 0xc1, 0x0a, }}, /* Byte value: 0xee */ + {{0xc2, 0xe4, 0xcb, 0xa6, 0x75, 0x87, 0x59, 0xbf, }}, /* Byte value: 0xef */ + {{0xb5, 0xa7, 0x27, 0xde, 0x7d, 0x03, 0x0c, 0xb4, }}, /* Byte value: 0xf0 */ + {{0xda, 0xc0, 0x76, 0x3c, 0x04, 0x42, 0xcb, 0xe4, }}, /* Byte value: 0xf1 */ + {{0x91, 0xd9, 0x9c, 0xfe, 0x37, 0x0c, 0x30, 0x95, }}, /* Byte value: 0xf2 */ + {{0xee, 0x86, 0x1b, 0xf0, 0x10, 0xcb, 0xaa, 0x16, }}, /* Byte value: 0xf3 */ + {{0x62, 0x97, 0xdb, 0xd1, 0x7c, 0xf2, 0x4e, 0x8d, }}, /* Byte value: 0xf4 */ + {{0xeb, 0x6a, 0xfa, 0xb5, 0x3a, 0x3b, 0xec, 0x43, }}, /* Byte value: 0xf5 */ + {{0xef, 0x64, 0x2e, 0x8e, 0xcc, 0xfb, 0x6a, 0x07, }}, /* Byte value: 0xf6 */ + {{0xa8, 0x6f, 0x7b, 0x01, 0x26, 0x36, 0xd8, 0xba, }}, /* Byte value: 0xf7 */ + {{0xa2, 0x74, 0x7a, 0x8b, 0x72, 0x15, 0x54, 0x10, }}, /* Byte value: 0xf8 */ + {{0x7f, 0x5f, 0x87, 0x0e, 0x27, 0xc7, 0x9a, 0x83, }}, /* Byte value: 0xf9 */ + {{0x04, 0x0e, 0xd4, 0x3b, 0xf6, 0xc0, 0x86, 0x44, }}, /* Byte value: 0xfa */ + {{0x6f, 0x67, 0x51, 0xe2, 0x79, 0x41, 0xc7, 0x50, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x47, 0x0b, 0x55, 0x8f, 0xea, 0xcd, 0xb2, 0xbd, }}, /* Byte value: 0xfd */ + {{0x76, 0xa1, 0xd9, 0x06, 0xd4, 0xb4, 0x95, 0x1a, }}, /* Byte value: 0xfe */ + {{0x89, 0xfd, 0x21, 0x64, 0x46, 0xc9, 0xa2, 0xce, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 8 */ + {{0x63, 0xeb, 0xf0, 0x49, 0x21, 0x0a, 0xad, 0xf8, }}, /* Byte value: 0x00 */ + {{0x1b, 0x19, 0xbd, 0x7f, 0x09, 0x35, 0xa8, 0x38, }}, /* Byte value: 0x01 */ + {{0xaf, 0xb5, 0xad, 0x3e, 0x65, 0x8a, 0x44, 0xdb, }}, /* Byte value: 0x02 */ + {{0xc4, 0x02, 0x84, 0xcc, 0xfd, 0xee, 0x57, 0x5c, }}, /* Byte value: 0x03 */ + {{0xbb, 0x23, 0x51, 0x37, 0x69, 0x61, 0xa4, 0xfb, }}, /* Byte value: 0x04 */ + {{0x10, 0xb8, 0x71, 0xb5, 0xb1, 0xdc, 0xbf, 0xfe, }}, /* Byte value: 0x05 */ + {{0xa9, 0x8c, 0x87, 0xdc, 0x67, 0x47, 0xd5, 0x6a, }}, /* Byte value: 0x06 */ + {{0x40, 0xa5, 0x07, 0x91, 0x81, 0xf6, 0xb9, 0x7e, }}, /* Byte value: 0x07 */ + {{0x8d, 0x11, 0xe8, 0xc9, 0x7b, 0x0b, 0x37, 0x8b, }}, /* Byte value: 0x08 */ + {{0xe3, 0x62, 0xfe, 0xa8, 0xe0, 0x25, 0x1c, 0x04, }}, /* Byte value: 0x09 */ + {{0xcb, 0x8d, 0xc5, 0xba, 0xf8, 0x30, 0x1f, 0x44, }}, /* Byte value: 0x0a */ + {{0x17, 0x6b, 0xe9, 0x78, 0x0d, 0x6c, 0x49, 0x99, }}, /* Byte value: 0x0b */ + {{0x33, 0xf6, 0x86, 0x6d, 0x11, 0x20, 0xab, 0x78, }}, /* Byte value: 0x0c */ + {{0x2a, 0xf8, 0x9c, 0x4c, 0xa7, 0xef, 0xcd, 0x2f, }}, /* Byte value: 0x0d */ + {{0x8f, 0x06, 0x4f, 0x97, 0xc4, 0xf1, 0xf9, 0xe4, }}, /* Byte value: 0x0e */ + {{0xce, 0x49, 0xfa, 0x29, 0xfb, 0x7a, 0x27, 0x4c, }}, /* Byte value: 0x0f */ + {{0x9d, 0xa9, 0x99, 0x7c, 0xca, 0xd7, 0x88, 0x75, }}, /* Byte value: 0x10 */ + {{0x01, 0xea, 0xb2, 0x2f, 0xbe, 0x7d, 0x67, 0xd6, }}, /* Byte value: 0x11 */ + {{0x8c, 0xfb, 0x5a, 0xe6, 0xc5, 0x76, 0x50, 0x5d, }}, /* Byte value: 0x12 */ + {{0x36, 0x32, 0xb9, 0xfe, 0x12, 0x6a, 0x93, 0x70, }}, /* Byte value: 0x13 */ + {{0xb5, 0x46, 0xa2, 0x6e, 0xd2, 0xc2, 0x8b, 0x35, }}, /* Byte value: 0x14 */ + {{0x20, 0xb3, 0xe2, 0xa9, 0xa1, 0x7b, 0xbd, 0x3f, }}, /* Byte value: 0x15 */ + {{0xbc, 0xf0, 0xc9, 0xfa, 0xd5, 0xd1, 0x52, 0x9c, }}, /* Byte value: 0x16 */ + {{0x08, 0x5c, 0xd9, 0xbb, 0xb9, 0x6e, 0xbe, 0x7f, }}, /* Byte value: 0x17 */ + {{0x1f, 0x37, 0x30, 0xc3, 0xb4, 0x02, 0xf7, 0xe6, }}, /* Byte value: 0x18 */ + {{0x2e, 0xd6, 0x11, 0xf0, 0x1a, 0xd8, 0x92, 0xf1, }}, /* Byte value: 0x19 */ + {{0xd9, 0x22, 0x13, 0x51, 0xf6, 0x16, 0x6e, 0xd5, }}, /* Byte value: 0x1a */ + {{0x4f, 0x2a, 0x46, 0xe7, 0x84, 0x28, 0xf1, 0x66, }}, /* Byte value: 0x1b */ + {{0xa6, 0x03, 0xc6, 0xaa, 0x62, 0x99, 0x9d, 0x72, }}, /* Byte value: 0x1c */ + {{0x42, 0xb2, 0xa0, 0xcf, 0x3e, 0x0c, 0x77, 0x11, }}, /* Byte value: 0x1d */ + {{0xdd, 0x0c, 0x9e, 0xed, 0x4b, 0x21, 0x31, 0x0b, }}, /* Byte value: 0x1e */ + {{0x15, 0x7c, 0x4e, 0x26, 0xb2, 0x96, 0x87, 0xf6, }}, /* Byte value: 0x1f */ + {{0xe1, 0x75, 0x59, 0xf6, 0x5f, 0xdf, 0xd2, 0x6b, }}, /* Byte value: 0x20 */ + {{0x1d, 0x20, 0x97, 0x9d, 0x0b, 0xf8, 0x39, 0x89, }}, /* Byte value: 0x21 */ + {{0x7b, 0x0f, 0x58, 0x47, 0x29, 0xb8, 0xac, 0x79, }}, /* Byte value: 0x22 */ + {{0x04, 0x2e, 0x8d, 0xbc, 0xbd, 0x37, 0x5f, 0xde, }}, /* Byte value: 0x23 */ + {{0x7e, 0xcb, 0x67, 0xd4, 0x2a, 0xf2, 0x94, 0x71, }}, /* Byte value: 0x24 */ + {{0xe7, 0x4c, 0x73, 0x14, 0x5d, 0x12, 0x43, 0xda, }}, /* Byte value: 0x25 */ + {{0xdb, 0x35, 0xb4, 0x0f, 0x49, 0xec, 0xa0, 0xba, }}, /* Byte value: 0x26 */ + {{0x6c, 0x64, 0xb1, 0x3f, 0x24, 0xd4, 0xe5, 0xe0, }}, /* Byte value: 0x27 */ + {{0x76, 0x97, 0xbe, 0x6f, 0x93, 0x9c, 0x2a, 0x0e, }}, /* Byte value: 0x28 */ + {{0x21, 0x59, 0x50, 0x86, 0x1f, 0x06, 0xda, 0xe9, }}, /* Byte value: 0x29 */ + {{0x86, 0xb0, 0x24, 0x03, 0xc3, 0xe2, 0x20, 0x4d, }}, /* Byte value: 0x2a */ + {{0xe2, 0x88, 0x4c, 0x87, 0x5e, 0x58, 0x7b, 0xd2, }}, /* Byte value: 0x2b */ + {{0x3e, 0x6e, 0x60, 0x45, 0xab, 0x04, 0x2d, 0x0f, }}, /* Byte value: 0x2c */ + {{0x5c, 0x6f, 0x22, 0x23, 0x34, 0x73, 0xe7, 0x21, }}, /* Byte value: 0x2d */ + {{0xb2, 0x95, 0x3a, 0xa3, 0x6e, 0x72, 0x7d, 0x52, }}, /* Byte value: 0x2e */ + {{0x6d, 0x8e, 0x03, 0x10, 0x9a, 0xa9, 0x82, 0x36, }}, /* Byte value: 0x2f */ + {{0xf9, 0x91, 0xf1, 0xf8, 0x57, 0x6d, 0xd3, 0xea, }}, /* Byte value: 0x30 */ + {{0x02, 0x17, 0xa7, 0x5e, 0xbf, 0xfa, 0xce, 0x6f, }}, /* Byte value: 0x31 */ + {{0x91, 0xdb, 0xcd, 0x7b, 0xce, 0x8e, 0x69, 0xd4, }}, /* Byte value: 0x32 */ + {{0xca, 0x67, 0x77, 0x95, 0x46, 0x4d, 0x78, 0x92, }}, /* Byte value: 0x33 */ + {{0x3f, 0x84, 0xd2, 0x6a, 0x15, 0x79, 0x4a, 0xd9, }}, /* Byte value: 0x34 */ + {{0x92, 0x26, 0xd8, 0x0a, 0xcf, 0x09, 0xc0, 0x6d, }}, /* Byte value: 0x35 */ + {{0xb6, 0xbb, 0xb7, 0x1f, 0xd3, 0x45, 0x22, 0x8c, }}, /* Byte value: 0x36 */ + {{0x47, 0x76, 0x9f, 0x5c, 0x3d, 0x46, 0x4f, 0x19, }}, /* Byte value: 0x37 */ + {{0x66, 0x2f, 0xcf, 0xda, 0x22, 0x40, 0x95, 0xf0, }}, /* Byte value: 0x38 */ + {{0x54, 0x33, 0xfb, 0x98, 0x8d, 0x1d, 0x59, 0x5e, }}, /* Byte value: 0x39 */ + {{0x3b, 0xaa, 0x5f, 0xd6, 0xa8, 0x4e, 0x15, 0x07, }}, /* Byte value: 0x3a */ + {{0xd4, 0xba, 0xf5, 0x79, 0x4c, 0x32, 0xe8, 0xa2, }}, /* Byte value: 0x3b */ + {{0xa7, 0xe9, 0x74, 0x85, 0xdc, 0xe4, 0xfa, 0xa4, }}, /* Byte value: 0x3c */ + {{0x90, 0x31, 0x7f, 0x54, 0x70, 0xf3, 0x0e, 0x02, }}, /* Byte value: 0x3d */ + {{0x7c, 0xdc, 0xc0, 0x8a, 0x95, 0x08, 0x5a, 0x1e, }}, /* Byte value: 0x3e */ + {{0xf2, 0x30, 0x3d, 0x32, 0xef, 0x84, 0xc4, 0x2c, }}, /* Byte value: 0x3f */ + {{0x41, 0x4f, 0xb5, 0xbe, 0x3f, 0x8b, 0xde, 0xa8, }}, /* Byte value: 0x40 */ + {{0x65, 0xd2, 0xda, 0xab, 0x23, 0xc7, 0x3c, 0x49, }}, /* Byte value: 0x41 */ + {{0x19, 0x0e, 0x1a, 0x21, 0xb6, 0xcf, 0x66, 0x57, }}, /* Byte value: 0x42 */ + {{0xc3, 0xd1, 0x1c, 0x01, 0x41, 0x5e, 0xa1, 0x3b, }}, /* Byte value: 0x43 */ + {{0xdc, 0xe6, 0x2c, 0xc2, 0xf5, 0x5c, 0x56, 0xdd, }}, /* Byte value: 0x44 */ + {{0x6f, 0x99, 0xa4, 0x4e, 0x25, 0x53, 0x4c, 0x59, }}, /* Byte value: 0x45 */ + {{0x6e, 0x73, 0x16, 0x61, 0x9b, 0x2e, 0x2b, 0x8f, }}, /* Byte value: 0x46 */ + {{0x88, 0xd5, 0xd7, 0x5a, 0x78, 0x41, 0x0f, 0x83, }}, /* Byte value: 0x47 */ + {{0x83, 0x74, 0x1b, 0x90, 0xc0, 0xa8, 0x18, 0x45, }}, /* Byte value: 0x48 */ + {{0xf0, 0x27, 0x9a, 0x6c, 0x50, 0x7e, 0x0a, 0x43, }}, /* Byte value: 0x49 */ + {{0x75, 0x6a, 0xab, 0x1e, 0x92, 0x1b, 0x83, 0xb7, }}, /* Byte value: 0x4a */ + {{0xea, 0xd4, 0x95, 0x3c, 0xe7, 0x36, 0xc5, 0xad, }}, /* Byte value: 0x4b */ + {{0x4c, 0xd7, 0x53, 0x96, 0x85, 0xaf, 0x58, 0xdf, }}, /* Byte value: 0x4c */ + {{0x05, 0xc4, 0x3f, 0x93, 0x03, 0x4a, 0x38, 0x08, }}, /* Byte value: 0x4d */ + {{0x74, 0x80, 0x19, 0x31, 0x2c, 0x66, 0xe4, 0x61, }}, /* Byte value: 0x4e */ + {{0xa4, 0x14, 0x61, 0xf4, 0xdd, 0x63, 0x53, 0x1d, }}, /* Byte value: 0x4f */ + {{0xc8, 0x70, 0xd0, 0xcb, 0xf9, 0xb7, 0xb6, 0xfd, }}, /* Byte value: 0x50 */ + {{0x80, 0x89, 0x0e, 0xe1, 0xc1, 0x2f, 0xb1, 0xfc, }}, /* Byte value: 0x51 */ + {{0xe4, 0xb1, 0x66, 0x65, 0x5c, 0x95, 0xea, 0x63, }}, /* Byte value: 0x52 */ + {{0xf6, 0x1e, 0xb0, 0x8e, 0x52, 0xb3, 0x9b, 0xf2, }}, /* Byte value: 0x53 */ + {{0x96, 0x08, 0x55, 0xb6, 0x72, 0x3e, 0x9f, 0xb3, }}, /* Byte value: 0x54 */ + {{0xd3, 0x69, 0x6d, 0xb4, 0xf0, 0x82, 0x1e, 0xc5, }}, /* Byte value: 0x55 */ + {{0x31, 0xe1, 0x21, 0x33, 0xae, 0xda, 0x65, 0x17, }}, /* Byte value: 0x56 */ + {{0x94, 0x1f, 0xf2, 0xe8, 0xcd, 0xc4, 0x51, 0xdc, }}, /* Byte value: 0x57 */ + {{0xfe, 0x42, 0x69, 0x35, 0xeb, 0xdd, 0x25, 0x8d, }}, /* Byte value: 0x58 */ + {{0x50, 0x1d, 0x76, 0x24, 0x30, 0x2a, 0x06, 0x80, }}, /* Byte value: 0x59 */ + {{0xa0, 0x3a, 0xec, 0x48, 0x60, 0x54, 0x0c, 0xc3, }}, /* Byte value: 0x5a */ + {{0x5d, 0x85, 0x90, 0x0c, 0x8a, 0x0e, 0x80, 0xf7, }}, /* Byte value: 0x5b */ + {{0xa2, 0x2d, 0x4b, 0x16, 0xdf, 0xae, 0xc2, 0xac, }}, /* Byte value: 0x5c */ + {{0x8b, 0x28, 0xc2, 0x2b, 0x79, 0xc6, 0xa6, 0x3a, }}, /* Byte value: 0x5d */ + {{0xd2, 0x83, 0xdf, 0x9b, 0x4e, 0xff, 0x79, 0x13, }}, /* Byte value: 0x5e */ + {{0x0a, 0x4b, 0x7e, 0xe5, 0x06, 0x94, 0x70, 0x10, }}, /* Byte value: 0x5f */ + {{0xdf, 0x1b, 0x39, 0xb3, 0xf4, 0xdb, 0xff, 0x64, }}, /* Byte value: 0x60 */ + {{0xf4, 0x09, 0x17, 0xd0, 0xed, 0x49, 0x55, 0x9d, }}, /* Byte value: 0x61 */ + {{0x62, 0x01, 0x42, 0x66, 0x9f, 0x77, 0xca, 0x2e, }}, /* Byte value: 0x62 */ + {{0xeb, 0x3e, 0x27, 0x13, 0x59, 0x4b, 0xa2, 0x7b, }}, /* Byte value: 0x63 */ + {{0x64, 0x38, 0x68, 0x84, 0x9d, 0xba, 0x5b, 0x9f, }}, /* Byte value: 0x64 */ + {{0x1e, 0xdd, 0x82, 0xec, 0x0a, 0x7f, 0x90, 0x30, }}, /* Byte value: 0x65 */ + {{0x57, 0xce, 0xee, 0xe9, 0x8c, 0x9a, 0xf0, 0xe7, }}, /* Byte value: 0x66 */ + {{0x5e, 0x78, 0x85, 0x7d, 0x8b, 0x89, 0x29, 0x4e, }}, /* Byte value: 0x67 */ + {{0x87, 0x5a, 0x96, 0x2c, 0x7d, 0x9f, 0x47, 0x9b, }}, /* Byte value: 0x68 */ + {{0xd5, 0x50, 0x47, 0x56, 0xf2, 0x4f, 0x8f, 0x74, }}, /* Byte value: 0x69 */ + {{0x13, 0x45, 0x64, 0xc4, 0xb0, 0x5b, 0x16, 0x47, }}, /* Byte value: 0x6a */ + {{0x46, 0x9c, 0x2d, 0x73, 0x83, 0x3b, 0x28, 0xcf, }}, /* Byte value: 0x6b */ + {{0x5a, 0x56, 0x08, 0xc1, 0x36, 0xbe, 0x76, 0x90, }}, /* Byte value: 0x6c */ + {{0x28, 0xef, 0x3b, 0x12, 0x18, 0x15, 0x03, 0x40, }}, /* Byte value: 0x6d */ + {{0x03, 0xfd, 0x15, 0x71, 0x01, 0x87, 0xa9, 0xb9, }}, /* Byte value: 0x6e */ + {{0x98, 0x6d, 0xa6, 0xef, 0xc9, 0x9d, 0xb0, 0x7d, }}, /* Byte value: 0x6f */ + {{0x8e, 0xec, 0xfd, 0xb8, 0x7a, 0x8c, 0x9e, 0x32, }}, /* Byte value: 0x70 */ + {{0x5f, 0x92, 0x37, 0x52, 0x35, 0xf4, 0x4e, 0x98, }}, /* Byte value: 0x71 */ + {{0x37, 0xd8, 0x0b, 0xd1, 0xac, 0x17, 0xf4, 0xa6, }}, /* Byte value: 0x72 */ + {{0x61, 0xfc, 0x57, 0x17, 0x9e, 0xf0, 0x63, 0x97, }}, /* Byte value: 0x73 */ + {{0xef, 0x10, 0xaa, 0xaf, 0xe4, 0x7c, 0xfd, 0xa5, }}, /* Byte value: 0x74 */ + {{0x2f, 0x3c, 0xa3, 0xdf, 0xa4, 0xa5, 0xf5, 0x27, }}, /* Byte value: 0x75 */ + {{0x32, 0x1c, 0x34, 0x42, 0xaf, 0x5d, 0xcc, 0xae, }}, /* Byte value: 0x76 */ + {{0x0f, 0x8f, 0x41, 0x76, 0x05, 0xde, 0x48, 0x18, }}, /* Byte value: 0x77 */ + {{0x26, 0x8a, 0xc8, 0x4b, 0xa3, 0xb6, 0x2c, 0x8e, }}, /* Byte value: 0x78 */ + {{0xc6, 0x15, 0x23, 0x92, 0x42, 0x14, 0x99, 0x33, }}, /* Byte value: 0x79 */ + {{0xcd, 0xb4, 0xef, 0x58, 0xfa, 0xfd, 0x8e, 0xf5, }}, /* Byte value: 0x7a */ + {{0x23, 0x4e, 0xf7, 0xd8, 0xa0, 0xfc, 0x14, 0x86, }}, /* Byte value: 0x7b */ + {{0xc5, 0xe8, 0x36, 0xe3, 0x43, 0x93, 0x30, 0x8a, }}, /* Byte value: 0x7c */ + {{0x69, 0xa0, 0x8e, 0xac, 0x27, 0x9e, 0xdd, 0xe8, }}, /* Byte value: 0x7d */ + {{0x2d, 0x2b, 0x04, 0x81, 0x1b, 0x5f, 0x3b, 0x48, }}, /* Byte value: 0x7e */ + {{0x14, 0x96, 0xfc, 0x09, 0x0c, 0xeb, 0xe0, 0x20, }}, /* Byte value: 0x7f */ + {{0x29, 0x05, 0x89, 0x3d, 0xa6, 0x68, 0x64, 0x96, }}, /* Byte value: 0x80 */ + {{0x18, 0xe4, 0xa8, 0x0e, 0x08, 0xb2, 0x01, 0x81, }}, /* Byte value: 0x81 */ + {{0xd8, 0xc8, 0xa1, 0x7e, 0x48, 0x6b, 0x09, 0x03, }}, /* Byte value: 0x82 */ + {{0x4e, 0xc0, 0xf4, 0xc8, 0x3a, 0x55, 0x96, 0xb0, }}, /* Byte value: 0x83 */ + {{0xae, 0x5f, 0x1f, 0x11, 0xdb, 0xf7, 0x23, 0x0d, }}, /* Byte value: 0x84 */ + {{0x4a, 0xee, 0x79, 0x74, 0x87, 0x62, 0xc9, 0x6e, }}, /* Byte value: 0x85 */ + {{0xfd, 0xbf, 0x7c, 0x44, 0xea, 0x5a, 0x8c, 0x34, }}, /* Byte value: 0x86 */ + {{0x35, 0xcf, 0xac, 0x8f, 0x13, 0xed, 0x3a, 0xc9, }}, /* Byte value: 0x87 */ + {{0x44, 0x8b, 0x8a, 0x2d, 0x3c, 0xc1, 0xe6, 0xa0, }}, /* Byte value: 0x88 */ + {{0x45, 0x61, 0x38, 0x02, 0x82, 0xbc, 0x81, 0x76, }}, /* Byte value: 0x89 */ + {{0x93, 0xcc, 0x6a, 0x25, 0x71, 0x74, 0xa7, 0xbb, }}, /* Byte value: 0x8a */ + {{0xa5, 0xfe, 0xd3, 0xdb, 0x63, 0x1e, 0x34, 0xcb, }}, /* Byte value: 0x8b */ + {{0x68, 0x4a, 0x3c, 0x83, 0x99, 0xe3, 0xba, 0x3e, }}, /* Byte value: 0x8c */ + {{0x48, 0xf9, 0xde, 0x2a, 0x38, 0x98, 0x07, 0x01, }}, /* Byte value: 0x8d */ + {{0x1a, 0xf3, 0x0f, 0x50, 0xb7, 0x48, 0xcf, 0xee, }}, /* Byte value: 0x8e */ + {{0x12, 0xaf, 0xd6, 0xeb, 0x0e, 0x26, 0x71, 0x91, }}, /* Byte value: 0x8f */ + {{0x49, 0x13, 0x6c, 0x05, 0x86, 0xe5, 0x60, 0xd7, }}, /* Byte value: 0x90 */ + {{0x27, 0x60, 0x7a, 0x64, 0x1d, 0xcb, 0x4b, 0x58, }}, /* Byte value: 0x91 */ + {{0xd0, 0x94, 0x78, 0xc5, 0xf1, 0x05, 0xb7, 0x7c, }}, /* Byte value: 0x92 */ + {{0x0c, 0x72, 0x54, 0x07, 0x04, 0x59, 0xe1, 0xa1, }}, /* Byte value: 0x93 */ + {{0x73, 0x53, 0x81, 0xfc, 0x90, 0xd6, 0x12, 0x06, }}, /* Byte value: 0x94 */ + {{0x6a, 0x5d, 0x9b, 0xdd, 0x26, 0x19, 0x74, 0x51, }}, /* Byte value: 0x95 */ + {{0x9f, 0xbe, 0x3e, 0x22, 0x75, 0x2d, 0x46, 0x1a, }}, /* Byte value: 0x96 */ + {{0xde, 0xf1, 0x8b, 0x9c, 0x4a, 0xa6, 0x98, 0xb2, }}, /* Byte value: 0x97 */ + {{0xa8, 0x66, 0x35, 0xf3, 0xd9, 0x3a, 0xb2, 0xbc, }}, /* Byte value: 0x98 */ + {{0xb3, 0x7f, 0x88, 0x8c, 0xd0, 0x0f, 0x1a, 0x84, }}, /* Byte value: 0x99 */ + {{0x22, 0xa4, 0x45, 0xf7, 0x1e, 0x81, 0x73, 0x50, }}, /* Byte value: 0x9a */ + {{0xe6, 0xa6, 0xc1, 0x3b, 0xe3, 0x6f, 0x24, 0x0c, }}, /* Byte value: 0x9b */ + {{0x34, 0x25, 0x1e, 0xa0, 0xad, 0x90, 0x5d, 0x1f, }}, /* Byte value: 0x9c */ + {{0x24, 0x9d, 0x6f, 0x15, 0x1c, 0x4c, 0xe2, 0xe1, }}, /* Byte value: 0x9d */ + {{0x9a, 0x7a, 0x01, 0xb1, 0x76, 0x67, 0x7e, 0x12, }}, /* Byte value: 0x9e */ + {{0xda, 0xdf, 0x06, 0x20, 0xf7, 0x91, 0xc7, 0x6c, }}, /* Byte value: 0x9f */ + {{0xac, 0x48, 0xb8, 0x4f, 0x64, 0x0d, 0xed, 0x62, }}, /* Byte value: 0xa0 */ + {{0x9e, 0x54, 0x8c, 0x0d, 0xcb, 0x50, 0x21, 0xcc, }}, /* Byte value: 0xa1 */ + {{0x39, 0xbd, 0xf8, 0x88, 0x17, 0xb4, 0xdb, 0x68, }}, /* Byte value: 0xa2 */ + {{0xd6, 0xad, 0x52, 0x27, 0xf3, 0xc8, 0x26, 0xcd, }}, /* Byte value: 0xa3 */ + {{0xe0, 0x9f, 0xeb, 0xd9, 0xe1, 0xa2, 0xb5, 0xbd, }}, /* Byte value: 0xa4 */ + {{0xd7, 0x47, 0xe0, 0x08, 0x4d, 0xb5, 0x41, 0x1b, }}, /* Byte value: 0xa5 */ + {{0xee, 0xfa, 0x18, 0x80, 0x5a, 0x01, 0x9a, 0x73, }}, /* Byte value: 0xa6 */ + {{0x60, 0x16, 0xe5, 0x38, 0x20, 0x8d, 0x04, 0x41, }}, /* Byte value: 0xa7 */ + {{0xc2, 0x3b, 0xae, 0x2e, 0xff, 0x23, 0xc6, 0xed, }}, /* Byte value: 0xa8 */ + {{0xc0, 0x2c, 0x09, 0x70, 0x40, 0xd9, 0x08, 0x82, }}, /* Byte value: 0xa9 */ + {{0xf7, 0xf4, 0x02, 0xa1, 0xec, 0xce, 0xfc, 0x24, }}, /* Byte value: 0xaa */ + {{0x3d, 0x93, 0x75, 0x34, 0xaa, 0x83, 0x84, 0xb6, }}, /* Byte value: 0xab */ + {{0x43, 0x58, 0x12, 0xe0, 0x80, 0x71, 0x10, 0xc7, }}, /* Byte value: 0xac */ + {{0xd1, 0x7e, 0xca, 0xea, 0x4f, 0x78, 0xd0, 0xaa, }}, /* Byte value: 0xad */ + {{0x11, 0x52, 0xc3, 0x9a, 0x0f, 0xa1, 0xd8, 0x28, }}, /* Byte value: 0xae */ + {{0x56, 0x24, 0x5c, 0xc6, 0x32, 0xe7, 0x97, 0x31, }}, /* Byte value: 0xaf */ + {{0x72, 0xb9, 0x33, 0xd3, 0x2e, 0xab, 0x75, 0xd0, }}, /* Byte value: 0xb0 */ + {{0x25, 0x77, 0xdd, 0x3a, 0xa2, 0x31, 0x85, 0x37, }}, /* Byte value: 0xb1 */ + {{0x9b, 0x90, 0xb3, 0x9e, 0xc8, 0x1a, 0x19, 0xc4, }}, /* Byte value: 0xb2 */ + {{0xff, 0xa8, 0xdb, 0x1a, 0x55, 0xa0, 0x42, 0x5b, }}, /* Byte value: 0xb3 */ + {{0x52, 0x0a, 0xd1, 0x7a, 0x8f, 0xd0, 0xc8, 0xef, }}, /* Byte value: 0xb4 */ + {{0x30, 0x0b, 0x93, 0x1c, 0x10, 0xa7, 0x02, 0xc1, }}, /* Byte value: 0xb5 */ + {{0x55, 0xd9, 0x49, 0xb7, 0x33, 0x60, 0x3e, 0x88, }}, /* Byte value: 0xb6 */ + {{0x8a, 0xc2, 0x70, 0x04, 0xc7, 0xbb, 0xc1, 0xec, }}, /* Byte value: 0xb7 */ + {{0x67, 0xc5, 0x7d, 0xf5, 0x9c, 0x3d, 0xf2, 0x26, }}, /* Byte value: 0xb8 */ + {{0x7a, 0xe5, 0xea, 0x68, 0x97, 0xc5, 0xcb, 0xaf, }}, /* Byte value: 0xb9 */ + {{0x0d, 0x98, 0xe6, 0x28, 0xba, 0x24, 0x86, 0x77, }}, /* Byte value: 0xba */ + {{0x09, 0xb6, 0x6b, 0x94, 0x07, 0x13, 0xd9, 0xa9, }}, /* Byte value: 0xbb */ + {{0xcc, 0x5e, 0x5d, 0x77, 0x44, 0x80, 0xe9, 0x23, }}, /* Byte value: 0xbc */ + {{0x2b, 0x12, 0x2e, 0x63, 0x19, 0x92, 0xaa, 0xf9, }}, /* Byte value: 0xbd */ + {{0xe5, 0x5b, 0xd4, 0x4a, 0xe2, 0xe8, 0x8d, 0xb5, }}, /* Byte value: 0xbe */ + {{0x89, 0x3f, 0x65, 0x75, 0xc6, 0x3c, 0x68, 0x55, }}, /* Byte value: 0xbf */ + {{0xec, 0xed, 0xbf, 0xde, 0xe5, 0xfb, 0x54, 0x1c, }}, /* Byte value: 0xc0 */ + {{0xb4, 0xac, 0x10, 0x41, 0x6c, 0xbf, 0xec, 0xe3, }}, /* Byte value: 0xc1 */ + {{0xe8, 0xc3, 0x32, 0x62, 0x58, 0xcc, 0x0b, 0xc2, }}, /* Byte value: 0xc2 */ + {{0x95, 0xf5, 0x40, 0xc7, 0x73, 0xb9, 0x36, 0x0a, }}, /* Byte value: 0xc3 */ + {{0x07, 0xd3, 0x98, 0xcd, 0xbc, 0xb0, 0xf6, 0x67, }}, /* Byte value: 0xc4 */ + {{0xba, 0xc9, 0xe3, 0x18, 0xd7, 0x1c, 0xc3, 0x2d, }}, /* Byte value: 0xc5 */ + {{0x97, 0xe2, 0xe7, 0x99, 0xcc, 0x43, 0xf8, 0x65, }}, /* Byte value: 0xc6 */ + {{0x9c, 0x43, 0x2b, 0x53, 0x74, 0xaa, 0xef, 0xa3, }}, /* Byte value: 0xc7 */ + {{0x82, 0x9e, 0xa9, 0xbf, 0x7e, 0xd5, 0x7f, 0x93, }}, /* Byte value: 0xc8 */ + {{0x7d, 0x36, 0x72, 0xa5, 0x2b, 0x75, 0x3d, 0xc8, }}, /* Byte value: 0xc9 */ + {{0xf5, 0xe3, 0xa5, 0xff, 0x53, 0x34, 0x32, 0x4b, }}, /* Byte value: 0xca */ + {{0x58, 0x41, 0xaf, 0x9f, 0x89, 0x44, 0xb8, 0xff, }}, /* Byte value: 0xcb */ + {{0x84, 0xa7, 0x83, 0x5d, 0x7c, 0x18, 0xee, 0x22, }}, /* Byte value: 0xcc */ + {{0x0b, 0xa1, 0xcc, 0xca, 0xb8, 0xe9, 0x17, 0xc6, }}, /* Byte value: 0xcd */ + {{0x3a, 0x40, 0xed, 0xf9, 0x16, 0x33, 0x72, 0xd1, }}, /* Byte value: 0xce */ + {{0xbd, 0x1a, 0x7b, 0xd5, 0x6b, 0xac, 0x35, 0x4a, }}, /* Byte value: 0xcf */ + {{0x59, 0xab, 0x1d, 0xb0, 0x37, 0x39, 0xdf, 0x29, }}, /* Byte value: 0xd0 */ + {{0xe9, 0x29, 0x80, 0x4d, 0xe6, 0xb1, 0x6c, 0x14, }}, /* Byte value: 0xd1 */ + {{0x51, 0xf7, 0xc4, 0x0b, 0x8e, 0x57, 0x61, 0x56, }}, /* Byte value: 0xd2 */ + {{0xab, 0x9b, 0x20, 0x82, 0xd8, 0xbd, 0x1b, 0x05, }}, /* Byte value: 0xd3 */ + {{0xaa, 0x71, 0x92, 0xad, 0x66, 0xc0, 0x7c, 0xd3, }}, /* Byte value: 0xd4 */ + {{0x6b, 0xb7, 0x29, 0xf2, 0x98, 0x64, 0x13, 0x87, }}, /* Byte value: 0xd5 */ + {{0xc7, 0xff, 0x91, 0xbd, 0xfc, 0x69, 0xfe, 0xe5, }}, /* Byte value: 0xd6 */ + {{0x78, 0xf2, 0x4d, 0x36, 0x28, 0x3f, 0x05, 0xc0, }}, /* Byte value: 0xd7 */ + {{0x4b, 0x04, 0xcb, 0x5b, 0x39, 0x1f, 0xae, 0xb8, }}, /* Byte value: 0xd8 */ + {{0xfa, 0x6c, 0xe4, 0x89, 0x56, 0xea, 0x7a, 0x53, }}, /* Byte value: 0xd9 */ + {{0xb8, 0xde, 0x44, 0x46, 0x68, 0xe6, 0x0d, 0x42, }}, /* Byte value: 0xda */ + {{0xb0, 0x82, 0x9d, 0xfd, 0xd1, 0x88, 0xb3, 0x3d, }}, /* Byte value: 0xdb */ + {{0xc9, 0x9a, 0x62, 0xe4, 0x47, 0xca, 0xd1, 0x2b, }}, /* Byte value: 0xdc */ + {{0xbf, 0x0d, 0xdc, 0x8b, 0xd4, 0x56, 0xfb, 0x25, }}, /* Byte value: 0xdd */ + {{0x71, 0x44, 0x26, 0xa2, 0x2f, 0x2c, 0xdc, 0x69, }}, /* Byte value: 0xde */ + {{0xc1, 0xc6, 0xbb, 0x5f, 0xfe, 0xa4, 0x6f, 0x54, }}, /* Byte value: 0xdf */ + {{0x70, 0xae, 0x94, 0x8d, 0x91, 0x51, 0xbb, 0xbf, }}, /* Byte value: 0xe0 */ + {{0xf1, 0xcd, 0x28, 0x43, 0xee, 0x03, 0x6d, 0x95, }}, /* Byte value: 0xe1 */ + {{0x1c, 0xca, 0x25, 0xb2, 0xb5, 0x85, 0x5e, 0x5f, }}, /* Byte value: 0xe2 */ + {{0xad, 0xa2, 0x0a, 0x60, 0xda, 0x70, 0x8a, 0xb4, }}, /* Byte value: 0xe3 */ + {{0xf8, 0x7b, 0x43, 0xd7, 0xe9, 0x10, 0xb4, 0x3c, }}, /* Byte value: 0xe4 */ + {{0x5b, 0xbc, 0xba, 0xee, 0x88, 0xc3, 0x11, 0x46, }}, /* Byte value: 0xe5 */ + {{0xed, 0x07, 0x0d, 0xf1, 0x5b, 0x86, 0x33, 0xca, }}, /* Byte value: 0xe6 */ + {{0xfb, 0x86, 0x56, 0xa6, 0xe8, 0x97, 0x1d, 0x85, }}, /* Byte value: 0xe7 */ + {{0x77, 0x7d, 0x0c, 0x40, 0x2d, 0xe1, 0x4d, 0xd8, }}, /* Byte value: 0xe8 */ + {{0xb1, 0x68, 0x2f, 0xd2, 0x6f, 0xf5, 0xd4, 0xeb, }}, /* Byte value: 0xe9 */ + {{0x3c, 0x79, 0xc7, 0x1b, 0x14, 0xfe, 0xe3, 0x60, }}, /* Byte value: 0xea */ + {{0x81, 0x63, 0xbc, 0xce, 0x7f, 0x52, 0xd6, 0x2a, }}, /* Byte value: 0xeb */ + {{0xcf, 0xa3, 0x48, 0x06, 0x45, 0x07, 0x40, 0x9a, }}, /* Byte value: 0xec */ + {{0x16, 0x81, 0x5b, 0x57, 0xb3, 0x11, 0x2e, 0x4f, }}, /* Byte value: 0xed */ + {{0xbe, 0xe7, 0x6e, 0xa4, 0x6a, 0x2b, 0x9c, 0xf3, }}, /* Byte value: 0xee */ + {{0xa3, 0xc7, 0xf9, 0x39, 0x61, 0xd3, 0xa5, 0x7a, }}, /* Byte value: 0xef */ + {{0x0e, 0x65, 0xf3, 0x59, 0xbb, 0xa3, 0x2f, 0xce, }}, /* Byte value: 0xf0 */ + {{0xb7, 0x51, 0x05, 0x30, 0x6d, 0x38, 0x45, 0x5a, }}, /* Byte value: 0xf1 */ + {{0x38, 0x57, 0x4a, 0xa7, 0xa9, 0xc9, 0xbc, 0xbe, }}, /* Byte value: 0xf2 */ + {{0x99, 0x87, 0x14, 0xc0, 0x77, 0xe0, 0xd7, 0xab, }}, /* Byte value: 0xf3 */ + {{0x53, 0xe0, 0x63, 0x55, 0x31, 0xad, 0xaf, 0x39, }}, /* Byte value: 0xf4 */ + {{0x7f, 0x21, 0xd5, 0xfb, 0x94, 0x8f, 0xf3, 0xa7, }}, /* Byte value: 0xf5 */ + {{0x79, 0x18, 0xff, 0x19, 0x96, 0x42, 0x62, 0x16, }}, /* Byte value: 0xf6 */ + {{0xfc, 0x55, 0xce, 0x6b, 0x54, 0x27, 0xeb, 0xe2, }}, /* Byte value: 0xf7 */ + {{0xf3, 0xda, 0x8f, 0x1d, 0x51, 0xf9, 0xa3, 0xfa, }}, /* Byte value: 0xf8 */ + {{0xa1, 0xd0, 0x5e, 0x67, 0xde, 0x29, 0x6b, 0x15, }}, /* Byte value: 0xf9 */ + {{0x06, 0x39, 0x2a, 0xe2, 0x02, 0xcd, 0x91, 0xb1, }}, /* Byte value: 0xfa */ + {{0xb9, 0x34, 0xf6, 0x69, 0xd6, 0x9b, 0x6a, 0x94, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x85, 0x4d, 0x31, 0x72, 0xc2, 0x65, 0x89, 0xf4, }}, /* Byte value: 0xfd */ + {{0x4d, 0x3d, 0xe1, 0xb9, 0x3b, 0xd2, 0x3f, 0x09, }}, /* Byte value: 0xfe */ + {{0x2c, 0xc1, 0xb6, 0xae, 0xa5, 0x22, 0x5c, 0x9e, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 9 */ + {{0x71, 0x80, 0x04, 0x89, 0xcb, 0x72, 0x1b, 0x5d, }}, /* Byte value: 0x00 */ + {{0x62, 0x87, 0xa3, 0x5a, 0x48, 0x8a, 0xa4, 0x15, }}, /* Byte value: 0x01 */ + {{0xbf, 0x6c, 0x3b, 0x64, 0xae, 0x3d, 0x18, 0xe9, }}, /* Byte value: 0x02 */ + {{0x81, 0x1e, 0x6c, 0xdd, 0xe4, 0xac, 0x86, 0xd3, }}, /* Byte value: 0x03 */ + {{0xe7, 0x32, 0x55, 0x1c, 0xce, 0xa8, 0x72, 0xf5, }}, /* Byte value: 0x04 */ + {{0x9e, 0x27, 0xa6, 0x60, 0xc1, 0x05, 0xc9, 0xce, }}, /* Byte value: 0x05 */ + {{0x1a, 0xc8, 0x97, 0x70, 0xbe, 0xe5, 0x0b, 0x52, }}, /* Byte value: 0x06 */ + {{0x3d, 0x9c, 0xdd, 0x43, 0x82, 0x14, 0xa2, 0xbe, }}, /* Byte value: 0x07 */ + {{0x23, 0xff, 0xd0, 0xa8, 0x5e, 0x7f, 0xf9, 0xdf, }}, /* Byte value: 0x08 */ + {{0x0b, 0x7b, 0x7d, 0x0f, 0x0c, 0x5a, 0x9c, 0xe2, }}, /* Byte value: 0x09 */ + {{0xbb, 0xc7, 0xa1, 0xff, 0xcc, 0xb3, 0x48, 0xda, }}, /* Byte value: 0x0a */ + {{0xeb, 0x0c, 0x38, 0x72, 0x68, 0xf9, 0x82, 0xa0, }}, /* Byte value: 0x0b */ + {{0xd2, 0x3b, 0x7f, 0xaa, 0x88, 0x63, 0x70, 0x2d, }}, /* Byte value: 0x0c */ + {{0xd3, 0x61, 0xb8, 0xfc, 0x71, 0xa1, 0x64, 0x51, }}, /* Byte value: 0x0d */ + {{0x40, 0x22, 0xb4, 0xa4, 0xef, 0x37, 0x49, 0xb6, }}, /* Byte value: 0x0e */ + {{0xad, 0x31, 0x5b, 0xe1, 0xd4, 0x07, 0xb3, 0xdd, }}, /* Byte value: 0x0f */ + {{0xbd, 0xd8, 0x76, 0xc8, 0x9f, 0x7a, 0x30, 0x11, }}, /* Byte value: 0x10 */ + {{0xd0, 0x8f, 0x32, 0x06, 0xb9, 0x24, 0x58, 0xd5, }}, /* Byte value: 0x11 */ + {{0xf3, 0x70, 0xe2, 0xae, 0xe7, 0x5b, 0xa1, 0x0a, }}, /* Byte value: 0x12 */ + {{0xc4, 0xcd, 0x85, 0xb4, 0x90, 0xd7, 0x8b, 0x2a, }}, /* Byte value: 0x13 */ + {{0x0d, 0x64, 0xaa, 0x38, 0x5f, 0x93, 0xe4, 0x29, }}, /* Byte value: 0x14 */ + {{0xff, 0x4e, 0x8f, 0xc0, 0x41, 0x0a, 0x51, 0x5f, }}, /* Byte value: 0x15 */ + {{0x92, 0x19, 0xcb, 0x0e, 0x67, 0x54, 0x39, 0x9b, }}, /* Byte value: 0x16 */ + {{0x4f, 0xf2, 0x53, 0x30, 0x81, 0xe3, 0x85, 0x67, }}, /* Byte value: 0x17 */ + {{0xa4, 0xfe, 0x6b, 0x42, 0xe9, 0x1a, 0x07, 0xc7, }}, /* Byte value: 0x18 */ + {{0x15, 0x18, 0x70, 0xe4, 0xd0, 0x31, 0xc7, 0x83, }}, /* Byte value: 0x19 */ + {{0x46, 0x3d, 0x63, 0x93, 0xbc, 0xfe, 0x31, 0x7d, }}, /* Byte value: 0x1a */ + {{0x07, 0x45, 0x10, 0x61, 0xaa, 0x0b, 0x6c, 0xb7, }}, /* Byte value: 0x1b */ + {{0x20, 0x11, 0x5a, 0x52, 0x96, 0xfa, 0xc5, 0x5b, }}, /* Byte value: 0x1c */ + {{0x5e, 0x41, 0xb9, 0x4f, 0x33, 0x5c, 0x12, 0xd7, }}, /* Byte value: 0x1d */ + {{0x80, 0x44, 0xab, 0x8b, 0x1d, 0x6e, 0x92, 0xaf, }}, /* Byte value: 0x1e */ + {{0x88, 0xd1, 0x5c, 0x7e, 0xd9, 0xb1, 0x32, 0xc9, }}, /* Byte value: 0x1f */ + {{0x68, 0xa6, 0x19, 0x03, 0xbd, 0x12, 0x2c, 0x8b, }}, /* Byte value: 0x20 */ + {{0xc7, 0x23, 0x0f, 0x4e, 0x58, 0x52, 0xb7, 0xae, }}, /* Byte value: 0x21 */ + {{0xa0, 0x55, 0xf1, 0xd9, 0x8b, 0x94, 0x57, 0xf4, }}, /* Byte value: 0x22 */ + {{0xc6, 0x79, 0xc8, 0x18, 0xa1, 0x90, 0xa3, 0xd2, }}, /* Byte value: 0x23 */ + {{0xb6, 0xa3, 0x0b, 0xc7, 0x93, 0x20, 0xac, 0xf3, }}, /* Byte value: 0x24 */ + {{0xcd, 0x02, 0xb5, 0x17, 0xad, 0xca, 0x3f, 0x30, }}, /* Byte value: 0x25 */ + {{0x25, 0xe0, 0x07, 0x9f, 0x0d, 0xb6, 0x81, 0x14, }}, /* Byte value: 0x26 */ + {{0x4b, 0x59, 0xc9, 0xab, 0xe3, 0x6d, 0xd5, 0x54, }}, /* Byte value: 0x27 */ + {{0xf9, 0x51, 0x58, 0xf7, 0x12, 0xc3, 0x29, 0x94, }}, /* Byte value: 0x28 */ + {{0x2f, 0xc1, 0xbd, 0xc6, 0xf8, 0x2e, 0x09, 0x8a, }}, /* Byte value: 0x29 */ + {{0xdf, 0x5f, 0xd5, 0x92, 0xd7, 0xf0, 0x94, 0x04, }}, /* Byte value: 0x2a */ + {{0xdb, 0xf4, 0x4f, 0x09, 0xb5, 0x7e, 0xc4, 0x37, }}, /* Byte value: 0x2b */ + {{0x8b, 0x3f, 0xd6, 0x84, 0x11, 0x34, 0x0e, 0x4d, }}, /* Byte value: 0x2c */ + {{0x2a, 0x30, 0xe0, 0x0b, 0x63, 0x62, 0x4d, 0xc5, }}, /* Byte value: 0x2d */ + {{0x78, 0x4f, 0x34, 0x2a, 0xf6, 0x6f, 0xaf, 0x47, }}, /* Byte value: 0x2e */ + {{0x9b, 0xd6, 0xfb, 0xad, 0x5a, 0x49, 0x8d, 0x81, }}, /* Byte value: 0x2f */ + {{0xb9, 0x73, 0xec, 0x53, 0xfd, 0xf4, 0x60, 0x22, }}, /* Byte value: 0x30 */ + {{0x63, 0xdd, 0x64, 0x0c, 0xb1, 0x48, 0xb0, 0x69, }}, /* Byte value: 0x31 */ + {{0x34, 0x53, 0xed, 0xe0, 0xbf, 0x09, 0x16, 0xa4, }}, /* Byte value: 0x32 */ + {{0x6b, 0x48, 0x93, 0xf9, 0x75, 0x97, 0x10, 0x0f, }}, /* Byte value: 0x33 */ + {{0x5b, 0xb0, 0xe4, 0x82, 0xa8, 0x10, 0x56, 0x98, }}, /* Byte value: 0x34 */ + {{0x87, 0x01, 0xbb, 0xea, 0xb7, 0x65, 0xfe, 0x18, }}, /* Byte value: 0x35 */ + {{0xbe, 0x36, 0xfc, 0x32, 0x57, 0xff, 0x0c, 0x95, }}, /* Byte value: 0x36 */ + {{0x48, 0xb7, 0x43, 0x51, 0x2b, 0xe8, 0xe9, 0xd0, }}, /* Byte value: 0x37 */ + {{0x67, 0x76, 0xfe, 0x97, 0xd3, 0xc6, 0xe0, 0x5a, }}, /* Byte value: 0x38 */ + {{0x65, 0xc2, 0xb3, 0x3b, 0xe2, 0x81, 0xc8, 0xa2, }}, /* Byte value: 0x39 */ + {{0x9d, 0xc9, 0x2c, 0x9a, 0x09, 0x80, 0xf5, 0x4a, }}, /* Byte value: 0x3a */ + {{0x1f, 0x39, 0xca, 0xbd, 0x25, 0xa9, 0x4f, 0x1d, }}, /* Byte value: 0x3b */ + {{0xf0, 0x9e, 0x68, 0x54, 0x2f, 0xde, 0x9d, 0x8e, }}, /* Byte value: 0x3c */ + {{0xe4, 0xdc, 0xdf, 0xe6, 0x06, 0x2d, 0x4e, 0x71, }}, /* Byte value: 0x3d */ + {{0xd5, 0x7e, 0x6f, 0xcb, 0x22, 0x68, 0x1c, 0x9a, }}, /* Byte value: 0x3e */ + {{0x45, 0xd3, 0xe9, 0x69, 0x74, 0x7b, 0x0d, 0xf9, }}, /* Byte value: 0x3f */ + {{0xed, 0x13, 0xef, 0x45, 0x3b, 0x30, 0xfa, 0x6b, }}, /* Byte value: 0x40 */ + {{0xd4, 0x24, 0xa8, 0x9d, 0xdb, 0xaa, 0x08, 0xe6, }}, /* Byte value: 0x41 */ + {{0x01, 0x5a, 0xc7, 0x56, 0xf9, 0xc2, 0x14, 0x7c, }}, /* Byte value: 0x42 */ + {{0xf4, 0x35, 0xf2, 0xcf, 0x4d, 0x50, 0xcd, 0xbd, }}, /* Byte value: 0x43 */ + {{0x50, 0xcb, 0x99, 0x8d, 0xa4, 0x4a, 0xca, 0x7a, }}, /* Byte value: 0x44 */ + {{0xf8, 0x0b, 0x9f, 0xa1, 0xeb, 0x01, 0x3d, 0xe8, }}, /* Byte value: 0x45 */ + {{0x28, 0x84, 0xad, 0xa7, 0x52, 0x25, 0x65, 0x3d, }}, /* Byte value: 0x46 */ + {{0x35, 0x09, 0x2a, 0xb6, 0x46, 0xcb, 0x02, 0xd8, }}, /* Byte value: 0x47 */ + {{0xc9, 0xa9, 0x2f, 0x8c, 0xcf, 0x44, 0x6f, 0x03, }}, /* Byte value: 0x48 */ + {{0x26, 0x0e, 0x8d, 0x65, 0xc5, 0x33, 0xbd, 0x90, }}, /* Byte value: 0x49 */ + {{0x4a, 0x03, 0x0e, 0xfd, 0x1a, 0xaf, 0xc1, 0x28, }}, /* Byte value: 0x4a */ + {{0x94, 0x06, 0x1c, 0x39, 0x34, 0x9d, 0x41, 0x50, }}, /* Byte value: 0x4b */ + {{0xb4, 0x17, 0x46, 0x6b, 0xa2, 0x67, 0x84, 0x0b, }}, /* Byte value: 0x4c */ + {{0x16, 0xf6, 0xfa, 0x1e, 0x18, 0xb4, 0xfb, 0x07, }}, /* Byte value: 0x4d */ + {{0x9a, 0x8c, 0x3c, 0xfb, 0xa3, 0x8b, 0x99, 0xfd, }}, /* Byte value: 0x4e */ + {{0x43, 0xcc, 0x3e, 0x5e, 0x27, 0xb2, 0x75, 0x32, }}, /* Byte value: 0x4f */ + {{0x08, 0x95, 0xf7, 0xf5, 0xc4, 0xdf, 0xa0, 0x66, }}, /* Byte value: 0x50 */ + {{0x7a, 0xfb, 0x79, 0x86, 0xc7, 0x28, 0x87, 0xbf, }}, /* Byte value: 0x51 */ + {{0x7e, 0x50, 0xe3, 0x1d, 0xa5, 0xa6, 0xd7, 0x8c, }}, /* Byte value: 0x52 */ + {{0x83, 0xaa, 0x21, 0x71, 0xd5, 0xeb, 0xae, 0x2b, }}, /* Byte value: 0x53 */ + {{0x41, 0x78, 0x73, 0xf2, 0x16, 0xf5, 0x5d, 0xca, }}, /* Byte value: 0x54 */ + {{0x6a, 0x12, 0x54, 0xaf, 0x8c, 0x55, 0x04, 0x73, }}, /* Byte value: 0x55 */ + {{0xb1, 0xe6, 0x1b, 0xa6, 0x39, 0x2b, 0xc0, 0x44, }}, /* Byte value: 0x56 */ + {{0x22, 0xa5, 0x17, 0xfe, 0xa7, 0xbd, 0xed, 0xa3, }}, /* Byte value: 0x57 */ + {{0xcc, 0x58, 0x72, 0x41, 0x54, 0x08, 0x2b, 0x4c, }}, /* Byte value: 0x58 */ + {{0xa3, 0xbb, 0x7b, 0x23, 0x43, 0x11, 0x6b, 0x70, }}, /* Byte value: 0x59 */ + {{0x85, 0xb5, 0xf6, 0x46, 0x86, 0x22, 0xd6, 0xe0, }}, /* Byte value: 0x5a */ + {{0xfa, 0xbf, 0xd2, 0x0d, 0xda, 0x46, 0x15, 0x10, }}, /* Byte value: 0x5b */ + {{0xe6, 0x68, 0x92, 0x4a, 0x37, 0x6a, 0x66, 0x89, }}, /* Byte value: 0x5c */ + {{0x86, 0x5b, 0x7c, 0xbc, 0x4e, 0xa7, 0xea, 0x64, }}, /* Byte value: 0x5d */ + {{0xba, 0x9d, 0x66, 0xa9, 0x35, 0x71, 0x5c, 0xa6, }}, /* Byte value: 0x5e */ + {{0x2c, 0x2f, 0x37, 0x3c, 0x30, 0xab, 0x35, 0x0e, }}, /* Byte value: 0x5f */ + {{0xe3, 0x99, 0xcf, 0x87, 0xac, 0x26, 0x22, 0xc6, }}, /* Byte value: 0x60 */ + {{0xe0, 0x77, 0x45, 0x7d, 0x64, 0xa3, 0x1e, 0x42, }}, /* Byte value: 0x61 */ + {{0xa1, 0x0f, 0x36, 0x8f, 0x72, 0x56, 0x43, 0x88, }}, /* Byte value: 0x62 */ + {{0x44, 0x89, 0x2e, 0x3f, 0x8d, 0xb9, 0x19, 0x85, }}, /* Byte value: 0x63 */ + {{0x04, 0xab, 0x9a, 0x9b, 0x62, 0x8e, 0x50, 0x33, }}, /* Byte value: 0x64 */ + {{0x74, 0x71, 0x59, 0x44, 0x50, 0x3e, 0x5f, 0x12, }}, /* Byte value: 0x65 */ + {{0xd6, 0x90, 0xe5, 0x31, 0xea, 0xed, 0x20, 0x1e, }}, /* Byte value: 0x66 */ + {{0x49, 0xed, 0x84, 0x07, 0xd2, 0x2a, 0xfd, 0xac, }}, /* Byte value: 0x67 */ + {{0x0f, 0xd0, 0xe7, 0x94, 0x6e, 0xd4, 0xcc, 0xd1, }}, /* Byte value: 0x68 */ + {{0xcf, 0xb6, 0xf8, 0xbb, 0x9c, 0x8d, 0x17, 0xc8, }}, /* Byte value: 0x69 */ + {{0x2d, 0x75, 0xf0, 0x6a, 0xc9, 0x69, 0x21, 0x72, }}, /* Byte value: 0x6a */ + {{0x98, 0x38, 0x71, 0x57, 0x92, 0xcc, 0xb1, 0x05, }}, /* Byte value: 0x6b */ + {{0x8f, 0x94, 0x4c, 0x1f, 0x73, 0xba, 0x5e, 0x7e, }}, /* Byte value: 0x6c */ + {{0xb0, 0xbc, 0xdc, 0xf0, 0xc0, 0xe9, 0xd4, 0x38, }}, /* Byte value: 0x6d */ + {{0xb3, 0x52, 0x56, 0x0a, 0x08, 0x6c, 0xe8, 0xbc, }}, /* Byte value: 0x6e */ + {{0xab, 0x2e, 0x8c, 0xd6, 0x87, 0xce, 0xcb, 0x16, }}, /* Byte value: 0x6f */ + {{0x90, 0xad, 0x86, 0xa2, 0x56, 0x13, 0x11, 0x63, }}, /* Byte value: 0x70 */ + {{0x99, 0x62, 0xb6, 0x01, 0x6b, 0x0e, 0xa5, 0x79, }}, /* Byte value: 0x71 */ + {{0x14, 0x42, 0xb7, 0xb2, 0x29, 0xf3, 0xd3, 0xff, }}, /* Byte value: 0x72 */ + {{0x12, 0x5d, 0x60, 0x85, 0x7a, 0x3a, 0xab, 0x34, }}, /* Byte value: 0x73 */ + {{0x82, 0xf0, 0xe6, 0x27, 0x2c, 0x29, 0xba, 0x57, }}, /* Byte value: 0x74 */ + {{0xc5, 0x97, 0x42, 0xe2, 0x69, 0x15, 0x9f, 0x56, }}, /* Byte value: 0x75 */ + {{0x02, 0xb4, 0x4d, 0xac, 0x31, 0x47, 0x28, 0xf8, }}, /* Byte value: 0x76 */ + {{0x3a, 0xd9, 0xcd, 0x22, 0x28, 0x1f, 0xce, 0x09, }}, /* Byte value: 0x77 */ + {{0x5a, 0xea, 0x23, 0xd4, 0x51, 0xd2, 0x42, 0xe4, }}, /* Byte value: 0x78 */ + {{0xe2, 0xc3, 0x08, 0xd1, 0x55, 0xe4, 0x36, 0xba, }}, /* Byte value: 0x79 */ + {{0x1e, 0x63, 0x0d, 0xeb, 0xdc, 0x6b, 0x5b, 0x61, }}, /* Byte value: 0x7a */ + {{0x4c, 0x1c, 0xd9, 0xca, 0x49, 0x66, 0xb9, 0xe3, }}, /* Byte value: 0x7b */ + {{0x51, 0x91, 0x5e, 0xdb, 0x5d, 0x88, 0xde, 0x06, }}, /* Byte value: 0x7c */ + {{0x5d, 0xaf, 0x33, 0xb5, 0xfb, 0xd9, 0x2e, 0x53, }}, /* Byte value: 0x7d */ + {{0xa6, 0x4a, 0x26, 0xee, 0xd8, 0x5d, 0x2f, 0x3f, }}, /* Byte value: 0x7e */ + {{0x58, 0x5e, 0x6e, 0x78, 0x60, 0x95, 0x6a, 0x1c, }}, /* Byte value: 0x7f */ + {{0x60, 0x33, 0xee, 0xf6, 0x79, 0xcd, 0x8c, 0xed, }}, /* Byte value: 0x80 */ + {{0xd1, 0xd5, 0xf5, 0x50, 0x40, 0xe6, 0x4c, 0xa9, }}, /* Byte value: 0x81 */ + {{0x96, 0xb2, 0x51, 0x95, 0x05, 0xda, 0x69, 0xa8, }}, /* Byte value: 0x82 */ + {{0xd7, 0xca, 0x22, 0x67, 0x13, 0x2f, 0x34, 0x62, }}, /* Byte value: 0x83 */ + {{0x6f, 0xe3, 0x09, 0x62, 0x17, 0x19, 0x40, 0x3c, }}, /* Byte value: 0x84 */ + {{0x11, 0xb3, 0xea, 0x7f, 0xb2, 0xbf, 0x97, 0xb0, }}, /* Byte value: 0x85 */ + {{0x7f, 0x0a, 0x24, 0x4b, 0x5c, 0x64, 0xc3, 0xf0, }}, /* Byte value: 0x86 */ + {{0x77, 0x9f, 0xd3, 0xbe, 0x98, 0xbb, 0x63, 0x96, }}, /* Byte value: 0x87 */ + {{0xfb, 0xe5, 0x15, 0x5b, 0x23, 0x84, 0x01, 0x6c, }}, /* Byte value: 0x88 */ + {{0x2b, 0x6a, 0x27, 0x5d, 0x9a, 0xa0, 0x59, 0xb9, }}, /* Byte value: 0x89 */ + {{0x57, 0x8e, 0x89, 0xec, 0x0e, 0x41, 0xa6, 0xcd, }}, /* Byte value: 0x8a */ + {{0x93, 0x43, 0x0c, 0x58, 0x9e, 0x96, 0x2d, 0xe7, }}, /* Byte value: 0x8b */ + {{0x8d, 0x20, 0x01, 0xb3, 0x42, 0xfd, 0x76, 0x86, }}, /* Byte value: 0x8c */ + {{0x72, 0x6e, 0x8e, 0x73, 0x03, 0xf7, 0x27, 0xd9, }}, /* Byte value: 0x8d */ + {{0xb2, 0x08, 0x91, 0x5c, 0xf1, 0xae, 0xfc, 0xc0, }}, /* Byte value: 0x8e */ + {{0xfd, 0xfa, 0xc2, 0x6c, 0x70, 0x4d, 0x79, 0xa7, }}, /* Byte value: 0x8f */ + {{0xa2, 0xe1, 0xbc, 0x75, 0xba, 0xd3, 0x7f, 0x0c, }}, /* Byte value: 0x90 */ + {{0x8a, 0x65, 0x11, 0xd2, 0xe8, 0xf6, 0x1a, 0x31, }}, /* Byte value: 0x91 */ + {{0xd9, 0x40, 0x02, 0xa5, 0x84, 0x39, 0xec, 0xcf, }}, /* Byte value: 0x92 */ + {{0x89, 0x8b, 0x9b, 0x28, 0x20, 0x73, 0x26, 0xb5, }}, /* Byte value: 0x93 */ + {{0xef, 0xa7, 0xa2, 0xe9, 0x0a, 0x77, 0xd2, 0x93, }}, /* Byte value: 0x94 */ + {{0xee, 0xfd, 0x65, 0xbf, 0xf3, 0xb5, 0xc6, 0xef, }}, /* Byte value: 0x95 */ + {{0xde, 0x05, 0x12, 0xc4, 0x2e, 0x32, 0x80, 0x78, }}, /* Byte value: 0x96 */ + {{0x33, 0x16, 0xfd, 0x81, 0x15, 0x02, 0x7a, 0x13, }}, /* Byte value: 0x97 */ + {{0xca, 0x47, 0xa5, 0x76, 0x07, 0xc1, 0x53, 0x87, }}, /* Byte value: 0x98 */ + {{0xa8, 0xc0, 0x06, 0x2c, 0x4f, 0x4b, 0xf7, 0x92, }}, /* Byte value: 0x99 */ + {{0x9c, 0x93, 0xeb, 0xcc, 0xf0, 0x42, 0xe1, 0x36, }}, /* Byte value: 0x9a */ + {{0x1d, 0x8d, 0x87, 0x11, 0x14, 0xee, 0x67, 0xe5, }}, /* Byte value: 0x9b */ + {{0xa7, 0x10, 0xe1, 0xb8, 0x21, 0x9f, 0x3b, 0x43, }}, /* Byte value: 0x9c */ + {{0x39, 0x37, 0x47, 0xd8, 0xe0, 0x9a, 0xf2, 0x8d, }}, /* Byte value: 0x9d */ + {{0xc8, 0xf3, 0xe8, 0xda, 0x36, 0x86, 0x7b, 0x7f, }}, /* Byte value: 0x9e */ + {{0xf5, 0x6f, 0x35, 0x99, 0xb4, 0x92, 0xd9, 0xc1, }}, /* Byte value: 0x9f */ + {{0x0c, 0x3e, 0x6d, 0x6e, 0xa6, 0x51, 0xf0, 0x55, }}, /* Byte value: 0xa0 */ + {{0x0e, 0x8a, 0x20, 0xc2, 0x97, 0x16, 0xd8, 0xad, }}, /* Byte value: 0xa1 */ + {{0xfe, 0x14, 0x48, 0x96, 0xb8, 0xc8, 0x45, 0x23, }}, /* Byte value: 0xa2 */ + {{0x7c, 0xe4, 0xae, 0xb1, 0x94, 0xe1, 0xff, 0x74, }}, /* Byte value: 0xa3 */ + {{0xb8, 0x29, 0x2b, 0x05, 0x04, 0x36, 0x74, 0x5e, }}, /* Byte value: 0xa4 */ + {{0xac, 0x6b, 0x9c, 0xb7, 0x2d, 0xc5, 0xa7, 0xa1, }}, /* Byte value: 0xa5 */ + {{0x52, 0x7f, 0xd4, 0x21, 0x95, 0x0d, 0xe2, 0x82, }}, /* Byte value: 0xa6 */ + {{0xc2, 0xd2, 0x52, 0x83, 0xc3, 0x1e, 0xf3, 0xe1, }}, /* Byte value: 0xa7 */ + {{0x24, 0xba, 0xc0, 0xc9, 0xf4, 0x74, 0x95, 0x68, }}, /* Byte value: 0xa8 */ + {{0x47, 0x67, 0xa4, 0xc5, 0x45, 0x3c, 0x25, 0x01, }}, /* Byte value: 0xa9 */ + {{0x53, 0x25, 0x13, 0x77, 0x6c, 0xcf, 0xf6, 0xfe, }}, /* Byte value: 0xaa */ + {{0x38, 0x6d, 0x80, 0x8e, 0x19, 0x58, 0xe6, 0xf1, }}, /* Byte value: 0xab */ + {{0x8e, 0xce, 0x8b, 0x49, 0x8a, 0x78, 0x4a, 0x02, }}, /* Byte value: 0xac */ + {{0x09, 0xcf, 0x30, 0xa3, 0x3d, 0x1d, 0xb4, 0x1a, }}, /* Byte value: 0xad */ + {{0x4e, 0xa8, 0x94, 0x66, 0x78, 0x21, 0x91, 0x1b, }}, /* Byte value: 0xae */ + {{0x06, 0x1f, 0xd7, 0x37, 0x53, 0xc9, 0x78, 0xcb, }}, /* Byte value: 0xaf */ + {{0x3f, 0x28, 0x90, 0xef, 0xb3, 0x53, 0x8a, 0x46, }}, /* Byte value: 0xb0 */ + {{0xe9, 0xb8, 0x75, 0xde, 0x59, 0xbe, 0xaa, 0x58, }}, /* Byte value: 0xb1 */ + {{0x18, 0x7c, 0xda, 0xdc, 0x8f, 0xa2, 0x23, 0xaa, }}, /* Byte value: 0xb2 */ + {{0x1c, 0xd7, 0x40, 0x47, 0xed, 0x2c, 0x73, 0x99, }}, /* Byte value: 0xb3 */ + {{0xc0, 0x66, 0x1f, 0x2f, 0xf2, 0x59, 0xdb, 0x19, }}, /* Byte value: 0xb4 */ + {{0x61, 0x69, 0x29, 0xa0, 0x80, 0x0f, 0x98, 0x91, }}, /* Byte value: 0xb5 */ + {{0xb5, 0x4d, 0x81, 0x3d, 0x5b, 0xa5, 0x90, 0x77, }}, /* Byte value: 0xb6 */ + {{0x56, 0xd4, 0x4e, 0xba, 0xf7, 0x83, 0xb2, 0xb1, }}, /* Byte value: 0xb7 */ + {{0xb7, 0xf9, 0xcc, 0x91, 0x6a, 0xe2, 0xb8, 0x8f, }}, /* Byte value: 0xb8 */ + {{0x70, 0xda, 0xc3, 0xdf, 0x32, 0xb0, 0x0f, 0x21, }}, /* Byte value: 0xb9 */ + {{0x59, 0x04, 0xa9, 0x2e, 0x99, 0x57, 0x7e, 0x60, }}, /* Byte value: 0xba */ + {{0x9f, 0x7d, 0x61, 0x36, 0x38, 0xc7, 0xdd, 0xb2, }}, /* Byte value: 0xbb */ + {{0xce, 0xec, 0x3f, 0xed, 0x65, 0x4f, 0x03, 0xb4, }}, /* Byte value: 0xbc */ + {{0x03, 0xee, 0x8a, 0xfa, 0xc8, 0x85, 0x3c, 0x84, }}, /* Byte value: 0xbd */ + {{0xae, 0xdf, 0xd1, 0x1b, 0x1c, 0x82, 0x8f, 0x59, }}, /* Byte value: 0xbe */ + {{0xe5, 0x86, 0x18, 0xb0, 0xff, 0xef, 0x5a, 0x0d, }}, /* Byte value: 0xbf */ + {{0x31, 0xa2, 0xb0, 0x2d, 0x24, 0x45, 0x52, 0xeb, }}, /* Byte value: 0xc0 */ + {{0xdd, 0xeb, 0x98, 0x3e, 0xe6, 0xb7, 0xbc, 0xfc, }}, /* Byte value: 0xc1 */ + {{0xf7, 0xdb, 0x78, 0x35, 0x85, 0xd5, 0xf1, 0x39, }}, /* Byte value: 0xc2 */ + {{0xf2, 0x2a, 0x25, 0xf8, 0x1e, 0x99, 0xb5, 0x76, }}, /* Byte value: 0xc3 */ + {{0x75, 0x2b, 0x9e, 0x12, 0xa9, 0xfc, 0x4b, 0x6e, }}, /* Byte value: 0xc4 */ + {{0x37, 0xbd, 0x67, 0x1a, 0x77, 0x8c, 0x2a, 0x20, }}, /* Byte value: 0xc5 */ + {{0x91, 0xf7, 0x41, 0xf4, 0xaf, 0xd1, 0x05, 0x1f, }}, /* Byte value: 0xc6 */ + {{0x6d, 0x57, 0x44, 0xce, 0x26, 0x5e, 0x68, 0xc4, }}, /* Byte value: 0xc7 */ + {{0x19, 0x26, 0x1d, 0x8a, 0x76, 0x60, 0x37, 0xd6, }}, /* Byte value: 0xc8 */ + {{0x05, 0xf1, 0x5d, 0xcd, 0x9b, 0x4c, 0x44, 0x4f, }}, /* Byte value: 0xc9 */ + {{0x30, 0xf8, 0x77, 0x7b, 0xdd, 0x87, 0x46, 0x97, }}, /* Byte value: 0xca */ + {{0xec, 0x49, 0x28, 0x13, 0xc2, 0xf2, 0xee, 0x17, }}, /* Byte value: 0xcb */ + {{0xbc, 0x82, 0xb1, 0x9e, 0x66, 0xb8, 0x24, 0x6d, }}, /* Byte value: 0xcc */ + {{0xfc, 0xa0, 0x05, 0x3a, 0x89, 0x8f, 0x6d, 0xdb, }}, /* Byte value: 0xcd */ + {{0x4d, 0x46, 0x1e, 0x9c, 0xb0, 0xa4, 0xad, 0x9f, }}, /* Byte value: 0xce */ + {{0x42, 0x96, 0xf9, 0x08, 0xde, 0x70, 0x61, 0x4e, }}, /* Byte value: 0xcf */ + {{0x3c, 0xc6, 0x1a, 0x15, 0x7b, 0xd6, 0xb6, 0xc2, }}, /* Byte value: 0xd0 */ + {{0x27, 0x54, 0x4a, 0x33, 0x3c, 0xf1, 0xa9, 0xec, }}, /* Byte value: 0xd1 */ + {{0x73, 0x34, 0x49, 0x25, 0xfa, 0x35, 0x33, 0xa5, }}, /* Byte value: 0xd2 */ + {{0x79, 0x15, 0xf3, 0x7c, 0x0f, 0xad, 0xbb, 0x3b, }}, /* Byte value: 0xd3 */ + {{0xa9, 0x9a, 0xc1, 0x7a, 0xb6, 0x89, 0xe3, 0xee, }}, /* Byte value: 0xd4 */ + {{0x3e, 0x72, 0x57, 0xb9, 0x4a, 0x91, 0x9e, 0x3a, }}, /* Byte value: 0xd5 */ + {{0x32, 0x4c, 0x3a, 0xd7, 0xec, 0xc0, 0x6e, 0x6f, }}, /* Byte value: 0xd6 */ + {{0x13, 0x07, 0xa7, 0xd3, 0x83, 0xf8, 0xbf, 0x48, }}, /* Byte value: 0xd7 */ + {{0xc1, 0x3c, 0xd8, 0x79, 0x0b, 0x9b, 0xcf, 0x65, }}, /* Byte value: 0xd8 */ + {{0x0a, 0x21, 0xba, 0x59, 0xf5, 0x98, 0x88, 0x9e, }}, /* Byte value: 0xd9 */ + {{0x54, 0x60, 0x03, 0x16, 0xc6, 0xc4, 0x9a, 0x49, }}, /* Byte value: 0xda */ + {{0x1b, 0x92, 0x50, 0x26, 0x47, 0x27, 0x1f, 0x2e, }}, /* Byte value: 0xdb */ + {{0xd8, 0x1a, 0xc5, 0xf3, 0x7d, 0xfb, 0xf8, 0xb3, }}, /* Byte value: 0xdc */ + {{0x21, 0x4b, 0x9d, 0x04, 0x6f, 0x38, 0xd1, 0x27, }}, /* Byte value: 0xdd */ + {{0x8c, 0x7a, 0xc6, 0xe5, 0xbb, 0x3f, 0x62, 0xfa, }}, /* Byte value: 0xde */ + {{0x97, 0xe8, 0x96, 0xc3, 0xfc, 0x18, 0x7d, 0xd4, }}, /* Byte value: 0xdf */ + {{0x5c, 0xf5, 0xf4, 0xe3, 0x02, 0x1b, 0x3a, 0x2f, }}, /* Byte value: 0xe0 */ + {{0xf6, 0x81, 0xbf, 0x63, 0x7c, 0x17, 0xe5, 0x45, }}, /* Byte value: 0xe1 */ + {{0x17, 0xac, 0x3d, 0x48, 0xe1, 0x76, 0xef, 0x7b, }}, /* Byte value: 0xe2 */ + {{0xdc, 0xb1, 0x5f, 0x68, 0x1f, 0x75, 0xa8, 0x80, }}, /* Byte value: 0xe3 */ + {{0x69, 0xfc, 0xde, 0x55, 0x44, 0xd0, 0x38, 0xf7, }}, /* Byte value: 0xe4 */ + {{0x5f, 0x1b, 0x7e, 0x19, 0xca, 0x9e, 0x06, 0xab, }}, /* Byte value: 0xe5 */ + {{0xe1, 0x2d, 0x82, 0x2b, 0x9d, 0x61, 0x0a, 0x3e, }}, /* Byte value: 0xe6 */ + {{0xda, 0xae, 0x88, 0x5f, 0x4c, 0xbc, 0xd0, 0x4b, }}, /* Byte value: 0xe7 */ + {{0x29, 0xde, 0x6a, 0xf1, 0xab, 0xe7, 0x71, 0x41, }}, /* Byte value: 0xe8 */ + {{0xcb, 0x1d, 0x62, 0x20, 0xfe, 0x03, 0x47, 0xfb, }}, /* Byte value: 0xe9 */ + {{0xe8, 0xe2, 0xb2, 0x88, 0xa0, 0x7c, 0xbe, 0x24, }}, /* Byte value: 0xea */ + {{0xaa, 0x74, 0x4b, 0x80, 0x7e, 0x0c, 0xdf, 0x6a, }}, /* Byte value: 0xeb */ + {{0x7d, 0xbe, 0x69, 0xe7, 0x6d, 0x23, 0xeb, 0x08, }}, /* Byte value: 0xec */ + {{0x3b, 0x83, 0x0a, 0x74, 0xd1, 0xdd, 0xda, 0x75, }}, /* Byte value: 0xed */ + {{0xf1, 0xc4, 0xaf, 0x02, 0xd6, 0x1c, 0x89, 0xf2, }}, /* Byte value: 0xee */ + {{0x36, 0xe7, 0xa0, 0x4c, 0x8e, 0x4e, 0x3e, 0x5c, }}, /* Byte value: 0xef */ + {{0xea, 0x56, 0xff, 0x24, 0x91, 0x3b, 0x96, 0xdc, }}, /* Byte value: 0xf0 */ + {{0x6e, 0xb9, 0xce, 0x34, 0xee, 0xdb, 0x54, 0x40, }}, /* Byte value: 0xf1 */ + {{0x2e, 0x9b, 0x7a, 0x90, 0x01, 0xec, 0x1d, 0xf6, }}, /* Byte value: 0xf2 */ + {{0x7b, 0xa1, 0xbe, 0xd0, 0x3e, 0xea, 0x93, 0xc3, }}, /* Byte value: 0xf3 */ + {{0x10, 0xe9, 0x2d, 0x29, 0x4b, 0x7d, 0x83, 0xcc, }}, /* Byte value: 0xf4 */ + {{0x66, 0x2c, 0x39, 0xc1, 0x2a, 0x04, 0xf4, 0x26, }}, /* Byte value: 0xf5 */ + {{0xc3, 0x88, 0x95, 0xd5, 0x3a, 0xdc, 0xe7, 0x9d, }}, /* Byte value: 0xf6 */ + {{0xaf, 0x85, 0x16, 0x4d, 0xe5, 0x40, 0x9b, 0x25, }}, /* Byte value: 0xf7 */ + {{0x95, 0x5c, 0xdb, 0x6f, 0xcd, 0x5f, 0x55, 0x2c, }}, /* Byte value: 0xf8 */ + {{0x55, 0x3a, 0xc4, 0x40, 0x3f, 0x06, 0x8e, 0x35, }}, /* Byte value: 0xf9 */ + {{0xa5, 0xa4, 0xac, 0x14, 0x10, 0xd8, 0x13, 0xbb, }}, /* Byte value: 0xfa */ + {{0x84, 0xef, 0x31, 0x10, 0x7f, 0xe0, 0xc2, 0x9c, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x6c, 0x0d, 0x83, 0x98, 0xdf, 0x9c, 0x7c, 0xb8, }}, /* Byte value: 0xfd */ + {{0x64, 0x98, 0x74, 0x6d, 0x1b, 0x43, 0xdc, 0xde, }}, /* Byte value: 0xfe */ + {{0x76, 0xc5, 0x14, 0xe8, 0x61, 0x79, 0x77, 0xea, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 10 */ + {{0x7e, 0x52, 0xea, 0x5b, 0x67, 0xa2, 0xef, 0xe6, }}, /* Byte value: 0x00 */ + {{0xac, 0xdb, 0x41, 0x06, 0xb8, 0x66, 0xba, 0x67, }}, /* Byte value: 0x01 */ + {{0x70, 0x26, 0xcb, 0x2e, 0x94, 0x8b, 0x8e, 0x86, }}, /* Byte value: 0x02 */ + {{0x18, 0x4a, 0x19, 0x89, 0xa8, 0xce, 0x6e, 0xad, }}, /* Byte value: 0x03 */ + {{0x57, 0x45, 0xa7, 0x6b, 0xee, 0x14, 0x76, 0x58, }}, /* Byte value: 0x04 */ + {{0x2c, 0x7c, 0x70, 0x3b, 0xb6, 0x0d, 0x1e, 0x59, }}, /* Byte value: 0x05 */ + {{0x9f, 0xd7, 0xd9, 0x6f, 0x3e, 0x50, 0x1b, 0xa3, }}, /* Byte value: 0x06 */ + {{0xb0, 0x33, 0x03, 0xec, 0x9d, 0x34, 0x78, 0xa7, }}, /* Byte value: 0x07 */ + {{0xcc, 0x30, 0x25, 0x67, 0x5d, 0xd8, 0xc1, 0x96, }}, /* Byte value: 0x08 */ + {{0xdd, 0x34, 0xec, 0x40, 0x9e, 0xca, 0x1f, 0x6b, }}, /* Byte value: 0x09 */ + {{0x93, 0xf2, 0x34, 0xca, 0x6a, 0x37, 0x2c, 0x14, }}, /* Byte value: 0x0a */ + {{0xb1, 0xfa, 0x65, 0x84, 0x2f, 0x13, 0x53, 0x2d, }}, /* Byte value: 0x0b */ + {{0xe2, 0x1d, 0x99, 0x8c, 0x4c, 0x9b, 0x89, 0x18, }}, /* Byte value: 0x0c */ + {{0xaa, 0x28, 0xd6, 0xb5, 0x92, 0xb4, 0x40, 0xdd, }}, /* Byte value: 0x0d */ + {{0x28, 0xde, 0x2b, 0x58, 0x3b, 0x91, 0xb2, 0x34, }}, /* Byte value: 0x0e */ + {{0xea, 0x9a, 0x2f, 0x4a, 0x95, 0x60, 0x12, 0xc2, }}, /* Byte value: 0x0f */ + {{0xe0, 0x4c, 0x55, 0x5c, 0xeb, 0xd5, 0xdf, 0xcf, }}, /* Byte value: 0x10 */ + {{0x72, 0x77, 0x07, 0xfe, 0x33, 0xc5, 0xd8, 0x51, }}, /* Byte value: 0x11 */ + {{0xbe, 0x47, 0x22, 0x99, 0x6e, 0x1d, 0x19, 0xc7, }}, /* Byte value: 0x12 */ + {{0x9b, 0x75, 0x82, 0x0c, 0xb3, 0xcc, 0xb7, 0xce, }}, /* Byte value: 0x13 */ + {{0xae, 0x8a, 0x8d, 0xd6, 0x1f, 0x28, 0xec, 0xb0, }}, /* Byte value: 0x14 */ + {{0x58, 0xf8, 0xe0, 0x76, 0xaf, 0x1a, 0x3c, 0xb2, }}, /* Byte value: 0x15 */ + {{0xca, 0xc3, 0xb2, 0xd4, 0x77, 0x0a, 0x3b, 0x2c, }}, /* Byte value: 0x16 */ + {{0x16, 0x3e, 0x38, 0xfc, 0x5b, 0xe7, 0x0f, 0xcd, }}, /* Byte value: 0x17 */ + {{0xa7, 0xc4, 0x5d, 0x78, 0x74, 0xf4, 0x5c, 0xe0, }}, /* Byte value: 0x18 */ + {{0xa1, 0x37, 0xca, 0xcb, 0x5e, 0x26, 0xa6, 0x5a, }}, /* Byte value: 0x19 */ + {{0x5b, 0x60, 0x4a, 0xce, 0xba, 0x73, 0x41, 0xef, }}, /* Byte value: 0x1a */ + {{0x3b, 0x8b, 0x2e, 0xaf, 0x5f, 0xcd, 0x3a, 0x1e, }}, /* Byte value: 0x1b */ + {{0x14, 0x6f, 0xf4, 0x2c, 0xfc, 0xa9, 0x59, 0x1a, }}, /* Byte value: 0x1c */ + {{0x54, 0xdd, 0x0d, 0xd3, 0xfb, 0x7d, 0x0b, 0x05, }}, /* Byte value: 0x1d */ + {{0x50, 0x7f, 0x56, 0xb0, 0x76, 0xe1, 0xa7, 0x68, }}, /* Byte value: 0x1e */ + {{0x55, 0x14, 0x6b, 0xbb, 0x49, 0x5a, 0x20, 0x8f, }}, /* Byte value: 0x1f */ + {{0x39, 0xda, 0xe2, 0x7f, 0xf8, 0x83, 0x6c, 0xc9, }}, /* Byte value: 0x20 */ + {{0x43, 0x2a, 0x53, 0x47, 0x12, 0xbd, 0x2f, 0x42, }}, /* Byte value: 0x21 */ + {{0x44, 0x10, 0xa2, 0x9c, 0x8a, 0x48, 0xfe, 0x72, }}, /* Byte value: 0x22 */ + {{0x0b, 0x1f, 0x1c, 0x7e, 0xcc, 0x92, 0xe6, 0x87, }}, /* Byte value: 0x23 */ + {{0x3d, 0x78, 0xb9, 0x1c, 0x75, 0x1f, 0xc0, 0xa4, }}, /* Byte value: 0x24 */ + {{0xd6, 0x2b, 0xf0, 0x3e, 0x52, 0x58, 0xf9, 0xec, }}, /* Byte value: 0x25 */ + {{0xbf, 0x8e, 0x44, 0xf1, 0xdc, 0x3a, 0x32, 0x4d, }}, /* Byte value: 0x26 */ + {{0xf5, 0xea, 0xc7, 0x18, 0xa5, 0x5b, 0xad, 0x5f, }}, /* Byte value: 0x27 */ + {{0x2b, 0x46, 0x81, 0xe0, 0x2e, 0xf8, 0xcf, 0x69, }}, /* Byte value: 0x28 */ + {{0x2a, 0x8f, 0xe7, 0x88, 0x9c, 0xdf, 0xe4, 0xe3, }}, /* Byte value: 0x29 */ + {{0x4c, 0x97, 0x14, 0x5a, 0x53, 0xb3, 0x65, 0xa8, }}, /* Byte value: 0x2a */ + {{0xaf, 0x43, 0xeb, 0xbe, 0xad, 0x0f, 0xc7, 0x3a, }}, /* Byte value: 0x2b */ + {{0x8d, 0x4b, 0xba, 0xf0, 0xe8, 0x2b, 0xb8, 0x03, }}, /* Byte value: 0x2c */ + {{0x81, 0x6e, 0x57, 0x55, 0xbc, 0x4c, 0x8f, 0xb4, }}, /* Byte value: 0x2d */ + {{0x33, 0x0c, 0x98, 0x69, 0x86, 0x36, 0xa1, 0xc4, }}, /* Byte value: 0x2e */ + {{0x87, 0x9d, 0xc0, 0xe6, 0x96, 0x9e, 0x75, 0x0e, }}, /* Byte value: 0x2f */ + {{0x03, 0x98, 0xaa, 0xb8, 0x15, 0x69, 0x7d, 0x5d, }}, /* Byte value: 0x30 */ + {{0xe4, 0xee, 0x0e, 0x3f, 0x66, 0x49, 0x73, 0xa2, }}, /* Byte value: 0x31 */ + {{0xfd, 0x6d, 0x71, 0xde, 0x7c, 0xa0, 0x36, 0x85, }}, /* Byte value: 0x32 */ + {{0xe1, 0x85, 0x33, 0x34, 0x59, 0xf2, 0xf4, 0x45, }}, /* Byte value: 0x33 */ + {{0xff, 0x3c, 0xbd, 0x0e, 0xdb, 0xee, 0x60, 0x52, }}, /* Byte value: 0x34 */ + {{0x6b, 0xf4, 0x78, 0x1f, 0x29, 0x2c, 0x9d, 0x76, }}, /* Byte value: 0x35 */ + {{0x38, 0x13, 0x84, 0x17, 0x4a, 0xa4, 0x47, 0x43, }}, /* Byte value: 0x36 */ + {{0x2d, 0xb5, 0x16, 0x53, 0x04, 0x2a, 0x35, 0xd3, }}, /* Byte value: 0x37 */ + {{0x07, 0x3a, 0xf1, 0xdb, 0x98, 0xf5, 0xd1, 0x30, }}, /* Byte value: 0x38 */ + {{0x97, 0x50, 0x6f, 0xa9, 0xe7, 0xab, 0x80, 0x79, }}, /* Byte value: 0x39 */ + {{0xf4, 0x23, 0xa1, 0x70, 0x17, 0x7c, 0x86, 0xd5, }}, /* Byte value: 0x3a */ + {{0x34, 0x36, 0x69, 0xb2, 0x1e, 0xc3, 0x70, 0xf4, }}, /* Byte value: 0x3b */ + {{0x66, 0x18, 0xf3, 0xd2, 0xcf, 0x6c, 0x81, 0x4b, }}, /* Byte value: 0x3c */ + {{0x8f, 0x1a, 0x76, 0x20, 0x4f, 0x65, 0xee, 0xd4, }}, /* Byte value: 0x3d */ + {{0xd9, 0x96, 0xb7, 0x23, 0x13, 0x56, 0xb3, 0x06, }}, /* Byte value: 0x3e */ + {{0x83, 0x3f, 0x9b, 0x85, 0x1b, 0x02, 0xd9, 0x63, }}, /* Byte value: 0x3f */ + {{0xc2, 0x44, 0x04, 0x12, 0xae, 0xf1, 0xa0, 0xf6, }}, /* Byte value: 0x40 */ + {{0x91, 0xa3, 0xf8, 0x1a, 0xcd, 0x79, 0x7a, 0xc3, }}, /* Byte value: 0x41 */ + {{0x48, 0x35, 0x4f, 0x39, 0xde, 0x2f, 0xc9, 0xc5, }}, /* Byte value: 0x42 */ + {{0x85, 0xcc, 0x0c, 0x36, 0x31, 0xd0, 0x23, 0xd9, }}, /* Byte value: 0x43 */ + {{0x22, 0x08, 0x51, 0x4e, 0x45, 0x24, 0x7f, 0x39, }}, /* Byte value: 0x44 */ + {{0x63, 0x73, 0xce, 0xd9, 0xf0, 0xd7, 0x06, 0xac, }}, /* Byte value: 0x45 */ + {{0x11, 0x04, 0xc9, 0x27, 0xc3, 0x12, 0xde, 0xfd, }}, /* Byte value: 0x46 */ + {{0xb5, 0x58, 0x3e, 0xe7, 0xa2, 0x8f, 0xff, 0x40, }}, /* Byte value: 0x47 */ + {{0x35, 0xff, 0x0f, 0xda, 0xac, 0xe4, 0x5b, 0x7e, }}, /* Byte value: 0x48 */ + {{0x67, 0xd1, 0x95, 0xba, 0x7d, 0x4b, 0xaa, 0xc1, }}, /* Byte value: 0x49 */ + {{0xbd, 0xdf, 0x88, 0x21, 0x7b, 0x74, 0x64, 0x9a, }}, /* Byte value: 0x4a */ + {{0xb9, 0x7d, 0xd3, 0x42, 0xf6, 0xe8, 0xc8, 0xf7, }}, /* Byte value: 0x4b */ + {{0xad, 0x12, 0x27, 0x6e, 0x0a, 0x41, 0x91, 0xed, }}, /* Byte value: 0x4c */ + {{0x79, 0x68, 0x1b, 0x80, 0xff, 0x57, 0x3e, 0xd6, }}, /* Byte value: 0x4d */ + {{0xcf, 0xa8, 0x8f, 0xdf, 0x48, 0xb1, 0xbc, 0xcb, }}, /* Byte value: 0x4e */ + {{0xf0, 0x81, 0xfa, 0x13, 0x9a, 0xe0, 0x2a, 0xb8, }}, /* Byte value: 0x4f */ + {{0x05, 0x6b, 0x3d, 0x0b, 0x3f, 0xbb, 0x87, 0xe7, }}, /* Byte value: 0x50 */ + {{0xa3, 0x66, 0x06, 0x1b, 0xf9, 0x68, 0xf0, 0x8d, }}, /* Byte value: 0x51 */ + {{0x40, 0xb2, 0xf9, 0xff, 0x07, 0xd4, 0x52, 0x1f, }}, /* Byte value: 0x52 */ + {{0x88, 0x20, 0x87, 0xfb, 0xd7, 0x90, 0x3f, 0xe4, }}, /* Byte value: 0x53 */ + {{0x60, 0xeb, 0x64, 0x61, 0xe5, 0xbe, 0x7b, 0xf1, }}, /* Byte value: 0x54 */ + {{0xa9, 0xb0, 0x7c, 0x0d, 0x87, 0xdd, 0x3d, 0x80, }}, /* Byte value: 0x55 */ + {{0x06, 0xf3, 0x97, 0xb3, 0x2a, 0xd2, 0xfa, 0xba, }}, /* Byte value: 0x56 */ + {{0x84, 0x05, 0x6a, 0x5e, 0x83, 0xf7, 0x08, 0x53, }}, /* Byte value: 0x57 */ + {{0x9e, 0x1e, 0xbf, 0x07, 0x8c, 0x77, 0x30, 0x29, }}, /* Byte value: 0x58 */ + {{0x9c, 0x4f, 0x73, 0xd7, 0x2b, 0x39, 0x66, 0xfe, }}, /* Byte value: 0x59 */ + {{0xfb, 0x9e, 0xe6, 0x6d, 0x56, 0x72, 0xcc, 0x3f, }}, /* Byte value: 0x5a */ + {{0xf3, 0x19, 0x50, 0xab, 0x8f, 0x89, 0x57, 0xe5, }}, /* Byte value: 0x5b */ + {{0x1f, 0x70, 0xe8, 0x52, 0x30, 0x3b, 0xbf, 0x9d, }}, /* Byte value: 0x5c */ + {{0x23, 0xc1, 0x37, 0x26, 0xf7, 0x03, 0x54, 0xb3, }}, /* Byte value: 0x5d */ + {{0xdb, 0xc7, 0x7b, 0xf3, 0xb4, 0x18, 0xe5, 0xd1, }}, /* Byte value: 0x5e */ + {{0xf2, 0xd0, 0x36, 0xc3, 0x3d, 0xae, 0x7c, 0x6f, }}, /* Byte value: 0x5f */ + {{0xb4, 0x91, 0x58, 0x8f, 0x10, 0xa8, 0xd4, 0xca, }}, /* Byte value: 0x60 */ + {{0x6c, 0xce, 0x89, 0xc4, 0xb1, 0xd9, 0x4c, 0x46, }}, /* Byte value: 0x61 */ + {{0x0c, 0x25, 0xed, 0xa5, 0x54, 0x67, 0x37, 0xb7, }}, /* Byte value: 0x62 */ + {{0xcb, 0x0a, 0xd4, 0xbc, 0xc5, 0x2d, 0x10, 0xa6, }}, /* Byte value: 0x63 */ + {{0xe3, 0xd4, 0xff, 0xe4, 0xfe, 0xbc, 0xa2, 0x92, }}, /* Byte value: 0x64 */ + {{0xd5, 0xb3, 0x5a, 0x86, 0x47, 0x31, 0x84, 0xb1, }}, /* Byte value: 0x65 */ + {{0x01, 0xc9, 0x66, 0x68, 0xb2, 0x27, 0x2b, 0x8a, }}, /* Byte value: 0x66 */ + {{0x65, 0x80, 0x59, 0x6a, 0xda, 0x05, 0xfc, 0x16, }}, /* Byte value: 0x67 */ + {{0x3e, 0xe0, 0x13, 0xa4, 0x60, 0x76, 0xbd, 0xf9, }}, /* Byte value: 0x68 */ + {{0x46, 0x41, 0x6e, 0x4c, 0x2d, 0x06, 0xa8, 0xa5, }}, /* Byte value: 0x69 */ + {{0xba, 0xe5, 0x79, 0xfa, 0xe3, 0x81, 0xb5, 0xaa, }}, /* Byte value: 0x6a */ + {{0x5f, 0xc2, 0x11, 0xad, 0x37, 0xef, 0xed, 0x82, }}, /* Byte value: 0x6b */ + {{0x6e, 0x9f, 0x45, 0x14, 0x16, 0x97, 0x1a, 0x91, }}, /* Byte value: 0x6c */ + {{0x4e, 0xc6, 0xd8, 0x8a, 0xf4, 0xfd, 0x33, 0x7f, }}, /* Byte value: 0x6d */ + {{0x96, 0x99, 0x09, 0xc1, 0x55, 0x8c, 0xab, 0xf3, }}, /* Byte value: 0x6e */ + {{0x99, 0x24, 0x4e, 0xdc, 0x14, 0x82, 0xe1, 0x19, }}, /* Byte value: 0x6f */ + {{0x5a, 0xa9, 0x2c, 0xa6, 0x08, 0x54, 0x6a, 0x65, }}, /* Byte value: 0x70 */ + {{0x17, 0xf7, 0x5e, 0x94, 0xe9, 0xc0, 0x24, 0x47, }}, /* Byte value: 0x71 */ + {{0xe9, 0x02, 0x85, 0xf2, 0x80, 0x09, 0x6f, 0x9f, }}, /* Byte value: 0x72 */ + {{0x9a, 0xbc, 0xe4, 0x64, 0x01, 0xeb, 0x9c, 0x44, }}, /* Byte value: 0x73 */ + {{0xc0, 0x15, 0xc8, 0xc2, 0x09, 0xbf, 0xf6, 0x21, }}, /* Byte value: 0x74 */ + {{0xd3, 0x40, 0xcd, 0x35, 0x6d, 0xe3, 0x7e, 0x0b, }}, /* Byte value: 0x75 */ + {{0x90, 0x6a, 0x9e, 0x72, 0x7f, 0x5e, 0x51, 0x49, }}, /* Byte value: 0x76 */ + {{0x8b, 0xb8, 0x2d, 0x43, 0xc2, 0xf9, 0x42, 0xb9, }}, /* Byte value: 0x77 */ + {{0xb7, 0x09, 0xf2, 0x37, 0x05, 0xc1, 0xa9, 0x97, }}, /* Byte value: 0x78 */ + {{0xfc, 0xa4, 0x17, 0xb6, 0xce, 0x87, 0x1d, 0x0f, }}, /* Byte value: 0x79 */ + {{0x7c, 0x03, 0x26, 0x8b, 0xc0, 0xec, 0xb9, 0x31, }}, /* Byte value: 0x7a */ + {{0xce, 0x61, 0xe9, 0xb7, 0xfa, 0x96, 0x97, 0x41, }}, /* Byte value: 0x7b */ + {{0x6a, 0x3d, 0x1e, 0x77, 0x9b, 0x0b, 0xb6, 0xfc, }}, /* Byte value: 0x7c */ + {{0x8c, 0x82, 0xdc, 0x98, 0x5a, 0x0c, 0x93, 0x89, }}, /* Byte value: 0x7d */ + {{0x37, 0xae, 0xc3, 0x0a, 0x0b, 0xaa, 0x0d, 0xa9, }}, /* Byte value: 0x7e */ + {{0x27, 0x63, 0x6c, 0x45, 0x7a, 0x9f, 0xf8, 0xde, }}, /* Byte value: 0x7f */ + {{0x3c, 0xb1, 0xdf, 0x74, 0xc7, 0x38, 0xeb, 0x2e, }}, /* Byte value: 0x80 */ + {{0x3a, 0x42, 0x48, 0xc7, 0xed, 0xea, 0x11, 0x94, }}, /* Byte value: 0x81 */ + {{0x29, 0x17, 0x4d, 0x30, 0x89, 0xb6, 0x99, 0xbe, }}, /* Byte value: 0x82 */ + {{0x49, 0xfc, 0x29, 0x51, 0x6c, 0x08, 0xe2, 0x4f, }}, /* Byte value: 0x83 */ + {{0x02, 0x51, 0xcc, 0xd0, 0xa7, 0x4e, 0x56, 0xd7, }}, /* Byte value: 0x84 */ + {{0x42, 0xe3, 0x35, 0x2f, 0xa0, 0x9a, 0x04, 0xc8, }}, /* Byte value: 0x85 */ + {{0x08, 0x87, 0xb6, 0xc6, 0xd9, 0xfb, 0x9b, 0xda, }}, /* Byte value: 0x86 */ + {{0x0d, 0xec, 0x8b, 0xcd, 0xe6, 0x40, 0x1c, 0x3d, }}, /* Byte value: 0x87 */ + {{0xbb, 0x2c, 0x1f, 0x92, 0x51, 0xa6, 0x9e, 0x20, }}, /* Byte value: 0x88 */ + {{0xc9, 0x5b, 0x18, 0x6c, 0x62, 0x63, 0x46, 0x71, }}, /* Byte value: 0x89 */ + {{0x19, 0x83, 0x7f, 0xe1, 0x1a, 0xe9, 0x45, 0x27, }}, /* Byte value: 0x8a */ + {{0x82, 0xf6, 0xfd, 0xed, 0xa9, 0x25, 0xf2, 0xe9, }}, /* Byte value: 0x8b */ + {{0xfe, 0xf5, 0xdb, 0x66, 0x69, 0xc9, 0x4b, 0xd8, }}, /* Byte value: 0x8c */ + {{0xa6, 0x0d, 0x3b, 0x10, 0xc6, 0xd3, 0x77, 0x6a, }}, /* Byte value: 0x8d */ + {{0xde, 0xac, 0x46, 0xf8, 0x8b, 0xa3, 0x62, 0x36, }}, /* Byte value: 0x8e */ + {{0xc8, 0x92, 0x7e, 0x04, 0xd0, 0x44, 0x6d, 0xfb, }}, /* Byte value: 0x8f */ + {{0xd4, 0x7a, 0x3c, 0xee, 0xf5, 0x16, 0xaf, 0x3b, }}, /* Byte value: 0x90 */ + {{0xc5, 0x7e, 0xf5, 0xc9, 0x36, 0x04, 0x71, 0xc6, }}, /* Byte value: 0x91 */ + {{0x3f, 0x29, 0x75, 0xcc, 0xd2, 0x51, 0x96, 0x73, }}, /* Byte value: 0x92 */ + {{0x1d, 0x21, 0x24, 0x82, 0x97, 0x75, 0xe9, 0x4a, }}, /* Byte value: 0x93 */ + {{0x52, 0x2e, 0x9a, 0x60, 0xd1, 0xaf, 0xf1, 0xbf, }}, /* Byte value: 0x94 */ + {{0x1a, 0x1b, 0xd5, 0x59, 0x0f, 0x80, 0x38, 0x7a, }}, /* Byte value: 0x95 */ + {{0x04, 0xa2, 0x5b, 0x63, 0x8d, 0x9c, 0xac, 0x6d, }}, /* Byte value: 0x96 */ + {{0xc6, 0xe6, 0x5f, 0x71, 0x23, 0x6d, 0x0c, 0x9b, }}, /* Byte value: 0x97 */ + {{0xed, 0xa0, 0xde, 0x91, 0x0d, 0x95, 0xc3, 0xf2, }}, /* Byte value: 0x98 */ + {{0x41, 0x7b, 0x9f, 0x97, 0xb5, 0xf3, 0x79, 0x95, }}, /* Byte value: 0x99 */ + {{0xbc, 0x16, 0xee, 0x49, 0xc9, 0x53, 0x4f, 0x10, }}, /* Byte value: 0x9a */ + {{0xa4, 0x5c, 0xf7, 0xc0, 0x61, 0x9d, 0x21, 0xbd, }}, /* Byte value: 0x9b */ + {{0x7f, 0x9b, 0x8c, 0x33, 0xd5, 0x85, 0xc4, 0x6c, }}, /* Byte value: 0x9c */ + {{0x53, 0xe7, 0xfc, 0x08, 0x63, 0x88, 0xda, 0x35, }}, /* Byte value: 0x9d */ + {{0x7d, 0xca, 0x40, 0xe3, 0x72, 0xcb, 0x92, 0xbb, }}, /* Byte value: 0x9e */ + {{0xcd, 0xf9, 0x43, 0x0f, 0xef, 0xff, 0xea, 0x1c, }}, /* Byte value: 0x9f */ + {{0xe6, 0xbf, 0xc2, 0xef, 0xc1, 0x07, 0x25, 0x75, }}, /* Byte value: 0xa0 */ + {{0x76, 0xd5, 0x5c, 0x9d, 0xbe, 0x59, 0x74, 0x3c, }}, /* Byte value: 0xa1 */ + {{0x10, 0xcd, 0xaf, 0x4f, 0x71, 0x35, 0xf5, 0x77, }}, /* Byte value: 0xa2 */ + {{0xd0, 0xd8, 0x67, 0x8d, 0x78, 0x8a, 0x03, 0x56, }}, /* Byte value: 0xa3 */ + {{0x4b, 0xad, 0xe5, 0x81, 0xcb, 0x46, 0xb4, 0x98, }}, /* Byte value: 0xa4 */ + {{0xa2, 0xaf, 0x60, 0x73, 0x4b, 0x4f, 0xdb, 0x07, }}, /* Byte value: 0xa5 */ + {{0xb2, 0x62, 0xcf, 0x3c, 0x3a, 0x7a, 0x2e, 0x70, }}, /* Byte value: 0xa6 */ + {{0xe8, 0xcb, 0xe3, 0x9a, 0x32, 0x2e, 0x44, 0x15, }}, /* Byte value: 0xa7 */ + {{0xf7, 0xbb, 0x0b, 0xc8, 0x02, 0x15, 0xfb, 0x88, }}, /* Byte value: 0xa8 */ + {{0x13, 0x55, 0x05, 0xf7, 0x64, 0x5c, 0x88, 0x2a, }}, /* Byte value: 0xa9 */ + {{0xfa, 0x57, 0x80, 0x05, 0xe4, 0x55, 0xe7, 0xb5, }}, /* Byte value: 0xaa */ + {{0x1b, 0xd2, 0xb3, 0x31, 0xbd, 0xa7, 0x13, 0xf0, }}, /* Byte value: 0xab */ + {{0x26, 0xaa, 0x0a, 0x2d, 0xc8, 0xb8, 0xd3, 0x54, }}, /* Byte value: 0xac */ + {{0x4d, 0x5e, 0x72, 0x32, 0xe1, 0x94, 0x4e, 0x22, }}, /* Byte value: 0xad */ + {{0x5e, 0x0b, 0x77, 0xc5, 0x85, 0xc8, 0xc6, 0x08, }}, /* Byte value: 0xae */ + {{0x73, 0xbe, 0x61, 0x96, 0x81, 0xe2, 0xf3, 0xdb, }}, /* Byte value: 0xaf */ + {{0x20, 0x59, 0x9d, 0x9e, 0xe2, 0x6a, 0x29, 0xee, }}, /* Byte value: 0xb0 */ + {{0x21, 0x90, 0xfb, 0xf6, 0x50, 0x4d, 0x02, 0x64, }}, /* Byte value: 0xb1 */ + {{0x0f, 0xbd, 0x47, 0x1d, 0x41, 0x0e, 0x4a, 0xea, }}, /* Byte value: 0xb2 */ + {{0xec, 0x69, 0xb8, 0xf9, 0xbf, 0xb2, 0xe8, 0x78, }}, /* Byte value: 0xb3 */ + {{0x78, 0xa1, 0x7d, 0xe8, 0x4d, 0x70, 0x15, 0x5c, }}, /* Byte value: 0xb4 */ + {{0x74, 0x84, 0x90, 0x4d, 0x19, 0x17, 0x22, 0xeb, }}, /* Byte value: 0xb5 */ + {{0xe5, 0x27, 0x68, 0x57, 0xd4, 0x6e, 0x58, 0x28, }}, /* Byte value: 0xb6 */ + {{0x51, 0xb6, 0x30, 0xd8, 0xc4, 0xc6, 0x8c, 0xe2, }}, /* Byte value: 0xb7 */ + {{0x75, 0x4d, 0xf6, 0x25, 0xab, 0x30, 0x09, 0x61, }}, /* Byte value: 0xb8 */ + {{0x36, 0x67, 0xa5, 0x62, 0xb9, 0x8d, 0x26, 0x23, }}, /* Byte value: 0xb9 */ + {{0x6f, 0x56, 0x23, 0x7c, 0xa4, 0xb0, 0x31, 0x1b, }}, /* Byte value: 0xba */ + {{0x64, 0x49, 0x3f, 0x02, 0x68, 0x22, 0xd7, 0x9c, }}, /* Byte value: 0xbb */ + {{0x0e, 0x74, 0x21, 0x75, 0xf3, 0x29, 0x61, 0x60, }}, /* Byte value: 0xbc */ + {{0xd8, 0x5f, 0xd1, 0x4b, 0xa1, 0x71, 0x98, 0x8c, }}, /* Byte value: 0xbd */ + {{0x32, 0xc5, 0xfe, 0x01, 0x34, 0x11, 0x8a, 0x4e, }}, /* Byte value: 0xbe */ + {{0xc7, 0x2f, 0x39, 0x19, 0x91, 0x4a, 0x27, 0x11, }}, /* Byte value: 0xbf */ + {{0x56, 0x8c, 0xc1, 0x03, 0x5c, 0x33, 0x5d, 0xd2, }}, /* Byte value: 0xc0 */ + {{0xdc, 0xfd, 0x8a, 0x28, 0x2c, 0xed, 0x34, 0xe1, }}, /* Byte value: 0xc1 */ + {{0x5d, 0x93, 0xdd, 0x7d, 0x90, 0xa1, 0xbb, 0x55, }}, /* Byte value: 0xc2 */ + {{0xf6, 0x72, 0x6d, 0xa0, 0xb0, 0x32, 0xd0, 0x02, }}, /* Byte value: 0xc3 */ + {{0x9d, 0x86, 0x15, 0xbf, 0x99, 0x1e, 0x4d, 0x74, }}, /* Byte value: 0xc4 */ + {{0x25, 0x32, 0xa0, 0x95, 0xdd, 0xd1, 0xae, 0x09, }}, /* Byte value: 0xc5 */ + {{0x12, 0x9c, 0x63, 0x9f, 0xd6, 0x7b, 0xa3, 0xa0, }}, /* Byte value: 0xc6 */ + {{0x92, 0x3b, 0x52, 0xa2, 0xd8, 0x10, 0x07, 0x9e, }}, /* Byte value: 0xc7 */ + {{0x47, 0x88, 0x08, 0x24, 0x9f, 0x21, 0x83, 0x2f, }}, /* Byte value: 0xc8 */ + {{0xab, 0xe1, 0xb0, 0xdd, 0x20, 0x93, 0x6b, 0x57, }}, /* Byte value: 0xc9 */ + {{0x1e, 0xb9, 0x8e, 0x3a, 0x82, 0x1c, 0x94, 0x17, }}, /* Byte value: 0xca */ + {{0x8a, 0x71, 0x4b, 0x2b, 0x70, 0xde, 0x69, 0x33, }}, /* Byte value: 0xcb */ + {{0xa8, 0x79, 0x1a, 0x65, 0x35, 0xfa, 0x16, 0x0a, }}, /* Byte value: 0xcc */ + {{0x80, 0xa7, 0x31, 0x3d, 0x0e, 0x6b, 0xa4, 0x3e, }}, /* Byte value: 0xcd */ + {{0x86, 0x54, 0xa6, 0x8e, 0x24, 0xb9, 0x5e, 0x84, }}, /* Byte value: 0xce */ + {{0xb8, 0xb4, 0xb5, 0x2a, 0x44, 0xcf, 0xe3, 0x7d, }}, /* Byte value: 0xcf */ + {{0xf8, 0x06, 0x4c, 0xd5, 0x43, 0x1b, 0xb1, 0x62, }}, /* Byte value: 0xd0 */ + {{0x2f, 0xe4, 0xda, 0x83, 0xa3, 0x64, 0x63, 0x04, }}, /* Byte value: 0xd1 */ + {{0xee, 0x38, 0x74, 0x29, 0x18, 0xfc, 0xbe, 0xaf, }}, /* Byte value: 0xd2 */ + {{0x7b, 0x39, 0xd7, 0x50, 0x58, 0x19, 0x68, 0x01, }}, /* Byte value: 0xd3 */ + {{0x09, 0x4e, 0xd0, 0xae, 0x6b, 0xdc, 0xb0, 0x50, }}, /* Byte value: 0xd4 */ + {{0x68, 0x6c, 0xd2, 0xa7, 0x3c, 0x45, 0xe0, 0x2b, }}, /* Byte value: 0xd5 */ + {{0x8e, 0xd3, 0x10, 0x48, 0xfd, 0x42, 0xc5, 0x5e, }}, /* Byte value: 0xd6 */ + {{0xd2, 0x89, 0xab, 0x5d, 0xdf, 0xc4, 0x55, 0x81, }}, /* Byte value: 0xd7 */ + {{0x30, 0x94, 0x32, 0xd1, 0x93, 0x5f, 0xdc, 0x99, }}, /* Byte value: 0xd8 */ + {{0x95, 0x01, 0xa3, 0x79, 0x40, 0xe5, 0xd6, 0xae, }}, /* Byte value: 0xd9 */ + {{0xc1, 0xdc, 0xae, 0xaa, 0xbb, 0x98, 0xdd, 0xab, }}, /* Byte value: 0xda */ + {{0xd7, 0xe2, 0x96, 0x56, 0xe0, 0x7f, 0xd2, 0x66, }}, /* Byte value: 0xdb */ + {{0x77, 0x1c, 0x3a, 0xf5, 0x0c, 0x7e, 0x5f, 0xb6, }}, /* Byte value: 0xdc */ + {{0x5c, 0x5a, 0xbb, 0x15, 0x22, 0x86, 0x90, 0xdf, }}, /* Byte value: 0xdd */ + {{0xb6, 0xc0, 0x94, 0x5f, 0xb7, 0xe6, 0x82, 0x1d, }}, /* Byte value: 0xde */ + {{0x61, 0x22, 0x02, 0x09, 0x57, 0x99, 0x50, 0x7b, }}, /* Byte value: 0xdf */ + {{0xc4, 0xb7, 0x93, 0xa1, 0x84, 0x23, 0x5a, 0x4c, }}, /* Byte value: 0xe0 */ + {{0x15, 0xa6, 0x92, 0x44, 0x4e, 0x8e, 0x72, 0x90, }}, /* Byte value: 0xe1 */ + {{0x31, 0x5d, 0x54, 0xb9, 0x21, 0x78, 0xf7, 0x13, }}, /* Byte value: 0xe2 */ + {{0x94, 0xc8, 0xc5, 0x11, 0xf2, 0xc2, 0xfd, 0x24, }}, /* Byte value: 0xe3 */ + {{0x71, 0xef, 0xad, 0x46, 0x26, 0xac, 0xa5, 0x0c, }}, /* Byte value: 0xe4 */ + {{0x1c, 0xe8, 0x42, 0xea, 0x25, 0x52, 0xc2, 0xc0, }}, /* Byte value: 0xe5 */ + {{0x24, 0xfb, 0xc6, 0xfd, 0x6f, 0xf6, 0x85, 0x83, }}, /* Byte value: 0xe6 */ + {{0xe7, 0x76, 0xa4, 0x87, 0x73, 0x20, 0x0e, 0xff, }}, /* Byte value: 0xe7 */ + {{0x59, 0x31, 0x86, 0x1e, 0x1d, 0x3d, 0x17, 0x38, }}, /* Byte value: 0xe8 */ + {{0xa5, 0x95, 0x91, 0xa8, 0xd3, 0xba, 0x0a, 0x37, }}, /* Byte value: 0xe9 */ + {{0x69, 0xa5, 0xb4, 0xcf, 0x8e, 0x62, 0xcb, 0xa1, }}, /* Byte value: 0xea */ + {{0xd1, 0x11, 0x01, 0xe5, 0xca, 0xad, 0x28, 0xdc, }}, /* Byte value: 0xeb */ + {{0x98, 0xed, 0x28, 0xb4, 0xa6, 0xa5, 0xca, 0x93, }}, /* Byte value: 0xec */ + {{0xc3, 0x8d, 0x62, 0x7a, 0x1c, 0xd6, 0x8b, 0x7c, }}, /* Byte value: 0xed */ + {{0x2e, 0x2d, 0xbc, 0xeb, 0x11, 0x43, 0x48, 0x8e, }}, /* Byte value: 0xee */ + {{0x6d, 0x07, 0xef, 0xac, 0x03, 0xfe, 0x67, 0xcc, }}, /* Byte value: 0xef */ + {{0xf9, 0xcf, 0x2a, 0xbd, 0xf1, 0x3c, 0x9a, 0xe8, }}, /* Byte value: 0xf0 */ + {{0x4a, 0x64, 0x83, 0xe9, 0x79, 0x61, 0x9f, 0x12, }}, /* Byte value: 0xf1 */ + {{0x62, 0xba, 0xa8, 0xb1, 0x42, 0xf0, 0x2d, 0x26, }}, /* Byte value: 0xf2 */ + {{0xeb, 0x53, 0x49, 0x22, 0x27, 0x47, 0x39, 0x48, }}, /* Byte value: 0xf3 */ + {{0x0a, 0xd6, 0x7a, 0x16, 0x7e, 0xb5, 0xcd, 0x0d, }}, /* Byte value: 0xf4 */ + {{0x4f, 0x0f, 0xbe, 0xe2, 0x46, 0xda, 0x18, 0xf5, }}, /* Byte value: 0xf5 */ + {{0xa0, 0xfe, 0xac, 0xa3, 0xec, 0x01, 0x8d, 0xd0, }}, /* Byte value: 0xf6 */ + {{0x7a, 0xf0, 0xb1, 0x38, 0xea, 0x3e, 0x43, 0x8b, }}, /* Byte value: 0xf7 */ + {{0xf1, 0x48, 0x9c, 0x7b, 0x28, 0xc7, 0x01, 0x32, }}, /* Byte value: 0xf8 */ + {{0x89, 0xe9, 0xe1, 0x93, 0x65, 0xb7, 0x14, 0x6e, }}, /* Byte value: 0xf9 */ + {{0xef, 0xf1, 0x12, 0x41, 0xaa, 0xdb, 0x95, 0x25, }}, /* Byte value: 0xfa */ + {{0xb3, 0xab, 0xa9, 0x54, 0x88, 0x5d, 0x05, 0xfa, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xda, 0x0e, 0x1d, 0x9b, 0x06, 0x3f, 0xce, 0x5b, }}, /* Byte value: 0xfd */ + {{0xdf, 0x65, 0x20, 0x90, 0x39, 0x84, 0x49, 0xbc, }}, /* Byte value: 0xfe */ + {{0x45, 0xd9, 0xc4, 0xf4, 0x38, 0x6f, 0xd5, 0xf8, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 11 */ + {{0x17, 0x58, 0x25, 0x47, 0x72, 0xa8, 0x1d, 0x31, }}, /* Byte value: 0x00 */ + {{0x82, 0xee, 0xaa, 0xe9, 0x8a, 0x53, 0xb7, 0xc0, }}, /* Byte value: 0x01 */ + {{0x55, 0xac, 0x5e, 0x8f, 0x3d, 0x01, 0xdf, 0x89, }}, /* Byte value: 0x02 */ + {{0x32, 0xa4, 0x91, 0x4e, 0xac, 0x20, 0xdc, 0x8e, }}, /* Byte value: 0x03 */ + {{0x8d, 0x24, 0x3c, 0x03, 0xa8, 0x75, 0xec, 0xfe, }}, /* Byte value: 0x04 */ + {{0xe0, 0xa0, 0x17, 0xcf, 0x05, 0xd1, 0x3c, 0x6c, }}, /* Byte value: 0x05 */ + {{0x71, 0x90, 0xf0, 0x0c, 0xe5, 0x17, 0x36, 0x7e, }}, /* Byte value: 0x06 */ + {{0x06, 0xc5, 0x5c, 0xba, 0x14, 0xc2, 0xf0, 0x73, }}, /* Byte value: 0x07 */ + {{0x4a, 0x3b, 0xab, 0x12, 0x7f, 0xd3, 0x41, 0xbd, }}, /* Byte value: 0x08 */ + {{0x1b, 0x11, 0x9d, 0xf0, 0x5a, 0xef, 0x3e, 0xd7, }}, /* Byte value: 0x09 */ + {{0x68, 0xc2, 0x59, 0x2b, 0xb3, 0x07, 0x58, 0x39, }}, /* Byte value: 0x0a */ + {{0xca, 0x96, 0x35, 0x2c, 0xf9, 0x7f, 0xa6, 0xed, }}, /* Byte value: 0x0b */ + {{0xf1, 0x3d, 0x6e, 0x32, 0x63, 0xbb, 0xd1, 0x2e, }}, /* Byte value: 0x0c */ + {{0x6f, 0xc7, 0x1f, 0x1b, 0xa1, 0x5b, 0x80, 0x02, }}, /* Byte value: 0x0d */ + {{0x56, 0x2f, 0x70, 0xd2, 0x37, 0x60, 0xa7, 0x51, }}, /* Byte value: 0x0e */ + {{0x5e, 0xe0, 0xa0, 0x08, 0x07, 0x1a, 0x24, 0x54, }}, /* Byte value: 0x0f */ + {{0xaa, 0x9b, 0xbc, 0xdd, 0x7a, 0x02, 0x7d, 0xd1, }}, /* Byte value: 0x10 */ + {{0x0e, 0x0a, 0x8c, 0x60, 0x24, 0xb8, 0x73, 0x76, }}, /* Byte value: 0x11 */ + {{0x44, 0x31, 0x27, 0x72, 0x5b, 0x6b, 0x32, 0xcb, }}, /* Byte value: 0x12 */ + {{0xc7, 0x1f, 0x97, 0x11, 0xd7, 0xa6, 0xad, 0x43, }}, /* Byte value: 0x13 */ + {{0xd9, 0x48, 0x78, 0x06, 0x93, 0xea, 0x1b, 0x3f, }}, /* Byte value: 0x14 */ + {{0x03, 0x83, 0x2e, 0x5d, 0x0a, 0x61, 0x78, 0xd8, }}, /* Byte value: 0x15 */ + {{0xa7, 0x12, 0x1e, 0xe0, 0x54, 0xdb, 0x76, 0x7f, }}, /* Byte value: 0x16 */ + {{0x70, 0x50, 0xea, 0x86, 0xe3, 0x89, 0x1e, 0x36, }}, /* Byte value: 0x17 */ + {{0xba, 0xc6, 0xdf, 0xaa, 0x1a, 0xf6, 0xb8, 0xdb, }}, /* Byte value: 0x18 */ + {{0x57, 0xef, 0x6a, 0x58, 0x31, 0xfe, 0x8f, 0x19, }}, /* Byte value: 0x19 */ + {{0x94, 0x76, 0x95, 0x24, 0xfe, 0x65, 0x82, 0xb9, }}, /* Byte value: 0x1a */ + {{0x5c, 0xa3, 0x94, 0xdf, 0x0b, 0xe5, 0x74, 0xc4, }}, /* Byte value: 0x1b */ + {{0x2b, 0xf6, 0x38, 0x69, 0xfa, 0x30, 0xb2, 0xc9, }}, /* Byte value: 0x1c */ + {{0x1a, 0xd1, 0x87, 0x7a, 0x5c, 0x71, 0x16, 0x9f, }}, /* Byte value: 0x1d */ + {{0xac, 0x5e, 0xe0, 0x67, 0x6e, 0xc0, 0x8d, 0xa2, }}, /* Byte value: 0x1e */ + {{0xd6, 0x82, 0xee, 0xec, 0xb1, 0xcc, 0x40, 0x01, }}, /* Byte value: 0x1f */ + {{0x07, 0x05, 0x46, 0x30, 0x12, 0x5c, 0xd8, 0x3b, }}, /* Byte value: 0x20 */ + {{0xa6, 0xd2, 0x04, 0x6a, 0x52, 0x45, 0x5e, 0x37, }}, /* Byte value: 0x21 */ + {{0x87, 0xa8, 0xd8, 0x0e, 0x94, 0xf0, 0x3f, 0x6b, }}, /* Byte value: 0x22 */ + {{0x38, 0x28, 0x75, 0x43, 0x90, 0xa5, 0x0f, 0x1b, }}, /* Byte value: 0x23 */ + {{0xb1, 0x8a, 0x21, 0x2d, 0x20, 0xed, 0x43, 0x06, }}, /* Byte value: 0x24 */ + {{0x23, 0x39, 0xe8, 0xb3, 0xca, 0x4a, 0x31, 0xcc, }}, /* Byte value: 0x25 */ + {{0x88, 0x62, 0x4e, 0xe4, 0xb6, 0xd6, 0x64, 0x55, }}, /* Byte value: 0x26 */ + {{0x4d, 0x3e, 0xed, 0x22, 0x6d, 0x8f, 0x99, 0x86, }}, /* Byte value: 0x27 */ + {{0xc1, 0xda, 0xcb, 0xab, 0xc3, 0x64, 0x5d, 0x30, }}, /* Byte value: 0x28 */ + {{0x0d, 0x89, 0xa2, 0x3d, 0x2e, 0xd9, 0x0b, 0xae, }}, /* Byte value: 0x29 */ + {{0x28, 0x75, 0x16, 0x34, 0xf0, 0x51, 0xca, 0x11, }}, /* Byte value: 0x2a */ + {{0x15, 0x1b, 0x11, 0x90, 0x7e, 0x57, 0x4d, 0xa1, }}, /* Byte value: 0x2b */ + {{0xb7, 0x4f, 0x7d, 0x97, 0x34, 0x2f, 0xb3, 0x75, }}, /* Byte value: 0x2c */ + {{0xae, 0x1d, 0xd4, 0xb0, 0x62, 0x3f, 0xdd, 0x32, }}, /* Byte value: 0x2d */ + {{0xf3, 0x7e, 0x5a, 0xe5, 0x6f, 0x44, 0x81, 0xbe, }}, /* Byte value: 0x2e */ + {{0x43, 0x34, 0x61, 0x42, 0x49, 0x37, 0xea, 0xf0, }}, /* Byte value: 0x2f */ + {{0x97, 0xf5, 0xbb, 0x79, 0xf4, 0x04, 0xfa, 0x61, }}, /* Byte value: 0x30 */ + {{0x1c, 0x14, 0xdb, 0xc0, 0x48, 0xb3, 0xe6, 0xec, }}, /* Byte value: 0x31 */ + {{0xe2, 0xe3, 0x23, 0x18, 0x09, 0x2e, 0x6c, 0xfc, }}, /* Byte value: 0x32 */ + {{0x66, 0xc8, 0xd5, 0x4b, 0x97, 0xbf, 0x2b, 0x4f, }}, /* Byte value: 0x33 */ + {{0xb9, 0x45, 0xf1, 0xf7, 0x10, 0x97, 0xc0, 0x03, }}, /* Byte value: 0x34 */ + {{0xf0, 0xfd, 0x74, 0xb8, 0x65, 0x25, 0xf9, 0x66, }}, /* Byte value: 0x35 */ + {{0xcb, 0x56, 0x2f, 0xa6, 0xff, 0xe1, 0x8e, 0xa5, }}, /* Byte value: 0x36 */ + {{0x2c, 0xf3, 0x7e, 0x59, 0xe8, 0x6c, 0x6a, 0xf2, }}, /* Byte value: 0x37 */ + {{0x21, 0x7a, 0xdc, 0x64, 0xc6, 0xb5, 0x61, 0x5c, }}, /* Byte value: 0x38 */ + {{0xde, 0x4d, 0x3e, 0x36, 0x81, 0xb6, 0xc3, 0x04, }}, /* Byte value: 0x39 */ + {{0x81, 0x6d, 0x84, 0xb4, 0x80, 0x32, 0xcf, 0x18, }}, /* Byte value: 0x3a */ + {{0xd2, 0x04, 0x86, 0x81, 0xa9, 0xf1, 0xe0, 0xe2, }}, /* Byte value: 0x3b */ + {{0x25, 0xfc, 0xb4, 0x09, 0xde, 0x88, 0xc1, 0xbf, }}, /* Byte value: 0x3c */ + {{0xec, 0xe9, 0xaf, 0x78, 0x2d, 0x96, 0x1f, 0x8a, }}, /* Byte value: 0x3d */ + {{0xad, 0x9e, 0xfa, 0xed, 0x68, 0x5e, 0xa5, 0xea, }}, /* Byte value: 0x3e */ + {{0xf5, 0xbb, 0x06, 0x5f, 0x7b, 0x86, 0x71, 0xcd, }}, /* Byte value: 0x3f */ + {{0x08, 0xcf, 0xd0, 0xda, 0x30, 0x7a, 0x83, 0x05, }}, /* Byte value: 0x40 */ + {{0x33, 0x64, 0x8b, 0xc4, 0xaa, 0xbe, 0xf4, 0xc6, }}, /* Byte value: 0x41 */ + {{0x9e, 0xfa, 0x71, 0x29, 0xc2, 0xe0, 0x51, 0x2c, }}, /* Byte value: 0x42 */ + {{0x18, 0x92, 0xb3, 0xad, 0x50, 0x8e, 0x46, 0x0f, }}, /* Byte value: 0x43 */ + {{0xa2, 0x54, 0x6c, 0x07, 0x4a, 0x78, 0xfe, 0xd4, }}, /* Byte value: 0x44 */ + {{0x5f, 0x20, 0xba, 0x82, 0x01, 0x84, 0x0c, 0x1c, }}, /* Byte value: 0x45 */ + {{0x51, 0x2a, 0x36, 0xe2, 0x25, 0x3c, 0x7f, 0x6a, }}, /* Byte value: 0x46 */ + {{0x7c, 0x19, 0x52, 0x31, 0xcb, 0xce, 0x3d, 0xd0, }}, /* Byte value: 0x47 */ + {{0x1e, 0x57, 0xef, 0x17, 0x44, 0x4c, 0xb6, 0x7c, }}, /* Byte value: 0x48 */ + {{0xe9, 0xaf, 0xdd, 0x9f, 0x33, 0x35, 0x97, 0x21, }}, /* Byte value: 0x49 */ + {{0xd3, 0xc4, 0x9c, 0x0b, 0xaf, 0x6f, 0xc8, 0xaa, }}, /* Byte value: 0x4a */ + {{0x65, 0x4b, 0xfb, 0x16, 0x9d, 0xde, 0x53, 0x97, }}, /* Byte value: 0x4b */ + {{0x4e, 0xbd, 0xc3, 0x7f, 0x67, 0xee, 0xe1, 0x5e, }}, /* Byte value: 0x4c */ + {{0x36, 0x22, 0xf9, 0x23, 0xb4, 0x1d, 0x7c, 0x6d, }}, /* Byte value: 0x4d */ + {{0xdd, 0xce, 0x10, 0x6b, 0x8b, 0xd7, 0xbb, 0xdc, }}, /* Byte value: 0x4e */ + {{0x37, 0xe2, 0xe3, 0xa9, 0xb2, 0x83, 0x54, 0x25, }}, /* Byte value: 0x4f */ + {{0x7a, 0xdc, 0x0e, 0x8b, 0xdf, 0x0c, 0xcd, 0xa3, }}, /* Byte value: 0x50 */ + {{0x0c, 0x49, 0xb8, 0xb7, 0x28, 0x47, 0x23, 0xe6, }}, /* Byte value: 0x51 */ + {{0x31, 0x27, 0xbf, 0x13, 0xa6, 0x41, 0xa4, 0x56, }}, /* Byte value: 0x52 */ + {{0xcd, 0x93, 0x73, 0x1c, 0xeb, 0x23, 0x7e, 0xd6, }}, /* Byte value: 0x53 */ + {{0xc8, 0xd5, 0x01, 0xfb, 0xf5, 0x80, 0xf6, 0x7d, }}, /* Byte value: 0x54 */ + {{0xf8, 0x32, 0xa4, 0x62, 0x55, 0x5f, 0x7a, 0x63, }}, /* Byte value: 0x55 */ + {{0xed, 0x29, 0xb5, 0xf2, 0x2b, 0x08, 0x37, 0xc2, }}, /* Byte value: 0x56 */ + {{0xd4, 0xc1, 0xda, 0x3b, 0xbd, 0x33, 0x10, 0x91, }}, /* Byte value: 0x57 */ + {{0xbd, 0xc3, 0x99, 0x9a, 0x08, 0xaa, 0x60, 0xe0, }}, /* Byte value: 0x58 */ + {{0xe6, 0x65, 0x4b, 0x75, 0x11, 0x13, 0xcc, 0x1f, }}, /* Byte value: 0x59 */ + {{0x0f, 0xca, 0x96, 0xea, 0x22, 0x26, 0x5b, 0x3e, }}, /* Byte value: 0x5a */ + {{0xa0, 0x17, 0x58, 0xd0, 0x46, 0x87, 0xae, 0x44, }}, /* Byte value: 0x5b */ + {{0x13, 0xde, 0x4d, 0x2a, 0x6a, 0x95, 0xbd, 0xd2, }}, /* Byte value: 0x5c */ + {{0x6e, 0x07, 0x05, 0x91, 0xa7, 0xc5, 0xa8, 0x4a, }}, /* Byte value: 0x5d */ + {{0xf6, 0x38, 0x28, 0x02, 0x71, 0xe7, 0x09, 0x15, }}, /* Byte value: 0x5e */ + {{0x6c, 0x44, 0x31, 0x46, 0xab, 0x3a, 0xf8, 0xda, }}, /* Byte value: 0x5f */ + {{0xb0, 0x4a, 0x3b, 0xa7, 0x26, 0x73, 0x6b, 0x4e, }}, /* Byte value: 0x60 */ + {{0xd1, 0x87, 0xa8, 0xdc, 0xa3, 0x90, 0x98, 0x3a, }}, /* Byte value: 0x61 */ + {{0x19, 0x52, 0xa9, 0x27, 0x56, 0x10, 0x6e, 0x47, }}, /* Byte value: 0x62 */ + {{0x6b, 0x41, 0x77, 0x76, 0xb9, 0x66, 0x20, 0xe1, }}, /* Byte value: 0x63 */ + {{0x3d, 0x6e, 0x07, 0xa4, 0x8e, 0x06, 0x87, 0xb0, }}, /* Byte value: 0x64 */ + {{0xb4, 0xcc, 0x53, 0xca, 0x3e, 0x4e, 0xcb, 0xad, }}, /* Byte value: 0x65 */ + {{0xcc, 0x53, 0x69, 0x96, 0xed, 0xbd, 0x56, 0x9e, }}, /* Byte value: 0x66 */ + {{0xb2, 0x09, 0x0f, 0x70, 0x2a, 0x8c, 0x3b, 0xde, }}, /* Byte value: 0x67 */ + {{0x26, 0x7f, 0x9a, 0x54, 0xd4, 0xe9, 0xb9, 0x67, }}, /* Byte value: 0x68 */ + {{0xdc, 0x0e, 0x0a, 0xe1, 0x8d, 0x49, 0x93, 0x94, }}, /* Byte value: 0x69 */ + {{0xf2, 0xbe, 0x40, 0x6f, 0x69, 0xda, 0xa9, 0xf6, }}, /* Byte value: 0x6a */ + {{0x22, 0xf9, 0xf2, 0x39, 0xcc, 0xd4, 0x19, 0x84, }}, /* Byte value: 0x6b */ + {{0x8a, 0x21, 0x7a, 0x33, 0xba, 0x29, 0x34, 0xc5, }}, /* Byte value: 0x6c */ + {{0x73, 0xd3, 0xc4, 0xdb, 0xe9, 0xe8, 0x66, 0xee, }}, /* Byte value: 0x6d */ + {{0x12, 0x1e, 0x57, 0xa0, 0x6c, 0x0b, 0x95, 0x9a, }}, /* Byte value: 0x6e */ + {{0x9c, 0xb9, 0x45, 0xfe, 0xce, 0x1f, 0x01, 0xbc, }}, /* Byte value: 0x6f */ + {{0x58, 0x25, 0xfc, 0xb2, 0x13, 0xd8, 0xd4, 0x27, }}, /* Byte value: 0x70 */ + {{0xbc, 0x03, 0x83, 0x10, 0x0e, 0x34, 0x48, 0xa8, }}, /* Byte value: 0x71 */ + {{0xc9, 0x15, 0x1b, 0x71, 0xf3, 0x1e, 0xde, 0x35, }}, /* Byte value: 0x72 */ + {{0x0b, 0x4c, 0xfe, 0x87, 0x3a, 0x1b, 0xfb, 0xdd, }}, /* Byte value: 0x73 */ + {{0x53, 0x69, 0x02, 0x35, 0x29, 0xc3, 0x2f, 0xfa, }}, /* Byte value: 0x74 */ + {{0x59, 0xe5, 0xe6, 0x38, 0x15, 0x46, 0xfc, 0x6f, }}, /* Byte value: 0x75 */ + {{0xff, 0x37, 0xe2, 0x52, 0x47, 0x03, 0xa2, 0x58, }}, /* Byte value: 0x76 */ + {{0x5a, 0x66, 0xc8, 0x65, 0x1f, 0x27, 0x84, 0xb7, }}, /* Byte value: 0x77 */ + {{0x27, 0xbf, 0x80, 0xde, 0xd2, 0x77, 0x91, 0x2f, }}, /* Byte value: 0x78 */ + {{0x2e, 0xb0, 0x4a, 0x8e, 0xe4, 0x93, 0x3a, 0x62, }}, /* Byte value: 0x79 */ + {{0x4c, 0xfe, 0xf7, 0xa8, 0x6b, 0x11, 0xb1, 0xce, }}, /* Byte value: 0x7a */ + {{0x11, 0x9d, 0x79, 0xfd, 0x66, 0x6a, 0xed, 0x42, }}, /* Byte value: 0x7b */ + {{0x3c, 0xae, 0x1d, 0x2e, 0x88, 0x98, 0xaf, 0xf8, }}, /* Byte value: 0x7c */ + {{0x7b, 0x1c, 0x14, 0x01, 0xd9, 0x92, 0xe5, 0xeb, }}, /* Byte value: 0x7d */ + {{0x45, 0xf1, 0x3d, 0xf8, 0x5d, 0xf5, 0x1a, 0x83, }}, /* Byte value: 0x7e */ + {{0xd8, 0x88, 0x62, 0x8c, 0x95, 0x74, 0x33, 0x77, }}, /* Byte value: 0x7f */ + {{0x7d, 0xd9, 0x48, 0xbb, 0xcd, 0x50, 0x15, 0x98, }}, /* Byte value: 0x80 */ + {{0x90, 0xf0, 0xfd, 0x49, 0xe6, 0x58, 0x22, 0x5a, }}, /* Byte value: 0x81 */ + {{0x9a, 0x7c, 0x19, 0x44, 0xda, 0xdd, 0xf1, 0xcf, }}, /* Byte value: 0x82 */ + {{0x52, 0xa9, 0x18, 0xbf, 0x2f, 0x5d, 0x07, 0xb2, }}, /* Byte value: 0x83 */ + {{0x5b, 0xa6, 0xd2, 0xef, 0x19, 0xb9, 0xac, 0xff, }}, /* Byte value: 0x84 */ + {{0x6a, 0x81, 0x6d, 0xfc, 0xbf, 0xf8, 0x08, 0xa9, }}, /* Byte value: 0x85 */ + {{0xaf, 0xdd, 0xce, 0x3a, 0x64, 0xa1, 0xf5, 0x7a, }}, /* Byte value: 0x86 */ + {{0xd5, 0x01, 0xc0, 0xb1, 0xbb, 0xad, 0x38, 0xd9, }}, /* Byte value: 0x87 */ + {{0x3e, 0xed, 0x29, 0xf9, 0x84, 0x67, 0xff, 0x68, }}, /* Byte value: 0x88 */ + {{0x30, 0xe7, 0xa5, 0x99, 0xa0, 0xdf, 0x8c, 0x1e, }}, /* Byte value: 0x89 */ + {{0xfe, 0xf7, 0xf8, 0xd8, 0x41, 0x9d, 0x8a, 0x10, }}, /* Byte value: 0x8a */ + {{0x39, 0xe8, 0x6f, 0xc9, 0x96, 0x3b, 0x27, 0x53, }}, /* Byte value: 0x8b */ + {{0x75, 0x16, 0x98, 0x61, 0xfd, 0x2a, 0x96, 0x9d, }}, /* Byte value: 0x8c */ + {{0x76, 0x95, 0xb6, 0x3c, 0xf7, 0x4b, 0xee, 0x45, }}, /* Byte value: 0x8d */ + {{0x8c, 0xe4, 0x26, 0x89, 0xae, 0xeb, 0xc4, 0xb6, }}, /* Byte value: 0x8e */ + {{0xfc, 0xb4, 0xcc, 0x0f, 0x4d, 0x62, 0xda, 0x80, }}, /* Byte value: 0x8f */ + {{0x78, 0x9f, 0x3a, 0x5c, 0xd3, 0xf3, 0x9d, 0x33, }}, /* Byte value: 0x90 */ + {{0x29, 0xb5, 0x0c, 0xbe, 0xf6, 0xcf, 0xe2, 0x59, }}, /* Byte value: 0x91 */ + {{0xea, 0x2c, 0xf3, 0xc2, 0x39, 0x54, 0xef, 0xf9, }}, /* Byte value: 0x92 */ + {{0x48, 0x78, 0x9f, 0xc5, 0x73, 0x2c, 0x11, 0x2d, }}, /* Byte value: 0x93 */ + {{0xf7, 0xf8, 0x32, 0x88, 0x77, 0x79, 0x21, 0x5d, }}, /* Byte value: 0x94 */ + {{0x69, 0x02, 0x43, 0xa1, 0xb5, 0x99, 0x70, 0x71, }}, /* Byte value: 0x95 */ + {{0xb6, 0x8f, 0x67, 0x1d, 0x32, 0xb1, 0x9b, 0x3d, }}, /* Byte value: 0x96 */ + {{0xbe, 0x40, 0xb7, 0xc7, 0x02, 0xcb, 0x18, 0x38, }}, /* Byte value: 0x97 */ + {{0x7f, 0x9a, 0x7c, 0x6c, 0xc1, 0xaf, 0x45, 0x08, }}, /* Byte value: 0x98 */ + {{0xfd, 0x74, 0xd6, 0x85, 0x4b, 0xfc, 0xf2, 0xc8, }}, /* Byte value: 0x99 */ + {{0x1f, 0x97, 0xf5, 0x9d, 0x42, 0xd2, 0x9e, 0x34, }}, /* Byte value: 0x9a */ + {{0x2d, 0x33, 0x64, 0xd3, 0xee, 0xf2, 0x42, 0xba, }}, /* Byte value: 0x9b */ + {{0xdb, 0x0b, 0x4c, 0xd1, 0x9f, 0x15, 0x4b, 0xaf, }}, /* Byte value: 0x9c */ + {{0x3b, 0xab, 0x5b, 0x1e, 0x9a, 0xc4, 0x77, 0xc3, }}, /* Byte value: 0x9d */ + {{0x80, 0xad, 0x9e, 0x3e, 0x86, 0xac, 0xe7, 0x50, }}, /* Byte value: 0x9e */ + {{0x86, 0x68, 0xc2, 0x84, 0x92, 0x6e, 0x17, 0x23, }}, /* Byte value: 0x9f */ + {{0x47, 0xb2, 0x09, 0x2f, 0x51, 0x0a, 0x4a, 0x13, }}, /* Byte value: 0xa0 */ + {{0xb8, 0x85, 0xeb, 0x7d, 0x16, 0x09, 0xe8, 0x4b, }}, /* Byte value: 0xa1 */ + {{0x9d, 0x79, 0x5f, 0x74, 0xc8, 0x81, 0x29, 0xf4, }}, /* Byte value: 0xa2 */ + {{0xce, 0x10, 0x5d, 0x41, 0xe1, 0x42, 0x06, 0x0e, }}, /* Byte value: 0xa3 */ + {{0x09, 0x0f, 0xca, 0x50, 0x36, 0xe4, 0xab, 0x4d, }}, /* Byte value: 0xa4 */ + {{0xc0, 0x1a, 0xd1, 0x21, 0xc5, 0xfa, 0x75, 0x78, }}, /* Byte value: 0xa5 */ + {{0x5d, 0x63, 0x8e, 0x55, 0x0d, 0x7b, 0x5c, 0x8c, }}, /* Byte value: 0xa6 */ + {{0x05, 0x46, 0x72, 0xe7, 0x1e, 0xa3, 0x88, 0xab, }}, /* Byte value: 0xa7 */ + {{0x16, 0x98, 0x3f, 0xcd, 0x74, 0x36, 0x35, 0x79, }}, /* Byte value: 0xa8 */ + {{0x0a, 0x8c, 0xe4, 0x0d, 0x3c, 0x85, 0xd3, 0x95, }}, /* Byte value: 0xa9 */ + {{0xc3, 0x99, 0xff, 0x7c, 0xcf, 0x9b, 0x0d, 0xa0, }}, /* Byte value: 0xaa */ + {{0xa5, 0x51, 0x2a, 0x37, 0x58, 0x24, 0x26, 0xef, }}, /* Byte value: 0xab */ + {{0x14, 0xdb, 0x0b, 0x1a, 0x78, 0xc9, 0x65, 0xe9, }}, /* Byte value: 0xac */ + {{0xe4, 0x26, 0x7f, 0xa2, 0x1d, 0xec, 0x9c, 0x8f, }}, /* Byte value: 0xad */ + {{0xee, 0xaa, 0x9b, 0xaf, 0x21, 0x69, 0x4f, 0x1a, }}, /* Byte value: 0xae */ + {{0xc2, 0x59, 0xe5, 0xf6, 0xc9, 0x05, 0x25, 0xe8, }}, /* Byte value: 0xaf */ + {{0xf9, 0xf2, 0xbe, 0xe8, 0x53, 0xc1, 0x52, 0x2b, }}, /* Byte value: 0xb0 */ + {{0x35, 0xa1, 0xd7, 0x7e, 0xbe, 0x7c, 0x04, 0xb5, }}, /* Byte value: 0xb1 */ + {{0x8e, 0xa7, 0x12, 0x5e, 0xa2, 0x14, 0x94, 0x26, }}, /* Byte value: 0xb2 */ + {{0xb3, 0xc9, 0x15, 0xfa, 0x2c, 0x12, 0x13, 0x96, }}, /* Byte value: 0xb3 */ + {{0xfa, 0x71, 0x90, 0xb5, 0x59, 0xa0, 0x2a, 0xf3, }}, /* Byte value: 0xb4 */ + {{0xe3, 0x23, 0x39, 0x92, 0x0f, 0xb0, 0x44, 0xb4, }}, /* Byte value: 0xb5 */ + {{0xd0, 0x47, 0xb2, 0x56, 0xa5, 0x0e, 0xb0, 0x72, }}, /* Byte value: 0xb6 */ + {{0x60, 0x0d, 0x89, 0xf1, 0x83, 0x7d, 0xdb, 0x3c, }}, /* Byte value: 0xb7 */ + {{0x2f, 0x70, 0x50, 0x04, 0xe2, 0x0d, 0x12, 0x2a, }}, /* Byte value: 0xb8 */ + {{0x89, 0xa2, 0x54, 0x6e, 0xb0, 0x48, 0x4c, 0x1d, }}, /* Byte value: 0xb9 */ + {{0x46, 0x72, 0x13, 0xa5, 0x57, 0x94, 0x62, 0x5b, }}, /* Byte value: 0xba */ + {{0x7e, 0x5a, 0x66, 0xe6, 0xc7, 0x31, 0x6d, 0x40, }}, /* Byte value: 0xbb */ + {{0x42, 0xf4, 0x7b, 0xc8, 0x4f, 0xa9, 0xc2, 0xb8, }}, /* Byte value: 0xbc */ + {{0x61, 0xcd, 0x93, 0x7b, 0x85, 0xe3, 0xf3, 0x74, }}, /* Byte value: 0xbd */ + {{0x3f, 0x2d, 0x33, 0x73, 0x82, 0xf9, 0xd7, 0x20, }}, /* Byte value: 0xbe */ + {{0x72, 0x13, 0xde, 0x51, 0xef, 0x76, 0x4e, 0xa6, }}, /* Byte value: 0xbf */ + {{0x41, 0x77, 0x55, 0x95, 0x45, 0xc8, 0xba, 0x60, }}, /* Byte value: 0xc0 */ + {{0xd7, 0x42, 0xf4, 0x66, 0xb7, 0x52, 0x68, 0x49, }}, /* Byte value: 0xc1 */ + {{0x79, 0x5f, 0x20, 0xd6, 0xd5, 0x6d, 0xb5, 0x7b, }}, /* Byte value: 0xc2 */ + {{0xda, 0xcb, 0x56, 0x5b, 0x99, 0x8b, 0x63, 0xe7, }}, /* Byte value: 0xc3 */ + {{0x2a, 0x36, 0x22, 0xe3, 0xfc, 0xae, 0x9a, 0x81, }}, /* Byte value: 0xc4 */ + {{0x83, 0x2e, 0xb0, 0x63, 0x8c, 0xcd, 0x9f, 0x88, }}, /* Byte value: 0xc5 */ + {{0xc6, 0xdf, 0x8d, 0x9b, 0xd1, 0x38, 0x85, 0x0b, }}, /* Byte value: 0xc6 */ + {{0xa4, 0x91, 0x30, 0xbd, 0x5e, 0xba, 0x0e, 0xa7, }}, /* Byte value: 0xc7 */ + {{0x10, 0x5d, 0x63, 0x77, 0x60, 0xf4, 0xc5, 0x0a, }}, /* Byte value: 0xc8 */ + {{0xa3, 0x94, 0x76, 0x8d, 0x4c, 0xe6, 0xd6, 0x9c, }}, /* Byte value: 0xc9 */ + {{0xdf, 0x8d, 0x24, 0xbc, 0x87, 0x28, 0xeb, 0x4c, }}, /* Byte value: 0xca */ + {{0x96, 0x35, 0xa1, 0xf3, 0xf2, 0x9a, 0xd2, 0x29, }}, /* Byte value: 0xcb */ + {{0x34, 0x61, 0xcd, 0xf4, 0xb8, 0xe2, 0x2c, 0xfd, }}, /* Byte value: 0xcc */ + {{0x62, 0x4e, 0xbd, 0x26, 0x8f, 0x82, 0x8b, 0xac, }}, /* Byte value: 0xcd */ + {{0x8f, 0x67, 0x08, 0xd4, 0xa4, 0x8a, 0xbc, 0x6e, }}, /* Byte value: 0xce */ + {{0xa9, 0x18, 0x92, 0x80, 0x70, 0x63, 0x05, 0x09, }}, /* Byte value: 0xcf */ + {{0x98, 0x3f, 0x2d, 0x93, 0xd6, 0x22, 0xa1, 0x5f, }}, /* Byte value: 0xd0 */ + {{0x77, 0x55, 0xac, 0xb6, 0xf1, 0xd5, 0xc6, 0x0d, }}, /* Byte value: 0xd1 */ + {{0xe8, 0x6f, 0xc7, 0x15, 0x35, 0xab, 0xbf, 0x69, }}, /* Byte value: 0xd2 */ + {{0x6d, 0x84, 0x2b, 0xcc, 0xad, 0xa4, 0xd0, 0x92, }}, /* Byte value: 0xd3 */ + {{0x63, 0x8e, 0xa7, 0xac, 0x89, 0x1c, 0xa3, 0xe4, }}, /* Byte value: 0xd4 */ + {{0x67, 0x08, 0xcf, 0xc1, 0x91, 0x21, 0x03, 0x07, }}, /* Byte value: 0xd5 */ + {{0x20, 0xba, 0xc6, 0xee, 0xc0, 0x2b, 0x49, 0x14, }}, /* Byte value: 0xd6 */ + {{0x95, 0xb6, 0x8f, 0xae, 0xf8, 0xfb, 0xaa, 0xf1, }}, /* Byte value: 0xd7 */ + {{0x64, 0x8b, 0xe1, 0x9c, 0x9b, 0x40, 0x7b, 0xdf, }}, /* Byte value: 0xd8 */ + {{0x85, 0xeb, 0xec, 0xd9, 0x98, 0x0f, 0x6f, 0xfb, }}, /* Byte value: 0xd9 */ + {{0x9f, 0x3a, 0x6b, 0xa3, 0xc4, 0x7e, 0x79, 0x64, }}, /* Byte value: 0xda */ + {{0xef, 0x6a, 0x81, 0x25, 0x27, 0xf7, 0x67, 0x52, }}, /* Byte value: 0xdb */ + {{0x74, 0xd6, 0x82, 0xeb, 0xfb, 0xb4, 0xbe, 0xd5, }}, /* Byte value: 0xdc */ + {{0xb5, 0x0c, 0x49, 0x40, 0x38, 0xd0, 0xe3, 0xe5, }}, /* Byte value: 0xdd */ + {{0xeb, 0xec, 0xe9, 0x48, 0x3f, 0xca, 0xc7, 0xb1, }}, /* Byte value: 0xde */ + {{0x04, 0x86, 0x68, 0x6d, 0x18, 0x3d, 0xa0, 0xe3, }}, /* Byte value: 0xdf */ + {{0xe5, 0xe6, 0x65, 0x28, 0x1b, 0x72, 0xb4, 0xc7, }}, /* Byte value: 0xe0 */ + {{0xe7, 0xa5, 0x51, 0xff, 0x17, 0x8d, 0xe4, 0x57, }}, /* Byte value: 0xe1 */ + {{0xa8, 0xd8, 0x88, 0x0a, 0x76, 0xfd, 0x2d, 0x41, }}, /* Byte value: 0xe2 */ + {{0x49, 0xb8, 0x85, 0x4f, 0x75, 0xb2, 0x39, 0x65, }}, /* Byte value: 0xe3 */ + {{0x99, 0xff, 0x37, 0x19, 0xd0, 0xbc, 0x89, 0x17, }}, /* Byte value: 0xe4 */ + {{0x84, 0x2b, 0xf6, 0x53, 0x9e, 0x91, 0x47, 0xb3, }}, /* Byte value: 0xe5 */ + {{0x4f, 0x7d, 0xd9, 0xf5, 0x61, 0x70, 0xc9, 0x16, }}, /* Byte value: 0xe6 */ + {{0x8b, 0xe1, 0x60, 0xb9, 0xbc, 0xb7, 0x1c, 0x8d, }}, /* Byte value: 0xe7 */ + {{0xcf, 0xd0, 0x47, 0xcb, 0xe7, 0xdc, 0x2e, 0x46, }}, /* Byte value: 0xe8 */ + {{0xe1, 0x60, 0x0d, 0x45, 0x03, 0x4f, 0x14, 0x24, }}, /* Byte value: 0xe9 */ + {{0xab, 0x5b, 0xa6, 0x57, 0x7c, 0x9c, 0x55, 0x99, }}, /* Byte value: 0xea */ + {{0x02, 0x43, 0x34, 0xd7, 0x0c, 0xff, 0x50, 0x90, }}, /* Byte value: 0xeb */ + {{0x50, 0xea, 0x2c, 0x68, 0x23, 0xa2, 0x57, 0x22, }}, /* Byte value: 0xec */ + {{0xc4, 0x9c, 0xb9, 0x4c, 0xdd, 0xc7, 0xd5, 0x9b, }}, /* Byte value: 0xed */ + {{0xbb, 0x06, 0xc5, 0x20, 0x1c, 0x68, 0x90, 0x93, }}, /* Byte value: 0xee */ + {{0x1d, 0xd4, 0xc1, 0x4a, 0x4e, 0x2d, 0xce, 0xa4, }}, /* Byte value: 0xef */ + {{0x54, 0x6c, 0x44, 0x05, 0x3b, 0x9f, 0xf7, 0xc1, }}, /* Byte value: 0xf0 */ + {{0xc5, 0x5c, 0xa3, 0xc6, 0xdb, 0x59, 0xfd, 0xd3, }}, /* Byte value: 0xf1 */ + {{0x93, 0x73, 0xd3, 0x14, 0xec, 0x39, 0x5a, 0x82, }}, /* Byte value: 0xf2 */ + {{0x92, 0xb3, 0xc9, 0x9e, 0xea, 0xa7, 0x72, 0xca, }}, /* Byte value: 0xf3 */ + {{0xf4, 0x7b, 0x1c, 0xd5, 0x7d, 0x18, 0x59, 0x85, }}, /* Byte value: 0xf4 */ + {{0xbf, 0x80, 0xad, 0x4d, 0x04, 0x55, 0x30, 0x70, }}, /* Byte value: 0xf5 */ + {{0x9b, 0xbc, 0x03, 0xce, 0xdc, 0x43, 0xd9, 0x87, }}, /* Byte value: 0xf6 */ + {{0xa1, 0xd7, 0x42, 0x5a, 0x40, 0x19, 0x86, 0x0c, }}, /* Byte value: 0xf7 */ + {{0xfb, 0xb1, 0x8a, 0x3f, 0x5f, 0x3e, 0x02, 0xbb, }}, /* Byte value: 0xf8 */ + {{0x01, 0xc0, 0x1a, 0x8a, 0x06, 0x9e, 0x28, 0x48, }}, /* Byte value: 0xf9 */ + {{0x24, 0x3c, 0xae, 0x83, 0xd8, 0x16, 0xe9, 0xf7, }}, /* Byte value: 0xfa */ + {{0x91, 0x30, 0xe7, 0xc3, 0xe0, 0xc6, 0x0a, 0x12, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x3a, 0x6b, 0x41, 0x94, 0x9c, 0x5a, 0x5f, 0x8b, }}, /* Byte value: 0xfd */ + {{0x40, 0xb7, 0x4f, 0x1f, 0x43, 0x56, 0x92, 0x28, }}, /* Byte value: 0xfe */ + {{0x4b, 0xfb, 0xb1, 0x98, 0x79, 0x4d, 0x69, 0xf5, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 12 */ + {{0x2a, 0x3f, 0xb0, 0xb9, 0xb0, 0x0b, 0x7b, 0xc6, }}, /* Byte value: 0x00 */ + {{0x64, 0x56, 0x1f, 0xc2, 0x1f, 0x6d, 0x57, 0x36, }}, /* Byte value: 0x01 */ + {{0x91, 0x38, 0x9b, 0x93, 0x9b, 0xf4, 0x35, 0x9d, }}, /* Byte value: 0x02 */ + {{0x08, 0x0c, 0x8b, 0x48, 0x8b, 0xf5, 0x6f, 0x4b, }}, /* Byte value: 0x03 */ + {{0x8c, 0xca, 0x48, 0x66, 0x48, 0xe5, 0x86, 0xb5, }}, /* Byte value: 0x04 */ + {{0xa5, 0x16, 0x83, 0xc4, 0x83, 0x14, 0x42, 0x20, }}, /* Byte value: 0x05 */ + {{0x75, 0xae, 0xe3, 0x5b, 0xe3, 0x12, 0x5d, 0x91, }}, /* Byte value: 0x06 */ + {{0xd1, 0x58, 0x49, 0x96, 0x49, 0x50, 0xcb, 0x80, }}, /* Byte value: 0x07 */ + {{0x44, 0x66, 0x76, 0x21, 0x76, 0x3f, 0x28, 0xd9, }}, /* Byte value: 0x08 */ + {{0x4b, 0x8f, 0x22, 0x56, 0x22, 0xab, 0x2e, 0x05, }}, /* Byte value: 0x09 */ + {{0x71, 0xa8, 0x47, 0x7f, 0x47, 0x89, 0x8b, 0x55, }}, /* Byte value: 0x0a */ + {{0x6f, 0xb9, 0xef, 0x91, 0xef, 0x62, 0x87, 0x2e, }}, /* Byte value: 0x0b */ + {{0x5e, 0x71, 0x7a, 0xeb, 0x7a, 0x4f, 0xf2, 0x66, }}, /* Byte value: 0x0c */ + {{0x66, 0x55, 0x4d, 0xd0, 0x4d, 0xc1, 0x3c, 0x54, }}, /* Byte value: 0x0d */ + {{0x18, 0x14, 0x5e, 0xd8, 0x5e, 0xdc, 0xb1, 0xdd, }}, /* Byte value: 0x0e */ + {{0xe7, 0x75, 0x03, 0xd3, 0x03, 0x1c, 0xd7, 0x5f, }}, /* Byte value: 0x0f */ + {{0xe1, 0x70, 0xf5, 0xe5, 0xf5, 0x2b, 0x6a, 0xf9, }}, /* Byte value: 0x10 */ + {{0x2e, 0x39, 0x14, 0x9d, 0x14, 0x90, 0xad, 0x02, }}, /* Byte value: 0x11 */ + {{0x6a, 0x5f, 0x62, 0xbc, 0x62, 0xaf, 0x85, 0xdb, }}, /* Byte value: 0x12 */ + {{0xc8, 0xac, 0x3e, 0x47, 0x3e, 0xda, 0xae, 0x6c, }}, /* Byte value: 0x13 */ + {{0xdb, 0x57, 0x90, 0xcc, 0x90, 0x09, 0xcf, 0xa9, }}, /* Byte value: 0x14 */ + {{0x89, 0x2c, 0xc5, 0x4b, 0xc5, 0x28, 0x84, 0x40, }}, /* Byte value: 0x15 */ + {{0x46, 0x65, 0x24, 0x33, 0x24, 0x93, 0x43, 0xbb, }}, /* Byte value: 0x16 */ + {{0xb3, 0x0b, 0xa0, 0x62, 0xa0, 0x0a, 0x21, 0x10, }}, /* Byte value: 0x17 */ + {{0xdc, 0xb2, 0x4f, 0xf3, 0x4f, 0x68, 0xa6, 0x3e, }}, /* Byte value: 0x18 */ + {{0xde, 0xb1, 0x1d, 0xe1, 0x1d, 0xc4, 0xcd, 0x5c, }}, /* Byte value: 0x19 */ + {{0x88, 0xcc, 0xec, 0x42, 0xec, 0x7e, 0x50, 0x71, }}, /* Byte value: 0x1a */ + {{0xa8, 0xfc, 0x85, 0xa1, 0x85, 0x2c, 0x2f, 0x9e, }}, /* Byte value: 0x1b */ + {{0x0c, 0x0a, 0x2f, 0x6c, 0x2f, 0x6e, 0xb9, 0x8f, }}, /* Byte value: 0x1c */ + {{0x8d, 0x2a, 0x61, 0x6f, 0x61, 0xb3, 0x52, 0x84, }}, /* Byte value: 0x1d */ + {{0x30, 0x28, 0xbc, 0x73, 0xbc, 0x7b, 0xa1, 0x79, }}, /* Byte value: 0x1e */ + {{0x33, 0xcb, 0xc7, 0x68, 0xc7, 0x81, 0x1e, 0x2a, }}, /* Byte value: 0x1f */ + {{0x17, 0xfd, 0x0a, 0xaf, 0x0a, 0x48, 0xb7, 0x01, }}, /* Byte value: 0x20 */ + {{0x80, 0xc0, 0x67, 0x0a, 0x67, 0x8b, 0x3f, 0x3a, }}, /* Byte value: 0x21 */ + {{0x3c, 0x22, 0x93, 0x1f, 0x93, 0x15, 0x18, 0xf6, }}, /* Byte value: 0x22 */ + {{0xb8, 0xe4, 0x50, 0x31, 0x50, 0x05, 0xf1, 0x08, }}, /* Byte value: 0x23 */ + {{0xaa, 0xff, 0xd7, 0xb3, 0xd7, 0x80, 0x44, 0xfc, }}, /* Byte value: 0x24 */ + {{0xf3, 0x6b, 0x72, 0x67, 0x72, 0xae, 0xdf, 0x0d, }}, /* Byte value: 0x25 */ + {{0xd4, 0xbe, 0xc4, 0xbb, 0xc4, 0x9d, 0xc9, 0x75, }}, /* Byte value: 0x26 */ + {{0x53, 0x9b, 0x7c, 0x8e, 0x7c, 0x77, 0x9f, 0xd8, }}, /* Byte value: 0x27 */ + {{0x19, 0xf4, 0x77, 0xd1, 0x77, 0x8a, 0x65, 0xec, }}, /* Byte value: 0x28 */ + {{0xa7, 0x15, 0xd1, 0xd6, 0xd1, 0xb8, 0x29, 0x42, }}, /* Byte value: 0x29 */ + {{0x85, 0x26, 0xea, 0x27, 0xea, 0x46, 0x3d, 0xcf, }}, /* Byte value: 0x2a */ + {{0x65, 0xb6, 0x36, 0xcb, 0x36, 0x3b, 0x83, 0x07, }}, /* Byte value: 0x2b */ + {{0x7b, 0xa7, 0x9e, 0x25, 0x9e, 0xd0, 0x8f, 0x7c, }}, /* Byte value: 0x2c */ + {{0x7f, 0xa1, 0x3a, 0x01, 0x3a, 0x4b, 0x59, 0xb8, }}, /* Byte value: 0x2d */ + {{0x11, 0xf8, 0xfc, 0x99, 0xfc, 0x7f, 0x0a, 0xa7, }}, /* Byte value: 0x2e */ + {{0x7d, 0xa2, 0x68, 0x13, 0x68, 0xe7, 0x32, 0xda, }}, /* Byte value: 0x2f */ + {{0x01, 0xe0, 0x29, 0x09, 0x29, 0x56, 0xd4, 0x31, }}, /* Byte value: 0x30 */ + {{0x5c, 0x72, 0x28, 0xf9, 0x28, 0xe3, 0x99, 0x04, }}, /* Byte value: 0x31 */ + {{0xea, 0x9f, 0x05, 0xb6, 0x05, 0x24, 0xba, 0xe1, }}, /* Byte value: 0x32 */ + {{0x5f, 0x91, 0x53, 0xe2, 0x53, 0x19, 0x26, 0x57, }}, /* Byte value: 0x33 */ + {{0x55, 0x9e, 0x8a, 0xb8, 0x8a, 0x40, 0x22, 0x7e, }}, /* Byte value: 0x34 */ + {{0x98, 0xd4, 0x39, 0xd2, 0x39, 0x57, 0x8e, 0xe7, }}, /* Byte value: 0x35 */ + {{0xa9, 0x1c, 0xac, 0xa8, 0xac, 0x7a, 0xfb, 0xaf, }}, /* Byte value: 0x36 */ + {{0x1b, 0xf7, 0x25, 0xc3, 0x25, 0x26, 0x0e, 0x8e, }}, /* Byte value: 0x37 */ + {{0xbc, 0xe2, 0xf4, 0x15, 0xf4, 0x9e, 0x27, 0xcc, }}, /* Byte value: 0x38 */ + {{0xcc, 0xaa, 0x9a, 0x63, 0x9a, 0x41, 0x78, 0xa8, }}, /* Byte value: 0x39 */ + {{0xed, 0x7a, 0xda, 0x89, 0xda, 0x45, 0xd3, 0x76, }}, /* Byte value: 0x3a */ + {{0xad, 0x1a, 0x08, 0x8c, 0x08, 0xe1, 0x2d, 0x6b, }}, /* Byte value: 0x3b */ + {{0x22, 0x33, 0x3b, 0xf1, 0x3b, 0xfe, 0x14, 0x8d, }}, /* Byte value: 0x3c */ + {{0xc4, 0xa6, 0x11, 0x2b, 0x11, 0xb4, 0x17, 0xe3, }}, /* Byte value: 0x3d */ + {{0xf6, 0x8d, 0xff, 0x4a, 0xff, 0x63, 0xdd, 0xf8, }}, /* Byte value: 0x3e */ + {{0xc0, 0xa0, 0xb5, 0x0f, 0xb5, 0x2f, 0xc1, 0x27, }}, /* Byte value: 0x3f */ + {{0xff, 0x61, 0x5d, 0x0b, 0x5d, 0xc0, 0x66, 0x82, }}, /* Byte value: 0x40 */ + {{0xce, 0xa9, 0xc8, 0x71, 0xc8, 0xed, 0x13, 0xca, }}, /* Byte value: 0x41 */ + {{0x38, 0x24, 0x37, 0x3b, 0x37, 0x8e, 0xce, 0x32, }}, /* Byte value: 0x42 */ + {{0xc2, 0xa3, 0xe7, 0x1d, 0xe7, 0x83, 0xaa, 0x45, }}, /* Byte value: 0x43 */ + {{0x1e, 0x11, 0xa8, 0xee, 0xa8, 0xeb, 0x0c, 0x7b, }}, /* Byte value: 0x44 */ + {{0x21, 0xd0, 0x40, 0xea, 0x40, 0x04, 0xab, 0xde, }}, /* Byte value: 0x45 */ + {{0x0f, 0xe9, 0x54, 0x77, 0x54, 0x94, 0x06, 0xdc, }}, /* Byte value: 0x46 */ + {{0xd2, 0xbb, 0x32, 0x8d, 0x32, 0xaa, 0x74, 0xd3, }}, /* Byte value: 0x47 */ + {{0x13, 0xfb, 0xae, 0x8b, 0xae, 0xd3, 0x61, 0xc5, }}, /* Byte value: 0x48 */ + {{0x9c, 0xd2, 0x9d, 0xf6, 0x9d, 0xcc, 0x58, 0x23, }}, /* Byte value: 0x49 */ + {{0x6b, 0xbf, 0x4b, 0xb5, 0x4b, 0xf9, 0x51, 0xea, }}, /* Byte value: 0x4a */ + {{0xd6, 0xbd, 0x96, 0xa9, 0x96, 0x31, 0xa2, 0x17, }}, /* Byte value: 0x4b */ + {{0xda, 0xb7, 0xb9, 0xc5, 0xb9, 0x5f, 0x1b, 0x98, }}, /* Byte value: 0x4c */ + {{0x96, 0xdd, 0x44, 0xac, 0x44, 0x95, 0x5c, 0x0a, }}, /* Byte value: 0x4d */ + {{0x45, 0x86, 0x5f, 0x28, 0x5f, 0x69, 0xfc, 0xe8, }}, /* Byte value: 0x4e */ + {{0x50, 0x78, 0x07, 0x95, 0x07, 0x8d, 0x20, 0x8b, }}, /* Byte value: 0x4f */ + {{0x03, 0xe3, 0x7b, 0x1b, 0x7b, 0xfa, 0xbf, 0x53, }}, /* Byte value: 0x50 */ + {{0x61, 0xb0, 0x92, 0xef, 0x92, 0xa0, 0x55, 0xc3, }}, /* Byte value: 0x51 */ + {{0x81, 0x20, 0x4e, 0x03, 0x4e, 0xdd, 0xeb, 0x0b, }}, /* Byte value: 0x52 */ + {{0x78, 0x44, 0xe5, 0x3e, 0xe5, 0x2a, 0x30, 0x2f, }}, /* Byte value: 0x53 */ + {{0x20, 0x30, 0x69, 0xe3, 0x69, 0x52, 0x7f, 0xef, }}, /* Byte value: 0x54 */ + {{0x67, 0xb5, 0x64, 0xd9, 0x64, 0x97, 0xe8, 0x65, }}, /* Byte value: 0x55 */ + {{0x02, 0x03, 0x52, 0x12, 0x52, 0xac, 0x6b, 0x62, }}, /* Byte value: 0x56 */ + {{0x7c, 0x42, 0x41, 0x1a, 0x41, 0xb1, 0xe6, 0xeb, }}, /* Byte value: 0x57 */ + {{0xcb, 0x4f, 0x45, 0x5c, 0x45, 0x20, 0x11, 0x3f, }}, /* Byte value: 0x58 */ + {{0x74, 0x4e, 0xca, 0x52, 0xca, 0x44, 0x89, 0xa0, }}, /* Byte value: 0x59 */ + {{0xe8, 0x9c, 0x57, 0xa4, 0x57, 0x88, 0xd1, 0x83, }}, /* Byte value: 0x5a */ + {{0x51, 0x98, 0x2e, 0x9c, 0x2e, 0xdb, 0xf4, 0xba, }}, /* Byte value: 0x5b */ + {{0xb4, 0xee, 0x7f, 0x5d, 0x7f, 0x6b, 0x48, 0x87, }}, /* Byte value: 0x5c */ + {{0xa0, 0xf0, 0x0e, 0xe9, 0x0e, 0xd9, 0x40, 0xd5, }}, /* Byte value: 0x5d */ + {{0x49, 0x8c, 0x70, 0x44, 0x70, 0x07, 0x45, 0x67, }}, /* Byte value: 0x5e */ + {{0xef, 0x79, 0x88, 0x9b, 0x88, 0xe9, 0xb8, 0x14, }}, /* Byte value: 0x5f */ + {{0x6c, 0x5a, 0x94, 0x8a, 0x94, 0x98, 0x38, 0x7d, }}, /* Byte value: 0x60 */ + {{0x24, 0x36, 0xcd, 0xc7, 0xcd, 0xc9, 0xa9, 0x2b, }}, /* Byte value: 0x61 */ + {{0x04, 0x06, 0xa4, 0x24, 0xa4, 0x9b, 0xd6, 0xc4, }}, /* Byte value: 0x62 */ + {{0xf8, 0x84, 0x82, 0x34, 0x82, 0xa1, 0x0f, 0x15, }}, /* Byte value: 0x63 */ + {{0xe0, 0x90, 0xdc, 0xec, 0xdc, 0x7d, 0xbe, 0xc8, }}, /* Byte value: 0x64 */ + {{0xf2, 0x8b, 0x5b, 0x6e, 0x5b, 0xf8, 0x0b, 0x3c, }}, /* Byte value: 0x65 */ + {{0xbe, 0xe1, 0xa6, 0x07, 0xa6, 0x32, 0x4c, 0xae, }}, /* Byte value: 0x66 */ + {{0x23, 0xd3, 0x12, 0xf8, 0x12, 0xa8, 0xc0, 0xbc, }}, /* Byte value: 0x67 */ + {{0xab, 0x1f, 0xfe, 0xba, 0xfe, 0xd6, 0x90, 0xcd, }}, /* Byte value: 0x68 */ + {{0x83, 0x23, 0x1c, 0x11, 0x1c, 0x71, 0x80, 0x69, }}, /* Byte value: 0x69 */ + {{0xd7, 0x5d, 0xbf, 0xa0, 0xbf, 0x67, 0x76, 0x26, }}, /* Byte value: 0x6a */ + {{0x35, 0xce, 0x31, 0x5e, 0x31, 0xb6, 0xa3, 0x8c, }}, /* Byte value: 0x6b */ + {{0x9b, 0x37, 0x42, 0xc9, 0x42, 0xad, 0x31, 0xb4, }}, /* Byte value: 0x6c */ + {{0x3a, 0x27, 0x65, 0x29, 0x65, 0x22, 0xa5, 0x50, }}, /* Byte value: 0x6d */ + {{0x72, 0x4b, 0x3c, 0x64, 0x3c, 0x73, 0x34, 0x06, }}, /* Byte value: 0x6e */ + {{0x77, 0xad, 0xb1, 0x49, 0xb1, 0xbe, 0x36, 0xf3, }}, /* Byte value: 0x6f */ + {{0x36, 0x2d, 0x4a, 0x45, 0x4a, 0x4c, 0x1c, 0xdf, }}, /* Byte value: 0x70 */ + {{0x0d, 0xea, 0x06, 0x65, 0x06, 0x38, 0x6d, 0xbe, }}, /* Byte value: 0x71 */ + {{0xe6, 0x95, 0x2a, 0xda, 0x2a, 0x4a, 0x03, 0x6e, }}, /* Byte value: 0x72 */ + {{0x76, 0x4d, 0x98, 0x40, 0x98, 0xe8, 0xe2, 0xc2, }}, /* Byte value: 0x73 */ + {{0x40, 0x60, 0xd2, 0x05, 0xd2, 0xa4, 0xfe, 0x1d, }}, /* Byte value: 0x74 */ + {{0xf0, 0x88, 0x09, 0x7c, 0x09, 0x54, 0x60, 0x5e, }}, /* Byte value: 0x75 */ + {{0x70, 0x48, 0x6e, 0x76, 0x6e, 0xdf, 0x5f, 0x64, }}, /* Byte value: 0x76 */ + {{0x79, 0xa4, 0xcc, 0x37, 0xcc, 0x7c, 0xe4, 0x1e, }}, /* Byte value: 0x77 */ + {{0x6d, 0xba, 0xbd, 0x83, 0xbd, 0xce, 0xec, 0x4c, }}, /* Byte value: 0x78 */ + {{0x54, 0x7e, 0xa3, 0xb1, 0xa3, 0x16, 0xf6, 0x4f, }}, /* Byte value: 0x79 */ + {{0x95, 0x3e, 0x3f, 0xb7, 0x3f, 0x6f, 0xe3, 0x59, }}, /* Byte value: 0x7a */ + {{0xfb, 0x67, 0xf9, 0x2f, 0xf9, 0x5b, 0xb0, 0x46, }}, /* Byte value: 0x7b */ + {{0x26, 0x35, 0x9f, 0xd5, 0x9f, 0x65, 0xc2, 0x49, }}, /* Byte value: 0x7c */ + {{0xc5, 0x46, 0x38, 0x22, 0x38, 0xe2, 0xc3, 0xd2, }}, /* Byte value: 0x7d */ + {{0xac, 0xfa, 0x21, 0x85, 0x21, 0xb7, 0xf9, 0x5a, }}, /* Byte value: 0x7e */ + {{0x1d, 0xf2, 0xd3, 0xf5, 0xd3, 0x11, 0xb3, 0x28, }}, /* Byte value: 0x7f */ + {{0x14, 0x1e, 0x71, 0xb4, 0x71, 0xb2, 0x08, 0x52, }}, /* Byte value: 0x80 */ + {{0x16, 0x1d, 0x23, 0xa6, 0x23, 0x1e, 0x63, 0x30, }}, /* Byte value: 0x81 */ + {{0xa6, 0xf5, 0xf8, 0xdf, 0xf8, 0xee, 0xfd, 0x73, }}, /* Byte value: 0x82 */ + {{0x86, 0xc5, 0x91, 0x3c, 0x91, 0xbc, 0x82, 0x9c, }}, /* Byte value: 0x83 */ + {{0xbf, 0x01, 0x8f, 0x0e, 0x8f, 0x64, 0x98, 0x9f, }}, /* Byte value: 0x84 */ + {{0x3e, 0x21, 0xc1, 0x0d, 0xc1, 0xb9, 0x73, 0x94, }}, /* Byte value: 0x85 */ + {{0xb9, 0x04, 0x79, 0x38, 0x79, 0x53, 0x25, 0x39, }}, /* Byte value: 0x86 */ + {{0xba, 0xe7, 0x02, 0x23, 0x02, 0xa9, 0x9a, 0x6a, }}, /* Byte value: 0x87 */ + {{0x69, 0xbc, 0x19, 0xa7, 0x19, 0x55, 0x3a, 0x88, }}, /* Byte value: 0x88 */ + {{0x47, 0x85, 0x0d, 0x3a, 0x0d, 0xc5, 0x97, 0x8a, }}, /* Byte value: 0x89 */ + {{0xb6, 0xed, 0x2d, 0x4f, 0x2d, 0xc7, 0x23, 0xe5, }}, /* Byte value: 0x8a */ + {{0x7e, 0x41, 0x13, 0x08, 0x13, 0x1d, 0x8d, 0x89, }}, /* Byte value: 0x8b */ + {{0xeb, 0x7f, 0x2c, 0xbf, 0x2c, 0x72, 0x6e, 0xd0, }}, /* Byte value: 0x8c */ + {{0x62, 0x53, 0xe9, 0xf4, 0xe9, 0x5a, 0xea, 0x90, }}, /* Byte value: 0x8d */ + {{0x4a, 0x6f, 0x0b, 0x5f, 0x0b, 0xfd, 0xfa, 0x34, }}, /* Byte value: 0x8e */ + {{0xf9, 0x64, 0xab, 0x3d, 0xab, 0xf7, 0xdb, 0x24, }}, /* Byte value: 0x8f */ + {{0x4c, 0x6a, 0xfd, 0x69, 0xfd, 0xca, 0x47, 0x92, }}, /* Byte value: 0x90 */ + {{0x43, 0x83, 0xa9, 0x1e, 0xa9, 0x5e, 0x41, 0x4e, }}, /* Byte value: 0x91 */ + {{0x15, 0xfe, 0x58, 0xbd, 0x58, 0xe4, 0xdc, 0x63, }}, /* Byte value: 0x92 */ + {{0x0b, 0xef, 0xf0, 0x53, 0xf0, 0x0f, 0xd0, 0x18, }}, /* Byte value: 0x93 */ + {{0x8f, 0x29, 0x33, 0x7d, 0x33, 0x1f, 0x39, 0xe6, }}, /* Byte value: 0x94 */ + {{0xb7, 0x0d, 0x04, 0x46, 0x04, 0x91, 0xf7, 0xd4, }}, /* Byte value: 0x95 */ + {{0xbd, 0x02, 0xdd, 0x1c, 0xdd, 0xc8, 0xf3, 0xfd, }}, /* Byte value: 0x96 */ + {{0x42, 0x63, 0x80, 0x17, 0x80, 0x08, 0x95, 0x7f, }}, /* Byte value: 0x97 */ + {{0x5b, 0x97, 0xf7, 0xc6, 0xf7, 0x82, 0xf0, 0x93, }}, /* Byte value: 0x98 */ + {{0x3f, 0xc1, 0xe8, 0x04, 0xe8, 0xef, 0xa7, 0xa5, }}, /* Byte value: 0x99 */ + {{0xd5, 0x5e, 0xed, 0xb2, 0xed, 0xcb, 0x1d, 0x44, }}, /* Byte value: 0x9a */ + {{0xdd, 0x52, 0x66, 0xfa, 0x66, 0x3e, 0x72, 0x0f, }}, /* Byte value: 0x9b */ + {{0x94, 0xde, 0x16, 0xbe, 0x16, 0x39, 0x37, 0x68, }}, /* Byte value: 0x9c */ + {{0x31, 0xc8, 0x95, 0x7a, 0x95, 0x2d, 0x75, 0x48, }}, /* Byte value: 0x9d */ + {{0x2b, 0xdf, 0x99, 0xb0, 0x99, 0x5d, 0xaf, 0xf7, }}, /* Byte value: 0x9e */ + {{0xfa, 0x87, 0xd0, 0x26, 0xd0, 0x0d, 0x64, 0x77, }}, /* Byte value: 0x9f */ + {{0xe3, 0x73, 0xa7, 0xf7, 0xa7, 0x87, 0x01, 0x9b, }}, /* Byte value: 0xa0 */ + {{0x93, 0x3b, 0xc9, 0x81, 0xc9, 0x58, 0x5e, 0xff, }}, /* Byte value: 0xa1 */ + {{0xb1, 0x08, 0xf2, 0x70, 0xf2, 0xa6, 0x4a, 0x72, }}, /* Byte value: 0xa2 */ + {{0xf1, 0x68, 0x20, 0x75, 0x20, 0x02, 0xb4, 0x6f, }}, /* Byte value: 0xa3 */ + {{0x39, 0xc4, 0x1e, 0x32, 0x1e, 0xd8, 0x1a, 0x03, }}, /* Byte value: 0xa4 */ + {{0xdf, 0x51, 0x34, 0xe8, 0x34, 0x92, 0x19, 0x6d, }}, /* Byte value: 0xa5 */ + {{0x6e, 0x59, 0xc6, 0x98, 0xc6, 0x34, 0x53, 0x1f, }}, /* Byte value: 0xa6 */ + {{0x58, 0x74, 0x8c, 0xdd, 0x8c, 0x78, 0x4f, 0xc0, }}, /* Byte value: 0xa7 */ + {{0xec, 0x9a, 0xf3, 0x80, 0xf3, 0x13, 0x07, 0x47, }}, /* Byte value: 0xa8 */ + {{0xb0, 0xe8, 0xdb, 0x79, 0xdb, 0xf0, 0x9e, 0x43, }}, /* Byte value: 0xa9 */ + {{0x56, 0x7d, 0xf1, 0xa3, 0xf1, 0xba, 0x9d, 0x2d, }}, /* Byte value: 0xaa */ + {{0x09, 0xec, 0xa2, 0x41, 0xa2, 0xa3, 0xbb, 0x7a, }}, /* Byte value: 0xab */ + {{0xa3, 0x13, 0x75, 0xf2, 0x75, 0x23, 0xff, 0x86, }}, /* Byte value: 0xac */ + {{0x3b, 0xc7, 0x4c, 0x20, 0x4c, 0x74, 0x71, 0x61, }}, /* Byte value: 0xad */ + {{0x8b, 0x2f, 0x97, 0x59, 0x97, 0x84, 0xef, 0x22, }}, /* Byte value: 0xae */ + {{0x90, 0xd8, 0xb2, 0x9a, 0xb2, 0xa2, 0xe1, 0xac, }}, /* Byte value: 0xaf */ + {{0xa1, 0x10, 0x27, 0xe0, 0x27, 0x8f, 0x94, 0xe4, }}, /* Byte value: 0xb0 */ + {{0x1f, 0xf1, 0x81, 0xe7, 0x81, 0xbd, 0xd8, 0x4a, }}, /* Byte value: 0xb1 */ + {{0x05, 0xe6, 0x8d, 0x2d, 0x8d, 0xcd, 0x02, 0xf5, }}, /* Byte value: 0xb2 */ + {{0xe5, 0x76, 0x51, 0xc1, 0x51, 0xb0, 0xbc, 0x3d, }}, /* Byte value: 0xb3 */ + {{0x28, 0x3c, 0xe2, 0xab, 0xe2, 0xa7, 0x10, 0xa4, }}, /* Byte value: 0xb4 */ + {{0x2c, 0x3a, 0x46, 0x8f, 0x46, 0x3c, 0xc6, 0x60, }}, /* Byte value: 0xb5 */ + {{0xe2, 0x93, 0x8e, 0xfe, 0x8e, 0xd1, 0xd5, 0xaa, }}, /* Byte value: 0xb6 */ + {{0x8e, 0xc9, 0x1a, 0x74, 0x1a, 0x49, 0xed, 0xd7, }}, /* Byte value: 0xb7 */ + {{0x92, 0xdb, 0xe0, 0x88, 0xe0, 0x0e, 0x8a, 0xce, }}, /* Byte value: 0xb8 */ + {{0x12, 0x1b, 0x87, 0x82, 0x87, 0x85, 0xb5, 0xf4, }}, /* Byte value: 0xb9 */ + {{0x25, 0xd6, 0xe4, 0xce, 0xe4, 0x9f, 0x7d, 0x1a, }}, /* Byte value: 0xba */ + {{0x9d, 0x32, 0xb4, 0xff, 0xb4, 0x9a, 0x8c, 0x12, }}, /* Byte value: 0xbb */ + {{0xbb, 0x07, 0x2b, 0x2a, 0x2b, 0xff, 0x4e, 0x5b, }}, /* Byte value: 0xbc */ + {{0x48, 0x6c, 0x59, 0x4d, 0x59, 0x51, 0x91, 0x56, }}, /* Byte value: 0xbd */ + {{0xaf, 0x19, 0x5a, 0x9e, 0x5a, 0x4d, 0x46, 0x09, }}, /* Byte value: 0xbe */ + {{0xfc, 0x82, 0x26, 0x10, 0x26, 0x3a, 0xd9, 0xd1, }}, /* Byte value: 0xbf */ + {{0x32, 0x2b, 0xee, 0x61, 0xee, 0xd7, 0xca, 0x1b, }}, /* Byte value: 0xc0 */ + {{0xf5, 0x6e, 0x84, 0x51, 0x84, 0x99, 0x62, 0xab, }}, /* Byte value: 0xc1 */ + {{0x8a, 0xcf, 0xbe, 0x50, 0xbe, 0xd2, 0x3b, 0x13, }}, /* Byte value: 0xc2 */ + {{0x52, 0x7b, 0x55, 0x87, 0x55, 0x21, 0x4b, 0xe9, }}, /* Byte value: 0xc3 */ + {{0xca, 0xaf, 0x6c, 0x55, 0x6c, 0x76, 0xc5, 0x0e, }}, /* Byte value: 0xc4 */ + {{0xa2, 0xf3, 0x5c, 0xfb, 0x5c, 0x75, 0x2b, 0xb7, }}, /* Byte value: 0xc5 */ + {{0x0e, 0x09, 0x7d, 0x7e, 0x7d, 0xc2, 0xd2, 0xed, }}, /* Byte value: 0xc6 */ + {{0xcf, 0x49, 0xe1, 0x78, 0xe1, 0xbb, 0xc7, 0xfb, }}, /* Byte value: 0xc7 */ + {{0x3d, 0xc2, 0xba, 0x16, 0xba, 0x43, 0xcc, 0xc7, }}, /* Byte value: 0xc8 */ + {{0xd8, 0xb4, 0xeb, 0xd7, 0xeb, 0xf3, 0x70, 0xfa, }}, /* Byte value: 0xc9 */ + {{0x0a, 0x0f, 0xd9, 0x5a, 0xd9, 0x59, 0x04, 0x29, }}, /* Byte value: 0xca */ + {{0xc7, 0x45, 0x6a, 0x30, 0x6a, 0x4e, 0xa8, 0xb0, }}, /* Byte value: 0xcb */ + {{0xd9, 0x54, 0xc2, 0xde, 0xc2, 0xa5, 0xa4, 0xcb, }}, /* Byte value: 0xcc */ + {{0xc1, 0x40, 0x9c, 0x06, 0x9c, 0x79, 0x15, 0x16, }}, /* Byte value: 0xcd */ + {{0xc3, 0x43, 0xce, 0x14, 0xce, 0xd5, 0x7e, 0x74, }}, /* Byte value: 0xce */ + {{0x68, 0x5c, 0x30, 0xae, 0x30, 0x03, 0xee, 0xb9, }}, /* Byte value: 0xcf */ + {{0xe9, 0x7c, 0x7e, 0xad, 0x7e, 0xde, 0x05, 0xb2, }}, /* Byte value: 0xd0 */ + {{0xa4, 0xf6, 0xaa, 0xcd, 0xaa, 0x42, 0x96, 0x11, }}, /* Byte value: 0xd1 */ + {{0x5a, 0x77, 0xde, 0xcf, 0xde, 0xd4, 0x24, 0xa2, }}, /* Byte value: 0xd2 */ + {{0x29, 0xdc, 0xcb, 0xa2, 0xcb, 0xf1, 0xc4, 0x95, }}, /* Byte value: 0xd3 */ + {{0x07, 0xe5, 0xdf, 0x3f, 0xdf, 0x61, 0x69, 0x97, }}, /* Byte value: 0xd4 */ + {{0x99, 0x34, 0x10, 0xdb, 0x10, 0x01, 0x5a, 0xd6, }}, /* Byte value: 0xd5 */ + {{0x7a, 0x47, 0xb7, 0x2c, 0xb7, 0x86, 0x5b, 0x4d, }}, /* Byte value: 0xd6 */ + {{0x4e, 0x69, 0xaf, 0x7b, 0xaf, 0x66, 0x2c, 0xf0, }}, /* Byte value: 0xd7 */ + {{0x10, 0x18, 0xd5, 0x90, 0xd5, 0x29, 0xde, 0x96, }}, /* Byte value: 0xd8 */ + {{0x73, 0xab, 0x15, 0x6d, 0x15, 0x25, 0xe0, 0x37, }}, /* Byte value: 0xd9 */ + {{0xfe, 0x81, 0x74, 0x02, 0x74, 0x96, 0xb2, 0xb3, }}, /* Byte value: 0xda */ + {{0x4d, 0x8a, 0xd4, 0x60, 0xd4, 0x9c, 0x93, 0xa3, }}, /* Byte value: 0xdb */ + {{0x2d, 0xda, 0x6f, 0x86, 0x6f, 0x6a, 0x12, 0x51, }}, /* Byte value: 0xdc */ + {{0x34, 0x2e, 0x18, 0x57, 0x18, 0xe0, 0x77, 0xbd, }}, /* Byte value: 0xdd */ + {{0xd3, 0x5b, 0x1b, 0x84, 0x1b, 0xfc, 0xa0, 0xe2, }}, /* Byte value: 0xde */ + {{0x9e, 0xd1, 0xcf, 0xe4, 0xcf, 0x60, 0x33, 0x41, }}, /* Byte value: 0xdf */ + {{0xfd, 0x62, 0x0f, 0x19, 0x0f, 0x6c, 0x0d, 0xe0, }}, /* Byte value: 0xe0 */ + {{0xb2, 0xeb, 0x89, 0x6b, 0x89, 0x5c, 0xf5, 0x21, }}, /* Byte value: 0xe1 */ + {{0xae, 0xf9, 0x73, 0x97, 0x73, 0x1b, 0x92, 0x38, }}, /* Byte value: 0xe2 */ + {{0xcd, 0x4a, 0xb3, 0x6a, 0xb3, 0x17, 0xac, 0x99, }}, /* Byte value: 0xe3 */ + {{0x2f, 0xd9, 0x3d, 0x94, 0x3d, 0xc6, 0x79, 0x33, }}, /* Byte value: 0xe4 */ + {{0xb5, 0x0e, 0x56, 0x54, 0x56, 0x3d, 0x9c, 0xb6, }}, /* Byte value: 0xe5 */ + {{0x1c, 0x12, 0xfa, 0xfc, 0xfa, 0x47, 0x67, 0x19, }}, /* Byte value: 0xe6 */ + {{0x5d, 0x92, 0x01, 0xf0, 0x01, 0xb5, 0x4d, 0x35, }}, /* Byte value: 0xe7 */ + {{0x37, 0xcd, 0x63, 0x4c, 0x63, 0x1a, 0xc8, 0xee, }}, /* Byte value: 0xe8 */ + {{0x63, 0xb3, 0xc0, 0xfd, 0xc0, 0x0c, 0x3e, 0xa1, }}, /* Byte value: 0xe9 */ + {{0x27, 0xd5, 0xb6, 0xdc, 0xb6, 0x33, 0x16, 0x78, }}, /* Byte value: 0xea */ + {{0x4f, 0x89, 0x86, 0x72, 0x86, 0x30, 0xf8, 0xc1, }}, /* Byte value: 0xeb */ + {{0xc9, 0x4c, 0x17, 0x4e, 0x17, 0x8c, 0x7a, 0x5d, }}, /* Byte value: 0xec */ + {{0x41, 0x80, 0xfb, 0x0c, 0xfb, 0xf2, 0x2a, 0x2c, }}, /* Byte value: 0xed */ + {{0x1a, 0x17, 0x0c, 0xca, 0x0c, 0x70, 0xda, 0xbf, }}, /* Byte value: 0xee */ + {{0x9a, 0xd7, 0x6b, 0xc0, 0x6b, 0xfb, 0xe5, 0x85, }}, /* Byte value: 0xef */ + {{0x57, 0x9d, 0xd8, 0xaa, 0xd8, 0xec, 0x49, 0x1c, }}, /* Byte value: 0xf0 */ + {{0x87, 0x25, 0xb8, 0x35, 0xb8, 0xea, 0x56, 0xad, }}, /* Byte value: 0xf1 */ + {{0x9f, 0x31, 0xe6, 0xed, 0xe6, 0x36, 0xe7, 0x70, }}, /* Byte value: 0xf2 */ + {{0x59, 0x94, 0xa5, 0xd4, 0xa5, 0x2e, 0x9b, 0xf1, }}, /* Byte value: 0xf3 */ + {{0x06, 0x05, 0xf6, 0x36, 0xf6, 0x37, 0xbd, 0xa6, }}, /* Byte value: 0xf4 */ + {{0x84, 0xc6, 0xc3, 0x2e, 0xc3, 0x10, 0xe9, 0xfe, }}, /* Byte value: 0xf5 */ + {{0x60, 0x50, 0xbb, 0xe6, 0xbb, 0xf6, 0x81, 0xf2, }}, /* Byte value: 0xf6 */ + {{0x97, 0x3d, 0x6d, 0xa5, 0x6d, 0xc3, 0x88, 0x3b, }}, /* Byte value: 0xf7 */ + {{0xee, 0x99, 0xa1, 0x92, 0xa1, 0xbf, 0x6c, 0x25, }}, /* Byte value: 0xf8 */ + {{0xc6, 0xa5, 0x43, 0x39, 0x43, 0x18, 0x7c, 0x81, }}, /* Byte value: 0xf9 */ + {{0xe4, 0x96, 0x78, 0xc8, 0x78, 0xe6, 0x68, 0x0c, }}, /* Byte value: 0xfa */ + {{0xd0, 0xb8, 0x60, 0x9f, 0x60, 0x06, 0x1f, 0xb1, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xf7, 0x6d, 0xd6, 0x43, 0xd6, 0x35, 0x09, 0xc9, }}, /* Byte value: 0xfd */ + {{0xf4, 0x8e, 0xad, 0x58, 0xad, 0xcf, 0xb6, 0x9a, }}, /* Byte value: 0xfe */ + {{0x82, 0xc3, 0x35, 0x18, 0x35, 0x27, 0x54, 0x58, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 13 */ + {{0xb7, 0x40, 0xa6, 0x84, 0xc2, 0x22, 0x09, 0xda, }}, /* Byte value: 0x00 */ + {{0x54, 0xa2, 0xc5, 0x24, 0x95, 0xe1, 0xdd, 0xd9, }}, /* Byte value: 0x01 */ + {{0x22, 0x36, 0xb0, 0x57, 0xa6, 0xe7, 0x08, 0x3c, }}, /* Byte value: 0x02 */ + {{0xca, 0x0f, 0xa2, 0x72, 0x27, 0xd0, 0xc3, 0x8c, }}, /* Byte value: 0x03 */ + {{0x52, 0x19, 0x41, 0x67, 0xe0, 0x26, 0x2e, 0xdd, }}, /* Byte value: 0x04 */ + {{0xbe, 0xf2, 0xab, 0x81, 0x86, 0x2a, 0x47, 0xd4, }}, /* Byte value: 0x05 */ + {{0x8b, 0x64, 0xc7, 0x5f, 0x06, 0x98, 0xb8, 0xf2, }}, /* Byte value: 0x06 */ + {{0xbd, 0x4e, 0xe9, 0x41, 0x5d, 0xa8, 0xdf, 0xd6, }}, /* Byte value: 0x07 */ + {{0xfa, 0x9e, 0x08, 0x2f, 0x09, 0x27, 0x57, 0xac, }}, /* Byte value: 0x08 */ + {{0x0e, 0xdc, 0xb7, 0x06, 0x78, 0xb1, 0x74, 0xb5, }}, /* Byte value: 0x09 */ + {{0xee, 0x82, 0x96, 0x66, 0xf4, 0xf0, 0x38, 0xb4, }}, /* Byte value: 0x0a */ + {{0xc5, 0x06, 0x2b, 0x34, 0x16, 0x1f, 0x7e, 0x86, }}, /* Byte value: 0x0b */ + {{0xb4, 0xfc, 0xe4, 0x44, 0x19, 0xa0, 0x91, 0xd8, }}, /* Byte value: 0x0c */ + {{0x87, 0xd1, 0x0c, 0xd9, 0xec, 0xd5, 0x9d, 0xfa, }}, /* Byte value: 0x0d */ + {{0x9d, 0x11, 0x25, 0x96, 0x69, 0xb3, 0x86, 0x57, }}, /* Byte value: 0x0e */ + {{0xf2, 0xf9, 0x3b, 0x6a, 0x04, 0x51, 0xd0, 0x1d, }}, /* Byte value: 0x0f */ + {{0x44, 0x6c, 0xa3, 0xae, 0x8f, 0x0d, 0x10, 0x78, }}, /* Byte value: 0x10 */ + {{0xd2, 0xa6, 0xf7, 0xbd, 0x30, 0x4a, 0x89, 0x9c, }}, /* Byte value: 0x11 */ + {{0x28, 0x38, 0xff, 0x92, 0x39, 0x6d, 0xde, 0x30, }}, /* Byte value: 0x12 */ + {{0xa8, 0x87, 0x49, 0x48, 0xe9, 0x01, 0x79, 0x71, }}, /* Byte value: 0x13 */ + {{0xa4, 0x32, 0x82, 0xce, 0x03, 0x4c, 0x5c, 0x79, }}, /* Byte value: 0x14 */ + {{0xbf, 0x27, 0x95, 0xc1, 0xcf, 0x54, 0x8e, 0x6b, }}, /* Byte value: 0x15 */ + {{0x29, 0xed, 0xc1, 0xd2, 0x70, 0x13, 0x17, 0x8f, }}, /* Byte value: 0x16 */ + {{0x5f, 0x79, 0xb4, 0xa1, 0x43, 0x15, 0xc2, 0x6a, }}, /* Byte value: 0x17 */ + {{0x9a, 0x7f, 0x9f, 0x95, 0x55, 0x0a, 0xbc, 0xec, }}, /* Byte value: 0x18 */ + {{0x49, 0x0c, 0x56, 0x68, 0x2c, 0x3e, 0xfc, 0xcf, }}, /* Byte value: 0x19 */ + {{0x37, 0xff, 0x10, 0x5e, 0x12, 0x4e, 0xae, 0x9b, }}, /* Byte value: 0x1a */ + {{0x99, 0xc3, 0xdd, 0x55, 0x8e, 0x88, 0x24, 0xee, }}, /* Byte value: 0x1b */ + {{0xaf, 0xe9, 0xf3, 0x4b, 0xd5, 0xb8, 0x43, 0xca, }}, /* Byte value: 0x1c */ + {{0xda, 0xc1, 0xc4, 0xf8, 0x3d, 0x3c, 0x0e, 0x2d, }}, /* Byte value: 0x1d */ + {{0xf9, 0x22, 0x4a, 0xef, 0xd2, 0xa5, 0xcf, 0xae, }}, /* Byte value: 0x1e */ + {{0xa2, 0x89, 0x06, 0x8d, 0x76, 0x8b, 0xaf, 0x7d, }}, /* Byte value: 0x1f */ + {{0x69, 0x53, 0x9a, 0xbf, 0x18, 0x25, 0xa5, 0x4e, }}, /* Byte value: 0x20 */ + {{0xfd, 0xf0, 0xb2, 0x2c, 0x35, 0x9e, 0x6d, 0x17, }}, /* Byte value: 0x21 */ + {{0x56, 0xcb, 0xb9, 0xa4, 0x07, 0x1d, 0x8c, 0x64, }}, /* Byte value: 0x22 */ + {{0xce, 0xdd, 0x5a, 0xb1, 0xc0, 0xeb, 0x61, 0x35, }}, /* Byte value: 0x23 */ + {{0x4a, 0xb0, 0x14, 0xa8, 0xf7, 0xbc, 0x64, 0xcd, }}, /* Byte value: 0x24 */ + {{0xc0, 0x01, 0xed, 0xb7, 0xb8, 0x5a, 0x15, 0x80, }}, /* Byte value: 0x25 */ + {{0x50, 0x70, 0x3d, 0xe7, 0x72, 0xda, 0x7f, 0x60, }}, /* Byte value: 0x26 */ + {{0x93, 0xcd, 0x92, 0x90, 0x11, 0x02, 0xf2, 0xe2, }}, /* Byte value: 0x27 */ + {{0x15, 0xc9, 0xa0, 0x09, 0xb4, 0xa9, 0xa6, 0xa7, }}, /* Byte value: 0x28 */ + {{0x6d, 0x81, 0x62, 0x7c, 0xff, 0x1e, 0x07, 0xf7, }}, /* Byte value: 0x29 */ + {{0x10, 0xce, 0x66, 0x8a, 0x1a, 0xec, 0xcd, 0xa1, }}, /* Byte value: 0x2a */ + {{0xdc, 0x7a, 0x40, 0xbb, 0x48, 0xfb, 0xfd, 0x29, }}, /* Byte value: 0x2b */ + {{0xf7, 0xfe, 0xfd, 0xe9, 0xaa, 0x14, 0xbb, 0x1b, }}, /* Byte value: 0x2c */ + {{0x92, 0x18, 0xac, 0xd0, 0x58, 0x7c, 0x3b, 0x5d, }}, /* Byte value: 0x2d */ + {{0xdf, 0xc6, 0x02, 0x7b, 0x93, 0x79, 0x65, 0x2b, }}, /* Byte value: 0x2e */ + {{0x41, 0x6b, 0x65, 0x2d, 0x21, 0x48, 0x7b, 0x7e, }}, /* Byte value: 0x2f */ + {{0x88, 0xd8, 0x85, 0x9f, 0xdd, 0x1a, 0x20, 0xf0, }}, /* Byte value: 0x30 */ + {{0x67, 0x8f, 0x2d, 0xb9, 0x60, 0x94, 0xd1, 0xfb, }}, /* Byte value: 0x31 */ + {{0xd5, 0xc8, 0x4d, 0xbe, 0x0c, 0xf3, 0xb3, 0x27, }}, /* Byte value: 0x32 */ + {{0x3c, 0x24, 0x61, 0xdb, 0xc4, 0xba, 0xb1, 0x28, }}, /* Byte value: 0x33 */ + {{0x25, 0x58, 0x0a, 0x54, 0x9a, 0x5e, 0x32, 0x87, }}, /* Byte value: 0x34 */ + {{0x60, 0xe1, 0x97, 0xba, 0x5c, 0x2d, 0xeb, 0x40, }}, /* Byte value: 0x35 */ + {{0x11, 0x1b, 0x58, 0xca, 0x53, 0x92, 0x04, 0x1e, }}, /* Byte value: 0x36 */ + {{0xc6, 0xba, 0x69, 0xf4, 0xcd, 0x9d, 0xe6, 0x84, }}, /* Byte value: 0x37 */ + {{0xab, 0x3b, 0x0b, 0x88, 0x32, 0x83, 0xe1, 0x73, }}, /* Byte value: 0x38 */ + {{0xcd, 0x61, 0x18, 0x71, 0x1b, 0x69, 0xf9, 0x37, }}, /* Byte value: 0x39 */ + {{0xeb, 0x85, 0x50, 0xe5, 0x5a, 0xb5, 0x53, 0xb2, }}, /* Byte value: 0x3a */ + {{0x74, 0xfd, 0x09, 0xf3, 0xa1, 0xfa, 0x84, 0x58, }}, /* Byte value: 0x3b */ + {{0x7d, 0x4f, 0x04, 0xf6, 0xe5, 0xf2, 0xca, 0x56, }}, /* Byte value: 0x3c */ + {{0x07, 0x6e, 0xba, 0x03, 0x3c, 0xb9, 0x3a, 0xbb, }}, /* Byte value: 0x3d */ + {{0x2d, 0x3f, 0x39, 0x11, 0x97, 0x28, 0xb5, 0x36, }}, /* Byte value: 0x3e */ + {{0x62, 0x88, 0xeb, 0x3a, 0xce, 0xd1, 0xba, 0xfd, }}, /* Byte value: 0x3f */ + {{0x6f, 0xe8, 0x1e, 0xfc, 0x6d, 0xe2, 0x56, 0x4a, }}, /* Byte value: 0x40 */ + {{0x1e, 0x12, 0xd1, 0x8c, 0x62, 0x5d, 0xb9, 0x14, }}, /* Byte value: 0x41 */ + {{0x33, 0x2d, 0xe8, 0x9d, 0xf5, 0x75, 0x0c, 0x22, }}, /* Byte value: 0x42 */ + {{0xb1, 0xfb, 0x22, 0xc7, 0xb7, 0xe5, 0xfa, 0xde, }}, /* Byte value: 0x43 */ + {{0x2b, 0x84, 0xbd, 0x52, 0xe2, 0xef, 0x46, 0x32, }}, /* Byte value: 0x44 */ + {{0x26, 0xe4, 0x48, 0x94, 0x41, 0xdc, 0xaa, 0x85, }}, /* Byte value: 0x45 */ + {{0xf4, 0x42, 0xbf, 0x29, 0x71, 0x96, 0x23, 0x19, }}, /* Byte value: 0x46 */ + {{0xe6, 0xe5, 0xa5, 0x23, 0xf9, 0x86, 0xbf, 0x05, }}, /* Byte value: 0x47 */ + {{0x0c, 0xb5, 0xcb, 0x86, 0xea, 0x4d, 0x25, 0x08, }}, /* Byte value: 0x48 */ + {{0x05, 0x07, 0xc6, 0x83, 0xae, 0x45, 0x6b, 0x06, }}, /* Byte value: 0x49 */ + {{0xa0, 0xe0, 0x7a, 0x0d, 0xe4, 0x77, 0xfe, 0xc0, }}, /* Byte value: 0x4a */ + {{0x83, 0x03, 0xf4, 0x1a, 0x0b, 0xee, 0x3f, 0x43, }}, /* Byte value: 0x4b */ + {{0x2c, 0xea, 0x07, 0x51, 0xde, 0x56, 0x7c, 0x89, }}, /* Byte value: 0x4c */ + {{0x1c, 0x7b, 0xad, 0x0c, 0xf0, 0xa1, 0xe8, 0xa9, }}, /* Byte value: 0x4d */ + {{0x72, 0x46, 0x8d, 0xb0, 0xd4, 0x3d, 0x77, 0x5c, }}, /* Byte value: 0x4e */ + {{0xc8, 0x66, 0xde, 0xf2, 0xb5, 0x2c, 0x92, 0x31, }}, /* Byte value: 0x4f */ + {{0x5b, 0xab, 0x4c, 0x62, 0xa4, 0x2e, 0x60, 0xd3, }}, /* Byte value: 0x50 */ + {{0xb9, 0x9c, 0x11, 0x82, 0xba, 0x93, 0x7d, 0x6f, }}, /* Byte value: 0x51 */ + {{0x75, 0x28, 0x37, 0xb3, 0xe8, 0x84, 0x4d, 0xe7, }}, /* Byte value: 0x52 */ + {{0xac, 0x55, 0xb1, 0x8b, 0x0e, 0x3a, 0xdb, 0xc8, }}, /* Byte value: 0x53 */ + {{0xae, 0x3c, 0xcd, 0x0b, 0x9c, 0xc6, 0x8a, 0x75, }}, /* Byte value: 0x54 */ + {{0x0f, 0x09, 0x89, 0x46, 0x31, 0xcf, 0xbd, 0x0a, }}, /* Byte value: 0x55 */ + {{0xd3, 0x73, 0xc9, 0xfd, 0x79, 0x34, 0x40, 0x23, }}, /* Byte value: 0x56 */ + {{0xc9, 0xb3, 0xe0, 0xb2, 0xfc, 0x52, 0x5b, 0x8e, }}, /* Byte value: 0x57 */ + {{0xf3, 0x2c, 0x05, 0x2a, 0x4d, 0x2f, 0x19, 0xa2, }}, /* Byte value: 0x58 */ + {{0x03, 0xbc, 0x42, 0xc0, 0xdb, 0x82, 0x98, 0x02, }}, /* Byte value: 0x59 */ + {{0x06, 0xbb, 0x84, 0x43, 0x75, 0xc7, 0xf3, 0x04, }}, /* Byte value: 0x5a */ + {{0x40, 0xbe, 0x5b, 0x6d, 0x68, 0x36, 0xb2, 0xc1, }}, /* Byte value: 0x5b */ + {{0x61, 0x34, 0xa9, 0xfa, 0x15, 0x53, 0x22, 0xff, }}, /* Byte value: 0x5c */ + {{0x53, 0xcc, 0x7f, 0x27, 0xa9, 0x58, 0xe7, 0x62, }}, /* Byte value: 0x5d */ + {{0xdd, 0xaf, 0x7e, 0xfb, 0x01, 0x85, 0x34, 0x96, }}, /* Byte value: 0x5e */ + {{0x38, 0xf6, 0x99, 0x18, 0x23, 0x81, 0x13, 0x91, }}, /* Byte value: 0x5f */ + {{0x9e, 0xad, 0x67, 0x56, 0xb2, 0x31, 0x1e, 0x55, }}, /* Byte value: 0x60 */ + {{0xcb, 0xda, 0x9c, 0x32, 0x6e, 0xae, 0x0a, 0x33, }}, /* Byte value: 0x61 */ + {{0x65, 0xe6, 0x51, 0x39, 0xf2, 0x68, 0x80, 0x46, }}, /* Byte value: 0x62 */ + {{0x51, 0xa5, 0x03, 0xa7, 0x3b, 0xa4, 0xb6, 0xdf, }}, /* Byte value: 0x63 */ + {{0xcc, 0xb4, 0x26, 0x31, 0x52, 0x17, 0x30, 0x88, }}, /* Byte value: 0x64 */ + {{0x48, 0xd9, 0x68, 0x28, 0x65, 0x40, 0x35, 0x70, }}, /* Byte value: 0x65 */ + {{0x78, 0x48, 0xc2, 0x75, 0x4b, 0xb7, 0xa1, 0x50, }}, /* Byte value: 0x66 */ + {{0xf5, 0x97, 0x81, 0x69, 0x38, 0xe8, 0xea, 0xa6, }}, /* Byte value: 0x67 */ + {{0xc2, 0x68, 0x91, 0x37, 0x2a, 0xa6, 0x44, 0x3d, }}, /* Byte value: 0x68 */ + {{0xa6, 0x5b, 0xfe, 0x4e, 0x91, 0xb0, 0x0d, 0xc4, }}, /* Byte value: 0x69 */ + {{0x0b, 0xdb, 0x71, 0x85, 0xd6, 0xf4, 0x1f, 0xb3, }}, /* Byte value: 0x6a */ + {{0x14, 0x1c, 0x9e, 0x49, 0xfd, 0xd7, 0x6f, 0x18, }}, /* Byte value: 0x6b */ + {{0x3b, 0x4a, 0xdb, 0xd8, 0xf8, 0x03, 0x8b, 0x93, }}, /* Byte value: 0x6c */ + {{0xe0, 0x5e, 0x21, 0x60, 0x8c, 0x41, 0x4c, 0x01, }}, /* Byte value: 0x6d */ + {{0xb5, 0x29, 0xda, 0x04, 0x50, 0xde, 0x58, 0x67, }}, /* Byte value: 0x6e */ + {{0x58, 0x17, 0x0e, 0xa2, 0x7f, 0xac, 0xf8, 0xd1, }}, /* Byte value: 0x6f */ + {{0x4f, 0xb7, 0xd2, 0x2b, 0x59, 0xf9, 0x0f, 0xcb, }}, /* Byte value: 0x70 */ + {{0x27, 0x31, 0x76, 0xd4, 0x08, 0xa2, 0x63, 0x3a, }}, /* Byte value: 0x71 */ + {{0x7a, 0x21, 0xbe, 0xf5, 0xd9, 0x4b, 0xf0, 0xed, }}, /* Byte value: 0x72 */ + {{0xd0, 0xcf, 0x8b, 0x3d, 0xa2, 0xb6, 0xd8, 0x21, }}, /* Byte value: 0x73 */ + {{0x9f, 0x78, 0x59, 0x16, 0xfb, 0x4f, 0xd7, 0xea, }}, /* Byte value: 0x74 */ + {{0x9b, 0xaa, 0xa1, 0xd5, 0x1c, 0x74, 0x75, 0x53, }}, /* Byte value: 0x75 */ + {{0x66, 0x5a, 0x13, 0xf9, 0x29, 0xea, 0x18, 0x44, }}, /* Byte value: 0x76 */ + {{0x24, 0x8d, 0x34, 0x14, 0xd3, 0x20, 0xfb, 0x38, }}, /* Byte value: 0x77 */ + {{0x16, 0x75, 0xe2, 0xc9, 0x6f, 0x2b, 0x3e, 0xa5, }}, /* Byte value: 0x78 */ + {{0xad, 0x80, 0x8f, 0xcb, 0x47, 0x44, 0x12, 0x77, }}, /* Byte value: 0x79 */ + {{0x47, 0xd0, 0xe1, 0x6e, 0x54, 0x8f, 0x88, 0x7a, }}, /* Byte value: 0x7a */ + {{0x0a, 0x0e, 0x4f, 0xc5, 0x9f, 0x8a, 0xd6, 0x0c, }}, /* Byte value: 0x7b */ + {{0x18, 0xa9, 0x55, 0xcf, 0x17, 0x9a, 0x4a, 0x10, }}, /* Byte value: 0x7c */ + {{0x8f, 0xb6, 0x3f, 0x9c, 0xe1, 0xa3, 0x1a, 0x4b, }}, /* Byte value: 0x7d */ + {{0xfc, 0x25, 0x8c, 0x6c, 0x7c, 0xe0, 0xa4, 0xa8, }}, /* Byte value: 0x7e */ + {{0x70, 0x2f, 0xf1, 0x30, 0x46, 0xc1, 0x26, 0xe1, }}, /* Byte value: 0x7f */ + {{0x32, 0xf8, 0xd6, 0xdd, 0xbc, 0x0b, 0xc5, 0x9d, }}, /* Byte value: 0x80 */ + {{0xe1, 0x8b, 0x1f, 0x20, 0xc5, 0x3f, 0x85, 0xbe, }}, /* Byte value: 0x81 */ + {{0xe5, 0x59, 0xe7, 0xe3, 0x22, 0x04, 0x27, 0x07, }}, /* Byte value: 0x82 */ + {{0x4b, 0x65, 0x2a, 0xe8, 0xbe, 0xc2, 0xad, 0x72, }}, /* Byte value: 0x83 */ + {{0xf0, 0x90, 0x47, 0xea, 0x96, 0xad, 0x81, 0xa0, }}, /* Byte value: 0x84 */ + {{0x85, 0xb8, 0x70, 0x59, 0x7e, 0x29, 0xcc, 0x47, }}, /* Byte value: 0x85 */ + {{0x46, 0x05, 0xdf, 0x2e, 0x1d, 0xf1, 0x41, 0xc5, }}, /* Byte value: 0x86 */ + {{0x1d, 0xae, 0x93, 0x4c, 0xb9, 0xdf, 0x21, 0x16, }}, /* Byte value: 0x87 */ + {{0x73, 0x93, 0xb3, 0xf0, 0x9d, 0x43, 0xbe, 0xe3, }}, /* Byte value: 0x88 */ + {{0xa1, 0x35, 0x44, 0x4d, 0xad, 0x09, 0x37, 0x7f, }}, /* Byte value: 0x89 */ + {{0xb2, 0x47, 0x60, 0x07, 0x6c, 0x67, 0x62, 0xdc, }}, /* Byte value: 0x8a */ + {{0x1a, 0xc0, 0x29, 0x4f, 0x85, 0x66, 0x1b, 0xad, }}, /* Byte value: 0x8b */ + {{0x5d, 0x10, 0xc8, 0x21, 0xd1, 0xe9, 0x93, 0xd7, }}, /* Byte value: 0x8c */ + {{0xe2, 0x37, 0x5d, 0xe0, 0x1e, 0xbd, 0x1d, 0xbc, }}, /* Byte value: 0x8d */ + {{0x86, 0x04, 0x32, 0x99, 0xa5, 0xab, 0x54, 0x45, }}, /* Byte value: 0x8e */ + {{0xd9, 0x7d, 0x86, 0x38, 0xe6, 0xbe, 0x96, 0x2f, }}, /* Byte value: 0x8f */ + {{0x30, 0x91, 0xaa, 0x5d, 0x2e, 0xf7, 0x94, 0x20, }}, /* Byte value: 0x90 */ + {{0xc4, 0xd3, 0x15, 0x74, 0x5f, 0x61, 0xb7, 0x39, }}, /* Byte value: 0x91 */ + {{0xba, 0x20, 0x53, 0x42, 0x61, 0x11, 0xe5, 0x6d, }}, /* Byte value: 0x92 */ + {{0x91, 0xa4, 0xee, 0x10, 0x83, 0xfe, 0xa3, 0x5f, }}, /* Byte value: 0x93 */ + {{0x09, 0xb2, 0x0d, 0x05, 0x44, 0x08, 0x4e, 0x0e, }}, /* Byte value: 0x94 */ + {{0x3a, 0x9f, 0xe5, 0x98, 0xb1, 0x7d, 0x42, 0x2c, }}, /* Byte value: 0x95 */ + {{0x23, 0xe3, 0x8e, 0x17, 0xef, 0x99, 0xc1, 0x83, }}, /* Byte value: 0x96 */ + {{0x4c, 0x0b, 0x90, 0xeb, 0x82, 0x7b, 0x97, 0xc9, }}, /* Byte value: 0x97 */ + {{0x59, 0xc2, 0x30, 0xe2, 0x36, 0xd2, 0x31, 0x6e, }}, /* Byte value: 0x98 */ + {{0x0d, 0x60, 0xf5, 0xc6, 0xa3, 0x33, 0xec, 0xb7, }}, /* Byte value: 0x99 */ + {{0xd8, 0xa8, 0xb8, 0x78, 0xaf, 0xc0, 0x5f, 0x90, }}, /* Byte value: 0x9a */ + {{0x12, 0xa7, 0x1a, 0x0a, 0x88, 0x10, 0x9c, 0x1c, }}, /* Byte value: 0x9b */ + {{0xcf, 0x08, 0x64, 0xf1, 0x89, 0x95, 0xa8, 0x8a, }}, /* Byte value: 0x9c */ + {{0x71, 0xfa, 0xcf, 0x70, 0x0f, 0xbf, 0xef, 0x5e, }}, /* Byte value: 0x9d */ + {{0x3f, 0x98, 0x23, 0x1b, 0x1f, 0x38, 0x29, 0x2a, }}, /* Byte value: 0x9e */ + {{0x82, 0xd6, 0xca, 0x5a, 0x42, 0x90, 0xf6, 0xfc, }}, /* Byte value: 0x9f */ + {{0x97, 0x1f, 0x6a, 0x53, 0xf6, 0x39, 0x50, 0x5b, }}, /* Byte value: 0xa0 */ + {{0xf1, 0x45, 0x79, 0xaa, 0xdf, 0xd3, 0x48, 0x1f, }}, /* Byte value: 0xa1 */ + {{0x8c, 0x0a, 0x7d, 0x5c, 0x3a, 0x21, 0x82, 0x49, }}, /* Byte value: 0xa2 */ + {{0x13, 0x72, 0x24, 0x4a, 0xc1, 0x6e, 0x55, 0xa3, }}, /* Byte value: 0xa3 */ + {{0xbb, 0xf5, 0x6d, 0x02, 0x28, 0x6f, 0x2c, 0xd2, }}, /* Byte value: 0xa4 */ + {{0xc1, 0xd4, 0xd3, 0xf7, 0xf1, 0x24, 0xdc, 0x3f, }}, /* Byte value: 0xa5 */ + {{0x4d, 0xde, 0xae, 0xab, 0xcb, 0x05, 0x5e, 0x76, }}, /* Byte value: 0xa6 */ + {{0x02, 0x69, 0x7c, 0x80, 0x92, 0xfc, 0x51, 0xbd, }}, /* Byte value: 0xa7 */ + {{0x63, 0x5d, 0xd5, 0x7a, 0x87, 0xaf, 0x73, 0x42, }}, /* Byte value: 0xa8 */ + {{0x04, 0xd2, 0xf8, 0xc3, 0xe7, 0x3b, 0xa2, 0xb9, }}, /* Byte value: 0xa9 */ + {{0x7e, 0xf3, 0x46, 0x36, 0x3e, 0x70, 0x52, 0x54, }}, /* Byte value: 0xaa */ + {{0x42, 0xd7, 0x27, 0xed, 0xfa, 0xca, 0xe3, 0x7c, }}, /* Byte value: 0xab */ + {{0x08, 0x67, 0x33, 0x45, 0x0d, 0x76, 0x87, 0xb1, }}, /* Byte value: 0xac */ + {{0x68, 0x86, 0xa4, 0xff, 0x51, 0x5b, 0x6c, 0xf1, }}, /* Byte value: 0xad */ + {{0x6c, 0x54, 0x5c, 0x3c, 0xb6, 0x60, 0xce, 0x48, }}, /* Byte value: 0xae */ + {{0xaa, 0xee, 0x35, 0xc8, 0x7b, 0xfd, 0x28, 0xcc, }}, /* Byte value: 0xaf */ + {{0xdb, 0x14, 0xfa, 0xb8, 0x74, 0x42, 0xc7, 0x92, }}, /* Byte value: 0xb0 */ + {{0xa3, 0x5c, 0x38, 0xcd, 0x3f, 0xf5, 0x66, 0xc2, }}, /* Byte value: 0xb1 */ + {{0xed, 0x3e, 0xd4, 0xa6, 0x2f, 0x72, 0xa0, 0xb6, }}, /* Byte value: 0xb2 */ + {{0x21, 0x8a, 0xf2, 0x97, 0x7d, 0x65, 0x90, 0x3e, }}, /* Byte value: 0xb3 */ + {{0x64, 0x33, 0x6f, 0x79, 0xbb, 0x16, 0x49, 0xf9, }}, /* Byte value: 0xb4 */ + {{0x01, 0xd5, 0x3e, 0x40, 0x49, 0x7e, 0xc9, 0xbf, }}, /* Byte value: 0xb5 */ + {{0x1f, 0xc7, 0xef, 0xcc, 0x2b, 0x23, 0x70, 0xab, }}, /* Byte value: 0xb6 */ + {{0x81, 0x6a, 0x88, 0x9a, 0x99, 0x12, 0x6e, 0xfe, }}, /* Byte value: 0xb7 */ + {{0x79, 0x9d, 0xfc, 0x35, 0x02, 0xc9, 0x68, 0xef, }}, /* Byte value: 0xb8 */ + {{0x84, 0x6d, 0x4e, 0x19, 0x37, 0x57, 0x05, 0xf8, }}, /* Byte value: 0xb9 */ + {{0x43, 0x02, 0x19, 0xad, 0xb3, 0xb4, 0x2a, 0xc3, }}, /* Byte value: 0xba */ + {{0x8d, 0xdf, 0x43, 0x1c, 0x73, 0x5f, 0x4b, 0xf6, }}, /* Byte value: 0xbb */ + {{0x95, 0x76, 0x16, 0xd3, 0x64, 0xc5, 0x01, 0xe6, }}, /* Byte value: 0xbc */ + {{0x55, 0x77, 0xfb, 0x64, 0xdc, 0x9f, 0x14, 0x66, }}, /* Byte value: 0xbd */ + {{0xa7, 0x8e, 0xc0, 0x0e, 0xd8, 0xce, 0xc4, 0x7b, }}, /* Byte value: 0xbe */ + {{0x34, 0x43, 0x52, 0x9e, 0xc9, 0xcc, 0x36, 0x99, }}, /* Byte value: 0xbf */ + {{0x2a, 0x51, 0x83, 0x12, 0xab, 0x91, 0x8f, 0x8d, }}, /* Byte value: 0xc0 */ + {{0x76, 0x94, 0x75, 0x73, 0x33, 0x06, 0xd5, 0xe5, }}, /* Byte value: 0xc1 */ + {{0xe4, 0x8c, 0xd9, 0xa3, 0x6b, 0x7a, 0xee, 0xb8, }}, /* Byte value: 0xc2 */ + {{0x1b, 0x15, 0x17, 0x0f, 0xcc, 0x18, 0xd2, 0x12, }}, /* Byte value: 0xc3 */ + {{0x7b, 0xf4, 0x80, 0xb5, 0x90, 0x35, 0x39, 0x52, }}, /* Byte value: 0xc4 */ + {{0x80, 0xbf, 0xb6, 0xda, 0xd0, 0x6c, 0xa7, 0x41, }}, /* Byte value: 0xc5 */ + {{0x7c, 0x9a, 0x3a, 0xb6, 0xac, 0x8c, 0x03, 0xe9, }}, /* Byte value: 0xc6 */ + {{0x96, 0xca, 0x54, 0x13, 0xbf, 0x47, 0x99, 0xe4, }}, /* Byte value: 0xc7 */ + {{0xde, 0x13, 0x3c, 0x3b, 0xda, 0x07, 0xac, 0x94, }}, /* Byte value: 0xc8 */ + {{0xff, 0x99, 0xce, 0xac, 0xa7, 0x62, 0x3c, 0xaa, }}, /* Byte value: 0xc9 */ + {{0x19, 0x7c, 0x6b, 0x8f, 0x5e, 0xe4, 0x83, 0xaf, }}, /* Byte value: 0xca */ + {{0x5c, 0xc5, 0xf6, 0x61, 0x98, 0x97, 0x5a, 0x68, }}, /* Byte value: 0xcb */ + {{0x77, 0x41, 0x4b, 0x33, 0x7a, 0x78, 0x1c, 0x5a, }}, /* Byte value: 0xcc */ + {{0xea, 0x50, 0x6e, 0xa5, 0x13, 0xcb, 0x9a, 0x0d, }}, /* Byte value: 0xcd */ + {{0x39, 0x23, 0xa7, 0x58, 0x6a, 0xff, 0xda, 0x2e, }}, /* Byte value: 0xce */ + {{0xfb, 0x4b, 0x36, 0x6f, 0x40, 0x59, 0x9e, 0x13, }}, /* Byte value: 0xcf */ + {{0x8e, 0x63, 0x01, 0xdc, 0xa8, 0xdd, 0xd3, 0xf4, }}, /* Byte value: 0xd0 */ + {{0x36, 0x2a, 0x2e, 0x1e, 0x5b, 0x30, 0x67, 0x24, }}, /* Byte value: 0xd1 */ + {{0xd1, 0x1a, 0xb5, 0x7d, 0xeb, 0xc8, 0x11, 0x9e, }}, /* Byte value: 0xd2 */ + {{0xec, 0xeb, 0xea, 0xe6, 0x66, 0x0c, 0x69, 0x09, }}, /* Byte value: 0xd3 */ + {{0x3e, 0x4d, 0x1d, 0x5b, 0x56, 0x46, 0xe0, 0x95, }}, /* Byte value: 0xd4 */ + {{0xe8, 0x39, 0x12, 0x25, 0x81, 0x37, 0xcb, 0xb0, }}, /* Byte value: 0xd5 */ + {{0x7f, 0x26, 0x78, 0x76, 0x77, 0x0e, 0x9b, 0xeb, }}, /* Byte value: 0xd6 */ + {{0xe3, 0xe2, 0x63, 0xa0, 0x57, 0xc3, 0xd4, 0x03, }}, /* Byte value: 0xd7 */ + {{0x57, 0x1e, 0x87, 0xe4, 0x4e, 0x63, 0x45, 0xdb, }}, /* Byte value: 0xd8 */ + {{0x3d, 0xf1, 0x5f, 0x9b, 0x8d, 0xc4, 0x78, 0x97, }}, /* Byte value: 0xd9 */ + {{0xe7, 0x30, 0x9b, 0x63, 0xb0, 0xf8, 0x76, 0xba, }}, /* Byte value: 0xda */ + {{0xb8, 0x49, 0x2f, 0xc2, 0xf3, 0xed, 0xb4, 0xd0, }}, /* Byte value: 0xdb */ + {{0x89, 0x0d, 0xbb, 0xdf, 0x94, 0x64, 0xe9, 0x4f, }}, /* Byte value: 0xdc */ + {{0x9c, 0xc4, 0x1b, 0xd6, 0x20, 0xcd, 0x4f, 0xe8, }}, /* Byte value: 0xdd */ + {{0x6e, 0x3d, 0x20, 0xbc, 0x24, 0x9c, 0x9f, 0xf5, }}, /* Byte value: 0xde */ + {{0xd6, 0x74, 0x0f, 0x7e, 0xd7, 0x71, 0x2b, 0x25, }}, /* Byte value: 0xdf */ + {{0xbc, 0x9b, 0xd7, 0x01, 0x14, 0xd6, 0x16, 0x69, }}, /* Byte value: 0xe0 */ + {{0xd7, 0xa1, 0x31, 0x3e, 0x9e, 0x0f, 0xe2, 0x9a, }}, /* Byte value: 0xe1 */ + {{0x2f, 0x56, 0x45, 0x91, 0x05, 0xd4, 0xe4, 0x8b, }}, /* Byte value: 0xe2 */ + {{0x45, 0xb9, 0x9d, 0xee, 0xc6, 0x73, 0xd9, 0xc7, }}, /* Byte value: 0xe3 */ + {{0x5a, 0x7e, 0x72, 0x22, 0xed, 0x50, 0xa9, 0x6c, }}, /* Byte value: 0xe4 */ + {{0xe9, 0xec, 0x2c, 0x65, 0xc8, 0x49, 0x02, 0x0f, }}, /* Byte value: 0xe5 */ + {{0xf8, 0xf7, 0x74, 0xaf, 0x9b, 0xdb, 0x06, 0x11, }}, /* Byte value: 0xe6 */ + {{0xef, 0x57, 0xa8, 0x26, 0xbd, 0x8e, 0xf1, 0x0b, }}, /* Byte value: 0xe7 */ + {{0xc7, 0x6f, 0x57, 0xb4, 0x84, 0xe3, 0x2f, 0x3b, }}, /* Byte value: 0xe8 */ + {{0x6a, 0xef, 0xd8, 0x7f, 0xc3, 0xa7, 0x3d, 0x4c, }}, /* Byte value: 0xe9 */ + {{0x90, 0x71, 0xd0, 0x50, 0xca, 0x80, 0x6a, 0xe0, }}, /* Byte value: 0xea */ + {{0x6b, 0x3a, 0xe6, 0x3f, 0x8a, 0xd9, 0xf4, 0xf3, }}, /* Byte value: 0xeb */ + {{0x20, 0x5f, 0xcc, 0xd7, 0x34, 0x1b, 0x59, 0x81, }}, /* Byte value: 0xec */ + {{0x17, 0xa0, 0xdc, 0x89, 0x26, 0x55, 0xf7, 0x1a, }}, /* Byte value: 0xed */ + {{0x4e, 0x62, 0xec, 0x6b, 0x10, 0x87, 0xc6, 0x74, }}, /* Byte value: 0xee */ + {{0xb3, 0x92, 0x5e, 0x47, 0x25, 0x19, 0xab, 0x63, }}, /* Byte value: 0xef */ + {{0xf6, 0x2b, 0xc3, 0xa9, 0xe3, 0x6a, 0x72, 0xa4, }}, /* Byte value: 0xf0 */ + {{0xc3, 0xbd, 0xaf, 0x77, 0x63, 0xd8, 0x8d, 0x82, }}, /* Byte value: 0xf1 */ + {{0x5e, 0xac, 0x8a, 0xe1, 0x0a, 0x6b, 0x0b, 0xd5, }}, /* Byte value: 0xf2 */ + {{0x8a, 0xb1, 0xf9, 0x1f, 0x4f, 0xe6, 0x71, 0x4d, }}, /* Byte value: 0xf3 */ + {{0xb6, 0x95, 0x98, 0xc4, 0x8b, 0x5c, 0xc0, 0x65, }}, /* Byte value: 0xf4 */ + {{0x98, 0x16, 0xe3, 0x15, 0xc7, 0xf6, 0xed, 0x51, }}, /* Byte value: 0xf5 */ + {{0x31, 0x44, 0x94, 0x1d, 0x67, 0x89, 0x5d, 0x9f, }}, /* Byte value: 0xf6 */ + {{0x94, 0xa3, 0x28, 0x93, 0x2d, 0xbb, 0xc8, 0x59, }}, /* Byte value: 0xf7 */ + {{0xb0, 0x2e, 0x1c, 0x87, 0xfe, 0x9b, 0x33, 0x61, }}, /* Byte value: 0xf8 */ + {{0xd4, 0x1d, 0x73, 0xfe, 0x45, 0x8d, 0x7a, 0x98, }}, /* Byte value: 0xf9 */ + {{0xa9, 0x52, 0x77, 0x08, 0xa0, 0x7f, 0xb0, 0xce, }}, /* Byte value: 0xfa */ + {{0x35, 0x96, 0x6c, 0xde, 0x80, 0xb2, 0xff, 0x26, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0xa5, 0xe7, 0xbc, 0x8e, 0x4a, 0x32, 0x95, 0xc6, }}, /* Byte value: 0xfd */ + {{0xfe, 0x4c, 0xf0, 0xec, 0xee, 0x1c, 0xf5, 0x15, }}, /* Byte value: 0xfe */ + {{0x2e, 0x83, 0x7b, 0xd1, 0x4c, 0xaa, 0x2d, 0x34, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 14 */ + {{0x4e, 0xe7, 0x53, 0x5d, 0xa9, 0x30, 0x47, 0x7c, }}, /* Byte value: 0x00 */ + {{0x34, 0x3f, 0x83, 0x15, 0x0b, 0x98, 0xe9, 0x1c, }}, /* Byte value: 0x01 */ + {{0x87, 0xf8, 0x58, 0xe9, 0x7f, 0xf7, 0x8f, 0x8c, }}, /* Byte value: 0x02 */ + {{0x8d, 0xb6, 0x51, 0xd3, 0x3b, 0x95, 0x4e, 0x2e, }}, /* Byte value: 0x03 */ + {{0x2d, 0xdc, 0xc1, 0xf5, 0xf1, 0x7a, 0x03, 0x9c, }}, /* Byte value: 0x04 */ + {{0x88, 0x91, 0xb4, 0xce, 0x19, 0xa4, 0xcf, 0x7f, }}, /* Byte value: 0x05 */ + {{0xb4, 0xf6, 0x82, 0x52, 0x42, 0x2b, 0x0c, 0x35, }}, /* Byte value: 0x06 */ + {{0x65, 0x01, 0x95, 0xbe, 0x64, 0xd5, 0xba, 0x3f, }}, /* Byte value: 0x07 */ + {{0x45, 0xa2, 0x04, 0xdf, 0xe7, 0x89, 0x12, 0xa4, }}, /* Byte value: 0x08 */ + {{0x84, 0xe5, 0xba, 0xe2, 0x61, 0x59, 0xf0, 0x02, }}, /* Byte value: 0x09 */ + {{0x13, 0xad, 0x4b, 0xda, 0xbe, 0x80, 0x2b, 0x22, }}, /* Byte value: 0x0a */ + {{0x52, 0x23, 0xf4, 0xa0, 0x71, 0xe3, 0x2c, 0xad, }}, /* Byte value: 0x0b */ + {{0xa3, 0x77, 0x72, 0x2d, 0xd4, 0x41, 0x32, 0x3c, }}, /* Byte value: 0x0c */ + {{0x86, 0xf3, 0x06, 0x51, 0x75, 0x2c, 0x1b, 0xf6, }}, /* Byte value: 0x0d */ + {{0x54, 0x19, 0xf3, 0xb6, 0x4d, 0x7c, 0xd2, 0x72, }}, /* Byte value: 0x0e */ + {{0xd8, 0xa4, 0xfc, 0xdd, 0x7c, 0x32, 0x08, 0x26, }}, /* Byte value: 0x0f */ + {{0xcd, 0x33, 0xb0, 0x11, 0xfe, 0x2d, 0xdd, 0xdb, }}, /* Byte value: 0x10 */ + {{0xe9, 0xbc, 0x9a, 0xd5, 0x55, 0x9b, 0x60, 0x6b, }}, /* Byte value: 0x11 */ + {{0xac, 0x1e, 0x9e, 0x0a, 0xb2, 0x12, 0x72, 0xcf, }}, /* Byte value: 0x12 */ + {{0x68, 0x7e, 0xc5, 0x2a, 0x16, 0xf3, 0x11, 0x38, }}, /* Byte value: 0x13 */ + {{0x5a, 0x7b, 0x41, 0x29, 0x21, 0xf4, 0x06, 0xfb, }}, /* Byte value: 0x14 */ + {{0xd3, 0xe1, 0xab, 0x5f, 0x32, 0x8b, 0x5d, 0xfe, }}, /* Byte value: 0x15 */ + {{0xf7, 0x6e, 0x81, 0x9b, 0x99, 0x3d, 0xe0, 0x4e, }}, /* Byte value: 0x16 */ + {{0x44, 0xa9, 0x5a, 0x67, 0xed, 0x52, 0x86, 0xde, }}, /* Byte value: 0x17 */ + {{0x16, 0x8a, 0xae, 0xc7, 0x9c, 0xb1, 0xaa, 0x73, }}, /* Byte value: 0x18 */ + {{0xa4, 0x46, 0x2b, 0x83, 0xe2, 0x05, 0x58, 0x99, }}, /* Byte value: 0x19 */ + {{0x8a, 0x87, 0x08, 0x7d, 0x0d, 0xd1, 0x24, 0x8b, }}, /* Byte value: 0x1a */ + {{0xfb, 0x1a, 0x8f, 0xb7, 0xe1, 0xc0, 0xdf, 0x33, }}, /* Byte value: 0x1b */ + {{0x2a, 0xed, 0x98, 0x5b, 0xc7, 0x3e, 0x69, 0x39, }}, /* Byte value: 0x1c */ + {{0x74, 0xba, 0x62, 0xd7, 0xce, 0x20, 0x7a, 0xe9, }}, /* Byte value: 0x1d */ + {{0xa8, 0x32, 0x25, 0xaf, 0x9a, 0xf8, 0x67, 0xe4, }}, /* Byte value: 0x1e */ + {{0x43, 0x98, 0x03, 0xc9, 0xdb, 0x16, 0xec, 0x7b, }}, /* Byte value: 0x1f */ + {{0x95, 0x5e, 0x4d, 0x8b, 0xcb, 0xac, 0x30, 0xd4, }}, /* Byte value: 0x20 */ + {{0x07, 0x31, 0x59, 0xae, 0x36, 0x44, 0x6a, 0xa5, }}, /* Byte value: 0x21 */ + {{0x82, 0xdf, 0xbd, 0xf4, 0x5d, 0xc6, 0x0e, 0xdd, }}, /* Byte value: 0x22 */ + {{0x22, 0xb5, 0x2d, 0xd2, 0x97, 0x29, 0x43, 0x6f, }}, /* Byte value: 0x23 */ + {{0x49, 0xd6, 0x0a, 0xf3, 0x9f, 0x74, 0x2d, 0xd9, }}, /* Byte value: 0x24 */ + {{0xa6, 0x50, 0x97, 0x30, 0xf6, 0x70, 0xb3, 0x6d, }}, /* Byte value: 0x25 */ + {{0x9b, 0x3c, 0xff, 0x14, 0xa7, 0x24, 0xe4, 0x5d, }}, /* Byte value: 0x26 */ + {{0xd0, 0xfc, 0x49, 0x54, 0x2c, 0x25, 0x22, 0x70, }}, /* Byte value: 0x27 */ + {{0x0d, 0x7f, 0x50, 0x94, 0x72, 0x26, 0xab, 0x07, }}, /* Byte value: 0x28 */ + {{0x3a, 0x5d, 0x31, 0x8a, 0x67, 0x10, 0x3d, 0x95, }}, /* Byte value: 0x29 */ + {{0xf9, 0x0c, 0x33, 0x04, 0xf5, 0xb5, 0x34, 0xc7, }}, /* Byte value: 0x2a */ + {{0x6d, 0x59, 0x20, 0x37, 0x34, 0xc2, 0x90, 0x69, }}, /* Byte value: 0x2b */ + {{0x2c, 0xd7, 0x9f, 0x4d, 0xfb, 0xa1, 0x97, 0xe6, }}, /* Byte value: 0x2c */ + {{0x8b, 0x8c, 0x56, 0xc5, 0x07, 0x0a, 0xb0, 0xf1, }}, /* Byte value: 0x2d */ + {{0x80, 0xc9, 0x01, 0x47, 0x49, 0xb3, 0xe5, 0x29, }}, /* Byte value: 0x2e */ + {{0x39, 0x40, 0xd3, 0x81, 0x79, 0xbe, 0x42, 0x1b, }}, /* Byte value: 0x2f */ + {{0x59, 0x66, 0xa3, 0x22, 0x3f, 0x5a, 0x79, 0x75, }}, /* Byte value: 0x30 */ + {{0x11, 0xbb, 0xf7, 0x69, 0xaa, 0xf5, 0xc0, 0xd6, }}, /* Byte value: 0x31 */ + {{0xab, 0x2f, 0xc7, 0xa4, 0x84, 0x56, 0x18, 0x6a, }}, /* Byte value: 0x32 */ + {{0xfa, 0x11, 0xd1, 0x0f, 0xeb, 0x1b, 0x4b, 0x49, }}, /* Byte value: 0x33 */ + {{0xc5, 0x6b, 0x05, 0x98, 0xae, 0x3a, 0xf7, 0x8d, }}, /* Byte value: 0x34 */ + {{0x53, 0x28, 0xaa, 0x18, 0x7b, 0x38, 0xb8, 0xd7, }}, /* Byte value: 0x35 */ + {{0xa2, 0x7c, 0x2c, 0x95, 0xde, 0x9a, 0xa6, 0x46, }}, /* Byte value: 0x36 */ + {{0xbf, 0xb3, 0xd5, 0xd0, 0x0c, 0x92, 0x59, 0xed, }}, /* Byte value: 0x37 */ + {{0x85, 0xee, 0xe4, 0x5a, 0x6b, 0x82, 0x64, 0x78, }}, /* Byte value: 0x38 */ + {{0xcf, 0x25, 0x0c, 0xa2, 0xea, 0x58, 0x36, 0x2f, }}, /* Byte value: 0x39 */ + {{0xe7, 0xde, 0x28, 0x4a, 0x39, 0x13, 0xb4, 0xe2, }}, /* Byte value: 0x3a */ + {{0x05, 0x27, 0xe5, 0x1d, 0x22, 0x31, 0x81, 0x51, }}, /* Byte value: 0x3b */ + {{0xc3, 0x51, 0x02, 0x8e, 0x92, 0xa5, 0x09, 0x52, }}, /* Byte value: 0x3c */ + {{0x42, 0x93, 0x5d, 0x71, 0xd1, 0xcd, 0x78, 0x01, }}, /* Byte value: 0x3d */ + {{0x58, 0x6d, 0xfd, 0x9a, 0x35, 0x81, 0xed, 0x0f, }}, /* Byte value: 0x3e */ + {{0xe5, 0xc8, 0x94, 0xf9, 0x2d, 0x66, 0x5f, 0x16, }}, /* Byte value: 0x3f */ + {{0x8c, 0xbd, 0x0f, 0x6b, 0x31, 0x4e, 0xda, 0x54, }}, /* Byte value: 0x40 */ + {{0x7d, 0xe9, 0x89, 0xe6, 0x94, 0xec, 0xc4, 0xc5, }}, /* Byte value: 0x41 */ + {{0x25, 0x84, 0x74, 0x7c, 0xa1, 0x6d, 0x29, 0xca, }}, /* Byte value: 0x42 */ + {{0x57, 0x04, 0x11, 0xbd, 0x53, 0xd2, 0xad, 0xfc, }}, /* Byte value: 0x43 */ + {{0x41, 0x8e, 0xbf, 0x7a, 0xcf, 0x63, 0x07, 0x8f, }}, /* Byte value: 0x44 */ + {{0x28, 0xfb, 0x24, 0xe8, 0xd3, 0x4b, 0x82, 0xcd, }}, /* Byte value: 0x45 */ + {{0xc1, 0x47, 0xbe, 0x3d, 0x86, 0xd0, 0xe2, 0xa6, }}, /* Byte value: 0x46 */ + {{0x8e, 0xab, 0xb3, 0xd8, 0x25, 0x3b, 0x31, 0xa0, }}, /* Byte value: 0x47 */ + {{0x32, 0x05, 0x84, 0x03, 0x37, 0x07, 0x17, 0xc3, }}, /* Byte value: 0x48 */ + {{0xf4, 0x73, 0x63, 0x90, 0x87, 0x93, 0x9f, 0xc0, }}, /* Byte value: 0x49 */ + {{0xf5, 0x78, 0x3d, 0x28, 0x8d, 0x48, 0x0b, 0xba, }}, /* Byte value: 0x4a */ + {{0x29, 0xf0, 0x7a, 0x50, 0xd9, 0x90, 0x16, 0xb7, }}, /* Byte value: 0x4b */ + {{0x03, 0x1d, 0xe2, 0x0b, 0x1e, 0xae, 0x7f, 0x8e, }}, /* Byte value: 0x4c */ + {{0xcb, 0x09, 0xb7, 0x07, 0xc2, 0xb2, 0x23, 0x04, }}, /* Byte value: 0x4d */ + {{0x1c, 0xc4, 0xa7, 0xfd, 0xd8, 0xd3, 0x6b, 0xd1, }}, /* Byte value: 0x4e */ + {{0x3b, 0x56, 0x6f, 0x32, 0x6d, 0xcb, 0xa9, 0xef, }}, /* Byte value: 0x4f */ + {{0xeb, 0xaa, 0x26, 0x66, 0x41, 0xee, 0x8b, 0x9f, }}, /* Byte value: 0x50 */ + {{0xca, 0x02, 0xe9, 0xbf, 0xc8, 0x69, 0xb7, 0x7e, }}, /* Byte value: 0x51 */ + {{0x5e, 0x57, 0xfa, 0x8c, 0x09, 0x1e, 0x13, 0xd0, }}, /* Byte value: 0x52 */ + {{0xc7, 0x7d, 0xb9, 0x2b, 0xba, 0x4f, 0x1c, 0x79, }}, /* Byte value: 0x53 */ + {{0x71, 0x9d, 0x87, 0xca, 0xec, 0x11, 0xfb, 0xb8, }}, /* Byte value: 0x54 */ + {{0xdf, 0x95, 0xa5, 0x73, 0x4a, 0x76, 0x62, 0x83, }}, /* Byte value: 0x55 */ + {{0xb2, 0xcc, 0x85, 0x44, 0x7e, 0xb4, 0xf2, 0xea, }}, /* Byte value: 0x56 */ + {{0x60, 0x26, 0x70, 0xa3, 0x46, 0xe4, 0x3b, 0x6e, }}, /* Byte value: 0x57 */ + {{0x83, 0xd4, 0xe3, 0x4c, 0x57, 0x1d, 0x9a, 0xa7, }}, /* Byte value: 0x58 */ + {{0xed, 0x90, 0x21, 0x70, 0x7d, 0x71, 0x75, 0x40, }}, /* Byte value: 0x59 */ + {{0x19, 0xe3, 0x42, 0xe0, 0xfa, 0xe2, 0xea, 0x80, }}, /* Byte value: 0x5a */ + {{0x62, 0x30, 0xcc, 0x10, 0x52, 0x91, 0xd0, 0x9a, }}, /* Byte value: 0x5b */ + {{0x08, 0x58, 0xb5, 0x89, 0x50, 0x17, 0x2a, 0x56, }}, /* Byte value: 0x5c */ + {{0x76, 0xac, 0xde, 0x64, 0xda, 0x55, 0x91, 0x1d, }}, /* Byte value: 0x5d */ + {{0x36, 0x29, 0x3f, 0xa6, 0x1f, 0xed, 0x02, 0xe8, }}, /* Byte value: 0x5e */ + {{0x55, 0x12, 0xad, 0x0e, 0x47, 0xa7, 0x46, 0x08, }}, /* Byte value: 0x5f */ + {{0xb9, 0x89, 0xd2, 0xc6, 0x30, 0x0d, 0xa7, 0x32, }}, /* Byte value: 0x60 */ + {{0xd6, 0xc6, 0x4e, 0x42, 0x10, 0xba, 0xdc, 0xaf, }}, /* Byte value: 0x61 */ + {{0xa7, 0x5b, 0xc9, 0x88, 0xfc, 0xab, 0x27, 0x17, }}, /* Byte value: 0x62 */ + {{0xc0, 0x4c, 0xe0, 0x85, 0x8c, 0x0b, 0x76, 0xdc, }}, /* Byte value: 0x63 */ + {{0x94, 0x55, 0x13, 0x33, 0xc1, 0x77, 0xa4, 0xae, }}, /* Byte value: 0x64 */ + {{0xff, 0x36, 0x34, 0x12, 0xc9, 0x2a, 0xca, 0x18, }}, /* Byte value: 0x65 */ + {{0x37, 0x22, 0x61, 0x1e, 0x15, 0x36, 0x96, 0x92, }}, /* Byte value: 0x66 */ + {{0x9a, 0x37, 0xa1, 0xac, 0xad, 0xff, 0x70, 0x27, }}, /* Byte value: 0x67 */ + {{0x10, 0xb0, 0xa9, 0xd1, 0xa0, 0x2e, 0x54, 0xac, }}, /* Byte value: 0x68 */ + {{0xec, 0x9b, 0x7f, 0xc8, 0x77, 0xaa, 0xe1, 0x3a, }}, /* Byte value: 0x69 */ + {{0x70, 0x96, 0xd9, 0x72, 0xe6, 0xca, 0x6f, 0xc2, }}, /* Byte value: 0x6a */ + {{0x56, 0x0f, 0x4f, 0x05, 0x59, 0x09, 0x39, 0x86, }}, /* Byte value: 0x6b */ + {{0xb8, 0x82, 0x8c, 0x7e, 0x3a, 0xd6, 0x33, 0x48, }}, /* Byte value: 0x6c */ + {{0x97, 0x48, 0xf1, 0x38, 0xdf, 0xd9, 0xdb, 0x20, }}, /* Byte value: 0x6d */ + {{0xf8, 0x07, 0x6d, 0xbc, 0xff, 0x6e, 0xa0, 0xbd, }}, /* Byte value: 0x6e */ + {{0x06, 0x3a, 0x07, 0x16, 0x3c, 0x9f, 0xfe, 0xdf, }}, /* Byte value: 0x6f */ + {{0xbd, 0xa5, 0x69, 0x63, 0x18, 0xe7, 0xb2, 0x19, }}, /* Byte value: 0x70 */ + {{0x73, 0x8b, 0x3b, 0x79, 0xf8, 0x64, 0x10, 0x4c, }}, /* Byte value: 0x71 */ + {{0x81, 0xc2, 0x5f, 0xff, 0x43, 0x68, 0x71, 0x53, }}, /* Byte value: 0x72 */ + {{0x5f, 0x5c, 0xa4, 0x34, 0x03, 0xc5, 0x87, 0xaa, }}, /* Byte value: 0x73 */ + {{0xe2, 0xf9, 0xcd, 0x57, 0x1b, 0x22, 0x35, 0xb3, }}, /* Byte value: 0x74 */ + {{0x4d, 0xfa, 0xb1, 0x56, 0xb7, 0x9e, 0x38, 0xf2, }}, /* Byte value: 0x75 */ + {{0x4a, 0xcb, 0xe8, 0xf8, 0x81, 0xda, 0x52, 0x57, }}, /* Byte value: 0x76 */ + {{0x9e, 0x1b, 0x1a, 0x09, 0x85, 0x15, 0x65, 0x0c, }}, /* Byte value: 0x77 */ + {{0xe0, 0xef, 0x71, 0xe4, 0x0f, 0x57, 0xde, 0x47, }}, /* Byte value: 0x78 */ + {{0x9c, 0x0d, 0xa6, 0xba, 0x91, 0x60, 0x8e, 0xf8, }}, /* Byte value: 0x79 */ + {{0x20, 0xa3, 0x91, 0x61, 0x83, 0x5c, 0xa8, 0x9b, }}, /* Byte value: 0x7a */ + {{0x2b, 0xe6, 0xc6, 0xe3, 0xcd, 0xe5, 0xfd, 0x43, }}, /* Byte value: 0x7b */ + {{0x64, 0x0a, 0xcb, 0x06, 0x6e, 0x0e, 0x2e, 0x45, }}, /* Byte value: 0x7c */ + {{0x1b, 0xf5, 0xfe, 0x53, 0xee, 0x97, 0x01, 0x74, }}, /* Byte value: 0x7d */ + {{0x5c, 0x41, 0x46, 0x3f, 0x1d, 0x6b, 0xf8, 0x24, }}, /* Byte value: 0x7e */ + {{0xaa, 0x24, 0x99, 0x1c, 0x8e, 0x8d, 0x8c, 0x10, }}, /* Byte value: 0x7f */ + {{0x7e, 0xf4, 0x6b, 0xed, 0x8a, 0x42, 0xbb, 0x4b, }}, /* Byte value: 0x80 */ + {{0xcc, 0x38, 0xee, 0xa9, 0xf4, 0xf6, 0x49, 0xa1, }}, /* Byte value: 0x81 */ + {{0x63, 0x3b, 0x92, 0xa8, 0x58, 0x4a, 0x44, 0xe0, }}, /* Byte value: 0x82 */ + {{0x12, 0xa6, 0x15, 0x62, 0xb4, 0x5b, 0xbf, 0x58, }}, /* Byte value: 0x83 */ + {{0x6e, 0x44, 0xc2, 0x3c, 0x2a, 0x6c, 0xef, 0xe7, }}, /* Byte value: 0x84 */ + {{0x30, 0x13, 0x38, 0xb0, 0x23, 0x72, 0xfc, 0x37, }}, /* Byte value: 0x85 */ + {{0x7b, 0xd3, 0x8e, 0xf0, 0xa8, 0x73, 0x3a, 0x1a, }}, /* Byte value: 0x86 */ + {{0x90, 0x79, 0xa8, 0x96, 0xe9, 0x9d, 0xb1, 0x85, }}, /* Byte value: 0x87 */ + {{0x47, 0xb4, 0xb8, 0x6c, 0xf3, 0xfc, 0xf9, 0x50, }}, /* Byte value: 0x88 */ + {{0xae, 0x08, 0x22, 0xb9, 0xa6, 0x67, 0x99, 0x3b, }}, /* Byte value: 0x89 */ + {{0xba, 0x94, 0x30, 0xcd, 0x2e, 0xa3, 0xd8, 0xbc, }}, /* Byte value: 0x8a */ + {{0xd2, 0xea, 0xf5, 0xe7, 0x38, 0x50, 0xc9, 0x84, }}, /* Byte value: 0x8b */ + {{0xf2, 0x49, 0x64, 0x86, 0xbb, 0x0c, 0x61, 0x1f, }}, /* Byte value: 0x8c */ + {{0x21, 0xa8, 0xcf, 0xd9, 0x89, 0x87, 0x3c, 0xe1, }}, /* Byte value: 0x8d */ + {{0xdd, 0x83, 0x19, 0xc0, 0x5e, 0x03, 0x89, 0x77, }}, /* Byte value: 0x8e */ + {{0x99, 0x2a, 0x43, 0xa7, 0xb3, 0x51, 0x0f, 0xa9, }}, /* Byte value: 0x8f */ + {{0xc8, 0x14, 0x55, 0x0c, 0xdc, 0x1c, 0x5c, 0x8a, }}, /* Byte value: 0x90 */ + {{0x09, 0x53, 0xeb, 0x31, 0x5a, 0xcc, 0xbe, 0x2c, }}, /* Byte value: 0x91 */ + {{0x27, 0x92, 0xc8, 0xcf, 0xb5, 0x18, 0xc2, 0x3e, }}, /* Byte value: 0x92 */ + {{0x66, 0x1c, 0x77, 0xb5, 0x7a, 0x7b, 0xc5, 0xb1, }}, /* Byte value: 0x93 */ + {{0xc6, 0x76, 0xe7, 0x93, 0xb0, 0x94, 0x88, 0x03, }}, /* Byte value: 0x94 */ + {{0xe3, 0xf2, 0x93, 0xef, 0x11, 0xf9, 0xa1, 0xc9, }}, /* Byte value: 0x95 */ + {{0xdc, 0x88, 0x47, 0x78, 0x54, 0xd8, 0x1d, 0x0d, }}, /* Byte value: 0x96 */ + {{0x50, 0x35, 0x48, 0x13, 0x65, 0x96, 0xc7, 0x59, }}, /* Byte value: 0x97 */ + {{0x5d, 0x4a, 0x18, 0x87, 0x17, 0xb0, 0x6c, 0x5e, }}, /* Byte value: 0x98 */ + {{0x69, 0x75, 0x9b, 0x92, 0x1c, 0x28, 0x85, 0x42, }}, /* Byte value: 0x99 */ + {{0xc2, 0x5a, 0x5c, 0x36, 0x98, 0x7e, 0x9d, 0x28, }}, /* Byte value: 0x9a */ + {{0x4f, 0xec, 0x0d, 0xe5, 0xa3, 0xeb, 0xd3, 0x06, }}, /* Byte value: 0x9b */ + {{0x79, 0xc5, 0x32, 0x43, 0xbc, 0x06, 0xd1, 0xee, }}, /* Byte value: 0x9c */ + {{0xf1, 0x54, 0x86, 0x8d, 0xa5, 0xa2, 0x1e, 0x91, }}, /* Byte value: 0x9d */ + {{0x17, 0x81, 0xf0, 0x7f, 0x96, 0x6a, 0x3e, 0x09, }}, /* Byte value: 0x9e */ + {{0x72, 0x80, 0x65, 0xc1, 0xf2, 0xbf, 0x84, 0x36, }}, /* Byte value: 0x9f */ + {{0x7f, 0xff, 0x35, 0x55, 0x80, 0x99, 0x2f, 0x31, }}, /* Byte value: 0xa0 */ + {{0x35, 0x34, 0xdd, 0xad, 0x01, 0x43, 0x7d, 0x66, }}, /* Byte value: 0xa1 */ + {{0xf6, 0x65, 0xdf, 0x23, 0x93, 0xe6, 0x74, 0x34, }}, /* Byte value: 0xa2 */ + {{0x14, 0x9c, 0x12, 0x74, 0x88, 0xc4, 0x41, 0x87, }}, /* Byte value: 0xa3 */ + {{0x7c, 0xe2, 0xd7, 0x5e, 0x9e, 0x37, 0x50, 0xbf, }}, /* Byte value: 0xa4 */ + {{0xfd, 0x20, 0x88, 0xa1, 0xdd, 0x5f, 0x21, 0xec, }}, /* Byte value: 0xa5 */ + {{0x0b, 0x45, 0x57, 0x82, 0x4e, 0xb9, 0x55, 0xd8, }}, /* Byte value: 0xa6 */ + {{0xb6, 0xe0, 0x3e, 0xe1, 0x56, 0x5e, 0xe7, 0xc1, }}, /* Byte value: 0xa7 */ + {{0xbe, 0xb8, 0x8b, 0x68, 0x06, 0x49, 0xcd, 0x97, }}, /* Byte value: 0xa8 */ + {{0xaf, 0x03, 0x7c, 0x01, 0xac, 0xbc, 0x0d, 0x41, }}, /* Byte value: 0xa9 */ + {{0x2e, 0xc1, 0x23, 0xfe, 0xef, 0xd4, 0x7c, 0x12, }}, /* Byte value: 0xaa */ + {{0xd4, 0xd0, 0xf2, 0xf1, 0x04, 0xcf, 0x37, 0x5b, }}, /* Byte value: 0xab */ + {{0x9d, 0x06, 0xf8, 0x02, 0x9b, 0xbb, 0x1a, 0x82, }}, /* Byte value: 0xac */ + {{0xce, 0x2e, 0x52, 0x1a, 0xe0, 0x83, 0xa2, 0x55, }}, /* Byte value: 0xad */ + {{0x61, 0x2d, 0x2e, 0x1b, 0x4c, 0x3f, 0xaf, 0x14, }}, /* Byte value: 0xae */ + {{0xde, 0x9e, 0xfb, 0xcb, 0x40, 0xad, 0xf6, 0xf9, }}, /* Byte value: 0xaf */ + {{0x2f, 0xca, 0x7d, 0x46, 0xe5, 0x0f, 0xe8, 0x68, }}, /* Byte value: 0xb0 */ + {{0x18, 0xe8, 0x1c, 0x58, 0xf0, 0x39, 0x7e, 0xfa, }}, /* Byte value: 0xb1 */ + {{0xfe, 0x3d, 0x6a, 0xaa, 0xc3, 0xf1, 0x5e, 0x62, }}, /* Byte value: 0xb2 */ + {{0x6a, 0x68, 0x79, 0x99, 0x02, 0x86, 0xfa, 0xcc, }}, /* Byte value: 0xb3 */ + {{0xfc, 0x2b, 0xd6, 0x19, 0xd7, 0x84, 0xb5, 0x96, }}, /* Byte value: 0xb4 */ + {{0x5b, 0x70, 0x1f, 0x91, 0x2b, 0x2f, 0x92, 0x81, }}, /* Byte value: 0xb5 */ + {{0x26, 0x99, 0x96, 0x77, 0xbf, 0xc3, 0x56, 0x44, }}, /* Byte value: 0xb6 */ + {{0x9f, 0x10, 0x44, 0xb1, 0x8f, 0xce, 0xf1, 0x76, }}, /* Byte value: 0xb7 */ + {{0x6c, 0x52, 0x7e, 0x8f, 0x3e, 0x19, 0x04, 0x13, }}, /* Byte value: 0xb8 */ + {{0x6b, 0x63, 0x27, 0x21, 0x08, 0x5d, 0x6e, 0xb6, }}, /* Byte value: 0xb9 */ + {{0x8f, 0xa0, 0xed, 0x60, 0x2f, 0xe0, 0xa5, 0xda, }}, /* Byte value: 0xba */ + {{0xad, 0x15, 0xc0, 0xb2, 0xb8, 0xc9, 0xe6, 0xb5, }}, /* Byte value: 0xbb */ + {{0xc9, 0x1f, 0x0b, 0xb4, 0xd6, 0xc7, 0xc8, 0xf0, }}, /* Byte value: 0xbc */ + {{0x6f, 0x4f, 0x9c, 0x84, 0x20, 0xb7, 0x7b, 0x9d, }}, /* Byte value: 0xbd */ + {{0xb7, 0xeb, 0x60, 0x59, 0x5c, 0x85, 0x73, 0xbb, }}, /* Byte value: 0xbe */ + {{0x67, 0x17, 0x29, 0x0d, 0x70, 0xa0, 0x51, 0xcb, }}, /* Byte value: 0xbf */ + {{0x1a, 0xfe, 0xa0, 0xeb, 0xe4, 0x4c, 0x95, 0x0e, }}, /* Byte value: 0xc0 */ + {{0xb3, 0xc7, 0xdb, 0xfc, 0x74, 0x6f, 0x66, 0x90, }}, /* Byte value: 0xc1 */ + {{0x38, 0x4b, 0x8d, 0x39, 0x73, 0x65, 0xd6, 0x61, }}, /* Byte value: 0xc2 */ + {{0x89, 0x9a, 0xea, 0x76, 0x13, 0x7f, 0x5b, 0x05, }}, /* Byte value: 0xc3 */ + {{0xda, 0xb2, 0x40, 0x6e, 0x68, 0x47, 0xe3, 0xd2, }}, /* Byte value: 0xc4 */ + {{0xc4, 0x60, 0x5b, 0x20, 0xa4, 0xe1, 0x63, 0xf7, }}, /* Byte value: 0xc5 */ + {{0x98, 0x21, 0x1d, 0x1f, 0xb9, 0x8a, 0x9b, 0xd3, }}, /* Byte value: 0xc6 */ + {{0x24, 0x8f, 0x2a, 0xc4, 0xab, 0xb6, 0xbd, 0xb0, }}, /* Byte value: 0xc7 */ + {{0xdb, 0xb9, 0x1e, 0xd6, 0x62, 0x9c, 0x77, 0xa8, }}, /* Byte value: 0xc8 */ + {{0xb1, 0xd1, 0x67, 0x4f, 0x60, 0x1a, 0x8d, 0x64, }}, /* Byte value: 0xc9 */ + {{0x3f, 0x7a, 0xd4, 0x97, 0x45, 0x21, 0xbc, 0xc4, }}, /* Byte value: 0xca */ + {{0xa9, 0x39, 0x7b, 0x17, 0x90, 0x23, 0xf3, 0x9e, }}, /* Byte value: 0xcb */ + {{0xe8, 0xb7, 0xc4, 0x6d, 0x5f, 0x40, 0xf4, 0x11, }}, /* Byte value: 0xcc */ + {{0xbc, 0xae, 0x37, 0xdb, 0x12, 0x3c, 0x26, 0x63, }}, /* Byte value: 0xcd */ + {{0x0e, 0x62, 0xb2, 0x9f, 0x6c, 0x88, 0xd4, 0x89, }}, /* Byte value: 0xce */ + {{0x1e, 0xd2, 0x1b, 0x4e, 0xcc, 0xa6, 0x80, 0x25, }}, /* Byte value: 0xcf */ + {{0x40, 0x85, 0xe1, 0xc2, 0xc5, 0xb8, 0x93, 0xf5, }}, /* Byte value: 0xd0 */ + {{0xd1, 0xf7, 0x17, 0xec, 0x26, 0xfe, 0xb6, 0x0a, }}, /* Byte value: 0xd1 */ + {{0x04, 0x2c, 0xbb, 0xa5, 0x28, 0xea, 0x15, 0x2b, }}, /* Byte value: 0xd2 */ + {{0xa5, 0x4d, 0x75, 0x3b, 0xe8, 0xde, 0xcc, 0xe3, }}, /* Byte value: 0xd3 */ + {{0x4c, 0xf1, 0xef, 0xee, 0xbd, 0x45, 0xac, 0x88, }}, /* Byte value: 0xd4 */ + {{0x0a, 0x4e, 0x09, 0x3a, 0x44, 0x62, 0xc1, 0xa2, }}, /* Byte value: 0xd5 */ + {{0x75, 0xb1, 0x3c, 0x6f, 0xc4, 0xfb, 0xee, 0x93, }}, /* Byte value: 0xd6 */ + {{0x7a, 0xd8, 0xd0, 0x48, 0xa2, 0xa8, 0xae, 0x60, }}, /* Byte value: 0xd7 */ + {{0xd9, 0xaf, 0xa2, 0x65, 0x76, 0xe9, 0x9c, 0x5c, }}, /* Byte value: 0xd8 */ + {{0xa1, 0x61, 0xce, 0x9e, 0xc0, 0x34, 0xd9, 0xc8, }}, /* Byte value: 0xd9 */ + {{0xd5, 0xdb, 0xac, 0x49, 0x0e, 0x14, 0xa3, 0x21, }}, /* Byte value: 0xda */ + {{0x91, 0x72, 0xf6, 0x2e, 0xe3, 0x46, 0x25, 0xff, }}, /* Byte value: 0xdb */ + {{0x02, 0x16, 0xbc, 0xb3, 0x14, 0x75, 0xeb, 0xf4, }}, /* Byte value: 0xdc */ + {{0x0f, 0x69, 0xec, 0x27, 0x66, 0x53, 0x40, 0xf3, }}, /* Byte value: 0xdd */ + {{0xd7, 0xcd, 0x10, 0xfa, 0x1a, 0x61, 0x48, 0xd5, }}, /* Byte value: 0xde */ + {{0x46, 0xbf, 0xe6, 0xd4, 0xf9, 0x27, 0x6d, 0x2a, }}, /* Byte value: 0xdf */ + {{0x3e, 0x71, 0x8a, 0x2f, 0x4f, 0xfa, 0x28, 0xbe, }}, /* Byte value: 0xe0 */ + {{0x1d, 0xcf, 0xf9, 0x45, 0xd2, 0x08, 0xff, 0xab, }}, /* Byte value: 0xe1 */ + {{0xee, 0x8d, 0xc3, 0x7b, 0x63, 0xdf, 0x0a, 0xce, }}, /* Byte value: 0xe2 */ + {{0x96, 0x43, 0xaf, 0x80, 0xd5, 0x02, 0x4f, 0x5a, }}, /* Byte value: 0xe3 */ + {{0xb0, 0xda, 0x39, 0xf7, 0x6a, 0xc1, 0x19, 0x1e, }}, /* Byte value: 0xe4 */ + {{0x51, 0x3e, 0x16, 0xab, 0x6f, 0x4d, 0x53, 0x23, }}, /* Byte value: 0xe5 */ + {{0xf3, 0x42, 0x3a, 0x3e, 0xb1, 0xd7, 0xf5, 0x65, }}, /* Byte value: 0xe6 */ + {{0x48, 0xdd, 0x54, 0x4b, 0x95, 0xaf, 0xb9, 0xa3, }}, /* Byte value: 0xe7 */ + {{0xe4, 0xc3, 0xca, 0x41, 0x27, 0xbd, 0xcb, 0x6c, }}, /* Byte value: 0xe8 */ + {{0x78, 0xce, 0x6c, 0xfb, 0xb6, 0xdd, 0x45, 0x94, }}, /* Byte value: 0xe9 */ + {{0x3d, 0x6c, 0x68, 0x24, 0x51, 0x54, 0x57, 0x30, }}, /* Byte value: 0xea */ + {{0x23, 0xbe, 0x73, 0x6a, 0x9d, 0xf2, 0xd7, 0x15, }}, /* Byte value: 0xeb */ + {{0x31, 0x18, 0x66, 0x08, 0x29, 0xa9, 0x68, 0x4d, }}, /* Byte value: 0xec */ + {{0xbb, 0x9f, 0x6e, 0x75, 0x24, 0x78, 0x4c, 0xc6, }}, /* Byte value: 0xed */ + {{0xe6, 0xd5, 0x76, 0xf2, 0x33, 0xc8, 0x20, 0x98, }}, /* Byte value: 0xee */ + {{0xe1, 0xe4, 0x2f, 0x5c, 0x05, 0x8c, 0x4a, 0x3d, }}, /* Byte value: 0xef */ + {{0x77, 0xa7, 0x80, 0xdc, 0xd0, 0x8e, 0x05, 0x67, }}, /* Byte value: 0xf0 */ + {{0x4b, 0xc0, 0xb6, 0x40, 0x8b, 0x01, 0xc6, 0x2d, }}, /* Byte value: 0xf1 */ + {{0x1f, 0xd9, 0x45, 0xf6, 0xc6, 0x7d, 0x14, 0x5f, }}, /* Byte value: 0xf2 */ + {{0xef, 0x86, 0x9d, 0xc3, 0x69, 0x04, 0x9e, 0xb4, }}, /* Byte value: 0xf3 */ + {{0x15, 0x97, 0x4c, 0xcc, 0x82, 0x1f, 0xd5, 0xfd, }}, /* Byte value: 0xf4 */ + {{0xa0, 0x6a, 0x90, 0x26, 0xca, 0xef, 0x4d, 0xb2, }}, /* Byte value: 0xf5 */ + {{0x93, 0x64, 0x4a, 0x9d, 0xf7, 0x33, 0xce, 0x0b, }}, /* Byte value: 0xf6 */ + {{0x92, 0x6f, 0x14, 0x25, 0xfd, 0xe8, 0x5a, 0x71, }}, /* Byte value: 0xf7 */ + {{0x0c, 0x74, 0x0e, 0x2c, 0x78, 0xfd, 0x3f, 0x7d, }}, /* Byte value: 0xf8 */ + {{0xf0, 0x5f, 0xd8, 0x35, 0xaf, 0x79, 0x8a, 0xeb, }}, /* Byte value: 0xf9 */ + {{0x33, 0x0e, 0xda, 0xbb, 0x3d, 0xdc, 0x83, 0xb9, }}, /* Byte value: 0xfa */ + {{0x3c, 0x67, 0x36, 0x9c, 0x5b, 0x8f, 0xc3, 0x4a, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x01, 0x0b, 0x5e, 0xb8, 0x0a, 0xdb, 0x94, 0x7a, }}, /* Byte value: 0xfd */ + {{0xea, 0xa1, 0x78, 0xde, 0x4b, 0x35, 0x1f, 0xe5, }}, /* Byte value: 0xfe */ + {{0xb5, 0xfd, 0xdc, 0xea, 0x48, 0xf0, 0x98, 0x4f, }}, /* Byte value: 0xff */ + }, + { /* Matrix row: 15 */ + {{0xe3, 0xef, 0x79, 0x82, 0x53, 0x11, 0xf0, 0xcd, }}, /* Byte value: 0x00 */ + {{0x9c, 0xba, 0xe7, 0x37, 0x83, 0x91, 0xbd, 0x5b, }}, /* Byte value: 0x01 */ + {{0xc3, 0x8e, 0xc9, 0x90, 0x58, 0x92, 0xad, 0x69, }}, /* Byte value: 0x02 */ + {{0xda, 0x6e, 0x59, 0x28, 0x51, 0x68, 0x84, 0xbe, }}, /* Byte value: 0x03 */ + {{0x89, 0x76, 0x4d, 0xf9, 0xc1, 0x13, 0x51, 0x50, }}, /* Byte value: 0x04 */ + {{0x37, 0x1e, 0x11, 0x74, 0xb4, 0x15, 0x71, 0x34, }}, /* Byte value: 0x05 */ + {{0x61, 0x1b, 0xf7, 0x62, 0x82, 0x4c, 0x87, 0x83, }}, /* Byte value: 0x06 */ + {{0xdc, 0x78, 0x44, 0x13, 0x95, 0x54, 0x07, 0xd0, }}, /* Byte value: 0x07 */ + {{0x72, 0xc1, 0x40, 0x97, 0x04, 0xf2, 0xe8, 0xe6, }}, /* Byte value: 0x08 */ + {{0x98, 0x1f, 0xf1, 0xa4, 0xba, 0xb9, 0xfe, 0xae, }}, /* Byte value: 0x09 */ + {{0x0c, 0x2c, 0x3a, 0x76, 0x4b, 0x78, 0xc5, 0xdc, }}, /* Byte value: 0x0a */ + {{0x1b, 0x53, 0x9b, 0x10, 0xf4, 0xee, 0xe9, 0x4c, }}, /* Byte value: 0x0b */ + {{0x08, 0x89, 0x2c, 0xe5, 0x72, 0x50, 0x86, 0x29, }}, /* Byte value: 0x0c */ + {{0x4b, 0x40, 0x60, 0x3d, 0x06, 0x8b, 0x9c, 0x95, }}, /* Byte value: 0x0d */ + {{0xad, 0xb2, 0xeb, 0x78, 0xf3, 0xb8, 0x4f, 0x01, }}, /* Byte value: 0x0e */ + {{0xff, 0x12, 0x1b, 0xfd, 0xfc, 0xc9, 0xfa, 0x43, }}, /* Byte value: 0x0f */ + {{0x45, 0xdf, 0x51, 0xe3, 0xb0, 0xe7, 0x99, 0xd2, }}, /* Byte value: 0x10 */ + {{0x8e, 0xd8, 0xb4, 0x96, 0x9a, 0x25, 0xb2, 0x92, }}, /* Byte value: 0x11 */ + {{0xfc, 0x19, 0xf4, 0x01, 0x9e, 0xd7, 0x5a, 0x74, }}, /* Byte value: 0x12 */ + {{0xfb, 0xb7, 0x0d, 0x6e, 0xc5, 0xe1, 0xb9, 0xb6, }}, /* Byte value: 0x13 */ + {{0xd1, 0xec, 0x9a, 0x31, 0x41, 0x26, 0xa2, 0xa0, }}, /* Byte value: 0x14 */ + {{0x6e, 0x3c, 0x22, 0xe8, 0xab, 0x2a, 0xe2, 0x68, }}, /* Byte value: 0x15 */ + {{0xa5, 0x3b, 0xc7, 0x9d, 0x81, 0xe8, 0xc9, 0x28, }}, /* Byte value: 0x16 */ + {{0xfa, 0x0f, 0xe9, 0x3a, 0x5a, 0xeb, 0xd9, 0x1a, }}, /* Byte value: 0x17 */ + {{0xe1, 0x5c, 0x72, 0x2a, 0xae, 0x05, 0x30, 0x56, }}, /* Byte value: 0x18 */ + {{0x36, 0xa6, 0xf5, 0x20, 0x2b, 0x1f, 0x11, 0x98, }}, /* Byte value: 0x19 */ + {{0xe4, 0x41, 0x80, 0xed, 0x08, 0x27, 0x13, 0x0f, }}, /* Byte value: 0x1a */ + {{0x0a, 0x3a, 0x27, 0x4d, 0x8f, 0x44, 0x46, 0xb2, }}, /* Byte value: 0x1b */ + {{0xb7, 0x59, 0x94, 0x3c, 0x98, 0x5c, 0xc6, 0xe1, }}, /* Byte value: 0x1c */ + {{0x03, 0x0b, 0xef, 0xfc, 0x62, 0x1e, 0xa0, 0x37, }}, /* Byte value: 0x1d */ + {{0x99, 0xa7, 0x15, 0xf0, 0x25, 0xb3, 0x9e, 0x02, }}, /* Byte value: 0x1e */ + {{0xc4, 0x20, 0x30, 0xff, 0x03, 0xa4, 0x4e, 0xab, }}, /* Byte value: 0x1f */ + {{0x47, 0x6c, 0x5a, 0x4b, 0x4d, 0xf3, 0x59, 0x49, }}, /* Byte value: 0x20 */ + {{0x3e, 0x2f, 0xd9, 0xc5, 0x59, 0x4f, 0x97, 0xb1, }}, /* Byte value: 0x21 */ + {{0x2e, 0xfe, 0x81, 0xcc, 0xbd, 0xef, 0x58, 0xe3, }}, /* Byte value: 0x22 */ + {{0x7d, 0xe6, 0x95, 0x1d, 0x2d, 0x94, 0x8d, 0x0d, }}, /* Byte value: 0x23 */ + {{0xdd, 0xc0, 0xa0, 0x47, 0x0a, 0x5e, 0x67, 0x7c, }}, /* Byte value: 0x24 */ + {{0xe5, 0xf9, 0x64, 0xb9, 0x97, 0x2d, 0x73, 0xa3, }}, /* Byte value: 0x25 */ + {{0x3b, 0x32, 0x2b, 0x02, 0xff, 0x6d, 0xb4, 0xe8, }}, /* Byte value: 0x26 */ + {{0x35, 0xad, 0x1a, 0xdc, 0x49, 0x01, 0xb1, 0xaf, }}, /* Byte value: 0x27 */ + {{0x27, 0xcf, 0x49, 0x7d, 0x50, 0xb5, 0xbe, 0x66, }}, /* Byte value: 0x28 */ + {{0xe0, 0xe4, 0x96, 0x7e, 0x31, 0x0f, 0x50, 0xfa, }}, /* Byte value: 0x29 */ + {{0xd9, 0x65, 0xb6, 0xd4, 0x33, 0x76, 0x24, 0x89, }}, /* Byte value: 0x2a */ + {{0x16, 0xc7, 0x45, 0x32, 0x20, 0x9c, 0x4c, 0x3c, }}, /* Byte value: 0x2b */ + {{0x01, 0xb8, 0xe4, 0x54, 0x9f, 0x0a, 0x60, 0xac, }}, /* Byte value: 0x2c */ + {{0x6c, 0x8f, 0x29, 0x40, 0x56, 0x3e, 0x22, 0xf3, }}, /* Byte value: 0x2d */ + {{0xfd, 0xa1, 0x10, 0x55, 0x01, 0xdd, 0x3a, 0xd8, }}, /* Byte value: 0x2e */ + {{0xbb, 0x75, 0xae, 0x4a, 0xd3, 0x24, 0x03, 0x3d, }}, /* Byte value: 0x2f */ + {{0x8a, 0x7d, 0xa2, 0x05, 0xa3, 0x0d, 0xf1, 0x67, }}, /* Byte value: 0x30 */ + {{0xdf, 0x73, 0xab, 0xef, 0xf7, 0x4a, 0xa7, 0xe7, }}, /* Byte value: 0x31 */ + {{0xc2, 0x36, 0x2d, 0xc4, 0xc7, 0x98, 0xcd, 0xc5, }}, /* Byte value: 0x32 */ + {{0x82, 0xf4, 0x8e, 0xe0, 0xd1, 0x5d, 0x77, 0x4e, }}, /* Byte value: 0x33 */ + {{0x8f, 0x60, 0x50, 0xc2, 0x05, 0x2f, 0xd2, 0x3e, }}, /* Byte value: 0x34 */ + {{0x93, 0x9d, 0x32, 0xbd, 0xaa, 0xf7, 0xd8, 0xb0, }}, /* Byte value: 0x35 */ + {{0x80, 0x47, 0x85, 0x48, 0x2c, 0x49, 0xb7, 0xd5, }}, /* Byte value: 0x36 */ + {{0xf0, 0x35, 0xce, 0x77, 0xd5, 0xaf, 0x9f, 0xa8, }}, /* Byte value: 0x37 */ + {{0x10, 0xd1, 0x58, 0x09, 0xe4, 0xa0, 0xcf, 0x52, }}, /* Byte value: 0x38 */ + {{0x96, 0x80, 0xc0, 0x7a, 0x0c, 0xd5, 0xfb, 0xe9, }}, /* Byte value: 0x39 */ + {{0xf2, 0x86, 0xc5, 0xdf, 0x28, 0xbb, 0x5f, 0x33, }}, /* Byte value: 0x3a */ + {{0xed, 0x70, 0x48, 0x5c, 0xe5, 0x7d, 0xf5, 0x8a, }}, /* Byte value: 0x3b */ + {{0x39, 0x81, 0x20, 0xaa, 0x02, 0x79, 0x74, 0x73, }}, /* Byte value: 0x3c */ + {{0x4c, 0xee, 0x99, 0x52, 0x5d, 0xbd, 0x7f, 0x57, }}, /* Byte value: 0x3d */ + {{0x02, 0xb3, 0x0b, 0xa8, 0xfd, 0x14, 0xc0, 0x9b, }}, /* Byte value: 0x3e */ + {{0x21, 0xd9, 0x54, 0x46, 0x94, 0x89, 0x3d, 0x08, }}, /* Byte value: 0x3f */ + {{0x52, 0xa0, 0xf0, 0x85, 0x0f, 0x71, 0xb5, 0x42, }}, /* Byte value: 0x40 */ + {{0x41, 0x7a, 0x47, 0x70, 0x89, 0xcf, 0xda, 0x27, }}, /* Byte value: 0x41 */ + {{0x43, 0xc9, 0x4c, 0xd8, 0x74, 0xdb, 0x1a, 0xbc, }}, /* Byte value: 0x42 */ + {{0xf6, 0x23, 0xd3, 0x4c, 0x11, 0x93, 0x1c, 0xc6, }}, /* Byte value: 0x43 */ + {{0x17, 0x7f, 0xa1, 0x66, 0xbf, 0x96, 0x2c, 0x90, }}, /* Byte value: 0x44 */ + {{0x64, 0x06, 0x05, 0xa5, 0x24, 0x6e, 0xa4, 0xda, }}, /* Byte value: 0x45 */ + {{0xea, 0xde, 0xb1, 0x33, 0xbe, 0x4b, 0x16, 0x48, }}, /* Byte value: 0x46 */ + {{0x81, 0xff, 0x61, 0x1c, 0xb3, 0x43, 0xd7, 0x79, }}, /* Byte value: 0x47 */ + {{0x2a, 0x5b, 0x97, 0x5f, 0x84, 0xc7, 0x1b, 0x16, }}, /* Byte value: 0x48 */ + {{0xfe, 0xaa, 0xff, 0xa9, 0x63, 0xc3, 0x9a, 0xef, }}, /* Byte value: 0x49 */ + {{0x76, 0x64, 0x56, 0x04, 0x3d, 0xda, 0xab, 0x13, }}, /* Byte value: 0x4a */ + {{0xec, 0xc8, 0xac, 0x08, 0x7a, 0x77, 0x95, 0x26, }}, /* Byte value: 0x4b */ + {{0x5b, 0x91, 0x38, 0x34, 0xe2, 0x2b, 0x53, 0xc7, }}, /* Byte value: 0x4c */ + {{0xf3, 0x3e, 0x21, 0x8b, 0xb7, 0xb1, 0x3f, 0x9f, }}, /* Byte value: 0x4d */ + {{0xf8, 0xbc, 0xe2, 0x92, 0xa7, 0xff, 0x19, 0x81, }}, /* Byte value: 0x4e */ + {{0x68, 0x2a, 0x3f, 0xd3, 0x6f, 0x16, 0x61, 0x06, }}, /* Byte value: 0x4f */ + {{0x5d, 0x87, 0x25, 0x0f, 0x26, 0x17, 0xd0, 0xa9, }}, /* Byte value: 0x50 */ + {{0x7b, 0xf0, 0x88, 0x26, 0xe9, 0xa8, 0x0e, 0x63, }}, /* Byte value: 0x51 */ + {{0xb4, 0x52, 0x7b, 0xc0, 0xfa, 0x42, 0x66, 0xd6, }}, /* Byte value: 0x52 */ + {{0x5c, 0x3f, 0xc1, 0x5b, 0xb9, 0x1d, 0xb0, 0x05, }}, /* Byte value: 0x53 */ + {{0xee, 0x7b, 0xa7, 0xa0, 0x87, 0x63, 0x55, 0xbd, }}, /* Byte value: 0x54 */ + {{0xc1, 0x3d, 0xc2, 0x38, 0xa5, 0x86, 0x6d, 0xf2, }}, /* Byte value: 0x55 */ + {{0xd7, 0xfa, 0x87, 0x0a, 0x85, 0x1a, 0x21, 0xce, }}, /* Byte value: 0x56 */ + {{0x31, 0x08, 0x0c, 0x4f, 0x70, 0x29, 0xf2, 0x5a, }}, /* Byte value: 0x57 */ + {{0xa6, 0x30, 0x28, 0x61, 0xe3, 0xf6, 0x69, 0x1f, }}, /* Byte value: 0x58 */ + {{0xeb, 0x66, 0x55, 0x67, 0x21, 0x41, 0x76, 0xe4, }}, /* Byte value: 0x59 */ + {{0x15, 0xcc, 0xaa, 0xce, 0x42, 0x82, 0xec, 0x0b, }}, /* Byte value: 0x5a */ + {{0xe2, 0x57, 0x9d, 0xd6, 0xcc, 0x1b, 0x90, 0x61, }}, /* Byte value: 0x5b */ + {{0xca, 0xbf, 0x01, 0x21, 0xb5, 0xc8, 0x4b, 0xec, }}, /* Byte value: 0x5c */ + {{0xd0, 0x54, 0x7e, 0x65, 0xde, 0x2c, 0xc2, 0x0c, }}, /* Byte value: 0x5d */ + {{0x4f, 0xe5, 0x76, 0xae, 0x3f, 0xa3, 0xdf, 0x60, }}, /* Byte value: 0x5e */ + {{0x25, 0x7c, 0x42, 0xd5, 0xad, 0xa1, 0x7e, 0xfd, }}, /* Byte value: 0x5f */ + {{0x46, 0xd4, 0xbe, 0x1f, 0xd2, 0xf9, 0x39, 0xe5, }}, /* Byte value: 0x60 */ + {{0x83, 0x4c, 0x6a, 0xb4, 0x4e, 0x57, 0x17, 0xe2, }}, /* Byte value: 0x61 */ + {{0x6d, 0x37, 0xcd, 0x14, 0xc9, 0x34, 0x42, 0x5f, }}, /* Byte value: 0x62 */ + {{0x62, 0x10, 0x18, 0x9e, 0xe0, 0x52, 0x27, 0xb4, }}, /* Byte value: 0x63 */ + {{0xcf, 0xa2, 0xf3, 0xe6, 0x13, 0xea, 0x68, 0xb5, }}, /* Byte value: 0x64 */ + {{0x6f, 0x84, 0xc6, 0xbc, 0x34, 0x20, 0x82, 0xc4, }}, /* Byte value: 0x65 */ + {{0xc7, 0x2b, 0xdf, 0x03, 0x61, 0xba, 0xee, 0x9c, }}, /* Byte value: 0x66 */ + {{0xb3, 0xfc, 0x82, 0xaf, 0xa1, 0x74, 0x85, 0x14, }}, /* Byte value: 0x67 */ + {{0x57, 0xbd, 0x02, 0x42, 0xa9, 0x53, 0x96, 0x1b, }}, /* Byte value: 0x68 */ + {{0x63, 0xa8, 0xfc, 0xca, 0x7f, 0x58, 0x47, 0x18, }}, /* Byte value: 0x69 */ + {{0x66, 0xb5, 0x0e, 0x0d, 0xd9, 0x7a, 0x64, 0x41, }}, /* Byte value: 0x6a */ + {{0x7e, 0xed, 0x7a, 0xe1, 0x4f, 0x8a, 0x2d, 0x3a, }}, /* Byte value: 0x6b */ + {{0xce, 0x1a, 0x17, 0xb2, 0x8c, 0xe0, 0x08, 0x19, }}, /* Byte value: 0x6c */ + {{0x94, 0x33, 0xcb, 0xd2, 0xf1, 0xc1, 0x3b, 0x72, }}, /* Byte value: 0x6d */ + {{0x51, 0xab, 0x1f, 0x79, 0x6d, 0x6f, 0x15, 0x75, }}, /* Byte value: 0x6e */ + {{0xb6, 0xe1, 0x70, 0x68, 0x07, 0x56, 0xa6, 0x4d, }}, /* Byte value: 0x6f */ + {{0x23, 0x6a, 0x5f, 0xee, 0x69, 0x9d, 0xfd, 0x93, }}, /* Byte value: 0x70 */ + {{0x3d, 0x24, 0x36, 0x39, 0x3b, 0x51, 0x37, 0x86, }}, /* Byte value: 0x71 */ + {{0x75, 0x6f, 0xb9, 0xf8, 0x5f, 0xc4, 0x0b, 0x24, }}, /* Byte value: 0x72 */ + {{0x3c, 0x9c, 0xd2, 0x6d, 0xa4, 0x5b, 0x57, 0x2a, }}, /* Byte value: 0x73 */ + {{0x1f, 0xf6, 0x8d, 0x83, 0xcd, 0xc6, 0xaa, 0xb9, }}, /* Byte value: 0x74 */ + {{0xb8, 0x7e, 0x41, 0xb6, 0xb1, 0x3a, 0xa3, 0x0a, }}, /* Byte value: 0x75 */ + {{0x86, 0x51, 0x98, 0x73, 0xe8, 0x75, 0x34, 0xbb, }}, /* Byte value: 0x76 */ + {{0xd6, 0x42, 0x63, 0x5e, 0x1a, 0x10, 0x41, 0x62, }}, /* Byte value: 0x77 */ + {{0xcc, 0xa9, 0x1c, 0x1a, 0x71, 0xf4, 0xc8, 0x82, }}, /* Byte value: 0x78 */ + {{0x05, 0x1d, 0xf2, 0xc7, 0xa6, 0x22, 0x23, 0x59, }}, /* Byte value: 0x79 */ + {{0xae, 0xb9, 0x04, 0x84, 0x91, 0xa6, 0xef, 0x36, }}, /* Byte value: 0x7a */ + {{0x3f, 0x97, 0x3d, 0x91, 0xc6, 0x45, 0xf7, 0x1d, }}, /* Byte value: 0x7b */ + {{0x54, 0xb6, 0xed, 0xbe, 0xcb, 0x4d, 0x36, 0x2c, }}, /* Byte value: 0x7c */ + {{0xc6, 0x93, 0x3b, 0x57, 0xfe, 0xb0, 0x8e, 0x30, }}, /* Byte value: 0x7d */ + {{0x67, 0x0d, 0xea, 0x59, 0x46, 0x70, 0x04, 0xed, }}, /* Byte value: 0x7e */ + {{0x4a, 0xf8, 0x84, 0x69, 0x99, 0x81, 0xfc, 0x39, }}, /* Byte value: 0x7f */ + {{0x1a, 0xeb, 0x7f, 0x44, 0x6b, 0xe4, 0x89, 0xe0, }}, /* Byte value: 0x80 */ + {{0xcd, 0x11, 0xf8, 0x4e, 0xee, 0xfe, 0xa8, 0x2e, }}, /* Byte value: 0x81 */ + {{0x6a, 0x99, 0x34, 0x7b, 0x92, 0x02, 0xa1, 0x9d, }}, /* Byte value: 0x82 */ + {{0x84, 0xe2, 0x93, 0xdb, 0x15, 0x61, 0xf4, 0x20, }}, /* Byte value: 0x83 */ + {{0x4d, 0x56, 0x7d, 0x06, 0xc2, 0xb7, 0x1f, 0xfb, }}, /* Byte value: 0x84 */ + {{0xf9, 0x04, 0x06, 0xc6, 0x38, 0xf5, 0x79, 0x2d, }}, /* Byte value: 0x85 */ + {{0xf7, 0x9b, 0x37, 0x18, 0x8e, 0x99, 0x7c, 0x6a, }}, /* Byte value: 0x86 */ + {{0xaa, 0x1c, 0x12, 0x17, 0xa8, 0x8e, 0xac, 0xc3, }}, /* Byte value: 0x87 */ + {{0xa1, 0x9e, 0xd1, 0x0e, 0xb8, 0xc0, 0x8a, 0xdd, }}, /* Byte value: 0x88 */ + {{0x2f, 0x46, 0x65, 0x98, 0x22, 0xe5, 0x38, 0x4f, }}, /* Byte value: 0x89 */ + {{0x1d, 0x45, 0x86, 0x2b, 0x30, 0xd2, 0x6a, 0x22, }}, /* Byte value: 0x8a */ + {{0xe6, 0xf2, 0x8b, 0x45, 0xf5, 0x33, 0xd3, 0x94, }}, /* Byte value: 0x8b */ + {{0x48, 0x4b, 0x8f, 0xc1, 0x64, 0x95, 0x3c, 0xa2, }}, /* Byte value: 0x8c */ + {{0x26, 0x77, 0xad, 0x29, 0xcf, 0xbf, 0xde, 0xca, }}, /* Byte value: 0x8d */ + {{0x12, 0x62, 0x53, 0xa1, 0x19, 0xb4, 0x0f, 0xc9, }}, /* Byte value: 0x8e */ + {{0xe8, 0x6d, 0xba, 0x9b, 0x43, 0x5f, 0xd6, 0xd3, }}, /* Byte value: 0x8f */ + {{0xa8, 0xaf, 0x19, 0xbf, 0x55, 0x9a, 0x6c, 0x58, }}, /* Byte value: 0x90 */ + {{0x42, 0x71, 0xa8, 0x8c, 0xeb, 0xd1, 0x7a, 0x10, }}, /* Byte value: 0x91 */ + {{0x90, 0x96, 0xdd, 0x41, 0xc8, 0xe9, 0x78, 0x87, }}, /* Byte value: 0x92 */ + {{0x87, 0xe9, 0x7c, 0x27, 0x77, 0x7f, 0x54, 0x17, }}, /* Byte value: 0x93 */ + {{0xd4, 0xf1, 0x68, 0xf6, 0xe7, 0x04, 0x81, 0xf9, }}, /* Byte value: 0x94 */ + {{0x97, 0x38, 0x24, 0x2e, 0x93, 0xdf, 0x9b, 0x45, }}, /* Byte value: 0x95 */ + {{0x9a, 0xac, 0xfa, 0x0c, 0x47, 0xad, 0x3e, 0x35, }}, /* Byte value: 0x96 */ + {{0xc8, 0x0c, 0x0a, 0x89, 0x48, 0xdc, 0x8b, 0x77, }}, /* Byte value: 0x97 */ + {{0xef, 0xc3, 0x43, 0xf4, 0x18, 0x69, 0x35, 0x11, }}, /* Byte value: 0x98 */ + {{0x73, 0x79, 0xa4, 0xc3, 0x9b, 0xf8, 0x88, 0x4a, }}, /* Byte value: 0x99 */ + {{0xb1, 0x4f, 0x89, 0x07, 0x5c, 0x60, 0x45, 0x8f, }}, /* Byte value: 0x9a */ + {{0x6b, 0x21, 0xd0, 0x2f, 0x0d, 0x08, 0xc1, 0x31, }}, /* Byte value: 0x9b */ + {{0x24, 0xc4, 0xa6, 0x81, 0x32, 0xab, 0x1e, 0x51, }}, /* Byte value: 0x9c */ + {{0x13, 0xda, 0xb7, 0xf5, 0x86, 0xbe, 0x6f, 0x65, }}, /* Byte value: 0x9d */ + {{0x69, 0x92, 0xdb, 0x87, 0xf0, 0x1c, 0x01, 0xaa, }}, /* Byte value: 0x9e */ + {{0xb5, 0xea, 0x9f, 0x94, 0x65, 0x48, 0x06, 0x7a, }}, /* Byte value: 0x9f */ + {{0x92, 0x25, 0xd6, 0xe9, 0x35, 0xfd, 0xb8, 0x1c, }}, /* Byte value: 0xa0 */ + {{0x14, 0x74, 0x4e, 0x9a, 0xdd, 0x88, 0x8c, 0xa7, }}, /* Byte value: 0xa1 */ + {{0x2d, 0xf5, 0x6e, 0x30, 0xdf, 0xf1, 0xf8, 0xd4, }}, /* Byte value: 0xa2 */ + {{0x32, 0x03, 0xe3, 0xb3, 0x12, 0x37, 0x52, 0x6d, }}, /* Byte value: 0xa3 */ + {{0xc9, 0xb4, 0xee, 0xdd, 0xd7, 0xd6, 0xeb, 0xdb, }}, /* Byte value: 0xa4 */ + {{0xbc, 0xdb, 0x57, 0x25, 0x88, 0x12, 0xe0, 0xff, }}, /* Byte value: 0xa5 */ + {{0x91, 0x2e, 0x39, 0x15, 0x57, 0xe3, 0x18, 0x2b, }}, /* Byte value: 0xa6 */ + {{0xb2, 0x44, 0x66, 0xfb, 0x3e, 0x7e, 0xe5, 0xb8, }}, /* Byte value: 0xa7 */ + {{0x78, 0xfb, 0x67, 0xda, 0x8b, 0xb6, 0xae, 0x54, }}, /* Byte value: 0xa8 */ + {{0xa7, 0x88, 0xcc, 0x35, 0x7c, 0xfc, 0x09, 0xb3, }}, /* Byte value: 0xa9 */ + {{0xd2, 0xe7, 0x75, 0xcd, 0x23, 0x38, 0x02, 0x97, }}, /* Byte value: 0xaa */ + {{0x50, 0x13, 0xfb, 0x2d, 0xf2, 0x65, 0x75, 0xd9, }}, /* Byte value: 0xab */ + {{0x8d, 0xd3, 0x5b, 0x6a, 0xf8, 0x3b, 0x12, 0xa5, }}, /* Byte value: 0xac */ + {{0x1e, 0x4e, 0x69, 0xd7, 0x52, 0xcc, 0xca, 0x15, }}, /* Byte value: 0xad */ + {{0xb9, 0xc6, 0xa5, 0xe2, 0x2e, 0x30, 0xc3, 0xa6, }}, /* Byte value: 0xae */ + {{0x49, 0xf3, 0x6b, 0x95, 0xfb, 0x9f, 0x5c, 0x0e, }}, /* Byte value: 0xaf */ + {{0x5a, 0x29, 0xdc, 0x60, 0x7d, 0x21, 0x33, 0x6b, }}, /* Byte value: 0xb0 */ + {{0x9d, 0x02, 0x03, 0x63, 0x1c, 0x9b, 0xdd, 0xf7, }}, /* Byte value: 0xb1 */ + {{0xe7, 0x4a, 0x6f, 0x11, 0x6a, 0x39, 0xb3, 0x38, }}, /* Byte value: 0xb2 */ + {{0x28, 0xe8, 0x9c, 0xf7, 0x79, 0xd3, 0xdb, 0x8d, }}, /* Byte value: 0xb3 */ + {{0x34, 0x15, 0xfe, 0x88, 0xd6, 0x0b, 0xd1, 0x03, }}, /* Byte value: 0xb4 */ + {{0x59, 0x22, 0x33, 0x9c, 0x1f, 0x3f, 0x93, 0x5c, }}, /* Byte value: 0xb5 */ + {{0x18, 0x58, 0x74, 0xec, 0x96, 0xf0, 0x49, 0x7b, }}, /* Byte value: 0xb6 */ + {{0x5e, 0x8c, 0xca, 0xf3, 0x44, 0x09, 0x70, 0x9e, }}, /* Byte value: 0xb7 */ + {{0x9e, 0x09, 0xec, 0x9f, 0x7e, 0x85, 0x7d, 0xc0, }}, /* Byte value: 0xb8 */ + {{0xa0, 0x26, 0x35, 0x5a, 0x27, 0xca, 0xea, 0x71, }}, /* Byte value: 0xb9 */ + {{0x09, 0x31, 0xc8, 0xb1, 0xed, 0x5a, 0xe6, 0x85, }}, /* Byte value: 0xba */ + {{0x74, 0xd7, 0x5d, 0xac, 0xc0, 0xce, 0x6b, 0x88, }}, /* Byte value: 0xbb */ + {{0x20, 0x61, 0xb0, 0x12, 0x0b, 0x83, 0x5d, 0xa4, }}, /* Byte value: 0xbc */ + {{0xc5, 0x98, 0xd4, 0xab, 0x9c, 0xae, 0x2e, 0x07, }}, /* Byte value: 0xbd */ + {{0x3a, 0x8a, 0xcf, 0x56, 0x60, 0x67, 0xd4, 0x44, }}, /* Byte value: 0xbe */ + {{0x0f, 0x27, 0xd5, 0x8a, 0x29, 0x66, 0x65, 0xeb, }}, /* Byte value: 0xbf */ + {{0x4e, 0x5d, 0x92, 0xfa, 0xa0, 0xa9, 0xbf, 0xcc, }}, /* Byte value: 0xc0 */ + {{0x5f, 0x34, 0x2e, 0xa7, 0xdb, 0x03, 0x10, 0x32, }}, /* Byte value: 0xc1 */ + {{0x33, 0xbb, 0x07, 0xe7, 0x8d, 0x3d, 0x32, 0xc1, }}, /* Byte value: 0xc2 */ + {{0xbf, 0xd0, 0xb8, 0xd9, 0xea, 0x0c, 0x40, 0xc8, }}, /* Byte value: 0xc3 */ + {{0x2c, 0x4d, 0x8a, 0x64, 0x40, 0xfb, 0x98, 0x78, }}, /* Byte value: 0xc4 */ + {{0x07, 0xae, 0xf9, 0x6f, 0x5b, 0x36, 0xe3, 0xc2, }}, /* Byte value: 0xc5 */ + {{0x60, 0xa3, 0x13, 0x36, 0x1d, 0x46, 0xe7, 0x2f, }}, /* Byte value: 0xc6 */ + {{0xcb, 0x07, 0xe5, 0x75, 0x2a, 0xc2, 0x2b, 0x40, }}, /* Byte value: 0xc7 */ + {{0xa4, 0x83, 0x23, 0xc9, 0x1e, 0xe2, 0xa9, 0x84, }}, /* Byte value: 0xc8 */ + {{0x8c, 0x6b, 0xbf, 0x3e, 0x67, 0x31, 0x72, 0x09, }}, /* Byte value: 0xc9 */ + {{0x0d, 0x94, 0xde, 0x22, 0xd4, 0x72, 0xa5, 0x70, }}, /* Byte value: 0xca */ + {{0x11, 0x69, 0xbc, 0x5d, 0x7b, 0xaa, 0xaf, 0xfe, }}, /* Byte value: 0xcb */ + {{0x06, 0x16, 0x1d, 0x3b, 0xc4, 0x3c, 0x83, 0x6e, }}, /* Byte value: 0xcc */ + {{0xab, 0xa4, 0xf6, 0x43, 0x37, 0x84, 0xcc, 0x6f, }}, /* Byte value: 0xcd */ + {{0x7c, 0x5e, 0x71, 0x49, 0xb2, 0x9e, 0xed, 0xa1, }}, /* Byte value: 0xce */ + {{0x2b, 0xe3, 0x73, 0x0b, 0x1b, 0xcd, 0x7b, 0xba, }}, /* Byte value: 0xcf */ + {{0x9f, 0xb1, 0x08, 0xcb, 0xe1, 0x8f, 0x1d, 0x6c, }}, /* Byte value: 0xd0 */ + {{0xbd, 0x63, 0xb3, 0x71, 0x17, 0x18, 0x80, 0x53, }}, /* Byte value: 0xd1 */ + {{0x65, 0xbe, 0xe1, 0xf1, 0xbb, 0x64, 0xc4, 0x76, }}, /* Byte value: 0xd2 */ + {{0xbe, 0x68, 0x5c, 0x8d, 0x75, 0x06, 0x20, 0x64, }}, /* Byte value: 0xd3 */ + {{0x30, 0xb0, 0xe8, 0x1b, 0xef, 0x23, 0x92, 0xf6, }}, /* Byte value: 0xd4 */ + {{0x19, 0xe0, 0x90, 0xb8, 0x09, 0xfa, 0x29, 0xd7, }}, /* Byte value: 0xd5 */ + {{0x8b, 0xc5, 0x46, 0x51, 0x3c, 0x07, 0x91, 0xcb, }}, /* Byte value: 0xd6 */ + {{0x7f, 0x55, 0x9e, 0xb5, 0xd0, 0x80, 0x4d, 0x96, }}, /* Byte value: 0xd7 */ + {{0x77, 0xdc, 0xb2, 0x50, 0xa2, 0xd0, 0xcb, 0xbf, }}, /* Byte value: 0xd8 */ + {{0xdb, 0xd6, 0xbd, 0x7c, 0xce, 0x62, 0xe4, 0x12, }}, /* Byte value: 0xd9 */ + {{0xd8, 0xdd, 0x52, 0x80, 0xac, 0x7c, 0x44, 0x25, }}, /* Byte value: 0xda */ + {{0x22, 0xd2, 0xbb, 0xba, 0xf6, 0x97, 0x9d, 0x3f, }}, /* Byte value: 0xdb */ + {{0xd3, 0x5f, 0x91, 0x99, 0xbc, 0x32, 0x62, 0x3b, }}, /* Byte value: 0xdc */ + {{0xf4, 0x90, 0xd8, 0xe4, 0xec, 0x87, 0xdc, 0x5d, }}, /* Byte value: 0xdd */ + {{0x0b, 0x82, 0xc3, 0x19, 0x10, 0x4e, 0x26, 0x1e, }}, /* Byte value: 0xde */ + {{0x29, 0x50, 0x78, 0xa3, 0xe6, 0xd9, 0xbb, 0x21, }}, /* Byte value: 0xdf */ + {{0x85, 0x5a, 0x77, 0x8f, 0x8a, 0x6b, 0x94, 0x8c, }}, /* Byte value: 0xe0 */ + {{0x70, 0x72, 0x4b, 0x3f, 0xf9, 0xe6, 0x28, 0x7d, }}, /* Byte value: 0xe1 */ + {{0xb0, 0xf7, 0x6d, 0x53, 0xc3, 0x6a, 0x25, 0x23, }}, /* Byte value: 0xe2 */ + {{0x1c, 0xfd, 0x62, 0x7f, 0xaf, 0xd8, 0x0a, 0x8e, }}, /* Byte value: 0xe3 */ + {{0x04, 0xa5, 0x16, 0x93, 0x39, 0x28, 0x43, 0xf5, }}, /* Byte value: 0xe4 */ + {{0x40, 0xc2, 0xa3, 0x24, 0x16, 0xc5, 0xba, 0x8b, }}, /* Byte value: 0xe5 */ + {{0xc0, 0x85, 0x26, 0x6c, 0x3a, 0x8c, 0x0d, 0x5e, }}, /* Byte value: 0xe6 */ + {{0x55, 0x0e, 0x09, 0xea, 0x54, 0x47, 0x56, 0x80, }}, /* Byte value: 0xe7 */ + {{0xa9, 0x17, 0xfd, 0xeb, 0xca, 0x90, 0x0c, 0xf4, }}, /* Byte value: 0xe8 */ + {{0xac, 0x0a, 0x0f, 0x2c, 0x6c, 0xb2, 0x2f, 0xad, }}, /* Byte value: 0xe9 */ + {{0xde, 0xcb, 0x4f, 0xbb, 0x68, 0x40, 0xc7, 0x4b, }}, /* Byte value: 0xea */ + {{0xf5, 0x28, 0x3c, 0xb0, 0x73, 0x8d, 0xbc, 0xf1, }}, /* Byte value: 0xeb */ + {{0x71, 0xca, 0xaf, 0x6b, 0x66, 0xec, 0x48, 0xd1, }}, /* Byte value: 0xec */ + {{0x95, 0x8b, 0x2f, 0x86, 0x6e, 0xcb, 0x5b, 0xde, }}, /* Byte value: 0xed */ + {{0x7a, 0x48, 0x6c, 0x72, 0x76, 0xa2, 0x6e, 0xcf, }}, /* Byte value: 0xee */ + {{0x44, 0x67, 0xb5, 0xb7, 0x2f, 0xed, 0xf9, 0x7e, }}, /* Byte value: 0xef */ + {{0x58, 0x9a, 0xd7, 0xc8, 0x80, 0x35, 0xf3, 0xf0, }}, /* Byte value: 0xf0 */ + {{0x0e, 0x9f, 0x31, 0xde, 0xb6, 0x6c, 0x05, 0x47, }}, /* Byte value: 0xf1 */ + {{0xa3, 0x2d, 0xda, 0xa6, 0x45, 0xd4, 0x4a, 0x46, }}, /* Byte value: 0xf2 */ + {{0x38, 0x39, 0xc4, 0xfe, 0x9d, 0x73, 0x14, 0xdf, }}, /* Byte value: 0xf3 */ + {{0xba, 0xcd, 0x4a, 0x1e, 0x4c, 0x2e, 0x63, 0x91, }}, /* Byte value: 0xf4 */ + {{0x53, 0x18, 0x14, 0xd1, 0x90, 0x7b, 0xd5, 0xee, }}, /* Byte value: 0xf5 */ + {{0xf1, 0x8d, 0x2a, 0x23, 0x4a, 0xa5, 0xff, 0x04, }}, /* Byte value: 0xf6 */ + {{0x79, 0x43, 0x83, 0x8e, 0x14, 0xbc, 0xce, 0xf8, }}, /* Byte value: 0xf7 */ + {{0xaf, 0x01, 0xe0, 0xd0, 0x0e, 0xac, 0x8f, 0x9a, }}, /* Byte value: 0xf8 */ + {{0x9b, 0x14, 0x1e, 0x58, 0xd8, 0xa7, 0x5e, 0x99, }}, /* Byte value: 0xf9 */ + {{0xa2, 0x95, 0x3e, 0xf2, 0xda, 0xde, 0x2a, 0xea, }}, /* Byte value: 0xfa */ + {{0x56, 0x05, 0xe6, 0x16, 0x36, 0x59, 0xf6, 0xb7, }}, /* Byte value: 0xfb */ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}, /* Byte value: 0xfc */ + {{0x88, 0xce, 0xa9, 0xad, 0x5e, 0x19, 0x31, 0xfc, }}, /* Byte value: 0xfd */ + {{0xd5, 0x49, 0x8c, 0xa2, 0x78, 0x0e, 0xe1, 0x55, }}, /* Byte value: 0xfe */ + {{0xe9, 0xd5, 0x5e, 0xcf, 0xdc, 0x55, 0xb6, 0x7f, }}, /* Byte value: 0xff */ + }, +}; From dc2fc67f3896fc80b68ac15a4a01b83bc0626048 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:09:06 -0500 Subject: [PATCH 321/576] Create optimised_tables.h --- .../gost2015_kuznechik/optimised_tables.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised_tables.h diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised_tables.h b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised_tables.h new file mode 100644 index 000000000..934c104c1 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/optimised_tables.h @@ -0,0 +1,18 @@ +#if !defined LIBGOST15_OPTIMISED_TABLES_HEADER_INCLUDED_ +#define LIBGOST15_OPTIMISED_TABLES_HEADER_INCLUDED_ + +#include "libgost15/platform.h" + +union qword_t { + uint8_t asBytes[8]; + uint64_t asQWord; +}; + +extern const union qword_t roundConstantsLeft[32]; +extern const union qword_t roundConstantsRight[32]; +extern const union qword_t precomputedLSTableLeft[16][256]; +extern const union qword_t precomputedLSTableRight[16][256]; +extern const union qword_t precomputedInversedLSTableLeft[16][256]; +extern const union qword_t precomputedInversedLSTableRight[16][256]; + +#endif From d4065aeb36fc9f328fda7c4ca208fbccf4d6141b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:09:31 -0500 Subject: [PATCH 322/576] Create tables.c --- .../gost2015_kuznechik/shared/tables.c | 157 ++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c new file mode 100644 index 000000000..8ce98836d --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c @@ -0,0 +1,157 @@ +#include "tables.h" + +const uint8_t roundConstants[512] = { + 0x6e, 0xa2, 0x76, 0x72, 0x6c, 0x48, 0x7a, 0xb8, 0x5d, 0x27, 0xbd, 0x10, 0xdd, 0x84, 0x94, 0x01, + 0xdc, 0x87, 0xec, 0xe4, 0xd8, 0x90, 0xf4, 0xb3, 0xba, 0x4e, 0xb9, 0x20, 0x79, 0xcb, 0xeb, 0x02, + 0xb2, 0x25, 0x9a, 0x96, 0xb4, 0xd8, 0x8e, 0x0b, 0xe7, 0x69, 0x04, 0x30, 0xa4, 0x4f, 0x7f, 0x03, + 0x7b, 0xcd, 0x1b, 0x0b, 0x73, 0xe3, 0x2b, 0xa5, 0xb7, 0x9c, 0xb1, 0x40, 0xf2, 0x55, 0x15, 0x04, + 0x15, 0x6f, 0x6d, 0x79, 0x1f, 0xab, 0x51, 0x1d, 0xea, 0xbb, 0x0c, 0x50, 0x2f, 0xd1, 0x81, 0x05, + 0xa7, 0x4a, 0xf7, 0xef, 0xab, 0x73, 0xdf, 0x16, 0x0d, 0xd2, 0x08, 0x60, 0x8b, 0x9e, 0xfe, 0x06, + 0xc9, 0xe8, 0x81, 0x9d, 0xc7, 0x3b, 0xa5, 0xae, 0x50, 0xf5, 0xb5, 0x70, 0x56, 0x1a, 0x6a, 0x07, + 0xf6, 0x59, 0x36, 0x16, 0xe6, 0x05, 0x56, 0x89, 0xad, 0xfb, 0xa1, 0x80, 0x27, 0xaa, 0x2a, 0x08, + 0x98, 0xfb, 0x40, 0x64, 0x8a, 0x4d, 0x2c, 0x31, 0xf0, 0xdc, 0x1c, 0x90, 0xfa, 0x2e, 0xbe, 0x09, + 0x2a, 0xde, 0xda, 0xf2, 0x3e, 0x95, 0xa2, 0x3a, 0x17, 0xb5, 0x18, 0xa0, 0x5e, 0x61, 0xc1, 0x0a, + 0x44, 0x7c, 0xac, 0x80, 0x52, 0xdd, 0xd8, 0x82, 0x4a, 0x92, 0xa5, 0xb0, 0x83, 0xe5, 0x55, 0x0b, + 0x8d, 0x94, 0x2d, 0x1d, 0x95, 0xe6, 0x7d, 0x2c, 0x1a, 0x67, 0x10, 0xc0, 0xd5, 0xff, 0x3f, 0x0c, + 0xe3, 0x36, 0x5b, 0x6f, 0xf9, 0xae, 0x07, 0x94, 0x47, 0x40, 0xad, 0xd0, 0x08, 0x7b, 0xab, 0x0d, + 0x51, 0x13, 0xc1, 0xf9, 0x4d, 0x76, 0x89, 0x9f, 0xa0, 0x29, 0xa9, 0xe0, 0xac, 0x34, 0xd4, 0x0e, + 0x3f, 0xb1, 0xb7, 0x8b, 0x21, 0x3e, 0xf3, 0x27, 0xfd, 0x0e, 0x14, 0xf0, 0x71, 0xb0, 0x40, 0x0f, + 0x2f, 0xb2, 0x6c, 0x2c, 0x0f, 0x0a, 0xac, 0xd1, 0x99, 0x35, 0x81, 0xc3, 0x4e, 0x97, 0x54, 0x10, + 0x41, 0x10, 0x1a, 0x5e, 0x63, 0x42, 0xd6, 0x69, 0xc4, 0x12, 0x3c, 0xd3, 0x93, 0x13, 0xc0, 0x11, + 0xf3, 0x35, 0x80, 0xc8, 0xd7, 0x9a, 0x58, 0x62, 0x23, 0x7b, 0x38, 0xe3, 0x37, 0x5c, 0xbf, 0x12, + 0x9d, 0x97, 0xf6, 0xba, 0xbb, 0xd2, 0x22, 0xda, 0x7e, 0x5c, 0x85, 0xf3, 0xea, 0xd8, 0x2b, 0x13, + 0x54, 0x7f, 0x77, 0x27, 0x7c, 0xe9, 0x87, 0x74, 0x2e, 0xa9, 0x30, 0x83, 0xbc, 0xc2, 0x41, 0x14, + 0x3a, 0xdd, 0x01, 0x55, 0x10, 0xa1, 0xfd, 0xcc, 0x73, 0x8e, 0x8d, 0x93, 0x61, 0x46, 0xd5, 0x15, + 0x88, 0xf8, 0x9b, 0xc3, 0xa4, 0x79, 0x73, 0xc7, 0x94, 0xe7, 0x89, 0xa3, 0xc5, 0x09, 0xaa, 0x16, + 0xe6, 0x5a, 0xed, 0xb1, 0xc8, 0x31, 0x09, 0x7f, 0xc9, 0xc0, 0x34, 0xb3, 0x18, 0x8d, 0x3e, 0x17, + 0xd9, 0xeb, 0x5a, 0x3a, 0xe9, 0x0f, 0xfa, 0x58, 0x34, 0xce, 0x20, 0x43, 0x69, 0x3d, 0x7e, 0x18, + 0xb7, 0x49, 0x2c, 0x48, 0x85, 0x47, 0x80, 0xe0, 0x69, 0xe9, 0x9d, 0x53, 0xb4, 0xb9, 0xea, 0x19, + 0x05, 0x6c, 0xb6, 0xde, 0x31, 0x9f, 0x0e, 0xeb, 0x8e, 0x80, 0x99, 0x63, 0x10, 0xf6, 0x95, 0x1a, + 0x6b, 0xce, 0xc0, 0xac, 0x5d, 0xd7, 0x74, 0x53, 0xd3, 0xa7, 0x24, 0x73, 0xcd, 0x72, 0x01, 0x1b, + 0xa2, 0x26, 0x41, 0x31, 0x9a, 0xec, 0xd1, 0xfd, 0x83, 0x52, 0x91, 0x03, 0x9b, 0x68, 0x6b, 0x1c, + 0xcc, 0x84, 0x37, 0x43, 0xf6, 0xa4, 0xab, 0x45, 0xde, 0x75, 0x2c, 0x13, 0x46, 0xec, 0xff, 0x1d, + 0x7e, 0xa1, 0xad, 0xd5, 0x42, 0x7c, 0x25, 0x4e, 0x39, 0x1c, 0x28, 0x23, 0xe2, 0xa3, 0x80, 0x1e, + 0x10, 0x03, 0xdb, 0xa7, 0x2e, 0x34, 0x5f, 0xf6, 0x64, 0x3b, 0x95, 0x33, 0x3f, 0x27, 0x14, 0x1f, + 0x5e, 0xa7, 0xd8, 0x58, 0x1e, 0x14, 0x9b, 0x61, 0xf1, 0x6a, 0xc1, 0x45, 0x9c, 0xed, 0xa8, 0x20, +}; + +/** Exponents table (generator = 0x02 in GF(256) modulo g(x) = 111000011). */ +const uint8_t exponentialTable[256] = { + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0xc3, 0x45, 0x8a, 0xd7, 0x6d, 0xda, 0x77, 0xee, + 0x1f, 0x3e, 0x7c, 0xf8, 0x33, 0x66, 0xcc, 0x5b, 0xb6, 0xaf, 0x9d, 0xf9, 0x31, 0x62, 0xc4, 0x4b, + 0x96, 0xef, 0x1d, 0x3a, 0x74, 0xe8, 0x13, 0x26, 0x4c, 0x98, 0xf3, 0x25, 0x4a, 0x94, 0xeb, 0x15, + 0x2a, 0x54, 0xa8, 0x93, 0xe5, 0x09, 0x12, 0x24, 0x48, 0x90, 0xe3, 0x05, 0x0a, 0x14, 0x28, 0x50, + 0xa0, 0x83, 0xc5, 0x49, 0x92, 0xe7, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0x63, 0xc6, 0x4f, 0x9e, 0xff, + 0x3d, 0x7a, 0xf4, 0x2b, 0x56, 0xac, 0x9b, 0xf5, 0x29, 0x52, 0xa4, 0x8b, 0xd5, 0x69, 0xd2, 0x67, + 0xce, 0x5f, 0xbe, 0xbf, 0xbd, 0xb9, 0xb1, 0xa1, 0x81, 0xc1, 0x41, 0x82, 0xc7, 0x4d, 0x9a, 0xf7, + 0x2d, 0x5a, 0xb4, 0xab, 0x95, 0xe9, 0x11, 0x22, 0x44, 0x88, 0xd3, 0x65, 0xca, 0x57, 0xae, 0x9f, + 0xfd, 0x39, 0x72, 0xe4, 0x0b, 0x16, 0x2c, 0x58, 0xb0, 0xa3, 0x85, 0xc9, 0x51, 0xa2, 0x87, 0xcd, + 0x59, 0xb2, 0xa7, 0x8d, 0xd9, 0x71, 0xe2, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0x03, 0x06, 0x0c, + 0x18, 0x30, 0x60, 0xc0, 0x43, 0x86, 0xcf, 0x5d, 0xba, 0xb7, 0xad, 0x99, 0xf1, 0x21, 0x42, 0x84, + 0xcb, 0x55, 0xaa, 0x97, 0xed, 0x19, 0x32, 0x64, 0xc8, 0x53, 0xa6, 0x8f, 0xdd, 0x79, 0xf2, 0x27, + 0x4e, 0x9c, 0xfb, 0x35, 0x6a, 0xd4, 0x6b, 0xd6, 0x6f, 0xde, 0x7f, 0xfe, 0x3f, 0x7e, 0xfc, 0x3b, + 0x76, 0xec, 0x1b, 0x36, 0x6c, 0xd8, 0x73, 0xe6, 0x0f, 0x1e, 0x3c, 0x78, 0xf0, 0x23, 0x46, 0x8c, + 0xdb, 0x75, 0xea, 0x17, 0x2e, 0x5c, 0xb8, 0xb3, 0xa5, 0x89, 0xd1, 0x61, 0xc2, 0x47, 0x8e, 0xdf, + 0x7d, 0xfa, 0x37, 0x6e, 0xdc, 0x7b, 0xf6, 0x2f, 0x5e, 0xbc, 0xbb, 0xb5, 0xa9, 0x91, 0xe1, 0x01 +}; + + +/** Discrete logarithms table (generator = 0x02 in GF(256) modulo g(x) = 111000011). */ +const uint8_t logarithmicTable[256] = { + 0x00, 0x00, 0x01, 0x9d, 0x02, 0x3b, 0x9e, 0x97, 0x03, 0x35, 0x3c, 0x84, 0x9f, 0x46, 0x98, 0xd8, + 0x04, 0x76, 0x36, 0x26, 0x3d, 0x2f, 0x85, 0xe3, 0xa0, 0xb5, 0x47, 0xd2, 0x99, 0x22, 0xd9, 0x10, + 0x05, 0xad, 0x77, 0xdd, 0x37, 0x2b, 0x27, 0xbf, 0x3e, 0x58, 0x30, 0x53, 0x86, 0x70, 0xe4, 0xf7, + 0xa1, 0x1c, 0xb6, 0x14, 0x48, 0xc3, 0xd3, 0xf2, 0x9a, 0x81, 0x23, 0xcf, 0xda, 0x50, 0x11, 0xcc, + 0x06, 0x6a, 0xae, 0xa4, 0x78, 0x09, 0xde, 0xed, 0x38, 0x43, 0x2c, 0x1f, 0x28, 0x6d, 0xc0, 0x4d, + 0x3f, 0x8c, 0x59, 0xb9, 0x31, 0xb1, 0x54, 0x7d, 0x87, 0x90, 0x71, 0x17, 0xe5, 0xa7, 0xf8, 0x61, + 0xa2, 0xeb, 0x1d, 0x4b, 0xb7, 0x7b, 0x15, 0x5f, 0x49, 0x5d, 0xc4, 0xc6, 0xd4, 0x0c, 0xf3, 0xc8, + 0x9b, 0x95, 0x82, 0xd6, 0x24, 0xe1, 0xd0, 0x0e, 0xdb, 0xbd, 0x51, 0xf5, 0x12, 0xf0, 0xcd, 0xca, + 0x07, 0x68, 0x6b, 0x41, 0xaf, 0x8a, 0xa5, 0x8e, 0x79, 0xe9, 0x0a, 0x5b, 0xdf, 0x93, 0xee, 0xbb, + 0x39, 0xfd, 0x44, 0x33, 0x2d, 0x74, 0x20, 0xb3, 0x29, 0xab, 0x6e, 0x56, 0xc1, 0x1a, 0x4e, 0x7f, + 0x40, 0x67, 0x8d, 0x89, 0x5a, 0xe8, 0xba, 0x92, 0x32, 0xfc, 0xb2, 0x73, 0x55, 0xaa, 0x7e, 0x19, + 0x88, 0x66, 0x91, 0xe7, 0x72, 0xfb, 0x18, 0xa9, 0xe6, 0x65, 0xa8, 0xfa, 0xf9, 0x64, 0x62, 0x63, + 0xa3, 0x69, 0xec, 0x08, 0x1e, 0x42, 0x4c, 0x6c, 0xb8, 0x8b, 0x7c, 0xb0, 0x16, 0x8f, 0x60, 0xa6, + 0x4a, 0xea, 0x5e, 0x7a, 0xc5, 0x5c, 0xc7, 0x0b, 0xd5, 0x94, 0x0d, 0xe0, 0xf4, 0xbc, 0xc9, 0xef, + 0x9c, 0xfe, 0x96, 0x3a, 0x83, 0x34, 0xd7, 0x45, 0x25, 0x75, 0xe2, 0x2e, 0xd1, 0xb4, 0x0f, 0x21, + 0xdc, 0xac, 0xbe, 0x2a, 0x52, 0x57, 0xf6, 0x6f, 0x13, 0x1b, 0xf1, 0xc2, 0xce, 0x80, 0xcb, 0x4f +}; + +/** Pi substitution box defined by GOST 34.12 '2015. */ +const uint8_t Pi[256] = { + 0xfc, 0xee, 0xdd, 0x11, 0xcf, 0x6e, 0x31, 0x16, 0xfb, 0xc4, 0xfa, 0xda, 0x23, 0xc5, 0x04, 0x4d, + 0xe9, 0x77, 0xf0, 0xdb, 0x93, 0x2e, 0x99, 0xba, 0x17, 0x36, 0xf1, 0xbb, 0x14, 0xcd, 0x5f, 0xc1, + 0xf9, 0x18, 0x65, 0x5a, 0xe2, 0x5c, 0xef, 0x21, 0x81, 0x1c, 0x3c, 0x42, 0x8b, 0x01, 0x8e, 0x4f, + 0x05, 0x84, 0x02, 0xae, 0xe3, 0x6a, 0x8f, 0xa0, 0x06, 0x0b, 0xed, 0x98, 0x7f, 0xd4, 0xd3, 0x1f, + 0xeb, 0x34, 0x2c, 0x51, 0xea, 0xc8, 0x48, 0xab, 0xf2, 0x2a, 0x68, 0xa2, 0xfd, 0x3a, 0xce, 0xcc, + 0xb5, 0x70, 0x0e, 0x56, 0x08, 0x0c, 0x76, 0x12, 0xbf, 0x72, 0x13, 0x47, 0x9c, 0xb7, 0x5d, 0x87, + 0x15, 0xa1, 0x96, 0x29, 0x10, 0x7b, 0x9a, 0xc7, 0xf3, 0x91, 0x78, 0x6f, 0x9d, 0x9e, 0xb2, 0xb1, + 0x32, 0x75, 0x19, 0x3d, 0xff, 0x35, 0x8a, 0x7e, 0x6d, 0x54, 0xc6, 0x80, 0xc3, 0xbd, 0x0d, 0x57, + 0xdf, 0xf5, 0x24, 0xa9, 0x3e, 0xa8, 0x43, 0xc9, 0xd7, 0x79, 0xd6, 0xf6, 0x7c, 0x22, 0xb9, 0x03, + 0xe0, 0x0f, 0xec, 0xde, 0x7a, 0x94, 0xb0, 0xbc, 0xdc, 0xe8, 0x28, 0x50, 0x4e, 0x33, 0x0a, 0x4a, + 0xa7, 0x97, 0x60, 0x73, 0x1e, 0x00, 0x62, 0x44, 0x1a, 0xb8, 0x38, 0x82, 0x64, 0x9f, 0x26, 0x41, + 0xad, 0x45, 0x46, 0x92, 0x27, 0x5e, 0x55, 0x2f, 0x8c, 0xa3, 0xa5, 0x7d, 0x69, 0xd5, 0x95, 0x3b, + 0x07, 0x58, 0xb3, 0x40, 0x86, 0xac, 0x1d, 0xf7, 0x30, 0x37, 0x6b, 0xe4, 0x88, 0xd9, 0xe7, 0x89, + 0xe1, 0x1b, 0x83, 0x49, 0x4c, 0x3f, 0xf8, 0xfe, 0x8d, 0x53, 0xaa, 0x90, 0xca, 0xd8, 0x85, 0x61, + 0x20, 0x71, 0x67, 0xa4, 0x2d, 0x2b, 0x09, 0x5b, 0xcb, 0x9b, 0x25, 0xd0, 0xbe, 0xe5, 0x6c, 0x52, + 0x59, 0xa6, 0x74, 0xd2, 0xe6, 0xf4, 0xb4, 0xc0, 0xd1, 0x66, 0xaf, 0xc2, 0x39, 0x4b, 0x63, 0xb6, +}; + +/** Inversed Pi substitution box. */ +const uint8_t InversedPi[256] = { + 0xa5, 0x2d, 0x32, 0x8f, 0x0e, 0x30, 0x38, 0xc0, 0x54, 0xe6, 0x9e, 0x39, 0x55, 0x7e, 0x52, 0x91, + 0x64, 0x03, 0x57, 0x5a, 0x1c, 0x60, 0x07, 0x18, 0x21, 0x72, 0xa8, 0xd1, 0x29, 0xc6, 0xa4, 0x3f, + 0xe0, 0x27, 0x8d, 0x0c, 0x82, 0xea, 0xae, 0xb4, 0x9a, 0x63, 0x49, 0xe5, 0x42, 0xe4, 0x15, 0xb7, + 0xc8, 0x06, 0x70, 0x9d, 0x41, 0x75, 0x19, 0xc9, 0xaa, 0xfc, 0x4d, 0xbf, 0x2a, 0x73, 0x84, 0xd5, + 0xc3, 0xaf, 0x2b, 0x86, 0xa7, 0xb1, 0xb2, 0x5b, 0x46, 0xd3, 0x9f, 0xfd, 0xd4, 0x0f, 0x9c, 0x2f, + 0x9b, 0x43, 0xef, 0xd9, 0x79, 0xb6, 0x53, 0x7f, 0xc1, 0xf0, 0x23, 0xe7, 0x25, 0x5e, 0xb5, 0x1e, + 0xa2, 0xdf, 0xa6, 0xfe, 0xac, 0x22, 0xf9, 0xe2, 0x4a, 0xbc, 0x35, 0xca, 0xee, 0x78, 0x05, 0x6b, + 0x51, 0xe1, 0x59, 0xa3, 0xf2, 0x71, 0x56, 0x11, 0x6a, 0x89, 0x94, 0x65, 0x8c, 0xbb, 0x77, 0x3c, + 0x7b, 0x28, 0xab, 0xd2, 0x31, 0xde, 0xc4, 0x5f, 0xcc, 0xcf, 0x76, 0x2c, 0xb8, 0xd8, 0x2e, 0x36, + 0xdb, 0x69, 0xb3, 0x14, 0x95, 0xbe, 0x62, 0xa1, 0x3b, 0x16, 0x66, 0xe9, 0x5c, 0x6c, 0x6d, 0xad, + 0x37, 0x61, 0x4b, 0xb9, 0xe3, 0xba, 0xf1, 0xa0, 0x85, 0x83, 0xda, 0x47, 0xc5, 0xb0, 0x33, 0xfa, + 0x96, 0x6f, 0x6e, 0xc2, 0xf6, 0x50, 0xff, 0x5d, 0xa9, 0x8e, 0x17, 0x1b, 0x97, 0x7d, 0xec, 0x58, + 0xf7, 0x1f, 0xfb, 0x7c, 0x09, 0x0d, 0x7a, 0x67, 0x45, 0x87, 0xdc, 0xe8, 0x4f, 0x1d, 0x4e, 0x04, + 0xeb, 0xf8, 0xf3, 0x3e, 0x3d, 0xbd, 0x8a, 0x88, 0xdd, 0xcd, 0x0b, 0x13, 0x98, 0x02, 0x93, 0x80, + 0x90, 0xd0, 0x24, 0x34, 0xcb, 0xed, 0xf4, 0xce, 0x99, 0x10, 0x44, 0x40, 0x92, 0x3a, 0x01, 0x26, + 0x12, 0x1a, 0x48, 0x68, 0xf5, 0x81, 0x8b, 0xc7, 0xd6, 0x20, 0x0a, 0x08, 0x00, 0x4c, 0xd7, 0x74, +}; + +/** L transformation matrix over GF(256). */ +const uint8_t LTransformationMatrix[16][16] = { + {0xcf, 0x6e, 0xa2, 0x76, 0x72, 0x6c, 0x48, 0x7a, 0xb8, 0x5d, 0x27, 0xbd, 0x10, 0xdd, 0x84, 0x94,}, + {0x98, 0x20, 0xc8, 0x33, 0xf2, 0x76, 0xd5, 0xe6, 0x49, 0xd4, 0x9f, 0x95, 0xe9, 0x99, 0x2d, 0x20,}, + {0x74, 0xc6, 0x87, 0x10, 0x6b, 0xec, 0x62, 0x4e, 0x87, 0xb8, 0xbe, 0x5e, 0xd0, 0x75, 0x74, 0x85,}, + {0xbf, 0xda, 0x70, 0x0c, 0xca, 0x0c, 0x17, 0x1a, 0x14, 0x2f, 0x68, 0x30, 0xd9, 0xca, 0x96, 0x10,}, + {0x93, 0x90, 0x68, 0x1c, 0x20, 0xc5, 0x06, 0xbb, 0xcb, 0x8d, 0x1a, 0xe9, 0xf3, 0x97, 0x5d, 0xc2,}, + {0x8e, 0x48, 0x43, 0x11, 0xeb, 0xbc, 0x2d, 0x2e, 0x8d, 0x12, 0x7c, 0x60, 0x94, 0x44, 0x77, 0xc0,}, + {0xf2, 0x89, 0x1c, 0xd6, 0x02, 0xaf, 0xc4, 0xf1, 0xab, 0xee, 0xad, 0xbf, 0x3d, 0x5a, 0x6f, 0x01,}, + {0xf3, 0x9c, 0x2b, 0x6a, 0xa4, 0x6e, 0xe7, 0xbe, 0x49, 0xf6, 0xc9, 0x10, 0xaf, 0xe0, 0xde, 0xfb,}, + {0x0a, 0xc1, 0xa1, 0xa6, 0x8d, 0xa3, 0xd5, 0xd4, 0x09, 0x08, 0x84, 0xef, 0x7b, 0x30, 0x54, 0x01,}, + {0xbf, 0x64, 0x63, 0xd7, 0xd4, 0xe1, 0xeb, 0xaf, 0x6c, 0x54, 0x2f, 0x39, 0xff, 0xa6, 0xb4, 0xc0,}, + {0xf6, 0xb8, 0x30, 0xf6, 0xc4, 0x90, 0x99, 0x37, 0x2a, 0x0f, 0xeb, 0xec, 0x64, 0x31, 0x8d, 0xc2,}, + {0xa9, 0x2d, 0x6b, 0x49, 0x01, 0x58, 0x78, 0xb1, 0x01, 0xf3, 0xfe, 0x91, 0x91, 0xd3, 0xd1, 0x10,}, + {0xea, 0x86, 0x9f, 0x07, 0x65, 0x0e, 0x52, 0xd4, 0x60, 0x98, 0xc6, 0x7f, 0x52, 0xdf, 0x44, 0x85,}, + {0x8e, 0x44, 0x30, 0x14, 0xdd, 0x02, 0xf5, 0x2a, 0x8e, 0xc8, 0x48, 0x48, 0xf8, 0x48, 0x3c, 0x20,}, + {0x4d, 0xd0, 0xe3, 0xe8, 0x4c, 0xc3, 0x16, 0x6e, 0x4b, 0x7f, 0xa2, 0x89, 0x0d, 0x64, 0xa5, 0x94,}, + {0x6e, 0xa2, 0x76, 0x72, 0x6c, 0x48, 0x7a, 0xb8, 0x5d, 0x27, 0xbd, 0x10, 0xdd, 0x84, 0x94, 0x01,}, +}; + +/** Inversed L transformation matrix over GF(256). */ +const uint8_t inversedLTransformationMatrix[16][16] = { + {0x01, 0x94, 0x84, 0xdd, 0x10, 0xbd, 0x27, 0x5d, 0xb8, 0x7a, 0x48, 0x6c, 0x72, 0x76, 0xa2, 0x6e,}, + {0x94, 0xa5, 0x64, 0x0d, 0x89, 0xa2, 0x7f, 0x4b, 0x6e, 0x16, 0xc3, 0x4c, 0xe8, 0xe3, 0xd0, 0x4d,}, + {0x20, 0x3c, 0x48, 0xf8, 0x48, 0x48, 0xc8, 0x8e, 0x2a, 0xf5, 0x02, 0xdd, 0x14, 0x30, 0x44, 0x8e,}, + {0x85, 0x44, 0xdf, 0x52, 0x7f, 0xc6, 0x98, 0x60, 0xd4, 0x52, 0x0e, 0x65, 0x07, 0x9f, 0x86, 0xea,}, + {0x10, 0xd1, 0xd3, 0x91, 0x91, 0xfe, 0xf3, 0x01, 0xb1, 0x78, 0x58, 0x01, 0x49, 0x6b, 0x2d, 0xa9,}, + {0xc2, 0x8d, 0x31, 0x64, 0xec, 0xeb, 0x0f, 0x2a, 0x37, 0x99, 0x90, 0xc4, 0xf6, 0x30, 0xb8, 0xf6,}, + {0xc0, 0xb4, 0xa6, 0xff, 0x39, 0x2f, 0x54, 0x6c, 0xaf, 0xeb, 0xe1, 0xd4, 0xd7, 0x63, 0x64, 0xbf,}, + {0x01, 0x54, 0x30, 0x7b, 0xef, 0x84, 0x08, 0x09, 0xd4, 0xd5, 0xa3, 0x8d, 0xa6, 0xa1, 0xc1, 0x0a,}, + {0xfb, 0xde, 0xe0, 0xaf, 0x10, 0xc9, 0xf6, 0x49, 0xbe, 0xe7, 0x6e, 0xa4, 0x6a, 0x2b, 0x9c, 0xf3,}, + {0x01, 0x6f, 0x5a, 0x3d, 0xbf, 0xad, 0xee, 0xab, 0xf1, 0xc4, 0xaf, 0x02, 0xd6, 0x1c, 0x89, 0xf2,}, + {0xc0, 0x77, 0x44, 0x94, 0x60, 0x7c, 0x12, 0x8d, 0x2e, 0x2d, 0xbc, 0xeb, 0x11, 0x43, 0x48, 0x8e,}, + {0xc2, 0x5d, 0x97, 0xf3, 0xe9, 0x1a, 0x8d, 0xcb, 0xbb, 0x06, 0xc5, 0x20, 0x1c, 0x68, 0x90, 0x93,}, + {0x10, 0x96, 0xca, 0xd9, 0x30, 0x68, 0x2f, 0x14, 0x1a, 0x17, 0x0c, 0xca, 0x0c, 0x70, 0xda, 0xbf,}, + {0x85, 0x74, 0x75, 0xd0, 0x5e, 0xbe, 0xb8, 0x87, 0x4e, 0x62, 0xec, 0x6b, 0x10, 0x87, 0xc6, 0x74,}, + {0x20, 0x2d, 0x99, 0xe9, 0x95, 0x9f, 0xd4, 0x49, 0xe6, 0xd5, 0x76, 0xf2, 0x33, 0xc8, 0x20, 0x98,}, + {0x94, 0x84, 0xdd, 0x10, 0xbd, 0x27, 0x5d, 0xb8, 0x7a, 0x48, 0x6c, 0x72, 0x76, 0xa2, 0x6e, 0xcf,}, +}; From 6e58ea1e86e1801c998c3804c7c1019784dec583 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:10:02 -0500 Subject: [PATCH 323/576] Create tables.h --- .../encryption/gost2015_kuznechik/shared/tables.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.h diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.h b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.h new file mode 100644 index 000000000..8835453ab --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.h @@ -0,0 +1,14 @@ +#if !defined LIBGOST15_COMMON_TABLES_HEADER_INCLUDED_ +#define LIBGOST15_COMMON_TABLES_HEADER_INCLUDED_ + +#include + +extern const uint8_t roundConstants[512]; +extern const uint8_t exponentialTable[256]; +extern const uint8_t logarithmicTable[256]; +extern const uint8_t Pi[256]; +extern const uint8_t InversedPi[256]; +extern const uint8_t LTransformationMatrix[16][16]; +extern const uint8_t inversedLTransformationMatrix[16][16]; + +#endif From 456966667c8b9fff12811310820642fcfa9431ea Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:10:25 -0500 Subject: [PATCH 324/576] Create ecrypt-config.h --- .../encryption/salsa20/ecrypt-config.h | 272 ++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 stratum/algos/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h diff --git a/stratum/algos/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h b/stratum/algos/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h new file mode 100644 index 000000000..5dcdf6156 --- /dev/null +++ b/stratum/algos/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h @@ -0,0 +1,272 @@ +/* ecrypt-config.h */ + +/* *** Normally, it should not be necessary to edit this file. *** */ + +#ifndef ECRYPT_CONFIG +#define ECRYPT_CONFIG + +/* ------------------------------------------------------------------------- */ + +/* Guess the endianness of the target architecture. */ + +/* + * The LITTLE endian machines: + */ +#if defined(__ultrix) /* Older MIPS */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(__alpha) /* Alpha */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(i386) /* x86 (gcc) */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(__i386) /* x86 (gcc) */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(_M_IX86) /* x86 (MSC, Borland) */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(_MSC_VER) /* x86 (surely MSC) */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ +#define ECRYPT_LITTLE_ENDIAN + +/* + * The BIG endian machines: + */ +#elif defined(sun) /* Newer Sparc's */ +#define ECRYPT_BIG_ENDIAN +#elif defined(__ppc__) /* PowerPC */ +#define ECRYPT_BIG_ENDIAN + +/* + * Finally machines with UNKNOWN endianness: + */ +#elif defined (_AIX) /* RS6000 */ +#define ECRYPT_UNKNOWN +#elif defined(__hpux) /* HP-PA */ +#define ECRYPT_UNKNOWN +#elif defined(__aux) /* 68K */ +#define ECRYPT_UNKNOWN +#elif defined(__dgux) /* 88K (but P6 in latest boxes) */ +#define ECRYPT_UNKNOWN +#elif defined(__sgi) /* Newer MIPS */ +#define ECRYPT_UNKNOWN +#else /* Any other processor */ +#define ECRYPT_UNKNOWN +#endif + +/* ------------------------------------------------------------------------- */ + +/* + * Find minimal-width types to store 8-bit, 16-bit, 32-bit, and 64-bit + * integers. + * + * Note: to enable 64-bit types on 32-bit compilers, it might be + * necessary to switch from ISO C90 mode to ISO C99 mode (e.g., gcc + * -std=c99). + */ + +#include + +/* --- check char --- */ + +#if (UCHAR_MAX / 0xFU > 0xFU) +#ifndef I8T +#define I8T char +#define U8C(v) (v##U) + +#if (UCHAR_MAX == 0xFFU) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (UCHAR_MAX / 0xFFU > 0xFFU) +#ifndef I16T +#define I16T char +#define U16C(v) (v##U) +#endif + +#if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) +#ifndef I32T +#define I32T char +#define U32C(v) (v##U) +#endif + +#if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) +#ifndef I64T +#define I64T char +#define U64C(v) (v##U) +#define ECRYPT_NATIVE64 +#endif + +#endif +#endif +#endif +#endif + +/* --- check short --- */ + +#if (USHRT_MAX / 0xFU > 0xFU) +#ifndef I8T +#define I8T short +#define U8C(v) (v##U) + +#if (USHRT_MAX == 0xFFU) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (USHRT_MAX / 0xFFU > 0xFFU) +#ifndef I16T +#define I16T short +#define U16C(v) (v##U) +#endif + +#if (USHRT_MAX / 0xFFFFU > 0xFFFFU) +#ifndef I32T +#define I32T short +#define U32C(v) (v##U) +#endif + +#if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) +#ifndef I64T +#define I64T short +#define U64C(v) (v##U) +#define ECRYPT_NATIVE64 +#endif + +#endif +#endif +#endif +#endif + +/* --- check int --- */ + +#if (UINT_MAX / 0xFU > 0xFU) +#ifndef I8T +#define I8T int +#define U8C(v) (v##U) + +#if (ULONG_MAX == 0xFFU) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (UINT_MAX / 0xFFU > 0xFFU) +#ifndef I16T +#define I16T int +#define U16C(v) (v##U) +#endif + +#if (UINT_MAX / 0xFFFFU > 0xFFFFU) +#ifndef I32T +#define I32T int +#define U32C(v) (v##U) +#endif + +#if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) +#ifndef I64T +#define I64T int +#define U64C(v) (v##U) +#define ECRYPT_NATIVE64 +#endif + +#endif +#endif +#endif +#endif + +/* --- check long --- */ + +#if (ULONG_MAX / 0xFUL > 0xFUL) +#ifndef I8T +#define I8T long +#define U8C(v) (v##UL) + +#if (ULONG_MAX == 0xFFUL) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (ULONG_MAX / 0xFFUL > 0xFFUL) +#ifndef I16T +#define I16T long +#define U16C(v) (v##UL) +#endif + +#if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) +#ifndef I32T +#define I32T long +#define U32C(v) (v##UL) +#endif + +#if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) +#ifndef I64T +#define I64T long +#define U64C(v) (v##UL) +#define ECRYPT_NATIVE64 +#endif + +#endif +#endif +#endif +#endif + +/* --- check long long --- */ + +#ifdef ULLONG_MAX + +#if (ULLONG_MAX / 0xFULL > 0xFULL) +#ifndef I8T +#define I8T long long +#define U8C(v) (v##ULL) + +#if (ULLONG_MAX == 0xFFULL) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (ULLONG_MAX / 0xFFULL > 0xFFULL) +#ifndef I16T +#define I16T long long +#define U16C(v) (v##ULL) +#endif + +#if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) +#ifndef I32T +#define I32T long long +#define U32C(v) (v##ULL) +#endif + +#if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) +#ifndef I64T +#define I64T long long +#define U64C(v) (v##ULL) +#endif + +#endif +#endif +#endif +#endif + +#endif + +/* --- check __int64 --- */ + +#ifdef _UI64_MAX + +#if (_UI64_MAX / 0xFFFFFFFFull > 0xFFFFFFFFull) // 0xFFFFFFFFui64 > 0xFFFFFFFFui64 +#ifndef I64T +#define I64T __int64 +#define U64C(v) (v##ui64) +#endif + +#endif + +#endif + +/* ------------------------------------------------------------------------- */ + +#endif From b6bfc3a8dfa7f99b823329678ef61d995e3eeb79 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:10:49 -0500 Subject: [PATCH 325/576] Create ecrypt-machine.h --- .../encryption/salsa20/ecrypt-machine.h | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-machine.h diff --git a/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-machine.h b/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-machine.h new file mode 100644 index 000000000..3e550d024 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-machine.h @@ -0,0 +1,46 @@ +/* ecrypt-machine.h */ + +/* + * This file is included by 'ecrypt-portable.h'. It allows to override + * the default macros for specific platforms. Please carefully check + * the machine code generated by your compiler (with optimisations + * turned on) before deciding to edit this file. + */ + +/* ------------------------------------------------------------------------- */ + +#if (defined(ECRYPT_DEFAULT_ROT) && !defined(ECRYPT_MACHINE_ROT)) + +#define ECRYPT_MACHINE_ROT + +#if (defined(WIN32) && defined(_MSC_VER)) + +#undef ROTL32 +#undef ROTR32 +#undef ROTL64 +#undef ROTR64 + +#include + +#define ROTL32(v, n) _lrotl(v, n) +#define ROTR32(v, n) _lrotr(v, n) +#define ROTL64(v, n) _rotl64(v, n) +#define ROTR64(v, n) _rotr64(v, n) + +#endif + +#endif + +/* ------------------------------------------------------------------------- */ + +#if (defined(ECRYPT_DEFAULT_SWAP) && !defined(ECRYPT_MACHINE_SWAP)) + +#define ECRYPT_MACHINE_SWAP + +/* + * If you want to overwrite the default swap macros, put it here. And so on. + */ + +#endif + +/* ------------------------------------------------------------------------- */ From 96942805f267a31a06cf64a2934eae4d66996e0e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:11:17 -0500 Subject: [PATCH 326/576] Create ecrypt-portable.h --- .../encryption/salsa20/ecrypt-portable.h | 303 ++++++++++++++++++ 1 file changed, 303 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-portable.h diff --git a/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-portable.h b/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-portable.h new file mode 100644 index 000000000..72a92833c --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-portable.h @@ -0,0 +1,303 @@ +/* ecrypt-portable.h */ + +/* + * WARNING: the conversions defined below are implemented as macros, + * and should be used carefully. They should NOT be used with + * parameters which perform some action. E.g., the following two lines + * are not equivalent: + * + * 1) ++x; y = ROTL32(x, n); + * 2) y = ROTL32(++x, n); + */ + +/* + * *** Please do not edit this file. *** + * + * The default macros can be overridden for specific architectures by + * editing 'ecrypt-machine.h'. + */ + +#ifndef ECRYPT_PORTABLE +#define ECRYPT_PORTABLE + +#include "ecrypt-config.h" + +/* ------------------------------------------------------------------------- */ + +/* + * The following types are defined (if available): + * + * u8: unsigned integer type, at least 8 bits + * u16: unsigned integer type, at least 16 bits + * u32: unsigned integer type, at least 32 bits + * u64: unsigned integer type, at least 64 bits + * + * s8, s16, s32, s64 -> signed counterparts of u8, u16, u32, u64 + * + * The selection of minimum-width integer types is taken care of by + * 'ecrypt-config.h'. Note: to enable 64-bit types on 32-bit + * compilers, it might be necessary to switch from ISO C90 mode to ISO + * C99 mode (e.g., gcc -std=c99). + */ + +#ifdef I8T +typedef signed I8T s8; +typedef unsigned I8T u8; +#endif + +#ifdef I16T +typedef signed I16T s16; +typedef unsigned I16T u16; +#endif + +#ifdef I32T +typedef signed I32T s32; +typedef unsigned I32T u32; +#endif + +#ifdef I64T +typedef signed I64T s64; +typedef unsigned I64T u64; +#endif + +/* + * The following macros are used to obtain exact-width results. + */ + +#define U8V(v) ((u8)(v) & U8C(0xFF)) +#define U16V(v) ((u16)(v) & U16C(0xFFFF)) +#define U32V(v) ((u32)(v) & U32C(0xFFFFFFFF)) +#define U64V(v) ((u64)(v) & U64C(0xFFFFFFFFFFFFFFFF)) + +/* ------------------------------------------------------------------------- */ + +/* + * The following macros return words with their bits rotated over n + * positions to the left/right. + */ + +#define ECRYPT_DEFAULT_ROT + +#define ROTL8(v, n) \ + (U8V((v) << (n)) | ((v) >> (8 - (n)))) + +#define ROTL16(v, n) \ + (U16V((v) << (n)) | ((v) >> (16 - (n)))) + +#define ROTL32(v, n) \ + (U32V((v) << (n)) | ((v) >> (32 - (n)))) + +#define ROTL64(v, n) \ + (U64V((v) << (n)) | ((v) >> (64 - (n)))) + +#define ROTR8(v, n) ROTL8(v, 8 - (n)) +#define ROTR16(v, n) ROTL16(v, 16 - (n)) +#define ROTR32(v, n) ROTL32(v, 32 - (n)) +#define ROTR64(v, n) ROTL64(v, 64 - (n)) + +#include "ecrypt-machine.h" + +/* ------------------------------------------------------------------------- */ + +/* + * The following macros return a word with bytes in reverse order. + */ + +#define ECRYPT_DEFAULT_SWAP + +#define SWAP16(v) \ + ROTL16(v, 8) + +#define SWAP32(v) \ + ((ROTL32(v, 8) & U32C(0x00FF00FF)) | \ + (ROTL32(v, 24) & U32C(0xFF00FF00))) + +#ifdef ECRYPT_NATIVE64 +#define SWAP64(v) \ + ((ROTL64(v, 8) & U64C(0x000000FF000000FF)) | \ + (ROTL64(v, 24) & U64C(0x0000FF000000FF00)) | \ + (ROTL64(v, 40) & U64C(0x00FF000000FF0000)) | \ + (ROTL64(v, 56) & U64C(0xFF000000FF000000))) +#else +#define SWAP64(v) \ + (((u64)SWAP32(U32V(v)) << 32) | (u64)SWAP32(U32V(v >> 32))) +#endif + +#include "ecrypt-machine.h" + +#define ECRYPT_DEFAULT_WTOW + +#ifdef ECRYPT_LITTLE_ENDIAN +#define U16TO16_LITTLE(v) (v) +#define U32TO32_LITTLE(v) (v) +#define U64TO64_LITTLE(v) (v) + +#define U16TO16_BIG(v) SWAP16(v) +#define U32TO32_BIG(v) SWAP32(v) +#define U64TO64_BIG(v) SWAP64(v) +#endif + +#ifdef ECRYPT_BIG_ENDIAN +#define U16TO16_LITTLE(v) SWAP16(v) +#define U32TO32_LITTLE(v) SWAP32(v) +#define U64TO64_LITTLE(v) SWAP64(v) + +#define U16TO16_BIG(v) (v) +#define U32TO32_BIG(v) (v) +#define U64TO64_BIG(v) (v) +#endif + +#include "ecrypt-machine.h" + +/* + * The following macros load words from an array of bytes with + * different types of endianness, and vice versa. + */ + +#define ECRYPT_DEFAULT_BTOW + +#if (!defined(ECRYPT_UNKNOWN) && defined(ECRYPT_I8T_IS_BYTE)) + +#define U8TO16_LITTLE(p) U16TO16_LITTLE(((u16*)(p))[0]) +#define U8TO32_LITTLE(p) U32TO32_LITTLE(((u32*)(p))[0]) +#define U8TO64_LITTLE(p) U64TO64_LITTLE(((u64*)(p))[0]) + +#define U8TO16_BIG(p) U16TO16_BIG(((u16*)(p))[0]) +#define U8TO32_BIG(p) U32TO32_BIG(((u32*)(p))[0]) +#define U8TO64_BIG(p) U64TO64_BIG(((u64*)(p))[0]) + +#define U16TO8_LITTLE(p, v) (((u16*)(p))[0] = U16TO16_LITTLE(v)) +#define U32TO8_LITTLE(p, v) (((u32*)(p))[0] = U32TO32_LITTLE(v)) +#define U64TO8_LITTLE(p, v) (((u64*)(p))[0] = U64TO64_LITTLE(v)) + +#define U16TO8_BIG(p, v) (((u16*)(p))[0] = U16TO16_BIG(v)) +#define U32TO8_BIG(p, v) (((u32*)(p))[0] = U32TO32_BIG(v)) +#define U64TO8_BIG(p, v) (((u64*)(p))[0] = U64TO64_BIG(v)) + +#else + +#define U8TO16_LITTLE(p) \ + (((u16)((p)[0]) ) | \ + ((u16)((p)[1]) << 8)) + +#define U8TO32_LITTLE(p) \ + (((u32)((p)[0]) ) | \ + ((u32)((p)[1]) << 8) | \ + ((u32)((p)[2]) << 16) | \ + ((u32)((p)[3]) << 24)) + +#ifdef ECRYPT_NATIVE64 +#define U8TO64_LITTLE(p) \ + (((u64)((p)[0]) ) | \ + ((u64)((p)[1]) << 8) | \ + ((u64)((p)[2]) << 16) | \ + ((u64)((p)[3]) << 24) | \ + ((u64)((p)[4]) << 32) | \ + ((u64)((p)[5]) << 40) | \ + ((u64)((p)[6]) << 48) | \ + ((u64)((p)[7]) << 56)) +#else +#define U8TO64_LITTLE(p) \ + ((u64)U8TO32_LITTLE(p) | ((u64)U8TO32_LITTLE((p) + 4) << 32)) +#endif + +#define U8TO16_BIG(p) \ + (((u16)((p)[0]) << 8) | \ + ((u16)((p)[1]) )) + +#define U8TO32_BIG(p) \ + (((u32)((p)[0]) << 24) | \ + ((u32)((p)[1]) << 16) | \ + ((u32)((p)[2]) << 8) | \ + ((u32)((p)[3]) )) + +#ifdef ECRYPT_NATIVE64 +#define U8TO64_BIG(p) \ + (((u64)((p)[0]) << 56) | \ + ((u64)((p)[1]) << 48) | \ + ((u64)((p)[2]) << 40) | \ + ((u64)((p)[3]) << 32) | \ + ((u64)((p)[4]) << 24) | \ + ((u64)((p)[5]) << 16) | \ + ((u64)((p)[6]) << 8) | \ + ((u64)((p)[7]) )) +#else +#define U8TO64_BIG(p) \ + (((u64)U8TO32_BIG(p) << 32) | (u64)U8TO32_BIG((p) + 4)) +#endif + +#define U16TO8_LITTLE(p, v) \ + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + } while (0) + +#define U32TO8_LITTLE(p, v) \ + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + (p)[2] = U8V((v) >> 16); \ + (p)[3] = U8V((v) >> 24); \ + } while (0) + +#ifdef ECRYPT_NATIVE64 +#define U64TO8_LITTLE(p, v) \ + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + (p)[2] = U8V((v) >> 16); \ + (p)[3] = U8V((v) >> 24); \ + (p)[4] = U8V((v) >> 32); \ + (p)[5] = U8V((v) >> 40); \ + (p)[6] = U8V((v) >> 48); \ + (p)[7] = U8V((v) >> 56); \ + } while (0) +#else +#define U64TO8_LITTLE(p, v) \ + do { \ + U32TO8_LITTLE((p), U32V((v) )); \ + U32TO8_LITTLE((p) + 4, U32V((v) >> 32)); \ + } while (0) +#endif + +#define U16TO8_BIG(p, v) \ + do { \ + (p)[0] = U8V((v) ); \ + (p)[1] = U8V((v) >> 8); \ + } while (0) + +#define U32TO8_BIG(p, v) \ + do { \ + (p)[0] = U8V((v) >> 24); \ + (p)[1] = U8V((v) >> 16); \ + (p)[2] = U8V((v) >> 8); \ + (p)[3] = U8V((v) ); \ + } while (0) + +#ifdef ECRYPT_NATIVE64 +#define U64TO8_BIG(p, v) \ + do { \ + (p)[0] = U8V((v) >> 56); \ + (p)[1] = U8V((v) >> 48); \ + (p)[2] = U8V((v) >> 40); \ + (p)[3] = U8V((v) >> 32); \ + (p)[4] = U8V((v) >> 24); \ + (p)[5] = U8V((v) >> 16); \ + (p)[6] = U8V((v) >> 8); \ + (p)[7] = U8V((v) ); \ + } while (0) +#else +#define U64TO8_BIG(p, v) \ + do { \ + U32TO8_BIG((p), U32V((v) >> 32)); \ + U32TO8_BIG((p) + 4, U32V((v) )); \ + } while (0) +#endif + +#endif + +#include "ecrypt-machine.h" + +/* ------------------------------------------------------------------------- */ + +#endif From 20b44d04e4455bd3ab28065127bbf070606d9f43 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:11:42 -0500 Subject: [PATCH 327/576] Create ecrypt-sync.h --- .../encryption/salsa20/ecrypt-sync.h | 289 ++++++++++++++++++ 1 file changed, 289 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-sync.h diff --git a/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-sync.h b/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-sync.h new file mode 100644 index 000000000..786c63d26 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-sync.h @@ -0,0 +1,289 @@ +/* ecrypt-sync.h */ + +/* + * Header file for synchronous stream ciphers without authentication + * mechanism. + * + * *** Please only edit parts marked with "[edit]". *** + */ + +#ifndef ECRYPT_SYNC +#define ECRYPT_SYNC + +#ifdef __cplusplus +extern "C"{ +#endif + +#include "ecrypt-portable.h" + +/* ------------------------------------------------------------------------- */ + +/* Cipher parameters */ + +/* + * The name of your cipher. + */ +#define ECRYPT_NAME "Salsa20" /* [edit] */ +#define ECRYPT_PROFILE "S!_H." + +/* + * Specify which key and IV sizes are supported by your cipher. A user + * should be able to enumerate the supported sizes by running the + * following code: + * + * for (i = 0; ECRYPT_KEYSIZE(i) <= ECRYPT_MAXKEYSIZE; ++i) + * { + * keysize = ECRYPT_KEYSIZE(i); + * + * ... + * } + * + * All sizes are in bits. + */ + +#define ECRYPT_MAXKEYSIZE 256 /* [edit] */ +#define ECRYPT_KEYSIZE(i) (128 + (i)*128) /* [edit] */ + +#define ECRYPT_MAXIVSIZE 64 /* [edit] */ +#define ECRYPT_IVSIZE(i) (64 + (i)*64) /* [edit] */ + +/* ------------------------------------------------------------------------- */ + +/* Data structures */ + +/* + * ECRYPT_ctx is the structure containing the representation of the + * internal state of your cipher. + */ + +typedef struct +{ + u32 input[16]; /* could be compressed */ + /* + * [edit] + * + * Put here all state variable needed during the encryption process. + */ +} ECRYPT_ctx; + +/* ------------------------------------------------------------------------- */ + +/* Mandatory functions */ + +/* + * Key and message independent initialization. This function will be + * called once when the program starts (e.g., to build expanded S-box + * tables). + */ +void ECRYPT_init(); + +/* + * Key setup. It is the user's responsibility to select the values of + * keysize and ivsize from the set of supported values specified + * above. + */ +void ECRYPT_keysetup( + ECRYPT_ctx* ctx, + const u8* key, + u32 keysize, /* Key size in bits. */ + u32 ivsize); /* IV size in bits. */ + +/* + * IV setup. After having called ECRYPT_keysetup(), the user is + * allowed to call ECRYPT_ivsetup() different times in order to + * encrypt/decrypt different messages with the same key but different + * IV's. + */ +void ECRYPT_ivsetup( + ECRYPT_ctx* ctx, + const u8* iv); + +/* + * Encryption/decryption of arbitrary length messages. + * + * For efficiency reasons, the API provides two types of + * encrypt/decrypt functions. The ECRYPT_encrypt_bytes() function + * (declared here) encrypts byte strings of arbitrary length, while + * the ECRYPT_encrypt_blocks() function (defined later) only accepts + * lengths which are multiples of ECRYPT_BLOCKLENGTH. + * + * The user is allowed to make multiple calls to + * ECRYPT_encrypt_blocks() to incrementally encrypt a long message, + * but he is NOT allowed to make additional encryption calls once he + * has called ECRYPT_encrypt_bytes() (unless he starts a new message + * of course). For example, this sequence of calls is acceptable: + * + * ECRYPT_keysetup(); + * + * ECRYPT_ivsetup(); + * ECRYPT_encrypt_blocks(); + * ECRYPT_encrypt_blocks(); + * ECRYPT_encrypt_bytes(); + * + * ECRYPT_ivsetup(); + * ECRYPT_encrypt_blocks(); + * ECRYPT_encrypt_blocks(); + * + * ECRYPT_ivsetup(); + * ECRYPT_encrypt_bytes(); + * + * The following sequence is not: + * + * ECRYPT_keysetup(); + * ECRYPT_ivsetup(); + * ECRYPT_encrypt_blocks(); + * ECRYPT_encrypt_bytes(); + * ECRYPT_encrypt_blocks(); + */ + +void ECRYPT_encrypt_bytes( + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 msglen); /* Message length in bytes. */ + +void ECRYPT_decrypt_bytes( + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 msglen); /* Message length in bytes. */ + +/* ------------------------------------------------------------------------- */ + +/* Optional features */ + +/* + * For testing purposes it can sometimes be useful to have a function + * which immediately generates keystream without having to provide it + * with a zero plaintext. If your cipher cannot provide this function + * (e.g., because it is not strictly a synchronous cipher), please + * reset the ECRYPT_GENERATES_KEYSTREAM flag. + */ + +#define ECRYPT_GENERATES_KEYSTREAM +#ifdef ECRYPT_GENERATES_KEYSTREAM + +void ECRYPT_keystream_bytes( + ECRYPT_ctx* ctx, + u8* keystream, + u32 length); /* Length of keystream in bytes. */ + +#endif + +/* ------------------------------------------------------------------------- */ + +/* Optional optimizations */ + +/* + * By default, the functions in this section are implemented using + * calls to functions declared above. However, you might want to + * implement them differently for performance reasons. + */ + +/* + * All-in-one encryption/decryption of (short) packets. + * + * The default definitions of these functions can be found in + * "ecrypt-sync.c". If you want to implement them differently, please + * undef the ECRYPT_USES_DEFAULT_ALL_IN_ONE flag. + */ +#define ECRYPT_USES_DEFAULT_ALL_IN_ONE /* [edit] */ + +void ECRYPT_encrypt_packet( + ECRYPT_ctx* ctx, + const u8* iv, + const u8* plaintext, + u8* ciphertext, + u32 msglen); + +void ECRYPT_decrypt_packet( + ECRYPT_ctx* ctx, + const u8* iv, + const u8* ciphertext, + u8* plaintext, + u32 msglen); + +/* + * Encryption/decryption of blocks. + * + * By default, these functions are defined as macros. If you want to + * provide a different implementation, please undef the + * ECRYPT_USES_DEFAULT_BLOCK_MACROS flag and implement the functions + * declared below. + */ + +#define ECRYPT_BLOCKLENGTH 64 /* [edit] */ + +#define ECRYPT_USES_DEFAULT_BLOCK_MACROS /* [edit] */ +#ifdef ECRYPT_USES_DEFAULT_BLOCK_MACROS + +#define ECRYPT_encrypt_blocks(ctx, plaintext, ciphertext, blocks) \ + ECRYPT_encrypt_bytes(ctx, plaintext, ciphertext, \ + (blocks) * ECRYPT_BLOCKLENGTH) + +#define ECRYPT_decrypt_blocks(ctx, ciphertext, plaintext, blocks) \ + ECRYPT_decrypt_bytes(ctx, ciphertext, plaintext, \ + (blocks) * ECRYPT_BLOCKLENGTH) + +#ifdef ECRYPT_GENERATES_KEYSTREAM + +#define ECRYPT_keystream_blocks(ctx, keystream, blocks) \ + ECRYPT_keystream_bytes(ctx, keystream, \ + (blocks) * ECRYPT_BLOCKLENGTH) + +#endif + +#else + +void ECRYPT_encrypt_blocks( + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 blocks); /* Message length in blocks. */ + +void ECRYPT_decrypt_blocks( + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 blocks); /* Message length in blocks. */ + +#ifdef ECRYPT_GENERATES_KEYSTREAM + +void ECRYPT_keystream_blocks( + ECRYPT_ctx* ctx, + const u8* keystream, + u32 blocks); /* Keystream length in blocks. */ + +#endif + +#endif + +void ECRYPT_PrintContext ( const ECRYPT_ctx * _structContext ); + +/* + * If your cipher can be implemented in different ways, you can use + * the ECRYPT_VARIANT parameter to allow the user to choose between + * them at compile time (e.g., gcc -DECRYPT_VARIANT=3 ...). Please + * only use this possibility if you really think it could make a + * significant difference and keep the number of variants + * (ECRYPT_MAXVARIANT) as small as possible (definitely not more than + * 10). Note also that all variants should have exactly the same + * external interface (i.e., the same ECRYPT_BLOCKLENGTH, etc.). + */ +#define ECRYPT_MAXVARIANT 1 /* [edit] */ + +#ifndef ECRYPT_VARIANT +#define ECRYPT_VARIANT 1 +#endif + +#if (ECRYPT_VARIANT > ECRYPT_MAXVARIANT) +#error this variant does not exist +#endif + +/* ------------------------------------------------------------------------- */ + +#ifdef __cplusplus +} +#endif + +#endif From 204f4504a7afdbec824c45ab550fa5c8adc21ee1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:12:08 -0500 Subject: [PATCH 328/576] Create salsa20.c --- .../encryption/salsa20/salsa20.c | 239 ++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c diff --git a/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c b/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c new file mode 100644 index 000000000..ac5912a18 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c @@ -0,0 +1,239 @@ +/* +salsa20-merged.c version 20051118 +D. J. Bernstein +Public domain. +*/ + +#include "ecrypt-sync.h" + +#include + + + +#define ROTATE(v,c) (ROTL32(v,c)) +#define XOR(v,w) ((v) ^ (w)) +#define PLUS(v,w) (U32V((v) + (w))) +#define PLUSONE(v) (PLUS((v),1)) + +void ECRYPT_init(void) +{ + return; +} + +static const char sigma[16] = "expand 32-byte k"; +static const char tau[16] = "expand 16-byte k"; + +void ECRYPT_keysetup(ECRYPT_ctx *x,const u8 *k,u32 kbits,u32 ivbits) +{ + const char *constants; + + x->input[1] = U8TO32_LITTLE(k + 0); + x->input[2] = U8TO32_LITTLE(k + 4); + x->input[3] = U8TO32_LITTLE(k + 8); + x->input[4] = U8TO32_LITTLE(k + 12); + if (kbits == 256) { /* recommended */ + k += 16; + constants = sigma; + } else { /* kbits == 128 */ + constants = tau; + } + x->input[11] = U8TO32_LITTLE(k + 0); + x->input[12] = U8TO32_LITTLE(k + 4); + x->input[13] = U8TO32_LITTLE(k + 8); + x->input[14] = U8TO32_LITTLE(k + 12); + x->input[0] = U8TO32_LITTLE(constants + 0); + x->input[5] = U8TO32_LITTLE(constants + 4); + x->input[10] = U8TO32_LITTLE(constants + 8); + x->input[15] = U8TO32_LITTLE(constants + 12); +} + +void ECRYPT_ivsetup(ECRYPT_ctx *x,const u8 *iv) +{ + x->input[6] = U8TO32_LITTLE(iv + 0); + x->input[7] = U8TO32_LITTLE(iv + 4); + x->input[8] = 0; + x->input[9] = 0; +} + +void ECRYPT_encrypt_bytes(ECRYPT_ctx *x,const u8 *m,u8 *c,u32 bytes) +{ + u32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15; + u32 j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15; + u8 *ctarget; + u8 tmp[64]; + int i; + + if (!bytes) return; + + j0 = x->input[0]; + j1 = x->input[1]; + j2 = x->input[2]; + j3 = x->input[3]; + j4 = x->input[4]; + j5 = x->input[5]; + j6 = x->input[6]; + j7 = x->input[7]; + j8 = x->input[8]; + j9 = x->input[9]; + j10 = x->input[10]; + j11 = x->input[11]; + j12 = x->input[12]; + j13 = x->input[13]; + j14 = x->input[14]; + j15 = x->input[15]; + + for (;;) { + if (bytes < 64) { + for (i = 0;i < bytes;++i) tmp[i] = m[i]; + m = tmp; + ctarget = c; + c = tmp; + } + x0 = j0; + x1 = j1; + x2 = j2; + x3 = j3; + x4 = j4; + x5 = j5; + x6 = j6; + x7 = j7; + x8 = j8; + x9 = j9; + x10 = j10; + x11 = j11; + x12 = j12; + x13 = j13; + x14 = j14; + x15 = j15; + for (i = 20;i > 0;i -= 2) { + x4 = XOR( x4,ROTATE(PLUS( x0,x12), 7)); + x8 = XOR( x8,ROTATE(PLUS( x4, x0), 9)); + x12 = XOR(x12,ROTATE(PLUS( x8, x4),13)); + x0 = XOR( x0,ROTATE(PLUS(x12, x8),18)); + x9 = XOR( x9,ROTATE(PLUS( x5, x1), 7)); + x13 = XOR(x13,ROTATE(PLUS( x9, x5), 9)); + x1 = XOR( x1,ROTATE(PLUS(x13, x9),13)); + x5 = XOR( x5,ROTATE(PLUS( x1,x13),18)); + x14 = XOR(x14,ROTATE(PLUS(x10, x6), 7)); + x2 = XOR( x2,ROTATE(PLUS(x14,x10), 9)); + x6 = XOR( x6,ROTATE(PLUS( x2,x14),13)); + x10 = XOR(x10,ROTATE(PLUS( x6, x2),18)); + x3 = XOR( x3,ROTATE(PLUS(x15,x11), 7)); + x7 = XOR( x7,ROTATE(PLUS( x3,x15), 9)); + x11 = XOR(x11,ROTATE(PLUS( x7, x3),13)); + x15 = XOR(x15,ROTATE(PLUS(x11, x7),18)); + x1 = XOR( x1,ROTATE(PLUS( x0, x3), 7)); + x2 = XOR( x2,ROTATE(PLUS( x1, x0), 9)); + x3 = XOR( x3,ROTATE(PLUS( x2, x1),13)); + x0 = XOR( x0,ROTATE(PLUS( x3, x2),18)); + x6 = XOR( x6,ROTATE(PLUS( x5, x4), 7)); + x7 = XOR( x7,ROTATE(PLUS( x6, x5), 9)); + x4 = XOR( x4,ROTATE(PLUS( x7, x6),13)); + x5 = XOR( x5,ROTATE(PLUS( x4, x7),18)); + x11 = XOR(x11,ROTATE(PLUS(x10, x9), 7)); + x8 = XOR( x8,ROTATE(PLUS(x11,x10), 9)); + x9 = XOR( x9,ROTATE(PLUS( x8,x11),13)); + x10 = XOR(x10,ROTATE(PLUS( x9, x8),18)); + x12 = XOR(x12,ROTATE(PLUS(x15,x14), 7)); + x13 = XOR(x13,ROTATE(PLUS(x12,x15), 9)); + x14 = XOR(x14,ROTATE(PLUS(x13,x12),13)); + x15 = XOR(x15,ROTATE(PLUS(x14,x13),18)); + } + x0 = PLUS(x0,j0); + x1 = PLUS(x1,j1); + x2 = PLUS(x2,j2); + x3 = PLUS(x3,j3); + x4 = PLUS(x4,j4); + x5 = PLUS(x5,j5); + x6 = PLUS(x6,j6); + x7 = PLUS(x7,j7); + x8 = PLUS(x8,j8); + x9 = PLUS(x9,j9); + x10 = PLUS(x10,j10); + x11 = PLUS(x11,j11); + x12 = PLUS(x12,j12); + x13 = PLUS(x13,j13); + x14 = PLUS(x14,j14); + x15 = PLUS(x15,j15); + + x0 = XOR(x0,U8TO32_LITTLE(m + 0)); + x1 = XOR(x1,U8TO32_LITTLE(m + 4)); + x2 = XOR(x2,U8TO32_LITTLE(m + 8)); + x3 = XOR(x3,U8TO32_LITTLE(m + 12)); + x4 = XOR(x4,U8TO32_LITTLE(m + 16)); + x5 = XOR(x5,U8TO32_LITTLE(m + 20)); + x6 = XOR(x6,U8TO32_LITTLE(m + 24)); + x7 = XOR(x7,U8TO32_LITTLE(m + 28)); + x8 = XOR(x8,U8TO32_LITTLE(m + 32)); + x9 = XOR(x9,U8TO32_LITTLE(m + 36)); + x10 = XOR(x10,U8TO32_LITTLE(m + 40)); + x11 = XOR(x11,U8TO32_LITTLE(m + 44)); + x12 = XOR(x12,U8TO32_LITTLE(m + 48)); + x13 = XOR(x13,U8TO32_LITTLE(m + 52)); + x14 = XOR(x14,U8TO32_LITTLE(m + 56)); + x15 = XOR(x15,U8TO32_LITTLE(m + 60)); + + j8 = PLUSONE(j8); + if (!j8) { + j9 = PLUSONE(j9); + /* stopping at 2^70 bytes per nonce is user's responsibility */ + } + + U32TO8_LITTLE(c + 0,x0); + U32TO8_LITTLE(c + 4,x1); + U32TO8_LITTLE(c + 8,x2); + U32TO8_LITTLE(c + 12,x3); + U32TO8_LITTLE(c + 16,x4); + U32TO8_LITTLE(c + 20,x5); + U32TO8_LITTLE(c + 24,x6); + U32TO8_LITTLE(c + 28,x7); + U32TO8_LITTLE(c + 32,x8); + U32TO8_LITTLE(c + 36,x9); + U32TO8_LITTLE(c + 40,x10); + U32TO8_LITTLE(c + 44,x11); + U32TO8_LITTLE(c + 48,x12); + U32TO8_LITTLE(c + 52,x13); + U32TO8_LITTLE(c + 56,x14); + U32TO8_LITTLE(c + 60,x15); + + if (bytes <= 64) { + if (bytes < 64) { + for (i = 0;i < bytes;++i) ctarget[i] = c[i]; + } + x->input[8] = j8; + x->input[9] = j9; + return; + } + bytes -= 64; + c += 64; + m += 64; + } +} + +void ECRYPT_decrypt_bytes(ECRYPT_ctx *x,const u8 *c,u8 *m,u32 bytes) +{ + ECRYPT_encrypt_bytes(x,c,m,bytes); +} + +void ECRYPT_keystream_bytes(ECRYPT_ctx *x,u8 *stream,u32 bytes) +{ + u32 i; + for (i = 0;i < bytes;++i) stream[i] = 0; + ECRYPT_encrypt_bytes(x,stream,stream,bytes); +} + + + +void ECRYPT_PrintContext ( const ECRYPT_ctx * _structContext ) { + int i; + + fprintf(stdout, "salsa20.cpp : ECRYPT_PrintContext () : " ); + + for ( i = 0; i < 16; i ++ ) { + fprintf(stdout, "%i ", _structContext -> input [ i ] ); + + } //-for + + fprintf(stdout, ".\n" ); + +} From c3791d599bd85bb5c2a109af51a9019a407ac7d7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:12:31 -0500 Subject: [PATCH 329/576] Create libskein_skein.cc --- .../encryption/three_fish/libskein_skein.cc | 447 ++++++++++++++++++ 1 file changed, 447 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.cc diff --git a/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.cc b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.cc new file mode 100644 index 000000000..b5c42d119 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.cc @@ -0,0 +1,447 @@ +/* +** Copyright (c) Alexis Megas. +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** 1. Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** 3. The name of the author may not be used to endorse or promote products +** derived from skein without specific prior written permission. +** +** LIBSKEIN IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 +** LIBSKEIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "libskein_skein.h" + +static const uint8_t *Pi = 0; +static const uint8_t *RPi = 0; +static const uint8_t Pi_4[4] = {0, 3, 2, 1}; +static const uint8_t Pi_8[8] = {2, 1, 4, 7, 6, 5, 0, 3}; +static const uint8_t Pi_16[16] = {0, 9, 2, 13, 6, 11, 4, 15, + 10, 7, 12, 3, 14, 5, 8, 1}; +static const uint8_t RPi_4[4] = {0, 3, 2, 1}; +static const uint8_t RPi_8[8] = {6, 1, 0, 7, 2, 5, 4, 3}; +static const uint8_t RPi_16[16] = {0, 15, 2, 11, 6, 13, 4, 9, + 14, 1, 8, 5, 10, 3, 12, 7}; +static const uint8_t R_4[8][2] = {{14, 16}, + {52, 57}, + {23, 40}, + {5, 37}, + {25, 33}, + {46, 12}, + {58, 22}, + {32, 32}}; +static const uint8_t R_8[8][4] = {{46, 36, 19, 37}, + {33, 27, 14, 42}, + {17, 49, 36, 39}, + {44, 9, 54, 56}, + {39, 30, 34, 24}, + {13, 50, 10, 17}, + {25, 29, 39, 43}, + {8, 35, 56, 22}}; +static const uint8_t R_16[8][8] = {{24, 13, 8, 47, 8, 17, 22, 37}, + {38, 19, 10, 55, 49, 18, 23, 52}, + {33, 4, 51, 13, 34, 41, 59, 17}, + {5, 20, 48, 41, 47, 28, 16, 25}, + {41, 9, 37, 31, 12, 47, 44, 30}, + {16, 34, 56, 51, 4, 53, 42, 41}, + {31, 44, 47, 46, 19, 42, 44, 25}, + {9, 48, 35, 52, 23, 31, 37, 20}}; +static size_t Nr = 0; +static size_t Nw = 0; +static void bytesToWords(uint64_t *W, + const char *bytes, + const size_t bytes_size); +static void wordsToBytes(char *B, + const uint64_t *words, + const size_t words_size); + +static void bytesToWords(uint64_t *W, + const char *bytes, + const size_t bytes_size) +{ + if(!W || !bytes || bytes_size == 0) + return; + + for(size_t i = 0; i < bytes_size / 8; i++) + { + char b[8]; + + for(size_t j = 0; j < 8; j++) + b[j] = bytes[i * 8 + j]; + + W[i] = static_cast (b[0] & 0xff) | + (static_cast (b[1] & 0xff) << 8) | + (static_cast (b[2] & 0xff) << 16) | + (static_cast (b[3] & 0xff) << 24) | + (static_cast (b[4] & 0xff) << 32) | + (static_cast (b[5] & 0xff) << 40) | + (static_cast (b[6] & 0xff) << 48) | + (static_cast (b[7] & 0xff) << 56); + } +} + +static void mix(const uint64_t x0, + const uint64_t x1, + const size_t d, + const size_t i, + uint64_t *y0, + uint64_t *y1, + const size_t block_size) +{ + if(!y0 || !y1) + return; + + /* + ** Section 3.3.1. + */ + + uint64_t r = 0; + + if(block_size == 256) + r = R_4[d % 8][i]; + else if(block_size == 512) + r = R_8[d % 8][i]; + else + r = R_16[d % 8][i]; + + *y0 = x0 + x1; + + /* + ** Please see https://en.wikipedia.org/wiki/Circular_shift. + */ + + *y1 = ((x1 << r) | (x1 >> (64 - r))) ^ *y0; +} + +static void mix_inverse(const uint64_t y0, + const uint64_t y1, + const size_t d, + const size_t i, + uint64_t *x0, + uint64_t *x1, + const size_t block_size) +{ + if(!x0 || !x1) + return; + + /* + ** Section 3.3.1. + */ + + uint64_t r = 0; + + if(block_size == 256) + r = R_4[d % 8][i]; + else if(block_size == 512) + r = R_8[d % 8][i]; + else + r = R_16[d % 8][i]; + + /* + ** Please see https://en.wikipedia.org/wiki/Circular_shift. + */ + + *x1 = ((y1 ^ y0) >> r) | ((y1 ^ y0) << (64 - r)); + *x0 = y0 - *x1; +} + +static void threefish_decrypt(char *D, + const char *K, + const char *T, + const char *C, + const size_t C_size, + const size_t block_size) +{ + if(!C || C_size == 0 || !D || !K || !T || block_size == 0) + return; + + /* + ** The inverse of section 3.3. + */ + + uint64_t C240 = 0x1bd11bdaa9fc1a22; + uint64_t *k = new uint64_t[Nw + 1]; + uint64_t kNw = C240; // Section 3.3.2. + uint64_t **s = new uint64_t*[Nr / 4 + 1]; + uint64_t t[3]; + uint64_t *v = new uint64_t[Nw]; + + bytesToWords(k, K, C_size); + bytesToWords(t, T, 16); + bytesToWords(v, C, C_size); + + for(size_t i = 0; i < Nw; i++) + kNw ^= k[i]; // Section 3.3.2. + + k[Nw] = kNw; + + for(size_t i = 0; i < Nr / 4 + 1; i++) + s[i] = new uint64_t[Nw]; + + t[2] = t[0] ^ t[1]; // Section 3.3.2. + + /* + ** Prepare the key schedule, section 3.3.2. + */ + + for(size_t d = 0; d < Nr / 4 + 1; d++) + for(size_t i = 0; i < Nw; i++) + { + s[d][i] = k[(d + i) % (Nw + 1)]; + + if(i == Nw - 1) + s[d][i] += d; + else if(i == Nw - 2) + s[d][i] += t[(d + 1) % 3]; + else if(i == Nw - 3) + s[d][i] += t[d % 3]; + } + + for(size_t i = 0; i < Nw; i++) + v[i] -= s[Nr / 4][i]; + + for(size_t d = Nr - 1;; d--) + { + uint64_t *f = new uint64_t[Nw]; + + for(size_t i = 0; i < Nw; i++) + f[i] = v[RPi[i]]; + + for(size_t i = 0; i < Nw / 2; i++) + { + uint64_t x0 = 0; + uint64_t x1 = 0; + uint64_t y0 = f[i * 2]; + uint64_t y1 = f[i * 2 + 1]; + + mix_inverse(y0, y1, d, i, &x0, &x1, block_size); + v[i * 2] = x0; + v[i * 2 + 1] = x1; + } + + memset(f, 0, sizeof(*f) * static_cast (Nw)); + delete []f; + + if(d % 4 == 0) + for(size_t i = 0; i < Nw; i++) + v[i] -= s[d / 4][i]; + + if(d == 0) + break; + } + + wordsToBytes(D, v, Nw); + memset(k, 0, sizeof(*k) * static_cast (Nw + 1)); + memset(t, 0, sizeof(t)); + memset(v, 0, sizeof(*v) * static_cast (Nw)); + delete []k; + + for(size_t i = 0; i < Nr / 4 + 1; i++) + { + memset(s[i], 0, sizeof(*s[i]) * static_cast (Nw)); + delete []s[i]; + } + + delete []s; + delete []v; +} + +static void threefish_encrypt(char *E, + const char *K, + const char *T, + const char *P, + const size_t P_size, + const size_t block_size) +{ + if(!E || !K || !T || !P || P_size == 0 || block_size == 0) + return; + + /* + ** Section 3.3. + */ + + uint64_t C240 = 0x1bd11bdaa9fc1a22; + uint64_t *k = new uint64_t[Nw + 1]; + uint64_t kNw = C240; // Section 3.3.2. + uint64_t **s = new uint64_t*[Nr / 4 + 1]; + uint64_t t[3]; + uint64_t *v = new uint64_t[Nw]; + + for(size_t i = 0; i < Nr / 4 + 1; i++) + s[i] = new uint64_t[Nw]; + + bytesToWords(k, K, P_size); + bytesToWords(t, T, 16); + bytesToWords(v, P, P_size); + + for(size_t i = 0; i < Nw; i++) + kNw ^= k[i]; // Section 3.3.2. + + k[Nw] = kNw; + t[2] = t[0] ^ t[1]; // Section 3.3.2. + + /* + ** Prepare the key schedule, section 3.3.2. + */ + + for(size_t d = 0; d < Nr / 4 + 1; d++) + for(size_t i = 0; i < Nw; i++) + { + s[d][i] = k[(d + i) % (Nw + 1)]; + + if(i == Nw - 1) + s[d][i] += d; + else if(i == Nw - 2) + s[d][i] += t[(d + 1) % 3]; + else if(i == Nw - 3) + s[d][i] += t[d % 3]; + } + + for(size_t d = 0; d < Nr; d++) + { + if(d % 4 == 0) + for(size_t i = 0; i < Nw; i++) + v[i] += s[d / 4][i]; + + uint64_t *f = new uint64_t[Nw]; + + for(size_t i = 0; i < Nw / 2; i++) + { + uint64_t x0 = v[i * 2]; + uint64_t x1 = v[i * 2 + 1]; + uint64_t y0 = 0; + uint64_t y1 = 0; + + mix(x0, x1, d, i, &y0, &y1, block_size); + f[i * 2] = y0; + f[i * 2 + 1] = y1; + } + + for(size_t i = 0; i < Nw; i++) + v[i] = f[Pi[i]]; + + memset(f, 0, sizeof(*f) * static_cast (Nw)); + delete []f; + } + + for(size_t i = 0; i < Nw; i++) + v[i] += s[Nr / 4][i]; + + wordsToBytes(E, v, Nw); + memset(k, 0, sizeof(*k) * static_cast (Nw + 1)); + memset(t, 0, sizeof(t)); + memset(v, 0, sizeof(*v) * static_cast (Nw)); + delete []k; + + for(size_t i = 0; i < Nr / 4 + 1; i++) + { + memset(s[i], 0, sizeof(*s[i]) * static_cast (Nw)); + delete []s[i]; + } + + delete []s; + delete []v; +} + +static void wordsToBytes(char *B, + const uint64_t *words, + const size_t words_size) +{ + if(!B || !words || words_size == 0) + return; + + for(size_t i = 0; i < words_size; i++) + { + B[i * 8 + 0] = static_cast (words[i]); + B[i * 8 + 1] = static_cast ((words[i] >> 8) & 0xff); + B[i * 8 + 2] = static_cast ((words[i] >> 16) & 0xff); + B[i * 8 + 3] = static_cast ((words[i] >> 24) & 0xff); + B[i * 8 + 4] = static_cast ((words[i] >> 32) & 0xff); + B[i * 8 + 5] = static_cast ((words[i] >> 40) & 0xff); + B[i * 8 + 6] = static_cast ((words[i] >> 48) & 0xff); + B[i * 8 + 7] = static_cast ((words[i] >> 56) & 0xff); + } +} + +void libskein_threefish_decrypt(char *D, + const char *K, + const char *T, + const char *C, + const size_t C_size, + const size_t block_size) +{ + if(!C || C_size == 0 || !D || !K || !T || block_size == 0) + return; + + if(block_size == 256) + { + Nr = 72; + Nw = 4; + RPi = RPi_4; + } + else if(block_size == 512) + { + Nr = 72; + Nw = 8; + RPi = RPi_8; + } + else if(block_size == 1024) + { + Nr = 80; + Nw = 16; + RPi = RPi_16; + } + else + return; + + threefish_decrypt(D, K, T, C, C_size, block_size); +} + +void libskein_threefish_encrypt(char *E, + const char *K, + const char *T, + const char *P, + const size_t P_size, + const size_t block_size) +{ + if(!E || !K || !P || P_size == 0 || !T || block_size == 0) + return; + + if(block_size == 256) + { + Nr = 72; + Nw = 4; + Pi = Pi_4; + } + else if(block_size == 512) + { + Nr = 72; + Nw = 8; + Pi = Pi_8; + } + else if(block_size == 1024) + { + Nr = 80; + Nw = 16; + Pi = Pi_16; + } + else + return; + + threefish_encrypt(E, K, T, P, P_size, block_size); +} From 40987d00f525df6f5e575f9a05a0685093ca4717 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:12:49 -0500 Subject: [PATCH 330/576] Create libskein_skein.h --- .../encryption/three_fish/libskein_skein.h | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h diff --git a/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h new file mode 100644 index 000000000..79564ed0a --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h @@ -0,0 +1,85 @@ +/* +** Copyright (c) Alexis Megas. +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** 1. Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** 3. The name of the author may not be used to endorse or promote products +** derived from skein without specific prior written permission. +** +** LIBSKEIN IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 +** LIBSKEIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +//#ifndef LIBSKEIN_SKEIN_H +//#define LIBSKEIN_SKEIN_H + +#ifdef __cplusplus +extern "C" +{ +#endif +#include +#include +#include +#ifdef __cplusplus +} +#endif + +//#include +//#include +//#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +void libskein_threefish_decrypt +(char *D, /* + ** Output storage. The size of the + ** container must be identical to + ** the size of C. + */ + const char *K, // Must be 32, 64, or 128 bytes. + const char *T, // Must be 16 bytes. + const char *C, // The ciphertext. + const size_t C_size, // The size of the ciphertext. + const size_t block_size); /* + ** The block size in + ** bits. Must be 256, + ** 512, or 1024. + */ +void libskein_threefish_encrypt +(char *E, /* + ** Output storage. The size of the + ** container must be identical to + ** the size of P. + */ + const char *K, // Must be 32, 64, or 128 bytes. + const char *T, // Must be 16 bytes. + const char *P, // The plaintext. + const size_t P_size, // The size of the plaintext. + const size_t block_size); /* + ** The block size in + ** bits. Must be 256, + ** 512, or 1024. + */ + +#ifdef __cplusplus +} +#endif +//#endif From b68ac7bb77e01aa2af8cbff5dbbfb557f542457d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:13:11 -0500 Subject: [PATCH 331/576] Create stribog.c --- .../hashing/streebog/standard/stribog.c | 214 ++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/streebog/standard/stribog.c diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/standard/stribog.c b/stratum/algos/binarium_hash_v1/hashing/streebog/standard/stribog.c new file mode 100644 index 000000000..eb8181340 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/streebog/standard/stribog.c @@ -0,0 +1,214 @@ +/* + * stribog.c + * + * Created on: May 5, 2012 + * Author: Oleksandr Kazymyrov + * Acknowledgments: Oleksii Shevchuk + */ + +#include +#include +#include +#include + +#include "stribog_data.h" + +void AddModulo512(const unsigned char *a,const unsigned char *b,unsigned char *c) +{ + int i = 0, t = 0; + + for(i=63;i>=0;i--) + { + t = a[i] + b[i] + (t >> 8); + c[i] = t & 0xFF; + } +} + +void AddXor512(const void *a,const void *b,void *c) +{ + int i = 0; + const long long *A=a, *B=b; + unsigned long long *C=c; + + for(i=0;i<8;i++) + { + C[i] = A[i] ^ B[i]; + } +} + +void S(unsigned char *state) +{ + int i = 0; + + for(i=0;i<64;i++) + { + state[i] = Sbox[state[i]]; + } +} + +void L(unsigned char *state) +{ + unsigned long long v = 0; + int i = 0, j = 0, k = 0; + + for(i=0;i<8;i++) + { + v=0; + for(k=0;k<8;k++) + { + for(j=0;j<8;j++) + { + if ((state[i*8+k] & (1<<(7-j))) != 0) + v ^= A[k*8+j]; + } + } + for(k=0;k<8;k++) + { + state[i*8+k] = (v & ((unsigned long long)0xFF << (7-k)*8)) >> (7-k)*8; + } + } +} + +void P(unsigned char *state) +{ + int i = 0; + unsigned char t[64] = {}; + + for(i=0;i<64;i++) + { + t[i] = state[Tau[i]]; + } + + memcpy(state,t,64); +} + +void KeySchedule(unsigned char *K,int i) +{ + AddXor512(K,C[i],K); + + S(K); + P(K); + L(K); +} + +void E(unsigned char *K,const unsigned char *m, unsigned char *state) +{ + int i = 0; + + memcpy(K,K,64); + + AddXor512(m,K,state); + + for(i=0;i<12;i++) + { + S(state); + P(state); + L(state); + KeySchedule(K,i); + AddXor512(state,K,state); + } +} + +void g_N(const unsigned char *N,unsigned char *h,const unsigned char *m) +{ + unsigned char t[64], K[64]; + + AddXor512(N,h,K); + + S(K); + P(K); + L(K); + + E(K,m,t); + + AddXor512(t,h,t); + AddXor512(t,m,h); +} + +void hash_X(unsigned char *IV,const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char v512[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00 + }; + unsigned char v0[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char Sigma[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char N[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char m[64], *hash = IV; + unsigned long long len = length; + + // Stage 2 + while (len >= 512) + { + memcpy(m, message + len/8 - 63 - ( (len & 0x7) == 0 ), 64); + + g_N(N,hash,m); + AddModulo512(N,v512,N); + AddModulo512(Sigma,m,Sigma); + len -= 512; + } + + memset(m,0,64); + memcpy(m + 63 - len/8 + ( (len & 0x7) == 0 ), message, len/8 + 1 - ( (len & 0x7) == 0 )); + + // Stage 3 + m[ 63 - len/8 ] |= (1 << (len & 0x7)); + + g_N(N,hash,m); + v512[63] = len & 0xFF; + v512[62] = len >> 8; + AddModulo512(N,v512,N); + + AddModulo512(Sigma,m,Sigma); + + g_N(v0,hash,N); + g_N(v0,hash,Sigma); + + memcpy(out, hash, 64); +} + +void hash_512(const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char IV[64] = + { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + + hash_X(IV,message,length,out); +} + +void hash_256(const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char IV[64] = + { + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 + }; + unsigned char hash[64]; + + hash_X(IV,message,length,hash); + + memcpy(out,hash,32); +} From 34d3c9e9267e3897e8f17f836d05e019800ff27e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:13:35 -0500 Subject: [PATCH 332/576] Create stribog_data.h --- .../hashing/streebog/standard/stribog_data.h | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/streebog/standard/stribog_data.h diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/standard/stribog_data.h b/stratum/algos/binarium_hash_v1/hashing/streebog/standard/stribog_data.h new file mode 100644 index 000000000..782c62e24 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/streebog/standard/stribog_data.h @@ -0,0 +1,140 @@ +/* + * stribog_data.h + * + * Created on: May 5, 2012 + * Author: Oleksandr Kazymyrov + * Acknowledgments: Oleksii Shevchuk + */ + +#ifndef STRIBOG_DATA_H_ +#define STRIBOG_DATA_H_ + +// Matrix A for MixColumns (L) function +const unsigned long long A[64] = { + 0x8e20faa72ba0b470, 0x47107ddd9b505a38, 0xad08b0e0c3282d1c, 0xd8045870ef14980e, + 0x6c022c38f90a4c07, 0x3601161cf205268d, 0x1b8e0b0e798c13c8, 0x83478b07b2468764, + 0xa011d380818e8f40, 0x5086e740ce47c920, 0x2843fd2067adea10, 0x14aff010bdd87508, + 0x0ad97808d06cb404, 0x05e23c0468365a02, 0x8c711e02341b2d01, 0x46b60f011a83988e, + 0x90dab52a387ae76f, 0x486dd4151c3dfdb9, 0x24b86a840e90f0d2, 0x125c354207487869, + 0x092e94218d243cba, 0x8a174a9ec8121e5d, 0x4585254f64090fa0, 0xaccc9ca9328a8950, + 0x9d4df05d5f661451, 0xc0a878a0a1330aa6, 0x60543c50de970553, 0x302a1e286fc58ca7, + 0x18150f14b9ec46dd, 0x0c84890ad27623e0, 0x0642ca05693b9f70, 0x0321658cba93c138, + 0x86275df09ce8aaa8, 0x439da0784e745554, 0xafc0503c273aa42a, 0xd960281e9d1d5215, + 0xe230140fc0802984, 0x71180a8960409a42, 0xb60c05ca30204d21, 0x5b068c651810a89e, + 0x456c34887a3805b9, 0xac361a443d1c8cd2, 0x561b0d22900e4669, 0x2b838811480723ba, + 0x9bcf4486248d9f5d, 0xc3e9224312c8c1a0, 0xeffa11af0964ee50, 0xf97d86d98a327728, + 0xe4fa2054a80b329c, 0x727d102a548b194e, 0x39b008152acb8227, 0x9258048415eb419d, + 0x492c024284fbaec0, 0xaa16012142f35760, 0x550b8e9e21f7a530, 0xa48b474f9ef5dc18, + 0x70a6a56e2440598e, 0x3853dc371220a247, 0x1ca76e95091051ad, 0x0edd37c48a08a6d8, + 0x07e095624504536c, 0x8d70c431ac02a736, 0xc83862965601dd1b, 0x641c314b2b8ee083 +}; + +// Substitution for SubBytes function +const unsigned char Sbox[256]={ + 0xFC, 0xEE, 0xDD, 0x11, 0xCF, 0x6E, 0x31, 0x16, 0xFB, 0xC4, 0xFA, 0xDA, 0x23, 0xC5, 0x04, 0x4D, + 0xE9, 0x77, 0xF0, 0xDB, 0x93, 0x2E, 0x99, 0xBA, 0x17, 0x36, 0xF1, 0xBB, 0x14, 0xCD, 0x5F, 0xC1, + 0xF9, 0x18, 0x65, 0x5A, 0xE2, 0x5C, 0xEF, 0x21, 0x81, 0x1C, 0x3C, 0x42, 0x8B, 0x01, 0x8E, 0x4F, + 0x05, 0x84, 0x02, 0xAE, 0xE3, 0x6A, 0x8F, 0xA0, 0x06, 0x0B, 0xED, 0x98, 0x7F, 0xD4, 0xD3, 0x1F, + 0xEB, 0x34, 0x2C, 0x51, 0xEA, 0xC8, 0x48, 0xAB, 0xF2, 0x2A, 0x68, 0xA2, 0xFD, 0x3A, 0xCE, 0xCC, + 0xB5, 0x70, 0x0E, 0x56, 0x08, 0x0C, 0x76, 0x12, 0xBF, 0x72, 0x13, 0x47, 0x9C, 0xB7, 0x5D, 0x87, + 0x15, 0xA1, 0x96, 0x29, 0x10, 0x7B, 0x9A, 0xC7, 0xF3, 0x91, 0x78, 0x6F, 0x9D, 0x9E, 0xB2, 0xB1, + 0x32, 0x75, 0x19, 0x3D, 0xFF, 0x35, 0x8A, 0x7E, 0x6D, 0x54, 0xC6, 0x80, 0xC3, 0xBD, 0x0D, 0x57, + 0xDF, 0xF5, 0x24, 0xA9, 0x3E, 0xA8, 0x43, 0xC9, 0xD7, 0x79, 0xD6, 0xF6, 0x7C, 0x22, 0xB9, 0x03, + 0xE0, 0x0F, 0xEC, 0xDE, 0x7A, 0x94, 0xB0, 0xBC, 0xDC, 0xE8, 0x28, 0x50, 0x4E, 0x33, 0x0A, 0x4A, + 0xA7, 0x97, 0x60, 0x73, 0x1E, 0x00, 0x62, 0x44, 0x1A, 0xB8, 0x38, 0x82, 0x64, 0x9F, 0x26, 0x41, + 0xAD, 0x45, 0x46, 0x92, 0x27, 0x5E, 0x55, 0x2F, 0x8C, 0xA3, 0xA5, 0x7D, 0x69, 0xD5, 0x95, 0x3B, + 0x07, 0x58, 0xB3, 0x40, 0x86, 0xAC, 0x1D, 0xF7, 0x30, 0x37, 0x6B, 0xE4, 0x88, 0xD9, 0xE7, 0x89, + 0xE1, 0x1B, 0x83, 0x49, 0x4C, 0x3F, 0xF8, 0xFE, 0x8D, 0x53, 0xAA, 0x90, 0xCA, 0xD8, 0x85, 0x61, + 0x20, 0x71, 0x67, 0xA4, 0x2D, 0x2B, 0x09, 0x5B, 0xCB, 0x9B, 0x25, 0xD0, 0xBE, 0xE5, 0x6C, 0x52, + 0x59, 0xA6, 0x74, 0xD2, 0xE6, 0xF4, 0xB4, 0xC0, 0xD1, 0x66, 0xAF, 0xC2, 0x39, 0x4B, 0x63, 0xB6 +}; + +// Substitution for Transposition (P) function +const unsigned char Tau[64]={ + 0, 8, 16, 24, 32, 40, 48, 56, + 1, 9, 17, 25, 33, 41, 49, 57, + 2, 10, 18, 26, 34, 42, 50, 58, + 3, 11, 19, 27, 35, 43, 51, 59, + 4, 12, 20, 28, 36, 44, 52, 60, + 5, 13, 21, 29, 37, 45, 53, 61, + 6, 14, 22, 30, 38, 46, 54, 62, + 7, 15, 23, 31, 39, 47, 55, 63 +}; + +// Constant values for KeySchedule function +unsigned char C[12][64] = { +{ + 0xb1,0x08,0x5b,0xda,0x1e,0xca,0xda,0xe9,0xeb,0xcb,0x2f,0x81,0xc0,0x65,0x7c,0x1f, + 0x2f,0x6a,0x76,0x43,0x2e,0x45,0xd0,0x16,0x71,0x4e,0xb8,0x8d,0x75,0x85,0xc4,0xfc, + 0x4b,0x7c,0xe0,0x91,0x92,0x67,0x69,0x01,0xa2,0x42,0x2a,0x08,0xa4,0x60,0xd3,0x15, + 0x05,0x76,0x74,0x36,0xcc,0x74,0x4d,0x23,0xdd,0x80,0x65,0x59,0xf2,0xa6,0x45,0x07 +}, +{ + 0x6f,0xa3,0xb5,0x8a,0xa9,0x9d,0x2f,0x1a,0x4f,0xe3,0x9d,0x46,0x0f,0x70,0xb5,0xd7, + 0xf3,0xfe,0xea,0x72,0x0a,0x23,0x2b,0x98,0x61,0xd5,0x5e,0x0f,0x16,0xb5,0x01,0x31, + 0x9a,0xb5,0x17,0x6b,0x12,0xd6,0x99,0x58,0x5c,0xb5,0x61,0xc2,0xdb,0x0a,0xa7,0xca, + 0x55,0xdd,0xa2,0x1b,0xd7,0xcb,0xcd,0x56,0xe6,0x79,0x04,0x70,0x21,0xb1,0x9b,0xb7 +}, +{ + 0xf5,0x74,0xdc,0xac,0x2b,0xce,0x2f,0xc7,0x0a,0x39,0xfc,0x28,0x6a,0x3d,0x84,0x35, + 0x06,0xf1,0x5e,0x5f,0x52,0x9c,0x1f,0x8b,0xf2,0xea,0x75,0x14,0xb1,0x29,0x7b,0x7b, + 0xd3,0xe2,0x0f,0xe4,0x90,0x35,0x9e,0xb1,0xc1,0xc9,0x3a,0x37,0x60,0x62,0xdb,0x09, + 0xc2,0xb6,0xf4,0x43,0x86,0x7a,0xdb,0x31,0x99,0x1e,0x96,0xf5,0x0a,0xba,0x0a,0xb2 +}, +{ + 0xef,0x1f,0xdf,0xb3,0xe8,0x15,0x66,0xd2,0xf9,0x48,0xe1,0xa0,0x5d,0x71,0xe4,0xdd, + 0x48,0x8e,0x85,0x7e,0x33,0x5c,0x3c,0x7d,0x9d,0x72,0x1c,0xad,0x68,0x5e,0x35,0x3f, + 0xa9,0xd7,0x2c,0x82,0xed,0x03,0xd6,0x75,0xd8,0xb7,0x13,0x33,0x93,0x52,0x03,0xbe, + 0x34,0x53,0xea,0xa1,0x93,0xe8,0x37,0xf1,0x22,0x0c,0xbe,0xbc,0x84,0xe3,0xd1,0x2e +}, +{ + 0x4b,0xea,0x6b,0xac,0xad,0x47,0x47,0x99,0x9a,0x3f,0x41,0x0c,0x6c,0xa9,0x23,0x63, + 0x7f,0x15,0x1c,0x1f,0x16,0x86,0x10,0x4a,0x35,0x9e,0x35,0xd7,0x80,0x0f,0xff,0xbd, + 0xbf,0xcd,0x17,0x47,0x25,0x3a,0xf5,0xa3,0xdf,0xff,0x00,0xb7,0x23,0x27,0x1a,0x16, + 0x7a,0x56,0xa2,0x7e,0xa9,0xea,0x63,0xf5,0x60,0x17,0x58,0xfd,0x7c,0x6c,0xfe,0x57 +}, +{ + 0xae,0x4f,0xae,0xae,0x1d,0x3a,0xd3,0xd9,0x6f,0xa4,0xc3,0x3b,0x7a,0x30,0x39,0xc0, + 0x2d,0x66,0xc4,0xf9,0x51,0x42,0xa4,0x6c,0x18,0x7f,0x9a,0xb4,0x9a,0xf0,0x8e,0xc6, + 0xcf,0xfa,0xa6,0xb7,0x1c,0x9a,0xb7,0xb4,0x0a,0xf2,0x1f,0x66,0xc2,0xbe,0xc6,0xb6, + 0xbf,0x71,0xc5,0x72,0x36,0x90,0x4f,0x35,0xfa,0x68,0x40,0x7a,0x46,0x64,0x7d,0x6e +}, +{ + 0xf4,0xc7,0x0e,0x16,0xee,0xaa,0xc5,0xec,0x51,0xac,0x86,0xfe,0xbf,0x24,0x09,0x54, + 0x39,0x9e,0xc6,0xc7,0xe6,0xbf,0x87,0xc9,0xd3,0x47,0x3e,0x33,0x19,0x7a,0x93,0xc9, + 0x09,0x92,0xab,0xc5,0x2d,0x82,0x2c,0x37,0x06,0x47,0x69,0x83,0x28,0x4a,0x05,0x04, + 0x35,0x17,0x45,0x4c,0xa2,0x3c,0x4a,0xf3,0x88,0x86,0x56,0x4d,0x3a,0x14,0xd4,0x93 +}, +{ + 0x9b,0x1f,0x5b,0x42,0x4d,0x93,0xc9,0xa7,0x03,0xe7,0xaa,0x02,0x0c,0x6e,0x41,0x41, + 0x4e,0xb7,0xf8,0x71,0x9c,0x36,0xde,0x1e,0x89,0xb4,0x44,0x3b,0x4d,0xdb,0xc4,0x9a, + 0xf4,0x89,0x2b,0xcb,0x92,0x9b,0x06,0x90,0x69,0xd1,0x8d,0x2b,0xd1,0xa5,0xc4,0x2f, + 0x36,0xac,0xc2,0x35,0x59,0x51,0xa8,0xd9,0xa4,0x7f,0x0d,0xd4,0xbf,0x02,0xe7,0x1e +}, +{ + 0x37,0x8f,0x5a,0x54,0x16,0x31,0x22,0x9b,0x94,0x4c,0x9a,0xd8,0xec,0x16,0x5f,0xde, + 0x3a,0x7d,0x3a,0x1b,0x25,0x89,0x42,0x24,0x3c,0xd9,0x55,0xb7,0xe0,0x0d,0x09,0x84, + 0x80,0x0a,0x44,0x0b,0xdb,0xb2,0xce,0xb1,0x7b,0x2b,0x8a,0x9a,0xa6,0x07,0x9c,0x54, + 0x0e,0x38,0xdc,0x92,0xcb,0x1f,0x2a,0x60,0x72,0x61,0x44,0x51,0x83,0x23,0x5a,0xdb +}, +{ + 0xab,0xbe,0xde,0xa6,0x80,0x05,0x6f,0x52,0x38,0x2a,0xe5,0x48,0xb2,0xe4,0xf3,0xf3, + 0x89,0x41,0xe7,0x1c,0xff,0x8a,0x78,0xdb,0x1f,0xff,0xe1,0x8a,0x1b,0x33,0x61,0x03, + 0x9f,0xe7,0x67,0x02,0xaf,0x69,0x33,0x4b,0x7a,0x1e,0x6c,0x30,0x3b,0x76,0x52,0xf4, + 0x36,0x98,0xfa,0xd1,0x15,0x3b,0xb6,0xc3,0x74,0xb4,0xc7,0xfb,0x98,0x45,0x9c,0xed +}, +{ + 0x7b,0xcd,0x9e,0xd0,0xef,0xc8,0x89,0xfb,0x30,0x02,0xc6,0xcd,0x63,0x5a,0xfe,0x94, + 0xd8,0xfa,0x6b,0xbb,0xeb,0xab,0x07,0x61,0x20,0x01,0x80,0x21,0x14,0x84,0x66,0x79, + 0x8a,0x1d,0x71,0xef,0xea,0x48,0xb9,0xca,0xef,0xba,0xcd,0x1d,0x7d,0x47,0x6e,0x98, + 0xde,0xa2,0x59,0x4a,0xc0,0x6f,0xd8,0x5d,0x6b,0xca,0xa4,0xcd,0x81,0xf3,0x2d,0x1b +}, +{ + 0x37,0x8e,0xe7,0x67,0xf1,0x16,0x31,0xba,0xd2,0x13,0x80,0xb0,0x04,0x49,0xb1,0x7a, + 0xcd,0xa4,0x3c,0x32,0xbc,0xdf,0x1d,0x77,0xf8,0x20,0x12,0xd4,0x30,0x21,0x9f,0x9b, + 0x5d,0x80,0xef,0x9d,0x18,0x91,0xcc,0x86,0xe7,0x1d,0xa4,0xaa,0x88,0xe1,0x28,0x52, + 0xfa,0xf4,0x17,0xd5,0xd9,0xb2,0x1b,0x99,0x48,0xbc,0x92,0x4a,0xf1,0x1b,0xd7,0x20 +} +}; + +#endif /* STRIBOG_DATA_H_ */ From b0f8bb772d6831de0c523b69679458e815c3a622 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:14:00 -0500 Subject: [PATCH 333/576] Create stribog.h --- .../hashing/streebog/stribog.h | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/streebog/stribog.h diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/stribog.h b/stratum/algos/binarium_hash_v1/hashing/streebog/stribog.h new file mode 100644 index 000000000..664c8a1f0 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/streebog/stribog.h @@ -0,0 +1,23 @@ +/* + * stribog.h + * + * Created on: Feb 15, 2013 + * Author: Oleksandr Kazymyrov + * Acknowledgments: Oleksii Shevchuk + */ + +#ifndef STRIBOG_H_ +#define STRIBOG_H_ + +#ifdef __cplusplus +extern "C"{ +#endif + +void hash_512(const unsigned char *message,unsigned long long length,unsigned char *hash); +void hash_256(const unsigned char *message,unsigned long long length,unsigned char *hash); + +#ifdef __cplusplus +} +#endif + +#endif /* STRIBOG_H_ */ From 15ab4354f9c6279ccd46a5e5d8a7062d25defae7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:14:18 -0500 Subject: [PATCH 334/576] Create stribog.c --- .../hashing/streebog/table/stribog.c | 394 ++++++++++++++++++ 1 file changed, 394 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c new file mode 100644 index 000000000..982fcffd8 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c @@ -0,0 +1,394 @@ +/* + * stribog.c + * + * Created on: Feb 15, 2013 + * Author: Oleksandr Kazymyrov + * Acknowledgments: Oleksii Shevchuk + */ + +#include +#include +#include +#include + +#include "stribog_data.h" +//#include "../stribog.h" + +void AddModulo512(const void *a,const void *b,void *c) +{ + const unsigned char *A=a, *B=b; + unsigned char *C=c; + int t = 0; +#ifdef FULL_UNROLL +#define ADDBYTE_8(i) t = A[i] + B[i] + (t >> 8); C[i] = t & 0xFF; + + ADDBYTE_8(63) + ADDBYTE_8(62) + ADDBYTE_8(61) + ADDBYTE_8(60) + ADDBYTE_8(59) + ADDBYTE_8(58) + ADDBYTE_8(57) + ADDBYTE_8(56) + ADDBYTE_8(55) + ADDBYTE_8(54) + ADDBYTE_8(53) + ADDBYTE_8(52) + ADDBYTE_8(51) + ADDBYTE_8(50) + ADDBYTE_8(49) + ADDBYTE_8(48) + ADDBYTE_8(47) + ADDBYTE_8(46) + ADDBYTE_8(45) + ADDBYTE_8(44) + ADDBYTE_8(43) + ADDBYTE_8(42) + ADDBYTE_8(41) + ADDBYTE_8(40) + ADDBYTE_8(39) + ADDBYTE_8(38) + ADDBYTE_8(37) + ADDBYTE_8(36) + ADDBYTE_8(35) + ADDBYTE_8(34) + ADDBYTE_8(33) + ADDBYTE_8(32) + ADDBYTE_8(31) + ADDBYTE_8(30) + ADDBYTE_8(29) + ADDBYTE_8(28) + ADDBYTE_8(27) + ADDBYTE_8(26) + ADDBYTE_8(25) + ADDBYTE_8(24) + ADDBYTE_8(23) + ADDBYTE_8(22) + ADDBYTE_8(21) + ADDBYTE_8(20) + ADDBYTE_8(19) + ADDBYTE_8(18) + ADDBYTE_8(17) + ADDBYTE_8(16) + ADDBYTE_8(15) + ADDBYTE_8(14) + ADDBYTE_8(13) + ADDBYTE_8(12) + ADDBYTE_8(11) + ADDBYTE_8(10) + ADDBYTE_8(9) + ADDBYTE_8(8) + ADDBYTE_8(7) + ADDBYTE_8(6) + ADDBYTE_8(5) + ADDBYTE_8(4) + ADDBYTE_8(3) + ADDBYTE_8(2) + ADDBYTE_8(1) + ADDBYTE_8(0) + +#else + int i = 0; + + for(i=63;i>=0;i--) + { + t = A[i] + B[i] + (t >> 8); + C[i] = t & 0xFF; + } +#endif +} + +void AddXor512(const void *a,const void *b,void *c) +{ + const unsigned long long *A=a, *B=b; + unsigned long long *C=c; +#ifdef FULL_UNROLL + C[0] = A[0] ^ B[0]; + C[1] = A[1] ^ B[1]; + C[2] = A[2] ^ B[2]; + C[3] = A[3] ^ B[3]; + C[4] = A[4] ^ B[4]; + C[5] = A[5] ^ B[5]; + C[6] = A[6] ^ B[6]; + C[7] = A[7] ^ B[7]; +#else + int i = 0; + + for(i=0;i<8;i++) + { + C[i] = A[i] ^ B[i]; + } +#endif +} + +void F(unsigned char *state) +{ + unsigned long long return_state[8]; + register unsigned long long r = 0; + r ^= Streebog_T[0][state[56]]; + r ^= Streebog_T[1][state[48]]; + r ^= Streebog_T[2][state[40]]; + r ^= Streebog_T[3][state[32]]; + r ^= Streebog_T[4][state[24]]; + r ^= Streebog_T[5][state[16]]; + r ^= Streebog_T[6][state[8]]; + r ^= Streebog_T[7][state[0]]; + return_state[0] = r; + r = 0; + + r ^= Streebog_T[0][state[57]]; + r ^= Streebog_T[1][state[49]]; + r ^= Streebog_T[2][state[41]]; + r ^= Streebog_T[3][state[33]]; + r ^= Streebog_T[4][state[25]]; + r ^= Streebog_T[5][state[17]]; + r ^= Streebog_T[6][state[9]]; + r ^= Streebog_T[7][state[1]]; + return_state[1] = r; + r = 0; + + r ^= Streebog_T[0][state[58]]; + r ^= Streebog_T[1][state[50]]; + r ^= Streebog_T[2][state[42]]; + r ^= Streebog_T[3][state[34]]; + r ^= Streebog_T[4][state[26]]; + r ^= Streebog_T[5][state[18]]; + r ^= Streebog_T[6][state[10]]; + r ^= Streebog_T[7][state[2]]; + return_state[2] = r; + r = 0; + + r ^= Streebog_T[0][state[59]]; + r ^= Streebog_T[1][state[51]]; + r ^= Streebog_T[2][state[43]]; + r ^= Streebog_T[3][state[35]]; + r ^= Streebog_T[4][state[27]]; + r ^= Streebog_T[5][state[19]]; + r ^= Streebog_T[6][state[11]]; + r ^= Streebog_T[7][state[3]]; + return_state[3] = r; + r = 0; + + r ^= Streebog_T[0][state[60]]; + r ^= Streebog_T[1][state[52]]; + r ^= Streebog_T[2][state[44]]; + r ^= Streebog_T[3][state[36]]; + r ^= Streebog_T[4][state[28]]; + r ^= Streebog_T[5][state[20]]; + r ^= Streebog_T[6][state[12]]; + r ^= Streebog_T[7][state[4]]; + return_state[4] = r; + r = 0; + + r ^= Streebog_T[0][state[61]]; + r ^= Streebog_T[1][state[53]]; + r ^= Streebog_T[2][state[45]]; + r ^= Streebog_T[3][state[37]]; + r ^= Streebog_T[4][state[29]]; + r ^= Streebog_T[5][state[21]]; + r ^= Streebog_T[6][state[13]]; + r ^= Streebog_T[7][state[5]]; + return_state[5] = r; + r = 0; + + r ^= Streebog_T[0][state[62]]; + r ^= Streebog_T[1][state[54]]; + r ^= Streebog_T[2][state[46]]; + r ^= Streebog_T[3][state[38]]; + r ^= Streebog_T[4][state[30]]; + r ^= Streebog_T[5][state[22]]; + r ^= Streebog_T[6][state[14]]; + r ^= Streebog_T[7][state[6]]; + return_state[6] = r; + r = 0; + + r ^= Streebog_T[0][state[63]]; + r ^= Streebog_T[1][state[55]]; + r ^= Streebog_T[2][state[47]]; + r ^= Streebog_T[3][state[39]]; + r ^= Streebog_T[4][state[31]]; + r ^= Streebog_T[5][state[23]]; + r ^= Streebog_T[6][state[15]]; + r ^= Streebog_T[7][state[7]]; + return_state[7] = r; + + memcpy(state,(unsigned char*)return_state,64); +} + +#define KeySchedule(K,i) AddXor512(K,Streebog_C[i],K); F(K); + +void E(unsigned char *K,const unsigned char *m, unsigned char *state) +{ +#ifdef FULL_UNROLL + AddXor512(m,K,state); + + F(state); + KeySchedule(K,0); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,1); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,2); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,3); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,4); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,5); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,6); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,7); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,8); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,9); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,10); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,11); + AddXor512(state,K,state); +#else + int i = 0; + + AddXor512(m,K,state); + + for(i=0;i<12;i++) + { + F(state); + KeySchedule(K,i); + AddXor512(state,K,state); + } +#endif +} + +void g_N(const unsigned char *N,unsigned char *h,const unsigned char *m) +{ + unsigned char t[64], K[64]; + + AddXor512(N,h,K); + + F(K); + + E(K,m,t); + + AddXor512(t,h,t); + AddXor512(t,m,h); +} + +void hash_X(unsigned char *IV,const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char v512[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00 + }; + unsigned char v0[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char Sigma[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char N[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char m[64], *hash = IV; + unsigned long long len = length; + + // Stage 2 + while (len >= 512) + { + memcpy(m, message + len/8 - 63 - ( (len & 0x7) == 0 ), 64); + + g_N(N,hash,m); + AddModulo512(N,v512,N); + AddModulo512(Sigma,m,Sigma); + len -= 512; + } + + memset(m,0,64); + memcpy(m + 63 - len/8 + ( (len & 0x7) == 0 ), message, len/8 + 1 - ( (len & 0x7) == 0 )); + + // Stage 3 + m[ 63 - len/8 ] |= (1 << (len & 0x7)); + + g_N(N,hash,m); + v512[63] = len & 0xFF; + v512[62] = len >> 8; + AddModulo512(N,v512,N); + + AddModulo512(Sigma,m,Sigma); + + g_N(v0,hash,N); + g_N(v0,hash,Sigma); + + memcpy(out, hash, 64); +} + +#ifdef __cplusplus +extern "C"{ +#endif + +void hash_512(const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char IV[64] = + { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + + hash_X(IV,message,length,out); +} + +void hash_256(const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char IV[64] = + { + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 + }; + unsigned char hash[64]; + + hash_X(IV,message,length,hash); + + memcpy(out,hash,32); +} + +#ifdef __cplusplus +} +#endif From 7cac19aa6be7bcd00f1718233989dc1a00eb16fb Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:14:43 -0500 Subject: [PATCH 335/576] Create stribog_data.h --- .../hashing/streebog/table/stribog_data.h | 619 ++++++++++++++++++ 1 file changed, 619 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog_data.h diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog_data.h b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog_data.h new file mode 100644 index 000000000..3239a54af --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog_data.h @@ -0,0 +1,619 @@ +/* +* stribog_data.h +* +* Created on: Feb 15, 2013 +* Author: Oleksandr Kazymyrov +* Acknowledgments: Oleksii Shevchuk +*/ +#ifndef STRIBOG_DATA_H_ +#define STRIBOG_DATA_H_ + +// Tables for function F +const unsigned long long Streebog_T[8][256] = { +{ + 0xE6F87E5C5B711FD0,0x258377800924FA16,0xC849E07E852EA4A8,0x5B4686A18F06C16A, + 0x0B32E9A2D77B416E,0xABDA37A467815C66,0xF61796A81A686676,0xF5DC0B706391954B, + 0x4862F38DB7E64BF1,0xFF5C629A68BD85C5,0xCB827DA6FCD75795,0x66D36DAF69B9F089, + 0x356C9F74483D83B0,0x7CBCECB1238C99A1,0x36A702AC31C4708D,0x9EB6A8D02FBCDFD6, + 0x8B19FA51E5B3AE37,0x9CCFB5408A127D0B,0xBC0C78B508208F5A,0xE533E3842288ECED, + 0xCEC2C7D377C15FD2,0xEC7817B6505D0F5E,0xB94CC2C08336871D,0x8C205DB4CB0B04AD, + 0x763C855B28A0892F,0x588D1B79F6FF3257,0x3FECF69E4311933E,0x0FC0D39F803A18C9, + 0xEE010A26F5F3AD83,0x10EFE8F4411979A6,0x5DCDA10C7DE93A10,0x4A1BEE1D1248E92C, + 0x53BFF2DB21847339,0xB4F50CCFA6A23D09,0x5FB4BC9CD84798CD,0xE88A2D8B071C56F9, + 0x7F7771695A756A9C,0xC5F02E71A0BA1EBC,0xA663F9AB4215E672,0x2EB19E22DE5FBB78, + 0x0DB9CE0F2594BA14,0x82520E6397664D84,0x2F031E6A0208EA98,0x5C7F2144A1BE6BF0, + 0x7A37CB1CD16362DB,0x83E08E2B4B311C64,0xCF70479BAB960E32,0x856BA986B9DEE71E, + 0xB5478C877AF56CE9,0xB8FE42885F61D6FD,0x1BDD0156966238C8,0x622157923EF8A92E, + 0xFC97FF42114476F8,0x9D7D350856452CEB,0x4C90C9B0E0A71256,0x2308502DFBCB016C, + 0x2D7A03FAA7A64845,0xF46E8B38BFC6C4AB,0xBDBEF8FDD477DEBA,0x3AAC4CEBC8079B79, + 0xF09CB105E8879D0C,0x27FA6A10AC8A58CB,0x8960E7C1401D0CEA,0x1A6F811E4A356928, + 0x90C4FB0773D196FF,0x43501A2F609D0A9F,0xF7A516E0C63F3796,0x1CE4A6B3B8DA9252, + 0x1324752C38E08A9B,0xA5A864733BEC154F,0x2BF124575549B33F,0xD766DB15440DC5C7, + 0xA7D179E39E42B792,0xDADF151A61997FD3,0x86A0345EC0271423,0x38D5517B6DA939A4, + 0x6518F077104003B4,0x02791D90A5AEA2DD,0x88D267899C4A5D0A,0x930F66DF0A2865C2, + 0x4EE9D4204509B08B,0x325538916685292A,0x412907BFC533A842,0xB27E2B62544DC673, + 0x6C5304456295E007,0x5AF406E95351908A,0x1F2F3B6BC123616F,0xC37B09DC5255E5C6, + 0x3967D133B1FE6844,0x298839C7F0E711E2,0x409B87F71964F9A2,0xE938ADC3DB4B0719, + 0x0C0B4E47F9C3EBF4,0x5534D576D36B8843,0x4610A05AEB8B02D8,0x20C3CDF58232F251, + 0x6DE1840DBEC2B1E7,0xA0E8DE06B0FA1D08,0x7B854B540D34333B,0x42E29A67BCCA5B7F, + 0xD8A6088AC437DD0E,0xC63BB3A9D943ED81,0x21714DBD5E65A3B1,0x6761EDE7B5EEA169, + 0x2431F7C8D573ABF6,0xD51FC685E1A3671A,0x5E063CD40410C92D,0x283AB98F2CB04002, + 0x8FEBC06CB2F2F790,0x17D64F116FA1D33C,0xE07359F1A99EE4AA,0x784ED68C74CDC006, + 0x6E2A19D5C73B42DA,0x8712B4161C7045C3,0x371582E4ED93216D,0xACE390414939F6FC, + 0x7EC5F12186223B7C,0xC0B094042BAC16FB,0xF9D745379A527EBF,0x737C3F2EA3B68168, + 0x33E7B8D9BAD278CA,0xA9A32A34C22FFEBB,0xE48163CCFEDFBD0D,0x8E5940246EA5A670, + 0x51C6EF4B842AD1E4,0x22BAD065279C508C,0xD91488C218608CEE,0x319EA5491F7CDA17, + 0xD394E128134C9C60,0x094BF43272D5E3B3,0x9BF612A5A4AAD791,0xCCBBDA43D26FFD0F, + 0x34DE1F3C946AD250,0x4F5B5468995EE16B,0xDF9FAF6FEA8F7794,0x2648EA5870DD092B, + 0xBFC7E56D71D97C67,0xDDE6B2FF4F21D549,0x3C276B463AE86003,0x91767B4FAF86C71F, + 0x68A13E7835D4B9A0,0xB68C115F030C9FD4,0x141DD2C916582001,0x983D8F7DDD5324AC, + 0x64AA703FCC175254,0xC2C989948E02B426,0x3E5E76D69F46C2DE,0x50746F03587D8004, + 0x45DB3D829272F1E5,0x60584A029B560BF3,0xFBAE58A73FFCDC62,0xA15A5E4E6CAD4CE8, + 0x4BA96E55CE1FB8CC,0x08F9747AAE82B253,0xC102144CF7FB471B,0x9F042898F3EB8E36, + 0x068B27ADF2EFFB7A,0xEDCA97FE8C0A5EBE,0x778E0513F4F7D8CF,0x302C2501C32B8BF7, + 0x8D92DDFC175C554D,0xF865C57F46052F5F,0xEAF3301BA2B2F424,0xAA68B7ECBBD60D86, + 0x998F0F350104754C,0x0000000000000000,0xF12E314D34D0CCEC,0x710522BE061823B5, + 0xAF280D9930C005C1,0x97FD5CE25D693C65,0x19A41CC633CC9A15,0x95844172F8C79EB8, + 0xDC5432B7937684A9,0x9436C13A2490CF58,0x802B13F332C8EF59,0xC442AE397CED4F5C, + 0xFA1CD8EFE3AB8D82,0xF2E5AC954D293FD1,0x6AD823E8907A1B7D,0x4D2249F83CF043B6, + 0x03CB9DD879F9F33D,0xDE2D2F2736D82674,0x2A43A41F891EE2DF,0x6F98999D1B6C133A, + 0xD4AD46CD3DF436FA,0xBB35DF50269825C0,0x964FDCAA813E6D85,0xEB41B0537EE5A5C4, + 0x0540BA758B160847,0xA41AE43BE7BB44AF,0xE3B8C429D0671797,0x819993BBEE9FBEB9, + 0xAE9A8DD1EC975421,0xF3572CDD917E6E31,0x6393D7DAE2AFF8CE,0x47A2201237DC5338, + 0xA32343DEC903EE35,0x79FC56C4A89A91E6,0x01B28048DC5751E0,0x1296F564E4B7DB7B, + 0x75F7188351597A12,0xDB6D9552BDCE2E33,0x1E9DBB231D74308F,0x520D7293FDD322D9, + 0xE20A44610C304677,0xFEEEE2D2B4EAD425,0xCA30FDEE20800675,0x61EACA4A47015A13, + 0xE74AFE1487264E30,0x2CC883B27BF119A5,0x1664CF59B3F682DC,0xA811AA7C1E78AF5B, + 0x1D5626FB648DC3B2,0xB73E9117DF5BCE34,0xD05F7CF06AB56F5D,0xFD257F0ACD132718, + 0x574DC8E676C52A9E,0x0739A7E52EB8AA9A,0x5486553E0F3CD9A3,0x56FF48AEAA927B7E, + 0xBE756525AD8E2D87,0x7D0E6CF9FFDBC841,0x3B1ECCA31450CA99,0x6913BE30E983E840, + 0xAD511009956EA71C,0xB1B5B6BA2DB4354E,0x4469BDCA4E25A005,0x15AF5281CA0F71E1, + 0x744598CB8D0E2BF2,0x593F9B312AA863B7,0xEFB38A6E29A4FC63,0x6B6AA3A04C2D4A9D, + 0x3D95EB0EE6BF31E3,0xA291C3961554BFD5,0x18169C8EEF9BCBF5,0x115D68BC9D4E2846, + 0xBA875F18FACF7420,0xD1EDFCB8B6E23EBD,0xB00736F2F1E364AE,0x84D929CE6589B6FE, + 0x70B7A2F6DA4F7255,0x0E7253D75C6D4929,0x04F23A3D574159A7,0x0A8069EA0B2C108E, + 0x49D073C56BB11A11,0x8AAB7A1939E4FFD7,0xCD095A0B0E38ACEF,0xC9FB60365979F548, + 0x92BDE697D67F3422,0xC78933E10514BC61,0xE1C1D9B975C9B54A,0xD2266160CF1BCD80, + 0x9A4492ED78FD8671,0xB3CCAB2A881A9793,0x72CEBF667FE1D088,0xD6D45B5D985A9427 +}, +{ + 0xC811A8058C3F55DE,0x65F5B43196B50619,0xF74F96B1D6706E43,0x859D1E8BCB43D336, + 0x5AAB8A85CCFA3D84,0xF9C7BF99C295FCFD,0xA21FD5A1DE4B630F,0xCDB3EF763B8B456D, + 0x803F59F87CF7C385,0xB27C73BE5F31913C,0x98E3AC6633B04821,0xBF61674C26B8F818, + 0x0FFBC995C4C130C8,0xAAA0862010761A98,0x6057F342210116AA,0xF63C760C0654CC35, + 0x2DDB45CC667D9042,0xBCF45A964BD40382,0x68E8A0C3EF3C6F3D,0xA7BD92D269FF73BC, + 0x290AE20201ED2287,0xB7DE34CDE885818F,0xD901EEA7DD61059B,0xD6FA273219A03553, + 0xD56F1AE874CCCEC9,0xEA31245C2E83F554,0x7034555DA07BE499,0xCE26D2AC56E7BEF7, + 0xFD161857A5054E38,0x6A0E7DA4527436D1,0x5BD86A381CDE9FF2,0xCAF7756231770C32, + 0xB09AAED9E279C8D0,0x5DEF1091C60674DB,0x111046A2515E5045,0x23536CE4729802FC, + 0xC50CBCF7F5B63CFA,0x73A16887CD171F03,0x7D2941AFD9F28DBD,0x3F5E3EB45A4F3B9D, + 0x84EEFE361B677140,0x3DB8E3D3E7076271,0x1A3A28F9F20FD248,0x7EBC7C75B49E7627, + 0x74E5F293C7EB565C,0x18DCF59E4F478BA4,0x0C6EF44FA9ADCB52,0xC699812D98DAC760, + 0x788B06DC6E469D0E,0xFC65F8EA7521EC4E,0x30A5F7219E8E0B55,0x2BEC3F65BCA57B6B, + 0xDDD04969BAF1B75E,0x99904CDBE394EA57,0x14B201D1E6EA40F6,0xBBB0C08241284ADD, + 0x50F20463BF8F1DFF,0xE8D7F93B93CBACB8,0x4D8CB68E477C86E8,0xC1DD1B3992268E3F, + 0x7C5AA11209D62FCB,0x2F3D98ABDB35C9AE,0x671369562BFD5FF5,0x15C1E16C36CEE280, + 0x1D7EB2EDF8F39B17,0xDA94D37DB00DFE01,0x877BC3EC760B8ADA,0xCB8495DFE153AE44, + 0x05A24773B7B410B3,0x12857B783C32ABDF,0x8EB770D06812513B,0x536739B9D2E3E665, + 0x584D57E271B26468,0xD789C78FC9849725,0xA935BBFA7D1AE102,0x8B1537A3DFA64188, + 0xD0CD5D9BC378DE7A,0x4AC82C9A4D80CFB7,0x42777F1B83BDB620,0x72D2883A1D33BD75, + 0x5E7A2D4BAB6A8F41,0xF4DAAB6BBB1C95D9,0x905CFFE7FD8D31B6,0x83AA6422119B381F, + 0xC0AEFB8442022C49,0xA0F908C663033AE3,0xA428AF0804938826,0xADE41C341A8A53C7, + 0xAE7121EE77E6A85D,0xC47F5C4A25929E8C,0xB538E9AA55CDD863,0x06377AA9DAD8EB29, + 0xA18AE87BB3279895,0x6EDFDA6A35E48414,0x6B7D9D19825094A7,0xD41CFA55A4E86CBF, + 0xE5CAEDC9EA42C59C,0xA36C351C0E6FC179,0x5181E4DE6FABBF89,0xFFF0C530184D17D4, + 0x9D41EB1584045892,0x1C0D525028D73961,0xF178EC180CA8856A,0x9A0571018EF811CD, + 0x4091A27C3EF5EFCC,0x19AF15239F6329D2,0x347450EFF91EB990,0xE11B4A078DD27759, + 0xB9561DE5FC601331,0x912F1F5A2DA993C0,0x1654DCB65BA2191A,0x3E2DDE098A6B99EB, + 0x8A66D71E0F82E3FE,0x8C51ADB7D55A08D7,0x4533E50F8941FF7F,0x02E6DD67BD4859EC, + 0xE068AABA5DF6D52F,0xC24826E3FF4A75A5,0x6C39070D88ACDDF8,0x6486548C4691A46F, + 0xD1BEBD26135C7C0C,0xB30F93038F15334A,0x82D9849FC1BF9A69,0x9C320BA85420FAE4, + 0xFA528243AFF90767,0x9ED4D6CFE968A308,0xB825FD582C44B147,0x9B7691BC5EDCB3BB, + 0xC7EA619048FE6516,0x1063A61F817AF233,0x47D538683409A693,0x63C2CE984C6DED30, + 0x2A9FDFD86C81D91D,0x7B1E3B06032A6694,0x666089EBFBD9FD83,0x0A598EE67375207B, + 0x07449A140AFC495F,0x2CA8A571B6593234,0x1F986F8A45BBC2FB,0x381AA4A050B372C2, + 0x5423A3ADD81FAF3A,0x17273C0B8B86BB6C,0xFE83258DC869B5A2,0x287902BFD1C980F1, + 0xF5A94BD66B3837AF,0x88800A79B2CABA12,0x55504310083B0D4C,0xDF36940E07B9EEB2, + 0x04D1A7CE6790B2C5,0x612413FFF125B4DC,0x26F12B97C52C124F,0x86082351A62F28AC, + 0xEF93632F9937E5E7,0x3507B052293A1BE6,0xE72C30AE570A9C70,0xD3586041AE1425E0, + 0xDE4574B3D79D4CC4,0x92BA228040C5685A,0xF00B0CA5DC8C271C,0xBE1287F1F69C5A6E, + 0xF39E317FB1E0DC86,0x495D114020EC342D,0x699B407E3F18CD4B,0xDCA3A9D46AD51528, + 0x0D1D14F279896924,0x0000000000000000,0x593EB75FA196C61E,0x2E4E78160B116BD8, + 0x6D4AE7B058887F8E,0xE65FD013872E3E06,0x7A6DDBBBD30EC4E2,0xAC97FC89CAAEF1B1, + 0x09CCB33C1E19DBE1,0x89F3EAC462EE1864,0x7770CF49AA87ADC6,0x56C57ECA6557F6D6, + 0x03953DDA6D6CFB9A,0x36928D884456E07C,0x1EEB8F37959F608D,0x31D6179C4EAAA923, + 0x6FAC3AD7E5C02662,0x43049FA653991456,0xABD3669DC052B8EE,0xAF02C153A7C20A2B, + 0x3CCB036E3723C007,0x93C9C23D90E1CA2C,0xC33BC65E2F6ED7D3,0x4CFF56339758249E, + 0xB1E94E64325D6AA6,0x37E16D359472420A,0x79F8E661BE623F78,0x5214D90402C74413, + 0x482EF1FDF0C8965B,0x13F69BC5EC1609A9,0x0E88292814E592BE,0x4E198B542A107D72, + 0xCCC00FCBEBAFE71B,0x1B49C844222B703E,0x2564164DA840E9D5,0x20C6513E1FF4F966, + 0xBAC3203F910CE8AB,0xF2EDD1C261C47EF0,0x814CB945ACD361F3,0x95FEB8944A392105, + 0x5C9CF02C1622D6AD,0x971865F3F77178E9,0xBD87BA2B9BF0A1F4,0x444005B259655D09, + 0xED75BE48247FBC0B,0x7596122E17CFF42A,0xB44B091785E97A15,0x966B854E2755DA9F, + 0xEEE0839249134791,0x32432A4623C652B9,0xA8465B47AD3E4374,0xF8B45F2412B15E8B, + 0x2417F6F078644BA3,0xFB2162FE7FDDA511,0x4BBBCC279DA46DC1,0x0173E0BDD024A276, + 0x22208C59A2BCA08A,0x8FC4906DB836F34D,0xE4B90D743A6667EA,0x7147B5E0705F46EF, + 0x2782CB2A1508B039,0xEC065EF5F45B1E7D,0x21B5B183CFD05B10,0xDBE733C060295C77, + 0x9FA73672394C017E,0xCF55321186C31C81,0xD8720E1A0D45A7ED,0x3B8F997A3DDF8958, + 0x3AFC79C7EDFB2B2E,0xE9A4198643EF0ECE,0x5F09CDF67B4E2D37,0x4F6A6BE9FA34DF04, + 0xB6ADD47038A123F9,0x8D224D0A057EAAA1,0xC96248B85C1BF7A8,0xE3FD9760309A2EB5, + 0x0B2A6E5BA351820D,0xEB42C4E1FEA75722,0x948D58299A1D8373,0x7FCF9CC864BAD451, + 0xA55B4FB5D4B72A50,0x08BF5381CE3D7997,0x46A6D8D5E42D04E5,0xD22B80FC7E308796, + 0x57B69E77B57354A0,0x3969441D8097D0B4,0x3330CAFBF3E2F0CF,0xE28E77DDE0BE8CC3, + 0x62B12E259C494F46,0xA6CE726FB9DBD1CA,0x41E242C1EED14DBA,0x76032FF47AA30FB0 +}, +{ + 0x45B268A93ACDE4CC,0xAF7F0BE884549D08,0x048354B3C1468263,0x925435C2C80EFED2, + 0xEE4E37F27FDFFBA7,0x167A33920C60F14D,0xFB123B52EA03E584,0x4A0CAB53FDBB9007, + 0x9DEAF6380F788A19,0xCB48EC558F0CB32A,0xB59DC4B2D6FEF7E0,0xDCDBCA22F4F3ECB6, + 0x11DF5813549A9C40,0xE33FDEDF568ACED3,0xA0C1C8124322E9C3,0x07A56B8158FA6D0D, + 0x77279579B1E1F3DD,0xD9B18B74422AC004,0xB8EC2D9FFFABC294,0xF4ACF8A82D75914F, + 0x7BBF69B1EF2B6878,0xC4F62FAF487AC7E1,0x76CE809CC67E5D0C,0x6711D88F92E4C14C, + 0x627B99D9243DEDFE,0x234AA5C3DFB68B51,0x909B1F15262DBF6D,0x4F66EA054B62BCB5, + 0x1AE2CF5A52AA6AE8,0xBEA053FBD0CE0148,0xED6808C0E66314C9,0x43FE16CD15A82710, + 0xCD049231A06970F6,0xE7BC8A6C97CC4CB0,0x337CE835FCB3B9C0,0x65DEF2587CC780F3, + 0x52214EDE4132BB50,0x95F15E4390F493DF,0x870839625DD2E0F1,0x41313C1AFB8B66AF, + 0x91720AF051B211BC,0x477D427ED4EEA573,0x2E3B4CEEF6E3BE25,0x82627834EB0BCC43, + 0x9C03E3DD78E724C8,0x2877328AD9867DF9,0x14B51945E243B0F2,0x574B0F88F7EB97E2, + 0x88B6FA989AA4943A,0x19C4F068CB168586,0x50EE6409AF11FAEF,0x7DF317D5C04EABA4, + 0x7A567C5498B4C6A9,0xB6BBFB804F42188E,0x3CC22BCF3BC5CD0B,0xD04336EAAA397713, + 0xF02FAC1BEC33132C,0x2506DBA7F0D3488D,0xD7E65D6BF2C31A1E,0x5EB9B2161FF820F5, + 0x842E0650C46E0F9F,0x716BEB1D9E843001,0xA933758CAB315ED4,0x3FE414FDA2792265, + 0x27C9F1701EF00932,0x73A4C1CA70A771BE,0x94184BA6E76B3D0E,0x40D829FF8C14C87E, + 0x0FBEC3FAC77674CB,0x3616A9634A6A9572,0x8F139119C25EF937,0xF545ED4D5AEA3F9E, + 0xE802499650BA387B,0x6437E7BD0B582E22,0xE6559F89E053E261,0x80AD52E305288DFC, + 0x6DC55A23E34B9935,0xDE14E0F51AD0AD09,0xC6390578A659865E,0x96D7617109487CB1, + 0xE2D6CB3A21156002,0x01E915E5779FAED1,0xADB0213F6A77DCB7,0x9880B76EB9A1A6AB, + 0x5D9F8D248644CF9B,0xFD5E4536C5662658,0xF1C6B9FE9BACBDFD,0xEACD6341BE9979C4, + 0xEFA7221708405576,0x510771ECD88E543E,0xC2BA51CB671F043D,0x0AD482AC71AF5879, + 0xFE787A045CDAC936,0xB238AF338E049AED,0xBD866CC94972EE26,0x615DA6EBBD810290, + 0x3295FDD08B2C1711,0xF834046073BF0AEA,0xF3099329758FFC42,0x1CAEB13E7DCFA934, + 0xBA2307481188832B,0x24EFCE42874CE65C,0x0E57D61FB0E9DA1A,0xB3D1BAD6F99B343C, + 0xC0757B1C893C4582,0x2B510DB8403A9297,0x5C7698C1F1DB614A,0x3E0D0118D5E68CB4, + 0xD60F488E855CB4CF,0xAE961E0DF3CB33D9,0x3A8E55AB14A00ED7,0x42170328623789C1, + 0x838B6DD19C946292,0x895FEF7DED3B3AEB,0xCFCBB8E64E4A3149,0x064C7E642F65C3DC, + 0x3D2B3E2A4C5A63DA,0x5BD3F340A9210C47,0xB474D157A1615931,0xAC5934DA1DE87266, + 0x6EE365117AF7765B,0xC86ED36716B05C44,0x9BA6885C201D49C5,0xB905387A88346C45, + 0x131072C4BAB9DDFF,0xBF49461EA751AF99,0xD52977BC1CE05BA1,0xB0F785E46027DB52, + 0x546D30BA6E57788C,0x305AD707650F56AE,0xC987C682612FF295,0xA5AB8944F5FBC571, + 0x7ED528E759F244CA,0x8DDCBBCE2C7DB888,0xAA154ABE328DB1BA,0x1E619BE993ECE88B, + 0x09F2BD9EE813B717,0x7401AA4B285D1CB3,0x21858F143195CAEE,0x48C381841398D1B8, + 0xFCB750D3B2F98889,0x39A86A998D1CE1B9,0x1F888E0CE473465A,0x7899568376978716, + 0x02CF2AD7EE2341BF,0x85C713B5B3F1A14E,0xFF916FE12B4567E7,0x7C1A0230B7D10575, + 0x0C98FCC85ECA9BA5,0xA3E7F720DA9E06AD,0x6A6031A2BBB1F438,0x973E74947ED7D260, + 0x2CF4663918C0FF9A,0x5F50A7F368678E24,0x34D983B4A449D4CD,0x68AF1B755592B587, + 0x7F3C3D022E6DEA1B,0xABFC5F5B45121F6B,0x0D71E92D29553574,0xDFFDF5106D4F03D8, + 0x081BA87B9F8C19C6,0xDB7EA1A3AC0981BB,0xBBCA12AD66172DFA,0x79704366010829C7, + 0x179326777BFF5F9C,0x0000000000000000,0xEB2476A4C906D715,0x724DD42F0738DF6F, + 0xB752EE6538DDB65F,0x37FFBC863DF53BA3,0x8EFA84FCB5C157E6,0xE9EB5C73272596AA, + 0x1B0BDABF2535C439,0x86E12C872A4D4E20,0x9969A28BCE3E087A,0xFAFB2EB79D9C4B55, + 0x056A4156B6D92CB2,0x5A3AE6A5DEBEA296,0x22A3B026A8292580,0x53C85B3B36AD1581, + 0xB11E900117B87583,0xC51F3A4A3FE56930,0xE019E1EDCF3621BD,0xEC811D2591FCBA18, + 0x445B7D4C4D524A1D,0xA8DA6069DCAEF005,0x58F5CC72309DE329,0xD4C062596B7FF570, + 0xCE22AD0339D59F98,0x591CD99747024DF8,0x8B90C5AA03187B54,0xF663D27FC356D0F0, + 0xD8589E9135B56ED5,0x35309651D3D67A1C,0x12F96721CD26732E,0xD28C1C3D441A36AC, + 0x492A946164077F69,0x2D1D73DC6F5F514B,0x6F0A70F40D68D88A,0x60B4B30ECA1EAC41, + 0xD36509D83385987D,0x0B3D97490630F6A8,0x9ECCC90A96C46577,0xA20EE2C5AD01A87C, + 0xE49AB55E0E70A3DE,0xA4429CA182646BA0,0xDA97B446DB962F6A,0xCCED87D4D7F6DE27, + 0x2AB8185D37A53C46,0x9F25DCEFE15BCBA6,0xC19C6EF9FEA3EB53,0xA764A3931BD884CE, + 0x2FD2590B817C10F4,0x56A21A6D80743933,0xE573A0BB79EF0D0F,0x155C0CA095DC1E23, + 0x6C2C4FC694D437E4,0x10364DF623053291,0xDD32DFC7836C4267,0x03263F3299BCEF6E, + 0x66F8CD6AE57B6F9D,0x8C35AE2B5BE21659,0x31B3C2E21290F87F,0x93BD2027BF915003, + 0x69460E90220D1B56,0x299E276FAE19D328,0x63928C3C53A2432F,0x7082FEF8E91B9ED0, + 0xBC6F792C3EED40F7,0x4C40D537D2DE53DB,0x75E8BFAE5FC2B262,0x4DA9C0D2A541FD0A, + 0x4E8FFFE03CFD1264,0x2620E495696FA7E3,0xE1F0F408B8A98F6C,0xD1AA230FDDA6D9C2, + 0xC7D0109DD1C6288F,0x8A79D04F7487D585,0x4694579BA3710BA2,0x38417F7CFA834F68, + 0x1D47A4DB0A5007E5,0x206C9AF1460A643F,0xA128DDF734BD4712,0x8144470672B7232D, + 0xF2E086CC02105293,0x182DE58DBC892B57,0xCAA1F9B0F8931DFB,0x6B892447CC2E5AE9, + 0xF9DD11850420A43B,0x4BE5BEB68A243ED6,0x5584255F19C8D65D,0x3B67404E633FA006, + 0xA68DB6766C472A1F,0xF78AC79AB4C97E21,0xC353442E1080AAEC,0x9A4F9DB95782E714 +}, +{ + 0x05BA7BC82C9B3220,0x31A54665F8B65E4F,0xB1B651F77547F4D4,0x8BFA0D857BA46682, + 0x85A96C5AA16A98BB,0x990FAEF908EB79C9,0xA15E37A247F4A62D,0x76857DCD5D27741E, + 0xF8C50B800A1820BC,0xBE65DCB201F7A2B4,0x666D1B986F9426E7,0x4CC921BF53C4E648, + 0x95410A0F93D9CA42,0x20CDCCAA647BA4EF,0x429A4060890A1871,0x0C4EA4F69B32B38B, + 0xCCDA362DDE354CD3,0x96DC23BC7C5B2FA9,0xC309BB68AA851AB3,0xD26131A73648E013, + 0x021DC52941FC4DB2,0xCD5ADAB7704BE48A,0xA77965D984ED71E6,0x32386FD61734BBA4, + 0xE82D6DD538AB7245,0x5C2147EA6177B4B1,0x5DA1AB70CF091CE8,0xAC907FCE72B8BDFF, + 0x57C85DFD972278A8,0xA4E44C6A6B6F940D,0x3851995B4F1FDFE4,0x62578CCAED71BC9E, + 0xD9882BB0C01D2C0A,0x917B9D5D113C503B,0xA2C31E11A87643C6,0xE463C923A399C1CE, + 0xF71686C57EA876DC,0x87B4A973E096D509,0xAF0D567D9D3A5814,0xB40C2A3F59DCC6F4, + 0x3602F88495D121DD,0xD3E1DD3D9836484A,0xF945E71AA46688E5,0x7518547EB2A591F5, + 0x9366587450C01D89,0x9EA81018658C065B,0x4F54080CBC4603A3,0x2D0384C65137BF3D, + 0xDC325078EC861E2A,0xEA30A8FC79573FF7,0x214D2030CA050CB6,0x65F0322B8016C30C, + 0x69BE96DD1B247087,0xDB95EE9981E161B8,0xD1FC1814D9CA05F8,0x820ED2BBCC0DE729, + 0x63D76050430F14C7,0x3BCCB0E8A09D3A0F,0x8E40764D573F54A2,0x39D175C1E16177BD, + 0x12F5A37C734F1F4B,0xAB37C12F1FDFC26D,0x5648B167395CD0F1,0x6C04ED1537BF42A7, + 0xED97161D14304065,0x7D6C67DAAB72B807,0xEC17FA87BA4EE83C,0xDFAF79CB0304FBC1, + 0x733F060571BC463E,0x78D61C1287E98A27,0xD07CF48E77B4ADA1,0xB9C262536C90DD26, + 0xE2449B5860801605,0x8FC09AD7F941FCFB,0xFAD8CEA94BE46D0E,0xA343F28B0608EB9F, + 0x9B126BD04917347B,0x9A92874AE7699C22,0x1B017C42C4E69EE0,0x3A4C5C720EE39256, + 0x4B6E9F5E3EA399DA,0x6BA353F45AD83D35,0xE7FEE0904C1B2425,0x22D009832587E95D, + 0x842980C00F1430E2,0xC6B3C0A0861E2893,0x087433A419D729F2,0x341F3DADD42D6C6F, + 0xEE0A3FAEFBB2A58E,0x4AEE73C490DD3183,0xAAB72DB5B1A16A34,0xA92A04065E238FDF, + 0x7B4B35A1686B6FCC,0x6A23BF6EF4A6956C,0x191CB96B851AD352,0x55D598D4D6DE351A, + 0xC9604DE5F2AE7EF3,0x1CA6C2A3A981E172,0xDE2F9551AD7A5398,0x3025AAFF56C8F616, + 0x15521D9D1E2860D9,0x506FE31CFA45073A,0x189C55F12B647B0B,0x0180EC9AAE7EA859, + 0x7CEC8B40050C105E,0x2350E5198BF94104,0xEF8AD33455CC0DD7,0x07A7BEE16D677F92, + 0xE5E325B90DE76997,0x5A061591A26E637A,0xB611EF1618208B46,0x09F4DF3EB7A981AB, + 0x1EBB078AE87DACC0,0xB791038CB65E231F,0x0FD38D4574B05660,0x67EDF702C1EA8EBE, + 0xBA5F4BE0831238CD,0xE3C477C2CEFEBE5C,0x0DCE486C354C1BD2,0x8C5DB36416C31910, + 0x26EA9ED1A7627324,0x039D29B3EF82E5EB,0x9F28FC82CBF2AE02,0xA8AAE89CF05D2786, + 0x431AACFA2774B028,0xCF471F9E31B7A938,0x581BD0B8E3922EC8,0xBC78199B400BEF06, + 0x90FB71C7BF42F862,0x1F3BEB1046030499,0x683E7A47B55AD8DE,0x988F4263A695D190, + 0xD808C72A6E638453,0x0627527BC319D7CB,0xEBB04466D72997AE,0xE67E0C0AE2658C7C, + 0x14D2F107B056C880,0x7122C32C30400B8C,0x8A7AE11FD5DACEDB,0xA0DEDB38E98A0E74, + 0xAD109354DCC615A6,0x0BE91A17F655CC19,0x8DDD5FFEB8BDB149,0xBFE53028AF890AED, + 0xD65BA6F5B4AD7A6A,0x7956F0882997227E,0x10E8665532B352F9,0x0E5361DFDACEFE39, + 0xCEC7F3049FC90161,0xFF62B561677F5F2E,0x975CCF26D22587F0,0x51EF0F86543BAF63, + 0x2F1E41EF10CBF28F,0x52722635BBB94A88,0xAE8DBAE73344F04D,0x410769D36688FD9A, + 0xB3AB94DE34BBB966,0x801317928DF1AA9B,0xA564A0F0C5113C54,0xF131D4BEBDB1A117, + 0x7F71A2F3EA8EF5B5,0x40878549C8F655C3,0x7EF14E6944F05DEC,0xD44663DCF55137D8, + 0xF2ACFD0D523344FC,0x0000000000000000,0x5FBC6E598EF5515A,0x16CF342EF1AA8532, + 0xB036BD6DDB395C8D,0x13754FE6DD31B712,0xBBDFA77A2D6C9094,0x89E7C8AC3A582B30, + 0x3C6B0E09CDFA459D,0xC4AE0589C7E26521,0x49735A777F5FD468,0xCAFD64561D2C9B18, + 0xDA1502032F9FC9E1,0x8867243694268369,0x3782141E3BAF8984,0x9CB5D53124704BE9, + 0xD7DB4A6F1AD3D233,0xA6F989432A93D9BF,0x9D3539AB8A0EE3B0,0x53F2CAAF15C7E2D1, + 0x6E19283C76430F15,0x3DEBE2936384EDC4,0x5E3C82C3208BF903,0x33B8834CB94A13FD, + 0x6470DEB12E686B55,0x359FD1377A53C436,0x61CAA57902F35975,0x043A975282E59A79, + 0xFD7F70482683129C,0xC52EE913699CCD78,0x28B9FF0E7DAC8D1D,0x5455744E78A09D43, + 0xCB7D88CCB3523341,0x44BD121B4A13CFBA,0x4D49CD25FDBA4E11,0x3E76CB208C06082F, + 0x3FF627BA2278A076,0xC28957F204FBB2EA,0x453DFE81E46D67E3,0x94C1E6953DA7621B, + 0x2C83685CFF491764,0xF32C1197FC4DECA5,0x2B24D6BD922E68F6,0xB22B78449AC5113F, + 0x48F3B6EDD1217C31,0x2E9EAD75BEB55AD6,0x174FD8B45FD42D6B,0x4ED4E4961238ABFA, + 0x92E6B4EEFEBEB5D0,0x46A0D7320BEF8208,0x47203BA8A5912A51,0x24F75BF8E69E3E96, + 0xF0B1382413CF094E,0xFEE259FBC901F777,0x276A724B091CDB7D,0xBDF8F501EE75475F, + 0x599B3C224DEC8691,0x6D84018F99C1EAFE,0x7498B8E41CDB39AC,0xE0595E71217C5BB7, + 0x2AA43A273C50C0AF,0xF50B43EC3F543B6E,0x838E3E2162734F70,0xC09492DB4507FF58, + 0x72BFEA9FDFC2EE67,0x11688ACF9CCDFAA0,0x1A8190D86A9836B9,0x7ACBD93BC615C795, + 0xC7332C3A286080CA,0x863445E94EE87D50,0xF6966A5FD0D6DE85,0xE9AD814F96D5DA1C, + 0x70A22FB69E3EA3D5,0x0A69F68D582B6440,0xB8428EC9C2EE757F,0x604A49E3AC8DF12C, + 0x5B86F90B0C10CB23,0xE1D9B2EB8F02F3EE,0x29391394D3D22544,0xC8E0A17F5CD0D6AA, + 0xB58CC6A5F7A26EAD,0x8193FB08238F02C2,0xD5C68F465B2F9F81,0xFCFF9CD288FDBAC5, + 0x77059157F359DC47,0x1D262E3907FF492B,0xFB582233E59AC557,0xDDB2BCE242F8B673, + 0x2577B76248E096CF,0x6F99C4A6D83DA74C,0xC1147E41EB795701,0xF48BAF76912A9337 +}, +{ + 0x3EF29D249B2C0A19,0xE9E16322B6F8622F,0x5536994047757F7A,0x9F4D56D5A47B0B33, + 0x822567466AA1174C,0xB8F5057DEB082FB2,0xCC48C10BF4475F53,0x373088D4275DEC3A, + 0x968F4325180AED10,0x173D232CF7016151,0xAE4ED09F946FCC13,0xFD4B4741C4539873, + 0x1B5B3F0DD9933765,0x2FFCB0967B644052,0xE02376D20A89840C,0xA3AE3A70329B18D7, + 0x419CBD2335DE8526,0xFAFEBF115B7C3199,0x0397074F85AA9B0D,0xC58AD4FB4836B970, + 0xBEC60BE3FC4104A8,0x1EFF36DC4B708772,0x131FDC33ED8453B6,0x0844E33E341764D3, + 0x0FF11B6EAB38CD39,0x64351F0A7761B85A,0x3B5694F509CFBA0E,0x30857084B87245D0, + 0x47AFB3BD2297AE3C,0xF2BA5C2F6F6B554A,0x74BDC4761F4F70E1,0xCFDFC64471EDC45E, + 0xE610784C1DC0AF16,0x7ACA29D63C113F28,0x2DED411776A859AF,0xAC5F211E99A3D5EE, + 0xD484F949A87EF33B,0x3CE36CA596E013E4,0xD120F0983A9D432C,0x6BC40464DC597563, + 0x69D5F5E5D1956C9E,0x9AE95F043698BB24,0xC9ECC8DA66A4EF44,0xD69508C8A5B2EAC6, + 0xC40C2235C0503B80,0x38C193BA8C652103,0x1CEEC75D46BC9E8F,0xD331011937515AD1, + 0xD8E2E56886ECA50F,0xB137108D5779C991,0x709F3B6905CA4206,0x4FEB50831680CAEF, + 0xEC456AF3241BD238,0x58D673AFE181ABBE,0x242F54E7CAD9BF8C,0x0211F1810DCC19FD, + 0x90BC4DBB0F43C60A,0x9518446A9DA0761D,0xA1BFCBF13F57012A,0x2BDE4F8961E172B5, + 0x27B853A84F732481,0xB0B1E643DF1F4B61,0x18CC38425C39AC68,0xD2B7F7D7BF37D821, + 0x3103864A3014C720,0x14AA246372ABFA5C,0x6E600DB54EBAC574,0x394765740403A3F3, + 0x09C215F0BC71E623,0x2A58B947E987F045,0x7B4CDF18B477BDD8,0x9709B5EB906C6FE0, + 0x73083C268060D90B,0xFEDC400E41F9037E,0x284948C6E44BE9B8,0x728ECAE808065BFB, + 0x06330E9E17492B1A,0x5950856169E7294E,0xBAE4F4FCE6C4364F,0xCA7BCF95E30E7449, + 0x7D7FD186A33E96C2,0x52836110D85AD690,0x4DFAA1021B4CD312,0x913ABB75872544FA, + 0xDD46ECB9140F1518,0x3D659A6B1E869114,0xC23F2CABD719109A,0xD713FE062DD46836, + 0xD0A60656B2FBC1DC,0x221C5A79DD909496,0xEFD26DBCA1B14935,0x0E77EDA0235E4FC9, + 0xCBFD395B6B68F6B9,0x0DE0EAEFA6F4D4C4,0x0422FF1F1A8532E7,0xF969B85EDED6AA94, + 0x7F6E2007AEF28F3F,0x3AD0623B81A938FE,0x6624EE8B7AADA1A7,0xB682E8DDC856607B, + 0xA78CC56F281E2A30,0xC79B257A45FAA08D,0x5B4174E0642B30B3,0x5F638BFF7EAE0254, + 0x4BC9AF9C0C05F808,0xCE59308AF98B46AE,0x8FC58DA9CC55C388,0x803496C7676D0EB1, + 0xF33CAAE1E70DD7BA,0xBB6202326EA2B4BF,0xD5020F87201871CB,0x9D5CA754A9B712CE, + 0x841669D87DE83C56,0x8A6184785EB6739F,0x420BBA6CB0741E2B,0xF12D5B60EAC1CE47, + 0x76AC35F71283691C,0x2C6BB7D9FECEDB5F,0xFCCDB18F4C351A83,0x1F79C012C3160582, + 0xF0ABADAE62A74CB7,0xE1A5801C82EF06FC,0x67A21845F2CB2357,0x5114665F5DF04D9D, + 0xBF40FD2D74278658,0xA0393D3FB73183DA,0x05A409D192E3B017,0xA9FB28CF0B4065F9, + 0x25A9A22942BF3D7C,0xDB75E22703463E02,0xB326E10C5AB5D06C,0xE7968E8295A62DE6, + 0xB973F3B3636EAD42,0xDF571D3819C30CE5,0xEE549B7229D7CBC5,0x12992AFD65E2D146, + 0xF8EF4E9056B02864,0xB7041E134030E28B,0xC02EDD2ADAD50967,0x932B4AF48AE95D07, + 0x6FE6FB7BC6DC4784,0x239AACB755F61666,0x401A4BEDBDB807D6,0x485EA8D389AF6305, + 0xA41BC220ADB4B13D,0x753B32B89729F211,0x997E584BB3322029,0x1D683193CEDA1C7F, + 0xFF5AB6C0C99F818E,0x16BBD5E27F67E3A1,0xA59D34EE25D233CD,0x98F8AE853B54A2D9, + 0x6DF70AFACB105E79,0x795D2E99B9BBA425,0x8E437B6744334178,0x0186F6CE886682F0, + 0xEBF092A3BB347BD2,0xBCD7FA62F18D1D55,0xADD9D7D011C5571E,0x0BD3E471B1BDFFDE, + 0xAA6C2F808EEAFEF4,0x5EE57D31F6C880A4,0xF50FA47FF044FCA0,0x1ADDC9C351F5B595, + 0xEA76646D3352F922,0x0000000000000000,0x85909F16F58EBEA6,0x46294573AAF12CCC, + 0x0A5512BF39DB7D2E,0x78DBD85731DD26D5,0x29CFBE086C2D6B48,0x218B5D36583A0F9B, + 0x152CD2ADFACD78AC,0x83A39188E2C795BC,0xC3B9DA655F7F926A,0x9ECBA01B2C1D89C3, + 0x07B5F8509F2FA9EA,0x7EE8D6C926940DCF,0x36B67E1AAF3B6ECA,0x86079859702425AB, + 0xFB7849DFD31AB369,0x4C7C57CC932A51E2,0xD96413A60E8A27FF,0x263EA566C715A671, + 0x6C71FC344376DC89,0x4A4F595284637AF8,0xDAF314E98B20BCF2,0x572768C14AB96687, + 0x1088DB7C682EC8BB,0x887075F9537A6A62,0x2E7A4658F302C2A2,0x619116DBE582084D, + 0xA87DDE018326E709,0xDCC01A779C6997E8,0xEDC39C3DAC7D50C8,0xA60A33A1A078A8C0, + 0xC1A82BE452B38B97,0x3F746BEA134A88E9,0xA228CCBEBAFD9A27,0xABEAD94E068C7C04, + 0xF48952B178227E50,0x5CF48CB0FB049959,0x6017E0156DE48ABD,0x4438B4F2A73D3531, + 0x8C528AE649FF5885,0xB515EF924DFCFB76,0x0C661C212E925634,0xB493195CC59A7986, + 0x9CDA519A21D1903E,0x32948105B5BE5C2D,0x194ACE8CD45F2E98,0x438D4CA238129CDB, + 0x9B6FA9CABEFE39D4,0x81B26009EF0B8C41,0xDED1EBF691A58E15,0x4E6DA64D9EE6481F, + 0x54B06F8ECF13FD8A,0x49D85E1D01C9E1F5,0xAFC826511C094EE3,0xF698A33075EE67AD, + 0x5AC7822EEC4DB243,0x8DD47C28C199DA75,0x89F68337DB1CE892,0xCDCE37C57C21DDA3, + 0x530597DE503C5460,0x6A42F2AA543FF793,0x5D727A7E73621BA9,0xE232875307459DF1, + 0x56A19E0FC2DFE477,0xC61DD3B4CD9C227D,0xE5877F03986A341B,0x949EB2A415C6F4ED, + 0x6206119460289340,0x6380E75AE84E11B0,0x8BE772B6D6D0F16F,0x50929091D596CF6D, + 0xE86795EC3E9EE0DF,0x7CF927482B581432,0xC86A3E14EEC26DB4,0x7119CDA78DACC0F6, + 0xE40189CD100CB6EB,0x92ADBC3A028FDFF7,0xB2A017C2D2D3529C,0x200DABF8D05C8D6B, + 0x34A78F9BA2F77737,0xE3B4719D8F231F01,0x45BE423C2F5BB7C1,0xF71E55FEFD88E55D, + 0x6853032B59F3EE6E,0x65B3E9C4FF073AAA,0x772AC3399AE5EBEC,0x87816E97F842A75B, + 0x110E2DB2E0484A4B,0x331277CB3DD8DEDD,0xBD510CAC79EB9FA5,0x352179552A91F5C7 +}, +{ + 0x8AB0A96846E06A6D,0x43C7E80B4BF0B33A,0x08C9B3546B161EE5,0x39F1C235EBA990BE, + 0xC1BEF2376606C7B2,0x2C209233614569AA,0xEB01523B6FC3289A,0x946953AB935ACEDD, + 0x272838F63E13340E,0x8B0455ECA12BA052,0x77A1B2C4978FF8A2,0xA55122CA13E54086, + 0x2276135862D3F1CD,0xDB8DDFDE08B76CFE,0x5D1E12C89E4A178A,0x0E56816B03969867, + 0xEE5F79953303ED59,0xAFED748BAB78D71D,0x6D929F2DF93E53EE,0xF5D8A8F8BA798C2A, + 0xF619B1698E39CF6B,0x95DDAF2F749104E2,0xEC2A9C80E0886427,0xCE5C8FD8825B95EA, + 0xC4E0D9993AC60271,0x4699C3A5173076F9,0x3D1B151F50A29F42,0x9ED505EA2BC75946, + 0x34665ACFDC7F4B98,0x61B1FB53292342F7,0xC721C0080E864130,0x8693CD1696FD7B74, + 0x872731927136B14B,0xD3446C8A63A1721B,0x669A35E8A6680E4A,0xCAB658F239509A16, + 0xA4E5DE4EF42E8AB9,0x37A7435EE83F08D9,0x134E6239E26C7F96,0x82791A3C2DF67488, + 0x3F6EF00A8329163C,0x8E5A7E42FDEB6591,0x5CAAEE4C7981DDB5,0x19F234785AF1E80D, + 0x255DDDE3ED98BD70,0x50898A32A99CCCAC,0x28CA4519DA4E6656,0xAE59880F4CB31D22, + 0x0D9798FA37D6DB26,0x32F968F0B4FFCD1A,0xA00F09644F258545,0xFA3AD5175E24DE72, + 0xF46C547C5DB24615,0x713E80FBFF0F7E20,0x7843CF2B73D2AAFA,0xBD17EA36AEDF62B4, + 0xFD111BACD16F92CF,0x4ABAA7DBC72D67E0,0xB3416B5DAD49FAD3,0xBCA316B24914A88B, + 0x15D150068AECF914,0xE27C1DEBE31EFC40,0x4FE48C759BEDA223,0x7EDCFD141B522C78, + 0x4E5070F17C26681C,0xE696CAC15815F3BC,0x35D2A64B3BB481A7,0x800CFF29FE7DFDF6, + 0x1ED9FAC3D5BAA4B0,0x6C2663A91EF599D1,0x03C1199134404341,0xF7AD4DED69F20554, + 0xCD9D9649B61BD6AB,0xC8C3BDE7EADB1368,0xD131899FB02AFB65,0x1D18E352E1FAE7F1, + 0xDA39235AEF7CA6C1,0xA1BBF5E0A8EE4F7A,0x91377805CF9A0B1E,0x3138716180BF8E5B, + 0xD9F83ACBDB3CE580,0x0275E515D38B897E,0x472D3F21F0FBBCC6,0x2D946EB7868EA395, + 0xBA3C248D21942E09,0xE7223645BFDE3983,0xFF64FEB902E41BB1,0xC97741630D10D957, + 0xC3CB1722B58D4ECC,0xA27AEC719CAE0C3B,0x99FECB51A48C15FB,0x1465AC826D27332B, + 0xE1BD047AD75EBF01,0x79F733AF941960C5,0x672EC96C41A3C475,0xC27FEBA6524684F3, + 0x64EFD0FD75E38734,0xED9E60040743AE18,0xFB8E2993B9EF144D,0x38453EB10C625A81, + 0x6978480742355C12,0x48CF42CE14A6EE9E,0x1CAC1FD606312DCE,0x7B82D6BA4792E9BB, + 0x9D141C7B1F871A07,0x5616B80DC11C4A2E,0xB849C198F21FA777,0x7CA91801C8D9A506, + 0xB1348E487EC273AD,0x41B20D1E987B3A44,0x7460AB55A3CFBBE3,0x84E628034576F20A, + 0x1B87D16D897A6173,0x0FE27DEFE45D5258,0x83CDE6B8CA3DBEB7,0x0C23647ED01D1119, + 0x7A362A3EA0592384,0xB61F40F3F1893F10,0x75D457D1440471DC,0x4558DA34237035B8, + 0xDCA6116587FC2043,0x8D9B67D3C9AB26D0,0x2B0B5C88EE0E2517,0x6FE77A382AB5DA90, + 0x269CC472D9D8FE31,0x63C41E46FAA8CB89,0xB7ABBC771642F52F,0x7D1DE4852F126F39, + 0xA8C6BA3024339BA0,0x600507D7CEE888C8,0x8FEE82C61A20AFAE,0x57A2448926D78011, + 0xFCA5E72836A458F0,0x072BCEBB8F4B4CBD,0x497BBE4AF36D24A1,0x3CAFE99BB769557D, + 0x12FA9EBD05A7B5A9,0xE8C04BAA5B836BDB,0x4273148FAC3B7905,0x908384812851C121, + 0xE557D3506C55B0FD,0x72FF996ACB4F3D61,0x3EDA0C8E64E2DC03,0xF0868356E6B949E9, + 0x04EAD72ABB0B0FFC,0x17A4B5135967706A,0xE3C8E16F04D5367F,0xF84F30028DAF570C, + 0x1846C8FCBD3A2232,0x5B8120F7F6CA9108,0xD46FA231ECEA3EA6,0x334D947453340725, + 0x58403966C28AD249,0xBED6F3A79A9F21F5,0x68CCB483A5FE962D,0xD085751B57E1315A, + 0xFED0023DE52FD18E,0x4B0E5B5F20E6ADDF,0x1A332DE96EB1AB4C,0xA3CE10F57B65C604, + 0x108F7BA8D62C3CD7,0xAB07A3A11073D8E1,0x6B0DAD1291BED56C,0xF2F366433532C097, + 0x2E557726B2CEE0D4,0x0000000000000000,0xCB02A476DE9B5029,0xE4E32FD48B9E7AC2, + 0x734B65EE2C84F75E,0x6E5386BCCD7E10AF,0x01B4FC84E7CBCA3F,0xCFE8735C65905FD5, + 0x3613BFDA0FF4C2E6,0x113B872C31E7F6E8,0x2FE18BA255052AEB,0xE974B72EBC48A1E4, + 0x0ABC5641B89D979B,0xB46AA5E62202B66E,0x44EC26B0C4BBFF87,0xA6903B5B27A503C7, + 0x7F680190FC99E647,0x97A84A3AA71A8D9C,0xDD12EDE16037EA7C,0xC554251DDD0DC84E, + 0x88C54C7D956BE313,0x4D91696048662B5D,0xB08072CC9909B992,0xB5DE5962C5C97C51, + 0x81B803AD19B637C9,0xB2F597D94A8230EC,0x0B08AAC55F565DA4,0xF1327FD2017283D6, + 0xAD98919E78F35E63,0x6AB9519676751F53,0x24E921670A53774F,0xB9FD3D1C15D46D48, + 0x92F66194FBDA485F,0x5A35DC7311015B37,0xDED3F4705477A93D,0xC00A0EB381CD0D8D, + 0xBB88D809C65FE436,0x16104997BEACBA55,0x21B70AC95693B28C,0x59F4C5E225411876, + 0xD5DB5EB50B21F499,0x55D7A19CF55C096F,0xA97246B4C3F8519F,0x8552D487A2BD3835, + 0x54635D181297C350,0x23C2EFDC85183BF2,0x9F61F96ECC0C9379,0x534893A39DDC8FED, + 0x5EDF0B59AA0A54CB,0xAC2C6D1A9F38945C,0xD7AEBBA0D8AA7DE7,0x2ABFA00C09C5EF28, + 0xD84CC64F3CF72FBF,0x2003F64DB15878B3,0xA724C7DFC06EC9F8,0x069F323F68808682, + 0xCC296ACD51D01C94,0x055E2BAE5CC0C5C3,0x6270E2C21D6301B6,0x3B842720382219C0, + 0xD2F0900E846AB824,0x52FC6F277A1745D2,0xC6953C8CE94D8B0F,0xE009F8FE3095753E, + 0x655B2C7992284D0B,0x984A37D54347DFC4,0xEAB5AEBF8808E2A5,0x9A3FD2C090CC56BA, + 0x9CA0E0FFF84CD038,0x4C2595E4AFADE162,0xDF6708F4B3BC6302,0xBF620F237D54EBCA, + 0x93429D101C118260,0x097D4FD08CDDD4DA,0x8C2F9B572E60ECEF,0x708A7C7F18C4B41F, + 0x3A30DBA4DFE9D3FF,0x4006F19A7FB0F07B,0x5F6BF7DD4DC19EF4,0x1F6D064732716E8F, + 0xF9FBCC866A649D33,0x308C8DE567744464,0x8971B0F972A0292C,0xD61A47243F61B7D8, + 0xEFEB8511D4C82766,0x961CB6BE40D147A3,0xAAB35F25F7B812DE,0x76154E407044329D, + 0x513D76B64E570693,0xF3479AC7D2F90AA8,0x9B8B2E4477079C85,0x297EB99D3D85AC69 +}, +{ + 0x7E37E62DFC7D40C3,0x776F25A4EE939E5B,0xE045C850DD8FB5AD,0x86ED5BA711FF1952, + 0xE91D0BD9CF616B35,0x37E0AB256E408FFB,0x9607F6C031025A7A,0x0B02F5E116D23C9D, + 0xF3D8486BFB50650C,0x621CFF27C40875F5,0x7D40CB71FA5FD34A,0x6DAA6616DAA29062, + 0x9F5F354923EC84E2,0xEC847C3DC507C3B3,0x025A3668043CE205,0xA8BF9E6C4DAC0B19, + 0xFA808BE2E9BEBB94,0xB5B99C5277C74FA3,0x78D9BC95F0397BCC,0xE332E50CDBAD2624, + 0xC74FCE129332797E,0x1729ECEB2EA709AB,0xC2D6B9F69954D1F8,0x5D898CBFBAB8551A, + 0x859A76FB17DD8ADB,0x1BE85886362F7FB5,0xF6413F8FF136CD8A,0xD3110FA5BBB7E35C, + 0x0A2FEED514CC4D11,0xE83010EDCD7F1AB9,0xA1E75DE55F42D581,0xEEDE4A55C13B21B6, + 0xF2F5535FF94E1480,0x0CC1B46D1888761E,0xBCE15FDB6529913B,0x2D25E8975A7181C2, + 0x71817F1CE2D7A554,0x2E52C5CB5C53124B,0xF9F7A6BEEF9C281D,0x9E722E7D21F2F56E, + 0xCE170D9B81DCA7E6,0x0E9B82051CB4941B,0x1E712F623C49D733,0x21E45CFA42F9F7DC, + 0xCB8E7A7F8BBA0F60,0x8E98831A010FB646,0x474CCF0D8E895B23,0xA99285584FB27A95, + 0x8CC2B57205335443,0x42D5B8E984EFF3A5,0x012D1B34021E718C,0x57A6626AAE74180B, + 0xFF19FC06E3D81312,0x35BA9D4D6A7C6DFE,0xC9D44C178F86ED65,0x506523E6A02E5288, + 0x03772D5C06229389,0x8B01F4FE0B691EC0,0xF8DABD8AED825991,0x4C4E3AEC985B67BE, + 0xB10DF0827FBF96A9,0x6A69279AD4F8DAE1,0xE78689DCD3D5FF2E,0x812E1A2B1FA553D1, + 0xFBAD90D6EBA0CA18,0x1AC543B234310E39,0x1604F7DF2CB97827,0xA6241C6951189F02, + 0x753513CCEAAF7C5E,0x64F2A59FC84C4EFA,0x247D2B1E489F5F5A,0xDB64D718AB474C48, + 0x79F4A7A1F2270A40,0x1573DA832A9BEBAE,0x3497867968621C72,0x514838D2A2302304, + 0xF0AF6537FD72F685,0x1D06023E3A6B44BA,0x678588C3CE6EDD73,0x66A893F7CC70ACFF, + 0xD4D24E29B5EDA9DF,0x3856321470EA6A6C,0x07C3418C0E5A4A83,0x2BCBB22F5635BACD, + 0x04B46CD00878D90A,0x06EE5AB80C443B0F,0x3B211F4876C8F9E5,0x0958C38912EEDE98, + 0xD14B39CDBF8B0159,0x397B292072F41BE0,0x87C0409313E168DE,0xAD26E98847CAA39F, + 0x4E140C849C6785BB,0xD5FF551DB7F3D853,0xA0CA46D15D5CA40D,0xCD6020C787FE346F, + 0x84B76DCF15C3FB57,0xDEFDA0FCA121E4CE,0x4B8D7B6096012D3D,0x9AC642AD298A2C64, + 0x0875D8BD10F0AF14,0xB357C6EA7B8374AC,0x4D6321D89A451632,0xEDA96709C719B23F, + 0xF76C24BBF328BC06,0xC662D526912C08F2,0x3CE25EC47892B366,0xB978283F6F4F39BD, + 0xC08C8F9E9D6833FD,0x4F3917B09E79F437,0x593DE06FB2C08C10,0xD6887841B1D14BDA, + 0x19B26EEE32139DB0,0xB494876675D93E2F,0x825937771987C058,0x90E9AC783D466175, + 0xF1827E03FF6C8709,0x945DC0A8353EB87F,0x4516F9658AB5B926,0x3F9573987EB020EF, + 0xB855330B6D514831,0x2AE6A91B542BCB41,0x6331E413C6160479,0x408F8E8180D311A0, + 0xEFF35161C325503A,0xD06622F9BD9570D5,0x8876D9A20D4B8D49,0xA5533135573A0C8B, + 0xE168D364DF91C421,0xF41B09E7F50A2F8F,0x12B09B0F24C1A12D,0xDA49CC2CA9593DC4, + 0x1F5C34563E57A6BF,0x54D14F36A8568B82,0xAF7CDFE043F6419A,0xEA6A2685C943F8BC, + 0xE5DCBFB4D7E91D2B,0xB27ADDDE799D0520,0x6B443CAED6E6AB6D,0x7BAE91C9F61BE845, + 0x3EB868AC7CAE5163,0x11C7B65322E332A4,0xD23C1491B9A992D0,0x8FB5982E0311C7CA, + 0x70AC6428E0C9D4D8,0x895BC2960F55FCC5,0x76423E90EC8DEFD7,0x6FF0507EDE9E7267, + 0x3DCF45F07A8CC2EA,0x4AA06054941F5CB1,0x5810FB5BB0DEFD9C,0x5EFEA1E3BC9AC693, + 0x6EDD4B4ADC8003EB,0x741808F8E8B10DD2,0x145EC1B728859A22,0x28BC9F7350172944, + 0x270A06424EBDCCD3,0x972AEDF4331C2BF6,0x059977E40A66A886,0x2550302A4A812ED6, + 0xDD8A8DA0A7037747,0xC515F87A970E9B7B,0x3023EAA9601AC578,0xB7E3AA3A73FBADA6, + 0x0FB699311EAAE597,0x0000000000000000,0x310EF19D6204B4F4,0x229371A644DB6455, + 0x0DECAF591A960792,0x5CA4978BB8A62496,0x1C2B190A38753536,0x41A295B582CD602C, + 0x3279DCC16426277D,0xC1A194AA9F764271,0x139D803B26DFD0A1,0xAE51C4D441E83016, + 0xD813FA44AD65DFC1,0xAC0BF2BC45D4D213,0x23BE6A9246C515D9,0x49D74D08923DCF38, + 0x9D05032127D066E7,0x2F7FDEFF5E4D63C7,0xA47E2A0155247D07,0x99B16FF12FA8BFED, + 0x4661D4398C972AAF,0xDFD0BBC8A33F9542,0xDCA79694A51D06CB,0xB020EBB67DA1E725, + 0xBA0F0563696DAA34,0xE4F1A480D5F76CA7,0xC438E34E9510EAF7,0x939E81243B64F2FC, + 0x8DEFAE46072D25CF,0x2C08F3A3586FF04E,0xD7A56375B3CF3A56,0x20C947CE40E78650, + 0x43F8A3DD86F18229,0x568B795EAC6A6987,0x8003011F1DBB225D,0xF53612D3F7145E03, + 0x189F75DA300DEC3C,0x9570DB9C3720C9F3,0xBB221E576B73DBB8,0x72F65240E4F536DD, + 0x443BE25188ABC8AA,0xE21FFE38D9B357A8,0xFD43CA6EE7E4F117,0xCAA3614B89A47EEC, + 0xFE34E732E1C6629E,0x83742C431B99B1D4,0xCF3A16AF83C2D66A,0xAAE5A8044990E91C, + 0x26271D764CA3BD5F,0x91C4B74C3F5810F9,0x7C6DD045F841A2C6,0x7F1AFD19FE63314F, + 0xC8F957238D989CE9,0xA709075D5306EE8E,0x55FC5402AA48FA0E,0x48FA563C9023BEB4, + 0x65DFBEABCA523F76,0x6C877D22D8BCE1EE,0xCC4D3BF385E045E3,0xBEBB69B36115733E, + 0x10EAAD6720FD4328,0xB6CEB10E71E5DC2A,0xBDCC44EF6737E0B7,0x523F158EA412B08D, + 0x989C74C52DB6CE61,0x9BEB59992B945DE8,0x8A2CEFCA09776F4C,0xA3BD6B8D5B7E3784, + 0xEB473DB1CB5D8930,0xC3FBA2C29B4AA074,0x9C28181525CE176B,0x683311F2D0C438E4, + 0x5FD3BAD7BE84B71F,0xFC6ED15AE5FA809B,0x36CDB0116C5EFE77,0x29918447520958C8, + 0xA29070B959604608,0x53120EBAA60CC101,0x3A0C047C74D68869,0x691E0AC6D2DA4968, + 0x73DB4974E6EB4751,0x7A838AFDF40599C9,0x5A4ACD33B4E21F99,0x6046C94FC03497F0, + 0xE6AB92E8D1CB8EA2,0x3354C7F5663856F1,0xD93EE170AF7BAE4D,0x616BD27BC22AE67C, + 0x92B39A10397A8370,0xABC8B3304B8E9890,0xBF967287630B02B2,0x5B67D607B6FC6E15 +}, +{ + 0xD031C397CE553FE6,0x16BA5B01B006B525,0xA89BADE6296E70C8,0x6A1F525D77D3435B, + 0x6E103570573DFA0B,0x660EFB2A17FC95AB,0x76327A9E97634BF6,0x4BAD9D6462458BF5, + 0xF1830CAEDBC3F748,0xC5C8F542669131FF,0x95044A1CDC48B0CB,0x892962DF3CF8B866, + 0xB0B9E208E930C135,0xA14FB3F0611A767C,0x8D2605F21C160136,0xD6B71922FECC549E, + 0x37089438A5907D8B,0x0B5DA38E5803D49C,0x5A5BCC9CEA6F3CBC,0xEDAE246D3B73FFE5, + 0xD2B87E0FDE22EDCE,0x5E54ABB1CA8185EC,0x1DE7F88FE80561B9,0xAD5E1A870135A08C, + 0x2F2ADBD665CECC76,0x5780B5A782F58358,0x3EDC8A2EEDE47B3F,0xC9D95C3506BEE70F, + 0x83BE111D6C4E05EE,0xA603B90959367410,0x103C81B4809FDE5D,0x2C69B6027D0C774A, + 0x399080D7D5C87953,0x09D41E16487406B4,0xCDD63B1826505E5F,0xF99DC2F49B0298E8, + 0x9CD0540A943CB67F,0xBCA84B7F891F17C5,0x723D1DB3B78DF2A6,0x78AA6E71E73B4F2E, + 0x1433E699A071670D,0x84F21BE454620782,0x98DF3327B4D20F2F,0xF049DCE2D3769E5C, + 0xDB6C60199656EB7A,0x648746B2078B4783,0x32CD23598DCBADCF,0x1EA4955BF0C7DA85, + 0xE9A143401B9D46B5,0xFD92A5D9BBEC21B8,0xC8138C790E0B8E1B,0x2EE00B9A6D7BA562, + 0xF85712B893B7F1FC,0xEB28FED80BEA949D,0x564A65EB8A40EA4C,0x6C9988E8474A2823, + 0x4535898B121D8F2D,0xABD8C03231ACCBF4,0xBA2E91CAB9867CBD,0x7960BE3DEF8E263A, + 0x0C11A977602FD6F0,0xCB50E1AD16C93527,0xEAE22E94035FFD89,0x2866D12F5DE2CE1A, + 0xFF1B1841AB9BF390,0x9F9339DE8CFE0D43,0x964727C8C48A0BF7,0x524502C6AAAE531C, + 0x9B9C5EF3AC10B413,0x4FA2FA4942AB32A5,0x3F165A62E551122B,0xC74148DA76E6E3D7, + 0x924840E5E464B2A7,0xD372AE43D69784DA,0x233B72A105E11A86,0xA48A04914941A638, + 0xB4B68525C9DE7865,0xDDEABAACA6CF8002,0x0A9773C250B6BD88,0xC284FFBB5EBD3393, + 0x8BA0DF472C8F6A4E,0x2AEF6CB74D951C32,0x427983722A318D41,0x73F7CDFFBF389BB2, + 0x074C0AF9382C026C,0x8A6A0F0B243A035A,0x6FDAE53C5F88931F,0xC68B98967E538AC3, + 0x44FF59C71AA8E639,0xE2FCE0CE439E9229,0xA20CDE2479D8CD40,0x19E89FA2C8EBD8E9, + 0xF446BBCFF398270C,0x43B3533E2284E455,0xD82F0DCD8E945046,0x51066F12B26CE820, + 0xE73957AF6BC5426D,0x081ECE5A40C16FA0,0x3B193D4FC5BFAB7B,0x7FE66488DF174D42, + 0x0E9814EF705804D8,0x8137AC857C39D7C6,0xB1733244E185A821,0x695C3F896F11F867, + 0xF6CF0657E3EFF524,0x1AABF276D02963D5,0x2DA3664E75B91E5E,0x0289BD981077D228, + 0x90C1FD7DF413608F,0x3C5537B6FD93A917,0xAA12107E3919A2E0,0x0686DAB530996B78, + 0xDAA6B0559EE3826E,0xC34E2FF756085A87,0x6D5358A44FFF4137,0xFC587595B35948AC, + 0x7CA5095CC7D5F67E,0xFB147F6C8B754AC0,0xBFEB26AB91DDACF9,0x6896EFC567A49173, + 0xCA9A31E11E7C5C33,0xBBE44186B13315A9,0x0DDB793B689ABFE4,0x70B4A02BA7FA208E, + 0xE47A3A7B7307F951,0x8CECD5BE14A36822,0xEEED49B923B144D9,0x17708B4DB8B3DC31, + 0x6088219F2765FED3,0xB3FA8FDCF1F27A09,0x910B2D31FCA6099B,0x0F52C4A378ED6DCC, + 0x50CCBF5EBAD98134,0x6BD582117F662A4F,0x94CE9A50D4FDD9DF,0x2B25BCFB45207526, + 0x67C42B661F49FCBF,0x492420FC723259DD,0x03436DD418C2BB3C,0x1F6E4517F872B391, + 0xA08563BC69AF1F68,0xD43EA4BAEEBB86B6,0x01CAD04C08B56914,0xAC94CACB0980C998, + 0x54C3D8739A373864,0x26FEC5C02DBACAC2,0xDEA9D778BE0D3B3E,0x040F672D20EEB950, + 0xE5B0EA377BB29045,0xF30AB136CBB42560,0x62019C0737122CFB,0xE86B930C13282FA1, + 0xCC1CEB542EE5374B,0x538FD28AA21B3A08,0x1B61223AD89C0AC1,0x36C24474AD25149F, + 0x7A23D3E9F74C9D06,0xBE21F6E79968C5ED,0xCF5F868036278C77,0xF705D61BEB5A9C30, + 0x4D2B47D152DCE08D,0x5F9E7BFDC234ECF8,0x247778583DCD18EA,0x867BA67C4415D5AA, + 0x4CE1979D5A698999,0x0000000000000000,0xEC64F42133C696F1,0xB57C5569C16B1171, + 0xC1C7926F467F88AF,0x654D96FE0F3E2E97,0x15F936D5A8C40E19,0xB8A72C52A9F1AE95, + 0xA9517DAA21DB19DC,0x58D27104FA18EE94,0x5918A148F2AD8780,0x5CDD1629DAF657C4, + 0x8274C15164FB6CFA,0xD1FB13DBC6E056F2,0x7D6FD910CF609F6A,0xB63F38BDD9A9AA4D, + 0x3D9FE7FAF526C003,0x74BBC706871499DE,0xDF630734B6B8522A,0x3AD3ED03CD0AC26F, + 0xFADEAF2083C023D4,0xC00D42234ECAE1BB,0x8538CBA85CD76E96,0xC402250E6E2458EB, + 0x47BC3413026A5D05,0xAFD7A71F114272A4,0x978DF784CC3F62E3,0xB96DFC1EA144C781, + 0x21B2CF391596C8AE,0x318E4E8D950916F3,0xCE9556CC3E92E563,0x385A509BDD7D1047, + 0x358129A0B5E7AFA3,0xE6F387E363702B79,0xE0755D5653E94001,0x7BE903A5FFF9F412, + 0x12B53C2C90E80C75,0x3307F315857EC4DB,0x8FAFB86A0C61D31E,0xD9E5DD8186213952, + 0x77F8AAD29FD622E2,0x25BDA814357871FE,0x7571174A8FA1F0CA,0x137FEC60985D6561, + 0x30449EC19DBC7FE7,0xA540D4DD41F4CF2C,0xDC206AE0AE7AE916,0x5B911CD0E2DA55A8, + 0xB2305F90F947131D,0x344BF9ECBD52C6B7,0x5D17C665D2433ED0,0x18224FEEC05EB1FD, + 0x9E59E992844B6457,0x9A568EBFA4A5DD07,0xA3C60E68716DA454,0x7E2CB4C4D7A22456, + 0x87B176304CA0BCBE,0x413AEEA632F3367D,0x9915E36BBC67663B,0x40F03EEA3A465F69, + 0x1C2D28C3E0B008AD,0x4E682A054A1E5BB1,0x05C5B761285BD044,0xE1BF8D1A5B5C2915, + 0xF2C0617AC3014C74,0xB7F5E8F1D11CC359,0x63CB4C4B3FA745EF,0x9D1A84469C89DF6B, + 0xE33630824B2BFB3D,0xD5F474F6E60EEFA2,0xF58C6B83FB2D4E18,0x4676E45F0ADF3411, + 0x20781F751D23A1BA,0xBD629B3381AA7ED1,0xAE1D775319F71BB0,0xFED1C80DA32E9A84, + 0x5509083F92825170,0x29AC01635557A70E,0xA7C9694551831D04,0x8E65682604D4BA0A, + 0x11F651F8882AB749,0xD77DC96EF6793D8A,0xEF2799F52B042DCD,0x48EEF0B07A8730C9, + 0x22F1A2ED0D547392,0x6142F1D32FD097C7,0x4A674D286AF0E2E1,0x80FD7CC9748CBED2, + 0x717E7067AF4F499A,0x938290A9ECD1DBB3,0x88E3B293344DD172,0x2734158C250FA3D6 +} +}; + +// Constant values for KeySchedule function +const unsigned char Streebog_C[12][64] = { +{ + 0xB1,0x08,0x5B,0xDA,0x1E,0xCA,0xDA,0xE9,0xEB,0xCB,0x2F,0x81,0xC0,0x65,0x7C,0x1F, + 0x2F,0x6A,0x76,0x43,0x2E,0x45,0xD0,0x16,0x71,0x4E,0xB8,0x8D,0x75,0x85,0xC4,0xFC, + 0x4B,0x7C,0xE0,0x91,0x92,0x67,0x69,0x01,0xA2,0x42,0x2A,0x08,0xA4,0x60,0xD3,0x15, + 0x05,0x76,0x74,0x36,0xCC,0x74,0x4D,0x23,0xDD,0x80,0x65,0x59,0xF2,0xA6,0x45,0x07 +}, +{ + 0x6F,0xA3,0xB5,0x8A,0xA9,0x9D,0x2F,0x1A,0x4F,0xE3,0x9D,0x46,0x0F,0x70,0xB5,0xD7, + 0xF3,0xFE,0xEA,0x72,0x0A,0x23,0x2B,0x98,0x61,0xD5,0x5E,0x0F,0x16,0xB5,0x01,0x31, + 0x9A,0xB5,0x17,0x6B,0x12,0xD6,0x99,0x58,0x5C,0xB5,0x61,0xC2,0xDB,0x0A,0xA7,0xCA, + 0x55,0xDD,0xA2,0x1B,0xD7,0xCB,0xCD,0x56,0xE6,0x79,0x04,0x70,0x21,0xB1,0x9B,0xB7 +}, +{ + 0xF5,0x74,0xDC,0xAC,0x2B,0xCE,0x2F,0xC7,0x0A,0x39,0xFC,0x28,0x6A,0x3D,0x84,0x35, + 0x06,0xF1,0x5E,0x5F,0x52,0x9C,0x1F,0x8B,0xF2,0xEA,0x75,0x14,0xB1,0x29,0x7B,0x7B, + 0xD3,0xE2,0x0F,0xE4,0x90,0x35,0x9E,0xB1,0xC1,0xC9,0x3A,0x37,0x60,0x62,0xDB,0x09, + 0xC2,0xB6,0xF4,0x43,0x86,0x7A,0xDB,0x31,0x99,0x1E,0x96,0xF5,0x0A,0xBA,0x0A,0xB2 +}, +{ + 0xEF,0x1F,0xDF,0xB3,0xE8,0x15,0x66,0xD2,0xF9,0x48,0xE1,0xA0,0x5D,0x71,0xE4,0xDD, + 0x48,0x8E,0x85,0x7E,0x33,0x5C,0x3C,0x7D,0x9D,0x72,0x1C,0xAD,0x68,0x5E,0x35,0x3F, + 0xA9,0xD7,0x2C,0x82,0xED,0x03,0xD6,0x75,0xD8,0xB7,0x13,0x33,0x93,0x52,0x03,0xBE, + 0x34,0x53,0xEA,0xA1,0x93,0xE8,0x37,0xF1,0x22,0x0C,0xBE,0xBC,0x84,0xE3,0xD1,0x2E +}, +{ + 0x4B,0xEA,0x6B,0xAC,0xAD,0x47,0x47,0x99,0x9A,0x3F,0x41,0x0C,0x6C,0xA9,0x23,0x63, + 0x7F,0x15,0x1C,0x1F,0x16,0x86,0x10,0x4A,0x35,0x9E,0x35,0xD7,0x80,0x0F,0xFF,0xBD, + 0xBF,0xCD,0x17,0x47,0x25,0x3A,0xF5,0xA3,0xDF,0xFF,0x00,0xB7,0x23,0x27,0x1A,0x16, + 0x7A,0x56,0xA2,0x7E,0xA9,0xEA,0x63,0xF5,0x60,0x17,0x58,0xFD,0x7C,0x6C,0xFE,0x57 +}, +{ + 0xAE,0x4F,0xAE,0xAE,0x1D,0x3A,0xD3,0xD9,0x6F,0xA4,0xC3,0x3B,0x7A,0x30,0x39,0xC0, + 0x2D,0x66,0xC4,0xF9,0x51,0x42,0xA4,0x6C,0x18,0x7F,0x9A,0xB4,0x9A,0xF0,0x8E,0xC6, + 0xCF,0xFA,0xA6,0xB7,0x1C,0x9A,0xB7,0xB4,0x0A,0xF2,0x1F,0x66,0xC2,0xBE,0xC6,0xB6, + 0xBF,0x71,0xC5,0x72,0x36,0x90,0x4F,0x35,0xFA,0x68,0x40,0x7A,0x46,0x64,0x7D,0x6E +}, +{ + 0xF4,0xC7,0x0E,0x16,0xEE,0xAA,0xC5,0xEC,0x51,0xAC,0x86,0xFE,0xBF,0x24,0x09,0x54, + 0x39,0x9E,0xC6,0xC7,0xE6,0xBF,0x87,0xC9,0xD3,0x47,0x3E,0x33,0x19,0x7A,0x93,0xC9, + 0x09,0x92,0xAB,0xC5,0x2D,0x82,0x2C,0x37,0x06,0x47,0x69,0x83,0x28,0x4A,0x05,0x04, + 0x35,0x17,0x45,0x4C,0xA2,0x3C,0x4A,0xF3,0x88,0x86,0x56,0x4D,0x3A,0x14,0xD4,0x93 +}, +{ + 0x9B,0x1F,0x5B,0x42,0x4D,0x93,0xC9,0xA7,0x03,0xE7,0xAA,0x02,0x0C,0x6E,0x41,0x41, + 0x4E,0xB7,0xF8,0x71,0x9C,0x36,0xDE,0x1E,0x89,0xB4,0x44,0x3B,0x4D,0xDB,0xC4,0x9A, + 0xF4,0x89,0x2B,0xCB,0x92,0x9B,0x06,0x90,0x69,0xD1,0x8D,0x2B,0xD1,0xA5,0xC4,0x2F, + 0x36,0xAC,0xC2,0x35,0x59,0x51,0xA8,0xD9,0xA4,0x7F,0x0D,0xD4,0xBF,0x02,0xE7,0x1E +}, +{ + 0x37,0x8F,0x5A,0x54,0x16,0x31,0x22,0x9B,0x94,0x4C,0x9A,0xD8,0xEC,0x16,0x5F,0xDE, + 0x3A,0x7D,0x3A,0x1B,0x25,0x89,0x42,0x24,0x3C,0xD9,0x55,0xB7,0xE0,0x0D,0x09,0x84, + 0x80,0x0A,0x44,0x0B,0xDB,0xB2,0xCE,0xB1,0x7B,0x2B,0x8A,0x9A,0xA6,0x07,0x9C,0x54, + 0x0E,0x38,0xDC,0x92,0xCB,0x1F,0x2A,0x60,0x72,0x61,0x44,0x51,0x83,0x23,0x5A,0xDB +}, +{ + 0xAB,0xBE,0xDE,0xA6,0x80,0x05,0x6F,0x52,0x38,0x2A,0xE5,0x48,0xB2,0xE4,0xF3,0xF3, + 0x89,0x41,0xE7,0x1C,0xFF,0x8A,0x78,0xDB,0x1F,0xFF,0xE1,0x8A,0x1B,0x33,0x61,0x03, + 0x9F,0xE7,0x67,0x02,0xAF,0x69,0x33,0x4B,0x7A,0x1E,0x6C,0x30,0x3B,0x76,0x52,0xF4, + 0x36,0x98,0xFA,0xD1,0x15,0x3B,0xB6,0xC3,0x74,0xB4,0xC7,0xFB,0x98,0x45,0x9C,0xED +}, +{ + 0x7B,0xCD,0x9E,0xD0,0xEF,0xC8,0x89,0xFB,0x30,0x02,0xC6,0xCD,0x63,0x5A,0xFE,0x94, + 0xD8,0xFA,0x6B,0xBB,0xEB,0xAB,0x07,0x61,0x20,0x01,0x80,0x21,0x14,0x84,0x66,0x79, + 0x8A,0x1D,0x71,0xEF,0xEA,0x48,0xB9,0xCA,0xEF,0xBA,0xCD,0x1D,0x7D,0x47,0x6E,0x98, + 0xDE,0xA2,0x59,0x4A,0xC0,0x6F,0xD8,0x5D,0x6B,0xCA,0xA4,0xCD,0x81,0xF3,0x2D,0x1B +}, +{ + 0x37,0x8E,0xE7,0x67,0xF1,0x16,0x31,0xBA,0xD2,0x13,0x80,0xB0,0x04,0x49,0xB1,0x7A, + 0xCD,0xA4,0x3C,0x32,0xBC,0xDF,0x1D,0x77,0xF8,0x20,0x12,0xD4,0x30,0x21,0x9F,0x9B, + 0x5D,0x80,0xEF,0x9D,0x18,0x91,0xCC,0x86,0xE7,0x1D,0xA4,0xAA,0x88,0xE1,0x28,0x52, + 0xFA,0xF4,0x17,0xD5,0xD9,0xB2,0x1B,0x99,0x48,0xBC,0x92,0x4A,0xF1,0x1B,0xD7,0x20 +} +}; + +#endif /* STRIBOG_DATA_H_ */ From 50d48a0fca4c9eaada058a9a4fad1447e6aabbdf Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:15:01 -0500 Subject: [PATCH 336/576] Create test_data.h --- .../hashing/streebog/test_data.h | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/streebog/test_data.h diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/test_data.h b/stratum/algos/binarium_hash_v1/hashing/streebog/test_data.h new file mode 100644 index 000000000..6fd75a011 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/streebog/test_data.h @@ -0,0 +1,62 @@ +/* + * test_data.h + * + * Created on: Feb 12, 2013 + * Author: Oleksandr Kazymyrov + * Acknowledgments: Oleksii Shevchuk + */ + +#ifndef TEST_DATA_H_ +#define TEST_DATA_H_ + +#define TEST_VECTORS 2 +#define MAX_MESSAGE_LENGTH 72 // in bytes + +unsigned char Message[TEST_VECTORS][MAX_MESSAGE_LENGTH] = { + { + 0x32,0x31,0x30,0x39,0x38,0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x30,0x39,0x38,0x37, + 0x36,0x35,0x34,0x33,0x32,0x31,0x30,0x39,0x38,0x37,0x36,0x35,0x34,0x33,0x32,0x31, + 0x30,0x39,0x38,0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x30,0x39,0x38,0x37,0x36,0x35, + 0x34,0x33,0x32,0x31,0x30,0x39,0x38,0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x30 + }, + { + 0xfb,0xe2,0xe5,0xf0,0xee,0xe3,0xc8,0x20,0xfb,0xea,0xfa,0xeb,0xef,0x20,0xff,0xfb, + 0xf0,0xe1,0xe0,0xf0,0xf5,0x20,0xe0,0xed,0x20,0xe8,0xec,0xe0,0xeb,0xe5,0xf0,0xf2, + 0xf1,0x20,0xff,0xf0,0xee,0xec,0x20,0xf1,0x20,0xfa,0xf2,0xfe,0xe5,0xe2,0x20,0x2c, + 0xe8,0xf6,0xf3,0xed,0xe2,0x20,0xe8,0xe6,0xee,0xe1,0xe8,0xf0,0xf2,0xd1,0x20,0x2c, + 0xe8,0xf0,0xf2,0xe5,0xe2,0x20,0xe5,0xd1 + }, +}; + +unsigned char Hash_512[TEST_VECTORS][64] = { + { + 0x48,0x6f,0x64,0xc1,0x91,0x78,0x79,0x41,0x7f,0xef,0x08,0x2b,0x33,0x81,0xa4,0xe2, + 0x11,0xc3,0x24,0xf0,0x74,0x65,0x4c,0x38,0x82,0x3a,0x7b,0x76,0xf8,0x30,0xad,0x00, + 0xfa,0x1f,0xba,0xe4,0x2b,0x12,0x85,0xc0,0x35,0x2f,0x22,0x75,0x24,0xbc,0x9a,0xb1, + 0x62,0x54,0x28,0x8d,0xd6,0x86,0x3d,0xcc,0xd5,0xb9,0xf5,0x4a,0x1a,0xd0,0x54,0x1b + }, + { + 0x28,0xfb,0xc9,0xba,0xda,0x03,0x3b,0x14,0x60,0x64,0x2b,0xdc,0xdd,0xb9,0x0c,0x3f, + 0xb3,0xe5,0x6c,0x49,0x7c,0xcd,0x0f,0x62,0xb8,0xa2,0xad,0x49,0x35,0xe8,0x5f,0x03, + 0x76,0x13,0x96,0x6d,0xe4,0xee,0x00,0x53,0x1a,0xe6,0x0f,0x3b,0x5a,0x47,0xf8,0xda, + 0xe0,0x69,0x15,0xd5,0xf2,0xf1,0x94,0x99,0x6f,0xca,0xbf,0x26,0x22,0xe6,0x88,0x1e + }, +}; + +unsigned char Hash_256[TEST_VECTORS][32] = { + { + 0x00,0x55,0x7b,0xe5,0xe5,0x84,0xfd,0x52,0xa4,0x49,0xb1,0x6b,0x02,0x51,0xd0,0x5d, + 0x27,0xf9,0x4a,0xb7,0x6c,0xba,0xa6,0xda,0x89,0x0b,0x59,0xd8,0xef,0x1e,0x15,0x9d + }, + { + 0x50,0x8f,0x7e,0x55,0x3c,0x06,0x50,0x1d,0x74,0x9a,0x66,0xfc,0x28,0xc6,0xca,0xc0, + 0xb0,0x05,0x74,0x6d,0x97,0x53,0x7f,0xa8,0x5d,0x9e,0x40,0x90,0x4e,0xfe,0xd2,0x9d + }, +}; + +// Message length in bits +unsigned long long MessageLength[TEST_VECTORS] = { + 504, 576 +}; + +#endif /* TEST_DATA_H_ */ From 1882fb412ce77fd52eeca24882b55f108c235356 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:15:20 -0500 Subject: [PATCH 337/576] Create setup.c --- .../binarium_hash_v1/hashing/swifft/setup.c | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/swifft/setup.c diff --git a/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c b/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c new file mode 100644 index 000000000..1b76a6ba1 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c @@ -0,0 +1,59 @@ +#include "swifft.h" + +SWIFFT_ZN mulTable ALIGN; +SWIFFT_ZW fftTable[1< SWIFFT_P/2) y -= SWIFFT_P; + return y; +} + +int rev(int i, int bound) { // bit reversal permutation + int irev=0; + for(i |= bound; i>1; i>>=1) + irev = (irev<<1) | (i&1); + return irev; +} + +int bit(int x, int b) // extract b-th bit of x +{ return (x >> b) & 1; } + +#ifdef __cplusplus +extern "C" { +#endif + +void SwiFFT_setupTables() { + long omega_pow[2*SWIFFT_N]; // the powers of omega + omega_pow[0] = 1; + for(int i = 1; i < 2*SWIFFT_N; i++) + omega_pow[i] = center(omega_pow[i-1] * OMEGA); + + for (int i=0; i Date: Wed, 20 Feb 2019 00:15:40 -0500 Subject: [PATCH 338/576] Create swifft.c --- .../binarium_hash_v1/hashing/swifft/swifft.c | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/swifft/swifft.c diff --git a/stratum/algos/binarium_hash_v1/hashing/swifft/swifft.c b/stratum/algos/binarium_hash_v1/hashing/swifft/swifft.c new file mode 100644 index 000000000..2077bb207 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/swifft/swifft.c @@ -0,0 +1,150 @@ +/* SwiFFT hash function. */ + +#include "swifft.h" +#include + +#define INLINE inline extern __attribute__((always_inline)) + +INLINE SWIFFT_ZW shift(SWIFFT_ZW x, int s) // x*2^s mod (P=257) +{ return ((x << s) & 255) - (x >> (8-s)); } + +// Reduces mm mod P=257 to the range {-127,383} +INLINE SWIFFT_ZW qReduce(SWIFFT_ZW x) // (x mod 256) - floor(x/256) +{ return (x & 255) - (x >> 8); } + +// Reduces mm mod P=257 to the range {0,..,(P-1)=256} +INLINE SWIFFT_ZW modP(SWIFFT_ZW mm){ + SWIFFT_ZW tmp = qReduce(qReduce(mm)); + return tmp ^ ((tmp == -1) & (-257)); +} + +#define AddSub(a, b) { SWIFFT_ZW tmp = b; b = a - b; a = a + tmp; } + +INLINE void FFT(const BitsN t, SWIFFT_ZN u) { + int i; + SWIFFT_ZN v; + + for (i=0; i> 8); + } + for (int i=0; ikeyval[i][j/SWIFFT_W][j%SWIFFT_W] = _pKeySourceData [ k ]; + //fprintf(stdout, "%i : ", _pKeySourceData [ k ] ); + //fprintf(stdout, "%3d ; ", key->keyval[i][j/SWIFFT_W][j%SWIFFT_W]); + k = k + 1; + } //-for + //fprintf(stdout, "\nswifft.c : SwiFFT_readKey () : %i.\n", k ); + SwiFFT_setupKey(*key); +} + +void SwiFFT_readData(SWIFFT_HashData data, const unsigned char * _pDataSource) { + int k = 0; + + for (int i=0; i Date: Wed, 20 Feb 2019 00:16:02 -0500 Subject: [PATCH 339/576] Create swifft.h --- .../binarium_hash_v1/hashing/swifft/swifft.h | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/swifft/swifft.h diff --git a/stratum/algos/binarium_hash_v1/hashing/swifft/swifft.h b/stratum/algos/binarium_hash_v1/hashing/swifft/swifft.h new file mode 100644 index 000000000..262a58045 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/swifft/swifft.h @@ -0,0 +1,55 @@ +/* File swifft.h */ +#ifndef SWIFFT_H +#define SWIFFT_H + +#include + +#define SWIFFT_N 64 // Vector length. Must be a power of 2. +#define SWIFFT_P 257 // Modulus. Integer arithmetic is performed modulo P. +#define SWIFFT_M 16 // Number of vectors per block. (= Mstate+Mdata) +#define SWIFFT_W 8 // Number of coordinates in vectorized register +#define Mstate 9 // (N/W)+1: Hash function State size, in blocks of N bits +#define Mdata 7 // (N/W)-1: Hash function Data size, in blocks of N bits +#define OMEGA 42 // (2N)th primitive root of unity modulo P + +#define ALIGN __attribute__ ((aligned (16))) + +typedef int16_t SWIFFT_Z; // 16 bit integer + +typedef SWIFFT_Z SWIFFT_ZW __attribute__ ((vector_size (SWIFFT_W*sizeof(SWIFFT_Z)))); // Z^W +typedef SWIFFT_ZW SWIFFT_ZN[SWIFFT_N/SWIFFT_W]; // Z^N, in blocks of size W + +typedef uint8_t BitsW; // block of W=8 input bits +typedef BitsW BitsN[SWIFFT_N/SWIFFT_W]; // N input bits, in blocks of size W +typedef BitsN HashState[Mstate]; +typedef BitsN SWIFFT_HashData[Mdata]; +typedef struct { + SWIFFT_ZN keyval[SWIFFT_M] ALIGN; + SWIFFT_ZN keysum ALIGN; +} HashKey; + +#ifdef __cplusplus +extern "C" { +#endif + +void SwiFFT_setupTables(); +void SwiFFT_setupKey(HashKey key); +void SwiFFT(const HashKey key, HashState state, const SWIFFT_HashData data); + +void SwiFFT_initState(HashState st); +void SwiFFT_readKey(const unsigned char * _pKeySourceData, HashKey *key); +void SwiFFT_readData(SWIFFT_HashData data, const unsigned char * _pDataSource); + +//---Printing information.--------------------------- +void SwiFFT_printState(HashState st); +void SwiFFT_printKey(HashKey k); +void SwiFFT_printData(SWIFFT_HashData d); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +extern SWIFFT_ZN mulTable ALIGN; +extern SWIFFT_ZW fftTable[1< Date: Wed, 20 Feb 2019 00:16:21 -0500 Subject: [PATCH 340/576] Create byte_order.c --- .../hashing/whirlpool/byte_order.c | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/whirlpool/byte_order.c diff --git a/stratum/algos/binarium_hash_v1/hashing/whirlpool/byte_order.c b/stratum/algos/binarium_hash_v1/hashing/whirlpool/byte_order.c new file mode 100644 index 000000000..207e2319d --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/whirlpool/byte_order.c @@ -0,0 +1,152 @@ +/* byte_order.c - byte order related platform dependent routines, + * + * Copyright: 2008-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ +#include "byte_order.h" + +#ifndef rhash_ctz + +# if _MSC_VER >= 1300 && (_M_IX86 || _M_AMD64 || _M_IA64) /* if MSVC++ >= 2002 on x86/x64 */ +# include +# pragma intrinsic(_BitScanForward) + +/** + * Returns index of the trailing bit of x. + * + * @param x the number to process + * @return zero-based index of the trailing bit + */ +unsigned rhash_ctz(unsigned x) +{ + unsigned long index; + unsigned char isNonzero = _BitScanForward(&index, x); /* MSVC intrinsic */ + return (isNonzero ? (unsigned)index : 0); +} +# else /* _MSC_VER >= 1300... */ + +/** + * Returns index of the trailing bit of a 32-bit number. + * This is a plain C equivalent for GCC __builtin_ctz() bit scan. + * + * @param x the number to process + * @return zero-based index of the trailing bit + */ +unsigned rhash_ctz(unsigned x) +{ + /* array for conversion to bit position */ + static unsigned char bit_pos[32] = { + 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, + 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 + }; + + /* The De Bruijn bit-scan was devised in 1997, according to Donald Knuth + * by Martin Lauter. The constant 0x077CB531UL is a De Bruijn sequence, + * which produces a unique pattern of bits into the high 5 bits for each + * possible bit position that it is multiplied against. + * See http://graphics.stanford.edu/~seander/bithacks.html + * and http://chessprogramming.wikispaces.com/BitScan */ + return (unsigned)bit_pos[((uint32_t)((x & -x) * 0x077CB531U)) >> 27]; +} +# endif /* _MSC_VER >= 1300... */ +#endif /* rhash_ctz */ + +/** + * Copy a memory block with simultaneous exchanging byte order. + * The byte order is changed from little-endian 32-bit integers + * to big-endian (or vice-versa). + * + * @param to the pointer where to copy memory block + * @param index the index to start writing from + * @param from the source block to copy + * @param length length of the memory block + */ +void rhash_swap_copy_str_to_u32(void* to, int index, const void* from, size_t length) +{ + /* if all pointers and length are 32-bits aligned */ + if ( 0 == (( (int)((char*)to - (char*)0) | ((char*)from - (char*)0) | index | length ) & 3) ) { + /* copy memory as 32-bit words */ + const uint32_t* src = (const uint32_t*)from; + const uint32_t* end = (const uint32_t*)((const char*)src + length); + uint32_t* dst = (uint32_t*)((char*)to + index); + for (; src < end; dst++, src++) + *dst = bo_bswap_32(*src); + } else { + const char* src = (const char*)from; + for (length += index; (size_t)index < length; index++) + ((char*)to)[index ^ 3] = *(src++); + } +} + +/** + * Copy a memory block with changed byte order. + * The byte order is changed from little-endian 64-bit integers + * to big-endian (or vice-versa). + * + * @param to the pointer where to copy memory block + * @param index the index to start writing from + * @param from the source block to copy + * @param length length of the memory block + */ +void rhash_swap_copy_str_to_u64(void* to, int index, const void* from, size_t length) +{ + /* if all pointers and length are 64-bits aligned */ + if ( 0 == (( (int)((char*)to - (char*)0) | ((char*)from - (char*)0) | index | length ) & 7) ) { + /* copy aligned memory block as 64-bit integers */ + const uint64_t* src = (const uint64_t*)from; + const uint64_t* end = (const uint64_t*)((const char*)src + length); + uint64_t* dst = (uint64_t*)((char*)to + index); + while (src < end) *(dst++) = bo_bswap_64( *(src++) ); + } else { + const char* src = (const char*)from; + for (length += index; (size_t)index < length; index++) ((char*)to)[index ^ 7] = *(src++); + } +} + +/** + * Copy data from a sequence of 64-bit words to a binary string of given length, + * while changing byte order. + * + * @param to the binary string to receive data + * @param from the source sequence of 64-bit words + * @param length the size in bytes of the data being copied + */ +void rhash_swap_copy_u64_to_str(void* to, const void* from, size_t length) +{ + /* if all pointers and length are 64-bits aligned */ + if ( 0 == (( (int)((char*)to - (char*)0) | ((char*)from - (char*)0) | length ) & 7) ) { + /* copy aligned memory block as 64-bit integers */ + const uint64_t* src = (const uint64_t*)from; + const uint64_t* end = (const uint64_t*)((const char*)src + length); + uint64_t* dst = (uint64_t*)to; + while (src < end) *(dst++) = bo_bswap_64( *(src++) ); + } else { + size_t index; + char* dst = (char*)to; + for (index = 0; index < length; index++) *(dst++) = ((char*)from)[index ^ 7]; + } +} + +/** + * Exchange byte order in the given array of 32-bit integers. + * + * @param arr the array to process + * @param length array length + */ +void rhash_u32_mem_swap(unsigned *arr, int length) +{ + unsigned* end = arr + length; + for (; arr < end; arr++) { + *arr = bo_bswap_32(*arr); + } +} From d298021543d28e292278b515f1042dbfed332c0b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:16:42 -0500 Subject: [PATCH 341/576] Create byte_order.h --- .../hashing/whirlpool/byte_order.h | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/whirlpool/byte_order.h diff --git a/stratum/algos/binarium_hash_v1/hashing/whirlpool/byte_order.h b/stratum/algos/binarium_hash_v1/hashing/whirlpool/byte_order.h new file mode 100644 index 000000000..3a9b5ea9b --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/whirlpool/byte_order.h @@ -0,0 +1,196 @@ +/* byte_order.h */ +#ifndef BYTE_ORDER_H +#define BYTE_ORDER_H +#include "ustd.h" +#include + +#if defined(__GLIBC__) +# include +#endif +#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__) +# include +#elif defined (__NetBSD__) || defined(__OpenBSD__) +# include +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* if x86 compatible cpu */ +#if defined(i386) || defined(__i386__) || defined(__i486__) || \ + defined(__i586__) || defined(__i686__) || defined(__pentium__) || \ + defined(__pentiumpro__) || defined(__pentium4__) || \ + defined(__nocona__) || defined(prescott) || defined(__core2__) || \ + defined(__k6__) || defined(__k8__) || defined(__athlon__) || \ + defined(__amd64) || defined(__amd64__) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_IX86) || \ + defined(_M_AMD64) || defined(_M_IA64) || defined(_M_X64) +/* detect if x86-64 instruction set is supported */ +# if defined(_LP64) || defined(__LP64__) || defined(__x86_64) || \ + defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64) +# define CPU_X64 +# else +# define CPU_IA32 +# endif +#endif + +#define RHASH_BYTE_ORDER_LE 1234 +#define RHASH_BYTE_ORDER_BE 4321 + +#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN) || \ + (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_LE +#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && __BYTE_ORDER == __BIG_ENDIAN) || \ + (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_BE +#elif defined(_BYTE_ORDER) +# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN) +# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_LE +# elif defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN) +# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_BE +# endif +#elif defined(__sun) && defined(_LITTLE_ENDIAN) +# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_LE +#elif defined(__sun) && defined(_BIG_ENDIAN) +# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_BE +#endif + +/* try detecting endianness by CPU */ +#ifdef RHASH_BYTE_ORDER +#elif defined(CPU_IA32) || defined(CPU_X64) || defined(__ia64) || defined(__ia64__) || \ + defined(__alpha__) || defined(_M_ALPHA) || defined(vax) || defined(MIPSEL) || \ + defined(_ARM_) || defined(__arm__) +# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_LE +#elif defined(__sparc) || defined(__sparc__) || defined(sparc) || \ + defined(_ARCH_PPC) || defined(_ARCH_PPC64) || defined(_POWER) || \ + defined(__POWERPC__) || defined(POWERPC) || defined(__powerpc) || \ + defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || \ + defined(__hpux) || defined(_MIPSEB) || defined(mc68000) || \ + defined(__s390__) || defined(__s390x__) || defined(sel) +# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_BE +#else +# error "Can't detect CPU architechture" +#endif + +#define IS_BIG_ENDIAN (RHASH_BYTE_ORDER == RHASH_BYTE_ORDER_BE) +#define IS_LITTLE_ENDIAN (RHASH_BYTE_ORDER == RHASH_BYTE_ORDER_LE) + +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +#define IS_ALIGNED_32(p) (0 == (3 & ((const char*)(p) - (const char*)0))) +#define IS_ALIGNED_64(p) (0 == (7 & ((const char*)(p) - (const char*)0))) + +#if defined(_MSC_VER) +#define ALIGN_ATTR(n) __declspec(align(n)) +#elif defined(__GNUC__) +#define ALIGN_ATTR(n) __attribute__((aligned (n))) +#else +#define ALIGN_ATTR(n) /* nothing */ +#endif + + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define I64(x) x##ui64 +#else +#define I64(x) x##ULL +#endif + + +#ifndef __STRICT_ANSI__ +#define RHASH_INLINE inline +#elif defined(__GNUC__) +#define RHASH_INLINE __inline__ +#else +#define RHASH_INLINE +#endif + +/* define rhash_ctz - count traling zero bits */ +#if (defined(__GNUC__) && __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) || \ + (defined(__clang__) && __has_builtin(__builtin_ctz)) +/* GCC >= 3.4 or clang */ +# define rhash_ctz(x) __builtin_ctz(x) +#else +unsigned rhash_ctz(unsigned); /* define as function */ +#endif + +void rhash_swap_copy_str_to_u32(void* to, int index, const void* from, size_t length); +void rhash_swap_copy_str_to_u64(void* to, int index, const void* from, size_t length); +void rhash_swap_copy_u64_to_str(void* to, const void* from, size_t length); +void rhash_u32_mem_swap(unsigned *p, int length_in_u32); + +/* bswap definitions */ +#if (defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3)) || \ + (defined(__clang__) && __has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64)) +/* GCC >= 4.3 or clang */ +# define bo_bswap_32(x) __builtin_bswap32(x) +# define bo_bswap_64(x) __builtin_bswap64(x) +#elif (_MSC_VER > 1300) && (defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */ +# define bo_bswap_32(x) _byteswap_ulong((unsigned long)x) +# define bo_bswap_64(x) _byteswap_uint64((__int64)x) +#else +/* fallback to generic bswap definition */ +static RHASH_INLINE uint32_t bo_bswap_32(uint32_t x) +{ +# if defined(__GNUC__) && defined(CPU_IA32) && !defined(__i386__) && !defined(RHASH_NO_ASM) + __asm("bswap\t%0" : "=r" (x) : "0" (x)); /* gcc x86 version */ + return x; +# else + x = ((x << 8) & 0xFF00FF00u) | ((x >> 8) & 0x00FF00FFu); + return (x >> 16) | (x << 16); +# endif +} +static RHASH_INLINE uint64_t bo_bswap_64(uint64_t x) +{ + union { + uint64_t ll; + uint32_t l[2]; + } w, r; + w.ll = x; + r.l[0] = bo_bswap_32(w.l[1]); + r.l[1] = bo_bswap_32(w.l[0]); + return r.ll; +} +#endif /* bswap definitions */ + +#if IS_BIG_ENDIAN +# define be2me_32(x) (x) +# define be2me_64(x) (x) +# define le2me_32(x) bo_bswap_32(x) +# define le2me_64(x) bo_bswap_64(x) + +# define be32_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define le32_copy(to, index, from, length) rhash_swap_copy_str_to_u32((to), (index), (from), (length)) +# define be64_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define le64_copy(to, index, from, length) rhash_swap_copy_str_to_u64((to), (index), (from), (length)) +# define me64_to_be_str(to, from, length) memcpy((to), (from), (length)) +# define me64_to_le_str(to, from, length) rhash_swap_copy_u64_to_str((to), (from), (length)) + +#else /* IS_BIG_ENDIAN */ +# define be2me_32(x) bo_bswap_32(x) +# define be2me_64(x) bo_bswap_64(x) +# define le2me_32(x) (x) +# define le2me_64(x) (x) + +# define be32_copy(to, index, from, length) rhash_swap_copy_str_to_u32((to), (index), (from), (length)) +# define le32_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define be64_copy(to, index, from, length) rhash_swap_copy_str_to_u64((to), (index), (from), (length)) +# define le64_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define me64_to_be_str(to, from, length) rhash_swap_copy_u64_to_str((to), (from), (length)) +# define me64_to_le_str(to, from, length) memcpy((to), (from), (length)) +#endif /* IS_BIG_ENDIAN */ + +/* ROTL/ROTR macros rotate a 32/64-bit word left/right by n bits */ +#define ROTL32(dword, n) ((dword) << (n) ^ ((dword) >> (32 - (n)))) +#define ROTR32(dword, n) ((dword) >> (n) ^ ((dword) << (32 - (n)))) +#define ROTL64(qword, n) ((qword) << (n) ^ ((qword) >> (64 - (n)))) +#define ROTR64(qword, n) ((qword) >> (n) ^ ((qword) << (64 - (n)))) + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* BYTE_ORDER_H */ From 9cb875449aaf5a555089737caff24f478a2b2ff9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:17:02 -0500 Subject: [PATCH 342/576] Create ustd.h --- .../binarium_hash_v1/hashing/whirlpool/ustd.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/whirlpool/ustd.h diff --git a/stratum/algos/binarium_hash_v1/hashing/whirlpool/ustd.h b/stratum/algos/binarium_hash_v1/hashing/whirlpool/ustd.h new file mode 100644 index 000000000..94f1ae260 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/whirlpool/ustd.h @@ -0,0 +1,30 @@ +/* ustd.h common macros and includes */ +#ifndef LIBRHASH_USTD_H +#define LIBRHASH_USTD_H + +#if _MSC_VER >= 1300 + +# define int64_t __int64 +# define int32_t __int32 +# define int16_t __int16 +# define int8_t __int8 +# define uint64_t unsigned __int64 +# define uint32_t unsigned __int32 +# define uint16_t unsigned __int16 +# define uint8_t unsigned __int8 + +/* disable warnings: The POSIX name for this item is deprecated. Use the ISO C++ conformant name. */ +#pragma warning(disable : 4996) + +#else /* _MSC_VER >= 1300 */ + +# include +# include + +#endif /* _MSC_VER >= 1300 */ + +#if _MSC_VER <= 1300 +# include /* size_t for vc6.0 */ +#endif /* _MSC_VER <= 1300 */ + +#endif /* LIBRHASH_USTD_H */ From c97ee4d7f1b6fb6639797fb888c56ba652b682e6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:17:21 -0500 Subject: [PATCH 343/576] Create whirlpool.c --- .../hashing/whirlpool/whirlpool.c | 748 ++++++++++++++++++ 1 file changed, 748 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.c diff --git a/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.c b/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.c new file mode 100644 index 000000000..60545c857 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.c @@ -0,0 +1,748 @@ +/* whirlpool.c - an implementation of the Whirlpool Hash Function. + * + * Copyright: 2009-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + * + * Documentation: + * P. S. L. M. Barreto, V. Rijmen, ``The Whirlpool hashing function,'' + * NESSIE submission, 2000 (tweaked version, 2001) + * + * The algorithm is named after the Whirlpool Galaxy in Canes Venatici. + */ + +#include +#include +#include "byte_order.h" +#include "whirlpool.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +/** + * Initialize context before calculaing hash. + * + * @param ctx context to initialize + */ +void rhash_whirlpool_init(struct whirlpool_ctx* ctx) +{ + ctx->length = 0; + memset(ctx->hash, 0, sizeof(ctx->hash)); +} + +/* Algorithm S-Box */ +//extern uint64_t rhash_whirlpool_sbox[8][256]; + +uint64_t rhash_whirlpool_sbox[8][256] = { + { + // C0 vectors + I64(0x18186018c07830d8), I64(0x23238c2305af4626), I64(0xc6c63fc67ef991b8), I64(0xe8e887e8136fcdfb), + I64(0x878726874ca113cb), I64(0xb8b8dab8a9626d11), I64(0x0101040108050209), I64(0x4f4f214f426e9e0d), + I64(0x3636d836adee6c9b), I64(0xa6a6a2a6590451ff), I64(0xd2d26fd2debdb90c), I64(0xf5f5f3f5fb06f70e), + I64(0x7979f979ef80f296), I64(0x6f6fa16f5fcede30), I64(0x91917e91fcef3f6d), I64(0x52525552aa07a4f8), + I64(0x60609d6027fdc047), I64(0xbcbccabc89766535), I64(0x9b9b569baccd2b37), I64(0x8e8e028e048c018a), + I64(0xa3a3b6a371155bd2), I64(0x0c0c300c603c186c), I64(0x7b7bf17bff8af684), I64(0x3535d435b5e16a80), + I64(0x1d1d741de8693af5), I64(0xe0e0a7e05347ddb3), I64(0xd7d77bd7f6acb321), I64(0xc2c22fc25eed999c), + I64(0x2e2eb82e6d965c43), I64(0x4b4b314b627a9629), I64(0xfefedffea321e15d), I64(0x575741578216aed5), + I64(0x15155415a8412abd), I64(0x7777c1779fb6eee8), I64(0x3737dc37a5eb6e92), I64(0xe5e5b3e57b56d79e), + I64(0x9f9f469f8cd92313), I64(0xf0f0e7f0d317fd23), I64(0x4a4a354a6a7f9420), I64(0xdada4fda9e95a944), + I64(0x58587d58fa25b0a2), I64(0xc9c903c906ca8fcf), I64(0x2929a429558d527c), I64(0x0a0a280a5022145a), + I64(0xb1b1feb1e14f7f50), I64(0xa0a0baa0691a5dc9), I64(0x6b6bb16b7fdad614), I64(0x85852e855cab17d9), + I64(0xbdbdcebd8173673c), I64(0x5d5d695dd234ba8f), I64(0x1010401080502090), I64(0xf4f4f7f4f303f507), + I64(0xcbcb0bcb16c08bdd), I64(0x3e3ef83eedc67cd3), I64(0x0505140528110a2d), I64(0x676781671fe6ce78), + I64(0xe4e4b7e47353d597), I64(0x27279c2725bb4e02), I64(0x4141194132588273), I64(0x8b8b168b2c9d0ba7), + I64(0xa7a7a6a7510153f6), I64(0x7d7de97dcf94fab2), I64(0x95956e95dcfb3749), I64(0xd8d847d88e9fad56), + I64(0xfbfbcbfb8b30eb70), I64(0xeeee9fee2371c1cd), I64(0x7c7ced7cc791f8bb), I64(0x6666856617e3cc71), + I64(0xdddd53dda68ea77b), I64(0x17175c17b84b2eaf), I64(0x4747014702468e45), I64(0x9e9e429e84dc211a), + I64(0xcaca0fca1ec589d4), I64(0x2d2db42d75995a58), I64(0xbfbfc6bf9179632e), I64(0x07071c07381b0e3f), + I64(0xadad8ead012347ac), I64(0x5a5a755aea2fb4b0), I64(0x838336836cb51bef), I64(0x3333cc3385ff66b6), + I64(0x636391633ff2c65c), I64(0x02020802100a0412), I64(0xaaaa92aa39384993), I64(0x7171d971afa8e2de), + I64(0xc8c807c80ecf8dc6), I64(0x19196419c87d32d1), I64(0x494939497270923b), I64(0xd9d943d9869aaf5f), + I64(0xf2f2eff2c31df931), I64(0xe3e3abe34b48dba8), I64(0x5b5b715be22ab6b9), I64(0x88881a8834920dbc), + I64(0x9a9a529aa4c8293e), I64(0x262698262dbe4c0b), I64(0x3232c8328dfa64bf), I64(0xb0b0fab0e94a7d59), + I64(0xe9e983e91b6acff2), I64(0x0f0f3c0f78331e77), I64(0xd5d573d5e6a6b733), I64(0x80803a8074ba1df4), + I64(0xbebec2be997c6127), I64(0xcdcd13cd26de87eb), I64(0x3434d034bde46889), I64(0x48483d487a759032), + I64(0xffffdbffab24e354), I64(0x7a7af57af78ff48d), I64(0x90907a90f4ea3d64), I64(0x5f5f615fc23ebe9d), + I64(0x202080201da0403d), I64(0x6868bd6867d5d00f), I64(0x1a1a681ad07234ca), I64(0xaeae82ae192c41b7), + I64(0xb4b4eab4c95e757d), I64(0x54544d549a19a8ce), I64(0x93937693ece53b7f), I64(0x222288220daa442f), + I64(0x64648d6407e9c863), I64(0xf1f1e3f1db12ff2a), I64(0x7373d173bfa2e6cc), I64(0x12124812905a2482), + I64(0x40401d403a5d807a), I64(0x0808200840281048), I64(0xc3c32bc356e89b95), I64(0xecec97ec337bc5df), + I64(0xdbdb4bdb9690ab4d), I64(0xa1a1bea1611f5fc0), I64(0x8d8d0e8d1c830791), I64(0x3d3df43df5c97ac8), + I64(0x97976697ccf1335b), I64(0x0000000000000000), I64(0xcfcf1bcf36d483f9), I64(0x2b2bac2b4587566e), + I64(0x7676c57697b3ece1), I64(0x8282328264b019e6), I64(0xd6d67fd6fea9b128), I64(0x1b1b6c1bd87736c3), + I64(0xb5b5eeb5c15b7774), I64(0xafaf86af112943be), I64(0x6a6ab56a77dfd41d), I64(0x50505d50ba0da0ea), + I64(0x45450945124c8a57), I64(0xf3f3ebf3cb18fb38), I64(0x3030c0309df060ad), I64(0xefef9bef2b74c3c4), + I64(0x3f3ffc3fe5c37eda), I64(0x55554955921caac7), I64(0xa2a2b2a2791059db), I64(0xeaea8fea0365c9e9), + I64(0x656589650fecca6a), I64(0xbabad2bab9686903), I64(0x2f2fbc2f65935e4a), I64(0xc0c027c04ee79d8e), + I64(0xdede5fdebe81a160), I64(0x1c1c701ce06c38fc), I64(0xfdfdd3fdbb2ee746), I64(0x4d4d294d52649a1f), + I64(0x92927292e4e03976), I64(0x7575c9758fbceafa), I64(0x06061806301e0c36), I64(0x8a8a128a249809ae), + I64(0xb2b2f2b2f940794b), I64(0xe6e6bfe66359d185), I64(0x0e0e380e70361c7e), I64(0x1f1f7c1ff8633ee7), + I64(0x6262956237f7c455), I64(0xd4d477d4eea3b53a), I64(0xa8a89aa829324d81), I64(0x96966296c4f43152), + I64(0xf9f9c3f99b3aef62), I64(0xc5c533c566f697a3), I64(0x2525942535b14a10), I64(0x59597959f220b2ab), + I64(0x84842a8454ae15d0), I64(0x7272d572b7a7e4c5), I64(0x3939e439d5dd72ec), I64(0x4c4c2d4c5a619816), + I64(0x5e5e655eca3bbc94), I64(0x7878fd78e785f09f), I64(0x3838e038ddd870e5), I64(0x8c8c0a8c14860598), + I64(0xd1d163d1c6b2bf17), I64(0xa5a5aea5410b57e4), I64(0xe2e2afe2434dd9a1), I64(0x616199612ff8c24e), + I64(0xb3b3f6b3f1457b42), I64(0x2121842115a54234), I64(0x9c9c4a9c94d62508), I64(0x1e1e781ef0663cee), + I64(0x4343114322528661), I64(0xc7c73bc776fc93b1), I64(0xfcfcd7fcb32be54f), I64(0x0404100420140824), + I64(0x51515951b208a2e3), I64(0x99995e99bcc72f25), I64(0x6d6da96d4fc4da22), I64(0x0d0d340d68391a65), + I64(0xfafacffa8335e979), I64(0xdfdf5bdfb684a369), I64(0x7e7ee57ed79bfca9), I64(0x242490243db44819), + I64(0x3b3bec3bc5d776fe), I64(0xabab96ab313d4b9a), I64(0xcece1fce3ed181f0), I64(0x1111441188552299), + I64(0x8f8f068f0c890383), I64(0x4e4e254e4a6b9c04), I64(0xb7b7e6b7d1517366), I64(0xebeb8beb0b60cbe0), + I64(0x3c3cf03cfdcc78c1), I64(0x81813e817cbf1ffd), I64(0x94946a94d4fe3540), I64(0xf7f7fbf7eb0cf31c), + I64(0xb9b9deb9a1676f18), I64(0x13134c13985f268b), I64(0x2c2cb02c7d9c5851), I64(0xd3d36bd3d6b8bb05), + I64(0xe7e7bbe76b5cd38c), I64(0x6e6ea56e57cbdc39), I64(0xc4c437c46ef395aa), I64(0x03030c03180f061b), + I64(0x565645568a13acdc), I64(0x44440d441a49885e), I64(0x7f7fe17fdf9efea0), I64(0xa9a99ea921374f88), + I64(0x2a2aa82a4d825467), I64(0xbbbbd6bbb16d6b0a), I64(0xc1c123c146e29f87), I64(0x53535153a202a6f1), + I64(0xdcdc57dcae8ba572), I64(0x0b0b2c0b58271653), I64(0x9d9d4e9d9cd32701), I64(0x6c6cad6c47c1d82b), + I64(0x3131c43195f562a4), I64(0x7474cd7487b9e8f3), I64(0xf6f6fff6e309f115), I64(0x464605460a438c4c), + I64(0xacac8aac092645a5), I64(0x89891e893c970fb5), I64(0x14145014a04428b4), I64(0xe1e1a3e15b42dfba), + I64(0x16165816b04e2ca6), I64(0x3a3ae83acdd274f7), I64(0x6969b9696fd0d206), I64(0x09092409482d1241), + I64(0x7070dd70a7ade0d7), I64(0xb6b6e2b6d954716f), I64(0xd0d067d0ceb7bd1e), I64(0xeded93ed3b7ec7d6), + I64(0xcccc17cc2edb85e2), I64(0x424215422a578468), I64(0x98985a98b4c22d2c), I64(0xa4a4aaa4490e55ed), + I64(0x2828a0285d885075), I64(0x5c5c6d5cda31b886), I64(0xf8f8c7f8933fed6b), I64(0x8686228644a411c2), + }, { + // C1 vectors + I64(0xd818186018c07830), I64(0x2623238c2305af46), I64(0xb8c6c63fc67ef991), I64(0xfbe8e887e8136fcd), + I64(0xcb878726874ca113), I64(0x11b8b8dab8a9626d), I64(0x0901010401080502), I64(0x0d4f4f214f426e9e), + I64(0x9b3636d836adee6c), I64(0xffa6a6a2a6590451), I64(0x0cd2d26fd2debdb9), I64(0x0ef5f5f3f5fb06f7), + I64(0x967979f979ef80f2), I64(0x306f6fa16f5fcede), I64(0x6d91917e91fcef3f), I64(0xf852525552aa07a4), + I64(0x4760609d6027fdc0), I64(0x35bcbccabc897665), I64(0x379b9b569baccd2b), I64(0x8a8e8e028e048c01), + I64(0xd2a3a3b6a371155b), I64(0x6c0c0c300c603c18), I64(0x847b7bf17bff8af6), I64(0x803535d435b5e16a), + I64(0xf51d1d741de8693a), I64(0xb3e0e0a7e05347dd), I64(0x21d7d77bd7f6acb3), I64(0x9cc2c22fc25eed99), + I64(0x432e2eb82e6d965c), I64(0x294b4b314b627a96), I64(0x5dfefedffea321e1), I64(0xd5575741578216ae), + I64(0xbd15155415a8412a), I64(0xe87777c1779fb6ee), I64(0x923737dc37a5eb6e), I64(0x9ee5e5b3e57b56d7), + I64(0x139f9f469f8cd923), I64(0x23f0f0e7f0d317fd), I64(0x204a4a354a6a7f94), I64(0x44dada4fda9e95a9), + I64(0xa258587d58fa25b0), I64(0xcfc9c903c906ca8f), I64(0x7c2929a429558d52), I64(0x5a0a0a280a502214), + I64(0x50b1b1feb1e14f7f), I64(0xc9a0a0baa0691a5d), I64(0x146b6bb16b7fdad6), I64(0xd985852e855cab17), + I64(0x3cbdbdcebd817367), I64(0x8f5d5d695dd234ba), I64(0x9010104010805020), I64(0x07f4f4f7f4f303f5), + I64(0xddcbcb0bcb16c08b), I64(0xd33e3ef83eedc67c), I64(0x2d0505140528110a), I64(0x78676781671fe6ce), + I64(0x97e4e4b7e47353d5), I64(0x0227279c2725bb4e), I64(0x7341411941325882), I64(0xa78b8b168b2c9d0b), + I64(0xf6a7a7a6a7510153), I64(0xb27d7de97dcf94fa), I64(0x4995956e95dcfb37), I64(0x56d8d847d88e9fad), + I64(0x70fbfbcbfb8b30eb), I64(0xcdeeee9fee2371c1), I64(0xbb7c7ced7cc791f8), I64(0x716666856617e3cc), + I64(0x7bdddd53dda68ea7), I64(0xaf17175c17b84b2e), I64(0x454747014702468e), I64(0x1a9e9e429e84dc21), + I64(0xd4caca0fca1ec589), I64(0x582d2db42d75995a), I64(0x2ebfbfc6bf917963), I64(0x3f07071c07381b0e), + I64(0xacadad8ead012347), I64(0xb05a5a755aea2fb4), I64(0xef838336836cb51b), I64(0xb63333cc3385ff66), + I64(0x5c636391633ff2c6), I64(0x1202020802100a04), I64(0x93aaaa92aa393849), I64(0xde7171d971afa8e2), + I64(0xc6c8c807c80ecf8d), I64(0xd119196419c87d32), I64(0x3b49493949727092), I64(0x5fd9d943d9869aaf), + I64(0x31f2f2eff2c31df9), I64(0xa8e3e3abe34b48db), I64(0xb95b5b715be22ab6), I64(0xbc88881a8834920d), + I64(0x3e9a9a529aa4c829), I64(0x0b262698262dbe4c), I64(0xbf3232c8328dfa64), I64(0x59b0b0fab0e94a7d), + I64(0xf2e9e983e91b6acf), I64(0x770f0f3c0f78331e), I64(0x33d5d573d5e6a6b7), I64(0xf480803a8074ba1d), + I64(0x27bebec2be997c61), I64(0xebcdcd13cd26de87), I64(0x893434d034bde468), I64(0x3248483d487a7590), + I64(0x54ffffdbffab24e3), I64(0x8d7a7af57af78ff4), I64(0x6490907a90f4ea3d), I64(0x9d5f5f615fc23ebe), + I64(0x3d202080201da040), I64(0x0f6868bd6867d5d0), I64(0xca1a1a681ad07234), I64(0xb7aeae82ae192c41), + I64(0x7db4b4eab4c95e75), I64(0xce54544d549a19a8), I64(0x7f93937693ece53b), I64(0x2f222288220daa44), + I64(0x6364648d6407e9c8), I64(0x2af1f1e3f1db12ff), I64(0xcc7373d173bfa2e6), I64(0x8212124812905a24), + I64(0x7a40401d403a5d80), I64(0x4808082008402810), I64(0x95c3c32bc356e89b), I64(0xdfecec97ec337bc5), + I64(0x4ddbdb4bdb9690ab), I64(0xc0a1a1bea1611f5f), I64(0x918d8d0e8d1c8307), I64(0xc83d3df43df5c97a), + I64(0x5b97976697ccf133), I64(0x0000000000000000), I64(0xf9cfcf1bcf36d483), I64(0x6e2b2bac2b458756), + I64(0xe17676c57697b3ec), I64(0xe68282328264b019), I64(0x28d6d67fd6fea9b1), I64(0xc31b1b6c1bd87736), + I64(0x74b5b5eeb5c15b77), I64(0xbeafaf86af112943), I64(0x1d6a6ab56a77dfd4), I64(0xea50505d50ba0da0), + I64(0x5745450945124c8a), I64(0x38f3f3ebf3cb18fb), I64(0xad3030c0309df060), I64(0xc4efef9bef2b74c3), + I64(0xda3f3ffc3fe5c37e), I64(0xc755554955921caa), I64(0xdba2a2b2a2791059), I64(0xe9eaea8fea0365c9), + I64(0x6a656589650fecca), I64(0x03babad2bab96869), I64(0x4a2f2fbc2f65935e), I64(0x8ec0c027c04ee79d), + I64(0x60dede5fdebe81a1), I64(0xfc1c1c701ce06c38), I64(0x46fdfdd3fdbb2ee7), I64(0x1f4d4d294d52649a), + I64(0x7692927292e4e039), I64(0xfa7575c9758fbcea), I64(0x3606061806301e0c), I64(0xae8a8a128a249809), + I64(0x4bb2b2f2b2f94079), I64(0x85e6e6bfe66359d1), I64(0x7e0e0e380e70361c), I64(0xe71f1f7c1ff8633e), + I64(0x556262956237f7c4), I64(0x3ad4d477d4eea3b5), I64(0x81a8a89aa829324d), I64(0x5296966296c4f431), + I64(0x62f9f9c3f99b3aef), I64(0xa3c5c533c566f697), I64(0x102525942535b14a), I64(0xab59597959f220b2), + I64(0xd084842a8454ae15), I64(0xc57272d572b7a7e4), I64(0xec3939e439d5dd72), I64(0x164c4c2d4c5a6198), + I64(0x945e5e655eca3bbc), I64(0x9f7878fd78e785f0), I64(0xe53838e038ddd870), I64(0x988c8c0a8c148605), + I64(0x17d1d163d1c6b2bf), I64(0xe4a5a5aea5410b57), I64(0xa1e2e2afe2434dd9), I64(0x4e616199612ff8c2), + I64(0x42b3b3f6b3f1457b), I64(0x342121842115a542), I64(0x089c9c4a9c94d625), I64(0xee1e1e781ef0663c), + I64(0x6143431143225286), I64(0xb1c7c73bc776fc93), I64(0x4ffcfcd7fcb32be5), I64(0x2404041004201408), + I64(0xe351515951b208a2), I64(0x2599995e99bcc72f), I64(0x226d6da96d4fc4da), I64(0x650d0d340d68391a), + I64(0x79fafacffa8335e9), I64(0x69dfdf5bdfb684a3), I64(0xa97e7ee57ed79bfc), I64(0x19242490243db448), + I64(0xfe3b3bec3bc5d776), I64(0x9aabab96ab313d4b), I64(0xf0cece1fce3ed181), I64(0x9911114411885522), + I64(0x838f8f068f0c8903), I64(0x044e4e254e4a6b9c), I64(0x66b7b7e6b7d15173), I64(0xe0ebeb8beb0b60cb), + I64(0xc13c3cf03cfdcc78), I64(0xfd81813e817cbf1f), I64(0x4094946a94d4fe35), I64(0x1cf7f7fbf7eb0cf3), + I64(0x18b9b9deb9a1676f), I64(0x8b13134c13985f26), I64(0x512c2cb02c7d9c58), I64(0x05d3d36bd3d6b8bb), + I64(0x8ce7e7bbe76b5cd3), I64(0x396e6ea56e57cbdc), I64(0xaac4c437c46ef395), I64(0x1b03030c03180f06), + I64(0xdc565645568a13ac), I64(0x5e44440d441a4988), I64(0xa07f7fe17fdf9efe), I64(0x88a9a99ea921374f), + I64(0x672a2aa82a4d8254), I64(0x0abbbbd6bbb16d6b), I64(0x87c1c123c146e29f), I64(0xf153535153a202a6), + I64(0x72dcdc57dcae8ba5), I64(0x530b0b2c0b582716), I64(0x019d9d4e9d9cd327), I64(0x2b6c6cad6c47c1d8), + I64(0xa43131c43195f562), I64(0xf37474cd7487b9e8), I64(0x15f6f6fff6e309f1), I64(0x4c464605460a438c), + I64(0xa5acac8aac092645), I64(0xb589891e893c970f), I64(0xb414145014a04428), I64(0xbae1e1a3e15b42df), + I64(0xa616165816b04e2c), I64(0xf73a3ae83acdd274), I64(0x066969b9696fd0d2), I64(0x4109092409482d12), + I64(0xd77070dd70a7ade0), I64(0x6fb6b6e2b6d95471), I64(0x1ed0d067d0ceb7bd), I64(0xd6eded93ed3b7ec7), + I64(0xe2cccc17cc2edb85), I64(0x68424215422a5784), I64(0x2c98985a98b4c22d), I64(0xeda4a4aaa4490e55), + I64(0x752828a0285d8850), I64(0x865c5c6d5cda31b8), I64(0x6bf8f8c7f8933fed), I64(0xc28686228644a411), + }, { + // C2 vectors + I64(0x30d818186018c078), I64(0x462623238c2305af), I64(0x91b8c6c63fc67ef9), I64(0xcdfbe8e887e8136f), + I64(0x13cb878726874ca1), I64(0x6d11b8b8dab8a962), I64(0x0209010104010805), I64(0x9e0d4f4f214f426e), + I64(0x6c9b3636d836adee), I64(0x51ffa6a6a2a65904), I64(0xb90cd2d26fd2debd), I64(0xf70ef5f5f3f5fb06), + I64(0xf2967979f979ef80), I64(0xde306f6fa16f5fce), I64(0x3f6d91917e91fcef), I64(0xa4f852525552aa07), + I64(0xc04760609d6027fd), I64(0x6535bcbccabc8976), I64(0x2b379b9b569baccd), I64(0x018a8e8e028e048c), + I64(0x5bd2a3a3b6a37115), I64(0x186c0c0c300c603c), I64(0xf6847b7bf17bff8a), I64(0x6a803535d435b5e1), + I64(0x3af51d1d741de869), I64(0xddb3e0e0a7e05347), I64(0xb321d7d77bd7f6ac), I64(0x999cc2c22fc25eed), + I64(0x5c432e2eb82e6d96), I64(0x96294b4b314b627a), I64(0xe15dfefedffea321), I64(0xaed5575741578216), + I64(0x2abd15155415a841), I64(0xeee87777c1779fb6), I64(0x6e923737dc37a5eb), I64(0xd79ee5e5b3e57b56), + I64(0x23139f9f469f8cd9), I64(0xfd23f0f0e7f0d317), I64(0x94204a4a354a6a7f), I64(0xa944dada4fda9e95), + I64(0xb0a258587d58fa25), I64(0x8fcfc9c903c906ca), I64(0x527c2929a429558d), I64(0x145a0a0a280a5022), + I64(0x7f50b1b1feb1e14f), I64(0x5dc9a0a0baa0691a), I64(0xd6146b6bb16b7fda), I64(0x17d985852e855cab), + I64(0x673cbdbdcebd8173), I64(0xba8f5d5d695dd234), I64(0x2090101040108050), I64(0xf507f4f4f7f4f303), + I64(0x8bddcbcb0bcb16c0), I64(0x7cd33e3ef83eedc6), I64(0x0a2d050514052811), I64(0xce78676781671fe6), + I64(0xd597e4e4b7e47353), I64(0x4e0227279c2725bb), I64(0x8273414119413258), I64(0x0ba78b8b168b2c9d), + I64(0x53f6a7a7a6a75101), I64(0xfab27d7de97dcf94), I64(0x374995956e95dcfb), I64(0xad56d8d847d88e9f), + I64(0xeb70fbfbcbfb8b30), I64(0xc1cdeeee9fee2371), I64(0xf8bb7c7ced7cc791), I64(0xcc716666856617e3), + I64(0xa77bdddd53dda68e), I64(0x2eaf17175c17b84b), I64(0x8e45474701470246), I64(0x211a9e9e429e84dc), + I64(0x89d4caca0fca1ec5), I64(0x5a582d2db42d7599), I64(0x632ebfbfc6bf9179), I64(0x0e3f07071c07381b), + I64(0x47acadad8ead0123), I64(0xb4b05a5a755aea2f), I64(0x1bef838336836cb5), I64(0x66b63333cc3385ff), + I64(0xc65c636391633ff2), I64(0x041202020802100a), I64(0x4993aaaa92aa3938), I64(0xe2de7171d971afa8), + I64(0x8dc6c8c807c80ecf), I64(0x32d119196419c87d), I64(0x923b494939497270), I64(0xaf5fd9d943d9869a), + I64(0xf931f2f2eff2c31d), I64(0xdba8e3e3abe34b48), I64(0xb6b95b5b715be22a), I64(0x0dbc88881a883492), + I64(0x293e9a9a529aa4c8), I64(0x4c0b262698262dbe), I64(0x64bf3232c8328dfa), I64(0x7d59b0b0fab0e94a), + I64(0xcff2e9e983e91b6a), I64(0x1e770f0f3c0f7833), I64(0xb733d5d573d5e6a6), I64(0x1df480803a8074ba), + I64(0x6127bebec2be997c), I64(0x87ebcdcd13cd26de), I64(0x68893434d034bde4), I64(0x903248483d487a75), + I64(0xe354ffffdbffab24), I64(0xf48d7a7af57af78f), I64(0x3d6490907a90f4ea), I64(0xbe9d5f5f615fc23e), + I64(0x403d202080201da0), I64(0xd00f6868bd6867d5), I64(0x34ca1a1a681ad072), I64(0x41b7aeae82ae192c), + I64(0x757db4b4eab4c95e), I64(0xa8ce54544d549a19), I64(0x3b7f93937693ece5), I64(0x442f222288220daa), + I64(0xc86364648d6407e9), I64(0xff2af1f1e3f1db12), I64(0xe6cc7373d173bfa2), I64(0x248212124812905a), + I64(0x807a40401d403a5d), I64(0x1048080820084028), I64(0x9b95c3c32bc356e8), I64(0xc5dfecec97ec337b), + I64(0xab4ddbdb4bdb9690), I64(0x5fc0a1a1bea1611f), I64(0x07918d8d0e8d1c83), I64(0x7ac83d3df43df5c9), + I64(0x335b97976697ccf1), I64(0x0000000000000000), I64(0x83f9cfcf1bcf36d4), I64(0x566e2b2bac2b4587), + I64(0xece17676c57697b3), I64(0x19e68282328264b0), I64(0xb128d6d67fd6fea9), I64(0x36c31b1b6c1bd877), + I64(0x7774b5b5eeb5c15b), I64(0x43beafaf86af1129), I64(0xd41d6a6ab56a77df), I64(0xa0ea50505d50ba0d), + I64(0x8a5745450945124c), I64(0xfb38f3f3ebf3cb18), I64(0x60ad3030c0309df0), I64(0xc3c4efef9bef2b74), + I64(0x7eda3f3ffc3fe5c3), I64(0xaac755554955921c), I64(0x59dba2a2b2a27910), I64(0xc9e9eaea8fea0365), + I64(0xca6a656589650fec), I64(0x6903babad2bab968), I64(0x5e4a2f2fbc2f6593), I64(0x9d8ec0c027c04ee7), + I64(0xa160dede5fdebe81), I64(0x38fc1c1c701ce06c), I64(0xe746fdfdd3fdbb2e), I64(0x9a1f4d4d294d5264), + I64(0x397692927292e4e0), I64(0xeafa7575c9758fbc), I64(0x0c3606061806301e), I64(0x09ae8a8a128a2498), + I64(0x794bb2b2f2b2f940), I64(0xd185e6e6bfe66359), I64(0x1c7e0e0e380e7036), I64(0x3ee71f1f7c1ff863), + I64(0xc4556262956237f7), I64(0xb53ad4d477d4eea3), I64(0x4d81a8a89aa82932), I64(0x315296966296c4f4), + I64(0xef62f9f9c3f99b3a), I64(0x97a3c5c533c566f6), I64(0x4a102525942535b1), I64(0xb2ab59597959f220), + I64(0x15d084842a8454ae), I64(0xe4c57272d572b7a7), I64(0x72ec3939e439d5dd), I64(0x98164c4c2d4c5a61), + I64(0xbc945e5e655eca3b), I64(0xf09f7878fd78e785), I64(0x70e53838e038ddd8), I64(0x05988c8c0a8c1486), + I64(0xbf17d1d163d1c6b2), I64(0x57e4a5a5aea5410b), I64(0xd9a1e2e2afe2434d), I64(0xc24e616199612ff8), + I64(0x7b42b3b3f6b3f145), I64(0x42342121842115a5), I64(0x25089c9c4a9c94d6), I64(0x3cee1e1e781ef066), + I64(0x8661434311432252), I64(0x93b1c7c73bc776fc), I64(0xe54ffcfcd7fcb32b), I64(0x0824040410042014), + I64(0xa2e351515951b208), I64(0x2f2599995e99bcc7), I64(0xda226d6da96d4fc4), I64(0x1a650d0d340d6839), + I64(0xe979fafacffa8335), I64(0xa369dfdf5bdfb684), I64(0xfca97e7ee57ed79b), I64(0x4819242490243db4), + I64(0x76fe3b3bec3bc5d7), I64(0x4b9aabab96ab313d), I64(0x81f0cece1fce3ed1), I64(0x2299111144118855), + I64(0x03838f8f068f0c89), I64(0x9c044e4e254e4a6b), I64(0x7366b7b7e6b7d151), I64(0xcbe0ebeb8beb0b60), + I64(0x78c13c3cf03cfdcc), I64(0x1ffd81813e817cbf), I64(0x354094946a94d4fe), I64(0xf31cf7f7fbf7eb0c), + I64(0x6f18b9b9deb9a167), I64(0x268b13134c13985f), I64(0x58512c2cb02c7d9c), I64(0xbb05d3d36bd3d6b8), + I64(0xd38ce7e7bbe76b5c), I64(0xdc396e6ea56e57cb), I64(0x95aac4c437c46ef3), I64(0x061b03030c03180f), + I64(0xacdc565645568a13), I64(0x885e44440d441a49), I64(0xfea07f7fe17fdf9e), I64(0x4f88a9a99ea92137), + I64(0x54672a2aa82a4d82), I64(0x6b0abbbbd6bbb16d), I64(0x9f87c1c123c146e2), I64(0xa6f153535153a202), + I64(0xa572dcdc57dcae8b), I64(0x16530b0b2c0b5827), I64(0x27019d9d4e9d9cd3), I64(0xd82b6c6cad6c47c1), + I64(0x62a43131c43195f5), I64(0xe8f37474cd7487b9), I64(0xf115f6f6fff6e309), I64(0x8c4c464605460a43), + I64(0x45a5acac8aac0926), I64(0x0fb589891e893c97), I64(0x28b414145014a044), I64(0xdfbae1e1a3e15b42), + I64(0x2ca616165816b04e), I64(0x74f73a3ae83acdd2), I64(0xd2066969b9696fd0), I64(0x124109092409482d), + I64(0xe0d77070dd70a7ad), I64(0x716fb6b6e2b6d954), I64(0xbd1ed0d067d0ceb7), I64(0xc7d6eded93ed3b7e), + I64(0x85e2cccc17cc2edb), I64(0x8468424215422a57), I64(0x2d2c98985a98b4c2), I64(0x55eda4a4aaa4490e), + I64(0x50752828a0285d88), I64(0xb8865c5c6d5cda31), I64(0xed6bf8f8c7f8933f), I64(0x11c28686228644a4), + }, { + // C3 vectors + I64(0x7830d818186018c0), I64(0xaf462623238c2305), I64(0xf991b8c6c63fc67e), I64(0x6fcdfbe8e887e813), + I64(0xa113cb878726874c), I64(0x626d11b8b8dab8a9), I64(0x0502090101040108), I64(0x6e9e0d4f4f214f42), + I64(0xee6c9b3636d836ad), I64(0x0451ffa6a6a2a659), I64(0xbdb90cd2d26fd2de), I64(0x06f70ef5f5f3f5fb), + I64(0x80f2967979f979ef), I64(0xcede306f6fa16f5f), I64(0xef3f6d91917e91fc), I64(0x07a4f852525552aa), + I64(0xfdc04760609d6027), I64(0x766535bcbccabc89), I64(0xcd2b379b9b569bac), I64(0x8c018a8e8e028e04), + I64(0x155bd2a3a3b6a371), I64(0x3c186c0c0c300c60), I64(0x8af6847b7bf17bff), I64(0xe16a803535d435b5), + I64(0x693af51d1d741de8), I64(0x47ddb3e0e0a7e053), I64(0xacb321d7d77bd7f6), I64(0xed999cc2c22fc25e), + I64(0x965c432e2eb82e6d), I64(0x7a96294b4b314b62), I64(0x21e15dfefedffea3), I64(0x16aed55757415782), + I64(0x412abd15155415a8), I64(0xb6eee87777c1779f), I64(0xeb6e923737dc37a5), I64(0x56d79ee5e5b3e57b), + I64(0xd923139f9f469f8c), I64(0x17fd23f0f0e7f0d3), I64(0x7f94204a4a354a6a), I64(0x95a944dada4fda9e), + I64(0x25b0a258587d58fa), I64(0xca8fcfc9c903c906), I64(0x8d527c2929a42955), I64(0x22145a0a0a280a50), + I64(0x4f7f50b1b1feb1e1), I64(0x1a5dc9a0a0baa069), I64(0xdad6146b6bb16b7f), I64(0xab17d985852e855c), + I64(0x73673cbdbdcebd81), I64(0x34ba8f5d5d695dd2), I64(0x5020901010401080), I64(0x03f507f4f4f7f4f3), + I64(0xc08bddcbcb0bcb16), I64(0xc67cd33e3ef83eed), I64(0x110a2d0505140528), I64(0xe6ce78676781671f), + I64(0x53d597e4e4b7e473), I64(0xbb4e0227279c2725), I64(0x5882734141194132), I64(0x9d0ba78b8b168b2c), + I64(0x0153f6a7a7a6a751), I64(0x94fab27d7de97dcf), I64(0xfb374995956e95dc), I64(0x9fad56d8d847d88e), + I64(0x30eb70fbfbcbfb8b), I64(0x71c1cdeeee9fee23), I64(0x91f8bb7c7ced7cc7), I64(0xe3cc716666856617), + I64(0x8ea77bdddd53dda6), I64(0x4b2eaf17175c17b8), I64(0x468e454747014702), I64(0xdc211a9e9e429e84), + I64(0xc589d4caca0fca1e), I64(0x995a582d2db42d75), I64(0x79632ebfbfc6bf91), I64(0x1b0e3f07071c0738), + I64(0x2347acadad8ead01), I64(0x2fb4b05a5a755aea), I64(0xb51bef838336836c), I64(0xff66b63333cc3385), + I64(0xf2c65c636391633f), I64(0x0a04120202080210), I64(0x384993aaaa92aa39), I64(0xa8e2de7171d971af), + I64(0xcf8dc6c8c807c80e), I64(0x7d32d119196419c8), I64(0x70923b4949394972), I64(0x9aaf5fd9d943d986), + I64(0x1df931f2f2eff2c3), I64(0x48dba8e3e3abe34b), I64(0x2ab6b95b5b715be2), I64(0x920dbc88881a8834), + I64(0xc8293e9a9a529aa4), I64(0xbe4c0b262698262d), I64(0xfa64bf3232c8328d), I64(0x4a7d59b0b0fab0e9), + I64(0x6acff2e9e983e91b), I64(0x331e770f0f3c0f78), I64(0xa6b733d5d573d5e6), I64(0xba1df480803a8074), + I64(0x7c6127bebec2be99), I64(0xde87ebcdcd13cd26), I64(0xe468893434d034bd), I64(0x75903248483d487a), + I64(0x24e354ffffdbffab), I64(0x8ff48d7a7af57af7), I64(0xea3d6490907a90f4), I64(0x3ebe9d5f5f615fc2), + I64(0xa0403d202080201d), I64(0xd5d00f6868bd6867), I64(0x7234ca1a1a681ad0), I64(0x2c41b7aeae82ae19), + I64(0x5e757db4b4eab4c9), I64(0x19a8ce54544d549a), I64(0xe53b7f93937693ec), I64(0xaa442f222288220d), + I64(0xe9c86364648d6407), I64(0x12ff2af1f1e3f1db), I64(0xa2e6cc7373d173bf), I64(0x5a24821212481290), + I64(0x5d807a40401d403a), I64(0x2810480808200840), I64(0xe89b95c3c32bc356), I64(0x7bc5dfecec97ec33), + I64(0x90ab4ddbdb4bdb96), I64(0x1f5fc0a1a1bea161), I64(0x8307918d8d0e8d1c), I64(0xc97ac83d3df43df5), + I64(0xf1335b97976697cc), I64(0x0000000000000000), I64(0xd483f9cfcf1bcf36), I64(0x87566e2b2bac2b45), + I64(0xb3ece17676c57697), I64(0xb019e68282328264), I64(0xa9b128d6d67fd6fe), I64(0x7736c31b1b6c1bd8), + I64(0x5b7774b5b5eeb5c1), I64(0x2943beafaf86af11), I64(0xdfd41d6a6ab56a77), I64(0x0da0ea50505d50ba), + I64(0x4c8a574545094512), I64(0x18fb38f3f3ebf3cb), I64(0xf060ad3030c0309d), I64(0x74c3c4efef9bef2b), + I64(0xc37eda3f3ffc3fe5), I64(0x1caac75555495592), I64(0x1059dba2a2b2a279), I64(0x65c9e9eaea8fea03), + I64(0xecca6a656589650f), I64(0x686903babad2bab9), I64(0x935e4a2f2fbc2f65), I64(0xe79d8ec0c027c04e), + I64(0x81a160dede5fdebe), I64(0x6c38fc1c1c701ce0), I64(0x2ee746fdfdd3fdbb), I64(0x649a1f4d4d294d52), + I64(0xe0397692927292e4), I64(0xbceafa7575c9758f), I64(0x1e0c360606180630), I64(0x9809ae8a8a128a24), + I64(0x40794bb2b2f2b2f9), I64(0x59d185e6e6bfe663), I64(0x361c7e0e0e380e70), I64(0x633ee71f1f7c1ff8), + I64(0xf7c4556262956237), I64(0xa3b53ad4d477d4ee), I64(0x324d81a8a89aa829), I64(0xf4315296966296c4), + I64(0x3aef62f9f9c3f99b), I64(0xf697a3c5c533c566), I64(0xb14a102525942535), I64(0x20b2ab59597959f2), + I64(0xae15d084842a8454), I64(0xa7e4c57272d572b7), I64(0xdd72ec3939e439d5), I64(0x6198164c4c2d4c5a), + I64(0x3bbc945e5e655eca), I64(0x85f09f7878fd78e7), I64(0xd870e53838e038dd), I64(0x8605988c8c0a8c14), + I64(0xb2bf17d1d163d1c6), I64(0x0b57e4a5a5aea541), I64(0x4dd9a1e2e2afe243), I64(0xf8c24e616199612f), + I64(0x457b42b3b3f6b3f1), I64(0xa542342121842115), I64(0xd625089c9c4a9c94), I64(0x663cee1e1e781ef0), + I64(0x5286614343114322), I64(0xfc93b1c7c73bc776), I64(0x2be54ffcfcd7fcb3), I64(0x1408240404100420), + I64(0x08a2e351515951b2), I64(0xc72f2599995e99bc), I64(0xc4da226d6da96d4f), I64(0x391a650d0d340d68), + I64(0x35e979fafacffa83), I64(0x84a369dfdf5bdfb6), I64(0x9bfca97e7ee57ed7), I64(0xb44819242490243d), + I64(0xd776fe3b3bec3bc5), I64(0x3d4b9aabab96ab31), I64(0xd181f0cece1fce3e), I64(0x5522991111441188), + I64(0x8903838f8f068f0c), I64(0x6b9c044e4e254e4a), I64(0x517366b7b7e6b7d1), I64(0x60cbe0ebeb8beb0b), + I64(0xcc78c13c3cf03cfd), I64(0xbf1ffd81813e817c), I64(0xfe354094946a94d4), I64(0x0cf31cf7f7fbf7eb), + I64(0x676f18b9b9deb9a1), I64(0x5f268b13134c1398), I64(0x9c58512c2cb02c7d), I64(0xb8bb05d3d36bd3d6), + I64(0x5cd38ce7e7bbe76b), I64(0xcbdc396e6ea56e57), I64(0xf395aac4c437c46e), I64(0x0f061b03030c0318), + I64(0x13acdc565645568a), I64(0x49885e44440d441a), I64(0x9efea07f7fe17fdf), I64(0x374f88a9a99ea921), + I64(0x8254672a2aa82a4d), I64(0x6d6b0abbbbd6bbb1), I64(0xe29f87c1c123c146), I64(0x02a6f153535153a2), + I64(0x8ba572dcdc57dcae), I64(0x2716530b0b2c0b58), I64(0xd327019d9d4e9d9c), I64(0xc1d82b6c6cad6c47), + I64(0xf562a43131c43195), I64(0xb9e8f37474cd7487), I64(0x09f115f6f6fff6e3), I64(0x438c4c464605460a), + I64(0x2645a5acac8aac09), I64(0x970fb589891e893c), I64(0x4428b414145014a0), I64(0x42dfbae1e1a3e15b), + I64(0x4e2ca616165816b0), I64(0xd274f73a3ae83acd), I64(0xd0d2066969b9696f), I64(0x2d12410909240948), + I64(0xade0d77070dd70a7), I64(0x54716fb6b6e2b6d9), I64(0xb7bd1ed0d067d0ce), I64(0x7ec7d6eded93ed3b), + I64(0xdb85e2cccc17cc2e), I64(0x578468424215422a), I64(0xc22d2c98985a98b4), I64(0x0e55eda4a4aaa449), + I64(0x8850752828a0285d), I64(0x31b8865c5c6d5cda), I64(0x3fed6bf8f8c7f893), I64(0xa411c28686228644), + }, { + // C4 vectors + I64(0xc07830d818186018), I64(0x05af462623238c23), I64(0x7ef991b8c6c63fc6), I64(0x136fcdfbe8e887e8), + I64(0x4ca113cb87872687), I64(0xa9626d11b8b8dab8), I64(0x0805020901010401), I64(0x426e9e0d4f4f214f), + I64(0xadee6c9b3636d836), I64(0x590451ffa6a6a2a6), I64(0xdebdb90cd2d26fd2), I64(0xfb06f70ef5f5f3f5), + I64(0xef80f2967979f979), I64(0x5fcede306f6fa16f), I64(0xfcef3f6d91917e91), I64(0xaa07a4f852525552), + I64(0x27fdc04760609d60), I64(0x89766535bcbccabc), I64(0xaccd2b379b9b569b), I64(0x048c018a8e8e028e), + I64(0x71155bd2a3a3b6a3), I64(0x603c186c0c0c300c), I64(0xff8af6847b7bf17b), I64(0xb5e16a803535d435), + I64(0xe8693af51d1d741d), I64(0x5347ddb3e0e0a7e0), I64(0xf6acb321d7d77bd7), I64(0x5eed999cc2c22fc2), + I64(0x6d965c432e2eb82e), I64(0x627a96294b4b314b), I64(0xa321e15dfefedffe), I64(0x8216aed557574157), + I64(0xa8412abd15155415), I64(0x9fb6eee87777c177), I64(0xa5eb6e923737dc37), I64(0x7b56d79ee5e5b3e5), + I64(0x8cd923139f9f469f), I64(0xd317fd23f0f0e7f0), I64(0x6a7f94204a4a354a), I64(0x9e95a944dada4fda), + I64(0xfa25b0a258587d58), I64(0x06ca8fcfc9c903c9), I64(0x558d527c2929a429), I64(0x5022145a0a0a280a), + I64(0xe14f7f50b1b1feb1), I64(0x691a5dc9a0a0baa0), I64(0x7fdad6146b6bb16b), I64(0x5cab17d985852e85), + I64(0x8173673cbdbdcebd), I64(0xd234ba8f5d5d695d), I64(0x8050209010104010), I64(0xf303f507f4f4f7f4), + I64(0x16c08bddcbcb0bcb), I64(0xedc67cd33e3ef83e), I64(0x28110a2d05051405), I64(0x1fe6ce7867678167), + I64(0x7353d597e4e4b7e4), I64(0x25bb4e0227279c27), I64(0x3258827341411941), I64(0x2c9d0ba78b8b168b), + I64(0x510153f6a7a7a6a7), I64(0xcf94fab27d7de97d), I64(0xdcfb374995956e95), I64(0x8e9fad56d8d847d8), + I64(0x8b30eb70fbfbcbfb), I64(0x2371c1cdeeee9fee), I64(0xc791f8bb7c7ced7c), I64(0x17e3cc7166668566), + I64(0xa68ea77bdddd53dd), I64(0xb84b2eaf17175c17), I64(0x02468e4547470147), I64(0x84dc211a9e9e429e), + I64(0x1ec589d4caca0fca), I64(0x75995a582d2db42d), I64(0x9179632ebfbfc6bf), I64(0x381b0e3f07071c07), + I64(0x012347acadad8ead), I64(0xea2fb4b05a5a755a), I64(0x6cb51bef83833683), I64(0x85ff66b63333cc33), + I64(0x3ff2c65c63639163), I64(0x100a041202020802), I64(0x39384993aaaa92aa), I64(0xafa8e2de7171d971), + I64(0x0ecf8dc6c8c807c8), I64(0xc87d32d119196419), I64(0x7270923b49493949), I64(0x869aaf5fd9d943d9), + I64(0xc31df931f2f2eff2), I64(0x4b48dba8e3e3abe3), I64(0xe22ab6b95b5b715b), I64(0x34920dbc88881a88), + I64(0xa4c8293e9a9a529a), I64(0x2dbe4c0b26269826), I64(0x8dfa64bf3232c832), I64(0xe94a7d59b0b0fab0), + I64(0x1b6acff2e9e983e9), I64(0x78331e770f0f3c0f), I64(0xe6a6b733d5d573d5), I64(0x74ba1df480803a80), + I64(0x997c6127bebec2be), I64(0x26de87ebcdcd13cd), I64(0xbde468893434d034), I64(0x7a75903248483d48), + I64(0xab24e354ffffdbff), I64(0xf78ff48d7a7af57a), I64(0xf4ea3d6490907a90), I64(0xc23ebe9d5f5f615f), + I64(0x1da0403d20208020), I64(0x67d5d00f6868bd68), I64(0xd07234ca1a1a681a), I64(0x192c41b7aeae82ae), + I64(0xc95e757db4b4eab4), I64(0x9a19a8ce54544d54), I64(0xece53b7f93937693), I64(0x0daa442f22228822), + I64(0x07e9c86364648d64), I64(0xdb12ff2af1f1e3f1), I64(0xbfa2e6cc7373d173), I64(0x905a248212124812), + I64(0x3a5d807a40401d40), I64(0x4028104808082008), I64(0x56e89b95c3c32bc3), I64(0x337bc5dfecec97ec), + I64(0x9690ab4ddbdb4bdb), I64(0x611f5fc0a1a1bea1), I64(0x1c8307918d8d0e8d), I64(0xf5c97ac83d3df43d), + I64(0xccf1335b97976697), I64(0x0000000000000000), I64(0x36d483f9cfcf1bcf), I64(0x4587566e2b2bac2b), + I64(0x97b3ece17676c576), I64(0x64b019e682823282), I64(0xfea9b128d6d67fd6), I64(0xd87736c31b1b6c1b), + I64(0xc15b7774b5b5eeb5), I64(0x112943beafaf86af), I64(0x77dfd41d6a6ab56a), I64(0xba0da0ea50505d50), + I64(0x124c8a5745450945), I64(0xcb18fb38f3f3ebf3), I64(0x9df060ad3030c030), I64(0x2b74c3c4efef9bef), + I64(0xe5c37eda3f3ffc3f), I64(0x921caac755554955), I64(0x791059dba2a2b2a2), I64(0x0365c9e9eaea8fea), + I64(0x0fecca6a65658965), I64(0xb9686903babad2ba), I64(0x65935e4a2f2fbc2f), I64(0x4ee79d8ec0c027c0), + I64(0xbe81a160dede5fde), I64(0xe06c38fc1c1c701c), I64(0xbb2ee746fdfdd3fd), I64(0x52649a1f4d4d294d), + I64(0xe4e0397692927292), I64(0x8fbceafa7575c975), I64(0x301e0c3606061806), I64(0x249809ae8a8a128a), + I64(0xf940794bb2b2f2b2), I64(0x6359d185e6e6bfe6), I64(0x70361c7e0e0e380e), I64(0xf8633ee71f1f7c1f), + I64(0x37f7c45562629562), I64(0xeea3b53ad4d477d4), I64(0x29324d81a8a89aa8), I64(0xc4f4315296966296), + I64(0x9b3aef62f9f9c3f9), I64(0x66f697a3c5c533c5), I64(0x35b14a1025259425), I64(0xf220b2ab59597959), + I64(0x54ae15d084842a84), I64(0xb7a7e4c57272d572), I64(0xd5dd72ec3939e439), I64(0x5a6198164c4c2d4c), + I64(0xca3bbc945e5e655e), I64(0xe785f09f7878fd78), I64(0xddd870e53838e038), I64(0x148605988c8c0a8c), + I64(0xc6b2bf17d1d163d1), I64(0x410b57e4a5a5aea5), I64(0x434dd9a1e2e2afe2), I64(0x2ff8c24e61619961), + I64(0xf1457b42b3b3f6b3), I64(0x15a5423421218421), I64(0x94d625089c9c4a9c), I64(0xf0663cee1e1e781e), + I64(0x2252866143431143), I64(0x76fc93b1c7c73bc7), I64(0xb32be54ffcfcd7fc), I64(0x2014082404041004), + I64(0xb208a2e351515951), I64(0xbcc72f2599995e99), I64(0x4fc4da226d6da96d), I64(0x68391a650d0d340d), + I64(0x8335e979fafacffa), I64(0xb684a369dfdf5bdf), I64(0xd79bfca97e7ee57e), I64(0x3db4481924249024), + I64(0xc5d776fe3b3bec3b), I64(0x313d4b9aabab96ab), I64(0x3ed181f0cece1fce), I64(0x8855229911114411), + I64(0x0c8903838f8f068f), I64(0x4a6b9c044e4e254e), I64(0xd1517366b7b7e6b7), I64(0x0b60cbe0ebeb8beb), + I64(0xfdcc78c13c3cf03c), I64(0x7cbf1ffd81813e81), I64(0xd4fe354094946a94), I64(0xeb0cf31cf7f7fbf7), + I64(0xa1676f18b9b9deb9), I64(0x985f268b13134c13), I64(0x7d9c58512c2cb02c), I64(0xd6b8bb05d3d36bd3), + I64(0x6b5cd38ce7e7bbe7), I64(0x57cbdc396e6ea56e), I64(0x6ef395aac4c437c4), I64(0x180f061b03030c03), + I64(0x8a13acdc56564556), I64(0x1a49885e44440d44), I64(0xdf9efea07f7fe17f), I64(0x21374f88a9a99ea9), + I64(0x4d8254672a2aa82a), I64(0xb16d6b0abbbbd6bb), I64(0x46e29f87c1c123c1), I64(0xa202a6f153535153), + I64(0xae8ba572dcdc57dc), I64(0x582716530b0b2c0b), I64(0x9cd327019d9d4e9d), I64(0x47c1d82b6c6cad6c), + I64(0x95f562a43131c431), I64(0x87b9e8f37474cd74), I64(0xe309f115f6f6fff6), I64(0x0a438c4c46460546), + I64(0x092645a5acac8aac), I64(0x3c970fb589891e89), I64(0xa04428b414145014), I64(0x5b42dfbae1e1a3e1), + I64(0xb04e2ca616165816), I64(0xcdd274f73a3ae83a), I64(0x6fd0d2066969b969), I64(0x482d124109092409), + I64(0xa7ade0d77070dd70), I64(0xd954716fb6b6e2b6), I64(0xceb7bd1ed0d067d0), I64(0x3b7ec7d6eded93ed), + I64(0x2edb85e2cccc17cc), I64(0x2a57846842421542), I64(0xb4c22d2c98985a98), I64(0x490e55eda4a4aaa4), + I64(0x5d8850752828a028), I64(0xda31b8865c5c6d5c), I64(0x933fed6bf8f8c7f8), I64(0x44a411c286862286), + }, { + // C5 vectors + I64(0x18c07830d8181860), I64(0x2305af462623238c), I64(0xc67ef991b8c6c63f), I64(0xe8136fcdfbe8e887), + I64(0x874ca113cb878726), I64(0xb8a9626d11b8b8da), I64(0x0108050209010104), I64(0x4f426e9e0d4f4f21), + I64(0x36adee6c9b3636d8), I64(0xa6590451ffa6a6a2), I64(0xd2debdb90cd2d26f), I64(0xf5fb06f70ef5f5f3), + I64(0x79ef80f2967979f9), I64(0x6f5fcede306f6fa1), I64(0x91fcef3f6d91917e), I64(0x52aa07a4f8525255), + I64(0x6027fdc04760609d), I64(0xbc89766535bcbcca), I64(0x9baccd2b379b9b56), I64(0x8e048c018a8e8e02), + I64(0xa371155bd2a3a3b6), I64(0x0c603c186c0c0c30), I64(0x7bff8af6847b7bf1), I64(0x35b5e16a803535d4), + I64(0x1de8693af51d1d74), I64(0xe05347ddb3e0e0a7), I64(0xd7f6acb321d7d77b), I64(0xc25eed999cc2c22f), + I64(0x2e6d965c432e2eb8), I64(0x4b627a96294b4b31), I64(0xfea321e15dfefedf), I64(0x578216aed5575741), + I64(0x15a8412abd151554), I64(0x779fb6eee87777c1), I64(0x37a5eb6e923737dc), I64(0xe57b56d79ee5e5b3), + I64(0x9f8cd923139f9f46), I64(0xf0d317fd23f0f0e7), I64(0x4a6a7f94204a4a35), I64(0xda9e95a944dada4f), + I64(0x58fa25b0a258587d), I64(0xc906ca8fcfc9c903), I64(0x29558d527c2929a4), I64(0x0a5022145a0a0a28), + I64(0xb1e14f7f50b1b1fe), I64(0xa0691a5dc9a0a0ba), I64(0x6b7fdad6146b6bb1), I64(0x855cab17d985852e), + I64(0xbd8173673cbdbdce), I64(0x5dd234ba8f5d5d69), I64(0x1080502090101040), I64(0xf4f303f507f4f4f7), + I64(0xcb16c08bddcbcb0b), I64(0x3eedc67cd33e3ef8), I64(0x0528110a2d050514), I64(0x671fe6ce78676781), + I64(0xe47353d597e4e4b7), I64(0x2725bb4e0227279c), I64(0x4132588273414119), I64(0x8b2c9d0ba78b8b16), + I64(0xa7510153f6a7a7a6), I64(0x7dcf94fab27d7de9), I64(0x95dcfb374995956e), I64(0xd88e9fad56d8d847), + I64(0xfb8b30eb70fbfbcb), I64(0xee2371c1cdeeee9f), I64(0x7cc791f8bb7c7ced), I64(0x6617e3cc71666685), + I64(0xdda68ea77bdddd53), I64(0x17b84b2eaf17175c), I64(0x4702468e45474701), I64(0x9e84dc211a9e9e42), + I64(0xca1ec589d4caca0f), I64(0x2d75995a582d2db4), I64(0xbf9179632ebfbfc6), I64(0x07381b0e3f07071c), + I64(0xad012347acadad8e), I64(0x5aea2fb4b05a5a75), I64(0x836cb51bef838336), I64(0x3385ff66b63333cc), + I64(0x633ff2c65c636391), I64(0x02100a0412020208), I64(0xaa39384993aaaa92), I64(0x71afa8e2de7171d9), + I64(0xc80ecf8dc6c8c807), I64(0x19c87d32d1191964), I64(0x497270923b494939), I64(0xd9869aaf5fd9d943), + I64(0xf2c31df931f2f2ef), I64(0xe34b48dba8e3e3ab), I64(0x5be22ab6b95b5b71), I64(0x8834920dbc88881a), + I64(0x9aa4c8293e9a9a52), I64(0x262dbe4c0b262698), I64(0x328dfa64bf3232c8), I64(0xb0e94a7d59b0b0fa), + I64(0xe91b6acff2e9e983), I64(0x0f78331e770f0f3c), I64(0xd5e6a6b733d5d573), I64(0x8074ba1df480803a), + I64(0xbe997c6127bebec2), I64(0xcd26de87ebcdcd13), I64(0x34bde468893434d0), I64(0x487a75903248483d), + I64(0xffab24e354ffffdb), I64(0x7af78ff48d7a7af5), I64(0x90f4ea3d6490907a), I64(0x5fc23ebe9d5f5f61), + I64(0x201da0403d202080), I64(0x6867d5d00f6868bd), I64(0x1ad07234ca1a1a68), I64(0xae192c41b7aeae82), + I64(0xb4c95e757db4b4ea), I64(0x549a19a8ce54544d), I64(0x93ece53b7f939376), I64(0x220daa442f222288), + I64(0x6407e9c86364648d), I64(0xf1db12ff2af1f1e3), I64(0x73bfa2e6cc7373d1), I64(0x12905a2482121248), + I64(0x403a5d807a40401d), I64(0x0840281048080820), I64(0xc356e89b95c3c32b), I64(0xec337bc5dfecec97), + I64(0xdb9690ab4ddbdb4b), I64(0xa1611f5fc0a1a1be), I64(0x8d1c8307918d8d0e), I64(0x3df5c97ac83d3df4), + I64(0x97ccf1335b979766), I64(0x0000000000000000), I64(0xcf36d483f9cfcf1b), I64(0x2b4587566e2b2bac), + I64(0x7697b3ece17676c5), I64(0x8264b019e6828232), I64(0xd6fea9b128d6d67f), I64(0x1bd87736c31b1b6c), + I64(0xb5c15b7774b5b5ee), I64(0xaf112943beafaf86), I64(0x6a77dfd41d6a6ab5), I64(0x50ba0da0ea50505d), + I64(0x45124c8a57454509), I64(0xf3cb18fb38f3f3eb), I64(0x309df060ad3030c0), I64(0xef2b74c3c4efef9b), + I64(0x3fe5c37eda3f3ffc), I64(0x55921caac7555549), I64(0xa2791059dba2a2b2), I64(0xea0365c9e9eaea8f), + I64(0x650fecca6a656589), I64(0xbab9686903babad2), I64(0x2f65935e4a2f2fbc), I64(0xc04ee79d8ec0c027), + I64(0xdebe81a160dede5f), I64(0x1ce06c38fc1c1c70), I64(0xfdbb2ee746fdfdd3), I64(0x4d52649a1f4d4d29), + I64(0x92e4e03976929272), I64(0x758fbceafa7575c9), I64(0x06301e0c36060618), I64(0x8a249809ae8a8a12), + I64(0xb2f940794bb2b2f2), I64(0xe66359d185e6e6bf), I64(0x0e70361c7e0e0e38), I64(0x1ff8633ee71f1f7c), + I64(0x6237f7c455626295), I64(0xd4eea3b53ad4d477), I64(0xa829324d81a8a89a), I64(0x96c4f43152969662), + I64(0xf99b3aef62f9f9c3), I64(0xc566f697a3c5c533), I64(0x2535b14a10252594), I64(0x59f220b2ab595979), + I64(0x8454ae15d084842a), I64(0x72b7a7e4c57272d5), I64(0x39d5dd72ec3939e4), I64(0x4c5a6198164c4c2d), + I64(0x5eca3bbc945e5e65), I64(0x78e785f09f7878fd), I64(0x38ddd870e53838e0), I64(0x8c148605988c8c0a), + I64(0xd1c6b2bf17d1d163), I64(0xa5410b57e4a5a5ae), I64(0xe2434dd9a1e2e2af), I64(0x612ff8c24e616199), + I64(0xb3f1457b42b3b3f6), I64(0x2115a54234212184), I64(0x9c94d625089c9c4a), I64(0x1ef0663cee1e1e78), + I64(0x4322528661434311), I64(0xc776fc93b1c7c73b), I64(0xfcb32be54ffcfcd7), I64(0x0420140824040410), + I64(0x51b208a2e3515159), I64(0x99bcc72f2599995e), I64(0x6d4fc4da226d6da9), I64(0x0d68391a650d0d34), + I64(0xfa8335e979fafacf), I64(0xdfb684a369dfdf5b), I64(0x7ed79bfca97e7ee5), I64(0x243db44819242490), + I64(0x3bc5d776fe3b3bec), I64(0xab313d4b9aabab96), I64(0xce3ed181f0cece1f), I64(0x1188552299111144), + I64(0x8f0c8903838f8f06), I64(0x4e4a6b9c044e4e25), I64(0xb7d1517366b7b7e6), I64(0xeb0b60cbe0ebeb8b), + I64(0x3cfdcc78c13c3cf0), I64(0x817cbf1ffd81813e), I64(0x94d4fe354094946a), I64(0xf7eb0cf31cf7f7fb), + I64(0xb9a1676f18b9b9de), I64(0x13985f268b13134c), I64(0x2c7d9c58512c2cb0), I64(0xd3d6b8bb05d3d36b), + I64(0xe76b5cd38ce7e7bb), I64(0x6e57cbdc396e6ea5), I64(0xc46ef395aac4c437), I64(0x03180f061b03030c), + I64(0x568a13acdc565645), I64(0x441a49885e44440d), I64(0x7fdf9efea07f7fe1), I64(0xa921374f88a9a99e), + I64(0x2a4d8254672a2aa8), I64(0xbbb16d6b0abbbbd6), I64(0xc146e29f87c1c123), I64(0x53a202a6f1535351), + I64(0xdcae8ba572dcdc57), I64(0x0b582716530b0b2c), I64(0x9d9cd327019d9d4e), I64(0x6c47c1d82b6c6cad), + I64(0x3195f562a43131c4), I64(0x7487b9e8f37474cd), I64(0xf6e309f115f6f6ff), I64(0x460a438c4c464605), + I64(0xac092645a5acac8a), I64(0x893c970fb589891e), I64(0x14a04428b4141450), I64(0xe15b42dfbae1e1a3), + I64(0x16b04e2ca6161658), I64(0x3acdd274f73a3ae8), I64(0x696fd0d2066969b9), I64(0x09482d1241090924), + I64(0x70a7ade0d77070dd), I64(0xb6d954716fb6b6e2), I64(0xd0ceb7bd1ed0d067), I64(0xed3b7ec7d6eded93), + I64(0xcc2edb85e2cccc17), I64(0x422a578468424215), I64(0x98b4c22d2c98985a), I64(0xa4490e55eda4a4aa), + I64(0x285d8850752828a0), I64(0x5cda31b8865c5c6d), I64(0xf8933fed6bf8f8c7), I64(0x8644a411c2868622), + }, { + // C6 vectors + I64(0x6018c07830d81818), I64(0x8c2305af46262323), I64(0x3fc67ef991b8c6c6), I64(0x87e8136fcdfbe8e8), + I64(0x26874ca113cb8787), I64(0xdab8a9626d11b8b8), I64(0x0401080502090101), I64(0x214f426e9e0d4f4f), + I64(0xd836adee6c9b3636), I64(0xa2a6590451ffa6a6), I64(0x6fd2debdb90cd2d2), I64(0xf3f5fb06f70ef5f5), + I64(0xf979ef80f2967979), I64(0xa16f5fcede306f6f), I64(0x7e91fcef3f6d9191), I64(0x5552aa07a4f85252), + I64(0x9d6027fdc0476060), I64(0xcabc89766535bcbc), I64(0x569baccd2b379b9b), I64(0x028e048c018a8e8e), + I64(0xb6a371155bd2a3a3), I64(0x300c603c186c0c0c), I64(0xf17bff8af6847b7b), I64(0xd435b5e16a803535), + I64(0x741de8693af51d1d), I64(0xa7e05347ddb3e0e0), I64(0x7bd7f6acb321d7d7), I64(0x2fc25eed999cc2c2), + I64(0xb82e6d965c432e2e), I64(0x314b627a96294b4b), I64(0xdffea321e15dfefe), I64(0x41578216aed55757), + I64(0x5415a8412abd1515), I64(0xc1779fb6eee87777), I64(0xdc37a5eb6e923737), I64(0xb3e57b56d79ee5e5), + I64(0x469f8cd923139f9f), I64(0xe7f0d317fd23f0f0), I64(0x354a6a7f94204a4a), I64(0x4fda9e95a944dada), + I64(0x7d58fa25b0a25858), I64(0x03c906ca8fcfc9c9), I64(0xa429558d527c2929), I64(0x280a5022145a0a0a), + I64(0xfeb1e14f7f50b1b1), I64(0xbaa0691a5dc9a0a0), I64(0xb16b7fdad6146b6b), I64(0x2e855cab17d98585), + I64(0xcebd8173673cbdbd), I64(0x695dd234ba8f5d5d), I64(0x4010805020901010), I64(0xf7f4f303f507f4f4), + I64(0x0bcb16c08bddcbcb), I64(0xf83eedc67cd33e3e), I64(0x140528110a2d0505), I64(0x81671fe6ce786767), + I64(0xb7e47353d597e4e4), I64(0x9c2725bb4e022727), I64(0x1941325882734141), I64(0x168b2c9d0ba78b8b), + I64(0xa6a7510153f6a7a7), I64(0xe97dcf94fab27d7d), I64(0x6e95dcfb37499595), I64(0x47d88e9fad56d8d8), + I64(0xcbfb8b30eb70fbfb), I64(0x9fee2371c1cdeeee), I64(0xed7cc791f8bb7c7c), I64(0x856617e3cc716666), + I64(0x53dda68ea77bdddd), I64(0x5c17b84b2eaf1717), I64(0x014702468e454747), I64(0x429e84dc211a9e9e), + I64(0x0fca1ec589d4caca), I64(0xb42d75995a582d2d), I64(0xc6bf9179632ebfbf), I64(0x1c07381b0e3f0707), + I64(0x8ead012347acadad), I64(0x755aea2fb4b05a5a), I64(0x36836cb51bef8383), I64(0xcc3385ff66b63333), + I64(0x91633ff2c65c6363), I64(0x0802100a04120202), I64(0x92aa39384993aaaa), I64(0xd971afa8e2de7171), + I64(0x07c80ecf8dc6c8c8), I64(0x6419c87d32d11919), I64(0x39497270923b4949), I64(0x43d9869aaf5fd9d9), + I64(0xeff2c31df931f2f2), I64(0xabe34b48dba8e3e3), I64(0x715be22ab6b95b5b), I64(0x1a8834920dbc8888), + I64(0x529aa4c8293e9a9a), I64(0x98262dbe4c0b2626), I64(0xc8328dfa64bf3232), I64(0xfab0e94a7d59b0b0), + I64(0x83e91b6acff2e9e9), I64(0x3c0f78331e770f0f), I64(0x73d5e6a6b733d5d5), I64(0x3a8074ba1df48080), + I64(0xc2be997c6127bebe), I64(0x13cd26de87ebcdcd), I64(0xd034bde468893434), I64(0x3d487a7590324848), + I64(0xdbffab24e354ffff), I64(0xf57af78ff48d7a7a), I64(0x7a90f4ea3d649090), I64(0x615fc23ebe9d5f5f), + I64(0x80201da0403d2020), I64(0xbd6867d5d00f6868), I64(0x681ad07234ca1a1a), I64(0x82ae192c41b7aeae), + I64(0xeab4c95e757db4b4), I64(0x4d549a19a8ce5454), I64(0x7693ece53b7f9393), I64(0x88220daa442f2222), + I64(0x8d6407e9c8636464), I64(0xe3f1db12ff2af1f1), I64(0xd173bfa2e6cc7373), I64(0x4812905a24821212), + I64(0x1d403a5d807a4040), I64(0x2008402810480808), I64(0x2bc356e89b95c3c3), I64(0x97ec337bc5dfecec), + I64(0x4bdb9690ab4ddbdb), I64(0xbea1611f5fc0a1a1), I64(0x0e8d1c8307918d8d), I64(0xf43df5c97ac83d3d), + I64(0x6697ccf1335b9797), I64(0x0000000000000000), I64(0x1bcf36d483f9cfcf), I64(0xac2b4587566e2b2b), + I64(0xc57697b3ece17676), I64(0x328264b019e68282), I64(0x7fd6fea9b128d6d6), I64(0x6c1bd87736c31b1b), + I64(0xeeb5c15b7774b5b5), I64(0x86af112943beafaf), I64(0xb56a77dfd41d6a6a), I64(0x5d50ba0da0ea5050), + I64(0x0945124c8a574545), I64(0xebf3cb18fb38f3f3), I64(0xc0309df060ad3030), I64(0x9bef2b74c3c4efef), + I64(0xfc3fe5c37eda3f3f), I64(0x4955921caac75555), I64(0xb2a2791059dba2a2), I64(0x8fea0365c9e9eaea), + I64(0x89650fecca6a6565), I64(0xd2bab9686903baba), I64(0xbc2f65935e4a2f2f), I64(0x27c04ee79d8ec0c0), + I64(0x5fdebe81a160dede), I64(0x701ce06c38fc1c1c), I64(0xd3fdbb2ee746fdfd), I64(0x294d52649a1f4d4d), + I64(0x7292e4e039769292), I64(0xc9758fbceafa7575), I64(0x1806301e0c360606), I64(0x128a249809ae8a8a), + I64(0xf2b2f940794bb2b2), I64(0xbfe66359d185e6e6), I64(0x380e70361c7e0e0e), I64(0x7c1ff8633ee71f1f), + I64(0x956237f7c4556262), I64(0x77d4eea3b53ad4d4), I64(0x9aa829324d81a8a8), I64(0x6296c4f431529696), + I64(0xc3f99b3aef62f9f9), I64(0x33c566f697a3c5c5), I64(0x942535b14a102525), I64(0x7959f220b2ab5959), + I64(0x2a8454ae15d08484), I64(0xd572b7a7e4c57272), I64(0xe439d5dd72ec3939), I64(0x2d4c5a6198164c4c), + I64(0x655eca3bbc945e5e), I64(0xfd78e785f09f7878), I64(0xe038ddd870e53838), I64(0x0a8c148605988c8c), + I64(0x63d1c6b2bf17d1d1), I64(0xaea5410b57e4a5a5), I64(0xafe2434dd9a1e2e2), I64(0x99612ff8c24e6161), + I64(0xf6b3f1457b42b3b3), I64(0x842115a542342121), I64(0x4a9c94d625089c9c), I64(0x781ef0663cee1e1e), + I64(0x1143225286614343), I64(0x3bc776fc93b1c7c7), I64(0xd7fcb32be54ffcfc), I64(0x1004201408240404), + I64(0x5951b208a2e35151), I64(0x5e99bcc72f259999), I64(0xa96d4fc4da226d6d), I64(0x340d68391a650d0d), + I64(0xcffa8335e979fafa), I64(0x5bdfb684a369dfdf), I64(0xe57ed79bfca97e7e), I64(0x90243db448192424), + I64(0xec3bc5d776fe3b3b), I64(0x96ab313d4b9aabab), I64(0x1fce3ed181f0cece), I64(0x4411885522991111), + I64(0x068f0c8903838f8f), I64(0x254e4a6b9c044e4e), I64(0xe6b7d1517366b7b7), I64(0x8beb0b60cbe0ebeb), + I64(0xf03cfdcc78c13c3c), I64(0x3e817cbf1ffd8181), I64(0x6a94d4fe35409494), I64(0xfbf7eb0cf31cf7f7), + I64(0xdeb9a1676f18b9b9), I64(0x4c13985f268b1313), I64(0xb02c7d9c58512c2c), I64(0x6bd3d6b8bb05d3d3), + I64(0xbbe76b5cd38ce7e7), I64(0xa56e57cbdc396e6e), I64(0x37c46ef395aac4c4), I64(0x0c03180f061b0303), + I64(0x45568a13acdc5656), I64(0x0d441a49885e4444), I64(0xe17fdf9efea07f7f), I64(0x9ea921374f88a9a9), + I64(0xa82a4d8254672a2a), I64(0xd6bbb16d6b0abbbb), I64(0x23c146e29f87c1c1), I64(0x5153a202a6f15353), + I64(0x57dcae8ba572dcdc), I64(0x2c0b582716530b0b), I64(0x4e9d9cd327019d9d), I64(0xad6c47c1d82b6c6c), + I64(0xc43195f562a43131), I64(0xcd7487b9e8f37474), I64(0xfff6e309f115f6f6), I64(0x05460a438c4c4646), + I64(0x8aac092645a5acac), I64(0x1e893c970fb58989), I64(0x5014a04428b41414), I64(0xa3e15b42dfbae1e1), + I64(0x5816b04e2ca61616), I64(0xe83acdd274f73a3a), I64(0xb9696fd0d2066969), I64(0x2409482d12410909), + I64(0xdd70a7ade0d77070), I64(0xe2b6d954716fb6b6), I64(0x67d0ceb7bd1ed0d0), I64(0x93ed3b7ec7d6eded), + I64(0x17cc2edb85e2cccc), I64(0x15422a5784684242), I64(0x5a98b4c22d2c9898), I64(0xaaa4490e55eda4a4), + I64(0xa0285d8850752828), I64(0x6d5cda31b8865c5c), I64(0xc7f8933fed6bf8f8), I64(0x228644a411c28686), + }, { + // C7 vectors + I64(0x186018c07830d818), I64(0x238c2305af462623), I64(0xc63fc67ef991b8c6), I64(0xe887e8136fcdfbe8), + I64(0x8726874ca113cb87), I64(0xb8dab8a9626d11b8), I64(0x0104010805020901), I64(0x4f214f426e9e0d4f), + I64(0x36d836adee6c9b36), I64(0xa6a2a6590451ffa6), I64(0xd26fd2debdb90cd2), I64(0xf5f3f5fb06f70ef5), + I64(0x79f979ef80f29679), I64(0x6fa16f5fcede306f), I64(0x917e91fcef3f6d91), I64(0x525552aa07a4f852), + I64(0x609d6027fdc04760), I64(0xbccabc89766535bc), I64(0x9b569baccd2b379b), I64(0x8e028e048c018a8e), + I64(0xa3b6a371155bd2a3), I64(0x0c300c603c186c0c), I64(0x7bf17bff8af6847b), I64(0x35d435b5e16a8035), + I64(0x1d741de8693af51d), I64(0xe0a7e05347ddb3e0), I64(0xd77bd7f6acb321d7), I64(0xc22fc25eed999cc2), + I64(0x2eb82e6d965c432e), I64(0x4b314b627a96294b), I64(0xfedffea321e15dfe), I64(0x5741578216aed557), + I64(0x155415a8412abd15), I64(0x77c1779fb6eee877), I64(0x37dc37a5eb6e9237), I64(0xe5b3e57b56d79ee5), + I64(0x9f469f8cd923139f), I64(0xf0e7f0d317fd23f0), I64(0x4a354a6a7f94204a), I64(0xda4fda9e95a944da), + I64(0x587d58fa25b0a258), I64(0xc903c906ca8fcfc9), I64(0x29a429558d527c29), I64(0x0a280a5022145a0a), + I64(0xb1feb1e14f7f50b1), I64(0xa0baa0691a5dc9a0), I64(0x6bb16b7fdad6146b), I64(0x852e855cab17d985), + I64(0xbdcebd8173673cbd), I64(0x5d695dd234ba8f5d), I64(0x1040108050209010), I64(0xf4f7f4f303f507f4), + I64(0xcb0bcb16c08bddcb), I64(0x3ef83eedc67cd33e), I64(0x05140528110a2d05), I64(0x6781671fe6ce7867), + I64(0xe4b7e47353d597e4), I64(0x279c2725bb4e0227), I64(0x4119413258827341), I64(0x8b168b2c9d0ba78b), + I64(0xa7a6a7510153f6a7), I64(0x7de97dcf94fab27d), I64(0x956e95dcfb374995), I64(0xd847d88e9fad56d8), + I64(0xfbcbfb8b30eb70fb), I64(0xee9fee2371c1cdee), I64(0x7ced7cc791f8bb7c), I64(0x66856617e3cc7166), + I64(0xdd53dda68ea77bdd), I64(0x175c17b84b2eaf17), I64(0x47014702468e4547), I64(0x9e429e84dc211a9e), + I64(0xca0fca1ec589d4ca), I64(0x2db42d75995a582d), I64(0xbfc6bf9179632ebf), I64(0x071c07381b0e3f07), + I64(0xad8ead012347acad), I64(0x5a755aea2fb4b05a), I64(0x8336836cb51bef83), I64(0x33cc3385ff66b633), + I64(0x6391633ff2c65c63), I64(0x020802100a041202), I64(0xaa92aa39384993aa), I64(0x71d971afa8e2de71), + I64(0xc807c80ecf8dc6c8), I64(0x196419c87d32d119), I64(0x4939497270923b49), I64(0xd943d9869aaf5fd9), + I64(0xf2eff2c31df931f2), I64(0xe3abe34b48dba8e3), I64(0x5b715be22ab6b95b), I64(0x881a8834920dbc88), + I64(0x9a529aa4c8293e9a), I64(0x2698262dbe4c0b26), I64(0x32c8328dfa64bf32), I64(0xb0fab0e94a7d59b0), + I64(0xe983e91b6acff2e9), I64(0x0f3c0f78331e770f), I64(0xd573d5e6a6b733d5), I64(0x803a8074ba1df480), + I64(0xbec2be997c6127be), I64(0xcd13cd26de87ebcd), I64(0x34d034bde4688934), I64(0x483d487a75903248), + I64(0xffdbffab24e354ff), I64(0x7af57af78ff48d7a), I64(0x907a90f4ea3d6490), I64(0x5f615fc23ebe9d5f), + I64(0x2080201da0403d20), I64(0x68bd6867d5d00f68), I64(0x1a681ad07234ca1a), I64(0xae82ae192c41b7ae), + I64(0xb4eab4c95e757db4), I64(0x544d549a19a8ce54), I64(0x937693ece53b7f93), I64(0x2288220daa442f22), + I64(0x648d6407e9c86364), I64(0xf1e3f1db12ff2af1), I64(0x73d173bfa2e6cc73), I64(0x124812905a248212), + I64(0x401d403a5d807a40), I64(0x0820084028104808), I64(0xc32bc356e89b95c3), I64(0xec97ec337bc5dfec), + I64(0xdb4bdb9690ab4ddb), I64(0xa1bea1611f5fc0a1), I64(0x8d0e8d1c8307918d), I64(0x3df43df5c97ac83d), + I64(0x976697ccf1335b97), I64(0x0000000000000000), I64(0xcf1bcf36d483f9cf), I64(0x2bac2b4587566e2b), + I64(0x76c57697b3ece176), I64(0x82328264b019e682), I64(0xd67fd6fea9b128d6), I64(0x1b6c1bd87736c31b), + I64(0xb5eeb5c15b7774b5), I64(0xaf86af112943beaf), I64(0x6ab56a77dfd41d6a), I64(0x505d50ba0da0ea50), + I64(0x450945124c8a5745), I64(0xf3ebf3cb18fb38f3), I64(0x30c0309df060ad30), I64(0xef9bef2b74c3c4ef), + I64(0x3ffc3fe5c37eda3f), I64(0x554955921caac755), I64(0xa2b2a2791059dba2), I64(0xea8fea0365c9e9ea), + I64(0x6589650fecca6a65), I64(0xbad2bab9686903ba), I64(0x2fbc2f65935e4a2f), I64(0xc027c04ee79d8ec0), + I64(0xde5fdebe81a160de), I64(0x1c701ce06c38fc1c), I64(0xfdd3fdbb2ee746fd), I64(0x4d294d52649a1f4d), + I64(0x927292e4e0397692), I64(0x75c9758fbceafa75), I64(0x061806301e0c3606), I64(0x8a128a249809ae8a), + I64(0xb2f2b2f940794bb2), I64(0xe6bfe66359d185e6), I64(0x0e380e70361c7e0e), I64(0x1f7c1ff8633ee71f), + I64(0x62956237f7c45562), I64(0xd477d4eea3b53ad4), I64(0xa89aa829324d81a8), I64(0x966296c4f4315296), + I64(0xf9c3f99b3aef62f9), I64(0xc533c566f697a3c5), I64(0x25942535b14a1025), I64(0x597959f220b2ab59), + I64(0x842a8454ae15d084), I64(0x72d572b7a7e4c572), I64(0x39e439d5dd72ec39), I64(0x4c2d4c5a6198164c), + I64(0x5e655eca3bbc945e), I64(0x78fd78e785f09f78), I64(0x38e038ddd870e538), I64(0x8c0a8c148605988c), + I64(0xd163d1c6b2bf17d1), I64(0xa5aea5410b57e4a5), I64(0xe2afe2434dd9a1e2), I64(0x6199612ff8c24e61), + I64(0xb3f6b3f1457b42b3), I64(0x21842115a5423421), I64(0x9c4a9c94d625089c), I64(0x1e781ef0663cee1e), + I64(0x4311432252866143), I64(0xc73bc776fc93b1c7), I64(0xfcd7fcb32be54ffc), I64(0x0410042014082404), + I64(0x515951b208a2e351), I64(0x995e99bcc72f2599), I64(0x6da96d4fc4da226d), I64(0x0d340d68391a650d), + I64(0xfacffa8335e979fa), I64(0xdf5bdfb684a369df), I64(0x7ee57ed79bfca97e), I64(0x2490243db4481924), + I64(0x3bec3bc5d776fe3b), I64(0xab96ab313d4b9aab), I64(0xce1fce3ed181f0ce), I64(0x1144118855229911), + I64(0x8f068f0c8903838f), I64(0x4e254e4a6b9c044e), I64(0xb7e6b7d1517366b7), I64(0xeb8beb0b60cbe0eb), + I64(0x3cf03cfdcc78c13c), I64(0x813e817cbf1ffd81), I64(0x946a94d4fe354094), I64(0xf7fbf7eb0cf31cf7), + I64(0xb9deb9a1676f18b9), I64(0x134c13985f268b13), I64(0x2cb02c7d9c58512c), I64(0xd36bd3d6b8bb05d3), + I64(0xe7bbe76b5cd38ce7), I64(0x6ea56e57cbdc396e), I64(0xc437c46ef395aac4), I64(0x030c03180f061b03), + I64(0x5645568a13acdc56), I64(0x440d441a49885e44), I64(0x7fe17fdf9efea07f), I64(0xa99ea921374f88a9), + I64(0x2aa82a4d8254672a), I64(0xbbd6bbb16d6b0abb), I64(0xc123c146e29f87c1), I64(0x535153a202a6f153), + I64(0xdc57dcae8ba572dc), I64(0x0b2c0b582716530b), I64(0x9d4e9d9cd327019d), I64(0x6cad6c47c1d82b6c), + I64(0x31c43195f562a431), I64(0x74cd7487b9e8f374), I64(0xf6fff6e309f115f6), I64(0x4605460a438c4c46), + I64(0xac8aac092645a5ac), I64(0x891e893c970fb589), I64(0x145014a04428b414), I64(0xe1a3e15b42dfbae1), + I64(0x165816b04e2ca616), I64(0x3ae83acdd274f73a), I64(0x69b9696fd0d20669), I64(0x092409482d124109), + I64(0x70dd70a7ade0d770), I64(0xb6e2b6d954716fb6), I64(0xd067d0ceb7bd1ed0), I64(0xed93ed3b7ec7d6ed), + I64(0xcc17cc2edb85e2cc), I64(0x4215422a57846842), I64(0x985a98b4c22d2c98), I64(0xa4aaa4490e55eda4), + I64(0x28a0285d88507528), I64(0x5c6d5cda31b8865c), I64(0xf8c7f8933fed6bf8), I64(0x86228644a411c286), + } +}; +/* end of whirlpool_sbox array */ + +#define WHIRLPOOL_OP(src, shift) ( \ + rhash_whirlpool_sbox[0][(int)(src[ shift & 7] >> 56) ] ^ \ + rhash_whirlpool_sbox[1][(int)(src[(shift + 7) & 7] >> 48) & 0xff] ^ \ + rhash_whirlpool_sbox[2][(int)(src[(shift + 6) & 7] >> 40) & 0xff] ^ \ + rhash_whirlpool_sbox[3][(int)(src[(shift + 5) & 7] >> 32) & 0xff] ^ \ + rhash_whirlpool_sbox[4][(int)(src[(shift + 4) & 7] >> 24) & 0xff] ^ \ + rhash_whirlpool_sbox[5][(int)(src[(shift + 3) & 7] >> 16) & 0xff] ^ \ + rhash_whirlpool_sbox[6][(int)(src[(shift + 2) & 7] >> 8) & 0xff] ^ \ + rhash_whirlpool_sbox[7][(int)(src[(shift + 1) & 7] ) & 0xff]) + +/** + * The core transformation. Process a 512-bit block. + * + * @param hash algorithm state + * @param block the message block to process + */ +static void rhash_whirlpool_process_block(uint64_t *hash, uint64_t* p_block) +{ + int i; /* loop counter */ + uint64_t K[2][8]; /* key */ + uint64_t state[2][8]; /* state */ + + /* alternating binary flags */ + unsigned int m = 0; + + /* the number of rounds of the internal dedicated block cipher */ + const int number_of_rounds = 10; + + /* array used in the rounds */ + static const uint64_t rc[10] = { + I64(0x1823c6e887b8014f), + I64(0x36a6d2f5796f9152), + I64(0x60bc9b8ea30c7b35), + I64(0x1de0d7c22e4bfe57), + I64(0x157737e59ff04ada), + I64(0x58c9290ab1a06b85), + I64(0xbd5d10f4cb3e0567), + I64(0xe427418ba77d95d8), + I64(0xfbee7c66dd17479e), + I64(0xca2dbf07ad5a8333) + }; + + /* map the message buffer to a block */ + for (i = 0; i < 8; i++) { + /* store K^0 and xor it with the intermediate hash state */ + K[0][i] = hash[i]; + state[0][i] = be2me_64(p_block[i]) ^ hash[i]; + hash[i] = state[0][i]; + } + + /* iterate over algorithm rounds */ + for (i = 0; i < number_of_rounds; i++) + { + /* compute K^i from K^{i-1} */ + K[m ^ 1][0] = WHIRLPOOL_OP(K[m], 0) ^ rc[i]; + K[m ^ 1][1] = WHIRLPOOL_OP(K[m], 1); + K[m ^ 1][2] = WHIRLPOOL_OP(K[m], 2); + K[m ^ 1][3] = WHIRLPOOL_OP(K[m], 3); + K[m ^ 1][4] = WHIRLPOOL_OP(K[m], 4); + K[m ^ 1][5] = WHIRLPOOL_OP(K[m], 5); + K[m ^ 1][6] = WHIRLPOOL_OP(K[m], 6); + K[m ^ 1][7] = WHIRLPOOL_OP(K[m], 7); + + /* apply the i-th round transformation */ + state[m ^ 1][0] = WHIRLPOOL_OP(state[m], 0) ^ K[m ^ 1][0]; + state[m ^ 1][1] = WHIRLPOOL_OP(state[m], 1) ^ K[m ^ 1][1]; + state[m ^ 1][2] = WHIRLPOOL_OP(state[m], 2) ^ K[m ^ 1][2]; + state[m ^ 1][3] = WHIRLPOOL_OP(state[m], 3) ^ K[m ^ 1][3]; + state[m ^ 1][4] = WHIRLPOOL_OP(state[m], 4) ^ K[m ^ 1][4]; + state[m ^ 1][5] = WHIRLPOOL_OP(state[m], 5) ^ K[m ^ 1][5]; + state[m ^ 1][6] = WHIRLPOOL_OP(state[m], 6) ^ K[m ^ 1][6]; + state[m ^ 1][7] = WHIRLPOOL_OP(state[m], 7) ^ K[m ^ 1][7]; + + m = m ^ 1; + } + + /* apply the Miyaguchi-Preneel compression function */ + hash[0] ^= state[0][0]; + hash[1] ^= state[0][1]; + hash[2] ^= state[0][2]; + hash[3] ^= state[0][3]; + hash[4] ^= state[0][4]; + hash[5] ^= state[0][5]; + hash[6] ^= state[0][6]; + hash[7] ^= state[0][7]; +} + +/** + * Calculate message hash. + * Can be called repeatedly with chunks of the message to be hashed. + * + * @param ctx the algorithm context containing current hashing state + * @param msg message chunk + * @param size length of the message chunk + */ +void rhash_whirlpool_update(whirlpool_ctx *ctx, const unsigned char* msg, size_t size) +{ + unsigned index = (unsigned)ctx->length & 63; + unsigned left; + ctx->length += size; + + /* fill partial block */ + if (index) { + left = whirlpool_block_size - index; + memcpy(ctx->message + index, msg, (size < left ? size : left)); + if (size < left) return; + + /* process partial block */ + rhash_whirlpool_process_block(ctx->hash, (uint64_t*)ctx->message); + msg += left; + size -= left; + } + while (size >= whirlpool_block_size) { + uint64_t* aligned_message_block; + if (IS_ALIGNED_64(msg)) { + /* the most common case is processing of an already aligned message + without copying it */ + aligned_message_block = (uint64_t*)msg; + } else { + memcpy(ctx->message, msg, whirlpool_block_size); + aligned_message_block = (uint64_t*)ctx->message; + } + + rhash_whirlpool_process_block(ctx->hash, aligned_message_block); + msg += whirlpool_block_size; + size -= whirlpool_block_size; + } + if (size) { + /* save leftovers */ + memcpy(ctx->message, msg, size); + } +} + +/** + * Store calculated hash into the given array. + * + * @param ctx the algorithm context containing current hashing state + * @param result calculated hash in binary form + */ +void rhash_whirlpool_final(whirlpool_ctx *ctx, unsigned char* result) +{ + unsigned index = (unsigned)ctx->length & 63; + uint64_t* msg64 = (uint64_t*)ctx->message; + + /* pad message and run for last block */ + ctx->message[index++] = 0x80; + + /* if no room left in the message to store 256-bit message length */ + if (index > 32) { + /* then pad the rest with zeros and process it */ + while (index < 64) { + ctx->message[index++] = 0; + } + rhash_whirlpool_process_block(ctx->hash, msg64); + index = 0; + } + /* due to optimization actually only 64-bit of message length are stored */ + while (index < 56) { + ctx->message[index++] = 0; + } + msg64[7] = be2me_64(ctx->length << 3); + rhash_whirlpool_process_block(ctx->hash, msg64); + + /* save result hash */ + be64_copy(result, 0, ctx->hash, 64); +} + +#ifdef __cplusplus +} +#endif From a3df0a4fffead62198ee86905f1378ca1fc52b5f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:17:37 -0500 Subject: [PATCH 344/576] Create whirlpool.h --- .../hashing/whirlpool/whirlpool.h | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.h diff --git a/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.h b/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.h new file mode 100644 index 000000000..614628c03 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.h @@ -0,0 +1,38 @@ +/* whirlpool.h */ +#ifndef WHIRLPOOL_H +#define WHIRLPOOL_H +#include "ustd.h" + +//#include "byte_order.h" + +#define whirlpool_block_size 64 + +/* algorithm context */ +typedef struct whirlpool_ctx +{ + uint64_t hash[8]; /* 512-bit algorithm internal hashing state */ + unsigned char message[whirlpool_block_size]; /* 512-bit buffer to hash */ + + /* Note: original algorith uses 256-bit counter, allowing to hash up to + 2^256 bits sized message. For optimization we use here 64-bit counter, + thus reducing maximal message size to 2^64 bits = 2 Exbibytes = 2^21 TiB) */ + uint64_t length; /* number of processed bytes */ +} whirlpool_ctx; + +/* hash functions */ + +#ifdef __cplusplus +extern "C" { +#endif + +void rhash_whirlpool_init(whirlpool_ctx* ctx); +void rhash_whirlpool_update(whirlpool_ctx* ctx, const unsigned char* msg, size_t size); +void rhash_whirlpool_final(whirlpool_ctx* ctx, unsigned char* result); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + + + +#endif /* WHIRLPOOL_H */ From 29c5d2bb63403225efb1d5c2a5b66c5a409e3827 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:18:20 -0500 Subject: [PATCH 345/576] Create whirlpool_sbox.c --- .../hashing/whirlpool/whirlpool_sbox.c | 550 ++++++++++++++++++ 1 file changed, 550 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool_sbox.c diff --git a/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool_sbox.c b/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool_sbox.c new file mode 100644 index 000000000..ccbbfbb07 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool_sbox.c @@ -0,0 +1,550 @@ +/* whirlpool_sbox.c - S-Box for the Whirlpool hash function + * + * Copyright: 2009-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ + +#include "byte_order.h" + +uint64_t rhash_whirlpool_sbox[8][256] = { + { + /* C0 vectors */ + I64(0x18186018c07830d8), I64(0x23238c2305af4626), I64(0xc6c63fc67ef991b8), I64(0xe8e887e8136fcdfb), + I64(0x878726874ca113cb), I64(0xb8b8dab8a9626d11), I64(0x0101040108050209), I64(0x4f4f214f426e9e0d), + I64(0x3636d836adee6c9b), I64(0xa6a6a2a6590451ff), I64(0xd2d26fd2debdb90c), I64(0xf5f5f3f5fb06f70e), + I64(0x7979f979ef80f296), I64(0x6f6fa16f5fcede30), I64(0x91917e91fcef3f6d), I64(0x52525552aa07a4f8), + I64(0x60609d6027fdc047), I64(0xbcbccabc89766535), I64(0x9b9b569baccd2b37), I64(0x8e8e028e048c018a), + I64(0xa3a3b6a371155bd2), I64(0x0c0c300c603c186c), I64(0x7b7bf17bff8af684), I64(0x3535d435b5e16a80), + I64(0x1d1d741de8693af5), I64(0xe0e0a7e05347ddb3), I64(0xd7d77bd7f6acb321), I64(0xc2c22fc25eed999c), + I64(0x2e2eb82e6d965c43), I64(0x4b4b314b627a9629), I64(0xfefedffea321e15d), I64(0x575741578216aed5), + I64(0x15155415a8412abd), I64(0x7777c1779fb6eee8), I64(0x3737dc37a5eb6e92), I64(0xe5e5b3e57b56d79e), + I64(0x9f9f469f8cd92313), I64(0xf0f0e7f0d317fd23), I64(0x4a4a354a6a7f9420), I64(0xdada4fda9e95a944), + I64(0x58587d58fa25b0a2), I64(0xc9c903c906ca8fcf), I64(0x2929a429558d527c), I64(0x0a0a280a5022145a), + I64(0xb1b1feb1e14f7f50), I64(0xa0a0baa0691a5dc9), I64(0x6b6bb16b7fdad614), I64(0x85852e855cab17d9), + I64(0xbdbdcebd8173673c), I64(0x5d5d695dd234ba8f), I64(0x1010401080502090), I64(0xf4f4f7f4f303f507), + I64(0xcbcb0bcb16c08bdd), I64(0x3e3ef83eedc67cd3), I64(0x0505140528110a2d), I64(0x676781671fe6ce78), + I64(0xe4e4b7e47353d597), I64(0x27279c2725bb4e02), I64(0x4141194132588273), I64(0x8b8b168b2c9d0ba7), + I64(0xa7a7a6a7510153f6), I64(0x7d7de97dcf94fab2), I64(0x95956e95dcfb3749), I64(0xd8d847d88e9fad56), + I64(0xfbfbcbfb8b30eb70), I64(0xeeee9fee2371c1cd), I64(0x7c7ced7cc791f8bb), I64(0x6666856617e3cc71), + I64(0xdddd53dda68ea77b), I64(0x17175c17b84b2eaf), I64(0x4747014702468e45), I64(0x9e9e429e84dc211a), + I64(0xcaca0fca1ec589d4), I64(0x2d2db42d75995a58), I64(0xbfbfc6bf9179632e), I64(0x07071c07381b0e3f), + I64(0xadad8ead012347ac), I64(0x5a5a755aea2fb4b0), I64(0x838336836cb51bef), I64(0x3333cc3385ff66b6), + I64(0x636391633ff2c65c), I64(0x02020802100a0412), I64(0xaaaa92aa39384993), I64(0x7171d971afa8e2de), + I64(0xc8c807c80ecf8dc6), I64(0x19196419c87d32d1), I64(0x494939497270923b), I64(0xd9d943d9869aaf5f), + I64(0xf2f2eff2c31df931), I64(0xe3e3abe34b48dba8), I64(0x5b5b715be22ab6b9), I64(0x88881a8834920dbc), + I64(0x9a9a529aa4c8293e), I64(0x262698262dbe4c0b), I64(0x3232c8328dfa64bf), I64(0xb0b0fab0e94a7d59), + I64(0xe9e983e91b6acff2), I64(0x0f0f3c0f78331e77), I64(0xd5d573d5e6a6b733), I64(0x80803a8074ba1df4), + I64(0xbebec2be997c6127), I64(0xcdcd13cd26de87eb), I64(0x3434d034bde46889), I64(0x48483d487a759032), + I64(0xffffdbffab24e354), I64(0x7a7af57af78ff48d), I64(0x90907a90f4ea3d64), I64(0x5f5f615fc23ebe9d), + I64(0x202080201da0403d), I64(0x6868bd6867d5d00f), I64(0x1a1a681ad07234ca), I64(0xaeae82ae192c41b7), + I64(0xb4b4eab4c95e757d), I64(0x54544d549a19a8ce), I64(0x93937693ece53b7f), I64(0x222288220daa442f), + I64(0x64648d6407e9c863), I64(0xf1f1e3f1db12ff2a), I64(0x7373d173bfa2e6cc), I64(0x12124812905a2482), + I64(0x40401d403a5d807a), I64(0x0808200840281048), I64(0xc3c32bc356e89b95), I64(0xecec97ec337bc5df), + I64(0xdbdb4bdb9690ab4d), I64(0xa1a1bea1611f5fc0), I64(0x8d8d0e8d1c830791), I64(0x3d3df43df5c97ac8), + I64(0x97976697ccf1335b), I64(0x0000000000000000), I64(0xcfcf1bcf36d483f9), I64(0x2b2bac2b4587566e), + I64(0x7676c57697b3ece1), I64(0x8282328264b019e6), I64(0xd6d67fd6fea9b128), I64(0x1b1b6c1bd87736c3), + I64(0xb5b5eeb5c15b7774), I64(0xafaf86af112943be), I64(0x6a6ab56a77dfd41d), I64(0x50505d50ba0da0ea), + I64(0x45450945124c8a57), I64(0xf3f3ebf3cb18fb38), I64(0x3030c0309df060ad), I64(0xefef9bef2b74c3c4), + I64(0x3f3ffc3fe5c37eda), I64(0x55554955921caac7), I64(0xa2a2b2a2791059db), I64(0xeaea8fea0365c9e9), + I64(0x656589650fecca6a), I64(0xbabad2bab9686903), I64(0x2f2fbc2f65935e4a), I64(0xc0c027c04ee79d8e), + I64(0xdede5fdebe81a160), I64(0x1c1c701ce06c38fc), I64(0xfdfdd3fdbb2ee746), I64(0x4d4d294d52649a1f), + I64(0x92927292e4e03976), I64(0x7575c9758fbceafa), I64(0x06061806301e0c36), I64(0x8a8a128a249809ae), + I64(0xb2b2f2b2f940794b), I64(0xe6e6bfe66359d185), I64(0x0e0e380e70361c7e), I64(0x1f1f7c1ff8633ee7), + I64(0x6262956237f7c455), I64(0xd4d477d4eea3b53a), I64(0xa8a89aa829324d81), I64(0x96966296c4f43152), + I64(0xf9f9c3f99b3aef62), I64(0xc5c533c566f697a3), I64(0x2525942535b14a10), I64(0x59597959f220b2ab), + I64(0x84842a8454ae15d0), I64(0x7272d572b7a7e4c5), I64(0x3939e439d5dd72ec), I64(0x4c4c2d4c5a619816), + I64(0x5e5e655eca3bbc94), I64(0x7878fd78e785f09f), I64(0x3838e038ddd870e5), I64(0x8c8c0a8c14860598), + I64(0xd1d163d1c6b2bf17), I64(0xa5a5aea5410b57e4), I64(0xe2e2afe2434dd9a1), I64(0x616199612ff8c24e), + I64(0xb3b3f6b3f1457b42), I64(0x2121842115a54234), I64(0x9c9c4a9c94d62508), I64(0x1e1e781ef0663cee), + I64(0x4343114322528661), I64(0xc7c73bc776fc93b1), I64(0xfcfcd7fcb32be54f), I64(0x0404100420140824), + I64(0x51515951b208a2e3), I64(0x99995e99bcc72f25), I64(0x6d6da96d4fc4da22), I64(0x0d0d340d68391a65), + I64(0xfafacffa8335e979), I64(0xdfdf5bdfb684a369), I64(0x7e7ee57ed79bfca9), I64(0x242490243db44819), + I64(0x3b3bec3bc5d776fe), I64(0xabab96ab313d4b9a), I64(0xcece1fce3ed181f0), I64(0x1111441188552299), + I64(0x8f8f068f0c890383), I64(0x4e4e254e4a6b9c04), I64(0xb7b7e6b7d1517366), I64(0xebeb8beb0b60cbe0), + I64(0x3c3cf03cfdcc78c1), I64(0x81813e817cbf1ffd), I64(0x94946a94d4fe3540), I64(0xf7f7fbf7eb0cf31c), + I64(0xb9b9deb9a1676f18), I64(0x13134c13985f268b), I64(0x2c2cb02c7d9c5851), I64(0xd3d36bd3d6b8bb05), + I64(0xe7e7bbe76b5cd38c), I64(0x6e6ea56e57cbdc39), I64(0xc4c437c46ef395aa), I64(0x03030c03180f061b), + I64(0x565645568a13acdc), I64(0x44440d441a49885e), I64(0x7f7fe17fdf9efea0), I64(0xa9a99ea921374f88), + I64(0x2a2aa82a4d825467), I64(0xbbbbd6bbb16d6b0a), I64(0xc1c123c146e29f87), I64(0x53535153a202a6f1), + I64(0xdcdc57dcae8ba572), I64(0x0b0b2c0b58271653), I64(0x9d9d4e9d9cd32701), I64(0x6c6cad6c47c1d82b), + I64(0x3131c43195f562a4), I64(0x7474cd7487b9e8f3), I64(0xf6f6fff6e309f115), I64(0x464605460a438c4c), + I64(0xacac8aac092645a5), I64(0x89891e893c970fb5), I64(0x14145014a04428b4), I64(0xe1e1a3e15b42dfba), + I64(0x16165816b04e2ca6), I64(0x3a3ae83acdd274f7), I64(0x6969b9696fd0d206), I64(0x09092409482d1241), + I64(0x7070dd70a7ade0d7), I64(0xb6b6e2b6d954716f), I64(0xd0d067d0ceb7bd1e), I64(0xeded93ed3b7ec7d6), + I64(0xcccc17cc2edb85e2), I64(0x424215422a578468), I64(0x98985a98b4c22d2c), I64(0xa4a4aaa4490e55ed), + I64(0x2828a0285d885075), I64(0x5c5c6d5cda31b886), I64(0xf8f8c7f8933fed6b), I64(0x8686228644a411c2), + }, { + /* C1 vectors */ + I64(0xd818186018c07830), I64(0x2623238c2305af46), I64(0xb8c6c63fc67ef991), I64(0xfbe8e887e8136fcd), + I64(0xcb878726874ca113), I64(0x11b8b8dab8a9626d), I64(0x0901010401080502), I64(0x0d4f4f214f426e9e), + I64(0x9b3636d836adee6c), I64(0xffa6a6a2a6590451), I64(0x0cd2d26fd2debdb9), I64(0x0ef5f5f3f5fb06f7), + I64(0x967979f979ef80f2), I64(0x306f6fa16f5fcede), I64(0x6d91917e91fcef3f), I64(0xf852525552aa07a4), + I64(0x4760609d6027fdc0), I64(0x35bcbccabc897665), I64(0x379b9b569baccd2b), I64(0x8a8e8e028e048c01), + I64(0xd2a3a3b6a371155b), I64(0x6c0c0c300c603c18), I64(0x847b7bf17bff8af6), I64(0x803535d435b5e16a), + I64(0xf51d1d741de8693a), I64(0xb3e0e0a7e05347dd), I64(0x21d7d77bd7f6acb3), I64(0x9cc2c22fc25eed99), + I64(0x432e2eb82e6d965c), I64(0x294b4b314b627a96), I64(0x5dfefedffea321e1), I64(0xd5575741578216ae), + I64(0xbd15155415a8412a), I64(0xe87777c1779fb6ee), I64(0x923737dc37a5eb6e), I64(0x9ee5e5b3e57b56d7), + I64(0x139f9f469f8cd923), I64(0x23f0f0e7f0d317fd), I64(0x204a4a354a6a7f94), I64(0x44dada4fda9e95a9), + I64(0xa258587d58fa25b0), I64(0xcfc9c903c906ca8f), I64(0x7c2929a429558d52), I64(0x5a0a0a280a502214), + I64(0x50b1b1feb1e14f7f), I64(0xc9a0a0baa0691a5d), I64(0x146b6bb16b7fdad6), I64(0xd985852e855cab17), + I64(0x3cbdbdcebd817367), I64(0x8f5d5d695dd234ba), I64(0x9010104010805020), I64(0x07f4f4f7f4f303f5), + I64(0xddcbcb0bcb16c08b), I64(0xd33e3ef83eedc67c), I64(0x2d0505140528110a), I64(0x78676781671fe6ce), + I64(0x97e4e4b7e47353d5), I64(0x0227279c2725bb4e), I64(0x7341411941325882), I64(0xa78b8b168b2c9d0b), + I64(0xf6a7a7a6a7510153), I64(0xb27d7de97dcf94fa), I64(0x4995956e95dcfb37), I64(0x56d8d847d88e9fad), + I64(0x70fbfbcbfb8b30eb), I64(0xcdeeee9fee2371c1), I64(0xbb7c7ced7cc791f8), I64(0x716666856617e3cc), + I64(0x7bdddd53dda68ea7), I64(0xaf17175c17b84b2e), I64(0x454747014702468e), I64(0x1a9e9e429e84dc21), + I64(0xd4caca0fca1ec589), I64(0x582d2db42d75995a), I64(0x2ebfbfc6bf917963), I64(0x3f07071c07381b0e), + I64(0xacadad8ead012347), I64(0xb05a5a755aea2fb4), I64(0xef838336836cb51b), I64(0xb63333cc3385ff66), + I64(0x5c636391633ff2c6), I64(0x1202020802100a04), I64(0x93aaaa92aa393849), I64(0xde7171d971afa8e2), + I64(0xc6c8c807c80ecf8d), I64(0xd119196419c87d32), I64(0x3b49493949727092), I64(0x5fd9d943d9869aaf), + I64(0x31f2f2eff2c31df9), I64(0xa8e3e3abe34b48db), I64(0xb95b5b715be22ab6), I64(0xbc88881a8834920d), + I64(0x3e9a9a529aa4c829), I64(0x0b262698262dbe4c), I64(0xbf3232c8328dfa64), I64(0x59b0b0fab0e94a7d), + I64(0xf2e9e983e91b6acf), I64(0x770f0f3c0f78331e), I64(0x33d5d573d5e6a6b7), I64(0xf480803a8074ba1d), + I64(0x27bebec2be997c61), I64(0xebcdcd13cd26de87), I64(0x893434d034bde468), I64(0x3248483d487a7590), + I64(0x54ffffdbffab24e3), I64(0x8d7a7af57af78ff4), I64(0x6490907a90f4ea3d), I64(0x9d5f5f615fc23ebe), + I64(0x3d202080201da040), I64(0x0f6868bd6867d5d0), I64(0xca1a1a681ad07234), I64(0xb7aeae82ae192c41), + I64(0x7db4b4eab4c95e75), I64(0xce54544d549a19a8), I64(0x7f93937693ece53b), I64(0x2f222288220daa44), + I64(0x6364648d6407e9c8), I64(0x2af1f1e3f1db12ff), I64(0xcc7373d173bfa2e6), I64(0x8212124812905a24), + I64(0x7a40401d403a5d80), I64(0x4808082008402810), I64(0x95c3c32bc356e89b), I64(0xdfecec97ec337bc5), + I64(0x4ddbdb4bdb9690ab), I64(0xc0a1a1bea1611f5f), I64(0x918d8d0e8d1c8307), I64(0xc83d3df43df5c97a), + I64(0x5b97976697ccf133), I64(0x0000000000000000), I64(0xf9cfcf1bcf36d483), I64(0x6e2b2bac2b458756), + I64(0xe17676c57697b3ec), I64(0xe68282328264b019), I64(0x28d6d67fd6fea9b1), I64(0xc31b1b6c1bd87736), + I64(0x74b5b5eeb5c15b77), I64(0xbeafaf86af112943), I64(0x1d6a6ab56a77dfd4), I64(0xea50505d50ba0da0), + I64(0x5745450945124c8a), I64(0x38f3f3ebf3cb18fb), I64(0xad3030c0309df060), I64(0xc4efef9bef2b74c3), + I64(0xda3f3ffc3fe5c37e), I64(0xc755554955921caa), I64(0xdba2a2b2a2791059), I64(0xe9eaea8fea0365c9), + I64(0x6a656589650fecca), I64(0x03babad2bab96869), I64(0x4a2f2fbc2f65935e), I64(0x8ec0c027c04ee79d), + I64(0x60dede5fdebe81a1), I64(0xfc1c1c701ce06c38), I64(0x46fdfdd3fdbb2ee7), I64(0x1f4d4d294d52649a), + I64(0x7692927292e4e039), I64(0xfa7575c9758fbcea), I64(0x3606061806301e0c), I64(0xae8a8a128a249809), + I64(0x4bb2b2f2b2f94079), I64(0x85e6e6bfe66359d1), I64(0x7e0e0e380e70361c), I64(0xe71f1f7c1ff8633e), + I64(0x556262956237f7c4), I64(0x3ad4d477d4eea3b5), I64(0x81a8a89aa829324d), I64(0x5296966296c4f431), + I64(0x62f9f9c3f99b3aef), I64(0xa3c5c533c566f697), I64(0x102525942535b14a), I64(0xab59597959f220b2), + I64(0xd084842a8454ae15), I64(0xc57272d572b7a7e4), I64(0xec3939e439d5dd72), I64(0x164c4c2d4c5a6198), + I64(0x945e5e655eca3bbc), I64(0x9f7878fd78e785f0), I64(0xe53838e038ddd870), I64(0x988c8c0a8c148605), + I64(0x17d1d163d1c6b2bf), I64(0xe4a5a5aea5410b57), I64(0xa1e2e2afe2434dd9), I64(0x4e616199612ff8c2), + I64(0x42b3b3f6b3f1457b), I64(0x342121842115a542), I64(0x089c9c4a9c94d625), I64(0xee1e1e781ef0663c), + I64(0x6143431143225286), I64(0xb1c7c73bc776fc93), I64(0x4ffcfcd7fcb32be5), I64(0x2404041004201408), + I64(0xe351515951b208a2), I64(0x2599995e99bcc72f), I64(0x226d6da96d4fc4da), I64(0x650d0d340d68391a), + I64(0x79fafacffa8335e9), I64(0x69dfdf5bdfb684a3), I64(0xa97e7ee57ed79bfc), I64(0x19242490243db448), + I64(0xfe3b3bec3bc5d776), I64(0x9aabab96ab313d4b), I64(0xf0cece1fce3ed181), I64(0x9911114411885522), + I64(0x838f8f068f0c8903), I64(0x044e4e254e4a6b9c), I64(0x66b7b7e6b7d15173), I64(0xe0ebeb8beb0b60cb), + I64(0xc13c3cf03cfdcc78), I64(0xfd81813e817cbf1f), I64(0x4094946a94d4fe35), I64(0x1cf7f7fbf7eb0cf3), + I64(0x18b9b9deb9a1676f), I64(0x8b13134c13985f26), I64(0x512c2cb02c7d9c58), I64(0x05d3d36bd3d6b8bb), + I64(0x8ce7e7bbe76b5cd3), I64(0x396e6ea56e57cbdc), I64(0xaac4c437c46ef395), I64(0x1b03030c03180f06), + I64(0xdc565645568a13ac), I64(0x5e44440d441a4988), I64(0xa07f7fe17fdf9efe), I64(0x88a9a99ea921374f), + I64(0x672a2aa82a4d8254), I64(0x0abbbbd6bbb16d6b), I64(0x87c1c123c146e29f), I64(0xf153535153a202a6), + I64(0x72dcdc57dcae8ba5), I64(0x530b0b2c0b582716), I64(0x019d9d4e9d9cd327), I64(0x2b6c6cad6c47c1d8), + I64(0xa43131c43195f562), I64(0xf37474cd7487b9e8), I64(0x15f6f6fff6e309f1), I64(0x4c464605460a438c), + I64(0xa5acac8aac092645), I64(0xb589891e893c970f), I64(0xb414145014a04428), I64(0xbae1e1a3e15b42df), + I64(0xa616165816b04e2c), I64(0xf73a3ae83acdd274), I64(0x066969b9696fd0d2), I64(0x4109092409482d12), + I64(0xd77070dd70a7ade0), I64(0x6fb6b6e2b6d95471), I64(0x1ed0d067d0ceb7bd), I64(0xd6eded93ed3b7ec7), + I64(0xe2cccc17cc2edb85), I64(0x68424215422a5784), I64(0x2c98985a98b4c22d), I64(0xeda4a4aaa4490e55), + I64(0x752828a0285d8850), I64(0x865c5c6d5cda31b8), I64(0x6bf8f8c7f8933fed), I64(0xc28686228644a411), + }, { + /* C2 vectors */ + I64(0x30d818186018c078), I64(0x462623238c2305af), I64(0x91b8c6c63fc67ef9), I64(0xcdfbe8e887e8136f), + I64(0x13cb878726874ca1), I64(0x6d11b8b8dab8a962), I64(0x0209010104010805), I64(0x9e0d4f4f214f426e), + I64(0x6c9b3636d836adee), I64(0x51ffa6a6a2a65904), I64(0xb90cd2d26fd2debd), I64(0xf70ef5f5f3f5fb06), + I64(0xf2967979f979ef80), I64(0xde306f6fa16f5fce), I64(0x3f6d91917e91fcef), I64(0xa4f852525552aa07), + I64(0xc04760609d6027fd), I64(0x6535bcbccabc8976), I64(0x2b379b9b569baccd), I64(0x018a8e8e028e048c), + I64(0x5bd2a3a3b6a37115), I64(0x186c0c0c300c603c), I64(0xf6847b7bf17bff8a), I64(0x6a803535d435b5e1), + I64(0x3af51d1d741de869), I64(0xddb3e0e0a7e05347), I64(0xb321d7d77bd7f6ac), I64(0x999cc2c22fc25eed), + I64(0x5c432e2eb82e6d96), I64(0x96294b4b314b627a), I64(0xe15dfefedffea321), I64(0xaed5575741578216), + I64(0x2abd15155415a841), I64(0xeee87777c1779fb6), I64(0x6e923737dc37a5eb), I64(0xd79ee5e5b3e57b56), + I64(0x23139f9f469f8cd9), I64(0xfd23f0f0e7f0d317), I64(0x94204a4a354a6a7f), I64(0xa944dada4fda9e95), + I64(0xb0a258587d58fa25), I64(0x8fcfc9c903c906ca), I64(0x527c2929a429558d), I64(0x145a0a0a280a5022), + I64(0x7f50b1b1feb1e14f), I64(0x5dc9a0a0baa0691a), I64(0xd6146b6bb16b7fda), I64(0x17d985852e855cab), + I64(0x673cbdbdcebd8173), I64(0xba8f5d5d695dd234), I64(0x2090101040108050), I64(0xf507f4f4f7f4f303), + I64(0x8bddcbcb0bcb16c0), I64(0x7cd33e3ef83eedc6), I64(0x0a2d050514052811), I64(0xce78676781671fe6), + I64(0xd597e4e4b7e47353), I64(0x4e0227279c2725bb), I64(0x8273414119413258), I64(0x0ba78b8b168b2c9d), + I64(0x53f6a7a7a6a75101), I64(0xfab27d7de97dcf94), I64(0x374995956e95dcfb), I64(0xad56d8d847d88e9f), + I64(0xeb70fbfbcbfb8b30), I64(0xc1cdeeee9fee2371), I64(0xf8bb7c7ced7cc791), I64(0xcc716666856617e3), + I64(0xa77bdddd53dda68e), I64(0x2eaf17175c17b84b), I64(0x8e45474701470246), I64(0x211a9e9e429e84dc), + I64(0x89d4caca0fca1ec5), I64(0x5a582d2db42d7599), I64(0x632ebfbfc6bf9179), I64(0x0e3f07071c07381b), + I64(0x47acadad8ead0123), I64(0xb4b05a5a755aea2f), I64(0x1bef838336836cb5), I64(0x66b63333cc3385ff), + I64(0xc65c636391633ff2), I64(0x041202020802100a), I64(0x4993aaaa92aa3938), I64(0xe2de7171d971afa8), + I64(0x8dc6c8c807c80ecf), I64(0x32d119196419c87d), I64(0x923b494939497270), I64(0xaf5fd9d943d9869a), + I64(0xf931f2f2eff2c31d), I64(0xdba8e3e3abe34b48), I64(0xb6b95b5b715be22a), I64(0x0dbc88881a883492), + I64(0x293e9a9a529aa4c8), I64(0x4c0b262698262dbe), I64(0x64bf3232c8328dfa), I64(0x7d59b0b0fab0e94a), + I64(0xcff2e9e983e91b6a), I64(0x1e770f0f3c0f7833), I64(0xb733d5d573d5e6a6), I64(0x1df480803a8074ba), + I64(0x6127bebec2be997c), I64(0x87ebcdcd13cd26de), I64(0x68893434d034bde4), I64(0x903248483d487a75), + I64(0xe354ffffdbffab24), I64(0xf48d7a7af57af78f), I64(0x3d6490907a90f4ea), I64(0xbe9d5f5f615fc23e), + I64(0x403d202080201da0), I64(0xd00f6868bd6867d5), I64(0x34ca1a1a681ad072), I64(0x41b7aeae82ae192c), + I64(0x757db4b4eab4c95e), I64(0xa8ce54544d549a19), I64(0x3b7f93937693ece5), I64(0x442f222288220daa), + I64(0xc86364648d6407e9), I64(0xff2af1f1e3f1db12), I64(0xe6cc7373d173bfa2), I64(0x248212124812905a), + I64(0x807a40401d403a5d), I64(0x1048080820084028), I64(0x9b95c3c32bc356e8), I64(0xc5dfecec97ec337b), + I64(0xab4ddbdb4bdb9690), I64(0x5fc0a1a1bea1611f), I64(0x07918d8d0e8d1c83), I64(0x7ac83d3df43df5c9), + I64(0x335b97976697ccf1), I64(0x0000000000000000), I64(0x83f9cfcf1bcf36d4), I64(0x566e2b2bac2b4587), + I64(0xece17676c57697b3), I64(0x19e68282328264b0), I64(0xb128d6d67fd6fea9), I64(0x36c31b1b6c1bd877), + I64(0x7774b5b5eeb5c15b), I64(0x43beafaf86af1129), I64(0xd41d6a6ab56a77df), I64(0xa0ea50505d50ba0d), + I64(0x8a5745450945124c), I64(0xfb38f3f3ebf3cb18), I64(0x60ad3030c0309df0), I64(0xc3c4efef9bef2b74), + I64(0x7eda3f3ffc3fe5c3), I64(0xaac755554955921c), I64(0x59dba2a2b2a27910), I64(0xc9e9eaea8fea0365), + I64(0xca6a656589650fec), I64(0x6903babad2bab968), I64(0x5e4a2f2fbc2f6593), I64(0x9d8ec0c027c04ee7), + I64(0xa160dede5fdebe81), I64(0x38fc1c1c701ce06c), I64(0xe746fdfdd3fdbb2e), I64(0x9a1f4d4d294d5264), + I64(0x397692927292e4e0), I64(0xeafa7575c9758fbc), I64(0x0c3606061806301e), I64(0x09ae8a8a128a2498), + I64(0x794bb2b2f2b2f940), I64(0xd185e6e6bfe66359), I64(0x1c7e0e0e380e7036), I64(0x3ee71f1f7c1ff863), + I64(0xc4556262956237f7), I64(0xb53ad4d477d4eea3), I64(0x4d81a8a89aa82932), I64(0x315296966296c4f4), + I64(0xef62f9f9c3f99b3a), I64(0x97a3c5c533c566f6), I64(0x4a102525942535b1), I64(0xb2ab59597959f220), + I64(0x15d084842a8454ae), I64(0xe4c57272d572b7a7), I64(0x72ec3939e439d5dd), I64(0x98164c4c2d4c5a61), + I64(0xbc945e5e655eca3b), I64(0xf09f7878fd78e785), I64(0x70e53838e038ddd8), I64(0x05988c8c0a8c1486), + I64(0xbf17d1d163d1c6b2), I64(0x57e4a5a5aea5410b), I64(0xd9a1e2e2afe2434d), I64(0xc24e616199612ff8), + I64(0x7b42b3b3f6b3f145), I64(0x42342121842115a5), I64(0x25089c9c4a9c94d6), I64(0x3cee1e1e781ef066), + I64(0x8661434311432252), I64(0x93b1c7c73bc776fc), I64(0xe54ffcfcd7fcb32b), I64(0x0824040410042014), + I64(0xa2e351515951b208), I64(0x2f2599995e99bcc7), I64(0xda226d6da96d4fc4), I64(0x1a650d0d340d6839), + I64(0xe979fafacffa8335), I64(0xa369dfdf5bdfb684), I64(0xfca97e7ee57ed79b), I64(0x4819242490243db4), + I64(0x76fe3b3bec3bc5d7), I64(0x4b9aabab96ab313d), I64(0x81f0cece1fce3ed1), I64(0x2299111144118855), + I64(0x03838f8f068f0c89), I64(0x9c044e4e254e4a6b), I64(0x7366b7b7e6b7d151), I64(0xcbe0ebeb8beb0b60), + I64(0x78c13c3cf03cfdcc), I64(0x1ffd81813e817cbf), I64(0x354094946a94d4fe), I64(0xf31cf7f7fbf7eb0c), + I64(0x6f18b9b9deb9a167), I64(0x268b13134c13985f), I64(0x58512c2cb02c7d9c), I64(0xbb05d3d36bd3d6b8), + I64(0xd38ce7e7bbe76b5c), I64(0xdc396e6ea56e57cb), I64(0x95aac4c437c46ef3), I64(0x061b03030c03180f), + I64(0xacdc565645568a13), I64(0x885e44440d441a49), I64(0xfea07f7fe17fdf9e), I64(0x4f88a9a99ea92137), + I64(0x54672a2aa82a4d82), I64(0x6b0abbbbd6bbb16d), I64(0x9f87c1c123c146e2), I64(0xa6f153535153a202), + I64(0xa572dcdc57dcae8b), I64(0x16530b0b2c0b5827), I64(0x27019d9d4e9d9cd3), I64(0xd82b6c6cad6c47c1), + I64(0x62a43131c43195f5), I64(0xe8f37474cd7487b9), I64(0xf115f6f6fff6e309), I64(0x8c4c464605460a43), + I64(0x45a5acac8aac0926), I64(0x0fb589891e893c97), I64(0x28b414145014a044), I64(0xdfbae1e1a3e15b42), + I64(0x2ca616165816b04e), I64(0x74f73a3ae83acdd2), I64(0xd2066969b9696fd0), I64(0x124109092409482d), + I64(0xe0d77070dd70a7ad), I64(0x716fb6b6e2b6d954), I64(0xbd1ed0d067d0ceb7), I64(0xc7d6eded93ed3b7e), + I64(0x85e2cccc17cc2edb), I64(0x8468424215422a57), I64(0x2d2c98985a98b4c2), I64(0x55eda4a4aaa4490e), + I64(0x50752828a0285d88), I64(0xb8865c5c6d5cda31), I64(0xed6bf8f8c7f8933f), I64(0x11c28686228644a4), + }, { + /* C3 vectors */ + I64(0x7830d818186018c0), I64(0xaf462623238c2305), I64(0xf991b8c6c63fc67e), I64(0x6fcdfbe8e887e813), + I64(0xa113cb878726874c), I64(0x626d11b8b8dab8a9), I64(0x0502090101040108), I64(0x6e9e0d4f4f214f42), + I64(0xee6c9b3636d836ad), I64(0x0451ffa6a6a2a659), I64(0xbdb90cd2d26fd2de), I64(0x06f70ef5f5f3f5fb), + I64(0x80f2967979f979ef), I64(0xcede306f6fa16f5f), I64(0xef3f6d91917e91fc), I64(0x07a4f852525552aa), + I64(0xfdc04760609d6027), I64(0x766535bcbccabc89), I64(0xcd2b379b9b569bac), I64(0x8c018a8e8e028e04), + I64(0x155bd2a3a3b6a371), I64(0x3c186c0c0c300c60), I64(0x8af6847b7bf17bff), I64(0xe16a803535d435b5), + I64(0x693af51d1d741de8), I64(0x47ddb3e0e0a7e053), I64(0xacb321d7d77bd7f6), I64(0xed999cc2c22fc25e), + I64(0x965c432e2eb82e6d), I64(0x7a96294b4b314b62), I64(0x21e15dfefedffea3), I64(0x16aed55757415782), + I64(0x412abd15155415a8), I64(0xb6eee87777c1779f), I64(0xeb6e923737dc37a5), I64(0x56d79ee5e5b3e57b), + I64(0xd923139f9f469f8c), I64(0x17fd23f0f0e7f0d3), I64(0x7f94204a4a354a6a), I64(0x95a944dada4fda9e), + I64(0x25b0a258587d58fa), I64(0xca8fcfc9c903c906), I64(0x8d527c2929a42955), I64(0x22145a0a0a280a50), + I64(0x4f7f50b1b1feb1e1), I64(0x1a5dc9a0a0baa069), I64(0xdad6146b6bb16b7f), I64(0xab17d985852e855c), + I64(0x73673cbdbdcebd81), I64(0x34ba8f5d5d695dd2), I64(0x5020901010401080), I64(0x03f507f4f4f7f4f3), + I64(0xc08bddcbcb0bcb16), I64(0xc67cd33e3ef83eed), I64(0x110a2d0505140528), I64(0xe6ce78676781671f), + I64(0x53d597e4e4b7e473), I64(0xbb4e0227279c2725), I64(0x5882734141194132), I64(0x9d0ba78b8b168b2c), + I64(0x0153f6a7a7a6a751), I64(0x94fab27d7de97dcf), I64(0xfb374995956e95dc), I64(0x9fad56d8d847d88e), + I64(0x30eb70fbfbcbfb8b), I64(0x71c1cdeeee9fee23), I64(0x91f8bb7c7ced7cc7), I64(0xe3cc716666856617), + I64(0x8ea77bdddd53dda6), I64(0x4b2eaf17175c17b8), I64(0x468e454747014702), I64(0xdc211a9e9e429e84), + I64(0xc589d4caca0fca1e), I64(0x995a582d2db42d75), I64(0x79632ebfbfc6bf91), I64(0x1b0e3f07071c0738), + I64(0x2347acadad8ead01), I64(0x2fb4b05a5a755aea), I64(0xb51bef838336836c), I64(0xff66b63333cc3385), + I64(0xf2c65c636391633f), I64(0x0a04120202080210), I64(0x384993aaaa92aa39), I64(0xa8e2de7171d971af), + I64(0xcf8dc6c8c807c80e), I64(0x7d32d119196419c8), I64(0x70923b4949394972), I64(0x9aaf5fd9d943d986), + I64(0x1df931f2f2eff2c3), I64(0x48dba8e3e3abe34b), I64(0x2ab6b95b5b715be2), I64(0x920dbc88881a8834), + I64(0xc8293e9a9a529aa4), I64(0xbe4c0b262698262d), I64(0xfa64bf3232c8328d), I64(0x4a7d59b0b0fab0e9), + I64(0x6acff2e9e983e91b), I64(0x331e770f0f3c0f78), I64(0xa6b733d5d573d5e6), I64(0xba1df480803a8074), + I64(0x7c6127bebec2be99), I64(0xde87ebcdcd13cd26), I64(0xe468893434d034bd), I64(0x75903248483d487a), + I64(0x24e354ffffdbffab), I64(0x8ff48d7a7af57af7), I64(0xea3d6490907a90f4), I64(0x3ebe9d5f5f615fc2), + I64(0xa0403d202080201d), I64(0xd5d00f6868bd6867), I64(0x7234ca1a1a681ad0), I64(0x2c41b7aeae82ae19), + I64(0x5e757db4b4eab4c9), I64(0x19a8ce54544d549a), I64(0xe53b7f93937693ec), I64(0xaa442f222288220d), + I64(0xe9c86364648d6407), I64(0x12ff2af1f1e3f1db), I64(0xa2e6cc7373d173bf), I64(0x5a24821212481290), + I64(0x5d807a40401d403a), I64(0x2810480808200840), I64(0xe89b95c3c32bc356), I64(0x7bc5dfecec97ec33), + I64(0x90ab4ddbdb4bdb96), I64(0x1f5fc0a1a1bea161), I64(0x8307918d8d0e8d1c), I64(0xc97ac83d3df43df5), + I64(0xf1335b97976697cc), I64(0x0000000000000000), I64(0xd483f9cfcf1bcf36), I64(0x87566e2b2bac2b45), + I64(0xb3ece17676c57697), I64(0xb019e68282328264), I64(0xa9b128d6d67fd6fe), I64(0x7736c31b1b6c1bd8), + I64(0x5b7774b5b5eeb5c1), I64(0x2943beafaf86af11), I64(0xdfd41d6a6ab56a77), I64(0x0da0ea50505d50ba), + I64(0x4c8a574545094512), I64(0x18fb38f3f3ebf3cb), I64(0xf060ad3030c0309d), I64(0x74c3c4efef9bef2b), + I64(0xc37eda3f3ffc3fe5), I64(0x1caac75555495592), I64(0x1059dba2a2b2a279), I64(0x65c9e9eaea8fea03), + I64(0xecca6a656589650f), I64(0x686903babad2bab9), I64(0x935e4a2f2fbc2f65), I64(0xe79d8ec0c027c04e), + I64(0x81a160dede5fdebe), I64(0x6c38fc1c1c701ce0), I64(0x2ee746fdfdd3fdbb), I64(0x649a1f4d4d294d52), + I64(0xe0397692927292e4), I64(0xbceafa7575c9758f), I64(0x1e0c360606180630), I64(0x9809ae8a8a128a24), + I64(0x40794bb2b2f2b2f9), I64(0x59d185e6e6bfe663), I64(0x361c7e0e0e380e70), I64(0x633ee71f1f7c1ff8), + I64(0xf7c4556262956237), I64(0xa3b53ad4d477d4ee), I64(0x324d81a8a89aa829), I64(0xf4315296966296c4), + I64(0x3aef62f9f9c3f99b), I64(0xf697a3c5c533c566), I64(0xb14a102525942535), I64(0x20b2ab59597959f2), + I64(0xae15d084842a8454), I64(0xa7e4c57272d572b7), I64(0xdd72ec3939e439d5), I64(0x6198164c4c2d4c5a), + I64(0x3bbc945e5e655eca), I64(0x85f09f7878fd78e7), I64(0xd870e53838e038dd), I64(0x8605988c8c0a8c14), + I64(0xb2bf17d1d163d1c6), I64(0x0b57e4a5a5aea541), I64(0x4dd9a1e2e2afe243), I64(0xf8c24e616199612f), + I64(0x457b42b3b3f6b3f1), I64(0xa542342121842115), I64(0xd625089c9c4a9c94), I64(0x663cee1e1e781ef0), + I64(0x5286614343114322), I64(0xfc93b1c7c73bc776), I64(0x2be54ffcfcd7fcb3), I64(0x1408240404100420), + I64(0x08a2e351515951b2), I64(0xc72f2599995e99bc), I64(0xc4da226d6da96d4f), I64(0x391a650d0d340d68), + I64(0x35e979fafacffa83), I64(0x84a369dfdf5bdfb6), I64(0x9bfca97e7ee57ed7), I64(0xb44819242490243d), + I64(0xd776fe3b3bec3bc5), I64(0x3d4b9aabab96ab31), I64(0xd181f0cece1fce3e), I64(0x5522991111441188), + I64(0x8903838f8f068f0c), I64(0x6b9c044e4e254e4a), I64(0x517366b7b7e6b7d1), I64(0x60cbe0ebeb8beb0b), + I64(0xcc78c13c3cf03cfd), I64(0xbf1ffd81813e817c), I64(0xfe354094946a94d4), I64(0x0cf31cf7f7fbf7eb), + I64(0x676f18b9b9deb9a1), I64(0x5f268b13134c1398), I64(0x9c58512c2cb02c7d), I64(0xb8bb05d3d36bd3d6), + I64(0x5cd38ce7e7bbe76b), I64(0xcbdc396e6ea56e57), I64(0xf395aac4c437c46e), I64(0x0f061b03030c0318), + I64(0x13acdc565645568a), I64(0x49885e44440d441a), I64(0x9efea07f7fe17fdf), I64(0x374f88a9a99ea921), + I64(0x8254672a2aa82a4d), I64(0x6d6b0abbbbd6bbb1), I64(0xe29f87c1c123c146), I64(0x02a6f153535153a2), + I64(0x8ba572dcdc57dcae), I64(0x2716530b0b2c0b58), I64(0xd327019d9d4e9d9c), I64(0xc1d82b6c6cad6c47), + I64(0xf562a43131c43195), I64(0xb9e8f37474cd7487), I64(0x09f115f6f6fff6e3), I64(0x438c4c464605460a), + I64(0x2645a5acac8aac09), I64(0x970fb589891e893c), I64(0x4428b414145014a0), I64(0x42dfbae1e1a3e15b), + I64(0x4e2ca616165816b0), I64(0xd274f73a3ae83acd), I64(0xd0d2066969b9696f), I64(0x2d12410909240948), + I64(0xade0d77070dd70a7), I64(0x54716fb6b6e2b6d9), I64(0xb7bd1ed0d067d0ce), I64(0x7ec7d6eded93ed3b), + I64(0xdb85e2cccc17cc2e), I64(0x578468424215422a), I64(0xc22d2c98985a98b4), I64(0x0e55eda4a4aaa449), + I64(0x8850752828a0285d), I64(0x31b8865c5c6d5cda), I64(0x3fed6bf8f8c7f893), I64(0xa411c28686228644), + }, { + /* C4 vectors */ + I64(0xc07830d818186018), I64(0x05af462623238c23), I64(0x7ef991b8c6c63fc6), I64(0x136fcdfbe8e887e8), + I64(0x4ca113cb87872687), I64(0xa9626d11b8b8dab8), I64(0x0805020901010401), I64(0x426e9e0d4f4f214f), + I64(0xadee6c9b3636d836), I64(0x590451ffa6a6a2a6), I64(0xdebdb90cd2d26fd2), I64(0xfb06f70ef5f5f3f5), + I64(0xef80f2967979f979), I64(0x5fcede306f6fa16f), I64(0xfcef3f6d91917e91), I64(0xaa07a4f852525552), + I64(0x27fdc04760609d60), I64(0x89766535bcbccabc), I64(0xaccd2b379b9b569b), I64(0x048c018a8e8e028e), + I64(0x71155bd2a3a3b6a3), I64(0x603c186c0c0c300c), I64(0xff8af6847b7bf17b), I64(0xb5e16a803535d435), + I64(0xe8693af51d1d741d), I64(0x5347ddb3e0e0a7e0), I64(0xf6acb321d7d77bd7), I64(0x5eed999cc2c22fc2), + I64(0x6d965c432e2eb82e), I64(0x627a96294b4b314b), I64(0xa321e15dfefedffe), I64(0x8216aed557574157), + I64(0xa8412abd15155415), I64(0x9fb6eee87777c177), I64(0xa5eb6e923737dc37), I64(0x7b56d79ee5e5b3e5), + I64(0x8cd923139f9f469f), I64(0xd317fd23f0f0e7f0), I64(0x6a7f94204a4a354a), I64(0x9e95a944dada4fda), + I64(0xfa25b0a258587d58), I64(0x06ca8fcfc9c903c9), I64(0x558d527c2929a429), I64(0x5022145a0a0a280a), + I64(0xe14f7f50b1b1feb1), I64(0x691a5dc9a0a0baa0), I64(0x7fdad6146b6bb16b), I64(0x5cab17d985852e85), + I64(0x8173673cbdbdcebd), I64(0xd234ba8f5d5d695d), I64(0x8050209010104010), I64(0xf303f507f4f4f7f4), + I64(0x16c08bddcbcb0bcb), I64(0xedc67cd33e3ef83e), I64(0x28110a2d05051405), I64(0x1fe6ce7867678167), + I64(0x7353d597e4e4b7e4), I64(0x25bb4e0227279c27), I64(0x3258827341411941), I64(0x2c9d0ba78b8b168b), + I64(0x510153f6a7a7a6a7), I64(0xcf94fab27d7de97d), I64(0xdcfb374995956e95), I64(0x8e9fad56d8d847d8), + I64(0x8b30eb70fbfbcbfb), I64(0x2371c1cdeeee9fee), I64(0xc791f8bb7c7ced7c), I64(0x17e3cc7166668566), + I64(0xa68ea77bdddd53dd), I64(0xb84b2eaf17175c17), I64(0x02468e4547470147), I64(0x84dc211a9e9e429e), + I64(0x1ec589d4caca0fca), I64(0x75995a582d2db42d), I64(0x9179632ebfbfc6bf), I64(0x381b0e3f07071c07), + I64(0x012347acadad8ead), I64(0xea2fb4b05a5a755a), I64(0x6cb51bef83833683), I64(0x85ff66b63333cc33), + I64(0x3ff2c65c63639163), I64(0x100a041202020802), I64(0x39384993aaaa92aa), I64(0xafa8e2de7171d971), + I64(0x0ecf8dc6c8c807c8), I64(0xc87d32d119196419), I64(0x7270923b49493949), I64(0x869aaf5fd9d943d9), + I64(0xc31df931f2f2eff2), I64(0x4b48dba8e3e3abe3), I64(0xe22ab6b95b5b715b), I64(0x34920dbc88881a88), + I64(0xa4c8293e9a9a529a), I64(0x2dbe4c0b26269826), I64(0x8dfa64bf3232c832), I64(0xe94a7d59b0b0fab0), + I64(0x1b6acff2e9e983e9), I64(0x78331e770f0f3c0f), I64(0xe6a6b733d5d573d5), I64(0x74ba1df480803a80), + I64(0x997c6127bebec2be), I64(0x26de87ebcdcd13cd), I64(0xbde468893434d034), I64(0x7a75903248483d48), + I64(0xab24e354ffffdbff), I64(0xf78ff48d7a7af57a), I64(0xf4ea3d6490907a90), I64(0xc23ebe9d5f5f615f), + I64(0x1da0403d20208020), I64(0x67d5d00f6868bd68), I64(0xd07234ca1a1a681a), I64(0x192c41b7aeae82ae), + I64(0xc95e757db4b4eab4), I64(0x9a19a8ce54544d54), I64(0xece53b7f93937693), I64(0x0daa442f22228822), + I64(0x07e9c86364648d64), I64(0xdb12ff2af1f1e3f1), I64(0xbfa2e6cc7373d173), I64(0x905a248212124812), + I64(0x3a5d807a40401d40), I64(0x4028104808082008), I64(0x56e89b95c3c32bc3), I64(0x337bc5dfecec97ec), + I64(0x9690ab4ddbdb4bdb), I64(0x611f5fc0a1a1bea1), I64(0x1c8307918d8d0e8d), I64(0xf5c97ac83d3df43d), + I64(0xccf1335b97976697), I64(0x0000000000000000), I64(0x36d483f9cfcf1bcf), I64(0x4587566e2b2bac2b), + I64(0x97b3ece17676c576), I64(0x64b019e682823282), I64(0xfea9b128d6d67fd6), I64(0xd87736c31b1b6c1b), + I64(0xc15b7774b5b5eeb5), I64(0x112943beafaf86af), I64(0x77dfd41d6a6ab56a), I64(0xba0da0ea50505d50), + I64(0x124c8a5745450945), I64(0xcb18fb38f3f3ebf3), I64(0x9df060ad3030c030), I64(0x2b74c3c4efef9bef), + I64(0xe5c37eda3f3ffc3f), I64(0x921caac755554955), I64(0x791059dba2a2b2a2), I64(0x0365c9e9eaea8fea), + I64(0x0fecca6a65658965), I64(0xb9686903babad2ba), I64(0x65935e4a2f2fbc2f), I64(0x4ee79d8ec0c027c0), + I64(0xbe81a160dede5fde), I64(0xe06c38fc1c1c701c), I64(0xbb2ee746fdfdd3fd), I64(0x52649a1f4d4d294d), + I64(0xe4e0397692927292), I64(0x8fbceafa7575c975), I64(0x301e0c3606061806), I64(0x249809ae8a8a128a), + I64(0xf940794bb2b2f2b2), I64(0x6359d185e6e6bfe6), I64(0x70361c7e0e0e380e), I64(0xf8633ee71f1f7c1f), + I64(0x37f7c45562629562), I64(0xeea3b53ad4d477d4), I64(0x29324d81a8a89aa8), I64(0xc4f4315296966296), + I64(0x9b3aef62f9f9c3f9), I64(0x66f697a3c5c533c5), I64(0x35b14a1025259425), I64(0xf220b2ab59597959), + I64(0x54ae15d084842a84), I64(0xb7a7e4c57272d572), I64(0xd5dd72ec3939e439), I64(0x5a6198164c4c2d4c), + I64(0xca3bbc945e5e655e), I64(0xe785f09f7878fd78), I64(0xddd870e53838e038), I64(0x148605988c8c0a8c), + I64(0xc6b2bf17d1d163d1), I64(0x410b57e4a5a5aea5), I64(0x434dd9a1e2e2afe2), I64(0x2ff8c24e61619961), + I64(0xf1457b42b3b3f6b3), I64(0x15a5423421218421), I64(0x94d625089c9c4a9c), I64(0xf0663cee1e1e781e), + I64(0x2252866143431143), I64(0x76fc93b1c7c73bc7), I64(0xb32be54ffcfcd7fc), I64(0x2014082404041004), + I64(0xb208a2e351515951), I64(0xbcc72f2599995e99), I64(0x4fc4da226d6da96d), I64(0x68391a650d0d340d), + I64(0x8335e979fafacffa), I64(0xb684a369dfdf5bdf), I64(0xd79bfca97e7ee57e), I64(0x3db4481924249024), + I64(0xc5d776fe3b3bec3b), I64(0x313d4b9aabab96ab), I64(0x3ed181f0cece1fce), I64(0x8855229911114411), + I64(0x0c8903838f8f068f), I64(0x4a6b9c044e4e254e), I64(0xd1517366b7b7e6b7), I64(0x0b60cbe0ebeb8beb), + I64(0xfdcc78c13c3cf03c), I64(0x7cbf1ffd81813e81), I64(0xd4fe354094946a94), I64(0xeb0cf31cf7f7fbf7), + I64(0xa1676f18b9b9deb9), I64(0x985f268b13134c13), I64(0x7d9c58512c2cb02c), I64(0xd6b8bb05d3d36bd3), + I64(0x6b5cd38ce7e7bbe7), I64(0x57cbdc396e6ea56e), I64(0x6ef395aac4c437c4), I64(0x180f061b03030c03), + I64(0x8a13acdc56564556), I64(0x1a49885e44440d44), I64(0xdf9efea07f7fe17f), I64(0x21374f88a9a99ea9), + I64(0x4d8254672a2aa82a), I64(0xb16d6b0abbbbd6bb), I64(0x46e29f87c1c123c1), I64(0xa202a6f153535153), + I64(0xae8ba572dcdc57dc), I64(0x582716530b0b2c0b), I64(0x9cd327019d9d4e9d), I64(0x47c1d82b6c6cad6c), + I64(0x95f562a43131c431), I64(0x87b9e8f37474cd74), I64(0xe309f115f6f6fff6), I64(0x0a438c4c46460546), + I64(0x092645a5acac8aac), I64(0x3c970fb589891e89), I64(0xa04428b414145014), I64(0x5b42dfbae1e1a3e1), + I64(0xb04e2ca616165816), I64(0xcdd274f73a3ae83a), I64(0x6fd0d2066969b969), I64(0x482d124109092409), + I64(0xa7ade0d77070dd70), I64(0xd954716fb6b6e2b6), I64(0xceb7bd1ed0d067d0), I64(0x3b7ec7d6eded93ed), + I64(0x2edb85e2cccc17cc), I64(0x2a57846842421542), I64(0xb4c22d2c98985a98), I64(0x490e55eda4a4aaa4), + I64(0x5d8850752828a028), I64(0xda31b8865c5c6d5c), I64(0x933fed6bf8f8c7f8), I64(0x44a411c286862286), + }, { + /* C5 vectors */ + I64(0x18c07830d8181860), I64(0x2305af462623238c), I64(0xc67ef991b8c6c63f), I64(0xe8136fcdfbe8e887), + I64(0x874ca113cb878726), I64(0xb8a9626d11b8b8da), I64(0x0108050209010104), I64(0x4f426e9e0d4f4f21), + I64(0x36adee6c9b3636d8), I64(0xa6590451ffa6a6a2), I64(0xd2debdb90cd2d26f), I64(0xf5fb06f70ef5f5f3), + I64(0x79ef80f2967979f9), I64(0x6f5fcede306f6fa1), I64(0x91fcef3f6d91917e), I64(0x52aa07a4f8525255), + I64(0x6027fdc04760609d), I64(0xbc89766535bcbcca), I64(0x9baccd2b379b9b56), I64(0x8e048c018a8e8e02), + I64(0xa371155bd2a3a3b6), I64(0x0c603c186c0c0c30), I64(0x7bff8af6847b7bf1), I64(0x35b5e16a803535d4), + I64(0x1de8693af51d1d74), I64(0xe05347ddb3e0e0a7), I64(0xd7f6acb321d7d77b), I64(0xc25eed999cc2c22f), + I64(0x2e6d965c432e2eb8), I64(0x4b627a96294b4b31), I64(0xfea321e15dfefedf), I64(0x578216aed5575741), + I64(0x15a8412abd151554), I64(0x779fb6eee87777c1), I64(0x37a5eb6e923737dc), I64(0xe57b56d79ee5e5b3), + I64(0x9f8cd923139f9f46), I64(0xf0d317fd23f0f0e7), I64(0x4a6a7f94204a4a35), I64(0xda9e95a944dada4f), + I64(0x58fa25b0a258587d), I64(0xc906ca8fcfc9c903), I64(0x29558d527c2929a4), I64(0x0a5022145a0a0a28), + I64(0xb1e14f7f50b1b1fe), I64(0xa0691a5dc9a0a0ba), I64(0x6b7fdad6146b6bb1), I64(0x855cab17d985852e), + I64(0xbd8173673cbdbdce), I64(0x5dd234ba8f5d5d69), I64(0x1080502090101040), I64(0xf4f303f507f4f4f7), + I64(0xcb16c08bddcbcb0b), I64(0x3eedc67cd33e3ef8), I64(0x0528110a2d050514), I64(0x671fe6ce78676781), + I64(0xe47353d597e4e4b7), I64(0x2725bb4e0227279c), I64(0x4132588273414119), I64(0x8b2c9d0ba78b8b16), + I64(0xa7510153f6a7a7a6), I64(0x7dcf94fab27d7de9), I64(0x95dcfb374995956e), I64(0xd88e9fad56d8d847), + I64(0xfb8b30eb70fbfbcb), I64(0xee2371c1cdeeee9f), I64(0x7cc791f8bb7c7ced), I64(0x6617e3cc71666685), + I64(0xdda68ea77bdddd53), I64(0x17b84b2eaf17175c), I64(0x4702468e45474701), I64(0x9e84dc211a9e9e42), + I64(0xca1ec589d4caca0f), I64(0x2d75995a582d2db4), I64(0xbf9179632ebfbfc6), I64(0x07381b0e3f07071c), + I64(0xad012347acadad8e), I64(0x5aea2fb4b05a5a75), I64(0x836cb51bef838336), I64(0x3385ff66b63333cc), + I64(0x633ff2c65c636391), I64(0x02100a0412020208), I64(0xaa39384993aaaa92), I64(0x71afa8e2de7171d9), + I64(0xc80ecf8dc6c8c807), I64(0x19c87d32d1191964), I64(0x497270923b494939), I64(0xd9869aaf5fd9d943), + I64(0xf2c31df931f2f2ef), I64(0xe34b48dba8e3e3ab), I64(0x5be22ab6b95b5b71), I64(0x8834920dbc88881a), + I64(0x9aa4c8293e9a9a52), I64(0x262dbe4c0b262698), I64(0x328dfa64bf3232c8), I64(0xb0e94a7d59b0b0fa), + I64(0xe91b6acff2e9e983), I64(0x0f78331e770f0f3c), I64(0xd5e6a6b733d5d573), I64(0x8074ba1df480803a), + I64(0xbe997c6127bebec2), I64(0xcd26de87ebcdcd13), I64(0x34bde468893434d0), I64(0x487a75903248483d), + I64(0xffab24e354ffffdb), I64(0x7af78ff48d7a7af5), I64(0x90f4ea3d6490907a), I64(0x5fc23ebe9d5f5f61), + I64(0x201da0403d202080), I64(0x6867d5d00f6868bd), I64(0x1ad07234ca1a1a68), I64(0xae192c41b7aeae82), + I64(0xb4c95e757db4b4ea), I64(0x549a19a8ce54544d), I64(0x93ece53b7f939376), I64(0x220daa442f222288), + I64(0x6407e9c86364648d), I64(0xf1db12ff2af1f1e3), I64(0x73bfa2e6cc7373d1), I64(0x12905a2482121248), + I64(0x403a5d807a40401d), I64(0x0840281048080820), I64(0xc356e89b95c3c32b), I64(0xec337bc5dfecec97), + I64(0xdb9690ab4ddbdb4b), I64(0xa1611f5fc0a1a1be), I64(0x8d1c8307918d8d0e), I64(0x3df5c97ac83d3df4), + I64(0x97ccf1335b979766), I64(0x0000000000000000), I64(0xcf36d483f9cfcf1b), I64(0x2b4587566e2b2bac), + I64(0x7697b3ece17676c5), I64(0x8264b019e6828232), I64(0xd6fea9b128d6d67f), I64(0x1bd87736c31b1b6c), + I64(0xb5c15b7774b5b5ee), I64(0xaf112943beafaf86), I64(0x6a77dfd41d6a6ab5), I64(0x50ba0da0ea50505d), + I64(0x45124c8a57454509), I64(0xf3cb18fb38f3f3eb), I64(0x309df060ad3030c0), I64(0xef2b74c3c4efef9b), + I64(0x3fe5c37eda3f3ffc), I64(0x55921caac7555549), I64(0xa2791059dba2a2b2), I64(0xea0365c9e9eaea8f), + I64(0x650fecca6a656589), I64(0xbab9686903babad2), I64(0x2f65935e4a2f2fbc), I64(0xc04ee79d8ec0c027), + I64(0xdebe81a160dede5f), I64(0x1ce06c38fc1c1c70), I64(0xfdbb2ee746fdfdd3), I64(0x4d52649a1f4d4d29), + I64(0x92e4e03976929272), I64(0x758fbceafa7575c9), I64(0x06301e0c36060618), I64(0x8a249809ae8a8a12), + I64(0xb2f940794bb2b2f2), I64(0xe66359d185e6e6bf), I64(0x0e70361c7e0e0e38), I64(0x1ff8633ee71f1f7c), + I64(0x6237f7c455626295), I64(0xd4eea3b53ad4d477), I64(0xa829324d81a8a89a), I64(0x96c4f43152969662), + I64(0xf99b3aef62f9f9c3), I64(0xc566f697a3c5c533), I64(0x2535b14a10252594), I64(0x59f220b2ab595979), + I64(0x8454ae15d084842a), I64(0x72b7a7e4c57272d5), I64(0x39d5dd72ec3939e4), I64(0x4c5a6198164c4c2d), + I64(0x5eca3bbc945e5e65), I64(0x78e785f09f7878fd), I64(0x38ddd870e53838e0), I64(0x8c148605988c8c0a), + I64(0xd1c6b2bf17d1d163), I64(0xa5410b57e4a5a5ae), I64(0xe2434dd9a1e2e2af), I64(0x612ff8c24e616199), + I64(0xb3f1457b42b3b3f6), I64(0x2115a54234212184), I64(0x9c94d625089c9c4a), I64(0x1ef0663cee1e1e78), + I64(0x4322528661434311), I64(0xc776fc93b1c7c73b), I64(0xfcb32be54ffcfcd7), I64(0x0420140824040410), + I64(0x51b208a2e3515159), I64(0x99bcc72f2599995e), I64(0x6d4fc4da226d6da9), I64(0x0d68391a650d0d34), + I64(0xfa8335e979fafacf), I64(0xdfb684a369dfdf5b), I64(0x7ed79bfca97e7ee5), I64(0x243db44819242490), + I64(0x3bc5d776fe3b3bec), I64(0xab313d4b9aabab96), I64(0xce3ed181f0cece1f), I64(0x1188552299111144), + I64(0x8f0c8903838f8f06), I64(0x4e4a6b9c044e4e25), I64(0xb7d1517366b7b7e6), I64(0xeb0b60cbe0ebeb8b), + I64(0x3cfdcc78c13c3cf0), I64(0x817cbf1ffd81813e), I64(0x94d4fe354094946a), I64(0xf7eb0cf31cf7f7fb), + I64(0xb9a1676f18b9b9de), I64(0x13985f268b13134c), I64(0x2c7d9c58512c2cb0), I64(0xd3d6b8bb05d3d36b), + I64(0xe76b5cd38ce7e7bb), I64(0x6e57cbdc396e6ea5), I64(0xc46ef395aac4c437), I64(0x03180f061b03030c), + I64(0x568a13acdc565645), I64(0x441a49885e44440d), I64(0x7fdf9efea07f7fe1), I64(0xa921374f88a9a99e), + I64(0x2a4d8254672a2aa8), I64(0xbbb16d6b0abbbbd6), I64(0xc146e29f87c1c123), I64(0x53a202a6f1535351), + I64(0xdcae8ba572dcdc57), I64(0x0b582716530b0b2c), I64(0x9d9cd327019d9d4e), I64(0x6c47c1d82b6c6cad), + I64(0x3195f562a43131c4), I64(0x7487b9e8f37474cd), I64(0xf6e309f115f6f6ff), I64(0x460a438c4c464605), + I64(0xac092645a5acac8a), I64(0x893c970fb589891e), I64(0x14a04428b4141450), I64(0xe15b42dfbae1e1a3), + I64(0x16b04e2ca6161658), I64(0x3acdd274f73a3ae8), I64(0x696fd0d2066969b9), I64(0x09482d1241090924), + I64(0x70a7ade0d77070dd), I64(0xb6d954716fb6b6e2), I64(0xd0ceb7bd1ed0d067), I64(0xed3b7ec7d6eded93), + I64(0xcc2edb85e2cccc17), I64(0x422a578468424215), I64(0x98b4c22d2c98985a), I64(0xa4490e55eda4a4aa), + I64(0x285d8850752828a0), I64(0x5cda31b8865c5c6d), I64(0xf8933fed6bf8f8c7), I64(0x8644a411c2868622), + }, { + /* C6 vectors */ + I64(0x6018c07830d81818), I64(0x8c2305af46262323), I64(0x3fc67ef991b8c6c6), I64(0x87e8136fcdfbe8e8), + I64(0x26874ca113cb8787), I64(0xdab8a9626d11b8b8), I64(0x0401080502090101), I64(0x214f426e9e0d4f4f), + I64(0xd836adee6c9b3636), I64(0xa2a6590451ffa6a6), I64(0x6fd2debdb90cd2d2), I64(0xf3f5fb06f70ef5f5), + I64(0xf979ef80f2967979), I64(0xa16f5fcede306f6f), I64(0x7e91fcef3f6d9191), I64(0x5552aa07a4f85252), + I64(0x9d6027fdc0476060), I64(0xcabc89766535bcbc), I64(0x569baccd2b379b9b), I64(0x028e048c018a8e8e), + I64(0xb6a371155bd2a3a3), I64(0x300c603c186c0c0c), I64(0xf17bff8af6847b7b), I64(0xd435b5e16a803535), + I64(0x741de8693af51d1d), I64(0xa7e05347ddb3e0e0), I64(0x7bd7f6acb321d7d7), I64(0x2fc25eed999cc2c2), + I64(0xb82e6d965c432e2e), I64(0x314b627a96294b4b), I64(0xdffea321e15dfefe), I64(0x41578216aed55757), + I64(0x5415a8412abd1515), I64(0xc1779fb6eee87777), I64(0xdc37a5eb6e923737), I64(0xb3e57b56d79ee5e5), + I64(0x469f8cd923139f9f), I64(0xe7f0d317fd23f0f0), I64(0x354a6a7f94204a4a), I64(0x4fda9e95a944dada), + I64(0x7d58fa25b0a25858), I64(0x03c906ca8fcfc9c9), I64(0xa429558d527c2929), I64(0x280a5022145a0a0a), + I64(0xfeb1e14f7f50b1b1), I64(0xbaa0691a5dc9a0a0), I64(0xb16b7fdad6146b6b), I64(0x2e855cab17d98585), + I64(0xcebd8173673cbdbd), I64(0x695dd234ba8f5d5d), I64(0x4010805020901010), I64(0xf7f4f303f507f4f4), + I64(0x0bcb16c08bddcbcb), I64(0xf83eedc67cd33e3e), I64(0x140528110a2d0505), I64(0x81671fe6ce786767), + I64(0xb7e47353d597e4e4), I64(0x9c2725bb4e022727), I64(0x1941325882734141), I64(0x168b2c9d0ba78b8b), + I64(0xa6a7510153f6a7a7), I64(0xe97dcf94fab27d7d), I64(0x6e95dcfb37499595), I64(0x47d88e9fad56d8d8), + I64(0xcbfb8b30eb70fbfb), I64(0x9fee2371c1cdeeee), I64(0xed7cc791f8bb7c7c), I64(0x856617e3cc716666), + I64(0x53dda68ea77bdddd), I64(0x5c17b84b2eaf1717), I64(0x014702468e454747), I64(0x429e84dc211a9e9e), + I64(0x0fca1ec589d4caca), I64(0xb42d75995a582d2d), I64(0xc6bf9179632ebfbf), I64(0x1c07381b0e3f0707), + I64(0x8ead012347acadad), I64(0x755aea2fb4b05a5a), I64(0x36836cb51bef8383), I64(0xcc3385ff66b63333), + I64(0x91633ff2c65c6363), I64(0x0802100a04120202), I64(0x92aa39384993aaaa), I64(0xd971afa8e2de7171), + I64(0x07c80ecf8dc6c8c8), I64(0x6419c87d32d11919), I64(0x39497270923b4949), I64(0x43d9869aaf5fd9d9), + I64(0xeff2c31df931f2f2), I64(0xabe34b48dba8e3e3), I64(0x715be22ab6b95b5b), I64(0x1a8834920dbc8888), + I64(0x529aa4c8293e9a9a), I64(0x98262dbe4c0b2626), I64(0xc8328dfa64bf3232), I64(0xfab0e94a7d59b0b0), + I64(0x83e91b6acff2e9e9), I64(0x3c0f78331e770f0f), I64(0x73d5e6a6b733d5d5), I64(0x3a8074ba1df48080), + I64(0xc2be997c6127bebe), I64(0x13cd26de87ebcdcd), I64(0xd034bde468893434), I64(0x3d487a7590324848), + I64(0xdbffab24e354ffff), I64(0xf57af78ff48d7a7a), I64(0x7a90f4ea3d649090), I64(0x615fc23ebe9d5f5f), + I64(0x80201da0403d2020), I64(0xbd6867d5d00f6868), I64(0x681ad07234ca1a1a), I64(0x82ae192c41b7aeae), + I64(0xeab4c95e757db4b4), I64(0x4d549a19a8ce5454), I64(0x7693ece53b7f9393), I64(0x88220daa442f2222), + I64(0x8d6407e9c8636464), I64(0xe3f1db12ff2af1f1), I64(0xd173bfa2e6cc7373), I64(0x4812905a24821212), + I64(0x1d403a5d807a4040), I64(0x2008402810480808), I64(0x2bc356e89b95c3c3), I64(0x97ec337bc5dfecec), + I64(0x4bdb9690ab4ddbdb), I64(0xbea1611f5fc0a1a1), I64(0x0e8d1c8307918d8d), I64(0xf43df5c97ac83d3d), + I64(0x6697ccf1335b9797), I64(0x0000000000000000), I64(0x1bcf36d483f9cfcf), I64(0xac2b4587566e2b2b), + I64(0xc57697b3ece17676), I64(0x328264b019e68282), I64(0x7fd6fea9b128d6d6), I64(0x6c1bd87736c31b1b), + I64(0xeeb5c15b7774b5b5), I64(0x86af112943beafaf), I64(0xb56a77dfd41d6a6a), I64(0x5d50ba0da0ea5050), + I64(0x0945124c8a574545), I64(0xebf3cb18fb38f3f3), I64(0xc0309df060ad3030), I64(0x9bef2b74c3c4efef), + I64(0xfc3fe5c37eda3f3f), I64(0x4955921caac75555), I64(0xb2a2791059dba2a2), I64(0x8fea0365c9e9eaea), + I64(0x89650fecca6a6565), I64(0xd2bab9686903baba), I64(0xbc2f65935e4a2f2f), I64(0x27c04ee79d8ec0c0), + I64(0x5fdebe81a160dede), I64(0x701ce06c38fc1c1c), I64(0xd3fdbb2ee746fdfd), I64(0x294d52649a1f4d4d), + I64(0x7292e4e039769292), I64(0xc9758fbceafa7575), I64(0x1806301e0c360606), I64(0x128a249809ae8a8a), + I64(0xf2b2f940794bb2b2), I64(0xbfe66359d185e6e6), I64(0x380e70361c7e0e0e), I64(0x7c1ff8633ee71f1f), + I64(0x956237f7c4556262), I64(0x77d4eea3b53ad4d4), I64(0x9aa829324d81a8a8), I64(0x6296c4f431529696), + I64(0xc3f99b3aef62f9f9), I64(0x33c566f697a3c5c5), I64(0x942535b14a102525), I64(0x7959f220b2ab5959), + I64(0x2a8454ae15d08484), I64(0xd572b7a7e4c57272), I64(0xe439d5dd72ec3939), I64(0x2d4c5a6198164c4c), + I64(0x655eca3bbc945e5e), I64(0xfd78e785f09f7878), I64(0xe038ddd870e53838), I64(0x0a8c148605988c8c), + I64(0x63d1c6b2bf17d1d1), I64(0xaea5410b57e4a5a5), I64(0xafe2434dd9a1e2e2), I64(0x99612ff8c24e6161), + I64(0xf6b3f1457b42b3b3), I64(0x842115a542342121), I64(0x4a9c94d625089c9c), I64(0x781ef0663cee1e1e), + I64(0x1143225286614343), I64(0x3bc776fc93b1c7c7), I64(0xd7fcb32be54ffcfc), I64(0x1004201408240404), + I64(0x5951b208a2e35151), I64(0x5e99bcc72f259999), I64(0xa96d4fc4da226d6d), I64(0x340d68391a650d0d), + I64(0xcffa8335e979fafa), I64(0x5bdfb684a369dfdf), I64(0xe57ed79bfca97e7e), I64(0x90243db448192424), + I64(0xec3bc5d776fe3b3b), I64(0x96ab313d4b9aabab), I64(0x1fce3ed181f0cece), I64(0x4411885522991111), + I64(0x068f0c8903838f8f), I64(0x254e4a6b9c044e4e), I64(0xe6b7d1517366b7b7), I64(0x8beb0b60cbe0ebeb), + I64(0xf03cfdcc78c13c3c), I64(0x3e817cbf1ffd8181), I64(0x6a94d4fe35409494), I64(0xfbf7eb0cf31cf7f7), + I64(0xdeb9a1676f18b9b9), I64(0x4c13985f268b1313), I64(0xb02c7d9c58512c2c), I64(0x6bd3d6b8bb05d3d3), + I64(0xbbe76b5cd38ce7e7), I64(0xa56e57cbdc396e6e), I64(0x37c46ef395aac4c4), I64(0x0c03180f061b0303), + I64(0x45568a13acdc5656), I64(0x0d441a49885e4444), I64(0xe17fdf9efea07f7f), I64(0x9ea921374f88a9a9), + I64(0xa82a4d8254672a2a), I64(0xd6bbb16d6b0abbbb), I64(0x23c146e29f87c1c1), I64(0x5153a202a6f15353), + I64(0x57dcae8ba572dcdc), I64(0x2c0b582716530b0b), I64(0x4e9d9cd327019d9d), I64(0xad6c47c1d82b6c6c), + I64(0xc43195f562a43131), I64(0xcd7487b9e8f37474), I64(0xfff6e309f115f6f6), I64(0x05460a438c4c4646), + I64(0x8aac092645a5acac), I64(0x1e893c970fb58989), I64(0x5014a04428b41414), I64(0xa3e15b42dfbae1e1), + I64(0x5816b04e2ca61616), I64(0xe83acdd274f73a3a), I64(0xb9696fd0d2066969), I64(0x2409482d12410909), + I64(0xdd70a7ade0d77070), I64(0xe2b6d954716fb6b6), I64(0x67d0ceb7bd1ed0d0), I64(0x93ed3b7ec7d6eded), + I64(0x17cc2edb85e2cccc), I64(0x15422a5784684242), I64(0x5a98b4c22d2c9898), I64(0xaaa4490e55eda4a4), + I64(0xa0285d8850752828), I64(0x6d5cda31b8865c5c), I64(0xc7f8933fed6bf8f8), I64(0x228644a411c28686), + }, { + /* C7 vectors */ + I64(0x186018c07830d818), I64(0x238c2305af462623), I64(0xc63fc67ef991b8c6), I64(0xe887e8136fcdfbe8), + I64(0x8726874ca113cb87), I64(0xb8dab8a9626d11b8), I64(0x0104010805020901), I64(0x4f214f426e9e0d4f), + I64(0x36d836adee6c9b36), I64(0xa6a2a6590451ffa6), I64(0xd26fd2debdb90cd2), I64(0xf5f3f5fb06f70ef5), + I64(0x79f979ef80f29679), I64(0x6fa16f5fcede306f), I64(0x917e91fcef3f6d91), I64(0x525552aa07a4f852), + I64(0x609d6027fdc04760), I64(0xbccabc89766535bc), I64(0x9b569baccd2b379b), I64(0x8e028e048c018a8e), + I64(0xa3b6a371155bd2a3), I64(0x0c300c603c186c0c), I64(0x7bf17bff8af6847b), I64(0x35d435b5e16a8035), + I64(0x1d741de8693af51d), I64(0xe0a7e05347ddb3e0), I64(0xd77bd7f6acb321d7), I64(0xc22fc25eed999cc2), + I64(0x2eb82e6d965c432e), I64(0x4b314b627a96294b), I64(0xfedffea321e15dfe), I64(0x5741578216aed557), + I64(0x155415a8412abd15), I64(0x77c1779fb6eee877), I64(0x37dc37a5eb6e9237), I64(0xe5b3e57b56d79ee5), + I64(0x9f469f8cd923139f), I64(0xf0e7f0d317fd23f0), I64(0x4a354a6a7f94204a), I64(0xda4fda9e95a944da), + I64(0x587d58fa25b0a258), I64(0xc903c906ca8fcfc9), I64(0x29a429558d527c29), I64(0x0a280a5022145a0a), + I64(0xb1feb1e14f7f50b1), I64(0xa0baa0691a5dc9a0), I64(0x6bb16b7fdad6146b), I64(0x852e855cab17d985), + I64(0xbdcebd8173673cbd), I64(0x5d695dd234ba8f5d), I64(0x1040108050209010), I64(0xf4f7f4f303f507f4), + I64(0xcb0bcb16c08bddcb), I64(0x3ef83eedc67cd33e), I64(0x05140528110a2d05), I64(0x6781671fe6ce7867), + I64(0xe4b7e47353d597e4), I64(0x279c2725bb4e0227), I64(0x4119413258827341), I64(0x8b168b2c9d0ba78b), + I64(0xa7a6a7510153f6a7), I64(0x7de97dcf94fab27d), I64(0x956e95dcfb374995), I64(0xd847d88e9fad56d8), + I64(0xfbcbfb8b30eb70fb), I64(0xee9fee2371c1cdee), I64(0x7ced7cc791f8bb7c), I64(0x66856617e3cc7166), + I64(0xdd53dda68ea77bdd), I64(0x175c17b84b2eaf17), I64(0x47014702468e4547), I64(0x9e429e84dc211a9e), + I64(0xca0fca1ec589d4ca), I64(0x2db42d75995a582d), I64(0xbfc6bf9179632ebf), I64(0x071c07381b0e3f07), + I64(0xad8ead012347acad), I64(0x5a755aea2fb4b05a), I64(0x8336836cb51bef83), I64(0x33cc3385ff66b633), + I64(0x6391633ff2c65c63), I64(0x020802100a041202), I64(0xaa92aa39384993aa), I64(0x71d971afa8e2de71), + I64(0xc807c80ecf8dc6c8), I64(0x196419c87d32d119), I64(0x4939497270923b49), I64(0xd943d9869aaf5fd9), + I64(0xf2eff2c31df931f2), I64(0xe3abe34b48dba8e3), I64(0x5b715be22ab6b95b), I64(0x881a8834920dbc88), + I64(0x9a529aa4c8293e9a), I64(0x2698262dbe4c0b26), I64(0x32c8328dfa64bf32), I64(0xb0fab0e94a7d59b0), + I64(0xe983e91b6acff2e9), I64(0x0f3c0f78331e770f), I64(0xd573d5e6a6b733d5), I64(0x803a8074ba1df480), + I64(0xbec2be997c6127be), I64(0xcd13cd26de87ebcd), I64(0x34d034bde4688934), I64(0x483d487a75903248), + I64(0xffdbffab24e354ff), I64(0x7af57af78ff48d7a), I64(0x907a90f4ea3d6490), I64(0x5f615fc23ebe9d5f), + I64(0x2080201da0403d20), I64(0x68bd6867d5d00f68), I64(0x1a681ad07234ca1a), I64(0xae82ae192c41b7ae), + I64(0xb4eab4c95e757db4), I64(0x544d549a19a8ce54), I64(0x937693ece53b7f93), I64(0x2288220daa442f22), + I64(0x648d6407e9c86364), I64(0xf1e3f1db12ff2af1), I64(0x73d173bfa2e6cc73), I64(0x124812905a248212), + I64(0x401d403a5d807a40), I64(0x0820084028104808), I64(0xc32bc356e89b95c3), I64(0xec97ec337bc5dfec), + I64(0xdb4bdb9690ab4ddb), I64(0xa1bea1611f5fc0a1), I64(0x8d0e8d1c8307918d), I64(0x3df43df5c97ac83d), + I64(0x976697ccf1335b97), I64(0x0000000000000000), I64(0xcf1bcf36d483f9cf), I64(0x2bac2b4587566e2b), + I64(0x76c57697b3ece176), I64(0x82328264b019e682), I64(0xd67fd6fea9b128d6), I64(0x1b6c1bd87736c31b), + I64(0xb5eeb5c15b7774b5), I64(0xaf86af112943beaf), I64(0x6ab56a77dfd41d6a), I64(0x505d50ba0da0ea50), + I64(0x450945124c8a5745), I64(0xf3ebf3cb18fb38f3), I64(0x30c0309df060ad30), I64(0xef9bef2b74c3c4ef), + I64(0x3ffc3fe5c37eda3f), I64(0x554955921caac755), I64(0xa2b2a2791059dba2), I64(0xea8fea0365c9e9ea), + I64(0x6589650fecca6a65), I64(0xbad2bab9686903ba), I64(0x2fbc2f65935e4a2f), I64(0xc027c04ee79d8ec0), + I64(0xde5fdebe81a160de), I64(0x1c701ce06c38fc1c), I64(0xfdd3fdbb2ee746fd), I64(0x4d294d52649a1f4d), + I64(0x927292e4e0397692), I64(0x75c9758fbceafa75), I64(0x061806301e0c3606), I64(0x8a128a249809ae8a), + I64(0xb2f2b2f940794bb2), I64(0xe6bfe66359d185e6), I64(0x0e380e70361c7e0e), I64(0x1f7c1ff8633ee71f), + I64(0x62956237f7c45562), I64(0xd477d4eea3b53ad4), I64(0xa89aa829324d81a8), I64(0x966296c4f4315296), + I64(0xf9c3f99b3aef62f9), I64(0xc533c566f697a3c5), I64(0x25942535b14a1025), I64(0x597959f220b2ab59), + I64(0x842a8454ae15d084), I64(0x72d572b7a7e4c572), I64(0x39e439d5dd72ec39), I64(0x4c2d4c5a6198164c), + I64(0x5e655eca3bbc945e), I64(0x78fd78e785f09f78), I64(0x38e038ddd870e538), I64(0x8c0a8c148605988c), + I64(0xd163d1c6b2bf17d1), I64(0xa5aea5410b57e4a5), I64(0xe2afe2434dd9a1e2), I64(0x6199612ff8c24e61), + I64(0xb3f6b3f1457b42b3), I64(0x21842115a5423421), I64(0x9c4a9c94d625089c), I64(0x1e781ef0663cee1e), + I64(0x4311432252866143), I64(0xc73bc776fc93b1c7), I64(0xfcd7fcb32be54ffc), I64(0x0410042014082404), + I64(0x515951b208a2e351), I64(0x995e99bcc72f2599), I64(0x6da96d4fc4da226d), I64(0x0d340d68391a650d), + I64(0xfacffa8335e979fa), I64(0xdf5bdfb684a369df), I64(0x7ee57ed79bfca97e), I64(0x2490243db4481924), + I64(0x3bec3bc5d776fe3b), I64(0xab96ab313d4b9aab), I64(0xce1fce3ed181f0ce), I64(0x1144118855229911), + I64(0x8f068f0c8903838f), I64(0x4e254e4a6b9c044e), I64(0xb7e6b7d1517366b7), I64(0xeb8beb0b60cbe0eb), + I64(0x3cf03cfdcc78c13c), I64(0x813e817cbf1ffd81), I64(0x946a94d4fe354094), I64(0xf7fbf7eb0cf31cf7), + I64(0xb9deb9a1676f18b9), I64(0x134c13985f268b13), I64(0x2cb02c7d9c58512c), I64(0xd36bd3d6b8bb05d3), + I64(0xe7bbe76b5cd38ce7), I64(0x6ea56e57cbdc396e), I64(0xc437c46ef395aac4), I64(0x030c03180f061b03), + I64(0x5645568a13acdc56), I64(0x440d441a49885e44), I64(0x7fe17fdf9efea07f), I64(0xa99ea921374f88a9), + I64(0x2aa82a4d8254672a), I64(0xbbd6bbb16d6b0abb), I64(0xc123c146e29f87c1), I64(0x535153a202a6f153), + I64(0xdc57dcae8ba572dc), I64(0x0b2c0b582716530b), I64(0x9d4e9d9cd327019d), I64(0x6cad6c47c1d82b6c), + I64(0x31c43195f562a431), I64(0x74cd7487b9e8f374), I64(0xf6fff6e309f115f6), I64(0x4605460a438c4c46), + I64(0xac8aac092645a5ac), I64(0x891e893c970fb589), I64(0x145014a04428b414), I64(0xe1a3e15b42dfbae1), + I64(0x165816b04e2ca616), I64(0x3ae83acdd274f73a), I64(0x69b9696fd0d20669), I64(0x092409482d124109), + I64(0x70dd70a7ade0d770), I64(0xb6e2b6d954716fb6), I64(0xd067d0ceb7bd1ed0), I64(0xed93ed3b7ec7d6ed), + I64(0xcc17cc2edb85e2cc), I64(0x4215422a57846842), I64(0x985a98b4c22d2c98), I64(0xa4aaa4490e55eda4), + I64(0x28a0285d88507528), I64(0x5c6d5cda31b8865c), I64(0xf8c7f8933fed6bf8), I64(0x86228644a411c286), + } +}; +/* end of whirlpool_sbox array */ From f4f8d68af2cd3466c489f2019652e3753c1e8bfd Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:19:16 -0500 Subject: [PATCH 346/576] Create cmll-x86.pl --- .../open_ssl/camellia/asm/cmll-x86.pl | 1138 +++++++++++++++++ 1 file changed, 1138 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmll-x86.pl diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmll-x86.pl b/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmll-x86.pl new file mode 100644 index 000000000..c314d6231 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmll-x86.pl @@ -0,0 +1,1138 @@ +#!/usr/bin/env perl + +# ==================================================================== +# Copyright (c) 2008 Andy Polyakov +# +# This module may be used under the terms of either the GNU General +# Public License version 2 or later, the GNU Lesser General Public +# License version 2.1 or later, the Mozilla Public License version +# 1.1 or the BSD License. The exact terms of either license are +# distributed along with this module. For further details see +# http://www.openssl.org/~appro/camellia/. +# ==================================================================== + +# Performance in cycles per processed byte (less is better) in +# 'openssl speed ...' benchmark: +# +# AMD K8 Core2 PIII P4 +# -evp camellia-128-ecb 21.5 22.8 27.0 28.9 +# + over gcc 3.4.6 +90/11% +70/10% +53/4% +160/64% +# + over icc 8.0 +48/19% +21/15% +21/17% +55/37% +# +# camellia-128-cbc 17.3 21.1 23.9 25.9 +# +# 128-bit key setup 196 280 256 240 cycles/key +# + over gcc 3.4.6 +30/0% +17/11% +11/0% +63/40% +# + over icc 8.0 +18/3% +10/0% +10/3% +21/10% +# +# Pairs of numbers in "+" rows represent performance improvement over +# compiler generated position-independent code, PIC, and non-PIC +# respectively. PIC results are of greater relevance, as this module +# is position-independent, i.e. suitable for a shared library or PIE. +# Position independence "costs" one register, which is why compilers +# are so close with non-PIC results, they have an extra register to +# spare. CBC results are better than ECB ones thanks to "zero-copy" +# private _x86_* interface, and are ~30-40% better than with compiler +# generated cmll_cbc.o, and reach ~80-90% of x86_64 performance on +# same CPU (where applicable). + +$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; +push(@INC,"${dir}","${dir}../../perlasm"); +require "x86asm.pl"; + +$OPENSSL=1; + +&asm_init($ARGV[0],"cmll-586.pl",$ARGV[$#ARGV] eq "386"); + +@T=("eax","ebx","ecx","edx"); +$idx="esi"; +$key="edi"; +$Tbl="ebp"; + +# stack frame layout in _x86_Camellia_* routines, frame is allocated +# by caller +$__ra=&DWP(0,"esp"); # return address +$__s0=&DWP(4,"esp"); # s0 backing store +$__s1=&DWP(8,"esp"); # s1 backing store +$__s2=&DWP(12,"esp"); # s2 backing store +$__s3=&DWP(16,"esp"); # s3 backing store +$__end=&DWP(20,"esp"); # pointer to end/start of key schedule + +# stack frame layout in Camellia_[en|crypt] routines, which differs from +# above by 4 and overlaps by pointer to end/start of key schedule +$_end=&DWP(16,"esp"); +$_esp=&DWP(20,"esp"); + +# const unsigned int Camellia_SBOX[4][256]; +# Well, sort of... Camellia_SBOX[0][] is interleaved with [1][], +# and [2][] - with [3][]. This is done to optimize code size. +$SBOX1_1110=0; # Camellia_SBOX[0] +$SBOX4_4404=4; # Camellia_SBOX[1] +$SBOX2_0222=2048; # Camellia_SBOX[2] +$SBOX3_3033=2052; # Camellia_SBOX[3] +&static_label("Camellia_SIGMA"); +&static_label("Camellia_SBOX"); + +sub Camellia_Feistel { +my $i=@_[0]; +my $seed=defined(@_[1])?@_[1]:0; +my $scale=$seed<0?-8:8; +my $frame=defined(@_[2])?@_[2]:0; +my $j=($i&1)*2; +my $t0=@T[($j)%4],$t1=@T[($j+1)%4],$t2=@T[($j+2)%4],$t3=@T[($j+3)%4]; + + &xor ($t0,$idx); # t0^=key[0] + &xor ($t1,&DWP($seed+$i*$scale+4,$key)); # t1^=key[1] + &movz ($idx,&HB($t0)); # (t0>>8)&0xff + &mov ($t3,&DWP($SBOX3_3033,$Tbl,$idx,8)); # t3=SBOX3_3033[0] + &movz ($idx,&LB($t0)); # (t0>>0)&0xff + &xor ($t3,&DWP($SBOX4_4404,$Tbl,$idx,8)); # t3^=SBOX4_4404[0] + &shr ($t0,16); + &movz ($idx,&LB($t1)); # (t1>>0)&0xff + &mov ($t2,&DWP($SBOX1_1110,$Tbl,$idx,8)); # t2=SBOX1_1110[1] + &movz ($idx,&HB($t0)); # (t0>>24)&0xff + &xor ($t3,&DWP($SBOX1_1110,$Tbl,$idx,8)); # t3^=SBOX1_1110[0] + &movz ($idx,&HB($t1)); # (t1>>8)&0xff + &xor ($t2,&DWP($SBOX4_4404,$Tbl,$idx,8)); # t2^=SBOX4_4404[1] + &shr ($t1,16); + &movz ($t0,&LB($t0)); # (t0>>16)&0xff + &xor ($t3,&DWP($SBOX2_0222,$Tbl,$t0,8)); # t3^=SBOX2_0222[0] + &movz ($idx,&HB($t1)); # (t1>>24)&0xff + &mov ($t0,&DWP($frame+4*(($j+3)%4),"esp")); # prefetch "s3" + &xor ($t2,$t3); # t2^=t3 + &rotr ($t3,8); # t3=RightRotate(t3,8) + &xor ($t2,&DWP($SBOX2_0222,$Tbl,$idx,8)); # t2^=SBOX2_0222[1] + &movz ($idx,&LB($t1)); # (t1>>16)&0xff + &mov ($t1,&DWP($frame+4*(($j+2)%4),"esp")); # prefetch "s2" + &xor ($t3,$t0); # t3^=s3 + &xor ($t2,&DWP($SBOX3_3033,$Tbl,$idx,8)); # t2^=SBOX3_3033[1] + &mov ($idx,&DWP($seed+($i+1)*$scale,$key)); # prefetch key[i+1] + &xor ($t3,$t2); # t3^=t2 + &mov (&DWP($frame+4*(($j+3)%4),"esp"),$t3); # s3=t3 + &xor ($t2,$t1); # t2^=s2 + &mov (&DWP($frame+4*(($j+2)%4),"esp"),$t2); # s2=t2 +} + +# void Camellia_EncryptBlock_Rounds( +# int grandRounds, +# const Byte plaintext[], +# const KEY_TABLE_TYPE keyTable, +# Byte ciphertext[]) +&function_begin("Camellia_EncryptBlock_Rounds"); + &mov ("eax",&wparam(0)); # load grandRounds + &mov ($idx,&wparam(1)); # load plaintext pointer + &mov ($key,&wparam(2)); # load key schedule pointer + + &mov ("ebx","esp"); + &sub ("esp",7*4); # place for s[0-3],keyEnd,esp and ra + &and ("esp",-64); + + # place stack frame just "above mod 1024" the key schedule + # this ensures that cache associativity of 2 suffices + &lea ("ecx",&DWP(-64-63,$key)); + &sub ("ecx","esp"); + &neg ("ecx"); + &and ("ecx",0x3C0); # modulo 1024, but aligned to cache-line + &sub ("esp","ecx"); + &add ("esp",4); # 4 is reserved for callee's return address + + &shl ("eax",6); + &lea ("eax",&DWP(0,$key,"eax")); + &mov ($_esp,"ebx"); # save %esp + &mov ($_end,"eax"); # save keyEnd + + &call (&label("pic_point")); + &set_label("pic_point"); + &blindpop($Tbl); + &lea ($Tbl,&DWP(&label("Camellia_SBOX")."-".&label("pic_point"),$Tbl)); + + &mov (@T[0],&DWP(0,$idx)); # load plaintext + &mov (@T[1],&DWP(4,$idx)); + &mov (@T[2],&DWP(8,$idx)); + &bswap (@T[0]); + &mov (@T[3],&DWP(12,$idx)); + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + + &call ("_x86_Camellia_encrypt"); + + &mov ("esp",$_esp); + &bswap (@T[0]); + &mov ($idx,&wparam(3)); # load ciphertext pointer + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + &mov (&DWP(0,$idx),@T[0]); # write ciphertext + &mov (&DWP(4,$idx),@T[1]); + &mov (&DWP(8,$idx),@T[2]); + &mov (&DWP(12,$idx),@T[3]); +&function_end("Camellia_EncryptBlock_Rounds"); +# V1.x API +&function_begin_B("Camellia_EncryptBlock"); + &mov ("eax",128); + &sub ("eax",&wparam(0)); # load keyBitLength + &mov ("eax",3); + &adc ("eax",0); # keyBitLength==128?3:4 + &mov (&wparam(0),"eax"); + &jmp (&label("Camellia_EncryptBlock_Rounds")); +&function_end_B("Camellia_EncryptBlock"); + +if ($OPENSSL) { +# void Camellia_encrypt( +# const unsigned char *in, +# unsigned char *out, +# const CAMELLIA_KEY *key) +&function_begin("Camellia_encrypt"); + &mov ($idx,&wparam(0)); # load plaintext pointer + &mov ($key,&wparam(2)); # load key schedule pointer + + &mov ("ebx","esp"); + &sub ("esp",7*4); # place for s[0-3],keyEnd,esp and ra + &and ("esp",-64); + &mov ("eax",&DWP(272,$key)); # load grandRounds counter + + # place stack frame just "above mod 1024" the key schedule + # this ensures that cache associativity of 2 suffices + &lea ("ecx",&DWP(-64-63,$key)); + &sub ("ecx","esp"); + &neg ("ecx"); + &and ("ecx",0x3C0); # modulo 1024, but aligned to cache-line + &sub ("esp","ecx"); + &add ("esp",4); # 4 is reserved for callee's return address + + &shl ("eax",6); + &lea ("eax",&DWP(0,$key,"eax")); + &mov ($_esp,"ebx"); # save %esp + &mov ($_end,"eax"); # save keyEnd + + &call (&label("pic_point")); + &set_label("pic_point"); + &blindpop($Tbl); + &lea ($Tbl,&DWP(&label("Camellia_SBOX")."-".&label("pic_point"),$Tbl)); + + &mov (@T[0],&DWP(0,$idx)); # load plaintext + &mov (@T[1],&DWP(4,$idx)); + &mov (@T[2],&DWP(8,$idx)); + &bswap (@T[0]); + &mov (@T[3],&DWP(12,$idx)); + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + + &call ("_x86_Camellia_encrypt"); + + &mov ("esp",$_esp); + &bswap (@T[0]); + &mov ($idx,&wparam(1)); # load ciphertext pointer + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + &mov (&DWP(0,$idx),@T[0]); # write ciphertext + &mov (&DWP(4,$idx),@T[1]); + &mov (&DWP(8,$idx),@T[2]); + &mov (&DWP(12,$idx),@T[3]); +&function_end("Camellia_encrypt"); +} + +&function_begin_B("_x86_Camellia_encrypt"); + &xor (@T[0],&DWP(0,$key)); # ^=key[0-3] + &xor (@T[1],&DWP(4,$key)); + &xor (@T[2],&DWP(8,$key)); + &xor (@T[3],&DWP(12,$key)); + &mov ($idx,&DWP(16,$key)); # prefetch key[4] + + &mov ($__s0,@T[0]); # save s[0-3] + &mov ($__s1,@T[1]); + &mov ($__s2,@T[2]); + &mov ($__s3,@T[3]); + +&set_label("loop",16); + for ($i=0;$i<6;$i++) { Camellia_Feistel($i,16,4); } + + &add ($key,16*4); + &cmp ($key,$__end); + &je (&label("done")); + + # @T[0-1] are preloaded, $idx is preloaded with key[0] + &and ($idx,@T[0]); + &mov (@T[3],$__s3); + &rotl ($idx,1); + &mov (@T[2],@T[3]); + &xor (@T[1],$idx); + &or (@T[2],&DWP(12,$key)); + &mov ($__s1,@T[1]); # s1^=LeftRotate(s0&key[0],1); + &xor (@T[2],$__s2); + + &mov ($idx,&DWP(4,$key)); + &mov ($__s2,@T[2]); # s2^=s3|key[3]; + &or ($idx,@T[1]); + &and (@T[2],&DWP(8,$key)); + &xor (@T[0],$idx); + &rotl (@T[2],1); + &mov ($__s0,@T[0]); # s0^=s1|key[1]; + &xor (@T[3],@T[2]); + &mov ($idx,&DWP(16,$key)); # prefetch key[4] + &mov ($__s3,@T[3]); # s3^=LeftRotate(s2&key[2],1); + &jmp (&label("loop")); + +&set_label("done",8); + &mov (@T[2],@T[0]); # SwapHalf + &mov (@T[3],@T[1]); + &mov (@T[0],$__s2); + &mov (@T[1],$__s3); + &xor (@T[0],$idx); # $idx is preloaded with key[0] + &xor (@T[1],&DWP(4,$key)); + &xor (@T[2],&DWP(8,$key)); + &xor (@T[3],&DWP(12,$key)); + &ret (); +&function_end_B("_x86_Camellia_encrypt"); + +# void Camellia_DecryptBlock_Rounds( +# int grandRounds, +# const Byte ciphertext[], +# const KEY_TABLE_TYPE keyTable, +# Byte plaintext[]) +&function_begin("Camellia_DecryptBlock_Rounds"); + &mov ("eax",&wparam(0)); # load grandRounds + &mov ($idx,&wparam(1)); # load ciphertext pointer + &mov ($key,&wparam(2)); # load key schedule pointer + + &mov ("ebx","esp"); + &sub ("esp",7*4); # place for s[0-3],keyEnd,esp and ra + &and ("esp",-64); + + # place stack frame just "above mod 1024" the key schedule + # this ensures that cache associativity of 2 suffices + &lea ("ecx",&DWP(-64-63,$key)); + &sub ("ecx","esp"); + &neg ("ecx"); + &and ("ecx",0x3C0); # modulo 1024, but aligned to cache-line + &sub ("esp","ecx"); + &add ("esp",4); # 4 is reserved for callee's return address + + &shl ("eax",6); + &mov (&DWP(4*4,"esp"),$key); # save keyStart + &lea ($key,&DWP(0,$key,"eax")); + &mov (&DWP(5*4,"esp"),"ebx");# save %esp + + &call (&label("pic_point")); + &set_label("pic_point"); + &blindpop($Tbl); + &lea ($Tbl,&DWP(&label("Camellia_SBOX")."-".&label("pic_point"),$Tbl)); + + &mov (@T[0],&DWP(0,$idx)); # load ciphertext + &mov (@T[1],&DWP(4,$idx)); + &mov (@T[2],&DWP(8,$idx)); + &bswap (@T[0]); + &mov (@T[3],&DWP(12,$idx)); + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + + &call ("_x86_Camellia_decrypt"); + + &mov ("esp",&DWP(5*4,"esp")); + &bswap (@T[0]); + &mov ($idx,&wparam(3)); # load plaintext pointer + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + &mov (&DWP(0,$idx),@T[0]); # write plaintext + &mov (&DWP(4,$idx),@T[1]); + &mov (&DWP(8,$idx),@T[2]); + &mov (&DWP(12,$idx),@T[3]); +&function_end("Camellia_DecryptBlock_Rounds"); +# V1.x API +&function_begin_B("Camellia_DecryptBlock"); + &mov ("eax",128); + &sub ("eax",&wparam(0)); # load keyBitLength + &mov ("eax",3); + &adc ("eax",0); # keyBitLength==128?3:4 + &mov (&wparam(0),"eax"); + &jmp (&label("Camellia_DecryptBlock_Rounds")); +&function_end_B("Camellia_DecryptBlock"); + +if ($OPENSSL) { +# void Camellia_decrypt( +# const unsigned char *in, +# unsigned char *out, +# const CAMELLIA_KEY *key) +&function_begin("Camellia_decrypt"); + &mov ($idx,&wparam(0)); # load ciphertext pointer + &mov ($key,&wparam(2)); # load key schedule pointer + + &mov ("ebx","esp"); + &sub ("esp",7*4); # place for s[0-3],keyEnd,esp and ra + &and ("esp",-64); + &mov ("eax",&DWP(272,$key)); # load grandRounds counter + + # place stack frame just "above mod 1024" the key schedule + # this ensures that cache associativity of 2 suffices + &lea ("ecx",&DWP(-64-63,$key)); + &sub ("ecx","esp"); + &neg ("ecx"); + &and ("ecx",0x3C0); # modulo 1024, but aligned to cache-line + &sub ("esp","ecx"); + &add ("esp",4); # 4 is reserved for callee's return address + + &shl ("eax",6); + &mov (&DWP(4*4,"esp"),$key); # save keyStart + &lea ($key,&DWP(0,$key,"eax")); + &mov (&DWP(5*4,"esp"),"ebx");# save %esp + + &call (&label("pic_point")); + &set_label("pic_point"); + &blindpop($Tbl); + &lea ($Tbl,&DWP(&label("Camellia_SBOX")."-".&label("pic_point"),$Tbl)); + + &mov (@T[0],&DWP(0,$idx)); # load ciphertext + &mov (@T[1],&DWP(4,$idx)); + &mov (@T[2],&DWP(8,$idx)); + &bswap (@T[0]); + &mov (@T[3],&DWP(12,$idx)); + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + + &call ("_x86_Camellia_decrypt"); + + &mov ("esp",&DWP(5*4,"esp")); + &bswap (@T[0]); + &mov ($idx,&wparam(1)); # load plaintext pointer + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + &mov (&DWP(0,$idx),@T[0]); # write plaintext + &mov (&DWP(4,$idx),@T[1]); + &mov (&DWP(8,$idx),@T[2]); + &mov (&DWP(12,$idx),@T[3]); +&function_end("Camellia_decrypt"); +} + +&function_begin_B("_x86_Camellia_decrypt"); + &xor (@T[0],&DWP(0,$key)); # ^=key[0-3] + &xor (@T[1],&DWP(4,$key)); + &xor (@T[2],&DWP(8,$key)); + &xor (@T[3],&DWP(12,$key)); + &mov ($idx,&DWP(-8,$key)); # prefetch key[-2] + + &mov ($__s0,@T[0]); # save s[0-3] + &mov ($__s1,@T[1]); + &mov ($__s2,@T[2]); + &mov ($__s3,@T[3]); + +&set_label("loop",16); + for ($i=0;$i<6;$i++) { Camellia_Feistel($i,-8,4); } + + &sub ($key,16*4); + &cmp ($key,$__end); + &je (&label("done")); + + # @T[0-1] are preloaded, $idx is preloaded with key[2] + &and ($idx,@T[0]); + &mov (@T[3],$__s3); + &rotl ($idx,1); + &mov (@T[2],@T[3]); + &xor (@T[1],$idx); + &or (@T[2],&DWP(4,$key)); + &mov ($__s1,@T[1]); # s1^=LeftRotate(s0&key[0],1); + &xor (@T[2],$__s2); + + &mov ($idx,&DWP(12,$key)); + &mov ($__s2,@T[2]); # s2^=s3|key[3]; + &or ($idx,@T[1]); + &and (@T[2],&DWP(0,$key)); + &xor (@T[0],$idx); + &rotl (@T[2],1); + &mov ($__s0,@T[0]); # s0^=s1|key[1]; + &xor (@T[3],@T[2]); + &mov ($idx,&DWP(-8,$key)); # prefetch key[4] + &mov ($__s3,@T[3]); # s3^=LeftRotate(s2&key[2],1); + &jmp (&label("loop")); + +&set_label("done",8); + &mov (@T[2],@T[0]); # SwapHalf + &mov (@T[3],@T[1]); + &mov (@T[0],$__s2); + &mov (@T[1],$__s3); + &xor (@T[2],$idx); # $idx is preloaded with key[2] + &xor (@T[3],&DWP(12,$key)); + &xor (@T[0],&DWP(0,$key)); + &xor (@T[1],&DWP(4,$key)); + &ret (); +&function_end_B("_x86_Camellia_decrypt"); + +# shld is very slow on Intel P4 family. Even on AMD it limits +# instruction decode rate [because it's VectorPath] and consequently +# performance. PIII, PM and Core[2] seem to be the only ones which +# execute this code ~7% faster... +sub __rotl128 { + my ($i0,$i1,$i2,$i3,$rot,$rnd,@T)=@_; + + $rnd *= 2; + if ($rot) { + &mov ($idx,$i0); + &shld ($i0,$i1,$rot); + &shld ($i1,$i2,$rot); + &shld ($i2,$i3,$rot); + &shld ($i3,$idx,$rot); + } + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i0 eq @T[0]); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i1 eq @T[0]); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i2 eq @T[0]); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i3 eq @T[0]); +} + +# ... Implementing 128-bit rotate without shld gives >3x performance +# improvement on P4, only ~7% degradation on other Intel CPUs and +# not worse performance on AMD. This is therefore preferred. +sub _rotl128 { + my ($i0,$i1,$i2,$i3,$rot,$rnd,@T)=@_; + + $rnd *= 2; + if ($rot) { + &mov ($Tbl,$i0); + &shl ($i0,$rot); + &mov ($idx,$i1); + &shr ($idx,32-$rot); + &shl ($i1,$rot); + &or ($i0,$idx); + &mov ($idx,$i2); + &shl ($i2,$rot); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i0 eq @T[0]); + &shr ($idx,32-$rot); + &or ($i1,$idx); + &shr ($Tbl,32-$rot); + &mov ($idx,$i3); + &shr ($idx,32-$rot); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i1 eq @T[0]); + &shl ($i3,$rot); + &or ($i2,$idx); + &or ($i3,$Tbl); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i2 eq @T[0]); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i3 eq @T[0]); + } else { + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i0 eq @T[0]); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i1 eq @T[0]); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i2 eq @T[0]); + &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i3 eq @T[0]); + } +} + +sub _saveround { +my ($rnd,$key,@T)=@_; +my $bias=int(@T[0])?shift(@T):0; + + &mov (&DWP($bias+$rnd*8+0,$key),@T[0]); + &mov (&DWP($bias+$rnd*8+4,$key),@T[1]) if ($#T>=1); + &mov (&DWP($bias+$rnd*8+8,$key),@T[2]) if ($#T>=2); + &mov (&DWP($bias+$rnd*8+12,$key),@T[3]) if ($#T>=3); +} + +sub _loadround { +my ($rnd,$key,@T)=@_; +my $bias=int(@T[0])?shift(@T):0; + + &mov (@T[0],&DWP($bias+$rnd*8+0,$key)); + &mov (@T[1],&DWP($bias+$rnd*8+4,$key)) if ($#T>=1); + &mov (@T[2],&DWP($bias+$rnd*8+8,$key)) if ($#T>=2); + &mov (@T[3],&DWP($bias+$rnd*8+12,$key)) if ($#T>=3); +} + +# void Camellia_Ekeygen( +# const int keyBitLength, +# const Byte *rawKey, +# KEY_TABLE_TYPE keyTable) +&function_begin("Camellia_Ekeygen"); +{ my $step=0; + + &stack_push(4); # place for s[0-3] + + &mov ($Tbl,&wparam(0)); # load arguments + &mov ($idx,&wparam(1)); + &mov ($key,&wparam(2)); + + &mov (@T[0],&DWP(0,$idx)); # load 0-127 bits + &mov (@T[1],&DWP(4,$idx)); + &mov (@T[2],&DWP(8,$idx)); + &mov (@T[3],&DWP(12,$idx)); + + &bswap (@T[0]); + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + + &_saveround (0,$key,@T); # KL<<<0 + + &cmp ($Tbl,128); + &je (&label("1st128")); + + &mov (@T[0],&DWP(16,$idx)); # load 128-191 bits + &mov (@T[1],&DWP(20,$idx)); + &cmp ($Tbl,192); + &je (&label("1st192")); + &mov (@T[2],&DWP(24,$idx)); # load 192-255 bits + &mov (@T[3],&DWP(28,$idx)); + &jmp (&label("1st256")); +&set_label("1st192",4); + &mov (@T[2],@T[0]); + &mov (@T[3],@T[1]); + ¬ (@T[2]); + ¬ (@T[3]); +&set_label("1st256",4); + &bswap (@T[0]); + &bswap (@T[1]); + &bswap (@T[2]); + &bswap (@T[3]); + + &_saveround (4,$key,@T); # temporary storage for KR! + + &xor (@T[0],&DWP(0*8+0,$key)); # KR^KL + &xor (@T[1],&DWP(0*8+4,$key)); + &xor (@T[2],&DWP(1*8+0,$key)); + &xor (@T[3],&DWP(1*8+4,$key)); + +&set_label("1st128",4); + &call (&label("pic_point")); + &set_label("pic_point"); + &blindpop($Tbl); + &lea ($Tbl,&DWP(&label("Camellia_SBOX")."-".&label("pic_point"),$Tbl)); + &lea ($key,&DWP(&label("Camellia_SIGMA")."-".&label("Camellia_SBOX"),$Tbl)); + + &mov ($idx,&DWP($step*8,$key)); # prefetch SIGMA[0] + &mov (&swtmp(0),@T[0]); # save s[0-3] + &mov (&swtmp(1),@T[1]); + &mov (&swtmp(2),@T[2]); + &mov (&swtmp(3),@T[3]); + &Camellia_Feistel($step++); + &Camellia_Feistel($step++); + &mov (@T[2],&swtmp(2)); + &mov (@T[3],&swtmp(3)); + + &mov ($idx,&wparam(2)); + &xor (@T[0],&DWP(0*8+0,$idx)); # ^KL + &xor (@T[1],&DWP(0*8+4,$idx)); + &xor (@T[2],&DWP(1*8+0,$idx)); + &xor (@T[3],&DWP(1*8+4,$idx)); + + &mov ($idx,&DWP($step*8,$key)); # prefetch SIGMA[4] + &mov (&swtmp(0),@T[0]); # save s[0-3] + &mov (&swtmp(1),@T[1]); + &mov (&swtmp(2),@T[2]); + &mov (&swtmp(3),@T[3]); + &Camellia_Feistel($step++); + &Camellia_Feistel($step++); + &mov (@T[2],&swtmp(2)); + &mov (@T[3],&swtmp(3)); + + &mov ($idx,&wparam(0)); + &cmp ($idx,128); + &jne (&label("2nd256")); + + &mov ($key,&wparam(2)); + &lea ($key,&DWP(128,$key)); # size optimization + + ####### process KA + &_saveround (2,$key,-128,@T); # KA<<<0 + &_rotl128 (@T,15,6,@T); # KA<<<15 + &_rotl128 (@T,15,8,@T); # KA<<<(15+15=30) + &_rotl128 (@T,15,12,@T[0],@T[1]); # KA<<<(30+15=45) + &_rotl128 (@T,15,14,@T); # KA<<<(45+15=60) + push (@T,shift(@T)); # rotl128(@T,32); + &_rotl128 (@T,2,20,@T); # KA<<<(60+32+2=94) + &_rotl128 (@T,17,24,@T); # KA<<<(94+17=111) + + ####### process KL + &_loadround (0,$key,-128,@T); # load KL + &_rotl128 (@T,15,4,@T); # KL<<<15 + &_rotl128 (@T,30,10,@T); # KL<<<(15+30=45) + &_rotl128 (@T,15,13,@T[2],@T[3]); # KL<<<(45+15=60) + &_rotl128 (@T,17,16,@T); # KL<<<(60+17=77) + &_rotl128 (@T,17,18,@T); # KL<<<(77+17=94) + &_rotl128 (@T,17,22,@T); # KL<<<(94+17=111) + + while (@T[0] ne "eax") # restore order + { unshift (@T,pop(@T)); } + + &mov ("eax",3); # 3 grandRounds + &jmp (&label("done")); + +&set_label("2nd256",16); + &mov ($idx,&wparam(2)); + &_saveround (6,$idx,@T); # temporary storage for KA! + + &xor (@T[0],&DWP(4*8+0,$idx)); # KA^KR + &xor (@T[1],&DWP(4*8+4,$idx)); + &xor (@T[2],&DWP(5*8+0,$idx)); + &xor (@T[3],&DWP(5*8+4,$idx)); + + &mov ($idx,&DWP($step*8,$key)); # prefetch SIGMA[8] + &mov (&swtmp(0),@T[0]); # save s[0-3] + &mov (&swtmp(1),@T[1]); + &mov (&swtmp(2),@T[2]); + &mov (&swtmp(3),@T[3]); + &Camellia_Feistel($step++); + &Camellia_Feistel($step++); + &mov (@T[2],&swtmp(2)); + &mov (@T[3],&swtmp(3)); + + &mov ($key,&wparam(2)); + &lea ($key,&DWP(128,$key)); # size optimization + + ####### process KB + &_saveround (2,$key,-128,@T); # KB<<<0 + &_rotl128 (@T,30,10,@T); # KB<<<30 + &_rotl128 (@T,30,20,@T); # KB<<<(30+30=60) + push (@T,shift(@T)); # rotl128(@T,32); + &_rotl128 (@T,19,32,@T); # KB<<<(60+32+19=111) + + ####### process KR + &_loadround (4,$key,-128,@T); # load KR + &_rotl128 (@T,15,4,@T); # KR<<<15 + &_rotl128 (@T,15,8,@T); # KR<<<(15+15=30) + &_rotl128 (@T,30,18,@T); # KR<<<(30+30=60) + push (@T,shift(@T)); # rotl128(@T,32); + &_rotl128 (@T,2,26,@T); # KR<<<(60+32+2=94) + + ####### process KA + &_loadround (6,$key,-128,@T); # load KA + &_rotl128 (@T,15,6,@T); # KA<<<15 + &_rotl128 (@T,30,14,@T); # KA<<<(15+30=45) + push (@T,shift(@T)); # rotl128(@T,32); + &_rotl128 (@T,0,24,@T); # KA<<<(45+32+0=77) + &_rotl128 (@T,17,28,@T); # KA<<<(77+17=94) + + ####### process KL + &_loadround (0,$key,-128,@T); # load KL + push (@T,shift(@T)); # rotl128(@T,32); + &_rotl128 (@T,13,12,@T); # KL<<<(32+13=45) + &_rotl128 (@T,15,16,@T); # KL<<<(45+15=60) + &_rotl128 (@T,17,22,@T); # KL<<<(60+17=77) + push (@T,shift(@T)); # rotl128(@T,32); + &_rotl128 (@T,2,30,@T); # KL<<<(77+32+2=111) + + while (@T[0] ne "eax") # restore order + { unshift (@T,pop(@T)); } + + &mov ("eax",4); # 4 grandRounds +&set_label("done"); + &lea ("edx",&DWP(272-128,$key)); # end of key schedule + &stack_pop(4); +} +&function_end("Camellia_Ekeygen"); + +if ($OPENSSL) { +# int private_Camellia_set_key ( +# const unsigned char *userKey, +# int bits, +# CAMELLIA_KEY *key) +&function_begin_B("private_Camellia_set_key"); + &push ("ebx"); + &mov ("ecx",&wparam(0)); # pull arguments + &mov ("ebx",&wparam(1)); + &mov ("edx",&wparam(2)); + + &mov ("eax",-1); + &test ("ecx","ecx"); + &jz (&label("done")); # userKey==NULL? + &test ("edx","edx"); + &jz (&label("done")); # key==NULL? + + &mov ("eax",-2); + &cmp ("ebx",256); + &je (&label("arg_ok")); # bits==256? + &cmp ("ebx",192); + &je (&label("arg_ok")); # bits==192? + &cmp ("ebx",128); + &jne (&label("done")); # bits!=128? +&set_label("arg_ok",4); + + &push ("edx"); # push arguments + &push ("ecx"); + &push ("ebx"); + &call ("Camellia_Ekeygen"); + &stack_pop(3); + + # eax holds grandRounds and edx points at where to put it + &mov (&DWP(0,"edx"),"eax"); + &xor ("eax","eax"); +&set_label("done",4); + &pop ("ebx"); + &ret (); +&function_end_B("private_Camellia_set_key"); +} + +@SBOX=( +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); + +sub S1110 { my $i=shift; $i=@SBOX[$i]; return $i<<24|$i<<16|$i<<8; } +sub S4404 { my $i=shift; $i=($i<<1|$i>>7)&0xff; $i=@SBOX[$i]; return $i<<24|$i<<16|$i; } +sub S0222 { my $i=shift; $i=@SBOX[$i]; $i=($i<<1|$i>>7)&0xff; return $i<<16|$i<<8|$i; } +sub S3033 { my $i=shift; $i=@SBOX[$i]; $i=($i>>1|$i<<7)&0xff; return $i<<24|$i<<8|$i; } + +&set_label("Camellia_SIGMA",64); +&data_word( + 0xa09e667f, 0x3bcc908b, 0xb67ae858, 0x4caa73b2, + 0xc6ef372f, 0xe94f82be, 0x54ff53a5, 0xf1d36f1c, + 0x10e527fa, 0xde682d1d, 0xb05688c2, 0xb3e6c1fd, + 0, 0, 0, 0); +&set_label("Camellia_SBOX",64); +# tables are interleaved, remember? +for ($i=0;$i<256;$i++) { &data_word(&S1110($i),&S4404($i)); } +for ($i=0;$i<256;$i++) { &data_word(&S0222($i),&S3033($i)); } + +# void Camellia_cbc_encrypt (const void char *inp, unsigned char *out, +# size_t length, const CAMELLIA_KEY *key, +# unsigned char *ivp,const int enc); +{ +# stack frame layout +# -4(%esp) # return address 0(%esp) +# 0(%esp) # s0 4(%esp) +# 4(%esp) # s1 8(%esp) +# 8(%esp) # s2 12(%esp) +# 12(%esp) # s3 16(%esp) +# 16(%esp) # end of key schedule 20(%esp) +# 20(%esp) # %esp backup +my $_inp=&DWP(24,"esp"); #copy of wparam(0) +my $_out=&DWP(28,"esp"); #copy of wparam(1) +my $_len=&DWP(32,"esp"); #copy of wparam(2) +my $_key=&DWP(36,"esp"); #copy of wparam(3) +my $_ivp=&DWP(40,"esp"); #copy of wparam(4) +my $ivec=&DWP(44,"esp"); #ivec[16] +my $_tmp=&DWP(44,"esp"); #volatile variable [yes, aliases with ivec] +my ($s0,$s1,$s2,$s3) = @T; + +&function_begin("Camellia_cbc_encrypt"); + &mov ($s2 eq "ecx"? $s2 : "",&wparam(2)); # load len + &cmp ($s2,0); + &je (&label("enc_out")); + + &pushf (); + &cld (); + + &mov ($s0,&wparam(0)); # load inp + &mov ($s1,&wparam(1)); # load out + #&mov ($s2,&wparam(2)); # load len + &mov ($s3,&wparam(3)); # load key + &mov ($Tbl,&wparam(4)); # load ivp + + # allocate aligned stack frame... + &lea ($idx,&DWP(-64,"esp")); + &and ($idx,-64); + + # place stack frame just "above mod 1024" the key schedule + # this ensures that cache associativity of 2 suffices + &lea ($key,&DWP(-64-63,$s3)); + &sub ($key,$idx); + &neg ($key); + &and ($key,0x3C0); # modulo 1024, but aligned to cache-line + &sub ($idx,$key); + + &mov ($key,&wparam(5)); # load enc + + &exch ("esp",$idx); + &add ("esp",4); # reserve for return address! + &mov ($_esp,$idx); # save %esp + + &mov ($_inp,$s0); # save copy of inp + &mov ($_out,$s1); # save copy of out + &mov ($_len,$s2); # save copy of len + &mov ($_key,$s3); # save copy of key + &mov ($_ivp,$Tbl); # save copy of ivp + + &call (&label("pic_point")); # make it PIC! + &set_label("pic_point"); + &blindpop($Tbl); + &lea ($Tbl,&DWP(&label("Camellia_SBOX")."-".&label("pic_point"),$Tbl)); + + &mov ($idx,32); + &set_label("prefetch_sbox",4); + &mov ($s0,&DWP(0,$Tbl)); + &mov ($s1,&DWP(32,$Tbl)); + &mov ($s2,&DWP(64,$Tbl)); + &mov ($s3,&DWP(96,$Tbl)); + &lea ($Tbl,&DWP(128,$Tbl)); + &dec ($idx); + &jnz (&label("prefetch_sbox")); + &mov ($s0,$_key); + &sub ($Tbl,4096); + &mov ($idx,$_inp); + &mov ($s3,&DWP(272,$s0)); # load grandRounds + + &cmp ($key,0); + &je (&label("DECRYPT")); + + &mov ($s2,$_len); + &mov ($key,$_ivp); + &shl ($s3,6); + &lea ($s3,&DWP(0,$s0,$s3)); + &mov ($_end,$s3); + + &test ($s2,0xFFFFFFF0); + &jz (&label("enc_tail")); # short input... + + &mov ($s0,&DWP(0,$key)); # load iv + &mov ($s1,&DWP(4,$key)); + + &set_label("enc_loop",4); + &mov ($s2,&DWP(8,$key)); + &mov ($s3,&DWP(12,$key)); + + &xor ($s0,&DWP(0,$idx)); # xor input data + &xor ($s1,&DWP(4,$idx)); + &xor ($s2,&DWP(8,$idx)); + &bswap ($s0); + &xor ($s3,&DWP(12,$idx)); + &bswap ($s1); + &mov ($key,$_key); # load key + &bswap ($s2); + &bswap ($s3); + + &call ("_x86_Camellia_encrypt"); + + &mov ($idx,$_inp); # load inp + &mov ($key,$_out); # load out + + &bswap ($s0); + &bswap ($s1); + &bswap ($s2); + &mov (&DWP(0,$key),$s0); # save output data + &bswap ($s3); + &mov (&DWP(4,$key),$s1); + &mov (&DWP(8,$key),$s2); + &mov (&DWP(12,$key),$s3); + + &mov ($s2,$_len); # load len + + &lea ($idx,&DWP(16,$idx)); + &mov ($_inp,$idx); # save inp + + &lea ($s3,&DWP(16,$key)); + &mov ($_out,$s3); # save out + + &sub ($s2,16); + &test ($s2,0xFFFFFFF0); + &mov ($_len,$s2); # save len + &jnz (&label("enc_loop")); + &test ($s2,15); + &jnz (&label("enc_tail")); + &mov ($idx,$_ivp); # load ivp + &mov ($s2,&DWP(8,$key)); # restore last dwords + &mov ($s3,&DWP(12,$key)); + &mov (&DWP(0,$idx),$s0); # save ivec + &mov (&DWP(4,$idx),$s1); + &mov (&DWP(8,$idx),$s2); + &mov (&DWP(12,$idx),$s3); + + &mov ("esp",$_esp); + &popf (); + &set_label("enc_out"); + &function_end_A(); + &pushf (); # kludge, never executed + + &set_label("enc_tail",4); + &mov ($s0,$key eq "edi" ? $key : ""); + &mov ($key,$_out); # load out + &push ($s0); # push ivp + &mov ($s1,16); + &sub ($s1,$s2); + &cmp ($key,$idx); # compare with inp + &je (&label("enc_in_place")); + &align (4); + &data_word(0xA4F3F689); # rep movsb # copy input + &jmp (&label("enc_skip_in_place")); + &set_label("enc_in_place"); + &lea ($key,&DWP(0,$key,$s2)); + &set_label("enc_skip_in_place"); + &mov ($s2,$s1); + &xor ($s0,$s0); + &align (4); + &data_word(0xAAF3F689); # rep stosb # zero tail + &pop ($key); # pop ivp + + &mov ($idx,$_out); # output as input + &mov ($s0,&DWP(0,$key)); + &mov ($s1,&DWP(4,$key)); + &mov ($_len,16); # len=16 + &jmp (&label("enc_loop")); # one more spin... + +#----------------------------- DECRYPT -----------------------------# +&set_label("DECRYPT",16); + &shl ($s3,6); + &lea ($s3,&DWP(0,$s0,$s3)); + &mov ($_end,$s0); + &mov ($_key,$s3); + + &cmp ($idx,$_out); + &je (&label("dec_in_place")); # in-place processing... + + &mov ($key,$_ivp); # load ivp + &mov ($_tmp,$key); + + &set_label("dec_loop",4); + &mov ($s0,&DWP(0,$idx)); # read input + &mov ($s1,&DWP(4,$idx)); + &mov ($s2,&DWP(8,$idx)); + &bswap ($s0); + &mov ($s3,&DWP(12,$idx)); + &bswap ($s1); + &mov ($key,$_key); # load key + &bswap ($s2); + &bswap ($s3); + + &call ("_x86_Camellia_decrypt"); + + &mov ($key,$_tmp); # load ivp + &mov ($idx,$_len); # load len + + &bswap ($s0); + &bswap ($s1); + &bswap ($s2); + &xor ($s0,&DWP(0,$key)); # xor iv + &bswap ($s3); + &xor ($s1,&DWP(4,$key)); + &xor ($s2,&DWP(8,$key)); + &xor ($s3,&DWP(12,$key)); + + &sub ($idx,16); + &jc (&label("dec_partial")); + &mov ($_len,$idx); # save len + &mov ($idx,$_inp); # load inp + &mov ($key,$_out); # load out + + &mov (&DWP(0,$key),$s0); # write output + &mov (&DWP(4,$key),$s1); + &mov (&DWP(8,$key),$s2); + &mov (&DWP(12,$key),$s3); + + &mov ($_tmp,$idx); # save ivp + &lea ($idx,&DWP(16,$idx)); + &mov ($_inp,$idx); # save inp + + &lea ($key,&DWP(16,$key)); + &mov ($_out,$key); # save out + + &jnz (&label("dec_loop")); + &mov ($key,$_tmp); # load temp ivp + &set_label("dec_end"); + &mov ($idx,$_ivp); # load user ivp + &mov ($s0,&DWP(0,$key)); # load iv + &mov ($s1,&DWP(4,$key)); + &mov ($s2,&DWP(8,$key)); + &mov ($s3,&DWP(12,$key)); + &mov (&DWP(0,$idx),$s0); # copy back to user + &mov (&DWP(4,$idx),$s1); + &mov (&DWP(8,$idx),$s2); + &mov (&DWP(12,$idx),$s3); + &jmp (&label("dec_out")); + + &set_label("dec_partial",4); + &lea ($key,$ivec); + &mov (&DWP(0,$key),$s0); # dump output to stack + &mov (&DWP(4,$key),$s1); + &mov (&DWP(8,$key),$s2); + &mov (&DWP(12,$key),$s3); + &lea ($s2 eq "ecx" ? $s2 : "",&DWP(16,$idx)); + &mov ($idx eq "esi" ? $idx : "",$key); + &mov ($key eq "edi" ? $key : "",$_out); # load out + &data_word(0xA4F3F689); # rep movsb # copy output + &mov ($key,$_inp); # use inp as temp ivp + &jmp (&label("dec_end")); + + &set_label("dec_in_place",4); + &set_label("dec_in_place_loop"); + &lea ($key,$ivec); + &mov ($s0,&DWP(0,$idx)); # read input + &mov ($s1,&DWP(4,$idx)); + &mov ($s2,&DWP(8,$idx)); + &mov ($s3,&DWP(12,$idx)); + + &mov (&DWP(0,$key),$s0); # copy to temp + &mov (&DWP(4,$key),$s1); + &mov (&DWP(8,$key),$s2); + &bswap ($s0); + &mov (&DWP(12,$key),$s3); + &bswap ($s1); + &mov ($key,$_key); # load key + &bswap ($s2); + &bswap ($s3); + + &call ("_x86_Camellia_decrypt"); + + &mov ($key,$_ivp); # load ivp + &mov ($idx,$_out); # load out + + &bswap ($s0); + &bswap ($s1); + &bswap ($s2); + &xor ($s0,&DWP(0,$key)); # xor iv + &bswap ($s3); + &xor ($s1,&DWP(4,$key)); + &xor ($s2,&DWP(8,$key)); + &xor ($s3,&DWP(12,$key)); + + &mov (&DWP(0,$idx),$s0); # write output + &mov (&DWP(4,$idx),$s1); + &mov (&DWP(8,$idx),$s2); + &mov (&DWP(12,$idx),$s3); + + &lea ($idx,&DWP(16,$idx)); + &mov ($_out,$idx); # save out + + &lea ($idx,$ivec); + &mov ($s0,&DWP(0,$idx)); # read temp + &mov ($s1,&DWP(4,$idx)); + &mov ($s2,&DWP(8,$idx)); + &mov ($s3,&DWP(12,$idx)); + + &mov (&DWP(0,$key),$s0); # copy iv + &mov (&DWP(4,$key),$s1); + &mov (&DWP(8,$key),$s2); + &mov (&DWP(12,$key),$s3); + + &mov ($idx,$_inp); # load inp + + &lea ($idx,&DWP(16,$idx)); + &mov ($_inp,$idx); # save inp + + &mov ($s2,$_len); # load len + &sub ($s2,16); + &jc (&label("dec_in_place_partial")); + &mov ($_len,$s2); # save len + &jnz (&label("dec_in_place_loop")); + &jmp (&label("dec_out")); + + &set_label("dec_in_place_partial",4); + # one can argue if this is actually required... + &mov ($key eq "edi" ? $key : "",$_out); + &lea ($idx eq "esi" ? $idx : "",$ivec); + &lea ($key,&DWP(0,$key,$s2)); + &lea ($idx,&DWP(16,$idx,$s2)); + &neg ($s2 eq "ecx" ? $s2 : ""); + &data_word(0xA4F3F689); # rep movsb # restore tail + + &set_label("dec_out",4); + &mov ("esp",$_esp); + &popf (); +&function_end("Camellia_cbc_encrypt"); +} + +&asciz("Camellia for x86 by "); + +&asm_finish(); From 49f48fa2cac65c245c3b7f45140fa1e340445f56 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:20:07 -0500 Subject: [PATCH 347/576] Create cmll-x86_64.pl --- .../open_ssl/camellia/asm/cmll-x86_64.pl | 1081 +++++++++++++++++ 1 file changed, 1081 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmll-x86_64.pl diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmll-x86_64.pl b/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmll-x86_64.pl new file mode 100644 index 000000000..d94f46b88 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmll-x86_64.pl @@ -0,0 +1,1081 @@ +#!/usr/bin/env perl + +# ==================================================================== +# Copyright (c) 2008 Andy Polyakov +# +# This module may be used under the terms of either the GNU General +# Public License version 2 or later, the GNU Lesser General Public +# License version 2.1 or later, the Mozilla Public License version +# 1.1 or the BSD License. The exact terms of either license are +# distributed along with this module. For further details see +# http://www.openssl.org/~appro/camellia/. +# ==================================================================== + +# Performance in cycles per processed byte (less is better) in +# 'openssl speed ...' benchmark: +# +# AMD64 Core2 EM64T +# -evp camellia-128-ecb 16.7 21.0 22.7 +# + over gcc 3.4.6 +25% +5% 0% +# +# camellia-128-cbc 15.7 20.4 21.1 +# +# 128-bit key setup 128 216 205 cycles/key +# + over gcc 3.4.6 +54% +39% +15% +# +# Numbers in "+" rows represent performance improvement over compiler +# generated code. Key setup timings are impressive on AMD and Core2 +# thanks to 64-bit operations being covertly deployed. Improvement on +# EM64T, pre-Core2 Intel x86_64 CPU, is not as impressive, because it +# apparently emulates some of 64-bit operations in [32-bit] microcode. + +$flavour = shift; +$output = shift; +if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } + +$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/); + +$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; +( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or +( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or +die "can't locate x86_64-xlate.pl"; + +open OUT,"| \"$^X\" $xlate $flavour $output"; +*STDOUT=*OUT; + +sub hi() { my $r=shift; $r =~ s/%[er]([a-d])x/%\1h/; $r; } +sub lo() { my $r=shift; $r =~ s/%[er]([a-d])x/%\1l/; + $r =~ s/%[er]([sd]i)/%\1l/; + $r =~ s/%(r[0-9]+)[d]?/%\1b/; $r; } + +$t0="%eax";$t1="%ebx";$t2="%ecx";$t3="%edx"; +@S=("%r8d","%r9d","%r10d","%r11d"); +$i0="%esi"; +$i1="%edi"; +$Tbl="%rbp"; # size optimization +$inp="%r12"; +$out="%r13"; +$key="%r14"; +$keyend="%r15"; +$arg0d=$win64?"%ecx":"%edi"; + +# const unsigned int Camellia_SBOX[4][256]; +# Well, sort of... Camellia_SBOX[0][] is interleaved with [1][], +# and [2][] - with [3][]. This is done to minimize code size. +$SBOX1_1110=0; # Camellia_SBOX[0] +$SBOX4_4404=4; # Camellia_SBOX[1] +$SBOX2_0222=2048; # Camellia_SBOX[2] +$SBOX3_3033=2052; # Camellia_SBOX[3] + +sub Camellia_Feistel { +my $i=@_[0]; +my $seed=defined(@_[1])?@_[1]:0; +my $scale=$seed<0?-8:8; +my $j=($i&1)*2; +my ($s0,$s1,$s2,$s3)=(@S[($j)%4],@S[($j+1)%4],@S[($j+2)%4],@S[($j+3)%4]); + +$code.=<<___; + xor $s0,$t0 # t0^=key[0] + xor $s1,$t1 # t1^=key[1] + movz `&hi("$t0")`,$i0 # (t0>>8)&0xff + movz `&lo("$t1")`,$i1 # (t1>>0)&0xff + mov $SBOX3_3033($Tbl,$i0,8),$t3 # t3=SBOX3_3033[0] + mov $SBOX1_1110($Tbl,$i1,8),$t2 # t2=SBOX1_1110[1] + movz `&lo("$t0")`,$i0 # (t0>>0)&0xff + shr \$16,$t0 + movz `&hi("$t1")`,$i1 # (t1>>8)&0xff + xor $SBOX4_4404($Tbl,$i0,8),$t3 # t3^=SBOX4_4404[0] + shr \$16,$t1 + xor $SBOX4_4404($Tbl,$i1,8),$t2 # t2^=SBOX4_4404[1] + movz `&hi("$t0")`,$i0 # (t0>>24)&0xff + movz `&lo("$t1")`,$i1 # (t1>>16)&0xff + xor $SBOX1_1110($Tbl,$i0,8),$t3 # t3^=SBOX1_1110[0] + xor $SBOX3_3033($Tbl,$i1,8),$t2 # t2^=SBOX3_3033[1] + movz `&lo("$t0")`,$i0 # (t0>>16)&0xff + movz `&hi("$t1")`,$i1 # (t1>>24)&0xff + xor $SBOX2_0222($Tbl,$i0,8),$t3 # t3^=SBOX2_0222[0] + xor $SBOX2_0222($Tbl,$i1,8),$t2 # t2^=SBOX2_0222[1] + mov `$seed+($i+1)*$scale`($key),$t1 # prefetch key[i+1] + mov `$seed+($i+1)*$scale+4`($key),$t0 + xor $t3,$t2 # t2^=t3 + ror \$8,$t3 # t3=RightRotate(t3,8) + xor $t2,$s2 + xor $t2,$s3 + xor $t3,$s3 +___ +} + +# void Camellia_EncryptBlock_Rounds( +# int grandRounds, +# const Byte plaintext[], +# const KEY_TABLE_TYPE keyTable, +# Byte ciphertext[]) +$code=<<___; +.text + +# V1.x API +.globl Camellia_EncryptBlock +.type Camellia_EncryptBlock,\@abi-omnipotent +.align 16 +Camellia_EncryptBlock: + movl \$128,%eax + subl $arg0d,%eax + movl \$3,$arg0d + adcl \$0,$arg0d # keyBitLength==128?3:4 + jmp .Lenc_rounds +.size Camellia_EncryptBlock,.-Camellia_EncryptBlock +# V2 +.globl Camellia_EncryptBlock_Rounds +.type Camellia_EncryptBlock_Rounds,\@function,4 +.align 16 +.Lenc_rounds: +Camellia_EncryptBlock_Rounds: + push %rbx + push %rbp + push %r13 + push %r14 + push %r15 +.Lenc_prologue: + + #mov %rsi,$inp # put away arguments + mov %rcx,$out + mov %rdx,$key + + shl \$6,%edi # process grandRounds + lea .LCamellia_SBOX(%rip),$Tbl + lea ($key,%rdi),$keyend + + mov 0(%rsi),@S[0] # load plaintext + mov 4(%rsi),@S[1] + mov 8(%rsi),@S[2] + bswap @S[0] + mov 12(%rsi),@S[3] + bswap @S[1] + bswap @S[2] + bswap @S[3] + + call _x86_64_Camellia_encrypt + + bswap @S[0] + bswap @S[1] + bswap @S[2] + mov @S[0],0($out) + bswap @S[3] + mov @S[1],4($out) + mov @S[2],8($out) + mov @S[3],12($out) + + mov 0(%rsp),%r15 + mov 8(%rsp),%r14 + mov 16(%rsp),%r13 + mov 24(%rsp),%rbp + mov 32(%rsp),%rbx + lea 40(%rsp),%rsp +.Lenc_epilogue: + ret +.size Camellia_EncryptBlock_Rounds,.-Camellia_EncryptBlock_Rounds + +.type _x86_64_Camellia_encrypt,\@abi-omnipotent +.align 16 +_x86_64_Camellia_encrypt: + xor 0($key),@S[1] + xor 4($key),@S[0] # ^=key[0-3] + xor 8($key),@S[3] + xor 12($key),@S[2] +.align 16 +.Leloop: + mov 16($key),$t1 # prefetch key[4-5] + mov 20($key),$t0 + +___ + for ($i=0;$i<6;$i++) { Camellia_Feistel($i,16); } +$code.=<<___; + lea 16*4($key),$key + cmp $keyend,$key + mov 8($key),$t3 # prefetch key[2-3] + mov 12($key),$t2 + je .Ledone + + and @S[0],$t0 + or @S[3],$t3 + rol \$1,$t0 + xor $t3,@S[2] # s2^=s3|key[3]; + xor $t0,@S[1] # s1^=LeftRotate(s0&key[0],1); + and @S[2],$t2 + or @S[1],$t1 + rol \$1,$t2 + xor $t1,@S[0] # s0^=s1|key[1]; + xor $t2,@S[3] # s3^=LeftRotate(s2&key[2],1); + jmp .Leloop + +.align 16 +.Ledone: + xor @S[2],$t0 # SwapHalf + xor @S[3],$t1 + xor @S[0],$t2 + xor @S[1],$t3 + + mov $t0,@S[0] + mov $t1,@S[1] + mov $t2,@S[2] + mov $t3,@S[3] + + .byte 0xf3,0xc3 # rep ret +.size _x86_64_Camellia_encrypt,.-_x86_64_Camellia_encrypt + +# V1.x API +.globl Camellia_DecryptBlock +.type Camellia_DecryptBlock,\@abi-omnipotent +.align 16 +Camellia_DecryptBlock: + movl \$128,%eax + subl $arg0d,%eax + movl \$3,$arg0d + adcl \$0,$arg0d # keyBitLength==128?3:4 + jmp .Ldec_rounds +.size Camellia_DecryptBlock,.-Camellia_DecryptBlock +# V2 +.globl Camellia_DecryptBlock_Rounds +.type Camellia_DecryptBlock_Rounds,\@function,4 +.align 16 +.Ldec_rounds: +Camellia_DecryptBlock_Rounds: + push %rbx + push %rbp + push %r13 + push %r14 + push %r15 +.Ldec_prologue: + + #mov %rsi,$inp # put away arguments + mov %rcx,$out + mov %rdx,$keyend + + shl \$6,%edi # process grandRounds + lea .LCamellia_SBOX(%rip),$Tbl + lea ($keyend,%rdi),$key + + mov 0(%rsi),@S[0] # load plaintext + mov 4(%rsi),@S[1] + mov 8(%rsi),@S[2] + bswap @S[0] + mov 12(%rsi),@S[3] + bswap @S[1] + bswap @S[2] + bswap @S[3] + + call _x86_64_Camellia_decrypt + + bswap @S[0] + bswap @S[1] + bswap @S[2] + mov @S[0],0($out) + bswap @S[3] + mov @S[1],4($out) + mov @S[2],8($out) + mov @S[3],12($out) + + mov 0(%rsp),%r15 + mov 8(%rsp),%r14 + mov 16(%rsp),%r13 + mov 24(%rsp),%rbp + mov 32(%rsp),%rbx + lea 40(%rsp),%rsp +.Ldec_epilogue: + ret +.size Camellia_DecryptBlock_Rounds,.-Camellia_DecryptBlock_Rounds + +.type _x86_64_Camellia_decrypt,\@abi-omnipotent +.align 16 +_x86_64_Camellia_decrypt: + xor 0($key),@S[1] + xor 4($key),@S[0] # ^=key[0-3] + xor 8($key),@S[3] + xor 12($key),@S[2] +.align 16 +.Ldloop: + mov -8($key),$t1 # prefetch key[4-5] + mov -4($key),$t0 + +___ + for ($i=0;$i<6;$i++) { Camellia_Feistel($i,-8); } +$code.=<<___; + lea -16*4($key),$key + cmp $keyend,$key + mov 0($key),$t3 # prefetch key[2-3] + mov 4($key),$t2 + je .Lddone + + and @S[0],$t0 + or @S[3],$t3 + rol \$1,$t0 + xor $t3,@S[2] # s2^=s3|key[3]; + xor $t0,@S[1] # s1^=LeftRotate(s0&key[0],1); + and @S[2],$t2 + or @S[1],$t1 + rol \$1,$t2 + xor $t1,@S[0] # s0^=s1|key[1]; + xor $t2,@S[3] # s3^=LeftRotate(s2&key[2],1); + + jmp .Ldloop + +.align 16 +.Lddone: + xor @S[2],$t2 + xor @S[3],$t3 + xor @S[0],$t0 + xor @S[1],$t1 + + mov $t2,@S[0] # SwapHalf + mov $t3,@S[1] + mov $t0,@S[2] + mov $t1,@S[3] + + .byte 0xf3,0xc3 # rep ret +.size _x86_64_Camellia_decrypt,.-_x86_64_Camellia_decrypt +___ + +sub _saveround { +my ($rnd,$key,@T)=@_; +my $bias=int(@T[0])?shift(@T):0; + + if ($#T==3) { + $code.=<<___; + mov @T[1],`$bias+$rnd*8+0`($key) + mov @T[0],`$bias+$rnd*8+4`($key) + mov @T[3],`$bias+$rnd*8+8`($key) + mov @T[2],`$bias+$rnd*8+12`($key) +___ + } else { + $code.=" mov @T[0],`$bias+$rnd*8+0`($key)\n"; + $code.=" mov @T[1],`$bias+$rnd*8+8`($key)\n" if ($#T>=1); + } +} + +sub _loadround { +my ($rnd,$key,@T)=@_; +my $bias=int(@T[0])?shift(@T):0; + +$code.=" mov `$bias+$rnd*8+0`($key),@T[0]\n"; +$code.=" mov `$bias+$rnd*8+8`($key),@T[1]\n" if ($#T>=1); +} + +# shld is very slow on Intel EM64T family. Even on AMD it limits +# instruction decode rate [because it's VectorPath] and consequently +# performance... +sub __rotl128 { +my ($i0,$i1,$rot)=@_; + + if ($rot) { + $code.=<<___; + mov $i0,%r11 + shld \$$rot,$i1,$i0 + shld \$$rot,%r11,$i1 +___ + } +} + +# ... Implementing 128-bit rotate without shld gives 80% better +# performance EM64T, +15% on AMD64 and only ~7% degradation on +# Core2. This is therefore preferred. +sub _rotl128 { +my ($i0,$i1,$rot)=@_; + + if ($rot) { + $code.=<<___; + mov $i0,%r11 + shl \$$rot,$i0 + mov $i1,%r9 + shr \$`64-$rot`,%r9 + shr \$`64-$rot`,%r11 + or %r9,$i0 + shl \$$rot,$i1 + or %r11,$i1 +___ + } +} + +{ my $step=0; + +$code.=<<___; +.globl Camellia_Ekeygen +.type Camellia_Ekeygen,\@function,3 +.align 16 +Camellia_Ekeygen: + push %rbx + push %rbp + push %r13 + push %r14 + push %r15 +.Lkey_prologue: + + mov %edi,${keyend}d # put away arguments, keyBitLength + mov %rdx,$out # keyTable + + mov 0(%rsi),@S[0] # load 0-127 bits + mov 4(%rsi),@S[1] + mov 8(%rsi),@S[2] + mov 12(%rsi),@S[3] + + bswap @S[0] + bswap @S[1] + bswap @S[2] + bswap @S[3] +___ + &_saveround (0,$out,@S); # KL<<<0 +$code.=<<___; + cmp \$128,$keyend # check keyBitLength + je .L1st128 + + mov 16(%rsi),@S[0] # load 128-191 bits + mov 20(%rsi),@S[1] + cmp \$192,$keyend + je .L1st192 + mov 24(%rsi),@S[2] # load 192-255 bits + mov 28(%rsi),@S[3] + jmp .L1st256 +.L1st192: + mov @S[0],@S[2] + mov @S[1],@S[3] + not @S[2] + not @S[3] +.L1st256: + bswap @S[0] + bswap @S[1] + bswap @S[2] + bswap @S[3] +___ + &_saveround (4,$out,@S); # temp storage for KR! +$code.=<<___; + xor 0($out),@S[1] # KR^KL + xor 4($out),@S[0] + xor 8($out),@S[3] + xor 12($out),@S[2] + +.L1st128: + lea .LCamellia_SIGMA(%rip),$key + lea .LCamellia_SBOX(%rip),$Tbl + + mov 0($key),$t1 + mov 4($key),$t0 +___ + &Camellia_Feistel($step++); + &Camellia_Feistel($step++); +$code.=<<___; + xor 0($out),@S[1] # ^KL + xor 4($out),@S[0] + xor 8($out),@S[3] + xor 12($out),@S[2] +___ + &Camellia_Feistel($step++); + &Camellia_Feistel($step++); +$code.=<<___; + cmp \$128,$keyend + jne .L2nd256 + + lea 128($out),$out # size optimization + shl \$32,%r8 # @S[0]|| + shl \$32,%r10 # @S[2]|| + or %r9,%r8 # ||@S[1] + or %r11,%r10 # ||@S[3] +___ + &_loadround (0,$out,-128,"%rax","%rbx"); # KL + &_saveround (2,$out,-128,"%r8","%r10"); # KA<<<0 + &_rotl128 ("%rax","%rbx",15); + &_saveround (4,$out,-128,"%rax","%rbx"); # KL<<<15 + &_rotl128 ("%r8","%r10",15); + &_saveround (6,$out,-128,"%r8","%r10"); # KA<<<15 + &_rotl128 ("%r8","%r10",15); # 15+15=30 + &_saveround (8,$out,-128,"%r8","%r10"); # KA<<<30 + &_rotl128 ("%rax","%rbx",30); # 15+30=45 + &_saveround (10,$out,-128,"%rax","%rbx"); # KL<<<45 + &_rotl128 ("%r8","%r10",15); # 30+15=45 + &_saveround (12,$out,-128,"%r8"); # KA<<<45 + &_rotl128 ("%rax","%rbx",15); # 45+15=60 + &_saveround (13,$out,-128,"%rbx"); # KL<<<60 + &_rotl128 ("%r8","%r10",15); # 45+15=60 + &_saveround (14,$out,-128,"%r8","%r10"); # KA<<<60 + &_rotl128 ("%rax","%rbx",17); # 60+17=77 + &_saveround (16,$out,-128,"%rax","%rbx"); # KL<<<77 + &_rotl128 ("%rax","%rbx",17); # 77+17=94 + &_saveround (18,$out,-128,"%rax","%rbx"); # KL<<<94 + &_rotl128 ("%r8","%r10",34); # 60+34=94 + &_saveround (20,$out,-128,"%r8","%r10"); # KA<<<94 + &_rotl128 ("%rax","%rbx",17); # 94+17=111 + &_saveround (22,$out,-128,"%rax","%rbx"); # KL<<<111 + &_rotl128 ("%r8","%r10",17); # 94+17=111 + &_saveround (24,$out,-128,"%r8","%r10"); # KA<<<111 +$code.=<<___; + mov \$3,%eax + jmp .Ldone +.align 16 +.L2nd256: +___ + &_saveround (6,$out,@S); # temp storage for KA! +$code.=<<___; + xor `4*8+0`($out),@S[1] # KA^KR + xor `4*8+4`($out),@S[0] + xor `5*8+0`($out),@S[3] + xor `5*8+4`($out),@S[2] +___ + &Camellia_Feistel($step++); + &Camellia_Feistel($step++); + + &_loadround (0,$out,"%rax","%rbx"); # KL + &_loadround (4,$out,"%rcx","%rdx"); # KR + &_loadround (6,$out,"%r14","%r15"); # KA +$code.=<<___; + lea 128($out),$out # size optimization + shl \$32,%r8 # @S[0]|| + shl \$32,%r10 # @S[2]|| + or %r9,%r8 # ||@S[1] + or %r11,%r10 # ||@S[3] +___ + &_saveround (2,$out,-128,"%r8","%r10"); # KB<<<0 + &_rotl128 ("%rcx","%rdx",15); + &_saveround (4,$out,-128,"%rcx","%rdx"); # KR<<<15 + &_rotl128 ("%r14","%r15",15); + &_saveround (6,$out,-128,"%r14","%r15"); # KA<<<15 + &_rotl128 ("%rcx","%rdx",15); # 15+15=30 + &_saveround (8,$out,-128,"%rcx","%rdx"); # KR<<<30 + &_rotl128 ("%r8","%r10",30); + &_saveround (10,$out,-128,"%r8","%r10"); # KB<<<30 + &_rotl128 ("%rax","%rbx",45); + &_saveround (12,$out,-128,"%rax","%rbx"); # KL<<<45 + &_rotl128 ("%r14","%r15",30); # 15+30=45 + &_saveround (14,$out,-128,"%r14","%r15"); # KA<<<45 + &_rotl128 ("%rax","%rbx",15); # 45+15=60 + &_saveround (16,$out,-128,"%rax","%rbx"); # KL<<<60 + &_rotl128 ("%rcx","%rdx",30); # 30+30=60 + &_saveround (18,$out,-128,"%rcx","%rdx"); # KR<<<60 + &_rotl128 ("%r8","%r10",30); # 30+30=60 + &_saveround (20,$out,-128,"%r8","%r10"); # KB<<<60 + &_rotl128 ("%rax","%rbx",17); # 60+17=77 + &_saveround (22,$out,-128,"%rax","%rbx"); # KL<<<77 + &_rotl128 ("%r14","%r15",32); # 45+32=77 + &_saveround (24,$out,-128,"%r14","%r15"); # KA<<<77 + &_rotl128 ("%rcx","%rdx",34); # 60+34=94 + &_saveround (26,$out,-128,"%rcx","%rdx"); # KR<<<94 + &_rotl128 ("%r14","%r15",17); # 77+17=94 + &_saveround (28,$out,-128,"%r14","%r15"); # KA<<<77 + &_rotl128 ("%rax","%rbx",34); # 77+34=111 + &_saveround (30,$out,-128,"%rax","%rbx"); # KL<<<111 + &_rotl128 ("%r8","%r10",51); # 60+51=111 + &_saveround (32,$out,-128,"%r8","%r10"); # KB<<<111 +$code.=<<___; + mov \$4,%eax +.Ldone: + mov 0(%rsp),%r15 + mov 8(%rsp),%r14 + mov 16(%rsp),%r13 + mov 24(%rsp),%rbp + mov 32(%rsp),%rbx + lea 40(%rsp),%rsp +.Lkey_epilogue: + ret +.size Camellia_Ekeygen,.-Camellia_Ekeygen +___ +} + +@SBOX=( +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); + +sub S1110 { my $i=shift; $i=@SBOX[$i]; $i=$i<<24|$i<<16|$i<<8; sprintf("0x%08x",$i); } +sub S4404 { my $i=shift; $i=($i<<1|$i>>7)&0xff; $i=@SBOX[$i]; $i=$i<<24|$i<<16|$i; sprintf("0x%08x",$i); } +sub S0222 { my $i=shift; $i=@SBOX[$i]; $i=($i<<1|$i>>7)&0xff; $i=$i<<16|$i<<8|$i; sprintf("0x%08x",$i); } +sub S3033 { my $i=shift; $i=@SBOX[$i]; $i=($i>>1|$i<<7)&0xff; $i=$i<<24|$i<<8|$i; sprintf("0x%08x",$i); } + +$code.=<<___; +.align 64 +.LCamellia_SIGMA: +.long 0x3bcc908b, 0xa09e667f, 0x4caa73b2, 0xb67ae858 +.long 0xe94f82be, 0xc6ef372f, 0xf1d36f1c, 0x54ff53a5 +.long 0xde682d1d, 0x10e527fa, 0xb3e6c1fd, 0xb05688c2 +.long 0, 0, 0, 0 +.LCamellia_SBOX: +___ +# tables are interleaved, remember? +sub data_word { $code.=".long\t".join(',',@_)."\n"; } +for ($i=0;$i<256;$i++) { &data_word(&S1110($i),&S4404($i)); } +for ($i=0;$i<256;$i++) { &data_word(&S0222($i),&S3033($i)); } + +# void Camellia_cbc_encrypt (const void char *inp, unsigned char *out, +# size_t length, const CAMELLIA_KEY *key, +# unsigned char *ivp,const int enc); +{ +$_key="0(%rsp)"; +$_end="8(%rsp)"; # inp+len&~15 +$_res="16(%rsp)"; # len&15 +$ivec="24(%rsp)"; +$_ivp="40(%rsp)"; +$_rsp="48(%rsp)"; + +$code.=<<___; +.globl Camellia_cbc_encrypt +.type Camellia_cbc_encrypt,\@function,6 +.align 16 +Camellia_cbc_encrypt: + cmp \$0,%rdx + je .Lcbc_abort + push %rbx + push %rbp + push %r12 + push %r13 + push %r14 + push %r15 +.Lcbc_prologue: + + mov %rsp,%rbp + sub \$64,%rsp + and \$-64,%rsp + + # place stack frame just "above mod 1024" the key schedule, + # this ensures that cache associativity suffices + lea -64-63(%rcx),%r10 + sub %rsp,%r10 + neg %r10 + and \$0x3C0,%r10 + sub %r10,%rsp + #add \$8,%rsp # 8 is reserved for callee's ra + + mov %rdi,$inp # inp argument + mov %rsi,$out # out argument + mov %r8,%rbx # ivp argument + mov %rcx,$key # key argument + mov 272(%rcx),${keyend}d # grandRounds + + mov %r8,$_ivp + mov %rbp,$_rsp + +.Lcbc_body: + lea .LCamellia_SBOX(%rip),$Tbl + + mov \$32,%ecx +.align 4 +.Lcbc_prefetch_sbox: + mov 0($Tbl),%rax + mov 32($Tbl),%rsi + mov 64($Tbl),%rdi + mov 96($Tbl),%r11 + lea 128($Tbl),$Tbl + loop .Lcbc_prefetch_sbox + sub \$4096,$Tbl + shl \$6,$keyend + mov %rdx,%rcx # len argument + lea ($key,$keyend),$keyend + + cmp \$0,%r9d # enc argument + je .LCBC_DECRYPT + + and \$-16,%rdx + and \$15,%rcx # length residue + lea ($inp,%rdx),%rdx + mov $key,$_key + mov %rdx,$_end + mov %rcx,$_res + + cmp $inp,%rdx + mov 0(%rbx),@S[0] # load IV + mov 4(%rbx),@S[1] + mov 8(%rbx),@S[2] + mov 12(%rbx),@S[3] + je .Lcbc_enc_tail + jmp .Lcbc_eloop + +.align 16 +.Lcbc_eloop: + xor 0($inp),@S[0] + xor 4($inp),@S[1] + xor 8($inp),@S[2] + bswap @S[0] + xor 12($inp),@S[3] + bswap @S[1] + bswap @S[2] + bswap @S[3] + + call _x86_64_Camellia_encrypt + + mov $_key,$key # "rewind" the key + bswap @S[0] + mov $_end,%rdx + bswap @S[1] + mov $_res,%rcx + bswap @S[2] + mov @S[0],0($out) + bswap @S[3] + mov @S[1],4($out) + mov @S[2],8($out) + lea 16($inp),$inp + mov @S[3],12($out) + cmp %rdx,$inp + lea 16($out),$out + jne .Lcbc_eloop + + cmp \$0,%rcx + jne .Lcbc_enc_tail + + mov $_ivp,$out + mov @S[0],0($out) # write out IV residue + mov @S[1],4($out) + mov @S[2],8($out) + mov @S[3],12($out) + jmp .Lcbc_done + +.align 16 +.Lcbc_enc_tail: + xor %rax,%rax + mov %rax,0+$ivec + mov %rax,8+$ivec + mov %rax,$_res + +.Lcbc_enc_pushf: + pushfq + cld + mov $inp,%rsi + lea 8+$ivec,%rdi + .long 0x9066A4F3 # rep movsb + popfq +.Lcbc_enc_popf: + + lea $ivec,$inp + lea 16+$ivec,%rax + mov %rax,$_end + jmp .Lcbc_eloop # one more time + +.align 16 +.LCBC_DECRYPT: + xchg $key,$keyend + add \$15,%rdx + and \$15,%rcx # length residue + and \$-16,%rdx + mov $key,$_key + lea ($inp,%rdx),%rdx + mov %rdx,$_end + mov %rcx,$_res + + mov (%rbx),%rax # load IV + mov 8(%rbx),%rbx + jmp .Lcbc_dloop +.align 16 +.Lcbc_dloop: + mov 0($inp),@S[0] + mov 4($inp),@S[1] + mov 8($inp),@S[2] + bswap @S[0] + mov 12($inp),@S[3] + bswap @S[1] + mov %rax,0+$ivec # save IV to temporary storage + bswap @S[2] + mov %rbx,8+$ivec + bswap @S[3] + + call _x86_64_Camellia_decrypt + + mov $_key,$key # "rewind" the key + mov $_end,%rdx + mov $_res,%rcx + + bswap @S[0] + mov ($inp),%rax # load IV for next iteration + bswap @S[1] + mov 8($inp),%rbx + bswap @S[2] + xor 0+$ivec,@S[0] + bswap @S[3] + xor 4+$ivec,@S[1] + xor 8+$ivec,@S[2] + lea 16($inp),$inp + xor 12+$ivec,@S[3] + cmp %rdx,$inp + je .Lcbc_ddone + + mov @S[0],0($out) + mov @S[1],4($out) + mov @S[2],8($out) + mov @S[3],12($out) + + lea 16($out),$out + jmp .Lcbc_dloop + +.align 16 +.Lcbc_ddone: + mov $_ivp,%rdx + cmp \$0,%rcx + jne .Lcbc_dec_tail + + mov @S[0],0($out) + mov @S[1],4($out) + mov @S[2],8($out) + mov @S[3],12($out) + + mov %rax,(%rdx) # write out IV residue + mov %rbx,8(%rdx) + jmp .Lcbc_done +.align 16 +.Lcbc_dec_tail: + mov @S[0],0+$ivec + mov @S[1],4+$ivec + mov @S[2],8+$ivec + mov @S[3],12+$ivec + +.Lcbc_dec_pushf: + pushfq + cld + lea 8+$ivec,%rsi + lea ($out),%rdi + .long 0x9066A4F3 # rep movsb + popfq +.Lcbc_dec_popf: + + mov %rax,(%rdx) # write out IV residue + mov %rbx,8(%rdx) + jmp .Lcbc_done + +.align 16 +.Lcbc_done: + mov $_rsp,%rcx + mov 0(%rcx),%r15 + mov 8(%rcx),%r14 + mov 16(%rcx),%r13 + mov 24(%rcx),%r12 + mov 32(%rcx),%rbp + mov 40(%rcx),%rbx + lea 48(%rcx),%rsp +.Lcbc_abort: + ret +.size Camellia_cbc_encrypt,.-Camellia_cbc_encrypt + +.asciz "Camellia for x86_64 by " +___ +} + +# EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, +# CONTEXT *context,DISPATCHER_CONTEXT *disp) +if ($win64) { +$rec="%rcx"; +$frame="%rdx"; +$context="%r8"; +$disp="%r9"; + +$code.=<<___; +.extern __imp_RtlVirtualUnwind +.type common_se_handler,\@abi-omnipotent +.align 16 +common_se_handler: + push %rsi + push %rdi + push %rbx + push %rbp + push %r12 + push %r13 + push %r14 + push %r15 + pushfq + lea -64(%rsp),%rsp + + mov 120($context),%rax # pull context->Rax + mov 248($context),%rbx # pull context->Rip + + mov 8($disp),%rsi # disp->ImageBase + mov 56($disp),%r11 # disp->HandlerData + + mov 0(%r11),%r10d # HandlerData[0] + lea (%rsi,%r10),%r10 # prologue label + cmp %r10,%rbx # context->RipRsp + + mov 4(%r11),%r10d # HandlerData[1] + lea (%rsi,%r10),%r10 # epilogue label + cmp %r10,%rbx # context->Rip>=epilogue label + jae .Lin_prologue + + lea 40(%rax),%rax + mov -8(%rax),%rbx + mov -16(%rax),%rbp + mov -24(%rax),%r13 + mov -32(%rax),%r14 + mov -40(%rax),%r15 + mov %rbx,144($context) # restore context->Rbx + mov %rbp,160($context) # restore context->Rbp + mov %r13,224($context) # restore context->R13 + mov %r14,232($context) # restore context->R14 + mov %r15,240($context) # restore context->R15 + +.Lin_prologue: + mov 8(%rax),%rdi + mov 16(%rax),%rsi + mov %rax,152($context) # restore context->Rsp + mov %rsi,168($context) # restore context->Rsi + mov %rdi,176($context) # restore context->Rdi + + jmp .Lcommon_seh_exit +.size common_se_handler,.-common_se_handler + +.type cbc_se_handler,\@abi-omnipotent +.align 16 +cbc_se_handler: + push %rsi + push %rdi + push %rbx + push %rbp + push %r12 + push %r13 + push %r14 + push %r15 + pushfq + lea -64(%rsp),%rsp + + mov 120($context),%rax # pull context->Rax + mov 248($context),%rbx # pull context->Rip + + lea .Lcbc_prologue(%rip),%r10 + cmp %r10,%rbx # context->Rip<.Lcbc_prologue + jb .Lin_cbc_prologue + + lea .Lcbc_body(%rip),%r10 + cmp %r10,%rbx # context->Rip<.Lcbc_body + jb .Lin_cbc_frame_setup + + mov 152($context),%rax # pull context->Rsp + + lea .Lcbc_abort(%rip),%r10 + cmp %r10,%rbx # context->Rip>=.Lcbc_abort + jae .Lin_cbc_prologue + + # handle pushf/popf in Camellia_cbc_encrypt + lea .Lcbc_enc_pushf(%rip),%r10 + cmp %r10,%rbx # context->Rip<=.Lcbc_enc_pushf + jbe .Lin_cbc_no_flag + lea 8(%rax),%rax + lea .Lcbc_enc_popf(%rip),%r10 + cmp %r10,%rbx # context->Rip<.Lcbc_enc_popf + jb .Lin_cbc_no_flag + lea -8(%rax),%rax + lea .Lcbc_dec_pushf(%rip),%r10 + cmp %r10,%rbx # context->Rip<=.Lcbc_dec_pushf + jbe .Lin_cbc_no_flag + lea 8(%rax),%rax + lea .Lcbc_dec_popf(%rip),%r10 + cmp %r10,%rbx # context->Rip<.Lcbc_dec_popf + jb .Lin_cbc_no_flag + lea -8(%rax),%rax + +.Lin_cbc_no_flag: + mov 48(%rax),%rax # $_rsp + lea 48(%rax),%rax + +.Lin_cbc_frame_setup: + mov -8(%rax),%rbx + mov -16(%rax),%rbp + mov -24(%rax),%r12 + mov -32(%rax),%r13 + mov -40(%rax),%r14 + mov -48(%rax),%r15 + mov %rbx,144($context) # restore context->Rbx + mov %rbp,160($context) # restore context->Rbp + mov %r12,216($context) # restore context->R12 + mov %r13,224($context) # restore context->R13 + mov %r14,232($context) # restore context->R14 + mov %r15,240($context) # restore context->R15 + +.Lin_cbc_prologue: + mov 8(%rax),%rdi + mov 16(%rax),%rsi + mov %rax,152($context) # restore context->Rsp + mov %rsi,168($context) # restore context->Rsi + mov %rdi,176($context) # restore context->Rdi + +.align 4 +.Lcommon_seh_exit: + + mov 40($disp),%rdi # disp->ContextRecord + mov $context,%rsi # context + mov \$`1232/8`,%ecx # sizeof(CONTEXT) + .long 0xa548f3fc # cld; rep movsq + + mov $disp,%rsi + xor %rcx,%rcx # arg1, UNW_FLAG_NHANDLER + mov 8(%rsi),%rdx # arg2, disp->ImageBase + mov 0(%rsi),%r8 # arg3, disp->ControlPc + mov 16(%rsi),%r9 # arg4, disp->FunctionEntry + mov 40(%rsi),%r10 # disp->ContextRecord + lea 56(%rsi),%r11 # &disp->HandlerData + lea 24(%rsi),%r12 # &disp->EstablisherFrame + mov %r10,32(%rsp) # arg5 + mov %r11,40(%rsp) # arg6 + mov %r12,48(%rsp) # arg7 + mov %rcx,56(%rsp) # arg8, (NULL) + call *__imp_RtlVirtualUnwind(%rip) + + mov \$1,%eax # ExceptionContinueSearch + lea 64(%rsp),%rsp + popfq + pop %r15 + pop %r14 + pop %r13 + pop %r12 + pop %rbp + pop %rbx + pop %rdi + pop %rsi + ret +.size cbc_se_handler,.-cbc_se_handler + +.section .pdata +.align 4 + .rva .LSEH_begin_Camellia_EncryptBlock_Rounds + .rva .LSEH_end_Camellia_EncryptBlock_Rounds + .rva .LSEH_info_Camellia_EncryptBlock_Rounds + + .rva .LSEH_begin_Camellia_DecryptBlock_Rounds + .rva .LSEH_end_Camellia_DecryptBlock_Rounds + .rva .LSEH_info_Camellia_DecryptBlock_Rounds + + .rva .LSEH_begin_Camellia_Ekeygen + .rva .LSEH_end_Camellia_Ekeygen + .rva .LSEH_info_Camellia_Ekeygen + + .rva .LSEH_begin_Camellia_cbc_encrypt + .rva .LSEH_end_Camellia_cbc_encrypt + .rva .LSEH_info_Camellia_cbc_encrypt + +.section .xdata +.align 8 +.LSEH_info_Camellia_EncryptBlock_Rounds: + .byte 9,0,0,0 + .rva common_se_handler + .rva .Lenc_prologue,.Lenc_epilogue # HandlerData[] +.LSEH_info_Camellia_DecryptBlock_Rounds: + .byte 9,0,0,0 + .rva common_se_handler + .rva .Ldec_prologue,.Ldec_epilogue # HandlerData[] +.LSEH_info_Camellia_Ekeygen: + .byte 9,0,0,0 + .rva common_se_handler + .rva .Lkey_prologue,.Lkey_epilogue # HandlerData[] +.LSEH_info_Camellia_cbc_encrypt: + .byte 9,0,0,0 + .rva cbc_se_handler +___ +} + +$code =~ s/\`([^\`]*)\`/eval $1/gem; +print $code; +close STDOUT; From cc3fb1716823147ec53745d680a1a6a43f757aeb Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:20:24 -0500 Subject: [PATCH 348/576] Create cmllt4-sparcv9.pl --- .../open_ssl/camellia/asm/cmllt4-sparcv9.pl | 929 ++++++++++++++++++ 1 file changed, 929 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmllt4-sparcv9.pl diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmllt4-sparcv9.pl b/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmllt4-sparcv9.pl new file mode 100644 index 000000000..a813168b4 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/asm/cmllt4-sparcv9.pl @@ -0,0 +1,929 @@ +#!/usr/bin/env perl + +# ==================================================================== +# Written by David S. Miller and Andy Polyakov +# . The module is licensed under 2-clause BSD +# license. October 2012. All rights reserved. +# ==================================================================== + +###################################################################### +# Camellia for SPARC T4. +# +# As with AES below results [for aligned data] are virtually identical +# to critical path lenths for 3-cycle instruction latency: +# +# 128-bit key 192/256- +# CBC encrypt 4.14/4.21(*) 5.46/5.52 +# (*) numbers after slash are for +# misaligned data. +# +# As with Intel AES-NI, question is if it's possible to improve +# performance of parallelizeable modes by interleaving round +# instructions. In Camellia every instruction is dependent on +# previous, which means that there is place for 2 additional ones +# in between two dependent. Can we expect 3x performance improvement? +# At least one can argue that it should be possible to break 2x +# barrier... For some reason not even 2x appears to be possible: +# +# 128-bit key 192/256- +# CBC decrypt 2.21/2.74 2.99/3.40 +# CTR 2.15/2.68(*) 2.93/3.34 +# (*) numbers after slash are for +# misaligned data. +# +# This is for 2x interleave. But compared to 1x interleave CBC decrypt +# improved by ... 0% for 128-bit key, and 11% for 192/256-bit one. +# So that out-of-order execution logic can take non-interleaved code +# to 1.87x, but can't take 2x interleaved one any further. There +# surely is some explanation... As result 3x interleave was not even +# attempted. Instead an effort was made to share specific modes +# implementations with AES module (therefore sparct4_modes.pl). +# +# To anchor to something else, software C implementation processes +# one byte in 38 cycles with 128-bit key on same processor. + +$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; +push(@INC,"${dir}","${dir}../../perlasm"); +require "sparcv9_modes.pl"; + +&asm_init(@ARGV); + +$::evp=1; # if $evp is set to 0, script generates module with +# Camellia_[en|de]crypt, Camellia_set_key and Camellia_cbc_encrypt +# entry points. These are fully compatible with openssl/camellia.h. + +###################################################################### +# single-round subroutines +# +{ +my ($inp,$out,$key,$rounds,$tmp,$mask)=map("%o$_",(0..5)); + +$code=<<___; +.text + +.globl cmll_t4_encrypt +.align 32 +cmll_t4_encrypt: + andcc $inp, 7, %g1 ! is input aligned? + andn $inp, 7, $inp + + ldx [$key + 0], %g4 + ldx [$key + 8], %g5 + + ldx [$inp + 0], %o4 + bz,pt %icc, 1f + ldx [$inp + 8], %o5 + ldx [$inp + 16], $inp + sll %g1, 3, %g1 + sub %g0, %g1, %o3 + sllx %o4, %g1, %o4 + sllx %o5, %g1, %g1 + srlx %o5, %o3, %o5 + srlx $inp, %o3, %o3 + or %o5, %o4, %o4 + or %o3, %g1, %o5 +1: + ld [$key + 272], $rounds ! grandRounds, 3 or 4 + ldd [$key + 16], %f12 + ldd [$key + 24], %f14 + xor %g4, %o4, %o4 + xor %g5, %o5, %o5 + ldd [$key + 32], %f16 + ldd [$key + 40], %f18 + movxtod %o4, %f0 + movxtod %o5, %f2 + ldd [$key + 48], %f20 + ldd [$key + 56], %f22 + sub $rounds, 1, $rounds + ldd [$key + 64], %f24 + ldd [$key + 72], %f26 + add $key, 80, $key + +.Lenc: + camellia_f %f12, %f2, %f0, %f2 + ldd [$key + 0], %f12 + sub $rounds,1,$rounds + camellia_f %f14, %f0, %f2, %f0 + ldd [$key + 8], %f14 + camellia_f %f16, %f2, %f0, %f2 + ldd [$key + 16], %f16 + camellia_f %f18, %f0, %f2, %f0 + ldd [$key + 24], %f18 + camellia_f %f20, %f2, %f0, %f2 + ldd [$key + 32], %f20 + camellia_f %f22, %f0, %f2, %f0 + ldd [$key + 40], %f22 + camellia_fl %f24, %f0, %f0 + ldd [$key + 48], %f24 + camellia_fli %f26, %f2, %f2 + ldd [$key + 56], %f26 + brnz,pt $rounds, .Lenc + add $key, 64, $key + + andcc $out, 7, $tmp ! is output aligned? + camellia_f %f12, %f2, %f0, %f2 + camellia_f %f14, %f0, %f2, %f0 + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f18, %f0, %f2, %f0 + camellia_f %f20, %f2, %f0, %f4 + camellia_f %f22, %f0, %f4, %f2 + fxor %f24, %f4, %f0 + fxor %f26, %f2, %f2 + + bnz,pn %icc, 2f + nop + + std %f0, [$out + 0] + retl + std %f2, [$out + 8] + +2: alignaddrl $out, %g0, $out + mov 0xff, $mask + srl $mask, $tmp, $mask + + faligndata %f0, %f0, %f4 + faligndata %f0, %f2, %f6 + faligndata %f2, %f2, %f8 + + stda %f4, [$out + $mask]0xc0 ! partial store + std %f6, [$out + 8] + add $out, 16, $out + orn %g0, $mask, $mask + retl + stda %f8, [$out + $mask]0xc0 ! partial store +.type cmll_t4_encrypt,#function +.size cmll_t4_encrypt,.-cmll_t4_encrypt + +.globl cmll_t4_decrypt +.align 32 +cmll_t4_decrypt: + ld [$key + 272], $rounds ! grandRounds, 3 or 4 + andcc $inp, 7, %g1 ! is input aligned? + andn $inp, 7, $inp + + sll $rounds, 6, $rounds + add $rounds, $key, $key + + ldx [$inp + 0], %o4 + bz,pt %icc, 1f + ldx [$inp + 8], %o5 + ldx [$inp + 16], $inp + sll %g1, 3, %g1 + sub %g0, %g1, %g4 + sllx %o4, %g1, %o4 + sllx %o5, %g1, %g1 + srlx %o5, %g4, %o5 + srlx $inp, %g4, %g4 + or %o5, %o4, %o4 + or %g4, %g1, %o5 +1: + ldx [$key + 0], %g4 + ldx [$key + 8], %g5 + ldd [$key - 8], %f12 + ldd [$key - 16], %f14 + xor %g4, %o4, %o4 + xor %g5, %o5, %o5 + ldd [$key - 24], %f16 + ldd [$key - 32], %f18 + movxtod %o4, %f0 + movxtod %o5, %f2 + ldd [$key - 40], %f20 + ldd [$key - 48], %f22 + sub $rounds, 64, $rounds + ldd [$key - 56], %f24 + ldd [$key - 64], %f26 + sub $key, 64, $key + +.Ldec: + camellia_f %f12, %f2, %f0, %f2 + ldd [$key - 8], %f12 + sub $rounds, 64, $rounds + camellia_f %f14, %f0, %f2, %f0 + ldd [$key - 16], %f14 + camellia_f %f16, %f2, %f0, %f2 + ldd [$key - 24], %f16 + camellia_f %f18, %f0, %f2, %f0 + ldd [$key - 32], %f18 + camellia_f %f20, %f2, %f0, %f2 + ldd [$key - 40], %f20 + camellia_f %f22, %f0, %f2, %f0 + ldd [$key - 48], %f22 + camellia_fl %f24, %f0, %f0 + ldd [$key - 56], %f24 + camellia_fli %f26, %f2, %f2 + ldd [$key - 64], %f26 + brnz,pt $rounds, .Ldec + sub $key, 64, $key + + andcc $out, 7, $tmp ! is output aligned? + camellia_f %f12, %f2, %f0, %f2 + camellia_f %f14, %f0, %f2, %f0 + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f18, %f0, %f2, %f0 + camellia_f %f20, %f2, %f0, %f4 + camellia_f %f22, %f0, %f4, %f2 + fxor %f26, %f4, %f0 + fxor %f24, %f2, %f2 + + bnz,pn %icc, 2f + nop + + std %f0, [$out + 0] + retl + std %f2, [$out + 8] + +2: alignaddrl $out, %g0, $out + mov 0xff, $mask + srl $mask, $tmp, $mask + + faligndata %f0, %f0, %f4 + faligndata %f0, %f2, %f6 + faligndata %f2, %f2, %f8 + + stda %f4, [$out + $mask]0xc0 ! partial store + std %f6, [$out + 8] + add $out, 16, $out + orn %g0, $mask, $mask + retl + stda %f8, [$out + $mask]0xc0 ! partial store +.type cmll_t4_decrypt,#function +.size cmll_t4_decrypt,.-cmll_t4_decrypt +___ +} + +###################################################################### +# key setup subroutines +# +{ +sub ROTL128 { + my $rot = shift; + + "srlx %o4, 64-$rot, %g4\n\t". + "sllx %o4, $rot, %o4\n\t". + "srlx %o5, 64-$rot, %g5\n\t". + "sllx %o5, $rot, %o5\n\t". + "or %o4, %g5, %o4\n\t". + "or %o5, %g4, %o5"; +} + +my ($inp,$bits,$out,$tmp)=map("%o$_",(0..5)); +$code.=<<___; +.globl cmll_t4_set_key +.align 32 +cmll_t4_set_key: + and $inp, 7, $tmp + alignaddr $inp, %g0, $inp + cmp $bits, 192 + ldd [$inp + 0], %f0 + bl,pt %icc,.L128 + ldd [$inp + 8], %f2 + + be,pt %icc,.L192 + ldd [$inp + 16], %f4 + + brz,pt $tmp, .L256aligned + ldd [$inp + 24], %f6 + + ldd [$inp + 32], %f8 + faligndata %f0, %f2, %f0 + faligndata %f2, %f4, %f2 + faligndata %f4, %f6, %f4 + b .L256aligned + faligndata %f6, %f8, %f6 + +.align 16 +.L192: + brz,a,pt $tmp, .L256aligned + fnot2 %f4, %f6 + + ldd [$inp + 24], %f6 + nop + faligndata %f0, %f2, %f0 + faligndata %f2, %f4, %f2 + faligndata %f4, %f6, %f4 + fnot2 %f4, %f6 + +.L256aligned: + std %f0, [$out + 0] ! k[0, 1] + fsrc2 %f0, %f28 + std %f2, [$out + 8] ! k[2, 3] + fsrc2 %f2, %f30 + fxor %f4, %f0, %f0 + b .L128key + fxor %f6, %f2, %f2 + +.align 16 +.L128: + brz,pt $tmp, .L128aligned + nop + + ldd [$inp + 16], %f4 + nop + faligndata %f0, %f2, %f0 + faligndata %f2, %f4, %f2 + +.L128aligned: + std %f0, [$out + 0] ! k[0, 1] + fsrc2 %f0, %f28 + std %f2, [$out + 8] ! k[2, 3] + fsrc2 %f2, %f30 + +.L128key: + mov %o7, %o5 +1: call .+8 + add %o7, SIGMA-1b, %o4 + mov %o5, %o7 + + ldd [%o4 + 0], %f16 + ldd [%o4 + 8], %f18 + ldd [%o4 + 16], %f20 + ldd [%o4 + 24], %f22 + + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f18, %f0, %f2, %f0 + fxor %f28, %f0, %f0 + fxor %f30, %f2, %f2 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f22, %f0, %f2, %f0 + + bge,pn %icc, .L256key + nop + std %f0, [$out + 0x10] ! k[ 4, 5] + std %f2, [$out + 0x18] ! k[ 6, 7] + + movdtox %f0, %o4 + movdtox %f2, %o5 + `&ROTL128(15)` + stx %o4, [$out + 0x30] ! k[12, 13] + stx %o5, [$out + 0x38] ! k[14, 15] + `&ROTL128(15)` + stx %o4, [$out + 0x40] ! k[16, 17] + stx %o5, [$out + 0x48] ! k[18, 19] + `&ROTL128(15)` + stx %o4, [$out + 0x60] ! k[24, 25] + `&ROTL128(15)` + stx %o4, [$out + 0x70] ! k[28, 29] + stx %o5, [$out + 0x78] ! k[30, 31] + `&ROTL128(34)` + stx %o4, [$out + 0xa0] ! k[40, 41] + stx %o5, [$out + 0xa8] ! k[42, 43] + `&ROTL128(17)` + stx %o4, [$out + 0xc0] ! k[48, 49] + stx %o5, [$out + 0xc8] ! k[50, 51] + + movdtox %f28, %o4 ! k[ 0, 1] + movdtox %f30, %o5 ! k[ 2, 3] + `&ROTL128(15)` + stx %o4, [$out + 0x20] ! k[ 8, 9] + stx %o5, [$out + 0x28] ! k[10, 11] + `&ROTL128(30)` + stx %o4, [$out + 0x50] ! k[20, 21] + stx %o5, [$out + 0x58] ! k[22, 23] + `&ROTL128(15)` + stx %o5, [$out + 0x68] ! k[26, 27] + `&ROTL128(17)` + stx %o4, [$out + 0x80] ! k[32, 33] + stx %o5, [$out + 0x88] ! k[34, 35] + `&ROTL128(17)` + stx %o4, [$out + 0x90] ! k[36, 37] + stx %o5, [$out + 0x98] ! k[38, 39] + `&ROTL128(17)` + stx %o4, [$out + 0xb0] ! k[44, 45] + stx %o5, [$out + 0xb8] ! k[46, 47] + + mov 3, $tmp + st $tmp, [$out + 0x110] + retl + xor %o0, %o0, %o0 + +.align 16 +.L256key: + ldd [%o4 + 32], %f24 + ldd [%o4 + 40], %f26 + + std %f0, [$out + 0x30] ! k[12, 13] + std %f2, [$out + 0x38] ! k[14, 15] + + fxor %f4, %f0, %f0 + fxor %f6, %f2, %f2 + camellia_f %f24, %f2, %f0, %f2 + camellia_f %f26, %f0, %f2, %f0 + + std %f0, [$out + 0x10] ! k[ 4, 5] + std %f2, [$out + 0x18] ! k[ 6, 7] + + movdtox %f0, %o4 + movdtox %f2, %o5 + `&ROTL128(30)` + stx %o4, [$out + 0x50] ! k[20, 21] + stx %o5, [$out + 0x58] ! k[22, 23] + `&ROTL128(30)` + stx %o4, [$out + 0xa0] ! k[40, 41] + stx %o5, [$out + 0xa8] ! k[42, 43] + `&ROTL128(51)` + stx %o4, [$out + 0x100] ! k[64, 65] + stx %o5, [$out + 0x108] ! k[66, 67] + + movdtox %f4, %o4 ! k[ 8, 9] + movdtox %f6, %o5 ! k[10, 11] + `&ROTL128(15)` + stx %o4, [$out + 0x20] ! k[ 8, 9] + stx %o5, [$out + 0x28] ! k[10, 11] + `&ROTL128(15)` + stx %o4, [$out + 0x40] ! k[16, 17] + stx %o5, [$out + 0x48] ! k[18, 19] + `&ROTL128(30)` + stx %o4, [$out + 0x90] ! k[36, 37] + stx %o5, [$out + 0x98] ! k[38, 39] + `&ROTL128(34)` + stx %o4, [$out + 0xd0] ! k[52, 53] + stx %o5, [$out + 0xd8] ! k[54, 55] + ldx [$out + 0x30], %o4 ! k[12, 13] + ldx [$out + 0x38], %o5 ! k[14, 15] + `&ROTL128(15)` + stx %o4, [$out + 0x30] ! k[12, 13] + stx %o5, [$out + 0x38] ! k[14, 15] + `&ROTL128(30)` + stx %o4, [$out + 0x70] ! k[28, 29] + stx %o5, [$out + 0x78] ! k[30, 31] + srlx %o4, 32, %g4 + srlx %o5, 32, %g5 + st %o4, [$out + 0xc0] ! k[48] + st %g5, [$out + 0xc4] ! k[49] + st %o5, [$out + 0xc8] ! k[50] + st %g4, [$out + 0xcc] ! k[51] + `&ROTL128(49)` + stx %o4, [$out + 0xe0] ! k[56, 57] + stx %o5, [$out + 0xe8] ! k[58, 59] + + movdtox %f28, %o4 ! k[ 0, 1] + movdtox %f30, %o5 ! k[ 2, 3] + `&ROTL128(45)` + stx %o4, [$out + 0x60] ! k[24, 25] + stx %o5, [$out + 0x68] ! k[26, 27] + `&ROTL128(15)` + stx %o4, [$out + 0x80] ! k[32, 33] + stx %o5, [$out + 0x88] ! k[34, 35] + `&ROTL128(17)` + stx %o4, [$out + 0xb0] ! k[44, 45] + stx %o5, [$out + 0xb8] ! k[46, 47] + `&ROTL128(34)` + stx %o4, [$out + 0xf0] ! k[60, 61] + stx %o5, [$out + 0xf8] ! k[62, 63] + + mov 4, $tmp + st $tmp, [$out + 0x110] + retl + xor %o0, %o0, %o0 +.type cmll_t4_set_key,#function +.size cmll_t4_set_key,.-cmll_t4_set_key +.align 32 +SIGMA: + .long 0xa09e667f, 0x3bcc908b, 0xb67ae858, 0x4caa73b2 + .long 0xc6ef372f, 0xe94f82be, 0x54ff53a5, 0xf1d36f1c + .long 0x10e527fa, 0xde682d1d, 0xb05688c2, 0xb3e6c1fd +.type SIGMA,#object +.size SIGMA,.-SIGMA +.asciz "Camellia for SPARC T4, David S. Miller, Andy Polyakov" +___ +} + +{{{ +my ($inp,$out,$len,$key,$ivec,$enc)=map("%i$_",(0..5)); +my ($ileft,$iright,$ooff,$omask,$ivoff)=map("%l$_",(1..7)); + +$code.=<<___; +.align 32 +_cmll128_load_enckey: + ldx [$key + 0], %g4 + ldx [$key + 8], %g5 +___ +for ($i=2; $i<26;$i++) { # load key schedule + $code.=<<___; + ldd [$key + `8*$i`], %f`12+2*$i` +___ +} +$code.=<<___; + retl + nop +.type _cmll128_load_enckey,#function +.size _cmll128_load_enckey,.-_cmll128_load_enckey +_cmll256_load_enckey=_cmll128_load_enckey + +.align 32 +_cmll256_load_deckey: + ldd [$key + 64], %f62 + ldd [$key + 72], %f60 + b .Load_deckey + add $key, 64, $key +_cmll128_load_deckey: + ldd [$key + 0], %f60 + ldd [$key + 8], %f62 +.Load_deckey: +___ +for ($i=2; $i<24;$i++) { # load key schedule + $code.=<<___; + ldd [$key + `8*$i`], %f`62-2*$i` +___ +} +$code.=<<___; + ldx [$key + 192], %g4 + retl + ldx [$key + 200], %g5 +.type _cmll256_load_deckey,#function +.size _cmll256_load_deckey,.-_cmll256_load_deckey + +.align 32 +_cmll128_encrypt_1x: +___ +for ($i=0; $i<3; $i++) { + $code.=<<___; + camellia_f %f`16+16*$i+0`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+2`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+4`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+6`, %f0, %f2, %f0 +___ +$code.=<<___ if ($i<2); + camellia_f %f`16+16*$i+8`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+10`, %f0, %f2, %f0 + camellia_fl %f`16+16*$i+12`, %f0, %f0 + camellia_fli %f`16+16*$i+14`, %f2, %f2 +___ +} +$code.=<<___; + camellia_f %f56, %f2, %f0, %f4 + camellia_f %f58, %f0, %f4, %f2 + fxor %f60, %f4, %f0 + retl + fxor %f62, %f2, %f2 +.type _cmll128_encrypt_1x,#function +.size _cmll128_encrypt_1x,.-_cmll128_encrypt_1x +_cmll128_decrypt_1x=_cmll128_encrypt_1x + +.align 32 +_cmll128_encrypt_2x: +___ +for ($i=0; $i<3; $i++) { + $code.=<<___; + camellia_f %f`16+16*$i+0`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+0`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+2`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+2`, %f4, %f6, %f4 + camellia_f %f`16+16*$i+4`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+4`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+6`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+6`, %f4, %f6, %f4 +___ +$code.=<<___ if ($i<2); + camellia_f %f`16+16*$i+8`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+8`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+10`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+10`, %f4, %f6, %f4 + camellia_fl %f`16+16*$i+12`, %f0, %f0 + camellia_fl %f`16+16*$i+12`, %f4, %f4 + camellia_fli %f`16+16*$i+14`, %f2, %f2 + camellia_fli %f`16+16*$i+14`, %f6, %f6 +___ +} +$code.=<<___; + camellia_f %f56, %f2, %f0, %f8 + camellia_f %f56, %f6, %f4, %f10 + camellia_f %f58, %f0, %f8, %f2 + camellia_f %f58, %f4, %f10, %f6 + fxor %f60, %f8, %f0 + fxor %f60, %f10, %f4 + fxor %f62, %f2, %f2 + retl + fxor %f62, %f6, %f6 +.type _cmll128_encrypt_2x,#function +.size _cmll128_encrypt_2x,.-_cmll128_encrypt_2x +_cmll128_decrypt_2x=_cmll128_encrypt_2x + +.align 32 +_cmll256_encrypt_1x: + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f18, %f0, %f2, %f0 + ldd [$key + 208], %f16 + ldd [$key + 216], %f18 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f22, %f0, %f2, %f0 + ldd [$key + 224], %f20 + ldd [$key + 232], %f22 + camellia_f %f24, %f2, %f0, %f2 + camellia_f %f26, %f0, %f2, %f0 + ldd [$key + 240], %f24 + ldd [$key + 248], %f26 + camellia_fl %f28, %f0, %f0 + camellia_fli %f30, %f2, %f2 + ldd [$key + 256], %f28 + ldd [$key + 264], %f30 +___ +for ($i=1; $i<3; $i++) { + $code.=<<___; + camellia_f %f`16+16*$i+0`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+2`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+4`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+6`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+8`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+10`, %f0, %f2, %f0 + camellia_fl %f`16+16*$i+12`, %f0, %f0 + camellia_fli %f`16+16*$i+14`, %f2, %f2 +___ +} +$code.=<<___; + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f18, %f0, %f2, %f0 + ldd [$key + 16], %f16 + ldd [$key + 24], %f18 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f22, %f0, %f2, %f0 + ldd [$key + 32], %f20 + ldd [$key + 40], %f22 + camellia_f %f24, %f2, %f0, %f4 + camellia_f %f26, %f0, %f4, %f2 + ldd [$key + 48], %f24 + ldd [$key + 56], %f26 + fxor %f28, %f4, %f0 + fxor %f30, %f2, %f2 + ldd [$key + 64], %f28 + retl + ldd [$key + 72], %f30 +.type _cmll256_encrypt_1x,#function +.size _cmll256_encrypt_1x,.-_cmll256_encrypt_1x + +.align 32 +_cmll256_encrypt_2x: + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f16, %f6, %f4, %f6 + camellia_f %f18, %f0, %f2, %f0 + camellia_f %f18, %f4, %f6, %f4 + ldd [$key + 208], %f16 + ldd [$key + 216], %f18 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f20, %f6, %f4, %f6 + camellia_f %f22, %f0, %f2, %f0 + camellia_f %f22, %f4, %f6, %f4 + ldd [$key + 224], %f20 + ldd [$key + 232], %f22 + camellia_f %f24, %f2, %f0, %f2 + camellia_f %f24, %f6, %f4, %f6 + camellia_f %f26, %f0, %f2, %f0 + camellia_f %f26, %f4, %f6, %f4 + ldd [$key + 240], %f24 + ldd [$key + 248], %f26 + camellia_fl %f28, %f0, %f0 + camellia_fl %f28, %f4, %f4 + camellia_fli %f30, %f2, %f2 + camellia_fli %f30, %f6, %f6 + ldd [$key + 256], %f28 + ldd [$key + 264], %f30 +___ +for ($i=1; $i<3; $i++) { + $code.=<<___; + camellia_f %f`16+16*$i+0`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+0`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+2`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+2`, %f4, %f6, %f4 + camellia_f %f`16+16*$i+4`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+4`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+6`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+6`, %f4, %f6, %f4 + camellia_f %f`16+16*$i+8`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+8`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+10`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+10`, %f4, %f6, %f4 + camellia_fl %f`16+16*$i+12`, %f0, %f0 + camellia_fl %f`16+16*$i+12`, %f4, %f4 + camellia_fli %f`16+16*$i+14`, %f2, %f2 + camellia_fli %f`16+16*$i+14`, %f6, %f6 +___ +} +$code.=<<___; + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f16, %f6, %f4, %f6 + camellia_f %f18, %f0, %f2, %f0 + camellia_f %f18, %f4, %f6, %f4 + ldd [$key + 16], %f16 + ldd [$key + 24], %f18 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f20, %f6, %f4, %f6 + camellia_f %f22, %f0, %f2, %f0 + camellia_f %f22, %f4, %f6, %f4 + ldd [$key + 32], %f20 + ldd [$key + 40], %f22 + camellia_f %f24, %f2, %f0, %f8 + camellia_f %f24, %f6, %f4, %f10 + camellia_f %f26, %f0, %f8, %f2 + camellia_f %f26, %f4, %f10, %f6 + ldd [$key + 48], %f24 + ldd [$key + 56], %f26 + fxor %f28, %f8, %f0 + fxor %f28, %f10, %f4 + fxor %f30, %f2, %f2 + fxor %f30, %f6, %f6 + ldd [$key + 64], %f28 + retl + ldd [$key + 72], %f30 +.type _cmll256_encrypt_2x,#function +.size _cmll256_encrypt_2x,.-_cmll256_encrypt_2x + +.align 32 +_cmll256_decrypt_1x: + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f18, %f0, %f2, %f0 + ldd [$key - 8], %f16 + ldd [$key - 16], %f18 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f22, %f0, %f2, %f0 + ldd [$key - 24], %f20 + ldd [$key - 32], %f22 + camellia_f %f24, %f2, %f0, %f2 + camellia_f %f26, %f0, %f2, %f0 + ldd [$key - 40], %f24 + ldd [$key - 48], %f26 + camellia_fl %f28, %f0, %f0 + camellia_fli %f30, %f2, %f2 + ldd [$key - 56], %f28 + ldd [$key - 64], %f30 +___ +for ($i=1; $i<3; $i++) { + $code.=<<___; + camellia_f %f`16+16*$i+0`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+2`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+4`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+6`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+8`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+10`, %f0, %f2, %f0 + camellia_fl %f`16+16*$i+12`, %f0, %f0 + camellia_fli %f`16+16*$i+14`, %f2, %f2 +___ +} +$code.=<<___; + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f18, %f0, %f2, %f0 + ldd [$key + 184], %f16 + ldd [$key + 176], %f18 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f22, %f0, %f2, %f0 + ldd [$key + 168], %f20 + ldd [$key + 160], %f22 + camellia_f %f24, %f2, %f0, %f4 + camellia_f %f26, %f0, %f4, %f2 + ldd [$key + 152], %f24 + ldd [$key + 144], %f26 + fxor %f30, %f4, %f0 + fxor %f28, %f2, %f2 + ldd [$key + 136], %f28 + retl + ldd [$key + 128], %f30 +.type _cmll256_decrypt_1x,#function +.size _cmll256_decrypt_1x,.-_cmll256_decrypt_1x + +.align 32 +_cmll256_decrypt_2x: + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f16, %f6, %f4, %f6 + camellia_f %f18, %f0, %f2, %f0 + camellia_f %f18, %f4, %f6, %f4 + ldd [$key - 8], %f16 + ldd [$key - 16], %f18 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f20, %f6, %f4, %f6 + camellia_f %f22, %f0, %f2, %f0 + camellia_f %f22, %f4, %f6, %f4 + ldd [$key - 24], %f20 + ldd [$key - 32], %f22 + camellia_f %f24, %f2, %f0, %f2 + camellia_f %f24, %f6, %f4, %f6 + camellia_f %f26, %f0, %f2, %f0 + camellia_f %f26, %f4, %f6, %f4 + ldd [$key - 40], %f24 + ldd [$key - 48], %f26 + camellia_fl %f28, %f0, %f0 + camellia_fl %f28, %f4, %f4 + camellia_fli %f30, %f2, %f2 + camellia_fli %f30, %f6, %f6 + ldd [$key - 56], %f28 + ldd [$key - 64], %f30 +___ +for ($i=1; $i<3; $i++) { + $code.=<<___; + camellia_f %f`16+16*$i+0`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+0`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+2`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+2`, %f4, %f6, %f4 + camellia_f %f`16+16*$i+4`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+4`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+6`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+6`, %f4, %f6, %f4 + camellia_f %f`16+16*$i+8`, %f2, %f0, %f2 + camellia_f %f`16+16*$i+8`, %f6, %f4, %f6 + camellia_f %f`16+16*$i+10`, %f0, %f2, %f0 + camellia_f %f`16+16*$i+10`, %f4, %f6, %f4 + camellia_fl %f`16+16*$i+12`, %f0, %f0 + camellia_fl %f`16+16*$i+12`, %f4, %f4 + camellia_fli %f`16+16*$i+14`, %f2, %f2 + camellia_fli %f`16+16*$i+14`, %f6, %f6 +___ +} +$code.=<<___; + camellia_f %f16, %f2, %f0, %f2 + camellia_f %f16, %f6, %f4, %f6 + camellia_f %f18, %f0, %f2, %f0 + camellia_f %f18, %f4, %f6, %f4 + ldd [$key + 184], %f16 + ldd [$key + 176], %f18 + camellia_f %f20, %f2, %f0, %f2 + camellia_f %f20, %f6, %f4, %f6 + camellia_f %f22, %f0, %f2, %f0 + camellia_f %f22, %f4, %f6, %f4 + ldd [$key + 168], %f20 + ldd [$key + 160], %f22 + camellia_f %f24, %f2, %f0, %f8 + camellia_f %f24, %f6, %f4, %f10 + camellia_f %f26, %f0, %f8, %f2 + camellia_f %f26, %f4, %f10, %f6 + ldd [$key + 152], %f24 + ldd [$key + 144], %f26 + fxor %f30, %f8, %f0 + fxor %f30, %f10, %f4 + fxor %f28, %f2, %f2 + fxor %f28, %f6, %f6 + ldd [$key + 136], %f28 + retl + ldd [$key + 128], %f30 +.type _cmll256_decrypt_2x,#function +.size _cmll256_decrypt_2x,.-_cmll256_decrypt_2x +___ + +&alg_cbc_encrypt_implement("cmll",128); +&alg_cbc_encrypt_implement("cmll",256); + +&alg_cbc_decrypt_implement("cmll",128); +&alg_cbc_decrypt_implement("cmll",256); + +if ($::evp) { + &alg_ctr32_implement("cmll",128); + &alg_ctr32_implement("cmll",256); +} +}}} + +if (!$::evp) { +$code.=<<___; +.global Camellia_encrypt +Camellia_encrypt=cmll_t4_encrypt +.global Camellia_decrypt +Camellia_decrypt=cmll_t4_decrypt +.global Camellia_set_key +.align 32 +Camellia_set_key: + andcc %o2, 7, %g0 ! double-check alignment + bnz,a,pn %icc, 1f + mov -1, %o0 + brz,a,pn %o0, 1f + mov -1, %o0 + brz,a,pn %o2, 1f + mov -1, %o0 + andncc %o1, 0x1c0, %g0 + bnz,a,pn %icc, 1f + mov -2, %o0 + cmp %o1, 128 + bl,a,pn %icc, 1f + mov -2, %o0 + b cmll_t4_set_key + nop +1: retl + nop +.type Camellia_set_key,#function +.size Camellia_set_key,.-Camellia_set_key +___ + +my ($inp,$out,$len,$key,$ivec,$enc)=map("%o$_",(0..5)); + +$code.=<<___; +.globl Camellia_cbc_encrypt +.align 32 +Camellia_cbc_encrypt: + ld [$key + 272], %g1 + nop + brz $enc, .Lcbc_decrypt + cmp %g1, 3 + + be,pt %icc, cmll128_t4_cbc_encrypt + nop + ba cmll256_t4_cbc_encrypt + nop + +.Lcbc_decrypt: + be,pt %icc, cmll128_t4_cbc_decrypt + nop + ba cmll256_t4_cbc_decrypt + nop +.type Camellia_cbc_encrypt,#function +.size Camellia_cbc_encrypt,.-Camellia_cbc_encrypt +___ +} + +&emit_assembler(); + +close STDOUT; From 78dd965e8cef99f448fe2e67d7c7edf95ccb6f65 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:20:42 -0500 Subject: [PATCH 349/576] Create camellia.c --- .../open_ssl/camellia/camellia.c | 584 ++++++++++++++++++ 1 file changed, 584 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/camellia.c diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/camellia.c b/stratum/algos/binarium_hash_v1/open_ssl/camellia/camellia.c new file mode 100644 index 000000000..719fa61cf --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/camellia.c @@ -0,0 +1,584 @@ +/* crypto/camellia/camellia.c */ +/* ==================================================================== + * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . + * ALL RIGHTS RESERVED. + * + * Intellectual Property information for Camellia: + * http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html + * + * News Release for Announcement of Camellia open source: + * http://www.ntt.co.jp/news/news06e/0604/060413a.html + * + * The Camellia Code included herein is developed by + * NTT (Nippon Telegraph and Telephone Corporation), and is contributed + * to the OpenSSL project. + * + * The Camellia Code is licensed pursuant to the OpenSSL open source + * license provided below. + */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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. + * ==================================================================== + */ + +/* + * Algorithm Specification + * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html + */ + +/* + * This release balances code size and performance. In particular key + * schedule setup is fully unrolled, because doing so *significantly* + * reduces amount of instructions per setup round and code increase is + * justifiable. In block functions on the other hand only inner loops + * are unrolled, as full unroll gives only nominal performance boost, + * while code size grows 4 or 7 times. Also, unlike previous versions + * this one "encourages" compiler to keep intermediate variables in + * registers, which should give better "all round" results, in other + * words reasonable performance even with not so modern compilers. + */ + +#include "camellia.h" +#include "cmll_locl.h" +#include +#include + +/* 32-bit rotations */ +#if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) +# if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64)) +# define RightRotate(x, s) _lrotr(x, s) +# define LeftRotate(x, s) _lrotl(x, s) +# if _MSC_VER >= 1400 +# define SWAP(x) _byteswap_ulong(x) +# else +# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) +# endif +# define GETU32(p) SWAP(*((u32 *)(p))) +# define PUTU32(p,v) (*((u32 *)(p)) = SWAP((v))) +# elif defined(__GNUC__) && __GNUC__>=2 +# if defined(__i386) || defined(__x86_64) +# define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) +# define LeftRotate(x,s) ({u32 ret; asm ("roll %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) +# if defined(B_ENDIAN) /* stratus.com does it */ +# define GETU32(p) (*(u32 *)(p)) +# define PUTU32(p,v) (*(u32 *)(p)=(v)) +# else +# define GETU32(p) ({u32 r=*(const u32 *)(p); asm("bswapl %0":"=r"(r):"0"(r)); r; }) +# define PUTU32(p,v) ({u32 r=(v); asm("bswapl %0":"=r"(r):"0"(r)); *(u32 *)(p)=r; }) +# endif +# elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ + defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) +# define LeftRotate(x,s) ({u32 ret; asm ("rlwinm %0,%1,%2,0,31":"=r"(ret):"r"(x),"I"(s)); ret; }) +# define RightRotate(x,s) LeftRotate(x,(32-s)) +# elif defined(__s390x__) +# define LeftRotate(x,s) ({u32 ret; asm ("rll %0,%1,%2":"=r"(ret):"r"(x),"I"(s)); ret; }) +# define RightRotate(x,s) LeftRotate(x,(32-s)) +# define GETU32(p) (*(u32 *)(p)) +# define PUTU32(p,v) (*(u32 *)(p)=(v)) +# endif +# endif +#endif + +#if !defined(RightRotate) && !defined(LeftRotate) +# define RightRotate(x, s) ( ((x) >> (s)) + ((x) << (32 - s)) ) +# define LeftRotate(x, s) ( ((x) << (s)) + ((x) >> (32 - s)) ) +#endif + +#if !defined(GETU32) && !defined(PUTU32) +# define GETU32(p) (((u32)(p)[0] << 24) ^ ((u32)(p)[1] << 16) ^ ((u32)(p)[2] << 8) ^ ((u32)(p)[3])) +# define PUTU32(p,v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v)) +#endif + +/* S-box data */ +#define SBOX1_1110 Camellia_SBOX[0] +#define SBOX4_4404 Camellia_SBOX[1] +#define SBOX2_0222 Camellia_SBOX[2] +#define SBOX3_3033 Camellia_SBOX[3] +static const u32 Camellia_SBOX[][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}, + {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}, + {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} +}; + +/* Key generation constants */ +static const u32 SIGMA[] = { + 0xa09e667f, 0x3bcc908b, 0xb67ae858, 0x4caa73b2, 0xc6ef372f, 0xe94f82be, + 0x54ff53a5, 0xf1d36f1c, 0x10e527fa, 0xde682d1d, 0xb05688c2, 0xb3e6c1fd +}; + +/* The phi algorithm given in C.2.7 of the Camellia spec document. */ +/* + * This version does not attempt to minimize amount of temporary + * variables, but instead explicitly exposes algorithm's parallelism. + * It is therefore most appropriate for platforms with not less than + * ~16 registers. For platforms with less registers [well, x86 to be + * specific] assembler version should be/is provided anyway... + */ +#define Camellia_Feistel(_s0,_s1,_s2,_s3,_key) do {\ + register u32 _t0,_t1,_t2,_t3;\ +\ + _t0 = _s0 ^ (_key)[0];\ + _t3 = SBOX4_4404[_t0&0xff];\ + _t1 = _s1 ^ (_key)[1];\ + _t3 ^= SBOX3_3033[(_t0 >> 8)&0xff];\ + _t2 = SBOX1_1110[_t1&0xff];\ + _t3 ^= SBOX2_0222[(_t0 >> 16)&0xff];\ + _t2 ^= SBOX4_4404[(_t1 >> 8)&0xff];\ + _t3 ^= SBOX1_1110[(_t0 >> 24)];\ + _t2 ^= _t3;\ + _t3 = RightRotate(_t3,8);\ + _t2 ^= SBOX3_3033[(_t1 >> 16)&0xff];\ + _s3 ^= _t3;\ + _t2 ^= SBOX2_0222[(_t1 >> 24)];\ + _s2 ^= _t2; \ + _s3 ^= _t2;\ +} while(0) + +/* + * Note that n has to be less than 32. Rotations for larger amount + * of bits are achieved by "rotating" order of s-elements and + * adjusting n accordingly, e.g. RotLeft128(s1,s2,s3,s0,n-32). + */ +#define RotLeft128(_s0,_s1,_s2,_s3,_n) do {\ + u32 _t0=_s0>>(32-_n);\ + _s0 = (_s0<<_n) | (_s1>>(32-_n));\ + _s1 = (_s1<<_n) | (_s2>>(32-_n));\ + _s2 = (_s2<<_n) | (_s3>>(32-_n));\ + _s3 = (_s3<<_n) | _t0;\ +} while (0) + +int Camellia_Ekeygen(int keyBitLength, const u8 *rawKey, KEY_TABLE_TYPE k) +{ + register u32 s0, s1, s2, s3; + + k[0] = s0 = GETU32(rawKey); + k[1] = s1 = GETU32(rawKey + 4); + k[2] = s2 = GETU32(rawKey + 8); + k[3] = s3 = GETU32(rawKey + 12); + + if (keyBitLength != 128) { + k[8] = s0 = GETU32(rawKey + 16); + k[9] = s1 = GETU32(rawKey + 20); + if (keyBitLength == 192) { + k[10] = s2 = ~s0; + k[11] = s3 = ~s1; + } else { + k[10] = s2 = GETU32(rawKey + 24); + k[11] = s3 = GETU32(rawKey + 28); + } + s0 ^= k[0], s1 ^= k[1], s2 ^= k[2], s3 ^= k[3]; + } + + /* Use the Feistel routine to scramble the key material */ + Camellia_Feistel(s0, s1, s2, s3, SIGMA + 0); + Camellia_Feistel(s2, s3, s0, s1, SIGMA + 2); + + s0 ^= k[0], s1 ^= k[1], s2 ^= k[2], s3 ^= k[3]; + Camellia_Feistel(s0, s1, s2, s3, SIGMA + 4); + Camellia_Feistel(s2, s3, s0, s1, SIGMA + 6); + + /* Fill the keyTable. Requires many block rotations. */ + if (keyBitLength == 128) { + k[4] = s0, k[5] = s1, k[6] = s2, k[7] = s3; + RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 15 */ + k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; + RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 30 */ + k[16] = s0, k[17] = s1, k[18] = s2, k[19] = s3; + RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 45 */ + k[24] = s0, k[25] = s1; + RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 60 */ + k[28] = s0, k[29] = s1, k[30] = s2, k[31] = s3; + RotLeft128(s1, s2, s3, s0, 2); /* KA <<< 94 */ + k[40] = s1, k[41] = s2, k[42] = s3, k[43] = s0; + RotLeft128(s1, s2, s3, s0, 17); /* KA <<<111 */ + k[48] = s1, k[49] = s2, k[50] = s3, k[51] = s0; + + s0 = k[0], s1 = k[1], s2 = k[2], s3 = k[3]; + RotLeft128(s0, s1, s2, s3, 15); /* KL <<< 15 */ + k[8] = s0, k[9] = s1, k[10] = s2, k[11] = s3; + RotLeft128(s0, s1, s2, s3, 30); /* KL <<< 45 */ + k[20] = s0, k[21] = s1, k[22] = s2, k[23] = s3; + RotLeft128(s0, s1, s2, s3, 15); /* KL <<< 60 */ + k[26] = s2, k[27] = s3; + RotLeft128(s0, s1, s2, s3, 17); /* KL <<< 77 */ + k[32] = s0, k[33] = s1, k[34] = s2, k[35] = s3; + RotLeft128(s0, s1, s2, s3, 17); /* KL <<< 94 */ + k[36] = s0, k[37] = s1, k[38] = s2, k[39] = s3; + RotLeft128(s0, s1, s2, s3, 17); /* KL <<<111 */ + k[44] = s0, k[45] = s1, k[46] = s2, k[47] = s3; + + return 3; /* grand rounds */ + } else { + k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; + s0 ^= k[8], s1 ^= k[9], s2 ^= k[10], s3 ^= k[11]; + Camellia_Feistel(s0, s1, s2, s3, (SIGMA + 8)); + Camellia_Feistel(s2, s3, s0, s1, (SIGMA + 10)); + + k[4] = s0, k[5] = s1, k[6] = s2, k[7] = s3; + RotLeft128(s0, s1, s2, s3, 30); /* KB <<< 30 */ + k[20] = s0, k[21] = s1, k[22] = s2, k[23] = s3; + RotLeft128(s0, s1, s2, s3, 30); /* KB <<< 60 */ + k[40] = s0, k[41] = s1, k[42] = s2, k[43] = s3; + RotLeft128(s1, s2, s3, s0, 19); /* KB <<<111 */ + k[64] = s1, k[65] = s2, k[66] = s3, k[67] = s0; + + s0 = k[8], s1 = k[9], s2 = k[10], s3 = k[11]; + RotLeft128(s0, s1, s2, s3, 15); /* KR <<< 15 */ + k[8] = s0, k[9] = s1, k[10] = s2, k[11] = s3; + RotLeft128(s0, s1, s2, s3, 15); /* KR <<< 30 */ + k[16] = s0, k[17] = s1, k[18] = s2, k[19] = s3; + RotLeft128(s0, s1, s2, s3, 30); /* KR <<< 60 */ + k[36] = s0, k[37] = s1, k[38] = s2, k[39] = s3; + RotLeft128(s1, s2, s3, s0, 2); /* KR <<< 94 */ + k[52] = s1, k[53] = s2, k[54] = s3, k[55] = s0; + + s0 = k[12], s1 = k[13], s2 = k[14], s3 = k[15]; + RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 15 */ + k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; + RotLeft128(s0, s1, s2, s3, 30); /* KA <<< 45 */ + k[28] = s0, k[29] = s1, k[30] = s2, k[31] = s3; + /* KA <<< 77 */ + k[48] = s1, k[49] = s2, k[50] = s3, k[51] = s0; + RotLeft128(s1, s2, s3, s0, 17); /* KA <<< 94 */ + k[56] = s1, k[57] = s2, k[58] = s3, k[59] = s0; + + s0 = k[0], s1 = k[1], s2 = k[2], s3 = k[3]; + RotLeft128(s1, s2, s3, s0, 13); /* KL <<< 45 */ + k[24] = s1, k[25] = s2, k[26] = s3, k[27] = s0; + RotLeft128(s1, s2, s3, s0, 15); /* KL <<< 60 */ + k[32] = s1, k[33] = s2, k[34] = s3, k[35] = s0; + RotLeft128(s1, s2, s3, s0, 17); /* KL <<< 77 */ + k[44] = s1, k[45] = s2, k[46] = s3, k[47] = s0; + RotLeft128(s2, s3, s0, s1, 2); /* KL <<<111 */ + k[60] = s2, k[61] = s3, k[62] = s0, k[63] = s1; + + return 4; /* grand rounds */ + } + /* + * It is possible to perform certain precalculations, which + * would spare few cycles in block procedure. It's not done, + * because it upsets the performance balance between key + * setup and block procedures, negatively affecting overall + * throughput in applications operating on short messages + * and volatile keys. + */ +} + +void Camellia_EncryptBlock_Rounds(int grandRounds, const u8 plaintext[], + const KEY_TABLE_TYPE keyTable, + u8 ciphertext[]) +{ + register u32 s0, s1, s2, s3; + const u32 *k = keyTable, *kend = keyTable + grandRounds * 16; + + s0 = GETU32(plaintext) ^ k[0]; + s1 = GETU32(plaintext + 4) ^ k[1]; + s2 = GETU32(plaintext + 8) ^ k[2]; + s3 = GETU32(plaintext + 12) ^ k[3]; + k += 4; + + while (1) { + /* Camellia makes 6 Feistel rounds */ + Camellia_Feistel(s0, s1, s2, s3, k + 0); + Camellia_Feistel(s2, s3, s0, s1, k + 2); + Camellia_Feistel(s0, s1, s2, s3, k + 4); + Camellia_Feistel(s2, s3, s0, s1, k + 6); + Camellia_Feistel(s0, s1, s2, s3, k + 8); + Camellia_Feistel(s2, s3, s0, s1, k + 10); + k += 12; + + if (k == kend) + break; + + /* + * This is the same function as the diffusion function D of the + * accompanying documentation. See section 3.2 for properties of the + * FLlayer function. + */ + s1 ^= LeftRotate(s0 & k[0], 1); + s2 ^= s3 | k[3]; + s0 ^= s1 | k[1]; + s3 ^= LeftRotate(s2 & k[2], 1); + k += 4; + } + + s2 ^= k[0], s3 ^= k[1], s0 ^= k[2], s1 ^= k[3]; + + PUTU32(ciphertext, s2); + PUTU32(ciphertext + 4, s3); + PUTU32(ciphertext + 8, s0); + PUTU32(ciphertext + 12, s1); +} + +void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], + const KEY_TABLE_TYPE keyTable, u8 ciphertext[]) +{ + Camellia_EncryptBlock_Rounds(keyBitLength == 128 ? 3 : 4, + plaintext, keyTable, ciphertext); +} + +void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], + const KEY_TABLE_TYPE keyTable, + u8 plaintext[]) +{ + u32 s0, s1, s2, s3; + const u32 *k = keyTable + grandRounds * 16, *kend = keyTable + 4; + + s0 = GETU32(ciphertext) ^ k[0]; + s1 = GETU32(ciphertext + 4) ^ k[1]; + s2 = GETU32(ciphertext + 8) ^ k[2]; + s3 = GETU32(ciphertext + 12) ^ k[3]; + + while (1) { + /* Camellia makes 6 Feistel rounds */ + k -= 12; + Camellia_Feistel(s0, s1, s2, s3, k + 10); + Camellia_Feistel(s2, s3, s0, s1, k + 8); + Camellia_Feistel(s0, s1, s2, s3, k + 6); + Camellia_Feistel(s2, s3, s0, s1, k + 4); + Camellia_Feistel(s0, s1, s2, s3, k + 2); + Camellia_Feistel(s2, s3, s0, s1, k + 0); + + if (k == kend) + break; + + /* + * This is the same function as the diffusion function D of the + * accompanying documentation. See section 3.2 for properties of the + * FLlayer function. + */ + k -= 4; + s1 ^= LeftRotate(s0 & k[2], 1); + s2 ^= s3 | k[1]; + s0 ^= s1 | k[3]; + s3 ^= LeftRotate(s2 & k[0], 1); + } + + k -= 4; + s2 ^= k[0], s3 ^= k[1], s0 ^= k[2], s1 ^= k[3]; + + PUTU32(plaintext, s2); + PUTU32(plaintext + 4, s3); + PUTU32(plaintext + 8, s0); + PUTU32(plaintext + 12, s1); +} + +void Camellia_DecryptBlock(int keyBitLength, const u8 plaintext[], + const KEY_TABLE_TYPE keyTable, u8 ciphertext[]) +{ + Camellia_DecryptBlock_Rounds(keyBitLength == 128 ? 3 : 4, + plaintext, keyTable, ciphertext); +} From 25424ada3ade6d064427dd22d2b2d3bb21b37257 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:20:59 -0500 Subject: [PATCH 350/576] Create camellia.h --- .../open_ssl/camellia/camellia.h | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/camellia.h diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/camellia.h b/stratum/algos/binarium_hash_v1/open_ssl/camellia/camellia.h new file mode 100644 index 000000000..bb8e321b3 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/camellia.h @@ -0,0 +1,132 @@ +/* crypto/camellia/camellia.h */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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. + * ==================================================================== + * + */ + +#ifndef HEADER_CAMELLIA_H +# define HEADER_CAMELLIA_H + +/*# include + +# ifdef OPENSSL_NO_CAMELLIA +# error CAMELLIA is disabled. +# endif*/ + +# include + +# define CAMELLIA_ENCRYPT 1 +# define CAMELLIA_DECRYPT 0 + +/* + * Because array size can't be a const in C, the following two are macros. + * Both sizes are in bytes. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* This should be a hidden type, but EVP requires that the size be known */ + +# define CAMELLIA_BLOCK_SIZE 16 +# define CAMELLIA_TABLE_BYTE_LEN 272 +# define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) + +typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match + * with WORD */ + +struct camellia_key_st { + union { + double d; /* ensures 64-bit align */ + KEY_TABLE_TYPE rd_key; + } u; + int grand_rounds; +}; +typedef struct camellia_key_st CAMELLIA_KEY; + +# ifdef OPENSSL_FIPS +int private_Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key); +# endif +int Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key); + +void Camellia_encrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key); +void Camellia_decrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key); + +void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key, const int enc); +void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, const int enc); +void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc); +void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc); +void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc); +void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num); +void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char ivec[CAMELLIA_BLOCK_SIZE], + unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], + unsigned int *num); + +#ifdef __cplusplus +} +#endif + +#endif /* !HEADER_Camellia_H */ From 3418d4907ea447016c9caf19a14b072c00bc1f0a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:21:19 -0500 Subject: [PATCH 351/576] Create cmll_cbc.c --- .../open_ssl/camellia/cmll_cbc.c | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_cbc.c diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_cbc.c b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_cbc.c new file mode 100644 index 000000000..4017e00d9 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_cbc.c @@ -0,0 +1,66 @@ +/* crypto/camellia/camellia_cbc.c */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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 +#include + +void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const CAMELLIA_KEY *key, + unsigned char *ivec, const int enc) +{ + + if (enc) + CRYPTO_cbc128_encrypt(in, out, len, key, ivec, + (block128_f) Camellia_encrypt); + else + CRYPTO_cbc128_decrypt(in, out, len, key, ivec, + (block128_f) Camellia_decrypt); +} From e5994291f3682282cec7308d66d3f244794920cd Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:21:38 -0500 Subject: [PATCH 352/576] Create cmll_cfb.c --- .../open_ssl/camellia/cmll_cfb.c | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_cfb.c diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_cfb.c b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_cfb.c new file mode 100644 index 000000000..78f2ae456 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_cfb.c @@ -0,0 +1,141 @@ +/* crypto/camellia/camellia_cfb.c */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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. + * ==================================================================== + * + */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include + +/* + * The input and output encrypted as though 128bit cfb mode is being used. + * The extra state information to record how much of the 128bit block we have + * used is contained in *num; + */ + +void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc) +{ + + CRYPTO_cfb128_encrypt(in, out, length, key, ivec, num, enc, + (block128_f) Camellia_encrypt); +} + +/* N.B. This expects the input to be packed, MS bit first */ +void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc) +{ + CRYPTO_cfb128_1_encrypt(in, out, length, key, ivec, num, enc, + (block128_f) Camellia_encrypt); +} + +void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc) +{ + CRYPTO_cfb128_8_encrypt(in, out, length, key, ivec, num, enc, + (block128_f) Camellia_encrypt); +} From d4a9d4810a978d72f3e02fa99e3ee6fbd4b15270 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:21:59 -0500 Subject: [PATCH 353/576] Create cmll_ctr.c --- .../open_ssl/camellia/cmll_ctr.c | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ctr.c diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ctr.c b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ctr.c new file mode 100644 index 000000000..95e26621b --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ctr.c @@ -0,0 +1,64 @@ +/* crypto/camellia/camellia_ctr.c */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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 +#include + +void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char ivec[CAMELLIA_BLOCK_SIZE], + unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], + unsigned int *num) +{ + + CRYPTO_ctr128_encrypt(in, out, length, key, ivec, ecount_buf, num, + (block128_f) Camellia_encrypt); +} From 77ac83a9c0a07521d112edd935a78b3f8a708be3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:22:21 -0500 Subject: [PATCH 354/576] Create cmll_ecb.c --- .../open_ssl/camellia/cmll_ecb.c | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ecb.c diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ecb.c b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ecb.c new file mode 100644 index 000000000..b030791b2 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ecb.c @@ -0,0 +1,73 @@ +/* crypto/camellia/camellia_ecb.c */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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. + * ==================================================================== + * + */ + +#ifndef CAMELLIA_DEBUG +# ifndef NDEBUG +# define NDEBUG +# endif +#endif +#include + +#include +#include "cmll_locl.h" + +void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key, const int enc) +{ + + assert(in && out && key); + assert((CAMELLIA_ENCRYPT == enc) || (CAMELLIA_DECRYPT == enc)); + + if (CAMELLIA_ENCRYPT == enc) + Camellia_encrypt(in, out, key); + else + Camellia_decrypt(in, out, key); +} From f7dc30ff5f95a5f11907b35b32558baedb175fc3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:22:39 -0500 Subject: [PATCH 355/576] Create cmll_locl.h --- .../open_ssl/camellia/cmll_locl.h | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_locl.h diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_locl.h b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_locl.h new file mode 100644 index 000000000..2bd79b8c4 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_locl.h @@ -0,0 +1,88 @@ +/* crypto/camellia/camellia_locl.h */ +/* ==================================================================== + * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . + * ALL RIGHTS RESERVED. + * + * Intellectual Property information for Camellia: + * http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html + * + * News Release for Announcement of Camellia open source: + * http://www.ntt.co.jp/news/news06e/0604/060413a.html + * + * The Camellia Code included herein is developed by + * NTT (Nippon Telegraph and Telephone Corporation), and is contributed + * to the OpenSSL project. + * + * The Camellia Code is licensed pursuant to the OpenSSL open source + * license provided below. + */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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. + * ==================================================================== + */ + +#ifndef HEADER_CAMELLIA_LOCL_H +# define HEADER_CAMELLIA_LOCL_H + +typedef unsigned int u32; +typedef unsigned char u8; + +int Camellia_Ekeygen(int keyBitLength, const u8 *rawKey, + KEY_TABLE_TYPE keyTable); +void Camellia_EncryptBlock_Rounds(int grandRounds, const u8 plaintext[], + const KEY_TABLE_TYPE keyTable, + u8 ciphertext[]); +void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], + const KEY_TABLE_TYPE keyTable, + u8 plaintext[]); +void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], + const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); +void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], + const KEY_TABLE_TYPE keyTable, u8 plaintext[]); +int private_Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key); +#endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ From 3457deeda96a1d8fe145deb80839db4a822c706e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:23:01 -0500 Subject: [PATCH 356/576] Create cmll_misc.c --- .../open_ssl/camellia/cmll_misc.c | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_misc.c diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_misc.c b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_misc.c new file mode 100644 index 000000000..694d2fac8 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_misc.c @@ -0,0 +1,80 @@ +/* crypto/camellia/camellia_misc.c */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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 +#include +#include +#include "cmll_locl.h" + +const char CAMELLIA_version[] = "CAMELLIA" OPENSSL_VERSION_PTEXT; + +int private_Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key) +{ + if (!userKey || !key) + return -1; + if (bits != 128 && bits != 192 && bits != 256) + return -2; + key->grand_rounds = Camellia_Ekeygen(bits, userKey, key->u.rd_key); + return 0; +} + +void Camellia_encrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key) +{ + Camellia_EncryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); +} + +void Camellia_decrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key) +{ + Camellia_DecryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); +} From 82bdcd53abd4e93e8e0a177118ce021db47893b9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:23:19 -0500 Subject: [PATCH 357/576] Create cmll_ofb.c --- .../open_ssl/camellia/cmll_ofb.c | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ofb.c diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ofb.c b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ofb.c new file mode 100644 index 000000000..85eb89215 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_ofb.c @@ -0,0 +1,122 @@ +/* crypto/camellia/camellia_ofb.c */ +/* ==================================================================== + * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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. + * ==================================================================== + * + */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include + +/* + * The input and output encrypted as though 128bit ofb mode is being used. + * The extra state information to record how much of the 128bit block we have + * used is contained in *num; + */ +void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num) +{ + CRYPTO_ofb128_encrypt(in, out, length, key, ivec, num, + (block128_f) Camellia_encrypt); +} From ce0e4383bfb23f1ab86cab9d5afc6574a66701e6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:23:50 -0500 Subject: [PATCH 358/576] Create cmll_utl.c --- .../open_ssl/camellia/cmll_utl.c | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_utl.c diff --git a/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_utl.c b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_utl.c new file mode 100644 index 000000000..d5eb6b4d6 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/open_ssl/camellia/cmll_utl.c @@ -0,0 +1,64 @@ +/* crypto/camellia/cmll_utl.c */ +/* ==================================================================== + * Copyright (c) 2011 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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 +#include +#include +#include "cmll_locl.h" + +int Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key) +{ +#ifdef OPENSSL_FIPS + fips_cipher_abort(Camellia); +#endif + return private_Camellia_set_key(userKey, bits, key); +} From c4fd2470556773d4a99e0b48c2225fda4f08e107 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:25:28 -0500 Subject: [PATCH 359/576] Update makefile --- stratum/algos/makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index a12ca4b7b..157dcbf03 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -21,9 +21,11 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ hive.c pomelo.c hex.c argon2m.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ - yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c + yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ + binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) +$(SOURCES:%.cc=%.o) OUTPUT=libalgos.a all: $(SOURCES) $(OUTPUT) From bba5820f9e97e374a1acfceba3237cbf32b3b35e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:25:57 -0500 Subject: [PATCH 360/576] Create binarium-v1.conf --- stratum/config.sample/binarium-v1.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/binarium-v1.conf diff --git a/stratum/config.sample/binarium-v1.conf b/stratum/config.sample/binarium-v1.conf new file mode 100644 index 000000000..df75fcae4 --- /dev/null +++ b/stratum/config.sample/binarium-v1.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 6666 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = binarium-v1 +difficulty = 0.001 +max_ttf = 4000000 From 4953f0d3687ebbea9ceef906b212e838f1fb71c6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:26:47 -0500 Subject: [PATCH 361/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 8400565b7..cbb851f4b 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -126,6 +126,7 @@ YAAMP_ALGO g_algos[] = {"x15", x15_hash, 1, 0, 0}, {"x17", x17_hash, 1, 0, 0}, {"bcd", bcd_hash, 1, 0, 0}, + {"binarium-v1", Binarium_hash_v1_hash, 1, 0, 0}, {"x18", x18_hash, 1, 0, 0}, {"x20r", x20r_hash, 0x100, 0, 0}, {"x21s", x21s_hash, 0x100, 0, 0}, From 3008854d3a63da688f7e2b177779634e411f36ab Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:27:11 -0500 Subject: [PATCH 362/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 87862ce98..d20ef810c 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -151,6 +151,7 @@ void sha256_hash_hex(const char *input, char *output, unsigned int len); void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/a5a.h" +#include "algos/binarium_hash_v1.h" #include "algos/c11.h" #include "algos/x11.h" #include "algos/x11evo.h" From ed93087ae43ad4dc09ad6b77b98c1b61b5831cf8 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:28:12 -0500 Subject: [PATCH 363/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index c59a89167..d00e67f81 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -7,6 +7,7 @@ function yaamp_get_algos() 'sha256', 'sha256t', 'sha256q', + 'binarium-v1', 'scrypt', 'scryptn', 'allium', @@ -165,6 +166,7 @@ function getAlgoColors($algo) 'scryptn' => '#d0d0d0', 'bcd' => '#ffd880', 'c11' => '#a0a0d0', + 'binarium-v1' => '#f0f0f0', 'decred' => '#f0f0f0', 'deep' => '#e0ffff', 'x11' => '#f0f0a0', @@ -274,6 +276,7 @@ function getAlgoPort($algo) 'x20r' => 4300, 'x21s' => 3224, 'x22i' => 3223, + 'binarium-v1' => 6666, 'aergo' => 3691, 'xevan' => 3739, 'hmq1725' => 3747, From 3dfbdd795855663354da17dd34927ce3c0d39fce Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:30:26 -0500 Subject: [PATCH 364/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 157dcbf03..5020cd10a 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -23,7 +23,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c - + OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) OUTPUT=libalgos.a From b59d3fca75040dec005c2dc3ac4e6449464eb29e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:33:29 -0500 Subject: [PATCH 365/576] Update makefile --- stratum/algos/makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 5020cd10a..35871ea90 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -22,7 +22,10 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 hive.c pomelo.c hex.c argon2m.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ - binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c + binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ + binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ + binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ + binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) From 02126a48df39e67ae28bf8cf7328b6cb2f25ad06 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:35:12 -0500 Subject: [PATCH 366/576] Update makefile --- stratum/algos/makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 35871ea90..83d7b4e14 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -27,8 +27,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c -OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) -$(SOURCES:%.cc=%.o) +OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) OUTPUT=libalgos.a all: $(SOURCES) $(OUTPUT) From ec90471ad1cfe4e8f97e8ba2e7e1dc4c1ed29682 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:40:03 -0500 Subject: [PATCH 367/576] Delete ecrypt-config.h --- .../encryption/salsa20/ecrypt-config.h | 272 ------------------ 1 file changed, 272 deletions(-) delete mode 100644 stratum/algos/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h diff --git a/stratum/algos/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h b/stratum/algos/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h deleted file mode 100644 index 5dcdf6156..000000000 --- a/stratum/algos/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h +++ /dev/null @@ -1,272 +0,0 @@ -/* ecrypt-config.h */ - -/* *** Normally, it should not be necessary to edit this file. *** */ - -#ifndef ECRYPT_CONFIG -#define ECRYPT_CONFIG - -/* ------------------------------------------------------------------------- */ - -/* Guess the endianness of the target architecture. */ - -/* - * The LITTLE endian machines: - */ -#if defined(__ultrix) /* Older MIPS */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__alpha) /* Alpha */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(i386) /* x86 (gcc) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__i386) /* x86 (gcc) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(_M_IX86) /* x86 (MSC, Borland) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(_MSC_VER) /* x86 (surely MSC) */ -#define ECRYPT_LITTLE_ENDIAN -#elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ -#define ECRYPT_LITTLE_ENDIAN - -/* - * The BIG endian machines: - */ -#elif defined(sun) /* Newer Sparc's */ -#define ECRYPT_BIG_ENDIAN -#elif defined(__ppc__) /* PowerPC */ -#define ECRYPT_BIG_ENDIAN - -/* - * Finally machines with UNKNOWN endianness: - */ -#elif defined (_AIX) /* RS6000 */ -#define ECRYPT_UNKNOWN -#elif defined(__hpux) /* HP-PA */ -#define ECRYPT_UNKNOWN -#elif defined(__aux) /* 68K */ -#define ECRYPT_UNKNOWN -#elif defined(__dgux) /* 88K (but P6 in latest boxes) */ -#define ECRYPT_UNKNOWN -#elif defined(__sgi) /* Newer MIPS */ -#define ECRYPT_UNKNOWN -#else /* Any other processor */ -#define ECRYPT_UNKNOWN -#endif - -/* ------------------------------------------------------------------------- */ - -/* - * Find minimal-width types to store 8-bit, 16-bit, 32-bit, and 64-bit - * integers. - * - * Note: to enable 64-bit types on 32-bit compilers, it might be - * necessary to switch from ISO C90 mode to ISO C99 mode (e.g., gcc - * -std=c99). - */ - -#include - -/* --- check char --- */ - -#if (UCHAR_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T char -#define U8C(v) (v##U) - -#if (UCHAR_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif - -#endif - -#if (UCHAR_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T char -#define U16C(v) (v##U) -#endif - -#if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T char -#define U32C(v) (v##U) -#endif - -#if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T char -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif - -#endif -#endif -#endif -#endif - -/* --- check short --- */ - -#if (USHRT_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T short -#define U8C(v) (v##U) - -#if (USHRT_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif - -#endif - -#if (USHRT_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T short -#define U16C(v) (v##U) -#endif - -#if (USHRT_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T short -#define U32C(v) (v##U) -#endif - -#if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T short -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif - -#endif -#endif -#endif -#endif - -/* --- check int --- */ - -#if (UINT_MAX / 0xFU > 0xFU) -#ifndef I8T -#define I8T int -#define U8C(v) (v##U) - -#if (ULONG_MAX == 0xFFU) -#define ECRYPT_I8T_IS_BYTE -#endif - -#endif - -#if (UINT_MAX / 0xFFU > 0xFFU) -#ifndef I16T -#define I16T int -#define U16C(v) (v##U) -#endif - -#if (UINT_MAX / 0xFFFFU > 0xFFFFU) -#ifndef I32T -#define I32T int -#define U32C(v) (v##U) -#endif - -#if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) -#ifndef I64T -#define I64T int -#define U64C(v) (v##U) -#define ECRYPT_NATIVE64 -#endif - -#endif -#endif -#endif -#endif - -/* --- check long --- */ - -#if (ULONG_MAX / 0xFUL > 0xFUL) -#ifndef I8T -#define I8T long -#define U8C(v) (v##UL) - -#if (ULONG_MAX == 0xFFUL) -#define ECRYPT_I8T_IS_BYTE -#endif - -#endif - -#if (ULONG_MAX / 0xFFUL > 0xFFUL) -#ifndef I16T -#define I16T long -#define U16C(v) (v##UL) -#endif - -#if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) -#ifndef I32T -#define I32T long -#define U32C(v) (v##UL) -#endif - -#if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) -#ifndef I64T -#define I64T long -#define U64C(v) (v##UL) -#define ECRYPT_NATIVE64 -#endif - -#endif -#endif -#endif -#endif - -/* --- check long long --- */ - -#ifdef ULLONG_MAX - -#if (ULLONG_MAX / 0xFULL > 0xFULL) -#ifndef I8T -#define I8T long long -#define U8C(v) (v##ULL) - -#if (ULLONG_MAX == 0xFFULL) -#define ECRYPT_I8T_IS_BYTE -#endif - -#endif - -#if (ULLONG_MAX / 0xFFULL > 0xFFULL) -#ifndef I16T -#define I16T long long -#define U16C(v) (v##ULL) -#endif - -#if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) -#ifndef I32T -#define I32T long long -#define U32C(v) (v##ULL) -#endif - -#if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) -#ifndef I64T -#define I64T long long -#define U64C(v) (v##ULL) -#endif - -#endif -#endif -#endif -#endif - -#endif - -/* --- check __int64 --- */ - -#ifdef _UI64_MAX - -#if (_UI64_MAX / 0xFFFFFFFFull > 0xFFFFFFFFull) // 0xFFFFFFFFui64 > 0xFFFFFFFFui64 -#ifndef I64T -#define I64T __int64 -#define U64C(v) (v##ui64) -#endif - -#endif - -#endif - -/* ------------------------------------------------------------------------- */ - -#endif From 8a237434f2842a2e74988f34da320c9065137314 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 00:40:38 -0500 Subject: [PATCH 368/576] Create ecrypt-config.h --- .../encryption/salsa20/ecrypt-config.h | 272 ++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h diff --git a/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h b/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h new file mode 100644 index 000000000..5dcdf6156 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/salsa20/ecrypt-config.h @@ -0,0 +1,272 @@ +/* ecrypt-config.h */ + +/* *** Normally, it should not be necessary to edit this file. *** */ + +#ifndef ECRYPT_CONFIG +#define ECRYPT_CONFIG + +/* ------------------------------------------------------------------------- */ + +/* Guess the endianness of the target architecture. */ + +/* + * The LITTLE endian machines: + */ +#if defined(__ultrix) /* Older MIPS */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(__alpha) /* Alpha */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(i386) /* x86 (gcc) */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(__i386) /* x86 (gcc) */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(_M_IX86) /* x86 (MSC, Borland) */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(_MSC_VER) /* x86 (surely MSC) */ +#define ECRYPT_LITTLE_ENDIAN +#elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ +#define ECRYPT_LITTLE_ENDIAN + +/* + * The BIG endian machines: + */ +#elif defined(sun) /* Newer Sparc's */ +#define ECRYPT_BIG_ENDIAN +#elif defined(__ppc__) /* PowerPC */ +#define ECRYPT_BIG_ENDIAN + +/* + * Finally machines with UNKNOWN endianness: + */ +#elif defined (_AIX) /* RS6000 */ +#define ECRYPT_UNKNOWN +#elif defined(__hpux) /* HP-PA */ +#define ECRYPT_UNKNOWN +#elif defined(__aux) /* 68K */ +#define ECRYPT_UNKNOWN +#elif defined(__dgux) /* 88K (but P6 in latest boxes) */ +#define ECRYPT_UNKNOWN +#elif defined(__sgi) /* Newer MIPS */ +#define ECRYPT_UNKNOWN +#else /* Any other processor */ +#define ECRYPT_UNKNOWN +#endif + +/* ------------------------------------------------------------------------- */ + +/* + * Find minimal-width types to store 8-bit, 16-bit, 32-bit, and 64-bit + * integers. + * + * Note: to enable 64-bit types on 32-bit compilers, it might be + * necessary to switch from ISO C90 mode to ISO C99 mode (e.g., gcc + * -std=c99). + */ + +#include + +/* --- check char --- */ + +#if (UCHAR_MAX / 0xFU > 0xFU) +#ifndef I8T +#define I8T char +#define U8C(v) (v##U) + +#if (UCHAR_MAX == 0xFFU) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (UCHAR_MAX / 0xFFU > 0xFFU) +#ifndef I16T +#define I16T char +#define U16C(v) (v##U) +#endif + +#if (UCHAR_MAX / 0xFFFFU > 0xFFFFU) +#ifndef I32T +#define I32T char +#define U32C(v) (v##U) +#endif + +#if (UCHAR_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) +#ifndef I64T +#define I64T char +#define U64C(v) (v##U) +#define ECRYPT_NATIVE64 +#endif + +#endif +#endif +#endif +#endif + +/* --- check short --- */ + +#if (USHRT_MAX / 0xFU > 0xFU) +#ifndef I8T +#define I8T short +#define U8C(v) (v##U) + +#if (USHRT_MAX == 0xFFU) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (USHRT_MAX / 0xFFU > 0xFFU) +#ifndef I16T +#define I16T short +#define U16C(v) (v##U) +#endif + +#if (USHRT_MAX / 0xFFFFU > 0xFFFFU) +#ifndef I32T +#define I32T short +#define U32C(v) (v##U) +#endif + +#if (USHRT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) +#ifndef I64T +#define I64T short +#define U64C(v) (v##U) +#define ECRYPT_NATIVE64 +#endif + +#endif +#endif +#endif +#endif + +/* --- check int --- */ + +#if (UINT_MAX / 0xFU > 0xFU) +#ifndef I8T +#define I8T int +#define U8C(v) (v##U) + +#if (ULONG_MAX == 0xFFU) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (UINT_MAX / 0xFFU > 0xFFU) +#ifndef I16T +#define I16T int +#define U16C(v) (v##U) +#endif + +#if (UINT_MAX / 0xFFFFU > 0xFFFFU) +#ifndef I32T +#define I32T int +#define U32C(v) (v##U) +#endif + +#if (UINT_MAX / 0xFFFFFFFFU > 0xFFFFFFFFU) +#ifndef I64T +#define I64T int +#define U64C(v) (v##U) +#define ECRYPT_NATIVE64 +#endif + +#endif +#endif +#endif +#endif + +/* --- check long --- */ + +#if (ULONG_MAX / 0xFUL > 0xFUL) +#ifndef I8T +#define I8T long +#define U8C(v) (v##UL) + +#if (ULONG_MAX == 0xFFUL) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (ULONG_MAX / 0xFFUL > 0xFFUL) +#ifndef I16T +#define I16T long +#define U16C(v) (v##UL) +#endif + +#if (ULONG_MAX / 0xFFFFUL > 0xFFFFUL) +#ifndef I32T +#define I32T long +#define U32C(v) (v##UL) +#endif + +#if (ULONG_MAX / 0xFFFFFFFFUL > 0xFFFFFFFFUL) +#ifndef I64T +#define I64T long +#define U64C(v) (v##UL) +#define ECRYPT_NATIVE64 +#endif + +#endif +#endif +#endif +#endif + +/* --- check long long --- */ + +#ifdef ULLONG_MAX + +#if (ULLONG_MAX / 0xFULL > 0xFULL) +#ifndef I8T +#define I8T long long +#define U8C(v) (v##ULL) + +#if (ULLONG_MAX == 0xFFULL) +#define ECRYPT_I8T_IS_BYTE +#endif + +#endif + +#if (ULLONG_MAX / 0xFFULL > 0xFFULL) +#ifndef I16T +#define I16T long long +#define U16C(v) (v##ULL) +#endif + +#if (ULLONG_MAX / 0xFFFFULL > 0xFFFFULL) +#ifndef I32T +#define I32T long long +#define U32C(v) (v##ULL) +#endif + +#if (ULLONG_MAX / 0xFFFFFFFFULL > 0xFFFFFFFFULL) +#ifndef I64T +#define I64T long long +#define U64C(v) (v##ULL) +#endif + +#endif +#endif +#endif +#endif + +#endif + +/* --- check __int64 --- */ + +#ifdef _UI64_MAX + +#if (_UI64_MAX / 0xFFFFFFFFull > 0xFFFFFFFFull) // 0xFFFFFFFFui64 > 0xFFFFFFFFui64 +#ifndef I64T +#define I64T __int64 +#define U64C(v) (v##ui64) +#endif + +#endif + +#endif + +/* ------------------------------------------------------------------------- */ + +#endif From f8285d236b2f49d7b15b1ddbf18ab73bf6ce22dc Mon Sep 17 00:00:00 2001 From: cryptopool Date: Wed, 20 Feb 2019 01:15:09 -0500 Subject: [PATCH 369/576] new stratums --- stratum/Makefile | 2 +- stratum/Makefile.bak | 66 ++ stratum/algos/argon2d.c | 102 +++ stratum/algos/argon2d.h | 18 + stratum/algos/balloon.c | 213 +++++ stratum/algos/balloon.h | 72 ++ .../encryption/gost2015_kuznechik/compact.c | 1 + .../gost2015_kuznechik/compact.c.bak | 240 ++++++ .../encryption/salsa20/salsa20.c | 2 +- .../encryption/salsa20/salsa20.c.bak | 239 ++++++ .../encryption/three_fish/libskein_skein.h | 2 +- .../three_fish/libskein_skein.h.bak | 85 ++ .../hashing/streebog/table/stribog.c | 2 +- .../hashing/streebog/table/stribog.c.bak | 394 +++++++++ stratum/algos/blake2/blake2.h | 2 +- stratum/algos/blake2/blake2.h.bak | 243 ++---- stratum/algos/blake2/blamka-round-opt.h | 9 +- stratum/algos/blake2/blamka-round-opt.h.bak | 9 +- stratum/algos/blake2/blamka-round-ref.h | 6 +- stratum/algos/blake2/blamka-round-ref.h.bak | 6 +- stratum/algos/geek.c | 76 ++ stratum/algos/geek.h | 16 + stratum/algos/renesis.c | 69 ++ stratum/algos/renesis.h | 16 + stratum/config.sample/argon2d-crds.conf | 15 + stratum/config.sample/balloon.conf | 16 + stratum/config.sample/bcd.conf | 16 + stratum/config.sample/geek.conf | 16 + stratum/config.sample/lyra2vc0ban.conf | 16 + stratum/config.sample/lyra2z330.conf | 16 + stratum/config.sample/renesis.conf | 15 + stratum/sha3/makefile | 6 +- stratum/sha3/makefile.bak | 33 + stratum/util.cpp | 25 + stratum/util.cpp.bak | 771 ++++++++++++++++++ stratum/util.h | 1 + stratum/util.h.bak | 139 ++++ 37 files changed, 2780 insertions(+), 195 deletions(-) create mode 100644 stratum/Makefile.bak create mode 100644 stratum/algos/argon2d.c create mode 100644 stratum/algos/argon2d.h create mode 100644 stratum/algos/balloon.c create mode 100644 stratum/algos/balloon.h create mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c.bak create mode 100644 stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c.bak create mode 100644 stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h.bak create mode 100644 stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c.bak create mode 100644 stratum/algos/geek.c create mode 100644 stratum/algos/geek.h create mode 100644 stratum/algos/renesis.c create mode 100644 stratum/algos/renesis.h create mode 100644 stratum/config.sample/argon2d-crds.conf create mode 100644 stratum/config.sample/balloon.conf create mode 100644 stratum/config.sample/bcd.conf create mode 100644 stratum/config.sample/geek.conf create mode 100644 stratum/config.sample/lyra2vc0ban.conf create mode 100644 stratum/config.sample/lyra2z330.conf create mode 100644 stratum/config.sample/renesis.conf create mode 100644 stratum/sha3/makefile.bak create mode 100644 stratum/util.cpp.bak create mode 100644 stratum/util.h.bak diff --git a/stratum/Makefile b/stratum/Makefile index 3bf978bf3..e12853841 100755 --- a/stratum/Makefile +++ b/stratum/Makefile @@ -11,7 +11,7 @@ CFLAGS += -DNO_EXCHANGE #CFLAGS=-c -O2 -I /usr/include/mysql LDFLAGS=-O2 `mysql_config --libs` -LDLIBS=iniparser/libiniparser.a algos/libalgos.a sha3/libhash.a -lpthread -lgmp -lm -lstdc++ +LDLIBS=iniparser/libiniparser.a algos/libalgos.a sha3/libhash.a -lpthread -lgmp -lm -lstdc++ -lssl -lcrypto LDLIBS+=-lmysqlclient SOURCES=stratum.cpp db.cpp coind.cpp coind_aux.cpp coind_template.cpp coind_submit.cpp util.cpp list.cpp \ diff --git a/stratum/Makefile.bak b/stratum/Makefile.bak new file mode 100644 index 000000000..3bf978bf3 --- /dev/null +++ b/stratum/Makefile.bak @@ -0,0 +1,66 @@ + +CC=gcc + +CFLAGS= -g -march=native +SQLFLAGS= `mysql_config --cflags --libs` + +# Comment this line to disable address check on login, +# if you use the auto exchange feature... +CFLAGS += -DNO_EXCHANGE + +#CFLAGS=-c -O2 -I /usr/include/mysql +LDFLAGS=-O2 `mysql_config --libs` + +LDLIBS=iniparser/libiniparser.a algos/libalgos.a sha3/libhash.a -lpthread -lgmp -lm -lstdc++ +LDLIBS+=-lmysqlclient + +SOURCES=stratum.cpp db.cpp coind.cpp coind_aux.cpp coind_template.cpp coind_submit.cpp util.cpp list.cpp \ + rpc.cpp job.cpp job_send.cpp job_core.cpp merkle.cpp share.cpp socket.cpp coinbase.cpp \ + client.cpp client_submit.cpp client_core.cpp client_difficulty.cpp remote.cpp remote_template.cpp \ + user.cpp object.cpp json.cpp base58.cpp + +CFLAGS += -DHAVE_CURL +SOURCES += rpc_curl.cpp +LDCURL = $(shell /usr/bin/pkg-config --static --libs libcurl) +LDFLAGS += $(LDCURL) + +OBJECTS=$(SOURCES:.cpp=.o) +OUTPUT=stratum + +CODEDIR1=algos +CODEDIR2=sha3 + +.PHONY: projectcode1 projectcode2 + +all: projectcode1 projectcode2 $(SOURCES) $(OUTPUT) + +projectcode1: + $(MAKE) -C $(CODEDIR1) + +projectcode2: + $(MAKE) -C $(CODEDIR2) + +$(SOURCES): stratum.h util.h + +$(OUTPUT): $(OBJECTS) + $(CC) $(OBJECTS) $(LDLIBS) $(LDFLAGS) -o $@ + +.cpp.o: + $(CC) $(CFLAGS) $(SQLFLAGS) -c $< + +.c.o: + $(CC) $(CFLAGS) -c $< + +clean: + rm -f *.o + rm -f algos/*.o + rm -f algos/*.a + rm -f sha3/*.o + rm -f sha3/*.a + rm -f algos/ar2/*.o + +install: clean all + strip -s stratum + cp stratum /usr/local/bin/ + cp stratum ../bin/ + diff --git a/stratum/algos/argon2d.c b/stratum/algos/argon2d.c new file mode 100644 index 000000000..dbf89b33e --- /dev/null +++ b/stratum/algos/argon2d.c @@ -0,0 +1,102 @@ +#include +#include +#include +#include + +#include "sysendian.h" + +#include "ar2/argon2.h" +#include "ar2/core.h" + +static const size_t INPUT_BYTES = 80; // Lenth of a block header in bytes. Input Length = Salt Length (salt = input) +static const size_t OUTPUT_BYTES = 32; // Length of output needed for a 256-bit hash +static const unsigned int DEFAULT_ARGON2_FLAG = 2; //Same as ARGON2_DEFAULT_FLAGS + +void argon2d_crds_call(const void *input, void *output) +{ + argon2_context context; + context.out = (uint8_t *)output; + context.outlen = (uint32_t)OUTPUT_BYTES; + context.pwd = (uint8_t *)input; + context.pwdlen = (uint32_t)INPUT_BYTES; + context.salt = (uint8_t *)input; //salt = input + context.saltlen = (uint32_t)INPUT_BYTES; + context.secret = NULL; + context.secretlen = 0; + context.ad = NULL; + context.adlen = 0; + context.allocate_cbk = NULL; + context.free_cbk = NULL; + context.flags = DEFAULT_ARGON2_FLAG; // = ARGON2_DEFAULT_FLAGS + // main configurable Argon2 hash parameters + context.m_cost = 250; // Memory in KiB (250KB) + context.lanes = 4; // Degree of Parallelism + context.threads = 1; // Threads + context.t_cost = 1; // Iterations + + argon2_ctx(&context, Argon2_d); +} +void argon2d_dyn_call(const void *input, void *output) +{ + argon2_context context; + context.out = (uint8_t *)output; + context.outlen = (uint32_t)OUTPUT_BYTES; + context.pwd = (uint8_t *)input; + context.pwdlen = (uint32_t)INPUT_BYTES; + context.salt = (uint8_t *)input; //salt = input + context.saltlen = (uint32_t)INPUT_BYTES; + context.secret = NULL; + context.secretlen = 0; + context.ad = NULL; + context.adlen = 0; + context.allocate_cbk = NULL; + context.free_cbk = NULL; + context.flags = DEFAULT_ARGON2_FLAG; // = ARGON2_DEFAULT_FLAGS + // main configurable Argon2 hash parameters + context.m_cost = 500; // Memory in KiB (512KB) + context.lanes = 8; // Degree of Parallelism + context.threads = 1; // Threads + context.t_cost = 2; // Iterations + + argon2_ctx(&context, Argon2_d); +} + +void argon2d_uis_call(const void *input, void *output) +{ + argon2_context context; + context.out = (uint8_t *)output; + context.outlen = (uint32_t)OUTPUT_BYTES; + context.pwd = (uint8_t *)input; + context.pwdlen = (uint32_t)INPUT_BYTES; + context.salt = (uint8_t *)input; //salt = input + context.saltlen = (uint32_t)INPUT_BYTES; + context.secret = NULL; + context.secretlen = 0; + context.ad = NULL; + context.adlen = 0; + context.allocate_cbk = NULL; + context.free_cbk = NULL; + context.flags = DEFAULT_ARGON2_FLAG; // = ARGON2_DEFAULT_FLAGS + // main configurable Argon2 hash parameters + context.m_cost = 4096; // Memory in KiB (4MB) + context.lanes = 4; // Degree of Parallelism + context.threads = 1; // Threads + context.t_cost = 1; // Iterations + + argon2_ctx(&context, Argon2_d); +} + +void argon2d_crds_hash(const unsigned char* input, unsigned char* output, unsigned int len) +{ + argon2d_crds_call(input, output); +} + +void argon2d_dyn_hash(const unsigned char* input, unsigned char* output, unsigned int len) +{ + argon2d_dyn_call(input, output); +} + +void argon2d_uis_hash(const unsigned char* input, unsigned char* output, unsigned int len) +{ + argon2d_uis_call(input, output); +} diff --git a/stratum/algos/argon2d.h b/stratum/algos/argon2d.h new file mode 100644 index 000000000..8e20bd08e --- /dev/null +++ b/stratum/algos/argon2d.h @@ -0,0 +1,18 @@ +#ifndef ARGON2D_H +#define ARGON2D_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void argon2d_crds_hash(const char* input, char* output, unsigned int len); +void argon2d_dyn_hash(const char* input, char* output, unsigned int len); +void argon2d_uis_hash(const char* input, char* output, unsigned int len); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/stratum/algos/balloon.c b/stratum/algos/balloon.c new file mode 100644 index 000000000..913a9c2a1 --- /dev/null +++ b/stratum/algos/balloon.c @@ -0,0 +1,213 @@ +#include +#include +#include +#include +#include +#include +#include "sha256.h" +#include "balloon.h" + +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + +#ifdef __cplusplus +extern "C"{ +#endif + +static void balloon_init (struct balloon_options *opts, int64_t s_cost, int32_t t_cost) { + opts->s_cost = s_cost; + opts->t_cost = t_cost; +} + +void balloon_hash (const char* input, char* output, uint32_t len) { + balloon ((unsigned char *)input, (unsigned char *)output, len, 128, 4); +} + +void balloon (unsigned char *input, unsigned char *output, int32_t len, int64_t s_cost, int32_t t_cost) { + struct balloon_options opts; + struct hash_state s; + balloon_init (&opts, s_cost, t_cost); + hash_state_init (&s, &opts, input); + hash_state_fill (&s, input, input, len); + hash_state_mix (&s, t_cost); + hash_state_extract (&s, output); + hash_state_free (&s); +} + +int bitstream_init (struct bitstream *b) { + SHA256_Init(&b->c); + b->initialized = false; +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + b->ctx = EVP_CIPHER_CTX_new(); + EVP_CIPHER_CTX_init(b->ctx); +#else + EVP_CIPHER_CTX_init (&b->ctx); +#endif + b->zeros = malloc (BITSTREAM_BUF_SIZE * sizeof (uint8_t)); + memset (b->zeros, 0, BITSTREAM_BUF_SIZE); +} + +int bitstream_free (struct bitstream *b) { + uint8_t out[AES_BLOCK_SIZE]; + int outl; +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + EVP_EncryptFinal (b->ctx, out, &outl); + EVP_CIPHER_CTX_cleanup (b->ctx); + EVP_CIPHER_CTX_free(b->ctx); +#else + EVP_EncryptFinal (&b->ctx, out, &outl); + EVP_CIPHER_CTX_cleanup (&b->ctx); +#endif + free (b->zeros); +} + +int bitstream_seed_add (struct bitstream *b, const void *seed, size_t seedlen) { + SHA256_Update(&b->c, seed, seedlen); +} + +int bitstream_seed_finalize (struct bitstream *b) { + uint8_t key_bytes[32]; + SHA256_Final (key_bytes, &b->c); + uint8_t iv[AES_BLOCK_SIZE]; + memset (iv, 0, AES_BLOCK_SIZE); +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + EVP_CIPHER_CTX_set_padding (b->ctx, 1); + EVP_EncryptInit (b->ctx, EVP_aes_128_ctr (), key_bytes, iv); +#else + EVP_CIPHER_CTX_set_padding (&b->ctx, 1); + EVP_EncryptInit (&b->ctx, EVP_aes_128_ctr (), key_bytes, iv); +#endif + b->initialized = true; +} + +static int encrypt_partial (struct bitstream *b, void *outp, int to_encrypt) { + int encl; +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + EVP_EncryptUpdate (b->ctx, outp, &encl, b->zeros, to_encrypt); +#else + EVP_EncryptUpdate (&b->ctx, outp, &encl, b->zeros, to_encrypt); +#endif +} + +int bitstream_fill_buffer (struct bitstream *b, void *out, size_t outlen) { + size_t total = 0; + while (total < outlen) { + const int to_encrypt = MIN(outlen - total, BITSTREAM_BUF_SIZE); + encrypt_partial (b, out + total, to_encrypt); + total += to_encrypt; + } +} + +int compressb (uint64_t *counter, uint8_t *out, const uint8_t *blocks[], size_t blocks_to_comp) { + unsigned int i; + SHA256_CTX ctx; + SHA256_Init (&ctx); + SHA256_Update (&ctx, counter, 8); + for (i = 0; i < blocks_to_comp; i++) + SHA256_Update (&ctx, blocks[i], BLOCK_SIZE); + SHA256_Final (out, &ctx); + *counter += 1; +} + +int expand (uint64_t *counter, uint8_t *buf, size_t blocks_in_buf) { + size_t i; + const uint8_t *blocks[1] = { buf }; + uint8_t *cur = buf + BLOCK_SIZE; + for (i = 1; i < blocks_in_buf; i++) { + compressb (counter, cur, blocks, 1); + blocks[0] += BLOCK_SIZE; + cur += BLOCK_SIZE; + } +} + +uint64_t bytes_to_littleend_uint64 (const uint8_t *bytes, size_t n_bytes) { + int i; + if (n_bytes > 8) + n_bytes = 8; + uint64_t out = 0; + for (i = n_bytes-1; i >= 0; i--) { + out <<= 8; + out |= bytes[i]; + } + return out; +} + +void * block_index (const struct hash_state *s, size_t i) { + return s->buffer + (BLOCK_SIZE * i); +} + +static uint64_t options_n_blocks (const struct balloon_options *opts) { + const uint32_t bsize = BLOCK_SIZE; + uint64_t ret = (opts->s_cost * 1024) / bsize; + return (ret < BLOCKS_MIN) ? BLOCKS_MIN : ret; +} + +void * block_last (const struct hash_state *s) { + return block_index (s, s->n_blocks - 1); +} + +int hash_state_init (struct hash_state *s, const struct balloon_options *opts, const uint8_t salt[SALT_LEN]) { + s->counter = 0; + s->n_blocks = options_n_blocks (opts); + if (s->n_blocks % 2 != 0) s->n_blocks++; + s->has_mixed = false; + s->opts = opts; + s->buffer = malloc (s->n_blocks * BLOCK_SIZE); + int a = salt[0]; + a++; + bitstream_init (&s->bstream); + bitstream_seed_add (&s->bstream, salt, SALT_LEN); + bitstream_seed_add (&s->bstream, &opts->s_cost, 8); + bitstream_seed_add (&s->bstream, &opts->t_cost, 4); + bitstream_seed_finalize (&s->bstream); +} + +int hash_state_free (struct hash_state *s) { + bitstream_free (&s->bstream); + free (s->buffer); +} + +int hash_state_fill (struct hash_state *s, const uint8_t salt[SALT_LEN], const uint8_t *in, size_t inlen) { + SHA256_CTX c; + SHA256_Init (&c); + SHA256_Update (&c, &s->counter, 8); + SHA256_Update (&c, salt, SALT_LEN); + SHA256_Update (&c, in, inlen); + SHA256_Update (&c, &s->opts->s_cost, 8); + SHA256_Update (&c, &s->opts->t_cost, 4); + SHA256_Final (s->buffer, &c); + s->counter++; + expand (&s->counter, s->buffer, s->n_blocks); +} + +int hash_state_mix (struct hash_state *s, int32_t mixrounds) { + size_t i, n; + int32_t rounds; + uint8_t buf[8]; + uint64_t neighbor; + for (rounds=0; rounds < mixrounds; rounds++) { + for (i = 0; i < s->n_blocks; i++) { + uint8_t *cur_block = block_index (s, i); + const size_t n_blocks_to_hash = 3; + const uint8_t *blocks[2+n_blocks_to_hash]; + const uint8_t *prev_block = i ? cur_block - BLOCK_SIZE : block_last (s); + blocks[0] = prev_block; + blocks[1] = cur_block; + for (n = 2; n < 2+n_blocks_to_hash; n++) { + bitstream_fill_buffer (&s->bstream, buf, 8); + neighbor = bytes_to_littleend_uint64 (buf, 8); + blocks[n] = block_index (s, neighbor % s->n_blocks); + } + compressb (&s->counter, cur_block, blocks, 2+n_blocks_to_hash); + } + s->has_mixed = true; + } +} + +int hash_state_extract (const struct hash_state *s, uint8_t out[BLOCK_SIZE]) { + uint8_t *b = block_last (s); + memcpy ((char *)out, (const char *)b, BLOCK_SIZE); +} + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/stratum/algos/balloon.h b/stratum/algos/balloon.h new file mode 100644 index 000000000..6a2cf3d92 --- /dev/null +++ b/stratum/algos/balloon.h @@ -0,0 +1,72 @@ +#include +#include +#include +#include +#include "sha256.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define BITSTREAM_BUF_SIZE ((32) * (AES_BLOCK_SIZE)) +#define N_NEIGHBORS (3) +#define SALT_LEN (32) +#define INLEN_MAX (1ull<<20) +#define TCOST_MIN 1ull +#define SCOST_MIN (1) +#define SCOST_MAX (UINT32_MAX) +#define BLOCKS_MIN (1ull) +#define THREADS_MAX 4096 +#define BLOCK_SIZE (32) +#define UNUSED __attribute__ ((unused)) + +struct bitstream { + bool initialized; + uint8_t *zeros; + SHA256_CTX c; +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + EVP_CIPHER_CTX* ctx; +#else + EVP_CIPHER_CTX ctx; +#endif +}; + +struct hash_state; + +struct hash_state { + uint64_t counter; + uint64_t n_blocks; + bool has_mixed; + uint8_t *buffer; + struct bitstream bstream; + const struct balloon_options *opts; +}; + +struct balloon_options { + int64_t s_cost; + int32_t t_cost; +}; + +void balloon_hash (const char* input, char* output, uint32_t len); +void balloon (unsigned char *input, unsigned char *output, int32_t len, int64_t s_cost, int32_t t_cost); + +int bitstream_init (struct bitstream *b); +int bitstream_free (struct bitstream *b); +int bitstream_seed_add (struct bitstream *b, const void *seed, size_t seedlen); +int bitstream_seed_finalize (struct bitstream *b); +int bitstream_fill_buffer (struct bitstream *b, void *out, size_t outlen); +int bitstream_rand_byte (struct bitstream *b, uint8_t *out); +int compressb (uint64_t *counter, uint8_t *out, const uint8_t *blocks[], size_t blocks_to_comp); +int expand (uint64_t *counter, uint8_t *buf, size_t blocks_in_buf); +uint64_t bytes_to_littleend_uint64 (const uint8_t *bytes, size_t n_bytes); +int hash_state_init (struct hash_state *s, const struct balloon_options *opts, const uint8_t salt[SALT_LEN]); +int hash_state_free (struct hash_state *s); +int hash_state_fill (struct hash_state *s, const uint8_t salt[SALT_LEN], const uint8_t *in, size_t inlen); +int hash_state_mix (struct hash_state *s, int32_t mixrounds); +int hash_state_extract (const struct hash_state *s, uint8_t out[BLOCK_SIZE]); +void * block_index (const struct hash_state *s, size_t i); +void * block_last (const struct hash_state *s); + +#ifdef __cplusplus +} +#endif diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c index 73a8f427d..e59992cfe 100644 --- a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c @@ -238,3 +238,4 @@ void decryptBlockWithGost15( } applyXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, block); } + diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c.bak b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c.bak new file mode 100644 index 000000000..73a8f427d --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c.bak @@ -0,0 +1,240 @@ +#include "libgost15/libgost15.h" +#include "shared/tables.h" +#include + + +const size_t WorkspaceOfScheduleRoundKeys = BlockLengthInBytes * 2; + + +static uint8_t multiplyInGF256( + uint8_t left, + uint8_t right +) { + if (left && right) { + int productLogarithm_ = 0; + uint8_t leftLogarithm_ = logarithmicTable[left]; + uint8_t rightLogarithm_ = logarithmicTable[right]; + productLogarithm_ = leftLogarithm_ + rightLogarithm_; + if (productLogarithm_ > 0xff) { productLogarithm_ -= 0xff; } + return exponentialTable[productLogarithm_]; + } + else { + return 0; + } +} + + +static void applyXTransformation( + const uint8_t *restrict key, + const uint8_t *input, + uint8_t *restrict output +) { + uint64_t key_[2], input_[2], output_[2]; + + /* Compiler usually sees this through. Advantages of using memcpy: */ + memcpy(key_, key, BlockLengthInBytes); + memcpy(input_, input, BlockLengthInBytes); + + output_[0] = input_[0] ^ key_[0]; + output_[1] = input_[1] ^ key_[1]; + + memcpy(output, output_, BlockLengthInBytes); +} + + +static void applySTransformation( + uint8_t *block +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; byteIndex_ += 8) { + block[byteIndex_ + 0] = Pi[block[byteIndex_ + 0]]; + block[byteIndex_ + 1] = Pi[block[byteIndex_ + 1]]; + block[byteIndex_ + 2] = Pi[block[byteIndex_ + 2]]; + block[byteIndex_ + 3] = Pi[block[byteIndex_ + 3]]; + + block[byteIndex_ + 4] = Pi[block[byteIndex_ + 4]]; + block[byteIndex_ + 5] = Pi[block[byteIndex_ + 5]]; + block[byteIndex_ + 6] = Pi[block[byteIndex_ + 6]]; + block[byteIndex_ + 7] = Pi[block[byteIndex_ + 7]]; + } +} + + +static void applyInversedSTransformation( + uint8_t *block +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; byteIndex_ += 8) { + block[byteIndex_ + 0] = InversedPi[block[byteIndex_ + 0]]; + block[byteIndex_ + 1] = InversedPi[block[byteIndex_ + 1]]; + block[byteIndex_ + 2] = InversedPi[block[byteIndex_ + 2]]; + block[byteIndex_ + 3] = InversedPi[block[byteIndex_ + 3]]; + + block[byteIndex_ + 4] = InversedPi[block[byteIndex_ + 4]]; + block[byteIndex_ + 5] = InversedPi[block[byteIndex_ + 5]]; + block[byteIndex_ + 6] = InversedPi[block[byteIndex_ + 6]]; + block[byteIndex_ + 7] = InversedPi[block[byteIndex_ + 7]]; + } +} + + +static void applyLTransformation( + const uint8_t *input, + uint8_t *output +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { + uint8_t cache_ = 0; + for (int addendIndex_ = 0; addendIndex_ < BlockLengthInBytes; ++addendIndex_) { + cache_ ^= multiplyInGF256(LTransformationMatrix[addendIndex_][byteIndex_], + input[addendIndex_]); + } + output[byteIndex_] = cache_; + } +} + + +static void applyInversedLTransformation( + const uint8_t *input, + uint8_t *output +) { + for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { + uint8_t cache_ = 0; + for (int addendIndex_ = 0; addendIndex_ < BlockLengthInBytes; ++addendIndex_) { + cache_ ^= multiplyInGF256(inversedLTransformationMatrix[addendIndex_][byteIndex_], + input[addendIndex_]); + } + output[byteIndex_] = cache_; + } +} + + +static void applyXSLTransformation( + const uint8_t *key, + uint8_t *block, + uint8_t *temporary +) { + applyXTransformation(key, block, temporary); + applySTransformation(temporary); + applyLTransformation(temporary, block); +} + + +static void applyInversedSLXTransformation( + const uint8_t *key, + uint8_t *block, + uint8_t *temporary +) { + applyXTransformation(key, block, temporary); + applyInversedLTransformation(temporary, block); + applyInversedSTransformation(block); +} + + +static void swapBlocks( + uint8_t *restrict left, + uint8_t *restrict right, + uint8_t *restrict temporary +) { + /* left != right != temp shall hold. */ + memcpy(temporary, left, BlockLengthInBytes); + memcpy(left, right, BlockLengthInBytes); + memcpy(right, temporary, BlockLengthInBytes); +} + + +static void applyFTransformation( + const uint8_t *restrict key, + uint8_t *restrict left, + uint8_t *restrict right, + uint8_t *restrict temporary1, + uint8_t *restrict temporary2 +) { + memcpy(temporary1, left, BlockLengthInBytes); + applyXSLTransformation(key, temporary1, temporary2); + applyXTransformation(temporary1, right, right); + swapBlocks(left, right, temporary2); +} + + +static void fetchKeyScheduleRoundConstant( + uint8_t index, + uint8_t *restrict roundConstant, + uint8_t *restrict temporary +) { + memset(temporary, 0, BlockLengthInBytes); + temporary[BlockLengthInBytes - 1] = index; + applyLTransformation(temporary, roundConstant); +} + + +static void scheduleRoundKeys( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + uint8_t *memory_ = memory, *roundKeys_ = roundKeys; + + memcpy(&roundKeys_[0], key, BlockLengthInBytes * 2); + + for (int nextKeyIndex_ = 2, constantIndex_ = 0; + nextKeyIndex_ != NumberOfRounds; + nextKeyIndex_ += 2) { + memcpy(&roundKeys_[BlockLengthInBytes * (nextKeyIndex_)], + &roundKeys_[BlockLengthInBytes * (nextKeyIndex_ - 2)], + BlockLengthInBytes * 2); + + for (int feistelRoundIndex_ = 0; feistelRoundIndex_ < NumberOfRoundsInKeySchedule; ++feistelRoundIndex_) { + applyFTransformation(&roundConstants[BlockLengthInBytes * constantIndex_++], + &roundKeys_[BlockLengthInBytes * (nextKeyIndex_)], + &roundKeys_[BlockLengthInBytes * (nextKeyIndex_ + 1)], + &memory_[0], + &memory_[BlockLengthInBytes]); + } + } +} + + +void scheduleEncryptionRoundKeysForGost15( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + scheduleRoundKeys(roundKeys, key, memory); +} + + +void scheduleDecryptionRoundKeysForGost15( + void *restrict roundKeys, + const void *restrict key, + void *restrict memory +) { + scheduleRoundKeys(roundKeys, key, memory); +} + + +void encryptBlockWithGost15( + const void *restrict roundKeys, + void *restrict block +) { + const uint8_t *roundKeys_ = roundKeys; + uint8_t cache_[BlockLengthInBytes] = {0}; + int round_ = 0; + + for (; round_ < NumberOfRounds - 1; ++round_) { + applyXSLTransformation(&roundKeys_[BlockLengthInBytes * round_], block, cache_); + } + applyXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, block); +} + + +void decryptBlockWithGost15( + const void *restrict roundKeys, + void *restrict block +) { + const uint8_t *roundKeys_ = roundKeys; + uint8_t cache_[BlockLengthInBytes] = {0}; + int round_ = NumberOfRounds - 1; + + for (; round_ > 0; --round_) { + applyInversedSLXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, cache_); + } + applyXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, block); +} diff --git a/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c b/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c index ac5912a18..c119683a0 100644 --- a/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c +++ b/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c @@ -236,4 +236,4 @@ void ECRYPT_PrintContext ( const ECRYPT_ctx * _structContext ) { fprintf(stdout, ".\n" ); -} +} \ No newline at end of file diff --git a/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c.bak b/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c.bak new file mode 100644 index 000000000..ac5912a18 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c.bak @@ -0,0 +1,239 @@ +/* +salsa20-merged.c version 20051118 +D. J. Bernstein +Public domain. +*/ + +#include "ecrypt-sync.h" + +#include + + + +#define ROTATE(v,c) (ROTL32(v,c)) +#define XOR(v,w) ((v) ^ (w)) +#define PLUS(v,w) (U32V((v) + (w))) +#define PLUSONE(v) (PLUS((v),1)) + +void ECRYPT_init(void) +{ + return; +} + +static const char sigma[16] = "expand 32-byte k"; +static const char tau[16] = "expand 16-byte k"; + +void ECRYPT_keysetup(ECRYPT_ctx *x,const u8 *k,u32 kbits,u32 ivbits) +{ + const char *constants; + + x->input[1] = U8TO32_LITTLE(k + 0); + x->input[2] = U8TO32_LITTLE(k + 4); + x->input[3] = U8TO32_LITTLE(k + 8); + x->input[4] = U8TO32_LITTLE(k + 12); + if (kbits == 256) { /* recommended */ + k += 16; + constants = sigma; + } else { /* kbits == 128 */ + constants = tau; + } + x->input[11] = U8TO32_LITTLE(k + 0); + x->input[12] = U8TO32_LITTLE(k + 4); + x->input[13] = U8TO32_LITTLE(k + 8); + x->input[14] = U8TO32_LITTLE(k + 12); + x->input[0] = U8TO32_LITTLE(constants + 0); + x->input[5] = U8TO32_LITTLE(constants + 4); + x->input[10] = U8TO32_LITTLE(constants + 8); + x->input[15] = U8TO32_LITTLE(constants + 12); +} + +void ECRYPT_ivsetup(ECRYPT_ctx *x,const u8 *iv) +{ + x->input[6] = U8TO32_LITTLE(iv + 0); + x->input[7] = U8TO32_LITTLE(iv + 4); + x->input[8] = 0; + x->input[9] = 0; +} + +void ECRYPT_encrypt_bytes(ECRYPT_ctx *x,const u8 *m,u8 *c,u32 bytes) +{ + u32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15; + u32 j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15; + u8 *ctarget; + u8 tmp[64]; + int i; + + if (!bytes) return; + + j0 = x->input[0]; + j1 = x->input[1]; + j2 = x->input[2]; + j3 = x->input[3]; + j4 = x->input[4]; + j5 = x->input[5]; + j6 = x->input[6]; + j7 = x->input[7]; + j8 = x->input[8]; + j9 = x->input[9]; + j10 = x->input[10]; + j11 = x->input[11]; + j12 = x->input[12]; + j13 = x->input[13]; + j14 = x->input[14]; + j15 = x->input[15]; + + for (;;) { + if (bytes < 64) { + for (i = 0;i < bytes;++i) tmp[i] = m[i]; + m = tmp; + ctarget = c; + c = tmp; + } + x0 = j0; + x1 = j1; + x2 = j2; + x3 = j3; + x4 = j4; + x5 = j5; + x6 = j6; + x7 = j7; + x8 = j8; + x9 = j9; + x10 = j10; + x11 = j11; + x12 = j12; + x13 = j13; + x14 = j14; + x15 = j15; + for (i = 20;i > 0;i -= 2) { + x4 = XOR( x4,ROTATE(PLUS( x0,x12), 7)); + x8 = XOR( x8,ROTATE(PLUS( x4, x0), 9)); + x12 = XOR(x12,ROTATE(PLUS( x8, x4),13)); + x0 = XOR( x0,ROTATE(PLUS(x12, x8),18)); + x9 = XOR( x9,ROTATE(PLUS( x5, x1), 7)); + x13 = XOR(x13,ROTATE(PLUS( x9, x5), 9)); + x1 = XOR( x1,ROTATE(PLUS(x13, x9),13)); + x5 = XOR( x5,ROTATE(PLUS( x1,x13),18)); + x14 = XOR(x14,ROTATE(PLUS(x10, x6), 7)); + x2 = XOR( x2,ROTATE(PLUS(x14,x10), 9)); + x6 = XOR( x6,ROTATE(PLUS( x2,x14),13)); + x10 = XOR(x10,ROTATE(PLUS( x6, x2),18)); + x3 = XOR( x3,ROTATE(PLUS(x15,x11), 7)); + x7 = XOR( x7,ROTATE(PLUS( x3,x15), 9)); + x11 = XOR(x11,ROTATE(PLUS( x7, x3),13)); + x15 = XOR(x15,ROTATE(PLUS(x11, x7),18)); + x1 = XOR( x1,ROTATE(PLUS( x0, x3), 7)); + x2 = XOR( x2,ROTATE(PLUS( x1, x0), 9)); + x3 = XOR( x3,ROTATE(PLUS( x2, x1),13)); + x0 = XOR( x0,ROTATE(PLUS( x3, x2),18)); + x6 = XOR( x6,ROTATE(PLUS( x5, x4), 7)); + x7 = XOR( x7,ROTATE(PLUS( x6, x5), 9)); + x4 = XOR( x4,ROTATE(PLUS( x7, x6),13)); + x5 = XOR( x5,ROTATE(PLUS( x4, x7),18)); + x11 = XOR(x11,ROTATE(PLUS(x10, x9), 7)); + x8 = XOR( x8,ROTATE(PLUS(x11,x10), 9)); + x9 = XOR( x9,ROTATE(PLUS( x8,x11),13)); + x10 = XOR(x10,ROTATE(PLUS( x9, x8),18)); + x12 = XOR(x12,ROTATE(PLUS(x15,x14), 7)); + x13 = XOR(x13,ROTATE(PLUS(x12,x15), 9)); + x14 = XOR(x14,ROTATE(PLUS(x13,x12),13)); + x15 = XOR(x15,ROTATE(PLUS(x14,x13),18)); + } + x0 = PLUS(x0,j0); + x1 = PLUS(x1,j1); + x2 = PLUS(x2,j2); + x3 = PLUS(x3,j3); + x4 = PLUS(x4,j4); + x5 = PLUS(x5,j5); + x6 = PLUS(x6,j6); + x7 = PLUS(x7,j7); + x8 = PLUS(x8,j8); + x9 = PLUS(x9,j9); + x10 = PLUS(x10,j10); + x11 = PLUS(x11,j11); + x12 = PLUS(x12,j12); + x13 = PLUS(x13,j13); + x14 = PLUS(x14,j14); + x15 = PLUS(x15,j15); + + x0 = XOR(x0,U8TO32_LITTLE(m + 0)); + x1 = XOR(x1,U8TO32_LITTLE(m + 4)); + x2 = XOR(x2,U8TO32_LITTLE(m + 8)); + x3 = XOR(x3,U8TO32_LITTLE(m + 12)); + x4 = XOR(x4,U8TO32_LITTLE(m + 16)); + x5 = XOR(x5,U8TO32_LITTLE(m + 20)); + x6 = XOR(x6,U8TO32_LITTLE(m + 24)); + x7 = XOR(x7,U8TO32_LITTLE(m + 28)); + x8 = XOR(x8,U8TO32_LITTLE(m + 32)); + x9 = XOR(x9,U8TO32_LITTLE(m + 36)); + x10 = XOR(x10,U8TO32_LITTLE(m + 40)); + x11 = XOR(x11,U8TO32_LITTLE(m + 44)); + x12 = XOR(x12,U8TO32_LITTLE(m + 48)); + x13 = XOR(x13,U8TO32_LITTLE(m + 52)); + x14 = XOR(x14,U8TO32_LITTLE(m + 56)); + x15 = XOR(x15,U8TO32_LITTLE(m + 60)); + + j8 = PLUSONE(j8); + if (!j8) { + j9 = PLUSONE(j9); + /* stopping at 2^70 bytes per nonce is user's responsibility */ + } + + U32TO8_LITTLE(c + 0,x0); + U32TO8_LITTLE(c + 4,x1); + U32TO8_LITTLE(c + 8,x2); + U32TO8_LITTLE(c + 12,x3); + U32TO8_LITTLE(c + 16,x4); + U32TO8_LITTLE(c + 20,x5); + U32TO8_LITTLE(c + 24,x6); + U32TO8_LITTLE(c + 28,x7); + U32TO8_LITTLE(c + 32,x8); + U32TO8_LITTLE(c + 36,x9); + U32TO8_LITTLE(c + 40,x10); + U32TO8_LITTLE(c + 44,x11); + U32TO8_LITTLE(c + 48,x12); + U32TO8_LITTLE(c + 52,x13); + U32TO8_LITTLE(c + 56,x14); + U32TO8_LITTLE(c + 60,x15); + + if (bytes <= 64) { + if (bytes < 64) { + for (i = 0;i < bytes;++i) ctarget[i] = c[i]; + } + x->input[8] = j8; + x->input[9] = j9; + return; + } + bytes -= 64; + c += 64; + m += 64; + } +} + +void ECRYPT_decrypt_bytes(ECRYPT_ctx *x,const u8 *c,u8 *m,u32 bytes) +{ + ECRYPT_encrypt_bytes(x,c,m,bytes); +} + +void ECRYPT_keystream_bytes(ECRYPT_ctx *x,u8 *stream,u32 bytes) +{ + u32 i; + for (i = 0;i < bytes;++i) stream[i] = 0; + ECRYPT_encrypt_bytes(x,stream,stream,bytes); +} + + + +void ECRYPT_PrintContext ( const ECRYPT_ctx * _structContext ) { + int i; + + fprintf(stdout, "salsa20.cpp : ECRYPT_PrintContext () : " ); + + for ( i = 0; i < 16; i ++ ) { + fprintf(stdout, "%i ", _structContext -> input [ i ] ); + + } //-for + + fprintf(stdout, ".\n" ); + +} diff --git a/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h index 79564ed0a..76eccb5d5 100644 --- a/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h +++ b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h @@ -82,4 +82,4 @@ void libskein_threefish_encrypt #ifdef __cplusplus } #endif -//#endif +//#endif \ No newline at end of file diff --git a/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h.bak b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h.bak new file mode 100644 index 000000000..79564ed0a --- /dev/null +++ b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h.bak @@ -0,0 +1,85 @@ +/* +** Copyright (c) Alexis Megas. +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** 1. Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** 3. The name of the author may not be used to endorse or promote products +** derived from skein without specific prior written permission. +** +** LIBSKEIN IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 +** LIBSKEIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +//#ifndef LIBSKEIN_SKEIN_H +//#define LIBSKEIN_SKEIN_H + +#ifdef __cplusplus +extern "C" +{ +#endif +#include +#include +#include +#ifdef __cplusplus +} +#endif + +//#include +//#include +//#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +void libskein_threefish_decrypt +(char *D, /* + ** Output storage. The size of the + ** container must be identical to + ** the size of C. + */ + const char *K, // Must be 32, 64, or 128 bytes. + const char *T, // Must be 16 bytes. + const char *C, // The ciphertext. + const size_t C_size, // The size of the ciphertext. + const size_t block_size); /* + ** The block size in + ** bits. Must be 256, + ** 512, or 1024. + */ +void libskein_threefish_encrypt +(char *E, /* + ** Output storage. The size of the + ** container must be identical to + ** the size of P. + */ + const char *K, // Must be 32, 64, or 128 bytes. + const char *T, // Must be 16 bytes. + const char *P, // The plaintext. + const size_t P_size, // The size of the plaintext. + const size_t block_size); /* + ** The block size in + ** bits. Must be 256, + ** 512, or 1024. + */ + +#ifdef __cplusplus +} +#endif +//#endif diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c index 982fcffd8..c6ce51f1b 100644 --- a/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c +++ b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c @@ -391,4 +391,4 @@ void hash_256(const unsigned char *message,unsigned long long length,unsigned ch #ifdef __cplusplus } -#endif +#endif \ No newline at end of file diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c.bak b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c.bak new file mode 100644 index 000000000..982fcffd8 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c.bak @@ -0,0 +1,394 @@ +/* + * stribog.c + * + * Created on: Feb 15, 2013 + * Author: Oleksandr Kazymyrov + * Acknowledgments: Oleksii Shevchuk + */ + +#include +#include +#include +#include + +#include "stribog_data.h" +//#include "../stribog.h" + +void AddModulo512(const void *a,const void *b,void *c) +{ + const unsigned char *A=a, *B=b; + unsigned char *C=c; + int t = 0; +#ifdef FULL_UNROLL +#define ADDBYTE_8(i) t = A[i] + B[i] + (t >> 8); C[i] = t & 0xFF; + + ADDBYTE_8(63) + ADDBYTE_8(62) + ADDBYTE_8(61) + ADDBYTE_8(60) + ADDBYTE_8(59) + ADDBYTE_8(58) + ADDBYTE_8(57) + ADDBYTE_8(56) + ADDBYTE_8(55) + ADDBYTE_8(54) + ADDBYTE_8(53) + ADDBYTE_8(52) + ADDBYTE_8(51) + ADDBYTE_8(50) + ADDBYTE_8(49) + ADDBYTE_8(48) + ADDBYTE_8(47) + ADDBYTE_8(46) + ADDBYTE_8(45) + ADDBYTE_8(44) + ADDBYTE_8(43) + ADDBYTE_8(42) + ADDBYTE_8(41) + ADDBYTE_8(40) + ADDBYTE_8(39) + ADDBYTE_8(38) + ADDBYTE_8(37) + ADDBYTE_8(36) + ADDBYTE_8(35) + ADDBYTE_8(34) + ADDBYTE_8(33) + ADDBYTE_8(32) + ADDBYTE_8(31) + ADDBYTE_8(30) + ADDBYTE_8(29) + ADDBYTE_8(28) + ADDBYTE_8(27) + ADDBYTE_8(26) + ADDBYTE_8(25) + ADDBYTE_8(24) + ADDBYTE_8(23) + ADDBYTE_8(22) + ADDBYTE_8(21) + ADDBYTE_8(20) + ADDBYTE_8(19) + ADDBYTE_8(18) + ADDBYTE_8(17) + ADDBYTE_8(16) + ADDBYTE_8(15) + ADDBYTE_8(14) + ADDBYTE_8(13) + ADDBYTE_8(12) + ADDBYTE_8(11) + ADDBYTE_8(10) + ADDBYTE_8(9) + ADDBYTE_8(8) + ADDBYTE_8(7) + ADDBYTE_8(6) + ADDBYTE_8(5) + ADDBYTE_8(4) + ADDBYTE_8(3) + ADDBYTE_8(2) + ADDBYTE_8(1) + ADDBYTE_8(0) + +#else + int i = 0; + + for(i=63;i>=0;i--) + { + t = A[i] + B[i] + (t >> 8); + C[i] = t & 0xFF; + } +#endif +} + +void AddXor512(const void *a,const void *b,void *c) +{ + const unsigned long long *A=a, *B=b; + unsigned long long *C=c; +#ifdef FULL_UNROLL + C[0] = A[0] ^ B[0]; + C[1] = A[1] ^ B[1]; + C[2] = A[2] ^ B[2]; + C[3] = A[3] ^ B[3]; + C[4] = A[4] ^ B[4]; + C[5] = A[5] ^ B[5]; + C[6] = A[6] ^ B[6]; + C[7] = A[7] ^ B[7]; +#else + int i = 0; + + for(i=0;i<8;i++) + { + C[i] = A[i] ^ B[i]; + } +#endif +} + +void F(unsigned char *state) +{ + unsigned long long return_state[8]; + register unsigned long long r = 0; + r ^= Streebog_T[0][state[56]]; + r ^= Streebog_T[1][state[48]]; + r ^= Streebog_T[2][state[40]]; + r ^= Streebog_T[3][state[32]]; + r ^= Streebog_T[4][state[24]]; + r ^= Streebog_T[5][state[16]]; + r ^= Streebog_T[6][state[8]]; + r ^= Streebog_T[7][state[0]]; + return_state[0] = r; + r = 0; + + r ^= Streebog_T[0][state[57]]; + r ^= Streebog_T[1][state[49]]; + r ^= Streebog_T[2][state[41]]; + r ^= Streebog_T[3][state[33]]; + r ^= Streebog_T[4][state[25]]; + r ^= Streebog_T[5][state[17]]; + r ^= Streebog_T[6][state[9]]; + r ^= Streebog_T[7][state[1]]; + return_state[1] = r; + r = 0; + + r ^= Streebog_T[0][state[58]]; + r ^= Streebog_T[1][state[50]]; + r ^= Streebog_T[2][state[42]]; + r ^= Streebog_T[3][state[34]]; + r ^= Streebog_T[4][state[26]]; + r ^= Streebog_T[5][state[18]]; + r ^= Streebog_T[6][state[10]]; + r ^= Streebog_T[7][state[2]]; + return_state[2] = r; + r = 0; + + r ^= Streebog_T[0][state[59]]; + r ^= Streebog_T[1][state[51]]; + r ^= Streebog_T[2][state[43]]; + r ^= Streebog_T[3][state[35]]; + r ^= Streebog_T[4][state[27]]; + r ^= Streebog_T[5][state[19]]; + r ^= Streebog_T[6][state[11]]; + r ^= Streebog_T[7][state[3]]; + return_state[3] = r; + r = 0; + + r ^= Streebog_T[0][state[60]]; + r ^= Streebog_T[1][state[52]]; + r ^= Streebog_T[2][state[44]]; + r ^= Streebog_T[3][state[36]]; + r ^= Streebog_T[4][state[28]]; + r ^= Streebog_T[5][state[20]]; + r ^= Streebog_T[6][state[12]]; + r ^= Streebog_T[7][state[4]]; + return_state[4] = r; + r = 0; + + r ^= Streebog_T[0][state[61]]; + r ^= Streebog_T[1][state[53]]; + r ^= Streebog_T[2][state[45]]; + r ^= Streebog_T[3][state[37]]; + r ^= Streebog_T[4][state[29]]; + r ^= Streebog_T[5][state[21]]; + r ^= Streebog_T[6][state[13]]; + r ^= Streebog_T[7][state[5]]; + return_state[5] = r; + r = 0; + + r ^= Streebog_T[0][state[62]]; + r ^= Streebog_T[1][state[54]]; + r ^= Streebog_T[2][state[46]]; + r ^= Streebog_T[3][state[38]]; + r ^= Streebog_T[4][state[30]]; + r ^= Streebog_T[5][state[22]]; + r ^= Streebog_T[6][state[14]]; + r ^= Streebog_T[7][state[6]]; + return_state[6] = r; + r = 0; + + r ^= Streebog_T[0][state[63]]; + r ^= Streebog_T[1][state[55]]; + r ^= Streebog_T[2][state[47]]; + r ^= Streebog_T[3][state[39]]; + r ^= Streebog_T[4][state[31]]; + r ^= Streebog_T[5][state[23]]; + r ^= Streebog_T[6][state[15]]; + r ^= Streebog_T[7][state[7]]; + return_state[7] = r; + + memcpy(state,(unsigned char*)return_state,64); +} + +#define KeySchedule(K,i) AddXor512(K,Streebog_C[i],K); F(K); + +void E(unsigned char *K,const unsigned char *m, unsigned char *state) +{ +#ifdef FULL_UNROLL + AddXor512(m,K,state); + + F(state); + KeySchedule(K,0); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,1); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,2); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,3); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,4); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,5); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,6); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,7); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,8); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,9); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,10); + AddXor512(state,K,state); + + F(state); + KeySchedule(K,11); + AddXor512(state,K,state); +#else + int i = 0; + + AddXor512(m,K,state); + + for(i=0;i<12;i++) + { + F(state); + KeySchedule(K,i); + AddXor512(state,K,state); + } +#endif +} + +void g_N(const unsigned char *N,unsigned char *h,const unsigned char *m) +{ + unsigned char t[64], K[64]; + + AddXor512(N,h,K); + + F(K); + + E(K,m,t); + + AddXor512(t,h,t); + AddXor512(t,m,h); +} + +void hash_X(unsigned char *IV,const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char v512[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00 + }; + unsigned char v0[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char Sigma[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char N[64] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + unsigned char m[64], *hash = IV; + unsigned long long len = length; + + // Stage 2 + while (len >= 512) + { + memcpy(m, message + len/8 - 63 - ( (len & 0x7) == 0 ), 64); + + g_N(N,hash,m); + AddModulo512(N,v512,N); + AddModulo512(Sigma,m,Sigma); + len -= 512; + } + + memset(m,0,64); + memcpy(m + 63 - len/8 + ( (len & 0x7) == 0 ), message, len/8 + 1 - ( (len & 0x7) == 0 )); + + // Stage 3 + m[ 63 - len/8 ] |= (1 << (len & 0x7)); + + g_N(N,hash,m); + v512[63] = len & 0xFF; + v512[62] = len >> 8; + AddModulo512(N,v512,N); + + AddModulo512(Sigma,m,Sigma); + + g_N(v0,hash,N); + g_N(v0,hash,Sigma); + + memcpy(out, hash, 64); +} + +#ifdef __cplusplus +extern "C"{ +#endif + +void hash_512(const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char IV[64] = + { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + }; + + hash_X(IV,message,length,out); +} + +void hash_256(const unsigned char *message,unsigned long long length,unsigned char *out) +{ + unsigned char IV[64] = + { + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 + }; + unsigned char hash[64]; + + hash_X(IV,message,length,hash); + + memcpy(out,hash,32); +} + +#ifdef __cplusplus +} +#endif diff --git a/stratum/algos/blake2/blake2.h b/stratum/algos/blake2/blake2.h index a452f33ee..12533d1e7 100644 --- a/stratum/algos/blake2/blake2.h +++ b/stratum/algos/blake2/blake2.h @@ -78,7 +78,7 @@ int blake2b_final(blake2b_state *S, void *out, size_t outlen); /* Simple API */ int blake2b(void *out, size_t outlen, const void *in, size_t inlen, - const void *key, size_t keylen); + const void *key, size_t keylen); /* Argon2 Team - Begin Code */ int blake2b_long(void *out, size_t outlen, const void *in, size_t inlen); diff --git a/stratum/algos/blake2/blake2.h.bak b/stratum/algos/blake2/blake2.h.bak index 6a26f5f25..a452f33ee 100644 --- a/stratum/algos/blake2/blake2.h.bak +++ b/stratum/algos/blake2/blake2.h.bak @@ -1,189 +1,88 @@ /* - BLAKE2 reference source code package - reference C implementations - Copyright 2012, Samuel Neves . You may use this under the - terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at - your option. The terms of these licenses can be found at: - - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - - OpenSSL license : https://www.openssl.org/source/license.html - - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - More information about the BLAKE2 hash function can be found at - https://blake2.net. -*/ -#ifndef BLAKE2_H -#define BLAKE2_H + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef PORTABLE_BLAKE2_H +#define PORTABLE_BLAKE2_H #include #include - -#if defined(_MSC_VER) -#define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop)) -#else -#define BLAKE2_PACKED(x) x __attribute__((packed)) -#endif +#include #if defined(__cplusplus) extern "C" { #endif - enum blake2s_constant - { - BLAKE2S_BLOCKBYTES = 64, - BLAKE2S_OUTBYTES = 32, - BLAKE2S_KEYBYTES = 32, - BLAKE2S_SALTBYTES = 8, - BLAKE2S_PERSONALBYTES = 8 - }; - - enum blake2b_constant - { +enum blake2b_constant { BLAKE2B_BLOCKBYTES = 128, - BLAKE2B_OUTBYTES = 64, - BLAKE2B_KEYBYTES = 64, - BLAKE2B_SALTBYTES = 16, + BLAKE2B_OUTBYTES = 64, + BLAKE2B_KEYBYTES = 64, + BLAKE2B_SALTBYTES = 16, BLAKE2B_PERSONALBYTES = 16 - }; - - typedef struct blake2s_state__ - { - uint32_t h[8]; - uint32_t t[2]; - uint32_t f[2]; - uint8_t buf[BLAKE2S_BLOCKBYTES]; - size_t buflen; - size_t outlen; - uint8_t last_node; - } blake2s_state; - - typedef struct blake2b_state__ - { +}; + +#pragma pack(push, 1) +typedef struct __blake2b_param { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint64_t node_offset; /* 16 */ + uint8_t node_depth; /* 17 */ + uint8_t inner_length; /* 18 */ + uint8_t reserved[14]; /* 32 */ + uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ + uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ +} blake2b_param; +#pragma pack(pop) + +typedef struct __blake2b_state { uint64_t h[8]; uint64_t t[2]; uint64_t f[2]; - uint8_t buf[BLAKE2B_BLOCKBYTES]; - size_t buflen; - size_t outlen; - uint8_t last_node; - } blake2b_state; - - typedef struct blake2sp_state__ - { - blake2s_state S[8][1]; - blake2s_state R[1]; - uint8_t buf[8 * BLAKE2S_BLOCKBYTES]; - size_t buflen; - size_t outlen; - } blake2sp_state; - - typedef struct blake2bp_state__ - { - blake2b_state S[4][1]; - blake2b_state R[1]; - uint8_t buf[4 * BLAKE2B_BLOCKBYTES]; - size_t buflen; - size_t outlen; - } blake2bp_state; - - - BLAKE2_PACKED(struct blake2s_param__ - { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint32_t node_offset; /* 12 */ - uint16_t xof_length; /* 14 */ - uint8_t node_depth; /* 15 */ - uint8_t inner_length; /* 16 */ - /* uint8_t reserved[0]; */ - uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ - uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ - }); - - typedef struct blake2s_param__ blake2s_param; - - BLAKE2_PACKED(struct blake2b_param__ - { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint32_t node_offset; /* 12 */ - uint32_t xof_length; /* 16 */ - uint8_t node_depth; /* 17 */ - uint8_t inner_length; /* 18 */ - uint8_t reserved[14]; /* 32 */ - uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ - uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ - }); - - typedef struct blake2b_param__ blake2b_param; - - typedef struct blake2xs_state__ - { - blake2s_state S[1]; - blake2s_param P[1]; - } blake2xs_state; - - typedef struct blake2xb_state__ - { - blake2b_state S[1]; - blake2b_param P[1]; - } blake2xb_state; - - /* Padded structs result in a compile-time error */ - enum { - BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES), - BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) - }; - - /* Streaming API */ - int blake2s_init( blake2s_state *S, size_t outlen ); - int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); - int blake2s_update( blake2s_state *S, const void *in, size_t inlen ); - int blake2s_final( blake2s_state *S, void *out, size_t outlen ); - - int blake2b_init( blake2b_state *S, size_t outlen ); - int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); - int blake2b_update( blake2b_state *S, const void *in, size_t inlen ); - int blake2b_final( blake2b_state *S, void *out, size_t outlen ); - - int blake2sp_init( blake2sp_state *S, size_t outlen ); - int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2sp_update( blake2sp_state *S, const void *in, size_t inlen ); - int blake2sp_final( blake2sp_state *S, void *out, size_t outlen ); - - int blake2bp_init( blake2bp_state *S, size_t outlen ); - int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen ); - int blake2bp_update( blake2bp_state *S, const void *in, size_t inlen ); - int blake2bp_final( blake2bp_state *S, void *out, size_t outlen ); - - /* Variable output length API */ - int blake2xs_init( blake2xs_state *S, const size_t outlen ); - int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, size_t keylen ); - int blake2xs_update( blake2xs_state *S, const void *in, size_t inlen ); - int blake2xs_final(blake2xs_state *S, void *out, size_t outlen); - - int blake2xb_init( blake2xb_state *S, const size_t outlen ); - int blake2xb_init_key( blake2xb_state *S, const size_t outlen, const void *key, size_t keylen ); - int blake2xb_update( blake2xb_state *S, const void *in, size_t inlen ); - int blake2xb_final(blake2xb_state *S, void *out, size_t outlen); - - /* Simple API */ - int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - int blake2sp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2bp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - int blake2xs( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - int blake2xb( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); - - /* This is simply an alias for blake2b */ - int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + uint8_t buf[BLAKE2B_BLOCKBYTES]; + unsigned buflen; + unsigned outlen; + uint8_t last_node; +} blake2b_state; + +/* Ensure param structs have not been wrongly padded */ +/* Poor man's static_assert */ +enum { + blake2_size_check_0 = 1 / !!(CHAR_BIT == 8), + blake2_size_check_2 = + 1 / !!(sizeof(blake2b_param) == sizeof(uint64_t) * CHAR_BIT) +}; + +/* Streaming API */ +int blake2b_init(blake2b_state *S, size_t outlen); +int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, + size_t keylen); +int blake2b_init_param(blake2b_state *S, const blake2b_param *P); +int blake2b_update(blake2b_state *S, const void *in, size_t inlen); +int blake2b_final(blake2b_state *S, void *out, size_t outlen); + +/* Simple API */ +int blake2b(void *out, size_t outlen, const void *in, size_t inlen, + const void *key, size_t keylen); + +/* Argon2 Team - Begin Code */ +int blake2b_long(void *out, size_t outlen, const void *in, size_t inlen); +/* Argon2 Team - End Code */ #if defined(__cplusplus) } diff --git a/stratum/algos/blake2/blamka-round-opt.h b/stratum/algos/blake2/blamka-round-opt.h index 2c8942e31..faf96662e 100644 --- a/stratum/algos/blake2/blamka-round-opt.h +++ b/stratum/algos/blake2/blamka-round-opt.h @@ -4,7 +4,7 @@ * Copyright 2015 * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves * - * You may use this work under the terms of a Creative Commons CC0 1.0 + * You may use this work under the terms of a Creative Commons CC0 1.0 * License/Waiver or the Apache Public License 2.0, at your option. The terms of * these licenses can be found at: * @@ -18,6 +18,10 @@ #ifndef BLAKE_ROUND_MKA_OPT_H #define BLAKE_ROUND_MKA_OPT_H +#if defined(HAVE_CONFIG_H) +#include "config/dynamic-config.h" +#endif + #include "blake2-impl.h" #include @@ -178,6 +182,7 @@ static BLAKE2_INLINE __m128i fBlaMka(__m128i x, __m128i y) { \ UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ } while ((void)0, 0) + #else /* __AVX2__ */ #include @@ -468,4 +473,4 @@ static __m512i muladd(__m512i x, __m512i y) } while ((void)0, 0) #endif /* __AVX512F__ */ -#endif /* BLAKE_ROUND_MKA_OPT_H */ +#endif /* BLAKE_ROUND_MKA_OPT_H */ \ No newline at end of file diff --git a/stratum/algos/blake2/blamka-round-opt.h.bak b/stratum/algos/blake2/blamka-round-opt.h.bak index faf96662e..2c8942e31 100644 --- a/stratum/algos/blake2/blamka-round-opt.h.bak +++ b/stratum/algos/blake2/blamka-round-opt.h.bak @@ -4,7 +4,7 @@ * Copyright 2015 * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves * - * You may use this work under the terms of a Creative Commons CC0 1.0 + * You may use this work under the terms of a Creative Commons CC0 1.0 * License/Waiver or the Apache Public License 2.0, at your option. The terms of * these licenses can be found at: * @@ -18,10 +18,6 @@ #ifndef BLAKE_ROUND_MKA_OPT_H #define BLAKE_ROUND_MKA_OPT_H -#if defined(HAVE_CONFIG_H) -#include "config/dynamic-config.h" -#endif - #include "blake2-impl.h" #include @@ -182,7 +178,6 @@ static BLAKE2_INLINE __m128i fBlaMka(__m128i x, __m128i y) { \ UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ } while ((void)0, 0) - #else /* __AVX2__ */ #include @@ -473,4 +468,4 @@ static __m512i muladd(__m512i x, __m512i y) } while ((void)0, 0) #endif /* __AVX512F__ */ -#endif /* BLAKE_ROUND_MKA_OPT_H */ \ No newline at end of file +#endif /* BLAKE_ROUND_MKA_OPT_H */ diff --git a/stratum/algos/blake2/blamka-round-ref.h b/stratum/algos/blake2/blamka-round-ref.h index b8f2cf471..2238959e1 100644 --- a/stratum/algos/blake2/blamka-round-ref.h +++ b/stratum/algos/blake2/blamka-round-ref.h @@ -4,7 +4,7 @@ * Copyright 2015 * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves * - * You may use this work under the terms of a Creative Commons CC0 1.0 + * You may use this work under the terms of a Creative Commons CC0 1.0 * License/Waiver or the Apache Public License 2.0, at your option. The terms of * these licenses can be found at: * @@ -21,7 +21,7 @@ #include "blake2.h" #include "blake2-impl.h" -/* designed by the Lyra PHC team */ +/*designed by the Lyra PHC team */ static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { const uint64_t m = UINT64_C(0xFFFFFFFF); const uint64_t xy = (x & m) * (y & m); @@ -53,4 +53,4 @@ static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { G(v3, v4, v9, v14); \ } while ((void)0, 0) -#endif +#endif \ No newline at end of file diff --git a/stratum/algos/blake2/blamka-round-ref.h.bak b/stratum/algos/blake2/blamka-round-ref.h.bak index 2238959e1..b8f2cf471 100644 --- a/stratum/algos/blake2/blamka-round-ref.h.bak +++ b/stratum/algos/blake2/blamka-round-ref.h.bak @@ -4,7 +4,7 @@ * Copyright 2015 * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves * - * You may use this work under the terms of a Creative Commons CC0 1.0 + * You may use this work under the terms of a Creative Commons CC0 1.0 * License/Waiver or the Apache Public License 2.0, at your option. The terms of * these licenses can be found at: * @@ -21,7 +21,7 @@ #include "blake2.h" #include "blake2-impl.h" -/*designed by the Lyra PHC team */ +/* designed by the Lyra PHC team */ static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { const uint64_t m = UINT64_C(0xFFFFFFFF); const uint64_t xy = (x & m) * (y & m); @@ -53,4 +53,4 @@ static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { G(v3, v4, v9, v14); \ } while ((void)0, 0) -#endif \ No newline at end of file +#endif diff --git a/stratum/algos/geek.c b/stratum/algos/geek.c new file mode 100644 index 000000000..6d05a6aff --- /dev/null +++ b/stratum/algos/geek.c @@ -0,0 +1,76 @@ +#include "geek.h" +#include +#include +#include +#include + +#include "../sha3/sph_blake.h" +#include "../sha3/sph_bmw.h" +#include "../sha3/sph_groestl.h" +#include "../sha3/sph_jh.h" +#include "../sha3/sph_keccak.h" +#include "../sha3/sph_skein.h" +#include "../sha3/sph_luffa.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_shavite.h" +#include "../sha3/sph_simd.h" +#include "../sha3/sph_echo.h" +#include "../sha3/sph_hamsi.h" +#include "../sha3/sph_fugue.h" +#include "../sha3/sph_shabal.h" +#include "../sha3/sph_whirlpool.h" + +void geek_hash(const char* input, char* output, uint32_t len) +{ + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_keccak512_context ctx_keccak; + sph_cubehash512_context ctx_cubehash1; + sph_echo512_context ctx_echo1; + sph_shabal512_context ctx_shabal1; + sph_simd512_context ctx_simd1; + sph_hamsi512_context ctx_hamsi1; + + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_blake512_init(&ctx_blake); + sph_blake512 (&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, hashA); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512 (&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_echo512_init (&ctx_echo1); + sph_echo512 (&ctx_echo1, hashB, 64); + sph_echo512_close(&ctx_echo1, hashA); + + sph_shabal512_init (&ctx_shabal1); + sph_shabal512 (&ctx_shabal1, hashA, 64); + sph_shabal512_close(&ctx_shabal1, hashB); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512 (&ctx_groestl, hashB, 64); + sph_groestl512_close(&ctx_groestl, hashA); + + sph_cubehash512_init (&ctx_cubehash1); + sph_cubehash512 (&ctx_cubehash1, hashA, 64); + sph_cubehash512_close(&ctx_cubehash1, hashB); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512 (&ctx_keccak, hashB, 64); + sph_keccak512_close(&ctx_keccak, hashA); + + sph_hamsi512_init (&ctx_hamsi1); + sph_hamsi512 (&ctx_hamsi1, hashA, 64); + sph_hamsi512_close(&ctx_hamsi1, hashB); + + sph_simd512_init (&ctx_simd1); + sph_simd512 (&ctx_simd1, hashB, 64); + sph_simd512_close(&ctx_simd1, hashA); + + memcpy(output, hashA, 32); +} diff --git a/stratum/algos/geek.h b/stratum/algos/geek.h new file mode 100644 index 000000000..cca287f5f --- /dev/null +++ b/stratum/algos/geek.h @@ -0,0 +1,16 @@ +#ifndef GEEK_H +#define GEEK_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void geek_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/stratum/algos/renesis.c b/stratum/algos/renesis.c new file mode 100644 index 000000000..f2f67d9cb --- /dev/null +++ b/stratum/algos/renesis.c @@ -0,0 +1,69 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2012 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +// Copyright (c) 2018, hav0k Renesis Developers & Renesis Group +// This is the pre-fork hash for Renesis. +// http://renesis.io + +#include +#include +#include +#include + +#include "../sha3/sph_skein.h" +#include "../sha3/sph_keccak.h" +#include "../sha3/sph_simd.h" +#include "../sha3/sph_shavite.h" +#include "../sha3/sph_jh.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_fugue.h" +#include "../sha3/sph_gost.h" + +void renesis_hash(const char* input, char* output, uint32_t len) +{ + sph_skein512_context ctx_skein; + sph_keccak512_context ctx_keccak; + sph_simd512_context ctx_simd; + sph_shavite512_context ctx_shavite; + sph_jh512_context ctx_jh; + sph_cubehash512_context ctx_cubehash; + sph_fugue512_context ctx_fugue; + sph_gost512_context ctx_gost; + + uint32_t hash[64]; + + sph_skein512_init(&ctx_skein); + sph_skein512 (&ctx_skein, input, len); + sph_skein512_close (&ctx_skein, hash); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512 (&ctx_keccak, hash, 64); + sph_keccak512_close(&ctx_keccak, hash); + + sph_simd512_init (&ctx_simd); + sph_simd512 (&ctx_simd, hash, 64); + sph_simd512_close(&ctx_simd, hash); + + sph_shavite512_init (&ctx_shavite); + sph_shavite512 (&ctx_shavite, hash, 64); + sph_shavite512_close(&ctx_shavite, hash); + + sph_jh512_init(&ctx_jh); + sph_jh512 (&ctx_jh, hash, 64); + sph_jh512_close(&ctx_jh, hash); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512 (&ctx_cubehash, hash, 64); + sph_cubehash512_close(&ctx_cubehash, hash); + + sph_fugue512_init (&ctx_fugue); + sph_fugue512 (&ctx_fugue, hash, 64); + sph_fugue512_close (&ctx_fugue, hash); + + sph_gost512_init (&ctx_gost); + sph_gost512 (&ctx_gost, hash, 64); + sph_gost512_close(&ctx_gost, hash); + + memcpy(output, hash, 32); +} \ No newline at end of file diff --git a/stratum/algos/renesis.h b/stratum/algos/renesis.h new file mode 100644 index 000000000..c1ca11904 --- /dev/null +++ b/stratum/algos/renesis.h @@ -0,0 +1,16 @@ +#ifndef RENESIS_H +#define RENESIS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void renesis_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/config.sample/argon2d-crds.conf b/stratum/config.sample/argon2d-crds.conf new file mode 100644 index 000000000..c1d95ed33 --- /dev/null +++ b/stratum/config.sample/argon2d-crds.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 4238 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = argon2d-crds +difficulty = 2.0 +max_ttf = 400000000 \ No newline at end of file diff --git a/stratum/config.sample/balloon.conf b/stratum/config.sample/balloon.conf new file mode 100644 index 000000000..97c507fd0 --- /dev/null +++ b/stratum/config.sample/balloon.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 5100 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = balloon +difficulty = 0.5 +max_ttf = 50000 + diff --git a/stratum/config.sample/bcd.conf b/stratum/config.sample/bcd.conf new file mode 100644 index 000000000..5c519cea3 --- /dev/null +++ b/stratum/config.sample/bcd.conf @@ -0,0 +1,16 @@ +[TCP] +server = localhost +port = 3643 +password = 1EsoTW0Gk26QuNVnxDynSthw8aBtX5JE + +[SQL] +host = localhost +database = yiimpfrontend +username = stratum +password = LZPZjREHtgcLelOKJfWMSlyz5CibnLKv + +[STRATUM] +algo = bcd +difficulty = 0.1 +max_ttf = 4000000 + diff --git a/stratum/config.sample/geek.conf b/stratum/config.sample/geek.conf new file mode 100644 index 000000000..ffdbe4bd5 --- /dev/null +++ b/stratum/config.sample/geek.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 3691 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = geek +difficulty = 0.001 +max_ttf = 4000000 + diff --git a/stratum/config.sample/lyra2vc0ban.conf b/stratum/config.sample/lyra2vc0ban.conf new file mode 100644 index 000000000..d300580ae --- /dev/null +++ b/stratum/config.sample/lyra2vc0ban.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 4563 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = lyra2vc0ban +difficulty = 1 +max_ttf = 40000 + diff --git a/stratum/config.sample/lyra2z330.conf b/stratum/config.sample/lyra2z330.conf new file mode 100644 index 000000000..4ad7a391e --- /dev/null +++ b/stratum/config.sample/lyra2z330.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 3000 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = lyra2z330 +difficulty = 0.0001 +max_ttf = 40000 + diff --git a/stratum/config.sample/renesis.conf b/stratum/config.sample/renesis.conf new file mode 100644 index 000000000..7bac3e586 --- /dev/null +++ b/stratum/config.sample/renesis.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 5252 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = renesis +difficulty = 1 +max_ttf = 400000000 diff --git a/stratum/sha3/makefile b/stratum/sha3/makefile index f2bd096cd..0d548ec39 100644 --- a/stratum/sha3/makefile +++ b/stratum/sha3/makefile @@ -5,9 +5,9 @@ CFLAGS= -O3 -march=native LDFLAGS=-O2 SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ - sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c \ - sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ - blake2s.c blake2b.c sha2.c sph_sm3.c + sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c sph_sm3.c sph_streebog.c \ + sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c \ + blake2s.c OBJECTS=$(SOURCES:.c=.o) OUTPUT=libhash.a diff --git a/stratum/sha3/makefile.bak b/stratum/sha3/makefile.bak new file mode 100644 index 000000000..f2bd096cd --- /dev/null +++ b/stratum/sha3/makefile.bak @@ -0,0 +1,33 @@ + +CC=gcc + +CFLAGS= -O3 -march=native +LDFLAGS=-O2 + +SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ + sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c \ + sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ + blake2s.c blake2b.c sha2.c sph_sm3.c + +OBJECTS=$(SOURCES:.c=.o) +OUTPUT=libhash.a + +all: $(SOURCES) $(OUTPUT) + +$(OUTPUT): $(OBJECTS) + ar rc $@ $(OBJECTS) + touch ../stratum.cpp + +.cpp.o: + $(CC) $(CFLAGS) -c $< + +.c.o: + $(CC) $(CFLAGS) -c $< + +blake2s.o: blake2s.c + $(CC) $(CFLAGS) -std=gnu99 -c $< + +clean: + rm *.o + + diff --git a/stratum/util.cpp b/stratum/util.cpp index 92f284a80..13adcdd2f 100644 --- a/stratum/util.cpp +++ b/stratum/util.cpp @@ -558,6 +558,31 @@ uint64_t decode_compact(const char *input) return v; } +uint64_t sharetotarg(double diff) +{ + int i, shift = 29; + unsigned char targ[32]; + for (i=0; i<32; i++) + targ[i]=0; + double ftarg = (double)0x0000ffff / diff; + while (ftarg < (double)0x00008000) { + shift--; + ftarg *= 256.0; + } + while (ftarg >= (double)0x00800000) { + shift++; + ftarg /= 256.0; + } + uint32_t nBits = (int)ftarg + (shift << 24); + shift = (nBits >> 24) & 0x00ff; + nBits &= 0x00FFFFFF; + targ[shift - 1] = nBits >> 16; + targ[shift - 2] = nBits >> 8; + targ[shift - 3] = nBits; + uint64_t starget = * (uint64_t *) &targ[24]; + return (starget); +} + //def uint256_from_compact(c): // c = int(c) // nbytes = (c >> 24) & 0xFF diff --git a/stratum/util.cpp.bak b/stratum/util.cpp.bak new file mode 100644 index 000000000..92f284a80 --- /dev/null +++ b/stratum/util.cpp.bak @@ -0,0 +1,771 @@ + +#include "stratum.h" +#include +#include + +//////////////////////////////////////////////////////////////////////////////// + +bool json_get_bool(json_value *json, const char *name) +{ + for(int i=0; iu.object.length; i++) + { + if(!strcmp(json->u.object.values[i].name, name)) + return json->u.object.values[i].value->u.boolean; + } + + return false; +} + +json_int_t json_get_int(json_value *json, const char *name) +{ + for(int i=0; iu.object.length; i++) + { + if(!strcmp(json->u.object.values[i].name, name)) + return json->u.object.values[i].value->u.integer; + } + + return 0; +} + +double json_get_double(json_value *json, const char *name) +{ + for(int i=0; iu.object.length; i++) + { + if(!strcmp(json->u.object.values[i].name, name)) + return json->u.object.values[i].value->u.dbl; + } + + return 0; +} + +const char *json_get_string(json_value *json, const char *name) +{ + for(int i=0; iu.object.length; i++) + { + if(!strcmp(json->u.object.values[i].name, name)) + return json->u.object.values[i].value->u.string.ptr; + } + + return NULL; +} + +json_value *json_get_array(json_value *json, const char *name) +{ + for(int i=0; iu.object.length; i++) + { +// if(json->u.object.values[i].value->type == json_array && !strcmp(json->u.object.values[i].name, name)) + if(!strcmp(json->u.object.values[i].name, name)) + return json->u.object.values[i].value; + } + + return NULL; +} + +//json_value *json_get_array_from_array(json_value *json, const char *name) +//{ +// for(int i=0; iu.array.length; i++) +// { +// if(!strcmp(json->u.array.values[i].name, name)) +// return json->u.array.values[i].value; +// } +// +// return NULL; +//} + +json_value *json_get_object(json_value *json, const char *name) +{ + for(int i=0; iu.object.length; i++) + { + if(!strcmp(json->u.object.values[i].name, name)) + return json->u.object.values[i].value; + } + + return NULL; +} + +/////////////////////////////////////////////////////////////////////////////////////////////// + +FILE *g_debuglog = NULL; +FILE *g_stratumlog = NULL; +FILE *g_clientlog = NULL; +FILE *g_rejectlog = NULL; + +void initlog(const char *algo) +{ + char debugfile[1024]; + + sprintf(debugfile, "%s.log", algo); + g_debuglog = fopen(debugfile, "w"); + + g_stratumlog = fopen("stratum.log", "a"); + g_clientlog = fopen("client.log", "a"); + g_rejectlog = fopen("reject.log", "a"); +} + +void closelogs() +{ + if (g_debuglog) { + fflush(g_debuglog); fclose(g_debuglog); + } + if (g_stratumlog) { + fflush(g_stratumlog); fclose(g_stratumlog); + } + if (g_clientlog) { + fflush(g_clientlog); fclose(g_clientlog); + } + if (g_rejectlog) { + fflush(g_rejectlog); fclose(g_rejectlog); + } +} + +void clientlog(YAAMP_CLIENT *client, const char *format, ...) +{ + char buffer[YAAMP_SMALLBUFSIZE]; + va_list args; + + va_start(args, format); + vsprintf(buffer, format, args); + va_end(args); + + time_t rawtime; + struct tm * timeinfo; + char buffer2[80]; + + time(&rawtime); + timeinfo = localtime(&rawtime); + + strftime(buffer2, 80, "%Y-%m-%d %H:%M:%S", timeinfo); + + char buffer3[YAAMP_SMALLBUFSIZE]; + sprintf(buffer3, "%s [%s] %s, %s, %s\n", buffer2, client->sock->ip, client->username, g_current_algo->name, buffer); + + printf("%s", buffer3); + if(g_debuglog) + { + fprintf(g_debuglog, "%s", buffer3); + fflush(g_debuglog); + } + + if(g_clientlog) + { + fprintf(g_clientlog, "%s", buffer3); + if (fflush(g_clientlog) == EOF) { + // reopen if wiped + fclose(g_clientlog); + g_clientlog = fopen("client.log", "a"); + } + } +} + +void debuglog(const char *format, ...) +{ + char buffer[YAAMP_SMALLBUFSIZE]; + va_list args; + + va_start(args, format); + vsprintf(buffer, format, args); + va_end(args); + + time_t rawtime; + struct tm * timeinfo; + char buffer2[80]; + + time(&rawtime); + timeinfo = localtime(&rawtime); + + strftime(buffer2, 80, "%H:%M:%S", timeinfo); + printf("%s: %s", buffer2, buffer); + + if(g_debuglog) + { + fprintf(g_debuglog, "%s: %s", buffer2, buffer); + fflush(g_debuglog); + } +} + +void debuglog_hex(void *data, int len) +{ + uint8_t* const bin = (uint8_t*) data; + char *hex = (char*) calloc(1, len*2 + 2); + if (!hex) return; + for(int i=0; i < len; i++) + sprintf(hex+strlen(hex), "%02x", bin[i]); + strcpy(hex+strlen(hex), "\n"); + debuglog(hex); + free(hex); +} + +void stratumlog(const char *format, ...) +{ + char buffer[YAAMP_SMALLBUFSIZE]; + va_list args; + + va_start(args, format); + vsprintf(buffer, format, args); + va_end(args); + + time_t rawtime; + struct tm * timeinfo; + char buffer2[80]; + + time(&rawtime); + timeinfo = localtime(&rawtime); + + strftime(buffer2, 80, "%H:%M:%S", timeinfo); + printf("%s: %s", buffer2, buffer); + + if(g_debuglog) + { + fprintf(g_debuglog, "%s: %s", buffer2, buffer); + fflush(g_debuglog); + } + + if(g_stratumlog) + { + fprintf(g_stratumlog, "%s: %s", buffer2, buffer); + if (fflush(g_stratumlog) == EOF) { + fclose(g_stratumlog); + g_stratumlog = fopen("stratum.log", "a"); + } + } +} + +void stratumlogdate(const char *format, ...) +{ + char buffer[YAAMP_SMALLBUFSIZE]; + char date[16]; + va_list args; + time_t rawtime; + struct tm * timeinfo; + + time(&rawtime); + timeinfo = localtime(&rawtime); + strftime(date, 16, "%Y-%m-%d", timeinfo); + + va_start(args, format); + vsprintf(buffer, format, args); + va_end(args); + + stratumlog("%s %s", date, buffer); +} + +void rejectlog(const char *format, ...) +{ + char buffer[YAAMP_SMALLBUFSIZE]; + va_list args; + + va_start(args, format); + vsnprintf(buffer, YAAMP_SMALLBUFSIZE-1, format, args); + va_end(args); + + time_t rawtime; + struct tm * timeinfo; + char buffer2[80]; + + time(&rawtime); + timeinfo = localtime(&rawtime); + + strftime(buffer2, 80, "%Y-%m-%d %H:%M:%S", timeinfo); + printf("%s: %s", buffer2, buffer); + + if(g_rejectlog) + { + fprintf(g_rejectlog, "%s: %s", buffer2, buffer); + if (fflush(g_rejectlog) == EOF) { + fclose(g_rejectlog); + g_rejectlog = fopen("reject.log", "a"); + } + } +} + + +bool yaamp_error(char const *message) +{ + debuglog("ERROR: %d %s\n", errno, message); + closelogs(); + exit(1); +} + +void yaamp_create_mutex(pthread_mutex_t *mutex) +{ + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(mutex, &attr); + + pthread_mutexattr_destroy(&attr); +} + +const char *header_value(const char *data, const char *search, char *value) +{ + value[0] = 0; + + char *p = (char *)strstr(data, search); + if(!p) return value; + + p += strlen(search); + while(*p == ' ' || *p == ':') p++; + + char *p2 = (char *)strstr(p, "\r\n"); + if(!p2) + { + strncpy(value, p, 1024); + return value; + } + + strncpy(value, p, min(1024, p2 - p)); + value[min(1023, p2 - p)] = 0; + + return value; +} + +//////////////////////////////////////////////////////////////////////////////////////////// + +const unsigned char g_base64_tab[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +void base64_encode(char *base64, const char *normal) +{ + int cb = strlen((char *)normal); + while(cb >= 3) + { + unsigned char b0 = ((normal[0] >> 2) & 0x3F); + unsigned char b1 = ((normal[0] & 0x03) << 4) | ((normal[1] >> 4) & 0x0F); + unsigned char b2 = ((normal[1] & 0x0F) << 2) | ((normal[2] >> 6) & 0x03); + unsigned char b3 = ((normal[2] & 0x3F)); + + *base64++ = g_base64_tab[b0]; + *base64++ = g_base64_tab[b1]; + *base64++ = g_base64_tab[b2]; + *base64++ = g_base64_tab[b3]; + + normal += 3; + cb -= 3; + } + + if(cb == 1) + { + unsigned char b0 = ((normal[0] >> 2) & 0x3F); + unsigned char b1 = ((normal[0] & 0x03) << 4) | 0; + + *base64++ = g_base64_tab[b0]; + *base64++ = g_base64_tab[b1]; + + *base64++ = '='; + *base64++ = '='; + } + else if(cb == 2) + { + unsigned char b0 = ((normal[0] >> 2) & 0x3F); + unsigned char b1 = ((normal[0] & 0x03) << 4) | ((normal[1] >> 4) & 0x0F); + unsigned char b2 = ((normal[1] & 0x0F) << 2) | 0; + + *base64++ = g_base64_tab[b0]; + *base64++ = g_base64_tab[b1]; + *base64++ = g_base64_tab[b2]; + *base64++ = '='; + } + + *base64 = 0; +} + +void base64_decode(char *normal, const char *base64) +{ + int i; + + unsigned char decoding_tab[256]; + memset(decoding_tab, 255, 256); + + for(i = 0; i < 64; i++) + decoding_tab[g_base64_tab[i]] = i; + + unsigned long current = 0; + int bit_filled = 0; + + for(i = 0; base64[i]; i++) + { + if(base64[i] == 0x0A || base64[i] == 0x0D || base64[i] == 0x20 || base64[i] == 0x09) + continue; + + if(base64[i] == '=') + break; + + unsigned char digit = decoding_tab[base64[i]]; + + current <<= 6; + current |= digit; + bit_filled += 6; + + if(bit_filled >= 8) + { + unsigned long b = (current >> (bit_filled - 8)); + + *normal++ = (unsigned char)(b & 0xFF); + bit_filled -= 8; + } + } + + *normal = 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////////// + +void hexlify(char *hex, const unsigned char *bin, int len) +{ + hex[0] = 0; + for(int i=0; i < len; i++) + sprintf(hex+strlen(hex), "%02x", bin[i]); +} + +bool ishexa(char *hex, int len) +{ + for(int i=0; i= '0' && v <= '9') + return v-'0'; + + if(v >= 'a' && v <= 'f') + return v-'a'+10; + + return 0; +} + +void binlify(unsigned char *bin, const char *hex) +{ + int len = strlen(hex); + for(int i=0; i 127) + { + s[s[0]] = n % 256; + n /= 256; + s[0]++; + } + + s[s[0]] = n; + a[0] = 0; + + for(int i=0; i<=s[0]; i++) + { + char tmp[32]; + sprintf(tmp, "%02x", s[i]); + strcat(a, tmp); + } + +// printf("ser_number %d, %s\n", n, a); +} + +void ser_string_be(const char *input, char *output, int len) +{ + for(int i=0; idiff_multiplier/difficulty; + return t; +} + +double target_to_diff(uint64_t target) +{ + if(!target) return 0; + + double d = (double)0x0000ffff00000000/target; + return d; +} + +uint64_t decode_compact(const char *input) +{ + uint64_t c = htoi64(input); + + int nShift = (c >> 24) & 0xff; + double d = (double)0x0000ffff / (double)(c & 0x00ffffff); + + while (nShift < 29) + { + d *= 256.0; + nShift++; + } + + while (nShift > 29) + { + d /= 256.0; + nShift--; + } + + uint64_t v = 0x0000ffff00000000/d; +// debuglog("decode_compact %s -> %f -> %016llx\n", input, d, v); + +// int nbytes = (c >> 24) & 0xFF; +// +// nbytes -= 25; +// v = (c & 0xFFFFFF) << (8 * nbytes); +// +// debuglog("decode_compact %s -> %016llx\n", input, v); + return v; +} + +//def uint256_from_compact(c): +// c = int(c) +// nbytes = (c >> 24) & 0xFF +// v = (c & 0xFFFFFFL) << (8 * (nbytes - 3)) +// return v + +uint64_t get_hash_difficulty(unsigned char *input) +{ + unsigned char *p = (unsigned char *)input; + + uint64_t v = + (uint64_t)p[29] << 56 | + (uint64_t)p[28] << 48 | + (uint64_t)p[27] << 40 | + (uint64_t)p[26] << 32 | + (uint64_t)p[25] << 24 | + (uint64_t)p[24] << 16 | + (uint64_t)p[23] << 8 | + (uint64_t)p[22] << 0; + +// char toto[1024]; +// hexlify(toto, input, 32); +// debuglog("hash diff %s %016llx\n", toto, v); + return v; +} + +unsigned int htoi(const char *s) +{ + unsigned int val = 0; + int x = 0; + + if(s[x] == '0' && (s[x+1] == 'x' || s[x+1] == 'X')) + x += 2; + + while(s[x]) + { + if(val > UINT_MAX) + return 0; + + else if(s[x] >= '0' && s[x] <='9') + val = val * 16 + s[x] - '0'; + + else if(s[x]>='A' && s[x] <='F') + val = val * 16 + s[x] - 'A' + 10; + + else if(s[x]>='a' && s[x] <='f') + val = val * 16 + s[x] - 'a' + 10; + + else + return 0; + + x++; + } + + return val; +} + +uint64_t htoi64(const char *s) +{ + uint64_t val = 0; + int x = 0; + + if(s[x] == '0' && (s[x+1] == 'x' || s[x+1] == 'X')) + x += 2; + + while(s[x]) + { + if(val > ULLONG_MAX) + return 0; + + else if(s[x] >= '0' && s[x] <='9') + val = val * 16 + s[x] - '0'; + + else if(s[x]>='A' && s[x] <='F') + val = val * 16 + s[x] - 'A' + 10; + + else if(s[x]>='a' && s[x] <='f') + val = val * 16 + s[x] - 'a' + 10; + + else + return 0; + + x++; + } + + return val; +} + +#if 0 +// gettimeofday seems deprecated in POSIX +long long current_timestamp() +{ + long long milliseconds; + struct timeval te; + + gettimeofday(&te, NULL); + + milliseconds = te.tv_sec*1000LL + te.tv_usec/1000; + return milliseconds; +} +#else +long long current_timestamp() +{ + long long milliseconds; + struct timespec te; + + clock_gettime(CLOCK_REALTIME, &te); + + milliseconds = 1000LL*te.tv_sec + round(te.tv_nsec/1e6); + return milliseconds; +} +#endif + +long long current_timestamp_dms() // allow 0.1 ms time +{ + long long dms; + struct timespec te; + + clock_gettime(CLOCK_REALTIME, &te); + + dms = 10000LL*te.tv_sec + round(te.tv_nsec/1e5); + return dms; +} + +int opened_files() +{ + int fds = 0; + DIR *d = opendir("/proc/self/fd"); + if (d) { + while (readdir(d)) fds++; + closedir(d); + } + return fds; +} + +int resident_size() +{ + int sz, res = 0; + FILE *fp = fopen("/proc/self/statm", "r"); + if (fp) { + int p = fscanf(fp, "%d", &sz); + if (p) p += fscanf(fp, "%d", &res); + fclose(fp); + } + return res; +} + +void string_lower(char *s) +{ + for(int i = 0; s[i]; i++) + s[i] = tolower(s[i]); +} + +void string_upper(char *s) +{ + for(int i = 0; s[i]; i++) + s[i] = toupper(s[i]); +} + + +////////////////////////////////////////////////////////////////////////////////////// + +int getblocheight(const char *coinb1) +{ + unsigned char coinb1_bin[1024]; + binlify(coinb1_bin, coinb1); + + int height = 0; + uint8_t hlen = 0, *p, *m; + + // find 0xffff tag + p = (uint8_t*)coinb1_bin + 32; + m = p + 128; + while (*p != 0xff && p < m) p++; + while (*p == 0xff && p < m) p++; + + if (*(p-1) == 0xff && *(p-2) == 0xff) + { + p++; hlen = *p; + p++; height = le16dec(p); + p += 2; + switch (hlen) + { + case 4: + height += 0x10000UL * le16dec(p); + break; + case 3: + height += 0x10000UL * (*p); + break; + } + } + + return height; +} + +void sha256_double_hash_hex(const char *input, char *output, unsigned int len) +{ + char output1[32]; + + sha256_double_hash(input, output1, len); + hexlify(output, (unsigned char *)output1, 32); +} + +void sha256_hash_hex(const char *input, char *output, unsigned int len) +{ + char output1[32]; + + sha256_hash(input, output1, len); + hexlify(output, (unsigned char *)output1, 32); +} + diff --git a/stratum/util.h b/stratum/util.h index bf57bfd27..3cf1d801a 100644 --- a/stratum/util.h +++ b/stratum/util.h @@ -96,6 +96,7 @@ unsigned int htoi(const char *s); uint64_t htoi64(const char *s); uint64_t decode_compact(const char *input); +uint64_t sharetotarg(double diff); uint64_t diff_to_target(double difficulty); double target_to_diff(uint64_t target); diff --git a/stratum/util.h.bak b/stratum/util.h.bak new file mode 100644 index 000000000..bf57bfd27 --- /dev/null +++ b/stratum/util.h.bak @@ -0,0 +1,139 @@ + +struct YAAMP_CLIENT; + +struct COMMONLISTITEM +{ + void *data; + + struct COMMONLISTITEM *next; + struct COMMONLISTITEM *prev; +}; + +typedef COMMONLISTITEM *CLI; + +typedef void (*LISTFREEPARAM)(void *); + +class CommonList +{ +public: + CommonList(); + ~CommonList(); + + CLI AddHead(void *data); + CLI AddTail(void *data); + + void Delete(CLI item); + void Delete(void *data); + + void DeleteAll(LISTFREEPARAM freeparam); + + CLI Find(void *data); + void Swap(CLI i1, CLI i2); + + void Enter(); + void Leave(); + + pthread_mutex_t mutex; + int count; + + CLI first; + CLI last; +}; + +void CommonLock(pthread_mutex_t *mutex); +void CommonUnlock(pthread_mutex_t *mutex); + +////////////////////////////////////////////////////////////////////////// + +bool json_get_bool(json_value *json, const char *name); +json_int_t json_get_int(json_value *json, const char *name); +double json_get_double(json_value *json, const char *name); +const char *json_get_string(json_value *json, const char *name); +json_value *json_get_array(json_value *json, const char *name); +json_value *json_get_object(json_value *json, const char *name); + +void yaamp_create_mutex(pthread_mutex_t *mutex); +bool yaamp_error(char const *message); + +const char *header_value(const char *data, const char *search, char *value); + +void initlog(const char *algo); +void closelogs(); + +void debuglog(const char *format, ...); +void stratumlog(const char *format, ...); +void stratumlogdate(const char *format, ...); +void clientlog(YAAMP_CLIENT *client, const char *format, ...); +void rejectlog(const char *format, ...); + +////////////////////////////////////////////////////////////////////////// + +vector merkle_steps(vector input); +string merkle_with_first(vector steps, string f); + +////////////////////////////////////////////////////////////////////////// + +bool base58_decode(const char *input, char *output); +bool is_base58(char *input); + +void base64_encode(char *base64, const char *normal); +void base64_decode(char *normal, const char *base64); + +void ser_number(int n, char *s); + +void ser_string_be(const char *input, char *output, int len); +void ser_string_be2(const char *input, char *output, int len); + +void string_be(const char *input, char *output); +void string_be1(char *s); + +bool ishexa(char *hex, int len); + +void hexlify(char *hex, const unsigned char *bin, int len); +void binlify(unsigned char *bin, const char *hex); + +unsigned int htoi(const char *s); +uint64_t htoi64(const char *s); + +uint64_t decode_compact(const char *input); + +uint64_t diff_to_target(double difficulty); +double target_to_diff(uint64_t target); + +uint64_t get_hash_difficulty(unsigned char *input); + +long long current_timestamp(); +long long current_timestamp_dms(); + +int opened_files(); +int resident_size(); + +void string_lower(char *s); +void string_upper(char *s); + +int getblocheight(const char *coinb1); + +////////////////////////////////////////////////////////////////////////// + +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +////////////////////////////////////////////////////////////////////////// + +#if !HAVE_DECL_LE16DEC +static inline uint16_t le16dec(const void *pp) +{ + const uint8_t *p = (uint8_t const *)pp; + return ((uint16_t)(p[0]) + ((uint16_t)(p[1]) << 8)); +} +#endif + +static inline uint32_t bswap32(uint32_t x) { + __asm__ __volatile__ ("bswapl %0" : "=r" (x) : "0" (x)); + return x; +} From 623abcccb474770f5efe2abfe45cba7ec48a1099 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Feb 2019 01:22:54 -0500 Subject: [PATCH 370/576] Update makefile --- stratum/sha3/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/sha3/makefile b/stratum/sha3/makefile index 0d548ec39..83363eba4 100644 --- a/stratum/sha3/makefile +++ b/stratum/sha3/makefile @@ -6,7 +6,7 @@ LDFLAGS=-O2 SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c sph_sm3.c sph_streebog.c \ - sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c \ + sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ blake2s.c OBJECTS=$(SOURCES:.c=.o) From 1d3546fa3bd8919256880aec0c2135afd5164f1f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 21 Feb 2019 12:20:01 -0500 Subject: [PATCH 371/576] Update bcd.conf --- stratum/config.sample/bcd.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stratum/config.sample/bcd.conf b/stratum/config.sample/bcd.conf index 5c519cea3..3905a9127 100644 --- a/stratum/config.sample/bcd.conf +++ b/stratum/config.sample/bcd.conf @@ -1,13 +1,13 @@ [TCP] server = localhost port = 3643 -password = 1EsoTW0Gk26QuNVnxDynSthw8aBtX5JE +password = * [SQL] host = localhost -database = yiimpfrontend -username = stratum -password = LZPZjREHtgcLelOKJfWMSlyz5CibnLKv +database = * +username = * +password = * [STRATUM] algo = bcd From b287f47e14d98b1e96aba2fc89c8452003ed3600 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 21 Feb 2019 12:21:23 -0500 Subject: [PATCH 372/576] Update bcd.conf --- stratum/config.sample/bcd.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stratum/config.sample/bcd.conf b/stratum/config.sample/bcd.conf index 3905a9127..f258754e6 100644 --- a/stratum/config.sample/bcd.conf +++ b/stratum/config.sample/bcd.conf @@ -1,16 +1,16 @@ [TCP] -server = localhost +server = yaamp.com port = 3643 -password = * +password = tu8tu5 [SQL] -host = localhost -database = * -username = * -password = * +host = yaampdb +database = yaamp +username = root +password = patofpaq [STRATUM] -algo = bcd -difficulty = 0.1 +algo = binarium-v1 +difficulty = 0.01 max_ttf = 4000000 From ba871dfdc1c9fc2312b29e562e737cccfe189002 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 21 Feb 2019 12:24:55 -0500 Subject: [PATCH 373/576] Delete bcd.conf --- stratum/config.sample/bcd.conf | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 stratum/config.sample/bcd.conf diff --git a/stratum/config.sample/bcd.conf b/stratum/config.sample/bcd.conf deleted file mode 100644 index f258754e6..000000000 --- a/stratum/config.sample/bcd.conf +++ /dev/null @@ -1,16 +0,0 @@ -[TCP] -server = yaamp.com -port = 3643 -password = tu8tu5 - -[SQL] -host = yaampdb -database = yaamp -username = root -password = patofpaq - -[STRATUM] -algo = binarium-v1 -difficulty = 0.01 -max_ttf = 4000000 - From e4013c519f61a52fa6304e5b5559a3461d9d3f7a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 21 Feb 2019 12:25:07 -0500 Subject: [PATCH 374/576] Create bcd.conf --- stratum/config.sample/bcd.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stratum/config.sample/bcd.conf diff --git a/stratum/config.sample/bcd.conf b/stratum/config.sample/bcd.conf new file mode 100644 index 000000000..046274911 --- /dev/null +++ b/stratum/config.sample/bcd.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 3643 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = binarium-v1 +difficulty = 0.01 +max_ttf = 4000000 From 2c0b398ba1b28f1b8b6dc810523c391db096a16a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 21 Feb 2019 15:22:06 -0500 Subject: [PATCH 375/576] Update payment.php --- web/yaamp/core/backend/payment.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/yaamp/core/backend/payment.php b/web/yaamp/core/backend/payment.php index b3704ea95..ae4777e10 100644 --- a/web/yaamp/core/backend/payment.php +++ b/web/yaamp/core/backend/payment.php @@ -102,9 +102,17 @@ function BackendCoinPayments($coin) $total_to_pay = 0; $addresses = array(); + + if($coin->symbol == 'MBC') foreach($users as $user) { - $total_to_pay += round($user->balance, 8); + $total_to_pay -= round($user->balance, 4); + $addresses[$user->username] = round($user->balance, 4); + } + else + foreach($users as $user) + { + $total_to_pay -= round($user->balance, 8); $addresses[$user->username] = round($user->balance, 8); // transaction xxx has too many sigops: 1035 > 1000 if ($coin->symbol == 'DCR' && count($addresses) > 990) { From f43403980bff0bddce1bb5b9c111213e79304878 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 21 Feb 2019 15:26:46 -0500 Subject: [PATCH 376/576] Update payment.php --- web/yaamp/core/backend/payment.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/backend/payment.php b/web/yaamp/core/backend/payment.php index ae4777e10..ec05664b6 100644 --- a/web/yaamp/core/backend/payment.php +++ b/web/yaamp/core/backend/payment.php @@ -65,6 +65,9 @@ function BackendCoinPayments($coin) while($user->balance > $min_payout && $amount > $min_payout) { debuglog("$coin->symbol sendtoaddress $user->username $amount"); + if($coin->symbol == 'MBC') + $tx = $remote->sendtoaddress($user->username, round($amount, 4)); + else $tx = $remote->sendtoaddress($user->username, round($amount, 8)); if(!$tx) { From 467507cf3aa5f4b439ba37a1735e510faf23b577 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Fri, 22 Feb 2019 02:18:54 -0500 Subject: [PATCH 377/576] small updates --- stratum/algos/lyra2v3.c | 1 + stratum/algos/lyra2v3.c.bak | 67 +++ stratum/coinbase.cpp | 36 -- stratum/coinbase.cpp.bak | 1058 +++++++++++++++++++++++++++++++++++ 4 files changed, 1126 insertions(+), 36 deletions(-) create mode 100644 stratum/algos/lyra2v3.c.bak create mode 100644 stratum/coinbase.cpp.bak diff --git a/stratum/algos/lyra2v3.c b/stratum/algos/lyra2v3.c index 2dd27625e..ece25e762 100644 --- a/stratum/algos/lyra2v3.c +++ b/stratum/algos/lyra2v3.c @@ -65,3 +65,4 @@ void lyra2v3_hash(const char* input, char* output, uint32_t len) memcpy(output, hash, 32); } + diff --git a/stratum/algos/lyra2v3.c.bak b/stratum/algos/lyra2v3.c.bak new file mode 100644 index 000000000..2dd27625e --- /dev/null +++ b/stratum/algos/lyra2v3.c.bak @@ -0,0 +1,67 @@ +/*- + * Copyright(or left) 2019 YiiMP + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ + +#include +#include +#include +#include + +#include "../sha3/sph_blake.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_bmw.h" + +#include "Lyra2.h" + +void lyra2v3_hash(const char* input, char* output, uint32_t len) +{ + uint32_t hash[8], hashB[8]; + + sph_blake256_context ctx_blake; + sph_cubehash256_context ctx_cubehash; + sph_bmw256_context ctx_bmw; + + sph_blake256_set_rounds(14); + + sph_blake256_init(&ctx_blake); + sph_blake256(&ctx_blake, input, len); /* 80 */ + sph_blake256_close(&ctx_blake, hash); + + LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); + + sph_cubehash256_init(&ctx_cubehash); + sph_cubehash256(&ctx_cubehash, hashB, 32); + sph_cubehash256_close(&ctx_cubehash, hash); + + LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); + + sph_bmw256_init(&ctx_bmw); + sph_bmw256(&ctx_bmw, hashB, 32); + sph_bmw256_close(&ctx_bmw, hash); + + memcpy(output, hash, 32); +} diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 9966e887d..81f89bfce 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -309,42 +309,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } } - - // 2 txs are required on these coins, one for foundation (dev fees) - if(coind->charity_percent && !coind->hasmasternodes) - { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - if (charity_amount <= 0) - charity_amount = (available * coind->charity_percent) / 100; - - available -= charity_amount; - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) { diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak new file mode 100644 index 000000000..9966e887d --- /dev/null +++ b/stratum/coinbase.cpp.bak @@ -0,0 +1,1058 @@ + +// http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html + +// https://en.bitcoin.it/wiki/Merged_mining_specification#Merged_mining_coinbase + +#include "stratum.h" + +#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) + +static void encode_tx_value(char *encoded, json_int_t value) +{ + sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", + TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), + TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); +} + +static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(payee) >> 1) & 0xFF, payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + encode_tx_value(evalue, amount); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + +static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) +{ + int ol = strlen(data); + char evalue[32]; + + if(coind->p2sh_address && !key) { + p2sh_pack_tx(coind, data, amount, coind->script_pubkey); + return; + } + + encode_tx_value(evalue, amount); + sprintf(data+strlen(data), "%s", evalue); + + if(coind->pos && !key) + sprintf(data+strlen(data), "2321%sac", coind->pubkey); + + else + sprintf(data+strlen(data), "1976a914%s88ac", key? key: coind->script_pubkey); + +// debuglog("pack tx %s\n", data+ol); +// debuglog("pack tx %lld\n", amount); +} + +void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) +{ + vector hashlist = coind_aux_hashlist(templ->auxs, templ->auxs_size); + while(hashlist.size() > 1) + { + vector l; + for(int i = 0; i < hashlist.size()/2; i++) + { + string s = hashlist[i*2] + hashlist[i*2+1]; + + char bin[YAAMP_HASHLEN_BIN*2]; + char out[YAAMP_HASHLEN_STR]; + + binlify((unsigned char *)bin, s.c_str()); + sha256_double_hash_hex(bin, out, YAAMP_HASHLEN_BIN*2); + + l.push_back(out); + } + + hashlist = l; + } + + char merkle_hash[4*1024]; + memset(merkle_hash, 0, 4*1024); + string_be(hashlist[0].c_str(), merkle_hash); + + sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); +// debuglog("aux_script is %s\n", aux_script); +} + +void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) +{ + char eheight[32], etime[32]; + char entime[32] = { 0 }; + char commitment[128] = { 0 }; + + ser_number(templ->height, eheight); + ser_number(time(NULL), etime); + if(coind->pos) ser_string_be(templ->ntime, entime, 1); + + char eversion1[32] = "01000000"; + if(coind->txmessage) + strcpy(eversion1, "02000000"); + + char script1[4*1024]; + sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); + + char script2[32] = "7969696d7000"; // "yiimp\0" in hex ascii + + if(!coind->pos && !coind->isaux && templ->auxs_size) + coinbase_aux(templ, script2); + + int script_len = strlen(script1)/2 + strlen(script2)/2 + 8; + sprintf(templ->coinb1, "%s%s01" + "0000000000000000000000000000000000000000000000000000000000000000" + "ffffffff%02x%s", eversion1, entime, script_len, script1); + + sprintf(templ->coinb2, "%s00000000", script2); + + // segwit commitment, if needed + if (templ->has_segwit_txs) + sprintf(commitment, "0000000000000000%02x%s", (int) (strlen(coind->commitment)/2), coind->commitment); + + json_int_t available = templ->value; + + // sample coins using mandatory dev/foundation fees + if(strcmp(coind->symbol, "EGC") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 2; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); + } + else if(strcmp(coind->symbol, "DYN") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[3]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool dynode_enabled; + dynode_enabled = json_get_bool(json_result, "dynode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* dynode; + dynode = json_get_object(json_result, "dynode"); + if(!dynode && json_get_bool(json_result, "dynode_payments")) { + coind->oldmasternodes = true; + debuglog("%s is using old dynodes rpc keys\n", coind->symbol); + return; + } + + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock found %s %u\n", coind->symbol, payee, amount); + } + } + } + if (dynode_enabled && dynode) { + bool started; + started = json_get_bool(json_result, "dynode_payments_started"); + const char *payee = json_get_string(dynode, "payee"); + json_int_t amount = json_get_int(dynode, "amount"); + if (!payee) + debuglog("coinbase_create failed to get Dynode payee\n"); + + if (!amount) + debuglog("coinbase_create failed to get Dynode amount\n"); + + if (!started) + debuglog("coinbase_create failed to get Dynode started\n"); + + if (payee && amount && started) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s dynode found %s %u\n", coind->symbol, payee, amount); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + else if(strcmp(coind->symbol, "LTCR") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 10; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); + } + else if(strcmp(coind->symbol, "XZC") == 0) { + char script_payee[1024]; + if (coind->charity_percent <= 0) + coind->charity_percent = 25; // wrong coinbase 40 instead of 40 + 10 = 50 + + json_int_t charity_amount = (available * coind->charity_percent) / 100; + + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD"); + + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode(coind->charity_address, script_payee); // may change + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + else if(strcmp("DCR", coind->rpcencoding) == 0) { + coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 + coind->charity_percent = 0; + coind->charity_amount = available; + available *= coind->reward_mul; + if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) + sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); + } + + else if(strcmp(coind->symbol, "BZX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "bznode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "04"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "03"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); + job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); + + base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); + job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); + + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "TUX") == 0) { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "donation_payee"); + if(payee != NULL){ + sprintf(coind->charity_address, "%s", payee); + } else { + sprintf(coind->charity_address, "%s", ""); + } + + if(strlen(coind->charity_address) > 0){ + char script_payee[1024]; + char charity_payee[256] = { 0 }; + sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "donation_amount"); + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + debuglog("pack tx %s\n", coinb2_part); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + } + + // 2 txs are required on these coins, one for foundation (dev fees) + if(coind->charity_percent && !coind->hasmasternodes) + { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + if (charity_amount <= 0) + charity_amount = (available * coind->charity_percent) / 100; + + available -= charity_amount; + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + + else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char script_treasury[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + json_value* masternode = json_get_object(json_result, "masternode"); + json_value* treasury = json_get_object(json_result, "treasury"); + bool treasury_enabled = true; + if(treasury_enabled && treasury) { + const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); + memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); + json_int_t amount = json_get_int(treasury, "amount"); + if (scriptPubKey && amount) { + npayees++; + available -= amount; + job_pack_tx(coind, script_dests, amount, script_treasury); + //debuglog("%s treasury %u\n", coind->symbol, amount); + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "SECI") == 0) { + char script_payee[512] = { 0 }; + char payees[1]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //mainnet + json_int_t charity_amount = 50000000; + sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); + //testnet + //json_int_t charity_amount = 50000000; + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + else if (strcmp(coind->symbol,"XZX") == 0) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + + json_value* subsidyreward = json_get_array(json_result, "subsidy"); + if (subsidyreward) + { + const char *payee = json_get_string(subsidyreward, "address"); + json_int_t amount = json_get_int(subsidyreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + + } + + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + else if(strcmp(coind->symbol, "HXX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "xnode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "05"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + + base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); + job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "STAK") == 0) { + char script_payee[512] = { 0 }; + char payees[4]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + + //treasury 5% @ 10 STAK per block + json_int_t charity_amount = 50000000; + //testnet + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + switch (templ->height % 4) { + case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); + break; + case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); + break; + case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); + break; + case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); + break; + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. + else if (strcmp(coind->symbol, "SMART") == 0) { + char script_payee[512] = { 0 }; + char payees[5]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //treasury 5000 * (143500/Blockheight) per block + int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); + json_int_t charity_amount = coinvalue * 0.95; + int blockRotation = templ->height - 95 * (templ->height/95); + if (blockRotation >= 0 && blockRotation <= 7) { + sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); + } + if (blockRotation >= 8 && blockRotation <= 15) { + sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); + } + if (blockRotation >= 16 && blockRotation <= 23) { + sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); + } + if (blockRotation >= 24 && blockRotation <= 38) { + sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); + } + if (blockRotation >= 39 && blockRotation <= 94) { + sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // 2 txs are required on these coins, one for foundation (dev fees) + if(coind->charity_percent && !coind->hasmasternodes) + { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + if (charity_amount <= 0) + charity_amount = (available * coind->charity_percent) / 100; + + available -= charity_amount; + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + + else if(coind->charity_amount && !strcmp("DCR", coind->rpcencoding)) + { + stratumlog("ERROR %s should not use coinbase (getwork only)!\n", coind->symbol); + coind->reward = (double)available/100000000; + return; + } + + if(strcmp(coind->symbol, "XVC") == 0) + { + char charity_payee[256]; + json_value* incentive = json_get_object(json_result, "incentive"); + if (incentive) { + const char* payee = json_get_string(incentive, "address"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + + bool enforced = json_get_bool(incentive, "enforced"); + json_int_t charity_amount = json_get_int(incentive, "amount"); + if (enforced && charity_amount && strlen(charity_payee)) { + char script_payee[1024]; + base58_decode(charity_payee, script_payee); + + strcat(templ->coinb2, "02"); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->charity_amount = charity_amount; + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("XVC coinbase %ld (+%ld incentive to %s)\n", + // (long) available, (long) charity_amount, charity_payee); + return; + } + } + } + + // most recent masternodes rpc (DASH, SIB, MUE, DSR, GBX...) + if(coind->hasmasternodes && !coind->oldmasternodes) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; // addresses count + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "masternode"); + if(!masternode && json_get_bool(json_result, "masternode_payments")) { + coind->oldmasternodes = true; + debuglog("%s is using old masternodes rpc keys\n", coind->symbol); + return; + } + if(coind->charity_percent) { + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + json_int_t charity_amount = (available * coind->charity_percent) / 100; + npayees++; + available -= charity_amount; + coind->charity_amount = charity_amount; + base58_decode(charity_payee, script_payee); + job_pack_tx(coind, script_dests, charity_amount, script_payee); + } + // smart contracts balance refund, same format as DASH superblocks + json_value* screfund = json_get_array(json_result, "screfund"); + if(screfund && screfund->u.array.length) { + superblocks_enabled = true; + superblock = screfund; + } + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(superblock_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount && started) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ARC") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "goldminenode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ENT") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "eternitynode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "eternitynode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ARC") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "goldminenode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + + else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ + { + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + bool charity_payments = json_get_bool(json_result, "masternode_payments"); + bool charity_enforce = json_get_bool(json_result, "enforce_masternode_payments"); + + if(strcmp(coind->symbol, "CRW") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + bool systemnodes_enabled = json_get_bool(json_result, "enforce_systemnode_payments"); + bool systemnodes = json_get_bool(json_result, "systemnodes"); + bool masternodes = json_get_bool(json_result, "masternodes"); + if(systemnodes_enabled && systemnodes) { + const char *payeeSN = json_get_string(json_result, "payeeSN"); + json_int_t payeeSN_amount = json_get_int(json_result, "payeeSN_amount"); + if (payeeSN && payeeSN_amount) { + npayees++; + available -= payeeSN_amount; + base58_decode(payeeSN, script_payee); + job_pack_tx(coind, script_dests, payeeSN_amount, script_payee); + //debuglog("%s systemnode %s %u\n", coind->symbol, payeeSN, payeeSN_amount); + } + } + if (masternodes_enabled && masternodes) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + if(charity_payments && charity_enforce) + { + char script_payee[256] = { 0 }; + base58_decode(charity_payee, script_payee); + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + node + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); // 2 outputs + } + + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + available -= charity_amount; + + } else { + strcat(templ->coinb2, "01"); + } + } + + else if (templ->has_segwit_txs) { + strcat(templ->coinb2, "02"); + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "01"); + } + + job_pack_tx(coind, templ->coinb2, available, NULL); + + //if(coind->txmessage) + // strcat(templ->coinb2, "00"); + + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; +// debuglog("coinbase %f\n", coind->reward); + +// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); +// debuglog("coinb1 %s\n", templ->coinb1); +// debuglog("coinb2 %s\n", templ->coinb2); +} From d7b7e7489c4ccd0319cdce7d781af3741330878a Mon Sep 17 00:00:00 2001 From: cryptopool Date: Fri, 22 Feb 2019 02:57:10 -0500 Subject: [PATCH 378/576] updates --- stratum/algos/SWIFFTX/inttypes.h | 8 +- stratum/algos/SWIFFTX/inttypes.h.bak | 39 + stratum/algos/SWIFFTX/stdint.h | 2 +- stratum/algos/SWIFFTX/stdint.h.bak | 54 ++ .../binarium_hash_v1/hashing/swifft/setup.c | 2 +- .../hashing/swifft/setup.c.bak | 59 ++ .../binarium_hash_v1/hashing/swifft/swifft.c | 2 +- .../hashing/swifft/swifft.c.bak | 150 ++++ .../hashing/whirlpool/whirlpool.c | 2 +- .../hashing/whirlpool/whirlpool.c.bak | 748 ++++++++++++++++++ web/yaamp/core/backend/rawcoins.php | 16 + web/yaamp/core/backend/rawcoins.php.bak | 551 +++++++++++++ web/yaamp/core/exchange/cryptohub.php | 68 ++ web/yaamp/core/exchange/exchange.php | 3 + web/yaamp/core/exchange/exchange.php.bak | 172 ++++ web/yaamp/core/exchange/tradeogre.php | 55 ++ 16 files changed, 1921 insertions(+), 10 deletions(-) create mode 100644 stratum/algos/SWIFFTX/inttypes.h.bak create mode 100644 stratum/algos/SWIFFTX/stdint.h.bak create mode 100644 stratum/algos/binarium_hash_v1/hashing/swifft/setup.c.bak create mode 100644 stratum/algos/binarium_hash_v1/hashing/swifft/swifft.c.bak create mode 100644 stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.c.bak create mode 100644 web/yaamp/core/backend/rawcoins.php.bak create mode 100644 web/yaamp/core/exchange/cryptohub.php create mode 100644 web/yaamp/core/exchange/exchange.php.bak create mode 100644 web/yaamp/core/exchange/tradeogre.php diff --git a/stratum/algos/SWIFFTX/inttypes.h b/stratum/algos/SWIFFTX/inttypes.h index 2b6b941b7..cb313ae81 100644 --- a/stratum/algos/SWIFFTX/inttypes.h +++ b/stratum/algos/SWIFFTX/inttypes.h @@ -1,14 +1,10 @@ - /* +/* inttypes.h - Contributors: Created by Marek Michalkiewicz - THIS SOFTWARE IS NOT COPYRIGHTED - This source code is offered for use in the public domain. You may use, modify or distribute it freely. - This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to warranties of @@ -36,4 +32,4 @@ //typedef swift_int16_t intptr_t; //typedef swift_uint16_t uintptr_t; - #endif + #endif \ No newline at end of file diff --git a/stratum/algos/SWIFFTX/inttypes.h.bak b/stratum/algos/SWIFFTX/inttypes.h.bak new file mode 100644 index 000000000..2b6b941b7 --- /dev/null +++ b/stratum/algos/SWIFFTX/inttypes.h.bak @@ -0,0 +1,39 @@ + /* + inttypes.h + + Contributors: + Created by Marek Michalkiewicz + + THIS SOFTWARE IS NOT COPYRIGHTED + + This source code is offered for use in the public domain. You may + use, modify or distribute it freely. + + This code is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + DISCLAIMED. This includes but is not limited to warranties of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + #ifndef __INTTYPES_H_ + #define __INTTYPES_H_ + + /* Use [u]intN_t if you need exactly N bits. + XXX - doesn't handle the -mint8 option. */ + + typedef signed char swift_int8_t; + typedef unsigned char swift_uint8_t; + + typedef int swift_int16_t; + typedef unsigned int swift_uint16_t; + + typedef long swift_int32_t; + typedef unsigned long swift_uint32_t; + + typedef long long swift_int64_t; + typedef unsigned long long swift_uint64_t; + + //typedef swift_int16_t intptr_t; + //typedef swift_uint16_t uintptr_t; + + #endif diff --git a/stratum/algos/SWIFFTX/stdint.h b/stratum/algos/SWIFFTX/stdint.h index 59f4cfc93..f6e8070ba 100644 --- a/stratum/algos/SWIFFTX/stdint.h +++ b/stratum/algos/SWIFFTX/stdint.h @@ -51,4 +51,4 @@ typedef unsigned long long int uint_fast64_t;*/ // __END_DECLS #endif -#endif +#endif \ No newline at end of file diff --git a/stratum/algos/SWIFFTX/stdint.h.bak b/stratum/algos/SWIFFTX/stdint.h.bak new file mode 100644 index 000000000..59f4cfc93 --- /dev/null +++ b/stratum/algos/SWIFFTX/stdint.h.bak @@ -0,0 +1,54 @@ +#ifndef _SWIFFT_STDINT_H +#define _SWIFFT_STDINT_H + +/////////////////////////////////////////////////////////////////////////////////////////////// +// +// A note from SWIFFTX implementers: +// +// Although the submission was targeted for Microsoft Visual Studio 2005 compiler, we strived +// to make the code as portable as possible. This is why we preferred to use the types defined +// here, instead of Microsoft-specific types. We compiled the code with gcc to make this sure. +// However, we couldn't use this header as is, due to VS2005 compiler objections. This is why +// we commented out certain defines and clearly marked it. +// To compile our code on gcc you may define SYS_STDINT. +// +/////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef SYS_STDINT + +#include + +#else + +#include "inttypes.h" +// The following was commented out by SWIFFTX implementers: +// __BEGIN_DECLS + +typedef swift_int8_t swifftx_int_least8_t; +typedef swift_int16_t swifftx_int_least16_t; +typedef swift_int32_t swifftx_int_least32_t; +typedef swift_uint8_t swifftx_uint_least8_t; +typedef swift_uint16_t swifftx_uint_least16_t; +typedef swift_uint32_t swifftx_uint_least32_t; + +#ifndef __STRICT_ANSI__ +typedef swift_int64_t swifftx_int_least64_t; +typedef swift_uint64_t swifftx_uint_least64_t; +#endif + +/*typedef signed char int_fast8_t; +typedef signed long int int_fast16_t; +typedef signed long int int_fast32_t; +typedef signed long long int int_fast64_t; + +typedef unsigned char uint_fast8_t; +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long long int uint_fast64_t;*/ + +// The following was commented out by SWIFFTX implementers: +// #include +// __END_DECLS +#endif + +#endif diff --git a/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c b/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c index 1b76a6ba1..01fd785bc 100644 --- a/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c +++ b/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c @@ -56,4 +56,4 @@ void SwiFFT_setupKey(HashKey key) { // Reduce key mod P and initialize keysum #ifdef __cplusplus } /* extern "C" */ -#endif /* __cplusplus */ +#endif /* __cplusplus */ \ No newline at end of file diff --git a/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c.bak b/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c.bak new file mode 100644 index 000000000..1b76a6ba1 --- /dev/null +++ b/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c.bak @@ -0,0 +1,59 @@ +#include "swifft.h" + +SWIFFT_ZN mulTable ALIGN; +SWIFFT_ZW fftTable[1< SWIFFT_P/2) y -= SWIFFT_P; + return y; +} + +int rev(int i, int bound) { // bit reversal permutation + int irev=0; + for(i |= bound; i>1; i>>=1) + irev = (irev<<1) | (i&1); + return irev; +} + +int bit(int x, int b) // extract b-th bit of x +{ return (x >> b) & 1; } + +#ifdef __cplusplus +extern "C" { +#endif + +void SwiFFT_setupTables() { + long omega_pow[2*SWIFFT_N]; // the powers of omega + omega_pow[0] = 1; + for(int i = 1; i < 2*SWIFFT_N; i++) + omega_pow[i] = center(omega_pow[i-1] * OMEGA); + + for (int i=0; i + +#define INLINE inline extern __attribute__((always_inline)) + +INLINE SWIFFT_ZW shift(SWIFFT_ZW x, int s) // x*2^s mod (P=257) +{ return ((x << s) & 255) - (x >> (8-s)); } + +// Reduces mm mod P=257 to the range {-127,383} +INLINE SWIFFT_ZW qReduce(SWIFFT_ZW x) // (x mod 256) - floor(x/256) +{ return (x & 255) - (x >> 8); } + +// Reduces mm mod P=257 to the range {0,..,(P-1)=256} +INLINE SWIFFT_ZW modP(SWIFFT_ZW mm){ + SWIFFT_ZW tmp = qReduce(qReduce(mm)); + return tmp ^ ((tmp == -1) & (-257)); +} + +#define AddSub(a, b) { SWIFFT_ZW tmp = b; b = a - b; a = a + tmp; } + +INLINE void FFT(const BitsN t, SWIFFT_ZN u) { + int i; + SWIFFT_ZN v; + + for (i=0; i> 8); + } + for (int i=0; ikeyval[i][j/SWIFFT_W][j%SWIFFT_W] = _pKeySourceData [ k ]; + //fprintf(stdout, "%i : ", _pKeySourceData [ k ] ); + //fprintf(stdout, "%3d ; ", key->keyval[i][j/SWIFFT_W][j%SWIFFT_W]); + k = k + 1; + } //-for + //fprintf(stdout, "\nswifft.c : SwiFFT_readKey () : %i.\n", k ); + SwiFFT_setupKey(*key); +} + +void SwiFFT_readData(SWIFFT_HashData data, const unsigned char * _pDataSource) { + int k = 0; + + for (int i=0; i + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + * + * Documentation: + * P. S. L. M. Barreto, V. Rijmen, ``The Whirlpool hashing function,'' + * NESSIE submission, 2000 (tweaked version, 2001) + * + * The algorithm is named after the Whirlpool Galaxy in Canes Venatici. + */ + +#include +#include +#include "byte_order.h" +#include "whirlpool.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +/** + * Initialize context before calculaing hash. + * + * @param ctx context to initialize + */ +void rhash_whirlpool_init(struct whirlpool_ctx* ctx) +{ + ctx->length = 0; + memset(ctx->hash, 0, sizeof(ctx->hash)); +} + +/* Algorithm S-Box */ +//extern uint64_t rhash_whirlpool_sbox[8][256]; + +uint64_t rhash_whirlpool_sbox[8][256] = { + { + // C0 vectors + I64(0x18186018c07830d8), I64(0x23238c2305af4626), I64(0xc6c63fc67ef991b8), I64(0xe8e887e8136fcdfb), + I64(0x878726874ca113cb), I64(0xb8b8dab8a9626d11), I64(0x0101040108050209), I64(0x4f4f214f426e9e0d), + I64(0x3636d836adee6c9b), I64(0xa6a6a2a6590451ff), I64(0xd2d26fd2debdb90c), I64(0xf5f5f3f5fb06f70e), + I64(0x7979f979ef80f296), I64(0x6f6fa16f5fcede30), I64(0x91917e91fcef3f6d), I64(0x52525552aa07a4f8), + I64(0x60609d6027fdc047), I64(0xbcbccabc89766535), I64(0x9b9b569baccd2b37), I64(0x8e8e028e048c018a), + I64(0xa3a3b6a371155bd2), I64(0x0c0c300c603c186c), I64(0x7b7bf17bff8af684), I64(0x3535d435b5e16a80), + I64(0x1d1d741de8693af5), I64(0xe0e0a7e05347ddb3), I64(0xd7d77bd7f6acb321), I64(0xc2c22fc25eed999c), + I64(0x2e2eb82e6d965c43), I64(0x4b4b314b627a9629), I64(0xfefedffea321e15d), I64(0x575741578216aed5), + I64(0x15155415a8412abd), I64(0x7777c1779fb6eee8), I64(0x3737dc37a5eb6e92), I64(0xe5e5b3e57b56d79e), + I64(0x9f9f469f8cd92313), I64(0xf0f0e7f0d317fd23), I64(0x4a4a354a6a7f9420), I64(0xdada4fda9e95a944), + I64(0x58587d58fa25b0a2), I64(0xc9c903c906ca8fcf), I64(0x2929a429558d527c), I64(0x0a0a280a5022145a), + I64(0xb1b1feb1e14f7f50), I64(0xa0a0baa0691a5dc9), I64(0x6b6bb16b7fdad614), I64(0x85852e855cab17d9), + I64(0xbdbdcebd8173673c), I64(0x5d5d695dd234ba8f), I64(0x1010401080502090), I64(0xf4f4f7f4f303f507), + I64(0xcbcb0bcb16c08bdd), I64(0x3e3ef83eedc67cd3), I64(0x0505140528110a2d), I64(0x676781671fe6ce78), + I64(0xe4e4b7e47353d597), I64(0x27279c2725bb4e02), I64(0x4141194132588273), I64(0x8b8b168b2c9d0ba7), + I64(0xa7a7a6a7510153f6), I64(0x7d7de97dcf94fab2), I64(0x95956e95dcfb3749), I64(0xd8d847d88e9fad56), + I64(0xfbfbcbfb8b30eb70), I64(0xeeee9fee2371c1cd), I64(0x7c7ced7cc791f8bb), I64(0x6666856617e3cc71), + I64(0xdddd53dda68ea77b), I64(0x17175c17b84b2eaf), I64(0x4747014702468e45), I64(0x9e9e429e84dc211a), + I64(0xcaca0fca1ec589d4), I64(0x2d2db42d75995a58), I64(0xbfbfc6bf9179632e), I64(0x07071c07381b0e3f), + I64(0xadad8ead012347ac), I64(0x5a5a755aea2fb4b0), I64(0x838336836cb51bef), I64(0x3333cc3385ff66b6), + I64(0x636391633ff2c65c), I64(0x02020802100a0412), I64(0xaaaa92aa39384993), I64(0x7171d971afa8e2de), + I64(0xc8c807c80ecf8dc6), I64(0x19196419c87d32d1), I64(0x494939497270923b), I64(0xd9d943d9869aaf5f), + I64(0xf2f2eff2c31df931), I64(0xe3e3abe34b48dba8), I64(0x5b5b715be22ab6b9), I64(0x88881a8834920dbc), + I64(0x9a9a529aa4c8293e), I64(0x262698262dbe4c0b), I64(0x3232c8328dfa64bf), I64(0xb0b0fab0e94a7d59), + I64(0xe9e983e91b6acff2), I64(0x0f0f3c0f78331e77), I64(0xd5d573d5e6a6b733), I64(0x80803a8074ba1df4), + I64(0xbebec2be997c6127), I64(0xcdcd13cd26de87eb), I64(0x3434d034bde46889), I64(0x48483d487a759032), + I64(0xffffdbffab24e354), I64(0x7a7af57af78ff48d), I64(0x90907a90f4ea3d64), I64(0x5f5f615fc23ebe9d), + I64(0x202080201da0403d), I64(0x6868bd6867d5d00f), I64(0x1a1a681ad07234ca), I64(0xaeae82ae192c41b7), + I64(0xb4b4eab4c95e757d), I64(0x54544d549a19a8ce), I64(0x93937693ece53b7f), I64(0x222288220daa442f), + I64(0x64648d6407e9c863), I64(0xf1f1e3f1db12ff2a), I64(0x7373d173bfa2e6cc), I64(0x12124812905a2482), + I64(0x40401d403a5d807a), I64(0x0808200840281048), I64(0xc3c32bc356e89b95), I64(0xecec97ec337bc5df), + I64(0xdbdb4bdb9690ab4d), I64(0xa1a1bea1611f5fc0), I64(0x8d8d0e8d1c830791), I64(0x3d3df43df5c97ac8), + I64(0x97976697ccf1335b), I64(0x0000000000000000), I64(0xcfcf1bcf36d483f9), I64(0x2b2bac2b4587566e), + I64(0x7676c57697b3ece1), I64(0x8282328264b019e6), I64(0xd6d67fd6fea9b128), I64(0x1b1b6c1bd87736c3), + I64(0xb5b5eeb5c15b7774), I64(0xafaf86af112943be), I64(0x6a6ab56a77dfd41d), I64(0x50505d50ba0da0ea), + I64(0x45450945124c8a57), I64(0xf3f3ebf3cb18fb38), I64(0x3030c0309df060ad), I64(0xefef9bef2b74c3c4), + I64(0x3f3ffc3fe5c37eda), I64(0x55554955921caac7), I64(0xa2a2b2a2791059db), I64(0xeaea8fea0365c9e9), + I64(0x656589650fecca6a), I64(0xbabad2bab9686903), I64(0x2f2fbc2f65935e4a), I64(0xc0c027c04ee79d8e), + I64(0xdede5fdebe81a160), I64(0x1c1c701ce06c38fc), I64(0xfdfdd3fdbb2ee746), I64(0x4d4d294d52649a1f), + I64(0x92927292e4e03976), I64(0x7575c9758fbceafa), I64(0x06061806301e0c36), I64(0x8a8a128a249809ae), + I64(0xb2b2f2b2f940794b), I64(0xe6e6bfe66359d185), I64(0x0e0e380e70361c7e), I64(0x1f1f7c1ff8633ee7), + I64(0x6262956237f7c455), I64(0xd4d477d4eea3b53a), I64(0xa8a89aa829324d81), I64(0x96966296c4f43152), + I64(0xf9f9c3f99b3aef62), I64(0xc5c533c566f697a3), I64(0x2525942535b14a10), I64(0x59597959f220b2ab), + I64(0x84842a8454ae15d0), I64(0x7272d572b7a7e4c5), I64(0x3939e439d5dd72ec), I64(0x4c4c2d4c5a619816), + I64(0x5e5e655eca3bbc94), I64(0x7878fd78e785f09f), I64(0x3838e038ddd870e5), I64(0x8c8c0a8c14860598), + I64(0xd1d163d1c6b2bf17), I64(0xa5a5aea5410b57e4), I64(0xe2e2afe2434dd9a1), I64(0x616199612ff8c24e), + I64(0xb3b3f6b3f1457b42), I64(0x2121842115a54234), I64(0x9c9c4a9c94d62508), I64(0x1e1e781ef0663cee), + I64(0x4343114322528661), I64(0xc7c73bc776fc93b1), I64(0xfcfcd7fcb32be54f), I64(0x0404100420140824), + I64(0x51515951b208a2e3), I64(0x99995e99bcc72f25), I64(0x6d6da96d4fc4da22), I64(0x0d0d340d68391a65), + I64(0xfafacffa8335e979), I64(0xdfdf5bdfb684a369), I64(0x7e7ee57ed79bfca9), I64(0x242490243db44819), + I64(0x3b3bec3bc5d776fe), I64(0xabab96ab313d4b9a), I64(0xcece1fce3ed181f0), I64(0x1111441188552299), + I64(0x8f8f068f0c890383), I64(0x4e4e254e4a6b9c04), I64(0xb7b7e6b7d1517366), I64(0xebeb8beb0b60cbe0), + I64(0x3c3cf03cfdcc78c1), I64(0x81813e817cbf1ffd), I64(0x94946a94d4fe3540), I64(0xf7f7fbf7eb0cf31c), + I64(0xb9b9deb9a1676f18), I64(0x13134c13985f268b), I64(0x2c2cb02c7d9c5851), I64(0xd3d36bd3d6b8bb05), + I64(0xe7e7bbe76b5cd38c), I64(0x6e6ea56e57cbdc39), I64(0xc4c437c46ef395aa), I64(0x03030c03180f061b), + I64(0x565645568a13acdc), I64(0x44440d441a49885e), I64(0x7f7fe17fdf9efea0), I64(0xa9a99ea921374f88), + I64(0x2a2aa82a4d825467), I64(0xbbbbd6bbb16d6b0a), I64(0xc1c123c146e29f87), I64(0x53535153a202a6f1), + I64(0xdcdc57dcae8ba572), I64(0x0b0b2c0b58271653), I64(0x9d9d4e9d9cd32701), I64(0x6c6cad6c47c1d82b), + I64(0x3131c43195f562a4), I64(0x7474cd7487b9e8f3), I64(0xf6f6fff6e309f115), I64(0x464605460a438c4c), + I64(0xacac8aac092645a5), I64(0x89891e893c970fb5), I64(0x14145014a04428b4), I64(0xe1e1a3e15b42dfba), + I64(0x16165816b04e2ca6), I64(0x3a3ae83acdd274f7), I64(0x6969b9696fd0d206), I64(0x09092409482d1241), + I64(0x7070dd70a7ade0d7), I64(0xb6b6e2b6d954716f), I64(0xd0d067d0ceb7bd1e), I64(0xeded93ed3b7ec7d6), + I64(0xcccc17cc2edb85e2), I64(0x424215422a578468), I64(0x98985a98b4c22d2c), I64(0xa4a4aaa4490e55ed), + I64(0x2828a0285d885075), I64(0x5c5c6d5cda31b886), I64(0xf8f8c7f8933fed6b), I64(0x8686228644a411c2), + }, { + // C1 vectors + I64(0xd818186018c07830), I64(0x2623238c2305af46), I64(0xb8c6c63fc67ef991), I64(0xfbe8e887e8136fcd), + I64(0xcb878726874ca113), I64(0x11b8b8dab8a9626d), I64(0x0901010401080502), I64(0x0d4f4f214f426e9e), + I64(0x9b3636d836adee6c), I64(0xffa6a6a2a6590451), I64(0x0cd2d26fd2debdb9), I64(0x0ef5f5f3f5fb06f7), + I64(0x967979f979ef80f2), I64(0x306f6fa16f5fcede), I64(0x6d91917e91fcef3f), I64(0xf852525552aa07a4), + I64(0x4760609d6027fdc0), I64(0x35bcbccabc897665), I64(0x379b9b569baccd2b), I64(0x8a8e8e028e048c01), + I64(0xd2a3a3b6a371155b), I64(0x6c0c0c300c603c18), I64(0x847b7bf17bff8af6), I64(0x803535d435b5e16a), + I64(0xf51d1d741de8693a), I64(0xb3e0e0a7e05347dd), I64(0x21d7d77bd7f6acb3), I64(0x9cc2c22fc25eed99), + I64(0x432e2eb82e6d965c), I64(0x294b4b314b627a96), I64(0x5dfefedffea321e1), I64(0xd5575741578216ae), + I64(0xbd15155415a8412a), I64(0xe87777c1779fb6ee), I64(0x923737dc37a5eb6e), I64(0x9ee5e5b3e57b56d7), + I64(0x139f9f469f8cd923), I64(0x23f0f0e7f0d317fd), I64(0x204a4a354a6a7f94), I64(0x44dada4fda9e95a9), + I64(0xa258587d58fa25b0), I64(0xcfc9c903c906ca8f), I64(0x7c2929a429558d52), I64(0x5a0a0a280a502214), + I64(0x50b1b1feb1e14f7f), I64(0xc9a0a0baa0691a5d), I64(0x146b6bb16b7fdad6), I64(0xd985852e855cab17), + I64(0x3cbdbdcebd817367), I64(0x8f5d5d695dd234ba), I64(0x9010104010805020), I64(0x07f4f4f7f4f303f5), + I64(0xddcbcb0bcb16c08b), I64(0xd33e3ef83eedc67c), I64(0x2d0505140528110a), I64(0x78676781671fe6ce), + I64(0x97e4e4b7e47353d5), I64(0x0227279c2725bb4e), I64(0x7341411941325882), I64(0xa78b8b168b2c9d0b), + I64(0xf6a7a7a6a7510153), I64(0xb27d7de97dcf94fa), I64(0x4995956e95dcfb37), I64(0x56d8d847d88e9fad), + I64(0x70fbfbcbfb8b30eb), I64(0xcdeeee9fee2371c1), I64(0xbb7c7ced7cc791f8), I64(0x716666856617e3cc), + I64(0x7bdddd53dda68ea7), I64(0xaf17175c17b84b2e), I64(0x454747014702468e), I64(0x1a9e9e429e84dc21), + I64(0xd4caca0fca1ec589), I64(0x582d2db42d75995a), I64(0x2ebfbfc6bf917963), I64(0x3f07071c07381b0e), + I64(0xacadad8ead012347), I64(0xb05a5a755aea2fb4), I64(0xef838336836cb51b), I64(0xb63333cc3385ff66), + I64(0x5c636391633ff2c6), I64(0x1202020802100a04), I64(0x93aaaa92aa393849), I64(0xde7171d971afa8e2), + I64(0xc6c8c807c80ecf8d), I64(0xd119196419c87d32), I64(0x3b49493949727092), I64(0x5fd9d943d9869aaf), + I64(0x31f2f2eff2c31df9), I64(0xa8e3e3abe34b48db), I64(0xb95b5b715be22ab6), I64(0xbc88881a8834920d), + I64(0x3e9a9a529aa4c829), I64(0x0b262698262dbe4c), I64(0xbf3232c8328dfa64), I64(0x59b0b0fab0e94a7d), + I64(0xf2e9e983e91b6acf), I64(0x770f0f3c0f78331e), I64(0x33d5d573d5e6a6b7), I64(0xf480803a8074ba1d), + I64(0x27bebec2be997c61), I64(0xebcdcd13cd26de87), I64(0x893434d034bde468), I64(0x3248483d487a7590), + I64(0x54ffffdbffab24e3), I64(0x8d7a7af57af78ff4), I64(0x6490907a90f4ea3d), I64(0x9d5f5f615fc23ebe), + I64(0x3d202080201da040), I64(0x0f6868bd6867d5d0), I64(0xca1a1a681ad07234), I64(0xb7aeae82ae192c41), + I64(0x7db4b4eab4c95e75), I64(0xce54544d549a19a8), I64(0x7f93937693ece53b), I64(0x2f222288220daa44), + I64(0x6364648d6407e9c8), I64(0x2af1f1e3f1db12ff), I64(0xcc7373d173bfa2e6), I64(0x8212124812905a24), + I64(0x7a40401d403a5d80), I64(0x4808082008402810), I64(0x95c3c32bc356e89b), I64(0xdfecec97ec337bc5), + I64(0x4ddbdb4bdb9690ab), I64(0xc0a1a1bea1611f5f), I64(0x918d8d0e8d1c8307), I64(0xc83d3df43df5c97a), + I64(0x5b97976697ccf133), I64(0x0000000000000000), I64(0xf9cfcf1bcf36d483), I64(0x6e2b2bac2b458756), + I64(0xe17676c57697b3ec), I64(0xe68282328264b019), I64(0x28d6d67fd6fea9b1), I64(0xc31b1b6c1bd87736), + I64(0x74b5b5eeb5c15b77), I64(0xbeafaf86af112943), I64(0x1d6a6ab56a77dfd4), I64(0xea50505d50ba0da0), + I64(0x5745450945124c8a), I64(0x38f3f3ebf3cb18fb), I64(0xad3030c0309df060), I64(0xc4efef9bef2b74c3), + I64(0xda3f3ffc3fe5c37e), I64(0xc755554955921caa), I64(0xdba2a2b2a2791059), I64(0xe9eaea8fea0365c9), + I64(0x6a656589650fecca), I64(0x03babad2bab96869), I64(0x4a2f2fbc2f65935e), I64(0x8ec0c027c04ee79d), + I64(0x60dede5fdebe81a1), I64(0xfc1c1c701ce06c38), I64(0x46fdfdd3fdbb2ee7), I64(0x1f4d4d294d52649a), + I64(0x7692927292e4e039), I64(0xfa7575c9758fbcea), I64(0x3606061806301e0c), I64(0xae8a8a128a249809), + I64(0x4bb2b2f2b2f94079), I64(0x85e6e6bfe66359d1), I64(0x7e0e0e380e70361c), I64(0xe71f1f7c1ff8633e), + I64(0x556262956237f7c4), I64(0x3ad4d477d4eea3b5), I64(0x81a8a89aa829324d), I64(0x5296966296c4f431), + I64(0x62f9f9c3f99b3aef), I64(0xa3c5c533c566f697), I64(0x102525942535b14a), I64(0xab59597959f220b2), + I64(0xd084842a8454ae15), I64(0xc57272d572b7a7e4), I64(0xec3939e439d5dd72), I64(0x164c4c2d4c5a6198), + I64(0x945e5e655eca3bbc), I64(0x9f7878fd78e785f0), I64(0xe53838e038ddd870), I64(0x988c8c0a8c148605), + I64(0x17d1d163d1c6b2bf), I64(0xe4a5a5aea5410b57), I64(0xa1e2e2afe2434dd9), I64(0x4e616199612ff8c2), + I64(0x42b3b3f6b3f1457b), I64(0x342121842115a542), I64(0x089c9c4a9c94d625), I64(0xee1e1e781ef0663c), + I64(0x6143431143225286), I64(0xb1c7c73bc776fc93), I64(0x4ffcfcd7fcb32be5), I64(0x2404041004201408), + I64(0xe351515951b208a2), I64(0x2599995e99bcc72f), I64(0x226d6da96d4fc4da), I64(0x650d0d340d68391a), + I64(0x79fafacffa8335e9), I64(0x69dfdf5bdfb684a3), I64(0xa97e7ee57ed79bfc), I64(0x19242490243db448), + I64(0xfe3b3bec3bc5d776), I64(0x9aabab96ab313d4b), I64(0xf0cece1fce3ed181), I64(0x9911114411885522), + I64(0x838f8f068f0c8903), I64(0x044e4e254e4a6b9c), I64(0x66b7b7e6b7d15173), I64(0xe0ebeb8beb0b60cb), + I64(0xc13c3cf03cfdcc78), I64(0xfd81813e817cbf1f), I64(0x4094946a94d4fe35), I64(0x1cf7f7fbf7eb0cf3), + I64(0x18b9b9deb9a1676f), I64(0x8b13134c13985f26), I64(0x512c2cb02c7d9c58), I64(0x05d3d36bd3d6b8bb), + I64(0x8ce7e7bbe76b5cd3), I64(0x396e6ea56e57cbdc), I64(0xaac4c437c46ef395), I64(0x1b03030c03180f06), + I64(0xdc565645568a13ac), I64(0x5e44440d441a4988), I64(0xa07f7fe17fdf9efe), I64(0x88a9a99ea921374f), + I64(0x672a2aa82a4d8254), I64(0x0abbbbd6bbb16d6b), I64(0x87c1c123c146e29f), I64(0xf153535153a202a6), + I64(0x72dcdc57dcae8ba5), I64(0x530b0b2c0b582716), I64(0x019d9d4e9d9cd327), I64(0x2b6c6cad6c47c1d8), + I64(0xa43131c43195f562), I64(0xf37474cd7487b9e8), I64(0x15f6f6fff6e309f1), I64(0x4c464605460a438c), + I64(0xa5acac8aac092645), I64(0xb589891e893c970f), I64(0xb414145014a04428), I64(0xbae1e1a3e15b42df), + I64(0xa616165816b04e2c), I64(0xf73a3ae83acdd274), I64(0x066969b9696fd0d2), I64(0x4109092409482d12), + I64(0xd77070dd70a7ade0), I64(0x6fb6b6e2b6d95471), I64(0x1ed0d067d0ceb7bd), I64(0xd6eded93ed3b7ec7), + I64(0xe2cccc17cc2edb85), I64(0x68424215422a5784), I64(0x2c98985a98b4c22d), I64(0xeda4a4aaa4490e55), + I64(0x752828a0285d8850), I64(0x865c5c6d5cda31b8), I64(0x6bf8f8c7f8933fed), I64(0xc28686228644a411), + }, { + // C2 vectors + I64(0x30d818186018c078), I64(0x462623238c2305af), I64(0x91b8c6c63fc67ef9), I64(0xcdfbe8e887e8136f), + I64(0x13cb878726874ca1), I64(0x6d11b8b8dab8a962), I64(0x0209010104010805), I64(0x9e0d4f4f214f426e), + I64(0x6c9b3636d836adee), I64(0x51ffa6a6a2a65904), I64(0xb90cd2d26fd2debd), I64(0xf70ef5f5f3f5fb06), + I64(0xf2967979f979ef80), I64(0xde306f6fa16f5fce), I64(0x3f6d91917e91fcef), I64(0xa4f852525552aa07), + I64(0xc04760609d6027fd), I64(0x6535bcbccabc8976), I64(0x2b379b9b569baccd), I64(0x018a8e8e028e048c), + I64(0x5bd2a3a3b6a37115), I64(0x186c0c0c300c603c), I64(0xf6847b7bf17bff8a), I64(0x6a803535d435b5e1), + I64(0x3af51d1d741de869), I64(0xddb3e0e0a7e05347), I64(0xb321d7d77bd7f6ac), I64(0x999cc2c22fc25eed), + I64(0x5c432e2eb82e6d96), I64(0x96294b4b314b627a), I64(0xe15dfefedffea321), I64(0xaed5575741578216), + I64(0x2abd15155415a841), I64(0xeee87777c1779fb6), I64(0x6e923737dc37a5eb), I64(0xd79ee5e5b3e57b56), + I64(0x23139f9f469f8cd9), I64(0xfd23f0f0e7f0d317), I64(0x94204a4a354a6a7f), I64(0xa944dada4fda9e95), + I64(0xb0a258587d58fa25), I64(0x8fcfc9c903c906ca), I64(0x527c2929a429558d), I64(0x145a0a0a280a5022), + I64(0x7f50b1b1feb1e14f), I64(0x5dc9a0a0baa0691a), I64(0xd6146b6bb16b7fda), I64(0x17d985852e855cab), + I64(0x673cbdbdcebd8173), I64(0xba8f5d5d695dd234), I64(0x2090101040108050), I64(0xf507f4f4f7f4f303), + I64(0x8bddcbcb0bcb16c0), I64(0x7cd33e3ef83eedc6), I64(0x0a2d050514052811), I64(0xce78676781671fe6), + I64(0xd597e4e4b7e47353), I64(0x4e0227279c2725bb), I64(0x8273414119413258), I64(0x0ba78b8b168b2c9d), + I64(0x53f6a7a7a6a75101), I64(0xfab27d7de97dcf94), I64(0x374995956e95dcfb), I64(0xad56d8d847d88e9f), + I64(0xeb70fbfbcbfb8b30), I64(0xc1cdeeee9fee2371), I64(0xf8bb7c7ced7cc791), I64(0xcc716666856617e3), + I64(0xa77bdddd53dda68e), I64(0x2eaf17175c17b84b), I64(0x8e45474701470246), I64(0x211a9e9e429e84dc), + I64(0x89d4caca0fca1ec5), I64(0x5a582d2db42d7599), I64(0x632ebfbfc6bf9179), I64(0x0e3f07071c07381b), + I64(0x47acadad8ead0123), I64(0xb4b05a5a755aea2f), I64(0x1bef838336836cb5), I64(0x66b63333cc3385ff), + I64(0xc65c636391633ff2), I64(0x041202020802100a), I64(0x4993aaaa92aa3938), I64(0xe2de7171d971afa8), + I64(0x8dc6c8c807c80ecf), I64(0x32d119196419c87d), I64(0x923b494939497270), I64(0xaf5fd9d943d9869a), + I64(0xf931f2f2eff2c31d), I64(0xdba8e3e3abe34b48), I64(0xb6b95b5b715be22a), I64(0x0dbc88881a883492), + I64(0x293e9a9a529aa4c8), I64(0x4c0b262698262dbe), I64(0x64bf3232c8328dfa), I64(0x7d59b0b0fab0e94a), + I64(0xcff2e9e983e91b6a), I64(0x1e770f0f3c0f7833), I64(0xb733d5d573d5e6a6), I64(0x1df480803a8074ba), + I64(0x6127bebec2be997c), I64(0x87ebcdcd13cd26de), I64(0x68893434d034bde4), I64(0x903248483d487a75), + I64(0xe354ffffdbffab24), I64(0xf48d7a7af57af78f), I64(0x3d6490907a90f4ea), I64(0xbe9d5f5f615fc23e), + I64(0x403d202080201da0), I64(0xd00f6868bd6867d5), I64(0x34ca1a1a681ad072), I64(0x41b7aeae82ae192c), + I64(0x757db4b4eab4c95e), I64(0xa8ce54544d549a19), I64(0x3b7f93937693ece5), I64(0x442f222288220daa), + I64(0xc86364648d6407e9), I64(0xff2af1f1e3f1db12), I64(0xe6cc7373d173bfa2), I64(0x248212124812905a), + I64(0x807a40401d403a5d), I64(0x1048080820084028), I64(0x9b95c3c32bc356e8), I64(0xc5dfecec97ec337b), + I64(0xab4ddbdb4bdb9690), I64(0x5fc0a1a1bea1611f), I64(0x07918d8d0e8d1c83), I64(0x7ac83d3df43df5c9), + I64(0x335b97976697ccf1), I64(0x0000000000000000), I64(0x83f9cfcf1bcf36d4), I64(0x566e2b2bac2b4587), + I64(0xece17676c57697b3), I64(0x19e68282328264b0), I64(0xb128d6d67fd6fea9), I64(0x36c31b1b6c1bd877), + I64(0x7774b5b5eeb5c15b), I64(0x43beafaf86af1129), I64(0xd41d6a6ab56a77df), I64(0xa0ea50505d50ba0d), + I64(0x8a5745450945124c), I64(0xfb38f3f3ebf3cb18), I64(0x60ad3030c0309df0), I64(0xc3c4efef9bef2b74), + I64(0x7eda3f3ffc3fe5c3), I64(0xaac755554955921c), I64(0x59dba2a2b2a27910), I64(0xc9e9eaea8fea0365), + I64(0xca6a656589650fec), I64(0x6903babad2bab968), I64(0x5e4a2f2fbc2f6593), I64(0x9d8ec0c027c04ee7), + I64(0xa160dede5fdebe81), I64(0x38fc1c1c701ce06c), I64(0xe746fdfdd3fdbb2e), I64(0x9a1f4d4d294d5264), + I64(0x397692927292e4e0), I64(0xeafa7575c9758fbc), I64(0x0c3606061806301e), I64(0x09ae8a8a128a2498), + I64(0x794bb2b2f2b2f940), I64(0xd185e6e6bfe66359), I64(0x1c7e0e0e380e7036), I64(0x3ee71f1f7c1ff863), + I64(0xc4556262956237f7), I64(0xb53ad4d477d4eea3), I64(0x4d81a8a89aa82932), I64(0x315296966296c4f4), + I64(0xef62f9f9c3f99b3a), I64(0x97a3c5c533c566f6), I64(0x4a102525942535b1), I64(0xb2ab59597959f220), + I64(0x15d084842a8454ae), I64(0xe4c57272d572b7a7), I64(0x72ec3939e439d5dd), I64(0x98164c4c2d4c5a61), + I64(0xbc945e5e655eca3b), I64(0xf09f7878fd78e785), I64(0x70e53838e038ddd8), I64(0x05988c8c0a8c1486), + I64(0xbf17d1d163d1c6b2), I64(0x57e4a5a5aea5410b), I64(0xd9a1e2e2afe2434d), I64(0xc24e616199612ff8), + I64(0x7b42b3b3f6b3f145), I64(0x42342121842115a5), I64(0x25089c9c4a9c94d6), I64(0x3cee1e1e781ef066), + I64(0x8661434311432252), I64(0x93b1c7c73bc776fc), I64(0xe54ffcfcd7fcb32b), I64(0x0824040410042014), + I64(0xa2e351515951b208), I64(0x2f2599995e99bcc7), I64(0xda226d6da96d4fc4), I64(0x1a650d0d340d6839), + I64(0xe979fafacffa8335), I64(0xa369dfdf5bdfb684), I64(0xfca97e7ee57ed79b), I64(0x4819242490243db4), + I64(0x76fe3b3bec3bc5d7), I64(0x4b9aabab96ab313d), I64(0x81f0cece1fce3ed1), I64(0x2299111144118855), + I64(0x03838f8f068f0c89), I64(0x9c044e4e254e4a6b), I64(0x7366b7b7e6b7d151), I64(0xcbe0ebeb8beb0b60), + I64(0x78c13c3cf03cfdcc), I64(0x1ffd81813e817cbf), I64(0x354094946a94d4fe), I64(0xf31cf7f7fbf7eb0c), + I64(0x6f18b9b9deb9a167), I64(0x268b13134c13985f), I64(0x58512c2cb02c7d9c), I64(0xbb05d3d36bd3d6b8), + I64(0xd38ce7e7bbe76b5c), I64(0xdc396e6ea56e57cb), I64(0x95aac4c437c46ef3), I64(0x061b03030c03180f), + I64(0xacdc565645568a13), I64(0x885e44440d441a49), I64(0xfea07f7fe17fdf9e), I64(0x4f88a9a99ea92137), + I64(0x54672a2aa82a4d82), I64(0x6b0abbbbd6bbb16d), I64(0x9f87c1c123c146e2), I64(0xa6f153535153a202), + I64(0xa572dcdc57dcae8b), I64(0x16530b0b2c0b5827), I64(0x27019d9d4e9d9cd3), I64(0xd82b6c6cad6c47c1), + I64(0x62a43131c43195f5), I64(0xe8f37474cd7487b9), I64(0xf115f6f6fff6e309), I64(0x8c4c464605460a43), + I64(0x45a5acac8aac0926), I64(0x0fb589891e893c97), I64(0x28b414145014a044), I64(0xdfbae1e1a3e15b42), + I64(0x2ca616165816b04e), I64(0x74f73a3ae83acdd2), I64(0xd2066969b9696fd0), I64(0x124109092409482d), + I64(0xe0d77070dd70a7ad), I64(0x716fb6b6e2b6d954), I64(0xbd1ed0d067d0ceb7), I64(0xc7d6eded93ed3b7e), + I64(0x85e2cccc17cc2edb), I64(0x8468424215422a57), I64(0x2d2c98985a98b4c2), I64(0x55eda4a4aaa4490e), + I64(0x50752828a0285d88), I64(0xb8865c5c6d5cda31), I64(0xed6bf8f8c7f8933f), I64(0x11c28686228644a4), + }, { + // C3 vectors + I64(0x7830d818186018c0), I64(0xaf462623238c2305), I64(0xf991b8c6c63fc67e), I64(0x6fcdfbe8e887e813), + I64(0xa113cb878726874c), I64(0x626d11b8b8dab8a9), I64(0x0502090101040108), I64(0x6e9e0d4f4f214f42), + I64(0xee6c9b3636d836ad), I64(0x0451ffa6a6a2a659), I64(0xbdb90cd2d26fd2de), I64(0x06f70ef5f5f3f5fb), + I64(0x80f2967979f979ef), I64(0xcede306f6fa16f5f), I64(0xef3f6d91917e91fc), I64(0x07a4f852525552aa), + I64(0xfdc04760609d6027), I64(0x766535bcbccabc89), I64(0xcd2b379b9b569bac), I64(0x8c018a8e8e028e04), + I64(0x155bd2a3a3b6a371), I64(0x3c186c0c0c300c60), I64(0x8af6847b7bf17bff), I64(0xe16a803535d435b5), + I64(0x693af51d1d741de8), I64(0x47ddb3e0e0a7e053), I64(0xacb321d7d77bd7f6), I64(0xed999cc2c22fc25e), + I64(0x965c432e2eb82e6d), I64(0x7a96294b4b314b62), I64(0x21e15dfefedffea3), I64(0x16aed55757415782), + I64(0x412abd15155415a8), I64(0xb6eee87777c1779f), I64(0xeb6e923737dc37a5), I64(0x56d79ee5e5b3e57b), + I64(0xd923139f9f469f8c), I64(0x17fd23f0f0e7f0d3), I64(0x7f94204a4a354a6a), I64(0x95a944dada4fda9e), + I64(0x25b0a258587d58fa), I64(0xca8fcfc9c903c906), I64(0x8d527c2929a42955), I64(0x22145a0a0a280a50), + I64(0x4f7f50b1b1feb1e1), I64(0x1a5dc9a0a0baa069), I64(0xdad6146b6bb16b7f), I64(0xab17d985852e855c), + I64(0x73673cbdbdcebd81), I64(0x34ba8f5d5d695dd2), I64(0x5020901010401080), I64(0x03f507f4f4f7f4f3), + I64(0xc08bddcbcb0bcb16), I64(0xc67cd33e3ef83eed), I64(0x110a2d0505140528), I64(0xe6ce78676781671f), + I64(0x53d597e4e4b7e473), I64(0xbb4e0227279c2725), I64(0x5882734141194132), I64(0x9d0ba78b8b168b2c), + I64(0x0153f6a7a7a6a751), I64(0x94fab27d7de97dcf), I64(0xfb374995956e95dc), I64(0x9fad56d8d847d88e), + I64(0x30eb70fbfbcbfb8b), I64(0x71c1cdeeee9fee23), I64(0x91f8bb7c7ced7cc7), I64(0xe3cc716666856617), + I64(0x8ea77bdddd53dda6), I64(0x4b2eaf17175c17b8), I64(0x468e454747014702), I64(0xdc211a9e9e429e84), + I64(0xc589d4caca0fca1e), I64(0x995a582d2db42d75), I64(0x79632ebfbfc6bf91), I64(0x1b0e3f07071c0738), + I64(0x2347acadad8ead01), I64(0x2fb4b05a5a755aea), I64(0xb51bef838336836c), I64(0xff66b63333cc3385), + I64(0xf2c65c636391633f), I64(0x0a04120202080210), I64(0x384993aaaa92aa39), I64(0xa8e2de7171d971af), + I64(0xcf8dc6c8c807c80e), I64(0x7d32d119196419c8), I64(0x70923b4949394972), I64(0x9aaf5fd9d943d986), + I64(0x1df931f2f2eff2c3), I64(0x48dba8e3e3abe34b), I64(0x2ab6b95b5b715be2), I64(0x920dbc88881a8834), + I64(0xc8293e9a9a529aa4), I64(0xbe4c0b262698262d), I64(0xfa64bf3232c8328d), I64(0x4a7d59b0b0fab0e9), + I64(0x6acff2e9e983e91b), I64(0x331e770f0f3c0f78), I64(0xa6b733d5d573d5e6), I64(0xba1df480803a8074), + I64(0x7c6127bebec2be99), I64(0xde87ebcdcd13cd26), I64(0xe468893434d034bd), I64(0x75903248483d487a), + I64(0x24e354ffffdbffab), I64(0x8ff48d7a7af57af7), I64(0xea3d6490907a90f4), I64(0x3ebe9d5f5f615fc2), + I64(0xa0403d202080201d), I64(0xd5d00f6868bd6867), I64(0x7234ca1a1a681ad0), I64(0x2c41b7aeae82ae19), + I64(0x5e757db4b4eab4c9), I64(0x19a8ce54544d549a), I64(0xe53b7f93937693ec), I64(0xaa442f222288220d), + I64(0xe9c86364648d6407), I64(0x12ff2af1f1e3f1db), I64(0xa2e6cc7373d173bf), I64(0x5a24821212481290), + I64(0x5d807a40401d403a), I64(0x2810480808200840), I64(0xe89b95c3c32bc356), I64(0x7bc5dfecec97ec33), + I64(0x90ab4ddbdb4bdb96), I64(0x1f5fc0a1a1bea161), I64(0x8307918d8d0e8d1c), I64(0xc97ac83d3df43df5), + I64(0xf1335b97976697cc), I64(0x0000000000000000), I64(0xd483f9cfcf1bcf36), I64(0x87566e2b2bac2b45), + I64(0xb3ece17676c57697), I64(0xb019e68282328264), I64(0xa9b128d6d67fd6fe), I64(0x7736c31b1b6c1bd8), + I64(0x5b7774b5b5eeb5c1), I64(0x2943beafaf86af11), I64(0xdfd41d6a6ab56a77), I64(0x0da0ea50505d50ba), + I64(0x4c8a574545094512), I64(0x18fb38f3f3ebf3cb), I64(0xf060ad3030c0309d), I64(0x74c3c4efef9bef2b), + I64(0xc37eda3f3ffc3fe5), I64(0x1caac75555495592), I64(0x1059dba2a2b2a279), I64(0x65c9e9eaea8fea03), + I64(0xecca6a656589650f), I64(0x686903babad2bab9), I64(0x935e4a2f2fbc2f65), I64(0xe79d8ec0c027c04e), + I64(0x81a160dede5fdebe), I64(0x6c38fc1c1c701ce0), I64(0x2ee746fdfdd3fdbb), I64(0x649a1f4d4d294d52), + I64(0xe0397692927292e4), I64(0xbceafa7575c9758f), I64(0x1e0c360606180630), I64(0x9809ae8a8a128a24), + I64(0x40794bb2b2f2b2f9), I64(0x59d185e6e6bfe663), I64(0x361c7e0e0e380e70), I64(0x633ee71f1f7c1ff8), + I64(0xf7c4556262956237), I64(0xa3b53ad4d477d4ee), I64(0x324d81a8a89aa829), I64(0xf4315296966296c4), + I64(0x3aef62f9f9c3f99b), I64(0xf697a3c5c533c566), I64(0xb14a102525942535), I64(0x20b2ab59597959f2), + I64(0xae15d084842a8454), I64(0xa7e4c57272d572b7), I64(0xdd72ec3939e439d5), I64(0x6198164c4c2d4c5a), + I64(0x3bbc945e5e655eca), I64(0x85f09f7878fd78e7), I64(0xd870e53838e038dd), I64(0x8605988c8c0a8c14), + I64(0xb2bf17d1d163d1c6), I64(0x0b57e4a5a5aea541), I64(0x4dd9a1e2e2afe243), I64(0xf8c24e616199612f), + I64(0x457b42b3b3f6b3f1), I64(0xa542342121842115), I64(0xd625089c9c4a9c94), I64(0x663cee1e1e781ef0), + I64(0x5286614343114322), I64(0xfc93b1c7c73bc776), I64(0x2be54ffcfcd7fcb3), I64(0x1408240404100420), + I64(0x08a2e351515951b2), I64(0xc72f2599995e99bc), I64(0xc4da226d6da96d4f), I64(0x391a650d0d340d68), + I64(0x35e979fafacffa83), I64(0x84a369dfdf5bdfb6), I64(0x9bfca97e7ee57ed7), I64(0xb44819242490243d), + I64(0xd776fe3b3bec3bc5), I64(0x3d4b9aabab96ab31), I64(0xd181f0cece1fce3e), I64(0x5522991111441188), + I64(0x8903838f8f068f0c), I64(0x6b9c044e4e254e4a), I64(0x517366b7b7e6b7d1), I64(0x60cbe0ebeb8beb0b), + I64(0xcc78c13c3cf03cfd), I64(0xbf1ffd81813e817c), I64(0xfe354094946a94d4), I64(0x0cf31cf7f7fbf7eb), + I64(0x676f18b9b9deb9a1), I64(0x5f268b13134c1398), I64(0x9c58512c2cb02c7d), I64(0xb8bb05d3d36bd3d6), + I64(0x5cd38ce7e7bbe76b), I64(0xcbdc396e6ea56e57), I64(0xf395aac4c437c46e), I64(0x0f061b03030c0318), + I64(0x13acdc565645568a), I64(0x49885e44440d441a), I64(0x9efea07f7fe17fdf), I64(0x374f88a9a99ea921), + I64(0x8254672a2aa82a4d), I64(0x6d6b0abbbbd6bbb1), I64(0xe29f87c1c123c146), I64(0x02a6f153535153a2), + I64(0x8ba572dcdc57dcae), I64(0x2716530b0b2c0b58), I64(0xd327019d9d4e9d9c), I64(0xc1d82b6c6cad6c47), + I64(0xf562a43131c43195), I64(0xb9e8f37474cd7487), I64(0x09f115f6f6fff6e3), I64(0x438c4c464605460a), + I64(0x2645a5acac8aac09), I64(0x970fb589891e893c), I64(0x4428b414145014a0), I64(0x42dfbae1e1a3e15b), + I64(0x4e2ca616165816b0), I64(0xd274f73a3ae83acd), I64(0xd0d2066969b9696f), I64(0x2d12410909240948), + I64(0xade0d77070dd70a7), I64(0x54716fb6b6e2b6d9), I64(0xb7bd1ed0d067d0ce), I64(0x7ec7d6eded93ed3b), + I64(0xdb85e2cccc17cc2e), I64(0x578468424215422a), I64(0xc22d2c98985a98b4), I64(0x0e55eda4a4aaa449), + I64(0x8850752828a0285d), I64(0x31b8865c5c6d5cda), I64(0x3fed6bf8f8c7f893), I64(0xa411c28686228644), + }, { + // C4 vectors + I64(0xc07830d818186018), I64(0x05af462623238c23), I64(0x7ef991b8c6c63fc6), I64(0x136fcdfbe8e887e8), + I64(0x4ca113cb87872687), I64(0xa9626d11b8b8dab8), I64(0x0805020901010401), I64(0x426e9e0d4f4f214f), + I64(0xadee6c9b3636d836), I64(0x590451ffa6a6a2a6), I64(0xdebdb90cd2d26fd2), I64(0xfb06f70ef5f5f3f5), + I64(0xef80f2967979f979), I64(0x5fcede306f6fa16f), I64(0xfcef3f6d91917e91), I64(0xaa07a4f852525552), + I64(0x27fdc04760609d60), I64(0x89766535bcbccabc), I64(0xaccd2b379b9b569b), I64(0x048c018a8e8e028e), + I64(0x71155bd2a3a3b6a3), I64(0x603c186c0c0c300c), I64(0xff8af6847b7bf17b), I64(0xb5e16a803535d435), + I64(0xe8693af51d1d741d), I64(0x5347ddb3e0e0a7e0), I64(0xf6acb321d7d77bd7), I64(0x5eed999cc2c22fc2), + I64(0x6d965c432e2eb82e), I64(0x627a96294b4b314b), I64(0xa321e15dfefedffe), I64(0x8216aed557574157), + I64(0xa8412abd15155415), I64(0x9fb6eee87777c177), I64(0xa5eb6e923737dc37), I64(0x7b56d79ee5e5b3e5), + I64(0x8cd923139f9f469f), I64(0xd317fd23f0f0e7f0), I64(0x6a7f94204a4a354a), I64(0x9e95a944dada4fda), + I64(0xfa25b0a258587d58), I64(0x06ca8fcfc9c903c9), I64(0x558d527c2929a429), I64(0x5022145a0a0a280a), + I64(0xe14f7f50b1b1feb1), I64(0x691a5dc9a0a0baa0), I64(0x7fdad6146b6bb16b), I64(0x5cab17d985852e85), + I64(0x8173673cbdbdcebd), I64(0xd234ba8f5d5d695d), I64(0x8050209010104010), I64(0xf303f507f4f4f7f4), + I64(0x16c08bddcbcb0bcb), I64(0xedc67cd33e3ef83e), I64(0x28110a2d05051405), I64(0x1fe6ce7867678167), + I64(0x7353d597e4e4b7e4), I64(0x25bb4e0227279c27), I64(0x3258827341411941), I64(0x2c9d0ba78b8b168b), + I64(0x510153f6a7a7a6a7), I64(0xcf94fab27d7de97d), I64(0xdcfb374995956e95), I64(0x8e9fad56d8d847d8), + I64(0x8b30eb70fbfbcbfb), I64(0x2371c1cdeeee9fee), I64(0xc791f8bb7c7ced7c), I64(0x17e3cc7166668566), + I64(0xa68ea77bdddd53dd), I64(0xb84b2eaf17175c17), I64(0x02468e4547470147), I64(0x84dc211a9e9e429e), + I64(0x1ec589d4caca0fca), I64(0x75995a582d2db42d), I64(0x9179632ebfbfc6bf), I64(0x381b0e3f07071c07), + I64(0x012347acadad8ead), I64(0xea2fb4b05a5a755a), I64(0x6cb51bef83833683), I64(0x85ff66b63333cc33), + I64(0x3ff2c65c63639163), I64(0x100a041202020802), I64(0x39384993aaaa92aa), I64(0xafa8e2de7171d971), + I64(0x0ecf8dc6c8c807c8), I64(0xc87d32d119196419), I64(0x7270923b49493949), I64(0x869aaf5fd9d943d9), + I64(0xc31df931f2f2eff2), I64(0x4b48dba8e3e3abe3), I64(0xe22ab6b95b5b715b), I64(0x34920dbc88881a88), + I64(0xa4c8293e9a9a529a), I64(0x2dbe4c0b26269826), I64(0x8dfa64bf3232c832), I64(0xe94a7d59b0b0fab0), + I64(0x1b6acff2e9e983e9), I64(0x78331e770f0f3c0f), I64(0xe6a6b733d5d573d5), I64(0x74ba1df480803a80), + I64(0x997c6127bebec2be), I64(0x26de87ebcdcd13cd), I64(0xbde468893434d034), I64(0x7a75903248483d48), + I64(0xab24e354ffffdbff), I64(0xf78ff48d7a7af57a), I64(0xf4ea3d6490907a90), I64(0xc23ebe9d5f5f615f), + I64(0x1da0403d20208020), I64(0x67d5d00f6868bd68), I64(0xd07234ca1a1a681a), I64(0x192c41b7aeae82ae), + I64(0xc95e757db4b4eab4), I64(0x9a19a8ce54544d54), I64(0xece53b7f93937693), I64(0x0daa442f22228822), + I64(0x07e9c86364648d64), I64(0xdb12ff2af1f1e3f1), I64(0xbfa2e6cc7373d173), I64(0x905a248212124812), + I64(0x3a5d807a40401d40), I64(0x4028104808082008), I64(0x56e89b95c3c32bc3), I64(0x337bc5dfecec97ec), + I64(0x9690ab4ddbdb4bdb), I64(0x611f5fc0a1a1bea1), I64(0x1c8307918d8d0e8d), I64(0xf5c97ac83d3df43d), + I64(0xccf1335b97976697), I64(0x0000000000000000), I64(0x36d483f9cfcf1bcf), I64(0x4587566e2b2bac2b), + I64(0x97b3ece17676c576), I64(0x64b019e682823282), I64(0xfea9b128d6d67fd6), I64(0xd87736c31b1b6c1b), + I64(0xc15b7774b5b5eeb5), I64(0x112943beafaf86af), I64(0x77dfd41d6a6ab56a), I64(0xba0da0ea50505d50), + I64(0x124c8a5745450945), I64(0xcb18fb38f3f3ebf3), I64(0x9df060ad3030c030), I64(0x2b74c3c4efef9bef), + I64(0xe5c37eda3f3ffc3f), I64(0x921caac755554955), I64(0x791059dba2a2b2a2), I64(0x0365c9e9eaea8fea), + I64(0x0fecca6a65658965), I64(0xb9686903babad2ba), I64(0x65935e4a2f2fbc2f), I64(0x4ee79d8ec0c027c0), + I64(0xbe81a160dede5fde), I64(0xe06c38fc1c1c701c), I64(0xbb2ee746fdfdd3fd), I64(0x52649a1f4d4d294d), + I64(0xe4e0397692927292), I64(0x8fbceafa7575c975), I64(0x301e0c3606061806), I64(0x249809ae8a8a128a), + I64(0xf940794bb2b2f2b2), I64(0x6359d185e6e6bfe6), I64(0x70361c7e0e0e380e), I64(0xf8633ee71f1f7c1f), + I64(0x37f7c45562629562), I64(0xeea3b53ad4d477d4), I64(0x29324d81a8a89aa8), I64(0xc4f4315296966296), + I64(0x9b3aef62f9f9c3f9), I64(0x66f697a3c5c533c5), I64(0x35b14a1025259425), I64(0xf220b2ab59597959), + I64(0x54ae15d084842a84), I64(0xb7a7e4c57272d572), I64(0xd5dd72ec3939e439), I64(0x5a6198164c4c2d4c), + I64(0xca3bbc945e5e655e), I64(0xe785f09f7878fd78), I64(0xddd870e53838e038), I64(0x148605988c8c0a8c), + I64(0xc6b2bf17d1d163d1), I64(0x410b57e4a5a5aea5), I64(0x434dd9a1e2e2afe2), I64(0x2ff8c24e61619961), + I64(0xf1457b42b3b3f6b3), I64(0x15a5423421218421), I64(0x94d625089c9c4a9c), I64(0xf0663cee1e1e781e), + I64(0x2252866143431143), I64(0x76fc93b1c7c73bc7), I64(0xb32be54ffcfcd7fc), I64(0x2014082404041004), + I64(0xb208a2e351515951), I64(0xbcc72f2599995e99), I64(0x4fc4da226d6da96d), I64(0x68391a650d0d340d), + I64(0x8335e979fafacffa), I64(0xb684a369dfdf5bdf), I64(0xd79bfca97e7ee57e), I64(0x3db4481924249024), + I64(0xc5d776fe3b3bec3b), I64(0x313d4b9aabab96ab), I64(0x3ed181f0cece1fce), I64(0x8855229911114411), + I64(0x0c8903838f8f068f), I64(0x4a6b9c044e4e254e), I64(0xd1517366b7b7e6b7), I64(0x0b60cbe0ebeb8beb), + I64(0xfdcc78c13c3cf03c), I64(0x7cbf1ffd81813e81), I64(0xd4fe354094946a94), I64(0xeb0cf31cf7f7fbf7), + I64(0xa1676f18b9b9deb9), I64(0x985f268b13134c13), I64(0x7d9c58512c2cb02c), I64(0xd6b8bb05d3d36bd3), + I64(0x6b5cd38ce7e7bbe7), I64(0x57cbdc396e6ea56e), I64(0x6ef395aac4c437c4), I64(0x180f061b03030c03), + I64(0x8a13acdc56564556), I64(0x1a49885e44440d44), I64(0xdf9efea07f7fe17f), I64(0x21374f88a9a99ea9), + I64(0x4d8254672a2aa82a), I64(0xb16d6b0abbbbd6bb), I64(0x46e29f87c1c123c1), I64(0xa202a6f153535153), + I64(0xae8ba572dcdc57dc), I64(0x582716530b0b2c0b), I64(0x9cd327019d9d4e9d), I64(0x47c1d82b6c6cad6c), + I64(0x95f562a43131c431), I64(0x87b9e8f37474cd74), I64(0xe309f115f6f6fff6), I64(0x0a438c4c46460546), + I64(0x092645a5acac8aac), I64(0x3c970fb589891e89), I64(0xa04428b414145014), I64(0x5b42dfbae1e1a3e1), + I64(0xb04e2ca616165816), I64(0xcdd274f73a3ae83a), I64(0x6fd0d2066969b969), I64(0x482d124109092409), + I64(0xa7ade0d77070dd70), I64(0xd954716fb6b6e2b6), I64(0xceb7bd1ed0d067d0), I64(0x3b7ec7d6eded93ed), + I64(0x2edb85e2cccc17cc), I64(0x2a57846842421542), I64(0xb4c22d2c98985a98), I64(0x490e55eda4a4aaa4), + I64(0x5d8850752828a028), I64(0xda31b8865c5c6d5c), I64(0x933fed6bf8f8c7f8), I64(0x44a411c286862286), + }, { + // C5 vectors + I64(0x18c07830d8181860), I64(0x2305af462623238c), I64(0xc67ef991b8c6c63f), I64(0xe8136fcdfbe8e887), + I64(0x874ca113cb878726), I64(0xb8a9626d11b8b8da), I64(0x0108050209010104), I64(0x4f426e9e0d4f4f21), + I64(0x36adee6c9b3636d8), I64(0xa6590451ffa6a6a2), I64(0xd2debdb90cd2d26f), I64(0xf5fb06f70ef5f5f3), + I64(0x79ef80f2967979f9), I64(0x6f5fcede306f6fa1), I64(0x91fcef3f6d91917e), I64(0x52aa07a4f8525255), + I64(0x6027fdc04760609d), I64(0xbc89766535bcbcca), I64(0x9baccd2b379b9b56), I64(0x8e048c018a8e8e02), + I64(0xa371155bd2a3a3b6), I64(0x0c603c186c0c0c30), I64(0x7bff8af6847b7bf1), I64(0x35b5e16a803535d4), + I64(0x1de8693af51d1d74), I64(0xe05347ddb3e0e0a7), I64(0xd7f6acb321d7d77b), I64(0xc25eed999cc2c22f), + I64(0x2e6d965c432e2eb8), I64(0x4b627a96294b4b31), I64(0xfea321e15dfefedf), I64(0x578216aed5575741), + I64(0x15a8412abd151554), I64(0x779fb6eee87777c1), I64(0x37a5eb6e923737dc), I64(0xe57b56d79ee5e5b3), + I64(0x9f8cd923139f9f46), I64(0xf0d317fd23f0f0e7), I64(0x4a6a7f94204a4a35), I64(0xda9e95a944dada4f), + I64(0x58fa25b0a258587d), I64(0xc906ca8fcfc9c903), I64(0x29558d527c2929a4), I64(0x0a5022145a0a0a28), + I64(0xb1e14f7f50b1b1fe), I64(0xa0691a5dc9a0a0ba), I64(0x6b7fdad6146b6bb1), I64(0x855cab17d985852e), + I64(0xbd8173673cbdbdce), I64(0x5dd234ba8f5d5d69), I64(0x1080502090101040), I64(0xf4f303f507f4f4f7), + I64(0xcb16c08bddcbcb0b), I64(0x3eedc67cd33e3ef8), I64(0x0528110a2d050514), I64(0x671fe6ce78676781), + I64(0xe47353d597e4e4b7), I64(0x2725bb4e0227279c), I64(0x4132588273414119), I64(0x8b2c9d0ba78b8b16), + I64(0xa7510153f6a7a7a6), I64(0x7dcf94fab27d7de9), I64(0x95dcfb374995956e), I64(0xd88e9fad56d8d847), + I64(0xfb8b30eb70fbfbcb), I64(0xee2371c1cdeeee9f), I64(0x7cc791f8bb7c7ced), I64(0x6617e3cc71666685), + I64(0xdda68ea77bdddd53), I64(0x17b84b2eaf17175c), I64(0x4702468e45474701), I64(0x9e84dc211a9e9e42), + I64(0xca1ec589d4caca0f), I64(0x2d75995a582d2db4), I64(0xbf9179632ebfbfc6), I64(0x07381b0e3f07071c), + I64(0xad012347acadad8e), I64(0x5aea2fb4b05a5a75), I64(0x836cb51bef838336), I64(0x3385ff66b63333cc), + I64(0x633ff2c65c636391), I64(0x02100a0412020208), I64(0xaa39384993aaaa92), I64(0x71afa8e2de7171d9), + I64(0xc80ecf8dc6c8c807), I64(0x19c87d32d1191964), I64(0x497270923b494939), I64(0xd9869aaf5fd9d943), + I64(0xf2c31df931f2f2ef), I64(0xe34b48dba8e3e3ab), I64(0x5be22ab6b95b5b71), I64(0x8834920dbc88881a), + I64(0x9aa4c8293e9a9a52), I64(0x262dbe4c0b262698), I64(0x328dfa64bf3232c8), I64(0xb0e94a7d59b0b0fa), + I64(0xe91b6acff2e9e983), I64(0x0f78331e770f0f3c), I64(0xd5e6a6b733d5d573), I64(0x8074ba1df480803a), + I64(0xbe997c6127bebec2), I64(0xcd26de87ebcdcd13), I64(0x34bde468893434d0), I64(0x487a75903248483d), + I64(0xffab24e354ffffdb), I64(0x7af78ff48d7a7af5), I64(0x90f4ea3d6490907a), I64(0x5fc23ebe9d5f5f61), + I64(0x201da0403d202080), I64(0x6867d5d00f6868bd), I64(0x1ad07234ca1a1a68), I64(0xae192c41b7aeae82), + I64(0xb4c95e757db4b4ea), I64(0x549a19a8ce54544d), I64(0x93ece53b7f939376), I64(0x220daa442f222288), + I64(0x6407e9c86364648d), I64(0xf1db12ff2af1f1e3), I64(0x73bfa2e6cc7373d1), I64(0x12905a2482121248), + I64(0x403a5d807a40401d), I64(0x0840281048080820), I64(0xc356e89b95c3c32b), I64(0xec337bc5dfecec97), + I64(0xdb9690ab4ddbdb4b), I64(0xa1611f5fc0a1a1be), I64(0x8d1c8307918d8d0e), I64(0x3df5c97ac83d3df4), + I64(0x97ccf1335b979766), I64(0x0000000000000000), I64(0xcf36d483f9cfcf1b), I64(0x2b4587566e2b2bac), + I64(0x7697b3ece17676c5), I64(0x8264b019e6828232), I64(0xd6fea9b128d6d67f), I64(0x1bd87736c31b1b6c), + I64(0xb5c15b7774b5b5ee), I64(0xaf112943beafaf86), I64(0x6a77dfd41d6a6ab5), I64(0x50ba0da0ea50505d), + I64(0x45124c8a57454509), I64(0xf3cb18fb38f3f3eb), I64(0x309df060ad3030c0), I64(0xef2b74c3c4efef9b), + I64(0x3fe5c37eda3f3ffc), I64(0x55921caac7555549), I64(0xa2791059dba2a2b2), I64(0xea0365c9e9eaea8f), + I64(0x650fecca6a656589), I64(0xbab9686903babad2), I64(0x2f65935e4a2f2fbc), I64(0xc04ee79d8ec0c027), + I64(0xdebe81a160dede5f), I64(0x1ce06c38fc1c1c70), I64(0xfdbb2ee746fdfdd3), I64(0x4d52649a1f4d4d29), + I64(0x92e4e03976929272), I64(0x758fbceafa7575c9), I64(0x06301e0c36060618), I64(0x8a249809ae8a8a12), + I64(0xb2f940794bb2b2f2), I64(0xe66359d185e6e6bf), I64(0x0e70361c7e0e0e38), I64(0x1ff8633ee71f1f7c), + I64(0x6237f7c455626295), I64(0xd4eea3b53ad4d477), I64(0xa829324d81a8a89a), I64(0x96c4f43152969662), + I64(0xf99b3aef62f9f9c3), I64(0xc566f697a3c5c533), I64(0x2535b14a10252594), I64(0x59f220b2ab595979), + I64(0x8454ae15d084842a), I64(0x72b7a7e4c57272d5), I64(0x39d5dd72ec3939e4), I64(0x4c5a6198164c4c2d), + I64(0x5eca3bbc945e5e65), I64(0x78e785f09f7878fd), I64(0x38ddd870e53838e0), I64(0x8c148605988c8c0a), + I64(0xd1c6b2bf17d1d163), I64(0xa5410b57e4a5a5ae), I64(0xe2434dd9a1e2e2af), I64(0x612ff8c24e616199), + I64(0xb3f1457b42b3b3f6), I64(0x2115a54234212184), I64(0x9c94d625089c9c4a), I64(0x1ef0663cee1e1e78), + I64(0x4322528661434311), I64(0xc776fc93b1c7c73b), I64(0xfcb32be54ffcfcd7), I64(0x0420140824040410), + I64(0x51b208a2e3515159), I64(0x99bcc72f2599995e), I64(0x6d4fc4da226d6da9), I64(0x0d68391a650d0d34), + I64(0xfa8335e979fafacf), I64(0xdfb684a369dfdf5b), I64(0x7ed79bfca97e7ee5), I64(0x243db44819242490), + I64(0x3bc5d776fe3b3bec), I64(0xab313d4b9aabab96), I64(0xce3ed181f0cece1f), I64(0x1188552299111144), + I64(0x8f0c8903838f8f06), I64(0x4e4a6b9c044e4e25), I64(0xb7d1517366b7b7e6), I64(0xeb0b60cbe0ebeb8b), + I64(0x3cfdcc78c13c3cf0), I64(0x817cbf1ffd81813e), I64(0x94d4fe354094946a), I64(0xf7eb0cf31cf7f7fb), + I64(0xb9a1676f18b9b9de), I64(0x13985f268b13134c), I64(0x2c7d9c58512c2cb0), I64(0xd3d6b8bb05d3d36b), + I64(0xe76b5cd38ce7e7bb), I64(0x6e57cbdc396e6ea5), I64(0xc46ef395aac4c437), I64(0x03180f061b03030c), + I64(0x568a13acdc565645), I64(0x441a49885e44440d), I64(0x7fdf9efea07f7fe1), I64(0xa921374f88a9a99e), + I64(0x2a4d8254672a2aa8), I64(0xbbb16d6b0abbbbd6), I64(0xc146e29f87c1c123), I64(0x53a202a6f1535351), + I64(0xdcae8ba572dcdc57), I64(0x0b582716530b0b2c), I64(0x9d9cd327019d9d4e), I64(0x6c47c1d82b6c6cad), + I64(0x3195f562a43131c4), I64(0x7487b9e8f37474cd), I64(0xf6e309f115f6f6ff), I64(0x460a438c4c464605), + I64(0xac092645a5acac8a), I64(0x893c970fb589891e), I64(0x14a04428b4141450), I64(0xe15b42dfbae1e1a3), + I64(0x16b04e2ca6161658), I64(0x3acdd274f73a3ae8), I64(0x696fd0d2066969b9), I64(0x09482d1241090924), + I64(0x70a7ade0d77070dd), I64(0xb6d954716fb6b6e2), I64(0xd0ceb7bd1ed0d067), I64(0xed3b7ec7d6eded93), + I64(0xcc2edb85e2cccc17), I64(0x422a578468424215), I64(0x98b4c22d2c98985a), I64(0xa4490e55eda4a4aa), + I64(0x285d8850752828a0), I64(0x5cda31b8865c5c6d), I64(0xf8933fed6bf8f8c7), I64(0x8644a411c2868622), + }, { + // C6 vectors + I64(0x6018c07830d81818), I64(0x8c2305af46262323), I64(0x3fc67ef991b8c6c6), I64(0x87e8136fcdfbe8e8), + I64(0x26874ca113cb8787), I64(0xdab8a9626d11b8b8), I64(0x0401080502090101), I64(0x214f426e9e0d4f4f), + I64(0xd836adee6c9b3636), I64(0xa2a6590451ffa6a6), I64(0x6fd2debdb90cd2d2), I64(0xf3f5fb06f70ef5f5), + I64(0xf979ef80f2967979), I64(0xa16f5fcede306f6f), I64(0x7e91fcef3f6d9191), I64(0x5552aa07a4f85252), + I64(0x9d6027fdc0476060), I64(0xcabc89766535bcbc), I64(0x569baccd2b379b9b), I64(0x028e048c018a8e8e), + I64(0xb6a371155bd2a3a3), I64(0x300c603c186c0c0c), I64(0xf17bff8af6847b7b), I64(0xd435b5e16a803535), + I64(0x741de8693af51d1d), I64(0xa7e05347ddb3e0e0), I64(0x7bd7f6acb321d7d7), I64(0x2fc25eed999cc2c2), + I64(0xb82e6d965c432e2e), I64(0x314b627a96294b4b), I64(0xdffea321e15dfefe), I64(0x41578216aed55757), + I64(0x5415a8412abd1515), I64(0xc1779fb6eee87777), I64(0xdc37a5eb6e923737), I64(0xb3e57b56d79ee5e5), + I64(0x469f8cd923139f9f), I64(0xe7f0d317fd23f0f0), I64(0x354a6a7f94204a4a), I64(0x4fda9e95a944dada), + I64(0x7d58fa25b0a25858), I64(0x03c906ca8fcfc9c9), I64(0xa429558d527c2929), I64(0x280a5022145a0a0a), + I64(0xfeb1e14f7f50b1b1), I64(0xbaa0691a5dc9a0a0), I64(0xb16b7fdad6146b6b), I64(0x2e855cab17d98585), + I64(0xcebd8173673cbdbd), I64(0x695dd234ba8f5d5d), I64(0x4010805020901010), I64(0xf7f4f303f507f4f4), + I64(0x0bcb16c08bddcbcb), I64(0xf83eedc67cd33e3e), I64(0x140528110a2d0505), I64(0x81671fe6ce786767), + I64(0xb7e47353d597e4e4), I64(0x9c2725bb4e022727), I64(0x1941325882734141), I64(0x168b2c9d0ba78b8b), + I64(0xa6a7510153f6a7a7), I64(0xe97dcf94fab27d7d), I64(0x6e95dcfb37499595), I64(0x47d88e9fad56d8d8), + I64(0xcbfb8b30eb70fbfb), I64(0x9fee2371c1cdeeee), I64(0xed7cc791f8bb7c7c), I64(0x856617e3cc716666), + I64(0x53dda68ea77bdddd), I64(0x5c17b84b2eaf1717), I64(0x014702468e454747), I64(0x429e84dc211a9e9e), + I64(0x0fca1ec589d4caca), I64(0xb42d75995a582d2d), I64(0xc6bf9179632ebfbf), I64(0x1c07381b0e3f0707), + I64(0x8ead012347acadad), I64(0x755aea2fb4b05a5a), I64(0x36836cb51bef8383), I64(0xcc3385ff66b63333), + I64(0x91633ff2c65c6363), I64(0x0802100a04120202), I64(0x92aa39384993aaaa), I64(0xd971afa8e2de7171), + I64(0x07c80ecf8dc6c8c8), I64(0x6419c87d32d11919), I64(0x39497270923b4949), I64(0x43d9869aaf5fd9d9), + I64(0xeff2c31df931f2f2), I64(0xabe34b48dba8e3e3), I64(0x715be22ab6b95b5b), I64(0x1a8834920dbc8888), + I64(0x529aa4c8293e9a9a), I64(0x98262dbe4c0b2626), I64(0xc8328dfa64bf3232), I64(0xfab0e94a7d59b0b0), + I64(0x83e91b6acff2e9e9), I64(0x3c0f78331e770f0f), I64(0x73d5e6a6b733d5d5), I64(0x3a8074ba1df48080), + I64(0xc2be997c6127bebe), I64(0x13cd26de87ebcdcd), I64(0xd034bde468893434), I64(0x3d487a7590324848), + I64(0xdbffab24e354ffff), I64(0xf57af78ff48d7a7a), I64(0x7a90f4ea3d649090), I64(0x615fc23ebe9d5f5f), + I64(0x80201da0403d2020), I64(0xbd6867d5d00f6868), I64(0x681ad07234ca1a1a), I64(0x82ae192c41b7aeae), + I64(0xeab4c95e757db4b4), I64(0x4d549a19a8ce5454), I64(0x7693ece53b7f9393), I64(0x88220daa442f2222), + I64(0x8d6407e9c8636464), I64(0xe3f1db12ff2af1f1), I64(0xd173bfa2e6cc7373), I64(0x4812905a24821212), + I64(0x1d403a5d807a4040), I64(0x2008402810480808), I64(0x2bc356e89b95c3c3), I64(0x97ec337bc5dfecec), + I64(0x4bdb9690ab4ddbdb), I64(0xbea1611f5fc0a1a1), I64(0x0e8d1c8307918d8d), I64(0xf43df5c97ac83d3d), + I64(0x6697ccf1335b9797), I64(0x0000000000000000), I64(0x1bcf36d483f9cfcf), I64(0xac2b4587566e2b2b), + I64(0xc57697b3ece17676), I64(0x328264b019e68282), I64(0x7fd6fea9b128d6d6), I64(0x6c1bd87736c31b1b), + I64(0xeeb5c15b7774b5b5), I64(0x86af112943beafaf), I64(0xb56a77dfd41d6a6a), I64(0x5d50ba0da0ea5050), + I64(0x0945124c8a574545), I64(0xebf3cb18fb38f3f3), I64(0xc0309df060ad3030), I64(0x9bef2b74c3c4efef), + I64(0xfc3fe5c37eda3f3f), I64(0x4955921caac75555), I64(0xb2a2791059dba2a2), I64(0x8fea0365c9e9eaea), + I64(0x89650fecca6a6565), I64(0xd2bab9686903baba), I64(0xbc2f65935e4a2f2f), I64(0x27c04ee79d8ec0c0), + I64(0x5fdebe81a160dede), I64(0x701ce06c38fc1c1c), I64(0xd3fdbb2ee746fdfd), I64(0x294d52649a1f4d4d), + I64(0x7292e4e039769292), I64(0xc9758fbceafa7575), I64(0x1806301e0c360606), I64(0x128a249809ae8a8a), + I64(0xf2b2f940794bb2b2), I64(0xbfe66359d185e6e6), I64(0x380e70361c7e0e0e), I64(0x7c1ff8633ee71f1f), + I64(0x956237f7c4556262), I64(0x77d4eea3b53ad4d4), I64(0x9aa829324d81a8a8), I64(0x6296c4f431529696), + I64(0xc3f99b3aef62f9f9), I64(0x33c566f697a3c5c5), I64(0x942535b14a102525), I64(0x7959f220b2ab5959), + I64(0x2a8454ae15d08484), I64(0xd572b7a7e4c57272), I64(0xe439d5dd72ec3939), I64(0x2d4c5a6198164c4c), + I64(0x655eca3bbc945e5e), I64(0xfd78e785f09f7878), I64(0xe038ddd870e53838), I64(0x0a8c148605988c8c), + I64(0x63d1c6b2bf17d1d1), I64(0xaea5410b57e4a5a5), I64(0xafe2434dd9a1e2e2), I64(0x99612ff8c24e6161), + I64(0xf6b3f1457b42b3b3), I64(0x842115a542342121), I64(0x4a9c94d625089c9c), I64(0x781ef0663cee1e1e), + I64(0x1143225286614343), I64(0x3bc776fc93b1c7c7), I64(0xd7fcb32be54ffcfc), I64(0x1004201408240404), + I64(0x5951b208a2e35151), I64(0x5e99bcc72f259999), I64(0xa96d4fc4da226d6d), I64(0x340d68391a650d0d), + I64(0xcffa8335e979fafa), I64(0x5bdfb684a369dfdf), I64(0xe57ed79bfca97e7e), I64(0x90243db448192424), + I64(0xec3bc5d776fe3b3b), I64(0x96ab313d4b9aabab), I64(0x1fce3ed181f0cece), I64(0x4411885522991111), + I64(0x068f0c8903838f8f), I64(0x254e4a6b9c044e4e), I64(0xe6b7d1517366b7b7), I64(0x8beb0b60cbe0ebeb), + I64(0xf03cfdcc78c13c3c), I64(0x3e817cbf1ffd8181), I64(0x6a94d4fe35409494), I64(0xfbf7eb0cf31cf7f7), + I64(0xdeb9a1676f18b9b9), I64(0x4c13985f268b1313), I64(0xb02c7d9c58512c2c), I64(0x6bd3d6b8bb05d3d3), + I64(0xbbe76b5cd38ce7e7), I64(0xa56e57cbdc396e6e), I64(0x37c46ef395aac4c4), I64(0x0c03180f061b0303), + I64(0x45568a13acdc5656), I64(0x0d441a49885e4444), I64(0xe17fdf9efea07f7f), I64(0x9ea921374f88a9a9), + I64(0xa82a4d8254672a2a), I64(0xd6bbb16d6b0abbbb), I64(0x23c146e29f87c1c1), I64(0x5153a202a6f15353), + I64(0x57dcae8ba572dcdc), I64(0x2c0b582716530b0b), I64(0x4e9d9cd327019d9d), I64(0xad6c47c1d82b6c6c), + I64(0xc43195f562a43131), I64(0xcd7487b9e8f37474), I64(0xfff6e309f115f6f6), I64(0x05460a438c4c4646), + I64(0x8aac092645a5acac), I64(0x1e893c970fb58989), I64(0x5014a04428b41414), I64(0xa3e15b42dfbae1e1), + I64(0x5816b04e2ca61616), I64(0xe83acdd274f73a3a), I64(0xb9696fd0d2066969), I64(0x2409482d12410909), + I64(0xdd70a7ade0d77070), I64(0xe2b6d954716fb6b6), I64(0x67d0ceb7bd1ed0d0), I64(0x93ed3b7ec7d6eded), + I64(0x17cc2edb85e2cccc), I64(0x15422a5784684242), I64(0x5a98b4c22d2c9898), I64(0xaaa4490e55eda4a4), + I64(0xa0285d8850752828), I64(0x6d5cda31b8865c5c), I64(0xc7f8933fed6bf8f8), I64(0x228644a411c28686), + }, { + // C7 vectors + I64(0x186018c07830d818), I64(0x238c2305af462623), I64(0xc63fc67ef991b8c6), I64(0xe887e8136fcdfbe8), + I64(0x8726874ca113cb87), I64(0xb8dab8a9626d11b8), I64(0x0104010805020901), I64(0x4f214f426e9e0d4f), + I64(0x36d836adee6c9b36), I64(0xa6a2a6590451ffa6), I64(0xd26fd2debdb90cd2), I64(0xf5f3f5fb06f70ef5), + I64(0x79f979ef80f29679), I64(0x6fa16f5fcede306f), I64(0x917e91fcef3f6d91), I64(0x525552aa07a4f852), + I64(0x609d6027fdc04760), I64(0xbccabc89766535bc), I64(0x9b569baccd2b379b), I64(0x8e028e048c018a8e), + I64(0xa3b6a371155bd2a3), I64(0x0c300c603c186c0c), I64(0x7bf17bff8af6847b), I64(0x35d435b5e16a8035), + I64(0x1d741de8693af51d), I64(0xe0a7e05347ddb3e0), I64(0xd77bd7f6acb321d7), I64(0xc22fc25eed999cc2), + I64(0x2eb82e6d965c432e), I64(0x4b314b627a96294b), I64(0xfedffea321e15dfe), I64(0x5741578216aed557), + I64(0x155415a8412abd15), I64(0x77c1779fb6eee877), I64(0x37dc37a5eb6e9237), I64(0xe5b3e57b56d79ee5), + I64(0x9f469f8cd923139f), I64(0xf0e7f0d317fd23f0), I64(0x4a354a6a7f94204a), I64(0xda4fda9e95a944da), + I64(0x587d58fa25b0a258), I64(0xc903c906ca8fcfc9), I64(0x29a429558d527c29), I64(0x0a280a5022145a0a), + I64(0xb1feb1e14f7f50b1), I64(0xa0baa0691a5dc9a0), I64(0x6bb16b7fdad6146b), I64(0x852e855cab17d985), + I64(0xbdcebd8173673cbd), I64(0x5d695dd234ba8f5d), I64(0x1040108050209010), I64(0xf4f7f4f303f507f4), + I64(0xcb0bcb16c08bddcb), I64(0x3ef83eedc67cd33e), I64(0x05140528110a2d05), I64(0x6781671fe6ce7867), + I64(0xe4b7e47353d597e4), I64(0x279c2725bb4e0227), I64(0x4119413258827341), I64(0x8b168b2c9d0ba78b), + I64(0xa7a6a7510153f6a7), I64(0x7de97dcf94fab27d), I64(0x956e95dcfb374995), I64(0xd847d88e9fad56d8), + I64(0xfbcbfb8b30eb70fb), I64(0xee9fee2371c1cdee), I64(0x7ced7cc791f8bb7c), I64(0x66856617e3cc7166), + I64(0xdd53dda68ea77bdd), I64(0x175c17b84b2eaf17), I64(0x47014702468e4547), I64(0x9e429e84dc211a9e), + I64(0xca0fca1ec589d4ca), I64(0x2db42d75995a582d), I64(0xbfc6bf9179632ebf), I64(0x071c07381b0e3f07), + I64(0xad8ead012347acad), I64(0x5a755aea2fb4b05a), I64(0x8336836cb51bef83), I64(0x33cc3385ff66b633), + I64(0x6391633ff2c65c63), I64(0x020802100a041202), I64(0xaa92aa39384993aa), I64(0x71d971afa8e2de71), + I64(0xc807c80ecf8dc6c8), I64(0x196419c87d32d119), I64(0x4939497270923b49), I64(0xd943d9869aaf5fd9), + I64(0xf2eff2c31df931f2), I64(0xe3abe34b48dba8e3), I64(0x5b715be22ab6b95b), I64(0x881a8834920dbc88), + I64(0x9a529aa4c8293e9a), I64(0x2698262dbe4c0b26), I64(0x32c8328dfa64bf32), I64(0xb0fab0e94a7d59b0), + I64(0xe983e91b6acff2e9), I64(0x0f3c0f78331e770f), I64(0xd573d5e6a6b733d5), I64(0x803a8074ba1df480), + I64(0xbec2be997c6127be), I64(0xcd13cd26de87ebcd), I64(0x34d034bde4688934), I64(0x483d487a75903248), + I64(0xffdbffab24e354ff), I64(0x7af57af78ff48d7a), I64(0x907a90f4ea3d6490), I64(0x5f615fc23ebe9d5f), + I64(0x2080201da0403d20), I64(0x68bd6867d5d00f68), I64(0x1a681ad07234ca1a), I64(0xae82ae192c41b7ae), + I64(0xb4eab4c95e757db4), I64(0x544d549a19a8ce54), I64(0x937693ece53b7f93), I64(0x2288220daa442f22), + I64(0x648d6407e9c86364), I64(0xf1e3f1db12ff2af1), I64(0x73d173bfa2e6cc73), I64(0x124812905a248212), + I64(0x401d403a5d807a40), I64(0x0820084028104808), I64(0xc32bc356e89b95c3), I64(0xec97ec337bc5dfec), + I64(0xdb4bdb9690ab4ddb), I64(0xa1bea1611f5fc0a1), I64(0x8d0e8d1c8307918d), I64(0x3df43df5c97ac83d), + I64(0x976697ccf1335b97), I64(0x0000000000000000), I64(0xcf1bcf36d483f9cf), I64(0x2bac2b4587566e2b), + I64(0x76c57697b3ece176), I64(0x82328264b019e682), I64(0xd67fd6fea9b128d6), I64(0x1b6c1bd87736c31b), + I64(0xb5eeb5c15b7774b5), I64(0xaf86af112943beaf), I64(0x6ab56a77dfd41d6a), I64(0x505d50ba0da0ea50), + I64(0x450945124c8a5745), I64(0xf3ebf3cb18fb38f3), I64(0x30c0309df060ad30), I64(0xef9bef2b74c3c4ef), + I64(0x3ffc3fe5c37eda3f), I64(0x554955921caac755), I64(0xa2b2a2791059dba2), I64(0xea8fea0365c9e9ea), + I64(0x6589650fecca6a65), I64(0xbad2bab9686903ba), I64(0x2fbc2f65935e4a2f), I64(0xc027c04ee79d8ec0), + I64(0xde5fdebe81a160de), I64(0x1c701ce06c38fc1c), I64(0xfdd3fdbb2ee746fd), I64(0x4d294d52649a1f4d), + I64(0x927292e4e0397692), I64(0x75c9758fbceafa75), I64(0x061806301e0c3606), I64(0x8a128a249809ae8a), + I64(0xb2f2b2f940794bb2), I64(0xe6bfe66359d185e6), I64(0x0e380e70361c7e0e), I64(0x1f7c1ff8633ee71f), + I64(0x62956237f7c45562), I64(0xd477d4eea3b53ad4), I64(0xa89aa829324d81a8), I64(0x966296c4f4315296), + I64(0xf9c3f99b3aef62f9), I64(0xc533c566f697a3c5), I64(0x25942535b14a1025), I64(0x597959f220b2ab59), + I64(0x842a8454ae15d084), I64(0x72d572b7a7e4c572), I64(0x39e439d5dd72ec39), I64(0x4c2d4c5a6198164c), + I64(0x5e655eca3bbc945e), I64(0x78fd78e785f09f78), I64(0x38e038ddd870e538), I64(0x8c0a8c148605988c), + I64(0xd163d1c6b2bf17d1), I64(0xa5aea5410b57e4a5), I64(0xe2afe2434dd9a1e2), I64(0x6199612ff8c24e61), + I64(0xb3f6b3f1457b42b3), I64(0x21842115a5423421), I64(0x9c4a9c94d625089c), I64(0x1e781ef0663cee1e), + I64(0x4311432252866143), I64(0xc73bc776fc93b1c7), I64(0xfcd7fcb32be54ffc), I64(0x0410042014082404), + I64(0x515951b208a2e351), I64(0x995e99bcc72f2599), I64(0x6da96d4fc4da226d), I64(0x0d340d68391a650d), + I64(0xfacffa8335e979fa), I64(0xdf5bdfb684a369df), I64(0x7ee57ed79bfca97e), I64(0x2490243db4481924), + I64(0x3bec3bc5d776fe3b), I64(0xab96ab313d4b9aab), I64(0xce1fce3ed181f0ce), I64(0x1144118855229911), + I64(0x8f068f0c8903838f), I64(0x4e254e4a6b9c044e), I64(0xb7e6b7d1517366b7), I64(0xeb8beb0b60cbe0eb), + I64(0x3cf03cfdcc78c13c), I64(0x813e817cbf1ffd81), I64(0x946a94d4fe354094), I64(0xf7fbf7eb0cf31cf7), + I64(0xb9deb9a1676f18b9), I64(0x134c13985f268b13), I64(0x2cb02c7d9c58512c), I64(0xd36bd3d6b8bb05d3), + I64(0xe7bbe76b5cd38ce7), I64(0x6ea56e57cbdc396e), I64(0xc437c46ef395aac4), I64(0x030c03180f061b03), + I64(0x5645568a13acdc56), I64(0x440d441a49885e44), I64(0x7fe17fdf9efea07f), I64(0xa99ea921374f88a9), + I64(0x2aa82a4d8254672a), I64(0xbbd6bbb16d6b0abb), I64(0xc123c146e29f87c1), I64(0x535153a202a6f153), + I64(0xdc57dcae8ba572dc), I64(0x0b2c0b582716530b), I64(0x9d4e9d9cd327019d), I64(0x6cad6c47c1d82b6c), + I64(0x31c43195f562a431), I64(0x74cd7487b9e8f374), I64(0xf6fff6e309f115f6), I64(0x4605460a438c4c46), + I64(0xac8aac092645a5ac), I64(0x891e893c970fb589), I64(0x145014a04428b414), I64(0xe1a3e15b42dfbae1), + I64(0x165816b04e2ca616), I64(0x3ae83acdd274f73a), I64(0x69b9696fd0d20669), I64(0x092409482d124109), + I64(0x70dd70a7ade0d770), I64(0xb6e2b6d954716fb6), I64(0xd067d0ceb7bd1ed0), I64(0xed93ed3b7ec7d6ed), + I64(0xcc17cc2edb85e2cc), I64(0x4215422a57846842), I64(0x985a98b4c22d2c98), I64(0xa4aaa4490e55eda4), + I64(0x28a0285d88507528), I64(0x5c6d5cda31b8865c), I64(0xf8c7f8933fed6bf8), I64(0x86228644a411c286), + } +}; +/* end of whirlpool_sbox array */ + +#define WHIRLPOOL_OP(src, shift) ( \ + rhash_whirlpool_sbox[0][(int)(src[ shift & 7] >> 56) ] ^ \ + rhash_whirlpool_sbox[1][(int)(src[(shift + 7) & 7] >> 48) & 0xff] ^ \ + rhash_whirlpool_sbox[2][(int)(src[(shift + 6) & 7] >> 40) & 0xff] ^ \ + rhash_whirlpool_sbox[3][(int)(src[(shift + 5) & 7] >> 32) & 0xff] ^ \ + rhash_whirlpool_sbox[4][(int)(src[(shift + 4) & 7] >> 24) & 0xff] ^ \ + rhash_whirlpool_sbox[5][(int)(src[(shift + 3) & 7] >> 16) & 0xff] ^ \ + rhash_whirlpool_sbox[6][(int)(src[(shift + 2) & 7] >> 8) & 0xff] ^ \ + rhash_whirlpool_sbox[7][(int)(src[(shift + 1) & 7] ) & 0xff]) + +/** + * The core transformation. Process a 512-bit block. + * + * @param hash algorithm state + * @param block the message block to process + */ +static void rhash_whirlpool_process_block(uint64_t *hash, uint64_t* p_block) +{ + int i; /* loop counter */ + uint64_t K[2][8]; /* key */ + uint64_t state[2][8]; /* state */ + + /* alternating binary flags */ + unsigned int m = 0; + + /* the number of rounds of the internal dedicated block cipher */ + const int number_of_rounds = 10; + + /* array used in the rounds */ + static const uint64_t rc[10] = { + I64(0x1823c6e887b8014f), + I64(0x36a6d2f5796f9152), + I64(0x60bc9b8ea30c7b35), + I64(0x1de0d7c22e4bfe57), + I64(0x157737e59ff04ada), + I64(0x58c9290ab1a06b85), + I64(0xbd5d10f4cb3e0567), + I64(0xe427418ba77d95d8), + I64(0xfbee7c66dd17479e), + I64(0xca2dbf07ad5a8333) + }; + + /* map the message buffer to a block */ + for (i = 0; i < 8; i++) { + /* store K^0 and xor it with the intermediate hash state */ + K[0][i] = hash[i]; + state[0][i] = be2me_64(p_block[i]) ^ hash[i]; + hash[i] = state[0][i]; + } + + /* iterate over algorithm rounds */ + for (i = 0; i < number_of_rounds; i++) + { + /* compute K^i from K^{i-1} */ + K[m ^ 1][0] = WHIRLPOOL_OP(K[m], 0) ^ rc[i]; + K[m ^ 1][1] = WHIRLPOOL_OP(K[m], 1); + K[m ^ 1][2] = WHIRLPOOL_OP(K[m], 2); + K[m ^ 1][3] = WHIRLPOOL_OP(K[m], 3); + K[m ^ 1][4] = WHIRLPOOL_OP(K[m], 4); + K[m ^ 1][5] = WHIRLPOOL_OP(K[m], 5); + K[m ^ 1][6] = WHIRLPOOL_OP(K[m], 6); + K[m ^ 1][7] = WHIRLPOOL_OP(K[m], 7); + + /* apply the i-th round transformation */ + state[m ^ 1][0] = WHIRLPOOL_OP(state[m], 0) ^ K[m ^ 1][0]; + state[m ^ 1][1] = WHIRLPOOL_OP(state[m], 1) ^ K[m ^ 1][1]; + state[m ^ 1][2] = WHIRLPOOL_OP(state[m], 2) ^ K[m ^ 1][2]; + state[m ^ 1][3] = WHIRLPOOL_OP(state[m], 3) ^ K[m ^ 1][3]; + state[m ^ 1][4] = WHIRLPOOL_OP(state[m], 4) ^ K[m ^ 1][4]; + state[m ^ 1][5] = WHIRLPOOL_OP(state[m], 5) ^ K[m ^ 1][5]; + state[m ^ 1][6] = WHIRLPOOL_OP(state[m], 6) ^ K[m ^ 1][6]; + state[m ^ 1][7] = WHIRLPOOL_OP(state[m], 7) ^ K[m ^ 1][7]; + + m = m ^ 1; + } + + /* apply the Miyaguchi-Preneel compression function */ + hash[0] ^= state[0][0]; + hash[1] ^= state[0][1]; + hash[2] ^= state[0][2]; + hash[3] ^= state[0][3]; + hash[4] ^= state[0][4]; + hash[5] ^= state[0][5]; + hash[6] ^= state[0][6]; + hash[7] ^= state[0][7]; +} + +/** + * Calculate message hash. + * Can be called repeatedly with chunks of the message to be hashed. + * + * @param ctx the algorithm context containing current hashing state + * @param msg message chunk + * @param size length of the message chunk + */ +void rhash_whirlpool_update(whirlpool_ctx *ctx, const unsigned char* msg, size_t size) +{ + unsigned index = (unsigned)ctx->length & 63; + unsigned left; + ctx->length += size; + + /* fill partial block */ + if (index) { + left = whirlpool_block_size - index; + memcpy(ctx->message + index, msg, (size < left ? size : left)); + if (size < left) return; + + /* process partial block */ + rhash_whirlpool_process_block(ctx->hash, (uint64_t*)ctx->message); + msg += left; + size -= left; + } + while (size >= whirlpool_block_size) { + uint64_t* aligned_message_block; + if (IS_ALIGNED_64(msg)) { + /* the most common case is processing of an already aligned message + without copying it */ + aligned_message_block = (uint64_t*)msg; + } else { + memcpy(ctx->message, msg, whirlpool_block_size); + aligned_message_block = (uint64_t*)ctx->message; + } + + rhash_whirlpool_process_block(ctx->hash, aligned_message_block); + msg += whirlpool_block_size; + size -= whirlpool_block_size; + } + if (size) { + /* save leftovers */ + memcpy(ctx->message, msg, size); + } +} + +/** + * Store calculated hash into the given array. + * + * @param ctx the algorithm context containing current hashing state + * @param result calculated hash in binary form + */ +void rhash_whirlpool_final(whirlpool_ctx *ctx, unsigned char* result) +{ + unsigned index = (unsigned)ctx->length & 63; + uint64_t* msg64 = (uint64_t*)ctx->message; + + /* pad message and run for last block */ + ctx->message[index++] = 0x80; + + /* if no room left in the message to store 256-bit message length */ + if (index > 32) { + /* then pad the rest with zeros and process it */ + while (index < 64) { + ctx->message[index++] = 0; + } + rhash_whirlpool_process_block(ctx->hash, msg64); + index = 0; + } + /* due to optimization actually only 64-bit of message length are stored */ + while (index < 56) { + ctx->message[index++] = 0; + } + msg64[7] = be2me_64(ctx->length << 3); + rhash_whirlpool_process_block(ctx->hash, msg64); + + /* save result hash */ + be64_copy(result, 0, ctx->hash, 64); +} + +#ifdef __cplusplus +} +#endif diff --git a/web/yaamp/core/backend/rawcoins.php b/web/yaamp/core/backend/rawcoins.php index 769dea997..c9001104d 100644 --- a/web/yaamp/core/backend/rawcoins.php +++ b/web/yaamp/core/backend/rawcoins.php @@ -416,6 +416,22 @@ function updateRawcoins() } } + if (!exchange_get('tradeogre', 'disabled')) { + $list = tradeogre_api_query('markets'); + if(is_array($list) && !empty($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='tradeogre'"); + foreach($list as $ticker) { + $symbol_index = key($ticker); + $e = explode('-', $symbol_index); + if (strtoupper($e[0]) !== 'BTC') + continue; + $symbol = strtoupper($e[1]); + updateRawCoin('tradeogre', $symbol); + } + } + } + if (!exchange_get('tradesatoshi', 'disabled')) { $data = tradesatoshi_api_query('getcurrencies'); if(is_object($data) && !empty($data->result)) diff --git a/web/yaamp/core/backend/rawcoins.php.bak b/web/yaamp/core/backend/rawcoins.php.bak new file mode 100644 index 000000000..769dea997 --- /dev/null +++ b/web/yaamp/core/backend/rawcoins.php.bak @@ -0,0 +1,551 @@ +result) && !empty($list->result)) + { + dborun("UPDATE markets SET deleted=true WHERE name='bittrex'"); + foreach($list->result as $currency) { + if ($currency->Currency == 'BTC') { + exchange_set('bittrex', 'withdraw_fee_btc', $currency->TxFee); + continue; + } + updateRawCoin('bittrex', $currency->Currency, $currency->CurrencyLong); + } + } + } + + if (!exchange_get('bitfinex', 'disabled')) { + $list = bitfinex_api_query('symbols'); + if(is_array($list) && !empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='bitfinex'"); + foreach ($list as $pair) { + if (strpos($pair, 'usd') || !strpos($pair, 'btc')) continue; + $symbol = strtoupper(str_replace('btc', '', $pair)); + updateRawCoin('bitfinex', $symbol); + } + } + } + + if (!exchange_get('bitz', 'disabled')) { + $list = bitz_api_query('tickerall'); + if (!empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='bitz'"); + foreach($list as $c => $ticker) { + $e = explode('_', $c); + if (strtoupper($e[1]) !== 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('bitz', $symbol); + } + } + } + + if (!exchange_get('bleutrade', 'disabled')) { + $list = bleutrade_api_query('public/getcurrencies'); + if(isset($list->result) && !empty($list->result)) + { + dborun("UPDATE markets SET deleted=true WHERE name='bleutrade'"); + foreach($list->result as $currency) { + if ($currency->Currency == 'BTC') { + exchange_set('bleutrade', 'withdraw_fee_btc', $currency->TxFee); + continue; + } + updateRawCoin('bleutrade', $currency->Currency, $currency->CurrencyLong); + } + } + } + + if (!exchange_get('coinbene', 'disabled')) { + $data = coinbene_api_query('market/symbol'); + $list = objSafeVal($data, 'symbol'); + if(is_array($list) && !empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='coinbene'"); + foreach($list as $ticker) { + if ($ticker->quoteAsset != 'BTC') continue; + $symbol = $ticker->baseAsset; + updateRawCoin('coinbene', $symbol); + } + } + } + + if (!exchange_get('crex24', 'disabled')) { + $list = crex24_api_query('currencies'); + if(is_array($list) && !empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='crex24'"); + foreach ($list as $currency) { + $symbol = objSafeVal($currency, 'symbol'); + $name = objSafeVal($currency, 'name'); + if ($currency->isFiat || $currency->isDelisted) continue; + updateRawCoin('crex24', $symbol, $name); + } + } + } + + if (!exchange_get('poloniex', 'disabled')) { + $poloniex = new poloniex; + $tickers = $poloniex->get_currencies(); + if (!$tickers) + $tickers = array(); + else + dborun("UPDATE markets SET deleted=true WHERE name='poloniex'"); + foreach($tickers as $symbol=>$ticker) + { + if(arraySafeVal($ticker,'disabled')) continue; + if(arraySafeVal($ticker,'delisted')) continue; + updateRawCoin('poloniex', $symbol); + } + } + + if (!exchange_get('c-cex', 'disabled')) { + $ccex = new CcexAPI; + $list = $ccex->getPairs(); + if($list) + { + sleep(1); + $names = $ccex->getCoinNames(); + + dborun("UPDATE markets SET deleted=true WHERE name='c-cex'"); + foreach($list as $item) + { + $e = explode('-', $item); + $symbol = strtoupper($e[0]); + + updateRawCoin('c-cex', $symbol, arraySafeVal($names, $e[0], 'unknown')); + } + } + } + + if (!exchange_get('bter', 'disabled')) { + $list = bter_api_query('marketlist'); + if(is_object($list) && is_array($list->data)) + { + dborun("UPDATE markets SET deleted=true WHERE name='bter'"); + foreach($list->data as $item) { + if (strtoupper($item->curr_b) !== 'BTC') + continue; + if (strpos($item->name, 'Asset') !== false) + continue; + if (strpos($item->name, 'BitShares') !== false && $item->symbol != 'BTS') + continue; + // ignore some dead coins and assets + if (in_array($item->symbol, array('BITGLD','DICE','ROX','TOKEN'))) + continue; + updateRawCoin('bter', $item->symbol, $item->name); + } + } + } + + if (!exchange_get('yobit', 'disabled')) { + $res = yobit_api_query('info'); + if($res) + { + dborun("UPDATE markets SET deleted=true WHERE name='yobit'"); + foreach($res->pairs as $i=>$item) + { + $e = explode('_', $i); + $symbol = strtoupper($e[0]); + updateRawCoin('yobit', $symbol); + } + } + } + + if (!exchange_get('coinexchange', 'disabled')) { + $list = coinexchange_api_query('getmarkets'); + if(isset($list->result) && !empty($list->result)) + { + dborun("UPDATE markets SET deleted=true WHERE name='coinexchange'"); + foreach($list->result as $item) { + if ($item->BaseCurrencyCode != 'BTC') + continue; + $symbol = $item->MarketAssetCode; + $label = objSafeVal($item, 'MarketAssetName'); + updateRawCoin('coinexchange', $symbol, $label); + } + } + } + + if (!exchange_get('coinsmarkets', 'disabled')) { + $list = coinsmarkets_api_query('apicoin'); + if(!empty($list) && is_array($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='coinsmarkets'"); + foreach($list as $pair=>$data) { + $e = explode('_', $pair); + if ($e[0] != 'BTC') continue; + $symbol = strtoupper($e[1]); + updateRawCoin('coinsmarkets', $symbol); + } + } + } + + if (!exchange_get('cryptopia', 'disabled')) { + $list = cryptopia_api_query('GetMarkets'); + if(isset($list->Data)) + { + dborun("UPDATE markets SET deleted=true WHERE name='cryptopia'"); + foreach($list->Data as $item) { + $e = explode('/', $item->Label); + if (strtoupper($e[1]) !== 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('cryptopia', $symbol); + } + } + } + + if (!exchange_get('cryptobridge', 'disabled')) { + $list = cryptobridge_api_query('ticker'); + if(is_array($list) && !empty($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='cryptobridge'"); + foreach($list as $ticker) { + $e = explode('_', $ticker->id); + if (strtoupper($e[1]) !== 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('cryptobridge', $symbol); + } + } + } + + if (!exchange_get('escodex', 'disabled')) { + $list = escodex_api_query('ticker'); + if(is_array($list) && !empty($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='escodex'"); + foreach($list as $ticker) { + #debuglog (json_encode($ticker)); + if (strtoupper($ticker->base) !== 'BTC') + continue; + $symbol = strtoupper($ticker->quote); + updateRawCoin('escodex', $symbol); + } + } + } + + if (!exchange_get('hitbtc', 'disabled')) { + $list = hitbtc_api_query('symbols'); + if(is_object($list) && isset($list->symbols) && is_array($list->symbols)) + { + dborun("UPDATE markets SET deleted=true WHERE name='hitbtc'"); + foreach($list->symbols as $data) { + $base = strtoupper($data->currency); + if ($base != 'BTC') continue; + $symbol = strtoupper($data->commodity); + updateRawCoin('hitbtc', $symbol); + } + } + } + + if (!exchange_get('kraken', 'disabled')) { + $list = kraken_api_query('AssetPairs'); + if(is_array($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='kraken'"); + foreach($list as $pair => $item) { + $pairs = explode('-', $pair); + $base = reset($pairs); $symbol = end($pairs); + if($symbol == 'BTC' || $base != 'BTC') continue; + if(in_array($symbol, array('GBP','CAD','EUR','USD','JPY'))) continue; + if(strpos($symbol,'.d') !== false) continue; + $symbol = strtoupper($symbol); + updateRawCoin('kraken', $symbol); + } + } + } + + if (!exchange_get('alcurex', 'disabled')) { + $list = alcurex_api_query('market','?info=on'); + if(is_object($list) && isset($list->MARKETS)) + { + dborun("UPDATE markets SET deleted=true WHERE name='alcurex'"); + foreach($list->MARKETS as $item) { + $e = explode('_', $item->Pair); + $symbol = strtoupper($e[0]); + updateRawCoin('alcurex', $symbol); + } + } + } + + if (!exchange_get('binance', 'disabled')) { + $list = binance_api_query('ticker/allBookTickers'); + if(is_array($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='binance'"); + foreach($list as $ticker) { + $base = substr($ticker->symbol, -3, 3); + // XXXBTC XXXETH BTCUSDT (no separator!) + if ($base != 'BTC') continue; + $symbol = substr($ticker->symbol, 0, strlen($ticker->symbol)-3); + updateRawCoin('binance', $symbol); + } + } + } + + if (!exchange_get('gateio', 'disabled')) { + $json = gateio_api_query('marketlist'); + $list = arraySafeVal($json,'data'); + if(!empty($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='gateio'"); + foreach($list as $item) { + if ($item['curr_b'] != 'BTC') + continue; + $symbol = trim(strtoupper($item['symbol'])); + $name = trim($item['name']); + updateRawCoin('gateio', $symbol, $name); + } + } + } + + if (!exchange_get('nova', 'disabled')) { + $list = nova_api_query('markets'); + if(is_object($list) && !empty($list->markets)) + { + dborun("UPDATE markets SET deleted=true WHERE name='nova'"); + foreach($list->markets as $item) { + if ($item->basecurrency != 'BTC') + continue; + $symbol = strtoupper($item->currency); + updateRawCoin('nova', $symbol); + //debuglog("nova: $symbol"); + } + } + } + + if (!exchange_get('stocksexchange', 'disabled')) { + $list = stocksexchange_api_query('markets'); + if(is_array($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='stocksexchange'"); + foreach($list as $item) { + if ($item->partner != 'BTC') + continue; + if ($item->active == false) + continue; + $symbol = strtoupper($item->currency); + $name = trim($item->currency_long); + updateRawCoin('stocksexchange', $symbol, $name); + } + } + } + + if (!exchange_get('empoex', 'disabled')) { + $list = empoex_api_query('marketinfo'); + if(is_array($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='empoex'"); + foreach($list as $item) { + $e = explode('-', $item->pairname); + $base = strtoupper($e[1]); + if ($base != 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('empoex', $symbol); + } + } + } + + if (!exchange_get('kucoin', 'disabled')) { + $list = kucoin_api_query('currencies'); + if(is_object($list) && isset($list->data) && !empty($list->data)) + { + dborun("UPDATE markets SET deleted=true WHERE name='kucoin'"); + foreach($list->data as $item) { + $symbol = $item->name; + $name = $item->fullName; + if (strpos($item->withdrawRemark,'Ethereum')) continue; + updateRawCoin('kucoin', $symbol, $name); + } + } + } + + if (!exchange_get('livecoin', 'disabled')) { + $list = livecoin_api_query('exchange/ticker'); + if(is_array($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='livecoin'"); + foreach($list as $item) { + $e = explode('/', $item->symbol); + $base = strtoupper($e[1]); + if ($base != 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('livecoin', $symbol); + } + } + } + + if (!exchange_get('shapeshift', 'disabled')) { + $list = shapeshift_api_query('getcoins'); + if(is_array($list) && !empty($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='shapeshift'"); + foreach($list as $item) { + $status = $item['status']; + if ($status != 'available') continue; + $symbol = strtoupper($item['symbol']); + $name = trim($item['name']); + updateRawCoin('shapeshift', $symbol, $name); + //debuglog("shapeshift: $symbol $name"); + } + } + } + + if (!exchange_get('tradesatoshi', 'disabled')) { + $data = tradesatoshi_api_query('getcurrencies'); + if(is_object($data) && !empty($data->result)) + { + dborun("UPDATE markets SET deleted=true WHERE name='tradesatoshi'"); + foreach($data->result as $item) { + $symbol = $item->currency; + $name = trim($item->currencyLong); + updateRawCoin('tradesatoshi', $symbol, $name); + } + } + } + + if (!exchange_get('zebitex', 'disabled')) { + $data = zebitex_api_user('funds'); // private API contains coin labels + if(!empty($data)) { + dborun("UPDATE markets SET deleted=true WHERE name='zebitex'"); + foreach ($data as $currency) { + $symbol = objSafeVal($currency, 'code'); + $name = objSafeVal($currency, 'title'); + updateRawCoin('zebitex', $symbol, $name); + } + } + } + ////////////////////////////////////////////////////////// + + $markets = dbocolumn("SELECT DISTINCT name FROM markets"); + foreach ($markets as $exchange) { + if (exchange_get($exchange, 'disabled')) { + $res = dborun("UPDATE markets SET disabled=8 WHERE name='$exchange'"); + if(!$res) continue; + $coins = getdbolist('db_coins', "id IN (SELECT coinid FROM markets WHERE name='$exchange')"); + foreach($coins as $coin) { + // allow to track a single market on a disabled exchange (dev test) + if (market_get($exchange, $coin->getOfficialSymbol(), 'disabled', 1) == 0) { + $res -= dborun("UPDATE markets SET disabled=0 WHERE name='$exchange' AND coinid={$coin->id}"); + } + } + debuglog("$exchange: $res markets disabled from db settings"); + } else { + $res = dborun("UPDATE markets SET disabled=0 WHERE name='$exchange' AND disabled=8"); + if($res) debuglog("$exchange: $res markets re-enabled from db settings"); + } + } + + dborun("DELETE FROM markets WHERE deleted"); + + $list = getdbolist('db_coins', "not enable and not installed and id not in (select distinct coinid from markets)"); + foreach($list as $coin) + { + if ($coin->visible) + debuglog("{$coin->symbol} is no longer active"); + // todo: proper cleanup in all tables (like "yiimp coin SYM delete") + // if ($coin->symbol != 'BTC') + // $coin->delete(); + } +} + +function updateRawCoin($marketname, $symbol, $name='unknown') +{ + if($symbol == 'BTC') return; + + $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); + if(!$coin && YAAMP_CREATE_NEW_COINS) + { + $algo = ''; + if ($marketname == 'cryptopia') { + // get coin label and algo (different api) + $labels = cryptopia_api_query('GetCurrencies'); + if (is_object($labels) && !empty($labels->Data)) { + foreach ($labels->Data as $coin) { + if ($coin->Symbol == $symbol) { + $name = $coin->Name; + $algo = strtolower($coin->Algorithm); + if ($algo == 'scrypt') $algo = ''; // cryptopia default generally wrong + break; + } + } + } + } + + if (in_array($marketname, array('nova','askcoin','binance','bitfinex','bitz','coinexchange','coinsmarkets','cryptobridge','hitbtc'))) { + // don't polute too much the db with new coins, its better from exchanges with labels + return; + } + + // some other to ignore... + if (in_array($marketname, array('crex24','escodex','yobit','coinbene','kucoin','tradesatoshi'))) + return; + + if (market_get($marketname, $symbol, "disabled")) { + return; + } + + debuglog("new coin $marketname $symbol $name"); + + $coin = new db_coins; + $coin->txmessage = true; + $coin->hassubmitblock = true; + $coin->name = $name; + $coin->algo = $algo; + $coin->symbol = $symbol; + $coin->created = time(); + $coin->save(); + + $url = getMarketUrl($coin, $marketname); + if (YAAMP_NOTIFY_NEW_COINS) + mail(YAAMP_ADMIN_EMAIL, "New coin $symbol", "new coin $symbol ($name) on $marketname\r\n\r\n$url"); + sleep(30); + } + + else if($coin && $coin->name == 'unknown' && $name != 'unknown') + { + $coin->name = $name; + $coin->save(); + } + + $list = getdbolist('db_coins', "symbol=:symbol or symbol2=:symbol", array(':symbol'=>$symbol)); + foreach($list as $coin) + { + $market = getdbosql('db_markets', "coinid=$coin->id and name='$marketname'"); + if(!$market) + { + $market = new db_markets; + $market->coinid = $coin->id; + $market->name = $marketname; + } + + $market->deleted = false; + $market->save(); + } + +} diff --git a/web/yaamp/core/exchange/cryptohub.php b/web/yaamp/core/exchange/cryptohub.php new file mode 100644 index 000000000..611172474 --- /dev/null +++ b/web/yaamp/core/exchange/cryptohub.php @@ -0,0 +1,68 @@ +$symbol)); + if(!$coin) return false; + $pair = $symbol; + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); + if(!$market) return false; + + } else if (is_object($market)) { + + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) return false; + $symbol = $coin->getOfficialSymbol(); + $pair = $symbol; + if (!empty($market->base_coin)) $pair = $market->base_coin.'_'.$symbol; + } + + $t1 = microtime(true); + $ticker = cryptohub_api_query("market/ticker",$pair); + if(!$ticker || empty($ticker)) return false; + $ticker = array_pop($ticker); + if(arraySafeVal($ticker,'highestBid') === NULL) { + debuglog("$exchange: invalid data received for $pair ticker"); + return false; + } + + $price2 = ((double) $ticker['highestBid'] + $ticker['lowestAsk']) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double) $ticker['highestBid']); + if ($ticker['lowestAsk'] < $market->price) $market->price = $ticker['lowestAsk']; + $market->pricetime = time(); + $market->save(); + + $apims = round((microtime(true) - $t1)*1000,3); + user()->setFlash('message', "$exchange $symbol price updated in $apims ms"); + + return true; +} diff --git a/web/yaamp/core/exchange/exchange.php b/web/yaamp/core/exchange/exchange.php index e72161676..de835c72c 100644 --- a/web/yaamp/core/exchange/exchange.php +++ b/web/yaamp/core/exchange/exchange.php @@ -45,6 +45,7 @@ function strip_data($data) require_once("coinsmarkets.php"); require_once("cryptowatch.php"); require_once("stocksexchange.php"); +require_once("tradeogre.php"); require_once("tradesatoshi.php"); require_once("zebitex.php"); @@ -136,6 +137,8 @@ function getMarketUrl($coin, $marketName) $url = "https://novaexchange.com/market/{$base}_{$symbol}/"; else if($market == 'stocksexchange') $url = "https://stocks.exchange/trade/$symbol/$base"; + else if($market == 'tradeogre') + $url = "https://tradeogre.com/exchange/{$base}-{$symbol}"; else if($market == 'tradesatoshi') $url = "https://tradesatoshi.com/Exchange?market={$symbol}_{$base}"; else if($market == 'yobit') diff --git a/web/yaamp/core/exchange/exchange.php.bak b/web/yaamp/core/exchange/exchange.php.bak new file mode 100644 index 000000000..e72161676 --- /dev/null +++ b/web/yaamp/core/exchange/exchange.php.bak @@ -0,0 +1,172 @@ +getOfficialSymbol(); + $lowsymbol = strtolower($symbol); + $base = 'BTC'; + + $market = trim($marketName); + if (strpos($marketName, ' ')) { + $parts = explode(' ',$marketName); + $market = $parts[0]; + $base = $parts[1]; + if (empty($base)) { + debuglog("warning: invalid market name '$marketName'"); + $base = dboscalar( + "SELECT base_coin FROM markets WHERE coinid=:id AND name=:name", array( + ':id'=>$coin->id, ':name'=>$marketName, + )); + } + } + + $lowbase = strtolower($base); + + if($market == 'cryptowatch') { + $exchange = 'poloniex'; // default for big altcoins + // and for most big btc fiat prices : + if(in_array($symbol, array('EUR','CAD','GBP'))) + $exchange = 'kraken'; + elseif(in_array($symbol, array('AUD','CNY','JPY'))) + $exchange = 'quoine'; + elseif(in_array($symbol, array('USD'))) + $exchange = 'bitfinex'; + } + + if($market == 'alcurex') + $url = "https://alcurex.com/#{$symbol}-{$base}"; + else if($market == 'binance') + $url = "https://www.binance.com/trade.html?symbol={$symbol}_{$base}"; + else if($market == 'bitfinex') + $url = "https://www.bitfinex.com/t/{$symbol}:{$base}"; + else if($market == 'bittrex') + $url = "https://bittrex.com/Market/Index?MarketName={$base}-{$symbol}"; + else if($market == 'bitz') + $url = "https://www.bit-z.com/exchange/{$symbol}_{$base}"; + else if($market == 'poloniex') + $url = "https://poloniex.com/exchange#{$lowbase}_{$lowsymbol}"; + else if($market == 'bleutrade') + $url = "https://bleutrade.com/exchange/{$symbol}/{$base}"; + else if($market == 'bter') + $url = "https://bter.com/trade/{$lowsymbol}_{$lowbase}"; + else if($market == 'cexio') + $url = "https://cex.io/trade/{$symbol}-{$base}"; + else if($market == 'coinbene') + $url = "https://www.coinbene.com/#/market?pairId={$symbol}{$base}"; + else if($market == 'coinexchange') + $url = "https://www.coinexchange.io/market/{$symbol}/{$base}"; + else if($market == 'coinsmarkets') + $url = "https://coinsmarkets.com/trade-{$base}-{$symbol}.htm"; + else if($market == 'crex24') + $url = "https://crex24.com/exchange/{$symbol}-{$base}"; + else if($market == 'cryptobridge') + $url = "https://wallet.crypto-bridge.org/market/BRIDGE.{$symbol}_BRIDGE.{$base}"; + else if($market == 'cryptopia') + $url = "https://www.cryptopia.co.nz/Exchange?market={$symbol}_{$base}"; + else if($market == 'cryptowatch') + $url = "https://cryptowat.ch/{$exchange}/{$lowbase}{$lowsymbol}"; + else if($market == 'c-cex') + $url = "https://c-cex.com/?p={$lowsymbol}-{$lowbase}"; + else if($market == 'empoex') + $url = "http://www.empoex.com/trade/{$symbol}-{$base}"; + else if($market == 'escodex') + $url = "https://wallet.escodex.com/market/ESCODEX.{$symbol}_ESCODEX.{$base}"; + else if($market == 'gateio') + $url = "https://gate.io/trade/{$symbol}_{$base}"; + else if($market == 'graviex') + $url = "https://graviex.net/markets/{$lowsymbol}{$lowbase}"; + else if($market == 'jubi') + $url = "http://jubi.com/coin/{$lowsymbol}"; + else if($market == 'hitbtc') + $url = "https://hitbtc.com/exchange/{$symbol}-to-{$base}"; + else if($market == 'kucoin') + $url = "https://www.kucoin.com/#/trade.pro/{$symbol}-{$base}"; + else if($market == 'livecoin') + $url = "https://www.livecoin.net/trade/?currencyPair={$symbol}%2F{$base}"; + else if($market == 'nova') + $url = "https://novaexchange.com/market/{$base}_{$symbol}/"; + else if($market == 'stocksexchange') + $url = "https://stocks.exchange/trade/$symbol/$base"; + else if($market == 'tradesatoshi') + $url = "https://tradesatoshi.com/Exchange?market={$symbol}_{$base}"; + else if($market == 'yobit') + $url = "https://yobit.net/en/trade/{$symbol}/{$base}"; + else if($market == 'zebitex') + $url = "https://staging.zebitex.com/{$symbol}{$base}"; +// $url = "https://zebitex.com/{$symbol}-{$base}"; + else + $url = ""; + + return $url; +} + +// $market can be a db_markets or a string (symbol) +function exchange_update_market($exchange, $market) +{ + $fn_update = str_replace('-','',$exchange.'_update_market'); + if (function_exists($fn_update)) { + return $fn_update($market); + } else { + debuglog(__FUNCTION__.': '.$fn_update.'() not implemented'); + user()->setFlash('error', $fn_update.'() not yet implemented'); + return false; + } +} + +// used to manually update one market price +function exchange_update_market_by_id($idmarket) +{ + $market = getdbo('db_markets', $idmarket); + if (!$market) return false; + + return exchange_update_market($market->name, $market); +} diff --git a/web/yaamp/core/exchange/tradeogre.php b/web/yaamp/core/exchange/tradeogre.php new file mode 100644 index 000000000..d68248355 --- /dev/null +++ b/web/yaamp/core/exchange/tradeogre.php @@ -0,0 +1,55 @@ + Date: Fri, 22 Feb 2019 03:24:20 -0500 Subject: [PATCH 379/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 83d7b4e14..3416cf84d 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -19,7 +19,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ - hive.c pomelo.c hex.c argon2m.c \ + hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ From 3cfa6f622b78d83e32d66de40eada449cfb3fadd Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 03:28:36 -0500 Subject: [PATCH 380/576] Update stratum.cpp --- stratum/stratum.cpp | 150 ++++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 83 deletions(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index cbb851f4b..67628138a 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -113,86 +113,91 @@ static void neoscrypt_hash(const char* input, char* output, uint32_t len) YAAMP_ALGO g_algos[] = { - {"sha256", sha256_double_hash, 1, 0, 0}, - {"scrypt", scrypt_hash, 0x10000, 0, 0}, - {"scryptn", scryptn_hash, 0x10000, 0, 0}, - {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, - - {"c11", c11_hash, 1, 0, 0}, - {"x11", x11_hash, 1, 0, 0}, - {"x12", x12_hash, 1, 0, 0}, - {"x13", x13_hash, 1, 0, 0}, - {"x14", x14_hash, 1, 0, 0}, - {"x15", x15_hash, 1, 0, 0}, - {"x17", x17_hash, 1, 0, 0}, + {"a5a", a5a_hash, 0x10000, 0, 0}, + {"aergo", aergo_hash, 1, 0, 0}, + {"allium", allium_hash, 0x100, 0, 0}, + {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, + {"argon2m", argon2m_hash, 0x10000, 0, 0}, + {"bastion", bastion_hash, 1, 0 }, {"bcd", bcd_hash, 1, 0, 0}, {"binarium-v1", Binarium_hash_v1_hash, 1, 0, 0}, - {"x18", x18_hash, 1, 0, 0}, - {"x20r", x20r_hash, 0x100, 0, 0}, - {"x21s", x21s_hash, 0x100, 0, 0}, - {"x22i", x22i_hash, 1, 0, 0}, - - {"pipe", pipe_hash, 1,0,0}, - - {"x11evo", x11evo_hash, 1, 0, 0}, - {"xevan", xevan_hash, 0x100, 0, 0}, - - {"x16r", x16r_hash, 0x100, 0, 0}, - {"x16s", x16s_hash, 0x100, 0, 0}, - {"x16rt", x16rt_hash, 0x100, 0, 0}, - {"timetravel", timetravel_hash, 0x100, 0, 0}, {"bitcore", timetravel10_hash, 0x100, 0, 0}, - {"exosis", exosis_hash, 0x100, 0, 0}, - {"hsr", hsr_hash, 1, 0, 0}, - {"hmq1725", hmq17_hash, 0x10000, 0, 0}, - - {"jha", jha_hash, 0x10000, 0}, - - {"allium", allium_hash, 0x100, 0, 0}, - {"lyra2", lyra2re_hash, 0x80, 0, 0}, - {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, - {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, - {"lyra2z", lyra2z_hash, 0x100, 0, 0}, - {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, - {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, - {"bastion", bastion_hash, 1, 0 }, {"blake", blake_hash, 1, 0 }, - {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, {"blake2b", blake2b_hash, 1, 0 }, {"blake2s", blake2s_hash, 1, 0 }, - {"vanilla", blakecoin_hash, 1, 0 }, + {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, + {"bmw", bmw_hash, 1, 0, 0}, + {"c11", c11_hash, 1, 0, 0}, {"decred", decred_hash, 1, 0 }, - - {"deep", deep_hash, 1, 0, 0}, {"dedal", dedal_hash, 0x100, 0, 0}, + {"deep", deep_hash, 1, 0, 0}, + {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ + {"exosis", exosis_hash, 0x100, 0, 0}, {"fresh", fresh_hash, 0x100, 0, 0}, - {"quark", quark_hash, 1, 0, 0}, - {"nist5", nist5_hash, 1, 0, 0}, - {"qubit", qubit_hash, 1, 0, 0}, {"groestl", groestl_hash, 0x100, 0, sha256_hash_hex }, /* groestlcoin */ - {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ - {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ - {"skein", skein_hash, 1, 0, 0}, - {"sonoa", sonoa_hash, 1, 0, 0}, - {"tribus", tribus_hash, 1, 0, 0}, + {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, + {"hive", hive_hash, 0x10000, 0, 0}, + {"hmq1725", hmq17_hash, 0x10000, 0, 0}, + {"hsr", hsr_hash, 1, 0, 0}, + {"jha", jha_hash, 0x10000, 0}, {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, {"keccakc", keccak256_hash, 0x100, 0, 0}, - {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, - - {"phi", phi_hash, 1, 0, 0}, - {"phi2", phi2_hash, 0x100, 0, 0}, - {"phi1612", phi1612_hash, 1, 0, 0}, - - {"polytimos", polytimos_hash, 1, 0, 0}, - {"skunk", skunk_hash, 1, 0, 0}, - - {"bmw", bmw_hash, 1, 0, 0}, {"lbk3", lbk3_hash, 0x100, 0, 0}, {"lbry", lbry_hash, 0x100, 0, 0}, {"luffa", luffa_hash, 1, 0, 0}, + {"lyra2", lyra2re_hash, 0x80, 0, 0}, + {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, + {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, + {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, + {"lyra2z", lyra2z_hash, 0x100, 0, 0}, + {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, + {"m7m", m7m_hash, 0x10000, 0, 0}, + {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ + {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, + {"nist5", nist5_hash, 1, 0, 0}, {"penta", penta_hash, 1, 0, 0}, + {"phi", phi_hash, 1, 0, 0}, + {"phi2", phi2_hash, 0x100, 0, 0}, + {"phi1612", phi1612_hash, 1, 0, 0}, + {"pipe", pipe_hash, 1,0,0}, + {"polytimos", polytimos_hash, 1, 0, 0}, + {"quark", quark_hash, 1, 0, 0}, + {"qubit", qubit_hash, 1, 0, 0}, {"rainforest", rainforest_hash, 0x100, 0, 0}, + {"scrypt", scrypt_hash, 0x10000, 0, 0}, + {"scryptn", scryptn_hash, 0x10000, 0, 0}, + {"sha256", sha256_double_hash, 1, 0, 0}, + {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x + {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x + {"sib", sib_hash, 1, 0, 0}, + {"skein", skein_hash, 1, 0, 0}, {"skein2", skein2_hash, 1, 0, 0}, + {"skunk", skunk_hash, 1, 0, 0}, + {"sonoa", sonoa_hash, 1, 0, 0}, + {"timetravel", timetravel_hash, 0x100, 0, 0}, + {"tribus", tribus_hash, 1, 0, 0}, + {"vanilla", blakecoin_hash, 1, 0 }, + {"veltor", veltor_hash, 1, 0, 0}, + {"velvet", velvet_hash, 0x10000, 0, 0}, + {"vitalium", vitalium_hash, 1, 0, 0}, + {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ + {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ + {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, + {"x11", x11_hash, 1, 0, 0}, + {"x11evo", x11evo_hash, 1, 0, 0}, + {"x12", x12_hash, 1, 0, 0}, + {"x13", x13_hash, 1, 0, 0}, + {"x14", x14_hash, 1, 0, 0}, + {"x15", x15_hash, 1, 0, 0}, + {"x16r", x16r_hash, 0x100, 0, 0}, + {"x16rt", x16rt_hash, 0x100, 0, 0}, + {"x16s", x16s_hash, 0x100, 0, 0}, + {"x17", x17_hash, 1, 0, 0}, + {"x18", x18_hash, 1, 0, 0}, + {"x20r", x20r_hash, 0x100, 0, 0}, + {"x21s", x21s_hash, 0x100, 0, 0}, + {"x22i", x22i_hash, 1, 0, 0}, + {"xevan", xevan_hash, 0x100, 0, 0}, {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, @@ -203,27 +208,6 @@ YAAMP_ALGO g_algos[] = {"yespowerR24", yespowerR24_hash, 0x10000, 0, 0 }, {"yespowerR32", yespowerR32_hash, 0x10000, 0, 0 }, {"zr5", zr5_hash, 1, 0, 0}, - - {"a5a", a5a_hash, 0x10000, 0, 0}, - {"hive", hive_hash, 0x10000, 0, 0}, - {"m7m", m7m_hash, 0x10000, 0, 0}, - {"veltor", veltor_hash, 1, 0, 0}, - {"velvet", velvet_hash, 0x10000, 0, 0}, - {"argon2m", argon2m_hash, 0x10000, 0, 0}, - {"vitalium", vitalium_hash, 1, 0, 0}, - {"aergo", aergo_hash, 1, 0, 0}, - - {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x - - {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x - - {"sib", sib_hash, 1, 0, 0}, - - {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ - {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ - {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, - - {"", NULL, 0, 0}, }; From 7db0b5561e51db5bb33ebd87918d8f01f66725df Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 03:30:28 -0500 Subject: [PATCH 381/576] Update stratum.h --- stratum/stratum.h | 118 +++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 58 deletions(-) diff --git a/stratum/stratum.h b/stratum/stratum.h index d20ef810c..55937fb45 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -150,82 +150,84 @@ void scrypt_N_R_1_256(const char* input, char* output, uint32_t N, uint32_t R, u void sha256_hash_hex(const char *input, char *output, unsigned int len); void sha256_double_hash_hex(const char *input, char *output, unsigned int len); + #include "algos/a5a.h" -#include "algos/binarium_hash_v1.h" -#include "algos/c11.h" -#include "algos/x11.h" -#include "algos/x11evo.h" -#include "algos/x12.h" -#include "algos/x13.h" -#include "algos/x14.h" -#include "algos/x15.h" -#include "algos/x16r.h" -#include "algos/x16rt.h" -#include "algos/x16s.h" -#include "algos/x17.h" -#include "algos/x18.h" -#include "algos/x20r.h" -#include "algos/x21s.h" -#include "algos/x22i.h" -#include "algos/xevan.h" -#include "algos/hmq17.h" -#include "algos/nist5.h" -#include "algos/fresh.h" -#include "algos/hsr14.h" -#include "algos/quark.h" -#include "algos/neoscrypt.h" +#include "algos/aergo.h" #include "algos/allium.h" -#include "algos/lyra2re.h" -#include "algos/lyra2v2.h" -#include "algos/lyra2z.h" -#include "algos/lyra2vc0ban.h" -#include "algos/lyra2v3.h" -#include "algos/lyra2zz.h" +#include "algos/argon2d.h" +#include "algos/argon2m.h" +#include "algos/bastion.h" +#include "algos/bcd.h" +#include "algos/binarium_hash_v1.h" +#include "algos/bitcore.h" #include "algos/blake.h" -#include "algos/blakecoin.h" #include "algos/blake2b.h" #include "algos/blake2s.h" -#include "algos/qubit.h" +#include "algos/blakecoin.h" +#include "algos/bmw.h" +#include "algos/c11.h" +#include "algos/dedal.h" +#include "algos/deep.h" +#include "algos/exosis.h" +#include "algos/fresh.h" +#include "algos/gltalgos.h" #include "algos/groestl.h" +#include "algos/hex.h" +#include "algos/hive.h" +#include "algos/hmq17.h" +#include "algos/hsr14.h" #include "algos/jha.h" -#include "algos/skein.h" #include "algos/keccak.h" -#include "algos/sha256t.h" -#include "algos/sha256q.h" -#include "algos/skunk.h" -#include "algos/timetravel.h" -#include "algos/bitcore.h" -#include "algos/bcd.h" -#include "algos/bastion.h" -#include "algos/bmw.h" -#include "algos/deep.h" -#include "algos/dedal.h" #include "algos/lbk3.h" #include "algos/lbry.h" #include "algos/luffa.h" -#include "algos/pentablake.h" -#include "algos/rainforest.h" -#include "algos/whirlpool.h" -#include "algos/whirlpoolx.h" -#include "algos/skein2.h" -#include "algos/yescrypt.h" -#include "algos/yespower.h" -#include "algos/zr5.h" -#include "algos/hive.h" -#include "algos/sib.h" +#include "algos/lyra2re.h" +#include "algos/lyra2v2.h" +#include "algos/lyra2v3.h" +#include "algos/lyra2vc0ban.h" +#include "algos/lyra2z.h" +#include "algos/lyra2zz.h" #include "algos/m7m.h" +#include "algos/neoscrypt.h" +#include "algos/nist5.h" +#include "algos/pentablake.h" #include "algos/phi.h" #include "algos/phi2.h" #include "algos/phi1612.h" +#include "algos/pipehash.h" #include "algos/polytimos.h" +#include "algos/quark.h" +#include "algos/qubit.h" +#include "algos/rainforest.h" +#include "algos/sha256q.h" +#include "algos/sha256t.h" +#include "algos/sib.h" +#include "algos/skein.h" +#include "algos/skein2.h" +#include "algos/skunk.h" #include "algos/sonoa.h" +#include "algos/timetravel.h" #include "algos/tribus.h" #include "algos/veltor.h" #include "algos/velvet.h" -#include "algos/argon2m.h" #include "algos/vitalium.h" -#include "algos/aergo.h" -#include "algos/hex.h" -#include "algos/exosis.h" -#include "algos/pipehash.h" -#include "algos/gltalgos.h" +#include "algos/whirlpool.h" +#include "algos/whirlpoolx.h" +#include "algos/x11.h" +#include "algos/x11evo.h" +#include "algos/x12.h" +#include "algos/x13.h" +#include "algos/x14.h" +#include "algos/x15.h" +#include "algos/x16r.h" +#include "algos/x16rt.h" +#include "algos/x16s.h" +#include "algos/x17.h" +#include "algos/x18.h" +#include "algos/x20r.h" +#include "algos/x21s.h" +#include "algos/x22i.h" +#include "algos/xevan.h" +#include "algos/yescrypt.h" +#include "algos/yespower.h" +#include "algos/zr5.h" From 7defa80a076ece860857e086f52f98abb6b0fe77 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 03:38:28 -0500 Subject: [PATCH 382/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 336 +++++++++++++++-------------- 1 file changed, 175 insertions(+), 161 deletions(-) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index d00e67f81..30ded586b 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -4,50 +4,72 @@ function yaamp_get_algos() { /* Toggle Site Algos Here */ return array( - 'sha256', - 'sha256t', - 'sha256q', - 'binarium-v1', - 'scrypt', - 'scryptn', + 'a5a', + 'aergo', 'allium', 'argon2', + 'argon2d-crds', 'argon2d-dyn', - 'aergo', + 'argon2m', + 'argon2d-uis', 'bastion', + 'bcd', + 'binarium-v1', 'bitcore', 'blake', - 'blakecoin', - 'blake2s', 'blake2b', - 'bcd', - 'argon2m', + 'blake2s', + 'blakecoin', + 'c11', 'decred', 'deep', + 'dmd-gr', 'exosis', + 'groestl', // dmd-gr -m 256 (deprecated) + 'hex', 'hmq1725', + 'hsr', + 'jha', 'keccak', 'keccakc', - 'jha', - 'hex', - 'hsr', - 'lbry', 'lbk3', + 'lbry', 'luffa', 'lyra2', 'lyra2v2', - 'lyra2z', - 'lyra2vc0ban', 'lyra2v3', + 'lyra2vc0ban', + 'lyra2z', 'lyra2zz', + 'lyra2z330', + 'm7m', + 'myr-gr', 'neoscrypt', 'nist5', 'penta', + 'phi', + 'phi2', + 'phi1612', 'polytimos', 'quark', 'qubit', 'rainforest', - 'c11', + 'scrypt', + 'scryptn', + 'sha256', + 'sha256q', + 'sha256t', + 'sib', + 'skein', + 'skein2', + 'skunk', + 'timetravel', + 'tribus', + 'vanilla', + 'veltor', + 'velvet', + 'vitalium', + 'whirlpool', 'x11', 'x11evo', 'x12', @@ -55,37 +77,18 @@ function yaamp_get_algos() 'x14', 'x15', 'x16r', - 'x16s', 'x16rt', + 'x16s', 'x17', 'x18', 'x20r', 'x21s', 'x22i', 'xevan', - 'groestl', // dmd-gr -m 256 (deprecated) - 'dmd-gr', - 'myr-gr', - 'm7m', - 'phi', - 'phi2', - 'phi1612', - 'sib', - 'skein', - 'skein2', - 'skunk', - 'timetravel', - 'tribus', - 'a5a', - 'vanilla', - 'veltor', - 'velvet', - 'vitalium', 'yescrypt', - 'yescryptR16', 'yescryptR8', + 'yescryptR16', 'yescryptR32', - 'whirlpool', 'zr5', ); } @@ -121,30 +124,32 @@ function yaamp_get_algo_norm($algo) return (float) $configAlgoNormCoef[$algo]; $a = array( - 'sha256' => 1.0, - 'scrypt' => 1.0, - 'scryptn' => 1.0, - 'x11' => 1.0, - 'x13' => 1.0, 'argon2' => 1.0, - 'argon2m' => 1.0, + 'argon2d-crds' => 1.0, 'argon2d-dyn' => 1.0, + 'argon2m' => 1.0, + 'argon2d-uis' => 1.0, + 'blake' => 1.0, + 'keccak' => 1.0, 'lyra2' => 1.0, 'lyra2v2' => 1.0, 'myr-gr' => 1.0, - 'nist5' => 1.0, 'neoscrypt' => 1.0, + 'nist5' => 1.0, 'quark' => 1.0, 'qubit' => 1.0, + 'scrypt' => 1.0, + 'scryptn' => 1.0, + 'sha256' => 1.0, 'skein' => 1.0, - 'blake' => 1.0, - 'keccak' => 1.0, 'skein2' => 1.0, 'velvet' => 1.0, 'whirlpool' => 1.0, + 'x11' => 1.0, + 'x13' => 1.0, 'yescrypt' => 1.0, - 'yescryptR16' => 1.0, 'yescryptR8' => 1.0, + 'yescryptR16' => 1.0, 'yescryptR32' => 1.0, 'zr5' => 1.0, ); @@ -158,85 +163,89 @@ function yaamp_get_algo_norm($algo) function getAlgoColors($algo) { $a = array( - 'sha256' => '#d0d0a0', - 'sha256t' => '#d0d0f0', - 'sha256q' => '#9696dd', - 'scrypt' => '#c0c0e0', - 'neoscrypt' => '#a0d0f0', - 'scryptn' => '#d0d0d0', - 'bcd' => '#ffd880', - 'c11' => '#a0a0d0', - 'binarium-v1' => '#f0f0f0', - 'decred' => '#f0f0f0', - 'deep' => '#e0ffff', - 'x11' => '#f0f0a0', - 'x11evo' => '#c0f0c0', - 'x12' => '#ffe090', - 'x13' => '#ffd880', - 'x14' => '#f0c080', - 'x15' => '#f0b080', - 'x16r' => '#f0b080', - 'x16s' => '#f0b080', - 'x16rt' => '#f0b080', - 'x17' => '#f0b0a0', - 'x18' => '#f0b0a0', - 'x20r' => '#f0b0a0', - 'x21s' => '#f0b0a0', - 'x22i' => '#f0a090', - 'xevan' => '#f0b0a0', + 'a5a' => '#f0f0f0', + 'aergo' => '#e0d0e0', 'allium' => '#80a0d0', 'argon2' => '#e0d0e0', - 'argon2m' => '#e0d0e0', + 'argon2d-crds' => '#e0d0e0', 'argon2d-dyn' => '#e0d0e0', - 'aergo' => '#e0d0e0', + 'argon2m' => '#e0d0e0', + 'argon2d-uis' => '#e0d0e0', 'bastion' => '#e0b0b0', + 'bcd' => '#ffd880', + 'binarium-v1' => '#f0f0f0', + 'bitcore' => '#f790c0', 'blake' => '#f0f0f0', - 'blakecoin' => '#f0f0f0', 'blake2b' => '#f2c81f', + 'blakecoin' => '#f0f0f0', + 'c11' => '#a0a0d0', + 'decred' => '#f0f0f0', + 'deep' => '#e0ffff', + 'dmd-gr' => '#a0c0f0', 'exosis' => '#49CCFE', + 'geek' => '#d0a0a0', 'groestl' => '#d0a0a0', - 'jha' => '#a0d0c0', - 'dmd-gr' => '#a0c0f0', - 'myr-gr' => '#a0c0f0', + 'hex' => '#c0f0c0', 'hmq1725' => '#ffa0a0', 'hsr' => '#aa70ff', + 'jha' => '#a0d0c0', 'keccak' => '#c0f0c0', 'keccakc' => '#c0f0c0', - 'hex' => '#c0f0c0', + 'lbk3' => '#809aef', 'lbry' => '#b0d0e0', 'luffa' => '#a0c0c0', - 'm7m' => '#d0a0a0', - 'penta' => '#80c0c0', - 'nist5' => '#c0e0e0', - 'quark' => '#c0c0c0', - 'qubit' => '#d0a0f0', - 'rainforest' => '#d0f0a0', - 'lbk3' => '#809aef', 'lyra2' => '#80a0f0', 'lyra2v2' => '#80c0f0', - 'lyra2z' => '#80b0f0', + 'lyra2v3' => '#80a0f0', + 'lyra2z330' => '#80b0f0', 'lyra2vc0ban' => '#80c0f0', + 'lyra2z' => '#80b0f0', 'lyra2zz' => '#80b0f0', - 'lyra2v3' => '#80a0f0', + 'm7m' => '#d0a0a0', + 'myr-gr' => '#a0c0f0', + 'neoscrypt' => '#a0d0f0', + 'nist5' => '#c0e0e0', + 'penta' => '#80c0c0', 'phi' => '#a0a0e0', 'phi2' => '#a0a0e0', 'phi1612' => '#a0a0e0', 'polytimos' => '#dedefe', + 'quark' => '#c0c0c0', + 'qubit' => '#d0a0f0', + 'rainforest' => '#d0f0a0', + 'scrypt' => '#c0c0e0', + 'scryptn' => '#d0d0d0', + 'sha256' => '#d0d0a0', + 'sha256q' => '#9696dd', + 'sha256t' => '#d0d0f0', 'sib' => '#a0a0c0', 'skein' => '#80a0a0', 'skein2' => '#c8a060', - 'timetravel' => '#f0b0d0', - 'bitcore' => '#f790c0', 'skunk' => '#dedefe', + 'timetravel' => '#f0b0d0', 'tribus' => '#c0d0d0', - 'a5a' => '#f0f0f0', 'vanilla' => '#f0f0f0', 'velvet' => '#aac0cc', 'vitalium' => '#f0b0a0', 'whirlpool' => '#d0e0e0', + 'x11' => '#f0f0a0', + 'x11evo' => '#c0f0c0', + 'x12' => '#ffe090', + 'x13' => '#ffd880', + 'x14' => '#f0c080', + 'x15' => '#f0b080', + 'x16r' => '#f0b080', + 'x16rt' => '#f0b080', + 'x16s' => '#f0b080', + 'x17' => '#f0b0a0', + 'x18' => '#f0b0a0', + 'x20r' => '#f0b0a0', + 'x21s' => '#f0b0a0', + 'x22i' => '#f0a090', + 'xevan' => '#f0b0a0', 'yescrypt' => '#e0d0e0', - 'yescryptR16' => '#e2d0e2', 'yescryptR8' => '#e0d0e0', + 'yescryptR16' => '#e2d0e2', 'yescryptR32' => '#e2d0d2', 'zr5' => '#d0b0d0', @@ -253,91 +262,96 @@ function getAlgoColors($algo) function getAlgoPort($algo) { $a = array( - 'sha256' => 3333, - 'sha256t' => 3339, - 'sha256q' => 3337, - 'lbry' => 3334, - 'scrypt' => 3433, - 'timetravel' => 3555, + 'a5a' => 8633, + 'aergo' => 3691, + 'allium' => 4443, + 'argon2' => 4235, + 'argon2d-crds' => 4238, + 'argon2d-dyn' => 4239, + 'argon2m' => 4234, + 'argon2d-uis' => 4240, + 'bastion' => 6433, + 'bcd' => 3643, + 'binarium-v1' => 6666, 'bitcore' => 3556, - 'exosis' => 3557, + 'blake' => 5733, + 'blake2b' => 5777, + 'blake2s' => 5766, + 'blakecoin' => 5743, 'c11' => 3573, + 'decred' => 3252, 'deep' => 3535, - 'x11' => 3533, - 'x11evo' => 3553, - 'x12' => 3233, - 'x13' => 3633, - 'x15' => 3733, - 'x16r' => 3636, - 'x16s' => 3663, - 'x16rt' => 7220, - 'x17' => 3737, - 'x18' => 3738, - 'x20r' => 4300, - 'x21s' => 3224, - 'x22i' => 3223, - 'binarium-v1' => 6666, - 'aergo' => 3691, - 'xevan' => 3739, + 'dmd-gr' => 5333, + 'exosis' => 3557, + 'geek' => 3692, + 'hex' => 5135, 'hmq1725' => 3747, - 'nist5' => 3833, - 'x14' => 3933, - 'quark' => 4033, - 'whirlpool' => 4133, - 'neoscrypt' => 4233, - 'argon2' => 4235, - 'argon2m' => 4234, - 'argon2d-dyn' => 4239, - 'scryptn' => 4333, - 'allium' => 4443, + 'hsr' => 7433, + 'jha' => 4633, + 'keccak' => 5133, + 'keccakc' => 5134, 'lbk3' => 5522, + 'lbry' => 3334, + 'luffa' => 5933, 'lyra2' => 4432, 'lyra2v2' => 4533, - 'lyra2z' => 4553, - 'lyra2vc0ban' => 4563, 'lyra2v3' => 4433, + 'lyra2vc0ban' => 4563, + 'lyra2z' => 4553, + 'lyra2z330' => 4555, 'lyra2zz' => 4556, - 'jha' => 4633, + 'm7m' => 6033, + 'myr-gr' => 5433, + 'neoscrypt' => 4233, + 'nist5' => 3833, + 'penta' => 5833, + 'phi' => 8333, + 'phi2' => 8332, + 'phi1612' => 8334, + 'polytimos' => 8463, + 'quark' => 4033, 'qubit' => 4733, - 'zr5' => 4833, - 'skein' => 4933, + 'renesis' => 5252, + 'rainforest' => 7443, + 'scrypt' => 3433, + 'scryptn' => 4333, + 'sha256' => 3333, + 'sha256q' => 3337, + 'sha256t' => 3339, 'sib' => 5033, - 'keccak' => 5133, - 'keccakc' => 5134, - 'hex' => 5135, + 'skein' => 4933, 'skein2' => 5233, - //'groestl' => 5333, - 'dmd-gr' => 5333, - 'myr-gr' => 5433, - 'zr5' => 5533, - // 5555 to 5683 reserved - 'blake' => 5733, - 'blakecoin' => 5743, - 'decred' => 3252, + 'skunk' => 8433, + 'timetravel' => 3555, + 'tribus' => 8533, 'vanilla' => 5755, - 'blake2s' => 5766, - 'blake2b' => 5777, - 'penta' => 5833, - 'bcd' => 3643, - 'rainforest' => 7443, - 'luffa' => 5933, - 'm7m' => 6033, 'veltor' => 5034, 'velvet' => 6133, 'vitalium' => 3233, + 'whirlpool' => 4133, + 'x11' => 3533, + 'x11evo' => 3553, + 'x12' => 3233, + 'x13' => 3633, + 'x14' => 3933, + 'x15' => 3733, + 'x16r' => 3636, + 'x16rt' => 7220, + 'x16s' => 3663, + 'x17' => 3737, + 'x18' => 3738, + 'x20r' => 4300, + 'x21s' => 3224, + 'x22i' => 3223, + 'xevan' => 3739, 'yescrypt' => 6233, - 'yescryptR16' => 6333, 'yescryptR8' => 6353, + 'yescryptR16' => 6333, 'yescryptR32' => 6343, - 'bastion' => 6433, - 'hsr' => 7433, - 'phi' => 8333, - 'phi2' => 8332, - 'phi1612' => 8334, - 'polytimos' => 8463, - 'skunk' => 8433, - 'tribus' => 8533, - 'a5a' => 8633, + 'zr5' => 4833, + 'zr5' => 5533, + //'groestl' => 5333, + // 5555 to 5683 reserved ); global $configCustomPorts; From b32bc7fbc2fb9450cc5f692064a0a78edb1bf6a5 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 03:44:28 -0500 Subject: [PATCH 383/576] Update client_difficulty.cpp --- stratum/client_difficulty.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/client_difficulty.cpp b/stratum/client_difficulty.cpp index dc6562396..8713aa669 100644 --- a/stratum/client_difficulty.cpp +++ b/stratum/client_difficulty.cpp @@ -77,7 +77,7 @@ int client_send_difficulty(YAAMP_CLIENT *client, double difficulty) if(difficulty >= 1) client_call(client, "mining.set_difficulty", "[%.0f]", difficulty); else - client_call(client, "mining.set_difficulty", "[%.3f]", difficulty); + client_call(client, "mining.set_difficulty", "[%.8f]", difficulty); return 0; } From 5c7b0f004c5e3a56a797bc5255447df27bfcd138 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 03:49:20 -0500 Subject: [PATCH 384/576] Update client_submit.cpp --- stratum/client_submit.cpp | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 839e5da0a..77c337bde 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -360,6 +360,10 @@ static bool valid_string_params(json_value *json_params) bool client_submit(YAAMP_CLIENT *client, json_value *json_params) { + bool isBalloon = false; + if (strstr(g_current_algo->name,"balloon")) + isBalloon = true; + // submit(worker_name, jobid, extranonce2, ntime, nonce): if(json_params->u.array.length<5 || !valid_string_params(json_params)) { debuglog("%s - %s bad message\n", client->username, client->sock->ip); @@ -499,6 +503,11 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) // minimum hash diff begins with 0000, for all... uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; + + // except balloon + if(isBalloon) + pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; + if(pfx) { if (g_debuglog_hash) { debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, @@ -509,17 +518,35 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) return true; } - uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); - uint64_t user_target = diff_to_target(client->difficulty_actual); + // bit dim, but so is measuring the diff this way + uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); uint64_t user_target; uint64_t coin_target = decode_compact(templ->nbits); - if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + uint64_t hashcomb = * (uint64_t *) &submitvalues.hash_bin[24]; + + // prevents overflow + if(!isBalloon) { + user_target = diff_to_target(client->difficulty_actual); + } + if(templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + // due to balloon's lower diff + if (g_debuglog_hash && isBalloon) { + debuglog("hash %016lx \n", hashcomb); + debuglog("targ %016lx \n", sharetotarg(client->difficulty_actual)); + } + if (g_debuglog_hash && !isBalloon) { + - if (g_debuglog_hash) { debuglog("%016llx actual\n", hash_int); debuglog("%016llx target\n", user_target); debuglog("%016llx coin\n", coin_target); } - if(hash_int > user_target && hash_int > coin_target) + // due to balloon's lower diff + if(hashcomb > sharetotarg(client->difficulty_actual) && isBalloon) + { + client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); + return true; + } + if(hash_int > user_target && hash_int > coin_target && !isBalloon) { client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); return true; From dbbe8337a9ba3749b3054d069f217a9ce76be914 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 03:50:34 -0500 Subject: [PATCH 385/576] Update stratum.cpp --- stratum/stratum.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 67628138a..3a79cf063 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -118,6 +118,7 @@ YAAMP_ALGO g_algos[] = {"allium", allium_hash, 0x100, 0, 0}, {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, {"argon2m", argon2m_hash, 0x10000, 0, 0}, + {"balloon", balloon_hash, 1, 0, 0}, {"bastion", bastion_hash, 1, 0 }, {"bcd", bcd_hash, 1, 0, 0}, {"binarium-v1", Binarium_hash_v1_hash, 1, 0, 0}, @@ -134,6 +135,7 @@ YAAMP_ALGO g_algos[] = {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ {"exosis", exosis_hash, 0x100, 0, 0}, {"fresh", fresh_hash, 0x100, 0, 0}, + {"geek", geek_hash, 1, 0, 0}, {"groestl", groestl_hash, 0x100, 0, sha256_hash_hex }, /* groestlcoin */ {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, {"hive", hive_hash, 0x10000, 0, 0}, From 2b2d533674bfebab46007649b218bb057e94138c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 03:51:18 -0500 Subject: [PATCH 386/576] Update stratum.h --- stratum/stratum.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index 55937fb45..b7f287362 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -156,6 +156,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/allium.h" #include "algos/argon2d.h" #include "algos/argon2m.h" +#include "algos/balloon.h" #include "algos/bastion.h" #include "algos/bcd.h" #include "algos/binarium_hash_v1.h" @@ -170,6 +171,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/deep.h" #include "algos/exosis.h" #include "algos/fresh.h" +#include "algos/geek.h" #include "algos/gltalgos.h" #include "algos/groestl.h" #include "algos/hex.h" From 43c1cacc0b27dbebf2ce1ff0ce2a48eb805c0a50 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 03:54:42 -0500 Subject: [PATCH 387/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 30ded586b..2eb1bec2f 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -26,6 +26,7 @@ function yaamp_get_algos() 'dmd-gr', 'exosis', 'groestl', // dmd-gr -m 256 (deprecated) + 'geek', 'hex', 'hmq1725', 'hsr', @@ -213,6 +214,7 @@ function getAlgoColors($algo) 'quark' => '#c0c0c0', 'qubit' => '#d0a0f0', 'rainforest' => '#d0f0a0', + 'renesis' => '#f0b0a0', 'scrypt' => '#c0c0e0', 'scryptn' => '#d0d0d0', 'sha256' => '#d0d0a0', From 7de8fc835d70654ca77bccab0082130744202be7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:04:20 -0500 Subject: [PATCH 388/576] Update client_submit.cpp --- stratum/client_submit.cpp | 70 +++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 77c337bde..17560e08b 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -31,14 +31,10 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); #endif - if (!strcmp(g_stratum_algo, "lbry")) { + if (!strcmp(g_current_algo->name, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); - } else if (strlen(templ->extradata_be) == 128) { // LUX SC - sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - ntime, templ->nbits, nonce, templ->extradata_be); - ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) + ser_string_be(submitvalues->header, submitvalues->header_be, 32 + 20); } else { sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce); @@ -148,6 +144,11 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); uint64_t coin_target = decode_compact(templ->nbits); if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + // please forgive me for this hack jebus + if (strstr(g_current_algo->name,"balloon") && + (submitvalues->hash_bin[30] | submitvalues->hash_bin[31])) + coin_target = 0x0; int block_size = YAAMP_SMALLBUFSIZE; vector::const_iterator i; @@ -349,15 +350,6 @@ static bool ntime_valid_range(const char ntimehex[]) return (abs(rawtime - ntime) < (30 * 60)); } -static bool valid_string_params(json_value *json_params) -{ - for(int p=0; p < json_params->u.array.length; p++) { - if (!json_is_string(json_params->u.array.values[p])) - return false; - } - return true; -} - bool client_submit(YAAMP_CLIENT *client, json_value *json_params) { bool isBalloon = false; @@ -365,19 +357,25 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) isBalloon = true; // submit(worker_name, jobid, extranonce2, ntime, nonce): - if(json_params->u.array.length<5 || !valid_string_params(json_params)) { + if(json_params->u.array.length<5) { debuglog("%s - %s bad message\n", client->username, client->sock->ip); client->submit_bad++; return false; } - char extranonce2[32] = { 0 }; - char extra[160] = { 0 }; - char nonce[80] = { 0 }; - char ntime[32] = { 0 }; - char vote[8] = { 0 }; + char extranonce2[32]; + char ntime[32]; + char nonce[32]; + char vote[8]; + + memset(extranonce2, 0, 32); + memset(ntime, 0, 32); + memset(nonce, 0, 32); + memset(vote, 0, 8); - if (strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { + if (!json_params->u.array.values[1]->u.string.ptr || strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { + + clientlog(client, "bad json, wrong jobid len"); client->submit_bad++; return false; @@ -387,27 +385,18 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); + + if (json_params->u.array.length == 6) + strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); + + if (g_debuglog_hash) { + debuglog("submit %s (uid %d) %d, %s, %s, %s\n", client->sock->ip, client->userid, jobid, extranonce2, ntime, nonce); + } string_lower(extranonce2); string_lower(ntime); string_lower(nonce); - - if (json_params->u.array.length == 6) { - if (strstr(g_stratum_algo, "phi")) { - // lux optional field, smart contral root hashes (not mandatory on shares submit) - strncpy(extra, json_params->u.array.values[5]->u.string.ptr, 128); - string_lower(extra); - } else { - // heavycoin vote - strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); - string_lower(vote); - } - } - - if (g_debuglog_hash) { - debuglog("submit %s (uid %d) %d, %s, t=%s, n=%s, extra=%s\n", client->sock->ip, client->userid, - jobid, extranonce2, ntime, nonce, extra); - } + string_lower(vote); YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); if(!job) @@ -435,7 +424,7 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) if(strcmp(ntime, templ->ntime)) { - if (!ishexa(ntime, 8) || !ntime_valid_range(ntime)) { + if (!ntime_valid_range(ntime)) { client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); return true; } @@ -506,6 +495,7 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) // except balloon if(isBalloon) + pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; if(pfx) { From 4af66be82e7aafea7c310f12d0e240e6941ecc11 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:07:16 -0500 Subject: [PATCH 389/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 2eb1bec2f..c256b562c 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -12,6 +12,7 @@ function yaamp_get_algos() 'argon2d-dyn', 'argon2m', 'argon2d-uis', + 'balloon', 'bastion', 'bcd', 'binarium-v1', @@ -172,6 +173,7 @@ function getAlgoColors($algo) 'argon2d-dyn' => '#e0d0e0', 'argon2m' => '#e0d0e0', 'argon2d-uis' => '#e0d0e0', + 'balloon' => '#e0b0b0', 'bastion' => '#e0b0b0', 'bcd' => '#ffd880', 'binarium-v1' => '#f0f0f0', @@ -272,6 +274,7 @@ function getAlgoPort($algo) 'argon2d-dyn' => 4239, 'argon2m' => 4234, 'argon2d-uis' => 4240, + 'balloon' => 5100, 'bastion' => 6433, 'bcd' => 3643, 'binarium-v1' => 6666, From 56e13e1ad426f3c90e057cf6849cb2bc0eaa4570 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:22:58 -0500 Subject: [PATCH 390/576] Update labels.json --- sql/labels.json | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/labels.json b/sql/labels.json index 4d9190876..bf0ae2e44 100644 --- a/sql/labels.json +++ b/sql/labels.json @@ -530,6 +530,7 @@ "MUN":"Muniti", "MWC":"MultiWalletCoin", "MXT":"MarteXcoin", +"MXBIT":"Matrixbit", "MYC":"MyCoin", "MYR":"Myriadcoin", "MYST":"MystCoin", From 5da23dc988510c0be1e38295233190ea1d165550 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:23:48 -0500 Subject: [PATCH 391/576] Create lyra2re3.c --- stratum/algos/lyra2re3.c | 64 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 stratum/algos/lyra2re3.c diff --git a/stratum/algos/lyra2re3.c b/stratum/algos/lyra2re3.c new file mode 100644 index 000000000..73a1b2d1e --- /dev/null +++ b/stratum/algos/lyra2re3.c @@ -0,0 +1,64 @@ +/*- + * Copyright 2009 Colin Percival, 2011 ArtForz, 2013 Neisklar, 2014 James Lovejoy + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ + +#include "lyra2re3.h" +#include +#include +#include +#include +#include "../sha3/sph_blake.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_bmw.h" + +void lyra2re3_hash(const char* input, char* output, uint32_t len) +{ + sph_blake256_context ctx_blake; + sph_cubehash256_context ctx_cubehash; + sph_bmw256_context ctx_bmw; + + uint32_t hashA[8], hashB[8]; + + sph_blake256_init(&ctx_blake); + sph_blake256(&ctx_blake, input, 80); + sph_blake256_close (&ctx_blake, hashA); + + LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); + + sph_cubehash256_init(&ctx_cubehash); + sph_cubehash256(&ctx_cubehash, hashB, 32); + sph_cubehash256_close(&ctx_cubehash, hashA); + + LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); + + sph_bmw256_init(&ctx_bmw); + sph_bmw256(&ctx_bmw, hashB, 32); + sph_bmw256_close(&ctx_bmw, hashA); + + memcpy(output, hashA, 32); +} From 62195beca84042c9b430a27d00a39f77a15be535 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:24:10 -0500 Subject: [PATCH 392/576] Create lyra2re3.h --- stratum/algos/lyra2re3.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stratum/algos/lyra2re3.h diff --git a/stratum/algos/lyra2re3.h b/stratum/algos/lyra2re3.h new file mode 100644 index 000000000..a8b0b5ee9 --- /dev/null +++ b/stratum/algos/lyra2re3.h @@ -0,0 +1,16 @@ +#ifndef LYRA2RE3_H +#define LYRA2RE3_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void lyra2re3_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif From 2b3ce131bb0d9ec0ae69e9d9452ca81f839463b9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:32:11 -0500 Subject: [PATCH 393/576] Update makefile --- stratum/algos/makefile | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 3416cf84d..5f963853b 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,24 +8,16 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ - c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ - x22i.c SWIFFTX/SWIFFTX.c \ - blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ - deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ - bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ - bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ - scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ - yescrypt.c yescrypt-opt.c sha256_Y.c \ - a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ - blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ - hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ - phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ - yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ - binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ - binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ - binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ - binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c +SOURCES=a5a.c a5amath.c aergo.c allium.c argon2d.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c argon2m.c / + balloon.c bastion.c bcd.c binarium_hash_v1.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c / + binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/salsa20/salsa20.c binarium_hash_v1/encryption/three_fish/libskein_skein.cc / + binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/hashing/whirlpool/whirlpool.c bitcore.c / + blake2/blake2b.c blake2b.c blake2s.c blake.c blakecoin.c bmw.c c11.c dedal.c deep.c exosis.c fresh.c geek.c gost.c groestl.c hex.c hive.c hmq17.c hsr14.c / + jha.c keccak.c lbk3.c lbry.c luffa.c Lyra2-z.c Lyra2-zz.c Lyra2.c lyra2re.c lyra2re3.c lyra2v2.c lyra2v3.c lyra2vc0ban.c lyra2z.c lyra2zz.c m7m.c magimath.cpp / + neoscrypt.c nist5.c pentablake.c phi2.c phi1612.c phi.c pipehash.c polytimos.c pomelo.c quark.c qubit.c rainforest.c scrypt.c scryptn.c sha256-P.c / + sha256.c sha256_Y.c sha256q.c sha256t.c sib.c skein2.c skein.c skunk.c sonoa.c Sponge.c SWIFFTX/SWIFFTX.c timetravel.c tribus.c veltor.c velvet.c vitalium.c / + whirlpool.c whirlpoolx.c x11.c x11evo.c x12.c x13.c x14.c x15.c x16r.c x16rt.c x16s.c x17.c x18.c x20r.c x21s.c x22i.c xevan.c yescrypt-opt.c yescrypt.c / + yespower-opt.c yespower.c zr5.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) OUTPUT=libalgos.a From b3989a16846cbda528623500f779463e46df01f6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:33:37 -0500 Subject: [PATCH 394/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 3a79cf063..acad56a58 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -150,6 +150,7 @@ YAAMP_ALGO g_algos[] = {"lyra2", lyra2re_hash, 0x80, 0, 0}, {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, + {"lyra2v3", lyra2re3_hash, 0x100, 0, 0}, {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, {"lyra2z", lyra2z_hash, 0x100, 0, 0}, {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, From df1b16d45bc02cfdf0036959f5ed2dda88dc0456 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:34:11 -0500 Subject: [PATCH 395/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index b7f287362..0e29967c8 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -186,6 +186,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/lyra2re.h" #include "algos/lyra2v2.h" #include "algos/lyra2v3.h" +#include "algos/lyra2re3.h" #include "algos/lyra2vc0ban.h" #include "algos/lyra2z.h" #include "algos/lyra2zz.h" From a8bec3b23eb0eeb21e59354509cf5e346bbce8a7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:35:03 -0500 Subject: [PATCH 396/576] Update services.php --- web/yaamp/core/backend/services.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/yaamp/core/backend/services.php b/web/yaamp/core/backend/services.php index 60dfbd398..72ab645ea 100644 --- a/web/yaamp/core/backend/services.php +++ b/web/yaamp/core/backend/services.php @@ -39,6 +39,7 @@ function BackendUpdateServices() // 27=>'Sia', 28=>'blake2s', 29=>'skunk', + 30=>'lyra2v3', ); $res = fetch_url('https://api.nicehash.com/api?method=stats.global.current'); From 89a28415df18e716a09deeedc39270a3b3fba449 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:36:49 -0500 Subject: [PATCH 397/576] Update user.cpp --- stratum/user.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/user.cpp b/stratum/user.cpp index 1e2ec6ce0..77cf48c91 100644 --- a/stratum/user.cpp +++ b/stratum/user.cpp @@ -61,7 +61,7 @@ void db_add_user(YAAMP_DB *db, YAAMP_CLIENT *client) db_check_user_input(client->username); if(strlen(client->username) < MIN_ADDRESS_LEN) { // allow benchmark / test / donate usernames - if (!strcmp(client->username, "benchmark") || !strcmp(client->username, "donate") || !strcmp(client->username, "test")) { + if (!strcmp(client->username, "benchmark") || !strcmp(client->username, "donate") || !strcmp(client->username, "test")) || !strcmp(client->username, "matrixbit")) { guest = true; if (g_list_coind.first) { CLI li = g_list_coind.first; From a94e74c4cfc354d020a6f614de8f0bbdb262ce98 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:49:52 -0500 Subject: [PATCH 398/576] Update makefile --- stratum/algos/makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 5f963853b..cabf4ca98 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,14 +8,14 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=a5a.c a5amath.c aergo.c allium.c argon2d.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c argon2m.c / +SOURCES=a5a.c a5amath.c aergo.c allium.c argon2d.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c argon2m.c SWIFFTX/SWIFFTX.c / balloon.c bastion.c bcd.c binarium_hash_v1.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c / binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/salsa20/salsa20.c binarium_hash_v1/encryption/three_fish/libskein_skein.cc / binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/hashing/whirlpool/whirlpool.c bitcore.c / blake2/blake2b.c blake2b.c blake2s.c blake.c blakecoin.c bmw.c c11.c dedal.c deep.c exosis.c fresh.c geek.c gost.c groestl.c hex.c hive.c hmq17.c hsr14.c / jha.c keccak.c lbk3.c lbry.c luffa.c Lyra2-z.c Lyra2-zz.c Lyra2.c lyra2re.c lyra2re3.c lyra2v2.c lyra2v3.c lyra2vc0ban.c lyra2z.c lyra2zz.c m7m.c magimath.cpp / neoscrypt.c nist5.c pentablake.c phi2.c phi1612.c phi.c pipehash.c polytimos.c pomelo.c quark.c qubit.c rainforest.c scrypt.c scryptn.c sha256-P.c / - sha256.c sha256_Y.c sha256q.c sha256t.c sib.c skein2.c skein.c skunk.c sonoa.c Sponge.c SWIFFTX/SWIFFTX.c timetravel.c tribus.c veltor.c velvet.c vitalium.c / + sha256.c sha256_Y.c sha256q.c sha256t.c sib.c skein2.c skein.c skunk.c sonoa.c Sponge.c timetravel.c tribus.c veltor.c velvet.c vitalium.c / whirlpool.c whirlpoolx.c x11.c x11evo.c x12.c x13.c x14.c x15.c x16r.c x16rt.c x16s.c x17.c x18.c x20r.c x21s.c x22i.c xevan.c yescrypt-opt.c yescrypt.c / yespower-opt.c yespower.c zr5.c From d43dff66f2d1340f31af3827b0e1127ff587aca0 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:53:21 -0500 Subject: [PATCH 399/576] Update makefile --- stratum/algos/makefile | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index cabf4ca98..9027aff3b 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,16 +8,24 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=a5a.c a5amath.c aergo.c allium.c argon2d.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c argon2m.c SWIFFTX/SWIFFTX.c / - balloon.c bastion.c bcd.c binarium_hash_v1.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c / - binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/salsa20/salsa20.c binarium_hash_v1/encryption/three_fish/libskein_skein.cc / - binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/hashing/whirlpool/whirlpool.c bitcore.c / - blake2/blake2b.c blake2b.c blake2s.c blake.c blakecoin.c bmw.c c11.c dedal.c deep.c exosis.c fresh.c geek.c gost.c groestl.c hex.c hive.c hmq17.c hsr14.c / - jha.c keccak.c lbk3.c lbry.c luffa.c Lyra2-z.c Lyra2-zz.c Lyra2.c lyra2re.c lyra2re3.c lyra2v2.c lyra2v3.c lyra2vc0ban.c lyra2z.c lyra2zz.c m7m.c magimath.cpp / - neoscrypt.c nist5.c pentablake.c phi2.c phi1612.c phi.c pipehash.c polytimos.c pomelo.c quark.c qubit.c rainforest.c scrypt.c scryptn.c sha256-P.c / - sha256.c sha256_Y.c sha256q.c sha256t.c sib.c skein2.c skein.c skunk.c sonoa.c Sponge.c timetravel.c tribus.c veltor.c velvet.c vitalium.c / - whirlpool.c whirlpoolx.c x11.c x11evo.c x12.c x13.c x14.c x15.c x16r.c x16rt.c x16s.c x17.c x18.c x20r.c x21s.c x22i.c xevan.c yescrypt-opt.c yescrypt.c / - yespower-opt.c yespower.c zr5.c +SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2re.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ + c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ + x22i.c SWIFFTX/SWIFFTX.c \ + blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ + deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ + bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ + bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ + scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ + yescrypt.c yescrypt-opt.c sha256_Y.c \ + a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ + blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ + hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ + phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ + yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ + binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ + binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ + binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ + binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) OUTPUT=libalgos.a From f354ed4a4056ffee9d8f6499a41c0ba0cd91db25 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Feb 2019 04:56:28 -0500 Subject: [PATCH 400/576] Update user.cpp --- stratum/user.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/user.cpp b/stratum/user.cpp index 77cf48c91..ab2806ddd 100644 --- a/stratum/user.cpp +++ b/stratum/user.cpp @@ -61,7 +61,7 @@ void db_add_user(YAAMP_DB *db, YAAMP_CLIENT *client) db_check_user_input(client->username); if(strlen(client->username) < MIN_ADDRESS_LEN) { // allow benchmark / test / donate usernames - if (!strcmp(client->username, "benchmark") || !strcmp(client->username, "donate") || !strcmp(client->username, "test")) || !strcmp(client->username, "matrixbit")) { + if (!strcmp(client->username, "benchmark") || !strcmp(client->username, "donate") || !strcmp(client->username, "test") || !strcmp(client->username, "matrixbit")) { guest = true; if (g_list_coind.first) { CLI li = g_list_coind.first; From 190f1ed9021195140b569a22b822f2cd6f590942 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 14:16:26 -0500 Subject: [PATCH 401/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 9027aff3b..9c650f82e 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,7 +8,7 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2re.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ +SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2re.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ From 14cf9c02f04f852d8cf8c611c3651613aaebde3a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 14:15:36 -0500 Subject: [PATCH 402/576] Update stratum.cpp --- stratum/stratum.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index acad56a58..9c59ba898 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -149,7 +149,6 @@ YAAMP_ALGO g_algos[] = {"luffa", luffa_hash, 1, 0, 0}, {"lyra2", lyra2re_hash, 0x80, 0, 0}, {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, - {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, {"lyra2v3", lyra2re3_hash, 0x100, 0, 0}, {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, {"lyra2z", lyra2z_hash, 0x100, 0, 0}, From 00e898cf40e71dbe86ced52dbbc280b1826b5cb9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 14:16:00 -0500 Subject: [PATCH 403/576] Update stratum.h --- stratum/stratum.h | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/stratum.h b/stratum/stratum.h index 0e29967c8..621ebaef2 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -185,7 +185,6 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/luffa.h" #include "algos/lyra2re.h" #include "algos/lyra2v2.h" -#include "algos/lyra2v3.h" #include "algos/lyra2re3.h" #include "algos/lyra2vc0ban.h" #include "algos/lyra2z.h" From 2bccd5856649afda08b4e566b4288d2781afd5b2 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 25 Feb 2019 14:27:46 -0500 Subject: [PATCH 404/576] Update makefile --- stratum/algos/makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 9c650f82e..35fbba6b5 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,7 +8,7 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2re.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ +SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2re.c lyra2re3.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ @@ -26,7 +26,7 @@ SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2re.c lyra2zz.c Lyra2 binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c - + OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) OUTPUT=libalgos.a From e90a17a4f24323336d9e4ac58ddd468d962e03ed Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:19:32 -0500 Subject: [PATCH 405/576] Delete coinbase.cpp.bak --- stratum/coinbase.cpp.bak | 1058 -------------------------------------- 1 file changed, 1058 deletions(-) delete mode 100644 stratum/coinbase.cpp.bak diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak deleted file mode 100644 index 9966e887d..000000000 --- a/stratum/coinbase.cpp.bak +++ /dev/null @@ -1,1058 +0,0 @@ - -// http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html - -// https://en.bitcoin.it/wiki/Merged_mining_specification#Merged_mining_coinbase - -#include "stratum.h" - -#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) - -static void encode_tx_value(char *encoded, json_int_t value) -{ - sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", - TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), - TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); -} - -static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(payee) >> 1) & 0xFF, payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - encode_tx_value(evalue, amount); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - -static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) -{ - int ol = strlen(data); - char evalue[32]; - - if(coind->p2sh_address && !key) { - p2sh_pack_tx(coind, data, amount, coind->script_pubkey); - return; - } - - encode_tx_value(evalue, amount); - sprintf(data+strlen(data), "%s", evalue); - - if(coind->pos && !key) - sprintf(data+strlen(data), "2321%sac", coind->pubkey); - - else - sprintf(data+strlen(data), "1976a914%s88ac", key? key: coind->script_pubkey); - -// debuglog("pack tx %s\n", data+ol); -// debuglog("pack tx %lld\n", amount); -} - -void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) -{ - vector hashlist = coind_aux_hashlist(templ->auxs, templ->auxs_size); - while(hashlist.size() > 1) - { - vector l; - for(int i = 0; i < hashlist.size()/2; i++) - { - string s = hashlist[i*2] + hashlist[i*2+1]; - - char bin[YAAMP_HASHLEN_BIN*2]; - char out[YAAMP_HASHLEN_STR]; - - binlify((unsigned char *)bin, s.c_str()); - sha256_double_hash_hex(bin, out, YAAMP_HASHLEN_BIN*2); - - l.push_back(out); - } - - hashlist = l; - } - - char merkle_hash[4*1024]; - memset(merkle_hash, 0, 4*1024); - string_be(hashlist[0].c_str(), merkle_hash); - - sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); -// debuglog("aux_script is %s\n", aux_script); -} - -void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) -{ - char eheight[32], etime[32]; - char entime[32] = { 0 }; - char commitment[128] = { 0 }; - - ser_number(templ->height, eheight); - ser_number(time(NULL), etime); - if(coind->pos) ser_string_be(templ->ntime, entime, 1); - - char eversion1[32] = "01000000"; - if(coind->txmessage) - strcpy(eversion1, "02000000"); - - char script1[4*1024]; - sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - - char script2[32] = "7969696d7000"; // "yiimp\0" in hex ascii - - if(!coind->pos && !coind->isaux && templ->auxs_size) - coinbase_aux(templ, script2); - - int script_len = strlen(script1)/2 + strlen(script2)/2 + 8; - sprintf(templ->coinb1, "%s%s01" - "0000000000000000000000000000000000000000000000000000000000000000" - "ffffffff%02x%s", eversion1, entime, script_len, script1); - - sprintf(templ->coinb2, "%s00000000", script2); - - // segwit commitment, if needed - if (templ->has_segwit_txs) - sprintf(commitment, "0000000000000000%02x%s", (int) (strlen(coind->commitment)/2), coind->commitment); - - json_int_t available = templ->value; - - // sample coins using mandatory dev/foundation fees - if(strcmp(coind->symbol, "EGC") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 2; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); - } - else if(strcmp(coind->symbol, "DYN") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[3]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool dynode_enabled; - dynode_enabled = json_get_bool(json_result, "dynode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* dynode; - dynode = json_get_object(json_result, "dynode"); - if(!dynode && json_get_bool(json_result, "dynode_payments")) { - coind->oldmasternodes = true; - debuglog("%s is using old dynodes rpc keys\n", coind->symbol); - return; - } - - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock found %s %u\n", coind->symbol, payee, amount); - } - } - } - if (dynode_enabled && dynode) { - bool started; - started = json_get_bool(json_result, "dynode_payments_started"); - const char *payee = json_get_string(dynode, "payee"); - json_int_t amount = json_get_int(dynode, "amount"); - if (!payee) - debuglog("coinbase_create failed to get Dynode payee\n"); - - if (!amount) - debuglog("coinbase_create failed to get Dynode amount\n"); - - if (!started) - debuglog("coinbase_create failed to get Dynode started\n"); - - if (payee && amount && started) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s dynode found %s %u\n", coind->symbol, payee, amount); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - else if(strcmp(coind->symbol, "LTCR") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 10; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); - } - else if(strcmp(coind->symbol, "XZC") == 0) { - char script_payee[1024]; - if (coind->charity_percent <= 0) - coind->charity_percent = 25; // wrong coinbase 40 instead of 40 + 10 = 50 - - json_int_t charity_amount = (available * coind->charity_percent) / 100; - - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD"); - - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode(coind->charity_address, script_payee); // may change - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - else if(strcmp("DCR", coind->rpcencoding) == 0) { - coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 - coind->charity_percent = 0; - coind->charity_amount = available; - available *= coind->reward_mul; - if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) - sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); - } - - else if(strcmp(coind->symbol, "BZX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "bznode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "04"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "03"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); - job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); - - base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); - job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); - - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "TUX") == 0) { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "donation_payee"); - if(payee != NULL){ - sprintf(coind->charity_address, "%s", payee); - } else { - sprintf(coind->charity_address, "%s", ""); - } - - if(strlen(coind->charity_address) > 0){ - char script_payee[1024]; - char charity_payee[256] = { 0 }; - sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "donation_amount"); - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - debuglog("pack tx %s\n", coinb2_part); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - } - - // 2 txs are required on these coins, one for foundation (dev fees) - if(coind->charity_percent && !coind->hasmasternodes) - { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - if (charity_amount <= 0) - charity_amount = (available * coind->charity_percent) / 100; - - available -= charity_amount; - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - - else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char script_treasury[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - json_value* masternode = json_get_object(json_result, "masternode"); - json_value* treasury = json_get_object(json_result, "treasury"); - bool treasury_enabled = true; - if(treasury_enabled && treasury) { - const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); - memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); - json_int_t amount = json_get_int(treasury, "amount"); - if (scriptPubKey && amount) { - npayees++; - available -= amount; - job_pack_tx(coind, script_dests, amount, script_treasury); - //debuglog("%s treasury %u\n", coind->symbol, amount); - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "SECI") == 0) { - char script_payee[512] = { 0 }; - char payees[1]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //mainnet - json_int_t charity_amount = 50000000; - sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - else if (strcmp(coind->symbol,"XZX") == 0) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - - json_value* subsidyreward = json_get_array(json_result, "subsidy"); - if (subsidyreward) - { - const char *payee = json_get_string(subsidyreward, "address"); - json_int_t amount = json_get_int(subsidyreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - - } - - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - else if(strcmp(coind->symbol, "HXX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "xnode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "05"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - - base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); - job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "STAK") == 0) { - char script_payee[512] = { 0 }; - char payees[4]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - - //treasury 5% @ 10 STAK per block - json_int_t charity_amount = 50000000; - //testnet - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - switch (templ->height % 4) { - case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); - break; - case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); - break; - case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); - break; - case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); - break; - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. - else if (strcmp(coind->symbol, "SMART") == 0) { - char script_payee[512] = { 0 }; - char payees[5]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //treasury 5000 * (143500/Blockheight) per block - int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); - json_int_t charity_amount = coinvalue * 0.95; - int blockRotation = templ->height - 95 * (templ->height/95); - if (blockRotation >= 0 && blockRotation <= 7) { - sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); - } - if (blockRotation >= 8 && blockRotation <= 15) { - sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); - } - if (blockRotation >= 16 && blockRotation <= 23) { - sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); - } - if (blockRotation >= 24 && blockRotation <= 38) { - sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); - } - if (blockRotation >= 39 && blockRotation <= 94) { - sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // 2 txs are required on these coins, one for foundation (dev fees) - if(coind->charity_percent && !coind->hasmasternodes) - { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - if (charity_amount <= 0) - charity_amount = (available * coind->charity_percent) / 100; - - available -= charity_amount; - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - - else if(coind->charity_amount && !strcmp("DCR", coind->rpcencoding)) - { - stratumlog("ERROR %s should not use coinbase (getwork only)!\n", coind->symbol); - coind->reward = (double)available/100000000; - return; - } - - if(strcmp(coind->symbol, "XVC") == 0) - { - char charity_payee[256]; - json_value* incentive = json_get_object(json_result, "incentive"); - if (incentive) { - const char* payee = json_get_string(incentive, "address"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - - bool enforced = json_get_bool(incentive, "enforced"); - json_int_t charity_amount = json_get_int(incentive, "amount"); - if (enforced && charity_amount && strlen(charity_payee)) { - char script_payee[1024]; - base58_decode(charity_payee, script_payee); - - strcat(templ->coinb2, "02"); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->charity_amount = charity_amount; - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("XVC coinbase %ld (+%ld incentive to %s)\n", - // (long) available, (long) charity_amount, charity_payee); - return; - } - } - } - - // most recent masternodes rpc (DASH, SIB, MUE, DSR, GBX...) - if(coind->hasmasternodes && !coind->oldmasternodes) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; // addresses count - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "masternode"); - if(!masternode && json_get_bool(json_result, "masternode_payments")) { - coind->oldmasternodes = true; - debuglog("%s is using old masternodes rpc keys\n", coind->symbol); - return; - } - if(coind->charity_percent) { - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - json_int_t charity_amount = (available * coind->charity_percent) / 100; - npayees++; - available -= charity_amount; - coind->charity_amount = charity_amount; - base58_decode(charity_payee, script_payee); - job_pack_tx(coind, script_dests, charity_amount, script_payee); - } - // smart contracts balance refund, same format as DASH superblocks - json_value* screfund = json_get_array(json_result, "screfund"); - if(screfund && screfund->u.array.length) { - superblocks_enabled = true; - superblock = screfund; - } - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(superblock_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount && started) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ARC") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "goldminenode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ENT") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "eternitynode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "eternitynode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ARC") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "goldminenode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - - else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ - { - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - bool charity_payments = json_get_bool(json_result, "masternode_payments"); - bool charity_enforce = json_get_bool(json_result, "enforce_masternode_payments"); - - if(strcmp(coind->symbol, "CRW") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - bool systemnodes_enabled = json_get_bool(json_result, "enforce_systemnode_payments"); - bool systemnodes = json_get_bool(json_result, "systemnodes"); - bool masternodes = json_get_bool(json_result, "masternodes"); - if(systemnodes_enabled && systemnodes) { - const char *payeeSN = json_get_string(json_result, "payeeSN"); - json_int_t payeeSN_amount = json_get_int(json_result, "payeeSN_amount"); - if (payeeSN && payeeSN_amount) { - npayees++; - available -= payeeSN_amount; - base58_decode(payeeSN, script_payee); - job_pack_tx(coind, script_dests, payeeSN_amount, script_payee); - //debuglog("%s systemnode %s %u\n", coind->symbol, payeeSN, payeeSN_amount); - } - } - if (masternodes_enabled && masternodes) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - if(charity_payments && charity_enforce) - { - char script_payee[256] = { 0 }; - base58_decode(charity_payee, script_payee); - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + node + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); // 2 outputs - } - - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - available -= charity_amount; - - } else { - strcat(templ->coinb2, "01"); - } - } - - else if (templ->has_segwit_txs) { - strcat(templ->coinb2, "02"); - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "01"); - } - - job_pack_tx(coind, templ->coinb2, available, NULL); - - //if(coind->txmessage) - // strcat(templ->coinb2, "00"); - - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; -// debuglog("coinbase %f\n", coind->reward); - -// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); -// debuglog("coinb1 %s\n", templ->coinb1); -// debuglog("coinb2 %s\n", templ->coinb2); -} From ad9d404db408d6122b444f47a83114196ef7d75b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:19:41 -0500 Subject: [PATCH 406/576] Delete Makefile.bak --- stratum/Makefile.bak | 66 -------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 stratum/Makefile.bak diff --git a/stratum/Makefile.bak b/stratum/Makefile.bak deleted file mode 100644 index 3bf978bf3..000000000 --- a/stratum/Makefile.bak +++ /dev/null @@ -1,66 +0,0 @@ - -CC=gcc - -CFLAGS= -g -march=native -SQLFLAGS= `mysql_config --cflags --libs` - -# Comment this line to disable address check on login, -# if you use the auto exchange feature... -CFLAGS += -DNO_EXCHANGE - -#CFLAGS=-c -O2 -I /usr/include/mysql -LDFLAGS=-O2 `mysql_config --libs` - -LDLIBS=iniparser/libiniparser.a algos/libalgos.a sha3/libhash.a -lpthread -lgmp -lm -lstdc++ -LDLIBS+=-lmysqlclient - -SOURCES=stratum.cpp db.cpp coind.cpp coind_aux.cpp coind_template.cpp coind_submit.cpp util.cpp list.cpp \ - rpc.cpp job.cpp job_send.cpp job_core.cpp merkle.cpp share.cpp socket.cpp coinbase.cpp \ - client.cpp client_submit.cpp client_core.cpp client_difficulty.cpp remote.cpp remote_template.cpp \ - user.cpp object.cpp json.cpp base58.cpp - -CFLAGS += -DHAVE_CURL -SOURCES += rpc_curl.cpp -LDCURL = $(shell /usr/bin/pkg-config --static --libs libcurl) -LDFLAGS += $(LDCURL) - -OBJECTS=$(SOURCES:.cpp=.o) -OUTPUT=stratum - -CODEDIR1=algos -CODEDIR2=sha3 - -.PHONY: projectcode1 projectcode2 - -all: projectcode1 projectcode2 $(SOURCES) $(OUTPUT) - -projectcode1: - $(MAKE) -C $(CODEDIR1) - -projectcode2: - $(MAKE) -C $(CODEDIR2) - -$(SOURCES): stratum.h util.h - -$(OUTPUT): $(OBJECTS) - $(CC) $(OBJECTS) $(LDLIBS) $(LDFLAGS) -o $@ - -.cpp.o: - $(CC) $(CFLAGS) $(SQLFLAGS) -c $< - -.c.o: - $(CC) $(CFLAGS) -c $< - -clean: - rm -f *.o - rm -f algos/*.o - rm -f algos/*.a - rm -f sha3/*.o - rm -f sha3/*.a - rm -f algos/ar2/*.o - -install: clean all - strip -s stratum - cp stratum /usr/local/bin/ - cp stratum ../bin/ - From 753a5e1ca17f74c06025e3be9886c50e0f6b930c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:19:57 -0500 Subject: [PATCH 407/576] Delete stratum.cpp.bak --- stratum/stratum.cpp.bak | 500 ---------------------------------------- 1 file changed, 500 deletions(-) delete mode 100644 stratum/stratum.cpp.bak diff --git a/stratum/stratum.cpp.bak b/stratum/stratum.cpp.bak deleted file mode 100644 index 6e6d5a9cd..000000000 --- a/stratum/stratum.cpp.bak +++ /dev/null @@ -1,500 +0,0 @@ - -#include "stratum.h" -#include -#include - -CommonList g_list_coind; -CommonList g_list_client; -CommonList g_list_job; -CommonList g_list_remote; -CommonList g_list_renter; -CommonList g_list_share; -CommonList g_list_worker; -CommonList g_list_block; -CommonList g_list_submit; -CommonList g_list_source; - -int g_tcp_port; - -char g_tcp_server[1024]; -char g_tcp_password[1024]; - -char g_sql_host[1024]; -char g_sql_database[1024]; -char g_sql_username[1024]; -char g_sql_password[1024]; -int g_sql_port = 3306; - -char g_stratum_coin_include[256]; -char g_stratum_coin_exclude[256]; - -char g_stratum_algo[256]; -double g_stratum_difficulty; -double g_stratum_nicehash_difficulty; -double g_stratum_nicehash_min_diff; -double g_stratum_nicehash_max_diff; -double g_stratum_min_diff; -double g_stratum_max_diff; - -int g_stratum_max_ttf; -int g_stratum_max_cons = 5000; -bool g_stratum_reconnect; -bool g_stratum_renting; -bool g_stratum_segwit = false; - -int g_limit_txs_per_block = 0; - -bool g_handle_haproxy_ips = false; -int g_socket_recv_timeout = 600; - -bool g_debuglog_client; -bool g_debuglog_hash; -bool g_debuglog_socket; -bool g_debuglog_rpc; -bool g_debuglog_list; -bool g_debuglog_remote; - -bool g_autoexchange = true; - -uint64_t g_max_shares = 0; -uint64_t g_shares_counter = 0; -uint64_t g_shares_log = 0; - -bool g_allow_rolltime = true; -time_t g_last_broadcasted = 0; -YAAMP_DB *g_db = NULL; - -pthread_mutex_t g_db_mutex; -pthread_mutex_t g_nonce1_mutex; -pthread_mutex_t g_job_create_mutex; - -struct ifaddrs *g_ifaddr; - -volatile bool g_exiting = false; - -void *stratum_thread(void *p); -void *monitor_thread(void *p); - -//////////////////////////////////////////////////////////////////////////////////////// - -static void scrypt_hash(const char* input, char* output, uint32_t len) -{ - scrypt_1024_1_1_256((unsigned char *)input, (unsigned char *)output); -} - -static void scryptn_hash(const char* input, char* output, uint32_t len) -{ - time_t time_table[][2] = - { - {2048, 1389306217}, - {4096, 1456415081}, - {8192, 1506746729}, - {16384, 1557078377}, - {32768, 1657741673}, - {65536, 1859068265}, - {131072, 2060394857}, - {262144, 1722307603}, - {524288, 1769642992}, - {0, 0}, - }; - - for(int i=0; time_table[i][0]; i++) - if(time(NULL) < time_table[i+1][1]) - { - scrypt_N_R_1_256(input, output, time_table[i][0], 1, len); - return; - } -} - -static void neoscrypt_hash(const char* input, char* output, uint32_t len) -{ - neoscrypt((unsigned char *)input, (unsigned char *)output, 0x80000620); -} - -YAAMP_ALGO g_algos[] = -{ - {"sha256", sha256_double_hash, 1, 0, 0}, - {"scrypt", scrypt_hash, 0x10000, 0, 0}, - {"scryptn", scryptn_hash, 0x10000, 0, 0}, - {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, - - {"c11", c11_hash, 1, 0, 0}, - {"x11", x11_hash, 1, 0, 0}, - {"x12", x12_hash, 1, 0, 0}, - {"x13", x13_hash, 1, 0, 0}, - {"x14", x14_hash, 1, 0, 0}, - {"x15", x15_hash, 1, 0, 0}, - {"x17", x17_hash, 1, 0, 0}, - {"x18", x18_hash, 1, 0, 0}, - {"x20r", x20r_hash, 0x100, 0, 0}, - {"x21s", x21s_hash, 0x100, 0, 0}, - {"x22i", x22i_hash, 1, 0, 0}, - - {"pipe", pipe_hash, 1,0,0}, - - {"x11evo", x11evo_hash, 1, 0, 0}, - {"xevan", xevan_hash, 0x100, 0, 0}, - - {"x16r", x16r_hash, 0x100, 0, 0}, - {"x16s", x16s_hash, 0x100, 0, 0}, - {"x16rt", x16rt_hash, 0x100, 0, 0}, - {"timetravel", timetravel_hash, 0x100, 0, 0}, - {"bitcore", timetravel10_hash, 0x100, 0, 0}, - {"exosis", exosis_hash, 0x100, 0, 0}, - {"hsr", hsr_hash, 1, 0, 0}, - {"hmq1725", hmq17_hash, 0x10000, 0, 0}, - - {"jha", jha_hash, 0x10000, 0}, - - {"allium", allium_hash, 0x100, 0, 0}, - {"lyra2", lyra2re_hash, 0x80, 0, 0}, - {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, - {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, - {"lyra2z", lyra2z_hash, 0x100, 0, 0}, - {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, - {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, - {"bastion", bastion_hash, 1, 0 }, - {"blake", blake_hash, 1, 0 }, - {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, - {"blake2b", blake2b_hash, 1, 0 }, - {"blake2s", blake2s_hash, 1, 0 }, - {"vanilla", blakecoin_hash, 1, 0 }, - {"decred", decred_hash, 1, 0 }, - - {"deep", deep_hash, 1, 0, 0}, - {"dedal", dedal_hash, 0x100, 0, 0}, - {"fresh", fresh_hash, 0x100, 0, 0}, - {"quark", quark_hash, 1, 0, 0}, - {"nist5", nist5_hash, 1, 0, 0}, - {"qubit", qubit_hash, 1, 0, 0}, - {"groestl", groestl_hash, 0x100, 0, sha256_hash_hex }, /* groestlcoin */ - {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ - {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ - {"skein", skein_hash, 1, 0, 0}, - {"sonoa", sonoa_hash, 1, 0, 0}, - {"tribus", tribus_hash, 1, 0, 0}, - {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, - {"keccakc", keccak256_hash, 0x100, 0, 0}, - {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, - - {"phi", phi_hash, 1, 0, 0}, - {"phi2", phi2_hash, 0x100, 0, 0}, - - {"polytimos", polytimos_hash, 1, 0, 0}, - {"skunk", skunk_hash, 1, 0, 0}, - - {"bmw", bmw_hash, 1, 0, 0}, - {"lbk3", lbk3_hash, 0x100, 0, 0}, - {"lbry", lbry_hash, 0x100, 0, 0}, - {"luffa", luffa_hash, 1, 0, 0}, - {"penta", penta_hash, 1, 0, 0}, - {"rainforest", rainforest_hash, 0x100, 0, 0}, - {"skein2", skein2_hash, 1, 0, 0}, - {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, - {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, - {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, - {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, - {"yespower", yespower_hash, 0x10000, 0, 0 }, - {"yespowerR8", yespowerR8_hash, 0x10000, 0, 0 }, - {"yespowerR16", yespowerR16_hash, 0x10000, 0, 0 }, - {"yespowerR24", yespowerR24_hash, 0x10000, 0, 0 }, - {"yespowerR32", yespowerR32_hash, 0x10000, 0, 0 }, - {"zr5", zr5_hash, 1, 0, 0}, - - {"a5a", a5a_hash, 0x10000, 0, 0}, - {"hive", hive_hash, 0x10000, 0, 0}, - {"m7m", m7m_hash, 0x10000, 0, 0}, - {"veltor", veltor_hash, 1, 0, 0}, - {"velvet", velvet_hash, 0x10000, 0, 0}, - {"argon2", argon2a_hash, 0x10000, 0, sha256_hash_hex }, - {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation - {"vitalium", vitalium_hash, 1, 0, 0}, - {"aergo", aergo_hash, 1, 0, 0}, - - {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x - - {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x - - {"sib", sib_hash, 1, 0, 0}, - - {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ - {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ - {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, - - - {"", NULL, 0, 0}, -}; - -YAAMP_ALGO *g_current_algo = NULL; - -YAAMP_ALGO *stratum_find_algo(const char *name) -{ - for(int i=0; g_algos[i].name[0]; i++) - if(!strcmp(name, g_algos[i].name)) - return &g_algos[i]; - - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////////////// - -int main(int argc, char **argv) -{ - if(argc < 2) - { - printf("usage: %s \n", argv[0]); - return 1; - } - - srand(time(NULL)); - getifaddrs(&g_ifaddr); - - initlog(argv[1]); - -#ifdef NO_EXCHANGE - // todo: init with a db setting or a yiimp shell command - g_autoexchange = false; -#endif - - char configfile[1024]; - sprintf(configfile, "%s.conf", argv[1]); - - dictionary *ini = iniparser_load(configfile); - if(!ini) - { - debuglog("cant load config file %s\n", configfile); - return 1; - } - - g_tcp_port = iniparser_getint(ini, "TCP:port", 3333); - strcpy(g_tcp_server, iniparser_getstring(ini, "TCP:server", NULL)); - strcpy(g_tcp_password, iniparser_getstring(ini, "TCP:password", NULL)); - - strcpy(g_sql_host, iniparser_getstring(ini, "SQL:host", NULL)); - strcpy(g_sql_database, iniparser_getstring(ini, "SQL:database", NULL)); - strcpy(g_sql_username, iniparser_getstring(ini, "SQL:username", NULL)); - strcpy(g_sql_password, iniparser_getstring(ini, "SQL:password", NULL)); - g_sql_port = iniparser_getint(ini, "SQL:port", 3306); - - // optional coin filters (to mine only one on a special port or a test instance) - char *coin_filter = iniparser_getstring(ini, "WALLETS:include", NULL); - strcpy(g_stratum_coin_include, coin_filter ? coin_filter : ""); - coin_filter = iniparser_getstring(ini, "WALLETS:exclude", NULL); - strcpy(g_stratum_coin_exclude, coin_filter ? coin_filter : ""); - - strcpy(g_stratum_algo, iniparser_getstring(ini, "STRATUM:algo", NULL)); - g_stratum_difficulty = iniparser_getdouble(ini, "STRATUM:difficulty", 16); - g_stratum_nicehash_difficulty = iniparser_getdouble(ini, "STRATUM:nicehash", 16); - g_stratum_min_diff = iniparser_getdouble(ini, "STRATUM:diff_min", g_stratum_difficulty/2); - g_stratum_max_diff = iniparser_getdouble(ini, "STRATUM:diff_max", g_stratum_difficulty*8192); - g_stratum_nicehash_min_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_min", g_stratum_nicehash_difficulty/2); - g_stratum_nicehash_max_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_max", g_stratum_nicehash_difficulty*8192); - - g_stratum_max_cons = iniparser_getint(ini, "STRATUM:max_cons", 5000); - g_stratum_max_ttf = iniparser_getint(ini, "STRATUM:max_ttf", 0x70000000); - g_stratum_reconnect = iniparser_getint(ini, "STRATUM:reconnect", true); - g_stratum_renting = iniparser_getint(ini, "STRATUM:renting", true); - g_handle_haproxy_ips = iniparser_getint(ini, "STRATUM:haproxy_ips", g_handle_haproxy_ips); - g_socket_recv_timeout = iniparser_getint(ini, "STRATUM:recv_timeout", 600); - - g_max_shares = iniparser_getint(ini, "STRATUM:max_shares", g_max_shares); - g_limit_txs_per_block = iniparser_getint(ini, "STRATUM:max_txs_per_block", 0); - - g_debuglog_client = iniparser_getint(ini, "DEBUGLOG:client", false); - g_debuglog_hash = iniparser_getint(ini, "DEBUGLOG:hash", false); - g_debuglog_socket = iniparser_getint(ini, "DEBUGLOG:socket", false); - g_debuglog_rpc = iniparser_getint(ini, "DEBUGLOG:rpc", false); - g_debuglog_list = iniparser_getint(ini, "DEBUGLOG:list", false); - g_debuglog_remote = iniparser_getint(ini, "DEBUGLOG:remote", false); - - iniparser_freedict(ini); - - g_current_algo = stratum_find_algo(g_stratum_algo); - - if(!g_current_algo) yaamp_error("invalid algo"); - if(!g_current_algo->hash_function) yaamp_error("no hash function"); - -// struct rlimit rlim_files = {0x10000, 0x10000}; -// setrlimit(RLIMIT_NOFILE, &rlim_files); - - struct rlimit rlim_threads = {0x8000, 0x8000}; - setrlimit(RLIMIT_NPROC, &rlim_threads); - - stratumlogdate("starting stratum for %s on %s:%d\n", - g_current_algo->name, g_tcp_server, g_tcp_port); - - // ntime should not be changed by miners for these algos - g_allow_rolltime = strcmp(g_stratum_algo,"x11evo"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"timetravel"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"bitcore"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"exosis"); - if (!g_allow_rolltime) - stratumlog("note: time roll disallowed for %s algo\n", g_current_algo->name); - - g_db = db_connect(); - if(!g_db) yaamp_error("Cant connect database"); - -// db_query(g_db, "update mining set stratumids='loading'"); - - yaamp_create_mutex(&g_db_mutex); - yaamp_create_mutex(&g_nonce1_mutex); - yaamp_create_mutex(&g_job_create_mutex); - - YAAMP_DB *db = db_connect(); - if(!db) yaamp_error("Cant connect database"); - - db_register_stratum(db); - db_update_algos(db); - db_update_coinds(db); - - sleep(2); - job_init(); - -// job_signal(); - - //////////////////////////////////////////////// - - pthread_t thread1; - pthread_create(&thread1, NULL, monitor_thread, NULL); - - pthread_t thread2; - pthread_create(&thread2, NULL, stratum_thread, NULL); - - sleep(20); - - while(!g_exiting) - { - db_register_stratum(db); - db_update_workers(db); - db_update_algos(db); - db_update_coinds(db); - - if(g_stratum_renting) - { - db_update_renters(db); - db_update_remotes(db); - } - - share_write(db); - share_prune(db); - - block_prune(db); - submit_prune(db); - - sleep(1); - job_signal(); - - //////////////////////////////////// - -// source_prune(); - - object_prune(&g_list_coind, coind_delete); - object_prune(&g_list_remote, remote_delete); - object_prune(&g_list_job, job_delete); - object_prune(&g_list_client, client_delete); - object_prune(&g_list_block, block_delete); - object_prune(&g_list_worker, worker_delete); - object_prune(&g_list_share, share_delete); - object_prune(&g_list_submit, submit_delete); - - if (!g_exiting) sleep(20); - } - - stratumlog("closing database...\n"); - db_close(db); - - pthread_join(thread2, NULL); - db_close(g_db); // client threads (called by stratum one) - - closelogs(); - - return 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -void *monitor_thread(void *p) -{ - while(!g_exiting) - { - sleep(120); - - if(g_last_broadcasted + YAAMP_MAXJOBDELAY < time(NULL)) - { - g_exiting = true; - stratumlogdate("%s dead lock, exiting...\n", g_stratum_algo); - exit(1); - } - - if(g_max_shares && g_shares_counter) { - - if((g_shares_counter - g_shares_log) > 10000) { - stratumlogdate("%s %luK shares...\n", g_stratum_algo, (g_shares_counter/1000u)); - g_shares_log = g_shares_counter; - } - - if(g_shares_counter > g_max_shares) { - g_exiting = true; - stratumlogdate("%s need a restart (%lu shares), exiting...\n", g_stratum_algo, (unsigned long) g_max_shares); - exit(1); - } - } - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void *stratum_thread(void *p) -{ - int listen_sock = socket(AF_INET, SOCK_STREAM, 0); - if(listen_sock <= 0) yaamp_error("socket"); - - int optval = 1; - setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval); - - struct sockaddr_in serv; - - serv.sin_family = AF_INET; - serv.sin_addr.s_addr = htonl(INADDR_ANY); - serv.sin_port = htons(g_tcp_port); - - int res = bind(listen_sock, (struct sockaddr*)&serv, sizeof(serv)); - if(res < 0) yaamp_error("bind"); - - res = listen(listen_sock, 4096); - if(res < 0) yaamp_error("listen"); - - ///////////////////////////////////////////////////////////////////////// - - int failcount = 0; - while(!g_exiting) - { - int sock = accept(listen_sock, NULL, NULL); - if(sock <= 0) - { - int error = errno; - stratumlog("%s socket accept() error %d\n", g_stratum_algo, error); - failcount++; - usleep(50000); - if (error == 24 && failcount > 5) { - g_exiting = true; // happen when max open files is reached (see ulimit) - stratumlogdate("%s too much socket failure, exiting...\n", g_stratum_algo); - exit(error); - } - continue; - } - - failcount = 0; - pthread_t thread; - int res = pthread_create(&thread, NULL, client_thread, (void *)(long)sock); - if(res != 0) - { - int error = errno; - close(sock); - g_exiting = true; - stratumlog("%s pthread_create error %d %d\n", g_stratum_algo, res, error); - } - - pthread_detach(thread); - } -} From 1e805049ea68131bdd341705c653291a158abf89 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:20:06 -0500 Subject: [PATCH 408/576] Delete stratum.h.bak --- stratum/stratum.h.bak | 230 ------------------------------------------ 1 file changed, 230 deletions(-) delete mode 100644 stratum/stratum.h.bak diff --git a/stratum/stratum.h.bak b/stratum/stratum.h.bak deleted file mode 100644 index b5174c2ed..000000000 --- a/stratum/stratum.h.bak +++ /dev/null @@ -1,230 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace std; - -#include "iniparser/src/iniparser.h" - -#include "json.h" -#include "util.h" - -#define YAAMP_RESTARTDELAY (24*60*60) -#define YAAMP_MAXJOBDELAY (2*60) -#define CURL_RPC_TIMEOUT (30) - -#define YAAMP_MS 1000 -#define YAAMP_SEC 1000000 - -#define YAAMP_MAXALGOS 32 - -typedef void (*YAAMP_HASH_FUNCTION)(const char *, char *, uint32_t); - -#define YAAMP_SHAREPERSEC 10 - -#define YAAMP_MINDIFF 0x0000000080000000 -#define YAAMP_MAXDIFF 0x4000000000000000 - -#define YAAMP_SMALLBUFSIZE (32*1024) - -#define YAAMP_NONCE_SIZE 4 -#define YAAMP_EXTRANONCE2_SIZE 4 - -#define YAAMP_HASHLEN_STR 65 -#define YAAMP_HASHLEN_BIN 32 - -extern CommonList g_list_coind; -extern CommonList g_list_client; -extern CommonList g_list_job; -extern CommonList g_list_remote; -extern CommonList g_list_renter; -extern CommonList g_list_share; -extern CommonList g_list_worker; -extern CommonList g_list_block; -extern CommonList g_list_submit; -extern CommonList g_list_source; - -extern int g_tcp_port; - -extern char g_tcp_server[1024]; -extern char g_tcp_password[1024]; - -extern char g_sql_host[1024]; -extern char g_sql_database[1024]; -extern char g_sql_username[1024]; -extern char g_sql_password[1024]; -extern int g_sql_port; - -extern char g_stratum_coin_include[256]; -extern char g_stratum_coin_exclude[256]; - -extern char g_stratum_algo[256]; -extern double g_stratum_difficulty; -extern double g_stratum_min_diff; -extern double g_stratum_max_diff; -extern double g_stratum_nicehash_difficulty; -extern double g_stratum_nicehash_min_diff; -extern double g_stratum_nicehash_max_diff; - -extern int g_stratum_max_cons; -extern int g_stratum_max_ttf; -extern bool g_stratum_reconnect; -extern bool g_stratum_renting; -extern bool g_stratum_segwit; -extern int g_limit_txs_per_block; - -extern bool g_handle_haproxy_ips; -extern int g_socket_recv_timeout; - -extern bool g_debuglog_client; -extern bool g_debuglog_hash; -extern bool g_debuglog_socket; -extern bool g_debuglog_rpc; -extern bool g_debuglog_list; -extern bool g_debuglog_remote; - -extern uint64_t g_max_shares; -extern uint64_t g_shares_counter; - -extern bool g_allow_rolltime; -extern time_t g_last_broadcasted; - -extern struct ifaddrs *g_ifaddr; - -extern pthread_mutex_t g_db_mutex; -extern pthread_mutex_t g_nonce1_mutex; -extern pthread_mutex_t g_job_create_mutex; - -extern volatile bool g_exiting; - -#include "db.h" -#include "object.h" -#include "socket.h" -#include "client.h" -#include "rpc.h" -#include "job.h" -#include "coind.h" -#include "remote.h" -#include "share.h" - -extern YAAMP_DB *g_db; -extern YAAMP_ALGO g_algos[]; -extern YAAMP_ALGO *g_current_algo; - -extern bool g_autoexchange; - -///////////////////////////////////////////////////////////////////////////////////////// - -YAAMP_ALGO *stratum_find_algo(const char *name); - -extern "C" -{ -void sha256_hash(const char *input, char *output, unsigned int len); -void sha256_double_hash(const char *input, char *output, unsigned int len); - -void scrypt_1024_1_1_256(const unsigned char *input, unsigned char *output); -void scrypt_N_R_1_256(const char* input, char* output, uint32_t N, uint32_t R, uint32_t len); -} - -void sha256_hash_hex(const char *input, char *output, unsigned int len); -void sha256_double_hash_hex(const char *input, char *output, unsigned int len); - -#include "algos/a5a.h" -#include "algos/c11.h" -#include "algos/x11.h" -#include "algos/x11evo.h" -#include "algos/x12.h" -#include "algos/x13.h" -#include "algos/x14.h" -#include "algos/x15.h" -#include "algos/x16r.h" -#include "algos/x16rt.h" -#include "algos/x16s.h" -#include "algos/x17.h" -#include "algos/x18.h" -#include "algos/x20r.h" -#include "algos/x21s.h" -#include "algos/x22i.h" -#include "algos/xevan.h" -#include "algos/hmq17.h" -#include "algos/nist5.h" -#include "algos/fresh.h" -#include "algos/hsr14.h" -#include "algos/quark.h" -#include "algos/neoscrypt.h" -#include "algos/allium.h" -#include "algos/lyra2re.h" -#include "algos/lyra2v2.h" -#include "algos/lyra2z.h" -#include "algos/lyra2vc0ban.h" -#include "algos/lyra2v3.h" -#include "algos/lyra2zz.h" -#include "algos/blake.h" -#include "algos/blakecoin.h" -#include "algos/blake2b.h" -#include "algos/blake2s.h" -#include "algos/qubit.h" -#include "algos/groestl.h" -#include "algos/jha.h" -#include "algos/skein.h" -#include "algos/keccak.h" -#include "algos/sha256t.h" -#include "algos/sha256q.h" -#include "algos/skunk.h" -#include "algos/timetravel.h" -#include "algos/bitcore.h" - -#include "algos/bastion.h" -#include "algos/bmw.h" -#include "algos/deep.h" -#include "algos/dedal.h" -#include "algos/lbk3.h" -#include "algos/lbry.h" -#include "algos/luffa.h" -#include "algos/pentablake.h" -#include "algos/rainforest.h" -#include "algos/whirlpool.h" -#include "algos/whirlpoolx.h" -#include "algos/skein2.h" -#include "algos/yescrypt.h" -#include "algos/yespower.h" -#include "algos/zr5.h" -#include "algos/hive.h" -#include "algos/sib.h" -#include "algos/m7m.h" -#include "algos/phi.h" -#include "algos/phi2.h" -#include "algos/polytimos.h" -#include "algos/sonoa.h" -#include "algos/tribus.h" -#include "algos/veltor.h" -#include "algos/velvet.h" -#include "algos/argon2a.h" -#include "algos/vitalium.h" -#include "algos/aergo.h" -#include "algos/hex.h" -#include "algos/argon2d-dyn.h" -#include "algos/exosis.h" -#include "algos/pipehash.h" -#include "algos/gltalgos.h" From 651dc6196b64d6bd8e1406bb1b689bb26b1f40dd Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:20:16 -0500 Subject: [PATCH 409/576] Delete util.cpp.bak --- stratum/util.cpp.bak | 771 ------------------------------------------- 1 file changed, 771 deletions(-) delete mode 100644 stratum/util.cpp.bak diff --git a/stratum/util.cpp.bak b/stratum/util.cpp.bak deleted file mode 100644 index 92f284a80..000000000 --- a/stratum/util.cpp.bak +++ /dev/null @@ -1,771 +0,0 @@ - -#include "stratum.h" -#include -#include - -//////////////////////////////////////////////////////////////////////////////// - -bool json_get_bool(json_value *json, const char *name) -{ - for(int i=0; iu.object.length; i++) - { - if(!strcmp(json->u.object.values[i].name, name)) - return json->u.object.values[i].value->u.boolean; - } - - return false; -} - -json_int_t json_get_int(json_value *json, const char *name) -{ - for(int i=0; iu.object.length; i++) - { - if(!strcmp(json->u.object.values[i].name, name)) - return json->u.object.values[i].value->u.integer; - } - - return 0; -} - -double json_get_double(json_value *json, const char *name) -{ - for(int i=0; iu.object.length; i++) - { - if(!strcmp(json->u.object.values[i].name, name)) - return json->u.object.values[i].value->u.dbl; - } - - return 0; -} - -const char *json_get_string(json_value *json, const char *name) -{ - for(int i=0; iu.object.length; i++) - { - if(!strcmp(json->u.object.values[i].name, name)) - return json->u.object.values[i].value->u.string.ptr; - } - - return NULL; -} - -json_value *json_get_array(json_value *json, const char *name) -{ - for(int i=0; iu.object.length; i++) - { -// if(json->u.object.values[i].value->type == json_array && !strcmp(json->u.object.values[i].name, name)) - if(!strcmp(json->u.object.values[i].name, name)) - return json->u.object.values[i].value; - } - - return NULL; -} - -//json_value *json_get_array_from_array(json_value *json, const char *name) -//{ -// for(int i=0; iu.array.length; i++) -// { -// if(!strcmp(json->u.array.values[i].name, name)) -// return json->u.array.values[i].value; -// } -// -// return NULL; -//} - -json_value *json_get_object(json_value *json, const char *name) -{ - for(int i=0; iu.object.length; i++) - { - if(!strcmp(json->u.object.values[i].name, name)) - return json->u.object.values[i].value; - } - - return NULL; -} - -/////////////////////////////////////////////////////////////////////////////////////////////// - -FILE *g_debuglog = NULL; -FILE *g_stratumlog = NULL; -FILE *g_clientlog = NULL; -FILE *g_rejectlog = NULL; - -void initlog(const char *algo) -{ - char debugfile[1024]; - - sprintf(debugfile, "%s.log", algo); - g_debuglog = fopen(debugfile, "w"); - - g_stratumlog = fopen("stratum.log", "a"); - g_clientlog = fopen("client.log", "a"); - g_rejectlog = fopen("reject.log", "a"); -} - -void closelogs() -{ - if (g_debuglog) { - fflush(g_debuglog); fclose(g_debuglog); - } - if (g_stratumlog) { - fflush(g_stratumlog); fclose(g_stratumlog); - } - if (g_clientlog) { - fflush(g_clientlog); fclose(g_clientlog); - } - if (g_rejectlog) { - fflush(g_rejectlog); fclose(g_rejectlog); - } -} - -void clientlog(YAAMP_CLIENT *client, const char *format, ...) -{ - char buffer[YAAMP_SMALLBUFSIZE]; - va_list args; - - va_start(args, format); - vsprintf(buffer, format, args); - va_end(args); - - time_t rawtime; - struct tm * timeinfo; - char buffer2[80]; - - time(&rawtime); - timeinfo = localtime(&rawtime); - - strftime(buffer2, 80, "%Y-%m-%d %H:%M:%S", timeinfo); - - char buffer3[YAAMP_SMALLBUFSIZE]; - sprintf(buffer3, "%s [%s] %s, %s, %s\n", buffer2, client->sock->ip, client->username, g_current_algo->name, buffer); - - printf("%s", buffer3); - if(g_debuglog) - { - fprintf(g_debuglog, "%s", buffer3); - fflush(g_debuglog); - } - - if(g_clientlog) - { - fprintf(g_clientlog, "%s", buffer3); - if (fflush(g_clientlog) == EOF) { - // reopen if wiped - fclose(g_clientlog); - g_clientlog = fopen("client.log", "a"); - } - } -} - -void debuglog(const char *format, ...) -{ - char buffer[YAAMP_SMALLBUFSIZE]; - va_list args; - - va_start(args, format); - vsprintf(buffer, format, args); - va_end(args); - - time_t rawtime; - struct tm * timeinfo; - char buffer2[80]; - - time(&rawtime); - timeinfo = localtime(&rawtime); - - strftime(buffer2, 80, "%H:%M:%S", timeinfo); - printf("%s: %s", buffer2, buffer); - - if(g_debuglog) - { - fprintf(g_debuglog, "%s: %s", buffer2, buffer); - fflush(g_debuglog); - } -} - -void debuglog_hex(void *data, int len) -{ - uint8_t* const bin = (uint8_t*) data; - char *hex = (char*) calloc(1, len*2 + 2); - if (!hex) return; - for(int i=0; i < len; i++) - sprintf(hex+strlen(hex), "%02x", bin[i]); - strcpy(hex+strlen(hex), "\n"); - debuglog(hex); - free(hex); -} - -void stratumlog(const char *format, ...) -{ - char buffer[YAAMP_SMALLBUFSIZE]; - va_list args; - - va_start(args, format); - vsprintf(buffer, format, args); - va_end(args); - - time_t rawtime; - struct tm * timeinfo; - char buffer2[80]; - - time(&rawtime); - timeinfo = localtime(&rawtime); - - strftime(buffer2, 80, "%H:%M:%S", timeinfo); - printf("%s: %s", buffer2, buffer); - - if(g_debuglog) - { - fprintf(g_debuglog, "%s: %s", buffer2, buffer); - fflush(g_debuglog); - } - - if(g_stratumlog) - { - fprintf(g_stratumlog, "%s: %s", buffer2, buffer); - if (fflush(g_stratumlog) == EOF) { - fclose(g_stratumlog); - g_stratumlog = fopen("stratum.log", "a"); - } - } -} - -void stratumlogdate(const char *format, ...) -{ - char buffer[YAAMP_SMALLBUFSIZE]; - char date[16]; - va_list args; - time_t rawtime; - struct tm * timeinfo; - - time(&rawtime); - timeinfo = localtime(&rawtime); - strftime(date, 16, "%Y-%m-%d", timeinfo); - - va_start(args, format); - vsprintf(buffer, format, args); - va_end(args); - - stratumlog("%s %s", date, buffer); -} - -void rejectlog(const char *format, ...) -{ - char buffer[YAAMP_SMALLBUFSIZE]; - va_list args; - - va_start(args, format); - vsnprintf(buffer, YAAMP_SMALLBUFSIZE-1, format, args); - va_end(args); - - time_t rawtime; - struct tm * timeinfo; - char buffer2[80]; - - time(&rawtime); - timeinfo = localtime(&rawtime); - - strftime(buffer2, 80, "%Y-%m-%d %H:%M:%S", timeinfo); - printf("%s: %s", buffer2, buffer); - - if(g_rejectlog) - { - fprintf(g_rejectlog, "%s: %s", buffer2, buffer); - if (fflush(g_rejectlog) == EOF) { - fclose(g_rejectlog); - g_rejectlog = fopen("reject.log", "a"); - } - } -} - - -bool yaamp_error(char const *message) -{ - debuglog("ERROR: %d %s\n", errno, message); - closelogs(); - exit(1); -} - -void yaamp_create_mutex(pthread_mutex_t *mutex) -{ - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(mutex, &attr); - - pthread_mutexattr_destroy(&attr); -} - -const char *header_value(const char *data, const char *search, char *value) -{ - value[0] = 0; - - char *p = (char *)strstr(data, search); - if(!p) return value; - - p += strlen(search); - while(*p == ' ' || *p == ':') p++; - - char *p2 = (char *)strstr(p, "\r\n"); - if(!p2) - { - strncpy(value, p, 1024); - return value; - } - - strncpy(value, p, min(1024, p2 - p)); - value[min(1023, p2 - p)] = 0; - - return value; -} - -//////////////////////////////////////////////////////////////////////////////////////////// - -const unsigned char g_base64_tab[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -void base64_encode(char *base64, const char *normal) -{ - int cb = strlen((char *)normal); - while(cb >= 3) - { - unsigned char b0 = ((normal[0] >> 2) & 0x3F); - unsigned char b1 = ((normal[0] & 0x03) << 4) | ((normal[1] >> 4) & 0x0F); - unsigned char b2 = ((normal[1] & 0x0F) << 2) | ((normal[2] >> 6) & 0x03); - unsigned char b3 = ((normal[2] & 0x3F)); - - *base64++ = g_base64_tab[b0]; - *base64++ = g_base64_tab[b1]; - *base64++ = g_base64_tab[b2]; - *base64++ = g_base64_tab[b3]; - - normal += 3; - cb -= 3; - } - - if(cb == 1) - { - unsigned char b0 = ((normal[0] >> 2) & 0x3F); - unsigned char b1 = ((normal[0] & 0x03) << 4) | 0; - - *base64++ = g_base64_tab[b0]; - *base64++ = g_base64_tab[b1]; - - *base64++ = '='; - *base64++ = '='; - } - else if(cb == 2) - { - unsigned char b0 = ((normal[0] >> 2) & 0x3F); - unsigned char b1 = ((normal[0] & 0x03) << 4) | ((normal[1] >> 4) & 0x0F); - unsigned char b2 = ((normal[1] & 0x0F) << 2) | 0; - - *base64++ = g_base64_tab[b0]; - *base64++ = g_base64_tab[b1]; - *base64++ = g_base64_tab[b2]; - *base64++ = '='; - } - - *base64 = 0; -} - -void base64_decode(char *normal, const char *base64) -{ - int i; - - unsigned char decoding_tab[256]; - memset(decoding_tab, 255, 256); - - for(i = 0; i < 64; i++) - decoding_tab[g_base64_tab[i]] = i; - - unsigned long current = 0; - int bit_filled = 0; - - for(i = 0; base64[i]; i++) - { - if(base64[i] == 0x0A || base64[i] == 0x0D || base64[i] == 0x20 || base64[i] == 0x09) - continue; - - if(base64[i] == '=') - break; - - unsigned char digit = decoding_tab[base64[i]]; - - current <<= 6; - current |= digit; - bit_filled += 6; - - if(bit_filled >= 8) - { - unsigned long b = (current >> (bit_filled - 8)); - - *normal++ = (unsigned char)(b & 0xFF); - bit_filled -= 8; - } - } - - *normal = 0; -} - -/////////////////////////////////////////////////////////////////////////////////////////////// - -void hexlify(char *hex, const unsigned char *bin, int len) -{ - hex[0] = 0; - for(int i=0; i < len; i++) - sprintf(hex+strlen(hex), "%02x", bin[i]); -} - -bool ishexa(char *hex, int len) -{ - for(int i=0; i= '0' && v <= '9') - return v-'0'; - - if(v >= 'a' && v <= 'f') - return v-'a'+10; - - return 0; -} - -void binlify(unsigned char *bin, const char *hex) -{ - int len = strlen(hex); - for(int i=0; i 127) - { - s[s[0]] = n % 256; - n /= 256; - s[0]++; - } - - s[s[0]] = n; - a[0] = 0; - - for(int i=0; i<=s[0]; i++) - { - char tmp[32]; - sprintf(tmp, "%02x", s[i]); - strcat(a, tmp); - } - -// printf("ser_number %d, %s\n", n, a); -} - -void ser_string_be(const char *input, char *output, int len) -{ - for(int i=0; idiff_multiplier/difficulty; - return t; -} - -double target_to_diff(uint64_t target) -{ - if(!target) return 0; - - double d = (double)0x0000ffff00000000/target; - return d; -} - -uint64_t decode_compact(const char *input) -{ - uint64_t c = htoi64(input); - - int nShift = (c >> 24) & 0xff; - double d = (double)0x0000ffff / (double)(c & 0x00ffffff); - - while (nShift < 29) - { - d *= 256.0; - nShift++; - } - - while (nShift > 29) - { - d /= 256.0; - nShift--; - } - - uint64_t v = 0x0000ffff00000000/d; -// debuglog("decode_compact %s -> %f -> %016llx\n", input, d, v); - -// int nbytes = (c >> 24) & 0xFF; -// -// nbytes -= 25; -// v = (c & 0xFFFFFF) << (8 * nbytes); -// -// debuglog("decode_compact %s -> %016llx\n", input, v); - return v; -} - -//def uint256_from_compact(c): -// c = int(c) -// nbytes = (c >> 24) & 0xFF -// v = (c & 0xFFFFFFL) << (8 * (nbytes - 3)) -// return v - -uint64_t get_hash_difficulty(unsigned char *input) -{ - unsigned char *p = (unsigned char *)input; - - uint64_t v = - (uint64_t)p[29] << 56 | - (uint64_t)p[28] << 48 | - (uint64_t)p[27] << 40 | - (uint64_t)p[26] << 32 | - (uint64_t)p[25] << 24 | - (uint64_t)p[24] << 16 | - (uint64_t)p[23] << 8 | - (uint64_t)p[22] << 0; - -// char toto[1024]; -// hexlify(toto, input, 32); -// debuglog("hash diff %s %016llx\n", toto, v); - return v; -} - -unsigned int htoi(const char *s) -{ - unsigned int val = 0; - int x = 0; - - if(s[x] == '0' && (s[x+1] == 'x' || s[x+1] == 'X')) - x += 2; - - while(s[x]) - { - if(val > UINT_MAX) - return 0; - - else if(s[x] >= '0' && s[x] <='9') - val = val * 16 + s[x] - '0'; - - else if(s[x]>='A' && s[x] <='F') - val = val * 16 + s[x] - 'A' + 10; - - else if(s[x]>='a' && s[x] <='f') - val = val * 16 + s[x] - 'a' + 10; - - else - return 0; - - x++; - } - - return val; -} - -uint64_t htoi64(const char *s) -{ - uint64_t val = 0; - int x = 0; - - if(s[x] == '0' && (s[x+1] == 'x' || s[x+1] == 'X')) - x += 2; - - while(s[x]) - { - if(val > ULLONG_MAX) - return 0; - - else if(s[x] >= '0' && s[x] <='9') - val = val * 16 + s[x] - '0'; - - else if(s[x]>='A' && s[x] <='F') - val = val * 16 + s[x] - 'A' + 10; - - else if(s[x]>='a' && s[x] <='f') - val = val * 16 + s[x] - 'a' + 10; - - else - return 0; - - x++; - } - - return val; -} - -#if 0 -// gettimeofday seems deprecated in POSIX -long long current_timestamp() -{ - long long milliseconds; - struct timeval te; - - gettimeofday(&te, NULL); - - milliseconds = te.tv_sec*1000LL + te.tv_usec/1000; - return milliseconds; -} -#else -long long current_timestamp() -{ - long long milliseconds; - struct timespec te; - - clock_gettime(CLOCK_REALTIME, &te); - - milliseconds = 1000LL*te.tv_sec + round(te.tv_nsec/1e6); - return milliseconds; -} -#endif - -long long current_timestamp_dms() // allow 0.1 ms time -{ - long long dms; - struct timespec te; - - clock_gettime(CLOCK_REALTIME, &te); - - dms = 10000LL*te.tv_sec + round(te.tv_nsec/1e5); - return dms; -} - -int opened_files() -{ - int fds = 0; - DIR *d = opendir("/proc/self/fd"); - if (d) { - while (readdir(d)) fds++; - closedir(d); - } - return fds; -} - -int resident_size() -{ - int sz, res = 0; - FILE *fp = fopen("/proc/self/statm", "r"); - if (fp) { - int p = fscanf(fp, "%d", &sz); - if (p) p += fscanf(fp, "%d", &res); - fclose(fp); - } - return res; -} - -void string_lower(char *s) -{ - for(int i = 0; s[i]; i++) - s[i] = tolower(s[i]); -} - -void string_upper(char *s) -{ - for(int i = 0; s[i]; i++) - s[i] = toupper(s[i]); -} - - -////////////////////////////////////////////////////////////////////////////////////// - -int getblocheight(const char *coinb1) -{ - unsigned char coinb1_bin[1024]; - binlify(coinb1_bin, coinb1); - - int height = 0; - uint8_t hlen = 0, *p, *m; - - // find 0xffff tag - p = (uint8_t*)coinb1_bin + 32; - m = p + 128; - while (*p != 0xff && p < m) p++; - while (*p == 0xff && p < m) p++; - - if (*(p-1) == 0xff && *(p-2) == 0xff) - { - p++; hlen = *p; - p++; height = le16dec(p); - p += 2; - switch (hlen) - { - case 4: - height += 0x10000UL * le16dec(p); - break; - case 3: - height += 0x10000UL * (*p); - break; - } - } - - return height; -} - -void sha256_double_hash_hex(const char *input, char *output, unsigned int len) -{ - char output1[32]; - - sha256_double_hash(input, output1, len); - hexlify(output, (unsigned char *)output1, 32); -} - -void sha256_hash_hex(const char *input, char *output, unsigned int len) -{ - char output1[32]; - - sha256_hash(input, output1, len); - hexlify(output, (unsigned char *)output1, 32); -} - From dae51b5005964e647d622fef93a91c92565b416e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:20:25 -0500 Subject: [PATCH 410/576] Delete util.h.bak --- stratum/util.h.bak | 139 --------------------------------------------- 1 file changed, 139 deletions(-) delete mode 100644 stratum/util.h.bak diff --git a/stratum/util.h.bak b/stratum/util.h.bak deleted file mode 100644 index bf57bfd27..000000000 --- a/stratum/util.h.bak +++ /dev/null @@ -1,139 +0,0 @@ - -struct YAAMP_CLIENT; - -struct COMMONLISTITEM -{ - void *data; - - struct COMMONLISTITEM *next; - struct COMMONLISTITEM *prev; -}; - -typedef COMMONLISTITEM *CLI; - -typedef void (*LISTFREEPARAM)(void *); - -class CommonList -{ -public: - CommonList(); - ~CommonList(); - - CLI AddHead(void *data); - CLI AddTail(void *data); - - void Delete(CLI item); - void Delete(void *data); - - void DeleteAll(LISTFREEPARAM freeparam); - - CLI Find(void *data); - void Swap(CLI i1, CLI i2); - - void Enter(); - void Leave(); - - pthread_mutex_t mutex; - int count; - - CLI first; - CLI last; -}; - -void CommonLock(pthread_mutex_t *mutex); -void CommonUnlock(pthread_mutex_t *mutex); - -////////////////////////////////////////////////////////////////////////// - -bool json_get_bool(json_value *json, const char *name); -json_int_t json_get_int(json_value *json, const char *name); -double json_get_double(json_value *json, const char *name); -const char *json_get_string(json_value *json, const char *name); -json_value *json_get_array(json_value *json, const char *name); -json_value *json_get_object(json_value *json, const char *name); - -void yaamp_create_mutex(pthread_mutex_t *mutex); -bool yaamp_error(char const *message); - -const char *header_value(const char *data, const char *search, char *value); - -void initlog(const char *algo); -void closelogs(); - -void debuglog(const char *format, ...); -void stratumlog(const char *format, ...); -void stratumlogdate(const char *format, ...); -void clientlog(YAAMP_CLIENT *client, const char *format, ...); -void rejectlog(const char *format, ...); - -////////////////////////////////////////////////////////////////////////// - -vector merkle_steps(vector input); -string merkle_with_first(vector steps, string f); - -////////////////////////////////////////////////////////////////////////// - -bool base58_decode(const char *input, char *output); -bool is_base58(char *input); - -void base64_encode(char *base64, const char *normal); -void base64_decode(char *normal, const char *base64); - -void ser_number(int n, char *s); - -void ser_string_be(const char *input, char *output, int len); -void ser_string_be2(const char *input, char *output, int len); - -void string_be(const char *input, char *output); -void string_be1(char *s); - -bool ishexa(char *hex, int len); - -void hexlify(char *hex, const unsigned char *bin, int len); -void binlify(unsigned char *bin, const char *hex); - -unsigned int htoi(const char *s); -uint64_t htoi64(const char *s); - -uint64_t decode_compact(const char *input); - -uint64_t diff_to_target(double difficulty); -double target_to_diff(uint64_t target); - -uint64_t get_hash_difficulty(unsigned char *input); - -long long current_timestamp(); -long long current_timestamp_dms(); - -int opened_files(); -int resident_size(); - -void string_lower(char *s); -void string_upper(char *s); - -int getblocheight(const char *coinb1); - -////////////////////////////////////////////////////////////////////////// - -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif - -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - -////////////////////////////////////////////////////////////////////////// - -#if !HAVE_DECL_LE16DEC -static inline uint16_t le16dec(const void *pp) -{ - const uint8_t *p = (uint8_t const *)pp; - return ((uint16_t)(p[0]) + ((uint16_t)(p[1]) << 8)); -} -#endif - -static inline uint32_t bswap32(uint32_t x) { - __asm__ __volatile__ ("bswapl %0" : "=r" (x) : "0" (x)); - return x; -} From 1a7cc70d3429ad998aa0b723c164384c546a4d39 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:21:18 -0500 Subject: [PATCH 411/576] Update coind_submit.cpp --- stratum/coind_submit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stratum/coind_submit.cpp b/stratum/coind_submit.cpp index f1f8b6f7f..3a2af19b1 100644 --- a/stratum/coind_submit.cpp +++ b/stratum/coind_submit.cpp @@ -140,7 +140,9 @@ bool coind_submitgetauxblock(YAAMP_COIND *coind, const char *hash, const char *b json_value *json_result = json_get_object(json, "result"); bool b = json_result && json_result->type == json_boolean && json_result->u.boolean; - + // some auxpow coins return error:null, result: null on success + if(!b) + b=json_result && json_result->type == json_null; json_value_free(json); return b; } From 7c403e31fe96906ed791eaf65c29504252c9df5d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:23:44 -0500 Subject: [PATCH 412/576] Update rawcoins.php --- web/yaamp/core/backend/rawcoins.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/yaamp/core/backend/rawcoins.php b/web/yaamp/core/backend/rawcoins.php index c9001104d..f0853cedf 100644 --- a/web/yaamp/core/backend/rawcoins.php +++ b/web/yaamp/core/backend/rawcoins.php @@ -493,6 +493,16 @@ function updateRawcoins() function updateRawCoin($marketname, $symbol, $name='unknown') { if($symbol == 'BTC') return; + + // Restrict $symbol and $name to strict defined set of characters (to protect from rogue exchange or DNS attack on exchange) + if (preg_match('/[^A-Za-z0-9_\$]/', $symbol)) { + debuglog("weird symbol $symbol from $marketname"); + return; + } + if (preg_match('/[^A-Za-z0-9_\$ ]/', $name)) { + debuglog("weird name $name for symbol $symbol from $marketname"); + return; + } $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); if(!$coin && YAAMP_CREATE_NEW_COINS) From 87d1f17e23c03d9071de8a99f2b8a0a15dbaa32a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 25 Feb 2019 21:54:46 -0500 Subject: [PATCH 413/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 81f89bfce..3d1ea2e5e 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1010,6 +1010,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //if(coind->txmessage) // strcat(templ->coinb2, "00"); + if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. + if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin strcat(templ->coinb2, "00000000"); // locktime From 34df863fbe1725bfc6e8a30ebd376789eadccda1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 27 Feb 2019 00:53:45 -0500 Subject: [PATCH 414/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index c256b562c..56e807823 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -65,6 +65,7 @@ function yaamp_get_algos() 'skein', 'skein2', 'skunk', + 'sonoa', 'timetravel', 'tribus', 'vanilla', @@ -226,6 +227,7 @@ function getAlgoColors($algo) 'skein' => '#80a0a0', 'skein2' => '#c8a060', 'skunk' => '#dedefe', + 'sonoa' => '#dedefe', 'timetravel' => '#f0b0d0', 'tribus' => '#c0d0d0', 'vanilla' => '#f0f0f0', @@ -327,6 +329,7 @@ function getAlgoPort($algo) 'skein' => 4933, 'skein2' => 5233, 'skunk' => 8433, + 'sonoa' => 8733, 'timetravel' => 3555, 'tribus' => 8533, 'vanilla' => 5755, From f6c0ca6335d2cbdf67227ef90eae1327ae719d52 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 28 Feb 2019 13:30:26 -0500 Subject: [PATCH 415/576] Update coinbase.cpp --- stratum/coinbase.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 3d1ea2e5e..5283d5eed 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -645,6 +645,45 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); + json_value* founder = json_get_object(json_result, "founder"); + + if (!coind->hasmasternodes && founder_enabled && founder) { + char founder_payee[256] = { 0 }; + char founder_script[1024] = { 0}; + const char *payee = json_get_string(founder, "payee"); + bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); + json_int_t amount = json_get_int(founder, "amount"); + if(payee && amount) { + if (payee) snprintf(founder_payee, 255, "%s", payee); + if (strlen(founder_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + base58_decode(founder_payee, founder_script); + available -= amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + if(founder_use_p2sh) { + p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); + } else { + job_pack_tx(coind, templ->coinb2, amount, founder_script); + } + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); + debuglog("%s founder script %s\n", coind->symbol,founder_script); + debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); + + return; + } + } // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) From bae665f19d233a476c11613e476ff2fb6bf6cd61 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 28 Feb 2019 13:40:09 -0500 Subject: [PATCH 416/576] Update coinbase.cpp --- stratum/coinbase.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 5283d5eed..d91a9f6b1 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -400,6 +400,53 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + + else if(strcmp(coind->symbol, "GWAY") == 0) { + char script_payee[512] = { 0 }; + char payees[1]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //mainnet + json_int_t charity_amount = 6000000000; + sprintf(coind->charity_address, "gARS8XUE9aREqpkMsdZow2hz6J2qKbtDa4"); + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + else if (strcmp(coind->symbol,"XZX") == 0) { char payees[4]; From 78e9cb7f32f9d7a8f7d0f2aa876223a3b1942f9b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 28 Feb 2019 13:46:33 -0500 Subject: [PATCH 417/576] Update coinbase.cpp --- stratum/coinbase.cpp | 47 +------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index d91a9f6b1..fb09dc9f4 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -401,51 +401,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if(strcmp(coind->symbol, "GWAY") == 0) { - char script_payee[512] = { 0 }; - char payees[1]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //mainnet - json_int_t charity_amount = 6000000000; - sprintf(coind->charity_address, "gARS8XUE9aREqpkMsdZow2hz6J2qKbtDa4"); - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } else if (strcmp(coind->symbol,"XZX") == 0) { @@ -490,7 +445,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "GWAY") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From 50cd56f976f240958f6dfd8c86597053449abc7d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 28 Feb 2019 22:04:07 -0500 Subject: [PATCH 418/576] Create _config.yml --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 000000000..bad826676 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-midnight From 0f6045fba047e1e7e04648fe0e6bafb089715927 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Mar 2019 17:32:56 -0500 Subject: [PATCH 419/576] Update client_submit.cpp --- stratum/client_submit.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 17560e08b..10c754ff2 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -251,6 +251,16 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL snprintf(block_hex, block_size, "%s", hex); } + if(g_current_algo->name && !strcmp("ZBIT", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } + bool b = coind_submit(coind, block_hex); if(b) { From 3363218a6057b0eafffa3bc1a2d3afe7a44e0dd3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Mar 2019 20:58:25 -0500 Subject: [PATCH 420/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index fb09dc9f4..0fa32307f 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -445,7 +445,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "GWAY") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "GOV") == 0)||(strcmp(coind->symbol, "GWAY") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From f102f04ce1943e328323cad466d835c8fc59146b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Mar 2019 21:05:25 -0500 Subject: [PATCH 421/576] Update coinbase.cpp --- stratum/coinbase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 0fa32307f..cc6a69a13 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -445,7 +445,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "GOV") == 0)||(strcmp(coind->symbol, "GWAY") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "GWAY") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; @@ -1053,6 +1053,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + if(strcmp(coind->symbol, "GOV") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime From b2c2dab01e2aa9d16c5cf7a13e7e79c371bc6163 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Mar 2019 21:09:01 -0500 Subject: [PATCH 422/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index cc6a69a13..fb09dc9f4 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1053,7 +1053,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - if(strcmp(coind->symbol, "GOV") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime From aaaa7f8762a05d02ff9964db41ae41570b57f536 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Mar 2019 21:12:57 -0500 Subject: [PATCH 423/576] Update coinbase.cpp --- stratum/coinbase.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index fb09dc9f4..1690e637d 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -401,6 +401,54 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } + else if(strcmp(coind->symbol, "GOV") == 0) { + char script_payee[512] = { 0 }; + char payees[1]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //mainnet + json_int_t charity_amount = 2000000000; + sprintf(coind->charity_address, "GMBzScjvvtaCicr13mp6rbMKWEoJYg1JGo"); + //testnet + //json_int_t charity_amount = 50000000; + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } else if (strcmp(coind->symbol,"XZX") == 0) { From 11f4382bf2ee20b2be1b6a20018dd2198e867819 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Mar 2019 21:14:32 -0500 Subject: [PATCH 424/576] Update coinbase.cpp --- stratum/coinbase.cpp | 51 +------------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 1690e637d..12cce0d4b 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -401,55 +401,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if(strcmp(coind->symbol, "GOV") == 0) { - char script_payee[512] = { 0 }; - char payees[1]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //mainnet - json_int_t charity_amount = 2000000000; - sprintf(coind->charity_address, "GMBzScjvvtaCicr13mp6rbMKWEoJYg1JGo"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - else if (strcmp(coind->symbol,"XZX") == 0) { char payees[4]; @@ -493,7 +444,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "GWAY") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "GOV") == 0)||(strcmp(coind->symbol, "GWAY") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From 024ec8c502f98e0ce070caae8c8ddd30e10bd67a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 3 Mar 2019 21:27:12 -0500 Subject: [PATCH 425/576] Update coinbase.cpp --- stratum/coinbase.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 12cce0d4b..c3dd45279 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -78,10 +78,10 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); // debuglog("aux_script is %s\n", aux_script); -} + } -void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) -{ + void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) + { char eheight[32], etime[32]; char entime[32] = { 0 }; char commitment[128] = { 0 }; @@ -140,7 +140,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - if(superblocks_enabled && superblock) { + if(superblocks_enabled && superblock) { for(int i = 0; i < superblock->u.array.length; i++) { const char *payee = json_get_string(superblock->u.array.values[i], "payee"); json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); @@ -153,7 +153,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } } } - if (dynode_enabled && dynode) { + if (dynode_enabled && dynode) { bool started; started = json_get_bool(json_result, "dynode_payments_started"); const char *payee = json_get_string(dynode, "payee"); @@ -218,7 +218,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available/100000000*coind->reward_mul; return; } - else if(strcmp("DCR", coind->rpcencoding) == 0) { + + else if(strcmp("DCR", coind->rpcencoding) == 0) { coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 coind->charity_percent = 0; coind->charity_amount = available; @@ -314,13 +315,13 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * { char script_dests[2048] = { 0 }; char script_payee[128] = { 0 }; - char script_treasury[128] = { 0 }; + char script_treasury[128] = { 0 }; char payees[4]; int npayees = 1; bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); json_value* masternode = json_get_object(json_result, "masternode"); - json_value* treasury = json_get_object(json_result, "treasury"); - bool treasury_enabled = true; + json_value* treasury = json_get_object(json_result, "treasury"); + bool treasury_enabled = true; if(treasury_enabled && treasury) { const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); @@ -444,7 +445,14 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - else if ((strcmp(coind->symbol, "IFX") == 0)||(strcmp(coind->symbol, "GTM") == 0)||(strcmp(coind->symbol, "GOV") == 0)||(strcmp(coind->symbol, "GWAY") == 0)||(strcmp(coind->symbol, "ALMN") == 0)||(strcmp(coind->symbol, "AGM") == 0)||(strcmp(coind->symbol, "BMN") == 0)||(strcmp(coind->symbol, "CRDS") == 0)) + else if ((strcmp(coind->symbol, "IFX") == 0)|| + (strcmp(coind->symbol, "GTM") == 0)|| + (strcmp(coind->symbol, "GOV") == 0)|| + (strcmp(coind->symbol, "GWAY") == 0)|| + (strcmp(coind->symbol, "ALMN") == 0)|| + (strcmp(coind->symbol, "AGM") == 0)|| + (strcmp(coind->symbol, "BMN") == 0)|| + (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; int npayees = 1; From 318cce49e938d62580305df9c97ddceba00ce07c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Mar 2019 21:05:03 -0500 Subject: [PATCH 426/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index c3dd45279..43ecd0dac 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -452,6 +452,7 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) (strcmp(coind->symbol, "ALMN") == 0)|| (strcmp(coind->symbol, "AGM") == 0)|| (strcmp(coind->symbol, "BMN") == 0)|| + (strcmp(coind->symbol, "MNGO") == 0)|| (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; From 7a22ee31a8201fb310b6cc2bb3977cb9166bd77c Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Mar 2019 21:08:43 -0500 Subject: [PATCH 427/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 43ecd0dac..c3dd45279 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -452,7 +452,6 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) (strcmp(coind->symbol, "ALMN") == 0)|| (strcmp(coind->symbol, "AGM") == 0)|| (strcmp(coind->symbol, "BMN") == 0)|| - (strcmp(coind->symbol, "MNGO") == 0)|| (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; From 4aa4259d9488a7709ccdd298fd488493788b7cd8 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Mar 2019 21:38:25 -0500 Subject: [PATCH 428/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index c3dd45279..dbe96aeec 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1060,7 +1060,7 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - + if(strcmp(coind->symbol, "MNGO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; From ff79cdde711e383a62c72e436b5888a2ba84c1e2 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Mar 2019 21:42:20 -0500 Subject: [PATCH 429/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index dbe96aeec..53074e085 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -452,6 +452,7 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) (strcmp(coind->symbol, "ALMN") == 0)|| (strcmp(coind->symbol, "AGM") == 0)|| (strcmp(coind->symbol, "BMN") == 0)|| + (strcmp(coind->symbol, "MNGO") == 0)|| (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; @@ -1060,7 +1061,6 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - if(strcmp(coind->symbol, "MNGO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; From 8fcdc009ddcef6282faa837545f2d9a2a483cebf Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 4 Mar 2019 21:43:53 -0500 Subject: [PATCH 430/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 53074e085..6c5cf3a6f 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -452,7 +452,6 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) (strcmp(coind->symbol, "ALMN") == 0)|| (strcmp(coind->symbol, "AGM") == 0)|| (strcmp(coind->symbol, "BMN") == 0)|| - (strcmp(coind->symbol, "MNGO") == 0)|| (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; From c337856e3057bcffb93aa0f822e1b1512c26da20 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 5 Mar 2019 00:50:18 -0500 Subject: [PATCH 431/576] Update client_submit.cpp --- stratum/client_submit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 10c754ff2..942c9886f 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -260,6 +260,15 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL sprintf(extra, "%s", &block_hex[160]); sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); } + if(g_current_algo->name && !strcmp("MLS", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } bool b = coind_submit(coind, block_hex); if(b) From 2346b097923fcb050c981ed433d22279d6a20c36 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sat, 9 Mar 2019 14:58:37 -0500 Subject: [PATCH 432/576] additions --- sql/2019-03-coins_thepool_life.sql | 11 +++ web/yaamp/models/db_coinsModel.php | 5 +- web/yaamp/modules/site/coin_form.php | 142 ++++++++++++++------------- 3 files changed, 90 insertions(+), 68 deletions(-) create mode 100644 sql/2019-03-coins_thepool_life.sql diff --git a/sql/2019-03-coins_thepool_life.sql b/sql/2019-03-coins_thepool_life.sql new file mode 100644 index 000000000..e5fa67c77 --- /dev/null +++ b/sql/2019-03-coins_thepool_life.sql @@ -0,0 +1,11 @@ +-- Recent additions to add after db init (.gz) +-- mysql yaamp -p < file.sql + +-- Additional fields for additions by cryptopool.builders + +ALTER TABLE `coins` ADD `link_twitter` varchar(1024) DEFAULT NULL AFTER `link_explorer`; +ALTER TABLE `coins` ADD `link_facebook` varchar(1024) DEFAULT NULL AFTER `link_twitter`; +ALTER TABLE `coins` ADD `donation_address` varchar(1024) DEFAULT NULL AFTER `link_facebook`; +ALTER TABLE `coins` ADD `link_discord` varchar(1024) DEFAULT NULL AFTER `link_twitter`; +ALTER TABLE `coins` ADD `usefaucet` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `donation_address`; +ALTER TABLE `coins` ADD `dedicatedport` int(11) DEFAULT NULL AFTER `rpcport`; diff --git a/web/yaamp/models/db_coinsModel.php b/web/yaamp/models/db_coinsModel.php index 5ce150dc8..e41f7db70 100644 --- a/web/yaamp/models/db_coinsModel.php +++ b/web/yaamp/models/db_coinsModel.php @@ -51,9 +51,11 @@ public function attributeLabels() 'hassubmitblock'=> 'Has submitblock', 'hasmasternodes'=> 'Masternodes', 'usesegwit' => 'Use segwit', + 'usefaucet' => 'Use Faucet', 'market' => 'Preferred market', 'rpcencoding' => 'RPC Type', - 'specifications'=> 'Notes' + 'dedicatedport' => 'Dedicated Port', + 'specifications'=> 'AddNodes' ); } @@ -122,4 +124,3 @@ public function createExplorerLink($label, $params=array(), $htmlOptions=array() } } - diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index f842555ec..c17e064bc 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -285,7 +285,7 @@ echo '

    Field will update on process name save

    '; echo CUFHtml::closeCtrlHolder();} -else +else if(empty($coin->conf_folder)){ $program = substr($coin->program, 0, -1); $coin->conf_folder = "/home/crypto-data/wallets/.$program"; @@ -341,6 +341,12 @@ echo '

    POW/POS

    '; echo CUFHtml::closeCtrlHolder(); +echo CUFHtml::openActiveCtrlHolder($coin, 'dedicatedport'); +echo CUFHtml::activeLabelEx($coin, 'dedicatedport'); +echo CUFHtml::activeTextField($coin, 'dedicatedport', array('maxlength'=>5,'style'=>'width: 60px;')); +echo '

    For Coins on Dedicated Ports

    '; +echo CUFHtml::closeCtrlHolder(); + echo CUFHtml::openActiveCtrlHolder($coin, 'rpccurl'); echo CUFHtml::activeLabelEx($coin, 'rpccurl'); echo CUFHtml::activeCheckBox($coin, 'rpccurl'); @@ -372,71 +378,75 @@ echo CUFHtml::closeCtrlHolder(); if ($coin->id) { - if(empty($coin->program)){ - echo CHtml::tag("hr"); - echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; -} -else { - $program = substr($coin->program, 0, -1); - echo CHtml::tag("hr"); - echo "Autogenerated config:\n"; - echo CHtml::opentag("pre"); - echo "mkdir -p {$coin->conf_folder}\n"; - $port = getAlgoPort($coin->algo); - echo "echo '\n"; - echo " \n"; - echo "rpcuser={$coin->rpcuser}\n"; - echo "rpcpassword={$coin->rpcpasswd}\n"; - echo "rpcport={$coin->rpcport}\n"; - echo "rpcthreads=64\n"; - echo "rpcallowip=127.0.0.1\n"; - echo "# onlynet=ipv4\n"; - echo "maxconnections=12\n"; - echo "daemon=1\n"; - echo "gen=0\n"; - if(empty($coin->specifications)){ - echo "\n"; - } - else { - echo "{$coin->specifications}\n"; - echo "\n"; - } - echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; - echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n"; - echo " \n"; - echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; - echo CHtml::closetag("pre"); - - echo CHtml::tag("hr"); - echo "Add coin to system startup:"; - echo CHtml::opentag("pre"); - echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; - echo "\n"; - echo '

    add -reindex if coin fails to start.

    '; - echo CHtml::closetag("pre"); - - echo CHtml::tag("hr"); - echo "Helpful Daemon Commands:"; - echo CHtml::opentag("pre"); - echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n"; - echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; - echo "Or if your coin has a cli file...\n"; - echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; - echo "sudo nano {$coin->conf_folder}/$program.conf\n"; - echo CHtml::closetag("pre"); - - echo CHtml::tag("hr"); - echo "Miner command line:"; - echo CHtml::opentag("pre"); - echo "-a {$coin->algo} "; - echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' '; - echo "-u {$coin->master_wallet} "; - echo "-p c={$coin->symbol} "; - echo "\n"; - echo CHtml::closetag("pre");} -} - -echo ""; + if(empty($coin->program)){ + echo CHtml::tag("hr"); + echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; + } + else { + $program = substr($coin->program, 0, -1); + echo CHtml::tag("hr"); + echo "Autogenerated config:\n"; + echo CHtml::opentag("pre"); + echo "mkdir -p {$coin->conf_folder}\n"; + $port = getAlgoPort($coin->algo); + $dedport = $coin->dedicatedport; + echo "echo '\n"; + echo " \n"; + echo "rpcuser={$coin->rpcuser}\n"; + echo "rpcpassword={$coin->rpcpasswd}\n"; + echo "rpcport={$coin->rpcport}\n"; + echo "rpcthreads=64\n"; + echo "rpcallowip=127.0.0.1\n"; + echo "# onlynet=ipv4\n"; + echo "maxconnections=12\n"; + echo "daemon=1\n"; + echo "gen=0\n"; + if(empty($coin->specifications)){ + echo "\n"; + } + else { + echo "{$coin->specifications}\n"; + echo "\n"; + } + echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; + echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n"; + echo " \n"; + echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; + echo CHtml::closetag("pre"); + + echo CHtml::tag("hr"); + echo "Add coin to system startup:"; + echo CHtml::opentag("pre"); + echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; + echo "\n"; + echo '

    add -reindex if coin fails to start.

    '; + echo CHtml::closetag("pre"); + + echo CHtml::tag("hr"); + echo "Helpful Daemon Commands:"; + echo CHtml::opentag("pre"); + echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n"; + echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; + echo "Or if your coin has a cli file...\n"; + echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; + echo "sudo nano {$coin->conf_folder}/$program.conf\n"; + echo CHtml::closetag("pre"); + + echo CHtml::tag("hr"); + echo "Miner command line:"; + echo CHtml::opentag("pre"); + echo "-a {$coin->algo} "; + if (empty($coin->dedicatedport)) { + echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' ';} + else{ + echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$dedport.' ';} + echo "-u {$coin->master_wallet} "; + echo "-p c={$coin->symbol} "; + echo "\n"; + echo CHtml::closetag("pre");} + } + + echo ""; From cbcbadda35a8d0b9aa50ba21a952ac395a8620f2 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Mar 2019 15:41:32 -0500 Subject: [PATCH 433/576] Update stratum.cpp --- stratum/stratum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 9c59ba898..4d66b9edb 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -165,7 +165,7 @@ YAAMP_ALGO g_algos[] = {"polytimos", polytimos_hash, 1, 0, 0}, {"quark", quark_hash, 1, 0, 0}, {"qubit", qubit_hash, 1, 0, 0}, - {"rainforest", rainforest_hash, 0x100, 0, 0}, + {"rainforest", rainforest_hash, 0x100,/1, 0, 0}, {"scrypt", scrypt_hash, 0x10000, 0, 0}, {"scryptn", scryptn_hash, 0x10000, 0, 0}, {"sha256", sha256_double_hash, 1, 0, 0}, From 6e9cbc5b529910059527dbcaeee850b8640d2587 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Mar 2019 15:42:46 -0500 Subject: [PATCH 434/576] Update stratum.cpp --- stratum/stratum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 4d66b9edb..71e85889b 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -165,7 +165,7 @@ YAAMP_ALGO g_algos[] = {"polytimos", polytimos_hash, 1, 0, 0}, {"quark", quark_hash, 1, 0, 0}, {"qubit", qubit_hash, 1, 0, 0}, - {"rainforest", rainforest_hash, 0x100,/1, 0, 0}, + {"rainforest", rainforest_hash, 0x100, 1, 0, 0}, {"scrypt", scrypt_hash, 0x10000, 0, 0}, {"scryptn", scryptn_hash, 0x10000, 0, 0}, {"sha256", sha256_double_hash, 1, 0, 0}, From ac603cb592ee21f837a3b0644a0e58a4540dd6f0 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 10 Mar 2019 19:17:24 -0400 Subject: [PATCH 435/576] Update stratum.cpp --- stratum/stratum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 71e85889b..87e796a58 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -165,7 +165,7 @@ YAAMP_ALGO g_algos[] = {"polytimos", polytimos_hash, 1, 0, 0}, {"quark", quark_hash, 1, 0, 0}, {"qubit", qubit_hash, 1, 0, 0}, - {"rainforest", rainforest_hash, 0x100, 1, 0, 0}, + {"rainforest", rainforest_hash, 1, 0, 0}, {"scrypt", scrypt_hash, 0x10000, 0, 0}, {"scryptn", scryptn_hash, 0x10000, 0, 0}, {"sha256", sha256_double_hash, 1, 0, 0}, From 198e81902ef345dc2c30bcdc4573ff1ffdc9dfa3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 10 Mar 2019 19:42:22 -0400 Subject: [PATCH 436/576] Update payment.php --- web/yaamp/core/backend/payment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/core/backend/payment.php b/web/yaamp/core/backend/payment.php index ec05664b6..34ea90a62 100644 --- a/web/yaamp/core/backend/payment.php +++ b/web/yaamp/core/backend/payment.php @@ -115,7 +115,7 @@ function BackendCoinPayments($coin) else foreach($users as $user) { - $total_to_pay -= round($user->balance, 8); + $total_to_pay += round($user->balance, 8); $addresses[$user->username] = round($user->balance, 8); // transaction xxx has too many sigops: 1035 > 1000 if ($coin->symbol == 'DCR' && count($addresses) > 990) { From 6527de04d58193ae35d8459d234b84018262be08 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 14 Mar 2019 03:58:09 -0400 Subject: [PATCH 437/576] Update rawcoins.php --- web/yaamp/core/backend/rawcoins.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/yaamp/core/backend/rawcoins.php b/web/yaamp/core/backend/rawcoins.php index f0853cedf..6ec695aee 100644 --- a/web/yaamp/core/backend/rawcoins.php +++ b/web/yaamp/core/backend/rawcoins.php @@ -372,13 +372,12 @@ function updateRawcoins() if (!exchange_get('kucoin', 'disabled')) { $list = kucoin_api_query('currencies'); - if(is_object($list) && isset($list->data) && !empty($list->data)) + if(kucoin_result_valid($list) && !empty($list->data)) { dborun("UPDATE markets SET deleted=true WHERE name='kucoin'"); foreach($list->data as $item) { $symbol = $item->name; $name = $item->fullName; - if (strpos($item->withdrawRemark,'Ethereum')) continue; updateRawCoin('kucoin', $symbol, $name); } } From 6dfb5796a8974652cb99909cded4df5585742df1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 14 Mar 2019 04:00:34 -0400 Subject: [PATCH 438/576] Delete zebitex.php --- web/yaamp/core/exchange/zebitex.php | 111 ---------------------------- 1 file changed, 111 deletions(-) delete mode 100644 web/yaamp/core/exchange/zebitex.php diff --git a/web/yaamp/core/exchange/zebitex.php b/web/yaamp/core/exchange/zebitex.php deleted file mode 100644 index bb7226749..000000000 --- a/web/yaamp/core/exchange/zebitex.php +++ /dev/null @@ -1,111 +0,0 @@ - $v) { - if (!$first) $json_body .= "&"; - $json_body .= "$p=$v"; - $first = false; - } - - if (!empty($params)) - $uri .= "?".$json_body; - $ch = curl_init($uri); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); - curl_setopt($ch, CURLOPT_TIMEOUT, 30); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - $execResult = strip_tags(curl_exec($ch)); - if ($returnType == 'object') - $ret = json_decode($execResult); - else - $ret = json_decode($execResult,true); - return $ret; -} - -function zebitex_api_user($method, $url_params=array(), $json_body='') -{ -// https://doc.zebitex.com/api/v1/funds - - require_once('/etc/yiimp/keys.php'); - if (!defined('EXCH_ZEBITEX_SECRET')) define('EXCH_ZEBITEX_SECRET', ''); - if (empty(EXCH_ZEBITEX_KEY) || empty(EXCH_ZEBITEX_SECRET)) return false; - - $base = 'https://staging.zebitex.com'; - $path = '/api/v1/'.$method; - $payload = "GET|".$path."|"; - - if (strpos($method, 'cancel') !== false) - $payload = "DELETE|".$path."|"; - - if ($method == "orders" || $method == "withdrawals") - $payload = "POST|".$path."|"; - - $url_params_string = ""; - if (!empty($url_params)) { - if (is_array($url_params)) { - $first = true; - $json_body .= "{"; - foreach($url_params as $p => $v) { - if (!$first) { - $url_params_string .= ";"; - $json_body .= ","; - } - $url_params_string .= $p; - $json_body .= "\"$p\":\"$v\""; - $first = false; - } - $json_body .= "}"; - } - } - - $mt = explode(' ', microtime()); - $nonce = $mt[1].substr($mt[0], 2, 3); - - if (empty($url_params)) - $payload = $payload.$nonce."|{}"; - else - $payload = $payload.$nonce."|".$json_body; - - $signature = hash_hmac('sha256', $payload, EXCH_ZEBITEX_SECRET, false); - $header = "ZEBITEX-HMAC-SHA256 access_key=".EXCH_ZEBITEX_KEY.", signature=".$signature.", tonce=".$nonce.", signed_params=".$url_params_string; - $headers = array( - 'Authorization:'.$header, - 'Content-Type:application/json', - ); - $uri = $base.$path; - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $uri); - if (strpos($method, 'cancel') !== false) - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); - if ($method == "orders" || $method == "withdrawals") - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); - - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - - if (!empty($json_body) && ($method == "orders" || $method == "withdrawals")) { - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, $json_body); - } - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_SSL_SESSIONID_CACHE, 0); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); - curl_setopt($ch, CURLOPT_TIMEOUT, 30); - curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; Zebitex API client; '.php_uname('s').'; PHP/'.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.')'); - curl_setopt($ch, CURLOPT_ENCODING , ''); - - $data = curl_exec($ch); - $res = json_decode($data); - unset($headers); - if(empty($res)) { - $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); - debuglog("zebitex: $method failed ($status) ".strip_data($data).' '.curl_error($ch)); - } - curl_close($ch); - return $res; -} From f7898d18940fe4a69baef4e416f8ede767334520 Mon Sep 17 00:00:00 2001 From: karl kauffmann <41315826+karl-kauffmann@users.noreply.github.com> Date: Sun, 17 Mar 2019 20:26:42 -0400 Subject: [PATCH 439/576] API difficulty fix to remove Itoa2 for cross compatibility This quick API update help to share reward, difficulty and network_hashrate. It include the removing of the Itoa2 to keep the real number of the difficulty for prevening bug on cointomine when the pool api is listed. It also add the network hashrate to yiimp based on the current difficulty and Time To Find. Note : The modification of ApiController.php not need reboot. --- web/yaamp/modules/api/ApiController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/yaamp/modules/api/ApiController.php b/web/yaamp/modules/api/ApiController.php index 55791e18a..2c5436627 100644 --- a/web/yaamp/modules/api/ApiController.php +++ b/web/yaamp/modules/api/ApiController.php @@ -162,17 +162,21 @@ public function actionCurrencies() $btcmhd = yaamp_profitability($coin); $btcmhd = mbitcoinvaluetoa($btcmhd); - $difficulty = Itoa2($coin->difficulty, 3); + //Add network hash difficulty and symbol + $min_ttf = $coin->network_ttf>0? min($coin->actual_ttf, $coin->network_ttf): $coin->actual_ttf; + $network_hash = $coin->difficulty * 0x100000000 / ($min_ttf? $min_ttf: 60); $data[$symbol] = array( 'algo' => $coin->algo, 'port' => getAlgoPort($coin->algo), 'name' => $coin->name, + 'reward' => $coin->reward, 'height' => (int) $coin->block_height, 'difficulty' => $difficulty, 'workers' => $workers, 'shares' => (int) arraySafeVal($shares,'shares'), 'hashrate' => round($factor * $algo_hashrate), + 'network_hashrate' => $network_hash, 'estimate' => $btcmhd, //'percent' => round($factor * 100, 1), '24h_blocks' => (int) arraySafeVal($res24h,'a'), From 4a00f6c9d3f181805271b8f0e20e80669737880f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 18 Mar 2019 22:34:30 -0400 Subject: [PATCH 440/576] Update client_submit.cpp --- stratum/client_submit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 942c9886f..06d558e4b 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -269,6 +269,15 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL sprintf(extra, "%s", &block_hex[160]); sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); } + if(g_current_algo->name && !strcmp("AXE", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } bool b = coind_submit(coind, block_hex); if(b) From 28ef3e419485f5526d04c0be4fb9ab85310f0c31 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 18 Mar 2019 22:43:01 -0400 Subject: [PATCH 441/576] Update client_submit.cpp --- stratum/client_submit.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 06d558e4b..942c9886f 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -269,15 +269,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL sprintf(extra, "%s", &block_hex[160]); sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); } - if(g_current_algo->name && !strcmp("AXE", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } bool b = coind_submit(coind, block_hex); if(b) From 61658be667a5ca6038f935f72aec03d9108dfbaa Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 21 Mar 2019 12:30:07 -0400 Subject: [PATCH 442/576] Update exchange.php --- web/yaamp/core/exchange/exchange.php | 1 - 1 file changed, 1 deletion(-) diff --git a/web/yaamp/core/exchange/exchange.php b/web/yaamp/core/exchange/exchange.php index de835c72c..77e5470d1 100644 --- a/web/yaamp/core/exchange/exchange.php +++ b/web/yaamp/core/exchange/exchange.php @@ -47,7 +47,6 @@ function strip_data($data) require_once("stocksexchange.php"); require_once("tradeogre.php"); require_once("tradesatoshi.php"); -require_once("zebitex.php"); /* Format an exchange coin Url */ function getMarketUrl($coin, $marketName) From 55752a89cb6de7317ec1051df021bb2fc1ac394b Mon Sep 17 00:00:00 2001 From: cryptopool Date: Thu, 21 Mar 2019 13:22:13 -0400 Subject: [PATCH 443/576] removed zebitex --- web/serverconfig.sample.php | 2 +- web/yaamp/commands/ExchangeCommand.php | 5 -- web/yaamp/core/backend/markets.php | 51 +------------------ web/yaamp/core/backend/rawcoins.php | 13 +---- web/yaamp/core/backend/rawcoins.php.bak | 12 ----- web/yaamp/core/exchange/exchange.php | 3 -- web/yaamp/core/exchange/exchange.php.bak | 4 -- web/yaamp/core/trading/trading.php | 12 +---- .../modules/thread/CronjobController.php | 2 - 9 files changed, 4 insertions(+), 100 deletions(-) diff --git a/web/serverconfig.sample.php b/web/serverconfig.sample.php index a38069ce2..9bcb8c438 100644 --- a/web/serverconfig.sample.php +++ b/web/serverconfig.sample.php @@ -66,7 +66,7 @@ define('EXCH_LIVECOIN_KEY', ''); define('EXCH_NOVA_KEY', ''); define('EXCH_STOCKSEXCHANGE_KEY', ''); -define('EXCH_ZEBITEX_KEY', ''); + // Automatic withdraw to Yaamp btc wallet if btc balance > 0.3 define('EXCH_AUTO_WITHDRAW', 0.3); diff --git a/web/yaamp/commands/ExchangeCommand.php b/web/yaamp/commands/ExchangeCommand.php index cf60b1dbd..f7f92adf5 100644 --- a/web/yaamp/commands/ExchangeCommand.php +++ b/web/yaamp/commands/ExchangeCommand.php @@ -235,11 +235,6 @@ public function testApiKeys() if (!arraySafeVal($info,'success',0) || !is_array($info['return'])) echo "error\n"; else echo("yobit btc: ".json_encode($info['return']['funds']['btc'])."\n"); } - if (!empty(EXCH_ZEBITEX_KEY)) { - $balance = zebitex_api_user('funds'); - if (!isset($balance->BTC)) echo "zebitex error ".json_encode($balance)."\n"; - else echo("zebitex: BTC balance: ".json_encode($balance->BTC)."\n"); - } // only one secret key $balance = empoex_api_user('account/balance','BTC'); if ($balance) echo("empoex btc: ".json_encode($balance['available'])."\n"); diff --git a/web/yaamp/core/backend/markets.php b/web/yaamp/core/backend/markets.php index a03fc43c7..b7d6266c0 100644 --- a/web/yaamp/core/backend/markets.php +++ b/web/yaamp/core/backend/markets.php @@ -38,8 +38,7 @@ function BackendPricesUpdate() updateCoinsMarketsMarkets(); updateStocksExchangeMarkets(); updateTradeSatoshiMarkets(); - updateZebitexMarkets(); - + updateShapeShiftMarkets(); updateOtherMarkets(); @@ -1988,54 +1987,6 @@ function updateShapeShiftMarkets() } } -function updateZebitexMarkets() -{ - $exchange = 'zebitex'; - if (exchange_get($exchange, 'disabled')) return; - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - $data = zebitex_api_query('orders/tickers'); - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - $symbol = $coin->getOfficialSymbol(); - $pair = strtolower($symbol).'btc'; - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $pair = strtolower($symbol.$market->base_coin); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - foreach ($data as $tickername => $ticker) { - if ($tickername === $pair) { - if ($market->disabled < 9) { - $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); - $market->disabled = ($ticker->buy < $ticker->sell/2) && ($nbm > 1); - } - $price2 = ($ticker->buy+$ticker->sell)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->buy); - $market->pricetime = time(); // $ticker->timestamp "2018-08-31T12:48:56Z" - $market->save(); - if (empty($coin->price) && $ticker->sell) { - $coin->price = $market->price; - $coin->price2 = $price2; - $coin->save(); - } - debuglog("$exchange: $pair price updated to {$market->price}"); - break; - } - } - } -} - // update other installed coins price from cryptonator function updateOtherMarkets() { diff --git a/web/yaamp/core/backend/rawcoins.php b/web/yaamp/core/backend/rawcoins.php index 6ec695aee..da4ada7b4 100644 --- a/web/yaamp/core/backend/rawcoins.php +++ b/web/yaamp/core/backend/rawcoins.php @@ -444,17 +444,6 @@ function updateRawcoins() } } - if (!exchange_get('zebitex', 'disabled')) { - $data = zebitex_api_user('funds'); // private API contains coin labels - if(!empty($data)) { - dborun("UPDATE markets SET deleted=true WHERE name='zebitex'"); - foreach ($data as $currency) { - $symbol = objSafeVal($currency, 'code'); - $name = objSafeVal($currency, 'title'); - updateRawCoin('zebitex', $symbol, $name); - } - } - } ////////////////////////////////////////////////////////// $markets = dbocolumn("SELECT DISTINCT name FROM markets"); @@ -492,7 +481,7 @@ function updateRawcoins() function updateRawCoin($marketname, $symbol, $name='unknown') { if($symbol == 'BTC') return; - + // Restrict $symbol and $name to strict defined set of characters (to protect from rogue exchange or DNS attack on exchange) if (preg_match('/[^A-Za-z0-9_\$]/', $symbol)) { debuglog("weird symbol $symbol from $marketname"); diff --git a/web/yaamp/core/backend/rawcoins.php.bak b/web/yaamp/core/backend/rawcoins.php.bak index 769dea997..feb769d7d 100644 --- a/web/yaamp/core/backend/rawcoins.php.bak +++ b/web/yaamp/core/backend/rawcoins.php.bak @@ -428,18 +428,6 @@ function updateRawcoins() } } } - - if (!exchange_get('zebitex', 'disabled')) { - $data = zebitex_api_user('funds'); // private API contains coin labels - if(!empty($data)) { - dborun("UPDATE markets SET deleted=true WHERE name='zebitex'"); - foreach ($data as $currency) { - $symbol = objSafeVal($currency, 'code'); - $name = objSafeVal($currency, 'title'); - updateRawCoin('zebitex', $symbol, $name); - } - } - } ////////////////////////////////////////////////////////// $markets = dbocolumn("SELECT DISTINCT name FROM markets"); diff --git a/web/yaamp/core/exchange/exchange.php b/web/yaamp/core/exchange/exchange.php index 77e5470d1..19b9afc65 100644 --- a/web/yaamp/core/exchange/exchange.php +++ b/web/yaamp/core/exchange/exchange.php @@ -142,9 +142,6 @@ function getMarketUrl($coin, $marketName) $url = "https://tradesatoshi.com/Exchange?market={$symbol}_{$base}"; else if($market == 'yobit') $url = "https://yobit.net/en/trade/{$symbol}/{$base}"; - else if($market == 'zebitex') - $url = "https://staging.zebitex.com/{$symbol}{$base}"; -// $url = "https://zebitex.com/{$symbol}-{$base}"; else $url = ""; diff --git a/web/yaamp/core/exchange/exchange.php.bak b/web/yaamp/core/exchange/exchange.php.bak index e72161676..7c43d87bc 100644 --- a/web/yaamp/core/exchange/exchange.php.bak +++ b/web/yaamp/core/exchange/exchange.php.bak @@ -46,7 +46,6 @@ require_once("coinsmarkets.php"); require_once("cryptowatch.php"); require_once("stocksexchange.php"); require_once("tradesatoshi.php"); -require_once("zebitex.php"); /* Format an exchange coin Url */ function getMarketUrl($coin, $marketName) @@ -140,9 +139,6 @@ function getMarketUrl($coin, $marketName) $url = "https://tradesatoshi.com/Exchange?market={$symbol}_{$base}"; else if($market == 'yobit') $url = "https://yobit.net/en/trade/{$symbol}/{$base}"; - else if($market == 'zebitex') - $url = "https://staging.zebitex.com/{$symbol}{$base}"; -// $url = "https://zebitex.com/{$symbol}-{$base}"; else $url = ""; diff --git a/web/yaamp/core/trading/trading.php b/web/yaamp/core/trading/trading.php index 2f9e4d23b..e3e56a8ae 100644 --- a/web/yaamp/core/trading/trading.php +++ b/web/yaamp/core/trading/trading.php @@ -17,7 +17,6 @@ require_once('kucoin_trading.php'); require_once('livecoin_trading.php'); require_once('nova_trading.php'); -require_once('zebitex_trading.php'); function cancelExchangeOrder($order=false) @@ -58,11 +57,6 @@ function cancelExchangeOrder($order=false) case 'livecoin': doLiveCoinCancelOrder($order->uuid); break; - case 'zebitex': - doZebitexCancelOrder($order->uuid); - break; - - } } @@ -178,11 +172,7 @@ function runExchange($exchangeName=false) doPoloniexTrading(true); updatePoloniexMarkets(); break; - - case 'zebitex': - doZebitexTrading(true); - updateZebitexMarkets(); - break; + default: debuglog(__FUNCTION__.' '.$exchangeName.' not implemented'); diff --git a/web/yaamp/modules/thread/CronjobController.php b/web/yaamp/modules/thread/CronjobController.php index f6c2233e8..2f75427a4 100644 --- a/web/yaamp/modules/thread/CronjobController.php +++ b/web/yaamp/modules/thread/CronjobController.php @@ -149,7 +149,6 @@ public function actionRun() doNovaTrading(); doYobitTrading(); doCoinsMarketsTrading(); - doZebitexTrading(); break; case 3: @@ -222,4 +221,3 @@ public function actionRun() } } - From c28b86c14b1795b07b62b643929627926ef6b7d3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 1 Apr 2019 18:45:25 -0400 Subject: [PATCH 444/576] Update yespower.c --- stratum/algos/yespower.c | 102 +++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/stratum/algos/yespower.c b/stratum/algos/yespower.c index 59e6a7cea..ae739f888 100644 --- a/stratum/algos/yespower.c +++ b/stratum/algos/yespower.c @@ -1,55 +1,55 @@ -#include "yespower-opt.c" - -static const yespower_params_t yespower_0_5_R8 = {YESPOWER_0_5, 2048, 8, "Client Key", 10}; -static const yespower_params_t yespower_0_5_R16 = {YESPOWER_0_5, 4096, 16, "Client Key", 10}; -static const yespower_params_t yespower_0_5_R24 = {YESPOWER_0_5, 4096, 24, "Jagaricoin", 10}; -static const yespower_params_t yespower_0_5_R32 = {YESPOWER_0_5, 4096, 32, "WaviBanana", 10}; -// WARNING DO NOT USE THIS IN yespower_hash YET. For later HF to yespower 1.0 -// TODO Find HF solution using unixtime or blockheight(recommended) - -/* -Parameter selection for yespower 1.0. -For new uses of yespower, set the requested version to the highest -supported, and set N*r to the highest you can reasonably afford in terms -of proof verification time (which might in turn be determined by desired -share rate per mining pool server), using one of the following options: -1 MiB: N = 1024, r = 8 -2 MiB: N = 2048, r = 8 (current bitzeny-yescrypt0.5) -4 MiB: N = 1024, r = 32 -8 MiB: N = 2048, r = 32 (recommended settings) -16 MiB: N = 4096, r = 32 (It might increase resistance against future GPUs) -and so on for higher N keeping r=32. -You may also set the personalization string to your liking, but that is -not required (you can set its pointer to NULL and its length to 0). Its -support is provided mostly for compatibility with existing modifications -of yescrypt 0.5. -*/ - -// solardiz recommended yespower 1.0 settings of at least N=2048 r=32 (8 MiB) -static const yespower_params_t yespower_1_0 = {YESPOWER_1_0, 2048, 32, NULL, 0}; - -void yespowerR8_hash(const char *input, char *output, uint32_t len) -{ - if (yespower_tls(input, 80, &yespower_0_5_R8, (yespower_binary_t *)output)) - abort(); -} -void yespowerR16_hash(const char *input, char *output, uint32_t len) -{ - if (yespower_tls(input, 80, &yespower_0_5_R16, (yespower_binary_t *)output)) - abort(); -} -void yespowerR24_hash(const char *input, char *output, uint32_t len) -{ - if (yespower_tls(input, 80, &yespower_0_5_R24, (yespower_binary_t *)output)) - abort(); -} -void yespowerR32_hash(const char *input, char *output, uint32_t len) +/*- + * Copyright 2018 Cryply team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + * + * This file was originally written by Cryply team as part of the Cryply + * coin. + */ +#include +#include +#include + +#include "yespower.h" +#include "sysendian.h" + + + +static const yespower_params_t v1 = {YESPOWER_0_5, 4096, 16, "Client Key", 10}; + +static const yespower_params_t v2 = {YESPOWER_0_9, 2048, 32, NULL, 0}; + +static const yespower_params_t v3 = {YESPOWER_0_9, 4096, 16, NULL, 0}; + + +void yespower_hash( const char *input, char *output, uint32_t len ) { - if (yespower_tls(input, 80, &yespower_0_5_R32, (yespower_binary_t *)output)) - abort(); + yespower_tls( (yespower_binary_t*)input, len, &v2, (yespower_binary_t*)output ); } -void yespower_hash(const char *input, char *output, uint32_t len) + +void yespowerR16_hash( const char *input, char *output, uint32_t len ) { - if (yespower_tls(input, 80, &yespower_1_0, (yespower_binary_t *)output)) - abort(); + yespower_tls( (yespower_binary_t*)input, len, &v3, (yespower_binary_t*)output ); } + + From 11409660dcdd1a8db8df9fd580fc3864791cd231 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 1 Apr 2019 18:48:08 -0400 Subject: [PATCH 445/576] Update yespower.h --- stratum/algos/yespower.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/stratum/algos/yespower.h b/stratum/algos/yespower.h index d484a01ee..2458d6f03 100644 --- a/stratum/algos/yespower.h +++ b/stratum/algos/yespower.h @@ -38,10 +38,7 @@ extern "C" { #include /* for size_t */ void yespower_hash( const char *input, char *output, uint32_t len); -void yespowerR8_hash( const char *input, char *output, uint32_t len); void yespowerR16_hash( const char *input, char *output, uint32_t len); -void yespowerR24_hash( const char *input, char *output, uint32_t len); -void yespowerR32_hash( const char *input, char *output, uint32_t len); /** * Internal type used by the memory allocator. Please do not use it directly. From 0540753647de367fa3560872fa1c2bd219afa729 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 1 Apr 2019 18:49:37 -0400 Subject: [PATCH 446/576] Update stratum.cpp --- stratum/stratum.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 87e796a58..87ca78dd7 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -205,10 +205,7 @@ YAAMP_ALGO g_algos[] = {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, {"yespower", yespower_hash, 0x10000, 0, 0 }, - {"yespowerR8", yespowerR8_hash, 0x10000, 0, 0 }, {"yespowerR16", yespowerR16_hash, 0x10000, 0, 0 }, - {"yespowerR24", yespowerR24_hash, 0x10000, 0, 0 }, - {"yespowerR32", yespowerR32_hash, 0x10000, 0, 0 }, {"zr5", zr5_hash, 1, 0, 0}, {"", NULL, 0, 0}, }; From ba6748a51505dfa10ab8c35276642d90b58f15ea Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 1 Apr 2019 18:59:35 -0400 Subject: [PATCH 447/576] Update yespower.c --- stratum/algos/yespower.c | 98 +++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 51 deletions(-) diff --git a/stratum/algos/yespower.c b/stratum/algos/yespower.c index ae739f888..7ab9a52bc 100644 --- a/stratum/algos/yespower.c +++ b/stratum/algos/yespower.c @@ -1,55 +1,51 @@ -/*- - * Copyright 2018 Cryply team - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. - * - * This file was originally written by Cryply team as part of the Cryply - * coin. - */ -#include -#include -#include - -#include "yespower.h" -#include "sysendian.h" - - - -static const yespower_params_t v1 = {YESPOWER_0_5, 4096, 16, "Client Key", 10}; - -static const yespower_params_t v2 = {YESPOWER_0_9, 2048, 32, NULL, 0}; - -static const yespower_params_t v3 = {YESPOWER_0_9, 4096, 16, NULL, 0}; - - -void yespower_hash( const char *input, char *output, uint32_t len ) +// WARNING DO NOT USE THIS IN yespower_hash YET. For later HF to yespower 1.0 +// TODO Find HF solution using unixtime or blockheight(recommended) + +/* +Parameter selection for yespower 1.0. +For new uses of yespower, set the requested version to the highest +supported, and set N*r to the highest you can reasonably afford in terms +of proof verification time (which might in turn be determined by desired +share rate per mining pool server), using one of the following options: +1 MiB: N = 1024, r = 8 +2 MiB: N = 2048, r = 8 (current bitzeny-yescrypt0.5) +4 MiB: N = 1024, r = 32 +8 MiB: N = 2048, r = 32 (recommended settings) +16 MiB: N = 4096, r = 32 (It might increase resistance against future GPUs) +and so on for higher N keeping r=32. +You may also set the personalization string to your liking, but that is +not required (you can set its pointer to NULL and its length to 0). Its +support is provided mostly for compatibility with existing modifications +of yescrypt 0.5. +*/ + +#include "yespower-opt.c" + +static const yespower_params_t yespower_0_5_R8 = {YESPOWER_0_5, 2048, 8, "Client Key", 10}; +static const yespower_params_t yespower_0_5_R16 = {YESPOWER_0_5, 4096, 16, "Client Key", 10}; +static const yespower_params_t yespower_0_5_R24 = {YESPOWER_0_5, 4096, 24, "Jagaricoin", 10}; +static const yespower_params_t yespower_0_5_R32 = {YESPOWER_0_5, 4096, 32, "WaviBanana", 10}; + +// solardiz recommended yespower 1.0 settings of at least N=2048 r=32 (8 MiB) +static const yespower_params_t yespower_1_0 = {YESPOWER_1_0, 2048, 32, NULL, 0}; + +void yespowerR8_hash(const char *input, char *output, uint32_t len) { - yespower_tls( (yespower_binary_t*)input, len, &v2, (yespower_binary_t*)output ); + yespower_tls(input, 80, &yespower_0_5_R8, (yespower_binary_t *)output); } - -void yespowerR16_hash( const char *input, char *output, uint32_t len ) +void yespowerR16_hash(const char *input, char *output, uint32_t len) { - yespower_tls( (yespower_binary_t*)input, len, &v3, (yespower_binary_t*)output ); + yespower_tls(input, 80, &yespower_0_5_R16, (yespower_binary_t *)output); +} +void yespowerR24_hash(const char *input, char *output, uint32_t len) +{ + yespower_tls(input, 80, &yespower_0_5_R24, (yespower_binary_t *)output); +} +void yespowerR32_hash(const char *input, char *output, uint32_t len) +{ + yespower_tls(input, 80, &yespower_0_5_R32, (yespower_binary_t *)output); +} +void yespower_hash(const char *input, char *output, uint32_t len) +{ + yespower_tls(input, 80, &yespower_1_0, (yespower_binary_t *)output); } - - From 411663fee027a976c2cbfe8d58a6fc08ade849be Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 1 Apr 2019 19:00:11 -0400 Subject: [PATCH 448/576] Update yespower.h --- stratum/algos/yespower.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stratum/algos/yespower.h b/stratum/algos/yespower.h index 2458d6f03..d484a01ee 100644 --- a/stratum/algos/yespower.h +++ b/stratum/algos/yespower.h @@ -38,7 +38,10 @@ extern "C" { #include /* for size_t */ void yespower_hash( const char *input, char *output, uint32_t len); +void yespowerR8_hash( const char *input, char *output, uint32_t len); void yespowerR16_hash( const char *input, char *output, uint32_t len); +void yespowerR24_hash( const char *input, char *output, uint32_t len); +void yespowerR32_hash( const char *input, char *output, uint32_t len); /** * Internal type used by the memory allocator. Please do not use it directly. From b21625eee05b2efa1ac8f085e22fae1d03e8228e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 1 Apr 2019 20:46:29 -0400 Subject: [PATCH 449/576] Update yespower.c --- stratum/algos/yespower.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratum/algos/yespower.c b/stratum/algos/yespower.c index 7ab9a52bc..afabac3d8 100644 --- a/stratum/algos/yespower.c +++ b/stratum/algos/yespower.c @@ -22,7 +22,7 @@ of yescrypt 0.5. #include "yespower-opt.c" static const yespower_params_t yespower_0_5_R8 = {YESPOWER_0_5, 2048, 8, "Client Key", 10}; -static const yespower_params_t yespower_0_5_R16 = {YESPOWER_0_5, 4096, 16, "Client Key", 10}; +static const yespower_params_t yespower_0_9_R16 = {YESPOWER_0_9, 4096, 16, NULL, 0}; static const yespower_params_t yespower_0_5_R24 = {YESPOWER_0_5, 4096, 24, "Jagaricoin", 10}; static const yespower_params_t yespower_0_5_R32 = {YESPOWER_0_5, 4096, 32, "WaviBanana", 10}; @@ -35,7 +35,7 @@ void yespowerR8_hash(const char *input, char *output, uint32_t len) } void yespowerR16_hash(const char *input, char *output, uint32_t len) { - yespower_tls(input, 80, &yespower_0_5_R16, (yespower_binary_t *)output); + yespower_tls(input, 80, &yespower_0_9_R16, (yespower_binary_t *)output); } void yespowerR24_hash(const char *input, char *output, uint32_t len) { From 36e1d4a7807df168f0f55efd2424c204e7a8370b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 2 Apr 2019 11:01:51 -0400 Subject: [PATCH 450/576] Update yespower.c --- stratum/algos/yespower.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratum/algos/yespower.c b/stratum/algos/yespower.c index afabac3d8..56aee4bbd 100644 --- a/stratum/algos/yespower.c +++ b/stratum/algos/yespower.c @@ -22,7 +22,7 @@ of yescrypt 0.5. #include "yespower-opt.c" static const yespower_params_t yespower_0_5_R8 = {YESPOWER_0_5, 2048, 8, "Client Key", 10}; -static const yespower_params_t yespower_0_9_R16 = {YESPOWER_0_9, 4096, 16, NULL, 0}; +static const yespower_params_t yespower_1_0_R16 = {YESPOWER_1_0, 4096, 16, NULL, 0}; static const yespower_params_t yespower_0_5_R24 = {YESPOWER_0_5, 4096, 24, "Jagaricoin", 10}; static const yespower_params_t yespower_0_5_R32 = {YESPOWER_0_5, 4096, 32, "WaviBanana", 10}; @@ -35,7 +35,7 @@ void yespowerR8_hash(const char *input, char *output, uint32_t len) } void yespowerR16_hash(const char *input, char *output, uint32_t len) { - yespower_tls(input, 80, &yespower_0_9_R16, (yespower_binary_t *)output); + yespower_tls(input, 80, &yespower_1_0_R16, (yespower_binary_t *)output); } void yespowerR24_hash(const char *input, char *output, uint32_t len) { From e5e58530684e10b32a937551fa4ca7b3297430b8 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Tue, 2 Apr 2019 13:14:17 -0400 Subject: [PATCH 451/576] updates --- rc.local | 1 + rc.local.bak | 83 + stratum/algos/Lyra2-zz.c | 330 ++- stratum/algos/Lyra2-zz.c.bak | 214 ++ stratum/algos/Lyra2-zz.h | 4 +- stratum/algos/Lyra2-zz.h.bak | 55 + stratum/algos/SWIFFTX/inttypes.h | 8 +- stratum/algos/SWIFFTX/inttypes.h.bak | 8 +- stratum/algos/SWIFFTX/stdint.h | 2 +- stratum/algos/SWIFFTX/stdint.h.bak | 2 +- stratum/algos/lyra2zz.c | 17 +- stratum/algos/lyra2zz.c.bak | 27 + stratum/algos/makefile | 4 +- stratum/algos/makefile.bak | 17 +- stratum/client_difficulty.cpp | 6 + stratum/client_difficulty.cpp.bak | 100 + stratum/coinbase.cpp | 562 +---- stratum/coinbase.cpp.bak | 1124 +++++++++ stratum/coind_submit.cpp | 1 + stratum/coind_submit.cpp.bak | 149 ++ stratum/config.sample/lyra2v3.conf | 1 + stratum/config.sample/lyra2v3.conf.bak | 15 + stratum/db.cpp | 5 - stratum/db.cpp.bak | 624 +++++ stratum/user.cpp | 2 +- stratum/user.cpp.bak | 214 ++ web/keys.sample.php | 5 +- web/keys.sample.php.bak | 28 + web/serverconfig.sample.php | 5 +- web/serverconfig.sample.php.bak | 100 + web/yaamp/commands/CoindbCommand.php | 40 +- web/yaamp/commands/CoindbCommand.php.bak | 598 +++++ web/yaamp/commands/ExchangeCommand.php | 11 - web/yaamp/commands/ExchangeCommand.php.bak | 242 ++ web/yaamp/core/backend/markets.php | 136 +- web/yaamp/core/backend/markets.php.bak | 2016 +++++++++++++++++ web/yaamp/core/backend/rawcoins.php | 62 +- web/yaamp/core/backend/rawcoins.php.bak | 30 +- web/yaamp/core/backend/services.php | 1 - web/yaamp/core/backend/services.php.bak | 242 ++ web/yaamp/core/backend/system.php | 3 + web/yaamp/core/backend/system.php.bak | 355 +++ web/yaamp/core/exchange/exchange.php | 12 +- web/yaamp/core/exchange/exchange.php.bak | 3 + web/yaamp/core/exchange/kucoin.php | 2 +- web/yaamp/core/exchange/kucoin.php.bak | 162 ++ web/yaamp/core/trading/kucoin_trading.php | 14 +- web/yaamp/core/trading/kucoin_trading.php.bak | 71 + web/yaamp/core/trading/livecoin_trading.php | 1 - .../core/trading/livecoin_trading.php.bak | 278 +++ web/yaamp/core/trading/trading.php | 16 +- web/yaamp/core/trading/trading.php.bak | 181 ++ web/yaamp/defaultconfig.php | 5 +- web/yaamp/defaultconfig.php.bak | 76 + .../modules/thread/CronjobController.php | 4 +- .../modules/thread/CronjobController.php.bak | 223 ++ 56 files changed, 7533 insertions(+), 964 deletions(-) create mode 100644 rc.local.bak create mode 100644 stratum/algos/Lyra2-zz.c.bak create mode 100644 stratum/algos/Lyra2-zz.h.bak create mode 100644 stratum/algos/lyra2zz.c.bak create mode 100644 stratum/client_difficulty.cpp.bak create mode 100644 stratum/coinbase.cpp.bak create mode 100644 stratum/coind_submit.cpp.bak create mode 100644 stratum/config.sample/lyra2v3.conf.bak create mode 100644 stratum/db.cpp.bak create mode 100644 stratum/user.cpp.bak create mode 100644 web/keys.sample.php.bak create mode 100644 web/serverconfig.sample.php.bak create mode 100644 web/yaamp/commands/CoindbCommand.php.bak create mode 100644 web/yaamp/commands/ExchangeCommand.php.bak create mode 100644 web/yaamp/core/backend/markets.php.bak create mode 100644 web/yaamp/core/backend/services.php.bak create mode 100644 web/yaamp/core/backend/system.php.bak create mode 100644 web/yaamp/core/exchange/kucoin.php.bak create mode 100644 web/yaamp/core/trading/kucoin_trading.php.bak create mode 100644 web/yaamp/core/trading/livecoin_trading.php.bak create mode 100644 web/yaamp/core/trading/trading.php.bak create mode 100644 web/yaamp/defaultconfig.php.bak create mode 100644 web/yaamp/modules/thread/CronjobController.php.bak diff --git a/rc.local b/rc.local index 68f8200db..9ecef084c 100644 --- a/rc.local +++ b/rc.local @@ -53,6 +53,7 @@ screen -dmS allium $STRATUM_DIR/run.sh allium #screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2 screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2 screen -dmS lyra2z $STRATUM_DIR/run.sh lyra2z +screen -dmS lyra2zz $STRATUM_DIR/run.sh lyra2zz screen -dmS rainforest $STRATUM_DIR/run.sh rainforest screen -dmS blakecoin $STRATUM_DIR/run.sh blakecoin # blake 8 diff --git a/rc.local.bak b/rc.local.bak new file mode 100644 index 000000000..68f8200db --- /dev/null +++ b/rc.local.bak @@ -0,0 +1,83 @@ +# +# This script should be linked in your main rc.local +# Will start these screen daemons on server startup +# +# You can include it in your main rc.local with : +# . /work/yiimp/rc.local +# +# If you can't access these screens, double check +# the $HOME var is set to your admin user + +LOG_DIR=/work/yiimp/log +WEB_DIR=/var/web +STRATUM_DIR=/var/stratum + +screen -dmS main $WEB_DIR/main.sh +screen -dmS loop2 $WEB_DIR/loop2.sh +screen -dmS blocks $WEB_DIR/blocks.sh +screen -dmS debug tail -f $LOG_DIR/debug.log + +# Stratum instances (skipped/exit if no .conf) + +screen -dmS c11 $STRATUM_DIR/run.sh c11 +screen -dmS deep $STRATUM_DIR/run.sh deep + +screen -dmS x11 $STRATUM_DIR/run.sh x11 +screen -dmS x11evo $STRATUM_DIR/run.sh x11evo +screen -dmS x13 $STRATUM_DIR/run.sh x13 +#screen -dmS x14 $STRATUM_DIR/run.sh x14 +#screen -dmS x15 $STRATUM_DIR/run.sh x15 +#screen -dmS x16r $STRATUM_DIR/run.sh x16r +screen -dmS x17 $STRATUM_DIR/run.sh x17 +screen -dmS xevan $STRATUM_DIR/run.sh xevan +screen -dmS timetravel $STRATUM_DIR/run.sh timetravel +screen -dmS bitcore $STRATUM_DIR/run.sh bitcore +screen -dmS hmq1725 $STRATUM_DIR/run.sh hmq1725 +screen -dmS tribus $STRATUM_DIR/run.sh tribus + +screen -dmS sha $STRATUM_DIR/run.sh sha +screen -dmS sha256t $STRATUM_DIR/run.sh sha256t +screen -dmS scrypt $STRATUM_DIR/run.sh scrypt +screen -dmS scryptn $STRATUM_DIR/run.sh scryptn +screen -dmS luffa $STRATUM_DIR/run.sh luffa +screen -dmS neo $STRATUM_DIR/run.sh neo +screen -dmS nist5 $STRATUM_DIR/run.sh nist5 +screen -dmS penta $STRATUM_DIR/run.sh penta +screen -dmS quark $STRATUM_DIR/run.sh quark +screen -dmS qubit $STRATUM_DIR/run.sh qubit +screen -dmS jha $STRATUM_DIR/run.sh jha +#screen -dmS dmd-gr $STRATUM_DIR/run.sh dmd-gr +screen -dmS myr-gr $STRATUM_DIR/run.sh myr-gr +screen -dmS lbry $STRATUM_DIR/run.sh lbry +screen -dmS allium $STRATUM_DIR/run.sh allium +#screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2 +screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2 +screen -dmS lyra2z $STRATUM_DIR/run.sh lyra2z +screen -dmS rainforest $STRATUM_DIR/run.sh rainforest + +screen -dmS blakecoin $STRATUM_DIR/run.sh blakecoin # blake 8 +screen -dmS blake $STRATUM_DIR/run.sh blake +screen -dmS blake2s $STRATUM_DIR/run.sh blake2s +screen -dmS vanilla $STRATUM_DIR/run.sh vanilla # blake 8 +screen -dmS decred $STRATUM_DIR/run.sh decred # blake 14 + +#screen -dmS keccak $STRATUM_DIR/run.sh keccak +#screen -dmS keccakc $STRATUM_DIR/run.sh keccakc +#screen -dmS phi $STRATUM_DIR/run.sh phi +#screen -dmS polytimos $STRATUM_DIR/run.sh polytimos +screen -dmS whirlpool $STRATUM_DIR/run.sh whirlpool + +screen -dmS skein $STRATUM_DIR/run.sh skein +screen -dmS skein2 $STRATUM_DIR/run.sh skein2 +screen -dmS yescrypt $STRATUM_DIR/run.sh yescrypt +#screen -dmS yescryptR16 $STRATUM_DIR/run.sh yescryptR16 +screen -dmS zr5 $STRATUM_DIR/run.sh zr5 +screen -dmS sib $STRATUM_DIR/run.sh sib +screen -dmS m7m $STRATUM_DIR/run.sh m7m +screen -dmS veltor $STRATUM_DIR/run.sh veltor +screen -dmS velvet $STRATUM_DIR/run.sh velvet +screen -dmS argon2 $STRATUM_DIR/run.sh argon2 +screen -dmS argon2d-dyn $STRATUM_DIR/run.sh argon2d-dyn +screen -dmS x22i $STRATUM_DIR/run.sh x22i +screen -dmS lbk3 $STRATUM_DIR/run.sh lbk3 + diff --git a/stratum/algos/Lyra2-zz.c b/stratum/algos/Lyra2-zz.c index caa5bfe58..b6d43cfc1 100644 --- a/stratum/algos/Lyra2-zz.c +++ b/stratum/algos/Lyra2-zz.c @@ -44,171 +44,167 @@ * * @return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation) */ -int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols) { - - //============================= Basic variables ============================// - int64_t row = 2; //index of row to be processed - int64_t prev = 1; //index of prev (last row ever computed/modified) - int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) - int64_t tau; //Time Loop iterator - int64_t step = 1; //Visitation step (used during Setup and Wandering phases) - int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) - int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 - int64_t i; //auxiliary iteration counter - //==========================================================================/ - - //========== Initializing the Memory Matrix and pointers to it =============// - //Tries to allocate enough space for the whole memory matrix - - - const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; - const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; - - i = (int64_t) ((int64_t) nRows * (int64_t) ROW_LEN_BYTES); - uint64_t *wholeMatrix = malloc(i); - if (wholeMatrix == NULL) { - return -1; - } - memset(wholeMatrix, 0, i); - - //Allocates pointers to each row of the matrix - uint64_t **memMatrix = malloc(nRows * sizeof (uint64_t*)); - if (memMatrix == NULL) { - return -1; - } - //Places the pointers in the correct positions - uint64_t *ptrWord = wholeMatrix; - for (i = 0; i < nRows; i++) { - memMatrix[i] = ptrWord; - ptrWord += ROW_LEN_INT64; - } - //==========================================================================/ - - //============= Getting the password + salt + basil padded with 10*1 ===============// - //OBS.:The memory matrix will temporarily hold the password: not for saving memory, - //but this ensures that the password copied locally will be overwritten as soon as possible - - //First, we clean enough blocks for the password, salt, basil and padding - uint64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof (uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; - byte *ptrByte = (byte*) wholeMatrix; - memset(ptrByte, 0, nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES); - - //Prepends the password - memcpy(ptrByte, pwd, pwdlen); - ptrByte += pwdlen; - - //Concatenates the salt - memcpy(ptrByte, salt, saltlen); - ptrByte += saltlen; - - //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface - memcpy(ptrByte, &kLen, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &pwdlen, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &saltlen, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &timeCost, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &nRows, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &nCols, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - - //Now comes the padding - *ptrByte = 0x80; //first byte of padding: right after the password - ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix - ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block - *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block - //==========================================================================/ - - //======================= Initializing the Sponge State ====================// - //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) - uint64_t *state = malloc(16 * sizeof (uint64_t)); - if (state == NULL) { - return -1; - } - initState(state); - //==========================================================================/ - - //================================ Setup Phase =============================// - //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits - ptrWord = wholeMatrix; - for (i = 0; i < nBlocksInput; i++) { - absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) - ptrWord += BLOCK_LEN_BLAKE2_SAFE_INT64; //goes to next block of pad(pwd || salt || basil) - } - - //Initializes M[0] and M[1] - reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here - reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); - - do { - //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) - reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); - - - //updates the value of row* (deterministically picked during Setup)) - rowa = (rowa + step) & (window - 1); - //update prev: it now points to the last row ever computed - prev = row; - //updates row: goes to the next row to be computed - row++; - - //Checks if all rows in the window where visited. - if (rowa == 0) { - step = window + gap; //changes the step: approximately doubles its value - window *= 2; //doubles the size of the re-visitation window - gap = -gap; //inverts the modifier to the step - } - - } while (row < nRows); - //==========================================================================/ - - //============================ Wandering Phase =============================// - row = 0; //Resets the visitation to the first row of the memory matrix - for (tau = 1; tau <= timeCost; tau++) { - //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 - step = (tau % 2 == 0) ? -1 : nRows / 2 - 1; - do { - //Selects a pseudorandom index row* - //------------------------------------------------------------------------------------------ - //rowa = ((unsigned int)state[0]) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) - rowa = ((uint64_t) (state[0])) % nRows; //(USE THIS FOR THE "GENERIC" CASE) - //------------------------------------------------------------------------------------------ - - //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] - reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); - - //update prev: it now points to the last row ever computed - prev = row; - - //updates row: goes to the next row to be computed - //------------------------------------------------------------------------------------------ - //row = (row + step) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) - row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) - //------------------------------------------------------------------------------------------ - - } while (row != 0); - } - //==========================================================================/ - - //============================ Wrap-up Phase ===============================// - //Absorbs the last block of the memory matrix - absorbBlock(state, memMatrix[rowa]); - - //Squeezes the key - squeeze(state, K, kLen); - //==========================================================================/ - - //========================= Freeing the memory =============================// - free(memMatrix); - free(wholeMatrix); - - //Wiping out the sponge's internal state before freeing it - memset(state, 0, 16 * sizeof (uint64_t)); - free(state); - //==========================================================================/ - - return 0; +int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols) +{ + //============================= Basic variables ============================// + int64_t row = 2; //index of row to be processed + int64_t prev = 1; //index of prev (last row ever computed/modified) + int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) + int64_t tau; //Time Loop iterator + int64_t step = 1; //Visitation step (used during Setup and Wandering phases) + int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) + int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 + int64_t i; //auxiliary iteration counter + //==========================================================================/ + + //========== Initializing the Memory Matrix and pointers to it =============// + //Tries to allocate enough space for the whole memory matrix + const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; + const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; + + i = (int64_t) ((int64_t) nRows * (int64_t) ROW_LEN_BYTES); + uint64_t *wholeMatrix = malloc(i); + if (wholeMatrix == NULL) { + return -1; + } + memset(wholeMatrix, 0, i); + + //Allocates pointers to each row of the matrix + uint64_t **memMatrix = malloc(nRows * sizeof (uint64_t*)); + if (memMatrix == NULL) { + return -1; + } + //Places the pointers in the correct positions + uint64_t *ptrWord = wholeMatrix; + for (i = 0; i < nRows; i++) { + memMatrix[i] = ptrWord; + ptrWord += ROW_LEN_INT64; + } + //==========================================================================/ + + //============= Getting the password + salt + basil padded with 10*1 ===============// + //OBS.:The memory matrix will temporarily hold the password: not for saving memory, + //but this ensures that the password copied locally will be overwritten as soon as possible + + //First, we clean enough blocks for the password, salt, basil and padding + uint64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof (uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; + byte *ptrByte = (byte*) wholeMatrix; + memset(ptrByte, 0, nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES); + + //Prepends the password + memcpy(ptrByte, pwd, pwdlen); + ptrByte += pwdlen; + + //Concatenates the salt + memcpy(ptrByte, salt, saltlen); + ptrByte += saltlen; + + //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface + memcpy(ptrByte, &kLen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &pwdlen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &saltlen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &timeCost, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &nRows, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &nCols, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + + //Now comes the padding + *ptrByte = 0x80; //first byte of padding: right after the password + ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix + ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block + *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block + //==========================================================================/ + + //======================= Initializing the Sponge State ====================// + //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) + uint64_t *state = malloc(16 * sizeof (uint64_t)); + if (state == NULL) { + return -1; + } + initState(state); + //==========================================================================/ + + //================================ Setup Phase =============================// + //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits + ptrWord = wholeMatrix; + for (i = 0; i < nBlocksInput; i++) { + absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) + ptrWord += BLOCK_LEN_BLAKE2_SAFE_INT64; //goes to next block of pad(pwd || salt || basil) + } + + //Initializes M[0] and M[1] + reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here + reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); + + do { + //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) + reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //updates the value of row* (deterministically picked during Setup)) + rowa = (rowa + step) & (window - 1); + //update prev: it now points to the last row ever computed + prev = row; + //updates row: goes to the next row to be computed + row++; + + //Checks if all rows in the window where visited. + if (rowa == 0) { + step = window + gap; //changes the step: approximately doubles its value + window *= 2; //doubles the size of the re-visitation window + gap = -gap; //inverts the modifier to the step + } + + } while (row < nRows); + //==========================================================================/ + + //============================ Wandering Phase =============================// + row = 0; //Resets the visitation to the first row of the memory matrix + for (tau = 1; tau <= timeCost; tau++) { + //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 + step = (tau % 2 == 0) ? -1 : nRows / 2 - 1; + do { + //Selects a pseudorandom index row* + //------------------------------------------------------------------------------------------ + //rowa = ((unsigned int)state[0]) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + rowa = ((uint64_t) (state[0])) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] + reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //update prev: it now points to the last row ever computed + prev = row; + + //updates row: goes to the next row to be computed + //------------------------------------------------------------------------------------------ + //row = (row + step) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + } while (row != 0); + } + //==========================================================================/ + + //============================ Wrap-up Phase ===============================// + //Absorbs the last block of the memory matrix + absorbBlock(state, memMatrix[rowa]); + + //Squeezes the key + squeeze(state, K, kLen); + //==========================================================================/ + + //========================= Freeing the memory =============================// + free(memMatrix); + free(wholeMatrix); + + //Wiping out the sponge's internal state before freeing it + memset(state, 0, 16 * sizeof (uint64_t)); + free(state); + //==========================================================================/ + + return 0; } diff --git a/stratum/algos/Lyra2-zz.c.bak b/stratum/algos/Lyra2-zz.c.bak new file mode 100644 index 000000000..caa5bfe58 --- /dev/null +++ b/stratum/algos/Lyra2-zz.c.bak @@ -0,0 +1,214 @@ +/** + * Implementation of the Lyra2 Password Hashing Scheme (PHS). + * + * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. + * + * This software is hereby placed in the public domain. + * + * 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 +#include +#include +#include + +#include "Lyra2-zz.h" +#include "Sponge.h" + +/** + * Executes Lyra2 based on the G function from Blake2b. This version supports salts and passwords + * whose combined length is smaller than the size of the memory matrix, (i.e., (nRows x nCols x b) bits, + * where "b" is the underlying sponge's bitrate). In this implementation, the "basil" is composed by all + * integer parameters (treated as type "unsigned int") in the order they are provided, plus the value + * of nCols, (i.e., basil = kLen || pwdlen || saltlen || timeCost || nRows || nCols). + * + * @param K The derived key to be output by the algorithm + * @param kLen Desired key length + * @param pwd User password + * @param pwdlen Password length + * @param salt Salt + * @param saltlen Salt length + * @param timeCost Parameter to determine the processing time (T) + * @param nRows Number or rows of the memory matrix (R) + * @param nCols Number of columns of the memory matrix (C) + * + * @return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation) + */ +int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols) { + + //============================= Basic variables ============================// + int64_t row = 2; //index of row to be processed + int64_t prev = 1; //index of prev (last row ever computed/modified) + int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) + int64_t tau; //Time Loop iterator + int64_t step = 1; //Visitation step (used during Setup and Wandering phases) + int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) + int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 + int64_t i; //auxiliary iteration counter + //==========================================================================/ + + //========== Initializing the Memory Matrix and pointers to it =============// + //Tries to allocate enough space for the whole memory matrix + + + const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; + const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; + + i = (int64_t) ((int64_t) nRows * (int64_t) ROW_LEN_BYTES); + uint64_t *wholeMatrix = malloc(i); + if (wholeMatrix == NULL) { + return -1; + } + memset(wholeMatrix, 0, i); + + //Allocates pointers to each row of the matrix + uint64_t **memMatrix = malloc(nRows * sizeof (uint64_t*)); + if (memMatrix == NULL) { + return -1; + } + //Places the pointers in the correct positions + uint64_t *ptrWord = wholeMatrix; + for (i = 0; i < nRows; i++) { + memMatrix[i] = ptrWord; + ptrWord += ROW_LEN_INT64; + } + //==========================================================================/ + + //============= Getting the password + salt + basil padded with 10*1 ===============// + //OBS.:The memory matrix will temporarily hold the password: not for saving memory, + //but this ensures that the password copied locally will be overwritten as soon as possible + + //First, we clean enough blocks for the password, salt, basil and padding + uint64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof (uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; + byte *ptrByte = (byte*) wholeMatrix; + memset(ptrByte, 0, nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES); + + //Prepends the password + memcpy(ptrByte, pwd, pwdlen); + ptrByte += pwdlen; + + //Concatenates the salt + memcpy(ptrByte, salt, saltlen); + ptrByte += saltlen; + + //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface + memcpy(ptrByte, &kLen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &pwdlen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &saltlen, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &timeCost, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &nRows, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + memcpy(ptrByte, &nCols, sizeof (uint64_t)); + ptrByte += sizeof (uint64_t); + + //Now comes the padding + *ptrByte = 0x80; //first byte of padding: right after the password + ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix + ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block + *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block + //==========================================================================/ + + //======================= Initializing the Sponge State ====================// + //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) + uint64_t *state = malloc(16 * sizeof (uint64_t)); + if (state == NULL) { + return -1; + } + initState(state); + //==========================================================================/ + + //================================ Setup Phase =============================// + //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits + ptrWord = wholeMatrix; + for (i = 0; i < nBlocksInput; i++) { + absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) + ptrWord += BLOCK_LEN_BLAKE2_SAFE_INT64; //goes to next block of pad(pwd || salt || basil) + } + + //Initializes M[0] and M[1] + reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here + reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); + + do { + //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) + reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + + //updates the value of row* (deterministically picked during Setup)) + rowa = (rowa + step) & (window - 1); + //update prev: it now points to the last row ever computed + prev = row; + //updates row: goes to the next row to be computed + row++; + + //Checks if all rows in the window where visited. + if (rowa == 0) { + step = window + gap; //changes the step: approximately doubles its value + window *= 2; //doubles the size of the re-visitation window + gap = -gap; //inverts the modifier to the step + } + + } while (row < nRows); + //==========================================================================/ + + //============================ Wandering Phase =============================// + row = 0; //Resets the visitation to the first row of the memory matrix + for (tau = 1; tau <= timeCost; tau++) { + //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 + step = (tau % 2 == 0) ? -1 : nRows / 2 - 1; + do { + //Selects a pseudorandom index row* + //------------------------------------------------------------------------------------------ + //rowa = ((unsigned int)state[0]) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + rowa = ((uint64_t) (state[0])) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] + reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //update prev: it now points to the last row ever computed + prev = row; + + //updates row: goes to the next row to be computed + //------------------------------------------------------------------------------------------ + //row = (row + step) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + } while (row != 0); + } + //==========================================================================/ + + //============================ Wrap-up Phase ===============================// + //Absorbs the last block of the memory matrix + absorbBlock(state, memMatrix[rowa]); + + //Squeezes the key + squeeze(state, K, kLen); + //==========================================================================/ + + //========================= Freeing the memory =============================// + free(memMatrix); + free(wholeMatrix); + + //Wiping out the sponge's internal state before freeing it + memset(state, 0, 16 * sizeof (uint64_t)); + free(state); + //==========================================================================/ + + return 0; +} diff --git a/stratum/algos/Lyra2-zz.h b/stratum/algos/Lyra2-zz.h index d6d79e96a..e56a5a7b3 100644 --- a/stratum/algos/Lyra2-zz.h +++ b/stratum/algos/Lyra2-zz.h @@ -45,11 +45,11 @@ typedef unsigned char byte; extern "C" { #endif - int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols); +int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols); #ifdef __cplusplus } #endif -#endif /* LYRA2_H_ */ +#endif /* LYRA2ZZ_H_ */ diff --git a/stratum/algos/Lyra2-zz.h.bak b/stratum/algos/Lyra2-zz.h.bak new file mode 100644 index 000000000..d6d79e96a --- /dev/null +++ b/stratum/algos/Lyra2-zz.h.bak @@ -0,0 +1,55 @@ +/** + * Header file for the Lyra2 Password Hashing Scheme (PHS). + * + * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. + * + * This software is hereby placed in the public domain. + * + * 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. + */ +#ifndef LYRA2ZZ_H_ +#define LYRA2ZZ_H_ + +#include + +typedef unsigned char byte; + +//Block length required so Blake2's Initialization Vector (IV) is not overwritten (THIS SHOULD NOT BE MODIFIED) +#define BLOCK_LEN_BLAKE2_SAFE_INT64 12 //768 bits (=96 bytes, =12 uint64_t) +#define BLOCK_LEN_BLAKE2_SAFE_BYTES (BLOCK_LEN_BLAKE2_SAFE_INT64 * 8) //same as above, in bytes + +#define LYRA2ZZ_BLOCK_HEADER_LEN_BYTES 112 +#define LYRA2ZZ_BLOCK_HEADER_NONCE_OFFSET 19 /* 19 * 4 bytes */ + +#define LYRA2ZZ_BLOCK_HEADER_UINT32_LEN 32 + +#ifdef BLOCK_LEN_BITS + #define BLOCK_LEN_INT64 (BLOCK_LEN_BITS/64) //Block length: 1024 bits (=128 bytes, =16 uint64_t) + #define BLOCK_LEN_BYTES (BLOCK_LEN_BITS/8) //Block length, in bytes +#else //default block length: 1024 bits + #define BLOCK_LEN_INT64 16 //Block length: 1024 bits (=128 bytes, =16 uint64_t) + #define BLOCK_LEN_BYTES (BLOCK_LEN_INT64 * 8) //Block length, in bytes +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols); + +#ifdef __cplusplus +} + +#endif + +#endif /* LYRA2_H_ */ diff --git a/stratum/algos/SWIFFTX/inttypes.h b/stratum/algos/SWIFFTX/inttypes.h index cb313ae81..2b6b941b7 100644 --- a/stratum/algos/SWIFFTX/inttypes.h +++ b/stratum/algos/SWIFFTX/inttypes.h @@ -1,10 +1,14 @@ -/* + /* inttypes.h + Contributors: Created by Marek Michalkiewicz + THIS SOFTWARE IS NOT COPYRIGHTED + This source code is offered for use in the public domain. You may use, modify or distribute it freely. + This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to warranties of @@ -32,4 +36,4 @@ //typedef swift_int16_t intptr_t; //typedef swift_uint16_t uintptr_t; - #endif \ No newline at end of file + #endif diff --git a/stratum/algos/SWIFFTX/inttypes.h.bak b/stratum/algos/SWIFFTX/inttypes.h.bak index 2b6b941b7..cb313ae81 100644 --- a/stratum/algos/SWIFFTX/inttypes.h.bak +++ b/stratum/algos/SWIFFTX/inttypes.h.bak @@ -1,14 +1,10 @@ - /* +/* inttypes.h - Contributors: Created by Marek Michalkiewicz - THIS SOFTWARE IS NOT COPYRIGHTED - This source code is offered for use in the public domain. You may use, modify or distribute it freely. - This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to warranties of @@ -36,4 +32,4 @@ //typedef swift_int16_t intptr_t; //typedef swift_uint16_t uintptr_t; - #endif + #endif \ No newline at end of file diff --git a/stratum/algos/SWIFFTX/stdint.h b/stratum/algos/SWIFFTX/stdint.h index f6e8070ba..59f4cfc93 100644 --- a/stratum/algos/SWIFFTX/stdint.h +++ b/stratum/algos/SWIFFTX/stdint.h @@ -51,4 +51,4 @@ typedef unsigned long long int uint_fast64_t;*/ // __END_DECLS #endif -#endif \ No newline at end of file +#endif diff --git a/stratum/algos/SWIFFTX/stdint.h.bak b/stratum/algos/SWIFFTX/stdint.h.bak index 59f4cfc93..f6e8070ba 100644 --- a/stratum/algos/SWIFFTX/stdint.h.bak +++ b/stratum/algos/SWIFFTX/stdint.h.bak @@ -51,4 +51,4 @@ typedef unsigned long long int uint_fast64_t;*/ // __END_DECLS #endif -#endif +#endif \ No newline at end of file diff --git a/stratum/algos/lyra2zz.c b/stratum/algos/lyra2zz.c index cc9b7a9df..f1b14415c 100644 --- a/stratum/algos/lyra2zz.c +++ b/stratum/algos/lyra2zz.c @@ -3,7 +3,7 @@ #include #include -#include "lyra2zz.h" +#include "Lyra2-zz.h" #include @@ -13,15 +13,16 @@ extern uint64_t lyra2z_height; void lyra2zz_hash(const char* input, char* output, uint32_t len) { - sph_blake256_context ctx_blake; + uint32_t _ALIGN(64) hashB[8], hash[8]; + sph_blake256_context ctx_blake; - uint32_t hashA[8], hashB[8]; + sph_blake256_set_rounds(14); - sph_blake256_init(&ctx_blake); - sph_blake256 (&ctx_blake, input, 112); - sph_blake256_close (&ctx_blake, hashA); + sph_blake256_init(&ctx_blake); + sph_blake256(&ctx_blake, input, 112); + sph_blake256_close(&ctx_blake, hashB); - LYRA2ZZ(hashB, 32, hashA, 32, hashA, 32, 8, 8, 8); + LYRA2ZZ(hash, 32, hashB, 32, hashB, 32, 8, 8, 8); - memcpy(output, hashB, 32); + memcpy(output, hash, 32); } diff --git a/stratum/algos/lyra2zz.c.bak b/stratum/algos/lyra2zz.c.bak new file mode 100644 index 000000000..cc9b7a9df --- /dev/null +++ b/stratum/algos/lyra2zz.c.bak @@ -0,0 +1,27 @@ +#include +#include +#include +#include + +#include "lyra2zz.h" + +#include + +#define _ALIGN(x) __attribute__ ((aligned(x))) + +extern uint64_t lyra2z_height; + +void lyra2zz_hash(const char* input, char* output, uint32_t len) +{ + sph_blake256_context ctx_blake; + + uint32_t hashA[8], hashB[8]; + + sph_blake256_init(&ctx_blake); + sph_blake256 (&ctx_blake, input, 112); + sph_blake256_close (&ctx_blake, hashA); + + LYRA2ZZ(hashB, 32, hashA, 32, hashA, 32, 8, 8, 8); + + memcpy(output, hashB, 32); +} diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 35fbba6b5..42ad2d536 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -8,7 +8,7 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2re.c lyra2re3.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ +SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ @@ -19,7 +19,7 @@ SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2re.c lyra2re3.c lyra yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ - hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ + hive.c pomelo.c hex.c argon2d-dyn.c argon2m.c argon2d.c geek.c balloon.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index 76147288d..b83e11b0d 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -8,8 +8,8 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ - c11.c x11.c x12.c x13.c hsr14.c sm3.c x14.c x15.c x17.c x18.c \ +SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2v3.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ + c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ @@ -18,13 +18,16 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ - argon2m.c blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ - hive.c pomelo.c hex.c \ - + blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ + hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ - yespower.c yespower-opt.c sha256-P.c dedal.c + yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ + binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ + binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ + binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ + binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c -OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) +OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) OUTPUT=libalgos.a all: $(SOURCES) $(OUTPUT) diff --git a/stratum/client_difficulty.cpp b/stratum/client_difficulty.cpp index 8713aa669..fed72fd5b 100644 --- a/stratum/client_difficulty.cpp +++ b/stratum/client_difficulty.cpp @@ -98,3 +98,9 @@ void client_initialize_difficulty(YAAMP_CLIENT *client) } } + + + + + + diff --git a/stratum/client_difficulty.cpp.bak b/stratum/client_difficulty.cpp.bak new file mode 100644 index 000000000..8713aa669 --- /dev/null +++ b/stratum/client_difficulty.cpp.bak @@ -0,0 +1,100 @@ + +#include "stratum.h" + +double client_normalize_difficulty(double difficulty) +{ + if(difficulty < g_stratum_min_diff) difficulty = g_stratum_min_diff; + else if(difficulty < 1) difficulty = floor(difficulty*1000/2)/1000*2; + else if(difficulty > 1) difficulty = floor(difficulty/2)*2; + if(difficulty > g_stratum_max_diff) difficulty = g_stratum_max_diff; + return difficulty; +} + +void client_record_difficulty(YAAMP_CLIENT *client) +{ + if(client->difficulty_remote) + { + client->last_submit_time = current_timestamp(); + return; + } + + int e = current_timestamp() - client->last_submit_time; + if(e < 500) e = 500; + int p = 5; + + client->shares_per_minute = (client->shares_per_minute * (100 - p) + 60*1000*p/e) / 100; + client->last_submit_time = current_timestamp(); + +// debuglog("client->shares_per_minute %f\n", client->shares_per_minute); +} + +void client_change_difficulty(YAAMP_CLIENT *client, double difficulty) +{ + if(difficulty <= 0) return; + + difficulty = client_normalize_difficulty(difficulty); + if(difficulty <= 0) return; + +// debuglog("change diff to %f %f\n", difficulty, client->difficulty_actual); + if(difficulty == client->difficulty_actual) return; + + uint64_t user_target = diff_to_target(difficulty); + if(user_target >= YAAMP_MINDIFF && user_target <= YAAMP_MAXDIFF) + { + client->difficulty_actual = difficulty; + client_send_difficulty(client, difficulty); + } +} + +void client_adjust_difficulty(YAAMP_CLIENT *client) +{ + if(client->difficulty_remote) { + client_change_difficulty(client, client->difficulty_remote); + return; + } + + if(client->shares_per_minute > 100) + client_change_difficulty(client, client->difficulty_actual*4); + + else if(client->difficulty_fixed) + return; + + else if(client->shares_per_minute > 25) + client_change_difficulty(client, client->difficulty_actual*2); + + else if(client->shares_per_minute > 20) + client_change_difficulty(client, client->difficulty_actual*1.5); + + else if(client->shares_per_minute < 5) + client_change_difficulty(client, client->difficulty_actual/2); +} + +int client_send_difficulty(YAAMP_CLIENT *client, double difficulty) +{ +// debuglog("%s diff %f\n", client->sock->ip, difficulty); + client->shares_per_minute = YAAMP_SHAREPERSEC; + + if(difficulty >= 1) + client_call(client, "mining.set_difficulty", "[%.0f]", difficulty); + else + client_call(client, "mining.set_difficulty", "[%.8f]", difficulty); + return 0; +} + +void client_initialize_difficulty(YAAMP_CLIENT *client) +{ + char *p = strstr(client->password, "d="); + char *p2 = strstr(client->password, "decred="); + if(!p || p2) return; + + double diff = client_normalize_difficulty(atof(p+2)); + uint64_t user_target = diff_to_target(diff); + +// debuglog("%016llx target\n", user_target); + if(user_target >= YAAMP_MINDIFF && user_target <= YAAMP_MAXDIFF) + { + client->difficulty_actual = diff; + client->difficulty_fixed = true; + } + +} diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 21dc430e7..3ec21b1f8 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -27,19 +27,6 @@ static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char strcat(data, coinb2_part); } -static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - encode_tx_value(evalue, amount); - sprintf(coinb2_part, "%s", script); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) { int ol = strlen(data); @@ -91,10 +78,10 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); // debuglog("aux_script is %s\n", aux_script); - } +} - void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) - { +void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) +{ char eheight[32], etime[32]; char entime[32] = { 0 }; char commitment[128] = { 0 }; @@ -106,9 +93,6 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) char eversion1[32] = "01000000"; if(coind->txmessage) strcpy(eversion1, "02000000"); - const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); - if(coinbase_payload && strlen(coinbase_payload) > 0) - strcpy(eversion1, "03000500"); char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); @@ -156,7 +140,7 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) return; } - if(superblocks_enabled && superblock) { + if(superblocks_enabled && superblock) { for(int i = 0; i < superblock->u.array.length; i++) { const char *payee = json_get_string(superblock->u.array.values[i], "payee"); json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); @@ -169,7 +153,7 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) } } } - if (dynode_enabled && dynode) { + if (dynode_enabled && dynode) { bool started; started = json_get_bool(json_result, "dynode_payments_started"); const char *payee = json_get_string(dynode, "payee"); @@ -234,8 +218,7 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) coind->reward = (double)available/100000000*coind->reward_mul; return; } - - else if(strcmp("DCR", coind->rpcencoding) == 0) { + else if(strcmp("DCR", coind->rpcencoding) == 0) { coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 coind->charity_percent = 0; coind->charity_amount = available; @@ -243,312 +226,6 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); } - - else if(strcmp(coind->symbol, "BZX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "bznode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "04"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "03"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); - job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); - - base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); - job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); - - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "TUX") == 0) { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "donation_payee"); - if(payee != NULL){ - sprintf(coind->charity_address, "%s", payee); - } else { - sprintf(coind->charity_address, "%s", ""); - } - - if(strlen(coind->charity_address) > 0){ - char script_payee[1024]; - char charity_payee[256] = { 0 }; - sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "donation_amount"); - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - debuglog("pack tx %s\n", coinb2_part); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - } - - else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char script_treasury[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - json_value* masternode = json_get_object(json_result, "masternode"); - json_value* treasury = json_get_object(json_result, "treasury"); - bool treasury_enabled = true; - if(treasury_enabled && treasury) { - const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); - memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); - json_int_t amount = json_get_int(treasury, "amount"); - if (scriptPubKey && amount) { - npayees++; - available -= amount; - job_pack_tx(coind, script_dests, amount, script_treasury); - //debuglog("%s treasury %u\n", coind->symbol, amount); - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "SECI") == 0) { - char script_payee[512] = { 0 }; - char payees[1]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //mainnet - json_int_t charity_amount = 50000000; - sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if (strcmp(coind->symbol,"XZX") == 0) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - - json_value* subsidyreward = json_get_array(json_result, "subsidy"); - if (subsidyreward) - { - const char *payee = json_get_string(subsidyreward, "address"); - json_int_t amount = json_get_int(subsidyreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - - } - - else if ((strcmp(coind->symbol, "IFX") == 0)|| - (strcmp(coind->symbol, "GTM") == 0)|| - (strcmp(coind->symbol, "GOV") == 0)|| - (strcmp(coind->symbol, "GWAY") == 0)|| - (strcmp(coind->symbol, "ALMN") == 0)|| - (strcmp(coind->symbol, "AGM") == 0)|| - (strcmp(coind->symbol, "BMN") == 0)|| - (strcmp(coind->symbol, "CRDS") == 0)) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - else if(strcmp(coind->symbol, "HXX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "xnode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "05"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - - base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); - job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - else if(strcmp(coind->symbol, "STAK") == 0) { char script_payee[512] = { 0 }; char payees[4]; @@ -608,70 +285,56 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. - else if (strcmp(coind->symbol, "SMART") == 0) { - char script_payee[512] = { 0 }; - char payees[5]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //treasury 5000 * (143500/Blockheight) per block - int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); - json_int_t charity_amount = coinvalue * 0.95; - int blockRotation = templ->height - 95 * (templ->height/95); - if (blockRotation >= 0 && blockRotation <= 7) { - sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); - } - if (blockRotation >= 8 && blockRotation <= 15) { - sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); - } - if (blockRotation >= 16 && blockRotation <= 23) { - sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); - } - if (blockRotation >= 24 && blockRotation <= 38) { - sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); - } - if (blockRotation >= 39 && blockRotation <= 94) { - sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); + else if(strcmp(coind->symbol, "TUX") == 0) { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "donation_payee"); + if(payee != NULL){ + sprintf(coind->charity_address, "%s", payee); + } else { + sprintf(coind->charity_address, "%s", ""); + } + + if(strlen(coind->charity_address) > 0){ + char script_payee[1024]; + char charity_payee[256] = { 0 }; + sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "donation_amount"); + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + debuglog("pack tx %s\n", coinb2_part); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + } + + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); json_value* founder = json_get_object(json_result, "founder"); if (!coind->hasmasternodes && founder_enabled && founder) { @@ -706,7 +369,7 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) debuglog("%s founder script %s\n", coind->symbol,founder_script); debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - return; + return; } } @@ -821,14 +484,8 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) if(superblocks_enabled && superblock) { for(int i = 0; i < superblock->u.array.length; i++) { const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - const char *script = json_get_string(superblock->u.array.values[i], "script"); json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { + if (payee && amount) { npayees++; available -= amount; base58_decode(payee, script_payee); @@ -841,43 +498,19 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) } } } - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (masternode_enabled && masternode && started) { - if (json_is_array(masternode)) { - for(int i = 0; i < masternode->u.array.length; i++) { - const char *payee = json_get_string(masternode->u.array.values[i], "payee"); - const char *script = json_get_string(masternode->u.array.values[i], "script"); - json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); - } - } - } else { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - } + if (masternode_enabled && masternode) { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount && started) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); } } sprintf(payees, "%02x", npayees); @@ -886,13 +519,6 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) strcat(templ->coinb2, script_dests); job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - if(coinbase_payload && strlen(coinbase_payload) > 0) { - char coinbase_payload_size[18]; - ser_compactsize((unsigned int)(strlen(coinbase_payload_size) >> 1), coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload); - } - coind->reward = (double)available/100000000*coind->reward_mul; //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); @@ -985,49 +611,6 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) return; } - else if(strcmp(coind->symbol, "ARC") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "goldminenode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ { @@ -1122,3 +705,6 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } + + + diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak new file mode 100644 index 000000000..21dc430e7 --- /dev/null +++ b/stratum/coinbase.cpp.bak @@ -0,0 +1,1124 @@ + +// http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html + +// https://en.bitcoin.it/wiki/Merged_mining_specification#Merged_mining_coinbase + +#include "stratum.h" + +#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) + +static void encode_tx_value(char *encoded, json_int_t value) +{ + sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", + TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), + TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); +} + +static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(payee) >> 1) & 0xFF, payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + encode_tx_value(evalue, amount); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + +static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + encode_tx_value(evalue, amount); + sprintf(coinb2_part, "%s", script); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + +static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) +{ + int ol = strlen(data); + char evalue[32]; + + if(coind->p2sh_address && !key) { + p2sh_pack_tx(coind, data, amount, coind->script_pubkey); + return; + } + + encode_tx_value(evalue, amount); + sprintf(data+strlen(data), "%s", evalue); + + if(coind->pos && !key) + sprintf(data+strlen(data), "2321%sac", coind->pubkey); + + else + sprintf(data+strlen(data), "1976a914%s88ac", key? key: coind->script_pubkey); + +// debuglog("pack tx %s\n", data+ol); +// debuglog("pack tx %lld\n", amount); +} + +void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) +{ + vector hashlist = coind_aux_hashlist(templ->auxs, templ->auxs_size); + while(hashlist.size() > 1) + { + vector l; + for(int i = 0; i < hashlist.size()/2; i++) + { + string s = hashlist[i*2] + hashlist[i*2+1]; + + char bin[YAAMP_HASHLEN_BIN*2]; + char out[YAAMP_HASHLEN_STR]; + + binlify((unsigned char *)bin, s.c_str()); + sha256_double_hash_hex(bin, out, YAAMP_HASHLEN_BIN*2); + + l.push_back(out); + } + + hashlist = l; + } + + char merkle_hash[4*1024]; + memset(merkle_hash, 0, 4*1024); + string_be(hashlist[0].c_str(), merkle_hash); + + sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); +// debuglog("aux_script is %s\n", aux_script); + } + + void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) + { + char eheight[32], etime[32]; + char entime[32] = { 0 }; + char commitment[128] = { 0 }; + + ser_number(templ->height, eheight); + ser_number(time(NULL), etime); + if(coind->pos) ser_string_be(templ->ntime, entime, 1); + + char eversion1[32] = "01000000"; + if(coind->txmessage) + strcpy(eversion1, "02000000"); + const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); + if(coinbase_payload && strlen(coinbase_payload) > 0) + strcpy(eversion1, "03000500"); + + char script1[4*1024]; + sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); + + char script2[32] = "7969696d7000"; // "yiimp\0" in hex ascii + + if(!coind->pos && !coind->isaux && templ->auxs_size) + coinbase_aux(templ, script2); + + int script_len = strlen(script1)/2 + strlen(script2)/2 + 8; + sprintf(templ->coinb1, "%s%s01" + "0000000000000000000000000000000000000000000000000000000000000000" + "ffffffff%02x%s", eversion1, entime, script_len, script1); + + sprintf(templ->coinb2, "%s00000000", script2); + + // segwit commitment, if needed + if (templ->has_segwit_txs) + sprintf(commitment, "0000000000000000%02x%s", (int) (strlen(coind->commitment)/2), coind->commitment); + + json_int_t available = templ->value; + + // sample coins using mandatory dev/foundation fees + if(strcmp(coind->symbol, "EGC") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 2; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); + } + else if(strcmp(coind->symbol, "DYN") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[3]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool dynode_enabled; + dynode_enabled = json_get_bool(json_result, "dynode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* dynode; + dynode = json_get_object(json_result, "dynode"); + if(!dynode && json_get_bool(json_result, "dynode_payments")) { + coind->oldmasternodes = true; + debuglog("%s is using old dynodes rpc keys\n", coind->symbol); + return; + } + + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock found %s %u\n", coind->symbol, payee, amount); + } + } + } + if (dynode_enabled && dynode) { + bool started; + started = json_get_bool(json_result, "dynode_payments_started"); + const char *payee = json_get_string(dynode, "payee"); + json_int_t amount = json_get_int(dynode, "amount"); + if (!payee) + debuglog("coinbase_create failed to get Dynode payee\n"); + + if (!amount) + debuglog("coinbase_create failed to get Dynode amount\n"); + + if (!started) + debuglog("coinbase_create failed to get Dynode started\n"); + + if (payee && amount && started) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s dynode found %s %u\n", coind->symbol, payee, amount); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + else if(strcmp(coind->symbol, "LTCR") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 10; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); + } + else if(strcmp(coind->symbol, "XZC") == 0) { + char script_payee[1024]; + if (coind->charity_percent <= 0) + coind->charity_percent = 25; // wrong coinbase 40 instead of 40 + 10 = 50 + + json_int_t charity_amount = (available * coind->charity_percent) / 100; + + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD"); + + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode(coind->charity_address, script_payee); // may change + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + + else if(strcmp("DCR", coind->rpcencoding) == 0) { + coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 + coind->charity_percent = 0; + coind->charity_amount = available; + available *= coind->reward_mul; + if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) + sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); + } + + else if(strcmp(coind->symbol, "BZX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "bznode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "04"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "03"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); + job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); + + base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); + job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); + + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "TUX") == 0) { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "donation_payee"); + if(payee != NULL){ + sprintf(coind->charity_address, "%s", payee); + } else { + sprintf(coind->charity_address, "%s", ""); + } + + if(strlen(coind->charity_address) > 0){ + char script_payee[1024]; + char charity_payee[256] = { 0 }; + sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "donation_amount"); + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + debuglog("pack tx %s\n", coinb2_part); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + } + + else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char script_treasury[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + json_value* masternode = json_get_object(json_result, "masternode"); + json_value* treasury = json_get_object(json_result, "treasury"); + bool treasury_enabled = true; + if(treasury_enabled && treasury) { + const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); + memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); + json_int_t amount = json_get_int(treasury, "amount"); + if (scriptPubKey && amount) { + npayees++; + available -= amount; + job_pack_tx(coind, script_dests, amount, script_treasury); + //debuglog("%s treasury %u\n", coind->symbol, amount); + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "SECI") == 0) { + char script_payee[512] = { 0 }; + char payees[1]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //mainnet + json_int_t charity_amount = 50000000; + sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); + //testnet + //json_int_t charity_amount = 50000000; + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + else if (strcmp(coind->symbol,"XZX") == 0) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + + json_value* subsidyreward = json_get_array(json_result, "subsidy"); + if (subsidyreward) + { + const char *payee = json_get_string(subsidyreward, "address"); + json_int_t amount = json_get_int(subsidyreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + + } + + else if ((strcmp(coind->symbol, "IFX") == 0)|| + (strcmp(coind->symbol, "GTM") == 0)|| + (strcmp(coind->symbol, "GOV") == 0)|| + (strcmp(coind->symbol, "GWAY") == 0)|| + (strcmp(coind->symbol, "ALMN") == 0)|| + (strcmp(coind->symbol, "AGM") == 0)|| + (strcmp(coind->symbol, "BMN") == 0)|| + (strcmp(coind->symbol, "CRDS") == 0)) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + else if(strcmp(coind->symbol, "HXX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "xnode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "05"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + + base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + + base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); + job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "STAK") == 0) { + char script_payee[512] = { 0 }; + char payees[4]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + + //treasury 5% @ 10 STAK per block + json_int_t charity_amount = 50000000; + //testnet + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + switch (templ->height % 4) { + case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); + break; + case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); + break; + case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); + break; + case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); + break; + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. + else if (strcmp(coind->symbol, "SMART") == 0) { + char script_payee[512] = { 0 }; + char payees[5]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //treasury 5000 * (143500/Blockheight) per block + int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); + json_int_t charity_amount = coinvalue * 0.95; + int blockRotation = templ->height - 95 * (templ->height/95); + if (blockRotation >= 0 && blockRotation <= 7) { + sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); + } + if (blockRotation >= 8 && blockRotation <= 15) { + sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); + } + if (blockRotation >= 16 && blockRotation <= 23) { + sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); + } + if (blockRotation >= 24 && blockRotation <= 38) { + sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); + } + if (blockRotation >= 39 && blockRotation <= 94) { + sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); + json_value* founder = json_get_object(json_result, "founder"); + + if (!coind->hasmasternodes && founder_enabled && founder) { + char founder_payee[256] = { 0 }; + char founder_script[1024] = { 0}; + const char *payee = json_get_string(founder, "payee"); + bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); + json_int_t amount = json_get_int(founder, "amount"); + if(payee && amount) { + if (payee) snprintf(founder_payee, 255, "%s", payee); + if (strlen(founder_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + base58_decode(founder_payee, founder_script); + available -= amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + if(founder_use_p2sh) { + p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); + } else { + job_pack_tx(coind, templ->coinb2, amount, founder_script); + } + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); + debuglog("%s founder script %s\n", coind->symbol,founder_script); + debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); + + return; + } + } + + // 2 txs are required on these coins, one for foundation (dev fees) + if(coind->charity_percent && !coind->hasmasternodes) + { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + if (charity_amount <= 0) + charity_amount = (available * coind->charity_percent) / 100; + + available -= charity_amount; + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + + else if(coind->charity_amount && !strcmp("DCR", coind->rpcencoding)) + { + stratumlog("ERROR %s should not use coinbase (getwork only)!\n", coind->symbol); + coind->reward = (double)available/100000000; + return; + } + + if(strcmp(coind->symbol, "XVC") == 0) + { + char charity_payee[256]; + json_value* incentive = json_get_object(json_result, "incentive"); + if (incentive) { + const char* payee = json_get_string(incentive, "address"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + + bool enforced = json_get_bool(incentive, "enforced"); + json_int_t charity_amount = json_get_int(incentive, "amount"); + if (enforced && charity_amount && strlen(charity_payee)) { + char script_payee[1024]; + base58_decode(charity_payee, script_payee); + + strcat(templ->coinb2, "02"); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->charity_amount = charity_amount; + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("XVC coinbase %ld (+%ld incentive to %s)\n", + // (long) available, (long) charity_amount, charity_payee); + return; + } + } + } + + // most recent masternodes rpc (DASH, SIB, MUE, DSR, GBX...) + if(coind->hasmasternodes && !coind->oldmasternodes) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; // addresses count + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "masternode"); + if(!masternode && json_get_bool(json_result, "masternode_payments")) { + coind->oldmasternodes = true; + debuglog("%s is using old masternodes rpc keys\n", coind->symbol); + return; + } + if(coind->charity_percent) { + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + json_int_t charity_amount = (available * coind->charity_percent) / 100; + npayees++; + available -= charity_amount; + coind->charity_amount = charity_amount; + base58_decode(charity_payee, script_payee); + job_pack_tx(coind, script_dests, charity_amount, script_payee); + } + // smart contracts balance refund, same format as DASH superblocks + json_value* screfund = json_get_array(json_result, "screfund"); + if(screfund && screfund->u.array.length) { + superblocks_enabled = true; + superblock = screfund; + } + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + const char *script = json_get_string(superblock->u.array.values[i], "script"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(superblock_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (masternode_enabled && masternode && started) { + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i++) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + const char *script = json_get_string(masternode->u.array.values[i], "script"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + if(coinbase_payload && strlen(coinbase_payload) > 0) { + char coinbase_payload_size[18]; + ser_compactsize((unsigned int)(strlen(coinbase_payload_size) >> 1), coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload); + } + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ARC") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "goldminenode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ENT") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "eternitynode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "eternitynode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ARC") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "goldminenode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + + else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ + { + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + bool charity_payments = json_get_bool(json_result, "masternode_payments"); + bool charity_enforce = json_get_bool(json_result, "enforce_masternode_payments"); + + if(strcmp(coind->symbol, "CRW") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + bool systemnodes_enabled = json_get_bool(json_result, "enforce_systemnode_payments"); + bool systemnodes = json_get_bool(json_result, "systemnodes"); + bool masternodes = json_get_bool(json_result, "masternodes"); + if(systemnodes_enabled && systemnodes) { + const char *payeeSN = json_get_string(json_result, "payeeSN"); + json_int_t payeeSN_amount = json_get_int(json_result, "payeeSN_amount"); + if (payeeSN && payeeSN_amount) { + npayees++; + available -= payeeSN_amount; + base58_decode(payeeSN, script_payee); + job_pack_tx(coind, script_dests, payeeSN_amount, script_payee); + //debuglog("%s systemnode %s %u\n", coind->symbol, payeeSN, payeeSN_amount); + } + } + if (masternodes_enabled && masternodes) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + if(charity_payments && charity_enforce) + { + char script_payee[256] = { 0 }; + base58_decode(charity_payee, script_payee); + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + node + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); // 2 outputs + } + + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + available -= charity_amount; + + } else { + strcat(templ->coinb2, "01"); + } + } + + else if (templ->has_segwit_txs) { + strcat(templ->coinb2, "02"); + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "01"); + } + + job_pack_tx(coind, templ->coinb2, available, NULL); + + //if(coind->txmessage) + // strcat(templ->coinb2, "00"); + if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. + if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; +// debuglog("coinbase %f\n", coind->reward); + +// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); +// debuglog("coinb1 %s\n", templ->coinb1); +// debuglog("coinb2 %s\n", templ->coinb2); +} diff --git a/stratum/coind_submit.cpp b/stratum/coind_submit.cpp index 3a2af19b1..6089494a9 100644 --- a/stratum/coind_submit.cpp +++ b/stratum/coind_submit.cpp @@ -143,6 +143,7 @@ bool coind_submitgetauxblock(YAAMP_COIND *coind, const char *hash, const char *b // some auxpow coins return error:null, result: null on success if(!b) b=json_result && json_result->type == json_null; + json_value_free(json); return b; } diff --git a/stratum/coind_submit.cpp.bak b/stratum/coind_submit.cpp.bak new file mode 100644 index 000000000..3a2af19b1 --- /dev/null +++ b/stratum/coind_submit.cpp.bak @@ -0,0 +1,149 @@ + +#include "stratum.h" + +bool coind_submitwork(YAAMP_COIND *coind, const char *block) +{ + int paramlen = strlen(block); + + char *params = (char *)malloc(paramlen+1024); + if(!params) { + debuglog("%s: OOM!\n", __func__); + return false; + } + + sprintf(params, "[\"%s\"]", block); + json_value *json = rpc_call(&coind->rpc, "getwork", params); + if(!json) { + debuglog("%s: retry\n", __func__); + usleep(500*YAAMP_MS); + json = rpc_call(&coind->rpc, "getwork", params); + } + free(params); + + if(!json) { + debuglog("%s: error, no answer\n", __func__); + return false; + } + + json_value *json_res = json_get_object(json, "result"); + + bool b = json_res && json_res->type == json_boolean && json_res->u.boolean; + json_value_free(json_res); + + return b; +} + +bool coind_submitblock(YAAMP_COIND *coind, const char *block) +{ + int paramlen = strlen(block); + + char *params = (char *)malloc(paramlen+1024); + if(!params) return false; + + sprintf(params, "[\"%s\"]", block); + json_value *json = rpc_call(&coind->rpc, "submitblock", params); + + free(params); + if(!json) return false; + + json_value *json_error = json_get_object(json, "error"); + if(json_error && json_error->type != json_null) + { + const char *p = json_get_string(json_error, "message"); + if(p) stratumlog("ERROR %s %s\n", coind->name, p); + + // job_reset(); + json_value_free(json); + + return false; + } + + json_value *json_result = json_get_object(json, "result"); + + bool b = json_result && json_result->type == json_null; + json_value_free(json); + + return b; +} + +bool coind_submitblocktemplate(YAAMP_COIND *coind, const char *block) +{ + int paramlen = strlen(block); + + char *params = (char *)malloc(paramlen+1024); + if(!params) return false; + + sprintf(params, "[{\"mode\": \"submit\", \"data\": \"%s\"}]", block); + json_value *json = rpc_call(&coind->rpc, "getblocktemplate", params); + + free(params); + if(!json) return false; + + json_value *json_error = json_get_object(json, "error"); + if(json_error && json_error->type != json_null) + { + const char *p = json_get_string(json_error, "message"); + if(p) stratumlog("ERROR %s %s\n", coind->name, p); + + // job_reset(); + json_value_free(json); + + return false; + } + + json_value *json_result = json_get_object(json, "result"); + + bool b = json_result && json_result->type == json_null; + json_value_free(json); + + return b; +} + +bool coind_submit(YAAMP_COIND *coind, const char *block) +{ + bool b; + + if(coind->usegetwork) // DCR + b = coind_submitwork(coind, block); + else if(coind->hassubmitblock) + b = coind_submitblock(coind, block); + else + b = coind_submitblocktemplate(coind, block); + + return b; +} + +bool coind_submitgetauxblock(YAAMP_COIND *coind, const char *hash, const char *block) +{ + int paramlen = strlen(block); + + char *params = (char *)malloc(paramlen+1024); + if(!params) return false; + + sprintf(params, "[\"%s\",\"%s\"]", hash, block); + json_value *json = rpc_call(&coind->rpc, "getauxblock", params); + + free(params); + if(!json) return false; + + json_value *json_error = json_get_object(json, "error"); + if(json_error && json_error->type != json_null) + { + const char *p = json_get_string(json_error, "message"); + if(p) stratumlog("ERROR %s %s\n", coind->name, p); + + // job_reset(); + json_value_free(json); + + return false; + } + + json_value *json_result = json_get_object(json, "result"); + bool b = json_result && json_result->type == json_boolean && json_result->u.boolean; + // some auxpow coins return error:null, result: null on success + if(!b) + b=json_result && json_result->type == json_null; + json_value_free(json); + return b; +} + diff --git a/stratum/config.sample/lyra2v3.conf b/stratum/config.sample/lyra2v3.conf index fdd0ff827..04c9dadbc 100644 --- a/stratum/config.sample/lyra2v3.conf +++ b/stratum/config.sample/lyra2v3.conf @@ -13,3 +13,4 @@ password = patofpaq algo = lyra2v3 difficulty = 1 max_ttf = 40000 + diff --git a/stratum/config.sample/lyra2v3.conf.bak b/stratum/config.sample/lyra2v3.conf.bak new file mode 100644 index 000000000..fdd0ff827 --- /dev/null +++ b/stratum/config.sample/lyra2v3.conf.bak @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 4433 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = lyra2v3 +difficulty = 1 +max_ttf = 40000 diff --git a/stratum/db.cpp b/stratum/db.cpp index 4ba7b75f1..55cb0621c 100644 --- a/stratum/db.cpp +++ b/stratum/db.cpp @@ -207,8 +207,6 @@ void db_update_coinds(YAAMP_DB *db) YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, atoi(row[0])); if(!coind) { - if (!strlen(g_stratum_coin_include) || (strlen(g_stratum_coin_include) && strstr(g_stratum_coin_include, row[20]))) - { coind = new YAAMP_COIND; memset(coind, 0, sizeof(YAAMP_COIND)); @@ -216,9 +214,6 @@ void db_update_coinds(YAAMP_DB *db) coind->newblock = true; coind->id = atoi(row[0]); coind->aux.coind = coind; - } - else - continue; } else coind->newcoind = false; diff --git a/stratum/db.cpp.bak b/stratum/db.cpp.bak new file mode 100644 index 000000000..4ba7b75f1 --- /dev/null +++ b/stratum/db.cpp.bak @@ -0,0 +1,624 @@ + +#include "stratum.h" +#include +#include + +void db_reconnect(YAAMP_DB *db) +{ + if (g_exiting) { + db_close(db); + return; + } + + mysql_init(&db->mysql); + for(int i=0; i<6; i++) + { + MYSQL *p = mysql_real_connect(&db->mysql, g_sql_host, g_sql_username, g_sql_password, g_sql_database, g_sql_port, 0, 0); + if(p) break; + + stratumlog("%d, %s\n", i, mysql_error(&db->mysql)); + sleep(10); + + mysql_close(&db->mysql); + mysql_init(&db->mysql); + } +} + +YAAMP_DB *db_connect() +{ + YAAMP_DB *db = new YAAMP_DB; + db_reconnect(db); + + return db; +} + +void db_close(YAAMP_DB *db) +{ + if (db) { + mysql_close(&db->mysql); + delete db; + } + db = NULL; +} + +char *db_clean_string(YAAMP_DB *db, char *string) +{ + char *c = string; + size_t i, len = strlen(string) & 0x1FF; + for (i = 0; i < len; i++) { + bool isdigit = (c[i] >= '0' && c[i] <= '9'); + bool isalpha = (c[i] >= 'a' && c[i] <= 'z') || (c[i] >= 'A' && c[i] <= 'Z'); + bool issepch = (c[i] == '=' || c[i] == ',' || c[i] == ';' || c[i] == '.'); + bool isextra = (c[i] == '/' || c[i] == '-' || c[i] == '_'); + if (!isdigit && !isalpha && !issepch && !isextra) { c[i] = '\0'; break; } + } + return string; +} + +// allow more chars without the most hurting ones (bench device names) +static void clean_html(char* string) +{ + char *c = string; + size_t i, len = strlen(string) & 0x1FF; + for (i = 0; i < len; i++) { + if (c[i] == '<' || c[i] == '>' || c[i] == '%' || c[i] == '\\' || c[i] == '"' || c[i] == '\'') { + c[i] = '\0'; break; + } + } + if (strstr(string, "script")) strcpy(string, ""); +} + +void db_query(YAAMP_DB *db, const char *format, ...) +{ + va_list arglist; + va_start(arglist, format); + if(!db) return; + + char *buffer = (char *)malloc(YAAMP_SMALLBUFSIZE+strlen(format)); + if(!buffer) return; + + int len = vsprintf(buffer, format, arglist); + va_end(arglist); + + while(!g_exiting) + { + int res = mysql_query(&db->mysql, buffer); + if(!res) break; + res = mysql_errno(&db->mysql); + + stratumlog("SQL ERROR: %d, %s\n", res, mysql_error(&db->mysql)); + if(res == ER_DUP_ENTRY) break; // rarely seen on new user creation + if(res != CR_SERVER_GONE_ERROR && res != CR_SERVER_LOST) exit(1); + + usleep(100*YAAMP_MS); + db_reconnect(db); + } + + free(buffer); +} + +/////////////////////////////////////////////////////////////////////// + +void db_register_stratum(YAAMP_DB *db) +{ + int pid = getpid(); + int t = time(NULL); + if(!db) return; + + db_query(db, "INSERT INTO stratums (pid, time, started, algo, url, port) VALUES (%d,%d,%d,'%s','%s',%d) " + " ON DUPLICATE KEY UPDATE time=%d, algo='%s', url='%s', port=%d", + pid, t, t, g_stratum_algo, g_tcp_server, g_tcp_port, + t, g_stratum_algo, g_tcp_server, g_tcp_port + ); +} + +void db_update_algos(YAAMP_DB *db) +{ + int pid = getpid(); + int fds = opened_files(); + if(!db) return; + + if(g_current_algo->overflow) + { + debuglog("setting overflow\n"); + g_current_algo->overflow = false; + + db_query(db, "UPDATE algos SET overflow=true WHERE name='%s'", g_stratum_algo); + } + + char symbol[16] = "NULL\0"; + if(g_list_coind.count == 1) { + if (g_list_coind.first) { + CLI li = g_list_coind.first; + YAAMP_COIND *coind = (YAAMP_COIND *)li->data; + sprintf(symbol,"'%s'", coind->symbol); + } + } + + db_query(db, "UPDATE stratums SET workers=%d, fds=%d, symbol=%s WHERE pid=%d", + g_list_client.count, fds, symbol, pid); + + /////////////////////////////////////////////////////////////////////////////////////////// + + db_query(db, "select name, profit, rent, factor from algos"); + + MYSQL_RES *result = mysql_store_result(&db->mysql); + if(!result) return; + + MYSQL_ROW row; + while((row = mysql_fetch_row(result)) != NULL) + { + YAAMP_ALGO *algo = stratum_find_algo(row[0]); + if(!algo) continue; + + if(row[1]) algo->profit = atof(row[1]); + if(row[2]) algo->rent = atof(row[2]); + if(row[3]) algo->factor = atof(row[3]); + } + + mysql_free_result(result); + + //////////////////// + + g_list_client.Enter(); + for(CLI li = g_list_client.first; li; li = li->next) + { + YAAMP_CLIENT *client = (YAAMP_CLIENT *)li->data; + if(client->deleted) continue; + + client_reset_multialgo(client, false); + } + + g_list_client.Leave(); +} + +//////////////////////////////////////////////////////////////////////////////// + +void db_update_coinds(YAAMP_DB *db) +{ + if(!db) return; + + for(CLI li = g_list_coind.first; li; li = li->next) + { + YAAMP_COIND *coind = (YAAMP_COIND *)li->data; + if(coind->deleted) continue; + if(coind->auto_ready) continue; + + debuglog("disabling %s\n", coind->symbol); + db_query(db, "update coins set auto_ready=%d where id=%d", coind->auto_ready, coind->id); + } + + //////////////////////////////////////////////////////////////////////////////////////// + + db_query(db, "SELECT id, name, rpchost, rpcport, rpcuser, rpcpasswd, rpcencoding, master_wallet, reward, price, " + "hassubmitblock, txmessage, enable, auto_ready, algo, pool_ttf, charity_address, charity_amount, charity_percent, " + "reward_mul, symbol, auxpow, actual_ttf, network_ttf, usememorypool, hasmasternodes, algo, symbol2, " + "rpccurl, rpcssl, rpccert, account, multialgos, max_miners, max_shares, usesegwit " + "FROM coins WHERE enable AND auto_ready AND algo='%s' ORDER BY index_avg", g_stratum_algo); + + MYSQL_RES *result = mysql_store_result(&db->mysql); + if(!result) yaamp_error("Cant query database"); + + MYSQL_ROW row; + g_list_coind.Enter(); + + while((row = mysql_fetch_row(result)) != NULL) + { + YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, atoi(row[0])); + if(!coind) + { + if (!strlen(g_stratum_coin_include) || (strlen(g_stratum_coin_include) && strstr(g_stratum_coin_include, row[20]))) + { + coind = new YAAMP_COIND; + memset(coind, 0, sizeof(YAAMP_COIND)); + + coind->newcoind = true; + coind->newblock = true; + coind->id = atoi(row[0]); + coind->aux.coind = coind; + } + else + continue; + } + else + coind->newcoind = false; + + strcpy(coind->name, row[1]); + strcpy(coind->symbol, row[20]); + // optional coin filters + if(coind->newcoind) { + bool ignore = false; + if (strlen(g_stratum_coin_include) && !strstr(g_stratum_coin_include, coind->symbol)) ignore = true; + if (strlen(g_stratum_coin_exclude) && strstr(g_stratum_coin_exclude, coind->symbol)) ignore = true; + if (ignore) { + object_delete(coind); + continue; + } + } + + if(row[7]) strcpy(coind->wallet, row[7]); + if(row[6]) strcpy(coind->rpcencoding, row[6]); + if(row[6]) coind->pos = strcasecmp(row[6], "POS")? false: true; + if(row[10]) coind->hassubmitblock = atoi(row[10]); + + coind->rpc.ssl = 0; + // deprecated method to set ssl and cert (before db specific fields) + if(row[2]) { + char buffer[1024]; + char cert[1024]; + strcpy(buffer, row[2]); + // sample ssl host : "https://mycert@127.0.0.1" + if (strstr(buffer, "https://") != NULL) { + strcpy(buffer, row[2] + 8); + if (strstr(buffer, "@") != NULL) { + int p = (strstr(buffer, "@") - buffer); + strcpy(cert, buffer); cert[p] = '\0'; + strcpy(buffer, row[2] + 8 + p + 1); + } else { + strcpy(cert, "yiimp"); + } + coind->rpc.ssl = 1; + sprintf(coind->rpc.cert, "/usr/share/ca-certificates/%s.crt", cert); + } + strcpy(coind->rpc.cert, ""); + strcpy(coind->rpc.host, buffer); + } + + if(row[3]) coind->rpc.port = atoi(row[3]); + + if(row[4] && row[5]) + { + char buffer[1024]; + sprintf(buffer, "%s:%s", row[4], row[5]); + + base64_encode(coind->rpc.credential, buffer); + coind->rpc.coind = coind; + } + + if(row[8]) coind->reward = atof(row[8]); + if(row[9]) coind->price = atof(row[9]); + if(row[11]) coind->txmessage = atoi(row[11]); + if(row[12]) coind->enable = atoi(row[12]); + if(row[13]) coind->auto_ready = atoi(row[13]); + if(row[15]) coind->pool_ttf = atoi(row[15]); + + if(row[16]) strcpy(coind->charity_address, row[16]); + if(row[17]) coind->charity_amount = atof(row[17]); + if(row[18]) coind->charity_percent = atof(row[18]); + if(row[19]) coind->reward_mul = atof(row[19]); + + if(row[21]) coind->isaux = atoi(row[21]); + + if(row[22] && row[23]) coind->actual_ttf = min(atoi(row[22]), atoi(row[23])); + else if(row[22]) coind->actual_ttf = atoi(row[22]); + coind->actual_ttf = min(coind->actual_ttf, 120); + coind->actual_ttf = max(coind->actual_ttf, 20); + + if(row[24]) coind->usememorypool = atoi(row[24]); + if(row[25]) coind->hasmasternodes = atoi(row[25]); + + if(row[26]) strcpy(coind->algo, row[26]); + if(row[27]) strcpy(coind->symbol2, row[27]); // if pool + aux, prevent double submit + + if(row[28]) coind->rpc.curl = atoi(row[28]) != 0; + if(row[29]) coind->rpc.ssl = atoi(row[29]) != 0; + if(row[30]) strcpy(coind->rpc.cert, row[30]); + + if(row[31]) strcpy(coind->account, row[31]); + if(row[32]) coind->multialgos = atoi(row[32]); + if(row[33] && atoi(row[33]) > 0) g_stratum_max_cons = atoi(row[33]); + if(row[34] && atol(row[34]) > 0) g_max_shares = atol(row[34]); + if(row[35]) coind->usesegwit = atoi(row[35]) > 0; + + if(coind->usesegwit) g_stratum_segwit = true; + + // force the right rpcencoding for DCR + if(!strcmp(coind->symbol, "DCR") && strcmp(coind->rpcencoding, "DCR")) + strcpy(coind->rpcencoding, "DCR"); + + // old dash masternodes coins.. + if(coind->hasmasternodes) { + if (strcmp(coind->symbol, "ALQO") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "BSD") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "BWK") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "CHC") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "CRW") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "DNR") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "FLAX") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "ITZ") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "J") == 0 || strcmp(coind->symbol2, "J") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "LAX") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "MAG") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "PBS") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "URALS") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "VSX") == 0) coind->oldmasternodes = true; + if (strcmp(coind->symbol, "XLR") == 0) coind->oldmasternodes = true; + } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + + //coind->touch = true; + if(coind->newcoind) + { + debuglog("connecting to coind %s\n", coind->symbol); + + bool b = rpc_connect(&coind->rpc); + if (!b) { + debuglog("%s: connect failure\n", coind->symbol); + object_delete(coind); + continue; + } + coind_init(coind); + + g_list_coind.AddTail(coind); + usleep(100*YAAMP_MS); + } + coind->touch = true; + coind_create_job(coind); + } + + mysql_free_result(result); + + for(CLI li = g_list_coind.first; li; li = li->next) + { + YAAMP_COIND *coind = (YAAMP_COIND *)li->data; + if(coind->deleted) continue; + + if(!coind->touch) + { + coind_terminate(coind); + continue; + } + + coind->touch = false; + } + + coind_sort(); + g_list_coind.Leave(); +} + +/////////////////////////////////////////////////////////////////////////////////////////////// + +void db_update_remotes(YAAMP_DB *db) +{ + if(!db) return; + + db_query(db, "select id, speed/1000000, host, port, username, password, time, price, renterid from jobs where active and ready and algo='%s' order by time", g_stratum_algo); + + MYSQL_RES *result = mysql_store_result(&db->mysql); + if(!result) yaamp_error("Cant query database"); + + MYSQL_ROW row; + + g_list_remote.Enter(); + while((row = mysql_fetch_row(result)) != NULL) + { + if(!row[0] || !row[1] || !row[2] || !row[3] || !row[4] || !row[5] || !row[6] || !row[7]) continue; + bool newremote = false; + + YAAMP_REMOTE *remote = (YAAMP_REMOTE *)object_find(&g_list_remote, atoi(row[0])); + if(!remote) + { + remote = new YAAMP_REMOTE; + memset(remote, 0, sizeof(YAAMP_REMOTE)); + + remote->id = atoi(row[0]); + newremote = true; + } + +// else if(remote->reset_balance) +// continue; + + else if(row[6] && atoi(row[6]) > remote->updated) + remote->status = YAAMP_REMOTE_RESET; + + remote->speed = atof(row[1]); + strcpy(remote->host, row[2]); + remote->port = atoi(row[3]); + strcpy(remote->username, row[4]); + strcpy(remote->password, row[5]); + remote->updated = atoi(row[6]); + remote->price = atof(row[7]); + remote->touch = true; + remote->submit_last = NULL; + + int renterid = row[8]? atoi(row[8]): 0; + if(renterid && !remote->renter) + remote->renter = (YAAMP_RENTER *)object_find(&g_list_renter, renterid); + + if(newremote) + { + if(remote->renter && remote->renter->balance <= 0.00001000) + { + debuglog("dont load that job %d\n", remote->id); + delete remote; + continue; + } + + pthread_t thread; + + pthread_create(&thread, NULL, remote_thread, remote); + pthread_detach(thread); + + g_list_remote.AddTail(remote); + usleep(100*YAAMP_MS); + } + + if(remote->renter) + { + if(!strcmp(g_current_algo->name, "sha256")) + remote->speed = min(remote->speed, max(remote->renter->balance/g_current_algo->rent*100000000, 1)); + else + remote->speed = min(remote->speed, max(remote->renter->balance/g_current_algo->rent*100000, 1)); + } + } + + mysql_free_result(result); + + /////////////////////////////////////////////////////////////////////////////////////////// + + for(CLI li = g_list_remote.first; li; li = li->next) + { + YAAMP_REMOTE *remote = (YAAMP_REMOTE *)li->data; +// if(remote->reset_balance && remote->renter) +// { +// db_query(db, "update renters set balance=0 where id=%d", remote->renter->id); +// db_query(db, "update jobs set ready=false, active=false where renterid=%d", remote->renter->id); +// +// remote->reset_balance = false; +// } + + if(remote->deleted) continue; + + if(remote->kill) + { + debuglog("******* kill that sucka %s\n", remote->host); + + pthread_cancel(remote->thread); + object_delete(remote); + + continue; + } + + if(remote->sock && remote->sock->last_read && remote->sock->last_read+120host); + + remote->status = YAAMP_REMOTE_TERMINATE; + remote->kill = true; + + remote_close(remote); + continue; + } + + if(!remote->touch) + { + remote->status = YAAMP_REMOTE_TERMINATE; + continue; + } + + remote->touch = false; + + if(remote->difficulty_written != remote->difficulty_actual) + { + remote->difficulty_written = remote->difficulty_actual; + db_query(db, "update jobs set difficulty=%f where id=%d", remote->difficulty_actual, remote->id); + } + } + +// remote_sort(); + g_list_remote.Leave(); +} + +void db_update_renters(YAAMP_DB *db) +{ + if(!db) return; + + db_query(db, "select id, balance, updated from renters"); + + MYSQL_RES *result = mysql_store_result(&db->mysql); + if(!result) yaamp_error("Cant query database"); + + MYSQL_ROW row; + g_list_renter.Enter(); + + while((row = mysql_fetch_row(result)) != NULL) + { + if(!row[0] || !row[1]) continue; + + YAAMP_RENTER *renter = (YAAMP_RENTER *)object_find(&g_list_renter, atoi(row[0])); + if(!renter) + { + renter = new YAAMP_RENTER; + memset(renter, 0, sizeof(YAAMP_RENTER)); + + renter->id = atoi(row[0]); + g_list_renter.AddTail(renter); + } + + if(row[1]) renter->balance = atof(row[1]); + if(row[2]) renter->updated = atoi(row[2]); + } + + mysql_free_result(result); + g_list_renter.Leave(); +} + +/////////////////////////////////////////////////////////////////////// + +static void _json_str_safe(YAAMP_DB *db, json_value *json, const char *key, size_t maxlen, char* out) +{ + json_value *val = json_get_val(json, key); + out[0] = '\0'; + if (db && val && json_is_string(val)) { + char str[128] = { 0 }; + char escaped[256] = { 0 }; + snprintf(str, sizeof(str)-1, "%s", json_string_value(val)); + str[maxlen-1] = '\0'; // truncate to dest len + clean_html(str); + mysql_real_escape_string(&db->mysql, escaped, str, strlen(str)); + snprintf(out, maxlen, "%s", escaped); + out[maxlen-1] = '\0'; + } +} +#define json_str_safe(stats, k, out) _json_str_safe(db, stats, k, sizeof(out), out) + +static int json_int_safe(json_value *json, const char *key) +{ + json_value *val = json_get_val(json, key); + return val ? (int) json_integer_value(val) : 0; +} + +static double json_double_safe(json_value *json, const char *key) +{ + json_value *val = json_get_val(json, key); + return val ? json_double_value(val) : 0.; +} + +void db_store_stats(YAAMP_DB *db, YAAMP_CLIENT *client, json_value *stats) +{ + int t = time(NULL); + json_value *algo, *val; + char sdev[80], stype[8], svid[12], sarch[8]; + char salgo[32], sclient[48], sdriver[32], sos[8]; + double khashes, intensity, throughput; + int power, freq, memf, realfreq, realmemf, plimit; + + if (!db) return; + + json_str_safe(stats, "algo", salgo); + if (strcasecmp(g_current_algo->name, salgo) && client->submit_bad) { + // debuglog("stats: wrong algo used %s != %s", salgo, g_current_algo->name); + return; + } + + json_str_safe(stats, "device", sdev); + json_str_safe(stats, "type", stype); + json_str_safe(stats, "vendorid", svid); + json_str_safe(stats, "arch", sarch); // or cpu best feature + json_str_safe(stats, "client", sclient); + json_str_safe(stats, "os", sos); + json_str_safe(stats, "driver", sdriver); // or cpu compiler + + power = json_int_safe(stats, "power"); + freq = json_int_safe(stats, "freq"); + memf = json_int_safe(stats, "memf"); + realfreq = json_int_safe(stats, "curr_freq"); + realmemf = json_int_safe(stats, "curr_memf"); + plimit = json_int_safe(stats, "plimit"); + intensity = json_double_safe(stats, "intensity"); + khashes = json_double_safe(stats, "khashes"); + throughput = json_double_safe(stats, "throughput"); + if (throughput < 0.) throughput = 0.; + if (khashes < 0. || intensity < 0.) return; + + db_query(db, "INSERT INTO benchmarks(" + "time, algo, type, device, arch, vendorid, os, driver," + "client, khps, freq, memf, realfreq, realmemf, power, plimit, " + "intensity, throughput, userid )" + "VALUES (%d,'%s','%s','%s','%s','%s','%s','%s'," + "'%s',%f,%d,%d,%d,%d,%d,%d, %.2f,%.0f,%d)", + t, g_current_algo->name, stype, sdev, sarch, svid, sos, sdriver, + sclient, khashes, freq, memf, realfreq, realmemf, power, plimit, + intensity, throughput, client->userid); +} diff --git a/stratum/user.cpp b/stratum/user.cpp index ab2806ddd..1e2ec6ce0 100644 --- a/stratum/user.cpp +++ b/stratum/user.cpp @@ -61,7 +61,7 @@ void db_add_user(YAAMP_DB *db, YAAMP_CLIENT *client) db_check_user_input(client->username); if(strlen(client->username) < MIN_ADDRESS_LEN) { // allow benchmark / test / donate usernames - if (!strcmp(client->username, "benchmark") || !strcmp(client->username, "donate") || !strcmp(client->username, "test") || !strcmp(client->username, "matrixbit")) { + if (!strcmp(client->username, "benchmark") || !strcmp(client->username, "donate") || !strcmp(client->username, "test")) { guest = true; if (g_list_coind.first) { CLI li = g_list_coind.first; diff --git a/stratum/user.cpp.bak b/stratum/user.cpp.bak new file mode 100644 index 000000000..ab2806ddd --- /dev/null +++ b/stratum/user.cpp.bak @@ -0,0 +1,214 @@ + +#include "stratum.h" + +// sql injection security, unwanted chars +void db_check_user_input(char* input) +{ + char *p = NULL; + if (input && input[0]) { + p = strpbrk(input, " \"'\\"); + if(p) *p = '\0'; + } +} + +void db_check_coin_symbol(YAAMP_DB *db, char* symbol) +{ + if (!symbol) return; + size_t len = strlen(symbol); + if (len >= 2 && len <= 12) { +#ifdef NO_EXCHANGE + db_query(db, "SELECT symbol FROM coins WHERE installed AND algo='%s' AND symbol='%s'", g_stratum_algo, symbol); +#else + db_query(db, "SELECT symbol FROM coins WHERE installed AND (symbol='%s' OR symbol2='%s')", symbol, symbol); +#endif + MYSQL_RES *result = mysql_store_result(&db->mysql); + *symbol = '\0'; + if (!result) return; + MYSQL_ROW row = mysql_fetch_row(result); + if (row) { + strcpy(symbol, row[0]); + } + mysql_free_result(result); + } else { + *symbol = '\0'; + } +} + +void db_add_user(YAAMP_DB *db, YAAMP_CLIENT *client) +{ + db_clean_string(db, client->username); + db_clean_string(db, client->password); + db_clean_string(db, client->version); + db_clean_string(db, client->notify_id); + db_clean_string(db, client->worker); + + char symbol[16] = { 0 }; + char *p = strstr(client->password, "c="); + if(!p) p = strstr(client->password, "s="); + if(p) strncpy(symbol, p+2, 15); + p = strchr(symbol, ','); + if(p) *p = '\0'; + + bool guest = false; + int gift = -1; +#ifdef ALLOW_CUSTOM_DONATIONS + // donation percent + p = strstr(client->password, "g="); + if(p) gift = atoi(p+2); + if(gift > 100) gift = 100; +#endif + + db_check_user_input(client->username); + if(strlen(client->username) < MIN_ADDRESS_LEN) { + // allow benchmark / test / donate usernames + if (!strcmp(client->username, "benchmark") || !strcmp(client->username, "donate") || !strcmp(client->username, "test") || !strcmp(client->username, "matrixbit")) { + guest = true; + if (g_list_coind.first) { + CLI li = g_list_coind.first; + YAAMP_COIND *coind = (YAAMP_COIND *)li->data; + if (!strlen(client->worker)) strcpy(client->worker, client->username); + strcpy(client->username, coind->wallet); + if (!strcmp(client->username, "benchmark")) strcat(client->password, ",stats"); + if (!strcmp(client->username, "donate")) gift = 100; + } + } + if (!guest) { + debuglog("Invalid user address '%s'\n", client->username); + return; + } + } + + // debuglog("user %s %s gives %d %\n", client->username, symbol, gift); + db_query(db, "SELECT id, is_locked, logtraffic, coinid, donation FROM accounts WHERE username='%s'", client->username); + + MYSQL_RES *result = mysql_store_result(&db->mysql); + if(!result) return; + + MYSQL_ROW row = mysql_fetch_row(result); + if(row) + { + if(row[1] && atoi(row[1])) client->userid = -1; + else client->userid = atoi(row[0]); + + client->logtraffic = row[2] && atoi(row[2]); + client->coinid = row[3] ? atoi(row[3]) : 0; + if (gift == -1) gift = row[4] ? atoi(row[4]) : 0; // keep current + } + + mysql_free_result(result); + + db_check_user_input(symbol); + db_check_coin_symbol(db, symbol); + + if (gift < 0) gift = 0; + client->donation = gift; + + if(client->userid == -1) + return; + + else if(client->userid == 0 && strlen(client->username) >= MIN_ADDRESS_LEN) + { + db_query(db, "INSERT INTO accounts (username, coinsymbol, balance, donation, hostaddr) values ('%s', '%s', 0, %d, '%s')", + client->username, symbol, gift, client->sock->ip); + client->userid = (int)mysql_insert_id(&db->mysql); + } + + else { + db_query(db, "UPDATE accounts SET coinsymbol='%s', swap_time=%u, donation=%d, hostaddr='%s' WHERE id=%d AND balance = 0" + " AND (SELECT COUNT(id) FROM payouts WHERE account_id=%d AND tx IS NULL) = 0" // failed balance + " AND (SELECT pending FROM balanceuser WHERE userid=%d ORDER by time DESC LIMIT 1) = 0" // pending balance + , symbol, (uint) time(NULL), gift, client->sock->ip, client->userid, client->userid, client->userid); + if (mysql_affected_rows(&db->mysql) > 0 && strlen(symbol)) { + debuglog("%s: %s coinsymbol set to %s ip %s uid (%d)\n", + g_current_algo->name, client->username, symbol, client->sock->ip, client->userid); + } + } +} + +////////////////////////////////////////////////////////////////////////////////////// + +void db_clear_worker(YAAMP_DB *db, YAAMP_CLIENT *client) +{ + if(!client->workerid) + return; + + db_query(db, "DELETE FROM workers WHERE id=%d", client->workerid); + client->workerid = 0; +} + +void db_add_worker(YAAMP_DB *db, YAAMP_CLIENT *client) +{ + char password[128] = { 0 }; + char version[128] = { 0 }; + char worker[128] = { 0 }; + int now = time(NULL); + + db_clear_worker(db, client); + + db_check_user_input(client->username); + db_check_user_input(client->version); + db_check_user_input(client->password); + db_check_user_input(client->worker); + + // strip for recent mysql defaults (error if fields are too long) + if (strlen(client->password) > 64) + clientlog(client, "password too long truncated: %s", client->password); + if (strlen(client->version) > 64) + clientlog(client, "version too long truncated: %s", client->version); + if (strlen(client->worker) > 64) + clientlog(client, "worker too long truncated: %s", client->worker); + + strncpy(password, client->password, 64); + strncpy(version, client->version, 64); + strncpy(worker, client->worker, 64); + + db_query(db, "INSERT INTO workers (userid, ip, name, difficulty, version, password, worker, algo, time, pid) "\ + "VALUES (%d, '%s', '%s', %f, '%s', '%s', '%s', '%s', %d, %d)", + client->userid, client->sock->ip, client->username, client->difficulty_actual, + version, password, worker, g_stratum_algo, now, getpid()); + + client->workerid = (int)mysql_insert_id(&db->mysql); +} + +void db_update_workers(YAAMP_DB *db) +{ + g_list_client.Enter(); + for(CLI li = g_list_client.first; li; li = li->next) + { + YAAMP_CLIENT *client = (YAAMP_CLIENT *)li->data; + if(client->deleted) continue; + if(!client->workerid) continue; + + if(client->speed < 0.00001) + { + clientlog(client, "speed %f", client->speed); + shutdown(client->sock->sock, SHUT_RDWR); + db_clear_worker(db, client); + object_delete(client); + continue; + } + + client->speed *= 0.8; + if(client->difficulty_written == client->difficulty_actual) continue; + + db_query(db, "UPDATE workers SET difficulty=%f, subscribe=%d WHERE id=%d", + client->difficulty_actual, client->extranonce_subscribe, client->workerid); + client->difficulty_written = client->difficulty_actual; + } + + //client_sort(); + g_list_client.Leave(); +} + +void db_init_user_coinid(YAAMP_DB *db, YAAMP_CLIENT *client) +{ + if (!client->userid) + return; + + if (!client->coinid) + db_query(db, "UPDATE accounts SET coinid=NULL WHERE id=%d", client->userid); + else + db_query(db, "UPDATE accounts SET coinid=%d WHERE id=%d AND IFNULL(coinid,0) = 0", + client->coinid, client->userid); +} + diff --git a/web/keys.sample.php b/web/keys.sample.php index b621d713d..cd9b7ca49 100644 --- a/web/keys.sample.php +++ b/web/keys.sample.php @@ -3,12 +3,11 @@ define('YIIMP_MYSQLDUMP_USER', 'root'); define('YIIMP_MYSQLDUMP_PASS', ''); +define('YIIMP_MYSQLDUMP_PATH', '/root/backup'); /* Keys required to create/cancel orders and access your balances/deposit addresses */ define('EXCH_BITTREX_SECRET', ''); define('EXCH_BITSTAMP_SECRET',''); -define('EXCH_BITZ_SECRET',''); -define('EXCH_BITZ_TRADEPWD',''); define('EXCH_BINANCE_SECRET', ''); define('EXCH_BLEUTRADE_SECRET', ''); define('EXCH_BTER_SECRET', ''); @@ -25,4 +24,4 @@ define('EXCH_POLONIEX_SECRET', ''); define('EXCH_STOCKSEXCHANGE_SECRET', ''); define('EXCH_YOBIT_SECRET', ''); -define('EXCH_ZEBITEX_SECRET', ''); + diff --git a/web/keys.sample.php.bak b/web/keys.sample.php.bak new file mode 100644 index 000000000..b621d713d --- /dev/null +++ b/web/keys.sample.php.bak @@ -0,0 +1,28 @@ +'); + +/* Keys required to create/cancel orders and access your balances/deposit addresses */ +define('EXCH_BITTREX_SECRET', ''); +define('EXCH_BITSTAMP_SECRET',''); +define('EXCH_BITZ_SECRET',''); +define('EXCH_BITZ_TRADEPWD',''); +define('EXCH_BINANCE_SECRET', ''); +define('EXCH_BLEUTRADE_SECRET', ''); +define('EXCH_BTER_SECRET', ''); +define('EXCH_CCEX_SECRET', ''); +define('EXCH_CEXIO_SECRET', ''); +define('EXCH_COINMARKETS_PASS', ''); +define('EXCH_CRYPTOPIA_SECRET', ''); +define('EXCH_EMPOEX_SECKEY', ''); +define('EXCH_HITBTC_SECRET', ''); +define('EXCH_KRAKEN_SECRET',''); +define('EXCH_KUCOIN_SECRET', ''); +define('EXCH_LIVECOIN_SECRET', ''); +define('EXCH_NOVA_SECRET',''); +define('EXCH_POLONIEX_SECRET', ''); +define('EXCH_STOCKSEXCHANGE_SECRET', ''); +define('EXCH_YOBIT_SECRET', ''); +define('EXCH_ZEBITEX_SECRET', ''); diff --git a/web/serverconfig.sample.php b/web/serverconfig.sample.php index 9bcb8c438..6dddb4835 100644 --- a/web/serverconfig.sample.php +++ b/web/serverconfig.sample.php @@ -46,9 +46,7 @@ define('EXCH_CRYPTOPIA_KEY', ''); define('EXCH_POLONIEX_KEY', ''); define('EXCH_BITTREX_KEY', ''); -define('EXCH_BITZ_KEY', ''); define('EXCH_BLEUTRADE_KEY', ''); -define('EXCH_BTER_KEY', ''); define('EXCH_YOBIT_KEY', ''); define('EXCH_CCEX_KEY', ''); define('EXCH_CEXIO_ID', ''); @@ -56,7 +54,6 @@ define('EXCH_COINMARKETS_USER', ''); define('EXCH_COINMARKETS_PIN', ''); define('EXCH_CREX24_KEY', ''); -define('EXCH_CRYPTOBRIDGE_ID', ''); define('EXCH_BINANCE_KEY', ''); define('EXCH_BITSTAMP_ID',''); define('EXCH_BITSTAMP_KEY',''); @@ -67,7 +64,6 @@ define('EXCH_NOVA_KEY', ''); define('EXCH_STOCKSEXCHANGE_KEY', ''); - // Automatic withdraw to Yaamp btc wallet if btc balance > 0.3 define('EXCH_AUTO_WITHDRAW', 0.3); @@ -98,3 +94,4 @@ $configAlgoNormCoef = array( // 'x11' => 5.0, ); + diff --git a/web/serverconfig.sample.php.bak b/web/serverconfig.sample.php.bak new file mode 100644 index 000000000..9bcb8c438 --- /dev/null +++ b/web/serverconfig.sample.php.bak @@ -0,0 +1,100 @@ + 0.3 +define('EXCH_AUTO_WITHDRAW', 0.3); + +// nicehash keys deposit account & amount to deposit at a time +define('NICEHASH_API_KEY','521c254d-8cc7-4319-83d2-ac6c604b5b49'); +define('NICEHASH_API_ID','9205'); +define('NICEHASH_DEPOSIT','3J9tapPoFCtouAZH7Th8HAPsD8aoykEHzk'); +define('NICEHASH_DEPOSIT_AMOUNT','0.01'); + + +$cold_wallet_table = array( + '1C23KmLeCaQSLLyKVykHEUse1R7jRDv9j9' => 0.10, +); + +// Sample fixed pool fees +$configFixedPoolFees = array( + 'zr5' => 2.0, + 'scrypt' => 20.0, + 'sha256' => 5.0, +); + +// Sample custom stratum ports +$configCustomPorts = array( +// 'x11' => 7000, +); + +// mBTC Coefs per algo (default is 1.0) +$configAlgoNormCoef = array( +// 'x11' => 5.0, +); diff --git a/web/yaamp/commands/CoindbCommand.php b/web/yaamp/commands/CoindbCommand.php index 920fbf3fa..619ddcd19 100644 --- a/web/yaamp/commands/CoindbCommand.php +++ b/web/yaamp/commands/CoindbCommand.php @@ -50,8 +50,7 @@ public function run($args) } elseif ($args[0] == 'icons') { - $nbUpdated = $this->grabBterIcons(); - $nbUpdated += $this->grabCcexIcons(); + $nbUpdated = $this->grabCcexIcons(); $nbUpdated += $this->grabCryptopiaIcons(); $nbUpdated += $this->grabBittrexIcons(); // can be huge ones $nbUpdated += $this->grabCoinExchangeIcons(); @@ -295,41 +294,6 @@ public function updateFromJson() return $nbUpdated; } - /** - * Icon grabber - Bter - */ - public function grabBterIcons() - { - $url = 'http://bter.com/images/coin_icon/64/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='bter' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "bter: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($symbol).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $coin->symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from bter\n"; - return $nbUpdated; - } - /** * Icon grabber - Bittrex */ @@ -530,7 +494,7 @@ public function grabAlcurexIcons() */ public function grabKuCoinIcons() { - $url = 'https://assets.kucoin.com/www/1.2.0/assets/coins/';//QLC.png + $url = 'https://assets.kucoin.com/www/coin/pc/';//GRIN.png $nbUpdated = 0; $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". "WHERE M.name='kucoin' AND IFNULL(coins.image,'') = ''"; diff --git a/web/yaamp/commands/CoindbCommand.php.bak b/web/yaamp/commands/CoindbCommand.php.bak new file mode 100644 index 000000000..920fbf3fa --- /dev/null +++ b/web/yaamp/commands/CoindbCommand.php.bak @@ -0,0 +1,598 @@ + + * yiimp coindb labels + * yiimp coindb icons + * + * + * @property string $help The command description. + * + */ +class CoindbCommand extends CConsoleCommand +{ + protected $basePath; + + /** + * Execute the action. + * @param array $args command line parameters specific for this command + * @return integer non zero application exit code after printing help + */ + public function run($args) + { + $runner=$this->getCommandRunner(); + $commands=$runner->commands; + + $root = realpath(Yii::app()->getBasePath().DIRECTORY_SEPARATOR.'..'); + $this->basePath = str_replace(DIRECTORY_SEPARATOR, '/', $root); + + if (!isset($args[0])) { + + echo "Yiimp coindb command\n"; + echo "Usage: yiimp coindb labels\n"; + echo " yiimp coindb icons\n"; + return 1; + + } elseif ($args[0] == 'labels') { + + $nbUpdated = $this->updateCryptopiaLabels(); + $nbUpdated += $this->updateCoinCapLabels(); + $nbUpdated += $this->updateLiveCoinLabels(); + $nbUpdated += $this->updateYiimpLabels("api.yiimp.eu"); + $nbUpdated += $this->updateFromJson(); + + echo "total updated: $nbUpdated\n"; + return 0; + + } elseif ($args[0] == 'icons') { + + $nbUpdated = $this->grabBterIcons(); + $nbUpdated += $this->grabCcexIcons(); + $nbUpdated += $this->grabCryptopiaIcons(); + $nbUpdated += $this->grabBittrexIcons(); // can be huge ones + $nbUpdated += $this->grabCoinExchangeIcons(); + $nbUpdated += $this->grabAlcurexIcons(); + $nbUpdated += $this->grabKuCoinIcons(); + $nbUpdated += $this->grabNovaIcons(); + + echo "total updated: $nbUpdated\n"; + return 0; + } + } + + /** + * Provides the command description. + * @return string the command description. + */ + public function getHelp() + { + return parent::getHelp().'coindb labels'; + } + + /** + * coincap.io api + */ + public static function getCoinCapData() + { + $json = file_get_contents('http://coincap.io/front'); + $data = json_decode($json,true); + $array = array(); + foreach ($data as $coin) { + $key = strtoupper($coin['short']); + if (empty($key)) continue; + $array[$key] = $coin; + } + return $array; + } + + public function updateCoinCapLabels() + { + $coins = new db_coins; + $nbUpdated = 0; + + $dataset = $coins->findAll(array( + 'condition'=>"name='unknown' OR name=symbol" + )); + + if (!empty($dataset)) + { + $json = self::getCoinCapData(); + if (empty($json)) return 0; + + foreach ($dataset as $coin) { + if ($coin->name == 'unknown' && isset($json[$coin->symbol])) { + $data = $json[$coin->symbol]; + if ($data['long'] != $coin->name) { + echo "{$coin->symbol}: {$data['long']}\n"; + $coin->name = trim($data['long']); + $nbUpdated += $coin->save(); + } + } + } + if ($nbUpdated) + echo "$nbUpdated coin labels updated from coincap.io\n"; + } + return $nbUpdated; + } + + /** + * Special for cryptopia coins + */ + protected function getCryptopiaCurrencies() + { + $array = array(); + require_once($this->basePath.'/yaamp/core/exchange/cryptopia.php'); + $data = cryptopia_api_query('GetCurrencies'); + + if (is_object($data) && !empty($data->Data)) + foreach ($data->Data as $coin) { + $key = strtoupper($coin->Symbol); + if (empty($key)) continue; + $array[$key] = $coin; + } + + return $array; + } + + public function updateCryptopiaLabels() + { + $coins = new db_coins; + $nbUpdated = 0; + + $dataset = $coins->findAll(array( + 'condition'=>"name=:u OR algo='' OR algo='scrypt'", + 'params'=>array(':u'=>'unknown') + )); + + if (!empty($dataset)) + { + $json = self::getCryptopiaCurrencies(); + + foreach ($dataset as $coin) { + if ($coin->name == 'unknown' && isset($json[$coin->symbol])) { + $cc = $json[$coin->symbol]; + if ($cc->Name != $coin->name) { + echo "{$coin->symbol}: {$cc->Name}\n"; + $coin->name = $cc->Name; + if ($cc->Algorithm != 'scrypt') + $coin->algo = strtolower($cc->Algorithm); + $nbUpdated += $coin->save(); + } + } + } + if ($nbUpdated) + echo "$nbUpdated coin labels updated from cryptopia\n"; + } + return $nbUpdated; + } + + public function updateLiveCoinLabels() + { + if (exchange_get('livecoin', 'disabled') == true) return 0; + + $coins = new db_coins; + $nbUpdated = 0; + + $dataset = $coins->findAll(array( + 'condition'=>"name='unknown' AND id IN (SELECT M.coinid FROM markets M WHERE M.name='livecoin')", + )); + + if (!empty($dataset)) + { + //echo count($dataset)." livecoin currencies without labels\n"; + $labels = array(); + $data = livecoin_api_query('info/coinInfo'); + if(objSafeVal($data,'success') !== true || !is_array($data->info)) return; + + foreach ($data->info as $c) { + $symbol = objSafeVal($c,'symbol',''); + $labels[$symbol] = objSafeVal($c,'name','unknown'); + } + + foreach ($dataset as $coin) { + if ($coin->name == 'unknown' && isset($labels[$coin->symbol])) { + $label = $labels[$coin->symbol]; + if ($label != $coin->name) { + echo "{$coin->symbol}: {$label}\n"; + $coin->name = $label; + $nbUpdated += $coin->save(); + } + } + } + if ($nbUpdated) + echo "$nbUpdated coin labels updated from livecoin coininfo\n"; + } + return $nbUpdated; + } + + public function updateYiimpLabels($pool) + { + $coins = new db_coins; + $nbUpdated = 0; $nbAlgos = 0; + + $dataset = $coins->findAll(array( + 'condition'=>"name=:u OR algo='' OR algo='scrypt'", + 'params'=>array(':u'=>'unknown') + )); + + if (!empty($dataset)) + { + $url = "http://{$pool}/api/currencies"; + $data = @ file_get_contents($url); + if (empty($data)) return 0; + $json = json_decode($data, true); + + if (!empty($json)) + foreach ($dataset as $coin) { + if (!isset($json[$coin->symbol])) continue; + $cc = $json[$coin->symbol]; + if ($coin->name == 'unknown') { + echo "{$coin->symbol}: {$cc['name']}\n"; + $coin->name = $cc['name']; + $nbUpdated += $coin->save(); + } + if (empty($cc['algo'])) continue; + if (empty($coin->algo) || $coin->algo != $cc['algo']) { + $coin->algo = strtolower($cc['algo']); + echo "{$coin->symbol}: algo set to {$cc['algo']}\n"; + $nbAlgos += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated labels and $nbAlgos algos updated from $pool\n"; + } + return $nbUpdated; + } + + /** + * To import from a json file placed in the sql/ folder + */ + public function updateFromJson() + { + $sqlFolder = $this->basePath.'/../sql/'; + $jsonFile = $sqlFolder.'labels.json'; + //$jsonFile = $sqlFolder.'yobit.txt'; + if (!file_exists($jsonFile)) + return 0; + + $nbUpdated = 0; + + $json = json_decode(file_get_contents($jsonFile), true); + /* + $json = array(); + $txt = explode("\n", file_get_contents($jsonFile)); + foreach ($txt as $line) + { + $cells = explode("\t", $line); + if (count($cells) < 2) continue; + $json[$cells[0]] = $cells[1]; + } + */ + if (!empty($json)) + { + $coins = new db_coins; + $dataset = $coins->findAll(array( + 'condition'=>"name=:u", + 'params'=>array(':u'=>'unknown') + )); + + if (!empty($dataset)) + foreach ($dataset as $coin) { + if (isset($json[$coin->symbol])) { + $name = $json[$coin->symbol]; + echo "{$coin->symbol}: {$name}\n"; + $coin->name = $name; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated coin labels updated from labels.json file\n"; + } + return $nbUpdated; + } + + /** + * Icon grabber - Bter + */ + public function grabBterIcons() + { + $url = 'http://bter.com/images/coin_icon/64/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='bter' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) + return 0; + echo "bter: try to download new icons...\n"; + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath."/images/coin-{$symbol}.png"; + try { + $data = @ file_get_contents($url.strtolower($symbol).'.png'); + } catch (Exception $e) { + continue; + } + if (strlen($data) < 2048) continue; + echo $coin->symbol." icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated icons downloaded from bter\n"; + return $nbUpdated; + } + + /** + * Icon grabber - Bittrex + */ + public function grabBittrexIcons() + { + $nbUpdated = 0; + $markets = bittrex_api_query('public/getmarkets'); + if (!is_object($markets) || !is_object($markets->result)) { + echo "bittrex api error\n"; + return $nbUpdated; + } + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='bittrex' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) + return $nbUpdated; + echo "bittrex: try to download new icons...\n"; + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath."/images/coin-{$symbol}.png"; + $url = ''; + foreach ($markets->result as $m) { + if ($m->MarketCurrency == $symbol) { + $url = $m->LogoUrl; + break; + } + } + if (empty($url)) continue; + try { + $data = @ file_get_contents($url); + } catch (Exception $e) { + continue; + } + if (strlen($data) < 2048) continue; + file_put_contents($local, $data); + $size = filesize($local); + if ($size > 0) { + if ($size > 100*1024) { + echo "warning: $symbol icon is huge, ".round($size/1024,1)." KB ($url)\n"; + unlink($local); + } else { + echo $symbol." icon found\n"; + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + } + if ($nbUpdated) + echo "$nbUpdated icons downloaded from bittrex\n"; + return $nbUpdated; + } + + /** + * Icon grabber - Ccex + */ + public function grabCcexIcons() + { + $url = 'http://c-cex.com/i/l/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='c-cex' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) + return 0; + echo "c-cex: try to download new icons...\n"; + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath."/images/coin-{$symbol}.png"; + try { + $data = @ file_get_contents($url.strtolower($symbol).'.png'); + } catch (Exception $e) { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol." icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated icons downloaded from c-cex\n"; + return $nbUpdated; + } + + /** + * Icon grabber - Cryptopia (slow https) + */ + public function grabCryptopiaIcons() + { + $url = 'https://www.cryptopia.co.nz/Content/Images/Coins/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". + "WHERE M.name='cryptopia' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) + return 0; + echo "cryptopia: try to download new icons...\n"; + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath."/images/coin-{$symbol}.png"; + try { + $data = @ file_get_contents($url.strtolower($symbol).'-medium.png'); + } catch (Exception $e) { + continue; + } + if (strlen($data) < 3000 || strstr($data, ' 0) { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated icons downloaded from cryptopia\n"; + return $nbUpdated; + } + + /** + * Icon grabber - CoinExchange + */ + public function grabCoinExchangeIcons() + { + $url = 'https://www.coinexchange.io/assets/currencies/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". + "WHERE M.name='coinexchange' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) + return 0; + echo "coinexchange: try to download new icons...\n"; + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath."/images/coin-{$symbol}.png"; + try { + $data = @ file_get_contents($url.strtolower($coin->name).'.png'); + } catch (Exception $e) { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol." icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated icons downloaded from coinexchange\n"; + return $nbUpdated; + } + + /** + * Icon grabber - Alcurex + */ + public function grabAlcurexIcons() + { + $url = 'https://alcurex.com/CSS/img/coins/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". + "WHERE M.name='alcurex' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) + return 0; + echo "alcurex: try to download new icons...\n"; + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->getOfficialSymbol(); + $local = $this->basePath."/images/coin-{$symbol}.png"; + try { + $data = @ file_get_contents($url.strtoupper($symbol).'.png'); + } catch (Exception $e) { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol." icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated icons downloaded from alcurex\n"; + return $nbUpdated; + } + + /** + * Icon grabber - KuCoin + */ + public function grabKuCoinIcons() + { + $url = 'https://assets.kucoin.com/www/1.2.0/assets/coins/';//QLC.png + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". + "WHERE M.name='kucoin' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) + return 0; + echo "kucoin: try to download new icons...\n"; + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->getOfficialSymbol(); + $local = $this->basePath."/images/coin-{$symbol}.png"; + try { + $data = @ file_get_contents($url.$symbol.'.png'); + } catch (Exception $e) { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol." icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated icons downloaded from kucoin\n"; + return $nbUpdated; + } + + /** + * Icon grabber - NovaExchange + */ + public function grabNovaIcons() + { + $url = 'http://novaexchange.com/static/symbols/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". + "WHERE M.name='nova' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) + return 0; + echo "nova: try to download new icons...\n"; + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->getOfficialSymbol(); + $local = $this->basePath."/images/coin-{$symbol}.png"; + try { + $data = @ file_get_contents($url.strtolower($symbol).'.png'); + } catch (Exception $e) { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol." icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) + echo "$nbUpdated icons downloaded from novaexchange\n"; + return $nbUpdated; + } + +} diff --git a/web/yaamp/commands/ExchangeCommand.php b/web/yaamp/commands/ExchangeCommand.php index f7f92adf5..e6599170e 100644 --- a/web/yaamp/commands/ExchangeCommand.php +++ b/web/yaamp/commands/ExchangeCommand.php @@ -147,23 +147,12 @@ public function testApiKeys() if (!is_object($balance)) echo "bittrex error\n"; else echo("bittrex btc: ".json_encode($balance->result)."\n"); } - if (!empty(EXCH_BITZ_KEY) && !empty(EXCH_BITZ_SECRET)) { - $bitz = new bitz(); - $balance = json_decode($bitz->getUserAssets())->data; - if (!is_object($balance)) echo "bitz error\n"; - else echo("bitz btc_total: ".json_encode($balance)."\n"); - } if (!empty(EXCH_BLEUTRADE_KEY)) { $balance = bleutrade_api_query('account/getbalances','¤cies=BTC'); //$balance = bleutrade_api_query('account/getbalances'); if (!is_object($balance)) echo "bleutrade error\n"; else echo("bleutrade btc: ".json_encode($balance->result)."\n"); } - if (!empty(EXCH_BTER_KEY)) { - $info = bter_api_user('getfunds'); - if (!$info || arraySafeVal($info,'result') != 'true' || !isset($info['available_funds'])) echo "bter error\n"; - else echo("bter available: ".json_encode($info['available_funds'])."\n"); - } if (!empty(EXCH_CCEX_KEY)) { $ccex = new CcexAPI; $balances = $ccex->getBalances(); diff --git a/web/yaamp/commands/ExchangeCommand.php.bak b/web/yaamp/commands/ExchangeCommand.php.bak new file mode 100644 index 000000000..f7f92adf5 --- /dev/null +++ b/web/yaamp/commands/ExchangeCommand.php.bak @@ -0,0 +1,242 @@ + + * php web/yaamp/yiic.php exchange test + * + * + * @property string $help The command description. + * + */ +class ExchangeCommand extends CConsoleCommand +{ + protected $basePath; + + /** + * Execute the action. + * @param array $args command line parameters specific for this command + * @return integer non zero application exit code after printing help + */ + public function run($args) + { + $runner=$this->getCommandRunner(); + $commands=$runner->commands; + + $root = realpath(Yii::app()->getBasePath().DIRECTORY_SEPARATOR.'..'); + $this->basePath = str_replace(DIRECTORY_SEPARATOR, '/', $root); + + if (!isset($args[0]) || $args[0] == 'help') { + + echo "Yiimp exchange command\n"; + echo "Usage: yiimp exchange apitest\n"; + echo " yiimp exchange get \n"; + echo " yiimp exchange set \n"; + echo " yiimp exchange unset \n"; + echo " yiimp exchange settings \n"; + return 1; + + } else if ($args[0] == 'get') { + return $this->getExchangeSetting($args); + + } else if ($args[0] == 'set') { + return $this->setExchangeSetting($args); + + } else if ($args[0] == 'unset') { + return $this->unsetExchangeSetting($args); + + } else if ($args[0] == 'settings') { + return $this->listExchangeSettings($args); + + } else if ($args[0] == 'apitest') { + $this->testApiKeys(); + return 0; + } + } + + /** + * Provides the command description. + * @return string the command description. + */ + public function getHelp() + { + return $this->run(array('help')); + } + + public function getExchangeSetting($args) + { + if (count($args) < 3) + die("usage: yiimp exchange get \n"); + $exchange = $args[1]; + $key = $args[2]; + $value = exchange_get($exchange, $key); + echo "$value\n"; + return 0; + } + + public function setExchangeSetting($args) + { + if (count($args) < 4) + die("usage: yiimp exchange set \n"); + $exchange = $args[1]; + $key = $args[2]; + $value = $args[3]; + $keys = exchange_valid_keys($exchange); + if (!isset($keys[$key])) { + echo "error: key '$key' is not handled!\n"; + return 1; + } + $res = exchange_set($exchange, $key, $value); + $val = exchange_get($exchange, $key); + echo ($res ? "$exchange $key ".json_encode($val) : "error") . "\n"; + return 0; + } + + public function unsetExchangeSetting($args) + { + if (count($args) < 3) + die("usage: yiimp exchange unset \n"); + $exchange = $args[1]; + $key = $args[2]; + exchange_unset($exchange, $key); + echo "ok\n"; + return 0; + } + + public function listExchangeSettings($args) + { + if (count($args) < 2) + die("usage: yiimp exchange settings \n"); + $exchange = $args[1]; + $keys = exchange_valid_keys($exchange); + foreach ($keys as $key => $desc) { + $val = exchange_get($exchange, $key); + if ($val !== null) { + //echo "$desc\n"; + echo "$exchange $key ".json_encode($val)."\n"; + } + } + return 0; + } + + public function testApiKeys() + { + if (!empty(EXCH_BINANCE_KEY)) { + $balance = binance_api_user('account'); + if (!is_object($balance)) echo "binance error ".json_encode($balance)."\n"; + else { + $assets = $balance->balances; + foreach ($assets as $asset) { + if ($asset->asset == 'BTC') echo("binance: ".json_encode($asset)."\n"); + } + } + } + if (!empty(EXCH_BITSTAMP_KEY)) { + $balance = bitstamp_api_user('balance'); + if (!is_array($balance)) echo "bitstamp error ".json_encode($balance)."\n"; + else echo("bitstamp: ".json_encode($balance)."\n"); + } + if (!empty(EXCH_CEXIO_KEY)) { + $balance = cexio_api_user('balance'); + if (!is_array($balance)) echo "cexio error ".json_encode($balance)."\n"; + else echo("cexio: ".json_encode(arraySafeVal($balance,"BTC",$balance))."\n"); + } + if (!empty(EXCH_BITTREX_KEY)) { + $balance = bittrex_api_query('account/getbalance','¤cy=BTC'); + if (!is_object($balance)) echo "bittrex error\n"; + else echo("bittrex btc: ".json_encode($balance->result)."\n"); + } + if (!empty(EXCH_BITZ_KEY) && !empty(EXCH_BITZ_SECRET)) { + $bitz = new bitz(); + $balance = json_decode($bitz->getUserAssets())->data; + if (!is_object($balance)) echo "bitz error\n"; + else echo("bitz btc_total: ".json_encode($balance)."\n"); + } + if (!empty(EXCH_BLEUTRADE_KEY)) { + $balance = bleutrade_api_query('account/getbalances','¤cies=BTC'); + //$balance = bleutrade_api_query('account/getbalances'); + if (!is_object($balance)) echo "bleutrade error\n"; + else echo("bleutrade btc: ".json_encode($balance->result)."\n"); + } + if (!empty(EXCH_BTER_KEY)) { + $info = bter_api_user('getfunds'); + if (!$info || arraySafeVal($info,'result') != 'true' || !isset($info['available_funds'])) echo "bter error\n"; + else echo("bter available: ".json_encode($info['available_funds'])."\n"); + } + if (!empty(EXCH_CCEX_KEY)) { + $ccex = new CcexAPI; + $balances = $ccex->getBalances(); + if(!$balances || !isset($balances['result'])) { + // older api + $balances = $ccex->getBalance(); + if(!$balances || !isset($balances['return'])) echo "error\n"; + else echo("c-cex btc: ".json_encode($balances['return'][1])."\n"); + } + else echo("c-cex btc: ".json_encode($balances['result'][1])."\n"); + } + if (!empty(EXCH_COINMARKETS_USER)) { + $balances = coinsmarkets_api_user('gettradinginfo'); + if (!is_array($balances)) echo "coinsmarkets error ".json_encode($balances)."\n"; + else echo("coinsmarkets: ".json_encode($balances['return'])."\n"); + } + if (!empty(EXCH_CREX24_KEY)) { + $balance = crex24_api_user('account/balance',array('currency'=>'BTC')); + if (!is_array($balance)) echo "crex24 error ".json_encode($balance)."\n"; + else echo("crex24: ".json_encode($balance)."\n"); + } + if (!empty(EXCH_CRYPTOPIA_KEY)) { + $balance = cryptopia_api_user('GetBalance',array("Currency"=>"BTC")); + if (!is_object($balance)) echo("cryptopia error ".json_encode($balance)."\n"); + else echo("cryptopia btc: ".json_encode($balance->Data)."\n"); + } + if (!empty(EXCH_HITBTC_KEY)) { + $data = hitbtc_api_user('trading/balance'); + if (!is_object($data) || !isset($data->balance)) echo("hitbtc error ".json_encode($data)."\n"); + else foreach ($data->balance as $balance) { + if (objSafeVal($balance,'currency_code') == 'BTC') + echo("hitbtc btc: ".json_encode($balance)."\n"); + } + } + if (!empty(EXCH_KRAKEN_KEY)) { + $balance = kraken_api_user('Balance'); + echo("kraken btc: ".json_encode($balance)."\n"); + } + if (!empty(EXCH_KUCOIN_KEY) && !empty(EXCH_KUCOIN_PASSPHRASE)) { + $balance = kucoin_api_user('accounts',array('currency'=>'BTC')); + if (!is_object($balance) || !isset($balance->data)) echo "kucoin error ".json_encode($balance)."\n"; + else echo("kucoin: ".json_encode($balance->data)."\n"); + } + if (!empty(EXCH_LIVECOIN_KEY)) { + $livecoin = new LiveCoinApi; + $balance = $livecoin->getBalances('BTC'); + if (!$balance) echo("livecoin error\n"); + else echo("livecoin btc: ".json_encode($balance)."\n"); + // {"type":"available","currency":"BTC","value":0} + } + if (!empty(EXCH_NOVA_KEY)) { + $info = nova_api_user('getbalances'); + if (objSafeVal($info,'status','') != 'success' || !is_array($info->balances)) echo "nova error\n"; + else echo("nova btc: ".json_encode($info->balances[0])."\n"); + } + if(!empty(EXCH_POLONIEX_KEY)) { + $poloniex = new poloniex; + $balance = $poloniex->get_available_balances(); + echo("poloniex available : ".json_encode($balance)."\n"); + } + if (!empty(EXCH_STOCKSEXCHANGE_KEY)) { + // $info = stocksexchange_api_user('Deposit',array("currency"=>"BTC")); + $info = stocksexchange_api_user('GetInfo'); + if (!is_array($info) || arraySafeVal($info,'success') != 1) echo "stocksexchange error ".json_encode($info)."\n"; + else echo("stocksexchange: ".json_encode($info['data']['funds'])."\n"); + } + if (!empty(EXCH_YOBIT_KEY)) { + $info = yobit_api_query2('getInfo'); + if (!arraySafeVal($info,'success',0) || !is_array($info['return'])) echo "error\n"; + else echo("yobit btc: ".json_encode($info['return']['funds']['btc'])."\n"); + } + // only one secret key + $balance = empoex_api_user('account/balance','BTC'); + if ($balance) echo("empoex btc: ".json_encode($balance['available'])."\n"); + } +} diff --git a/web/yaamp/core/backend/markets.php b/web/yaamp/core/backend/markets.php index b7d6266c0..0370d2c53 100644 --- a/web/yaamp/core/backend/markets.php +++ b/web/yaamp/core/backend/markets.php @@ -6,11 +6,9 @@ function BackendPricesUpdate() market_set_default('c-cex', 'DCR', 'disabled', true); // no deposit market_set_default('yobit', 'DCR', 'disabled', true); // no withdraw - market_set_default('bter', 'SFR', 'disabled', true); settings_prefetch_all(); - updateBitfinexMarkets(); updateBittrexMarkets(); updateBitzMarkets(); updatePoloniexMarkets(); @@ -29,7 +27,6 @@ function BackendPricesUpdate() updateYobitMarkets(); updateAlcurexMarkets(); updateBinanceMarkets(); - updateBterMarkets(); //updateEmpoexMarkets(); updateJubiMarkets(); updateLiveCoinMarkets(); @@ -294,61 +291,6 @@ function updateBleutradeMarkets() ///////////////////////////////////////////////////////////////////////////////////////////// -function updateBitfinexMarkets() -{ - $exchange = 'bitfinex'; - if (exchange_get($exchange, 'disabled')) return; - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $count=0; - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - if (!($coin->installed || $coin->watch)) continue; - $symbol = $coin->getOfficialSymbol(); - $pair = strtolower($symbol).'btc'; - - $ticker = bitfinex_api_query('pubticker', $pair); - - $count++; - if ($count > 10) {sleep(10);$count=0;} // Rate limiting https://docs.bitfinex.com/docs/rest-general - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $pair = strtolower($symbol.$market->base_coin); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - -// if ($market->disabled < 9) { -// $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); -// $market->disabled = ($ticker->bid < $ticker->ask/2) && ($nbm > 1); -// } - - $price2 = ($ticker->bid+$ticker->ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->pricetime = time(); // $ticker->timestamp "2018-08-31T12:48:56Z" - $market->save(); - - if (empty($coin->price) && $ticker->ask) { - $coin->price = $market->price; - $coin->price2 = $price2; - $coin->save(); - } - //debuglog("$exchange: $pair price updated to {$market->price}"); - } -} - - ///////////////////////////////////////////////////////////////////////////////////////////// - function updateBitzMarkets($force = false) { $exchange = 'bitz'; @@ -1486,49 +1428,6 @@ function updateBinanceMarkets() } } -function updateBterMarkets() -{ - $exchange = 'bter'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = bter_api_query('tickers'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $dbpair = strtolower($symbol).'_btc'; - foreach ($markets as $pair => $ticker) { - if ($pair != $dbpair) continue; - - $market->price = AverageIncrement($market->price, $ticker['buy']); - $market->price2 = AverageIncrement($market->price2, $ticker['avg']); - $market->pricetime = time(); - if ($market->disabled < 9) $market->disabled = (floatval($ticker['vol_btc']) < 0.01); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } - } -} - function updateEmpoexMarkets() { $exchange = 'empoex'; @@ -1583,13 +1482,14 @@ function updateKuCoinMarkets() $list = getdbolist('db_markets', "name LIKE '$exchange%'"); if (empty($list)) return; - $markets = kucoin_api_query('open/symbols','market=BTC'); - if(!kucoin_result_valid($markets) || empty($markets->data)) return; + $symbols = kucoin_api_query('symbols','market=BTC'); + if(!kucoin_result_valid($symbols) || empty($symbols->data)) return; - $coininfo = NULL; //kucoin_api_query('market/open/coins'); - if(!kucoin_result_valid($coininfo) || empty($coininfo->data)) { - $coininfo = NULL; - } + usleep(500); + $markets = kucoin_api_query('market/allTickers'); + if(!kucoin_result_valid($markets) || empty($markets->data)) return; + if(!isset($markets->data->ticker) || !is_array($markets->data->ticker)) return; + $tickers = $markets->data->ticker; foreach($list as $market) { @@ -1606,19 +1506,25 @@ function updateKuCoinMarkets() $pair = strtoupper($symbol).'-BTC'; - foreach ($markets->data as $ticker) { + $enableTrading = false; + foreach ($symbols->data as $sym) { + if (objSafeVal($sym,'symbol') != $pair) continue; + $enableTrading = objSafeVal($sym,'enableTrading',false); + break; + } + + if ($market->disabled == $enableTrading) { + $market->disabled = (int) (!$enableTrading); + $market->save(); + if ($market->disabled) continue; + } + + foreach ($tickers as $ticker) { if ($ticker->symbol != $pair) continue; if (objSafeVal($ticker,'buy',-1) == -1) continue; $market->price = AverageIncrement($market->price, $ticker->buy); $market->price2 = AverageIncrement($market->price2, objSafeVal($ticker,'sell',$ticker->buy)); - if (!empty($coininfo)) foreach ($coininfo->data as $info) { - if ($info->coin == $symbol) { - //todo: $market->withdrawfee = $info->withdrawMinFee; - break; - } - } - $market->txfee = $ticker->feeRate * 100; // is 0.1% for trades (0.001) $market->priority = -1; $market->pricetime = time(); diff --git a/web/yaamp/core/backend/markets.php.bak b/web/yaamp/core/backend/markets.php.bak new file mode 100644 index 000000000..b7d6266c0 --- /dev/null +++ b/web/yaamp/core/backend/markets.php.bak @@ -0,0 +1,2016 @@ +symbol2'"); + if(!$coin) continue; + + $list = getdbolist('db_markets', "coinid=$coin->id"); + foreach($list as $market) + { + $market2 = getdbosql('db_markets', "coinid=$coin2->id and name='$market->name'"); + if(!$market2) continue; + + $market2->price = $market->price; + $market2->price2 = $market->price2; + $market2->deposit_address = $market->deposit_address; + $market2->pricetime = $market->pricetime; + + $market2->save(); + } + } + + $coins = getdbolist('db_coins', "installed and id in (select distinct coinid from markets)"); + foreach($coins as $coin) + { + if($coin->symbol=='BTC') { + $coin->price = 1; + $coin->price2 = 1; + $coin->save(); + continue; + } + + $market = getBestMarket($coin); + if($market) + { + $coin->price = $market->price*(1-YAAMP_FEES_EXCHANGE/100); + $coin->price2 = $market->price2; + + $base_coin = !empty($market->base_coin)? getdbosql('db_coins', "symbol='{$market->base_coin}'"): null; + if($base_coin) + { + $coin->price *= $base_coin->price; + $coin->price2 *= $base_coin->price; + } + } + else { + $coin->price = 0; + $coin->price2 = 0; + } + + $coin->save(); + dborun("UPDATE earnings SET price={$coin->price} WHERE status!=2 AND coinid={$coin->id}"); + dborun("UPDATE markets SET message=NULL WHERE disabled=0 AND message='disabled from settings'"); + } +} + +function BackendWatchMarkets($marketname=NULL) +{ + // temporary to fill new coin 'watch' field + if (defined('YIIMP_WATCH_CURRENCIES')) { + $watched = explode(',', YIIMP_WATCH_CURRENCIES); + foreach ($watched as $symbol) { + dborun("UPDATE coins SET watch=1 WHERE symbol=:sym", array(':sym'=>$symbol)); + } + } + + $coins = new db_coins; + $coins = $coins->findAllByAttributes(array('watch'=>1)); + foreach ($coins as $coin) + { + // track btc/usd for history analysis + if ($coin->symbol == 'BTC') { + if ($marketname) continue; + $mh = new db_market_history; + $mh->time = time(); + $mh->idcoin = $coin->id; + $mh->idmarket = NULL; + $mh->price = dboscalar("SELECT usdbtc FROM mining LIMIT 1"); + if (YIIMP_FIAT_ALTERNATIVE == 'EUR') + $mh->price2 = kraken_btceur(); + $mh->balance = dboscalar("SELECT SUM(balance) AS btc FROM balances"); + $mh->save(); + continue; + } else if ($coin->installed) { + // "yiimp" prices and balance history + $mh = new db_market_history; + $mh->time = time(); + $mh->idcoin = $coin->id; + $mh->idmarket = NULL; + $mh->price = $coin->price; + $mh->price2 = $coin->price2; + $mh->balance = $coin->balance; + $mh->save(); + } + + if ($coin->rpcencoding == 'DCR') { + // hack to store the locked balance history as a "stake" market + $remote = new WalletRPC($coin); + $stake = 0.; //(double) $remote->getbalance('*',0,'locked'); + $balances = $remote->getbalance('*',0); + if (isset($balances["balances"])) { + foreach ($balances["balances"] as $accb) { + $stake += (double) arraySafeVal($accb, 'lockedbytickets', 0); + } + } + $info = $remote->getstakeinfo(); + if (empty($remote->error) && isset($info['difficulty'])) + dborun("UPDATE markets SET balance=0, ontrade=:stake, balancetime=:time, + price=:ticketprice, price2=:live, pricetime=NULL WHERE coinid=:id AND name='stake'", array( + ':ticketprice'=>$info['difficulty'], ':live'=>$info['live'], ':stake'=>$stake, + ':id'=>$coin->id, ':time'=>time() + )); + } + + // user watched currencies + $markets = getdbolist('db_markets', "coinid={$coin->id} AND NOT disabled"); + foreach($markets as $market) { + if ($marketname && $market->name != $marketname) continue; + if (!empty($market->base_coin)) continue; // todo ? + if (empty($market->price)) continue; + $mh = new db_market_history; + $mh->time = time(); // max(intval($market->balancetime), intval($market->pricetime)); + $mh->idcoin = $coin->id; + $mh->idmarket = $market->id; + $mh->price = $market->price; + $mh->price2 = $market->price2; + $mh->balance = (double) ($market->balance) + (double) ($market->ontrade); + $mh->save(); + } + } +} + +function getBestMarket($coin) +{ + $market = NULL; + if ($coin->symbol == 'BTC') + return NULL; + + if (!empty($coin->symbol2)) { + $alt = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$coin->symbol2)); + if ($alt && $alt->symbol2 != $coin->symbol2) + return getBestMarket($alt); + } + + if (!empty($coin->market)) { + // get coin market first (if set) + if ($coin->market != 'BEST' && $coin->market != 'unknown') + $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND + NOT disabled AND IFNULL(deposit_address,'') != '' AND name=:name", + array(':name'=>$coin->market)); + else + // else take one of the big exchanges... + $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND + NOT disabled AND IFNULL(deposit_address,'') != '' AND + name IN ('poloniex','bittrex') ORDER BY priority DESC, price DESC"); + } + + if(!$market) { + $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND + NOT disabled AND IFNULL(deposit_address,'') != '' ORDER BY priority DESC, price DESC"); + } + + if (!$market && empty($coin->market)) { + debuglog("best market for {$coin->symbol} is unknown"); + $coin->market = 'unknown'; + $coin->save(); + } + + return $market; +} + +function AverageIncrement($value1, $value2) +{ + $percent = 80; + $value = ($value1*(100-$percent) + $value2*$percent) / 100; + + return $value; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +function updateBleutradeMarkets() +{ + $exchange = 'bleutrade'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = bleutrade_api_query('public/getcurrencies'); + if(!is_object($list)) return; + + foreach($list->result as $currency) + { + // debuglog($currency); + if($currency->Currency == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol='{$currency->Currency}'"); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} and name='$exchange'"); + if(!$market) continue; + + $market->txfee = $currency->TxFee; + if($market->disabled < 9) $market->disabled = !$currency->IsActive; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $market->save(); + + if($market->disabled) continue; + + sleep(1); + $pair = "{$symbol}_BTC"; + $ticker = bleutrade_api_query('public/getticker', '&market='.$pair); + if(!$ticker || !$ticker->success || !$ticker->result) continue; + + $price2 = ($ticker->result[0]->Bid+$ticker->result[0]->Ask)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->result[0]->Bid); + $market->pricetime = time(); + + if(!empty(EXCH_BLEUTRADE_KEY)) + { + $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); + if(empty($market->deposit_address) && !$last_checked) + { + sleep(1); + $address = bleutrade_api_query('account/getdepositaddress', '¤cy='.$symbol); + if(is_object($address) && is_object($address->result)) { + $addr = $address->result->Address; + if (!empty($addr) && $addr != $market->deposit_address) { + $market->deposit_address = $addr; + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + } + } + } + cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); + } + + $market->save(); + +// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); + } + +} + + ///////////////////////////////////////////////////////////////////////////////////////////// + +function updateBitfinexMarkets() +{ + $exchange = 'bitfinex'; + if (exchange_get($exchange, 'disabled')) return; + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $count=0; + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + if (!($coin->installed || $coin->watch)) continue; + $symbol = $coin->getOfficialSymbol(); + $pair = strtolower($symbol).'btc'; + + $ticker = bitfinex_api_query('pubticker', $pair); + + $count++; + if ($count > 10) {sleep(10);$count=0;} // Rate limiting https://docs.bitfinex.com/docs/rest-general + + $sqlFilter = ''; + if (!empty($market->base_coin)) { + $pair = strtolower($symbol.$market->base_coin); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + +// if ($market->disabled < 9) { +// $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); +// $market->disabled = ($ticker->bid < $ticker->ask/2) && ($nbm > 1); +// } + + $price2 = ($ticker->bid+$ticker->ask)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->pricetime = time(); // $ticker->timestamp "2018-08-31T12:48:56Z" + $market->save(); + + if (empty($coin->price) && $ticker->ask) { + $coin->price = $market->price; + $coin->price2 = $price2; + $coin->save(); + } + //debuglog("$exchange: $pair price updated to {$market->price}"); + } +} + + ///////////////////////////////////////////////////////////////////////////////////////////// + +function updateBitzMarkets($force = false) +{ + $exchange = 'bitz'; + if (exchange_get($exchange, 'disabled')) return; + + $markets = bitz_api_query('tickerall'); + + foreach($markets as $c => $ticker) + { + $pairs = explode('_', $c); + $symbol = strtoupper(reset($pairs)); $base = end($pairs); + if($symbol == 'BTC' || $base != 'btc') continue; + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + $coin = getdbosql('db_coins', "symbol='{$symbol}'"); + if(!$coin) continue; + if(!$coin->installed && !$coin->watch) continue; + $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); + + if(!$market) continue; + $price2 = ($ticker->bidPrice + $ticker->askPrice)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bidPrice); + $market->pricetime = time(); + $market->priority = -1; + $market->txfee = 0.2; // trade pct + $market->save(); + // debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); + } +} + +///////////////////////////////////////////////////////////////////////////////////////////// + +function updateCryptoBridgeMarkets($force = false) +{ + $exchange = 'cryptobridge'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $result = cryptobridge_api_query('ticker'); + if(!is_array($result)) return; + + foreach($result as $ticker) + { + if (is_null(objSafeVal($ticker,'id'))) continue; + $pairs = explode('_', $ticker->id); + $symbol = reset($pairs); $base = end($pairs); + if($symbol == 'BTC' || $base != 'BTC') continue; + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $coin = getdbosql('db_coins', "symbol='{$symbol}'"); + if(!$coin) continue; + if(!$coin->installed && !$coin->watch) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); + if(!$market) continue; + + $price2 = ($ticker->bid + $ticker->ask)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->pricetime = time(); + $market->priority = -1; + $market->txfee = 0.2; // trade pct + $market->save(); + + //debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); + } +} + +function updateEscoDexMarkets($force = false) +{ + $exchange = 'escodex'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + $result = escodex_api_query('ticker'); + if(!is_array($result)) return; + foreach($result as $ticker) + { + if (is_null(objSafeVal($ticker,'id'))) continue; + #$pairs = explode('_', $ticker->id); + $symbol = $ticker->quote; $base = $ticker->base; + if($symbol == 'BTC' || $base != 'BTC') continue; + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $coin = getdbosql('db_coins', "symbol='{$symbol}'"); + if(!$coin) continue; + if(!$coin->installed && !$coin->watch) continue; + $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); + if(!$market) continue; + + $price2 = ($ticker->highest_bid + $ticker->lowest_ask)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->highest_bid); + $market->pricetime = time(); + $market->priority = -1; + $market->txfee = 0.2; // trade pct + $market->save(); + //debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); + if ((empty($coin->price))||(empty($coin->price2))) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->market = $exchange; + $coin->save(); + } + } +} + +///////////////////////////////////////////////////////////////////////////////////////////// + +function updateGateioMarkets($force = false) +{ + $exchange = 'gateio'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = gateio_api_query('tickers'); + if(!is_array($markets)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $dbpair = strtolower($symbol).'_btc'; + foreach ($markets as $pair => $ticker) { + if ($pair != $dbpair) continue; + $price2 = (doubleval($ticker['highestBid']) + doubleval($ticker['lowestAsk'])) / 2; + $market->price = AverageIncrement($market->price, doubleval($ticker['highestBid'])); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); + $market->priority = -1; + $market->txfee = 0.2; // trade pct + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->market = $exchange; + $coin->save(); + } + } + } +} + +///////////////////////////////////////////////////////////////////////////////////////////// + +function updateGraviexMarkets($force = false) +{ + $exchange = 'graviex'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = graviex_api_query('tickers'); + if(!is_array($markets)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $symbol = strtolower($symbol); + $dbpair = $symbol.'btc'; + foreach ($markets as $pair => $ticker) { + if ($pair != $dbpair) continue; + $price2 = ($ticker['ticker']['buy']+$ticker['ticker']['sell'])/2; + $market->price = AverageIncrement($market->price, $ticker['ticker']['buy']); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->market = $exchange; + $coin->save(); + } + } + } +} + +///////////////////////////////////////////////////////////////////////////////////////////// + +function updateKrakenMarkets($force = false) +{ + $exchange = 'kraken'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $result = kraken_api_query('AssetPairs'); + if(!is_array($result)) return; + + foreach($result as $pair => $data) + { + $pairs = explode('-', $pair); + $base = reset($pairs); $symbol = end($pairs); + if($symbol == 'BTC' || $base != 'BTC') continue; + if(in_array($symbol, array('GBP','CAD','EUR','USD','JPY'))) continue; + if(strpos($symbol,'.d') !== false) continue; + + $coin = getdbosql('db_coins', "symbol='{$symbol}'"); + if(!$coin) continue; + if(!$coin->installed && !$coin->watch) continue; + + $fees = reset($data['fees']); + $feepct = is_array($fees) ? end($fees) : null; + $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); + if(!$market) continue; + + $market->txfee = $feepct; + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $market->save(); + if($market->disabled || $market->deleted) continue; + + sleep(1); + $ticker = kraken_api_query('Ticker', $symbol); + if(!is_array($ticker) || !isset($ticker[$pair])) continue; + + $ticker = arraySafeVal($ticker, $pair); + if(!is_array($ticker) || !isset($ticker['b'])) continue; + + $price1 = (double) $ticker['a'][0]; // a = ask + $price2 = (double) $ticker['b'][0]; // b = bid, c = last + + // Alt markets on kraken (LTC/DOGE/NMC) are "reversed" against BTC (1/x) + if ($price2 > $price1) { + $price = $price2 ? 1 / $price2 : 0; + $price2 = $price1 ? 1 / $price1 : 0; + } else { + $price = $price1 ? 1 / $price1 : 0; + $price2 = $price2 ? 1 / $price2 : 0; + } + + $market->price = AverageIncrement($market->price, $price); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); + + $market->save(); + } +} + +///////////////////////////////////////////////////////////////////////////////////////////// + +function updateBittrexMarkets($force = false) +{ + $exchange = 'bittrex'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = bittrex_api_query('public/getcurrencies'); + if(!is_object($list)) return; + foreach($list->result as $currency) + { + $market = objSafeVal($currency,'Currency',''); + if(empty($market) || $market == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$currency->Currency)); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); + if(!$market) continue; + + $market->txfee = $currency->TxFee; // withdraw cost, not a percent! + $market->message = $currency->Notice; + if($market->disabled < 9) $market->disabled = !$currency->IsActive; + + $market->save(); + } + + sleep(1); + + $list = bittrex_api_query('public/getmarketsummaries'); + if(!is_object($list)) return; + + foreach($list->result as $m) + { + $a = explode('-', $m->MarketName); + if(!isset($a[1])) continue; + if($a[0] != 'BTC') continue; + $symbol = $a[1]; + if($symbol == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); + if(!$market) continue; + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $price2 = ($m->Bid + $m->Ask)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $m->Bid); + $market->pricetime = time(); + $market->save(); + + // deposit address + if(!empty(EXCH_BITTREX_KEY)) + { + $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); + if($force || (empty($market->deposit_address) && !$last_checked)) + { + $address = bittrex_api_query('account/getdepositaddress', "¤cy={$symbol}"); + if(is_object($address) && isset($address->result)) { + $addr = $address->result->Address; + if (!empty($addr) && $addr != $market->deposit_address) { + $market->deposit_address = $addr; + $market->save(); + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + } + } + } + cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 12*3600); + } + +// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); + } +} + +//////////////////////////////////////////////////////////////////////////////////// + +function updateCCexMarkets() +{ + $exchange = 'c-cex'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $ccex = new CcexAPI; + $list = $ccex->getMarketSummaries(); + if (!is_array($list)) return; + + foreach($list as $ticker) + { + if(!isset($ticker['MarketName'])) continue; + $e = explode('-', $ticker['MarketName']); + + $symbol = strtoupper($e[0]); + $base_symbol = strtoupper($e[1]); + + $sqlFilter = ''; + if ($base_symbol != 'BTC') { + // Only track ALT markets (LTC, DOGE) if the market record exists in the DB, sample market name "c-cex LTC" + $in_db = (int) dboscalar("SELECT count(M.id) FROM markets M INNER JOIN coins C ON C.id=M.coinid + WHERE C.installed AND C.symbol=:sym AND M.base_coin=:base", array(':sym'=>$symbol,':base'=>$base_symbol)); + if (!$in_db) continue; + $sqlFilter = "AND base_coin='$base_symbol'"; + } + + $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); + if (!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name LIKE '$exchange%' $sqlFilter"); + if (!$market) continue; + //if ($market->disabled < 9) $market->disabled = !$ticker['IsActive']; // only in GetMarkets() + if ($market->disabled < 9) $market->disabled = ($ticker['OpenBuyOrders'] <= 1); + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $market->save(); + + if ($market->disabled || $market->deleted) continue; + + $price2 = ($ticker['Bid']+$ticker['Ask'])/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker['Bid']); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2) && $base_symbol=='BTC') { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + + if(!empty(EXCH_CCEX_KEY)) + { + $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); + if(empty($market->deposit_address) && !$last_checked) + { + sleep(1); + $address = $ccex->getDepositAddress($symbol); + if(!empty($address)) { + $addr = arraySafeVal($address,'return'); + if (!empty($addr) && $addr != $market->deposit_address) { + if (strpos($addr, 'Error') !== false) { + $market->message = $addr; + debuglog("$exchange: deposit address for $symbol returned $addr"); + } else { + $market->deposit_address = $addr; + $market->message = null; + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + } + $market->save(); + } + } + } + cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 24*3600); + } + +// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); + } +} + +//////////////////////////////////////////////////////////////////////////////////// + +function updatePoloniexMarkets() +{ + $exchange = 'poloniex'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $poloniex = new poloniex; + + $tickers = $poloniex->get_ticker(); + if(!is_array($tickers)) return; + + foreach($tickers as $symbol=>$ticker) + { + $a = explode('_', $symbol); + if(!isset($a[1])) continue; + if($a[0] != 'BTC') continue; + + $symbol = $a[1]; + + $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} and name='poloniex'"); + if(!$market) continue; + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + } + + if($market->disabled || $market->deleted) continue; + + $price2 = ($ticker['highestBid']+$ticker['lowestAsk'])/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker['highestBid']); + $market->pricetime = time(); + + $market->save(); + + if(empty($market->deposit_address) && $coin->installed && !empty(EXCH_POLONIEX_KEY)) { + $last_checked = cache()->get($exchange.'-deposit_address-check'); + if (time() - $last_checked < 3600) { + // if still empty after get_deposit_addresses(), generate one + $poloniex->generate_address($coin->symbol); + sleep(1); + } + // empty address found, so force get_deposit_addresses check + cache()->set($exchange.'-deposit_address-check', 0, 10); + } + +// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); + } + + // deposit addresses + if(!empty(EXCH_POLONIEX_KEY)) + { + $list = array(); + $last_checked = cache()->get($exchange.'-deposit_address-check'); + if (!$last_checked) { + $list = $poloniex->get_deposit_addresses(); + if (!is_array($list)) return; + } + + foreach($list as $symbol=>$item) + { + if($symbol == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid=$coin->id and name='poloniex'"); + if(!$market) continue; + + if ($market->deposit_address != $item) { + $market->deposit_address = $item; + $market->save(); + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + } + } + cache()->set($exchange.'-deposit_address-check', time(), 12*3600); + } +} + +//////////////////////////////////////////////////////////////////////////////////// + +function updateYobitMarkets() +{ + $exchange = 'yobit'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $res = yobit_api_query('info'); + if(!is_object($res)) return; + + foreach($res->pairs as $i=>$item) + { + $e = explode('_', $i); + $symbol = strtoupper($e[0]); + $base_symbol = strtoupper($e[1]); + + if($symbol == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); + if(!$coin) continue; + + $sqlFilter = "AND IFNULL(base_coin,'')=''"; + if ($base_symbol != 'BTC') { + // Only track ALT markets (ETH, DOGE) if the market record exists in the DB, sample market name "yobit DOGE" + $in_db = (int) dboscalar("SELECT count(M.id) FROM markets M INNER JOIN coins C ON C.id=M.coinid ". + " WHERE C.installed AND C.symbol=:sym AND M.name LIKE '$exchange %' AND M.base_coin=:base", + array(':sym'=>$symbol,':base'=>$base_symbol) + ); + if (!$in_db) continue; + $sqlFilter = "AND base_coin='$base_symbol'"; + } + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name LIKE '$exchange%' $sqlFilter"); + if(!$market) continue; + + $market->txfee = objSafeVal($item,'fee',0.2); + if ($market->disabled < 9) $market->disabled = arraySafeVal($item,'hidden',0); + if (time() - $market->pricetime > 6*3600) $market->price = 0; + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $market->save(); + + if ($market->deleted || $market->disabled) continue; + if (!$coin->installed && !$coin->watch) continue; + + $symbol = $coin->getOfficialSymbol(); + $pair = strtolower($symbol.'_'.$base_symbol); + + $ticker = yobit_api_query("ticker/$pair"); + if(!$ticker || objSafeVal($ticker,$pair) === NULL) continue; + if(objSafeVal($ticker->$pair,'buy') === NULL) { + debuglog("$exchange: invalid data received for $pair ticker"); + continue; + } + + $price2 = ($ticker->$pair->buy + $ticker->$pair->sell) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->$pair->buy); + if ($ticker->$pair->buy < $market->price) $market->price = $ticker->$pair->buy; + $market->pricetime = time(); + $market->save(); + + if(!empty(EXCH_YOBIT_KEY)) + { + $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); + if ($last_checked) continue; + + sleep(1); // for the api nonce + $address = yobit_api_query2('GetDepositAddress', array("coinName"=>$symbol)); + if (!empty($address) && isset($address['return']) && $address['success']) { + $addr = $address['return']['address']; + if (!empty($addr) && $addr != $market->deposit_address) { + $market->deposit_address = $addr; + debuglog("$exchange: deposit address for {$symbol} updated"); + $market->save(); + } + } + cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); + } + } +} + +// http://www.jubi.com/ ? +function updateJubiMarkets() +{ + $exchange = 'jubi'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $btc = jubi_api_query('ticker', "?coin=btc"); + if(!is_object($btc)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $ticker = jubi_api_query('ticker', "?coin=".strtolower($symbol)); + if(!$ticker || !is_object($ticker)) continue; + if(objSafeVal($ticker,'buy') === NULL) { + debuglog("$exchange: invalid data received for $symbol ticker"); + continue; + } + + if (isset($btc->sell) && $btc->sell != 0.) + $ticker->buy /= $btc->sell; + if (isset($btc->buy) && $btc->buy != 0.) + $ticker->sell /= $btc->buy; + + $price2 = ($ticker->buy+$ticker->sell)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->buy*0.95); + $market->pricetime = time(); + +// debuglog("jubi update $symbol: $market->price $market->price2"); + + $market->save(); + } +} + +function updateAlcurexMarkets() +{ + $exchange = 'alcurex'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $data = alcurex_api_query('market', "?info=on"); + if(!is_object($data)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = strtoupper($symbol).'_BTC'; + foreach ($data->MARKETS as $ticker) { + if ($ticker->Pair === $pair) { + $lpair = strtolower($pair); + $last = alcurex_api_query('market', "?pair=$lpair&last=last"); + if (is_object($last) && !empty($last->$lpair)) { + $last = $last->$lpair; + $market->price = AverageIncrement($market->price, $last->price); + $market->pricetime = time(); + $market->save(); + } + $last = alcurex_api_query('market', "?pair=$lpair&last=sell"); + if (is_object($last) && !empty($last->$lpair)) { + $last = $last->$lpair; + $market->price2 = AverageIncrement($market->price2, $last->price); + $market->pricetime = time(); + $market->save(); + } + if (empty($coin->price)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + //debuglog("$exchange: $pair price updated to {$market->price}"); + break; + } + } + } +} + +function updateCoinbeneMarkets() +{ + $exchange = 'coinbene'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $data = coinbene_api_query('market/ticker', 'symbol=all'); + $data = objSafeVal($data,'ticker'); + if(!is_array($data)) return; + + foreach($list as $market) { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + if(!$coin->installed && !$coin->watch) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = $symbol.'BTC'; + foreach($data as $ticker) { + if ($ticker->symbol != $pair) continue; + + $price2 = ($ticker->bid+$ticker->ask)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->pricetime = time(); + $market->save(); + + break; + } + } +} + +function updateCrex24Markets() +{ + $exchange = 'crex24'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $data = crex24_api_query('tickers'); + if(!is_array($data)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + $pair = strtoupper($symbol).'-BTC'; + + $sqlFilter = ''; + if (!empty($market->base_coin)) { + $pair = strtoupper($symbol.'-'.$market->base_coin); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + foreach ($data as $ticker) { + if ($ticker->instrument === $pair) { + if ($market->disabled < 9) { + $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); + $market->disabled = ($ticker->bid < $ticker->ask/2) && ($nbm > 1); + } + + $price2 = ($ticker->bid+$ticker->ask)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->pricetime = time(); // $ticker->timestamp "2018-08-31T12:48:56Z" + $market->save(); + + if (empty($coin->price) && $ticker->ask) { + $coin->price = $market->price; + $coin->price2 = $price2; + $coin->save(); + } + //debuglog("$exchange: $pair price updated to {$market->price}"); + break; + } + } + } +} + +function updateCryptopiaMarkets() +{ + $exchange = 'cryptopia'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $data = cryptopia_api_query('GetMarkets', 24); + if(!is_object($data)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + $pair = strtoupper($symbol).'/BTC'; + + $sqlFilter = ''; + if (!empty($market->base_coin)) { + $pair = strtoupper($symbol.'/'.$market->base_coin); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } else if ($market->message == 'disabled from settings') { + $market->disabled = 0; + $market->message = ''; + $market->save(); + } + + foreach ($data->Data as $ticker) { + if ($ticker->Label === $pair) { + + if ($market->disabled < 9) { + $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); + $market->disabled = ($ticker->BidPrice < $ticker->AskPrice/2) && ($nbm > 1); + } + + $price2 = ($ticker->BidPrice+$ticker->AskPrice)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->BidPrice*0.98); + $market->marketid = $ticker->TradePairId; + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price) && !$market->disabled && strpos($pair,'BTC')) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } +// debuglog("$exchange: $pair $market->price ".bitcoinvaluetoa($market->price2)); + break; + } + } + } + + if(empty(EXCH_CRYPTOPIA_KEY)) return; + + $last_checked = cache()->get($exchange.'-deposit_address-check'); + if ($last_checked) return; + + $addresses = array(); + sleep(1); + $query = cryptopia_api_user('GetBalance'); + if (is_object($query) && is_array($query->Data)) + foreach($query->Data as $balance) { + $addr = objSafeVal($balance,'Address'); + if (!empty($addr)) $addresses[$balance->Symbol] = $addr; + } + // for some reason, no more available in global GetBalance api + $needCurrencyQueries = empty($addresses); + + if (!empty($list)) + foreach($list as $market) { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + $addr = arraySafeVal($addresses, $symbol); + if ($needCurrencyQueries) { + if(!$coin->installed) continue; + sleep(2); + $query = cryptopia_api_user('GetDepositAddress', array('Currency'=>$symbol)); + $dep = objSafeVal($query,'Data'); + $addr = objSafeVal($dep,'Address'); + } + if (!empty($addr) && $market->deposit_address != $addr) { + debuglog("$exchange: deposit address for {$symbol} updated"); + $market->deposit_address = $addr; + $market->save(); + } + } + cache()->set($exchange.'-deposit_address-check', time(), 12*3600); +} + +function updateHitBTCMarkets() +{ + $exchange = 'hitbtc'; + if (exchange_get($exchange, 'disabled')) return; + + $markets = getdbolist('db_markets', "name LIKE '$exchange%'"); // allow "hitbtc LTC" + if(empty($markets)) return; + + $data = hitbtc_api_query('ticker','','array'); + if(!is_array($data) || empty($data)) return; + + foreach($markets as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $base = 'BTC'; + $symbol = $coin->getOfficialSymbol(); + $pair = strtoupper($symbol).$base; + + $sqlFilter = ''; + if (!empty($market->base_coin)) { + $base = $market->base_coin; + $pair = strtoupper($market->base_coin.$symbol); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + + if (market_get($exchange, $symbol, "disabled", false, $base)) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + foreach ($data as $p => $ticker) + { + if ($p === $pair) { + $price2 = ((double)$ticker['bid'] + (double)$ticker['ask'])/2; + $market->price = AverageIncrement($market->price, (double)$ticker['bid']); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); // $ticker->timestamp + $market->priority = -1; + $market->save(); + + if (empty($coin->price2) && strpos($pair,'BTC') !== false) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + //debuglog("$exchange: $pair $market->price ".bitcoinvaluetoa($market->price2)); + break; + } + } + + if(!empty(EXCH_HITBTC_KEY)) + { + $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); + if($coin->installed && !$last_checked && empty($market->deposit_address)) + { + sleep(1); + $res = hitbtc_api_user('payment/address/'.$symbol); // GET method + if(is_object($res) && isset($res->address)) { + if (!empty($res->address)) { + $market->deposit_address = $res->address; + debuglog("$exchange: deposit address for {$symbol} updated"); + $market->save(); + if ($symbol == 'WAVES' || $symbol == 'LSK') // Wallet address + Public key + debuglog("$exchange: $symbol deposit address data: ".json_encode($res)); + } + } + cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); + } + } + } +} + +function updateNovaMarkets() +{ + $exchange = 'nova'; + if (exchange_get($exchange, 'disabled')) return; + + $markets = getdbolist('db_markets', "name LIKE '$exchange%'"); // allow "nova LTC" + if(empty($markets)) return; + + $data = nova_api_query('markets'); + if(!is_object($data) || $data->status != 'success' || !is_array($data->markets)) return; + + foreach($markets as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $base = 'BTC'; + $symbol = $coin->getOfficialSymbol(); + $pair = $base.'_'.strtoupper($symbol); + + $sqlFilter = ''; + if (!empty($market->base_coin)) { + $base = $market->base_coin; + $pair = strtoupper($market->base_coin.'_'.$symbol); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + + if (market_get($exchange, $symbol, "disabled", false, $base)) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + foreach ($data->markets as $ticker) { + if ($ticker->marketname === $pair) { + + $market->marketid = $ticker->marketid; + + if ($market->disabled < 9) { + $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); + $market->disabled = (floatval($ticker->volume24h) <= 0.005) && $nbm > 1; // in btc + } + + if (!$market->disabled) { + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->price2 = AverageIncrement($market->price2, $ticker->last_price); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2) && strpos($pair,'BTC') !== false) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } + break; + } + } + + if(!empty(EXCH_NOVA_KEY)) + { + $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); + if(empty($market->deposit_address) && !$last_checked) + { + sleep(1); + $res = nova_api_user('getdepositaddress/'.$symbol); + if(objSafeVal($res,'status') == 'success') { + $addr = objSafeVal($res, 'address'); + if (!empty($addr)) { + $market->deposit_address = $addr; + // delimiter "::" for memo / payment id + $market->message = null; + debuglog("$exchange: deposit address for {$symbol} updated"); + $market->save(); + } else { + debuglog("$exchange: Failed to update $symbol deposit address, ".json_encode($res)); + } + } + cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); + } + } + } +} + +function updateBinanceMarkets() +{ + $exchange = 'binance'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $tickers = binance_api_query('ticker/allBookTickers'); + if(!is_array($tickers)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = $symbol.'BTC'; + foreach ($tickers as $ticker) { + if ($pair != $ticker->symbol) continue; + + $price2 = ($ticker->bidPrice+$ticker->askPrice)/2; + $market->price = AverageIncrement($market->price, $ticker->bidPrice); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); + if ($market->disabled < 9) $market->disabled = (floatval($ticker->bidQty) < 0.01); + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } + } +} + +function updateBterMarkets() +{ + $exchange = 'bter'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = bter_api_query('tickers'); + if(!is_array($markets)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $dbpair = strtolower($symbol).'_btc'; + foreach ($markets as $pair => $ticker) { + if ($pair != $dbpair) continue; + + $market->price = AverageIncrement($market->price, $ticker['buy']); + $market->price2 = AverageIncrement($market->price2, $ticker['avg']); + $market->pricetime = time(); + if ($market->disabled < 9) $market->disabled = (floatval($ticker['vol_btc']) < 0.01); + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } + } +} + +function updateEmpoexMarkets() +{ + $exchange = 'empoex'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = empoex_api_query('marketinfo'); + if(!is_array($markets)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = strtoupper($symbol).'-BTC'; + + foreach ($markets as $ticker) { + if ($ticker->pairname != $pair) continue; + + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->price2 = AverageIncrement($market->price2, $ticker->ask); + $market->pricetime = time(); + + if (floatval($ticker->base_volume_24hr) > 0.01) + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->market = 'empoex'; + $coin->save(); + } + } + } +} + +function updateKuCoinMarkets() +{ + $exchange = 'kucoin'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = kucoin_api_query('open/symbols','market=BTC'); + if(!kucoin_result_valid($markets) || empty($markets->data)) return; + + $coininfo = NULL; //kucoin_api_query('market/open/coins'); + if(!kucoin_result_valid($coininfo) || empty($coininfo->data)) { + $coininfo = NULL; + } + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = strtoupper($symbol).'-BTC'; + + foreach ($markets->data as $ticker) { + if ($ticker->symbol != $pair) continue; + if (objSafeVal($ticker,'buy',-1) == -1) continue; + + $market->price = AverageIncrement($market->price, $ticker->buy); + $market->price2 = AverageIncrement($market->price2, objSafeVal($ticker,'sell',$ticker->buy)); + if (!empty($coininfo)) foreach ($coininfo->data as $info) { + if ($info->coin == $symbol) { + //todo: $market->withdrawfee = $info->withdrawMinFee; + break; + } + } + $market->txfee = $ticker->feeRate * 100; // is 0.1% for trades (0.001) + $market->priority = -1; + $market->pricetime = time(); + + if (floatval($ticker->vol) > 0.01) + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } + } +} + +function updateLiveCoinMarkets() +{ + $exchange = 'livecoin'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = livecoin_api_query('exchange/ticker'); + if(!is_array($markets)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = strtoupper($symbol).'/BTC'; + + foreach ($markets as $ticker) { + if ($ticker->symbol != $pair) continue; + + $market->price = AverageIncrement($market->price, $ticker->best_bid); + $market->price2 = AverageIncrement($market->price2, $ticker->best_ask); + $market->txfee = 0.2; + $market->priority = 0; + $market->pricetime = time(); + + if (floatval($ticker->volume) > 0.01) + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + + if(!empty(EXCH_LIVECOIN_KEY) && $market->disabled == 0) + { + $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); + if(empty($market->deposit_address) && !$last_checked) + { + sleep(1); + $livecoin = new LiveCoinApi(); + $data = $livecoin->getDepositAddress($symbol); + if(!empty($data) && objSafeVal($data, 'wallet', '') != '') { + $addr = arraySafeVal($data, 'wallet'); + if (!empty($addr)) { + $market->deposit_address = $addr; + // delimiter "::" for memo / payment id + $market->message = null; + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + $market->save(); + } else { + debuglog("$exchange: Failed to update $symbol deposit address, ".json_decode($data)); + } + } + } + cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); + } + } + } +} + +function updateCoinExchangeMarkets() +{ + $exchange = 'coinexchange'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = coinexchange_api_query('getmarkets'); + if(!is_object($list)) return; + $markets = coinexchange_api_query('getmarketsummaries'); + if(!is_object($markets)) return; + foreach($list->result as $currency) + { + $symbol = objSafeVal($currency,'MarketAssetCode',''); + $exchid = objSafeVal($currency,'MarketID',0); + if(empty($symbol) || !$exchid || $symbol == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); + $base = objSafeVal($currency,'BaseCurrencyCode',''); + if ($base != 'BTC') { + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND base_coin=:base", array(':base'=>$base)); + } + if(!$market) continue; + + $symbol = $coin->getOfficialSymbol(); + if($market->disabled < 9) $market->disabled = !$currency->Active; + + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + if($currency->Active && $coin->enable) { + // check wallet status (deposit/withdrawals) + $status = coinexchange_api_query('getcurrency', 'ticker_code='.$symbol); + if(is_object($status) && is_object($status->result)) { + $res = $status->result; + if($market->disabled < 9) $market->disabled = (objSafeVal($res,'WalletStatus') == "offline"); + $market->message = $market->disabled ? $res->WalletStatus : ''; + //debuglog("$exchange: $symbol wallet is {$res->WalletStatus}"); + } + } + + $market->save(); + + if($market->disabled || $market->deleted) continue; + + foreach ($markets->result as $m) { + if ($m->MarketID == $exchid) { + $price2 = ((double) $m->BidPrice + (double) $m->AskPrice)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double) $m->BidPrice); + $market->pricetime = time(); + $market->marketid = $exchid; + $market->priority = -1; // not ready for trading + $market->save(); + //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + break; + } + } + } +} + +function updateCoinsMarketsMarkets() +{ + $exchange = 'coinsmarkets'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = coinsmarkets_api_query('apicoin'); + if(empty($list) || !is_array($list)) return; + foreach($list as $pair=>$data) + { + $e = explode('_', $pair); + $base = $e[0]; $symbol = strtoupper($e[1]); + //if($pair == 'DOG_BTC') todo: handle reverted DOG_BTC + if($base != 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); + if(!$market) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $price2 = ((double)$data['lowestAsk'] + (double)$data['highestBid'])/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double)$data['highestBid']); + $market->price = min($market->price, $market->price2); // reversed bid/ask ? + + $market->marketid = arraySafeVal($data,'id'); + $market->priority = -1; // not ready for trading + + if ($price2 < $market->price*2) { + // 24htrade field seems not filled in json + //if ($market->disabled == 1) $market->disabled = 0; + } else { + // reduce price2 + $market->price2 = AverageIncrement($market->price2, $market->price); + //if (!$market->disabled) $market->disabled = 1; + } + + //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } +} + +function updateStocksExchangeMarkets() +{ + $exchange = 'stocksexchange'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = stocksexchange_api_query('ticker'); + if(empty($list) || !is_array($list)) return; + foreach($list as $m) + { + $e = explode('_', $m->market_name); + $symbol = strtoupper($e[0]); $base = $e[1]; + if($base != 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); + if(!$market) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $market->disabled = ($m->bid == 0); + + $price2 = ((double)$m->ask + (double)$m->bid)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double)$m->bid); + $market->priority = -1; // not ready for trading + $market->txfee = $m->sell_fee_percent; + + //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); + $market->pricetime = time(); // $m->updated_time; + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } +} + +function updateTradeSatoshiMarkets() +{ + $exchange = 'tradesatoshi'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $data = tradesatoshi_api_query('getmarketsummaries'); + if(!is_object($data) || !$data->success || !is_array($data->result)) return; + foreach($data->result as $m) + { + $e = explode('_', $m->market); + $symbol = strtoupper($e[0]); $base = $e[1]; + if($base != 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); + if(!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); + if(!$market) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $market->disabled = ($m->openBuyOrders == 0); + + $price2 = ((double)$m->ask + (double)$m->bid)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double)$m->bid); + $market->priority = -1; // not ready for trading + + //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } +} + +// todo: store min/max txs limits +function updateShapeShiftMarkets() +{ + $exchange = 'shapeshift'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = shapeshift_api_query('marketinfo'); + if(!is_array($markets) || empty($markets)) return; + + foreach($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) continue; + + if (market_get($exchange, $coin->symbol, "disabled")) { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $symbol = $coin->getOfficialSymbol(); + $pair = strtoupper($symbol).'_BTC'; + if (!empty($market->base_coin)) + $pair = strtoupper($symbol).'_'.strtoupper($market->base_coin); + + foreach ($markets as $ticker) { + if ($ticker['pair'] != $pair) continue; + + $market->price = AverageIncrement($market->price, $ticker['rate']); + $market->price2 = AverageIncrement($market->price2, $ticker['rate']); + $market->txfee = $ticker['minerFee'] * 100; + $market->pricetime = time(); + $market->priority = -1; // not ready for trading + $market->save(); + + if (empty($coin->price2)) { + $coin->price = $market->price; + $coin->price2 = $market->price2; + //$coin->market = 'shapeshift'; + $coin->save(); + } + } + } +} + +// update other installed coins price from cryptonator +function updateOtherMarkets() +{ + $coins = getdbolist('db_coins', "installed AND IFNULL(price,0.0) = 0.0"); + foreach($coins as $coin) + { + $symbol = $coin->getOfficialSymbol(); + if (market_get("cryptonator", $coin->symbol, "disabled")) { + continue; + } + + $json = @ file_get_contents("https://www.cryptonator.com/api/full/".strtolower($symbol)."-btc"); + $object = json_decode($json); + if (empty($object)) continue; + + if (is_object($object) && isset($object->ticker)) { + $ticker = $object->ticker; + if ($ticker->target == 'BTC' && $ticker->volume > 1) { + $coin->price2 = $ticker->price; + $coin->price = AverageIncrement((float)$coin->price, (float)$coin->price2); + if ($coin->save()) { + debuglog("cryptonator: $symbol price set to ".bitcoinvaluetoa($coin->price)); + } + } + } + } +} diff --git a/web/yaamp/core/backend/rawcoins.php b/web/yaamp/core/backend/rawcoins.php index da4ada7b4..34d976831 100644 --- a/web/yaamp/core/backend/rawcoins.php +++ b/web/yaamp/core/backend/rawcoins.php @@ -9,7 +9,6 @@ function updateRawcoins() exchange_set_default('alcurex', 'disabled', true); exchange_set_default('binance', 'disabled', true); - exchange_set_default('bter', 'disabled', true); exchange_set_default('empoex', 'disabled', true); exchange_set_default('coinbene', 'disabled', true); exchange_set_default('coinexchange', 'disabled', true); @@ -38,18 +37,6 @@ function updateRawcoins() } } - if (!exchange_get('bitfinex', 'disabled')) { - $list = bitfinex_api_query('symbols'); - if(is_array($list) && !empty($list)) { - dborun("UPDATE markets SET deleted=true WHERE name='bitfinex'"); - foreach ($list as $pair) { - if (strpos($pair, 'usd') || !strpos($pair, 'btc')) continue; - $symbol = strtoupper(str_replace('btc', '', $pair)); - updateRawCoin('bitfinex', $symbol); - } - } - } - if (!exchange_get('bitz', 'disabled')) { $list = bitz_api_query('tickerall'); if (!empty($list)) { @@ -139,26 +126,6 @@ function updateRawcoins() } } - if (!exchange_get('bter', 'disabled')) { - $list = bter_api_query('marketlist'); - if(is_object($list) && is_array($list->data)) - { - dborun("UPDATE markets SET deleted=true WHERE name='bter'"); - foreach($list->data as $item) { - if (strtoupper($item->curr_b) !== 'BTC') - continue; - if (strpos($item->name, 'Asset') !== false) - continue; - if (strpos($item->name, 'BitShares') !== false && $item->symbol != 'BTS') - continue; - // ignore some dead coins and assets - if (in_array($item->symbol, array('BITGLD','DICE','ROX','TOKEN'))) - continue; - updateRawCoin('bter', $item->symbol, $item->name); - } - } - } - if (!exchange_get('yobit', 'disabled')) { $res = yobit_api_query('info'); if($res) @@ -415,22 +382,6 @@ function updateRawcoins() } } - if (!exchange_get('tradeogre', 'disabled')) { - $list = tradeogre_api_query('markets'); - if(is_array($list) && !empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='tradeogre'"); - foreach($list as $ticker) { - $symbol_index = key($ticker); - $e = explode('-', $symbol_index); - if (strtoupper($e[0]) !== 'BTC') - continue; - $symbol = strtoupper($e[1]); - updateRawCoin('tradeogre', $symbol); - } - } - } - if (!exchange_get('tradesatoshi', 'disabled')) { $data = tradesatoshi_api_query('getcurrencies'); if(is_object($data) && !empty($data->result)) @@ -482,16 +433,6 @@ function updateRawCoin($marketname, $symbol, $name='unknown') { if($symbol == 'BTC') return; - // Restrict $symbol and $name to strict defined set of characters (to protect from rogue exchange or DNS attack on exchange) - if (preg_match('/[^A-Za-z0-9_\$]/', $symbol)) { - debuglog("weird symbol $symbol from $marketname"); - return; - } - if (preg_match('/[^A-Za-z0-9_\$ ]/', $name)) { - debuglog("weird name $name for symbol $symbol from $marketname"); - return; - } - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); if(!$coin && YAAMP_CREATE_NEW_COINS) { @@ -511,7 +452,7 @@ function updateRawCoin($marketname, $symbol, $name='unknown') } } - if (in_array($marketname, array('nova','askcoin','binance','bitfinex','bitz','coinexchange','coinsmarkets','cryptobridge','hitbtc'))) { + if (in_array($marketname, array('nova','askcoin','binance','bitz','coinexchange','coinsmarkets','cryptobridge','hitbtc'))) { // don't polute too much the db with new coins, its better from exchanges with labels return; } @@ -563,3 +504,4 @@ function updateRawCoin($marketname, $symbol, $name='unknown') } } + diff --git a/web/yaamp/core/backend/rawcoins.php.bak b/web/yaamp/core/backend/rawcoins.php.bak index feb769d7d..da4ada7b4 100644 --- a/web/yaamp/core/backend/rawcoins.php.bak +++ b/web/yaamp/core/backend/rawcoins.php.bak @@ -372,13 +372,12 @@ function updateRawcoins() if (!exchange_get('kucoin', 'disabled')) { $list = kucoin_api_query('currencies'); - if(is_object($list) && isset($list->data) && !empty($list->data)) + if(kucoin_result_valid($list) && !empty($list->data)) { dborun("UPDATE markets SET deleted=true WHERE name='kucoin'"); foreach($list->data as $item) { $symbol = $item->name; $name = $item->fullName; - if (strpos($item->withdrawRemark,'Ethereum')) continue; updateRawCoin('kucoin', $symbol, $name); } } @@ -416,6 +415,22 @@ function updateRawcoins() } } + if (!exchange_get('tradeogre', 'disabled')) { + $list = tradeogre_api_query('markets'); + if(is_array($list) && !empty($list)) + { + dborun("UPDATE markets SET deleted=true WHERE name='tradeogre'"); + foreach($list as $ticker) { + $symbol_index = key($ticker); + $e = explode('-', $symbol_index); + if (strtoupper($e[0]) !== 'BTC') + continue; + $symbol = strtoupper($e[1]); + updateRawCoin('tradeogre', $symbol); + } + } + } + if (!exchange_get('tradesatoshi', 'disabled')) { $data = tradesatoshi_api_query('getcurrencies'); if(is_object($data) && !empty($data->result)) @@ -428,6 +443,7 @@ function updateRawcoins() } } } + ////////////////////////////////////////////////////////// $markets = dbocolumn("SELECT DISTINCT name FROM markets"); @@ -466,6 +482,16 @@ function updateRawCoin($marketname, $symbol, $name='unknown') { if($symbol == 'BTC') return; + // Restrict $symbol and $name to strict defined set of characters (to protect from rogue exchange or DNS attack on exchange) + if (preg_match('/[^A-Za-z0-9_\$]/', $symbol)) { + debuglog("weird symbol $symbol from $marketname"); + return; + } + if (preg_match('/[^A-Za-z0-9_\$ ]/', $name)) { + debuglog("weird name $name for symbol $symbol from $marketname"); + return; + } + $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); if(!$coin && YAAMP_CREATE_NEW_COINS) { diff --git a/web/yaamp/core/backend/services.php b/web/yaamp/core/backend/services.php index 72ab645ea..60dfbd398 100644 --- a/web/yaamp/core/backend/services.php +++ b/web/yaamp/core/backend/services.php @@ -39,7 +39,6 @@ function BackendUpdateServices() // 27=>'Sia', 28=>'blake2s', 29=>'skunk', - 30=>'lyra2v3', ); $res = fetch_url('https://api.nicehash.com/api?method=stats.global.current'); diff --git a/web/yaamp/core/backend/services.php.bak b/web/yaamp/core/backend/services.php.bak new file mode 100644 index 000000000..72ab645ea --- /dev/null +++ b/web/yaamp/core/backend/services.php.bak @@ -0,0 +1,242 @@ +'scrypt', + 1=>'sha256', + 2=>'scryptn', + 3=>'x11', + 4=>'x13', + 5=>'keccak', + 6=>'x15', + 7=>'nist5', + 8=>'neoscrypt', + 9=>'lyra2', + 10=>'whirlx', + 11=>'qubit', + 12=>'quark', + // 13=>'Axiom', + 14=>'lyra2v2', // 14 = Lyra2REv2 + // 15=>'ScryptJaneNf16', // 15 = ScryptJaneNf16 + 16=>'blakecoin', // 16 = Blake256r8 + // 17=>'Blake256r14', + // 18=>'Blake256r8vnl', + // 19=>'Hodl', + // 20=>'DaggerHashimoto', + // 21=>'Decred', + // 22=>'CryptoNight', + 23=>'lbry', + 24=>'equihash', + // 25=>'Pascal', + 26=>'sib', // X11Gost + // 27=>'Sia', + 28=>'blake2s', + 29=>'skunk', + 30=>'lyra2v3', + ); + + $res = fetch_url('https://api.nicehash.com/api?method=stats.global.current'); + if(!$res) return; + + $a = json_decode($res); + if(!$a || !isset($a->result)) return; + + foreach($a->result->stats as $stat) + { + if($stat->price <= 0) continue; + if(!isset($table[$stat->algo])) continue; + $algo = $table[$stat->algo]; + + $service = getdbosql('db_services', "name='Nicehash' and algo=:algo", array(':algo'=>$algo)); + if(!$service) + { + $service = new db_services; + $service->name = 'Nicehash'; + $service->algo = $algo; + } + + $service->price = $stat->price/1000; + $service->speed = $stat->speed*1000000000; + $service->save(); + + $list = getdbolist('db_jobs', "percent>0 and algo=:algo and (host='stratum.westhash.com' or host='stratum.nicehash.com')", array(':algo'=>$algo)); + foreach($list as $job) + { + $job->price = round($service->price*1000*(100-$job->percent)/100, 2); + $job->save(); + } + } + + $list = getdbolist('db_renters', "custom_address is not null and custom_server is not null"); + foreach($list as $renter) + { + $res = fetch_url("https://$renter->custom_server/api?method=stats.provider&addr=$renter->custom_address"); + if(!$res) continue; + + $renter->custom_balance = 0; + $renter->custom_accept = 0; + $renter->custom_reject = 0; + + $a = json_decode($res); + foreach($a->result->stats as $stat) + { + if(!isset($table[$stat->algo])) continue; + $algo = $table[$stat->algo]; + + $renter->custom_balance += $stat->balance; + $renter->custom_accept += $stat->accepted_speed*1000000000; + } + + $renter->save(); + } + + /////////////////////////////////////////////////////////////////////////// + + // renting from nicehash + if (YAAMP_USE_NICEHASH_API != true) + return; + + $apikey = NICEHASH_API_KEY; + $apiid = NICEHASH_API_ID; + + $deposit = NICEHASH_DEPOSIT; + $amount = NICEHASH_DEPOSIT_AMOUNT; + + $res = fetch_url("https://api.nicehash.com/api?method=balance&id=$apiid&key=$apikey"); + debuglog($res); + + $a = json_decode($res); + $balance = $a->result->balance_confirmed; + + foreach($table as $i=>$algo) + { + $nicehash = getdbosql('db_nicehash', "algo=:algo", array(':algo'=>$algo)); + if(!$nicehash) + { + $nicehash = new db_nicehash; + $nicehash->active = false; + $nicehash->algo = $algo; + } + + if(!$nicehash->active) + { + if($nicehash->orderid) + { + $res = fetch_url("https://api.nicehash.com/api?method=orders.remove&id=$apiid&key=$apikey&location=0&algo=$i&order=$nicehash->orderid"); + debuglog($res); + + $nicehash->orderid = null; + } + + $nicehash->btc = null; + $nicehash->price = null; + $nicehash->speed = null; + $nicehash->last_decrease = null; + + $nicehash->save(); + continue; + } + + $price = dboscalar("select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); + $minprice = $price*0.5; + $setprice = $price*0.7; + $maxprice = $price*0.9; + $cancelprice = $price*1.1; + + $res = fetch_url("https://api.nicehash.com/api?method=orders.get&my&id=$apiid&key=$apikey&location=0&algo=$i"); + if(!$res) break; + + $a = json_decode($res); + if(count($a->result->orders) == 0) + { + if($balance < $amount) continue; + $port = getAlgoPort($algo); + + $res = fetch_url("https://api.nicehash.com/api?method=orders.create&id=$apiid&key=$apikey&location=0&algo=$i&amount=$amount&price=$setprice&limit=0&pool_host=yaamp.com&pool_port=$port&pool_user=$deposit&pool_pass=xx"); + debuglog($res); + + $nicehash->last_decrease = time(); + $nicehash->save(); + + continue; + } + + $order = $a->result->orders[0]; + debuglog("$algo $order->price $minprice $setprice $maxprice $cancelprice"); + + $nicehash->orderid = $order->id; + $nicehash->btc = $order->btc_avail; + $nicehash->workers = $order->workers; + $nicehash->price = $order->price; + $nicehash->speed = $order->limit_speed; + $nicehash->accepted = $order->accepted_speed; + + if($order->price > $cancelprice && $order->workers > 0) + { + debuglog("* cancel order $algo"); + + $res = fetch_url("https://api.nicehash.com/api?method=orders.remove&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id"); + debuglog($res); + } + + else if($order->price > $maxprice && $order->limit_speed == 0) + { + debuglog("* decrease speed $algo"); + + $res = fetch_url("https://api.nicehash.com/api?method=orders.set.limit&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&limit=0.05"); + debuglog($res); + } + + else if($order->price > $maxprice && $nicehash->last_decrease+10*60 < time()) + { + debuglog("* decrease price $algo"); + + $res = fetch_url("https://api.nicehash.com/api?method=orders.set.price.decrease&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id"); + debuglog($res); + + $nicehash->last_decrease = time(); + } + + else if($order->price < $minprice && $order->workers <= 0) + { + debuglog("* increase price $algo"); + + $res = fetch_url("https://api.nicehash.com/api?method=orders.set.price&id=$apiid&key=$apikey&algo=$i&location=0&order=$order->id&price=$setprice"); + debuglog($res); + } + + else if($order->price < $maxprice && $order->limit_speed == 0.05) + { + debuglog("* increase speed $algo"); + + $res = fetch_url("https://api.nicehash.com/api?method=orders.set.limit&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&limit=0"); + debuglog($res); + } + + else if($order->btc_avail < 0.00075000) + { + debuglog("* refilling order $order->id"); + + $res = fetch_url("https://api.nicehash.com/api?method=orders.refill&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&amount=0.01"); + debuglog($res); + } + + $nicehash->save(); + } + +} + + + + + + + + diff --git a/web/yaamp/core/backend/system.php b/web/yaamp/core/backend/system.php index b70da2ce9..3a9e9e9ab 100644 --- a/web/yaamp/core/backend/system.php +++ b/web/yaamp/core/backend/system.php @@ -19,6 +19,9 @@ function BackendDoBackup() $user = YIIMP_MYSQLDUMP_USER; $pass = YIIMP_MYSQLDUMP_PASS; + $d = date('Y-m-d-H', time()); + $filename = YIIMP_MYSQLDUMP_PATH.DIRECTORY_SEPARATOR."$db-$d.sql"; + if (1) { // faster on huge databases if the disk is fast (nvme), reduce the db lock time system("mysqldump -h $host -u$user -p$pass --skip-extended-insert $db > $filename"); diff --git a/web/yaamp/core/backend/system.php.bak b/web/yaamp/core/backend/system.php.bak new file mode 100644 index 000000000..b70da2ce9 --- /dev/null +++ b/web/yaamp/core/backend/system.php.bak @@ -0,0 +1,355 @@ + $filename"); + shell_exec("$ziptool $filename &"); // compress then the .sql in background (db is no more locked) + } else { + // previous method (ok on small pools) + system("mysqldump -h $host -u$user -p$pass --skip-extended-insert $db | $ziptool > $filename$ext"); + } +} + +function BackendQuickClean() +{ + $coins = getdbolist('db_coins', "installed"); + + foreach($coins as $coin) + { + $delay = time() - 7*24*60*60; + + $id = dboscalar("select id from blocks where coin_id=$coin->id and time<$delay and + id not in (select blockid from earnings where coinid=$coin->id) + order by id desc limit 200, 1"); + + if($id) dborun("delete from blocks where coin_id=$coin->id and time<$delay and + id not in (select blockid from earnings where coinid=$coin->id) and id<$id"); + } + + dborun("delete from earnings where blockid in (select id from blocks where category='orphan')"); + dborun("delete from earnings where blockid not in (select id from blocks)"); + dborun("UPDATE blocks SET amount=0 WHERE category='orphan' AND amount>0"); +} + +function marketHistoryPrune($symbol="") +{ + $delay2M = settings_get("history_prune_delay", time() - 61*24*60*60); // 2 months + dborun("DELETE FROM market_history WHERE time < ".intval($delay2M)); + + // Prune records older than 1 week, one max per hour + $delay7D = time() - 7*24*60*60; + $sqlFilter = (!empty($symbol)) ? "AND C.symbol='$symbol'" : ''; + $prune = dbolist("SELECT idcoin, idmarket, + AVG(MH.price) AS price, AVG(MH.price2) AS price2, MAX(MH.balance) AS balance, + MIN(MH.id) AS firstid, COUNT(MH.id) AS nbrecords, (MH.time DIV 3600) AS ival + FROM market_history MH + INNER JOIN coins C ON C.id = MH.idcoin + WHERE MH.time < $delay7D $sqlFilter + GROUP BY MH.idcoin, MH.idmarket, ival + HAVING nbrecords > 1"); + + $nbDel = 0; $nbUpd = 0; + foreach ($prune as $row) { + if (empty($row['idmarket'])) + $sqlFilter = "idcoin=:idcoin AND idmarket IS NULL"; + else + $sqlFilter = "idcoin=:idcoin AND idmarket=".intval($row['idmarket']); + + $nbDel += dborun("DELETE FROM market_history WHERE $sqlFilter AND id != :firstid + AND (time DIV 3600) = :interval", array( + ':idcoin' => $row['idcoin'], + ':interval'=> $row['ival'], + ':firstid' => $row['firstid'], + )); + + $nbUpd += dborun("UPDATE market_history SET time=:interval, + balance=:balance, price=:price, price2=:price2 + WHERE id=:firstid", array( + ':interval' => (3600 * $row['ival']), + ':balance' => $row['balance'], + ':price' => $row['price'], ':price2' => $row['price2'], + ':firstid' => $row['firstid'], + )); + } + if ($nbDel) debuglog("history: $nbDel records pruned, $nbUpd updated $symbol"); +} + +function consolidateOldShares() +{ + $delay = time() - 24*60*60; // drop invalid shares not used anymore (24h graph only) + dborun("DELETE FROM shares WHERE time < $delay AND valid = 0"); + + $t1 = time() - 48*3600; + $list = dbolist("SELECT coinid, userid, workerid, algo, AVG(time) AS time, SUM(difficulty) AS difficulty, AVG(share_diff) AS share_diff ". + "FROM shares WHERE valid AND time < $t1 AND pid > 0 ". + "GROUP BY coinid, userid, workerid, algo ORDER BY coinid, userid"); + $pruned = 0; + foreach ($list as $row) { + $share = new db_shares; + $share->isNewRecord = true; + $share->coinid = $row['coinid']; + $share->userid = $row['userid']; + $share->workerid = $row['workerid']; + $share->algo = $row['algo']; + $share->time = (int) $row['time']; + $share->difficulty = $row['difficulty']; + $share->share_diff = $row['share_diff']; + $share->valid = 1; + $share->pid = 0; + if ($share->save()) { + $pruned += dborun("DELETE FROM shares WHERE userid=:userid AND coinid=:coinid AND workerid=:worker AND pid > 0 AND time < $t1", array( + ':userid' => $row['userid'], + ':coinid' => $row['coinid'], + ':worker' => $row['workerid'], + )); + } + } + if ($pruned) { + debuglog("$pruned old shares records were consolidated"); + } + return $pruned; +} + +function BackendCleanDatabase() +{ + marketHistoryPrune(); + + $delay = time() - 60*24*60*60; + dborun("DELETE from blocks where time<$delay"); + dborun("delete from hashstats where time<$delay"); + dborun("delete from payouts where time<$delay"); + dborun("delete from rentertxs where time<$delay"); + dborun("DELETE FROM shares WHERE time<$delay"); + + $delay = time() - 2*24*60*60; + dborun("delete from stats where time<$delay"); + dborun("delete from hashrate where time<$delay"); + dborun("delete from hashuser where time<$delay"); + dborun("delete from hashrenter where time<$delay"); + dborun("delete from balanceuser where time<$delay"); + dborun("delete from exchange where send_time<$delay"); + dborun("DELETE FROM shares WHERE time<$delay AND coinid NOT IN (select id from coins)"); + + consolidateOldShares(); + + $delay = time() - 12*60*60; + dborun("delete from earnings where status=2 and mature_time<$delay"); +} + +function BackendOptimizeTables() +{ + $list = dbolist("show tables"); + foreach($list as $item) + { + $tablename = $item['Tables_in_yaamp']; + dbolist("optimize table $tablename"); + + sleep(1); + } +} + +function BackendProcessList() +{ + $list = dbolist("show processlist"); + foreach($list as $item) + { + $conn = getdbo('db_connections', $item['Id']); + if(!$conn) + { + $conn = new db_connections; + $conn->id = $item['Id']; + $conn->user = $item['User']; + $conn->host = $item['Host']; + $conn->db = $item['db']; + $conn->created = time(); + } + + $conn->idle = $item['Time']; + $conn->last = time(); + + $conn->save(); + } + + $delay = time() - 5*60; + dborun("delete from connections where last<$delay"); +} + +function BackendRunCoinActions() +{ +// debuglog(__FUNCTION__); + +// $hostname = exec("hostname"); +// $server = getdbosql('db_servers', "name='$hostname'"); +// if(!$server) +// { +// $server = new db_servers; +// $server->name = $hostname; +// } + +// $server->uptime = exec("uptime"); +// $server->save(); + + ////////////////////////////////////////////////////////////////////////// + +// if($hostname == 'yaamp') +// { +// $mining = getdbosql('db_mining'); +// exec("pgrep stratum", $ids, $ret); + +// $mining->stratumids = implode(',', $ids); +// $mining->save(); +// } + + ///////////////////////////////////////////////////////////////////////////////////////////////// + +// $coins = getdbolist('db_coins'); +// foreach($coins as $coin) +// { +// if(empty($coin->action) || empty($coin->program) || empty($coin->conf_folder)) continue; +// $hostname = exec("hostname"); +// if($hostname != $coin->rpchost) continue; +// switch($coin->action) +// { +// case 1: +// debuglog("starting $coin->program"); + +// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; +// @unlink($debugfile); + +// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); +// $coin->enable = true; +// break; + +// case 2: +// debuglog("stopping $coin->program"); +// exec(YAAMP_BIN."/$coin->program stop"); +// break; + +// case 4: +// debuglog("restarting $coin->program"); +// exec(YAAMP_BIN."/$coin->program stop"); +// sleep(10); + +// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; +// @unlink($debugfile); + +// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); +// $coin->enable = true; +// break; + +// case 3: +// debuglog("reset blockchain $coin->conf_folder"); +// $folder = YAAMP_WALLETS."/$coin->conf_folder"; + +// // exec("rm {$folder}/blk*.dat"); +// exec("rm -fr {$folder}/database"); +// break; + +// case 5: +// $t = time(); +// $coin->rpcport = $coin->id*2+10240; +// $coin->rpcuser = 'yaamprpc'; +// $coin->rpcpasswd = md5("$t.$coin->id"); +// $coin->save(); + +// $configfile = YAAMP_WALLETS."/$coin->conf_folder/".substr($coin->conf_folder, 1).".conf"; +// debuglog("make config $configfile"); + +// $stratum_port = 3433; + +// if($coin->algo == 'sha256') +// $stratum_port = 3333; + +// else if($coin->algo == 'scrypt') +// $stratum_port = 3433; + +// else if($coin->algo == 'x11') +// $stratum_port = 3533; + +// else if($coin->algo == 'x13') +// $stratum_port = 3633; + +// else if($coin->algo == 'x14') +// $stratum_port = 3933; + +// else if($coin->algo == 'x15') +// $stratum_port = 3733; + +// else if($coin->algo == 'nist5') +// $stratum_port = 3833; + +// else if($coin->algo == 'quark') +// $stratum_port = 4033; + +// else if($coin->algo == 'fresh') +// $stratum_port = 4133; + +// else if($coin->algo == 'neoscrypt') +// $stratum_port = 4233; + +// else if($coin->algo == 'scryptn') +// $stratum_port = 4333; + +// else if($coin->algo == 'lyra2') +// $stratum_port = 4433; + +// else if($coin->algo == 'blake') +// $stratum_port = 4533; + +// // else if($coin->algo == 'keccak') +// // $stratum_port = 3933; + +// $data = "server=1\ndeamon=1\ngen=0\nrpcuser=$coin->rpcuser\nrpcpassword=$coin->rpcpasswd\nrpcport=$coin->rpcport\nrpcallowip=10.*.*.*\nblocknotify=".YAAMP_BIN."/blocknotify.sh --host yaamp --port $stratum_port --id $coin->id --block %s --password tu8tu5\n"; +// file_put_contents($configfile, $data); + +// debuglog("starting $coin->program"); + +// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; +// @unlink($debugfile); + +// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); +// $coin->enable = true; + +// break; +// } + +// $coin->action = null; +// $coin->save(); +// } + +// $filename = '/root/stratum/stratum.log'; +// $filesize = filesize($filename); + +// $oldsize = controller()->memcache->get('stratum_log_size'); +// if($oldsize == $filesize) return; + +// $file = fopen($filename, $r); +// if(!$file) return; + +// fseek($file, $oldsize); +// $data = fread($file, $filesize-$oldsize); +// fclose($file); + +// controller()->memcache->set('stratum_log_size', $filesize); +// system("echo \"$data\" | mail -s \"yiimp server\" ".YAAMP_ADMIN_EMAIL); +} + diff --git a/web/yaamp/core/exchange/exchange.php b/web/yaamp/core/exchange/exchange.php index 19b9afc65..b53f3371e 100644 --- a/web/yaamp/core/exchange/exchange.php +++ b/web/yaamp/core/exchange/exchange.php @@ -13,11 +13,9 @@ function strip_data($data) return $out; } -require_once("bitfinex.php"); require_once("bitstamp.php"); require_once("bittrex.php"); require_once("bitz.php"); -require_once("bitzv2.php"); require_once("bleutrade.php"); require_once("ccexapi.php"); require_once("cexio.php"); @@ -31,7 +29,6 @@ function strip_data($data) require_once("poloniex.php"); require_once("yobit.php"); require_once("shapeshift.php"); -require_once("bter.php"); require_once("empoex.php"); require_once("jubi.php"); require_once("alcurex.php"); @@ -45,7 +42,6 @@ function strip_data($data) require_once("coinsmarkets.php"); require_once("cryptowatch.php"); require_once("stocksexchange.php"); -require_once("tradeogre.php"); require_once("tradesatoshi.php"); /* Format an exchange coin Url */ @@ -86,8 +82,6 @@ function getMarketUrl($coin, $marketName) $url = "https://alcurex.com/#{$symbol}-{$base}"; else if($market == 'binance') $url = "https://www.binance.com/trade.html?symbol={$symbol}_{$base}"; - else if($market == 'bitfinex') - $url = "https://www.bitfinex.com/t/{$symbol}:{$base}"; else if($market == 'bittrex') $url = "https://bittrex.com/Market/Index?MarketName={$base}-{$symbol}"; else if($market == 'bitz') @@ -96,8 +90,6 @@ function getMarketUrl($coin, $marketName) $url = "https://poloniex.com/exchange#{$lowbase}_{$lowsymbol}"; else if($market == 'bleutrade') $url = "https://bleutrade.com/exchange/{$symbol}/{$base}"; - else if($market == 'bter') - $url = "https://bter.com/trade/{$lowsymbol}_{$lowbase}"; else if($market == 'cexio') $url = "https://cex.io/trade/{$symbol}-{$base}"; else if($market == 'coinbene') @@ -129,15 +121,13 @@ function getMarketUrl($coin, $marketName) else if($market == 'hitbtc') $url = "https://hitbtc.com/exchange/{$symbol}-to-{$base}"; else if($market == 'kucoin') - $url = "https://www.kucoin.com/#/trade.pro/{$symbol}-{$base}"; + $url = "https://www.kucoin.com/trade/{$symbol}-{$base}"; else if($market == 'livecoin') $url = "https://www.livecoin.net/trade/?currencyPair={$symbol}%2F{$base}"; else if($market == 'nova') $url = "https://novaexchange.com/market/{$base}_{$symbol}/"; else if($market == 'stocksexchange') $url = "https://stocks.exchange/trade/$symbol/$base"; - else if($market == 'tradeogre') - $url = "https://tradeogre.com/exchange/{$base}-{$symbol}"; else if($market == 'tradesatoshi') $url = "https://tradesatoshi.com/Exchange?market={$symbol}_{$base}"; else if($market == 'yobit') diff --git a/web/yaamp/core/exchange/exchange.php.bak b/web/yaamp/core/exchange/exchange.php.bak index 7c43d87bc..19b9afc65 100644 --- a/web/yaamp/core/exchange/exchange.php.bak +++ b/web/yaamp/core/exchange/exchange.php.bak @@ -45,6 +45,7 @@ require_once("coinexchange.php"); require_once("coinsmarkets.php"); require_once("cryptowatch.php"); require_once("stocksexchange.php"); +require_once("tradeogre.php"); require_once("tradesatoshi.php"); /* Format an exchange coin Url */ @@ -135,6 +136,8 @@ function getMarketUrl($coin, $marketName) $url = "https://novaexchange.com/market/{$base}_{$symbol}/"; else if($market == 'stocksexchange') $url = "https://stocks.exchange/trade/$symbol/$base"; + else if($market == 'tradeogre') + $url = "https://tradeogre.com/exchange/{$base}-{$symbol}"; else if($market == 'tradesatoshi') $url = "https://tradesatoshi.com/Exchange?market={$symbol}_{$base}"; else if($market == 'yobit') diff --git a/web/yaamp/core/exchange/kucoin.php b/web/yaamp/core/exchange/kucoin.php index 474846c84..757379500 100644 --- a/web/yaamp/core/exchange/kucoin.php +++ b/web/yaamp/core/exchange/kucoin.php @@ -1,6 +1,6 @@ data)) return false; + return true; +} + +// https://openapi-v2.kucoin.com/api/v1/symbols?market=BTC +// https://openapi-v2.kucoin.com/api/v1/currencies for labels + +function kucoin_api_query($method, $params='', $returnType='object') +{ + $exchange = 'kucoin'; + $url = "https://openapi-v2.kucoin.com/api/v1/$method"; + if (!empty($params)) $url .= "?$params"; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch, CURLOPT_TIMEOUT, 30); + curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; KuCoin API PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); + curl_setopt($ch, CURLOPT_ENCODING , ''); + //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + + $res = curl_exec($ch); + if($res === false) { + $e = curl_error($ch); + debuglog("$exchange: $method $e"); + curl_close($ch); + return false; + } + + if ($returnType == 'object') + $ret = json_decode($res); + else + $ret = json_decode($res,true); + + if(!is_object($ret) && !is_array($ret)) { + $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); + debuglog("$exchange: $method failed ($status) ".strip_data($res)); + } + curl_close($ch); + return $ret; +} + +// https://openapi-v2.kucoin.com/api/v1/deposit-addresses?currency= + +function kucoin_api_user($method, $params=NULL, $isPostMethod=false) +{ + $exchange = 'kucoin'; + require_once('/etc/yiimp/keys.php'); + if (!defined('EXCH_KUCOIN_SECRET')) define('EXCH_KUCOIN_SECRET', ''); + + if (empty(EXCH_KUCOIN_KEY) || empty(EXCH_KUCOIN_SECRET)) return false; + if (empty(EXCH_KUCOIN_PASSPHRASE)) return false; + + $api_host = 'https://openapi-v2.kucoin.com'; + $mt = explode(' ', microtime()); + $nonce = $mt[1].substr($mt[0], 2, 3); + $url = $endpoint = "/api/v1/$method"; + + if (empty($params)) $params = array(); + $query = http_build_query($params); + $body = ""; + if ($isPostMethod) + $body = json_encode($params); + else if (strlen($query)) { + $body = '?'.$query; + $url .= $body; + } + + $req = $isPostMethod ? "POST" : "GET"; + $tosign = "{$nonce}{$req}{$endpoint}{$body}"; + $hmac = hash_hmac('sha256', $tosign, EXCH_KUCOIN_SECRET, true); + + $headers = array( + 'Content-Type: application/json;charset=UTF-8', + 'KC-API-KEY: '.EXCH_KUCOIN_KEY, + 'KC-API-PASSPHRASE: '.EXCH_KUCOIN_PASSPHRASE, + 'KC-API-TIMESTAMP: '.$nonce, + 'KC-API-SIGN: '.base64_encode($hmac), + ); + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $api_host.$url); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + if ($isPostMethod) { + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $params); + } + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch, CURLOPT_TIMEOUT, 30); + curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; KuCoin API PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); + curl_setopt($ch, CURLOPT_ENCODING , ''); + //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + //curl_setopt($ch, CURLOPT_VERBOSE, 1); + + $res = curl_exec($ch); + if($res === false) { + $e = curl_error($ch); + debuglog("$exchange: $method $e"); + curl_close($ch); + return false; + } + + $result = json_decode($res); + if(!is_object($result) && !is_array($result)) { + $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); + debuglog("$exchange: $method failed ($status) ".strip_data($res)); + } + + curl_close($ch); + + return $result; +} + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// manual update of one market +function kucoin_update_market($market) +{ + $exchange = 'kucoin'; + if (is_string($market)) + { + $symbol = $market; + $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); + if(!$coin) return false; + $pair = $symbol.'-BTC'; + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); + if(!$market) return false; + + } else if (is_object($market)) { + + $coin = getdbo('db_coins', $market->coinid); + if(!$coin) return false; + $symbol = $coin->getOfficialSymbol(); + $pair = $symbol.'-BTC'; + if (!empty($market->base_coin)) $pair = $symbol.'-'.$market->base_coin; + } + + $t1 = microtime(true); + $query = kucoin_api_query('market/orderbook/level1','symbol='.$pair); + if(!kucoin_result_valid($query)) return false; + $ticker = $query->data; + + $price2 = ((double) $ticker->bestBid + (double)$ticker->bestAsk)/2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bestBid); + $market->pricetime = min(time(), 0 + $ticker->sequence); + $market->save(); + + $apims = round((microtime(true) - $t1)*1000,3); + user()->setFlash('message', "$exchange $symbol price updated in $apims ms"); + + return true; +} diff --git a/web/yaamp/core/trading/kucoin_trading.php b/web/yaamp/core/trading/kucoin_trading.php index dd331823a..6b0389634 100644 --- a/web/yaamp/core/trading/kucoin_trading.php +++ b/web/yaamp/core/trading/kucoin_trading.php @@ -14,7 +14,7 @@ function doKuCoinTrading($quick=false) if (exchange_get($exchange, 'disabled')) return; - $data = kucoin_api_user('account/balance'); + $data = kucoin_api_user('accounts'); if (!kucoin_result_valid($data)) return; $savebalance = getdbosql('db_balances', "name='$exchange'"); @@ -22,19 +22,19 @@ function doKuCoinTrading($quick=false) if (is_array($data->data)) foreach($data->data as $balance) { - if ($balance->coinType == 'BTC') { + if ($balance->currency == 'BTC' && $balance->type == 'main') { if (is_object($savebalance)) { $savebalance->balance = $balance->balance; - $savebalance->onsell = $balance->freezeBalance; + $savebalance->onsell = $balance->holds; $savebalance->save(); } continue; } - if ($updatebalances) { + if ($updatebalances && $balance->type == 'main') { // store available balance in market table $coins = getdbolist('db_coins', "symbol=:symbol OR symbol2=:symbol", - array(':symbol'=>$balance->coinType) + array(':symbol'=>$balance->currency) ); if (empty($coins)) continue; foreach ($coins as $coin) { @@ -44,14 +44,14 @@ function doKuCoinTrading($quick=false) ); if (!$market) continue; $market->balance = $balance->balance; - $market->ontrade = $balance->freezeBalance; + $market->ontrade = $balance->holds; $market->balancetime = time(); $market->save(); $checked_today = cache()->get($exchange.'-deposit_address-check-'.$coin->symbol); if ($coin->installed && !$checked_today) { sleep(1); - $obj = kucoin_api_user("account/{$coin->symbol}/wallet/address"); + $obj = kucoin_api_user('deposit-addresses',array('currency'=>$coin->symbol)); if (!kucoin_result_valid($obj)) continue; $result = $obj->data; $deposit_address = objSafeVal($result,'address'); diff --git a/web/yaamp/core/trading/kucoin_trading.php.bak b/web/yaamp/core/trading/kucoin_trading.php.bak new file mode 100644 index 000000000..dd331823a --- /dev/null +++ b/web/yaamp/core/trading/kucoin_trading.php.bak @@ -0,0 +1,71 @@ +data)) + foreach($data->data as $balance) + { + if ($balance->coinType == 'BTC') { + if (is_object($savebalance)) { + $savebalance->balance = $balance->balance; + $savebalance->onsell = $balance->freezeBalance; + $savebalance->save(); + } + continue; + } + + if ($updatebalances) { + // store available balance in market table + $coins = getdbolist('db_coins', "symbol=:symbol OR symbol2=:symbol", + array(':symbol'=>$balance->coinType) + ); + if (empty($coins)) continue; + foreach ($coins as $coin) { + $market = getdbosql('db_markets', + "coinid=:coinid AND name='$exchange' ORDER BY balance" + , array(':coinid'=>$coin->id) + ); + if (!$market) continue; + $market->balance = $balance->balance; + $market->ontrade = $balance->freezeBalance; + $market->balancetime = time(); + $market->save(); + + $checked_today = cache()->get($exchange.'-deposit_address-check-'.$coin->symbol); + if ($coin->installed && !$checked_today) { + sleep(1); + $obj = kucoin_api_user("account/{$coin->symbol}/wallet/address"); + if (!kucoin_result_valid($obj)) continue; + $result = $obj->data; + $deposit_address = objSafeVal($result,'address'); + if (!empty($deposit_address) && $deposit_address != $market->deposit_address) { + debuglog("$exchange: updated {$coin->symbol} deposit address $deposit_address"); + $market->save(); + } + cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 24*3600); + } + } + } + } + + if (!YAAMP_ALLOW_EXCHANGE) return; + + // real trading, todo.. +} diff --git a/web/yaamp/core/trading/livecoin_trading.php b/web/yaamp/core/trading/livecoin_trading.php index 2eb5259a0..40676d2c7 100644 --- a/web/yaamp/core/trading/livecoin_trading.php +++ b/web/yaamp/core/trading/livecoin_trading.php @@ -105,7 +105,6 @@ function doLiveCoinTrading($quick = false) if ($quick) { $flushall = false; } - $min_btc_trade = exchange_get($exchange, 'trade_min_btc', 0.0001); $min_btc_trade = exchange_get($exchange, 'trade_min_btc', 0.0001); $sell_ask_pct = exchange_get($exchange, 'trade_sell_ask_pct', 1.05); diff --git a/web/yaamp/core/trading/livecoin_trading.php.bak b/web/yaamp/core/trading/livecoin_trading.php.bak new file mode 100644 index 000000000..2eb5259a0 --- /dev/null +++ b/web/yaamp/core/trading/livecoin_trading.php.bak @@ -0,0 +1,278 @@ +cancelLimitOrder($pair, $id); + + if ($res->success === TRUE) { + $db_order = getdbosql( + 'db_orders', + 'market=:market AND uuid=:uuid', + array(':market'=>'livecoin', ':uuid'=>$id) + ); + + if ($db_order) { + $db_order->delete(); + } + } +} + +function doLiveCoinTrading($quick = false) +{ + $exchange = 'livecoin'; + $updatebalances = true; + + if (exchange_get($exchange, 'disabled')) { + return; + } + + $livecoin = new LiveCoinApi; + + $savebalance = getdbosql('db_balances', "name='$exchange'"); + if (is_object($savebalance)) { + $savebalance->balance = 0; + $savebalance->save(); + } else { + dborun("INSERT INTO balances (name,balance) VALUES ('$exchange',0)"); + return; + } + + $balances = $livecoin->getBalances(); + if (!$balances || !is_array($balances)) { + return; + } + + foreach ($balances as $balance) { + if ($balance->currency == 'BTC' && $balance->type == "available") { + if (!is_object($savebalance)) continue; + $savebalance->balance = $balance->value; + $savebalance->save(); + continue; + } + if ($balance->currency == 'BTC' && $balance->type == "trade") { + if (!is_object($savebalance)) continue; + $savebalance->onsell = $balance->value; + $savebalance->save(); + continue; + } + + if ($updatebalances) { + // store available balance in market table + $coins = getdbolist( + 'db_coins', + 'symbol=:symbol OR symbol2=:symbol', + array(':symbol'=>$balance->currency) + ); + + if (empty($coins)) { + continue; + } + + foreach ($coins as $coin) { + $market = getdbosql('db_markets', "coinid=:coinid AND name='$exchange'", array(':coinid'=>$coin->id)); + + if (!$market) { + continue; + } + + if ($balance->type == 'available') { + $market->balance = arraySafeVal($balance, 'value', 0.0); + $market->balancetime = time(); + $market->save(); + } elseif ($balance->type == 'trade') { + $market->ontrade = arraySafeVal($balance, 'value', 0.0); + $market->balancetime = time(); + $market->save(); + } + + } + } + } + + if (!YAAMP_ALLOW_EXCHANGE) { + return; + } + + $flushall = rand(0, 8) == 0; + if ($quick) { + $flushall = false; + } + $min_btc_trade = exchange_get($exchange, 'trade_min_btc', 0.0001); + + $min_btc_trade = exchange_get($exchange, 'trade_min_btc', 0.0001); + $sell_ask_pct = exchange_get($exchange, 'trade_sell_ask_pct', 1.05); + $cancel_ask_pct = exchange_get($exchange, 'trade_cancel_ask_pct', 1.20); + + // upgrade orders + $coins = getdbolist('db_coins', "enable=1 AND IFNULL(dontsell,0)=0 AND id IN (SELECT DISTINCT coinid FROM markets WHERE name='livecoin')"); + foreach ($coins as $coin) { + if ($coin->dontsell || $coin->symbol == 'BTC') { + continue; + } + + $pair = $coin->symbol.'/BTC'; + sleep(1); + $orders = $livecoin->getClientOrders($pair, 'OPEN'); + + if (isset($orders->data)) { + $order_data = $orders->data; + } else { + $order_data = array(); + } + + foreach ($order_data as $order) { + $uuid = $order->id; + $pair = $order->currencyPair; + sleep(1); + $ticker = $livecoin->getTickerInfo($pair); + + if (!is_object($ticker) || !$order->price) { + continue; + } + + if ($order->price > $cancel_ask_pct*$ticker->best_ask || $flushall) { + sleep(1); + doLiveCoinCancelOrder($pair, $uuid, $livecoin); + } else { + $db_order = getdbosql( + 'db_orders', + 'market=:market AND uuid=:uuid', + array(':market'=>'livecoin', ':uuid'=>$uuid) + ); + + if ($db_order) { + continue; + } + + $db_order = new db_orders; + $db_order->market = 'livecoin'; + $db_order->coinid = $coin->id; + $db_order->amount = $order->quantity; + $db_order->price = $order->price; + $db_order->ask = $ticker->best_ask; + $db_order->bid = $ticker->best_sell; + $db_order->uuid = $uuid; + $db_order->created = time(); + $db_order->save(); + } + } + $list = getdbolist('db_orders', "coinid=$coin->id and market='livecoin'"); + foreach ($list as $db_order) { + $found = false; + foreach ($order_data as $order) { + $uuid = $order->id; + if ($uuid == $db_order->uuid) { + $found = true; + break; + } + } + if (!$found) { + debuglog("LiveCoin: Deleting order $coin->name $db_order->amount"); + $db_order->delete(); + } + } + } + sleep(2); + + /* Update balances and sell */ + if (!$balances) { + return; + } + + foreach ($balances as $balance) { + if ($balance->type != 'available') { + continue; + } + + $amount = $balance->value; + $symbol = $balance->currency; + if ($symbol == 'BTC') { + continue; + } + + $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); + if (!$coin || $coin->dontsell) { + continue; + } + + $market2 = getdbosql('db_markets', "coinid={$coin->id} AND (name='bittrex' OR name='poloniex')"); + if ($market2) { + continue; + } + + $market = getdbosql('db_markets', "coinid=$coin->id and name='livecoin'"); + if ($market) { + $market->lasttraded = time(); + $market->save(); + } + + if ($amount*$coin->price < $min_btc_trade) { + continue; + } + + sleep(1); + + $pair = "$symbol/BTC"; + $ticker = $livecoin->getTickerInfo($pair); + if(!(isset($ticker->best_bid) && isset($ticker->best_ask))) continue; + if($coin->sellonbid) + $sellprice = bitcoinvaluetoa($ticker->best_bid); + else + $sellprice = bitcoinvaluetoa($ticker->best_ask * $sell_ask_pct); + + if ($amount*$sellprice > $min_btc_trade) { + debuglog("LiveCoin: Selling market $pair, $sellprice, $sellprice"); + sleep(1); + + $res = $livecoin->sellLimit($pair, $sellprice, $amount); + if (!($res->success === TRUE && $res->added === TRUE)) { + debuglog('LiveCoin: Sell failed'); + continue; + } + } + + $db_order = new db_orders; + $db_order->market = 'livecoin'; + $db_order->coinid = $coin->id; + $db_order->amount = $amount; + $db_order->price = $sellprice; + $db_order->ask = $ticker->best_ask; + $db_order->bid = $ticker->best_bid; + $db_order->uuid = $res->orderId; + $db_order->created = time(); + $db_order->save(); + } + + /* Withdrawals */ + $btcaddr = YAAMP_BTCADDRESS; + $withdraw_min = exchange_get($exchange, 'withdraw_min_btc', EXCH_AUTO_WITHDRAW); + $withdraw_fee = exchange_get($exchange, 'withdraw_fee_btc', 0.0005); + if (floatval($withdraw_min) > 0 && $savebalance->balance >= ($withdraw_min + $withdraw_fee)) { + $amount = $savebalance->balance - $withdraw_fee; + debuglog("$exchange: withdraw $amount BTC to $btcaddr"); + sleep(1); + $res = $livecoin->withdrawCoin($amount, 'BTC', $btcaddr); + debuglog("$exchange: withdraw ".json_encode($res)); + if (is_object($res)) { + $withdraw = new db_withdraws; + $withdraw->market = 'livecoin'; + $withdraw->address = $btcaddr; + $withdraw->amount = $amount; + $withdraw->time = time(); + $withdraw->uuid = $res->id; + $withdraw->save(); + $savebalance->balance = 0; + $savebalance->save(); + } else { + debuglog("$exchange: Withdraw Failed ".json_encode($res)); + } + } +} diff --git a/web/yaamp/core/trading/trading.php b/web/yaamp/core/trading/trading.php index e3e56a8ae..1dab4d7fe 100644 --- a/web/yaamp/core/trading/trading.php +++ b/web/yaamp/core/trading/trading.php @@ -2,16 +2,13 @@ require_once('poloniex_trading.php'); require_once('binance_trading.php'); require_once('bittrex_trading.php'); -require_once('bitzv2_trading.php'); require_once('bleutrade_trading.php'); -require_once('bter_trading.php'); require_once('c-cex_trading.php'); require_once('kraken_trading.php'); require_once('yobit_trading.php'); require_once('alcurex_trading.php'); require_once('coinsmarkets_trading.php'); require_once('crex24_trading.php'); -require_once('cryptobridge_trading.php'); require_once('cryptopia_trading.php'); require_once('hitbtc_trading.php'); require_once('kucoin_trading.php'); @@ -36,9 +33,6 @@ function cancelExchangeOrder($order=false) case 'bittrex': doBittrexCancelOrder($order->uuid); break; - case 'bitz': - doBitzCancelOrder($order->uuid); - break; case 'bleutrade': doBleutradeCancelOrder($order->uuid); break; @@ -57,6 +51,7 @@ function cancelExchangeOrder($order=false) case 'livecoin': doLiveCoinCancelOrder($order->uuid); break; + } } @@ -76,11 +71,6 @@ function runExchange($exchangeName=false) updateBinanceMarkets(); break; - case 'bter': - doBterTrading(true); - updateBterMarkets(); - break; - case 'crex24': doCrex24Trading(true); updateCrex24Markets(); @@ -92,7 +82,6 @@ function runExchange($exchangeName=false) break; case 'cryptobridge': - doCryptobridgeTrading(true); updateCryptoBridgeMarkets(); break; @@ -104,9 +93,7 @@ function runExchange($exchangeName=false) doBittrexTrading(true); updateBittrexMarkets(); break; - case 'bitz': - doBitzTrading(true); updateBitzMarkets(); break; @@ -173,7 +160,6 @@ function runExchange($exchangeName=false) updatePoloniexMarkets(); break; - default: debuglog(__FUNCTION__.' '.$exchangeName.' not implemented'); } diff --git a/web/yaamp/core/trading/trading.php.bak b/web/yaamp/core/trading/trading.php.bak new file mode 100644 index 000000000..e3e56a8ae --- /dev/null +++ b/web/yaamp/core/trading/trading.php.bak @@ -0,0 +1,181 @@ +market) + { + case 'yobit': + doYobitCancelOrder($order->uuid); + break; + case 'binance': + doBinanceCancelOrder($order->uuid); + break; + case 'c-cex': + doCCexCancelOrder($order->uuid); + break; + case 'bittrex': + doBittrexCancelOrder($order->uuid); + break; + case 'bitz': + doBitzCancelOrder($order->uuid); + break; + case 'bleutrade': + doBleutradeCancelOrder($order->uuid); + break; + case 'crex24': + doCrex24CancelOrder($order->uuid); + break; + case 'cryptopia': + doCryptopiaCancelOrder($order->uuid); + break; + case 'hitbtc': + doHitBTCCancelOrder($order->uuid); + break; + case 'kucoin': + doKuCoinCancelOrder($order->uuid); + break; + case 'livecoin': + doLiveCoinCancelOrder($order->uuid); + break; + } +} + +function runExchange($exchangeName=false) +{ + if (!empty($exchangeName)) + { + switch($exchangeName) + { + case 'alcurex': + //doAlcurexTrading(true); + updateAlcurexMarkets(); + break; + + case 'binance': + doBinanceTrading(true); + updateBinanceMarkets(); + break; + + case 'bter': + doBterTrading(true); + updateBterMarkets(); + break; + + case 'crex24': + doCrex24Trading(true); + updateCrex24Markets(); + break; + + case 'cryptopia': + doCryptopiaTrading(true); + updateCryptopiaMarkets(); + break; + + case 'cryptobridge': + doCryptobridgeTrading(true); + updateCryptoBridgeMarkets(); + break; + + case 'bitstamp': + getBitstampBalances(); + break; + + case 'bittrex': + doBittrexTrading(true); + updateBittrexMarkets(); + break; + + case 'bitz': + doBitzTrading(true); + updateBitzMarkets(); + break; + + case 'cexio': + getCexIoBalances(); + break; + + case 'c-cex': + doCCexTrading(true); + updateCCexMarkets(); + break; + + case 'coinexchange': + updateCoinExchangeMarkets(); + break; + + case 'coinsmarkets': + doCoinsMarketsTrading(true); + updateCoinsMarketsMarkets(); + break; + + case 'empoex': + //doEmpoexTrading(true); + //updateEmpoexMarkets(); + break; + + case 'yobit': + doYobitTrading(true); + updateYobitMarkets(); + break; + + case 'bleutrade': + doBleutradeTrading(true); + updateBleutradeMarkets(); + break; + + case 'hitbtc': + doHitBTCTrading(true); + updateHitBTCMarkets(); + break; + + case 'kraken': + doKrakenTrading(true); + updateKrakenMarkets(); + break; + + case 'kucoin': + doKuCoinTrading(true); + updateKucoinMarkets(); + break; + + case 'livecoin': + doLiveCoinTrading(true); + updateLiveCoinMarkets(); + break; + + case 'nova': + doNovaTrading(true); + updateNovaMarkets(); + break; + + case 'poloniex': + doPoloniexTrading(true); + updatePoloniexMarkets(); + break; + + + default: + debuglog(__FUNCTION__.' '.$exchangeName.' not implemented'); + } + } +} diff --git a/web/yaamp/defaultconfig.php b/web/yaamp/defaultconfig.php index 8afbe3f9d..5a41749be 100644 --- a/web/yaamp/defaultconfig.php +++ b/web/yaamp/defaultconfig.php @@ -11,6 +11,8 @@ if (!defined('YAAMP_DBUSER')) define('YAAMP_DBUSER', 'root'); if (!defined('YAAMP_DBPASSWORD')) define('YAAMP_DBPASSWORD', ''); +if (!defined('YIIMP_MYSQLDUMP_PATH')) define('YIIMP_MYSQLDUMP_PATH', '/root/backup'); + if (!defined('YIIMP_PUBLIC_EXPLORER')) define('YIIMP_PUBLIC_EXPLORER', true); if (!defined('YIIMP_PUBLIC_BENCHMARK')) define('YIIMP_PUBLIC_BENCHMARK', false); if (!defined('YIIMP_FIAT_ALTERNATIVE')) define('YIIMP_FIAT_ALTERNATIVE', 'EUR'); @@ -31,18 +33,17 @@ if (!defined('EXCH_BITSTAMP_ID')) define('EXCH_BITSTAMP_ID', ''); if (!defined('EXCH_BITSTAMP_KEY')) define('EXCH_BITSTAMP_KEY',''); if (!defined('EXCH_BLEUTRADE_KEY')) define('EXCH_BLEUTRADE_KEY', ''); -if (!defined('EXCH_BTER_KEY')) define('EXCH_BTER_KEY', ''); if (!defined('EXCH_CCEX_KEY')) define('EXCH_CCEX_KEY', ''); if (!defined('EXCH_CEXIO_ID')) define('EXCH_CEXIO_ID', ''); if (!defined('EXCH_CEXIO_KEY')) define('EXCH_CEXIO_KEY', ''); if (!defined('EXCH_CREX24_KEY')) define('EXCH_CREX24_KEY', ''); -if (!defined('EXCH_CRYPTOBRIDGE_ID')) define('EXCH_CRYPTOBRIDGE_ID', ''); if (!defined('EXCH_CRYPTOPIA_KEY')) define('EXCH_CRYPTOPIA_KEY', ''); if (!defined('EXCH_HITBTC_KEY')) define('EXCH_HITBTC_KEY', ''); if (!defined('EXCH_POLONIEX_KEY')) define('EXCH_POLONIEX_KEY', ''); if (!defined('EXCH_YOBIT_KEY')) define('EXCH_YOBIT_KEY', ''); if (!defined('EXCH_KRAKEN_KEY')) define('EXCH_KRAKEN_KEY', ''); if (!defined('EXCH_KUCOIN_KEY')) define('EXCH_KUCOIN_KEY', ''); +if (!defined('EXCH_KUCOIN_PASSPHRASE')) define('EXCH_KUCOIN_PASSPHRASE', ''); if (!defined('EXCH_LIVECOIN_KEY')) define('EXCH_LIVECOIN_KEY', ''); if (!defined('EXCH_NOVA_KEY')) define('EXCH_NOVA_KEY', ''); if (!defined('EXCH_STOCKSEXCHANGE_KEY')) define('EXCH_STOCKSEXCHANGE_KEY', ''); diff --git a/web/yaamp/defaultconfig.php.bak b/web/yaamp/defaultconfig.php.bak new file mode 100644 index 000000000..8afbe3f9d --- /dev/null +++ b/web/yaamp/defaultconfig.php.bak @@ -0,0 +1,76 @@ +memcache->memcache, 'apache_locked'); + if($apache_locked) return; + + $b = preg_match('/load average: (.*)$/', $uptime, $m); + if(!$b) return; + + $e = explode(', ', $m[1]); + + $webserver = 'nginx'; + $res = exec("pgrep $webserver"); + $webserver_running = !empty($res); + + if($e[0] > 4 && $webserver_running) + { + debuglog('server overload!'); + // debuglog('stopping webserver'); + // system("service $webserver stop"); + sleep(1); + } + + else if(!$webserver_running) + { + debuglog('starting webserver'); + system("service $webserver start"); + } + } + + public function actionRunBlocks() + { +// screenlog(__FUNCTION__); + set_time_limit(0); + + $this->monitorApache(); + + $last_complete = memcache_get($this->memcache->memcache, "cronjob_block_time_start"); + if($last_complete+(5*60) < time()) + dborun("update jobs set active=false"); + BackendBlockFind1(); + if(!memcache_get($this->memcache->memcache, 'balances_locked')) { + BackendClearEarnings(); + } + BackendRentingUpdate(); + BackendProcessList(); + BackendBlocksUpdate(); + + memcache_set($this->memcache->memcache, "cronjob_block_time_start", time()); +// screenlog(__FUNCTION__.' done'); + } + + public function actionRunLoop2() + { +// screenlog(__FUNCTION__); + set_time_limit(0); + + $this->monitorApache(); + + BackendCoinsUpdate(); + BackendStatsUpdate(); + BackendUsersUpdate(); + + BackendUpdateServices(); + BackendUpdateDeposit(); + + MonitorBTC(); + + $last = memcache_get($this->memcache->memcache, 'last_renting_payout2'); + if($last + 5*60 < time() && !memcache_get($this->memcache->memcache, 'balances_locked')) + { + memcache_set($this->memcache->memcache, 'last_renting_payout2', time()); + BackendRentingPayout(); + } + + $last = memcache_get($this->memcache->memcache, 'last_stats2'); + if($last + 5*60 < time()) + { + memcache_set($this->memcache->memcache, 'last_stats2', time()); + BackendStatsUpdate2(); + } + + memcache_set($this->memcache->memcache, "cronjob_loop2_time_start", time()); +// screenlog(__FUNCTION__.' done'); + } + + public function actionRun() + { +// debuglog(__METHOD__); + set_time_limit(0); + +// BackendRunCoinActions(); + + $state = memcache_get($this->memcache->memcache, 'cronjob_main_state'); + if(!$state) $state = 0; + + memcache_set($this->memcache->memcache, 'cronjob_main_state', $state+1); + memcache_set($this->memcache->memcache, "cronjob_main_state_$state", 1); + + switch($state) + { + case 0: + updateRawcoins(); + + $btcusd = bitstamp_btcusd(); + if($btcusd) { + $mining = getdbosql('db_mining'); + if (!$mining) $mining = new db_mining; + $mining->usdbtc = $btcusd; + $mining->save(); + } + + break; + + case 1: + if(!YAAMP_PRODUCTION) break; + + getBitstampBalances(); + getCexIoBalances(); + doBittrexTrading(); + doBitzTrading(); + doCrex24Trading(); + doCryptopiaTrading(); + doKrakenTrading(); + doLiveCoinTrading(); + doPoloniexTrading(); + break; + + case 2: + if(!YAAMP_PRODUCTION) break; + + doBinanceTrading(); + doCCexTrading(); + doBterTrading(); + doBleutradeTrading(); + doCryptobridgeTrading(); + doKuCoinTrading(); + doNovaTrading(); + doYobitTrading(); + doCoinsMarketsTrading(); + break; + + case 3: + BackendPricesUpdate(); + BackendWatchMarkets(); + break; + + case 4: + BackendBlocksUpdate(); + break; + + case 5: + TradingSellCoins(); + break; + + case 6: + BackendBlockFind2(); + BackendUpdatePoolBalances(); + break; + + case 7: + NotifyCheckRules(); + BenchUpdateChips(); + break; + + default: + memcache_set($this->memcache->memcache, 'cronjob_main_state', 0); + BackendQuickClean(); + + $t = memcache_get($this->memcache->memcache, "cronjob_main_start_time"); + $n = time(); + + memcache_set($this->memcache->memcache, "cronjob_main_time", $n-$t); + memcache_set($this->memcache->memcache, "cronjob_main_start_time", $n); + } + + debuglog(__METHOD__." $state"); + memcache_set($this->memcache->memcache, "cronjob_main_state_$state", 0); + + memcache_set($this->memcache->memcache, "cronjob_main_time_start", time()); + if(!YAAMP_PRODUCTION) return; + + /////////////////////////////////////////////////////////////////// + + $mining = getdbosql('db_mining'); + if($mining->last_payout + YAAMP_PAYMENTS_FREQ > time()) return; + + debuglog("--------------------------------------------------------"); + + $mining->last_payout = time(); + $mining->save(); + + memcache_set($this->memcache->memcache, 'apache_locked', true); + if(YAAMP_USE_NGINX) + system("service nginx stop"); + + sleep(10); + BackendDoBackup(); + memcache_set($this->memcache->memcache, 'apache_locked', false); + + // prevent user balances changes during payments (blocks thread) + memcache_set($this->memcache->memcache, 'balances_locked', true, 0, 300); + BackendPayments(); + memcache_set($this->memcache->memcache, 'balances_locked', false); + + BackendCleanDatabase(); + + // BackendOptimizeTables(); + debuglog('payments sequence done'); + } + +} From c0f6db69ad703451affcf35073c13422beeb4fe1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 2 Apr 2019 13:18:57 -0400 Subject: [PATCH 452/576] Update stratum.cpp --- stratum/stratum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 87ca78dd7..725b4161f 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -149,7 +149,7 @@ YAAMP_ALGO g_algos[] = {"luffa", luffa_hash, 1, 0, 0}, {"lyra2", lyra2re_hash, 0x80, 0, 0}, {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, - {"lyra2v3", lyra2re3_hash, 0x100, 0, 0}, + {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, {"lyra2z", lyra2z_hash, 0x100, 0, 0}, {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, From e345e018173e4dc4d163599d00bf74b7a02c7b27 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 2 Apr 2019 13:24:59 -0400 Subject: [PATCH 453/576] Update stratum.h --- stratum/stratum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/stratum.h b/stratum/stratum.h index 621ebaef2..b7f287362 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -185,7 +185,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/luffa.h" #include "algos/lyra2re.h" #include "algos/lyra2v2.h" -#include "algos/lyra2re3.h" +#include "algos/lyra2v3.h" #include "algos/lyra2vc0ban.h" #include "algos/lyra2z.h" #include "algos/lyra2zz.h" From 5c28e2a7d4158b4900098b3eee025e9c4e81342d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 2 Apr 2019 13:31:17 -0400 Subject: [PATCH 454/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index b7f287362..bc1702e1c 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -156,6 +156,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/allium.h" #include "algos/argon2d.h" #include "algos/argon2m.h" +#include "algos/argon2d-dyn.h" #include "algos/balloon.h" #include "algos/bastion.h" #include "algos/bcd.h" From 3f3cbd7b0a9412a0c8670af39d569e86a23715a5 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 2 Apr 2019 13:31:58 -0400 Subject: [PATCH 455/576] Update stratum.cpp --- stratum/stratum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 725b4161f..b6999ff5d 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -117,6 +117,7 @@ YAAMP_ALGO g_algos[] = {"aergo", aergo_hash, 1, 0, 0}, {"allium", allium_hash, 0x100, 0, 0}, {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, + {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation {"argon2m", argon2m_hash, 0x10000, 0, 0}, {"balloon", balloon_hash, 1, 0, 0}, {"bastion", bastion_hash, 1, 0 }, From 25672e7ce5304c34b95878062f378542140d8328 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 2 Apr 2019 13:35:59 -0400 Subject: [PATCH 456/576] Update stratum.h --- stratum/stratum.h | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/stratum.h b/stratum/stratum.h index bc1702e1c..b7f287362 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -156,7 +156,6 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/allium.h" #include "algos/argon2d.h" #include "algos/argon2m.h" -#include "algos/argon2d-dyn.h" #include "algos/balloon.h" #include "algos/bastion.h" #include "algos/bcd.h" From 7460cb22eb6ab65e8f3e682fb6b436c364281844 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 2 Apr 2019 13:39:10 -0400 Subject: [PATCH 457/576] Update makefile --- stratum/algos/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 42ad2d536..60616cb2d 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -19,7 +19,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ - hive.c pomelo.c hex.c argon2d-dyn.c argon2m.c argon2d.c geek.c balloon.c \ + hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ From e6adb7270d1a265bcd05596147c4cf8416c7e262 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 2 Apr 2019 15:00:50 -0400 Subject: [PATCH 458/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 3ec21b1f8..b4e1bc489 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -97,7 +97,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - char script2[32] = "7969696d7000"; // "yiimp\0" in hex ascii + char script2[32] = "746865706f6f6c2e6c69666500"; // "yiimp\0" in hex ascii if(!coind->pos && !coind->isaux && templ->auxs_size) coinbase_aux(templ, script2); From 8f2be3596465000795d243c332e733dc06288360 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 19 Apr 2019 15:19:39 -0400 Subject: [PATCH 459/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index b4e1bc489..3ec21b1f8 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -97,7 +97,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - char script2[32] = "746865706f6f6c2e6c69666500"; // "yiimp\0" in hex ascii + char script2[32] = "7969696d7000"; // "yiimp\0" in hex ascii if(!coind->pos && !coind->isaux && templ->auxs_size) coinbase_aux(templ, script2); From f5b885f55c783f16de1aa089ac42581ac23e9bce Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 19 Apr 2019 16:24:07 -0400 Subject: [PATCH 460/576] Update db.cpp --- stratum/db.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stratum/db.cpp b/stratum/db.cpp index 55cb0621c..0a46976a3 100644 --- a/stratum/db.cpp +++ b/stratum/db.cpp @@ -207,6 +207,7 @@ void db_update_coinds(YAAMP_DB *db) YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, atoi(row[0])); if(!coind) { + if (!strlen(g_stratum_coin_include) || (strlen(g_stratum_coin_include) && strstr(g_stratum_coin_include, row[20]))) coind = new YAAMP_COIND; memset(coind, 0, sizeof(YAAMP_COIND)); @@ -214,6 +215,9 @@ void db_update_coinds(YAAMP_DB *db) coind->newblock = true; coind->id = atoi(row[0]); coind->aux.coind = coind; + } + else + continue; } else coind->newcoind = false; From 28c2a62f9005edeab7202055461ffb72c15f8ab2 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 19 Apr 2019 16:25:54 -0400 Subject: [PATCH 461/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 3ec21b1f8..b4e1bc489 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -97,7 +97,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - char script2[32] = "7969696d7000"; // "yiimp\0" in hex ascii + char script2[32] = "746865706f6f6c2e6c69666500"; // "yiimp\0" in hex ascii if(!coind->pos && !coind->isaux && templ->auxs_size) coinbase_aux(templ, script2); From 36728c9df937df2de5a6f99bef207647349b08b3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 19 Apr 2019 16:28:05 -0400 Subject: [PATCH 462/576] Update db.cpp --- stratum/db.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stratum/db.cpp b/stratum/db.cpp index 0a46976a3..a2b3b59c7 100644 --- a/stratum/db.cpp +++ b/stratum/db.cpp @@ -207,7 +207,8 @@ void db_update_coinds(YAAMP_DB *db) YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, atoi(row[0])); if(!coind) { - if (!strlen(g_stratum_coin_include) || (strlen(g_stratum_coin_include) && strstr(g_stratum_coin_include, row[20]))) + if (!strlen(g_stratum_coin_include) || (strlen(g_stratum_coin_include) && strstr(g_stratum_coin_include, row[20]))) + { coind = new YAAMP_COIND; memset(coind, 0, sizeof(YAAMP_COIND)); From f453b94af1002592830edfb0912db072d75b1cf1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 19 Apr 2019 22:49:08 -0400 Subject: [PATCH 463/576] Update coinbase.cpp --- stratum/coinbase.cpp | 83 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 14 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index b4e1bc489..40f3e935e 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -27,6 +27,20 @@ static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char strcat(data, coinb2_part); } + +static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + encode_tx_value(evalue, amount); + sprintf(coinb2_part, "%s", script); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) { int ol = strlen(data); @@ -94,6 +108,10 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if(coind->txmessage) strcpy(eversion1, "02000000"); + const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); + if(coinbase_payload && strlen(coinbase_payload) > 0) + strcpy(eversion1, "03000500"); + char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); @@ -484,8 +502,14 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if(superblocks_enabled && superblock) { for(int i = 0; i < superblock->u.array.length; i++) { const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + const char *script = json_get_string(superblock->u.array.values[i], "script"); json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { npayees++; available -= amount; base58_decode(payee, script_payee); @@ -498,19 +522,44 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } } } - if (masternode_enabled && masternode) { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount && started) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); + + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (masternode_enabled && masternode && started) { + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i++) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + const char *script = json_get_string(masternode->u.array.values[i], "script"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + } } } sprintf(payees, "%02x", npayees); @@ -519,6 +568,12 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * strcat(templ->coinb2, script_dests); job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime + if(coinbase_payload && strlen(coinbase_payload) > 0) { + char coinbase_payload_size[18]; + ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload); + } coind->reward = (double)available/100000000*coind->reward_mul; //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); From 508971986795c349bda24d2712cb5dd0d229d6c3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 19 Apr 2019 23:01:59 -0400 Subject: [PATCH 464/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 40f3e935e..147a74901 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -572,7 +572,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char coinbase_payload_size[18]; ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); strcat(templ->coinb2, coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload); + strcat(templ->coinb2, coinbase_payload); strcat(templ->coinb2, coinbase_payload); } coind->reward = (double)available/100000000*coind->reward_mul; //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); From 2501b32b9d251b2e3869f19bdc56880c01dd8466 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 22 Apr 2019 19:49:51 -0400 Subject: [PATCH 465/576] updates rfv2 --- stratum/algos/makefile | 4 +- stratum/algos/makefile.bak | 2 +- stratum/algos/rfv2.c | 13 + stratum/algos/rfv2.h | 16 + stratum/algos/rfv2/rf_aes2r.c | 205 +++++++ stratum/algos/rfv2/rf_crc32.c | 164 +++++ stratum/algos/rfv2/rfv2.h | 53 ++ stratum/algos/rfv2/rfv2_core.c | 795 +++++++++++++++++++++++++ stratum/algos/sm3.c | 220 +++++++ stratum/algos/sm3.h | 109 ++++ stratum/client_submit.cpp | 109 ++-- stratum/client_submit.cpp.bak | 594 ++++++++++++++++++ stratum/coinbase.cpp | 85 ++- stratum/db.cpp | 5 + stratum/stratum.cpp | 1 + stratum/stratum.cpp.bak | 486 +++++++++++++++ stratum/stratum.h | 1 + stratum/stratum.h.bak | 235 ++++++++ web/yaamp/core/functions/yaamp.php | 3 + web/yaamp/core/functions/yaamp.php.bak | 690 +++++++++++++++++++++ 20 files changed, 3709 insertions(+), 81 deletions(-) create mode 100644 stratum/algos/rfv2.c create mode 100644 stratum/algos/rfv2.h create mode 100644 stratum/algos/rfv2/rf_aes2r.c create mode 100644 stratum/algos/rfv2/rf_crc32.c create mode 100644 stratum/algos/rfv2/rfv2.h create mode 100644 stratum/algos/rfv2/rfv2_core.c create mode 100644 stratum/algos/sm3.c create mode 100644 stratum/algos/sm3.h create mode 100644 stratum/client_submit.cpp.bak create mode 100644 stratum/stratum.cpp.bak create mode 100644 stratum/stratum.h.bak create mode 100644 web/yaamp/core/functions/yaamp.php.bak diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 60616cb2d..f97e4e574 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -10,7 +10,7 @@ LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ - x22i.c SWIFFTX/SWIFFTX.c \ + x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ @@ -20,7 +20,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ - phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ + phi.c phi2.c polytimos.c rainforest.c rfv2.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index b83e11b0d..60616cb2d 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -8,7 +8,7 @@ CXXFLAGS = -O2 -I.. -march=native CFLAGS= $(CXXFLAGS) -std=gnu99 LDFLAGS=-O2 -lgmp -SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c lyra2v3.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ +SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ diff --git a/stratum/algos/rfv2.c b/stratum/algos/rfv2.c new file mode 100644 index 000000000..125f61ed2 --- /dev/null +++ b/stratum/algos/rfv2.c @@ -0,0 +1,13 @@ +#include +#include +#include +#include + +#include "rfv2/rfv2.h" + +void rfv2_hash_yiimp(const char* input, char* output, uint32_t len) +{ + char hash[64]; + rfv2_hash(hash, input, len, NULL, NULL); + memcpy(output, &hash, 32); +} diff --git a/stratum/algos/rfv2.h b/stratum/algos/rfv2.h new file mode 100644 index 000000000..8c858a8d7 --- /dev/null +++ b/stratum/algos/rfv2.h @@ -0,0 +1,16 @@ +#ifndef RFV2_H +#define RFV2_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void rfv2_hash_yiimp(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/rfv2/rf_aes2r.c b/stratum/algos/rfv2/rf_aes2r.c new file mode 100644 index 000000000..c45934668 --- /dev/null +++ b/stratum/algos/rfv2/rf_aes2r.c @@ -0,0 +1,205 @@ +#include + +// Two round implementation optimized for x86_64+AES-NI and ARMv8+crypto +// extensions. Test pattern : +// +// Plaintext: +// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +// +// Ciphertext (encryption result): +// 0x16, 0xcd, 0xb8, 0x7a, 0xc6, 0xae, 0xdb, 0x19, 0xe9, 0x32, 0x47, 0x85, 0x39, 0x51, 0x24, 0xe6 +// +// Plaintext (decryption result): +// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +/* Rijndael's substitution box for sub_bytes step */ +static uint8_t SBOX[256] = { + 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, + 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, + 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, + 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, + 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, + 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, + 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, + 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, + 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, + 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, + 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, + 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, + 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, + 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, + 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, + 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 +}; + +/*--- The parts below are not used when crypto extensions are available ---*/ +/* Use -march=armv8-a+crypto on ARMv8 to use crypto extensions */ +/* Use -maes on x86_64 to use AES-NI */ +#if defined(RF_NOASM) || (!defined(__aarch64__) || !defined(__ARM_FEATURE_CRYPTO)) && (!defined(__x86_64__) || !defined(__AES__)) + +/* shifts to do for shift_rows step */ +static uint8_t shifts[16] = { + 0, 5, 10, 15, + 4, 9, 14, 3, + 8, 13, 2, 7, + 12, 1, 6, 11 +}; + +/* add the round key to the state with simple XOR operation */ +static void add_round_key(uint8_t * state, const uint8_t * rkey) +{ + uint8_t i; + + for (i = 0; i < 16; i++) + state[i] ^= rkey[i]; +} + +/* substitute all bytes using Rijndael's substitution box */ +static void sub_bytes(uint8_t * state) +{ + uint8_t i; + + for (i = 0; i < 16; i++) + state[i] = SBOX[state[i]]; +} + +/* imagine the state not as 1-dimensional, but a 4x4 grid; + * this step shifts the rows of this grid around */ +static void shift_rows(uint8_t * state) +{ + uint8_t temp[16]; + uint8_t i; + + for (i = 0; i < 16; i++) + temp[i] = state[shifts[i]]; + + for (i = 0; i < 16; i++) + state[i] = temp[i]; +} + +/* mix columns */ +static void mix_columns(uint8_t * state) +{ + uint8_t a[4]; + uint8_t b[4]; + uint8_t h, i, k; + + for (k = 0; k < 4; k++) { + for (i = 0; i < 4; i++) { + a[i] = state[i + 4 * k]; + h = state[i + 4 * k] & 0x80; /* hi bit */ + b[i] = state[i + 4 * k] << 1; + + if (h == 0x80) + b[i] ^= 0x1b; /* Rijndael's Galois field */ + } + + state[4 * k] = b[0] ^ a[3] ^ a[2] ^ b[1] ^ a[1]; + state[1 + 4 * k] = b[1] ^ a[0] ^ a[3] ^ b[2] ^ a[2]; + state[2 + 4 * k] = b[2] ^ a[1] ^ a[0] ^ b[3] ^ a[3]; + state[3 + 4 * k] = b[3] ^ a[2] ^ a[1] ^ b[0] ^ a[0]; + } +} +#endif // (!defined(__aarch64__) || !defined(__ARM_FEATURE_CRYPTO)) && (!defined(__x86_64__) || !defined(__AES__)) + + +/* key schedule stuff */ + +/* simple function to rotate 4 byte array */ +static inline uint32_t rotate32(uint32_t in) +{ +#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + in = (in >> 8) | (in << 24); +#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + in = (in << 8) | (in >> 24); +#else + uint8_t *b = (uint8_t *)&in, temp = b[0]; + b[0] = b[1]; b[1] = b[2]; b[2] = b[3]; b[3] = temp; +#endif + return in; +} + +/* key schedule core operation */ +static inline uint32_t sbox(uint32_t in, uint8_t n) +{ + in = (SBOX[in & 255]) | (SBOX[(in >> 8) & 255] << 8) | (SBOX[(in >> 16) & 255] << 16) | (SBOX[(in >> 24) & 255] << 24); +#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + in ^= n; +#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + in ^= n << 24; +#else + *(uint8_t *)&in ^= n; +#endif + return in; +} + +// this version is optimized for exactly two rounds. +// _state_ must be 16-byte aligned. +static inline void aes2r_encrypt(uint8_t * state, const uint8_t * key) +{ + uint32_t RF_ALIGN(16) key_schedule[12]; + uint32_t t; + + /* initialize key schedule; its first 16 bytes are the key */ + key_schedule[0] = ((uint32_t *)key)[0]; + key_schedule[1] = ((uint32_t *)key)[1]; + key_schedule[2] = ((uint32_t *)key)[2]; + key_schedule[3] = ((uint32_t *)key)[3]; + t = key_schedule[3]; + + t = rotate32(t); + t = sbox(t, 1); + t = key_schedule[4] = key_schedule[0] ^ t; + t = key_schedule[5] = key_schedule[1] ^ t; + t = key_schedule[6] = key_schedule[2] ^ t; + t = key_schedule[7] = key_schedule[3] ^ t; + + t = rotate32(t); + t = sbox(t, 2); + t = key_schedule[8] = key_schedule[4] ^ t; + t = key_schedule[9] = key_schedule[5] ^ t; + t = key_schedule[10] = key_schedule[6] ^ t; + t = key_schedule[11] = key_schedule[7] ^ t; + + // Use -march=armv8-a+crypto+crc to get this one +#if !defined(RF_NOASM) && defined(__aarch64__) && defined(__ARM_FEATURE_CRYPTO) + __asm__ volatile( + "ld1 {v0.16b},[%0] \n" + "ld1 {v1.16b,v2.16b,v3.16b},[%1] \n" + "aese v0.16b,v1.16b \n" // round1: add_round_key,sub_bytes,shift_rows + "aesmc v0.16b,v0.16b \n" // round1: mix_columns + "aese v0.16b,v2.16b \n" // round2: add_round_key,sub_bytes,shift_rows + "eor v0.16b,v0.16b,v3.16b \n" // finish: add_round_key + "st1 {v0.16b},[%0] \n" + : /* only output is in *state */ + : "r"(state), "r"(key_schedule) + : "v0", "v1", "v2", "v3", "cc", "memory"); + + // Use -maes to get this one +#elif !defined(RF_NOASM) && defined(__x86_64__) && defined(__AES__) + __asm__ volatile( + "movups (%0), %%xmm0 \n" + "movups (%1), %%xmm1 \n" + "pxor %%xmm1,%%xmm0 \n" // add_round_key(state, key_schedule) + "movups 16(%1),%%xmm2 \n" + "movups 32(%1),%%xmm1 \n" + "aesenc %%xmm2,%%xmm0 \n" // first round + "aesenclast %%xmm1,%%xmm0 \n" // final round + "movups %%xmm0, (%0) \n" + : /* only output is in *state */ + : "r"(state), "r" (key_schedule) + : "xmm0", "xmm1", "xmm2", "cc", "memory"); +#else + /* first round of the algorithm */ + add_round_key(state, (const uint8_t*)&key_schedule[0]); + sub_bytes(state); + shift_rows(state); + mix_columns(state); + add_round_key(state, (const uint8_t*)&key_schedule[4]); + + /* final round of the algorithm */ + sub_bytes(state); + shift_rows(state); + add_round_key(state, (const uint8_t*)&key_schedule[8]); +#endif +} diff --git a/stratum/algos/rfv2/rf_crc32.c b/stratum/algos/rfv2/rf_crc32.c new file mode 100644 index 000000000..3149b10d5 --- /dev/null +++ b/stratum/algos/rfv2/rf_crc32.c @@ -0,0 +1,164 @@ +// RainForest hash algorithm - CRC32 calculation +// Author: Bill Schneider +// Date: Feb 13th, 2018 + +#include + +#if defined(RF_NOASM) || !defined(__aarch64__) || !defined(__ARM_FEATURE_CRC32) +// crc32 lookup tables +static const uint32_t rf_crc32_table[256] = { + /* 0x00 */ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, + /* 0x04 */ 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + /* 0x08 */ 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + /* 0x0c */ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + /* 0x10 */ 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + /* 0x14 */ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + /* 0x18 */ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, + /* 0x1c */ 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, + /* 0x20 */ 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + /* 0x24 */ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + /* 0x28 */ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, + /* 0x2c */ 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + /* 0x30 */ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, + /* 0x34 */ 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + /* 0x38 */ 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + /* 0x3c */ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, + /* 0x40 */ 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, + /* 0x44 */ 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + /* 0x48 */ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, + /* 0x4c */ 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + /* 0x50 */ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + /* 0x54 */ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, + /* 0x58 */ 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, + /* 0x5c */ 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + /* 0x60 */ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + /* 0x64 */ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, + /* 0x68 */ 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + /* 0x6c */ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + /* 0x70 */ 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, + /* 0x74 */ 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + /* 0x78 */ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, + /* 0x7c */ 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, + /* 0x80 */ 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + /* 0x84 */ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, + /* 0x88 */ 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + /* 0x8c */ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + /* 0x90 */ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, + /* 0x94 */ 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, + /* 0x98 */ 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + /* 0x9c */ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + /* 0xa0 */ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, + /* 0xa4 */ 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + /* 0xa8 */ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, + /* 0xac */ 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, + /* 0xb0 */ 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + /* 0xb4 */ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, + /* 0xb8 */ 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, + /* 0xbc */ 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + /* 0xc0 */ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, + /* 0xc4 */ 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + /* 0xc8 */ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + /* 0xcc */ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, + /* 0xd0 */ 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, + /* 0xd4 */ 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + /* 0xd8 */ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + /* 0xdc */ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + /* 0xe0 */ 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + /* 0xe4 */ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, + /* 0xe8 */ 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, + /* 0xec */ 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + /* 0xf0 */ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, + /* 0xf4 */ 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + /* 0xf8 */ 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + /* 0xfc */ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, +}; +#endif + +// compute the crc32 of 32-bit message _msg_ from previous crc _crc_. +// build with -mcpu=cortex-a53+crc to enable native CRC instruction on ARM +static inline uint32_t rf_crc32_32(uint32_t crc, uint32_t msg) +{ +#if !defined(RF_NOASM) && defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) + __asm__("crc32w %w0,%w0,%w1\n" : "+r"(crc) : "r"(msg)); +#else + crc = crc ^ msg; + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); +#endif + return crc; +} + +static inline uint32_t rf_crc32_24(uint32_t crc, uint32_t msg) +{ +#if !defined(RF_NOASM) && defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) + __asm__("crc32b %w0,%w0,%w1\n" : "+r"(crc) : "r"(msg)); + __asm__("crc32h %w0,%w0,%w1\n" : "+r"(crc) : "r"(msg >> 8)); +#else + crc = crc ^ msg; + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); +#endif + return crc; +} + +static inline uint32_t rf_crc32_16(uint32_t crc, uint32_t msg) +{ +#if !defined(RF_NOASM) && defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) + __asm__("crc32h %w0,%w0,%w1\n" : "+r"(crc) : "r"(msg)); +#else + crc = crc ^ msg; + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); +#endif + return crc; +} + +static inline uint32_t rf_crc32_8(uint32_t crc, uint32_t msg) +{ +#if !defined(RF_NOASM) && defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) + __asm__("crc32b %w0,%w0,%w1\n" : "+r"(crc) : "r"(msg)); +#else + crc = crc ^ msg; + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); +#endif + return crc; +} + +/* returns a CRC32 of message from previous ; the 32 highest bits + * are zeroed. + */ +static inline uint64_t rf_crc32_64(uint32_t crc, uint64_t msg) +{ +#if !defined(RF_NOASM) && defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) + uint64_t crc64 = crc; + + __asm__("crc32x %w0,%w0,%x2\n" : "=r"(crc64) : "0"(crc), "r"(msg)); + return crc64; +#else + crc ^= (uint32_t)msg; + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + + crc ^= msg >> 32; + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + crc = rf_crc32_table[crc & 0xff] ^ (crc >> 8); + return crc; +#endif +} + +/* performs a CRC32 on a memory area */ +static inline uint32_t rf_crc32_mem(uint32_t crc, const void *msg, size_t len) +{ + const uint8_t *msg8 = (uint8_t *)msg; + while (len--) { + crc = rf_crc32_8(crc, *msg8++); + } + return crc; +} diff --git a/stratum/algos/rfv2/rfv2.h b/stratum/algos/rfv2/rfv2.h new file mode 100644 index 000000000..2e729aa4e --- /dev/null +++ b/stratum/algos/rfv2/rfv2.h @@ -0,0 +1,53 @@ +// RainForest hash algorithm +// Author: Bill Schneider +// Created: Feb 13th, 2018 +// Updated: Apr 21th, 2019 +// +// RainForest uses native integer operations which are extremely fast on +// modern 64-bit processors, significantly slower on 32-bit processors such +// as GPUs, and extremely slow if at all implementable on FPGAs and ASICs. +// It makes an intensive use of the L1 cache to maintain a heavy intermediary +// state favoring modern CPUs compared to GPUs (small L1 cache shared by many +// shaders) or FPGAs (very hard to implement the required low-latency cache) +// when scanning ranges for nonces. In addition it exploit the perfectly +// defined precision loss of IEEE754 floating point conversion between int and +// double to make sure the implementation runs on a perfectly compliant stack +// and not on a simplified one like an inexpensive IP block. It also uses some +// floating point functions such as sin(), pow() and sqrt() which are available +// on any GPU but could be wrong if simplified. Finally, it uses 96 MB of work +// area per thread in order to incur a cost to highly parallel processors such +// as high-end GPUs. The purpose is to create a fair balance between all mining +// equipments, from mobile phones to extreme performance GPUs and to rule out +// farming factories relying on ASICs, FPGAs, or any other very expensive +// solution. The CRC32 instruction is used a lot as it is extremely fast on +// low-power ARM chips and allows such devices to rival high-end PCs mining +// performance. Note that CRC32 is not used for security at all, only to +// disturb data. +// +// Tests have shown that mid-range OpenCL GPUs can get the computation right +// but that low-end ones not implementing 64-bit floats in hardware and +// falling back to a simplified software stack can't get it right. It was +// also reported that building this code with -ffast-math results in invalid +// hashes, as predicted. +// +// Build instructions on Ubuntu 16.04 to 18.04 : +// - on x86: use gcc -lm -march=native or -maes to enable AES-NI +// - on ARMv8: use gcc -lm -march=native or -march=armv8-a+crypto+crc to enable +// CRC32 and AES extensions. +// +// Note: always use the same options to build all files! +// + +#ifndef RAINFOREST +#define RAINFOREST + +#include +#include + +#define RFV2_RAMBOX_SIZE (96*1024*1024/8) + +int rfv2_hash(void *out, const void *in, size_t len, void *rambox, const void *rambox_template); +int rfv2_hash2(void *out, const void *in, size_t len, void *rambox, const void *rambox_template, uint32_t seed); +void rfv2_raminit(void *area); + +#endif diff --git a/stratum/algos/rfv2/rfv2_core.c b/stratum/algos/rfv2/rfv2_core.c new file mode 100644 index 000000000..de37c2d10 --- /dev/null +++ b/stratum/algos/rfv2/rfv2_core.c @@ -0,0 +1,795 @@ +// RainForest hash algorithm +// Author: Bill Schneider +// Created: Feb 13th, 2018 +// Updated: Apr 21th, 2019 +// +// RainForest uses native integer operations which are extremely fast on +// modern 64-bit processors, significantly slower on 32-bit processors such +// as GPUs, and extremely slow if at all implementable on FPGAs and ASICs. +// It makes an intensive use of the L1 cache to maintain a heavy intermediary +// state favoring modern CPUs compared to GPUs (small L1 cache shared by many +// shaders) or FPGAs (very hard to implement the required low-latency cache) +// when scanning ranges for nonces. In addition it exploit the perfectly +// defined precision loss of IEEE754 floating point conversion between int and +// double to make sure the implementation runs on a perfectly compliant stack +// and not on a simplified one like an inexpensive IP block. It also uses some +// floating point functions such as sin(), pow() and sqrt() which are available +// on any GPU but could be wrong if simplified. Finally, it uses 96 MB of work +// area per thread in order to incur a cost to highly parallel processors such +// as high-end GPUs. The purpose is to create a fair balance between all mining +// equipments, from mobile phones to extreme performance GPUs and to rule out +// farming factories relying on ASICs, FPGAs, or any other very expensive +// solution. The CRC32 instruction is used a lot as it is extremely fast on +// low-power ARM chips and allows such devices to rival high-end PCs mining +// performance. Note that CRC32 is not used for security at all, only to +// disturb data. +// +// Tests have shown that mid-range OpenCL GPUs can get the computation right +// but that low-end ones not implementing 64-bit floats in hardware and +// falling back to a simplified software stack can't get it right. It was +// also reported that building this code with -ffast-math results in invalid +// hashes, as predicted. +// +// Build instructions on Ubuntu 16.04 to 18.04 : +// - on x86: use gcc -lm -march=native or -maes to enable AES-NI +// - on ARMv8: use gcc -lm -march=native or -march=armv8-a+crypto+crc to enable +// CRC32 and AES extensions. +// +// Note: always use the same options to build all files! +// + +#include +#include +#include +#include "rfv2.h" + +// these archs are fine with unaligned reads +#if defined(__x86_64__)||defined(__aarch64__) +#define RF_UNALIGNED_LE64 +#define RF_UNALIGNED_LE32 +#elif defined(__i386__)||defined(__ARM_ARCH_7A__) +#define RF_UNALIGNED_LE32 +#endif + +#define RFV2_INIT_CRC 20180213 + +#ifndef RF_ALIGN +#ifdef _MSC_VER +#define RF_ALIGN(x) __declspec(align(x)) +#else +#define RF_ALIGN(x) __attribute__((aligned(x))) +#endif +#endif + +// for aes2r_encrypt() +#include "rf_aes2r.c" + +// for rf_crc32_32() +#include "rf_crc32.c" + +// this seems necessary only for gcc, otherwise hash is bogus +#ifdef _MSC_VER +typedef uint8_t rf_u8; +typedef uint16_t rf_u16; +typedef uint32_t rf_u32; +typedef uint64_t rf_u64; +#else +typedef __attribute__((may_alias)) uint8_t rf_u8; +typedef __attribute__((may_alias)) uint16_t rf_u16; +typedef __attribute__((may_alias)) uint32_t rf_u32; +typedef __attribute__((may_alias)) uint64_t rf_u64; +#endif + +#define RFV2_RAMBOX_HIST 1024 + +// number of loops run over the initial message. At 19 loops +// most runs are under 256 changes +#define RFV2_LOOPS 320 + +typedef union { + rf_u8 b[32]; + rf_u16 w[16]; + rf_u32 d[8]; + rf_u64 q[4]; +} rf_hash256_t; + +typedef struct RF_ALIGN(16) rfv2_ctx { + uint32_t word; // LE pending message + uint32_t len; // total message length + uint32_t crc; + uint32_t changes; // must remain lower than RFV2_RAMBOX_HIST + uint64_t *rambox; + uint32_t rb_o; // rambox offset + uint32_t rb_l; // rambox length + rf_hash256_t RF_ALIGN(32) hash; + uint32_t hist[RFV2_RAMBOX_HIST]; + uint64_t prev[RFV2_RAMBOX_HIST]; +} rfv2_ctx_t; + +// the table is used as an 8 bit-aligned array of uint64_t for the first word, +// and as a 16 bit-aligned array of uint64_t for the second word. It is filled +// with the sha256 of "RainForestProCpuAntiAsic", iterated over and over until +// the table is filled. The highest offset being ((uint16_t *)table)[255] we +// need to add 6 extra bytes at the end to read an uint64_t. Maybe calculated +// on a UNIX system with this loop : +// +// ref="RainForestProCpuAntiAsic" +// for ((i=0;i<18;i++)); do +// set $(echo -n $ref|sha256sum) +// echo $1|sed 's/\(..\)/0x\1,/g' +// ref=$(printf $(echo $1|sed 's/\(..\)/\\x\1/g')) +// done + +static const uint8_t rfv2_table[256 * 2 + 6] = { + 0x8e,0xc1,0xa8,0x04,0x38,0x78,0x7c,0x54,0x29,0x23,0x1b,0x78,0x9f,0xf9,0x27,0x54, + 0x11,0x78,0x95,0xb6,0xaf,0x78,0x45,0x16,0x2b,0x9e,0x91,0xe8,0x97,0x25,0xf8,0x63, + 0x82,0x56,0xcf,0x48,0x6f,0x82,0x14,0x0d,0x61,0xbe,0x47,0xd1,0x37,0xee,0x30,0xa9, + 0x28,0x1e,0x4b,0xbf,0x07,0xcd,0x41,0xdf,0x23,0x21,0x12,0xb8,0x81,0x99,0x1d,0xe6, + 0x68,0xcf,0xfa,0x2d,0x8e,0xb9,0x88,0xa7,0x15,0xce,0x9e,0x2f,0xeb,0x1b,0x0f,0x67, + 0x20,0x68,0x6c,0xa9,0x5d,0xc1,0x7c,0x76,0xdf,0xbd,0x98,0x61,0xb4,0x14,0x65,0x40, + 0x1e,0x72,0x51,0x74,0x93,0xd3,0xad,0xbe,0x46,0x0a,0x25,0xfb,0x6a,0x5e,0x1e,0x8a, + 0x5a,0x03,0x3c,0xab,0x12,0xc2,0xd4,0x07,0x91,0xab,0xc9,0xdf,0x92,0x2c,0x85,0x6a, + 0xa6,0x25,0x1e,0x66,0x50,0x26,0x4e,0xa8,0xbd,0xda,0x88,0x1b,0x95,0xd4,0x00,0xeb, + 0x0d,0x1c,0x9b,0x3c,0x86,0xc7,0xb2,0xdf,0xb4,0x5a,0x36,0x15,0x8e,0x04,0xd2,0x54, + 0x79,0xd2,0x3e,0x3d,0x99,0x50,0xa6,0x12,0x4c,0x32,0xc8,0x51,0x14,0x4d,0x4b,0x0e, + 0xbb,0x17,0x80,0x8f,0xa4,0xc4,0x99,0x72,0xd7,0x14,0x4b,0xef,0xed,0x14,0xe9,0x17, + 0xfa,0x9b,0x5d,0x37,0xd6,0x2f,0xef,0x02,0xd6,0x71,0x0a,0xbd,0xc5,0x40,0x11,0x90, + 0x90,0x4e,0xb4,0x4c,0x72,0x51,0x7a,0xd8,0xba,0x30,0x4d,0x8c,0xe2,0x11,0xbb,0x6d, + 0x4b,0xbc,0x6f,0x14,0x0c,0x9f,0xfa,0x5e,0x66,0x40,0x45,0xcb,0x7d,0x1b,0x3a,0xc5, + 0x5e,0x9c,0x1e,0xcc,0xbd,0x16,0x3b,0xcf,0xfb,0x2a,0xd2,0x08,0x2a,0xf8,0x3d,0x46, + 0x93,0x90,0xb3,0x66,0x81,0x34,0x7f,0x6d,0x9b,0x8c,0x99,0x03,0xc5,0x27,0xa3,0xd9, + 0xce,0x90,0x88,0x0f,0x55,0xc3,0xa1,0x60,0x53,0xc8,0x0d,0x25,0xae,0x61,0xd9,0x72, + 0x48,0x1d,0x6c,0x61,0xd2,0x87,0xdd,0x3d,0x23,0xf5,0xde,0x93,0x39,0x4c,0x43,0x9a, + 0xf9,0x37,0xf2,0x61,0xd7,0xf8,0xea,0x65,0xf0,0xf1,0xde,0x3f,0x05,0x57,0x83,0x81, + 0xde,0x02,0x62,0x49,0xd4,0x32,0x7e,0x4a,0xd4,0x9f,0x40,0x7e,0xb9,0x91,0xb1,0x35, + 0xf7,0x62,0x3f,0x65,0x9e,0x4d,0x2b,0x10,0xde,0xd4,0x77,0x64,0x0f,0x84,0xad,0x92, + 0xe7,0xa3,0x8a,0x10,0xc1,0x14,0xeb,0x57,0xc4,0xad,0x8e,0xc2,0xc7,0x32,0xa3,0x7e, + 0x50,0x1f,0x7c,0xbb,0x2e,0x5f,0xf5,0x18,0x22,0xea,0xec,0x9d,0xa4,0x77,0xcd,0x85, + 0x04,0x2f,0x20,0x61,0x72,0xa7,0x0c,0x92,0x06,0x4d,0x01,0x70,0x9b,0x35,0xa1,0x27, + 0x32,0x6e,0xb9,0x78,0xe0,0xaa,0x5f,0x91,0xa6,0x51,0xe3,0x63,0xf8,0x97,0x2f,0x60, + 0xd9,0xfb,0x15,0xe5,0x59,0xcf,0x31,0x3c,0x61,0xc7,0xb5,0x61,0x2a,0x6b,0xdd,0xd1, + 0x09,0x70,0xc0,0xcf,0x94,0x7a,0xcc,0x31,0x94,0xb1,0xa2,0xf6,0x95,0xc0,0x38,0x3d, + 0xef,0x19,0x30,0x70,0xdd,0x62,0x32,0x8f,0x7c,0x30,0xb9,0x18,0xf8,0xe7,0x8f,0x0a, + 0xaa,0xb6,0x00,0x86,0xf2,0xe0,0x30,0x5f,0xa2,0xe8,0x00,0x8e,0x05,0xa0,0x22,0x18, + 0x9f,0x83,0xd4,0x3a,0x85,0x10,0xb9,0x51,0x8d,0x07,0xf0,0xb3,0xcd,0x9b,0x55,0xa1, + 0x14,0xce,0x0f,0xb2,0xcf,0xb8,0xce,0x2d,0xe6,0xe8,0x35,0x32,0x1f,0x22,0xb5,0xec, + 0xd0,0xb9,0x72,0xa8,0xb4,0x97 + //,0x6e,0x0a,0x47,0xcd,0x5a,0xf0,0xdc,0xeb,0xfd,0x46, + //0xe5,0x6e,0x83,0xe6,0x1a,0xcc,0x4a,0x8b,0xa5,0x28,0x9e,0x50,0x48,0xa9,0xa2,0x6b, +}; + +// this is made of the last iteration of the rfv2_table (18th transformation) +static const uint8_t rfv2_iv[32] = { + 0x78,0xe9,0x90,0xd3,0xb3,0xc8,0x9b,0x7b,0x0a,0xc4,0x86,0x6e,0x4e,0x38,0xb3,0x6b, + 0x33,0x68,0x7c,0xed,0x73,0x35,0x4b,0x0a,0x97,0x25,0x4c,0x77,0x7a,0xaa,0x61,0x1b +}; + +// mix the current state with the crc and return the new crc +static inline uint32_t rf_crc32x4(rf_u32 *state, uint32_t crc) +{ + crc = state[0] = rf_crc32_32(crc, state[0]); + crc = state[1] = rf_crc32_32(crc, state[1]); + crc = state[2] = rf_crc32_32(crc, state[2]); + crc = state[3] = rf_crc32_32(crc, state[3]); + return crc; +} + +// add to _msg_ its own crc32. use -mcpu=cortex-a53+crc to enable native CRC +// instruction on ARM. +static inline uint64_t rf_add64_crc32(uint64_t msg) +{ + return msg + rf_crc32_64(0, msg); +} + +// read 64 bit from possibly unaligned memory address _p_ in little endian mode +static inline uint64_t rf_memr64(const uint8_t *p) +{ +#ifdef RF_UNALIGNED_LE64 + return *(uint64_t *)p; +#else + uint64_t ret; + int byte; + for (ret = byte = 0; byte < 8; byte++) + ret += (uint64_t)p[byte] << (byte * 8); + return ret; +#endif +} + +// return rainforest lower word entry for index +static inline uint64_t rf_wltable(uint8_t index) +{ + return rf_memr64(&rfv2_table[index]); +} + +// return rainforest upper word entry for _index_ +static inline uint64_t rf_whtable(uint8_t index) +{ + return rf_memr64(&rfv2_table[index * 2]); +} + +// rotate left vector _v_ by _bits_ bits +static inline uint64_t rf_rotl64(uint64_t v, uint64_t bits) +{ +#if !defined(RF_NOASM) && defined(__x86_64__) + __asm__("rol %1, %0" : "+r"(v) : "c"((uint8_t)bits)); +#else +#if !defined(__ARM_ARCH_8A) && !defined(__x86_64__) + bits &= 63; +#endif + v = (v << bits) | (v >> (-bits & 63)); +#endif + return v; +} + +// rotate right vector _v_ by _bits_ bits +static inline uint64_t rf_rotr64(uint64_t v, uint64_t bits) +{ +#if !defined(RF_NOASM) && defined(__x86_64__) + __asm__("ror %1, %0" : "+r"(v) : "c"((uint8_t)bits)); +#else +#if !defined(__ARM_ARCH_8A) && !defined(__x86_64__) + bits &= 63; +#endif + v = (v >> bits) | (v << (-bits & 63)); +#endif + return v; +} + +// reverse all bytes in the word _v_ +static inline uint64_t rf_bswap64(uint64_t v) +{ +#if !defined(RF_NOASM) && defined(__x86_64__) && !defined(_MSC_VER) + __asm__("bswapq %0":"+r"(v)); +#elif !defined(RF_NOASM) && defined(__aarch64__) + __asm__("rev %0,%0\n":"+r"(v)); +#else + v = ((v & 0xff00ff00ff00ff00ULL) >> 8) | ((v & 0x00ff00ff00ff00ffULL) << 8); + v = ((v & 0xffff0000ffff0000ULL) >> 16) | ((v & 0x0000ffff0000ffffULL) << 16); + v = (v >> 32) | (v << 32); +#endif + return v; +} + +// reverse all bits in the word _v_ +static inline uint64_t rf_revbit64(uint64_t v) +{ +#if !defined(RF_NOASM) && defined(__aarch64__) + __asm__ volatile("rbit %0, %1\n" : "=r"(v) : "r"(v)); +#else + v = ((v & 0xaaaaaaaaaaaaaaaaULL) >> 1) | ((v & 0x5555555555555555ULL) << 1); + v = ((v & 0xccccccccccccccccULL) >> 2) | ((v & 0x3333333333333333ULL) << 2); + v = ((v & 0xf0f0f0f0f0f0f0f0ULL) >> 4) | ((v & 0x0f0f0f0f0f0f0f0fULL) << 4); +#if !defined(RF_NOASM) && defined(__x86_64__) + __asm__("bswapq %0" : "=r"(v) : "0"(v)); +#else + v = ((v & 0xff00ff00ff00ff00ULL) >> 8) | ((v & 0x00ff00ff00ff00ffULL) << 8); + v = ((v & 0xffff0000ffff0000ULL) >> 16) | ((v & 0x0000ffff0000ffffULL) << 16); + v = (v >> 32) | (v << 32); +#endif +#endif + return v; +} + +#if !defined(__GNUC__) || (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 7) +#if !defined(__GNUC__) // also covers clang +int __builtin_clzll(uint64_t x) +{ + uint64_t y; + int n = 64; + + y = x >> 32; if (y) { x = y; n -= 32; } + y = x >> 16; if (y) { x = y; n -= 16; } + y = x >> 8; if (y) { x = y; n -= 8; } + y = x >> 4; if (y) { x = y; n -= 4; } + y = x >> 2; if (y) { x = y; n -= 2; } + y = x >> 1; if (y) { x = y; n -= 1; } + return n - x; +} + +#endif +static inline int __builtin_clrsbll(int64_t x) +{ + if (x < 0) + return __builtin_clzll(~(x << 1)); + else + return __builtin_clzll(x << 1); +} +#endif + +// write (_x_,_y_) at cell _cell_ for offset _ofs_ +static inline void rf_w128(uint64_t *cell, size_t ofs, uint64_t x, uint64_t y) +{ +#if !defined(RF_NOASM) && (defined(__ARM_ARCH_8A) || defined(__AARCH64EL__)) + // 128 bit at once is faster when exactly two parallelizable instructions are + // used between two calls to keep the pipe full. + __asm__ volatile("stp %0, %1, [%2,%3]\n\t" + : /* no output */ + : "r"(x), "r"(y), "r" (cell), "I" (ofs * 8)); +#else + cell[ofs + 0] = x; + cell[ofs + 1] = y; +#endif +} + +// lookup _old_ in _rambox_, update it and perform a substitution if a matching +// value is found. +static inline uint32_t rfv2_rambox(rfv2_ctx_t *ctx, uint64_t old) +{ + uint64_t *p, k; + uint32_t idx; + + k = old; + old = rf_add64_crc32(old); + old ^= rf_revbit64(k); + if (__builtin_clrsbll(old) > 3) { + idx = ctx->rb_o + old % ctx->rb_l; + p = &ctx->rambox[idx]; + k = *p; + old += rf_rotr64(k, (uint8_t)(old / ctx->rb_l)); + *p = old; + if (ctx->changes < RFV2_RAMBOX_HIST) { + ctx->hist[ctx->changes] = idx; + ctx->prev[ctx->changes] = k; + ctx->changes++; + } + } + return (uint32_t)old; +} + +// initialize the ram box +void rfv2_raminit(void *area) +{ + uint64_t pat1 = 0x0123456789ABCDEFULL; + uint64_t pat2 = 0xFEDCBA9876543210ULL; + uint64_t pat3; + uint32_t pos; + uint64_t *rambox = (uint64_t *)area; + + // Note: no need to mask the higher bits on armv8 nor x86 : + // + // From ARMv8's ref manual : + // The register that is specified for a shift can be 32-bit or + // 64-bit. The amount to be shifted can be specified either as + // an immediate, that is up to register size minus one, or by + // a register where the value is taken only from the bottom five + // (modulo-32) or six (modulo-64) bits. + // + // Here we rotate pat2 by pat1's bits and put it into pat1, and in + // parallel we rotate pat1 by pat2's bits and put it into pat2. Thus + // the two data blocks are exchanged in addition to being rotated. + // What is stored each time is the previous and the rotated blocks, + // which only requires one rotate and a register rename. + + for (pos = 0; pos < RFV2_RAMBOX_SIZE; pos += 16) { + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x111; + rf_w128(rambox + pos, 0, pat1, pat3); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x222; + rf_w128(rambox + pos, 2, pat2, pat3); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x333; + rf_w128(rambox + pos, 4, pat1, pat3); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x444; + rf_w128(rambox + pos, 6, pat2, pat3); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x555; + rf_w128(rambox + pos, 8, pat1, pat3); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x666; + rf_w128(rambox + pos, 10, pat2, pat3); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x777; + rf_w128(rambox + pos, 12, pat1, pat3); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x888; + rf_w128(rambox + pos, 14, pat2, pat3); + } +} + +#ifdef RF_DEBUG_RAMBOX +// verify the ram box +static void rfv2_ram_test(const void *area) +{ + uint64_t pat1 = 0x0123456789ABCDEFULL; + uint64_t pat2 = 0xFEDCBA9876543210ULL; + uint64_t pat3; + uint32_t pos; + const uint64_t *rambox = (const uint64_t *)area; + + // Note: no need to mask the higher bits on armv8 nor x86 : + // + // From ARMv8's ref manual : + // The register that is specified for a shift can be 32-bit or + // 64-bit. The amount to be shifted can be specified either as + // an immediate, that is up to register size minus one, or by + // a register where the value is taken only from the bottom five + // (modulo-32) or six (modulo-64) bits. + // + // Here we rotate pat2 by pat1's bits and put it into pat1, and in + // parallel we rotate pat1 by pat2's bits and put it into pat2. Thus + // the two data blocks are exchanged in addition to being rotated. + // What is stored each time is the previous and the rotated blocks, + // which only requires one rotate and a register rename. + + for (pos = 0; pos < RFV2_RAMBOX_SIZE; pos += 16) { + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x111; + if (rambox[pos + 0] != pat1) + abort(); + + if (rambox[pos + 1] != pat3) + abort(); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x222; + if (rambox[pos + 2] != pat2) + abort(); + + if (rambox[pos + 3] != pat3) + abort(); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x333; + if (rambox[pos + 4] != pat1) + abort(); + + if (rambox[pos + 5] != pat3) + abort(); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x444; + if (rambox[pos + 6] != pat2) + abort(); + + if (rambox[pos + 7] != pat3) + abort(); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x555; + if (rambox[pos + 8] != pat1) + abort(); + + if (rambox[pos + 9] != pat3) + abort(); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x666; + if (rambox[pos + 10] != pat2) + abort(); + + if (rambox[pos + 11] != pat3) + abort(); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x777; + if (rambox[pos + 12] != pat1) + abort(); + + if (rambox[pos + 13] != pat3) + abort(); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x888; + if (rambox[pos + 14] != pat2) + abort(); + + if (rambox[pos + 15] != pat3) + abort(); + } +} +#endif + +// mix each word with the precision lost from the other one when converting +// it to an IEEE754 double floating point number. +static inline void rfv2_mix_fp_loss(uint64_t *p, uint64_t *q) +{ + uint64_t p0, q0; + uint64_t lp, lq; + double fp, fq; + + p0 = *p; q0 = *q; + fp = p0; fq = q0; + lp = (uint64_t)fp ^ p0; lq = (uint64_t)fq ^ q0; + p0 += lq; q0 += lp; + *p = p0; *q = q0; +} + +// return p/q into p and rev(rev(q)+p) into q +static inline void rfv2_div_mod(uint64_t *p, uint64_t *q) +{ + uint64_t x = *p; + *p = x / *q; +#if !defined(RF_NOASM) && !defined(_MSC_VER) + __asm__ volatile("" :: "r"(*p)); // force to place the div first +#endif + *q = rf_revbit64(rf_revbit64(*q)+x); +} + +// exec the div/mod box. _v0_ and _v1_ must be aligned. +static inline void rfv2_divbox(rf_u64 *v0, rf_u64 *v1) +{ + uint64_t pl, ql, ph, qh; + + //---- low word ---- ---- high word ---- + pl = ~*v0; ph = ~*v1; + ql = rf_bswap64(*v0); qh = rf_bswap64(*v1); + rfv2_mix_fp_loss(&ql, &qh); + + if (!pl || !ql) { pl = ql = 0; } + else if (pl > ql) rfv2_div_mod(&pl, &ql); + else rfv2_div_mod(&ql, &pl); + + if (!ph || !qh) { ph = qh = 0; } + else if (ph > qh) rfv2_div_mod(&ph, &qh); + else rfv2_div_mod(&qh, &ph); + + pl += qh; ph += ql; + *v0 -= pl; *v1 -= ph; +} + +// exec the rotation/add box. _v0_ and _v1_ must be aligned. +static inline void rfv2_rotbox(rf_u64 *v0, rf_u64 *v1, uint8_t b0, uint8_t b1) +{ + uint64_t l, h; + + //---- low word ---- ---- high word ---- + l = *v0; h = *v1; + l = rf_rotr64(l, b0); h = rf_rotl64(h, b1); + rfv2_mix_fp_loss(&l, &h); + l += rf_wltable(b0); h += rf_whtable(b1); + b0 = (uint8_t)l; b1 = (uint8_t)h; + l = rf_rotl64(l, b1); h = rf_rotr64(h, b0); + rfv2_mix_fp_loss(&l, &h); + b0 = (uint8_t)l; b1 = (uint8_t)h; + l = rf_rotr64(l, b1); h = rf_rotl64(h, b0); + rfv2_mix_fp_loss(&l, &h); + *v0 = l; *v1 = h; +} + +// mix the current state with the current crc +static inline uint32_t rfv2_scramble(rfv2_ctx_t *ctx) +{ + return ctx->crc = rf_crc32x4(ctx->hash.d, ctx->crc); +} + +// mix the state with the crc and the pending text, and update the crc +static inline void rfv2_inject(rfv2_ctx_t *ctx) +{ + ctx->crc = + (ctx->len & 3) == 0 ? rf_crc32_32(rfv2_scramble(ctx), ctx->word): + (ctx->len & 3) == 3 ? rf_crc32_24(rfv2_scramble(ctx), ctx->word): + (ctx->len & 3) == 2 ? rf_crc32_16(rfv2_scramble(ctx), ctx->word): + rf_crc32_8(rfv2_scramble(ctx), ctx->word); + ctx->word = 0; +} + +// rotate the hash by 32 bits. Not using streaming instructions (SSE/NEON) is +// faster because the compiler can follow moves an use register renames. +static inline void rfv2_rot32x256(rf_hash256_t *hash) +{ +#if defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_ARCH_7A__) + uint32_t t0, t1, t2; + + t0 = hash->d[0]; + t1 = hash->d[1]; + t2 = hash->d[2]; + hash->d[1] = t0; + hash->d[2] = t1; + + t0 = hash->d[3]; + t1 = hash->d[4]; + hash->d[3] = t2; + hash->d[4] = t0; + + t2 = hash->d[5]; + t0 = hash->d[6]; + hash->d[5] = t1; + hash->d[6] = t2; + + t1 = hash->d[7]; + hash->d[7] = t0; + hash->d[0] = t1; +#else + uint32_t tmp = hash->d[7]; + + memmove(&hash->d[1], &hash->d[0], 28); + hash->d[0] = tmp; +#endif +} + +// encrypt the first 128 bits of the hash using the last 128 bits as the key +static inline void rfv2_aesenc(rfv2_ctx_t *ctx) +{ + aes2r_encrypt((uint8_t *)ctx->hash.b, (uint8_t *)ctx->hash.b + 16); +} + +// each new round consumes exactly 32 bits of text at once and perturbates +// 128 bits of output, 96 of which overlap with the previous round, and 32 +// of which are new. With 5 rounds or more each output bit depends on every +// input bit. +static inline void rfv2_one_round(rfv2_ctx_t *ctx) +{ + uint64_t carry; + + rfv2_rot32x256(&ctx->hash); + + carry = ((uint64_t)ctx->len << 32) + ctx->crc; + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_scramble(ctx); + + carry = rfv2_rambox(ctx, carry); + rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry), (uint8_t)(carry >> 56)); + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_scramble(ctx); + + carry = rfv2_rambox(ctx, carry); + rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 8), (uint8_t)(carry >> 48)); + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_scramble(ctx); + + carry = rfv2_rambox(ctx, carry); + rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 16), (uint8_t)(carry >> 40)); + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_scramble(ctx); + + carry = rfv2_rambox(ctx, carry); + rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 24), (uint8_t)(carry >> 32)); + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_inject(ctx); + rfv2_aesenc(ctx); + rfv2_scramble(ctx); +} + +// initialize the hash state +static void rfv2_init(rfv2_ctx_t *ctx, uint32_t seed, void *rambox) +{ + memcpy(ctx->hash.b, rfv2_iv, sizeof(ctx->hash.b)); + ctx->crc = seed; + ctx->word = ctx->len = 0; + ctx->changes = 0; + ctx->rb_o = 0; + ctx->rb_l = RFV2_RAMBOX_SIZE; + ctx->rambox = (uint64_t *)rambox; +} + +// update the hash context _ctx_ with _len_ bytes from message _msg_ +static inline void rfv2_update(rfv2_ctx_t *ctx, const void *msg, size_t len) +{ + const uint8_t *msg8 = (uint8_t *)msg; + + while (len > 0) { +#ifdef RF_UNALIGNED_LE32 + if (!(ctx->len & 3) && len >= 4) { + ctx->word = *(uint32_t *)msg8; + ctx->len += 4; + rfv2_one_round(ctx); + msg8 += 4; + len -= 4; + continue; + } +#endif + ctx->word |= ((uint32_t)*msg8++) << (8 * (ctx->len++ & 3)); + len--; + if (!(ctx->len & 3)) + rfv2_one_round(ctx); + } +} + +// pad to the next 256-bit (32 bytes) boundary +static inline void rfv2_pad256(rfv2_ctx_t *ctx) +{ + const uint8_t pad256[32] = { 0, }; + uint32_t pad; + + pad = (32 - ctx->len) & 0xF; + if (pad) + rfv2_update(ctx, pad256, pad); +} + +// finalize the hash and copy the result into _out_ if not null (256 bits) +static inline void rfv2_final(void *out, rfv2_ctx_t *ctx) +{ + // always run 5 extra rounds to complete the last 128 bits. + // the 5th one is because the last processed block is only in + // the ctx and was not mixed yet. + rfv2_one_round(ctx); + rfv2_one_round(ctx); + rfv2_one_round(ctx); + rfv2_one_round(ctx); + rfv2_one_round(ctx); + + if (out) + memcpy(out, ctx->hash.b, 32); +} + +// apply a linear sine to a discrete integer to validate that the platform +// operates a 100% compliant FP stack. Non-IEEE754 FPU will fail to provide +// valid values for all inputs. In order to reduce the variations between +// large and small values, we offset the value and put it to power 1/2. We +// use sqrt(x) here instead of pow(x,0.5) because sqrt() usually is quite +// optimized on CPUs and GPUs for vector length calculations while pow() is +// generic and may be extremely slow. sqrt() on the other hand requires some +// extra work to implement right on FPGAs and ASICs. The operation simply +// becomes round(100*sqrt((sin(x/16)^3)+1)+1.5). +static uint8_t sin_scaled(unsigned int x) +{ + return round(100.0 * (sqrt(pow(sin(x / 16.0), 3) + 1.0)) + 1.5); +} + +// hash _len_ bytes from _in_ into _out_, using _seed_ +// _rambox_ must be either NULL or a pointer to an area RFV2_RAMBOX_SIZE*8 bytes +// long preinitialized with rfv2_rambox_init(). If _rambox_ is NULL but _rambox_template_ +// is set, it will be initialized from this rambox_template using memcpy(). +// The function returns 0 on success or -1 on allocation failure if rambox is +// NULL. +int rfv2_hash2(void *out, const void *in, size_t len, void *rambox, const void *rambox_template, uint32_t seed) +{ + rfv2_ctx_t ctx; + unsigned int loop, loops; + int alloc_rambox = (rambox == NULL); + uint32_t msgh; + + if (alloc_rambox) { + rambox = malloc(RFV2_RAMBOX_SIZE * 8); + if (rambox == NULL) + return -1; + + if (rambox_template) + memcpy(rambox, rambox_template, RFV2_RAMBOX_SIZE * 8); + else + rfv2_raminit(rambox); + } + + //rfv2_ram_test(rambox); + + rfv2_init(&ctx, seed, rambox); + msgh = rf_crc32_mem(0, in, len); + ctx.rb_o = msgh % (ctx.rb_l / 2); + ctx.rb_l = (ctx.rb_l / 2 - ctx.rb_o) * 2; + + loops = sin_scaled(msgh); + for (loop = 0; loop < loops; loop++) { + rfv2_update(&ctx, in, len); + // pad to the next 256 bit boundary + rfv2_pad256(&ctx); + } + + rfv2_final(out, &ctx); + + if (alloc_rambox) + free(rambox); + else if (ctx.changes == RFV2_RAMBOX_HIST) { + //printf("changes=%d\n", ctx.changes); + rfv2_raminit(rambox); + } + else if (ctx.changes > 0) { + //printf("changes=%d\n", ctx.changes); + loops = ctx.changes; + do { + loops--; + ctx.rambox[ctx.hist[loops]] = ctx.prev[loops]; + } while (loops); + //rfv2_ram_test(rambox); + } + return 0; +} + +// hash _len_ bytes from _in_ into _out_ +int rfv2_hash(void *out, const void *in, size_t len, void *rambox, const void *rambox_template) +{ + return rfv2_hash2(out, in, len, rambox, rambox_template, RFV2_INIT_CRC); +} diff --git a/stratum/algos/sm3.c b/stratum/algos/sm3.c new file mode 100644 index 000000000..b627cb8e1 --- /dev/null +++ b/stratum/algos/sm3.c @@ -0,0 +1,220 @@ +/* ==================================================================== + * Copyright (c) 2014 - 2017 The GmSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the GmSSL Project. + * (http://gmssl.org/)" + * + * 4. The name "GmSSL Project" must not be used to endorse or promote + * products derived from this software without prior written + * permission. For written permission, please contact + * guanzhi1980@gmail.com. + * + * 5. Products derived from this software may not be called "GmSSL" + * nor may "GmSSL" appear in their names without prior written + * permission of the GmSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the GmSSL Project + * (http://gmssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE GmSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 GmSSL PROJECT OR + * ITS 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 + +#include "sm3.h" + +void sm3_init(sm3_ctx_t *ctx) +{ + ctx->digest[0] = 0x7380166F; + ctx->digest[1] = 0x4914B2B9; + ctx->digest[2] = 0x172442D7; + ctx->digest[3] = 0xDA8A0600; + ctx->digest[4] = 0xA96F30BC; + ctx->digest[5] = 0x163138AA; + ctx->digest[6] = 0xE38DEE4D; + ctx->digest[7] = 0xB0FB0E4E; + + ctx->nblocks = 0; + ctx->num = 0; +} + +void sm3_update(sm3_ctx_t *ctx, const unsigned char* data, size_t data_len) +{ + if (ctx->num) { + unsigned int left = SM3_BLOCK_SIZE - ctx->num; + if (data_len < left) { + memcpy(ctx->block + ctx->num, data, data_len); + ctx->num += data_len; + return; + } else { + memcpy(ctx->block + ctx->num, data, left); + sm3_compress(ctx->digest, ctx->block); + ctx->nblocks++; + data += left; + data_len -= left; + } + } + while (data_len >= SM3_BLOCK_SIZE) { + sm3_compress(ctx->digest, data); + ctx->nblocks++; + data += SM3_BLOCK_SIZE; + data_len -= SM3_BLOCK_SIZE; + } + ctx->num = data_len; + if (data_len) { + memcpy(ctx->block, data, data_len); + } +} + +void sm3_close(void *cc, void *dst) +{ + sm3_final(cc, dst); + memset(cc, 0, sizeof(sm3_ctx_t)); +} + +void sm3_final(sm3_ctx_t *ctx, unsigned char *digest) +{ + int i; + uint32_t *pdigest = (uint32_t *)digest; + uint32_t *count = (uint32_t *)(ctx->block + SM3_BLOCK_SIZE - 8); + + ctx->block[ctx->num] = 0x80; + + if (ctx->num + 9 <= SM3_BLOCK_SIZE) { + memset(ctx->block + ctx->num + 1, 0, SM3_BLOCK_SIZE - ctx->num - 9); + } else { + memset(ctx->block + ctx->num + 1, 0, SM3_BLOCK_SIZE - ctx->num - 1); + sm3_compress(ctx->digest, ctx->block); + memset(ctx->block, 0, SM3_BLOCK_SIZE - 8); + } + + count[0] = cpu_to_be32((ctx->nblocks) >> 23); + count[1] = cpu_to_be32((ctx->nblocks << 9) + (ctx->num << 3)); + + sm3_compress(ctx->digest, ctx->block); + for (i = 0; i < sizeof(ctx->digest)/sizeof(ctx->digest[0]); i++) { + pdigest[i] = cpu_to_be32(ctx->digest[i]); + } +} + +#define ROTATELEFT(X,n) (((X)<<(n)) | ((X)>>(32-(n)))) + +#define P0(x) ((x) ^ ROTATELEFT((x),9) ^ ROTATELEFT((x),17)) +#define P1(x) ((x) ^ ROTATELEFT((x),15) ^ ROTATELEFT((x),23)) + +#define FF0(x,y,z) ( (x) ^ (y) ^ (z)) +#define FF1(x,y,z) (((x) & (y)) | ( (x) & (z)) | ( (y) & (z))) + +#define GG0(x,y,z) ( (x) ^ (y) ^ (z)) +#define GG1(x,y,z) (((x) & (y)) | ( (~(x)) & (z)) ) + + +void sm3_compress(uint32_t digest[8], const unsigned char block[64]) +{ + int j; + uint32_t W[68], W1[64]; + const uint32_t *pblock = (const uint32_t *)block; + + uint32_t A = digest[0]; + uint32_t B = digest[1]; + uint32_t C = digest[2]; + uint32_t D = digest[3]; + uint32_t E = digest[4]; + uint32_t F = digest[5]; + uint32_t G = digest[6]; + uint32_t H = digest[7]; + uint32_t SS1,SS2,TT1,TT2,T[64]; + + for(j = 0; j < 16; j++) { + W[j] = cpu_to_be32(pblock[j]); + } + for(j = 16; j < 68; j++) { + W[j] = P1( W[j-16] ^ W[j-9] ^ ROTATELEFT(W[j-3],15)) ^ ROTATELEFT(W[j - 13],7 ) ^ W[j-6];; + } + for(j = 0; j < 64; j++) { + W1[j] = W[j] ^ W[j+4]; + } + + for(j = 0; j < 16; j++) { + + T[j] = 0x79CC4519; + SS1 = ROTATELEFT((ROTATELEFT(A,12) + E + ROTATELEFT(T[j],j)), 7); + SS2 = SS1 ^ ROTATELEFT(A,12); + TT1 = FF0(A,B,C) + D + SS2 + W1[j]; + TT2 = GG0(E,F,G) + H + SS1 + W[j]; + D = C; + C = ROTATELEFT(B,9); + B = A; + A = TT1; + H = G; + G = ROTATELEFT(F,19); + F = E; + E = P0(TT2); + } + + for(j = 16; j < 64; j++) { + + T[j] = 0x7A879D8A; + SS1 = ROTATELEFT((ROTATELEFT(A,12) + E + ROTATELEFT(T[j],j&31)), 7); + SS2 = SS1 ^ ROTATELEFT(A,12); + TT1 = FF1(A,B,C) + D + SS2 + W1[j]; + TT2 = GG1(E,F,G) + H + SS1 + W[j]; + D = C; + C = ROTATELEFT(B,9); + B = A; + A = TT1; + H = G; + G = ROTATELEFT(F,19); + F = E; + E = P0(TT2); + } + + digest[0] ^= A; + digest[1] ^= B; + digest[2] ^= C; + digest[3] ^= D; + digest[4] ^= E; + digest[5] ^= F; + digest[6] ^= G; + digest[7] ^= H; +} + +void sm3(const unsigned char *msg, size_t msglen, + unsigned char dgst[SM3_DIGEST_LENGTH]) +{ + sm3_ctx_t ctx; + + sm3_init(&ctx); + sm3_update(&ctx, msg, msglen); + sm3_final(&ctx, dgst); + + memset(&ctx, 0, sizeof(sm3_ctx_t)); +} diff --git a/stratum/algos/sm3.h b/stratum/algos/sm3.h new file mode 100644 index 000000000..05c6595d9 --- /dev/null +++ b/stratum/algos/sm3.h @@ -0,0 +1,109 @@ +/* ==================================================================== + * Copyright (c) 2014 - 2016 The GmSSL Project. All rights reserved. + * Copyright (c) 2017 - YiiMP (cleaned hmac dead stuff) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the GmSSL Project. + * (http://gmssl.org/)" + * + * 4. The name "GmSSL Project" must not be used to endorse or promote + * products derived from this software without prior written + * permission. For written permission, please contact + * guanzhi1980@gmail.com. + * + * 5. Products derived from this software may not be called "GmSSL" + * nor may "GmSSL" appear in their names without prior written + * permission of the GmSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the GmSSL Project + * (http://gmssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE GmSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 GmSSL PROJECT OR + * ITS 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. + * ==================================================================== + */ + +#ifndef _SM3_H +#define _SM3_H + +#define SM3_DIGEST_LENGTH 32 +#define SM3_BLOCK_SIZE 64 +#define SM3_CBLOCK (SM3_BLOCK_SIZE) +#define SM3_HMAC_SIZE (SM3_DIGEST_LENGTH) + + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef struct { + uint32_t digest[8]; + int nblocks; + unsigned char block[64]; + int num; +} sm3_ctx_t; + +void sm3_init(sm3_ctx_t *ctx); +void sm3_update(sm3_ctx_t *ctx, const unsigned char* data, size_t data_len); +void sm3_close(void *cc, void *dst); + +void sm3_final(sm3_ctx_t *ctx, unsigned char digest[SM3_DIGEST_LENGTH]); +void sm3_compress(uint32_t digest[8], const unsigned char block[SM3_BLOCK_SIZE]); +void sm3(const unsigned char *data, size_t datalen, + unsigned char digest[SM3_DIGEST_LENGTH]); + +#ifdef CPU_BIGENDIAN + +#define cpu_to_be16(v) (v) +#define cpu_to_be32(v) (v) +#define be16_to_cpu(v) (v) +#define be32_to_cpu(v) (v) + +#else + +#define cpu_to_le16(v) (v) +#define cpu_to_le32(v) (v) +#define le16_to_cpu(v) (v) +#define le32_to_cpu(v) (v) + +#define cpu_to_be16(v) (((v)<< 8) | ((v)>>8)) +#define cpu_to_be32(v) (((v)>>24) | (((v)>>8)&0xff00) | (((v)<<8)&0xff0000) | ((v)<<24)) +#define be16_to_cpu(v) cpu_to_be16(v) +#define be32_to_cpu(v) cpu_to_be32(v) + +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 942c9886f..c11ed0d26 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -31,10 +31,14 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); #endif - if (!strcmp(g_current_algo->name, "lbry")) { + if (!strcmp(g_stratum_algo, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 32 + 20); + ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); + } else if (strlen(templ->extradata_be) == 128) { // LUX SC + sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce, templ->extradata_be); + ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) } else { sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce); @@ -144,11 +148,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); uint64_t coin_target = decode_compact(templ->nbits); if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - // please forgive me for this hack jebus - if (strstr(g_current_algo->name,"balloon") && - (submitvalues->hash_bin[30] | submitvalues->hash_bin[31])) - coin_target = 0x0; int block_size = YAAMP_SMALLBUFSIZE; vector::const_iterator i; @@ -250,7 +249,7 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL else snprintf(block_hex, block_size, "%s", hex); } - + if(g_current_algo->name && !strcmp("ZBIT", coind->symbol)) { char head[168]; char extra[10 * 1024]; @@ -369,32 +368,31 @@ static bool ntime_valid_range(const char ntimehex[]) return (abs(rawtime - ntime) < (30 * 60)); } +static bool valid_string_params(json_value *json_params) +{ + for(int p=0; p < json_params->u.array.length; p++) { + if (!json_is_string(json_params->u.array.values[p])) + return false; + } + return true; +} + bool client_submit(YAAMP_CLIENT *client, json_value *json_params) { - bool isBalloon = false; - if (strstr(g_current_algo->name,"balloon")) - isBalloon = true; - // submit(worker_name, jobid, extranonce2, ntime, nonce): - if(json_params->u.array.length<5) { + if(json_params->u.array.length<5 || !valid_string_params(json_params)) { debuglog("%s - %s bad message\n", client->username, client->sock->ip); client->submit_bad++; return false; } - char extranonce2[32]; - char ntime[32]; - char nonce[32]; - char vote[8]; - - memset(extranonce2, 0, 32); - memset(ntime, 0, 32); - memset(nonce, 0, 32); - memset(vote, 0, 8); + char extranonce2[32] = { 0 }; + char extra[160] = { 0 }; + char nonce[80] = { 0 }; + char ntime[32] = { 0 }; + char vote[8] = { 0 }; - if (!json_params->u.array.values[1]->u.string.ptr || strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { - - + if (strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { clientlog(client, "bad json, wrong jobid len"); client->submit_bad++; return false; @@ -404,18 +402,27 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); - - if (json_params->u.array.length == 6) - strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); - - if (g_debuglog_hash) { - debuglog("submit %s (uid %d) %d, %s, %s, %s\n", client->sock->ip, client->userid, jobid, extranonce2, ntime, nonce); - } string_lower(extranonce2); string_lower(ntime); string_lower(nonce); - string_lower(vote); + + if (json_params->u.array.length == 6) { + if (strstr(g_stratum_algo, "phi")) { + // lux optional field, smart contral root hashes (not mandatory on shares submit) + strncpy(extra, json_params->u.array.values[5]->u.string.ptr, 128); + string_lower(extra); + } else { + // heavycoin vote + strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); + string_lower(vote); + } + } + + if (g_debuglog_hash) { + debuglog("submit %s (uid %d) %d, %s, t=%s, n=%s, extra=%s\n", client->sock->ip, client->userid, + jobid, extranonce2, ntime, nonce, extra); + } YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); if(!job) @@ -443,7 +450,7 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) if(strcmp(ntime, templ->ntime)) { - if (!ntime_valid_range(ntime)) { + if (!ishexa(ntime, 8) || !ntime_valid_range(ntime)) { client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); return true; } @@ -511,12 +518,6 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) // minimum hash diff begins with 0000, for all... uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; - - // except balloon - if(isBalloon) - - pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; - if(pfx) { if (g_debuglog_hash) { debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, @@ -527,35 +528,17 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) return true; } - // bit dim, but so is measuring the diff this way - uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); uint64_t user_target; + uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); + uint64_t user_target = diff_to_target(client->difficulty_actual); uint64_t coin_target = decode_compact(templ->nbits); - uint64_t hashcomb = * (uint64_t *) &submitvalues.hash_bin[24]; - - // prevents overflow - if(!isBalloon) { - user_target = diff_to_target(client->difficulty_actual); - } - if(templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - // due to balloon's lower diff - if (g_debuglog_hash && isBalloon) { - debuglog("hash %016lx \n", hashcomb); - debuglog("targ %016lx \n", sharetotarg(client->difficulty_actual)); - } - if (g_debuglog_hash && !isBalloon) { - + if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + if (g_debuglog_hash) { debuglog("%016llx actual\n", hash_int); debuglog("%016llx target\n", user_target); debuglog("%016llx coin\n", coin_target); } - // due to balloon's lower diff - if(hashcomb > sharetotarg(client->difficulty_actual) && isBalloon) - { - client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); - return true; - } - if(hash_int > user_target && hash_int > coin_target && !isBalloon) + if(hash_int > user_target && hash_int > coin_target) { client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); return true; diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak new file mode 100644 index 000000000..942c9886f --- /dev/null +++ b/stratum/client_submit.cpp.bak @@ -0,0 +1,594 @@ + +#include "stratum.h" + +uint64_t lyra2z_height = 0; + +//#define MERKLE_DEBUGLOG +//#define DONTSUBMIT + +void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, + const char *nonce1, const char *nonce2, const char *ntime, const char *nonce) +{ + sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); + int coinbase_len = strlen(submitvalues->coinbase); + + unsigned char coinbase_bin[1024]; + memset(coinbase_bin, 0, 1024); + binlify(coinbase_bin, submitvalues->coinbase); + + char doublehash[128]; + memset(doublehash, 0, 128); + + // some (old) wallet/algos need a simple SHA256 (blakecoin, whirlcoin, groestlcoin...) + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + if (g_current_algo->merkle_func) + merkle_hash = g_current_algo->merkle_func; + merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); + + string merkleroot = merkle_with_first(templ->txsteps, doublehash); + ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); + +#ifdef MERKLE_DEBUGLOG + printf("merkle root %s\n", merkleroot.c_str()); +#endif + if (!strcmp(g_current_algo->name, "lbry")) { + sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + templ->claim_be, ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 32 + 20); + } else { + sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 20); + } + + binlify(submitvalues->header_bin, submitvalues->header_be); + +// printf("%s\n", submitvalues->header_be); + int header_len = strlen(submitvalues->header)/2; + g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); + + hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); + string_be(submitvalues->hash_hex, submitvalues->hash_be); +} + +///////////////////////////////////////////// + +static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *out, + const char *ntime, const char *nonce, const char *nonce2, const char *vote, bool usegetwork) +{ + struct __attribute__((__packed__)) { + uint32_t version; + char prevblock[32]; + char merkleroot[32]; + char stakeroot[32]; + uint16_t votebits; + char finalstate[6]; + uint16_t voters; + uint8_t freshstake; + uint8_t revoc; + uint32_t poolsize; + uint32_t nbits; + uint64_t sbits; + uint32_t height; + uint32_t size; + uint32_t ntime; + uint32_t nonce; + unsigned char extra[32]; + uint32_t stakever; + uint32_t hashtag[3]; + } header; + + memcpy(&header, templ->header, sizeof(header)); + + memset(header.extra, 0, 32); + sscanf(nonce, "%08x", &header.nonce); + + if (strcmp(vote, "")) { + uint16_t votebits = 0; + sscanf(vote, "%04hx", &votebits); + header.votebits = (header.votebits & 1) | (votebits & 0xfffe); + } + + binlify(header.extra, nonce2); + + hexlify(out->header, (const unsigned char*) &header, 180); + memcpy(out->header_bin, &header, sizeof(header)); +} + +static void build_submit_values_decred(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, + const char *nonce1, const char *nonce2, const char *ntime, const char *nonce, const char *vote, bool usegetwork) +{ + if (!usegetwork) { + // not used yet + char doublehash[128] = { 0 }; + + sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); + int coinbase_len = strlen(submitvalues->coinbase); + + unsigned char coinbase_bin[1024]; + memset(coinbase_bin, 0, 1024); + binlify(coinbase_bin, submitvalues->coinbase); + + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + if (g_current_algo->merkle_func) + merkle_hash = g_current_algo->merkle_func; + merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); + + string merkleroot = merkle_with_first(templ->txsteps, doublehash); + ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); + +#ifdef MERKLE_DEBUGLOG + printf("merkle root %s\n", merkleroot.c_str()); +#endif + } + create_decred_header(templ, submitvalues, ntime, nonce, nonce2, vote, usegetwork); + + int header_len = strlen(submitvalues->header)/2; + g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); + + hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); + string_be(submitvalues->hash_hex, submitvalues->hash_be); +} + +///////////////////////////////////////////////////////////////////////////////// + +static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VALUES *submitvalues, + char *extranonce2, char *ntime, char *nonce, char *vote) +{ + YAAMP_COIND *coind = job->coind; + YAAMP_JOB_TEMPLATE *templ = job->templ; + + if(job->block_found) return; + if(job->deleted) return; + + uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); + uint64_t coin_target = decode_compact(templ->nbits); + if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + // please forgive me for this hack jebus + if (strstr(g_current_algo->name,"balloon") && + (submitvalues->hash_bin[30] | submitvalues->hash_bin[31])) + coin_target = 0x0; + + int block_size = YAAMP_SMALLBUFSIZE; + vector::const_iterator i; + + for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) + block_size += strlen((*i).c_str()); + + char *block_hex = (char *)malloc(block_size); + if(!block_hex) return; + + // do aux first + for(int i=0; iauxs_size; i++) + { + if(!templ->auxs[i]) continue; + YAAMP_COIND *coind_aux = templ->auxs[i]->coind; + + if(!coind_aux || !strcmp(coind->symbol, coind_aux->symbol2)) + continue; + + unsigned char target_aux[1024]; + binlify(target_aux, coind_aux->aux.target); + + uint64_t coin_target_aux = get_hash_difficulty(target_aux); + if(hash_int <= coin_target_aux) + { + memset(block_hex, 0, block_size); + + strcat(block_hex, submitvalues->coinbase); // parent coinbase + strcat(block_hex, submitvalues->hash_be); // parent hash + + ////////////////////////////////////////////////// parent merkle steps + + sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)templ->txsteps.size()); + + vector::const_iterator i; + for(i = templ->txsteps.begin(); i != templ->txsteps.end(); ++i) + sprintf(block_hex + strlen(block_hex), "%s", (*i).c_str()); + + strcat(block_hex, "00000000"); + + ////////////////////////////////////////////////// auxs merkle steps + + vector lresult = coind_aux_merkle_branch(templ->auxs, templ->auxs_size, coind_aux->aux.index); + sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)lresult.size()); + + for(i = lresult.begin(); i != lresult.end(); ++i) + sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); + + sprintf(block_hex+strlen(block_hex), "%02x000000", (unsigned char)coind_aux->aux.index); + + ////////////////////////////////////////////////// parent header + + strcat(block_hex, submitvalues->header_be); + + bool b = coind_submitgetauxblock(coind_aux, coind_aux->aux.hash, block_hex); + if(b) + { + debuglog("*** ACCEPTED %s %d (+1)\n", coind_aux->name, coind_aux->height); + + block_add(client->userid, client->workerid, coind_aux->id, coind_aux->height, target_to_diff(coin_target_aux), + target_to_diff(hash_int), coind_aux->aux.hash, "", 0); + } + + else + debuglog("%s %d REJECTED\n", coind_aux->name, coind_aux->height); + } + } + + if(hash_int <= coin_target) + { + char count_hex[8] = { 0 }; + if (templ->txcount <= 252) + sprintf(count_hex, "%02x", templ->txcount & 0xFF); + else + sprintf(count_hex, "fd%02x%02x", templ->txcount & 0xFF, templ->txcount >> 8); + + memset(block_hex, 0, block_size); + sprintf(block_hex, "%s%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); + + if (g_current_algo->name && !strcmp("jha", g_current_algo->name)) { + // block header of 88 bytes + sprintf(block_hex, "%s8400000008000000%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); + } + + vector::const_iterator i; + for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) + sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); + + // POS coins need a zero byte appended to block, the daemon replaces it with the signature + if(coind->pos) + strcat(block_hex, "00"); + + if(!strcmp("DCR", coind->rpcencoding)) { + // submit the regenerated block header + char hex[384]; + hexlify(hex, submitvalues->header_bin, 180); + if (coind->usegetwork) + snprintf(block_hex, block_size, "%s8000000100000000000005a0", hex); + else + snprintf(block_hex, block_size, "%s", hex); + } + + if(g_current_algo->name && !strcmp("ZBIT", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } + if(g_current_algo->name && !strcmp("MLS", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } + + bool b = coind_submit(coind, block_hex); + if(b) + { + debuglog("*** ACCEPTED %s %d (diff %g) by %s (id: %d)\n", coind->name, templ->height, + target_to_diff(hash_int), client->sock->ip, client->userid); + + job->block_found = true; + + char doublehash2[128]; + memset(doublehash2, 0, 128); + + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + //if (g_current_algo->merkle_func) + // merkle_hash = g_current_algo->merkle_func; + + merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + + char hash1[1024]; + memset(hash1, 0, 1024); + + string_be(doublehash2, hash1); + + if(coind->usegetwork && !strcmp("DCR", coind->rpcencoding)) { + // no merkle stuff + strcpy(hash1, submitvalues->hash_hex); + } + + block_add(client->userid, client->workerid, coind->id, templ->height, + target_to_diff(coin_target), target_to_diff(hash_int), + hash1, submitvalues->hash_be, templ->has_segwit_txs); + + if(!strcmp("DCR", coind->rpcencoding)) { + // delay between dcrd and dcrwallet + sleep(1); + } + + if(!strcmp(coind->lastnotifyhash,submitvalues->hash_be)) { + block_confirm(coind->id, submitvalues->hash_be); + } + + if (g_debuglog_hash) { + debuglog("--------------------------------------------------------------\n"); + debuglog("hash1 %s\n", hash1); + debuglog("hash2 %s\n", submitvalues->hash_be); + } + } + + else { + debuglog("*** REJECTED :( %s block %d %d txs\n", coind->name, templ->height, templ->txcount); + rejectlog("REJECTED %s block %d\n", coind->symbol, templ->height); + if (g_debuglog_hash) { + //debuglog("block %s\n", block_hex); + debuglog("--------------------------------------------------------------\n"); + } + } + } + + free(block_hex); +} + +bool dump_submit_debug(const char *title, YAAMP_CLIENT *client, YAAMP_JOB *job, char *extranonce2, char *ntime, char *nonce) +{ + debuglog("ERROR %s, %s subs %d, job %x, %s, id %x, %d, %s, %s %s\n", + title, client->sock->ip, client->extranonce_subscribe, job? job->id: 0, client->extranonce1, + client->extranonce1_id, client->extranonce2size, extranonce2, ntime, nonce); +} + +void client_submit_error(YAAMP_CLIENT *client, YAAMP_JOB *job, int id, const char *message, char *extranonce2, char *ntime, char *nonce) +{ +// if(job->templ->created+2 > time(NULL)) + if(job && job->deleted) + client_send_result(client, "true"); + + else + { + client_send_error(client, id, message); + share_add(client, job, false, extranonce2, ntime, nonce, 0, id); + + client->submit_bad++; + if (g_debuglog_hash) { + dump_submit_debug(message, client, job, extranonce2, ntime, nonce); + } + } + + object_unlock(job); +} + +static bool ntime_valid_range(const char ntimehex[]) +{ + time_t rawtime = 0; + uint32_t ntime = 0; + if (strlen(ntimehex) != 8) return false; + sscanf(ntimehex, "%8x", &ntime); + if (ntime < 0x5b000000 || ntime > 0x60000000) // 14 Jan 2021 + return false; + time(&rawtime); + return (abs(rawtime - ntime) < (30 * 60)); +} + +bool client_submit(YAAMP_CLIENT *client, json_value *json_params) +{ + bool isBalloon = false; + if (strstr(g_current_algo->name,"balloon")) + isBalloon = true; + + // submit(worker_name, jobid, extranonce2, ntime, nonce): + if(json_params->u.array.length<5) { + debuglog("%s - %s bad message\n", client->username, client->sock->ip); + client->submit_bad++; + return false; + } + + char extranonce2[32]; + char ntime[32]; + char nonce[32]; + char vote[8]; + + memset(extranonce2, 0, 32); + memset(ntime, 0, 32); + memset(nonce, 0, 32); + memset(vote, 0, 8); + + if (!json_params->u.array.values[1]->u.string.ptr || strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { + + + clientlog(client, "bad json, wrong jobid len"); + client->submit_bad++; + return false; + } + int jobid = htoi(json_params->u.array.values[1]->u.string.ptr); + + strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); + strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); + strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); + + if (json_params->u.array.length == 6) + strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); + + if (g_debuglog_hash) { + debuglog("submit %s (uid %d) %d, %s, %s, %s\n", client->sock->ip, client->userid, jobid, extranonce2, ntime, nonce); + } + + string_lower(extranonce2); + string_lower(ntime); + string_lower(nonce); + string_lower(vote); + + YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); + if(!job) + { + client_submit_error(client, NULL, 21, "Invalid job id", extranonce2, ntime, nonce); + return true; + } + + if(job->deleted) + { + client_send_result(client, "true"); + object_unlock(job); + + return true; + } + + bool is_decred = job->coind && !strcmp("DCR", job->coind->rpcencoding); + + YAAMP_JOB_TEMPLATE *templ = job->templ; + + if(strlen(nonce) != YAAMP_NONCE_SIZE*2 || !ishexa(nonce, YAAMP_NONCE_SIZE*2)) { + client_submit_error(client, job, 20, "Invalid nonce size", extranonce2, ntime, nonce); + return true; + } + + if(strcmp(ntime, templ->ntime)) + { + if (!ntime_valid_range(ntime)) { + client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); + return true; + } + // dont allow algos permutations change over time (can lead to different speeds) + if (!g_allow_rolltime) { + client_submit_error(client, job, 23, "Invalid ntime (rolling not allowed)", extranonce2, ntime, nonce); + return true; + } + } + + YAAMP_SHARE *share = share_find(job->id, extranonce2, ntime, nonce, client->extranonce1); + if(share) + { + client_submit_error(client, job, 22, "Duplicate share", extranonce2, ntime, nonce); + return true; + } + + if(strlen(extranonce2) != client->extranonce2size*2) + { + client_submit_error(client, job, 24, "Invalid extranonce2 size", extranonce2, ntime, nonce); + return true; + } + + // check if the submitted extranonce is valid + if(is_decred && client->extranonce2size > 4) { + char extra1_id[16], extra2_id[16]; + int cmpoft = client->extranonce2size*2 - 8; + strcpy(extra1_id, &client->extranonce1[cmpoft]); + strcpy(extra2_id, &extranonce2[cmpoft]); + int extradiff = (int) strcmp(extra2_id, extra1_id); + int extranull = (int) !strcmp(extra2_id, "00000000"); + if (extranull && client->extranonce2size > 8) + extranull = (int) !strcmp(&extranonce2[8], "00000000" "00000000"); + if (extranull) { + debuglog("extranonce %s is empty!, should be %s - %s\n", extranonce2, extra1_id, client->sock->ip); + client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); + return true; + } + if (extradiff) { + // some ccminer pre-release doesn't fill correctly the extranonce + client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); + socket_send(client->sock, "{\"id\":null,\"method\":\"mining.set_extranonce\",\"params\":[\"%s\",%d]}\n", + client->extranonce1, client->extranonce2size); + return true; + } + } + else if(!ishexa(extranonce2, client->extranonce2size*2)) { + client_submit_error(client, job, 27, "Invalid nonce2", extranonce2, ntime, nonce); + return true; + } + + /////////////////////////////////////////////////////////////////////////////////////////// + + YAAMP_JOB_VALUES submitvalues; + memset(&submitvalues, 0, sizeof(submitvalues)); + + if(is_decred) + build_submit_values_decred(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce, vote, true); + else + build_submit_values(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce); + + if (templ->height && !strcmp(g_current_algo->name,"lyra2z")) { + lyra2z_height = templ->height; + } + + // minimum hash diff begins with 0000, for all... + uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; + + // except balloon + if(isBalloon) + + pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; + + if(pfx) { + if (g_debuglog_hash) { + debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, + (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], + (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); + } + client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); + return true; + } + + // bit dim, but so is measuring the diff this way + uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); uint64_t user_target; + uint64_t coin_target = decode_compact(templ->nbits); + uint64_t hashcomb = * (uint64_t *) &submitvalues.hash_bin[24]; + + // prevents overflow + if(!isBalloon) { + user_target = diff_to_target(client->difficulty_actual); + } + if(templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + // due to balloon's lower diff + if (g_debuglog_hash && isBalloon) { + debuglog("hash %016lx \n", hashcomb); + debuglog("targ %016lx \n", sharetotarg(client->difficulty_actual)); + } + if (g_debuglog_hash && !isBalloon) { + + + debuglog("%016llx actual\n", hash_int); + debuglog("%016llx target\n", user_target); + debuglog("%016llx coin\n", coin_target); + } + // due to balloon's lower diff + if(hashcomb > sharetotarg(client->difficulty_actual) && isBalloon) + { + client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); + return true; + } + if(hash_int > user_target && hash_int > coin_target && !isBalloon) + { + client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); + return true; + } + + if(job->coind) + client_do_submit(client, job, &submitvalues, extranonce2, ntime, nonce, vote); + else + remote_submit(client, job, &submitvalues, extranonce2, ntime, nonce); + + client_send_result(client, "true"); + client_record_difficulty(client); + client->submit_bad = 0; + client->shares++; + if (client->shares <= 200 && (client->shares % 50) == 0) { + // 4 records are enough per miner + if (!client_ask_stats(client)) client->stats = false; + } + + double share_diff = diff_to_target(hash_int); +// if (g_current_algo->diff_multiplier != 0) { +// share_diff = share_diff / g_current_algo->diff_multiplier; +// } + + if (g_debuglog_hash) { + // only log a few... + if (share_diff > (client->difficulty_actual * 16)) + debuglog("submit %s (uid %d) %d, %s, %s, %s, %.3f/%.3f\n", client->sock->ip, client->userid, + jobid, extranonce2, ntime, nonce, share_diff, client->difficulty_actual); + } + + share_add(client, job, true, extranonce2, ntime, nonce, share_diff, 0); + object_unlock(job); + + return true; +} diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 3ec21b1f8..147a74901 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -27,6 +27,20 @@ static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char strcat(data, coinb2_part); } + +static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + encode_tx_value(evalue, amount); + sprintf(coinb2_part, "%s", script); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) { int ol = strlen(data); @@ -94,10 +108,14 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if(coind->txmessage) strcpy(eversion1, "02000000"); + const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); + if(coinbase_payload && strlen(coinbase_payload) > 0) + strcpy(eversion1, "03000500"); + char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - char script2[32] = "7969696d7000"; // "yiimp\0" in hex ascii + char script2[32] = "746865706f6f6c2e6c69666500"; // "yiimp\0" in hex ascii if(!coind->pos && !coind->isaux && templ->auxs_size) coinbase_aux(templ, script2); @@ -484,8 +502,14 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if(superblocks_enabled && superblock) { for(int i = 0; i < superblock->u.array.length; i++) { const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + const char *script = json_get_string(superblock->u.array.values[i], "script"); json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { npayees++; available -= amount; base58_decode(payee, script_payee); @@ -498,19 +522,44 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } } } - if (masternode_enabled && masternode) { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount && started) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); + + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (masternode_enabled && masternode && started) { + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i++) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + const char *script = json_get_string(masternode->u.array.values[i], "script"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + } } } sprintf(payees, "%02x", npayees); @@ -519,6 +568,12 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * strcat(templ->coinb2, script_dests); job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime + if(coinbase_payload && strlen(coinbase_payload) > 0) { + char coinbase_payload_size[18]; + ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload); strcat(templ->coinb2, coinbase_payload); + } coind->reward = (double)available/100000000*coind->reward_mul; //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); diff --git a/stratum/db.cpp b/stratum/db.cpp index 55cb0621c..a2b3b59c7 100644 --- a/stratum/db.cpp +++ b/stratum/db.cpp @@ -207,6 +207,8 @@ void db_update_coinds(YAAMP_DB *db) YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, atoi(row[0])); if(!coind) { + if (!strlen(g_stratum_coin_include) || (strlen(g_stratum_coin_include) && strstr(g_stratum_coin_include, row[20]))) + { coind = new YAAMP_COIND; memset(coind, 0, sizeof(YAAMP_COIND)); @@ -214,6 +216,9 @@ void db_update_coinds(YAAMP_DB *db) coind->newblock = true; coind->id = atoi(row[0]); coind->aux.coind = coind; + } + else + continue; } else coind->newcoind = false; diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index b6999ff5d..41d24f060 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -167,6 +167,7 @@ YAAMP_ALGO g_algos[] = {"quark", quark_hash, 1, 0, 0}, {"qubit", qubit_hash, 1, 0, 0}, {"rainforest", rainforest_hash, 1, 0, 0}, + {"rfv2", rfv2_hash_yiimp, 0x10000, 0, 0}, {"scrypt", scrypt_hash, 0x10000, 0, 0}, {"scryptn", scryptn_hash, 0x10000, 0, 0}, {"sha256", sha256_double_hash, 1, 0, 0}, diff --git a/stratum/stratum.cpp.bak b/stratum/stratum.cpp.bak new file mode 100644 index 000000000..b6999ff5d --- /dev/null +++ b/stratum/stratum.cpp.bak @@ -0,0 +1,486 @@ + +#include "stratum.h" +#include +#include + +CommonList g_list_coind; +CommonList g_list_client; +CommonList g_list_job; +CommonList g_list_remote; +CommonList g_list_renter; +CommonList g_list_share; +CommonList g_list_worker; +CommonList g_list_block; +CommonList g_list_submit; +CommonList g_list_source; + +int g_tcp_port; + +char g_tcp_server[1024]; +char g_tcp_password[1024]; + +char g_sql_host[1024]; +char g_sql_database[1024]; +char g_sql_username[1024]; +char g_sql_password[1024]; +int g_sql_port = 3306; + +char g_stratum_coin_include[256]; +char g_stratum_coin_exclude[256]; + +char g_stratum_algo[256]; +double g_stratum_difficulty; +double g_stratum_nicehash_difficulty; +double g_stratum_nicehash_min_diff; +double g_stratum_nicehash_max_diff; +double g_stratum_min_diff; +double g_stratum_max_diff; + +int g_stratum_max_ttf; +int g_stratum_max_cons = 5000; +bool g_stratum_reconnect; +bool g_stratum_renting; +bool g_stratum_segwit = false; + +int g_limit_txs_per_block = 0; + +bool g_handle_haproxy_ips = false; +int g_socket_recv_timeout = 600; + +bool g_debuglog_client; +bool g_debuglog_hash; +bool g_debuglog_socket; +bool g_debuglog_rpc; +bool g_debuglog_list; +bool g_debuglog_remote; + +bool g_autoexchange = true; + +uint64_t g_max_shares = 0; +uint64_t g_shares_counter = 0; +uint64_t g_shares_log = 0; + +bool g_allow_rolltime = true; +time_t g_last_broadcasted = 0; +YAAMP_DB *g_db = NULL; + +pthread_mutex_t g_db_mutex; +pthread_mutex_t g_nonce1_mutex; +pthread_mutex_t g_job_create_mutex; + +struct ifaddrs *g_ifaddr; + +volatile bool g_exiting = false; + +void *stratum_thread(void *p); +void *monitor_thread(void *p); + +//////////////////////////////////////////////////////////////////////////////////////// + +static void scrypt_hash(const char* input, char* output, uint32_t len) +{ + scrypt_1024_1_1_256((unsigned char *)input, (unsigned char *)output); +} + +static void scryptn_hash(const char* input, char* output, uint32_t len) +{ + time_t time_table[][2] = + { + {2048, 1389306217}, + {4096, 1456415081}, + {8192, 1506746729}, + {16384, 1557078377}, + {32768, 1657741673}, + {65536, 1859068265}, + {131072, 2060394857}, + {262144, 1722307603}, + {524288, 1769642992}, + {0, 0}, + }; + + for(int i=0; time_table[i][0]; i++) + if(time(NULL) < time_table[i+1][1]) + { + scrypt_N_R_1_256(input, output, time_table[i][0], 1, len); + return; + } +} + +static void neoscrypt_hash(const char* input, char* output, uint32_t len) +{ + neoscrypt((unsigned char *)input, (unsigned char *)output, 0x80000620); +} + +YAAMP_ALGO g_algos[] = +{ + {"a5a", a5a_hash, 0x10000, 0, 0}, + {"aergo", aergo_hash, 1, 0, 0}, + {"allium", allium_hash, 0x100, 0, 0}, + {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, + {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation + {"argon2m", argon2m_hash, 0x10000, 0, 0}, + {"balloon", balloon_hash, 1, 0, 0}, + {"bastion", bastion_hash, 1, 0 }, + {"bcd", bcd_hash, 1, 0, 0}, + {"binarium-v1", Binarium_hash_v1_hash, 1, 0, 0}, + {"bitcore", timetravel10_hash, 0x100, 0, 0}, + {"blake", blake_hash, 1, 0 }, + {"blake2b", blake2b_hash, 1, 0 }, + {"blake2s", blake2s_hash, 1, 0 }, + {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, + {"bmw", bmw_hash, 1, 0, 0}, + {"c11", c11_hash, 1, 0, 0}, + {"decred", decred_hash, 1, 0 }, + {"dedal", dedal_hash, 0x100, 0, 0}, + {"deep", deep_hash, 1, 0, 0}, + {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ + {"exosis", exosis_hash, 0x100, 0, 0}, + {"fresh", fresh_hash, 0x100, 0, 0}, + {"geek", geek_hash, 1, 0, 0}, + {"groestl", groestl_hash, 0x100, 0, sha256_hash_hex }, /* groestlcoin */ + {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, + {"hive", hive_hash, 0x10000, 0, 0}, + {"hmq1725", hmq17_hash, 0x10000, 0, 0}, + {"hsr", hsr_hash, 1, 0, 0}, + {"jha", jha_hash, 0x10000, 0}, + {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, + {"keccakc", keccak256_hash, 0x100, 0, 0}, + {"lbk3", lbk3_hash, 0x100, 0, 0}, + {"lbry", lbry_hash, 0x100, 0, 0}, + {"luffa", luffa_hash, 1, 0, 0}, + {"lyra2", lyra2re_hash, 0x80, 0, 0}, + {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, + {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, + {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, + {"lyra2z", lyra2z_hash, 0x100, 0, 0}, + {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, + {"m7m", m7m_hash, 0x10000, 0, 0}, + {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ + {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, + {"nist5", nist5_hash, 1, 0, 0}, + {"penta", penta_hash, 1, 0, 0}, + {"phi", phi_hash, 1, 0, 0}, + {"phi2", phi2_hash, 0x100, 0, 0}, + {"phi1612", phi1612_hash, 1, 0, 0}, + {"pipe", pipe_hash, 1,0,0}, + {"polytimos", polytimos_hash, 1, 0, 0}, + {"quark", quark_hash, 1, 0, 0}, + {"qubit", qubit_hash, 1, 0, 0}, + {"rainforest", rainforest_hash, 1, 0, 0}, + {"scrypt", scrypt_hash, 0x10000, 0, 0}, + {"scryptn", scryptn_hash, 0x10000, 0, 0}, + {"sha256", sha256_double_hash, 1, 0, 0}, + {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x + {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x + {"sib", sib_hash, 1, 0, 0}, + {"skein", skein_hash, 1, 0, 0}, + {"skein2", skein2_hash, 1, 0, 0}, + {"skunk", skunk_hash, 1, 0, 0}, + {"sonoa", sonoa_hash, 1, 0, 0}, + {"timetravel", timetravel_hash, 0x100, 0, 0}, + {"tribus", tribus_hash, 1, 0, 0}, + {"vanilla", blakecoin_hash, 1, 0 }, + {"veltor", veltor_hash, 1, 0, 0}, + {"velvet", velvet_hash, 0x10000, 0, 0}, + {"vitalium", vitalium_hash, 1, 0, 0}, + {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ + {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ + {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, + {"x11", x11_hash, 1, 0, 0}, + {"x11evo", x11evo_hash, 1, 0, 0}, + {"x12", x12_hash, 1, 0, 0}, + {"x13", x13_hash, 1, 0, 0}, + {"x14", x14_hash, 1, 0, 0}, + {"x15", x15_hash, 1, 0, 0}, + {"x16r", x16r_hash, 0x100, 0, 0}, + {"x16rt", x16rt_hash, 0x100, 0, 0}, + {"x16s", x16s_hash, 0x100, 0, 0}, + {"x17", x17_hash, 1, 0, 0}, + {"x18", x18_hash, 1, 0, 0}, + {"x20r", x20r_hash, 0x100, 0, 0}, + {"x21s", x21s_hash, 0x100, 0, 0}, + {"x22i", x22i_hash, 1, 0, 0}, + {"xevan", xevan_hash, 0x100, 0, 0}, + {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, + {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, + {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, + {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, + {"yespower", yespower_hash, 0x10000, 0, 0 }, + {"yespowerR16", yespowerR16_hash, 0x10000, 0, 0 }, + {"zr5", zr5_hash, 1, 0, 0}, + {"", NULL, 0, 0}, +}; + +YAAMP_ALGO *g_current_algo = NULL; + +YAAMP_ALGO *stratum_find_algo(const char *name) +{ + for(int i=0; g_algos[i].name[0]; i++) + if(!strcmp(name, g_algos[i].name)) + return &g_algos[i]; + + return NULL; +} + +//////////////////////////////////////////////////////////////////////////////////////// + +int main(int argc, char **argv) +{ + if(argc < 2) + { + printf("usage: %s \n", argv[0]); + return 1; + } + + srand(time(NULL)); + getifaddrs(&g_ifaddr); + + initlog(argv[1]); + +#ifdef NO_EXCHANGE + // todo: init with a db setting or a yiimp shell command + g_autoexchange = false; +#endif + + char configfile[1024]; + sprintf(configfile, "%s.conf", argv[1]); + + dictionary *ini = iniparser_load(configfile); + if(!ini) + { + debuglog("cant load config file %s\n", configfile); + return 1; + } + + g_tcp_port = iniparser_getint(ini, "TCP:port", 3333); + strcpy(g_tcp_server, iniparser_getstring(ini, "TCP:server", NULL)); + strcpy(g_tcp_password, iniparser_getstring(ini, "TCP:password", NULL)); + + strcpy(g_sql_host, iniparser_getstring(ini, "SQL:host", NULL)); + strcpy(g_sql_database, iniparser_getstring(ini, "SQL:database", NULL)); + strcpy(g_sql_username, iniparser_getstring(ini, "SQL:username", NULL)); + strcpy(g_sql_password, iniparser_getstring(ini, "SQL:password", NULL)); + g_sql_port = iniparser_getint(ini, "SQL:port", 3306); + + // optional coin filters (to mine only one on a special port or a test instance) + char *coin_filter = iniparser_getstring(ini, "WALLETS:include", NULL); + strcpy(g_stratum_coin_include, coin_filter ? coin_filter : ""); + coin_filter = iniparser_getstring(ini, "WALLETS:exclude", NULL); + strcpy(g_stratum_coin_exclude, coin_filter ? coin_filter : ""); + + strcpy(g_stratum_algo, iniparser_getstring(ini, "STRATUM:algo", NULL)); + g_stratum_difficulty = iniparser_getdouble(ini, "STRATUM:difficulty", 16); + g_stratum_nicehash_difficulty = iniparser_getdouble(ini, "STRATUM:nicehash", 16); + g_stratum_min_diff = iniparser_getdouble(ini, "STRATUM:diff_min", g_stratum_difficulty/2); + g_stratum_max_diff = iniparser_getdouble(ini, "STRATUM:diff_max", g_stratum_difficulty*8192); + g_stratum_nicehash_min_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_min", g_stratum_nicehash_difficulty/2); + g_stratum_nicehash_max_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_max", g_stratum_nicehash_difficulty*8192); + + g_stratum_max_cons = iniparser_getint(ini, "STRATUM:max_cons", 5000); + g_stratum_max_ttf = iniparser_getint(ini, "STRATUM:max_ttf", 0x70000000); + g_stratum_reconnect = iniparser_getint(ini, "STRATUM:reconnect", true); + g_stratum_renting = iniparser_getint(ini, "STRATUM:renting", true); + g_handle_haproxy_ips = iniparser_getint(ini, "STRATUM:haproxy_ips", g_handle_haproxy_ips); + g_socket_recv_timeout = iniparser_getint(ini, "STRATUM:recv_timeout", 600); + + g_max_shares = iniparser_getint(ini, "STRATUM:max_shares", g_max_shares); + g_limit_txs_per_block = iniparser_getint(ini, "STRATUM:max_txs_per_block", 0); + + g_debuglog_client = iniparser_getint(ini, "DEBUGLOG:client", false); + g_debuglog_hash = iniparser_getint(ini, "DEBUGLOG:hash", false); + g_debuglog_socket = iniparser_getint(ini, "DEBUGLOG:socket", false); + g_debuglog_rpc = iniparser_getint(ini, "DEBUGLOG:rpc", false); + g_debuglog_list = iniparser_getint(ini, "DEBUGLOG:list", false); + g_debuglog_remote = iniparser_getint(ini, "DEBUGLOG:remote", false); + + iniparser_freedict(ini); + + g_current_algo = stratum_find_algo(g_stratum_algo); + + if(!g_current_algo) yaamp_error("invalid algo"); + if(!g_current_algo->hash_function) yaamp_error("no hash function"); + +// struct rlimit rlim_files = {0x10000, 0x10000}; +// setrlimit(RLIMIT_NOFILE, &rlim_files); + + struct rlimit rlim_threads = {0x8000, 0x8000}; + setrlimit(RLIMIT_NPROC, &rlim_threads); + + stratumlogdate("starting stratum for %s on %s:%d\n", + g_current_algo->name, g_tcp_server, g_tcp_port); + + // ntime should not be changed by miners for these algos + g_allow_rolltime = strcmp(g_stratum_algo,"x11evo"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"timetravel"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"bitcore"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"exosis"); + if (!g_allow_rolltime) + stratumlog("note: time roll disallowed for %s algo\n", g_current_algo->name); + + g_db = db_connect(); + if(!g_db) yaamp_error("Cant connect database"); + +// db_query(g_db, "update mining set stratumids='loading'"); + + yaamp_create_mutex(&g_db_mutex); + yaamp_create_mutex(&g_nonce1_mutex); + yaamp_create_mutex(&g_job_create_mutex); + + YAAMP_DB *db = db_connect(); + if(!db) yaamp_error("Cant connect database"); + + db_register_stratum(db); + db_update_algos(db); + db_update_coinds(db); + + sleep(2); + job_init(); + +// job_signal(); + + //////////////////////////////////////////////// + + pthread_t thread1; + pthread_create(&thread1, NULL, monitor_thread, NULL); + + pthread_t thread2; + pthread_create(&thread2, NULL, stratum_thread, NULL); + + sleep(20); + + while(!g_exiting) + { + db_register_stratum(db); + db_update_workers(db); + db_update_algos(db); + db_update_coinds(db); + + if(g_stratum_renting) + { + db_update_renters(db); + db_update_remotes(db); + } + + share_write(db); + share_prune(db); + + block_prune(db); + submit_prune(db); + + sleep(1); + job_signal(); + + //////////////////////////////////// + +// source_prune(); + + object_prune(&g_list_coind, coind_delete); + object_prune(&g_list_remote, remote_delete); + object_prune(&g_list_job, job_delete); + object_prune(&g_list_client, client_delete); + object_prune(&g_list_block, block_delete); + object_prune(&g_list_worker, worker_delete); + object_prune(&g_list_share, share_delete); + object_prune(&g_list_submit, submit_delete); + + if (!g_exiting) sleep(20); + } + + stratumlog("closing database...\n"); + db_close(db); + + pthread_join(thread2, NULL); + db_close(g_db); // client threads (called by stratum one) + + closelogs(); + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////// + +void *monitor_thread(void *p) +{ + while(!g_exiting) + { + sleep(120); + + if(g_last_broadcasted + YAAMP_MAXJOBDELAY < time(NULL)) + { + g_exiting = true; + stratumlogdate("%s dead lock, exiting...\n", g_stratum_algo); + exit(1); + } + + if(g_max_shares && g_shares_counter) { + + if((g_shares_counter - g_shares_log) > 10000) { + stratumlogdate("%s %luK shares...\n", g_stratum_algo, (g_shares_counter/1000u)); + g_shares_log = g_shares_counter; + } + + if(g_shares_counter > g_max_shares) { + g_exiting = true; + stratumlogdate("%s need a restart (%lu shares), exiting...\n", g_stratum_algo, (unsigned long) g_max_shares); + exit(1); + } + } + } +} + +/////////////////////////////////////////////////////////////////////////////// + +void *stratum_thread(void *p) +{ + int listen_sock = socket(AF_INET, SOCK_STREAM, 0); + if(listen_sock <= 0) yaamp_error("socket"); + + int optval = 1; + setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval); + + struct sockaddr_in serv; + + serv.sin_family = AF_INET; + serv.sin_addr.s_addr = htonl(INADDR_ANY); + serv.sin_port = htons(g_tcp_port); + + int res = bind(listen_sock, (struct sockaddr*)&serv, sizeof(serv)); + if(res < 0) yaamp_error("bind"); + + res = listen(listen_sock, 4096); + if(res < 0) yaamp_error("listen"); + + ///////////////////////////////////////////////////////////////////////// + + int failcount = 0; + while(!g_exiting) + { + int sock = accept(listen_sock, NULL, NULL); + if(sock <= 0) + { + int error = errno; + stratumlog("%s socket accept() error %d\n", g_stratum_algo, error); + failcount++; + usleep(50000); + if (error == 24 && failcount > 5) { + g_exiting = true; // happen when max open files is reached (see ulimit) + stratumlogdate("%s too much socket failure, exiting...\n", g_stratum_algo); + exit(error); + } + continue; + } + + failcount = 0; + pthread_t thread; + int res = pthread_create(&thread, NULL, client_thread, (void *)(long)sock); + if(res != 0) + { + int error = errno; + close(sock); + g_exiting = true; + stratumlog("%s pthread_create error %d %d\n", g_stratum_algo, res, error); + } + + pthread_detach(thread); + } +} diff --git a/stratum/stratum.h b/stratum/stratum.h index b7f287362..c89a32d7b 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -201,6 +201,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/quark.h" #include "algos/qubit.h" #include "algos/rainforest.h" +#include "algos/rfv2.h" #include "algos/sha256q.h" #include "algos/sha256t.h" #include "algos/sib.h" diff --git a/stratum/stratum.h.bak b/stratum/stratum.h.bak new file mode 100644 index 000000000..b7f287362 --- /dev/null +++ b/stratum/stratum.h.bak @@ -0,0 +1,235 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; + +#include "iniparser/src/iniparser.h" + +#include "json.h" +#include "util.h" + +#define YAAMP_RESTARTDELAY (24*60*60) +#define YAAMP_MAXJOBDELAY (2*60) +#define CURL_RPC_TIMEOUT (30) + +#define YAAMP_MS 1000 +#define YAAMP_SEC 1000000 + +#define YAAMP_MAXALGOS 32 + +typedef void (*YAAMP_HASH_FUNCTION)(const char *, char *, uint32_t); + +#define YAAMP_SHAREPERSEC 10 + +#define YAAMP_MINDIFF 0x0000000080000000 +#define YAAMP_MAXDIFF 0x4000000000000000 + +#define YAAMP_SMALLBUFSIZE (32*1024) + +#define YAAMP_NONCE_SIZE 4 +#define YAAMP_EXTRANONCE2_SIZE 4 + +#define YAAMP_HASHLEN_STR 65 +#define YAAMP_HASHLEN_BIN 32 + +extern CommonList g_list_coind; +extern CommonList g_list_client; +extern CommonList g_list_job; +extern CommonList g_list_remote; +extern CommonList g_list_renter; +extern CommonList g_list_share; +extern CommonList g_list_worker; +extern CommonList g_list_block; +extern CommonList g_list_submit; +extern CommonList g_list_source; + +extern int g_tcp_port; + +extern char g_tcp_server[1024]; +extern char g_tcp_password[1024]; + +extern char g_sql_host[1024]; +extern char g_sql_database[1024]; +extern char g_sql_username[1024]; +extern char g_sql_password[1024]; +extern int g_sql_port; + +extern char g_stratum_coin_include[256]; +extern char g_stratum_coin_exclude[256]; + +extern char g_stratum_algo[256]; +extern double g_stratum_difficulty; +extern double g_stratum_min_diff; +extern double g_stratum_max_diff; +extern double g_stratum_nicehash_difficulty; +extern double g_stratum_nicehash_min_diff; +extern double g_stratum_nicehash_max_diff; + +extern int g_stratum_max_cons; +extern int g_stratum_max_ttf; +extern bool g_stratum_reconnect; +extern bool g_stratum_renting; +extern bool g_stratum_segwit; +extern int g_limit_txs_per_block; + +extern bool g_handle_haproxy_ips; +extern int g_socket_recv_timeout; + +extern bool g_debuglog_client; +extern bool g_debuglog_hash; +extern bool g_debuglog_socket; +extern bool g_debuglog_rpc; +extern bool g_debuglog_list; +extern bool g_debuglog_remote; + +extern uint64_t g_max_shares; +extern uint64_t g_shares_counter; + +extern bool g_allow_rolltime; +extern time_t g_last_broadcasted; + +extern struct ifaddrs *g_ifaddr; + +extern pthread_mutex_t g_db_mutex; +extern pthread_mutex_t g_nonce1_mutex; +extern pthread_mutex_t g_job_create_mutex; + +extern volatile bool g_exiting; + +#include "db.h" +#include "object.h" +#include "socket.h" +#include "client.h" +#include "rpc.h" +#include "job.h" +#include "coind.h" +#include "remote.h" +#include "share.h" + +extern YAAMP_DB *g_db; +extern YAAMP_ALGO g_algos[]; +extern YAAMP_ALGO *g_current_algo; + +extern bool g_autoexchange; + +///////////////////////////////////////////////////////////////////////////////////////// + +YAAMP_ALGO *stratum_find_algo(const char *name); + +extern "C" +{ +void sha256_hash(const char *input, char *output, unsigned int len); +void sha256_double_hash(const char *input, char *output, unsigned int len); + +void scrypt_1024_1_1_256(const unsigned char *input, unsigned char *output); +void scrypt_N_R_1_256(const char* input, char* output, uint32_t N, uint32_t R, uint32_t len); +} + +void sha256_hash_hex(const char *input, char *output, unsigned int len); +void sha256_double_hash_hex(const char *input, char *output, unsigned int len); + + +#include "algos/a5a.h" +#include "algos/aergo.h" +#include "algos/allium.h" +#include "algos/argon2d.h" +#include "algos/argon2m.h" +#include "algos/balloon.h" +#include "algos/bastion.h" +#include "algos/bcd.h" +#include "algos/binarium_hash_v1.h" +#include "algos/bitcore.h" +#include "algos/blake.h" +#include "algos/blake2b.h" +#include "algos/blake2s.h" +#include "algos/blakecoin.h" +#include "algos/bmw.h" +#include "algos/c11.h" +#include "algos/dedal.h" +#include "algos/deep.h" +#include "algos/exosis.h" +#include "algos/fresh.h" +#include "algos/geek.h" +#include "algos/gltalgos.h" +#include "algos/groestl.h" +#include "algos/hex.h" +#include "algos/hive.h" +#include "algos/hmq17.h" +#include "algos/hsr14.h" +#include "algos/jha.h" +#include "algos/keccak.h" +#include "algos/lbk3.h" +#include "algos/lbry.h" +#include "algos/luffa.h" +#include "algos/lyra2re.h" +#include "algos/lyra2v2.h" +#include "algos/lyra2v3.h" +#include "algos/lyra2vc0ban.h" +#include "algos/lyra2z.h" +#include "algos/lyra2zz.h" +#include "algos/m7m.h" +#include "algos/neoscrypt.h" +#include "algos/nist5.h" +#include "algos/pentablake.h" +#include "algos/phi.h" +#include "algos/phi2.h" +#include "algos/phi1612.h" +#include "algos/pipehash.h" +#include "algos/polytimos.h" +#include "algos/quark.h" +#include "algos/qubit.h" +#include "algos/rainforest.h" +#include "algos/sha256q.h" +#include "algos/sha256t.h" +#include "algos/sib.h" +#include "algos/skein.h" +#include "algos/skein2.h" +#include "algos/skunk.h" +#include "algos/sonoa.h" +#include "algos/timetravel.h" +#include "algos/tribus.h" +#include "algos/veltor.h" +#include "algos/velvet.h" +#include "algos/vitalium.h" +#include "algos/whirlpool.h" +#include "algos/whirlpoolx.h" +#include "algos/x11.h" +#include "algos/x11evo.h" +#include "algos/x12.h" +#include "algos/x13.h" +#include "algos/x14.h" +#include "algos/x15.h" +#include "algos/x16r.h" +#include "algos/x16rt.h" +#include "algos/x16s.h" +#include "algos/x17.h" +#include "algos/x18.h" +#include "algos/x20r.h" +#include "algos/x21s.h" +#include "algos/x22i.h" +#include "algos/xevan.h" +#include "algos/yescrypt.h" +#include "algos/yespower.h" +#include "algos/zr5.h" diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 56e807823..a845ac062 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -56,6 +56,7 @@ function yaamp_get_algos() 'quark', 'qubit', 'rainforest', + 'rfv2', 'scrypt', 'scryptn', 'sha256', @@ -217,6 +218,7 @@ function getAlgoColors($algo) 'quark' => '#c0c0c0', 'qubit' => '#d0a0f0', 'rainforest' => '#d0f0a0', + 'rfv2' => '#d0f0a0', 'renesis' => '#f0b0a0', 'scrypt' => '#c0c0e0', 'scryptn' => '#d0d0d0', @@ -320,6 +322,7 @@ function getAlgoPort($algo) 'qubit' => 4733, 'renesis' => 5252, 'rainforest' => 7443, + 'rfv2' => 8443, 'scrypt' => 3433, 'scryptn' => 4333, 'sha256' => 3333, diff --git a/web/yaamp/core/functions/yaamp.php.bak b/web/yaamp/core/functions/yaamp.php.bak new file mode 100644 index 000000000..56e807823 --- /dev/null +++ b/web/yaamp/core/functions/yaamp.php.bak @@ -0,0 +1,690 @@ + 1.0, + 'argon2d-crds' => 1.0, + 'argon2d-dyn' => 1.0, + 'argon2m' => 1.0, + 'argon2d-uis' => 1.0, + 'blake' => 1.0, + 'keccak' => 1.0, + 'lyra2' => 1.0, + 'lyra2v2' => 1.0, + 'myr-gr' => 1.0, + 'neoscrypt' => 1.0, + 'nist5' => 1.0, + 'quark' => 1.0, + 'qubit' => 1.0, + 'scrypt' => 1.0, + 'scryptn' => 1.0, + 'sha256' => 1.0, + 'skein' => 1.0, + 'skein2' => 1.0, + 'velvet' => 1.0, + 'whirlpool' => 1.0, + 'x11' => 1.0, + 'x13' => 1.0, + 'yescrypt' => 1.0, + 'yescryptR8' => 1.0, + 'yescryptR16' => 1.0, + 'yescryptR32' => 1.0, + 'zr5' => 1.0, + ); + + if(!isset($a[$algo])) + return 1.0; + + return $a[$algo]; +} + +function getAlgoColors($algo) +{ + $a = array( + 'a5a' => '#f0f0f0', + 'aergo' => '#e0d0e0', + 'allium' => '#80a0d0', + 'argon2' => '#e0d0e0', + 'argon2d-crds' => '#e0d0e0', + 'argon2d-dyn' => '#e0d0e0', + 'argon2m' => '#e0d0e0', + 'argon2d-uis' => '#e0d0e0', + 'balloon' => '#e0b0b0', + 'bastion' => '#e0b0b0', + 'bcd' => '#ffd880', + 'binarium-v1' => '#f0f0f0', + 'bitcore' => '#f790c0', + 'blake' => '#f0f0f0', + 'blake2b' => '#f2c81f', + 'blakecoin' => '#f0f0f0', + 'c11' => '#a0a0d0', + 'decred' => '#f0f0f0', + 'deep' => '#e0ffff', + 'dmd-gr' => '#a0c0f0', + 'exosis' => '#49CCFE', + 'geek' => '#d0a0a0', + 'groestl' => '#d0a0a0', + 'hex' => '#c0f0c0', + 'hmq1725' => '#ffa0a0', + 'hsr' => '#aa70ff', + 'jha' => '#a0d0c0', + 'keccak' => '#c0f0c0', + 'keccakc' => '#c0f0c0', + 'lbk3' => '#809aef', + 'lbry' => '#b0d0e0', + 'luffa' => '#a0c0c0', + 'lyra2' => '#80a0f0', + 'lyra2v2' => '#80c0f0', + 'lyra2v3' => '#80a0f0', + 'lyra2z330' => '#80b0f0', + 'lyra2vc0ban' => '#80c0f0', + 'lyra2z' => '#80b0f0', + 'lyra2zz' => '#80b0f0', + 'm7m' => '#d0a0a0', + 'myr-gr' => '#a0c0f0', + 'neoscrypt' => '#a0d0f0', + 'nist5' => '#c0e0e0', + 'penta' => '#80c0c0', + 'phi' => '#a0a0e0', + 'phi2' => '#a0a0e0', + 'phi1612' => '#a0a0e0', + 'polytimos' => '#dedefe', + 'quark' => '#c0c0c0', + 'qubit' => '#d0a0f0', + 'rainforest' => '#d0f0a0', + 'renesis' => '#f0b0a0', + 'scrypt' => '#c0c0e0', + 'scryptn' => '#d0d0d0', + 'sha256' => '#d0d0a0', + 'sha256q' => '#9696dd', + 'sha256t' => '#d0d0f0', + 'sib' => '#a0a0c0', + 'skein' => '#80a0a0', + 'skein2' => '#c8a060', + 'skunk' => '#dedefe', + 'sonoa' => '#dedefe', + 'timetravel' => '#f0b0d0', + 'tribus' => '#c0d0d0', + 'vanilla' => '#f0f0f0', + 'velvet' => '#aac0cc', + 'vitalium' => '#f0b0a0', + 'whirlpool' => '#d0e0e0', + 'x11' => '#f0f0a0', + 'x11evo' => '#c0f0c0', + 'x12' => '#ffe090', + 'x13' => '#ffd880', + 'x14' => '#f0c080', + 'x15' => '#f0b080', + 'x16r' => '#f0b080', + 'x16rt' => '#f0b080', + 'x16s' => '#f0b080', + 'x17' => '#f0b0a0', + 'x18' => '#f0b0a0', + 'x20r' => '#f0b0a0', + 'x21s' => '#f0b0a0', + 'x22i' => '#f0a090', + 'xevan' => '#f0b0a0', + 'yescrypt' => '#e0d0e0', + 'yescryptR8' => '#e0d0e0', + 'yescryptR16' => '#e2d0e2', + 'yescryptR32' => '#e2d0d2', + 'zr5' => '#d0b0d0', + + 'MN' => '#ffffff', // MasterNode Earnings + 'PoS' => '#ffffff' // Stake + ); + + if(!isset($a[$algo])) + return '#ffffff'; + + return $a[$algo]; +} + +function getAlgoPort($algo) +{ + $a = array( + 'a5a' => 8633, + 'aergo' => 3691, + 'allium' => 4443, + 'argon2' => 4235, + 'argon2d-crds' => 4238, + 'argon2d-dyn' => 4239, + 'argon2m' => 4234, + 'argon2d-uis' => 4240, + 'balloon' => 5100, + 'bastion' => 6433, + 'bcd' => 3643, + 'binarium-v1' => 6666, + 'bitcore' => 3556, + 'blake' => 5733, + 'blake2b' => 5777, + 'blake2s' => 5766, + 'blakecoin' => 5743, + 'c11' => 3573, + 'decred' => 3252, + 'deep' => 3535, + 'dmd-gr' => 5333, + 'exosis' => 3557, + 'geek' => 3692, + 'hex' => 5135, + 'hmq1725' => 3747, + 'hsr' => 7433, + 'jha' => 4633, + 'keccak' => 5133, + 'keccakc' => 5134, + 'lbk3' => 5522, + 'lbry' => 3334, + 'luffa' => 5933, + 'lyra2' => 4432, + 'lyra2v2' => 4533, + 'lyra2v3' => 4433, + 'lyra2vc0ban' => 4563, + 'lyra2z' => 4553, + 'lyra2z330' => 4555, + 'lyra2zz' => 4556, + 'm7m' => 6033, + 'myr-gr' => 5433, + 'neoscrypt' => 4233, + 'nist5' => 3833, + 'penta' => 5833, + 'phi' => 8333, + 'phi2' => 8332, + 'phi1612' => 8334, + 'polytimos' => 8463, + 'quark' => 4033, + 'qubit' => 4733, + 'renesis' => 5252, + 'rainforest' => 7443, + 'scrypt' => 3433, + 'scryptn' => 4333, + 'sha256' => 3333, + 'sha256q' => 3337, + 'sha256t' => 3339, + 'sib' => 5033, + 'skein' => 4933, + 'skein2' => 5233, + 'skunk' => 8433, + 'sonoa' => 8733, + 'timetravel' => 3555, + 'tribus' => 8533, + 'vanilla' => 5755, + 'veltor' => 5034, + 'velvet' => 6133, + 'vitalium' => 3233, + 'whirlpool' => 4133, + 'x11' => 3533, + 'x11evo' => 3553, + 'x12' => 3233, + 'x13' => 3633, + 'x14' => 3933, + 'x15' => 3733, + 'x16r' => 3636, + 'x16rt' => 7220, + 'x16s' => 3663, + 'x17' => 3737, + 'x18' => 3738, + 'x20r' => 4300, + 'x21s' => 3224, + 'x22i' => 3223, + 'xevan' => 3739, + 'yescrypt' => 6233, + 'yescryptR8' => 6353, + 'yescryptR16' => 6333, + 'yescryptR32' => 6343, + 'zr5' => 4833, + 'zr5' => 5533, + //'groestl' => 5333, + // 5555 to 5683 reserved + ); + + global $configCustomPorts; + if(isset($configCustomPorts[$algo])) + return $configCustomPorts[$algo]; + + if(!isset($a[$algo])) + return 3033; + + return $a[$algo]; +} + +//////////////////////////////////////////////////////////////////////// + +function yaamp_fee($algo) +{ + $fee = controller()->memcache->get("yaamp_fee-$algo"); + if($fee && is_numeric($fee)) return (float) $fee; + +/* $norm = yaamp_get_algo_norm($algo); + if($norm == 0) $norm = 1; + + $hashrate = getdbosql('db_hashrate', "algo=:algo order by time desc", array(':algo'=>$algo)); + if(!$hashrate || !$hashrate->difficulty) return 1; + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_coinonly-$algo", + "select sum(difficulty) * $target / $interval / 1000 from shares where valid and time>$delay and algo=:algo and jobid=0", array(':algo'=>$algo)); + +// $fee = round(log($hashrate->hashrate * $norm / 1000000 / $hashrate->difficulty + 1), 1) + YAAMP_FEES_MINING; +// $fee = round(log($rate * $norm / 2000000 / $hashrate->difficulty + 1), 1) + YAAMP_FEES_MINING; +*/ + $fee = YAAMP_FEES_MINING; + + // local fees config + global $configFixedPoolFees; + if (isset($configFixedPoolFees[$algo])) { + $fee = (float) $configFixedPoolFees[$algo]; + } + + controller()->memcache->set("yaamp_fee-$algo", $fee); + return $fee; +} + +function take_yaamp_fee($v, $algo, $percent=-1) +{ + if ($percent == -1) $percent = yaamp_fee($algo); + + return $v - ($v * $percent / 100.0); +} + +function yaamp_hashrate_constant($algo=null) +{ + return pow(2, 42); // 0x400 00000000 +} + +function yaamp_hashrate_step() +{ + return 300; +} + +function yaamp_profitability($coin) +{ + if(!$coin->difficulty) return 0; + + $btcmhd = 20116.56761169 / $coin->difficulty * $coin->reward * $coin->price; + if(!$coin->auxpow && $coin->rpcencoding == 'POW') + { + $listaux = getdbolist('db_coins', "enable and visible and auto_ready and auxpow and algo='$coin->algo'"); + foreach($listaux as $aux) + { + if(!$aux->difficulty) continue; + + $btcmhdaux = 20116.56761169 / $aux->difficulty * $aux->reward * $aux->price; + $btcmhd += $btcmhdaux; + } + } + + $algo_unit_factor = yaamp_algo_mBTC_factor($coin->algo); + return $btcmhd * $algo_unit_factor; +} + +function yaamp_convert_amount_user($coin, $amount, $user) +{ + $refcoin = getdbo('db_coins', $user->coinid); + $value = 0.; + if (YAAMP_ALLOW_EXCHANGE) { + if(!$refcoin) $refcoin = getdbosql('db_coins', "symbol='BTC'"); + if(!$refcoin || $refcoin->price <= 0) return 0; + $value = $amount * $coin->price / $refcoin->price; + } else if ($coin->price && $refcoin && $refcoin->price > 0.) { + $value = $amount * $coin->price / $refcoin->price; + } else if ($coin->id == $user->coinid) { + $value = $amount; + } + return $value; +} + +function yaamp_convert_earnings_user($user, $status) +{ + $refcoin = getdbo('db_coins', $user->coinid); + $value = 0.; + if (YAAMP_ALLOW_EXCHANGE) { + if(!$refcoin) $refcoin = getdbosql('db_coins', "symbol='BTC'"); + if(!$refcoin || $refcoin->price <= 0) return 0; + $value = dboscalar("SELECT sum(amount*price) FROM earnings WHERE $status AND userid={$user->id}"); + $value = $value / $refcoin->price; + } else if ($refcoin && $refcoin->price > 0.) { + $value = dboscalar("SELECT sum(amount*price) FROM earnings WHERE $status AND userid={$user->id}"); + $value = $value / $refcoin->price; + } else if ($user->coinid) { + $value = dboscalar("SELECT sum(amount) FROM earnings WHERE $status AND userid={$user->id} AND coinid=".$user->coinid); + } + return $value; +} + +//////////////////////////////////////////////////////////////////////////////////////////// + +function yaamp_pool_rate($algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate-$algo", + "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND algo=:algo", array(':algo'=>$algo)); + + return $rate; +} + +function yaamp_pool_rate_bad($algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_bad-$algo", + "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE not valid AND time>$delay AND algo=:algo", array(':algo'=>$algo)); + + return $rate; +} + +function yaamp_pool_rate_rentable($algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_rentable-$algo", + "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND extranonce1 AND time>$delay AND algo=:algo", array(':algo'=>$algo)); + + return $rate; +} + +function yaamp_user_rate($userid, $algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_user_rate-$userid-$algo", + "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); + + return $rate; +} + +function yaamp_user_rate_bad($userid, $algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $diff = (double) controller()->memcache->get_database_scalar("yaamp_user_diff_avg-$userid-$algo", + "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); + + $rate = controller()->memcache->get_database_scalar("yaamp_user_rate_bad-$userid-$algo", + "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM shares WHERE valid!=1 AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); + + return $rate; +} + +function yaamp_worker_rate($workerid, $algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_worker_rate-$workerid-$algo", + "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); + + return $rate; +} + +function yaamp_worker_rate_bad($workerid, $algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $diff = (double) controller()->memcache->get_database_scalar("yaamp_worker_diff_avg-$workerid-$algo", + "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); + + $rate = controller()->memcache->get_database_scalar("yaamp_worker_rate_bad-$workerid-$algo", + "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM shares WHERE valid!=1 AND time>$delay AND workerid=".$workerid); + + return empty($rate)? 0: $rate; +} + +function yaamp_worker_shares_bad($workerid, $algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = (int) controller()->memcache->get_database_scalar("yaamp_worker_shares_bad-$workerid-$algo", + "SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND workerid=".$workerid); + + return $rate; +} + +function yaamp_coin_rate($coinid) +{ + $coin = getdbo('db_coins', $coinid); + if(!$coin || !$coin->enable) return 0; + + $target = yaamp_hashrate_constant($coin->algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_coin_rate-$coinid", + "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND coinid=$coinid"); + + return $rate; +} + +function yaamp_rented_rate($algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_rented_rate-$algo", + "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE time>$delay AND algo=:algo AND jobid!=0 AND valid", array(':algo'=>$algo)); + + return $rate; +} + +function yaamp_job_rate($jobid) +{ + $job = getdbo('db_jobs', $jobid); + if(!$job) return 0; + + $target = yaamp_hashrate_constant($job->algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_job_rate-$jobid", + "SELECT (sum(difficulty) * $target / $interval / 1000) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); + return $rate; +} + +function yaamp_job_rate_bad($jobid) +{ + $job = getdbo('db_jobs', $jobid); + if(!$job) return 0; + + $target = yaamp_hashrate_constant($job->algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $diff = (double) controller()->memcache->get_database_scalar("yaamp_job_diff_avg-$jobid", + "SELECT avg(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); + + $rate = controller()->memcache->get_database_scalar("yaamp_job_rate_bad-$jobid", + "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM jobsubmits WHERE valid!=1 AND time>$delay AND jobid=".$jobid); + + return $rate; +} + +////////////////////////////////////////////////////////////////////////////////////////////////////// + +function yaamp_pool_rate_pow($algo=null) +{ + if(!$algo) $algo = user()->getState('yaamp-algo'); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_pow-$algo", + "SELECT sum(shares.difficulty) * $target / $interval / 1000 FROM shares, coins + WHERE shares.valid AND shares.time>$delay AND shares.algo=:algo AND + shares.coinid=coins.id AND coins.rpcencoding='POW'", array(':algo'=>$algo)); + + return $rate; +} + +///////////////////////////////////////////////////////////////////////////////////////////// + +function yaamp_renter_account($renter) +{ + if(YAAMP_PRODUCTION) + return "renter-prod-$renter->id"; + else + return "renter-dev-$renter->id"; +} + +///////////////////////////////////////////////////////////////////////////////////////////// From bdcd17597657ad4394279095389cf94545c5d200 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 27 Apr 2019 09:43:23 -0400 Subject: [PATCH 466/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index a845ac062..80a97c74c 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -93,6 +93,11 @@ function yaamp_get_algos() 'yescryptR8', 'yescryptR16', 'yescryptR32', + 'yespower', + 'yespowerR8', + 'yespowerR16', + 'yespowerR24', + 'yespowerR32', 'zr5', ); } @@ -218,7 +223,7 @@ function getAlgoColors($algo) 'quark' => '#c0c0c0', 'qubit' => '#d0a0f0', 'rainforest' => '#d0f0a0', - 'rfv2' => '#d0f0a0', + 'rfv2' => '#d0f0a0', 'renesis' => '#f0b0a0', 'scrypt' => '#c0c0e0', 'scryptn' => '#d0d0d0', @@ -255,6 +260,11 @@ function getAlgoColors($algo) 'yescryptR8' => '#e0d0e0', 'yescryptR16' => '#e2d0e2', 'yescryptR32' => '#e2d0d2', + 'yespower' => '#e2d0d2', + 'yespowerR8' => '#e2d0d2', + 'yespowerR16' => '#e2d0d2', + 'yespowerR24' => '#e2d0d2', + 'yespowerR32' => '#e2d0d2', 'zr5' => '#d0b0d0', 'MN' => '#ffffff', // MasterNode Earnings @@ -359,7 +369,11 @@ function getAlgoPort($algo) 'yescryptR8' => 6353, 'yescryptR16' => 6333, 'yescryptR32' => 6343, - 'zr5' => 4833, + 'yespower' => 6234, + 'yespowerR8' => 6235, + 'yespowerR16' => 6236, + 'yespowerR24' => 6237, + 'yespowerR32' => 6238, 'zr5' => 5533, //'groestl' => 5333, // 5555 to 5683 reserved From be185d9dff7ab9784cf0e77bfce6ff341335d262 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 29 Apr 2019 11:13:05 -0400 Subject: [PATCH 467/576] Update coinbase.cpp --- stratum/coinbase.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 147a74901..47967d37c 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -303,6 +303,56 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + + else if ((strcmp(coind->symbol, "IFX") == 0)|| + (strcmp(coind->symbol, "GTM") == 0)|| + (strcmp(coind->symbol, "GOV") == 0)|| + (strcmp(coind->symbol, "GWAY") == 0)|| + (strcmp(coind->symbol, "ALMN") == 0)|| + (strcmp(coind->symbol, "AGM") == 0)|| + (strcmp(coind->symbol, "BMN") == 0)|| + (strcmp(coind->symbol, "CRDS") == 0)) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + else if(strcmp(coind->symbol, "TUX") == 0) { char script_payee[1024]; char charity_payee[256] = { 0 }; From 1d1a09276d31958bd8ac3f81e288a703f179c28e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 29 Apr 2019 11:23:07 -0400 Subject: [PATCH 468/576] Update coinbase.cpp --- stratum/coinbase.cpp | 83 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 47967d37c..263deb3a8 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -353,6 +353,89 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } + else if(strcmp(coind->symbol, "BZX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "bznode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "04"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "03"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); + job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); + + base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); + job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); + + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "SECI") == 0) { + char script_payee[512] = { 0 }; + char payees[1]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //mainnet + json_int_t charity_amount = 50000000; + sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); + //testnet + //json_int_t charity_amount = 50000000; + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + else if(strcmp(coind->symbol, "TUX") == 0) { char script_payee[1024]; char charity_payee[256] = { 0 }; From 44b6012b2ef28764ab441b3a0e07a08628d8cab4 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Tue, 7 May 2019 11:30:50 -0400 Subject: [PATCH 469/576] rfv2 update --- stratum/algos/makefile | 1 + stratum/algos/makefile.bak | 4 +- stratum/algos/rfv2/rfv2_core.c | 88 ++-- stratum/algos/rfv2/rfv2_core.c.bak | 795 +++++++++++++++++++++++++++++ 4 files changed, 832 insertions(+), 56 deletions(-) create mode 100644 stratum/algos/rfv2/rfv2_core.c.bak diff --git a/stratum/algos/makefile b/stratum/algos/makefile index f97e4e574..48a9c32ec 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -49,3 +49,4 @@ clean: rm -f ar2/*.o rm -f blake2/*.o rm -f SWIFFTX/*.o + rm -f rfv2/*.o diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index 60616cb2d..f97e4e574 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -10,7 +10,7 @@ LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ - x22i.c SWIFFTX/SWIFFTX.c \ + x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ @@ -20,7 +20,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ - phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ + phi.c phi2.c polytimos.c rainforest.c rfv2.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ diff --git a/stratum/algos/rfv2/rfv2_core.c b/stratum/algos/rfv2/rfv2_core.c index de37c2d10..acfabb9b2 100644 --- a/stratum/algos/rfv2/rfv2_core.c +++ b/stratum/algos/rfv2/rfv2_core.c @@ -9,12 +9,7 @@ // It makes an intensive use of the L1 cache to maintain a heavy intermediary // state favoring modern CPUs compared to GPUs (small L1 cache shared by many // shaders) or FPGAs (very hard to implement the required low-latency cache) -// when scanning ranges for nonces. In addition it exploit the perfectly -// defined precision loss of IEEE754 floating point conversion between int and -// double to make sure the implementation runs on a perfectly compliant stack -// and not on a simplified one like an inexpensive IP block. It also uses some -// floating point functions such as sin(), pow() and sqrt() which are available -// on any GPU but could be wrong if simplified. Finally, it uses 96 MB of work +// when scanning ranges for nonces. Finally, it uses 96 MB of work // area per thread in order to incur a cost to highly parallel processors such // as high-end GPUs. The purpose is to create a fair balance between all mining // equipments, from mobile phones to extreme performance GPUs and to rule out @@ -24,23 +19,17 @@ // performance. Note that CRC32 is not used for security at all, only to // disturb data. // -// Tests have shown that mid-range OpenCL GPUs can get the computation right -// but that low-end ones not implementing 64-bit floats in hardware and -// falling back to a simplified software stack can't get it right. It was -// also reported that building this code with -ffast-math results in invalid -// hashes, as predicted. -// // Build instructions on Ubuntu 16.04 to 18.04 : -// - on x86: use gcc -lm -march=native or -maes to enable AES-NI -// - on ARMv8: use gcc -lm -march=native or -march=armv8-a+crypto+crc to enable +// - on x86: use gcc -march=native or -maes to enable AES-NI +// - on ARMv8: use gcc -march=native or -march=armv8-a+crypto+crc to enable // CRC32 and AES extensions. // // Note: always use the same options to build all files! // -#include #include #include +#include #include "rfv2.h" // these archs are fine with unaligned reads @@ -80,11 +69,7 @@ typedef __attribute__((may_alias)) uint32_t rf_u32; typedef __attribute__((may_alias)) uint64_t rf_u64; #endif -#define RFV2_RAMBOX_HIST 1024 - -// number of loops run over the initial message. At 19 loops -// most runs are under 256 changes -#define RFV2_LOOPS 320 +#define RFV2_RAMBOX_HIST 1536 typedef union { rf_u8 b[32]; @@ -97,7 +82,8 @@ typedef struct RF_ALIGN(16) rfv2_ctx { uint32_t word; // LE pending message uint32_t len; // total message length uint32_t crc; - uint32_t changes; // must remain lower than RFV2_RAMBOX_HIST + uint16_t changes; // must remain lower than RFV2_RAMBOX_HIST + uint16_t left_bits; // adjust rambox probability uint64_t *rambox; uint32_t rb_o; // rambox offset uint32_t rb_l; // rambox length @@ -313,7 +299,7 @@ static inline void rf_w128(uint64_t *cell, size_t ofs, uint64_t x, uint64_t y) // lookup _old_ in _rambox_, update it and perform a substitution if a matching // value is found. -static inline uint32_t rfv2_rambox(rfv2_ctx_t *ctx, uint64_t old) +static inline uint64_t rfv2_rambox(rfv2_ctx_t *ctx, uint64_t old) { uint64_t *p, k; uint32_t idx; @@ -321,7 +307,7 @@ static inline uint32_t rfv2_rambox(rfv2_ctx_t *ctx, uint64_t old) k = old; old = rf_add64_crc32(old); old ^= rf_revbit64(k); - if (__builtin_clrsbll(old) > 3) { + if (__builtin_clrsbll(old) >= ctx->left_bits) { idx = ctx->rb_o + old % ctx->rb_l; p = &ctx->rambox[idx]; k = *p; @@ -333,7 +319,7 @@ static inline uint32_t rfv2_rambox(rfv2_ctx_t *ctx, uint64_t old) ctx->changes++; } } - return (uint32_t)old; + return old; } // initialize the ram box @@ -488,21 +474,6 @@ static void rfv2_ram_test(const void *area) } #endif -// mix each word with the precision lost from the other one when converting -// it to an IEEE754 double floating point number. -static inline void rfv2_mix_fp_loss(uint64_t *p, uint64_t *q) -{ - uint64_t p0, q0; - uint64_t lp, lq; - double fp, fq; - - p0 = *p; q0 = *q; - fp = p0; fq = q0; - lp = (uint64_t)fp ^ p0; lq = (uint64_t)fq ^ q0; - p0 += lq; q0 += lp; - *p = p0; *q = q0; -} - // return p/q into p and rev(rev(q)+p) into q static inline void rfv2_div_mod(uint64_t *p, uint64_t *q) { @@ -522,7 +493,6 @@ static inline void rfv2_divbox(rf_u64 *v0, rf_u64 *v1) //---- low word ---- ---- high word ---- pl = ~*v0; ph = ~*v1; ql = rf_bswap64(*v0); qh = rf_bswap64(*v1); - rfv2_mix_fp_loss(&ql, &qh); if (!pl || !ql) { pl = ql = 0; } else if (pl > ql) rfv2_div_mod(&pl, &ql); @@ -544,14 +514,11 @@ static inline void rfv2_rotbox(rf_u64 *v0, rf_u64 *v1, uint8_t b0, uint8_t b1) //---- low word ---- ---- high word ---- l = *v0; h = *v1; l = rf_rotr64(l, b0); h = rf_rotl64(h, b1); - rfv2_mix_fp_loss(&l, &h); l += rf_wltable(b0); h += rf_whtable(b1); b0 = (uint8_t)l; b1 = (uint8_t)h; l = rf_rotl64(l, b1); h = rf_rotr64(h, b0); - rfv2_mix_fp_loss(&l, &h); b0 = (uint8_t)l; b1 = (uint8_t)h; l = rf_rotr64(l, b1); h = rf_rotl64(h, b0); - rfv2_mix_fp_loss(&l, &h); *v0 = l; *v1 = h; } @@ -716,18 +683,17 @@ static inline void rfv2_final(void *out, rfv2_ctx_t *ctx) memcpy(out, ctx->hash.b, 32); } -// apply a linear sine to a discrete integer to validate that the platform -// operates a 100% compliant FP stack. Non-IEEE754 FPU will fail to provide -// valid values for all inputs. In order to reduce the variations between -// large and small values, we offset the value and put it to power 1/2. We -// use sqrt(x) here instead of pow(x,0.5) because sqrt() usually is quite -// optimized on CPUs and GPUs for vector length calculations while pow() is -// generic and may be extremely slow. sqrt() on the other hand requires some -// extra work to implement right on FPGAs and ASICs. The operation simply -// becomes round(100*sqrt((sin(x/16)^3)+1)+1.5). -static uint8_t sin_scaled(unsigned int x) +// compute an integer-based rough approximation of 1+256*(abs(sin(x/16)^3)+1) +// which does not depend on a floating point implementation. The period of the +// input is 2^32. +static unsigned int sin_scaled(unsigned int x) { - return round(100.0 * (sqrt(pow(sin(x / 16.0), 3) + 1.0)) + 1.5); + int i; + + i = ((x * 42722829) >> 24) - 128; + x = 15 * i * i * abs(i); // 0 to 15<<21 + x = (x + (x >> 4)) >> 17; + return 257 - x; } // hash _len_ bytes from _in_ into _out_, using _seed_ @@ -762,6 +728,16 @@ int rfv2_hash2(void *out, const void *in, size_t len, void *rambox, const void * ctx.rb_l = (ctx.rb_l / 2 - ctx.rb_o) * 2; loops = sin_scaled(msgh); + if (loops >= 128) + ctx.left_bits = 4; + else if (loops >= 64) + ctx.left_bits = 3; + else if (loops >= 32) + ctx.left_bits = 2; + else if (loops >= 16) + ctx.left_bits = 1; + else + ctx.left_bits = 0; for (loop = 0; loop < loops; loop++) { rfv2_update(&ctx, in, len); // pad to the next 256 bit boundary @@ -793,3 +769,7 @@ int rfv2_hash(void *out, const void *in, size_t len, void *rambox, const void *r { return rfv2_hash2(out, in, len, rambox, rambox_template, RFV2_INIT_CRC); } + +void rfv2_hash_simple(const void *input, void *output, int length) { + rfv2_hash(output, input, length, NULL, NULL); +} diff --git a/stratum/algos/rfv2/rfv2_core.c.bak b/stratum/algos/rfv2/rfv2_core.c.bak new file mode 100644 index 000000000..de37c2d10 --- /dev/null +++ b/stratum/algos/rfv2/rfv2_core.c.bak @@ -0,0 +1,795 @@ +// RainForest hash algorithm +// Author: Bill Schneider +// Created: Feb 13th, 2018 +// Updated: Apr 21th, 2019 +// +// RainForest uses native integer operations which are extremely fast on +// modern 64-bit processors, significantly slower on 32-bit processors such +// as GPUs, and extremely slow if at all implementable on FPGAs and ASICs. +// It makes an intensive use of the L1 cache to maintain a heavy intermediary +// state favoring modern CPUs compared to GPUs (small L1 cache shared by many +// shaders) or FPGAs (very hard to implement the required low-latency cache) +// when scanning ranges for nonces. In addition it exploit the perfectly +// defined precision loss of IEEE754 floating point conversion between int and +// double to make sure the implementation runs on a perfectly compliant stack +// and not on a simplified one like an inexpensive IP block. It also uses some +// floating point functions such as sin(), pow() and sqrt() which are available +// on any GPU but could be wrong if simplified. Finally, it uses 96 MB of work +// area per thread in order to incur a cost to highly parallel processors such +// as high-end GPUs. The purpose is to create a fair balance between all mining +// equipments, from mobile phones to extreme performance GPUs and to rule out +// farming factories relying on ASICs, FPGAs, or any other very expensive +// solution. The CRC32 instruction is used a lot as it is extremely fast on +// low-power ARM chips and allows such devices to rival high-end PCs mining +// performance. Note that CRC32 is not used for security at all, only to +// disturb data. +// +// Tests have shown that mid-range OpenCL GPUs can get the computation right +// but that low-end ones not implementing 64-bit floats in hardware and +// falling back to a simplified software stack can't get it right. It was +// also reported that building this code with -ffast-math results in invalid +// hashes, as predicted. +// +// Build instructions on Ubuntu 16.04 to 18.04 : +// - on x86: use gcc -lm -march=native or -maes to enable AES-NI +// - on ARMv8: use gcc -lm -march=native or -march=armv8-a+crypto+crc to enable +// CRC32 and AES extensions. +// +// Note: always use the same options to build all files! +// + +#include +#include +#include +#include "rfv2.h" + +// these archs are fine with unaligned reads +#if defined(__x86_64__)||defined(__aarch64__) +#define RF_UNALIGNED_LE64 +#define RF_UNALIGNED_LE32 +#elif defined(__i386__)||defined(__ARM_ARCH_7A__) +#define RF_UNALIGNED_LE32 +#endif + +#define RFV2_INIT_CRC 20180213 + +#ifndef RF_ALIGN +#ifdef _MSC_VER +#define RF_ALIGN(x) __declspec(align(x)) +#else +#define RF_ALIGN(x) __attribute__((aligned(x))) +#endif +#endif + +// for aes2r_encrypt() +#include "rf_aes2r.c" + +// for rf_crc32_32() +#include "rf_crc32.c" + +// this seems necessary only for gcc, otherwise hash is bogus +#ifdef _MSC_VER +typedef uint8_t rf_u8; +typedef uint16_t rf_u16; +typedef uint32_t rf_u32; +typedef uint64_t rf_u64; +#else +typedef __attribute__((may_alias)) uint8_t rf_u8; +typedef __attribute__((may_alias)) uint16_t rf_u16; +typedef __attribute__((may_alias)) uint32_t rf_u32; +typedef __attribute__((may_alias)) uint64_t rf_u64; +#endif + +#define RFV2_RAMBOX_HIST 1024 + +// number of loops run over the initial message. At 19 loops +// most runs are under 256 changes +#define RFV2_LOOPS 320 + +typedef union { + rf_u8 b[32]; + rf_u16 w[16]; + rf_u32 d[8]; + rf_u64 q[4]; +} rf_hash256_t; + +typedef struct RF_ALIGN(16) rfv2_ctx { + uint32_t word; // LE pending message + uint32_t len; // total message length + uint32_t crc; + uint32_t changes; // must remain lower than RFV2_RAMBOX_HIST + uint64_t *rambox; + uint32_t rb_o; // rambox offset + uint32_t rb_l; // rambox length + rf_hash256_t RF_ALIGN(32) hash; + uint32_t hist[RFV2_RAMBOX_HIST]; + uint64_t prev[RFV2_RAMBOX_HIST]; +} rfv2_ctx_t; + +// the table is used as an 8 bit-aligned array of uint64_t for the first word, +// and as a 16 bit-aligned array of uint64_t for the second word. It is filled +// with the sha256 of "RainForestProCpuAntiAsic", iterated over and over until +// the table is filled. The highest offset being ((uint16_t *)table)[255] we +// need to add 6 extra bytes at the end to read an uint64_t. Maybe calculated +// on a UNIX system with this loop : +// +// ref="RainForestProCpuAntiAsic" +// for ((i=0;i<18;i++)); do +// set $(echo -n $ref|sha256sum) +// echo $1|sed 's/\(..\)/0x\1,/g' +// ref=$(printf $(echo $1|sed 's/\(..\)/\\x\1/g')) +// done + +static const uint8_t rfv2_table[256 * 2 + 6] = { + 0x8e,0xc1,0xa8,0x04,0x38,0x78,0x7c,0x54,0x29,0x23,0x1b,0x78,0x9f,0xf9,0x27,0x54, + 0x11,0x78,0x95,0xb6,0xaf,0x78,0x45,0x16,0x2b,0x9e,0x91,0xe8,0x97,0x25,0xf8,0x63, + 0x82,0x56,0xcf,0x48,0x6f,0x82,0x14,0x0d,0x61,0xbe,0x47,0xd1,0x37,0xee,0x30,0xa9, + 0x28,0x1e,0x4b,0xbf,0x07,0xcd,0x41,0xdf,0x23,0x21,0x12,0xb8,0x81,0x99,0x1d,0xe6, + 0x68,0xcf,0xfa,0x2d,0x8e,0xb9,0x88,0xa7,0x15,0xce,0x9e,0x2f,0xeb,0x1b,0x0f,0x67, + 0x20,0x68,0x6c,0xa9,0x5d,0xc1,0x7c,0x76,0xdf,0xbd,0x98,0x61,0xb4,0x14,0x65,0x40, + 0x1e,0x72,0x51,0x74,0x93,0xd3,0xad,0xbe,0x46,0x0a,0x25,0xfb,0x6a,0x5e,0x1e,0x8a, + 0x5a,0x03,0x3c,0xab,0x12,0xc2,0xd4,0x07,0x91,0xab,0xc9,0xdf,0x92,0x2c,0x85,0x6a, + 0xa6,0x25,0x1e,0x66,0x50,0x26,0x4e,0xa8,0xbd,0xda,0x88,0x1b,0x95,0xd4,0x00,0xeb, + 0x0d,0x1c,0x9b,0x3c,0x86,0xc7,0xb2,0xdf,0xb4,0x5a,0x36,0x15,0x8e,0x04,0xd2,0x54, + 0x79,0xd2,0x3e,0x3d,0x99,0x50,0xa6,0x12,0x4c,0x32,0xc8,0x51,0x14,0x4d,0x4b,0x0e, + 0xbb,0x17,0x80,0x8f,0xa4,0xc4,0x99,0x72,0xd7,0x14,0x4b,0xef,0xed,0x14,0xe9,0x17, + 0xfa,0x9b,0x5d,0x37,0xd6,0x2f,0xef,0x02,0xd6,0x71,0x0a,0xbd,0xc5,0x40,0x11,0x90, + 0x90,0x4e,0xb4,0x4c,0x72,0x51,0x7a,0xd8,0xba,0x30,0x4d,0x8c,0xe2,0x11,0xbb,0x6d, + 0x4b,0xbc,0x6f,0x14,0x0c,0x9f,0xfa,0x5e,0x66,0x40,0x45,0xcb,0x7d,0x1b,0x3a,0xc5, + 0x5e,0x9c,0x1e,0xcc,0xbd,0x16,0x3b,0xcf,0xfb,0x2a,0xd2,0x08,0x2a,0xf8,0x3d,0x46, + 0x93,0x90,0xb3,0x66,0x81,0x34,0x7f,0x6d,0x9b,0x8c,0x99,0x03,0xc5,0x27,0xa3,0xd9, + 0xce,0x90,0x88,0x0f,0x55,0xc3,0xa1,0x60,0x53,0xc8,0x0d,0x25,0xae,0x61,0xd9,0x72, + 0x48,0x1d,0x6c,0x61,0xd2,0x87,0xdd,0x3d,0x23,0xf5,0xde,0x93,0x39,0x4c,0x43,0x9a, + 0xf9,0x37,0xf2,0x61,0xd7,0xf8,0xea,0x65,0xf0,0xf1,0xde,0x3f,0x05,0x57,0x83,0x81, + 0xde,0x02,0x62,0x49,0xd4,0x32,0x7e,0x4a,0xd4,0x9f,0x40,0x7e,0xb9,0x91,0xb1,0x35, + 0xf7,0x62,0x3f,0x65,0x9e,0x4d,0x2b,0x10,0xde,0xd4,0x77,0x64,0x0f,0x84,0xad,0x92, + 0xe7,0xa3,0x8a,0x10,0xc1,0x14,0xeb,0x57,0xc4,0xad,0x8e,0xc2,0xc7,0x32,0xa3,0x7e, + 0x50,0x1f,0x7c,0xbb,0x2e,0x5f,0xf5,0x18,0x22,0xea,0xec,0x9d,0xa4,0x77,0xcd,0x85, + 0x04,0x2f,0x20,0x61,0x72,0xa7,0x0c,0x92,0x06,0x4d,0x01,0x70,0x9b,0x35,0xa1,0x27, + 0x32,0x6e,0xb9,0x78,0xe0,0xaa,0x5f,0x91,0xa6,0x51,0xe3,0x63,0xf8,0x97,0x2f,0x60, + 0xd9,0xfb,0x15,0xe5,0x59,0xcf,0x31,0x3c,0x61,0xc7,0xb5,0x61,0x2a,0x6b,0xdd,0xd1, + 0x09,0x70,0xc0,0xcf,0x94,0x7a,0xcc,0x31,0x94,0xb1,0xa2,0xf6,0x95,0xc0,0x38,0x3d, + 0xef,0x19,0x30,0x70,0xdd,0x62,0x32,0x8f,0x7c,0x30,0xb9,0x18,0xf8,0xe7,0x8f,0x0a, + 0xaa,0xb6,0x00,0x86,0xf2,0xe0,0x30,0x5f,0xa2,0xe8,0x00,0x8e,0x05,0xa0,0x22,0x18, + 0x9f,0x83,0xd4,0x3a,0x85,0x10,0xb9,0x51,0x8d,0x07,0xf0,0xb3,0xcd,0x9b,0x55,0xa1, + 0x14,0xce,0x0f,0xb2,0xcf,0xb8,0xce,0x2d,0xe6,0xe8,0x35,0x32,0x1f,0x22,0xb5,0xec, + 0xd0,0xb9,0x72,0xa8,0xb4,0x97 + //,0x6e,0x0a,0x47,0xcd,0x5a,0xf0,0xdc,0xeb,0xfd,0x46, + //0xe5,0x6e,0x83,0xe6,0x1a,0xcc,0x4a,0x8b,0xa5,0x28,0x9e,0x50,0x48,0xa9,0xa2,0x6b, +}; + +// this is made of the last iteration of the rfv2_table (18th transformation) +static const uint8_t rfv2_iv[32] = { + 0x78,0xe9,0x90,0xd3,0xb3,0xc8,0x9b,0x7b,0x0a,0xc4,0x86,0x6e,0x4e,0x38,0xb3,0x6b, + 0x33,0x68,0x7c,0xed,0x73,0x35,0x4b,0x0a,0x97,0x25,0x4c,0x77,0x7a,0xaa,0x61,0x1b +}; + +// mix the current state with the crc and return the new crc +static inline uint32_t rf_crc32x4(rf_u32 *state, uint32_t crc) +{ + crc = state[0] = rf_crc32_32(crc, state[0]); + crc = state[1] = rf_crc32_32(crc, state[1]); + crc = state[2] = rf_crc32_32(crc, state[2]); + crc = state[3] = rf_crc32_32(crc, state[3]); + return crc; +} + +// add to _msg_ its own crc32. use -mcpu=cortex-a53+crc to enable native CRC +// instruction on ARM. +static inline uint64_t rf_add64_crc32(uint64_t msg) +{ + return msg + rf_crc32_64(0, msg); +} + +// read 64 bit from possibly unaligned memory address _p_ in little endian mode +static inline uint64_t rf_memr64(const uint8_t *p) +{ +#ifdef RF_UNALIGNED_LE64 + return *(uint64_t *)p; +#else + uint64_t ret; + int byte; + for (ret = byte = 0; byte < 8; byte++) + ret += (uint64_t)p[byte] << (byte * 8); + return ret; +#endif +} + +// return rainforest lower word entry for index +static inline uint64_t rf_wltable(uint8_t index) +{ + return rf_memr64(&rfv2_table[index]); +} + +// return rainforest upper word entry for _index_ +static inline uint64_t rf_whtable(uint8_t index) +{ + return rf_memr64(&rfv2_table[index * 2]); +} + +// rotate left vector _v_ by _bits_ bits +static inline uint64_t rf_rotl64(uint64_t v, uint64_t bits) +{ +#if !defined(RF_NOASM) && defined(__x86_64__) + __asm__("rol %1, %0" : "+r"(v) : "c"((uint8_t)bits)); +#else +#if !defined(__ARM_ARCH_8A) && !defined(__x86_64__) + bits &= 63; +#endif + v = (v << bits) | (v >> (-bits & 63)); +#endif + return v; +} + +// rotate right vector _v_ by _bits_ bits +static inline uint64_t rf_rotr64(uint64_t v, uint64_t bits) +{ +#if !defined(RF_NOASM) && defined(__x86_64__) + __asm__("ror %1, %0" : "+r"(v) : "c"((uint8_t)bits)); +#else +#if !defined(__ARM_ARCH_8A) && !defined(__x86_64__) + bits &= 63; +#endif + v = (v >> bits) | (v << (-bits & 63)); +#endif + return v; +} + +// reverse all bytes in the word _v_ +static inline uint64_t rf_bswap64(uint64_t v) +{ +#if !defined(RF_NOASM) && defined(__x86_64__) && !defined(_MSC_VER) + __asm__("bswapq %0":"+r"(v)); +#elif !defined(RF_NOASM) && defined(__aarch64__) + __asm__("rev %0,%0\n":"+r"(v)); +#else + v = ((v & 0xff00ff00ff00ff00ULL) >> 8) | ((v & 0x00ff00ff00ff00ffULL) << 8); + v = ((v & 0xffff0000ffff0000ULL) >> 16) | ((v & 0x0000ffff0000ffffULL) << 16); + v = (v >> 32) | (v << 32); +#endif + return v; +} + +// reverse all bits in the word _v_ +static inline uint64_t rf_revbit64(uint64_t v) +{ +#if !defined(RF_NOASM) && defined(__aarch64__) + __asm__ volatile("rbit %0, %1\n" : "=r"(v) : "r"(v)); +#else + v = ((v & 0xaaaaaaaaaaaaaaaaULL) >> 1) | ((v & 0x5555555555555555ULL) << 1); + v = ((v & 0xccccccccccccccccULL) >> 2) | ((v & 0x3333333333333333ULL) << 2); + v = ((v & 0xf0f0f0f0f0f0f0f0ULL) >> 4) | ((v & 0x0f0f0f0f0f0f0f0fULL) << 4); +#if !defined(RF_NOASM) && defined(__x86_64__) + __asm__("bswapq %0" : "=r"(v) : "0"(v)); +#else + v = ((v & 0xff00ff00ff00ff00ULL) >> 8) | ((v & 0x00ff00ff00ff00ffULL) << 8); + v = ((v & 0xffff0000ffff0000ULL) >> 16) | ((v & 0x0000ffff0000ffffULL) << 16); + v = (v >> 32) | (v << 32); +#endif +#endif + return v; +} + +#if !defined(__GNUC__) || (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 7) +#if !defined(__GNUC__) // also covers clang +int __builtin_clzll(uint64_t x) +{ + uint64_t y; + int n = 64; + + y = x >> 32; if (y) { x = y; n -= 32; } + y = x >> 16; if (y) { x = y; n -= 16; } + y = x >> 8; if (y) { x = y; n -= 8; } + y = x >> 4; if (y) { x = y; n -= 4; } + y = x >> 2; if (y) { x = y; n -= 2; } + y = x >> 1; if (y) { x = y; n -= 1; } + return n - x; +} + +#endif +static inline int __builtin_clrsbll(int64_t x) +{ + if (x < 0) + return __builtin_clzll(~(x << 1)); + else + return __builtin_clzll(x << 1); +} +#endif + +// write (_x_,_y_) at cell _cell_ for offset _ofs_ +static inline void rf_w128(uint64_t *cell, size_t ofs, uint64_t x, uint64_t y) +{ +#if !defined(RF_NOASM) && (defined(__ARM_ARCH_8A) || defined(__AARCH64EL__)) + // 128 bit at once is faster when exactly two parallelizable instructions are + // used between two calls to keep the pipe full. + __asm__ volatile("stp %0, %1, [%2,%3]\n\t" + : /* no output */ + : "r"(x), "r"(y), "r" (cell), "I" (ofs * 8)); +#else + cell[ofs + 0] = x; + cell[ofs + 1] = y; +#endif +} + +// lookup _old_ in _rambox_, update it and perform a substitution if a matching +// value is found. +static inline uint32_t rfv2_rambox(rfv2_ctx_t *ctx, uint64_t old) +{ + uint64_t *p, k; + uint32_t idx; + + k = old; + old = rf_add64_crc32(old); + old ^= rf_revbit64(k); + if (__builtin_clrsbll(old) > 3) { + idx = ctx->rb_o + old % ctx->rb_l; + p = &ctx->rambox[idx]; + k = *p; + old += rf_rotr64(k, (uint8_t)(old / ctx->rb_l)); + *p = old; + if (ctx->changes < RFV2_RAMBOX_HIST) { + ctx->hist[ctx->changes] = idx; + ctx->prev[ctx->changes] = k; + ctx->changes++; + } + } + return (uint32_t)old; +} + +// initialize the ram box +void rfv2_raminit(void *area) +{ + uint64_t pat1 = 0x0123456789ABCDEFULL; + uint64_t pat2 = 0xFEDCBA9876543210ULL; + uint64_t pat3; + uint32_t pos; + uint64_t *rambox = (uint64_t *)area; + + // Note: no need to mask the higher bits on armv8 nor x86 : + // + // From ARMv8's ref manual : + // The register that is specified for a shift can be 32-bit or + // 64-bit. The amount to be shifted can be specified either as + // an immediate, that is up to register size minus one, or by + // a register where the value is taken only from the bottom five + // (modulo-32) or six (modulo-64) bits. + // + // Here we rotate pat2 by pat1's bits and put it into pat1, and in + // parallel we rotate pat1 by pat2's bits and put it into pat2. Thus + // the two data blocks are exchanged in addition to being rotated. + // What is stored each time is the previous and the rotated blocks, + // which only requires one rotate and a register rename. + + for (pos = 0; pos < RFV2_RAMBOX_SIZE; pos += 16) { + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x111; + rf_w128(rambox + pos, 0, pat1, pat3); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x222; + rf_w128(rambox + pos, 2, pat2, pat3); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x333; + rf_w128(rambox + pos, 4, pat1, pat3); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x444; + rf_w128(rambox + pos, 6, pat2, pat3); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x555; + rf_w128(rambox + pos, 8, pat1, pat3); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x666; + rf_w128(rambox + pos, 10, pat2, pat3); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x777; + rf_w128(rambox + pos, 12, pat1, pat3); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x888; + rf_w128(rambox + pos, 14, pat2, pat3); + } +} + +#ifdef RF_DEBUG_RAMBOX +// verify the ram box +static void rfv2_ram_test(const void *area) +{ + uint64_t pat1 = 0x0123456789ABCDEFULL; + uint64_t pat2 = 0xFEDCBA9876543210ULL; + uint64_t pat3; + uint32_t pos; + const uint64_t *rambox = (const uint64_t *)area; + + // Note: no need to mask the higher bits on armv8 nor x86 : + // + // From ARMv8's ref manual : + // The register that is specified for a shift can be 32-bit or + // 64-bit. The amount to be shifted can be specified either as + // an immediate, that is up to register size minus one, or by + // a register where the value is taken only from the bottom five + // (modulo-32) or six (modulo-64) bits. + // + // Here we rotate pat2 by pat1's bits and put it into pat1, and in + // parallel we rotate pat1 by pat2's bits and put it into pat2. Thus + // the two data blocks are exchanged in addition to being rotated. + // What is stored each time is the previous and the rotated blocks, + // which only requires one rotate and a register rename. + + for (pos = 0; pos < RFV2_RAMBOX_SIZE; pos += 16) { + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x111; + if (rambox[pos + 0] != pat1) + abort(); + + if (rambox[pos + 1] != pat3) + abort(); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x222; + if (rambox[pos + 2] != pat2) + abort(); + + if (rambox[pos + 3] != pat3) + abort(); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x333; + if (rambox[pos + 4] != pat1) + abort(); + + if (rambox[pos + 5] != pat3) + abort(); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x444; + if (rambox[pos + 6] != pat2) + abort(); + + if (rambox[pos + 7] != pat3) + abort(); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x555; + if (rambox[pos + 8] != pat1) + abort(); + + if (rambox[pos + 9] != pat3) + abort(); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x666; + if (rambox[pos + 10] != pat2) + abort(); + + if (rambox[pos + 11] != pat3) + abort(); + + pat3 = pat1; + pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x777; + if (rambox[pos + 12] != pat1) + abort(); + + if (rambox[pos + 13] != pat3) + abort(); + + pat3 = pat2; + pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x888; + if (rambox[pos + 14] != pat2) + abort(); + + if (rambox[pos + 15] != pat3) + abort(); + } +} +#endif + +// mix each word with the precision lost from the other one when converting +// it to an IEEE754 double floating point number. +static inline void rfv2_mix_fp_loss(uint64_t *p, uint64_t *q) +{ + uint64_t p0, q0; + uint64_t lp, lq; + double fp, fq; + + p0 = *p; q0 = *q; + fp = p0; fq = q0; + lp = (uint64_t)fp ^ p0; lq = (uint64_t)fq ^ q0; + p0 += lq; q0 += lp; + *p = p0; *q = q0; +} + +// return p/q into p and rev(rev(q)+p) into q +static inline void rfv2_div_mod(uint64_t *p, uint64_t *q) +{ + uint64_t x = *p; + *p = x / *q; +#if !defined(RF_NOASM) && !defined(_MSC_VER) + __asm__ volatile("" :: "r"(*p)); // force to place the div first +#endif + *q = rf_revbit64(rf_revbit64(*q)+x); +} + +// exec the div/mod box. _v0_ and _v1_ must be aligned. +static inline void rfv2_divbox(rf_u64 *v0, rf_u64 *v1) +{ + uint64_t pl, ql, ph, qh; + + //---- low word ---- ---- high word ---- + pl = ~*v0; ph = ~*v1; + ql = rf_bswap64(*v0); qh = rf_bswap64(*v1); + rfv2_mix_fp_loss(&ql, &qh); + + if (!pl || !ql) { pl = ql = 0; } + else if (pl > ql) rfv2_div_mod(&pl, &ql); + else rfv2_div_mod(&ql, &pl); + + if (!ph || !qh) { ph = qh = 0; } + else if (ph > qh) rfv2_div_mod(&ph, &qh); + else rfv2_div_mod(&qh, &ph); + + pl += qh; ph += ql; + *v0 -= pl; *v1 -= ph; +} + +// exec the rotation/add box. _v0_ and _v1_ must be aligned. +static inline void rfv2_rotbox(rf_u64 *v0, rf_u64 *v1, uint8_t b0, uint8_t b1) +{ + uint64_t l, h; + + //---- low word ---- ---- high word ---- + l = *v0; h = *v1; + l = rf_rotr64(l, b0); h = rf_rotl64(h, b1); + rfv2_mix_fp_loss(&l, &h); + l += rf_wltable(b0); h += rf_whtable(b1); + b0 = (uint8_t)l; b1 = (uint8_t)h; + l = rf_rotl64(l, b1); h = rf_rotr64(h, b0); + rfv2_mix_fp_loss(&l, &h); + b0 = (uint8_t)l; b1 = (uint8_t)h; + l = rf_rotr64(l, b1); h = rf_rotl64(h, b0); + rfv2_mix_fp_loss(&l, &h); + *v0 = l; *v1 = h; +} + +// mix the current state with the current crc +static inline uint32_t rfv2_scramble(rfv2_ctx_t *ctx) +{ + return ctx->crc = rf_crc32x4(ctx->hash.d, ctx->crc); +} + +// mix the state with the crc and the pending text, and update the crc +static inline void rfv2_inject(rfv2_ctx_t *ctx) +{ + ctx->crc = + (ctx->len & 3) == 0 ? rf_crc32_32(rfv2_scramble(ctx), ctx->word): + (ctx->len & 3) == 3 ? rf_crc32_24(rfv2_scramble(ctx), ctx->word): + (ctx->len & 3) == 2 ? rf_crc32_16(rfv2_scramble(ctx), ctx->word): + rf_crc32_8(rfv2_scramble(ctx), ctx->word); + ctx->word = 0; +} + +// rotate the hash by 32 bits. Not using streaming instructions (SSE/NEON) is +// faster because the compiler can follow moves an use register renames. +static inline void rfv2_rot32x256(rf_hash256_t *hash) +{ +#if defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_ARCH_7A__) + uint32_t t0, t1, t2; + + t0 = hash->d[0]; + t1 = hash->d[1]; + t2 = hash->d[2]; + hash->d[1] = t0; + hash->d[2] = t1; + + t0 = hash->d[3]; + t1 = hash->d[4]; + hash->d[3] = t2; + hash->d[4] = t0; + + t2 = hash->d[5]; + t0 = hash->d[6]; + hash->d[5] = t1; + hash->d[6] = t2; + + t1 = hash->d[7]; + hash->d[7] = t0; + hash->d[0] = t1; +#else + uint32_t tmp = hash->d[7]; + + memmove(&hash->d[1], &hash->d[0], 28); + hash->d[0] = tmp; +#endif +} + +// encrypt the first 128 bits of the hash using the last 128 bits as the key +static inline void rfv2_aesenc(rfv2_ctx_t *ctx) +{ + aes2r_encrypt((uint8_t *)ctx->hash.b, (uint8_t *)ctx->hash.b + 16); +} + +// each new round consumes exactly 32 bits of text at once and perturbates +// 128 bits of output, 96 of which overlap with the previous round, and 32 +// of which are new. With 5 rounds or more each output bit depends on every +// input bit. +static inline void rfv2_one_round(rfv2_ctx_t *ctx) +{ + uint64_t carry; + + rfv2_rot32x256(&ctx->hash); + + carry = ((uint64_t)ctx->len << 32) + ctx->crc; + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_scramble(ctx); + + carry = rfv2_rambox(ctx, carry); + rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry), (uint8_t)(carry >> 56)); + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_scramble(ctx); + + carry = rfv2_rambox(ctx, carry); + rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 8), (uint8_t)(carry >> 48)); + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_scramble(ctx); + + carry = rfv2_rambox(ctx, carry); + rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 16), (uint8_t)(carry >> 40)); + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_scramble(ctx); + + carry = rfv2_rambox(ctx, carry); + rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 24), (uint8_t)(carry >> 32)); + rfv2_scramble(ctx); + rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); + rfv2_inject(ctx); + rfv2_aesenc(ctx); + rfv2_scramble(ctx); +} + +// initialize the hash state +static void rfv2_init(rfv2_ctx_t *ctx, uint32_t seed, void *rambox) +{ + memcpy(ctx->hash.b, rfv2_iv, sizeof(ctx->hash.b)); + ctx->crc = seed; + ctx->word = ctx->len = 0; + ctx->changes = 0; + ctx->rb_o = 0; + ctx->rb_l = RFV2_RAMBOX_SIZE; + ctx->rambox = (uint64_t *)rambox; +} + +// update the hash context _ctx_ with _len_ bytes from message _msg_ +static inline void rfv2_update(rfv2_ctx_t *ctx, const void *msg, size_t len) +{ + const uint8_t *msg8 = (uint8_t *)msg; + + while (len > 0) { +#ifdef RF_UNALIGNED_LE32 + if (!(ctx->len & 3) && len >= 4) { + ctx->word = *(uint32_t *)msg8; + ctx->len += 4; + rfv2_one_round(ctx); + msg8 += 4; + len -= 4; + continue; + } +#endif + ctx->word |= ((uint32_t)*msg8++) << (8 * (ctx->len++ & 3)); + len--; + if (!(ctx->len & 3)) + rfv2_one_round(ctx); + } +} + +// pad to the next 256-bit (32 bytes) boundary +static inline void rfv2_pad256(rfv2_ctx_t *ctx) +{ + const uint8_t pad256[32] = { 0, }; + uint32_t pad; + + pad = (32 - ctx->len) & 0xF; + if (pad) + rfv2_update(ctx, pad256, pad); +} + +// finalize the hash and copy the result into _out_ if not null (256 bits) +static inline void rfv2_final(void *out, rfv2_ctx_t *ctx) +{ + // always run 5 extra rounds to complete the last 128 bits. + // the 5th one is because the last processed block is only in + // the ctx and was not mixed yet. + rfv2_one_round(ctx); + rfv2_one_round(ctx); + rfv2_one_round(ctx); + rfv2_one_round(ctx); + rfv2_one_round(ctx); + + if (out) + memcpy(out, ctx->hash.b, 32); +} + +// apply a linear sine to a discrete integer to validate that the platform +// operates a 100% compliant FP stack. Non-IEEE754 FPU will fail to provide +// valid values for all inputs. In order to reduce the variations between +// large and small values, we offset the value and put it to power 1/2. We +// use sqrt(x) here instead of pow(x,0.5) because sqrt() usually is quite +// optimized on CPUs and GPUs for vector length calculations while pow() is +// generic and may be extremely slow. sqrt() on the other hand requires some +// extra work to implement right on FPGAs and ASICs. The operation simply +// becomes round(100*sqrt((sin(x/16)^3)+1)+1.5). +static uint8_t sin_scaled(unsigned int x) +{ + return round(100.0 * (sqrt(pow(sin(x / 16.0), 3) + 1.0)) + 1.5); +} + +// hash _len_ bytes from _in_ into _out_, using _seed_ +// _rambox_ must be either NULL or a pointer to an area RFV2_RAMBOX_SIZE*8 bytes +// long preinitialized with rfv2_rambox_init(). If _rambox_ is NULL but _rambox_template_ +// is set, it will be initialized from this rambox_template using memcpy(). +// The function returns 0 on success or -1 on allocation failure if rambox is +// NULL. +int rfv2_hash2(void *out, const void *in, size_t len, void *rambox, const void *rambox_template, uint32_t seed) +{ + rfv2_ctx_t ctx; + unsigned int loop, loops; + int alloc_rambox = (rambox == NULL); + uint32_t msgh; + + if (alloc_rambox) { + rambox = malloc(RFV2_RAMBOX_SIZE * 8); + if (rambox == NULL) + return -1; + + if (rambox_template) + memcpy(rambox, rambox_template, RFV2_RAMBOX_SIZE * 8); + else + rfv2_raminit(rambox); + } + + //rfv2_ram_test(rambox); + + rfv2_init(&ctx, seed, rambox); + msgh = rf_crc32_mem(0, in, len); + ctx.rb_o = msgh % (ctx.rb_l / 2); + ctx.rb_l = (ctx.rb_l / 2 - ctx.rb_o) * 2; + + loops = sin_scaled(msgh); + for (loop = 0; loop < loops; loop++) { + rfv2_update(&ctx, in, len); + // pad to the next 256 bit boundary + rfv2_pad256(&ctx); + } + + rfv2_final(out, &ctx); + + if (alloc_rambox) + free(rambox); + else if (ctx.changes == RFV2_RAMBOX_HIST) { + //printf("changes=%d\n", ctx.changes); + rfv2_raminit(rambox); + } + else if (ctx.changes > 0) { + //printf("changes=%d\n", ctx.changes); + loops = ctx.changes; + do { + loops--; + ctx.rambox[ctx.hist[loops]] = ctx.prev[loops]; + } while (loops); + //rfv2_ram_test(rambox); + } + return 0; +} + +// hash _len_ bytes from _in_ into _out_ +int rfv2_hash(void *out, const void *in, size_t len, void *rambox, const void *rambox_template) +{ + return rfv2_hash2(out, in, len, rambox, rambox_template, RFV2_INIT_CRC); +} From 332084ffe13f32451805d4c9f3e98927904668e7 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Wed, 8 May 2019 09:53:20 -0400 Subject: [PATCH 470/576] diff update --- stratum/client_difficulty.cpp | 6 +++--- stratum/client_difficulty.cpp.bak | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/stratum/client_difficulty.cpp b/stratum/client_difficulty.cpp index fed72fd5b..e3894bb40 100644 --- a/stratum/client_difficulty.cpp +++ b/stratum/client_difficulty.cpp @@ -4,7 +4,7 @@ double client_normalize_difficulty(double difficulty) { if(difficulty < g_stratum_min_diff) difficulty = g_stratum_min_diff; - else if(difficulty < 1) difficulty = floor(difficulty*1000/2)/1000*2; + else if(difficulty < 1) difficulty = floor(difficulty*100000000/2)/100000000*2; else if(difficulty > 1) difficulty = floor(difficulty/2)*2; if(difficulty > g_stratum_max_diff) difficulty = g_stratum_max_diff; return difficulty; @@ -59,10 +59,10 @@ void client_adjust_difficulty(YAAMP_CLIENT *client) else if(client->difficulty_fixed) return; - else if(client->shares_per_minute > 25) + else if(client->shares_per_minute > 20) client_change_difficulty(client, client->difficulty_actual*2); - else if(client->shares_per_minute > 20) + else if(client->shares_per_minute > 15) client_change_difficulty(client, client->difficulty_actual*1.5); else if(client->shares_per_minute < 5) diff --git a/stratum/client_difficulty.cpp.bak b/stratum/client_difficulty.cpp.bak index 8713aa669..fed72fd5b 100644 --- a/stratum/client_difficulty.cpp.bak +++ b/stratum/client_difficulty.cpp.bak @@ -98,3 +98,9 @@ void client_initialize_difficulty(YAAMP_CLIENT *client) } } + + + + + + From 0f3396b467564d54d61e7a0f2f3333ae106be455 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 23 May 2019 17:47:58 -0400 Subject: [PATCH 471/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 263deb3a8..284d4d655 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -115,7 +115,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - char script2[32] = "746865706f6f6c2e6c69666500"; // "yiimp\0" in hex ascii + char script2[32] = "746865706f6f6c2e6c6966655c30"; // "thepool.life\0" in hex ascii if(!coind->pos && !coind->isaux && templ->auxs_size) coinbase_aux(templ, script2); From 1028fed9be57c04cb6c7079bc34ba1898b19dcd4 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 27 May 2019 10:15:29 -0400 Subject: [PATCH 472/576] x25x --- stratum/algos/lane.c | 2151 +++++++++++++++++++++++++++++ stratum/algos/lane.h | 56 + stratum/algos/makefile | 2 +- stratum/algos/makefile.bak | 1 + stratum/algos/x25x.c | 174 +++ stratum/algos/x25x.h | 11 + stratum/client_difficulty.cpp.bak | 106 -- stratum/client_submit.cpp.bak | 594 -------- stratum/coinbase.cpp.bak | 1124 --------------- stratum/coind_submit.cpp.bak | 149 -- stratum/config.sample/x25x.conf | 16 + stratum/db.cpp.bak | 624 --------- stratum/sha3/panama.c | 334 +++++ stratum/stratum.cpp | 1 + stratum/stratum.cpp.bak | 486 ------- stratum/stratum.h | 1 + stratum/stratum.h.bak | 235 ---- stratum/user.cpp.bak | 214 --- 18 files changed, 2746 insertions(+), 3533 deletions(-) create mode 100644 stratum/algos/lane.c create mode 100644 stratum/algos/lane.h create mode 100644 stratum/algos/x25x.c create mode 100644 stratum/algos/x25x.h delete mode 100644 stratum/client_difficulty.cpp.bak delete mode 100644 stratum/client_submit.cpp.bak delete mode 100644 stratum/coinbase.cpp.bak delete mode 100644 stratum/coind_submit.cpp.bak create mode 100644 stratum/config.sample/x25x.conf delete mode 100644 stratum/db.cpp.bak create mode 100644 stratum/sha3/panama.c delete mode 100644 stratum/stratum.cpp.bak delete mode 100644 stratum/stratum.h.bak delete mode 100644 stratum/user.cpp.bak diff --git a/stratum/algos/lane.c b/stratum/algos/lane.c new file mode 100644 index 000000000..ee2cd0576 --- /dev/null +++ b/stratum/algos/lane.c @@ -0,0 +1,2151 @@ +/* + * Copyright (c) 2008 Sebastiaan Indesteege + * + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Optimised ANSI-C implementation of LANE + */ + +#include "lane.h" + +#define T8(x) ((x) & 0xff) +#define B0(x) (T8((x) )) +#define B1(x) (T8((x) >> 8)) +#define B2(x) (T8((x) >> 16)) +#define B3(x) (T8((x) >> 24)) +#define MSB32(x) ((u32)((((u64)(x))>>32) & 0xffffffff)) +#define LSB32(x) ((u32)((((u64)(x)) ) & 0xffffffff)) +#ifdef LANE_BIG_ENDIAN +#define U8TO32_BIG(c) (((u32*)(c))[0]) +#define U32TO8_BIG(c, v) ((u32*)(c))[0]=v +#else +#define U8TO32_BIG(c) (((u32)T8(*((u8*)(c))) << 24) | \ + ((u32)T8(*(((u8*)(c)) + 1)) << 16) | \ + ((u32)T8(*(((u8*)(c)) + 2)) << 8) | \ + ((u32)T8(*(((u8*)(c)) + 3)))) +#define U32TO8_BIG(c, v) do { \ + u32 tmp_portable_h_x = (v); \ + u8 *tmp_portable_h_d = (c); \ + tmp_portable_h_d[0] = T8(tmp_portable_h_x >> 24); \ + tmp_portable_h_d[1] = T8(tmp_portable_h_x >> 16); \ + tmp_portable_h_d[2] = T8(tmp_portable_h_x >> 8); \ + tmp_portable_h_d[3] = T8(tmp_portable_h_x); \ + } while (0) +#endif /* LANE_BIG_ENDIAN */ + +static const u32 iv224[8] = { + 0xc8245a86U, 0x8d733102U, 0x314ddcb9U, 0xf60a7ef4U, + 0x57b8c917U, 0xeefeaec2U, 0xff4fc3beU, 0x87c4728eU +}; + +static const u32 iv256[8] = { + 0xbe292e17U, 0xbb541ff2U, 0xfe54b6f7U, 0x30b1c96aU, + 0x7b259268U, 0x8539bdf3U, 0x97c4bdd6U, 0x49763fb8U +}; + +static const u32 iv384[16] = { + 0x148922ceU, 0x548c3001U, 0x76978bc8U, 0x266e008cU, + 0x3dc60765U, 0xd85b09d9U, 0x4cb1c8d8U, 0xe2cab952U, + 0xdb72be8eU, 0x685f0783U, 0xfa436c3dU, 0x4b9acb90U, + 0x5088dd47U, 0x932f55a9U, 0xa0c415c6U, 0xdb6dd795U +}; + +static const u32 iv512[16] = { + 0x9b603481U, 0x1d5a931bU, 0x69c4e6e0U, 0x975e2681U, + 0xb863ba53U, 0x8d1be11bU, 0x77340080U, 0xd42c48a5U, + 0x3a3a1d61U, 0x1cf3a1c4U, 0xf0a30347U, 0x7e56a44aU, + 0x9530ee60U, 0xdadb05b6U, 0x3ae3ac7cU, 0xd732ac6aU +}; + +static const u32 T0[256] = { + 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, + 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, + 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, + 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, + 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, + 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, + 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, + 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, + 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, + 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, + 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, + 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, + 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, + 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, + 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, + 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, + 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, + 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, + 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, + 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, + 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, + 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, + 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, + 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, + 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, + 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, + 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, + 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, + 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, + 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, + 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, + 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, + 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, + 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, + 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, + 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, + 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, + 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, + 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, + 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, + 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, + 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, + 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, + 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, + 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, + 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, + 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, + 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, + 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, + 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, + 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, + 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, + 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, + 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, + 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, + 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, + 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, + 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, + 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, + 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, + 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, + 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, + 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, + 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, +}; +static const u32 T1[256] = { + 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, + 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, + 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, + 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, + 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, + 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, + 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, + 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, + 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, + 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, + 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, + 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, + 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, + 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, + 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, + 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, + 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, + 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, + 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, + 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, + 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, + 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, + 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, + 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, + 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, + 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, + 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, + 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, + 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, + 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, + 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, + 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, + 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, + 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, + 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, + 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, + 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, + 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, + 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, + 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, + 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, + 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, + 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, + 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, + 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, + 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, + 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, + 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, + 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, + 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, + 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, + 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, + 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, + 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, + 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, + 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, + 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, + 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, + 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, + 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, + 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, + 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, + 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, + 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, +}; +static const u32 T2[256] = { + 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, + 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, + 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, + 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, + 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, + 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, + 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, + 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, + 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, + 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, + 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, + 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, + 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, + 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, + 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, + 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, + 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, + 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, + 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, + 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, + 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, + 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, + 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, + 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, + 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, + 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, + 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, + 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, + 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, + 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, + 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, + 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, + 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, + 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, + 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, + 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, + 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, + 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, + 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, + 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, + 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, + 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, + 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, + 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, + 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, + 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, + 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, + 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, + 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, + 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, + 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, + 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, + 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, + 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, + 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, + 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, + 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, + 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, + 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, + 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, + 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, + 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, + 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, + 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, +}; +static const u32 T3[256] = { + 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, + 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, + 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, + 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, + 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, + 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, + 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, + 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, + 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, + 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, + 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, + 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, + 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, + 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, + 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, + 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, + 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, + 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, + 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, + 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, + 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, + 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, + 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, + 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, + 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, + 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, + 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, + 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, + 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, + 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, + 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, + 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, + 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, + 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, + 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, + 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, + 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, + 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, + 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, + 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, + 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, + 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, + 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, + 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, + 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, + 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, + 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, + 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, + 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, + 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, + 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, + 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, + 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, + 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, + 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, + 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, + 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, + 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, + 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, + 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, + 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, + 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, + 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, + 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, +}; + +static const u32 C[768] = { + 0x07fc703d, 0xd3fe381f, 0xb9ff1c0e, 0x5cff8e07, 0xfe7fc702, 0x7f3fe381, 0xef9ff1c1, 0xa7cff8e1, + 0x83e7fc71, 0x91f3fe39, 0x98f9ff1d, 0x9c7cff8f, 0x9e3e7fc6, 0x4f1f3fe3, 0xf78f9ff0, 0x7bc7cff8, + 0x3de3e7fc, 0x1ef1f3fe, 0x0f78f9ff, 0xd7bc7cfe, 0x6bde3e7f, 0xe5ef1f3e, 0x72f78f9f, 0xe97bc7ce, + 0x74bde3e7, 0xea5ef1f2, 0x752f78f9, 0xea97bc7d, 0xa54bde3f, 0x82a5ef1e, 0x4152f78f, 0xf0a97bc6, + 0x7854bde3, 0xec2a5ef0, 0x76152f78, 0x3b0a97bc, 0x1d854bde, 0x0ec2a5ef, 0xd76152f6, 0x6bb0a97b, + 0xe5d854bc, 0x72ec2a5e, 0x3976152f, 0xccbb0a96, 0x665d854b, 0xe32ec2a4, 0x71976152, 0x38cbb0a9, + 0xcc65d855, 0xb632ec2b, 0x8b197614, 0x458cbb0a, 0x22c65d85, 0xc1632ec3, 0xb0b19760, 0x5858cbb0, + 0x2c2c65d8, 0x161632ec, 0x0b0b1976, 0x05858cbb, 0xd2c2c65c, 0x6961632e, 0x34b0b197, 0xca5858ca, + 0x652c2c65, 0xe2961633, 0xa14b0b18, 0x50a5858c, 0x2852c2c6, 0x14296163, 0xda14b0b0, 0x6d0a5858, + 0x36852c2c, 0x1b429616, 0x0da14b0b, 0xd6d0a584, 0x6b6852c2, 0x35b42961, 0xcada14b1, 0xb56d0a59, + 0x8ab6852d, 0x955b4297, 0x9aada14a, 0x4d56d0a5, 0xf6ab6853, 0xab55b428, 0x55aada14, 0x2ad56d0a, + 0x156ab685, 0xdab55b43, 0xbd5aada0, 0x5ead56d0, 0x2f56ab68, 0x17ab55b4, 0x0bd5aada, 0x05ead56d, + 0xd2f56ab7, 0xb97ab55a, 0x5cbd5aad, 0xfe5ead57, 0xaf2f56aa, 0x5797ab55, 0xfbcbd5ab, 0xade5ead4, + 0x56f2f56a, 0x2b797ab5, 0xc5bcbd5b, 0xb2de5eac, 0x596f2f56, 0x2cb797ab, 0xc65bcbd4, 0x632de5ea, + 0x3196f2f5, 0xc8cb797b, 0xb465bcbc, 0x5a32de5e, 0x2d196f2f, 0xc68cb796, 0x63465bcb, 0xe1a32de4, + 0x70d196f2, 0x3868cb79, 0xcc3465bd, 0xb61a32df, 0x8b0d196e, 0x45868cb7, 0xf2c3465a, 0x7961a32d, + 0xecb0d197, 0xa65868ca, 0x532c3465, 0xf9961a33, 0xaccb0d18, 0x5665868c, 0x2b32c346, 0x159961a3, + 0xdaccb0d0, 0x6d665868, 0x36b32c34, 0x1b59961a, 0x0daccb0d, 0xd6d66587, 0xbb6b32c2, 0x5db59961, + 0xfedaccb1, 0xaf6d6659, 0x87b6b32d, 0x93db5997, 0x99edacca, 0x4cf6d665, 0xf67b6b33, 0xab3db598, + 0x559edacc, 0x2acf6d66, 0x1567b6b3, 0xdab3db58, 0x6d59edac, 0x36acf6d6, 0x1b567b6b, 0xddab3db4, + 0x6ed59eda, 0x376acf6d, 0xcbb567b7, 0xb5dab3da, 0x5aed59ed, 0xfd76acf7, 0xaebb567a, 0x575dab3d, + 0xfbaed59f, 0xadd76ace, 0x56ebb567, 0xfb75dab2, 0x7dbaed59, 0xeedd76ad, 0xa76ebb57, 0x83b75daa, + 0x41dbaed5, 0xf0edd76b, 0xa876ebb4, 0x543b75da, 0x2a1dbaed, 0xc50edd77, 0xb2876eba, 0x5943b75d, + 0xfca1dbaf, 0xae50edd6, 0x572876eb, 0xfb943b74, 0x7dca1dba, 0x3ee50edd, 0xcf72876f, 0xb7b943b6, + 0x5bdca1db, 0xfdee50ec, 0x7ef72876, 0x3f7b943b, 0xcfbdca1c, 0x67dee50e, 0x33ef7287, 0xc9f7b942, + 0x64fbdca1, 0xe27dee51, 0xa13ef729, 0x809f7b95, 0x904fbdcb, 0x9827dee4, 0x4c13ef72, 0x2609f7b9, + 0xc304fbdd, 0xb1827def, 0x88c13ef6, 0x44609f7b, 0xf2304fbc, 0x791827de, 0x3c8c13ef, 0xce4609f6, + 0x672304fb, 0xe391827c, 0x71c8c13e, 0x38e4609f, 0xcc72304e, 0x66391827, 0xe31c8c12, 0x718e4609, + 0xe8c72305, 0xa4639183, 0x8231c8c0, 0x4118e460, 0x208c7230, 0x10463918, 0x08231c8c, 0x04118e46, + 0x0208c723, 0xd1046390, 0x688231c8, 0x344118e4, 0x1a208c72, 0x0d104639, 0xd688231d, 0xbb44118f, + 0x8da208c6, 0x46d10463, 0xf3688230, 0x79b44118, 0x3cda208c, 0x1e6d1046, 0x0f368823, 0xd79b4410, + 0x6bcda208, 0x35e6d104, 0x1af36882, 0x0d79b441, 0xd6bcda21, 0xbb5e6d11, 0x8daf3689, 0x96d79b45, + 0x9b6bcda3, 0x9db5e6d0, 0x4edaf368, 0x276d79b4, 0x13b6bcda, 0x09db5e6d, 0xd4edaf37, 0xba76d79a, + 0x5d3b6bcd, 0xfe9db5e7, 0xaf4edaf2, 0x57a76d79, 0xfbd3b6bd, 0xade9db5f, 0x86f4edae, 0x437a76d7, + 0xf1bd3b6a, 0x78de9db5, 0xec6f4edb, 0xa637a76c, 0x531bd3b6, 0x298de9db, 0xc4c6f4ec, 0x62637a76, + 0x3131bd3b, 0xc898de9c, 0x644c6f4e, 0x322637a7, 0xc9131bd2, 0x64898de9, 0xe244c6f5, 0xa122637b, + 0x809131bc, 0x404898de, 0x20244c6f, 0xc0122636, 0x6009131b, 0xe004898c, 0x700244c6, 0x38012263, + 0xcc009130, 0x66004898, 0x3300244c, 0x19801226, 0x0cc00913, 0xd6600488, 0x6b300244, 0x35980122, + 0x1acc0091, 0xdd660049, 0xbeb30025, 0x8f598013, 0x97acc008, 0x4bd66004, 0x25eb3002, 0x12f59801, + 0xd97acc01, 0xbcbd6601, 0x8e5eb301, 0x972f5981, 0x9b97acc1, 0x9dcbd661, 0x9ee5eb31, 0x9f72f599, + 0x9fb97acd, 0x9fdcbd67, 0x9fee5eb2, 0x4ff72f59, 0xf7fb97ad, 0xabfdcbd7, 0x85fee5ea, 0x42ff72f5, + 0xf17fb97b, 0xa8bfdcbc, 0x545fee5e, 0x2a2ff72f, 0xc517fb96, 0x628bfdcb, 0xe145fee4, 0x70a2ff72, + 0x38517fb9, 0xcc28bfdd, 0xb6145fef, 0x8b0a2ff6, 0x458517fb, 0xf2c28bfc, 0x796145fe, 0x3cb0a2ff, + 0xce58517e, 0x672c28bf, 0xe396145e, 0x71cb0a2f, 0xe8e58516, 0x7472c28b, 0xea396144, 0x751cb0a2, + 0x3a8e5851, 0xcd472c29, 0xb6a39615, 0x8b51cb0b, 0x95a8e584, 0x4ad472c2, 0x256a3961, 0xc2b51cb1, + 0xb15a8e59, 0x88ad472d, 0x9456a397, 0x9a2b51ca, 0x4d15a8e5, 0xf68ad473, 0xab456a38, 0x55a2b51c, + 0x2ad15a8e, 0x1568ad47, 0xdab456a2, 0x6d5a2b51, 0xe6ad15a9, 0xa3568ad5, 0x81ab456b, 0x90d5a2b4, + 0x486ad15a, 0x243568ad, 0xc21ab457, 0xb10d5a2a, 0x5886ad15, 0xfc43568b, 0xae21ab44, 0x5710d5a2, + 0x2b886ad1, 0xc5c43569, 0xb2e21ab5, 0x89710d5b, 0x94b886ac, 0x4a5c4356, 0x252e21ab, 0xc29710d4, + 0x614b886a, 0x30a5c435, 0xc852e21b, 0xb429710c, 0x5a14b886, 0x2d0a5c43, 0xc6852e20, 0x63429710, + 0x31a14b88, 0x18d0a5c4, 0x0c6852e2, 0x06342971, 0xd31a14b9, 0xb98d0a5d, 0x8cc6852f, 0x96634296, + 0x4b31a14b, 0xf598d0a4, 0x7acc6852, 0x3d663429, 0xceb31a15, 0xb7598d0b, 0x8bacc684, 0x45d66342, + 0x22eb31a1, 0xc17598d1, 0xb0bacc69, 0x885d6635, 0x942eb31b, 0x9a17598c, 0x4d0bacc6, 0x2685d663, + 0xc342eb30, 0x61a17598, 0x30d0bacc, 0x18685d66, 0x0c342eb3, 0xd61a1758, 0x6b0d0bac, 0x358685d6, + 0x1ac342eb, 0xdd61a174, 0x6eb0d0ba, 0x3758685d, 0xcbac342f, 0xb5d61a16, 0x5aeb0d0b, 0xfd758684, + 0x7ebac342, 0x3f5d61a1, 0xcfaeb0d1, 0xb7d75869, 0x8bebac35, 0x95f5d61b, 0x9afaeb0c, 0x4d7d7586, + 0x26bebac3, 0xc35f5d60, 0x61afaeb0, 0x30d7d758, 0x186bebac, 0x0c35f5d6, 0x061afaeb, 0xd30d7d74, + 0x6986beba, 0x34c35f5d, 0xca61afaf, 0xb530d7d6, 0x5a986beb, 0xfd4c35f4, 0x7ea61afa, 0x3f530d7d, + 0xcfa986bf, 0xb7d4c35e, 0x5bea61af, 0xfdf530d6, 0x7efa986b, 0xef7d4c34, 0x77bea61a, 0x3bdf530d, + 0xcdefa987, 0xb6f7d4c2, 0x5b7bea61, 0xfdbdf531, 0xaedefa99, 0x876f7d4d, 0x93b7bea7, 0x99dbdf52, + 0x4cedefa9, 0xf676f7d5, 0xab3b7beb, 0x859dbdf4, 0x42cedefa, 0x21676f7d, 0xc0b3b7bf, 0xb059dbde, + 0x582cedef, 0xfc1676f6, 0x7e0b3b7b, 0xef059dbc, 0x7782cede, 0x3bc1676f, 0xcde0b3b6, 0x66f059db, + 0xe3782cec, 0x71bc1676, 0x38de0b3b, 0xcc6f059c, 0x663782ce, 0x331bc167, 0xc98de0b2, 0x64c6f059, + 0xe263782d, 0xa131bc17, 0x8098de0a, 0x404c6f05, 0xf0263783, 0xa8131bc0, 0x54098de0, 0x2a04c6f0, + 0x15026378, 0x0a8131bc, 0x054098de, 0x02a04c6f, 0xd1502636, 0x68a8131b, 0xe454098c, 0x722a04c6, + 0x39150263, 0xcc8a8130, 0x66454098, 0x3322a04c, 0x19915026, 0x0cc8a813, 0xd6645408, 0x6b322a04, + 0x35991502, 0x1acc8a81, 0xdd664541, 0xbeb322a1, 0x8f599151, 0x97acc8a9, 0x9bd66455, 0x9deb322b, + 0x9ef59914, 0x4f7acc8a, 0x27bd6645, 0xc3deb323, 0xb1ef5990, 0x58f7acc8, 0x2c7bd664, 0x163deb32, + 0x0b1ef599, 0xd58f7acd, 0xbac7bd67, 0x8d63deb2, 0x46b1ef59, 0xf358f7ad, 0xa9ac7bd7, 0x84d63dea, + 0x426b1ef5, 0xf1358f7b, 0xa89ac7bc, 0x544d63de, 0x2a26b1ef, 0xc51358f6, 0x6289ac7b, 0xe144d63c, + 0x70a26b1e, 0x3851358f, 0xcc289ac6, 0x66144d63, 0xe30a26b0, 0x71851358, 0x38c289ac, 0x1c6144d6, + 0x0e30a26b, 0xd7185134, 0x6b8c289a, 0x35c6144d, 0xcae30a27, 0xb5718512, 0x5ab8c289, 0xfd5c6145, + 0xaeae30a3, 0x87571850, 0x43ab8c28, 0x21d5c614, 0x10eae30a, 0x08757185, 0xd43ab8c3, 0xba1d5c60, + 0x5d0eae30, 0x2e875718, 0x1743ab8c, 0x0ba1d5c6, 0x05d0eae3, 0xd2e87570, 0x69743ab8, 0x34ba1d5c, + 0x1a5d0eae, 0x0d2e8757, 0xd69743aa, 0x6b4ba1d5, 0xe5a5d0eb, 0xa2d2e874, 0x5169743a, 0x28b4ba1d, + 0xc45a5d0f, 0xb22d2e86, 0x59169743, 0xfc8b4ba0, 0x7e45a5d0, 0x3f22d2e8, 0x1f916974, 0x0fc8b4ba, + 0x07e45a5d, 0xd3f22d2f, 0xb9f91696, 0x5cfc8b4b, 0xfe7e45a4, 0x7f3f22d2, 0x3f9f9169, 0xcfcfc8b5, + 0xb7e7e45b, 0x8bf3f22c, 0x45f9f916, 0x22fcfc8b, 0xc17e7e44, 0x60bf3f22, 0x305f9f91, 0xc82fcfc9, + 0xb417e7e5, 0x8a0bf3f3, 0x9505f9f8, 0x4a82fcfc, 0x25417e7e, 0x12a0bf3f, 0xd9505f9e, 0x6ca82fcf, + 0xe65417e6, 0x732a0bf3, 0xe99505f8, 0x74ca82fc, 0x3a65417e, 0x1d32a0bf, 0xde99505e, 0x6f4ca82f, + 0xe7a65416, 0x73d32a0b, 0xe9e99504, 0x74f4ca82, 0x3a7a6541, 0xcd3d32a1, 0xb69e9951, 0x8b4f4ca9, + 0x95a7a655, 0x9ad3d32b, 0x9d69e994, 0x4eb4f4ca, 0x275a7a65, 0xc3ad3d33, 0xb1d69e98, 0x58eb4f4c, + 0x2c75a7a6, 0x163ad3d3, 0xdb1d69e8, 0x6d8eb4f4, 0x36c75a7a, 0x1b63ad3d, 0xddb1d69f, 0xbed8eb4e, + 0x5f6c75a7, 0xffb63ad2, 0x7fdb1d69, 0xefed8eb5, 0xa7f6c75b, 0x83fb63ac, 0x41fdb1d6, 0x20fed8eb, + 0xc07f6c74, 0x603fb63a, 0x301fdb1d, 0xc80fed8f, 0xb407f6c6, 0x5a03fb63, 0xfd01fdb0, 0x7e80fed8, + 0x3f407f6c, 0x1fa03fb6, 0x0fd01fdb, 0xd7e80fec, 0x6bf407f6, 0x35fa03fb, 0xcafd01fc, 0x657e80fe, + 0x32bf407f, 0xc95fa03e, 0x64afd01f, 0xe257e80e, 0x712bf407, 0xe895fa02, 0x744afd01, 0xea257e81, + 0xa512bf41, 0x82895fa1, 0x9144afd1, 0x98a257e9, 0x9c512bf5, 0x9e2895fb, 0x9f144afc, 0x4f8a257e, + 0x27c512bf, 0xc3e2895e, 0x61f144af, 0xe0f8a256, 0x707c512b, 0xe83e2894, 0x741f144a, 0x3a0f8a25, + 0xcd07c513, 0xb683e288, 0x5b41f144, 0x2da0f8a2, 0x16d07c51, 0xdb683e29, 0xbdb41f15, 0x8eda0f8b, + 0x976d07c4, 0x4bb683e2, 0x25db41f1, 0xc2eda0f9, 0xb176d07d, 0x88bb683f, 0x945db41e, 0x4a2eda0f, + 0xf5176d06, 0x7a8bb683, 0xed45db40, 0x76a2eda0, 0x3b5176d0, 0x1da8bb68, 0x0ed45db4, 0x076a2eda, + 0x03b5176d, 0xd1da8bb7, 0xb8ed45da, 0x5c76a2ed, 0xfe3b5177, 0xaf1da8ba, 0x578ed45d, 0xfbc76a2f, + 0xade3b516, 0x56f1da8b, 0xfb78ed44, 0x7dbc76a2, 0x3ede3b51, 0xcf6f1da9, 0xb7b78ed5, 0x8bdbc76b, + 0x95ede3b4, 0x4af6f1da, 0x257b78ed, 0xc2bdbc77, 0xb15ede3a, 0x58af6f1d, 0xfc57b78f, 0xae2bdbc6, + 0x5715ede3, 0xfb8af6f0, 0x7dc57b78, 0x3ee2bdbc, 0x1f715ede, 0x0fb8af6f, 0xd7dc57b6, 0x6bee2bdb, +}; + +void lane256_compress(const u8 m[64], u32 h[8], const u32 ctrh, const u32 ctrl) +{ + u32 t0, t1, t2, t3, t4, t5, t6, t7; /* temp */ + u32 s00, s01, s02, s03, s04, s05, s06, s07; /* lane 0 */ + u32 s10, s11, s12, s13, s14, s15, s16, s17; /* lane 1 */ + u32 s20, s21, s22, s23, s24, s25, s26, s27; /* lane 2 */ + u32 s30, s31, s32, s33, s34, s35, s36, s37; /* lane 3 */ + u32 s40, s41, s42, s43, s44, s45, s46, s47; /* lane 4 */ + u32 s50, s51, s52, s53, s54, s55, s56, s57; /* lane 5 */ + u32 s60, s61, s62, s63, s64, s65, s66, s67; /* lane 6 */ + u32 s70, s71, s72, s73, s74, s75, s76, s77; /* lane 7 */ + + /* Message expansion */ + s30 = h[0]; + s31 = h[1]; + s32 = h[2]; + s33 = h[3]; + s34 = h[4]; + s35 = h[5]; + s36 = h[6]; + s37 = h[7]; + s40 = U8TO32_BIG(m + 0); + s41 = U8TO32_BIG(m + 4); + s42 = U8TO32_BIG(m + 8); + s43 = U8TO32_BIG(m + 12); + s44 = U8TO32_BIG(m + 16); + s45 = U8TO32_BIG(m + 20); + s46 = U8TO32_BIG(m + 24); + s47 = U8TO32_BIG(m + 28); + s50 = U8TO32_BIG(m + 32); + s51 = U8TO32_BIG(m + 36); + s52 = U8TO32_BIG(m + 40); + s53 = U8TO32_BIG(m + 44); + s54 = U8TO32_BIG(m + 48); + s55 = U8TO32_BIG(m + 52); + s56 = U8TO32_BIG(m + 56); + s57 = U8TO32_BIG(m + 60); + s00 = s30 ^ s40 ^ s44 ^ s50 ^ s54; + s01 = s31 ^ s41 ^ s45 ^ s51 ^ s55; + s02 = s32 ^ s42 ^ s46 ^ s52 ^ s56; + s03 = s33 ^ s43 ^ s47 ^ s53 ^ s57; + s04 = s34 ^ s40 ^ s50; + s05 = s35 ^ s41 ^ s51; + s06 = s36 ^ s42 ^ s52; + s07 = s37 ^ s43 ^ s53; + s10 = s00 ^ s34 ^ s44; + s11 = s01 ^ s35 ^ s45; + s12 = s02 ^ s36 ^ s46; + s13 = s03 ^ s37 ^ s47; + s14 = s30 ^ s44 ^ s50; + s15 = s31 ^ s45 ^ s51; + s16 = s32 ^ s46 ^ s52; + s17 = s33 ^ s47 ^ s53; + s20 = s00 ^ s34 ^ s54; + s21 = s01 ^ s35 ^ s55; + s22 = s02 ^ s36 ^ s56; + s23 = s03 ^ s37 ^ s57; + s24 = s30 ^ s40 ^ s54; + s25 = s31 ^ s41 ^ s55; + s26 = s32 ^ s42 ^ s56; + s27 = s33 ^ s43 ^ s57; + + /* Lane 0 */ + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 0]; + t1 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 1]; + t4 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 2]; + t5 = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 3] ^ ctrh; + t2 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[ 4]; + t3 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[ 5]; + t6 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[ 6]; + t7 = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[ 7]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8]; + s01 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9]; + s04 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10]; + s05 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11] ^ ctrl; + s02 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12]; + s03 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13]; + s06 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14]; + s07 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[16]; + t1 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[17]; + t4 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[18]; + t5 = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[19] ^ ctrh; + t2 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[20]; + t3 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[21]; + t6 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[22]; + t7 = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[23]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24]; + s01 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25]; + s04 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26]; + s05 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27] ^ ctrl; + s02 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28]; + s03 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29]; + s06 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30]; + s07 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[32]; + t1 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[33]; + t4 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[34]; + t5 = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[35] ^ ctrh; + t2 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[36]; + t3 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[37]; + t6 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[38]; + t7 = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[39]; + + s60 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s61 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s64 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s65 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s62 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s63 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s66 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s67 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 1 */ + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 0+40]; + t1 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 1+40]; + t4 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 2+40]; + t5 = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 3+40] ^ ctrl; + t2 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[ 4+40]; + t3 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[ 5+40]; + t6 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[ 6+40]; + t7 = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[ 7+40]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+40]; + s11 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+40]; + s14 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+40]; + s15 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+40] ^ ctrh; + s12 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+40]; + s13 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+40]; + s16 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+40]; + s17 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+40]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[16+40]; + t1 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[17+40]; + t4 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[18+40]; + t5 = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[19+40] ^ ctrl; + t2 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[20+40]; + t3 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[21+40]; + t6 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[22+40]; + t7 = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[23+40]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+40]; + s11 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+40]; + s14 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+40]; + s15 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+40] ^ ctrh; + s12 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+40]; + s13 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+40]; + s16 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+40]; + s17 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+40]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[32+40]; + t1 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[33+40]; + t4 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[34+40]; + t5 = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[35+40] ^ ctrl; + t2 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[36+40]; + t3 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[37+40]; + t6 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[38+40]; + t7 = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[39+40]; + + s60 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s61 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s64 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s65 ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s62 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s63 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s66 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s67 ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 2 */ + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 0+80]; + t1 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 1+80]; + t4 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 2+80]; + t5 = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 3+80] ^ ctrh; + t2 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[ 4+80]; + t3 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[ 5+80]; + t6 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[ 6+80]; + t7 = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[ 7+80]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+80]; + s21 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+80]; + s24 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+80]; + s25 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+80] ^ ctrl; + s22 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+80]; + s23 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+80]; + s26 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+80]; + s27 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+80]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[16+80]; + t1 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[17+80]; + t4 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[18+80]; + t5 = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[19+80] ^ ctrh; + t2 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[20+80]; + t3 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[21+80]; + t6 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[22+80]; + t7 = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[23+80]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+80]; + s21 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+80]; + s24 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+80]; + s25 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+80] ^ ctrl; + s22 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+80]; + s23 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+80]; + s26 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+80]; + s27 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+80]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[32+80]; + t1 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[33+80]; + t4 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[34+80]; + t5 = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[35+80] ^ ctrh; + t2 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[36+80]; + t3 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[37+80]; + t6 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[38+80]; + t7 = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[39+80]; + + s60 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s61 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s64 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s65 ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s62 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s63 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s66 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s67 ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 3 */ + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 0+120]; + t1 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 1+120]; + t4 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 2+120]; + t5 = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 3+120] ^ ctrl; + t2 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[ 4+120]; + t3 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[ 5+120]; + t6 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[ 6+120]; + t7 = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[ 7+120]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+120]; + s31 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+120]; + s34 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+120]; + s35 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+120] ^ ctrh; + s32 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+120]; + s33 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+120]; + s36 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+120]; + s37 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+120]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[16+120]; + t1 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[17+120]; + t4 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[18+120]; + t5 = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[19+120] ^ ctrl; + t2 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[20+120]; + t3 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[21+120]; + t6 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[22+120]; + t7 = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[23+120]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+120]; + s31 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+120]; + s34 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+120]; + s35 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+120] ^ ctrh; + s32 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+120]; + s33 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+120]; + s36 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+120]; + s37 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+120]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[32+120]; + t1 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[33+120]; + t4 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[34+120]; + t5 = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[35+120] ^ ctrl; + t2 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[36+120]; + t3 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[37+120]; + t6 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[38+120]; + t7 = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[39+120]; + + s70 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s71 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s74 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s75 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s72 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s73 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s76 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s77 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 4 */ + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 0+160]; + t1 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 1+160]; + t4 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 2+160]; + t5 = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 3+160] ^ ctrh; + t2 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[ 4+160]; + t3 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[ 5+160]; + t6 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[ 6+160]; + t7 = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[ 7+160]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+160]; + s41 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+160]; + s44 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+160]; + s45 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+160] ^ ctrl; + s42 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+160]; + s43 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+160]; + s46 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+160]; + s47 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+160]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[16+160]; + t1 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[17+160]; + t4 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[18+160]; + t5 = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[19+160] ^ ctrh; + t2 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[20+160]; + t3 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[21+160]; + t6 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[22+160]; + t7 = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[23+160]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+160]; + s41 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+160]; + s44 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+160]; + s45 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+160] ^ ctrl; + s42 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+160]; + s43 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+160]; + s46 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+160]; + s47 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+160]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[32+160]; + t1 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[33+160]; + t4 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[34+160]; + t5 = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[35+160] ^ ctrh; + t2 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[36+160]; + t3 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[37+160]; + t6 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[38+160]; + t7 = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[39+160]; + + s70 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s71 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s74 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s75 ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s72 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s73 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s76 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s77 ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 5 */ + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 0+200]; + t1 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 1+200]; + t4 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 2+200]; + t5 = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 3+200] ^ ctrl; + t2 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[ 4+200]; + t3 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[ 5+200]; + t6 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[ 6+200]; + t7 = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[ 7+200]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+200]; + s51 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+200]; + s54 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+200]; + s55 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+200] ^ ctrh; + s52 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+200]; + s53 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+200]; + s56 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+200]; + s57 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+200]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[16+200]; + t1 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[17+200]; + t4 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[18+200]; + t5 = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[19+200] ^ ctrl; + t2 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[20+200]; + t3 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[21+200]; + t6 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[22+200]; + t7 = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[23+200]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+200]; + s51 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+200]; + s54 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+200]; + s55 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+200] ^ ctrh; + s52 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+200]; + s53 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+200]; + s56 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+200]; + s57 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+200]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[32+200]; + t1 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[33+200]; + t4 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[34+200]; + t5 = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[35+200] ^ ctrl; + t2 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[36+200]; + t3 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[37+200]; + t6 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[38+200]; + t7 = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[39+200]; + + s70 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s71 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s74 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s75 ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s72 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s73 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s76 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s77 ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 6 */ + t0 = T0[B3(s60)] ^ T1[B2(s61)] ^ T2[B1(s62)] ^ T3[B0(s63)] ^ C[ 0+240]; + t1 = T0[B3(s61)] ^ T1[B2(s62)] ^ T2[B1(s63)] ^ T3[B0(s60)] ^ C[ 1+240]; + t4 = T0[B3(s62)] ^ T1[B2(s63)] ^ T2[B1(s60)] ^ T3[B0(s61)] ^ C[ 2+240]; + t5 = T0[B3(s63)] ^ T1[B2(s60)] ^ T2[B1(s61)] ^ T3[B0(s62)] ^ C[ 3+240] ^ ctrh; + t2 = T0[B3(s64)] ^ T1[B2(s65)] ^ T2[B1(s66)] ^ T3[B0(s67)] ^ C[ 4+240]; + t3 = T0[B3(s65)] ^ T1[B2(s66)] ^ T2[B1(s67)] ^ T3[B0(s64)] ^ C[ 5+240]; + t6 = T0[B3(s66)] ^ T1[B2(s67)] ^ T2[B1(s64)] ^ T3[B0(s65)] ^ C[ 6+240]; + t7 = T0[B3(s67)] ^ T1[B2(s64)] ^ T2[B1(s65)] ^ T3[B0(s66)] ^ C[ 7+240]; + + s60 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+240]; + s61 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+240]; + s64 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+240]; + s65 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+240] ^ ctrl; + s62 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+240]; + s63 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+240]; + s66 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+240]; + s67 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+240]; + + h[0] = T0[B3(s60)] ^ T1[B2(s61)] ^ T2[B1(s62)] ^ T3[B0(s63)]; + h[1] = T0[B3(s61)] ^ T1[B2(s62)] ^ T2[B1(s63)] ^ T3[B0(s60)]; + h[4] = T0[B3(s62)] ^ T1[B2(s63)] ^ T2[B1(s60)] ^ T3[B0(s61)]; + h[5] = T0[B3(s63)] ^ T1[B2(s60)] ^ T2[B1(s61)] ^ T3[B0(s62)]; + h[2] = T0[B3(s64)] ^ T1[B2(s65)] ^ T2[B1(s66)] ^ T3[B0(s67)]; + h[3] = T0[B3(s65)] ^ T1[B2(s66)] ^ T2[B1(s67)] ^ T3[B0(s64)]; + h[6] = T0[B3(s66)] ^ T1[B2(s67)] ^ T2[B1(s64)] ^ T3[B0(s65)]; + h[7] = T0[B3(s67)] ^ T1[B2(s64)] ^ T2[B1(s65)] ^ T3[B0(s66)]; + + /* Lane 7 */ + t0 = T0[B3(s70)] ^ T1[B2(s71)] ^ T2[B1(s72)] ^ T3[B0(s73)] ^ C[ 0+256]; + t1 = T0[B3(s71)] ^ T1[B2(s72)] ^ T2[B1(s73)] ^ T3[B0(s70)] ^ C[ 1+256]; + t4 = T0[B3(s72)] ^ T1[B2(s73)] ^ T2[B1(s70)] ^ T3[B0(s71)] ^ C[ 2+256]; + t5 = T0[B3(s73)] ^ T1[B2(s70)] ^ T2[B1(s71)] ^ T3[B0(s72)] ^ C[ 3+256] ^ ctrh; + t2 = T0[B3(s74)] ^ T1[B2(s75)] ^ T2[B1(s76)] ^ T3[B0(s77)] ^ C[ 4+256]; + t3 = T0[B3(s75)] ^ T1[B2(s76)] ^ T2[B1(s77)] ^ T3[B0(s74)] ^ C[ 5+256]; + t6 = T0[B3(s76)] ^ T1[B2(s77)] ^ T2[B1(s74)] ^ T3[B0(s75)] ^ C[ 6+256]; + t7 = T0[B3(s77)] ^ T1[B2(s74)] ^ T2[B1(s75)] ^ T3[B0(s76)] ^ C[ 7+256]; + + s70 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+256]; + s71 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+256]; + s74 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+256]; + s75 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+256] ^ ctrl; + s72 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+256]; + s73 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+256]; + s76 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+256]; + s77 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+256]; + + h[0] ^= T0[B3(s70)] ^ T1[B2(s71)] ^ T2[B1(s72)] ^ T3[B0(s73)]; + h[1] ^= T0[B3(s71)] ^ T1[B2(s72)] ^ T2[B1(s73)] ^ T3[B0(s70)]; + h[4] ^= T0[B3(s72)] ^ T1[B2(s73)] ^ T2[B1(s70)] ^ T3[B0(s71)]; + h[5] ^= T0[B3(s73)] ^ T1[B2(s70)] ^ T2[B1(s71)] ^ T3[B0(s72)]; + h[2] ^= T0[B3(s74)] ^ T1[B2(s75)] ^ T2[B1(s76)] ^ T3[B0(s77)]; + h[3] ^= T0[B3(s75)] ^ T1[B2(s76)] ^ T2[B1(s77)] ^ T3[B0(s74)]; + h[6] ^= T0[B3(s76)] ^ T1[B2(s77)] ^ T2[B1(s74)] ^ T3[B0(s75)]; + h[7] ^= T0[B3(s77)] ^ T1[B2(s74)] ^ T2[B1(s75)] ^ T3[B0(s76)]; +} + +void lane512_compress(const u8 m[128], u32 h[16], const u32 ctrh, const u32 ctrl) +{ + u32 t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, ta, tb, tc, td, te, tf; /* temp */ + u32 s00, s01, s02, s03, s04, s05, s06, s07, s08, s09, s0a, s0b, s0c, s0d, s0e, s0f; /* lane 0 */ + u32 s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s1a, s1b, s1c, s1d, s1e, s1f; /* lane 1 */ + u32 s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s2a, s2b, s2c, s2d, s2e, s2f; /* lane 2 */ + u32 s30, s31, s32, s33, s34, s35, s36, s37, s38, s39, s3a, s3b, s3c, s3d, s3e, s3f; /* lane 3 */ + u32 s40, s41, s42, s43, s44, s45, s46, s47, s48, s49, s4a, s4b, s4c, s4d, s4e, s4f; /* lane 4 */ + u32 s50, s51, s52, s53, s54, s55, s56, s57, s58, s59, s5a, s5b, s5c, s5d, s5e, s5f; /* lane 5 */ + u32 s60, s61, s62, s63, s64, s65, s66, s67, s68, s69, s6a, s6b, s6c, s6d, s6e, s6f; /* lane 6 */ + u32 s70, s71, s72, s73, s74, s75, s76, s77, s78, s79, s7a, s7b, s7c, s7d, s7e, s7f; /* lane 7 */ + + /* Message expansion */ + s30 = h[0]; + s31 = h[1]; + s32 = h[2]; + s33 = h[3]; + s34 = h[4]; + s35 = h[5]; + s36 = h[6]; + s37 = h[7]; + s38 = h[8]; + s39 = h[9]; + s3a = h[10]; + s3b = h[11]; + s3c = h[12]; + s3d = h[13]; + s3e = h[14]; + s3f = h[15]; + s40 = U8TO32_BIG(m + 0); + s41 = U8TO32_BIG(m + 4); + s42 = U8TO32_BIG(m + 8); + s43 = U8TO32_BIG(m + 12); + s44 = U8TO32_BIG(m + 16); + s45 = U8TO32_BIG(m + 20); + s46 = U8TO32_BIG(m + 24); + s47 = U8TO32_BIG(m + 28); + s48 = U8TO32_BIG(m + 32); + s49 = U8TO32_BIG(m + 36); + s4a = U8TO32_BIG(m + 40); + s4b = U8TO32_BIG(m + 44); + s4c = U8TO32_BIG(m + 48); + s4d = U8TO32_BIG(m + 52); + s4e = U8TO32_BIG(m + 56); + s4f = U8TO32_BIG(m + 60); + s50 = U8TO32_BIG(m + 64); + s51 = U8TO32_BIG(m + 68); + s52 = U8TO32_BIG(m + 72); + s53 = U8TO32_BIG(m + 76); + s54 = U8TO32_BIG(m + 80); + s55 = U8TO32_BIG(m + 84); + s56 = U8TO32_BIG(m + 88); + s57 = U8TO32_BIG(m + 92); + s58 = U8TO32_BIG(m + 96); + s59 = U8TO32_BIG(m + 100); + s5a = U8TO32_BIG(m + 104); + s5b = U8TO32_BIG(m + 108); + s5c = U8TO32_BIG(m + 112); + s5d = U8TO32_BIG(m + 116); + s5e = U8TO32_BIG(m + 120); + s5f = U8TO32_BIG(m + 124); + s00 = s30 ^ s40 ^ s48 ^ s50 ^ s58; + s01 = s31 ^ s41 ^ s49 ^ s51 ^ s59; + s02 = s32 ^ s42 ^ s4a ^ s52 ^ s5a; + s03 = s33 ^ s43 ^ s4b ^ s53 ^ s5b; + s04 = s34 ^ s44 ^ s4c ^ s54 ^ s5c; + s05 = s35 ^ s45 ^ s4d ^ s55 ^ s5d; + s06 = s36 ^ s46 ^ s4e ^ s56 ^ s5e; + s07 = s37 ^ s47 ^ s4f ^ s57 ^ s5f; + s08 = s38 ^ s40 ^ s50; + s09 = s39 ^ s41 ^ s51; + s0a = s3a ^ s42 ^ s52; + s0b = s3b ^ s43 ^ s53; + s0c = s3c ^ s44 ^ s54; + s0d = s3d ^ s45 ^ s55; + s0e = s3e ^ s46 ^ s56; + s0f = s3f ^ s47 ^ s57; + s10 = s00 ^ s38 ^ s48; + s11 = s01 ^ s39 ^ s49; + s12 = s02 ^ s3a ^ s4a; + s13 = s03 ^ s3b ^ s4b; + s14 = s04 ^ s3c ^ s4c; + s15 = s05 ^ s3d ^ s4d; + s16 = s06 ^ s3e ^ s4e; + s17 = s07 ^ s3f ^ s4f; + s18 = s30 ^ s48 ^ s50; + s19 = s31 ^ s49 ^ s51; + s1a = s32 ^ s4a ^ s52; + s1b = s33 ^ s4b ^ s53; + s1c = s34 ^ s4c ^ s54; + s1d = s35 ^ s4d ^ s55; + s1e = s36 ^ s4e ^ s56; + s1f = s37 ^ s4f ^ s57; + s20 = s00 ^ s38 ^ s58; + s21 = s01 ^ s39 ^ s59; + s22 = s02 ^ s3a ^ s5a; + s23 = s03 ^ s3b ^ s5b; + s24 = s04 ^ s3c ^ s5c; + s25 = s05 ^ s3d ^ s5d; + s26 = s06 ^ s3e ^ s5e; + s27 = s07 ^ s3f ^ s5f; + s28 = s30 ^ s40 ^ s58; + s29 = s31 ^ s41 ^ s59; + s2a = s32 ^ s42 ^ s5a; + s2b = s33 ^ s43 ^ s5b; + s2c = s34 ^ s44 ^ s5c; + s2d = s35 ^ s45 ^ s5d; + s2e = s36 ^ s46 ^ s5e; + s2f = s37 ^ s47 ^ s5f; + + /* Lane 0 */ + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 0]; + t4 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 1]; + t8 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 2]; + tc = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 3] ^ ctrh; + t1 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[ 4]; + t5 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[ 5]; + t9 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[ 6]; + td = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[ 7]; + t2 = T0[B3(s08)] ^ T1[B2(s09)] ^ T2[B1(s0a)] ^ T3[B0(s0b)] ^ C[ 8]; + t6 = T0[B3(s09)] ^ T1[B2(s0a)] ^ T2[B1(s0b)] ^ T3[B0(s08)] ^ C[ 9]; + ta = T0[B3(s0a)] ^ T1[B2(s0b)] ^ T2[B1(s08)] ^ T3[B0(s09)] ^ C[ 10]; + te = T0[B3(s0b)] ^ T1[B2(s08)] ^ T2[B1(s09)] ^ T3[B0(s0a)] ^ C[ 11]; + t3 = T0[B3(s0c)] ^ T1[B2(s0d)] ^ T2[B1(s0e)] ^ T3[B0(s0f)] ^ C[ 12]; + t7 = T0[B3(s0d)] ^ T1[B2(s0e)] ^ T2[B1(s0f)] ^ T3[B0(s0c)] ^ C[ 13]; + tb = T0[B3(s0e)] ^ T1[B2(s0f)] ^ T2[B1(s0c)] ^ T3[B0(s0d)] ^ C[ 14]; + tf = T0[B3(s0f)] ^ T1[B2(s0c)] ^ T2[B1(s0d)] ^ T3[B0(s0e)] ^ C[ 15]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16]; + s04 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17]; + s08 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18]; + s0c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19] ^ ctrl; + s01 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20]; + s05 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21]; + s09 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22]; + s0d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23]; + s02 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24]; + s06 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25]; + s0a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26]; + s0e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27]; + s03 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28]; + s07 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29]; + s0b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30]; + s0f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 32]; + t4 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 33]; + t8 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 34]; + tc = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 35] ^ ctrh; + t1 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[ 36]; + t5 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[ 37]; + t9 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[ 38]; + td = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[ 39]; + t2 = T0[B3(s08)] ^ T1[B2(s09)] ^ T2[B1(s0a)] ^ T3[B0(s0b)] ^ C[ 40]; + t6 = T0[B3(s09)] ^ T1[B2(s0a)] ^ T2[B1(s0b)] ^ T3[B0(s08)] ^ C[ 41]; + ta = T0[B3(s0a)] ^ T1[B2(s0b)] ^ T2[B1(s08)] ^ T3[B0(s09)] ^ C[ 42]; + te = T0[B3(s0b)] ^ T1[B2(s08)] ^ T2[B1(s09)] ^ T3[B0(s0a)] ^ C[ 43]; + t3 = T0[B3(s0c)] ^ T1[B2(s0d)] ^ T2[B1(s0e)] ^ T3[B0(s0f)] ^ C[ 44]; + t7 = T0[B3(s0d)] ^ T1[B2(s0e)] ^ T2[B1(s0f)] ^ T3[B0(s0c)] ^ C[ 45]; + tb = T0[B3(s0e)] ^ T1[B2(s0f)] ^ T2[B1(s0c)] ^ T3[B0(s0d)] ^ C[ 46]; + tf = T0[B3(s0f)] ^ T1[B2(s0c)] ^ T2[B1(s0d)] ^ T3[B0(s0e)] ^ C[ 47]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48]; + s04 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49]; + s08 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50]; + s0c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51] ^ ctrl; + s01 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52]; + s05 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53]; + s09 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54]; + s0d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55]; + s02 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56]; + s06 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57]; + s0a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58]; + s0e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59]; + s03 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60]; + s07 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61]; + s0b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62]; + s0f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 64]; + t4 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 65]; + t8 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 66]; + tc = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 67] ^ ctrh; + t1 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[ 68]; + t5 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[ 69]; + t9 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[ 70]; + td = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[ 71]; + t2 = T0[B3(s08)] ^ T1[B2(s09)] ^ T2[B1(s0a)] ^ T3[B0(s0b)] ^ C[ 72]; + t6 = T0[B3(s09)] ^ T1[B2(s0a)] ^ T2[B1(s0b)] ^ T3[B0(s08)] ^ C[ 73]; + ta = T0[B3(s0a)] ^ T1[B2(s0b)] ^ T2[B1(s08)] ^ T3[B0(s09)] ^ C[ 74]; + te = T0[B3(s0b)] ^ T1[B2(s08)] ^ T2[B1(s09)] ^ T3[B0(s0a)] ^ C[ 75]; + t3 = T0[B3(s0c)] ^ T1[B2(s0d)] ^ T2[B1(s0e)] ^ T3[B0(s0f)] ^ C[ 76]; + t7 = T0[B3(s0d)] ^ T1[B2(s0e)] ^ T2[B1(s0f)] ^ T3[B0(s0c)] ^ C[ 77]; + tb = T0[B3(s0e)] ^ T1[B2(s0f)] ^ T2[B1(s0c)] ^ T3[B0(s0d)] ^ C[ 78]; + tf = T0[B3(s0f)] ^ T1[B2(s0c)] ^ T2[B1(s0d)] ^ T3[B0(s0e)] ^ C[ 79]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80]; + s04 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81]; + s08 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82]; + s0c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83] ^ ctrl; + s01 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84]; + s05 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85]; + s09 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86]; + s0d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87]; + s02 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88]; + s06 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89]; + s0a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90]; + s0e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91]; + s03 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92]; + s07 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93]; + s0b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94]; + s0f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 96]; + t4 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 97]; + t8 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 98]; + tc = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 99] ^ ctrh; + t1 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[100]; + t5 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[101]; + t9 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[102]; + td = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[103]; + t2 = T0[B3(s08)] ^ T1[B2(s09)] ^ T2[B1(s0a)] ^ T3[B0(s0b)] ^ C[104]; + t6 = T0[B3(s09)] ^ T1[B2(s0a)] ^ T2[B1(s0b)] ^ T3[B0(s08)] ^ C[105]; + ta = T0[B3(s0a)] ^ T1[B2(s0b)] ^ T2[B1(s08)] ^ T3[B0(s09)] ^ C[106]; + te = T0[B3(s0b)] ^ T1[B2(s08)] ^ T2[B1(s09)] ^ T3[B0(s0a)] ^ C[107]; + t3 = T0[B3(s0c)] ^ T1[B2(s0d)] ^ T2[B1(s0e)] ^ T3[B0(s0f)] ^ C[108]; + t7 = T0[B3(s0d)] ^ T1[B2(s0e)] ^ T2[B1(s0f)] ^ T3[B0(s0c)] ^ C[109]; + tb = T0[B3(s0e)] ^ T1[B2(s0f)] ^ T2[B1(s0c)] ^ T3[B0(s0d)] ^ C[110]; + tf = T0[B3(s0f)] ^ T1[B2(s0c)] ^ T2[B1(s0d)] ^ T3[B0(s0e)] ^ C[111]; + + s60 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s64 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s68 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s6c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s61 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s65 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s69 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s6d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s62 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s66 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s6a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s6e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s63 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s67 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s6b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s6f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 1 */ + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 0+112]; + t4 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 1+112]; + t8 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 2+112]; + tc = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 3+112] ^ ctrl; + t1 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[ 4+112]; + t5 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[ 5+112]; + t9 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[ 6+112]; + td = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[ 7+112]; + t2 = T0[B3(s18)] ^ T1[B2(s19)] ^ T2[B1(s1a)] ^ T3[B0(s1b)] ^ C[ 8+112]; + t6 = T0[B3(s19)] ^ T1[B2(s1a)] ^ T2[B1(s1b)] ^ T3[B0(s18)] ^ C[ 9+112]; + ta = T0[B3(s1a)] ^ T1[B2(s1b)] ^ T2[B1(s18)] ^ T3[B0(s19)] ^ C[ 10+112]; + te = T0[B3(s1b)] ^ T1[B2(s18)] ^ T2[B1(s19)] ^ T3[B0(s1a)] ^ C[ 11+112]; + t3 = T0[B3(s1c)] ^ T1[B2(s1d)] ^ T2[B1(s1e)] ^ T3[B0(s1f)] ^ C[ 12+112]; + t7 = T0[B3(s1d)] ^ T1[B2(s1e)] ^ T2[B1(s1f)] ^ T3[B0(s1c)] ^ C[ 13+112]; + tb = T0[B3(s1e)] ^ T1[B2(s1f)] ^ T2[B1(s1c)] ^ T3[B0(s1d)] ^ C[ 14+112]; + tf = T0[B3(s1f)] ^ T1[B2(s1c)] ^ T2[B1(s1d)] ^ T3[B0(s1e)] ^ C[ 15+112]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+112]; + s14 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+112]; + s18 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+112]; + s1c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+112] ^ ctrh; + s11 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+112]; + s15 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+112]; + s19 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+112]; + s1d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+112]; + s12 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+112]; + s16 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+112]; + s1a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+112]; + s1e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+112]; + s13 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+112]; + s17 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+112]; + s1b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+112]; + s1f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+112]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 32+112]; + t4 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 33+112]; + t8 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 34+112]; + tc = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 35+112] ^ ctrl; + t1 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[ 36+112]; + t5 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[ 37+112]; + t9 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[ 38+112]; + td = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[ 39+112]; + t2 = T0[B3(s18)] ^ T1[B2(s19)] ^ T2[B1(s1a)] ^ T3[B0(s1b)] ^ C[ 40+112]; + t6 = T0[B3(s19)] ^ T1[B2(s1a)] ^ T2[B1(s1b)] ^ T3[B0(s18)] ^ C[ 41+112]; + ta = T0[B3(s1a)] ^ T1[B2(s1b)] ^ T2[B1(s18)] ^ T3[B0(s19)] ^ C[ 42+112]; + te = T0[B3(s1b)] ^ T1[B2(s18)] ^ T2[B1(s19)] ^ T3[B0(s1a)] ^ C[ 43+112]; + t3 = T0[B3(s1c)] ^ T1[B2(s1d)] ^ T2[B1(s1e)] ^ T3[B0(s1f)] ^ C[ 44+112]; + t7 = T0[B3(s1d)] ^ T1[B2(s1e)] ^ T2[B1(s1f)] ^ T3[B0(s1c)] ^ C[ 45+112]; + tb = T0[B3(s1e)] ^ T1[B2(s1f)] ^ T2[B1(s1c)] ^ T3[B0(s1d)] ^ C[ 46+112]; + tf = T0[B3(s1f)] ^ T1[B2(s1c)] ^ T2[B1(s1d)] ^ T3[B0(s1e)] ^ C[ 47+112]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+112]; + s14 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+112]; + s18 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+112]; + s1c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+112] ^ ctrh; + s11 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+112]; + s15 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+112]; + s19 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+112]; + s1d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+112]; + s12 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+112]; + s16 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+112]; + s1a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+112]; + s1e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+112]; + s13 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+112]; + s17 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+112]; + s1b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+112]; + s1f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+112]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 64+112]; + t4 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 65+112]; + t8 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 66+112]; + tc = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 67+112] ^ ctrl; + t1 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[ 68+112]; + t5 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[ 69+112]; + t9 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[ 70+112]; + td = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[ 71+112]; + t2 = T0[B3(s18)] ^ T1[B2(s19)] ^ T2[B1(s1a)] ^ T3[B0(s1b)] ^ C[ 72+112]; + t6 = T0[B3(s19)] ^ T1[B2(s1a)] ^ T2[B1(s1b)] ^ T3[B0(s18)] ^ C[ 73+112]; + ta = T0[B3(s1a)] ^ T1[B2(s1b)] ^ T2[B1(s18)] ^ T3[B0(s19)] ^ C[ 74+112]; + te = T0[B3(s1b)] ^ T1[B2(s18)] ^ T2[B1(s19)] ^ T3[B0(s1a)] ^ C[ 75+112]; + t3 = T0[B3(s1c)] ^ T1[B2(s1d)] ^ T2[B1(s1e)] ^ T3[B0(s1f)] ^ C[ 76+112]; + t7 = T0[B3(s1d)] ^ T1[B2(s1e)] ^ T2[B1(s1f)] ^ T3[B0(s1c)] ^ C[ 77+112]; + tb = T0[B3(s1e)] ^ T1[B2(s1f)] ^ T2[B1(s1c)] ^ T3[B0(s1d)] ^ C[ 78+112]; + tf = T0[B3(s1f)] ^ T1[B2(s1c)] ^ T2[B1(s1d)] ^ T3[B0(s1e)] ^ C[ 79+112]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+112]; + s14 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+112]; + s18 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+112]; + s1c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+112] ^ ctrh; + s11 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+112]; + s15 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+112]; + s19 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+112]; + s1d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+112]; + s12 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+112]; + s16 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+112]; + s1a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+112]; + s1e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+112]; + s13 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+112]; + s17 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+112]; + s1b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+112]; + s1f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+112]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 96+112]; + t4 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 97+112]; + t8 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 98+112]; + tc = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 99+112] ^ ctrl; + t1 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[100+112]; + t5 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[101+112]; + t9 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[102+112]; + td = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[103+112]; + t2 = T0[B3(s18)] ^ T1[B2(s19)] ^ T2[B1(s1a)] ^ T3[B0(s1b)] ^ C[104+112]; + t6 = T0[B3(s19)] ^ T1[B2(s1a)] ^ T2[B1(s1b)] ^ T3[B0(s18)] ^ C[105+112]; + ta = T0[B3(s1a)] ^ T1[B2(s1b)] ^ T2[B1(s18)] ^ T3[B0(s19)] ^ C[106+112]; + te = T0[B3(s1b)] ^ T1[B2(s18)] ^ T2[B1(s19)] ^ T3[B0(s1a)] ^ C[107+112]; + t3 = T0[B3(s1c)] ^ T1[B2(s1d)] ^ T2[B1(s1e)] ^ T3[B0(s1f)] ^ C[108+112]; + t7 = T0[B3(s1d)] ^ T1[B2(s1e)] ^ T2[B1(s1f)] ^ T3[B0(s1c)] ^ C[109+112]; + tb = T0[B3(s1e)] ^ T1[B2(s1f)] ^ T2[B1(s1c)] ^ T3[B0(s1d)] ^ C[110+112]; + tf = T0[B3(s1f)] ^ T1[B2(s1c)] ^ T2[B1(s1d)] ^ T3[B0(s1e)] ^ C[111+112]; + + s60 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s64 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s68 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s6c ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s61 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s65 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s69 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s6d ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s62 ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s66 ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s6a ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s6e ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s63 ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s67 ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s6b ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s6f ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 2 */ + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 0+224]; + t4 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 1+224]; + t8 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 2+224]; + tc = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 3+224] ^ ctrh; + t1 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[ 4+224]; + t5 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[ 5+224]; + t9 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[ 6+224]; + td = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[ 7+224]; + t2 = T0[B3(s28)] ^ T1[B2(s29)] ^ T2[B1(s2a)] ^ T3[B0(s2b)] ^ C[ 8+224]; + t6 = T0[B3(s29)] ^ T1[B2(s2a)] ^ T2[B1(s2b)] ^ T3[B0(s28)] ^ C[ 9+224]; + ta = T0[B3(s2a)] ^ T1[B2(s2b)] ^ T2[B1(s28)] ^ T3[B0(s29)] ^ C[ 10+224]; + te = T0[B3(s2b)] ^ T1[B2(s28)] ^ T2[B1(s29)] ^ T3[B0(s2a)] ^ C[ 11+224]; + t3 = T0[B3(s2c)] ^ T1[B2(s2d)] ^ T2[B1(s2e)] ^ T3[B0(s2f)] ^ C[ 12+224]; + t7 = T0[B3(s2d)] ^ T1[B2(s2e)] ^ T2[B1(s2f)] ^ T3[B0(s2c)] ^ C[ 13+224]; + tb = T0[B3(s2e)] ^ T1[B2(s2f)] ^ T2[B1(s2c)] ^ T3[B0(s2d)] ^ C[ 14+224]; + tf = T0[B3(s2f)] ^ T1[B2(s2c)] ^ T2[B1(s2d)] ^ T3[B0(s2e)] ^ C[ 15+224]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+224]; + s24 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+224]; + s28 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+224]; + s2c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+224] ^ ctrl; + s21 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+224]; + s25 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+224]; + s29 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+224]; + s2d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+224]; + s22 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+224]; + s26 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+224]; + s2a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+224]; + s2e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+224]; + s23 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+224]; + s27 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+224]; + s2b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+224]; + s2f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+224]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 32+224]; + t4 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 33+224]; + t8 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 34+224]; + tc = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 35+224] ^ ctrh; + t1 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[ 36+224]; + t5 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[ 37+224]; + t9 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[ 38+224]; + td = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[ 39+224]; + t2 = T0[B3(s28)] ^ T1[B2(s29)] ^ T2[B1(s2a)] ^ T3[B0(s2b)] ^ C[ 40+224]; + t6 = T0[B3(s29)] ^ T1[B2(s2a)] ^ T2[B1(s2b)] ^ T3[B0(s28)] ^ C[ 41+224]; + ta = T0[B3(s2a)] ^ T1[B2(s2b)] ^ T2[B1(s28)] ^ T3[B0(s29)] ^ C[ 42+224]; + te = T0[B3(s2b)] ^ T1[B2(s28)] ^ T2[B1(s29)] ^ T3[B0(s2a)] ^ C[ 43+224]; + t3 = T0[B3(s2c)] ^ T1[B2(s2d)] ^ T2[B1(s2e)] ^ T3[B0(s2f)] ^ C[ 44+224]; + t7 = T0[B3(s2d)] ^ T1[B2(s2e)] ^ T2[B1(s2f)] ^ T3[B0(s2c)] ^ C[ 45+224]; + tb = T0[B3(s2e)] ^ T1[B2(s2f)] ^ T2[B1(s2c)] ^ T3[B0(s2d)] ^ C[ 46+224]; + tf = T0[B3(s2f)] ^ T1[B2(s2c)] ^ T2[B1(s2d)] ^ T3[B0(s2e)] ^ C[ 47+224]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+224]; + s24 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+224]; + s28 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+224]; + s2c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+224] ^ ctrl; + s21 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+224]; + s25 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+224]; + s29 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+224]; + s2d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+224]; + s22 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+224]; + s26 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+224]; + s2a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+224]; + s2e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+224]; + s23 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+224]; + s27 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+224]; + s2b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+224]; + s2f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+224]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 64+224]; + t4 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 65+224]; + t8 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 66+224]; + tc = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 67+224] ^ ctrh; + t1 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[ 68+224]; + t5 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[ 69+224]; + t9 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[ 70+224]; + td = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[ 71+224]; + t2 = T0[B3(s28)] ^ T1[B2(s29)] ^ T2[B1(s2a)] ^ T3[B0(s2b)] ^ C[ 72+224]; + t6 = T0[B3(s29)] ^ T1[B2(s2a)] ^ T2[B1(s2b)] ^ T3[B0(s28)] ^ C[ 73+224]; + ta = T0[B3(s2a)] ^ T1[B2(s2b)] ^ T2[B1(s28)] ^ T3[B0(s29)] ^ C[ 74+224]; + te = T0[B3(s2b)] ^ T1[B2(s28)] ^ T2[B1(s29)] ^ T3[B0(s2a)] ^ C[ 75+224]; + t3 = T0[B3(s2c)] ^ T1[B2(s2d)] ^ T2[B1(s2e)] ^ T3[B0(s2f)] ^ C[ 76+224]; + t7 = T0[B3(s2d)] ^ T1[B2(s2e)] ^ T2[B1(s2f)] ^ T3[B0(s2c)] ^ C[ 77+224]; + tb = T0[B3(s2e)] ^ T1[B2(s2f)] ^ T2[B1(s2c)] ^ T3[B0(s2d)] ^ C[ 78+224]; + tf = T0[B3(s2f)] ^ T1[B2(s2c)] ^ T2[B1(s2d)] ^ T3[B0(s2e)] ^ C[ 79+224]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+224]; + s24 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+224]; + s28 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+224]; + s2c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+224] ^ ctrl; + s21 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+224]; + s25 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+224]; + s29 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+224]; + s2d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+224]; + s22 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+224]; + s26 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+224]; + s2a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+224]; + s2e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+224]; + s23 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+224]; + s27 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+224]; + s2b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+224]; + s2f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+224]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 96+224]; + t4 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 97+224]; + t8 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 98+224]; + tc = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 99+224] ^ ctrh; + t1 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[100+224]; + t5 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[101+224]; + t9 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[102+224]; + td = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[103+224]; + t2 = T0[B3(s28)] ^ T1[B2(s29)] ^ T2[B1(s2a)] ^ T3[B0(s2b)] ^ C[104+224]; + t6 = T0[B3(s29)] ^ T1[B2(s2a)] ^ T2[B1(s2b)] ^ T3[B0(s28)] ^ C[105+224]; + ta = T0[B3(s2a)] ^ T1[B2(s2b)] ^ T2[B1(s28)] ^ T3[B0(s29)] ^ C[106+224]; + te = T0[B3(s2b)] ^ T1[B2(s28)] ^ T2[B1(s29)] ^ T3[B0(s2a)] ^ C[107+224]; + t3 = T0[B3(s2c)] ^ T1[B2(s2d)] ^ T2[B1(s2e)] ^ T3[B0(s2f)] ^ C[108+224]; + t7 = T0[B3(s2d)] ^ T1[B2(s2e)] ^ T2[B1(s2f)] ^ T3[B0(s2c)] ^ C[109+224]; + tb = T0[B3(s2e)] ^ T1[B2(s2f)] ^ T2[B1(s2c)] ^ T3[B0(s2d)] ^ C[110+224]; + tf = T0[B3(s2f)] ^ T1[B2(s2c)] ^ T2[B1(s2d)] ^ T3[B0(s2e)] ^ C[111+224]; + + s60 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s64 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s68 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s6c ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s61 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s65 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s69 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s6d ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s62 ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s66 ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s6a ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s6e ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s63 ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s67 ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s6b ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s6f ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 3 */ + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 0+336]; + t4 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 1+336]; + t8 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 2+336]; + tc = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 3+336] ^ ctrl; + t1 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[ 4+336]; + t5 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[ 5+336]; + t9 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[ 6+336]; + td = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[ 7+336]; + t2 = T0[B3(s38)] ^ T1[B2(s39)] ^ T2[B1(s3a)] ^ T3[B0(s3b)] ^ C[ 8+336]; + t6 = T0[B3(s39)] ^ T1[B2(s3a)] ^ T2[B1(s3b)] ^ T3[B0(s38)] ^ C[ 9+336]; + ta = T0[B3(s3a)] ^ T1[B2(s3b)] ^ T2[B1(s38)] ^ T3[B0(s39)] ^ C[ 10+336]; + te = T0[B3(s3b)] ^ T1[B2(s38)] ^ T2[B1(s39)] ^ T3[B0(s3a)] ^ C[ 11+336]; + t3 = T0[B3(s3c)] ^ T1[B2(s3d)] ^ T2[B1(s3e)] ^ T3[B0(s3f)] ^ C[ 12+336]; + t7 = T0[B3(s3d)] ^ T1[B2(s3e)] ^ T2[B1(s3f)] ^ T3[B0(s3c)] ^ C[ 13+336]; + tb = T0[B3(s3e)] ^ T1[B2(s3f)] ^ T2[B1(s3c)] ^ T3[B0(s3d)] ^ C[ 14+336]; + tf = T0[B3(s3f)] ^ T1[B2(s3c)] ^ T2[B1(s3d)] ^ T3[B0(s3e)] ^ C[ 15+336]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+336]; + s34 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+336]; + s38 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+336]; + s3c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+336] ^ ctrh; + s31 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+336]; + s35 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+336]; + s39 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+336]; + s3d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+336]; + s32 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+336]; + s36 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+336]; + s3a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+336]; + s3e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+336]; + s33 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+336]; + s37 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+336]; + s3b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+336]; + s3f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+336]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 32+336]; + t4 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 33+336]; + t8 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 34+336]; + tc = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 35+336] ^ ctrl; + t1 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[ 36+336]; + t5 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[ 37+336]; + t9 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[ 38+336]; + td = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[ 39+336]; + t2 = T0[B3(s38)] ^ T1[B2(s39)] ^ T2[B1(s3a)] ^ T3[B0(s3b)] ^ C[ 40+336]; + t6 = T0[B3(s39)] ^ T1[B2(s3a)] ^ T2[B1(s3b)] ^ T3[B0(s38)] ^ C[ 41+336]; + ta = T0[B3(s3a)] ^ T1[B2(s3b)] ^ T2[B1(s38)] ^ T3[B0(s39)] ^ C[ 42+336]; + te = T0[B3(s3b)] ^ T1[B2(s38)] ^ T2[B1(s39)] ^ T3[B0(s3a)] ^ C[ 43+336]; + t3 = T0[B3(s3c)] ^ T1[B2(s3d)] ^ T2[B1(s3e)] ^ T3[B0(s3f)] ^ C[ 44+336]; + t7 = T0[B3(s3d)] ^ T1[B2(s3e)] ^ T2[B1(s3f)] ^ T3[B0(s3c)] ^ C[ 45+336]; + tb = T0[B3(s3e)] ^ T1[B2(s3f)] ^ T2[B1(s3c)] ^ T3[B0(s3d)] ^ C[ 46+336]; + tf = T0[B3(s3f)] ^ T1[B2(s3c)] ^ T2[B1(s3d)] ^ T3[B0(s3e)] ^ C[ 47+336]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+336]; + s34 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+336]; + s38 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+336]; + s3c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+336] ^ ctrh; + s31 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+336]; + s35 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+336]; + s39 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+336]; + s3d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+336]; + s32 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+336]; + s36 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+336]; + s3a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+336]; + s3e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+336]; + s33 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+336]; + s37 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+336]; + s3b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+336]; + s3f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+336]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 64+336]; + t4 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 65+336]; + t8 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 66+336]; + tc = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 67+336] ^ ctrl; + t1 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[ 68+336]; + t5 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[ 69+336]; + t9 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[ 70+336]; + td = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[ 71+336]; + t2 = T0[B3(s38)] ^ T1[B2(s39)] ^ T2[B1(s3a)] ^ T3[B0(s3b)] ^ C[ 72+336]; + t6 = T0[B3(s39)] ^ T1[B2(s3a)] ^ T2[B1(s3b)] ^ T3[B0(s38)] ^ C[ 73+336]; + ta = T0[B3(s3a)] ^ T1[B2(s3b)] ^ T2[B1(s38)] ^ T3[B0(s39)] ^ C[ 74+336]; + te = T0[B3(s3b)] ^ T1[B2(s38)] ^ T2[B1(s39)] ^ T3[B0(s3a)] ^ C[ 75+336]; + t3 = T0[B3(s3c)] ^ T1[B2(s3d)] ^ T2[B1(s3e)] ^ T3[B0(s3f)] ^ C[ 76+336]; + t7 = T0[B3(s3d)] ^ T1[B2(s3e)] ^ T2[B1(s3f)] ^ T3[B0(s3c)] ^ C[ 77+336]; + tb = T0[B3(s3e)] ^ T1[B2(s3f)] ^ T2[B1(s3c)] ^ T3[B0(s3d)] ^ C[ 78+336]; + tf = T0[B3(s3f)] ^ T1[B2(s3c)] ^ T2[B1(s3d)] ^ T3[B0(s3e)] ^ C[ 79+336]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+336]; + s34 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+336]; + s38 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+336]; + s3c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+336] ^ ctrh; + s31 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+336]; + s35 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+336]; + s39 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+336]; + s3d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+336]; + s32 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+336]; + s36 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+336]; + s3a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+336]; + s3e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+336]; + s33 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+336]; + s37 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+336]; + s3b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+336]; + s3f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+336]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 96+336]; + t4 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 97+336]; + t8 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 98+336]; + tc = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 99+336] ^ ctrl; + t1 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[100+336]; + t5 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[101+336]; + t9 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[102+336]; + td = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[103+336]; + t2 = T0[B3(s38)] ^ T1[B2(s39)] ^ T2[B1(s3a)] ^ T3[B0(s3b)] ^ C[104+336]; + t6 = T0[B3(s39)] ^ T1[B2(s3a)] ^ T2[B1(s3b)] ^ T3[B0(s38)] ^ C[105+336]; + ta = T0[B3(s3a)] ^ T1[B2(s3b)] ^ T2[B1(s38)] ^ T3[B0(s39)] ^ C[106+336]; + te = T0[B3(s3b)] ^ T1[B2(s38)] ^ T2[B1(s39)] ^ T3[B0(s3a)] ^ C[107+336]; + t3 = T0[B3(s3c)] ^ T1[B2(s3d)] ^ T2[B1(s3e)] ^ T3[B0(s3f)] ^ C[108+336]; + t7 = T0[B3(s3d)] ^ T1[B2(s3e)] ^ T2[B1(s3f)] ^ T3[B0(s3c)] ^ C[109+336]; + tb = T0[B3(s3e)] ^ T1[B2(s3f)] ^ T2[B1(s3c)] ^ T3[B0(s3d)] ^ C[110+336]; + tf = T0[B3(s3f)] ^ T1[B2(s3c)] ^ T2[B1(s3d)] ^ T3[B0(s3e)] ^ C[111+336]; + + s70 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s74 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s78 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s7c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s71 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s75 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s79 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s7d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s72 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s76 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s7a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s7e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s73 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s77 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s7b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s7f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 4 */ + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 0+448]; + t4 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 1+448]; + t8 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 2+448]; + tc = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 3+448] ^ ctrh; + t1 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[ 4+448]; + t5 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[ 5+448]; + t9 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[ 6+448]; + td = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[ 7+448]; + t2 = T0[B3(s48)] ^ T1[B2(s49)] ^ T2[B1(s4a)] ^ T3[B0(s4b)] ^ C[ 8+448]; + t6 = T0[B3(s49)] ^ T1[B2(s4a)] ^ T2[B1(s4b)] ^ T3[B0(s48)] ^ C[ 9+448]; + ta = T0[B3(s4a)] ^ T1[B2(s4b)] ^ T2[B1(s48)] ^ T3[B0(s49)] ^ C[ 10+448]; + te = T0[B3(s4b)] ^ T1[B2(s48)] ^ T2[B1(s49)] ^ T3[B0(s4a)] ^ C[ 11+448]; + t3 = T0[B3(s4c)] ^ T1[B2(s4d)] ^ T2[B1(s4e)] ^ T3[B0(s4f)] ^ C[ 12+448]; + t7 = T0[B3(s4d)] ^ T1[B2(s4e)] ^ T2[B1(s4f)] ^ T3[B0(s4c)] ^ C[ 13+448]; + tb = T0[B3(s4e)] ^ T1[B2(s4f)] ^ T2[B1(s4c)] ^ T3[B0(s4d)] ^ C[ 14+448]; + tf = T0[B3(s4f)] ^ T1[B2(s4c)] ^ T2[B1(s4d)] ^ T3[B0(s4e)] ^ C[ 15+448]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+448]; + s44 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+448]; + s48 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+448]; + s4c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+448] ^ ctrl; + s41 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+448]; + s45 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+448]; + s49 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+448]; + s4d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+448]; + s42 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+448]; + s46 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+448]; + s4a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+448]; + s4e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+448]; + s43 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+448]; + s47 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+448]; + s4b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+448]; + s4f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+448]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 32+448]; + t4 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 33+448]; + t8 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 34+448]; + tc = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 35+448] ^ ctrh; + t1 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[ 36+448]; + t5 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[ 37+448]; + t9 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[ 38+448]; + td = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[ 39+448]; + t2 = T0[B3(s48)] ^ T1[B2(s49)] ^ T2[B1(s4a)] ^ T3[B0(s4b)] ^ C[ 40+448]; + t6 = T0[B3(s49)] ^ T1[B2(s4a)] ^ T2[B1(s4b)] ^ T3[B0(s48)] ^ C[ 41+448]; + ta = T0[B3(s4a)] ^ T1[B2(s4b)] ^ T2[B1(s48)] ^ T3[B0(s49)] ^ C[ 42+448]; + te = T0[B3(s4b)] ^ T1[B2(s48)] ^ T2[B1(s49)] ^ T3[B0(s4a)] ^ C[ 43+448]; + t3 = T0[B3(s4c)] ^ T1[B2(s4d)] ^ T2[B1(s4e)] ^ T3[B0(s4f)] ^ C[ 44+448]; + t7 = T0[B3(s4d)] ^ T1[B2(s4e)] ^ T2[B1(s4f)] ^ T3[B0(s4c)] ^ C[ 45+448]; + tb = T0[B3(s4e)] ^ T1[B2(s4f)] ^ T2[B1(s4c)] ^ T3[B0(s4d)] ^ C[ 46+448]; + tf = T0[B3(s4f)] ^ T1[B2(s4c)] ^ T2[B1(s4d)] ^ T3[B0(s4e)] ^ C[ 47+448]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+448]; + s44 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+448]; + s48 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+448]; + s4c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+448] ^ ctrl; + s41 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+448]; + s45 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+448]; + s49 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+448]; + s4d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+448]; + s42 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+448]; + s46 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+448]; + s4a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+448]; + s4e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+448]; + s43 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+448]; + s47 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+448]; + s4b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+448]; + s4f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+448]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 64+448]; + t4 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 65+448]; + t8 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 66+448]; + tc = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 67+448] ^ ctrh; + t1 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[ 68+448]; + t5 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[ 69+448]; + t9 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[ 70+448]; + td = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[ 71+448]; + t2 = T0[B3(s48)] ^ T1[B2(s49)] ^ T2[B1(s4a)] ^ T3[B0(s4b)] ^ C[ 72+448]; + t6 = T0[B3(s49)] ^ T1[B2(s4a)] ^ T2[B1(s4b)] ^ T3[B0(s48)] ^ C[ 73+448]; + ta = T0[B3(s4a)] ^ T1[B2(s4b)] ^ T2[B1(s48)] ^ T3[B0(s49)] ^ C[ 74+448]; + te = T0[B3(s4b)] ^ T1[B2(s48)] ^ T2[B1(s49)] ^ T3[B0(s4a)] ^ C[ 75+448]; + t3 = T0[B3(s4c)] ^ T1[B2(s4d)] ^ T2[B1(s4e)] ^ T3[B0(s4f)] ^ C[ 76+448]; + t7 = T0[B3(s4d)] ^ T1[B2(s4e)] ^ T2[B1(s4f)] ^ T3[B0(s4c)] ^ C[ 77+448]; + tb = T0[B3(s4e)] ^ T1[B2(s4f)] ^ T2[B1(s4c)] ^ T3[B0(s4d)] ^ C[ 78+448]; + tf = T0[B3(s4f)] ^ T1[B2(s4c)] ^ T2[B1(s4d)] ^ T3[B0(s4e)] ^ C[ 79+448]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+448]; + s44 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+448]; + s48 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+448]; + s4c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+448] ^ ctrl; + s41 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+448]; + s45 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+448]; + s49 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+448]; + s4d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+448]; + s42 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+448]; + s46 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+448]; + s4a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+448]; + s4e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+448]; + s43 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+448]; + s47 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+448]; + s4b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+448]; + s4f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+448]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 96+448]; + t4 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 97+448]; + t8 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 98+448]; + tc = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 99+448] ^ ctrh; + t1 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[100+448]; + t5 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[101+448]; + t9 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[102+448]; + td = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[103+448]; + t2 = T0[B3(s48)] ^ T1[B2(s49)] ^ T2[B1(s4a)] ^ T3[B0(s4b)] ^ C[104+448]; + t6 = T0[B3(s49)] ^ T1[B2(s4a)] ^ T2[B1(s4b)] ^ T3[B0(s48)] ^ C[105+448]; + ta = T0[B3(s4a)] ^ T1[B2(s4b)] ^ T2[B1(s48)] ^ T3[B0(s49)] ^ C[106+448]; + te = T0[B3(s4b)] ^ T1[B2(s48)] ^ T2[B1(s49)] ^ T3[B0(s4a)] ^ C[107+448]; + t3 = T0[B3(s4c)] ^ T1[B2(s4d)] ^ T2[B1(s4e)] ^ T3[B0(s4f)] ^ C[108+448]; + t7 = T0[B3(s4d)] ^ T1[B2(s4e)] ^ T2[B1(s4f)] ^ T3[B0(s4c)] ^ C[109+448]; + tb = T0[B3(s4e)] ^ T1[B2(s4f)] ^ T2[B1(s4c)] ^ T3[B0(s4d)] ^ C[110+448]; + tf = T0[B3(s4f)] ^ T1[B2(s4c)] ^ T2[B1(s4d)] ^ T3[B0(s4e)] ^ C[111+448]; + + s70 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s74 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s78 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s7c ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s71 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s75 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s79 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s7d ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s72 ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s76 ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s7a ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s7e ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s73 ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s77 ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s7b ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s7f ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 5 */ + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 0+560]; + t4 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 1+560]; + t8 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 2+560]; + tc = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 3+560] ^ ctrl; + t1 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[ 4+560]; + t5 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[ 5+560]; + t9 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[ 6+560]; + td = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[ 7+560]; + t2 = T0[B3(s58)] ^ T1[B2(s59)] ^ T2[B1(s5a)] ^ T3[B0(s5b)] ^ C[ 8+560]; + t6 = T0[B3(s59)] ^ T1[B2(s5a)] ^ T2[B1(s5b)] ^ T3[B0(s58)] ^ C[ 9+560]; + ta = T0[B3(s5a)] ^ T1[B2(s5b)] ^ T2[B1(s58)] ^ T3[B0(s59)] ^ C[ 10+560]; + te = T0[B3(s5b)] ^ T1[B2(s58)] ^ T2[B1(s59)] ^ T3[B0(s5a)] ^ C[ 11+560]; + t3 = T0[B3(s5c)] ^ T1[B2(s5d)] ^ T2[B1(s5e)] ^ T3[B0(s5f)] ^ C[ 12+560]; + t7 = T0[B3(s5d)] ^ T1[B2(s5e)] ^ T2[B1(s5f)] ^ T3[B0(s5c)] ^ C[ 13+560]; + tb = T0[B3(s5e)] ^ T1[B2(s5f)] ^ T2[B1(s5c)] ^ T3[B0(s5d)] ^ C[ 14+560]; + tf = T0[B3(s5f)] ^ T1[B2(s5c)] ^ T2[B1(s5d)] ^ T3[B0(s5e)] ^ C[ 15+560]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+560]; + s54 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+560]; + s58 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+560]; + s5c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+560] ^ ctrh; + s51 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+560]; + s55 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+560]; + s59 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+560]; + s5d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+560]; + s52 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+560]; + s56 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+560]; + s5a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+560]; + s5e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+560]; + s53 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+560]; + s57 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+560]; + s5b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+560]; + s5f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+560]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 32+560]; + t4 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 33+560]; + t8 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 34+560]; + tc = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 35+560] ^ ctrl; + t1 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[ 36+560]; + t5 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[ 37+560]; + t9 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[ 38+560]; + td = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[ 39+560]; + t2 = T0[B3(s58)] ^ T1[B2(s59)] ^ T2[B1(s5a)] ^ T3[B0(s5b)] ^ C[ 40+560]; + t6 = T0[B3(s59)] ^ T1[B2(s5a)] ^ T2[B1(s5b)] ^ T3[B0(s58)] ^ C[ 41+560]; + ta = T0[B3(s5a)] ^ T1[B2(s5b)] ^ T2[B1(s58)] ^ T3[B0(s59)] ^ C[ 42+560]; + te = T0[B3(s5b)] ^ T1[B2(s58)] ^ T2[B1(s59)] ^ T3[B0(s5a)] ^ C[ 43+560]; + t3 = T0[B3(s5c)] ^ T1[B2(s5d)] ^ T2[B1(s5e)] ^ T3[B0(s5f)] ^ C[ 44+560]; + t7 = T0[B3(s5d)] ^ T1[B2(s5e)] ^ T2[B1(s5f)] ^ T3[B0(s5c)] ^ C[ 45+560]; + tb = T0[B3(s5e)] ^ T1[B2(s5f)] ^ T2[B1(s5c)] ^ T3[B0(s5d)] ^ C[ 46+560]; + tf = T0[B3(s5f)] ^ T1[B2(s5c)] ^ T2[B1(s5d)] ^ T3[B0(s5e)] ^ C[ 47+560]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+560]; + s54 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+560]; + s58 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+560]; + s5c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+560] ^ ctrh; + s51 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+560]; + s55 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+560]; + s59 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+560]; + s5d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+560]; + s52 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+560]; + s56 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+560]; + s5a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+560]; + s5e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+560]; + s53 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+560]; + s57 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+560]; + s5b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+560]; + s5f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+560]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 64+560]; + t4 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 65+560]; + t8 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 66+560]; + tc = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 67+560] ^ ctrl; + t1 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[ 68+560]; + t5 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[ 69+560]; + t9 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[ 70+560]; + td = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[ 71+560]; + t2 = T0[B3(s58)] ^ T1[B2(s59)] ^ T2[B1(s5a)] ^ T3[B0(s5b)] ^ C[ 72+560]; + t6 = T0[B3(s59)] ^ T1[B2(s5a)] ^ T2[B1(s5b)] ^ T3[B0(s58)] ^ C[ 73+560]; + ta = T0[B3(s5a)] ^ T1[B2(s5b)] ^ T2[B1(s58)] ^ T3[B0(s59)] ^ C[ 74+560]; + te = T0[B3(s5b)] ^ T1[B2(s58)] ^ T2[B1(s59)] ^ T3[B0(s5a)] ^ C[ 75+560]; + t3 = T0[B3(s5c)] ^ T1[B2(s5d)] ^ T2[B1(s5e)] ^ T3[B0(s5f)] ^ C[ 76+560]; + t7 = T0[B3(s5d)] ^ T1[B2(s5e)] ^ T2[B1(s5f)] ^ T3[B0(s5c)] ^ C[ 77+560]; + tb = T0[B3(s5e)] ^ T1[B2(s5f)] ^ T2[B1(s5c)] ^ T3[B0(s5d)] ^ C[ 78+560]; + tf = T0[B3(s5f)] ^ T1[B2(s5c)] ^ T2[B1(s5d)] ^ T3[B0(s5e)] ^ C[ 79+560]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+560]; + s54 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+560]; + s58 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+560]; + s5c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+560] ^ ctrh; + s51 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+560]; + s55 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+560]; + s59 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+560]; + s5d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+560]; + s52 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+560]; + s56 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+560]; + s5a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+560]; + s5e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+560]; + s53 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+560]; + s57 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+560]; + s5b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+560]; + s5f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+560]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 96+560]; + t4 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 97+560]; + t8 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 98+560]; + tc = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 99+560] ^ ctrl; + t1 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[100+560]; + t5 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[101+560]; + t9 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[102+560]; + td = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[103+560]; + t2 = T0[B3(s58)] ^ T1[B2(s59)] ^ T2[B1(s5a)] ^ T3[B0(s5b)] ^ C[104+560]; + t6 = T0[B3(s59)] ^ T1[B2(s5a)] ^ T2[B1(s5b)] ^ T3[B0(s58)] ^ C[105+560]; + ta = T0[B3(s5a)] ^ T1[B2(s5b)] ^ T2[B1(s58)] ^ T3[B0(s59)] ^ C[106+560]; + te = T0[B3(s5b)] ^ T1[B2(s58)] ^ T2[B1(s59)] ^ T3[B0(s5a)] ^ C[107+560]; + t3 = T0[B3(s5c)] ^ T1[B2(s5d)] ^ T2[B1(s5e)] ^ T3[B0(s5f)] ^ C[108+560]; + t7 = T0[B3(s5d)] ^ T1[B2(s5e)] ^ T2[B1(s5f)] ^ T3[B0(s5c)] ^ C[109+560]; + tb = T0[B3(s5e)] ^ T1[B2(s5f)] ^ T2[B1(s5c)] ^ T3[B0(s5d)] ^ C[110+560]; + tf = T0[B3(s5f)] ^ T1[B2(s5c)] ^ T2[B1(s5d)] ^ T3[B0(s5e)] ^ C[111+560]; + + s70 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s74 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s78 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s7c ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s71 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s75 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s79 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s7d ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s72 ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s76 ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s7a ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s7e ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s73 ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s77 ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s7b ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s7f ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 6 */ + t0 = T0[B3(s60)] ^ T1[B2(s61)] ^ T2[B1(s62)] ^ T3[B0(s63)] ^ C[ 0+672]; + t4 = T0[B3(s61)] ^ T1[B2(s62)] ^ T2[B1(s63)] ^ T3[B0(s60)] ^ C[ 1+672]; + t8 = T0[B3(s62)] ^ T1[B2(s63)] ^ T2[B1(s60)] ^ T3[B0(s61)] ^ C[ 2+672]; + tc = T0[B3(s63)] ^ T1[B2(s60)] ^ T2[B1(s61)] ^ T3[B0(s62)] ^ C[ 3+672] ^ ctrh; + t1 = T0[B3(s64)] ^ T1[B2(s65)] ^ T2[B1(s66)] ^ T3[B0(s67)] ^ C[ 4+672]; + t5 = T0[B3(s65)] ^ T1[B2(s66)] ^ T2[B1(s67)] ^ T3[B0(s64)] ^ C[ 5+672]; + t9 = T0[B3(s66)] ^ T1[B2(s67)] ^ T2[B1(s64)] ^ T3[B0(s65)] ^ C[ 6+672]; + td = T0[B3(s67)] ^ T1[B2(s64)] ^ T2[B1(s65)] ^ T3[B0(s66)] ^ C[ 7+672]; + t2 = T0[B3(s68)] ^ T1[B2(s69)] ^ T2[B1(s6a)] ^ T3[B0(s6b)] ^ C[ 8+672]; + t6 = T0[B3(s69)] ^ T1[B2(s6a)] ^ T2[B1(s6b)] ^ T3[B0(s68)] ^ C[ 9+672]; + ta = T0[B3(s6a)] ^ T1[B2(s6b)] ^ T2[B1(s68)] ^ T3[B0(s69)] ^ C[ 10+672]; + te = T0[B3(s6b)] ^ T1[B2(s68)] ^ T2[B1(s69)] ^ T3[B0(s6a)] ^ C[ 11+672]; + t3 = T0[B3(s6c)] ^ T1[B2(s6d)] ^ T2[B1(s6e)] ^ T3[B0(s6f)] ^ C[ 12+672]; + t7 = T0[B3(s6d)] ^ T1[B2(s6e)] ^ T2[B1(s6f)] ^ T3[B0(s6c)] ^ C[ 13+672]; + tb = T0[B3(s6e)] ^ T1[B2(s6f)] ^ T2[B1(s6c)] ^ T3[B0(s6d)] ^ C[ 14+672]; + tf = T0[B3(s6f)] ^ T1[B2(s6c)] ^ T2[B1(s6d)] ^ T3[B0(s6e)] ^ C[ 15+672]; + + s60 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+672]; + s64 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+672]; + s68 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+672]; + s6c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+672] ^ ctrl; + s61 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+672]; + s65 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+672]; + s69 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+672]; + s6d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+672]; + s62 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+672]; + s66 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+672]; + s6a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+672]; + s6e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+672]; + s63 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+672]; + s67 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+672]; + s6b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+672]; + s6f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+672]; + + t0 = T0[B3(s60)] ^ T1[B2(s61)] ^ T2[B1(s62)] ^ T3[B0(s63)] ^ C[ 32+672]; + t4 = T0[B3(s61)] ^ T1[B2(s62)] ^ T2[B1(s63)] ^ T3[B0(s60)] ^ C[ 33+672]; + t8 = T0[B3(s62)] ^ T1[B2(s63)] ^ T2[B1(s60)] ^ T3[B0(s61)] ^ C[ 34+672]; + tc = T0[B3(s63)] ^ T1[B2(s60)] ^ T2[B1(s61)] ^ T3[B0(s62)] ^ C[ 35+672] ^ ctrh; + t1 = T0[B3(s64)] ^ T1[B2(s65)] ^ T2[B1(s66)] ^ T3[B0(s67)] ^ C[ 36+672]; + t5 = T0[B3(s65)] ^ T1[B2(s66)] ^ T2[B1(s67)] ^ T3[B0(s64)] ^ C[ 37+672]; + t9 = T0[B3(s66)] ^ T1[B2(s67)] ^ T2[B1(s64)] ^ T3[B0(s65)] ^ C[ 38+672]; + td = T0[B3(s67)] ^ T1[B2(s64)] ^ T2[B1(s65)] ^ T3[B0(s66)] ^ C[ 39+672]; + t2 = T0[B3(s68)] ^ T1[B2(s69)] ^ T2[B1(s6a)] ^ T3[B0(s6b)] ^ C[ 40+672]; + t6 = T0[B3(s69)] ^ T1[B2(s6a)] ^ T2[B1(s6b)] ^ T3[B0(s68)] ^ C[ 41+672]; + ta = T0[B3(s6a)] ^ T1[B2(s6b)] ^ T2[B1(s68)] ^ T3[B0(s69)] ^ C[ 42+672]; + te = T0[B3(s6b)] ^ T1[B2(s68)] ^ T2[B1(s69)] ^ T3[B0(s6a)] ^ C[ 43+672]; + t3 = T0[B3(s6c)] ^ T1[B2(s6d)] ^ T2[B1(s6e)] ^ T3[B0(s6f)] ^ C[ 44+672]; + t7 = T0[B3(s6d)] ^ T1[B2(s6e)] ^ T2[B1(s6f)] ^ T3[B0(s6c)] ^ C[ 45+672]; + tb = T0[B3(s6e)] ^ T1[B2(s6f)] ^ T2[B1(s6c)] ^ T3[B0(s6d)] ^ C[ 46+672]; + tf = T0[B3(s6f)] ^ T1[B2(s6c)] ^ T2[B1(s6d)] ^ T3[B0(s6e)] ^ C[ 47+672]; + + h[ 0] = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + h[ 4] = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + h[ 8] = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + h[12] = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + h[ 1] = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + h[ 5] = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + h[ 9] = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + h[13] = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + h[ 2] = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + h[ 6] = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + h[10] = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + h[14] = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + h[ 3] = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + h[ 7] = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + h[11] = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + h[15] = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 7 */ + t0 = T0[B3(s70)] ^ T1[B2(s71)] ^ T2[B1(s72)] ^ T3[B0(s73)] ^ C[ 0+720]; + t4 = T0[B3(s71)] ^ T1[B2(s72)] ^ T2[B1(s73)] ^ T3[B0(s70)] ^ C[ 1+720]; + t8 = T0[B3(s72)] ^ T1[B2(s73)] ^ T2[B1(s70)] ^ T3[B0(s71)] ^ C[ 2+720]; + tc = T0[B3(s73)] ^ T1[B2(s70)] ^ T2[B1(s71)] ^ T3[B0(s72)] ^ C[ 3+720] ^ ctrl; + t1 = T0[B3(s74)] ^ T1[B2(s75)] ^ T2[B1(s76)] ^ T3[B0(s77)] ^ C[ 4+720]; + t5 = T0[B3(s75)] ^ T1[B2(s76)] ^ T2[B1(s77)] ^ T3[B0(s74)] ^ C[ 5+720]; + t9 = T0[B3(s76)] ^ T1[B2(s77)] ^ T2[B1(s74)] ^ T3[B0(s75)] ^ C[ 6+720]; + td = T0[B3(s77)] ^ T1[B2(s74)] ^ T2[B1(s75)] ^ T3[B0(s76)] ^ C[ 7+720]; + t2 = T0[B3(s78)] ^ T1[B2(s79)] ^ T2[B1(s7a)] ^ T3[B0(s7b)] ^ C[ 8+720]; + t6 = T0[B3(s79)] ^ T1[B2(s7a)] ^ T2[B1(s7b)] ^ T3[B0(s78)] ^ C[ 9+720]; + ta = T0[B3(s7a)] ^ T1[B2(s7b)] ^ T2[B1(s78)] ^ T3[B0(s79)] ^ C[ 10+720]; + te = T0[B3(s7b)] ^ T1[B2(s78)] ^ T2[B1(s79)] ^ T3[B0(s7a)] ^ C[ 11+720]; + t3 = T0[B3(s7c)] ^ T1[B2(s7d)] ^ T2[B1(s7e)] ^ T3[B0(s7f)] ^ C[ 12+720]; + t7 = T0[B3(s7d)] ^ T1[B2(s7e)] ^ T2[B1(s7f)] ^ T3[B0(s7c)] ^ C[ 13+720]; + tb = T0[B3(s7e)] ^ T1[B2(s7f)] ^ T2[B1(s7c)] ^ T3[B0(s7d)] ^ C[ 14+720]; + tf = T0[B3(s7f)] ^ T1[B2(s7c)] ^ T2[B1(s7d)] ^ T3[B0(s7e)] ^ C[ 15+720]; + + s70 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+720]; + s74 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+720]; + s78 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+720]; + s7c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+720] ^ ctrh; + s71 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+720]; + s75 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+720]; + s79 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+720]; + s7d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+720]; + s72 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+720]; + s76 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+720]; + s7a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+720]; + s7e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+720]; + s73 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+720]; + s77 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+720]; + s7b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+720]; + s7f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+720]; + + t0 = T0[B3(s70)] ^ T1[B2(s71)] ^ T2[B1(s72)] ^ T3[B0(s73)] ^ C[ 32+720]; + t4 = T0[B3(s71)] ^ T1[B2(s72)] ^ T2[B1(s73)] ^ T3[B0(s70)] ^ C[ 33+720]; + t8 = T0[B3(s72)] ^ T1[B2(s73)] ^ T2[B1(s70)] ^ T3[B0(s71)] ^ C[ 34+720]; + tc = T0[B3(s73)] ^ T1[B2(s70)] ^ T2[B1(s71)] ^ T3[B0(s72)] ^ C[ 35+720] ^ ctrl; + t1 = T0[B3(s74)] ^ T1[B2(s75)] ^ T2[B1(s76)] ^ T3[B0(s77)] ^ C[ 36+720]; + t5 = T0[B3(s75)] ^ T1[B2(s76)] ^ T2[B1(s77)] ^ T3[B0(s74)] ^ C[ 37+720]; + t9 = T0[B3(s76)] ^ T1[B2(s77)] ^ T2[B1(s74)] ^ T3[B0(s75)] ^ C[ 38+720]; + td = T0[B3(s77)] ^ T1[B2(s74)] ^ T2[B1(s75)] ^ T3[B0(s76)] ^ C[ 39+720]; + t2 = T0[B3(s78)] ^ T1[B2(s79)] ^ T2[B1(s7a)] ^ T3[B0(s7b)] ^ C[ 40+720]; + t6 = T0[B3(s79)] ^ T1[B2(s7a)] ^ T2[B1(s7b)] ^ T3[B0(s78)] ^ C[ 41+720]; + ta = T0[B3(s7a)] ^ T1[B2(s7b)] ^ T2[B1(s78)] ^ T3[B0(s79)] ^ C[ 42+720]; + te = T0[B3(s7b)] ^ T1[B2(s78)] ^ T2[B1(s79)] ^ T3[B0(s7a)] ^ C[ 43+720]; + t3 = T0[B3(s7c)] ^ T1[B2(s7d)] ^ T2[B1(s7e)] ^ T3[B0(s7f)] ^ C[ 44+720]; + t7 = T0[B3(s7d)] ^ T1[B2(s7e)] ^ T2[B1(s7f)] ^ T3[B0(s7c)] ^ C[ 45+720]; + tb = T0[B3(s7e)] ^ T1[B2(s7f)] ^ T2[B1(s7c)] ^ T3[B0(s7d)] ^ C[ 46+720]; + tf = T0[B3(s7f)] ^ T1[B2(s7c)] ^ T2[B1(s7d)] ^ T3[B0(s7e)] ^ C[ 47+720]; + + h[ 0] ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + h[ 4] ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + h[ 8] ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + h[12] ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + h[ 1] ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + h[ 5] ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + h[ 9] ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + h[13] ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + h[ 2] ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + h[ 6] ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + h[10] ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + h[14] ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + h[ 3] ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + h[ 7] ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + h[11] ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + h[15] ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; +} + +HashReturn laneInit (hashState *state, int hashbitlen) +{ + if (hashbitlen != 224 && hashbitlen != 256 && hashbitlen != 384 && hashbitlen != 512) + return BAD_HASHBITLEN; + + state->hashbitlen = hashbitlen; + state->ctr = 0; + + switch (state->hashbitlen) { + case 224: + memcpy(state->h, iv224, 8*sizeof(u32)); + break; + case 256: default: + memcpy(state->h, iv256, 8*sizeof(u32)); + break; + case 384: + memcpy(state->h, iv384, 16*sizeof(u32)); + break; + case 512: + memcpy(state->h, iv512, 16*sizeof(u32)); + break; + } + + return SUCCESS; +} + +HashReturn laneUpdate (hashState *state, const BitSequence *data, DataLength databitlen) +{ + u64 buffill; + u64 bytes; + + switch (state->hashbitlen) { + case 224: case 256: default: + buffill = (state->ctr >> 3) & 0x3f; + bytes = databitlen >> 3; + + if (state->ctr & 0x7) + return BAD_DATABITLEN; /* Only the last call to Update() may contain a fractional byte */ + + /* Check if we have some stuff left in the buffer. If so, fill it, and process it */ + if (buffill) { + const u64 n = buffill + bytes > 64 ? 64-buffill : bytes; /* number of bytes to copy */ + memcpy(state->buffer + buffill, data, n); + state->ctr += n << 3; + if (buffill + n == 64) /* full buffer now */ + lane256_compress(state->buffer, state->h, MSB32(state->ctr), LSB32(state->ctr)); + data += n; + bytes -= n; + } + + /* Now process as many full blocks as we can directly from the input message */ + while (bytes >= 64) { + state->ctr += 64 << 3; + lane256_compress(data, state->h, MSB32(state->ctr), LSB32(state->ctr)); + data += 64; + bytes -= 64; + } + break; + + case 384: case 512: + buffill = (state->ctr >> 3) & 0x7f; + bytes = databitlen >> 3; + + if (state->ctr & 0x7) + return BAD_DATABITLEN; /* Only the last call to Update() may contain a fractional byte */ + + /* Check if we have some stuff left in the buffer. If so, fill it, and process it */ + if (buffill) { + const u64 n = buffill + bytes > 128 ? 128-buffill : bytes; /* number of bytes to copy */ + memcpy(state->buffer + buffill, data, n); + state->ctr += n << 3; + if (buffill + n == 128) /* full buffer now */ + lane512_compress(state->buffer, state->h, MSB32(state->ctr), LSB32(state->ctr)); + data += n; + bytes -= n; + } + + /* Now process as many full blocks as we can directly from the input message */ + while (bytes >= 128) { + state->ctr += 128 << 3; + lane512_compress(data, state->h, MSB32(state->ctr), LSB32(state->ctr)); + data += 128; + bytes -= 128; + } + break; + } + + /* And finally, save the last, incomplete message block */ + if (bytes || (databitlen & 0x7)) { + memcpy(state->buffer, data, databitlen & 0x7 ? bytes+1 : bytes); /* also copy partial byte */ + state->ctr += (bytes << 3) + (databitlen & 0x7); + } + + return SUCCESS; +} + +HashReturn laneFinal (hashState *state, BitSequence *hashval) +{ + + switch (state->hashbitlen) { + case 224: case 256: default: + /* do zero padding and compress last block, if there is some data in the buffer */ + if (state->ctr & 0x1ff) { + const u64 n = (((state->ctr & 0x1ff) - 1) >> 3) + 1; /* number of bytes in buffer that are (partially) filled */ + if (n < 64) + memset(state->buffer + n, 0, 64-n); + state->buffer[(state->ctr >> 3)&0x3f] &= ~(0xff >> (state->ctr & 0x7)); /* zero-pad partial byte */ + lane256_compress(state->buffer, state->h, MSB32(state->ctr), LSB32(state->ctr)); + } + + /* output transformation */ + memset(state->buffer, 0, 64); + state->buffer[0] = 0x00; /* flag byte 0x00: output transformation without seed */ + state->buffer[1] = T8(state->ctr >> 56); /* message length in big-endian */ + state->buffer[2] = T8(state->ctr >> 48); + state->buffer[3] = T8(state->ctr >> 40); + state->buffer[4] = T8(state->ctr >> 32); + state->buffer[5] = T8(state->ctr >> 24); + state->buffer[6] = T8(state->ctr >> 16); + state->buffer[7] = T8(state->ctr >> 8); + state->buffer[8] = T8(state->ctr >> 0); + lane256_compress(state->buffer, state->h, 0, 0); + + /* write back result */ + U32TO8_BIG(hashval, state->h[0]); + U32TO8_BIG(hashval+4, state->h[1]); + U32TO8_BIG(hashval+8, state->h[2]); + U32TO8_BIG(hashval+12, state->h[3]); + U32TO8_BIG(hashval+16, state->h[4]); + U32TO8_BIG(hashval+20, state->h[5]); + U32TO8_BIG(hashval+24, state->h[6]); + U32TO8_BIG(hashval+28, state->h[7]); + + break; + + case 384: case 512: + /* do zero padding and compress last block, if there is some data in the buffer */ + if (state->ctr & 0x3ff) { + const u64 n = (((state->ctr & 0x3ff) - 1) >> 3) + 1; /* number of bytes in buffer that are (partially) filled */ + if (n < 128) + memset(state->buffer + n, 0, 128-n); + state->buffer[(state->ctr >> 3)&0x7f] &= ~(0xff >> (state->ctr & 0x7)); /* zero-pad partial byte */ + lane512_compress(state->buffer, state->h, MSB32(state->ctr), LSB32(state->ctr)); + } + + /* output transformation */ + memset(state->buffer, 0, 128); + state->buffer[0] = 0x00; /* flag byte 0x00: output transformation without seed */ + state->buffer[1] = T8(state->ctr >> 56); /* message length in big-endian */ + state->buffer[2] = T8(state->ctr >> 48); + state->buffer[3] = T8(state->ctr >> 40); + state->buffer[4] = T8(state->ctr >> 32); + state->buffer[5] = T8(state->ctr >> 24); + state->buffer[6] = T8(state->ctr >> 16); + state->buffer[7] = T8(state->ctr >> 8); + state->buffer[8] = T8(state->ctr >> 0); + lane512_compress(state->buffer, state->h, 0, 0); + + /* write back result */ + U32TO8_BIG(hashval, state->h[0]); + U32TO8_BIG(hashval+4, state->h[1]); + U32TO8_BIG(hashval+8, state->h[2]); + U32TO8_BIG(hashval+12, state->h[3]); + U32TO8_BIG(hashval+16, state->h[4]); + U32TO8_BIG(hashval+20, state->h[5]); + U32TO8_BIG(hashval+24, state->h[6]); + U32TO8_BIG(hashval+28, state->h[7]); + U32TO8_BIG(hashval+32, state->h[8]); + U32TO8_BIG(hashval+36, state->h[9]); + U32TO8_BIG(hashval+40, state->h[10]); + U32TO8_BIG(hashval+44, state->h[11]); + U32TO8_BIG(hashval+48, state->h[12]); + U32TO8_BIG(hashval+52, state->h[13]); + U32TO8_BIG(hashval+56, state->h[14]); + U32TO8_BIG(hashval+60, state->h[15]); + + break; + } + + return SUCCESS; +} + +HashReturn laneHash (int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval) +{ + hashState state; + HashReturn hashReturn; + + if ((hashReturn = laneInit(&state, hashbitlen)) != SUCCESS) + return hashReturn; + if ((hashReturn = laneUpdate(&state, data, databitlen)) != SUCCESS) + return hashReturn; + if ((hashReturn = laneFinal(&state, hashval)) != SUCCESS) + return hashReturn; + return SUCCESS; +} diff --git a/stratum/algos/lane.h b/stratum/algos/lane.h new file mode 100644 index 000000000..1d935a171 --- /dev/null +++ b/stratum/algos/lane.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2008 Sebastiaan Indesteege + * + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Optimised ANSI-C implementation of LANE + */ + +#ifndef LANE_H +#define LANE_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#include + +typedef unsigned char BitSequence; +typedef unsigned long long DataLength; + +typedef enum { SUCCESS = 0, FAIL = 1, BAD_HASHBITLEN = 2, BAD_DATABITLEN = 3 } HashReturn; + +typedef unsigned char u8; +typedef unsigned int u32; +typedef unsigned long long u64; + +typedef struct { + int hashbitlen; + u64 ctr; + u32 h[16]; + u8 buffer[128]; +} hashState; + +HashReturn laneInit (hashState *state, int hashbitlen); +HashReturn laneUpdate (hashState *state, const BitSequence *data, DataLength databitlen); +HashReturn laneFinal (hashState *state, BitSequence *hashval); +HashReturn laneHash (int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval); + +#if defined(__cplusplus) +} +#endif + +#endif /* LANE_H */ diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 48a9c32ec..4c5f30f07 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -10,7 +10,7 @@ LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ - x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c \ + x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index f97e4e574..48a9c32ec 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -49,3 +49,4 @@ clean: rm -f ar2/*.o rm -f blake2/*.o rm -f SWIFFTX/*.o + rm -f rfv2/*.o diff --git a/stratum/algos/x25x.c b/stratum/algos/x25x.c new file mode 100644 index 000000000..0b3076d11 --- /dev/null +++ b/stratum/algos/x25x.c @@ -0,0 +1,174 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SWIFFTX/SWIFFTX.h" +#include "lane.h" +#include "gost.h" +#include "Lyra2.h" + +#include "common.h" + +void x25x_hash(const char* input, char* output, uint32_t len) +{ + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_skein512_context ctx_skein; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_haval256_5_context ctx_haval; + sph_tiger_context ctx_tiger; + sph_gost512_context ctx_gost; + sph_sha256_context ctx_sha; + sph_panama_context ctx_panama; + +// unsigned char _ALIGN(128) hash[25][64] = { [0 ... 24] = { [0 ... 63] = 0 } }; + unsigned char _ALIGN(128) hash[25][64] = { 0 }; + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, &hash[0]); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, &hash[0], 64); + sph_bmw512_close(&ctx_bmw, &hash[1]); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, &hash[1], 64); + sph_groestl512_close(&ctx_groestl, &hash[2]); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, &hash[2], 64); + sph_skein512_close(&ctx_skein, &hash[3]); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, &hash[3], 64); + sph_jh512_close(&ctx_jh, &hash[4]); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, &hash[4], 64); + sph_keccak512_close(&ctx_keccak, &hash[5]); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, &hash[5], 64); + sph_luffa512_close (&ctx_luffa, &hash[6]); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, &hash[6], 64); + sph_cubehash512_close(&ctx_cubehash, &hash[7]); + + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, &hash[7], 64); + sph_shavite512_close(&ctx_shavite, &hash[8]); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, &hash[8], 64); + sph_simd512_close(&ctx_simd, &hash[9]); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, &hash[9], 64); + sph_echo512_close(&ctx_echo, &hash[10]); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, &hash[10], 64); + sph_hamsi512_close(&ctx_hamsi, &hash[11]); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, &hash[11], 64); + sph_fugue512_close(&ctx_fugue, &hash[12]); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, (const void*) &hash[12], 64); + sph_shabal512_close(&ctx_shabal, &hash[13]); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool (&ctx_whirlpool, (const void*) &hash[13], 64); + sph_whirlpool_close(&ctx_whirlpool, &hash[14]); + + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) &hash[14], 64); + sph_sha512_close(&ctx_sha512,(void*) &hash[15]); + + unsigned char temp[SWIFFTX_OUTPUT_BLOCK_SIZE] = {0}; + InitializeSWIFFTX(); + ComputeSingleSWIFFTX((unsigned char*)&hash[12], temp, false); + memcpy((unsigned char*)&hash[16], temp, 64); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval,(const void*) &hash[16], 64); + sph_haval256_5_close(&ctx_haval,&hash[17]); + + sph_tiger_init(&ctx_tiger); + sph_tiger (&ctx_tiger, (const void*) &hash[17], 64); + sph_tiger_close(&ctx_tiger, (void*) &hash[18]); + + LYRA2((void*) &hash[19], 32, (const void*) &hash[18], 32, (const void*) &hash[18], 32, 1, 4, 4); + + sph_gost512_init(&ctx_gost); + sph_gost512 (&ctx_gost, (const void*) &hash[19], 64); + sph_gost512_close(&ctx_gost, (void*) &hash[20]); + + sph_sha256_init(&ctx_sha); + sph_sha256 (&ctx_sha, (const void*) &hash[20], 64); + sph_sha256_close(&ctx_sha, (void*) &hash[21]); + + sph_panama_init(&ctx_panama); + sph_panama (&ctx_panama, (const void*) &hash[21], 64 ); + sph_panama_close(&ctx_panama, (void*) &hash[22]); + + laneHash(512, (const BitSequence*) &hash[22], 512, (BitSequence*) &hash[23]); + + // NEW simple shuffle algorithm, instead of just reversing + #define X25X_SHUFFLE_BLOCKS (24 /* number of algos so far */ * 64 /* output bytes per algo */ / 2 /* block size */) + #define X25X_SHUFFLE_ROUNDS 12 + + static const uint16_t x25x_round_const[X25X_SHUFFLE_ROUNDS] = { + 0x142c, 0x5830, 0x678c, 0xe08c, + 0x3c67, 0xd50d, 0xb1d8, 0xecb2, + 0xd7ee, 0x6783, 0xfa6c, 0x4b9c + }; + + uint16_t* block_pointer = (uint16_t*)hash; + for (int r = 0; r < X25X_SHUFFLE_ROUNDS; r++) { + for (int i = 0; i < X25X_SHUFFLE_BLOCKS; i++) { + uint16_t block_value = block_pointer[X25X_SHUFFLE_BLOCKS - i - 1]; + block_pointer[i] ^= block_pointer[block_value % X25X_SHUFFLE_BLOCKS] + (x25x_round_const[r] << (i % 16)); + } + } + + blake2s_simple((uint8_t*)&hash[24], (const void*)(&hash[0]), 64 * 24); + + memcpy(output, &hash[24], 32); +} diff --git a/stratum/algos/x25x.h b/stratum/algos/x25x.h new file mode 100644 index 000000000..31dd18d30 --- /dev/null +++ b/stratum/algos/x25x.h @@ -0,0 +1,11 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x25x_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif diff --git a/stratum/client_difficulty.cpp.bak b/stratum/client_difficulty.cpp.bak deleted file mode 100644 index fed72fd5b..000000000 --- a/stratum/client_difficulty.cpp.bak +++ /dev/null @@ -1,106 +0,0 @@ - -#include "stratum.h" - -double client_normalize_difficulty(double difficulty) -{ - if(difficulty < g_stratum_min_diff) difficulty = g_stratum_min_diff; - else if(difficulty < 1) difficulty = floor(difficulty*1000/2)/1000*2; - else if(difficulty > 1) difficulty = floor(difficulty/2)*2; - if(difficulty > g_stratum_max_diff) difficulty = g_stratum_max_diff; - return difficulty; -} - -void client_record_difficulty(YAAMP_CLIENT *client) -{ - if(client->difficulty_remote) - { - client->last_submit_time = current_timestamp(); - return; - } - - int e = current_timestamp() - client->last_submit_time; - if(e < 500) e = 500; - int p = 5; - - client->shares_per_minute = (client->shares_per_minute * (100 - p) + 60*1000*p/e) / 100; - client->last_submit_time = current_timestamp(); - -// debuglog("client->shares_per_minute %f\n", client->shares_per_minute); -} - -void client_change_difficulty(YAAMP_CLIENT *client, double difficulty) -{ - if(difficulty <= 0) return; - - difficulty = client_normalize_difficulty(difficulty); - if(difficulty <= 0) return; - -// debuglog("change diff to %f %f\n", difficulty, client->difficulty_actual); - if(difficulty == client->difficulty_actual) return; - - uint64_t user_target = diff_to_target(difficulty); - if(user_target >= YAAMP_MINDIFF && user_target <= YAAMP_MAXDIFF) - { - client->difficulty_actual = difficulty; - client_send_difficulty(client, difficulty); - } -} - -void client_adjust_difficulty(YAAMP_CLIENT *client) -{ - if(client->difficulty_remote) { - client_change_difficulty(client, client->difficulty_remote); - return; - } - - if(client->shares_per_minute > 100) - client_change_difficulty(client, client->difficulty_actual*4); - - else if(client->difficulty_fixed) - return; - - else if(client->shares_per_minute > 25) - client_change_difficulty(client, client->difficulty_actual*2); - - else if(client->shares_per_minute > 20) - client_change_difficulty(client, client->difficulty_actual*1.5); - - else if(client->shares_per_minute < 5) - client_change_difficulty(client, client->difficulty_actual/2); -} - -int client_send_difficulty(YAAMP_CLIENT *client, double difficulty) -{ -// debuglog("%s diff %f\n", client->sock->ip, difficulty); - client->shares_per_minute = YAAMP_SHAREPERSEC; - - if(difficulty >= 1) - client_call(client, "mining.set_difficulty", "[%.0f]", difficulty); - else - client_call(client, "mining.set_difficulty", "[%.8f]", difficulty); - return 0; -} - -void client_initialize_difficulty(YAAMP_CLIENT *client) -{ - char *p = strstr(client->password, "d="); - char *p2 = strstr(client->password, "decred="); - if(!p || p2) return; - - double diff = client_normalize_difficulty(atof(p+2)); - uint64_t user_target = diff_to_target(diff); - -// debuglog("%016llx target\n", user_target); - if(user_target >= YAAMP_MINDIFF && user_target <= YAAMP_MAXDIFF) - { - client->difficulty_actual = diff; - client->difficulty_fixed = true; - } - -} - - - - - - diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak deleted file mode 100644 index 942c9886f..000000000 --- a/stratum/client_submit.cpp.bak +++ /dev/null @@ -1,594 +0,0 @@ - -#include "stratum.h" - -uint64_t lyra2z_height = 0; - -//#define MERKLE_DEBUGLOG -//#define DONTSUBMIT - -void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, - const char *nonce1, const char *nonce2, const char *ntime, const char *nonce) -{ - sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); - int coinbase_len = strlen(submitvalues->coinbase); - - unsigned char coinbase_bin[1024]; - memset(coinbase_bin, 0, 1024); - binlify(coinbase_bin, submitvalues->coinbase); - - char doublehash[128]; - memset(doublehash, 0, 128); - - // some (old) wallet/algos need a simple SHA256 (blakecoin, whirlcoin, groestlcoin...) - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - if (g_current_algo->merkle_func) - merkle_hash = g_current_algo->merkle_func; - merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); - - string merkleroot = merkle_with_first(templ->txsteps, doublehash); - ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); - -#ifdef MERKLE_DEBUGLOG - printf("merkle root %s\n", merkleroot.c_str()); -#endif - if (!strcmp(g_current_algo->name, "lbry")) { - sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - templ->claim_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 32 + 20); - } else { - sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 20); - } - - binlify(submitvalues->header_bin, submitvalues->header_be); - -// printf("%s\n", submitvalues->header_be); - int header_len = strlen(submitvalues->header)/2; - g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); - - hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); - string_be(submitvalues->hash_hex, submitvalues->hash_be); -} - -///////////////////////////////////////////// - -static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *out, - const char *ntime, const char *nonce, const char *nonce2, const char *vote, bool usegetwork) -{ - struct __attribute__((__packed__)) { - uint32_t version; - char prevblock[32]; - char merkleroot[32]; - char stakeroot[32]; - uint16_t votebits; - char finalstate[6]; - uint16_t voters; - uint8_t freshstake; - uint8_t revoc; - uint32_t poolsize; - uint32_t nbits; - uint64_t sbits; - uint32_t height; - uint32_t size; - uint32_t ntime; - uint32_t nonce; - unsigned char extra[32]; - uint32_t stakever; - uint32_t hashtag[3]; - } header; - - memcpy(&header, templ->header, sizeof(header)); - - memset(header.extra, 0, 32); - sscanf(nonce, "%08x", &header.nonce); - - if (strcmp(vote, "")) { - uint16_t votebits = 0; - sscanf(vote, "%04hx", &votebits); - header.votebits = (header.votebits & 1) | (votebits & 0xfffe); - } - - binlify(header.extra, nonce2); - - hexlify(out->header, (const unsigned char*) &header, 180); - memcpy(out->header_bin, &header, sizeof(header)); -} - -static void build_submit_values_decred(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, - const char *nonce1, const char *nonce2, const char *ntime, const char *nonce, const char *vote, bool usegetwork) -{ - if (!usegetwork) { - // not used yet - char doublehash[128] = { 0 }; - - sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); - int coinbase_len = strlen(submitvalues->coinbase); - - unsigned char coinbase_bin[1024]; - memset(coinbase_bin, 0, 1024); - binlify(coinbase_bin, submitvalues->coinbase); - - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - if (g_current_algo->merkle_func) - merkle_hash = g_current_algo->merkle_func; - merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); - - string merkleroot = merkle_with_first(templ->txsteps, doublehash); - ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); - -#ifdef MERKLE_DEBUGLOG - printf("merkle root %s\n", merkleroot.c_str()); -#endif - } - create_decred_header(templ, submitvalues, ntime, nonce, nonce2, vote, usegetwork); - - int header_len = strlen(submitvalues->header)/2; - g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); - - hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); - string_be(submitvalues->hash_hex, submitvalues->hash_be); -} - -///////////////////////////////////////////////////////////////////////////////// - -static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VALUES *submitvalues, - char *extranonce2, char *ntime, char *nonce, char *vote) -{ - YAAMP_COIND *coind = job->coind; - YAAMP_JOB_TEMPLATE *templ = job->templ; - - if(job->block_found) return; - if(job->deleted) return; - - uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); - uint64_t coin_target = decode_compact(templ->nbits); - if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - // please forgive me for this hack jebus - if (strstr(g_current_algo->name,"balloon") && - (submitvalues->hash_bin[30] | submitvalues->hash_bin[31])) - coin_target = 0x0; - - int block_size = YAAMP_SMALLBUFSIZE; - vector::const_iterator i; - - for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) - block_size += strlen((*i).c_str()); - - char *block_hex = (char *)malloc(block_size); - if(!block_hex) return; - - // do aux first - for(int i=0; iauxs_size; i++) - { - if(!templ->auxs[i]) continue; - YAAMP_COIND *coind_aux = templ->auxs[i]->coind; - - if(!coind_aux || !strcmp(coind->symbol, coind_aux->symbol2)) - continue; - - unsigned char target_aux[1024]; - binlify(target_aux, coind_aux->aux.target); - - uint64_t coin_target_aux = get_hash_difficulty(target_aux); - if(hash_int <= coin_target_aux) - { - memset(block_hex, 0, block_size); - - strcat(block_hex, submitvalues->coinbase); // parent coinbase - strcat(block_hex, submitvalues->hash_be); // parent hash - - ////////////////////////////////////////////////// parent merkle steps - - sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)templ->txsteps.size()); - - vector::const_iterator i; - for(i = templ->txsteps.begin(); i != templ->txsteps.end(); ++i) - sprintf(block_hex + strlen(block_hex), "%s", (*i).c_str()); - - strcat(block_hex, "00000000"); - - ////////////////////////////////////////////////// auxs merkle steps - - vector lresult = coind_aux_merkle_branch(templ->auxs, templ->auxs_size, coind_aux->aux.index); - sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)lresult.size()); - - for(i = lresult.begin(); i != lresult.end(); ++i) - sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); - - sprintf(block_hex+strlen(block_hex), "%02x000000", (unsigned char)coind_aux->aux.index); - - ////////////////////////////////////////////////// parent header - - strcat(block_hex, submitvalues->header_be); - - bool b = coind_submitgetauxblock(coind_aux, coind_aux->aux.hash, block_hex); - if(b) - { - debuglog("*** ACCEPTED %s %d (+1)\n", coind_aux->name, coind_aux->height); - - block_add(client->userid, client->workerid, coind_aux->id, coind_aux->height, target_to_diff(coin_target_aux), - target_to_diff(hash_int), coind_aux->aux.hash, "", 0); - } - - else - debuglog("%s %d REJECTED\n", coind_aux->name, coind_aux->height); - } - } - - if(hash_int <= coin_target) - { - char count_hex[8] = { 0 }; - if (templ->txcount <= 252) - sprintf(count_hex, "%02x", templ->txcount & 0xFF); - else - sprintf(count_hex, "fd%02x%02x", templ->txcount & 0xFF, templ->txcount >> 8); - - memset(block_hex, 0, block_size); - sprintf(block_hex, "%s%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); - - if (g_current_algo->name && !strcmp("jha", g_current_algo->name)) { - // block header of 88 bytes - sprintf(block_hex, "%s8400000008000000%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); - } - - vector::const_iterator i; - for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) - sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); - - // POS coins need a zero byte appended to block, the daemon replaces it with the signature - if(coind->pos) - strcat(block_hex, "00"); - - if(!strcmp("DCR", coind->rpcencoding)) { - // submit the regenerated block header - char hex[384]; - hexlify(hex, submitvalues->header_bin, 180); - if (coind->usegetwork) - snprintf(block_hex, block_size, "%s8000000100000000000005a0", hex); - else - snprintf(block_hex, block_size, "%s", hex); - } - - if(g_current_algo->name && !strcmp("ZBIT", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } - if(g_current_algo->name && !strcmp("MLS", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } - - bool b = coind_submit(coind, block_hex); - if(b) - { - debuglog("*** ACCEPTED %s %d (diff %g) by %s (id: %d)\n", coind->name, templ->height, - target_to_diff(hash_int), client->sock->ip, client->userid); - - job->block_found = true; - - char doublehash2[128]; - memset(doublehash2, 0, 128); - - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - //if (g_current_algo->merkle_func) - // merkle_hash = g_current_algo->merkle_func; - - merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - - char hash1[1024]; - memset(hash1, 0, 1024); - - string_be(doublehash2, hash1); - - if(coind->usegetwork && !strcmp("DCR", coind->rpcencoding)) { - // no merkle stuff - strcpy(hash1, submitvalues->hash_hex); - } - - block_add(client->userid, client->workerid, coind->id, templ->height, - target_to_diff(coin_target), target_to_diff(hash_int), - hash1, submitvalues->hash_be, templ->has_segwit_txs); - - if(!strcmp("DCR", coind->rpcencoding)) { - // delay between dcrd and dcrwallet - sleep(1); - } - - if(!strcmp(coind->lastnotifyhash,submitvalues->hash_be)) { - block_confirm(coind->id, submitvalues->hash_be); - } - - if (g_debuglog_hash) { - debuglog("--------------------------------------------------------------\n"); - debuglog("hash1 %s\n", hash1); - debuglog("hash2 %s\n", submitvalues->hash_be); - } - } - - else { - debuglog("*** REJECTED :( %s block %d %d txs\n", coind->name, templ->height, templ->txcount); - rejectlog("REJECTED %s block %d\n", coind->symbol, templ->height); - if (g_debuglog_hash) { - //debuglog("block %s\n", block_hex); - debuglog("--------------------------------------------------------------\n"); - } - } - } - - free(block_hex); -} - -bool dump_submit_debug(const char *title, YAAMP_CLIENT *client, YAAMP_JOB *job, char *extranonce2, char *ntime, char *nonce) -{ - debuglog("ERROR %s, %s subs %d, job %x, %s, id %x, %d, %s, %s %s\n", - title, client->sock->ip, client->extranonce_subscribe, job? job->id: 0, client->extranonce1, - client->extranonce1_id, client->extranonce2size, extranonce2, ntime, nonce); -} - -void client_submit_error(YAAMP_CLIENT *client, YAAMP_JOB *job, int id, const char *message, char *extranonce2, char *ntime, char *nonce) -{ -// if(job->templ->created+2 > time(NULL)) - if(job && job->deleted) - client_send_result(client, "true"); - - else - { - client_send_error(client, id, message); - share_add(client, job, false, extranonce2, ntime, nonce, 0, id); - - client->submit_bad++; - if (g_debuglog_hash) { - dump_submit_debug(message, client, job, extranonce2, ntime, nonce); - } - } - - object_unlock(job); -} - -static bool ntime_valid_range(const char ntimehex[]) -{ - time_t rawtime = 0; - uint32_t ntime = 0; - if (strlen(ntimehex) != 8) return false; - sscanf(ntimehex, "%8x", &ntime); - if (ntime < 0x5b000000 || ntime > 0x60000000) // 14 Jan 2021 - return false; - time(&rawtime); - return (abs(rawtime - ntime) < (30 * 60)); -} - -bool client_submit(YAAMP_CLIENT *client, json_value *json_params) -{ - bool isBalloon = false; - if (strstr(g_current_algo->name,"balloon")) - isBalloon = true; - - // submit(worker_name, jobid, extranonce2, ntime, nonce): - if(json_params->u.array.length<5) { - debuglog("%s - %s bad message\n", client->username, client->sock->ip); - client->submit_bad++; - return false; - } - - char extranonce2[32]; - char ntime[32]; - char nonce[32]; - char vote[8]; - - memset(extranonce2, 0, 32); - memset(ntime, 0, 32); - memset(nonce, 0, 32); - memset(vote, 0, 8); - - if (!json_params->u.array.values[1]->u.string.ptr || strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { - - - clientlog(client, "bad json, wrong jobid len"); - client->submit_bad++; - return false; - } - int jobid = htoi(json_params->u.array.values[1]->u.string.ptr); - - strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); - strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); - strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); - - if (json_params->u.array.length == 6) - strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); - - if (g_debuglog_hash) { - debuglog("submit %s (uid %d) %d, %s, %s, %s\n", client->sock->ip, client->userid, jobid, extranonce2, ntime, nonce); - } - - string_lower(extranonce2); - string_lower(ntime); - string_lower(nonce); - string_lower(vote); - - YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); - if(!job) - { - client_submit_error(client, NULL, 21, "Invalid job id", extranonce2, ntime, nonce); - return true; - } - - if(job->deleted) - { - client_send_result(client, "true"); - object_unlock(job); - - return true; - } - - bool is_decred = job->coind && !strcmp("DCR", job->coind->rpcencoding); - - YAAMP_JOB_TEMPLATE *templ = job->templ; - - if(strlen(nonce) != YAAMP_NONCE_SIZE*2 || !ishexa(nonce, YAAMP_NONCE_SIZE*2)) { - client_submit_error(client, job, 20, "Invalid nonce size", extranonce2, ntime, nonce); - return true; - } - - if(strcmp(ntime, templ->ntime)) - { - if (!ntime_valid_range(ntime)) { - client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); - return true; - } - // dont allow algos permutations change over time (can lead to different speeds) - if (!g_allow_rolltime) { - client_submit_error(client, job, 23, "Invalid ntime (rolling not allowed)", extranonce2, ntime, nonce); - return true; - } - } - - YAAMP_SHARE *share = share_find(job->id, extranonce2, ntime, nonce, client->extranonce1); - if(share) - { - client_submit_error(client, job, 22, "Duplicate share", extranonce2, ntime, nonce); - return true; - } - - if(strlen(extranonce2) != client->extranonce2size*2) - { - client_submit_error(client, job, 24, "Invalid extranonce2 size", extranonce2, ntime, nonce); - return true; - } - - // check if the submitted extranonce is valid - if(is_decred && client->extranonce2size > 4) { - char extra1_id[16], extra2_id[16]; - int cmpoft = client->extranonce2size*2 - 8; - strcpy(extra1_id, &client->extranonce1[cmpoft]); - strcpy(extra2_id, &extranonce2[cmpoft]); - int extradiff = (int) strcmp(extra2_id, extra1_id); - int extranull = (int) !strcmp(extra2_id, "00000000"); - if (extranull && client->extranonce2size > 8) - extranull = (int) !strcmp(&extranonce2[8], "00000000" "00000000"); - if (extranull) { - debuglog("extranonce %s is empty!, should be %s - %s\n", extranonce2, extra1_id, client->sock->ip); - client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); - return true; - } - if (extradiff) { - // some ccminer pre-release doesn't fill correctly the extranonce - client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); - socket_send(client->sock, "{\"id\":null,\"method\":\"mining.set_extranonce\",\"params\":[\"%s\",%d]}\n", - client->extranonce1, client->extranonce2size); - return true; - } - } - else if(!ishexa(extranonce2, client->extranonce2size*2)) { - client_submit_error(client, job, 27, "Invalid nonce2", extranonce2, ntime, nonce); - return true; - } - - /////////////////////////////////////////////////////////////////////////////////////////// - - YAAMP_JOB_VALUES submitvalues; - memset(&submitvalues, 0, sizeof(submitvalues)); - - if(is_decred) - build_submit_values_decred(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce, vote, true); - else - build_submit_values(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce); - - if (templ->height && !strcmp(g_current_algo->name,"lyra2z")) { - lyra2z_height = templ->height; - } - - // minimum hash diff begins with 0000, for all... - uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; - - // except balloon - if(isBalloon) - - pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; - - if(pfx) { - if (g_debuglog_hash) { - debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, - (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], - (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); - } - client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); - return true; - } - - // bit dim, but so is measuring the diff this way - uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); uint64_t user_target; - uint64_t coin_target = decode_compact(templ->nbits); - uint64_t hashcomb = * (uint64_t *) &submitvalues.hash_bin[24]; - - // prevents overflow - if(!isBalloon) { - user_target = diff_to_target(client->difficulty_actual); - } - if(templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - // due to balloon's lower diff - if (g_debuglog_hash && isBalloon) { - debuglog("hash %016lx \n", hashcomb); - debuglog("targ %016lx \n", sharetotarg(client->difficulty_actual)); - } - if (g_debuglog_hash && !isBalloon) { - - - debuglog("%016llx actual\n", hash_int); - debuglog("%016llx target\n", user_target); - debuglog("%016llx coin\n", coin_target); - } - // due to balloon's lower diff - if(hashcomb > sharetotarg(client->difficulty_actual) && isBalloon) - { - client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); - return true; - } - if(hash_int > user_target && hash_int > coin_target && !isBalloon) - { - client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); - return true; - } - - if(job->coind) - client_do_submit(client, job, &submitvalues, extranonce2, ntime, nonce, vote); - else - remote_submit(client, job, &submitvalues, extranonce2, ntime, nonce); - - client_send_result(client, "true"); - client_record_difficulty(client); - client->submit_bad = 0; - client->shares++; - if (client->shares <= 200 && (client->shares % 50) == 0) { - // 4 records are enough per miner - if (!client_ask_stats(client)) client->stats = false; - } - - double share_diff = diff_to_target(hash_int); -// if (g_current_algo->diff_multiplier != 0) { -// share_diff = share_diff / g_current_algo->diff_multiplier; -// } - - if (g_debuglog_hash) { - // only log a few... - if (share_diff > (client->difficulty_actual * 16)) - debuglog("submit %s (uid %d) %d, %s, %s, %s, %.3f/%.3f\n", client->sock->ip, client->userid, - jobid, extranonce2, ntime, nonce, share_diff, client->difficulty_actual); - } - - share_add(client, job, true, extranonce2, ntime, nonce, share_diff, 0); - object_unlock(job); - - return true; -} diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak deleted file mode 100644 index 21dc430e7..000000000 --- a/stratum/coinbase.cpp.bak +++ /dev/null @@ -1,1124 +0,0 @@ - -// http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html - -// https://en.bitcoin.it/wiki/Merged_mining_specification#Merged_mining_coinbase - -#include "stratum.h" - -#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) - -static void encode_tx_value(char *encoded, json_int_t value) -{ - sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", - TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), - TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); -} - -static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(payee) >> 1) & 0xFF, payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - encode_tx_value(evalue, amount); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - -static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - encode_tx_value(evalue, amount); - sprintf(coinb2_part, "%s", script); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - -static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) -{ - int ol = strlen(data); - char evalue[32]; - - if(coind->p2sh_address && !key) { - p2sh_pack_tx(coind, data, amount, coind->script_pubkey); - return; - } - - encode_tx_value(evalue, amount); - sprintf(data+strlen(data), "%s", evalue); - - if(coind->pos && !key) - sprintf(data+strlen(data), "2321%sac", coind->pubkey); - - else - sprintf(data+strlen(data), "1976a914%s88ac", key? key: coind->script_pubkey); - -// debuglog("pack tx %s\n", data+ol); -// debuglog("pack tx %lld\n", amount); -} - -void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) -{ - vector hashlist = coind_aux_hashlist(templ->auxs, templ->auxs_size); - while(hashlist.size() > 1) - { - vector l; - for(int i = 0; i < hashlist.size()/2; i++) - { - string s = hashlist[i*2] + hashlist[i*2+1]; - - char bin[YAAMP_HASHLEN_BIN*2]; - char out[YAAMP_HASHLEN_STR]; - - binlify((unsigned char *)bin, s.c_str()); - sha256_double_hash_hex(bin, out, YAAMP_HASHLEN_BIN*2); - - l.push_back(out); - } - - hashlist = l; - } - - char merkle_hash[4*1024]; - memset(merkle_hash, 0, 4*1024); - string_be(hashlist[0].c_str(), merkle_hash); - - sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); -// debuglog("aux_script is %s\n", aux_script); - } - - void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) - { - char eheight[32], etime[32]; - char entime[32] = { 0 }; - char commitment[128] = { 0 }; - - ser_number(templ->height, eheight); - ser_number(time(NULL), etime); - if(coind->pos) ser_string_be(templ->ntime, entime, 1); - - char eversion1[32] = "01000000"; - if(coind->txmessage) - strcpy(eversion1, "02000000"); - const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); - if(coinbase_payload && strlen(coinbase_payload) > 0) - strcpy(eversion1, "03000500"); - - char script1[4*1024]; - sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - - char script2[32] = "7969696d7000"; // "yiimp\0" in hex ascii - - if(!coind->pos && !coind->isaux && templ->auxs_size) - coinbase_aux(templ, script2); - - int script_len = strlen(script1)/2 + strlen(script2)/2 + 8; - sprintf(templ->coinb1, "%s%s01" - "0000000000000000000000000000000000000000000000000000000000000000" - "ffffffff%02x%s", eversion1, entime, script_len, script1); - - sprintf(templ->coinb2, "%s00000000", script2); - - // segwit commitment, if needed - if (templ->has_segwit_txs) - sprintf(commitment, "0000000000000000%02x%s", (int) (strlen(coind->commitment)/2), coind->commitment); - - json_int_t available = templ->value; - - // sample coins using mandatory dev/foundation fees - if(strcmp(coind->symbol, "EGC") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 2; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); - } - else if(strcmp(coind->symbol, "DYN") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[3]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool dynode_enabled; - dynode_enabled = json_get_bool(json_result, "dynode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* dynode; - dynode = json_get_object(json_result, "dynode"); - if(!dynode && json_get_bool(json_result, "dynode_payments")) { - coind->oldmasternodes = true; - debuglog("%s is using old dynodes rpc keys\n", coind->symbol); - return; - } - - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock found %s %u\n", coind->symbol, payee, amount); - } - } - } - if (dynode_enabled && dynode) { - bool started; - started = json_get_bool(json_result, "dynode_payments_started"); - const char *payee = json_get_string(dynode, "payee"); - json_int_t amount = json_get_int(dynode, "amount"); - if (!payee) - debuglog("coinbase_create failed to get Dynode payee\n"); - - if (!amount) - debuglog("coinbase_create failed to get Dynode amount\n"); - - if (!started) - debuglog("coinbase_create failed to get Dynode started\n"); - - if (payee && amount && started) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s dynode found %s %u\n", coind->symbol, payee, amount); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - else if(strcmp(coind->symbol, "LTCR") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 10; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); - } - else if(strcmp(coind->symbol, "XZC") == 0) { - char script_payee[1024]; - if (coind->charity_percent <= 0) - coind->charity_percent = 25; // wrong coinbase 40 instead of 40 + 10 = 50 - - json_int_t charity_amount = (available * coind->charity_percent) / 100; - - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD"); - - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode(coind->charity_address, script_payee); // may change - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - - else if(strcmp("DCR", coind->rpcencoding) == 0) { - coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 - coind->charity_percent = 0; - coind->charity_amount = available; - available *= coind->reward_mul; - if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) - sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); - } - - else if(strcmp(coind->symbol, "BZX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "bznode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "04"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "03"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); - job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); - - base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); - job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); - - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "TUX") == 0) { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "donation_payee"); - if(payee != NULL){ - sprintf(coind->charity_address, "%s", payee); - } else { - sprintf(coind->charity_address, "%s", ""); - } - - if(strlen(coind->charity_address) > 0){ - char script_payee[1024]; - char charity_payee[256] = { 0 }; - sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "donation_amount"); - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - debuglog("pack tx %s\n", coinb2_part); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - } - - else if ((strcmp(coind->symbol, "GLT") == 0)||(strcmp(coind->symbol2, "GLT") == 0)) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char script_treasury[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - json_value* masternode = json_get_object(json_result, "masternode"); - json_value* treasury = json_get_object(json_result, "treasury"); - bool treasury_enabled = true; - if(treasury_enabled && treasury) { - const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); - memcpy(script_treasury, &scriptPubKey, sizeof script_treasury); - json_int_t amount = json_get_int(treasury, "amount"); - if (scriptPubKey && amount) { - npayees++; - available -= amount; - job_pack_tx(coind, script_dests, amount, script_treasury); - //debuglog("%s treasury %u\n", coind->symbol, amount); - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "SECI") == 0) { - char script_payee[512] = { 0 }; - char payees[1]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //mainnet - json_int_t charity_amount = 50000000; - sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if (strcmp(coind->symbol,"XZX") == 0) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - - json_value* subsidyreward = json_get_array(json_result, "subsidy"); - if (subsidyreward) - { - const char *payee = json_get_string(subsidyreward, "address"); - json_int_t amount = json_get_int(subsidyreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - - } - - else if ((strcmp(coind->symbol, "IFX") == 0)|| - (strcmp(coind->symbol, "GTM") == 0)|| - (strcmp(coind->symbol, "GOV") == 0)|| - (strcmp(coind->symbol, "GWAY") == 0)|| - (strcmp(coind->symbol, "ALMN") == 0)|| - (strcmp(coind->symbol, "AGM") == 0)|| - (strcmp(coind->symbol, "BMN") == 0)|| - (strcmp(coind->symbol, "CRDS") == 0)) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - else if(strcmp(coind->symbol, "HXX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "xnode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "05"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - - base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - - base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); - job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "STAK") == 0) { - char script_payee[512] = { 0 }; - char payees[4]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - - //treasury 5% @ 10 STAK per block - json_int_t charity_amount = 50000000; - //testnet - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - switch (templ->height % 4) { - case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); - break; - case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); - break; - case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); - break; - case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); - break; - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. - else if (strcmp(coind->symbol, "SMART") == 0) { - char script_payee[512] = { 0 }; - char payees[5]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //treasury 5000 * (143500/Blockheight) per block - int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); - json_int_t charity_amount = coinvalue * 0.95; - int blockRotation = templ->height - 95 * (templ->height/95); - if (blockRotation >= 0 && blockRotation <= 7) { - sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); - } - if (blockRotation >= 8 && blockRotation <= 15) { - sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); - } - if (blockRotation >= 16 && blockRotation <= 23) { - sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); - } - if (blockRotation >= 24 && blockRotation <= 38) { - sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); - } - if (blockRotation >= 39 && blockRotation <= 94) { - sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); - json_value* founder = json_get_object(json_result, "founder"); - - if (!coind->hasmasternodes && founder_enabled && founder) { - char founder_payee[256] = { 0 }; - char founder_script[1024] = { 0}; - const char *payee = json_get_string(founder, "payee"); - bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); - json_int_t amount = json_get_int(founder, "amount"); - if(payee && amount) { - if (payee) snprintf(founder_payee, 255, "%s", payee); - if (strlen(founder_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - base58_decode(founder_payee, founder_script); - available -= amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - if(founder_use_p2sh) { - p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); - } else { - job_pack_tx(coind, templ->coinb2, amount, founder_script); - } - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); - debuglog("%s founder script %s\n", coind->symbol,founder_script); - debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - - return; - } - } - - // 2 txs are required on these coins, one for foundation (dev fees) - if(coind->charity_percent && !coind->hasmasternodes) - { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - if (charity_amount <= 0) - charity_amount = (available * coind->charity_percent) / 100; - - available -= charity_amount; - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - - else if(coind->charity_amount && !strcmp("DCR", coind->rpcencoding)) - { - stratumlog("ERROR %s should not use coinbase (getwork only)!\n", coind->symbol); - coind->reward = (double)available/100000000; - return; - } - - if(strcmp(coind->symbol, "XVC") == 0) - { - char charity_payee[256]; - json_value* incentive = json_get_object(json_result, "incentive"); - if (incentive) { - const char* payee = json_get_string(incentive, "address"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - - bool enforced = json_get_bool(incentive, "enforced"); - json_int_t charity_amount = json_get_int(incentive, "amount"); - if (enforced && charity_amount && strlen(charity_payee)) { - char script_payee[1024]; - base58_decode(charity_payee, script_payee); - - strcat(templ->coinb2, "02"); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->charity_amount = charity_amount; - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("XVC coinbase %ld (+%ld incentive to %s)\n", - // (long) available, (long) charity_amount, charity_payee); - return; - } - } - } - - // most recent masternodes rpc (DASH, SIB, MUE, DSR, GBX...) - if(coind->hasmasternodes && !coind->oldmasternodes) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; // addresses count - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "masternode"); - if(!masternode && json_get_bool(json_result, "masternode_payments")) { - coind->oldmasternodes = true; - debuglog("%s is using old masternodes rpc keys\n", coind->symbol); - return; - } - if(coind->charity_percent) { - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - json_int_t charity_amount = (available * coind->charity_percent) / 100; - npayees++; - available -= charity_amount; - coind->charity_amount = charity_amount; - base58_decode(charity_payee, script_payee); - job_pack_tx(coind, script_dests, charity_amount, script_payee); - } - // smart contracts balance refund, same format as DASH superblocks - json_value* screfund = json_get_array(json_result, "screfund"); - if(screfund && screfund->u.array.length) { - superblocks_enabled = true; - superblock = screfund; - } - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - const char *script = json_get_string(superblock->u.array.values[i], "script"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(superblock_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (masternode_enabled && masternode && started) { - if (json_is_array(masternode)) { - for(int i = 0; i < masternode->u.array.length; i++) { - const char *payee = json_get_string(masternode->u.array.values[i], "payee"); - const char *script = json_get_string(masternode->u.array.values[i], "script"); - json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); - } - } - } else { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - if(coinbase_payload && strlen(coinbase_payload) > 0) { - char coinbase_payload_size[18]; - ser_compactsize((unsigned int)(strlen(coinbase_payload_size) >> 1), coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload); - } - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ARC") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "goldminenode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ENT") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "eternitynode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "eternitynode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ARC") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "goldminenode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - - else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ - { - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - bool charity_payments = json_get_bool(json_result, "masternode_payments"); - bool charity_enforce = json_get_bool(json_result, "enforce_masternode_payments"); - - if(strcmp(coind->symbol, "CRW") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - bool systemnodes_enabled = json_get_bool(json_result, "enforce_systemnode_payments"); - bool systemnodes = json_get_bool(json_result, "systemnodes"); - bool masternodes = json_get_bool(json_result, "masternodes"); - if(systemnodes_enabled && systemnodes) { - const char *payeeSN = json_get_string(json_result, "payeeSN"); - json_int_t payeeSN_amount = json_get_int(json_result, "payeeSN_amount"); - if (payeeSN && payeeSN_amount) { - npayees++; - available -= payeeSN_amount; - base58_decode(payeeSN, script_payee); - job_pack_tx(coind, script_dests, payeeSN_amount, script_payee); - //debuglog("%s systemnode %s %u\n", coind->symbol, payeeSN, payeeSN_amount); - } - } - if (masternodes_enabled && masternodes) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - if(charity_payments && charity_enforce) - { - char script_payee[256] = { 0 }; - base58_decode(charity_payee, script_payee); - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + node + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); // 2 outputs - } - - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - available -= charity_amount; - - } else { - strcat(templ->coinb2, "01"); - } - } - - else if (templ->has_segwit_txs) { - strcat(templ->coinb2, "02"); - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "01"); - } - - job_pack_tx(coind, templ->coinb2, available, NULL); - - //if(coind->txmessage) - // strcat(templ->coinb2, "00"); - if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. - if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; -// debuglog("coinbase %f\n", coind->reward); - -// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); -// debuglog("coinb1 %s\n", templ->coinb1); -// debuglog("coinb2 %s\n", templ->coinb2); -} diff --git a/stratum/coind_submit.cpp.bak b/stratum/coind_submit.cpp.bak deleted file mode 100644 index 3a2af19b1..000000000 --- a/stratum/coind_submit.cpp.bak +++ /dev/null @@ -1,149 +0,0 @@ - -#include "stratum.h" - -bool coind_submitwork(YAAMP_COIND *coind, const char *block) -{ - int paramlen = strlen(block); - - char *params = (char *)malloc(paramlen+1024); - if(!params) { - debuglog("%s: OOM!\n", __func__); - return false; - } - - sprintf(params, "[\"%s\"]", block); - json_value *json = rpc_call(&coind->rpc, "getwork", params); - if(!json) { - debuglog("%s: retry\n", __func__); - usleep(500*YAAMP_MS); - json = rpc_call(&coind->rpc, "getwork", params); - } - free(params); - - if(!json) { - debuglog("%s: error, no answer\n", __func__); - return false; - } - - json_value *json_res = json_get_object(json, "result"); - - bool b = json_res && json_res->type == json_boolean && json_res->u.boolean; - json_value_free(json_res); - - return b; -} - -bool coind_submitblock(YAAMP_COIND *coind, const char *block) -{ - int paramlen = strlen(block); - - char *params = (char *)malloc(paramlen+1024); - if(!params) return false; - - sprintf(params, "[\"%s\"]", block); - json_value *json = rpc_call(&coind->rpc, "submitblock", params); - - free(params); - if(!json) return false; - - json_value *json_error = json_get_object(json, "error"); - if(json_error && json_error->type != json_null) - { - const char *p = json_get_string(json_error, "message"); - if(p) stratumlog("ERROR %s %s\n", coind->name, p); - - // job_reset(); - json_value_free(json); - - return false; - } - - json_value *json_result = json_get_object(json, "result"); - - bool b = json_result && json_result->type == json_null; - json_value_free(json); - - return b; -} - -bool coind_submitblocktemplate(YAAMP_COIND *coind, const char *block) -{ - int paramlen = strlen(block); - - char *params = (char *)malloc(paramlen+1024); - if(!params) return false; - - sprintf(params, "[{\"mode\": \"submit\", \"data\": \"%s\"}]", block); - json_value *json = rpc_call(&coind->rpc, "getblocktemplate", params); - - free(params); - if(!json) return false; - - json_value *json_error = json_get_object(json, "error"); - if(json_error && json_error->type != json_null) - { - const char *p = json_get_string(json_error, "message"); - if(p) stratumlog("ERROR %s %s\n", coind->name, p); - - // job_reset(); - json_value_free(json); - - return false; - } - - json_value *json_result = json_get_object(json, "result"); - - bool b = json_result && json_result->type == json_null; - json_value_free(json); - - return b; -} - -bool coind_submit(YAAMP_COIND *coind, const char *block) -{ - bool b; - - if(coind->usegetwork) // DCR - b = coind_submitwork(coind, block); - else if(coind->hassubmitblock) - b = coind_submitblock(coind, block); - else - b = coind_submitblocktemplate(coind, block); - - return b; -} - -bool coind_submitgetauxblock(YAAMP_COIND *coind, const char *hash, const char *block) -{ - int paramlen = strlen(block); - - char *params = (char *)malloc(paramlen+1024); - if(!params) return false; - - sprintf(params, "[\"%s\",\"%s\"]", hash, block); - json_value *json = rpc_call(&coind->rpc, "getauxblock", params); - - free(params); - if(!json) return false; - - json_value *json_error = json_get_object(json, "error"); - if(json_error && json_error->type != json_null) - { - const char *p = json_get_string(json_error, "message"); - if(p) stratumlog("ERROR %s %s\n", coind->name, p); - - // job_reset(); - json_value_free(json); - - return false; - } - - json_value *json_result = json_get_object(json, "result"); - bool b = json_result && json_result->type == json_boolean && json_result->u.boolean; - // some auxpow coins return error:null, result: null on success - if(!b) - b=json_result && json_result->type == json_null; - json_value_free(json); - return b; -} - diff --git a/stratum/config.sample/x25x.conf b/stratum/config.sample/x25x.conf new file mode 100644 index 000000000..eb8e667ca --- /dev/null +++ b/stratum/config.sample/x25x.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 3423 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = x25x +difficulty = 0.008 +max_ttf = 50000 + diff --git a/stratum/db.cpp.bak b/stratum/db.cpp.bak deleted file mode 100644 index 4ba7b75f1..000000000 --- a/stratum/db.cpp.bak +++ /dev/null @@ -1,624 +0,0 @@ - -#include "stratum.h" -#include -#include - -void db_reconnect(YAAMP_DB *db) -{ - if (g_exiting) { - db_close(db); - return; - } - - mysql_init(&db->mysql); - for(int i=0; i<6; i++) - { - MYSQL *p = mysql_real_connect(&db->mysql, g_sql_host, g_sql_username, g_sql_password, g_sql_database, g_sql_port, 0, 0); - if(p) break; - - stratumlog("%d, %s\n", i, mysql_error(&db->mysql)); - sleep(10); - - mysql_close(&db->mysql); - mysql_init(&db->mysql); - } -} - -YAAMP_DB *db_connect() -{ - YAAMP_DB *db = new YAAMP_DB; - db_reconnect(db); - - return db; -} - -void db_close(YAAMP_DB *db) -{ - if (db) { - mysql_close(&db->mysql); - delete db; - } - db = NULL; -} - -char *db_clean_string(YAAMP_DB *db, char *string) -{ - char *c = string; - size_t i, len = strlen(string) & 0x1FF; - for (i = 0; i < len; i++) { - bool isdigit = (c[i] >= '0' && c[i] <= '9'); - bool isalpha = (c[i] >= 'a' && c[i] <= 'z') || (c[i] >= 'A' && c[i] <= 'Z'); - bool issepch = (c[i] == '=' || c[i] == ',' || c[i] == ';' || c[i] == '.'); - bool isextra = (c[i] == '/' || c[i] == '-' || c[i] == '_'); - if (!isdigit && !isalpha && !issepch && !isextra) { c[i] = '\0'; break; } - } - return string; -} - -// allow more chars without the most hurting ones (bench device names) -static void clean_html(char* string) -{ - char *c = string; - size_t i, len = strlen(string) & 0x1FF; - for (i = 0; i < len; i++) { - if (c[i] == '<' || c[i] == '>' || c[i] == '%' || c[i] == '\\' || c[i] == '"' || c[i] == '\'') { - c[i] = '\0'; break; - } - } - if (strstr(string, "script")) strcpy(string, ""); -} - -void db_query(YAAMP_DB *db, const char *format, ...) -{ - va_list arglist; - va_start(arglist, format); - if(!db) return; - - char *buffer = (char *)malloc(YAAMP_SMALLBUFSIZE+strlen(format)); - if(!buffer) return; - - int len = vsprintf(buffer, format, arglist); - va_end(arglist); - - while(!g_exiting) - { - int res = mysql_query(&db->mysql, buffer); - if(!res) break; - res = mysql_errno(&db->mysql); - - stratumlog("SQL ERROR: %d, %s\n", res, mysql_error(&db->mysql)); - if(res == ER_DUP_ENTRY) break; // rarely seen on new user creation - if(res != CR_SERVER_GONE_ERROR && res != CR_SERVER_LOST) exit(1); - - usleep(100*YAAMP_MS); - db_reconnect(db); - } - - free(buffer); -} - -/////////////////////////////////////////////////////////////////////// - -void db_register_stratum(YAAMP_DB *db) -{ - int pid = getpid(); - int t = time(NULL); - if(!db) return; - - db_query(db, "INSERT INTO stratums (pid, time, started, algo, url, port) VALUES (%d,%d,%d,'%s','%s',%d) " - " ON DUPLICATE KEY UPDATE time=%d, algo='%s', url='%s', port=%d", - pid, t, t, g_stratum_algo, g_tcp_server, g_tcp_port, - t, g_stratum_algo, g_tcp_server, g_tcp_port - ); -} - -void db_update_algos(YAAMP_DB *db) -{ - int pid = getpid(); - int fds = opened_files(); - if(!db) return; - - if(g_current_algo->overflow) - { - debuglog("setting overflow\n"); - g_current_algo->overflow = false; - - db_query(db, "UPDATE algos SET overflow=true WHERE name='%s'", g_stratum_algo); - } - - char symbol[16] = "NULL\0"; - if(g_list_coind.count == 1) { - if (g_list_coind.first) { - CLI li = g_list_coind.first; - YAAMP_COIND *coind = (YAAMP_COIND *)li->data; - sprintf(symbol,"'%s'", coind->symbol); - } - } - - db_query(db, "UPDATE stratums SET workers=%d, fds=%d, symbol=%s WHERE pid=%d", - g_list_client.count, fds, symbol, pid); - - /////////////////////////////////////////////////////////////////////////////////////////// - - db_query(db, "select name, profit, rent, factor from algos"); - - MYSQL_RES *result = mysql_store_result(&db->mysql); - if(!result) return; - - MYSQL_ROW row; - while((row = mysql_fetch_row(result)) != NULL) - { - YAAMP_ALGO *algo = stratum_find_algo(row[0]); - if(!algo) continue; - - if(row[1]) algo->profit = atof(row[1]); - if(row[2]) algo->rent = atof(row[2]); - if(row[3]) algo->factor = atof(row[3]); - } - - mysql_free_result(result); - - //////////////////// - - g_list_client.Enter(); - for(CLI li = g_list_client.first; li; li = li->next) - { - YAAMP_CLIENT *client = (YAAMP_CLIENT *)li->data; - if(client->deleted) continue; - - client_reset_multialgo(client, false); - } - - g_list_client.Leave(); -} - -//////////////////////////////////////////////////////////////////////////////// - -void db_update_coinds(YAAMP_DB *db) -{ - if(!db) return; - - for(CLI li = g_list_coind.first; li; li = li->next) - { - YAAMP_COIND *coind = (YAAMP_COIND *)li->data; - if(coind->deleted) continue; - if(coind->auto_ready) continue; - - debuglog("disabling %s\n", coind->symbol); - db_query(db, "update coins set auto_ready=%d where id=%d", coind->auto_ready, coind->id); - } - - //////////////////////////////////////////////////////////////////////////////////////// - - db_query(db, "SELECT id, name, rpchost, rpcport, rpcuser, rpcpasswd, rpcencoding, master_wallet, reward, price, " - "hassubmitblock, txmessage, enable, auto_ready, algo, pool_ttf, charity_address, charity_amount, charity_percent, " - "reward_mul, symbol, auxpow, actual_ttf, network_ttf, usememorypool, hasmasternodes, algo, symbol2, " - "rpccurl, rpcssl, rpccert, account, multialgos, max_miners, max_shares, usesegwit " - "FROM coins WHERE enable AND auto_ready AND algo='%s' ORDER BY index_avg", g_stratum_algo); - - MYSQL_RES *result = mysql_store_result(&db->mysql); - if(!result) yaamp_error("Cant query database"); - - MYSQL_ROW row; - g_list_coind.Enter(); - - while((row = mysql_fetch_row(result)) != NULL) - { - YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, atoi(row[0])); - if(!coind) - { - if (!strlen(g_stratum_coin_include) || (strlen(g_stratum_coin_include) && strstr(g_stratum_coin_include, row[20]))) - { - coind = new YAAMP_COIND; - memset(coind, 0, sizeof(YAAMP_COIND)); - - coind->newcoind = true; - coind->newblock = true; - coind->id = atoi(row[0]); - coind->aux.coind = coind; - } - else - continue; - } - else - coind->newcoind = false; - - strcpy(coind->name, row[1]); - strcpy(coind->symbol, row[20]); - // optional coin filters - if(coind->newcoind) { - bool ignore = false; - if (strlen(g_stratum_coin_include) && !strstr(g_stratum_coin_include, coind->symbol)) ignore = true; - if (strlen(g_stratum_coin_exclude) && strstr(g_stratum_coin_exclude, coind->symbol)) ignore = true; - if (ignore) { - object_delete(coind); - continue; - } - } - - if(row[7]) strcpy(coind->wallet, row[7]); - if(row[6]) strcpy(coind->rpcencoding, row[6]); - if(row[6]) coind->pos = strcasecmp(row[6], "POS")? false: true; - if(row[10]) coind->hassubmitblock = atoi(row[10]); - - coind->rpc.ssl = 0; - // deprecated method to set ssl and cert (before db specific fields) - if(row[2]) { - char buffer[1024]; - char cert[1024]; - strcpy(buffer, row[2]); - // sample ssl host : "https://mycert@127.0.0.1" - if (strstr(buffer, "https://") != NULL) { - strcpy(buffer, row[2] + 8); - if (strstr(buffer, "@") != NULL) { - int p = (strstr(buffer, "@") - buffer); - strcpy(cert, buffer); cert[p] = '\0'; - strcpy(buffer, row[2] + 8 + p + 1); - } else { - strcpy(cert, "yiimp"); - } - coind->rpc.ssl = 1; - sprintf(coind->rpc.cert, "/usr/share/ca-certificates/%s.crt", cert); - } - strcpy(coind->rpc.cert, ""); - strcpy(coind->rpc.host, buffer); - } - - if(row[3]) coind->rpc.port = atoi(row[3]); - - if(row[4] && row[5]) - { - char buffer[1024]; - sprintf(buffer, "%s:%s", row[4], row[5]); - - base64_encode(coind->rpc.credential, buffer); - coind->rpc.coind = coind; - } - - if(row[8]) coind->reward = atof(row[8]); - if(row[9]) coind->price = atof(row[9]); - if(row[11]) coind->txmessage = atoi(row[11]); - if(row[12]) coind->enable = atoi(row[12]); - if(row[13]) coind->auto_ready = atoi(row[13]); - if(row[15]) coind->pool_ttf = atoi(row[15]); - - if(row[16]) strcpy(coind->charity_address, row[16]); - if(row[17]) coind->charity_amount = atof(row[17]); - if(row[18]) coind->charity_percent = atof(row[18]); - if(row[19]) coind->reward_mul = atof(row[19]); - - if(row[21]) coind->isaux = atoi(row[21]); - - if(row[22] && row[23]) coind->actual_ttf = min(atoi(row[22]), atoi(row[23])); - else if(row[22]) coind->actual_ttf = atoi(row[22]); - coind->actual_ttf = min(coind->actual_ttf, 120); - coind->actual_ttf = max(coind->actual_ttf, 20); - - if(row[24]) coind->usememorypool = atoi(row[24]); - if(row[25]) coind->hasmasternodes = atoi(row[25]); - - if(row[26]) strcpy(coind->algo, row[26]); - if(row[27]) strcpy(coind->symbol2, row[27]); // if pool + aux, prevent double submit - - if(row[28]) coind->rpc.curl = atoi(row[28]) != 0; - if(row[29]) coind->rpc.ssl = atoi(row[29]) != 0; - if(row[30]) strcpy(coind->rpc.cert, row[30]); - - if(row[31]) strcpy(coind->account, row[31]); - if(row[32]) coind->multialgos = atoi(row[32]); - if(row[33] && atoi(row[33]) > 0) g_stratum_max_cons = atoi(row[33]); - if(row[34] && atol(row[34]) > 0) g_max_shares = atol(row[34]); - if(row[35]) coind->usesegwit = atoi(row[35]) > 0; - - if(coind->usesegwit) g_stratum_segwit = true; - - // force the right rpcencoding for DCR - if(!strcmp(coind->symbol, "DCR") && strcmp(coind->rpcencoding, "DCR")) - strcpy(coind->rpcencoding, "DCR"); - - // old dash masternodes coins.. - if(coind->hasmasternodes) { - if (strcmp(coind->symbol, "ALQO") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "BSD") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "BWK") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "CHC") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "CRW") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "DNR") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "FLAX") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "ITZ") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "J") == 0 || strcmp(coind->symbol2, "J") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "LAX") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "MAG") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "PBS") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "URALS") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "VSX") == 0) coind->oldmasternodes = true; - if (strcmp(coind->symbol, "XLR") == 0) coind->oldmasternodes = true; - } - - //////////////////////////////////////////////////////////////////////////////////////////////////// - - //coind->touch = true; - if(coind->newcoind) - { - debuglog("connecting to coind %s\n", coind->symbol); - - bool b = rpc_connect(&coind->rpc); - if (!b) { - debuglog("%s: connect failure\n", coind->symbol); - object_delete(coind); - continue; - } - coind_init(coind); - - g_list_coind.AddTail(coind); - usleep(100*YAAMP_MS); - } - coind->touch = true; - coind_create_job(coind); - } - - mysql_free_result(result); - - for(CLI li = g_list_coind.first; li; li = li->next) - { - YAAMP_COIND *coind = (YAAMP_COIND *)li->data; - if(coind->deleted) continue; - - if(!coind->touch) - { - coind_terminate(coind); - continue; - } - - coind->touch = false; - } - - coind_sort(); - g_list_coind.Leave(); -} - -/////////////////////////////////////////////////////////////////////////////////////////////// - -void db_update_remotes(YAAMP_DB *db) -{ - if(!db) return; - - db_query(db, "select id, speed/1000000, host, port, username, password, time, price, renterid from jobs where active and ready and algo='%s' order by time", g_stratum_algo); - - MYSQL_RES *result = mysql_store_result(&db->mysql); - if(!result) yaamp_error("Cant query database"); - - MYSQL_ROW row; - - g_list_remote.Enter(); - while((row = mysql_fetch_row(result)) != NULL) - { - if(!row[0] || !row[1] || !row[2] || !row[3] || !row[4] || !row[5] || !row[6] || !row[7]) continue; - bool newremote = false; - - YAAMP_REMOTE *remote = (YAAMP_REMOTE *)object_find(&g_list_remote, atoi(row[0])); - if(!remote) - { - remote = new YAAMP_REMOTE; - memset(remote, 0, sizeof(YAAMP_REMOTE)); - - remote->id = atoi(row[0]); - newremote = true; - } - -// else if(remote->reset_balance) -// continue; - - else if(row[6] && atoi(row[6]) > remote->updated) - remote->status = YAAMP_REMOTE_RESET; - - remote->speed = atof(row[1]); - strcpy(remote->host, row[2]); - remote->port = atoi(row[3]); - strcpy(remote->username, row[4]); - strcpy(remote->password, row[5]); - remote->updated = atoi(row[6]); - remote->price = atof(row[7]); - remote->touch = true; - remote->submit_last = NULL; - - int renterid = row[8]? atoi(row[8]): 0; - if(renterid && !remote->renter) - remote->renter = (YAAMP_RENTER *)object_find(&g_list_renter, renterid); - - if(newremote) - { - if(remote->renter && remote->renter->balance <= 0.00001000) - { - debuglog("dont load that job %d\n", remote->id); - delete remote; - continue; - } - - pthread_t thread; - - pthread_create(&thread, NULL, remote_thread, remote); - pthread_detach(thread); - - g_list_remote.AddTail(remote); - usleep(100*YAAMP_MS); - } - - if(remote->renter) - { - if(!strcmp(g_current_algo->name, "sha256")) - remote->speed = min(remote->speed, max(remote->renter->balance/g_current_algo->rent*100000000, 1)); - else - remote->speed = min(remote->speed, max(remote->renter->balance/g_current_algo->rent*100000, 1)); - } - } - - mysql_free_result(result); - - /////////////////////////////////////////////////////////////////////////////////////////// - - for(CLI li = g_list_remote.first; li; li = li->next) - { - YAAMP_REMOTE *remote = (YAAMP_REMOTE *)li->data; -// if(remote->reset_balance && remote->renter) -// { -// db_query(db, "update renters set balance=0 where id=%d", remote->renter->id); -// db_query(db, "update jobs set ready=false, active=false where renterid=%d", remote->renter->id); -// -// remote->reset_balance = false; -// } - - if(remote->deleted) continue; - - if(remote->kill) - { - debuglog("******* kill that sucka %s\n", remote->host); - - pthread_cancel(remote->thread); - object_delete(remote); - - continue; - } - - if(remote->sock && remote->sock->last_read && remote->sock->last_read+120host); - - remote->status = YAAMP_REMOTE_TERMINATE; - remote->kill = true; - - remote_close(remote); - continue; - } - - if(!remote->touch) - { - remote->status = YAAMP_REMOTE_TERMINATE; - continue; - } - - remote->touch = false; - - if(remote->difficulty_written != remote->difficulty_actual) - { - remote->difficulty_written = remote->difficulty_actual; - db_query(db, "update jobs set difficulty=%f where id=%d", remote->difficulty_actual, remote->id); - } - } - -// remote_sort(); - g_list_remote.Leave(); -} - -void db_update_renters(YAAMP_DB *db) -{ - if(!db) return; - - db_query(db, "select id, balance, updated from renters"); - - MYSQL_RES *result = mysql_store_result(&db->mysql); - if(!result) yaamp_error("Cant query database"); - - MYSQL_ROW row; - g_list_renter.Enter(); - - while((row = mysql_fetch_row(result)) != NULL) - { - if(!row[0] || !row[1]) continue; - - YAAMP_RENTER *renter = (YAAMP_RENTER *)object_find(&g_list_renter, atoi(row[0])); - if(!renter) - { - renter = new YAAMP_RENTER; - memset(renter, 0, sizeof(YAAMP_RENTER)); - - renter->id = atoi(row[0]); - g_list_renter.AddTail(renter); - } - - if(row[1]) renter->balance = atof(row[1]); - if(row[2]) renter->updated = atoi(row[2]); - } - - mysql_free_result(result); - g_list_renter.Leave(); -} - -/////////////////////////////////////////////////////////////////////// - -static void _json_str_safe(YAAMP_DB *db, json_value *json, const char *key, size_t maxlen, char* out) -{ - json_value *val = json_get_val(json, key); - out[0] = '\0'; - if (db && val && json_is_string(val)) { - char str[128] = { 0 }; - char escaped[256] = { 0 }; - snprintf(str, sizeof(str)-1, "%s", json_string_value(val)); - str[maxlen-1] = '\0'; // truncate to dest len - clean_html(str); - mysql_real_escape_string(&db->mysql, escaped, str, strlen(str)); - snprintf(out, maxlen, "%s", escaped); - out[maxlen-1] = '\0'; - } -} -#define json_str_safe(stats, k, out) _json_str_safe(db, stats, k, sizeof(out), out) - -static int json_int_safe(json_value *json, const char *key) -{ - json_value *val = json_get_val(json, key); - return val ? (int) json_integer_value(val) : 0; -} - -static double json_double_safe(json_value *json, const char *key) -{ - json_value *val = json_get_val(json, key); - return val ? json_double_value(val) : 0.; -} - -void db_store_stats(YAAMP_DB *db, YAAMP_CLIENT *client, json_value *stats) -{ - int t = time(NULL); - json_value *algo, *val; - char sdev[80], stype[8], svid[12], sarch[8]; - char salgo[32], sclient[48], sdriver[32], sos[8]; - double khashes, intensity, throughput; - int power, freq, memf, realfreq, realmemf, plimit; - - if (!db) return; - - json_str_safe(stats, "algo", salgo); - if (strcasecmp(g_current_algo->name, salgo) && client->submit_bad) { - // debuglog("stats: wrong algo used %s != %s", salgo, g_current_algo->name); - return; - } - - json_str_safe(stats, "device", sdev); - json_str_safe(stats, "type", stype); - json_str_safe(stats, "vendorid", svid); - json_str_safe(stats, "arch", sarch); // or cpu best feature - json_str_safe(stats, "client", sclient); - json_str_safe(stats, "os", sos); - json_str_safe(stats, "driver", sdriver); // or cpu compiler - - power = json_int_safe(stats, "power"); - freq = json_int_safe(stats, "freq"); - memf = json_int_safe(stats, "memf"); - realfreq = json_int_safe(stats, "curr_freq"); - realmemf = json_int_safe(stats, "curr_memf"); - plimit = json_int_safe(stats, "plimit"); - intensity = json_double_safe(stats, "intensity"); - khashes = json_double_safe(stats, "khashes"); - throughput = json_double_safe(stats, "throughput"); - if (throughput < 0.) throughput = 0.; - if (khashes < 0. || intensity < 0.) return; - - db_query(db, "INSERT INTO benchmarks(" - "time, algo, type, device, arch, vendorid, os, driver," - "client, khps, freq, memf, realfreq, realmemf, power, plimit, " - "intensity, throughput, userid )" - "VALUES (%d,'%s','%s','%s','%s','%s','%s','%s'," - "'%s',%f,%d,%d,%d,%d,%d,%d, %.2f,%.0f,%d)", - t, g_current_algo->name, stype, sdev, sarch, svid, sos, sdriver, - sclient, khashes, freq, memf, realfreq, realmemf, power, plimit, - intensity, throughput, client->userid); -} diff --git a/stratum/sha3/panama.c b/stratum/sha3/panama.c new file mode 100644 index 000000000..2c864bff8 --- /dev/null +++ b/stratum/sha3/panama.c @@ -0,0 +1,334 @@ +/* $Id: panama.c 216 2010-06-08 09:46:57Z tp $ */ +/* + * PANAMA implementation. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @author Thomas Pornin + */ + +#include +#include + +#include "sph_panama.h" + +#define LVAR17(b) sph_u32 \ + b ## 0, b ## 1, b ## 2, b ## 3, b ## 4, b ## 5, \ + b ## 6, b ## 7, b ## 8, b ## 9, b ## 10, b ## 11, \ + b ## 12, b ## 13, b ## 14, b ## 15, b ## 16; + +#define LVARS \ + LVAR17(a) \ + LVAR17(g) \ + LVAR17(p) \ + LVAR17(t) + +#define M17(macro) do { \ + macro( 0, 1, 2, 4); \ + macro( 1, 2, 3, 5); \ + macro( 2, 3, 4, 6); \ + macro( 3, 4, 5, 7); \ + macro( 4, 5, 6, 8); \ + macro( 5, 6, 7, 9); \ + macro( 6, 7, 8, 10); \ + macro( 7, 8, 9, 11); \ + macro( 8, 9, 10, 12); \ + macro( 9, 10, 11, 13); \ + macro(10, 11, 12, 14); \ + macro(11, 12, 13, 15); \ + macro(12, 13, 14, 16); \ + macro(13, 14, 15, 0); \ + macro(14, 15, 16, 1); \ + macro(15, 16, 0, 2); \ + macro(16, 0, 1, 3); \ + } while (0) + +#define BUPDATE1(n0, n2) do { \ + sc->buffer[ptr24][n0] ^= sc->buffer[ptr31][n2]; \ + sc->buffer[ptr31][n2] ^= INW1(n2); \ + } while (0) + +#define BUPDATE do { \ + BUPDATE1(0, 2); \ + BUPDATE1(1, 3); \ + BUPDATE1(2, 4); \ + BUPDATE1(3, 5); \ + BUPDATE1(4, 6); \ + BUPDATE1(5, 7); \ + BUPDATE1(6, 0); \ + BUPDATE1(7, 1); \ + } while (0) + +#define RSTATE(n0, n1, n2, n4) (a ## n0 = sc->state[n0]) + +#define WSTATE(n0, n1, n2, n4) (sc->state[n0] = a ## n0) + +#define GAMMA(n0, n1, n2, n4) \ + (g ## n0 = a ## n0 ^ (a ## n1 | SPH_T32(~a ## n2))) + +#define PI_ALL do { \ + p0 = g0; \ + p1 = SPH_ROTL32( g7, 1); \ + p2 = SPH_ROTL32(g14, 3); \ + p3 = SPH_ROTL32( g4, 6); \ + p4 = SPH_ROTL32(g11, 10); \ + p5 = SPH_ROTL32( g1, 15); \ + p6 = SPH_ROTL32( g8, 21); \ + p7 = SPH_ROTL32(g15, 28); \ + p8 = SPH_ROTL32( g5, 4); \ + p9 = SPH_ROTL32(g12, 13); \ + p10 = SPH_ROTL32( g2, 23); \ + p11 = SPH_ROTL32( g9, 2); \ + p12 = SPH_ROTL32(g16, 14); \ + p13 = SPH_ROTL32( g6, 27); \ + p14 = SPH_ROTL32(g13, 9); \ + p15 = SPH_ROTL32( g3, 24); \ + p16 = SPH_ROTL32(g10, 8); \ + } while (0) + +#define THETA(n0, n1, n2, n4) \ + (t ## n0 = p ## n0 ^ p ## n1 ^ p ## n4) + +#define SIGMA_ALL do { \ + a0 = t0 ^ 1; \ + a1 = t1 ^ INW2(0); \ + a2 = t2 ^ INW2(1); \ + a3 = t3 ^ INW2(2); \ + a4 = t4 ^ INW2(3); \ + a5 = t5 ^ INW2(4); \ + a6 = t6 ^ INW2(5); \ + a7 = t7 ^ INW2(6); \ + a8 = t8 ^ INW2(7); \ + a9 = t9 ^ sc->buffer[ptr16][0]; \ + a10 = t10 ^ sc->buffer[ptr16][1]; \ + a11 = t11 ^ sc->buffer[ptr16][2]; \ + a12 = t12 ^ sc->buffer[ptr16][3]; \ + a13 = t13 ^ sc->buffer[ptr16][4]; \ + a14 = t14 ^ sc->buffer[ptr16][5]; \ + a15 = t15 ^ sc->buffer[ptr16][6]; \ + a16 = t16 ^ sc->buffer[ptr16][7]; \ + } while (0) + +#define PANAMA_STEP do { \ + unsigned ptr16, ptr24, ptr31; \ + \ + ptr24 = (ptr0 - 8) & 31; \ + ptr31 = (ptr0 - 1) & 31; \ + BUPDATE; \ + M17(GAMMA); \ + PI_ALL; \ + M17(THETA); \ + ptr16 = ptr0 ^ 16; \ + SIGMA_ALL; \ + ptr0 = ptr31; \ + } while (0) + +/* + * These macros are used to compute + */ +#define INC0 1 +#define INC1 2 +#define INC2 3 +#define INC3 4 +#define INC4 5 +#define INC5 6 +#define INC6 7 +#define INC7 8 + +/* + * Push data by blocks of 32 bytes. "pbuf" must be 32-bit aligned. Each + * iteration processes 32 data bytes; "num" contains the number of + * iterations. + */ +static void +panama_push(sph_panama_context *sc, const unsigned char *pbuf, size_t num) +{ + LVARS + unsigned ptr0; +#if SPH_LITTLE_FAST +#define INW1(i) sph_dec32le_aligned(pbuf + 4 * (i)) +#else + sph_u32 X_var[8]; +#define INW1(i) X_var[i] +#endif +#define INW2(i) INW1(i) + + M17(RSTATE); + ptr0 = sc->buffer_ptr; + while (num -- > 0) { +#if !SPH_LITTLE_FAST + int i; + + for (i = 0; i < 8; i ++) + X_var[i] = sph_dec32le_aligned(pbuf + 4 * (i)); +#endif + PANAMA_STEP; + pbuf = (const unsigned char *)pbuf + 32; + } + M17(WSTATE); + sc->buffer_ptr = ptr0; + +#undef INW1 +#undef INW2 +} + +/* + * Perform the "pull" operation repeatedly ("num" times). The hash output + * will be extracted from the state afterwards. + */ +static void +panama_pull(sph_panama_context *sc, unsigned num) +{ + LVARS + unsigned ptr0; +#define INW1(i) INW_H1(INC ## i) +#define INW_H1(i) INW_H2(i) +#define INW_H2(i) a ## i +#define INW2(i) sc->buffer[ptr4][i] + + M17(RSTATE); + ptr0 = sc->buffer_ptr; + while (num -- > 0) { + unsigned ptr4; + + ptr4 = (ptr0 + 4) & 31; + PANAMA_STEP; + } + M17(WSTATE); + +#undef INW1 +#undef INW_H1 +#undef INW_H2 +#undef INW2 +} + +/* see sph_panama.h */ +void +sph_panama_init(void *cc) +{ + sph_panama_context *sc; + + sc = cc; + /* + * This is not completely conformant, but "it will work + * everywhere". Initial state consists of zeroes everywhere. + * Conceptually, the sph_u32 type may have padding bits which + * must not be set to 0; but such an architecture remains to + * be seen. + */ + sc->data_ptr = 0; + memset(sc->buffer, 0, sizeof sc->buffer); + sc->buffer_ptr = 0; + memset(sc->state, 0, sizeof sc->state); +} + +#ifdef SPH_UPTR +static void +panama_short(void *cc, const void *data, size_t len) +#else +void +sph_panama(void *cc, const void *data, size_t len) +#endif +{ + sph_panama_context *sc; + unsigned current; + + sc = cc; + current = sc->data_ptr; + while (len > 0) { + unsigned clen; + + clen = (sizeof sc->data) - current; + if (clen > len) + clen = len; + memcpy(sc->data + current, data, clen); + data = (const unsigned char *)data + clen; + len -= clen; + current += clen; + if (current == sizeof sc->data) { + current = 0; + panama_push(sc, sc->data, 1); + } + } + sc->data_ptr = current; +} + +#ifdef SPH_UPTR +/* see sph_panama.h */ +void +sph_panama(void *cc, const void *data, size_t len) +{ + sph_panama_context *sc; + unsigned current; + size_t rlen; + + if (len < (2 * sizeof sc->data)) { + panama_short(cc, data, len); + return; + } + sc = cc; + current = sc->data_ptr; + if (current > 0) { + unsigned t; + + t = (sizeof sc->data) - current; + panama_short(sc, data, t); + data = (const unsigned char *)data + t; + len -= t; + } +#if !SPH_UNALIGNED + if (((SPH_UPTR)data & 3) != 0) { + panama_short(sc, data, len); + return; + } +#endif + panama_push(sc, data, len >> 5); + rlen = len & 31; + if (rlen > 0) + memcpy(sc->data, + (const unsigned char *)data + len - rlen, rlen); + sc->data_ptr = rlen; +} +#endif + +/* see sph_panama.h */ +void +sph_panama_close(void *cc, void *dst) +{ + sph_panama_context *sc; + unsigned current; + int i; + + sc = cc; + current = sc->data_ptr; + sc->data[current ++] = 0x01; + memset(sc->data + current, 0, (sizeof sc->data) - current); + panama_push(sc, sc->data, 1); + panama_pull(sc, 32); + for (i = 0; i < 8; i ++) + sph_enc32le((unsigned char *)dst + 4 * i, sc->state[i + 9]); + sph_panama_init(sc); +} diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 41d24f060..49f01ef97 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -201,6 +201,7 @@ YAAMP_ALGO g_algos[] = {"x20r", x20r_hash, 0x100, 0, 0}, {"x21s", x21s_hash, 0x100, 0, 0}, {"x22i", x22i_hash, 1, 0, 0}, + {"x25x", x25x_hash, 1, 0, 0}, {"xevan", xevan_hash, 0x100, 0, 0}, {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, diff --git a/stratum/stratum.cpp.bak b/stratum/stratum.cpp.bak deleted file mode 100644 index b6999ff5d..000000000 --- a/stratum/stratum.cpp.bak +++ /dev/null @@ -1,486 +0,0 @@ - -#include "stratum.h" -#include -#include - -CommonList g_list_coind; -CommonList g_list_client; -CommonList g_list_job; -CommonList g_list_remote; -CommonList g_list_renter; -CommonList g_list_share; -CommonList g_list_worker; -CommonList g_list_block; -CommonList g_list_submit; -CommonList g_list_source; - -int g_tcp_port; - -char g_tcp_server[1024]; -char g_tcp_password[1024]; - -char g_sql_host[1024]; -char g_sql_database[1024]; -char g_sql_username[1024]; -char g_sql_password[1024]; -int g_sql_port = 3306; - -char g_stratum_coin_include[256]; -char g_stratum_coin_exclude[256]; - -char g_stratum_algo[256]; -double g_stratum_difficulty; -double g_stratum_nicehash_difficulty; -double g_stratum_nicehash_min_diff; -double g_stratum_nicehash_max_diff; -double g_stratum_min_diff; -double g_stratum_max_diff; - -int g_stratum_max_ttf; -int g_stratum_max_cons = 5000; -bool g_stratum_reconnect; -bool g_stratum_renting; -bool g_stratum_segwit = false; - -int g_limit_txs_per_block = 0; - -bool g_handle_haproxy_ips = false; -int g_socket_recv_timeout = 600; - -bool g_debuglog_client; -bool g_debuglog_hash; -bool g_debuglog_socket; -bool g_debuglog_rpc; -bool g_debuglog_list; -bool g_debuglog_remote; - -bool g_autoexchange = true; - -uint64_t g_max_shares = 0; -uint64_t g_shares_counter = 0; -uint64_t g_shares_log = 0; - -bool g_allow_rolltime = true; -time_t g_last_broadcasted = 0; -YAAMP_DB *g_db = NULL; - -pthread_mutex_t g_db_mutex; -pthread_mutex_t g_nonce1_mutex; -pthread_mutex_t g_job_create_mutex; - -struct ifaddrs *g_ifaddr; - -volatile bool g_exiting = false; - -void *stratum_thread(void *p); -void *monitor_thread(void *p); - -//////////////////////////////////////////////////////////////////////////////////////// - -static void scrypt_hash(const char* input, char* output, uint32_t len) -{ - scrypt_1024_1_1_256((unsigned char *)input, (unsigned char *)output); -} - -static void scryptn_hash(const char* input, char* output, uint32_t len) -{ - time_t time_table[][2] = - { - {2048, 1389306217}, - {4096, 1456415081}, - {8192, 1506746729}, - {16384, 1557078377}, - {32768, 1657741673}, - {65536, 1859068265}, - {131072, 2060394857}, - {262144, 1722307603}, - {524288, 1769642992}, - {0, 0}, - }; - - for(int i=0; time_table[i][0]; i++) - if(time(NULL) < time_table[i+1][1]) - { - scrypt_N_R_1_256(input, output, time_table[i][0], 1, len); - return; - } -} - -static void neoscrypt_hash(const char* input, char* output, uint32_t len) -{ - neoscrypt((unsigned char *)input, (unsigned char *)output, 0x80000620); -} - -YAAMP_ALGO g_algos[] = -{ - {"a5a", a5a_hash, 0x10000, 0, 0}, - {"aergo", aergo_hash, 1, 0, 0}, - {"allium", allium_hash, 0x100, 0, 0}, - {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, - {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation - {"argon2m", argon2m_hash, 0x10000, 0, 0}, - {"balloon", balloon_hash, 1, 0, 0}, - {"bastion", bastion_hash, 1, 0 }, - {"bcd", bcd_hash, 1, 0, 0}, - {"binarium-v1", Binarium_hash_v1_hash, 1, 0, 0}, - {"bitcore", timetravel10_hash, 0x100, 0, 0}, - {"blake", blake_hash, 1, 0 }, - {"blake2b", blake2b_hash, 1, 0 }, - {"blake2s", blake2s_hash, 1, 0 }, - {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, - {"bmw", bmw_hash, 1, 0, 0}, - {"c11", c11_hash, 1, 0, 0}, - {"decred", decred_hash, 1, 0 }, - {"dedal", dedal_hash, 0x100, 0, 0}, - {"deep", deep_hash, 1, 0, 0}, - {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ - {"exosis", exosis_hash, 0x100, 0, 0}, - {"fresh", fresh_hash, 0x100, 0, 0}, - {"geek", geek_hash, 1, 0, 0}, - {"groestl", groestl_hash, 0x100, 0, sha256_hash_hex }, /* groestlcoin */ - {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, - {"hive", hive_hash, 0x10000, 0, 0}, - {"hmq1725", hmq17_hash, 0x10000, 0, 0}, - {"hsr", hsr_hash, 1, 0, 0}, - {"jha", jha_hash, 0x10000, 0}, - {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, - {"keccakc", keccak256_hash, 0x100, 0, 0}, - {"lbk3", lbk3_hash, 0x100, 0, 0}, - {"lbry", lbry_hash, 0x100, 0, 0}, - {"luffa", luffa_hash, 1, 0, 0}, - {"lyra2", lyra2re_hash, 0x80, 0, 0}, - {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, - {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, - {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, - {"lyra2z", lyra2z_hash, 0x100, 0, 0}, - {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, - {"m7m", m7m_hash, 0x10000, 0, 0}, - {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ - {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, - {"nist5", nist5_hash, 1, 0, 0}, - {"penta", penta_hash, 1, 0, 0}, - {"phi", phi_hash, 1, 0, 0}, - {"phi2", phi2_hash, 0x100, 0, 0}, - {"phi1612", phi1612_hash, 1, 0, 0}, - {"pipe", pipe_hash, 1,0,0}, - {"polytimos", polytimos_hash, 1, 0, 0}, - {"quark", quark_hash, 1, 0, 0}, - {"qubit", qubit_hash, 1, 0, 0}, - {"rainforest", rainforest_hash, 1, 0, 0}, - {"scrypt", scrypt_hash, 0x10000, 0, 0}, - {"scryptn", scryptn_hash, 0x10000, 0, 0}, - {"sha256", sha256_double_hash, 1, 0, 0}, - {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x - {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x - {"sib", sib_hash, 1, 0, 0}, - {"skein", skein_hash, 1, 0, 0}, - {"skein2", skein2_hash, 1, 0, 0}, - {"skunk", skunk_hash, 1, 0, 0}, - {"sonoa", sonoa_hash, 1, 0, 0}, - {"timetravel", timetravel_hash, 0x100, 0, 0}, - {"tribus", tribus_hash, 1, 0, 0}, - {"vanilla", blakecoin_hash, 1, 0 }, - {"veltor", veltor_hash, 1, 0, 0}, - {"velvet", velvet_hash, 0x10000, 0, 0}, - {"vitalium", vitalium_hash, 1, 0, 0}, - {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ - {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ - {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, - {"x11", x11_hash, 1, 0, 0}, - {"x11evo", x11evo_hash, 1, 0, 0}, - {"x12", x12_hash, 1, 0, 0}, - {"x13", x13_hash, 1, 0, 0}, - {"x14", x14_hash, 1, 0, 0}, - {"x15", x15_hash, 1, 0, 0}, - {"x16r", x16r_hash, 0x100, 0, 0}, - {"x16rt", x16rt_hash, 0x100, 0, 0}, - {"x16s", x16s_hash, 0x100, 0, 0}, - {"x17", x17_hash, 1, 0, 0}, - {"x18", x18_hash, 1, 0, 0}, - {"x20r", x20r_hash, 0x100, 0, 0}, - {"x21s", x21s_hash, 0x100, 0, 0}, - {"x22i", x22i_hash, 1, 0, 0}, - {"xevan", xevan_hash, 0x100, 0, 0}, - {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, - {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, - {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, - {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, - {"yespower", yespower_hash, 0x10000, 0, 0 }, - {"yespowerR16", yespowerR16_hash, 0x10000, 0, 0 }, - {"zr5", zr5_hash, 1, 0, 0}, - {"", NULL, 0, 0}, -}; - -YAAMP_ALGO *g_current_algo = NULL; - -YAAMP_ALGO *stratum_find_algo(const char *name) -{ - for(int i=0; g_algos[i].name[0]; i++) - if(!strcmp(name, g_algos[i].name)) - return &g_algos[i]; - - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////////////// - -int main(int argc, char **argv) -{ - if(argc < 2) - { - printf("usage: %s \n", argv[0]); - return 1; - } - - srand(time(NULL)); - getifaddrs(&g_ifaddr); - - initlog(argv[1]); - -#ifdef NO_EXCHANGE - // todo: init with a db setting or a yiimp shell command - g_autoexchange = false; -#endif - - char configfile[1024]; - sprintf(configfile, "%s.conf", argv[1]); - - dictionary *ini = iniparser_load(configfile); - if(!ini) - { - debuglog("cant load config file %s\n", configfile); - return 1; - } - - g_tcp_port = iniparser_getint(ini, "TCP:port", 3333); - strcpy(g_tcp_server, iniparser_getstring(ini, "TCP:server", NULL)); - strcpy(g_tcp_password, iniparser_getstring(ini, "TCP:password", NULL)); - - strcpy(g_sql_host, iniparser_getstring(ini, "SQL:host", NULL)); - strcpy(g_sql_database, iniparser_getstring(ini, "SQL:database", NULL)); - strcpy(g_sql_username, iniparser_getstring(ini, "SQL:username", NULL)); - strcpy(g_sql_password, iniparser_getstring(ini, "SQL:password", NULL)); - g_sql_port = iniparser_getint(ini, "SQL:port", 3306); - - // optional coin filters (to mine only one on a special port or a test instance) - char *coin_filter = iniparser_getstring(ini, "WALLETS:include", NULL); - strcpy(g_stratum_coin_include, coin_filter ? coin_filter : ""); - coin_filter = iniparser_getstring(ini, "WALLETS:exclude", NULL); - strcpy(g_stratum_coin_exclude, coin_filter ? coin_filter : ""); - - strcpy(g_stratum_algo, iniparser_getstring(ini, "STRATUM:algo", NULL)); - g_stratum_difficulty = iniparser_getdouble(ini, "STRATUM:difficulty", 16); - g_stratum_nicehash_difficulty = iniparser_getdouble(ini, "STRATUM:nicehash", 16); - g_stratum_min_diff = iniparser_getdouble(ini, "STRATUM:diff_min", g_stratum_difficulty/2); - g_stratum_max_diff = iniparser_getdouble(ini, "STRATUM:diff_max", g_stratum_difficulty*8192); - g_stratum_nicehash_min_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_min", g_stratum_nicehash_difficulty/2); - g_stratum_nicehash_max_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_max", g_stratum_nicehash_difficulty*8192); - - g_stratum_max_cons = iniparser_getint(ini, "STRATUM:max_cons", 5000); - g_stratum_max_ttf = iniparser_getint(ini, "STRATUM:max_ttf", 0x70000000); - g_stratum_reconnect = iniparser_getint(ini, "STRATUM:reconnect", true); - g_stratum_renting = iniparser_getint(ini, "STRATUM:renting", true); - g_handle_haproxy_ips = iniparser_getint(ini, "STRATUM:haproxy_ips", g_handle_haproxy_ips); - g_socket_recv_timeout = iniparser_getint(ini, "STRATUM:recv_timeout", 600); - - g_max_shares = iniparser_getint(ini, "STRATUM:max_shares", g_max_shares); - g_limit_txs_per_block = iniparser_getint(ini, "STRATUM:max_txs_per_block", 0); - - g_debuglog_client = iniparser_getint(ini, "DEBUGLOG:client", false); - g_debuglog_hash = iniparser_getint(ini, "DEBUGLOG:hash", false); - g_debuglog_socket = iniparser_getint(ini, "DEBUGLOG:socket", false); - g_debuglog_rpc = iniparser_getint(ini, "DEBUGLOG:rpc", false); - g_debuglog_list = iniparser_getint(ini, "DEBUGLOG:list", false); - g_debuglog_remote = iniparser_getint(ini, "DEBUGLOG:remote", false); - - iniparser_freedict(ini); - - g_current_algo = stratum_find_algo(g_stratum_algo); - - if(!g_current_algo) yaamp_error("invalid algo"); - if(!g_current_algo->hash_function) yaamp_error("no hash function"); - -// struct rlimit rlim_files = {0x10000, 0x10000}; -// setrlimit(RLIMIT_NOFILE, &rlim_files); - - struct rlimit rlim_threads = {0x8000, 0x8000}; - setrlimit(RLIMIT_NPROC, &rlim_threads); - - stratumlogdate("starting stratum for %s on %s:%d\n", - g_current_algo->name, g_tcp_server, g_tcp_port); - - // ntime should not be changed by miners for these algos - g_allow_rolltime = strcmp(g_stratum_algo,"x11evo"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"timetravel"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"bitcore"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"exosis"); - if (!g_allow_rolltime) - stratumlog("note: time roll disallowed for %s algo\n", g_current_algo->name); - - g_db = db_connect(); - if(!g_db) yaamp_error("Cant connect database"); - -// db_query(g_db, "update mining set stratumids='loading'"); - - yaamp_create_mutex(&g_db_mutex); - yaamp_create_mutex(&g_nonce1_mutex); - yaamp_create_mutex(&g_job_create_mutex); - - YAAMP_DB *db = db_connect(); - if(!db) yaamp_error("Cant connect database"); - - db_register_stratum(db); - db_update_algos(db); - db_update_coinds(db); - - sleep(2); - job_init(); - -// job_signal(); - - //////////////////////////////////////////////// - - pthread_t thread1; - pthread_create(&thread1, NULL, monitor_thread, NULL); - - pthread_t thread2; - pthread_create(&thread2, NULL, stratum_thread, NULL); - - sleep(20); - - while(!g_exiting) - { - db_register_stratum(db); - db_update_workers(db); - db_update_algos(db); - db_update_coinds(db); - - if(g_stratum_renting) - { - db_update_renters(db); - db_update_remotes(db); - } - - share_write(db); - share_prune(db); - - block_prune(db); - submit_prune(db); - - sleep(1); - job_signal(); - - //////////////////////////////////// - -// source_prune(); - - object_prune(&g_list_coind, coind_delete); - object_prune(&g_list_remote, remote_delete); - object_prune(&g_list_job, job_delete); - object_prune(&g_list_client, client_delete); - object_prune(&g_list_block, block_delete); - object_prune(&g_list_worker, worker_delete); - object_prune(&g_list_share, share_delete); - object_prune(&g_list_submit, submit_delete); - - if (!g_exiting) sleep(20); - } - - stratumlog("closing database...\n"); - db_close(db); - - pthread_join(thread2, NULL); - db_close(g_db); // client threads (called by stratum one) - - closelogs(); - - return 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -void *monitor_thread(void *p) -{ - while(!g_exiting) - { - sleep(120); - - if(g_last_broadcasted + YAAMP_MAXJOBDELAY < time(NULL)) - { - g_exiting = true; - stratumlogdate("%s dead lock, exiting...\n", g_stratum_algo); - exit(1); - } - - if(g_max_shares && g_shares_counter) { - - if((g_shares_counter - g_shares_log) > 10000) { - stratumlogdate("%s %luK shares...\n", g_stratum_algo, (g_shares_counter/1000u)); - g_shares_log = g_shares_counter; - } - - if(g_shares_counter > g_max_shares) { - g_exiting = true; - stratumlogdate("%s need a restart (%lu shares), exiting...\n", g_stratum_algo, (unsigned long) g_max_shares); - exit(1); - } - } - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void *stratum_thread(void *p) -{ - int listen_sock = socket(AF_INET, SOCK_STREAM, 0); - if(listen_sock <= 0) yaamp_error("socket"); - - int optval = 1; - setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval); - - struct sockaddr_in serv; - - serv.sin_family = AF_INET; - serv.sin_addr.s_addr = htonl(INADDR_ANY); - serv.sin_port = htons(g_tcp_port); - - int res = bind(listen_sock, (struct sockaddr*)&serv, sizeof(serv)); - if(res < 0) yaamp_error("bind"); - - res = listen(listen_sock, 4096); - if(res < 0) yaamp_error("listen"); - - ///////////////////////////////////////////////////////////////////////// - - int failcount = 0; - while(!g_exiting) - { - int sock = accept(listen_sock, NULL, NULL); - if(sock <= 0) - { - int error = errno; - stratumlog("%s socket accept() error %d\n", g_stratum_algo, error); - failcount++; - usleep(50000); - if (error == 24 && failcount > 5) { - g_exiting = true; // happen when max open files is reached (see ulimit) - stratumlogdate("%s too much socket failure, exiting...\n", g_stratum_algo); - exit(error); - } - continue; - } - - failcount = 0; - pthread_t thread; - int res = pthread_create(&thread, NULL, client_thread, (void *)(long)sock); - if(res != 0) - { - int error = errno; - close(sock); - g_exiting = true; - stratumlog("%s pthread_create error %d %d\n", g_stratum_algo, res, error); - } - - pthread_detach(thread); - } -} diff --git a/stratum/stratum.h b/stratum/stratum.h index c89a32d7b..a1fab5627 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -230,6 +230,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/x20r.h" #include "algos/x21s.h" #include "algos/x22i.h" +#include "algos/x25x.h" #include "algos/xevan.h" #include "algos/yescrypt.h" #include "algos/yespower.h" diff --git a/stratum/stratum.h.bak b/stratum/stratum.h.bak deleted file mode 100644 index b7f287362..000000000 --- a/stratum/stratum.h.bak +++ /dev/null @@ -1,235 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace std; - -#include "iniparser/src/iniparser.h" - -#include "json.h" -#include "util.h" - -#define YAAMP_RESTARTDELAY (24*60*60) -#define YAAMP_MAXJOBDELAY (2*60) -#define CURL_RPC_TIMEOUT (30) - -#define YAAMP_MS 1000 -#define YAAMP_SEC 1000000 - -#define YAAMP_MAXALGOS 32 - -typedef void (*YAAMP_HASH_FUNCTION)(const char *, char *, uint32_t); - -#define YAAMP_SHAREPERSEC 10 - -#define YAAMP_MINDIFF 0x0000000080000000 -#define YAAMP_MAXDIFF 0x4000000000000000 - -#define YAAMP_SMALLBUFSIZE (32*1024) - -#define YAAMP_NONCE_SIZE 4 -#define YAAMP_EXTRANONCE2_SIZE 4 - -#define YAAMP_HASHLEN_STR 65 -#define YAAMP_HASHLEN_BIN 32 - -extern CommonList g_list_coind; -extern CommonList g_list_client; -extern CommonList g_list_job; -extern CommonList g_list_remote; -extern CommonList g_list_renter; -extern CommonList g_list_share; -extern CommonList g_list_worker; -extern CommonList g_list_block; -extern CommonList g_list_submit; -extern CommonList g_list_source; - -extern int g_tcp_port; - -extern char g_tcp_server[1024]; -extern char g_tcp_password[1024]; - -extern char g_sql_host[1024]; -extern char g_sql_database[1024]; -extern char g_sql_username[1024]; -extern char g_sql_password[1024]; -extern int g_sql_port; - -extern char g_stratum_coin_include[256]; -extern char g_stratum_coin_exclude[256]; - -extern char g_stratum_algo[256]; -extern double g_stratum_difficulty; -extern double g_stratum_min_diff; -extern double g_stratum_max_diff; -extern double g_stratum_nicehash_difficulty; -extern double g_stratum_nicehash_min_diff; -extern double g_stratum_nicehash_max_diff; - -extern int g_stratum_max_cons; -extern int g_stratum_max_ttf; -extern bool g_stratum_reconnect; -extern bool g_stratum_renting; -extern bool g_stratum_segwit; -extern int g_limit_txs_per_block; - -extern bool g_handle_haproxy_ips; -extern int g_socket_recv_timeout; - -extern bool g_debuglog_client; -extern bool g_debuglog_hash; -extern bool g_debuglog_socket; -extern bool g_debuglog_rpc; -extern bool g_debuglog_list; -extern bool g_debuglog_remote; - -extern uint64_t g_max_shares; -extern uint64_t g_shares_counter; - -extern bool g_allow_rolltime; -extern time_t g_last_broadcasted; - -extern struct ifaddrs *g_ifaddr; - -extern pthread_mutex_t g_db_mutex; -extern pthread_mutex_t g_nonce1_mutex; -extern pthread_mutex_t g_job_create_mutex; - -extern volatile bool g_exiting; - -#include "db.h" -#include "object.h" -#include "socket.h" -#include "client.h" -#include "rpc.h" -#include "job.h" -#include "coind.h" -#include "remote.h" -#include "share.h" - -extern YAAMP_DB *g_db; -extern YAAMP_ALGO g_algos[]; -extern YAAMP_ALGO *g_current_algo; - -extern bool g_autoexchange; - -///////////////////////////////////////////////////////////////////////////////////////// - -YAAMP_ALGO *stratum_find_algo(const char *name); - -extern "C" -{ -void sha256_hash(const char *input, char *output, unsigned int len); -void sha256_double_hash(const char *input, char *output, unsigned int len); - -void scrypt_1024_1_1_256(const unsigned char *input, unsigned char *output); -void scrypt_N_R_1_256(const char* input, char* output, uint32_t N, uint32_t R, uint32_t len); -} - -void sha256_hash_hex(const char *input, char *output, unsigned int len); -void sha256_double_hash_hex(const char *input, char *output, unsigned int len); - - -#include "algos/a5a.h" -#include "algos/aergo.h" -#include "algos/allium.h" -#include "algos/argon2d.h" -#include "algos/argon2m.h" -#include "algos/balloon.h" -#include "algos/bastion.h" -#include "algos/bcd.h" -#include "algos/binarium_hash_v1.h" -#include "algos/bitcore.h" -#include "algos/blake.h" -#include "algos/blake2b.h" -#include "algos/blake2s.h" -#include "algos/blakecoin.h" -#include "algos/bmw.h" -#include "algos/c11.h" -#include "algos/dedal.h" -#include "algos/deep.h" -#include "algos/exosis.h" -#include "algos/fresh.h" -#include "algos/geek.h" -#include "algos/gltalgos.h" -#include "algos/groestl.h" -#include "algos/hex.h" -#include "algos/hive.h" -#include "algos/hmq17.h" -#include "algos/hsr14.h" -#include "algos/jha.h" -#include "algos/keccak.h" -#include "algos/lbk3.h" -#include "algos/lbry.h" -#include "algos/luffa.h" -#include "algos/lyra2re.h" -#include "algos/lyra2v2.h" -#include "algos/lyra2v3.h" -#include "algos/lyra2vc0ban.h" -#include "algos/lyra2z.h" -#include "algos/lyra2zz.h" -#include "algos/m7m.h" -#include "algos/neoscrypt.h" -#include "algos/nist5.h" -#include "algos/pentablake.h" -#include "algos/phi.h" -#include "algos/phi2.h" -#include "algos/phi1612.h" -#include "algos/pipehash.h" -#include "algos/polytimos.h" -#include "algos/quark.h" -#include "algos/qubit.h" -#include "algos/rainforest.h" -#include "algos/sha256q.h" -#include "algos/sha256t.h" -#include "algos/sib.h" -#include "algos/skein.h" -#include "algos/skein2.h" -#include "algos/skunk.h" -#include "algos/sonoa.h" -#include "algos/timetravel.h" -#include "algos/tribus.h" -#include "algos/veltor.h" -#include "algos/velvet.h" -#include "algos/vitalium.h" -#include "algos/whirlpool.h" -#include "algos/whirlpoolx.h" -#include "algos/x11.h" -#include "algos/x11evo.h" -#include "algos/x12.h" -#include "algos/x13.h" -#include "algos/x14.h" -#include "algos/x15.h" -#include "algos/x16r.h" -#include "algos/x16rt.h" -#include "algos/x16s.h" -#include "algos/x17.h" -#include "algos/x18.h" -#include "algos/x20r.h" -#include "algos/x21s.h" -#include "algos/x22i.h" -#include "algos/xevan.h" -#include "algos/yescrypt.h" -#include "algos/yespower.h" -#include "algos/zr5.h" diff --git a/stratum/user.cpp.bak b/stratum/user.cpp.bak deleted file mode 100644 index ab2806ddd..000000000 --- a/stratum/user.cpp.bak +++ /dev/null @@ -1,214 +0,0 @@ - -#include "stratum.h" - -// sql injection security, unwanted chars -void db_check_user_input(char* input) -{ - char *p = NULL; - if (input && input[0]) { - p = strpbrk(input, " \"'\\"); - if(p) *p = '\0'; - } -} - -void db_check_coin_symbol(YAAMP_DB *db, char* symbol) -{ - if (!symbol) return; - size_t len = strlen(symbol); - if (len >= 2 && len <= 12) { -#ifdef NO_EXCHANGE - db_query(db, "SELECT symbol FROM coins WHERE installed AND algo='%s' AND symbol='%s'", g_stratum_algo, symbol); -#else - db_query(db, "SELECT symbol FROM coins WHERE installed AND (symbol='%s' OR symbol2='%s')", symbol, symbol); -#endif - MYSQL_RES *result = mysql_store_result(&db->mysql); - *symbol = '\0'; - if (!result) return; - MYSQL_ROW row = mysql_fetch_row(result); - if (row) { - strcpy(symbol, row[0]); - } - mysql_free_result(result); - } else { - *symbol = '\0'; - } -} - -void db_add_user(YAAMP_DB *db, YAAMP_CLIENT *client) -{ - db_clean_string(db, client->username); - db_clean_string(db, client->password); - db_clean_string(db, client->version); - db_clean_string(db, client->notify_id); - db_clean_string(db, client->worker); - - char symbol[16] = { 0 }; - char *p = strstr(client->password, "c="); - if(!p) p = strstr(client->password, "s="); - if(p) strncpy(symbol, p+2, 15); - p = strchr(symbol, ','); - if(p) *p = '\0'; - - bool guest = false; - int gift = -1; -#ifdef ALLOW_CUSTOM_DONATIONS - // donation percent - p = strstr(client->password, "g="); - if(p) gift = atoi(p+2); - if(gift > 100) gift = 100; -#endif - - db_check_user_input(client->username); - if(strlen(client->username) < MIN_ADDRESS_LEN) { - // allow benchmark / test / donate usernames - if (!strcmp(client->username, "benchmark") || !strcmp(client->username, "donate") || !strcmp(client->username, "test") || !strcmp(client->username, "matrixbit")) { - guest = true; - if (g_list_coind.first) { - CLI li = g_list_coind.first; - YAAMP_COIND *coind = (YAAMP_COIND *)li->data; - if (!strlen(client->worker)) strcpy(client->worker, client->username); - strcpy(client->username, coind->wallet); - if (!strcmp(client->username, "benchmark")) strcat(client->password, ",stats"); - if (!strcmp(client->username, "donate")) gift = 100; - } - } - if (!guest) { - debuglog("Invalid user address '%s'\n", client->username); - return; - } - } - - // debuglog("user %s %s gives %d %\n", client->username, symbol, gift); - db_query(db, "SELECT id, is_locked, logtraffic, coinid, donation FROM accounts WHERE username='%s'", client->username); - - MYSQL_RES *result = mysql_store_result(&db->mysql); - if(!result) return; - - MYSQL_ROW row = mysql_fetch_row(result); - if(row) - { - if(row[1] && atoi(row[1])) client->userid = -1; - else client->userid = atoi(row[0]); - - client->logtraffic = row[2] && atoi(row[2]); - client->coinid = row[3] ? atoi(row[3]) : 0; - if (gift == -1) gift = row[4] ? atoi(row[4]) : 0; // keep current - } - - mysql_free_result(result); - - db_check_user_input(symbol); - db_check_coin_symbol(db, symbol); - - if (gift < 0) gift = 0; - client->donation = gift; - - if(client->userid == -1) - return; - - else if(client->userid == 0 && strlen(client->username) >= MIN_ADDRESS_LEN) - { - db_query(db, "INSERT INTO accounts (username, coinsymbol, balance, donation, hostaddr) values ('%s', '%s', 0, %d, '%s')", - client->username, symbol, gift, client->sock->ip); - client->userid = (int)mysql_insert_id(&db->mysql); - } - - else { - db_query(db, "UPDATE accounts SET coinsymbol='%s', swap_time=%u, donation=%d, hostaddr='%s' WHERE id=%d AND balance = 0" - " AND (SELECT COUNT(id) FROM payouts WHERE account_id=%d AND tx IS NULL) = 0" // failed balance - " AND (SELECT pending FROM balanceuser WHERE userid=%d ORDER by time DESC LIMIT 1) = 0" // pending balance - , symbol, (uint) time(NULL), gift, client->sock->ip, client->userid, client->userid, client->userid); - if (mysql_affected_rows(&db->mysql) > 0 && strlen(symbol)) { - debuglog("%s: %s coinsymbol set to %s ip %s uid (%d)\n", - g_current_algo->name, client->username, symbol, client->sock->ip, client->userid); - } - } -} - -////////////////////////////////////////////////////////////////////////////////////// - -void db_clear_worker(YAAMP_DB *db, YAAMP_CLIENT *client) -{ - if(!client->workerid) - return; - - db_query(db, "DELETE FROM workers WHERE id=%d", client->workerid); - client->workerid = 0; -} - -void db_add_worker(YAAMP_DB *db, YAAMP_CLIENT *client) -{ - char password[128] = { 0 }; - char version[128] = { 0 }; - char worker[128] = { 0 }; - int now = time(NULL); - - db_clear_worker(db, client); - - db_check_user_input(client->username); - db_check_user_input(client->version); - db_check_user_input(client->password); - db_check_user_input(client->worker); - - // strip for recent mysql defaults (error if fields are too long) - if (strlen(client->password) > 64) - clientlog(client, "password too long truncated: %s", client->password); - if (strlen(client->version) > 64) - clientlog(client, "version too long truncated: %s", client->version); - if (strlen(client->worker) > 64) - clientlog(client, "worker too long truncated: %s", client->worker); - - strncpy(password, client->password, 64); - strncpy(version, client->version, 64); - strncpy(worker, client->worker, 64); - - db_query(db, "INSERT INTO workers (userid, ip, name, difficulty, version, password, worker, algo, time, pid) "\ - "VALUES (%d, '%s', '%s', %f, '%s', '%s', '%s', '%s', %d, %d)", - client->userid, client->sock->ip, client->username, client->difficulty_actual, - version, password, worker, g_stratum_algo, now, getpid()); - - client->workerid = (int)mysql_insert_id(&db->mysql); -} - -void db_update_workers(YAAMP_DB *db) -{ - g_list_client.Enter(); - for(CLI li = g_list_client.first; li; li = li->next) - { - YAAMP_CLIENT *client = (YAAMP_CLIENT *)li->data; - if(client->deleted) continue; - if(!client->workerid) continue; - - if(client->speed < 0.00001) - { - clientlog(client, "speed %f", client->speed); - shutdown(client->sock->sock, SHUT_RDWR); - db_clear_worker(db, client); - object_delete(client); - continue; - } - - client->speed *= 0.8; - if(client->difficulty_written == client->difficulty_actual) continue; - - db_query(db, "UPDATE workers SET difficulty=%f, subscribe=%d WHERE id=%d", - client->difficulty_actual, client->extranonce_subscribe, client->workerid); - client->difficulty_written = client->difficulty_actual; - } - - //client_sort(); - g_list_client.Leave(); -} - -void db_init_user_coinid(YAAMP_DB *db, YAAMP_CLIENT *client) -{ - if (!client->userid) - return; - - if (!client->coinid) - db_query(db, "UPDATE accounts SET coinid=NULL WHERE id=%d", client->userid); - else - db_query(db, "UPDATE accounts SET coinid=%d WHERE id=%d AND IFNULL(coinid,0) = 0", - client->coinid, client->userid); -} - From 6e6abbd2d124725db25127bb923787676beb84ca Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 30 May 2019 14:09:42 -0400 Subject: [PATCH 473/576] Update coinbase.cpp --- stratum/coinbase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 284d4d655..70f239b59 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -304,7 +304,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if ((strcmp(coind->symbol, "IFX") == 0)|| + else if ( + (strcmp(coind->symbol, "IFX") == 0)|| (strcmp(coind->symbol, "GTM") == 0)|| (strcmp(coind->symbol, "GOV") == 0)|| (strcmp(coind->symbol, "GWAY") == 0)|| From d4160634d5a25d6a01264eae6f052a02313a62e1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 31 May 2019 10:50:50 -0400 Subject: [PATCH 474/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 70f239b59..d6620f9e7 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -312,6 +312,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * (strcmp(coind->symbol, "ALMN") == 0)|| (strcmp(coind->symbol, "AGM") == 0)|| (strcmp(coind->symbol, "BMN") == 0)|| + (strcmp(coind->symbol, "IHC") == 0)|| (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; From dca860e99e07f49a2f6a2805134baef0b292f2a1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 31 May 2019 10:57:38 -0400 Subject: [PATCH 475/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index d6620f9e7..376c96203 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -312,7 +312,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * (strcmp(coind->symbol, "ALMN") == 0)|| (strcmp(coind->symbol, "AGM") == 0)|| (strcmp(coind->symbol, "BMN") == 0)|| - (strcmp(coind->symbol, "IHC") == 0)|| (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; @@ -886,6 +885,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + if(strcmp(coind->symbol, "IHC") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; From c7f8e15d95ffb5bf87d34bedfd500ec33074697f Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sat, 1 Jun 2019 13:22:13 -0400 Subject: [PATCH 476/576] x25x update --- stratum/algos/x22i.c | 15 + stratum/algos/x22i.c.bak | 146 ++ stratum/algos/x22i.h | 1 + stratum/algos/x22i.h.bak | 16 + stratum/algos/x25x.c | 9 +- stratum/algos/x25x.c.bak | 174 ++ stratum/client_submit.cpp | 4 + stratum/client_submit.cpp.bak | 577 +++++++ stratum/coinbase.cpp | 42 +- stratum/coinbase.cpp.bak | 900 ++++++++++ stratum/config.sample/x25x.conf | 2 +- stratum/config.sample/x25x.conf.bak | 16 + stratum/sha3/lane.c | 2151 ++++++++++++++++++++++++ stratum/sha3/lane.h | 56 + web/yaamp/core/functions/yaamp.php | 3 + web/yaamp/core/functions/yaamp.php.bak | 19 +- 16 files changed, 4121 insertions(+), 10 deletions(-) create mode 100644 stratum/algos/x22i.c.bak create mode 100644 stratum/algos/x22i.h.bak create mode 100644 stratum/algos/x25x.c.bak create mode 100644 stratum/client_submit.cpp.bak create mode 100644 stratum/coinbase.cpp.bak create mode 100644 stratum/config.sample/x25x.conf.bak create mode 100644 stratum/sha3/lane.c create mode 100644 stratum/sha3/lane.h diff --git a/stratum/algos/x22i.c b/stratum/algos/x22i.c index 02a1aa3d5..c530e15c3 100644 --- a/stratum/algos/x22i.c +++ b/stratum/algos/x22i.c @@ -144,3 +144,18 @@ void x22i_hash(const char* input, char* output, uint32_t len) memcpy(output, hash, 32); } + +void hexlify(char *hex, const unsigned char *bin, int len) +{ + hex[0] = 0; + for(int i=0; i < len; i++) + sprintf(hex+strlen(hex), "%02x", bin[i]); +} + +void x22i_hash_hex(const char *input, char *output, unsigned int len) +{ + char output1[32]; + + x22i_hash(input, output1, len); + hexlify(output, (unsigned char *)output1, 32); +} diff --git a/stratum/algos/x22i.c.bak b/stratum/algos/x22i.c.bak new file mode 100644 index 000000000..02a1aa3d5 --- /dev/null +++ b/stratum/algos/x22i.c.bak @@ -0,0 +1,146 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SWIFFTX/SWIFFTX.h" +#include "gost.h" +#include "Lyra2.h" + +#include "common.h" + + +void x22i_hash(const char* input, char* output, uint32_t len) +{ + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_haval256_5_context ctx_haval; + sph_tiger_context ctx_tiger; + sph_gost512_context ctx_gost; + sph_sha256_context ctx_sha; + + unsigned char _ALIGN(128) hash[64 * 4] = {0}; + unsigned char _ALIGN(128) hash2[64]; + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, hash); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hash, 64); + sph_bmw512_close(&ctx_bmw, hash); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, hash, 64); + sph_groestl512_close(&ctx_groestl, hash); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hash, 64); + sph_skein512_close(&ctx_skein, hash); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hash, 64); + sph_jh512_close(&ctx_jh, hash); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, hash, 64); + sph_keccak512_close(&ctx_keccak, hash); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hash, 64); + sph_luffa512_close (&ctx_luffa, hash); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, hash, 64); + sph_cubehash512_close(&ctx_cubehash, hash); + + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, hash, 64); + sph_shavite512_close(&ctx_shavite, hash); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, hash, 64); + sph_simd512_close(&ctx_simd, hash); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hash, 64); + sph_echo512_close(&ctx_echo, hash); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hash, 64); + sph_hamsi512_close(&ctx_hamsi, hash); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, hash, 64); + sph_fugue512_close(&ctx_fugue, hash); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, (const void*) hash, 64); + sph_shabal512_close(&ctx_shabal, &hash[64]); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool (&ctx_whirlpool, (const void*) &hash[64], 64); + sph_whirlpool_close(&ctx_whirlpool, &hash[128]); + + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) &hash[128], 64); + sph_sha512_close(&ctx_sha512,(void*) &hash[192]); + + InitializeSWIFFTX(); + ComputeSingleSWIFFTX((unsigned char*)hash, (unsigned char*)hash2, false); + + memset(hash, 0, 64); + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval,(const void*) hash2, 64); + sph_haval256_5_close(&ctx_haval,hash); + + memset(hash2, 0, 64); + sph_tiger_init(&ctx_tiger); + sph_tiger (&ctx_tiger, (const void*) hash, 64); + sph_tiger_close(&ctx_tiger, (void*) hash2); + + memset(hash, 0, 64); + LYRA2((void*) hash, 32, (const void*) hash2, 32, (const void*) hash2, 32, 1, 4, 4); + + sph_gost512_init(&ctx_gost); + sph_gost512 (&ctx_gost, (const void*) hash, 64); + sph_gost512_close(&ctx_gost, (void*) hash); + + sph_sha256_init(&ctx_sha); + sph_sha256 (&ctx_sha, (const void*) hash, 64); + sph_sha256_close(&ctx_sha, (void*) hash); + + memcpy(output, hash, 32); +} diff --git a/stratum/algos/x22i.h b/stratum/algos/x22i.h index 502b8941f..ae6b13b82 100644 --- a/stratum/algos/x22i.h +++ b/stratum/algos/x22i.h @@ -8,6 +8,7 @@ extern "C" { #include void x22i_hash(const char* input, char* output, uint32_t len); +void x22i_hash_hex(const char *input, char *output, unsigned int len); #ifdef __cplusplus } diff --git a/stratum/algos/x22i.h.bak b/stratum/algos/x22i.h.bak new file mode 100644 index 000000000..502b8941f --- /dev/null +++ b/stratum/algos/x22i.h.bak @@ -0,0 +1,16 @@ +#ifndef X22I_H +#define X22I_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x22i_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/x25x.c b/stratum/algos/x25x.c index 0b3076d11..e6784518f 100644 --- a/stratum/algos/x25x.c +++ b/stratum/algos/x25x.c @@ -1,5 +1,3 @@ -#include -#include #include #include @@ -22,14 +20,12 @@ #include #include #include +#include #include "SWIFFTX/SWIFFTX.h" -#include "lane.h" #include "gost.h" #include "Lyra2.h" -#include "common.h" - void x25x_hash(const char* input, char* output, uint32_t len) { sph_blake512_context ctx_blake; @@ -54,8 +50,7 @@ void x25x_hash(const char* input, char* output, uint32_t len) sph_sha256_context ctx_sha; sph_panama_context ctx_panama; -// unsigned char _ALIGN(128) hash[25][64] = { [0 ... 24] = { [0 ... 63] = 0 } }; - unsigned char _ALIGN(128) hash[25][64] = { 0 }; + unsigned char hash[25][64] = { 0 }; sph_blake512_init(&ctx_blake); sph_blake512(&ctx_blake, input, len); diff --git a/stratum/algos/x25x.c.bak b/stratum/algos/x25x.c.bak new file mode 100644 index 000000000..0b3076d11 --- /dev/null +++ b/stratum/algos/x25x.c.bak @@ -0,0 +1,174 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SWIFFTX/SWIFFTX.h" +#include "lane.h" +#include "gost.h" +#include "Lyra2.h" + +#include "common.h" + +void x25x_hash(const char* input, char* output, uint32_t len) +{ + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_skein512_context ctx_skein; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_haval256_5_context ctx_haval; + sph_tiger_context ctx_tiger; + sph_gost512_context ctx_gost; + sph_sha256_context ctx_sha; + sph_panama_context ctx_panama; + +// unsigned char _ALIGN(128) hash[25][64] = { [0 ... 24] = { [0 ... 63] = 0 } }; + unsigned char _ALIGN(128) hash[25][64] = { 0 }; + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, &hash[0]); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, &hash[0], 64); + sph_bmw512_close(&ctx_bmw, &hash[1]); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, &hash[1], 64); + sph_groestl512_close(&ctx_groestl, &hash[2]); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, &hash[2], 64); + sph_skein512_close(&ctx_skein, &hash[3]); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, &hash[3], 64); + sph_jh512_close(&ctx_jh, &hash[4]); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, &hash[4], 64); + sph_keccak512_close(&ctx_keccak, &hash[5]); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, &hash[5], 64); + sph_luffa512_close (&ctx_luffa, &hash[6]); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, &hash[6], 64); + sph_cubehash512_close(&ctx_cubehash, &hash[7]); + + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, &hash[7], 64); + sph_shavite512_close(&ctx_shavite, &hash[8]); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, &hash[8], 64); + sph_simd512_close(&ctx_simd, &hash[9]); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, &hash[9], 64); + sph_echo512_close(&ctx_echo, &hash[10]); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, &hash[10], 64); + sph_hamsi512_close(&ctx_hamsi, &hash[11]); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, &hash[11], 64); + sph_fugue512_close(&ctx_fugue, &hash[12]); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, (const void*) &hash[12], 64); + sph_shabal512_close(&ctx_shabal, &hash[13]); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool (&ctx_whirlpool, (const void*) &hash[13], 64); + sph_whirlpool_close(&ctx_whirlpool, &hash[14]); + + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) &hash[14], 64); + sph_sha512_close(&ctx_sha512,(void*) &hash[15]); + + unsigned char temp[SWIFFTX_OUTPUT_BLOCK_SIZE] = {0}; + InitializeSWIFFTX(); + ComputeSingleSWIFFTX((unsigned char*)&hash[12], temp, false); + memcpy((unsigned char*)&hash[16], temp, 64); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval,(const void*) &hash[16], 64); + sph_haval256_5_close(&ctx_haval,&hash[17]); + + sph_tiger_init(&ctx_tiger); + sph_tiger (&ctx_tiger, (const void*) &hash[17], 64); + sph_tiger_close(&ctx_tiger, (void*) &hash[18]); + + LYRA2((void*) &hash[19], 32, (const void*) &hash[18], 32, (const void*) &hash[18], 32, 1, 4, 4); + + sph_gost512_init(&ctx_gost); + sph_gost512 (&ctx_gost, (const void*) &hash[19], 64); + sph_gost512_close(&ctx_gost, (void*) &hash[20]); + + sph_sha256_init(&ctx_sha); + sph_sha256 (&ctx_sha, (const void*) &hash[20], 64); + sph_sha256_close(&ctx_sha, (void*) &hash[21]); + + sph_panama_init(&ctx_panama); + sph_panama (&ctx_panama, (const void*) &hash[21], 64 ); + sph_panama_close(&ctx_panama, (void*) &hash[22]); + + laneHash(512, (const BitSequence*) &hash[22], 512, (BitSequence*) &hash[23]); + + // NEW simple shuffle algorithm, instead of just reversing + #define X25X_SHUFFLE_BLOCKS (24 /* number of algos so far */ * 64 /* output bytes per algo */ / 2 /* block size */) + #define X25X_SHUFFLE_ROUNDS 12 + + static const uint16_t x25x_round_const[X25X_SHUFFLE_ROUNDS] = { + 0x142c, 0x5830, 0x678c, 0xe08c, + 0x3c67, 0xd50d, 0xb1d8, 0xecb2, + 0xd7ee, 0x6783, 0xfa6c, 0x4b9c + }; + + uint16_t* block_pointer = (uint16_t*)hash; + for (int r = 0; r < X25X_SHUFFLE_ROUNDS; r++) { + for (int i = 0; i < X25X_SHUFFLE_BLOCKS; i++) { + uint16_t block_value = block_pointer[X25X_SHUFFLE_BLOCKS - i - 1]; + block_pointer[i] ^= block_pointer[block_value % X25X_SHUFFLE_BLOCKS] + (x25x_round_const[r] << (i % 16)); + } + } + + blake2s_simple((uint8_t*)&hash[24], (const void*)(&hash[0]), 64 * 24); + + memcpy(output, &hash[24], 32); +} diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index c11ed0d26..41951d070 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -286,6 +286,10 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + // isnt perfect, but it works + if(strcmp(coind->symbol, "SIN") == 0) + x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + char hash1[1024]; memset(hash1, 0, 1024); diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak new file mode 100644 index 000000000..c11ed0d26 --- /dev/null +++ b/stratum/client_submit.cpp.bak @@ -0,0 +1,577 @@ + +#include "stratum.h" + +uint64_t lyra2z_height = 0; + +//#define MERKLE_DEBUGLOG +//#define DONTSUBMIT + +void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, + const char *nonce1, const char *nonce2, const char *ntime, const char *nonce) +{ + sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); + int coinbase_len = strlen(submitvalues->coinbase); + + unsigned char coinbase_bin[1024]; + memset(coinbase_bin, 0, 1024); + binlify(coinbase_bin, submitvalues->coinbase); + + char doublehash[128]; + memset(doublehash, 0, 128); + + // some (old) wallet/algos need a simple SHA256 (blakecoin, whirlcoin, groestlcoin...) + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + if (g_current_algo->merkle_func) + merkle_hash = g_current_algo->merkle_func; + merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); + + string merkleroot = merkle_with_first(templ->txsteps, doublehash); + ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); + +#ifdef MERKLE_DEBUGLOG + printf("merkle root %s\n", merkleroot.c_str()); +#endif + if (!strcmp(g_stratum_algo, "lbry")) { + sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + templ->claim_be, ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); + } else if (strlen(templ->extradata_be) == 128) { // LUX SC + sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce, templ->extradata_be); + ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) + } else { + sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 20); + } + + binlify(submitvalues->header_bin, submitvalues->header_be); + +// printf("%s\n", submitvalues->header_be); + int header_len = strlen(submitvalues->header)/2; + g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); + + hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); + string_be(submitvalues->hash_hex, submitvalues->hash_be); +} + +///////////////////////////////////////////// + +static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *out, + const char *ntime, const char *nonce, const char *nonce2, const char *vote, bool usegetwork) +{ + struct __attribute__((__packed__)) { + uint32_t version; + char prevblock[32]; + char merkleroot[32]; + char stakeroot[32]; + uint16_t votebits; + char finalstate[6]; + uint16_t voters; + uint8_t freshstake; + uint8_t revoc; + uint32_t poolsize; + uint32_t nbits; + uint64_t sbits; + uint32_t height; + uint32_t size; + uint32_t ntime; + uint32_t nonce; + unsigned char extra[32]; + uint32_t stakever; + uint32_t hashtag[3]; + } header; + + memcpy(&header, templ->header, sizeof(header)); + + memset(header.extra, 0, 32); + sscanf(nonce, "%08x", &header.nonce); + + if (strcmp(vote, "")) { + uint16_t votebits = 0; + sscanf(vote, "%04hx", &votebits); + header.votebits = (header.votebits & 1) | (votebits & 0xfffe); + } + + binlify(header.extra, nonce2); + + hexlify(out->header, (const unsigned char*) &header, 180); + memcpy(out->header_bin, &header, sizeof(header)); +} + +static void build_submit_values_decred(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, + const char *nonce1, const char *nonce2, const char *ntime, const char *nonce, const char *vote, bool usegetwork) +{ + if (!usegetwork) { + // not used yet + char doublehash[128] = { 0 }; + + sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); + int coinbase_len = strlen(submitvalues->coinbase); + + unsigned char coinbase_bin[1024]; + memset(coinbase_bin, 0, 1024); + binlify(coinbase_bin, submitvalues->coinbase); + + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + if (g_current_algo->merkle_func) + merkle_hash = g_current_algo->merkle_func; + merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); + + string merkleroot = merkle_with_first(templ->txsteps, doublehash); + ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); + +#ifdef MERKLE_DEBUGLOG + printf("merkle root %s\n", merkleroot.c_str()); +#endif + } + create_decred_header(templ, submitvalues, ntime, nonce, nonce2, vote, usegetwork); + + int header_len = strlen(submitvalues->header)/2; + g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); + + hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); + string_be(submitvalues->hash_hex, submitvalues->hash_be); +} + +///////////////////////////////////////////////////////////////////////////////// + +static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VALUES *submitvalues, + char *extranonce2, char *ntime, char *nonce, char *vote) +{ + YAAMP_COIND *coind = job->coind; + YAAMP_JOB_TEMPLATE *templ = job->templ; + + if(job->block_found) return; + if(job->deleted) return; + + uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); + uint64_t coin_target = decode_compact(templ->nbits); + if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + int block_size = YAAMP_SMALLBUFSIZE; + vector::const_iterator i; + + for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) + block_size += strlen((*i).c_str()); + + char *block_hex = (char *)malloc(block_size); + if(!block_hex) return; + + // do aux first + for(int i=0; iauxs_size; i++) + { + if(!templ->auxs[i]) continue; + YAAMP_COIND *coind_aux = templ->auxs[i]->coind; + + if(!coind_aux || !strcmp(coind->symbol, coind_aux->symbol2)) + continue; + + unsigned char target_aux[1024]; + binlify(target_aux, coind_aux->aux.target); + + uint64_t coin_target_aux = get_hash_difficulty(target_aux); + if(hash_int <= coin_target_aux) + { + memset(block_hex, 0, block_size); + + strcat(block_hex, submitvalues->coinbase); // parent coinbase + strcat(block_hex, submitvalues->hash_be); // parent hash + + ////////////////////////////////////////////////// parent merkle steps + + sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)templ->txsteps.size()); + + vector::const_iterator i; + for(i = templ->txsteps.begin(); i != templ->txsteps.end(); ++i) + sprintf(block_hex + strlen(block_hex), "%s", (*i).c_str()); + + strcat(block_hex, "00000000"); + + ////////////////////////////////////////////////// auxs merkle steps + + vector lresult = coind_aux_merkle_branch(templ->auxs, templ->auxs_size, coind_aux->aux.index); + sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)lresult.size()); + + for(i = lresult.begin(); i != lresult.end(); ++i) + sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); + + sprintf(block_hex+strlen(block_hex), "%02x000000", (unsigned char)coind_aux->aux.index); + + ////////////////////////////////////////////////// parent header + + strcat(block_hex, submitvalues->header_be); + + bool b = coind_submitgetauxblock(coind_aux, coind_aux->aux.hash, block_hex); + if(b) + { + debuglog("*** ACCEPTED %s %d (+1)\n", coind_aux->name, coind_aux->height); + + block_add(client->userid, client->workerid, coind_aux->id, coind_aux->height, target_to_diff(coin_target_aux), + target_to_diff(hash_int), coind_aux->aux.hash, "", 0); + } + + else + debuglog("%s %d REJECTED\n", coind_aux->name, coind_aux->height); + } + } + + if(hash_int <= coin_target) + { + char count_hex[8] = { 0 }; + if (templ->txcount <= 252) + sprintf(count_hex, "%02x", templ->txcount & 0xFF); + else + sprintf(count_hex, "fd%02x%02x", templ->txcount & 0xFF, templ->txcount >> 8); + + memset(block_hex, 0, block_size); + sprintf(block_hex, "%s%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); + + if (g_current_algo->name && !strcmp("jha", g_current_algo->name)) { + // block header of 88 bytes + sprintf(block_hex, "%s8400000008000000%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); + } + + vector::const_iterator i; + for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) + sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); + + // POS coins need a zero byte appended to block, the daemon replaces it with the signature + if(coind->pos) + strcat(block_hex, "00"); + + if(!strcmp("DCR", coind->rpcencoding)) { + // submit the regenerated block header + char hex[384]; + hexlify(hex, submitvalues->header_bin, 180); + if (coind->usegetwork) + snprintf(block_hex, block_size, "%s8000000100000000000005a0", hex); + else + snprintf(block_hex, block_size, "%s", hex); + } + + if(g_current_algo->name && !strcmp("ZBIT", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } + if(g_current_algo->name && !strcmp("MLS", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } + + bool b = coind_submit(coind, block_hex); + if(b) + { + debuglog("*** ACCEPTED %s %d (diff %g) by %s (id: %d)\n", coind->name, templ->height, + target_to_diff(hash_int), client->sock->ip, client->userid); + + job->block_found = true; + + char doublehash2[128]; + memset(doublehash2, 0, 128); + + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + //if (g_current_algo->merkle_func) + // merkle_hash = g_current_algo->merkle_func; + + merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + + char hash1[1024]; + memset(hash1, 0, 1024); + + string_be(doublehash2, hash1); + + if(coind->usegetwork && !strcmp("DCR", coind->rpcencoding)) { + // no merkle stuff + strcpy(hash1, submitvalues->hash_hex); + } + + block_add(client->userid, client->workerid, coind->id, templ->height, + target_to_diff(coin_target), target_to_diff(hash_int), + hash1, submitvalues->hash_be, templ->has_segwit_txs); + + if(!strcmp("DCR", coind->rpcencoding)) { + // delay between dcrd and dcrwallet + sleep(1); + } + + if(!strcmp(coind->lastnotifyhash,submitvalues->hash_be)) { + block_confirm(coind->id, submitvalues->hash_be); + } + + if (g_debuglog_hash) { + debuglog("--------------------------------------------------------------\n"); + debuglog("hash1 %s\n", hash1); + debuglog("hash2 %s\n", submitvalues->hash_be); + } + } + + else { + debuglog("*** REJECTED :( %s block %d %d txs\n", coind->name, templ->height, templ->txcount); + rejectlog("REJECTED %s block %d\n", coind->symbol, templ->height); + if (g_debuglog_hash) { + //debuglog("block %s\n", block_hex); + debuglog("--------------------------------------------------------------\n"); + } + } + } + + free(block_hex); +} + +bool dump_submit_debug(const char *title, YAAMP_CLIENT *client, YAAMP_JOB *job, char *extranonce2, char *ntime, char *nonce) +{ + debuglog("ERROR %s, %s subs %d, job %x, %s, id %x, %d, %s, %s %s\n", + title, client->sock->ip, client->extranonce_subscribe, job? job->id: 0, client->extranonce1, + client->extranonce1_id, client->extranonce2size, extranonce2, ntime, nonce); +} + +void client_submit_error(YAAMP_CLIENT *client, YAAMP_JOB *job, int id, const char *message, char *extranonce2, char *ntime, char *nonce) +{ +// if(job->templ->created+2 > time(NULL)) + if(job && job->deleted) + client_send_result(client, "true"); + + else + { + client_send_error(client, id, message); + share_add(client, job, false, extranonce2, ntime, nonce, 0, id); + + client->submit_bad++; + if (g_debuglog_hash) { + dump_submit_debug(message, client, job, extranonce2, ntime, nonce); + } + } + + object_unlock(job); +} + +static bool ntime_valid_range(const char ntimehex[]) +{ + time_t rawtime = 0; + uint32_t ntime = 0; + if (strlen(ntimehex) != 8) return false; + sscanf(ntimehex, "%8x", &ntime); + if (ntime < 0x5b000000 || ntime > 0x60000000) // 14 Jan 2021 + return false; + time(&rawtime); + return (abs(rawtime - ntime) < (30 * 60)); +} + +static bool valid_string_params(json_value *json_params) +{ + for(int p=0; p < json_params->u.array.length; p++) { + if (!json_is_string(json_params->u.array.values[p])) + return false; + } + return true; +} + +bool client_submit(YAAMP_CLIENT *client, json_value *json_params) +{ + // submit(worker_name, jobid, extranonce2, ntime, nonce): + if(json_params->u.array.length<5 || !valid_string_params(json_params)) { + debuglog("%s - %s bad message\n", client->username, client->sock->ip); + client->submit_bad++; + return false; + } + + char extranonce2[32] = { 0 }; + char extra[160] = { 0 }; + char nonce[80] = { 0 }; + char ntime[32] = { 0 }; + char vote[8] = { 0 }; + + if (strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { + clientlog(client, "bad json, wrong jobid len"); + client->submit_bad++; + return false; + } + int jobid = htoi(json_params->u.array.values[1]->u.string.ptr); + + strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); + strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); + strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); + + string_lower(extranonce2); + string_lower(ntime); + string_lower(nonce); + + if (json_params->u.array.length == 6) { + if (strstr(g_stratum_algo, "phi")) { + // lux optional field, smart contral root hashes (not mandatory on shares submit) + strncpy(extra, json_params->u.array.values[5]->u.string.ptr, 128); + string_lower(extra); + } else { + // heavycoin vote + strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); + string_lower(vote); + } + } + + if (g_debuglog_hash) { + debuglog("submit %s (uid %d) %d, %s, t=%s, n=%s, extra=%s\n", client->sock->ip, client->userid, + jobid, extranonce2, ntime, nonce, extra); + } + + YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); + if(!job) + { + client_submit_error(client, NULL, 21, "Invalid job id", extranonce2, ntime, nonce); + return true; + } + + if(job->deleted) + { + client_send_result(client, "true"); + object_unlock(job); + + return true; + } + + bool is_decred = job->coind && !strcmp("DCR", job->coind->rpcencoding); + + YAAMP_JOB_TEMPLATE *templ = job->templ; + + if(strlen(nonce) != YAAMP_NONCE_SIZE*2 || !ishexa(nonce, YAAMP_NONCE_SIZE*2)) { + client_submit_error(client, job, 20, "Invalid nonce size", extranonce2, ntime, nonce); + return true; + } + + if(strcmp(ntime, templ->ntime)) + { + if (!ishexa(ntime, 8) || !ntime_valid_range(ntime)) { + client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); + return true; + } + // dont allow algos permutations change over time (can lead to different speeds) + if (!g_allow_rolltime) { + client_submit_error(client, job, 23, "Invalid ntime (rolling not allowed)", extranonce2, ntime, nonce); + return true; + } + } + + YAAMP_SHARE *share = share_find(job->id, extranonce2, ntime, nonce, client->extranonce1); + if(share) + { + client_submit_error(client, job, 22, "Duplicate share", extranonce2, ntime, nonce); + return true; + } + + if(strlen(extranonce2) != client->extranonce2size*2) + { + client_submit_error(client, job, 24, "Invalid extranonce2 size", extranonce2, ntime, nonce); + return true; + } + + // check if the submitted extranonce is valid + if(is_decred && client->extranonce2size > 4) { + char extra1_id[16], extra2_id[16]; + int cmpoft = client->extranonce2size*2 - 8; + strcpy(extra1_id, &client->extranonce1[cmpoft]); + strcpy(extra2_id, &extranonce2[cmpoft]); + int extradiff = (int) strcmp(extra2_id, extra1_id); + int extranull = (int) !strcmp(extra2_id, "00000000"); + if (extranull && client->extranonce2size > 8) + extranull = (int) !strcmp(&extranonce2[8], "00000000" "00000000"); + if (extranull) { + debuglog("extranonce %s is empty!, should be %s - %s\n", extranonce2, extra1_id, client->sock->ip); + client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); + return true; + } + if (extradiff) { + // some ccminer pre-release doesn't fill correctly the extranonce + client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); + socket_send(client->sock, "{\"id\":null,\"method\":\"mining.set_extranonce\",\"params\":[\"%s\",%d]}\n", + client->extranonce1, client->extranonce2size); + return true; + } + } + else if(!ishexa(extranonce2, client->extranonce2size*2)) { + client_submit_error(client, job, 27, "Invalid nonce2", extranonce2, ntime, nonce); + return true; + } + + /////////////////////////////////////////////////////////////////////////////////////////// + + YAAMP_JOB_VALUES submitvalues; + memset(&submitvalues, 0, sizeof(submitvalues)); + + if(is_decred) + build_submit_values_decred(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce, vote, true); + else + build_submit_values(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce); + + if (templ->height && !strcmp(g_current_algo->name,"lyra2z")) { + lyra2z_height = templ->height; + } + + // minimum hash diff begins with 0000, for all... + uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; + if(pfx) { + if (g_debuglog_hash) { + debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, + (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], + (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); + } + client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); + return true; + } + + uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); + uint64_t user_target = diff_to_target(client->difficulty_actual); + uint64_t coin_target = decode_compact(templ->nbits); + if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + if (g_debuglog_hash) { + debuglog("%016llx actual\n", hash_int); + debuglog("%016llx target\n", user_target); + debuglog("%016llx coin\n", coin_target); + } + if(hash_int > user_target && hash_int > coin_target) + { + client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); + return true; + } + + if(job->coind) + client_do_submit(client, job, &submitvalues, extranonce2, ntime, nonce, vote); + else + remote_submit(client, job, &submitvalues, extranonce2, ntime, nonce); + + client_send_result(client, "true"); + client_record_difficulty(client); + client->submit_bad = 0; + client->shares++; + if (client->shares <= 200 && (client->shares % 50) == 0) { + // 4 records are enough per miner + if (!client_ask_stats(client)) client->stats = false; + } + + double share_diff = diff_to_target(hash_int); +// if (g_current_algo->diff_multiplier != 0) { +// share_diff = share_diff / g_current_algo->diff_multiplier; +// } + + if (g_debuglog_hash) { + // only log a few... + if (share_diff > (client->difficulty_actual * 16)) + debuglog("submit %s (uid %d) %d, %s, %s, %s, %.3f/%.3f\n", client->sock->ip, client->userid, + jobid, extranonce2, ntime, nonce, share_diff, client->difficulty_actual); + } + + share_add(client, job, true, extranonce2, ntime, nonce, share_diff, 0); + object_unlock(job); + + return true; +} diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 376c96203..7bd8f1381 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -140,6 +140,47 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); } + + if(strcmp(coind->symbol, "SIN") == 0) + { + int npayees = 1; + char payees[2]; + char sinpayee[256] = {0}; + char sinscript[1024] = {0}; + char devpayee[256] = {0}; + char devscript[1024] = {0}; + const char *devpayaddr = json_get_string(json_result, "payee"); + json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); + snprintf(devpayee, 255, "%s", devpayaddr); + base58_decode(devpayee, devscript); + npayees++; + + available -= devfee_amount; + const char* mnpayaddrs[7] = {0}; + json_value* masternodes = json_get_array(json_result, "masternode"); + json_int_t mnamounts[7] = {0}; + for(int i = 0; i < masternodes->u.array.length; i++) { + mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); + mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); + available -= mnamounts[i]; + npayees++; + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); + for(int i = 0; i < masternodes->u.array.length; i++) { + snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); + base58_decode(sinpayee, sinscript); + job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); + } + + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000; + return; + } + else if(strcmp(coind->symbol, "DYN") == 0) { char script_dests[2048] = { 0 }; @@ -885,7 +926,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - if(strcmp(coind->symbol, "IHC") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak new file mode 100644 index 000000000..376c96203 --- /dev/null +++ b/stratum/coinbase.cpp.bak @@ -0,0 +1,900 @@ + +// http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html + +// https://en.bitcoin.it/wiki/Merged_mining_specification#Merged_mining_coinbase + +#include "stratum.h" + +#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) + +static void encode_tx_value(char *encoded, json_int_t value) +{ + sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", + TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), + TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); +} + +static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(payee) >> 1) & 0xFF, payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + encode_tx_value(evalue, amount); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + + +static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + encode_tx_value(evalue, amount); + sprintf(coinb2_part, "%s", script); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + +static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) +{ + int ol = strlen(data); + char evalue[32]; + + if(coind->p2sh_address && !key) { + p2sh_pack_tx(coind, data, amount, coind->script_pubkey); + return; + } + + encode_tx_value(evalue, amount); + sprintf(data+strlen(data), "%s", evalue); + + if(coind->pos && !key) + sprintf(data+strlen(data), "2321%sac", coind->pubkey); + + else + sprintf(data+strlen(data), "1976a914%s88ac", key? key: coind->script_pubkey); + +// debuglog("pack tx %s\n", data+ol); +// debuglog("pack tx %lld\n", amount); +} + +void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) +{ + vector hashlist = coind_aux_hashlist(templ->auxs, templ->auxs_size); + while(hashlist.size() > 1) + { + vector l; + for(int i = 0; i < hashlist.size()/2; i++) + { + string s = hashlist[i*2] + hashlist[i*2+1]; + + char bin[YAAMP_HASHLEN_BIN*2]; + char out[YAAMP_HASHLEN_STR]; + + binlify((unsigned char *)bin, s.c_str()); + sha256_double_hash_hex(bin, out, YAAMP_HASHLEN_BIN*2); + + l.push_back(out); + } + + hashlist = l; + } + + char merkle_hash[4*1024]; + memset(merkle_hash, 0, 4*1024); + string_be(hashlist[0].c_str(), merkle_hash); + + sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); +// debuglog("aux_script is %s\n", aux_script); +} + +void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) +{ + char eheight[32], etime[32]; + char entime[32] = { 0 }; + char commitment[128] = { 0 }; + + ser_number(templ->height, eheight); + ser_number(time(NULL), etime); + if(coind->pos) ser_string_be(templ->ntime, entime, 1); + + char eversion1[32] = "01000000"; + if(coind->txmessage) + strcpy(eversion1, "02000000"); + + const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); + if(coinbase_payload && strlen(coinbase_payload) > 0) + strcpy(eversion1, "03000500"); + + char script1[4*1024]; + sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); + + char script2[32] = "746865706f6f6c2e6c6966655c30"; // "thepool.life\0" in hex ascii + + if(!coind->pos && !coind->isaux && templ->auxs_size) + coinbase_aux(templ, script2); + + int script_len = strlen(script1)/2 + strlen(script2)/2 + 8; + sprintf(templ->coinb1, "%s%s01" + "0000000000000000000000000000000000000000000000000000000000000000" + "ffffffff%02x%s", eversion1, entime, script_len, script1); + + sprintf(templ->coinb2, "%s00000000", script2); + + // segwit commitment, if needed + if (templ->has_segwit_txs) + sprintf(commitment, "0000000000000000%02x%s", (int) (strlen(coind->commitment)/2), coind->commitment); + + json_int_t available = templ->value; + + // sample coins using mandatory dev/foundation fees + if(strcmp(coind->symbol, "EGC") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 2; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); + } + else if(strcmp(coind->symbol, "DYN") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[3]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool dynode_enabled; + dynode_enabled = json_get_bool(json_result, "dynode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* dynode; + dynode = json_get_object(json_result, "dynode"); + if(!dynode && json_get_bool(json_result, "dynode_payments")) { + coind->oldmasternodes = true; + debuglog("%s is using old dynodes rpc keys\n", coind->symbol); + return; + } + + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock found %s %u\n", coind->symbol, payee, amount); + } + } + } + if (dynode_enabled && dynode) { + bool started; + started = json_get_bool(json_result, "dynode_payments_started"); + const char *payee = json_get_string(dynode, "payee"); + json_int_t amount = json_get_int(dynode, "amount"); + if (!payee) + debuglog("coinbase_create failed to get Dynode payee\n"); + + if (!amount) + debuglog("coinbase_create failed to get Dynode amount\n"); + + if (!started) + debuglog("coinbase_create failed to get Dynode started\n"); + + if (payee && amount && started) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s dynode found %s %u\n", coind->symbol, payee, amount); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + else if(strcmp(coind->symbol, "LTCR") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 10; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); + } + else if(strcmp(coind->symbol, "XZC") == 0) { + char script_payee[1024]; + if (coind->charity_percent <= 0) + coind->charity_percent = 25; // wrong coinbase 40 instead of 40 + 10 = 50 + + json_int_t charity_amount = (available * coind->charity_percent) / 100; + + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD"); + + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode(coind->charity_address, script_payee); // may change + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + else if(strcmp("DCR", coind->rpcencoding) == 0) { + coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 + coind->charity_percent = 0; + coind->charity_amount = available; + available *= coind->reward_mul; + if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) + sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); + } + else if(strcmp(coind->symbol, "STAK") == 0) { + char script_payee[512] = { 0 }; + char payees[4]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + + //treasury 5% @ 10 STAK per block + json_int_t charity_amount = 50000000; + //testnet + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + switch (templ->height % 4) { + case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); + break; + case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); + break; + case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); + break; + case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); + break; + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + else if ( + (strcmp(coind->symbol, "IFX") == 0)|| + (strcmp(coind->symbol, "GTM") == 0)|| + (strcmp(coind->symbol, "GOV") == 0)|| + (strcmp(coind->symbol, "GWAY") == 0)|| + (strcmp(coind->symbol, "ALMN") == 0)|| + (strcmp(coind->symbol, "AGM") == 0)|| + (strcmp(coind->symbol, "BMN") == 0)|| + (strcmp(coind->symbol, "CRDS") == 0)) + { + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + if (masternode) + { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + else if(strcmp(coind->symbol, "BZX") == 0) { + char script_payee[1024]; + + bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "bznode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "04"); + job_pack_tx(coind, templ->coinb2, available, NULL); + + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "03"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + + base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); + job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); + + base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); + job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); + + + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + + return; + } + + else if(strcmp(coind->symbol, "SECI") == 0) { + char script_payee[512] = { 0 }; + char payees[1]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //mainnet + json_int_t charity_amount = 50000000; + sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); + //testnet + //json_int_t charity_amount = 50000000; + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + else if(strcmp(coind->symbol, "TUX") == 0) { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "donation_payee"); + if(payee != NULL){ + sprintf(coind->charity_address, "%s", payee); + } else { + sprintf(coind->charity_address, "%s", ""); + } + + if(strlen(coind->charity_address) > 0){ + char script_payee[1024]; + char charity_payee[256] = { 0 }; + sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "donation_amount"); + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + debuglog("pack tx %s\n", coinb2_part); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + } + + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); + json_value* founder = json_get_object(json_result, "founder"); + + if (!coind->hasmasternodes && founder_enabled && founder) { + char founder_payee[256] = { 0 }; + char founder_script[1024] = { 0}; + const char *payee = json_get_string(founder, "payee"); + bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); + json_int_t amount = json_get_int(founder, "amount"); + if(payee && amount) { + if (payee) snprintf(founder_payee, 255, "%s", payee); + if (strlen(founder_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + base58_decode(founder_payee, founder_script); + available -= amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + if(founder_use_p2sh) { + p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); + } else { + job_pack_tx(coind, templ->coinb2, amount, founder_script); + } + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); + debuglog("%s founder script %s\n", coind->symbol,founder_script); + debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); + + return; + } + } + + // 2 txs are required on these coins, one for foundation (dev fees) + if(coind->charity_percent && !coind->hasmasternodes) + { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + if (charity_amount <= 0) + charity_amount = (available * coind->charity_percent) / 100; + + available -= charity_amount; + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + + else if(coind->charity_amount && !strcmp("DCR", coind->rpcencoding)) + { + stratumlog("ERROR %s should not use coinbase (getwork only)!\n", coind->symbol); + coind->reward = (double)available/100000000; + return; + } + + if(strcmp(coind->symbol, "XVC") == 0) + { + char charity_payee[256]; + json_value* incentive = json_get_object(json_result, "incentive"); + if (incentive) { + const char* payee = json_get_string(incentive, "address"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + + bool enforced = json_get_bool(incentive, "enforced"); + json_int_t charity_amount = json_get_int(incentive, "amount"); + if (enforced && charity_amount && strlen(charity_payee)) { + char script_payee[1024]; + base58_decode(charity_payee, script_payee); + + strcat(templ->coinb2, "02"); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->charity_amount = charity_amount; + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("XVC coinbase %ld (+%ld incentive to %s)\n", + // (long) available, (long) charity_amount, charity_payee); + return; + } + } + } + + // most recent masternodes rpc (DASH, SIB, MUE, DSR, GBX...) + if(coind->hasmasternodes && !coind->oldmasternodes) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; // addresses count + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "masternode"); + if(!masternode && json_get_bool(json_result, "masternode_payments")) { + coind->oldmasternodes = true; + debuglog("%s is using old masternodes rpc keys\n", coind->symbol); + return; + } + if(coind->charity_percent) { + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + json_int_t charity_amount = (available * coind->charity_percent) / 100; + npayees++; + available -= charity_amount; + coind->charity_amount = charity_amount; + base58_decode(charity_payee, script_payee); + job_pack_tx(coind, script_dests, charity_amount, script_payee); + } + // smart contracts balance refund, same format as DASH superblocks + json_value* screfund = json_get_array(json_result, "screfund"); + if(screfund && screfund->u.array.length) { + superblocks_enabled = true; + superblock = screfund; + } + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + const char *script = json_get_string(superblock->u.array.values[i], "script"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(superblock_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (masternode_enabled && masternode && started) { + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i++) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + const char *script = json_get_string(masternode->u.array.values[i], "script"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + if(coinbase_payload && strlen(coinbase_payload) > 0) { + char coinbase_payload_size[18]; + ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload); strcat(templ->coinb2, coinbase_payload); + } + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ARC") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "goldminenode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ENT") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "eternitynode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "eternitynode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + + else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ + { + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + bool charity_payments = json_get_bool(json_result, "masternode_payments"); + bool charity_enforce = json_get_bool(json_result, "enforce_masternode_payments"); + + if(strcmp(coind->symbol, "CRW") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + bool systemnodes_enabled = json_get_bool(json_result, "enforce_systemnode_payments"); + bool systemnodes = json_get_bool(json_result, "systemnodes"); + bool masternodes = json_get_bool(json_result, "masternodes"); + if(systemnodes_enabled && systemnodes) { + const char *payeeSN = json_get_string(json_result, "payeeSN"); + json_int_t payeeSN_amount = json_get_int(json_result, "payeeSN_amount"); + if (payeeSN && payeeSN_amount) { + npayees++; + available -= payeeSN_amount; + base58_decode(payeeSN, script_payee); + job_pack_tx(coind, script_dests, payeeSN_amount, script_payee); + //debuglog("%s systemnode %s %u\n", coind->symbol, payeeSN, payeeSN_amount); + } + } + if (masternodes_enabled && masternodes) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + if(charity_payments && charity_enforce) + { + char script_payee[256] = { 0 }; + base58_decode(charity_payee, script_payee); + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + node + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); // 2 outputs + } + + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + available -= charity_amount; + + } else { + strcat(templ->coinb2, "01"); + } + } + + else if (templ->has_segwit_txs) { + strcat(templ->coinb2, "02"); + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "01"); + } + + job_pack_tx(coind, templ->coinb2, available, NULL); + + //if(coind->txmessage) + // strcat(templ->coinb2, "00"); + if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. + if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + if(strcmp(coind->symbol, "IHC") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; +// debuglog("coinbase %f\n", coind->reward); + +// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); +// debuglog("coinb1 %s\n", templ->coinb1); +// debuglog("coinb2 %s\n", templ->coinb2); +} + + + diff --git a/stratum/config.sample/x25x.conf b/stratum/config.sample/x25x.conf index eb8e667ca..eca7c3eac 100644 --- a/stratum/config.sample/x25x.conf +++ b/stratum/config.sample/x25x.conf @@ -11,6 +11,6 @@ password = patofpaq [STRATUM] algo = x25x -difficulty = 0.008 +difficulty = 0.0025 max_ttf = 50000 diff --git a/stratum/config.sample/x25x.conf.bak b/stratum/config.sample/x25x.conf.bak new file mode 100644 index 000000000..eb8e667ca --- /dev/null +++ b/stratum/config.sample/x25x.conf.bak @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 3423 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = x25x +difficulty = 0.008 +max_ttf = 50000 + diff --git a/stratum/sha3/lane.c b/stratum/sha3/lane.c new file mode 100644 index 000000000..ee2cd0576 --- /dev/null +++ b/stratum/sha3/lane.c @@ -0,0 +1,2151 @@ +/* + * Copyright (c) 2008 Sebastiaan Indesteege + * + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Optimised ANSI-C implementation of LANE + */ + +#include "lane.h" + +#define T8(x) ((x) & 0xff) +#define B0(x) (T8((x) )) +#define B1(x) (T8((x) >> 8)) +#define B2(x) (T8((x) >> 16)) +#define B3(x) (T8((x) >> 24)) +#define MSB32(x) ((u32)((((u64)(x))>>32) & 0xffffffff)) +#define LSB32(x) ((u32)((((u64)(x)) ) & 0xffffffff)) +#ifdef LANE_BIG_ENDIAN +#define U8TO32_BIG(c) (((u32*)(c))[0]) +#define U32TO8_BIG(c, v) ((u32*)(c))[0]=v +#else +#define U8TO32_BIG(c) (((u32)T8(*((u8*)(c))) << 24) | \ + ((u32)T8(*(((u8*)(c)) + 1)) << 16) | \ + ((u32)T8(*(((u8*)(c)) + 2)) << 8) | \ + ((u32)T8(*(((u8*)(c)) + 3)))) +#define U32TO8_BIG(c, v) do { \ + u32 tmp_portable_h_x = (v); \ + u8 *tmp_portable_h_d = (c); \ + tmp_portable_h_d[0] = T8(tmp_portable_h_x >> 24); \ + tmp_portable_h_d[1] = T8(tmp_portable_h_x >> 16); \ + tmp_portable_h_d[2] = T8(tmp_portable_h_x >> 8); \ + tmp_portable_h_d[3] = T8(tmp_portable_h_x); \ + } while (0) +#endif /* LANE_BIG_ENDIAN */ + +static const u32 iv224[8] = { + 0xc8245a86U, 0x8d733102U, 0x314ddcb9U, 0xf60a7ef4U, + 0x57b8c917U, 0xeefeaec2U, 0xff4fc3beU, 0x87c4728eU +}; + +static const u32 iv256[8] = { + 0xbe292e17U, 0xbb541ff2U, 0xfe54b6f7U, 0x30b1c96aU, + 0x7b259268U, 0x8539bdf3U, 0x97c4bdd6U, 0x49763fb8U +}; + +static const u32 iv384[16] = { + 0x148922ceU, 0x548c3001U, 0x76978bc8U, 0x266e008cU, + 0x3dc60765U, 0xd85b09d9U, 0x4cb1c8d8U, 0xe2cab952U, + 0xdb72be8eU, 0x685f0783U, 0xfa436c3dU, 0x4b9acb90U, + 0x5088dd47U, 0x932f55a9U, 0xa0c415c6U, 0xdb6dd795U +}; + +static const u32 iv512[16] = { + 0x9b603481U, 0x1d5a931bU, 0x69c4e6e0U, 0x975e2681U, + 0xb863ba53U, 0x8d1be11bU, 0x77340080U, 0xd42c48a5U, + 0x3a3a1d61U, 0x1cf3a1c4U, 0xf0a30347U, 0x7e56a44aU, + 0x9530ee60U, 0xdadb05b6U, 0x3ae3ac7cU, 0xd732ac6aU +}; + +static const u32 T0[256] = { + 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, + 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, + 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, + 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, + 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, + 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, + 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, + 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, + 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, + 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, + 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, + 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, + 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, + 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, + 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, + 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, + 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, + 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, + 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, + 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, + 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, + 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, + 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, + 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, + 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, + 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, + 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, + 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, + 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, + 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, + 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, + 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, + 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, + 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, + 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, + 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, + 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, + 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, + 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, + 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, + 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, + 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, + 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, + 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, + 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, + 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, + 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, + 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, + 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, + 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, + 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, + 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, + 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, + 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, + 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, + 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, + 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, + 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, + 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, + 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, + 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, + 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, + 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, + 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, +}; +static const u32 T1[256] = { + 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, + 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, + 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, + 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, + 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, + 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, + 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, + 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, + 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, + 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, + 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, + 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, + 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, + 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, + 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, + 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, + 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, + 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, + 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, + 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, + 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, + 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, + 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, + 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, + 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, + 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, + 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, + 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, + 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, + 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, + 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, + 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, + 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, + 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, + 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, + 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, + 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, + 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, + 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, + 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, + 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, + 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, + 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, + 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, + 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, + 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, + 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, + 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, + 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, + 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, + 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, + 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, + 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, + 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, + 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, + 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, + 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, + 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, + 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, + 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, + 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, + 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, + 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, + 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, +}; +static const u32 T2[256] = { + 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, + 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, + 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, + 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, + 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, + 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, + 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, + 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, + 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, + 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, + 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, + 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, + 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, + 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, + 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, + 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, + 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, + 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, + 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, + 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, + 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, + 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, + 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, + 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, + 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, + 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, + 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, + 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, + 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, + 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, + 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, + 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, + 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, + 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, + 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, + 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, + 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, + 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, + 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, + 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, + 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, + 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, + 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, + 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, + 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, + 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, + 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, + 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, + 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, + 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, + 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, + 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, + 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, + 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, + 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, + 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, + 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, + 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, + 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, + 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, + 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, + 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, + 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, + 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, +}; +static const u32 T3[256] = { + 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, + 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, + 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, + 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, + 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, + 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, + 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, + 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, + 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, + 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, + 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, + 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, + 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, + 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, + 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, + 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, + 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, + 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, + 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, + 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, + 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, + 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, + 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, + 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, + 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, + 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, + 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, + 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, + 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, + 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, + 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, + 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, + 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, + 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, + 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, + 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, + 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, + 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, + 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, + 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, + 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, + 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, + 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, + 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, + 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, + 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, + 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, + 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, + 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, + 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, + 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, + 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, + 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, + 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, + 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, + 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, + 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, + 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, + 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, + 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, + 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, + 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, + 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, + 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, +}; + +static const u32 C[768] = { + 0x07fc703d, 0xd3fe381f, 0xb9ff1c0e, 0x5cff8e07, 0xfe7fc702, 0x7f3fe381, 0xef9ff1c1, 0xa7cff8e1, + 0x83e7fc71, 0x91f3fe39, 0x98f9ff1d, 0x9c7cff8f, 0x9e3e7fc6, 0x4f1f3fe3, 0xf78f9ff0, 0x7bc7cff8, + 0x3de3e7fc, 0x1ef1f3fe, 0x0f78f9ff, 0xd7bc7cfe, 0x6bde3e7f, 0xe5ef1f3e, 0x72f78f9f, 0xe97bc7ce, + 0x74bde3e7, 0xea5ef1f2, 0x752f78f9, 0xea97bc7d, 0xa54bde3f, 0x82a5ef1e, 0x4152f78f, 0xf0a97bc6, + 0x7854bde3, 0xec2a5ef0, 0x76152f78, 0x3b0a97bc, 0x1d854bde, 0x0ec2a5ef, 0xd76152f6, 0x6bb0a97b, + 0xe5d854bc, 0x72ec2a5e, 0x3976152f, 0xccbb0a96, 0x665d854b, 0xe32ec2a4, 0x71976152, 0x38cbb0a9, + 0xcc65d855, 0xb632ec2b, 0x8b197614, 0x458cbb0a, 0x22c65d85, 0xc1632ec3, 0xb0b19760, 0x5858cbb0, + 0x2c2c65d8, 0x161632ec, 0x0b0b1976, 0x05858cbb, 0xd2c2c65c, 0x6961632e, 0x34b0b197, 0xca5858ca, + 0x652c2c65, 0xe2961633, 0xa14b0b18, 0x50a5858c, 0x2852c2c6, 0x14296163, 0xda14b0b0, 0x6d0a5858, + 0x36852c2c, 0x1b429616, 0x0da14b0b, 0xd6d0a584, 0x6b6852c2, 0x35b42961, 0xcada14b1, 0xb56d0a59, + 0x8ab6852d, 0x955b4297, 0x9aada14a, 0x4d56d0a5, 0xf6ab6853, 0xab55b428, 0x55aada14, 0x2ad56d0a, + 0x156ab685, 0xdab55b43, 0xbd5aada0, 0x5ead56d0, 0x2f56ab68, 0x17ab55b4, 0x0bd5aada, 0x05ead56d, + 0xd2f56ab7, 0xb97ab55a, 0x5cbd5aad, 0xfe5ead57, 0xaf2f56aa, 0x5797ab55, 0xfbcbd5ab, 0xade5ead4, + 0x56f2f56a, 0x2b797ab5, 0xc5bcbd5b, 0xb2de5eac, 0x596f2f56, 0x2cb797ab, 0xc65bcbd4, 0x632de5ea, + 0x3196f2f5, 0xc8cb797b, 0xb465bcbc, 0x5a32de5e, 0x2d196f2f, 0xc68cb796, 0x63465bcb, 0xe1a32de4, + 0x70d196f2, 0x3868cb79, 0xcc3465bd, 0xb61a32df, 0x8b0d196e, 0x45868cb7, 0xf2c3465a, 0x7961a32d, + 0xecb0d197, 0xa65868ca, 0x532c3465, 0xf9961a33, 0xaccb0d18, 0x5665868c, 0x2b32c346, 0x159961a3, + 0xdaccb0d0, 0x6d665868, 0x36b32c34, 0x1b59961a, 0x0daccb0d, 0xd6d66587, 0xbb6b32c2, 0x5db59961, + 0xfedaccb1, 0xaf6d6659, 0x87b6b32d, 0x93db5997, 0x99edacca, 0x4cf6d665, 0xf67b6b33, 0xab3db598, + 0x559edacc, 0x2acf6d66, 0x1567b6b3, 0xdab3db58, 0x6d59edac, 0x36acf6d6, 0x1b567b6b, 0xddab3db4, + 0x6ed59eda, 0x376acf6d, 0xcbb567b7, 0xb5dab3da, 0x5aed59ed, 0xfd76acf7, 0xaebb567a, 0x575dab3d, + 0xfbaed59f, 0xadd76ace, 0x56ebb567, 0xfb75dab2, 0x7dbaed59, 0xeedd76ad, 0xa76ebb57, 0x83b75daa, + 0x41dbaed5, 0xf0edd76b, 0xa876ebb4, 0x543b75da, 0x2a1dbaed, 0xc50edd77, 0xb2876eba, 0x5943b75d, + 0xfca1dbaf, 0xae50edd6, 0x572876eb, 0xfb943b74, 0x7dca1dba, 0x3ee50edd, 0xcf72876f, 0xb7b943b6, + 0x5bdca1db, 0xfdee50ec, 0x7ef72876, 0x3f7b943b, 0xcfbdca1c, 0x67dee50e, 0x33ef7287, 0xc9f7b942, + 0x64fbdca1, 0xe27dee51, 0xa13ef729, 0x809f7b95, 0x904fbdcb, 0x9827dee4, 0x4c13ef72, 0x2609f7b9, + 0xc304fbdd, 0xb1827def, 0x88c13ef6, 0x44609f7b, 0xf2304fbc, 0x791827de, 0x3c8c13ef, 0xce4609f6, + 0x672304fb, 0xe391827c, 0x71c8c13e, 0x38e4609f, 0xcc72304e, 0x66391827, 0xe31c8c12, 0x718e4609, + 0xe8c72305, 0xa4639183, 0x8231c8c0, 0x4118e460, 0x208c7230, 0x10463918, 0x08231c8c, 0x04118e46, + 0x0208c723, 0xd1046390, 0x688231c8, 0x344118e4, 0x1a208c72, 0x0d104639, 0xd688231d, 0xbb44118f, + 0x8da208c6, 0x46d10463, 0xf3688230, 0x79b44118, 0x3cda208c, 0x1e6d1046, 0x0f368823, 0xd79b4410, + 0x6bcda208, 0x35e6d104, 0x1af36882, 0x0d79b441, 0xd6bcda21, 0xbb5e6d11, 0x8daf3689, 0x96d79b45, + 0x9b6bcda3, 0x9db5e6d0, 0x4edaf368, 0x276d79b4, 0x13b6bcda, 0x09db5e6d, 0xd4edaf37, 0xba76d79a, + 0x5d3b6bcd, 0xfe9db5e7, 0xaf4edaf2, 0x57a76d79, 0xfbd3b6bd, 0xade9db5f, 0x86f4edae, 0x437a76d7, + 0xf1bd3b6a, 0x78de9db5, 0xec6f4edb, 0xa637a76c, 0x531bd3b6, 0x298de9db, 0xc4c6f4ec, 0x62637a76, + 0x3131bd3b, 0xc898de9c, 0x644c6f4e, 0x322637a7, 0xc9131bd2, 0x64898de9, 0xe244c6f5, 0xa122637b, + 0x809131bc, 0x404898de, 0x20244c6f, 0xc0122636, 0x6009131b, 0xe004898c, 0x700244c6, 0x38012263, + 0xcc009130, 0x66004898, 0x3300244c, 0x19801226, 0x0cc00913, 0xd6600488, 0x6b300244, 0x35980122, + 0x1acc0091, 0xdd660049, 0xbeb30025, 0x8f598013, 0x97acc008, 0x4bd66004, 0x25eb3002, 0x12f59801, + 0xd97acc01, 0xbcbd6601, 0x8e5eb301, 0x972f5981, 0x9b97acc1, 0x9dcbd661, 0x9ee5eb31, 0x9f72f599, + 0x9fb97acd, 0x9fdcbd67, 0x9fee5eb2, 0x4ff72f59, 0xf7fb97ad, 0xabfdcbd7, 0x85fee5ea, 0x42ff72f5, + 0xf17fb97b, 0xa8bfdcbc, 0x545fee5e, 0x2a2ff72f, 0xc517fb96, 0x628bfdcb, 0xe145fee4, 0x70a2ff72, + 0x38517fb9, 0xcc28bfdd, 0xb6145fef, 0x8b0a2ff6, 0x458517fb, 0xf2c28bfc, 0x796145fe, 0x3cb0a2ff, + 0xce58517e, 0x672c28bf, 0xe396145e, 0x71cb0a2f, 0xe8e58516, 0x7472c28b, 0xea396144, 0x751cb0a2, + 0x3a8e5851, 0xcd472c29, 0xb6a39615, 0x8b51cb0b, 0x95a8e584, 0x4ad472c2, 0x256a3961, 0xc2b51cb1, + 0xb15a8e59, 0x88ad472d, 0x9456a397, 0x9a2b51ca, 0x4d15a8e5, 0xf68ad473, 0xab456a38, 0x55a2b51c, + 0x2ad15a8e, 0x1568ad47, 0xdab456a2, 0x6d5a2b51, 0xe6ad15a9, 0xa3568ad5, 0x81ab456b, 0x90d5a2b4, + 0x486ad15a, 0x243568ad, 0xc21ab457, 0xb10d5a2a, 0x5886ad15, 0xfc43568b, 0xae21ab44, 0x5710d5a2, + 0x2b886ad1, 0xc5c43569, 0xb2e21ab5, 0x89710d5b, 0x94b886ac, 0x4a5c4356, 0x252e21ab, 0xc29710d4, + 0x614b886a, 0x30a5c435, 0xc852e21b, 0xb429710c, 0x5a14b886, 0x2d0a5c43, 0xc6852e20, 0x63429710, + 0x31a14b88, 0x18d0a5c4, 0x0c6852e2, 0x06342971, 0xd31a14b9, 0xb98d0a5d, 0x8cc6852f, 0x96634296, + 0x4b31a14b, 0xf598d0a4, 0x7acc6852, 0x3d663429, 0xceb31a15, 0xb7598d0b, 0x8bacc684, 0x45d66342, + 0x22eb31a1, 0xc17598d1, 0xb0bacc69, 0x885d6635, 0x942eb31b, 0x9a17598c, 0x4d0bacc6, 0x2685d663, + 0xc342eb30, 0x61a17598, 0x30d0bacc, 0x18685d66, 0x0c342eb3, 0xd61a1758, 0x6b0d0bac, 0x358685d6, + 0x1ac342eb, 0xdd61a174, 0x6eb0d0ba, 0x3758685d, 0xcbac342f, 0xb5d61a16, 0x5aeb0d0b, 0xfd758684, + 0x7ebac342, 0x3f5d61a1, 0xcfaeb0d1, 0xb7d75869, 0x8bebac35, 0x95f5d61b, 0x9afaeb0c, 0x4d7d7586, + 0x26bebac3, 0xc35f5d60, 0x61afaeb0, 0x30d7d758, 0x186bebac, 0x0c35f5d6, 0x061afaeb, 0xd30d7d74, + 0x6986beba, 0x34c35f5d, 0xca61afaf, 0xb530d7d6, 0x5a986beb, 0xfd4c35f4, 0x7ea61afa, 0x3f530d7d, + 0xcfa986bf, 0xb7d4c35e, 0x5bea61af, 0xfdf530d6, 0x7efa986b, 0xef7d4c34, 0x77bea61a, 0x3bdf530d, + 0xcdefa987, 0xb6f7d4c2, 0x5b7bea61, 0xfdbdf531, 0xaedefa99, 0x876f7d4d, 0x93b7bea7, 0x99dbdf52, + 0x4cedefa9, 0xf676f7d5, 0xab3b7beb, 0x859dbdf4, 0x42cedefa, 0x21676f7d, 0xc0b3b7bf, 0xb059dbde, + 0x582cedef, 0xfc1676f6, 0x7e0b3b7b, 0xef059dbc, 0x7782cede, 0x3bc1676f, 0xcde0b3b6, 0x66f059db, + 0xe3782cec, 0x71bc1676, 0x38de0b3b, 0xcc6f059c, 0x663782ce, 0x331bc167, 0xc98de0b2, 0x64c6f059, + 0xe263782d, 0xa131bc17, 0x8098de0a, 0x404c6f05, 0xf0263783, 0xa8131bc0, 0x54098de0, 0x2a04c6f0, + 0x15026378, 0x0a8131bc, 0x054098de, 0x02a04c6f, 0xd1502636, 0x68a8131b, 0xe454098c, 0x722a04c6, + 0x39150263, 0xcc8a8130, 0x66454098, 0x3322a04c, 0x19915026, 0x0cc8a813, 0xd6645408, 0x6b322a04, + 0x35991502, 0x1acc8a81, 0xdd664541, 0xbeb322a1, 0x8f599151, 0x97acc8a9, 0x9bd66455, 0x9deb322b, + 0x9ef59914, 0x4f7acc8a, 0x27bd6645, 0xc3deb323, 0xb1ef5990, 0x58f7acc8, 0x2c7bd664, 0x163deb32, + 0x0b1ef599, 0xd58f7acd, 0xbac7bd67, 0x8d63deb2, 0x46b1ef59, 0xf358f7ad, 0xa9ac7bd7, 0x84d63dea, + 0x426b1ef5, 0xf1358f7b, 0xa89ac7bc, 0x544d63de, 0x2a26b1ef, 0xc51358f6, 0x6289ac7b, 0xe144d63c, + 0x70a26b1e, 0x3851358f, 0xcc289ac6, 0x66144d63, 0xe30a26b0, 0x71851358, 0x38c289ac, 0x1c6144d6, + 0x0e30a26b, 0xd7185134, 0x6b8c289a, 0x35c6144d, 0xcae30a27, 0xb5718512, 0x5ab8c289, 0xfd5c6145, + 0xaeae30a3, 0x87571850, 0x43ab8c28, 0x21d5c614, 0x10eae30a, 0x08757185, 0xd43ab8c3, 0xba1d5c60, + 0x5d0eae30, 0x2e875718, 0x1743ab8c, 0x0ba1d5c6, 0x05d0eae3, 0xd2e87570, 0x69743ab8, 0x34ba1d5c, + 0x1a5d0eae, 0x0d2e8757, 0xd69743aa, 0x6b4ba1d5, 0xe5a5d0eb, 0xa2d2e874, 0x5169743a, 0x28b4ba1d, + 0xc45a5d0f, 0xb22d2e86, 0x59169743, 0xfc8b4ba0, 0x7e45a5d0, 0x3f22d2e8, 0x1f916974, 0x0fc8b4ba, + 0x07e45a5d, 0xd3f22d2f, 0xb9f91696, 0x5cfc8b4b, 0xfe7e45a4, 0x7f3f22d2, 0x3f9f9169, 0xcfcfc8b5, + 0xb7e7e45b, 0x8bf3f22c, 0x45f9f916, 0x22fcfc8b, 0xc17e7e44, 0x60bf3f22, 0x305f9f91, 0xc82fcfc9, + 0xb417e7e5, 0x8a0bf3f3, 0x9505f9f8, 0x4a82fcfc, 0x25417e7e, 0x12a0bf3f, 0xd9505f9e, 0x6ca82fcf, + 0xe65417e6, 0x732a0bf3, 0xe99505f8, 0x74ca82fc, 0x3a65417e, 0x1d32a0bf, 0xde99505e, 0x6f4ca82f, + 0xe7a65416, 0x73d32a0b, 0xe9e99504, 0x74f4ca82, 0x3a7a6541, 0xcd3d32a1, 0xb69e9951, 0x8b4f4ca9, + 0x95a7a655, 0x9ad3d32b, 0x9d69e994, 0x4eb4f4ca, 0x275a7a65, 0xc3ad3d33, 0xb1d69e98, 0x58eb4f4c, + 0x2c75a7a6, 0x163ad3d3, 0xdb1d69e8, 0x6d8eb4f4, 0x36c75a7a, 0x1b63ad3d, 0xddb1d69f, 0xbed8eb4e, + 0x5f6c75a7, 0xffb63ad2, 0x7fdb1d69, 0xefed8eb5, 0xa7f6c75b, 0x83fb63ac, 0x41fdb1d6, 0x20fed8eb, + 0xc07f6c74, 0x603fb63a, 0x301fdb1d, 0xc80fed8f, 0xb407f6c6, 0x5a03fb63, 0xfd01fdb0, 0x7e80fed8, + 0x3f407f6c, 0x1fa03fb6, 0x0fd01fdb, 0xd7e80fec, 0x6bf407f6, 0x35fa03fb, 0xcafd01fc, 0x657e80fe, + 0x32bf407f, 0xc95fa03e, 0x64afd01f, 0xe257e80e, 0x712bf407, 0xe895fa02, 0x744afd01, 0xea257e81, + 0xa512bf41, 0x82895fa1, 0x9144afd1, 0x98a257e9, 0x9c512bf5, 0x9e2895fb, 0x9f144afc, 0x4f8a257e, + 0x27c512bf, 0xc3e2895e, 0x61f144af, 0xe0f8a256, 0x707c512b, 0xe83e2894, 0x741f144a, 0x3a0f8a25, + 0xcd07c513, 0xb683e288, 0x5b41f144, 0x2da0f8a2, 0x16d07c51, 0xdb683e29, 0xbdb41f15, 0x8eda0f8b, + 0x976d07c4, 0x4bb683e2, 0x25db41f1, 0xc2eda0f9, 0xb176d07d, 0x88bb683f, 0x945db41e, 0x4a2eda0f, + 0xf5176d06, 0x7a8bb683, 0xed45db40, 0x76a2eda0, 0x3b5176d0, 0x1da8bb68, 0x0ed45db4, 0x076a2eda, + 0x03b5176d, 0xd1da8bb7, 0xb8ed45da, 0x5c76a2ed, 0xfe3b5177, 0xaf1da8ba, 0x578ed45d, 0xfbc76a2f, + 0xade3b516, 0x56f1da8b, 0xfb78ed44, 0x7dbc76a2, 0x3ede3b51, 0xcf6f1da9, 0xb7b78ed5, 0x8bdbc76b, + 0x95ede3b4, 0x4af6f1da, 0x257b78ed, 0xc2bdbc77, 0xb15ede3a, 0x58af6f1d, 0xfc57b78f, 0xae2bdbc6, + 0x5715ede3, 0xfb8af6f0, 0x7dc57b78, 0x3ee2bdbc, 0x1f715ede, 0x0fb8af6f, 0xd7dc57b6, 0x6bee2bdb, +}; + +void lane256_compress(const u8 m[64], u32 h[8], const u32 ctrh, const u32 ctrl) +{ + u32 t0, t1, t2, t3, t4, t5, t6, t7; /* temp */ + u32 s00, s01, s02, s03, s04, s05, s06, s07; /* lane 0 */ + u32 s10, s11, s12, s13, s14, s15, s16, s17; /* lane 1 */ + u32 s20, s21, s22, s23, s24, s25, s26, s27; /* lane 2 */ + u32 s30, s31, s32, s33, s34, s35, s36, s37; /* lane 3 */ + u32 s40, s41, s42, s43, s44, s45, s46, s47; /* lane 4 */ + u32 s50, s51, s52, s53, s54, s55, s56, s57; /* lane 5 */ + u32 s60, s61, s62, s63, s64, s65, s66, s67; /* lane 6 */ + u32 s70, s71, s72, s73, s74, s75, s76, s77; /* lane 7 */ + + /* Message expansion */ + s30 = h[0]; + s31 = h[1]; + s32 = h[2]; + s33 = h[3]; + s34 = h[4]; + s35 = h[5]; + s36 = h[6]; + s37 = h[7]; + s40 = U8TO32_BIG(m + 0); + s41 = U8TO32_BIG(m + 4); + s42 = U8TO32_BIG(m + 8); + s43 = U8TO32_BIG(m + 12); + s44 = U8TO32_BIG(m + 16); + s45 = U8TO32_BIG(m + 20); + s46 = U8TO32_BIG(m + 24); + s47 = U8TO32_BIG(m + 28); + s50 = U8TO32_BIG(m + 32); + s51 = U8TO32_BIG(m + 36); + s52 = U8TO32_BIG(m + 40); + s53 = U8TO32_BIG(m + 44); + s54 = U8TO32_BIG(m + 48); + s55 = U8TO32_BIG(m + 52); + s56 = U8TO32_BIG(m + 56); + s57 = U8TO32_BIG(m + 60); + s00 = s30 ^ s40 ^ s44 ^ s50 ^ s54; + s01 = s31 ^ s41 ^ s45 ^ s51 ^ s55; + s02 = s32 ^ s42 ^ s46 ^ s52 ^ s56; + s03 = s33 ^ s43 ^ s47 ^ s53 ^ s57; + s04 = s34 ^ s40 ^ s50; + s05 = s35 ^ s41 ^ s51; + s06 = s36 ^ s42 ^ s52; + s07 = s37 ^ s43 ^ s53; + s10 = s00 ^ s34 ^ s44; + s11 = s01 ^ s35 ^ s45; + s12 = s02 ^ s36 ^ s46; + s13 = s03 ^ s37 ^ s47; + s14 = s30 ^ s44 ^ s50; + s15 = s31 ^ s45 ^ s51; + s16 = s32 ^ s46 ^ s52; + s17 = s33 ^ s47 ^ s53; + s20 = s00 ^ s34 ^ s54; + s21 = s01 ^ s35 ^ s55; + s22 = s02 ^ s36 ^ s56; + s23 = s03 ^ s37 ^ s57; + s24 = s30 ^ s40 ^ s54; + s25 = s31 ^ s41 ^ s55; + s26 = s32 ^ s42 ^ s56; + s27 = s33 ^ s43 ^ s57; + + /* Lane 0 */ + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 0]; + t1 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 1]; + t4 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 2]; + t5 = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 3] ^ ctrh; + t2 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[ 4]; + t3 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[ 5]; + t6 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[ 6]; + t7 = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[ 7]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8]; + s01 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9]; + s04 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10]; + s05 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11] ^ ctrl; + s02 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12]; + s03 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13]; + s06 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14]; + s07 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[16]; + t1 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[17]; + t4 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[18]; + t5 = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[19] ^ ctrh; + t2 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[20]; + t3 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[21]; + t6 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[22]; + t7 = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[23]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24]; + s01 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25]; + s04 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26]; + s05 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27] ^ ctrl; + s02 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28]; + s03 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29]; + s06 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30]; + s07 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[32]; + t1 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[33]; + t4 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[34]; + t5 = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[35] ^ ctrh; + t2 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[36]; + t3 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[37]; + t6 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[38]; + t7 = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[39]; + + s60 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s61 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s64 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s65 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s62 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s63 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s66 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s67 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 1 */ + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 0+40]; + t1 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 1+40]; + t4 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 2+40]; + t5 = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 3+40] ^ ctrl; + t2 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[ 4+40]; + t3 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[ 5+40]; + t6 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[ 6+40]; + t7 = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[ 7+40]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+40]; + s11 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+40]; + s14 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+40]; + s15 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+40] ^ ctrh; + s12 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+40]; + s13 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+40]; + s16 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+40]; + s17 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+40]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[16+40]; + t1 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[17+40]; + t4 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[18+40]; + t5 = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[19+40] ^ ctrl; + t2 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[20+40]; + t3 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[21+40]; + t6 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[22+40]; + t7 = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[23+40]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+40]; + s11 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+40]; + s14 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+40]; + s15 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+40] ^ ctrh; + s12 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+40]; + s13 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+40]; + s16 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+40]; + s17 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+40]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[32+40]; + t1 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[33+40]; + t4 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[34+40]; + t5 = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[35+40] ^ ctrl; + t2 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[36+40]; + t3 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[37+40]; + t6 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[38+40]; + t7 = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[39+40]; + + s60 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s61 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s64 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s65 ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s62 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s63 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s66 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s67 ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 2 */ + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 0+80]; + t1 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 1+80]; + t4 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 2+80]; + t5 = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 3+80] ^ ctrh; + t2 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[ 4+80]; + t3 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[ 5+80]; + t6 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[ 6+80]; + t7 = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[ 7+80]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+80]; + s21 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+80]; + s24 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+80]; + s25 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+80] ^ ctrl; + s22 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+80]; + s23 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+80]; + s26 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+80]; + s27 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+80]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[16+80]; + t1 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[17+80]; + t4 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[18+80]; + t5 = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[19+80] ^ ctrh; + t2 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[20+80]; + t3 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[21+80]; + t6 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[22+80]; + t7 = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[23+80]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+80]; + s21 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+80]; + s24 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+80]; + s25 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+80] ^ ctrl; + s22 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+80]; + s23 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+80]; + s26 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+80]; + s27 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+80]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[32+80]; + t1 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[33+80]; + t4 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[34+80]; + t5 = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[35+80] ^ ctrh; + t2 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[36+80]; + t3 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[37+80]; + t6 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[38+80]; + t7 = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[39+80]; + + s60 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s61 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s64 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s65 ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s62 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s63 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s66 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s67 ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 3 */ + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 0+120]; + t1 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 1+120]; + t4 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 2+120]; + t5 = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 3+120] ^ ctrl; + t2 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[ 4+120]; + t3 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[ 5+120]; + t6 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[ 6+120]; + t7 = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[ 7+120]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+120]; + s31 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+120]; + s34 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+120]; + s35 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+120] ^ ctrh; + s32 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+120]; + s33 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+120]; + s36 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+120]; + s37 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+120]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[16+120]; + t1 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[17+120]; + t4 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[18+120]; + t5 = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[19+120] ^ ctrl; + t2 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[20+120]; + t3 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[21+120]; + t6 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[22+120]; + t7 = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[23+120]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+120]; + s31 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+120]; + s34 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+120]; + s35 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+120] ^ ctrh; + s32 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+120]; + s33 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+120]; + s36 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+120]; + s37 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+120]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[32+120]; + t1 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[33+120]; + t4 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[34+120]; + t5 = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[35+120] ^ ctrl; + t2 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[36+120]; + t3 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[37+120]; + t6 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[38+120]; + t7 = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[39+120]; + + s70 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s71 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s74 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s75 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s72 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s73 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s76 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s77 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 4 */ + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 0+160]; + t1 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 1+160]; + t4 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 2+160]; + t5 = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 3+160] ^ ctrh; + t2 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[ 4+160]; + t3 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[ 5+160]; + t6 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[ 6+160]; + t7 = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[ 7+160]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+160]; + s41 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+160]; + s44 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+160]; + s45 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+160] ^ ctrl; + s42 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+160]; + s43 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+160]; + s46 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+160]; + s47 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+160]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[16+160]; + t1 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[17+160]; + t4 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[18+160]; + t5 = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[19+160] ^ ctrh; + t2 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[20+160]; + t3 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[21+160]; + t6 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[22+160]; + t7 = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[23+160]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+160]; + s41 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+160]; + s44 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+160]; + s45 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+160] ^ ctrl; + s42 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+160]; + s43 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+160]; + s46 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+160]; + s47 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+160]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[32+160]; + t1 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[33+160]; + t4 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[34+160]; + t5 = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[35+160] ^ ctrh; + t2 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[36+160]; + t3 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[37+160]; + t6 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[38+160]; + t7 = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[39+160]; + + s70 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s71 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s74 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s75 ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s72 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s73 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s76 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s77 ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 5 */ + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 0+200]; + t1 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 1+200]; + t4 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 2+200]; + t5 = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 3+200] ^ ctrl; + t2 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[ 4+200]; + t3 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[ 5+200]; + t6 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[ 6+200]; + t7 = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[ 7+200]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+200]; + s51 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+200]; + s54 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+200]; + s55 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+200] ^ ctrh; + s52 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+200]; + s53 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+200]; + s56 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+200]; + s57 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+200]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[16+200]; + t1 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[17+200]; + t4 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[18+200]; + t5 = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[19+200] ^ ctrl; + t2 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[20+200]; + t3 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[21+200]; + t6 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[22+200]; + t7 = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[23+200]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[24+200]; + s51 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[25+200]; + s54 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[26+200]; + s55 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[27+200] ^ ctrh; + s52 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[28+200]; + s53 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[29+200]; + s56 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[30+200]; + s57 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[31+200]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[32+200]; + t1 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[33+200]; + t4 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[34+200]; + t5 = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[35+200] ^ ctrl; + t2 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[36+200]; + t3 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[37+200]; + t6 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[38+200]; + t7 = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[39+200]; + + s70 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s71 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s74 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s75 ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s72 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s73 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s76 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s77 ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + + /* Lane 6 */ + t0 = T0[B3(s60)] ^ T1[B2(s61)] ^ T2[B1(s62)] ^ T3[B0(s63)] ^ C[ 0+240]; + t1 = T0[B3(s61)] ^ T1[B2(s62)] ^ T2[B1(s63)] ^ T3[B0(s60)] ^ C[ 1+240]; + t4 = T0[B3(s62)] ^ T1[B2(s63)] ^ T2[B1(s60)] ^ T3[B0(s61)] ^ C[ 2+240]; + t5 = T0[B3(s63)] ^ T1[B2(s60)] ^ T2[B1(s61)] ^ T3[B0(s62)] ^ C[ 3+240] ^ ctrh; + t2 = T0[B3(s64)] ^ T1[B2(s65)] ^ T2[B1(s66)] ^ T3[B0(s67)] ^ C[ 4+240]; + t3 = T0[B3(s65)] ^ T1[B2(s66)] ^ T2[B1(s67)] ^ T3[B0(s64)] ^ C[ 5+240]; + t6 = T0[B3(s66)] ^ T1[B2(s67)] ^ T2[B1(s64)] ^ T3[B0(s65)] ^ C[ 6+240]; + t7 = T0[B3(s67)] ^ T1[B2(s64)] ^ T2[B1(s65)] ^ T3[B0(s66)] ^ C[ 7+240]; + + s60 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+240]; + s61 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+240]; + s64 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+240]; + s65 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+240] ^ ctrl; + s62 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+240]; + s63 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+240]; + s66 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+240]; + s67 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+240]; + + h[0] = T0[B3(s60)] ^ T1[B2(s61)] ^ T2[B1(s62)] ^ T3[B0(s63)]; + h[1] = T0[B3(s61)] ^ T1[B2(s62)] ^ T2[B1(s63)] ^ T3[B0(s60)]; + h[4] = T0[B3(s62)] ^ T1[B2(s63)] ^ T2[B1(s60)] ^ T3[B0(s61)]; + h[5] = T0[B3(s63)] ^ T1[B2(s60)] ^ T2[B1(s61)] ^ T3[B0(s62)]; + h[2] = T0[B3(s64)] ^ T1[B2(s65)] ^ T2[B1(s66)] ^ T3[B0(s67)]; + h[3] = T0[B3(s65)] ^ T1[B2(s66)] ^ T2[B1(s67)] ^ T3[B0(s64)]; + h[6] = T0[B3(s66)] ^ T1[B2(s67)] ^ T2[B1(s64)] ^ T3[B0(s65)]; + h[7] = T0[B3(s67)] ^ T1[B2(s64)] ^ T2[B1(s65)] ^ T3[B0(s66)]; + + /* Lane 7 */ + t0 = T0[B3(s70)] ^ T1[B2(s71)] ^ T2[B1(s72)] ^ T3[B0(s73)] ^ C[ 0+256]; + t1 = T0[B3(s71)] ^ T1[B2(s72)] ^ T2[B1(s73)] ^ T3[B0(s70)] ^ C[ 1+256]; + t4 = T0[B3(s72)] ^ T1[B2(s73)] ^ T2[B1(s70)] ^ T3[B0(s71)] ^ C[ 2+256]; + t5 = T0[B3(s73)] ^ T1[B2(s70)] ^ T2[B1(s71)] ^ T3[B0(s72)] ^ C[ 3+256] ^ ctrh; + t2 = T0[B3(s74)] ^ T1[B2(s75)] ^ T2[B1(s76)] ^ T3[B0(s77)] ^ C[ 4+256]; + t3 = T0[B3(s75)] ^ T1[B2(s76)] ^ T2[B1(s77)] ^ T3[B0(s74)] ^ C[ 5+256]; + t6 = T0[B3(s76)] ^ T1[B2(s77)] ^ T2[B1(s74)] ^ T3[B0(s75)] ^ C[ 6+256]; + t7 = T0[B3(s77)] ^ T1[B2(s74)] ^ T2[B1(s75)] ^ T3[B0(s76)] ^ C[ 7+256]; + + s70 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 8+256]; + s71 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 9+256]; + s74 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[10+256]; + s75 = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[11+256] ^ ctrl; + s72 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[12+256]; + s73 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[13+256]; + s76 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[14+256]; + s77 = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[15+256]; + + h[0] ^= T0[B3(s70)] ^ T1[B2(s71)] ^ T2[B1(s72)] ^ T3[B0(s73)]; + h[1] ^= T0[B3(s71)] ^ T1[B2(s72)] ^ T2[B1(s73)] ^ T3[B0(s70)]; + h[4] ^= T0[B3(s72)] ^ T1[B2(s73)] ^ T2[B1(s70)] ^ T3[B0(s71)]; + h[5] ^= T0[B3(s73)] ^ T1[B2(s70)] ^ T2[B1(s71)] ^ T3[B0(s72)]; + h[2] ^= T0[B3(s74)] ^ T1[B2(s75)] ^ T2[B1(s76)] ^ T3[B0(s77)]; + h[3] ^= T0[B3(s75)] ^ T1[B2(s76)] ^ T2[B1(s77)] ^ T3[B0(s74)]; + h[6] ^= T0[B3(s76)] ^ T1[B2(s77)] ^ T2[B1(s74)] ^ T3[B0(s75)]; + h[7] ^= T0[B3(s77)] ^ T1[B2(s74)] ^ T2[B1(s75)] ^ T3[B0(s76)]; +} + +void lane512_compress(const u8 m[128], u32 h[16], const u32 ctrh, const u32 ctrl) +{ + u32 t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, ta, tb, tc, td, te, tf; /* temp */ + u32 s00, s01, s02, s03, s04, s05, s06, s07, s08, s09, s0a, s0b, s0c, s0d, s0e, s0f; /* lane 0 */ + u32 s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s1a, s1b, s1c, s1d, s1e, s1f; /* lane 1 */ + u32 s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s2a, s2b, s2c, s2d, s2e, s2f; /* lane 2 */ + u32 s30, s31, s32, s33, s34, s35, s36, s37, s38, s39, s3a, s3b, s3c, s3d, s3e, s3f; /* lane 3 */ + u32 s40, s41, s42, s43, s44, s45, s46, s47, s48, s49, s4a, s4b, s4c, s4d, s4e, s4f; /* lane 4 */ + u32 s50, s51, s52, s53, s54, s55, s56, s57, s58, s59, s5a, s5b, s5c, s5d, s5e, s5f; /* lane 5 */ + u32 s60, s61, s62, s63, s64, s65, s66, s67, s68, s69, s6a, s6b, s6c, s6d, s6e, s6f; /* lane 6 */ + u32 s70, s71, s72, s73, s74, s75, s76, s77, s78, s79, s7a, s7b, s7c, s7d, s7e, s7f; /* lane 7 */ + + /* Message expansion */ + s30 = h[0]; + s31 = h[1]; + s32 = h[2]; + s33 = h[3]; + s34 = h[4]; + s35 = h[5]; + s36 = h[6]; + s37 = h[7]; + s38 = h[8]; + s39 = h[9]; + s3a = h[10]; + s3b = h[11]; + s3c = h[12]; + s3d = h[13]; + s3e = h[14]; + s3f = h[15]; + s40 = U8TO32_BIG(m + 0); + s41 = U8TO32_BIG(m + 4); + s42 = U8TO32_BIG(m + 8); + s43 = U8TO32_BIG(m + 12); + s44 = U8TO32_BIG(m + 16); + s45 = U8TO32_BIG(m + 20); + s46 = U8TO32_BIG(m + 24); + s47 = U8TO32_BIG(m + 28); + s48 = U8TO32_BIG(m + 32); + s49 = U8TO32_BIG(m + 36); + s4a = U8TO32_BIG(m + 40); + s4b = U8TO32_BIG(m + 44); + s4c = U8TO32_BIG(m + 48); + s4d = U8TO32_BIG(m + 52); + s4e = U8TO32_BIG(m + 56); + s4f = U8TO32_BIG(m + 60); + s50 = U8TO32_BIG(m + 64); + s51 = U8TO32_BIG(m + 68); + s52 = U8TO32_BIG(m + 72); + s53 = U8TO32_BIG(m + 76); + s54 = U8TO32_BIG(m + 80); + s55 = U8TO32_BIG(m + 84); + s56 = U8TO32_BIG(m + 88); + s57 = U8TO32_BIG(m + 92); + s58 = U8TO32_BIG(m + 96); + s59 = U8TO32_BIG(m + 100); + s5a = U8TO32_BIG(m + 104); + s5b = U8TO32_BIG(m + 108); + s5c = U8TO32_BIG(m + 112); + s5d = U8TO32_BIG(m + 116); + s5e = U8TO32_BIG(m + 120); + s5f = U8TO32_BIG(m + 124); + s00 = s30 ^ s40 ^ s48 ^ s50 ^ s58; + s01 = s31 ^ s41 ^ s49 ^ s51 ^ s59; + s02 = s32 ^ s42 ^ s4a ^ s52 ^ s5a; + s03 = s33 ^ s43 ^ s4b ^ s53 ^ s5b; + s04 = s34 ^ s44 ^ s4c ^ s54 ^ s5c; + s05 = s35 ^ s45 ^ s4d ^ s55 ^ s5d; + s06 = s36 ^ s46 ^ s4e ^ s56 ^ s5e; + s07 = s37 ^ s47 ^ s4f ^ s57 ^ s5f; + s08 = s38 ^ s40 ^ s50; + s09 = s39 ^ s41 ^ s51; + s0a = s3a ^ s42 ^ s52; + s0b = s3b ^ s43 ^ s53; + s0c = s3c ^ s44 ^ s54; + s0d = s3d ^ s45 ^ s55; + s0e = s3e ^ s46 ^ s56; + s0f = s3f ^ s47 ^ s57; + s10 = s00 ^ s38 ^ s48; + s11 = s01 ^ s39 ^ s49; + s12 = s02 ^ s3a ^ s4a; + s13 = s03 ^ s3b ^ s4b; + s14 = s04 ^ s3c ^ s4c; + s15 = s05 ^ s3d ^ s4d; + s16 = s06 ^ s3e ^ s4e; + s17 = s07 ^ s3f ^ s4f; + s18 = s30 ^ s48 ^ s50; + s19 = s31 ^ s49 ^ s51; + s1a = s32 ^ s4a ^ s52; + s1b = s33 ^ s4b ^ s53; + s1c = s34 ^ s4c ^ s54; + s1d = s35 ^ s4d ^ s55; + s1e = s36 ^ s4e ^ s56; + s1f = s37 ^ s4f ^ s57; + s20 = s00 ^ s38 ^ s58; + s21 = s01 ^ s39 ^ s59; + s22 = s02 ^ s3a ^ s5a; + s23 = s03 ^ s3b ^ s5b; + s24 = s04 ^ s3c ^ s5c; + s25 = s05 ^ s3d ^ s5d; + s26 = s06 ^ s3e ^ s5e; + s27 = s07 ^ s3f ^ s5f; + s28 = s30 ^ s40 ^ s58; + s29 = s31 ^ s41 ^ s59; + s2a = s32 ^ s42 ^ s5a; + s2b = s33 ^ s43 ^ s5b; + s2c = s34 ^ s44 ^ s5c; + s2d = s35 ^ s45 ^ s5d; + s2e = s36 ^ s46 ^ s5e; + s2f = s37 ^ s47 ^ s5f; + + /* Lane 0 */ + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 0]; + t4 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 1]; + t8 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 2]; + tc = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 3] ^ ctrh; + t1 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[ 4]; + t5 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[ 5]; + t9 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[ 6]; + td = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[ 7]; + t2 = T0[B3(s08)] ^ T1[B2(s09)] ^ T2[B1(s0a)] ^ T3[B0(s0b)] ^ C[ 8]; + t6 = T0[B3(s09)] ^ T1[B2(s0a)] ^ T2[B1(s0b)] ^ T3[B0(s08)] ^ C[ 9]; + ta = T0[B3(s0a)] ^ T1[B2(s0b)] ^ T2[B1(s08)] ^ T3[B0(s09)] ^ C[ 10]; + te = T0[B3(s0b)] ^ T1[B2(s08)] ^ T2[B1(s09)] ^ T3[B0(s0a)] ^ C[ 11]; + t3 = T0[B3(s0c)] ^ T1[B2(s0d)] ^ T2[B1(s0e)] ^ T3[B0(s0f)] ^ C[ 12]; + t7 = T0[B3(s0d)] ^ T1[B2(s0e)] ^ T2[B1(s0f)] ^ T3[B0(s0c)] ^ C[ 13]; + tb = T0[B3(s0e)] ^ T1[B2(s0f)] ^ T2[B1(s0c)] ^ T3[B0(s0d)] ^ C[ 14]; + tf = T0[B3(s0f)] ^ T1[B2(s0c)] ^ T2[B1(s0d)] ^ T3[B0(s0e)] ^ C[ 15]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16]; + s04 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17]; + s08 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18]; + s0c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19] ^ ctrl; + s01 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20]; + s05 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21]; + s09 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22]; + s0d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23]; + s02 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24]; + s06 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25]; + s0a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26]; + s0e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27]; + s03 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28]; + s07 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29]; + s0b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30]; + s0f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 32]; + t4 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 33]; + t8 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 34]; + tc = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 35] ^ ctrh; + t1 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[ 36]; + t5 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[ 37]; + t9 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[ 38]; + td = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[ 39]; + t2 = T0[B3(s08)] ^ T1[B2(s09)] ^ T2[B1(s0a)] ^ T3[B0(s0b)] ^ C[ 40]; + t6 = T0[B3(s09)] ^ T1[B2(s0a)] ^ T2[B1(s0b)] ^ T3[B0(s08)] ^ C[ 41]; + ta = T0[B3(s0a)] ^ T1[B2(s0b)] ^ T2[B1(s08)] ^ T3[B0(s09)] ^ C[ 42]; + te = T0[B3(s0b)] ^ T1[B2(s08)] ^ T2[B1(s09)] ^ T3[B0(s0a)] ^ C[ 43]; + t3 = T0[B3(s0c)] ^ T1[B2(s0d)] ^ T2[B1(s0e)] ^ T3[B0(s0f)] ^ C[ 44]; + t7 = T0[B3(s0d)] ^ T1[B2(s0e)] ^ T2[B1(s0f)] ^ T3[B0(s0c)] ^ C[ 45]; + tb = T0[B3(s0e)] ^ T1[B2(s0f)] ^ T2[B1(s0c)] ^ T3[B0(s0d)] ^ C[ 46]; + tf = T0[B3(s0f)] ^ T1[B2(s0c)] ^ T2[B1(s0d)] ^ T3[B0(s0e)] ^ C[ 47]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48]; + s04 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49]; + s08 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50]; + s0c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51] ^ ctrl; + s01 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52]; + s05 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53]; + s09 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54]; + s0d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55]; + s02 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56]; + s06 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57]; + s0a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58]; + s0e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59]; + s03 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60]; + s07 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61]; + s0b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62]; + s0f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 64]; + t4 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 65]; + t8 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 66]; + tc = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 67] ^ ctrh; + t1 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[ 68]; + t5 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[ 69]; + t9 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[ 70]; + td = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[ 71]; + t2 = T0[B3(s08)] ^ T1[B2(s09)] ^ T2[B1(s0a)] ^ T3[B0(s0b)] ^ C[ 72]; + t6 = T0[B3(s09)] ^ T1[B2(s0a)] ^ T2[B1(s0b)] ^ T3[B0(s08)] ^ C[ 73]; + ta = T0[B3(s0a)] ^ T1[B2(s0b)] ^ T2[B1(s08)] ^ T3[B0(s09)] ^ C[ 74]; + te = T0[B3(s0b)] ^ T1[B2(s08)] ^ T2[B1(s09)] ^ T3[B0(s0a)] ^ C[ 75]; + t3 = T0[B3(s0c)] ^ T1[B2(s0d)] ^ T2[B1(s0e)] ^ T3[B0(s0f)] ^ C[ 76]; + t7 = T0[B3(s0d)] ^ T1[B2(s0e)] ^ T2[B1(s0f)] ^ T3[B0(s0c)] ^ C[ 77]; + tb = T0[B3(s0e)] ^ T1[B2(s0f)] ^ T2[B1(s0c)] ^ T3[B0(s0d)] ^ C[ 78]; + tf = T0[B3(s0f)] ^ T1[B2(s0c)] ^ T2[B1(s0d)] ^ T3[B0(s0e)] ^ C[ 79]; + + s00 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80]; + s04 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81]; + s08 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82]; + s0c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83] ^ ctrl; + s01 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84]; + s05 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85]; + s09 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86]; + s0d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87]; + s02 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88]; + s06 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89]; + s0a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90]; + s0e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91]; + s03 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92]; + s07 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93]; + s0b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94]; + s0f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95]; + + t0 = T0[B3(s00)] ^ T1[B2(s01)] ^ T2[B1(s02)] ^ T3[B0(s03)] ^ C[ 96]; + t4 = T0[B3(s01)] ^ T1[B2(s02)] ^ T2[B1(s03)] ^ T3[B0(s00)] ^ C[ 97]; + t8 = T0[B3(s02)] ^ T1[B2(s03)] ^ T2[B1(s00)] ^ T3[B0(s01)] ^ C[ 98]; + tc = T0[B3(s03)] ^ T1[B2(s00)] ^ T2[B1(s01)] ^ T3[B0(s02)] ^ C[ 99] ^ ctrh; + t1 = T0[B3(s04)] ^ T1[B2(s05)] ^ T2[B1(s06)] ^ T3[B0(s07)] ^ C[100]; + t5 = T0[B3(s05)] ^ T1[B2(s06)] ^ T2[B1(s07)] ^ T3[B0(s04)] ^ C[101]; + t9 = T0[B3(s06)] ^ T1[B2(s07)] ^ T2[B1(s04)] ^ T3[B0(s05)] ^ C[102]; + td = T0[B3(s07)] ^ T1[B2(s04)] ^ T2[B1(s05)] ^ T3[B0(s06)] ^ C[103]; + t2 = T0[B3(s08)] ^ T1[B2(s09)] ^ T2[B1(s0a)] ^ T3[B0(s0b)] ^ C[104]; + t6 = T0[B3(s09)] ^ T1[B2(s0a)] ^ T2[B1(s0b)] ^ T3[B0(s08)] ^ C[105]; + ta = T0[B3(s0a)] ^ T1[B2(s0b)] ^ T2[B1(s08)] ^ T3[B0(s09)] ^ C[106]; + te = T0[B3(s0b)] ^ T1[B2(s08)] ^ T2[B1(s09)] ^ T3[B0(s0a)] ^ C[107]; + t3 = T0[B3(s0c)] ^ T1[B2(s0d)] ^ T2[B1(s0e)] ^ T3[B0(s0f)] ^ C[108]; + t7 = T0[B3(s0d)] ^ T1[B2(s0e)] ^ T2[B1(s0f)] ^ T3[B0(s0c)] ^ C[109]; + tb = T0[B3(s0e)] ^ T1[B2(s0f)] ^ T2[B1(s0c)] ^ T3[B0(s0d)] ^ C[110]; + tf = T0[B3(s0f)] ^ T1[B2(s0c)] ^ T2[B1(s0d)] ^ T3[B0(s0e)] ^ C[111]; + + s60 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s64 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s68 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s6c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s61 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s65 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s69 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s6d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s62 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s66 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s6a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s6e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s63 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s67 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s6b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s6f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 1 */ + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 0+112]; + t4 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 1+112]; + t8 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 2+112]; + tc = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 3+112] ^ ctrl; + t1 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[ 4+112]; + t5 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[ 5+112]; + t9 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[ 6+112]; + td = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[ 7+112]; + t2 = T0[B3(s18)] ^ T1[B2(s19)] ^ T2[B1(s1a)] ^ T3[B0(s1b)] ^ C[ 8+112]; + t6 = T0[B3(s19)] ^ T1[B2(s1a)] ^ T2[B1(s1b)] ^ T3[B0(s18)] ^ C[ 9+112]; + ta = T0[B3(s1a)] ^ T1[B2(s1b)] ^ T2[B1(s18)] ^ T3[B0(s19)] ^ C[ 10+112]; + te = T0[B3(s1b)] ^ T1[B2(s18)] ^ T2[B1(s19)] ^ T3[B0(s1a)] ^ C[ 11+112]; + t3 = T0[B3(s1c)] ^ T1[B2(s1d)] ^ T2[B1(s1e)] ^ T3[B0(s1f)] ^ C[ 12+112]; + t7 = T0[B3(s1d)] ^ T1[B2(s1e)] ^ T2[B1(s1f)] ^ T3[B0(s1c)] ^ C[ 13+112]; + tb = T0[B3(s1e)] ^ T1[B2(s1f)] ^ T2[B1(s1c)] ^ T3[B0(s1d)] ^ C[ 14+112]; + tf = T0[B3(s1f)] ^ T1[B2(s1c)] ^ T2[B1(s1d)] ^ T3[B0(s1e)] ^ C[ 15+112]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+112]; + s14 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+112]; + s18 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+112]; + s1c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+112] ^ ctrh; + s11 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+112]; + s15 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+112]; + s19 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+112]; + s1d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+112]; + s12 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+112]; + s16 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+112]; + s1a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+112]; + s1e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+112]; + s13 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+112]; + s17 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+112]; + s1b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+112]; + s1f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+112]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 32+112]; + t4 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 33+112]; + t8 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 34+112]; + tc = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 35+112] ^ ctrl; + t1 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[ 36+112]; + t5 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[ 37+112]; + t9 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[ 38+112]; + td = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[ 39+112]; + t2 = T0[B3(s18)] ^ T1[B2(s19)] ^ T2[B1(s1a)] ^ T3[B0(s1b)] ^ C[ 40+112]; + t6 = T0[B3(s19)] ^ T1[B2(s1a)] ^ T2[B1(s1b)] ^ T3[B0(s18)] ^ C[ 41+112]; + ta = T0[B3(s1a)] ^ T1[B2(s1b)] ^ T2[B1(s18)] ^ T3[B0(s19)] ^ C[ 42+112]; + te = T0[B3(s1b)] ^ T1[B2(s18)] ^ T2[B1(s19)] ^ T3[B0(s1a)] ^ C[ 43+112]; + t3 = T0[B3(s1c)] ^ T1[B2(s1d)] ^ T2[B1(s1e)] ^ T3[B0(s1f)] ^ C[ 44+112]; + t7 = T0[B3(s1d)] ^ T1[B2(s1e)] ^ T2[B1(s1f)] ^ T3[B0(s1c)] ^ C[ 45+112]; + tb = T0[B3(s1e)] ^ T1[B2(s1f)] ^ T2[B1(s1c)] ^ T3[B0(s1d)] ^ C[ 46+112]; + tf = T0[B3(s1f)] ^ T1[B2(s1c)] ^ T2[B1(s1d)] ^ T3[B0(s1e)] ^ C[ 47+112]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+112]; + s14 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+112]; + s18 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+112]; + s1c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+112] ^ ctrh; + s11 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+112]; + s15 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+112]; + s19 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+112]; + s1d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+112]; + s12 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+112]; + s16 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+112]; + s1a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+112]; + s1e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+112]; + s13 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+112]; + s17 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+112]; + s1b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+112]; + s1f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+112]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 64+112]; + t4 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 65+112]; + t8 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 66+112]; + tc = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 67+112] ^ ctrl; + t1 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[ 68+112]; + t5 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[ 69+112]; + t9 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[ 70+112]; + td = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[ 71+112]; + t2 = T0[B3(s18)] ^ T1[B2(s19)] ^ T2[B1(s1a)] ^ T3[B0(s1b)] ^ C[ 72+112]; + t6 = T0[B3(s19)] ^ T1[B2(s1a)] ^ T2[B1(s1b)] ^ T3[B0(s18)] ^ C[ 73+112]; + ta = T0[B3(s1a)] ^ T1[B2(s1b)] ^ T2[B1(s18)] ^ T3[B0(s19)] ^ C[ 74+112]; + te = T0[B3(s1b)] ^ T1[B2(s18)] ^ T2[B1(s19)] ^ T3[B0(s1a)] ^ C[ 75+112]; + t3 = T0[B3(s1c)] ^ T1[B2(s1d)] ^ T2[B1(s1e)] ^ T3[B0(s1f)] ^ C[ 76+112]; + t7 = T0[B3(s1d)] ^ T1[B2(s1e)] ^ T2[B1(s1f)] ^ T3[B0(s1c)] ^ C[ 77+112]; + tb = T0[B3(s1e)] ^ T1[B2(s1f)] ^ T2[B1(s1c)] ^ T3[B0(s1d)] ^ C[ 78+112]; + tf = T0[B3(s1f)] ^ T1[B2(s1c)] ^ T2[B1(s1d)] ^ T3[B0(s1e)] ^ C[ 79+112]; + + s10 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+112]; + s14 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+112]; + s18 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+112]; + s1c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+112] ^ ctrh; + s11 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+112]; + s15 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+112]; + s19 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+112]; + s1d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+112]; + s12 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+112]; + s16 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+112]; + s1a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+112]; + s1e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+112]; + s13 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+112]; + s17 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+112]; + s1b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+112]; + s1f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+112]; + + t0 = T0[B3(s10)] ^ T1[B2(s11)] ^ T2[B1(s12)] ^ T3[B0(s13)] ^ C[ 96+112]; + t4 = T0[B3(s11)] ^ T1[B2(s12)] ^ T2[B1(s13)] ^ T3[B0(s10)] ^ C[ 97+112]; + t8 = T0[B3(s12)] ^ T1[B2(s13)] ^ T2[B1(s10)] ^ T3[B0(s11)] ^ C[ 98+112]; + tc = T0[B3(s13)] ^ T1[B2(s10)] ^ T2[B1(s11)] ^ T3[B0(s12)] ^ C[ 99+112] ^ ctrl; + t1 = T0[B3(s14)] ^ T1[B2(s15)] ^ T2[B1(s16)] ^ T3[B0(s17)] ^ C[100+112]; + t5 = T0[B3(s15)] ^ T1[B2(s16)] ^ T2[B1(s17)] ^ T3[B0(s14)] ^ C[101+112]; + t9 = T0[B3(s16)] ^ T1[B2(s17)] ^ T2[B1(s14)] ^ T3[B0(s15)] ^ C[102+112]; + td = T0[B3(s17)] ^ T1[B2(s14)] ^ T2[B1(s15)] ^ T3[B0(s16)] ^ C[103+112]; + t2 = T0[B3(s18)] ^ T1[B2(s19)] ^ T2[B1(s1a)] ^ T3[B0(s1b)] ^ C[104+112]; + t6 = T0[B3(s19)] ^ T1[B2(s1a)] ^ T2[B1(s1b)] ^ T3[B0(s18)] ^ C[105+112]; + ta = T0[B3(s1a)] ^ T1[B2(s1b)] ^ T2[B1(s18)] ^ T3[B0(s19)] ^ C[106+112]; + te = T0[B3(s1b)] ^ T1[B2(s18)] ^ T2[B1(s19)] ^ T3[B0(s1a)] ^ C[107+112]; + t3 = T0[B3(s1c)] ^ T1[B2(s1d)] ^ T2[B1(s1e)] ^ T3[B0(s1f)] ^ C[108+112]; + t7 = T0[B3(s1d)] ^ T1[B2(s1e)] ^ T2[B1(s1f)] ^ T3[B0(s1c)] ^ C[109+112]; + tb = T0[B3(s1e)] ^ T1[B2(s1f)] ^ T2[B1(s1c)] ^ T3[B0(s1d)] ^ C[110+112]; + tf = T0[B3(s1f)] ^ T1[B2(s1c)] ^ T2[B1(s1d)] ^ T3[B0(s1e)] ^ C[111+112]; + + s60 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s64 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s68 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s6c ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s61 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s65 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s69 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s6d ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s62 ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s66 ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s6a ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s6e ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s63 ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s67 ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s6b ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s6f ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 2 */ + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 0+224]; + t4 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 1+224]; + t8 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 2+224]; + tc = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 3+224] ^ ctrh; + t1 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[ 4+224]; + t5 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[ 5+224]; + t9 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[ 6+224]; + td = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[ 7+224]; + t2 = T0[B3(s28)] ^ T1[B2(s29)] ^ T2[B1(s2a)] ^ T3[B0(s2b)] ^ C[ 8+224]; + t6 = T0[B3(s29)] ^ T1[B2(s2a)] ^ T2[B1(s2b)] ^ T3[B0(s28)] ^ C[ 9+224]; + ta = T0[B3(s2a)] ^ T1[B2(s2b)] ^ T2[B1(s28)] ^ T3[B0(s29)] ^ C[ 10+224]; + te = T0[B3(s2b)] ^ T1[B2(s28)] ^ T2[B1(s29)] ^ T3[B0(s2a)] ^ C[ 11+224]; + t3 = T0[B3(s2c)] ^ T1[B2(s2d)] ^ T2[B1(s2e)] ^ T3[B0(s2f)] ^ C[ 12+224]; + t7 = T0[B3(s2d)] ^ T1[B2(s2e)] ^ T2[B1(s2f)] ^ T3[B0(s2c)] ^ C[ 13+224]; + tb = T0[B3(s2e)] ^ T1[B2(s2f)] ^ T2[B1(s2c)] ^ T3[B0(s2d)] ^ C[ 14+224]; + tf = T0[B3(s2f)] ^ T1[B2(s2c)] ^ T2[B1(s2d)] ^ T3[B0(s2e)] ^ C[ 15+224]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+224]; + s24 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+224]; + s28 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+224]; + s2c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+224] ^ ctrl; + s21 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+224]; + s25 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+224]; + s29 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+224]; + s2d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+224]; + s22 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+224]; + s26 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+224]; + s2a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+224]; + s2e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+224]; + s23 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+224]; + s27 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+224]; + s2b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+224]; + s2f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+224]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 32+224]; + t4 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 33+224]; + t8 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 34+224]; + tc = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 35+224] ^ ctrh; + t1 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[ 36+224]; + t5 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[ 37+224]; + t9 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[ 38+224]; + td = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[ 39+224]; + t2 = T0[B3(s28)] ^ T1[B2(s29)] ^ T2[B1(s2a)] ^ T3[B0(s2b)] ^ C[ 40+224]; + t6 = T0[B3(s29)] ^ T1[B2(s2a)] ^ T2[B1(s2b)] ^ T3[B0(s28)] ^ C[ 41+224]; + ta = T0[B3(s2a)] ^ T1[B2(s2b)] ^ T2[B1(s28)] ^ T3[B0(s29)] ^ C[ 42+224]; + te = T0[B3(s2b)] ^ T1[B2(s28)] ^ T2[B1(s29)] ^ T3[B0(s2a)] ^ C[ 43+224]; + t3 = T0[B3(s2c)] ^ T1[B2(s2d)] ^ T2[B1(s2e)] ^ T3[B0(s2f)] ^ C[ 44+224]; + t7 = T0[B3(s2d)] ^ T1[B2(s2e)] ^ T2[B1(s2f)] ^ T3[B0(s2c)] ^ C[ 45+224]; + tb = T0[B3(s2e)] ^ T1[B2(s2f)] ^ T2[B1(s2c)] ^ T3[B0(s2d)] ^ C[ 46+224]; + tf = T0[B3(s2f)] ^ T1[B2(s2c)] ^ T2[B1(s2d)] ^ T3[B0(s2e)] ^ C[ 47+224]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+224]; + s24 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+224]; + s28 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+224]; + s2c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+224] ^ ctrl; + s21 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+224]; + s25 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+224]; + s29 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+224]; + s2d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+224]; + s22 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+224]; + s26 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+224]; + s2a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+224]; + s2e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+224]; + s23 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+224]; + s27 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+224]; + s2b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+224]; + s2f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+224]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 64+224]; + t4 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 65+224]; + t8 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 66+224]; + tc = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 67+224] ^ ctrh; + t1 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[ 68+224]; + t5 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[ 69+224]; + t9 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[ 70+224]; + td = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[ 71+224]; + t2 = T0[B3(s28)] ^ T1[B2(s29)] ^ T2[B1(s2a)] ^ T3[B0(s2b)] ^ C[ 72+224]; + t6 = T0[B3(s29)] ^ T1[B2(s2a)] ^ T2[B1(s2b)] ^ T3[B0(s28)] ^ C[ 73+224]; + ta = T0[B3(s2a)] ^ T1[B2(s2b)] ^ T2[B1(s28)] ^ T3[B0(s29)] ^ C[ 74+224]; + te = T0[B3(s2b)] ^ T1[B2(s28)] ^ T2[B1(s29)] ^ T3[B0(s2a)] ^ C[ 75+224]; + t3 = T0[B3(s2c)] ^ T1[B2(s2d)] ^ T2[B1(s2e)] ^ T3[B0(s2f)] ^ C[ 76+224]; + t7 = T0[B3(s2d)] ^ T1[B2(s2e)] ^ T2[B1(s2f)] ^ T3[B0(s2c)] ^ C[ 77+224]; + tb = T0[B3(s2e)] ^ T1[B2(s2f)] ^ T2[B1(s2c)] ^ T3[B0(s2d)] ^ C[ 78+224]; + tf = T0[B3(s2f)] ^ T1[B2(s2c)] ^ T2[B1(s2d)] ^ T3[B0(s2e)] ^ C[ 79+224]; + + s20 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+224]; + s24 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+224]; + s28 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+224]; + s2c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+224] ^ ctrl; + s21 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+224]; + s25 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+224]; + s29 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+224]; + s2d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+224]; + s22 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+224]; + s26 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+224]; + s2a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+224]; + s2e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+224]; + s23 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+224]; + s27 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+224]; + s2b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+224]; + s2f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+224]; + + t0 = T0[B3(s20)] ^ T1[B2(s21)] ^ T2[B1(s22)] ^ T3[B0(s23)] ^ C[ 96+224]; + t4 = T0[B3(s21)] ^ T1[B2(s22)] ^ T2[B1(s23)] ^ T3[B0(s20)] ^ C[ 97+224]; + t8 = T0[B3(s22)] ^ T1[B2(s23)] ^ T2[B1(s20)] ^ T3[B0(s21)] ^ C[ 98+224]; + tc = T0[B3(s23)] ^ T1[B2(s20)] ^ T2[B1(s21)] ^ T3[B0(s22)] ^ C[ 99+224] ^ ctrh; + t1 = T0[B3(s24)] ^ T1[B2(s25)] ^ T2[B1(s26)] ^ T3[B0(s27)] ^ C[100+224]; + t5 = T0[B3(s25)] ^ T1[B2(s26)] ^ T2[B1(s27)] ^ T3[B0(s24)] ^ C[101+224]; + t9 = T0[B3(s26)] ^ T1[B2(s27)] ^ T2[B1(s24)] ^ T3[B0(s25)] ^ C[102+224]; + td = T0[B3(s27)] ^ T1[B2(s24)] ^ T2[B1(s25)] ^ T3[B0(s26)] ^ C[103+224]; + t2 = T0[B3(s28)] ^ T1[B2(s29)] ^ T2[B1(s2a)] ^ T3[B0(s2b)] ^ C[104+224]; + t6 = T0[B3(s29)] ^ T1[B2(s2a)] ^ T2[B1(s2b)] ^ T3[B0(s28)] ^ C[105+224]; + ta = T0[B3(s2a)] ^ T1[B2(s2b)] ^ T2[B1(s28)] ^ T3[B0(s29)] ^ C[106+224]; + te = T0[B3(s2b)] ^ T1[B2(s28)] ^ T2[B1(s29)] ^ T3[B0(s2a)] ^ C[107+224]; + t3 = T0[B3(s2c)] ^ T1[B2(s2d)] ^ T2[B1(s2e)] ^ T3[B0(s2f)] ^ C[108+224]; + t7 = T0[B3(s2d)] ^ T1[B2(s2e)] ^ T2[B1(s2f)] ^ T3[B0(s2c)] ^ C[109+224]; + tb = T0[B3(s2e)] ^ T1[B2(s2f)] ^ T2[B1(s2c)] ^ T3[B0(s2d)] ^ C[110+224]; + tf = T0[B3(s2f)] ^ T1[B2(s2c)] ^ T2[B1(s2d)] ^ T3[B0(s2e)] ^ C[111+224]; + + s60 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s64 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s68 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s6c ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s61 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s65 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s69 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s6d ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s62 ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s66 ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s6a ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s6e ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s63 ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s67 ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s6b ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s6f ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 3 */ + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 0+336]; + t4 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 1+336]; + t8 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 2+336]; + tc = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 3+336] ^ ctrl; + t1 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[ 4+336]; + t5 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[ 5+336]; + t9 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[ 6+336]; + td = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[ 7+336]; + t2 = T0[B3(s38)] ^ T1[B2(s39)] ^ T2[B1(s3a)] ^ T3[B0(s3b)] ^ C[ 8+336]; + t6 = T0[B3(s39)] ^ T1[B2(s3a)] ^ T2[B1(s3b)] ^ T3[B0(s38)] ^ C[ 9+336]; + ta = T0[B3(s3a)] ^ T1[B2(s3b)] ^ T2[B1(s38)] ^ T3[B0(s39)] ^ C[ 10+336]; + te = T0[B3(s3b)] ^ T1[B2(s38)] ^ T2[B1(s39)] ^ T3[B0(s3a)] ^ C[ 11+336]; + t3 = T0[B3(s3c)] ^ T1[B2(s3d)] ^ T2[B1(s3e)] ^ T3[B0(s3f)] ^ C[ 12+336]; + t7 = T0[B3(s3d)] ^ T1[B2(s3e)] ^ T2[B1(s3f)] ^ T3[B0(s3c)] ^ C[ 13+336]; + tb = T0[B3(s3e)] ^ T1[B2(s3f)] ^ T2[B1(s3c)] ^ T3[B0(s3d)] ^ C[ 14+336]; + tf = T0[B3(s3f)] ^ T1[B2(s3c)] ^ T2[B1(s3d)] ^ T3[B0(s3e)] ^ C[ 15+336]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+336]; + s34 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+336]; + s38 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+336]; + s3c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+336] ^ ctrh; + s31 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+336]; + s35 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+336]; + s39 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+336]; + s3d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+336]; + s32 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+336]; + s36 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+336]; + s3a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+336]; + s3e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+336]; + s33 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+336]; + s37 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+336]; + s3b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+336]; + s3f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+336]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 32+336]; + t4 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 33+336]; + t8 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 34+336]; + tc = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 35+336] ^ ctrl; + t1 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[ 36+336]; + t5 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[ 37+336]; + t9 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[ 38+336]; + td = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[ 39+336]; + t2 = T0[B3(s38)] ^ T1[B2(s39)] ^ T2[B1(s3a)] ^ T3[B0(s3b)] ^ C[ 40+336]; + t6 = T0[B3(s39)] ^ T1[B2(s3a)] ^ T2[B1(s3b)] ^ T3[B0(s38)] ^ C[ 41+336]; + ta = T0[B3(s3a)] ^ T1[B2(s3b)] ^ T2[B1(s38)] ^ T3[B0(s39)] ^ C[ 42+336]; + te = T0[B3(s3b)] ^ T1[B2(s38)] ^ T2[B1(s39)] ^ T3[B0(s3a)] ^ C[ 43+336]; + t3 = T0[B3(s3c)] ^ T1[B2(s3d)] ^ T2[B1(s3e)] ^ T3[B0(s3f)] ^ C[ 44+336]; + t7 = T0[B3(s3d)] ^ T1[B2(s3e)] ^ T2[B1(s3f)] ^ T3[B0(s3c)] ^ C[ 45+336]; + tb = T0[B3(s3e)] ^ T1[B2(s3f)] ^ T2[B1(s3c)] ^ T3[B0(s3d)] ^ C[ 46+336]; + tf = T0[B3(s3f)] ^ T1[B2(s3c)] ^ T2[B1(s3d)] ^ T3[B0(s3e)] ^ C[ 47+336]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+336]; + s34 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+336]; + s38 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+336]; + s3c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+336] ^ ctrh; + s31 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+336]; + s35 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+336]; + s39 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+336]; + s3d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+336]; + s32 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+336]; + s36 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+336]; + s3a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+336]; + s3e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+336]; + s33 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+336]; + s37 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+336]; + s3b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+336]; + s3f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+336]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 64+336]; + t4 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 65+336]; + t8 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 66+336]; + tc = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 67+336] ^ ctrl; + t1 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[ 68+336]; + t5 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[ 69+336]; + t9 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[ 70+336]; + td = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[ 71+336]; + t2 = T0[B3(s38)] ^ T1[B2(s39)] ^ T2[B1(s3a)] ^ T3[B0(s3b)] ^ C[ 72+336]; + t6 = T0[B3(s39)] ^ T1[B2(s3a)] ^ T2[B1(s3b)] ^ T3[B0(s38)] ^ C[ 73+336]; + ta = T0[B3(s3a)] ^ T1[B2(s3b)] ^ T2[B1(s38)] ^ T3[B0(s39)] ^ C[ 74+336]; + te = T0[B3(s3b)] ^ T1[B2(s38)] ^ T2[B1(s39)] ^ T3[B0(s3a)] ^ C[ 75+336]; + t3 = T0[B3(s3c)] ^ T1[B2(s3d)] ^ T2[B1(s3e)] ^ T3[B0(s3f)] ^ C[ 76+336]; + t7 = T0[B3(s3d)] ^ T1[B2(s3e)] ^ T2[B1(s3f)] ^ T3[B0(s3c)] ^ C[ 77+336]; + tb = T0[B3(s3e)] ^ T1[B2(s3f)] ^ T2[B1(s3c)] ^ T3[B0(s3d)] ^ C[ 78+336]; + tf = T0[B3(s3f)] ^ T1[B2(s3c)] ^ T2[B1(s3d)] ^ T3[B0(s3e)] ^ C[ 79+336]; + + s30 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+336]; + s34 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+336]; + s38 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+336]; + s3c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+336] ^ ctrh; + s31 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+336]; + s35 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+336]; + s39 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+336]; + s3d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+336]; + s32 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+336]; + s36 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+336]; + s3a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+336]; + s3e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+336]; + s33 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+336]; + s37 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+336]; + s3b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+336]; + s3f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+336]; + + t0 = T0[B3(s30)] ^ T1[B2(s31)] ^ T2[B1(s32)] ^ T3[B0(s33)] ^ C[ 96+336]; + t4 = T0[B3(s31)] ^ T1[B2(s32)] ^ T2[B1(s33)] ^ T3[B0(s30)] ^ C[ 97+336]; + t8 = T0[B3(s32)] ^ T1[B2(s33)] ^ T2[B1(s30)] ^ T3[B0(s31)] ^ C[ 98+336]; + tc = T0[B3(s33)] ^ T1[B2(s30)] ^ T2[B1(s31)] ^ T3[B0(s32)] ^ C[ 99+336] ^ ctrl; + t1 = T0[B3(s34)] ^ T1[B2(s35)] ^ T2[B1(s36)] ^ T3[B0(s37)] ^ C[100+336]; + t5 = T0[B3(s35)] ^ T1[B2(s36)] ^ T2[B1(s37)] ^ T3[B0(s34)] ^ C[101+336]; + t9 = T0[B3(s36)] ^ T1[B2(s37)] ^ T2[B1(s34)] ^ T3[B0(s35)] ^ C[102+336]; + td = T0[B3(s37)] ^ T1[B2(s34)] ^ T2[B1(s35)] ^ T3[B0(s36)] ^ C[103+336]; + t2 = T0[B3(s38)] ^ T1[B2(s39)] ^ T2[B1(s3a)] ^ T3[B0(s3b)] ^ C[104+336]; + t6 = T0[B3(s39)] ^ T1[B2(s3a)] ^ T2[B1(s3b)] ^ T3[B0(s38)] ^ C[105+336]; + ta = T0[B3(s3a)] ^ T1[B2(s3b)] ^ T2[B1(s38)] ^ T3[B0(s39)] ^ C[106+336]; + te = T0[B3(s3b)] ^ T1[B2(s38)] ^ T2[B1(s39)] ^ T3[B0(s3a)] ^ C[107+336]; + t3 = T0[B3(s3c)] ^ T1[B2(s3d)] ^ T2[B1(s3e)] ^ T3[B0(s3f)] ^ C[108+336]; + t7 = T0[B3(s3d)] ^ T1[B2(s3e)] ^ T2[B1(s3f)] ^ T3[B0(s3c)] ^ C[109+336]; + tb = T0[B3(s3e)] ^ T1[B2(s3f)] ^ T2[B1(s3c)] ^ T3[B0(s3d)] ^ C[110+336]; + tf = T0[B3(s3f)] ^ T1[B2(s3c)] ^ T2[B1(s3d)] ^ T3[B0(s3e)] ^ C[111+336]; + + s70 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s74 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s78 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s7c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s71 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s75 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s79 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s7d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s72 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s76 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s7a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s7e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s73 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s77 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s7b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s7f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 4 */ + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 0+448]; + t4 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 1+448]; + t8 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 2+448]; + tc = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 3+448] ^ ctrh; + t1 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[ 4+448]; + t5 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[ 5+448]; + t9 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[ 6+448]; + td = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[ 7+448]; + t2 = T0[B3(s48)] ^ T1[B2(s49)] ^ T2[B1(s4a)] ^ T3[B0(s4b)] ^ C[ 8+448]; + t6 = T0[B3(s49)] ^ T1[B2(s4a)] ^ T2[B1(s4b)] ^ T3[B0(s48)] ^ C[ 9+448]; + ta = T0[B3(s4a)] ^ T1[B2(s4b)] ^ T2[B1(s48)] ^ T3[B0(s49)] ^ C[ 10+448]; + te = T0[B3(s4b)] ^ T1[B2(s48)] ^ T2[B1(s49)] ^ T3[B0(s4a)] ^ C[ 11+448]; + t3 = T0[B3(s4c)] ^ T1[B2(s4d)] ^ T2[B1(s4e)] ^ T3[B0(s4f)] ^ C[ 12+448]; + t7 = T0[B3(s4d)] ^ T1[B2(s4e)] ^ T2[B1(s4f)] ^ T3[B0(s4c)] ^ C[ 13+448]; + tb = T0[B3(s4e)] ^ T1[B2(s4f)] ^ T2[B1(s4c)] ^ T3[B0(s4d)] ^ C[ 14+448]; + tf = T0[B3(s4f)] ^ T1[B2(s4c)] ^ T2[B1(s4d)] ^ T3[B0(s4e)] ^ C[ 15+448]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+448]; + s44 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+448]; + s48 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+448]; + s4c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+448] ^ ctrl; + s41 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+448]; + s45 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+448]; + s49 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+448]; + s4d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+448]; + s42 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+448]; + s46 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+448]; + s4a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+448]; + s4e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+448]; + s43 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+448]; + s47 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+448]; + s4b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+448]; + s4f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+448]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 32+448]; + t4 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 33+448]; + t8 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 34+448]; + tc = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 35+448] ^ ctrh; + t1 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[ 36+448]; + t5 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[ 37+448]; + t9 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[ 38+448]; + td = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[ 39+448]; + t2 = T0[B3(s48)] ^ T1[B2(s49)] ^ T2[B1(s4a)] ^ T3[B0(s4b)] ^ C[ 40+448]; + t6 = T0[B3(s49)] ^ T1[B2(s4a)] ^ T2[B1(s4b)] ^ T3[B0(s48)] ^ C[ 41+448]; + ta = T0[B3(s4a)] ^ T1[B2(s4b)] ^ T2[B1(s48)] ^ T3[B0(s49)] ^ C[ 42+448]; + te = T0[B3(s4b)] ^ T1[B2(s48)] ^ T2[B1(s49)] ^ T3[B0(s4a)] ^ C[ 43+448]; + t3 = T0[B3(s4c)] ^ T1[B2(s4d)] ^ T2[B1(s4e)] ^ T3[B0(s4f)] ^ C[ 44+448]; + t7 = T0[B3(s4d)] ^ T1[B2(s4e)] ^ T2[B1(s4f)] ^ T3[B0(s4c)] ^ C[ 45+448]; + tb = T0[B3(s4e)] ^ T1[B2(s4f)] ^ T2[B1(s4c)] ^ T3[B0(s4d)] ^ C[ 46+448]; + tf = T0[B3(s4f)] ^ T1[B2(s4c)] ^ T2[B1(s4d)] ^ T3[B0(s4e)] ^ C[ 47+448]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+448]; + s44 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+448]; + s48 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+448]; + s4c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+448] ^ ctrl; + s41 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+448]; + s45 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+448]; + s49 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+448]; + s4d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+448]; + s42 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+448]; + s46 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+448]; + s4a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+448]; + s4e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+448]; + s43 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+448]; + s47 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+448]; + s4b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+448]; + s4f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+448]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 64+448]; + t4 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 65+448]; + t8 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 66+448]; + tc = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 67+448] ^ ctrh; + t1 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[ 68+448]; + t5 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[ 69+448]; + t9 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[ 70+448]; + td = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[ 71+448]; + t2 = T0[B3(s48)] ^ T1[B2(s49)] ^ T2[B1(s4a)] ^ T3[B0(s4b)] ^ C[ 72+448]; + t6 = T0[B3(s49)] ^ T1[B2(s4a)] ^ T2[B1(s4b)] ^ T3[B0(s48)] ^ C[ 73+448]; + ta = T0[B3(s4a)] ^ T1[B2(s4b)] ^ T2[B1(s48)] ^ T3[B0(s49)] ^ C[ 74+448]; + te = T0[B3(s4b)] ^ T1[B2(s48)] ^ T2[B1(s49)] ^ T3[B0(s4a)] ^ C[ 75+448]; + t3 = T0[B3(s4c)] ^ T1[B2(s4d)] ^ T2[B1(s4e)] ^ T3[B0(s4f)] ^ C[ 76+448]; + t7 = T0[B3(s4d)] ^ T1[B2(s4e)] ^ T2[B1(s4f)] ^ T3[B0(s4c)] ^ C[ 77+448]; + tb = T0[B3(s4e)] ^ T1[B2(s4f)] ^ T2[B1(s4c)] ^ T3[B0(s4d)] ^ C[ 78+448]; + tf = T0[B3(s4f)] ^ T1[B2(s4c)] ^ T2[B1(s4d)] ^ T3[B0(s4e)] ^ C[ 79+448]; + + s40 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+448]; + s44 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+448]; + s48 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+448]; + s4c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+448] ^ ctrl; + s41 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+448]; + s45 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+448]; + s49 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+448]; + s4d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+448]; + s42 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+448]; + s46 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+448]; + s4a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+448]; + s4e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+448]; + s43 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+448]; + s47 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+448]; + s4b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+448]; + s4f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+448]; + + t0 = T0[B3(s40)] ^ T1[B2(s41)] ^ T2[B1(s42)] ^ T3[B0(s43)] ^ C[ 96+448]; + t4 = T0[B3(s41)] ^ T1[B2(s42)] ^ T2[B1(s43)] ^ T3[B0(s40)] ^ C[ 97+448]; + t8 = T0[B3(s42)] ^ T1[B2(s43)] ^ T2[B1(s40)] ^ T3[B0(s41)] ^ C[ 98+448]; + tc = T0[B3(s43)] ^ T1[B2(s40)] ^ T2[B1(s41)] ^ T3[B0(s42)] ^ C[ 99+448] ^ ctrh; + t1 = T0[B3(s44)] ^ T1[B2(s45)] ^ T2[B1(s46)] ^ T3[B0(s47)] ^ C[100+448]; + t5 = T0[B3(s45)] ^ T1[B2(s46)] ^ T2[B1(s47)] ^ T3[B0(s44)] ^ C[101+448]; + t9 = T0[B3(s46)] ^ T1[B2(s47)] ^ T2[B1(s44)] ^ T3[B0(s45)] ^ C[102+448]; + td = T0[B3(s47)] ^ T1[B2(s44)] ^ T2[B1(s45)] ^ T3[B0(s46)] ^ C[103+448]; + t2 = T0[B3(s48)] ^ T1[B2(s49)] ^ T2[B1(s4a)] ^ T3[B0(s4b)] ^ C[104+448]; + t6 = T0[B3(s49)] ^ T1[B2(s4a)] ^ T2[B1(s4b)] ^ T3[B0(s48)] ^ C[105+448]; + ta = T0[B3(s4a)] ^ T1[B2(s4b)] ^ T2[B1(s48)] ^ T3[B0(s49)] ^ C[106+448]; + te = T0[B3(s4b)] ^ T1[B2(s48)] ^ T2[B1(s49)] ^ T3[B0(s4a)] ^ C[107+448]; + t3 = T0[B3(s4c)] ^ T1[B2(s4d)] ^ T2[B1(s4e)] ^ T3[B0(s4f)] ^ C[108+448]; + t7 = T0[B3(s4d)] ^ T1[B2(s4e)] ^ T2[B1(s4f)] ^ T3[B0(s4c)] ^ C[109+448]; + tb = T0[B3(s4e)] ^ T1[B2(s4f)] ^ T2[B1(s4c)] ^ T3[B0(s4d)] ^ C[110+448]; + tf = T0[B3(s4f)] ^ T1[B2(s4c)] ^ T2[B1(s4d)] ^ T3[B0(s4e)] ^ C[111+448]; + + s70 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s74 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s78 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s7c ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s71 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s75 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s79 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s7d ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s72 ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s76 ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s7a ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s7e ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s73 ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s77 ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s7b ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s7f ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 5 */ + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 0+560]; + t4 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 1+560]; + t8 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 2+560]; + tc = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 3+560] ^ ctrl; + t1 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[ 4+560]; + t5 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[ 5+560]; + t9 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[ 6+560]; + td = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[ 7+560]; + t2 = T0[B3(s58)] ^ T1[B2(s59)] ^ T2[B1(s5a)] ^ T3[B0(s5b)] ^ C[ 8+560]; + t6 = T0[B3(s59)] ^ T1[B2(s5a)] ^ T2[B1(s5b)] ^ T3[B0(s58)] ^ C[ 9+560]; + ta = T0[B3(s5a)] ^ T1[B2(s5b)] ^ T2[B1(s58)] ^ T3[B0(s59)] ^ C[ 10+560]; + te = T0[B3(s5b)] ^ T1[B2(s58)] ^ T2[B1(s59)] ^ T3[B0(s5a)] ^ C[ 11+560]; + t3 = T0[B3(s5c)] ^ T1[B2(s5d)] ^ T2[B1(s5e)] ^ T3[B0(s5f)] ^ C[ 12+560]; + t7 = T0[B3(s5d)] ^ T1[B2(s5e)] ^ T2[B1(s5f)] ^ T3[B0(s5c)] ^ C[ 13+560]; + tb = T0[B3(s5e)] ^ T1[B2(s5f)] ^ T2[B1(s5c)] ^ T3[B0(s5d)] ^ C[ 14+560]; + tf = T0[B3(s5f)] ^ T1[B2(s5c)] ^ T2[B1(s5d)] ^ T3[B0(s5e)] ^ C[ 15+560]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+560]; + s54 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+560]; + s58 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+560]; + s5c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+560] ^ ctrh; + s51 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+560]; + s55 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+560]; + s59 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+560]; + s5d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+560]; + s52 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+560]; + s56 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+560]; + s5a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+560]; + s5e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+560]; + s53 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+560]; + s57 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+560]; + s5b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+560]; + s5f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+560]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 32+560]; + t4 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 33+560]; + t8 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 34+560]; + tc = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 35+560] ^ ctrl; + t1 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[ 36+560]; + t5 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[ 37+560]; + t9 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[ 38+560]; + td = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[ 39+560]; + t2 = T0[B3(s58)] ^ T1[B2(s59)] ^ T2[B1(s5a)] ^ T3[B0(s5b)] ^ C[ 40+560]; + t6 = T0[B3(s59)] ^ T1[B2(s5a)] ^ T2[B1(s5b)] ^ T3[B0(s58)] ^ C[ 41+560]; + ta = T0[B3(s5a)] ^ T1[B2(s5b)] ^ T2[B1(s58)] ^ T3[B0(s59)] ^ C[ 42+560]; + te = T0[B3(s5b)] ^ T1[B2(s58)] ^ T2[B1(s59)] ^ T3[B0(s5a)] ^ C[ 43+560]; + t3 = T0[B3(s5c)] ^ T1[B2(s5d)] ^ T2[B1(s5e)] ^ T3[B0(s5f)] ^ C[ 44+560]; + t7 = T0[B3(s5d)] ^ T1[B2(s5e)] ^ T2[B1(s5f)] ^ T3[B0(s5c)] ^ C[ 45+560]; + tb = T0[B3(s5e)] ^ T1[B2(s5f)] ^ T2[B1(s5c)] ^ T3[B0(s5d)] ^ C[ 46+560]; + tf = T0[B3(s5f)] ^ T1[B2(s5c)] ^ T2[B1(s5d)] ^ T3[B0(s5e)] ^ C[ 47+560]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 48+560]; + s54 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 49+560]; + s58 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 50+560]; + s5c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 51+560] ^ ctrh; + s51 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 52+560]; + s55 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 53+560]; + s59 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 54+560]; + s5d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 55+560]; + s52 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 56+560]; + s56 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 57+560]; + s5a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 58+560]; + s5e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 59+560]; + s53 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 60+560]; + s57 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 61+560]; + s5b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 62+560]; + s5f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 63+560]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 64+560]; + t4 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 65+560]; + t8 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 66+560]; + tc = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 67+560] ^ ctrl; + t1 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[ 68+560]; + t5 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[ 69+560]; + t9 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[ 70+560]; + td = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[ 71+560]; + t2 = T0[B3(s58)] ^ T1[B2(s59)] ^ T2[B1(s5a)] ^ T3[B0(s5b)] ^ C[ 72+560]; + t6 = T0[B3(s59)] ^ T1[B2(s5a)] ^ T2[B1(s5b)] ^ T3[B0(s58)] ^ C[ 73+560]; + ta = T0[B3(s5a)] ^ T1[B2(s5b)] ^ T2[B1(s58)] ^ T3[B0(s59)] ^ C[ 74+560]; + te = T0[B3(s5b)] ^ T1[B2(s58)] ^ T2[B1(s59)] ^ T3[B0(s5a)] ^ C[ 75+560]; + t3 = T0[B3(s5c)] ^ T1[B2(s5d)] ^ T2[B1(s5e)] ^ T3[B0(s5f)] ^ C[ 76+560]; + t7 = T0[B3(s5d)] ^ T1[B2(s5e)] ^ T2[B1(s5f)] ^ T3[B0(s5c)] ^ C[ 77+560]; + tb = T0[B3(s5e)] ^ T1[B2(s5f)] ^ T2[B1(s5c)] ^ T3[B0(s5d)] ^ C[ 78+560]; + tf = T0[B3(s5f)] ^ T1[B2(s5c)] ^ T2[B1(s5d)] ^ T3[B0(s5e)] ^ C[ 79+560]; + + s50 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 80+560]; + s54 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 81+560]; + s58 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 82+560]; + s5c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 83+560] ^ ctrh; + s51 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 84+560]; + s55 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 85+560]; + s59 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 86+560]; + s5d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 87+560]; + s52 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 88+560]; + s56 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 89+560]; + s5a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 90+560]; + s5e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 91+560]; + s53 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 92+560]; + s57 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 93+560]; + s5b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 94+560]; + s5f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 95+560]; + + t0 = T0[B3(s50)] ^ T1[B2(s51)] ^ T2[B1(s52)] ^ T3[B0(s53)] ^ C[ 96+560]; + t4 = T0[B3(s51)] ^ T1[B2(s52)] ^ T2[B1(s53)] ^ T3[B0(s50)] ^ C[ 97+560]; + t8 = T0[B3(s52)] ^ T1[B2(s53)] ^ T2[B1(s50)] ^ T3[B0(s51)] ^ C[ 98+560]; + tc = T0[B3(s53)] ^ T1[B2(s50)] ^ T2[B1(s51)] ^ T3[B0(s52)] ^ C[ 99+560] ^ ctrl; + t1 = T0[B3(s54)] ^ T1[B2(s55)] ^ T2[B1(s56)] ^ T3[B0(s57)] ^ C[100+560]; + t5 = T0[B3(s55)] ^ T1[B2(s56)] ^ T2[B1(s57)] ^ T3[B0(s54)] ^ C[101+560]; + t9 = T0[B3(s56)] ^ T1[B2(s57)] ^ T2[B1(s54)] ^ T3[B0(s55)] ^ C[102+560]; + td = T0[B3(s57)] ^ T1[B2(s54)] ^ T2[B1(s55)] ^ T3[B0(s56)] ^ C[103+560]; + t2 = T0[B3(s58)] ^ T1[B2(s59)] ^ T2[B1(s5a)] ^ T3[B0(s5b)] ^ C[104+560]; + t6 = T0[B3(s59)] ^ T1[B2(s5a)] ^ T2[B1(s5b)] ^ T3[B0(s58)] ^ C[105+560]; + ta = T0[B3(s5a)] ^ T1[B2(s5b)] ^ T2[B1(s58)] ^ T3[B0(s59)] ^ C[106+560]; + te = T0[B3(s5b)] ^ T1[B2(s58)] ^ T2[B1(s59)] ^ T3[B0(s5a)] ^ C[107+560]; + t3 = T0[B3(s5c)] ^ T1[B2(s5d)] ^ T2[B1(s5e)] ^ T3[B0(s5f)] ^ C[108+560]; + t7 = T0[B3(s5d)] ^ T1[B2(s5e)] ^ T2[B1(s5f)] ^ T3[B0(s5c)] ^ C[109+560]; + tb = T0[B3(s5e)] ^ T1[B2(s5f)] ^ T2[B1(s5c)] ^ T3[B0(s5d)] ^ C[110+560]; + tf = T0[B3(s5f)] ^ T1[B2(s5c)] ^ T2[B1(s5d)] ^ T3[B0(s5e)] ^ C[111+560]; + + s70 ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + s74 ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + s78 ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + s7c ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + s71 ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + s75 ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + s79 ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + s7d ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + s72 ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + s76 ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + s7a ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + s7e ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + s73 ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + s77 ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + s7b ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + s7f ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 6 */ + t0 = T0[B3(s60)] ^ T1[B2(s61)] ^ T2[B1(s62)] ^ T3[B0(s63)] ^ C[ 0+672]; + t4 = T0[B3(s61)] ^ T1[B2(s62)] ^ T2[B1(s63)] ^ T3[B0(s60)] ^ C[ 1+672]; + t8 = T0[B3(s62)] ^ T1[B2(s63)] ^ T2[B1(s60)] ^ T3[B0(s61)] ^ C[ 2+672]; + tc = T0[B3(s63)] ^ T1[B2(s60)] ^ T2[B1(s61)] ^ T3[B0(s62)] ^ C[ 3+672] ^ ctrh; + t1 = T0[B3(s64)] ^ T1[B2(s65)] ^ T2[B1(s66)] ^ T3[B0(s67)] ^ C[ 4+672]; + t5 = T0[B3(s65)] ^ T1[B2(s66)] ^ T2[B1(s67)] ^ T3[B0(s64)] ^ C[ 5+672]; + t9 = T0[B3(s66)] ^ T1[B2(s67)] ^ T2[B1(s64)] ^ T3[B0(s65)] ^ C[ 6+672]; + td = T0[B3(s67)] ^ T1[B2(s64)] ^ T2[B1(s65)] ^ T3[B0(s66)] ^ C[ 7+672]; + t2 = T0[B3(s68)] ^ T1[B2(s69)] ^ T2[B1(s6a)] ^ T3[B0(s6b)] ^ C[ 8+672]; + t6 = T0[B3(s69)] ^ T1[B2(s6a)] ^ T2[B1(s6b)] ^ T3[B0(s68)] ^ C[ 9+672]; + ta = T0[B3(s6a)] ^ T1[B2(s6b)] ^ T2[B1(s68)] ^ T3[B0(s69)] ^ C[ 10+672]; + te = T0[B3(s6b)] ^ T1[B2(s68)] ^ T2[B1(s69)] ^ T3[B0(s6a)] ^ C[ 11+672]; + t3 = T0[B3(s6c)] ^ T1[B2(s6d)] ^ T2[B1(s6e)] ^ T3[B0(s6f)] ^ C[ 12+672]; + t7 = T0[B3(s6d)] ^ T1[B2(s6e)] ^ T2[B1(s6f)] ^ T3[B0(s6c)] ^ C[ 13+672]; + tb = T0[B3(s6e)] ^ T1[B2(s6f)] ^ T2[B1(s6c)] ^ T3[B0(s6d)] ^ C[ 14+672]; + tf = T0[B3(s6f)] ^ T1[B2(s6c)] ^ T2[B1(s6d)] ^ T3[B0(s6e)] ^ C[ 15+672]; + + s60 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+672]; + s64 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+672]; + s68 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+672]; + s6c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+672] ^ ctrl; + s61 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+672]; + s65 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+672]; + s69 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+672]; + s6d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+672]; + s62 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+672]; + s66 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+672]; + s6a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+672]; + s6e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+672]; + s63 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+672]; + s67 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+672]; + s6b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+672]; + s6f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+672]; + + t0 = T0[B3(s60)] ^ T1[B2(s61)] ^ T2[B1(s62)] ^ T3[B0(s63)] ^ C[ 32+672]; + t4 = T0[B3(s61)] ^ T1[B2(s62)] ^ T2[B1(s63)] ^ T3[B0(s60)] ^ C[ 33+672]; + t8 = T0[B3(s62)] ^ T1[B2(s63)] ^ T2[B1(s60)] ^ T3[B0(s61)] ^ C[ 34+672]; + tc = T0[B3(s63)] ^ T1[B2(s60)] ^ T2[B1(s61)] ^ T3[B0(s62)] ^ C[ 35+672] ^ ctrh; + t1 = T0[B3(s64)] ^ T1[B2(s65)] ^ T2[B1(s66)] ^ T3[B0(s67)] ^ C[ 36+672]; + t5 = T0[B3(s65)] ^ T1[B2(s66)] ^ T2[B1(s67)] ^ T3[B0(s64)] ^ C[ 37+672]; + t9 = T0[B3(s66)] ^ T1[B2(s67)] ^ T2[B1(s64)] ^ T3[B0(s65)] ^ C[ 38+672]; + td = T0[B3(s67)] ^ T1[B2(s64)] ^ T2[B1(s65)] ^ T3[B0(s66)] ^ C[ 39+672]; + t2 = T0[B3(s68)] ^ T1[B2(s69)] ^ T2[B1(s6a)] ^ T3[B0(s6b)] ^ C[ 40+672]; + t6 = T0[B3(s69)] ^ T1[B2(s6a)] ^ T2[B1(s6b)] ^ T3[B0(s68)] ^ C[ 41+672]; + ta = T0[B3(s6a)] ^ T1[B2(s6b)] ^ T2[B1(s68)] ^ T3[B0(s69)] ^ C[ 42+672]; + te = T0[B3(s6b)] ^ T1[B2(s68)] ^ T2[B1(s69)] ^ T3[B0(s6a)] ^ C[ 43+672]; + t3 = T0[B3(s6c)] ^ T1[B2(s6d)] ^ T2[B1(s6e)] ^ T3[B0(s6f)] ^ C[ 44+672]; + t7 = T0[B3(s6d)] ^ T1[B2(s6e)] ^ T2[B1(s6f)] ^ T3[B0(s6c)] ^ C[ 45+672]; + tb = T0[B3(s6e)] ^ T1[B2(s6f)] ^ T2[B1(s6c)] ^ T3[B0(s6d)] ^ C[ 46+672]; + tf = T0[B3(s6f)] ^ T1[B2(s6c)] ^ T2[B1(s6d)] ^ T3[B0(s6e)] ^ C[ 47+672]; + + h[ 0] = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + h[ 4] = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + h[ 8] = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + h[12] = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + h[ 1] = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + h[ 5] = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + h[ 9] = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + h[13] = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + h[ 2] = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + h[ 6] = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + h[10] = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + h[14] = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + h[ 3] = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + h[ 7] = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + h[11] = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + h[15] = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; + + /* Lane 7 */ + t0 = T0[B3(s70)] ^ T1[B2(s71)] ^ T2[B1(s72)] ^ T3[B0(s73)] ^ C[ 0+720]; + t4 = T0[B3(s71)] ^ T1[B2(s72)] ^ T2[B1(s73)] ^ T3[B0(s70)] ^ C[ 1+720]; + t8 = T0[B3(s72)] ^ T1[B2(s73)] ^ T2[B1(s70)] ^ T3[B0(s71)] ^ C[ 2+720]; + tc = T0[B3(s73)] ^ T1[B2(s70)] ^ T2[B1(s71)] ^ T3[B0(s72)] ^ C[ 3+720] ^ ctrl; + t1 = T0[B3(s74)] ^ T1[B2(s75)] ^ T2[B1(s76)] ^ T3[B0(s77)] ^ C[ 4+720]; + t5 = T0[B3(s75)] ^ T1[B2(s76)] ^ T2[B1(s77)] ^ T3[B0(s74)] ^ C[ 5+720]; + t9 = T0[B3(s76)] ^ T1[B2(s77)] ^ T2[B1(s74)] ^ T3[B0(s75)] ^ C[ 6+720]; + td = T0[B3(s77)] ^ T1[B2(s74)] ^ T2[B1(s75)] ^ T3[B0(s76)] ^ C[ 7+720]; + t2 = T0[B3(s78)] ^ T1[B2(s79)] ^ T2[B1(s7a)] ^ T3[B0(s7b)] ^ C[ 8+720]; + t6 = T0[B3(s79)] ^ T1[B2(s7a)] ^ T2[B1(s7b)] ^ T3[B0(s78)] ^ C[ 9+720]; + ta = T0[B3(s7a)] ^ T1[B2(s7b)] ^ T2[B1(s78)] ^ T3[B0(s79)] ^ C[ 10+720]; + te = T0[B3(s7b)] ^ T1[B2(s78)] ^ T2[B1(s79)] ^ T3[B0(s7a)] ^ C[ 11+720]; + t3 = T0[B3(s7c)] ^ T1[B2(s7d)] ^ T2[B1(s7e)] ^ T3[B0(s7f)] ^ C[ 12+720]; + t7 = T0[B3(s7d)] ^ T1[B2(s7e)] ^ T2[B1(s7f)] ^ T3[B0(s7c)] ^ C[ 13+720]; + tb = T0[B3(s7e)] ^ T1[B2(s7f)] ^ T2[B1(s7c)] ^ T3[B0(s7d)] ^ C[ 14+720]; + tf = T0[B3(s7f)] ^ T1[B2(s7c)] ^ T2[B1(s7d)] ^ T3[B0(s7e)] ^ C[ 15+720]; + + s70 = T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )] ^ C[ 16+720]; + s74 = T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )] ^ C[ 17+720]; + s78 = T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )] ^ C[ 18+720]; + s7c = T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )] ^ C[ 19+720] ^ ctrh; + s71 = T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )] ^ C[ 20+720]; + s75 = T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )] ^ C[ 21+720]; + s79 = T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )] ^ C[ 22+720]; + s7d = T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )] ^ C[ 23+720]; + s72 = T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )] ^ C[ 24+720]; + s76 = T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )] ^ C[ 25+720]; + s7a = T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )] ^ C[ 26+720]; + s7e = T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )] ^ C[ 27+720]; + s73 = T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )] ^ C[ 28+720]; + s77 = T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )] ^ C[ 29+720]; + s7b = T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )] ^ C[ 30+720]; + s7f = T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )] ^ C[ 31+720]; + + t0 = T0[B3(s70)] ^ T1[B2(s71)] ^ T2[B1(s72)] ^ T3[B0(s73)] ^ C[ 32+720]; + t4 = T0[B3(s71)] ^ T1[B2(s72)] ^ T2[B1(s73)] ^ T3[B0(s70)] ^ C[ 33+720]; + t8 = T0[B3(s72)] ^ T1[B2(s73)] ^ T2[B1(s70)] ^ T3[B0(s71)] ^ C[ 34+720]; + tc = T0[B3(s73)] ^ T1[B2(s70)] ^ T2[B1(s71)] ^ T3[B0(s72)] ^ C[ 35+720] ^ ctrl; + t1 = T0[B3(s74)] ^ T1[B2(s75)] ^ T2[B1(s76)] ^ T3[B0(s77)] ^ C[ 36+720]; + t5 = T0[B3(s75)] ^ T1[B2(s76)] ^ T2[B1(s77)] ^ T3[B0(s74)] ^ C[ 37+720]; + t9 = T0[B3(s76)] ^ T1[B2(s77)] ^ T2[B1(s74)] ^ T3[B0(s75)] ^ C[ 38+720]; + td = T0[B3(s77)] ^ T1[B2(s74)] ^ T2[B1(s75)] ^ T3[B0(s76)] ^ C[ 39+720]; + t2 = T0[B3(s78)] ^ T1[B2(s79)] ^ T2[B1(s7a)] ^ T3[B0(s7b)] ^ C[ 40+720]; + t6 = T0[B3(s79)] ^ T1[B2(s7a)] ^ T2[B1(s7b)] ^ T3[B0(s78)] ^ C[ 41+720]; + ta = T0[B3(s7a)] ^ T1[B2(s7b)] ^ T2[B1(s78)] ^ T3[B0(s79)] ^ C[ 42+720]; + te = T0[B3(s7b)] ^ T1[B2(s78)] ^ T2[B1(s79)] ^ T3[B0(s7a)] ^ C[ 43+720]; + t3 = T0[B3(s7c)] ^ T1[B2(s7d)] ^ T2[B1(s7e)] ^ T3[B0(s7f)] ^ C[ 44+720]; + t7 = T0[B3(s7d)] ^ T1[B2(s7e)] ^ T2[B1(s7f)] ^ T3[B0(s7c)] ^ C[ 45+720]; + tb = T0[B3(s7e)] ^ T1[B2(s7f)] ^ T2[B1(s7c)] ^ T3[B0(s7d)] ^ C[ 46+720]; + tf = T0[B3(s7f)] ^ T1[B2(s7c)] ^ T2[B1(s7d)] ^ T3[B0(s7e)] ^ C[ 47+720]; + + h[ 0] ^= T0[B3(t0 )] ^ T1[B2(t1 )] ^ T2[B1(t2 )] ^ T3[B0(t3 )]; + h[ 4] ^= T0[B3(t1 )] ^ T1[B2(t2 )] ^ T2[B1(t3 )] ^ T3[B0(t0 )]; + h[ 8] ^= T0[B3(t2 )] ^ T1[B2(t3 )] ^ T2[B1(t0 )] ^ T3[B0(t1 )]; + h[12] ^= T0[B3(t3 )] ^ T1[B2(t0 )] ^ T2[B1(t1 )] ^ T3[B0(t2 )]; + h[ 1] ^= T0[B3(t4 )] ^ T1[B2(t5 )] ^ T2[B1(t6 )] ^ T3[B0(t7 )]; + h[ 5] ^= T0[B3(t5 )] ^ T1[B2(t6 )] ^ T2[B1(t7 )] ^ T3[B0(t4 )]; + h[ 9] ^= T0[B3(t6 )] ^ T1[B2(t7 )] ^ T2[B1(t4 )] ^ T3[B0(t5 )]; + h[13] ^= T0[B3(t7 )] ^ T1[B2(t4 )] ^ T2[B1(t5 )] ^ T3[B0(t6 )]; + h[ 2] ^= T0[B3(t8 )] ^ T1[B2(t9 )] ^ T2[B1(ta )] ^ T3[B0(tb )]; + h[ 6] ^= T0[B3(t9 )] ^ T1[B2(ta )] ^ T2[B1(tb )] ^ T3[B0(t8 )]; + h[10] ^= T0[B3(ta )] ^ T1[B2(tb )] ^ T2[B1(t8 )] ^ T3[B0(t9 )]; + h[14] ^= T0[B3(tb )] ^ T1[B2(t8 )] ^ T2[B1(t9 )] ^ T3[B0(ta )]; + h[ 3] ^= T0[B3(tc )] ^ T1[B2(td )] ^ T2[B1(te )] ^ T3[B0(tf )]; + h[ 7] ^= T0[B3(td )] ^ T1[B2(te )] ^ T2[B1(tf )] ^ T3[B0(tc )]; + h[11] ^= T0[B3(te )] ^ T1[B2(tf )] ^ T2[B1(tc )] ^ T3[B0(td )]; + h[15] ^= T0[B3(tf )] ^ T1[B2(tc )] ^ T2[B1(td )] ^ T3[B0(te )]; +} + +HashReturn laneInit (hashState *state, int hashbitlen) +{ + if (hashbitlen != 224 && hashbitlen != 256 && hashbitlen != 384 && hashbitlen != 512) + return BAD_HASHBITLEN; + + state->hashbitlen = hashbitlen; + state->ctr = 0; + + switch (state->hashbitlen) { + case 224: + memcpy(state->h, iv224, 8*sizeof(u32)); + break; + case 256: default: + memcpy(state->h, iv256, 8*sizeof(u32)); + break; + case 384: + memcpy(state->h, iv384, 16*sizeof(u32)); + break; + case 512: + memcpy(state->h, iv512, 16*sizeof(u32)); + break; + } + + return SUCCESS; +} + +HashReturn laneUpdate (hashState *state, const BitSequence *data, DataLength databitlen) +{ + u64 buffill; + u64 bytes; + + switch (state->hashbitlen) { + case 224: case 256: default: + buffill = (state->ctr >> 3) & 0x3f; + bytes = databitlen >> 3; + + if (state->ctr & 0x7) + return BAD_DATABITLEN; /* Only the last call to Update() may contain a fractional byte */ + + /* Check if we have some stuff left in the buffer. If so, fill it, and process it */ + if (buffill) { + const u64 n = buffill + bytes > 64 ? 64-buffill : bytes; /* number of bytes to copy */ + memcpy(state->buffer + buffill, data, n); + state->ctr += n << 3; + if (buffill + n == 64) /* full buffer now */ + lane256_compress(state->buffer, state->h, MSB32(state->ctr), LSB32(state->ctr)); + data += n; + bytes -= n; + } + + /* Now process as many full blocks as we can directly from the input message */ + while (bytes >= 64) { + state->ctr += 64 << 3; + lane256_compress(data, state->h, MSB32(state->ctr), LSB32(state->ctr)); + data += 64; + bytes -= 64; + } + break; + + case 384: case 512: + buffill = (state->ctr >> 3) & 0x7f; + bytes = databitlen >> 3; + + if (state->ctr & 0x7) + return BAD_DATABITLEN; /* Only the last call to Update() may contain a fractional byte */ + + /* Check if we have some stuff left in the buffer. If so, fill it, and process it */ + if (buffill) { + const u64 n = buffill + bytes > 128 ? 128-buffill : bytes; /* number of bytes to copy */ + memcpy(state->buffer + buffill, data, n); + state->ctr += n << 3; + if (buffill + n == 128) /* full buffer now */ + lane512_compress(state->buffer, state->h, MSB32(state->ctr), LSB32(state->ctr)); + data += n; + bytes -= n; + } + + /* Now process as many full blocks as we can directly from the input message */ + while (bytes >= 128) { + state->ctr += 128 << 3; + lane512_compress(data, state->h, MSB32(state->ctr), LSB32(state->ctr)); + data += 128; + bytes -= 128; + } + break; + } + + /* And finally, save the last, incomplete message block */ + if (bytes || (databitlen & 0x7)) { + memcpy(state->buffer, data, databitlen & 0x7 ? bytes+1 : bytes); /* also copy partial byte */ + state->ctr += (bytes << 3) + (databitlen & 0x7); + } + + return SUCCESS; +} + +HashReturn laneFinal (hashState *state, BitSequence *hashval) +{ + + switch (state->hashbitlen) { + case 224: case 256: default: + /* do zero padding and compress last block, if there is some data in the buffer */ + if (state->ctr & 0x1ff) { + const u64 n = (((state->ctr & 0x1ff) - 1) >> 3) + 1; /* number of bytes in buffer that are (partially) filled */ + if (n < 64) + memset(state->buffer + n, 0, 64-n); + state->buffer[(state->ctr >> 3)&0x3f] &= ~(0xff >> (state->ctr & 0x7)); /* zero-pad partial byte */ + lane256_compress(state->buffer, state->h, MSB32(state->ctr), LSB32(state->ctr)); + } + + /* output transformation */ + memset(state->buffer, 0, 64); + state->buffer[0] = 0x00; /* flag byte 0x00: output transformation without seed */ + state->buffer[1] = T8(state->ctr >> 56); /* message length in big-endian */ + state->buffer[2] = T8(state->ctr >> 48); + state->buffer[3] = T8(state->ctr >> 40); + state->buffer[4] = T8(state->ctr >> 32); + state->buffer[5] = T8(state->ctr >> 24); + state->buffer[6] = T8(state->ctr >> 16); + state->buffer[7] = T8(state->ctr >> 8); + state->buffer[8] = T8(state->ctr >> 0); + lane256_compress(state->buffer, state->h, 0, 0); + + /* write back result */ + U32TO8_BIG(hashval, state->h[0]); + U32TO8_BIG(hashval+4, state->h[1]); + U32TO8_BIG(hashval+8, state->h[2]); + U32TO8_BIG(hashval+12, state->h[3]); + U32TO8_BIG(hashval+16, state->h[4]); + U32TO8_BIG(hashval+20, state->h[5]); + U32TO8_BIG(hashval+24, state->h[6]); + U32TO8_BIG(hashval+28, state->h[7]); + + break; + + case 384: case 512: + /* do zero padding and compress last block, if there is some data in the buffer */ + if (state->ctr & 0x3ff) { + const u64 n = (((state->ctr & 0x3ff) - 1) >> 3) + 1; /* number of bytes in buffer that are (partially) filled */ + if (n < 128) + memset(state->buffer + n, 0, 128-n); + state->buffer[(state->ctr >> 3)&0x7f] &= ~(0xff >> (state->ctr & 0x7)); /* zero-pad partial byte */ + lane512_compress(state->buffer, state->h, MSB32(state->ctr), LSB32(state->ctr)); + } + + /* output transformation */ + memset(state->buffer, 0, 128); + state->buffer[0] = 0x00; /* flag byte 0x00: output transformation without seed */ + state->buffer[1] = T8(state->ctr >> 56); /* message length in big-endian */ + state->buffer[2] = T8(state->ctr >> 48); + state->buffer[3] = T8(state->ctr >> 40); + state->buffer[4] = T8(state->ctr >> 32); + state->buffer[5] = T8(state->ctr >> 24); + state->buffer[6] = T8(state->ctr >> 16); + state->buffer[7] = T8(state->ctr >> 8); + state->buffer[8] = T8(state->ctr >> 0); + lane512_compress(state->buffer, state->h, 0, 0); + + /* write back result */ + U32TO8_BIG(hashval, state->h[0]); + U32TO8_BIG(hashval+4, state->h[1]); + U32TO8_BIG(hashval+8, state->h[2]); + U32TO8_BIG(hashval+12, state->h[3]); + U32TO8_BIG(hashval+16, state->h[4]); + U32TO8_BIG(hashval+20, state->h[5]); + U32TO8_BIG(hashval+24, state->h[6]); + U32TO8_BIG(hashval+28, state->h[7]); + U32TO8_BIG(hashval+32, state->h[8]); + U32TO8_BIG(hashval+36, state->h[9]); + U32TO8_BIG(hashval+40, state->h[10]); + U32TO8_BIG(hashval+44, state->h[11]); + U32TO8_BIG(hashval+48, state->h[12]); + U32TO8_BIG(hashval+52, state->h[13]); + U32TO8_BIG(hashval+56, state->h[14]); + U32TO8_BIG(hashval+60, state->h[15]); + + break; + } + + return SUCCESS; +} + +HashReturn laneHash (int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval) +{ + hashState state; + HashReturn hashReturn; + + if ((hashReturn = laneInit(&state, hashbitlen)) != SUCCESS) + return hashReturn; + if ((hashReturn = laneUpdate(&state, data, databitlen)) != SUCCESS) + return hashReturn; + if ((hashReturn = laneFinal(&state, hashval)) != SUCCESS) + return hashReturn; + return SUCCESS; +} diff --git a/stratum/sha3/lane.h b/stratum/sha3/lane.h new file mode 100644 index 000000000..1d935a171 --- /dev/null +++ b/stratum/sha3/lane.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2008 Sebastiaan Indesteege + * + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Optimised ANSI-C implementation of LANE + */ + +#ifndef LANE_H +#define LANE_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#include + +typedef unsigned char BitSequence; +typedef unsigned long long DataLength; + +typedef enum { SUCCESS = 0, FAIL = 1, BAD_HASHBITLEN = 2, BAD_DATABITLEN = 3 } HashReturn; + +typedef unsigned char u8; +typedef unsigned int u32; +typedef unsigned long long u64; + +typedef struct { + int hashbitlen; + u64 ctr; + u32 h[16]; + u8 buffer[128]; +} hashState; + +HashReturn laneInit (hashState *state, int hashbitlen); +HashReturn laneUpdate (hashState *state, const BitSequence *data, DataLength databitlen); +HashReturn laneFinal (hashState *state, BitSequence *hashval); +HashReturn laneHash (int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval); + +#if defined(__cplusplus) +} +#endif + +#endif /* LANE_H */ diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 80a97c74c..456096e81 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -88,6 +88,7 @@ function yaamp_get_algos() 'x20r', 'x21s', 'x22i', + 'x25x', 'xevan', 'yescrypt', 'yescryptR8', @@ -255,6 +256,7 @@ function getAlgoColors($algo) 'x20r' => '#f0b0a0', 'x21s' => '#f0b0a0', 'x22i' => '#f0a090', + 'x25x' => '#f0a090', 'xevan' => '#f0b0a0', 'yescrypt' => '#e0d0e0', 'yescryptR8' => '#e0d0e0', @@ -364,6 +366,7 @@ function getAlgoPort($algo) 'x20r' => 4300, 'x21s' => 3224, 'x22i' => 3223, + 'x25x' => 5633, 'xevan' => 3739, 'yescrypt' => 6233, 'yescryptR8' => 6353, diff --git a/web/yaamp/core/functions/yaamp.php.bak b/web/yaamp/core/functions/yaamp.php.bak index 56e807823..80a97c74c 100644 --- a/web/yaamp/core/functions/yaamp.php.bak +++ b/web/yaamp/core/functions/yaamp.php.bak @@ -56,6 +56,7 @@ function yaamp_get_algos() 'quark', 'qubit', 'rainforest', + 'rfv2', 'scrypt', 'scryptn', 'sha256', @@ -92,6 +93,11 @@ function yaamp_get_algos() 'yescryptR8', 'yescryptR16', 'yescryptR32', + 'yespower', + 'yespowerR8', + 'yespowerR16', + 'yespowerR24', + 'yespowerR32', 'zr5', ); } @@ -217,6 +223,7 @@ function getAlgoColors($algo) 'quark' => '#c0c0c0', 'qubit' => '#d0a0f0', 'rainforest' => '#d0f0a0', + 'rfv2' => '#d0f0a0', 'renesis' => '#f0b0a0', 'scrypt' => '#c0c0e0', 'scryptn' => '#d0d0d0', @@ -253,6 +260,11 @@ function getAlgoColors($algo) 'yescryptR8' => '#e0d0e0', 'yescryptR16' => '#e2d0e2', 'yescryptR32' => '#e2d0d2', + 'yespower' => '#e2d0d2', + 'yespowerR8' => '#e2d0d2', + 'yespowerR16' => '#e2d0d2', + 'yespowerR24' => '#e2d0d2', + 'yespowerR32' => '#e2d0d2', 'zr5' => '#d0b0d0', 'MN' => '#ffffff', // MasterNode Earnings @@ -320,6 +332,7 @@ function getAlgoPort($algo) 'qubit' => 4733, 'renesis' => 5252, 'rainforest' => 7443, + 'rfv2' => 8443, 'scrypt' => 3433, 'scryptn' => 4333, 'sha256' => 3333, @@ -356,7 +369,11 @@ function getAlgoPort($algo) 'yescryptR8' => 6353, 'yescryptR16' => 6333, 'yescryptR32' => 6343, - 'zr5' => 4833, + 'yespower' => 6234, + 'yespowerR8' => 6235, + 'yespowerR16' => 6236, + 'yespowerR24' => 6237, + 'yespowerR32' => 6238, 'zr5' => 5533, //'groestl' => 5333, // 5555 to 5683 reserved From be9eacc0c449b0d68f8edff7fec01ca479c10290 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 9 Jun 2019 01:28:19 -0400 Subject: [PATCH 477/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 7bd8f1381..065dce5b2 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -353,6 +353,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * (strcmp(coind->symbol, "ALMN") == 0)|| (strcmp(coind->symbol, "AGM") == 0)|| (strcmp(coind->symbol, "BMN") == 0)|| + (strcmp(coind->symbol, "TNA") == 0)|| (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; From 8d6d0ef8f60e8bbeb04421370456b861df6a00b6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 9 Jun 2019 01:41:04 -0400 Subject: [PATCH 478/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 065dce5b2..7bd8f1381 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -353,7 +353,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * (strcmp(coind->symbol, "ALMN") == 0)|| (strcmp(coind->symbol, "AGM") == 0)|| (strcmp(coind->symbol, "BMN") == 0)|| - (strcmp(coind->symbol, "TNA") == 0)|| (strcmp(coind->symbol, "CRDS") == 0)) { char payees[4]; From dc1d764da50b9110b3010ba7a12adc84447a8ce3 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 10 Jun 2019 18:16:40 -0400 Subject: [PATCH 479/576] stratum updates --- stratum/algos/Lyra2.c | 19 +- stratum/algos/Lyra2.c.bak | 386 +++++ stratum/algos/Lyra2.h | 3 +- stratum/algos/Lyra2.h.bak | 44 + stratum/algos/beenode.c | 80 + stratum/algos/beenode.h | 14 + stratum/algos/blake2-ref/blake2-impl.h | 187 ++ stratum/algos/blake2-ref/blake2.h | 192 +++ stratum/algos/blake2-ref/blake2b.c | 390 +++++ stratum/algos/blake2-ref/blake2s.c | 364 ++++ stratum/algos/blake2-ref/blamka-round-opt.h | 476 ++++++ stratum/algos/blake2-ref/blamka-round-ref.h | 56 + stratum/algos/bmw512.c | 18 + stratum/algos/bmw512.h | 11 + stratum/algos/honeycomb/facet_five.c | 1042 ++++++++++++ stratum/algos/honeycomb/facet_five.h | 79 + stratum/algos/honeycomb/facet_four.c | 780 +++++++++ stratum/algos/honeycomb/facet_four.h | 76 + stratum/algos/honeycomb/facet_one.c | 1702 +++++++++++++++++++ stratum/algos/honeycomb/facet_one.h | 81 + stratum/algos/honeycomb/facet_six.c | 632 +++++++ stratum/algos/honeycomb/facet_six.h | 82 + stratum/algos/honeycomb/facet_three.c | 558 ++++++ stratum/algos/honeycomb/facet_three.h | 80 + stratum/algos/honeycomb/facet_two.c | 845 +++++++++ stratum/algos/honeycomb/facet_two.h | 85 + stratum/algos/honeycomb/facets_helper.c | 350 ++++ stratum/algos/honeycomb/honeycomb_types.h | 1165 +++++++++++++ stratum/algos/lyra2v3.c | 37 +- stratum/algos/lyra2v3.c.bak | 1 + stratum/algos/makefile | 7 +- stratum/algos/makefile.bak | 2 +- stratum/algos/sha256-d.c | 634 +++++++ stratum/algos/sha256-d.h | 69 + stratum/algos/x16rt.c | 73 +- stratum/algos/x16rt.c.bak | 230 +++ stratum/algos/x16rt.h | 14 +- stratum/algos/x16rt.h.bak | 16 + stratum/config.sample/bmw512.conf | 13 + stratum/config.sample/honeycomb.conf | 16 + 40 files changed, 10814 insertions(+), 95 deletions(-) create mode 100644 stratum/algos/Lyra2.c.bak create mode 100644 stratum/algos/Lyra2.h.bak create mode 100644 stratum/algos/beenode.c create mode 100644 stratum/algos/beenode.h create mode 100644 stratum/algos/blake2-ref/blake2-impl.h create mode 100644 stratum/algos/blake2-ref/blake2.h create mode 100644 stratum/algos/blake2-ref/blake2b.c create mode 100644 stratum/algos/blake2-ref/blake2s.c create mode 100644 stratum/algos/blake2-ref/blamka-round-opt.h create mode 100644 stratum/algos/blake2-ref/blamka-round-ref.h create mode 100644 stratum/algos/bmw512.c create mode 100644 stratum/algos/bmw512.h create mode 100644 stratum/algos/honeycomb/facet_five.c create mode 100644 stratum/algos/honeycomb/facet_five.h create mode 100644 stratum/algos/honeycomb/facet_four.c create mode 100644 stratum/algos/honeycomb/facet_four.h create mode 100644 stratum/algos/honeycomb/facet_one.c create mode 100644 stratum/algos/honeycomb/facet_one.h create mode 100644 stratum/algos/honeycomb/facet_six.c create mode 100644 stratum/algos/honeycomb/facet_six.h create mode 100644 stratum/algos/honeycomb/facet_three.c create mode 100644 stratum/algos/honeycomb/facet_three.h create mode 100644 stratum/algos/honeycomb/facet_two.c create mode 100644 stratum/algos/honeycomb/facet_two.h create mode 100644 stratum/algos/honeycomb/facets_helper.c create mode 100644 stratum/algos/honeycomb/honeycomb_types.h create mode 100644 stratum/algos/sha256-d.c create mode 100644 stratum/algos/sha256-d.h create mode 100644 stratum/algos/x16rt.c.bak create mode 100644 stratum/algos/x16rt.h.bak create mode 100644 stratum/config.sample/bmw512.conf create mode 100644 stratum/config.sample/honeycomb.conf diff --git a/stratum/algos/Lyra2.c b/stratum/algos/Lyra2.c index a2016be8f..1d68fd1a0 100644 --- a/stratum/algos/Lyra2.c +++ b/stratum/algos/Lyra2.c @@ -44,7 +44,7 @@ * * @return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation) */ -int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols) +int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int64_t nRows, const int16_t nCols) { //============================= Basic variables ============================// int64_t row = 2; //index of row to be processed @@ -233,7 +233,8 @@ int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void * const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; - const int64_t BLOCK_LEN = BLOCK_LEN_BLAKE2_SAFE_INT64; + // for Lyra2REv2, nCols = 4, v1 was using 8 + const int64_t BLOCK_LEN = (nCols == 4) ? BLOCK_LEN_BLAKE2_SAFE_INT64 : BLOCK_LEN_BLAKE2_SAFE_BYTES; size_t sz = (size_t)ROW_LEN_BYTES * nRows; uint64_t *wholeMatrix = malloc(sz); @@ -333,10 +334,10 @@ int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void * //Checks if all rows in the window where visited. if (rowa == 0) { - step = window + gap; //changes the step: approximately doubles its value - window *= 2; //doubles the size of the re-visitation window - gap = -gap; //inverts the modifier to the step - } + step = window + gap; //changes the step: approximately doubles its value + window *= 2; //doubles the size of the re-visitation window + gap = -gap; //inverts the modifier to the step + } } while (row < nRows); //==========================================================================/ @@ -345,12 +346,12 @@ int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void * row = 0; //Resets the visitation to the first row of the memory matrix for (tau = 1; tau <= timeCost; tau++) { //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 - step = ((tau & 1) == 0) ? -1 : (nRows >> 1) - 1; + step = (tau % 2 == 0) ? -1 : nRows / 2 - 1; do { //Selects a pseudorandom index row* //------------------------------------------------------------------------------------------ - instance = state[instance & 0xF]; - rowa = state[instance & 0xF] & (unsigned int)(nRows-1); + instance = state[instance % 16]; + rowa = state[instance % 16] & (unsigned int)(nRows-1); //rowa = state[0] & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) //rowa = state[0] % nRows; //(USE THIS FOR THE "GENERIC" CASE) diff --git a/stratum/algos/Lyra2.c.bak b/stratum/algos/Lyra2.c.bak new file mode 100644 index 000000000..a2016be8f --- /dev/null +++ b/stratum/algos/Lyra2.c.bak @@ -0,0 +1,386 @@ +/** + * Implementation of the Lyra2 Password Hashing Scheme (PHS). + * + * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. + * + * This software is hereby placed in the public domain. + * + * 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 +#include +#include +#include + +#include "Lyra2.h" +#include "Sponge.h" + +/** + * Executes Lyra2 based on the G function from Blake2b. This version supports salts and passwords + * whose combined length is smaller than the size of the memory matrix, (i.e., (nRows x nCols x b) bits, + * where "b" is the underlying sponge's bitrate). In this implementation, the "basil" is composed by all + * integer parameters (treated as type "unsigned int") in the order they are provided, plus the value + * of nCols, (i.e., basil = kLen || pwdlen || saltlen || timeCost || nRows || nCols). + * + * @param K The derived key to be output by the algorithm + * @param kLen Desired key length + * @param pwd User password + * @param pwdlen Password length + * @param salt Salt + * @param saltlen Salt length + * @param timeCost Parameter to determine the processing time (T) + * @param nRows Number or rows of the memory matrix (R) + * @param nCols Number of columns of the memory matrix (C) + * + * @return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation) + */ +int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols) +{ + //============================= Basic variables ============================// + int64_t row = 2; //index of row to be processed + int64_t prev = 1; //index of prev (last row ever computed/modified) + int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) + int64_t tau; //Time Loop iterator + int64_t step = 1; //Visitation step (used during Setup and Wandering phases) + int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) + int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 + int64_t i; //auxiliary iteration counter + int64_t v64; // 64bit var for memcpy + //==========================================================================/ + + //========== Initializing the Memory Matrix and pointers to it =============// + //Tries to allocate enough space for the whole memory matrix + + const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; + const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; + // for Lyra2REv2, nCols = 4, v1 was using 8 + const int64_t BLOCK_LEN = (nCols == 4) ? BLOCK_LEN_BLAKE2_SAFE_INT64 : BLOCK_LEN_BLAKE2_SAFE_BYTES; + + i = (int64_t)ROW_LEN_BYTES * nRows; + uint64_t *wholeMatrix = malloc(i); + if (wholeMatrix == NULL) { + return -1; + } + memset(wholeMatrix, 0, i); + + //Allocates pointers to each row of the matrix + uint64_t **memMatrix = malloc(sizeof(uint64_t*) * nRows); + if (memMatrix == NULL) { + return -1; + } + //Places the pointers in the correct positions + uint64_t *ptrWord = wholeMatrix; + for (i = 0; i < nRows; i++) { + memMatrix[i] = ptrWord; + ptrWord += ROW_LEN_INT64; + } + //==========================================================================/ + + //============= Getting the password + salt + basil padded with 10*1 ===============// + //OBS.:The memory matrix will temporarily hold the password: not for saving memory, + //but this ensures that the password copied locally will be overwritten as soon as possible + + //First, we clean enough blocks for the password, salt, basil and padding + int64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof(uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; + + byte *ptrByte = (byte*) wholeMatrix; + + //Prepends the password + memcpy(ptrByte, pwd, pwdlen); + ptrByte += pwdlen; + + //Concatenates the salt + memcpy(ptrByte, salt, saltlen); + ptrByte += saltlen; + + memset(ptrByte, 0, nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - (saltlen + pwdlen)); + + //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface + memcpy(ptrByte, &kLen, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = pwdlen; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = saltlen; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = timeCost; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = nRows; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = nCols; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + + //Now comes the padding + *ptrByte = 0x80; //first byte of padding: right after the password + ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix + ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block + *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block + //==========================================================================/ + + //======================= Initializing the Sponge State ====================// + //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) + uint64_t state[16]; + initState(state); + //==========================================================================/ + + //================================ Setup Phase =============================// + //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits + ptrWord = wholeMatrix; + for (i = 0; i < nBlocksInput; i++) { + absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) + ptrWord += BLOCK_LEN; //goes to next block of pad(pwd || salt || basil) + } + + //Initializes M[0] and M[1] + reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here + + reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); + + do { + //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) + + reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //updates the value of row* (deterministically picked during Setup)) + rowa = (rowa + step) & (window - 1); + //update prev: it now points to the last row ever computed + prev = row; + //updates row: goes to the next row to be computed + row++; + + //Checks if all rows in the window where visited. + if (rowa == 0) { + step = window + gap; //changes the step: approximately doubles its value + window *= 2; //doubles the size of the re-visitation window + gap = -gap; //inverts the modifier to the step + } + + } while (row < nRows); + //==========================================================================/ + + //============================ Wandering Phase =============================// + row = 0; //Resets the visitation to the first row of the memory matrix + for (tau = 1; tau <= timeCost; tau++) { + //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 + step = (tau % 2 == 0) ? -1 : nRows / 2 - 1; + do { + //Selects a pseudorandom index row* + //------------------------------------------------------------------------------------------ + rowa = state[0] & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + //rowa = state[0] % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] + reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //update prev: it now points to the last row ever computed + prev = row; + + //updates row: goes to the next row to be computed + //------------------------------------------------------------------------------------------ + row = (row + step) & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + //row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + } while (row != 0); + } + + //============================ Wrap-up Phase ===============================// + //Absorbs the last block of the memory matrix + absorbBlock(state, memMatrix[rowa]); + + //Squeezes the key + squeeze(state, K, (unsigned int) kLen); + + //========================= Freeing the memory =============================// + free(memMatrix); + free(wholeMatrix); + + return 0; +} + +int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols) +{ + //============================= Basic variables ============================// + int64_t row = 2; //index of row to be processed + int64_t prev = 1; //index of prev (last row ever computed/modified) + int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) + int64_t tau; //Time Loop iterator + int64_t step = 1; //Visitation step (used during Setup and Wandering phases) + int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) + int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 + int64_t i; //auxiliary iteration counter + int64_t v64; // 64bit var for memcpy + uint64_t instance = 0; + //==========================================================================/ + + //========== Initializing the Memory Matrix and pointers to it =============// + //Tries to allocate enough space for the whole memory matrix + + const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; + const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; + const int64_t BLOCK_LEN = BLOCK_LEN_BLAKE2_SAFE_INT64; + + size_t sz = (size_t)ROW_LEN_BYTES * nRows; + uint64_t *wholeMatrix = malloc(sz); + if (wholeMatrix == NULL) { + return -1; + } + memset(wholeMatrix, 0, sz); + + //Allocates pointers to each row of the matrix + uint64_t **memMatrix = malloc(sizeof(uint64_t*) * nRows); + if (memMatrix == NULL) { + return -1; + } + //Places the pointers in the correct positions + uint64_t *ptrWord = wholeMatrix; + for (i = 0; i < nRows; i++) { + memMatrix[i] = ptrWord; + ptrWord += ROW_LEN_INT64; + } + //==========================================================================/ + + //============= Getting the password + salt + basil padded with 10*1 ===============// + //OBS.:The memory matrix will temporarily hold the password: not for saving memory, + //but this ensures that the password copied locally will be overwritten as soon as possible + + //First, we clean enough blocks for the password, salt, basil and padding + int64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof(uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; + + byte *ptrByte = (byte*) wholeMatrix; + + //Prepends the password + memcpy(ptrByte, pwd, pwdlen); + ptrByte += pwdlen; + + //Concatenates the salt + memcpy(ptrByte, salt, saltlen); + ptrByte += saltlen; + + memset(ptrByte, 0, (size_t) (nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - (saltlen + pwdlen))); + + //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface + memcpy(ptrByte, &kLen, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = pwdlen; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = saltlen; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = timeCost; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = nRows; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + v64 = nCols; + memcpy(ptrByte, &v64, sizeof(int64_t)); + ptrByte += sizeof(uint64_t); + + //Now comes the padding + *ptrByte = 0x80; //first byte of padding: right after the password + ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix + ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block + *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block + //==========================================================================/ + + //======================= Initializing the Sponge State ====================// + //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) + uint64_t state[16]; + initState(state); + //==========================================================================/ + + //================================ Setup Phase =============================// + //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits + ptrWord = wholeMatrix; + for (i = 0; i < nBlocksInput; i++) { + absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) + ptrWord += BLOCK_LEN; //goes to next block of pad(pwd || salt || basil) + } + + //Initializes M[0] and M[1] + reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here + + reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); + + do { + //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) + + reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //updates the value of row* (deterministically picked during Setup)) + rowa = (rowa + step) & (window - 1); + //update prev: it now points to the last row ever computed + prev = row; + //updates row: goes to the next row to be computed + row++; + + //Checks if all rows in the window where visited. + if (rowa == 0) { + step = window + gap; //changes the step: approximately doubles its value + window *= 2; //doubles the size of the re-visitation window + gap = -gap; //inverts the modifier to the step + } + + } while (row < nRows); + //==========================================================================/ + + //============================ Wandering Phase =============================// + row = 0; //Resets the visitation to the first row of the memory matrix + for (tau = 1; tau <= timeCost; tau++) { + //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 + step = ((tau & 1) == 0) ? -1 : (nRows >> 1) - 1; + do { + //Selects a pseudorandom index row* + //------------------------------------------------------------------------------------------ + instance = state[instance & 0xF]; + rowa = state[instance & 0xF] & (unsigned int)(nRows-1); + + //rowa = state[0] & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + //rowa = state[0] % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] + reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); + + //update prev: it now points to the last row ever computed + prev = row; + + //updates row: goes to the next row to be computed + //------------------------------------------------------------------------------------------ + row = (row + step) & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) + //row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) + //------------------------------------------------------------------------------------------ + + } while (row != 0); + } + + //============================ Wrap-up Phase ===============================// + //Absorbs the last block of the memory matrix + absorbBlock(state, memMatrix[rowa]); + + //Squeezes the key + squeeze(state, K, (unsigned int) kLen); + + //========================= Freeing the memory =============================// + free(memMatrix); + free(wholeMatrix); + + return 0; +} diff --git a/stratum/algos/Lyra2.h b/stratum/algos/Lyra2.h index a6aa87a21..2b8773d6d 100644 --- a/stratum/algos/Lyra2.h +++ b/stratum/algos/Lyra2.h @@ -37,8 +37,7 @@ typedef unsigned char byte; #define BLOCK_LEN_BYTES (BLOCK_LEN_INT64 * 8) //Block length, in bytes #endif -int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols); - +int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int64_t nRows, const int16_t nCols); int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols); #endif /* LYRA2_H_ */ diff --git a/stratum/algos/Lyra2.h.bak b/stratum/algos/Lyra2.h.bak new file mode 100644 index 000000000..a6aa87a21 --- /dev/null +++ b/stratum/algos/Lyra2.h.bak @@ -0,0 +1,44 @@ +/** + * Header file for the Lyra2 Password Hashing Scheme (PHS). + * + * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. + * + * This software is hereby placed in the public domain. + * + * 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. + */ +#ifndef LYRA2_H_ +#define LYRA2_H_ + +#include + +typedef unsigned char byte; + +//Block length required so Blake2's Initialization Vector (IV) is not overwritten (THIS SHOULD NOT BE MODIFIED) +#define BLOCK_LEN_BLAKE2_SAFE_INT64 8 //512 bits (=64 bytes, =8 uint64_t) +#define BLOCK_LEN_BLAKE2_SAFE_BYTES (BLOCK_LEN_BLAKE2_SAFE_INT64 * 8) //same as above, in bytes + + +#ifdef BLOCK_LEN_BITS + #define BLOCK_LEN_INT64 (BLOCK_LEN_BITS/64) //Block length: 768 bits (=96 bytes, =12 uint64_t) + #define BLOCK_LEN_BYTES (BLOCK_LEN_BITS/8) //Block length, in bytes +#else //default block lenght: 768 bits + #define BLOCK_LEN_INT64 12 //Block length: 768 bits (=96 bytes, =12 uint64_t) + #define BLOCK_LEN_BYTES (BLOCK_LEN_INT64 * 8) //Block length, in bytes +#endif + +int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols); + +int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols); + +#endif /* LYRA2_H_ */ diff --git a/stratum/algos/beenode.c b/stratum/algos/beenode.c new file mode 100644 index 000000000..ff072c3bb --- /dev/null +++ b/stratum/algos/beenode.c @@ -0,0 +1,80 @@ +#include "beenode.h" +#include +#include +#include +#include + + +#include "honeycomb/facet_one.h" +#include "honeycomb/facet_two.h" +#include "honeycomb/facet_three.h" +#include "honeycomb/facet_four.h" +#include "honeycomb/facet_five.h" +#include "honeycomb/facet_six.h" + + + +void HoneyBee( const unsigned char *in, unsigned int sz, unsigned char *out ){ + memcpy( &out[ 0], &in[0], 36 ); + memcpy( &out[36], &in[sz-28], 28 ); +} + +void xor64byte( unsigned char *a, unsigned char *b, unsigned char *out ){ + for( int i = 0; i < 64; i++){ + out[i] = a[i] ^ b[i]; + } +} + +void beenode_hash(const char* input, char* output, unsigned int len){ + + facet_one_context ctx_one; + facet_two_context ctx_two; + facet_three_context ctx_three; + facet_four_context ctx_four; + facet_five_context ctx_five; + facet_six_context ctx_six; + + unsigned char honey[64]; + + unsigned char hash0[64]; + unsigned char hash1[64]; + unsigned char hash2[64]; + unsigned char hash3[64]; + unsigned char hash4[64]; + unsigned char hash5[64]; + unsigned char hash6[64]; + unsigned char hash7[64]; + unsigned char hash8[64]; + unsigned char hash9[64]; + unsigned char hash10[64]; + unsigned char hash11[64]; + + HoneyBee( (const unsigned char*)input, len, honey ); + facet_one_init(&ctx_one); + facet_one(&ctx_one, input, len ); + facet_one_close(&ctx_one, hash0 ); + facet_four_init(&ctx_four); + facet_four(&ctx_four, input, len ); + facet_four_close(&ctx_four, hash1 ); + xor64byte( honey, hash1, hash2 ); + xor64byte( hash0, hash2, hash3 ); + facet_two_init( &ctx_two ); + facet_two( &ctx_two, hash3, 64 ); + facet_two_close( &ctx_two, hash4 ); + facet_five_init(&ctx_five); + facet_five (&ctx_five, input, len ); + facet_five_close(&ctx_five, hash5 ); + xor64byte( honey, hash5, hash6 ); + xor64byte( hash4, hash6, hash7 ); + facet_three_init( &ctx_three ); + facet_three ( &ctx_three, hash7, 64 ); + facet_three_close( &ctx_three, hash8 ); + facet_six_init(&ctx_six); + facet_six( &ctx_six, input, len ); + facet_six_close(&ctx_six, hash9); + xor64byte( honey, hash9, hash10 ); + xor64byte( hash8, hash10, hash11 ); + + memcpy(output, hash11, 32); +} + diff --git a/stratum/algos/beenode.h b/stratum/algos/beenode.h new file mode 100644 index 000000000..975d50e26 --- /dev/null +++ b/stratum/algos/beenode.h @@ -0,0 +1,14 @@ +#ifndef BEENODE_H +#define BEENODE_H + +#ifdef __cplusplus +extern "C" { +#endif + +void beenode_hash(const char* input, char* output, unsigned int len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/blake2-ref/blake2-impl.h b/stratum/algos/blake2-ref/blake2-impl.h new file mode 100644 index 000000000..ace753107 --- /dev/null +++ b/stratum/algos/blake2-ref/blake2-impl.h @@ -0,0 +1,187 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef PORTABLE_BLAKE2_IMPL_H +#define PORTABLE_BLAKE2_IMPL_H + +#include +#include + +#if defined(_MSC_VER) +#define BLAKE2_INLINE __inline +#elif defined(__GNUC__) || defined(__clang__) +#define BLAKE2_INLINE __inline__ +#else +#define BLAKE2_INLINE +#endif + +/* Argon2 Team - Begin Code */ +/* + Not an exhaustive list, but should cover the majority of modern platforms + Additionally, the code will always be correct---this is only a performance + tweak. +*/ +#if (defined(__BYTE_ORDER__) && \ + (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) || \ + defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \ + defined(__AARCH64EL__) || defined(__amd64__) || defined(__i386__) || \ + defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ + defined(_M_ARM) +#define NATIVE_LITTLE_ENDIAN +#endif +/* Argon2 Team - End Code */ + +static BLAKE2_INLINE uint32_t load32(const void *src) { +#if defined(NATIVE_LITTLE_ENDIAN) + uint32_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = (const uint8_t *)src; + uint32_t w = *p++; + w |= (uint32_t)(*p++) << 8; + w |= (uint32_t)(*p++) << 16; + w |= (uint32_t)(*p++) << 24; + return w; +#endif +} + +static BLAKE2_INLINE uint64_t load64(const void *src) { +#if defined(NATIVE_LITTLE_ENDIAN) + uint64_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = (const uint8_t *)src; + uint64_t w = *p++; + w |= (uint64_t)(*p++) << 8; + w |= (uint64_t)(*p++) << 16; + w |= (uint64_t)(*p++) << 24; + w |= (uint64_t)(*p++) << 32; + w |= (uint64_t)(*p++) << 40; + w |= (uint64_t)(*p++) << 48; + w |= (uint64_t)(*p++) << 56; + return w; +#endif +} + +static BLAKE2_INLINE uint16_t load16( const void *src ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + uint16_t w; + memcpy(&w, src, sizeof w); + return w; +#else + const uint8_t *p = ( const uint8_t * )src; + return (( uint16_t )( p[0] ) << 0) | + (( uint16_t )( p[1] ) << 8) ; +#endif +} + +static BLAKE2_INLINE void store16( void *dst, uint16_t w ) +{ +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = ( uint8_t * )dst; + *p++ = ( uint8_t )w; w >>= 8; + *p++ = ( uint8_t )w; +#endif +} + +static BLAKE2_INLINE void store32(void *dst, uint32_t w) { +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +#endif +} + +static BLAKE2_INLINE void store64(void *dst, uint64_t w) { +#if defined(NATIVE_LITTLE_ENDIAN) + memcpy(dst, &w, sizeof w); +#else + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +#endif +} + +static BLAKE2_INLINE uint64_t load48(const void *src) { + const uint8_t *p = (const uint8_t *)src; + uint64_t w = *p++; + w |= (uint64_t)(*p++) << 8; + w |= (uint64_t)(*p++) << 16; + w |= (uint64_t)(*p++) << 24; + w |= (uint64_t)(*p++) << 32; + w |= (uint64_t)(*p++) << 40; + return w; +} + +static BLAKE2_INLINE void store48(void *dst, uint64_t w) { + uint8_t *p = (uint8_t *)dst; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; + w >>= 8; + *p++ = (uint8_t)w; +} + +static BLAKE2_INLINE uint32_t rotr32(const uint32_t w, const unsigned c) { + return (w >> c) | (w << (32 - c)); +} + +static BLAKE2_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) { + return (w >> c) | (w << (64 - c)); +} + +/* prevents compiler optimizing out memset() */ +static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) +{ + static void *(*const volatile memset_v)(void *, int, size_t) = &memset; + memset_v(v, 0, n); +} + +void clear_internal_memory(void *v, size_t n); + +#endif \ No newline at end of file diff --git a/stratum/algos/blake2-ref/blake2.h b/stratum/algos/blake2-ref/blake2.h new file mode 100644 index 000000000..685257af9 --- /dev/null +++ b/stratum/algos/blake2-ref/blake2.h @@ -0,0 +1,192 @@ +/* + BLAKE2 reference source code package - reference C implementations + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ +#ifndef BLAKE2_H +#define BLAKE2_H + +#include +#include + +#if defined(_MSC_VER) +#define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop)) +#else +#define BLAKE2_PACKED(x) x __attribute__((packed)) +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + + enum blake2s_constant + { + BLAKE2S_BLOCKBYTES = 64, + BLAKE2S_OUTBYTES = 32, + BLAKE2S_KEYBYTES = 32, + BLAKE2S_SALTBYTES = 8, + BLAKE2S_PERSONALBYTES = 8 + }; + + enum blake2b_constant + { + BLAKE2B_BLOCKBYTES = 128, + BLAKE2B_OUTBYTES = 64, + BLAKE2B_KEYBYTES = 64, + BLAKE2B_SALTBYTES = 16, + BLAKE2B_PERSONALBYTES = 16 + }; + + typedef struct blake2s_state__ + { + uint32_t h[8]; + uint32_t t[2]; + uint32_t f[2]; + uint8_t buf[BLAKE2S_BLOCKBYTES]; + size_t buflen; + size_t outlen; + uint8_t last_node; + } blake2s_state; + + typedef struct blake2b_state__ + { + uint64_t h[8]; + uint64_t t[2]; + uint64_t f[2]; + uint8_t buf[BLAKE2B_BLOCKBYTES]; + size_t buflen; + size_t outlen; + uint8_t last_node; + } blake2b_state; + + typedef struct blake2sp_state__ + { + blake2s_state S[8][1]; + blake2s_state R[1]; + uint8_t buf[8 * BLAKE2S_BLOCKBYTES]; + size_t buflen; + size_t outlen; + } blake2sp_state; + + typedef struct blake2bp_state__ + { + blake2b_state S[4][1]; + blake2b_state R[1]; + uint8_t buf[4 * BLAKE2B_BLOCKBYTES]; + size_t buflen; + size_t outlen; + } blake2bp_state; + + + BLAKE2_PACKED(struct blake2s_param__ + { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint16_t xof_length; /* 14 */ + uint8_t node_depth; /* 15 */ + uint8_t inner_length; /* 16 */ + /* uint8_t reserved[0]; */ + uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ + uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ + }); + + typedef struct blake2s_param__ blake2s_param; + + BLAKE2_PACKED(struct blake2b_param__ + { + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint32_t xof_length; /* 16 */ + uint8_t node_depth; /* 17 */ + uint8_t inner_length; /* 18 */ + uint8_t reserved[14]; /* 32 */ + uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ + uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ + }); + + typedef struct blake2b_param__ blake2b_param; + + typedef struct blake2xs_state__ + { + blake2s_state S[1]; + blake2s_param P[1]; + } blake2xs_state; + + typedef struct blake2xb_state__ + { + blake2b_state S[1]; + blake2b_param P[1]; + } blake2xb_state; + + /* Padded structs result in a compile-time error */ + enum { + BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES), + BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) + }; + + /* Streaming API */ + int blake2s_init( blake2s_state *S, size_t outlen ); + int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2s_init_param( blake2s_state *S, const blake2s_param *P ); + int blake2s_update( blake2s_state *S, const void *in, size_t inlen ); + int blake2s_final( blake2s_state *S, void *out, size_t outlen ); + + int blake2b_init( blake2b_state *S, size_t outlen ); + int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2b_init_param( blake2b_state *S, const blake2b_param *P ); + int blake2b_update( blake2b_state *S, const void *in, size_t inlen ); + int blake2b_final( blake2b_state *S, void *out, size_t outlen ); + + int blake2sp_init( blake2sp_state *S, size_t outlen ); + int blake2sp_init_key( blake2sp_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2sp_update( blake2sp_state *S, const void *in, size_t inlen ); + int blake2sp_final( blake2sp_state *S, void *out, size_t outlen ); + + int blake2bp_init( blake2bp_state *S, size_t outlen ); + int blake2bp_init_key( blake2bp_state *S, size_t outlen, const void *key, size_t keylen ); + int blake2bp_update( blake2bp_state *S, const void *in, size_t inlen ); + int blake2bp_final( blake2bp_state *S, void *out, size_t outlen ); + + /* Variable output length API */ + int blake2xs_init( blake2xs_state *S, const size_t outlen ); + int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key, size_t keylen ); + int blake2xs_update( blake2xs_state *S, const void *in, size_t inlen ); + int blake2xs_final(blake2xs_state *S, void *out, size_t outlen); + + int blake2xb_init( blake2xb_state *S, const size_t outlen ); + int blake2xb_init_key( blake2xb_state *S, const size_t outlen, const void *key, size_t keylen ); + int blake2xb_update( blake2xb_state *S, const void *in, size_t inlen ); + int blake2xb_final(blake2xb_state *S, void *out, size_t outlen); + + /* Simple API */ + int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2b( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + int blake2sp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2bp( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + int blake2xs( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + int blake2xb( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + + /* This is simply an alias for blake2b */ + int blake2( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ); + +#if defined(__cplusplus) +} +#endif + +#endif \ No newline at end of file diff --git a/stratum/algos/blake2-ref/blake2b.c b/stratum/algos/blake2-ref/blake2b.c new file mode 100644 index 000000000..ca05df598 --- /dev/null +++ b/stratum/algos/blake2-ref/blake2b.c @@ -0,0 +1,390 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#include +#include +#include + +#include "blake2.h" +#include "blake2-impl.h" + +static const uint64_t blake2b_IV[8] = { + UINT64_C(0x6a09e667f3bcc908), UINT64_C(0xbb67ae8584caa73b), + UINT64_C(0x3c6ef372fe94f82b), UINT64_C(0xa54ff53a5f1d36f1), + UINT64_C(0x510e527fade682d1), UINT64_C(0x9b05688c2b3e6c1f), + UINT64_C(0x1f83d9abfb41bd6b), UINT64_C(0x5be0cd19137e2179)}; + +static const unsigned int blake2b_sigma[12][16] = { + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, + {11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4}, + {7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8}, + {9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13}, + {2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9}, + {12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11}, + {13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10}, + {6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5}, + {10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0}, + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, +}; + +static BLAKE2_INLINE void blake2b_set_lastnode(blake2b_state *S) { + S->f[1] = (uint64_t)-1; +} + +static BLAKE2_INLINE void blake2b_set_lastblock(blake2b_state *S) { + if (S->last_node) { + blake2b_set_lastnode(S); + } + S->f[0] = (uint64_t)-1; +} + +static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, + uint64_t inc) { + S->t[0] += inc; + S->t[1] += (S->t[0] < inc); +} + +static BLAKE2_INLINE void blake2b_invalidate_state(blake2b_state *S) { + clear_internal_memory(S, sizeof(*S)); /* wipe */ + blake2b_set_lastblock(S); /* invalidate for further use */ +} + +static BLAKE2_INLINE void blake2b_init0(blake2b_state *S) { + memset(S, 0, sizeof(*S)); + memcpy(S->h, blake2b_IV, sizeof(S->h)); +} + +int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { + const unsigned char *p = (const unsigned char *)P; + unsigned int i; + + if (NULL == P || NULL == S) { + return -1; + } + + blake2b_init0(S); + /* IV XOR Parameter Block */ + for (i = 0; i < 8; ++i) { + S->h[i] ^= load64(&p[i * sizeof(S->h[i])]); + } + S->outlen = P->digest_length; + return 0; +} + +/* Sequential blake2b initialization */ +int blake2b_init(blake2b_state *S, size_t outlen) { + blake2b_param P; + + if (S == NULL) { + return -1; + } + + if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + /* Setup Parameter Block for unkeyed BLAKE2 */ + P.digest_length = (uint8_t)outlen; + P.key_length = 0; + P.fanout = 1; + P.depth = 1; + P.leaf_length = 0; + P.node_offset = 0; + P.node_depth = 0; + P.inner_length = 0; + memset(P.reserved, 0, sizeof(P.reserved)); + memset(P.salt, 0, sizeof(P.salt)); + memset(P.personal, 0, sizeof(P.personal)); + + return blake2b_init_param(S, &P); +} + +int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, + size_t keylen) { + blake2b_param P; + + if (S == NULL) { + return -1; + } + + if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + if ((key == 0) || (keylen == 0) || (keylen > BLAKE2B_KEYBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + /* Setup Parameter Block for keyed BLAKE2 */ + P.digest_length = (uint8_t)outlen; + P.key_length = (uint8_t)keylen; + P.fanout = 1; + P.depth = 1; + P.leaf_length = 0; + P.node_offset = 0; + P.node_depth = 0; + P.inner_length = 0; + memset(P.reserved, 0, sizeof(P.reserved)); + memset(P.salt, 0, sizeof(P.salt)); + memset(P.personal, 0, sizeof(P.personal)); + + if (blake2b_init_param(S, &P) < 0) { + blake2b_invalidate_state(S); + return -1; + } + + { + uint8_t block[BLAKE2B_BLOCKBYTES]; + memset(block, 0, BLAKE2B_BLOCKBYTES); + memcpy(block, key, keylen); + blake2b_update(S, block, BLAKE2B_BLOCKBYTES); + /* Burn the key from stack */ + clear_internal_memory(block, BLAKE2B_BLOCKBYTES); + } + return 0; +} + +static void blake2b_compress(blake2b_state *S, const uint8_t *block) { + uint64_t m[16]; + uint64_t v[16]; + unsigned int i, r; + + for (i = 0; i < 16; ++i) { + m[i] = load64(block + i * sizeof(m[i])); + } + + for (i = 0; i < 8; ++i) { + v[i] = S->h[i]; + } + + v[8] = blake2b_IV[0]; + v[9] = blake2b_IV[1]; + v[10] = blake2b_IV[2]; + v[11] = blake2b_IV[3]; + v[12] = blake2b_IV[4] ^ S->t[0]; + v[13] = blake2b_IV[5] ^ S->t[1]; + v[14] = blake2b_IV[6] ^ S->f[0]; + v[15] = blake2b_IV[7] ^ S->f[1]; + +#define G(r, i, a, b, c, d) \ + do { \ + a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \ + d = rotr64(d ^ a, 32); \ + c = c + d; \ + b = rotr64(b ^ c, 24); \ + a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \ + d = rotr64(d ^ a, 16); \ + c = c + d; \ + b = rotr64(b ^ c, 63); \ + } while ((void)0, 0) + +#define ROUND(r) \ + do { \ + G(r, 0, v[0], v[4], v[8], v[12]); \ + G(r, 1, v[1], v[5], v[9], v[13]); \ + G(r, 2, v[2], v[6], v[10], v[14]); \ + G(r, 3, v[3], v[7], v[11], v[15]); \ + G(r, 4, v[0], v[5], v[10], v[15]); \ + G(r, 5, v[1], v[6], v[11], v[12]); \ + G(r, 6, v[2], v[7], v[8], v[13]); \ + G(r, 7, v[3], v[4], v[9], v[14]); \ + } while ((void)0, 0) + + for (r = 0; r < 12; ++r) { + ROUND(r); + } + + for (i = 0; i < 8; ++i) { + S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; + } + +#undef G +#undef ROUND +} + +int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { + const uint8_t *pin = (const uint8_t *)in; + + if (inlen == 0) { + return 0; + } + + /* Sanity check */ + if (S == NULL || in == NULL) { + return -1; + } + + /* Is this a reused state? */ + if (S->f[0] != 0) { + return -1; + } + + if (S->buflen + inlen > BLAKE2B_BLOCKBYTES) { + /* Complete current block */ + size_t left = S->buflen; + size_t fill = BLAKE2B_BLOCKBYTES - left; + memcpy(&S->buf[left], pin, fill); + blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); + blake2b_compress(S, S->buf); + S->buflen = 0; + inlen -= fill; + pin += fill; + /* Avoid buffer copies when possible */ + while (inlen > BLAKE2B_BLOCKBYTES) { + blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); + blake2b_compress(S, pin); + inlen -= BLAKE2B_BLOCKBYTES; + pin += BLAKE2B_BLOCKBYTES; + } + } + memcpy(&S->buf[S->buflen], pin, inlen); + S->buflen += (unsigned int)inlen; + return 0; +} + +int blake2b_final(blake2b_state *S, void *out, size_t outlen) { + uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; + unsigned int i; + + /* Sanity checks */ + if (S == NULL || out == NULL || outlen < S->outlen) { + return -1; + } + + /* Is this a reused state? */ + if (S->f[0] != 0) { + return -1; + } + + blake2b_increment_counter(S, S->buflen); + blake2b_set_lastblock(S); + memset(&S->buf[S->buflen], 0, BLAKE2B_BLOCKBYTES - S->buflen); /* Padding */ + blake2b_compress(S, S->buf); + + for (i = 0; i < 8; ++i) { /* Output full hash to temp buffer */ + store64(buffer + sizeof(S->h[i]) * i, S->h[i]); + } + + memcpy(out, buffer, S->outlen); + clear_internal_memory(buffer, sizeof(buffer)); + clear_internal_memory(S->buf, sizeof(S->buf)); + clear_internal_memory(S->h, sizeof(S->h)); + return 0; +} + +int blake2b(void *out, size_t outlen, const void *in, size_t inlen, + const void *key, size_t keylen) { + blake2b_state S; + int ret = -1; + + /* Verify parameters */ + if (NULL == in && inlen > 0) { + goto fail; + } + + if (NULL == out || outlen == 0 || outlen > BLAKE2B_OUTBYTES) { + goto fail; + } + + if ((NULL == key && keylen > 0) || keylen > BLAKE2B_KEYBYTES) { + goto fail; + } + + if (keylen > 0) { + if (blake2b_init_key(&S, outlen, key, keylen) < 0) { + goto fail; + } + } else { + if (blake2b_init(&S, outlen) < 0) { + goto fail; + } + } + + if (blake2b_update(&S, in, inlen) < 0) { + goto fail; + } + ret = blake2b_final(&S, out, outlen); + +fail: + clear_internal_memory(&S, sizeof(S)); + return ret; +} + +/* Argon2 Team - Begin Code */ +int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { + uint8_t *out = (uint8_t *)pout; + blake2b_state blake_state; + uint8_t outlen_bytes[sizeof(uint32_t)] = {0}; + int ret = -1; + + if (outlen > UINT32_MAX) { + goto fail; + } + + /* Ensure little-endian byte order! */ + store32(outlen_bytes, (uint32_t)outlen); + +#define TRY(statement) \ + do { \ + ret = statement; \ + if (ret < 0) { \ + goto fail; \ + } \ + } while ((void)0, 0) + + if (outlen <= BLAKE2B_OUTBYTES) { + TRY(blake2b_init(&blake_state, outlen)); + TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); + TRY(blake2b_update(&blake_state, in, inlen)); + TRY(blake2b_final(&blake_state, out, outlen)); + } else { + uint32_t toproduce; + uint8_t out_buffer[BLAKE2B_OUTBYTES]; + uint8_t in_buffer[BLAKE2B_OUTBYTES]; + TRY(blake2b_init(&blake_state, BLAKE2B_OUTBYTES)); + TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); + TRY(blake2b_update(&blake_state, in, inlen)); + TRY(blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES)); + memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); + out += BLAKE2B_OUTBYTES / 2; + toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2; + + while (toproduce > BLAKE2B_OUTBYTES) { + memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); + TRY(blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer, + BLAKE2B_OUTBYTES, NULL, 0)); + memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); + out += BLAKE2B_OUTBYTES / 2; + toproduce -= BLAKE2B_OUTBYTES / 2; + } + + memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); + TRY(blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, + 0)); + memcpy(out, out_buffer, toproduce); + } +fail: + clear_internal_memory(&blake_state, sizeof(blake_state)); + return ret; +#undef TRY +} +/* Argon2 Team - End Code */ diff --git a/stratum/algos/blake2-ref/blake2s.c b/stratum/algos/blake2-ref/blake2s.c new file mode 100644 index 000000000..482310881 --- /dev/null +++ b/stratum/algos/blake2-ref/blake2s.c @@ -0,0 +1,364 @@ +/* + BLAKE2 reference source code package - reference C implementations + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ + +#include +#include +#include + +#include "blake2.h" +#include "blake2-impl.h" + +static const uint32_t blake2s_IV[8] = +{ + 0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL, + 0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL +}; + +static const uint8_t blake2s_sigma[10][16] = +{ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } , + { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } , + { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } , + { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } , + { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } , + { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } , + { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } , + { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } , + { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } , + { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } , +}; + +static void blake2s_set_lastnode( blake2s_state *S ) +{ + S->f[1] = (uint32_t)-1; +} + +/* Some helper functions, not necessarily useful */ +static int blake2s_is_lastblock( const blake2s_state *S ) +{ + return S->f[0] != 0; +} + +static void blake2s_set_lastblock( blake2s_state *S ) +{ + if( S->last_node ) blake2s_set_lastnode( S ); + + S->f[0] = (uint32_t)-1; +} + +static void blake2s_increment_counter( blake2s_state *S, const uint32_t inc ) +{ + S->t[0] += inc; + S->t[1] += ( S->t[0] < inc ); +} + +static void blake2s_init0( blake2s_state *S ) +{ + size_t i; + memset( S, 0, sizeof( blake2s_state ) ); + + for( i = 0; i < 8; ++i ) S->h[i] = blake2s_IV[i]; +} + +/* init2 xors IV with input parameter block */ +int blake2s_init_param( blake2s_state *S, const blake2s_param *P ) +{ + const unsigned char *p = ( const unsigned char * )( P ); + size_t i; + + blake2s_init0( S ); + + /* IV XOR ParamBlock */ + for( i = 0; i < 8; ++i ) + S->h[i] ^= load32( &p[i * 4] ); + + S->outlen = P->digest_length; + return 0; +} + + +/* Sequential blake2s initialization */ +int blake2s_init( blake2s_state *S, size_t outlen ) +{ + blake2s_param P[1]; + + /* Move interval verification here? */ + if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; + + P->digest_length = (uint8_t)outlen; + P->key_length = 0; + P->fanout = 1; + P->depth = 1; + store32( &P->leaf_length, 0 ); + store32( &P->node_offset, 0 ); + store16( &P->xof_length, 0 ); + P->node_depth = 0; + P->inner_length = 0; + /* memset(P->reserved, 0, sizeof(P->reserved) ); */ + memset( P->salt, 0, sizeof( P->salt ) ); + memset( P->personal, 0, sizeof( P->personal ) ); + return blake2s_init_param( S, P ); +} + +int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ) +{ + blake2s_param P[1]; + + if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; + + if ( !key || !keylen || keylen > BLAKE2S_KEYBYTES ) return -1; + + P->digest_length = (uint8_t)outlen; + P->key_length = (uint8_t)keylen; + P->fanout = 1; + P->depth = 1; + store32( &P->leaf_length, 0 ); + store32( &P->node_offset, 0 ); + store16( &P->xof_length, 0 ); + P->node_depth = 0; + P->inner_length = 0; + /* memset(P->reserved, 0, sizeof(P->reserved) ); */ + memset( P->salt, 0, sizeof( P->salt ) ); + memset( P->personal, 0, sizeof( P->personal ) ); + + if( blake2s_init_param( S, P ) < 0 ) return -1; + + { + uint8_t block[BLAKE2S_BLOCKBYTES]; + memset( block, 0, BLAKE2S_BLOCKBYTES ); + memcpy( block, key, keylen ); + blake2s_update( S, block, BLAKE2S_BLOCKBYTES ); + secure_zero_memory( block, BLAKE2S_BLOCKBYTES ); /* Burn the key from stack */ + } + return 0; +} + +#define G(r,i,a,b,c,d) \ + do { \ + a = a + b + m[blake2s_sigma[r][2*i+0]]; \ + d = rotr32(d ^ a, 16); \ + c = c + d; \ + b = rotr32(b ^ c, 12); \ + a = a + b + m[blake2s_sigma[r][2*i+1]]; \ + d = rotr32(d ^ a, 8); \ + c = c + d; \ + b = rotr32(b ^ c, 7); \ + } while(0) + +#define ROUND(r) \ + do { \ + G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \ + G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \ + G(r,2,v[ 2],v[ 6],v[10],v[14]); \ + G(r,3,v[ 3],v[ 7],v[11],v[15]); \ + G(r,4,v[ 0],v[ 5],v[10],v[15]); \ + G(r,5,v[ 1],v[ 6],v[11],v[12]); \ + G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \ + G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \ + } while(0) + +static void blake2s_compress( blake2s_state *S, const uint8_t in[BLAKE2S_BLOCKBYTES] ) +{ + uint32_t m[16]; + uint32_t v[16]; + size_t i; + + for( i = 0; i < 16; ++i ) { + m[i] = load32( in + i * sizeof( m[i] ) ); + } + + for( i = 0; i < 8; ++i ) { + v[i] = S->h[i]; + } + + v[ 8] = blake2s_IV[0]; + v[ 9] = blake2s_IV[1]; + v[10] = blake2s_IV[2]; + v[11] = blake2s_IV[3]; + v[12] = S->t[0] ^ blake2s_IV[4]; + v[13] = S->t[1] ^ blake2s_IV[5]; + v[14] = S->f[0] ^ blake2s_IV[6]; + v[15] = S->f[1] ^ blake2s_IV[7]; + + ROUND( 0 ); + ROUND( 1 ); + ROUND( 2 ); + ROUND( 3 ); + ROUND( 4 ); + ROUND( 5 ); + ROUND( 6 ); + ROUND( 7 ); + ROUND( 8 ); + ROUND( 9 ); + + for( i = 0; i < 8; ++i ) { + S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; + } +} + +#undef G +#undef ROUND + +int blake2s_update( blake2s_state *S, const void *pin, size_t inlen ) +{ + const unsigned char * in = (const unsigned char *)pin; + if( inlen > 0 ) + { + size_t left = S->buflen; + size_t fill = BLAKE2S_BLOCKBYTES - left; + if( inlen > fill ) + { + S->buflen = 0; + memcpy( S->buf + left, in, fill ); /* Fill buffer */ + blake2s_increment_counter( S, BLAKE2S_BLOCKBYTES ); + blake2s_compress( S, S->buf ); /* Compress */ + in += fill; inlen -= fill; + while(inlen > BLAKE2S_BLOCKBYTES) { + blake2s_increment_counter(S, BLAKE2S_BLOCKBYTES); + blake2s_compress( S, in ); + in += BLAKE2S_BLOCKBYTES; + inlen -= BLAKE2S_BLOCKBYTES; + } + } + memcpy( S->buf + S->buflen, in, inlen ); + S->buflen += inlen; + } + return 0; +} + +int blake2s_final( blake2s_state *S, void *out, size_t outlen ) +{ + uint8_t buffer[BLAKE2S_OUTBYTES] = {0}; + size_t i; + + if( out == NULL || outlen < S->outlen ) + return -1; + + if( blake2s_is_lastblock( S ) ) + return -1; + + blake2s_increment_counter( S, ( uint32_t )S->buflen ); + blake2s_set_lastblock( S ); + memset( S->buf + S->buflen, 0, BLAKE2S_BLOCKBYTES - S->buflen ); /* Padding */ + blake2s_compress( S, S->buf ); + + for( i = 0; i < 8; ++i ) /* Output full hash to temp buffer */ + store32( buffer + sizeof( S->h[i] ) * i, S->h[i] ); + + memcpy( out, buffer, outlen ); + secure_zero_memory(buffer, sizeof(buffer)); + return 0; +} + +int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen ) +{ + blake2s_state S[1]; + + /* Verify parameters */ + if ( NULL == in && inlen > 0 ) return -1; + + if ( NULL == out ) return -1; + + if ( NULL == key && keylen > 0) return -1; + + if( !outlen || outlen > BLAKE2S_OUTBYTES ) return -1; + + if( keylen > BLAKE2S_KEYBYTES ) return -1; + + if( keylen > 0 ) + { + if( blake2s_init_key( S, outlen, key, keylen ) < 0 ) return -1; + } + else + { + if( blake2s_init( S, outlen ) < 0 ) return -1; + } + + blake2s_update( S, ( const uint8_t * )in, inlen ); + blake2s_final( S, out, outlen ); + return 0; +} + +#if defined(SUPERCOP) +int crypto_hash( unsigned char *out, unsigned char *in, unsigned long long inlen ) +{ + return blake2s( out, BLAKE2S_OUTBYTES, in, inlen, NULL, 0 ); +} +#endif + +#if defined(BLAKE2S_SELFTEST) +#include +#include "blake2-kat.h" +int main( void ) +{ + uint8_t key[BLAKE2S_KEYBYTES]; + uint8_t buf[BLAKE2_KAT_LENGTH]; + size_t i, step; + + for( i = 0; i < BLAKE2S_KEYBYTES; ++i ) + key[i] = ( uint8_t )i; + + for( i = 0; i < BLAKE2_KAT_LENGTH; ++i ) + buf[i] = ( uint8_t )i; + + /* Test simple API */ + for( i = 0; i < BLAKE2_KAT_LENGTH; ++i ) + { + uint8_t hash[BLAKE2S_OUTBYTES]; + blake2s( hash, BLAKE2S_OUTBYTES, buf, i, key, BLAKE2S_KEYBYTES ); + + if( 0 != memcmp( hash, blake2s_keyed_kat[i], BLAKE2S_OUTBYTES ) ) + { + goto fail; + } + } + + /* Test streaming API */ + for(step = 1; step < BLAKE2S_BLOCKBYTES; ++step) { + for (i = 0; i < BLAKE2_KAT_LENGTH; ++i) { + uint8_t hash[BLAKE2S_OUTBYTES]; + blake2s_state S; + uint8_t * p = buf; + size_t mlen = i; + int err = 0; + + if( (err = blake2s_init_key(&S, BLAKE2S_OUTBYTES, key, BLAKE2S_KEYBYTES)) < 0 ) { + goto fail; + } + + while (mlen >= step) { + if ( (err = blake2s_update(&S, p, step)) < 0 ) { + goto fail; + } + mlen -= step; + p += step; + } + if ( (err = blake2s_update(&S, p, mlen)) < 0) { + goto fail; + } + if ( (err = blake2s_final(&S, hash, BLAKE2S_OUTBYTES)) < 0) { + goto fail; + } + + if (0 != memcmp(hash, blake2s_keyed_kat[i], BLAKE2S_OUTBYTES)) { + goto fail; + } + } + } + + puts( "ok" ); + return 0; +fail: + puts("error"); + return -1; +} +#endif \ No newline at end of file diff --git a/stratum/algos/blake2-ref/blamka-round-opt.h b/stratum/algos/blake2-ref/blamka-round-opt.h new file mode 100644 index 000000000..faf96662e --- /dev/null +++ b/stratum/algos/blake2-ref/blamka-round-opt.h @@ -0,0 +1,476 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef BLAKE_ROUND_MKA_OPT_H +#define BLAKE_ROUND_MKA_OPT_H + +#if defined(HAVE_CONFIG_H) +#include "config/dynamic-config.h" +#endif + +#include "blake2-impl.h" + +#include +#if defined(__SSSE3__) +#include /* for _mm_shuffle_epi8 and _mm_alignr_epi8 */ +#endif + +#if defined(__XOP__) && (defined(__GNUC__) || defined(__clang__)) +#include +#endif + +#if !defined(__AVX512F__) +#if !defined(__AVX2__) +#if !defined(__XOP__) +#if defined(__SSSE3__) +#define r16 \ + (_mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9)) +#define r24 \ + (_mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10)) +#define _mm_roti_epi64(x, c) \ + (-(c) == 32) \ + ? _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) \ + : (-(c) == 24) \ + ? _mm_shuffle_epi8((x), r24) \ + : (-(c) == 16) \ + ? _mm_shuffle_epi8((x), r16) \ + : (-(c) == 63) \ + ? _mm_xor_si128(_mm_srli_epi64((x), -(c)), \ + _mm_add_epi64((x), (x))) \ + : _mm_xor_si128(_mm_srli_epi64((x), -(c)), \ + _mm_slli_epi64((x), 64 - (-(c)))) +#else /* defined(__SSE2__) */ +#define _mm_roti_epi64(r, c) \ + _mm_xor_si128(_mm_srli_epi64((r), -(c)), _mm_slli_epi64((r), 64 - (-(c)))) +#endif +#else +#endif + +static BLAKE2_INLINE __m128i fBlaMka(__m128i x, __m128i y) { + const __m128i z = _mm_mul_epu32(x, y); + return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z)); +} + +#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + A0 = fBlaMka(A0, B0); \ + A1 = fBlaMka(A1, B1); \ + \ + D0 = _mm_xor_si128(D0, A0); \ + D1 = _mm_xor_si128(D1, A1); \ + \ + D0 = _mm_roti_epi64(D0, -32); \ + D1 = _mm_roti_epi64(D1, -32); \ + \ + C0 = fBlaMka(C0, D0); \ + C1 = fBlaMka(C1, D1); \ + \ + B0 = _mm_xor_si128(B0, C0); \ + B1 = _mm_xor_si128(B1, C1); \ + \ + B0 = _mm_roti_epi64(B0, -24); \ + B1 = _mm_roti_epi64(B1, -24); \ + } while ((void)0, 0) + +#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + A0 = fBlaMka(A0, B0); \ + A1 = fBlaMka(A1, B1); \ + \ + D0 = _mm_xor_si128(D0, A0); \ + D1 = _mm_xor_si128(D1, A1); \ + \ + D0 = _mm_roti_epi64(D0, -16); \ + D1 = _mm_roti_epi64(D1, -16); \ + \ + C0 = fBlaMka(C0, D0); \ + C1 = fBlaMka(C1, D1); \ + \ + B0 = _mm_xor_si128(B0, C0); \ + B1 = _mm_xor_si128(B1, C1); \ + \ + B0 = _mm_roti_epi64(B0, -63); \ + B1 = _mm_roti_epi64(B1, -63); \ + } while ((void)0, 0) + +#if defined(__SSSE3__) +#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + __m128i t0 = _mm_alignr_epi8(B1, B0, 8); \ + __m128i t1 = _mm_alignr_epi8(B0, B1, 8); \ + B0 = t0; \ + B1 = t1; \ + \ + t0 = C0; \ + C0 = C1; \ + C1 = t0; \ + \ + t0 = _mm_alignr_epi8(D1, D0, 8); \ + t1 = _mm_alignr_epi8(D0, D1, 8); \ + D0 = t1; \ + D1 = t0; \ + } while ((void)0, 0) + +#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + __m128i t0 = _mm_alignr_epi8(B0, B1, 8); \ + __m128i t1 = _mm_alignr_epi8(B1, B0, 8); \ + B0 = t0; \ + B1 = t1; \ + \ + t0 = C0; \ + C0 = C1; \ + C1 = t0; \ + \ + t0 = _mm_alignr_epi8(D0, D1, 8); \ + t1 = _mm_alignr_epi8(D1, D0, 8); \ + D0 = t1; \ + D1 = t0; \ + } while ((void)0, 0) +#else /* SSE2 */ +#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + __m128i t0 = D0; \ + __m128i t1 = B0; \ + D0 = C0; \ + C0 = C1; \ + C1 = D0; \ + D0 = _mm_unpackhi_epi64(D1, _mm_unpacklo_epi64(t0, t0)); \ + D1 = _mm_unpackhi_epi64(t0, _mm_unpacklo_epi64(D1, D1)); \ + B0 = _mm_unpackhi_epi64(B0, _mm_unpacklo_epi64(B1, B1)); \ + B1 = _mm_unpackhi_epi64(B1, _mm_unpacklo_epi64(t1, t1)); \ + } while ((void)0, 0) + +#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + __m128i t0, t1; \ + t0 = C0; \ + C0 = C1; \ + C1 = t0; \ + t0 = B0; \ + t1 = D0; \ + B0 = _mm_unpackhi_epi64(B1, _mm_unpacklo_epi64(B0, B0)); \ + B1 = _mm_unpackhi_epi64(t0, _mm_unpacklo_epi64(B1, B1)); \ + D0 = _mm_unpackhi_epi64(D0, _mm_unpacklo_epi64(D1, D1)); \ + D1 = _mm_unpackhi_epi64(D1, _mm_unpacklo_epi64(t1, t1)); \ + } while ((void)0, 0) +#endif + +#define BLAKE2_ROUND(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + G1(A0, B0, C0, D0, A1, B1, C1, D1); \ + G2(A0, B0, C0, D0, A1, B1, C1, D1); \ + \ + DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ + \ + G1(A0, B0, C0, D0, A1, B1, C1, D1); \ + G2(A0, B0, C0, D0, A1, B1, C1, D1); \ + \ + UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ + } while ((void)0, 0) + +#else /* __AVX2__ */ + +#include + +#define rotr32(x) _mm256_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1)) +#define rotr24(x) _mm256_shuffle_epi8(x, _mm256_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10, 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10)) +#define rotr16(x) _mm256_shuffle_epi8(x, _mm256_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9, 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9)) +#define rotr63(x) _mm256_xor_si256(_mm256_srli_epi64((x), 63), _mm256_add_epi64((x), (x))) + +#define G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + __m256i ml = _mm256_mul_epu32(A0, B0); \ + ml = _mm256_add_epi64(ml, ml); \ + A0 = _mm256_add_epi64(A0, _mm256_add_epi64(B0, ml)); \ + D0 = _mm256_xor_si256(D0, A0); \ + D0 = rotr32(D0); \ + \ + ml = _mm256_mul_epu32(C0, D0); \ + ml = _mm256_add_epi64(ml, ml); \ + C0 = _mm256_add_epi64(C0, _mm256_add_epi64(D0, ml)); \ + \ + B0 = _mm256_xor_si256(B0, C0); \ + B0 = rotr24(B0); \ + \ + ml = _mm256_mul_epu32(A1, B1); \ + ml = _mm256_add_epi64(ml, ml); \ + A1 = _mm256_add_epi64(A1, _mm256_add_epi64(B1, ml)); \ + D1 = _mm256_xor_si256(D1, A1); \ + D1 = rotr32(D1); \ + \ + ml = _mm256_mul_epu32(C1, D1); \ + ml = _mm256_add_epi64(ml, ml); \ + C1 = _mm256_add_epi64(C1, _mm256_add_epi64(D1, ml)); \ + \ + B1 = _mm256_xor_si256(B1, C1); \ + B1 = rotr24(B1); \ + } while((void)0, 0); + +#define G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + __m256i ml = _mm256_mul_epu32(A0, B0); \ + ml = _mm256_add_epi64(ml, ml); \ + A0 = _mm256_add_epi64(A0, _mm256_add_epi64(B0, ml)); \ + D0 = _mm256_xor_si256(D0, A0); \ + D0 = rotr16(D0); \ + \ + ml = _mm256_mul_epu32(C0, D0); \ + ml = _mm256_add_epi64(ml, ml); \ + C0 = _mm256_add_epi64(C0, _mm256_add_epi64(D0, ml)); \ + B0 = _mm256_xor_si256(B0, C0); \ + B0 = rotr63(B0); \ + \ + ml = _mm256_mul_epu32(A1, B1); \ + ml = _mm256_add_epi64(ml, ml); \ + A1 = _mm256_add_epi64(A1, _mm256_add_epi64(B1, ml)); \ + D1 = _mm256_xor_si256(D1, A1); \ + D1 = rotr16(D1); \ + \ + ml = _mm256_mul_epu32(C1, D1); \ + ml = _mm256_add_epi64(ml, ml); \ + C1 = _mm256_add_epi64(C1, _mm256_add_epi64(D1, ml)); \ + B1 = _mm256_xor_si256(B1, C1); \ + B1 = rotr63(B1); \ + } while((void)0, 0); + +#define DIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + B0 = _mm256_permute4x64_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \ + C0 = _mm256_permute4x64_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ + D0 = _mm256_permute4x64_epi64(D0, _MM_SHUFFLE(2, 1, 0, 3)); \ + \ + B1 = _mm256_permute4x64_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \ + C1 = _mm256_permute4x64_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ + D1 = _mm256_permute4x64_epi64(D1, _MM_SHUFFLE(2, 1, 0, 3)); \ + } while((void)0, 0); + +#define DIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + __m256i tmp1 = _mm256_blend_epi32(B0, B1, 0xCC); \ + __m256i tmp2 = _mm256_blend_epi32(B0, B1, 0x33); \ + B1 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ + B0 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ + \ + tmp1 = C0; \ + C0 = C1; \ + C1 = tmp1; \ + \ + tmp1 = _mm256_blend_epi32(D0, D1, 0xCC); \ + tmp2 = _mm256_blend_epi32(D0, D1, 0x33); \ + D0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ + D1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ + } while(0); + +#define UNDIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + B0 = _mm256_permute4x64_epi64(B0, _MM_SHUFFLE(2, 1, 0, 3)); \ + C0 = _mm256_permute4x64_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ + D0 = _mm256_permute4x64_epi64(D0, _MM_SHUFFLE(0, 3, 2, 1)); \ + \ + B1 = _mm256_permute4x64_epi64(B1, _MM_SHUFFLE(2, 1, 0, 3)); \ + C1 = _mm256_permute4x64_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ + D1 = _mm256_permute4x64_epi64(D1, _MM_SHUFFLE(0, 3, 2, 1)); \ + } while((void)0, 0); + +#define UNDIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + __m256i tmp1 = _mm256_blend_epi32(B0, B1, 0xCC); \ + __m256i tmp2 = _mm256_blend_epi32(B0, B1, 0x33); \ + B0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ + B1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ + \ + tmp1 = C0; \ + C0 = C1; \ + C1 = tmp1; \ + \ + tmp1 = _mm256_blend_epi32(D0, D1, 0x33); \ + tmp2 = _mm256_blend_epi32(D0, D1, 0xCC); \ + D0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ + D1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ + } while((void)0, 0); + +#define BLAKE2_ROUND_1(A0, A1, B0, B1, C0, C1, D0, D1) \ + do{ \ + G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + DIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ + \ + G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + UNDIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ + } while((void)0, 0); + +#define BLAKE2_ROUND_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do{ \ + G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + DIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ + \ + UNDIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + } while((void)0, 0); + +#endif /* __AVX2__ */ + +#else /* __AVX512F__ */ + +#include + +#define ror64(x, n) _mm512_ror_epi64((x), (n)) + +static __m512i muladd(__m512i x, __m512i y) +{ + __m512i z = _mm512_mul_epu32(x, y); + return _mm512_add_epi64(_mm512_add_epi64(x, y), _mm512_add_epi64(z, z)); +} + +#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + A0 = muladd(A0, B0); \ + A1 = muladd(A1, B1); \ +\ + D0 = _mm512_xor_si512(D0, A0); \ + D1 = _mm512_xor_si512(D1, A1); \ +\ + D0 = ror64(D0, 32); \ + D1 = ror64(D1, 32); \ +\ + C0 = muladd(C0, D0); \ + C1 = muladd(C1, D1); \ +\ + B0 = _mm512_xor_si512(B0, C0); \ + B1 = _mm512_xor_si512(B1, C1); \ +\ + B0 = ror64(B0, 24); \ + B1 = ror64(B1, 24); \ + } while ((void)0, 0) + +#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + A0 = muladd(A0, B0); \ + A1 = muladd(A1, B1); \ +\ + D0 = _mm512_xor_si512(D0, A0); \ + D1 = _mm512_xor_si512(D1, A1); \ +\ + D0 = ror64(D0, 16); \ + D1 = ror64(D1, 16); \ +\ + C0 = muladd(C0, D0); \ + C1 = muladd(C1, D1); \ +\ + B0 = _mm512_xor_si512(B0, C0); \ + B1 = _mm512_xor_si512(B1, C1); \ +\ + B0 = ror64(B0, 63); \ + B1 = ror64(B1, 63); \ + } while ((void)0, 0) + +#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \ + B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \ +\ + C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ + C1 = _mm512_permutex_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ +\ + D0 = _mm512_permutex_epi64(D0, _MM_SHUFFLE(2, 1, 0, 3)); \ + D1 = _mm512_permutex_epi64(D1, _MM_SHUFFLE(2, 1, 0, 3)); \ + } while ((void)0, 0) + +#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(2, 1, 0, 3)); \ + B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(2, 1, 0, 3)); \ +\ + C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ + C1 = _mm512_permutex_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ +\ + D0 = _mm512_permutex_epi64(D0, _MM_SHUFFLE(0, 3, 2, 1)); \ + D1 = _mm512_permutex_epi64(D1, _MM_SHUFFLE(0, 3, 2, 1)); \ + } while ((void)0, 0) + +#define BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1) \ + do { \ + G1(A0, B0, C0, D0, A1, B1, C1, D1); \ + G2(A0, B0, C0, D0, A1, B1, C1, D1); \ +\ + DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ +\ + G1(A0, B0, C0, D0, A1, B1, C1, D1); \ + G2(A0, B0, C0, D0, A1, B1, C1, D1); \ +\ + UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ + } while ((void)0, 0) + +#define SWAP_HALVES(A0, A1) \ + do { \ + __m512i t0, t1; \ + t0 = _mm512_shuffle_i64x2(A0, A1, _MM_SHUFFLE(1, 0, 1, 0)); \ + t1 = _mm512_shuffle_i64x2(A0, A1, _MM_SHUFFLE(3, 2, 3, 2)); \ + A0 = t0; \ + A1 = t1; \ + } while((void)0, 0) + +#define SWAP_QUARTERS(A0, A1) \ + do { \ + SWAP_HALVES(A0, A1); \ + A0 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A0); \ + A1 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A1); \ + } while((void)0, 0) + +#define UNSWAP_QUARTERS(A0, A1) \ + do { \ + A0 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A0); \ + A1 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A1); \ + SWAP_HALVES(A0, A1); \ + } while((void)0, 0) + +#define BLAKE2_ROUND_1(A0, C0, B0, D0, A1, C1, B1, D1) \ + do { \ + SWAP_HALVES(A0, B0); \ + SWAP_HALVES(C0, D0); \ + SWAP_HALVES(A1, B1); \ + SWAP_HALVES(C1, D1); \ + BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1); \ + SWAP_HALVES(A0, B0); \ + SWAP_HALVES(C0, D0); \ + SWAP_HALVES(A1, B1); \ + SWAP_HALVES(C1, D1); \ + } while ((void)0, 0) + +#define BLAKE2_ROUND_2(A0, A1, B0, B1, C0, C1, D0, D1) \ + do { \ + SWAP_QUARTERS(A0, A1); \ + SWAP_QUARTERS(B0, B1); \ + SWAP_QUARTERS(C0, C1); \ + SWAP_QUARTERS(D0, D1); \ + BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1); \ + UNSWAP_QUARTERS(A0, A1); \ + UNSWAP_QUARTERS(B0, B1); \ + UNSWAP_QUARTERS(C0, C1); \ + UNSWAP_QUARTERS(D0, D1); \ + } while ((void)0, 0) + +#endif /* __AVX512F__ */ +#endif /* BLAKE_ROUND_MKA_OPT_H */ \ No newline at end of file diff --git a/stratum/algos/blake2-ref/blamka-round-ref.h b/stratum/algos/blake2-ref/blamka-round-ref.h new file mode 100644 index 000000000..2238959e1 --- /dev/null +++ b/stratum/algos/blake2-ref/blamka-round-ref.h @@ -0,0 +1,56 @@ +/* + * Argon2 reference source code package - reference C implementations + * + * Copyright 2015 + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves + * + * You may use this work under the terms of a Creative Commons CC0 1.0 + * License/Waiver or the Apache Public License 2.0, at your option. The terms of + * these licenses can be found at: + * + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + * + * You should have received a copy of both of these licenses along with this + * software. If not, they may be obtained at the above URLs. + */ + +#ifndef BLAKE_ROUND_MKA_H +#define BLAKE_ROUND_MKA_H + +#include "blake2.h" +#include "blake2-impl.h" + +/*designed by the Lyra PHC team */ +static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { + const uint64_t m = UINT64_C(0xFFFFFFFF); + const uint64_t xy = (x & m) * (y & m); + return x + y + 2 * xy; +} + +#define G(a, b, c, d) \ + do { \ + a = fBlaMka(a, b); \ + d = rotr64(d ^ a, 32); \ + c = fBlaMka(c, d); \ + b = rotr64(b ^ c, 24); \ + a = fBlaMka(a, b); \ + d = rotr64(d ^ a, 16); \ + c = fBlaMka(c, d); \ + b = rotr64(b ^ c, 63); \ + } while ((void)0, 0) + +#define BLAKE2_ROUND_NOMSG(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, \ + v12, v13, v14, v15) \ + do { \ + G(v0, v4, v8, v12); \ + G(v1, v5, v9, v13); \ + G(v2, v6, v10, v14); \ + G(v3, v7, v11, v15); \ + G(v0, v5, v10, v15); \ + G(v1, v6, v11, v12); \ + G(v2, v7, v8, v13); \ + G(v3, v4, v9, v14); \ + } while ((void)0, 0) + +#endif \ No newline at end of file diff --git a/stratum/algos/bmw512.c b/stratum/algos/bmw512.c new file mode 100644 index 000000000..54e18cdba --- /dev/null +++ b/stratum/algos/bmw512.c @@ -0,0 +1,18 @@ +#include "bmw512.h" +#include +#include +#include +#include +#include "../sha3/sph_bmw.h" + + void bmw512_hash(const char* input, char* output, uint32_t len) +{ + sph_bmw512_context ctx_bmw; + uint32_t hashA[16]; + + sph_bmw512_init(&ctx_bmw); + sph_bmw512 (&ctx_bmw, input, len); + sph_bmw512_close(&ctx_bmw, hashA); + + memcpy(output, hashA, 32); +} \ No newline at end of file diff --git a/stratum/algos/bmw512.h b/stratum/algos/bmw512.h new file mode 100644 index 000000000..e58f0ced4 --- /dev/null +++ b/stratum/algos/bmw512.h @@ -0,0 +1,11 @@ +#ifdef __cplusplus +extern "C" { +#endif + + #include + + void bmw512_hash(const char* input, char* output, uint32_t len); + + #ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/stratum/algos/honeycomb/facet_five.c b/stratum/algos/honeycomb/facet_five.c new file mode 100644 index 000000000..f4509a922 --- /dev/null +++ b/stratum/algos/honeycomb/facet_five.c @@ -0,0 +1,1042 @@ + + +#include +#include +#include + +#include "facet_five.h" + +#ifdef __cplusplus + extern "C"{ +#endif + + +#ifdef _MSC_VER + #pragma warning (disable: 4146) +#endif + +typedef bee_u32 u32; +typedef bee_s32 s32; +#define C32 BEE_C32 +#define T32 BEE_T32 +#define ROL32 BEE_ROTL32 + +#define XCAT(x, y) XCAT_(x, y) +#define XCAT_(x, y) x ## y + +/* + * The powers of 41 modulo 257. We use exponents from 0 to 255, inclusive. + */ +static const s32 alpha_tab[] = { + 1, 41, 139, 45, 46, 87, 226, 14, 60, 147, 116, 130, + 190, 80, 196, 69, 2, 82, 21, 90, 92, 174, 195, 28, + 120, 37, 232, 3, 123, 160, 135, 138, 4, 164, 42, 180, + 184, 91, 133, 56, 240, 74, 207, 6, 246, 63, 13, 19, + 8, 71, 84, 103, 111, 182, 9, 112, 223, 148, 157, 12, + 235, 126, 26, 38, 16, 142, 168, 206, 222, 107, 18, 224, + 189, 39, 57, 24, 213, 252, 52, 76, 32, 27, 79, 155, + 187, 214, 36, 191, 121, 78, 114, 48, 169, 247, 104, 152, + 64, 54, 158, 53, 117, 171, 72, 125, 242, 156, 228, 96, + 81, 237, 208, 47, 128, 108, 59, 106, 234, 85, 144, 250, + 227, 55, 199, 192, 162, 217, 159, 94, 256, 216, 118, 212, + 211, 170, 31, 243, 197, 110, 141, 127, 67, 177, 61, 188, + 255, 175, 236, 167, 165, 83, 62, 229, 137, 220, 25, 254, + 134, 97, 122, 119, 253, 93, 215, 77, 73, 166, 124, 201, + 17, 183, 50, 251, 11, 194, 244, 238, 249, 186, 173, 154, + 146, 75, 248, 145, 34, 109, 100, 245, 22, 131, 231, 219, + 241, 115, 89, 51, 35, 150, 239, 33, 68, 218, 200, 233, + 44, 5, 205, 181, 225, 230, 178, 102, 70, 43, 221, 66, + 136, 179, 143, 209, 88, 10, 153, 105, 193, 203, 99, 204, + 140, 86, 185, 132, 15, 101, 29, 161, 176, 20, 49, 210, + 129, 149, 198, 151, 23, 172, 113, 7, 30, 202, 58, 65, + 95, 40, 98, 163 +}; + +/* + * Ranges: + * REDS1: from -32768..98302 to -383..383 + * REDS2: from -2^31..2^31-1 to -32768..98302 + */ +#define REDS1(x) (((x) & 0xFF) - ((x) >> 8)) +#define REDS2(x) (((x) & 0xFFFF) + ((x) >> 16)) + +/* + * If, upon entry, the values of q[] are all in the -N..N range (where + * N >= 98302) then the new values of q[] are in the -2N..2N range. + * + * Since alpha_tab[v] <= 256, maximum allowed range is for N = 8388608. + */ +#define FFT_LOOP(rb, hk, as, id) do { \ + size_t u, v; \ + s32 m = q[(rb)]; \ + s32 n = q[(rb) + (hk)]; \ + q[(rb)] = m + n; \ + q[(rb) + (hk)] = m - n; \ + u = v = 0; \ + goto id; \ + for (; u < (hk); u += 4, v += 4 * (as)) { \ + s32 t; \ + m = q[(rb) + u + 0]; \ + n = q[(rb) + u + 0 + (hk)]; \ + t = REDS2(n * alpha_tab[v + 0 * (as)]); \ + q[(rb) + u + 0] = m + t; \ + q[(rb) + u + 0 + (hk)] = m - t; \ + id: \ + m = q[(rb) + u + 1]; \ + n = q[(rb) + u + 1 + (hk)]; \ + t = REDS2(n * alpha_tab[v + 1 * (as)]); \ + q[(rb) + u + 1] = m + t; \ + q[(rb) + u + 1 + (hk)] = m - t; \ + m = q[(rb) + u + 2]; \ + n = q[(rb) + u + 2 + (hk)]; \ + t = REDS2(n * alpha_tab[v + 2 * (as)]); \ + q[(rb) + u + 2] = m + t; \ + q[(rb) + u + 2 + (hk)] = m - t; \ + m = q[(rb) + u + 3]; \ + n = q[(rb) + u + 3 + (hk)]; \ + t = REDS2(n * alpha_tab[v + 3 * (as)]); \ + q[(rb) + u + 3] = m + t; \ + q[(rb) + u + 3 + (hk)] = m - t; \ + } \ + } while (0) + +/* + * Output ranges: + * d0: min= 0 max= 1020 + * d1: min= -67 max= 4587 + * d2: min=-4335 max= 4335 + * d3: min=-4147 max= 507 + * d4: min= -510 max= 510 + * d5: min= -252 max= 4402 + * d6: min=-4335 max= 4335 + * d7: min=-4332 max= 322 + */ +#define FFT8(xb, xs, d) do { \ + s32 x0 = x[(xb)]; \ + s32 x1 = x[(xb) + (xs)]; \ + s32 x2 = x[(xb) + 2 * (xs)]; \ + s32 x3 = x[(xb) + 3 * (xs)]; \ + s32 a0 = x0 + x2; \ + s32 a1 = x0 + (x2 << 4); \ + s32 a2 = x0 - x2; \ + s32 a3 = x0 - (x2 << 4); \ + s32 b0 = x1 + x3; \ + s32 b1 = REDS1((x1 << 2) + (x3 << 6)); \ + s32 b2 = (x1 << 4) - (x3 << 4); \ + s32 b3 = REDS1((x1 << 6) + (x3 << 2)); \ + d ## 0 = a0 + b0; \ + d ## 1 = a1 + b1; \ + d ## 2 = a2 + b2; \ + d ## 3 = a3 + b3; \ + d ## 4 = a0 - b0; \ + d ## 5 = a1 - b1; \ + d ## 6 = a2 - b2; \ + d ## 7 = a3 - b3; \ + } while (0) + +/* + * When k=16, we have alpha=2. Multiplication by alpha^i is then reduced + * to some shifting. + * + * Output: within -591471..591723 + */ +#define FFT16(xb, xs, rb) do { \ + s32 d1_0, d1_1, d1_2, d1_3, d1_4, d1_5, d1_6, d1_7; \ + s32 d2_0, d2_1, d2_2, d2_3, d2_4, d2_5, d2_6, d2_7; \ + FFT8(xb, (xs) << 1, d1_); \ + FFT8((xb) + (xs), (xs) << 1, d2_); \ + q[(rb) + 0] = d1_0 + d2_0; \ + q[(rb) + 1] = d1_1 + (d2_1 << 1); \ + q[(rb) + 2] = d1_2 + (d2_2 << 2); \ + q[(rb) + 3] = d1_3 + (d2_3 << 3); \ + q[(rb) + 4] = d1_4 + (d2_4 << 4); \ + q[(rb) + 5] = d1_5 + (d2_5 << 5); \ + q[(rb) + 6] = d1_6 + (d2_6 << 6); \ + q[(rb) + 7] = d1_7 + (d2_7 << 7); \ + q[(rb) + 8] = d1_0 - d2_0; \ + q[(rb) + 9] = d1_1 - (d2_1 << 1); \ + q[(rb) + 10] = d1_2 - (d2_2 << 2); \ + q[(rb) + 11] = d1_3 - (d2_3 << 3); \ + q[(rb) + 12] = d1_4 - (d2_4 << 4); \ + q[(rb) + 13] = d1_5 - (d2_5 << 5); \ + q[(rb) + 14] = d1_6 - (d2_6 << 6); \ + q[(rb) + 15] = d1_7 - (d2_7 << 7); \ + } while (0) + +/* + * Output range: |q| <= 1183446 + */ +#define FFT32(xb, xs, rb, id) do { \ + FFT16(xb, (xs) << 1, rb); \ + FFT16((xb) + (xs), (xs) << 1, (rb) + 16); \ + FFT_LOOP(rb, 16, 8, id); \ + } while (0) + +/* + * Output range: |q| <= 2366892 + */ +#define FFT64(xb, xs, rb, id) do { \ + FFT32(xb, (xs) << 1, rb, XCAT(id, a)); \ + FFT32((xb) + (xs), (xs) << 1, (rb) + 32, XCAT(id, b)); \ + FFT_LOOP(rb, 32, 4, id); \ + } while (0) + + +/* + * Output range: |q| <= 4733784 + */ +#define FFT128(xb, xs, rb, id) do { \ + FFT64(xb, (xs) << 1, rb, XCAT(id, a)); \ + FFT64((xb) + (xs), (xs) << 1, (rb) + 64, XCAT(id, b)); \ + FFT_LOOP(rb, 64, 2, id); \ + } while (0) + + +/* + * For SIMD-384 / SIMD-512, the fully unrolled FFT yields a compression + * function which does not fit in the 32 kB L1 cache of a typical x86 + * Intel. We therefore add a function call layer at the FFT64 level. + */ + +static void fft64(unsigned char *x, size_t xs, s32 *q) +{ + size_t xd; + + xd = xs << 1; + FFT32(0, xd, 0, label_a); + FFT32(xs, xd, 32, label_b); + FFT_LOOP(0, 32, 4, label_); +} + +/* + * Output range: |q| <= 9467568 + */ +#define FFT256(xb, xs, rb, id) do { \ + fft64(x + (xb) + ((xs) * 0), (xs) << 2, &q[(rb) + 0]); \ + fft64(x + (xb) + ((xs) * 2), (xs) << 2, &q[(rb) + 64]); \ + FFT_LOOP(rb, 64, 2, XCAT(id, aa)); \ + fft64(x + (xb) + ((xs) * 1), (xs) << 2, &q[(rb) + 128]); \ + fft64(x + (xb) + ((xs) * 3), (xs) << 2, &q[(rb) + 192]); \ + FFT_LOOP((rb) + 128, 64, 2, XCAT(id, ab)); \ + FFT_LOOP(rb, 128, 1, XCAT(id, a)); \ + } while (0) + +/* + * alpha^(127*i) mod 257 + */ +static const unsigned short yoff_s_n[] = { + 1, 98, 95, 58, 30, 113, 23, 198, 129, 49, 176, 29, + 15, 185, 140, 99, 193, 153, 88, 143, 136, 221, 70, 178, + 225, 205, 44, 200, 68, 239, 35, 89, 241, 231, 22, 100, + 34, 248, 146, 173, 249, 244, 11, 50, 17, 124, 73, 215, + 253, 122, 134, 25, 137, 62, 165, 236, 255, 61, 67, 141, + 197, 31, 211, 118, 256, 159, 162, 199, 227, 144, 234, 59, + 128, 208, 81, 228, 242, 72, 117, 158, 64, 104, 169, 114, + 121, 36, 187, 79, 32, 52, 213, 57, 189, 18, 222, 168, + 16, 26, 235, 157, 223, 9, 111, 84, 8, 13, 246, 207, + 240, 133, 184, 42, 4, 135, 123, 232, 120, 195, 92, 21, + 2, 196, 190, 116, 60, 226, 46, 139 +}; + +/* + * alpha^(127*i) + alpha^(125*i) mod 257 + */ +static const unsigned short yoff_s_f[] = { + 2, 156, 118, 107, 45, 212, 111, 162, 97, 249, 211, 3, + 49, 101, 151, 223, 189, 178, 253, 204, 76, 82, 232, 65, + 96, 176, 161, 47, 189, 61, 248, 107, 0, 131, 133, 113, + 17, 33, 12, 111, 251, 103, 57, 148, 47, 65, 249, 143, + 189, 8, 204, 230, 205, 151, 187, 227, 247, 111, 140, 6, + 77, 10, 21, 149, 255, 101, 139, 150, 212, 45, 146, 95, + 160, 8, 46, 254, 208, 156, 106, 34, 68, 79, 4, 53, + 181, 175, 25, 192, 161, 81, 96, 210, 68, 196, 9, 150, + 0, 126, 124, 144, 240, 224, 245, 146, 6, 154, 200, 109, + 210, 192, 8, 114, 68, 249, 53, 27, 52, 106, 70, 30, + 10, 146, 117, 251, 180, 247, 236, 108 +}; + +/* + * beta^(255*i) mod 257 + */ +static const unsigned short yoff_b_n[] = { + 1, 163, 98, 40, 95, 65, 58, 202, 30, 7, 113, 172, + 23, 151, 198, 149, 129, 210, 49, 20, 176, 161, 29, 101, + 15, 132, 185, 86, 140, 204, 99, 203, 193, 105, 153, 10, + 88, 209, 143, 179, 136, 66, 221, 43, 70, 102, 178, 230, + 225, 181, 205, 5, 44, 233, 200, 218, 68, 33, 239, 150, + 35, 51, 89, 115, 241, 219, 231, 131, 22, 245, 100, 109, + 34, 145, 248, 75, 146, 154, 173, 186, 249, 238, 244, 194, + 11, 251, 50, 183, 17, 201, 124, 166, 73, 77, 215, 93, + 253, 119, 122, 97, 134, 254, 25, 220, 137, 229, 62, 83, + 165, 167, 236, 175, 255, 188, 61, 177, 67, 127, 141, 110, + 197, 243, 31, 170, 211, 212, 118, 216, 256, 94, 159, 217, + 162, 192, 199, 55, 227, 250, 144, 85, 234, 106, 59, 108, + 128, 47, 208, 237, 81, 96, 228, 156, 242, 125, 72, 171, + 117, 53, 158, 54, 64, 152, 104, 247, 169, 48, 114, 78, + 121, 191, 36, 214, 187, 155, 79, 27, 32, 76, 52, 252, + 213, 24, 57, 39, 189, 224, 18, 107, 222, 206, 168, 142, + 16, 38, 26, 126, 235, 12, 157, 148, 223, 112, 9, 182, + 111, 103, 84, 71, 8, 19, 13, 63, 246, 6, 207, 74, + 240, 56, 133, 91, 184, 180, 42, 164, 4, 138, 135, 160, + 123, 3, 232, 37, 120, 28, 195, 174, 92, 90, 21, 82, + 2, 69, 196, 80, 190, 130, 116, 147, 60, 14, 226, 87, + 46, 45, 139, 41 +}; + +/* + * beta^(255*i) + beta^(253*i) mod 257 + */ +static const unsigned short yoff_b_f[] = { + 2, 203, 156, 47, 118, 214, 107, 106, 45, 93, 212, 20, + 111, 73, 162, 251, 97, 215, 249, 53, 211, 19, 3, 89, + 49, 207, 101, 67, 151, 130, 223, 23, 189, 202, 178, 239, + 253, 127, 204, 49, 76, 236, 82, 137, 232, 157, 65, 79, + 96, 161, 176, 130, 161, 30, 47, 9, 189, 247, 61, 226, + 248, 90, 107, 64, 0, 88, 131, 243, 133, 59, 113, 115, + 17, 236, 33, 213, 12, 191, 111, 19, 251, 61, 103, 208, + 57, 35, 148, 248, 47, 116, 65, 119, 249, 178, 143, 40, + 189, 129, 8, 163, 204, 227, 230, 196, 205, 122, 151, 45, + 187, 19, 227, 72, 247, 125, 111, 121, 140, 220, 6, 107, + 77, 69, 10, 101, 21, 65, 149, 171, 255, 54, 101, 210, + 139, 43, 150, 151, 212, 164, 45, 237, 146, 184, 95, 6, + 160, 42, 8, 204, 46, 238, 254, 168, 208, 50, 156, 190, + 106, 127, 34, 234, 68, 55, 79, 18, 4, 130, 53, 208, + 181, 21, 175, 120, 25, 100, 192, 178, 161, 96, 81, 127, + 96, 227, 210, 248, 68, 10, 196, 31, 9, 167, 150, 193, + 0, 169, 126, 14, 124, 198, 144, 142, 240, 21, 224, 44, + 245, 66, 146, 238, 6, 196, 154, 49, 200, 222, 109, 9, + 210, 141, 192, 138, 8, 79, 114, 217, 68, 128, 249, 94, + 53, 30, 27, 61, 52, 135, 106, 212, 70, 238, 30, 185, + 10, 132, 146, 136, 117, 37, 251, 150, 180, 188, 247, 156, + 236, 192, 108, 86 +}; + +#define INNER(l, h, mm) (((u32)((l) * (mm)) & 0xFFFFU) \ + + ((u32)((h) * (mm)) << 16)) + +#define W_SMALL(sb, o1, o2, mm) \ + (INNER(q[8 * (sb) + 2 * 0 + o1], q[8 * (sb) + 2 * 0 + o2], mm), \ + INNER(q[8 * (sb) + 2 * 1 + o1], q[8 * (sb) + 2 * 1 + o2], mm), \ + INNER(q[8 * (sb) + 2 * 2 + o1], q[8 * (sb) + 2 * 2 + o2], mm), \ + INNER(q[8 * (sb) + 2 * 3 + o1], q[8 * (sb) + 2 * 3 + o2], mm) + +#define WS_0_0 W_SMALL( 4, 0, 1, 185) +#define WS_0_1 W_SMALL( 6, 0, 1, 185) +#define WS_0_2 W_SMALL( 0, 0, 1, 185) +#define WS_0_3 W_SMALL( 2, 0, 1, 185) +#define WS_0_4 W_SMALL( 7, 0, 1, 185) +#define WS_0_5 W_SMALL( 5, 0, 1, 185) +#define WS_0_6 W_SMALL( 3, 0, 1, 185) +#define WS_0_7 W_SMALL( 1, 0, 1, 185) +#define WS_1_0 W_SMALL(15, 0, 1, 185) +#define WS_1_1 W_SMALL(11, 0, 1, 185) +#define WS_1_2 W_SMALL(12, 0, 1, 185) +#define WS_1_3 W_SMALL( 8, 0, 1, 185) +#define WS_1_4 W_SMALL( 9, 0, 1, 185) +#define WS_1_5 W_SMALL(13, 0, 1, 185) +#define WS_1_6 W_SMALL(10, 0, 1, 185) +#define WS_1_7 W_SMALL(14, 0, 1, 185) +#define WS_2_0 W_SMALL(17, -128, -64, 233) +#define WS_2_1 W_SMALL(18, -128, -64, 233) +#define WS_2_2 W_SMALL(23, -128, -64, 233) +#define WS_2_3 W_SMALL(20, -128, -64, 233) +#define WS_2_4 W_SMALL(22, -128, -64, 233) +#define WS_2_5 W_SMALL(21, -128, -64, 233) +#define WS_2_6 W_SMALL(16, -128, -64, 233) +#define WS_2_7 W_SMALL(19, -128, -64, 233) +#define WS_3_0 W_SMALL(30, -191, -127, 233) +#define WS_3_1 W_SMALL(24, -191, -127, 233) +#define WS_3_2 W_SMALL(25, -191, -127, 233) +#define WS_3_3 W_SMALL(31, -191, -127, 233) +#define WS_3_4 W_SMALL(27, -191, -127, 233) +#define WS_3_5 W_SMALL(29, -191, -127, 233) +#define WS_3_6 W_SMALL(28, -191, -127, 233) +#define WS_3_7 W_SMALL(26, -191, -127, 233) + +#define W_BIG(sb, o1, o2, mm) \ + (INNER(q[16 * (sb) + 2 * 0 + o1], q[16 * (sb) + 2 * 0 + o2], mm), \ + INNER(q[16 * (sb) + 2 * 1 + o1], q[16 * (sb) + 2 * 1 + o2], mm), \ + INNER(q[16 * (sb) + 2 * 2 + o1], q[16 * (sb) + 2 * 2 + o2], mm), \ + INNER(q[16 * (sb) + 2 * 3 + o1], q[16 * (sb) + 2 * 3 + o2], mm), \ + INNER(q[16 * (sb) + 2 * 4 + o1], q[16 * (sb) + 2 * 4 + o2], mm), \ + INNER(q[16 * (sb) + 2 * 5 + o1], q[16 * (sb) + 2 * 5 + o2], mm), \ + INNER(q[16 * (sb) + 2 * 6 + o1], q[16 * (sb) + 2 * 6 + o2], mm), \ + INNER(q[16 * (sb) + 2 * 7 + o1], q[16 * (sb) + 2 * 7 + o2], mm) + +#define WB_0_0 W_BIG( 4, 0, 1, 185) +#define WB_0_1 W_BIG( 6, 0, 1, 185) +#define WB_0_2 W_BIG( 0, 0, 1, 185) +#define WB_0_3 W_BIG( 2, 0, 1, 185) +#define WB_0_4 W_BIG( 7, 0, 1, 185) +#define WB_0_5 W_BIG( 5, 0, 1, 185) +#define WB_0_6 W_BIG( 3, 0, 1, 185) +#define WB_0_7 W_BIG( 1, 0, 1, 185) +#define WB_1_0 W_BIG(15, 0, 1, 185) +#define WB_1_1 W_BIG(11, 0, 1, 185) +#define WB_1_2 W_BIG(12, 0, 1, 185) +#define WB_1_3 W_BIG( 8, 0, 1, 185) +#define WB_1_4 W_BIG( 9, 0, 1, 185) +#define WB_1_5 W_BIG(13, 0, 1, 185) +#define WB_1_6 W_BIG(10, 0, 1, 185) +#define WB_1_7 W_BIG(14, 0, 1, 185) +#define WB_2_0 W_BIG(17, -256, -128, 233) +#define WB_2_1 W_BIG(18, -256, -128, 233) +#define WB_2_2 W_BIG(23, -256, -128, 233) +#define WB_2_3 W_BIG(20, -256, -128, 233) +#define WB_2_4 W_BIG(22, -256, -128, 233) +#define WB_2_5 W_BIG(21, -256, -128, 233) +#define WB_2_6 W_BIG(16, -256, -128, 233) +#define WB_2_7 W_BIG(19, -256, -128, 233) +#define WB_3_0 W_BIG(30, -383, -255, 233) +#define WB_3_1 W_BIG(24, -383, -255, 233) +#define WB_3_2 W_BIG(25, -383, -255, 233) +#define WB_3_3 W_BIG(31, -383, -255, 233) +#define WB_3_4 W_BIG(27, -383, -255, 233) +#define WB_3_5 W_BIG(29, -383, -255, 233) +#define WB_3_6 W_BIG(28, -383, -255, 233) +#define WB_3_7 W_BIG(26, -383, -255, 233) + +#define IF(x, y, z) ((((y) ^ (z)) & (x)) ^ (z)) +#define MAJ(x, y, z) (((x) & (y)) | (((x) | (y)) & (z))) + +#define PP4_0_0 1 +#define PP4_0_1 0 +#define PP4_0_2 3 +#define PP4_0_3 2 +#define PP4_1_0 2 +#define PP4_1_1 3 +#define PP4_1_2 0 +#define PP4_1_3 1 +#define PP4_2_0 3 +#define PP4_2_1 2 +#define PP4_2_2 1 +#define PP4_2_3 0 + +#define PP8_0_0 1 +#define PP8_0_1 0 +#define PP8_0_2 3 +#define PP8_0_3 2 +#define PP8_0_4 5 +#define PP8_0_5 4 +#define PP8_0_6 7 +#define PP8_0_7 6 + +#define PP8_1_0 6 +#define PP8_1_1 7 +#define PP8_1_2 4 +#define PP8_1_3 5 +#define PP8_1_4 2 +#define PP8_1_5 3 +#define PP8_1_6 0 +#define PP8_1_7 1 + +#define PP8_2_0 2 +#define PP8_2_1 3 +#define PP8_2_2 0 +#define PP8_2_3 1 +#define PP8_2_4 6 +#define PP8_2_5 7 +#define PP8_2_6 4 +#define PP8_2_7 5 + +#define PP8_3_0 3 +#define PP8_3_1 2 +#define PP8_3_2 1 +#define PP8_3_3 0 +#define PP8_3_4 7 +#define PP8_3_5 6 +#define PP8_3_6 5 +#define PP8_3_7 4 + +#define PP8_4_0 5 +#define PP8_4_1 4 +#define PP8_4_2 7 +#define PP8_4_3 6 +#define PP8_4_4 1 +#define PP8_4_5 0 +#define PP8_4_6 3 +#define PP8_4_7 2 + +#define PP8_5_0 7 +#define PP8_5_1 6 +#define PP8_5_2 5 +#define PP8_5_3 4 +#define PP8_5_4 3 +#define PP8_5_5 2 +#define PP8_5_6 1 +#define PP8_5_7 0 + +#define PP8_6_0 4 +#define PP8_6_1 5 +#define PP8_6_2 6 +#define PP8_6_3 7 +#define PP8_6_4 0 +#define PP8_6_5 1 +#define PP8_6_6 2 +#define PP8_6_7 3 + +#if BEE_SIMD_NOCOPY + +#define DECL_STATE_SMALL +#define READ_STATE_SMALL(sc) +#define WRITE_STATE_SMALL(sc) +#define DECL_STATE_BIG +#define READ_STATE_BIG(sc) +#define WRITE_STATE_BIG(sc) + +#else + +#define DECL_STATE_SMALL \ + u32 A0, A1, A2, A3, B0, B1, B2, B3, C0, C1, C2, C3, D0, D1, D2, D3; + +#define READ_STATE_SMALL(sc) do { \ + A0 = (sc)->state[ 0]; \ + A1 = (sc)->state[ 1]; \ + A2 = (sc)->state[ 2]; \ + A3 = (sc)->state[ 3]; \ + B0 = (sc)->state[ 4]; \ + B1 = (sc)->state[ 5]; \ + B2 = (sc)->state[ 6]; \ + B3 = (sc)->state[ 7]; \ + C0 = (sc)->state[ 8]; \ + C1 = (sc)->state[ 9]; \ + C2 = (sc)->state[10]; \ + C3 = (sc)->state[11]; \ + D0 = (sc)->state[12]; \ + D1 = (sc)->state[13]; \ + D2 = (sc)->state[14]; \ + D3 = (sc)->state[15]; \ + } while (0) + +#define WRITE_STATE_SMALL(sc) do { \ + (sc)->state[ 0] = A0; \ + (sc)->state[ 1] = A1; \ + (sc)->state[ 2] = A2; \ + (sc)->state[ 3] = A3; \ + (sc)->state[ 4] = B0; \ + (sc)->state[ 5] = B1; \ + (sc)->state[ 6] = B2; \ + (sc)->state[ 7] = B3; \ + (sc)->state[ 8] = C0; \ + (sc)->state[ 9] = C1; \ + (sc)->state[10] = C2; \ + (sc)->state[11] = C3; \ + (sc)->state[12] = D0; \ + (sc)->state[13] = D1; \ + (sc)->state[14] = D2; \ + (sc)->state[15] = D3; \ + } while (0) + +#define DECL_STATE_BIG \ + u32 A0, A1, A2, A3, A4, A5, A6, A7; \ + u32 B0, B1, B2, B3, B4, B5, B6, B7; \ + u32 C0, C1, C2, C3, C4, C5, C6, C7; \ + u32 D0, D1, D2, D3, D4, D5, D6, D7; + +#define READ_STATE_BIG(sc) do { \ + A0 = (sc)->state[ 0]; \ + A1 = (sc)->state[ 1]; \ + A2 = (sc)->state[ 2]; \ + A3 = (sc)->state[ 3]; \ + A4 = (sc)->state[ 4]; \ + A5 = (sc)->state[ 5]; \ + A6 = (sc)->state[ 6]; \ + A7 = (sc)->state[ 7]; \ + B0 = (sc)->state[ 8]; \ + B1 = (sc)->state[ 9]; \ + B2 = (sc)->state[10]; \ + B3 = (sc)->state[11]; \ + B4 = (sc)->state[12]; \ + B5 = (sc)->state[13]; \ + B6 = (sc)->state[14]; \ + B7 = (sc)->state[15]; \ + C0 = (sc)->state[16]; \ + C1 = (sc)->state[17]; \ + C2 = (sc)->state[18]; \ + C3 = (sc)->state[19]; \ + C4 = (sc)->state[20]; \ + C5 = (sc)->state[21]; \ + C6 = (sc)->state[22]; \ + C7 = (sc)->state[23]; \ + D0 = (sc)->state[24]; \ + D1 = (sc)->state[25]; \ + D2 = (sc)->state[26]; \ + D3 = (sc)->state[27]; \ + D4 = (sc)->state[28]; \ + D5 = (sc)->state[29]; \ + D6 = (sc)->state[30]; \ + D7 = (sc)->state[31]; \ + } while (0) + +#define WRITE_STATE_BIG(sc) do { \ + (sc)->state[ 0] = A0; \ + (sc)->state[ 1] = A1; \ + (sc)->state[ 2] = A2; \ + (sc)->state[ 3] = A3; \ + (sc)->state[ 4] = A4; \ + (sc)->state[ 5] = A5; \ + (sc)->state[ 6] = A6; \ + (sc)->state[ 7] = A7; \ + (sc)->state[ 8] = B0; \ + (sc)->state[ 9] = B1; \ + (sc)->state[10] = B2; \ + (sc)->state[11] = B3; \ + (sc)->state[12] = B4; \ + (sc)->state[13] = B5; \ + (sc)->state[14] = B6; \ + (sc)->state[15] = B7; \ + (sc)->state[16] = C0; \ + (sc)->state[17] = C1; \ + (sc)->state[18] = C2; \ + (sc)->state[19] = C3; \ + (sc)->state[20] = C4; \ + (sc)->state[21] = C5; \ + (sc)->state[22] = C6; \ + (sc)->state[23] = C7; \ + (sc)->state[24] = D0; \ + (sc)->state[25] = D1; \ + (sc)->state[26] = D2; \ + (sc)->state[27] = D3; \ + (sc)->state[28] = D4; \ + (sc)->state[29] = D5; \ + (sc)->state[30] = D6; \ + (sc)->state[31] = D7; \ + } while (0) + +#endif + +#define STEP_ELT(n, w, fun, s, ppb) do { \ + u32 tt = T32(D ## n + (w) + fun(A ## n, B ## n, C ## n)); \ + A ## n = T32(ROL32(tt, s) + XCAT(tA, XCAT(ppb, n))); \ + D ## n = C ## n; \ + C ## n = B ## n; \ + B ## n = tA ## n; \ + } while (0) + +#define STEP_SMALL(w0, w1, w2, w3, fun, r, s, pp4b) do { \ + u32 tA0 = ROL32(A0, r); \ + u32 tA1 = ROL32(A1, r); \ + u32 tA2 = ROL32(A2, r); \ + u32 tA3 = ROL32(A3, r); \ + STEP_ELT(0, w0, fun, s, pp4b); \ + STEP_ELT(1, w1, fun, s, pp4b); \ + STEP_ELT(2, w2, fun, s, pp4b); \ + STEP_ELT(3, w3, fun, s, pp4b); \ + } while (0) + +#define STEP_BIG(w0, w1, w2, w3, w4, w5, w6, w7, fun, r, s, pp8b) do { \ + u32 tA0 = ROL32(A0, r); \ + u32 tA1 = ROL32(A1, r); \ + u32 tA2 = ROL32(A2, r); \ + u32 tA3 = ROL32(A3, r); \ + u32 tA4 = ROL32(A4, r); \ + u32 tA5 = ROL32(A5, r); \ + u32 tA6 = ROL32(A6, r); \ + u32 tA7 = ROL32(A7, r); \ + STEP_ELT(0, w0, fun, s, pp8b); \ + STEP_ELT(1, w1, fun, s, pp8b); \ + STEP_ELT(2, w2, fun, s, pp8b); \ + STEP_ELT(3, w3, fun, s, pp8b); \ + STEP_ELT(4, w4, fun, s, pp8b); \ + STEP_ELT(5, w5, fun, s, pp8b); \ + STEP_ELT(6, w6, fun, s, pp8b); \ + STEP_ELT(7, w7, fun, s, pp8b); \ + } while (0) + +#define M3_0_0 0_ +#define M3_1_0 1_ +#define M3_2_0 2_ +#define M3_3_0 0_ +#define M3_4_0 1_ +#define M3_5_0 2_ +#define M3_6_0 0_ +#define M3_7_0 1_ + +#define M3_0_1 1_ +#define M3_1_1 2_ +#define M3_2_1 0_ +#define M3_3_1 1_ +#define M3_4_1 2_ +#define M3_5_1 0_ +#define M3_6_1 1_ +#define M3_7_1 2_ + +#define M3_0_2 2_ +#define M3_1_2 0_ +#define M3_2_2 1_ +#define M3_3_2 2_ +#define M3_4_2 0_ +#define M3_5_2 1_ +#define M3_6_2 2_ +#define M3_7_2 0_ + +#define STEP_SMALL_(w, fun, r, s, pp4b) STEP_SMALL w, fun, r, s, pp4b) + +#define ONE_ROUND_SMALL(ri, isp, p0, p1, p2, p3) do { \ + STEP_SMALL_(WS_ ## ri ## 0, \ + IF, p0, p1, XCAT(PP4_, M3_0_ ## isp)); \ + STEP_SMALL_(WS_ ## ri ## 1, \ + IF, p1, p2, XCAT(PP4_, M3_1_ ## isp)); \ + STEP_SMALL_(WS_ ## ri ## 2, \ + IF, p2, p3, XCAT(PP4_, M3_2_ ## isp)); \ + STEP_SMALL_(WS_ ## ri ## 3, \ + IF, p3, p0, XCAT(PP4_, M3_3_ ## isp)); \ + STEP_SMALL_(WS_ ## ri ## 4, \ + MAJ, p0, p1, XCAT(PP4_, M3_4_ ## isp)); \ + STEP_SMALL_(WS_ ## ri ## 5, \ + MAJ, p1, p2, XCAT(PP4_, M3_5_ ## isp)); \ + STEP_SMALL_(WS_ ## ri ## 6, \ + MAJ, p2, p3, XCAT(PP4_, M3_6_ ## isp)); \ + STEP_SMALL_(WS_ ## ri ## 7, \ + MAJ, p3, p0, XCAT(PP4_, M3_7_ ## isp)); \ + } while (0) + +#define M7_0_0 0_ +#define M7_1_0 1_ +#define M7_2_0 2_ +#define M7_3_0 3_ +#define M7_4_0 4_ +#define M7_5_0 5_ +#define M7_6_0 6_ +#define M7_7_0 0_ + +#define M7_0_1 1_ +#define M7_1_1 2_ +#define M7_2_1 3_ +#define M7_3_1 4_ +#define M7_4_1 5_ +#define M7_5_1 6_ +#define M7_6_1 0_ +#define M7_7_1 1_ + +#define M7_0_2 2_ +#define M7_1_2 3_ +#define M7_2_2 4_ +#define M7_3_2 5_ +#define M7_4_2 6_ +#define M7_5_2 0_ +#define M7_6_2 1_ +#define M7_7_2 2_ + +#define M7_0_3 3_ +#define M7_1_3 4_ +#define M7_2_3 5_ +#define M7_3_3 6_ +#define M7_4_3 0_ +#define M7_5_3 1_ +#define M7_6_3 2_ +#define M7_7_3 3_ + +#define STEP_BIG_(w, fun, r, s, pp8b) STEP_BIG w, fun, r, s, pp8b) + +#define ONE_ROUND_BIG(ri, isp, p0, p1, p2, p3) do { \ + STEP_BIG_(WB_ ## ri ## 0, \ + IF, p0, p1, XCAT(PP8_, M7_0_ ## isp)); \ + STEP_BIG_(WB_ ## ri ## 1, \ + IF, p1, p2, XCAT(PP8_, M7_1_ ## isp)); \ + STEP_BIG_(WB_ ## ri ## 2, \ + IF, p2, p3, XCAT(PP8_, M7_2_ ## isp)); \ + STEP_BIG_(WB_ ## ri ## 3, \ + IF, p3, p0, XCAT(PP8_, M7_3_ ## isp)); \ + STEP_BIG_(WB_ ## ri ## 4, \ + MAJ, p0, p1, XCAT(PP8_, M7_4_ ## isp)); \ + STEP_BIG_(WB_ ## ri ## 5, \ + MAJ, p1, p2, XCAT(PP8_, M7_5_ ## isp)); \ + STEP_BIG_(WB_ ## ri ## 6, \ + MAJ, p2, p3, XCAT(PP8_, M7_6_ ## isp)); \ + STEP_BIG_(WB_ ## ri ## 7, \ + MAJ, p3, p0, XCAT(PP8_, M7_7_ ## isp)); \ + } while (0) + + + + +#if BEE_SIMD_NOCOPY +#define A0 (sc->state[ 0]) +#define A1 (sc->state[ 1]) +#define A2 (sc->state[ 2]) +#define A3 (sc->state[ 3]) +#define A4 (sc->state[ 4]) +#define A5 (sc->state[ 5]) +#define A6 (sc->state[ 6]) +#define A7 (sc->state[ 7]) +#define B0 (sc->state[ 8]) +#define B1 (sc->state[ 9]) +#define B2 (sc->state[10]) +#define B3 (sc->state[11]) +#define B4 (sc->state[12]) +#define B5 (sc->state[13]) +#define B6 (sc->state[14]) +#define B7 (sc->state[15]) +#define C0 (sc->state[16]) +#define C1 (sc->state[17]) +#define C2 (sc->state[18]) +#define C3 (sc->state[19]) +#define C4 (sc->state[20]) +#define C5 (sc->state[21]) +#define C6 (sc->state[22]) +#define C7 (sc->state[23]) +#define D0 (sc->state[24]) +#define D1 (sc->state[25]) +#define D2 (sc->state[26]) +#define D3 (sc->state[27]) +#define D4 (sc->state[28]) +#define D5 (sc->state[29]) +#define D6 (sc->state[30]) +#define D7 (sc->state[31]) +#endif + +static void five_compress(facet_five_context *sc, int last) +{ + unsigned char *x; + s32 q[256]; + int i; + DECL_STATE_BIG +#if BEE_SIMD_NOCOPY + bee_u32 saved[32]; +#endif + +#if BEE_SIMD_NOCOPY + memcpy(saved, sc->state, sizeof saved); +#endif + + x = sc->buf; + FFT256(0, 1, 0, ll); + if (last) { + for (i = 0; i < 256; i ++) { + s32 tq; + + tq = q[i] + yoff_b_f[i]; + tq = REDS2(tq); + tq = REDS1(tq); + tq = REDS1(tq); + q[i] = (tq <= 128 ? tq : tq - 257); + } + } else { + for (i = 0; i < 256; i ++) { + s32 tq; + + tq = q[i] + yoff_b_n[i]; + tq = REDS2(tq); + tq = REDS1(tq); + tq = REDS1(tq); + q[i] = (tq <= 128 ? tq : tq - 257); + } + } + READ_STATE_BIG(sc); + A0 ^= bee_dec32le_aligned(x + 0); + A1 ^= bee_dec32le_aligned(x + 4); + A2 ^= bee_dec32le_aligned(x + 8); + A3 ^= bee_dec32le_aligned(x + 12); + A4 ^= bee_dec32le_aligned(x + 16); + A5 ^= bee_dec32le_aligned(x + 20); + A6 ^= bee_dec32le_aligned(x + 24); + A7 ^= bee_dec32le_aligned(x + 28); + B0 ^= bee_dec32le_aligned(x + 32); + B1 ^= bee_dec32le_aligned(x + 36); + B2 ^= bee_dec32le_aligned(x + 40); + B3 ^= bee_dec32le_aligned(x + 44); + B4 ^= bee_dec32le_aligned(x + 48); + B5 ^= bee_dec32le_aligned(x + 52); + B6 ^= bee_dec32le_aligned(x + 56); + B7 ^= bee_dec32le_aligned(x + 60); + C0 ^= bee_dec32le_aligned(x + 64); + C1 ^= bee_dec32le_aligned(x + 68); + C2 ^= bee_dec32le_aligned(x + 72); + C3 ^= bee_dec32le_aligned(x + 76); + C4 ^= bee_dec32le_aligned(x + 80); + C5 ^= bee_dec32le_aligned(x + 84); + C6 ^= bee_dec32le_aligned(x + 88); + C7 ^= bee_dec32le_aligned(x + 92); + D0 ^= bee_dec32le_aligned(x + 96); + D1 ^= bee_dec32le_aligned(x + 100); + D2 ^= bee_dec32le_aligned(x + 104); + D3 ^= bee_dec32le_aligned(x + 108); + D4 ^= bee_dec32le_aligned(x + 112); + D5 ^= bee_dec32le_aligned(x + 116); + D6 ^= bee_dec32le_aligned(x + 120); + D7 ^= bee_dec32le_aligned(x + 124); + + ONE_ROUND_BIG(0_, 0, 3, 23, 17, 27); + ONE_ROUND_BIG(1_, 1, 28, 19, 22, 7); + ONE_ROUND_BIG(2_, 2, 29, 9, 15, 5); + ONE_ROUND_BIG(3_, 3, 4, 13, 10, 25); +#if BEE_SIMD_NOCOPY + STEP_BIG( + saved[ 0], saved[ 1], saved[ 2], saved[ 3], + saved[ 4], saved[ 5], saved[ 6], saved[ 7], + IF, 4, 13, PP8_4_); + STEP_BIG( + saved[ 8], saved[ 9], saved[10], saved[11], + saved[12], saved[13], saved[14], saved[15], + IF, 13, 10, PP8_5_); + STEP_BIG( + saved[16], saved[17], saved[18], saved[19], + saved[20], saved[21], saved[22], saved[23], + IF, 10, 25, PP8_6_); + STEP_BIG( + saved[24], saved[25], saved[26], saved[27], + saved[28], saved[29], saved[30], saved[31], + IF, 25, 4, PP8_0_); +#else + STEP_BIG( + sc->state[ 0], sc->state[ 1], sc->state[ 2], sc->state[ 3], + sc->state[ 4], sc->state[ 5], sc->state[ 6], sc->state[ 7], + IF, 4, 13, PP8_4_); + STEP_BIG( + sc->state[ 8], sc->state[ 9], sc->state[10], sc->state[11], + sc->state[12], sc->state[13], sc->state[14], sc->state[15], + IF, 13, 10, PP8_5_); + STEP_BIG( + sc->state[16], sc->state[17], sc->state[18], sc->state[19], + sc->state[20], sc->state[21], sc->state[22], sc->state[23], + IF, 10, 25, PP8_6_); + STEP_BIG( + sc->state[24], sc->state[25], sc->state[26], sc->state[27], + sc->state[28], sc->state[29], sc->state[30], sc->state[31], + IF, 25, 4, PP8_0_); + WRITE_STATE_BIG(sc); +#endif +} + +#if BEE_SIMD_NOCOPY +#undef A0 +#undef A1 +#undef A2 +#undef A3 +#undef A4 +#undef A5 +#undef A6 +#undef A7 +#undef B0 +#undef B1 +#undef B2 +#undef B3 +#undef B4 +#undef B5 +#undef B6 +#undef B7 +#undef C0 +#undef C1 +#undef C2 +#undef C3 +#undef C4 +#undef C5 +#undef C6 +#undef C7 +#undef D0 +#undef D1 +#undef D2 +#undef D3 +#undef D4 +#undef D5 +#undef D6 +#undef D7 +#endif + + +static const u32 IV512[] = { + C32(0x0BA16B95), C32(0x72F999AD), C32(0x9FECC2AE), C32(0xBA3264FC), + C32(0x5E894929), C32(0x8E9F30E5), C32(0x2F1DAA37), C32(0xF0F2C558), + C32(0xAC506643), C32(0xA90635A5), C32(0xE25B878B), C32(0xAAB7878F), + C32(0x88817F7A), C32(0x0A02892B), C32(0x559A7550), C32(0x598F657E), + C32(0x7EEF60A1), C32(0x6B70E3E8), C32(0x9C1714D1), C32(0xB958E2A8), + C32(0xAB02675E), C32(0xED1C014F), C32(0xCD8D65BB), C32(0xFDB7A257), + C32(0x09254899), C32(0xD699C7BC), C32(0x9019B6DC), C32(0x2B9022E4), + C32(0x8FA14956), C32(0x21BF9BD3), C32(0xB94D0943), C32(0x6FFDDC22) +}; + +static void five_init(void *cc, const u32 *iv) +{ + facet_five_context *sc; + + sc = cc; + memcpy(sc->state, iv, sizeof sc->state); + sc->count_low = sc->count_high = 0; + sc->ptr = 0; +} + + +static void five_update(void *cc, const void *data, size_t len) +{ + facet_five_context *sc; + + sc = cc; + while (len > 0) { + size_t clen; + + clen = (sizeof sc->buf) - sc->ptr; + if (clen > len) + clen = len; + memcpy(sc->buf + sc->ptr, data, clen); + data = (const unsigned char *)data + clen; + len -= clen; + if ((sc->ptr += clen) == sizeof sc->buf) { + five_compress(sc, 0); + sc->ptr = 0; + sc->count_low = T32(sc->count_low + 1); + if (sc->count_low == 0) + sc->count_high ++; + } + } +} + +static void five_encode_count(unsigned char *dst, + u32 low, u32 high, size_t ptr, unsigned n) +{ + low = T32(low << 10); + high = T32(high << 10) + (low >> 22); + low += (ptr << 3) + n; + bee_enc32le(dst, low); + bee_enc32le(dst + 4, high); +} + +static void five_finalize(void *cc, unsigned ub, unsigned n, void *dst, size_t dst_len) +{ + facet_five_context *sc; + unsigned char *d; + size_t u; + + sc = cc; + if (sc->ptr > 0 || n > 0) { + memset(sc->buf + sc->ptr, 0, + (sizeof sc->buf) - sc->ptr); + sc->buf[sc->ptr] = ub & (0xFF << (8 - n)); + five_compress(sc, 0); + } + memset(sc->buf, 0, sizeof sc->buf); + five_encode_count(sc->buf, sc->count_low, sc->count_high, sc->ptr, n); + five_compress(sc, 1); + d = dst; + for (d = dst, u = 0; u < dst_len; u ++) + bee_enc32le(d + (u << 2), sc->state[u]); +} + +/* see facet_four.h */ +void facet_five_init(void *cc) +{ + five_init(cc, IV512); +} + +/* see facet_four.h */ +void facet_five(void *cc, const void *data, size_t len) +{ + five_update(cc, data, len); +} + +/* see facet_four.h */ +void facet_five_close(void *cc, void *dst) +{ + facet_five_addbits_and_close(cc, 0, 0, dst); +} + +/* see facet_four.h */ +void facet_five_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + five_finalize(cc, ub, n, dst, 16); + facet_five_init(cc); +} + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/stratum/algos/honeycomb/facet_five.h b/stratum/algos/honeycomb/facet_five.h new file mode 100644 index 000000000..67fc69f7d --- /dev/null +++ b/stratum/algos/honeycomb/facet_five.h @@ -0,0 +1,79 @@ +#ifndef FACET_FIVE_H +#define FACET_FIVE_H + +#ifdef __cplusplus + extern "C"{ +#endif + +#include +#include "honeycomb_types.h" + + +//#undef BEE_64 // + + +/** + * This structure is a context for HoneyComb Facet #5 computations: it contains the + * intermediate values and some data from the last entered block. Once + * an HoneyComb Facet #5 computation has been performed, the context can be reused for + * another computation. This specific structure is used for HoneyComb Facet #5. + * + * The contents of this structure are private. A running HoneyComb Facet #5 computation + * can be cloned by copying the context (e.g. with a simple memcpy() ). + */ +typedef struct { + unsigned char buf[128]; /* first field, for alignment */ + size_t ptr; + bee_u32 state[32]; + bee_u32 count_low, count_high; +} facet_five_context; + + +/** + * Initialize an HoneyComb Facet #5 context. This process performs no memory allocation. + * + * @param cc the HoneyComb Facet #5 context (pointer to a facet_five_context) + */ +void facet_five_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the HoneyComb Facet #5 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void facet_five(void *cc, const void *data, size_t len); + +/** + * Terminate the current HoneyComb Facet #5 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (64 bytes). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #5 context + * @param dst the destination buffer + */ +void facet_five_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (64 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #5 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void facet_five_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/honeycomb/facet_four.c b/stratum/algos/honeycomb/facet_four.c new file mode 100644 index 000000000..f37264b36 --- /dev/null +++ b/stratum/algos/honeycomb/facet_four.c @@ -0,0 +1,780 @@ +#include +#include + +#include "facet_four.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +#ifdef _MSC_VER + #pragma warning (disable: 4146) +#endif + +#define C32 BEE_C32 + +/* + * As of round 2 of the SHA-3 competition, the published reference + * implementation and test vectors are wrong, because they use + * big-endian AES tables while the internal decoding uses little-endian. + * The code below follows the specification. To turn it into a code + * which follows the reference implementation (the one called "BugFix" + * on the SHAvite-3 web site, published on Nov 23rd, 2009), comment out + * the code below (from the '#define AES_BIG_ENDIAN...' to the definition + * of the AES_ROUND_NOKEY macro) and replace it with the version which + * is commented out afterwards. + */ + +#define AES_BIG_ENDIAN 0 +#include "facets_helper.c" + +static const bee_u32 IV512[] = { + C32(0x72FCCDD8), C32(0x79CA4727), C32(0x128A077B), C32(0x40D55AEC), + C32(0xD1901A06), C32(0x430AE307), C32(0xB29F5CD1), C32(0xDF07FBFC), + C32(0x8E45D73D), C32(0x681AB538), C32(0xBDE86578), C32(0xDD577E47), + C32(0xE275EADE), C32(0x502D9FCD), C32(0xB9357178), C32(0x022A4B9A) +}; + +#define AES_ROUND_NOKEY(x0, x1, x2, x3) do { \ + bee_u32 t0 = (x0); \ + bee_u32 t1 = (x1); \ + bee_u32 t2 = (x2); \ + bee_u32 t3 = (x3); \ + AES_ROUND_NOKEY_LE(t0, t1, t2, t3, x0, x1, x2, x3); \ + } while (0) + +/* + * This is the code needed to match the "reference implementation" as + * published on Nov 23rd, 2009, instead of the published specification. + * + +#define AES_BIG_ENDIAN 1 +#include "aes_helper.c" + +static const bee_u32 IV512[] = { + C32(0xD5652B63), C32(0x25F1E6EA), C32(0xB18F48FA), C32(0xA1EE3A47), + C32(0xC8B67B07), C32(0xBDCE48D3), C32(0xE3937B78), C32(0x05DB5186), + C32(0x613BE326), C32(0xA11FA303), C32(0x90C833D4), C32(0x79CEE316), + C32(0x1E1AF00F), C32(0x2829B165), C32(0x23B25F80), C32(0x21E11499) +}; + +#define AES_ROUND_NOKEY(x0, x1, x2, x3) do { \ + bee_u32 t0 = (x0); \ + bee_u32 t1 = (x1); \ + bee_u32 t2 = (x2); \ + bee_u32 t3 = (x3); \ + AES_ROUND_NOKEY_BE(t0, t1, t2, t3, x0, x1, x2, x3); \ + } while (0) + + */ + +#define KEY_EXPAND_ELT(k0, k1, k2, k3) do { \ + bee_u32 kt; \ + AES_ROUND_NOKEY(k1, k2, k3, k0); \ + kt = (k0); \ + (k0) = (k1); \ + (k1) = (k2); \ + (k2) = (k3); \ + (k3) = kt; \ + } while (0) + + + + +/* + * This function assumes that "msg" is aligned for 32-bit access. + */ +static void c512(facet_four_context *sc, const void *msg) +{ + bee_u32 p0, p1, p2, p3, p4, p5, p6, p7; + bee_u32 p8, p9, pA, pB, pC, pD, pE, pF; + bee_u32 x0, x1, x2, x3; + bee_u32 rk00, rk01, rk02, rk03, rk04, rk05, rk06, rk07; + bee_u32 rk08, rk09, rk0A, rk0B, rk0C, rk0D, rk0E, rk0F; + bee_u32 rk10, rk11, rk12, rk13, rk14, rk15, rk16, rk17; + bee_u32 rk18, rk19, rk1A, rk1B, rk1C, rk1D, rk1E, rk1F; + int r; + + p0 = sc->h[0x0]; + p1 = sc->h[0x1]; + p2 = sc->h[0x2]; + p3 = sc->h[0x3]; + p4 = sc->h[0x4]; + p5 = sc->h[0x5]; + p6 = sc->h[0x6]; + p7 = sc->h[0x7]; + p8 = sc->h[0x8]; + p9 = sc->h[0x9]; + pA = sc->h[0xA]; + pB = sc->h[0xB]; + pC = sc->h[0xC]; + pD = sc->h[0xD]; + pE = sc->h[0xE]; + pF = sc->h[0xF]; + /* round 0 */ + rk00 = bee_dec32le_aligned((const unsigned char *)msg + 0); + x0 = p4 ^ rk00; + rk01 = bee_dec32le_aligned((const unsigned char *)msg + 4); + x1 = p5 ^ rk01; + rk02 = bee_dec32le_aligned((const unsigned char *)msg + 8); + x2 = p6 ^ rk02; + rk03 = bee_dec32le_aligned((const unsigned char *)msg + 12); + x3 = p7 ^ rk03; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk04 = bee_dec32le_aligned((const unsigned char *)msg + 16); + x0 ^= rk04; + rk05 = bee_dec32le_aligned((const unsigned char *)msg + 20); + x1 ^= rk05; + rk06 = bee_dec32le_aligned((const unsigned char *)msg + 24); + x2 ^= rk06; + rk07 = bee_dec32le_aligned((const unsigned char *)msg + 28); + x3 ^= rk07; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk08 = bee_dec32le_aligned((const unsigned char *)msg + 32); + x0 ^= rk08; + rk09 = bee_dec32le_aligned((const unsigned char *)msg + 36); + x1 ^= rk09; + rk0A = bee_dec32le_aligned((const unsigned char *)msg + 40); + x2 ^= rk0A; + rk0B = bee_dec32le_aligned((const unsigned char *)msg + 44); + x3 ^= rk0B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk0C = bee_dec32le_aligned((const unsigned char *)msg + 48); + x0 ^= rk0C; + rk0D = bee_dec32le_aligned((const unsigned char *)msg + 52); + x1 ^= rk0D; + rk0E = bee_dec32le_aligned((const unsigned char *)msg + 56); + x2 ^= rk0E; + rk0F = bee_dec32le_aligned((const unsigned char *)msg + 60); + x3 ^= rk0F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p0 ^= x0; + p1 ^= x1; + p2 ^= x2; + p3 ^= x3; + rk10 = bee_dec32le_aligned((const unsigned char *)msg + 64); + x0 = pC ^ rk10; + rk11 = bee_dec32le_aligned((const unsigned char *)msg + 68); + x1 = pD ^ rk11; + rk12 = bee_dec32le_aligned((const unsigned char *)msg + 72); + x2 = pE ^ rk12; + rk13 = bee_dec32le_aligned((const unsigned char *)msg + 76); + x3 = pF ^ rk13; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk14 = bee_dec32le_aligned((const unsigned char *)msg + 80); + x0 ^= rk14; + rk15 = bee_dec32le_aligned((const unsigned char *)msg + 84); + x1 ^= rk15; + rk16 = bee_dec32le_aligned((const unsigned char *)msg + 88); + x2 ^= rk16; + rk17 = bee_dec32le_aligned((const unsigned char *)msg + 92); + x3 ^= rk17; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk18 = bee_dec32le_aligned((const unsigned char *)msg + 96); + x0 ^= rk18; + rk19 = bee_dec32le_aligned((const unsigned char *)msg + 100); + x1 ^= rk19; + rk1A = bee_dec32le_aligned((const unsigned char *)msg + 104); + x2 ^= rk1A; + rk1B = bee_dec32le_aligned((const unsigned char *)msg + 108); + x3 ^= rk1B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk1C = bee_dec32le_aligned((const unsigned char *)msg + 112); + x0 ^= rk1C; + rk1D = bee_dec32le_aligned((const unsigned char *)msg + 116); + x1 ^= rk1D; + rk1E = bee_dec32le_aligned((const unsigned char *)msg + 120); + x2 ^= rk1E; + rk1F = bee_dec32le_aligned((const unsigned char *)msg + 124); + x3 ^= rk1F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p8 ^= x0; + p9 ^= x1; + pA ^= x2; + pB ^= x3; + + for (r = 0; r < 3; r ++) { + /* round 1, 5, 9 */ + KEY_EXPAND_ELT(rk00, rk01, rk02, rk03); + rk00 ^= rk1C; + rk01 ^= rk1D; + rk02 ^= rk1E; + rk03 ^= rk1F; + if (r == 0) { + rk00 ^= sc->count0; + rk01 ^= sc->count1; + rk02 ^= sc->count2; + rk03 ^= BEE_T32(~sc->count3); + } + x0 = p0 ^ rk00; + x1 = p1 ^ rk01; + x2 = p2 ^ rk02; + x3 = p3 ^ rk03; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk04, rk05, rk06, rk07); + rk04 ^= rk00; + rk05 ^= rk01; + rk06 ^= rk02; + rk07 ^= rk03; + if (r == 1) { + rk04 ^= sc->count3; + rk05 ^= sc->count2; + rk06 ^= sc->count1; + rk07 ^= BEE_T32(~sc->count0); + } + x0 ^= rk04; + x1 ^= rk05; + x2 ^= rk06; + x3 ^= rk07; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk08, rk09, rk0A, rk0B); + rk08 ^= rk04; + rk09 ^= rk05; + rk0A ^= rk06; + rk0B ^= rk07; + x0 ^= rk08; + x1 ^= rk09; + x2 ^= rk0A; + x3 ^= rk0B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk0C, rk0D, rk0E, rk0F); + rk0C ^= rk08; + rk0D ^= rk09; + rk0E ^= rk0A; + rk0F ^= rk0B; + x0 ^= rk0C; + x1 ^= rk0D; + x2 ^= rk0E; + x3 ^= rk0F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + pC ^= x0; + pD ^= x1; + pE ^= x2; + pF ^= x3; + KEY_EXPAND_ELT(rk10, rk11, rk12, rk13); + rk10 ^= rk0C; + rk11 ^= rk0D; + rk12 ^= rk0E; + rk13 ^= rk0F; + x0 = p8 ^ rk10; + x1 = p9 ^ rk11; + x2 = pA ^ rk12; + x3 = pB ^ rk13; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk14, rk15, rk16, rk17); + rk14 ^= rk10; + rk15 ^= rk11; + rk16 ^= rk12; + rk17 ^= rk13; + x0 ^= rk14; + x1 ^= rk15; + x2 ^= rk16; + x3 ^= rk17; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk18, rk19, rk1A, rk1B); + rk18 ^= rk14; + rk19 ^= rk15; + rk1A ^= rk16; + rk1B ^= rk17; + x0 ^= rk18; + x1 ^= rk19; + x2 ^= rk1A; + x3 ^= rk1B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk1C, rk1D, rk1E, rk1F); + rk1C ^= rk18; + rk1D ^= rk19; + rk1E ^= rk1A; + rk1F ^= rk1B; + if (r == 2) { + rk1C ^= sc->count2; + rk1D ^= sc->count3; + rk1E ^= sc->count0; + rk1F ^= BEE_T32(~sc->count1); + } + x0 ^= rk1C; + x1 ^= rk1D; + x2 ^= rk1E; + x3 ^= rk1F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p4 ^= x0; + p5 ^= x1; + p6 ^= x2; + p7 ^= x3; + /* round 2, 6, 10 */ + rk00 ^= rk19; + x0 = pC ^ rk00; + rk01 ^= rk1A; + x1 = pD ^ rk01; + rk02 ^= rk1B; + x2 = pE ^ rk02; + rk03 ^= rk1C; + x3 = pF ^ rk03; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk04 ^= rk1D; + x0 ^= rk04; + rk05 ^= rk1E; + x1 ^= rk05; + rk06 ^= rk1F; + x2 ^= rk06; + rk07 ^= rk00; + x3 ^= rk07; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk08 ^= rk01; + x0 ^= rk08; + rk09 ^= rk02; + x1 ^= rk09; + rk0A ^= rk03; + x2 ^= rk0A; + rk0B ^= rk04; + x3 ^= rk0B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk0C ^= rk05; + x0 ^= rk0C; + rk0D ^= rk06; + x1 ^= rk0D; + rk0E ^= rk07; + x2 ^= rk0E; + rk0F ^= rk08; + x3 ^= rk0F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p8 ^= x0; + p9 ^= x1; + pA ^= x2; + pB ^= x3; + rk10 ^= rk09; + x0 = p4 ^ rk10; + rk11 ^= rk0A; + x1 = p5 ^ rk11; + rk12 ^= rk0B; + x2 = p6 ^ rk12; + rk13 ^= rk0C; + x3 = p7 ^ rk13; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk14 ^= rk0D; + x0 ^= rk14; + rk15 ^= rk0E; + x1 ^= rk15; + rk16 ^= rk0F; + x2 ^= rk16; + rk17 ^= rk10; + x3 ^= rk17; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk18 ^= rk11; + x0 ^= rk18; + rk19 ^= rk12; + x1 ^= rk19; + rk1A ^= rk13; + x2 ^= rk1A; + rk1B ^= rk14; + x3 ^= rk1B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk1C ^= rk15; + x0 ^= rk1C; + rk1D ^= rk16; + x1 ^= rk1D; + rk1E ^= rk17; + x2 ^= rk1E; + rk1F ^= rk18; + x3 ^= rk1F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p0 ^= x0; + p1 ^= x1; + p2 ^= x2; + p3 ^= x3; + /* round 3, 7, 11 */ + KEY_EXPAND_ELT(rk00, rk01, rk02, rk03); + rk00 ^= rk1C; + rk01 ^= rk1D; + rk02 ^= rk1E; + rk03 ^= rk1F; + x0 = p8 ^ rk00; + x1 = p9 ^ rk01; + x2 = pA ^ rk02; + x3 = pB ^ rk03; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk04, rk05, rk06, rk07); + rk04 ^= rk00; + rk05 ^= rk01; + rk06 ^= rk02; + rk07 ^= rk03; + x0 ^= rk04; + x1 ^= rk05; + x2 ^= rk06; + x3 ^= rk07; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk08, rk09, rk0A, rk0B); + rk08 ^= rk04; + rk09 ^= rk05; + rk0A ^= rk06; + rk0B ^= rk07; + x0 ^= rk08; + x1 ^= rk09; + x2 ^= rk0A; + x3 ^= rk0B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk0C, rk0D, rk0E, rk0F); + rk0C ^= rk08; + rk0D ^= rk09; + rk0E ^= rk0A; + rk0F ^= rk0B; + x0 ^= rk0C; + x1 ^= rk0D; + x2 ^= rk0E; + x3 ^= rk0F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p4 ^= x0; + p5 ^= x1; + p6 ^= x2; + p7 ^= x3; + KEY_EXPAND_ELT(rk10, rk11, rk12, rk13); + rk10 ^= rk0C; + rk11 ^= rk0D; + rk12 ^= rk0E; + rk13 ^= rk0F; + x0 = p0 ^ rk10; + x1 = p1 ^ rk11; + x2 = p2 ^ rk12; + x3 = p3 ^ rk13; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk14, rk15, rk16, rk17); + rk14 ^= rk10; + rk15 ^= rk11; + rk16 ^= rk12; + rk17 ^= rk13; + x0 ^= rk14; + x1 ^= rk15; + x2 ^= rk16; + x3 ^= rk17; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk18, rk19, rk1A, rk1B); + rk18 ^= rk14; + rk19 ^= rk15; + rk1A ^= rk16; + rk1B ^= rk17; + x0 ^= rk18; + x1 ^= rk19; + x2 ^= rk1A; + x3 ^= rk1B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk1C, rk1D, rk1E, rk1F); + rk1C ^= rk18; + rk1D ^= rk19; + rk1E ^= rk1A; + rk1F ^= rk1B; + x0 ^= rk1C; + x1 ^= rk1D; + x2 ^= rk1E; + x3 ^= rk1F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + pC ^= x0; + pD ^= x1; + pE ^= x2; + pF ^= x3; + /* round 4, 8, 12 */ + rk00 ^= rk19; + x0 = p4 ^ rk00; + rk01 ^= rk1A; + x1 = p5 ^ rk01; + rk02 ^= rk1B; + x2 = p6 ^ rk02; + rk03 ^= rk1C; + x3 = p7 ^ rk03; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk04 ^= rk1D; + x0 ^= rk04; + rk05 ^= rk1E; + x1 ^= rk05; + rk06 ^= rk1F; + x2 ^= rk06; + rk07 ^= rk00; + x3 ^= rk07; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk08 ^= rk01; + x0 ^= rk08; + rk09 ^= rk02; + x1 ^= rk09; + rk0A ^= rk03; + x2 ^= rk0A; + rk0B ^= rk04; + x3 ^= rk0B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk0C ^= rk05; + x0 ^= rk0C; + rk0D ^= rk06; + x1 ^= rk0D; + rk0E ^= rk07; + x2 ^= rk0E; + rk0F ^= rk08; + x3 ^= rk0F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p0 ^= x0; + p1 ^= x1; + p2 ^= x2; + p3 ^= x3; + rk10 ^= rk09; + x0 = pC ^ rk10; + rk11 ^= rk0A; + x1 = pD ^ rk11; + rk12 ^= rk0B; + x2 = pE ^ rk12; + rk13 ^= rk0C; + x3 = pF ^ rk13; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk14 ^= rk0D; + x0 ^= rk14; + rk15 ^= rk0E; + x1 ^= rk15; + rk16 ^= rk0F; + x2 ^= rk16; + rk17 ^= rk10; + x3 ^= rk17; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk18 ^= rk11; + x0 ^= rk18; + rk19 ^= rk12; + x1 ^= rk19; + rk1A ^= rk13; + x2 ^= rk1A; + rk1B ^= rk14; + x3 ^= rk1B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + rk1C ^= rk15; + x0 ^= rk1C; + rk1D ^= rk16; + x1 ^= rk1D; + rk1E ^= rk17; + x2 ^= rk1E; + rk1F ^= rk18; + x3 ^= rk1F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p8 ^= x0; + p9 ^= x1; + pA ^= x2; + pB ^= x3; + } + /* round 13 */ + KEY_EXPAND_ELT(rk00, rk01, rk02, rk03); + rk00 ^= rk1C; + rk01 ^= rk1D; + rk02 ^= rk1E; + rk03 ^= rk1F; + x0 = p0 ^ rk00; + x1 = p1 ^ rk01; + x2 = p2 ^ rk02; + x3 = p3 ^ rk03; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk04, rk05, rk06, rk07); + rk04 ^= rk00; + rk05 ^= rk01; + rk06 ^= rk02; + rk07 ^= rk03; + x0 ^= rk04; + x1 ^= rk05; + x2 ^= rk06; + x3 ^= rk07; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk08, rk09, rk0A, rk0B); + rk08 ^= rk04; + rk09 ^= rk05; + rk0A ^= rk06; + rk0B ^= rk07; + x0 ^= rk08; + x1 ^= rk09; + x2 ^= rk0A; + x3 ^= rk0B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk0C, rk0D, rk0E, rk0F); + rk0C ^= rk08; + rk0D ^= rk09; + rk0E ^= rk0A; + rk0F ^= rk0B; + x0 ^= rk0C; + x1 ^= rk0D; + x2 ^= rk0E; + x3 ^= rk0F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + pC ^= x0; + pD ^= x1; + pE ^= x2; + pF ^= x3; + KEY_EXPAND_ELT(rk10, rk11, rk12, rk13); + rk10 ^= rk0C; + rk11 ^= rk0D; + rk12 ^= rk0E; + rk13 ^= rk0F; + x0 = p8 ^ rk10; + x1 = p9 ^ rk11; + x2 = pA ^ rk12; + x3 = pB ^ rk13; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk14, rk15, rk16, rk17); + rk14 ^= rk10; + rk15 ^= rk11; + rk16 ^= rk12; + rk17 ^= rk13; + x0 ^= rk14; + x1 ^= rk15; + x2 ^= rk16; + x3 ^= rk17; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk18, rk19, rk1A, rk1B); + rk18 ^= rk14 ^ sc->count1; + rk19 ^= rk15 ^ sc->count0; + rk1A ^= rk16 ^ sc->count3; + rk1B ^= rk17 ^ BEE_T32(~sc->count2); + x0 ^= rk18; + x1 ^= rk19; + x2 ^= rk1A; + x3 ^= rk1B; + AES_ROUND_NOKEY(x0, x1, x2, x3); + KEY_EXPAND_ELT(rk1C, rk1D, rk1E, rk1F); + rk1C ^= rk18; + rk1D ^= rk19; + rk1E ^= rk1A; + rk1F ^= rk1B; + x0 ^= rk1C; + x1 ^= rk1D; + x2 ^= rk1E; + x3 ^= rk1F; + AES_ROUND_NOKEY(x0, x1, x2, x3); + p4 ^= x0; + p5 ^= x1; + p6 ^= x2; + p7 ^= x3; + sc->h[0x0] ^= p8; + sc->h[0x1] ^= p9; + sc->h[0x2] ^= pA; + sc->h[0x3] ^= pB; + sc->h[0x4] ^= pC; + sc->h[0x5] ^= pD; + sc->h[0x6] ^= pE; + sc->h[0x7] ^= pF; + sc->h[0x8] ^= p0; + sc->h[0x9] ^= p1; + sc->h[0xA] ^= p2; + sc->h[0xB] ^= p3; + sc->h[0xC] ^= p4; + sc->h[0xD] ^= p5; + sc->h[0xE] ^= p6; + sc->h[0xF] ^= p7; +} + + + +static void four_init(facet_four_context *sc, const bee_u32 *iv) +{ + memcpy(sc->h, iv, sizeof sc->h); + sc->ptr = 0; + sc->count0 = 0; + sc->count1 = 0; + sc->count2 = 0; + sc->count3 = 0; +} + +static void four_core(facet_four_context *sc, const void *data, size_t len) +{ + unsigned char *buf; + size_t ptr; + + buf = sc->buf; + ptr = sc->ptr; + while (len > 0) { + size_t clen; + + clen = (sizeof sc->buf) - ptr; + if (clen > len) + clen = len; + memcpy(buf + ptr, data, clen); + data = (const unsigned char *)data + clen; + ptr += clen; + len -= clen; + if (ptr == sizeof sc->buf) { + if ((sc->count0 = BEE_T32(sc->count0 + 1024)) == 0) { + sc->count1 = BEE_T32(sc->count1 + 1); + if (sc->count1 == 0) { + sc->count2 = BEE_T32(sc->count2 + 1); + if (sc->count2 == 0) { + sc->count3 = BEE_T32( + sc->count3 + 1); + } + } + } + c512(sc, buf); + ptr = 0; + } + } + sc->ptr = ptr; +} + +static void four_close(facet_four_context *sc, unsigned ub, unsigned n, void *dst, size_t out_size_w32) +{ + unsigned char *buf; + size_t ptr, u; + unsigned z; + bee_u32 count0, count1, count2, count3; + + buf = sc->buf; + ptr = sc->ptr; + count0 = (sc->count0 += (ptr << 3) + n); + count1 = sc->count1; + count2 = sc->count2; + count3 = sc->count3; + z = 0x80 >> n; + z = ((ub & -z) | z) & 0xFF; + if (ptr == 0 && n == 0) { + buf[0] = 0x80; + memset(buf + 1, 0, 109); + sc->count0 = sc->count1 = sc->count2 = sc->count3 = 0; + } else if (ptr < 110) { + buf[ptr ++] = z; + memset(buf + ptr, 0, 110 - ptr); + } else { + buf[ptr ++] = z; + memset(buf + ptr, 0, 128 - ptr); + c512(sc, buf); + memset(buf, 0, 110); + sc->count0 = sc->count1 = sc->count2 = sc->count3 = 0; + } + bee_enc32le(buf + 110, count0); + bee_enc32le(buf + 114, count1); + bee_enc32le(buf + 118, count2); + bee_enc32le(buf + 122, count3); + buf[126] = out_size_w32 << 5; + buf[127] = out_size_w32 >> 3; + c512(sc, buf); + for (u = 0; u < out_size_w32; u ++) + bee_enc32le((unsigned char *)dst + (u << 2), sc->h[u]); +} + + +/* see facet_four.h */ +void facet_four_init(void *cc) +{ + four_init(cc, IV512); +} + +/* see facet_four.h */ +void facet_four(void *cc, const void *data, size_t len) +{ + four_core(cc, data, len); +} + +/* see facet_four.h */ +void facet_four_close(void *cc, void *dst) +{ + four_close(cc, 0, 0, dst, 16); + four_init(cc, IV512); +} + +/* see facet_four.h */ +void facet_four_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + four_close(cc, ub, n, dst, 16); + four_init(cc, IV512); +} + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/stratum/algos/honeycomb/facet_four.h b/stratum/algos/honeycomb/facet_four.h new file mode 100644 index 000000000..36c524823 --- /dev/null +++ b/stratum/algos/honeycomb/facet_four.h @@ -0,0 +1,76 @@ +#ifndef FACET_FOUR_H +#define FACET_FOUR_H + +#include +#include "honeycomb_types.h" + +#ifdef __cplusplus + extern "C"{ +#endif + +//#undef BEE_64 // + +/** + * This structure is a context for HoneyComb Facet #4 computations: + * it contains the intermediate values and some data from the last + * entered block. Once a HoneyComb Facet #4 computation has been performed, the + * context can be reused for another computation. + * + * The contents of this structure are private. A running HoneyComb Facet #4 + * computation can be cloned by copying the context (e.g. with a simple memcpy() ). + */ +typedef struct{ + unsigned char buf[128]; /* first field, for alignment */ + size_t ptr; + bee_u32 h[16]; + bee_u32 count0, count1, count2, count3; +}facet_four_context; + + +/** + * Initialize a HoneyComb Facet #4 context. This process performs no memory allocation. + * + * @param cc the HoneyComb Facet #4 context (pointer to a facet_four_context) + */ +void facet_four_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the HoneyComb Facet #4 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void facet_four(void *cc, const void *data, size_t len); + +/** + * Terminate the current HoneyComb Facet #4 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (64 bytes). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #4 context + * @param dst the destination buffer + */ +void facet_four_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (64 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte level). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #4 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void facet_four_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/honeycomb/facet_one.c b/stratum/algos/honeycomb/facet_one.c new file mode 100644 index 000000000..4e4f50876 --- /dev/null +++ b/stratum/algos/honeycomb/facet_one.c @@ -0,0 +1,1702 @@ + +#include +#include + +#include "facet_one.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +/* + * Parameters: + * + * BEE_KECCAK_64 use a 64-bit type + * BEE_KECCAK_UNROLL number of loops to unroll (0/undef for full unroll) + * BEE_KECCAK_INTERLEAVE use bit-interleaving (32-bit type only) + * BEE_KECCAK_NOCOPY do not copy the state into local variables + * + * If there is no usable 64-bit type, the code automatically switches + * back to the 32-bit implementation. + * + * Some tests on an Intel Core2 Q6600 (both 64-bit and 32-bit, 32 kB L1 + * code cache), a PowerPC (G3, 32 kB L1 code cache), an ARM920T core + * (16 kB L1 code cache), and a small MIPS-compatible CPU (Broadcom BCM3302, + * 8 kB L1 code cache), seem to show that the following are optimal: + * + * -- x86, 64-bit: use the 64-bit implementation, unroll 8 rounds, + * do not copy the state; unrolling 2, 6 or all rounds also provides + * near-optimal performance. + * -- x86, 32-bit: use the 32-bit implementation, unroll 6 rounds, + * interleave, do not copy the state. Unrolling 1, 2, 4 or 8 rounds + * also provides near-optimal performance. + * -- PowerPC: use the 64-bit implementation, unroll 8 rounds, + * copy the state. Unrolling 4 or 6 rounds is near-optimal. + * -- ARM: use the 64-bit implementation, unroll 2 or 4 rounds, + * copy the state. + * -- MIPS: use the 64-bit implementation, unroll 2 rounds, copy + * the state. Unrolling only 1 round is also near-optimal. + * + * Also, interleaving does not always yield actual improvements when + * using a 32-bit implementation; in particular when the architecture + * does not offer a native rotation opcode (interleaving replaces one + * 64-bit rotation with two 32-bit rotations, which is a gain only if + * there is a native 32-bit rotation opcode and not a native 64-bit + * rotation opcode; also, interleaving implies a small overhead when + * processing input words). + * + * To sum up: + * -- when possible, use the 64-bit code + * -- exception: on 32-bit x86, use 32-bit code + * -- when using 32-bit code, use interleaving + * -- copy the state, except on x86 + * -- unroll 8 rounds on "big" machine, 2 rounds on "small" machines + */ + +#if BEE_SMALL_FOOTPRINT && !defined BEE_SMALL_FOOTPRINT_KECCAK + #define BEE_SMALL_FOOTPRINT_KECCAK 1 +#endif + +/* + * By default, we select the 64-bit implementation if a 64-bit type + * is available, unless a 32-bit x86 is detected. + */ +#if !defined BEE_KECCAK_64 && BEE_64 && !(defined __i386__ || BEE_I386_GCC || BEE_I386_MSVC ) + #define BEE_KECCAK_64 1 +#endif + +/* + * If using a 32-bit implementation, we prefer to interleave. + */ +#if !BEE_KECCAK_64 && !defined BEE_KECCAK_INTERLEAVE + #define BEE_KECCAK_INTERLEAVE 1 +#endif + +/* + * Unroll 8 rounds on big systems, 2 rounds on small systems. + */ +#ifndef BEE_KECCAK_UNROLL + #if BEE_SMALL_FOOTPRINT_KECCAK + #define BEE_KECCAK_UNROLL 2 + #else + #define BEE_KECCAK_UNROLL 8 + #endif +#endif + +/* + * We do not want to copy the state to local variables on x86 (32-bit and 64-bit alike). + */ +#ifndef BEE_KECCAK_NOCOPY + #if defined __i386__ || defined __x86_64 || BEE_I386_MSVC || BEE_I386_GCC + #define BEE_KECCAK_NOCOPY 1 + #else + #define BEE_KECCAK_NOCOPY 0 + #endif +#endif + +#ifdef _MSC_VER + #pragma warning (disable: 4146) +#endif + +#if BEE_KECCAK_64 + +static const bee_u64 RC[] = { + BEE_C64(0x0000000000000001), BEE_C64(0x0000000000008082), + BEE_C64(0x800000000000808A), BEE_C64(0x8000000080008000), + BEE_C64(0x000000000000808B), BEE_C64(0x0000000080000001), + BEE_C64(0x8000000080008081), BEE_C64(0x8000000000008009), + BEE_C64(0x000000000000008A), BEE_C64(0x0000000000000088), + BEE_C64(0x0000000080008009), BEE_C64(0x000000008000000A), + BEE_C64(0x000000008000808B), BEE_C64(0x800000000000008B), + BEE_C64(0x8000000000008089), BEE_C64(0x8000000000008003), + BEE_C64(0x8000000000008002), BEE_C64(0x8000000000000080), + BEE_C64(0x000000000000800A), BEE_C64(0x800000008000000A), + BEE_C64(0x8000000080008081), BEE_C64(0x8000000000008080), + BEE_C64(0x0000000080000001), BEE_C64(0x8000000080008008) +}; + +#if BEE_KECCAK_NOCOPY + +#define a00 (kc->u.wide[ 0]) +#define a10 (kc->u.wide[ 1]) +#define a20 (kc->u.wide[ 2]) +#define a30 (kc->u.wide[ 3]) +#define a40 (kc->u.wide[ 4]) +#define a01 (kc->u.wide[ 5]) +#define a11 (kc->u.wide[ 6]) +#define a21 (kc->u.wide[ 7]) +#define a31 (kc->u.wide[ 8]) +#define a41 (kc->u.wide[ 9]) +#define a02 (kc->u.wide[10]) +#define a12 (kc->u.wide[11]) +#define a22 (kc->u.wide[12]) +#define a32 (kc->u.wide[13]) +#define a42 (kc->u.wide[14]) +#define a03 (kc->u.wide[15]) +#define a13 (kc->u.wide[16]) +#define a23 (kc->u.wide[17]) +#define a33 (kc->u.wide[18]) +#define a43 (kc->u.wide[19]) +#define a04 (kc->u.wide[20]) +#define a14 (kc->u.wide[21]) +#define a24 (kc->u.wide[22]) +#define a34 (kc->u.wide[23]) +#define a44 (kc->u.wide[24]) + +#define DECL_STATE +#define READ_STATE(sc) +#define WRITE_STATE(sc) + +#define INPUT_BUF(size) do { \ + size_t j; \ + for (j = 0; j < (size); j += 8) { \ + kc->u.wide[j >> 3] ^= bee_dec64le_aligned(buf + j); \ + } \ + } while (0) + +#define INPUT_BUF144 INPUT_BUF(144) +#define INPUT_BUF136 INPUT_BUF(136) +#define INPUT_BUF104 INPUT_BUF(104) +#define INPUT_BUF72 INPUT_BUF(72) + +#else + +#define DECL_STATE \ + bee_u64 a00, a01, a02, a03, a04; \ + bee_u64 a10, a11, a12, a13, a14; \ + bee_u64 a20, a21, a22, a23, a24; \ + bee_u64 a30, a31, a32, a33, a34; \ + bee_u64 a40, a41, a42, a43, a44; + +#define READ_STATE(state) do { \ + a00 = (state)->u.wide[ 0]; \ + a10 = (state)->u.wide[ 1]; \ + a20 = (state)->u.wide[ 2]; \ + a30 = (state)->u.wide[ 3]; \ + a40 = (state)->u.wide[ 4]; \ + a01 = (state)->u.wide[ 5]; \ + a11 = (state)->u.wide[ 6]; \ + a21 = (state)->u.wide[ 7]; \ + a31 = (state)->u.wide[ 8]; \ + a41 = (state)->u.wide[ 9]; \ + a02 = (state)->u.wide[10]; \ + a12 = (state)->u.wide[11]; \ + a22 = (state)->u.wide[12]; \ + a32 = (state)->u.wide[13]; \ + a42 = (state)->u.wide[14]; \ + a03 = (state)->u.wide[15]; \ + a13 = (state)->u.wide[16]; \ + a23 = (state)->u.wide[17]; \ + a33 = (state)->u.wide[18]; \ + a43 = (state)->u.wide[19]; \ + a04 = (state)->u.wide[20]; \ + a14 = (state)->u.wide[21]; \ + a24 = (state)->u.wide[22]; \ + a34 = (state)->u.wide[23]; \ + a44 = (state)->u.wide[24]; \ + } while (0) + +#define WRITE_STATE(state) do { \ + (state)->u.wide[ 0] = a00; \ + (state)->u.wide[ 1] = a10; \ + (state)->u.wide[ 2] = a20; \ + (state)->u.wide[ 3] = a30; \ + (state)->u.wide[ 4] = a40; \ + (state)->u.wide[ 5] = a01; \ + (state)->u.wide[ 6] = a11; \ + (state)->u.wide[ 7] = a21; \ + (state)->u.wide[ 8] = a31; \ + (state)->u.wide[ 9] = a41; \ + (state)->u.wide[10] = a02; \ + (state)->u.wide[11] = a12; \ + (state)->u.wide[12] = a22; \ + (state)->u.wide[13] = a32; \ + (state)->u.wide[14] = a42; \ + (state)->u.wide[15] = a03; \ + (state)->u.wide[16] = a13; \ + (state)->u.wide[17] = a23; \ + (state)->u.wide[18] = a33; \ + (state)->u.wide[19] = a43; \ + (state)->u.wide[20] = a04; \ + (state)->u.wide[21] = a14; \ + (state)->u.wide[22] = a24; \ + (state)->u.wide[23] = a34; \ + (state)->u.wide[24] = a44; \ + } while (0) + +#define INPUT_BUF144 do { \ + a00 ^= bee_dec64le_aligned(buf + 0); \ + a10 ^= bee_dec64le_aligned(buf + 8); \ + a20 ^= bee_dec64le_aligned(buf + 16); \ + a30 ^= bee_dec64le_aligned(buf + 24); \ + a40 ^= bee_dec64le_aligned(buf + 32); \ + a01 ^= bee_dec64le_aligned(buf + 40); \ + a11 ^= bee_dec64le_aligned(buf + 48); \ + a21 ^= bee_dec64le_aligned(buf + 56); \ + a31 ^= bee_dec64le_aligned(buf + 64); \ + a41 ^= bee_dec64le_aligned(buf + 72); \ + a02 ^= bee_dec64le_aligned(buf + 80); \ + a12 ^= bee_dec64le_aligned(buf + 88); \ + a22 ^= bee_dec64le_aligned(buf + 96); \ + a32 ^= bee_dec64le_aligned(buf + 104); \ + a42 ^= bee_dec64le_aligned(buf + 112); \ + a03 ^= bee_dec64le_aligned(buf + 120); \ + a13 ^= bee_dec64le_aligned(buf + 128); \ + a23 ^= bee_dec64le_aligned(buf + 136); \ + } while (0) + +#define INPUT_BUF136 do { \ + a00 ^= bee_dec64le_aligned(buf + 0); \ + a10 ^= bee_dec64le_aligned(buf + 8); \ + a20 ^= bee_dec64le_aligned(buf + 16); \ + a30 ^= bee_dec64le_aligned(buf + 24); \ + a40 ^= bee_dec64le_aligned(buf + 32); \ + a01 ^= bee_dec64le_aligned(buf + 40); \ + a11 ^= bee_dec64le_aligned(buf + 48); \ + a21 ^= bee_dec64le_aligned(buf + 56); \ + a31 ^= bee_dec64le_aligned(buf + 64); \ + a41 ^= bee_dec64le_aligned(buf + 72); \ + a02 ^= bee_dec64le_aligned(buf + 80); \ + a12 ^= bee_dec64le_aligned(buf + 88); \ + a22 ^= bee_dec64le_aligned(buf + 96); \ + a32 ^= bee_dec64le_aligned(buf + 104); \ + a42 ^= bee_dec64le_aligned(buf + 112); \ + a03 ^= bee_dec64le_aligned(buf + 120); \ + a13 ^= bee_dec64le_aligned(buf + 128); \ + } while (0) + +#define INPUT_BUF104 do { \ + a00 ^= bee_dec64le_aligned(buf + 0); \ + a10 ^= bee_dec64le_aligned(buf + 8); \ + a20 ^= bee_dec64le_aligned(buf + 16); \ + a30 ^= bee_dec64le_aligned(buf + 24); \ + a40 ^= bee_dec64le_aligned(buf + 32); \ + a01 ^= bee_dec64le_aligned(buf + 40); \ + a11 ^= bee_dec64le_aligned(buf + 48); \ + a21 ^= bee_dec64le_aligned(buf + 56); \ + a31 ^= bee_dec64le_aligned(buf + 64); \ + a41 ^= bee_dec64le_aligned(buf + 72); \ + a02 ^= bee_dec64le_aligned(buf + 80); \ + a12 ^= bee_dec64le_aligned(buf + 88); \ + a22 ^= bee_dec64le_aligned(buf + 96); \ + } while (0) + +#define INPUT_BUF72 do { \ + a00 ^= bee_dec64le_aligned(buf + 0); \ + a10 ^= bee_dec64le_aligned(buf + 8); \ + a20 ^= bee_dec64le_aligned(buf + 16); \ + a30 ^= bee_dec64le_aligned(buf + 24); \ + a40 ^= bee_dec64le_aligned(buf + 32); \ + a01 ^= bee_dec64le_aligned(buf + 40); \ + a11 ^= bee_dec64le_aligned(buf + 48); \ + a21 ^= bee_dec64le_aligned(buf + 56); \ + a31 ^= bee_dec64le_aligned(buf + 64); \ + } while (0) + +#define INPUT_BUF(lim) do { \ + a00 ^= bee_dec64le_aligned(buf + 0); \ + a10 ^= bee_dec64le_aligned(buf + 8); \ + a20 ^= bee_dec64le_aligned(buf + 16); \ + a30 ^= bee_dec64le_aligned(buf + 24); \ + a40 ^= bee_dec64le_aligned(buf + 32); \ + a01 ^= bee_dec64le_aligned(buf + 40); \ + a11 ^= bee_dec64le_aligned(buf + 48); \ + a21 ^= bee_dec64le_aligned(buf + 56); \ + a31 ^= bee_dec64le_aligned(buf + 64); \ + if ((lim) == 72) \ + break; \ + a41 ^= bee_dec64le_aligned(buf + 72); \ + a02 ^= bee_dec64le_aligned(buf + 80); \ + a12 ^= bee_dec64le_aligned(buf + 88); \ + a22 ^= bee_dec64le_aligned(buf + 96); \ + if ((lim) == 104) \ + break; \ + a32 ^= bee_dec64le_aligned(buf + 104); \ + a42 ^= bee_dec64le_aligned(buf + 112); \ + a03 ^= bee_dec64le_aligned(buf + 120); \ + a13 ^= bee_dec64le_aligned(buf + 128); \ + if ((lim) == 136) \ + break; \ + a23 ^= bee_dec64le_aligned(buf + 136); \ + } while (0) + +#endif + +#define DECL64(x) bee_u64 x +#define MOV64(d, s) (d = s) +#define XOR64(d, a, b) (d = a ^ b) +#define AND64(d, a, b) (d = a & b) +#define OR64(d, a, b) (d = a | b) +#define NOT64(d, s) (d = BEE_T64(~s)) +#define ROL64(d, v, n) (d = BEE_ROTL64(v, n)) +#define XOR64_IOTA XOR64 + +#else + +static const struct { + bee_u32 high, low; +} RC[] = { +#if BEE_KECCAK_INTERLEAVE + { BEE_C32(0x00000000), BEE_C32(0x00000001) }, + { BEE_C32(0x00000089), BEE_C32(0x00000000) }, + { BEE_C32(0x8000008B), BEE_C32(0x00000000) }, + { BEE_C32(0x80008080), BEE_C32(0x00000000) }, + { BEE_C32(0x0000008B), BEE_C32(0x00000001) }, + { BEE_C32(0x00008000), BEE_C32(0x00000001) }, + { BEE_C32(0x80008088), BEE_C32(0x00000001) }, + { BEE_C32(0x80000082), BEE_C32(0x00000001) }, + { BEE_C32(0x0000000B), BEE_C32(0x00000000) }, + { BEE_C32(0x0000000A), BEE_C32(0x00000000) }, + { BEE_C32(0x00008082), BEE_C32(0x00000001) }, + { BEE_C32(0x00008003), BEE_C32(0x00000000) }, + { BEE_C32(0x0000808B), BEE_C32(0x00000001) }, + { BEE_C32(0x8000000B), BEE_C32(0x00000001) }, + { BEE_C32(0x8000008A), BEE_C32(0x00000001) }, + { BEE_C32(0x80000081), BEE_C32(0x00000001) }, + { BEE_C32(0x80000081), BEE_C32(0x00000000) }, + { BEE_C32(0x80000008), BEE_C32(0x00000000) }, + { BEE_C32(0x00000083), BEE_C32(0x00000000) }, + { BEE_C32(0x80008003), BEE_C32(0x00000000) }, + { BEE_C32(0x80008088), BEE_C32(0x00000001) }, + { BEE_C32(0x80000088), BEE_C32(0x00000000) }, + { BEE_C32(0x00008000), BEE_C32(0x00000001) }, + { BEE_C32(0x80008082), BEE_C32(0x00000000) } +#else + { BEE_C32(0x00000000), BEE_C32(0x00000001) }, + { BEE_C32(0x00000000), BEE_C32(0x00008082) }, + { BEE_C32(0x80000000), BEE_C32(0x0000808A) }, + { BEE_C32(0x80000000), BEE_C32(0x80008000) }, + { BEE_C32(0x00000000), BEE_C32(0x0000808B) }, + { BEE_C32(0x00000000), BEE_C32(0x80000001) }, + { BEE_C32(0x80000000), BEE_C32(0x80008081) }, + { BEE_C32(0x80000000), BEE_C32(0x00008009) }, + { BEE_C32(0x00000000), BEE_C32(0x0000008A) }, + { BEE_C32(0x00000000), BEE_C32(0x00000088) }, + { BEE_C32(0x00000000), BEE_C32(0x80008009) }, + { BEE_C32(0x00000000), BEE_C32(0x8000000A) }, + { BEE_C32(0x00000000), BEE_C32(0x8000808B) }, + { BEE_C32(0x80000000), BEE_C32(0x0000008B) }, + { BEE_C32(0x80000000), BEE_C32(0x00008089) }, + { BEE_C32(0x80000000), BEE_C32(0x00008003) }, + { BEE_C32(0x80000000), BEE_C32(0x00008002) }, + { BEE_C32(0x80000000), BEE_C32(0x00000080) }, + { BEE_C32(0x00000000), BEE_C32(0x0000800A) }, + { BEE_C32(0x80000000), BEE_C32(0x8000000A) }, + { BEE_C32(0x80000000), BEE_C32(0x80008081) }, + { BEE_C32(0x80000000), BEE_C32(0x00008080) }, + { BEE_C32(0x00000000), BEE_C32(0x80000001) }, + { BEE_C32(0x80000000), BEE_C32(0x80008008) } +#endif +}; + +#if BEE_KECCAK_INTERLEAVE + +#define INTERLEAVE(xl, xh) do { \ + bee_u32 l, h, t; \ + l = (xl); h = (xh); \ + t = (l ^ (l >> 1)) & BEE_C32(0x22222222); l ^= t ^ (t << 1); \ + t = (h ^ (h >> 1)) & BEE_C32(0x22222222); h ^= t ^ (t << 1); \ + t = (l ^ (l >> 2)) & BEE_C32(0x0C0C0C0C); l ^= t ^ (t << 2); \ + t = (h ^ (h >> 2)) & BEE_C32(0x0C0C0C0C); h ^= t ^ (t << 2); \ + t = (l ^ (l >> 4)) & BEE_C32(0x00F000F0); l ^= t ^ (t << 4); \ + t = (h ^ (h >> 4)) & BEE_C32(0x00F000F0); h ^= t ^ (t << 4); \ + t = (l ^ (l >> 8)) & BEE_C32(0x0000FF00); l ^= t ^ (t << 8); \ + t = (h ^ (h >> 8)) & BEE_C32(0x0000FF00); h ^= t ^ (t << 8); \ + t = (l ^ BEE_T32(h << 16)) & BEE_C32(0xFFFF0000); \ + l ^= t; h ^= t >> 16; \ + (xl) = l; (xh) = h; \ + } while (0) + +#define UNINTERLEAVE(xl, xh) do { \ + bee_u32 l, h, t; \ + l = (xl); h = (xh); \ + t = (l ^ BEE_T32(h << 16)) & BEE_C32(0xFFFF0000); \ + l ^= t; h ^= t >> 16; \ + t = (l ^ (l >> 8)) & BEE_C32(0x0000FF00); l ^= t ^ (t << 8); \ + t = (h ^ (h >> 8)) & BEE_C32(0x0000FF00); h ^= t ^ (t << 8); \ + t = (l ^ (l >> 4)) & BEE_C32(0x00F000F0); l ^= t ^ (t << 4); \ + t = (h ^ (h >> 4)) & BEE_C32(0x00F000F0); h ^= t ^ (t << 4); \ + t = (l ^ (l >> 2)) & BEE_C32(0x0C0C0C0C); l ^= t ^ (t << 2); \ + t = (h ^ (h >> 2)) & BEE_C32(0x0C0C0C0C); h ^= t ^ (t << 2); \ + t = (l ^ (l >> 1)) & BEE_C32(0x22222222); l ^= t ^ (t << 1); \ + t = (h ^ (h >> 1)) & BEE_C32(0x22222222); h ^= t ^ (t << 1); \ + (xl) = l; (xh) = h; \ + } while (0) + +#else + +#define INTERLEAVE(l, h) +#define UNINTERLEAVE(l, h) + +#endif + +#if BEE_KECCAK_NOCOPY + +#define a00l (kc->u.narrow[2 * 0 + 0]) +#define a00h (kc->u.narrow[2 * 0 + 1]) +#define a10l (kc->u.narrow[2 * 1 + 0]) +#define a10h (kc->u.narrow[2 * 1 + 1]) +#define a20l (kc->u.narrow[2 * 2 + 0]) +#define a20h (kc->u.narrow[2 * 2 + 1]) +#define a30l (kc->u.narrow[2 * 3 + 0]) +#define a30h (kc->u.narrow[2 * 3 + 1]) +#define a40l (kc->u.narrow[2 * 4 + 0]) +#define a40h (kc->u.narrow[2 * 4 + 1]) +#define a01l (kc->u.narrow[2 * 5 + 0]) +#define a01h (kc->u.narrow[2 * 5 + 1]) +#define a11l (kc->u.narrow[2 * 6 + 0]) +#define a11h (kc->u.narrow[2 * 6 + 1]) +#define a21l (kc->u.narrow[2 * 7 + 0]) +#define a21h (kc->u.narrow[2 * 7 + 1]) +#define a31l (kc->u.narrow[2 * 8 + 0]) +#define a31h (kc->u.narrow[2 * 8 + 1]) +#define a41l (kc->u.narrow[2 * 9 + 0]) +#define a41h (kc->u.narrow[2 * 9 + 1]) +#define a02l (kc->u.narrow[2 * 10 + 0]) +#define a02h (kc->u.narrow[2 * 10 + 1]) +#define a12l (kc->u.narrow[2 * 11 + 0]) +#define a12h (kc->u.narrow[2 * 11 + 1]) +#define a22l (kc->u.narrow[2 * 12 + 0]) +#define a22h (kc->u.narrow[2 * 12 + 1]) +#define a32l (kc->u.narrow[2 * 13 + 0]) +#define a32h (kc->u.narrow[2 * 13 + 1]) +#define a42l (kc->u.narrow[2 * 14 + 0]) +#define a42h (kc->u.narrow[2 * 14 + 1]) +#define a03l (kc->u.narrow[2 * 15 + 0]) +#define a03h (kc->u.narrow[2 * 15 + 1]) +#define a13l (kc->u.narrow[2 * 16 + 0]) +#define a13h (kc->u.narrow[2 * 16 + 1]) +#define a23l (kc->u.narrow[2 * 17 + 0]) +#define a23h (kc->u.narrow[2 * 17 + 1]) +#define a33l (kc->u.narrow[2 * 18 + 0]) +#define a33h (kc->u.narrow[2 * 18 + 1]) +#define a43l (kc->u.narrow[2 * 19 + 0]) +#define a43h (kc->u.narrow[2 * 19 + 1]) +#define a04l (kc->u.narrow[2 * 20 + 0]) +#define a04h (kc->u.narrow[2 * 20 + 1]) +#define a14l (kc->u.narrow[2 * 21 + 0]) +#define a14h (kc->u.narrow[2 * 21 + 1]) +#define a24l (kc->u.narrow[2 * 22 + 0]) +#define a24h (kc->u.narrow[2 * 22 + 1]) +#define a34l (kc->u.narrow[2 * 23 + 0]) +#define a34h (kc->u.narrow[2 * 23 + 1]) +#define a44l (kc->u.narrow[2 * 24 + 0]) +#define a44h (kc->u.narrow[2 * 24 + 1]) + +#define DECL_STATE +#define READ_STATE(state) +#define WRITE_STATE(state) + +#define INPUT_BUF(size) do { \ + size_t j; \ + for (j = 0; j < (size); j += 8) { \ + bee_u32 tl, th; \ + tl = bee_dec32le_aligned(buf + j + 0); \ + th = bee_dec32le_aligned(buf + j + 4); \ + INTERLEAVE(tl, th); \ + kc->u.narrow[(j >> 2) + 0] ^= tl; \ + kc->u.narrow[(j >> 2) + 1] ^= th; \ + } \ + } while (0) + +#define INPUT_BUF144 INPUT_BUF(144) +#define INPUT_BUF136 INPUT_BUF(136) +#define INPUT_BUF104 INPUT_BUF(104) +#define INPUT_BUF72 INPUT_BUF(72) + +#else + +#define DECL_STATE \ + bee_u32 a00l, a00h, a01l, a01h, a02l, a02h, a03l, a03h, a04l, a04h; \ + bee_u32 a10l, a10h, a11l, a11h, a12l, a12h, a13l, a13h, a14l, a14h; \ + bee_u32 a20l, a20h, a21l, a21h, a22l, a22h, a23l, a23h, a24l, a24h; \ + bee_u32 a30l, a30h, a31l, a31h, a32l, a32h, a33l, a33h, a34l, a34h; \ + bee_u32 a40l, a40h, a41l, a41h, a42l, a42h, a43l, a43h, a44l, a44h; + +#define READ_STATE(state) do { \ + a00l = (state)->u.narrow[2 * 0 + 0]; \ + a00h = (state)->u.narrow[2 * 0 + 1]; \ + a10l = (state)->u.narrow[2 * 1 + 0]; \ + a10h = (state)->u.narrow[2 * 1 + 1]; \ + a20l = (state)->u.narrow[2 * 2 + 0]; \ + a20h = (state)->u.narrow[2 * 2 + 1]; \ + a30l = (state)->u.narrow[2 * 3 + 0]; \ + a30h = (state)->u.narrow[2 * 3 + 1]; \ + a40l = (state)->u.narrow[2 * 4 + 0]; \ + a40h = (state)->u.narrow[2 * 4 + 1]; \ + a01l = (state)->u.narrow[2 * 5 + 0]; \ + a01h = (state)->u.narrow[2 * 5 + 1]; \ + a11l = (state)->u.narrow[2 * 6 + 0]; \ + a11h = (state)->u.narrow[2 * 6 + 1]; \ + a21l = (state)->u.narrow[2 * 7 + 0]; \ + a21h = (state)->u.narrow[2 * 7 + 1]; \ + a31l = (state)->u.narrow[2 * 8 + 0]; \ + a31h = (state)->u.narrow[2 * 8 + 1]; \ + a41l = (state)->u.narrow[2 * 9 + 0]; \ + a41h = (state)->u.narrow[2 * 9 + 1]; \ + a02l = (state)->u.narrow[2 * 10 + 0]; \ + a02h = (state)->u.narrow[2 * 10 + 1]; \ + a12l = (state)->u.narrow[2 * 11 + 0]; \ + a12h = (state)->u.narrow[2 * 11 + 1]; \ + a22l = (state)->u.narrow[2 * 12 + 0]; \ + a22h = (state)->u.narrow[2 * 12 + 1]; \ + a32l = (state)->u.narrow[2 * 13 + 0]; \ + a32h = (state)->u.narrow[2 * 13 + 1]; \ + a42l = (state)->u.narrow[2 * 14 + 0]; \ + a42h = (state)->u.narrow[2 * 14 + 1]; \ + a03l = (state)->u.narrow[2 * 15 + 0]; \ + a03h = (state)->u.narrow[2 * 15 + 1]; \ + a13l = (state)->u.narrow[2 * 16 + 0]; \ + a13h = (state)->u.narrow[2 * 16 + 1]; \ + a23l = (state)->u.narrow[2 * 17 + 0]; \ + a23h = (state)->u.narrow[2 * 17 + 1]; \ + a33l = (state)->u.narrow[2 * 18 + 0]; \ + a33h = (state)->u.narrow[2 * 18 + 1]; \ + a43l = (state)->u.narrow[2 * 19 + 0]; \ + a43h = (state)->u.narrow[2 * 19 + 1]; \ + a04l = (state)->u.narrow[2 * 20 + 0]; \ + a04h = (state)->u.narrow[2 * 20 + 1]; \ + a14l = (state)->u.narrow[2 * 21 + 0]; \ + a14h = (state)->u.narrow[2 * 21 + 1]; \ + a24l = (state)->u.narrow[2 * 22 + 0]; \ + a24h = (state)->u.narrow[2 * 22 + 1]; \ + a34l = (state)->u.narrow[2 * 23 + 0]; \ + a34h = (state)->u.narrow[2 * 23 + 1]; \ + a44l = (state)->u.narrow[2 * 24 + 0]; \ + a44h = (state)->u.narrow[2 * 24 + 1]; \ + } while (0) + +#define WRITE_STATE(state) do { \ + (state)->u.narrow[2 * 0 + 0] = a00l; \ + (state)->u.narrow[2 * 0 + 1] = a00h; \ + (state)->u.narrow[2 * 1 + 0] = a10l; \ + (state)->u.narrow[2 * 1 + 1] = a10h; \ + (state)->u.narrow[2 * 2 + 0] = a20l; \ + (state)->u.narrow[2 * 2 + 1] = a20h; \ + (state)->u.narrow[2 * 3 + 0] = a30l; \ + (state)->u.narrow[2 * 3 + 1] = a30h; \ + (state)->u.narrow[2 * 4 + 0] = a40l; \ + (state)->u.narrow[2 * 4 + 1] = a40h; \ + (state)->u.narrow[2 * 5 + 0] = a01l; \ + (state)->u.narrow[2 * 5 + 1] = a01h; \ + (state)->u.narrow[2 * 6 + 0] = a11l; \ + (state)->u.narrow[2 * 6 + 1] = a11h; \ + (state)->u.narrow[2 * 7 + 0] = a21l; \ + (state)->u.narrow[2 * 7 + 1] = a21h; \ + (state)->u.narrow[2 * 8 + 0] = a31l; \ + (state)->u.narrow[2 * 8 + 1] = a31h; \ + (state)->u.narrow[2 * 9 + 0] = a41l; \ + (state)->u.narrow[2 * 9 + 1] = a41h; \ + (state)->u.narrow[2 * 10 + 0] = a02l; \ + (state)->u.narrow[2 * 10 + 1] = a02h; \ + (state)->u.narrow[2 * 11 + 0] = a12l; \ + (state)->u.narrow[2 * 11 + 1] = a12h; \ + (state)->u.narrow[2 * 12 + 0] = a22l; \ + (state)->u.narrow[2 * 12 + 1] = a22h; \ + (state)->u.narrow[2 * 13 + 0] = a32l; \ + (state)->u.narrow[2 * 13 + 1] = a32h; \ + (state)->u.narrow[2 * 14 + 0] = a42l; \ + (state)->u.narrow[2 * 14 + 1] = a42h; \ + (state)->u.narrow[2 * 15 + 0] = a03l; \ + (state)->u.narrow[2 * 15 + 1] = a03h; \ + (state)->u.narrow[2 * 16 + 0] = a13l; \ + (state)->u.narrow[2 * 16 + 1] = a13h; \ + (state)->u.narrow[2 * 17 + 0] = a23l; \ + (state)->u.narrow[2 * 17 + 1] = a23h; \ + (state)->u.narrow[2 * 18 + 0] = a33l; \ + (state)->u.narrow[2 * 18 + 1] = a33h; \ + (state)->u.narrow[2 * 19 + 0] = a43l; \ + (state)->u.narrow[2 * 19 + 1] = a43h; \ + (state)->u.narrow[2 * 20 + 0] = a04l; \ + (state)->u.narrow[2 * 20 + 1] = a04h; \ + (state)->u.narrow[2 * 21 + 0] = a14l; \ + (state)->u.narrow[2 * 21 + 1] = a14h; \ + (state)->u.narrow[2 * 22 + 0] = a24l; \ + (state)->u.narrow[2 * 22 + 1] = a24h; \ + (state)->u.narrow[2 * 23 + 0] = a34l; \ + (state)->u.narrow[2 * 23 + 1] = a34h; \ + (state)->u.narrow[2 * 24 + 0] = a44l; \ + (state)->u.narrow[2 * 24 + 1] = a44h; \ + } while (0) + +#define READ64(d, off) do { \ + bee_u32 tl, th; \ + tl = bee_dec32le_aligned(buf + (off)); \ + th = bee_dec32le_aligned(buf + (off) + 4); \ + INTERLEAVE(tl, th); \ + d ## l ^= tl; \ + d ## h ^= th; \ + } while (0) + +#define INPUT_BUF144 do { \ + READ64(a00, 0); \ + READ64(a10, 8); \ + READ64(a20, 16); \ + READ64(a30, 24); \ + READ64(a40, 32); \ + READ64(a01, 40); \ + READ64(a11, 48); \ + READ64(a21, 56); \ + READ64(a31, 64); \ + READ64(a41, 72); \ + READ64(a02, 80); \ + READ64(a12, 88); \ + READ64(a22, 96); \ + READ64(a32, 104); \ + READ64(a42, 112); \ + READ64(a03, 120); \ + READ64(a13, 128); \ + READ64(a23, 136); \ + } while (0) + +#define INPUT_BUF136 do { \ + READ64(a00, 0); \ + READ64(a10, 8); \ + READ64(a20, 16); \ + READ64(a30, 24); \ + READ64(a40, 32); \ + READ64(a01, 40); \ + READ64(a11, 48); \ + READ64(a21, 56); \ + READ64(a31, 64); \ + READ64(a41, 72); \ + READ64(a02, 80); \ + READ64(a12, 88); \ + READ64(a22, 96); \ + READ64(a32, 104); \ + READ64(a42, 112); \ + READ64(a03, 120); \ + READ64(a13, 128); \ + } while (0) + +#define INPUT_BUF104 do { \ + READ64(a00, 0); \ + READ64(a10, 8); \ + READ64(a20, 16); \ + READ64(a30, 24); \ + READ64(a40, 32); \ + READ64(a01, 40); \ + READ64(a11, 48); \ + READ64(a21, 56); \ + READ64(a31, 64); \ + READ64(a41, 72); \ + READ64(a02, 80); \ + READ64(a12, 88); \ + READ64(a22, 96); \ + } while (0) + +#define INPUT_BUF72 do { \ + READ64(a00, 0); \ + READ64(a10, 8); \ + READ64(a20, 16); \ + READ64(a30, 24); \ + READ64(a40, 32); \ + READ64(a01, 40); \ + READ64(a11, 48); \ + READ64(a21, 56); \ + READ64(a31, 64); \ + } while (0) + +#define INPUT_BUF(lim) do { \ + READ64(a00, 0); \ + READ64(a10, 8); \ + READ64(a20, 16); \ + READ64(a30, 24); \ + READ64(a40, 32); \ + READ64(a01, 40); \ + READ64(a11, 48); \ + READ64(a21, 56); \ + READ64(a31, 64); \ + if ((lim) == 72) \ + break; \ + READ64(a41, 72); \ + READ64(a02, 80); \ + READ64(a12, 88); \ + READ64(a22, 96); \ + if ((lim) == 104) \ + break; \ + READ64(a32, 104); \ + READ64(a42, 112); \ + READ64(a03, 120); \ + READ64(a13, 128); \ + if ((lim) == 136) \ + break; \ + READ64(a23, 136); \ + } while (0) + +#endif + +#define DECL64(x) bee_u64 x ## l, x ## h +#define MOV64(d, s) (d ## l = s ## l, d ## h = s ## h) +#define XOR64(d, a, b) (d ## l = a ## l ^ b ## l, d ## h = a ## h ^ b ## h) +#define AND64(d, a, b) (d ## l = a ## l & b ## l, d ## h = a ## h & b ## h) +#define OR64(d, a, b) (d ## l = a ## l | b ## l, d ## h = a ## h | b ## h) +#define NOT64(d, s) (d ## l = BEE_T32(~s ## l), d ## h = BEE_T32(~s ## h)) +#define ROL64(d, v, n) ROL64_ ## n(d, v) + +#if BEE_KECCAK_INTERLEAVE + +#define ROL64_odd1(d, v) do { \ + bee_u32 tmp; \ + tmp = v ## l; \ + d ## l = BEE_T32(v ## h << 1) | (v ## h >> 31); \ + d ## h = tmp; \ + } while (0) + +#define ROL64_odd63(d, v) do { \ + bee_u32 tmp; \ + tmp = BEE_T32(v ## l << 31) | (v ## l >> 1); \ + d ## l = v ## h; \ + d ## h = tmp; \ + } while (0) + +#define ROL64_odd(d, v, n) do { \ + bee_u32 tmp; \ + tmp = BEE_T32(v ## l << (n - 1)) | (v ## l >> (33 - n)); \ + d ## l = BEE_T32(v ## h << n) | (v ## h >> (32 - n)); \ + d ## h = tmp; \ + } while (0) + +#define ROL64_even(d, v, n) do { \ + d ## l = BEE_T32(v ## l << n) | (v ## l >> (32 - n)); \ + d ## h = BEE_T32(v ## h << n) | (v ## h >> (32 - n)); \ + } while (0) + +#define ROL64_0(d, v) +#define ROL64_1(d, v) ROL64_odd1(d, v) +#define ROL64_2(d, v) ROL64_even(d, v, 1) +#define ROL64_3(d, v) ROL64_odd( d, v, 2) +#define ROL64_4(d, v) ROL64_even(d, v, 2) +#define ROL64_5(d, v) ROL64_odd( d, v, 3) +#define ROL64_6(d, v) ROL64_even(d, v, 3) +#define ROL64_7(d, v) ROL64_odd( d, v, 4) +#define ROL64_8(d, v) ROL64_even(d, v, 4) +#define ROL64_9(d, v) ROL64_odd( d, v, 5) +#define ROL64_10(d, v) ROL64_even(d, v, 5) +#define ROL64_11(d, v) ROL64_odd( d, v, 6) +#define ROL64_12(d, v) ROL64_even(d, v, 6) +#define ROL64_13(d, v) ROL64_odd( d, v, 7) +#define ROL64_14(d, v) ROL64_even(d, v, 7) +#define ROL64_15(d, v) ROL64_odd( d, v, 8) +#define ROL64_16(d, v) ROL64_even(d, v, 8) +#define ROL64_17(d, v) ROL64_odd( d, v, 9) +#define ROL64_18(d, v) ROL64_even(d, v, 9) +#define ROL64_19(d, v) ROL64_odd( d, v, 10) +#define ROL64_20(d, v) ROL64_even(d, v, 10) +#define ROL64_21(d, v) ROL64_odd( d, v, 11) +#define ROL64_22(d, v) ROL64_even(d, v, 11) +#define ROL64_23(d, v) ROL64_odd( d, v, 12) +#define ROL64_24(d, v) ROL64_even(d, v, 12) +#define ROL64_25(d, v) ROL64_odd( d, v, 13) +#define ROL64_26(d, v) ROL64_even(d, v, 13) +#define ROL64_27(d, v) ROL64_odd( d, v, 14) +#define ROL64_28(d, v) ROL64_even(d, v, 14) +#define ROL64_29(d, v) ROL64_odd( d, v, 15) +#define ROL64_30(d, v) ROL64_even(d, v, 15) +#define ROL64_31(d, v) ROL64_odd( d, v, 16) +#define ROL64_32(d, v) ROL64_even(d, v, 16) +#define ROL64_33(d, v) ROL64_odd( d, v, 17) +#define ROL64_34(d, v) ROL64_even(d, v, 17) +#define ROL64_35(d, v) ROL64_odd( d, v, 18) +#define ROL64_36(d, v) ROL64_even(d, v, 18) +#define ROL64_37(d, v) ROL64_odd( d, v, 19) +#define ROL64_38(d, v) ROL64_even(d, v, 19) +#define ROL64_39(d, v) ROL64_odd( d, v, 20) +#define ROL64_40(d, v) ROL64_even(d, v, 20) +#define ROL64_41(d, v) ROL64_odd( d, v, 21) +#define ROL64_42(d, v) ROL64_even(d, v, 21) +#define ROL64_43(d, v) ROL64_odd( d, v, 22) +#define ROL64_44(d, v) ROL64_even(d, v, 22) +#define ROL64_45(d, v) ROL64_odd( d, v, 23) +#define ROL64_46(d, v) ROL64_even(d, v, 23) +#define ROL64_47(d, v) ROL64_odd( d, v, 24) +#define ROL64_48(d, v) ROL64_even(d, v, 24) +#define ROL64_49(d, v) ROL64_odd( d, v, 25) +#define ROL64_50(d, v) ROL64_even(d, v, 25) +#define ROL64_51(d, v) ROL64_odd( d, v, 26) +#define ROL64_52(d, v) ROL64_even(d, v, 26) +#define ROL64_53(d, v) ROL64_odd( d, v, 27) +#define ROL64_54(d, v) ROL64_even(d, v, 27) +#define ROL64_55(d, v) ROL64_odd( d, v, 28) +#define ROL64_56(d, v) ROL64_even(d, v, 28) +#define ROL64_57(d, v) ROL64_odd( d, v, 29) +#define ROL64_58(d, v) ROL64_even(d, v, 29) +#define ROL64_59(d, v) ROL64_odd( d, v, 30) +#define ROL64_60(d, v) ROL64_even(d, v, 30) +#define ROL64_61(d, v) ROL64_odd( d, v, 31) +#define ROL64_62(d, v) ROL64_even(d, v, 31) +#define ROL64_63(d, v) ROL64_odd63(d, v) + +#else + +#define ROL64_small(d, v, n) do { \ + bee_u32 tmp; \ + tmp = BEE_T32(v ## l << n) | (v ## h >> (32 - n)); \ + d ## h = BEE_T32(v ## h << n) | (v ## l >> (32 - n)); \ + d ## l = tmp; \ + } while (0) + +#define ROL64_0(d, v) 0 +#define ROL64_1(d, v) ROL64_small(d, v, 1) +#define ROL64_2(d, v) ROL64_small(d, v, 2) +#define ROL64_3(d, v) ROL64_small(d, v, 3) +#define ROL64_4(d, v) ROL64_small(d, v, 4) +#define ROL64_5(d, v) ROL64_small(d, v, 5) +#define ROL64_6(d, v) ROL64_small(d, v, 6) +#define ROL64_7(d, v) ROL64_small(d, v, 7) +#define ROL64_8(d, v) ROL64_small(d, v, 8) +#define ROL64_9(d, v) ROL64_small(d, v, 9) +#define ROL64_10(d, v) ROL64_small(d, v, 10) +#define ROL64_11(d, v) ROL64_small(d, v, 11) +#define ROL64_12(d, v) ROL64_small(d, v, 12) +#define ROL64_13(d, v) ROL64_small(d, v, 13) +#define ROL64_14(d, v) ROL64_small(d, v, 14) +#define ROL64_15(d, v) ROL64_small(d, v, 15) +#define ROL64_16(d, v) ROL64_small(d, v, 16) +#define ROL64_17(d, v) ROL64_small(d, v, 17) +#define ROL64_18(d, v) ROL64_small(d, v, 18) +#define ROL64_19(d, v) ROL64_small(d, v, 19) +#define ROL64_20(d, v) ROL64_small(d, v, 20) +#define ROL64_21(d, v) ROL64_small(d, v, 21) +#define ROL64_22(d, v) ROL64_small(d, v, 22) +#define ROL64_23(d, v) ROL64_small(d, v, 23) +#define ROL64_24(d, v) ROL64_small(d, v, 24) +#define ROL64_25(d, v) ROL64_small(d, v, 25) +#define ROL64_26(d, v) ROL64_small(d, v, 26) +#define ROL64_27(d, v) ROL64_small(d, v, 27) +#define ROL64_28(d, v) ROL64_small(d, v, 28) +#define ROL64_29(d, v) ROL64_small(d, v, 29) +#define ROL64_30(d, v) ROL64_small(d, v, 30) +#define ROL64_31(d, v) ROL64_small(d, v, 31) + +#define ROL64_32(d, v) do { \ + bee_u32 tmp; \ + tmp = v ## l; \ + d ## l = v ## h; \ + d ## h = tmp; \ + } while (0) + +#define ROL64_big(d, v, n) do { \ + bee_u32 trl, trh; \ + ROL64_small(tr, v, n); \ + d ## h = trl; \ + d ## l = trh; \ + } while (0) + +#define ROL64_33(d, v) ROL64_big(d, v, 1) +#define ROL64_34(d, v) ROL64_big(d, v, 2) +#define ROL64_35(d, v) ROL64_big(d, v, 3) +#define ROL64_36(d, v) ROL64_big(d, v, 4) +#define ROL64_37(d, v) ROL64_big(d, v, 5) +#define ROL64_38(d, v) ROL64_big(d, v, 6) +#define ROL64_39(d, v) ROL64_big(d, v, 7) +#define ROL64_40(d, v) ROL64_big(d, v, 8) +#define ROL64_41(d, v) ROL64_big(d, v, 9) +#define ROL64_42(d, v) ROL64_big(d, v, 10) +#define ROL64_43(d, v) ROL64_big(d, v, 11) +#define ROL64_44(d, v) ROL64_big(d, v, 12) +#define ROL64_45(d, v) ROL64_big(d, v, 13) +#define ROL64_46(d, v) ROL64_big(d, v, 14) +#define ROL64_47(d, v) ROL64_big(d, v, 15) +#define ROL64_48(d, v) ROL64_big(d, v, 16) +#define ROL64_49(d, v) ROL64_big(d, v, 17) +#define ROL64_50(d, v) ROL64_big(d, v, 18) +#define ROL64_51(d, v) ROL64_big(d, v, 19) +#define ROL64_52(d, v) ROL64_big(d, v, 20) +#define ROL64_53(d, v) ROL64_big(d, v, 21) +#define ROL64_54(d, v) ROL64_big(d, v, 22) +#define ROL64_55(d, v) ROL64_big(d, v, 23) +#define ROL64_56(d, v) ROL64_big(d, v, 24) +#define ROL64_57(d, v) ROL64_big(d, v, 25) +#define ROL64_58(d, v) ROL64_big(d, v, 26) +#define ROL64_59(d, v) ROL64_big(d, v, 27) +#define ROL64_60(d, v) ROL64_big(d, v, 28) +#define ROL64_61(d, v) ROL64_big(d, v, 29) +#define ROL64_62(d, v) ROL64_big(d, v, 30) +#define ROL64_63(d, v) ROL64_big(d, v, 31) + +#endif + +#define XOR64_IOTA(d, s, k) \ + (d ## l = s ## l ^ k.low, d ## h = s ## h ^ k.high) + +#endif + + + +#define TH_ELT(t, c0, c1, c2, c3, c4, d0, d1, d2, d3, d4) do { \ + DECL64(tt0); \ + DECL64(tt1); \ + DECL64(tt2); \ + DECL64(tt3); \ + XOR64(tt0, d0, d1); \ + XOR64(tt1, d2, d3); \ + XOR64(tt0, tt0, d4); \ + XOR64(tt0, tt0, tt1); \ + ROL64(tt0, tt0, 1); \ + XOR64(tt2, c0, c1); \ + XOR64(tt3, c2, c3); \ + XOR64(tt0, tt0, c4); \ + XOR64(tt2, tt2, tt3); \ + XOR64(t, tt0, tt2); \ + } while (0) + +#define THETA(b00, b01, b02, b03, b04, b10, b11, b12, b13, b14, \ + b20, b21, b22, b23, b24, b30, b31, b32, b33, b34, \ + b40, b41, b42, b43, b44) \ + do { \ + DECL64(t0); \ + DECL64(t1); \ + DECL64(t2); \ + DECL64(t3); \ + DECL64(t4); \ + TH_ELT(t0, b40, b41, b42, b43, b44, b10, b11, b12, b13, b14); \ + TH_ELT(t1, b00, b01, b02, b03, b04, b20, b21, b22, b23, b24); \ + TH_ELT(t2, b10, b11, b12, b13, b14, b30, b31, b32, b33, b34); \ + TH_ELT(t3, b20, b21, b22, b23, b24, b40, b41, b42, b43, b44); \ + TH_ELT(t4, b30, b31, b32, b33, b34, b00, b01, b02, b03, b04); \ + XOR64(b00, b00, t0); \ + XOR64(b01, b01, t0); \ + XOR64(b02, b02, t0); \ + XOR64(b03, b03, t0); \ + XOR64(b04, b04, t0); \ + XOR64(b10, b10, t1); \ + XOR64(b11, b11, t1); \ + XOR64(b12, b12, t1); \ + XOR64(b13, b13, t1); \ + XOR64(b14, b14, t1); \ + XOR64(b20, b20, t2); \ + XOR64(b21, b21, t2); \ + XOR64(b22, b22, t2); \ + XOR64(b23, b23, t2); \ + XOR64(b24, b24, t2); \ + XOR64(b30, b30, t3); \ + XOR64(b31, b31, t3); \ + XOR64(b32, b32, t3); \ + XOR64(b33, b33, t3); \ + XOR64(b34, b34, t3); \ + XOR64(b40, b40, t4); \ + XOR64(b41, b41, t4); \ + XOR64(b42, b42, t4); \ + XOR64(b43, b43, t4); \ + XOR64(b44, b44, t4); \ + } while (0) + +#define RHO(b00, b01, b02, b03, b04, b10, b11, b12, b13, b14, \ + b20, b21, b22, b23, b24, b30, b31, b32, b33, b34, \ + b40, b41, b42, b43, b44) \ + do { \ + /* ROL64(b00, b00, 0); */ \ + ROL64(b01, b01, 36); \ + ROL64(b02, b02, 3); \ + ROL64(b03, b03, 41); \ + ROL64(b04, b04, 18); \ + ROL64(b10, b10, 1); \ + ROL64(b11, b11, 44); \ + ROL64(b12, b12, 10); \ + ROL64(b13, b13, 45); \ + ROL64(b14, b14, 2); \ + ROL64(b20, b20, 62); \ + ROL64(b21, b21, 6); \ + ROL64(b22, b22, 43); \ + ROL64(b23, b23, 15); \ + ROL64(b24, b24, 61); \ + ROL64(b30, b30, 28); \ + ROL64(b31, b31, 55); \ + ROL64(b32, b32, 25); \ + ROL64(b33, b33, 21); \ + ROL64(b34, b34, 56); \ + ROL64(b40, b40, 27); \ + ROL64(b41, b41, 20); \ + ROL64(b42, b42, 39); \ + ROL64(b43, b43, 8); \ + ROL64(b44, b44, 14); \ + } while (0) + +/* + * The KHI macro integrates the "lane complement" optimization. On input, + * some words are complemented: + * a00 a01 a02 a04 a13 a20 a21 a22 a30 a33 a34 a43 + * On output, the following words are complemented: + * a04 a10 a20 a22 a23 a31 + * + * The (implicit) permutation and the theta expansion will bring back + * the input mask for the next round. + */ + +#define KHI_XO(d, a, b, c) do { \ + DECL64(kt); \ + OR64(kt, b, c); \ + XOR64(d, a, kt); \ + } while (0) + +#define KHI_XA(d, a, b, c) do { \ + DECL64(kt); \ + AND64(kt, b, c); \ + XOR64(d, a, kt); \ + } while (0) + +#define KHI(b00, b01, b02, b03, b04, b10, b11, b12, b13, b14, \ + b20, b21, b22, b23, b24, b30, b31, b32, b33, b34, \ + b40, b41, b42, b43, b44) \ + do { \ + DECL64(c0); \ + DECL64(c1); \ + DECL64(c2); \ + DECL64(c3); \ + DECL64(c4); \ + DECL64(bnn); \ + NOT64(bnn, b20); \ + KHI_XO(c0, b00, b10, b20); \ + KHI_XO(c1, b10, bnn, b30); \ + KHI_XA(c2, b20, b30, b40); \ + KHI_XO(c3, b30, b40, b00); \ + KHI_XA(c4, b40, b00, b10); \ + MOV64(b00, c0); \ + MOV64(b10, c1); \ + MOV64(b20, c2); \ + MOV64(b30, c3); \ + MOV64(b40, c4); \ + NOT64(bnn, b41); \ + KHI_XO(c0, b01, b11, b21); \ + KHI_XA(c1, b11, b21, b31); \ + KHI_XO(c2, b21, b31, bnn); \ + KHI_XO(c3, b31, b41, b01); \ + KHI_XA(c4, b41, b01, b11); \ + MOV64(b01, c0); \ + MOV64(b11, c1); \ + MOV64(b21, c2); \ + MOV64(b31, c3); \ + MOV64(b41, c4); \ + NOT64(bnn, b32); \ + KHI_XO(c0, b02, b12, b22); \ + KHI_XA(c1, b12, b22, b32); \ + KHI_XA(c2, b22, bnn, b42); \ + KHI_XO(c3, bnn, b42, b02); \ + KHI_XA(c4, b42, b02, b12); \ + MOV64(b02, c0); \ + MOV64(b12, c1); \ + MOV64(b22, c2); \ + MOV64(b32, c3); \ + MOV64(b42, c4); \ + NOT64(bnn, b33); \ + KHI_XA(c0, b03, b13, b23); \ + KHI_XO(c1, b13, b23, b33); \ + KHI_XO(c2, b23, bnn, b43); \ + KHI_XA(c3, bnn, b43, b03); \ + KHI_XO(c4, b43, b03, b13); \ + MOV64(b03, c0); \ + MOV64(b13, c1); \ + MOV64(b23, c2); \ + MOV64(b33, c3); \ + MOV64(b43, c4); \ + NOT64(bnn, b14); \ + KHI_XA(c0, b04, bnn, b24); \ + KHI_XO(c1, bnn, b24, b34); \ + KHI_XA(c2, b24, b34, b44); \ + KHI_XO(c3, b34, b44, b04); \ + KHI_XA(c4, b44, b04, b14); \ + MOV64(b04, c0); \ + MOV64(b14, c1); \ + MOV64(b24, c2); \ + MOV64(b34, c3); \ + MOV64(b44, c4); \ + } while (0) + +#define IOTA(r) XOR64_IOTA(a00, a00, r) + +#define P0 a00, a01, a02, a03, a04, a10, a11, a12, a13, a14, a20, a21, \ + a22, a23, a24, a30, a31, a32, a33, a34, a40, a41, a42, a43, a44 +#define P1 a00, a30, a10, a40, a20, a11, a41, a21, a01, a31, a22, a02, \ + a32, a12, a42, a33, a13, a43, a23, a03, a44, a24, a04, a34, a14 +#define P2 a00, a33, a11, a44, a22, a41, a24, a02, a30, a13, a32, a10, \ + a43, a21, a04, a23, a01, a34, a12, a40, a14, a42, a20, a03, a31 +#define P3 a00, a23, a41, a14, a32, a24, a42, a10, a33, a01, a43, a11, \ + a34, a02, a20, a12, a30, a03, a21, a44, a31, a04, a22, a40, a13 +#define P4 a00, a12, a24, a31, a43, a42, a04, a11, a23, a30, a34, a41, \ + a03, a10, a22, a21, a33, a40, a02, a14, a13, a20, a32, a44, a01 +#define P5 a00, a21, a42, a13, a34, a04, a20, a41, a12, a33, a03, a24, \ + a40, a11, a32, a02, a23, a44, a10, a31, a01, a22, a43, a14, a30 +#define P6 a00, a02, a04, a01, a03, a20, a22, a24, a21, a23, a40, a42, \ + a44, a41, a43, a10, a12, a14, a11, a13, a30, a32, a34, a31, a33 +#define P7 a00, a10, a20, a30, a40, a22, a32, a42, a02, a12, a44, a04, \ + a14, a24, a34, a11, a21, a31, a41, a01, a33, a43, a03, a13, a23 +#define P8 a00, a11, a22, a33, a44, a32, a43, a04, a10, a21, a14, a20, \ + a31, a42, a03, a41, a02, a13, a24, a30, a23, a34, a40, a01, a12 +#define P9 a00, a41, a32, a23, a14, a43, a34, a20, a11, a02, a31, a22, \ + a13, a04, a40, a24, a10, a01, a42, a33, a12, a03, a44, a30, a21 +#define P10 a00, a24, a43, a12, a31, a34, a03, a22, a41, a10, a13, a32, \ + a01, a20, a44, a42, a11, a30, a04, a23, a21, a40, a14, a33, a02 +#define P11 a00, a42, a34, a21, a13, a03, a40, a32, a24, a11, a01, a43, \ + a30, a22, a14, a04, a41, a33, a20, a12, a02, a44, a31, a23, a10 +#define P12 a00, a04, a03, a02, a01, a40, a44, a43, a42, a41, a30, a34, \ + a33, a32, a31, a20, a24, a23, a22, a21, a10, a14, a13, a12, a11 +#define P13 a00, a20, a40, a10, a30, a44, a14, a34, a04, a24, a33, a03, \ + a23, a43, a13, a22, a42, a12, a32, a02, a11, a31, a01, a21, a41 +#define P14 a00, a22, a44, a11, a33, a14, a31, a03, a20, a42, a23, a40, \ + a12, a34, a01, a32, a04, a21, a43, a10, a41, a13, a30, a02, a24 +#define P15 a00, a32, a14, a41, a23, a31, a13, a40, a22, a04, a12, a44, \ + a21, a03, a30, a43, a20, a02, a34, a11, a24, a01, a33, a10, a42 +#define P16 a00, a43, a31, a24, a12, a13, a01, a44, a32, a20, a21, a14, \ + a02, a40, a33, a34, a22, a10, a03, a41, a42, a30, a23, a11, a04 +#define P17 a00, a34, a13, a42, a21, a01, a30, a14, a43, a22, a02, a31, \ + a10, a44, a23, a03, a32, a11, a40, a24, a04, a33, a12, a41, a20 +#define P18 a00, a03, a01, a04, a02, a30, a33, a31, a34, a32, a10, a13, \ + a11, a14, a12, a40, a43, a41, a44, a42, a20, a23, a21, a24, a22 +#define P19 a00, a40, a30, a20, a10, a33, a23, a13, a03, a43, a11, a01, \ + a41, a31, a21, a44, a34, a24, a14, a04, a22, a12, a02, a42, a32 +#define P20 a00, a44, a33, a22, a11, a23, a12, a01, a40, a34, a41, a30, \ + a24, a13, a02, a14, a03, a42, a31, a20, a32, a21, a10, a04, a43 +#define P21 a00, a14, a23, a32, a41, a12, a21, a30, a44, a03, a24, a33, \ + a42, a01, a10, a31, a40, a04, a13, a22, a43, a02, a11, a20, a34 +#define P22 a00, a31, a12, a43, a24, a21, a02, a33, a14, a40, a42, a23, \ + a04, a30, a11, a13, a44, a20, a01, a32, a34, a10, a41, a22, a03 +#define P23 a00, a13, a21, a34, a42, a02, a10, a23, a31, a44, a04, a12, \ + a20, a33, a41, a01, a14, a22, a30, a43, a03, a11, a24, a32, a40 + +#define P1_TO_P0 do { \ + DECL64(t); \ + MOV64(t, a01); \ + MOV64(a01, a30); \ + MOV64(a30, a33); \ + MOV64(a33, a23); \ + MOV64(a23, a12); \ + MOV64(a12, a21); \ + MOV64(a21, a02); \ + MOV64(a02, a10); \ + MOV64(a10, a11); \ + MOV64(a11, a41); \ + MOV64(a41, a24); \ + MOV64(a24, a42); \ + MOV64(a42, a04); \ + MOV64(a04, a20); \ + MOV64(a20, a22); \ + MOV64(a22, a32); \ + MOV64(a32, a43); \ + MOV64(a43, a34); \ + MOV64(a34, a03); \ + MOV64(a03, a40); \ + MOV64(a40, a44); \ + MOV64(a44, a14); \ + MOV64(a14, a31); \ + MOV64(a31, a13); \ + MOV64(a13, t); \ + } while (0) + +#define P2_TO_P0 do { \ + DECL64(t); \ + MOV64(t, a01); \ + MOV64(a01, a33); \ + MOV64(a33, a12); \ + MOV64(a12, a02); \ + MOV64(a02, a11); \ + MOV64(a11, a24); \ + MOV64(a24, a04); \ + MOV64(a04, a22); \ + MOV64(a22, a43); \ + MOV64(a43, a03); \ + MOV64(a03, a44); \ + MOV64(a44, a31); \ + MOV64(a31, t); \ + MOV64(t, a10); \ + MOV64(a10, a41); \ + MOV64(a41, a42); \ + MOV64(a42, a20); \ + MOV64(a20, a32); \ + MOV64(a32, a34); \ + MOV64(a34, a40); \ + MOV64(a40, a14); \ + MOV64(a14, a13); \ + MOV64(a13, a30); \ + MOV64(a30, a23); \ + MOV64(a23, a21); \ + MOV64(a21, t); \ + } while (0) + +#define P4_TO_P0 do { \ + DECL64(t); \ + MOV64(t, a01); \ + MOV64(a01, a12); \ + MOV64(a12, a11); \ + MOV64(a11, a04); \ + MOV64(a04, a43); \ + MOV64(a43, a44); \ + MOV64(a44, t); \ + MOV64(t, a02); \ + MOV64(a02, a24); \ + MOV64(a24, a22); \ + MOV64(a22, a03); \ + MOV64(a03, a31); \ + MOV64(a31, a33); \ + MOV64(a33, t); \ + MOV64(t, a10); \ + MOV64(a10, a42); \ + MOV64(a42, a32); \ + MOV64(a32, a40); \ + MOV64(a40, a13); \ + MOV64(a13, a23); \ + MOV64(a23, t); \ + MOV64(t, a14); \ + MOV64(a14, a30); \ + MOV64(a30, a21); \ + MOV64(a21, a41); \ + MOV64(a41, a20); \ + MOV64(a20, a34); \ + MOV64(a34, t); \ + } while (0) + +#define P6_TO_P0 do { \ + DECL64(t); \ + MOV64(t, a01); \ + MOV64(a01, a02); \ + MOV64(a02, a04); \ + MOV64(a04, a03); \ + MOV64(a03, t); \ + MOV64(t, a10); \ + MOV64(a10, a20); \ + MOV64(a20, a40); \ + MOV64(a40, a30); \ + MOV64(a30, t); \ + MOV64(t, a11); \ + MOV64(a11, a22); \ + MOV64(a22, a44); \ + MOV64(a44, a33); \ + MOV64(a33, t); \ + MOV64(t, a12); \ + MOV64(a12, a24); \ + MOV64(a24, a43); \ + MOV64(a43, a31); \ + MOV64(a31, t); \ + MOV64(t, a13); \ + MOV64(a13, a21); \ + MOV64(a21, a42); \ + MOV64(a42, a34); \ + MOV64(a34, t); \ + MOV64(t, a14); \ + MOV64(a14, a23); \ + MOV64(a23, a41); \ + MOV64(a41, a32); \ + MOV64(a32, t); \ + } while (0) + +#define P8_TO_P0 do { \ + DECL64(t); \ + MOV64(t, a01); \ + MOV64(a01, a11); \ + MOV64(a11, a43); \ + MOV64(a43, t); \ + MOV64(t, a02); \ + MOV64(a02, a22); \ + MOV64(a22, a31); \ + MOV64(a31, t); \ + MOV64(t, a03); \ + MOV64(a03, a33); \ + MOV64(a33, a24); \ + MOV64(a24, t); \ + MOV64(t, a04); \ + MOV64(a04, a44); \ + MOV64(a44, a12); \ + MOV64(a12, t); \ + MOV64(t, a10); \ + MOV64(a10, a32); \ + MOV64(a32, a13); \ + MOV64(a13, t); \ + MOV64(t, a14); \ + MOV64(a14, a21); \ + MOV64(a21, a20); \ + MOV64(a20, t); \ + MOV64(t, a23); \ + MOV64(a23, a42); \ + MOV64(a42, a40); \ + MOV64(a40, t); \ + MOV64(t, a30); \ + MOV64(a30, a41); \ + MOV64(a41, a34); \ + MOV64(a34, t); \ + } while (0) + +#define P12_TO_P0 do { \ + DECL64(t); \ + MOV64(t, a01); \ + MOV64(a01, a04); \ + MOV64(a04, t); \ + MOV64(t, a02); \ + MOV64(a02, a03); \ + MOV64(a03, t); \ + MOV64(t, a10); \ + MOV64(a10, a40); \ + MOV64(a40, t); \ + MOV64(t, a11); \ + MOV64(a11, a44); \ + MOV64(a44, t); \ + MOV64(t, a12); \ + MOV64(a12, a43); \ + MOV64(a43, t); \ + MOV64(t, a13); \ + MOV64(a13, a42); \ + MOV64(a42, t); \ + MOV64(t, a14); \ + MOV64(a14, a41); \ + MOV64(a41, t); \ + MOV64(t, a20); \ + MOV64(a20, a30); \ + MOV64(a30, t); \ + MOV64(t, a21); \ + MOV64(a21, a34); \ + MOV64(a34, t); \ + MOV64(t, a22); \ + MOV64(a22, a33); \ + MOV64(a33, t); \ + MOV64(t, a23); \ + MOV64(a23, a32); \ + MOV64(a32, t); \ + MOV64(t, a24); \ + MOV64(a24, a31); \ + MOV64(a31, t); \ + } while (0) + +#define LPAR ( +#define RPAR ) + +#define KF_ELT(r, s, k) do { \ + THETA LPAR P ## r RPAR; \ + RHO LPAR P ## r RPAR; \ + KHI LPAR P ## s RPAR; \ + IOTA(k); \ + } while (0) + +#define DO(x) x + +#define KECCAK_F_1600 DO(KECCAK_F_1600_) + +#if BEE_KECCAK_UNROLL == 1 + +#define KECCAK_F_1600_ do { \ + int j; \ + for (j = 0; j < 24; j ++) { \ + KF_ELT( 0, 1, RC[j + 0]); \ + P1_TO_P0; \ + } \ + } while (0) + +#elif BEE_KECCAK_UNROLL == 2 + +#define KECCAK_F_1600_ do { \ + int j; \ + for (j = 0; j < 24; j += 2) { \ + KF_ELT( 0, 1, RC[j + 0]); \ + KF_ELT( 1, 2, RC[j + 1]); \ + P2_TO_P0; \ + } \ + } while (0) + +#elif BEE_KECCAK_UNROLL == 4 + +#define KECCAK_F_1600_ do { \ + int j; \ + for (j = 0; j < 24; j += 4) { \ + KF_ELT( 0, 1, RC[j + 0]); \ + KF_ELT( 1, 2, RC[j + 1]); \ + KF_ELT( 2, 3, RC[j + 2]); \ + KF_ELT( 3, 4, RC[j + 3]); \ + P4_TO_P0; \ + } \ + } while (0) + +#elif BEE_KECCAK_UNROLL == 6 + +#define KECCAK_F_1600_ do { \ + int j; \ + for (j = 0; j < 24; j += 6) { \ + KF_ELT( 0, 1, RC[j + 0]); \ + KF_ELT( 1, 2, RC[j + 1]); \ + KF_ELT( 2, 3, RC[j + 2]); \ + KF_ELT( 3, 4, RC[j + 3]); \ + KF_ELT( 4, 5, RC[j + 4]); \ + KF_ELT( 5, 6, RC[j + 5]); \ + P6_TO_P0; \ + } \ + } while (0) + +#elif BEE_KECCAK_UNROLL == 8 + +#define KECCAK_F_1600_ do { \ + int j; \ + for (j = 0; j < 24; j += 8) { \ + KF_ELT( 0, 1, RC[j + 0]); \ + KF_ELT( 1, 2, RC[j + 1]); \ + KF_ELT( 2, 3, RC[j + 2]); \ + KF_ELT( 3, 4, RC[j + 3]); \ + KF_ELT( 4, 5, RC[j + 4]); \ + KF_ELT( 5, 6, RC[j + 5]); \ + KF_ELT( 6, 7, RC[j + 6]); \ + KF_ELT( 7, 8, RC[j + 7]); \ + P8_TO_P0; \ + } \ + } while (0) + +#elif BEE_KECCAK_UNROLL == 12 + +#define KECCAK_F_1600_ do { \ + int j; \ + for (j = 0; j < 24; j += 12) { \ + KF_ELT( 0, 1, RC[j + 0]); \ + KF_ELT( 1, 2, RC[j + 1]); \ + KF_ELT( 2, 3, RC[j + 2]); \ + KF_ELT( 3, 4, RC[j + 3]); \ + KF_ELT( 4, 5, RC[j + 4]); \ + KF_ELT( 5, 6, RC[j + 5]); \ + KF_ELT( 6, 7, RC[j + 6]); \ + KF_ELT( 7, 8, RC[j + 7]); \ + KF_ELT( 8, 9, RC[j + 8]); \ + KF_ELT( 9, 10, RC[j + 9]); \ + KF_ELT(10, 11, RC[j + 10]); \ + KF_ELT(11, 12, RC[j + 11]); \ + P12_TO_P0; \ + } \ + } while (0) + +#elif BEE_KECCAK_UNROLL == 0 + +#define KECCAK_F_1600_ do { \ + KF_ELT( 0, 1, RC[ 0]); \ + KF_ELT( 1, 2, RC[ 1]); \ + KF_ELT( 2, 3, RC[ 2]); \ + KF_ELT( 3, 4, RC[ 3]); \ + KF_ELT( 4, 5, RC[ 4]); \ + KF_ELT( 5, 6, RC[ 5]); \ + KF_ELT( 6, 7, RC[ 6]); \ + KF_ELT( 7, 8, RC[ 7]); \ + KF_ELT( 8, 9, RC[ 8]); \ + KF_ELT( 9, 10, RC[ 9]); \ + KF_ELT(10, 11, RC[10]); \ + KF_ELT(11, 12, RC[11]); \ + KF_ELT(12, 13, RC[12]); \ + KF_ELT(13, 14, RC[13]); \ + KF_ELT(14, 15, RC[14]); \ + KF_ELT(15, 16, RC[15]); \ + KF_ELT(16, 17, RC[16]); \ + KF_ELT(17, 18, RC[17]); \ + KF_ELT(18, 19, RC[18]); \ + KF_ELT(19, 20, RC[19]); \ + KF_ELT(20, 21, RC[20]); \ + KF_ELT(21, 22, RC[21]); \ + KF_ELT(22, 23, RC[22]); \ + KF_ELT(23, 0, RC[23]); \ + } while (0) + +#else + +#error Unimplemented unroll count for one. + +#endif + +static void one_init(facet_one_context *kc, unsigned out_size) +{ + int i; + +#if BEE_KECCAK_64 + for (i = 0; i < 25; i ++) + kc->u.wide[i] = 0; + /* + * Initialization for the "lane complement". + */ + kc->u.wide[ 1] = BEE_C64(0xFFFFFFFFFFFFFFFF); + kc->u.wide[ 2] = BEE_C64(0xFFFFFFFFFFFFFFFF); + kc->u.wide[ 8] = BEE_C64(0xFFFFFFFFFFFFFFFF); + kc->u.wide[12] = BEE_C64(0xFFFFFFFFFFFFFFFF); + kc->u.wide[17] = BEE_C64(0xFFFFFFFFFFFFFFFF); + kc->u.wide[20] = BEE_C64(0xFFFFFFFFFFFFFFFF); +#else + + for (i = 0; i < 50; i ++) + kc->u.narrow[i] = 0; + /* + * Initialization for the "lane complement". + * Note: since we set to all-one full 64-bit words, + * interleaving (if applicable) is a no-op. + */ + kc->u.narrow[ 2] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[ 3] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[ 4] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[ 5] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[16] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[17] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[24] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[25] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[34] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[35] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[40] = BEE_C32(0xFFFFFFFF); + kc->u.narrow[41] = BEE_C32(0xFFFFFFFF); +#endif + kc->ptr = 0; + kc->lim = 200 - (out_size >> 2); +} + +static void one_core(facet_one_context *kc, const void *data, size_t len, size_t lim) +{ + unsigned char *buf; + size_t ptr; + DECL_STATE + + buf = kc->buf; + ptr = kc->ptr; + + if( len < (lim - ptr) ) + { + memcpy( buf + ptr, data, len ); + kc->ptr = ptr + len; + return; + } + + READ_STATE(kc); + while (len > 0) { + size_t clen; + + clen = (lim - ptr); + if (clen > len) + clen = len; + memcpy(buf + ptr, data, clen); + ptr += clen; + data = (const unsigned char *)data + clen; + len -= clen; + if (ptr == lim) { + INPUT_BUF(lim); + KECCAK_F_1600; + ptr = 0; + } + } + WRITE_STATE(kc); + kc->ptr = ptr; +} + +#if BEE_KECCAK_64 + +#define DEFCLOSE(d, lim) \ + static void one_close ## d( \ + facet_one_context *kc, unsigned ub, unsigned n, void *dst) \ + { \ + unsigned eb; \ + union { \ + unsigned char tmp[lim + 1]; \ + bee_u64 dummy; /* for alignment */ \ + } u; \ + size_t j; \ + \ + eb = (0x100 | (ub & 0xFF)) >> (8 - n); \ + if (kc->ptr == (lim - 1)) { \ + if (n == 7) { \ + u.tmp[0] = eb; \ + memset(u.tmp + 1, 0, lim - 1); \ + u.tmp[lim] = 0x80; \ + j = 1 + lim; \ + } else { \ + u.tmp[0] = eb | 0x80; \ + j = 1; \ + } \ + } else { \ + j = lim - kc->ptr; \ + u.tmp[0] = eb; \ + memset(u.tmp + 1, 0, j - 2); \ + u.tmp[j - 1] = 0x80; \ + } \ + one_core(kc, u.tmp, j, lim); \ + /* Finalize the "lane complement" */ \ + kc->u.wide[ 1] = ~kc->u.wide[ 1]; \ + kc->u.wide[ 2] = ~kc->u.wide[ 2]; \ + kc->u.wide[ 8] = ~kc->u.wide[ 8]; \ + kc->u.wide[12] = ~kc->u.wide[12]; \ + kc->u.wide[17] = ~kc->u.wide[17]; \ + kc->u.wide[20] = ~kc->u.wide[20]; \ + for (j = 0; j < d; j += 8) \ + bee_enc64le_aligned(u.tmp + j, kc->u.wide[j >> 3]); \ + memcpy(dst, u.tmp, d); \ + one_init(kc, (unsigned)d << 3); \ + } \ + +#else + +#define DEFCLOSE(d, lim) \ + static void one_close ## d( \ + facet_one_context *kc, unsigned ub, unsigned n, void *dst) \ + { \ + unsigned eb; \ + union { \ + unsigned char tmp[lim + 1]; \ + bee_u64 dummy; /* for alignment */ \ + } u; \ + size_t j; \ + \ + eb = (0x100 | (ub & 0xFF)) >> (8 - n); \ + if (kc->ptr == (lim - 1)) { \ + if (n == 7) { \ + u.tmp[0] = eb; \ + memset(u.tmp + 1, 0, lim - 1); \ + u.tmp[lim] = 0x80; \ + j = 1 + lim; \ + } else { \ + u.tmp[0] = eb | 0x80; \ + j = 1; \ + } \ + } else { \ + j = lim - kc->ptr; \ + u.tmp[0] = eb; \ + memset(u.tmp + 1, 0, j - 2); \ + u.tmp[j - 1] = 0x80; \ + } \ + one_core(kc, u.tmp, j, lim); \ + /* Finalize the "lane complement" */ \ + kc->u.narrow[ 2] = ~kc->u.narrow[ 2]; \ + kc->u.narrow[ 3] = ~kc->u.narrow[ 3]; \ + kc->u.narrow[ 4] = ~kc->u.narrow[ 4]; \ + kc->u.narrow[ 5] = ~kc->u.narrow[ 5]; \ + kc->u.narrow[16] = ~kc->u.narrow[16]; \ + kc->u.narrow[17] = ~kc->u.narrow[17]; \ + kc->u.narrow[24] = ~kc->u.narrow[24]; \ + kc->u.narrow[25] = ~kc->u.narrow[25]; \ + kc->u.narrow[34] = ~kc->u.narrow[34]; \ + kc->u.narrow[35] = ~kc->u.narrow[35]; \ + kc->u.narrow[40] = ~kc->u.narrow[40]; \ + kc->u.narrow[41] = ~kc->u.narrow[41]; \ + /* un-interleave */ \ + for (j = 0; j < 50; j += 2) \ + UNINTERLEAVE(kc->u.narrow[j], kc->u.narrow[j + 1]); \ + for (j = 0; j < d; j += 4) \ + bee_enc32le_aligned(u.tmp + j, kc->u.narrow[j >> 2]); \ + memcpy(dst, u.tmp, d); \ + one_init(kc, (unsigned)d << 3); \ + } \ + +#endif + +DEFCLOSE(64, 72) + + +/* see facet_one.h */ +void facet_one_init(void *cc) +{ + one_init(cc, 512); +} + +/* see facet_one.h */ +void facet_one(void *cc, const void *data, size_t len) +{ + one_core(cc, data, len, 72); +} + +/* see facet_one.h */ +void facet_one_close(void *cc, void *dst) +{ + facet_one_addbits_and_close(cc, 0, 0, dst); +} + +/* see facet_one.h */ +void facet_one_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + one_close64(cc, ub, n, dst); +} + + +#ifdef __cplusplus +} +#endif diff --git a/stratum/algos/honeycomb/facet_one.h b/stratum/algos/honeycomb/facet_one.h new file mode 100644 index 000000000..f64db1e56 --- /dev/null +++ b/stratum/algos/honeycomb/facet_one.h @@ -0,0 +1,81 @@ +#ifndef FACET_ONE_H +#define FACET_ONE_H + +#ifdef __cplusplus +extern "C"{ +#endif + +#include +#include "honeycomb_types.h" + + +//#undef BEE_64 // + +/** + * This structure is a context for HoneyComb Facet #1 computations: it contains the + * intermediate values and some data from the last entered block. Once a + * HoneyComb Facet #1 computation has been performed, the context can be reused for another computation. + * + * The contents of this structure are private. A running HoneyComb Facet #1 computation + * can be cloned by copying the context (e.g. with a simple memcpy() ). + */ +typedef struct { + unsigned char buf[144]; /* first field, for alignment */ + size_t ptr, lim; + union + { +#if BEE_64 //FACET_LEN_64 + bee_u64 wide[25]; +#endif + bee_u32 narrow[50]; + } u; + +} facet_one_context; + +/** + * Initialize a HoneyComb Facet #1 context. This process performs no memory allocation. + * + * @param cc the HoneyComb Facet #1 context ( pointer to a facet_one_context ) + */ +void facet_one_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the HoneyComb Facet #1 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void facet_one(void *cc, const void *data, size_t len); + +/** + * Terminate the current HoneyComb Facet #1 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (64 bytes). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #1 context + * @param dst the destination buffer + */ +void facet_one_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (64 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #1 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void facet_one_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/honeycomb/facet_six.c b/stratum/algos/honeycomb/facet_six.c new file mode 100644 index 000000000..edb905217 --- /dev/null +++ b/stratum/algos/honeycomb/facet_six.c @@ -0,0 +1,632 @@ +#include +#include +#include + +#include "facet_six.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* + * Some measures tend to show that the 64-bit implementation offers + * better performance only on a "64-bit architectures", those which have actual 64-bit registers. + */ +#if !defined BEE_ECHO_64 && BEE_64_TRUE + #define BEE_ECHO_64 1 +#endif + +/* + * We can use a 64-bit implementation only if a 64-bit type is available. + */ +#if !BEE_64 + #undef BEE_ECHO_64 +#endif + +#ifdef _MSC_VER +#pragma warning (disable: 4146) +#endif + +#define T32 BEE_T32 +#define C32 BEE_C32 +#if BEE_64 +#define C64 BEE_C64 +#endif + +#define AES_BIG_ENDIAN 0 +#include "facets_helper.c" + +#if BEE_ECHO_64 + +#define DECL_STATE_SMALL \ + bee_u64 W[16][2]; + +#define DECL_STATE_BIG \ + bee_u64 W[16][2]; + +#define INPUT_BLOCK_SMALL(sc) do { \ + unsigned u; \ + memcpy(W, sc->u.Vb, 8 * sizeof(bee_u64)); \ + for (u = 0; u < 12; u ++) { \ + W[u + 4][0] = bee_dec64le_aligned( \ + sc->buf + 16 * u); \ + W[u + 4][1] = bee_dec64le_aligned( \ + sc->buf + 16 * u + 8); \ + } \ + } while (0) + +#define INPUT_BLOCK_BIG(sc) do { \ + unsigned u; \ + memcpy(W, sc->u.Vb, 16 * sizeof(bee_u64)); \ + for (u = 0; u < 8; u ++) { \ + W[u + 8][0] = bee_dec64le_aligned( \ + sc->buf + 16 * u); \ + W[u + 8][1] = bee_dec64le_aligned( \ + sc->buf + 16 * u + 8); \ + } \ + } while (0) + + +#define AES_2ROUNDS(X) do { \ + bee_u32 X0 = (bee_u32)(X[0]); \ + bee_u32 X1 = (bee_u32)(X[0] >> 32); \ + bee_u32 X2 = (bee_u32)(X[1]); \ + bee_u32 X3 = (bee_u32)(X[1] >> 32); \ + bee_u32 Y0, Y1, Y2, Y3; \ + AES_ROUND_LE(X0, X1, X2, X3, K0, K1, K2, K3, Y0, Y1, Y2, Y3); \ + AES_ROUND_NOKEY_LE(Y0, Y1, Y2, Y3, X0, X1, X2, X3); \ + X[0] = (bee_u64)X0 | ((bee_u64)X1 << 32); \ + X[1] = (bee_u64)X2 | ((bee_u64)X3 << 32); \ + if ((K0 = T32(K0 + 1)) == 0) { \ + if ((K1 = T32(K1 + 1)) == 0) \ + if ((K2 = T32(K2 + 1)) == 0) \ + K3 = T32(K3 + 1); \ + } \ + } while (0) + +#define BIG_SUB_WORDS do { \ + AES_2ROUNDS(W[ 0]); \ + AES_2ROUNDS(W[ 1]); \ + AES_2ROUNDS(W[ 2]); \ + AES_2ROUNDS(W[ 3]); \ + AES_2ROUNDS(W[ 4]); \ + AES_2ROUNDS(W[ 5]); \ + AES_2ROUNDS(W[ 6]); \ + AES_2ROUNDS(W[ 7]); \ + AES_2ROUNDS(W[ 8]); \ + AES_2ROUNDS(W[ 9]); \ + AES_2ROUNDS(W[10]); \ + AES_2ROUNDS(W[11]); \ + AES_2ROUNDS(W[12]); \ + AES_2ROUNDS(W[13]); \ + AES_2ROUNDS(W[14]); \ + AES_2ROUNDS(W[15]); \ + } while (0) + + +#define SHIFT_ROW1(a, b, c, d) do { \ + bee_u64 tmp; \ + tmp = W[a][0]; \ + W[a][0] = W[b][0]; \ + W[b][0] = W[c][0]; \ + W[c][0] = W[d][0]; \ + W[d][0] = tmp; \ + tmp = W[a][1]; \ + W[a][1] = W[b][1]; \ + W[b][1] = W[c][1]; \ + W[c][1] = W[d][1]; \ + W[d][1] = tmp; \ + } while (0) + +#define SHIFT_ROW2(a, b, c, d) do { \ + bee_u64 tmp; \ + tmp = W[a][0]; \ + W[a][0] = W[c][0]; \ + W[c][0] = tmp; \ + tmp = W[b][0]; \ + W[b][0] = W[d][0]; \ + W[d][0] = tmp; \ + tmp = W[a][1]; \ + W[a][1] = W[c][1]; \ + W[c][1] = tmp; \ + tmp = W[b][1]; \ + W[b][1] = W[d][1]; \ + W[d][1] = tmp; \ + } while (0) + +#define SHIFT_ROW3(a, b, c, d) SHIFT_ROW1(d, c, b, a) + +#define BIG_SHIFT_ROWS do { \ + SHIFT_ROW1(1, 5, 9, 13); \ + SHIFT_ROW2(2, 6, 10, 14); \ + SHIFT_ROW3(3, 7, 11, 15); \ + } while (0) + + +#define MIX_COLUMN1(ia, ib, ic, id, n) do { \ + bee_u64 a = W[ia][n]; \ + bee_u64 b = W[ib][n]; \ + bee_u64 c = W[ic][n]; \ + bee_u64 d = W[id][n]; \ + bee_u64 ab = a ^ b; \ + bee_u64 bc = b ^ c; \ + bee_u64 cd = c ^ d; \ + bee_u64 abx = ((ab & C64(0x8080808080808080)) >> 7) * 27U \ + ^ ((ab & C64(0x7F7F7F7F7F7F7F7F)) << 1); \ + bee_u64 bcx = ((bc & C64(0x8080808080808080)) >> 7) * 27U \ + ^ ((bc & C64(0x7F7F7F7F7F7F7F7F)) << 1); \ + bee_u64 cdx = ((cd & C64(0x8080808080808080)) >> 7) * 27U \ + ^ ((cd & C64(0x7F7F7F7F7F7F7F7F)) << 1); \ + W[ia][n] = abx ^ bc ^ d; \ + W[ib][n] = bcx ^ a ^ cd; \ + W[ic][n] = cdx ^ ab ^ d; \ + W[id][n] = abx ^ bcx ^ cdx ^ ab ^ c; \ + } while (0) + +#define MIX_COLUMN(a, b, c, d) do { \ + MIX_COLUMN1(a, b, c, d, 0); \ + MIX_COLUMN1(a, b, c, d, 1); \ + } while (0) + + +#define BIG_MIX_COLUMNS do { \ + MIX_COLUMN(0, 1, 2, 3); \ + MIX_COLUMN(4, 5, 6, 7); \ + MIX_COLUMN(8, 9, 10, 11); \ + MIX_COLUMN(12, 13, 14, 15); \ + } while (0) + +#define BIG_ROUND do { \ + BIG_SUB_WORDS; \ + BIG_SHIFT_ROWS; \ + BIG_MIX_COLUMNS; \ + } while (0) + +#define FINAL_SMALL do { \ + unsigned u; \ + bee_u64 *VV = &sc->u.Vb[0][0]; \ + bee_u64 *WW = &W[0][0]; \ + for (u = 0; u < 8; u ++) { \ + VV[u] ^= bee_dec64le_aligned(sc->buf + (u * 8)) \ + ^ bee_dec64le_aligned(sc->buf + (u * 8) + 64) \ + ^ bee_dec64le_aligned(sc->buf + (u * 8) + 128) \ + ^ WW[u] ^ WW[u + 8] \ + ^ WW[u + 16] ^ WW[u + 24]; \ + } \ + } while (0) + +#define FINAL_BIG do { \ + unsigned u; \ + bee_u64 *VV = &sc->u.Vb[0][0]; \ + bee_u64 *WW = &W[0][0]; \ + for (u = 0; u < 16; u ++) { \ + VV[u] ^= bee_dec64le_aligned(sc->buf + (u * 8)) \ + ^ WW[u] ^ WW[u + 16]; \ + } \ + } while (0) + +#define COMPRESS_SMALL(sc) do { \ + bee_u32 K0 = sc->C0; \ + bee_u32 K1 = sc->C1; \ + bee_u32 K2 = sc->C2; \ + bee_u32 K3 = sc->C3; \ + unsigned u; \ + INPUT_BLOCK_SMALL(sc); \ + for (u = 0; u < 8; u ++) { \ + BIG_ROUND; \ + } \ + FINAL_SMALL; \ + } while (0) + +#define COMPRESS_BIG(sc) do { \ + bee_u32 K0 = sc->C0; \ + bee_u32 K1 = sc->C1; \ + bee_u32 K2 = sc->C2; \ + bee_u32 K3 = sc->C3; \ + unsigned u; \ + INPUT_BLOCK_BIG(sc); \ + for (u = 0; u < 10; u ++) { \ + BIG_ROUND; \ + } \ + FINAL_BIG; \ + } while (0) + +#else + +#define DECL_STATE_SMALL \ + bee_u32 W[16][4]; + +#define DECL_STATE_BIG \ + bee_u32 W[16][4]; + +#define INPUT_BLOCK_SMALL(sc) do { \ + unsigned u; \ + memcpy(W, sc->u.Vs, 16 * sizeof(bee_u32)); \ + for (u = 0; u < 12; u ++) { \ + W[u + 4][0] = bee_dec32le_aligned( \ + sc->buf + 16 * u); \ + W[u + 4][1] = bee_dec32le_aligned( \ + sc->buf + 16 * u + 4); \ + W[u + 4][2] = bee_dec32le_aligned( \ + sc->buf + 16 * u + 8); \ + W[u + 4][3] = bee_dec32le_aligned( \ + sc->buf + 16 * u + 12); \ + } \ + } while (0) + +#define INPUT_BLOCK_BIG(sc) do { \ + unsigned u; \ + memcpy(W, sc->u.Vs, 32 * sizeof(bee_u32)); \ + for (u = 0; u < 8; u ++) { \ + W[u + 8][0] = bee_dec32le_aligned( \ + sc->buf + 16 * u); \ + W[u + 8][1] = bee_dec32le_aligned( \ + sc->buf + 16 * u + 4); \ + W[u + 8][2] = bee_dec32le_aligned( \ + sc->buf + 16 * u + 8); \ + W[u + 8][3] = bee_dec32le_aligned( \ + sc->buf + 16 * u + 12); \ + } \ + } while (0) + + +#define AES_2ROUNDS(X) do { \ + bee_u32 Y0, Y1, Y2, Y3; \ + AES_ROUND_LE(X[0], X[1], X[2], X[3], \ + K0, K1, K2, K3, Y0, Y1, Y2, Y3); \ + AES_ROUND_NOKEY_LE(Y0, Y1, Y2, Y3, X[0], X[1], X[2], X[3]); \ + if ((K0 = T32(K0 + 1)) == 0) { \ + if ((K1 = T32(K1 + 1)) == 0) \ + if ((K2 = T32(K2 + 1)) == 0) \ + K3 = T32(K3 + 1); \ + } \ + } while (0) + +#define BIG_SUB_WORDS do { \ + AES_2ROUNDS(W[ 0]); \ + AES_2ROUNDS(W[ 1]); \ + AES_2ROUNDS(W[ 2]); \ + AES_2ROUNDS(W[ 3]); \ + AES_2ROUNDS(W[ 4]); \ + AES_2ROUNDS(W[ 5]); \ + AES_2ROUNDS(W[ 6]); \ + AES_2ROUNDS(W[ 7]); \ + AES_2ROUNDS(W[ 8]); \ + AES_2ROUNDS(W[ 9]); \ + AES_2ROUNDS(W[10]); \ + AES_2ROUNDS(W[11]); \ + AES_2ROUNDS(W[12]); \ + AES_2ROUNDS(W[13]); \ + AES_2ROUNDS(W[14]); \ + AES_2ROUNDS(W[15]); \ + } while (0) + + +#define SHIFT_ROW1(a, b, c, d) do { \ + bee_u32 tmp; \ + tmp = W[a][0]; \ + W[a][0] = W[b][0]; \ + W[b][0] = W[c][0]; \ + W[c][0] = W[d][0]; \ + W[d][0] = tmp; \ + tmp = W[a][1]; \ + W[a][1] = W[b][1]; \ + W[b][1] = W[c][1]; \ + W[c][1] = W[d][1]; \ + W[d][1] = tmp; \ + tmp = W[a][2]; \ + W[a][2] = W[b][2]; \ + W[b][2] = W[c][2]; \ + W[c][2] = W[d][2]; \ + W[d][2] = tmp; \ + tmp = W[a][3]; \ + W[a][3] = W[b][3]; \ + W[b][3] = W[c][3]; \ + W[c][3] = W[d][3]; \ + W[d][3] = tmp; \ + } while (0) + +#define SHIFT_ROW2(a, b, c, d) do { \ + bee_u32 tmp; \ + tmp = W[a][0]; \ + W[a][0] = W[c][0]; \ + W[c][0] = tmp; \ + tmp = W[b][0]; \ + W[b][0] = W[d][0]; \ + W[d][0] = tmp; \ + tmp = W[a][1]; \ + W[a][1] = W[c][1]; \ + W[c][1] = tmp; \ + tmp = W[b][1]; \ + W[b][1] = W[d][1]; \ + W[d][1] = tmp; \ + tmp = W[a][2]; \ + W[a][2] = W[c][2]; \ + W[c][2] = tmp; \ + tmp = W[b][2]; \ + W[b][2] = W[d][2]; \ + W[d][2] = tmp; \ + tmp = W[a][3]; \ + W[a][3] = W[c][3]; \ + W[c][3] = tmp; \ + tmp = W[b][3]; \ + W[b][3] = W[d][3]; \ + W[d][3] = tmp; \ + } while (0) + +#define SHIFT_ROW3(a, b, c, d) SHIFT_ROW1(d, c, b, a) + +#define BIG_SHIFT_ROWS do { \ + SHIFT_ROW1(1, 5, 9, 13); \ + SHIFT_ROW2(2, 6, 10, 14); \ + SHIFT_ROW3(3, 7, 11, 15); \ + } while (0) + + +#define MIX_COLUMN1(ia, ib, ic, id, n) do { \ + bee_u32 a = W[ia][n]; \ + bee_u32 b = W[ib][n]; \ + bee_u32 c = W[ic][n]; \ + bee_u32 d = W[id][n]; \ + bee_u32 ab = a ^ b; \ + bee_u32 bc = b ^ c; \ + bee_u32 cd = c ^ d; \ + bee_u32 abx = ((ab & C32(0x80808080)) >> 7) * 27U \ + ^ ((ab & C32(0x7F7F7F7F)) << 1); \ + bee_u32 bcx = ((bc & C32(0x80808080)) >> 7) * 27U \ + ^ ((bc & C32(0x7F7F7F7F)) << 1); \ + bee_u32 cdx = ((cd & C32(0x80808080)) >> 7) * 27U \ + ^ ((cd & C32(0x7F7F7F7F)) << 1); \ + W[ia][n] = abx ^ bc ^ d; \ + W[ib][n] = bcx ^ a ^ cd; \ + W[ic][n] = cdx ^ ab ^ d; \ + W[id][n] = abx ^ bcx ^ cdx ^ ab ^ c; \ + } while (0) + +#define MIX_COLUMN(a, b, c, d) do { \ + MIX_COLUMN1(a, b, c, d, 0); \ + MIX_COLUMN1(a, b, c, d, 1); \ + MIX_COLUMN1(a, b, c, d, 2); \ + MIX_COLUMN1(a, b, c, d, 3); \ + } while (0) + +#define BIG_MIX_COLUMNS do { \ + MIX_COLUMN(0, 1, 2, 3); \ + MIX_COLUMN(4, 5, 6, 7); \ + MIX_COLUMN(8, 9, 10, 11); \ + MIX_COLUMN(12, 13, 14, 15); \ + } while (0) + +#define BIG_ROUND do { \ + BIG_SUB_WORDS; \ + BIG_SHIFT_ROWS; \ + BIG_MIX_COLUMNS; \ + } while (0) + +#define FINAL_SMALL do { \ + unsigned u; \ + bee_u32 *VV = &sc->u.Vs[0][0]; \ + bee_u32 *WW = &W[0][0]; \ + for (u = 0; u < 16; u ++) { \ + VV[u] ^= bee_dec32le_aligned(sc->buf + (u * 4)) \ + ^ bee_dec32le_aligned(sc->buf + (u * 4) + 64) \ + ^ bee_dec32le_aligned(sc->buf + (u * 4) + 128) \ + ^ WW[u] ^ WW[u + 16] \ + ^ WW[u + 32] ^ WW[u + 48]; \ + } \ + } while (0) + +#define FINAL_BIG do { \ + unsigned u; \ + bee_u32 *VV = &sc->u.Vs[0][0]; \ + bee_u32 *WW = &W[0][0]; \ + for (u = 0; u < 32; u ++) { \ + VV[u] ^= bee_dec32le_aligned(sc->buf + (u * 4)) \ + ^ WW[u] ^ WW[u + 32]; \ + } \ + } while (0) + +#define COMPRESS_SMALL(sc) do { \ + bee_u32 K0 = sc->C0; \ + bee_u32 K1 = sc->C1; \ + bee_u32 K2 = sc->C2; \ + bee_u32 K3 = sc->C3; \ + unsigned u; \ + INPUT_BLOCK_SMALL(sc); \ + for (u = 0; u < 8; u ++) { \ + BIG_ROUND; \ + } \ + FINAL_SMALL; \ + } while (0) + +#define COMPRESS_BIG(sc) do { \ + bee_u32 K0 = sc->C0; \ + bee_u32 K1 = sc->C1; \ + bee_u32 K2 = sc->C2; \ + bee_u32 K3 = sc->C3; \ + unsigned u; \ + INPUT_BLOCK_BIG(sc); \ + for (u = 0; u < 10; u ++) { \ + BIG_ROUND; \ + } \ + FINAL_BIG; \ + } while (0) + +#endif + +#define INCR_COUNTER(sc, val) do { \ + sc->C0 = T32(sc->C0 + (bee_u32)(val)); \ + if (sc->C0 < (bee_u32)(val)) { \ + if ((sc->C1 = T32(sc->C1 + 1)) == 0) \ + if ((sc->C2 = T32(sc->C2 + 1)) == 0) \ + sc->C3 = T32(sc->C3 + 1); \ + } \ + } while (0) + +static void six_init(facet_six_context *sc, unsigned out_len) +{ +#if BEE_ECHO_64 + sc->u.Vb[0][0] = (bee_u64)out_len; + sc->u.Vb[0][1] = 0; + sc->u.Vb[1][0] = (bee_u64)out_len; + sc->u.Vb[1][1] = 0; + sc->u.Vb[2][0] = (bee_u64)out_len; + sc->u.Vb[2][1] = 0; + sc->u.Vb[3][0] = (bee_u64)out_len; + sc->u.Vb[3][1] = 0; + sc->u.Vb[4][0] = (bee_u64)out_len; + sc->u.Vb[4][1] = 0; + sc->u.Vb[5][0] = (bee_u64)out_len; + sc->u.Vb[5][1] = 0; + sc->u.Vb[6][0] = (bee_u64)out_len; + sc->u.Vb[6][1] = 0; + sc->u.Vb[7][0] = (bee_u64)out_len; + sc->u.Vb[7][1] = 0; +#else + sc->u.Vs[0][0] = (bee_u32)out_len; + sc->u.Vs[0][1] = sc->u.Vs[0][2] = sc->u.Vs[0][3] = 0; + sc->u.Vs[1][0] = (bee_u32)out_len; + sc->u.Vs[1][1] = sc->u.Vs[1][2] = sc->u.Vs[1][3] = 0; + sc->u.Vs[2][0] = (bee_u32)out_len; + sc->u.Vs[2][1] = sc->u.Vs[2][2] = sc->u.Vs[2][3] = 0; + sc->u.Vs[3][0] = (bee_u32)out_len; + sc->u.Vs[3][1] = sc->u.Vs[3][2] = sc->u.Vs[3][3] = 0; + sc->u.Vs[4][0] = (bee_u32)out_len; + sc->u.Vs[4][1] = sc->u.Vs[4][2] = sc->u.Vs[4][3] = 0; + sc->u.Vs[5][0] = (bee_u32)out_len; + sc->u.Vs[5][1] = sc->u.Vs[5][2] = sc->u.Vs[5][3] = 0; + sc->u.Vs[6][0] = (bee_u32)out_len; + sc->u.Vs[6][1] = sc->u.Vs[6][2] = sc->u.Vs[6][3] = 0; + sc->u.Vs[7][0] = (bee_u32)out_len; + sc->u.Vs[7][1] = sc->u.Vs[7][2] = sc->u.Vs[7][3] = 0; +#endif + sc->ptr = 0; + sc->C0 = sc->C1 = sc->C2 = sc->C3 = 0; +} + +static void six_compress(facet_six_context *sc) +{ + DECL_STATE_BIG + + COMPRESS_BIG(sc); +} + +static void six_core(facet_six_context *sc, const unsigned char *data, size_t len) +{ + unsigned char *buf; + size_t ptr; + + buf = sc->buf; + ptr = sc->ptr; + if (len < (sizeof sc->buf) - ptr) { + memcpy(buf + ptr, data, len); + ptr += len; + sc->ptr = ptr; + return; + } + + while (len > 0) { + size_t clen; + + clen = (sizeof sc->buf) - ptr; + if (clen > len) + clen = len; + memcpy(buf + ptr, data, clen); + ptr += clen; + data += clen; + len -= clen; + if (ptr == sizeof sc->buf) { + INCR_COUNTER(sc, 1024); + six_compress(sc); + ptr = 0; + } + } + sc->ptr = ptr; +} + +static void six_close(facet_six_context *sc, unsigned ub, unsigned n, void *dst, unsigned out_size_w32) +{ + unsigned char *buf; + size_t ptr; + unsigned z; + unsigned elen; + union { + unsigned char tmp[64]; + bee_u32 dummy; +#if BEE_ECHO_64 + bee_u64 dummy2; +#endif + } u; +#if BEE_ECHO_64 + bee_u64 *VV; +#else + bee_u32 *VV; +#endif + unsigned k; + + buf = sc->buf; + ptr = sc->ptr; + elen = ((unsigned)ptr << 3) + n; + INCR_COUNTER(sc, elen); + bee_enc32le_aligned(u.tmp, sc->C0); + bee_enc32le_aligned(u.tmp + 4, sc->C1); + bee_enc32le_aligned(u.tmp + 8, sc->C2); + bee_enc32le_aligned(u.tmp + 12, sc->C3); + /* + * If elen is zero, then this block actually contains no message + * bit, only the first padding bit. + */ + if (elen == 0) { + sc->C0 = sc->C1 = sc->C2 = sc->C3 = 0; + } + z = (unsigned)0x80 >> n; + buf[ptr ++] = ((ub & -z) | z) & 0xFF; + memset(buf + ptr, 0, (sizeof sc->buf) - ptr); + if (ptr > ((sizeof sc->buf) - 18)) { + six_compress(sc); + sc->C0 = sc->C1 = sc->C2 = sc->C3 = 0; + memset(buf, 0, sizeof sc->buf); + } + bee_enc16le(buf + (sizeof sc->buf) - 18, out_size_w32 << 5); + memcpy(buf + (sizeof sc->buf) - 16, u.tmp, 16); + six_compress(sc); +#if BEE_ECHO_64 + for (VV = &sc->u.Vb[0][0], k = 0; k < ((out_size_w32 + 1) >> 1); k ++) + bee_enc64le_aligned(u.tmp + (k << 3), VV[k]); +#else + for (VV = &sc->u.Vs[0][0], k = 0; k < out_size_w32; k ++) + bee_enc32le_aligned(u.tmp + (k << 2), VV[k]); +#endif + memcpy(dst, u.tmp, out_size_w32 << 2); + six_init(sc, out_size_w32 << 5); +} + + +/* see facet_six.h */ +void facet_six_init(void *cc) +{ + six_init(cc, 512); +} + +/* see facet_six.h */ +void facet_six(void *cc, const void *data, size_t len) +{ + six_core(cc, data, len); +} + +/* see facet_six.h */ +void facet_six_close(void *cc, void *dst) +{ + six_close(cc, 0, 0, dst, 16); +} + +/* see facet_six.h */ +void facet_six_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + six_close(cc, ub, n, dst, 16); +} + +#ifdef __cplusplus +} +#endif diff --git a/stratum/algos/honeycomb/facet_six.h b/stratum/algos/honeycomb/facet_six.h new file mode 100644 index 000000000..cd4653e7f --- /dev/null +++ b/stratum/algos/honeycomb/facet_six.h @@ -0,0 +1,82 @@ +#ifndef FACET_SIX_H +#define FACET_SIX_H + +#ifdef __cplusplus + extern "C"{ +#endif + +#include +#include "honeycomb_types.h" + + +#undef BEE_64 + +/** + * This structure is a context for HoneyComb Facet #6 computations: it contains the + * intermediate values and some data from the last entered block. Once + * an HoneyComb Facet #6 computation has been performed, the context can be reused for + * another computation. This specific structure is used for HoneyComb Facet #6. + * + * The contents of this structure are private. A running HoneyComb Facet #6 computation + * can be cloned by copying the context (e.g. with a simple memcpy()). + */ +typedef struct { + unsigned char buf[128]; /* first field, for alignment */ + size_t ptr; + union { + bee_u32 Vs[8][4]; +#if BEE_64 + bee_u64 Vb[8][2]; +#endif + } u; + bee_u32 C0, C1, C2, C3; +} facet_six_context; + + +/** + * Initialize an HoneyComb Facet #6 context. This process performs no memory allocation. + * + * @param cc the HoneyComb Facet #6 context (pointer to a facet_six_context ) + */ +void facet_six_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the HoneyComb Facet #6 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void facet_six(void *cc, const void *data, size_t len); + +/** + * Terminate the current HoneyComb Facet #6 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (64 bytes). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #6 context + * @param dst the destination buffer + */ +void facet_six_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (64 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #6 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void facet_six_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/honeycomb/facet_three.c b/stratum/algos/honeycomb/facet_three.c new file mode 100644 index 000000000..a7e20f762 --- /dev/null +++ b/stratum/algos/honeycomb/facet_three.c @@ -0,0 +1,558 @@ +#include +#include + +#ifdef __cplusplus +extern "C"{ +#endif + +#include "facet_three.h" + +#ifdef _MSC_VER +#pragma warning (disable: 4146) +#endif + +/* + * Part of this code was automatically generated (the part between + * the "BEGIN" and "END" markers). + */ + +#define sM 16 + +#define C32 BEE_C32 +#define T32 BEE_T32 + +#define O1 13 +#define O2 9 +#define O3 6 + +/* + * We copy the state into local variables, so that the compiler knows + * that it can optimize them at will. + */ + +/* BEGIN -- automatically generated code. */ + +#define DECL_STATE \ + bee_u32 A00, A01, A02, A03, A04, A05, A06, A07, \ + A08, A09, A0A, A0B; \ + bee_u32 B0, B1, B2, B3, B4, B5, B6, B7, \ + B8, B9, BA, BB, BC, BD, BE, BF; \ + bee_u32 C0, C1, C2, C3, C4, C5, C6, C7, \ + C8, C9, CA, CB, CC, CD, CE, CF; \ + bee_u32 M0, M1, M2, M3, M4, M5, M6, M7, \ + M8, M9, MA, MB, MC, MD, ME, MF; \ + bee_u32 Wlow, Whigh; + +#define READ_STATE(state) do { \ + A00 = (state)->A[0]; \ + A01 = (state)->A[1]; \ + A02 = (state)->A[2]; \ + A03 = (state)->A[3]; \ + A04 = (state)->A[4]; \ + A05 = (state)->A[5]; \ + A06 = (state)->A[6]; \ + A07 = (state)->A[7]; \ + A08 = (state)->A[8]; \ + A09 = (state)->A[9]; \ + A0A = (state)->A[10]; \ + A0B = (state)->A[11]; \ + B0 = (state)->B[0]; \ + B1 = (state)->B[1]; \ + B2 = (state)->B[2]; \ + B3 = (state)->B[3]; \ + B4 = (state)->B[4]; \ + B5 = (state)->B[5]; \ + B6 = (state)->B[6]; \ + B7 = (state)->B[7]; \ + B8 = (state)->B[8]; \ + B9 = (state)->B[9]; \ + BA = (state)->B[10]; \ + BB = (state)->B[11]; \ + BC = (state)->B[12]; \ + BD = (state)->B[13]; \ + BE = (state)->B[14]; \ + BF = (state)->B[15]; \ + C0 = (state)->C[0]; \ + C1 = (state)->C[1]; \ + C2 = (state)->C[2]; \ + C3 = (state)->C[3]; \ + C4 = (state)->C[4]; \ + C5 = (state)->C[5]; \ + C6 = (state)->C[6]; \ + C7 = (state)->C[7]; \ + C8 = (state)->C[8]; \ + C9 = (state)->C[9]; \ + CA = (state)->C[10]; \ + CB = (state)->C[11]; \ + CC = (state)->C[12]; \ + CD = (state)->C[13]; \ + CE = (state)->C[14]; \ + CF = (state)->C[15]; \ + Wlow = (state)->Wlow; \ + Whigh = (state)->Whigh; \ + } while (0) + +#define WRITE_STATE(state) do { \ + (state)->A[0] = A00; \ + (state)->A[1] = A01; \ + (state)->A[2] = A02; \ + (state)->A[3] = A03; \ + (state)->A[4] = A04; \ + (state)->A[5] = A05; \ + (state)->A[6] = A06; \ + (state)->A[7] = A07; \ + (state)->A[8] = A08; \ + (state)->A[9] = A09; \ + (state)->A[10] = A0A; \ + (state)->A[11] = A0B; \ + (state)->B[0] = B0; \ + (state)->B[1] = B1; \ + (state)->B[2] = B2; \ + (state)->B[3] = B3; \ + (state)->B[4] = B4; \ + (state)->B[5] = B5; \ + (state)->B[6] = B6; \ + (state)->B[7] = B7; \ + (state)->B[8] = B8; \ + (state)->B[9] = B9; \ + (state)->B[10] = BA; \ + (state)->B[11] = BB; \ + (state)->B[12] = BC; \ + (state)->B[13] = BD; \ + (state)->B[14] = BE; \ + (state)->B[15] = BF; \ + (state)->C[0] = C0; \ + (state)->C[1] = C1; \ + (state)->C[2] = C2; \ + (state)->C[3] = C3; \ + (state)->C[4] = C4; \ + (state)->C[5] = C5; \ + (state)->C[6] = C6; \ + (state)->C[7] = C7; \ + (state)->C[8] = C8; \ + (state)->C[9] = C9; \ + (state)->C[10] = CA; \ + (state)->C[11] = CB; \ + (state)->C[12] = CC; \ + (state)->C[13] = CD; \ + (state)->C[14] = CE; \ + (state)->C[15] = CF; \ + (state)->Wlow = Wlow; \ + (state)->Whigh = Whigh; \ + } while (0) + +#define DECODE_BLOCK do { \ + M0 = bee_dec32le_aligned(buf + 0); \ + M1 = bee_dec32le_aligned(buf + 4); \ + M2 = bee_dec32le_aligned(buf + 8); \ + M3 = bee_dec32le_aligned(buf + 12); \ + M4 = bee_dec32le_aligned(buf + 16); \ + M5 = bee_dec32le_aligned(buf + 20); \ + M6 = bee_dec32le_aligned(buf + 24); \ + M7 = bee_dec32le_aligned(buf + 28); \ + M8 = bee_dec32le_aligned(buf + 32); \ + M9 = bee_dec32le_aligned(buf + 36); \ + MA = bee_dec32le_aligned(buf + 40); \ + MB = bee_dec32le_aligned(buf + 44); \ + MC = bee_dec32le_aligned(buf + 48); \ + MD = bee_dec32le_aligned(buf + 52); \ + ME = bee_dec32le_aligned(buf + 56); \ + MF = bee_dec32le_aligned(buf + 60); \ + } while (0) + +#define INPUT_BLOCK_ADD do { \ + B0 = T32(B0 + M0); \ + B1 = T32(B1 + M1); \ + B2 = T32(B2 + M2); \ + B3 = T32(B3 + M3); \ + B4 = T32(B4 + M4); \ + B5 = T32(B5 + M5); \ + B6 = T32(B6 + M6); \ + B7 = T32(B7 + M7); \ + B8 = T32(B8 + M8); \ + B9 = T32(B9 + M9); \ + BA = T32(BA + MA); \ + BB = T32(BB + MB); \ + BC = T32(BC + MC); \ + BD = T32(BD + MD); \ + BE = T32(BE + ME); \ + BF = T32(BF + MF); \ + } while (0) + +#define INPUT_BLOCK_SUB do { \ + C0 = T32(C0 - M0); \ + C1 = T32(C1 - M1); \ + C2 = T32(C2 - M2); \ + C3 = T32(C3 - M3); \ + C4 = T32(C4 - M4); \ + C5 = T32(C5 - M5); \ + C6 = T32(C6 - M6); \ + C7 = T32(C7 - M7); \ + C8 = T32(C8 - M8); \ + C9 = T32(C9 - M9); \ + CA = T32(CA - MA); \ + CB = T32(CB - MB); \ + CC = T32(CC - MC); \ + CD = T32(CD - MD); \ + CE = T32(CE - ME); \ + CF = T32(CF - MF); \ + } while (0) + +#define XOR_W do { \ + A00 ^= Wlow; \ + A01 ^= Whigh; \ + } while (0) + +#define SWAP(v1, v2) do { \ + bee_u32 tmp = (v1); \ + (v1) = (v2); \ + (v2) = tmp; \ + } while (0) + +#define SWAP_BC do { \ + SWAP(B0, C0); \ + SWAP(B1, C1); \ + SWAP(B2, C2); \ + SWAP(B3, C3); \ + SWAP(B4, C4); \ + SWAP(B5, C5); \ + SWAP(B6, C6); \ + SWAP(B7, C7); \ + SWAP(B8, C8); \ + SWAP(B9, C9); \ + SWAP(BA, CA); \ + SWAP(BB, CB); \ + SWAP(BC, CC); \ + SWAP(BD, CD); \ + SWAP(BE, CE); \ + SWAP(BF, CF); \ + } while (0) + +#define PERM_ELT(xa0, xa1, xb0, xb1, xb2, xb3, xc, xm) do { \ + xa0 = T32((xa0 \ + ^ (((xa1 << 15) | (xa1 >> 17)) * 5U) \ + ^ xc) * 3U) \ + ^ xb1 ^ (xb2 & ~xb3) ^ xm; \ + xb0 = T32(~(((xb0 << 1) | (xb0 >> 31)) ^ xa0)); \ + } while (0) + +#define PERM_STEP_0 do { \ + PERM_ELT(A00, A0B, B0, BD, B9, B6, C8, M0); \ + PERM_ELT(A01, A00, B1, BE, BA, B7, C7, M1); \ + PERM_ELT(A02, A01, B2, BF, BB, B8, C6, M2); \ + PERM_ELT(A03, A02, B3, B0, BC, B9, C5, M3); \ + PERM_ELT(A04, A03, B4, B1, BD, BA, C4, M4); \ + PERM_ELT(A05, A04, B5, B2, BE, BB, C3, M5); \ + PERM_ELT(A06, A05, B6, B3, BF, BC, C2, M6); \ + PERM_ELT(A07, A06, B7, B4, B0, BD, C1, M7); \ + PERM_ELT(A08, A07, B8, B5, B1, BE, C0, M8); \ + PERM_ELT(A09, A08, B9, B6, B2, BF, CF, M9); \ + PERM_ELT(A0A, A09, BA, B7, B3, B0, CE, MA); \ + PERM_ELT(A0B, A0A, BB, B8, B4, B1, CD, MB); \ + PERM_ELT(A00, A0B, BC, B9, B5, B2, CC, MC); \ + PERM_ELT(A01, A00, BD, BA, B6, B3, CB, MD); \ + PERM_ELT(A02, A01, BE, BB, B7, B4, CA, ME); \ + PERM_ELT(A03, A02, BF, BC, B8, B5, C9, MF); \ + } while (0) + +#define PERM_STEP_1 do { \ + PERM_ELT(A04, A03, B0, BD, B9, B6, C8, M0); \ + PERM_ELT(A05, A04, B1, BE, BA, B7, C7, M1); \ + PERM_ELT(A06, A05, B2, BF, BB, B8, C6, M2); \ + PERM_ELT(A07, A06, B3, B0, BC, B9, C5, M3); \ + PERM_ELT(A08, A07, B4, B1, BD, BA, C4, M4); \ + PERM_ELT(A09, A08, B5, B2, BE, BB, C3, M5); \ + PERM_ELT(A0A, A09, B6, B3, BF, BC, C2, M6); \ + PERM_ELT(A0B, A0A, B7, B4, B0, BD, C1, M7); \ + PERM_ELT(A00, A0B, B8, B5, B1, BE, C0, M8); \ + PERM_ELT(A01, A00, B9, B6, B2, BF, CF, M9); \ + PERM_ELT(A02, A01, BA, B7, B3, B0, CE, MA); \ + PERM_ELT(A03, A02, BB, B8, B4, B1, CD, MB); \ + PERM_ELT(A04, A03, BC, B9, B5, B2, CC, MC); \ + PERM_ELT(A05, A04, BD, BA, B6, B3, CB, MD); \ + PERM_ELT(A06, A05, BE, BB, B7, B4, CA, ME); \ + PERM_ELT(A07, A06, BF, BC, B8, B5, C9, MF); \ + } while (0) + +#define PERM_STEP_2 do { \ + PERM_ELT(A08, A07, B0, BD, B9, B6, C8, M0); \ + PERM_ELT(A09, A08, B1, BE, BA, B7, C7, M1); \ + PERM_ELT(A0A, A09, B2, BF, BB, B8, C6, M2); \ + PERM_ELT(A0B, A0A, B3, B0, BC, B9, C5, M3); \ + PERM_ELT(A00, A0B, B4, B1, BD, BA, C4, M4); \ + PERM_ELT(A01, A00, B5, B2, BE, BB, C3, M5); \ + PERM_ELT(A02, A01, B6, B3, BF, BC, C2, M6); \ + PERM_ELT(A03, A02, B7, B4, B0, BD, C1, M7); \ + PERM_ELT(A04, A03, B8, B5, B1, BE, C0, M8); \ + PERM_ELT(A05, A04, B9, B6, B2, BF, CF, M9); \ + PERM_ELT(A06, A05, BA, B7, B3, B0, CE, MA); \ + PERM_ELT(A07, A06, BB, B8, B4, B1, CD, MB); \ + PERM_ELT(A08, A07, BC, B9, B5, B2, CC, MC); \ + PERM_ELT(A09, A08, BD, BA, B6, B3, CB, MD); \ + PERM_ELT(A0A, A09, BE, BB, B7, B4, CA, ME); \ + PERM_ELT(A0B, A0A, BF, BC, B8, B5, C9, MF); \ + } while (0) + +#define APPLY_P do { \ + B0 = T32(B0 << 17) | (B0 >> 15); \ + B1 = T32(B1 << 17) | (B1 >> 15); \ + B2 = T32(B2 << 17) | (B2 >> 15); \ + B3 = T32(B3 << 17) | (B3 >> 15); \ + B4 = T32(B4 << 17) | (B4 >> 15); \ + B5 = T32(B5 << 17) | (B5 >> 15); \ + B6 = T32(B6 << 17) | (B6 >> 15); \ + B7 = T32(B7 << 17) | (B7 >> 15); \ + B8 = T32(B8 << 17) | (B8 >> 15); \ + B9 = T32(B9 << 17) | (B9 >> 15); \ + BA = T32(BA << 17) | (BA >> 15); \ + BB = T32(BB << 17) | (BB >> 15); \ + BC = T32(BC << 17) | (BC >> 15); \ + BD = T32(BD << 17) | (BD >> 15); \ + BE = T32(BE << 17) | (BE >> 15); \ + BF = T32(BF << 17) | (BF >> 15); \ + PERM_STEP_0; \ + PERM_STEP_1; \ + PERM_STEP_2; \ + A0B = T32(A0B + C6); \ + A0A = T32(A0A + C5); \ + A09 = T32(A09 + C4); \ + A08 = T32(A08 + C3); \ + A07 = T32(A07 + C2); \ + A06 = T32(A06 + C1); \ + A05 = T32(A05 + C0); \ + A04 = T32(A04 + CF); \ + A03 = T32(A03 + CE); \ + A02 = T32(A02 + CD); \ + A01 = T32(A01 + CC); \ + A00 = T32(A00 + CB); \ + A0B = T32(A0B + CA); \ + A0A = T32(A0A + C9); \ + A09 = T32(A09 + C8); \ + A08 = T32(A08 + C7); \ + A07 = T32(A07 + C6); \ + A06 = T32(A06 + C5); \ + A05 = T32(A05 + C4); \ + A04 = T32(A04 + C3); \ + A03 = T32(A03 + C2); \ + A02 = T32(A02 + C1); \ + A01 = T32(A01 + C0); \ + A00 = T32(A00 + CF); \ + A0B = T32(A0B + CE); \ + A0A = T32(A0A + CD); \ + A09 = T32(A09 + CC); \ + A08 = T32(A08 + CB); \ + A07 = T32(A07 + CA); \ + A06 = T32(A06 + C9); \ + A05 = T32(A05 + C8); \ + A04 = T32(A04 + C7); \ + A03 = T32(A03 + C6); \ + A02 = T32(A02 + C5); \ + A01 = T32(A01 + C4); \ + A00 = T32(A00 + C3); \ + } while (0) + +#define INCR_W do { \ + if ((Wlow = T32(Wlow + 1)) == 0) \ + Whigh = T32(Whigh + 1); \ + } while (0) + +static const bee_u32 A_init_512[] = { + C32(0x20728DFD), C32(0x46C0BD53), C32(0xE782B699), C32(0x55304632), + C32(0x71B4EF90), C32(0x0EA9E82C), C32(0xDBB930F1), C32(0xFAD06B8B), + C32(0xBE0CAE40), C32(0x8BD14410), C32(0x76D2ADAC), C32(0x28ACAB7F) +}; + +static const bee_u32 B_init_512[] = { + C32(0xC1099CB7), C32(0x07B385F3), C32(0xE7442C26), C32(0xCC8AD640), + C32(0xEB6F56C7), C32(0x1EA81AA9), C32(0x73B9D314), C32(0x1DE85D08), + C32(0x48910A5A), C32(0x893B22DB), C32(0xC5A0DF44), C32(0xBBC4324E), + C32(0x72D2F240), C32(0x75941D99), C32(0x6D8BDE82), C32(0xA1A7502B) +}; + +static const bee_u32 C_init_512[] = { + C32(0xD9BF68D1), C32(0x58BAD750), C32(0x56028CB2), C32(0x8134F359), + C32(0xB5D469D8), C32(0x941A8CC2), C32(0x418B2A6E), C32(0x04052780), + C32(0x7F07D787), C32(0x5194358F), C32(0x3C60D665), C32(0xBE97D79A), + C32(0x950C3434), C32(0xAED9A06D), C32(0x2537DC8D), C32(0x7CDB5969) +}; + +/* END -- automatically generated code. */ + +static void three_init(void *cc, unsigned size) +{ + /* + * We have precomputed initial states for all the supported + * output bit lengths. + */ + const bee_u32 *A_init, *B_init, *C_init; + facet_three_context *sc; + + switch (size) + { + case 512: + A_init = A_init_512; + B_init = B_init_512; + C_init = C_init_512; + break; + default: + return; + } + sc = cc; + memcpy(sc->A, A_init, sizeof sc->A); + memcpy(sc->B, B_init, sizeof sc->B); + memcpy(sc->C, C_init, sizeof sc->C); + sc->Wlow = 1; + sc->Whigh = 0; + sc->ptr = 0; +} + +static void three_core(void *cc, const unsigned char *data, size_t len) +{ + facet_three_context *sc; + unsigned char *buf; + size_t ptr; + DECL_STATE + + sc = cc; + buf = sc->buf; + ptr = sc->ptr; + + /* + * We do not want to copy the state to local variables if the + * amount of data is less than what is needed to complete the + * current block. Note that it is anyway suboptimal to call + * this method many times for small chunks of data. + */ + if (len < (sizeof sc->buf) - ptr) { + memcpy(buf + ptr, data, len); + ptr += len; + sc->ptr = ptr; + return; + } + + READ_STATE(sc); + while (len > 0) { + size_t clen; + + clen = (sizeof sc->buf) - ptr; + if (clen > len) + clen = len; + memcpy(buf + ptr, data, clen); + ptr += clen; + data += clen; + len -= clen; + if (ptr == sizeof sc->buf) { + DECODE_BLOCK; + INPUT_BLOCK_ADD; + XOR_W; + APPLY_P; + INPUT_BLOCK_SUB; + SWAP_BC; + INCR_W; + ptr = 0; + } + } + WRITE_STATE(sc); + sc->ptr = ptr; +} + +static void three_close(void *cc, unsigned ub, unsigned n, void *dst, unsigned size_words) +{ + facet_three_context *sc; + unsigned char *buf; + size_t ptr; + int i; + unsigned z; + union { + unsigned char tmp_out[64]; + bee_u32 dummy; + } u; + size_t out_len; + DECL_STATE + + sc = cc; + buf = sc->buf; + ptr = sc->ptr; + z = 0x80 >> n; + buf[ptr] = ((ub & -z) | z) & 0xFF; + memset(buf + ptr + 1, 0, (sizeof sc->buf) - (ptr + 1)); + READ_STATE(sc); + DECODE_BLOCK; + INPUT_BLOCK_ADD; + XOR_W; + APPLY_P; + for (i = 0; i < 3; i ++) { + SWAP_BC; + XOR_W; + APPLY_P; + } + + /* + * We just use our local variables; no need to go through + * the state structure. In order to share some code, we + * emit the relevant words into a temporary buffer, which + * we finally copy into the destination array. + */ + switch (size_words) { + case 16: + bee_enc32le_aligned(u.tmp_out + 0, B0); + bee_enc32le_aligned(u.tmp_out + 4, B1); + bee_enc32le_aligned(u.tmp_out + 8, B2); + bee_enc32le_aligned(u.tmp_out + 12, B3); + /* fall through */ + case 12: + bee_enc32le_aligned(u.tmp_out + 16, B4); + bee_enc32le_aligned(u.tmp_out + 20, B5); + bee_enc32le_aligned(u.tmp_out + 24, B6); + bee_enc32le_aligned(u.tmp_out + 28, B7); + /* fall through */ + case 8: + bee_enc32le_aligned(u.tmp_out + 32, B8); + /* fall through */ + case 7: + bee_enc32le_aligned(u.tmp_out + 36, B9); + /* fall through */ + case 6: + bee_enc32le_aligned(u.tmp_out + 40, BA); + bee_enc32le_aligned(u.tmp_out + 44, BB); + bee_enc32le_aligned(u.tmp_out + 48, BC); + bee_enc32le_aligned(u.tmp_out + 52, BD); + bee_enc32le_aligned(u.tmp_out + 56, BE); + bee_enc32le_aligned(u.tmp_out + 60, BF); + break; + default: + return; + } + out_len = size_words << 2; + memcpy(dst, u.tmp_out + (sizeof u.tmp_out) - out_len, out_len); + three_init(sc, size_words << 5); +} + + +/* see facet_three.h */ +void facet_three_init(void *cc) +{ + three_init(cc, 512); +} + +/* see facet_three.h */ +void facet_three(void *cc, const void *data, size_t len) +{ + three_core(cc, data, len); +} + +/* see bee_shabal.h */ +void facet_three_close(void *cc, void *dst) +{ + three_close(cc, 0, 0, dst, 16); +} + +/* see bee_shabal.h */ +void facet_three_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + three_close(cc, ub, n, dst, 16); +} + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/stratum/algos/honeycomb/facet_three.h b/stratum/algos/honeycomb/facet_three.h new file mode 100644 index 000000000..d2f8fd965 --- /dev/null +++ b/stratum/algos/honeycomb/facet_three.h @@ -0,0 +1,80 @@ + +#ifndef FACET_THREE_H +#define FACET_THREE_H + +#ifdef __cplusplus +extern "C"{ +#endif + +#include +#include "honeycomb_types.h" + + +//#undef BEE_64 // + + +/** + * This structure is a context for HoneyComb Facet #3 computations: it contains the + * intermediate values and some data from the last entered block. Once + * a HoneyComb Facet #3 computation has been performed, the context can be reused for + * another computation. + * + * The contents of this structure are private. A running HoneyComb Facet #3 computation + * can be cloned by copying the context (e.g. with a simple memcpy()). + */ +typedef struct { + unsigned char buf[64]; /* first field, for alignment */ + size_t ptr; + bee_u32 A[12], B[16], C[16]; + bee_u32 Whigh, Wlow; + +}facet_three_context; + + + +/** + * Initialize a HoneyComb Facet #3 context. This process performs no memory allocation. + * + * @param cc the HoneyComb Facet #3 context (pointer to a facet_three_context ) + */ +void facet_three_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero (in which case this function does nothing). + * + * @param cc the HoneyComb Facet #3 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void facet_three(void *cc, const void *data, size_t len); + +/** + * Terminate the current HoneyComb Facet #3 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (64 bytes). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #3 context + * @param dst the destination buffer + */ +void facet_three_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (64 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #3 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void facet_three_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/honeycomb/facet_two.c b/stratum/algos/honeycomb/facet_two.c new file mode 100644 index 000000000..6c917ee7e --- /dev/null +++ b/stratum/algos/honeycomb/facet_two.c @@ -0,0 +1,845 @@ + +#include +#include + +#include "facet_two.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + + +#if !defined BEE_JH_64 && BEE_64_TRUE + #define BEE_JH_64 1 +#endif + +#if !BEE_64 + #undef BEE_JH_64 +#endif + +#ifdef _MSC_VER + #pragma warning (disable: 4146) +#endif + +/* + * The internal bitslice representation may use either big-endian or + * little-endian (true bitslice operations do not care about the bit + * ordering, and the bit-swapping linear operations in HoneyComb Facet #2 happen to + * be invariant through endianness-swapping). The constants must be + * defined according to the chosen endianness; we use some + * byte-swapping macros for that. + */ + +#if BEE_LITTLE_ENDIAN + +#define C32e(x) ((BEE_C32(x) >> 24) \ + | ((BEE_C32(x) >> 8) & BEE_C32(0x0000FF00)) \ + | ((BEE_C32(x) << 8) & BEE_C32(0x00FF0000)) \ + | ((BEE_C32(x) << 24) & BEE_C32(0xFF000000))) +#define dec32e_aligned bee_dec32le_aligned +#define enc32e bee_enc32le + +#if BEE_64 +#define C64e(x) ((BEE_C64(x) >> 56) \ + | ((BEE_C64(x) >> 40) & BEE_C64(0x000000000000FF00)) \ + | ((BEE_C64(x) >> 24) & BEE_C64(0x0000000000FF0000)) \ + | ((BEE_C64(x) >> 8) & BEE_C64(0x00000000FF000000)) \ + | ((BEE_C64(x) << 8) & BEE_C64(0x000000FF00000000)) \ + | ((BEE_C64(x) << 24) & BEE_C64(0x0000FF0000000000)) \ + | ((BEE_C64(x) << 40) & BEE_C64(0x00FF000000000000)) \ + | ((BEE_C64(x) << 56) & BEE_C64(0xFF00000000000000))) +#define dec64e_aligned bee_dec64le_aligned +#define enc64e bee_enc64le +#endif + +#else + +#define C32e(x) BEE_C32(x) +#define dec32e_aligned bee_dec32be_aligned +#define enc32e bee_enc32be +#if BEE_64 +#define C64e(x) BEE_C64(x) +#define dec64e_aligned bee_dec64be_aligned +#define enc64e bee_enc64be +#endif + +#endif + +#define Sb(x0, x1, x2, x3, c) do { \ + x3 = ~x3; \ + x0 ^= (c) & ~x2; \ + tmp = (c) ^ (x0 & x1); \ + x0 ^= x2 & x3; \ + x3 ^= ~x1 & x2; \ + x1 ^= x0 & x2; \ + x2 ^= x0 & ~x3; \ + x0 ^= x1 | x3; \ + x3 ^= x1 & x2; \ + x1 ^= tmp & x0; \ + x2 ^= tmp; \ + } while (0) + +#define Lb(x0, x1, x2, x3, x4, x5, x6, x7) do { \ + x4 ^= x1; \ + x5 ^= x2; \ + x6 ^= x3 ^ x0; \ + x7 ^= x0; \ + x0 ^= x5; \ + x1 ^= x6; \ + x2 ^= x7 ^ x4; \ + x3 ^= x4; \ + } while (0) + +#if BEE_JH_64 + +static const bee_u64 C[] = { + C64e(0x72d5dea2df15f867), C64e(0x7b84150ab7231557), + C64e(0x81abd6904d5a87f6), C64e(0x4e9f4fc5c3d12b40), + C64e(0xea983ae05c45fa9c), C64e(0x03c5d29966b2999a), + C64e(0x660296b4f2bb538a), C64e(0xb556141a88dba231), + C64e(0x03a35a5c9a190edb), C64e(0x403fb20a87c14410), + C64e(0x1c051980849e951d), C64e(0x6f33ebad5ee7cddc), + C64e(0x10ba139202bf6b41), C64e(0xdc786515f7bb27d0), + C64e(0x0a2c813937aa7850), C64e(0x3f1abfd2410091d3), + C64e(0x422d5a0df6cc7e90), C64e(0xdd629f9c92c097ce), + C64e(0x185ca70bc72b44ac), C64e(0xd1df65d663c6fc23), + C64e(0x976e6c039ee0b81a), C64e(0x2105457e446ceca8), + C64e(0xeef103bb5d8e61fa), C64e(0xfd9697b294838197), + C64e(0x4a8e8537db03302f), C64e(0x2a678d2dfb9f6a95), + C64e(0x8afe7381f8b8696c), C64e(0x8ac77246c07f4214), + C64e(0xc5f4158fbdc75ec4), C64e(0x75446fa78f11bb80), + C64e(0x52de75b7aee488bc), C64e(0x82b8001e98a6a3f4), + C64e(0x8ef48f33a9a36315), C64e(0xaa5f5624d5b7f989), + C64e(0xb6f1ed207c5ae0fd), C64e(0x36cae95a06422c36), + C64e(0xce2935434efe983d), C64e(0x533af974739a4ba7), + C64e(0xd0f51f596f4e8186), C64e(0x0e9dad81afd85a9f), + C64e(0xa7050667ee34626a), C64e(0x8b0b28be6eb91727), + C64e(0x47740726c680103f), C64e(0xe0a07e6fc67e487b), + C64e(0x0d550aa54af8a4c0), C64e(0x91e3e79f978ef19e), + C64e(0x8676728150608dd4), C64e(0x7e9e5a41f3e5b062), + C64e(0xfc9f1fec4054207a), C64e(0xe3e41a00cef4c984), + C64e(0x4fd794f59dfa95d8), C64e(0x552e7e1124c354a5), + C64e(0x5bdf7228bdfe6e28), C64e(0x78f57fe20fa5c4b2), + C64e(0x05897cefee49d32e), C64e(0x447e9385eb28597f), + C64e(0x705f6937b324314a), C64e(0x5e8628f11dd6e465), + C64e(0xc71b770451b920e7), C64e(0x74fe43e823d4878a), + C64e(0x7d29e8a3927694f2), C64e(0xddcb7a099b30d9c1), + C64e(0x1d1b30fb5bdc1be0), C64e(0xda24494ff29c82bf), + C64e(0xa4e7ba31b470bfff), C64e(0x0d324405def8bc48), + C64e(0x3baefc3253bbd339), C64e(0x459fc3c1e0298ba0), + C64e(0xe5c905fdf7ae090f), C64e(0x947034124290f134), + C64e(0xa271b701e344ed95), C64e(0xe93b8e364f2f984a), + C64e(0x88401d63a06cf615), C64e(0x47c1444b8752afff), + C64e(0x7ebb4af1e20ac630), C64e(0x4670b6c5cc6e8ce6), + C64e(0xa4d5a456bd4fca00), C64e(0xda9d844bc83e18ae), + C64e(0x7357ce453064d1ad), C64e(0xe8a6ce68145c2567), + C64e(0xa3da8cf2cb0ee116), C64e(0x33e906589a94999a), + C64e(0x1f60b220c26f847b), C64e(0xd1ceac7fa0d18518), + C64e(0x32595ba18ddd19d3), C64e(0x509a1cc0aaa5b446), + C64e(0x9f3d6367e4046bba), C64e(0xf6ca19ab0b56ee7e), + C64e(0x1fb179eaa9282174), C64e(0xe9bdf7353b3651ee), + C64e(0x1d57ac5a7550d376), C64e(0x3a46c2fea37d7001), + C64e(0xf735c1af98a4d842), C64e(0x78edec209e6b6779), + C64e(0x41836315ea3adba8), C64e(0xfac33b4d32832c83), + C64e(0xa7403b1f1c2747f3), C64e(0x5940f034b72d769a), + C64e(0xe73e4e6cd2214ffd), C64e(0xb8fd8d39dc5759ef), + C64e(0x8d9b0c492b49ebda), C64e(0x5ba2d74968f3700d), + C64e(0x7d3baed07a8d5584), C64e(0xf5a5e9f0e4f88e65), + C64e(0xa0b8a2f436103b53), C64e(0x0ca8079e753eec5a), + C64e(0x9168949256e8884f), C64e(0x5bb05c55f8babc4c), + C64e(0xe3bb3b99f387947b), C64e(0x75daf4d6726b1c5d), + C64e(0x64aeac28dc34b36d), C64e(0x6c34a550b828db71), + C64e(0xf861e2f2108d512a), C64e(0xe3db643359dd75fc), + C64e(0x1cacbcf143ce3fa2), C64e(0x67bbd13c02e843b0), + C64e(0x330a5bca8829a175), C64e(0x7f34194db416535c), + C64e(0x923b94c30e794d1e), C64e(0x797475d7b6eeaf3f), + C64e(0xeaa8d4f7be1a3921), C64e(0x5cf47e094c232751), + C64e(0x26a32453ba323cd2), C64e(0x44a3174a6da6d5ad), + C64e(0xb51d3ea6aff2c908), C64e(0x83593d98916b3c56), + C64e(0x4cf87ca17286604d), C64e(0x46e23ecc086ec7f6), + C64e(0x2f9833b3b1bc765e), C64e(0x2bd666a5efc4e62a), + C64e(0x06f4b6e8bec1d436), C64e(0x74ee8215bcef2163), + C64e(0xfdc14e0df453c969), C64e(0xa77d5ac406585826), + C64e(0x7ec1141606e0fa16), C64e(0x7e90af3d28639d3f), + C64e(0xd2c9f2e3009bd20c), C64e(0x5faace30b7d40c30), + C64e(0x742a5116f2e03298), C64e(0x0deb30d8e3cef89a), + C64e(0x4bc59e7bb5f17992), C64e(0xff51e66e048668d3), + C64e(0x9b234d57e6966731), C64e(0xcce6a6f3170a7505), + C64e(0xb17681d913326cce), C64e(0x3c175284f805a262), + C64e(0xf42bcbb378471547), C64e(0xff46548223936a48), + C64e(0x38df58074e5e6565), C64e(0xf2fc7c89fc86508e), + C64e(0x31702e44d00bca86), C64e(0xf04009a23078474e), + C64e(0x65a0ee39d1f73883), C64e(0xf75ee937e42c3abd), + C64e(0x2197b2260113f86f), C64e(0xa344edd1ef9fdee7), + C64e(0x8ba0df15762592d9), C64e(0x3c85f7f612dc42be), + C64e(0xd8a7ec7cab27b07e), C64e(0x538d7ddaaa3ea8de), + C64e(0xaa25ce93bd0269d8), C64e(0x5af643fd1a7308f9), + C64e(0xc05fefda174a19a5), C64e(0x974d66334cfd216a), + C64e(0x35b49831db411570), C64e(0xea1e0fbbedcd549b), + C64e(0x9ad063a151974072), C64e(0xf6759dbf91476fe2) +}; + +#define Ceven_hi(r) (C[((r) << 2) + 0]) +#define Ceven_lo(r) (C[((r) << 2) + 1]) +#define Codd_hi(r) (C[((r) << 2) + 2]) +#define Codd_lo(r) (C[((r) << 2) + 3]) + +#define S(x0, x1, x2, x3, cb, r) do { \ + Sb(x0 ## h, x1 ## h, x2 ## h, x3 ## h, cb ## hi(r)); \ + Sb(x0 ## l, x1 ## l, x2 ## l, x3 ## l, cb ## lo(r)); \ + } while (0) + +#define L(x0, x1, x2, x3, x4, x5, x6, x7) do { \ + Lb(x0 ## h, x1 ## h, x2 ## h, x3 ## h, \ + x4 ## h, x5 ## h, x6 ## h, x7 ## h); \ + Lb(x0 ## l, x1 ## l, x2 ## l, x3 ## l, \ + x4 ## l, x5 ## l, x6 ## l, x7 ## l); \ + } while (0) + +#define Wz(x, c, n) do { \ + bee_u64 t = (x ## h & (c)) << (n); \ + x ## h = ((x ## h >> (n)) & (c)) | t; \ + t = (x ## l & (c)) << (n); \ + x ## l = ((x ## l >> (n)) & (c)) | t; \ + } while (0) + +#define W0(x) Wz(x, BEE_C64(0x5555555555555555), 1) +#define W1(x) Wz(x, BEE_C64(0x3333333333333333), 2) +#define W2(x) Wz(x, BEE_C64(0x0F0F0F0F0F0F0F0F), 4) +#define W3(x) Wz(x, BEE_C64(0x00FF00FF00FF00FF), 8) +#define W4(x) Wz(x, BEE_C64(0x0000FFFF0000FFFF), 16) +#define W5(x) Wz(x, BEE_C64(0x00000000FFFFFFFF), 32) +#define W6(x) do { \ + bee_u64 t = x ## h; \ + x ## h = x ## l; \ + x ## l = t; \ + } while (0) + +#define DECL_STATE \ + bee_u64 h0h, h1h, h2h, h3h, h4h, h5h, h6h, h7h; \ + bee_u64 h0l, h1l, h2l, h3l, h4l, h5l, h6l, h7l; \ + bee_u64 tmp; + +#define READ_STATE(state) do { \ + h0h = (state)->H.wide[ 0]; \ + h0l = (state)->H.wide[ 1]; \ + h1h = (state)->H.wide[ 2]; \ + h1l = (state)->H.wide[ 3]; \ + h2h = (state)->H.wide[ 4]; \ + h2l = (state)->H.wide[ 5]; \ + h3h = (state)->H.wide[ 6]; \ + h3l = (state)->H.wide[ 7]; \ + h4h = (state)->H.wide[ 8]; \ + h4l = (state)->H.wide[ 9]; \ + h5h = (state)->H.wide[10]; \ + h5l = (state)->H.wide[11]; \ + h6h = (state)->H.wide[12]; \ + h6l = (state)->H.wide[13]; \ + h7h = (state)->H.wide[14]; \ + h7l = (state)->H.wide[15]; \ + } while (0) + +#define WRITE_STATE(state) do { \ + (state)->H.wide[ 0] = h0h; \ + (state)->H.wide[ 1] = h0l; \ + (state)->H.wide[ 2] = h1h; \ + (state)->H.wide[ 3] = h1l; \ + (state)->H.wide[ 4] = h2h; \ + (state)->H.wide[ 5] = h2l; \ + (state)->H.wide[ 6] = h3h; \ + (state)->H.wide[ 7] = h3l; \ + (state)->H.wide[ 8] = h4h; \ + (state)->H.wide[ 9] = h4l; \ + (state)->H.wide[10] = h5h; \ + (state)->H.wide[11] = h5l; \ + (state)->H.wide[12] = h6h; \ + (state)->H.wide[13] = h6l; \ + (state)->H.wide[14] = h7h; \ + (state)->H.wide[15] = h7l; \ + } while (0) + +#define INPUT_BUF1 \ + bee_u64 m0h = dec64e_aligned(buf + 0); \ + bee_u64 m0l = dec64e_aligned(buf + 8); \ + bee_u64 m1h = dec64e_aligned(buf + 16); \ + bee_u64 m1l = dec64e_aligned(buf + 24); \ + bee_u64 m2h = dec64e_aligned(buf + 32); \ + bee_u64 m2l = dec64e_aligned(buf + 40); \ + bee_u64 m3h = dec64e_aligned(buf + 48); \ + bee_u64 m3l = dec64e_aligned(buf + 56); \ + h0h ^= m0h; \ + h0l ^= m0l; \ + h1h ^= m1h; \ + h1l ^= m1l; \ + h2h ^= m2h; \ + h2l ^= m2l; \ + h3h ^= m3h; \ + h3l ^= m3l; + +#define INPUT_BUF2 \ + h4h ^= m0h; \ + h4l ^= m0l; \ + h5h ^= m1h; \ + h5l ^= m1l; \ + h6h ^= m2h; \ + h6l ^= m2l; \ + h7h ^= m3h; \ + h7l ^= m3l; + + +static const bee_u64 IV512[] = { + C64e(0x6fd14b963e00aa17), C64e(0x636a2e057a15d543), + C64e(0x8a225e8d0c97ef0b), C64e(0xe9341259f2b3c361), + C64e(0x891da0c1536f801e), C64e(0x2aa9056bea2b6d80), + C64e(0x588eccdb2075baa6), C64e(0xa90f3a76baf83bf7), + C64e(0x0169e60541e34a69), C64e(0x46b58a8e2e6fe65a), + C64e(0x1047a7d0c1843c24), C64e(0x3b6e71b12d5ac199), + C64e(0xcf57f6ec9db1f856), C64e(0xa706887c5716b156), + C64e(0xe3c2fcdfe68517fb), C64e(0x545a4678cc8cdd4b) +}; + +#else + +static const bee_u32 C[] = { + C32e(0x72d5dea2), C32e(0xdf15f867), C32e(0x7b84150a), + C32e(0xb7231557), C32e(0x81abd690), C32e(0x4d5a87f6), + C32e(0x4e9f4fc5), C32e(0xc3d12b40), C32e(0xea983ae0), + C32e(0x5c45fa9c), C32e(0x03c5d299), C32e(0x66b2999a), + C32e(0x660296b4), C32e(0xf2bb538a), C32e(0xb556141a), + C32e(0x88dba231), C32e(0x03a35a5c), C32e(0x9a190edb), + C32e(0x403fb20a), C32e(0x87c14410), C32e(0x1c051980), + C32e(0x849e951d), C32e(0x6f33ebad), C32e(0x5ee7cddc), + C32e(0x10ba1392), C32e(0x02bf6b41), C32e(0xdc786515), + C32e(0xf7bb27d0), C32e(0x0a2c8139), C32e(0x37aa7850), + C32e(0x3f1abfd2), C32e(0x410091d3), C32e(0x422d5a0d), + C32e(0xf6cc7e90), C32e(0xdd629f9c), C32e(0x92c097ce), + C32e(0x185ca70b), C32e(0xc72b44ac), C32e(0xd1df65d6), + C32e(0x63c6fc23), C32e(0x976e6c03), C32e(0x9ee0b81a), + C32e(0x2105457e), C32e(0x446ceca8), C32e(0xeef103bb), + C32e(0x5d8e61fa), C32e(0xfd9697b2), C32e(0x94838197), + C32e(0x4a8e8537), C32e(0xdb03302f), C32e(0x2a678d2d), + C32e(0xfb9f6a95), C32e(0x8afe7381), C32e(0xf8b8696c), + C32e(0x8ac77246), C32e(0xc07f4214), C32e(0xc5f4158f), + C32e(0xbdc75ec4), C32e(0x75446fa7), C32e(0x8f11bb80), + C32e(0x52de75b7), C32e(0xaee488bc), C32e(0x82b8001e), + C32e(0x98a6a3f4), C32e(0x8ef48f33), C32e(0xa9a36315), + C32e(0xaa5f5624), C32e(0xd5b7f989), C32e(0xb6f1ed20), + C32e(0x7c5ae0fd), C32e(0x36cae95a), C32e(0x06422c36), + C32e(0xce293543), C32e(0x4efe983d), C32e(0x533af974), + C32e(0x739a4ba7), C32e(0xd0f51f59), C32e(0x6f4e8186), + C32e(0x0e9dad81), C32e(0xafd85a9f), C32e(0xa7050667), + C32e(0xee34626a), C32e(0x8b0b28be), C32e(0x6eb91727), + C32e(0x47740726), C32e(0xc680103f), C32e(0xe0a07e6f), + C32e(0xc67e487b), C32e(0x0d550aa5), C32e(0x4af8a4c0), + C32e(0x91e3e79f), C32e(0x978ef19e), C32e(0x86767281), + C32e(0x50608dd4), C32e(0x7e9e5a41), C32e(0xf3e5b062), + C32e(0xfc9f1fec), C32e(0x4054207a), C32e(0xe3e41a00), + C32e(0xcef4c984), C32e(0x4fd794f5), C32e(0x9dfa95d8), + C32e(0x552e7e11), C32e(0x24c354a5), C32e(0x5bdf7228), + C32e(0xbdfe6e28), C32e(0x78f57fe2), C32e(0x0fa5c4b2), + C32e(0x05897cef), C32e(0xee49d32e), C32e(0x447e9385), + C32e(0xeb28597f), C32e(0x705f6937), C32e(0xb324314a), + C32e(0x5e8628f1), C32e(0x1dd6e465), C32e(0xc71b7704), + C32e(0x51b920e7), C32e(0x74fe43e8), C32e(0x23d4878a), + C32e(0x7d29e8a3), C32e(0x927694f2), C32e(0xddcb7a09), + C32e(0x9b30d9c1), C32e(0x1d1b30fb), C32e(0x5bdc1be0), + C32e(0xda24494f), C32e(0xf29c82bf), C32e(0xa4e7ba31), + C32e(0xb470bfff), C32e(0x0d324405), C32e(0xdef8bc48), + C32e(0x3baefc32), C32e(0x53bbd339), C32e(0x459fc3c1), + C32e(0xe0298ba0), C32e(0xe5c905fd), C32e(0xf7ae090f), + C32e(0x94703412), C32e(0x4290f134), C32e(0xa271b701), + C32e(0xe344ed95), C32e(0xe93b8e36), C32e(0x4f2f984a), + C32e(0x88401d63), C32e(0xa06cf615), C32e(0x47c1444b), + C32e(0x8752afff), C32e(0x7ebb4af1), C32e(0xe20ac630), + C32e(0x4670b6c5), C32e(0xcc6e8ce6), C32e(0xa4d5a456), + C32e(0xbd4fca00), C32e(0xda9d844b), C32e(0xc83e18ae), + C32e(0x7357ce45), C32e(0x3064d1ad), C32e(0xe8a6ce68), + C32e(0x145c2567), C32e(0xa3da8cf2), C32e(0xcb0ee116), + C32e(0x33e90658), C32e(0x9a94999a), C32e(0x1f60b220), + C32e(0xc26f847b), C32e(0xd1ceac7f), C32e(0xa0d18518), + C32e(0x32595ba1), C32e(0x8ddd19d3), C32e(0x509a1cc0), + C32e(0xaaa5b446), C32e(0x9f3d6367), C32e(0xe4046bba), + C32e(0xf6ca19ab), C32e(0x0b56ee7e), C32e(0x1fb179ea), + C32e(0xa9282174), C32e(0xe9bdf735), C32e(0x3b3651ee), + C32e(0x1d57ac5a), C32e(0x7550d376), C32e(0x3a46c2fe), + C32e(0xa37d7001), C32e(0xf735c1af), C32e(0x98a4d842), + C32e(0x78edec20), C32e(0x9e6b6779), C32e(0x41836315), + C32e(0xea3adba8), C32e(0xfac33b4d), C32e(0x32832c83), + C32e(0xa7403b1f), C32e(0x1c2747f3), C32e(0x5940f034), + C32e(0xb72d769a), C32e(0xe73e4e6c), C32e(0xd2214ffd), + C32e(0xb8fd8d39), C32e(0xdc5759ef), C32e(0x8d9b0c49), + C32e(0x2b49ebda), C32e(0x5ba2d749), C32e(0x68f3700d), + C32e(0x7d3baed0), C32e(0x7a8d5584), C32e(0xf5a5e9f0), + C32e(0xe4f88e65), C32e(0xa0b8a2f4), C32e(0x36103b53), + C32e(0x0ca8079e), C32e(0x753eec5a), C32e(0x91689492), + C32e(0x56e8884f), C32e(0x5bb05c55), C32e(0xf8babc4c), + C32e(0xe3bb3b99), C32e(0xf387947b), C32e(0x75daf4d6), + C32e(0x726b1c5d), C32e(0x64aeac28), C32e(0xdc34b36d), + C32e(0x6c34a550), C32e(0xb828db71), C32e(0xf861e2f2), + C32e(0x108d512a), C32e(0xe3db6433), C32e(0x59dd75fc), + C32e(0x1cacbcf1), C32e(0x43ce3fa2), C32e(0x67bbd13c), + C32e(0x02e843b0), C32e(0x330a5bca), C32e(0x8829a175), + C32e(0x7f34194d), C32e(0xb416535c), C32e(0x923b94c3), + C32e(0x0e794d1e), C32e(0x797475d7), C32e(0xb6eeaf3f), + C32e(0xeaa8d4f7), C32e(0xbe1a3921), C32e(0x5cf47e09), + C32e(0x4c232751), C32e(0x26a32453), C32e(0xba323cd2), + C32e(0x44a3174a), C32e(0x6da6d5ad), C32e(0xb51d3ea6), + C32e(0xaff2c908), C32e(0x83593d98), C32e(0x916b3c56), + C32e(0x4cf87ca1), C32e(0x7286604d), C32e(0x46e23ecc), + C32e(0x086ec7f6), C32e(0x2f9833b3), C32e(0xb1bc765e), + C32e(0x2bd666a5), C32e(0xefc4e62a), C32e(0x06f4b6e8), + C32e(0xbec1d436), C32e(0x74ee8215), C32e(0xbcef2163), + C32e(0xfdc14e0d), C32e(0xf453c969), C32e(0xa77d5ac4), + C32e(0x06585826), C32e(0x7ec11416), C32e(0x06e0fa16), + C32e(0x7e90af3d), C32e(0x28639d3f), C32e(0xd2c9f2e3), + C32e(0x009bd20c), C32e(0x5faace30), C32e(0xb7d40c30), + C32e(0x742a5116), C32e(0xf2e03298), C32e(0x0deb30d8), + C32e(0xe3cef89a), C32e(0x4bc59e7b), C32e(0xb5f17992), + C32e(0xff51e66e), C32e(0x048668d3), C32e(0x9b234d57), + C32e(0xe6966731), C32e(0xcce6a6f3), C32e(0x170a7505), + C32e(0xb17681d9), C32e(0x13326cce), C32e(0x3c175284), + C32e(0xf805a262), C32e(0xf42bcbb3), C32e(0x78471547), + C32e(0xff465482), C32e(0x23936a48), C32e(0x38df5807), + C32e(0x4e5e6565), C32e(0xf2fc7c89), C32e(0xfc86508e), + C32e(0x31702e44), C32e(0xd00bca86), C32e(0xf04009a2), + C32e(0x3078474e), C32e(0x65a0ee39), C32e(0xd1f73883), + C32e(0xf75ee937), C32e(0xe42c3abd), C32e(0x2197b226), + C32e(0x0113f86f), C32e(0xa344edd1), C32e(0xef9fdee7), + C32e(0x8ba0df15), C32e(0x762592d9), C32e(0x3c85f7f6), + C32e(0x12dc42be), C32e(0xd8a7ec7c), C32e(0xab27b07e), + C32e(0x538d7dda), C32e(0xaa3ea8de), C32e(0xaa25ce93), + C32e(0xbd0269d8), C32e(0x5af643fd), C32e(0x1a7308f9), + C32e(0xc05fefda), C32e(0x174a19a5), C32e(0x974d6633), + C32e(0x4cfd216a), C32e(0x35b49831), C32e(0xdb411570), + C32e(0xea1e0fbb), C32e(0xedcd549b), C32e(0x9ad063a1), + C32e(0x51974072), C32e(0xf6759dbf), C32e(0x91476fe2) +}; + +#define Ceven_w3(r) (C[((r) << 3) + 0]) +#define Ceven_w2(r) (C[((r) << 3) + 1]) +#define Ceven_w1(r) (C[((r) << 3) + 2]) +#define Ceven_w0(r) (C[((r) << 3) + 3]) +#define Codd_w3(r) (C[((r) << 3) + 4]) +#define Codd_w2(r) (C[((r) << 3) + 5]) +#define Codd_w1(r) (C[((r) << 3) + 6]) +#define Codd_w0(r) (C[((r) << 3) + 7]) + +#define S(x0, x1, x2, x3, cb, r) do { \ + Sb(x0 ## 3, x1 ## 3, x2 ## 3, x3 ## 3, cb ## w3(r)); \ + Sb(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, cb ## w2(r)); \ + Sb(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, cb ## w1(r)); \ + Sb(x0 ## 0, x1 ## 0, x2 ## 0, x3 ## 0, cb ## w0(r)); \ + } while (0) + +#define L(x0, x1, x2, x3, x4, x5, x6, x7) do { \ + Lb(x0 ## 3, x1 ## 3, x2 ## 3, x3 ## 3, \ + x4 ## 3, x5 ## 3, x6 ## 3, x7 ## 3); \ + Lb(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, \ + x4 ## 2, x5 ## 2, x6 ## 2, x7 ## 2); \ + Lb(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, \ + x4 ## 1, x5 ## 1, x6 ## 1, x7 ## 1); \ + Lb(x0 ## 0, x1 ## 0, x2 ## 0, x3 ## 0, \ + x4 ## 0, x5 ## 0, x6 ## 0, x7 ## 0); \ + } while (0) + +#define Wz(x, c, n) do { \ + bee_u32 t = (x ## 3 & (c)) << (n); \ + x ## 3 = ((x ## 3 >> (n)) & (c)) | t; \ + t = (x ## 2 & (c)) << (n); \ + x ## 2 = ((x ## 2 >> (n)) & (c)) | t; \ + t = (x ## 1 & (c)) << (n); \ + x ## 1 = ((x ## 1 >> (n)) & (c)) | t; \ + t = (x ## 0 & (c)) << (n); \ + x ## 0 = ((x ## 0 >> (n)) & (c)) | t; \ + } while (0) + +#define W0(x) Wz(x, BEE_C32(0x55555555), 1) +#define W1(x) Wz(x, BEE_C32(0x33333333), 2) +#define W2(x) Wz(x, BEE_C32(0x0F0F0F0F), 4) +#define W3(x) Wz(x, BEE_C32(0x00FF00FF), 8) +#define W4(x) Wz(x, BEE_C32(0x0000FFFF), 16) +#define W5(x) do { \ + bee_u32 t = x ## 3; \ + x ## 3 = x ## 2; \ + x ## 2 = t; \ + t = x ## 1; \ + x ## 1 = x ## 0; \ + x ## 0 = t; \ + } while (0) +#define W6(x) do { \ + bee_u32 t = x ## 3; \ + x ## 3 = x ## 1; \ + x ## 1 = t; \ + t = x ## 2; \ + x ## 2 = x ## 0; \ + x ## 0 = t; \ + } while (0) + +#define DECL_STATE \ + bee_u32 h03, h02, h01, h00, h13, h12, h11, h10; \ + bee_u32 h23, h22, h21, h20, h33, h32, h31, h30; \ + bee_u32 h43, h42, h41, h40, h53, h52, h51, h50; \ + bee_u32 h63, h62, h61, h60, h73, h72, h71, h70; \ + bee_u32 tmp; + +#define READ_STATE(state) do { \ + h03 = (state)->H.narrow[ 0]; \ + h02 = (state)->H.narrow[ 1]; \ + h01 = (state)->H.narrow[ 2]; \ + h00 = (state)->H.narrow[ 3]; \ + h13 = (state)->H.narrow[ 4]; \ + h12 = (state)->H.narrow[ 5]; \ + h11 = (state)->H.narrow[ 6]; \ + h10 = (state)->H.narrow[ 7]; \ + h23 = (state)->H.narrow[ 8]; \ + h22 = (state)->H.narrow[ 9]; \ + h21 = (state)->H.narrow[10]; \ + h20 = (state)->H.narrow[11]; \ + h33 = (state)->H.narrow[12]; \ + h32 = (state)->H.narrow[13]; \ + h31 = (state)->H.narrow[14]; \ + h30 = (state)->H.narrow[15]; \ + h43 = (state)->H.narrow[16]; \ + h42 = (state)->H.narrow[17]; \ + h41 = (state)->H.narrow[18]; \ + h40 = (state)->H.narrow[19]; \ + h53 = (state)->H.narrow[20]; \ + h52 = (state)->H.narrow[21]; \ + h51 = (state)->H.narrow[22]; \ + h50 = (state)->H.narrow[23]; \ + h63 = (state)->H.narrow[24]; \ + h62 = (state)->H.narrow[25]; \ + h61 = (state)->H.narrow[26]; \ + h60 = (state)->H.narrow[27]; \ + h73 = (state)->H.narrow[28]; \ + h72 = (state)->H.narrow[29]; \ + h71 = (state)->H.narrow[30]; \ + h70 = (state)->H.narrow[31]; \ + } while (0) + +#define WRITE_STATE(state) do { \ + (state)->H.narrow[ 0] = h03; \ + (state)->H.narrow[ 1] = h02; \ + (state)->H.narrow[ 2] = h01; \ + (state)->H.narrow[ 3] = h00; \ + (state)->H.narrow[ 4] = h13; \ + (state)->H.narrow[ 5] = h12; \ + (state)->H.narrow[ 6] = h11; \ + (state)->H.narrow[ 7] = h10; \ + (state)->H.narrow[ 8] = h23; \ + (state)->H.narrow[ 9] = h22; \ + (state)->H.narrow[10] = h21; \ + (state)->H.narrow[11] = h20; \ + (state)->H.narrow[12] = h33; \ + (state)->H.narrow[13] = h32; \ + (state)->H.narrow[14] = h31; \ + (state)->H.narrow[15] = h30; \ + (state)->H.narrow[16] = h43; \ + (state)->H.narrow[17] = h42; \ + (state)->H.narrow[18] = h41; \ + (state)->H.narrow[19] = h40; \ + (state)->H.narrow[20] = h53; \ + (state)->H.narrow[21] = h52; \ + (state)->H.narrow[22] = h51; \ + (state)->H.narrow[23] = h50; \ + (state)->H.narrow[24] = h63; \ + (state)->H.narrow[25] = h62; \ + (state)->H.narrow[26] = h61; \ + (state)->H.narrow[27] = h60; \ + (state)->H.narrow[28] = h73; \ + (state)->H.narrow[29] = h72; \ + (state)->H.narrow[30] = h71; \ + (state)->H.narrow[31] = h70; \ + } while (0) + +#define INPUT_BUF1 \ + bee_u32 m03 = dec32e_aligned(buf + 0); \ + bee_u32 m02 = dec32e_aligned(buf + 4); \ + bee_u32 m01 = dec32e_aligned(buf + 8); \ + bee_u32 m00 = dec32e_aligned(buf + 12); \ + bee_u32 m13 = dec32e_aligned(buf + 16); \ + bee_u32 m12 = dec32e_aligned(buf + 20); \ + bee_u32 m11 = dec32e_aligned(buf + 24); \ + bee_u32 m10 = dec32e_aligned(buf + 28); \ + bee_u32 m23 = dec32e_aligned(buf + 32); \ + bee_u32 m22 = dec32e_aligned(buf + 36); \ + bee_u32 m21 = dec32e_aligned(buf + 40); \ + bee_u32 m20 = dec32e_aligned(buf + 44); \ + bee_u32 m33 = dec32e_aligned(buf + 48); \ + bee_u32 m32 = dec32e_aligned(buf + 52); \ + bee_u32 m31 = dec32e_aligned(buf + 56); \ + bee_u32 m30 = dec32e_aligned(buf + 60); \ + h03 ^= m03; \ + h02 ^= m02; \ + h01 ^= m01; \ + h00 ^= m00; \ + h13 ^= m13; \ + h12 ^= m12; \ + h11 ^= m11; \ + h10 ^= m10; \ + h23 ^= m23; \ + h22 ^= m22; \ + h21 ^= m21; \ + h20 ^= m20; \ + h33 ^= m33; \ + h32 ^= m32; \ + h31 ^= m31; \ + h30 ^= m30; + +#define INPUT_BUF2 \ + h43 ^= m03; \ + h42 ^= m02; \ + h41 ^= m01; \ + h40 ^= m00; \ + h53 ^= m13; \ + h52 ^= m12; \ + h51 ^= m11; \ + h50 ^= m10; \ + h63 ^= m23; \ + h62 ^= m22; \ + h61 ^= m21; \ + h60 ^= m20; \ + h73 ^= m33; \ + h72 ^= m32; \ + h71 ^= m31; \ + h70 ^= m30; + +static const bee_u32 IV512[] = { + C32e(0x6fd14b96), C32e(0x3e00aa17), C32e(0x636a2e05), C32e(0x7a15d543), + C32e(0x8a225e8d), C32e(0x0c97ef0b), C32e(0xe9341259), C32e(0xf2b3c361), + C32e(0x891da0c1), C32e(0x536f801e), C32e(0x2aa9056b), C32e(0xea2b6d80), + C32e(0x588eccdb), C32e(0x2075baa6), C32e(0xa90f3a76), C32e(0xbaf83bf7), + C32e(0x0169e605), C32e(0x41e34a69), C32e(0x46b58a8e), C32e(0x2e6fe65a), + C32e(0x1047a7d0), C32e(0xc1843c24), C32e(0x3b6e71b1), C32e(0x2d5ac199), + C32e(0xcf57f6ec), C32e(0x9db1f856), C32e(0xa706887c), C32e(0x5716b156), + C32e(0xe3c2fcdf), C32e(0xe68517fb), C32e(0x545a4678), C32e(0xcc8cdd4b) +}; + +#endif + +#define SL(ro) SLu(r + ro, ro) + +#define SLu(r, ro) do { \ + S(h0, h2, h4, h6, Ceven_, r); \ + S(h1, h3, h5, h7, Codd_, r); \ + L(h0, h2, h4, h6, h1, h3, h5, h7); \ + W ## ro(h1); \ + W ## ro(h3); \ + W ## ro(h5); \ + W ## ro(h7); \ + } while (0) + + + +#if BEE_JH_64 + +/* + * On a "true 64-bit" architecture, we can unroll at will. + */ + +#define E8 do { \ + SLu( 0, 0); \ + SLu( 1, 1); \ + SLu( 2, 2); \ + SLu( 3, 3); \ + SLu( 4, 4); \ + SLu( 5, 5); \ + SLu( 6, 6); \ + SLu( 7, 0); \ + SLu( 8, 1); \ + SLu( 9, 2); \ + SLu(10, 3); \ + SLu(11, 4); \ + SLu(12, 5); \ + SLu(13, 6); \ + SLu(14, 0); \ + SLu(15, 1); \ + SLu(16, 2); \ + SLu(17, 3); \ + SLu(18, 4); \ + SLu(19, 5); \ + SLu(20, 6); \ + SLu(21, 0); \ + SLu(22, 1); \ + SLu(23, 2); \ + SLu(24, 3); \ + SLu(25, 4); \ + SLu(26, 5); \ + SLu(27, 6); \ + SLu(28, 0); \ + SLu(29, 1); \ + SLu(30, 2); \ + SLu(31, 3); \ + SLu(32, 4); \ + SLu(33, 5); \ + SLu(34, 6); \ + SLu(35, 0); \ + SLu(36, 1); \ + SLu(37, 2); \ + SLu(38, 3); \ + SLu(39, 4); \ + SLu(40, 5); \ + SLu(41, 6); \ + } while (0) + +#else + +/* + * We are not aiming at a small footprint, but we are still using a + * 32-bit implementation. Full loop unrolling would smash the L1 + * cache on some "big" architectures (32 kB L1 cache). + */ + +#define E8 do { \ + unsigned r; \ + for (r = 0; r < 42; r += 7) { \ + SL(0); \ + SL(1); \ + SL(2); \ + SL(3); \ + SL(4); \ + SL(5); \ + SL(6); \ + } \ + } while (0) + +#endif + + +static void two_init(facet_two_context *sc, const void *iv) +{ + sc->ptr = 0; +#if BEE_JH_64 + memcpy(sc->H.wide, iv, sizeof sc->H.wide); +#else + memcpy(sc->H.narrow, iv, sizeof sc->H.narrow); +#endif +#if BEE_64 + sc->block_count = 0; +#else + sc->block_count_high = 0; + sc->block_count_low = 0; +#endif +} + +static void two_core(facet_two_context *sc, const void *data, size_t len) +{ + unsigned char *buf; + size_t ptr; + DECL_STATE + + buf = sc->buf; + ptr = sc->ptr; + if (len < (sizeof sc->buf) - ptr) { + memcpy(buf + ptr, data, len); + ptr += len; + sc->ptr = ptr; + return; + } + + READ_STATE(sc); + while (len > 0) { + size_t clen; + + clen = (sizeof sc->buf) - ptr; + if (clen > len) + clen = len; + memcpy(buf + ptr, data, clen); + ptr += clen; + data = (const unsigned char *)data + clen; + len -= clen; + if (ptr == sizeof sc->buf) { + INPUT_BUF1; + E8; + INPUT_BUF2; +#if BEE_64 + sc->block_count ++; +#else + if ((sc->block_count_low = BEE_T32( + sc->block_count_low + 1)) == 0) + sc->block_count_high ++; +#endif + ptr = 0; + } + } + WRITE_STATE(sc); + sc->ptr = ptr; +} + +static void two_close(facet_two_context *sc, unsigned ub, unsigned n, void *dst, size_t out_size_w32, const void *iv) +{ + unsigned z; + unsigned char buf[128]; + size_t numz, u; +#if BEE_64 + bee_u64 l0, l1; +#else + bee_u32 l0, l1, l2, l3; +#endif + + z = 0x80 >> n; + buf[0] = ((ub & -z) | z) & 0xFF; + if (sc->ptr == 0 && n == 0) { + numz = 47; + } else { + numz = 111 - sc->ptr; + } + memset(buf + 1, 0, numz); +#if BEE_64 + l0 = BEE_T64(sc->block_count << 9) + (sc->ptr << 3) + n; + l1 = BEE_T64(sc->block_count >> 55); + bee_enc64be(buf + numz + 1, l1); + bee_enc64be(buf + numz + 9, l0); +#else + l0 = BEE_T32(sc->block_count_low << 9) + (sc->ptr << 3) + n; + l1 = BEE_T32(sc->block_count_low >> 23) + + BEE_T32(sc->block_count_high << 9); + l2 = BEE_T32(sc->block_count_high >> 23); + l3 = 0; + bee_enc32be(buf + numz + 1, l3); + bee_enc32be(buf + numz + 5, l2); + bee_enc32be(buf + numz + 9, l1); + bee_enc32be(buf + numz + 13, l0); +#endif + two_core(sc, buf, numz + 17); +#if BEE_JH_64 + for (u = 0; u < 8; u ++) + enc64e(buf + (u << 3), sc->H.wide[u + 8]); +#else + for (u = 0; u < 16; u ++) + enc32e(buf + (u << 2), sc->H.narrow[u + 16]); +#endif + memcpy(dst, buf + ((16 - out_size_w32) << 2), out_size_w32 << 2); + two_init(sc, iv); +} + + +/* see facet_two.h */ +void facet_two_init(void *cc) +{ + two_init(cc, IV512); +} + +/* see facet_two.h */ +void facet_two(void *cc, const void *data, size_t len) +{ + two_core(cc, data, len); +} + +/* see facet_two.h */ +void facet_two_close(void *cc, void *dst) +{ + two_close(cc, 0, 0, dst, 16, IV512); +} + +/* see facet_two.h */ +void facet_two_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) +{ + two_close(cc, ub, n, dst, 16, IV512); +} + + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/stratum/algos/honeycomb/facet_two.h b/stratum/algos/honeycomb/facet_two.h new file mode 100644 index 000000000..79f6d85cd --- /dev/null +++ b/stratum/algos/honeycomb/facet_two.h @@ -0,0 +1,85 @@ +#ifndef FACET_TWO_H +#define FACET_TWO_H + +#ifdef __cplusplus +extern "C"{ +#endif + +#include +#include "honeycomb_types.h" + + +//#undef BEE_64 // + +/** + * This structure is a context for HoneyComb Facet #2 computations: it contains the + * intermediate values and some data from the last entered block. Once + * a HoneyComb Facet #2 computation has been performed, the context can be reused for another computation. + * + * The contents of this structure are private. A running HoneyComb Facet #2 computation + * can be cloned by copying the context (e.g. with a simple memcpy() ). + */ +typedef struct { + unsigned char buf[64]; /* first field, for alignment */ + size_t ptr; + union { +#if BEE_64 + bee_u64 wide[16]; +#endif + bee_u32 narrow[32]; + } H; +#if BEE_64 + bee_u64 block_count; +#else + bee_u32 block_count_high, block_count_low; +#endif +} facet_two_context; + + +/** + * Initialize a HoneyComb Facet #2 context. This process performs no memory allocation. + * + * @param cc the HoneyComb Facet #2 context (pointer to a facet_two_context ) + */ +void facet_two_init(void *cc); + +/** + * Process some data bytes. It is acceptable that len is zero (in which case this function does nothing). + * + * @param cc the HoneyComb Facet #2 context + * @param data the input data + * @param len the input data length (in bytes) + */ +void facet_two(void *cc, const void *data, size_t len); + +/** + * Terminate the current HoneyComb Facet #2 computation and output the result into + * the provided buffer. The destination buffer must be wide enough to + * accomodate the result (64 bytes). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #2 context + * @param dst the destination buffer + */ +void facet_two_close(void *cc, void *dst); + +/** + * Add a few additional bits (0 to 7) to the current computation, then + * terminate it and output the result in the provided buffer, which must + * be wide enough to accomodate the result (64 bytes). If bit number i + * in ub has value 2^i, then the extra bits are those + * numbered 7 downto 8-n (this is the big-endian convention at the byte + * level). The context is automatically reinitialized. + * + * @param cc the HoneyComb Facet #2 context + * @param ub the extra bits + * @param n the number of extra bits (0 to 7) + * @param dst the destination buffer + */ +void facet_two_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/honeycomb/facets_helper.c b/stratum/algos/honeycomb/facets_helper.c new file mode 100644 index 000000000..2d0f06857 --- /dev/null +++ b/stratum/algos/honeycomb/facets_helper.c @@ -0,0 +1,350 @@ + +#include "honeycomb_types.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +#if AES_BIG_ENDIAN + +#define AESx(x) ( ((BEE_C32(x) >> 24) & BEE_C32(0x000000FF)) \ + | ((BEE_C32(x) >> 8) & BEE_C32(0x0000FF00)) \ + | ((BEE_C32(x) << 8) & BEE_C32(0x00FF0000)) \ + | ((BEE_C32(x) << 24) & BEE_C32(0xFF000000))) + +#define AES0 AES0_BE +#define AES1 AES1_BE +#define AES2 AES2_BE +#define AES3 AES3_BE + +#define AES_ROUND_BE(X0, X1, X2, X3, K0, K1, K2, K3, Y0, Y1, Y2, Y3) do { \ + (Y0) = AES0[((X0) >> 24) & 0xFF] \ + ^ AES1[((X1) >> 16) & 0xFF] \ + ^ AES2[((X2) >> 8) & 0xFF] \ + ^ AES3[(X3) & 0xFF] ^ (K0); \ + (Y1) = AES0[((X1) >> 24) & 0xFF] \ + ^ AES1[((X2) >> 16) & 0xFF] \ + ^ AES2[((X3) >> 8) & 0xFF] \ + ^ AES3[(X0) & 0xFF] ^ (K1); \ + (Y2) = AES0[((X2) >> 24) & 0xFF] \ + ^ AES1[((X3) >> 16) & 0xFF] \ + ^ AES2[((X0) >> 8) & 0xFF] \ + ^ AES3[(X1) & 0xFF] ^ (K2); \ + (Y3) = AES0[((X3) >> 24) & 0xFF] \ + ^ AES1[((X0) >> 16) & 0xFF] \ + ^ AES2[((X1) >> 8) & 0xFF] \ + ^ AES3[(X2) & 0xFF] ^ (K3); \ + } while (0) + +#define AES_ROUND_NOKEY_BE(X0, X1, X2, X3, Y0, Y1, Y2, Y3) \ + AES_ROUND_BE(X0, X1, X2, X3, 0, 0, 0, 0, Y0, Y1, Y2, Y3) + +#else + +#define AESx(x) BEE_C32(x) +#define AES0 AES0_LE +#define AES1 AES1_LE +#define AES2 AES2_LE +#define AES3 AES3_LE + +#define AES_ROUND_LE(X0, X1, X2, X3, K0, K1, K2, K3, Y0, Y1, Y2, Y3) do { \ + (Y0) = AES0[(X0) & 0xFF] \ + ^ AES1[((X1) >> 8) & 0xFF] \ + ^ AES2[((X2) >> 16) & 0xFF] \ + ^ AES3[((X3) >> 24) & 0xFF] ^ (K0); \ + (Y1) = AES0[(X1) & 0xFF] \ + ^ AES1[((X2) >> 8) & 0xFF] \ + ^ AES2[((X3) >> 16) & 0xFF] \ + ^ AES3[((X0) >> 24) & 0xFF] ^ (K1); \ + (Y2) = AES0[(X2) & 0xFF] \ + ^ AES1[((X3) >> 8) & 0xFF] \ + ^ AES2[((X0) >> 16) & 0xFF] \ + ^ AES3[((X1) >> 24) & 0xFF] ^ (K2); \ + (Y3) = AES0[(X3) & 0xFF] \ + ^ AES1[((X0) >> 8) & 0xFF] \ + ^ AES2[((X1) >> 16) & 0xFF] \ + ^ AES3[((X2) >> 24) & 0xFF] ^ (K3); \ + } while (0) + +#define AES_ROUND_NOKEY_LE(X0, X1, X2, X3, Y0, Y1, Y2, Y3) \ + AES_ROUND_LE(X0, X1, X2, X3, 0, 0, 0, 0, Y0, Y1, Y2, Y3) + +#endif + +/* + * The AES*[] tables allow us to perform a fast evaluation of an AES + * round; table AESi[] combines SubBytes for a byte at row i, and + * MixColumns for the column where that byte goes after ShiftRows. + */ + +static const bee_u32 AES0[256] = { + AESx(0xA56363C6), AESx(0x847C7CF8), AESx(0x997777EE), AESx(0x8D7B7BF6), + AESx(0x0DF2F2FF), AESx(0xBD6B6BD6), AESx(0xB16F6FDE), AESx(0x54C5C591), + AESx(0x50303060), AESx(0x03010102), AESx(0xA96767CE), AESx(0x7D2B2B56), + AESx(0x19FEFEE7), AESx(0x62D7D7B5), AESx(0xE6ABAB4D), AESx(0x9A7676EC), + AESx(0x45CACA8F), AESx(0x9D82821F), AESx(0x40C9C989), AESx(0x877D7DFA), + AESx(0x15FAFAEF), AESx(0xEB5959B2), AESx(0xC947478E), AESx(0x0BF0F0FB), + AESx(0xECADAD41), AESx(0x67D4D4B3), AESx(0xFDA2A25F), AESx(0xEAAFAF45), + AESx(0xBF9C9C23), AESx(0xF7A4A453), AESx(0x967272E4), AESx(0x5BC0C09B), + AESx(0xC2B7B775), AESx(0x1CFDFDE1), AESx(0xAE93933D), AESx(0x6A26264C), + AESx(0x5A36366C), AESx(0x413F3F7E), AESx(0x02F7F7F5), AESx(0x4FCCCC83), + AESx(0x5C343468), AESx(0xF4A5A551), AESx(0x34E5E5D1), AESx(0x08F1F1F9), + AESx(0x937171E2), AESx(0x73D8D8AB), AESx(0x53313162), AESx(0x3F15152A), + AESx(0x0C040408), AESx(0x52C7C795), AESx(0x65232346), AESx(0x5EC3C39D), + AESx(0x28181830), AESx(0xA1969637), AESx(0x0F05050A), AESx(0xB59A9A2F), + AESx(0x0907070E), AESx(0x36121224), AESx(0x9B80801B), AESx(0x3DE2E2DF), + AESx(0x26EBEBCD), AESx(0x6927274E), AESx(0xCDB2B27F), AESx(0x9F7575EA), + AESx(0x1B090912), AESx(0x9E83831D), AESx(0x742C2C58), AESx(0x2E1A1A34), + AESx(0x2D1B1B36), AESx(0xB26E6EDC), AESx(0xEE5A5AB4), AESx(0xFBA0A05B), + AESx(0xF65252A4), AESx(0x4D3B3B76), AESx(0x61D6D6B7), AESx(0xCEB3B37D), + AESx(0x7B292952), AESx(0x3EE3E3DD), AESx(0x712F2F5E), AESx(0x97848413), + AESx(0xF55353A6), AESx(0x68D1D1B9), AESx(0x00000000), AESx(0x2CEDEDC1), + AESx(0x60202040), AESx(0x1FFCFCE3), AESx(0xC8B1B179), AESx(0xED5B5BB6), + AESx(0xBE6A6AD4), AESx(0x46CBCB8D), AESx(0xD9BEBE67), AESx(0x4B393972), + AESx(0xDE4A4A94), AESx(0xD44C4C98), AESx(0xE85858B0), AESx(0x4ACFCF85), + AESx(0x6BD0D0BB), AESx(0x2AEFEFC5), AESx(0xE5AAAA4F), AESx(0x16FBFBED), + AESx(0xC5434386), AESx(0xD74D4D9A), AESx(0x55333366), AESx(0x94858511), + AESx(0xCF45458A), AESx(0x10F9F9E9), AESx(0x06020204), AESx(0x817F7FFE), + AESx(0xF05050A0), AESx(0x443C3C78), AESx(0xBA9F9F25), AESx(0xE3A8A84B), + AESx(0xF35151A2), AESx(0xFEA3A35D), AESx(0xC0404080), AESx(0x8A8F8F05), + AESx(0xAD92923F), AESx(0xBC9D9D21), AESx(0x48383870), AESx(0x04F5F5F1), + AESx(0xDFBCBC63), AESx(0xC1B6B677), AESx(0x75DADAAF), AESx(0x63212142), + AESx(0x30101020), AESx(0x1AFFFFE5), AESx(0x0EF3F3FD), AESx(0x6DD2D2BF), + AESx(0x4CCDCD81), AESx(0x140C0C18), AESx(0x35131326), AESx(0x2FECECC3), + AESx(0xE15F5FBE), AESx(0xA2979735), AESx(0xCC444488), AESx(0x3917172E), + AESx(0x57C4C493), AESx(0xF2A7A755), AESx(0x827E7EFC), AESx(0x473D3D7A), + AESx(0xAC6464C8), AESx(0xE75D5DBA), AESx(0x2B191932), AESx(0x957373E6), + AESx(0xA06060C0), AESx(0x98818119), AESx(0xD14F4F9E), AESx(0x7FDCDCA3), + AESx(0x66222244), AESx(0x7E2A2A54), AESx(0xAB90903B), AESx(0x8388880B), + AESx(0xCA46468C), AESx(0x29EEEEC7), AESx(0xD3B8B86B), AESx(0x3C141428), + AESx(0x79DEDEA7), AESx(0xE25E5EBC), AESx(0x1D0B0B16), AESx(0x76DBDBAD), + AESx(0x3BE0E0DB), AESx(0x56323264), AESx(0x4E3A3A74), AESx(0x1E0A0A14), + AESx(0xDB494992), AESx(0x0A06060C), AESx(0x6C242448), AESx(0xE45C5CB8), + AESx(0x5DC2C29F), AESx(0x6ED3D3BD), AESx(0xEFACAC43), AESx(0xA66262C4), + AESx(0xA8919139), AESx(0xA4959531), AESx(0x37E4E4D3), AESx(0x8B7979F2), + AESx(0x32E7E7D5), AESx(0x43C8C88B), AESx(0x5937376E), AESx(0xB76D6DDA), + AESx(0x8C8D8D01), AESx(0x64D5D5B1), AESx(0xD24E4E9C), AESx(0xE0A9A949), + AESx(0xB46C6CD8), AESx(0xFA5656AC), AESx(0x07F4F4F3), AESx(0x25EAEACF), + AESx(0xAF6565CA), AESx(0x8E7A7AF4), AESx(0xE9AEAE47), AESx(0x18080810), + AESx(0xD5BABA6F), AESx(0x887878F0), AESx(0x6F25254A), AESx(0x722E2E5C), + AESx(0x241C1C38), AESx(0xF1A6A657), AESx(0xC7B4B473), AESx(0x51C6C697), + AESx(0x23E8E8CB), AESx(0x7CDDDDA1), AESx(0x9C7474E8), AESx(0x211F1F3E), + AESx(0xDD4B4B96), AESx(0xDCBDBD61), AESx(0x868B8B0D), AESx(0x858A8A0F), + AESx(0x907070E0), AESx(0x423E3E7C), AESx(0xC4B5B571), AESx(0xAA6666CC), + AESx(0xD8484890), AESx(0x05030306), AESx(0x01F6F6F7), AESx(0x120E0E1C), + AESx(0xA36161C2), AESx(0x5F35356A), AESx(0xF95757AE), AESx(0xD0B9B969), + AESx(0x91868617), AESx(0x58C1C199), AESx(0x271D1D3A), AESx(0xB99E9E27), + AESx(0x38E1E1D9), AESx(0x13F8F8EB), AESx(0xB398982B), AESx(0x33111122), + AESx(0xBB6969D2), AESx(0x70D9D9A9), AESx(0x898E8E07), AESx(0xA7949433), + AESx(0xB69B9B2D), AESx(0x221E1E3C), AESx(0x92878715), AESx(0x20E9E9C9), + AESx(0x49CECE87), AESx(0xFF5555AA), AESx(0x78282850), AESx(0x7ADFDFA5), + AESx(0x8F8C8C03), AESx(0xF8A1A159), AESx(0x80898909), AESx(0x170D0D1A), + AESx(0xDABFBF65), AESx(0x31E6E6D7), AESx(0xC6424284), AESx(0xB86868D0), + AESx(0xC3414182), AESx(0xB0999929), AESx(0x772D2D5A), AESx(0x110F0F1E), + AESx(0xCBB0B07B), AESx(0xFC5454A8), AESx(0xD6BBBB6D), AESx(0x3A16162C) +}; + +static const bee_u32 AES1[256] = { + AESx(0x6363C6A5), AESx(0x7C7CF884), AESx(0x7777EE99), AESx(0x7B7BF68D), + AESx(0xF2F2FF0D), AESx(0x6B6BD6BD), AESx(0x6F6FDEB1), AESx(0xC5C59154), + AESx(0x30306050), AESx(0x01010203), AESx(0x6767CEA9), AESx(0x2B2B567D), + AESx(0xFEFEE719), AESx(0xD7D7B562), AESx(0xABAB4DE6), AESx(0x7676EC9A), + AESx(0xCACA8F45), AESx(0x82821F9D), AESx(0xC9C98940), AESx(0x7D7DFA87), + AESx(0xFAFAEF15), AESx(0x5959B2EB), AESx(0x47478EC9), AESx(0xF0F0FB0B), + AESx(0xADAD41EC), AESx(0xD4D4B367), AESx(0xA2A25FFD), AESx(0xAFAF45EA), + AESx(0x9C9C23BF), AESx(0xA4A453F7), AESx(0x7272E496), AESx(0xC0C09B5B), + AESx(0xB7B775C2), AESx(0xFDFDE11C), AESx(0x93933DAE), AESx(0x26264C6A), + AESx(0x36366C5A), AESx(0x3F3F7E41), AESx(0xF7F7F502), AESx(0xCCCC834F), + AESx(0x3434685C), AESx(0xA5A551F4), AESx(0xE5E5D134), AESx(0xF1F1F908), + AESx(0x7171E293), AESx(0xD8D8AB73), AESx(0x31316253), AESx(0x15152A3F), + AESx(0x0404080C), AESx(0xC7C79552), AESx(0x23234665), AESx(0xC3C39D5E), + AESx(0x18183028), AESx(0x969637A1), AESx(0x05050A0F), AESx(0x9A9A2FB5), + AESx(0x07070E09), AESx(0x12122436), AESx(0x80801B9B), AESx(0xE2E2DF3D), + AESx(0xEBEBCD26), AESx(0x27274E69), AESx(0xB2B27FCD), AESx(0x7575EA9F), + AESx(0x0909121B), AESx(0x83831D9E), AESx(0x2C2C5874), AESx(0x1A1A342E), + AESx(0x1B1B362D), AESx(0x6E6EDCB2), AESx(0x5A5AB4EE), AESx(0xA0A05BFB), + AESx(0x5252A4F6), AESx(0x3B3B764D), AESx(0xD6D6B761), AESx(0xB3B37DCE), + AESx(0x2929527B), AESx(0xE3E3DD3E), AESx(0x2F2F5E71), AESx(0x84841397), + AESx(0x5353A6F5), AESx(0xD1D1B968), AESx(0x00000000), AESx(0xEDEDC12C), + AESx(0x20204060), AESx(0xFCFCE31F), AESx(0xB1B179C8), AESx(0x5B5BB6ED), + AESx(0x6A6AD4BE), AESx(0xCBCB8D46), AESx(0xBEBE67D9), AESx(0x3939724B), + AESx(0x4A4A94DE), AESx(0x4C4C98D4), AESx(0x5858B0E8), AESx(0xCFCF854A), + AESx(0xD0D0BB6B), AESx(0xEFEFC52A), AESx(0xAAAA4FE5), AESx(0xFBFBED16), + AESx(0x434386C5), AESx(0x4D4D9AD7), AESx(0x33336655), AESx(0x85851194), + AESx(0x45458ACF), AESx(0xF9F9E910), AESx(0x02020406), AESx(0x7F7FFE81), + AESx(0x5050A0F0), AESx(0x3C3C7844), AESx(0x9F9F25BA), AESx(0xA8A84BE3), + AESx(0x5151A2F3), AESx(0xA3A35DFE), AESx(0x404080C0), AESx(0x8F8F058A), + AESx(0x92923FAD), AESx(0x9D9D21BC), AESx(0x38387048), AESx(0xF5F5F104), + AESx(0xBCBC63DF), AESx(0xB6B677C1), AESx(0xDADAAF75), AESx(0x21214263), + AESx(0x10102030), AESx(0xFFFFE51A), AESx(0xF3F3FD0E), AESx(0xD2D2BF6D), + AESx(0xCDCD814C), AESx(0x0C0C1814), AESx(0x13132635), AESx(0xECECC32F), + AESx(0x5F5FBEE1), AESx(0x979735A2), AESx(0x444488CC), AESx(0x17172E39), + AESx(0xC4C49357), AESx(0xA7A755F2), AESx(0x7E7EFC82), AESx(0x3D3D7A47), + AESx(0x6464C8AC), AESx(0x5D5DBAE7), AESx(0x1919322B), AESx(0x7373E695), + AESx(0x6060C0A0), AESx(0x81811998), AESx(0x4F4F9ED1), AESx(0xDCDCA37F), + AESx(0x22224466), AESx(0x2A2A547E), AESx(0x90903BAB), AESx(0x88880B83), + AESx(0x46468CCA), AESx(0xEEEEC729), AESx(0xB8B86BD3), AESx(0x1414283C), + AESx(0xDEDEA779), AESx(0x5E5EBCE2), AESx(0x0B0B161D), AESx(0xDBDBAD76), + AESx(0xE0E0DB3B), AESx(0x32326456), AESx(0x3A3A744E), AESx(0x0A0A141E), + AESx(0x494992DB), AESx(0x06060C0A), AESx(0x2424486C), AESx(0x5C5CB8E4), + AESx(0xC2C29F5D), AESx(0xD3D3BD6E), AESx(0xACAC43EF), AESx(0x6262C4A6), + AESx(0x919139A8), AESx(0x959531A4), AESx(0xE4E4D337), AESx(0x7979F28B), + AESx(0xE7E7D532), AESx(0xC8C88B43), AESx(0x37376E59), AESx(0x6D6DDAB7), + AESx(0x8D8D018C), AESx(0xD5D5B164), AESx(0x4E4E9CD2), AESx(0xA9A949E0), + AESx(0x6C6CD8B4), AESx(0x5656ACFA), AESx(0xF4F4F307), AESx(0xEAEACF25), + AESx(0x6565CAAF), AESx(0x7A7AF48E), AESx(0xAEAE47E9), AESx(0x08081018), + AESx(0xBABA6FD5), AESx(0x7878F088), AESx(0x25254A6F), AESx(0x2E2E5C72), + AESx(0x1C1C3824), AESx(0xA6A657F1), AESx(0xB4B473C7), AESx(0xC6C69751), + AESx(0xE8E8CB23), AESx(0xDDDDA17C), AESx(0x7474E89C), AESx(0x1F1F3E21), + AESx(0x4B4B96DD), AESx(0xBDBD61DC), AESx(0x8B8B0D86), AESx(0x8A8A0F85), + AESx(0x7070E090), AESx(0x3E3E7C42), AESx(0xB5B571C4), AESx(0x6666CCAA), + AESx(0x484890D8), AESx(0x03030605), AESx(0xF6F6F701), AESx(0x0E0E1C12), + AESx(0x6161C2A3), AESx(0x35356A5F), AESx(0x5757AEF9), AESx(0xB9B969D0), + AESx(0x86861791), AESx(0xC1C19958), AESx(0x1D1D3A27), AESx(0x9E9E27B9), + AESx(0xE1E1D938), AESx(0xF8F8EB13), AESx(0x98982BB3), AESx(0x11112233), + AESx(0x6969D2BB), AESx(0xD9D9A970), AESx(0x8E8E0789), AESx(0x949433A7), + AESx(0x9B9B2DB6), AESx(0x1E1E3C22), AESx(0x87871592), AESx(0xE9E9C920), + AESx(0xCECE8749), AESx(0x5555AAFF), AESx(0x28285078), AESx(0xDFDFA57A), + AESx(0x8C8C038F), AESx(0xA1A159F8), AESx(0x89890980), AESx(0x0D0D1A17), + AESx(0xBFBF65DA), AESx(0xE6E6D731), AESx(0x424284C6), AESx(0x6868D0B8), + AESx(0x414182C3), AESx(0x999929B0), AESx(0x2D2D5A77), AESx(0x0F0F1E11), + AESx(0xB0B07BCB), AESx(0x5454A8FC), AESx(0xBBBB6DD6), AESx(0x16162C3A) +}; + +static const bee_u32 AES2[256] = { + AESx(0x63C6A563), AESx(0x7CF8847C), AESx(0x77EE9977), AESx(0x7BF68D7B), + AESx(0xF2FF0DF2), AESx(0x6BD6BD6B), AESx(0x6FDEB16F), AESx(0xC59154C5), + AESx(0x30605030), AESx(0x01020301), AESx(0x67CEA967), AESx(0x2B567D2B), + AESx(0xFEE719FE), AESx(0xD7B562D7), AESx(0xAB4DE6AB), AESx(0x76EC9A76), + AESx(0xCA8F45CA), AESx(0x821F9D82), AESx(0xC98940C9), AESx(0x7DFA877D), + AESx(0xFAEF15FA), AESx(0x59B2EB59), AESx(0x478EC947), AESx(0xF0FB0BF0), + AESx(0xAD41ECAD), AESx(0xD4B367D4), AESx(0xA25FFDA2), AESx(0xAF45EAAF), + AESx(0x9C23BF9C), AESx(0xA453F7A4), AESx(0x72E49672), AESx(0xC09B5BC0), + AESx(0xB775C2B7), AESx(0xFDE11CFD), AESx(0x933DAE93), AESx(0x264C6A26), + AESx(0x366C5A36), AESx(0x3F7E413F), AESx(0xF7F502F7), AESx(0xCC834FCC), + AESx(0x34685C34), AESx(0xA551F4A5), AESx(0xE5D134E5), AESx(0xF1F908F1), + AESx(0x71E29371), AESx(0xD8AB73D8), AESx(0x31625331), AESx(0x152A3F15), + AESx(0x04080C04), AESx(0xC79552C7), AESx(0x23466523), AESx(0xC39D5EC3), + AESx(0x18302818), AESx(0x9637A196), AESx(0x050A0F05), AESx(0x9A2FB59A), + AESx(0x070E0907), AESx(0x12243612), AESx(0x801B9B80), AESx(0xE2DF3DE2), + AESx(0xEBCD26EB), AESx(0x274E6927), AESx(0xB27FCDB2), AESx(0x75EA9F75), + AESx(0x09121B09), AESx(0x831D9E83), AESx(0x2C58742C), AESx(0x1A342E1A), + AESx(0x1B362D1B), AESx(0x6EDCB26E), AESx(0x5AB4EE5A), AESx(0xA05BFBA0), + AESx(0x52A4F652), AESx(0x3B764D3B), AESx(0xD6B761D6), AESx(0xB37DCEB3), + AESx(0x29527B29), AESx(0xE3DD3EE3), AESx(0x2F5E712F), AESx(0x84139784), + AESx(0x53A6F553), AESx(0xD1B968D1), AESx(0x00000000), AESx(0xEDC12CED), + AESx(0x20406020), AESx(0xFCE31FFC), AESx(0xB179C8B1), AESx(0x5BB6ED5B), + AESx(0x6AD4BE6A), AESx(0xCB8D46CB), AESx(0xBE67D9BE), AESx(0x39724B39), + AESx(0x4A94DE4A), AESx(0x4C98D44C), AESx(0x58B0E858), AESx(0xCF854ACF), + AESx(0xD0BB6BD0), AESx(0xEFC52AEF), AESx(0xAA4FE5AA), AESx(0xFBED16FB), + AESx(0x4386C543), AESx(0x4D9AD74D), AESx(0x33665533), AESx(0x85119485), + AESx(0x458ACF45), AESx(0xF9E910F9), AESx(0x02040602), AESx(0x7FFE817F), + AESx(0x50A0F050), AESx(0x3C78443C), AESx(0x9F25BA9F), AESx(0xA84BE3A8), + AESx(0x51A2F351), AESx(0xA35DFEA3), AESx(0x4080C040), AESx(0x8F058A8F), + AESx(0x923FAD92), AESx(0x9D21BC9D), AESx(0x38704838), AESx(0xF5F104F5), + AESx(0xBC63DFBC), AESx(0xB677C1B6), AESx(0xDAAF75DA), AESx(0x21426321), + AESx(0x10203010), AESx(0xFFE51AFF), AESx(0xF3FD0EF3), AESx(0xD2BF6DD2), + AESx(0xCD814CCD), AESx(0x0C18140C), AESx(0x13263513), AESx(0xECC32FEC), + AESx(0x5FBEE15F), AESx(0x9735A297), AESx(0x4488CC44), AESx(0x172E3917), + AESx(0xC49357C4), AESx(0xA755F2A7), AESx(0x7EFC827E), AESx(0x3D7A473D), + AESx(0x64C8AC64), AESx(0x5DBAE75D), AESx(0x19322B19), AESx(0x73E69573), + AESx(0x60C0A060), AESx(0x81199881), AESx(0x4F9ED14F), AESx(0xDCA37FDC), + AESx(0x22446622), AESx(0x2A547E2A), AESx(0x903BAB90), AESx(0x880B8388), + AESx(0x468CCA46), AESx(0xEEC729EE), AESx(0xB86BD3B8), AESx(0x14283C14), + AESx(0xDEA779DE), AESx(0x5EBCE25E), AESx(0x0B161D0B), AESx(0xDBAD76DB), + AESx(0xE0DB3BE0), AESx(0x32645632), AESx(0x3A744E3A), AESx(0x0A141E0A), + AESx(0x4992DB49), AESx(0x060C0A06), AESx(0x24486C24), AESx(0x5CB8E45C), + AESx(0xC29F5DC2), AESx(0xD3BD6ED3), AESx(0xAC43EFAC), AESx(0x62C4A662), + AESx(0x9139A891), AESx(0x9531A495), AESx(0xE4D337E4), AESx(0x79F28B79), + AESx(0xE7D532E7), AESx(0xC88B43C8), AESx(0x376E5937), AESx(0x6DDAB76D), + AESx(0x8D018C8D), AESx(0xD5B164D5), AESx(0x4E9CD24E), AESx(0xA949E0A9), + AESx(0x6CD8B46C), AESx(0x56ACFA56), AESx(0xF4F307F4), AESx(0xEACF25EA), + AESx(0x65CAAF65), AESx(0x7AF48E7A), AESx(0xAE47E9AE), AESx(0x08101808), + AESx(0xBA6FD5BA), AESx(0x78F08878), AESx(0x254A6F25), AESx(0x2E5C722E), + AESx(0x1C38241C), AESx(0xA657F1A6), AESx(0xB473C7B4), AESx(0xC69751C6), + AESx(0xE8CB23E8), AESx(0xDDA17CDD), AESx(0x74E89C74), AESx(0x1F3E211F), + AESx(0x4B96DD4B), AESx(0xBD61DCBD), AESx(0x8B0D868B), AESx(0x8A0F858A), + AESx(0x70E09070), AESx(0x3E7C423E), AESx(0xB571C4B5), AESx(0x66CCAA66), + AESx(0x4890D848), AESx(0x03060503), AESx(0xF6F701F6), AESx(0x0E1C120E), + AESx(0x61C2A361), AESx(0x356A5F35), AESx(0x57AEF957), AESx(0xB969D0B9), + AESx(0x86179186), AESx(0xC19958C1), AESx(0x1D3A271D), AESx(0x9E27B99E), + AESx(0xE1D938E1), AESx(0xF8EB13F8), AESx(0x982BB398), AESx(0x11223311), + AESx(0x69D2BB69), AESx(0xD9A970D9), AESx(0x8E07898E), AESx(0x9433A794), + AESx(0x9B2DB69B), AESx(0x1E3C221E), AESx(0x87159287), AESx(0xE9C920E9), + AESx(0xCE8749CE), AESx(0x55AAFF55), AESx(0x28507828), AESx(0xDFA57ADF), + AESx(0x8C038F8C), AESx(0xA159F8A1), AESx(0x89098089), AESx(0x0D1A170D), + AESx(0xBF65DABF), AESx(0xE6D731E6), AESx(0x4284C642), AESx(0x68D0B868), + AESx(0x4182C341), AESx(0x9929B099), AESx(0x2D5A772D), AESx(0x0F1E110F), + AESx(0xB07BCBB0), AESx(0x54A8FC54), AESx(0xBB6DD6BB), AESx(0x162C3A16) +}; + +static const bee_u32 AES3[256] = { + AESx(0xC6A56363), AESx(0xF8847C7C), AESx(0xEE997777), AESx(0xF68D7B7B), + AESx(0xFF0DF2F2), AESx(0xD6BD6B6B), AESx(0xDEB16F6F), AESx(0x9154C5C5), + AESx(0x60503030), AESx(0x02030101), AESx(0xCEA96767), AESx(0x567D2B2B), + AESx(0xE719FEFE), AESx(0xB562D7D7), AESx(0x4DE6ABAB), AESx(0xEC9A7676), + AESx(0x8F45CACA), AESx(0x1F9D8282), AESx(0x8940C9C9), AESx(0xFA877D7D), + AESx(0xEF15FAFA), AESx(0xB2EB5959), AESx(0x8EC94747), AESx(0xFB0BF0F0), + AESx(0x41ECADAD), AESx(0xB367D4D4), AESx(0x5FFDA2A2), AESx(0x45EAAFAF), + AESx(0x23BF9C9C), AESx(0x53F7A4A4), AESx(0xE4967272), AESx(0x9B5BC0C0), + AESx(0x75C2B7B7), AESx(0xE11CFDFD), AESx(0x3DAE9393), AESx(0x4C6A2626), + AESx(0x6C5A3636), AESx(0x7E413F3F), AESx(0xF502F7F7), AESx(0x834FCCCC), + AESx(0x685C3434), AESx(0x51F4A5A5), AESx(0xD134E5E5), AESx(0xF908F1F1), + AESx(0xE2937171), AESx(0xAB73D8D8), AESx(0x62533131), AESx(0x2A3F1515), + AESx(0x080C0404), AESx(0x9552C7C7), AESx(0x46652323), AESx(0x9D5EC3C3), + AESx(0x30281818), AESx(0x37A19696), AESx(0x0A0F0505), AESx(0x2FB59A9A), + AESx(0x0E090707), AESx(0x24361212), AESx(0x1B9B8080), AESx(0xDF3DE2E2), + AESx(0xCD26EBEB), AESx(0x4E692727), AESx(0x7FCDB2B2), AESx(0xEA9F7575), + AESx(0x121B0909), AESx(0x1D9E8383), AESx(0x58742C2C), AESx(0x342E1A1A), + AESx(0x362D1B1B), AESx(0xDCB26E6E), AESx(0xB4EE5A5A), AESx(0x5BFBA0A0), + AESx(0xA4F65252), AESx(0x764D3B3B), AESx(0xB761D6D6), AESx(0x7DCEB3B3), + AESx(0x527B2929), AESx(0xDD3EE3E3), AESx(0x5E712F2F), AESx(0x13978484), + AESx(0xA6F55353), AESx(0xB968D1D1), AESx(0x00000000), AESx(0xC12CEDED), + AESx(0x40602020), AESx(0xE31FFCFC), AESx(0x79C8B1B1), AESx(0xB6ED5B5B), + AESx(0xD4BE6A6A), AESx(0x8D46CBCB), AESx(0x67D9BEBE), AESx(0x724B3939), + AESx(0x94DE4A4A), AESx(0x98D44C4C), AESx(0xB0E85858), AESx(0x854ACFCF), + AESx(0xBB6BD0D0), AESx(0xC52AEFEF), AESx(0x4FE5AAAA), AESx(0xED16FBFB), + AESx(0x86C54343), AESx(0x9AD74D4D), AESx(0x66553333), AESx(0x11948585), + AESx(0x8ACF4545), AESx(0xE910F9F9), AESx(0x04060202), AESx(0xFE817F7F), + AESx(0xA0F05050), AESx(0x78443C3C), AESx(0x25BA9F9F), AESx(0x4BE3A8A8), + AESx(0xA2F35151), AESx(0x5DFEA3A3), AESx(0x80C04040), AESx(0x058A8F8F), + AESx(0x3FAD9292), AESx(0x21BC9D9D), AESx(0x70483838), AESx(0xF104F5F5), + AESx(0x63DFBCBC), AESx(0x77C1B6B6), AESx(0xAF75DADA), AESx(0x42632121), + AESx(0x20301010), AESx(0xE51AFFFF), AESx(0xFD0EF3F3), AESx(0xBF6DD2D2), + AESx(0x814CCDCD), AESx(0x18140C0C), AESx(0x26351313), AESx(0xC32FECEC), + AESx(0xBEE15F5F), AESx(0x35A29797), AESx(0x88CC4444), AESx(0x2E391717), + AESx(0x9357C4C4), AESx(0x55F2A7A7), AESx(0xFC827E7E), AESx(0x7A473D3D), + AESx(0xC8AC6464), AESx(0xBAE75D5D), AESx(0x322B1919), AESx(0xE6957373), + AESx(0xC0A06060), AESx(0x19988181), AESx(0x9ED14F4F), AESx(0xA37FDCDC), + AESx(0x44662222), AESx(0x547E2A2A), AESx(0x3BAB9090), AESx(0x0B838888), + AESx(0x8CCA4646), AESx(0xC729EEEE), AESx(0x6BD3B8B8), AESx(0x283C1414), + AESx(0xA779DEDE), AESx(0xBCE25E5E), AESx(0x161D0B0B), AESx(0xAD76DBDB), + AESx(0xDB3BE0E0), AESx(0x64563232), AESx(0x744E3A3A), AESx(0x141E0A0A), + AESx(0x92DB4949), AESx(0x0C0A0606), AESx(0x486C2424), AESx(0xB8E45C5C), + AESx(0x9F5DC2C2), AESx(0xBD6ED3D3), AESx(0x43EFACAC), AESx(0xC4A66262), + AESx(0x39A89191), AESx(0x31A49595), AESx(0xD337E4E4), AESx(0xF28B7979), + AESx(0xD532E7E7), AESx(0x8B43C8C8), AESx(0x6E593737), AESx(0xDAB76D6D), + AESx(0x018C8D8D), AESx(0xB164D5D5), AESx(0x9CD24E4E), AESx(0x49E0A9A9), + AESx(0xD8B46C6C), AESx(0xACFA5656), AESx(0xF307F4F4), AESx(0xCF25EAEA), + AESx(0xCAAF6565), AESx(0xF48E7A7A), AESx(0x47E9AEAE), AESx(0x10180808), + AESx(0x6FD5BABA), AESx(0xF0887878), AESx(0x4A6F2525), AESx(0x5C722E2E), + AESx(0x38241C1C), AESx(0x57F1A6A6), AESx(0x73C7B4B4), AESx(0x9751C6C6), + AESx(0xCB23E8E8), AESx(0xA17CDDDD), AESx(0xE89C7474), AESx(0x3E211F1F), + AESx(0x96DD4B4B), AESx(0x61DCBDBD), AESx(0x0D868B8B), AESx(0x0F858A8A), + AESx(0xE0907070), AESx(0x7C423E3E), AESx(0x71C4B5B5), AESx(0xCCAA6666), + AESx(0x90D84848), AESx(0x06050303), AESx(0xF701F6F6), AESx(0x1C120E0E), + AESx(0xC2A36161), AESx(0x6A5F3535), AESx(0xAEF95757), AESx(0x69D0B9B9), + AESx(0x17918686), AESx(0x9958C1C1), AESx(0x3A271D1D), AESx(0x27B99E9E), + AESx(0xD938E1E1), AESx(0xEB13F8F8), AESx(0x2BB39898), AESx(0x22331111), + AESx(0xD2BB6969), AESx(0xA970D9D9), AESx(0x07898E8E), AESx(0x33A79494), + AESx(0x2DB69B9B), AESx(0x3C221E1E), AESx(0x15928787), AESx(0xC920E9E9), + AESx(0x8749CECE), AESx(0xAAFF5555), AESx(0x50782828), AESx(0xA57ADFDF), + AESx(0x038F8C8C), AESx(0x59F8A1A1), AESx(0x09808989), AESx(0x1A170D0D), + AESx(0x65DABFBF), AESx(0xD731E6E6), AESx(0x84C64242), AESx(0xD0B86868), + AESx(0x82C34141), AESx(0x29B09999), AESx(0x5A772D2D), AESx(0x1E110F0F), + AESx(0x7BCBB0B0), AESx(0xA8FC5454), AESx(0x6DD6BBBB), AESx(0x2C3A1616) +}; + +#ifdef __cplusplus +} +#endif diff --git a/stratum/algos/honeycomb/honeycomb_types.h b/stratum/algos/honeycomb/honeycomb_types.h new file mode 100644 index 000000000..3f47cae51 --- /dev/null +++ b/stratum/algos/honeycomb/honeycomb_types.h @@ -0,0 +1,1165 @@ +#ifndef HONEYCOMB_TYPESH +#define HONEYCOMB_TYPESH + +#include + +// +// All our I/O functions are defined over octet streams. We do not know +// how to handle input data if bytes are not octets. +// +#if CHAR_BIT != 8 + #error This code requires 8-bit bytes +#endif + +// +// We want to define the types "bee_u32" and "bee_u64" which hold +// unsigned values of at least, respectively, 32 and 64 bits. These +// tests should select appropriate types for most platforms. The +// macro "BEE_64" is defined if the 64-bit is supported. +// + +#undef BEE_64 +#undef BEE_64_TRUE + +#if defined __STDC__ && __STDC_VERSION__ >= 199901L + + // + // On C99 implementations, we can use to get an exact 64-bit + // type, if any, or otherwise use a wider type (which must exist, for + // C99 conformance). + // + + #include + + #ifdef UINT32_MAX + typedef uint32_t bee_u32; + typedef int32_t bee_s32; + #else + typedef uint_fast32_t bee_u32; + typedef int_fast32_t bee_s32; + #endif + + #if !BEE_NO_64 + #ifdef UINT64_MAX + typedef uint64_t bee_u64; + typedef int64_t bee_s64; + #else + typedef uint_fast64_t bee_u64; + typedef int_fast64_t bee_s64; + #endif + #endif + + #define BEE_C32(x) ((bee_u32)(x)) + + #if !BEE_NO_64 + #define BEE_C64(x) ((bee_u64)(x)) + #define BEE_64 1 + #endif + +#else + + // + // On non-C99 systems, we use "unsigned int" if it is wide enough, + // "unsigned long" otherwise. This supports all "reasonable" architectures. + // We have to be cautious: pre-C99 preprocessors handle constants + // differently in '#if' expressions. Hence the shifts to test UINT_MAX. + // + + #if ((UINT_MAX >> 11) >> 11) >= 0x3FF + + typedef unsigned int bee_u32; + typedef int bee_s32; + + #define BEE_C32(x) ((bee_u32)(x ## U)) + + #else + + typedef unsigned long bee_u32; + typedef long bee_s32; + + #define BEE_C32(x) ((bee_u32)(x ## UL)) + + #endif + + #if !BEE_NO_64 + + // + // We want a 64-bit type. We use "unsigned long" if it is wide enough (as + // is common on 64-bit architectures such as AMD64, Alpha or Sparcv9), + // "unsigned long long" otherwise, if available. We use ULLONG_MAX to + // test whether "unsigned long long" is available; we also know that + // gcc features this type, even if the libc header do not know it. + // + + #if ((ULONG_MAX >> 31) >> 31) >= 3 + + typedef unsigned long bee_u64; + typedef long bee_s64; + + #define BEE_C64(x) ((bee_u64)(x ## UL)) + + #define BEE_64 1 + + #elif ((ULLONG_MAX >> 31) >> 31) >= 3 || defined __GNUC__ + + typedef unsigned long long bee_u64; + typedef long long bee_s64; + + #define BEE_C64(x) ((bee_u64)(x ## ULL)) + + #define BEE_64 1 + + #else + + // + // No 64-bit type... + // + + #endif + + #endif + +#endif + + +// +// If the "unsigned long" type has length 64 bits or more, then this is +// a "true" 64-bit architectures. This is also true with Visual C on +// amd64, even though the "long" type is limited to 32 bits. +// +#if BEE_64 && (((ULONG_MAX >> 31) >> 31) >= 3 || defined _M_X64) + #define BEE_64_TRUE 1 +#endif + +// +// Implementation note: some processors have specific opcodes to perform +// a rotation. Recent versions of gcc recognize the expression above and +// use the relevant opcodes, when appropriate. +// + +#define BEE_T32(x) ((x) & BEE_C32(0xFFFFFFFF)) +#define BEE_ROTL32(x, n) BEE_T32(((x) << (n)) | ((x) >> (32 - (n)))) +#define BEE_ROTR32(x, n) BEE_ROTL32(x, (32 - (n))) + +#if BEE_64 + #define BEE_T64(x) ((x) & BEE_C64(0xFFFFFFFFFFFFFFFF)) + #define BEE_ROTL64(x, n) BEE_T64(((x) << (n)) | ((x) >> (64 - (n)))) + #define BEE_ROTR64(x, n) BEE_ROTL64(x, (64 - (n))) +#endif + +#ifndef DOXYGEN_IGNORE + // + // Define BEE_INLINE to be an "inline" qualifier, if available. We define + // some small macro-like functions which benefit greatly from being inlined. + // + #if (defined __STDC__ && __STDC_VERSION__ >= 199901L) || defined __GNUC__ + #define BEE_INLINE inline + #elif defined _MSC_VER + #define BEE_INLINE __inline + #else + #define BEE_INLINE + #endif +#endif + +// +// We define some macros which qualify the architecture. These macros +// may be explicit set externally (e.g. as compiler parameters). The +// code below sets those macros if they are not already defined. +// +// Most macros are boolean, thus evaluate to either zero or non-zero. +// The BEE_UPTR macro is special, in that it evaluates to a C type, +// or is not defined. +// +// BEE_UPTR if defined: unsigned type to cast pointers into +// +// BEE_UNALIGNED non-zero if unaligned accesses are efficient +// BEE_LITTLE_ENDIAN non-zero if architecture is known to be little-endian +// BEE_BIG_ENDIAN non-zero if architecture is known to be big-endian +// BEE_LITTLE_FAST non-zero if little-endian decoding is fast +// BEE_BIG_FAST non-zero if big-endian decoding is fast +// +// If BEE_UPTR is defined, then encoding and decoding of 32-bit and 64-bit +// values will try to be "smart". Either BEE_LITTLE_ENDIAN or BEE_BIG_ENDIAN +// _must_ be non-zero in those situations. The 32-bit and 64-bit types +// _must_ also have an exact width. +// +// BEE_SPARCV9_GCC_32 UltraSPARC-compatible with gcc, 32-bit mode +// BEE_SPARCV9_GCC_64 UltraSPARC-compatible with gcc, 64-bit mode +// BEE_SPARCV9_GCC UltraSPARC-compatible with gcc +// BEE_I386_GCC x86-compatible (32-bit) with gcc +// BEE_I386_MSVC x86-compatible (32-bit) with Microsoft Visual C +// BEE_AMD64_GCC x86-compatible (64-bit) with gcc +// BEE_AMD64_MSVC x86-compatible (64-bit) with Microsoft Visual C +// BEE_PPC32_GCC PowerPC, 32-bit, with gcc +// BEE_PPC64_GCC PowerPC, 64-bit, with gcc +// +// TODO: enhance automatic detection, for more architectures and compilers. +// Endianness is the most important. BEE_UNALIGNED and BEE_UPTR help with +// some very fast functions (e.g. MD4) when using unaligned input data. +// The CPU-specific-with-GCC macros are useful only for inline assembly, +// normally restrained to this header file. +// + +// +// 32-bit x86, aka "i386 compatible". +// +#if defined __i386__ || defined _M_IX86 + #define BEE_DETECT_UNALIGNED 1 + #define BEE_DETECT_LITTLE_ENDIAN 1 + #define BEE_DETECT_UPTR bee_u32 + #ifdef __GNUC__ + #define BEE_DETECT_I386_GCC 1 + #endif + #ifdef _MSC_VER + #define BEE_DETECT_I386_MSVC 1 + #endif +// +// 64-bit x86, hereafter known as "amd64". +// +#elif defined __x86_64 || defined _M_X64 + #define BEE_DETECT_UNALIGNED 1 + #define BEE_DETECT_LITTLE_ENDIAN 1 + #define BEE_DETECT_UPTR bee_u64 + #ifdef __GNUC__ + #define BEE_DETECT_AMD64_GCC 1 + #endif + #ifdef _MSC_VER + #define BEE_DETECT_AMD64_MSVC 1 + #endif +// +// 64-bit Sparc architecture (implies v9). +// +#elif ((defined __sparc__ || defined __sparc) && defined __arch64__) \ + || defined __sparcv9 + #define BEE_DETECT_BIG_ENDIAN 1 + #define BEE_DETECT_UPTR bee_u64 + #ifdef __GNUC__ + #define BEE_DETECT_SPARCV9_GCC_64 1 + #define BEE_DETECT_LITTLE_FAST 1 + #endif +// +// 32-bit Sparc. +// +#elif (defined __sparc__ || defined __sparc) \ + && !(defined __sparcv9 || defined __arch64__) + #define BEE_DETECT_BIG_ENDIAN 1 + #define BEE_DETECT_UPTR bee_u32 + #if defined __GNUC__ && defined __sparc_v9__ + #define BEE_DETECT_SPARCV9_GCC_32 1 + #define BEE_DETECT_LITTLE_FAST 1 + #endif +// +// ARM, little-endian. +/// +#elif defined __arm__ && __ARMEL__ + #define BEE_DETECT_LITTLE_ENDIAN 1 +// +// MIPS, little-endian. +// +#elif MIPSEL || _MIPSEL || __MIPSEL || __MIPSEL__ + #define BEE_DETECT_LITTLE_ENDIAN 1 +// +// MIPS, big-endian. +// +#elif MIPSEB || _MIPSEB || __MIPSEB || __MIPSEB__ + #define BEE_DETECT_BIG_ENDIAN 1 +// +// PowerPC. +// +#elif defined __powerpc__ || defined __POWERPC__ || defined __ppc__ \ + || defined _ARCH_PPC + + // + // Note: we do not declare cross-endian access to be "fast": even if + // using inline assembly, implementation should still assume that + // keeping the decoded word in a temporary is faster than decoding + // it again. + /// + #if defined __GNUC__ + #if BEE_64_TRUE + #define BEE_DETECT_PPC64_GCC 1 + #else + #define BEE_DETECT_PPC32_GCC 1 + #endif + #endif + + #if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN + #define BEE_DETECT_BIG_ENDIAN 1 + #elif defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN + #define BEE_DETECT_LITTLE_ENDIAN 1 + #endif +// +// Itanium, 64-bit. +/// +#elif defined __ia64 || defined __ia64__ \ + || defined __itanium__ || defined _M_IA64 + + #if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN + #define BEE_DETECT_BIG_ENDIAN 1 + #else + #define BEE_DETECT_LITTLE_ENDIAN 1 + #endif + #if defined __LP64__ || defined _LP64 + #define BEE_DETECT_UPTR bee_u64 + #else + #define BEE_DETECT_UPTR bee_u32 + #endif +#endif + +#if defined BEE_DETECT_SPARCV9_GCC_32 || defined BEE_DETECT_SPARCV9_GCC_64 + #define BEE_DETECT_SPARCV9_GCC 1 +#endif + +#if defined BEE_DETECT_UNALIGNED && !defined BEE_UNALIGNED + #define BEE_UNALIGNED BEE_DETECT_UNALIGNED +#endif +#if defined BEE_DETECT_UPTR && !defined BEE_UPTR + #define BEE_UPTR BEE_DETECT_UPTR +#endif +#if defined BEE_DETECT_LITTLE_ENDIAN && !defined BEE_LITTLE_ENDIAN + #define BEE_LITTLE_ENDIAN BEE_DETECT_LITTLE_ENDIAN +#endif +#if defined BEE_DETECT_BIG_ENDIAN && !defined BEE_BIG_ENDIAN + #define BEE_BIG_ENDIAN BEE_DETECT_BIG_ENDIAN +#endif +#if defined BEE_DETECT_LITTLE_FAST && !defined BEE_LITTLE_FAST + #define BEE_LITTLE_FAST BEE_DETECT_LITTLE_FAST +#endif +#if defined BEE_DETECT_BIG_FAST && !defined BEE_BIG_FAST + #define BEE_BIG_FAST BEE_DETECT_BIG_FAST +#endif +#if defined BEE_DETECT_SPARCV9_GCC_32 && !defined BEE_SPARCV9_GCC_32 + #define BEE_SPARCV9_GCC_32 BEE_DETECT_SPARCV9_GCC_32 +#endif +#if defined BEE_DETECT_SPARCV9_GCC_64 && !defined BEE_SPARCV9_GCC_64 + #define BEE_SPARCV9_GCC_64 BEE_DETECT_SPARCV9_GCC_64 +#endif +#if defined BEE_DETECT_SPARCV9_GCC && !defined BEE_SPARCV9_GCC + #define BEE_SPARCV9_GCC BEE_DETECT_SPARCV9_GCC +#endif +#if defined BEE_DETECT_I386_GCC && !defined BEE_I386_GCC + #define BEE_I386_GCC BEE_DETECT_I386_GCC +#endif +#if defined BEE_DETECT_I386_MSVC && !defined BEE_I386_MSVC + #define BEE_I386_MSVC BEE_DETECT_I386_MSVC +#endif +#if defined BEE_DETECT_AMD64_GCC && !defined BEE_AMD64_GCC + #define BEE_AMD64_GCC BEE_DETECT_AMD64_GCC +#endif +#if defined BEE_DETECT_AMD64_MSVC && !defined BEE_AMD64_MSVC + #define BEE_AMD64_MSVC BEE_DETECT_AMD64_MSVC +#endif +#if defined BEE_DETECT_PPC32_GCC && !defined BEE_PPC32_GCC + #define BEE_PPC32_GCC BEE_DETECT_PPC32_GCC +#endif +#if defined BEE_DETECT_PPC64_GCC && !defined BEE_PPC64_GCC + #define BEE_PPC64_GCC BEE_DETECT_PPC64_GCC +#endif + +#if BEE_LITTLE_ENDIAN && !defined BEE_LITTLE_FAST + #define BEE_LITTLE_FAST 1 +#endif +#if BEE_BIG_ENDIAN && !defined BEE_BIG_FAST + #define BEE_BIG_FAST 1 +#endif + +#if defined BEE_UPTR && !(BEE_LITTLE_ENDIAN || BEE_BIG_ENDIAN) + #error BEE_UPTR defined, but endianness is not known. +#endif + + +#if BEE_I386_GCC && !BEE_NO_ASM + // + // On x86 32-bit, with gcc, we use the bswapl opcode to byte-swap 32-bit + // values. + // + static BEE_INLINE bee_u32 bee_bswap32(bee_u32 x) + { + __asm__ __volatile__ ("bswapl %0" : "=r" (x) : "0" (x)); + return x; + } + + #if BEE_64 + static BEE_INLINE bee_u64 bee_bswap64(bee_u64 x) + { + return ((bee_u64)bee_bswap32((bee_u32)x) << 32) + | (bee_u64)bee_bswap32((bee_u32)(x >> 32)); + } + #endif + +#elif BEE_AMD64_GCC && !BEE_NO_ASM + // + // On x86 64-bit, with gcc, we use the bswapl opcode to byte-swap 32-bit + // and 64-bit values. + // + static BEE_INLINE bee_u32 bee_bswap32(bee_u32 x) + { + __asm__ __volatile__ ("bswapl %0" : "=r" (x) : "0" (x)); + return x; + } + + #if BEE_64 + static BEE_INLINE bee_u64 bee_bswap64(bee_u64 x) + { + __asm__ __volatile__ ("bswapq %0" : "=r" (x) : "0" (x)); + return x; + } + #endif + + // + // Disabled code. Apparently, Microsoft Visual C 2005 is smart enough + // to generate proper opcodes for endianness swapping with the pure C + // implementation below. + // + // + //#elif BEE_I386_MSVC && !BEE_NO_ASM + // + //static __inline bee_u32 __declspec(naked) __fastcall + //bee_bswap32(bee_u32 x) + //{ + // __asm { + // bswap ecx + // mov eax,ecx + // ret + // } + //} + // + //#if BEE_64 + // + //static BEE_INLINE bee_u64 + //bee_bswap64(bee_u64 x) + //{ + // return ((bee_u64)bee_bswap32((bee_u32)x) << 32) + // | (bee_u64)bee_bswap32((bee_u32)(x >> 32)); + //} + // + //#endif + // + // + // [end of disabled code] + // +#else + static BEE_INLINE bee_u32 bee_bswap32(bee_u32 x) + { + x = BEE_T32((x << 16) | (x >> 16)); + x = ((x & BEE_C32(0xFF00FF00)) >> 8) + | ((x & BEE_C32(0x00FF00FF)) << 8); + return x; + } + + #if BEE_64 + // + // Byte-swap a 64-bit value. + // + // @param x the input value + // @return the byte-swapped value + /// + static BEE_INLINE bee_u64 bee_bswap64(bee_u64 x) + { + x = BEE_T64((x << 32) | (x >> 32)); + x = ((x & BEE_C64(0xFFFF0000FFFF0000)) >> 16) + | ((x & BEE_C64(0x0000FFFF0000FFFF)) << 16); + x = ((x & BEE_C64(0xFF00FF00FF00FF00)) >> 8) + | ((x & BEE_C64(0x00FF00FF00FF00FF)) << 8); + return x; + } + #endif +#endif + +#if BEE_SPARCV9_GCC && !BEE_NO_ASM + // + // On UltraSPARC systems, native ordering is big-endian, but it is + // possible to perform little-endian read accesses by specifying the + // address space 0x88 (ASI_PRIMARY_LITTLE). Basically, either we use + // the opcode "lda [%reg]0x88,%dst", where %reg is the register which + // contains the source address and %dst is the destination register, + // or we use "lda [%reg+imm]%asi,%dst", which uses the %asi register + // to get the address space name. The latter format is better since it + // combines an addition and the actual access in a single opcode; but + // it requires the setting (and subsequent resetting) of %asi, which is + // slow. Some operations (i.e. MD5 compression function) combine many + // successive little-endian read accesses, which may share the same + // %asi setting. The macros below contain the appropriate inline + // assembly. + // + + #define BEE_SPARCV9_SET_ASI \ + bee_u32 bee_sparcv9_asi; \ + __asm__ __volatile__ ( \ + "rd %%asi,%0\n\twr %%g0,0x88,%%asi" : "=r" (bee_sparcv9_asi)); + + #define BEE_SPARCV9_RESET_ASI \ + __asm__ __volatile__ ("wr %%g0,%0,%%asi" : : "r" (bee_sparcv9_asi)); + + #define BEE_SPARCV9_DEC32LE(base, idx) ({ \ + bee_u32 bee_sparcv9_tmp; \ + __asm__ __volatile__ ("lda [%1+" #idx "*4]%%asi,%0" \ + : "=r" (bee_sparcv9_tmp) : "r" (base)); \ + bee_sparcv9_tmp; \ + }) +#endif + +//----------------------------------------------------------------------------------------- +//--. +static BEE_INLINE void bee_enc16be(void *dst, unsigned val) +{ + ((unsigned char *)dst)[0] = (val >> 8); + ((unsigned char *)dst)[1] = val; +} + +//----------------------------------------------------------------------------------------- +//--. +static BEE_INLINE unsigned bee_dec16be(const void *src) +{ + return ((unsigned)(((const unsigned char *)src)[0]) << 8) + | (unsigned)(((const unsigned char *)src)[1]); +} + +//----------------------------------------------------------------------------------------- +//--. +static BEE_INLINE void bee_enc16le(void *dst, unsigned val) +{ + ((unsigned char *)dst)[0] = val; + ((unsigned char *)dst)[1] = val >> 8; +} + +//----------------------------------------------------------------------------------------- +//--. +static BEE_INLINE unsigned bee_dec16le(const void *src) +{ + return (unsigned)(((const unsigned char *)src)[0]) + | ((unsigned)(((const unsigned char *)src)[1]) << 8); +} + +//----------------------------------------------------------------------------------------- +//--. +/// +// Encode a 32-bit value into the provided buffer (big endian convention). +// +// @param dst the destination buffer +// @param val the 32-bit value to encode +// +static BEE_INLINE void bee_enc32be(void *dst, bee_u32 val) +{ + #if defined BEE_UPTR + #if BEE_UNALIGNED + #if BEE_LITTLE_ENDIAN + val = bee_bswap32(val); + #endif + *(bee_u32 *)dst = val; + #else + if (((BEE_UPTR)dst & 3) == 0) { + #if BEE_LITTLE_ENDIAN + val = bee_bswap32(val); + #endif + *(bee_u32 *)dst = val; + } else { + ((unsigned char *)dst)[0] = (val >> 24); + ((unsigned char *)dst)[1] = (val >> 16); + ((unsigned char *)dst)[2] = (val >> 8); + ((unsigned char *)dst)[3] = val; + } + #endif + #else + ((unsigned char *)dst)[0] = (val >> 24); + ((unsigned char *)dst)[1] = (val >> 16); + ((unsigned char *)dst)[2] = (val >> 8); + ((unsigned char *)dst)[3] = val; + #endif +} + +//----------------------------------------------------------------------------------------- +//-- +// +// Encode a 32-bit value into the provided buffer (big endian convention). +// The destination buffer must be properly aligned. +// +// @param dst the destination buffer (32-bit aligned) +// @param val the value to encode +// +static BEE_INLINE void bee_enc32be_aligned(void *dst, bee_u32 val) +{ + #if BEE_LITTLE_ENDIAN + *(bee_u32 *)dst = bee_bswap32(val); + #elif BEE_BIG_ENDIAN + *(bee_u32 *)dst = val; + #else + ((unsigned char *)dst)[0] = (val >> 24); + ((unsigned char *)dst)[1] = (val >> 16); + ((unsigned char *)dst)[2] = (val >> 8); + ((unsigned char *)dst)[3] = val; + #endif +} + +//----------------------------------------------------------------------------------------- +//--. +// +// Decode a 32-bit value from the provided buffer (big endian convention). +// +// @param src the source buffer +// @return the decoded value +// +static BEE_INLINE bee_u32 bee_dec32be( const void *src ) +{ + #if defined BEE_UPTR + #if BEE_UNALIGNED + #if BEE_LITTLE_ENDIAN + return bee_bswap32(*(const bee_u32 *)src); + #else + return *(const bee_u32 *)src; + #endif + #else + if (((BEE_UPTR)src & 3) == 0) { + #if BEE_LITTLE_ENDIAN + return bee_bswap32(*(const bee_u32 *)src); + #else + return *(const bee_u32 *)src; + #endif + } else { + return ((bee_u32)(((const unsigned char *)src)[0]) << 24) + | ((bee_u32)(((const unsigned char *)src)[1]) << 16) + | ((bee_u32)(((const unsigned char *)src)[2]) << 8) + | (bee_u32)(((const unsigned char *)src)[3]); + } + #endif + #else + return ((bee_u32)(((const unsigned char *)src)[0]) << 24) + | ((bee_u32)(((const unsigned char *)src)[1]) << 16) + | ((bee_u32)(((const unsigned char *)src)[2]) << 8) + | (bee_u32)(((const unsigned char *)src)[3]); + #endif +} + +//----------------------------------------------------------------------------------------- +//--. +// +// Decode a 32-bit value from the provided buffer (big endian convention). +// The source buffer must be properly aligned. +// +// @param src the source buffer (32-bit aligned) +// @return the decoded value +// +static BEE_INLINE bee_u32 bee_dec32be_aligned(const void *src) +{ + #if BEE_LITTLE_ENDIAN + return bee_bswap32(*(const bee_u32 *)src); + #elif BEE_BIG_ENDIAN + return *(const bee_u32 *)src; + #else + return ((bee_u32)(((const unsigned char *)src)[0]) << 24) + | ((bee_u32)(((const unsigned char *)src)[1]) << 16) + | ((bee_u32)(((const unsigned char *)src)[2]) << 8) + | (bee_u32)(((const unsigned char *)src)[3]); + #endif +} + +//----------------------------------------------------------------------------------------- +//--. +// +// Encode a 32-bit value into the provided buffer (little endian convention). +// +// @param dst the destination buffer +// @param val the 32-bit value to encode +// +static BEE_INLINE void bee_enc32le(void *dst, bee_u32 val) +{ + #if defined BEE_UPTR + #if BEE_UNALIGNED + #if BEE_BIG_ENDIAN + val = bee_bswap32(val); + #endif + *(bee_u32 *)dst = val; + #else + if (((BEE_UPTR)dst & 3) == 0) { + #if BEE_BIG_ENDIAN + val = bee_bswap32(val); + #endif + *(bee_u32 *)dst = val; + } else { + ((unsigned char *)dst)[0] = val; + ((unsigned char *)dst)[1] = (val >> 8); + ((unsigned char *)dst)[2] = (val >> 16); + ((unsigned char *)dst)[3] = (val >> 24); + } + #endif + #else + ((unsigned char *)dst)[0] = val; + ((unsigned char *)dst)[1] = (val >> 8); + ((unsigned char *)dst)[2] = (val >> 16); + ((unsigned char *)dst)[3] = (val >> 24); + #endif +} + +//----------------------------------------------------------------------------------------- +//--. +// +// Encode a 32-bit value into the provided buffer (little endian convention). +// The destination buffer must be properly aligned. +// +// @param dst the destination buffer (32-bit aligned) +// @param val the value to encode +// +static BEE_INLINE void bee_enc32le_aligned(void *dst, bee_u32 val) +{ +#if BEE_LITTLE_ENDIAN + *(bee_u32 *)dst = val; +#elif BEE_BIG_ENDIAN + *(bee_u32 *)dst = bee_bswap32(val); +#else + ((unsigned char *)dst)[0] = val; + ((unsigned char *)dst)[1] = (val >> 8); + ((unsigned char *)dst)[2] = (val >> 16); + ((unsigned char *)dst)[3] = (val >> 24); +#endif +} + +//----------------------------------------------------------------------------------------- +//--. +// +// Decode a 32-bit value from the provided buffer (little endian convention). +// +// @param src the source buffer +// @return the decoded value +// +static BEE_INLINE bee_u32 bee_dec32le(const void *src) +{ +#if defined BEE_UPTR +#if BEE_UNALIGNED +#if BEE_BIG_ENDIAN + return bee_bswap32(*(const bee_u32 *)src); +#else + return *(const bee_u32 *)src; +#endif +#else + if (((BEE_UPTR)src & 3) == 0) { +#if BEE_BIG_ENDIAN +#if BEE_SPARCV9_GCC && !BEE_NO_ASM + bee_u32 tmp; + + // + // "__volatile__" is needed here because without it, + // gcc-3.4.3 miscompiles the code and performs the + // access before the test on the address, thus triggering + // a bus error... + // + __asm__ __volatile__ ( + "lda [%1]0x88,%0" : "=r" (tmp) : "r" (src)); + return tmp; +// +// On PowerPC, this turns out not to be worth the effort: the inline +// assembly makes GCC optimizer uncomfortable, which tends to nullify +// the decoding gains. +// +// For most hash functions, using this inline assembly trick changes +// hashing speed by less than 5% and often _reduces_ it. The biggest +// gains are for MD4 (+11%) and CubeHash (+30%). For all others, it is +// less then 10%. The speed gain on CubeHash is probably due to the +// chronic shortage of registers that CubeHash endures; for the other +// functions, the generic code appears to be efficient enough already. +// +//#elif (BEE_PPC32_GCC || BEE_PPC64_GCC) && !BEE_NO_ASM +// bee_u32 tmp; +// +// __asm__ __volatile__ ( +// "lwbrx %0,0,%1" : "=r" (tmp) : "r" (src)); +// return tmp; +// +#else + return bee_bswap32(*(const bee_u32 *)src); +#endif +#else + return *(const bee_u32 *)src; +#endif + } else { + return (bee_u32)(((const unsigned char *)src)[0]) + | ((bee_u32)(((const unsigned char *)src)[1]) << 8) + | ((bee_u32)(((const unsigned char *)src)[2]) << 16) + | ((bee_u32)(((const unsigned char *)src)[3]) << 24); + } +#endif +#else + return (bee_u32)(((const unsigned char *)src)[0]) + | ((bee_u32)(((const unsigned char *)src)[1]) << 8) + | ((bee_u32)(((const unsigned char *)src)[2]) << 16) + | ((bee_u32)(((const unsigned char *)src)[3]) << 24); +#endif +} + +//----------------------------------------------------------------------------------------- +//--. +// +// Decode a 32-bit value from the provided buffer (little endian convention). +// The source buffer must be properly aligned. +// +// @param src the source buffer (32-bit aligned) +// @return the decoded value +// +static BEE_INLINE bee_u32 bee_dec32le_aligned(const void *src) +{ +#if BEE_LITTLE_ENDIAN + return *(const bee_u32 *)src; +#elif BEE_BIG_ENDIAN +#if BEE_SPARCV9_GCC && !BEE_NO_ASM + bee_u32 tmp; + + __asm__ __volatile__ ("lda [%1]0x88,%0" : "=r" (tmp) : "r" (src)); + return tmp; +// +// Not worth it generally. +// +//#elif (BEE_PPC32_GCC || BEE_PPC64_GCC) && !BEE_NO_ASM +// bee_u32 tmp; +// +// __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (tmp) : "r" (src)); +// return tmp; +/// +#else + return bee_bswap32(*(const bee_u32 *)src); +#endif +#else + return (bee_u32)(((const unsigned char *)src)[0]) + | ((bee_u32)(((const unsigned char *)src)[1]) << 8) + | ((bee_u32)(((const unsigned char *)src)[2]) << 16) + | ((bee_u32)(((const unsigned char *)src)[3]) << 24); +#endif +} + +#if BEE_64 + //----------------------------------------------------------------------------------------- + //--. + // + // Encode a 64-bit value into the provided buffer (big endian convention). + // + // @param dst the destination buffer + // @param val the 64-bit value to encode + // + static BEE_INLINE void + bee_enc64be(void *dst, bee_u64 val) + { + #if defined BEE_UPTR + #if BEE_UNALIGNED + #if BEE_LITTLE_ENDIAN + val = bee_bswap64(val); + #endif + *(bee_u64 *)dst = val; + #else + if (((BEE_UPTR)dst & 7) == 0) { + #if BEE_LITTLE_ENDIAN + val = bee_bswap64(val); + #endif + *(bee_u64 *)dst = val; + } else { + ((unsigned char *)dst)[0] = (val >> 56); + ((unsigned char *)dst)[1] = (val >> 48); + ((unsigned char *)dst)[2] = (val >> 40); + ((unsigned char *)dst)[3] = (val >> 32); + ((unsigned char *)dst)[4] = (val >> 24); + ((unsigned char *)dst)[5] = (val >> 16); + ((unsigned char *)dst)[6] = (val >> 8); + ((unsigned char *)dst)[7] = val; + } + #endif + #else + ((unsigned char *)dst)[0] = (val >> 56); + ((unsigned char *)dst)[1] = (val >> 48); + ((unsigned char *)dst)[2] = (val >> 40); + ((unsigned char *)dst)[3] = (val >> 32); + ((unsigned char *)dst)[4] = (val >> 24); + ((unsigned char *)dst)[5] = (val >> 16); + ((unsigned char *)dst)[6] = (val >> 8); + ((unsigned char *)dst)[7] = val; + #endif + } + + //----------------------------------------------------------------------------------------- + //--. + // + // Encode a 64-bit value into the provided buffer (big endian convention). + // The destination buffer must be properly aligned. + // + // @param dst the destination buffer (64-bit aligned) + // @param val the value to encode + // + static BEE_INLINE void bee_enc64be_aligned(void *dst, bee_u64 val) + { + #if BEE_LITTLE_ENDIAN + *(bee_u64 *)dst = bee_bswap64(val); + #elif BEE_BIG_ENDIAN + *(bee_u64 *)dst = val; + #else + ((unsigned char *)dst)[0] = (val >> 56); + ((unsigned char *)dst)[1] = (val >> 48); + ((unsigned char *)dst)[2] = (val >> 40); + ((unsigned char *)dst)[3] = (val >> 32); + ((unsigned char *)dst)[4] = (val >> 24); + ((unsigned char *)dst)[5] = (val >> 16); + ((unsigned char *)dst)[6] = (val >> 8); + ((unsigned char *)dst)[7] = val; + #endif + } + + //----------------------------------------------------------------------------------------- + //--. + // + // Decode a 64-bit value from the provided buffer (big endian convention). + // + // @param src the source buffer + // @return the decoded value + // + static BEE_INLINE bee_u64 bee_dec64be(const void *src) + { + #if defined BEE_UPTR + #if BEE_UNALIGNED + #if BEE_LITTLE_ENDIAN + return bee_bswap64(*(const bee_u64 *)src); + #else + return *(const bee_u64 *)src; + #endif + #else + if (((BEE_UPTR)src & 7) == 0) { + #if BEE_LITTLE_ENDIAN + return bee_bswap64(*(const bee_u64 *)src); + #else + return *(const bee_u64 *)src; + #endif + } else { + return ((bee_u64)(((const unsigned char *)src)[0]) << 56) + | ((bee_u64)(((const unsigned char *)src)[1]) << 48) + | ((bee_u64)(((const unsigned char *)src)[2]) << 40) + | ((bee_u64)(((const unsigned char *)src)[3]) << 32) + | ((bee_u64)(((const unsigned char *)src)[4]) << 24) + | ((bee_u64)(((const unsigned char *)src)[5]) << 16) + | ((bee_u64)(((const unsigned char *)src)[6]) << 8) + | (bee_u64)(((const unsigned char *)src)[7]); + } + #endif + #else + return ((bee_u64)(((const unsigned char *)src)[0]) << 56) + | ((bee_u64)(((const unsigned char *)src)[1]) << 48) + | ((bee_u64)(((const unsigned char *)src)[2]) << 40) + | ((bee_u64)(((const unsigned char *)src)[3]) << 32) + | ((bee_u64)(((const unsigned char *)src)[4]) << 24) + | ((bee_u64)(((const unsigned char *)src)[5]) << 16) + | ((bee_u64)(((const unsigned char *)src)[6]) << 8) + | (bee_u64)(((const unsigned char *)src)[7]); + #endif + } + + //----------------------------------------------------------------------------------------- + //--. + // + // Decode a 64-bit value from the provided buffer (big endian convention). + // The source buffer must be properly aligned. + // + // @param src the source buffer (64-bit aligned) + // @return the decoded value + // + static BEE_INLINE bee_u64 bee_dec64be_aligned(const void *src) + { + #if BEE_LITTLE_ENDIAN + return bee_bswap64(*(const bee_u64 *)src); + #elif BEE_BIG_ENDIAN + return *(const bee_u64 *)src; + #else + return ((bee_u64)(((const unsigned char *)src)[0]) << 56) + | ((bee_u64)(((const unsigned char *)src)[1]) << 48) + | ((bee_u64)(((const unsigned char *)src)[2]) << 40) + | ((bee_u64)(((const unsigned char *)src)[3]) << 32) + | ((bee_u64)(((const unsigned char *)src)[4]) << 24) + | ((bee_u64)(((const unsigned char *)src)[5]) << 16) + | ((bee_u64)(((const unsigned char *)src)[6]) << 8) + | (bee_u64)(((const unsigned char *)src)[7]); + #endif + } + + //----------------------------------------------------------------------------------------- + //--. + // + // Encode a 64-bit value into the provided buffer (little endian convention). + // + // @param dst the destination buffer + // @param val the 64-bit value to encode + // + static BEE_INLINE void bee_enc64le(void *dst, bee_u64 val) + { + #if defined BEE_UPTR + #if BEE_UNALIGNED + #if BEE_BIG_ENDIAN + val = bee_bswap64(val); + #endif + *(bee_u64 *)dst = val; + #else + if (((BEE_UPTR)dst & 7) == 0) { + #if BEE_BIG_ENDIAN + val = bee_bswap64(val); + #endif + *(bee_u64 *)dst = val; + } else { + ((unsigned char *)dst)[0] = val; + ((unsigned char *)dst)[1] = (val >> 8); + ((unsigned char *)dst)[2] = (val >> 16); + ((unsigned char *)dst)[3] = (val >> 24); + ((unsigned char *)dst)[4] = (val >> 32); + ((unsigned char *)dst)[5] = (val >> 40); + ((unsigned char *)dst)[6] = (val >> 48); + ((unsigned char *)dst)[7] = (val >> 56); + } + #endif + #else + ((unsigned char *)dst)[0] = val; + ((unsigned char *)dst)[1] = (val >> 8); + ((unsigned char *)dst)[2] = (val >> 16); + ((unsigned char *)dst)[3] = (val >> 24); + ((unsigned char *)dst)[4] = (val >> 32); + ((unsigned char *)dst)[5] = (val >> 40); + ((unsigned char *)dst)[6] = (val >> 48); + ((unsigned char *)dst)[7] = (val >> 56); + #endif + } + + //----------------------------------------------------------------------------------------- + //--. + // + // Encode a 64-bit value into the provided buffer (little endian convention). + // The destination buffer must be properly aligned. + // + // @param dst the destination buffer (64-bit aligned) + // @param val the value to encode + // + static BEE_INLINE void bee_enc64le_aligned(void *dst, bee_u64 val) + { + #if BEE_LITTLE_ENDIAN + *(bee_u64 *)dst = val; + #elif BEE_BIG_ENDIAN + *(bee_u64 *)dst = bee_bswap64(val); + #else + ((unsigned char *)dst)[0] = val; + ((unsigned char *)dst)[1] = (val >> 8); + ((unsigned char *)dst)[2] = (val >> 16); + ((unsigned char *)dst)[3] = (val >> 24); + ((unsigned char *)dst)[4] = (val >> 32); + ((unsigned char *)dst)[5] = (val >> 40); + ((unsigned char *)dst)[6] = (val >> 48); + ((unsigned char *)dst)[7] = (val >> 56); + #endif + } + + //----------------------------------------------------------------------------------------- + //--. + // + // Decode a 64-bit value from the provided buffer (little endian convention). + // + // @param src the source buffer + // @return the decoded value + // + static BEE_INLINE bee_u64 bee_dec64le(const void *src) + { + #if defined BEE_UPTR + #if BEE_UNALIGNED + #if BEE_BIG_ENDIAN + return bee_bswap64(*(const bee_u64 *)src); + #else + return *(const bee_u64 *)src; + #endif + #else + if (((BEE_UPTR)src & 7) == 0) { + #if BEE_BIG_ENDIAN + #if BEE_SPARCV9_GCC_64 && !BEE_NO_ASM + bee_u64 tmp; + + __asm__ __volatile__ ( + "ldxa [%1]0x88,%0" : "=r" (tmp) : "r" (src)); + return tmp; + // + // Not worth it generally. + // + //#elif BEE_PPC32_GCC && !BEE_NO_ASM + // return (bee_u64)bee_dec32le_aligned(src) + // | ((bee_u64)bee_dec32le_aligned( + // (const char *)src + 4) << 32); + //#elif BEE_PPC64_GCC && !BEE_NO_ASM + // bee_u64 tmp; + // + // __asm__ __volatile__ ( + // "ldbrx %0,0,%1" : "=r" (tmp) : "r" (src)); + // return tmp; + // + #else + return bee_bswap64(*(const bee_u64 *)src); + #endif + #else + return *(const bee_u64 *)src; + #endif + } else { + return (bee_u64)(((const unsigned char *)src)[0]) + | ((bee_u64)(((const unsigned char *)src)[1]) << 8) + | ((bee_u64)(((const unsigned char *)src)[2]) << 16) + | ((bee_u64)(((const unsigned char *)src)[3]) << 24) + | ((bee_u64)(((const unsigned char *)src)[4]) << 32) + | ((bee_u64)(((const unsigned char *)src)[5]) << 40) + | ((bee_u64)(((const unsigned char *)src)[6]) << 48) + | ((bee_u64)(((const unsigned char *)src)[7]) << 56); + } + #endif + #else + return (bee_u64)(((const unsigned char *)src)[0]) + | ((bee_u64)(((const unsigned char *)src)[1]) << 8) + | ((bee_u64)(((const unsigned char *)src)[2]) << 16) + | ((bee_u64)(((const unsigned char *)src)[3]) << 24) + | ((bee_u64)(((const unsigned char *)src)[4]) << 32) + | ((bee_u64)(((const unsigned char *)src)[5]) << 40) + | ((bee_u64)(((const unsigned char *)src)[6]) << 48) + | ((bee_u64)(((const unsigned char *)src)[7]) << 56); + #endif + } + + //----------------------------------------------------------------------------------------- + //--. + // + // Decode a 64-bit value from the provided buffer (little endian convention). + // The source buffer must be properly aligned. + // + // @param src the source buffer (64-bit aligned) + // @return the decoded value + // + static BEE_INLINE bee_u64 bee_dec64le_aligned(const void *src) + { + #if BEE_LITTLE_ENDIAN + return *(const bee_u64 *)src; + #elif BEE_BIG_ENDIAN + #if BEE_SPARCV9_GCC_64 && !BEE_NO_ASM + bee_u64 tmp; + + __asm__ __volatile__ ("ldxa [%1]0x88,%0" : "=r" (tmp) : "r" (src)); + return tmp; + // + // Not worth it generally. + // + //#elif BEE_PPC32_GCC && !BEE_NO_ASM + // return (bee_u64)bee_dec32le_aligned(src) + // | ((bee_u64)bee_dec32le_aligned((const char *)src + 4) << 32); + //#elif BEE_PPC64_GCC && !BEE_NO_ASM + // bee_u64 tmp; + // + // __asm__ __volatile__ ("ldbrx %0,0,%1" : "=r" (tmp) : "r" (src)); + // return tmp; + /// + #else + return bee_bswap64(*(const bee_u64 *)src); + #endif + #else + return (bee_u64)(((const unsigned char *)src)[0]) + | ((bee_u64)(((const unsigned char *)src)[1]) << 8) + | ((bee_u64)(((const unsigned char *)src)[2]) << 16) + | ((bee_u64)(((const unsigned char *)src)[3]) << 24) + | ((bee_u64)(((const unsigned char *)src)[4]) << 32) + | ((bee_u64)(((const unsigned char *)src)[5]) << 40) + | ((bee_u64)(((const unsigned char *)src)[6]) << 48) + | ((bee_u64)(((const unsigned char *)src)[7]) << 56); + #endif + } + +#endif + + +#endif diff --git a/stratum/algos/lyra2v3.c b/stratum/algos/lyra2v3.c index ece25e762..ee0aa80e5 100644 --- a/stratum/algos/lyra2v3.c +++ b/stratum/algos/lyra2v3.c @@ -1,5 +1,6 @@ /*- - * Copyright(or left) 2019 YiiMP + * Copyright 2009 Colin Percival, 2011 ArtForz, 2013 Neisklar, 2014 James Lovejoy + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,39 +31,37 @@ #include #include #include - #include "../sha3/sph_blake.h" #include "../sha3/sph_cubehash.h" #include "../sha3/sph_bmw.h" - #include "Lyra2.h" void lyra2v3_hash(const char* input, char* output, uint32_t len) { - uint32_t hash[8], hashB[8]; + uint32_t hashA[8], hashB[8]; - sph_blake256_context ctx_blake; - sph_cubehash256_context ctx_cubehash; - sph_bmw256_context ctx_bmw; + sph_blake256_context ctx_blake; + sph_cubehash256_context ctx_cube; + sph_bmw256_context ctx_bmw; sph_blake256_set_rounds(14); sph_blake256_init(&ctx_blake); - sph_blake256(&ctx_blake, input, len); /* 80 */ - sph_blake256_close(&ctx_blake, hash); - - LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); - - sph_cubehash256_init(&ctx_cubehash); - sph_cubehash256(&ctx_cubehash, hashB, 32); - sph_cubehash256_close(&ctx_cubehash, hash); - - LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); + sph_blake256(&ctx_blake, input, len); + sph_blake256_close(&ctx_blake, hashA); + + LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); + + sph_cubehash256_init(&ctx_cube); + sph_cubehash256(&ctx_cube, hashB, 32); + sph_cubehash256_close(&ctx_cube, hashA); + + LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); sph_bmw256_init(&ctx_bmw); sph_bmw256(&ctx_bmw, hashB, 32); - sph_bmw256_close(&ctx_bmw, hash); + sph_bmw256_close(&ctx_bmw, hashA); - memcpy(output, hash, 32); + memcpy(output, hashA, 32); } diff --git a/stratum/algos/lyra2v3.c.bak b/stratum/algos/lyra2v3.c.bak index 2dd27625e..ece25e762 100644 --- a/stratum/algos/lyra2v3.c.bak +++ b/stratum/algos/lyra2v3.c.bak @@ -65,3 +65,4 @@ void lyra2v3_hash(const char* input, char* output, uint32_t len) memcpy(output, hash, 32); } + diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 4c5f30f07..ef6804a07 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -12,10 +12,10 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ - deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ + deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ - scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ + scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ @@ -25,7 +25,8 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ - binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c + binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c \ + beenode.c honeycomb/facet_one.c honeycomb/facet_two.c honeycomb/facet_three.c honeycomb/facet_four.c honeycomb/facet_five.c honeycomb/facet_six.c honeycomb/facets_helper.c \ OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) OUTPUT=libalgos.a diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index 48a9c32ec..4c5f30f07 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -10,7 +10,7 @@ LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ - x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c \ + x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ diff --git a/stratum/algos/sha256-d.c b/stratum/algos/sha256-d.c new file mode 100644 index 000000000..015adc363 --- /dev/null +++ b/stratum/algos/sha256-d.c @@ -0,0 +1,634 @@ +/* + * Copyright 2011 ArtForz + * Copyright 2011-2013 pooler + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. See COPYING for more details. + */ + +#include "sha256-d.h" + +#include +#include + + #if defined(__arm__) && defined(__APCS_32__) +#define EXTERN_SHA256 +#endif + + static const uint32_t sha256_h[8] = { + 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 +}; + + static const uint32_t sha256_k[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + + void sha256_init(uint32_t *state) +{ + memcpy(state, sha256_h, 32); +} + + /* Elementary functions used by SHA256 */ +#define Ch(x, y, z) ((x & (y ^ z)) ^ z) +#define Maj(x, y, z) ((x & (y | z)) | (y & z)) +#define ROTR(x, n) ((x >> n) | (x << (32 - n))) +#define S0(x) (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22)) +#define S1(x) (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25)) +#define s0(x) (ROTR(x, 7) ^ ROTR(x, 18) ^ (x >> 3)) +#define s1(x) (ROTR(x, 17) ^ ROTR(x, 19) ^ (x >> 10)) + + /* SHA256 round function */ +#define RND(a, b, c, d, e, f, g, h, k) \ + do { \ + t0 = h + S1(e) + Ch(e, f, g) + k; \ + t1 = S0(a) + Maj(a, b, c); \ + d += t0; \ + h = t0 + t1; \ + } while (0) + + /* Adjusted round function for rotating state */ +#define RNDr(S, W, i) \ + RND(S[(64 - i) % 8], S[(65 - i) % 8], \ + S[(66 - i) % 8], S[(67 - i) % 8], \ + S[(68 - i) % 8], S[(69 - i) % 8], \ + S[(70 - i) % 8], S[(71 - i) % 8], \ + W[i] + sha256_k[i]) + + #ifndef EXTERN_SHA256 + + /* + * SHA256 block compression function. The 256-bit state is transformed via + * the 512-bit input block to produce a new state. + */ +void sha256_transform(uint32_t *state, const uint32_t *block, int swap) +{ + uint32_t W[64]; + uint32_t S[8]; + uint32_t t0, t1; + int i; + + /* 1. Prepare message schedule W. */ + if (swap) { + for (i = 0; i < 16; i++) + W[i] = swab32(block[i]); + } else + memcpy(W, block, 64); + for (i = 16; i < 64; i += 2) { + W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; + W[i+1] = s1(W[i - 1]) + W[i - 6] + s0(W[i - 14]) + W[i - 15]; + } + + /* 2. Initialize working variables. */ + memcpy(S, state, 32); + + /* 3. Mix. */ + RNDr(S, W, 0); + RNDr(S, W, 1); + RNDr(S, W, 2); + RNDr(S, W, 3); + RNDr(S, W, 4); + RNDr(S, W, 5); + RNDr(S, W, 6); + RNDr(S, W, 7); + RNDr(S, W, 8); + RNDr(S, W, 9); + RNDr(S, W, 10); + RNDr(S, W, 11); + RNDr(S, W, 12); + RNDr(S, W, 13); + RNDr(S, W, 14); + RNDr(S, W, 15); + RNDr(S, W, 16); + RNDr(S, W, 17); + RNDr(S, W, 18); + RNDr(S, W, 19); + RNDr(S, W, 20); + RNDr(S, W, 21); + RNDr(S, W, 22); + RNDr(S, W, 23); + RNDr(S, W, 24); + RNDr(S, W, 25); + RNDr(S, W, 26); + RNDr(S, W, 27); + RNDr(S, W, 28); + RNDr(S, W, 29); + RNDr(S, W, 30); + RNDr(S, W, 31); + RNDr(S, W, 32); + RNDr(S, W, 33); + RNDr(S, W, 34); + RNDr(S, W, 35); + RNDr(S, W, 36); + RNDr(S, W, 37); + RNDr(S, W, 38); + RNDr(S, W, 39); + RNDr(S, W, 40); + RNDr(S, W, 41); + RNDr(S, W, 42); + RNDr(S, W, 43); + RNDr(S, W, 44); + RNDr(S, W, 45); + RNDr(S, W, 46); + RNDr(S, W, 47); + RNDr(S, W, 48); + RNDr(S, W, 49); + RNDr(S, W, 50); + RNDr(S, W, 51); + RNDr(S, W, 52); + RNDr(S, W, 53); + RNDr(S, W, 54); + RNDr(S, W, 55); + RNDr(S, W, 56); + RNDr(S, W, 57); + RNDr(S, W, 58); + RNDr(S, W, 59); + RNDr(S, W, 60); + RNDr(S, W, 61); + RNDr(S, W, 62); + RNDr(S, W, 63); + + /* 4. Mix local working variables into global state */ + for (i = 0; i < 8; i++) + state[i] += S[i]; +} + + #endif /* EXTERN_SHA256 */ + + + static const uint32_t sha256d_hash1[16] = { + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x80000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000100 +}; + + static void sha256d_80_swap(uint32_t *hash, const uint32_t *data) +{ + uint32_t S[16]; + int i; + + sha256_init(S); + sha256_transform(S, data, 0); + sha256_transform(S, data + 16, 0); + memcpy(S + 8, sha256d_hash1 + 8, 32); + sha256_init(hash); + sha256_transform(hash, S, 0); + for (i = 0; i < 8; i++) + hash[i] = swab32(hash[i]); +} + + void sha256d(unsigned char *hash, const unsigned char *data, int len) +{ + uint32_t S[16], T[16]; + int i, r; + + sha256_init(S); + for (r = len; r > -9; r -= 64) { + if (r < 64) + memset(T, 0, 64); + memcpy(T, data + len - r, r > 64 ? 64 : (r < 0 ? 0 : r)); + if (r >= 0 && r < 64) + ((unsigned char *)T)[r] = 0x80; + for (i = 0; i < 16; i++) + T[i] = be32dec(T + i); + if (r < 56) + T[15] = 8 * len; + sha256_transform(S, T, 0); + } + memcpy(S + 8, sha256d_hash1 + 8, 32); + sha256_init(T); + sha256_transform(T, S, 0); + for (i = 0; i < 8; i++) + be32enc((uint32_t *)hash + i, T[i]); +} + + static inline void sha256d_preextend(uint32_t *W) +{ + W[16] = s1(W[14]) + W[ 9] + s0(W[ 1]) + W[ 0]; + W[17] = s1(W[15]) + W[10] + s0(W[ 2]) + W[ 1]; + W[18] = s1(W[16]) + W[11] + W[ 2]; + W[19] = s1(W[17]) + W[12] + s0(W[ 4]); + W[20] = W[13] + s0(W[ 5]) + W[ 4]; + W[21] = W[14] + s0(W[ 6]) + W[ 5]; + W[22] = W[15] + s0(W[ 7]) + W[ 6]; + W[23] = W[16] + s0(W[ 8]) + W[ 7]; + W[24] = W[17] + s0(W[ 9]) + W[ 8]; + W[25] = s0(W[10]) + W[ 9]; + W[26] = s0(W[11]) + W[10]; + W[27] = s0(W[12]) + W[11]; + W[28] = s0(W[13]) + W[12]; + W[29] = s0(W[14]) + W[13]; + W[30] = s0(W[15]) + W[14]; + W[31] = s0(W[16]) + W[15]; +} + + static inline void sha256d_prehash(uint32_t *S, const uint32_t *W) +{ + uint32_t t0, t1; + RNDr(S, W, 0); + RNDr(S, W, 1); + RNDr(S, W, 2); +} + + #ifdef EXTERN_SHA256 + + void sha256d_ms(uint32_t *hash, uint32_t *W, + const uint32_t *midstate, const uint32_t *prehash); + + #else + + static inline void sha256d_ms(uint32_t *hash, uint32_t *W, + const uint32_t *midstate, const uint32_t *prehash) +{ + uint32_t S[64]; + uint32_t t0, t1; + int i; + + S[18] = W[18]; + S[19] = W[19]; + S[20] = W[20]; + S[22] = W[22]; + S[23] = W[23]; + S[24] = W[24]; + S[30] = W[30]; + S[31] = W[31]; + + W[18] += s0(W[3]); + W[19] += W[3]; + W[20] += s1(W[18]); + W[21] = s1(W[19]); + W[22] += s1(W[20]); + W[23] += s1(W[21]); + W[24] += s1(W[22]); + W[25] = s1(W[23]) + W[18]; + W[26] = s1(W[24]) + W[19]; + W[27] = s1(W[25]) + W[20]; + W[28] = s1(W[26]) + W[21]; + W[29] = s1(W[27]) + W[22]; + W[30] += s1(W[28]) + W[23]; + W[31] += s1(W[29]) + W[24]; + for (i = 32; i < 64; i += 2) { + W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; + W[i+1] = s1(W[i - 1]) + W[i - 6] + s0(W[i - 14]) + W[i - 15]; + } + + memcpy(S, prehash, 32); + + RNDr(S, W, 3); + RNDr(S, W, 4); + RNDr(S, W, 5); + RNDr(S, W, 6); + RNDr(S, W, 7); + RNDr(S, W, 8); + RNDr(S, W, 9); + RNDr(S, W, 10); + RNDr(S, W, 11); + RNDr(S, W, 12); + RNDr(S, W, 13); + RNDr(S, W, 14); + RNDr(S, W, 15); + RNDr(S, W, 16); + RNDr(S, W, 17); + RNDr(S, W, 18); + RNDr(S, W, 19); + RNDr(S, W, 20); + RNDr(S, W, 21); + RNDr(S, W, 22); + RNDr(S, W, 23); + RNDr(S, W, 24); + RNDr(S, W, 25); + RNDr(S, W, 26); + RNDr(S, W, 27); + RNDr(S, W, 28); + RNDr(S, W, 29); + RNDr(S, W, 30); + RNDr(S, W, 31); + RNDr(S, W, 32); + RNDr(S, W, 33); + RNDr(S, W, 34); + RNDr(S, W, 35); + RNDr(S, W, 36); + RNDr(S, W, 37); + RNDr(S, W, 38); + RNDr(S, W, 39); + RNDr(S, W, 40); + RNDr(S, W, 41); + RNDr(S, W, 42); + RNDr(S, W, 43); + RNDr(S, W, 44); + RNDr(S, W, 45); + RNDr(S, W, 46); + RNDr(S, W, 47); + RNDr(S, W, 48); + RNDr(S, W, 49); + RNDr(S, W, 50); + RNDr(S, W, 51); + RNDr(S, W, 52); + RNDr(S, W, 53); + RNDr(S, W, 54); + RNDr(S, W, 55); + RNDr(S, W, 56); + RNDr(S, W, 57); + RNDr(S, W, 58); + RNDr(S, W, 59); + RNDr(S, W, 60); + RNDr(S, W, 61); + RNDr(S, W, 62); + RNDr(S, W, 63); + + for (i = 0; i < 8; i++) + S[i] += midstate[i]; + + W[18] = S[18]; + W[19] = S[19]; + W[20] = S[20]; + W[22] = S[22]; + W[23] = S[23]; + W[24] = S[24]; + W[30] = S[30]; + W[31] = S[31]; + + memcpy(S + 8, sha256d_hash1 + 8, 32); + S[16] = s1(sha256d_hash1[14]) + sha256d_hash1[ 9] + s0(S[ 1]) + S[ 0]; + S[17] = s1(sha256d_hash1[15]) + sha256d_hash1[10] + s0(S[ 2]) + S[ 1]; + S[18] = s1(S[16]) + sha256d_hash1[11] + s0(S[ 3]) + S[ 2]; + S[19] = s1(S[17]) + sha256d_hash1[12] + s0(S[ 4]) + S[ 3]; + S[20] = s1(S[18]) + sha256d_hash1[13] + s0(S[ 5]) + S[ 4]; + S[21] = s1(S[19]) + sha256d_hash1[14] + s0(S[ 6]) + S[ 5]; + S[22] = s1(S[20]) + sha256d_hash1[15] + s0(S[ 7]) + S[ 6]; + S[23] = s1(S[21]) + S[16] + s0(sha256d_hash1[ 8]) + S[ 7]; + S[24] = s1(S[22]) + S[17] + s0(sha256d_hash1[ 9]) + sha256d_hash1[ 8]; + S[25] = s1(S[23]) + S[18] + s0(sha256d_hash1[10]) + sha256d_hash1[ 9]; + S[26] = s1(S[24]) + S[19] + s0(sha256d_hash1[11]) + sha256d_hash1[10]; + S[27] = s1(S[25]) + S[20] + s0(sha256d_hash1[12]) + sha256d_hash1[11]; + S[28] = s1(S[26]) + S[21] + s0(sha256d_hash1[13]) + sha256d_hash1[12]; + S[29] = s1(S[27]) + S[22] + s0(sha256d_hash1[14]) + sha256d_hash1[13]; + S[30] = s1(S[28]) + S[23] + s0(sha256d_hash1[15]) + sha256d_hash1[14]; + S[31] = s1(S[29]) + S[24] + s0(S[16]) + sha256d_hash1[15]; + for (i = 32; i < 60; i += 2) { + S[i] = s1(S[i - 2]) + S[i - 7] + s0(S[i - 15]) + S[i - 16]; + S[i+1] = s1(S[i - 1]) + S[i - 6] + s0(S[i - 14]) + S[i - 15]; + } + S[60] = s1(S[58]) + S[53] + s0(S[45]) + S[44]; + + sha256_init(hash); + + RNDr(hash, S, 0); + RNDr(hash, S, 1); + RNDr(hash, S, 2); + RNDr(hash, S, 3); + RNDr(hash, S, 4); + RNDr(hash, S, 5); + RNDr(hash, S, 6); + RNDr(hash, S, 7); + RNDr(hash, S, 8); + RNDr(hash, S, 9); + RNDr(hash, S, 10); + RNDr(hash, S, 11); + RNDr(hash, S, 12); + RNDr(hash, S, 13); + RNDr(hash, S, 14); + RNDr(hash, S, 15); + RNDr(hash, S, 16); + RNDr(hash, S, 17); + RNDr(hash, S, 18); + RNDr(hash, S, 19); + RNDr(hash, S, 20); + RNDr(hash, S, 21); + RNDr(hash, S, 22); + RNDr(hash, S, 23); + RNDr(hash, S, 24); + RNDr(hash, S, 25); + RNDr(hash, S, 26); + RNDr(hash, S, 27); + RNDr(hash, S, 28); + RNDr(hash, S, 29); + RNDr(hash, S, 30); + RNDr(hash, S, 31); + RNDr(hash, S, 32); + RNDr(hash, S, 33); + RNDr(hash, S, 34); + RNDr(hash, S, 35); + RNDr(hash, S, 36); + RNDr(hash, S, 37); + RNDr(hash, S, 38); + RNDr(hash, S, 39); + RNDr(hash, S, 40); + RNDr(hash, S, 41); + RNDr(hash, S, 42); + RNDr(hash, S, 43); + RNDr(hash, S, 44); + RNDr(hash, S, 45); + RNDr(hash, S, 46); + RNDr(hash, S, 47); + RNDr(hash, S, 48); + RNDr(hash, S, 49); + RNDr(hash, S, 50); + RNDr(hash, S, 51); + RNDr(hash, S, 52); + RNDr(hash, S, 53); + RNDr(hash, S, 54); + RNDr(hash, S, 55); + RNDr(hash, S, 56); + + hash[2] += hash[6] + S1(hash[3]) + Ch(hash[3], hash[4], hash[5]) + + S[57] + sha256_k[57]; + hash[1] += hash[5] + S1(hash[2]) + Ch(hash[2], hash[3], hash[4]) + + S[58] + sha256_k[58]; + hash[0] += hash[4] + S1(hash[1]) + Ch(hash[1], hash[2], hash[3]) + + S[59] + sha256_k[59]; + hash[7] += hash[3] + S1(hash[0]) + Ch(hash[0], hash[1], hash[2]) + + S[60] + sha256_k[60] + + sha256_h[7]; +} + + #endif /* EXTERN_SHA256 */ + + #if HAVE_SHA256_4WAY + + void sha256d_ms_4way(uint32_t *hash, uint32_t *data, + const uint32_t *midstate, const uint32_t *prehash); + + static inline int scanhash_sha256d_4way(int thr_id, uint32_t *pdata, + const uint32_t *ptarget uint32_t max_nonce, unsigned long *hashes_done) +{ + uint32_t data[4 * 64] __attribute__((aligned(128))); + uint32_t hash[4 * 8] __attribute__((aligned(32))); + uint32_t midstate[4 * 8] __attribute__((aligned(32))); + uint32_t prehash[4 * 8] __attribute__((aligned(32))); + uint32_t n = pdata[19] - 1; + const uint32_t first_nonce = pdata[19]; + const uint32_t Htarg = ptarget[7]; + int i, j; + + memcpy(data, pdata + 16, 64); + sha256d_preextend(data); + for (i = 31; i >= 0; i--) + for (j = 0; j < 4; j++) + data[i * 4 + j] = data[i]; + + sha256_init(midstate); + sha256_transform(midstate, pdata, 0); + memcpy(prehash, midstate, 32); + sha256d_prehash(prehash, pdata + 16); + for (i = 7; i >= 0; i--) { + for (j = 0; j < 4; j++) { + midstate[i * 4 + j] = midstate[i]; + prehash[i * 4 + j] = prehash[i]; + } + } + + do { + for (i = 0; i < 4; i++) + data[4 * 3 + i] = ++n; + + sha256d_ms_4way(hash, data, midstate, prehash); + + for (i = 0; i < 4; i++) { + if (swab32(hash[4 * 7 + i]) <= Htarg) { + pdata[19] = data[4 * 3 + i]; + sha256d_80_swap(hash, pdata); + if (fulltest(hash, ptarget)) { + work_set_target_ratio(work, hash); + *hashes_done = n - first_nonce + 1; + return 1; + } + } + } + } while (n < max_nonce && !work_restart[thr_id].restart); + + *hashes_done = n - first_nonce + 1; + pdata[19] = n; + return 0; +} + + #endif /* HAVE_SHA256_4WAY */ + + #if HAVE_SHA256_8WAY + + void sha256d_ms_8way(uint32_t *hash, uint32_t *data, + const uint32_t *midstate, const uint32_t *prehash); + + static inline int scanhash_sha256d_8way(int thr_id, uint32_t *pdata, + const uint32_t *ptarget, uint32_t max_nonce, unsigned long *hashes_done) +{ + uint32_t data[8 * 64] __attribute__((aligned(128))); + uint32_t hash[8 * 8] __attribute__((aligned(32))); + uint32_t midstate[8 * 8] __attribute__((aligned(32))); + uint32_t prehash[8 * 8] __attribute__((aligned(32))); + uint32_t n = pdata[19] - 1; + const uint32_t first_nonce = pdata[19]; + const uint32_t Htarg = ptarget[7]; + int i, j; + + memcpy(data, pdata + 16, 64); + sha256d_preextend(data); + for (i = 31; i >= 0; i--) + for (j = 0; j < 8; j++) + data[i * 8 + j] = data[i]; + + sha256_init(midstate); + sha256_transform(midstate, pdata, 0); + memcpy(prehash, midstate, 32); + sha256d_prehash(prehash, pdata + 16); + for (i = 7; i >= 0; i--) { + for (j = 0; j < 8; j++) { + midstate[i * 8 + j] = midstate[i]; + prehash[i * 8 + j] = prehash[i]; + } + } + + do { + for (i = 0; i < 8; i++) + data[8 * 3 + i] = ++n; + + sha256d_ms_8way(hash, data, midstate, prehash); + + for (i = 0; i < 8; i++) { + if (swab32(hash[8 * 7 + i]) <= Htarg) { + pdata[19] = data[8 * 3 + i]; + sha256d_80_swap(hash, pdata); + if (fulltest(hash, ptarget)) { + *hashes_done = n - first_nonce + 1; + return 1; + } + } + } + } while (n < max_nonce && !work_restart[thr_id].restart); + + *hashes_done = n - first_nonce + 1; + pdata[19] = n; + return 0; +} + + #endif /* HAVE_SHA256_8WAY */ + + #if 0 +int scanhash_sha256d(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done) +{ + uint32_t _ALIGN(128) data[64]; + uint32_t hash[8]; + uint32_t midstate[8]; + uint32_t prehash[8]; + uint32_t *pdata = work->data; + uint32_t *ptarget = work->target; + uint32_t n = pdata[19] - 1; + const uint32_t first_nonce = pdata[19]; + const uint32_t Htarg = ptarget[7]; + + #if HAVE_SHA256_8WAY + if (sha256_use_8way()) + return scanhash_sha256d_8way(thr_id, pdata, ptarget, + max_nonce, hashes_done); +#endif +#if HAVE_SHA256_4WAY + if (sha256_use_4way()) + return scanhash_sha256d_4way(thr_id, pdata, ptarget, + max_nonce, hashes_done); +#endif + + memcpy(data, pdata + 16, 64); + sha256d_preextend(data); + + sha256_init(midstate); + sha256_transform(midstate, pdata, 0); + memcpy(prehash, midstate, 32); + sha256d_prehash(prehash, pdata + 16); + + do { + data[3] = ++n; + sha256d_ms(hash, data, midstate, prehash); + if (swab32(hash[7]) <= Htarg) { + pdata[19] = data[3]; + sha256d_80_swap(hash, pdata); + if (fulltest(hash, ptarget)) { + *hashes_done = n - first_nonce + 1; + return 1; + } + } + } while (n < max_nonce && !work_restart[thr_id].restart); + + *hashes_done = n - first_nonce + 1; + pdata[19] = n; + return 0; +} + + #endif \ No newline at end of file diff --git a/stratum/algos/sha256-d.h b/stratum/algos/sha256-d.h new file mode 100644 index 000000000..fd09d5cce --- /dev/null +++ b/stratum/algos/sha256-d.h @@ -0,0 +1,69 @@ +#ifndef __SHA2_H__ +#define __SHA2_H__ + + #ifdef __cplusplus +extern "C" { +#endif + + #include + + #define bswap_32(x) ((((x) << 24) & 0xff000000u) | (((x) << 8) & 0x00ff0000u) \ + | (((x) >> 8) & 0x0000ff00u) | (((x) >> 24) & 0x000000ffu)) + + #define bswap_64(x) (((uint64_t) bswap_32((uint32_t)((x) & 0xffffffffu)) << 32) \ + | (uint64_t) bswap_32((uint32_t)((x) >> 32))) + + static inline uint32_t be32dec(const void *pp) +{ + const uint8_t *p = (uint8_t const *)pp; + return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + + ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); +} + + static inline void be32enc(void *pp, uint32_t x) +{ + uint8_t *p = (uint8_t *)pp; + p[3] = x & 0xff; + p[2] = (x >> 8) & 0xff; + p[1] = (x >> 16) & 0xff; + p[0] = (x >> 24) & 0xff; +} + + static inline uint32_t swab32(uint32_t v) +{ +#ifdef WANT_BUILTIN_BSWAP + return __builtin_bswap32(v); +#else + return bswap_32(v); +#endif +} + + static inline uint64_t swab64(uint64_t v) +{ +#ifdef WANT_BUILTIN_BSWAP + return __builtin_bswap64(v); +#else + return bswap_64(v); +#endif +} + + static inline void swab256(void *dest_p, const void *src_p) +{ + uint32_t *dest = (uint32_t *) dest_p; + const uint32_t *src = (const uint32_t *) src_p; + + dest[0] = swab32(src[7]); + dest[1] = swab32(src[6]); + dest[2] = swab32(src[5]); + dest[3] = swab32(src[4]); + dest[4] = swab32(src[3]); + dest[5] = swab32(src[2]); + dest[6] = swab32(src[1]); + dest[7] = swab32(src[0]); +} + + #ifdef __cplusplus +} +#endif + + #endif \ No newline at end of file diff --git a/stratum/algos/x16rt.c b/stratum/algos/x16rt.c index 0c327fc72..acd7fe35c 100644 --- a/stratum/algos/x16rt.c +++ b/stratum/algos/x16rt.c @@ -2,7 +2,7 @@ #include #include -#include "sha256.h" +#include "sha256-d.h" #include #include #include @@ -44,65 +44,28 @@ enum Algo { HASH_FUNC_COUNT }; -static const char* algo_strings[] = { - "blake", - "bmw512", - "groestl", - "jh512", - "keccak", - "skein", - "luffa", - "cube", - "shavite", - "simd", - "echo", - "hamsi", - "fugue", - "shabal", - "whirlpool", - "sha512", - NULL -}; - static void getAlgoString(const uint32_t* timeHash, char *output) { - char *sptr = output; - uint8_t* data = (uint8_t*)timeHash; - - for (uint8_t j = 0; j < HASH_FUNC_COUNT; j++) { - uint8_t b = (15 - j) >> 1; // 16 ascii hex chars, reversed - uint8_t algoDigit = (j & 1) ? data[b] & 0xF : data[b] >> 4; - - if (algoDigit >= 10) - sprintf(sptr, "%c", 'A' + (algoDigit - 10)); - else - sprintf(sptr, "%u", (uint32_t) algoDigit); - sptr++; - } - *sptr = '\0'; -} - -static void doubleSha(unsigned char* output, unsigned char* input, uint32_t len) -{ - unsigned char hash[32]; - - SHA256_CTX ctx_sha256; - SHA256_Init(&ctx_sha256); - SHA256_Update(&ctx_sha256, input, len); - SHA256_Final(input, &ctx_sha256); - - SHA256_Init(&ctx_sha256); - SHA256_Update(&ctx_sha256, input, 32); - SHA256_Final(hash, &ctx_sha256); - - memcpy(output, hash, 32); + char *sptr = output; + uint8_t* data = (uint8_t*)timeHash; + + for (uint8_t j = 0; j < HASH_FUNC_COUNT; j++) { + uint8_t b = (15 - j) >> 1; // 16 ascii hex chars, reversed + uint8_t algoDigit = (j & 1) ? data[b] & 0xF : data[b] >> 4; + + if (algoDigit >= 10) + sprintf(sptr, "%c", 'A' + (algoDigit - 10)); + else + sprintf(sptr, "%u", (uint32_t) algoDigit); + sptr++; + } + *sptr = '\0'; } static void getTimeHash(const uint32_t timeStamp, void* timeHash) { - int32_t maskedTime = timeStamp & TIME_MASK; - - doubleSha((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); + int32_t maskedTime = timeStamp & TIME_MASK; + sha256d((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); } void x16rt_hash(const char* input, char* output, uint32_t len) @@ -227,4 +190,4 @@ void x16rt_hash(const char* input, char* output, uint32_t len) size = 64; } memcpy(output, hash, 32); -} +} \ No newline at end of file diff --git a/stratum/algos/x16rt.c.bak b/stratum/algos/x16rt.c.bak new file mode 100644 index 000000000..0c327fc72 --- /dev/null +++ b/stratum/algos/x16rt.c.bak @@ -0,0 +1,230 @@ +#include +#include +#include + +#include "sha256.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common.h" + +#define TIME_MASK 0xffffff80 + +enum Algo { + BLAKE = 0, + BMW, + GROESTL, + JH, + KECCAK, + SKEIN, + LUFFA, + CUBEHASH, + SHAVITE, + SIMD, + ECHO, + HAMSI, + FUGUE, + SHABAL, + WHIRLPOOL, + SHA512, + HASH_FUNC_COUNT +}; + +static const char* algo_strings[] = { + "blake", + "bmw512", + "groestl", + "jh512", + "keccak", + "skein", + "luffa", + "cube", + "shavite", + "simd", + "echo", + "hamsi", + "fugue", + "shabal", + "whirlpool", + "sha512", + NULL +}; + +static void getAlgoString(const uint32_t* timeHash, char *output) +{ + char *sptr = output; + uint8_t* data = (uint8_t*)timeHash; + + for (uint8_t j = 0; j < HASH_FUNC_COUNT; j++) { + uint8_t b = (15 - j) >> 1; // 16 ascii hex chars, reversed + uint8_t algoDigit = (j & 1) ? data[b] & 0xF : data[b] >> 4; + + if (algoDigit >= 10) + sprintf(sptr, "%c", 'A' + (algoDigit - 10)); + else + sprintf(sptr, "%u", (uint32_t) algoDigit); + sptr++; + } + *sptr = '\0'; +} + +static void doubleSha(unsigned char* output, unsigned char* input, uint32_t len) +{ + unsigned char hash[32]; + + SHA256_CTX ctx_sha256; + SHA256_Init(&ctx_sha256); + SHA256_Update(&ctx_sha256, input, len); + SHA256_Final(input, &ctx_sha256); + + SHA256_Init(&ctx_sha256); + SHA256_Update(&ctx_sha256, input, 32); + SHA256_Final(hash, &ctx_sha256); + + memcpy(output, hash, 32); +} + +static void getTimeHash(const uint32_t timeStamp, void* timeHash) +{ + int32_t maskedTime = timeStamp & TIME_MASK; + + doubleSha((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); +} + +void x16rt_hash(const char* input, char* output, uint32_t len) +{ + unsigned char hash[128]; + char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; + + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + + void *in = (void*) input; + int size = 80; + + uint32_t *in32 = (uint32_t*) input; + uint32_t ntime = in32[17]; + uint32_t timeHash[8]; + getTimeHash(ntime, &timeHash); + getAlgoString(&timeHash[0], hashOrder); + + for (int i = 0; i < 16; i++) + { + const char elem = hashOrder[i]; + const uint8_t algo = elem >= 'A' ? elem - 'A' + 10 : elem - '0'; + + switch (algo) { + case BLAKE: + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, in, size); + sph_blake512_close(&ctx_blake, hash); + break; + case BMW: + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, in, size); + sph_bmw512_close(&ctx_bmw, hash); + break; + case GROESTL: + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, in, size); + sph_groestl512_close(&ctx_groestl, hash); + break; + case SKEIN: + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, in, size); + sph_skein512_close(&ctx_skein, hash); + break; + case JH: + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, in, size); + sph_jh512_close(&ctx_jh, hash); + break; + case KECCAK: + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, in, size); + sph_keccak512_close(&ctx_keccak, hash); + break; + case LUFFA: + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, in, size); + sph_luffa512_close(&ctx_luffa, hash); + break; + case CUBEHASH: + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, in, size); + sph_cubehash512_close(&ctx_cubehash, hash); + break; + case SHAVITE: + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, in, size); + sph_shavite512_close(&ctx_shavite, hash); + break; + case SIMD: + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, in, size); + sph_simd512_close(&ctx_simd, hash); + break; + case ECHO: + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, in, size); + sph_echo512_close(&ctx_echo, hash); + break; + case HAMSI: + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, in, size); + sph_hamsi512_close(&ctx_hamsi, hash); + break; + case FUGUE: + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, in, size); + sph_fugue512_close(&ctx_fugue, hash); + break; + case SHABAL: + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, in, size); + sph_shabal512_close(&ctx_shabal, hash); + break; + case WHIRLPOOL: + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, in, size); + sph_whirlpool_close(&ctx_whirlpool, hash); + break; + case SHA512: + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) in, size); + sph_sha512_close(&ctx_sha512,(void*) hash); + break; + } + in = (void*) hash; + size = 64; + } + memcpy(output, hash, 32); +} diff --git a/stratum/algos/x16rt.h b/stratum/algos/x16rt.h index 742678bb5..0e5b6b743 100644 --- a/stratum/algos/x16rt.h +++ b/stratum/algos/x16rt.h @@ -1,16 +1,18 @@ #ifndef X16RT_H #define X16RT_H -#ifdef __cplusplus + #ifdef __cplusplus extern "C" { #endif -#include - -void x16rt_hash(const char* input, char* output, uint32_t len); + #include -#ifdef __cplusplus + void x16rt_hash(const char* input, char* output, uint32_t len); + + void sha256d(unsigned char *hash, const unsigned char *data, int len); + + #ifdef __cplusplus } #endif -#endif + #endif \ No newline at end of file diff --git a/stratum/algos/x16rt.h.bak b/stratum/algos/x16rt.h.bak new file mode 100644 index 000000000..742678bb5 --- /dev/null +++ b/stratum/algos/x16rt.h.bak @@ -0,0 +1,16 @@ +#ifndef X16RT_H +#define X16RT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x16rt_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/config.sample/bmw512.conf b/stratum/config.sample/bmw512.conf new file mode 100644 index 000000000..c02a8ac31 --- /dev/null +++ b/stratum/config.sample/bmw512.conf @@ -0,0 +1,13 @@ +[TCP] +server = yaamp.com +port = 5787 +password = tu8tu5 + [SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + [STRATUM] +algo = bmw512 +difficulty = 256 +max_ttf = 4000000 \ No newline at end of file diff --git a/stratum/config.sample/honeycomb.conf b/stratum/config.sample/honeycomb.conf new file mode 100644 index 000000000..612f06c68 --- /dev/null +++ b/stratum/config.sample/honeycomb.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 7777 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = honeycomb +difficulty = 32 +max_ttf = 4000000 + From 98b37ad70a9df461a80b6d35ceb18e722e68e41e Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 10 Jun 2019 18:45:29 -0400 Subject: [PATCH 480/576] more stratum stuff --- stratum/client.h | 2 +- stratum/client.h.bak | 169 ++++++ stratum/client_difficulty.cpp | 12 +- stratum/client_difficulty.cpp.bak | 106 ++++ stratum/client_submit.cpp | 113 ++-- stratum/client_submit.cpp.bak | 4 + stratum/coinbase.cpp | 962 +++++++++++++++++++++--------- stratum/coinbase.cpp.bak | 42 +- stratum/stratum.cpp | 8 +- stratum/stratum.cpp.bak | 488 +++++++++++++++ stratum/stratum.h | 2 + stratum/stratum.h.bak | 237 ++++++++ 12 files changed, 1793 insertions(+), 352 deletions(-) create mode 100644 stratum/client.h.bak create mode 100644 stratum/client_difficulty.cpp.bak create mode 100644 stratum/stratum.cpp.bak create mode 100644 stratum/stratum.h.bak diff --git a/stratum/client.h b/stratum/client.h index c58260b04..96701c255 100644 --- a/stratum/client.h +++ b/stratum/client.h @@ -32,7 +32,7 @@ struct YAAMP_CLIENT_ALGO #define YAAMP_JOB_MAXHISTORY 16 #define MIN_ADDRESS_LEN 30 /* BTC len can be as few as 26 chars, but gen. 33 or 34 */ -#define MAX_ADDRESS_LEN 35 /* DCR */ +#define MAX_ADDRESS_LEN 52 /* BITC */ class YAAMP_CLIENT: public YAAMP_OBJECT { diff --git a/stratum/client.h.bak b/stratum/client.h.bak new file mode 100644 index 000000000..c58260b04 --- /dev/null +++ b/stratum/client.h.bak @@ -0,0 +1,169 @@ + +//struct YAAMP_SOURCE +//{ +//public: +// int count; +// double speed; +// +// char ip[64]; +//}; + +struct YAAMP_ALGO +{ + char name[64]; + YAAMP_HASH_FUNCTION hash_function; + + double diff_multiplier; + double factor; + YAAMP_HASH_FUNCTION merkle_func; + + double profit; + double rent; + + bool overflow; +}; + +struct YAAMP_CLIENT_ALGO +{ + double factor; + YAAMP_ALGO *algo; +}; + +#define YAAMP_JOB_MAXHISTORY 16 + +#define MIN_ADDRESS_LEN 30 /* BTC len can be as few as 26 chars, but gen. 33 or 34 */ +#define MAX_ADDRESS_LEN 35 /* DCR */ + +class YAAMP_CLIENT: public YAAMP_OBJECT +{ +public: + YAAMP_SOCKET *sock; +// YAAMP_SOURCE *source; + + char notify_id[1024]; + int64_t reqid; // ask request id + + int created; + int last_best; + + bool reconnectable; + bool reconnecting; + + int userid; + int workerid; + int coinid; + bool logtraffic; + + int id_int; + const char *id_str; + + char version[1024]; + char username[1024]; + char password[1024]; + char worker[1024]; + + double difficulty_actual; + double difficulty_remote; + double difficulty_written; + bool difficulty_fixed; + + long long last_submit_time; + double shares_per_minute; + + char extranonce1[32]; + int extranonce2size; + + char extranonce1_default[32]; + int extranonce2size_default; + + char extranonce1_last[32]; + int extranonce2size_last; + + char extranonce1_reconnect[32]; + int extranonce2size_reconnect; + + bool extranonce_subscribe; + int submit_bad; + + double speed; + int extranonce1_id; + + int jobid_next; + int jobid_sent; + int jobid_locked; + + YAAMP_CLIENT_ALGO algos_subscribed[YAAMP_MAXALGOS]; + int job_history[YAAMP_JOB_MAXHISTORY]; + + int64_t shares; + int stats; + + int donation; + int broadcast_timeouts; +}; + +inline void client_delete(YAAMP_OBJECT *object) +{ + YAAMP_CLIENT *client = (YAAMP_CLIENT *)object; + if (object == NULL) return; + + socket_close(client->sock); + delete client; + + object = NULL; +} + +////////////////////////////////////////////////////////////////////////// + +YAAMP_CLIENT *client_find_notify_id(const char *notify_id, bool reconnecting); + +void get_next_extraonce1(char *extraonce1); +void get_random_key(char *key); + +void client_sort(); +void client_block_ip(YAAMP_CLIENT *client, const char *reason); +void client_block_ipset(YAAMP_CLIENT *client, const char *ipset_name); + +bool client_reset_multialgo(YAAMP_CLIENT *client, bool first); +bool client_initialize_multialgo(YAAMP_CLIENT *client); + +void client_add_job_history(YAAMP_CLIENT *client, int jobid); +bool client_find_job_history(YAAMP_CLIENT *client, int jobid, int startat=1); + +bool client_find_my_ip(const char *ip); + +////////////////////////////////////////////////////////////////////////// + +int client_send_difficulty(YAAMP_CLIENT *client, double difficulty); +double client_normalize_difficulty(double difficulty); + +void client_change_difficulty(YAAMP_CLIENT *client, double difficulty); +void client_record_difficulty(YAAMP_CLIENT *client); +void client_adjust_difficulty(YAAMP_CLIENT *client); + +void client_initialize_difficulty(YAAMP_CLIENT *client); + +////////////////////////////////////////////////////////////////////////// + +int client_call(YAAMP_CLIENT *client, const char *method, const char *format, ...); +int client_ask(YAAMP_CLIENT *client, const char *method, const char *format, ...); + +void client_dump_all(); + +int client_send_result(YAAMP_CLIENT *client, const char *format, ...); +int client_send_error(YAAMP_CLIENT *client, int error, const char *string); + +bool client_ask_stats(YAAMP_CLIENT *client); + +bool client_submit(YAAMP_CLIENT *client, json_value *json_params); + +int client_workers_count(YAAMP_CLIENT *client); +int client_workers_byaddress(const char *username); +bool client_auth_by_workers(YAAMP_CLIENT *client); + +void *client_thread(void *p); + +void db_check_user_input(char* input); + +//void source_prune(); + diff --git a/stratum/client_difficulty.cpp b/stratum/client_difficulty.cpp index e3894bb40..c873ec5b2 100644 --- a/stratum/client_difficulty.cpp +++ b/stratum/client_difficulty.cpp @@ -3,10 +3,12 @@ double client_normalize_difficulty(double difficulty) { - if(difficulty < g_stratum_min_diff) difficulty = g_stratum_min_diff; - else if(difficulty < 1) difficulty = floor(difficulty*100000000/2)/100000000*2; + double min_stratum_diff = g_stratum_difficulty * 0.5; + if(difficulty < min_stratum_diff) + difficulty = min_stratum_diff; + else if(difficulty < 1) difficulty = floor(difficulty*1000/2)/1000*2; else if(difficulty > 1) difficulty = floor(difficulty/2)*2; - if(difficulty > g_stratum_max_diff) difficulty = g_stratum_max_diff; + return difficulty; } @@ -59,10 +61,10 @@ void client_adjust_difficulty(YAAMP_CLIENT *client) else if(client->difficulty_fixed) return; - else if(client->shares_per_minute > 20) + else if(client->shares_per_minute > 25) client_change_difficulty(client, client->difficulty_actual*2); - else if(client->shares_per_minute > 15) + else if(client->shares_per_minute > 20) client_change_difficulty(client, client->difficulty_actual*1.5); else if(client->shares_per_minute < 5) diff --git a/stratum/client_difficulty.cpp.bak b/stratum/client_difficulty.cpp.bak new file mode 100644 index 000000000..e3894bb40 --- /dev/null +++ b/stratum/client_difficulty.cpp.bak @@ -0,0 +1,106 @@ + +#include "stratum.h" + +double client_normalize_difficulty(double difficulty) +{ + if(difficulty < g_stratum_min_diff) difficulty = g_stratum_min_diff; + else if(difficulty < 1) difficulty = floor(difficulty*100000000/2)/100000000*2; + else if(difficulty > 1) difficulty = floor(difficulty/2)*2; + if(difficulty > g_stratum_max_diff) difficulty = g_stratum_max_diff; + return difficulty; +} + +void client_record_difficulty(YAAMP_CLIENT *client) +{ + if(client->difficulty_remote) + { + client->last_submit_time = current_timestamp(); + return; + } + + int e = current_timestamp() - client->last_submit_time; + if(e < 500) e = 500; + int p = 5; + + client->shares_per_minute = (client->shares_per_minute * (100 - p) + 60*1000*p/e) / 100; + client->last_submit_time = current_timestamp(); + +// debuglog("client->shares_per_minute %f\n", client->shares_per_minute); +} + +void client_change_difficulty(YAAMP_CLIENT *client, double difficulty) +{ + if(difficulty <= 0) return; + + difficulty = client_normalize_difficulty(difficulty); + if(difficulty <= 0) return; + +// debuglog("change diff to %f %f\n", difficulty, client->difficulty_actual); + if(difficulty == client->difficulty_actual) return; + + uint64_t user_target = diff_to_target(difficulty); + if(user_target >= YAAMP_MINDIFF && user_target <= YAAMP_MAXDIFF) + { + client->difficulty_actual = difficulty; + client_send_difficulty(client, difficulty); + } +} + +void client_adjust_difficulty(YAAMP_CLIENT *client) +{ + if(client->difficulty_remote) { + client_change_difficulty(client, client->difficulty_remote); + return; + } + + if(client->shares_per_minute > 100) + client_change_difficulty(client, client->difficulty_actual*4); + + else if(client->difficulty_fixed) + return; + + else if(client->shares_per_minute > 20) + client_change_difficulty(client, client->difficulty_actual*2); + + else if(client->shares_per_minute > 15) + client_change_difficulty(client, client->difficulty_actual*1.5); + + else if(client->shares_per_minute < 5) + client_change_difficulty(client, client->difficulty_actual/2); +} + +int client_send_difficulty(YAAMP_CLIENT *client, double difficulty) +{ +// debuglog("%s diff %f\n", client->sock->ip, difficulty); + client->shares_per_minute = YAAMP_SHAREPERSEC; + + if(difficulty >= 1) + client_call(client, "mining.set_difficulty", "[%.0f]", difficulty); + else + client_call(client, "mining.set_difficulty", "[%.8f]", difficulty); + return 0; +} + +void client_initialize_difficulty(YAAMP_CLIENT *client) +{ + char *p = strstr(client->password, "d="); + char *p2 = strstr(client->password, "decred="); + if(!p || p2) return; + + double diff = client_normalize_difficulty(atof(p+2)); + uint64_t user_target = diff_to_target(diff); + +// debuglog("%016llx target\n", user_target); + if(user_target >= YAAMP_MINDIFF && user_target <= YAAMP_MAXDIFF) + { + client->difficulty_actual = diff; + client->difficulty_fixed = true; + } + +} + + + + + + diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 41951d070..7c1c36149 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -31,14 +31,10 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); #endif - if (!strcmp(g_stratum_algo, "lbry")) { + if (!strcmp(g_current_algo->name, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); - } else if (strlen(templ->extradata_be) == 128) { // LUX SC - sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - ntime, templ->nbits, nonce, templ->extradata_be); - ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) + ser_string_be(submitvalues->header, submitvalues->header_be, 32 + 20); } else { sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce); @@ -149,6 +145,11 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL uint64_t coin_target = decode_compact(templ->nbits); if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + // please forgive me for this hack jebus + if (strstr(g_current_algo->name,"balloon") && + (submitvalues->hash_bin[30] | submitvalues->hash_bin[31])) + coin_target = 0x0; + int block_size = YAAMP_SMALLBUFSIZE; vector::const_iterator i; @@ -250,25 +251,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL snprintf(block_hex, block_size, "%s", hex); } - if(g_current_algo->name && !strcmp("ZBIT", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } - if(g_current_algo->name && !strcmp("MLS", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } - bool b = coind_submit(coind, block_hex); if(b) { @@ -372,31 +354,32 @@ static bool ntime_valid_range(const char ntimehex[]) return (abs(rawtime - ntime) < (30 * 60)); } -static bool valid_string_params(json_value *json_params) -{ - for(int p=0; p < json_params->u.array.length; p++) { - if (!json_is_string(json_params->u.array.values[p])) - return false; - } - return true; -} - bool client_submit(YAAMP_CLIENT *client, json_value *json_params) { + bool isBalloon = false; + + if (strstr(g_current_algo->name,"balloon")) + isBalloon = true; + // submit(worker_name, jobid, extranonce2, ntime, nonce): - if(json_params->u.array.length<5 || !valid_string_params(json_params)) { + if(json_params->u.array.length<5) + { debuglog("%s - %s bad message\n", client->username, client->sock->ip); client->submit_bad++; return false; } - char extranonce2[32] = { 0 }; - char extra[160] = { 0 }; - char nonce[80] = { 0 }; - char ntime[32] = { 0 }; - char vote[8] = { 0 }; + char extranonce2[32]; + char ntime[32]; + char nonce[32]; + char vote[8]; + + memset(extranonce2, 0, 32); + memset(ntime, 0, 32); + memset(nonce, 0, 32); + memset(vote, 0, 8); - if (strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { + if (!json_params->u.array.values[1]->u.string.ptr || strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { clientlog(client, "bad json, wrong jobid len"); client->submit_bad++; return false; @@ -406,11 +389,17 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); + if (json_params->u.array.length == 6) + strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); + + if (g_debuglog_hash) { + debuglog("submit %s (uid %d) %d, %s, %s, %s\n", client->sock->ip, client->userid, jobid, extranonce2, ntime, nonce); + } string_lower(extranonce2); string_lower(ntime); string_lower(nonce); - + string_lower(vote); if (json_params->u.array.length == 6) { if (strstr(g_stratum_algo, "phi")) { // lux optional field, smart contral root hashes (not mandatory on shares submit) @@ -454,7 +443,7 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) if(strcmp(ntime, templ->ntime)) { - if (!ishexa(ntime, 8) || !ntime_valid_range(ntime)) { + if (!ntime_valid_range(ntime)) { client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); return true; } @@ -522,27 +511,51 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) // minimum hash diff begins with 0000, for all... uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; + + // except balloon + if(isBalloon) + pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; + if(pfx) { if (g_debuglog_hash) { debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); - } + } client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); return true; } + // bit dim, but so is measuring the diff this way + uint64_t user_target; uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); - uint64_t user_target = diff_to_target(client->difficulty_actual); - uint64_t coin_target = decode_compact(templ->nbits); - if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - if (g_debuglog_hash) { + uint64_t coin_target = decode_compact(templ->nbits); + uint64_t hashcomb = * (uint64_t *) &submitvalues.hash_bin[24]; + + // prevents overflow + if(!isBalloon) { + user_target = diff_to_target(client->difficulty_actual); + } + if(templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + // due to balloon's lower diff + if (g_debuglog_hash && isBalloon) { + debuglog("hash %016lx \n", hashcomb); + debuglog("targ %016lx \n", sharetotarg(client->difficulty_actual)); + } + if (g_debuglog_hash && !isBalloon) { debuglog("%016llx actual\n", hash_int); debuglog("%016llx target\n", user_target); debuglog("%016llx coin\n", coin_target); } - if(hash_int > user_target && hash_int > coin_target) + + // due to balloon's lower diff + if(hashcomb > sharetotarg(client->difficulty_actual) && isBalloon) + { + client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); + return true; + } + if(hash_int > user_target && hash_int > coin_target && !isBalloon) { client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); return true; diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak index c11ed0d26..41951d070 100644 --- a/stratum/client_submit.cpp.bak +++ b/stratum/client_submit.cpp.bak @@ -286,6 +286,10 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + // isnt perfect, but it works + if(strcmp(coind->symbol, "SIN") == 0) + x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + char hash1[1024]; memset(hash1, 0, 1024); diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 7bd8f1381..186c405ff 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -27,7 +27,6 @@ static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char strcat(data, coinb2_part); } - static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) { char evalue[32]; @@ -107,11 +106,11 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char eversion1[32] = "01000000"; if(coind->txmessage) strcpy(eversion1, "02000000"); - - const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); + + const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); if(coinbase_payload && strlen(coinbase_payload) > 0) strcpy(eversion1, "03000500"); - + char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); @@ -140,47 +139,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); } - - if(strcmp(coind->symbol, "SIN") == 0) - { - int npayees = 1; - char payees[2]; - char sinpayee[256] = {0}; - char sinscript[1024] = {0}; - char devpayee[256] = {0}; - char devscript[1024] = {0}; - const char *devpayaddr = json_get_string(json_result, "payee"); - json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); - snprintf(devpayee, 255, "%s", devpayaddr); - base58_decode(devpayee, devscript); - npayees++; - - available -= devfee_amount; - const char* mnpayaddrs[7] = {0}; - json_value* masternodes = json_get_array(json_result, "masternode"); - json_int_t mnamounts[7] = {0}; - for(int i = 0; i < masternodes->u.array.length; i++) { - mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); - mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); - available -= mnamounts[i]; - npayees++; - } - - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); - for(int i = 0; i < masternodes->u.array.length; i++) { - snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); - base58_decode(sinpayee, sinscript); - job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); - } - - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available/100000000; - return; - } - else if(strcmp(coind->symbol, "DYN") == 0) { char script_dests[2048] = { 0 }; @@ -244,39 +202,54 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); return; } + else if(strcmp(coind->symbol, "LTCR") == 0) { if (coind->charity_percent <= 0) coind->charity_percent = 10; if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); } - else if(strcmp(coind->symbol, "XZC") == 0) { - char script_payee[1024]; + + else if(strcmp(coind->symbol, "GEEK") == 0) { if (coind->charity_percent <= 0) - coind->charity_percent = 25; // wrong coinbase 40 instead of 40 + 10 = 50 - - json_int_t charity_amount = (available * coind->charity_percent) / 100; - + coind->charity_percent = 2.5; if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD"); - - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode(coind->charity_address, script_payee); // may change - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - return; + sprintf(coind->charity_address, "GRpdbSh3Z2FMjJH96CFPK5TzEb47Zg6FFR"); } + + else if(strcmp(coind->symbol, "XZC") == 0) { + char script_payee[1024]; + bool znode_masternode_enabled = json_get_bool(json_result, "znode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "znode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("znode payee: %s\n", payee); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); + job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); + base58_decode("aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD", script_payee); + job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); + base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); + job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); + base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); + job_pack_tx(coind, templ->coinb2, 3 * 100000000, script_payee); + base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); + job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + else if(strcmp("DCR", coind->rpcencoding) == 0) { coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 coind->charity_percent = 0; @@ -285,6 +258,128 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); } + + // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. + else if (strcmp(coind->symbol, "SMART") == 0) { + char script_payee[512] = { 0 }; + char payees[5]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //treasury 5000 * (143500/Blockheight) per block + int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); + json_int_t charity_amount = coinvalue * 0.95; + int blockRotation = templ->height - 95 * (templ->height/95); + if (blockRotation >= 0 && blockRotation <= 7) { + sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); + } + if (blockRotation >= 8 && blockRotation <= 15) { + sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); + } + if (blockRotation >= 16 && blockRotation <= 23) { + sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); + } + if (blockRotation >= 24 && blockRotation <= 38) { + sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); + } + if (blockRotation >= 39 && blockRotation <= 94) { + sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + else if(strcmp(coind->symbol, "HXX") == 0) { + char script_payee[1024]; + bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "xnode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "05"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); + job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + + else if(strcmp(coind->symbol, "BZX") == 0) { + char script_payee[1024]; + bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "bznode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "04"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "03"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); + job_pack_tx(coind, templ->coinb2, 6.75 * 100000000, script_payee); + base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); + job_pack_tx(coind, templ->coinb2, 2.25 * 100000000, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + else if(strcmp(coind->symbol, "STAK") == 0) { char script_payee[512] = { 0 }; char payees[4]; @@ -344,227 +439,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - - else if ( - (strcmp(coind->symbol, "IFX") == 0)|| - (strcmp(coind->symbol, "GTM") == 0)|| - (strcmp(coind->symbol, "GOV") == 0)|| - (strcmp(coind->symbol, "GWAY") == 0)|| - (strcmp(coind->symbol, "ALMN") == 0)|| - (strcmp(coind->symbol, "AGM") == 0)|| - (strcmp(coind->symbol, "BMN") == 0)|| - (strcmp(coind->symbol, "CRDS") == 0)) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "BZX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "bznode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "04"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "03"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); - job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); - - base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); - job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); - - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "SECI") == 0) { - char script_payee[512] = { 0 }; - char payees[1]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //mainnet - json_int_t charity_amount = 50000000; - sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "TUX") == 0) { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "donation_payee"); - if(payee != NULL){ - sprintf(coind->charity_address, "%s", payee); - } else { - sprintf(coind->charity_address, "%s", ""); - } - - if(strlen(coind->charity_address) > 0){ - char script_payee[1024]; - char charity_payee[256] = { 0 }; - sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "donation_amount"); - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - debuglog("pack tx %s\n", coinb2_part); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - } - - bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); - json_value* founder = json_get_object(json_result, "founder"); - - if (!coind->hasmasternodes && founder_enabled && founder) { - char founder_payee[256] = { 0 }; - char founder_script[1024] = { 0}; - const char *payee = json_get_string(founder, "payee"); - bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); - json_int_t amount = json_get_int(founder, "amount"); - if(payee && amount) { - if (payee) snprintf(founder_payee, 255, "%s", payee); - if (strlen(founder_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - base58_decode(founder_payee, founder_script); - available -= amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - if(founder_use_p2sh) { - p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); - } else { - job_pack_tx(coind, templ->coinb2, amount, founder_script); - } - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); - debuglog("%s founder script %s\n", coind->symbol,founder_script); - debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - - return; - } - } // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) @@ -608,6 +482,505 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available/100000000; return; } + + // add IFX + if (strcmp(coind->symbol, "IFX") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // add GTM + if (strcmp(coind->symbol, "GTM") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // add GWAY + if (strcmp(coind->symbol, "GWAY") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + if (strcmp(coind->symbol, "AGM") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // add CRDS + if (strcmp(coind->symbol, "CRDS") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // add BMN + if (strcmp(coind->symbol, "BMN") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + //Add BNODE + if (strcmp(coind->symbol, "BNODE") == 0) + { + char script_dests[4096] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + + json_value* evolution = json_get_object(json_result, "evolution"); + bool evolution_enabled = json_get_bool(json_result, "evolution_payments_enforced"); + bool evolution_started = json_get_bool(json_result, "evolution_payments_started"); + if (evolution_enabled && evolution && evolution_started) { + if (json_is_array(evolution)) { + for(int i = 0; i < evolution->u.array.length; i++) { + const char *payee = json_get_string(evolution->u.array.values[i], "payee"); + const char *script = json_get_string(evolution->u.array.values[i], "script"); + json_int_t amount = json_get_int(evolution->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s evolution %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(evolution, "payee"); + json_int_t amount = json_get_int(evolution, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + } + + json_value* masternode = json_get_object(json_result, "masternode"); + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (masternode && started) { + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i++) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + const char *script = json_get_string(masternode->u.array.values[i], "script"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + //add GLT + else if(strcmp(coind->symbol, "GLT") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char script_treasury[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + json_value* masternode = json_get_object(json_result, "masternode"); + json_value* treasury = json_get_object(json_result, "treasury"); + bool treasury_enabled = true; + if(treasury_enabled && treasury) { + const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); + json_int_t amount = json_get_int(treasury, "amount"); + if (scriptPubKey && amount) { + npayees++; + available -= amount; + base58_decode(scriptPubKey, script_treasury); + job_pack_tx(coind, script_dests, amount, script_treasury); + //debuglog("%s treasury %u\n", coind->symbol, amount); + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + // Add DigitalNote[XDN] + if(strcmp(coind->symbol, "XDN") == 0) { + + // make sure we pay both mn and devops + bool founder_enabled = json_get_bool(json_result, "founder_reward_enforced"); + bool masternode_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (!founder_enabled || !masternode_enabled) + return; + + // founder/masternode vars + char founder_script[1024] = { 0}; + char masternode_script[1024] = { 0}; + char founder_payee[256] = { 0}; + char masternode_payee[256] = { 0}; + json_int_t part_amount = (5000000000); + json_int_t pool_amount = (5000000000*4); + json_value* founder = json_get_object(json_result, "founderreward"); + const char *payee1 = json_get_string(json_result, "payee"); + const char *payee2 = json_get_string(founder, "payee"); + + // mn script + snprintf(masternode_payee, 255, "%s", payee1); + base58_decode(masternode_payee, masternode_script); + available -= part_amount; + + // payee script + snprintf(founder_payee, 255, "%s", payee2); + base58_decode(founder_payee, founder_script); + available -= part_amount; + + // total outputs + strcat(templ->coinb2, "03"); + + // pack the tx + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, part_amount, founder_script); + job_pack_tx(coind, templ->coinb2, part_amount, masternode_script); + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + + // Add Sinovate[SIN] + if(strcmp(coind->symbol, "SIN") == 0) + { + char dests[2048] = { 0 }; + char sinpayee[256] = { 0 }; + char sinscript[1024] = { 0 }; + int npayees = 1; + char payees[3]; + + const char *founder = json_get_string(json_result, "payee"); + json_int_t founderreward = json_get_int(json_result, "payee_amount"); + if (founder && founderreward) { + snprintf(sinpayee, 255, "%s", founder); + base58_decode(sinpayee, sinscript); + available -= founderreward; + npayees++; + job_pack_tx(coind, dests, founderreward, sinscript); + } + + json_value* masternodes = json_get_array(json_result, "masternode"); + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (started && masternodes->u.array.length) for (int i = 0; i < masternodes->u.array.length; i++) { + const char *payee = json_get_string(masternodes->u.array.values[i], "payee"); + json_int_t amount = json_get_int(masternodes->u.array.values[i], "amount"); + if (payee && amount) { + snprintf(sinpayee, 255, "%s", payee); + base58_decode(sinpayee, sinscript); + available -= amount; + npayees++; + job_pack_tx(coind, dests, amount, sinscript); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, dests); + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available / 100000000; + return; + } + + if(strcmp(coind->symbol, "BITC") == 0) + { + char *params = (char *)malloc(1024); + if (params) { + sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); + //std::cout << "Params:" << params << std::endl; + json_value *json = rpc_call(&coind->rpc, "createcoinbaseforaddress", params); + free(params); + if (json) { + json_value *json_result = json_get_object(json, "result"); + if (json_result) { + sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbasepart1")); + templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; + sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbasepart2")); + } + } + } + return; + } if(strcmp(coind->symbol, "XVC") == 0) { @@ -710,7 +1083,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * npayees++; available -= amount; script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { + } else if (payee) { npayees++; available -= amount; base58_decode(payee, script_payee); @@ -743,12 +1116,13 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * strcat(templ->coinb2, script_dests); job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - if(coinbase_payload && strlen(coinbase_payload) > 0) { + if(coinbase_payload && strlen(coinbase_payload) > 0) { char coinbase_payload_size[18]; ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); strcat(templ->coinb2, coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload); strcat(templ->coinb2, coinbase_payload); + strcat(templ->coinb2, coinbase_payload); } + coind->reward = (double)available/100000000*coind->reward_mul; //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); @@ -797,7 +1171,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); return; } - + else if(strcmp(coind->symbol, "ENT") == 0) { char script_dests[2048] = { 0 }; diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak index 376c96203..7bd8f1381 100644 --- a/stratum/coinbase.cpp.bak +++ b/stratum/coinbase.cpp.bak @@ -140,6 +140,47 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); } + + if(strcmp(coind->symbol, "SIN") == 0) + { + int npayees = 1; + char payees[2]; + char sinpayee[256] = {0}; + char sinscript[1024] = {0}; + char devpayee[256] = {0}; + char devscript[1024] = {0}; + const char *devpayaddr = json_get_string(json_result, "payee"); + json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); + snprintf(devpayee, 255, "%s", devpayaddr); + base58_decode(devpayee, devscript); + npayees++; + + available -= devfee_amount; + const char* mnpayaddrs[7] = {0}; + json_value* masternodes = json_get_array(json_result, "masternode"); + json_int_t mnamounts[7] = {0}; + for(int i = 0; i < masternodes->u.array.length; i++) { + mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); + mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); + available -= mnamounts[i]; + npayees++; + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); + for(int i = 0; i < masternodes->u.array.length; i++) { + snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); + base58_decode(sinpayee, sinscript); + job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); + } + + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000; + return; + } + else if(strcmp(coind->symbol, "DYN") == 0) { char script_dests[2048] = { 0 }; @@ -885,7 +926,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - if(strcmp(coind->symbol, "IHC") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 49f01ef97..e3f8ae669 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -116,9 +116,11 @@ YAAMP_ALGO g_algos[] = {"a5a", a5a_hash, 0x10000, 0, 0}, {"aergo", aergo_hash, 1, 0, 0}, {"allium", allium_hash, 0x100, 0, 0}, - {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, + {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, // Credits Argon2d Implementation {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation + {"argon2d-uis", argon2d_uis_hash, 0x10000, 0, 0 }, // Argon2d Implementation {"argon2m", argon2m_hash, 0x10000, 0, 0}, + {"astralhash", astralhash_hash, 0x100, 0, 0}, {"balloon", balloon_hash, 1, 0, 0}, {"bastion", bastion_hash, 1, 0 }, {"bcd", bcd_hash, 1, 0, 0}, @@ -129,6 +131,7 @@ YAAMP_ALGO g_algos[] = {"blake2s", blake2s_hash, 1, 0 }, {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, {"bmw", bmw_hash, 1, 0, 0}, + {"bmw512", bmw512_hash, 0x100, 0, 0}, {"c11", c11_hash, 1, 0, 0}, {"decred", decred_hash, 1, 0 }, {"dedal", dedal_hash, 0x100, 0, 0}, @@ -142,6 +145,8 @@ YAAMP_ALGO g_algos[] = {"hive", hive_hash, 0x10000, 0, 0}, {"hmq1725", hmq17_hash, 0x10000, 0, 0}, {"hsr", hsr_hash, 1, 0, 0}, + {"honeycomb", beenode_hash, 0x10000, 0, 0}, + {"jeonghash", jeonghash_hash, 0x100, 0, 0}, {"jha", jha_hash, 0x10000, 0}, {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, {"keccakc", keccak256_hash, 0x100, 0, 0}, @@ -158,6 +163,7 @@ YAAMP_ALGO g_algos[] = {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, {"nist5", nist5_hash, 1, 0, 0}, + {"pawelhash", pawelhash_hash, 0x100, 0, 0}, {"penta", penta_hash, 1, 0, 0}, {"phi", phi_hash, 1, 0, 0}, {"phi2", phi2_hash, 0x100, 0, 0}, diff --git a/stratum/stratum.cpp.bak b/stratum/stratum.cpp.bak new file mode 100644 index 000000000..49f01ef97 --- /dev/null +++ b/stratum/stratum.cpp.bak @@ -0,0 +1,488 @@ + +#include "stratum.h" +#include +#include + +CommonList g_list_coind; +CommonList g_list_client; +CommonList g_list_job; +CommonList g_list_remote; +CommonList g_list_renter; +CommonList g_list_share; +CommonList g_list_worker; +CommonList g_list_block; +CommonList g_list_submit; +CommonList g_list_source; + +int g_tcp_port; + +char g_tcp_server[1024]; +char g_tcp_password[1024]; + +char g_sql_host[1024]; +char g_sql_database[1024]; +char g_sql_username[1024]; +char g_sql_password[1024]; +int g_sql_port = 3306; + +char g_stratum_coin_include[256]; +char g_stratum_coin_exclude[256]; + +char g_stratum_algo[256]; +double g_stratum_difficulty; +double g_stratum_nicehash_difficulty; +double g_stratum_nicehash_min_diff; +double g_stratum_nicehash_max_diff; +double g_stratum_min_diff; +double g_stratum_max_diff; + +int g_stratum_max_ttf; +int g_stratum_max_cons = 5000; +bool g_stratum_reconnect; +bool g_stratum_renting; +bool g_stratum_segwit = false; + +int g_limit_txs_per_block = 0; + +bool g_handle_haproxy_ips = false; +int g_socket_recv_timeout = 600; + +bool g_debuglog_client; +bool g_debuglog_hash; +bool g_debuglog_socket; +bool g_debuglog_rpc; +bool g_debuglog_list; +bool g_debuglog_remote; + +bool g_autoexchange = true; + +uint64_t g_max_shares = 0; +uint64_t g_shares_counter = 0; +uint64_t g_shares_log = 0; + +bool g_allow_rolltime = true; +time_t g_last_broadcasted = 0; +YAAMP_DB *g_db = NULL; + +pthread_mutex_t g_db_mutex; +pthread_mutex_t g_nonce1_mutex; +pthread_mutex_t g_job_create_mutex; + +struct ifaddrs *g_ifaddr; + +volatile bool g_exiting = false; + +void *stratum_thread(void *p); +void *monitor_thread(void *p); + +//////////////////////////////////////////////////////////////////////////////////////// + +static void scrypt_hash(const char* input, char* output, uint32_t len) +{ + scrypt_1024_1_1_256((unsigned char *)input, (unsigned char *)output); +} + +static void scryptn_hash(const char* input, char* output, uint32_t len) +{ + time_t time_table[][2] = + { + {2048, 1389306217}, + {4096, 1456415081}, + {8192, 1506746729}, + {16384, 1557078377}, + {32768, 1657741673}, + {65536, 1859068265}, + {131072, 2060394857}, + {262144, 1722307603}, + {524288, 1769642992}, + {0, 0}, + }; + + for(int i=0; time_table[i][0]; i++) + if(time(NULL) < time_table[i+1][1]) + { + scrypt_N_R_1_256(input, output, time_table[i][0], 1, len); + return; + } +} + +static void neoscrypt_hash(const char* input, char* output, uint32_t len) +{ + neoscrypt((unsigned char *)input, (unsigned char *)output, 0x80000620); +} + +YAAMP_ALGO g_algos[] = +{ + {"a5a", a5a_hash, 0x10000, 0, 0}, + {"aergo", aergo_hash, 1, 0, 0}, + {"allium", allium_hash, 0x100, 0, 0}, + {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, + {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation + {"argon2m", argon2m_hash, 0x10000, 0, 0}, + {"balloon", balloon_hash, 1, 0, 0}, + {"bastion", bastion_hash, 1, 0 }, + {"bcd", bcd_hash, 1, 0, 0}, + {"binarium-v1", Binarium_hash_v1_hash, 1, 0, 0}, + {"bitcore", timetravel10_hash, 0x100, 0, 0}, + {"blake", blake_hash, 1, 0 }, + {"blake2b", blake2b_hash, 1, 0 }, + {"blake2s", blake2s_hash, 1, 0 }, + {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, + {"bmw", bmw_hash, 1, 0, 0}, + {"c11", c11_hash, 1, 0, 0}, + {"decred", decred_hash, 1, 0 }, + {"dedal", dedal_hash, 0x100, 0, 0}, + {"deep", deep_hash, 1, 0, 0}, + {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ + {"exosis", exosis_hash, 0x100, 0, 0}, + {"fresh", fresh_hash, 0x100, 0, 0}, + {"geek", geek_hash, 1, 0, 0}, + {"groestl", groestl_hash, 0x100, 0, sha256_hash_hex }, /* groestlcoin */ + {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, + {"hive", hive_hash, 0x10000, 0, 0}, + {"hmq1725", hmq17_hash, 0x10000, 0, 0}, + {"hsr", hsr_hash, 1, 0, 0}, + {"jha", jha_hash, 0x10000, 0}, + {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, + {"keccakc", keccak256_hash, 0x100, 0, 0}, + {"lbk3", lbk3_hash, 0x100, 0, 0}, + {"lbry", lbry_hash, 0x100, 0, 0}, + {"luffa", luffa_hash, 1, 0, 0}, + {"lyra2", lyra2re_hash, 0x80, 0, 0}, + {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, + {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, + {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, + {"lyra2z", lyra2z_hash, 0x100, 0, 0}, + {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, + {"m7m", m7m_hash, 0x10000, 0, 0}, + {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ + {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, + {"nist5", nist5_hash, 1, 0, 0}, + {"penta", penta_hash, 1, 0, 0}, + {"phi", phi_hash, 1, 0, 0}, + {"phi2", phi2_hash, 0x100, 0, 0}, + {"phi1612", phi1612_hash, 1, 0, 0}, + {"pipe", pipe_hash, 1,0,0}, + {"polytimos", polytimos_hash, 1, 0, 0}, + {"quark", quark_hash, 1, 0, 0}, + {"qubit", qubit_hash, 1, 0, 0}, + {"rainforest", rainforest_hash, 1, 0, 0}, + {"rfv2", rfv2_hash_yiimp, 0x10000, 0, 0}, + {"scrypt", scrypt_hash, 0x10000, 0, 0}, + {"scryptn", scryptn_hash, 0x10000, 0, 0}, + {"sha256", sha256_double_hash, 1, 0, 0}, + {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x + {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x + {"sib", sib_hash, 1, 0, 0}, + {"skein", skein_hash, 1, 0, 0}, + {"skein2", skein2_hash, 1, 0, 0}, + {"skunk", skunk_hash, 1, 0, 0}, + {"sonoa", sonoa_hash, 1, 0, 0}, + {"timetravel", timetravel_hash, 0x100, 0, 0}, + {"tribus", tribus_hash, 1, 0, 0}, + {"vanilla", blakecoin_hash, 1, 0 }, + {"veltor", veltor_hash, 1, 0, 0}, + {"velvet", velvet_hash, 0x10000, 0, 0}, + {"vitalium", vitalium_hash, 1, 0, 0}, + {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ + {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ + {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, + {"x11", x11_hash, 1, 0, 0}, + {"x11evo", x11evo_hash, 1, 0, 0}, + {"x12", x12_hash, 1, 0, 0}, + {"x13", x13_hash, 1, 0, 0}, + {"x14", x14_hash, 1, 0, 0}, + {"x15", x15_hash, 1, 0, 0}, + {"x16r", x16r_hash, 0x100, 0, 0}, + {"x16rt", x16rt_hash, 0x100, 0, 0}, + {"x16s", x16s_hash, 0x100, 0, 0}, + {"x17", x17_hash, 1, 0, 0}, + {"x18", x18_hash, 1, 0, 0}, + {"x20r", x20r_hash, 0x100, 0, 0}, + {"x21s", x21s_hash, 0x100, 0, 0}, + {"x22i", x22i_hash, 1, 0, 0}, + {"x25x", x25x_hash, 1, 0, 0}, + {"xevan", xevan_hash, 0x100, 0, 0}, + {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, + {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, + {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, + {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, + {"yespower", yespower_hash, 0x10000, 0, 0 }, + {"yespowerR16", yespowerR16_hash, 0x10000, 0, 0 }, + {"zr5", zr5_hash, 1, 0, 0}, + {"", NULL, 0, 0}, +}; + +YAAMP_ALGO *g_current_algo = NULL; + +YAAMP_ALGO *stratum_find_algo(const char *name) +{ + for(int i=0; g_algos[i].name[0]; i++) + if(!strcmp(name, g_algos[i].name)) + return &g_algos[i]; + + return NULL; +} + +//////////////////////////////////////////////////////////////////////////////////////// + +int main(int argc, char **argv) +{ + if(argc < 2) + { + printf("usage: %s \n", argv[0]); + return 1; + } + + srand(time(NULL)); + getifaddrs(&g_ifaddr); + + initlog(argv[1]); + +#ifdef NO_EXCHANGE + // todo: init with a db setting or a yiimp shell command + g_autoexchange = false; +#endif + + char configfile[1024]; + sprintf(configfile, "%s.conf", argv[1]); + + dictionary *ini = iniparser_load(configfile); + if(!ini) + { + debuglog("cant load config file %s\n", configfile); + return 1; + } + + g_tcp_port = iniparser_getint(ini, "TCP:port", 3333); + strcpy(g_tcp_server, iniparser_getstring(ini, "TCP:server", NULL)); + strcpy(g_tcp_password, iniparser_getstring(ini, "TCP:password", NULL)); + + strcpy(g_sql_host, iniparser_getstring(ini, "SQL:host", NULL)); + strcpy(g_sql_database, iniparser_getstring(ini, "SQL:database", NULL)); + strcpy(g_sql_username, iniparser_getstring(ini, "SQL:username", NULL)); + strcpy(g_sql_password, iniparser_getstring(ini, "SQL:password", NULL)); + g_sql_port = iniparser_getint(ini, "SQL:port", 3306); + + // optional coin filters (to mine only one on a special port or a test instance) + char *coin_filter = iniparser_getstring(ini, "WALLETS:include", NULL); + strcpy(g_stratum_coin_include, coin_filter ? coin_filter : ""); + coin_filter = iniparser_getstring(ini, "WALLETS:exclude", NULL); + strcpy(g_stratum_coin_exclude, coin_filter ? coin_filter : ""); + + strcpy(g_stratum_algo, iniparser_getstring(ini, "STRATUM:algo", NULL)); + g_stratum_difficulty = iniparser_getdouble(ini, "STRATUM:difficulty", 16); + g_stratum_nicehash_difficulty = iniparser_getdouble(ini, "STRATUM:nicehash", 16); + g_stratum_min_diff = iniparser_getdouble(ini, "STRATUM:diff_min", g_stratum_difficulty/2); + g_stratum_max_diff = iniparser_getdouble(ini, "STRATUM:diff_max", g_stratum_difficulty*8192); + g_stratum_nicehash_min_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_min", g_stratum_nicehash_difficulty/2); + g_stratum_nicehash_max_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_max", g_stratum_nicehash_difficulty*8192); + + g_stratum_max_cons = iniparser_getint(ini, "STRATUM:max_cons", 5000); + g_stratum_max_ttf = iniparser_getint(ini, "STRATUM:max_ttf", 0x70000000); + g_stratum_reconnect = iniparser_getint(ini, "STRATUM:reconnect", true); + g_stratum_renting = iniparser_getint(ini, "STRATUM:renting", true); + g_handle_haproxy_ips = iniparser_getint(ini, "STRATUM:haproxy_ips", g_handle_haproxy_ips); + g_socket_recv_timeout = iniparser_getint(ini, "STRATUM:recv_timeout", 600); + + g_max_shares = iniparser_getint(ini, "STRATUM:max_shares", g_max_shares); + g_limit_txs_per_block = iniparser_getint(ini, "STRATUM:max_txs_per_block", 0); + + g_debuglog_client = iniparser_getint(ini, "DEBUGLOG:client", false); + g_debuglog_hash = iniparser_getint(ini, "DEBUGLOG:hash", false); + g_debuglog_socket = iniparser_getint(ini, "DEBUGLOG:socket", false); + g_debuglog_rpc = iniparser_getint(ini, "DEBUGLOG:rpc", false); + g_debuglog_list = iniparser_getint(ini, "DEBUGLOG:list", false); + g_debuglog_remote = iniparser_getint(ini, "DEBUGLOG:remote", false); + + iniparser_freedict(ini); + + g_current_algo = stratum_find_algo(g_stratum_algo); + + if(!g_current_algo) yaamp_error("invalid algo"); + if(!g_current_algo->hash_function) yaamp_error("no hash function"); + +// struct rlimit rlim_files = {0x10000, 0x10000}; +// setrlimit(RLIMIT_NOFILE, &rlim_files); + + struct rlimit rlim_threads = {0x8000, 0x8000}; + setrlimit(RLIMIT_NPROC, &rlim_threads); + + stratumlogdate("starting stratum for %s on %s:%d\n", + g_current_algo->name, g_tcp_server, g_tcp_port); + + // ntime should not be changed by miners for these algos + g_allow_rolltime = strcmp(g_stratum_algo,"x11evo"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"timetravel"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"bitcore"); + g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"exosis"); + if (!g_allow_rolltime) + stratumlog("note: time roll disallowed for %s algo\n", g_current_algo->name); + + g_db = db_connect(); + if(!g_db) yaamp_error("Cant connect database"); + +// db_query(g_db, "update mining set stratumids='loading'"); + + yaamp_create_mutex(&g_db_mutex); + yaamp_create_mutex(&g_nonce1_mutex); + yaamp_create_mutex(&g_job_create_mutex); + + YAAMP_DB *db = db_connect(); + if(!db) yaamp_error("Cant connect database"); + + db_register_stratum(db); + db_update_algos(db); + db_update_coinds(db); + + sleep(2); + job_init(); + +// job_signal(); + + //////////////////////////////////////////////// + + pthread_t thread1; + pthread_create(&thread1, NULL, monitor_thread, NULL); + + pthread_t thread2; + pthread_create(&thread2, NULL, stratum_thread, NULL); + + sleep(20); + + while(!g_exiting) + { + db_register_stratum(db); + db_update_workers(db); + db_update_algos(db); + db_update_coinds(db); + + if(g_stratum_renting) + { + db_update_renters(db); + db_update_remotes(db); + } + + share_write(db); + share_prune(db); + + block_prune(db); + submit_prune(db); + + sleep(1); + job_signal(); + + //////////////////////////////////// + +// source_prune(); + + object_prune(&g_list_coind, coind_delete); + object_prune(&g_list_remote, remote_delete); + object_prune(&g_list_job, job_delete); + object_prune(&g_list_client, client_delete); + object_prune(&g_list_block, block_delete); + object_prune(&g_list_worker, worker_delete); + object_prune(&g_list_share, share_delete); + object_prune(&g_list_submit, submit_delete); + + if (!g_exiting) sleep(20); + } + + stratumlog("closing database...\n"); + db_close(db); + + pthread_join(thread2, NULL); + db_close(g_db); // client threads (called by stratum one) + + closelogs(); + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////// + +void *monitor_thread(void *p) +{ + while(!g_exiting) + { + sleep(120); + + if(g_last_broadcasted + YAAMP_MAXJOBDELAY < time(NULL)) + { + g_exiting = true; + stratumlogdate("%s dead lock, exiting...\n", g_stratum_algo); + exit(1); + } + + if(g_max_shares && g_shares_counter) { + + if((g_shares_counter - g_shares_log) > 10000) { + stratumlogdate("%s %luK shares...\n", g_stratum_algo, (g_shares_counter/1000u)); + g_shares_log = g_shares_counter; + } + + if(g_shares_counter > g_max_shares) { + g_exiting = true; + stratumlogdate("%s need a restart (%lu shares), exiting...\n", g_stratum_algo, (unsigned long) g_max_shares); + exit(1); + } + } + } +} + +/////////////////////////////////////////////////////////////////////////////// + +void *stratum_thread(void *p) +{ + int listen_sock = socket(AF_INET, SOCK_STREAM, 0); + if(listen_sock <= 0) yaamp_error("socket"); + + int optval = 1; + setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval); + + struct sockaddr_in serv; + + serv.sin_family = AF_INET; + serv.sin_addr.s_addr = htonl(INADDR_ANY); + serv.sin_port = htons(g_tcp_port); + + int res = bind(listen_sock, (struct sockaddr*)&serv, sizeof(serv)); + if(res < 0) yaamp_error("bind"); + + res = listen(listen_sock, 4096); + if(res < 0) yaamp_error("listen"); + + ///////////////////////////////////////////////////////////////////////// + + int failcount = 0; + while(!g_exiting) + { + int sock = accept(listen_sock, NULL, NULL); + if(sock <= 0) + { + int error = errno; + stratumlog("%s socket accept() error %d\n", g_stratum_algo, error); + failcount++; + usleep(50000); + if (error == 24 && failcount > 5) { + g_exiting = true; // happen when max open files is reached (see ulimit) + stratumlogdate("%s too much socket failure, exiting...\n", g_stratum_algo); + exit(error); + } + continue; + } + + failcount = 0; + pthread_t thread; + int res = pthread_create(&thread, NULL, client_thread, (void *)(long)sock); + if(res != 0) + { + int error = errno; + close(sock); + g_exiting = true; + stratumlog("%s pthread_create error %d %d\n", g_stratum_algo, res, error); + } + + pthread_detach(thread); + } +} diff --git a/stratum/stratum.h b/stratum/stratum.h index a1fab5627..20aa3693f 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -166,6 +166,8 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/blake2s.h" #include "algos/blakecoin.h" #include "algos/bmw.h" +#include "algos/beenode.h" +#include "algos/bmw512.h" #include "algos/c11.h" #include "algos/dedal.h" #include "algos/deep.h" diff --git a/stratum/stratum.h.bak b/stratum/stratum.h.bak new file mode 100644 index 000000000..a1fab5627 --- /dev/null +++ b/stratum/stratum.h.bak @@ -0,0 +1,237 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; + +#include "iniparser/src/iniparser.h" + +#include "json.h" +#include "util.h" + +#define YAAMP_RESTARTDELAY (24*60*60) +#define YAAMP_MAXJOBDELAY (2*60) +#define CURL_RPC_TIMEOUT (30) + +#define YAAMP_MS 1000 +#define YAAMP_SEC 1000000 + +#define YAAMP_MAXALGOS 32 + +typedef void (*YAAMP_HASH_FUNCTION)(const char *, char *, uint32_t); + +#define YAAMP_SHAREPERSEC 10 + +#define YAAMP_MINDIFF 0x0000000080000000 +#define YAAMP_MAXDIFF 0x4000000000000000 + +#define YAAMP_SMALLBUFSIZE (32*1024) + +#define YAAMP_NONCE_SIZE 4 +#define YAAMP_EXTRANONCE2_SIZE 4 + +#define YAAMP_HASHLEN_STR 65 +#define YAAMP_HASHLEN_BIN 32 + +extern CommonList g_list_coind; +extern CommonList g_list_client; +extern CommonList g_list_job; +extern CommonList g_list_remote; +extern CommonList g_list_renter; +extern CommonList g_list_share; +extern CommonList g_list_worker; +extern CommonList g_list_block; +extern CommonList g_list_submit; +extern CommonList g_list_source; + +extern int g_tcp_port; + +extern char g_tcp_server[1024]; +extern char g_tcp_password[1024]; + +extern char g_sql_host[1024]; +extern char g_sql_database[1024]; +extern char g_sql_username[1024]; +extern char g_sql_password[1024]; +extern int g_sql_port; + +extern char g_stratum_coin_include[256]; +extern char g_stratum_coin_exclude[256]; + +extern char g_stratum_algo[256]; +extern double g_stratum_difficulty; +extern double g_stratum_min_diff; +extern double g_stratum_max_diff; +extern double g_stratum_nicehash_difficulty; +extern double g_stratum_nicehash_min_diff; +extern double g_stratum_nicehash_max_diff; + +extern int g_stratum_max_cons; +extern int g_stratum_max_ttf; +extern bool g_stratum_reconnect; +extern bool g_stratum_renting; +extern bool g_stratum_segwit; +extern int g_limit_txs_per_block; + +extern bool g_handle_haproxy_ips; +extern int g_socket_recv_timeout; + +extern bool g_debuglog_client; +extern bool g_debuglog_hash; +extern bool g_debuglog_socket; +extern bool g_debuglog_rpc; +extern bool g_debuglog_list; +extern bool g_debuglog_remote; + +extern uint64_t g_max_shares; +extern uint64_t g_shares_counter; + +extern bool g_allow_rolltime; +extern time_t g_last_broadcasted; + +extern struct ifaddrs *g_ifaddr; + +extern pthread_mutex_t g_db_mutex; +extern pthread_mutex_t g_nonce1_mutex; +extern pthread_mutex_t g_job_create_mutex; + +extern volatile bool g_exiting; + +#include "db.h" +#include "object.h" +#include "socket.h" +#include "client.h" +#include "rpc.h" +#include "job.h" +#include "coind.h" +#include "remote.h" +#include "share.h" + +extern YAAMP_DB *g_db; +extern YAAMP_ALGO g_algos[]; +extern YAAMP_ALGO *g_current_algo; + +extern bool g_autoexchange; + +///////////////////////////////////////////////////////////////////////////////////////// + +YAAMP_ALGO *stratum_find_algo(const char *name); + +extern "C" +{ +void sha256_hash(const char *input, char *output, unsigned int len); +void sha256_double_hash(const char *input, char *output, unsigned int len); + +void scrypt_1024_1_1_256(const unsigned char *input, unsigned char *output); +void scrypt_N_R_1_256(const char* input, char* output, uint32_t N, uint32_t R, uint32_t len); +} + +void sha256_hash_hex(const char *input, char *output, unsigned int len); +void sha256_double_hash_hex(const char *input, char *output, unsigned int len); + + +#include "algos/a5a.h" +#include "algos/aergo.h" +#include "algos/allium.h" +#include "algos/argon2d.h" +#include "algos/argon2m.h" +#include "algos/balloon.h" +#include "algos/bastion.h" +#include "algos/bcd.h" +#include "algos/binarium_hash_v1.h" +#include "algos/bitcore.h" +#include "algos/blake.h" +#include "algos/blake2b.h" +#include "algos/blake2s.h" +#include "algos/blakecoin.h" +#include "algos/bmw.h" +#include "algos/c11.h" +#include "algos/dedal.h" +#include "algos/deep.h" +#include "algos/exosis.h" +#include "algos/fresh.h" +#include "algos/geek.h" +#include "algos/gltalgos.h" +#include "algos/groestl.h" +#include "algos/hex.h" +#include "algos/hive.h" +#include "algos/hmq17.h" +#include "algos/hsr14.h" +#include "algos/jha.h" +#include "algos/keccak.h" +#include "algos/lbk3.h" +#include "algos/lbry.h" +#include "algos/luffa.h" +#include "algos/lyra2re.h" +#include "algos/lyra2v2.h" +#include "algos/lyra2v3.h" +#include "algos/lyra2vc0ban.h" +#include "algos/lyra2z.h" +#include "algos/lyra2zz.h" +#include "algos/m7m.h" +#include "algos/neoscrypt.h" +#include "algos/nist5.h" +#include "algos/pentablake.h" +#include "algos/phi.h" +#include "algos/phi2.h" +#include "algos/phi1612.h" +#include "algos/pipehash.h" +#include "algos/polytimos.h" +#include "algos/quark.h" +#include "algos/qubit.h" +#include "algos/rainforest.h" +#include "algos/rfv2.h" +#include "algos/sha256q.h" +#include "algos/sha256t.h" +#include "algos/sib.h" +#include "algos/skein.h" +#include "algos/skein2.h" +#include "algos/skunk.h" +#include "algos/sonoa.h" +#include "algos/timetravel.h" +#include "algos/tribus.h" +#include "algos/veltor.h" +#include "algos/velvet.h" +#include "algos/vitalium.h" +#include "algos/whirlpool.h" +#include "algos/whirlpoolx.h" +#include "algos/x11.h" +#include "algos/x11evo.h" +#include "algos/x12.h" +#include "algos/x13.h" +#include "algos/x14.h" +#include "algos/x15.h" +#include "algos/x16r.h" +#include "algos/x16rt.h" +#include "algos/x16s.h" +#include "algos/x17.h" +#include "algos/x18.h" +#include "algos/x20r.h" +#include "algos/x21s.h" +#include "algos/x22i.h" +#include "algos/x25x.h" +#include "algos/xevan.h" +#include "algos/yescrypt.h" +#include "algos/yespower.h" +#include "algos/zr5.h" From 7f5989d98beeeaae49fe3d4635f6449a409d3b12 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 10 Jun 2019 18:51:06 -0400 Subject: [PATCH 481/576] fix error --- stratum/client_submit.cpp | 16 ----- stratum/client_submit.cpp.bak | 113 +++++++++++++++++++--------------- 2 files changed, 63 insertions(+), 66 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 7c1c36149..5eadb47a2 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -400,22 +400,6 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) string_lower(ntime); string_lower(nonce); string_lower(vote); - if (json_params->u.array.length == 6) { - if (strstr(g_stratum_algo, "phi")) { - // lux optional field, smart contral root hashes (not mandatory on shares submit) - strncpy(extra, json_params->u.array.values[5]->u.string.ptr, 128); - string_lower(extra); - } else { - // heavycoin vote - strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); - string_lower(vote); - } - } - - if (g_debuglog_hash) { - debuglog("submit %s (uid %d) %d, %s, t=%s, n=%s, extra=%s\n", client->sock->ip, client->userid, - jobid, extranonce2, ntime, nonce, extra); - } YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); if(!job) diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak index 41951d070..7c1c36149 100644 --- a/stratum/client_submit.cpp.bak +++ b/stratum/client_submit.cpp.bak @@ -31,14 +31,10 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); #endif - if (!strcmp(g_stratum_algo, "lbry")) { + if (!strcmp(g_current_algo->name, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); - } else if (strlen(templ->extradata_be) == 128) { // LUX SC - sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - ntime, templ->nbits, nonce, templ->extradata_be); - ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) + ser_string_be(submitvalues->header, submitvalues->header_be, 32 + 20); } else { sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce); @@ -149,6 +145,11 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL uint64_t coin_target = decode_compact(templ->nbits); if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + // please forgive me for this hack jebus + if (strstr(g_current_algo->name,"balloon") && + (submitvalues->hash_bin[30] | submitvalues->hash_bin[31])) + coin_target = 0x0; + int block_size = YAAMP_SMALLBUFSIZE; vector::const_iterator i; @@ -250,25 +251,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL snprintf(block_hex, block_size, "%s", hex); } - if(g_current_algo->name && !strcmp("ZBIT", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } - if(g_current_algo->name && !strcmp("MLS", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } - bool b = coind_submit(coind, block_hex); if(b) { @@ -372,31 +354,32 @@ static bool ntime_valid_range(const char ntimehex[]) return (abs(rawtime - ntime) < (30 * 60)); } -static bool valid_string_params(json_value *json_params) -{ - for(int p=0; p < json_params->u.array.length; p++) { - if (!json_is_string(json_params->u.array.values[p])) - return false; - } - return true; -} - bool client_submit(YAAMP_CLIENT *client, json_value *json_params) { + bool isBalloon = false; + + if (strstr(g_current_algo->name,"balloon")) + isBalloon = true; + // submit(worker_name, jobid, extranonce2, ntime, nonce): - if(json_params->u.array.length<5 || !valid_string_params(json_params)) { + if(json_params->u.array.length<5) + { debuglog("%s - %s bad message\n", client->username, client->sock->ip); client->submit_bad++; return false; } - char extranonce2[32] = { 0 }; - char extra[160] = { 0 }; - char nonce[80] = { 0 }; - char ntime[32] = { 0 }; - char vote[8] = { 0 }; + char extranonce2[32]; + char ntime[32]; + char nonce[32]; + char vote[8]; + + memset(extranonce2, 0, 32); + memset(ntime, 0, 32); + memset(nonce, 0, 32); + memset(vote, 0, 8); - if (strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { + if (!json_params->u.array.values[1]->u.string.ptr || strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { clientlog(client, "bad json, wrong jobid len"); client->submit_bad++; return false; @@ -406,11 +389,17 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); + if (json_params->u.array.length == 6) + strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); + + if (g_debuglog_hash) { + debuglog("submit %s (uid %d) %d, %s, %s, %s\n", client->sock->ip, client->userid, jobid, extranonce2, ntime, nonce); + } string_lower(extranonce2); string_lower(ntime); string_lower(nonce); - + string_lower(vote); if (json_params->u.array.length == 6) { if (strstr(g_stratum_algo, "phi")) { // lux optional field, smart contral root hashes (not mandatory on shares submit) @@ -454,7 +443,7 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) if(strcmp(ntime, templ->ntime)) { - if (!ishexa(ntime, 8) || !ntime_valid_range(ntime)) { + if (!ntime_valid_range(ntime)) { client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); return true; } @@ -522,27 +511,51 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) // minimum hash diff begins with 0000, for all... uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; + + // except balloon + if(isBalloon) + pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; + if(pfx) { if (g_debuglog_hash) { debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); - } + } client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); return true; } + // bit dim, but so is measuring the diff this way + uint64_t user_target; uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); - uint64_t user_target = diff_to_target(client->difficulty_actual); - uint64_t coin_target = decode_compact(templ->nbits); - if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - if (g_debuglog_hash) { + uint64_t coin_target = decode_compact(templ->nbits); + uint64_t hashcomb = * (uint64_t *) &submitvalues.hash_bin[24]; + + // prevents overflow + if(!isBalloon) { + user_target = diff_to_target(client->difficulty_actual); + } + if(templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + // due to balloon's lower diff + if (g_debuglog_hash && isBalloon) { + debuglog("hash %016lx \n", hashcomb); + debuglog("targ %016lx \n", sharetotarg(client->difficulty_actual)); + } + if (g_debuglog_hash && !isBalloon) { debuglog("%016llx actual\n", hash_int); debuglog("%016llx target\n", user_target); debuglog("%016llx coin\n", coin_target); } - if(hash_int > user_target && hash_int > coin_target) + + // due to balloon's lower diff + if(hashcomb > sharetotarg(client->difficulty_actual) && isBalloon) + { + client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); + return true; + } + if(hash_int > user_target && hash_int > coin_target && !isBalloon) { client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); return true; From 291c003c240dabb9b2bd98bc5f54d5a6bba71c34 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 10 Jun 2019 19:23:54 -0400 Subject: [PATCH 482/576] maybe pretty please stratum fix --- stratum/algos/makefile | 2 +- stratum/algos/makefile.bak | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/stratum/algos/makefile b/stratum/algos/makefile index ef6804a07..e0061eeb2 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -20,7 +20,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ - phi.c phi2.c polytimos.c rainforest.c rfv2.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ + phi.c phi2.c polytimos.c rainforest.c rfv2.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c gltalgos.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index 4c5f30f07..ef6804a07 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -12,10 +12,10 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ - deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c \ + deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ - scrypt.c scryptn.c sha256.c sha256t.c sha256q.c \ + scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ @@ -25,7 +25,8 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ - binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c + binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c \ + beenode.c honeycomb/facet_one.c honeycomb/facet_two.c honeycomb/facet_three.c honeycomb/facet_four.c honeycomb/facet_five.c honeycomb/facet_six.c honeycomb/facets_helper.c \ OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) OUTPUT=libalgos.a From eb5614db7d2a6dfcbeb6515d2b30a06b451492ed Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 10 Jun 2019 19:27:12 -0400 Subject: [PATCH 483/576] for the love of everything holy stratum fix --- stratum/algos/gltalgos.c | 4 +- stratum/algos/gltalgos.c.bak | 470 +++++++++++++++++++++++++++++++++++ stratum/algos/gltalgos.h | 2 +- stratum/algos/gltalgos.h.bak | 20 ++ stratum/algos/makefile | 2 +- stratum/algos/makefile.bak | 2 +- 6 files changed, 495 insertions(+), 5 deletions(-) create mode 100644 stratum/algos/gltalgos.c.bak create mode 100644 stratum/algos/gltalgos.h.bak diff --git a/stratum/algos/gltalgos.c b/stratum/algos/gltalgos.c index dc25f2b3f..955b56d98 100644 --- a/stratum/algos/gltalgos.c +++ b/stratum/algos/gltalgos.c @@ -4,7 +4,7 @@ #include #include -#include "blake2/blake2.h" +#include "blake2-ref/blake2.h" #include "../sha3/sph_blake.h" #include "../sha3/sph_bmw.h" @@ -467,4 +467,4 @@ void globalhash_hash(const char* input, char* output, uint32_t len) blake2s_final( ctx_blake2s, finalhash, BLAKE2S_OUTBYTES ); memcpy(output, finalhash, 32); -} +} \ No newline at end of file diff --git a/stratum/algos/gltalgos.c.bak b/stratum/algos/gltalgos.c.bak new file mode 100644 index 000000000..dc25f2b3f --- /dev/null +++ b/stratum/algos/gltalgos.c.bak @@ -0,0 +1,470 @@ +#include "gltalgos.h" +#include +#include +#include +#include + +#include "blake2/blake2.h" + +#include "../sha3/sph_blake.h" +#include "../sha3/sph_bmw.h" +#include "../sha3/sph_groestl.h" +#include "../sha3/sph_jh.h" +#include "../sha3/sph_keccak.h" +#include "../sha3/sph_skein.h" +#include "../sha3/sph_luffa.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_shavite.h" +#include "../sha3/sph_simd.h" +#include "../sha3/sph_echo.h" +#include "../sha3/sph_hamsi.h" +#include "../sha3/sph_fugue.h" +#include "../sha3/sph_shabal.h" +#include "../sha3/sph_whirlpool.h" +#include "../sha3/sph_sha2.h" +#include "../sha3/sph_haval.h" +#include "../sha3/sph_gost.h" + + +void pawelhash_hash(const char* input, char* output, uint32_t len) +{ + sph_fugue512_context ctx_fugue; + sph_sha512_context ctx_sha2; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa; + sph_whirlpool_context ctx_whirlpool; + sph_shabal512_context ctx_shabal; + sph_echo512_context ctx_echo; + sph_groestl512_context ctx_groestl; + sph_haval256_5_context ctx_haval; + sph_bmw512_context ctx_bmw; + sph_gost512_context ctx_gost; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, input, len); + sph_fugue512_close(&ctx_fugue, hashA); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashB, 64); + sph_skein512_close(&ctx_skein, hashA); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashA, 64); + sph_jh512_close(&ctx_jh, hashB); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, hashB, 64); + sph_keccak512_close(&ctx_keccak, hashA); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hashA, 64); + sph_luffa512_close(&ctx_luffa, hashB); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, hashA, 64); + sph_groestl512_close(&ctx_groestl, hashB); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashB, 64); + sph_haval256_5_close(&ctx_haval, hashA); + + memset(&hashA[8], 0, 32); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, hashA, 64); + sph_fugue512_close(&ctx_fugue, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_gost512_init(&ctx_gost); + sph_gost512(&ctx_gost, hashA, 64); + sph_gost512_close(&ctx_gost, hashB); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashB, 64); + sph_shabal512_close(&ctx_shabal, hashA); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashA, 64); + sph_whirlpool_close(&ctx_whirlpool, hashB); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512 (&ctx_groestl, hashB, 64); + sph_groestl512_close(&ctx_groestl, hashA); + + memcpy(output, hashA, 32); +} + +void jeonghash_hash(const char* input, char* output, uint32_t len) +{ + sph_simd512_context ctx_simd; + sph_hamsi512_context ctx_hamsi; + sph_shabal512_context ctx_shabal; + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_sha512_context ctx_sha2; + sph_whirlpool_context ctx_whirlpool; + sph_skein512_context ctx_skein; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, input, len); + sph_simd512_close(&ctx_simd, hashA); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hashA, 64); + sph_hamsi512_close(&ctx_hamsi, hashB); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashB, 64); + sph_shabal512_close(&ctx_shabal, hashA); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashA, 64); + sph_blake512_close(&ctx_blake, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashA, 64); + sph_skein512_close(&ctx_skein, hashB); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashB, 64); + sph_skein512_close(&ctx_skein, hashA); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashA, 64); + sph_whirlpool_close(&ctx_whirlpool, hashB); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashB, 64); + sph_sha512_close(&ctx_sha2, hashA); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashB, 64); + sph_blake512_close(&ctx_blake, hashA); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hashB, 64); + sph_hamsi512_close(&ctx_hamsi, hashA); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, hashA, 64); + sph_simd512_close(&ctx_simd, hashB); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, hashB, 64); + sph_simd512_close(&ctx_simd, hashA); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hashA, 64); + sph_hamsi512_close(&ctx_hamsi, hashB); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashB, 64); + sph_shabal512_close(&ctx_shabal, hashA); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashA, 64); + sph_blake512_close(&ctx_blake, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashA, 64); + sph_skein512_close(&ctx_skein, hashB); + + memcpy(output, hashB, 32); +} + +void astralhash_hash(const char* input, char* output, uint32_t len) +{ + sph_luffa512_context ctx_luffa; + sph_skein512_context ctx_skein; + sph_echo512_context ctx_echo; + sph_whirlpool_context ctx_whirlpool; + sph_bmw512_context ctx_bmw; + sph_blake512_context ctx_blake; + sph_shavite512_context ctx_shavite; + sph_fugue512_context ctx_fugue; + sph_hamsi512_context ctx_hamsi; + sph_haval256_5_context ctx_haval; + sph_sha512_context ctx_sha2; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, input, len); + sph_luffa512_close(&ctx_luffa, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashA, 64); + sph_skein512_close(&ctx_skein, hashB); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashA, 64); + sph_whirlpool_close(&ctx_whirlpool, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashA, 64); + sph_blake512_close(&ctx_blake, hashB); + + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, hashB, 64); + sph_shavite512_close(&ctx_shavite, hashA); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hashA, 64); + sph_skein512_close(&ctx_skein, hashB); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, hashB, 64); + sph_whirlpool_close(&ctx_whirlpool, hashA); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, hashA, 64); + sph_fugue512_close(&ctx_fugue, hashB); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hashB, 64); + sph_hamsi512_close(&ctx_hamsi, hashA); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashA, 64); + sph_haval256_5_close(&ctx_haval, hashB); + + memset(&hashB[8], 0, 32); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashB, 64); + sph_sha512_close(&ctx_sha2, hashA); + + memcpy(output, hashA, 32); +} + +void padihash_hash(const char* input, char* output, uint32_t len) +{ + sph_sha512_context ctx_sha2; + sph_jh512_context ctx_jh; + sph_luffa512_context ctx_luffa; + sph_echo512_context ctx_echo; + sph_bmw512_context ctx_bmw; + sph_haval256_5_context ctx_haval; + sph_cubehash512_context ctx_cubehash; + sph_shabal512_context ctx_shabal; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16]; + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, input, len); + sph_sha512_close(&ctx_sha2, hashA); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashA, 64); + sph_jh512_close(&ctx_jh, hashB); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hashB, 64); + sph_luffa512_close(&ctx_luffa, hashA); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashA, 64); + sph_echo512_close(&ctx_echo, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashA, 64); + sph_haval256_5_close(&ctx_haval, hashB); + + memset(&hashB[8], 0, 32); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, hashB, 64); + sph_cubehash512_close(&ctx_cubehash, hashA); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashB, 64); + sph_sha512_close(&ctx_sha2, hashA); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashA, 64); + sph_jh512_close(&ctx_jh, hashB); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hashB, 64); + sph_luffa512_close(&ctx_luffa, hashA); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashA, 64); + sph_echo512_close(&ctx_echo, hashB); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashB, 64); + sph_bmw512_close(&ctx_bmw, hashA); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashA, 64); + sph_haval256_5_close(&ctx_haval, hashB); + + memset(&hashB[8], 0, 32); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, hashB, 64); + sph_cubehash512_close(&ctx_cubehash, hashA); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashA, 64); + sph_shabal512_close(&ctx_shabal, hashB); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hashB, 64); + sph_shabal512_close(&ctx_shabal, hashA); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, hashA, 64); + sph_cubehash512_close(&ctx_cubehash, hashB); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval, hashB, 64); + sph_haval256_5_close(&ctx_haval, hashA); + + memset(&hashA[8], 0, 32); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hashB, 64); + sph_echo512_close(&ctx_echo, hashA); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hashA, 64); + sph_luffa512_close(&ctx_luffa, hashB); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashB, 64); + sph_jh512_close(&ctx_jh, hashA); + + sph_sha512_init(&ctx_sha2); + sph_sha512(&ctx_sha2, hashA, 64); + sph_sha512_close(&ctx_sha2, hashB); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hashB, 64); + sph_jh512_close(&ctx_jh, hashA); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hashA, 64); + sph_bmw512_close(&ctx_bmw, hashB); + + memcpy(output, hashB, 32); +} + +void globalhash_hash(const char* input, char* output, uint32_t len) +{ + sph_gost512_context ctx_gost; + sph_blake512_context ctx_blake; + blake2b_state ctx_blake2b[1]; + blake2s_state ctx_blake2s[1]; + + //these uint512 in the c++ source of the client are backed by an array of uint32 + uint32_t hashA[16], hashB[16], finalhash[8]; // finalhash is a 256 unsigned integer + + sph_gost512_init(&ctx_gost); + sph_gost512 (&ctx_gost, input, len); + sph_gost512_close(&ctx_gost, hashA); + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, hashA, 64); + sph_blake512_close(&ctx_blake, hashB); + + blake2b_init( ctx_blake2b, BLAKE2B_OUTBYTES ); + blake2b_update( ctx_blake2b, hashB, 64 ); + blake2b_final( ctx_blake2b, hashA, BLAKE2B_OUTBYTES ); + + blake2s_init( ctx_blake2s, BLAKE2S_OUTBYTES ); + blake2s_update( ctx_blake2s, hashA, 64); + blake2s_final( ctx_blake2s, finalhash, BLAKE2S_OUTBYTES ); + + memcpy(output, finalhash, 32); +} diff --git a/stratum/algos/gltalgos.h b/stratum/algos/gltalgos.h index ff6e3c992..50d78a3f3 100644 --- a/stratum/algos/gltalgos.h +++ b/stratum/algos/gltalgos.h @@ -17,4 +17,4 @@ void globalhash_hash(const char* input, char* output, uint32_t len); } #endif -#endif +#endif \ No newline at end of file diff --git a/stratum/algos/gltalgos.h.bak b/stratum/algos/gltalgos.h.bak new file mode 100644 index 000000000..ff6e3c992 --- /dev/null +++ b/stratum/algos/gltalgos.h.bak @@ -0,0 +1,20 @@ +#ifndef GLTALGOS_H +#define GLTALGOS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void pawelhash_hash(const char* input, char* output, uint32_t len); +void astralhash_hash(const char* input, char* output, uint32_t len); +void jeonghash_hash(const char* input, char* output, uint32_t len); +void padihash_hash(const char* input, char* output, uint32_t len); +void globalhash_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/makefile b/stratum/algos/makefile index e0061eeb2..3f4422bdc 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -11,7 +11,7 @@ LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ - blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ + blake.c blakecoin.c blake2b.c blake2s.c blake2-ref/blake2b.c blake2-ref/blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index ef6804a07..e0061eeb2 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -20,7 +20,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ - phi.c phi2.c polytimos.c rainforest.c rfv2.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c \ + phi.c phi2.c polytimos.c rainforest.c rfv2.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c gltalgos.c \ yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ From 3fb90be088f4a57a7b69aaee99cb080d1e94750d Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 10 Jun 2019 20:35:14 -0400 Subject: [PATCH 484/576] missing frontend files --- web/yaamp/core/functions/yaamp.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 456096e81..6e8e7542a 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -20,6 +20,7 @@ function yaamp_get_algos() 'blake', 'blake2b', 'blake2s', + 'bmw512', 'blakecoin', 'c11', 'decred', @@ -30,6 +31,7 @@ function yaamp_get_algos() 'geek', 'hex', 'hmq1725', + 'honeycomb', 'hsr', 'jha', 'keccak', @@ -143,6 +145,7 @@ function yaamp_get_algo_norm($algo) 'keccak' => 1.0, 'lyra2' => 1.0, 'lyra2v2' => 1.0, + 'lyra2v3' => 1.0, 'myr-gr' => 1.0, 'neoscrypt' => 1.0, 'nist5' => 1.0, @@ -189,6 +192,8 @@ function getAlgoColors($algo) 'blake' => '#f0f0f0', 'blake2b' => '#f2c81f', 'blakecoin' => '#f0f0f0', + 'bmw512' => '#f0f0f0', + 'cuckoo' => '#d0a0a0', 'c11' => '#a0a0d0', 'decred' => '#f0f0f0', 'deep' => '#e0ffff', @@ -198,6 +203,7 @@ function getAlgoColors($algo) 'groestl' => '#d0a0a0', 'hex' => '#c0f0c0', 'hmq1725' => '#ffa0a0', + 'honeycomb' => '#c0f0c0', 'hsr' => '#aa70ff', 'jha' => '#a0d0c0', 'keccak' => '#c0f0c0', @@ -299,6 +305,7 @@ function getAlgoPort($algo) 'blake2b' => 5777, 'blake2s' => 5766, 'blakecoin' => 5743, + 'bmw512' => 5787, 'c11' => 3573, 'decred' => 3252, 'deep' => 3535, @@ -307,6 +314,7 @@ function getAlgoPort($algo) 'geek' => 3692, 'hex' => 5135, 'hmq1725' => 3747, + 'honeycomb' => 7777, 'hsr' => 7433, 'jha' => 4633, 'keccak' => 5133, From a5b37923398f399cebbb1cfc736ef05f6abf3852 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 10 Jun 2019 21:10:21 -0400 Subject: [PATCH 485/576] some required frontend files changed --- web/yaamp/core/backend/coins.php | 15 +- web/yaamp/core/backend/coins.php.bak | 313 +++++++++++++++++++++++++ web/yaamp/core/common/libUtil.php | 2 +- web/yaamp/core/common/libUtil.php.bak | 311 ++++++++++++++++++++++++ web/yaamp/core/functions/yaamp.php.bak | 3 + 5 files changed, 642 insertions(+), 2 deletions(-) create mode 100644 web/yaamp/core/backend/coins.php.bak create mode 100644 web/yaamp/core/common/libUtil.php.bak diff --git a/web/yaamp/core/backend/coins.php b/web/yaamp/core/backend/coins.php index 11126716c..16411eb6b 100644 --- a/web/yaamp/core/backend/coins.php +++ b/web/yaamp/core/backend/coins.php @@ -155,7 +155,20 @@ function BackendCoinsUpdate() $coin->reward = arraySafeVal($template,'coinbasevalue')/100000000 * $coin->reward_mul; $coin->charity_amount = $coin->reward * $coin->charity_percent / 100; } - + + else if($coin->symbol == 'BNODE') + { + if(isset($template['masternode'])) + { + if (arraySafeVal($template,'masternode_payments_started')) + $coin->reward -= arraySafeVal($template['masternode'],'amount',0)/100000000; + } + if(isset($template['evolution'])) + { + $coin->reward -= arraySafeVal($template['evolution'],'amount',10000000)/100000000; + } + } + else if(!empty($coin->charity_address)) { if(!$coin->charity_amount) $coin->reward -= $coin->reward * $coin->charity_percent / 100; diff --git a/web/yaamp/core/backend/coins.php.bak b/web/yaamp/core/backend/coins.php.bak new file mode 100644 index 000000000..11126716c --- /dev/null +++ b/web/yaamp/core/backend/coins.php.bak @@ -0,0 +1,313 @@ +name"); + + $remote = new WalletRPC($coin); + + $info = $remote->getinfo(); + if(!$info && $coin->enable) + { + debuglog("{$coin->symbol} no getinfo answer, retrying..."); + sleep(3); + $info = $remote->getinfo(); + if (!$info) { + debuglog("{$coin->symbol} disabled, no answer after 2 attempts. {$remote->error}"); + $coin->enable = false; + $coin->connections = 0; + $coin->save(); + continue; + } + } + + // auto-enable if auto_ready is set + if($coin->auto_ready && !empty($info)) + $coin->enable = true; + else if (empty($info)) + continue; + + if ($debug) echo "{$coin->symbol}\n"; + + if(isset($info['difficulty'])) + $difficulty = $info['difficulty']; + else + $difficulty = $remote->getdifficulty(); + + if(is_array($difficulty)) { + $coin->difficulty = arraySafeVal($difficulty,'proof-of-work'); + $coin->difficulty_pos = arraySafeVal($difficulty,'proof-of-stake'); + } + else + $coin->difficulty = $difficulty; + + if($coin->algo == 'quark') + $coin->difficulty /= 0x100; + + if($coin->difficulty == 0) + $coin->difficulty = 1; + + $coin->errors = isset($info['errors'])? $info['errors']: ''; + $coin->txfee = isset($info['paytxfee'])? $info['paytxfee']: ''; + $coin->connections = isset($info['connections'])? $info['connections']: ''; + $coin->multialgos = (int) isset($info['pow_algo_id']); + $coin->balance = isset($info['balance'])? $info['balance']: 0; + $coin->stake = isset($info['stake'])? $info['stake'] : $coin->stake; + $coin->mint = dboscalar("select sum(amount) from blocks where coin_id=$coin->id and category='immature'"); + + if(empty($coin->master_wallet)) + { + if ($coin->rpcencoding == 'DCR' && empty($coin->account)) $coin->account = 'default'; + $coin->master_wallet = $remote->getaccountaddress($coin->account); + } + + if(empty($coin->rpcencoding)) + { + $difficulty = $remote->getdifficulty(); + if(is_array($difficulty)) + $coin->rpcencoding = 'POS'; + else if ($coin->symbol == 'DCR') + $coin->rpcencoding = 'DCR'; + else if ($coin->symbol == 'ETH') + $coin->rpcencoding = 'GETH'; + else if ($coin->symbol == 'NIRO') + $coin->rpcencoding = 'NIRO'; + else + $coin->rpcencoding = 'POW'; + } + + if($coin->hassubmitblock == NULL) + { + $remote->submitblock(''); + if(strcasecmp($remote->error, 'method not found') == 0) + $coin->hassubmitblock = false; + else + $coin->hassubmitblock = true; + } + + if($coin->auxpow == NULL) + { + $ret = $remote->getauxblock(); + + if(strcasecmp($remote->error, 'method not found') == 0) + $coin->auxpow = false; + else + $coin->auxpow = true; + } + +// if($coin->symbol != 'BTC') +// { +// if($coin->symbol == 'PPC') +// $template = $remote->getblocktemplate(''); +// else + $template = $remote->getblocktemplate('{}'); + + if($template && isset($template['coinbasevalue'])) + { + $coin->reward = $template['coinbasevalue']/100000000*$coin->reward_mul; + + if($coin->symbol == 'TAC' && isset($template['_V2'])) + $coin->charity_amount = $template['_V2']/100000000; + + if(isset($template['payee_amount']) && $coin->symbol != 'LIMX') { + $coin->charity_amount = doubleval($template['payee_amount'])/100000000; + $coin->reward -= $coin->charity_amount; + } + + else if(isset($template['masternode']) && arraySafeVal($template,'masternode_payments_enforced')) { + if (arraySafeVal($template,'masternode_payments_started')) + $coin->reward -= arraySafeVal($template['masternode'],'amount',0)/100000000; + $coin->hasmasternodes = true; + } + + else if($coin->symbol == 'XZC') { + // coinbasevalue here is the amount available for miners, not the full block amount + $coin->reward = arraySafeVal($template,'coinbasevalue')/100000000 * $coin->reward_mul; + $coin->charity_amount = $coin->reward * $coin->charity_percent / 100; + } + + else if(!empty($coin->charity_address)) { + if(!$coin->charity_amount) + $coin->reward -= $coin->reward * $coin->charity_percent / 100; + } + + if(isset($template['bits'])) + { + $target = decode_compact($template['bits']); + $coin->difficulty = target_to_diff($target); + } + } + + else if ($coin->rpcencoding == 'GETH' || $coin->rpcencoding == 'NIRO') + { + $coin->auto_ready = ($coin->connections > 0); + } + + else if(strcasecmp($remote->error, 'method not found') == 0) + { + $template = $remote->getmemorypool(); + if($template && isset($template['coinbasevalue'])) + { + $coin->usememorypool = true; + $coin->reward = $template['coinbasevalue']/100000000*$coin->reward_mul; + + if(isset($template['bits'])) + { + $target = decode_compact($template['bits']); + $coin->difficulty = target_to_diff($target); + } + } else { + $coin->auto_ready = false; + $coin->errors = $remote->error; + } + } + + else if ($coin->symbol == 'ZEC' || $coin->rpcencoding == 'ZEC') + { + if($template && isset($template['coinbasetxn'])) + { + // no coinbasevalue in ZEC blocktemplate :/ + $txn = $template['coinbasetxn']; + $coin->charity_amount = arraySafeVal($txn,'foundersreward',0)/100000000; + $coin->reward = $coin->charity_amount * 4 + arraySafeVal($txn,'fee',0)/100000000; + // getmininginfo show current diff, getinfo the last block one + $mininginfo = $remote->getmininginfo(); + $coin->difficulty = ArraySafeVal($mininginfo,'difficulty',$coin->difficulty); + //$target = decode_compact($template['bits']); + //$diff = target_to_diff($target); // seems not standard 0.358557563 vs 187989.937 in getmininginfo + //target 00000002c0930000000000000000000000000000000000000000000000000000 => 0.358557563 (bits 1d02c093) + //$diff = hash_to_difficulty($coin, $template['target']); + //debuglog("ZEC target {$template['bits']} -> $diff"); + } else { + $coin->auto_ready = false; + $coin->errors = $remote->error; + } + } + + else if ($coin->rpcencoding == 'DCR') + { + $wi = $remote->walletinfo(); + $coin->auto_ready = ($coin->connections > 0 && arraySafeVal($wi,"daemonconnected")); + if ($coin->auto_ready && arraySafeVal($wi,"unlocked",false) == false) { + debuglog($coin->symbol." wallet is not unlocked!"); + } + } + + else + { + $coin->auto_ready = false; + $coin->errors = $remote->error; + } + + if(strcasecmp($coin->errors, 'No more PoW blocks') == 0) + { + $coin->dontsell = true; + $coin->auto_ready = false; + } +// } + + if($coin->block_height != $info['blocks']) + { + $count = $info['blocks'] - $coin->block_height; + $ttf = $count > 0 ? (time() - $coin->last_network_found) / $count : 0; + + if(empty($coin->actual_ttf)) $coin->actual_ttf = $ttf; + + $coin->actual_ttf = percent_feedback($coin->actual_ttf, $ttf, 5); + $coin->last_network_found = time(); + } + + $coin->version = substr($info['version'], 0, 32); + $coin->block_height = $info['blocks']; + + if($coin->powend_height > 0 && $coin->block_height > $coin->powend_height) { + if ($coin->auto_ready) { + $coin->auto_ready = false; + $coin->errors = 'PoW end reached'; + } + } + + $coin->save(); + + if ($coin->available < 0 || $coin->cleared > $coin->balance) { + // can happen after a payout (waiting first confirmation) + BackendUpdatePoolBalances($coin->id); + } + // debuglog(" end $coin->name"); + + } + + $coins = getdbolist('db_coins', "enable order by auxpow desc"); + foreach($coins as $coin) + { + $coin = getdbo('db_coins', $coin->id); + if(!$coin) continue; + + if($coin->difficulty) + { + $coin->index_avg = $coin->reward * $coin->price * 10000 / $coin->difficulty; + if(!$coin->auxpow && $coin->rpcencoding == 'POW') + { + $indexaux = dboscalar("SELECT SUM(index_avg) FROM coins WHERE enable AND visible AND auto_ready AND auxpow AND algo='{$coin->algo}'"); + $coin->index_avg += $indexaux; + } + } + + if($coin->network_hash) { + $coin->network_ttf = intval($coin->difficulty * 0x100000000 / $coin->network_hash); + if($coin->network_ttf > 2147483647) $coin->network_ttf = 2147483647; + } + + if(isset($pool_rate[$coin->algo])) + $coin->pool_ttf = intval($coin->difficulty * 0x100000000 / $pool_rate[$coin->algo]); + if($coin->pool_ttf > 2147483647) $coin->pool_ttf = 2147483647; + + if(strstr($coin->image, 'http')) + { + $data = file_get_contents($coin->image); + $coin->image = "/images/coin-$coin->id.png"; + + @unlink(YAAMP_HTDOCS.$coin->image); + file_put_contents(YAAMP_HTDOCS.$coin->image, $data); + } + + $coin->save(); + } + + $d1 = microtime(true) - $t1; + controller()->memcache->add_monitoring_function(__METHOD__, $d1); +} + + + + diff --git a/web/yaamp/core/common/libUtil.php b/web/yaamp/core/common/libUtil.php index bf3b051c3..126c516fc 100644 --- a/web/yaamp/core/common/libUtil.php +++ b/web/yaamp/core/common/libUtil.php @@ -41,7 +41,7 @@ function getuserparam($address) { if(empty($address)) return null; - $address = trim(substr($address, 0, 35)); + $address = trim(substr($address, 0, 52)); $user = getdbosql('db_accounts', "username=:ad", array(':ad'=>$address)); return $user; diff --git a/web/yaamp/core/common/libUtil.php.bak b/web/yaamp/core/common/libUtil.php.bak new file mode 100644 index 000000000..bf3b051c3 --- /dev/null +++ b/web/yaamp/core/common/libUtil.php.bak @@ -0,0 +1,311 @@ += 1) $text = $text.' ====================='; + error_log("$t, $d - $text"); + + $global_lastlog = $t; +} + +// + +function LimitRequest($name, $limit=1) +{ + $t = controller()->memcache->get("yaamp-timestamp-$name-{$_SERVER['REMOTE_ADDR']}"); + $a = controller()->memcache->get("yaamp-average-$name-{$_SERVER['REMOTE_ADDR']}"); + + if(!$a || !$t) $a = $limit; + + else + { + $p = 33; + $a = ($a * (100-$p) + (microtime(true)-$t) * $p) / 100; + } + + if($a < $limit) return false; + + controller()->memcache->set("yaamp-timestamp-$name-{$_SERVER['REMOTE_ADDR']}", microtime(true), 300); + controller()->memcache->set("yaamp-average-$name-{$_SERVER['REMOTE_ADDR']}", $a, 300); + + return true; +} + +function getuserparam($address) +{ + if(empty($address)) return null; + + $address = trim(substr($address, 0, 35)); + $user = getdbosql('db_accounts', "username=:ad", array(':ad'=>$address)); + + return $user; +} + +function getrenterparam($address) +{ + if(empty($address)) return null; + + $address = trim(substr($address, 0, 35)); + $renter = getdbosql('db_renters', "address=:ad", array(':ad'=>$address)); + + return $renter; +} + +/////////////////////////////////////////////////////////// + +function GetSSModulePath($name) +{ + $result = findfile('yaamp/models', "/\/{$name}.php/"); + if(!$result) + $result = findfile('yaamp/modules', "/\/{$name}.php/"); + +// debuglog($result); + return $result; +} + +function findfile($path, $pattern) +{ + $result = null; + + $path = rtrim(str_replace("\\", "/", $path), '/') . '/*'; + foreach(glob($path) as $fullname) + { + if(is_dir($fullname)) + { + $result = findfile($fullname, $pattern); + if($result) break; + } + + else if(preg_match($pattern, $fullname)) + { + $result = $fullname; + break; + } + } + + return $result; +} + +function mydump($obj, $level=2) +{ + CVarDumper::dump($obj, $level, true); + echo "
    "; +} + +function mydumperror($obj, $level=2) +{ + CVarDumper::dumperror($obj, $level); +} + +function debuglog($string, $level=2) +{ + if(is_object($string)) + { + mydumperror($string, $level); + return; + } + + if(is_array($string)) + { + mydumperror($string, $level); + return; + } + + $now = now(); + if(!is_dir(YAAMP_LOGS)) mkdir(YAAMP_LOGS); + error_log("[$now] $string\n", 3, YAAMP_LOGS."/debug.log"); +} + +function echolog($string, $level=2) +{ + $now = now(); + echo "[$now] $string\n"; +} + +function rentallog($string) +{ + $now = now(); + if(!is_dir(YAAMP_LOGS)) mkdir(YAAMP_LOGS); + error_log("[$now] $string\n", 3, YAAMP_LOGS."/rental.log"); + + debuglog($string); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +function xmltoarray($xmlcontent) +{ + $xml = simplexml_load_string($xmlcontent); + $json = json_encode($xml); + $array = json_decode($json, true); + + return $array; +} + +function XssFilter($data) +{ + $data = str_replace(">", "", $data); + $data = str_replace("<", "", $data); + $data = str_replace("'", "", $data); + $data = str_replace('"', "", $data); +// $data = str_replace(".", "", $data); + $data = str_replace("\\", "", $data); + $data = str_replace("&", "", $data); + $data = str_replace(";", "", $data); + +// mydump($data); die; + return $data; +} + +function showDatetimePicker($model, $attribute, $options='') +{ + $name = "{$model->tableSchema->name}[{$attribute}]"; + $id = "{$model->tableSchema->name}_{$attribute}"; + + echo ""; + + echo ""; +} + +function showDatetimePicker2($name, $value, $options='', $callback='null') +{ + $id = $name; + echo ""; + + if(empty($value)) $value = $name; + echo ""; +} + +function showSubmitButton($name) +{ + echo "
    "; + echo CUFHtml::submitButton($name, array('id'=>'btnSubmit')); + echo "
    "; + echo ""; +} + +function InitMenuTabs($tabname) +{ + JavascriptReady("$('$tabname').tabs({ select: function(event, ui){ + window.location.replace(ui.tab.hash); return true;}});"); +} + +function fetch_url($url) +{ +// debuglog("fetch_url($url)"); + $buffer = ''; + + $file = @fopen($url, "r"); + if(!$file) return null; + + while(!feof($file)) + { + $line = fgets($file, 1024); + $buffer .= $line; + } + + fclose($file); + return $buffer; +} + +function gettempfile($ext) +{ + $phpsessid = session_id(); + $random = mt_rand(); + + $filename = SANSSPACE_TEMP."\\{$phpsessid}-{$random}{$ext}"; + return $filename; +} + +function make_bitly_url($url, $format = 'xml', $version = '2.0.1') +{ + $login = 'o_1uu6u4g2h4'; + $appkey = 'R_433ebafeb24374d6c183c0fcbcc01575'; + + $bitly = 'http://api.bit.ly/shorten?version='.$version.'&longUrl='.urlencode($url).'&login='.$login.'&apiKey='.$appkey.'&format='.$format; + $response = file_get_contents($bitly); +// debuglog($response); + + if(strtolower($format) == 'json') + { + $json = @json_decode($response,true); + return $json['results'][$url]['shortUrl']; + } + else //xml + { + $xml = simplexml_load_string($response); + return 'bit.ly/'.$xml->results->nodeKeyVal->hash; + } +} + +function resolveShortURL($url1) +{ + $ch = curl_init("$url1"); + + curl_setopt($ch, CURLOPT_HEADER, true); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_ENCODING , "deflate,gzip"); + + $http_data = curl_exec($ch); + $curl_info = curl_getinfo($ch); + $headers = substr($http_data, 0, $curl_info["header_size"]); + + preg_match("!\r\n(?:Location|URI): *(.*?) *\r\n!", $headers, $matches); + $url = $matches[1]; + +// debuglog(" short $url1 -> $url"); + return empty($url)? $url1: $url; +} + +function is_short_url($url) +{ + // 1. Overall URL length - May be a max of 30 charecters + if (strlen($url) > 30) return false; + + $parts = parse_url($url); + + // No query string & no fragment + if ($parts["query"] || $parts["fragment"]) return false; + + $path = $parts["path"]; + $pathParts = explode("/", $path); + + // 3. Number of '/' after protocol (http://) - Max 2 + if (count($pathParts) > 2) return false; + + // 2. URL length after last '/' - May be a max of 10 characters + $lastPath = array_pop($pathParts); + if (strlen($lastPath) > 12) return false; + + // 4. Max length of host + if (strlen($parts["host"]) > 10) return false; + + return true; +} diff --git a/web/yaamp/core/functions/yaamp.php.bak b/web/yaamp/core/functions/yaamp.php.bak index 80a97c74c..456096e81 100644 --- a/web/yaamp/core/functions/yaamp.php.bak +++ b/web/yaamp/core/functions/yaamp.php.bak @@ -88,6 +88,7 @@ function yaamp_get_algos() 'x20r', 'x21s', 'x22i', + 'x25x', 'xevan', 'yescrypt', 'yescryptR8', @@ -255,6 +256,7 @@ function getAlgoColors($algo) 'x20r' => '#f0b0a0', 'x21s' => '#f0b0a0', 'x22i' => '#f0a090', + 'x25x' => '#f0a090', 'xevan' => '#f0b0a0', 'yescrypt' => '#e0d0e0', 'yescryptR8' => '#e0d0e0', @@ -364,6 +366,7 @@ function getAlgoPort($algo) 'x20r' => 4300, 'x21s' => 3224, 'x22i' => 3223, + 'x25x' => 5633, 'xevan' => 3739, 'yescrypt' => 6233, 'yescryptR8' => 6353, From 479ba0083d5c6939ba558571d4a2b058d23a554f Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 11 Jun 2019 20:09:17 -0400 Subject: [PATCH 486/576] Update ApiController.php --- web/yaamp/modules/api/ApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/api/ApiController.php b/web/yaamp/modules/api/ApiController.php index 2c5436627..54da82e4f 100644 --- a/web/yaamp/modules/api/ApiController.php +++ b/web/yaamp/modules/api/ApiController.php @@ -172,7 +172,7 @@ public function actionCurrencies() 'name' => $coin->name, 'reward' => $coin->reward, 'height' => (int) $coin->block_height, - 'difficulty' => $difficulty, + 'difficulty' => $coin->difficulty, 'workers' => $workers, 'shares' => (int) arraySafeVal($shares,'shares'), 'hashrate' => round($factor * $algo_hashrate), From 75154b1d4cc6c27c9e0ede27232e0964ace2b3b0 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sun, 16 Jun 2019 14:31:28 -0400 Subject: [PATCH 487/576] lux fix? --- stratum/client_submit.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 5eadb47a2..b340172cf 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -31,10 +31,14 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); #endif - if (!strcmp(g_current_algo->name, "lbry")) { + if (!strcmp(g_stratum_algo, "lbry")) { sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, templ->claim_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 32 + 20); + ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); + } else if (strlen(templ->extradata_be) == 128) { // LUX SC + sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce, templ->extradata_be); + ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) } else { sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce); @@ -400,6 +404,23 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) string_lower(ntime); string_lower(nonce); string_lower(vote); + + if (json_params->u.array.length == 6) { + if (strstr(g_stratum_algo, "phi")) { + // lux optional field, smart contral root hashes (not mandatory on shares submit) + strncpy(extra, json_params->u.array.values[5]->u.string.ptr, 128); + string_lower(extra); + } else { + // heavycoin vote + strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); + string_lower(vote); + } + } + + if (g_debuglog_hash) { + debuglog("submit %s (uid %d) %d, %s, t=%s, n=%s, extra=%s\n", client->sock->ip, client->userid, + jobid, extranonce2, ntime, nonce, extra); + } YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); if(!job) From 8bffec4271c478a146d4e47a3336af54fb6531cd Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sun, 16 Jun 2019 14:35:40 -0400 Subject: [PATCH 488/576] lux fix 2 --- stratum/client_submit.cpp | 89 ++++++++++++--------------------------- 1 file changed, 26 insertions(+), 63 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index b340172cf..55385e982 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -149,11 +149,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL uint64_t coin_target = decode_compact(templ->nbits); if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - // please forgive me for this hack jebus - if (strstr(g_current_algo->name,"balloon") && - (submitvalues->hash_bin[30] | submitvalues->hash_bin[31])) - coin_target = 0x0; - int block_size = YAAMP_SMALLBUFSIZE; vector::const_iterator i; @@ -358,32 +353,31 @@ static bool ntime_valid_range(const char ntimehex[]) return (abs(rawtime - ntime) < (30 * 60)); } -bool client_submit(YAAMP_CLIENT *client, json_value *json_params) +static bool valid_string_params(json_value *json_params) { - bool isBalloon = false; - - if (strstr(g_current_algo->name,"balloon")) - isBalloon = true; + for(int p=0; p < json_params->u.array.length; p++) { + if (!json_is_string(json_params->u.array.values[p])) + return false; + } + return true; +} +bool client_submit(YAAMP_CLIENT *client, json_value *json_params) +{ // submit(worker_name, jobid, extranonce2, ntime, nonce): - if(json_params->u.array.length<5) - { + if(json_params->u.array.length<5 || !valid_string_params(json_params)) { debuglog("%s - %s bad message\n", client->username, client->sock->ip); client->submit_bad++; return false; } - char extranonce2[32]; - char ntime[32]; - char nonce[32]; - char vote[8]; + char extranonce2[32] = { 0 }; + char extra[160] = { 0 }; + char nonce[80] = { 0 }; + char ntime[32] = { 0 }; + char vote[8] = { 0 }; - memset(extranonce2, 0, 32); - memset(ntime, 0, 32); - memset(nonce, 0, 32); - memset(vote, 0, 8); - - if (!json_params->u.array.values[1]->u.string.ptr || strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { + if (strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { clientlog(client, "bad json, wrong jobid len"); client->submit_bad++; return false; @@ -393,18 +387,11 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); - if (json_params->u.array.length == 6) - strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); - - if (g_debuglog_hash) { - debuglog("submit %s (uid %d) %d, %s, %s, %s\n", client->sock->ip, client->userid, jobid, extranonce2, ntime, nonce); - } string_lower(extranonce2); string_lower(ntime); string_lower(nonce); - string_lower(vote); - + if (json_params->u.array.length == 6) { if (strstr(g_stratum_algo, "phi")) { // lux optional field, smart contral root hashes (not mandatory on shares submit) @@ -448,7 +435,7 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) if(strcmp(ntime, templ->ntime)) { - if (!ntime_valid_range(ntime)) { + if (!ishexa(ntime, 8) || !ntime_valid_range(ntime)) { client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); return true; } @@ -516,51 +503,27 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) // minimum hash diff begins with 0000, for all... uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; - - // except balloon - if(isBalloon) - pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; - if(pfx) { if (g_debuglog_hash) { debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); - } + } client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); return true; } - // bit dim, but so is measuring the diff this way - uint64_t user_target; uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); - uint64_t coin_target = decode_compact(templ->nbits); - uint64_t hashcomb = * (uint64_t *) &submitvalues.hash_bin[24]; - - // prevents overflow - if(!isBalloon) { - user_target = diff_to_target(client->difficulty_actual); - } - if(templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - // due to balloon's lower diff - if (g_debuglog_hash && isBalloon) { - debuglog("hash %016lx \n", hashcomb); - debuglog("targ %016lx \n", sharetotarg(client->difficulty_actual)); - } - if (g_debuglog_hash && !isBalloon) { + uint64_t user_target = diff_to_target(client->difficulty_actual); + uint64_t coin_target = decode_compact(templ->nbits); + if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + if (g_debuglog_hash) { debuglog("%016llx actual\n", hash_int); debuglog("%016llx target\n", user_target); debuglog("%016llx coin\n", coin_target); } - - // due to balloon's lower diff - if(hashcomb > sharetotarg(client->difficulty_actual) && isBalloon) - { - client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); - return true; - } - if(hash_int > user_target && hash_int > coin_target && !isBalloon) + if(hash_int > user_target && hash_int > coin_target) { client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); return true; @@ -596,4 +559,4 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) object_unlock(job); return true; -} +} \ No newline at end of file From 9277ae49497313e8872b1c50d8745e84f7c635ef Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 19 Jun 2019 00:16:40 -0400 Subject: [PATCH 489/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 49 ++++++++++++++++------------ 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index c17e064bc..6df4ec662 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -32,13 +32,13 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'name'); echo CUFHtml::activeLabelEx($coin, 'name'); echo CUFHtml::activeTextField($coin, 'name', array('maxlength'=>200)); -echo '

    '; +echo '

    Required

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'symbol'); echo CUFHtml::activeLabelEx($coin, 'symbol'); echo CUFHtml::activeTextField($coin, 'symbol', array('maxlength'=>200,'style'=>'width: 120px;')); -echo '

    '; +echo '

    Required all upper case

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'symbol2'); @@ -50,7 +50,7 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'algo'); echo CUFHtml::activeLabelEx($coin, 'algo'); echo CUFHtml::activeTextField($coin, 'algo', array('maxlength'=>64,'style'=>'width: 120px;')); -echo '

    Mining algorithm

    '; +echo '

    Required all lower case

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'image'); @@ -121,7 +121,7 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'enable'); echo CUFHtml::activeLabelEx($coin, 'enable'); echo CUFHtml::activeCheckBox($coin, 'enable'); -echo '

    '; +echo '

    Required

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'auto_ready'); @@ -275,14 +275,14 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'program'); echo CUFHtml::activeLabelEx($coin, 'program'); echo CUFHtml::activeTextField($coin, 'program', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    Daemon process name

    '; +echo '

    Daemon Name - I.e. bitcoind

    '; echo CUFHtml::closeCtrlHolder(); if(empty($coin->program)){ echo CUFHtml::openActiveCtrlHolder($coin, 'conf_folder'); echo CUFHtml::activeLabelEx($coin, 'conf_folder'); echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>228,'readonly'=>'readonly')); -echo '

    Field will update on process name save

    '; +echo '

    Field will automatically update on save.

    '; echo CUFHtml::closeCtrlHolder();} else @@ -292,13 +292,13 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'conf_folder'); echo CUFHtml::activeLabelEx($coin, 'conf_folder'); echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>228,'readonly'=>'readonly')); -echo '

    Field will update on process name save

    '; +echo '

    Field will automatically update on save.

    '; echo CUFHtml::closeCtrlHolder();} echo CUFHtml::openActiveCtrlHolder($coin, 'rpchost'); echo CUFHtml::activeLabelEx($coin, 'rpchost'); echo CUFHtml::activeTextField($coin, 'rpchost', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    Daemon (Wallet) IP

    '; +echo '

    I.e. 127.0.0.1 or Internal IP

    '; echo CUFHtml::closeCtrlHolder(); if(empty($coin->rpcport)) @@ -307,7 +307,7 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'rpcport'); echo CUFHtml::activeLabelEx($coin, 'rpcport'); echo CUFHtml::activeTextField($coin, 'rpcport', array('maxlength'=>5,'style'=>'width: 60px;')); -echo '

    '; +echo '

    AutoGenerated

    '; echo CUFHtml::closeCtrlHolder(); if(empty($coin->rpcuser)) @@ -316,7 +316,7 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'rpcuser'); echo CUFHtml::activeLabelEx($coin, 'rpcuser'); echo CUFHtml::activeTextField($coin, 'rpcuser', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    '; +echo '

    AutoGenerated

    '; echo CUFHtml::closeCtrlHolder(); // generate a random password @@ -326,13 +326,13 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'rpcpasswd'); echo CUFHtml::activeLabelEx($coin, 'rpcpasswd'); echo CUFHtml::activeTextField($coin, 'rpcpasswd', array('maxlength'=>128)); -echo '

    '; +echo '

    AutoGenerated

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'serveruser'); echo CUFHtml::activeLabelEx($coin, 'serveruser'); echo CUFHtml::activeTextField($coin, 'serveruser', array('maxlength'=>35,'style'=>'width: 180px;')); -echo '

    Daemon process username

    '; +echo '

    Leave Blank

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'rpcencoding'); @@ -344,7 +344,7 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'dedicatedport'); echo CUFHtml::activeLabelEx($coin, 'dedicatedport'); echo CUFHtml::activeTextField($coin, 'dedicatedport', array('maxlength'=>5,'style'=>'width: 60px;')); -echo '

    For Coins on Dedicated Ports

    '; +echo '

    Run addport to get Port Number

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'rpccurl'); @@ -368,7 +368,7 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'account'); echo CUFHtml::activeLabelEx($coin, 'account'); echo CUFHtml::activeTextField($coin, 'account', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    Wallet account to use

    '; +echo '

    Leave Blank

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'specifications'); @@ -385,7 +385,7 @@ else { $program = substr($coin->program, 0, -1); echo CHtml::tag("hr"); - echo "Autogenerated config:\n"; + echo "Autogenerated config - if using daemonbuilder copy from rpcuser through blocknotify line:\n"; echo CHtml::opentag("pre"); echo "mkdir -p {$coin->conf_folder}\n"; $port = getAlgoPort($coin->algo); @@ -409,13 +409,16 @@ echo "\n"; } echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; - echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n"; + if (empty($coin->dedicatedport)) { + echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n";} + else { + echo "blocknotify=blocknotify 127.0.0.1:$dedport {$coin->id} %s\n";} echo " \n"; echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; echo CHtml::closetag("pre"); echo CHtml::tag("hr"); - echo "Add coin to system startup:"; + echo "Add coind to system startup:"; echo CHtml::opentag("pre"); echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; echo "\n"; @@ -423,12 +426,18 @@ echo CHtml::closetag("pre"); echo CHtml::tag("hr"); - echo "Helpful Daemon Commands:"; + echo "Example Daemon Commands:"; + echo "You MUST use this format or coins will not work!:"; echo CHtml::opentag("pre"); + echo "To START a coind:"; echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n"; + echo "To STOP a coind:"; echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; - echo "Or if your coin has a cli file...\n"; + echo "Or if your coin has a -cli (bitcoin-cli) file...\n"; echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; + echo "To run other CLI functions:"; + echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n"; + echo "To edit the coin.config file:"; echo "sudo nano {$coin->conf_folder}/$program.conf\n"; echo CHtml::closetag("pre"); @@ -439,7 +448,7 @@ if (empty($coin->dedicatedport)) { echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' ';} else{ - echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$dedport.' ';} + echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$dedport.' ';} echo "-u {$coin->master_wallet} "; echo "-p c={$coin->symbol} "; echo "\n"; From c4c405ddc92a0c53b0d765c3d03cd53dd9be0c32 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 19 Jun 2019 01:11:55 -0400 Subject: [PATCH 490/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index 6df4ec662..ec2022a81 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -426,17 +426,17 @@ echo CHtml::closetag("pre"); echo CHtml::tag("hr"); - echo "Example Daemon Commands:"; + echo "Daemon Commands:"; echo "You MUST use this format or coins will not work!:"; echo CHtml::opentag("pre"); - echo "To START a coind:"; - echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n"; - echo "To STOP a coind:"; - echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; + echo "To START a coind:\n"; + echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n\n"; + echo "To STOP a coind:\n"; + echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; echo "Or if your coin has a -cli (bitcoin-cli) file...\n"; - echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n"; - echo "To run other CLI functions:"; - echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n"; + echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; + echo "To run other CLI functions:\n"; + echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n\n"; echo "To edit the coin.config file:"; echo "sudo nano {$coin->conf_folder}/$program.conf\n"; echo CHtml::closetag("pre"); From caac5f15a5b7d5c276fdf61720adc4100cd71438 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 19 Jun 2019 01:59:29 -0400 Subject: [PATCH 491/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index ec2022a81..de589db71 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -298,7 +298,7 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'rpchost'); echo CUFHtml::activeLabelEx($coin, 'rpchost'); echo CUFHtml::activeTextField($coin, 'rpchost', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    I.e. 127.0.0.1 or Internal IP

    '; +echo '

    I.e. 127.0.0.1 WireGuard use 10.0.0.x or Internal IP from host

    '; echo CUFHtml::closeCtrlHolder(); if(empty($coin->rpcport)) From 08333746dd43fa0f4a9bb15bf86904c94a4f5680 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 19 Jun 2019 02:22:09 -0400 Subject: [PATCH 492/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index de589db71..d98feaa9d 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -437,7 +437,7 @@ echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; echo "To run other CLI functions:\n"; echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n\n"; - echo "To edit the coin.config file:"; + echo "To edit the coin.config file:\n"; echo "sudo nano {$coin->conf_folder}/$program.conf\n"; echo CHtml::closetag("pre"); From bdb009bce43a29d623be7c0eab56c963203fefff Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 19 Jun 2019 02:24:45 -0400 Subject: [PATCH 493/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index d98feaa9d..8eedbf6e0 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -385,7 +385,8 @@ else { $program = substr($coin->program, 0, -1); echo CHtml::tag("hr"); - echo "Autogenerated config - if using daemonbuilder copy from rpcuser through blocknotify line:\n"; + echo "Autogenerated config - if using daemonbuilder copy from rpcuser through blocknotify line\n"; + echo "If you manually built a coin without daemonbuilder, copy this entire section:\n"; echo CHtml::opentag("pre"); echo "mkdir -p {$coin->conf_folder}\n"; $port = getAlgoPort($coin->algo); From 0b014e99e02e14c158097c4556d88fba109882eb Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 19 Jun 2019 11:37:50 -0400 Subject: [PATCH 494/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index 8eedbf6e0..10851aa4e 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -344,7 +344,7 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'dedicatedport'); echo CUFHtml::activeLabelEx($coin, 'dedicatedport'); echo CUFHtml::activeTextField($coin, 'dedicatedport', array('maxlength'=>5,'style'=>'width: 60px;')); -echo '

    Run addport to get Port Number

    '; +echo '

    Run addport to get Port Number, leave blank if not using dedicated coin ports.

    '; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($coin, 'rpccurl'); From caf0022d0e5b390ac137f92a9780f304f4096037 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Mon, 14 Oct 2019 18:32:24 -0400 Subject: [PATCH 495/576] stratum: x16rv2 algo stratum: x16rv2 algo --- stratum/algos/makefile | 2 +- stratum/algos/makefile.bak | 2 +- stratum/algos/x16rv2.c | 199 +++++++++++++++++++++++ stratum/algos/x16rv2.h | 16 ++ stratum/config.sample/x16rv2.conf | 15 ++ stratum/stratum.cpp | 1 + stratum/stratum.cpp.bak | 8 +- stratum/stratum.h | 1 + stratum/stratum.h.bak | 2 + web/yaamp/core/exchange/exchange.php | 2 +- web/yaamp/core/exchange/exchange.php.bak | 12 +- web/yaamp/core/functions/yaamp.php | 3 + web/yaamp/core/functions/yaamp.php.bak | 8 + 13 files changed, 256 insertions(+), 15 deletions(-) create mode 100644 stratum/algos/x16rv2.c create mode 100644 stratum/algos/x16rv2.h create mode 100644 stratum/config.sample/x16rv2.conf diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 3f4422bdc..89c88e83d 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -13,7 +13,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ blake.c blakecoin.c blake2b.c blake2s.c blake2-ref/blake2b.c blake2-ref/blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ - bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ + bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c x16rv2.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index e0061eeb2..3f4422bdc 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -11,7 +11,7 @@ LDFLAGS=-O2 -lgmp SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ - blake.c blakecoin.c blake2b.c blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ + blake.c blakecoin.c blake2b.c blake2s.c blake2-ref/blake2b.c blake2-ref/blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ diff --git a/stratum/algos/x16rv2.c b/stratum/algos/x16rv2.c new file mode 100644 index 000000000..788bd7f90 --- /dev/null +++ b/stratum/algos/x16rv2.c @@ -0,0 +1,199 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common.h" + +enum Algo { + BLAKE = 0, + BMW, + GROESTL, + JH, + KECCAK, + SKEIN, + LUFFA, + CUBEHASH, + SHAVITE, + SIMD, + ECHO, + HAMSI, + FUGUE, + SHABAL, + WHIRLPOOL, + SHA512, + HASH_FUNC_COUNT +}; + +static void getAlgoString(const uint8_t* prevblock, char *output) +{ + char *sptr = output; + + for (int j = 0; j < HASH_FUNC_COUNT; j++) { + char b = (15 - j) >> 1; // 16 ascii hex chars, reversed + uint8_t algoDigit = (j & 1) ? prevblock[b] & 0xF : prevblock[b] >> 4; + if (algoDigit >= 10) + sprintf(sptr, "%c", 'A' + (algoDigit - 10)); + else + sprintf(sptr, "%u", (uint32_t) algoDigit); + sptr++; + } + *sptr = '\0'; +} + +inline void padtiger512(uint32_t* hash) { + for (int i = (24/4); i < (64/4); i++) hash[i] = 0; +} + +void x16rv2_hash(const char* input, char* output, uint32_t len) +{ + uint32_t hash[64/4]; + char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; + + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_tiger_context ctx_tiger; + + void *in = (void*) input; + int size = len; + + getAlgoString(&input[4], hashOrder); + + for (int i = 0; i < 16; i++) + { + const char elem = hashOrder[i]; + const uint8_t algo = elem >= 'A' ? elem - 'A' + 10 : elem - '0'; + + switch (algo) { + case BLAKE: + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, in, size); + sph_blake512_close(&ctx_blake, hash); + break; + case BMW: + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, in, size); + sph_bmw512_close(&ctx_bmw, hash); + break; + case GROESTL: + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, in, size); + sph_groestl512_close(&ctx_groestl, hash); + break; + case SKEIN: + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, in, size); + sph_skein512_close(&ctx_skein, hash); + break; + case JH: + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, in, size); + sph_jh512_close(&ctx_jh, hash); + break; + case KECCAK: + sph_tiger_init(&ctx_tiger); + sph_tiger(&ctx_tiger, (const void*) in, size); + sph_tiger_close(&ctx_tiger, (void*) hash); + padtiger512(hash); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, hash, 64); + sph_keccak512_close(&ctx_keccak, hash); + break; + case LUFFA: + sph_tiger_init(&ctx_tiger); + sph_tiger(&ctx_tiger, (const void*) in, size); + sph_tiger_close(&ctx_tiger, (void*) hash); + padtiger512(hash); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hash, 64); + sph_luffa512_close(&ctx_luffa, hash); + break; + case CUBEHASH: + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, in, size); + sph_cubehash512_close(&ctx_cubehash, hash); + break; + case SHAVITE: + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, in, size); + sph_shavite512_close(&ctx_shavite, hash); + break; + case SIMD: + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, in, size); + sph_simd512_close(&ctx_simd, hash); + break; + case ECHO: + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, in, size); + sph_echo512_close(&ctx_echo, hash); + break; + case HAMSI: + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, in, size); + sph_hamsi512_close(&ctx_hamsi, hash); + break; + case FUGUE: + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, in, size); + sph_fugue512_close(&ctx_fugue, hash); + break; + case SHABAL: + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, in, size); + sph_shabal512_close(&ctx_shabal, hash); + break; + case WHIRLPOOL: + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, in, size); + sph_whirlpool_close(&ctx_whirlpool, hash); + break; + case SHA512: + sph_tiger_init(&ctx_tiger); + sph_tiger(&ctx_tiger, (const void*) in, size); + sph_tiger_close(&ctx_tiger, (void*) hash); + padtiger512(hash); + + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) hash, 64); + sph_sha512_close(&ctx_sha512,(void*) hash); + break; + } + in = (void*) hash; + size = 64; + } + memcpy(output, hash, 32); +} diff --git a/stratum/algos/x16rv2.h b/stratum/algos/x16rv2.h new file mode 100644 index 000000000..9ff2bf4a4 --- /dev/null +++ b/stratum/algos/x16rv2.h @@ -0,0 +1,16 @@ +#ifndef X16RV2_H +#define X16RV2_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x16rv2_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/config.sample/x16rv2.conf b/stratum/config.sample/x16rv2.conf new file mode 100644 index 000000000..2779358f5 --- /dev/null +++ b/stratum/config.sample/x16rv2.conf @@ -0,0 +1,15 @@ +[TCP] +server = yaamp.com +port = 3637 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = x16rv2 +difficulty = 0.25 +max_ttf = 50000 diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index e3f8ae669..ee527db6c 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -200,6 +200,7 @@ YAAMP_ALGO g_algos[] = {"x14", x14_hash, 1, 0, 0}, {"x15", x15_hash, 1, 0, 0}, {"x16r", x16r_hash, 0x100, 0, 0}, + {"x16rv2", x16rv2_hash, 0x100, 0, 0}, {"x16rt", x16rt_hash, 0x100, 0, 0}, {"x16s", x16s_hash, 0x100, 0, 0}, {"x17", x17_hash, 1, 0, 0}, diff --git a/stratum/stratum.cpp.bak b/stratum/stratum.cpp.bak index 49f01ef97..e3f8ae669 100644 --- a/stratum/stratum.cpp.bak +++ b/stratum/stratum.cpp.bak @@ -116,9 +116,11 @@ YAAMP_ALGO g_algos[] = {"a5a", a5a_hash, 0x10000, 0, 0}, {"aergo", aergo_hash, 1, 0, 0}, {"allium", allium_hash, 0x100, 0, 0}, - {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, + {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, // Credits Argon2d Implementation {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation + {"argon2d-uis", argon2d_uis_hash, 0x10000, 0, 0 }, // Argon2d Implementation {"argon2m", argon2m_hash, 0x10000, 0, 0}, + {"astralhash", astralhash_hash, 0x100, 0, 0}, {"balloon", balloon_hash, 1, 0, 0}, {"bastion", bastion_hash, 1, 0 }, {"bcd", bcd_hash, 1, 0, 0}, @@ -129,6 +131,7 @@ YAAMP_ALGO g_algos[] = {"blake2s", blake2s_hash, 1, 0 }, {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, {"bmw", bmw_hash, 1, 0, 0}, + {"bmw512", bmw512_hash, 0x100, 0, 0}, {"c11", c11_hash, 1, 0, 0}, {"decred", decred_hash, 1, 0 }, {"dedal", dedal_hash, 0x100, 0, 0}, @@ -142,6 +145,8 @@ YAAMP_ALGO g_algos[] = {"hive", hive_hash, 0x10000, 0, 0}, {"hmq1725", hmq17_hash, 0x10000, 0, 0}, {"hsr", hsr_hash, 1, 0, 0}, + {"honeycomb", beenode_hash, 0x10000, 0, 0}, + {"jeonghash", jeonghash_hash, 0x100, 0, 0}, {"jha", jha_hash, 0x10000, 0}, {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, {"keccakc", keccak256_hash, 0x100, 0, 0}, @@ -158,6 +163,7 @@ YAAMP_ALGO g_algos[] = {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, {"nist5", nist5_hash, 1, 0, 0}, + {"pawelhash", pawelhash_hash, 0x100, 0, 0}, {"penta", penta_hash, 1, 0, 0}, {"phi", phi_hash, 1, 0, 0}, {"phi2", phi2_hash, 0x100, 0, 0}, diff --git a/stratum/stratum.h b/stratum/stratum.h index 20aa3693f..f1bca9cfe 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -225,6 +225,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/x14.h" #include "algos/x15.h" #include "algos/x16r.h" +#include "algos/x16rv2.h" #include "algos/x16rt.h" #include "algos/x16s.h" #include "algos/x17.h" diff --git a/stratum/stratum.h.bak b/stratum/stratum.h.bak index a1fab5627..20aa3693f 100644 --- a/stratum/stratum.h.bak +++ b/stratum/stratum.h.bak @@ -166,6 +166,8 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/blake2s.h" #include "algos/blakecoin.h" #include "algos/bmw.h" +#include "algos/beenode.h" +#include "algos/bmw512.h" #include "algos/c11.h" #include "algos/dedal.h" #include "algos/deep.h" diff --git a/web/yaamp/core/exchange/exchange.php b/web/yaamp/core/exchange/exchange.php index b53f3371e..df83cb397 100644 --- a/web/yaamp/core/exchange/exchange.php +++ b/web/yaamp/core/exchange/exchange.php @@ -123,7 +123,7 @@ function getMarketUrl($coin, $marketName) else if($market == 'kucoin') $url = "https://www.kucoin.com/trade/{$symbol}-{$base}"; else if($market == 'livecoin') - $url = "https://www.livecoin.net/trade/?currencyPair={$symbol}%2F{$base}"; + $url = "https://www.livecoin.net/en/trading/{$symbol}_{$base}"; else if($market == 'nova') $url = "https://novaexchange.com/market/{$base}_{$symbol}/"; else if($market == 'stocksexchange') diff --git a/web/yaamp/core/exchange/exchange.php.bak b/web/yaamp/core/exchange/exchange.php.bak index 19b9afc65..b53f3371e 100644 --- a/web/yaamp/core/exchange/exchange.php.bak +++ b/web/yaamp/core/exchange/exchange.php.bak @@ -13,11 +13,9 @@ function strip_data($data) return $out; } -require_once("bitfinex.php"); require_once("bitstamp.php"); require_once("bittrex.php"); require_once("bitz.php"); -require_once("bitzv2.php"); require_once("bleutrade.php"); require_once("ccexapi.php"); require_once("cexio.php"); @@ -31,7 +29,6 @@ require_once("kraken.php"); require_once("poloniex.php"); require_once("yobit.php"); require_once("shapeshift.php"); -require_once("bter.php"); require_once("empoex.php"); require_once("jubi.php"); require_once("alcurex.php"); @@ -45,7 +42,6 @@ require_once("coinexchange.php"); require_once("coinsmarkets.php"); require_once("cryptowatch.php"); require_once("stocksexchange.php"); -require_once("tradeogre.php"); require_once("tradesatoshi.php"); /* Format an exchange coin Url */ @@ -86,8 +82,6 @@ function getMarketUrl($coin, $marketName) $url = "https://alcurex.com/#{$symbol}-{$base}"; else if($market == 'binance') $url = "https://www.binance.com/trade.html?symbol={$symbol}_{$base}"; - else if($market == 'bitfinex') - $url = "https://www.bitfinex.com/t/{$symbol}:{$base}"; else if($market == 'bittrex') $url = "https://bittrex.com/Market/Index?MarketName={$base}-{$symbol}"; else if($market == 'bitz') @@ -96,8 +90,6 @@ function getMarketUrl($coin, $marketName) $url = "https://poloniex.com/exchange#{$lowbase}_{$lowsymbol}"; else if($market == 'bleutrade') $url = "https://bleutrade.com/exchange/{$symbol}/{$base}"; - else if($market == 'bter') - $url = "https://bter.com/trade/{$lowsymbol}_{$lowbase}"; else if($market == 'cexio') $url = "https://cex.io/trade/{$symbol}-{$base}"; else if($market == 'coinbene') @@ -129,15 +121,13 @@ function getMarketUrl($coin, $marketName) else if($market == 'hitbtc') $url = "https://hitbtc.com/exchange/{$symbol}-to-{$base}"; else if($market == 'kucoin') - $url = "https://www.kucoin.com/#/trade.pro/{$symbol}-{$base}"; + $url = "https://www.kucoin.com/trade/{$symbol}-{$base}"; else if($market == 'livecoin') $url = "https://www.livecoin.net/trade/?currencyPair={$symbol}%2F{$base}"; else if($market == 'nova') $url = "https://novaexchange.com/market/{$base}_{$symbol}/"; else if($market == 'stocksexchange') $url = "https://stocks.exchange/trade/$symbol/$base"; - else if($market == 'tradeogre') - $url = "https://tradeogre.com/exchange/{$base}-{$symbol}"; else if($market == 'tradesatoshi') $url = "https://tradesatoshi.com/Exchange?market={$symbol}_{$base}"; else if($market == 'yobit') diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 6e8e7542a..950b5900d 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -83,6 +83,7 @@ function yaamp_get_algos() 'x14', 'x15', 'x16r', + 'x16rv2', 'x16rt', 'x16s', 'x17', @@ -255,6 +256,7 @@ function getAlgoColors($algo) 'x14' => '#f0c080', 'x15' => '#f0b080', 'x16r' => '#f0b080', + 'x16rv2' => '#f0b080', 'x16rt' => '#f0b080', 'x16s' => '#f0b080', 'x17' => '#f0b0a0', @@ -367,6 +369,7 @@ function getAlgoPort($algo) 'x14' => 3933, 'x15' => 3733, 'x16r' => 3636, + 'x16rv2' => 3637, 'x16rt' => 7220, 'x16s' => 3663, 'x17' => 3737, diff --git a/web/yaamp/core/functions/yaamp.php.bak b/web/yaamp/core/functions/yaamp.php.bak index 456096e81..6e8e7542a 100644 --- a/web/yaamp/core/functions/yaamp.php.bak +++ b/web/yaamp/core/functions/yaamp.php.bak @@ -20,6 +20,7 @@ function yaamp_get_algos() 'blake', 'blake2b', 'blake2s', + 'bmw512', 'blakecoin', 'c11', 'decred', @@ -30,6 +31,7 @@ function yaamp_get_algos() 'geek', 'hex', 'hmq1725', + 'honeycomb', 'hsr', 'jha', 'keccak', @@ -143,6 +145,7 @@ function yaamp_get_algo_norm($algo) 'keccak' => 1.0, 'lyra2' => 1.0, 'lyra2v2' => 1.0, + 'lyra2v3' => 1.0, 'myr-gr' => 1.0, 'neoscrypt' => 1.0, 'nist5' => 1.0, @@ -189,6 +192,8 @@ function getAlgoColors($algo) 'blake' => '#f0f0f0', 'blake2b' => '#f2c81f', 'blakecoin' => '#f0f0f0', + 'bmw512' => '#f0f0f0', + 'cuckoo' => '#d0a0a0', 'c11' => '#a0a0d0', 'decred' => '#f0f0f0', 'deep' => '#e0ffff', @@ -198,6 +203,7 @@ function getAlgoColors($algo) 'groestl' => '#d0a0a0', 'hex' => '#c0f0c0', 'hmq1725' => '#ffa0a0', + 'honeycomb' => '#c0f0c0', 'hsr' => '#aa70ff', 'jha' => '#a0d0c0', 'keccak' => '#c0f0c0', @@ -299,6 +305,7 @@ function getAlgoPort($algo) 'blake2b' => 5777, 'blake2s' => 5766, 'blakecoin' => 5743, + 'bmw512' => 5787, 'c11' => 3573, 'decred' => 3252, 'deep' => 3535, @@ -307,6 +314,7 @@ function getAlgoPort($algo) 'geek' => 3692, 'hex' => 5135, 'hmq1725' => 3747, + 'honeycomb' => 7777, 'hsr' => 7433, 'jha' => 4633, 'keccak' => 5133, From 688c6332b918a19f5e6c4532b2220eaab4a2c5a8 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Wed, 6 Nov 2019 16:15:48 -0500 Subject: [PATCH 496/576] odo v1 may fail build odo v1 may fail build --- stratum/algos/KeccakP-800-SnP.h | 41 +++ stratum/algos/KeccakP-800-reference.c | 421 +++++++++++++++++++++++++ stratum/algos/brg_endian.h | 142 +++++++++ stratum/algos/makefile | 2 +- stratum/algos/makefile.bak | 2 +- stratum/algos/odo.c | 16 + stratum/algos/odo.h | 6 + stratum/algos/setup.py | 10 + stratum/config.sample/odocrypt.conf | 16 + stratum/sha3/KeccakP-800-SnP.h | 41 +++ stratum/sha3/KeccakP-800-reference.c | 421 +++++++++++++++++++++++++ stratum/stratum.cpp | 1 + stratum/stratum.cpp.bak | 1 + web/yaamp/core/functions/yaamp.php | 3 + web/yaamp/core/functions/yaamp.php.bak | 3 + 15 files changed, 1124 insertions(+), 2 deletions(-) create mode 100644 stratum/algos/KeccakP-800-SnP.h create mode 100644 stratum/algos/KeccakP-800-reference.c create mode 100644 stratum/algos/brg_endian.h create mode 100644 stratum/algos/odo.c create mode 100644 stratum/algos/odo.h create mode 100644 stratum/algos/setup.py create mode 100644 stratum/config.sample/odocrypt.conf create mode 100644 stratum/sha3/KeccakP-800-SnP.h create mode 100644 stratum/sha3/KeccakP-800-reference.c diff --git a/stratum/algos/KeccakP-800-SnP.h b/stratum/algos/KeccakP-800-SnP.h new file mode 100644 index 000000000..4b2556c06 --- /dev/null +++ b/stratum/algos/KeccakP-800-SnP.h @@ -0,0 +1,41 @@ +/* +Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, +Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer, hereby +denoted as "the implementer". + +For more information, feedback or questions, please refer to our websites: +http://keccak.noekeon.org/ +http://keyak.noekeon.org/ +http://ketje.noekeon.org/ + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ +*/ + +#ifndef _KeccakP_800_SnP_h_ +#define _KeccakP_800_SnP_h_ + +/** For the documentation, see SnP-documentation.h. + */ + +#define KeccakP800_implementation "32-bit reference implementation" +#define KeccakP800_stateSizeInBytes 100 +#define KeccakP800_stateAlignment 4 + +#ifdef KeccakReference +void KeccakP800_StaticInitialize( void ); +#else +#define KeccakP800_StaticInitialize() +#endif +void KeccakP800_Initialize(void *state); +void KeccakP800_AddByte(void *state, unsigned char data, unsigned int offset); +void KeccakP800_AddBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_OverwriteBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_OverwriteWithZeroes(void *state, unsigned int byteCount); +void KeccakP800_Permute_12rounds(void *state); +void KeccakP800_Permute_22rounds(void *state); +void KeccakP800_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length); + +#endif diff --git a/stratum/algos/KeccakP-800-reference.c b/stratum/algos/KeccakP-800-reference.c new file mode 100644 index 000000000..b71a4889d --- /dev/null +++ b/stratum/algos/KeccakP-800-reference.c @@ -0,0 +1,421 @@ +/* +Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, +Michaël Peeters, Gilles Van Assche and Ronny Van Keer, +hereby denoted as "the implementer". + +For more information, feedback or questions, please refer to our website: +https://keccak.team/ + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file implements Keccak-p[800] in a SnP-compatible way. +Please refer to SnP-documentation.h for more details. + +This implementation comes with KeccakP-800-SnP.h in the same folder. +Please refer to LowLevel.build for the exact list of other files it must be combined with. +*/ + +#include +#include +#include +#include +#include "brg_endian.h" +#ifdef KeccakReference +#include "displayIntermediateValues.h" +#endif + +typedef unsigned char UINT8; +typedef unsigned int UINT32; +typedef UINT32 tKeccakLane; + +#define maxNrRounds 22 +#define nrLanes 25 +#define index(x, y) (((x)%5)+5*((y)%5)) + +#ifdef KeccakReference + +static tKeccakLane KeccakRoundConstants[maxNrRounds]; +static unsigned int KeccakRhoOffsets[nrLanes]; + +/* ---------------------------------------------------------------- */ + +void KeccakP800_InitializeRoundConstants(void); +void KeccakP800_InitializeRhoOffsets(void); +static int LFSR86540(UINT8 *LFSR); + +void KeccakP800_StaticInitialize(void) +{ + if (sizeof(tKeccakLane) != 4) { + printf("tKeccakLane should be 32-bit wide\n"); + abort(); + } + KeccakP800_InitializeRoundConstants(); + KeccakP800_InitializeRhoOffsets(); +} + +void KeccakP800_InitializeRoundConstants(void) +{ + UINT8 LFSRstate = 0x01; + unsigned int i, j, bitPosition; + + for(i=0; i> (8*j)) & 0xFF; +} + +void KeccakP800OnWords(tKeccakLane *state, unsigned int nrRounds) +{ + unsigned int i; + +#ifdef KeccakReference + displayStateAsLanes(3, "Same, with lanes as 32-bit words", state, 800); +#endif + + for(i=(maxNrRounds-nrRounds); i> (sizeof(tKeccakLane)*8-offset))) : a) + +static void theta(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane C[5], D[5]; + + for(x=0; x<5; x++) { + C[x] = 0; + for(y=0; y<5; y++) + C[x] ^= A[index(x, y)]; + } + for(x=0; x<5; x++) + D[x] = ROL32(C[(x+1)%5], 1) ^ C[(x+4)%5]; + for(x=0; x<5; x++) + for(y=0; y<5; y++) + A[index(x, y)] ^= D[x]; +} + +static void rho(tKeccakLane *A) +{ + unsigned int x, y; + + for(x=0; x<5; x++) for(y=0; y<5; y++) + A[index(x, y)] = ROL32(A[index(x, y)], KeccakRhoOffsets[index(x, y)]); +} + +static void pi(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane tempA[25]; + + for(x=0; x<5; x++) for(y=0; y<5; y++) + tempA[index(x, y)] = A[index(x, y)]; + for(x=0; x<5; x++) for(y=0; y<5; y++) + A[index(0*x+1*y, 2*x+3*y)] = tempA[index(x, y)]; +} + +static void chi(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane C[5]; + + for(y=0; y<5; y++) { + for(x=0; x<5; x++) + C[x] = A[index(x, y)] ^ ((~A[index(x+1, y)]) & A[index(x+2, y)]); + for(x=0; x<5; x++) + A[index(x, y)] = C[x]; + } +} + +static void iota(tKeccakLane *A, unsigned int indexRound) +{ + A[index(0, 0)] ^= KeccakRoundConstants[indexRound]; +} + +/* ---------------------------------------------------------------- */ + +void KeccakP800_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length) +{ + assert(offset < 100); + assert(offset+length <= 100); + memcpy(data, (unsigned char*)state+offset, length); +} + +/* ---------------------------------------------------------------- */ + +void KeccakP800_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length) +{ + unsigned int i; + + assert(offset < 100); + assert(offset+length <= 100); + for(i=0; i +#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ ) +# include +#elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \ + defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) +# include +#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) +# if !defined( __MINGW32__ ) && !defined( _AIX ) +# include +# if !defined( __BEOS__ ) +# include +# endif +# endif +#endif +#endif + +/* Now attempt to set the define for platform byte order using any */ +/* of the four forms SYMBOL, _SYMBOL, __SYMBOL & __SYMBOL__, which */ +/* seem to encompass most endian symbol definitions */ + +#if defined( BIG_ENDIAN ) && defined( LITTLE_ENDIAN ) +# if defined( BYTE_ORDER ) && BYTE_ORDER == BIG_ENDIAN +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# elif defined( BYTE_ORDER ) && BYTE_ORDER == LITTLE_ENDIAN +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif defined( BIG_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#elif defined( LITTLE_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#endif + +#if defined( _BIG_ENDIAN ) && defined( _LITTLE_ENDIAN ) +# if defined( _BYTE_ORDER ) && _BYTE_ORDER == _BIG_ENDIAN +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# elif defined( _BYTE_ORDER ) && _BYTE_ORDER == _LITTLE_ENDIAN +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif defined( _BIG_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#elif defined( _LITTLE_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#endif + +#if defined( __BIG_ENDIAN ) && defined( __LITTLE_ENDIAN ) +# if defined( __BYTE_ORDER ) && __BYTE_ORDER == __BIG_ENDIAN +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# elif defined( __BYTE_ORDER ) && __BYTE_ORDER == __LITTLE_ENDIAN +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif defined( __BIG_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#elif defined( __LITTLE_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#endif + +#if defined( __BIG_ENDIAN__ ) && defined( __LITTLE_ENDIAN__ ) +# if defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __BIG_ENDIAN__ +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# elif defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __LITTLE_ENDIAN__ +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif defined( __BIG_ENDIAN__ ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#elif defined( __LITTLE_ENDIAN__ ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#endif + +/* if the platform byte order could not be determined, then try to */ +/* set this define using common machine defines */ +#if !defined(PLATFORM_BYTE_ORDER) + +#if defined( __alpha__ ) || defined( __alpha ) || defined( i386 ) || \ + defined( __i386__ ) || defined( _M_I86 ) || defined( _M_IX86 ) || \ + defined( __OS2__ ) || defined( sun386 ) || defined( __TURBOC__ ) || \ + defined( vax ) || defined( vms ) || defined( VMS ) || \ + defined( __VMS ) || defined( _M_X64 ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN + +#elif defined( AMIGA ) || defined( applec ) || defined( __AS400__ ) || \ + defined( _CRAY ) || defined( __hppa ) || defined( __hp9000 ) || \ + defined( ibm370 ) || defined( mc68000 ) || defined( m68k ) || \ + defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \ + defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \ + defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \ + defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN + +#elif defined(__arm__) +# ifdef __BIG_ENDIAN +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# else +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif 1 /* **** EDIT HERE IF NECESSARY **** */ +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#elif 0 /* **** EDIT HERE IF NECESSARY **** */ +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#else +# error Please edit lines 132 or 134 in brg_endian.h to set the platform byte order +#endif + +#endif + +#endif diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 89c88e83d..523982dff 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -15,7 +15,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c x16rv2.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ - scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c \ + scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c odo.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak index 3f4422bdc..89c88e83d 100644 --- a/stratum/algos/makefile.bak +++ b/stratum/algos/makefile.bak @@ -13,7 +13,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ blake.c blakecoin.c blake2b.c blake2s.c blake2-ref/blake2b.c blake2-ref/blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ - bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c xevan.c bastion.c hmq17.c sonoa.c \ + bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c x16rv2.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ diff --git a/stratum/algos/odo.c b/stratum/algos/odo.c new file mode 100644 index 000000000..49fe9f857 --- /dev/null +++ b/stratum/algos/odo.c @@ -0,0 +1,16 @@ +#include "crypto/odocrypt.h" +extern "C" { +#include "sha3/KeccakP-800-SnP.h" +#include +} + +void odo_hash(const char* input, char* output, uint32_t input_len, uint32_t key) { + char cipher[KeccakP800_stateSizeInBytes] = {}; + + memcpy(cipher, input, input_len); + cipher[input_len] = 1; + + OdoCrypt(key).Encrypt(cipher, cipher); + KeccakP800_Permute_12rounds(cipher); + memcpy(output, cipher, 32); +} diff --git a/stratum/algos/odo.h b/stratum/algos/odo.h new file mode 100644 index 000000000..41ded0d88 --- /dev/null +++ b/stratum/algos/odo.h @@ -0,0 +1,6 @@ +#pragma once + +#include +#include + +void odo_hash(const char* input, char* output, uint32_t input_len, uint32_t key); diff --git a/stratum/algos/setup.py b/stratum/algos/setup.py new file mode 100644 index 000000000..15b21aeca --- /dev/null +++ b/stratum/algos/setup.py @@ -0,0 +1,10 @@ +from distutils.core import setup, Extension + +odocrypt_hash_module = Extension('odocrypt_hash', sources = ['odocryptmodule.cpp', + 'odocrypt.cpp', + 'KeccakP-800-reference.c'], + extra_compile_args=['-march=native', '-Ofast', '-mtune=native', '-pipe']) + +setup (name = 'odocrypt_hash', + version = '0.1', + ext_modules = [odocrypt_hash_module]) diff --git a/stratum/config.sample/odocrypt.conf b/stratum/config.sample/odocrypt.conf new file mode 100644 index 000000000..fa250e7db --- /dev/null +++ b/stratum/config.sample/odocrypt.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 7777 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = odo +difficulty = 12 +max_ttf = 4000000 + diff --git a/stratum/sha3/KeccakP-800-SnP.h b/stratum/sha3/KeccakP-800-SnP.h new file mode 100644 index 000000000..4b2556c06 --- /dev/null +++ b/stratum/sha3/KeccakP-800-SnP.h @@ -0,0 +1,41 @@ +/* +Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, +Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer, hereby +denoted as "the implementer". + +For more information, feedback or questions, please refer to our websites: +http://keccak.noekeon.org/ +http://keyak.noekeon.org/ +http://ketje.noekeon.org/ + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ +*/ + +#ifndef _KeccakP_800_SnP_h_ +#define _KeccakP_800_SnP_h_ + +/** For the documentation, see SnP-documentation.h. + */ + +#define KeccakP800_implementation "32-bit reference implementation" +#define KeccakP800_stateSizeInBytes 100 +#define KeccakP800_stateAlignment 4 + +#ifdef KeccakReference +void KeccakP800_StaticInitialize( void ); +#else +#define KeccakP800_StaticInitialize() +#endif +void KeccakP800_Initialize(void *state); +void KeccakP800_AddByte(void *state, unsigned char data, unsigned int offset); +void KeccakP800_AddBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_OverwriteBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_OverwriteWithZeroes(void *state, unsigned int byteCount); +void KeccakP800_Permute_12rounds(void *state); +void KeccakP800_Permute_22rounds(void *state); +void KeccakP800_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length); + +#endif diff --git a/stratum/sha3/KeccakP-800-reference.c b/stratum/sha3/KeccakP-800-reference.c new file mode 100644 index 000000000..b71a4889d --- /dev/null +++ b/stratum/sha3/KeccakP-800-reference.c @@ -0,0 +1,421 @@ +/* +Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, +Michaël Peeters, Gilles Van Assche and Ronny Van Keer, +hereby denoted as "the implementer". + +For more information, feedback or questions, please refer to our website: +https://keccak.team/ + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file implements Keccak-p[800] in a SnP-compatible way. +Please refer to SnP-documentation.h for more details. + +This implementation comes with KeccakP-800-SnP.h in the same folder. +Please refer to LowLevel.build for the exact list of other files it must be combined with. +*/ + +#include +#include +#include +#include +#include "brg_endian.h" +#ifdef KeccakReference +#include "displayIntermediateValues.h" +#endif + +typedef unsigned char UINT8; +typedef unsigned int UINT32; +typedef UINT32 tKeccakLane; + +#define maxNrRounds 22 +#define nrLanes 25 +#define index(x, y) (((x)%5)+5*((y)%5)) + +#ifdef KeccakReference + +static tKeccakLane KeccakRoundConstants[maxNrRounds]; +static unsigned int KeccakRhoOffsets[nrLanes]; + +/* ---------------------------------------------------------------- */ + +void KeccakP800_InitializeRoundConstants(void); +void KeccakP800_InitializeRhoOffsets(void); +static int LFSR86540(UINT8 *LFSR); + +void KeccakP800_StaticInitialize(void) +{ + if (sizeof(tKeccakLane) != 4) { + printf("tKeccakLane should be 32-bit wide\n"); + abort(); + } + KeccakP800_InitializeRoundConstants(); + KeccakP800_InitializeRhoOffsets(); +} + +void KeccakP800_InitializeRoundConstants(void) +{ + UINT8 LFSRstate = 0x01; + unsigned int i, j, bitPosition; + + for(i=0; i> (8*j)) & 0xFF; +} + +void KeccakP800OnWords(tKeccakLane *state, unsigned int nrRounds) +{ + unsigned int i; + +#ifdef KeccakReference + displayStateAsLanes(3, "Same, with lanes as 32-bit words", state, 800); +#endif + + for(i=(maxNrRounds-nrRounds); i> (sizeof(tKeccakLane)*8-offset))) : a) + +static void theta(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane C[5], D[5]; + + for(x=0; x<5; x++) { + C[x] = 0; + for(y=0; y<5; y++) + C[x] ^= A[index(x, y)]; + } + for(x=0; x<5; x++) + D[x] = ROL32(C[(x+1)%5], 1) ^ C[(x+4)%5]; + for(x=0; x<5; x++) + for(y=0; y<5; y++) + A[index(x, y)] ^= D[x]; +} + +static void rho(tKeccakLane *A) +{ + unsigned int x, y; + + for(x=0; x<5; x++) for(y=0; y<5; y++) + A[index(x, y)] = ROL32(A[index(x, y)], KeccakRhoOffsets[index(x, y)]); +} + +static void pi(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane tempA[25]; + + for(x=0; x<5; x++) for(y=0; y<5; y++) + tempA[index(x, y)] = A[index(x, y)]; + for(x=0; x<5; x++) for(y=0; y<5; y++) + A[index(0*x+1*y, 2*x+3*y)] = tempA[index(x, y)]; +} + +static void chi(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane C[5]; + + for(y=0; y<5; y++) { + for(x=0; x<5; x++) + C[x] = A[index(x, y)] ^ ((~A[index(x+1, y)]) & A[index(x+2, y)]); + for(x=0; x<5; x++) + A[index(x, y)] = C[x]; + } +} + +static void iota(tKeccakLane *A, unsigned int indexRound) +{ + A[index(0, 0)] ^= KeccakRoundConstants[indexRound]; +} + +/* ---------------------------------------------------------------- */ + +void KeccakP800_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length) +{ + assert(offset < 100); + assert(offset+length <= 100); + memcpy(data, (unsigned char*)state+offset, length); +} + +/* ---------------------------------------------------------------- */ + +void KeccakP800_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length) +{ + unsigned int i; + + assert(offset < 100); + assert(offset+length <= 100); + for(i=0; i '#a0c0f0', 'neoscrypt' => '#a0d0f0', 'nist5' => '#c0e0e0', + 'odocrypt' => '#c0f0c0', 'penta' => '#80c0c0', 'phi' => '#a0a0e0', 'phi2' => '#a0a0e0', @@ -334,6 +336,7 @@ function getAlgoPort($algo) 'm7m' => 6033, 'myr-gr' => 5433, 'neoscrypt' => 4233, + 'odocrypt' => 7777, 'nist5' => 3833, 'penta' => 5833, 'phi' => 8333, diff --git a/web/yaamp/core/functions/yaamp.php.bak b/web/yaamp/core/functions/yaamp.php.bak index 6e8e7542a..950b5900d 100644 --- a/web/yaamp/core/functions/yaamp.php.bak +++ b/web/yaamp/core/functions/yaamp.php.bak @@ -83,6 +83,7 @@ function yaamp_get_algos() 'x14', 'x15', 'x16r', + 'x16rv2', 'x16rt', 'x16s', 'x17', @@ -255,6 +256,7 @@ function getAlgoColors($algo) 'x14' => '#f0c080', 'x15' => '#f0b080', 'x16r' => '#f0b080', + 'x16rv2' => '#f0b080', 'x16rt' => '#f0b080', 'x16s' => '#f0b080', 'x17' => '#f0b0a0', @@ -367,6 +369,7 @@ function getAlgoPort($algo) 'x14' => 3933, 'x15' => 3733, 'x16r' => 3636, + 'x16rv2' => 3637, 'x16rt' => 7220, 'x16s' => 3663, 'x17' => 3737, From a3c1b042f6c62dd63e1fc536505a7368c4314feb Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 6 Nov 2019 16:24:14 -0500 Subject: [PATCH 497/576] Update odo.c --- stratum/algos/odo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/odo.c b/stratum/algos/odo.c index 49fe9f857..231b16c41 100644 --- a/stratum/algos/odo.c +++ b/stratum/algos/odo.c @@ -1,4 +1,4 @@ -#include "crypto/odocrypt.h" +#include "crypto/odo.h" extern "C" { #include "sha3/KeccakP-800-SnP.h" #include From 22ba326c6de28495145619f56821f4a6a1fef0ed Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 6 Nov 2019 16:34:06 -0500 Subject: [PATCH 498/576] Update odo.c --- stratum/algos/odo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/odo.c b/stratum/algos/odo.c index 231b16c41..fa006c80a 100644 --- a/stratum/algos/odo.c +++ b/stratum/algos/odo.c @@ -1,4 +1,4 @@ -#include "crypto/odo.h" +#include "odo.h" extern "C" { #include "sha3/KeccakP-800-SnP.h" #include From e76b6dcf43d8686b8c6f3aa3bf135234d0d69453 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 6 Nov 2019 16:35:21 -0500 Subject: [PATCH 499/576] Update odo.c --- stratum/algos/odo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/algos/odo.c b/stratum/algos/odo.c index fa006c80a..f83ec4765 100644 --- a/stratum/algos/odo.c +++ b/stratum/algos/odo.c @@ -1,6 +1,6 @@ #include "odo.h" extern "C" { -#include "sha3/KeccakP-800-SnP.h" +#include "../sha3/KeccakP-800-SnP.h" #include } From 6c5f89f0a217d68dd1f1bb33ee6d43a72d9c9cd4 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Wed, 6 Nov 2019 17:32:14 -0500 Subject: [PATCH 500/576] revert odo revert odo --- stratum/algos/KeccakP-800-SnP.h | 41 +++ stratum/algos/KeccakP-800-reference.c | 421 ++++++++++++++++++++++++++ stratum/algos/brg_endian.h | 142 +++++++++ stratum/algos/odo.c | 16 + stratum/algos/odo.h | 6 + stratum/algos/setup.py | 10 + stratum/config.sample/odocrypt.conf | 16 + stratum/sha3/KeccakP-800-SnP.h | 41 +++ stratum/sha3/KeccakP-800-reference.c | 421 ++++++++++++++++++++++++++ 9 files changed, 1114 insertions(+) create mode 100644 stratum/algos/KeccakP-800-SnP.h create mode 100644 stratum/algos/KeccakP-800-reference.c create mode 100644 stratum/algos/brg_endian.h create mode 100644 stratum/algos/odo.c create mode 100644 stratum/algos/odo.h create mode 100644 stratum/algos/setup.py create mode 100644 stratum/config.sample/odocrypt.conf create mode 100644 stratum/sha3/KeccakP-800-SnP.h create mode 100644 stratum/sha3/KeccakP-800-reference.c diff --git a/stratum/algos/KeccakP-800-SnP.h b/stratum/algos/KeccakP-800-SnP.h new file mode 100644 index 000000000..4b2556c06 --- /dev/null +++ b/stratum/algos/KeccakP-800-SnP.h @@ -0,0 +1,41 @@ +/* +Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, +Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer, hereby +denoted as "the implementer". + +For more information, feedback or questions, please refer to our websites: +http://keccak.noekeon.org/ +http://keyak.noekeon.org/ +http://ketje.noekeon.org/ + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ +*/ + +#ifndef _KeccakP_800_SnP_h_ +#define _KeccakP_800_SnP_h_ + +/** For the documentation, see SnP-documentation.h. + */ + +#define KeccakP800_implementation "32-bit reference implementation" +#define KeccakP800_stateSizeInBytes 100 +#define KeccakP800_stateAlignment 4 + +#ifdef KeccakReference +void KeccakP800_StaticInitialize( void ); +#else +#define KeccakP800_StaticInitialize() +#endif +void KeccakP800_Initialize(void *state); +void KeccakP800_AddByte(void *state, unsigned char data, unsigned int offset); +void KeccakP800_AddBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_OverwriteBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_OverwriteWithZeroes(void *state, unsigned int byteCount); +void KeccakP800_Permute_12rounds(void *state); +void KeccakP800_Permute_22rounds(void *state); +void KeccakP800_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length); + +#endif diff --git a/stratum/algos/KeccakP-800-reference.c b/stratum/algos/KeccakP-800-reference.c new file mode 100644 index 000000000..b71a4889d --- /dev/null +++ b/stratum/algos/KeccakP-800-reference.c @@ -0,0 +1,421 @@ +/* +Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, +Michaël Peeters, Gilles Van Assche and Ronny Van Keer, +hereby denoted as "the implementer". + +For more information, feedback or questions, please refer to our website: +https://keccak.team/ + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file implements Keccak-p[800] in a SnP-compatible way. +Please refer to SnP-documentation.h for more details. + +This implementation comes with KeccakP-800-SnP.h in the same folder. +Please refer to LowLevel.build for the exact list of other files it must be combined with. +*/ + +#include +#include +#include +#include +#include "brg_endian.h" +#ifdef KeccakReference +#include "displayIntermediateValues.h" +#endif + +typedef unsigned char UINT8; +typedef unsigned int UINT32; +typedef UINT32 tKeccakLane; + +#define maxNrRounds 22 +#define nrLanes 25 +#define index(x, y) (((x)%5)+5*((y)%5)) + +#ifdef KeccakReference + +static tKeccakLane KeccakRoundConstants[maxNrRounds]; +static unsigned int KeccakRhoOffsets[nrLanes]; + +/* ---------------------------------------------------------------- */ + +void KeccakP800_InitializeRoundConstants(void); +void KeccakP800_InitializeRhoOffsets(void); +static int LFSR86540(UINT8 *LFSR); + +void KeccakP800_StaticInitialize(void) +{ + if (sizeof(tKeccakLane) != 4) { + printf("tKeccakLane should be 32-bit wide\n"); + abort(); + } + KeccakP800_InitializeRoundConstants(); + KeccakP800_InitializeRhoOffsets(); +} + +void KeccakP800_InitializeRoundConstants(void) +{ + UINT8 LFSRstate = 0x01; + unsigned int i, j, bitPosition; + + for(i=0; i> (8*j)) & 0xFF; +} + +void KeccakP800OnWords(tKeccakLane *state, unsigned int nrRounds) +{ + unsigned int i; + +#ifdef KeccakReference + displayStateAsLanes(3, "Same, with lanes as 32-bit words", state, 800); +#endif + + for(i=(maxNrRounds-nrRounds); i> (sizeof(tKeccakLane)*8-offset))) : a) + +static void theta(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane C[5], D[5]; + + for(x=0; x<5; x++) { + C[x] = 0; + for(y=0; y<5; y++) + C[x] ^= A[index(x, y)]; + } + for(x=0; x<5; x++) + D[x] = ROL32(C[(x+1)%5], 1) ^ C[(x+4)%5]; + for(x=0; x<5; x++) + for(y=0; y<5; y++) + A[index(x, y)] ^= D[x]; +} + +static void rho(tKeccakLane *A) +{ + unsigned int x, y; + + for(x=0; x<5; x++) for(y=0; y<5; y++) + A[index(x, y)] = ROL32(A[index(x, y)], KeccakRhoOffsets[index(x, y)]); +} + +static void pi(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane tempA[25]; + + for(x=0; x<5; x++) for(y=0; y<5; y++) + tempA[index(x, y)] = A[index(x, y)]; + for(x=0; x<5; x++) for(y=0; y<5; y++) + A[index(0*x+1*y, 2*x+3*y)] = tempA[index(x, y)]; +} + +static void chi(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane C[5]; + + for(y=0; y<5; y++) { + for(x=0; x<5; x++) + C[x] = A[index(x, y)] ^ ((~A[index(x+1, y)]) & A[index(x+2, y)]); + for(x=0; x<5; x++) + A[index(x, y)] = C[x]; + } +} + +static void iota(tKeccakLane *A, unsigned int indexRound) +{ + A[index(0, 0)] ^= KeccakRoundConstants[indexRound]; +} + +/* ---------------------------------------------------------------- */ + +void KeccakP800_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length) +{ + assert(offset < 100); + assert(offset+length <= 100); + memcpy(data, (unsigned char*)state+offset, length); +} + +/* ---------------------------------------------------------------- */ + +void KeccakP800_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length) +{ + unsigned int i; + + assert(offset < 100); + assert(offset+length <= 100); + for(i=0; i +#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ ) +# include +#elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \ + defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) +# include +#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) +# if !defined( __MINGW32__ ) && !defined( _AIX ) +# include +# if !defined( __BEOS__ ) +# include +# endif +# endif +#endif +#endif + +/* Now attempt to set the define for platform byte order using any */ +/* of the four forms SYMBOL, _SYMBOL, __SYMBOL & __SYMBOL__, which */ +/* seem to encompass most endian symbol definitions */ + +#if defined( BIG_ENDIAN ) && defined( LITTLE_ENDIAN ) +# if defined( BYTE_ORDER ) && BYTE_ORDER == BIG_ENDIAN +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# elif defined( BYTE_ORDER ) && BYTE_ORDER == LITTLE_ENDIAN +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif defined( BIG_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#elif defined( LITTLE_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#endif + +#if defined( _BIG_ENDIAN ) && defined( _LITTLE_ENDIAN ) +# if defined( _BYTE_ORDER ) && _BYTE_ORDER == _BIG_ENDIAN +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# elif defined( _BYTE_ORDER ) && _BYTE_ORDER == _LITTLE_ENDIAN +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif defined( _BIG_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#elif defined( _LITTLE_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#endif + +#if defined( __BIG_ENDIAN ) && defined( __LITTLE_ENDIAN ) +# if defined( __BYTE_ORDER ) && __BYTE_ORDER == __BIG_ENDIAN +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# elif defined( __BYTE_ORDER ) && __BYTE_ORDER == __LITTLE_ENDIAN +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif defined( __BIG_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#elif defined( __LITTLE_ENDIAN ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#endif + +#if defined( __BIG_ENDIAN__ ) && defined( __LITTLE_ENDIAN__ ) +# if defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __BIG_ENDIAN__ +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# elif defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __LITTLE_ENDIAN__ +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif defined( __BIG_ENDIAN__ ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#elif defined( __LITTLE_ENDIAN__ ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#endif + +/* if the platform byte order could not be determined, then try to */ +/* set this define using common machine defines */ +#if !defined(PLATFORM_BYTE_ORDER) + +#if defined( __alpha__ ) || defined( __alpha ) || defined( i386 ) || \ + defined( __i386__ ) || defined( _M_I86 ) || defined( _M_IX86 ) || \ + defined( __OS2__ ) || defined( sun386 ) || defined( __TURBOC__ ) || \ + defined( vax ) || defined( vms ) || defined( VMS ) || \ + defined( __VMS ) || defined( _M_X64 ) +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN + +#elif defined( AMIGA ) || defined( applec ) || defined( __AS400__ ) || \ + defined( _CRAY ) || defined( __hppa ) || defined( __hp9000 ) || \ + defined( ibm370 ) || defined( mc68000 ) || defined( m68k ) || \ + defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \ + defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \ + defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \ + defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN + +#elif defined(__arm__) +# ifdef __BIG_ENDIAN +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +# else +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +# endif +#elif 1 /* **** EDIT HERE IF NECESSARY **** */ +# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN +#elif 0 /* **** EDIT HERE IF NECESSARY **** */ +# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN +#else +# error Please edit lines 132 or 134 in brg_endian.h to set the platform byte order +#endif + +#endif + +#endif diff --git a/stratum/algos/odo.c b/stratum/algos/odo.c new file mode 100644 index 000000000..f83ec4765 --- /dev/null +++ b/stratum/algos/odo.c @@ -0,0 +1,16 @@ +#include "odo.h" +extern "C" { +#include "../sha3/KeccakP-800-SnP.h" +#include +} + +void odo_hash(const char* input, char* output, uint32_t input_len, uint32_t key) { + char cipher[KeccakP800_stateSizeInBytes] = {}; + + memcpy(cipher, input, input_len); + cipher[input_len] = 1; + + OdoCrypt(key).Encrypt(cipher, cipher); + KeccakP800_Permute_12rounds(cipher); + memcpy(output, cipher, 32); +} diff --git a/stratum/algos/odo.h b/stratum/algos/odo.h new file mode 100644 index 000000000..41ded0d88 --- /dev/null +++ b/stratum/algos/odo.h @@ -0,0 +1,6 @@ +#pragma once + +#include +#include + +void odo_hash(const char* input, char* output, uint32_t input_len, uint32_t key); diff --git a/stratum/algos/setup.py b/stratum/algos/setup.py new file mode 100644 index 000000000..15b21aeca --- /dev/null +++ b/stratum/algos/setup.py @@ -0,0 +1,10 @@ +from distutils.core import setup, Extension + +odocrypt_hash_module = Extension('odocrypt_hash', sources = ['odocryptmodule.cpp', + 'odocrypt.cpp', + 'KeccakP-800-reference.c'], + extra_compile_args=['-march=native', '-Ofast', '-mtune=native', '-pipe']) + +setup (name = 'odocrypt_hash', + version = '0.1', + ext_modules = [odocrypt_hash_module]) diff --git a/stratum/config.sample/odocrypt.conf b/stratum/config.sample/odocrypt.conf new file mode 100644 index 000000000..fa250e7db --- /dev/null +++ b/stratum/config.sample/odocrypt.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 7777 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = odo +difficulty = 12 +max_ttf = 4000000 + diff --git a/stratum/sha3/KeccakP-800-SnP.h b/stratum/sha3/KeccakP-800-SnP.h new file mode 100644 index 000000000..4b2556c06 --- /dev/null +++ b/stratum/sha3/KeccakP-800-SnP.h @@ -0,0 +1,41 @@ +/* +Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, +Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer, hereby +denoted as "the implementer". + +For more information, feedback or questions, please refer to our websites: +http://keccak.noekeon.org/ +http://keyak.noekeon.org/ +http://ketje.noekeon.org/ + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ +*/ + +#ifndef _KeccakP_800_SnP_h_ +#define _KeccakP_800_SnP_h_ + +/** For the documentation, see SnP-documentation.h. + */ + +#define KeccakP800_implementation "32-bit reference implementation" +#define KeccakP800_stateSizeInBytes 100 +#define KeccakP800_stateAlignment 4 + +#ifdef KeccakReference +void KeccakP800_StaticInitialize( void ); +#else +#define KeccakP800_StaticInitialize() +#endif +void KeccakP800_Initialize(void *state); +void KeccakP800_AddByte(void *state, unsigned char data, unsigned int offset); +void KeccakP800_AddBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_OverwriteBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_OverwriteWithZeroes(void *state, unsigned int byteCount); +void KeccakP800_Permute_12rounds(void *state); +void KeccakP800_Permute_22rounds(void *state); +void KeccakP800_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length); +void KeccakP800_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length); + +#endif diff --git a/stratum/sha3/KeccakP-800-reference.c b/stratum/sha3/KeccakP-800-reference.c new file mode 100644 index 000000000..b71a4889d --- /dev/null +++ b/stratum/sha3/KeccakP-800-reference.c @@ -0,0 +1,421 @@ +/* +Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, +Michaël Peeters, Gilles Van Assche and Ronny Van Keer, +hereby denoted as "the implementer". + +For more information, feedback or questions, please refer to our website: +https://keccak.team/ + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file implements Keccak-p[800] in a SnP-compatible way. +Please refer to SnP-documentation.h for more details. + +This implementation comes with KeccakP-800-SnP.h in the same folder. +Please refer to LowLevel.build for the exact list of other files it must be combined with. +*/ + +#include +#include +#include +#include +#include "brg_endian.h" +#ifdef KeccakReference +#include "displayIntermediateValues.h" +#endif + +typedef unsigned char UINT8; +typedef unsigned int UINT32; +typedef UINT32 tKeccakLane; + +#define maxNrRounds 22 +#define nrLanes 25 +#define index(x, y) (((x)%5)+5*((y)%5)) + +#ifdef KeccakReference + +static tKeccakLane KeccakRoundConstants[maxNrRounds]; +static unsigned int KeccakRhoOffsets[nrLanes]; + +/* ---------------------------------------------------------------- */ + +void KeccakP800_InitializeRoundConstants(void); +void KeccakP800_InitializeRhoOffsets(void); +static int LFSR86540(UINT8 *LFSR); + +void KeccakP800_StaticInitialize(void) +{ + if (sizeof(tKeccakLane) != 4) { + printf("tKeccakLane should be 32-bit wide\n"); + abort(); + } + KeccakP800_InitializeRoundConstants(); + KeccakP800_InitializeRhoOffsets(); +} + +void KeccakP800_InitializeRoundConstants(void) +{ + UINT8 LFSRstate = 0x01; + unsigned int i, j, bitPosition; + + for(i=0; i> (8*j)) & 0xFF; +} + +void KeccakP800OnWords(tKeccakLane *state, unsigned int nrRounds) +{ + unsigned int i; + +#ifdef KeccakReference + displayStateAsLanes(3, "Same, with lanes as 32-bit words", state, 800); +#endif + + for(i=(maxNrRounds-nrRounds); i> (sizeof(tKeccakLane)*8-offset))) : a) + +static void theta(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane C[5], D[5]; + + for(x=0; x<5; x++) { + C[x] = 0; + for(y=0; y<5; y++) + C[x] ^= A[index(x, y)]; + } + for(x=0; x<5; x++) + D[x] = ROL32(C[(x+1)%5], 1) ^ C[(x+4)%5]; + for(x=0; x<5; x++) + for(y=0; y<5; y++) + A[index(x, y)] ^= D[x]; +} + +static void rho(tKeccakLane *A) +{ + unsigned int x, y; + + for(x=0; x<5; x++) for(y=0; y<5; y++) + A[index(x, y)] = ROL32(A[index(x, y)], KeccakRhoOffsets[index(x, y)]); +} + +static void pi(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane tempA[25]; + + for(x=0; x<5; x++) for(y=0; y<5; y++) + tempA[index(x, y)] = A[index(x, y)]; + for(x=0; x<5; x++) for(y=0; y<5; y++) + A[index(0*x+1*y, 2*x+3*y)] = tempA[index(x, y)]; +} + +static void chi(tKeccakLane *A) +{ + unsigned int x, y; + tKeccakLane C[5]; + + for(y=0; y<5; y++) { + for(x=0; x<5; x++) + C[x] = A[index(x, y)] ^ ((~A[index(x+1, y)]) & A[index(x+2, y)]); + for(x=0; x<5; x++) + A[index(x, y)] = C[x]; + } +} + +static void iota(tKeccakLane *A, unsigned int indexRound) +{ + A[index(0, 0)] ^= KeccakRoundConstants[indexRound]; +} + +/* ---------------------------------------------------------------- */ + +void KeccakP800_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length) +{ + assert(offset < 100); + assert(offset+length <= 100); + memcpy(data, (unsigned char*)state+offset, length); +} + +/* ---------------------------------------------------------------- */ + +void KeccakP800_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length) +{ + unsigned int i; + + assert(offset < 100); + assert(offset+length <= 100); + for(i=0; i Date: Wed, 6 Nov 2019 17:39:37 -0500 Subject: [PATCH 501/576] revert odo revert odo --- stratum/algos/Lyra2-zz.c.bak | 214 ------- stratum/algos/Lyra2-zz.h.bak | 55 -- stratum/algos/Lyra2.c.bak | 386 ------------ stratum/algos/Lyra2.h.bak | 44 -- stratum/algos/gltalgos.c.bak | 470 --------------- stratum/algos/gltalgos.h.bak | 20 - stratum/algos/lyra2v3.c.bak | 68 --- stratum/algos/lyra2zz.c.bak | 27 - stratum/algos/makefile | 2 +- stratum/algos/makefile.bak | 53 -- stratum/algos/odo.c | 16 - stratum/algos/odo.h | 6 - stratum/algos/setup.py | 10 - stratum/algos/x16rt.c.bak | 230 -------- stratum/algos/x16rt.h.bak | 16 - stratum/algos/x22i.c.bak | 146 ----- stratum/algos/x22i.h.bak | 16 - stratum/algos/x25x.c.bak | 174 ------ stratum/client.h.bak | 169 ------ stratum/client_difficulty.cpp.bak | 106 ---- stratum/client_submit.cpp.bak | 594 ------------------- stratum/coinbase.cpp.bak | 940 ------------------------------ stratum/stratum.cpp | 1 - stratum/stratum.cpp.bak | 495 ---------------- stratum/stratum.h.bak | 239 -------- 25 files changed, 1 insertion(+), 4496 deletions(-) delete mode 100644 stratum/algos/Lyra2-zz.c.bak delete mode 100644 stratum/algos/Lyra2-zz.h.bak delete mode 100644 stratum/algos/Lyra2.c.bak delete mode 100644 stratum/algos/Lyra2.h.bak delete mode 100644 stratum/algos/gltalgos.c.bak delete mode 100644 stratum/algos/gltalgos.h.bak delete mode 100644 stratum/algos/lyra2v3.c.bak delete mode 100644 stratum/algos/lyra2zz.c.bak delete mode 100644 stratum/algos/makefile.bak delete mode 100644 stratum/algos/odo.c delete mode 100644 stratum/algos/odo.h delete mode 100644 stratum/algos/setup.py delete mode 100644 stratum/algos/x16rt.c.bak delete mode 100644 stratum/algos/x16rt.h.bak delete mode 100644 stratum/algos/x22i.c.bak delete mode 100644 stratum/algos/x22i.h.bak delete mode 100644 stratum/algos/x25x.c.bak delete mode 100644 stratum/client.h.bak delete mode 100644 stratum/client_difficulty.cpp.bak delete mode 100644 stratum/client_submit.cpp.bak delete mode 100644 stratum/coinbase.cpp.bak delete mode 100644 stratum/stratum.cpp.bak delete mode 100644 stratum/stratum.h.bak diff --git a/stratum/algos/Lyra2-zz.c.bak b/stratum/algos/Lyra2-zz.c.bak deleted file mode 100644 index caa5bfe58..000000000 --- a/stratum/algos/Lyra2-zz.c.bak +++ /dev/null @@ -1,214 +0,0 @@ -/** - * Implementation of the Lyra2 Password Hashing Scheme (PHS). - * - * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. - * - * This software is hereby placed in the public domain. - * - * 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 -#include -#include -#include - -#include "Lyra2-zz.h" -#include "Sponge.h" - -/** - * Executes Lyra2 based on the G function from Blake2b. This version supports salts and passwords - * whose combined length is smaller than the size of the memory matrix, (i.e., (nRows x nCols x b) bits, - * where "b" is the underlying sponge's bitrate). In this implementation, the "basil" is composed by all - * integer parameters (treated as type "unsigned int") in the order they are provided, plus the value - * of nCols, (i.e., basil = kLen || pwdlen || saltlen || timeCost || nRows || nCols). - * - * @param K The derived key to be output by the algorithm - * @param kLen Desired key length - * @param pwd User password - * @param pwdlen Password length - * @param salt Salt - * @param saltlen Salt length - * @param timeCost Parameter to determine the processing time (T) - * @param nRows Number or rows of the memory matrix (R) - * @param nCols Number of columns of the memory matrix (C) - * - * @return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation) - */ -int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols) { - - //============================= Basic variables ============================// - int64_t row = 2; //index of row to be processed - int64_t prev = 1; //index of prev (last row ever computed/modified) - int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) - int64_t tau; //Time Loop iterator - int64_t step = 1; //Visitation step (used during Setup and Wandering phases) - int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) - int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 - int64_t i; //auxiliary iteration counter - //==========================================================================/ - - //========== Initializing the Memory Matrix and pointers to it =============// - //Tries to allocate enough space for the whole memory matrix - - - const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; - const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; - - i = (int64_t) ((int64_t) nRows * (int64_t) ROW_LEN_BYTES); - uint64_t *wholeMatrix = malloc(i); - if (wholeMatrix == NULL) { - return -1; - } - memset(wholeMatrix, 0, i); - - //Allocates pointers to each row of the matrix - uint64_t **memMatrix = malloc(nRows * sizeof (uint64_t*)); - if (memMatrix == NULL) { - return -1; - } - //Places the pointers in the correct positions - uint64_t *ptrWord = wholeMatrix; - for (i = 0; i < nRows; i++) { - memMatrix[i] = ptrWord; - ptrWord += ROW_LEN_INT64; - } - //==========================================================================/ - - //============= Getting the password + salt + basil padded with 10*1 ===============// - //OBS.:The memory matrix will temporarily hold the password: not for saving memory, - //but this ensures that the password copied locally will be overwritten as soon as possible - - //First, we clean enough blocks for the password, salt, basil and padding - uint64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof (uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; - byte *ptrByte = (byte*) wholeMatrix; - memset(ptrByte, 0, nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES); - - //Prepends the password - memcpy(ptrByte, pwd, pwdlen); - ptrByte += pwdlen; - - //Concatenates the salt - memcpy(ptrByte, salt, saltlen); - ptrByte += saltlen; - - //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface - memcpy(ptrByte, &kLen, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &pwdlen, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &saltlen, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &timeCost, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &nRows, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - memcpy(ptrByte, &nCols, sizeof (uint64_t)); - ptrByte += sizeof (uint64_t); - - //Now comes the padding - *ptrByte = 0x80; //first byte of padding: right after the password - ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix - ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block - *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block - //==========================================================================/ - - //======================= Initializing the Sponge State ====================// - //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) - uint64_t *state = malloc(16 * sizeof (uint64_t)); - if (state == NULL) { - return -1; - } - initState(state); - //==========================================================================/ - - //================================ Setup Phase =============================// - //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits - ptrWord = wholeMatrix; - for (i = 0; i < nBlocksInput; i++) { - absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) - ptrWord += BLOCK_LEN_BLAKE2_SAFE_INT64; //goes to next block of pad(pwd || salt || basil) - } - - //Initializes M[0] and M[1] - reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here - reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); - - do { - //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) - reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); - - - //updates the value of row* (deterministically picked during Setup)) - rowa = (rowa + step) & (window - 1); - //update prev: it now points to the last row ever computed - prev = row; - //updates row: goes to the next row to be computed - row++; - - //Checks if all rows in the window where visited. - if (rowa == 0) { - step = window + gap; //changes the step: approximately doubles its value - window *= 2; //doubles the size of the re-visitation window - gap = -gap; //inverts the modifier to the step - } - - } while (row < nRows); - //==========================================================================/ - - //============================ Wandering Phase =============================// - row = 0; //Resets the visitation to the first row of the memory matrix - for (tau = 1; tau <= timeCost; tau++) { - //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 - step = (tau % 2 == 0) ? -1 : nRows / 2 - 1; - do { - //Selects a pseudorandom index row* - //------------------------------------------------------------------------------------------ - //rowa = ((unsigned int)state[0]) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) - rowa = ((uint64_t) (state[0])) % nRows; //(USE THIS FOR THE "GENERIC" CASE) - //------------------------------------------------------------------------------------------ - - //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] - reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); - - //update prev: it now points to the last row ever computed - prev = row; - - //updates row: goes to the next row to be computed - //------------------------------------------------------------------------------------------ - //row = (row + step) & (nRows-1); //(USE THIS IF nRows IS A POWER OF 2) - row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) - //------------------------------------------------------------------------------------------ - - } while (row != 0); - } - //==========================================================================/ - - //============================ Wrap-up Phase ===============================// - //Absorbs the last block of the memory matrix - absorbBlock(state, memMatrix[rowa]); - - //Squeezes the key - squeeze(state, K, kLen); - //==========================================================================/ - - //========================= Freeing the memory =============================// - free(memMatrix); - free(wholeMatrix); - - //Wiping out the sponge's internal state before freeing it - memset(state, 0, 16 * sizeof (uint64_t)); - free(state); - //==========================================================================/ - - return 0; -} diff --git a/stratum/algos/Lyra2-zz.h.bak b/stratum/algos/Lyra2-zz.h.bak deleted file mode 100644 index d6d79e96a..000000000 --- a/stratum/algos/Lyra2-zz.h.bak +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Header file for the Lyra2 Password Hashing Scheme (PHS). - * - * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. - * - * This software is hereby placed in the public domain. - * - * 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. - */ -#ifndef LYRA2ZZ_H_ -#define LYRA2ZZ_H_ - -#include - -typedef unsigned char byte; - -//Block length required so Blake2's Initialization Vector (IV) is not overwritten (THIS SHOULD NOT BE MODIFIED) -#define BLOCK_LEN_BLAKE2_SAFE_INT64 12 //768 bits (=96 bytes, =12 uint64_t) -#define BLOCK_LEN_BLAKE2_SAFE_BYTES (BLOCK_LEN_BLAKE2_SAFE_INT64 * 8) //same as above, in bytes - -#define LYRA2ZZ_BLOCK_HEADER_LEN_BYTES 112 -#define LYRA2ZZ_BLOCK_HEADER_NONCE_OFFSET 19 /* 19 * 4 bytes */ - -#define LYRA2ZZ_BLOCK_HEADER_UINT32_LEN 32 - -#ifdef BLOCK_LEN_BITS - #define BLOCK_LEN_INT64 (BLOCK_LEN_BITS/64) //Block length: 1024 bits (=128 bytes, =16 uint64_t) - #define BLOCK_LEN_BYTES (BLOCK_LEN_BITS/8) //Block length, in bytes -#else //default block length: 1024 bits - #define BLOCK_LEN_INT64 16 //Block length: 1024 bits (=128 bytes, =16 uint64_t) - #define BLOCK_LEN_BYTES (BLOCK_LEN_INT64 * 8) //Block length, in bytes -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - int LYRA2ZZ(void *K, uint64_t kLen, const void *pwd, uint64_t pwdlen, const void *salt, uint64_t saltlen, uint64_t timeCost, uint64_t nRows, uint64_t nCols); - -#ifdef __cplusplus -} - -#endif - -#endif /* LYRA2_H_ */ diff --git a/stratum/algos/Lyra2.c.bak b/stratum/algos/Lyra2.c.bak deleted file mode 100644 index a2016be8f..000000000 --- a/stratum/algos/Lyra2.c.bak +++ /dev/null @@ -1,386 +0,0 @@ -/** - * Implementation of the Lyra2 Password Hashing Scheme (PHS). - * - * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. - * - * This software is hereby placed in the public domain. - * - * 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 -#include -#include -#include - -#include "Lyra2.h" -#include "Sponge.h" - -/** - * Executes Lyra2 based on the G function from Blake2b. This version supports salts and passwords - * whose combined length is smaller than the size of the memory matrix, (i.e., (nRows x nCols x b) bits, - * where "b" is the underlying sponge's bitrate). In this implementation, the "basil" is composed by all - * integer parameters (treated as type "unsigned int") in the order they are provided, plus the value - * of nCols, (i.e., basil = kLen || pwdlen || saltlen || timeCost || nRows || nCols). - * - * @param K The derived key to be output by the algorithm - * @param kLen Desired key length - * @param pwd User password - * @param pwdlen Password length - * @param salt Salt - * @param saltlen Salt length - * @param timeCost Parameter to determine the processing time (T) - * @param nRows Number or rows of the memory matrix (R) - * @param nCols Number of columns of the memory matrix (C) - * - * @return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation) - */ -int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols) -{ - //============================= Basic variables ============================// - int64_t row = 2; //index of row to be processed - int64_t prev = 1; //index of prev (last row ever computed/modified) - int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) - int64_t tau; //Time Loop iterator - int64_t step = 1; //Visitation step (used during Setup and Wandering phases) - int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) - int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 - int64_t i; //auxiliary iteration counter - int64_t v64; // 64bit var for memcpy - //==========================================================================/ - - //========== Initializing the Memory Matrix and pointers to it =============// - //Tries to allocate enough space for the whole memory matrix - - const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; - const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; - // for Lyra2REv2, nCols = 4, v1 was using 8 - const int64_t BLOCK_LEN = (nCols == 4) ? BLOCK_LEN_BLAKE2_SAFE_INT64 : BLOCK_LEN_BLAKE2_SAFE_BYTES; - - i = (int64_t)ROW_LEN_BYTES * nRows; - uint64_t *wholeMatrix = malloc(i); - if (wholeMatrix == NULL) { - return -1; - } - memset(wholeMatrix, 0, i); - - //Allocates pointers to each row of the matrix - uint64_t **memMatrix = malloc(sizeof(uint64_t*) * nRows); - if (memMatrix == NULL) { - return -1; - } - //Places the pointers in the correct positions - uint64_t *ptrWord = wholeMatrix; - for (i = 0; i < nRows; i++) { - memMatrix[i] = ptrWord; - ptrWord += ROW_LEN_INT64; - } - //==========================================================================/ - - //============= Getting the password + salt + basil padded with 10*1 ===============// - //OBS.:The memory matrix will temporarily hold the password: not for saving memory, - //but this ensures that the password copied locally will be overwritten as soon as possible - - //First, we clean enough blocks for the password, salt, basil and padding - int64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof(uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; - - byte *ptrByte = (byte*) wholeMatrix; - - //Prepends the password - memcpy(ptrByte, pwd, pwdlen); - ptrByte += pwdlen; - - //Concatenates the salt - memcpy(ptrByte, salt, saltlen); - ptrByte += saltlen; - - memset(ptrByte, 0, nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - (saltlen + pwdlen)); - - //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface - memcpy(ptrByte, &kLen, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = pwdlen; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = saltlen; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = timeCost; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = nRows; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = nCols; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - - //Now comes the padding - *ptrByte = 0x80; //first byte of padding: right after the password - ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix - ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block - *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block - //==========================================================================/ - - //======================= Initializing the Sponge State ====================// - //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) - uint64_t state[16]; - initState(state); - //==========================================================================/ - - //================================ Setup Phase =============================// - //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits - ptrWord = wholeMatrix; - for (i = 0; i < nBlocksInput; i++) { - absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) - ptrWord += BLOCK_LEN; //goes to next block of pad(pwd || salt || basil) - } - - //Initializes M[0] and M[1] - reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here - - reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); - - do { - //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) - - reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); - - //updates the value of row* (deterministically picked during Setup)) - rowa = (rowa + step) & (window - 1); - //update prev: it now points to the last row ever computed - prev = row; - //updates row: goes to the next row to be computed - row++; - - //Checks if all rows in the window where visited. - if (rowa == 0) { - step = window + gap; //changes the step: approximately doubles its value - window *= 2; //doubles the size of the re-visitation window - gap = -gap; //inverts the modifier to the step - } - - } while (row < nRows); - //==========================================================================/ - - //============================ Wandering Phase =============================// - row = 0; //Resets the visitation to the first row of the memory matrix - for (tau = 1; tau <= timeCost; tau++) { - //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 - step = (tau % 2 == 0) ? -1 : nRows / 2 - 1; - do { - //Selects a pseudorandom index row* - //------------------------------------------------------------------------------------------ - rowa = state[0] & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) - //rowa = state[0] % nRows; //(USE THIS FOR THE "GENERIC" CASE) - //------------------------------------------------------------------------------------------ - - //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] - reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); - - //update prev: it now points to the last row ever computed - prev = row; - - //updates row: goes to the next row to be computed - //------------------------------------------------------------------------------------------ - row = (row + step) & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) - //row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) - //------------------------------------------------------------------------------------------ - - } while (row != 0); - } - - //============================ Wrap-up Phase ===============================// - //Absorbs the last block of the memory matrix - absorbBlock(state, memMatrix[rowa]); - - //Squeezes the key - squeeze(state, K, (unsigned int) kLen); - - //========================= Freeing the memory =============================// - free(memMatrix); - free(wholeMatrix); - - return 0; -} - -int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols) -{ - //============================= Basic variables ============================// - int64_t row = 2; //index of row to be processed - int64_t prev = 1; //index of prev (last row ever computed/modified) - int64_t rowa = 0; //index of row* (a previous row, deterministically picked during Setup and randomly picked while Wandering) - int64_t tau; //Time Loop iterator - int64_t step = 1; //Visitation step (used during Setup and Wandering phases) - int64_t window = 2; //Visitation window (used to define which rows can be revisited during Setup) - int64_t gap = 1; //Modifier to the step, assuming the values 1 or -1 - int64_t i; //auxiliary iteration counter - int64_t v64; // 64bit var for memcpy - uint64_t instance = 0; - //==========================================================================/ - - //========== Initializing the Memory Matrix and pointers to it =============// - //Tries to allocate enough space for the whole memory matrix - - const int64_t ROW_LEN_INT64 = BLOCK_LEN_INT64 * nCols; - const int64_t ROW_LEN_BYTES = ROW_LEN_INT64 * 8; - const int64_t BLOCK_LEN = BLOCK_LEN_BLAKE2_SAFE_INT64; - - size_t sz = (size_t)ROW_LEN_BYTES * nRows; - uint64_t *wholeMatrix = malloc(sz); - if (wholeMatrix == NULL) { - return -1; - } - memset(wholeMatrix, 0, sz); - - //Allocates pointers to each row of the matrix - uint64_t **memMatrix = malloc(sizeof(uint64_t*) * nRows); - if (memMatrix == NULL) { - return -1; - } - //Places the pointers in the correct positions - uint64_t *ptrWord = wholeMatrix; - for (i = 0; i < nRows; i++) { - memMatrix[i] = ptrWord; - ptrWord += ROW_LEN_INT64; - } - //==========================================================================/ - - //============= Getting the password + salt + basil padded with 10*1 ===============// - //OBS.:The memory matrix will temporarily hold the password: not for saving memory, - //but this ensures that the password copied locally will be overwritten as soon as possible - - //First, we clean enough blocks for the password, salt, basil and padding - int64_t nBlocksInput = ((saltlen + pwdlen + 6 * sizeof(uint64_t)) / BLOCK_LEN_BLAKE2_SAFE_BYTES) + 1; - - byte *ptrByte = (byte*) wholeMatrix; - - //Prepends the password - memcpy(ptrByte, pwd, pwdlen); - ptrByte += pwdlen; - - //Concatenates the salt - memcpy(ptrByte, salt, saltlen); - ptrByte += saltlen; - - memset(ptrByte, 0, (size_t) (nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - (saltlen + pwdlen))); - - //Concatenates the basil: every integer passed as parameter, in the order they are provided by the interface - memcpy(ptrByte, &kLen, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = pwdlen; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = saltlen; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = timeCost; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = nRows; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - v64 = nCols; - memcpy(ptrByte, &v64, sizeof(int64_t)); - ptrByte += sizeof(uint64_t); - - //Now comes the padding - *ptrByte = 0x80; //first byte of padding: right after the password - ptrByte = (byte*) wholeMatrix; //resets the pointer to the start of the memory matrix - ptrByte += nBlocksInput * BLOCK_LEN_BLAKE2_SAFE_BYTES - 1; //sets the pointer to the correct position: end of incomplete block - *ptrByte ^= 0x01; //last byte of padding: at the end of the last incomplete block - //==========================================================================/ - - //======================= Initializing the Sponge State ====================// - //Sponge state: 16 uint64_t, BLOCK_LEN_INT64 words of them for the bitrate (b) and the remainder for the capacity (c) - uint64_t state[16]; - initState(state); - //==========================================================================/ - - //================================ Setup Phase =============================// - //Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits - ptrWord = wholeMatrix; - for (i = 0; i < nBlocksInput; i++) { - absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil) - ptrWord += BLOCK_LEN; //goes to next block of pad(pwd || salt || basil) - } - - //Initializes M[0] and M[1] - reducedSqueezeRow0(state, memMatrix[0], nCols); //The locally copied password is most likely overwritten here - - reducedDuplexRow1(state, memMatrix[0], memMatrix[1], nCols); - - do { - //M[row] = rand; //M[row*] = M[row*] XOR rotW(rand) - - reducedDuplexRowSetup(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); - - //updates the value of row* (deterministically picked during Setup)) - rowa = (rowa + step) & (window - 1); - //update prev: it now points to the last row ever computed - prev = row; - //updates row: goes to the next row to be computed - row++; - - //Checks if all rows in the window where visited. - if (rowa == 0) { - step = window + gap; //changes the step: approximately doubles its value - window *= 2; //doubles the size of the re-visitation window - gap = -gap; //inverts the modifier to the step - } - - } while (row < nRows); - //==========================================================================/ - - //============================ Wandering Phase =============================// - row = 0; //Resets the visitation to the first row of the memory matrix - for (tau = 1; tau <= timeCost; tau++) { - //Step is approximately half the number of all rows of the memory matrix for an odd tau; otherwise, it is -1 - step = ((tau & 1) == 0) ? -1 : (nRows >> 1) - 1; - do { - //Selects a pseudorandom index row* - //------------------------------------------------------------------------------------------ - instance = state[instance & 0xF]; - rowa = state[instance & 0xF] & (unsigned int)(nRows-1); - - //rowa = state[0] & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) - //rowa = state[0] % nRows; //(USE THIS FOR THE "GENERIC" CASE) - //------------------------------------------------------------------------------------------ - - //Performs a reduced-round duplexing operation over M[row*] XOR M[prev], updating both M[row*] and M[row] - reducedDuplexRow(state, memMatrix[prev], memMatrix[rowa], memMatrix[row], nCols); - - //update prev: it now points to the last row ever computed - prev = row; - - //updates row: goes to the next row to be computed - //------------------------------------------------------------------------------------------ - row = (row + step) & (unsigned int)(nRows-1); //(USE THIS IF nRows IS A POWER OF 2) - //row = (row + step) % nRows; //(USE THIS FOR THE "GENERIC" CASE) - //------------------------------------------------------------------------------------------ - - } while (row != 0); - } - - //============================ Wrap-up Phase ===============================// - //Absorbs the last block of the memory matrix - absorbBlock(state, memMatrix[rowa]); - - //Squeezes the key - squeeze(state, K, (unsigned int) kLen); - - //========================= Freeing the memory =============================// - free(memMatrix); - free(wholeMatrix); - - return 0; -} diff --git a/stratum/algos/Lyra2.h.bak b/stratum/algos/Lyra2.h.bak deleted file mode 100644 index a6aa87a21..000000000 --- a/stratum/algos/Lyra2.h.bak +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Header file for the Lyra2 Password Hashing Scheme (PHS). - * - * Author: The Lyra PHC team (http://www.lyra-kdf.net/) -- 2014. - * - * This software is hereby placed in the public domain. - * - * 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. - */ -#ifndef LYRA2_H_ -#define LYRA2_H_ - -#include - -typedef unsigned char byte; - -//Block length required so Blake2's Initialization Vector (IV) is not overwritten (THIS SHOULD NOT BE MODIFIED) -#define BLOCK_LEN_BLAKE2_SAFE_INT64 8 //512 bits (=64 bytes, =8 uint64_t) -#define BLOCK_LEN_BLAKE2_SAFE_BYTES (BLOCK_LEN_BLAKE2_SAFE_INT64 * 8) //same as above, in bytes - - -#ifdef BLOCK_LEN_BITS - #define BLOCK_LEN_INT64 (BLOCK_LEN_BITS/64) //Block length: 768 bits (=96 bytes, =12 uint64_t) - #define BLOCK_LEN_BYTES (BLOCK_LEN_BITS/8) //Block length, in bytes -#else //default block lenght: 768 bits - #define BLOCK_LEN_INT64 12 //Block length: 768 bits (=96 bytes, =12 uint64_t) - #define BLOCK_LEN_BYTES (BLOCK_LEN_INT64 * 8) //Block length, in bytes -#endif - -int LYRA2(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols); - -int LYRA2_3(void *K, int64_t kLen, const void *pwd, int32_t pwdlen, const void *salt, int32_t saltlen, int64_t timeCost, const int16_t nRows, const int16_t nCols); - -#endif /* LYRA2_H_ */ diff --git a/stratum/algos/gltalgos.c.bak b/stratum/algos/gltalgos.c.bak deleted file mode 100644 index dc25f2b3f..000000000 --- a/stratum/algos/gltalgos.c.bak +++ /dev/null @@ -1,470 +0,0 @@ -#include "gltalgos.h" -#include -#include -#include -#include - -#include "blake2/blake2.h" - -#include "../sha3/sph_blake.h" -#include "../sha3/sph_bmw.h" -#include "../sha3/sph_groestl.h" -#include "../sha3/sph_jh.h" -#include "../sha3/sph_keccak.h" -#include "../sha3/sph_skein.h" -#include "../sha3/sph_luffa.h" -#include "../sha3/sph_cubehash.h" -#include "../sha3/sph_shavite.h" -#include "../sha3/sph_simd.h" -#include "../sha3/sph_echo.h" -#include "../sha3/sph_hamsi.h" -#include "../sha3/sph_fugue.h" -#include "../sha3/sph_shabal.h" -#include "../sha3/sph_whirlpool.h" -#include "../sha3/sph_sha2.h" -#include "../sha3/sph_haval.h" -#include "../sha3/sph_gost.h" - - -void pawelhash_hash(const char* input, char* output, uint32_t len) -{ - sph_fugue512_context ctx_fugue; - sph_sha512_context ctx_sha2; - sph_skein512_context ctx_skein; - sph_jh512_context ctx_jh; - sph_keccak512_context ctx_keccak; - sph_luffa512_context ctx_luffa; - sph_whirlpool_context ctx_whirlpool; - sph_shabal512_context ctx_shabal; - sph_echo512_context ctx_echo; - sph_groestl512_context ctx_groestl; - sph_haval256_5_context ctx_haval; - sph_bmw512_context ctx_bmw; - sph_gost512_context ctx_gost; - - //these uint512 in the c++ source of the client are backed by an array of uint32 - uint32_t hashA[16], hashB[16]; - - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, input, len); - sph_fugue512_close(&ctx_fugue, hashA); - - sph_sha512_init(&ctx_sha2); - sph_sha512(&ctx_sha2, hashA, 64); - sph_sha512_close(&ctx_sha2, hashB); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, hashB, 64); - sph_skein512_close(&ctx_skein, hashA); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, hashA, 64); - sph_jh512_close(&ctx_jh, hashB); - - sph_keccak512_init(&ctx_keccak); - sph_keccak512(&ctx_keccak, hashB, 64); - sph_keccak512_close(&ctx_keccak, hashA); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, hashA, 64); - sph_luffa512_close(&ctx_luffa, hashB); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, hashB, 64); - sph_whirlpool_close(&ctx_whirlpool, hashA); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, hashA, 64); - sph_shabal512_close(&ctx_shabal, hashB); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, hashB, 64); - sph_echo512_close(&ctx_echo, hashA); - - sph_groestl512_init(&ctx_groestl); - sph_groestl512(&ctx_groestl, hashA, 64); - sph_groestl512_close(&ctx_groestl, hashB); - - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval, hashB, 64); - sph_haval256_5_close(&ctx_haval, hashA); - - memset(&hashA[8], 0, 32); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashA, 64); - sph_bmw512_close(&ctx_bmw, hashB); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, hashB, 64); - sph_echo512_close(&ctx_echo, hashA); - - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, hashA, 64); - sph_fugue512_close(&ctx_fugue, hashB); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashB, 64); - sph_bmw512_close(&ctx_bmw, hashA); - - sph_gost512_init(&ctx_gost); - sph_gost512(&ctx_gost, hashA, 64); - sph_gost512_close(&ctx_gost, hashB); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, hashB, 64); - sph_shabal512_close(&ctx_shabal, hashA); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, hashA, 64); - sph_whirlpool_close(&ctx_whirlpool, hashB); - - sph_groestl512_init(&ctx_groestl); - sph_groestl512 (&ctx_groestl, hashB, 64); - sph_groestl512_close(&ctx_groestl, hashA); - - memcpy(output, hashA, 32); -} - -void jeonghash_hash(const char* input, char* output, uint32_t len) -{ - sph_simd512_context ctx_simd; - sph_hamsi512_context ctx_hamsi; - sph_shabal512_context ctx_shabal; - sph_blake512_context ctx_blake; - sph_bmw512_context ctx_bmw; - sph_sha512_context ctx_sha2; - sph_whirlpool_context ctx_whirlpool; - sph_skein512_context ctx_skein; - - //these uint512 in the c++ source of the client are backed by an array of uint32 - uint32_t hashA[16], hashB[16]; - - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, input, len); - sph_simd512_close(&ctx_simd, hashA); - - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, hashA, 64); - sph_hamsi512_close(&ctx_hamsi, hashB); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, hashB, 64); - sph_shabal512_close(&ctx_shabal, hashA); - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, hashA, 64); - sph_blake512_close(&ctx_blake, hashB); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashB, 64); - sph_bmw512_close(&ctx_bmw, hashA); - - sph_sha512_init(&ctx_sha2); - sph_sha512(&ctx_sha2, hashA, 64); - sph_sha512_close(&ctx_sha2, hashB); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, hashB, 64); - sph_whirlpool_close(&ctx_whirlpool, hashA); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, hashA, 64); - sph_skein512_close(&ctx_skein, hashB); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, hashB, 64); - sph_skein512_close(&ctx_skein, hashA); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, hashA, 64); - sph_whirlpool_close(&ctx_whirlpool, hashB); - - sph_sha512_init(&ctx_sha2); - sph_sha512(&ctx_sha2, hashB, 64); - sph_sha512_close(&ctx_sha2, hashA); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashA, 64); - sph_bmw512_close(&ctx_bmw, hashB); - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, hashB, 64); - sph_blake512_close(&ctx_blake, hashA); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, hashA, 64); - sph_shabal512_close(&ctx_shabal, hashB); - - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, hashB, 64); - sph_hamsi512_close(&ctx_hamsi, hashA); - - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, hashA, 64); - sph_simd512_close(&ctx_simd, hashB); - - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, hashB, 64); - sph_simd512_close(&ctx_simd, hashA); - - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, hashA, 64); - sph_hamsi512_close(&ctx_hamsi, hashB); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, hashB, 64); - sph_shabal512_close(&ctx_shabal, hashA); - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, hashA, 64); - sph_blake512_close(&ctx_blake, hashB); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashB, 64); - sph_bmw512_close(&ctx_bmw, hashA); - - sph_sha512_init(&ctx_sha2); - sph_sha512(&ctx_sha2, hashA, 64); - sph_sha512_close(&ctx_sha2, hashB); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, hashB, 64); - sph_whirlpool_close(&ctx_whirlpool, hashA); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, hashA, 64); - sph_skein512_close(&ctx_skein, hashB); - - memcpy(output, hashB, 32); -} - -void astralhash_hash(const char* input, char* output, uint32_t len) -{ - sph_luffa512_context ctx_luffa; - sph_skein512_context ctx_skein; - sph_echo512_context ctx_echo; - sph_whirlpool_context ctx_whirlpool; - sph_bmw512_context ctx_bmw; - sph_blake512_context ctx_blake; - sph_shavite512_context ctx_shavite; - sph_fugue512_context ctx_fugue; - sph_hamsi512_context ctx_hamsi; - sph_haval256_5_context ctx_haval; - sph_sha512_context ctx_sha2; - - //these uint512 in the c++ source of the client are backed by an array of uint32 - uint32_t hashA[16], hashB[16]; - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, input, len); - sph_luffa512_close(&ctx_luffa, hashA); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, hashA, 64); - sph_skein512_close(&ctx_skein, hashB); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, hashB, 64); - sph_echo512_close(&ctx_echo, hashA); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, hashA, 64); - sph_whirlpool_close(&ctx_whirlpool, hashB); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashB, 64); - sph_bmw512_close(&ctx_bmw, hashA); - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, hashA, 64); - sph_blake512_close(&ctx_blake, hashB); - - sph_shavite512_init(&ctx_shavite); - sph_shavite512(&ctx_shavite, hashB, 64); - sph_shavite512_close(&ctx_shavite, hashA); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, hashA, 64); - sph_skein512_close(&ctx_skein, hashB); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, hashB, 64); - sph_whirlpool_close(&ctx_whirlpool, hashA); - - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, hashA, 64); - sph_fugue512_close(&ctx_fugue, hashB); - - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, hashB, 64); - sph_hamsi512_close(&ctx_hamsi, hashA); - - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval, hashA, 64); - sph_haval256_5_close(&ctx_haval, hashB); - - memset(&hashB[8], 0, 32); - - sph_sha512_init(&ctx_sha2); - sph_sha512(&ctx_sha2, hashB, 64); - sph_sha512_close(&ctx_sha2, hashA); - - memcpy(output, hashA, 32); -} - -void padihash_hash(const char* input, char* output, uint32_t len) -{ - sph_sha512_context ctx_sha2; - sph_jh512_context ctx_jh; - sph_luffa512_context ctx_luffa; - sph_echo512_context ctx_echo; - sph_bmw512_context ctx_bmw; - sph_haval256_5_context ctx_haval; - sph_cubehash512_context ctx_cubehash; - sph_shabal512_context ctx_shabal; - - //these uint512 in the c++ source of the client are backed by an array of uint32 - uint32_t hashA[16], hashB[16]; - - sph_sha512_init(&ctx_sha2); - sph_sha512(&ctx_sha2, input, len); - sph_sha512_close(&ctx_sha2, hashA); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, hashA, 64); - sph_jh512_close(&ctx_jh, hashB); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, hashB, 64); - sph_luffa512_close(&ctx_luffa, hashA); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, hashA, 64); - sph_echo512_close(&ctx_echo, hashB); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashB, 64); - sph_bmw512_close(&ctx_bmw, hashA); - - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval, hashA, 64); - sph_haval256_5_close(&ctx_haval, hashB); - - memset(&hashB[8], 0, 32); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, hashB, 64); - sph_cubehash512_close(&ctx_cubehash, hashA); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, hashA, 64); - sph_shabal512_close(&ctx_shabal, hashB); - - sph_sha512_init(&ctx_sha2); - sph_sha512(&ctx_sha2, hashB, 64); - sph_sha512_close(&ctx_sha2, hashA); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, hashA, 64); - sph_jh512_close(&ctx_jh, hashB); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, hashB, 64); - sph_luffa512_close(&ctx_luffa, hashA); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, hashA, 64); - sph_echo512_close(&ctx_echo, hashB); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashB, 64); - sph_bmw512_close(&ctx_bmw, hashA); - - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval, hashA, 64); - sph_haval256_5_close(&ctx_haval, hashB); - - memset(&hashB[8], 0, 32); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, hashB, 64); - sph_cubehash512_close(&ctx_cubehash, hashA); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, hashA, 64); - sph_shabal512_close(&ctx_shabal, hashB); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, hashB, 64); - sph_shabal512_close(&ctx_shabal, hashA); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, hashA, 64); - sph_cubehash512_close(&ctx_cubehash, hashB); - - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval, hashB, 64); - sph_haval256_5_close(&ctx_haval, hashA); - - memset(&hashA[8], 0, 32); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashA, 64); - sph_bmw512_close(&ctx_bmw, hashB); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, hashB, 64); - sph_echo512_close(&ctx_echo, hashA); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, hashA, 64); - sph_luffa512_close(&ctx_luffa, hashB); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, hashB, 64); - sph_jh512_close(&ctx_jh, hashA); - - sph_sha512_init(&ctx_sha2); - sph_sha512(&ctx_sha2, hashA, 64); - sph_sha512_close(&ctx_sha2, hashB); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, hashB, 64); - sph_jh512_close(&ctx_jh, hashA); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hashA, 64); - sph_bmw512_close(&ctx_bmw, hashB); - - memcpy(output, hashB, 32); -} - -void globalhash_hash(const char* input, char* output, uint32_t len) -{ - sph_gost512_context ctx_gost; - sph_blake512_context ctx_blake; - blake2b_state ctx_blake2b[1]; - blake2s_state ctx_blake2s[1]; - - //these uint512 in the c++ source of the client are backed by an array of uint32 - uint32_t hashA[16], hashB[16], finalhash[8]; // finalhash is a 256 unsigned integer - - sph_gost512_init(&ctx_gost); - sph_gost512 (&ctx_gost, input, len); - sph_gost512_close(&ctx_gost, hashA); - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, hashA, 64); - sph_blake512_close(&ctx_blake, hashB); - - blake2b_init( ctx_blake2b, BLAKE2B_OUTBYTES ); - blake2b_update( ctx_blake2b, hashB, 64 ); - blake2b_final( ctx_blake2b, hashA, BLAKE2B_OUTBYTES ); - - blake2s_init( ctx_blake2s, BLAKE2S_OUTBYTES ); - blake2s_update( ctx_blake2s, hashA, 64); - blake2s_final( ctx_blake2s, finalhash, BLAKE2S_OUTBYTES ); - - memcpy(output, finalhash, 32); -} diff --git a/stratum/algos/gltalgos.h.bak b/stratum/algos/gltalgos.h.bak deleted file mode 100644 index ff6e3c992..000000000 --- a/stratum/algos/gltalgos.h.bak +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GLTALGOS_H -#define GLTALGOS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void pawelhash_hash(const char* input, char* output, uint32_t len); -void astralhash_hash(const char* input, char* output, uint32_t len); -void jeonghash_hash(const char* input, char* output, uint32_t len); -void padihash_hash(const char* input, char* output, uint32_t len); -void globalhash_hash(const char* input, char* output, uint32_t len); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/stratum/algos/lyra2v3.c.bak b/stratum/algos/lyra2v3.c.bak deleted file mode 100644 index ece25e762..000000000 --- a/stratum/algos/lyra2v3.c.bak +++ /dev/null @@ -1,68 +0,0 @@ -/*- - * Copyright(or left) 2019 YiiMP - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. - * - * This file was originally written by Colin Percival as part of the Tarsnap - * online backup system. - */ - -#include -#include -#include -#include - -#include "../sha3/sph_blake.h" -#include "../sha3/sph_cubehash.h" -#include "../sha3/sph_bmw.h" - -#include "Lyra2.h" - -void lyra2v3_hash(const char* input, char* output, uint32_t len) -{ - uint32_t hash[8], hashB[8]; - - sph_blake256_context ctx_blake; - sph_cubehash256_context ctx_cubehash; - sph_bmw256_context ctx_bmw; - - sph_blake256_set_rounds(14); - - sph_blake256_init(&ctx_blake); - sph_blake256(&ctx_blake, input, len); /* 80 */ - sph_blake256_close(&ctx_blake, hash); - - LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); - - sph_cubehash256_init(&ctx_cubehash); - sph_cubehash256(&ctx_cubehash, hashB, 32); - sph_cubehash256_close(&ctx_cubehash, hash); - - LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); - - sph_bmw256_init(&ctx_bmw); - sph_bmw256(&ctx_bmw, hashB, 32); - sph_bmw256_close(&ctx_bmw, hash); - - memcpy(output, hash, 32); -} - diff --git a/stratum/algos/lyra2zz.c.bak b/stratum/algos/lyra2zz.c.bak deleted file mode 100644 index cc9b7a9df..000000000 --- a/stratum/algos/lyra2zz.c.bak +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -#include - -#include "lyra2zz.h" - -#include - -#define _ALIGN(x) __attribute__ ((aligned(x))) - -extern uint64_t lyra2z_height; - -void lyra2zz_hash(const char* input, char* output, uint32_t len) -{ - sph_blake256_context ctx_blake; - - uint32_t hashA[8], hashB[8]; - - sph_blake256_init(&ctx_blake); - sph_blake256 (&ctx_blake, input, 112); - sph_blake256_close (&ctx_blake, hashA); - - LYRA2ZZ(hashB, 32, hashA, 32, hashA, 32, 8, 8, 8); - - memcpy(output, hashB, 32); -} diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 523982dff..89c88e83d 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -15,7 +15,7 @@ SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2 deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c x16rv2.c xevan.c bastion.c hmq17.c sonoa.c \ bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ - scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c odo.c \ + scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c \ yescrypt.c yescrypt-opt.c sha256_Y.c \ a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ diff --git a/stratum/algos/makefile.bak b/stratum/algos/makefile.bak deleted file mode 100644 index 89c88e83d..000000000 --- a/stratum/algos/makefile.bak +++ /dev/null @@ -1,53 +0,0 @@ - -CC=gcc - -#CFLAGS=-c -g -I /usr/include/mysql -#LDFLAGS=-g - -CXXFLAGS = -O2 -I.. -march=native -CFLAGS= $(CXXFLAGS) -std=gnu99 -LDFLAGS=-O2 -lgmp - -SOURCES=lyra2re.c lyra2v2.c lyra2v3.c Lyra2.c lyra2z.c Lyra2-z.c lyra2zz.c Lyra2-zz.c lyra2vc0ban.c Sponge.c allium.c \ - c11.c x11.c x12.c x13.c hsr14.c x14.c x15.c x17.c x18.c \ - x22i.c SWIFFTX/SWIFFTX.c rfv2/rfv2_core.c lane.c x25x.c \ - blake.c blakecoin.c blake2b.c blake2s.c blake2-ref/blake2b.c blake2-ref/blake2s.c jha.c keccak.c lbry.c tribus.c exosis.c \ - deep.c fresh.c groestl.c neoscrypt.c nist5.c quark.c qubit.c skein.c skein2.c bmw512.c \ - bitcore.c timetravel.c x11evo.c x16r.c x16s.c x16rt.c x16rv2.c xevan.c bastion.c hmq17.c sonoa.c \ - bmw.c luffa.c pentablake.c vitalium.c whirlpool.c whirlpoolx.c zr5.c \ - scrypt.c scryptn.c sha256.c sha256t.c sha256q.c sha256-d.c \ - yescrypt.c yescrypt-opt.c sha256_Y.c \ - a5a.c a5amath.c m7m.c magimath.cpp velvet.c \ - blake2/blake2b.c argon2d/argon2.c argon2d/core.c argon2d/encoding.c argon2d/opt.c argon2d/thread.c \ - hive.c pomelo.c hex.c argon2m.c argon2d.c geek.c balloon.c \ - phi.c phi2.c polytimos.c rainforest.c rfv2.c skunk.c sib.c veltor.c gost.c aergo.c x20r.c x21s.c lbk3.c pipehash.c gltalgos.c \ - yespower.c yespower-opt.c sha256-P.c dedal.c phi1612.c bcd.c \ - binarium_hash_v1.c binarium_hash_v1/hashing/streebog/table/stribog.c binarium_hash_v1/hashing/whirlpool/whirlpool.c \ - binarium_hash_v1/hashing/whirlpool/byte_order.c binarium_hash_v1/encryption/gost2015_kuznechik/SIMD.c \ - binarium_hash_v1/encryption/gost2015_kuznechik/SIMD_tables.c binarium_hash_v1/encryption/gost2015_kuznechik/shared/tables.c \ - binarium_hash_v1/encryption/three_fish/libskein_skein.cc binarium_hash_v1/encryption/salsa20/salsa20.c \ - beenode.c honeycomb/facet_one.c honeycomb/facet_two.c honeycomb/facet_three.c honeycomb/facet_four.c honeycomb/facet_five.c honeycomb/facet_six.c honeycomb/facets_helper.c \ - -OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) $(SOURCES:%.cc=%.o) -OUTPUT=libalgos.a - -all: $(SOURCES) $(OUTPUT) - -$(OUTPUT): $(OBJECTS) - ar rc $@ $(OBJECTS) - touch ../stratum.cpp - -.cpp.o: - $(CC) $(CXXFLAGS) -c $< -o $@ - -.c.o: - $(CC) $(CFLAGS) -c $< -o $@ - -# $(CC) $(CFLAGS) -std=gnu99 -Wno-pointer-sign -Wno-pointer-to-int-cast -funroll-loops -fvariable-expansion-in-unroller -fmerge-all-constants -fbranch-target-load-optimize2 -fsched2-use-superblocks -falign-loops=16 -falign-functions=16 -falign-jumps=16 -falign-labels=16 -Ofast -flto -fuse-linker-plugin -ftree-loop-if-convert-stores -DUSE_ASM -pg $< - -clean: - rm -f *.o - rm -f ar2/*.o - rm -f blake2/*.o - rm -f SWIFFTX/*.o - rm -f rfv2/*.o diff --git a/stratum/algos/odo.c b/stratum/algos/odo.c deleted file mode 100644 index f83ec4765..000000000 --- a/stratum/algos/odo.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "odo.h" -extern "C" { -#include "../sha3/KeccakP-800-SnP.h" -#include -} - -void odo_hash(const char* input, char* output, uint32_t input_len, uint32_t key) { - char cipher[KeccakP800_stateSizeInBytes] = {}; - - memcpy(cipher, input, input_len); - cipher[input_len] = 1; - - OdoCrypt(key).Encrypt(cipher, cipher); - KeccakP800_Permute_12rounds(cipher); - memcpy(output, cipher, 32); -} diff --git a/stratum/algos/odo.h b/stratum/algos/odo.h deleted file mode 100644 index 41ded0d88..000000000 --- a/stratum/algos/odo.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#include -#include - -void odo_hash(const char* input, char* output, uint32_t input_len, uint32_t key); diff --git a/stratum/algos/setup.py b/stratum/algos/setup.py deleted file mode 100644 index 15b21aeca..000000000 --- a/stratum/algos/setup.py +++ /dev/null @@ -1,10 +0,0 @@ -from distutils.core import setup, Extension - -odocrypt_hash_module = Extension('odocrypt_hash', sources = ['odocryptmodule.cpp', - 'odocrypt.cpp', - 'KeccakP-800-reference.c'], - extra_compile_args=['-march=native', '-Ofast', '-mtune=native', '-pipe']) - -setup (name = 'odocrypt_hash', - version = '0.1', - ext_modules = [odocrypt_hash_module]) diff --git a/stratum/algos/x16rt.c.bak b/stratum/algos/x16rt.c.bak deleted file mode 100644 index 0c327fc72..000000000 --- a/stratum/algos/x16rt.c.bak +++ /dev/null @@ -1,230 +0,0 @@ -#include -#include -#include - -#include "sha256.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common.h" - -#define TIME_MASK 0xffffff80 - -enum Algo { - BLAKE = 0, - BMW, - GROESTL, - JH, - KECCAK, - SKEIN, - LUFFA, - CUBEHASH, - SHAVITE, - SIMD, - ECHO, - HAMSI, - FUGUE, - SHABAL, - WHIRLPOOL, - SHA512, - HASH_FUNC_COUNT -}; - -static const char* algo_strings[] = { - "blake", - "bmw512", - "groestl", - "jh512", - "keccak", - "skein", - "luffa", - "cube", - "shavite", - "simd", - "echo", - "hamsi", - "fugue", - "shabal", - "whirlpool", - "sha512", - NULL -}; - -static void getAlgoString(const uint32_t* timeHash, char *output) -{ - char *sptr = output; - uint8_t* data = (uint8_t*)timeHash; - - for (uint8_t j = 0; j < HASH_FUNC_COUNT; j++) { - uint8_t b = (15 - j) >> 1; // 16 ascii hex chars, reversed - uint8_t algoDigit = (j & 1) ? data[b] & 0xF : data[b] >> 4; - - if (algoDigit >= 10) - sprintf(sptr, "%c", 'A' + (algoDigit - 10)); - else - sprintf(sptr, "%u", (uint32_t) algoDigit); - sptr++; - } - *sptr = '\0'; -} - -static void doubleSha(unsigned char* output, unsigned char* input, uint32_t len) -{ - unsigned char hash[32]; - - SHA256_CTX ctx_sha256; - SHA256_Init(&ctx_sha256); - SHA256_Update(&ctx_sha256, input, len); - SHA256_Final(input, &ctx_sha256); - - SHA256_Init(&ctx_sha256); - SHA256_Update(&ctx_sha256, input, 32); - SHA256_Final(hash, &ctx_sha256); - - memcpy(output, hash, 32); -} - -static void getTimeHash(const uint32_t timeStamp, void* timeHash) -{ - int32_t maskedTime = timeStamp & TIME_MASK; - - doubleSha((unsigned char*)timeHash, (const unsigned char*)&(maskedTime), sizeof(maskedTime)); -} - -void x16rt_hash(const char* input, char* output, uint32_t len) -{ - unsigned char hash[128]; - char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; - - sph_blake512_context ctx_blake; - sph_bmw512_context ctx_bmw; - sph_groestl512_context ctx_groestl; - sph_skein512_context ctx_skein; - sph_jh512_context ctx_jh; - sph_keccak512_context ctx_keccak; - sph_luffa512_context ctx_luffa; - sph_cubehash512_context ctx_cubehash; - sph_shavite512_context ctx_shavite; - sph_simd512_context ctx_simd; - sph_echo512_context ctx_echo; - sph_hamsi512_context ctx_hamsi; - sph_fugue512_context ctx_fugue; - sph_shabal512_context ctx_shabal; - sph_whirlpool_context ctx_whirlpool; - sph_sha512_context ctx_sha512; - - void *in = (void*) input; - int size = 80; - - uint32_t *in32 = (uint32_t*) input; - uint32_t ntime = in32[17]; - uint32_t timeHash[8]; - getTimeHash(ntime, &timeHash); - getAlgoString(&timeHash[0], hashOrder); - - for (int i = 0; i < 16; i++) - { - const char elem = hashOrder[i]; - const uint8_t algo = elem >= 'A' ? elem - 'A' + 10 : elem - '0'; - - switch (algo) { - case BLAKE: - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, in, size); - sph_blake512_close(&ctx_blake, hash); - break; - case BMW: - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, in, size); - sph_bmw512_close(&ctx_bmw, hash); - break; - case GROESTL: - sph_groestl512_init(&ctx_groestl); - sph_groestl512(&ctx_groestl, in, size); - sph_groestl512_close(&ctx_groestl, hash); - break; - case SKEIN: - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, in, size); - sph_skein512_close(&ctx_skein, hash); - break; - case JH: - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, in, size); - sph_jh512_close(&ctx_jh, hash); - break; - case KECCAK: - sph_keccak512_init(&ctx_keccak); - sph_keccak512(&ctx_keccak, in, size); - sph_keccak512_close(&ctx_keccak, hash); - break; - case LUFFA: - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, in, size); - sph_luffa512_close(&ctx_luffa, hash); - break; - case CUBEHASH: - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, in, size); - sph_cubehash512_close(&ctx_cubehash, hash); - break; - case SHAVITE: - sph_shavite512_init(&ctx_shavite); - sph_shavite512(&ctx_shavite, in, size); - sph_shavite512_close(&ctx_shavite, hash); - break; - case SIMD: - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, in, size); - sph_simd512_close(&ctx_simd, hash); - break; - case ECHO: - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, in, size); - sph_echo512_close(&ctx_echo, hash); - break; - case HAMSI: - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, in, size); - sph_hamsi512_close(&ctx_hamsi, hash); - break; - case FUGUE: - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, in, size); - sph_fugue512_close(&ctx_fugue, hash); - break; - case SHABAL: - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, in, size); - sph_shabal512_close(&ctx_shabal, hash); - break; - case WHIRLPOOL: - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, in, size); - sph_whirlpool_close(&ctx_whirlpool, hash); - break; - case SHA512: - sph_sha512_init(&ctx_sha512); - sph_sha512(&ctx_sha512,(const void*) in, size); - sph_sha512_close(&ctx_sha512,(void*) hash); - break; - } - in = (void*) hash; - size = 64; - } - memcpy(output, hash, 32); -} diff --git a/stratum/algos/x16rt.h.bak b/stratum/algos/x16rt.h.bak deleted file mode 100644 index 742678bb5..000000000 --- a/stratum/algos/x16rt.h.bak +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef X16RT_H -#define X16RT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void x16rt_hash(const char* input, char* output, uint32_t len); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/stratum/algos/x22i.c.bak b/stratum/algos/x22i.c.bak deleted file mode 100644 index 02a1aa3d5..000000000 --- a/stratum/algos/x22i.c.bak +++ /dev/null @@ -1,146 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "SWIFFTX/SWIFFTX.h" -#include "gost.h" -#include "Lyra2.h" - -#include "common.h" - - -void x22i_hash(const char* input, char* output, uint32_t len) -{ - sph_blake512_context ctx_blake; - sph_bmw512_context ctx_bmw; - sph_groestl512_context ctx_groestl; - sph_skein512_context ctx_skein; - sph_jh512_context ctx_jh; - sph_keccak512_context ctx_keccak; - sph_luffa512_context ctx_luffa; - sph_cubehash512_context ctx_cubehash; - sph_shavite512_context ctx_shavite; - sph_simd512_context ctx_simd; - sph_echo512_context ctx_echo; - sph_hamsi512_context ctx_hamsi; - sph_fugue512_context ctx_fugue; - sph_shabal512_context ctx_shabal; - sph_whirlpool_context ctx_whirlpool; - sph_sha512_context ctx_sha512; - sph_haval256_5_context ctx_haval; - sph_tiger_context ctx_tiger; - sph_gost512_context ctx_gost; - sph_sha256_context ctx_sha; - - unsigned char _ALIGN(128) hash[64 * 4] = {0}; - unsigned char _ALIGN(128) hash2[64]; - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, input, len); - sph_blake512_close (&ctx_blake, hash); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hash, 64); - sph_bmw512_close(&ctx_bmw, hash); - - sph_groestl512_init(&ctx_groestl); - sph_groestl512(&ctx_groestl, hash, 64); - sph_groestl512_close(&ctx_groestl, hash); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, hash, 64); - sph_skein512_close(&ctx_skein, hash); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, hash, 64); - sph_jh512_close(&ctx_jh, hash); - - sph_keccak512_init(&ctx_keccak); - sph_keccak512(&ctx_keccak, hash, 64); - sph_keccak512_close(&ctx_keccak, hash); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, hash, 64); - sph_luffa512_close (&ctx_luffa, hash); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, hash, 64); - sph_cubehash512_close(&ctx_cubehash, hash); - - sph_shavite512_init(&ctx_shavite); - sph_shavite512(&ctx_shavite, hash, 64); - sph_shavite512_close(&ctx_shavite, hash); - - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, hash, 64); - sph_simd512_close(&ctx_simd, hash); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, hash, 64); - sph_echo512_close(&ctx_echo, hash); - - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, hash, 64); - sph_hamsi512_close(&ctx_hamsi, hash); - - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, hash, 64); - sph_fugue512_close(&ctx_fugue, hash); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, (const void*) hash, 64); - sph_shabal512_close(&ctx_shabal, &hash[64]); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool (&ctx_whirlpool, (const void*) &hash[64], 64); - sph_whirlpool_close(&ctx_whirlpool, &hash[128]); - - sph_sha512_init(&ctx_sha512); - sph_sha512(&ctx_sha512,(const void*) &hash[128], 64); - sph_sha512_close(&ctx_sha512,(void*) &hash[192]); - - InitializeSWIFFTX(); - ComputeSingleSWIFFTX((unsigned char*)hash, (unsigned char*)hash2, false); - - memset(hash, 0, 64); - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval,(const void*) hash2, 64); - sph_haval256_5_close(&ctx_haval,hash); - - memset(hash2, 0, 64); - sph_tiger_init(&ctx_tiger); - sph_tiger (&ctx_tiger, (const void*) hash, 64); - sph_tiger_close(&ctx_tiger, (void*) hash2); - - memset(hash, 0, 64); - LYRA2((void*) hash, 32, (const void*) hash2, 32, (const void*) hash2, 32, 1, 4, 4); - - sph_gost512_init(&ctx_gost); - sph_gost512 (&ctx_gost, (const void*) hash, 64); - sph_gost512_close(&ctx_gost, (void*) hash); - - sph_sha256_init(&ctx_sha); - sph_sha256 (&ctx_sha, (const void*) hash, 64); - sph_sha256_close(&ctx_sha, (void*) hash); - - memcpy(output, hash, 32); -} diff --git a/stratum/algos/x22i.h.bak b/stratum/algos/x22i.h.bak deleted file mode 100644 index 502b8941f..000000000 --- a/stratum/algos/x22i.h.bak +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef X22I_H -#define X22I_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void x22i_hash(const char* input, char* output, uint32_t len); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/stratum/algos/x25x.c.bak b/stratum/algos/x25x.c.bak deleted file mode 100644 index 0b3076d11..000000000 --- a/stratum/algos/x25x.c.bak +++ /dev/null @@ -1,174 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "SWIFFTX/SWIFFTX.h" -#include "lane.h" -#include "gost.h" -#include "Lyra2.h" - -#include "common.h" - -void x25x_hash(const char* input, char* output, uint32_t len) -{ - sph_blake512_context ctx_blake; - sph_bmw512_context ctx_bmw; - sph_groestl512_context ctx_groestl; - sph_jh512_context ctx_jh; - sph_keccak512_context ctx_keccak; - sph_skein512_context ctx_skein; - sph_luffa512_context ctx_luffa; - sph_cubehash512_context ctx_cubehash; - sph_shavite512_context ctx_shavite; - sph_simd512_context ctx_simd; - sph_echo512_context ctx_echo; - sph_hamsi512_context ctx_hamsi; - sph_fugue512_context ctx_fugue; - sph_shabal512_context ctx_shabal; - sph_whirlpool_context ctx_whirlpool; - sph_sha512_context ctx_sha512; - sph_haval256_5_context ctx_haval; - sph_tiger_context ctx_tiger; - sph_gost512_context ctx_gost; - sph_sha256_context ctx_sha; - sph_panama_context ctx_panama; - -// unsigned char _ALIGN(128) hash[25][64] = { [0 ... 24] = { [0 ... 63] = 0 } }; - unsigned char _ALIGN(128) hash[25][64] = { 0 }; - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, input, len); - sph_blake512_close (&ctx_blake, &hash[0]); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, &hash[0], 64); - sph_bmw512_close(&ctx_bmw, &hash[1]); - - sph_groestl512_init(&ctx_groestl); - sph_groestl512(&ctx_groestl, &hash[1], 64); - sph_groestl512_close(&ctx_groestl, &hash[2]); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, &hash[2], 64); - sph_skein512_close(&ctx_skein, &hash[3]); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, &hash[3], 64); - sph_jh512_close(&ctx_jh, &hash[4]); - - sph_keccak512_init(&ctx_keccak); - sph_keccak512(&ctx_keccak, &hash[4], 64); - sph_keccak512_close(&ctx_keccak, &hash[5]); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, &hash[5], 64); - sph_luffa512_close (&ctx_luffa, &hash[6]); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, &hash[6], 64); - sph_cubehash512_close(&ctx_cubehash, &hash[7]); - - sph_shavite512_init(&ctx_shavite); - sph_shavite512(&ctx_shavite, &hash[7], 64); - sph_shavite512_close(&ctx_shavite, &hash[8]); - - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, &hash[8], 64); - sph_simd512_close(&ctx_simd, &hash[9]); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, &hash[9], 64); - sph_echo512_close(&ctx_echo, &hash[10]); - - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, &hash[10], 64); - sph_hamsi512_close(&ctx_hamsi, &hash[11]); - - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, &hash[11], 64); - sph_fugue512_close(&ctx_fugue, &hash[12]); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, (const void*) &hash[12], 64); - sph_shabal512_close(&ctx_shabal, &hash[13]); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool (&ctx_whirlpool, (const void*) &hash[13], 64); - sph_whirlpool_close(&ctx_whirlpool, &hash[14]); - - sph_sha512_init(&ctx_sha512); - sph_sha512(&ctx_sha512,(const void*) &hash[14], 64); - sph_sha512_close(&ctx_sha512,(void*) &hash[15]); - - unsigned char temp[SWIFFTX_OUTPUT_BLOCK_SIZE] = {0}; - InitializeSWIFFTX(); - ComputeSingleSWIFFTX((unsigned char*)&hash[12], temp, false); - memcpy((unsigned char*)&hash[16], temp, 64); - - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval,(const void*) &hash[16], 64); - sph_haval256_5_close(&ctx_haval,&hash[17]); - - sph_tiger_init(&ctx_tiger); - sph_tiger (&ctx_tiger, (const void*) &hash[17], 64); - sph_tiger_close(&ctx_tiger, (void*) &hash[18]); - - LYRA2((void*) &hash[19], 32, (const void*) &hash[18], 32, (const void*) &hash[18], 32, 1, 4, 4); - - sph_gost512_init(&ctx_gost); - sph_gost512 (&ctx_gost, (const void*) &hash[19], 64); - sph_gost512_close(&ctx_gost, (void*) &hash[20]); - - sph_sha256_init(&ctx_sha); - sph_sha256 (&ctx_sha, (const void*) &hash[20], 64); - sph_sha256_close(&ctx_sha, (void*) &hash[21]); - - sph_panama_init(&ctx_panama); - sph_panama (&ctx_panama, (const void*) &hash[21], 64 ); - sph_panama_close(&ctx_panama, (void*) &hash[22]); - - laneHash(512, (const BitSequence*) &hash[22], 512, (BitSequence*) &hash[23]); - - // NEW simple shuffle algorithm, instead of just reversing - #define X25X_SHUFFLE_BLOCKS (24 /* number of algos so far */ * 64 /* output bytes per algo */ / 2 /* block size */) - #define X25X_SHUFFLE_ROUNDS 12 - - static const uint16_t x25x_round_const[X25X_SHUFFLE_ROUNDS] = { - 0x142c, 0x5830, 0x678c, 0xe08c, - 0x3c67, 0xd50d, 0xb1d8, 0xecb2, - 0xd7ee, 0x6783, 0xfa6c, 0x4b9c - }; - - uint16_t* block_pointer = (uint16_t*)hash; - for (int r = 0; r < X25X_SHUFFLE_ROUNDS; r++) { - for (int i = 0; i < X25X_SHUFFLE_BLOCKS; i++) { - uint16_t block_value = block_pointer[X25X_SHUFFLE_BLOCKS - i - 1]; - block_pointer[i] ^= block_pointer[block_value % X25X_SHUFFLE_BLOCKS] + (x25x_round_const[r] << (i % 16)); - } - } - - blake2s_simple((uint8_t*)&hash[24], (const void*)(&hash[0]), 64 * 24); - - memcpy(output, &hash[24], 32); -} diff --git a/stratum/client.h.bak b/stratum/client.h.bak deleted file mode 100644 index c58260b04..000000000 --- a/stratum/client.h.bak +++ /dev/null @@ -1,169 +0,0 @@ - -//struct YAAMP_SOURCE -//{ -//public: -// int count; -// double speed; -// -// char ip[64]; -//}; - -struct YAAMP_ALGO -{ - char name[64]; - YAAMP_HASH_FUNCTION hash_function; - - double diff_multiplier; - double factor; - YAAMP_HASH_FUNCTION merkle_func; - - double profit; - double rent; - - bool overflow; -}; - -struct YAAMP_CLIENT_ALGO -{ - double factor; - YAAMP_ALGO *algo; -}; - -#define YAAMP_JOB_MAXHISTORY 16 - -#define MIN_ADDRESS_LEN 30 /* BTC len can be as few as 26 chars, but gen. 33 or 34 */ -#define MAX_ADDRESS_LEN 35 /* DCR */ - -class YAAMP_CLIENT: public YAAMP_OBJECT -{ -public: - YAAMP_SOCKET *sock; -// YAAMP_SOURCE *source; - - char notify_id[1024]; - int64_t reqid; // ask request id - - int created; - int last_best; - - bool reconnectable; - bool reconnecting; - - int userid; - int workerid; - int coinid; - bool logtraffic; - - int id_int; - const char *id_str; - - char version[1024]; - char username[1024]; - char password[1024]; - char worker[1024]; - - double difficulty_actual; - double difficulty_remote; - double difficulty_written; - bool difficulty_fixed; - - long long last_submit_time; - double shares_per_minute; - - char extranonce1[32]; - int extranonce2size; - - char extranonce1_default[32]; - int extranonce2size_default; - - char extranonce1_last[32]; - int extranonce2size_last; - - char extranonce1_reconnect[32]; - int extranonce2size_reconnect; - - bool extranonce_subscribe; - int submit_bad; - - double speed; - int extranonce1_id; - - int jobid_next; - int jobid_sent; - int jobid_locked; - - YAAMP_CLIENT_ALGO algos_subscribed[YAAMP_MAXALGOS]; - int job_history[YAAMP_JOB_MAXHISTORY]; - - int64_t shares; - int stats; - - int donation; - int broadcast_timeouts; -}; - -inline void client_delete(YAAMP_OBJECT *object) -{ - YAAMP_CLIENT *client = (YAAMP_CLIENT *)object; - if (object == NULL) return; - - socket_close(client->sock); - delete client; - - object = NULL; -} - -////////////////////////////////////////////////////////////////////////// - -YAAMP_CLIENT *client_find_notify_id(const char *notify_id, bool reconnecting); - -void get_next_extraonce1(char *extraonce1); -void get_random_key(char *key); - -void client_sort(); -void client_block_ip(YAAMP_CLIENT *client, const char *reason); -void client_block_ipset(YAAMP_CLIENT *client, const char *ipset_name); - -bool client_reset_multialgo(YAAMP_CLIENT *client, bool first); -bool client_initialize_multialgo(YAAMP_CLIENT *client); - -void client_add_job_history(YAAMP_CLIENT *client, int jobid); -bool client_find_job_history(YAAMP_CLIENT *client, int jobid, int startat=1); - -bool client_find_my_ip(const char *ip); - -////////////////////////////////////////////////////////////////////////// - -int client_send_difficulty(YAAMP_CLIENT *client, double difficulty); -double client_normalize_difficulty(double difficulty); - -void client_change_difficulty(YAAMP_CLIENT *client, double difficulty); -void client_record_difficulty(YAAMP_CLIENT *client); -void client_adjust_difficulty(YAAMP_CLIENT *client); - -void client_initialize_difficulty(YAAMP_CLIENT *client); - -////////////////////////////////////////////////////////////////////////// - -int client_call(YAAMP_CLIENT *client, const char *method, const char *format, ...); -int client_ask(YAAMP_CLIENT *client, const char *method, const char *format, ...); - -void client_dump_all(); - -int client_send_result(YAAMP_CLIENT *client, const char *format, ...); -int client_send_error(YAAMP_CLIENT *client, int error, const char *string); - -bool client_ask_stats(YAAMP_CLIENT *client); - -bool client_submit(YAAMP_CLIENT *client, json_value *json_params); - -int client_workers_count(YAAMP_CLIENT *client); -int client_workers_byaddress(const char *username); -bool client_auth_by_workers(YAAMP_CLIENT *client); - -void *client_thread(void *p); - -void db_check_user_input(char* input); - -//void source_prune(); - diff --git a/stratum/client_difficulty.cpp.bak b/stratum/client_difficulty.cpp.bak deleted file mode 100644 index e3894bb40..000000000 --- a/stratum/client_difficulty.cpp.bak +++ /dev/null @@ -1,106 +0,0 @@ - -#include "stratum.h" - -double client_normalize_difficulty(double difficulty) -{ - if(difficulty < g_stratum_min_diff) difficulty = g_stratum_min_diff; - else if(difficulty < 1) difficulty = floor(difficulty*100000000/2)/100000000*2; - else if(difficulty > 1) difficulty = floor(difficulty/2)*2; - if(difficulty > g_stratum_max_diff) difficulty = g_stratum_max_diff; - return difficulty; -} - -void client_record_difficulty(YAAMP_CLIENT *client) -{ - if(client->difficulty_remote) - { - client->last_submit_time = current_timestamp(); - return; - } - - int e = current_timestamp() - client->last_submit_time; - if(e < 500) e = 500; - int p = 5; - - client->shares_per_minute = (client->shares_per_minute * (100 - p) + 60*1000*p/e) / 100; - client->last_submit_time = current_timestamp(); - -// debuglog("client->shares_per_minute %f\n", client->shares_per_minute); -} - -void client_change_difficulty(YAAMP_CLIENT *client, double difficulty) -{ - if(difficulty <= 0) return; - - difficulty = client_normalize_difficulty(difficulty); - if(difficulty <= 0) return; - -// debuglog("change diff to %f %f\n", difficulty, client->difficulty_actual); - if(difficulty == client->difficulty_actual) return; - - uint64_t user_target = diff_to_target(difficulty); - if(user_target >= YAAMP_MINDIFF && user_target <= YAAMP_MAXDIFF) - { - client->difficulty_actual = difficulty; - client_send_difficulty(client, difficulty); - } -} - -void client_adjust_difficulty(YAAMP_CLIENT *client) -{ - if(client->difficulty_remote) { - client_change_difficulty(client, client->difficulty_remote); - return; - } - - if(client->shares_per_minute > 100) - client_change_difficulty(client, client->difficulty_actual*4); - - else if(client->difficulty_fixed) - return; - - else if(client->shares_per_minute > 20) - client_change_difficulty(client, client->difficulty_actual*2); - - else if(client->shares_per_minute > 15) - client_change_difficulty(client, client->difficulty_actual*1.5); - - else if(client->shares_per_minute < 5) - client_change_difficulty(client, client->difficulty_actual/2); -} - -int client_send_difficulty(YAAMP_CLIENT *client, double difficulty) -{ -// debuglog("%s diff %f\n", client->sock->ip, difficulty); - client->shares_per_minute = YAAMP_SHAREPERSEC; - - if(difficulty >= 1) - client_call(client, "mining.set_difficulty", "[%.0f]", difficulty); - else - client_call(client, "mining.set_difficulty", "[%.8f]", difficulty); - return 0; -} - -void client_initialize_difficulty(YAAMP_CLIENT *client) -{ - char *p = strstr(client->password, "d="); - char *p2 = strstr(client->password, "decred="); - if(!p || p2) return; - - double diff = client_normalize_difficulty(atof(p+2)); - uint64_t user_target = diff_to_target(diff); - -// debuglog("%016llx target\n", user_target); - if(user_target >= YAAMP_MINDIFF && user_target <= YAAMP_MAXDIFF) - { - client->difficulty_actual = diff; - client->difficulty_fixed = true; - } - -} - - - - - - diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak deleted file mode 100644 index 7c1c36149..000000000 --- a/stratum/client_submit.cpp.bak +++ /dev/null @@ -1,594 +0,0 @@ - -#include "stratum.h" - -uint64_t lyra2z_height = 0; - -//#define MERKLE_DEBUGLOG -//#define DONTSUBMIT - -void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, - const char *nonce1, const char *nonce2, const char *ntime, const char *nonce) -{ - sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); - int coinbase_len = strlen(submitvalues->coinbase); - - unsigned char coinbase_bin[1024]; - memset(coinbase_bin, 0, 1024); - binlify(coinbase_bin, submitvalues->coinbase); - - char doublehash[128]; - memset(doublehash, 0, 128); - - // some (old) wallet/algos need a simple SHA256 (blakecoin, whirlcoin, groestlcoin...) - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - if (g_current_algo->merkle_func) - merkle_hash = g_current_algo->merkle_func; - merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); - - string merkleroot = merkle_with_first(templ->txsteps, doublehash); - ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); - -#ifdef MERKLE_DEBUGLOG - printf("merkle root %s\n", merkleroot.c_str()); -#endif - if (!strcmp(g_current_algo->name, "lbry")) { - sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - templ->claim_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 32 + 20); - } else { - sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 20); - } - - binlify(submitvalues->header_bin, submitvalues->header_be); - -// printf("%s\n", submitvalues->header_be); - int header_len = strlen(submitvalues->header)/2; - g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); - - hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); - string_be(submitvalues->hash_hex, submitvalues->hash_be); -} - -///////////////////////////////////////////// - -static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *out, - const char *ntime, const char *nonce, const char *nonce2, const char *vote, bool usegetwork) -{ - struct __attribute__((__packed__)) { - uint32_t version; - char prevblock[32]; - char merkleroot[32]; - char stakeroot[32]; - uint16_t votebits; - char finalstate[6]; - uint16_t voters; - uint8_t freshstake; - uint8_t revoc; - uint32_t poolsize; - uint32_t nbits; - uint64_t sbits; - uint32_t height; - uint32_t size; - uint32_t ntime; - uint32_t nonce; - unsigned char extra[32]; - uint32_t stakever; - uint32_t hashtag[3]; - } header; - - memcpy(&header, templ->header, sizeof(header)); - - memset(header.extra, 0, 32); - sscanf(nonce, "%08x", &header.nonce); - - if (strcmp(vote, "")) { - uint16_t votebits = 0; - sscanf(vote, "%04hx", &votebits); - header.votebits = (header.votebits & 1) | (votebits & 0xfffe); - } - - binlify(header.extra, nonce2); - - hexlify(out->header, (const unsigned char*) &header, 180); - memcpy(out->header_bin, &header, sizeof(header)); -} - -static void build_submit_values_decred(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, - const char *nonce1, const char *nonce2, const char *ntime, const char *nonce, const char *vote, bool usegetwork) -{ - if (!usegetwork) { - // not used yet - char doublehash[128] = { 0 }; - - sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); - int coinbase_len = strlen(submitvalues->coinbase); - - unsigned char coinbase_bin[1024]; - memset(coinbase_bin, 0, 1024); - binlify(coinbase_bin, submitvalues->coinbase); - - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - if (g_current_algo->merkle_func) - merkle_hash = g_current_algo->merkle_func; - merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); - - string merkleroot = merkle_with_first(templ->txsteps, doublehash); - ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); - -#ifdef MERKLE_DEBUGLOG - printf("merkle root %s\n", merkleroot.c_str()); -#endif - } - create_decred_header(templ, submitvalues, ntime, nonce, nonce2, vote, usegetwork); - - int header_len = strlen(submitvalues->header)/2; - g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); - - hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); - string_be(submitvalues->hash_hex, submitvalues->hash_be); -} - -///////////////////////////////////////////////////////////////////////////////// - -static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VALUES *submitvalues, - char *extranonce2, char *ntime, char *nonce, char *vote) -{ - YAAMP_COIND *coind = job->coind; - YAAMP_JOB_TEMPLATE *templ = job->templ; - - if(job->block_found) return; - if(job->deleted) return; - - uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); - uint64_t coin_target = decode_compact(templ->nbits); - if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - // please forgive me for this hack jebus - if (strstr(g_current_algo->name,"balloon") && - (submitvalues->hash_bin[30] | submitvalues->hash_bin[31])) - coin_target = 0x0; - - int block_size = YAAMP_SMALLBUFSIZE; - vector::const_iterator i; - - for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) - block_size += strlen((*i).c_str()); - - char *block_hex = (char *)malloc(block_size); - if(!block_hex) return; - - // do aux first - for(int i=0; iauxs_size; i++) - { - if(!templ->auxs[i]) continue; - YAAMP_COIND *coind_aux = templ->auxs[i]->coind; - - if(!coind_aux || !strcmp(coind->symbol, coind_aux->symbol2)) - continue; - - unsigned char target_aux[1024]; - binlify(target_aux, coind_aux->aux.target); - - uint64_t coin_target_aux = get_hash_difficulty(target_aux); - if(hash_int <= coin_target_aux) - { - memset(block_hex, 0, block_size); - - strcat(block_hex, submitvalues->coinbase); // parent coinbase - strcat(block_hex, submitvalues->hash_be); // parent hash - - ////////////////////////////////////////////////// parent merkle steps - - sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)templ->txsteps.size()); - - vector::const_iterator i; - for(i = templ->txsteps.begin(); i != templ->txsteps.end(); ++i) - sprintf(block_hex + strlen(block_hex), "%s", (*i).c_str()); - - strcat(block_hex, "00000000"); - - ////////////////////////////////////////////////// auxs merkle steps - - vector lresult = coind_aux_merkle_branch(templ->auxs, templ->auxs_size, coind_aux->aux.index); - sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)lresult.size()); - - for(i = lresult.begin(); i != lresult.end(); ++i) - sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); - - sprintf(block_hex+strlen(block_hex), "%02x000000", (unsigned char)coind_aux->aux.index); - - ////////////////////////////////////////////////// parent header - - strcat(block_hex, submitvalues->header_be); - - bool b = coind_submitgetauxblock(coind_aux, coind_aux->aux.hash, block_hex); - if(b) - { - debuglog("*** ACCEPTED %s %d (+1)\n", coind_aux->name, coind_aux->height); - - block_add(client->userid, client->workerid, coind_aux->id, coind_aux->height, target_to_diff(coin_target_aux), - target_to_diff(hash_int), coind_aux->aux.hash, "", 0); - } - - else - debuglog("%s %d REJECTED\n", coind_aux->name, coind_aux->height); - } - } - - if(hash_int <= coin_target) - { - char count_hex[8] = { 0 }; - if (templ->txcount <= 252) - sprintf(count_hex, "%02x", templ->txcount & 0xFF); - else - sprintf(count_hex, "fd%02x%02x", templ->txcount & 0xFF, templ->txcount >> 8); - - memset(block_hex, 0, block_size); - sprintf(block_hex, "%s%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); - - if (g_current_algo->name && !strcmp("jha", g_current_algo->name)) { - // block header of 88 bytes - sprintf(block_hex, "%s8400000008000000%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); - } - - vector::const_iterator i; - for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) - sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); - - // POS coins need a zero byte appended to block, the daemon replaces it with the signature - if(coind->pos) - strcat(block_hex, "00"); - - if(!strcmp("DCR", coind->rpcencoding)) { - // submit the regenerated block header - char hex[384]; - hexlify(hex, submitvalues->header_bin, 180); - if (coind->usegetwork) - snprintf(block_hex, block_size, "%s8000000100000000000005a0", hex); - else - snprintf(block_hex, block_size, "%s", hex); - } - - bool b = coind_submit(coind, block_hex); - if(b) - { - debuglog("*** ACCEPTED %s %d (diff %g) by %s (id: %d)\n", coind->name, templ->height, - target_to_diff(hash_int), client->sock->ip, client->userid); - - job->block_found = true; - - char doublehash2[128]; - memset(doublehash2, 0, 128); - - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - //if (g_current_algo->merkle_func) - // merkle_hash = g_current_algo->merkle_func; - - merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - - // isnt perfect, but it works - if(strcmp(coind->symbol, "SIN") == 0) - x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - - char hash1[1024]; - memset(hash1, 0, 1024); - - string_be(doublehash2, hash1); - - if(coind->usegetwork && !strcmp("DCR", coind->rpcencoding)) { - // no merkle stuff - strcpy(hash1, submitvalues->hash_hex); - } - - block_add(client->userid, client->workerid, coind->id, templ->height, - target_to_diff(coin_target), target_to_diff(hash_int), - hash1, submitvalues->hash_be, templ->has_segwit_txs); - - if(!strcmp("DCR", coind->rpcencoding)) { - // delay between dcrd and dcrwallet - sleep(1); - } - - if(!strcmp(coind->lastnotifyhash,submitvalues->hash_be)) { - block_confirm(coind->id, submitvalues->hash_be); - } - - if (g_debuglog_hash) { - debuglog("--------------------------------------------------------------\n"); - debuglog("hash1 %s\n", hash1); - debuglog("hash2 %s\n", submitvalues->hash_be); - } - } - - else { - debuglog("*** REJECTED :( %s block %d %d txs\n", coind->name, templ->height, templ->txcount); - rejectlog("REJECTED %s block %d\n", coind->symbol, templ->height); - if (g_debuglog_hash) { - //debuglog("block %s\n", block_hex); - debuglog("--------------------------------------------------------------\n"); - } - } - } - - free(block_hex); -} - -bool dump_submit_debug(const char *title, YAAMP_CLIENT *client, YAAMP_JOB *job, char *extranonce2, char *ntime, char *nonce) -{ - debuglog("ERROR %s, %s subs %d, job %x, %s, id %x, %d, %s, %s %s\n", - title, client->sock->ip, client->extranonce_subscribe, job? job->id: 0, client->extranonce1, - client->extranonce1_id, client->extranonce2size, extranonce2, ntime, nonce); -} - -void client_submit_error(YAAMP_CLIENT *client, YAAMP_JOB *job, int id, const char *message, char *extranonce2, char *ntime, char *nonce) -{ -// if(job->templ->created+2 > time(NULL)) - if(job && job->deleted) - client_send_result(client, "true"); - - else - { - client_send_error(client, id, message); - share_add(client, job, false, extranonce2, ntime, nonce, 0, id); - - client->submit_bad++; - if (g_debuglog_hash) { - dump_submit_debug(message, client, job, extranonce2, ntime, nonce); - } - } - - object_unlock(job); -} - -static bool ntime_valid_range(const char ntimehex[]) -{ - time_t rawtime = 0; - uint32_t ntime = 0; - if (strlen(ntimehex) != 8) return false; - sscanf(ntimehex, "%8x", &ntime); - if (ntime < 0x5b000000 || ntime > 0x60000000) // 14 Jan 2021 - return false; - time(&rawtime); - return (abs(rawtime - ntime) < (30 * 60)); -} - -bool client_submit(YAAMP_CLIENT *client, json_value *json_params) -{ - bool isBalloon = false; - - if (strstr(g_current_algo->name,"balloon")) - isBalloon = true; - - // submit(worker_name, jobid, extranonce2, ntime, nonce): - if(json_params->u.array.length<5) - { - debuglog("%s - %s bad message\n", client->username, client->sock->ip); - client->submit_bad++; - return false; - } - - char extranonce2[32]; - char ntime[32]; - char nonce[32]; - char vote[8]; - - memset(extranonce2, 0, 32); - memset(ntime, 0, 32); - memset(nonce, 0, 32); - memset(vote, 0, 8); - - if (!json_params->u.array.values[1]->u.string.ptr || strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { - clientlog(client, "bad json, wrong jobid len"); - client->submit_bad++; - return false; - } - int jobid = htoi(json_params->u.array.values[1]->u.string.ptr); - - strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); - strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); - strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); - if (json_params->u.array.length == 6) - strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); - - if (g_debuglog_hash) { - debuglog("submit %s (uid %d) %d, %s, %s, %s\n", client->sock->ip, client->userid, jobid, extranonce2, ntime, nonce); - } - - string_lower(extranonce2); - string_lower(ntime); - string_lower(nonce); - string_lower(vote); - if (json_params->u.array.length == 6) { - if (strstr(g_stratum_algo, "phi")) { - // lux optional field, smart contral root hashes (not mandatory on shares submit) - strncpy(extra, json_params->u.array.values[5]->u.string.ptr, 128); - string_lower(extra); - } else { - // heavycoin vote - strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); - string_lower(vote); - } - } - - if (g_debuglog_hash) { - debuglog("submit %s (uid %d) %d, %s, t=%s, n=%s, extra=%s\n", client->sock->ip, client->userid, - jobid, extranonce2, ntime, nonce, extra); - } - - YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); - if(!job) - { - client_submit_error(client, NULL, 21, "Invalid job id", extranonce2, ntime, nonce); - return true; - } - - if(job->deleted) - { - client_send_result(client, "true"); - object_unlock(job); - - return true; - } - - bool is_decred = job->coind && !strcmp("DCR", job->coind->rpcencoding); - - YAAMP_JOB_TEMPLATE *templ = job->templ; - - if(strlen(nonce) != YAAMP_NONCE_SIZE*2 || !ishexa(nonce, YAAMP_NONCE_SIZE*2)) { - client_submit_error(client, job, 20, "Invalid nonce size", extranonce2, ntime, nonce); - return true; - } - - if(strcmp(ntime, templ->ntime)) - { - if (!ntime_valid_range(ntime)) { - client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); - return true; - } - // dont allow algos permutations change over time (can lead to different speeds) - if (!g_allow_rolltime) { - client_submit_error(client, job, 23, "Invalid ntime (rolling not allowed)", extranonce2, ntime, nonce); - return true; - } - } - - YAAMP_SHARE *share = share_find(job->id, extranonce2, ntime, nonce, client->extranonce1); - if(share) - { - client_submit_error(client, job, 22, "Duplicate share", extranonce2, ntime, nonce); - return true; - } - - if(strlen(extranonce2) != client->extranonce2size*2) - { - client_submit_error(client, job, 24, "Invalid extranonce2 size", extranonce2, ntime, nonce); - return true; - } - - // check if the submitted extranonce is valid - if(is_decred && client->extranonce2size > 4) { - char extra1_id[16], extra2_id[16]; - int cmpoft = client->extranonce2size*2 - 8; - strcpy(extra1_id, &client->extranonce1[cmpoft]); - strcpy(extra2_id, &extranonce2[cmpoft]); - int extradiff = (int) strcmp(extra2_id, extra1_id); - int extranull = (int) !strcmp(extra2_id, "00000000"); - if (extranull && client->extranonce2size > 8) - extranull = (int) !strcmp(&extranonce2[8], "00000000" "00000000"); - if (extranull) { - debuglog("extranonce %s is empty!, should be %s - %s\n", extranonce2, extra1_id, client->sock->ip); - client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); - return true; - } - if (extradiff) { - // some ccminer pre-release doesn't fill correctly the extranonce - client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); - socket_send(client->sock, "{\"id\":null,\"method\":\"mining.set_extranonce\",\"params\":[\"%s\",%d]}\n", - client->extranonce1, client->extranonce2size); - return true; - } - } - else if(!ishexa(extranonce2, client->extranonce2size*2)) { - client_submit_error(client, job, 27, "Invalid nonce2", extranonce2, ntime, nonce); - return true; - } - - /////////////////////////////////////////////////////////////////////////////////////////// - - YAAMP_JOB_VALUES submitvalues; - memset(&submitvalues, 0, sizeof(submitvalues)); - - if(is_decred) - build_submit_values_decred(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce, vote, true); - else - build_submit_values(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce); - - if (templ->height && !strcmp(g_current_algo->name,"lyra2z")) { - lyra2z_height = templ->height; - } - - // minimum hash diff begins with 0000, for all... - uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; - - // except balloon - if(isBalloon) - pfx = (submitvalues.hash_bin[30] > 0x0b) | submitvalues.hash_bin[31]; - - if(pfx) { - if (g_debuglog_hash) { - debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, - (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], - (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); - } - client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); - return true; - } - - // bit dim, but so is measuring the diff this way - uint64_t user_target; - uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); - uint64_t coin_target = decode_compact(templ->nbits); - uint64_t hashcomb = * (uint64_t *) &submitvalues.hash_bin[24]; - - // prevents overflow - if(!isBalloon) { - user_target = diff_to_target(client->difficulty_actual); - } - if(templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - // due to balloon's lower diff - if (g_debuglog_hash && isBalloon) { - debuglog("hash %016lx \n", hashcomb); - debuglog("targ %016lx \n", sharetotarg(client->difficulty_actual)); - } - if (g_debuglog_hash && !isBalloon) { - debuglog("%016llx actual\n", hash_int); - debuglog("%016llx target\n", user_target); - debuglog("%016llx coin\n", coin_target); - } - - // due to balloon's lower diff - if(hashcomb > sharetotarg(client->difficulty_actual) && isBalloon) - { - client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); - return true; - } - if(hash_int > user_target && hash_int > coin_target && !isBalloon) - { - client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); - return true; - } - - if(job->coind) - client_do_submit(client, job, &submitvalues, extranonce2, ntime, nonce, vote); - else - remote_submit(client, job, &submitvalues, extranonce2, ntime, nonce); - - client_send_result(client, "true"); - client_record_difficulty(client); - client->submit_bad = 0; - client->shares++; - if (client->shares <= 200 && (client->shares % 50) == 0) { - // 4 records are enough per miner - if (!client_ask_stats(client)) client->stats = false; - } - - double share_diff = diff_to_target(hash_int); -// if (g_current_algo->diff_multiplier != 0) { -// share_diff = share_diff / g_current_algo->diff_multiplier; -// } - - if (g_debuglog_hash) { - // only log a few... - if (share_diff > (client->difficulty_actual * 16)) - debuglog("submit %s (uid %d) %d, %s, %s, %s, %.3f/%.3f\n", client->sock->ip, client->userid, - jobid, extranonce2, ntime, nonce, share_diff, client->difficulty_actual); - } - - share_add(client, job, true, extranonce2, ntime, nonce, share_diff, 0); - object_unlock(job); - - return true; -} diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak deleted file mode 100644 index 7bd8f1381..000000000 --- a/stratum/coinbase.cpp.bak +++ /dev/null @@ -1,940 +0,0 @@ - -// http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html - -// https://en.bitcoin.it/wiki/Merged_mining_specification#Merged_mining_coinbase - -#include "stratum.h" - -#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) - -static void encode_tx_value(char *encoded, json_int_t value) -{ - sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", - TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), - TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); -} - -static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(payee) >> 1) & 0xFF, payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - encode_tx_value(evalue, amount); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - - -static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - encode_tx_value(evalue, amount); - sprintf(coinb2_part, "%s", script); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - -static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) -{ - int ol = strlen(data); - char evalue[32]; - - if(coind->p2sh_address && !key) { - p2sh_pack_tx(coind, data, amount, coind->script_pubkey); - return; - } - - encode_tx_value(evalue, amount); - sprintf(data+strlen(data), "%s", evalue); - - if(coind->pos && !key) - sprintf(data+strlen(data), "2321%sac", coind->pubkey); - - else - sprintf(data+strlen(data), "1976a914%s88ac", key? key: coind->script_pubkey); - -// debuglog("pack tx %s\n", data+ol); -// debuglog("pack tx %lld\n", amount); -} - -void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) -{ - vector hashlist = coind_aux_hashlist(templ->auxs, templ->auxs_size); - while(hashlist.size() > 1) - { - vector l; - for(int i = 0; i < hashlist.size()/2; i++) - { - string s = hashlist[i*2] + hashlist[i*2+1]; - - char bin[YAAMP_HASHLEN_BIN*2]; - char out[YAAMP_HASHLEN_STR]; - - binlify((unsigned char *)bin, s.c_str()); - sha256_double_hash_hex(bin, out, YAAMP_HASHLEN_BIN*2); - - l.push_back(out); - } - - hashlist = l; - } - - char merkle_hash[4*1024]; - memset(merkle_hash, 0, 4*1024); - string_be(hashlist[0].c_str(), merkle_hash); - - sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); -// debuglog("aux_script is %s\n", aux_script); -} - -void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) -{ - char eheight[32], etime[32]; - char entime[32] = { 0 }; - char commitment[128] = { 0 }; - - ser_number(templ->height, eheight); - ser_number(time(NULL), etime); - if(coind->pos) ser_string_be(templ->ntime, entime, 1); - - char eversion1[32] = "01000000"; - if(coind->txmessage) - strcpy(eversion1, "02000000"); - - const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); - if(coinbase_payload && strlen(coinbase_payload) > 0) - strcpy(eversion1, "03000500"); - - char script1[4*1024]; - sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - - char script2[32] = "746865706f6f6c2e6c6966655c30"; // "thepool.life\0" in hex ascii - - if(!coind->pos && !coind->isaux && templ->auxs_size) - coinbase_aux(templ, script2); - - int script_len = strlen(script1)/2 + strlen(script2)/2 + 8; - sprintf(templ->coinb1, "%s%s01" - "0000000000000000000000000000000000000000000000000000000000000000" - "ffffffff%02x%s", eversion1, entime, script_len, script1); - - sprintf(templ->coinb2, "%s00000000", script2); - - // segwit commitment, if needed - if (templ->has_segwit_txs) - sprintf(commitment, "0000000000000000%02x%s", (int) (strlen(coind->commitment)/2), coind->commitment); - - json_int_t available = templ->value; - - // sample coins using mandatory dev/foundation fees - if(strcmp(coind->symbol, "EGC") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 2; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); - } - - if(strcmp(coind->symbol, "SIN") == 0) - { - int npayees = 1; - char payees[2]; - char sinpayee[256] = {0}; - char sinscript[1024] = {0}; - char devpayee[256] = {0}; - char devscript[1024] = {0}; - const char *devpayaddr = json_get_string(json_result, "payee"); - json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); - snprintf(devpayee, 255, "%s", devpayaddr); - base58_decode(devpayee, devscript); - npayees++; - - available -= devfee_amount; - const char* mnpayaddrs[7] = {0}; - json_value* masternodes = json_get_array(json_result, "masternode"); - json_int_t mnamounts[7] = {0}; - for(int i = 0; i < masternodes->u.array.length; i++) { - mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); - mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); - available -= mnamounts[i]; - npayees++; - } - - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); - for(int i = 0; i < masternodes->u.array.length; i++) { - snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); - base58_decode(sinpayee, sinscript); - job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); - } - - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available/100000000; - return; - } - - else if(strcmp(coind->symbol, "DYN") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[3]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool dynode_enabled; - dynode_enabled = json_get_bool(json_result, "dynode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* dynode; - dynode = json_get_object(json_result, "dynode"); - if(!dynode && json_get_bool(json_result, "dynode_payments")) { - coind->oldmasternodes = true; - debuglog("%s is using old dynodes rpc keys\n", coind->symbol); - return; - } - - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock found %s %u\n", coind->symbol, payee, amount); - } - } - } - if (dynode_enabled && dynode) { - bool started; - started = json_get_bool(json_result, "dynode_payments_started"); - const char *payee = json_get_string(dynode, "payee"); - json_int_t amount = json_get_int(dynode, "amount"); - if (!payee) - debuglog("coinbase_create failed to get Dynode payee\n"); - - if (!amount) - debuglog("coinbase_create failed to get Dynode amount\n"); - - if (!started) - debuglog("coinbase_create failed to get Dynode started\n"); - - if (payee && amount && started) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s dynode found %s %u\n", coind->symbol, payee, amount); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - else if(strcmp(coind->symbol, "LTCR") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 10; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); - } - else if(strcmp(coind->symbol, "XZC") == 0) { - char script_payee[1024]; - if (coind->charity_percent <= 0) - coind->charity_percent = 25; // wrong coinbase 40 instead of 40 + 10 = 50 - - json_int_t charity_amount = (available * coind->charity_percent) / 100; - - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD"); - - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode(coind->charity_address, script_payee); // may change - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); - job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - else if(strcmp("DCR", coind->rpcencoding) == 0) { - coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 - coind->charity_percent = 0; - coind->charity_amount = available; - available *= coind->reward_mul; - if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) - sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); - } - else if(strcmp(coind->symbol, "STAK") == 0) { - char script_payee[512] = { 0 }; - char payees[4]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - - //treasury 5% @ 10 STAK per block - json_int_t charity_amount = 50000000; - //testnet - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - switch (templ->height % 4) { - case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); - break; - case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); - break; - case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); - break; - case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); - break; - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if ( - (strcmp(coind->symbol, "IFX") == 0)|| - (strcmp(coind->symbol, "GTM") == 0)|| - (strcmp(coind->symbol, "GOV") == 0)|| - (strcmp(coind->symbol, "GWAY") == 0)|| - (strcmp(coind->symbol, "ALMN") == 0)|| - (strcmp(coind->symbol, "AGM") == 0)|| - (strcmp(coind->symbol, "BMN") == 0)|| - (strcmp(coind->symbol, "CRDS") == 0)) - { - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - if (masternode) - { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "BZX") == 0) { - char script_payee[1024]; - - bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "bznode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "04"); - job_pack_tx(coind, templ->coinb2, available, NULL); - - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "03"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - - base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); - job_pack_tx(coind, templ->coinb2, 7.5 * 100000000, script_payee); - - base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); - job_pack_tx(coind, templ->coinb2, 1.5 * 100000000, script_payee); - - - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - - return; - } - - else if(strcmp(coind->symbol, "SECI") == 0) { - char script_payee[512] = { 0 }; - char payees[1]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //mainnet - json_int_t charity_amount = 50000000; - sprintf(coind->charity_address, "3FMmX2S8yknSZ4NsxtxbQwQkgvbe81R5kR"); - //testnet - //json_int_t charity_amount = 50000000; - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "TUX") == 0) { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "donation_payee"); - if(payee != NULL){ - sprintf(coind->charity_address, "%s", payee); - } else { - sprintf(coind->charity_address, "%s", ""); - } - - if(strlen(coind->charity_address) > 0){ - char script_payee[1024]; - char charity_payee[256] = { 0 }; - sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "donation_amount"); - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - debuglog("pack tx %s\n", coinb2_part); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - } - - bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); - json_value* founder = json_get_object(json_result, "founder"); - - if (!coind->hasmasternodes && founder_enabled && founder) { - char founder_payee[256] = { 0 }; - char founder_script[1024] = { 0}; - const char *payee = json_get_string(founder, "payee"); - bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); - json_int_t amount = json_get_int(founder, "amount"); - if(payee && amount) { - if (payee) snprintf(founder_payee, 255, "%s", payee); - if (strlen(founder_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - base58_decode(founder_payee, founder_script); - available -= amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - if(founder_use_p2sh) { - p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); - } else { - job_pack_tx(coind, templ->coinb2, amount, founder_script); - } - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); - debuglog("%s founder script %s\n", coind->symbol,founder_script); - debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - - return; - } - } - - // 2 txs are required on these coins, one for foundation (dev fees) - if(coind->charity_percent && !coind->hasmasternodes) - { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - if (charity_amount <= 0) - charity_amount = (available * coind->charity_percent) / 100; - - available -= charity_amount; - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - - else if(coind->charity_amount && !strcmp("DCR", coind->rpcencoding)) - { - stratumlog("ERROR %s should not use coinbase (getwork only)!\n", coind->symbol); - coind->reward = (double)available/100000000; - return; - } - - if(strcmp(coind->symbol, "XVC") == 0) - { - char charity_payee[256]; - json_value* incentive = json_get_object(json_result, "incentive"); - if (incentive) { - const char* payee = json_get_string(incentive, "address"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - - bool enforced = json_get_bool(incentive, "enforced"); - json_int_t charity_amount = json_get_int(incentive, "amount"); - if (enforced && charity_amount && strlen(charity_payee)) { - char script_payee[1024]; - base58_decode(charity_payee, script_payee); - - strcat(templ->coinb2, "02"); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->charity_amount = charity_amount; - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("XVC coinbase %ld (+%ld incentive to %s)\n", - // (long) available, (long) charity_amount, charity_payee); - return; - } - } - } - - // most recent masternodes rpc (DASH, SIB, MUE, DSR, GBX...) - if(coind->hasmasternodes && !coind->oldmasternodes) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; // addresses count - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "masternode"); - if(!masternode && json_get_bool(json_result, "masternode_payments")) { - coind->oldmasternodes = true; - debuglog("%s is using old masternodes rpc keys\n", coind->symbol); - return; - } - if(coind->charity_percent) { - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - json_int_t charity_amount = (available * coind->charity_percent) / 100; - npayees++; - available -= charity_amount; - coind->charity_amount = charity_amount; - base58_decode(charity_payee, script_payee); - job_pack_tx(coind, script_dests, charity_amount, script_payee); - } - // smart contracts balance refund, same format as DASH superblocks - json_value* screfund = json_get_array(json_result, "screfund"); - if(screfund && screfund->u.array.length) { - superblocks_enabled = true; - superblock = screfund; - } - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - const char *script = json_get_string(superblock->u.array.values[i], "script"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(superblock_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (masternode_enabled && masternode && started) { - if (json_is_array(masternode)) { - for(int i = 0; i < masternode->u.array.length; i++) { - const char *payee = json_get_string(masternode->u.array.values[i], "payee"); - const char *script = json_get_string(masternode->u.array.values[i], "script"); - json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); - } - } - } else { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - if(coinbase_payload && strlen(coinbase_payload) > 0) { - char coinbase_payload_size[18]; - ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload); strcat(templ->coinb2, coinbase_payload); - } - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ARC") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "goldminenode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ENT") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "eternitynode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "eternitynode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - - else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ - { - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - bool charity_payments = json_get_bool(json_result, "masternode_payments"); - bool charity_enforce = json_get_bool(json_result, "enforce_masternode_payments"); - - if(strcmp(coind->symbol, "CRW") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - bool systemnodes_enabled = json_get_bool(json_result, "enforce_systemnode_payments"); - bool systemnodes = json_get_bool(json_result, "systemnodes"); - bool masternodes = json_get_bool(json_result, "masternodes"); - if(systemnodes_enabled && systemnodes) { - const char *payeeSN = json_get_string(json_result, "payeeSN"); - json_int_t payeeSN_amount = json_get_int(json_result, "payeeSN_amount"); - if (payeeSN && payeeSN_amount) { - npayees++; - available -= payeeSN_amount; - base58_decode(payeeSN, script_payee); - job_pack_tx(coind, script_dests, payeeSN_amount, script_payee); - //debuglog("%s systemnode %s %u\n", coind->symbol, payeeSN, payeeSN_amount); - } - } - if (masternodes_enabled && masternodes) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - if(charity_payments && charity_enforce) - { - char script_payee[256] = { 0 }; - base58_decode(charity_payee, script_payee); - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + node + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); // 2 outputs - } - - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - available -= charity_amount; - - } else { - strcat(templ->coinb2, "01"); - } - } - - else if (templ->has_segwit_txs) { - strcat(templ->coinb2, "02"); - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "01"); - } - - job_pack_tx(coind, templ->coinb2, available, NULL); - - //if(coind->txmessage) - // strcat(templ->coinb2, "00"); - if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. - if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; -// debuglog("coinbase %f\n", coind->reward); - -// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); -// debuglog("coinb1 %s\n", templ->coinb1); -// debuglog("coinb2 %s\n", templ->coinb2); -} - - - diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index fca554fd2..ee527db6c 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -163,7 +163,6 @@ YAAMP_ALGO g_algos[] = {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, {"nist5", nist5_hash, 1, 0, 0}, - {"odo", odo_hash, 1, 0, 0}, {"pawelhash", pawelhash_hash, 0x100, 0, 0}, {"penta", penta_hash, 1, 0, 0}, {"phi", phi_hash, 1, 0, 0}, diff --git a/stratum/stratum.cpp.bak b/stratum/stratum.cpp.bak deleted file mode 100644 index ee527db6c..000000000 --- a/stratum/stratum.cpp.bak +++ /dev/null @@ -1,495 +0,0 @@ - -#include "stratum.h" -#include -#include - -CommonList g_list_coind; -CommonList g_list_client; -CommonList g_list_job; -CommonList g_list_remote; -CommonList g_list_renter; -CommonList g_list_share; -CommonList g_list_worker; -CommonList g_list_block; -CommonList g_list_submit; -CommonList g_list_source; - -int g_tcp_port; - -char g_tcp_server[1024]; -char g_tcp_password[1024]; - -char g_sql_host[1024]; -char g_sql_database[1024]; -char g_sql_username[1024]; -char g_sql_password[1024]; -int g_sql_port = 3306; - -char g_stratum_coin_include[256]; -char g_stratum_coin_exclude[256]; - -char g_stratum_algo[256]; -double g_stratum_difficulty; -double g_stratum_nicehash_difficulty; -double g_stratum_nicehash_min_diff; -double g_stratum_nicehash_max_diff; -double g_stratum_min_diff; -double g_stratum_max_diff; - -int g_stratum_max_ttf; -int g_stratum_max_cons = 5000; -bool g_stratum_reconnect; -bool g_stratum_renting; -bool g_stratum_segwit = false; - -int g_limit_txs_per_block = 0; - -bool g_handle_haproxy_ips = false; -int g_socket_recv_timeout = 600; - -bool g_debuglog_client; -bool g_debuglog_hash; -bool g_debuglog_socket; -bool g_debuglog_rpc; -bool g_debuglog_list; -bool g_debuglog_remote; - -bool g_autoexchange = true; - -uint64_t g_max_shares = 0; -uint64_t g_shares_counter = 0; -uint64_t g_shares_log = 0; - -bool g_allow_rolltime = true; -time_t g_last_broadcasted = 0; -YAAMP_DB *g_db = NULL; - -pthread_mutex_t g_db_mutex; -pthread_mutex_t g_nonce1_mutex; -pthread_mutex_t g_job_create_mutex; - -struct ifaddrs *g_ifaddr; - -volatile bool g_exiting = false; - -void *stratum_thread(void *p); -void *monitor_thread(void *p); - -//////////////////////////////////////////////////////////////////////////////////////// - -static void scrypt_hash(const char* input, char* output, uint32_t len) -{ - scrypt_1024_1_1_256((unsigned char *)input, (unsigned char *)output); -} - -static void scryptn_hash(const char* input, char* output, uint32_t len) -{ - time_t time_table[][2] = - { - {2048, 1389306217}, - {4096, 1456415081}, - {8192, 1506746729}, - {16384, 1557078377}, - {32768, 1657741673}, - {65536, 1859068265}, - {131072, 2060394857}, - {262144, 1722307603}, - {524288, 1769642992}, - {0, 0}, - }; - - for(int i=0; time_table[i][0]; i++) - if(time(NULL) < time_table[i+1][1]) - { - scrypt_N_R_1_256(input, output, time_table[i][0], 1, len); - return; - } -} - -static void neoscrypt_hash(const char* input, char* output, uint32_t len) -{ - neoscrypt((unsigned char *)input, (unsigned char *)output, 0x80000620); -} - -YAAMP_ALGO g_algos[] = -{ - {"a5a", a5a_hash, 0x10000, 0, 0}, - {"aergo", aergo_hash, 1, 0, 0}, - {"allium", allium_hash, 0x100, 0, 0}, - {"argon2d-crds", argon2d_crds_hash, 0x10000, 0, 0 }, // Credits Argon2d Implementation - {"argon2d-dyn", argon2d_dyn_hash, 0x10000, 0, 0 }, // Dynamic Argon2d Implementation - {"argon2d-uis", argon2d_uis_hash, 0x10000, 0, 0 }, // Argon2d Implementation - {"argon2m", argon2m_hash, 0x10000, 0, 0}, - {"astralhash", astralhash_hash, 0x100, 0, 0}, - {"balloon", balloon_hash, 1, 0, 0}, - {"bastion", bastion_hash, 1, 0 }, - {"bcd", bcd_hash, 1, 0, 0}, - {"binarium-v1", Binarium_hash_v1_hash, 1, 0, 0}, - {"bitcore", timetravel10_hash, 0x100, 0, 0}, - {"blake", blake_hash, 1, 0 }, - {"blake2b", blake2b_hash, 1, 0 }, - {"blake2s", blake2s_hash, 1, 0 }, - {"blakecoin", blakecoin_hash, 1 /*0x100*/, 0, sha256_hash_hex }, - {"bmw", bmw_hash, 1, 0, 0}, - {"bmw512", bmw512_hash, 0x100, 0, 0}, - {"c11", c11_hash, 1, 0, 0}, - {"decred", decred_hash, 1, 0 }, - {"dedal", dedal_hash, 0x100, 0, 0}, - {"deep", deep_hash, 1, 0, 0}, - {"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */ - {"exosis", exosis_hash, 0x100, 0, 0}, - {"fresh", fresh_hash, 0x100, 0, 0}, - {"geek", geek_hash, 1, 0, 0}, - {"groestl", groestl_hash, 0x100, 0, sha256_hash_hex }, /* groestlcoin */ - {"hex", hex_hash, 0x100, 0, sha256_hash_hex }, - {"hive", hive_hash, 0x10000, 0, 0}, - {"hmq1725", hmq17_hash, 0x10000, 0, 0}, - {"hsr", hsr_hash, 1, 0, 0}, - {"honeycomb", beenode_hash, 0x10000, 0, 0}, - {"jeonghash", jeonghash_hash, 0x100, 0, 0}, - {"jha", jha_hash, 0x10000, 0}, - {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, - {"keccakc", keccak256_hash, 0x100, 0, 0}, - {"lbk3", lbk3_hash, 0x100, 0, 0}, - {"lbry", lbry_hash, 0x100, 0, 0}, - {"luffa", luffa_hash, 1, 0, 0}, - {"lyra2", lyra2re_hash, 0x80, 0, 0}, - {"lyra2v2", lyra2v2_hash, 0x100, 0, 0}, - {"lyra2v3", lyra2v3_hash, 0x100, 0, 0}, - {"lyra2vc0ban", lyra2vc0ban_hash, 0x100, 0, 0}, - {"lyra2z", lyra2z_hash, 0x100, 0, 0}, - {"lyra2zz", lyra2zz_hash, 0x100, 0, 0}, - {"m7m", m7m_hash, 0x10000, 0, 0}, - {"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */ - {"neoscrypt", neoscrypt_hash, 0x10000, 0, 0}, - {"nist5", nist5_hash, 1, 0, 0}, - {"pawelhash", pawelhash_hash, 0x100, 0, 0}, - {"penta", penta_hash, 1, 0, 0}, - {"phi", phi_hash, 1, 0, 0}, - {"phi2", phi2_hash, 0x100, 0, 0}, - {"phi1612", phi1612_hash, 1, 0, 0}, - {"pipe", pipe_hash, 1,0,0}, - {"polytimos", polytimos_hash, 1, 0, 0}, - {"quark", quark_hash, 1, 0, 0}, - {"qubit", qubit_hash, 1, 0, 0}, - {"rainforest", rainforest_hash, 1, 0, 0}, - {"rfv2", rfv2_hash_yiimp, 0x10000, 0, 0}, - {"scrypt", scrypt_hash, 0x10000, 0, 0}, - {"scryptn", scryptn_hash, 0x10000, 0, 0}, - {"sha256", sha256_double_hash, 1, 0, 0}, - {"sha256q", sha256q_hash, 1, 0, 0}, // sha256 4x - {"sha256t", sha256t_hash, 1, 0, 0}, // sha256 3x - {"sib", sib_hash, 1, 0, 0}, - {"skein", skein_hash, 1, 0, 0}, - {"skein2", skein2_hash, 1, 0, 0}, - {"skunk", skunk_hash, 1, 0, 0}, - {"sonoa", sonoa_hash, 1, 0, 0}, - {"timetravel", timetravel_hash, 0x100, 0, 0}, - {"tribus", tribus_hash, 1, 0, 0}, - {"vanilla", blakecoin_hash, 1, 0 }, - {"veltor", veltor_hash, 1, 0, 0}, - {"velvet", velvet_hash, 0x10000, 0, 0}, - {"vitalium", vitalium_hash, 1, 0, 0}, - {"whirlcoin", whirlpool_hash, 1, 0, sha256_hash_hex }, /* old sha merkleroot */ - {"whirlpool", whirlpool_hash, 1, 0 }, /* sha256d merkleroot */ - {"whirlpoolx", whirlpoolx_hash, 1, 0, 0}, - {"x11", x11_hash, 1, 0, 0}, - {"x11evo", x11evo_hash, 1, 0, 0}, - {"x12", x12_hash, 1, 0, 0}, - {"x13", x13_hash, 1, 0, 0}, - {"x14", x14_hash, 1, 0, 0}, - {"x15", x15_hash, 1, 0, 0}, - {"x16r", x16r_hash, 0x100, 0, 0}, - {"x16rv2", x16rv2_hash, 0x100, 0, 0}, - {"x16rt", x16rt_hash, 0x100, 0, 0}, - {"x16s", x16s_hash, 0x100, 0, 0}, - {"x17", x17_hash, 1, 0, 0}, - {"x18", x18_hash, 1, 0, 0}, - {"x20r", x20r_hash, 0x100, 0, 0}, - {"x21s", x21s_hash, 0x100, 0, 0}, - {"x22i", x22i_hash, 1, 0, 0}, - {"x25x", x25x_hash, 1, 0, 0}, - {"xevan", xevan_hash, 0x100, 0, 0}, - {"yescrypt", yescrypt_hash, 0x10000, 0, 0}, - {"yescryptR8", yescryptR8_hash, 0x10000, 0, 0}, - {"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 }, - {"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 }, - {"yespower", yespower_hash, 0x10000, 0, 0 }, - {"yespowerR16", yespowerR16_hash, 0x10000, 0, 0 }, - {"zr5", zr5_hash, 1, 0, 0}, - {"", NULL, 0, 0}, -}; - -YAAMP_ALGO *g_current_algo = NULL; - -YAAMP_ALGO *stratum_find_algo(const char *name) -{ - for(int i=0; g_algos[i].name[0]; i++) - if(!strcmp(name, g_algos[i].name)) - return &g_algos[i]; - - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////////////// - -int main(int argc, char **argv) -{ - if(argc < 2) - { - printf("usage: %s \n", argv[0]); - return 1; - } - - srand(time(NULL)); - getifaddrs(&g_ifaddr); - - initlog(argv[1]); - -#ifdef NO_EXCHANGE - // todo: init with a db setting or a yiimp shell command - g_autoexchange = false; -#endif - - char configfile[1024]; - sprintf(configfile, "%s.conf", argv[1]); - - dictionary *ini = iniparser_load(configfile); - if(!ini) - { - debuglog("cant load config file %s\n", configfile); - return 1; - } - - g_tcp_port = iniparser_getint(ini, "TCP:port", 3333); - strcpy(g_tcp_server, iniparser_getstring(ini, "TCP:server", NULL)); - strcpy(g_tcp_password, iniparser_getstring(ini, "TCP:password", NULL)); - - strcpy(g_sql_host, iniparser_getstring(ini, "SQL:host", NULL)); - strcpy(g_sql_database, iniparser_getstring(ini, "SQL:database", NULL)); - strcpy(g_sql_username, iniparser_getstring(ini, "SQL:username", NULL)); - strcpy(g_sql_password, iniparser_getstring(ini, "SQL:password", NULL)); - g_sql_port = iniparser_getint(ini, "SQL:port", 3306); - - // optional coin filters (to mine only one on a special port or a test instance) - char *coin_filter = iniparser_getstring(ini, "WALLETS:include", NULL); - strcpy(g_stratum_coin_include, coin_filter ? coin_filter : ""); - coin_filter = iniparser_getstring(ini, "WALLETS:exclude", NULL); - strcpy(g_stratum_coin_exclude, coin_filter ? coin_filter : ""); - - strcpy(g_stratum_algo, iniparser_getstring(ini, "STRATUM:algo", NULL)); - g_stratum_difficulty = iniparser_getdouble(ini, "STRATUM:difficulty", 16); - g_stratum_nicehash_difficulty = iniparser_getdouble(ini, "STRATUM:nicehash", 16); - g_stratum_min_diff = iniparser_getdouble(ini, "STRATUM:diff_min", g_stratum_difficulty/2); - g_stratum_max_diff = iniparser_getdouble(ini, "STRATUM:diff_max", g_stratum_difficulty*8192); - g_stratum_nicehash_min_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_min", g_stratum_nicehash_difficulty/2); - g_stratum_nicehash_max_diff = iniparser_getdouble(ini, "STRATUM:nicehash_diff_max", g_stratum_nicehash_difficulty*8192); - - g_stratum_max_cons = iniparser_getint(ini, "STRATUM:max_cons", 5000); - g_stratum_max_ttf = iniparser_getint(ini, "STRATUM:max_ttf", 0x70000000); - g_stratum_reconnect = iniparser_getint(ini, "STRATUM:reconnect", true); - g_stratum_renting = iniparser_getint(ini, "STRATUM:renting", true); - g_handle_haproxy_ips = iniparser_getint(ini, "STRATUM:haproxy_ips", g_handle_haproxy_ips); - g_socket_recv_timeout = iniparser_getint(ini, "STRATUM:recv_timeout", 600); - - g_max_shares = iniparser_getint(ini, "STRATUM:max_shares", g_max_shares); - g_limit_txs_per_block = iniparser_getint(ini, "STRATUM:max_txs_per_block", 0); - - g_debuglog_client = iniparser_getint(ini, "DEBUGLOG:client", false); - g_debuglog_hash = iniparser_getint(ini, "DEBUGLOG:hash", false); - g_debuglog_socket = iniparser_getint(ini, "DEBUGLOG:socket", false); - g_debuglog_rpc = iniparser_getint(ini, "DEBUGLOG:rpc", false); - g_debuglog_list = iniparser_getint(ini, "DEBUGLOG:list", false); - g_debuglog_remote = iniparser_getint(ini, "DEBUGLOG:remote", false); - - iniparser_freedict(ini); - - g_current_algo = stratum_find_algo(g_stratum_algo); - - if(!g_current_algo) yaamp_error("invalid algo"); - if(!g_current_algo->hash_function) yaamp_error("no hash function"); - -// struct rlimit rlim_files = {0x10000, 0x10000}; -// setrlimit(RLIMIT_NOFILE, &rlim_files); - - struct rlimit rlim_threads = {0x8000, 0x8000}; - setrlimit(RLIMIT_NPROC, &rlim_threads); - - stratumlogdate("starting stratum for %s on %s:%d\n", - g_current_algo->name, g_tcp_server, g_tcp_port); - - // ntime should not be changed by miners for these algos - g_allow_rolltime = strcmp(g_stratum_algo,"x11evo"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"timetravel"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"bitcore"); - g_allow_rolltime = g_allow_rolltime && strcmp(g_stratum_algo,"exosis"); - if (!g_allow_rolltime) - stratumlog("note: time roll disallowed for %s algo\n", g_current_algo->name); - - g_db = db_connect(); - if(!g_db) yaamp_error("Cant connect database"); - -// db_query(g_db, "update mining set stratumids='loading'"); - - yaamp_create_mutex(&g_db_mutex); - yaamp_create_mutex(&g_nonce1_mutex); - yaamp_create_mutex(&g_job_create_mutex); - - YAAMP_DB *db = db_connect(); - if(!db) yaamp_error("Cant connect database"); - - db_register_stratum(db); - db_update_algos(db); - db_update_coinds(db); - - sleep(2); - job_init(); - -// job_signal(); - - //////////////////////////////////////////////// - - pthread_t thread1; - pthread_create(&thread1, NULL, monitor_thread, NULL); - - pthread_t thread2; - pthread_create(&thread2, NULL, stratum_thread, NULL); - - sleep(20); - - while(!g_exiting) - { - db_register_stratum(db); - db_update_workers(db); - db_update_algos(db); - db_update_coinds(db); - - if(g_stratum_renting) - { - db_update_renters(db); - db_update_remotes(db); - } - - share_write(db); - share_prune(db); - - block_prune(db); - submit_prune(db); - - sleep(1); - job_signal(); - - //////////////////////////////////// - -// source_prune(); - - object_prune(&g_list_coind, coind_delete); - object_prune(&g_list_remote, remote_delete); - object_prune(&g_list_job, job_delete); - object_prune(&g_list_client, client_delete); - object_prune(&g_list_block, block_delete); - object_prune(&g_list_worker, worker_delete); - object_prune(&g_list_share, share_delete); - object_prune(&g_list_submit, submit_delete); - - if (!g_exiting) sleep(20); - } - - stratumlog("closing database...\n"); - db_close(db); - - pthread_join(thread2, NULL); - db_close(g_db); // client threads (called by stratum one) - - closelogs(); - - return 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -void *monitor_thread(void *p) -{ - while(!g_exiting) - { - sleep(120); - - if(g_last_broadcasted + YAAMP_MAXJOBDELAY < time(NULL)) - { - g_exiting = true; - stratumlogdate("%s dead lock, exiting...\n", g_stratum_algo); - exit(1); - } - - if(g_max_shares && g_shares_counter) { - - if((g_shares_counter - g_shares_log) > 10000) { - stratumlogdate("%s %luK shares...\n", g_stratum_algo, (g_shares_counter/1000u)); - g_shares_log = g_shares_counter; - } - - if(g_shares_counter > g_max_shares) { - g_exiting = true; - stratumlogdate("%s need a restart (%lu shares), exiting...\n", g_stratum_algo, (unsigned long) g_max_shares); - exit(1); - } - } - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void *stratum_thread(void *p) -{ - int listen_sock = socket(AF_INET, SOCK_STREAM, 0); - if(listen_sock <= 0) yaamp_error("socket"); - - int optval = 1; - setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval); - - struct sockaddr_in serv; - - serv.sin_family = AF_INET; - serv.sin_addr.s_addr = htonl(INADDR_ANY); - serv.sin_port = htons(g_tcp_port); - - int res = bind(listen_sock, (struct sockaddr*)&serv, sizeof(serv)); - if(res < 0) yaamp_error("bind"); - - res = listen(listen_sock, 4096); - if(res < 0) yaamp_error("listen"); - - ///////////////////////////////////////////////////////////////////////// - - int failcount = 0; - while(!g_exiting) - { - int sock = accept(listen_sock, NULL, NULL); - if(sock <= 0) - { - int error = errno; - stratumlog("%s socket accept() error %d\n", g_stratum_algo, error); - failcount++; - usleep(50000); - if (error == 24 && failcount > 5) { - g_exiting = true; // happen when max open files is reached (see ulimit) - stratumlogdate("%s too much socket failure, exiting...\n", g_stratum_algo); - exit(error); - } - continue; - } - - failcount = 0; - pthread_t thread; - int res = pthread_create(&thread, NULL, client_thread, (void *)(long)sock); - if(res != 0) - { - int error = errno; - close(sock); - g_exiting = true; - stratumlog("%s pthread_create error %d %d\n", g_stratum_algo, res, error); - } - - pthread_detach(thread); - } -} diff --git a/stratum/stratum.h.bak b/stratum/stratum.h.bak deleted file mode 100644 index 20aa3693f..000000000 --- a/stratum/stratum.h.bak +++ /dev/null @@ -1,239 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace std; - -#include "iniparser/src/iniparser.h" - -#include "json.h" -#include "util.h" - -#define YAAMP_RESTARTDELAY (24*60*60) -#define YAAMP_MAXJOBDELAY (2*60) -#define CURL_RPC_TIMEOUT (30) - -#define YAAMP_MS 1000 -#define YAAMP_SEC 1000000 - -#define YAAMP_MAXALGOS 32 - -typedef void (*YAAMP_HASH_FUNCTION)(const char *, char *, uint32_t); - -#define YAAMP_SHAREPERSEC 10 - -#define YAAMP_MINDIFF 0x0000000080000000 -#define YAAMP_MAXDIFF 0x4000000000000000 - -#define YAAMP_SMALLBUFSIZE (32*1024) - -#define YAAMP_NONCE_SIZE 4 -#define YAAMP_EXTRANONCE2_SIZE 4 - -#define YAAMP_HASHLEN_STR 65 -#define YAAMP_HASHLEN_BIN 32 - -extern CommonList g_list_coind; -extern CommonList g_list_client; -extern CommonList g_list_job; -extern CommonList g_list_remote; -extern CommonList g_list_renter; -extern CommonList g_list_share; -extern CommonList g_list_worker; -extern CommonList g_list_block; -extern CommonList g_list_submit; -extern CommonList g_list_source; - -extern int g_tcp_port; - -extern char g_tcp_server[1024]; -extern char g_tcp_password[1024]; - -extern char g_sql_host[1024]; -extern char g_sql_database[1024]; -extern char g_sql_username[1024]; -extern char g_sql_password[1024]; -extern int g_sql_port; - -extern char g_stratum_coin_include[256]; -extern char g_stratum_coin_exclude[256]; - -extern char g_stratum_algo[256]; -extern double g_stratum_difficulty; -extern double g_stratum_min_diff; -extern double g_stratum_max_diff; -extern double g_stratum_nicehash_difficulty; -extern double g_stratum_nicehash_min_diff; -extern double g_stratum_nicehash_max_diff; - -extern int g_stratum_max_cons; -extern int g_stratum_max_ttf; -extern bool g_stratum_reconnect; -extern bool g_stratum_renting; -extern bool g_stratum_segwit; -extern int g_limit_txs_per_block; - -extern bool g_handle_haproxy_ips; -extern int g_socket_recv_timeout; - -extern bool g_debuglog_client; -extern bool g_debuglog_hash; -extern bool g_debuglog_socket; -extern bool g_debuglog_rpc; -extern bool g_debuglog_list; -extern bool g_debuglog_remote; - -extern uint64_t g_max_shares; -extern uint64_t g_shares_counter; - -extern bool g_allow_rolltime; -extern time_t g_last_broadcasted; - -extern struct ifaddrs *g_ifaddr; - -extern pthread_mutex_t g_db_mutex; -extern pthread_mutex_t g_nonce1_mutex; -extern pthread_mutex_t g_job_create_mutex; - -extern volatile bool g_exiting; - -#include "db.h" -#include "object.h" -#include "socket.h" -#include "client.h" -#include "rpc.h" -#include "job.h" -#include "coind.h" -#include "remote.h" -#include "share.h" - -extern YAAMP_DB *g_db; -extern YAAMP_ALGO g_algos[]; -extern YAAMP_ALGO *g_current_algo; - -extern bool g_autoexchange; - -///////////////////////////////////////////////////////////////////////////////////////// - -YAAMP_ALGO *stratum_find_algo(const char *name); - -extern "C" -{ -void sha256_hash(const char *input, char *output, unsigned int len); -void sha256_double_hash(const char *input, char *output, unsigned int len); - -void scrypt_1024_1_1_256(const unsigned char *input, unsigned char *output); -void scrypt_N_R_1_256(const char* input, char* output, uint32_t N, uint32_t R, uint32_t len); -} - -void sha256_hash_hex(const char *input, char *output, unsigned int len); -void sha256_double_hash_hex(const char *input, char *output, unsigned int len); - - -#include "algos/a5a.h" -#include "algos/aergo.h" -#include "algos/allium.h" -#include "algos/argon2d.h" -#include "algos/argon2m.h" -#include "algos/balloon.h" -#include "algos/bastion.h" -#include "algos/bcd.h" -#include "algos/binarium_hash_v1.h" -#include "algos/bitcore.h" -#include "algos/blake.h" -#include "algos/blake2b.h" -#include "algos/blake2s.h" -#include "algos/blakecoin.h" -#include "algos/bmw.h" -#include "algos/beenode.h" -#include "algos/bmw512.h" -#include "algos/c11.h" -#include "algos/dedal.h" -#include "algos/deep.h" -#include "algos/exosis.h" -#include "algos/fresh.h" -#include "algos/geek.h" -#include "algos/gltalgos.h" -#include "algos/groestl.h" -#include "algos/hex.h" -#include "algos/hive.h" -#include "algos/hmq17.h" -#include "algos/hsr14.h" -#include "algos/jha.h" -#include "algos/keccak.h" -#include "algos/lbk3.h" -#include "algos/lbry.h" -#include "algos/luffa.h" -#include "algos/lyra2re.h" -#include "algos/lyra2v2.h" -#include "algos/lyra2v3.h" -#include "algos/lyra2vc0ban.h" -#include "algos/lyra2z.h" -#include "algos/lyra2zz.h" -#include "algos/m7m.h" -#include "algos/neoscrypt.h" -#include "algos/nist5.h" -#include "algos/pentablake.h" -#include "algos/phi.h" -#include "algos/phi2.h" -#include "algos/phi1612.h" -#include "algos/pipehash.h" -#include "algos/polytimos.h" -#include "algos/quark.h" -#include "algos/qubit.h" -#include "algos/rainforest.h" -#include "algos/rfv2.h" -#include "algos/sha256q.h" -#include "algos/sha256t.h" -#include "algos/sib.h" -#include "algos/skein.h" -#include "algos/skein2.h" -#include "algos/skunk.h" -#include "algos/sonoa.h" -#include "algos/timetravel.h" -#include "algos/tribus.h" -#include "algos/veltor.h" -#include "algos/velvet.h" -#include "algos/vitalium.h" -#include "algos/whirlpool.h" -#include "algos/whirlpoolx.h" -#include "algos/x11.h" -#include "algos/x11evo.h" -#include "algos/x12.h" -#include "algos/x13.h" -#include "algos/x14.h" -#include "algos/x15.h" -#include "algos/x16r.h" -#include "algos/x16rt.h" -#include "algos/x16s.h" -#include "algos/x17.h" -#include "algos/x18.h" -#include "algos/x20r.h" -#include "algos/x21s.h" -#include "algos/x22i.h" -#include "algos/x25x.h" -#include "algos/xevan.h" -#include "algos/yescrypt.h" -#include "algos/yespower.h" -#include "algos/zr5.h" From bc07909e5c62599ff801a6de1befed913f075478 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 9 Nov 2019 14:47:34 -0500 Subject: [PATCH 502/576] Update defaultconfig.php --- web/yaamp/defaultconfig.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/yaamp/defaultconfig.php b/web/yaamp/defaultconfig.php index 5a41749be..0674be94f 100644 --- a/web/yaamp/defaultconfig.php +++ b/web/yaamp/defaultconfig.php @@ -11,8 +11,6 @@ if (!defined('YAAMP_DBUSER')) define('YAAMP_DBUSER', 'root'); if (!defined('YAAMP_DBPASSWORD')) define('YAAMP_DBPASSWORD', ''); -if (!defined('YIIMP_MYSQLDUMP_PATH')) define('YIIMP_MYSQLDUMP_PATH', '/root/backup'); - if (!defined('YIIMP_PUBLIC_EXPLORER')) define('YIIMP_PUBLIC_EXPLORER', true); if (!defined('YIIMP_PUBLIC_BENCHMARK')) define('YIIMP_PUBLIC_BENCHMARK', false); if (!defined('YIIMP_FIAT_ALTERNATIVE')) define('YIIMP_FIAT_ALTERNATIVE', 'EUR'); From cdde2fbc62c002808b20008b3df7860df0e54c7b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 10 Nov 2019 16:37:24 -0500 Subject: [PATCH 503/576] Add files via upload --- sql/2019-11-10-yiimp.sql.gz | Bin 0 -> 14616 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sql/2019-11-10-yiimp.sql.gz diff --git a/sql/2019-11-10-yiimp.sql.gz b/sql/2019-11-10-yiimp.sql.gz new file mode 100644 index 0000000000000000000000000000000000000000..f3a41f248cf0a5bb805853dd0f8c533a6452e5d9 GIT binary patch literal 14616 zcmYLQV{~L)(~a#+Y}>YN+qUgwVq;=wV%tt8wr$&*Bwx?-{`l7FwQtovyX)*aw{HLF z)lCo$1q2s7ss{u*sjKI4(9-PJ^FZU7_uJ|Sx}QO@oyKOk{?{@MK2I~>m7M|W59qZj zDrF+7fWy77XZ%1y=wKADlnfjT@*L?tex$(Ika)S<>}*Ve5MG4o0LH>Ca~q@w(1I{0 zd<--E+EO@nc z1l~Rg(64MrvpN`<=juD`k*q83nfat*WQn}LB?6oGsYeR59J>Kx*~Q<*OHV(2X;i+t z_NcyFK@@RwN!LC*J$C+{_2MO`54GuSV(l0h*>)=ze?y2OZ)BS*Bq#vHRERsoAq~%wU=#5Dw-*BA@$|#eBU7tefD{HO`)qk z=Z2*y%MPFNaO5Iuc-WvOReEw*FgtQ$}t2fXqp)~-Nj-R6;On=I8l zKcrFm)qKP2WWmj}LrnntwR}LEE+&QmcJz05Td32V@uNCgKWcQUQ9WF8dhtMY%uUQq zFCsxOFO*Cw1FZUTMz{Q0^t*fvIxv5yR`xcXsoT0V=7LAq9akJbj+3@L-HM-sU~+7w zLRwnbX)30%`cy#3-Q$lt*Qo5 zs<91~oPDlU`ib;!5QN!$uDzF)!H06Tj6N4h#YXhcBx@6>JrL z)$NDH@dvTOdDMmHM!`tiZNXeJNQJDq$D5|NRde; zbC`$RaQ^Q&50+^jZ~oG@H!j+=TOV;SnGGX?-Y))+a%bwL=GcHu-A%gl@>$l{1sQ%q z?`aQzCz_=E{_!X#!@9QfeE~fxG{GswF+X-*KIp!zX}Lm(t;on3Hj#&<b>QgNRv{$Cf5VVbku&@(qe>}VwT_xm$>tvZnZl*uqz1=ik?b}d1u6O0 zFf-L+&Gfn>?uzH9s?;LsS2kx~{KXoJ#t%_X6#|fnC+<+KuII|O1!536I()57EB+w& z?Gr4TanWjmppu%T-9$H(g6eo$xR4Qf>L!j*P@z_~*+YW|dz2nU>^? zr~cxh7GBGIG2gTtO;dA`LKE)<>4K@}7~ir?TjVu_N)>cguV$|rZ-qA&3R8LA9kSc8 z#EeB}I-Dr-I2&$7o`ot1C|AXV9Sghu%_q+=5}!fpN8HoWh)}NRN4V2U(^h>*Z|+|v zr{ymsvt~NCrMcjbI!%%C*DiE}VcQ#B$3D#YA?&V2rT2FPwU4Tn4=M?Nqzb=l;A8!b z$53gW;4B|#F1%%Pz^ncJBOXk%%p!9k=@2)!YXvJoA#!R;MJhu`BR#xXa2v^~xS<~; zDZox`8;Vv`XPVD9_3PbjTBCi6?}34q#v1e^H2XiNR|oqOU0S)k zh`noOTqYPNGICjJ!}F)}ZK8s1Q2YejMKf=6l5;KYoF-blnIA!X#-j8g+k7((FO?L+ zmIdlC_|UY!>fS;Fv(C6?-@|FmYK>aXnnBmU6i-doLfyYVgb3JjwPr*MazSI|)#F=o zZSM~MswuSCI9y_Jy2)GCfOLO!d6T`W&D@^H=*wTd_O7>-p9n29N_qezX7>0+G^<)i zspi;9i!$GN4+aV^v})bM=zPnT{u2IpAe1*M4?`22`AI*z((M)1@f7tCoqMpv)m=!L z*Wgjk?@!6vH99YQk|wx3h=kec+c?>fKFnTXCpw@zyjx%QJ+b15&#JQqPdDeZF~E-jfSc?N=|`P3;m* zf!ck@5{zip|lD|)!uDDR#I%LBhRp*-q5TaYb)9N%1DM-9dc3*@sKJ}QG#Odsp=+4Y=tOp z)t_`|_@%*%@;OaWNdJ~2qO`FUa#D!S?#pWJG=2ufj%B7#xB0}bQiY<0?Vpqr4c2Ey9&W4Q9`tli?6mhdg9?Bi4~MT9opP-L9ULBiF$ zxF3VaB%yuk0l$&rFlj_5KTM8P^AigTcm03k#$i(ZB$yMIMovgHR!)sg82~6RosTl& zJlmErQnmWF+As(0w0e$NRxFB48IF`b%1*^N*Bb8A%Fp?H6rWmTIES-lrru+gbF!A8 zO+D?^6Ia`{n%|^dTWfZw!$?T1~{n%AiS!?`Y%J=b*brizt50 zJ5xBn%Zy!m;-@fMF+c;VjS8R+|(CoIju=@i~@yYT0a1QQR*6MTrp{WoVc z^@D;3#4mmUULR>B_v4gXhCH^$ODA8Qt-x*9Yg=ol%@S;NBPMsZsxHhf~= zu>!ABby=l>*El2%!|)bPH`ui1*0GM8EqBY^?PU>6_ZIwpX@~AJ#+urE`!v|o-NuED z#)XGr9S4yPk@^b}x|c!w#r?Y6MQz`D7PU{FT}iZEx|}k6kls(P%9Bf-3`LA#@X_}v znM!9_wA$?$JV*Ba?)U7~rst(>mznXzW3~K#xk(6fpxs?ANtEU`(BAQf-P7hv1v-+~ zL^}D{5Hm*HE>7HfJBV-rS8(gUDnslp!NQwuCl@P$>*H?2i#_o>T6@w@$LR%#WK9EL_epn5&tnpD}e)5T-Tf zD~~3My;nm1h>b^-aW;xptZ_10V~E@n))?P7GYrHV*xqQnT%#YLVU!sYQ#AqQp`*}I z@grv4F1(k(R&2)zJwRxe=LTFvf6_4h$@!TKT5Jn>n7KL|g#pw0+~ zv*cmpagZKn_CO6%Q=7f69BHGrU?5~`!u@dT_Y7mfulg=5u5D(2gk(NW-mnYkPTG~h z>0a0*WTcxR6;>1UM z9(IAi8^xbb;0~Tu`($r0f{KbY1&>H6zKsXlg|FRL^{Ecs&>GW>-1%S_88uI$+}~1y-W(qP$H5D8*(V>BGuMi68myg?euL zO0=BT6x@ZV!yD1BAht48eJ$r{xOd=f*1$DnJ3n~~fhy1i>E7-SkijRHK#o&=B~T0k zWl}(PqkS{(BS04AUBxKwF=*l`1+PRkTnht!#MZ1w-kKTyQsMoMUg5@qHg_zrVRUF8 zXZ!U!&hQi?ZiGVdutz-P%u#|K&j*e*r?uy)cO6zNLi7t^#hCXCsaN0+j~x|SBxf!ux_w?T6mU8SVR(BcAS^4(9!sgU#(x zje!lhNR5HX_Tm$c(+TAY!P8~102$WZdUhzSKen6wq(~AOuF&2j&m;CE0}rPe!nQr0 z@4Fh$Xg*_=0M9lo^{-awE-+06>IGP-4vY?Gf91&HT)vP4>}2$YUy90(s3XD>NxlSd5vy|+ zdJj=fU(r$ue14hkR7)R8AC=WvP079U_!xS?dGOX9dCY?9tlnC64znqN(x!2!1mM(X==$oKxZyXW4#@Lub8z!5s=ug7S`_LvR)L1 zfKP@n-4uk-Pli}-6GHQo-M0hN7i~%Q1ewrdB&JgUtI7;eirM_*N`Nf_bb2L5AJW5HCnM2j%YNDjX@!s3U=tf)1r` zCdy+KNT@E}kqiN4?ghphDSkUnasb_AL9AIlKq<`|tbtXdh)r1LmqhgT8$4Jat3m;r z5Yt}xRSFes%Fa^2DuggoA}GaDJCe`z8ZWnet7M8FgboB!`Y&!!EeMP{#E>W^C2Y6^ z)Uu#Bd5Ssuc8mmViaPspg;jjWHy-|;qIUa%y4#_M)t(V;MMT6rh!Agl3c%(55>(VY zj8FicR((Sq(qEbnpc&y=0|`rj=VKlo$Qj`}dJ{frP_Q#QI7zFJ{4T8)URa^lj*L56 zunpqJ-#Z%Zd(%N#^>w&aZH7P>M_V1o0O>AlB5Gr?TOmF1pQ7V z&7SJULSrygh6e20`iGNMC?jnaIcB3cYf-Z$yZutrNdLDy$$x7N=Mm;j=u=^IKjvak!0rI` zpo3p?|KV4hr8phfcho=p#G8xJ28>`KRx?sn)EREdY**D%eVmwdjXXGjXO;l%W>#6s6c~RkV2uahbXpi!@*y zMFFTvL`#r?nz0A>8Zwg3(J{a4ZtY~w#>>OUO$4|}Wst#%-(2i6Q=PAJu_V#VvVqlsMLiUGP4OnE?q(@ekF3$b!cH0?xLxJPE!qs(37cAIH3 z=K!;&$6Dk9*3CCJ$$?D!BFeHOTDOHZ<%=rRPM`Tk{_pM|XF+}W6lOROhY2aLKFAGO zT8gstB2PuI00gm?>^}i_6p)79Mp+)Cq8jB#nER7t#$uNhX6!_mLjk7j0cXy3@xRZy zoc|?#6(s+?)3PAKoL>kDAp3`?Q@+9Zy?_<;-~ch!hyTWGvK46(a8NtKbv04uJ)wkp z01>Q^*MA~=wSS_GYRh9Cs1CI`fD|xi84e^7fT`+<%?Av>FHXM;K*}C`5NCP30hPoC z5FwLt{1ZujA-XB789tx@VC5kBKUte1E2}4saMq4o44IK75Xmyii;KH1<(A}`*xB^xQ=%#%YXDc4*0-Gi^K$V1E`ZW( zoO+a*k*N@+(SRN14c!VX$+fX{=>bM$LZ(Xp#{q0>11g~XK4unHG0Y#9oH|c)-TebsGc62o@ zWv%EM<(Tu!MpS@v)(J1w1<-gU&U3O&Zf)ZLBg;lM|CI1OsenzZ``7-pYE$GXvY}_ixMPo<*dP|1@E&qlIg46ChucS2#%K z^E78@FAk>N+n*3|aIq^}{fY1uUBM?h&b1%!#!qbc3|mo3Jp%`!`rmD^WC}+IXItn| z1Sbxyig;`e=~M`BB+79ZpQ`%wX&&AVSTl8=;Wp;eJKu#b&IU_IYYe;z;jb7q{%?>G zenN)1lHL2WS_K-P`a}=bLj=fPUR2vyk!gP0I=f3(egTi%!@Y0Y#T7olySx=C2^Qv9og4qtnWe6``h+T^3vDFwOanFiWgO&S_?-Sn<)p3jK3o zJB7niLg4RuT`<_l0dKPwDfeVI@*R8d1!*aw)RTJ(cK1+at~jD`3JLGkm}=k^Lo4Yw!*&RdUkbTe=)63p)K&T-T-oxc6NVL zL9wW?ZMn_+RX>uEmzOiklar@NSDnE2zb zx4lE(wH%t;jp>Vbod9Q(6MoLBuLU8K`1@Ynp}Q5xgIT`X7uO>1{o(|FwVgII*JWk} zLa9#R#c(I%#eD|5oiw$~IUJ+qQ(T8;&!Y9CW2ESfNzy;@Vczpu>5p^fy{@?H%?*f| zO69iP`whL?%<^~oXAZ|n@FUZ=9z-&dAMMx0rQD3?!bRum>d62-I}o9ht*Y-Q6o#We~ zVR@hW`=t@Djm!4O-!$zI)vxje?}iV!2oCDqn5L3Fw)zFWn5_q|%J$!0!|tiKLf>IZt?Y@#Lt{N6Qr-i8$LlyV>GzkvtOXZ-EF+|%zi zt?%BPVoUQfbMO{?-=WuJL@j@Hn(xr&=?P}X?AI0o8QpW^=xPa!Z|9d}=uf^bzfP&Q4Ij;PfA>i5yG7u=jMzE;!FJgJOlDbK zm-B~2EOcXBrQBW_xPi9sc5xMc$dbqQhuNOnEyn!X?H-Y2GlZ(C6v}X~K5YyYW5IL% z&oh@_b^E>!3}M|a1?N~xv^)t7_^LjM&IVIW=cbEUv9U4s)YUQPce%%61-IceswW1T z{s%6}U)MfjOB7WRjZNEWJh%hFc)%Rrr4>Z7>G6LX&lB4{md6Ug(ozzCmng%QCzre{ zy>MLUrFv;lQH!9S_w1ssF5u)6=UZBdA>VE}_TVQp(*)bZ`R zdowgfwM{BS;oqT=T$n+_F-`s{MXp5|nb0fe8OqJiqVAAeTJ&xnt|1{B0q=4pTJfx4m%Ah*HbKbENX~ zBr5*9lgIu#`BXNgMhVT^FQ;hD@@pzs+uTD+*#$%+%6hxHV>a<+0u~PgeOnXx5611p zg|2T$5?d@R&n9HWTFLQyX|(;l;FO-l?8JJk0!B1pu@?Gb_uZK>deur!mDlo>`P7sG zMsl%7!BOdPBIBUTpf7jKJCc;zDzW0_i_zGYp9?eHd@6IJ7x#VC!GJPPoQedbI z1(VWA^3{IJw09xV{6rZUkoz3U+XI~5x^wtbdN&|$b02jY`OBbvW<_WBHi7x)DxD>S zPRzib^5=fbf>R|(kR9IOF3M5(NLWLDdE-3HeOXy>L1an6XDh1_W!73yD;^`7bRU`oW0DRnj<5o^dvZ>I$Q z*=wKV4B}|uviA5rKDi?V3G^`m+M9QS-e5xHy4umrvLfoO5ck;_nT>JwMWAcBzk~cS z2t34KtHf+IRBlnHb?J%nL_vLeNPfpGp(3a)+zL{@$1Dq;QVj=2 zsRz_@Ho)F^E{_+&U(KrQ$I{R7fg)7b!wo+mKoW59fw?Skx0#JWkS<=CVBJcK*cTw) z4T|s$ECOv5wCdTb82Nc$KR}JS2`KR_2meO@oZ1*L`Us1;JGe#2Pd-@O!M~r(4Y<`dSMP z9CsVwcDzbJ&|NZY&-msMDw(=o{aTq@3}P1Bj*S9I7oh|NviRYv*|_(~d!yXsxMW$h_pujH zv_yU!tV=&SZ;2Mj&QG~oRy28}hT2W3StOAPl?KI7y=j6ediZy%V5`{3((E~i;L2(@ z=}v;g5(1HE&A?@Mp0aOe6QUQ2@d~+kHh+uC0WP5vUv9a=i8gdj7G1#&8cI{v1DM-0 z;3YzS^J)rOtjTf(m^maFv+U6rCh_y*9yy zsI7-`w2hq@DxWJ>F#q|o`aMphEPw5S^p4ta_(E24PE19dnBREE#flp#NU2L2|Mmd# zcr7r$@7ybU^QIpdm;E%IoK(ZEuc&qK8(V1cB;f=mwkQUQMO#QzvSa5@KBK8!dK~$0 z3Oh~fLnMg9Q=2qp*1vA|Dsso}Sf=^SuToBNULsd?u8c$P_3gjiiTu3Am5ms@Dq37g zaFoGDuvAVxB8474KjVbZg|H=Y0(xIW$m7nCk#aVP*26jce}MlsG=ZtM#te}baGe?0 zV4@foU9zS`xr>JTs=fteM}n;1DYp32xUr2kQI_S0q`g z#sU$8^x|xIxXKr0Cj@hXlaD!CJxNS|oGrUJ8`mK*u-)xejyH?>K6jpO_%Yj5ju$KU zYKT`zDckVsAV}CmDKucDI#V#l2yz*Qxc8})`Engt7LUA32p_x}%m~Ux8otQXWii8R zGNUVUVD%+^w11ogVikjBv4?)iAB!o67YuCd_XCUcag&8F`>+0li8?%Y&X#-zzI zY3z*i)R`0yN1S}f>(a{Is{(=?qra9hzVw4#s}ft=!4}WLzzg|=wh&RpECH zrG1k6v8edh<(#FqEJV|eOtIWVoRoT7*dH8U0d0+U9vg<=$>YrHwpccDSVRK6*Lr_x zL5ymc#hcC1VX9H$XbEK~FyGe~5eYQ^T98kG{;9+7By$)_9|fXle<8sl`T9UVaqZRt z87zUU?^;6imyHmgVh^)U>`fzLDo>dj)TT5M5*!mv6CS|sh_ZsAI_you6jVqf0a;{B z|M=7iTPa&%uU<+zGtAu{sNr6*p1}N3M0+Bn8iL&rza;ncV9}1z%NQBjoNi=8=KvL1iMg!)#)fRbNwJ!8BTh$#x#g+--s(rlbo` zV#Tt~&)j#73bq7SNdZU1Cx~cjPne|h28a9bvrm`BywqH|L@pr*!*CNb zbBKa|&m`$Qw(>w{RjA^qK&m?8A0j|Ihaw@I$i=Ty%_;;=?@@Ei=LCuAnOfF|ri@Sj zZW4J)(2o+&g0bfF71HF4xuX-2#x~}tFhUdQBS#->!FOp9o9a4*|RJmiJ zsUyCuYI~|uUl8X6_S@+0MU?OHF2>F#p_h0%5WQBYMP;n07=bRlk6tW9bs!P*94FyxTjL}}R(dAP&hS_0 zEV``BT2sX_CNeovlh(kBE!6SvbIdL|-x>^sKcc`f+vHN|!AGfk+c8jdG=V^)6}Bjc zD3Ym?0kiDnv@w`5M8;I17voI?moG;6yP0?Y^N znm*G52lHdB$6(Sv_-qE-x2sSkWj)y0=NCB@=V9Y4}US zMbBNCP7Q}7kb?wB-GU3)jS9HhWNYDpD&k=h_z7b*cLm4`!;aS2$tQlD>GUBOkB6#O zVloLWl#xRYKZ`u(gEwxDFWeEWK{3_Y_2}-I@i}WG0sU&ul8F%{yHhV^;Ig&~ z?U_IRnRh4K4>rsnX|Ex#?TlHJat_|CVW4bG_PI}nL4XG)I4Cb>4VoEm0SgpqH+8wk ztTaw&r&?@^RuJ=kOKI)1W^f8ZJsxU?rzHsUKI4vCZs18?yKJj4444Xh%MI?6Fs1}c zZdo7hi#Bc)@G?D23sk;&^(+u!+wks`tH;C)!1|Cwvx39=AiLv_K@5ivHQ7$j$9&wi zz?32m*`d#n0VV0H=_LYjlcI}}!FmEiI%|x)SyKTqW+T3D)rpg~O*Ud~lv7qO>$yUb zR8yg%$9#bTT5Nk(5kFYZjyI_*i96ghVM6ZABh}Yby5|!Gz8)d>yyeE^~1#vI`|&or>~`qR(^TO?w+QNHd>3M z2A1@M)1pIM_QF4iEurt9Wi%uujg9BfR_0MO8KYWG(ya`t-_`4@+<6jj;)V#J^g<6U zf%p@&%1kWEn3S9`hGA_v9yaZ0>Tz}me}vL2Lbg^I+!B-s!<;<%Q)%W4b;?q9+gU`+V?qV6B10 zsYEr885_&5#9hM6v?$StF^9`zG1zR^IOOk4JVDvB;Tj(|ofwCi5L9;FA+4va`}I-n zCt|kryi#P)cEtluyy*NPMWpIU+{nI=H_C*95!y~i70PMbd$>ckkMFUPW(?8iwWEiZ zt=t0K@nW36&8dU=7dI&#e&+AD(~dBqHdtd`O-u++FwWm789~=Jr?FRmz`t{vLD|Hu zMzwA&#k0j<*r5Hl$^T9b9H!2qGuvw^k(xU5pwA>z=Gm_sDZ+-(S)02TTx1IOh#vhs z`>6`my|UO|;4Xny6WhYuzH>B;E`12+%A=ntO4@>dQ%t9K1<9|SuF||BIMM*6!hfde zNm_cUEq?cs=bx)0`-2Ts9-3;T(GGhdwor{Buvl3v( zIb7>z`-Yki9whkjlH;zh)7z&9uGEu^xm5H!g19c=_5bwsFUHDPB*u2gE*fVj#8B`i zQ#O>cbQYAaleH*iR0Xy0IT&!tXyeHF-h3k%WsgQ+&V2Y7NTS46RSBN(fMz}Z4ssXB zyYY6Pcxa9Ssyn0ymd0f0B5Q7C5|aBwbMT)m+)khn(E0Ko&6xk1V>oPd%MpqffG$s? zWX$n^29+hoAkyS$*odwXStxjW;*i3(@)&(&Yv4^vO#hK!Ic6IwhiOWaBF~0hd^H`( zJ2mll7Mf;|l*BY0d#dshmML3V?cK=(F10wYn;;g^ij@8#3_QC zITv*xoetseYt{@g- zf(9Y{V?_=nP}*zWd0YvP9j@n&L88uc!sQ@4`|Lun2(~^DDxuXntW4jPH!35dEdST1 zwK%pBSIc3F?bx%j@swr*YaX`MaWEwBUs$YLM;qgC+<0)I_#*UX&HYCxm;LL4GvRqn zIjz6;f`#QJw4Z7hNx3)fpOB8R!0%X!9Q6468K|u-9jruUE^D*&t-QhOzd6fcz1@)L z(~z$@U$4H>xd%j4?=E`?$X{#vC~#+MsKV^xB3Ul5rXREPtm{KvU`r$1mG}c5e{DlM z0Vj~xEp!VFDzmFCI9$1zI_#n~mMYS~d2DCt!DP4P8-(w5H)U?5k&*~?>)T~OcSYiR ziauB`b{B|;&hz-^adsB?-m~#F4^R8H4RH}S-|Qm@pt}AR(l*U#%lEEbsW%M2FcRDh z%zVivUcSWO(@0rqeNK3Ks`u5x^JpdZj{tvZ*=>j1)@9s~exbgtg)}Ia z)9P~Ys}DU^`vJpu^J-_UDES!dZpG)g&+kxradrD;3Ne#PT_z32(g$C zwW~gho2w*~BjeJp@$BU)vqfobBDk@R&*`AC!5R5#yrn<)JMaO$D#^0GIM9y~b77C2 zw_zw-$GlR=KkQ8jk>RWeqzHqD*j+YB5`O^n=E_`f4(2&J7qo~O_2P&s?qsN{Nor5a z@_iI9B}<<1cWNdS(%xDVc{Q#kEyhBrm8kiHm_!dO>--~8$A)yLBqb@LZ0d9{bg`sA zN0yf`SmzOK)Cr{__x&rO=hLLs@iUS4-&2kU@lgCsy*)2ac0`-V!4O7g?y|Er7^$Y( zGv5qIbp&lP%E6h|2`*Rn4>Q>aL#ZK;`BM8i7ha?W&AEE)-(=f`31U8!x*jt^dHU~E z-Om`>WD-UZF5GzsTreWK?xWd{eWbxEDs`WZvfL{!71ZC4M?NX>FFGRL2wC1Vqh(ZX zOvpgkihK0?8#eJr-rR>$kUCh$Nfu0ZlC(RpVT$my!3r1ZYNi_z>|cCK)7a1AkGPXn zBMA;WeU(3`t4mu$ z9E#xv^*%N2=OIN~4So6IOgM`&^M}Plg7y5qjXDI6R_sue0;SmFP{?UUMTqfEg5=mU zYtnxR9r)`ecYVoLB$cLI!r8tt2sq zbLgV6?t&R_JhxYf=mJ>mBiBCMi$SAOhqFofN_}z8;EPUjc9w7-n_rV;XTy(L z=_1&CGgj9Y3)Fp-ReIE8pvhGYyDme*)l`LwZ+m!P-zhMw{EDj zT&Pkfp(vtySAQAP9Is?*3nYTxYfuEKp535b+@f*ZBS0<~vrz1J;8j*6i3S(7#eelmUXb3#y`?BgzTCk;hqCeN9nk&DEC)lIi_tJl(WfO zx4>Ld_YvFR1nN+||{+M1Sj zdZ2X~9-SGJEgCo4KHHN^eM~X~V~|S{xx0=y)?=c83WZ=qzOu#7-RQL8REGIh;8L!_nwjWA)7>H$X{m`xPEJJ@CiuFDIR? zDf#H7zsXya=Pa2o#>TTl?W^T#=M?9w{HI2#1PyhPZi%3?l9TCD&!M2H?tmY9 z8$9^^4s>Tp6a@n!>NO&^fLa*R=Wq6ZSYrsEKy1K6aI zSRCfh+f^8s9PC55FyV!uqkY;PGIp>fV#Ko_yJBKRrtn${D{kx##{RDogmn$ty2O`L+J~mrUN(@flE>?@`*z%)YTK886U^3TOPHc6 zEbQ2XUcL_v1;eC&5G&9{r;e*Ql8y0()(hmoVwDv+13N2XQz(7@NizDtgPZ+m&$`0< zG2h0LB1)~&#i@-IT>ns<0lY-1#l{dQ#^0z;C#=7j+X9Ov7 ze*^Nug=(mtZE=0kbDyj6_f29pAI71gA#_!UK?|y)N|(qpL=}1GV)rGEr~CO(r|BW{ukMTDOKhVT*C}RY#^6Bzg-2t>4qVRb zQ5&gWo86Bc9`$);=*GQoP Date: Sun, 10 Nov 2019 22:59:48 -0500 Subject: [PATCH 504/576] Update coinbase.cpp --- stratum/coinbase.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 186c405ff..9239a2c4e 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -439,6 +439,45 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); + json_value* founder = json_get_object(json_result, "founder"); + + if (!coind->hasmasternodes && founder_enabled && founder) { + char founder_payee[256] = { 0 }; + char founder_script[1024] = { 0}; + const char *payee = json_get_string(founder, "payee"); + bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); + json_int_t amount = json_get_int(founder, "amount"); + if(payee && amount) { + if (payee) snprintf(founder_payee, 255, "%s", payee); + if (strlen(founder_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + base58_decode(founder_payee, founder_script); + available -= amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + if(founder_use_p2sh) { + p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); + } else { + job_pack_tx(coind, templ->coinb2, amount, founder_script); + } + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); + debuglog("%s founder script %s\n", coind->symbol,founder_script); + debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); + + return; + } + } // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) From f819443c3314da575136f87373216b2f43082174 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 11 Nov 2019 12:19:30 -0500 Subject: [PATCH 505/576] Update defaultconfig.php --- web/yaamp/defaultconfig.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/yaamp/defaultconfig.php b/web/yaamp/defaultconfig.php index 0674be94f..0306c435a 100644 --- a/web/yaamp/defaultconfig.php +++ b/web/yaamp/defaultconfig.php @@ -10,6 +10,7 @@ if (!defined('YAAMP_DBNAME')) define('YAAMP_DBNAME', 'yaamp'); if (!defined('YAAMP_DBUSER')) define('YAAMP_DBUSER', 'root'); if (!defined('YAAMP_DBPASSWORD')) define('YAAMP_DBPASSWORD', ''); +if (!defined('YIIMP_MYSQLDUMP_PATH')) define('YIIMP_MYSQLDUMP_PATH', '/root/backup'); if (!defined('YIIMP_PUBLIC_EXPLORER')) define('YIIMP_PUBLIC_EXPLORER', true); if (!defined('YIIMP_PUBLIC_BENCHMARK')) define('YIIMP_PUBLIC_BENCHMARK', false); From c7df3c74bd2f4e1354a69f5c3aebe533fe224109 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 11 Nov 2019 13:29:33 -0500 Subject: [PATCH 506/576] Update defaultconfig.php --- web/yaamp/defaultconfig.php | 1 - 1 file changed, 1 deletion(-) diff --git a/web/yaamp/defaultconfig.php b/web/yaamp/defaultconfig.php index 0306c435a..0674be94f 100644 --- a/web/yaamp/defaultconfig.php +++ b/web/yaamp/defaultconfig.php @@ -10,7 +10,6 @@ if (!defined('YAAMP_DBNAME')) define('YAAMP_DBNAME', 'yaamp'); if (!defined('YAAMP_DBUSER')) define('YAAMP_DBUSER', 'root'); if (!defined('YAAMP_DBPASSWORD')) define('YAAMP_DBPASSWORD', ''); -if (!defined('YIIMP_MYSQLDUMP_PATH')) define('YIIMP_MYSQLDUMP_PATH', '/root/backup'); if (!defined('YIIMP_PUBLIC_EXPLORER')) define('YIIMP_PUBLIC_EXPLORER', true); if (!defined('YIIMP_PUBLIC_BENCHMARK')) define('YIIMP_PUBLIC_BENCHMARK', false); From bf12a0918aedb35bf92f789a0c7dd52f65acbdae Mon Sep 17 00:00:00 2001 From: cryptopool Date: Tue, 12 Nov 2019 16:32:37 -0500 Subject: [PATCH 507/576] BitCash Test may Fail BitCash Test may Fail --- sql/2018-09-22-workers.sql | 6 + stratum/algos/blake2/blake2b.c | 368 +++-- stratum/algos/blake2/blake2b.c.bak | 368 ++--- stratum/algos/lyra2v3.c | 37 +- stratum/algos/lyra2v3.c.bak | 67 + stratum/algos/x16rv2.c | 10 +- stratum/algos/x16rv2.c.bak | 199 +++ stratum/client.h | 4 +- stratum/client.h.bak | 169 ++ stratum/client_submit.cpp | 15 +- stratum/client_submit.cpp.bak | 562 +++++++ stratum/coinbase.cpp | 47 +- stratum/coinbase.cpp.bak | 1353 +++++++++++++++++ stratum/coind_template.cpp | 8 + stratum/coind_template.cpp.bak | 614 ++++++++ stratum/job.h | 6 + stratum/job.h.bak | 139 ++ stratum/sha3/makefile | 2 +- stratum/sha3/makefile.bak | 4 +- web/serverconfig.sample.php | 1 + web/serverconfig.sample.php.bak | 5 +- web/yaamp/core/common/libUtil.php | 4 +- web/yaamp/core/common/libUtil.php.bak | 2 +- web/yaamp/core/trading/trading.php | 2 + web/yaamp/core/trading/trading.php.bak | 16 +- web/yaamp/defaultconfig.php | 1 + web/yaamp/defaultconfig.php.bak | 3 +- .../modules/thread/CronjobController.php | 1 + .../modules/thread/CronjobController.php.bak | 4 +- 29 files changed, 3587 insertions(+), 430 deletions(-) create mode 100644 sql/2018-09-22-workers.sql create mode 100644 stratum/algos/lyra2v3.c.bak create mode 100644 stratum/algos/x16rv2.c.bak create mode 100644 stratum/client.h.bak create mode 100644 stratum/client_submit.cpp.bak create mode 100644 stratum/coinbase.cpp.bak create mode 100644 stratum/coind_template.cpp.bak create mode 100644 stratum/job.h.bak diff --git a/sql/2018-09-22-workers.sql b/sql/2018-09-22-workers.sql new file mode 100644 index 000000000..892b6e546 --- /dev/null +++ b/sql/2018-09-22-workers.sql @@ -0,0 +1,6 @@ +-- Recent additions to add after db init (.gz) +-- mysql yaamp -p < file.sql + +-- filled by the stratum instance, to allow to handle/watch multiple instances + +ALTER TABLE `workers` MODIFY COLUMN name VARCHAR(98); diff --git a/stratum/algos/blake2/blake2b.c b/stratum/algos/blake2/blake2b.c index 43a6ae71b..ca05df598 100644 --- a/stratum/algos/blake2/blake2b.c +++ b/stratum/algos/blake2/blake2b.c @@ -18,6 +18,7 @@ #include #include #include + #include "blake2.h" #include "blake2-impl.h" @@ -27,20 +28,40 @@ static const uint64_t blake2b_IV[8] = { UINT64_C(0x510e527fade682d1), UINT64_C(0x9b05688c2b3e6c1f), UINT64_C(0x1f83d9abfb41bd6b), UINT64_C(0x5be0cd19137e2179)}; +static const unsigned int blake2b_sigma[12][16] = { + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, + {11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4}, + {7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8}, + {9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13}, + {2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9}, + {12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11}, + {13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10}, + {6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5}, + {10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0}, + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, +}; + static BLAKE2_INLINE void blake2b_set_lastnode(blake2b_state *S) { S->f[1] = (uint64_t)-1; } static BLAKE2_INLINE void blake2b_set_lastblock(blake2b_state *S) { + if (S->last_node) { + blake2b_set_lastnode(S); + } S->f[0] = (uint64_t)-1; } -static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, uint64_t inc) { +static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, + uint64_t inc) { S->t[0] += inc; S->t[1] += (S->t[0] < inc); } static BLAKE2_INLINE void blake2b_invalidate_state(blake2b_state *S) { + clear_internal_memory(S, sizeof(*S)); /* wipe */ blake2b_set_lastblock(S); /* invalidate for further use */ } @@ -52,9 +73,16 @@ static BLAKE2_INLINE void blake2b_init0(blake2b_state *S) { int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { const unsigned char *p = (const unsigned char *)P; unsigned int i; + + if (NULL == P || NULL == S) { + return -1; + } + blake2b_init0(S); - for (i = 0; i < 8; ++i) + /* IV XOR Parameter Block */ + for (i = 0; i < 8; ++i) { S->h[i] ^= load64(&p[i * sizeof(S->h[i])]); + } S->outlen = P->digest_length; return 0; } @@ -62,6 +90,17 @@ int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { /* Sequential blake2b initialization */ int blake2b_init(blake2b_state *S, size_t outlen) { blake2b_param P; + + if (S == NULL) { + return -1; + } + + if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + /* Setup Parameter Block for unkeyed BLAKE2 */ P.digest_length = (uint8_t)outlen; P.key_length = 0; P.fanout = 1; @@ -73,11 +112,29 @@ int blake2b_init(blake2b_state *S, size_t outlen) { memset(P.reserved, 0, sizeof(P.reserved)); memset(P.salt, 0, sizeof(P.salt)); memset(P.personal, 0, sizeof(P.personal)); + return blake2b_init_param(S, &P); } -int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, size_t keylen) { +int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, + size_t keylen) { blake2b_param P; + + if (S == NULL) { + return -1; + } + + if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + if ((key == 0) || (keylen == 0) || (keylen > BLAKE2B_KEYBYTES)) { + blake2b_invalidate_state(S); + return -1; + } + + /* Setup Parameter Block for keyed BLAKE2 */ P.digest_length = (uint8_t)outlen; P.key_length = (uint8_t)keylen; P.fanout = 1; @@ -86,9 +143,23 @@ int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, size_t ke P.node_offset = 0; P.node_depth = 0; P.inner_length = 0; - uint8_t block[BLAKE2B_BLOCKBYTES]; - memcpy(block, key, keylen); - blake2b_update(S, block, BLAKE2B_BLOCKBYTES); + memset(P.reserved, 0, sizeof(P.reserved)); + memset(P.salt, 0, sizeof(P.salt)); + memset(P.personal, 0, sizeof(P.personal)); + + if (blake2b_init_param(S, &P) < 0) { + blake2b_invalidate_state(S); + return -1; + } + + { + uint8_t block[BLAKE2B_BLOCKBYTES]; + memset(block, 0, BLAKE2B_BLOCKBYTES); + memcpy(block, key, keylen); + blake2b_update(S, block, BLAKE2B_BLOCKBYTES); + /* Burn the key from stack */ + clear_internal_memory(block, BLAKE2B_BLOCKBYTES); + } return 0; } @@ -97,134 +168,78 @@ static void blake2b_compress(blake2b_state *S, const uint8_t *block) { uint64_t v[16]; unsigned int i, r; - for (i = 0; i < 16; ++i) + for (i = 0; i < 16; ++i) { m[i] = load64(block + i * sizeof(m[i])); + } + + for (i = 0; i < 8; ++i) { + v[i] = S->h[i]; + } + + v[8] = blake2b_IV[0]; + v[9] = blake2b_IV[1]; + v[10] = blake2b_IV[2]; + v[11] = blake2b_IV[3]; + v[12] = blake2b_IV[4] ^ S->t[0]; + v[13] = blake2b_IV[5] ^ S->t[1]; + v[14] = blake2b_IV[6] ^ S->f[0]; + v[15] = blake2b_IV[7] ^ S->f[1]; + +#define G(r, i, a, b, c, d) \ + do { \ + a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \ + d = rotr64(d ^ a, 32); \ + c = c + d; \ + b = rotr64(b ^ c, 24); \ + a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \ + d = rotr64(d ^ a, 16); \ + c = c + d; \ + b = rotr64(b ^ c, 63); \ + } while ((void)0, 0) - v[0] = S->h[0]; - v[1] = S->h[1]; - v[2] = S->h[2]; - v[3] = S->h[3]; - v[4] = S->h[4]; - v[5] = S->h[5]; - v[6] = S->h[6]; - v[7] = S->h[7]; - v[8] = 0x6a09e667f3bcc908; - v[9] = 0xbb67ae8584caa73b; - v[10] = 0x3c6ef372fe94f82b; - v[11] = 0xa54ff53a5f1d36f1; - v[12] = 0x510e527fade682d1 ^ S->t[0]; - v[13] = 0x9b05688c2b3e6c1f ^ S->t[1]; - v[14] = 0x1f83d9abfb41bd6b ^ S->f[0]; - v[15] = 0x5be0cd19137e2179 ^ S->f[1]; - v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[1];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[2];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[7];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[8];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[9];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[13];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[14];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[14];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[9];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[15];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[0];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[2];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[11];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[11];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[8];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[12];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[0];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[2];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[15];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[10];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[14];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[3];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[6];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[1];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[9];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[4];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[7];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[9];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[1];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[13];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[12];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[11];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[14];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[2];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[6];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[5];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[4];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[0];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[8];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[9];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[5];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[7];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[2];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[10];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[15];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[14];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[12];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[6];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[8];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[13];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[2];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[12];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[6];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[10];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[0];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[11];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[8];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[3];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[4];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[13];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[7];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[5];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[15];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[14];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[1];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[9];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[12];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[5];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[1];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[15];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[14];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[13];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[4];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[10];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[0];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[7];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[6];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[3];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[9];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[2];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[8];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[11];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[13];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[11];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[7];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[14];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[12];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[1];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[3];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[9];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[5];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[0];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[15];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[4];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[8];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[6];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[2];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[10];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[6];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[15];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[14];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[9];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[11];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[3];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[0];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[8];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[2];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[13];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[7];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[1];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[4];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[10];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[2];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[7];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[6];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[1];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[5];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[15];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[11];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[9];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[14];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[3];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[13];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[0];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[1];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[2];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[7];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[8];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[9];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[13];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[14];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[14];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[9];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[15];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[0];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[2];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[11];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - S->h[0] = S->h[0] ^ v[0] ^ v[8]; - S->h[1] = S->h[1] ^ v[1] ^ v[9]; - S->h[2] = S->h[2] ^ v[2] ^ v[10]; - S->h[3] = S->h[3] ^ v[3] ^ v[11]; - S->h[4] = S->h[4] ^ v[4] ^ v[12]; - S->h[5] = S->h[5] ^ v[5] ^ v[13]; - S->h[6] = S->h[6] ^ v[6] ^ v[14]; - S->h[7] = S->h[7] ^ v[7] ^ v[15]; +#define ROUND(r) \ + do { \ + G(r, 0, v[0], v[4], v[8], v[12]); \ + G(r, 1, v[1], v[5], v[9], v[13]); \ + G(r, 2, v[2], v[6], v[10], v[14]); \ + G(r, 3, v[3], v[7], v[11], v[15]); \ + G(r, 4, v[0], v[5], v[10], v[15]); \ + G(r, 5, v[1], v[6], v[11], v[12]); \ + G(r, 6, v[2], v[7], v[8], v[13]); \ + G(r, 7, v[3], v[4], v[9], v[14]); \ + } while ((void)0, 0) + + for (r = 0; r < 12; ++r) { + ROUND(r); + } + + for (i = 0; i < 8; ++i) { + S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; + } + +#undef G +#undef ROUND } int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { const uint8_t *pin = (const uint8_t *)in; + + if (inlen == 0) { + return 0; + } + + /* Sanity check */ + if (S == NULL || in == NULL) { + return -1; + } + + /* Is this a reused state? */ + if (S->f[0] != 0) { + return -1; + } + if (S->buflen + inlen > BLAKE2B_BLOCKBYTES) { + /* Complete current block */ size_t left = S->buflen; size_t fill = BLAKE2B_BLOCKBYTES - left; memcpy(&S->buf[left], pin, fill); @@ -233,6 +248,7 @@ int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { S->buflen = 0; inlen -= fill; pin += fill; + /* Avoid buffer copies when possible */ while (inlen > BLAKE2B_BLOCKBYTES) { blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); blake2b_compress(S, pin); @@ -248,59 +264,127 @@ int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { int blake2b_final(blake2b_state *S, void *out, size_t outlen) { uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; unsigned int i; + + /* Sanity checks */ + if (S == NULL || out == NULL || outlen < S->outlen) { + return -1; + } + + /* Is this a reused state? */ + if (S->f[0] != 0) { + return -1; + } + blake2b_increment_counter(S, S->buflen); blake2b_set_lastblock(S); memset(&S->buf[S->buflen], 0, BLAKE2B_BLOCKBYTES - S->buflen); /* Padding */ blake2b_compress(S, S->buf); - for (i = 0; i < 8; ++i) + + for (i = 0; i < 8; ++i) { /* Output full hash to temp buffer */ store64(buffer + sizeof(S->h[i]) * i, S->h[i]); + } + memcpy(out, buffer, S->outlen); + clear_internal_memory(buffer, sizeof(buffer)); + clear_internal_memory(S->buf, sizeof(S->buf)); + clear_internal_memory(S->h, sizeof(S->h)); return 0; } -int blake2b(void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen) { +int blake2b(void *out, size_t outlen, const void *in, size_t inlen, + const void *key, size_t keylen) { blake2b_state S; int ret = -1; - blake2b_init(&S, outlen); - blake2b_update(&S, in, inlen); - blake2b_final(&S, out, outlen); + + /* Verify parameters */ + if (NULL == in && inlen > 0) { + goto fail; + } + + if (NULL == out || outlen == 0 || outlen > BLAKE2B_OUTBYTES) { + goto fail; + } + + if ((NULL == key && keylen > 0) || keylen > BLAKE2B_KEYBYTES) { + goto fail; + } + + if (keylen > 0) { + if (blake2b_init_key(&S, outlen, key, keylen) < 0) { + goto fail; + } + } else { + if (blake2b_init(&S, outlen) < 0) { + goto fail; + } + } + + if (blake2b_update(&S, in, inlen) < 0) { + goto fail; + } + ret = blake2b_final(&S, out, outlen); + +fail: + clear_internal_memory(&S, sizeof(S)); + return ret; } +/* Argon2 Team - Begin Code */ int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { uint8_t *out = (uint8_t *)pout; blake2b_state blake_state; uint8_t outlen_bytes[sizeof(uint32_t)] = {0}; int ret = -1; + + if (outlen > UINT32_MAX) { + goto fail; + } + + /* Ensure little-endian byte order! */ store32(outlen_bytes, (uint32_t)outlen); +#define TRY(statement) \ + do { \ + ret = statement; \ + if (ret < 0) { \ + goto fail; \ + } \ + } while ((void)0, 0) + if (outlen <= BLAKE2B_OUTBYTES) { - blake2b_init(&blake_state, outlen); - blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)); - blake2b_update(&blake_state, in, inlen); - blake2b_final(&blake_state, out, outlen); + TRY(blake2b_init(&blake_state, outlen)); + TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); + TRY(blake2b_update(&blake_state, in, inlen)); + TRY(blake2b_final(&blake_state, out, outlen)); } else { uint32_t toproduce; uint8_t out_buffer[BLAKE2B_OUTBYTES]; uint8_t in_buffer[BLAKE2B_OUTBYTES]; - blake2b_init(&blake_state, BLAKE2B_OUTBYTES); - blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)); - blake2b_update(&blake_state, in, inlen); - blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES); + TRY(blake2b_init(&blake_state, BLAKE2B_OUTBYTES)); + TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); + TRY(blake2b_update(&blake_state, in, inlen)); + TRY(blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES)); memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); out += BLAKE2B_OUTBYTES / 2; toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2; while (toproduce > BLAKE2B_OUTBYTES) { memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); - blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer,BLAKE2B_OUTBYTES, NULL, 0); + TRY(blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer, + BLAKE2B_OUTBYTES, NULL, 0)); memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); out += BLAKE2B_OUTBYTES / 2; toproduce -= BLAKE2B_OUTBYTES / 2; } memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); - blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, 0); + TRY(blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, + 0)); memcpy(out, out_buffer, toproduce); } +fail: + clear_internal_memory(&blake_state, sizeof(blake_state)); return ret; +#undef TRY } +/* Argon2 Team - End Code */ diff --git a/stratum/algos/blake2/blake2b.c.bak b/stratum/algos/blake2/blake2b.c.bak index ca05df598..43a6ae71b 100644 --- a/stratum/algos/blake2/blake2b.c.bak +++ b/stratum/algos/blake2/blake2b.c.bak @@ -18,7 +18,6 @@ #include #include #include - #include "blake2.h" #include "blake2-impl.h" @@ -28,40 +27,20 @@ static const uint64_t blake2b_IV[8] = { UINT64_C(0x510e527fade682d1), UINT64_C(0x9b05688c2b3e6c1f), UINT64_C(0x1f83d9abfb41bd6b), UINT64_C(0x5be0cd19137e2179)}; -static const unsigned int blake2b_sigma[12][16] = { - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, - {11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4}, - {7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8}, - {9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13}, - {2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9}, - {12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11}, - {13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10}, - {6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5}, - {10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0}, - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3}, -}; - static BLAKE2_INLINE void blake2b_set_lastnode(blake2b_state *S) { S->f[1] = (uint64_t)-1; } static BLAKE2_INLINE void blake2b_set_lastblock(blake2b_state *S) { - if (S->last_node) { - blake2b_set_lastnode(S); - } S->f[0] = (uint64_t)-1; } -static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, - uint64_t inc) { +static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, uint64_t inc) { S->t[0] += inc; S->t[1] += (S->t[0] < inc); } static BLAKE2_INLINE void blake2b_invalidate_state(blake2b_state *S) { - clear_internal_memory(S, sizeof(*S)); /* wipe */ blake2b_set_lastblock(S); /* invalidate for further use */ } @@ -73,16 +52,9 @@ static BLAKE2_INLINE void blake2b_init0(blake2b_state *S) { int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { const unsigned char *p = (const unsigned char *)P; unsigned int i; - - if (NULL == P || NULL == S) { - return -1; - } - blake2b_init0(S); - /* IV XOR Parameter Block */ - for (i = 0; i < 8; ++i) { + for (i = 0; i < 8; ++i) S->h[i] ^= load64(&p[i * sizeof(S->h[i])]); - } S->outlen = P->digest_length; return 0; } @@ -90,17 +62,6 @@ int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { /* Sequential blake2b initialization */ int blake2b_init(blake2b_state *S, size_t outlen) { blake2b_param P; - - if (S == NULL) { - return -1; - } - - if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { - blake2b_invalidate_state(S); - return -1; - } - - /* Setup Parameter Block for unkeyed BLAKE2 */ P.digest_length = (uint8_t)outlen; P.key_length = 0; P.fanout = 1; @@ -112,29 +73,11 @@ int blake2b_init(blake2b_state *S, size_t outlen) { memset(P.reserved, 0, sizeof(P.reserved)); memset(P.salt, 0, sizeof(P.salt)); memset(P.personal, 0, sizeof(P.personal)); - return blake2b_init_param(S, &P); } -int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, - size_t keylen) { +int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, size_t keylen) { blake2b_param P; - - if (S == NULL) { - return -1; - } - - if ((outlen == 0) || (outlen > BLAKE2B_OUTBYTES)) { - blake2b_invalidate_state(S); - return -1; - } - - if ((key == 0) || (keylen == 0) || (keylen > BLAKE2B_KEYBYTES)) { - blake2b_invalidate_state(S); - return -1; - } - - /* Setup Parameter Block for keyed BLAKE2 */ P.digest_length = (uint8_t)outlen; P.key_length = (uint8_t)keylen; P.fanout = 1; @@ -143,23 +86,9 @@ int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, P.node_offset = 0; P.node_depth = 0; P.inner_length = 0; - memset(P.reserved, 0, sizeof(P.reserved)); - memset(P.salt, 0, sizeof(P.salt)); - memset(P.personal, 0, sizeof(P.personal)); - - if (blake2b_init_param(S, &P) < 0) { - blake2b_invalidate_state(S); - return -1; - } - - { - uint8_t block[BLAKE2B_BLOCKBYTES]; - memset(block, 0, BLAKE2B_BLOCKBYTES); - memcpy(block, key, keylen); - blake2b_update(S, block, BLAKE2B_BLOCKBYTES); - /* Burn the key from stack */ - clear_internal_memory(block, BLAKE2B_BLOCKBYTES); - } + uint8_t block[BLAKE2B_BLOCKBYTES]; + memcpy(block, key, keylen); + blake2b_update(S, block, BLAKE2B_BLOCKBYTES); return 0; } @@ -168,78 +97,134 @@ static void blake2b_compress(blake2b_state *S, const uint8_t *block) { uint64_t v[16]; unsigned int i, r; - for (i = 0; i < 16; ++i) { + for (i = 0; i < 16; ++i) m[i] = load64(block + i * sizeof(m[i])); - } - - for (i = 0; i < 8; ++i) { - v[i] = S->h[i]; - } - - v[8] = blake2b_IV[0]; - v[9] = blake2b_IV[1]; - v[10] = blake2b_IV[2]; - v[11] = blake2b_IV[3]; - v[12] = blake2b_IV[4] ^ S->t[0]; - v[13] = blake2b_IV[5] ^ S->t[1]; - v[14] = blake2b_IV[6] ^ S->f[0]; - v[15] = blake2b_IV[7] ^ S->f[1]; - -#define G(r, i, a, b, c, d) \ - do { \ - a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \ - d = rotr64(d ^ a, 32); \ - c = c + d; \ - b = rotr64(b ^ c, 24); \ - a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \ - d = rotr64(d ^ a, 16); \ - c = c + d; \ - b = rotr64(b ^ c, 63); \ - } while ((void)0, 0) -#define ROUND(r) \ - do { \ - G(r, 0, v[0], v[4], v[8], v[12]); \ - G(r, 1, v[1], v[5], v[9], v[13]); \ - G(r, 2, v[2], v[6], v[10], v[14]); \ - G(r, 3, v[3], v[7], v[11], v[15]); \ - G(r, 4, v[0], v[5], v[10], v[15]); \ - G(r, 5, v[1], v[6], v[11], v[12]); \ - G(r, 6, v[2], v[7], v[8], v[13]); \ - G(r, 7, v[3], v[4], v[9], v[14]); \ - } while ((void)0, 0) - - for (r = 0; r < 12; ++r) { - ROUND(r); - } - - for (i = 0; i < 8; ++i) { - S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; - } - -#undef G -#undef ROUND + v[0] = S->h[0]; + v[1] = S->h[1]; + v[2] = S->h[2]; + v[3] = S->h[3]; + v[4] = S->h[4]; + v[5] = S->h[5]; + v[6] = S->h[6]; + v[7] = S->h[7]; + v[8] = 0x6a09e667f3bcc908; + v[9] = 0xbb67ae8584caa73b; + v[10] = 0x3c6ef372fe94f82b; + v[11] = 0xa54ff53a5f1d36f1; + v[12] = 0x510e527fade682d1 ^ S->t[0]; + v[13] = 0x9b05688c2b3e6c1f ^ S->t[1]; + v[14] = 0x1f83d9abfb41bd6b ^ S->f[0]; + v[15] = 0x5be0cd19137e2179 ^ S->f[1]; + v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[1];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[2];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[7];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[8];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[9];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[13];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[14];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[14];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[9];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[15];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[0];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[2];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[11];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[11];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[8];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[12];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[0];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[2];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[15];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[10];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[14];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[3];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[6];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[1];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[9];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[4];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[7];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[9];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[1];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[13];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[12];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[11];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[14];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[2];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[6];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[5];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[4];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[0];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[8];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[9];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[5];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[7];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[2];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[10];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[15];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[14];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[12];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[6];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[8];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[13];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[2];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[12];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[6];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[10];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[0];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[11];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[8];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[3];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[4];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[13];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[7];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[5];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[15];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[14];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[1];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[9];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[12];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[5];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[1];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[15];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[14];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[13];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[4];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[10];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[0];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[7];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[6];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[3];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[9];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[2];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[8];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[11];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[13];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[11];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[7];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[14];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[12];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[1];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[3];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[9];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[5];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[0];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[15];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[4];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[8];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[6];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[2];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[10];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[6];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[15];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[14];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[9];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[11];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[3];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[0];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[8];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[2];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[13];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[7];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[1];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[4];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[10];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[2];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[7];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[6];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[1];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[5];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[15];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[11];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[9];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[14];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[3];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[13];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[0];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[1];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[2];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[7];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[8];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[9];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[13];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[14];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + v[0]=v[0]+v[4]+m[14];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); + v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); + v[2]=v[2]+v[6]+m[9];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[15];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); + v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); + v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); + v[1]=v[1]+v[6]+m[0];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[2];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); + v[2]=v[2]+v[7]+m[11];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); + v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); + S->h[0] = S->h[0] ^ v[0] ^ v[8]; + S->h[1] = S->h[1] ^ v[1] ^ v[9]; + S->h[2] = S->h[2] ^ v[2] ^ v[10]; + S->h[3] = S->h[3] ^ v[3] ^ v[11]; + S->h[4] = S->h[4] ^ v[4] ^ v[12]; + S->h[5] = S->h[5] ^ v[5] ^ v[13]; + S->h[6] = S->h[6] ^ v[6] ^ v[14]; + S->h[7] = S->h[7] ^ v[7] ^ v[15]; } int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { const uint8_t *pin = (const uint8_t *)in; - - if (inlen == 0) { - return 0; - } - - /* Sanity check */ - if (S == NULL || in == NULL) { - return -1; - } - - /* Is this a reused state? */ - if (S->f[0] != 0) { - return -1; - } - if (S->buflen + inlen > BLAKE2B_BLOCKBYTES) { - /* Complete current block */ size_t left = S->buflen; size_t fill = BLAKE2B_BLOCKBYTES - left; memcpy(&S->buf[left], pin, fill); @@ -248,7 +233,6 @@ int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { S->buflen = 0; inlen -= fill; pin += fill; - /* Avoid buffer copies when possible */ while (inlen > BLAKE2B_BLOCKBYTES) { blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); blake2b_compress(S, pin); @@ -264,127 +248,59 @@ int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { int blake2b_final(blake2b_state *S, void *out, size_t outlen) { uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; unsigned int i; - - /* Sanity checks */ - if (S == NULL || out == NULL || outlen < S->outlen) { - return -1; - } - - /* Is this a reused state? */ - if (S->f[0] != 0) { - return -1; - } - blake2b_increment_counter(S, S->buflen); blake2b_set_lastblock(S); memset(&S->buf[S->buflen], 0, BLAKE2B_BLOCKBYTES - S->buflen); /* Padding */ blake2b_compress(S, S->buf); - - for (i = 0; i < 8; ++i) { /* Output full hash to temp buffer */ + for (i = 0; i < 8; ++i) store64(buffer + sizeof(S->h[i]) * i, S->h[i]); - } - memcpy(out, buffer, S->outlen); - clear_internal_memory(buffer, sizeof(buffer)); - clear_internal_memory(S->buf, sizeof(S->buf)); - clear_internal_memory(S->h, sizeof(S->h)); return 0; } -int blake2b(void *out, size_t outlen, const void *in, size_t inlen, - const void *key, size_t keylen) { +int blake2b(void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen) { blake2b_state S; int ret = -1; - - /* Verify parameters */ - if (NULL == in && inlen > 0) { - goto fail; - } - - if (NULL == out || outlen == 0 || outlen > BLAKE2B_OUTBYTES) { - goto fail; - } - - if ((NULL == key && keylen > 0) || keylen > BLAKE2B_KEYBYTES) { - goto fail; - } - - if (keylen > 0) { - if (blake2b_init_key(&S, outlen, key, keylen) < 0) { - goto fail; - } - } else { - if (blake2b_init(&S, outlen) < 0) { - goto fail; - } - } - - if (blake2b_update(&S, in, inlen) < 0) { - goto fail; - } - ret = blake2b_final(&S, out, outlen); - -fail: - clear_internal_memory(&S, sizeof(S)); - return ret; + blake2b_init(&S, outlen); + blake2b_update(&S, in, inlen); + blake2b_final(&S, out, outlen); } -/* Argon2 Team - Begin Code */ int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { uint8_t *out = (uint8_t *)pout; blake2b_state blake_state; uint8_t outlen_bytes[sizeof(uint32_t)] = {0}; int ret = -1; - - if (outlen > UINT32_MAX) { - goto fail; - } - - /* Ensure little-endian byte order! */ store32(outlen_bytes, (uint32_t)outlen); -#define TRY(statement) \ - do { \ - ret = statement; \ - if (ret < 0) { \ - goto fail; \ - } \ - } while ((void)0, 0) - if (outlen <= BLAKE2B_OUTBYTES) { - TRY(blake2b_init(&blake_state, outlen)); - TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); - TRY(blake2b_update(&blake_state, in, inlen)); - TRY(blake2b_final(&blake_state, out, outlen)); + blake2b_init(&blake_state, outlen); + blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)); + blake2b_update(&blake_state, in, inlen); + blake2b_final(&blake_state, out, outlen); } else { uint32_t toproduce; uint8_t out_buffer[BLAKE2B_OUTBYTES]; uint8_t in_buffer[BLAKE2B_OUTBYTES]; - TRY(blake2b_init(&blake_state, BLAKE2B_OUTBYTES)); - TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes))); - TRY(blake2b_update(&blake_state, in, inlen)); - TRY(blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES)); + blake2b_init(&blake_state, BLAKE2B_OUTBYTES); + blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)); + blake2b_update(&blake_state, in, inlen); + blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES); memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); out += BLAKE2B_OUTBYTES / 2; toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2; while (toproduce > BLAKE2B_OUTBYTES) { memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); - TRY(blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer, - BLAKE2B_OUTBYTES, NULL, 0)); + blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer,BLAKE2B_OUTBYTES, NULL, 0); memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); out += BLAKE2B_OUTBYTES / 2; toproduce -= BLAKE2B_OUTBYTES / 2; } memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); - TRY(blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, - 0)); + blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, 0); memcpy(out, out_buffer, toproduce); } -fail: - clear_internal_memory(&blake_state, sizeof(blake_state)); return ret; -#undef TRY } -/* Argon2 Team - End Code */ diff --git a/stratum/algos/lyra2v3.c b/stratum/algos/lyra2v3.c index ee0aa80e5..ece25e762 100644 --- a/stratum/algos/lyra2v3.c +++ b/stratum/algos/lyra2v3.c @@ -1,6 +1,5 @@ /*- - * Copyright 2009 Colin Percival, 2011 ArtForz, 2013 Neisklar, 2014 James Lovejoy - * All rights reserved. + * Copyright(or left) 2019 YiiMP * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,37 +30,39 @@ #include #include #include + #include "../sha3/sph_blake.h" #include "../sha3/sph_cubehash.h" #include "../sha3/sph_bmw.h" + #include "Lyra2.h" void lyra2v3_hash(const char* input, char* output, uint32_t len) { - uint32_t hashA[8], hashB[8]; + uint32_t hash[8], hashB[8]; - sph_blake256_context ctx_blake; - sph_cubehash256_context ctx_cube; - sph_bmw256_context ctx_bmw; + sph_blake256_context ctx_blake; + sph_cubehash256_context ctx_cubehash; + sph_bmw256_context ctx_bmw; sph_blake256_set_rounds(14); sph_blake256_init(&ctx_blake); - sph_blake256(&ctx_blake, input, len); - sph_blake256_close(&ctx_blake, hashA); - - LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); - - sph_cubehash256_init(&ctx_cube); - sph_cubehash256(&ctx_cube, hashB, 32); - sph_cubehash256_close(&ctx_cube, hashA); - - LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); + sph_blake256(&ctx_blake, input, len); /* 80 */ + sph_blake256_close(&ctx_blake, hash); + + LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); + + sph_cubehash256_init(&ctx_cubehash); + sph_cubehash256(&ctx_cubehash, hashB, 32); + sph_cubehash256_close(&ctx_cubehash, hash); + + LYRA2_3(hashB, 32, hash, 32, hash, 32, 1, 4, 4); sph_bmw256_init(&ctx_bmw); sph_bmw256(&ctx_bmw, hashB, 32); - sph_bmw256_close(&ctx_bmw, hashA); + sph_bmw256_close(&ctx_bmw, hash); - memcpy(output, hashA, 32); + memcpy(output, hash, 32); } diff --git a/stratum/algos/lyra2v3.c.bak b/stratum/algos/lyra2v3.c.bak new file mode 100644 index 000000000..ee0aa80e5 --- /dev/null +++ b/stratum/algos/lyra2v3.c.bak @@ -0,0 +1,67 @@ +/*- + * Copyright 2009 Colin Percival, 2011 ArtForz, 2013 Neisklar, 2014 James Lovejoy + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ + +#include +#include +#include +#include +#include "../sha3/sph_blake.h" +#include "../sha3/sph_cubehash.h" +#include "../sha3/sph_bmw.h" +#include "Lyra2.h" + +void lyra2v3_hash(const char* input, char* output, uint32_t len) +{ + uint32_t hashA[8], hashB[8]; + + sph_blake256_context ctx_blake; + sph_cubehash256_context ctx_cube; + sph_bmw256_context ctx_bmw; + + sph_blake256_set_rounds(14); + + sph_blake256_init(&ctx_blake); + sph_blake256(&ctx_blake, input, len); + sph_blake256_close(&ctx_blake, hashA); + + LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); + + sph_cubehash256_init(&ctx_cube); + sph_cubehash256(&ctx_cube, hashB, 32); + sph_cubehash256_close(&ctx_cube, hashA); + + LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); + + sph_bmw256_init(&ctx_bmw); + sph_bmw256(&ctx_bmw, hashB, 32); + sph_bmw256_close(&ctx_bmw, hashA); + + memcpy(output, hashA, 32); +} + diff --git a/stratum/algos/x16rv2.c b/stratum/algos/x16rv2.c index 788bd7f90..7bb2bfe5a 100644 --- a/stratum/algos/x16rv2.c +++ b/stratum/algos/x16rv2.c @@ -58,10 +58,6 @@ static void getAlgoString(const uint8_t* prevblock, char *output) *sptr = '\0'; } -inline void padtiger512(uint32_t* hash) { - for (int i = (24/4); i < (64/4); i++) hash[i] = 0; -} - void x16rv2_hash(const char* input, char* output, uint32_t len) { uint32_t hash[64/4]; @@ -125,7 +121,7 @@ void x16rv2_hash(const char* input, char* output, uint32_t len) sph_tiger_init(&ctx_tiger); sph_tiger(&ctx_tiger, (const void*) in, size); sph_tiger_close(&ctx_tiger, (void*) hash); - padtiger512(hash); + for (int j = 24; j < 64; ++j) ((uint8_t*)hash)[j] = 0; // Pad the 24 bytes to bring it to 64 bytes sph_keccak512_init(&ctx_keccak); sph_keccak512(&ctx_keccak, hash, 64); @@ -135,7 +131,7 @@ void x16rv2_hash(const char* input, char* output, uint32_t len) sph_tiger_init(&ctx_tiger); sph_tiger(&ctx_tiger, (const void*) in, size); sph_tiger_close(&ctx_tiger, (void*) hash); - padtiger512(hash); + for (int j = 24; j < 64; ++j) ((uint8_t*)hash)[j] = 0; // Pad the 24 bytes to bring it to 64 bytes sph_luffa512_init(&ctx_luffa); sph_luffa512(&ctx_luffa, hash, 64); @@ -185,7 +181,7 @@ void x16rv2_hash(const char* input, char* output, uint32_t len) sph_tiger_init(&ctx_tiger); sph_tiger(&ctx_tiger, (const void*) in, size); sph_tiger_close(&ctx_tiger, (void*) hash); - padtiger512(hash); + for (int j = 24; j < 64; ++j) ((uint8_t*)hash)[j] = 0; // Pad the 24 bytes to bring it to 64 bytes sph_sha512_init(&ctx_sha512); sph_sha512(&ctx_sha512,(const void*) hash, 64); diff --git a/stratum/algos/x16rv2.c.bak b/stratum/algos/x16rv2.c.bak new file mode 100644 index 000000000..788bd7f90 --- /dev/null +++ b/stratum/algos/x16rv2.c.bak @@ -0,0 +1,199 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common.h" + +enum Algo { + BLAKE = 0, + BMW, + GROESTL, + JH, + KECCAK, + SKEIN, + LUFFA, + CUBEHASH, + SHAVITE, + SIMD, + ECHO, + HAMSI, + FUGUE, + SHABAL, + WHIRLPOOL, + SHA512, + HASH_FUNC_COUNT +}; + +static void getAlgoString(const uint8_t* prevblock, char *output) +{ + char *sptr = output; + + for (int j = 0; j < HASH_FUNC_COUNT; j++) { + char b = (15 - j) >> 1; // 16 ascii hex chars, reversed + uint8_t algoDigit = (j & 1) ? prevblock[b] & 0xF : prevblock[b] >> 4; + if (algoDigit >= 10) + sprintf(sptr, "%c", 'A' + (algoDigit - 10)); + else + sprintf(sptr, "%u", (uint32_t) algoDigit); + sptr++; + } + *sptr = '\0'; +} + +inline void padtiger512(uint32_t* hash) { + for (int i = (24/4); i < (64/4); i++) hash[i] = 0; +} + +void x16rv2_hash(const char* input, char* output, uint32_t len) +{ + uint32_t hash[64/4]; + char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; + + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_tiger_context ctx_tiger; + + void *in = (void*) input; + int size = len; + + getAlgoString(&input[4], hashOrder); + + for (int i = 0; i < 16; i++) + { + const char elem = hashOrder[i]; + const uint8_t algo = elem >= 'A' ? elem - 'A' + 10 : elem - '0'; + + switch (algo) { + case BLAKE: + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, in, size); + sph_blake512_close(&ctx_blake, hash); + break; + case BMW: + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, in, size); + sph_bmw512_close(&ctx_bmw, hash); + break; + case GROESTL: + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, in, size); + sph_groestl512_close(&ctx_groestl, hash); + break; + case SKEIN: + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, in, size); + sph_skein512_close(&ctx_skein, hash); + break; + case JH: + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, in, size); + sph_jh512_close(&ctx_jh, hash); + break; + case KECCAK: + sph_tiger_init(&ctx_tiger); + sph_tiger(&ctx_tiger, (const void*) in, size); + sph_tiger_close(&ctx_tiger, (void*) hash); + padtiger512(hash); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, hash, 64); + sph_keccak512_close(&ctx_keccak, hash); + break; + case LUFFA: + sph_tiger_init(&ctx_tiger); + sph_tiger(&ctx_tiger, (const void*) in, size); + sph_tiger_close(&ctx_tiger, (void*) hash); + padtiger512(hash); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hash, 64); + sph_luffa512_close(&ctx_luffa, hash); + break; + case CUBEHASH: + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, in, size); + sph_cubehash512_close(&ctx_cubehash, hash); + break; + case SHAVITE: + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, in, size); + sph_shavite512_close(&ctx_shavite, hash); + break; + case SIMD: + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, in, size); + sph_simd512_close(&ctx_simd, hash); + break; + case ECHO: + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, in, size); + sph_echo512_close(&ctx_echo, hash); + break; + case HAMSI: + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, in, size); + sph_hamsi512_close(&ctx_hamsi, hash); + break; + case FUGUE: + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, in, size); + sph_fugue512_close(&ctx_fugue, hash); + break; + case SHABAL: + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, in, size); + sph_shabal512_close(&ctx_shabal, hash); + break; + case WHIRLPOOL: + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool(&ctx_whirlpool, in, size); + sph_whirlpool_close(&ctx_whirlpool, hash); + break; + case SHA512: + sph_tiger_init(&ctx_tiger); + sph_tiger(&ctx_tiger, (const void*) in, size); + sph_tiger_close(&ctx_tiger, (void*) hash); + padtiger512(hash); + + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) hash, 64); + sph_sha512_close(&ctx_sha512,(void*) hash); + break; + } + in = (void*) hash; + size = 64; + } + memcpy(output, hash, 32); +} diff --git a/stratum/client.h b/stratum/client.h index 96701c255..128e70d52 100644 --- a/stratum/client.h +++ b/stratum/client.h @@ -31,8 +31,8 @@ struct YAAMP_CLIENT_ALGO #define YAAMP_JOB_MAXHISTORY 16 -#define MIN_ADDRESS_LEN 30 /* BTC len can be as few as 26 chars, but gen. 33 or 34 */ -#define MAX_ADDRESS_LEN 52 /* BITC */ +#define MIN_ADDRESS_LEN 3 /* BTC len can be as few as 26 chars, but gen. 33 or 34 */ +#define MAX_ADDRESS_LEN 98 /* BITC */ class YAAMP_CLIENT: public YAAMP_OBJECT { diff --git a/stratum/client.h.bak b/stratum/client.h.bak new file mode 100644 index 000000000..96701c255 --- /dev/null +++ b/stratum/client.h.bak @@ -0,0 +1,169 @@ + +//struct YAAMP_SOURCE +//{ +//public: +// int count; +// double speed; +// +// char ip[64]; +//}; + +struct YAAMP_ALGO +{ + char name[64]; + YAAMP_HASH_FUNCTION hash_function; + + double diff_multiplier; + double factor; + YAAMP_HASH_FUNCTION merkle_func; + + double profit; + double rent; + + bool overflow; +}; + +struct YAAMP_CLIENT_ALGO +{ + double factor; + YAAMP_ALGO *algo; +}; + +#define YAAMP_JOB_MAXHISTORY 16 + +#define MIN_ADDRESS_LEN 30 /* BTC len can be as few as 26 chars, but gen. 33 or 34 */ +#define MAX_ADDRESS_LEN 52 /* BITC */ + +class YAAMP_CLIENT: public YAAMP_OBJECT +{ +public: + YAAMP_SOCKET *sock; +// YAAMP_SOURCE *source; + + char notify_id[1024]; + int64_t reqid; // ask request id + + int created; + int last_best; + + bool reconnectable; + bool reconnecting; + + int userid; + int workerid; + int coinid; + bool logtraffic; + + int id_int; + const char *id_str; + + char version[1024]; + char username[1024]; + char password[1024]; + char worker[1024]; + + double difficulty_actual; + double difficulty_remote; + double difficulty_written; + bool difficulty_fixed; + + long long last_submit_time; + double shares_per_minute; + + char extranonce1[32]; + int extranonce2size; + + char extranonce1_default[32]; + int extranonce2size_default; + + char extranonce1_last[32]; + int extranonce2size_last; + + char extranonce1_reconnect[32]; + int extranonce2size_reconnect; + + bool extranonce_subscribe; + int submit_bad; + + double speed; + int extranonce1_id; + + int jobid_next; + int jobid_sent; + int jobid_locked; + + YAAMP_CLIENT_ALGO algos_subscribed[YAAMP_MAXALGOS]; + int job_history[YAAMP_JOB_MAXHISTORY]; + + int64_t shares; + int stats; + + int donation; + int broadcast_timeouts; +}; + +inline void client_delete(YAAMP_OBJECT *object) +{ + YAAMP_CLIENT *client = (YAAMP_CLIENT *)object; + if (object == NULL) return; + + socket_close(client->sock); + delete client; + + object = NULL; +} + +////////////////////////////////////////////////////////////////////////// + +YAAMP_CLIENT *client_find_notify_id(const char *notify_id, bool reconnecting); + +void get_next_extraonce1(char *extraonce1); +void get_random_key(char *key); + +void client_sort(); +void client_block_ip(YAAMP_CLIENT *client, const char *reason); +void client_block_ipset(YAAMP_CLIENT *client, const char *ipset_name); + +bool client_reset_multialgo(YAAMP_CLIENT *client, bool first); +bool client_initialize_multialgo(YAAMP_CLIENT *client); + +void client_add_job_history(YAAMP_CLIENT *client, int jobid); +bool client_find_job_history(YAAMP_CLIENT *client, int jobid, int startat=1); + +bool client_find_my_ip(const char *ip); + +////////////////////////////////////////////////////////////////////////// + +int client_send_difficulty(YAAMP_CLIENT *client, double difficulty); +double client_normalize_difficulty(double difficulty); + +void client_change_difficulty(YAAMP_CLIENT *client, double difficulty); +void client_record_difficulty(YAAMP_CLIENT *client); +void client_adjust_difficulty(YAAMP_CLIENT *client); + +void client_initialize_difficulty(YAAMP_CLIENT *client); + +////////////////////////////////////////////////////////////////////////// + +int client_call(YAAMP_CLIENT *client, const char *method, const char *format, ...); +int client_ask(YAAMP_CLIENT *client, const char *method, const char *format, ...); + +void client_dump_all(); + +int client_send_result(YAAMP_CLIENT *client, const char *format, ...); +int client_send_error(YAAMP_CLIENT *client, int error, const char *string); + +bool client_ask_stats(YAAMP_CLIENT *client); + +bool client_submit(YAAMP_CLIENT *client, json_value *json_params); + +int client_workers_count(YAAMP_CLIENT *client); +int client_workers_byaddress(const char *username); +bool client_auth_by_workers(YAAMP_CLIENT *client); + +void *client_thread(void *p); + +void db_check_user_input(char* input); + +//void source_prune(); + diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index 55385e982..affe411ee 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -27,6 +27,10 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem string merkleroot = merkle_with_first(templ->txsteps, doublehash); ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); + + if(templ->isbitcash) { + sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinforsubmitb1, nonce1, nonce2, templ->coinforsubmitb2); + } #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); @@ -39,7 +43,14 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce, templ->extradata_be); ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) - } else { + } else if (templ->needpriceinfo) + { + sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 20); + sprintf(submitvalues->header_be, "%s%s", submitvalues->header_be, templ->priceinfo); + } else + { sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce); ser_string_be(submitvalues->header, submitvalues->header_be, 20); @@ -559,4 +570,4 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) object_unlock(job); return true; -} \ No newline at end of file +} diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak new file mode 100644 index 000000000..55385e982 --- /dev/null +++ b/stratum/client_submit.cpp.bak @@ -0,0 +1,562 @@ + +#include "stratum.h" + +uint64_t lyra2z_height = 0; + +//#define MERKLE_DEBUGLOG +//#define DONTSUBMIT + +void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, + const char *nonce1, const char *nonce2, const char *ntime, const char *nonce) +{ + sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); + int coinbase_len = strlen(submitvalues->coinbase); + + unsigned char coinbase_bin[1024]; + memset(coinbase_bin, 0, 1024); + binlify(coinbase_bin, submitvalues->coinbase); + + char doublehash[128]; + memset(doublehash, 0, 128); + + // some (old) wallet/algos need a simple SHA256 (blakecoin, whirlcoin, groestlcoin...) + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + if (g_current_algo->merkle_func) + merkle_hash = g_current_algo->merkle_func; + merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); + + string merkleroot = merkle_with_first(templ->txsteps, doublehash); + ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); + +#ifdef MERKLE_DEBUGLOG + printf("merkle root %s\n", merkleroot.c_str()); +#endif + if (!strcmp(g_stratum_algo, "lbry")) { + sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + templ->claim_be, ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); + } else if (strlen(templ->extradata_be) == 128) { // LUX SC + sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce, templ->extradata_be); + ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) + } else { + sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 20); + } + + binlify(submitvalues->header_bin, submitvalues->header_be); + +// printf("%s\n", submitvalues->header_be); + int header_len = strlen(submitvalues->header)/2; + g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); + + hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); + string_be(submitvalues->hash_hex, submitvalues->hash_be); +} + +///////////////////////////////////////////// + +static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *out, + const char *ntime, const char *nonce, const char *nonce2, const char *vote, bool usegetwork) +{ + struct __attribute__((__packed__)) { + uint32_t version; + char prevblock[32]; + char merkleroot[32]; + char stakeroot[32]; + uint16_t votebits; + char finalstate[6]; + uint16_t voters; + uint8_t freshstake; + uint8_t revoc; + uint32_t poolsize; + uint32_t nbits; + uint64_t sbits; + uint32_t height; + uint32_t size; + uint32_t ntime; + uint32_t nonce; + unsigned char extra[32]; + uint32_t stakever; + uint32_t hashtag[3]; + } header; + + memcpy(&header, templ->header, sizeof(header)); + + memset(header.extra, 0, 32); + sscanf(nonce, "%08x", &header.nonce); + + if (strcmp(vote, "")) { + uint16_t votebits = 0; + sscanf(vote, "%04hx", &votebits); + header.votebits = (header.votebits & 1) | (votebits & 0xfffe); + } + + binlify(header.extra, nonce2); + + hexlify(out->header, (const unsigned char*) &header, 180); + memcpy(out->header_bin, &header, sizeof(header)); +} + +static void build_submit_values_decred(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, + const char *nonce1, const char *nonce2, const char *ntime, const char *nonce, const char *vote, bool usegetwork) +{ + if (!usegetwork) { + // not used yet + char doublehash[128] = { 0 }; + + sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); + int coinbase_len = strlen(submitvalues->coinbase); + + unsigned char coinbase_bin[1024]; + memset(coinbase_bin, 0, 1024); + binlify(coinbase_bin, submitvalues->coinbase); + + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + if (g_current_algo->merkle_func) + merkle_hash = g_current_algo->merkle_func; + merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); + + string merkleroot = merkle_with_first(templ->txsteps, doublehash); + ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); + +#ifdef MERKLE_DEBUGLOG + printf("merkle root %s\n", merkleroot.c_str()); +#endif + } + create_decred_header(templ, submitvalues, ntime, nonce, nonce2, vote, usegetwork); + + int header_len = strlen(submitvalues->header)/2; + g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); + + hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); + string_be(submitvalues->hash_hex, submitvalues->hash_be); +} + +///////////////////////////////////////////////////////////////////////////////// + +static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VALUES *submitvalues, + char *extranonce2, char *ntime, char *nonce, char *vote) +{ + YAAMP_COIND *coind = job->coind; + YAAMP_JOB_TEMPLATE *templ = job->templ; + + if(job->block_found) return; + if(job->deleted) return; + + uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); + uint64_t coin_target = decode_compact(templ->nbits); + if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + int block_size = YAAMP_SMALLBUFSIZE; + vector::const_iterator i; + + for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) + block_size += strlen((*i).c_str()); + + char *block_hex = (char *)malloc(block_size); + if(!block_hex) return; + + // do aux first + for(int i=0; iauxs_size; i++) + { + if(!templ->auxs[i]) continue; + YAAMP_COIND *coind_aux = templ->auxs[i]->coind; + + if(!coind_aux || !strcmp(coind->symbol, coind_aux->symbol2)) + continue; + + unsigned char target_aux[1024]; + binlify(target_aux, coind_aux->aux.target); + + uint64_t coin_target_aux = get_hash_difficulty(target_aux); + if(hash_int <= coin_target_aux) + { + memset(block_hex, 0, block_size); + + strcat(block_hex, submitvalues->coinbase); // parent coinbase + strcat(block_hex, submitvalues->hash_be); // parent hash + + ////////////////////////////////////////////////// parent merkle steps + + sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)templ->txsteps.size()); + + vector::const_iterator i; + for(i = templ->txsteps.begin(); i != templ->txsteps.end(); ++i) + sprintf(block_hex + strlen(block_hex), "%s", (*i).c_str()); + + strcat(block_hex, "00000000"); + + ////////////////////////////////////////////////// auxs merkle steps + + vector lresult = coind_aux_merkle_branch(templ->auxs, templ->auxs_size, coind_aux->aux.index); + sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)lresult.size()); + + for(i = lresult.begin(); i != lresult.end(); ++i) + sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); + + sprintf(block_hex+strlen(block_hex), "%02x000000", (unsigned char)coind_aux->aux.index); + + ////////////////////////////////////////////////// parent header + + strcat(block_hex, submitvalues->header_be); + + bool b = coind_submitgetauxblock(coind_aux, coind_aux->aux.hash, block_hex); + if(b) + { + debuglog("*** ACCEPTED %s %d (+1)\n", coind_aux->name, coind_aux->height); + + block_add(client->userid, client->workerid, coind_aux->id, coind_aux->height, target_to_diff(coin_target_aux), + target_to_diff(hash_int), coind_aux->aux.hash, "", 0); + } + + else + debuglog("%s %d REJECTED\n", coind_aux->name, coind_aux->height); + } + } + + if(hash_int <= coin_target) + { + char count_hex[8] = { 0 }; + if (templ->txcount <= 252) + sprintf(count_hex, "%02x", templ->txcount & 0xFF); + else + sprintf(count_hex, "fd%02x%02x", templ->txcount & 0xFF, templ->txcount >> 8); + + memset(block_hex, 0, block_size); + sprintf(block_hex, "%s%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); + + if (g_current_algo->name && !strcmp("jha", g_current_algo->name)) { + // block header of 88 bytes + sprintf(block_hex, "%s8400000008000000%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); + } + + vector::const_iterator i; + for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) + sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); + + // POS coins need a zero byte appended to block, the daemon replaces it with the signature + if(coind->pos) + strcat(block_hex, "00"); + + if(!strcmp("DCR", coind->rpcencoding)) { + // submit the regenerated block header + char hex[384]; + hexlify(hex, submitvalues->header_bin, 180); + if (coind->usegetwork) + snprintf(block_hex, block_size, "%s8000000100000000000005a0", hex); + else + snprintf(block_hex, block_size, "%s", hex); + } + + bool b = coind_submit(coind, block_hex); + if(b) + { + debuglog("*** ACCEPTED %s %d (diff %g) by %s (id: %d)\n", coind->name, templ->height, + target_to_diff(hash_int), client->sock->ip, client->userid); + + job->block_found = true; + + char doublehash2[128]; + memset(doublehash2, 0, 128); + + YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; + //if (g_current_algo->merkle_func) + // merkle_hash = g_current_algo->merkle_func; + + merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + + // isnt perfect, but it works + if(strcmp(coind->symbol, "SIN") == 0) + x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + + char hash1[1024]; + memset(hash1, 0, 1024); + + string_be(doublehash2, hash1); + + if(coind->usegetwork && !strcmp("DCR", coind->rpcencoding)) { + // no merkle stuff + strcpy(hash1, submitvalues->hash_hex); + } + + block_add(client->userid, client->workerid, coind->id, templ->height, + target_to_diff(coin_target), target_to_diff(hash_int), + hash1, submitvalues->hash_be, templ->has_segwit_txs); + + if(!strcmp("DCR", coind->rpcencoding)) { + // delay between dcrd and dcrwallet + sleep(1); + } + + if(!strcmp(coind->lastnotifyhash,submitvalues->hash_be)) { + block_confirm(coind->id, submitvalues->hash_be); + } + + if (g_debuglog_hash) { + debuglog("--------------------------------------------------------------\n"); + debuglog("hash1 %s\n", hash1); + debuglog("hash2 %s\n", submitvalues->hash_be); + } + } + + else { + debuglog("*** REJECTED :( %s block %d %d txs\n", coind->name, templ->height, templ->txcount); + rejectlog("REJECTED %s block %d\n", coind->symbol, templ->height); + if (g_debuglog_hash) { + //debuglog("block %s\n", block_hex); + debuglog("--------------------------------------------------------------\n"); + } + } + } + + free(block_hex); +} + +bool dump_submit_debug(const char *title, YAAMP_CLIENT *client, YAAMP_JOB *job, char *extranonce2, char *ntime, char *nonce) +{ + debuglog("ERROR %s, %s subs %d, job %x, %s, id %x, %d, %s, %s %s\n", + title, client->sock->ip, client->extranonce_subscribe, job? job->id: 0, client->extranonce1, + client->extranonce1_id, client->extranonce2size, extranonce2, ntime, nonce); +} + +void client_submit_error(YAAMP_CLIENT *client, YAAMP_JOB *job, int id, const char *message, char *extranonce2, char *ntime, char *nonce) +{ +// if(job->templ->created+2 > time(NULL)) + if(job && job->deleted) + client_send_result(client, "true"); + + else + { + client_send_error(client, id, message); + share_add(client, job, false, extranonce2, ntime, nonce, 0, id); + + client->submit_bad++; + if (g_debuglog_hash) { + dump_submit_debug(message, client, job, extranonce2, ntime, nonce); + } + } + + object_unlock(job); +} + +static bool ntime_valid_range(const char ntimehex[]) +{ + time_t rawtime = 0; + uint32_t ntime = 0; + if (strlen(ntimehex) != 8) return false; + sscanf(ntimehex, "%8x", &ntime); + if (ntime < 0x5b000000 || ntime > 0x60000000) // 14 Jan 2021 + return false; + time(&rawtime); + return (abs(rawtime - ntime) < (30 * 60)); +} + +static bool valid_string_params(json_value *json_params) +{ + for(int p=0; p < json_params->u.array.length; p++) { + if (!json_is_string(json_params->u.array.values[p])) + return false; + } + return true; +} + +bool client_submit(YAAMP_CLIENT *client, json_value *json_params) +{ + // submit(worker_name, jobid, extranonce2, ntime, nonce): + if(json_params->u.array.length<5 || !valid_string_params(json_params)) { + debuglog("%s - %s bad message\n", client->username, client->sock->ip); + client->submit_bad++; + return false; + } + + char extranonce2[32] = { 0 }; + char extra[160] = { 0 }; + char nonce[80] = { 0 }; + char ntime[32] = { 0 }; + char vote[8] = { 0 }; + + if (strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { + clientlog(client, "bad json, wrong jobid len"); + client->submit_bad++; + return false; + } + int jobid = htoi(json_params->u.array.values[1]->u.string.ptr); + + strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); + strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); + strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); + + string_lower(extranonce2); + string_lower(ntime); + string_lower(nonce); + + if (json_params->u.array.length == 6) { + if (strstr(g_stratum_algo, "phi")) { + // lux optional field, smart contral root hashes (not mandatory on shares submit) + strncpy(extra, json_params->u.array.values[5]->u.string.ptr, 128); + string_lower(extra); + } else { + // heavycoin vote + strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); + string_lower(vote); + } + } + + if (g_debuglog_hash) { + debuglog("submit %s (uid %d) %d, %s, t=%s, n=%s, extra=%s\n", client->sock->ip, client->userid, + jobid, extranonce2, ntime, nonce, extra); + } + + YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); + if(!job) + { + client_submit_error(client, NULL, 21, "Invalid job id", extranonce2, ntime, nonce); + return true; + } + + if(job->deleted) + { + client_send_result(client, "true"); + object_unlock(job); + + return true; + } + + bool is_decred = job->coind && !strcmp("DCR", job->coind->rpcencoding); + + YAAMP_JOB_TEMPLATE *templ = job->templ; + + if(strlen(nonce) != YAAMP_NONCE_SIZE*2 || !ishexa(nonce, YAAMP_NONCE_SIZE*2)) { + client_submit_error(client, job, 20, "Invalid nonce size", extranonce2, ntime, nonce); + return true; + } + + if(strcmp(ntime, templ->ntime)) + { + if (!ishexa(ntime, 8) || !ntime_valid_range(ntime)) { + client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); + return true; + } + // dont allow algos permutations change over time (can lead to different speeds) + if (!g_allow_rolltime) { + client_submit_error(client, job, 23, "Invalid ntime (rolling not allowed)", extranonce2, ntime, nonce); + return true; + } + } + + YAAMP_SHARE *share = share_find(job->id, extranonce2, ntime, nonce, client->extranonce1); + if(share) + { + client_submit_error(client, job, 22, "Duplicate share", extranonce2, ntime, nonce); + return true; + } + + if(strlen(extranonce2) != client->extranonce2size*2) + { + client_submit_error(client, job, 24, "Invalid extranonce2 size", extranonce2, ntime, nonce); + return true; + } + + // check if the submitted extranonce is valid + if(is_decred && client->extranonce2size > 4) { + char extra1_id[16], extra2_id[16]; + int cmpoft = client->extranonce2size*2 - 8; + strcpy(extra1_id, &client->extranonce1[cmpoft]); + strcpy(extra2_id, &extranonce2[cmpoft]); + int extradiff = (int) strcmp(extra2_id, extra1_id); + int extranull = (int) !strcmp(extra2_id, "00000000"); + if (extranull && client->extranonce2size > 8) + extranull = (int) !strcmp(&extranonce2[8], "00000000" "00000000"); + if (extranull) { + debuglog("extranonce %s is empty!, should be %s - %s\n", extranonce2, extra1_id, client->sock->ip); + client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); + return true; + } + if (extradiff) { + // some ccminer pre-release doesn't fill correctly the extranonce + client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); + socket_send(client->sock, "{\"id\":null,\"method\":\"mining.set_extranonce\",\"params\":[\"%s\",%d]}\n", + client->extranonce1, client->extranonce2size); + return true; + } + } + else if(!ishexa(extranonce2, client->extranonce2size*2)) { + client_submit_error(client, job, 27, "Invalid nonce2", extranonce2, ntime, nonce); + return true; + } + + /////////////////////////////////////////////////////////////////////////////////////////// + + YAAMP_JOB_VALUES submitvalues; + memset(&submitvalues, 0, sizeof(submitvalues)); + + if(is_decred) + build_submit_values_decred(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce, vote, true); + else + build_submit_values(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce); + + if (templ->height && !strcmp(g_current_algo->name,"lyra2z")) { + lyra2z_height = templ->height; + } + + // minimum hash diff begins with 0000, for all... + uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; + if(pfx) { + if (g_debuglog_hash) { + debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, + (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], + (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); + } + client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); + return true; + } + + uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); + uint64_t user_target = diff_to_target(client->difficulty_actual); + uint64_t coin_target = decode_compact(templ->nbits); + if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; + + if (g_debuglog_hash) { + debuglog("%016llx actual\n", hash_int); + debuglog("%016llx target\n", user_target); + debuglog("%016llx coin\n", coin_target); + } + if(hash_int > user_target && hash_int > coin_target) + { + client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); + return true; + } + + if(job->coind) + client_do_submit(client, job, &submitvalues, extranonce2, ntime, nonce, vote); + else + remote_submit(client, job, &submitvalues, extranonce2, ntime, nonce); + + client_send_result(client, "true"); + client_record_difficulty(client); + client->submit_bad = 0; + client->shares++; + if (client->shares <= 200 && (client->shares % 50) == 0) { + // 4 records are enough per miner + if (!client_ask_stats(client)) client->stats = false; + } + + double share_diff = diff_to_target(hash_int); +// if (g_current_algo->diff_multiplier != 0) { +// share_diff = share_diff / g_current_algo->diff_multiplier; +// } + + if (g_debuglog_hash) { + // only log a few... + if (share_diff > (client->difficulty_actual * 16)) + debuglog("submit %s (uid %d) %d, %s, %s, %s, %.3f/%.3f\n", client->sock->ip, client->userid, + jobid, extranonce2, ntime, nonce, share_diff, client->difficulty_actual); + } + + share_add(client, job, true, extranonce2, ntime, nonce, share_diff, 0); + object_unlock(job); + + return true; +} \ No newline at end of file diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 9239a2c4e..9778c0a39 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -95,6 +95,49 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) { + templ->isbitcash = false; + if(strcmp(coind->symbol, "BITC") == 0) { + char *params = (char *)malloc(4096); + if (params) { + unsigned char price_bin[1024]; + unsigned char pricehash_bin[1024]; + char pricehash_hex[1024]; + char pricehash_be[1024]; + + if (templ->needpriceinfo && strlen(templ->priceinfo) > 0 && strlen(templ->priceinfo) < 1000) { + binlify(price_bin, templ->priceinfo); + + int price_len = strlen(templ->priceinfo)/2; + sha256_double_hash((char *)price_bin, (char *)pricehash_bin, price_len); + + hexlify(pricehash_hex, pricehash_bin, 32); + string_be(pricehash_hex, pricehash_be); + + sprintf(params, "[\"%s\", %i, \"%s\"]", coind->wallet, templ->height, pricehash_be); + } else { + sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); + } + //std::cout << "Params:" << params << std::endl; + json_value *json = rpc_call(&coind->rpc, "createcoinbaseforaddress", params); + + free(params); + if (json) { + json_value *json_result = json_get_object(json, "result"); + if (json_result) { + sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbaseforhashpart1")); + templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; + sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbaseforhashpart2")); + + sprintf(templ->coinforsubmitb1, "%s", json_get_string(json_result, "coinbasepart1")); + templ->coinforsubmitb1[strlen(templ->coinforsubmitb1) - 16] = '\0'; + sprintf(templ->coinforsubmitb2, "%s", json_get_string(json_result, "coinbasepart2")); + templ->isbitcash = true; + } + } + } + return; + } + char eheight[32], etime[32]; char entime[32] = { 0 }; char commitment[128] = { 0 }; @@ -209,7 +252,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); } - else if(strcmp(coind->symbol, "GEEK") == 0) { if (coind->charity_percent <= 0) coind->charity_percent = 2.5; @@ -250,8 +292,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if(strcmp("DCR", coind->rpcencoding) == 0) { - coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 + coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 coind->charity_percent = 0; coind->charity_amount = available; available *= coind->reward_mul; diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak new file mode 100644 index 000000000..9239a2c4e --- /dev/null +++ b/stratum/coinbase.cpp.bak @@ -0,0 +1,1353 @@ + +// http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html + +// https://en.bitcoin.it/wiki/Merged_mining_specification#Merged_mining_coinbase + +#include "stratum.h" + +#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) + +static void encode_tx_value(char *encoded, json_int_t value) +{ + sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", + TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), + TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); +} + +static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(payee) >> 1) & 0xFF, payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + encode_tx_value(evalue, amount); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + +static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) +{ + char evalue[32]; + char coinb2_part[256]; + char coinb2_len[4]; + encode_tx_value(evalue, amount); + sprintf(coinb2_part, "%s", script); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(data, evalue); + strcat(data, coinb2_len); + strcat(data, coinb2_part); +} + +static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) +{ + int ol = strlen(data); + char evalue[32]; + + if(coind->p2sh_address && !key) { + p2sh_pack_tx(coind, data, amount, coind->script_pubkey); + return; + } + + encode_tx_value(evalue, amount); + sprintf(data+strlen(data), "%s", evalue); + + if(coind->pos && !key) + sprintf(data+strlen(data), "2321%sac", coind->pubkey); + + else + sprintf(data+strlen(data), "1976a914%s88ac", key? key: coind->script_pubkey); + +// debuglog("pack tx %s\n", data+ol); +// debuglog("pack tx %lld\n", amount); +} + +void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) +{ + vector hashlist = coind_aux_hashlist(templ->auxs, templ->auxs_size); + while(hashlist.size() > 1) + { + vector l; + for(int i = 0; i < hashlist.size()/2; i++) + { + string s = hashlist[i*2] + hashlist[i*2+1]; + + char bin[YAAMP_HASHLEN_BIN*2]; + char out[YAAMP_HASHLEN_STR]; + + binlify((unsigned char *)bin, s.c_str()); + sha256_double_hash_hex(bin, out, YAAMP_HASHLEN_BIN*2); + + l.push_back(out); + } + + hashlist = l; + } + + char merkle_hash[4*1024]; + memset(merkle_hash, 0, 4*1024); + string_be(hashlist[0].c_str(), merkle_hash); + + sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); +// debuglog("aux_script is %s\n", aux_script); +} + +void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) +{ + char eheight[32], etime[32]; + char entime[32] = { 0 }; + char commitment[128] = { 0 }; + + ser_number(templ->height, eheight); + ser_number(time(NULL), etime); + if(coind->pos) ser_string_be(templ->ntime, entime, 1); + + char eversion1[32] = "01000000"; + if(coind->txmessage) + strcpy(eversion1, "02000000"); + + const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); + if(coinbase_payload && strlen(coinbase_payload) > 0) + strcpy(eversion1, "03000500"); + + char script1[4*1024]; + sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); + + char script2[32] = "746865706f6f6c2e6c6966655c30"; // "thepool.life\0" in hex ascii + + if(!coind->pos && !coind->isaux && templ->auxs_size) + coinbase_aux(templ, script2); + + int script_len = strlen(script1)/2 + strlen(script2)/2 + 8; + sprintf(templ->coinb1, "%s%s01" + "0000000000000000000000000000000000000000000000000000000000000000" + "ffffffff%02x%s", eversion1, entime, script_len, script1); + + sprintf(templ->coinb2, "%s00000000", script2); + + // segwit commitment, if needed + if (templ->has_segwit_txs) + sprintf(commitment, "0000000000000000%02x%s", (int) (strlen(coind->commitment)/2), coind->commitment); + + json_int_t available = templ->value; + + // sample coins using mandatory dev/foundation fees + if(strcmp(coind->symbol, "EGC") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 2; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); + } + else if(strcmp(coind->symbol, "DYN") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[3]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool dynode_enabled; + dynode_enabled = json_get_bool(json_result, "dynode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* dynode; + dynode = json_get_object(json_result, "dynode"); + if(!dynode && json_get_bool(json_result, "dynode_payments")) { + coind->oldmasternodes = true; + debuglog("%s is using old dynodes rpc keys\n", coind->symbol); + return; + } + + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock found %s %u\n", coind->symbol, payee, amount); + } + } + } + if (dynode_enabled && dynode) { + bool started; + started = json_get_bool(json_result, "dynode_payments_started"); + const char *payee = json_get_string(dynode, "payee"); + json_int_t amount = json_get_int(dynode, "amount"); + if (!payee) + debuglog("coinbase_create failed to get Dynode payee\n"); + + if (!amount) + debuglog("coinbase_create failed to get Dynode amount\n"); + + if (!started) + debuglog("coinbase_create failed to get Dynode started\n"); + + if (payee && amount && started) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s dynode found %s %u\n", coind->symbol, payee, amount); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "LTCR") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 10; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); + } + + else if(strcmp(coind->symbol, "GEEK") == 0) { + if (coind->charity_percent <= 0) + coind->charity_percent = 2.5; + if (strlen(coind->charity_address) == 0) + sprintf(coind->charity_address, "GRpdbSh3Z2FMjJH96CFPK5TzEb47Zg6FFR"); + } + + else if(strcmp(coind->symbol, "XZC") == 0) { + char script_payee[1024]; + bool znode_masternode_enabled = json_get_bool(json_result, "znode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "znode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("znode payee: %s\n", payee); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); + job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); + base58_decode("aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD", script_payee); + job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); + base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); + job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); + base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); + job_pack_tx(coind, templ->coinb2, 3 * 100000000, script_payee); + base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); + job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + + else if(strcmp("DCR", coind->rpcencoding) == 0) { + coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 + coind->charity_percent = 0; + coind->charity_amount = available; + available *= coind->reward_mul; + if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) + sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); + } + + // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. + else if (strcmp(coind->symbol, "SMART") == 0) { + char script_payee[512] = { 0 }; + char payees[5]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + //treasury 5000 * (143500/Blockheight) per block + int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); + json_int_t charity_amount = coinvalue * 0.95; + int blockRotation = templ->height - 95 * (templ->height/95); + if (blockRotation >= 0 && blockRotation <= 7) { + sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); + } + if (blockRotation >= 8 && blockRotation <= 15) { + sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); + } + if (blockRotation >= 16 && blockRotation <= 23) { + sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); + } + if (blockRotation >= 24 && blockRotation <= 38) { + sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); + } + if (blockRotation >= 39 && blockRotation <= 94) { + sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + else if(strcmp(coind->symbol, "HXX") == 0) { + char script_payee[1024]; + bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "xnode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "05"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); + job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); + base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); + job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + + else if(strcmp(coind->symbol, "BZX") == 0) { + char script_payee[1024]; + bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); + if (znode_masternode_enabled == true) { + json_value* znode_masternode = json_get_object(json_result, "bznode"); + const char *payee = json_get_string(znode_masternode, "payee"); + json_int_t amount = json_get_int(znode_masternode, "amount"); + if (payee && amount) { + //debuglog("bznode payee: %s\n", payee); + strcat(templ->coinb2, "04"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } else { + strcat(templ->coinb2, "03"); + job_pack_tx(coind, templ->coinb2, available, NULL); + } + base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); + job_pack_tx(coind, templ->coinb2, 6.75 * 100000000, script_payee); + base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); + job_pack_tx(coind, templ->coinb2, 2.25 * 100000000, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + + else if(strcmp(coind->symbol, "STAK") == 0) { + char script_payee[512] = { 0 }; + char payees[4]; + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_payments = json_get_bool(json_result, "masternode_payments"); + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + + if (masternodes_enabled && masternode_payments) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) + ++npayees; + } + + //treasury 5% @ 10 STAK per block + json_int_t charity_amount = 50000000; + //testnet + //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); + switch (templ->height % 4) { + case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); + break; + case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); + break; + case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); + break; + case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); + break; + } + ++npayees; + available -= charity_amount; + base58_decode(coind->charity_address, script_payee); + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + if (masternodes_enabled && masternode_payments) { + //duplicated: revisit ++todo + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "payee_amount"); + if (payee && amount) { + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, templ->coinb2, amount, script_payee); + } + } + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); + json_value* founder = json_get_object(json_result, "founder"); + + if (!coind->hasmasternodes && founder_enabled && founder) { + char founder_payee[256] = { 0 }; + char founder_script[1024] = { 0}; + const char *payee = json_get_string(founder, "payee"); + bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); + json_int_t amount = json_get_int(founder, "amount"); + if(payee && amount) { + if (payee) snprintf(founder_payee, 255, "%s", payee); + if (strlen(founder_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + base58_decode(founder_payee, founder_script); + available -= amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + if(founder_use_p2sh) { + p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); + } else { + job_pack_tx(coind, templ->coinb2, amount, founder_script); + } + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); + debuglog("%s founder script %s\n", coind->symbol,founder_script); + debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); + + return; + } + } + + // 2 txs are required on these coins, one for foundation (dev fees) + if(coind->charity_percent && !coind->hasmasternodes) + { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + if (charity_amount <= 0) + charity_amount = (available * coind->charity_percent) / 100; + + available -= charity_amount; + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + + else if(coind->charity_amount && !strcmp("DCR", coind->rpcencoding)) + { + stratumlog("ERROR %s should not use coinbase (getwork only)!\n", coind->symbol); + coind->reward = (double)available/100000000; + return; + } + + // add IFX + if (strcmp(coind->symbol, "IFX") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // add GTM + if (strcmp(coind->symbol, "GTM") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // add GWAY + if (strcmp(coind->symbol, "GWAY") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + if (strcmp(coind->symbol, "AGM") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // add CRDS + if (strcmp(coind->symbol, "CRDS") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + // add BMN + if (strcmp(coind->symbol, "BMN") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + //Add BNODE + if (strcmp(coind->symbol, "BNODE") == 0) + { + char script_dests[4096] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + + json_value* evolution = json_get_object(json_result, "evolution"); + bool evolution_enabled = json_get_bool(json_result, "evolution_payments_enforced"); + bool evolution_started = json_get_bool(json_result, "evolution_payments_started"); + if (evolution_enabled && evolution && evolution_started) { + if (json_is_array(evolution)) { + for(int i = 0; i < evolution->u.array.length; i++) { + const char *payee = json_get_string(evolution->u.array.values[i], "payee"); + const char *script = json_get_string(evolution->u.array.values[i], "script"); + json_int_t amount = json_get_int(evolution->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s evolution %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(evolution, "payee"); + json_int_t amount = json_get_int(evolution, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + } + + json_value* masternode = json_get_object(json_result, "masternode"); + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (masternode && started) { + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i++) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + const char *script = json_get_string(masternode->u.array.values[i], "script"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + + //add GLT + else if(strcmp(coind->symbol, "GLT") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char script_treasury[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + json_value* masternode = json_get_object(json_result, "masternode"); + json_value* treasury = json_get_object(json_result, "treasury"); + bool treasury_enabled = true; + if(treasury_enabled && treasury) { + const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); + json_int_t amount = json_get_int(treasury, "amount"); + if (scriptPubKey && amount) { + npayees++; + available -= amount; + base58_decode(scriptPubKey, script_treasury); + job_pack_tx(coind, script_dests, amount, script_treasury); + //debuglog("%s treasury %u\n", coind->symbol, amount); + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + // Add DigitalNote[XDN] + if(strcmp(coind->symbol, "XDN") == 0) { + + // make sure we pay both mn and devops + bool founder_enabled = json_get_bool(json_result, "founder_reward_enforced"); + bool masternode_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + if (!founder_enabled || !masternode_enabled) + return; + + // founder/masternode vars + char founder_script[1024] = { 0}; + char masternode_script[1024] = { 0}; + char founder_payee[256] = { 0}; + char masternode_payee[256] = { 0}; + json_int_t part_amount = (5000000000); + json_int_t pool_amount = (5000000000*4); + json_value* founder = json_get_object(json_result, "founderreward"); + const char *payee1 = json_get_string(json_result, "payee"); + const char *payee2 = json_get_string(founder, "payee"); + + // mn script + snprintf(masternode_payee, 255, "%s", payee1); + base58_decode(masternode_payee, masternode_script); + available -= part_amount; + + // payee script + snprintf(founder_payee, 255, "%s", payee2); + base58_decode(founder_payee, founder_script); + available -= part_amount; + + // total outputs + strcat(templ->coinb2, "03"); + + // pack the tx + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, part_amount, founder_script); + job_pack_tx(coind, templ->coinb2, part_amount, masternode_script); + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } + + // Add Sinovate[SIN] + if(strcmp(coind->symbol, "SIN") == 0) + { + char dests[2048] = { 0 }; + char sinpayee[256] = { 0 }; + char sinscript[1024] = { 0 }; + int npayees = 1; + char payees[3]; + + const char *founder = json_get_string(json_result, "payee"); + json_int_t founderreward = json_get_int(json_result, "payee_amount"); + if (founder && founderreward) { + snprintf(sinpayee, 255, "%s", founder); + base58_decode(sinpayee, sinscript); + available -= founderreward; + npayees++; + job_pack_tx(coind, dests, founderreward, sinscript); + } + + json_value* masternodes = json_get_array(json_result, "masternode"); + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (started && masternodes->u.array.length) for (int i = 0; i < masternodes->u.array.length; i++) { + const char *payee = json_get_string(masternodes->u.array.values[i], "payee"); + json_int_t amount = json_get_int(masternodes->u.array.values[i], "amount"); + if (payee && amount) { + snprintf(sinpayee, 255, "%s", payee); + base58_decode(sinpayee, sinscript); + available -= amount; + npayees++; + job_pack_tx(coind, dests, amount, sinscript); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, dests); + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available / 100000000; + return; + } + + if(strcmp(coind->symbol, "BITC") == 0) + { + char *params = (char *)malloc(1024); + if (params) { + sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); + //std::cout << "Params:" << params << std::endl; + json_value *json = rpc_call(&coind->rpc, "createcoinbaseforaddress", params); + free(params); + if (json) { + json_value *json_result = json_get_object(json, "result"); + if (json_result) { + sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbasepart1")); + templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; + sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbasepart2")); + } + } + } + return; + } + + if(strcmp(coind->symbol, "XVC") == 0) + { + char charity_payee[256]; + json_value* incentive = json_get_object(json_result, "incentive"); + if (incentive) { + const char* payee = json_get_string(incentive, "address"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + + bool enforced = json_get_bool(incentive, "enforced"); + json_int_t charity_amount = json_get_int(incentive, "amount"); + if (enforced && charity_amount && strlen(charity_payee)) { + char script_payee[1024]; + base58_decode(charity_payee, script_payee); + + strcat(templ->coinb2, "02"); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->charity_amount = charity_amount; + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("XVC coinbase %ld (+%ld incentive to %s)\n", + // (long) available, (long) charity_amount, charity_payee); + return; + } + } + } + + // most recent masternodes rpc (DASH, SIB, MUE, DSR, GBX...) + if(coind->hasmasternodes && !coind->oldmasternodes) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; // addresses count + int npayees = (templ->has_segwit_txs) ? 2 : 1; + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "masternode"); + if(!masternode && json_get_bool(json_result, "masternode_payments")) { + coind->oldmasternodes = true; + debuglog("%s is using old masternodes rpc keys\n", coind->symbol); + return; + } + if(coind->charity_percent) { + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + else sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + json_int_t charity_amount = (available * coind->charity_percent) / 100; + npayees++; + available -= charity_amount; + coind->charity_amount = charity_amount; + base58_decode(charity_payee, script_payee); + job_pack_tx(coind, script_dests, charity_amount, script_payee); + } + // smart contracts balance refund, same format as DASH superblocks + json_value* screfund = json_get_array(json_result, "screfund"); + if(screfund && screfund->u.array.length) { + superblocks_enabled = true; + superblock = screfund; + } + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + const char *script = json_get_string(superblock->u.array.values[i], "script"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(superblock_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (masternode_enabled && masternode && started) { + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i++) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + const char *script = json_get_string(masternode->u.array.values[i], "script"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (!amount) continue; + if (script) { + npayees++; + available -= amount; + script_pack_tx(coind, script_dests, amount, script); + } else if (payee) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); + } + } + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + if(coinbase_payload && strlen(coinbase_payload) > 0) { + char coinbase_payload_size[18]; + ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload_size); + strcat(templ->coinb2, coinbase_payload); + } + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ARC") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "goldminenode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + else if(strcmp(coind->symbol, "ENT") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternode_enabled = json_get_bool(json_result, "eternitynode_payments_enforced"); + bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); + json_value* superblock = json_get_array(json_result, "superblock"); + json_value* masternode = json_get_object(json_result, "eternitynode"); + if(superblocks_enabled && superblock) { + for(int i = 0; i < superblock->u.array.length; i++) { + const char *payee = json_get_string(superblock->u.array.values[i], "payee"); + json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); + } + } + } + if (masternode_enabled && masternode) { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + + else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ + { + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "payee"); + if (payee) snprintf(charity_payee, 255, "%s", payee); + + json_int_t charity_amount = json_get_int(json_result, "payee_amount"); + bool charity_payments = json_get_bool(json_result, "masternode_payments"); + bool charity_enforce = json_get_bool(json_result, "enforce_masternode_payments"); + + if(strcmp(coind->symbol, "CRW") == 0) + { + char script_dests[2048] = { 0 }; + char script_payee[128] = { 0 }; + char payees[4]; + int npayees = 1; + bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); + bool systemnodes_enabled = json_get_bool(json_result, "enforce_systemnode_payments"); + bool systemnodes = json_get_bool(json_result, "systemnodes"); + bool masternodes = json_get_bool(json_result, "masternodes"); + if(systemnodes_enabled && systemnodes) { + const char *payeeSN = json_get_string(json_result, "payeeSN"); + json_int_t payeeSN_amount = json_get_int(json_result, "payeeSN_amount"); + if (payeeSN && payeeSN_amount) { + npayees++; + available -= payeeSN_amount; + base58_decode(payeeSN, script_payee); + job_pack_tx(coind, script_dests, payeeSN_amount, script_payee); + //debuglog("%s systemnode %s %u\n", coind->symbol, payeeSN, payeeSN_amount); + } + } + if (masternodes_enabled && masternodes) { + const char *payee = json_get_string(json_result, "payee"); + json_int_t amount = json_get_int(json_result, "amount"); + if (payee && amount) { + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); + return; + } + + if(charity_payments && charity_enforce) + { + char script_payee[256] = { 0 }; + base58_decode(charity_payee, script_payee); + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + node + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); // 2 outputs + } + + job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); + available -= charity_amount; + + } else { + strcat(templ->coinb2, "01"); + } + } + + else if (templ->has_segwit_txs) { + strcat(templ->coinb2, "02"); + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "01"); + } + + job_pack_tx(coind, templ->coinb2, available, NULL); + + //if(coind->txmessage) + // strcat(templ->coinb2, "00"); + if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. + if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; +// debuglog("coinbase %f\n", coind->reward); + +// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); +// debuglog("coinb1 %s\n", templ->coinb1); +// debuglog("coinb2 %s\n", templ->coinb2); +} + + + diff --git a/stratum/coind_template.cpp b/stratum/coind_template.cpp index 33ecc6259..114f8d10d 100644 --- a/stratum/coind_template.cpp +++ b/stratum/coind_template.cpp @@ -307,6 +307,7 @@ YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind) strcpy(templ->prevhash_hex, prev ? prev : ""); const char *flags = json_get_string(json_coinbaseaux, "flags"); strcpy(templ->flags, flags ? flags : ""); + strcpy(templ->priceinfo, ""); // LBC Claim Tree (with wallet gbt patch) const char *claim = json_get_string(json_result, "claimtrie"); @@ -332,6 +333,13 @@ YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind) debuglog("claim_hex: %s\n", templ->claim_hex); } } + else if (strcmp(coind->symbol, "BITC") == 0) { + if (strlen(json_get_string(json_result, "priceinfo")) < 1000) { + templ->needpriceinfo = json_get_bool(json_result, "needpriceinfo"); + if (templ->needpriceinfo) + strcpy(templ->priceinfo, json_get_string(json_result, "priceinfo")); + } + } const char *sc_root = json_get_string(json_result, "stateroot"); const char *sc_utxo = json_get_string(json_result, "utxoroot"); diff --git a/stratum/coind_template.cpp.bak b/stratum/coind_template.cpp.bak new file mode 100644 index 000000000..33ecc6259 --- /dev/null +++ b/stratum/coind_template.cpp.bak @@ -0,0 +1,614 @@ + +#include "stratum.h" + +void coind_getauxblock(YAAMP_COIND *coind) +{ + if(!coind->isaux) return; + + json_value *json = rpc_call(&coind->rpc, "getauxblock", "[]"); + if(!json) + { + coind_error(coind, "coind_getauxblock"); + return; + } + + json_value *json_result = json_get_object(json, "result"); + if(!json_result) + { + coind_error(coind, "coind_getauxblock"); + return; + } + +// coind->aux.height = coind->height+1; + coind->aux.chainid = json_get_int(json_result, "chainid"); + + const char *p = json_get_string(json_result, "target"); + if(p) strcpy(coind->aux.target, p); + + p = json_get_string(json_result, "hash"); + if(p) strcpy(coind->aux.hash, p); + +// if(strcmp(coind->symbol, "UNO") == 0) +// { +// string_be1(coind->aux.target); +// string_be1(coind->aux.hash); +// } + + json_value_free(json); +} + +YAAMP_JOB_TEMPLATE *coind_create_template_memorypool(YAAMP_COIND *coind) +{ + json_value *json = rpc_call(&coind->rpc, "getmemorypool"); + if(!json || json->type == json_null) + { + coind_error(coind, "getmemorypool"); + return NULL; + } + + json_value *json_result = json_get_object(json, "result"); + if(!json_result || json_result->type == json_null) + { + coind_error(coind, "getmemorypool"); + json_value_free(json); + + return NULL; + } + + YAAMP_JOB_TEMPLATE *templ = new YAAMP_JOB_TEMPLATE; + memset(templ, 0, sizeof(YAAMP_JOB_TEMPLATE)); + + templ->created = time(NULL); + templ->value = json_get_int(json_result, "coinbasevalue"); +// templ->height = json_get_int(json_result, "height"); + sprintf(templ->version, "%08x", (unsigned int)json_get_int(json_result, "version")); + sprintf(templ->ntime, "%08x", (unsigned int)json_get_int(json_result, "time")); + strcpy(templ->nbits, json_get_string(json_result, "bits")); + strcpy(templ->prevhash_hex, json_get_string(json_result, "previousblockhash")); + + json_value_free(json); + + json = rpc_call(&coind->rpc, "getmininginfo", "[]"); + if(!json || json->type == json_null) + { + coind_error(coind, "coind getmininginfo"); + return NULL; + } + + json_result = json_get_object(json, "result"); + if(!json_result || json_result->type == json_null) + { + coind_error(coind, "coind getmininginfo"); + json_value_free(json); + + return NULL; + } + + templ->height = json_get_int(json_result, "blocks")+1; + json_value_free(json); + + coind_getauxblock(coind); + + coind->usememorypool = true; + return templ; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +static int decred_parse_header(YAAMP_JOB_TEMPLATE *templ, const char *header_hex, bool getwork) +{ + struct __attribute__((__packed__)) { + uint32_t version; + char prevblock[32]; + char merkleroot[32]; + char stakeroot[32]; + uint16_t votebits; + char finalstate[6]; + uint16_t voters; + uint8_t freshstake; + uint8_t revoc; + uint32_t poolsize; + uint32_t nbits; + uint64_t sbits; + uint32_t height; + uint32_t size; + uint32_t ntime; + uint32_t nonce; + unsigned char extra[32]; + uint32_t stakever; + uint32_t hashtag[3]; + } header; + + //debuglog("HEADER: %s\n", header_hex); + + binlify((unsigned char*) &header, header_hex); + + templ->height = header.height; + // reversed to tell its not a normal stratum coinbase + sprintf(templ->version, "%08x", getwork ? bswap32(header.version) : header.version); + sprintf(templ->ntime, "%08x", header.ntime); + sprintf(templ->nbits, "%08x", header.nbits); + + templ->prevhash_hex[64] = '\0'; + uint32_t* prev32 = (uint32_t*) header.prevblock; + for(int i=0; i < 8; i++) + sprintf(&templ->prevhash_hex[i*8], "%08x", getwork ? prev32[7-i] : bswap32(prev32[7-i])); + ser_string_be2(templ->prevhash_hex, templ->prevhash_be, 8); + + // store all other stuff + memcpy(templ->header, &header, sizeof(header)); + + return 0; +} + +// decred getwork over stratum +static YAAMP_JOB_TEMPLATE *decred_create_worktemplate(YAAMP_COIND *coind) +{ + char rpc_error[1024] = { 0 }; + #define GETWORK_RETRY_MAX 3 + int retry_cnt = GETWORK_RETRY_MAX; +retry: + json_value *gw = rpc_call(&coind->rpc, "getwork", "[]"); + if(!gw || json_is_null(gw)) { + usleep(500*YAAMP_MS); // too much connections ? no data received + if (--retry_cnt > 0) { + if (coind->rpc.curl) + rpc_curl_get_lasterr(rpc_error, 1023); + debuglog("%s getwork retry %d\n", coind->symbol, GETWORK_RETRY_MAX-retry_cnt); + goto retry; + } + debuglog("%s error getwork %s\n", coind->symbol, rpc_error); + return NULL; + } + json_value *gwr = json_get_object(gw, "result"); + if(!gwr) { + debuglog("%s no getwork json result!\n", coind->symbol); + return NULL; + } + else if (json_is_null(gwr)) { + json_value *jr = json_get_object(gw, "error"); + if (!jr || json_is_null(jr)) return NULL; + const char *err = json_get_string(jr, "message"); + if (err && !strcmp(err, "internal error")) { + usleep(500*YAAMP_MS); // not enough voters (testnet) + if (--retry_cnt > 0) { + goto retry; + } + debuglog("%s getwork failed after %d tries: %s\n", + coind->symbol, GETWORK_RETRY_MAX, err); + } + return NULL; + } + const char *header_hex = json_get_string(gwr, "data"); + if (!header_hex || !strlen(header_hex)) { + debuglog("%s no getwork data!\n", coind->symbol); + return NULL; + } + + YAAMP_JOB_TEMPLATE *templ = new YAAMP_JOB_TEMPLATE; + memset(templ, 0, sizeof(YAAMP_JOB_TEMPLATE)); + + templ->created = time(NULL); + + decred_parse_header(templ, header_hex, true); + json_value_free(gw); + + // bypass coinbase and merkle for now... send without nonce/extradata + const unsigned char *hdr = (unsigned char *) &templ->header[36]; + hexlify(templ->coinb1, hdr, 192 - 80); + const unsigned char *sfx = (unsigned char *) &templ->header[176]; + hexlify(templ->coinb2, sfx, 180 - 176); // stake version + + vector txhashes; + txhashes.push_back(""); + + templ->txmerkles[0] = 0; + templ->txcount = txhashes.size(); + templ->txsteps = merkle_steps(txhashes); + txhashes.clear(); + + return templ; +} + +// for future decred real stratum +static void decred_fix_template(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json) +{ + const char *header_hex = json_get_string(json, "header"); + if (!header_hex || !strlen(header_hex)) { + stratumlog("decred error, no block header in json!\n"); + return; + } + + // todo ? + // "mintime": 1455511962, + // "maxtime": 1455522081, + + decred_parse_header(templ, header_hex, false); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind) +{ + if(coind->usememorypool) + return coind_create_template_memorypool(coind); + + char params[512] = "[{}]"; + if(!strcmp(coind->symbol, "PPC")) strcpy(params, "[]"); + else if(g_stratum_segwit) strcpy(params, "[{\"rules\":[\"segwit\"]}]"); + + json_value *json = rpc_call(&coind->rpc, "getblocktemplate", params); + if(!json || json_is_null(json)) + { + // coind_error() reset auto_ready, and DCR gbt can fail + if (strcmp(coind->rpcencoding, "DCR") == 0) + debuglog("decred getblocktemplate failed\n"); + else + coind_error(coind, "getblocktemplate"); + return NULL; + } + + json_value *json_result = json_get_object(json, "result"); + if(!json_result || json_is_null(json_result)) + { + coind_error(coind, "getblocktemplate result"); + json_value_free(json); + return NULL; + } + + // segwit rule + json_value *json_rules = json_get_array(json_result, "rules"); + if(json_rules && !strlen(coind->witness_magic) && json_rules->u.array.length) { + for (int i=0; iu.array.length; i++) { + json_value *val = json_rules->u.array.values[i]; + if(!strcmp(val->u.string.ptr, "segwit")) { + const char *commitment = json_get_string(json_result, "default_witness_commitment"); + strcpy(coind->witness_magic, "aa21a9ed"); + if (commitment && strlen(commitment) > 12) { + strncpy(coind->witness_magic, &commitment[4], 8); + coind->witness_magic[8] = '\0'; + } + coind->usesegwit |= g_stratum_segwit; + if (coind->usesegwit) + debuglog("%s segwit enabled, magic %s\n", coind->symbol, coind->witness_magic); + break; + } + } + } + + json_value *json_tx = json_get_array(json_result, "transactions"); + if(!json_tx) + { + coind_error(coind, "getblocktemplate transactions"); + json_value_free(json); + return NULL; + } + + json_value *json_coinbaseaux = json_get_object(json_result, "coinbaseaux"); + if(!json_coinbaseaux && coind->isaux) + { + coind_error(coind, "getblocktemplate coinbaseaux"); + json_value_free(json); + return NULL; + } + + YAAMP_JOB_TEMPLATE *templ = new YAAMP_JOB_TEMPLATE; + memset(templ, 0, sizeof(YAAMP_JOB_TEMPLATE)); + + templ->created = time(NULL); + templ->value = json_get_int(json_result, "coinbasevalue"); + templ->height = json_get_int(json_result, "height"); + sprintf(templ->version, "%08x", (unsigned int)json_get_int(json_result, "version")); + sprintf(templ->ntime, "%08x", (unsigned int)json_get_int(json_result, "curtime")); + + const char *bits = json_get_string(json_result, "bits"); + strcpy(templ->nbits, bits ? bits : ""); + const char *prev = json_get_string(json_result, "previousblockhash"); + strcpy(templ->prevhash_hex, prev ? prev : ""); + const char *flags = json_get_string(json_coinbaseaux, "flags"); + strcpy(templ->flags, flags ? flags : ""); + + // LBC Claim Tree (with wallet gbt patch) + const char *claim = json_get_string(json_result, "claimtrie"); + if (claim) { + strcpy(templ->claim_hex, claim); + // debuglog("claimtrie: %s\n", templ->claim_hex); + } + else if (strcmp(coind->symbol, "LBC") == 0) { + json_value *json_claim = rpc_call(&coind->rpc, "getclaimtrie"); + if (!json_claim || json_claim->type != json_object) + return NULL; + json_value *json_cls = json_get_array(json_claim, "result"); + if (!json_cls || !json_is_array(json_cls)) + return NULL; + // get first claim "", seems the root + // if empty need 0000000000000000000000000000000000000000000000000000000000000001 + json_value *json_obj = json_cls->u.array.values[0]; + if (!json_obj || json_claim->type != json_object) + return NULL; + claim = json_get_string(json_obj, "hash"); + if (claim) { + strcpy(templ->claim_hex, claim); + debuglog("claim_hex: %s\n", templ->claim_hex); + } + } + + const char *sc_root = json_get_string(json_result, "stateroot"); + const char *sc_utxo = json_get_string(json_result, "utxoroot"); + if (sc_root && sc_utxo) { + // LUX Smart Contracts, 144-bytes block headers + strcpy(&templ->extradata_hex[ 0], sc_root); // 32-bytes hash (64 in hexa) + strcpy(&templ->extradata_hex[64], sc_utxo); // 32-bytes hash too + + // same weird byte order as previousblockhash field + ser_string_be2(sc_root, &templ->extradata_be[ 0], 8); + ser_string_be2(sc_utxo, &templ->extradata_be[64], 8); + } + + if (strcmp(coind->rpcencoding, "DCR") == 0) { + decred_fix_template(coind, templ, json_result); + } + + if (!templ->height || !templ->nbits || !strlen(templ->prevhash_hex)) { + stratumlog("%s warning, gbt incorrect : version=%s height=%d value=%d bits=%s time=%s prev=%s\n", + coind->symbol, templ->version, templ->height, templ->value, templ->nbits, templ->ntime, templ->prevhash_hex); + } + + // temporary hack, until wallet is fixed... + if (!strcmp(coind->symbol, "MBL")) { // MBL: chainid in version + unsigned int nVersion = (unsigned int)json_get_int(json_result, "version"); + if (nVersion & 0xFFFF0000UL == 0) { + nVersion |= (0x16UL << 16); + debuglog("%s version %s >> %08x\n", coind->symbol, templ->version, nVersion); + } + sprintf(templ->version, "%08x", nVersion); + } + +// debuglog("%s ntime %s\n", coind->symbol, templ->ntime); +// uint64_t target = decode_compact(json_get_string(json_result, "bits")); +// coind->difficulty = target_to_diff(target); + +// string_lower(templ->ntime); +// string_lower(templ->nbits); + +// char target[1024]; +// strcpy(target, json_get_string(json_result, "target")); +// uint64_t coin_target = decode_compact(templ->nbits); +// debuglog("nbits %s\n", templ->nbits); +// debuglog("target %s\n", target); +// debuglog("0000%016llx\n", coin_target); + + if(coind->isaux) + { + json_value_free(json); + coind_getauxblock(coind); + return templ; + } + + ////////////////////////////////////////////////////////////////////////////////////////// + + vector txhashes; + vector txids; + txhashes.push_back(""); + txids.push_back(""); + + templ->has_segwit_txs = false; + + templ->has_filtered_txs = false; + templ->filtered_txs_fee = 0; + + for(int i = 0; i < json_tx->u.array.length; i++) + { + const char *p = json_get_string(json_tx->u.array.values[i], "hash"); + char hash_be[256] = { 0 }; + + if (templ->has_filtered_txs) { + templ->filtered_txs_fee += json_get_int(json_tx->u.array.values[i], "fee"); + continue; + } + + string_be(p, hash_be); + txhashes.push_back(hash_be); + + const char *txid = json_get_string(json_tx->u.array.values[i], "txid"); + if(txid && strlen(txid)) { + char txid_be[256] = { 0 }; + string_be(txid, txid_be); + txids.push_back(txid_be); + if (strcmp(hash_be, txid_be)) { + templ->has_segwit_txs = true; // if not, its useless to generate a segwit block, bigger + } + } else { + templ->has_segwit_txs = false; // force disable if not supported (no txid fields) + } + + const char *d = json_get_string(json_tx->u.array.values[i], "data"); + templ->txdata.push_back(d); + + // if wanted, we can limit the count of txs to include + if (g_limit_txs_per_block && i >= g_limit_txs_per_block-2) { + debuglog("limiting block to %d first txs (of %d)\n", g_limit_txs_per_block, json_tx->u.array.length); + templ->has_filtered_txs = true; + } + } + + if (templ->has_filtered_txs) { + // coinbasevalue is a total with all tx fees, need to reduce it if some are skipped + templ->value -= templ->filtered_txs_fee; + } + + templ->txmerkles[0] = '\0'; + if(templ->has_segwit_txs) { + templ->txcount = txids.size(); + templ->txsteps = merkle_steps(txids); + } else { + templ->txcount = txhashes.size(); + templ->txsteps = merkle_steps(txhashes); + } + + if(templ->has_segwit_txs) { + // * We compute the witness hash (which is the hash including witnesses) of all the block's transactions, except the + // coinbase (where 0x0000....0000 is used instead). + // * The coinbase scriptWitness is a stack of a single 32-byte vector, containing a witness nonce (unconstrained). + // * We build a merkle tree with all those witness hashes as leaves (similar to the hashMerkleRoot in the block header). + // * There must be at least one output whose scriptPubKey is a single 36-byte push, the first 4 bytes (magic) of which are + // {0xaa, 0x21, 0xa9, 0xed}, and the following 32 bytes are SHA256^2(witness root, witness nonce). In case there are + /* + char bin[YAAMP_HASHLEN_BIN*2]; + char witness[128] = { 0 }; + vector mt_verify = merkle_steps(txhashes); + string witness_mt = merkle_with_first(mt_verify, "0000000000000000000000000000000000000000000000000000000000000000"); + mt_verify.clear(); + witness_mt = witness_mt + "0000000000000000000000000000000000000000000000000000000000000000"; + + binlify((unsigned char *)bin, witness_mt.c_str()); + sha256_double_hash_hex(bin, witness, YAAMP_HASHLEN_BIN*2); + + int clen = (int) (strlen(coind->witness_magic) + strlen(witness)); // 4 + 32 = 36 = 0x24 + sprintf(coind->commitment, "6a%02x%s%s", clen/2, coind->witness_magic, witness); + */ + // default commitment is already computed correctly + const char *commitment = json_get_string(json_result, "default_witness_commitment"); + if (commitment) { + sprintf(coind->commitment, "%s", commitment); + } else { + templ->has_segwit_txs = false; + } + } + + txhashes.clear(); + txids.clear(); + + vector::const_iterator i; + for(i = templ->txsteps.begin(); i != templ->txsteps.end(); ++i) + sprintf(templ->txmerkles + strlen(templ->txmerkles), "\"%s\",", (*i).c_str()); + + if(templ->txmerkles[0]) + templ->txmerkles[strlen(templ->txmerkles)-1] = 0; + +// debuglog("merkle transactions %d [%s]\n", templ->txcount, templ->txmerkles); + ser_string_be2(templ->prevhash_hex, templ->prevhash_be, 8); + + if(!strcmp(coind->symbol, "LBC")) + ser_string_be2(templ->claim_hex, templ->claim_be, 8); + + if(!coind->pos) + coind_aux_build_auxs(templ); + + coinbase_create(coind, templ, json_result); + json_value_free(json); + + return templ; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +bool coind_create_job(YAAMP_COIND *coind, bool force) +{ +// debuglog("create job %s\n", coind->symbol); + + bool b = rpc_connected(&coind->rpc); + if(!b) return false; + + CommonLock(&coind->mutex); + + YAAMP_JOB_TEMPLATE *templ; + + // DCR gbt block header is not compatible with getwork submit, so... + + if (coind->usegetwork && strcmp(coind->rpcencoding, "DCR") == 0) + templ = decred_create_worktemplate(coind); + else + templ = coind_create_template(coind); + + if(!templ) + { + CommonUnlock(&coind->mutex); +// debuglog("%s: create job template failed!\n", coind->symbol); + return false; + } + + YAAMP_JOB *job_last = coind->job; + + if( !force && job_last && job_last->templ && job_last->templ->created + 45 > time(NULL) && + templ->height == job_last->templ->height && + templ->txcount == job_last->templ->txcount && + strcmp(templ->coinb2, job_last->templ->coinb2) == 0) + { +// debuglog("coind_create_job %s %d same template %x \n", coind->name, coind->height, coind->job->id); + if (templ->txcount) { + templ->txsteps.clear(); + templ->txdata.clear(); + } + delete templ; + + CommonUnlock(&coind->mutex); + return true; + } + + //////////////////////////////////////////////////////////////////////////////////////// + + int height = coind->height; + coind->height = templ->height-1; + + if(height > coind->height) + { + stratumlog("%s went from %d to %d\n", coind->name, height, coind->height); + // coind->auto_ready = false; + } + + if(height < coind->height && !coind->newblock) + { + if(coind->auto_ready && coind->notreportingcounter++ > 5) + stratumlog("%s %d not reporting\n", coind->name, coind->height); + } + + uint64_t coin_target = decode_compact(templ->nbits); + if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; // under decode_compact min diff + coind->difficulty = target_to_diff(coin_target); + +// stratumlog("%s %d diff %g %llx %s\n", coind->name, height, coind->difficulty, coin_target, templ->nbits); + + coind->newblock = false; + + //////////////////////////////////////////////////////////////////////////////////////// + + object_delete(coind->job); + + coind->job = new YAAMP_JOB; + memset(coind->job, 0, sizeof(YAAMP_JOB)); + + sprintf(coind->job->name, "%s", coind->symbol); + + coind->job->id = job_get_jobid(); + coind->job->templ = templ; + + coind->job->profit = coind_profitability(coind); + coind->job->maxspeed = coind_nethash(coind) * + (g_current_algo->profit? min(1.0, coind_profitability(coind)/g_current_algo->profit): 1); + + coind->job->coind = coind; + coind->job->remote = NULL; + + g_list_job.AddTail(coind->job); + CommonUnlock(&coind->mutex); + +// debuglog("coind_create_job %s %d new job %x\n", coind->name, coind->height, coind->job->id); + + return true; +} + + + + + + + + + + + + + + + diff --git a/stratum/job.h b/stratum/job.h index aef4bdbe1..855a0cd5e 100644 --- a/stratum/job.h +++ b/stratum/job.h @@ -51,6 +51,9 @@ struct YAAMP_JOB_TEMPLATE char coinb1[4*1024]; char coinb2[4*1024]; + char coinforsubmitb1[4*1024]; + char coinforsubmitb2[4*1024]; + bool isbitcash; char header[256]; @@ -61,6 +64,9 @@ struct YAAMP_JOB_TEMPLATE int auxs_size; YAAMP_COIND_AUX *auxs[MAX_AUXS]; + + bool needpriceinfo; + char priceinfo[1024]; }; #define YAAMP_JOB_MAXSUBIDS 200 diff --git a/stratum/job.h.bak b/stratum/job.h.bak new file mode 100644 index 000000000..aef4bdbe1 --- /dev/null +++ b/stratum/job.h.bak @@ -0,0 +1,139 @@ + +#define MAX_AUXS 32 + +class YAAMP_REMOTE; +class YAAMP_COIND; +class YAAMP_COIND_AUX; + +struct YAAMP_JOB_VALUES +{ + char coinbase[4*1024]; + char merkleroot_be[1024]; + + char header[1024]; + char header_be[1024]; + unsigned char header_bin[1024]; + + char hash_hex[1024]; + char hash_be[1024]; + unsigned char hash_bin[1024]; +}; + +struct YAAMP_JOB_TEMPLATE +{ + int created; + char flags[64]; + + char prevhash_hex[512]; + char prevhash_be[512]; + + char extradata_hex[512]; + char extradata_be[512]; + + // todo: can use extra field + char claim_hex[128]; + char claim_be[128]; + + int txcount; + char txmerkles[YAAMP_SMALLBUFSIZE]; + + vector txsteps; + vector txdata; + + char version[32]; + char nbits[32]; + char ntime[32]; + + int height; + int target; + + json_int_t value; + + char coinb1[4*1024]; + char coinb2[4*1024]; + + char header[256]; + + bool has_segwit_txs; + + bool has_filtered_txs; + int filtered_txs_fee; + + int auxs_size; + YAAMP_COIND_AUX *auxs[MAX_AUXS]; +}; + +#define YAAMP_JOB_MAXSUBIDS 200 + +class YAAMP_JOB: public YAAMP_OBJECT +{ +public: + bool block_found; + char name[1024]; + + int count; + double speed; + + double maxspeed; + double profit; + + YAAMP_COIND *coind; // either one of them + YAAMP_REMOTE *remote; + YAAMP_JOB_TEMPLATE *templ; + + bool remote_subids[YAAMP_JOB_MAXSUBIDS]; +}; + +inline void job_delete(YAAMP_OBJECT *object) +{ + YAAMP_JOB *job = (YAAMP_JOB *)object; + if (!job) return; + if (job->templ && job->templ->txcount) { + job->templ->txsteps.clear(); + job->templ->txdata.clear(); + } + if (job->templ) delete job->templ; + delete job; +} + +///////////////////////////////////////////////////////////////////////////////////////////// + +int job_get_jobid(); + +void job_sort(); +void job_relock_clients(int jobid_old, int jobid_new); +void job_unlock_clients(YAAMP_JOB *job=NULL); +void job_assign_locked_clients(YAAMP_JOB *job); + +bool job_can_mine(YAAMP_JOB *job); +void job_reset_clients(YAAMP_JOB *job=NULL); +bool job_has_free_client(); + +//YAAMP_JOB_TEMPLATE *job_create_template(YAAMP_COIND *coind); +//void job_create_last(YAAMP_COIND *coind, bool force=false); + +///////////////////////// + +void job_send_jobid(YAAMP_CLIENT *client, int jobid); +void job_send_last(YAAMP_CLIENT *client); +void job_broadcast(YAAMP_JOB *job); + +///////////////////////// + +void *job_thread(void *p); +void job_signal(); +void job_update(); +void job_init(); + + +void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result); + +vector coind_aux_hashlist(YAAMP_COIND_AUX **auxs, int size); +vector coind_aux_merkle_branch(YAAMP_COIND_AUX **auxs, int size, int index); +void coind_aux_build_auxs(YAAMP_JOB_TEMPLATE *templ); + + + + + + diff --git a/stratum/sha3/makefile b/stratum/sha3/makefile index 83363eba4..7232f7257 100644 --- a/stratum/sha3/makefile +++ b/stratum/sha3/makefile @@ -7,7 +7,7 @@ LDFLAGS=-O2 SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c sph_sm3.c sph_streebog.c \ sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ - blake2s.c + blake2s.c blake2b.c OBJECTS=$(SOURCES:.c=.o) OUTPUT=libhash.a diff --git a/stratum/sha3/makefile.bak b/stratum/sha3/makefile.bak index f2bd096cd..83363eba4 100644 --- a/stratum/sha3/makefile.bak +++ b/stratum/sha3/makefile.bak @@ -5,9 +5,9 @@ CFLAGS= -O3 -march=native LDFLAGS=-O2 SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ - sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c \ + sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c sph_sm3.c sph_streebog.c \ sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ - blake2s.c blake2b.c sha2.c sph_sm3.c + blake2s.c OBJECTS=$(SOURCES:.c=.o) OUTPUT=libhash.a diff --git a/web/serverconfig.sample.php b/web/serverconfig.sample.php index 6dddb4835..3c09111d6 100644 --- a/web/serverconfig.sample.php +++ b/web/serverconfig.sample.php @@ -54,6 +54,7 @@ define('EXCH_COINMARKETS_USER', ''); define('EXCH_COINMARKETS_PIN', ''); define('EXCH_CREX24_KEY', ''); +define('EXCH_CRYPTOBRIDGE_ID', ''); define('EXCH_BINANCE_KEY', ''); define('EXCH_BITSTAMP_ID',''); define('EXCH_BITSTAMP_KEY',''); diff --git a/web/serverconfig.sample.php.bak b/web/serverconfig.sample.php.bak index 9bcb8c438..6dddb4835 100644 --- a/web/serverconfig.sample.php.bak +++ b/web/serverconfig.sample.php.bak @@ -46,9 +46,7 @@ define('YAAMP_USE_NGINX', false); define('EXCH_CRYPTOPIA_KEY', ''); define('EXCH_POLONIEX_KEY', ''); define('EXCH_BITTREX_KEY', ''); -define('EXCH_BITZ_KEY', ''); define('EXCH_BLEUTRADE_KEY', ''); -define('EXCH_BTER_KEY', ''); define('EXCH_YOBIT_KEY', ''); define('EXCH_CCEX_KEY', ''); define('EXCH_CEXIO_ID', ''); @@ -56,7 +54,6 @@ define('EXCH_CEXIO_KEY', ''); define('EXCH_COINMARKETS_USER', ''); define('EXCH_COINMARKETS_PIN', ''); define('EXCH_CREX24_KEY', ''); -define('EXCH_CRYPTOBRIDGE_ID', ''); define('EXCH_BINANCE_KEY', ''); define('EXCH_BITSTAMP_ID',''); define('EXCH_BITSTAMP_KEY',''); @@ -67,7 +64,6 @@ define('EXCH_LIVECOIN_KEY', ''); define('EXCH_NOVA_KEY', ''); define('EXCH_STOCKSEXCHANGE_KEY', ''); - // Automatic withdraw to Yaamp btc wallet if btc balance > 0.3 define('EXCH_AUTO_WITHDRAW', 0.3); @@ -98,3 +94,4 @@ $configCustomPorts = array( $configAlgoNormCoef = array( // 'x11' => 5.0, ); + diff --git a/web/yaamp/core/common/libUtil.php b/web/yaamp/core/common/libUtil.php index 126c516fc..22f0c29e6 100644 --- a/web/yaamp/core/common/libUtil.php +++ b/web/yaamp/core/common/libUtil.php @@ -41,7 +41,7 @@ function getuserparam($address) { if(empty($address)) return null; - $address = trim(substr($address, 0, 52)); + $address = trim(substr($address, 0, 98)); $user = getdbosql('db_accounts', "username=:ad", array(':ad'=>$address)); return $user; @@ -51,7 +51,7 @@ function getrenterparam($address) { if(empty($address)) return null; - $address = trim(substr($address, 0, 35)); + $address = trim(substr($address, 0, 98)); $renter = getdbosql('db_renters', "address=:ad", array(':ad'=>$address)); return $renter; diff --git a/web/yaamp/core/common/libUtil.php.bak b/web/yaamp/core/common/libUtil.php.bak index bf3b051c3..126c516fc 100644 --- a/web/yaamp/core/common/libUtil.php.bak +++ b/web/yaamp/core/common/libUtil.php.bak @@ -41,7 +41,7 @@ function getuserparam($address) { if(empty($address)) return null; - $address = trim(substr($address, 0, 35)); + $address = trim(substr($address, 0, 52)); $user = getdbosql('db_accounts', "username=:ad", array(':ad'=>$address)); return $user; diff --git a/web/yaamp/core/trading/trading.php b/web/yaamp/core/trading/trading.php index 1dab4d7fe..f5da68140 100644 --- a/web/yaamp/core/trading/trading.php +++ b/web/yaamp/core/trading/trading.php @@ -9,6 +9,7 @@ require_once('alcurex_trading.php'); require_once('coinsmarkets_trading.php'); require_once('crex24_trading.php'); +require_once('cryptobridge_trading.php'); require_once('cryptopia_trading.php'); require_once('hitbtc_trading.php'); require_once('kucoin_trading.php'); @@ -82,6 +83,7 @@ function runExchange($exchangeName=false) break; case 'cryptobridge': + doCryptobridgeTrading(true); updateCryptoBridgeMarkets(); break; diff --git a/web/yaamp/core/trading/trading.php.bak b/web/yaamp/core/trading/trading.php.bak index e3e56a8ae..1dab4d7fe 100644 --- a/web/yaamp/core/trading/trading.php.bak +++ b/web/yaamp/core/trading/trading.php.bak @@ -2,16 +2,13 @@ require_once('poloniex_trading.php'); require_once('binance_trading.php'); require_once('bittrex_trading.php'); -require_once('bitzv2_trading.php'); require_once('bleutrade_trading.php'); -require_once('bter_trading.php'); require_once('c-cex_trading.php'); require_once('kraken_trading.php'); require_once('yobit_trading.php'); require_once('alcurex_trading.php'); require_once('coinsmarkets_trading.php'); require_once('crex24_trading.php'); -require_once('cryptobridge_trading.php'); require_once('cryptopia_trading.php'); require_once('hitbtc_trading.php'); require_once('kucoin_trading.php'); @@ -36,9 +33,6 @@ function cancelExchangeOrder($order=false) case 'bittrex': doBittrexCancelOrder($order->uuid); break; - case 'bitz': - doBitzCancelOrder($order->uuid); - break; case 'bleutrade': doBleutradeCancelOrder($order->uuid); break; @@ -57,6 +51,7 @@ function cancelExchangeOrder($order=false) case 'livecoin': doLiveCoinCancelOrder($order->uuid); break; + } } @@ -76,11 +71,6 @@ function runExchange($exchangeName=false) updateBinanceMarkets(); break; - case 'bter': - doBterTrading(true); - updateBterMarkets(); - break; - case 'crex24': doCrex24Trading(true); updateCrex24Markets(); @@ -92,7 +82,6 @@ function runExchange($exchangeName=false) break; case 'cryptobridge': - doCryptobridgeTrading(true); updateCryptoBridgeMarkets(); break; @@ -104,9 +93,7 @@ function runExchange($exchangeName=false) doBittrexTrading(true); updateBittrexMarkets(); break; - case 'bitz': - doBitzTrading(true); updateBitzMarkets(); break; @@ -173,7 +160,6 @@ function runExchange($exchangeName=false) updatePoloniexMarkets(); break; - default: debuglog(__FUNCTION__.' '.$exchangeName.' not implemented'); } diff --git a/web/yaamp/defaultconfig.php b/web/yaamp/defaultconfig.php index 0674be94f..232592b5b 100644 --- a/web/yaamp/defaultconfig.php +++ b/web/yaamp/defaultconfig.php @@ -35,6 +35,7 @@ if (!defined('EXCH_CEXIO_ID')) define('EXCH_CEXIO_ID', ''); if (!defined('EXCH_CEXIO_KEY')) define('EXCH_CEXIO_KEY', ''); if (!defined('EXCH_CREX24_KEY')) define('EXCH_CREX24_KEY', ''); +if (!defined('EXCH_CRYPTOBRIDGE_ID')) define('EXCH_CRYPTOBRIDGE_ID', ''); if (!defined('EXCH_CRYPTOPIA_KEY')) define('EXCH_CRYPTOPIA_KEY', ''); if (!defined('EXCH_HITBTC_KEY')) define('EXCH_HITBTC_KEY', ''); if (!defined('EXCH_POLONIEX_KEY')) define('EXCH_POLONIEX_KEY', ''); diff --git a/web/yaamp/defaultconfig.php.bak b/web/yaamp/defaultconfig.php.bak index 8afbe3f9d..0674be94f 100644 --- a/web/yaamp/defaultconfig.php.bak +++ b/web/yaamp/defaultconfig.php.bak @@ -31,18 +31,17 @@ if (!defined('EXCH_BITTREX_KEY')) define('EXCH_BITTREX_KEY', ''); if (!defined('EXCH_BITSTAMP_ID')) define('EXCH_BITSTAMP_ID', ''); if (!defined('EXCH_BITSTAMP_KEY')) define('EXCH_BITSTAMP_KEY',''); if (!defined('EXCH_BLEUTRADE_KEY')) define('EXCH_BLEUTRADE_KEY', ''); -if (!defined('EXCH_BTER_KEY')) define('EXCH_BTER_KEY', ''); if (!defined('EXCH_CCEX_KEY')) define('EXCH_CCEX_KEY', ''); if (!defined('EXCH_CEXIO_ID')) define('EXCH_CEXIO_ID', ''); if (!defined('EXCH_CEXIO_KEY')) define('EXCH_CEXIO_KEY', ''); if (!defined('EXCH_CREX24_KEY')) define('EXCH_CREX24_KEY', ''); -if (!defined('EXCH_CRYPTOBRIDGE_ID')) define('EXCH_CRYPTOBRIDGE_ID', ''); if (!defined('EXCH_CRYPTOPIA_KEY')) define('EXCH_CRYPTOPIA_KEY', ''); if (!defined('EXCH_HITBTC_KEY')) define('EXCH_HITBTC_KEY', ''); if (!defined('EXCH_POLONIEX_KEY')) define('EXCH_POLONIEX_KEY', ''); if (!defined('EXCH_YOBIT_KEY')) define('EXCH_YOBIT_KEY', ''); if (!defined('EXCH_KRAKEN_KEY')) define('EXCH_KRAKEN_KEY', ''); if (!defined('EXCH_KUCOIN_KEY')) define('EXCH_KUCOIN_KEY', ''); +if (!defined('EXCH_KUCOIN_PASSPHRASE')) define('EXCH_KUCOIN_PASSPHRASE', ''); if (!defined('EXCH_LIVECOIN_KEY')) define('EXCH_LIVECOIN_KEY', ''); if (!defined('EXCH_NOVA_KEY')) define('EXCH_NOVA_KEY', ''); if (!defined('EXCH_STOCKSEXCHANGE_KEY')) define('EXCH_STOCKSEXCHANGE_KEY', ''); diff --git a/web/yaamp/modules/thread/CronjobController.php b/web/yaamp/modules/thread/CronjobController.php index 74f46e1d5..70ab5a01d 100644 --- a/web/yaamp/modules/thread/CronjobController.php +++ b/web/yaamp/modules/thread/CronjobController.php @@ -142,6 +142,7 @@ public function actionRun() doBinanceTrading(); doCCexTrading(); doBleutradeTrading(); + doCryptobridgeTrading(); doKuCoinTrading(); doNovaTrading(); doYobitTrading(); diff --git a/web/yaamp/modules/thread/CronjobController.php.bak b/web/yaamp/modules/thread/CronjobController.php.bak index 2f75427a4..74f46e1d5 100644 --- a/web/yaamp/modules/thread/CronjobController.php.bak +++ b/web/yaamp/modules/thread/CronjobController.php.bak @@ -129,7 +129,6 @@ class CronjobController extends CommonController getBitstampBalances(); getCexIoBalances(); doBittrexTrading(); - doBitzTrading(); doCrex24Trading(); doCryptopiaTrading(); doKrakenTrading(); @@ -142,9 +141,7 @@ class CronjobController extends CommonController doBinanceTrading(); doCCexTrading(); - doBterTrading(); doBleutradeTrading(); - doCryptobridgeTrading(); doKuCoinTrading(); doNovaTrading(); doYobitTrading(); @@ -221,3 +218,4 @@ class CronjobController extends CommonController } } + From be8de6605385593d12a9448f22ec1c09d59fb028 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 12 Nov 2019 17:00:37 -0500 Subject: [PATCH 508/576] Update coinbase.cpp --- stratum/coinbase.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 9778c0a39..d7780f141 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -103,16 +103,16 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * unsigned char pricehash_bin[1024]; char pricehash_hex[1024]; char pricehash_be[1024]; - + if (templ->needpriceinfo && strlen(templ->priceinfo) > 0 && strlen(templ->priceinfo) < 1000) { binlify(price_bin, templ->priceinfo); - + int price_len = strlen(templ->priceinfo)/2; sha256_double_hash((char *)price_bin, (char *)pricehash_bin, price_len); hexlify(pricehash_hex, pricehash_bin, 32); string_be(pricehash_hex, pricehash_be); - + sprintf(params, "[\"%s\", %i, \"%s\"]", coind->wallet, templ->height, pricehash_be); } else { sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); @@ -127,7 +127,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbaseforhashpart1")); templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbaseforhashpart2")); - + sprintf(templ->coinforsubmitb1, "%s", json_get_string(json_result, "coinbasepart1")); templ->coinforsubmitb1[strlen(templ->coinforsubmitb1) - 16] = '\0'; sprintf(templ->coinforsubmitb2, "%s", json_get_string(json_result, "coinbasepart2")); @@ -137,7 +137,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } return; } - char eheight[32], etime[32]; char entime[32] = { 0 }; char commitment[128] = { 0 }; @@ -252,6 +251,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); } + else if(strcmp(coind->symbol, "GEEK") == 0) { if (coind->charity_percent <= 0) coind->charity_percent = 2.5; @@ -292,7 +292,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 + else if(strcmp("DCR", coind->rpcencoding) == 0) { + coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 coind->charity_percent = 0; coind->charity_amount = available; available *= coind->reward_mul; @@ -1391,4 +1392,3 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - From 4a5481f7ff655dbb73a44e40a724794ea18d242e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 14 Nov 2019 12:25:59 -0500 Subject: [PATCH 509/576] Update coinbase.cpp --- stratum/coinbase.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index d7780f141..62f8eb213 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -481,6 +481,54 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + else if(strcmp(coind->symbol, "TUX") == 0) { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "donation_payee"); + if(payee != NULL){ + sprintf(coind->charity_address, "%s", payee); + } else { + sprintf(coind->charity_address, "%s", ""); + } + + if(strlen(coind->charity_address) > 0){ + char script_payee[1024]; + char charity_payee[256] = { 0 }; + sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "donation_amount"); + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + debuglog("pack tx %s\n", coinb2_part); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + } bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); json_value* founder = json_get_object(json_result, "founder"); From 2cae9206dddb72ce7e6785365b54bf9ccefac8e7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 15 Nov 2019 14:06:57 -0500 Subject: [PATCH 510/576] Update coinbase.cpp --- stratum/coinbase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 62f8eb213..e481762a6 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -529,7 +529,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } } - + else if(strcmp(coind->symbol, "PGN") == 0) { bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); json_value* founder = json_get_object(json_result, "founder"); @@ -568,6 +568,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } } +} // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) From 3291f4dc5c1ccccd16d8612a3019f03e92dfc174 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Nov 2019 14:29:53 -0500 Subject: [PATCH 511/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 158 ++++++++++++++------------- 1 file changed, 82 insertions(+), 76 deletions(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index 10851aa4e..92ec1d683 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -377,86 +377,92 @@ echo '

    Max 35 limit

    '; echo CUFHtml::closeCtrlHolder(); +if(empty($coin->id)) +if(empty($coin->program)){ +echo CHtml::tag("hr"); +echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; +} + if ($coin->id) { - if(empty($coin->program)){ - echo CHtml::tag("hr"); - echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; - } - else { - $program = substr($coin->program, 0, -1); - echo CHtml::tag("hr"); - echo "Autogenerated config - if using daemonbuilder copy from rpcuser through blocknotify line\n"; - echo "If you manually built a coin without daemonbuilder, copy this entire section:\n"; - echo CHtml::opentag("pre"); - echo "mkdir -p {$coin->conf_folder}\n"; - $port = getAlgoPort($coin->algo); - $dedport = $coin->dedicatedport; - echo "echo '\n"; - echo " \n"; - echo "rpcuser={$coin->rpcuser}\n"; - echo "rpcpassword={$coin->rpcpasswd}\n"; - echo "rpcport={$coin->rpcport}\n"; - echo "rpcthreads=64\n"; - echo "rpcallowip=127.0.0.1\n"; - echo "# onlynet=ipv4\n"; - echo "maxconnections=12\n"; - echo "daemon=1\n"; - echo "gen=0\n"; - if(empty($coin->specifications)){ - echo "\n"; - } - else { - echo "{$coin->specifications}\n"; - echo "\n"; - } - echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; - if (empty($coin->dedicatedport)) { +if(empty($coin->program)){ +echo CHtml::tag("hr"); +echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; +} +else { +$program = substr($coin->program, 0, -1); +echo CHtml::tag("hr"); +echo "Autogenerated config - if using daemonbuilder copy from rpcuser through blocknotify line\n"; +echo "If you manually built a coin without daemonbuilder, copy this entire section:\n"; +echo CHtml::opentag("pre"); +echo "mkdir -p {$coin->conf_folder}\n"; +$port = getAlgoPort($coin->algo); +$dedport = $coin->dedicatedport; +echo "echo '\n"; +echo " \n"; +echo "rpcuser={$coin->rpcuser}\n"; +echo "rpcpassword={$coin->rpcpasswd}\n"; +echo "rpcport={$coin->rpcport}\n"; +echo "rpcthreads=64\n"; +echo "rpcallowip=127.0.0.1\n"; +echo "# onlynet=ipv4\n"; +echo "maxconnections=12\n"; +echo "daemon=1\n"; +echo "gen=0\n"; +if(empty($coin->specifications)){ +echo "\n"; +} +else { +echo "{$coin->specifications}\n"; +echo "\n"; +} +echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; +if (empty($coin->dedicatedport)) { echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n";} else { echo "blocknotify=blocknotify 127.0.0.1:$dedport {$coin->id} %s\n";} - echo " \n"; - echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; - echo CHtml::closetag("pre"); - - echo CHtml::tag("hr"); - echo "Add coind to system startup:"; - echo CHtml::opentag("pre"); - echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; - echo "\n"; - echo '

    add -reindex if coin fails to start.

    '; - echo CHtml::closetag("pre"); - - echo CHtml::tag("hr"); - echo "Daemon Commands:"; - echo "You MUST use this format or coins will not work!:"; - echo CHtml::opentag("pre"); - echo "To START a coind:\n"; - echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n\n"; - echo "To STOP a coind:\n"; - echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; - echo "Or if your coin has a -cli (bitcoin-cli) file...\n"; - echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; - echo "To run other CLI functions:\n"; - echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n\n"; - echo "To edit the coin.config file:\n"; - echo "sudo nano {$coin->conf_folder}/$program.conf\n"; - echo CHtml::closetag("pre"); - - echo CHtml::tag("hr"); - echo "Miner command line:"; - echo CHtml::opentag("pre"); - echo "-a {$coin->algo} "; - if (empty($coin->dedicatedport)) { - echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' ';} - else{ - echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$dedport.' ';} - echo "-u {$coin->master_wallet} "; - echo "-p c={$coin->symbol} "; - echo "\n"; - echo CHtml::closetag("pre");} - } - - echo ""; +echo " \n"; +echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; +echo CHtml::closetag("pre"); + +echo CHtml::tag("hr"); +echo "Add coind to system startup:"; +echo CHtml::opentag("pre"); +echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; +echo "\n"; +echo '

    add -reindex if coin fails to start.

    '; +echo CHtml::closetag("pre"); + +echo CHtml::tag("hr"); +echo "Daemon Commands:"; +echo "You MUST use this format or coins will not work!:"; +echo CHtml::opentag("pre"); +echo "To START a coind:\n"; +echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n\n"; +echo "To STOP a coind:\n"; +echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; +echo "Or if your coin has a -cli (bitcoin-cli) file...\n"; +echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; +echo "To run other CLI functions:\n"; +echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n\n"; +echo "To edit the coin.config file:\n"; +echo "sudo nano {$coin->conf_folder}/$program.conf\n"; +echo CHtml::closetag("pre"); + +echo CHtml::tag("hr"); +echo "Miner command line:"; +echo CHtml::opentag("pre"); +echo "-a {$coin->algo} "; +if (empty($coin->dedicatedport)) { +echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' ';} +else{ +echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$dedport.' ';} +echo "-u {$coin->master_wallet} "; +echo "-p c={$coin->symbol} "; +echo "\n"; +echo CHtml::closetag("pre");} +} + +echo ""; From 82a0c0e65e98be32555da3774582d69711b81f52 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 19 Nov 2019 14:35:21 -0500 Subject: [PATCH 512/576] Update coin_form.php --- web/yaamp/modules/site/coin_form.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index 92ec1d683..e17054045 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -417,15 +417,15 @@ } echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; if (empty($coin->dedicatedport)) { - echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n";} - else { - echo "blocknotify=blocknotify 127.0.0.1:$dedport {$coin->id} %s\n";} +echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n";} +else { +echo "blocknotify=blocknotify 127.0.0.1:$dedport {$coin->id} %s\n";} echo " \n"; echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; echo CHtml::closetag("pre"); echo CHtml::tag("hr"); -echo "Add coind to system startup:"; +echo "Add coind to system startup (cron):"; echo CHtml::opentag("pre"); echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; echo "\n"; @@ -444,6 +444,7 @@ echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; echo "To run other CLI functions:\n"; echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n\n"; +echo " \n"; echo "To edit the coin.config file:\n"; echo "sudo nano {$coin->conf_folder}/$program.conf\n"; echo CHtml::closetag("pre"); From e9da7a0958b59681221cf95250f9f8eab3207068 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Wed, 20 Nov 2019 12:55:00 -0500 Subject: [PATCH 513/576] Update coinbase.cpp --- stratum/coinbase.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index e481762a6..057717777 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -569,6 +569,47 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } } } + + else if(strcmp(coind->symbol, "RITO") == 0) { + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); + json_value* founder = json_get_object(json_result, "founder"); + + if (!coind->hasmasternodes && founder_enabled && founder) { + char founder_payee[256] = { 0 }; + char founder_script[1024] = { 0}; + const char *payee = json_get_string(founder, "payee"); + bool founder_use_p2sh = (strcmp(coind->symbol, "RITO") == 0); + json_int_t amount = json_get_int(founder, "amount"); + if(payee && amount) { + if (payee) snprintf(founder_payee, 255, "%s", payee); + if (strlen(founder_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + base58_decode(founder_payee, founder_script); + available -= amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + if(founder_use_p2sh) { + p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); + } else { + job_pack_tx(coind, templ->coinb2, amount, founder_script); + } + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); + debuglog("%s founder script %s\n", coind->symbol,founder_script); + debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); + + return; + } + } +} // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) From 761fdeb59a0bbd926698bd16cdac3fc16f9653b4 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Wed, 20 Nov 2019 15:36:15 -0500 Subject: [PATCH 514/576] x25x sin fix? x25x sin fix? --- stratum/algos/x22i.c | 15 --- stratum/algos/x22i.c.bak | 161 ++++++++++++++++++++++++++++++++ stratum/algos/x22i.h | 1 - stratum/algos/x22i.h.bak | 17 ++++ stratum/algos/x25x.c | 9 +- stratum/algos/x25x.c.bak | 169 ++++++++++++++++++++++++++++++++++ stratum/client_submit.cpp | 4 - stratum/client_submit.cpp.bak | 15 ++- stratum/coinbase.cpp | 84 +++++++++-------- stratum/coinbase.cpp.bak | 135 ++++++++++++++++++++++++++- 10 files changed, 544 insertions(+), 66 deletions(-) create mode 100644 stratum/algos/x22i.c.bak create mode 100644 stratum/algos/x22i.h.bak create mode 100644 stratum/algos/x25x.c.bak diff --git a/stratum/algos/x22i.c b/stratum/algos/x22i.c index c530e15c3..02a1aa3d5 100644 --- a/stratum/algos/x22i.c +++ b/stratum/algos/x22i.c @@ -144,18 +144,3 @@ void x22i_hash(const char* input, char* output, uint32_t len) memcpy(output, hash, 32); } - -void hexlify(char *hex, const unsigned char *bin, int len) -{ - hex[0] = 0; - for(int i=0; i < len; i++) - sprintf(hex+strlen(hex), "%02x", bin[i]); -} - -void x22i_hash_hex(const char *input, char *output, unsigned int len) -{ - char output1[32]; - - x22i_hash(input, output1, len); - hexlify(output, (unsigned char *)output1, 32); -} diff --git a/stratum/algos/x22i.c.bak b/stratum/algos/x22i.c.bak new file mode 100644 index 000000000..c530e15c3 --- /dev/null +++ b/stratum/algos/x22i.c.bak @@ -0,0 +1,161 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SWIFFTX/SWIFFTX.h" +#include "gost.h" +#include "Lyra2.h" + +#include "common.h" + + +void x22i_hash(const char* input, char* output, uint32_t len) +{ + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_skein512_context ctx_skein; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_haval256_5_context ctx_haval; + sph_tiger_context ctx_tiger; + sph_gost512_context ctx_gost; + sph_sha256_context ctx_sha; + + unsigned char _ALIGN(128) hash[64 * 4] = {0}; + unsigned char _ALIGN(128) hash2[64]; + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, hash); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, hash, 64); + sph_bmw512_close(&ctx_bmw, hash); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, hash, 64); + sph_groestl512_close(&ctx_groestl, hash); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, hash, 64); + sph_skein512_close(&ctx_skein, hash); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, hash, 64); + sph_jh512_close(&ctx_jh, hash); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, hash, 64); + sph_keccak512_close(&ctx_keccak, hash); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hash, 64); + sph_luffa512_close (&ctx_luffa, hash); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, hash, 64); + sph_cubehash512_close(&ctx_cubehash, hash); + + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, hash, 64); + sph_shavite512_close(&ctx_shavite, hash); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, hash, 64); + sph_simd512_close(&ctx_simd, hash); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hash, 64); + sph_echo512_close(&ctx_echo, hash); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, hash, 64); + sph_hamsi512_close(&ctx_hamsi, hash); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, hash, 64); + sph_fugue512_close(&ctx_fugue, hash); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, (const void*) hash, 64); + sph_shabal512_close(&ctx_shabal, &hash[64]); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool (&ctx_whirlpool, (const void*) &hash[64], 64); + sph_whirlpool_close(&ctx_whirlpool, &hash[128]); + + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) &hash[128], 64); + sph_sha512_close(&ctx_sha512,(void*) &hash[192]); + + InitializeSWIFFTX(); + ComputeSingleSWIFFTX((unsigned char*)hash, (unsigned char*)hash2, false); + + memset(hash, 0, 64); + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval,(const void*) hash2, 64); + sph_haval256_5_close(&ctx_haval,hash); + + memset(hash2, 0, 64); + sph_tiger_init(&ctx_tiger); + sph_tiger (&ctx_tiger, (const void*) hash, 64); + sph_tiger_close(&ctx_tiger, (void*) hash2); + + memset(hash, 0, 64); + LYRA2((void*) hash, 32, (const void*) hash2, 32, (const void*) hash2, 32, 1, 4, 4); + + sph_gost512_init(&ctx_gost); + sph_gost512 (&ctx_gost, (const void*) hash, 64); + sph_gost512_close(&ctx_gost, (void*) hash); + + sph_sha256_init(&ctx_sha); + sph_sha256 (&ctx_sha, (const void*) hash, 64); + sph_sha256_close(&ctx_sha, (void*) hash); + + memcpy(output, hash, 32); +} + +void hexlify(char *hex, const unsigned char *bin, int len) +{ + hex[0] = 0; + for(int i=0; i < len; i++) + sprintf(hex+strlen(hex), "%02x", bin[i]); +} + +void x22i_hash_hex(const char *input, char *output, unsigned int len) +{ + char output1[32]; + + x22i_hash(input, output1, len); + hexlify(output, (unsigned char *)output1, 32); +} diff --git a/stratum/algos/x22i.h b/stratum/algos/x22i.h index ae6b13b82..502b8941f 100644 --- a/stratum/algos/x22i.h +++ b/stratum/algos/x22i.h @@ -8,7 +8,6 @@ extern "C" { #include void x22i_hash(const char* input, char* output, uint32_t len); -void x22i_hash_hex(const char *input, char *output, unsigned int len); #ifdef __cplusplus } diff --git a/stratum/algos/x22i.h.bak b/stratum/algos/x22i.h.bak new file mode 100644 index 000000000..ae6b13b82 --- /dev/null +++ b/stratum/algos/x22i.h.bak @@ -0,0 +1,17 @@ +#ifndef X22I_H +#define X22I_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void x22i_hash(const char* input, char* output, uint32_t len); +void x22i_hash_hex(const char *input, char *output, unsigned int len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/algos/x25x.c b/stratum/algos/x25x.c index e6784518f..0b3076d11 100644 --- a/stratum/algos/x25x.c +++ b/stratum/algos/x25x.c @@ -1,3 +1,5 @@ +#include +#include #include #include @@ -20,12 +22,14 @@ #include #include #include -#include #include "SWIFFTX/SWIFFTX.h" +#include "lane.h" #include "gost.h" #include "Lyra2.h" +#include "common.h" + void x25x_hash(const char* input, char* output, uint32_t len) { sph_blake512_context ctx_blake; @@ -50,7 +54,8 @@ void x25x_hash(const char* input, char* output, uint32_t len) sph_sha256_context ctx_sha; sph_panama_context ctx_panama; - unsigned char hash[25][64] = { 0 }; +// unsigned char _ALIGN(128) hash[25][64] = { [0 ... 24] = { [0 ... 63] = 0 } }; + unsigned char _ALIGN(128) hash[25][64] = { 0 }; sph_blake512_init(&ctx_blake); sph_blake512(&ctx_blake, input, len); diff --git a/stratum/algos/x25x.c.bak b/stratum/algos/x25x.c.bak new file mode 100644 index 000000000..e6784518f --- /dev/null +++ b/stratum/algos/x25x.c.bak @@ -0,0 +1,169 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SWIFFTX/SWIFFTX.h" +#include "gost.h" +#include "Lyra2.h" + +void x25x_hash(const char* input, char* output, uint32_t len) +{ + sph_blake512_context ctx_blake; + sph_bmw512_context ctx_bmw; + sph_groestl512_context ctx_groestl; + sph_jh512_context ctx_jh; + sph_keccak512_context ctx_keccak; + sph_skein512_context ctx_skein; + sph_luffa512_context ctx_luffa; + sph_cubehash512_context ctx_cubehash; + sph_shavite512_context ctx_shavite; + sph_simd512_context ctx_simd; + sph_echo512_context ctx_echo; + sph_hamsi512_context ctx_hamsi; + sph_fugue512_context ctx_fugue; + sph_shabal512_context ctx_shabal; + sph_whirlpool_context ctx_whirlpool; + sph_sha512_context ctx_sha512; + sph_haval256_5_context ctx_haval; + sph_tiger_context ctx_tiger; + sph_gost512_context ctx_gost; + sph_sha256_context ctx_sha; + sph_panama_context ctx_panama; + + unsigned char hash[25][64] = { 0 }; + + sph_blake512_init(&ctx_blake); + sph_blake512(&ctx_blake, input, len); + sph_blake512_close (&ctx_blake, &hash[0]); + + sph_bmw512_init(&ctx_bmw); + sph_bmw512(&ctx_bmw, &hash[0], 64); + sph_bmw512_close(&ctx_bmw, &hash[1]); + + sph_groestl512_init(&ctx_groestl); + sph_groestl512(&ctx_groestl, &hash[1], 64); + sph_groestl512_close(&ctx_groestl, &hash[2]); + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, &hash[2], 64); + sph_skein512_close(&ctx_skein, &hash[3]); + + sph_jh512_init(&ctx_jh); + sph_jh512(&ctx_jh, &hash[3], 64); + sph_jh512_close(&ctx_jh, &hash[4]); + + sph_keccak512_init(&ctx_keccak); + sph_keccak512(&ctx_keccak, &hash[4], 64); + sph_keccak512_close(&ctx_keccak, &hash[5]); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, &hash[5], 64); + sph_luffa512_close (&ctx_luffa, &hash[6]); + + sph_cubehash512_init(&ctx_cubehash); + sph_cubehash512(&ctx_cubehash, &hash[6], 64); + sph_cubehash512_close(&ctx_cubehash, &hash[7]); + + sph_shavite512_init(&ctx_shavite); + sph_shavite512(&ctx_shavite, &hash[7], 64); + sph_shavite512_close(&ctx_shavite, &hash[8]); + + sph_simd512_init(&ctx_simd); + sph_simd512(&ctx_simd, &hash[8], 64); + sph_simd512_close(&ctx_simd, &hash[9]); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, &hash[9], 64); + sph_echo512_close(&ctx_echo, &hash[10]); + + sph_hamsi512_init(&ctx_hamsi); + sph_hamsi512(&ctx_hamsi, &hash[10], 64); + sph_hamsi512_close(&ctx_hamsi, &hash[11]); + + sph_fugue512_init(&ctx_fugue); + sph_fugue512(&ctx_fugue, &hash[11], 64); + sph_fugue512_close(&ctx_fugue, &hash[12]); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, (const void*) &hash[12], 64); + sph_shabal512_close(&ctx_shabal, &hash[13]); + + sph_whirlpool_init(&ctx_whirlpool); + sph_whirlpool (&ctx_whirlpool, (const void*) &hash[13], 64); + sph_whirlpool_close(&ctx_whirlpool, &hash[14]); + + sph_sha512_init(&ctx_sha512); + sph_sha512(&ctx_sha512,(const void*) &hash[14], 64); + sph_sha512_close(&ctx_sha512,(void*) &hash[15]); + + unsigned char temp[SWIFFTX_OUTPUT_BLOCK_SIZE] = {0}; + InitializeSWIFFTX(); + ComputeSingleSWIFFTX((unsigned char*)&hash[12], temp, false); + memcpy((unsigned char*)&hash[16], temp, 64); + + sph_haval256_5_init(&ctx_haval); + sph_haval256_5(&ctx_haval,(const void*) &hash[16], 64); + sph_haval256_5_close(&ctx_haval,&hash[17]); + + sph_tiger_init(&ctx_tiger); + sph_tiger (&ctx_tiger, (const void*) &hash[17], 64); + sph_tiger_close(&ctx_tiger, (void*) &hash[18]); + + LYRA2((void*) &hash[19], 32, (const void*) &hash[18], 32, (const void*) &hash[18], 32, 1, 4, 4); + + sph_gost512_init(&ctx_gost); + sph_gost512 (&ctx_gost, (const void*) &hash[19], 64); + sph_gost512_close(&ctx_gost, (void*) &hash[20]); + + sph_sha256_init(&ctx_sha); + sph_sha256 (&ctx_sha, (const void*) &hash[20], 64); + sph_sha256_close(&ctx_sha, (void*) &hash[21]); + + sph_panama_init(&ctx_panama); + sph_panama (&ctx_panama, (const void*) &hash[21], 64 ); + sph_panama_close(&ctx_panama, (void*) &hash[22]); + + laneHash(512, (const BitSequence*) &hash[22], 512, (BitSequence*) &hash[23]); + + // NEW simple shuffle algorithm, instead of just reversing + #define X25X_SHUFFLE_BLOCKS (24 /* number of algos so far */ * 64 /* output bytes per algo */ / 2 /* block size */) + #define X25X_SHUFFLE_ROUNDS 12 + + static const uint16_t x25x_round_const[X25X_SHUFFLE_ROUNDS] = { + 0x142c, 0x5830, 0x678c, 0xe08c, + 0x3c67, 0xd50d, 0xb1d8, 0xecb2, + 0xd7ee, 0x6783, 0xfa6c, 0x4b9c + }; + + uint16_t* block_pointer = (uint16_t*)hash; + for (int r = 0; r < X25X_SHUFFLE_ROUNDS; r++) { + for (int i = 0; i < X25X_SHUFFLE_BLOCKS; i++) { + uint16_t block_value = block_pointer[X25X_SHUFFLE_BLOCKS - i - 1]; + block_pointer[i] ^= block_pointer[block_value % X25X_SHUFFLE_BLOCKS] + (x25x_round_const[r] << (i % 16)); + } + } + + blake2s_simple((uint8_t*)&hash[24], (const void*)(&hash[0]), 64 * 24); + + memcpy(output, &hash[24], 32); +} diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index affe411ee..a42059285 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -278,10 +278,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - // isnt perfect, but it works - if(strcmp(coind->symbol, "SIN") == 0) - x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - char hash1[1024]; memset(hash1, 0, 1024); diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak index 55385e982..affe411ee 100644 --- a/stratum/client_submit.cpp.bak +++ b/stratum/client_submit.cpp.bak @@ -27,6 +27,10 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem string merkleroot = merkle_with_first(templ->txsteps, doublehash); ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); + + if(templ->isbitcash) { + sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinforsubmitb1, nonce1, nonce2, templ->coinforsubmitb2); + } #ifdef MERKLE_DEBUGLOG printf("merkle root %s\n", merkleroot.c_str()); @@ -39,7 +43,14 @@ void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *tem sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce, templ->extradata_be); ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) - } else { + } else if (templ->needpriceinfo) + { + sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, + ntime, templ->nbits, nonce); + ser_string_be(submitvalues->header, submitvalues->header_be, 20); + sprintf(submitvalues->header_be, "%s%s", submitvalues->header_be, templ->priceinfo); + } else + { sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, ntime, templ->nbits, nonce); ser_string_be(submitvalues->header, submitvalues->header_be, 20); @@ -559,4 +570,4 @@ bool client_submit(YAAMP_CLIENT *client, json_value *json_params) object_unlock(job); return true; -} \ No newline at end of file +} diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 057717777..4950addeb 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1092,46 +1092,50 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - // Add Sinovate[SIN] - if(strcmp(coind->symbol, "SIN") == 0) - { - char dests[2048] = { 0 }; - char sinpayee[256] = { 0 }; - char sinscript[1024] = { 0 }; - int npayees = 1; - char payees[3]; - - const char *founder = json_get_string(json_result, "payee"); - json_int_t founderreward = json_get_int(json_result, "payee_amount"); - if (founder && founderreward) { - snprintf(sinpayee, 255, "%s", founder); - base58_decode(sinpayee, sinscript); - available -= founderreward; - npayees++; - job_pack_tx(coind, dests, founderreward, sinscript); - } - - json_value* masternodes = json_get_array(json_result, "masternode"); - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (started && masternodes->u.array.length) for (int i = 0; i < masternodes->u.array.length; i++) { - const char *payee = json_get_string(masternodes->u.array.values[i], "payee"); - json_int_t amount = json_get_int(masternodes->u.array.values[i], "amount"); - if (payee && amount) { - snprintf(sinpayee, 255, "%s", payee); - base58_decode(sinpayee, sinscript); - available -= amount; - npayees++; - job_pack_tx(coind, dests, amount, sinscript); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, dests); - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available / 100000000; - return; - } + if(strcmp(coind->symbol, "SIN") == 0) { + + // these just get reused + int npayees = 1; + char payees[2]; + char sinpayee[256] = {0}; + char sinscript[1024] = {0}; + char devpayee[256] = {0}; + char devscript[1024] = {0}; + const char *devpayaddr = json_get_string(json_result, "payee"); + json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); + + // prepare devpay script + snprintf(devpayee, 255, "%s", devpayaddr); + base58_decode(devpayee, devscript); + npayees++; + available -= devfee_amount; + + // masternode packs + const char* mnpayaddrs[7] = {0}; + json_value* masternodes = json_get_array(json_result, "masternode"); + json_int_t mnamounts[7] = {0}; + for(int i = 0; i < masternodes->u.array.length; i++) { + mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); + mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); + available -= mnamounts[i]; + npayees++; + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); + for(int i = 0; i < masternodes->u.array.length; i++) { + snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); + base58_decode(sinpayee, sinscript); + job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); + } + + // sequence + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000; + return; + } if(strcmp(coind->symbol, "BITC") == 0) { diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak index 9239a2c4e..057717777 100644 --- a/stratum/coinbase.cpp.bak +++ b/stratum/coinbase.cpp.bak @@ -95,6 +95,48 @@ void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) { + templ->isbitcash = false; + if(strcmp(coind->symbol, "BITC") == 0) { + char *params = (char *)malloc(4096); + if (params) { + unsigned char price_bin[1024]; + unsigned char pricehash_bin[1024]; + char pricehash_hex[1024]; + char pricehash_be[1024]; + + if (templ->needpriceinfo && strlen(templ->priceinfo) > 0 && strlen(templ->priceinfo) < 1000) { + binlify(price_bin, templ->priceinfo); + + int price_len = strlen(templ->priceinfo)/2; + sha256_double_hash((char *)price_bin, (char *)pricehash_bin, price_len); + + hexlify(pricehash_hex, pricehash_bin, 32); + string_be(pricehash_hex, pricehash_be); + + sprintf(params, "[\"%s\", %i, \"%s\"]", coind->wallet, templ->height, pricehash_be); + } else { + sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); + } + //std::cout << "Params:" << params << std::endl; + json_value *json = rpc_call(&coind->rpc, "createcoinbaseforaddress", params); + + free(params); + if (json) { + json_value *json_result = json_get_object(json, "result"); + if (json_result) { + sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbaseforhashpart1")); + templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; + sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbaseforhashpart2")); + + sprintf(templ->coinforsubmitb1, "%s", json_get_string(json_result, "coinbasepart1")); + templ->coinforsubmitb1[strlen(templ->coinforsubmitb1) - 16] = '\0'; + sprintf(templ->coinforsubmitb2, "%s", json_get_string(json_result, "coinbasepart2")); + templ->isbitcash = true; + } + } + } + return; + } char eheight[32], etime[32]; char entime[32] = { 0 }; char commitment[128] = { 0 }; @@ -439,7 +481,55 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - + else if(strcmp(coind->symbol, "TUX") == 0) { + char script_payee[1024]; + char charity_payee[256] = { 0 }; + const char *payee = json_get_string(json_result, "donation_payee"); + if(payee != NULL){ + sprintf(coind->charity_address, "%s", payee); + } else { + sprintf(coind->charity_address, "%s", ""); + } + + if(strlen(coind->charity_address) > 0){ + char script_payee[1024]; + char charity_payee[256] = { 0 }; + sprintf(charity_payee, "%s", coind->charity_address); + if (strlen(charity_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + + base58_decode(charity_payee, script_payee); + + json_int_t charity_amount = json_get_int(json_result, "donation_amount"); + coind->charity_amount = charity_amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + + char echarity_amount[32]; + encode_tx_value(echarity_amount, charity_amount); + strcat(templ->coinb2, echarity_amount); + char coinb2_part[1024] = { 0 }; + char coinb2_len[3] = { 0 }; + sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); + sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); + strcat(templ->coinb2, coinb2_len); + strcat(templ->coinb2, coinb2_part); + debuglog("pack tx %s\n", coinb2_part); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, + // (double) available/1e8, (double) charity_amount/1e8, coind->reward); + return; + } + } + else if(strcmp(coind->symbol, "PGN") == 0) { bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); json_value* founder = json_get_object(json_result, "founder"); @@ -478,6 +568,48 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } } +} + + else if(strcmp(coind->symbol, "RITO") == 0) { + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); + json_value* founder = json_get_object(json_result, "founder"); + + if (!coind->hasmasternodes && founder_enabled && founder) { + char founder_payee[256] = { 0 }; + char founder_script[1024] = { 0}; + const char *payee = json_get_string(founder, "payee"); + bool founder_use_p2sh = (strcmp(coind->symbol, "RITO") == 0); + json_int_t amount = json_get_int(founder, "amount"); + if(payee && amount) { + if (payee) snprintf(founder_payee, 255, "%s", payee); + if (strlen(founder_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + base58_decode(founder_payee, founder_script); + available -= amount; + + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + if(founder_use_p2sh) { + p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); + } else { + job_pack_tx(coind, templ->coinb2, amount, founder_script); + } + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); + debuglog("%s founder script %s\n", coind->symbol,founder_script); + debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); + + return; + } + } +} // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) @@ -1350,4 +1482,3 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } - From bcb63fb31bc264129c2d73d39c3f36b38c16892c Mon Sep 17 00:00:00 2001 From: cryptopool Date: Wed, 20 Nov 2019 16:00:04 -0500 Subject: [PATCH 515/576] x25x sin fix 2 x25x sin fix 2 --- stratum/algos/x22i.c | 15 +++++ stratum/algos/x22i.c.bak | 15 ----- stratum/algos/x22i.h | 1 + stratum/algos/x22i.h.bak | 1 - stratum/algos/x25x.c | 9 +-- stratum/algos/x25x.c.bak | 9 ++- stratum/client_submit.cpp | 4 ++ stratum/client_submit.cpp.bak | 4 -- stratum/coinbase.cpp | 11 +--- stratum/coinbase.cpp.bak | 84 +++++++++++++------------- stratum/sha3/sph_panama.h | 46 ++++++++++----- stratum/sha3/sph_panama.h.bak | 108 ++++++++++++++++++++++++++++++++++ 12 files changed, 216 insertions(+), 91 deletions(-) create mode 100644 stratum/sha3/sph_panama.h.bak diff --git a/stratum/algos/x22i.c b/stratum/algos/x22i.c index 02a1aa3d5..c530e15c3 100644 --- a/stratum/algos/x22i.c +++ b/stratum/algos/x22i.c @@ -144,3 +144,18 @@ void x22i_hash(const char* input, char* output, uint32_t len) memcpy(output, hash, 32); } + +void hexlify(char *hex, const unsigned char *bin, int len) +{ + hex[0] = 0; + for(int i=0; i < len; i++) + sprintf(hex+strlen(hex), "%02x", bin[i]); +} + +void x22i_hash_hex(const char *input, char *output, unsigned int len) +{ + char output1[32]; + + x22i_hash(input, output1, len); + hexlify(output, (unsigned char *)output1, 32); +} diff --git a/stratum/algos/x22i.c.bak b/stratum/algos/x22i.c.bak index c530e15c3..02a1aa3d5 100644 --- a/stratum/algos/x22i.c.bak +++ b/stratum/algos/x22i.c.bak @@ -144,18 +144,3 @@ void x22i_hash(const char* input, char* output, uint32_t len) memcpy(output, hash, 32); } - -void hexlify(char *hex, const unsigned char *bin, int len) -{ - hex[0] = 0; - for(int i=0; i < len; i++) - sprintf(hex+strlen(hex), "%02x", bin[i]); -} - -void x22i_hash_hex(const char *input, char *output, unsigned int len) -{ - char output1[32]; - - x22i_hash(input, output1, len); - hexlify(output, (unsigned char *)output1, 32); -} diff --git a/stratum/algos/x22i.h b/stratum/algos/x22i.h index 502b8941f..ae6b13b82 100644 --- a/stratum/algos/x22i.h +++ b/stratum/algos/x22i.h @@ -8,6 +8,7 @@ extern "C" { #include void x22i_hash(const char* input, char* output, uint32_t len); +void x22i_hash_hex(const char *input, char *output, unsigned int len); #ifdef __cplusplus } diff --git a/stratum/algos/x22i.h.bak b/stratum/algos/x22i.h.bak index ae6b13b82..502b8941f 100644 --- a/stratum/algos/x22i.h.bak +++ b/stratum/algos/x22i.h.bak @@ -8,7 +8,6 @@ extern "C" { #include void x22i_hash(const char* input, char* output, uint32_t len); -void x22i_hash_hex(const char *input, char *output, unsigned int len); #ifdef __cplusplus } diff --git a/stratum/algos/x25x.c b/stratum/algos/x25x.c index 0b3076d11..e6784518f 100644 --- a/stratum/algos/x25x.c +++ b/stratum/algos/x25x.c @@ -1,5 +1,3 @@ -#include -#include #include #include @@ -22,14 +20,12 @@ #include #include #include +#include #include "SWIFFTX/SWIFFTX.h" -#include "lane.h" #include "gost.h" #include "Lyra2.h" -#include "common.h" - void x25x_hash(const char* input, char* output, uint32_t len) { sph_blake512_context ctx_blake; @@ -54,8 +50,7 @@ void x25x_hash(const char* input, char* output, uint32_t len) sph_sha256_context ctx_sha; sph_panama_context ctx_panama; -// unsigned char _ALIGN(128) hash[25][64] = { [0 ... 24] = { [0 ... 63] = 0 } }; - unsigned char _ALIGN(128) hash[25][64] = { 0 }; + unsigned char hash[25][64] = { 0 }; sph_blake512_init(&ctx_blake); sph_blake512(&ctx_blake, input, len); diff --git a/stratum/algos/x25x.c.bak b/stratum/algos/x25x.c.bak index e6784518f..0b3076d11 100644 --- a/stratum/algos/x25x.c.bak +++ b/stratum/algos/x25x.c.bak @@ -1,3 +1,5 @@ +#include +#include #include #include @@ -20,12 +22,14 @@ #include #include #include -#include #include "SWIFFTX/SWIFFTX.h" +#include "lane.h" #include "gost.h" #include "Lyra2.h" +#include "common.h" + void x25x_hash(const char* input, char* output, uint32_t len) { sph_blake512_context ctx_blake; @@ -50,7 +54,8 @@ void x25x_hash(const char* input, char* output, uint32_t len) sph_sha256_context ctx_sha; sph_panama_context ctx_panama; - unsigned char hash[25][64] = { 0 }; +// unsigned char _ALIGN(128) hash[25][64] = { [0 ... 24] = { [0 ... 63] = 0 } }; + unsigned char _ALIGN(128) hash[25][64] = { 0 }; sph_blake512_init(&ctx_blake); sph_blake512(&ctx_blake, input, len); diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index a42059285..affe411ee 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -278,6 +278,10 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + // isnt perfect, but it works + if(strcmp(coind->symbol, "SIN") == 0) + x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + char hash1[1024]; memset(hash1, 0, 1024); diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak index affe411ee..a42059285 100644 --- a/stratum/client_submit.cpp.bak +++ b/stratum/client_submit.cpp.bak @@ -278,10 +278,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - // isnt perfect, but it works - if(strcmp(coind->symbol, "SIN") == 0) - x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - char hash1[1024]; memset(hash1, 0, 1024); diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 4950addeb..c3d2ffa33 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1092,9 +1092,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - if(strcmp(coind->symbol, "SIN") == 0) { - - // these just get reused + if(strcmp(coind->symbol, "SIN") == 0) + { int npayees = 1; char payees[2]; char sinpayee[256] = {0}; @@ -1103,14 +1102,11 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char devscript[1024] = {0}; const char *devpayaddr = json_get_string(json_result, "payee"); json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); - - // prepare devpay script snprintf(devpayee, 255, "%s", devpayaddr); base58_decode(devpayee, devscript); npayees++; - available -= devfee_amount; - // masternode packs + available -= devfee_amount; const char* mnpayaddrs[7] = {0}; json_value* masternodes = json_get_array(json_result, "masternode"); json_int_t mnamounts[7] = {0}; @@ -1131,7 +1127,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); } - // sequence strcat(templ->coinb2, "00000000"); coind->reward = (double)available/100000000; return; diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak index 057717777..4950addeb 100644 --- a/stratum/coinbase.cpp.bak +++ b/stratum/coinbase.cpp.bak @@ -1092,46 +1092,50 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - // Add Sinovate[SIN] - if(strcmp(coind->symbol, "SIN") == 0) - { - char dests[2048] = { 0 }; - char sinpayee[256] = { 0 }; - char sinscript[1024] = { 0 }; - int npayees = 1; - char payees[3]; - - const char *founder = json_get_string(json_result, "payee"); - json_int_t founderreward = json_get_int(json_result, "payee_amount"); - if (founder && founderreward) { - snprintf(sinpayee, 255, "%s", founder); - base58_decode(sinpayee, sinscript); - available -= founderreward; - npayees++; - job_pack_tx(coind, dests, founderreward, sinscript); - } - - json_value* masternodes = json_get_array(json_result, "masternode"); - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (started && masternodes->u.array.length) for (int i = 0; i < masternodes->u.array.length; i++) { - const char *payee = json_get_string(masternodes->u.array.values[i], "payee"); - json_int_t amount = json_get_int(masternodes->u.array.values[i], "amount"); - if (payee && amount) { - snprintf(sinpayee, 255, "%s", payee); - base58_decode(sinpayee, sinscript); - available -= amount; - npayees++; - job_pack_tx(coind, dests, amount, sinscript); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, dests); - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available / 100000000; - return; - } + if(strcmp(coind->symbol, "SIN") == 0) { + + // these just get reused + int npayees = 1; + char payees[2]; + char sinpayee[256] = {0}; + char sinscript[1024] = {0}; + char devpayee[256] = {0}; + char devscript[1024] = {0}; + const char *devpayaddr = json_get_string(json_result, "payee"); + json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); + + // prepare devpay script + snprintf(devpayee, 255, "%s", devpayaddr); + base58_decode(devpayee, devscript); + npayees++; + available -= devfee_amount; + + // masternode packs + const char* mnpayaddrs[7] = {0}; + json_value* masternodes = json_get_array(json_result, "masternode"); + json_int_t mnamounts[7] = {0}; + for(int i = 0; i < masternodes->u.array.length; i++) { + mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); + mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); + available -= mnamounts[i]; + npayees++; + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); + for(int i = 0; i < masternodes->u.array.length; i++) { + snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); + base58_decode(sinpayee, sinscript); + job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); + } + + // sequence + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000; + return; + } if(strcmp(coind->symbol, "BITC") == 0) { diff --git a/stratum/sha3/sph_panama.h b/stratum/sha3/sph_panama.h index ab44cece8..fdf3b89cd 100644 --- a/stratum/sha3/sph_panama.h +++ b/stratum/sha3/sph_panama.h @@ -28,7 +28,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -36,10 +36,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -53,15 +53,23 @@ * @file sph_panama.h * @author Thomas Pornin */ - #ifndef SPH_PANAMA_H__ + +#ifndef SPH_PANAMA_H__ #define SPH_PANAMA_H__ - #include -#include "sph_types.h" - /** + +#if defined(__cplusplus) +extern "C" { +#endif + +#include +#include "../sha3/sph_types.h" + +/** * Output size (in bits) for PANAMA. */ #define SPH_SIZE_panama 256 - /** + +/** * This structure is a context for PANAMA computations: it contains the * intermediate values and some data from the last entered block. Once * a PANAMA computation has been performed, the context can be reused for @@ -75,18 +83,22 @@ typedef struct { #ifndef DOXYGEN_IGNORE unsigned char data[32]; /* first field, for alignment */ unsigned data_ptr; - sph_u32 buffer[32][8]; + + sph_u32 buffer[32][8]; unsigned buffer_ptr; - sph_u32 state[17]; + + sph_u32 state[17]; #endif } sph_panama_context; - /** + +/** * Initialize a PANAMA context. This process performs no memory allocation. * * @param cc the PANAMA context (pointer to a sph_panama_context) */ void sph_panama_init(void *cc); - /** + +/** * Process some data bytes. It is acceptable that len is zero * (in which case this function does nothing). * @@ -95,7 +107,8 @@ void sph_panama_init(void *cc); * @param len the input data length (in bytes) */ void sph_panama(void *cc, const void *data, size_t len); - /** + +/** * Terminate the current PANAMA computation and output the result into the * provided buffer. The destination buffer must be wide enough to * accomodate the result (32 bytes). The context is automatically @@ -105,4 +118,9 @@ void sph_panama(void *cc, const void *data, size_t len); * @param dst the destination buffer */ void sph_panama_close(void *cc, void *dst); - #endif + +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/stratum/sha3/sph_panama.h.bak b/stratum/sha3/sph_panama.h.bak new file mode 100644 index 000000000..ab44cece8 --- /dev/null +++ b/stratum/sha3/sph_panama.h.bak @@ -0,0 +1,108 @@ +/* $Id: sph_panama.h 154 2010-04-26 17:00:24Z tp $ */ +/** + * PANAMA interface. + * + * PANAMA has been published in: J. Daemen and C. Clapp, "Fast Hashing + * and Stream Encryption with PANAMA", Fast Software Encryption - + * FSE'98, LNCS 1372, Springer (1998), pp. 60--74. + * + * PANAMA is not fully defined with regards to endianness and related + * topics. This implementation follows strict little-endian conventions: + *
      + *
    • Each 32-byte input block is split into eight 32-bit words, the + * first (leftmost) word being numbered 0.
    • + *
    • Each such 32-bit word is decoded from memory in little-endian + * convention.
    • + *
    • The additional padding bit equal to "1" is added by considering + * the least significant bit in a byte to come first; practically, this + * means that a single byte of value 0x01 is appended to the (byte-oriented) + * message, and then 0 to 31 bytes of value 0x00.
    • + *
    • The output consists of eight 32-bit words; the word numbered 0 is + * written first (in leftmost position) and it is encoded in little-endian + * convention. + *
    + * With these conventions, PANAMA is sometimes known as "PANAMA-LE". The + * PANAMA reference implementation uses our conventions for input, but + * prescribes no convention for output. + * + * ==========================(LICENSE BEGIN)============================ + * + * Copyright (c) 2007-2010 Projet RNRT SAPHIR + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * ===========================(LICENSE END)============================= + * + * @file sph_panama.h + * @author Thomas Pornin + */ + #ifndef SPH_PANAMA_H__ +#define SPH_PANAMA_H__ + #include +#include "sph_types.h" + /** + * Output size (in bits) for PANAMA. + */ +#define SPH_SIZE_panama 256 + /** + * This structure is a context for PANAMA computations: it contains the + * intermediate values and some data from the last entered block. Once + * a PANAMA computation has been performed, the context can be reused for + * another computation. + * + * The contents of this structure are private. A running PANAMA computation + * can be cloned by copying the context (e.g. with a simple + * memcpy()). + */ +typedef struct { +#ifndef DOXYGEN_IGNORE + unsigned char data[32]; /* first field, for alignment */ + unsigned data_ptr; + sph_u32 buffer[32][8]; + unsigned buffer_ptr; + sph_u32 state[17]; +#endif +} sph_panama_context; + /** + * Initialize a PANAMA context. This process performs no memory allocation. + * + * @param cc the PANAMA context (pointer to a sph_panama_context) + */ +void sph_panama_init(void *cc); + /** + * Process some data bytes. It is acceptable that len is zero + * (in which case this function does nothing). + * + * @param cc the PANAMA context + * @param data the input data + * @param len the input data length (in bytes) + */ +void sph_panama(void *cc, const void *data, size_t len); + /** + * Terminate the current PANAMA computation and output the result into the + * provided buffer. The destination buffer must be wide enough to + * accomodate the result (32 bytes). The context is automatically + * reinitialized. + * + * @param cc the PANAMA context + * @param dst the destination buffer + */ +void sph_panama_close(void *cc, void *dst); + #endif From a12c16efa3977ec3f402617343776fc684987f92 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Fri, 22 Nov 2019 18:27:01 -0500 Subject: [PATCH 516/576] some updates some updates --- stratum/coinbase.cpp | 81 ++-- stratum/coinbase.cpp.bak | 11 +- web/yaamp/models/db_coinsModel.php | 2 +- web/yaamp/models/db_coinsModel.php.bak | 126 ++++++ web/yaamp/modules/site/coin_form.php | 10 +- web/yaamp/modules/site/coin_form.php.bak | 511 +++++++++++++++++++++++ 6 files changed, 692 insertions(+), 49 deletions(-) create mode 100644 web/yaamp/models/db_coinsModel.php.bak create mode 100644 web/yaamp/modules/site/coin_form.php.bak diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index c3d2ffa33..d9e84ec0b 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1092,45 +1092,48 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - if(strcmp(coind->symbol, "SIN") == 0) - { - int npayees = 1; - char payees[2]; - char sinpayee[256] = {0}; - char sinscript[1024] = {0}; - char devpayee[256] = {0}; - char devscript[1024] = {0}; - const char *devpayaddr = json_get_string(json_result, "payee"); - json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); - snprintf(devpayee, 255, "%s", devpayaddr); - base58_decode(devpayee, devscript); - npayees++; - - available -= devfee_amount; - const char* mnpayaddrs[7] = {0}; - json_value* masternodes = json_get_array(json_result, "masternode"); - json_int_t mnamounts[7] = {0}; - for(int i = 0; i < masternodes->u.array.length; i++) { - mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); - mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); - available -= mnamounts[i]; - npayees++; - } - - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); - for(int i = 0; i < masternodes->u.array.length; i++) { - snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); - base58_decode(sinpayee, sinscript); - job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); - } - - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available/100000000; - return; - } + else if(strcmp(coind->symbol, "SIN") == 0) { + + char dests[2048] = { 0 }; + // these just get reused char sinpayee[256] = { 0 }; + int npayees = 1; char sinscript[1024] = { 0 }; + char payees[2]; int npayees = 1; + char sinpayee[256] = {0}; char payees[3]; + char sinscript[1024] = {0}; + char devpayee[256] = {0}; const char *founder = json_get_string(json_result, "payee"); + char devscript[1024] = {0}; json_int_t founderreward = json_get_int(json_result, "payee_amount"); + const char *devpayaddr = json_get_string(json_result, "payee"); if (founder && founderreward) { + json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); snprintf(sinpayee, 255, "%s", founder); + + base58_decode(sinpayee, sinscript); + // prepare devpay script available -= founderreward; + snprintf(devpayee, 255, "%s", devpayaddr); npayees++; + base58_decode(devpayee, devscript); job_pack_tx(coind, dests, founderreward, sinscript); + npayees++; } + available -= devfee_amount; + + json_value* masternodes = json_get_array(json_result, "masternode"); + // masternode packs bool started = json_get_bool(json_result, "masternode_payments_started"); + const char* mnpayaddrs[7] = {0}; if (started && masternodes->u.array.length) for (int i = 0; i < masternodes->u.array.length; i++) { + json_value* masternodes = json_get_array(json_result, "masternode"); const char *payee = json_get_string(masternodes->u.array.values[i], "payee"); + json_int_t mnamounts[7] = {0}; json_int_t amount = json_get_int(masternodes->u.array.values[i], "amount"); + for(int i = 0; i < masternodes->u.array.length; i++) { if (payee && amount) { + mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); snprintf(sinpayee, 255, "%s", payee); + mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); base58_decode(sinpayee, sinscript); + available -= mnamounts[i]; available -= amount; + npayees++; npayees++; + } job_pack_tx(coind, dests, amount, sinscript); + + } + sprintf(payees, "%02x", npayees); } + strcat(templ->coinb2, payees); sprintf(payees, "%02x", npayees); + job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); job_pack_tx(coind, templ->coinb2, available, NULL); + for(int i = 0; i < masternodes->u.array.length; i++) { strcat(templ->coinb2, dests); + snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); strcat(templ->coinb2, "00000000"); + base58_decode(sinpayee, sinscript); coind->reward = (double)available / 100000000; + job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); return; + } } if(strcmp(coind->symbol, "BITC") == 0) { diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak index 4950addeb..c3d2ffa33 100644 --- a/stratum/coinbase.cpp.bak +++ b/stratum/coinbase.cpp.bak @@ -1092,9 +1092,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - if(strcmp(coind->symbol, "SIN") == 0) { - - // these just get reused + if(strcmp(coind->symbol, "SIN") == 0) + { int npayees = 1; char payees[2]; char sinpayee[256] = {0}; @@ -1103,14 +1102,11 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char devscript[1024] = {0}; const char *devpayaddr = json_get_string(json_result, "payee"); json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); - - // prepare devpay script snprintf(devpayee, 255, "%s", devpayaddr); base58_decode(devpayee, devscript); npayees++; - available -= devfee_amount; - // masternode packs + available -= devfee_amount; const char* mnpayaddrs[7] = {0}; json_value* masternodes = json_get_array(json_result, "masternode"); json_int_t mnamounts[7] = {0}; @@ -1131,7 +1127,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); } - // sequence strcat(templ->coinb2, "00000000"); coind->reward = (double)available/100000000; return; diff --git a/web/yaamp/models/db_coinsModel.php b/web/yaamp/models/db_coinsModel.php index e41f7db70..c9ff57c9b 100644 --- a/web/yaamp/models/db_coinsModel.php +++ b/web/yaamp/models/db_coinsModel.php @@ -55,7 +55,7 @@ public function attributeLabels() 'market' => 'Preferred market', 'rpcencoding' => 'RPC Type', 'dedicatedport' => 'Dedicated Port', - 'specifications'=> 'AddNodes' + 'specifications'=> 'Additional Config Parameters' ); } diff --git a/web/yaamp/models/db_coinsModel.php.bak b/web/yaamp/models/db_coinsModel.php.bak new file mode 100644 index 000000000..e41f7db70 --- /dev/null +++ b/web/yaamp/models/db_coinsModel.php.bak @@ -0,0 +1,126 @@ + 'Official Symbol', + 'auxpow' => 'AUX PoW', + 'dontsell' => 'Don\'t sell', + 'sellonbid' => 'Sell on Bid', + 'txfee' => 'Tx Fee', + 'program' => 'Process name', + 'conf_folder' => 'Conf. folder', + 'mature_blocks' => 'PoW Confirmations', + 'powend_height' => 'End of PoW', + 'rpchost' => 'RPC Host', + 'rpcport' => 'RPC Port', + 'rpcuser' => 'RPC User', + 'rpcpasswd' => 'RPC Password', + 'rpccurl' => 'RPC via curl', + 'rpcssl' => 'RPC SSL', + 'rpccert' => 'RPC Certificate', + 'serveruser' => 'Server user', + 'hasgetinfo' => 'Has getinfo', + 'hassubmitblock'=> 'Has submitblock', + 'hasmasternodes'=> 'Masternodes', + 'usesegwit' => 'Use segwit', + 'usefaucet' => 'Use Faucet', + 'market' => 'Preferred market', + 'rpcencoding' => 'RPC Type', + 'dedicatedport' => 'Dedicated Port', + 'specifications'=> 'AddNodes' + ); + } + + public function getOfficialSymbol() + { + if(!empty($this->symbol2)) + return $this->symbol2; + else + return $this->symbol; + } + + public function getSymbol_show() + { + // virtual property $coin->symbol_show + return $this->getOfficialSymbol(); + } + + public function deleteDeps() + { + $coin = $this; + $ids_query = "(SELECT id FROM accounts WHERE coinid=".$coin->id.")"; + + dborun("DELETE FROM balanceuser WHERE userid IN $ids_query"); + dborun("DELETE FROM hashuser WHERE userid IN $ids_query"); + dborun("DELETE FROM shares WHERE userid IN $ids_query"); + dborun("DELETE FROM workers WHERE userid IN $ids_query"); + dborun("DELETE FROM payouts WHERE account_id IN $ids_query"); + + dborun("DELETE FROM blocks WHERE coin_id=".$coin->id); + dborun("DELETE FROM shares WHERE coinid=".$coin->id); + dborun("DELETE FROM earnings WHERE coinid=".$coin->id); + dborun("DELETE FROM notifications WHERE idcoin=".$coin->id); + dborun("DELETE FROM market_history WHERE idcoin=".$coin->id); + dborun("DELETE FROM markets WHERE coinid=".$coin->id); + + dborun("DELETE FROM accounts WHERE coinid=".$coin->id); + } + + public function deleteWithDeps() + { + $this->deleteDeps(); + return $this->delete(); + } + + /** + * Link for txs + * @param string $label link content + * @param array $params 'height'=>123 or 'hash'=>'xxx' or 'txid'=>'xxx' + * @param array $htmlOptions target/title ... + */ + public function createExplorerLink($label, $params=array(), $htmlOptions=array(), $force=false) + { + if($this->id == 6 && isset($params['txid'])) { + // BTC txid + $url = 'https://blockchain.info/tx/'.$params['txid']; + $htmlOpts = array_merge(array('target'=>'_blank'), $htmlOptions); + return CHtml::link($label, $url, $htmlOpts); + } + else if (YIIMP_PUBLIC_EXPLORER || $force || user()->getState('yaamp_admin')) { + $urlParams = array_merge(array('id'=>$this->id), $params); + Yii::import('application.modules.explorer.ExplorerController'); + $url = ExplorerController::createUrl('/explorer', $urlParams); + return CHtml::link($label, trim($url,'?'), $htmlOptions); + } + return $label; + } + +} diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index e17054045..52989a29a 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -374,7 +374,15 @@ echo CUFHtml::openActiveCtrlHolder($coin, 'specifications'); echo CUFHtml::activeLabelEx($coin, 'specifications'); echo CUFHtml::activeTextArea($coin, 'specifications', array('maxlength'=>1048,'lines'=>35,'style'=>'width: 200px;')); -echo '

    Max 35 limit

    '; +echo "

    Additional Config Settings:
    "; +echo "
    "; +echo "deprecatedrpc=accounts
    "; +echo "addnode=x.x.x.x
    "; +echo "algo=x
    "; +echo "
    "; +echo "Max 35 line limit
    "; +echo "
    "; +echo "Once all new parameters are added, you need to hit save and reload the page for the autogenerated config to update.

    "; echo CUFHtml::closeCtrlHolder(); if(empty($coin->id)) diff --git a/web/yaamp/modules/site/coin_form.php.bak b/web/yaamp/modules/site/coin_form.php.bak new file mode 100644 index 000000000..e17054045 --- /dev/null +++ b/web/yaamp/modules/site/coin_form.php.bak @@ -0,0 +1,511 @@ +id}'>{$coin->name}
    "; + +$this->widget('UniForm'); + +echo CUFHtml::beginForm(); +echo CUFHtml::errorSummary($coin); +echo CUFHtml::openTag('fieldset', array('class'=>'inlineLabels')); + +InitMenuTabs('#tabs'); + +echo << +[readonly~=readonly] { + color: gray; +} + +

    +end; + +echo '
    '; + +echo CUFHtml::openActiveCtrlHolder($coin, 'name'); +echo CUFHtml::activeLabelEx($coin, 'name'); +echo CUFHtml::activeTextField($coin, 'name', array('maxlength'=>200)); +echo '

    Required

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'symbol'); +echo CUFHtml::activeLabelEx($coin, 'symbol'); +echo CUFHtml::activeTextField($coin, 'symbol', array('maxlength'=>200,'style'=>'width: 120px;')); +echo '

    Required all upper case

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'symbol2'); +echo CUFHtml::activeLabelEx($coin, 'symbol2'); +echo CUFHtml::activeTextField($coin, 'symbol2', array('maxlength'=>200,'style'=>'width: 120px;')); +echo '

    Set it if symbol is different

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'algo'); +echo CUFHtml::activeLabelEx($coin, 'algo'); +echo CUFHtml::activeTextField($coin, 'algo', array('maxlength'=>64,'style'=>'width: 120px;')); +echo '

    Required all lower case

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'image'); +echo CUFHtml::activeLabelEx($coin, 'image'); +echo CUFHtml::activeTextField($coin, 'image', array('maxlength'=>200)); +echo '

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'payout_min'); +echo CUFHtml::activeLabelEx($coin, 'payout_min'); +echo CUFHtml::activeTextField($coin, 'payout_min', array('maxlength'=>200,'style'=>'width: 120px;')); +echo '

    Pay users when they reach this amount

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'payout_max'); +echo CUFHtml::activeLabelEx($coin, 'payout_max'); +echo CUFHtml::activeTextField($coin, 'payout_max', array('maxlength'=>200,'style'=>'width: 120px;')); +echo '

    Maximum transaction amount

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'txfee'); +echo CUFHtml::activeLabelEx($coin, 'txfee'); +echo CUFHtml::activeTextField($coin, 'txfee', array('maxlength'=>200,'style'=>'width: 100px;','readonly'=>'readonly')); +echo '

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'block_height'); +echo CUFHtml::activeLabelEx($coin, 'block_height'); +echo CUFHtml::activeTextField($coin, 'block_height', array('readonly'=>'readonly','style'=>'width: 120px;')); +echo '

    Current height

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'target_height'); +echo CUFHtml::activeLabelEx($coin, 'target_height'); +echo CUFHtml::activeTextField($coin, 'target_height', array('maxlength'=>32,'style'=>'width: 120px;')); +echo '

    Known height of the network

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'powend_height'); +echo CUFHtml::activeLabelEx($coin, 'powend_height'); +echo CUFHtml::activeTextField($coin, 'powend_height', array('maxlength'=>32,'style'=>'width: 120px;')); +echo '

    Height of the end of PoW mining

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'mature_blocks'); +echo CUFHtml::activeLabelEx($coin, 'mature_blocks'); +echo CUFHtml::activeTextField($coin, 'mature_blocks', array('maxlength'=>32,'style'=>'width: 120px;')); +echo '

    Required block count to mature

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'block_time'); +echo CUFHtml::activeLabelEx($coin, 'block_time'); +echo CUFHtml::activeTextField($coin, 'block_time', array('maxlength'=>32,'style'=>'width: 120px;')); +echo '

    Average block time (sec)

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'errors'); +echo CUFHtml::activeLabelEx($coin, 'errors'); +echo CUFHtml::activeTextField($coin, 'errors', array('maxlength'=>200,'readonly'=>'readonly','style'=>'width: 600px;')); +echo CUFHtml::closeCtrlHolder(); + +echo "
    "; + +////////////////////////////////////////////////////////////////////////////////////////// + +echo '
    '; + +echo CUFHtml::openActiveCtrlHolder($coin, 'enable'); +echo CUFHtml::activeLabelEx($coin, 'enable'); +echo CUFHtml::activeCheckBox($coin, 'enable'); +echo '

    Required

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'auto_ready'); +echo CUFHtml::activeLabelEx($coin, 'auto_ready'); +echo CUFHtml::activeCheckBox($coin, 'auto_ready'); +echo '

    Allowed to mine

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'visible'); +echo CUFHtml::activeLabelEx($coin, 'visible'); +echo CUFHtml::activeCheckBox($coin, 'visible'); +echo '

    Visibility for the public

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'installed'); +echo CUFHtml::activeLabelEx($coin, 'installed'); +echo CUFHtml::activeCheckBox($coin, 'installed'); +echo '

    Required to be visible in the Wallets board

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'no_explorer'); +echo CUFHtml::activeLabelEx($coin, 'no_explorer'); +echo CUFHtml::activeCheckBox($coin, 'no_explorer'); +echo '

    Disable block explorer for the public

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'watch'); +echo CUFHtml::activeLabelEx($coin, 'watch'); +echo CUFHtml::activeCheckBox($coin, 'watch'); +echo '

    Track balance and markets history

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'auxpow'); +echo CUFHtml::activeLabelEx($coin, 'auxpow'); +echo CUFHtml::activeCheckBox($coin, 'auxpow'); +echo '

    Merged mining

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'max_miners'); +echo CUFHtml::activeLabelEx($coin, 'max_miners'); +echo CUFHtml::activeTextField($coin, 'max_miners', array('maxlength'=>32,'style'=>'width: 120px;')); +echo '

    Miners allowed by the stratum

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'max_shares'); +echo CUFHtml::activeLabelEx($coin, 'max_shares'); +echo CUFHtml::activeTextField($coin, 'max_shares', array('maxlength'=>32,'style'=>'width: 120px;')); +echo '

    Auto restart stratum after this amount of shares

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'master_wallet'); +echo CUFHtml::activeLabelEx($coin, 'master_wallet'); +echo CUFHtml::activeTextField($coin, 'master_wallet', array('maxlength'=>200)); +echo '

    The pool wallet address

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'reward'); +echo CUFHtml::activeLabelEx($coin, 'reward'); +echo CUFHtml::activeTextField($coin, 'reward', array('maxlength'=>200,'readonly'=>'readonly','style'=>'width: 120px;')); +echo '

    PoW block value

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'reward_mul'); +echo CUFHtml::activeLabelEx($coin, 'reward_mul'); +echo CUFHtml::activeTextField($coin, 'reward_mul', array('maxlength'=>200,'style'=>'width: 120px;')); +echo '

    Adjust the block reward if incorrect

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'charity_percent'); +echo CUFHtml::activeLabelEx($coin, 'charity_percent'); +echo CUFHtml::activeTextField($coin, 'charity_percent', array('maxlength'=>10,'style'=>'width: 30px;')); +echo '

    Reward for foundation or dev fees, generally between 1 and 10 %

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'charity_address'); +echo CUFHtml::activeLabelEx($coin, 'charity_address'); +echo CUFHtml::activeTextField($coin, 'charity_address', array('maxlength'=>200)); +echo '

    Foundation address if "dev fees" are required

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'hasgetinfo'); +echo CUFHtml::activeLabelEx($coin, 'hasgetinfo'); +echo CUFHtml::activeCheckBox($coin, 'hasgetinfo'); +echo '

    Enable if getinfo rpc method is present

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'hassubmitblock'); +echo CUFHtml::activeLabelEx($coin, 'hassubmitblock'); +echo CUFHtml::activeCheckBox($coin, 'hassubmitblock'); +echo '

    Enable if submitblock method is present

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'txmessage'); +echo CUFHtml::activeLabelEx($coin, 'txmessage'); +echo CUFHtml::activeCheckBox($coin, 'txmessage'); +echo '

    Block template with a tx message

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'hasmasternodes'); +echo CUFHtml::activeLabelEx($coin, 'hasmasternodes'); +echo CUFHtml::activeCheckBox($coin, 'hasmasternodes'); +echo '

    Require "payee" and "payee_amount", or masternode object in getblocktemplate

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'usesegwit'); +echo CUFHtml::activeLabelEx($coin, 'usesegwit'); +echo CUFHtml::activeCheckBox($coin, 'usesegwit'); +echo '

    '; +echo CUFHtml::closeCtrlHolder(); + +echo "
    "; + +////////////////////////////////////////////////////////////////////////////////////////// + +echo '
    '; + +echo CUFHtml::openActiveCtrlHolder($coin, 'dontsell'); +echo CUFHtml::activeLabelEx($coin, 'dontsell'); +echo CUFHtml::activeCheckBox($coin, 'dontsell'); +echo '

    Disable auto send to exchange

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'sellonbid'); +echo CUFHtml::activeLabelEx($coin, 'sellonbid'); +echo CUFHtml::activeCheckBox($coin, 'sellonbid'); +echo '

    Reduce the sell price on exchanges

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'market'); +echo CUFHtml::activeLabelEx($coin, 'market'); +echo CUFHtml::activeTextField($coin, 'market', array('maxlength'=>128,'style'=>'width: 180px;')); +echo '

    Selected exchange

    '; +echo CUFHtml::closeCtrlHolder(); + +if (empty($coin->price) || empty($coin->market) || $coin->market == 'unknown') { + + echo CUFHtml::openActiveCtrlHolder($coin, 'price'); + echo CUFHtml::activeLabelEx($coin, 'price'); + echo CUFHtml::activeTextField($coin, 'price', array('maxlength'=>16,'style'=>'width: 180px;')); + echo '

    Manually set the BTC price if missing

    '; + echo CUFHtml::closeCtrlHolder(); + +} + +echo '
    '; + +////////////////////////////////////////////////////////////////////////////////////////// + +echo '
    '; + +echo CUFHtml::openActiveCtrlHolder($coin, 'program'); +echo CUFHtml::activeLabelEx($coin, 'program'); +echo CUFHtml::activeTextField($coin, 'program', array('maxlength'=>128,'style'=>'width: 180px;')); +echo '

    Daemon Name - I.e. bitcoind

    '; +echo CUFHtml::closeCtrlHolder(); + +if(empty($coin->program)){ +echo CUFHtml::openActiveCtrlHolder($coin, 'conf_folder'); +echo CUFHtml::activeLabelEx($coin, 'conf_folder'); +echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>228,'readonly'=>'readonly')); +echo '

    Field will automatically update on save.

    '; +echo CUFHtml::closeCtrlHolder();} + +else +if(empty($coin->conf_folder)){ +$program = substr($coin->program, 0, -1); +$coin->conf_folder = "/home/crypto-data/wallets/.$program"; +echo CUFHtml::openActiveCtrlHolder($coin, 'conf_folder'); +echo CUFHtml::activeLabelEx($coin, 'conf_folder'); +echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>228,'readonly'=>'readonly')); +echo '

    Field will automatically update on save.

    '; +echo CUFHtml::closeCtrlHolder();} + +echo CUFHtml::openActiveCtrlHolder($coin, 'rpchost'); +echo CUFHtml::activeLabelEx($coin, 'rpchost'); +echo CUFHtml::activeTextField($coin, 'rpchost', array('maxlength'=>128,'style'=>'width: 180px;')); +echo '

    I.e. 127.0.0.1 WireGuard use 10.0.0.x or Internal IP from host

    '; +echo CUFHtml::closeCtrlHolder(); + +if(empty($coin->rpcport)) + $coin->rpcport = $coin->id*10; + +echo CUFHtml::openActiveCtrlHolder($coin, 'rpcport'); +echo CUFHtml::activeLabelEx($coin, 'rpcport'); +echo CUFHtml::activeTextField($coin, 'rpcport', array('maxlength'=>5,'style'=>'width: 60px;')); +echo '

    AutoGenerated

    '; +echo CUFHtml::closeCtrlHolder(); + +if(empty($coin->rpcuser)) + $coin->rpcuser = 'yiimprpc'; + +echo CUFHtml::openActiveCtrlHolder($coin, 'rpcuser'); +echo CUFHtml::activeLabelEx($coin, 'rpcuser'); +echo CUFHtml::activeTextField($coin, 'rpcuser', array('maxlength'=>128,'style'=>'width: 180px;')); +echo '

    AutoGenerated

    '; +echo CUFHtml::closeCtrlHolder(); + +// generate a random password +if(empty($coin->rpcpasswd)) + $coin->rpcpasswd = preg_replace("|[^\w]|m",'',base64_encode(pack("H*",md5("".time().YAAMP_SITE_URL)))); + +echo CUFHtml::openActiveCtrlHolder($coin, 'rpcpasswd'); +echo CUFHtml::activeLabelEx($coin, 'rpcpasswd'); +echo CUFHtml::activeTextField($coin, 'rpcpasswd', array('maxlength'=>128)); +echo '

    AutoGenerated

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'serveruser'); +echo CUFHtml::activeLabelEx($coin, 'serveruser'); +echo CUFHtml::activeTextField($coin, 'serveruser', array('maxlength'=>35,'style'=>'width: 180px;')); +echo '

    Leave Blank

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'rpcencoding'); +echo CUFHtml::activeLabelEx($coin, 'rpcencoding'); +echo CUFHtml::activeTextField($coin, 'rpcencoding', array('maxlength'=>5,'style'=>'width: 60px;')); +echo '

    POW/POS

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'dedicatedport'); +echo CUFHtml::activeLabelEx($coin, 'dedicatedport'); +echo CUFHtml::activeTextField($coin, 'dedicatedport', array('maxlength'=>5,'style'=>'width: 60px;')); +echo '

    Run addport to get Port Number, leave blank if not using dedicated coin ports.

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'rpccurl'); +echo CUFHtml::activeLabelEx($coin, 'rpccurl'); +echo CUFHtml::activeCheckBox($coin, 'rpccurl'); +echo '

    Force the stratum to use curl for RPC

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'rpcssl'); +echo CUFHtml::activeLabelEx($coin, 'rpcssl'); +echo CUFHtml::activeCheckBox($coin, 'rpcssl'); +echo '

    Wallet RPC secured via SSL

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'rpccert'); +echo CUFHtml::activeLabelEx($coin, 'rpccert'); +echo CUFHtml::activeTextField($coin, 'rpccert'); +echo "

    Certificat file for RPC via SSL

    "; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'account'); +echo CUFHtml::activeLabelEx($coin, 'account'); +echo CUFHtml::activeTextField($coin, 'account', array('maxlength'=>128,'style'=>'width: 180px;')); +echo '

    Leave Blank

    '; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'specifications'); +echo CUFHtml::activeLabelEx($coin, 'specifications'); +echo CUFHtml::activeTextArea($coin, 'specifications', array('maxlength'=>1048,'lines'=>35,'style'=>'width: 200px;')); +echo '

    Max 35 limit

    '; +echo CUFHtml::closeCtrlHolder(); + +if(empty($coin->id)) +if(empty($coin->program)){ +echo CHtml::tag("hr"); +echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; +} + +if ($coin->id) { +if(empty($coin->program)){ +echo CHtml::tag("hr"); +echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; +} +else { +$program = substr($coin->program, 0, -1); +echo CHtml::tag("hr"); +echo "Autogenerated config - if using daemonbuilder copy from rpcuser through blocknotify line\n"; +echo "If you manually built a coin without daemonbuilder, copy this entire section:\n"; +echo CHtml::opentag("pre"); +echo "mkdir -p {$coin->conf_folder}\n"; +$port = getAlgoPort($coin->algo); +$dedport = $coin->dedicatedport; +echo "echo '\n"; +echo " \n"; +echo "rpcuser={$coin->rpcuser}\n"; +echo "rpcpassword={$coin->rpcpasswd}\n"; +echo "rpcport={$coin->rpcport}\n"; +echo "rpcthreads=64\n"; +echo "rpcallowip=127.0.0.1\n"; +echo "# onlynet=ipv4\n"; +echo "maxconnections=12\n"; +echo "daemon=1\n"; +echo "gen=0\n"; +if(empty($coin->specifications)){ +echo "\n"; +} +else { +echo "{$coin->specifications}\n"; +echo "\n"; +} +echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; +if (empty($coin->dedicatedport)) { +echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n";} +else { +echo "blocknotify=blocknotify 127.0.0.1:$dedport {$coin->id} %s\n";} +echo " \n"; +echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; +echo CHtml::closetag("pre"); + +echo CHtml::tag("hr"); +echo "Add coind to system startup (cron):"; +echo CHtml::opentag("pre"); +echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; +echo "\n"; +echo '

    add -reindex if coin fails to start.

    '; +echo CHtml::closetag("pre"); + +echo CHtml::tag("hr"); +echo "Daemon Commands:"; +echo "You MUST use this format or coins will not work!:"; +echo CHtml::opentag("pre"); +echo "To START a coind:\n"; +echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n\n"; +echo "To STOP a coind:\n"; +echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; +echo "Or if your coin has a -cli (bitcoin-cli) file...\n"; +echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; +echo "To run other CLI functions:\n"; +echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n\n"; +echo " \n"; +echo "To edit the coin.config file:\n"; +echo "sudo nano {$coin->conf_folder}/$program.conf\n"; +echo CHtml::closetag("pre"); + +echo CHtml::tag("hr"); +echo "Miner command line:"; +echo CHtml::opentag("pre"); +echo "-a {$coin->algo} "; +if (empty($coin->dedicatedport)) { +echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' ';} +else{ +echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$dedport.' ';} +echo "-u {$coin->master_wallet} "; +echo "-p c={$coin->symbol} "; +echo "\n"; +echo CHtml::closetag("pre");} +} + +echo "
    "; + + + +////////////////////////////////////////////////////////////////////////////////////////// + +echo '
    '; + +echo CUFHtml::openActiveCtrlHolder($coin, 'link_bitcointalk'); +echo CUFHtml::activeLabelEx($coin, 'link_bitcointalk'); +echo CUFHtml::activeTextField($coin, 'link_bitcointalk'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'link_github'); +echo CUFHtml::activeLabelEx($coin, 'link_github'); +echo CUFHtml::activeTextField($coin, 'link_github'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'link_site'); +echo CUFHtml::activeLabelEx($coin, 'link_site'); +echo CUFHtml::activeTextField($coin, 'link_site'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'link_exchange'); +echo CUFHtml::activeLabelEx($coin, 'link_exchange'); +echo CUFHtml::activeTextField($coin, 'link_exchange'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'link_explorer'); +echo CUFHtml::activeLabelEx($coin, 'link_explorer'); +echo CUFHtml::activeTextField($coin, 'link_explorer'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + +echo "
    "; + + +echo "
    "; + +echo CUFHtml::closeTag('fieldset'); +showSubmitButton($update? 'Save': 'Create'); +echo CUFHtml::endForm(); From 8d72fc2c8f895e4e7dbebccce13974e529c460fc Mon Sep 17 00:00:00 2001 From: cryptopool Date: Fri, 22 Nov 2019 19:54:58 -0500 Subject: [PATCH 517/576] additions additions --- web/yaamp/modules/site/coin_form.php | 47 ++- web/yaamp/modules/site/coin_form.php.bak | 511 ----------------------- 2 files changed, 26 insertions(+), 532 deletions(-) delete mode 100644 web/yaamp/modules/site/coin_form.php.bak diff --git a/web/yaamp/modules/site/coin_form.php b/web/yaamp/modules/site/coin_form.php index 52989a29a..38da37a3f 100644 --- a/web/yaamp/modules/site/coin_form.php +++ b/web/yaamp/modules/site/coin_form.php @@ -341,12 +341,6 @@ echo '

    POW/POS

    '; echo CUFHtml::closeCtrlHolder(); -echo CUFHtml::openActiveCtrlHolder($coin, 'dedicatedport'); -echo CUFHtml::activeLabelEx($coin, 'dedicatedport'); -echo CUFHtml::activeTextField($coin, 'dedicatedport', array('maxlength'=>5,'style'=>'width: 60px;')); -echo '

    Run addport to get Port Number, leave blank if not using dedicated coin ports.

    '; -echo CUFHtml::closeCtrlHolder(); - echo CUFHtml::openActiveCtrlHolder($coin, 'rpccurl'); echo CUFHtml::activeLabelEx($coin, 'rpccurl'); echo CUFHtml::activeCheckBox($coin, 'rpccurl'); @@ -404,7 +398,6 @@ echo CHtml::opentag("pre"); echo "mkdir -p {$coin->conf_folder}\n"; $port = getAlgoPort($coin->algo); -$dedport = $coin->dedicatedport; echo "echo '\n"; echo " \n"; echo "rpcuser={$coin->rpcuser}\n"; @@ -424,10 +417,7 @@ echo "\n"; } echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; -if (empty($coin->dedicatedport)) { -echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n";} -else { -echo "blocknotify=blocknotify 127.0.0.1:$dedport {$coin->id} %s\n";} +echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n"; echo " \n"; echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; echo CHtml::closetag("pre"); @@ -461,10 +451,7 @@ echo "Miner command line:"; echo CHtml::opentag("pre"); echo "-a {$coin->algo} "; -if (empty($coin->dedicatedport)) { -echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' ';} -else{ -echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$dedport.' ';} +echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' '; echo "-u {$coin->master_wallet} "; echo "-p c={$coin->symbol} "; echo "\n"; @@ -479,12 +466,6 @@ echo '
    '; -echo CUFHtml::openActiveCtrlHolder($coin, 'link_bitcointalk'); -echo CUFHtml::activeLabelEx($coin, 'link_bitcointalk'); -echo CUFHtml::activeTextField($coin, 'link_bitcointalk'); -echo "

    "; -echo CUFHtml::closeCtrlHolder(); - echo CUFHtml::openActiveCtrlHolder($coin, 'link_github'); echo CUFHtml::activeLabelEx($coin, 'link_github'); echo CUFHtml::activeTextField($coin, 'link_github'); @@ -497,6 +478,30 @@ echo "

    "; echo CUFHtml::closeCtrlHolder(); +echo CUFHtml::openActiveCtrlHolder($coin, 'link_bitcointalk'); +echo CUFHtml::activeLabelEx($coin, 'link_bitcointalk'); +echo CUFHtml::activeTextField($coin, 'link_bitcointalk'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'link_twitter'); +echo CUFHtml::activeLabelEx($coin, 'link_twitter'); +echo CUFHtml::activeTextField($coin, 'link_twitter'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'link_facebook'); +echo CUFHtml::activeLabelEx($coin, 'link_facebook'); +echo CUFHtml::activeTextField($coin, 'link_facebook'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + +echo CUFHtml::openActiveCtrlHolder($coin, 'link_discord'); +echo CUFHtml::activeLabelEx($coin, 'link_discord'); +echo CUFHtml::activeTextField($coin, 'link_discord'); +echo "

    "; +echo CUFHtml::closeCtrlHolder(); + echo CUFHtml::openActiveCtrlHolder($coin, 'link_exchange'); echo CUFHtml::activeLabelEx($coin, 'link_exchange'); echo CUFHtml::activeTextField($coin, 'link_exchange'); diff --git a/web/yaamp/modules/site/coin_form.php.bak b/web/yaamp/modules/site/coin_form.php.bak deleted file mode 100644 index e17054045..000000000 --- a/web/yaamp/modules/site/coin_form.php.bak +++ /dev/null @@ -1,511 +0,0 @@ -id}'>{$coin->name}
    "; - -$this->widget('UniForm'); - -echo CUFHtml::beginForm(); -echo CUFHtml::errorSummary($coin); -echo CUFHtml::openTag('fieldset', array('class'=>'inlineLabels')); - -InitMenuTabs('#tabs'); - -echo << -[readonly~=readonly] { - color: gray; -} - -

    -end; - -echo '
    '; - -echo CUFHtml::openActiveCtrlHolder($coin, 'name'); -echo CUFHtml::activeLabelEx($coin, 'name'); -echo CUFHtml::activeTextField($coin, 'name', array('maxlength'=>200)); -echo '

    Required

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'symbol'); -echo CUFHtml::activeLabelEx($coin, 'symbol'); -echo CUFHtml::activeTextField($coin, 'symbol', array('maxlength'=>200,'style'=>'width: 120px;')); -echo '

    Required all upper case

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'symbol2'); -echo CUFHtml::activeLabelEx($coin, 'symbol2'); -echo CUFHtml::activeTextField($coin, 'symbol2', array('maxlength'=>200,'style'=>'width: 120px;')); -echo '

    Set it if symbol is different

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'algo'); -echo CUFHtml::activeLabelEx($coin, 'algo'); -echo CUFHtml::activeTextField($coin, 'algo', array('maxlength'=>64,'style'=>'width: 120px;')); -echo '

    Required all lower case

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'image'); -echo CUFHtml::activeLabelEx($coin, 'image'); -echo CUFHtml::activeTextField($coin, 'image', array('maxlength'=>200)); -echo '

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'payout_min'); -echo CUFHtml::activeLabelEx($coin, 'payout_min'); -echo CUFHtml::activeTextField($coin, 'payout_min', array('maxlength'=>200,'style'=>'width: 120px;')); -echo '

    Pay users when they reach this amount

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'payout_max'); -echo CUFHtml::activeLabelEx($coin, 'payout_max'); -echo CUFHtml::activeTextField($coin, 'payout_max', array('maxlength'=>200,'style'=>'width: 120px;')); -echo '

    Maximum transaction amount

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'txfee'); -echo CUFHtml::activeLabelEx($coin, 'txfee'); -echo CUFHtml::activeTextField($coin, 'txfee', array('maxlength'=>200,'style'=>'width: 100px;','readonly'=>'readonly')); -echo '

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'block_height'); -echo CUFHtml::activeLabelEx($coin, 'block_height'); -echo CUFHtml::activeTextField($coin, 'block_height', array('readonly'=>'readonly','style'=>'width: 120px;')); -echo '

    Current height

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'target_height'); -echo CUFHtml::activeLabelEx($coin, 'target_height'); -echo CUFHtml::activeTextField($coin, 'target_height', array('maxlength'=>32,'style'=>'width: 120px;')); -echo '

    Known height of the network

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'powend_height'); -echo CUFHtml::activeLabelEx($coin, 'powend_height'); -echo CUFHtml::activeTextField($coin, 'powend_height', array('maxlength'=>32,'style'=>'width: 120px;')); -echo '

    Height of the end of PoW mining

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'mature_blocks'); -echo CUFHtml::activeLabelEx($coin, 'mature_blocks'); -echo CUFHtml::activeTextField($coin, 'mature_blocks', array('maxlength'=>32,'style'=>'width: 120px;')); -echo '

    Required block count to mature

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'block_time'); -echo CUFHtml::activeLabelEx($coin, 'block_time'); -echo CUFHtml::activeTextField($coin, 'block_time', array('maxlength'=>32,'style'=>'width: 120px;')); -echo '

    Average block time (sec)

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'errors'); -echo CUFHtml::activeLabelEx($coin, 'errors'); -echo CUFHtml::activeTextField($coin, 'errors', array('maxlength'=>200,'readonly'=>'readonly','style'=>'width: 600px;')); -echo CUFHtml::closeCtrlHolder(); - -echo "
    "; - -////////////////////////////////////////////////////////////////////////////////////////// - -echo '
    '; - -echo CUFHtml::openActiveCtrlHolder($coin, 'enable'); -echo CUFHtml::activeLabelEx($coin, 'enable'); -echo CUFHtml::activeCheckBox($coin, 'enable'); -echo '

    Required

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'auto_ready'); -echo CUFHtml::activeLabelEx($coin, 'auto_ready'); -echo CUFHtml::activeCheckBox($coin, 'auto_ready'); -echo '

    Allowed to mine

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'visible'); -echo CUFHtml::activeLabelEx($coin, 'visible'); -echo CUFHtml::activeCheckBox($coin, 'visible'); -echo '

    Visibility for the public

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'installed'); -echo CUFHtml::activeLabelEx($coin, 'installed'); -echo CUFHtml::activeCheckBox($coin, 'installed'); -echo '

    Required to be visible in the Wallets board

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'no_explorer'); -echo CUFHtml::activeLabelEx($coin, 'no_explorer'); -echo CUFHtml::activeCheckBox($coin, 'no_explorer'); -echo '

    Disable block explorer for the public

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'watch'); -echo CUFHtml::activeLabelEx($coin, 'watch'); -echo CUFHtml::activeCheckBox($coin, 'watch'); -echo '

    Track balance and markets history

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'auxpow'); -echo CUFHtml::activeLabelEx($coin, 'auxpow'); -echo CUFHtml::activeCheckBox($coin, 'auxpow'); -echo '

    Merged mining

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'max_miners'); -echo CUFHtml::activeLabelEx($coin, 'max_miners'); -echo CUFHtml::activeTextField($coin, 'max_miners', array('maxlength'=>32,'style'=>'width: 120px;')); -echo '

    Miners allowed by the stratum

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'max_shares'); -echo CUFHtml::activeLabelEx($coin, 'max_shares'); -echo CUFHtml::activeTextField($coin, 'max_shares', array('maxlength'=>32,'style'=>'width: 120px;')); -echo '

    Auto restart stratum after this amount of shares

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'master_wallet'); -echo CUFHtml::activeLabelEx($coin, 'master_wallet'); -echo CUFHtml::activeTextField($coin, 'master_wallet', array('maxlength'=>200)); -echo '

    The pool wallet address

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'reward'); -echo CUFHtml::activeLabelEx($coin, 'reward'); -echo CUFHtml::activeTextField($coin, 'reward', array('maxlength'=>200,'readonly'=>'readonly','style'=>'width: 120px;')); -echo '

    PoW block value

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'reward_mul'); -echo CUFHtml::activeLabelEx($coin, 'reward_mul'); -echo CUFHtml::activeTextField($coin, 'reward_mul', array('maxlength'=>200,'style'=>'width: 120px;')); -echo '

    Adjust the block reward if incorrect

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'charity_percent'); -echo CUFHtml::activeLabelEx($coin, 'charity_percent'); -echo CUFHtml::activeTextField($coin, 'charity_percent', array('maxlength'=>10,'style'=>'width: 30px;')); -echo '

    Reward for foundation or dev fees, generally between 1 and 10 %

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'charity_address'); -echo CUFHtml::activeLabelEx($coin, 'charity_address'); -echo CUFHtml::activeTextField($coin, 'charity_address', array('maxlength'=>200)); -echo '

    Foundation address if "dev fees" are required

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'hasgetinfo'); -echo CUFHtml::activeLabelEx($coin, 'hasgetinfo'); -echo CUFHtml::activeCheckBox($coin, 'hasgetinfo'); -echo '

    Enable if getinfo rpc method is present

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'hassubmitblock'); -echo CUFHtml::activeLabelEx($coin, 'hassubmitblock'); -echo CUFHtml::activeCheckBox($coin, 'hassubmitblock'); -echo '

    Enable if submitblock method is present

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'txmessage'); -echo CUFHtml::activeLabelEx($coin, 'txmessage'); -echo CUFHtml::activeCheckBox($coin, 'txmessage'); -echo '

    Block template with a tx message

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'hasmasternodes'); -echo CUFHtml::activeLabelEx($coin, 'hasmasternodes'); -echo CUFHtml::activeCheckBox($coin, 'hasmasternodes'); -echo '

    Require "payee" and "payee_amount", or masternode object in getblocktemplate

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'usesegwit'); -echo CUFHtml::activeLabelEx($coin, 'usesegwit'); -echo CUFHtml::activeCheckBox($coin, 'usesegwit'); -echo '

    '; -echo CUFHtml::closeCtrlHolder(); - -echo "
    "; - -////////////////////////////////////////////////////////////////////////////////////////// - -echo '
    '; - -echo CUFHtml::openActiveCtrlHolder($coin, 'dontsell'); -echo CUFHtml::activeLabelEx($coin, 'dontsell'); -echo CUFHtml::activeCheckBox($coin, 'dontsell'); -echo '

    Disable auto send to exchange

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'sellonbid'); -echo CUFHtml::activeLabelEx($coin, 'sellonbid'); -echo CUFHtml::activeCheckBox($coin, 'sellonbid'); -echo '

    Reduce the sell price on exchanges

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'market'); -echo CUFHtml::activeLabelEx($coin, 'market'); -echo CUFHtml::activeTextField($coin, 'market', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    Selected exchange

    '; -echo CUFHtml::closeCtrlHolder(); - -if (empty($coin->price) || empty($coin->market) || $coin->market == 'unknown') { - - echo CUFHtml::openActiveCtrlHolder($coin, 'price'); - echo CUFHtml::activeLabelEx($coin, 'price'); - echo CUFHtml::activeTextField($coin, 'price', array('maxlength'=>16,'style'=>'width: 180px;')); - echo '

    Manually set the BTC price if missing

    '; - echo CUFHtml::closeCtrlHolder(); - -} - -echo '
    '; - -////////////////////////////////////////////////////////////////////////////////////////// - -echo '
    '; - -echo CUFHtml::openActiveCtrlHolder($coin, 'program'); -echo CUFHtml::activeLabelEx($coin, 'program'); -echo CUFHtml::activeTextField($coin, 'program', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    Daemon Name - I.e. bitcoind

    '; -echo CUFHtml::closeCtrlHolder(); - -if(empty($coin->program)){ -echo CUFHtml::openActiveCtrlHolder($coin, 'conf_folder'); -echo CUFHtml::activeLabelEx($coin, 'conf_folder'); -echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>228,'readonly'=>'readonly')); -echo '

    Field will automatically update on save.

    '; -echo CUFHtml::closeCtrlHolder();} - -else -if(empty($coin->conf_folder)){ -$program = substr($coin->program, 0, -1); -$coin->conf_folder = "/home/crypto-data/wallets/.$program"; -echo CUFHtml::openActiveCtrlHolder($coin, 'conf_folder'); -echo CUFHtml::activeLabelEx($coin, 'conf_folder'); -echo CUFHtml::activeTextField($coin, 'conf_folder', array('maxlength'=>228,'readonly'=>'readonly')); -echo '

    Field will automatically update on save.

    '; -echo CUFHtml::closeCtrlHolder();} - -echo CUFHtml::openActiveCtrlHolder($coin, 'rpchost'); -echo CUFHtml::activeLabelEx($coin, 'rpchost'); -echo CUFHtml::activeTextField($coin, 'rpchost', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    I.e. 127.0.0.1 WireGuard use 10.0.0.x or Internal IP from host

    '; -echo CUFHtml::closeCtrlHolder(); - -if(empty($coin->rpcport)) - $coin->rpcport = $coin->id*10; - -echo CUFHtml::openActiveCtrlHolder($coin, 'rpcport'); -echo CUFHtml::activeLabelEx($coin, 'rpcport'); -echo CUFHtml::activeTextField($coin, 'rpcport', array('maxlength'=>5,'style'=>'width: 60px;')); -echo '

    AutoGenerated

    '; -echo CUFHtml::closeCtrlHolder(); - -if(empty($coin->rpcuser)) - $coin->rpcuser = 'yiimprpc'; - -echo CUFHtml::openActiveCtrlHolder($coin, 'rpcuser'); -echo CUFHtml::activeLabelEx($coin, 'rpcuser'); -echo CUFHtml::activeTextField($coin, 'rpcuser', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    AutoGenerated

    '; -echo CUFHtml::closeCtrlHolder(); - -// generate a random password -if(empty($coin->rpcpasswd)) - $coin->rpcpasswd = preg_replace("|[^\w]|m",'',base64_encode(pack("H*",md5("".time().YAAMP_SITE_URL)))); - -echo CUFHtml::openActiveCtrlHolder($coin, 'rpcpasswd'); -echo CUFHtml::activeLabelEx($coin, 'rpcpasswd'); -echo CUFHtml::activeTextField($coin, 'rpcpasswd', array('maxlength'=>128)); -echo '

    AutoGenerated

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'serveruser'); -echo CUFHtml::activeLabelEx($coin, 'serveruser'); -echo CUFHtml::activeTextField($coin, 'serveruser', array('maxlength'=>35,'style'=>'width: 180px;')); -echo '

    Leave Blank

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'rpcencoding'); -echo CUFHtml::activeLabelEx($coin, 'rpcencoding'); -echo CUFHtml::activeTextField($coin, 'rpcencoding', array('maxlength'=>5,'style'=>'width: 60px;')); -echo '

    POW/POS

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'dedicatedport'); -echo CUFHtml::activeLabelEx($coin, 'dedicatedport'); -echo CUFHtml::activeTextField($coin, 'dedicatedport', array('maxlength'=>5,'style'=>'width: 60px;')); -echo '

    Run addport to get Port Number, leave blank if not using dedicated coin ports.

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'rpccurl'); -echo CUFHtml::activeLabelEx($coin, 'rpccurl'); -echo CUFHtml::activeCheckBox($coin, 'rpccurl'); -echo '

    Force the stratum to use curl for RPC

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'rpcssl'); -echo CUFHtml::activeLabelEx($coin, 'rpcssl'); -echo CUFHtml::activeCheckBox($coin, 'rpcssl'); -echo '

    Wallet RPC secured via SSL

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'rpccert'); -echo CUFHtml::activeLabelEx($coin, 'rpccert'); -echo CUFHtml::activeTextField($coin, 'rpccert'); -echo "

    Certificat file for RPC via SSL

    "; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'account'); -echo CUFHtml::activeLabelEx($coin, 'account'); -echo CUFHtml::activeTextField($coin, 'account', array('maxlength'=>128,'style'=>'width: 180px;')); -echo '

    Leave Blank

    '; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'specifications'); -echo CUFHtml::activeLabelEx($coin, 'specifications'); -echo CUFHtml::activeTextArea($coin, 'specifications', array('maxlength'=>1048,'lines'=>35,'style'=>'width: 200px;')); -echo '

    Max 35 limit

    '; -echo CUFHtml::closeCtrlHolder(); - -if(empty($coin->id)) -if(empty($coin->program)){ -echo CHtml::tag("hr"); -echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; -} - -if ($coin->id) { -if(empty($coin->program)){ -echo CHtml::tag("hr"); -echo "Configuration information will be displayed after Process Name is entered and saved. Please reload page once completed.\n"; -} -else { -$program = substr($coin->program, 0, -1); -echo CHtml::tag("hr"); -echo "Autogenerated config - if using daemonbuilder copy from rpcuser through blocknotify line\n"; -echo "If you manually built a coin without daemonbuilder, copy this entire section:\n"; -echo CHtml::opentag("pre"); -echo "mkdir -p {$coin->conf_folder}\n"; -$port = getAlgoPort($coin->algo); -$dedport = $coin->dedicatedport; -echo "echo '\n"; -echo " \n"; -echo "rpcuser={$coin->rpcuser}\n"; -echo "rpcpassword={$coin->rpcpasswd}\n"; -echo "rpcport={$coin->rpcport}\n"; -echo "rpcthreads=64\n"; -echo "rpcallowip=127.0.0.1\n"; -echo "# onlynet=ipv4\n"; -echo "maxconnections=12\n"; -echo "daemon=1\n"; -echo "gen=0\n"; -if(empty($coin->specifications)){ -echo "\n"; -} -else { -echo "{$coin->specifications}\n"; -echo "\n"; -} -echo "alertnotify=echo %s | mail -s \"{$coin->name} alert!\" ".YAAMP_ADMIN_EMAIL."\n"; -if (empty($coin->dedicatedport)) { -echo "blocknotify=blocknotify 127.0.0.1:$port {$coin->id} %s\n";} -else { -echo "blocknotify=blocknotify 127.0.0.1:$dedport {$coin->id} %s\n";} -echo " \n"; -echo "' | sudo -E tee {$coin->conf_folder}/$program.conf >/dev/null 2>&1\n"; -echo CHtml::closetag("pre"); - -echo CHtml::tag("hr"); -echo "Add coind to system startup (cron):"; -echo CHtml::opentag("pre"); -echo "(crontab -l 2>/dev/null; echo \"@reboot sleep 60 && {$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\") | crontab -\n"; -echo "\n"; -echo '

    add -reindex if coin fails to start.

    '; -echo CHtml::closetag("pre"); - -echo CHtml::tag("hr"); -echo "Daemon Commands:"; -echo "You MUST use this format or coins will not work!:"; -echo CHtml::opentag("pre"); -echo "To START a coind:\n"; -echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf -daemon -shrinkdebugfile\n\n"; -echo "To STOP a coind:\n"; -echo "{$coin->program} -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; -echo "Or if your coin has a -cli (bitcoin-cli) file...\n"; -echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf stop\n\n"; -echo "To run other CLI functions:\n"; -echo "$program-cli -datadir={$coin->conf_folder} -conf=$program.conf help\n\n"; -echo " \n"; -echo "To edit the coin.config file:\n"; -echo "sudo nano {$coin->conf_folder}/$program.conf\n"; -echo CHtml::closetag("pre"); - -echo CHtml::tag("hr"); -echo "Miner command line:"; -echo CHtml::opentag("pre"); -echo "-a {$coin->algo} "; -if (empty($coin->dedicatedport)) { -echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$port.' ';} -else{ -echo "-o stratum+tcp://".YAAMP_STRATUM_URL.':'.$dedport.' ';} -echo "-u {$coin->master_wallet} "; -echo "-p c={$coin->symbol} "; -echo "\n"; -echo CHtml::closetag("pre");} -} - -echo "
    "; - - - -////////////////////////////////////////////////////////////////////////////////////////// - -echo '
    '; - -echo CUFHtml::openActiveCtrlHolder($coin, 'link_bitcointalk'); -echo CUFHtml::activeLabelEx($coin, 'link_bitcointalk'); -echo CUFHtml::activeTextField($coin, 'link_bitcointalk'); -echo "

    "; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'link_github'); -echo CUFHtml::activeLabelEx($coin, 'link_github'); -echo CUFHtml::activeTextField($coin, 'link_github'); -echo "

    "; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'link_site'); -echo CUFHtml::activeLabelEx($coin, 'link_site'); -echo CUFHtml::activeTextField($coin, 'link_site'); -echo "

    "; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'link_exchange'); -echo CUFHtml::activeLabelEx($coin, 'link_exchange'); -echo CUFHtml::activeTextField($coin, 'link_exchange'); -echo "

    "; -echo CUFHtml::closeCtrlHolder(); - -echo CUFHtml::openActiveCtrlHolder($coin, 'link_explorer'); -echo CUFHtml::activeLabelEx($coin, 'link_explorer'); -echo CUFHtml::activeTextField($coin, 'link_explorer'); -echo "

    "; -echo CUFHtml::closeCtrlHolder(); - -echo "
    "; - - -echo "
    "; - -echo CUFHtml::closeTag('fieldset'); -showSubmitButton($update? 'Save': 'Create'); -echo CUFHtml::endForm(); From 5551120221257bb42cba3b024eeef0eff6fab8d9 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 22 Nov 2019 21:55:57 -0500 Subject: [PATCH 518/576] Update coinbase.cpp --- stratum/coinbase.cpp | 82 +++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 43 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index d9e84ec0b..55981f746 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1092,48 +1092,45 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - else if(strcmp(coind->symbol, "SIN") == 0) { - - char dests[2048] = { 0 }; - // these just get reused char sinpayee[256] = { 0 }; - int npayees = 1; char sinscript[1024] = { 0 }; - char payees[2]; int npayees = 1; - char sinpayee[256] = {0}; char payees[3]; - char sinscript[1024] = {0}; - char devpayee[256] = {0}; const char *founder = json_get_string(json_result, "payee"); - char devscript[1024] = {0}; json_int_t founderreward = json_get_int(json_result, "payee_amount"); - const char *devpayaddr = json_get_string(json_result, "payee"); if (founder && founderreward) { - json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); snprintf(sinpayee, 255, "%s", founder); - - base58_decode(sinpayee, sinscript); - // prepare devpay script available -= founderreward; - snprintf(devpayee, 255, "%s", devpayaddr); npayees++; - base58_decode(devpayee, devscript); job_pack_tx(coind, dests, founderreward, sinscript); - npayees++; } - available -= devfee_amount; - - json_value* masternodes = json_get_array(json_result, "masternode"); - // masternode packs bool started = json_get_bool(json_result, "masternode_payments_started"); - const char* mnpayaddrs[7] = {0}; if (started && masternodes->u.array.length) for (int i = 0; i < masternodes->u.array.length; i++) { - json_value* masternodes = json_get_array(json_result, "masternode"); const char *payee = json_get_string(masternodes->u.array.values[i], "payee"); - json_int_t mnamounts[7] = {0}; json_int_t amount = json_get_int(masternodes->u.array.values[i], "amount"); - for(int i = 0; i < masternodes->u.array.length; i++) { if (payee && amount) { - mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); snprintf(sinpayee, 255, "%s", payee); - mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); base58_decode(sinpayee, sinscript); - available -= mnamounts[i]; available -= amount; - npayees++; npayees++; - } job_pack_tx(coind, dests, amount, sinscript); - - } - sprintf(payees, "%02x", npayees); } - strcat(templ->coinb2, payees); sprintf(payees, "%02x", npayees); - job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); job_pack_tx(coind, templ->coinb2, available, NULL); - for(int i = 0; i < masternodes->u.array.length; i++) { strcat(templ->coinb2, dests); - snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); strcat(templ->coinb2, "00000000"); - base58_decode(sinpayee, sinscript); coind->reward = (double)available / 100000000; - job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); return; - } } + if(strcmp(coind->symbol, "SIN") == 0) + { + int npayees = 1; + char payees[2]; + char sinpayee[256] = {0}; + char sinscript[1024] = {0}; + char devpayee[256] = {0}; + char devscript[1024] = {0}; + const char *devpayaddr = json_get_string(json_result, "payee"); + json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); + snprintf(devpayee, 255, "%s", devpayaddr); + base58_decode(devpayee, devscript); + npayees++; + + available -= devfee_amount; + const char* mnpayaddrs[7] = {0}; + json_value* masternodes = json_get_array(json_result, "masternode"); + json_int_t mnamounts[7] = {0}; + for(int i = 0; i < masternodes->u.array.length; i++) { + mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); + mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); + available -= mnamounts[i]; + npayees++; + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); + for(int i = 0; i < masternodes->u.array.length; i++) { + snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); + base58_decode(sinpayee, sinscript); + job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); + } + + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000; + return; + } if(strcmp(coind->symbol, "BITC") == 0) { @@ -1483,4 +1480,3 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // debuglog("coinb2 %s\n", templ->coinb2); } - From 6aaba7a44328a4e9cdac6e3eb1c51c770dcca4ff Mon Sep 17 00:00:00 2001 From: cryptopool Date: Sun, 24 Nov 2019 15:38:18 -0500 Subject: [PATCH 519/576] Removed .bak files Removed .bak files --- rc.local.bak | 83 - stratum/algos/SWIFFTX/inttypes.h.bak | 35 - stratum/algos/SWIFFTX/stdint.h.bak | 54 - .../gost2015_kuznechik/compact.c.bak | 240 -- .../encryption/salsa20/salsa20.c.bak | 239 -- .../three_fish/libskein_skein.h.bak | 85 - .../hashing/streebog/table/stribog.c.bak | 394 ---- .../hashing/swifft/setup.c.bak | 59 - .../hashing/swifft/swifft.c.bak | 150 -- .../hashing/whirlpool/whirlpool.c.bak | 748 ------ stratum/algos/blake2/blake2-impl.h.bak | 189 -- stratum/algos/blake2/blake2.h.bak | 91 - stratum/algos/blake2/blake2b.c.bak | 306 --- stratum/algos/blake2/blamka-round-opt.h.bak | 471 ---- stratum/algos/blake2/blamka-round-ref.h.bak | 56 - stratum/algos/lyra2v3.c.bak | 67 - stratum/algos/rfv2/rfv2_core.c.bak | 795 ------- stratum/algos/x16rv2.c.bak | 199 -- stratum/algos/x22i.c.bak | 146 -- stratum/algos/x22i.h.bak | 16 - stratum/algos/x25x.c.bak | 174 -- stratum/client.h.bak | 169 -- stratum/client_submit.cpp.bak | 569 ----- stratum/coinbase.cpp.bak | 1483 ------------ stratum/coind_template.cpp.bak | 614 ----- stratum/config.sample/lyra2v3.conf.bak | 15 - stratum/config.sample/x25x.conf.bak | 16 - stratum/job.h.bak | 139 -- stratum/sha3/makefile.bak | 33 - stratum/sha3/sph_panama.h.bak | 108 - web/keys.sample.php.bak | 28 - web/serverconfig.sample.php.bak | 97 - web/yaamp/commands/CoindbCommand.php.bak | 598 ----- web/yaamp/commands/ExchangeCommand.php.bak | 242 -- web/yaamp/core/backend/coins.php.bak | 313 --- web/yaamp/core/backend/markets.php.bak | 2016 ----------------- web/yaamp/core/backend/rawcoins.php.bak | 565 ----- web/yaamp/core/backend/services.php.bak | 242 -- web/yaamp/core/backend/system.php.bak | 355 --- web/yaamp/core/common/libUtil.php.bak | 311 --- web/yaamp/core/exchange/exchange.php.bak | 161 -- web/yaamp/core/exchange/kucoin.php.bak | 162 -- web/yaamp/core/functions/yaamp.php.bak | 721 ------ web/yaamp/core/trading/kucoin_trading.php.bak | 71 - .../core/trading/livecoin_trading.php.bak | 278 --- web/yaamp/core/trading/trading.php.bak | 167 -- web/yaamp/defaultconfig.php.bak | 75 - web/yaamp/models/db_coinsModel.php.bak | 126 -- .../modules/thread/CronjobController.php.bak | 221 -- 49 files changed, 14492 deletions(-) delete mode 100644 rc.local.bak delete mode 100644 stratum/algos/SWIFFTX/inttypes.h.bak delete mode 100644 stratum/algos/SWIFFTX/stdint.h.bak delete mode 100644 stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c.bak delete mode 100644 stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c.bak delete mode 100644 stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h.bak delete mode 100644 stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c.bak delete mode 100644 stratum/algos/binarium_hash_v1/hashing/swifft/setup.c.bak delete mode 100644 stratum/algos/binarium_hash_v1/hashing/swifft/swifft.c.bak delete mode 100644 stratum/algos/binarium_hash_v1/hashing/whirlpool/whirlpool.c.bak delete mode 100644 stratum/algos/blake2/blake2-impl.h.bak delete mode 100644 stratum/algos/blake2/blake2.h.bak delete mode 100644 stratum/algos/blake2/blake2b.c.bak delete mode 100644 stratum/algos/blake2/blamka-round-opt.h.bak delete mode 100644 stratum/algos/blake2/blamka-round-ref.h.bak delete mode 100644 stratum/algos/lyra2v3.c.bak delete mode 100644 stratum/algos/rfv2/rfv2_core.c.bak delete mode 100644 stratum/algos/x16rv2.c.bak delete mode 100644 stratum/algos/x22i.c.bak delete mode 100644 stratum/algos/x22i.h.bak delete mode 100644 stratum/algos/x25x.c.bak delete mode 100644 stratum/client.h.bak delete mode 100644 stratum/client_submit.cpp.bak delete mode 100644 stratum/coinbase.cpp.bak delete mode 100644 stratum/coind_template.cpp.bak delete mode 100644 stratum/config.sample/lyra2v3.conf.bak delete mode 100644 stratum/config.sample/x25x.conf.bak delete mode 100644 stratum/job.h.bak delete mode 100644 stratum/sha3/makefile.bak delete mode 100644 stratum/sha3/sph_panama.h.bak delete mode 100644 web/keys.sample.php.bak delete mode 100644 web/serverconfig.sample.php.bak delete mode 100644 web/yaamp/commands/CoindbCommand.php.bak delete mode 100644 web/yaamp/commands/ExchangeCommand.php.bak delete mode 100644 web/yaamp/core/backend/coins.php.bak delete mode 100644 web/yaamp/core/backend/markets.php.bak delete mode 100644 web/yaamp/core/backend/rawcoins.php.bak delete mode 100644 web/yaamp/core/backend/services.php.bak delete mode 100644 web/yaamp/core/backend/system.php.bak delete mode 100644 web/yaamp/core/common/libUtil.php.bak delete mode 100644 web/yaamp/core/exchange/exchange.php.bak delete mode 100644 web/yaamp/core/exchange/kucoin.php.bak delete mode 100644 web/yaamp/core/functions/yaamp.php.bak delete mode 100644 web/yaamp/core/trading/kucoin_trading.php.bak delete mode 100644 web/yaamp/core/trading/livecoin_trading.php.bak delete mode 100644 web/yaamp/core/trading/trading.php.bak delete mode 100644 web/yaamp/defaultconfig.php.bak delete mode 100644 web/yaamp/models/db_coinsModel.php.bak delete mode 100644 web/yaamp/modules/thread/CronjobController.php.bak diff --git a/rc.local.bak b/rc.local.bak deleted file mode 100644 index 68f8200db..000000000 --- a/rc.local.bak +++ /dev/null @@ -1,83 +0,0 @@ -# -# This script should be linked in your main rc.local -# Will start these screen daemons on server startup -# -# You can include it in your main rc.local with : -# . /work/yiimp/rc.local -# -# If you can't access these screens, double check -# the $HOME var is set to your admin user - -LOG_DIR=/work/yiimp/log -WEB_DIR=/var/web -STRATUM_DIR=/var/stratum - -screen -dmS main $WEB_DIR/main.sh -screen -dmS loop2 $WEB_DIR/loop2.sh -screen -dmS blocks $WEB_DIR/blocks.sh -screen -dmS debug tail -f $LOG_DIR/debug.log - -# Stratum instances (skipped/exit if no .conf) - -screen -dmS c11 $STRATUM_DIR/run.sh c11 -screen -dmS deep $STRATUM_DIR/run.sh deep - -screen -dmS x11 $STRATUM_DIR/run.sh x11 -screen -dmS x11evo $STRATUM_DIR/run.sh x11evo -screen -dmS x13 $STRATUM_DIR/run.sh x13 -#screen -dmS x14 $STRATUM_DIR/run.sh x14 -#screen -dmS x15 $STRATUM_DIR/run.sh x15 -#screen -dmS x16r $STRATUM_DIR/run.sh x16r -screen -dmS x17 $STRATUM_DIR/run.sh x17 -screen -dmS xevan $STRATUM_DIR/run.sh xevan -screen -dmS timetravel $STRATUM_DIR/run.sh timetravel -screen -dmS bitcore $STRATUM_DIR/run.sh bitcore -screen -dmS hmq1725 $STRATUM_DIR/run.sh hmq1725 -screen -dmS tribus $STRATUM_DIR/run.sh tribus - -screen -dmS sha $STRATUM_DIR/run.sh sha -screen -dmS sha256t $STRATUM_DIR/run.sh sha256t -screen -dmS scrypt $STRATUM_DIR/run.sh scrypt -screen -dmS scryptn $STRATUM_DIR/run.sh scryptn -screen -dmS luffa $STRATUM_DIR/run.sh luffa -screen -dmS neo $STRATUM_DIR/run.sh neo -screen -dmS nist5 $STRATUM_DIR/run.sh nist5 -screen -dmS penta $STRATUM_DIR/run.sh penta -screen -dmS quark $STRATUM_DIR/run.sh quark -screen -dmS qubit $STRATUM_DIR/run.sh qubit -screen -dmS jha $STRATUM_DIR/run.sh jha -#screen -dmS dmd-gr $STRATUM_DIR/run.sh dmd-gr -screen -dmS myr-gr $STRATUM_DIR/run.sh myr-gr -screen -dmS lbry $STRATUM_DIR/run.sh lbry -screen -dmS allium $STRATUM_DIR/run.sh allium -#screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2 -screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2 -screen -dmS lyra2z $STRATUM_DIR/run.sh lyra2z -screen -dmS rainforest $STRATUM_DIR/run.sh rainforest - -screen -dmS blakecoin $STRATUM_DIR/run.sh blakecoin # blake 8 -screen -dmS blake $STRATUM_DIR/run.sh blake -screen -dmS blake2s $STRATUM_DIR/run.sh blake2s -screen -dmS vanilla $STRATUM_DIR/run.sh vanilla # blake 8 -screen -dmS decred $STRATUM_DIR/run.sh decred # blake 14 - -#screen -dmS keccak $STRATUM_DIR/run.sh keccak -#screen -dmS keccakc $STRATUM_DIR/run.sh keccakc -#screen -dmS phi $STRATUM_DIR/run.sh phi -#screen -dmS polytimos $STRATUM_DIR/run.sh polytimos -screen -dmS whirlpool $STRATUM_DIR/run.sh whirlpool - -screen -dmS skein $STRATUM_DIR/run.sh skein -screen -dmS skein2 $STRATUM_DIR/run.sh skein2 -screen -dmS yescrypt $STRATUM_DIR/run.sh yescrypt -#screen -dmS yescryptR16 $STRATUM_DIR/run.sh yescryptR16 -screen -dmS zr5 $STRATUM_DIR/run.sh zr5 -screen -dmS sib $STRATUM_DIR/run.sh sib -screen -dmS m7m $STRATUM_DIR/run.sh m7m -screen -dmS veltor $STRATUM_DIR/run.sh veltor -screen -dmS velvet $STRATUM_DIR/run.sh velvet -screen -dmS argon2 $STRATUM_DIR/run.sh argon2 -screen -dmS argon2d-dyn $STRATUM_DIR/run.sh argon2d-dyn -screen -dmS x22i $STRATUM_DIR/run.sh x22i -screen -dmS lbk3 $STRATUM_DIR/run.sh lbk3 - diff --git a/stratum/algos/SWIFFTX/inttypes.h.bak b/stratum/algos/SWIFFTX/inttypes.h.bak deleted file mode 100644 index cb313ae81..000000000 --- a/stratum/algos/SWIFFTX/inttypes.h.bak +++ /dev/null @@ -1,35 +0,0 @@ -/* - inttypes.h - Contributors: - Created by Marek Michalkiewicz - THIS SOFTWARE IS NOT COPYRIGHTED - This source code is offered for use in the public domain. You may - use, modify or distribute it freely. - This code is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - DISCLAIMED. This includes but is not limited to warranties of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - - #ifndef __INTTYPES_H_ - #define __INTTYPES_H_ - - /* Use [u]intN_t if you need exactly N bits. - XXX - doesn't handle the -mint8 option. */ - - typedef signed char swift_int8_t; - typedef unsigned char swift_uint8_t; - - typedef int swift_int16_t; - typedef unsigned int swift_uint16_t; - - typedef long swift_int32_t; - typedef unsigned long swift_uint32_t; - - typedef long long swift_int64_t; - typedef unsigned long long swift_uint64_t; - - //typedef swift_int16_t intptr_t; - //typedef swift_uint16_t uintptr_t; - - #endif \ No newline at end of file diff --git a/stratum/algos/SWIFFTX/stdint.h.bak b/stratum/algos/SWIFFTX/stdint.h.bak deleted file mode 100644 index f6e8070ba..000000000 --- a/stratum/algos/SWIFFTX/stdint.h.bak +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _SWIFFT_STDINT_H -#define _SWIFFT_STDINT_H - -/////////////////////////////////////////////////////////////////////////////////////////////// -// -// A note from SWIFFTX implementers: -// -// Although the submission was targeted for Microsoft Visual Studio 2005 compiler, we strived -// to make the code as portable as possible. This is why we preferred to use the types defined -// here, instead of Microsoft-specific types. We compiled the code with gcc to make this sure. -// However, we couldn't use this header as is, due to VS2005 compiler objections. This is why -// we commented out certain defines and clearly marked it. -// To compile our code on gcc you may define SYS_STDINT. -// -/////////////////////////////////////////////////////////////////////////////////////////////// - -#ifdef SYS_STDINT - -#include - -#else - -#include "inttypes.h" -// The following was commented out by SWIFFTX implementers: -// __BEGIN_DECLS - -typedef swift_int8_t swifftx_int_least8_t; -typedef swift_int16_t swifftx_int_least16_t; -typedef swift_int32_t swifftx_int_least32_t; -typedef swift_uint8_t swifftx_uint_least8_t; -typedef swift_uint16_t swifftx_uint_least16_t; -typedef swift_uint32_t swifftx_uint_least32_t; - -#ifndef __STRICT_ANSI__ -typedef swift_int64_t swifftx_int_least64_t; -typedef swift_uint64_t swifftx_uint_least64_t; -#endif - -/*typedef signed char int_fast8_t; -typedef signed long int int_fast16_t; -typedef signed long int int_fast32_t; -typedef signed long long int int_fast64_t; - -typedef unsigned char uint_fast8_t; -typedef unsigned long int uint_fast16_t; -typedef unsigned long int uint_fast32_t; -typedef unsigned long long int uint_fast64_t;*/ - -// The following was commented out by SWIFFTX implementers: -// #include -// __END_DECLS -#endif - -#endif \ No newline at end of file diff --git a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c.bak b/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c.bak deleted file mode 100644 index 73a8f427d..000000000 --- a/stratum/algos/binarium_hash_v1/encryption/gost2015_kuznechik/compact.c.bak +++ /dev/null @@ -1,240 +0,0 @@ -#include "libgost15/libgost15.h" -#include "shared/tables.h" -#include - - -const size_t WorkspaceOfScheduleRoundKeys = BlockLengthInBytes * 2; - - -static uint8_t multiplyInGF256( - uint8_t left, - uint8_t right -) { - if (left && right) { - int productLogarithm_ = 0; - uint8_t leftLogarithm_ = logarithmicTable[left]; - uint8_t rightLogarithm_ = logarithmicTable[right]; - productLogarithm_ = leftLogarithm_ + rightLogarithm_; - if (productLogarithm_ > 0xff) { productLogarithm_ -= 0xff; } - return exponentialTable[productLogarithm_]; - } - else { - return 0; - } -} - - -static void applyXTransformation( - const uint8_t *restrict key, - const uint8_t *input, - uint8_t *restrict output -) { - uint64_t key_[2], input_[2], output_[2]; - - /* Compiler usually sees this through. Advantages of using memcpy: */ - memcpy(key_, key, BlockLengthInBytes); - memcpy(input_, input, BlockLengthInBytes); - - output_[0] = input_[0] ^ key_[0]; - output_[1] = input_[1] ^ key_[1]; - - memcpy(output, output_, BlockLengthInBytes); -} - - -static void applySTransformation( - uint8_t *block -) { - for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; byteIndex_ += 8) { - block[byteIndex_ + 0] = Pi[block[byteIndex_ + 0]]; - block[byteIndex_ + 1] = Pi[block[byteIndex_ + 1]]; - block[byteIndex_ + 2] = Pi[block[byteIndex_ + 2]]; - block[byteIndex_ + 3] = Pi[block[byteIndex_ + 3]]; - - block[byteIndex_ + 4] = Pi[block[byteIndex_ + 4]]; - block[byteIndex_ + 5] = Pi[block[byteIndex_ + 5]]; - block[byteIndex_ + 6] = Pi[block[byteIndex_ + 6]]; - block[byteIndex_ + 7] = Pi[block[byteIndex_ + 7]]; - } -} - - -static void applyInversedSTransformation( - uint8_t *block -) { - for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; byteIndex_ += 8) { - block[byteIndex_ + 0] = InversedPi[block[byteIndex_ + 0]]; - block[byteIndex_ + 1] = InversedPi[block[byteIndex_ + 1]]; - block[byteIndex_ + 2] = InversedPi[block[byteIndex_ + 2]]; - block[byteIndex_ + 3] = InversedPi[block[byteIndex_ + 3]]; - - block[byteIndex_ + 4] = InversedPi[block[byteIndex_ + 4]]; - block[byteIndex_ + 5] = InversedPi[block[byteIndex_ + 5]]; - block[byteIndex_ + 6] = InversedPi[block[byteIndex_ + 6]]; - block[byteIndex_ + 7] = InversedPi[block[byteIndex_ + 7]]; - } -} - - -static void applyLTransformation( - const uint8_t *input, - uint8_t *output -) { - for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { - uint8_t cache_ = 0; - for (int addendIndex_ = 0; addendIndex_ < BlockLengthInBytes; ++addendIndex_) { - cache_ ^= multiplyInGF256(LTransformationMatrix[addendIndex_][byteIndex_], - input[addendIndex_]); - } - output[byteIndex_] = cache_; - } -} - - -static void applyInversedLTransformation( - const uint8_t *input, - uint8_t *output -) { - for (int byteIndex_ = 0; byteIndex_ < BlockLengthInBytes; ++byteIndex_) { - uint8_t cache_ = 0; - for (int addendIndex_ = 0; addendIndex_ < BlockLengthInBytes; ++addendIndex_) { - cache_ ^= multiplyInGF256(inversedLTransformationMatrix[addendIndex_][byteIndex_], - input[addendIndex_]); - } - output[byteIndex_] = cache_; - } -} - - -static void applyXSLTransformation( - const uint8_t *key, - uint8_t *block, - uint8_t *temporary -) { - applyXTransformation(key, block, temporary); - applySTransformation(temporary); - applyLTransformation(temporary, block); -} - - -static void applyInversedSLXTransformation( - const uint8_t *key, - uint8_t *block, - uint8_t *temporary -) { - applyXTransformation(key, block, temporary); - applyInversedLTransformation(temporary, block); - applyInversedSTransformation(block); -} - - -static void swapBlocks( - uint8_t *restrict left, - uint8_t *restrict right, - uint8_t *restrict temporary -) { - /* left != right != temp shall hold. */ - memcpy(temporary, left, BlockLengthInBytes); - memcpy(left, right, BlockLengthInBytes); - memcpy(right, temporary, BlockLengthInBytes); -} - - -static void applyFTransformation( - const uint8_t *restrict key, - uint8_t *restrict left, - uint8_t *restrict right, - uint8_t *restrict temporary1, - uint8_t *restrict temporary2 -) { - memcpy(temporary1, left, BlockLengthInBytes); - applyXSLTransformation(key, temporary1, temporary2); - applyXTransformation(temporary1, right, right); - swapBlocks(left, right, temporary2); -} - - -static void fetchKeyScheduleRoundConstant( - uint8_t index, - uint8_t *restrict roundConstant, - uint8_t *restrict temporary -) { - memset(temporary, 0, BlockLengthInBytes); - temporary[BlockLengthInBytes - 1] = index; - applyLTransformation(temporary, roundConstant); -} - - -static void scheduleRoundKeys( - void *restrict roundKeys, - const void *restrict key, - void *restrict memory -) { - uint8_t *memory_ = memory, *roundKeys_ = roundKeys; - - memcpy(&roundKeys_[0], key, BlockLengthInBytes * 2); - - for (int nextKeyIndex_ = 2, constantIndex_ = 0; - nextKeyIndex_ != NumberOfRounds; - nextKeyIndex_ += 2) { - memcpy(&roundKeys_[BlockLengthInBytes * (nextKeyIndex_)], - &roundKeys_[BlockLengthInBytes * (nextKeyIndex_ - 2)], - BlockLengthInBytes * 2); - - for (int feistelRoundIndex_ = 0; feistelRoundIndex_ < NumberOfRoundsInKeySchedule; ++feistelRoundIndex_) { - applyFTransformation(&roundConstants[BlockLengthInBytes * constantIndex_++], - &roundKeys_[BlockLengthInBytes * (nextKeyIndex_)], - &roundKeys_[BlockLengthInBytes * (nextKeyIndex_ + 1)], - &memory_[0], - &memory_[BlockLengthInBytes]); - } - } -} - - -void scheduleEncryptionRoundKeysForGost15( - void *restrict roundKeys, - const void *restrict key, - void *restrict memory -) { - scheduleRoundKeys(roundKeys, key, memory); -} - - -void scheduleDecryptionRoundKeysForGost15( - void *restrict roundKeys, - const void *restrict key, - void *restrict memory -) { - scheduleRoundKeys(roundKeys, key, memory); -} - - -void encryptBlockWithGost15( - const void *restrict roundKeys, - void *restrict block -) { - const uint8_t *roundKeys_ = roundKeys; - uint8_t cache_[BlockLengthInBytes] = {0}; - int round_ = 0; - - for (; round_ < NumberOfRounds - 1; ++round_) { - applyXSLTransformation(&roundKeys_[BlockLengthInBytes * round_], block, cache_); - } - applyXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, block); -} - - -void decryptBlockWithGost15( - const void *restrict roundKeys, - void *restrict block -) { - const uint8_t *roundKeys_ = roundKeys; - uint8_t cache_[BlockLengthInBytes] = {0}; - int round_ = NumberOfRounds - 1; - - for (; round_ > 0; --round_) { - applyInversedSLXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, cache_); - } - applyXTransformation(&roundKeys_[BlockLengthInBytes * round_], block, block); -} diff --git a/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c.bak b/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c.bak deleted file mode 100644 index ac5912a18..000000000 --- a/stratum/algos/binarium_hash_v1/encryption/salsa20/salsa20.c.bak +++ /dev/null @@ -1,239 +0,0 @@ -/* -salsa20-merged.c version 20051118 -D. J. Bernstein -Public domain. -*/ - -#include "ecrypt-sync.h" - -#include - - - -#define ROTATE(v,c) (ROTL32(v,c)) -#define XOR(v,w) ((v) ^ (w)) -#define PLUS(v,w) (U32V((v) + (w))) -#define PLUSONE(v) (PLUS((v),1)) - -void ECRYPT_init(void) -{ - return; -} - -static const char sigma[16] = "expand 32-byte k"; -static const char tau[16] = "expand 16-byte k"; - -void ECRYPT_keysetup(ECRYPT_ctx *x,const u8 *k,u32 kbits,u32 ivbits) -{ - const char *constants; - - x->input[1] = U8TO32_LITTLE(k + 0); - x->input[2] = U8TO32_LITTLE(k + 4); - x->input[3] = U8TO32_LITTLE(k + 8); - x->input[4] = U8TO32_LITTLE(k + 12); - if (kbits == 256) { /* recommended */ - k += 16; - constants = sigma; - } else { /* kbits == 128 */ - constants = tau; - } - x->input[11] = U8TO32_LITTLE(k + 0); - x->input[12] = U8TO32_LITTLE(k + 4); - x->input[13] = U8TO32_LITTLE(k + 8); - x->input[14] = U8TO32_LITTLE(k + 12); - x->input[0] = U8TO32_LITTLE(constants + 0); - x->input[5] = U8TO32_LITTLE(constants + 4); - x->input[10] = U8TO32_LITTLE(constants + 8); - x->input[15] = U8TO32_LITTLE(constants + 12); -} - -void ECRYPT_ivsetup(ECRYPT_ctx *x,const u8 *iv) -{ - x->input[6] = U8TO32_LITTLE(iv + 0); - x->input[7] = U8TO32_LITTLE(iv + 4); - x->input[8] = 0; - x->input[9] = 0; -} - -void ECRYPT_encrypt_bytes(ECRYPT_ctx *x,const u8 *m,u8 *c,u32 bytes) -{ - u32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15; - u32 j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15; - u8 *ctarget; - u8 tmp[64]; - int i; - - if (!bytes) return; - - j0 = x->input[0]; - j1 = x->input[1]; - j2 = x->input[2]; - j3 = x->input[3]; - j4 = x->input[4]; - j5 = x->input[5]; - j6 = x->input[6]; - j7 = x->input[7]; - j8 = x->input[8]; - j9 = x->input[9]; - j10 = x->input[10]; - j11 = x->input[11]; - j12 = x->input[12]; - j13 = x->input[13]; - j14 = x->input[14]; - j15 = x->input[15]; - - for (;;) { - if (bytes < 64) { - for (i = 0;i < bytes;++i) tmp[i] = m[i]; - m = tmp; - ctarget = c; - c = tmp; - } - x0 = j0; - x1 = j1; - x2 = j2; - x3 = j3; - x4 = j4; - x5 = j5; - x6 = j6; - x7 = j7; - x8 = j8; - x9 = j9; - x10 = j10; - x11 = j11; - x12 = j12; - x13 = j13; - x14 = j14; - x15 = j15; - for (i = 20;i > 0;i -= 2) { - x4 = XOR( x4,ROTATE(PLUS( x0,x12), 7)); - x8 = XOR( x8,ROTATE(PLUS( x4, x0), 9)); - x12 = XOR(x12,ROTATE(PLUS( x8, x4),13)); - x0 = XOR( x0,ROTATE(PLUS(x12, x8),18)); - x9 = XOR( x9,ROTATE(PLUS( x5, x1), 7)); - x13 = XOR(x13,ROTATE(PLUS( x9, x5), 9)); - x1 = XOR( x1,ROTATE(PLUS(x13, x9),13)); - x5 = XOR( x5,ROTATE(PLUS( x1,x13),18)); - x14 = XOR(x14,ROTATE(PLUS(x10, x6), 7)); - x2 = XOR( x2,ROTATE(PLUS(x14,x10), 9)); - x6 = XOR( x6,ROTATE(PLUS( x2,x14),13)); - x10 = XOR(x10,ROTATE(PLUS( x6, x2),18)); - x3 = XOR( x3,ROTATE(PLUS(x15,x11), 7)); - x7 = XOR( x7,ROTATE(PLUS( x3,x15), 9)); - x11 = XOR(x11,ROTATE(PLUS( x7, x3),13)); - x15 = XOR(x15,ROTATE(PLUS(x11, x7),18)); - x1 = XOR( x1,ROTATE(PLUS( x0, x3), 7)); - x2 = XOR( x2,ROTATE(PLUS( x1, x0), 9)); - x3 = XOR( x3,ROTATE(PLUS( x2, x1),13)); - x0 = XOR( x0,ROTATE(PLUS( x3, x2),18)); - x6 = XOR( x6,ROTATE(PLUS( x5, x4), 7)); - x7 = XOR( x7,ROTATE(PLUS( x6, x5), 9)); - x4 = XOR( x4,ROTATE(PLUS( x7, x6),13)); - x5 = XOR( x5,ROTATE(PLUS( x4, x7),18)); - x11 = XOR(x11,ROTATE(PLUS(x10, x9), 7)); - x8 = XOR( x8,ROTATE(PLUS(x11,x10), 9)); - x9 = XOR( x9,ROTATE(PLUS( x8,x11),13)); - x10 = XOR(x10,ROTATE(PLUS( x9, x8),18)); - x12 = XOR(x12,ROTATE(PLUS(x15,x14), 7)); - x13 = XOR(x13,ROTATE(PLUS(x12,x15), 9)); - x14 = XOR(x14,ROTATE(PLUS(x13,x12),13)); - x15 = XOR(x15,ROTATE(PLUS(x14,x13),18)); - } - x0 = PLUS(x0,j0); - x1 = PLUS(x1,j1); - x2 = PLUS(x2,j2); - x3 = PLUS(x3,j3); - x4 = PLUS(x4,j4); - x5 = PLUS(x5,j5); - x6 = PLUS(x6,j6); - x7 = PLUS(x7,j7); - x8 = PLUS(x8,j8); - x9 = PLUS(x9,j9); - x10 = PLUS(x10,j10); - x11 = PLUS(x11,j11); - x12 = PLUS(x12,j12); - x13 = PLUS(x13,j13); - x14 = PLUS(x14,j14); - x15 = PLUS(x15,j15); - - x0 = XOR(x0,U8TO32_LITTLE(m + 0)); - x1 = XOR(x1,U8TO32_LITTLE(m + 4)); - x2 = XOR(x2,U8TO32_LITTLE(m + 8)); - x3 = XOR(x3,U8TO32_LITTLE(m + 12)); - x4 = XOR(x4,U8TO32_LITTLE(m + 16)); - x5 = XOR(x5,U8TO32_LITTLE(m + 20)); - x6 = XOR(x6,U8TO32_LITTLE(m + 24)); - x7 = XOR(x7,U8TO32_LITTLE(m + 28)); - x8 = XOR(x8,U8TO32_LITTLE(m + 32)); - x9 = XOR(x9,U8TO32_LITTLE(m + 36)); - x10 = XOR(x10,U8TO32_LITTLE(m + 40)); - x11 = XOR(x11,U8TO32_LITTLE(m + 44)); - x12 = XOR(x12,U8TO32_LITTLE(m + 48)); - x13 = XOR(x13,U8TO32_LITTLE(m + 52)); - x14 = XOR(x14,U8TO32_LITTLE(m + 56)); - x15 = XOR(x15,U8TO32_LITTLE(m + 60)); - - j8 = PLUSONE(j8); - if (!j8) { - j9 = PLUSONE(j9); - /* stopping at 2^70 bytes per nonce is user's responsibility */ - } - - U32TO8_LITTLE(c + 0,x0); - U32TO8_LITTLE(c + 4,x1); - U32TO8_LITTLE(c + 8,x2); - U32TO8_LITTLE(c + 12,x3); - U32TO8_LITTLE(c + 16,x4); - U32TO8_LITTLE(c + 20,x5); - U32TO8_LITTLE(c + 24,x6); - U32TO8_LITTLE(c + 28,x7); - U32TO8_LITTLE(c + 32,x8); - U32TO8_LITTLE(c + 36,x9); - U32TO8_LITTLE(c + 40,x10); - U32TO8_LITTLE(c + 44,x11); - U32TO8_LITTLE(c + 48,x12); - U32TO8_LITTLE(c + 52,x13); - U32TO8_LITTLE(c + 56,x14); - U32TO8_LITTLE(c + 60,x15); - - if (bytes <= 64) { - if (bytes < 64) { - for (i = 0;i < bytes;++i) ctarget[i] = c[i]; - } - x->input[8] = j8; - x->input[9] = j9; - return; - } - bytes -= 64; - c += 64; - m += 64; - } -} - -void ECRYPT_decrypt_bytes(ECRYPT_ctx *x,const u8 *c,u8 *m,u32 bytes) -{ - ECRYPT_encrypt_bytes(x,c,m,bytes); -} - -void ECRYPT_keystream_bytes(ECRYPT_ctx *x,u8 *stream,u32 bytes) -{ - u32 i; - for (i = 0;i < bytes;++i) stream[i] = 0; - ECRYPT_encrypt_bytes(x,stream,stream,bytes); -} - - - -void ECRYPT_PrintContext ( const ECRYPT_ctx * _structContext ) { - int i; - - fprintf(stdout, "salsa20.cpp : ECRYPT_PrintContext () : " ); - - for ( i = 0; i < 16; i ++ ) { - fprintf(stdout, "%i ", _structContext -> input [ i ] ); - - } //-for - - fprintf(stdout, ".\n" ); - -} diff --git a/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h.bak b/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h.bak deleted file mode 100644 index 79564ed0a..000000000 --- a/stratum/algos/binarium_hash_v1/encryption/three_fish/libskein_skein.h.bak +++ /dev/null @@ -1,85 +0,0 @@ -/* -** Copyright (c) Alexis Megas. -** All rights reserved. -** -** Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions -** are met: -** 1. Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** 2. Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in the -** documentation and/or other materials provided with the distribution. -** 3. The name of the author may not be used to endorse or promote products -** derived from skein without specific prior written permission. -** -** LIBSKEIN IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 -** LIBSKEIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -//#ifndef LIBSKEIN_SKEIN_H -//#define LIBSKEIN_SKEIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif -#include -#include -#include -#ifdef __cplusplus -} -#endif - -//#include -//#include -//#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -void libskein_threefish_decrypt -(char *D, /* - ** Output storage. The size of the - ** container must be identical to - ** the size of C. - */ - const char *K, // Must be 32, 64, or 128 bytes. - const char *T, // Must be 16 bytes. - const char *C, // The ciphertext. - const size_t C_size, // The size of the ciphertext. - const size_t block_size); /* - ** The block size in - ** bits. Must be 256, - ** 512, or 1024. - */ -void libskein_threefish_encrypt -(char *E, /* - ** Output storage. The size of the - ** container must be identical to - ** the size of P. - */ - const char *K, // Must be 32, 64, or 128 bytes. - const char *T, // Must be 16 bytes. - const char *P, // The plaintext. - const size_t P_size, // The size of the plaintext. - const size_t block_size); /* - ** The block size in - ** bits. Must be 256, - ** 512, or 1024. - */ - -#ifdef __cplusplus -} -#endif -//#endif diff --git a/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c.bak b/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c.bak deleted file mode 100644 index 982fcffd8..000000000 --- a/stratum/algos/binarium_hash_v1/hashing/streebog/table/stribog.c.bak +++ /dev/null @@ -1,394 +0,0 @@ -/* - * stribog.c - * - * Created on: Feb 15, 2013 - * Author: Oleksandr Kazymyrov - * Acknowledgments: Oleksii Shevchuk - */ - -#include -#include -#include -#include - -#include "stribog_data.h" -//#include "../stribog.h" - -void AddModulo512(const void *a,const void *b,void *c) -{ - const unsigned char *A=a, *B=b; - unsigned char *C=c; - int t = 0; -#ifdef FULL_UNROLL -#define ADDBYTE_8(i) t = A[i] + B[i] + (t >> 8); C[i] = t & 0xFF; - - ADDBYTE_8(63) - ADDBYTE_8(62) - ADDBYTE_8(61) - ADDBYTE_8(60) - ADDBYTE_8(59) - ADDBYTE_8(58) - ADDBYTE_8(57) - ADDBYTE_8(56) - ADDBYTE_8(55) - ADDBYTE_8(54) - ADDBYTE_8(53) - ADDBYTE_8(52) - ADDBYTE_8(51) - ADDBYTE_8(50) - ADDBYTE_8(49) - ADDBYTE_8(48) - ADDBYTE_8(47) - ADDBYTE_8(46) - ADDBYTE_8(45) - ADDBYTE_8(44) - ADDBYTE_8(43) - ADDBYTE_8(42) - ADDBYTE_8(41) - ADDBYTE_8(40) - ADDBYTE_8(39) - ADDBYTE_8(38) - ADDBYTE_8(37) - ADDBYTE_8(36) - ADDBYTE_8(35) - ADDBYTE_8(34) - ADDBYTE_8(33) - ADDBYTE_8(32) - ADDBYTE_8(31) - ADDBYTE_8(30) - ADDBYTE_8(29) - ADDBYTE_8(28) - ADDBYTE_8(27) - ADDBYTE_8(26) - ADDBYTE_8(25) - ADDBYTE_8(24) - ADDBYTE_8(23) - ADDBYTE_8(22) - ADDBYTE_8(21) - ADDBYTE_8(20) - ADDBYTE_8(19) - ADDBYTE_8(18) - ADDBYTE_8(17) - ADDBYTE_8(16) - ADDBYTE_8(15) - ADDBYTE_8(14) - ADDBYTE_8(13) - ADDBYTE_8(12) - ADDBYTE_8(11) - ADDBYTE_8(10) - ADDBYTE_8(9) - ADDBYTE_8(8) - ADDBYTE_8(7) - ADDBYTE_8(6) - ADDBYTE_8(5) - ADDBYTE_8(4) - ADDBYTE_8(3) - ADDBYTE_8(2) - ADDBYTE_8(1) - ADDBYTE_8(0) - -#else - int i = 0; - - for(i=63;i>=0;i--) - { - t = A[i] + B[i] + (t >> 8); - C[i] = t & 0xFF; - } -#endif -} - -void AddXor512(const void *a,const void *b,void *c) -{ - const unsigned long long *A=a, *B=b; - unsigned long long *C=c; -#ifdef FULL_UNROLL - C[0] = A[0] ^ B[0]; - C[1] = A[1] ^ B[1]; - C[2] = A[2] ^ B[2]; - C[3] = A[3] ^ B[3]; - C[4] = A[4] ^ B[4]; - C[5] = A[5] ^ B[5]; - C[6] = A[6] ^ B[6]; - C[7] = A[7] ^ B[7]; -#else - int i = 0; - - for(i=0;i<8;i++) - { - C[i] = A[i] ^ B[i]; - } -#endif -} - -void F(unsigned char *state) -{ - unsigned long long return_state[8]; - register unsigned long long r = 0; - r ^= Streebog_T[0][state[56]]; - r ^= Streebog_T[1][state[48]]; - r ^= Streebog_T[2][state[40]]; - r ^= Streebog_T[3][state[32]]; - r ^= Streebog_T[4][state[24]]; - r ^= Streebog_T[5][state[16]]; - r ^= Streebog_T[6][state[8]]; - r ^= Streebog_T[7][state[0]]; - return_state[0] = r; - r = 0; - - r ^= Streebog_T[0][state[57]]; - r ^= Streebog_T[1][state[49]]; - r ^= Streebog_T[2][state[41]]; - r ^= Streebog_T[3][state[33]]; - r ^= Streebog_T[4][state[25]]; - r ^= Streebog_T[5][state[17]]; - r ^= Streebog_T[6][state[9]]; - r ^= Streebog_T[7][state[1]]; - return_state[1] = r; - r = 0; - - r ^= Streebog_T[0][state[58]]; - r ^= Streebog_T[1][state[50]]; - r ^= Streebog_T[2][state[42]]; - r ^= Streebog_T[3][state[34]]; - r ^= Streebog_T[4][state[26]]; - r ^= Streebog_T[5][state[18]]; - r ^= Streebog_T[6][state[10]]; - r ^= Streebog_T[7][state[2]]; - return_state[2] = r; - r = 0; - - r ^= Streebog_T[0][state[59]]; - r ^= Streebog_T[1][state[51]]; - r ^= Streebog_T[2][state[43]]; - r ^= Streebog_T[3][state[35]]; - r ^= Streebog_T[4][state[27]]; - r ^= Streebog_T[5][state[19]]; - r ^= Streebog_T[6][state[11]]; - r ^= Streebog_T[7][state[3]]; - return_state[3] = r; - r = 0; - - r ^= Streebog_T[0][state[60]]; - r ^= Streebog_T[1][state[52]]; - r ^= Streebog_T[2][state[44]]; - r ^= Streebog_T[3][state[36]]; - r ^= Streebog_T[4][state[28]]; - r ^= Streebog_T[5][state[20]]; - r ^= Streebog_T[6][state[12]]; - r ^= Streebog_T[7][state[4]]; - return_state[4] = r; - r = 0; - - r ^= Streebog_T[0][state[61]]; - r ^= Streebog_T[1][state[53]]; - r ^= Streebog_T[2][state[45]]; - r ^= Streebog_T[3][state[37]]; - r ^= Streebog_T[4][state[29]]; - r ^= Streebog_T[5][state[21]]; - r ^= Streebog_T[6][state[13]]; - r ^= Streebog_T[7][state[5]]; - return_state[5] = r; - r = 0; - - r ^= Streebog_T[0][state[62]]; - r ^= Streebog_T[1][state[54]]; - r ^= Streebog_T[2][state[46]]; - r ^= Streebog_T[3][state[38]]; - r ^= Streebog_T[4][state[30]]; - r ^= Streebog_T[5][state[22]]; - r ^= Streebog_T[6][state[14]]; - r ^= Streebog_T[7][state[6]]; - return_state[6] = r; - r = 0; - - r ^= Streebog_T[0][state[63]]; - r ^= Streebog_T[1][state[55]]; - r ^= Streebog_T[2][state[47]]; - r ^= Streebog_T[3][state[39]]; - r ^= Streebog_T[4][state[31]]; - r ^= Streebog_T[5][state[23]]; - r ^= Streebog_T[6][state[15]]; - r ^= Streebog_T[7][state[7]]; - return_state[7] = r; - - memcpy(state,(unsigned char*)return_state,64); -} - -#define KeySchedule(K,i) AddXor512(K,Streebog_C[i],K); F(K); - -void E(unsigned char *K,const unsigned char *m, unsigned char *state) -{ -#ifdef FULL_UNROLL - AddXor512(m,K,state); - - F(state); - KeySchedule(K,0); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,1); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,2); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,3); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,4); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,5); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,6); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,7); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,8); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,9); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,10); - AddXor512(state,K,state); - - F(state); - KeySchedule(K,11); - AddXor512(state,K,state); -#else - int i = 0; - - AddXor512(m,K,state); - - for(i=0;i<12;i++) - { - F(state); - KeySchedule(K,i); - AddXor512(state,K,state); - } -#endif -} - -void g_N(const unsigned char *N,unsigned char *h,const unsigned char *m) -{ - unsigned char t[64], K[64]; - - AddXor512(N,h,K); - - F(K); - - E(K,m,t); - - AddXor512(t,h,t); - AddXor512(t,m,h); -} - -void hash_X(unsigned char *IV,const unsigned char *message,unsigned long long length,unsigned char *out) -{ - unsigned char v512[64] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00 - }; - unsigned char v0[64] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - }; - unsigned char Sigma[64] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - }; - unsigned char N[64] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - }; - unsigned char m[64], *hash = IV; - unsigned long long len = length; - - // Stage 2 - while (len >= 512) - { - memcpy(m, message + len/8 - 63 - ( (len & 0x7) == 0 ), 64); - - g_N(N,hash,m); - AddModulo512(N,v512,N); - AddModulo512(Sigma,m,Sigma); - len -= 512; - } - - memset(m,0,64); - memcpy(m + 63 - len/8 + ( (len & 0x7) == 0 ), message, len/8 + 1 - ( (len & 0x7) == 0 )); - - // Stage 3 - m[ 63 - len/8 ] |= (1 << (len & 0x7)); - - g_N(N,hash,m); - v512[63] = len & 0xFF; - v512[62] = len >> 8; - AddModulo512(N,v512,N); - - AddModulo512(Sigma,m,Sigma); - - g_N(v0,hash,N); - g_N(v0,hash,Sigma); - - memcpy(out, hash, 64); -} - -#ifdef __cplusplus -extern "C"{ -#endif - -void hash_512(const unsigned char *message,unsigned long long length,unsigned char *out) -{ - unsigned char IV[64] = - { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - }; - - hash_X(IV,message,length,out); -} - -void hash_256(const unsigned char *message,unsigned long long length,unsigned char *out) -{ - unsigned char IV[64] = - { - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, - 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 - }; - unsigned char hash[64]; - - hash_X(IV,message,length,hash); - - memcpy(out,hash,32); -} - -#ifdef __cplusplus -} -#endif diff --git a/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c.bak b/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c.bak deleted file mode 100644 index 1b76a6ba1..000000000 --- a/stratum/algos/binarium_hash_v1/hashing/swifft/setup.c.bak +++ /dev/null @@ -1,59 +0,0 @@ -#include "swifft.h" - -SWIFFT_ZN mulTable ALIGN; -SWIFFT_ZW fftTable[1< SWIFFT_P/2) y -= SWIFFT_P; - return y; -} - -int rev(int i, int bound) { // bit reversal permutation - int irev=0; - for(i |= bound; i>1; i>>=1) - irev = (irev<<1) | (i&1); - return irev; -} - -int bit(int x, int b) // extract b-th bit of x -{ return (x >> b) & 1; } - -#ifdef __cplusplus -extern "C" { -#endif - -void SwiFFT_setupTables() { - long omega_pow[2*SWIFFT_N]; // the powers of omega - omega_pow[0] = 1; - for(int i = 1; i < 2*SWIFFT_N; i++) - omega_pow[i] = center(omega_pow[i-1] * OMEGA); - - for (int i=0; i - -#define INLINE inline extern __attribute__((always_inline)) - -INLINE SWIFFT_ZW shift(SWIFFT_ZW x, int s) // x*2^s mod (P=257) -{ return ((x << s) & 255) - (x >> (8-s)); } - -// Reduces mm mod P=257 to the range {-127,383} -INLINE SWIFFT_ZW qReduce(SWIFFT_ZW x) // (x mod 256) - floor(x/256) -{ return (x & 255) - (x >> 8); } - -// Reduces mm mod P=257 to the range {0,..,(P-1)=256} -INLINE SWIFFT_ZW modP(SWIFFT_ZW mm){ - SWIFFT_ZW tmp = qReduce(qReduce(mm)); - return tmp ^ ((tmp == -1) & (-257)); -} - -#define AddSub(a, b) { SWIFFT_ZW tmp = b; b = a - b; a = a + tmp; } - -INLINE void FFT(const BitsN t, SWIFFT_ZN u) { - int i; - SWIFFT_ZN v; - - for (i=0; i> 8); - } - for (int i=0; ikeyval[i][j/SWIFFT_W][j%SWIFFT_W] = _pKeySourceData [ k ]; - //fprintf(stdout, "%i : ", _pKeySourceData [ k ] ); - //fprintf(stdout, "%3d ; ", key->keyval[i][j/SWIFFT_W][j%SWIFFT_W]); - k = k + 1; - } //-for - //fprintf(stdout, "\nswifft.c : SwiFFT_readKey () : %i.\n", k ); - SwiFFT_setupKey(*key); -} - -void SwiFFT_readData(SWIFFT_HashData data, const unsigned char * _pDataSource) { - int k = 0; - - for (int i=0; i - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! - * - * Documentation: - * P. S. L. M. Barreto, V. Rijmen, ``The Whirlpool hashing function,'' - * NESSIE submission, 2000 (tweaked version, 2001) - * - * The algorithm is named after the Whirlpool Galaxy in Canes Venatici. - */ - -#include -#include -#include "byte_order.h" -#include "whirlpool.h" - -#ifdef __cplusplus -extern "C"{ -#endif - -/** - * Initialize context before calculaing hash. - * - * @param ctx context to initialize - */ -void rhash_whirlpool_init(struct whirlpool_ctx* ctx) -{ - ctx->length = 0; - memset(ctx->hash, 0, sizeof(ctx->hash)); -} - -/* Algorithm S-Box */ -//extern uint64_t rhash_whirlpool_sbox[8][256]; - -uint64_t rhash_whirlpool_sbox[8][256] = { - { - // C0 vectors - I64(0x18186018c07830d8), I64(0x23238c2305af4626), I64(0xc6c63fc67ef991b8), I64(0xe8e887e8136fcdfb), - I64(0x878726874ca113cb), I64(0xb8b8dab8a9626d11), I64(0x0101040108050209), I64(0x4f4f214f426e9e0d), - I64(0x3636d836adee6c9b), I64(0xa6a6a2a6590451ff), I64(0xd2d26fd2debdb90c), I64(0xf5f5f3f5fb06f70e), - I64(0x7979f979ef80f296), I64(0x6f6fa16f5fcede30), I64(0x91917e91fcef3f6d), I64(0x52525552aa07a4f8), - I64(0x60609d6027fdc047), I64(0xbcbccabc89766535), I64(0x9b9b569baccd2b37), I64(0x8e8e028e048c018a), - I64(0xa3a3b6a371155bd2), I64(0x0c0c300c603c186c), I64(0x7b7bf17bff8af684), I64(0x3535d435b5e16a80), - I64(0x1d1d741de8693af5), I64(0xe0e0a7e05347ddb3), I64(0xd7d77bd7f6acb321), I64(0xc2c22fc25eed999c), - I64(0x2e2eb82e6d965c43), I64(0x4b4b314b627a9629), I64(0xfefedffea321e15d), I64(0x575741578216aed5), - I64(0x15155415a8412abd), I64(0x7777c1779fb6eee8), I64(0x3737dc37a5eb6e92), I64(0xe5e5b3e57b56d79e), - I64(0x9f9f469f8cd92313), I64(0xf0f0e7f0d317fd23), I64(0x4a4a354a6a7f9420), I64(0xdada4fda9e95a944), - I64(0x58587d58fa25b0a2), I64(0xc9c903c906ca8fcf), I64(0x2929a429558d527c), I64(0x0a0a280a5022145a), - I64(0xb1b1feb1e14f7f50), I64(0xa0a0baa0691a5dc9), I64(0x6b6bb16b7fdad614), I64(0x85852e855cab17d9), - I64(0xbdbdcebd8173673c), I64(0x5d5d695dd234ba8f), I64(0x1010401080502090), I64(0xf4f4f7f4f303f507), - I64(0xcbcb0bcb16c08bdd), I64(0x3e3ef83eedc67cd3), I64(0x0505140528110a2d), I64(0x676781671fe6ce78), - I64(0xe4e4b7e47353d597), I64(0x27279c2725bb4e02), I64(0x4141194132588273), I64(0x8b8b168b2c9d0ba7), - I64(0xa7a7a6a7510153f6), I64(0x7d7de97dcf94fab2), I64(0x95956e95dcfb3749), I64(0xd8d847d88e9fad56), - I64(0xfbfbcbfb8b30eb70), I64(0xeeee9fee2371c1cd), I64(0x7c7ced7cc791f8bb), I64(0x6666856617e3cc71), - I64(0xdddd53dda68ea77b), I64(0x17175c17b84b2eaf), I64(0x4747014702468e45), I64(0x9e9e429e84dc211a), - I64(0xcaca0fca1ec589d4), I64(0x2d2db42d75995a58), I64(0xbfbfc6bf9179632e), I64(0x07071c07381b0e3f), - I64(0xadad8ead012347ac), I64(0x5a5a755aea2fb4b0), I64(0x838336836cb51bef), I64(0x3333cc3385ff66b6), - I64(0x636391633ff2c65c), I64(0x02020802100a0412), I64(0xaaaa92aa39384993), I64(0x7171d971afa8e2de), - I64(0xc8c807c80ecf8dc6), I64(0x19196419c87d32d1), I64(0x494939497270923b), I64(0xd9d943d9869aaf5f), - I64(0xf2f2eff2c31df931), I64(0xe3e3abe34b48dba8), I64(0x5b5b715be22ab6b9), I64(0x88881a8834920dbc), - I64(0x9a9a529aa4c8293e), I64(0x262698262dbe4c0b), I64(0x3232c8328dfa64bf), I64(0xb0b0fab0e94a7d59), - I64(0xe9e983e91b6acff2), I64(0x0f0f3c0f78331e77), I64(0xd5d573d5e6a6b733), I64(0x80803a8074ba1df4), - I64(0xbebec2be997c6127), I64(0xcdcd13cd26de87eb), I64(0x3434d034bde46889), I64(0x48483d487a759032), - I64(0xffffdbffab24e354), I64(0x7a7af57af78ff48d), I64(0x90907a90f4ea3d64), I64(0x5f5f615fc23ebe9d), - I64(0x202080201da0403d), I64(0x6868bd6867d5d00f), I64(0x1a1a681ad07234ca), I64(0xaeae82ae192c41b7), - I64(0xb4b4eab4c95e757d), I64(0x54544d549a19a8ce), I64(0x93937693ece53b7f), I64(0x222288220daa442f), - I64(0x64648d6407e9c863), I64(0xf1f1e3f1db12ff2a), I64(0x7373d173bfa2e6cc), I64(0x12124812905a2482), - I64(0x40401d403a5d807a), I64(0x0808200840281048), I64(0xc3c32bc356e89b95), I64(0xecec97ec337bc5df), - I64(0xdbdb4bdb9690ab4d), I64(0xa1a1bea1611f5fc0), I64(0x8d8d0e8d1c830791), I64(0x3d3df43df5c97ac8), - I64(0x97976697ccf1335b), I64(0x0000000000000000), I64(0xcfcf1bcf36d483f9), I64(0x2b2bac2b4587566e), - I64(0x7676c57697b3ece1), I64(0x8282328264b019e6), I64(0xd6d67fd6fea9b128), I64(0x1b1b6c1bd87736c3), - I64(0xb5b5eeb5c15b7774), I64(0xafaf86af112943be), I64(0x6a6ab56a77dfd41d), I64(0x50505d50ba0da0ea), - I64(0x45450945124c8a57), I64(0xf3f3ebf3cb18fb38), I64(0x3030c0309df060ad), I64(0xefef9bef2b74c3c4), - I64(0x3f3ffc3fe5c37eda), I64(0x55554955921caac7), I64(0xa2a2b2a2791059db), I64(0xeaea8fea0365c9e9), - I64(0x656589650fecca6a), I64(0xbabad2bab9686903), I64(0x2f2fbc2f65935e4a), I64(0xc0c027c04ee79d8e), - I64(0xdede5fdebe81a160), I64(0x1c1c701ce06c38fc), I64(0xfdfdd3fdbb2ee746), I64(0x4d4d294d52649a1f), - I64(0x92927292e4e03976), I64(0x7575c9758fbceafa), I64(0x06061806301e0c36), I64(0x8a8a128a249809ae), - I64(0xb2b2f2b2f940794b), I64(0xe6e6bfe66359d185), I64(0x0e0e380e70361c7e), I64(0x1f1f7c1ff8633ee7), - I64(0x6262956237f7c455), I64(0xd4d477d4eea3b53a), I64(0xa8a89aa829324d81), I64(0x96966296c4f43152), - I64(0xf9f9c3f99b3aef62), I64(0xc5c533c566f697a3), I64(0x2525942535b14a10), I64(0x59597959f220b2ab), - I64(0x84842a8454ae15d0), I64(0x7272d572b7a7e4c5), I64(0x3939e439d5dd72ec), I64(0x4c4c2d4c5a619816), - I64(0x5e5e655eca3bbc94), I64(0x7878fd78e785f09f), I64(0x3838e038ddd870e5), I64(0x8c8c0a8c14860598), - I64(0xd1d163d1c6b2bf17), I64(0xa5a5aea5410b57e4), I64(0xe2e2afe2434dd9a1), I64(0x616199612ff8c24e), - I64(0xb3b3f6b3f1457b42), I64(0x2121842115a54234), I64(0x9c9c4a9c94d62508), I64(0x1e1e781ef0663cee), - I64(0x4343114322528661), I64(0xc7c73bc776fc93b1), I64(0xfcfcd7fcb32be54f), I64(0x0404100420140824), - I64(0x51515951b208a2e3), I64(0x99995e99bcc72f25), I64(0x6d6da96d4fc4da22), I64(0x0d0d340d68391a65), - I64(0xfafacffa8335e979), I64(0xdfdf5bdfb684a369), I64(0x7e7ee57ed79bfca9), I64(0x242490243db44819), - I64(0x3b3bec3bc5d776fe), I64(0xabab96ab313d4b9a), I64(0xcece1fce3ed181f0), I64(0x1111441188552299), - I64(0x8f8f068f0c890383), I64(0x4e4e254e4a6b9c04), I64(0xb7b7e6b7d1517366), I64(0xebeb8beb0b60cbe0), - I64(0x3c3cf03cfdcc78c1), I64(0x81813e817cbf1ffd), I64(0x94946a94d4fe3540), I64(0xf7f7fbf7eb0cf31c), - I64(0xb9b9deb9a1676f18), I64(0x13134c13985f268b), I64(0x2c2cb02c7d9c5851), I64(0xd3d36bd3d6b8bb05), - I64(0xe7e7bbe76b5cd38c), I64(0x6e6ea56e57cbdc39), I64(0xc4c437c46ef395aa), I64(0x03030c03180f061b), - I64(0x565645568a13acdc), I64(0x44440d441a49885e), I64(0x7f7fe17fdf9efea0), I64(0xa9a99ea921374f88), - I64(0x2a2aa82a4d825467), I64(0xbbbbd6bbb16d6b0a), I64(0xc1c123c146e29f87), I64(0x53535153a202a6f1), - I64(0xdcdc57dcae8ba572), I64(0x0b0b2c0b58271653), I64(0x9d9d4e9d9cd32701), I64(0x6c6cad6c47c1d82b), - I64(0x3131c43195f562a4), I64(0x7474cd7487b9e8f3), I64(0xf6f6fff6e309f115), I64(0x464605460a438c4c), - I64(0xacac8aac092645a5), I64(0x89891e893c970fb5), I64(0x14145014a04428b4), I64(0xe1e1a3e15b42dfba), - I64(0x16165816b04e2ca6), I64(0x3a3ae83acdd274f7), I64(0x6969b9696fd0d206), I64(0x09092409482d1241), - I64(0x7070dd70a7ade0d7), I64(0xb6b6e2b6d954716f), I64(0xd0d067d0ceb7bd1e), I64(0xeded93ed3b7ec7d6), - I64(0xcccc17cc2edb85e2), I64(0x424215422a578468), I64(0x98985a98b4c22d2c), I64(0xa4a4aaa4490e55ed), - I64(0x2828a0285d885075), I64(0x5c5c6d5cda31b886), I64(0xf8f8c7f8933fed6b), I64(0x8686228644a411c2), - }, { - // C1 vectors - I64(0xd818186018c07830), I64(0x2623238c2305af46), I64(0xb8c6c63fc67ef991), I64(0xfbe8e887e8136fcd), - I64(0xcb878726874ca113), I64(0x11b8b8dab8a9626d), I64(0x0901010401080502), I64(0x0d4f4f214f426e9e), - I64(0x9b3636d836adee6c), I64(0xffa6a6a2a6590451), I64(0x0cd2d26fd2debdb9), I64(0x0ef5f5f3f5fb06f7), - I64(0x967979f979ef80f2), I64(0x306f6fa16f5fcede), I64(0x6d91917e91fcef3f), I64(0xf852525552aa07a4), - I64(0x4760609d6027fdc0), I64(0x35bcbccabc897665), I64(0x379b9b569baccd2b), I64(0x8a8e8e028e048c01), - I64(0xd2a3a3b6a371155b), I64(0x6c0c0c300c603c18), I64(0x847b7bf17bff8af6), I64(0x803535d435b5e16a), - I64(0xf51d1d741de8693a), I64(0xb3e0e0a7e05347dd), I64(0x21d7d77bd7f6acb3), I64(0x9cc2c22fc25eed99), - I64(0x432e2eb82e6d965c), I64(0x294b4b314b627a96), I64(0x5dfefedffea321e1), I64(0xd5575741578216ae), - I64(0xbd15155415a8412a), I64(0xe87777c1779fb6ee), I64(0x923737dc37a5eb6e), I64(0x9ee5e5b3e57b56d7), - I64(0x139f9f469f8cd923), I64(0x23f0f0e7f0d317fd), I64(0x204a4a354a6a7f94), I64(0x44dada4fda9e95a9), - I64(0xa258587d58fa25b0), I64(0xcfc9c903c906ca8f), I64(0x7c2929a429558d52), I64(0x5a0a0a280a502214), - I64(0x50b1b1feb1e14f7f), I64(0xc9a0a0baa0691a5d), I64(0x146b6bb16b7fdad6), I64(0xd985852e855cab17), - I64(0x3cbdbdcebd817367), I64(0x8f5d5d695dd234ba), I64(0x9010104010805020), I64(0x07f4f4f7f4f303f5), - I64(0xddcbcb0bcb16c08b), I64(0xd33e3ef83eedc67c), I64(0x2d0505140528110a), I64(0x78676781671fe6ce), - I64(0x97e4e4b7e47353d5), I64(0x0227279c2725bb4e), I64(0x7341411941325882), I64(0xa78b8b168b2c9d0b), - I64(0xf6a7a7a6a7510153), I64(0xb27d7de97dcf94fa), I64(0x4995956e95dcfb37), I64(0x56d8d847d88e9fad), - I64(0x70fbfbcbfb8b30eb), I64(0xcdeeee9fee2371c1), I64(0xbb7c7ced7cc791f8), I64(0x716666856617e3cc), - I64(0x7bdddd53dda68ea7), I64(0xaf17175c17b84b2e), I64(0x454747014702468e), I64(0x1a9e9e429e84dc21), - I64(0xd4caca0fca1ec589), I64(0x582d2db42d75995a), I64(0x2ebfbfc6bf917963), I64(0x3f07071c07381b0e), - I64(0xacadad8ead012347), I64(0xb05a5a755aea2fb4), I64(0xef838336836cb51b), I64(0xb63333cc3385ff66), - I64(0x5c636391633ff2c6), I64(0x1202020802100a04), I64(0x93aaaa92aa393849), I64(0xde7171d971afa8e2), - I64(0xc6c8c807c80ecf8d), I64(0xd119196419c87d32), I64(0x3b49493949727092), I64(0x5fd9d943d9869aaf), - I64(0x31f2f2eff2c31df9), I64(0xa8e3e3abe34b48db), I64(0xb95b5b715be22ab6), I64(0xbc88881a8834920d), - I64(0x3e9a9a529aa4c829), I64(0x0b262698262dbe4c), I64(0xbf3232c8328dfa64), I64(0x59b0b0fab0e94a7d), - I64(0xf2e9e983e91b6acf), I64(0x770f0f3c0f78331e), I64(0x33d5d573d5e6a6b7), I64(0xf480803a8074ba1d), - I64(0x27bebec2be997c61), I64(0xebcdcd13cd26de87), I64(0x893434d034bde468), I64(0x3248483d487a7590), - I64(0x54ffffdbffab24e3), I64(0x8d7a7af57af78ff4), I64(0x6490907a90f4ea3d), I64(0x9d5f5f615fc23ebe), - I64(0x3d202080201da040), I64(0x0f6868bd6867d5d0), I64(0xca1a1a681ad07234), I64(0xb7aeae82ae192c41), - I64(0x7db4b4eab4c95e75), I64(0xce54544d549a19a8), I64(0x7f93937693ece53b), I64(0x2f222288220daa44), - I64(0x6364648d6407e9c8), I64(0x2af1f1e3f1db12ff), I64(0xcc7373d173bfa2e6), I64(0x8212124812905a24), - I64(0x7a40401d403a5d80), I64(0x4808082008402810), I64(0x95c3c32bc356e89b), I64(0xdfecec97ec337bc5), - I64(0x4ddbdb4bdb9690ab), I64(0xc0a1a1bea1611f5f), I64(0x918d8d0e8d1c8307), I64(0xc83d3df43df5c97a), - I64(0x5b97976697ccf133), I64(0x0000000000000000), I64(0xf9cfcf1bcf36d483), I64(0x6e2b2bac2b458756), - I64(0xe17676c57697b3ec), I64(0xe68282328264b019), I64(0x28d6d67fd6fea9b1), I64(0xc31b1b6c1bd87736), - I64(0x74b5b5eeb5c15b77), I64(0xbeafaf86af112943), I64(0x1d6a6ab56a77dfd4), I64(0xea50505d50ba0da0), - I64(0x5745450945124c8a), I64(0x38f3f3ebf3cb18fb), I64(0xad3030c0309df060), I64(0xc4efef9bef2b74c3), - I64(0xda3f3ffc3fe5c37e), I64(0xc755554955921caa), I64(0xdba2a2b2a2791059), I64(0xe9eaea8fea0365c9), - I64(0x6a656589650fecca), I64(0x03babad2bab96869), I64(0x4a2f2fbc2f65935e), I64(0x8ec0c027c04ee79d), - I64(0x60dede5fdebe81a1), I64(0xfc1c1c701ce06c38), I64(0x46fdfdd3fdbb2ee7), I64(0x1f4d4d294d52649a), - I64(0x7692927292e4e039), I64(0xfa7575c9758fbcea), I64(0x3606061806301e0c), I64(0xae8a8a128a249809), - I64(0x4bb2b2f2b2f94079), I64(0x85e6e6bfe66359d1), I64(0x7e0e0e380e70361c), I64(0xe71f1f7c1ff8633e), - I64(0x556262956237f7c4), I64(0x3ad4d477d4eea3b5), I64(0x81a8a89aa829324d), I64(0x5296966296c4f431), - I64(0x62f9f9c3f99b3aef), I64(0xa3c5c533c566f697), I64(0x102525942535b14a), I64(0xab59597959f220b2), - I64(0xd084842a8454ae15), I64(0xc57272d572b7a7e4), I64(0xec3939e439d5dd72), I64(0x164c4c2d4c5a6198), - I64(0x945e5e655eca3bbc), I64(0x9f7878fd78e785f0), I64(0xe53838e038ddd870), I64(0x988c8c0a8c148605), - I64(0x17d1d163d1c6b2bf), I64(0xe4a5a5aea5410b57), I64(0xa1e2e2afe2434dd9), I64(0x4e616199612ff8c2), - I64(0x42b3b3f6b3f1457b), I64(0x342121842115a542), I64(0x089c9c4a9c94d625), I64(0xee1e1e781ef0663c), - I64(0x6143431143225286), I64(0xb1c7c73bc776fc93), I64(0x4ffcfcd7fcb32be5), I64(0x2404041004201408), - I64(0xe351515951b208a2), I64(0x2599995e99bcc72f), I64(0x226d6da96d4fc4da), I64(0x650d0d340d68391a), - I64(0x79fafacffa8335e9), I64(0x69dfdf5bdfb684a3), I64(0xa97e7ee57ed79bfc), I64(0x19242490243db448), - I64(0xfe3b3bec3bc5d776), I64(0x9aabab96ab313d4b), I64(0xf0cece1fce3ed181), I64(0x9911114411885522), - I64(0x838f8f068f0c8903), I64(0x044e4e254e4a6b9c), I64(0x66b7b7e6b7d15173), I64(0xe0ebeb8beb0b60cb), - I64(0xc13c3cf03cfdcc78), I64(0xfd81813e817cbf1f), I64(0x4094946a94d4fe35), I64(0x1cf7f7fbf7eb0cf3), - I64(0x18b9b9deb9a1676f), I64(0x8b13134c13985f26), I64(0x512c2cb02c7d9c58), I64(0x05d3d36bd3d6b8bb), - I64(0x8ce7e7bbe76b5cd3), I64(0x396e6ea56e57cbdc), I64(0xaac4c437c46ef395), I64(0x1b03030c03180f06), - I64(0xdc565645568a13ac), I64(0x5e44440d441a4988), I64(0xa07f7fe17fdf9efe), I64(0x88a9a99ea921374f), - I64(0x672a2aa82a4d8254), I64(0x0abbbbd6bbb16d6b), I64(0x87c1c123c146e29f), I64(0xf153535153a202a6), - I64(0x72dcdc57dcae8ba5), I64(0x530b0b2c0b582716), I64(0x019d9d4e9d9cd327), I64(0x2b6c6cad6c47c1d8), - I64(0xa43131c43195f562), I64(0xf37474cd7487b9e8), I64(0x15f6f6fff6e309f1), I64(0x4c464605460a438c), - I64(0xa5acac8aac092645), I64(0xb589891e893c970f), I64(0xb414145014a04428), I64(0xbae1e1a3e15b42df), - I64(0xa616165816b04e2c), I64(0xf73a3ae83acdd274), I64(0x066969b9696fd0d2), I64(0x4109092409482d12), - I64(0xd77070dd70a7ade0), I64(0x6fb6b6e2b6d95471), I64(0x1ed0d067d0ceb7bd), I64(0xd6eded93ed3b7ec7), - I64(0xe2cccc17cc2edb85), I64(0x68424215422a5784), I64(0x2c98985a98b4c22d), I64(0xeda4a4aaa4490e55), - I64(0x752828a0285d8850), I64(0x865c5c6d5cda31b8), I64(0x6bf8f8c7f8933fed), I64(0xc28686228644a411), - }, { - // C2 vectors - I64(0x30d818186018c078), I64(0x462623238c2305af), I64(0x91b8c6c63fc67ef9), I64(0xcdfbe8e887e8136f), - I64(0x13cb878726874ca1), I64(0x6d11b8b8dab8a962), I64(0x0209010104010805), I64(0x9e0d4f4f214f426e), - I64(0x6c9b3636d836adee), I64(0x51ffa6a6a2a65904), I64(0xb90cd2d26fd2debd), I64(0xf70ef5f5f3f5fb06), - I64(0xf2967979f979ef80), I64(0xde306f6fa16f5fce), I64(0x3f6d91917e91fcef), I64(0xa4f852525552aa07), - I64(0xc04760609d6027fd), I64(0x6535bcbccabc8976), I64(0x2b379b9b569baccd), I64(0x018a8e8e028e048c), - I64(0x5bd2a3a3b6a37115), I64(0x186c0c0c300c603c), I64(0xf6847b7bf17bff8a), I64(0x6a803535d435b5e1), - I64(0x3af51d1d741de869), I64(0xddb3e0e0a7e05347), I64(0xb321d7d77bd7f6ac), I64(0x999cc2c22fc25eed), - I64(0x5c432e2eb82e6d96), I64(0x96294b4b314b627a), I64(0xe15dfefedffea321), I64(0xaed5575741578216), - I64(0x2abd15155415a841), I64(0xeee87777c1779fb6), I64(0x6e923737dc37a5eb), I64(0xd79ee5e5b3e57b56), - I64(0x23139f9f469f8cd9), I64(0xfd23f0f0e7f0d317), I64(0x94204a4a354a6a7f), I64(0xa944dada4fda9e95), - I64(0xb0a258587d58fa25), I64(0x8fcfc9c903c906ca), I64(0x527c2929a429558d), I64(0x145a0a0a280a5022), - I64(0x7f50b1b1feb1e14f), I64(0x5dc9a0a0baa0691a), I64(0xd6146b6bb16b7fda), I64(0x17d985852e855cab), - I64(0x673cbdbdcebd8173), I64(0xba8f5d5d695dd234), I64(0x2090101040108050), I64(0xf507f4f4f7f4f303), - I64(0x8bddcbcb0bcb16c0), I64(0x7cd33e3ef83eedc6), I64(0x0a2d050514052811), I64(0xce78676781671fe6), - I64(0xd597e4e4b7e47353), I64(0x4e0227279c2725bb), I64(0x8273414119413258), I64(0x0ba78b8b168b2c9d), - I64(0x53f6a7a7a6a75101), I64(0xfab27d7de97dcf94), I64(0x374995956e95dcfb), I64(0xad56d8d847d88e9f), - I64(0xeb70fbfbcbfb8b30), I64(0xc1cdeeee9fee2371), I64(0xf8bb7c7ced7cc791), I64(0xcc716666856617e3), - I64(0xa77bdddd53dda68e), I64(0x2eaf17175c17b84b), I64(0x8e45474701470246), I64(0x211a9e9e429e84dc), - I64(0x89d4caca0fca1ec5), I64(0x5a582d2db42d7599), I64(0x632ebfbfc6bf9179), I64(0x0e3f07071c07381b), - I64(0x47acadad8ead0123), I64(0xb4b05a5a755aea2f), I64(0x1bef838336836cb5), I64(0x66b63333cc3385ff), - I64(0xc65c636391633ff2), I64(0x041202020802100a), I64(0x4993aaaa92aa3938), I64(0xe2de7171d971afa8), - I64(0x8dc6c8c807c80ecf), I64(0x32d119196419c87d), I64(0x923b494939497270), I64(0xaf5fd9d943d9869a), - I64(0xf931f2f2eff2c31d), I64(0xdba8e3e3abe34b48), I64(0xb6b95b5b715be22a), I64(0x0dbc88881a883492), - I64(0x293e9a9a529aa4c8), I64(0x4c0b262698262dbe), I64(0x64bf3232c8328dfa), I64(0x7d59b0b0fab0e94a), - I64(0xcff2e9e983e91b6a), I64(0x1e770f0f3c0f7833), I64(0xb733d5d573d5e6a6), I64(0x1df480803a8074ba), - I64(0x6127bebec2be997c), I64(0x87ebcdcd13cd26de), I64(0x68893434d034bde4), I64(0x903248483d487a75), - I64(0xe354ffffdbffab24), I64(0xf48d7a7af57af78f), I64(0x3d6490907a90f4ea), I64(0xbe9d5f5f615fc23e), - I64(0x403d202080201da0), I64(0xd00f6868bd6867d5), I64(0x34ca1a1a681ad072), I64(0x41b7aeae82ae192c), - I64(0x757db4b4eab4c95e), I64(0xa8ce54544d549a19), I64(0x3b7f93937693ece5), I64(0x442f222288220daa), - I64(0xc86364648d6407e9), I64(0xff2af1f1e3f1db12), I64(0xe6cc7373d173bfa2), I64(0x248212124812905a), - I64(0x807a40401d403a5d), I64(0x1048080820084028), I64(0x9b95c3c32bc356e8), I64(0xc5dfecec97ec337b), - I64(0xab4ddbdb4bdb9690), I64(0x5fc0a1a1bea1611f), I64(0x07918d8d0e8d1c83), I64(0x7ac83d3df43df5c9), - I64(0x335b97976697ccf1), I64(0x0000000000000000), I64(0x83f9cfcf1bcf36d4), I64(0x566e2b2bac2b4587), - I64(0xece17676c57697b3), I64(0x19e68282328264b0), I64(0xb128d6d67fd6fea9), I64(0x36c31b1b6c1bd877), - I64(0x7774b5b5eeb5c15b), I64(0x43beafaf86af1129), I64(0xd41d6a6ab56a77df), I64(0xa0ea50505d50ba0d), - I64(0x8a5745450945124c), I64(0xfb38f3f3ebf3cb18), I64(0x60ad3030c0309df0), I64(0xc3c4efef9bef2b74), - I64(0x7eda3f3ffc3fe5c3), I64(0xaac755554955921c), I64(0x59dba2a2b2a27910), I64(0xc9e9eaea8fea0365), - I64(0xca6a656589650fec), I64(0x6903babad2bab968), I64(0x5e4a2f2fbc2f6593), I64(0x9d8ec0c027c04ee7), - I64(0xa160dede5fdebe81), I64(0x38fc1c1c701ce06c), I64(0xe746fdfdd3fdbb2e), I64(0x9a1f4d4d294d5264), - I64(0x397692927292e4e0), I64(0xeafa7575c9758fbc), I64(0x0c3606061806301e), I64(0x09ae8a8a128a2498), - I64(0x794bb2b2f2b2f940), I64(0xd185e6e6bfe66359), I64(0x1c7e0e0e380e7036), I64(0x3ee71f1f7c1ff863), - I64(0xc4556262956237f7), I64(0xb53ad4d477d4eea3), I64(0x4d81a8a89aa82932), I64(0x315296966296c4f4), - I64(0xef62f9f9c3f99b3a), I64(0x97a3c5c533c566f6), I64(0x4a102525942535b1), I64(0xb2ab59597959f220), - I64(0x15d084842a8454ae), I64(0xe4c57272d572b7a7), I64(0x72ec3939e439d5dd), I64(0x98164c4c2d4c5a61), - I64(0xbc945e5e655eca3b), I64(0xf09f7878fd78e785), I64(0x70e53838e038ddd8), I64(0x05988c8c0a8c1486), - I64(0xbf17d1d163d1c6b2), I64(0x57e4a5a5aea5410b), I64(0xd9a1e2e2afe2434d), I64(0xc24e616199612ff8), - I64(0x7b42b3b3f6b3f145), I64(0x42342121842115a5), I64(0x25089c9c4a9c94d6), I64(0x3cee1e1e781ef066), - I64(0x8661434311432252), I64(0x93b1c7c73bc776fc), I64(0xe54ffcfcd7fcb32b), I64(0x0824040410042014), - I64(0xa2e351515951b208), I64(0x2f2599995e99bcc7), I64(0xda226d6da96d4fc4), I64(0x1a650d0d340d6839), - I64(0xe979fafacffa8335), I64(0xa369dfdf5bdfb684), I64(0xfca97e7ee57ed79b), I64(0x4819242490243db4), - I64(0x76fe3b3bec3bc5d7), I64(0x4b9aabab96ab313d), I64(0x81f0cece1fce3ed1), I64(0x2299111144118855), - I64(0x03838f8f068f0c89), I64(0x9c044e4e254e4a6b), I64(0x7366b7b7e6b7d151), I64(0xcbe0ebeb8beb0b60), - I64(0x78c13c3cf03cfdcc), I64(0x1ffd81813e817cbf), I64(0x354094946a94d4fe), I64(0xf31cf7f7fbf7eb0c), - I64(0x6f18b9b9deb9a167), I64(0x268b13134c13985f), I64(0x58512c2cb02c7d9c), I64(0xbb05d3d36bd3d6b8), - I64(0xd38ce7e7bbe76b5c), I64(0xdc396e6ea56e57cb), I64(0x95aac4c437c46ef3), I64(0x061b03030c03180f), - I64(0xacdc565645568a13), I64(0x885e44440d441a49), I64(0xfea07f7fe17fdf9e), I64(0x4f88a9a99ea92137), - I64(0x54672a2aa82a4d82), I64(0x6b0abbbbd6bbb16d), I64(0x9f87c1c123c146e2), I64(0xa6f153535153a202), - I64(0xa572dcdc57dcae8b), I64(0x16530b0b2c0b5827), I64(0x27019d9d4e9d9cd3), I64(0xd82b6c6cad6c47c1), - I64(0x62a43131c43195f5), I64(0xe8f37474cd7487b9), I64(0xf115f6f6fff6e309), I64(0x8c4c464605460a43), - I64(0x45a5acac8aac0926), I64(0x0fb589891e893c97), I64(0x28b414145014a044), I64(0xdfbae1e1a3e15b42), - I64(0x2ca616165816b04e), I64(0x74f73a3ae83acdd2), I64(0xd2066969b9696fd0), I64(0x124109092409482d), - I64(0xe0d77070dd70a7ad), I64(0x716fb6b6e2b6d954), I64(0xbd1ed0d067d0ceb7), I64(0xc7d6eded93ed3b7e), - I64(0x85e2cccc17cc2edb), I64(0x8468424215422a57), I64(0x2d2c98985a98b4c2), I64(0x55eda4a4aaa4490e), - I64(0x50752828a0285d88), I64(0xb8865c5c6d5cda31), I64(0xed6bf8f8c7f8933f), I64(0x11c28686228644a4), - }, { - // C3 vectors - I64(0x7830d818186018c0), I64(0xaf462623238c2305), I64(0xf991b8c6c63fc67e), I64(0x6fcdfbe8e887e813), - I64(0xa113cb878726874c), I64(0x626d11b8b8dab8a9), I64(0x0502090101040108), I64(0x6e9e0d4f4f214f42), - I64(0xee6c9b3636d836ad), I64(0x0451ffa6a6a2a659), I64(0xbdb90cd2d26fd2de), I64(0x06f70ef5f5f3f5fb), - I64(0x80f2967979f979ef), I64(0xcede306f6fa16f5f), I64(0xef3f6d91917e91fc), I64(0x07a4f852525552aa), - I64(0xfdc04760609d6027), I64(0x766535bcbccabc89), I64(0xcd2b379b9b569bac), I64(0x8c018a8e8e028e04), - I64(0x155bd2a3a3b6a371), I64(0x3c186c0c0c300c60), I64(0x8af6847b7bf17bff), I64(0xe16a803535d435b5), - I64(0x693af51d1d741de8), I64(0x47ddb3e0e0a7e053), I64(0xacb321d7d77bd7f6), I64(0xed999cc2c22fc25e), - I64(0x965c432e2eb82e6d), I64(0x7a96294b4b314b62), I64(0x21e15dfefedffea3), I64(0x16aed55757415782), - I64(0x412abd15155415a8), I64(0xb6eee87777c1779f), I64(0xeb6e923737dc37a5), I64(0x56d79ee5e5b3e57b), - I64(0xd923139f9f469f8c), I64(0x17fd23f0f0e7f0d3), I64(0x7f94204a4a354a6a), I64(0x95a944dada4fda9e), - I64(0x25b0a258587d58fa), I64(0xca8fcfc9c903c906), I64(0x8d527c2929a42955), I64(0x22145a0a0a280a50), - I64(0x4f7f50b1b1feb1e1), I64(0x1a5dc9a0a0baa069), I64(0xdad6146b6bb16b7f), I64(0xab17d985852e855c), - I64(0x73673cbdbdcebd81), I64(0x34ba8f5d5d695dd2), I64(0x5020901010401080), I64(0x03f507f4f4f7f4f3), - I64(0xc08bddcbcb0bcb16), I64(0xc67cd33e3ef83eed), I64(0x110a2d0505140528), I64(0xe6ce78676781671f), - I64(0x53d597e4e4b7e473), I64(0xbb4e0227279c2725), I64(0x5882734141194132), I64(0x9d0ba78b8b168b2c), - I64(0x0153f6a7a7a6a751), I64(0x94fab27d7de97dcf), I64(0xfb374995956e95dc), I64(0x9fad56d8d847d88e), - I64(0x30eb70fbfbcbfb8b), I64(0x71c1cdeeee9fee23), I64(0x91f8bb7c7ced7cc7), I64(0xe3cc716666856617), - I64(0x8ea77bdddd53dda6), I64(0x4b2eaf17175c17b8), I64(0x468e454747014702), I64(0xdc211a9e9e429e84), - I64(0xc589d4caca0fca1e), I64(0x995a582d2db42d75), I64(0x79632ebfbfc6bf91), I64(0x1b0e3f07071c0738), - I64(0x2347acadad8ead01), I64(0x2fb4b05a5a755aea), I64(0xb51bef838336836c), I64(0xff66b63333cc3385), - I64(0xf2c65c636391633f), I64(0x0a04120202080210), I64(0x384993aaaa92aa39), I64(0xa8e2de7171d971af), - I64(0xcf8dc6c8c807c80e), I64(0x7d32d119196419c8), I64(0x70923b4949394972), I64(0x9aaf5fd9d943d986), - I64(0x1df931f2f2eff2c3), I64(0x48dba8e3e3abe34b), I64(0x2ab6b95b5b715be2), I64(0x920dbc88881a8834), - I64(0xc8293e9a9a529aa4), I64(0xbe4c0b262698262d), I64(0xfa64bf3232c8328d), I64(0x4a7d59b0b0fab0e9), - I64(0x6acff2e9e983e91b), I64(0x331e770f0f3c0f78), I64(0xa6b733d5d573d5e6), I64(0xba1df480803a8074), - I64(0x7c6127bebec2be99), I64(0xde87ebcdcd13cd26), I64(0xe468893434d034bd), I64(0x75903248483d487a), - I64(0x24e354ffffdbffab), I64(0x8ff48d7a7af57af7), I64(0xea3d6490907a90f4), I64(0x3ebe9d5f5f615fc2), - I64(0xa0403d202080201d), I64(0xd5d00f6868bd6867), I64(0x7234ca1a1a681ad0), I64(0x2c41b7aeae82ae19), - I64(0x5e757db4b4eab4c9), I64(0x19a8ce54544d549a), I64(0xe53b7f93937693ec), I64(0xaa442f222288220d), - I64(0xe9c86364648d6407), I64(0x12ff2af1f1e3f1db), I64(0xa2e6cc7373d173bf), I64(0x5a24821212481290), - I64(0x5d807a40401d403a), I64(0x2810480808200840), I64(0xe89b95c3c32bc356), I64(0x7bc5dfecec97ec33), - I64(0x90ab4ddbdb4bdb96), I64(0x1f5fc0a1a1bea161), I64(0x8307918d8d0e8d1c), I64(0xc97ac83d3df43df5), - I64(0xf1335b97976697cc), I64(0x0000000000000000), I64(0xd483f9cfcf1bcf36), I64(0x87566e2b2bac2b45), - I64(0xb3ece17676c57697), I64(0xb019e68282328264), I64(0xa9b128d6d67fd6fe), I64(0x7736c31b1b6c1bd8), - I64(0x5b7774b5b5eeb5c1), I64(0x2943beafaf86af11), I64(0xdfd41d6a6ab56a77), I64(0x0da0ea50505d50ba), - I64(0x4c8a574545094512), I64(0x18fb38f3f3ebf3cb), I64(0xf060ad3030c0309d), I64(0x74c3c4efef9bef2b), - I64(0xc37eda3f3ffc3fe5), I64(0x1caac75555495592), I64(0x1059dba2a2b2a279), I64(0x65c9e9eaea8fea03), - I64(0xecca6a656589650f), I64(0x686903babad2bab9), I64(0x935e4a2f2fbc2f65), I64(0xe79d8ec0c027c04e), - I64(0x81a160dede5fdebe), I64(0x6c38fc1c1c701ce0), I64(0x2ee746fdfdd3fdbb), I64(0x649a1f4d4d294d52), - I64(0xe0397692927292e4), I64(0xbceafa7575c9758f), I64(0x1e0c360606180630), I64(0x9809ae8a8a128a24), - I64(0x40794bb2b2f2b2f9), I64(0x59d185e6e6bfe663), I64(0x361c7e0e0e380e70), I64(0x633ee71f1f7c1ff8), - I64(0xf7c4556262956237), I64(0xa3b53ad4d477d4ee), I64(0x324d81a8a89aa829), I64(0xf4315296966296c4), - I64(0x3aef62f9f9c3f99b), I64(0xf697a3c5c533c566), I64(0xb14a102525942535), I64(0x20b2ab59597959f2), - I64(0xae15d084842a8454), I64(0xa7e4c57272d572b7), I64(0xdd72ec3939e439d5), I64(0x6198164c4c2d4c5a), - I64(0x3bbc945e5e655eca), I64(0x85f09f7878fd78e7), I64(0xd870e53838e038dd), I64(0x8605988c8c0a8c14), - I64(0xb2bf17d1d163d1c6), I64(0x0b57e4a5a5aea541), I64(0x4dd9a1e2e2afe243), I64(0xf8c24e616199612f), - I64(0x457b42b3b3f6b3f1), I64(0xa542342121842115), I64(0xd625089c9c4a9c94), I64(0x663cee1e1e781ef0), - I64(0x5286614343114322), I64(0xfc93b1c7c73bc776), I64(0x2be54ffcfcd7fcb3), I64(0x1408240404100420), - I64(0x08a2e351515951b2), I64(0xc72f2599995e99bc), I64(0xc4da226d6da96d4f), I64(0x391a650d0d340d68), - I64(0x35e979fafacffa83), I64(0x84a369dfdf5bdfb6), I64(0x9bfca97e7ee57ed7), I64(0xb44819242490243d), - I64(0xd776fe3b3bec3bc5), I64(0x3d4b9aabab96ab31), I64(0xd181f0cece1fce3e), I64(0x5522991111441188), - I64(0x8903838f8f068f0c), I64(0x6b9c044e4e254e4a), I64(0x517366b7b7e6b7d1), I64(0x60cbe0ebeb8beb0b), - I64(0xcc78c13c3cf03cfd), I64(0xbf1ffd81813e817c), I64(0xfe354094946a94d4), I64(0x0cf31cf7f7fbf7eb), - I64(0x676f18b9b9deb9a1), I64(0x5f268b13134c1398), I64(0x9c58512c2cb02c7d), I64(0xb8bb05d3d36bd3d6), - I64(0x5cd38ce7e7bbe76b), I64(0xcbdc396e6ea56e57), I64(0xf395aac4c437c46e), I64(0x0f061b03030c0318), - I64(0x13acdc565645568a), I64(0x49885e44440d441a), I64(0x9efea07f7fe17fdf), I64(0x374f88a9a99ea921), - I64(0x8254672a2aa82a4d), I64(0x6d6b0abbbbd6bbb1), I64(0xe29f87c1c123c146), I64(0x02a6f153535153a2), - I64(0x8ba572dcdc57dcae), I64(0x2716530b0b2c0b58), I64(0xd327019d9d4e9d9c), I64(0xc1d82b6c6cad6c47), - I64(0xf562a43131c43195), I64(0xb9e8f37474cd7487), I64(0x09f115f6f6fff6e3), I64(0x438c4c464605460a), - I64(0x2645a5acac8aac09), I64(0x970fb589891e893c), I64(0x4428b414145014a0), I64(0x42dfbae1e1a3e15b), - I64(0x4e2ca616165816b0), I64(0xd274f73a3ae83acd), I64(0xd0d2066969b9696f), I64(0x2d12410909240948), - I64(0xade0d77070dd70a7), I64(0x54716fb6b6e2b6d9), I64(0xb7bd1ed0d067d0ce), I64(0x7ec7d6eded93ed3b), - I64(0xdb85e2cccc17cc2e), I64(0x578468424215422a), I64(0xc22d2c98985a98b4), I64(0x0e55eda4a4aaa449), - I64(0x8850752828a0285d), I64(0x31b8865c5c6d5cda), I64(0x3fed6bf8f8c7f893), I64(0xa411c28686228644), - }, { - // C4 vectors - I64(0xc07830d818186018), I64(0x05af462623238c23), I64(0x7ef991b8c6c63fc6), I64(0x136fcdfbe8e887e8), - I64(0x4ca113cb87872687), I64(0xa9626d11b8b8dab8), I64(0x0805020901010401), I64(0x426e9e0d4f4f214f), - I64(0xadee6c9b3636d836), I64(0x590451ffa6a6a2a6), I64(0xdebdb90cd2d26fd2), I64(0xfb06f70ef5f5f3f5), - I64(0xef80f2967979f979), I64(0x5fcede306f6fa16f), I64(0xfcef3f6d91917e91), I64(0xaa07a4f852525552), - I64(0x27fdc04760609d60), I64(0x89766535bcbccabc), I64(0xaccd2b379b9b569b), I64(0x048c018a8e8e028e), - I64(0x71155bd2a3a3b6a3), I64(0x603c186c0c0c300c), I64(0xff8af6847b7bf17b), I64(0xb5e16a803535d435), - I64(0xe8693af51d1d741d), I64(0x5347ddb3e0e0a7e0), I64(0xf6acb321d7d77bd7), I64(0x5eed999cc2c22fc2), - I64(0x6d965c432e2eb82e), I64(0x627a96294b4b314b), I64(0xa321e15dfefedffe), I64(0x8216aed557574157), - I64(0xa8412abd15155415), I64(0x9fb6eee87777c177), I64(0xa5eb6e923737dc37), I64(0x7b56d79ee5e5b3e5), - I64(0x8cd923139f9f469f), I64(0xd317fd23f0f0e7f0), I64(0x6a7f94204a4a354a), I64(0x9e95a944dada4fda), - I64(0xfa25b0a258587d58), I64(0x06ca8fcfc9c903c9), I64(0x558d527c2929a429), I64(0x5022145a0a0a280a), - I64(0xe14f7f50b1b1feb1), I64(0x691a5dc9a0a0baa0), I64(0x7fdad6146b6bb16b), I64(0x5cab17d985852e85), - I64(0x8173673cbdbdcebd), I64(0xd234ba8f5d5d695d), I64(0x8050209010104010), I64(0xf303f507f4f4f7f4), - I64(0x16c08bddcbcb0bcb), I64(0xedc67cd33e3ef83e), I64(0x28110a2d05051405), I64(0x1fe6ce7867678167), - I64(0x7353d597e4e4b7e4), I64(0x25bb4e0227279c27), I64(0x3258827341411941), I64(0x2c9d0ba78b8b168b), - I64(0x510153f6a7a7a6a7), I64(0xcf94fab27d7de97d), I64(0xdcfb374995956e95), I64(0x8e9fad56d8d847d8), - I64(0x8b30eb70fbfbcbfb), I64(0x2371c1cdeeee9fee), I64(0xc791f8bb7c7ced7c), I64(0x17e3cc7166668566), - I64(0xa68ea77bdddd53dd), I64(0xb84b2eaf17175c17), I64(0x02468e4547470147), I64(0x84dc211a9e9e429e), - I64(0x1ec589d4caca0fca), I64(0x75995a582d2db42d), I64(0x9179632ebfbfc6bf), I64(0x381b0e3f07071c07), - I64(0x012347acadad8ead), I64(0xea2fb4b05a5a755a), I64(0x6cb51bef83833683), I64(0x85ff66b63333cc33), - I64(0x3ff2c65c63639163), I64(0x100a041202020802), I64(0x39384993aaaa92aa), I64(0xafa8e2de7171d971), - I64(0x0ecf8dc6c8c807c8), I64(0xc87d32d119196419), I64(0x7270923b49493949), I64(0x869aaf5fd9d943d9), - I64(0xc31df931f2f2eff2), I64(0x4b48dba8e3e3abe3), I64(0xe22ab6b95b5b715b), I64(0x34920dbc88881a88), - I64(0xa4c8293e9a9a529a), I64(0x2dbe4c0b26269826), I64(0x8dfa64bf3232c832), I64(0xe94a7d59b0b0fab0), - I64(0x1b6acff2e9e983e9), I64(0x78331e770f0f3c0f), I64(0xe6a6b733d5d573d5), I64(0x74ba1df480803a80), - I64(0x997c6127bebec2be), I64(0x26de87ebcdcd13cd), I64(0xbde468893434d034), I64(0x7a75903248483d48), - I64(0xab24e354ffffdbff), I64(0xf78ff48d7a7af57a), I64(0xf4ea3d6490907a90), I64(0xc23ebe9d5f5f615f), - I64(0x1da0403d20208020), I64(0x67d5d00f6868bd68), I64(0xd07234ca1a1a681a), I64(0x192c41b7aeae82ae), - I64(0xc95e757db4b4eab4), I64(0x9a19a8ce54544d54), I64(0xece53b7f93937693), I64(0x0daa442f22228822), - I64(0x07e9c86364648d64), I64(0xdb12ff2af1f1e3f1), I64(0xbfa2e6cc7373d173), I64(0x905a248212124812), - I64(0x3a5d807a40401d40), I64(0x4028104808082008), I64(0x56e89b95c3c32bc3), I64(0x337bc5dfecec97ec), - I64(0x9690ab4ddbdb4bdb), I64(0x611f5fc0a1a1bea1), I64(0x1c8307918d8d0e8d), I64(0xf5c97ac83d3df43d), - I64(0xccf1335b97976697), I64(0x0000000000000000), I64(0x36d483f9cfcf1bcf), I64(0x4587566e2b2bac2b), - I64(0x97b3ece17676c576), I64(0x64b019e682823282), I64(0xfea9b128d6d67fd6), I64(0xd87736c31b1b6c1b), - I64(0xc15b7774b5b5eeb5), I64(0x112943beafaf86af), I64(0x77dfd41d6a6ab56a), I64(0xba0da0ea50505d50), - I64(0x124c8a5745450945), I64(0xcb18fb38f3f3ebf3), I64(0x9df060ad3030c030), I64(0x2b74c3c4efef9bef), - I64(0xe5c37eda3f3ffc3f), I64(0x921caac755554955), I64(0x791059dba2a2b2a2), I64(0x0365c9e9eaea8fea), - I64(0x0fecca6a65658965), I64(0xb9686903babad2ba), I64(0x65935e4a2f2fbc2f), I64(0x4ee79d8ec0c027c0), - I64(0xbe81a160dede5fde), I64(0xe06c38fc1c1c701c), I64(0xbb2ee746fdfdd3fd), I64(0x52649a1f4d4d294d), - I64(0xe4e0397692927292), I64(0x8fbceafa7575c975), I64(0x301e0c3606061806), I64(0x249809ae8a8a128a), - I64(0xf940794bb2b2f2b2), I64(0x6359d185e6e6bfe6), I64(0x70361c7e0e0e380e), I64(0xf8633ee71f1f7c1f), - I64(0x37f7c45562629562), I64(0xeea3b53ad4d477d4), I64(0x29324d81a8a89aa8), I64(0xc4f4315296966296), - I64(0x9b3aef62f9f9c3f9), I64(0x66f697a3c5c533c5), I64(0x35b14a1025259425), I64(0xf220b2ab59597959), - I64(0x54ae15d084842a84), I64(0xb7a7e4c57272d572), I64(0xd5dd72ec3939e439), I64(0x5a6198164c4c2d4c), - I64(0xca3bbc945e5e655e), I64(0xe785f09f7878fd78), I64(0xddd870e53838e038), I64(0x148605988c8c0a8c), - I64(0xc6b2bf17d1d163d1), I64(0x410b57e4a5a5aea5), I64(0x434dd9a1e2e2afe2), I64(0x2ff8c24e61619961), - I64(0xf1457b42b3b3f6b3), I64(0x15a5423421218421), I64(0x94d625089c9c4a9c), I64(0xf0663cee1e1e781e), - I64(0x2252866143431143), I64(0x76fc93b1c7c73bc7), I64(0xb32be54ffcfcd7fc), I64(0x2014082404041004), - I64(0xb208a2e351515951), I64(0xbcc72f2599995e99), I64(0x4fc4da226d6da96d), I64(0x68391a650d0d340d), - I64(0x8335e979fafacffa), I64(0xb684a369dfdf5bdf), I64(0xd79bfca97e7ee57e), I64(0x3db4481924249024), - I64(0xc5d776fe3b3bec3b), I64(0x313d4b9aabab96ab), I64(0x3ed181f0cece1fce), I64(0x8855229911114411), - I64(0x0c8903838f8f068f), I64(0x4a6b9c044e4e254e), I64(0xd1517366b7b7e6b7), I64(0x0b60cbe0ebeb8beb), - I64(0xfdcc78c13c3cf03c), I64(0x7cbf1ffd81813e81), I64(0xd4fe354094946a94), I64(0xeb0cf31cf7f7fbf7), - I64(0xa1676f18b9b9deb9), I64(0x985f268b13134c13), I64(0x7d9c58512c2cb02c), I64(0xd6b8bb05d3d36bd3), - I64(0x6b5cd38ce7e7bbe7), I64(0x57cbdc396e6ea56e), I64(0x6ef395aac4c437c4), I64(0x180f061b03030c03), - I64(0x8a13acdc56564556), I64(0x1a49885e44440d44), I64(0xdf9efea07f7fe17f), I64(0x21374f88a9a99ea9), - I64(0x4d8254672a2aa82a), I64(0xb16d6b0abbbbd6bb), I64(0x46e29f87c1c123c1), I64(0xa202a6f153535153), - I64(0xae8ba572dcdc57dc), I64(0x582716530b0b2c0b), I64(0x9cd327019d9d4e9d), I64(0x47c1d82b6c6cad6c), - I64(0x95f562a43131c431), I64(0x87b9e8f37474cd74), I64(0xe309f115f6f6fff6), I64(0x0a438c4c46460546), - I64(0x092645a5acac8aac), I64(0x3c970fb589891e89), I64(0xa04428b414145014), I64(0x5b42dfbae1e1a3e1), - I64(0xb04e2ca616165816), I64(0xcdd274f73a3ae83a), I64(0x6fd0d2066969b969), I64(0x482d124109092409), - I64(0xa7ade0d77070dd70), I64(0xd954716fb6b6e2b6), I64(0xceb7bd1ed0d067d0), I64(0x3b7ec7d6eded93ed), - I64(0x2edb85e2cccc17cc), I64(0x2a57846842421542), I64(0xb4c22d2c98985a98), I64(0x490e55eda4a4aaa4), - I64(0x5d8850752828a028), I64(0xda31b8865c5c6d5c), I64(0x933fed6bf8f8c7f8), I64(0x44a411c286862286), - }, { - // C5 vectors - I64(0x18c07830d8181860), I64(0x2305af462623238c), I64(0xc67ef991b8c6c63f), I64(0xe8136fcdfbe8e887), - I64(0x874ca113cb878726), I64(0xb8a9626d11b8b8da), I64(0x0108050209010104), I64(0x4f426e9e0d4f4f21), - I64(0x36adee6c9b3636d8), I64(0xa6590451ffa6a6a2), I64(0xd2debdb90cd2d26f), I64(0xf5fb06f70ef5f5f3), - I64(0x79ef80f2967979f9), I64(0x6f5fcede306f6fa1), I64(0x91fcef3f6d91917e), I64(0x52aa07a4f8525255), - I64(0x6027fdc04760609d), I64(0xbc89766535bcbcca), I64(0x9baccd2b379b9b56), I64(0x8e048c018a8e8e02), - I64(0xa371155bd2a3a3b6), I64(0x0c603c186c0c0c30), I64(0x7bff8af6847b7bf1), I64(0x35b5e16a803535d4), - I64(0x1de8693af51d1d74), I64(0xe05347ddb3e0e0a7), I64(0xd7f6acb321d7d77b), I64(0xc25eed999cc2c22f), - I64(0x2e6d965c432e2eb8), I64(0x4b627a96294b4b31), I64(0xfea321e15dfefedf), I64(0x578216aed5575741), - I64(0x15a8412abd151554), I64(0x779fb6eee87777c1), I64(0x37a5eb6e923737dc), I64(0xe57b56d79ee5e5b3), - I64(0x9f8cd923139f9f46), I64(0xf0d317fd23f0f0e7), I64(0x4a6a7f94204a4a35), I64(0xda9e95a944dada4f), - I64(0x58fa25b0a258587d), I64(0xc906ca8fcfc9c903), I64(0x29558d527c2929a4), I64(0x0a5022145a0a0a28), - I64(0xb1e14f7f50b1b1fe), I64(0xa0691a5dc9a0a0ba), I64(0x6b7fdad6146b6bb1), I64(0x855cab17d985852e), - I64(0xbd8173673cbdbdce), I64(0x5dd234ba8f5d5d69), I64(0x1080502090101040), I64(0xf4f303f507f4f4f7), - I64(0xcb16c08bddcbcb0b), I64(0x3eedc67cd33e3ef8), I64(0x0528110a2d050514), I64(0x671fe6ce78676781), - I64(0xe47353d597e4e4b7), I64(0x2725bb4e0227279c), I64(0x4132588273414119), I64(0x8b2c9d0ba78b8b16), - I64(0xa7510153f6a7a7a6), I64(0x7dcf94fab27d7de9), I64(0x95dcfb374995956e), I64(0xd88e9fad56d8d847), - I64(0xfb8b30eb70fbfbcb), I64(0xee2371c1cdeeee9f), I64(0x7cc791f8bb7c7ced), I64(0x6617e3cc71666685), - I64(0xdda68ea77bdddd53), I64(0x17b84b2eaf17175c), I64(0x4702468e45474701), I64(0x9e84dc211a9e9e42), - I64(0xca1ec589d4caca0f), I64(0x2d75995a582d2db4), I64(0xbf9179632ebfbfc6), I64(0x07381b0e3f07071c), - I64(0xad012347acadad8e), I64(0x5aea2fb4b05a5a75), I64(0x836cb51bef838336), I64(0x3385ff66b63333cc), - I64(0x633ff2c65c636391), I64(0x02100a0412020208), I64(0xaa39384993aaaa92), I64(0x71afa8e2de7171d9), - I64(0xc80ecf8dc6c8c807), I64(0x19c87d32d1191964), I64(0x497270923b494939), I64(0xd9869aaf5fd9d943), - I64(0xf2c31df931f2f2ef), I64(0xe34b48dba8e3e3ab), I64(0x5be22ab6b95b5b71), I64(0x8834920dbc88881a), - I64(0x9aa4c8293e9a9a52), I64(0x262dbe4c0b262698), I64(0x328dfa64bf3232c8), I64(0xb0e94a7d59b0b0fa), - I64(0xe91b6acff2e9e983), I64(0x0f78331e770f0f3c), I64(0xd5e6a6b733d5d573), I64(0x8074ba1df480803a), - I64(0xbe997c6127bebec2), I64(0xcd26de87ebcdcd13), I64(0x34bde468893434d0), I64(0x487a75903248483d), - I64(0xffab24e354ffffdb), I64(0x7af78ff48d7a7af5), I64(0x90f4ea3d6490907a), I64(0x5fc23ebe9d5f5f61), - I64(0x201da0403d202080), I64(0x6867d5d00f6868bd), I64(0x1ad07234ca1a1a68), I64(0xae192c41b7aeae82), - I64(0xb4c95e757db4b4ea), I64(0x549a19a8ce54544d), I64(0x93ece53b7f939376), I64(0x220daa442f222288), - I64(0x6407e9c86364648d), I64(0xf1db12ff2af1f1e3), I64(0x73bfa2e6cc7373d1), I64(0x12905a2482121248), - I64(0x403a5d807a40401d), I64(0x0840281048080820), I64(0xc356e89b95c3c32b), I64(0xec337bc5dfecec97), - I64(0xdb9690ab4ddbdb4b), I64(0xa1611f5fc0a1a1be), I64(0x8d1c8307918d8d0e), I64(0x3df5c97ac83d3df4), - I64(0x97ccf1335b979766), I64(0x0000000000000000), I64(0xcf36d483f9cfcf1b), I64(0x2b4587566e2b2bac), - I64(0x7697b3ece17676c5), I64(0x8264b019e6828232), I64(0xd6fea9b128d6d67f), I64(0x1bd87736c31b1b6c), - I64(0xb5c15b7774b5b5ee), I64(0xaf112943beafaf86), I64(0x6a77dfd41d6a6ab5), I64(0x50ba0da0ea50505d), - I64(0x45124c8a57454509), I64(0xf3cb18fb38f3f3eb), I64(0x309df060ad3030c0), I64(0xef2b74c3c4efef9b), - I64(0x3fe5c37eda3f3ffc), I64(0x55921caac7555549), I64(0xa2791059dba2a2b2), I64(0xea0365c9e9eaea8f), - I64(0x650fecca6a656589), I64(0xbab9686903babad2), I64(0x2f65935e4a2f2fbc), I64(0xc04ee79d8ec0c027), - I64(0xdebe81a160dede5f), I64(0x1ce06c38fc1c1c70), I64(0xfdbb2ee746fdfdd3), I64(0x4d52649a1f4d4d29), - I64(0x92e4e03976929272), I64(0x758fbceafa7575c9), I64(0x06301e0c36060618), I64(0x8a249809ae8a8a12), - I64(0xb2f940794bb2b2f2), I64(0xe66359d185e6e6bf), I64(0x0e70361c7e0e0e38), I64(0x1ff8633ee71f1f7c), - I64(0x6237f7c455626295), I64(0xd4eea3b53ad4d477), I64(0xa829324d81a8a89a), I64(0x96c4f43152969662), - I64(0xf99b3aef62f9f9c3), I64(0xc566f697a3c5c533), I64(0x2535b14a10252594), I64(0x59f220b2ab595979), - I64(0x8454ae15d084842a), I64(0x72b7a7e4c57272d5), I64(0x39d5dd72ec3939e4), I64(0x4c5a6198164c4c2d), - I64(0x5eca3bbc945e5e65), I64(0x78e785f09f7878fd), I64(0x38ddd870e53838e0), I64(0x8c148605988c8c0a), - I64(0xd1c6b2bf17d1d163), I64(0xa5410b57e4a5a5ae), I64(0xe2434dd9a1e2e2af), I64(0x612ff8c24e616199), - I64(0xb3f1457b42b3b3f6), I64(0x2115a54234212184), I64(0x9c94d625089c9c4a), I64(0x1ef0663cee1e1e78), - I64(0x4322528661434311), I64(0xc776fc93b1c7c73b), I64(0xfcb32be54ffcfcd7), I64(0x0420140824040410), - I64(0x51b208a2e3515159), I64(0x99bcc72f2599995e), I64(0x6d4fc4da226d6da9), I64(0x0d68391a650d0d34), - I64(0xfa8335e979fafacf), I64(0xdfb684a369dfdf5b), I64(0x7ed79bfca97e7ee5), I64(0x243db44819242490), - I64(0x3bc5d776fe3b3bec), I64(0xab313d4b9aabab96), I64(0xce3ed181f0cece1f), I64(0x1188552299111144), - I64(0x8f0c8903838f8f06), I64(0x4e4a6b9c044e4e25), I64(0xb7d1517366b7b7e6), I64(0xeb0b60cbe0ebeb8b), - I64(0x3cfdcc78c13c3cf0), I64(0x817cbf1ffd81813e), I64(0x94d4fe354094946a), I64(0xf7eb0cf31cf7f7fb), - I64(0xb9a1676f18b9b9de), I64(0x13985f268b13134c), I64(0x2c7d9c58512c2cb0), I64(0xd3d6b8bb05d3d36b), - I64(0xe76b5cd38ce7e7bb), I64(0x6e57cbdc396e6ea5), I64(0xc46ef395aac4c437), I64(0x03180f061b03030c), - I64(0x568a13acdc565645), I64(0x441a49885e44440d), I64(0x7fdf9efea07f7fe1), I64(0xa921374f88a9a99e), - I64(0x2a4d8254672a2aa8), I64(0xbbb16d6b0abbbbd6), I64(0xc146e29f87c1c123), I64(0x53a202a6f1535351), - I64(0xdcae8ba572dcdc57), I64(0x0b582716530b0b2c), I64(0x9d9cd327019d9d4e), I64(0x6c47c1d82b6c6cad), - I64(0x3195f562a43131c4), I64(0x7487b9e8f37474cd), I64(0xf6e309f115f6f6ff), I64(0x460a438c4c464605), - I64(0xac092645a5acac8a), I64(0x893c970fb589891e), I64(0x14a04428b4141450), I64(0xe15b42dfbae1e1a3), - I64(0x16b04e2ca6161658), I64(0x3acdd274f73a3ae8), I64(0x696fd0d2066969b9), I64(0x09482d1241090924), - I64(0x70a7ade0d77070dd), I64(0xb6d954716fb6b6e2), I64(0xd0ceb7bd1ed0d067), I64(0xed3b7ec7d6eded93), - I64(0xcc2edb85e2cccc17), I64(0x422a578468424215), I64(0x98b4c22d2c98985a), I64(0xa4490e55eda4a4aa), - I64(0x285d8850752828a0), I64(0x5cda31b8865c5c6d), I64(0xf8933fed6bf8f8c7), I64(0x8644a411c2868622), - }, { - // C6 vectors - I64(0x6018c07830d81818), I64(0x8c2305af46262323), I64(0x3fc67ef991b8c6c6), I64(0x87e8136fcdfbe8e8), - I64(0x26874ca113cb8787), I64(0xdab8a9626d11b8b8), I64(0x0401080502090101), I64(0x214f426e9e0d4f4f), - I64(0xd836adee6c9b3636), I64(0xa2a6590451ffa6a6), I64(0x6fd2debdb90cd2d2), I64(0xf3f5fb06f70ef5f5), - I64(0xf979ef80f2967979), I64(0xa16f5fcede306f6f), I64(0x7e91fcef3f6d9191), I64(0x5552aa07a4f85252), - I64(0x9d6027fdc0476060), I64(0xcabc89766535bcbc), I64(0x569baccd2b379b9b), I64(0x028e048c018a8e8e), - I64(0xb6a371155bd2a3a3), I64(0x300c603c186c0c0c), I64(0xf17bff8af6847b7b), I64(0xd435b5e16a803535), - I64(0x741de8693af51d1d), I64(0xa7e05347ddb3e0e0), I64(0x7bd7f6acb321d7d7), I64(0x2fc25eed999cc2c2), - I64(0xb82e6d965c432e2e), I64(0x314b627a96294b4b), I64(0xdffea321e15dfefe), I64(0x41578216aed55757), - I64(0x5415a8412abd1515), I64(0xc1779fb6eee87777), I64(0xdc37a5eb6e923737), I64(0xb3e57b56d79ee5e5), - I64(0x469f8cd923139f9f), I64(0xe7f0d317fd23f0f0), I64(0x354a6a7f94204a4a), I64(0x4fda9e95a944dada), - I64(0x7d58fa25b0a25858), I64(0x03c906ca8fcfc9c9), I64(0xa429558d527c2929), I64(0x280a5022145a0a0a), - I64(0xfeb1e14f7f50b1b1), I64(0xbaa0691a5dc9a0a0), I64(0xb16b7fdad6146b6b), I64(0x2e855cab17d98585), - I64(0xcebd8173673cbdbd), I64(0x695dd234ba8f5d5d), I64(0x4010805020901010), I64(0xf7f4f303f507f4f4), - I64(0x0bcb16c08bddcbcb), I64(0xf83eedc67cd33e3e), I64(0x140528110a2d0505), I64(0x81671fe6ce786767), - I64(0xb7e47353d597e4e4), I64(0x9c2725bb4e022727), I64(0x1941325882734141), I64(0x168b2c9d0ba78b8b), - I64(0xa6a7510153f6a7a7), I64(0xe97dcf94fab27d7d), I64(0x6e95dcfb37499595), I64(0x47d88e9fad56d8d8), - I64(0xcbfb8b30eb70fbfb), I64(0x9fee2371c1cdeeee), I64(0xed7cc791f8bb7c7c), I64(0x856617e3cc716666), - I64(0x53dda68ea77bdddd), I64(0x5c17b84b2eaf1717), I64(0x014702468e454747), I64(0x429e84dc211a9e9e), - I64(0x0fca1ec589d4caca), I64(0xb42d75995a582d2d), I64(0xc6bf9179632ebfbf), I64(0x1c07381b0e3f0707), - I64(0x8ead012347acadad), I64(0x755aea2fb4b05a5a), I64(0x36836cb51bef8383), I64(0xcc3385ff66b63333), - I64(0x91633ff2c65c6363), I64(0x0802100a04120202), I64(0x92aa39384993aaaa), I64(0xd971afa8e2de7171), - I64(0x07c80ecf8dc6c8c8), I64(0x6419c87d32d11919), I64(0x39497270923b4949), I64(0x43d9869aaf5fd9d9), - I64(0xeff2c31df931f2f2), I64(0xabe34b48dba8e3e3), I64(0x715be22ab6b95b5b), I64(0x1a8834920dbc8888), - I64(0x529aa4c8293e9a9a), I64(0x98262dbe4c0b2626), I64(0xc8328dfa64bf3232), I64(0xfab0e94a7d59b0b0), - I64(0x83e91b6acff2e9e9), I64(0x3c0f78331e770f0f), I64(0x73d5e6a6b733d5d5), I64(0x3a8074ba1df48080), - I64(0xc2be997c6127bebe), I64(0x13cd26de87ebcdcd), I64(0xd034bde468893434), I64(0x3d487a7590324848), - I64(0xdbffab24e354ffff), I64(0xf57af78ff48d7a7a), I64(0x7a90f4ea3d649090), I64(0x615fc23ebe9d5f5f), - I64(0x80201da0403d2020), I64(0xbd6867d5d00f6868), I64(0x681ad07234ca1a1a), I64(0x82ae192c41b7aeae), - I64(0xeab4c95e757db4b4), I64(0x4d549a19a8ce5454), I64(0x7693ece53b7f9393), I64(0x88220daa442f2222), - I64(0x8d6407e9c8636464), I64(0xe3f1db12ff2af1f1), I64(0xd173bfa2e6cc7373), I64(0x4812905a24821212), - I64(0x1d403a5d807a4040), I64(0x2008402810480808), I64(0x2bc356e89b95c3c3), I64(0x97ec337bc5dfecec), - I64(0x4bdb9690ab4ddbdb), I64(0xbea1611f5fc0a1a1), I64(0x0e8d1c8307918d8d), I64(0xf43df5c97ac83d3d), - I64(0x6697ccf1335b9797), I64(0x0000000000000000), I64(0x1bcf36d483f9cfcf), I64(0xac2b4587566e2b2b), - I64(0xc57697b3ece17676), I64(0x328264b019e68282), I64(0x7fd6fea9b128d6d6), I64(0x6c1bd87736c31b1b), - I64(0xeeb5c15b7774b5b5), I64(0x86af112943beafaf), I64(0xb56a77dfd41d6a6a), I64(0x5d50ba0da0ea5050), - I64(0x0945124c8a574545), I64(0xebf3cb18fb38f3f3), I64(0xc0309df060ad3030), I64(0x9bef2b74c3c4efef), - I64(0xfc3fe5c37eda3f3f), I64(0x4955921caac75555), I64(0xb2a2791059dba2a2), I64(0x8fea0365c9e9eaea), - I64(0x89650fecca6a6565), I64(0xd2bab9686903baba), I64(0xbc2f65935e4a2f2f), I64(0x27c04ee79d8ec0c0), - I64(0x5fdebe81a160dede), I64(0x701ce06c38fc1c1c), I64(0xd3fdbb2ee746fdfd), I64(0x294d52649a1f4d4d), - I64(0x7292e4e039769292), I64(0xc9758fbceafa7575), I64(0x1806301e0c360606), I64(0x128a249809ae8a8a), - I64(0xf2b2f940794bb2b2), I64(0xbfe66359d185e6e6), I64(0x380e70361c7e0e0e), I64(0x7c1ff8633ee71f1f), - I64(0x956237f7c4556262), I64(0x77d4eea3b53ad4d4), I64(0x9aa829324d81a8a8), I64(0x6296c4f431529696), - I64(0xc3f99b3aef62f9f9), I64(0x33c566f697a3c5c5), I64(0x942535b14a102525), I64(0x7959f220b2ab5959), - I64(0x2a8454ae15d08484), I64(0xd572b7a7e4c57272), I64(0xe439d5dd72ec3939), I64(0x2d4c5a6198164c4c), - I64(0x655eca3bbc945e5e), I64(0xfd78e785f09f7878), I64(0xe038ddd870e53838), I64(0x0a8c148605988c8c), - I64(0x63d1c6b2bf17d1d1), I64(0xaea5410b57e4a5a5), I64(0xafe2434dd9a1e2e2), I64(0x99612ff8c24e6161), - I64(0xf6b3f1457b42b3b3), I64(0x842115a542342121), I64(0x4a9c94d625089c9c), I64(0x781ef0663cee1e1e), - I64(0x1143225286614343), I64(0x3bc776fc93b1c7c7), I64(0xd7fcb32be54ffcfc), I64(0x1004201408240404), - I64(0x5951b208a2e35151), I64(0x5e99bcc72f259999), I64(0xa96d4fc4da226d6d), I64(0x340d68391a650d0d), - I64(0xcffa8335e979fafa), I64(0x5bdfb684a369dfdf), I64(0xe57ed79bfca97e7e), I64(0x90243db448192424), - I64(0xec3bc5d776fe3b3b), I64(0x96ab313d4b9aabab), I64(0x1fce3ed181f0cece), I64(0x4411885522991111), - I64(0x068f0c8903838f8f), I64(0x254e4a6b9c044e4e), I64(0xe6b7d1517366b7b7), I64(0x8beb0b60cbe0ebeb), - I64(0xf03cfdcc78c13c3c), I64(0x3e817cbf1ffd8181), I64(0x6a94d4fe35409494), I64(0xfbf7eb0cf31cf7f7), - I64(0xdeb9a1676f18b9b9), I64(0x4c13985f268b1313), I64(0xb02c7d9c58512c2c), I64(0x6bd3d6b8bb05d3d3), - I64(0xbbe76b5cd38ce7e7), I64(0xa56e57cbdc396e6e), I64(0x37c46ef395aac4c4), I64(0x0c03180f061b0303), - I64(0x45568a13acdc5656), I64(0x0d441a49885e4444), I64(0xe17fdf9efea07f7f), I64(0x9ea921374f88a9a9), - I64(0xa82a4d8254672a2a), I64(0xd6bbb16d6b0abbbb), I64(0x23c146e29f87c1c1), I64(0x5153a202a6f15353), - I64(0x57dcae8ba572dcdc), I64(0x2c0b582716530b0b), I64(0x4e9d9cd327019d9d), I64(0xad6c47c1d82b6c6c), - I64(0xc43195f562a43131), I64(0xcd7487b9e8f37474), I64(0xfff6e309f115f6f6), I64(0x05460a438c4c4646), - I64(0x8aac092645a5acac), I64(0x1e893c970fb58989), I64(0x5014a04428b41414), I64(0xa3e15b42dfbae1e1), - I64(0x5816b04e2ca61616), I64(0xe83acdd274f73a3a), I64(0xb9696fd0d2066969), I64(0x2409482d12410909), - I64(0xdd70a7ade0d77070), I64(0xe2b6d954716fb6b6), I64(0x67d0ceb7bd1ed0d0), I64(0x93ed3b7ec7d6eded), - I64(0x17cc2edb85e2cccc), I64(0x15422a5784684242), I64(0x5a98b4c22d2c9898), I64(0xaaa4490e55eda4a4), - I64(0xa0285d8850752828), I64(0x6d5cda31b8865c5c), I64(0xc7f8933fed6bf8f8), I64(0x228644a411c28686), - }, { - // C7 vectors - I64(0x186018c07830d818), I64(0x238c2305af462623), I64(0xc63fc67ef991b8c6), I64(0xe887e8136fcdfbe8), - I64(0x8726874ca113cb87), I64(0xb8dab8a9626d11b8), I64(0x0104010805020901), I64(0x4f214f426e9e0d4f), - I64(0x36d836adee6c9b36), I64(0xa6a2a6590451ffa6), I64(0xd26fd2debdb90cd2), I64(0xf5f3f5fb06f70ef5), - I64(0x79f979ef80f29679), I64(0x6fa16f5fcede306f), I64(0x917e91fcef3f6d91), I64(0x525552aa07a4f852), - I64(0x609d6027fdc04760), I64(0xbccabc89766535bc), I64(0x9b569baccd2b379b), I64(0x8e028e048c018a8e), - I64(0xa3b6a371155bd2a3), I64(0x0c300c603c186c0c), I64(0x7bf17bff8af6847b), I64(0x35d435b5e16a8035), - I64(0x1d741de8693af51d), I64(0xe0a7e05347ddb3e0), I64(0xd77bd7f6acb321d7), I64(0xc22fc25eed999cc2), - I64(0x2eb82e6d965c432e), I64(0x4b314b627a96294b), I64(0xfedffea321e15dfe), I64(0x5741578216aed557), - I64(0x155415a8412abd15), I64(0x77c1779fb6eee877), I64(0x37dc37a5eb6e9237), I64(0xe5b3e57b56d79ee5), - I64(0x9f469f8cd923139f), I64(0xf0e7f0d317fd23f0), I64(0x4a354a6a7f94204a), I64(0xda4fda9e95a944da), - I64(0x587d58fa25b0a258), I64(0xc903c906ca8fcfc9), I64(0x29a429558d527c29), I64(0x0a280a5022145a0a), - I64(0xb1feb1e14f7f50b1), I64(0xa0baa0691a5dc9a0), I64(0x6bb16b7fdad6146b), I64(0x852e855cab17d985), - I64(0xbdcebd8173673cbd), I64(0x5d695dd234ba8f5d), I64(0x1040108050209010), I64(0xf4f7f4f303f507f4), - I64(0xcb0bcb16c08bddcb), I64(0x3ef83eedc67cd33e), I64(0x05140528110a2d05), I64(0x6781671fe6ce7867), - I64(0xe4b7e47353d597e4), I64(0x279c2725bb4e0227), I64(0x4119413258827341), I64(0x8b168b2c9d0ba78b), - I64(0xa7a6a7510153f6a7), I64(0x7de97dcf94fab27d), I64(0x956e95dcfb374995), I64(0xd847d88e9fad56d8), - I64(0xfbcbfb8b30eb70fb), I64(0xee9fee2371c1cdee), I64(0x7ced7cc791f8bb7c), I64(0x66856617e3cc7166), - I64(0xdd53dda68ea77bdd), I64(0x175c17b84b2eaf17), I64(0x47014702468e4547), I64(0x9e429e84dc211a9e), - I64(0xca0fca1ec589d4ca), I64(0x2db42d75995a582d), I64(0xbfc6bf9179632ebf), I64(0x071c07381b0e3f07), - I64(0xad8ead012347acad), I64(0x5a755aea2fb4b05a), I64(0x8336836cb51bef83), I64(0x33cc3385ff66b633), - I64(0x6391633ff2c65c63), I64(0x020802100a041202), I64(0xaa92aa39384993aa), I64(0x71d971afa8e2de71), - I64(0xc807c80ecf8dc6c8), I64(0x196419c87d32d119), I64(0x4939497270923b49), I64(0xd943d9869aaf5fd9), - I64(0xf2eff2c31df931f2), I64(0xe3abe34b48dba8e3), I64(0x5b715be22ab6b95b), I64(0x881a8834920dbc88), - I64(0x9a529aa4c8293e9a), I64(0x2698262dbe4c0b26), I64(0x32c8328dfa64bf32), I64(0xb0fab0e94a7d59b0), - I64(0xe983e91b6acff2e9), I64(0x0f3c0f78331e770f), I64(0xd573d5e6a6b733d5), I64(0x803a8074ba1df480), - I64(0xbec2be997c6127be), I64(0xcd13cd26de87ebcd), I64(0x34d034bde4688934), I64(0x483d487a75903248), - I64(0xffdbffab24e354ff), I64(0x7af57af78ff48d7a), I64(0x907a90f4ea3d6490), I64(0x5f615fc23ebe9d5f), - I64(0x2080201da0403d20), I64(0x68bd6867d5d00f68), I64(0x1a681ad07234ca1a), I64(0xae82ae192c41b7ae), - I64(0xb4eab4c95e757db4), I64(0x544d549a19a8ce54), I64(0x937693ece53b7f93), I64(0x2288220daa442f22), - I64(0x648d6407e9c86364), I64(0xf1e3f1db12ff2af1), I64(0x73d173bfa2e6cc73), I64(0x124812905a248212), - I64(0x401d403a5d807a40), I64(0x0820084028104808), I64(0xc32bc356e89b95c3), I64(0xec97ec337bc5dfec), - I64(0xdb4bdb9690ab4ddb), I64(0xa1bea1611f5fc0a1), I64(0x8d0e8d1c8307918d), I64(0x3df43df5c97ac83d), - I64(0x976697ccf1335b97), I64(0x0000000000000000), I64(0xcf1bcf36d483f9cf), I64(0x2bac2b4587566e2b), - I64(0x76c57697b3ece176), I64(0x82328264b019e682), I64(0xd67fd6fea9b128d6), I64(0x1b6c1bd87736c31b), - I64(0xb5eeb5c15b7774b5), I64(0xaf86af112943beaf), I64(0x6ab56a77dfd41d6a), I64(0x505d50ba0da0ea50), - I64(0x450945124c8a5745), I64(0xf3ebf3cb18fb38f3), I64(0x30c0309df060ad30), I64(0xef9bef2b74c3c4ef), - I64(0x3ffc3fe5c37eda3f), I64(0x554955921caac755), I64(0xa2b2a2791059dba2), I64(0xea8fea0365c9e9ea), - I64(0x6589650fecca6a65), I64(0xbad2bab9686903ba), I64(0x2fbc2f65935e4a2f), I64(0xc027c04ee79d8ec0), - I64(0xde5fdebe81a160de), I64(0x1c701ce06c38fc1c), I64(0xfdd3fdbb2ee746fd), I64(0x4d294d52649a1f4d), - I64(0x927292e4e0397692), I64(0x75c9758fbceafa75), I64(0x061806301e0c3606), I64(0x8a128a249809ae8a), - I64(0xb2f2b2f940794bb2), I64(0xe6bfe66359d185e6), I64(0x0e380e70361c7e0e), I64(0x1f7c1ff8633ee71f), - I64(0x62956237f7c45562), I64(0xd477d4eea3b53ad4), I64(0xa89aa829324d81a8), I64(0x966296c4f4315296), - I64(0xf9c3f99b3aef62f9), I64(0xc533c566f697a3c5), I64(0x25942535b14a1025), I64(0x597959f220b2ab59), - I64(0x842a8454ae15d084), I64(0x72d572b7a7e4c572), I64(0x39e439d5dd72ec39), I64(0x4c2d4c5a6198164c), - I64(0x5e655eca3bbc945e), I64(0x78fd78e785f09f78), I64(0x38e038ddd870e538), I64(0x8c0a8c148605988c), - I64(0xd163d1c6b2bf17d1), I64(0xa5aea5410b57e4a5), I64(0xe2afe2434dd9a1e2), I64(0x6199612ff8c24e61), - I64(0xb3f6b3f1457b42b3), I64(0x21842115a5423421), I64(0x9c4a9c94d625089c), I64(0x1e781ef0663cee1e), - I64(0x4311432252866143), I64(0xc73bc776fc93b1c7), I64(0xfcd7fcb32be54ffc), I64(0x0410042014082404), - I64(0x515951b208a2e351), I64(0x995e99bcc72f2599), I64(0x6da96d4fc4da226d), I64(0x0d340d68391a650d), - I64(0xfacffa8335e979fa), I64(0xdf5bdfb684a369df), I64(0x7ee57ed79bfca97e), I64(0x2490243db4481924), - I64(0x3bec3bc5d776fe3b), I64(0xab96ab313d4b9aab), I64(0xce1fce3ed181f0ce), I64(0x1144118855229911), - I64(0x8f068f0c8903838f), I64(0x4e254e4a6b9c044e), I64(0xb7e6b7d1517366b7), I64(0xeb8beb0b60cbe0eb), - I64(0x3cf03cfdcc78c13c), I64(0x813e817cbf1ffd81), I64(0x946a94d4fe354094), I64(0xf7fbf7eb0cf31cf7), - I64(0xb9deb9a1676f18b9), I64(0x134c13985f268b13), I64(0x2cb02c7d9c58512c), I64(0xd36bd3d6b8bb05d3), - I64(0xe7bbe76b5cd38ce7), I64(0x6ea56e57cbdc396e), I64(0xc437c46ef395aac4), I64(0x030c03180f061b03), - I64(0x5645568a13acdc56), I64(0x440d441a49885e44), I64(0x7fe17fdf9efea07f), I64(0xa99ea921374f88a9), - I64(0x2aa82a4d8254672a), I64(0xbbd6bbb16d6b0abb), I64(0xc123c146e29f87c1), I64(0x535153a202a6f153), - I64(0xdc57dcae8ba572dc), I64(0x0b2c0b582716530b), I64(0x9d4e9d9cd327019d), I64(0x6cad6c47c1d82b6c), - I64(0x31c43195f562a431), I64(0x74cd7487b9e8f374), I64(0xf6fff6e309f115f6), I64(0x4605460a438c4c46), - I64(0xac8aac092645a5ac), I64(0x891e893c970fb589), I64(0x145014a04428b414), I64(0xe1a3e15b42dfbae1), - I64(0x165816b04e2ca616), I64(0x3ae83acdd274f73a), I64(0x69b9696fd0d20669), I64(0x092409482d124109), - I64(0x70dd70a7ade0d770), I64(0xb6e2b6d954716fb6), I64(0xd067d0ceb7bd1ed0), I64(0xed93ed3b7ec7d6ed), - I64(0xcc17cc2edb85e2cc), I64(0x4215422a57846842), I64(0x985a98b4c22d2c98), I64(0xa4aaa4490e55eda4), - I64(0x28a0285d88507528), I64(0x5c6d5cda31b8865c), I64(0xf8c7f8933fed6bf8), I64(0x86228644a411c286), - } -}; -/* end of whirlpool_sbox array */ - -#define WHIRLPOOL_OP(src, shift) ( \ - rhash_whirlpool_sbox[0][(int)(src[ shift & 7] >> 56) ] ^ \ - rhash_whirlpool_sbox[1][(int)(src[(shift + 7) & 7] >> 48) & 0xff] ^ \ - rhash_whirlpool_sbox[2][(int)(src[(shift + 6) & 7] >> 40) & 0xff] ^ \ - rhash_whirlpool_sbox[3][(int)(src[(shift + 5) & 7] >> 32) & 0xff] ^ \ - rhash_whirlpool_sbox[4][(int)(src[(shift + 4) & 7] >> 24) & 0xff] ^ \ - rhash_whirlpool_sbox[5][(int)(src[(shift + 3) & 7] >> 16) & 0xff] ^ \ - rhash_whirlpool_sbox[6][(int)(src[(shift + 2) & 7] >> 8) & 0xff] ^ \ - rhash_whirlpool_sbox[7][(int)(src[(shift + 1) & 7] ) & 0xff]) - -/** - * The core transformation. Process a 512-bit block. - * - * @param hash algorithm state - * @param block the message block to process - */ -static void rhash_whirlpool_process_block(uint64_t *hash, uint64_t* p_block) -{ - int i; /* loop counter */ - uint64_t K[2][8]; /* key */ - uint64_t state[2][8]; /* state */ - - /* alternating binary flags */ - unsigned int m = 0; - - /* the number of rounds of the internal dedicated block cipher */ - const int number_of_rounds = 10; - - /* array used in the rounds */ - static const uint64_t rc[10] = { - I64(0x1823c6e887b8014f), - I64(0x36a6d2f5796f9152), - I64(0x60bc9b8ea30c7b35), - I64(0x1de0d7c22e4bfe57), - I64(0x157737e59ff04ada), - I64(0x58c9290ab1a06b85), - I64(0xbd5d10f4cb3e0567), - I64(0xe427418ba77d95d8), - I64(0xfbee7c66dd17479e), - I64(0xca2dbf07ad5a8333) - }; - - /* map the message buffer to a block */ - for (i = 0; i < 8; i++) { - /* store K^0 and xor it with the intermediate hash state */ - K[0][i] = hash[i]; - state[0][i] = be2me_64(p_block[i]) ^ hash[i]; - hash[i] = state[0][i]; - } - - /* iterate over algorithm rounds */ - for (i = 0; i < number_of_rounds; i++) - { - /* compute K^i from K^{i-1} */ - K[m ^ 1][0] = WHIRLPOOL_OP(K[m], 0) ^ rc[i]; - K[m ^ 1][1] = WHIRLPOOL_OP(K[m], 1); - K[m ^ 1][2] = WHIRLPOOL_OP(K[m], 2); - K[m ^ 1][3] = WHIRLPOOL_OP(K[m], 3); - K[m ^ 1][4] = WHIRLPOOL_OP(K[m], 4); - K[m ^ 1][5] = WHIRLPOOL_OP(K[m], 5); - K[m ^ 1][6] = WHIRLPOOL_OP(K[m], 6); - K[m ^ 1][7] = WHIRLPOOL_OP(K[m], 7); - - /* apply the i-th round transformation */ - state[m ^ 1][0] = WHIRLPOOL_OP(state[m], 0) ^ K[m ^ 1][0]; - state[m ^ 1][1] = WHIRLPOOL_OP(state[m], 1) ^ K[m ^ 1][1]; - state[m ^ 1][2] = WHIRLPOOL_OP(state[m], 2) ^ K[m ^ 1][2]; - state[m ^ 1][3] = WHIRLPOOL_OP(state[m], 3) ^ K[m ^ 1][3]; - state[m ^ 1][4] = WHIRLPOOL_OP(state[m], 4) ^ K[m ^ 1][4]; - state[m ^ 1][5] = WHIRLPOOL_OP(state[m], 5) ^ K[m ^ 1][5]; - state[m ^ 1][6] = WHIRLPOOL_OP(state[m], 6) ^ K[m ^ 1][6]; - state[m ^ 1][7] = WHIRLPOOL_OP(state[m], 7) ^ K[m ^ 1][7]; - - m = m ^ 1; - } - - /* apply the Miyaguchi-Preneel compression function */ - hash[0] ^= state[0][0]; - hash[1] ^= state[0][1]; - hash[2] ^= state[0][2]; - hash[3] ^= state[0][3]; - hash[4] ^= state[0][4]; - hash[5] ^= state[0][5]; - hash[6] ^= state[0][6]; - hash[7] ^= state[0][7]; -} - -/** - * Calculate message hash. - * Can be called repeatedly with chunks of the message to be hashed. - * - * @param ctx the algorithm context containing current hashing state - * @param msg message chunk - * @param size length of the message chunk - */ -void rhash_whirlpool_update(whirlpool_ctx *ctx, const unsigned char* msg, size_t size) -{ - unsigned index = (unsigned)ctx->length & 63; - unsigned left; - ctx->length += size; - - /* fill partial block */ - if (index) { - left = whirlpool_block_size - index; - memcpy(ctx->message + index, msg, (size < left ? size : left)); - if (size < left) return; - - /* process partial block */ - rhash_whirlpool_process_block(ctx->hash, (uint64_t*)ctx->message); - msg += left; - size -= left; - } - while (size >= whirlpool_block_size) { - uint64_t* aligned_message_block; - if (IS_ALIGNED_64(msg)) { - /* the most common case is processing of an already aligned message - without copying it */ - aligned_message_block = (uint64_t*)msg; - } else { - memcpy(ctx->message, msg, whirlpool_block_size); - aligned_message_block = (uint64_t*)ctx->message; - } - - rhash_whirlpool_process_block(ctx->hash, aligned_message_block); - msg += whirlpool_block_size; - size -= whirlpool_block_size; - } - if (size) { - /* save leftovers */ - memcpy(ctx->message, msg, size); - } -} - -/** - * Store calculated hash into the given array. - * - * @param ctx the algorithm context containing current hashing state - * @param result calculated hash in binary form - */ -void rhash_whirlpool_final(whirlpool_ctx *ctx, unsigned char* result) -{ - unsigned index = (unsigned)ctx->length & 63; - uint64_t* msg64 = (uint64_t*)ctx->message; - - /* pad message and run for last block */ - ctx->message[index++] = 0x80; - - /* if no room left in the message to store 256-bit message length */ - if (index > 32) { - /* then pad the rest with zeros and process it */ - while (index < 64) { - ctx->message[index++] = 0; - } - rhash_whirlpool_process_block(ctx->hash, msg64); - index = 0; - } - /* due to optimization actually only 64-bit of message length are stored */ - while (index < 56) { - ctx->message[index++] = 0; - } - msg64[7] = be2me_64(ctx->length << 3); - rhash_whirlpool_process_block(ctx->hash, msg64); - - /* save result hash */ - be64_copy(result, 0, ctx->hash, 64); -} - -#ifdef __cplusplus -} -#endif diff --git a/stratum/algos/blake2/blake2-impl.h.bak b/stratum/algos/blake2/blake2-impl.h.bak deleted file mode 100644 index a43380b1f..000000000 --- a/stratum/algos/blake2/blake2-impl.h.bak +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Argon2 reference source code package - reference C implementations - * - * Copyright 2015 - * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves - * - * You may use this work under the terms of a Creative Commons CC0 1.0 - * License/Waiver or the Apache Public License 2.0, at your option. The terms of - * these licenses can be found at: - * - * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - * - * You should have received a copy of both of these licenses along with this - * software. If not, they may be obtained at the above URLs. - */ - -#ifndef PORTABLE_BLAKE2_IMPL_H -#define PORTABLE_BLAKE2_IMPL_H - -#include -#include - -#if defined(_MSC_VER) -#define BLAKE2_INLINE __inline -#elif defined(__GNUC__) || defined(__clang__) -#define BLAKE2_INLINE __inline__ -#else -#define BLAKE2_INLINE -#endif - -/* Argon2 Team - Begin Code */ -/* - Not an exhaustive list, but should cover the majority of modern platforms - Additionally, the code will always be correct---this is only a performance - tweak. -*/ -#if (defined(__BYTE_ORDER__) && \ - (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) || \ - defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \ - defined(__AARCH64EL__) || defined(__amd64__) || defined(__i386__) || \ - defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ - defined(_M_ARM) -#define NATIVE_LITTLE_ENDIAN -#endif -/* Argon2 Team - End Code */ - - - -static BLAKE2_INLINE uint16_t load16( const void *src ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - uint16_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = ( const uint8_t * )src; - return (( uint16_t )( p[0] ) << 0) | - (( uint16_t )( p[1] ) << 8) ; -#endif -} - -static BLAKE2_INLINE void store16( void *dst, uint16_t w ) -{ -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = ( uint8_t * )dst; - *p++ = ( uint8_t )w; w >>= 8; - *p++ = ( uint8_t )w; -#endif -} - -static BLAKE2_INLINE uint32_t load32(const void *src) { -#if defined(NATIVE_LITTLE_ENDIAN) - uint32_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = (const uint8_t *)src; - uint32_t w = *p++; - w |= (uint32_t)(*p++) << 8; - w |= (uint32_t)(*p++) << 16; - w |= (uint32_t)(*p++) << 24; - return w; -#endif -} - -static BLAKE2_INLINE uint64_t load64(const void *src) { -#if defined(NATIVE_LITTLE_ENDIAN) - uint64_t w; - memcpy(&w, src, sizeof w); - return w; -#else - const uint8_t *p = (const uint8_t *)src; - uint64_t w = *p++; - w |= (uint64_t)(*p++) << 8; - w |= (uint64_t)(*p++) << 16; - w |= (uint64_t)(*p++) << 24; - w |= (uint64_t)(*p++) << 32; - w |= (uint64_t)(*p++) << 40; - w |= (uint64_t)(*p++) << 48; - w |= (uint64_t)(*p++) << 56; - return w; -#endif -} - -static BLAKE2_INLINE void store32(void *dst, uint32_t w) { -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = (uint8_t *)dst; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; -#endif -} - -static BLAKE2_INLINE void store64(void *dst, uint64_t w) { -#if defined(NATIVE_LITTLE_ENDIAN) - memcpy(dst, &w, sizeof w); -#else - uint8_t *p = (uint8_t *)dst; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; -#endif -} - -static BLAKE2_INLINE uint64_t load48(const void *src) { - const uint8_t *p = (const uint8_t *)src; - uint64_t w = *p++; - w |= (uint64_t)(*p++) << 8; - w |= (uint64_t)(*p++) << 16; - w |= (uint64_t)(*p++) << 24; - w |= (uint64_t)(*p++) << 32; - w |= (uint64_t)(*p++) << 40; - return w; -} - -static BLAKE2_INLINE void store48(void *dst, uint64_t w) { - uint8_t *p = (uint8_t *)dst; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; - w >>= 8; - *p++ = (uint8_t)w; -} - -static BLAKE2_INLINE uint32_t rotr32(const uint32_t w, const unsigned c) { - return (w >> c) | (w << (32 - c)); -} - -static BLAKE2_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) { - return (w >> c) | (w << (64 - c)); -} - -/* prevents compiler optimizing out memset() */ -static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n) -{ - static void *(*const volatile memset_v)(void *, int, size_t) = &memset; - memset_v(v, 0, n); -} - -void clear_internal_memory(void *v, size_t n); - -#endif diff --git a/stratum/algos/blake2/blake2.h.bak b/stratum/algos/blake2/blake2.h.bak deleted file mode 100644 index a452f33ee..000000000 --- a/stratum/algos/blake2/blake2.h.bak +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Argon2 reference source code package - reference C implementations - * - * Copyright 2015 - * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves - * - * You may use this work under the terms of a Creative Commons CC0 1.0 - * License/Waiver or the Apache Public License 2.0, at your option. The terms of - * these licenses can be found at: - * - * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - * - * You should have received a copy of both of these licenses along with this - * software. If not, they may be obtained at the above URLs. - */ - -#ifndef PORTABLE_BLAKE2_H -#define PORTABLE_BLAKE2_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -enum blake2b_constant { - BLAKE2B_BLOCKBYTES = 128, - BLAKE2B_OUTBYTES = 64, - BLAKE2B_KEYBYTES = 64, - BLAKE2B_SALTBYTES = 16, - BLAKE2B_PERSONALBYTES = 16 -}; - -#pragma pack(push, 1) -typedef struct __blake2b_param { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint64_t node_offset; /* 16 */ - uint8_t node_depth; /* 17 */ - uint8_t inner_length; /* 18 */ - uint8_t reserved[14]; /* 32 */ - uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ - uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */ -} blake2b_param; -#pragma pack(pop) - -typedef struct __blake2b_state { - uint64_t h[8]; - uint64_t t[2]; - uint64_t f[2]; - uint8_t buf[BLAKE2B_BLOCKBYTES]; - unsigned buflen; - unsigned outlen; - uint8_t last_node; -} blake2b_state; - -/* Ensure param structs have not been wrongly padded */ -/* Poor man's static_assert */ -enum { - blake2_size_check_0 = 1 / !!(CHAR_BIT == 8), - blake2_size_check_2 = - 1 / !!(sizeof(blake2b_param) == sizeof(uint64_t) * CHAR_BIT) -}; - -/* Streaming API */ -int blake2b_init(blake2b_state *S, size_t outlen); -int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, - size_t keylen); -int blake2b_init_param(blake2b_state *S, const blake2b_param *P); -int blake2b_update(blake2b_state *S, const void *in, size_t inlen); -int blake2b_final(blake2b_state *S, void *out, size_t outlen); - -/* Simple API */ -int blake2b(void *out, size_t outlen, const void *in, size_t inlen, - const void *key, size_t keylen); - -/* Argon2 Team - Begin Code */ -int blake2b_long(void *out, size_t outlen, const void *in, size_t inlen); -/* Argon2 Team - End Code */ - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/stratum/algos/blake2/blake2b.c.bak b/stratum/algos/blake2/blake2b.c.bak deleted file mode 100644 index 43a6ae71b..000000000 --- a/stratum/algos/blake2/blake2b.c.bak +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Argon2 reference source code package - reference C implementations - * - * Copyright 2015 - * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves - * - * You may use this work under the terms of a Creative Commons CC0 1.0 - * License/Waiver or the Apache Public License 2.0, at your option. The terms of - * these licenses can be found at: - * - * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - * - * You should have received a copy of both of these licenses along with this - * software. If not, they may be obtained at the above URLs. - */ - -#include -#include -#include -#include "blake2.h" -#include "blake2-impl.h" - -static const uint64_t blake2b_IV[8] = { - UINT64_C(0x6a09e667f3bcc908), UINT64_C(0xbb67ae8584caa73b), - UINT64_C(0x3c6ef372fe94f82b), UINT64_C(0xa54ff53a5f1d36f1), - UINT64_C(0x510e527fade682d1), UINT64_C(0x9b05688c2b3e6c1f), - UINT64_C(0x1f83d9abfb41bd6b), UINT64_C(0x5be0cd19137e2179)}; - -static BLAKE2_INLINE void blake2b_set_lastnode(blake2b_state *S) { - S->f[1] = (uint64_t)-1; -} - -static BLAKE2_INLINE void blake2b_set_lastblock(blake2b_state *S) { - S->f[0] = (uint64_t)-1; -} - -static BLAKE2_INLINE void blake2b_increment_counter(blake2b_state *S, uint64_t inc) { - S->t[0] += inc; - S->t[1] += (S->t[0] < inc); -} - -static BLAKE2_INLINE void blake2b_invalidate_state(blake2b_state *S) { - blake2b_set_lastblock(S); /* invalidate for further use */ -} - -static BLAKE2_INLINE void blake2b_init0(blake2b_state *S) { - memset(S, 0, sizeof(*S)); - memcpy(S->h, blake2b_IV, sizeof(S->h)); -} - -int blake2b_init_param(blake2b_state *S, const blake2b_param *P) { - const unsigned char *p = (const unsigned char *)P; - unsigned int i; - blake2b_init0(S); - for (i = 0; i < 8; ++i) - S->h[i] ^= load64(&p[i * sizeof(S->h[i])]); - S->outlen = P->digest_length; - return 0; -} - -/* Sequential blake2b initialization */ -int blake2b_init(blake2b_state *S, size_t outlen) { - blake2b_param P; - P.digest_length = (uint8_t)outlen; - P.key_length = 0; - P.fanout = 1; - P.depth = 1; - P.leaf_length = 0; - P.node_offset = 0; - P.node_depth = 0; - P.inner_length = 0; - memset(P.reserved, 0, sizeof(P.reserved)); - memset(P.salt, 0, sizeof(P.salt)); - memset(P.personal, 0, sizeof(P.personal)); - return blake2b_init_param(S, &P); -} - -int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, size_t keylen) { - blake2b_param P; - P.digest_length = (uint8_t)outlen; - P.key_length = (uint8_t)keylen; - P.fanout = 1; - P.depth = 1; - P.leaf_length = 0; - P.node_offset = 0; - P.node_depth = 0; - P.inner_length = 0; - uint8_t block[BLAKE2B_BLOCKBYTES]; - memcpy(block, key, keylen); - blake2b_update(S, block, BLAKE2B_BLOCKBYTES); - return 0; -} - -static void blake2b_compress(blake2b_state *S, const uint8_t *block) { - uint64_t m[16]; - uint64_t v[16]; - unsigned int i, r; - - for (i = 0; i < 16; ++i) - m[i] = load64(block + i * sizeof(m[i])); - - v[0] = S->h[0]; - v[1] = S->h[1]; - v[2] = S->h[2]; - v[3] = S->h[3]; - v[4] = S->h[4]; - v[5] = S->h[5]; - v[6] = S->h[6]; - v[7] = S->h[7]; - v[8] = 0x6a09e667f3bcc908; - v[9] = 0xbb67ae8584caa73b; - v[10] = 0x3c6ef372fe94f82b; - v[11] = 0xa54ff53a5f1d36f1; - v[12] = 0x510e527fade682d1 ^ S->t[0]; - v[13] = 0x9b05688c2b3e6c1f ^ S->t[1]; - v[14] = 0x1f83d9abfb41bd6b ^ S->f[0]; - v[15] = 0x5be0cd19137e2179 ^ S->f[1]; - v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[1];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[2];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[7];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[8];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[9];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[13];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[14];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[14];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[9];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[15];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[0];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[2];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[11];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[11];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[8];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[12];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[0];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[2];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[15];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[10];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[14];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[3];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[6];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[1];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[9];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[4];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[7];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[9];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[1];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[13];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[12];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[11];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[14];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[2];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[6];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[5];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[4];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[0];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[8];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[9];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[5];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[7];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[2];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[10];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[15];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[14];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[12];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[6];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[8];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[13];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[2];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[12];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[6];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[10];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[0];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[11];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[8];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[3];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[4];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[13];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[7];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[5];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[15];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[14];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[1];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[9];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[12];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[5];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[1];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[15];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[14];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[13];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[4];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[10];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[0];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[7];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[6];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[3];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[9];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[2];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[8];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[11];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[13];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[11];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[7];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[14];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[12];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[1];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[3];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[9];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[5];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[0];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[15];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[4];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[8];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[6];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[2];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[10];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[6];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[15];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[14];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[9];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[11];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[3];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[0];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[8];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[2];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[13];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[7];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[1];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[4];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[10];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[2];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[7];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[6];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[1];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[5];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[15];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[11];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[9];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[14];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[3];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[13];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[0];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[0];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[1];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[2];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[3];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[4];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[5];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[7];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[8];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[9];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[10];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[11];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[12];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[13];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[14];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[15];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - v[0]=v[0]+v[4]+m[14];v[12]=rotr64(v[12]^v[0],32);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],24);v[0]=v[0]+v[4]+m[10];v[12]=rotr64(v[12]^v[0],16);v[8]=v[8]+v[12];v[4]=rotr64(v[4]^v[8],63); - v[1]=v[1]+v[5]+m[4];v[13]=rotr64(v[13]^v[1],32);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],24);v[1]=v[1]+v[5]+m[8];v[13]=rotr64(v[13]^v[1],16);v[9]=v[9]+v[13];v[5]=rotr64(v[5]^v[9],63); - v[2]=v[2]+v[6]+m[9];v[14]=rotr64(v[14]^v[2],32);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],24);v[2]=v[2]+v[6]+m[15];v[14]=rotr64(v[14]^v[2],16);v[10]=v[10]+v[14];v[6]=rotr64(v[6]^v[10],63); - v[3]=v[3]+v[7]+m[13];v[15]=rotr64(v[15]^v[3],32);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],24);v[3]=v[3]+v[7]+m[6];v[15]=rotr64(v[15]^v[3],16);v[11]=v[11]+v[15];v[7]=rotr64(v[7]^v[11],63); - v[0]=v[0]+v[5]+m[1];v[15]=rotr64(v[15]^v[0],32);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],24);v[0]=v[0]+v[5]+m[12];v[15]=rotr64(v[15]^v[0],16);v[10]=v[10]+v[15];v[5]=rotr64(v[5]^v[10],63); - v[1]=v[1]+v[6]+m[0];v[12]=rotr64(v[12]^v[1],32);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],24);v[1]=v[1]+v[6]+m[2];v[12]=rotr64(v[12]^v[1],16);v[11]=v[11]+v[12];v[6]=rotr64(v[6]^v[11],63); - v[2]=v[2]+v[7]+m[11];v[13]=rotr64(v[13]^v[2],32);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],24);v[2]=v[2]+v[7]+m[7];v[13]=rotr64(v[13]^v[2],16);v[8]=v[8]+v[13];v[7]=rotr64(v[7]^v[8],63); - v[3]=v[3]+v[4]+m[5];v[14]=rotr64(v[14]^v[3],32);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],24);v[3]=v[3]+v[4]+m[3];v[14]=rotr64(v[14]^v[3],16);v[9]=v[9]+v[14];v[4]=rotr64(v[4]^v[9],63); - S->h[0] = S->h[0] ^ v[0] ^ v[8]; - S->h[1] = S->h[1] ^ v[1] ^ v[9]; - S->h[2] = S->h[2] ^ v[2] ^ v[10]; - S->h[3] = S->h[3] ^ v[3] ^ v[11]; - S->h[4] = S->h[4] ^ v[4] ^ v[12]; - S->h[5] = S->h[5] ^ v[5] ^ v[13]; - S->h[6] = S->h[6] ^ v[6] ^ v[14]; - S->h[7] = S->h[7] ^ v[7] ^ v[15]; -} - -int blake2b_update(blake2b_state *S, const void *in, size_t inlen) { - const uint8_t *pin = (const uint8_t *)in; - if (S->buflen + inlen > BLAKE2B_BLOCKBYTES) { - size_t left = S->buflen; - size_t fill = BLAKE2B_BLOCKBYTES - left; - memcpy(&S->buf[left], pin, fill); - blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); - blake2b_compress(S, S->buf); - S->buflen = 0; - inlen -= fill; - pin += fill; - while (inlen > BLAKE2B_BLOCKBYTES) { - blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES); - blake2b_compress(S, pin); - inlen -= BLAKE2B_BLOCKBYTES; - pin += BLAKE2B_BLOCKBYTES; - } - } - memcpy(&S->buf[S->buflen], pin, inlen); - S->buflen += (unsigned int)inlen; - return 0; -} - -int blake2b_final(blake2b_state *S, void *out, size_t outlen) { - uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; - unsigned int i; - blake2b_increment_counter(S, S->buflen); - blake2b_set_lastblock(S); - memset(&S->buf[S->buflen], 0, BLAKE2B_BLOCKBYTES - S->buflen); /* Padding */ - blake2b_compress(S, S->buf); - for (i = 0; i < 8; ++i) - store64(buffer + sizeof(S->h[i]) * i, S->h[i]); - memcpy(out, buffer, S->outlen); - return 0; -} - -int blake2b(void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen) { - blake2b_state S; - int ret = -1; - blake2b_init(&S, outlen); - blake2b_update(&S, in, inlen); - blake2b_final(&S, out, outlen); -} - -int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { - uint8_t *out = (uint8_t *)pout; - blake2b_state blake_state; - uint8_t outlen_bytes[sizeof(uint32_t)] = {0}; - int ret = -1; - store32(outlen_bytes, (uint32_t)outlen); - - if (outlen <= BLAKE2B_OUTBYTES) { - blake2b_init(&blake_state, outlen); - blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)); - blake2b_update(&blake_state, in, inlen); - blake2b_final(&blake_state, out, outlen); - } else { - uint32_t toproduce; - uint8_t out_buffer[BLAKE2B_OUTBYTES]; - uint8_t in_buffer[BLAKE2B_OUTBYTES]; - blake2b_init(&blake_state, BLAKE2B_OUTBYTES); - blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)); - blake2b_update(&blake_state, in, inlen); - blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES); - memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); - out += BLAKE2B_OUTBYTES / 2; - toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2; - - while (toproduce > BLAKE2B_OUTBYTES) { - memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); - blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer,BLAKE2B_OUTBYTES, NULL, 0); - memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2); - out += BLAKE2B_OUTBYTES / 2; - toproduce -= BLAKE2B_OUTBYTES / 2; - } - - memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES); - blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL, 0); - memcpy(out, out_buffer, toproduce); - } - return ret; -} diff --git a/stratum/algos/blake2/blamka-round-opt.h.bak b/stratum/algos/blake2/blamka-round-opt.h.bak deleted file mode 100644 index 2c8942e31..000000000 --- a/stratum/algos/blake2/blamka-round-opt.h.bak +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Argon2 reference source code package - reference C implementations - * - * Copyright 2015 - * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves - * - * You may use this work under the terms of a Creative Commons CC0 1.0 - * License/Waiver or the Apache Public License 2.0, at your option. The terms of - * these licenses can be found at: - * - * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - * - * You should have received a copy of both of these licenses along with this - * software. If not, they may be obtained at the above URLs. - */ - -#ifndef BLAKE_ROUND_MKA_OPT_H -#define BLAKE_ROUND_MKA_OPT_H - -#include "blake2-impl.h" - -#include -#if defined(__SSSE3__) -#include /* for _mm_shuffle_epi8 and _mm_alignr_epi8 */ -#endif - -#if defined(__XOP__) && (defined(__GNUC__) || defined(__clang__)) -#include -#endif - -#if !defined(__AVX512F__) -#if !defined(__AVX2__) -#if !defined(__XOP__) -#if defined(__SSSE3__) -#define r16 \ - (_mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9)) -#define r24 \ - (_mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10)) -#define _mm_roti_epi64(x, c) \ - (-(c) == 32) \ - ? _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) \ - : (-(c) == 24) \ - ? _mm_shuffle_epi8((x), r24) \ - : (-(c) == 16) \ - ? _mm_shuffle_epi8((x), r16) \ - : (-(c) == 63) \ - ? _mm_xor_si128(_mm_srli_epi64((x), -(c)), \ - _mm_add_epi64((x), (x))) \ - : _mm_xor_si128(_mm_srli_epi64((x), -(c)), \ - _mm_slli_epi64((x), 64 - (-(c)))) -#else /* defined(__SSE2__) */ -#define _mm_roti_epi64(r, c) \ - _mm_xor_si128(_mm_srli_epi64((r), -(c)), _mm_slli_epi64((r), 64 - (-(c)))) -#endif -#else -#endif - -static BLAKE2_INLINE __m128i fBlaMka(__m128i x, __m128i y) { - const __m128i z = _mm_mul_epu32(x, y); - return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z)); -} - -#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - A0 = fBlaMka(A0, B0); \ - A1 = fBlaMka(A1, B1); \ - \ - D0 = _mm_xor_si128(D0, A0); \ - D1 = _mm_xor_si128(D1, A1); \ - \ - D0 = _mm_roti_epi64(D0, -32); \ - D1 = _mm_roti_epi64(D1, -32); \ - \ - C0 = fBlaMka(C0, D0); \ - C1 = fBlaMka(C1, D1); \ - \ - B0 = _mm_xor_si128(B0, C0); \ - B1 = _mm_xor_si128(B1, C1); \ - \ - B0 = _mm_roti_epi64(B0, -24); \ - B1 = _mm_roti_epi64(B1, -24); \ - } while ((void)0, 0) - -#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - A0 = fBlaMka(A0, B0); \ - A1 = fBlaMka(A1, B1); \ - \ - D0 = _mm_xor_si128(D0, A0); \ - D1 = _mm_xor_si128(D1, A1); \ - \ - D0 = _mm_roti_epi64(D0, -16); \ - D1 = _mm_roti_epi64(D1, -16); \ - \ - C0 = fBlaMka(C0, D0); \ - C1 = fBlaMka(C1, D1); \ - \ - B0 = _mm_xor_si128(B0, C0); \ - B1 = _mm_xor_si128(B1, C1); \ - \ - B0 = _mm_roti_epi64(B0, -63); \ - B1 = _mm_roti_epi64(B1, -63); \ - } while ((void)0, 0) - -#if defined(__SSSE3__) -#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - __m128i t0 = _mm_alignr_epi8(B1, B0, 8); \ - __m128i t1 = _mm_alignr_epi8(B0, B1, 8); \ - B0 = t0; \ - B1 = t1; \ - \ - t0 = C0; \ - C0 = C1; \ - C1 = t0; \ - \ - t0 = _mm_alignr_epi8(D1, D0, 8); \ - t1 = _mm_alignr_epi8(D0, D1, 8); \ - D0 = t1; \ - D1 = t0; \ - } while ((void)0, 0) - -#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - __m128i t0 = _mm_alignr_epi8(B0, B1, 8); \ - __m128i t1 = _mm_alignr_epi8(B1, B0, 8); \ - B0 = t0; \ - B1 = t1; \ - \ - t0 = C0; \ - C0 = C1; \ - C1 = t0; \ - \ - t0 = _mm_alignr_epi8(D0, D1, 8); \ - t1 = _mm_alignr_epi8(D1, D0, 8); \ - D0 = t1; \ - D1 = t0; \ - } while ((void)0, 0) -#else /* SSE2 */ -#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - __m128i t0 = D0; \ - __m128i t1 = B0; \ - D0 = C0; \ - C0 = C1; \ - C1 = D0; \ - D0 = _mm_unpackhi_epi64(D1, _mm_unpacklo_epi64(t0, t0)); \ - D1 = _mm_unpackhi_epi64(t0, _mm_unpacklo_epi64(D1, D1)); \ - B0 = _mm_unpackhi_epi64(B0, _mm_unpacklo_epi64(B1, B1)); \ - B1 = _mm_unpackhi_epi64(B1, _mm_unpacklo_epi64(t1, t1)); \ - } while ((void)0, 0) - -#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - __m128i t0, t1; \ - t0 = C0; \ - C0 = C1; \ - C1 = t0; \ - t0 = B0; \ - t1 = D0; \ - B0 = _mm_unpackhi_epi64(B1, _mm_unpacklo_epi64(B0, B0)); \ - B1 = _mm_unpackhi_epi64(t0, _mm_unpacklo_epi64(B1, B1)); \ - D0 = _mm_unpackhi_epi64(D0, _mm_unpacklo_epi64(D1, D1)); \ - D1 = _mm_unpackhi_epi64(D1, _mm_unpacklo_epi64(t1, t1)); \ - } while ((void)0, 0) -#endif - -#define BLAKE2_ROUND(A0, A1, B0, B1, C0, C1, D0, D1) \ - do { \ - G1(A0, B0, C0, D0, A1, B1, C1, D1); \ - G2(A0, B0, C0, D0, A1, B1, C1, D1); \ - \ - DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ - \ - G1(A0, B0, C0, D0, A1, B1, C1, D1); \ - G2(A0, B0, C0, D0, A1, B1, C1, D1); \ - \ - UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ - } while ((void)0, 0) -#else /* __AVX2__ */ - -#include - -#define rotr32(x) _mm256_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1)) -#define rotr24(x) _mm256_shuffle_epi8(x, _mm256_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10, 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10)) -#define rotr16(x) _mm256_shuffle_epi8(x, _mm256_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9, 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9)) -#define rotr63(x) _mm256_xor_si256(_mm256_srli_epi64((x), 63), _mm256_add_epi64((x), (x))) - -#define G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - do { \ - __m256i ml = _mm256_mul_epu32(A0, B0); \ - ml = _mm256_add_epi64(ml, ml); \ - A0 = _mm256_add_epi64(A0, _mm256_add_epi64(B0, ml)); \ - D0 = _mm256_xor_si256(D0, A0); \ - D0 = rotr32(D0); \ - \ - ml = _mm256_mul_epu32(C0, D0); \ - ml = _mm256_add_epi64(ml, ml); \ - C0 = _mm256_add_epi64(C0, _mm256_add_epi64(D0, ml)); \ - \ - B0 = _mm256_xor_si256(B0, C0); \ - B0 = rotr24(B0); \ - \ - ml = _mm256_mul_epu32(A1, B1); \ - ml = _mm256_add_epi64(ml, ml); \ - A1 = _mm256_add_epi64(A1, _mm256_add_epi64(B1, ml)); \ - D1 = _mm256_xor_si256(D1, A1); \ - D1 = rotr32(D1); \ - \ - ml = _mm256_mul_epu32(C1, D1); \ - ml = _mm256_add_epi64(ml, ml); \ - C1 = _mm256_add_epi64(C1, _mm256_add_epi64(D1, ml)); \ - \ - B1 = _mm256_xor_si256(B1, C1); \ - B1 = rotr24(B1); \ - } while((void)0, 0); - -#define G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - do { \ - __m256i ml = _mm256_mul_epu32(A0, B0); \ - ml = _mm256_add_epi64(ml, ml); \ - A0 = _mm256_add_epi64(A0, _mm256_add_epi64(B0, ml)); \ - D0 = _mm256_xor_si256(D0, A0); \ - D0 = rotr16(D0); \ - \ - ml = _mm256_mul_epu32(C0, D0); \ - ml = _mm256_add_epi64(ml, ml); \ - C0 = _mm256_add_epi64(C0, _mm256_add_epi64(D0, ml)); \ - B0 = _mm256_xor_si256(B0, C0); \ - B0 = rotr63(B0); \ - \ - ml = _mm256_mul_epu32(A1, B1); \ - ml = _mm256_add_epi64(ml, ml); \ - A1 = _mm256_add_epi64(A1, _mm256_add_epi64(B1, ml)); \ - D1 = _mm256_xor_si256(D1, A1); \ - D1 = rotr16(D1); \ - \ - ml = _mm256_mul_epu32(C1, D1); \ - ml = _mm256_add_epi64(ml, ml); \ - C1 = _mm256_add_epi64(C1, _mm256_add_epi64(D1, ml)); \ - B1 = _mm256_xor_si256(B1, C1); \ - B1 = rotr63(B1); \ - } while((void)0, 0); - -#define DIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - B0 = _mm256_permute4x64_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \ - C0 = _mm256_permute4x64_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ - D0 = _mm256_permute4x64_epi64(D0, _MM_SHUFFLE(2, 1, 0, 3)); \ - \ - B1 = _mm256_permute4x64_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \ - C1 = _mm256_permute4x64_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ - D1 = _mm256_permute4x64_epi64(D1, _MM_SHUFFLE(2, 1, 0, 3)); \ - } while((void)0, 0); - -#define DIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ - do { \ - __m256i tmp1 = _mm256_blend_epi32(B0, B1, 0xCC); \ - __m256i tmp2 = _mm256_blend_epi32(B0, B1, 0x33); \ - B1 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ - B0 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ - \ - tmp1 = C0; \ - C0 = C1; \ - C1 = tmp1; \ - \ - tmp1 = _mm256_blend_epi32(D0, D1, 0xCC); \ - tmp2 = _mm256_blend_epi32(D0, D1, 0x33); \ - D0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ - D1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ - } while(0); - -#define UNDIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - B0 = _mm256_permute4x64_epi64(B0, _MM_SHUFFLE(2, 1, 0, 3)); \ - C0 = _mm256_permute4x64_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ - D0 = _mm256_permute4x64_epi64(D0, _MM_SHUFFLE(0, 3, 2, 1)); \ - \ - B1 = _mm256_permute4x64_epi64(B1, _MM_SHUFFLE(2, 1, 0, 3)); \ - C1 = _mm256_permute4x64_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ - D1 = _mm256_permute4x64_epi64(D1, _MM_SHUFFLE(0, 3, 2, 1)); \ - } while((void)0, 0); - -#define UNDIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ - do { \ - __m256i tmp1 = _mm256_blend_epi32(B0, B1, 0xCC); \ - __m256i tmp2 = _mm256_blend_epi32(B0, B1, 0x33); \ - B0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ - B1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ - \ - tmp1 = C0; \ - C0 = C1; \ - C1 = tmp1; \ - \ - tmp1 = _mm256_blend_epi32(D0, D1, 0x33); \ - tmp2 = _mm256_blend_epi32(D0, D1, 0xCC); \ - D0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \ - D1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \ - } while((void)0, 0); - -#define BLAKE2_ROUND_1(A0, A1, B0, B1, C0, C1, D0, D1) \ - do{ \ - G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - \ - DIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ - \ - G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - \ - UNDIAGONALIZE_1(A0, B0, C0, D0, A1, B1, C1, D1) \ - } while((void)0, 0); - -#define BLAKE2_ROUND_2(A0, A1, B0, B1, C0, C1, D0, D1) \ - do{ \ - G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - \ - DIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ - \ - G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ - \ - UNDIAGONALIZE_2(A0, A1, B0, B1, C0, C1, D0, D1) \ - } while((void)0, 0); - -#endif /* __AVX2__ */ - -#else /* __AVX512F__ */ - -#include - -#define ror64(x, n) _mm512_ror_epi64((x), (n)) - -static __m512i muladd(__m512i x, __m512i y) -{ - __m512i z = _mm512_mul_epu32(x, y); - return _mm512_add_epi64(_mm512_add_epi64(x, y), _mm512_add_epi64(z, z)); -} - -#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - A0 = muladd(A0, B0); \ - A1 = muladd(A1, B1); \ -\ - D0 = _mm512_xor_si512(D0, A0); \ - D1 = _mm512_xor_si512(D1, A1); \ -\ - D0 = ror64(D0, 32); \ - D1 = ror64(D1, 32); \ -\ - C0 = muladd(C0, D0); \ - C1 = muladd(C1, D1); \ -\ - B0 = _mm512_xor_si512(B0, C0); \ - B1 = _mm512_xor_si512(B1, C1); \ -\ - B0 = ror64(B0, 24); \ - B1 = ror64(B1, 24); \ - } while ((void)0, 0) - -#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - A0 = muladd(A0, B0); \ - A1 = muladd(A1, B1); \ -\ - D0 = _mm512_xor_si512(D0, A0); \ - D1 = _mm512_xor_si512(D1, A1); \ -\ - D0 = ror64(D0, 16); \ - D1 = ror64(D1, 16); \ -\ - C0 = muladd(C0, D0); \ - C1 = muladd(C1, D1); \ -\ - B0 = _mm512_xor_si512(B0, C0); \ - B1 = _mm512_xor_si512(B1, C1); \ -\ - B0 = ror64(B0, 63); \ - B1 = ror64(B1, 63); \ - } while ((void)0, 0) - -#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \ - B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \ -\ - C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ - C1 = _mm512_permutex_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ -\ - D0 = _mm512_permutex_epi64(D0, _MM_SHUFFLE(2, 1, 0, 3)); \ - D1 = _mm512_permutex_epi64(D1, _MM_SHUFFLE(2, 1, 0, 3)); \ - } while ((void)0, 0) - -#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(2, 1, 0, 3)); \ - B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(2, 1, 0, 3)); \ -\ - C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ - C1 = _mm512_permutex_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \ -\ - D0 = _mm512_permutex_epi64(D0, _MM_SHUFFLE(0, 3, 2, 1)); \ - D1 = _mm512_permutex_epi64(D1, _MM_SHUFFLE(0, 3, 2, 1)); \ - } while ((void)0, 0) - -#define BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1) \ - do { \ - G1(A0, B0, C0, D0, A1, B1, C1, D1); \ - G2(A0, B0, C0, D0, A1, B1, C1, D1); \ -\ - DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ -\ - G1(A0, B0, C0, D0, A1, B1, C1, D1); \ - G2(A0, B0, C0, D0, A1, B1, C1, D1); \ -\ - UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \ - } while ((void)0, 0) - -#define SWAP_HALVES(A0, A1) \ - do { \ - __m512i t0, t1; \ - t0 = _mm512_shuffle_i64x2(A0, A1, _MM_SHUFFLE(1, 0, 1, 0)); \ - t1 = _mm512_shuffle_i64x2(A0, A1, _MM_SHUFFLE(3, 2, 3, 2)); \ - A0 = t0; \ - A1 = t1; \ - } while((void)0, 0) - -#define SWAP_QUARTERS(A0, A1) \ - do { \ - SWAP_HALVES(A0, A1); \ - A0 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A0); \ - A1 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A1); \ - } while((void)0, 0) - -#define UNSWAP_QUARTERS(A0, A1) \ - do { \ - A0 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A0); \ - A1 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A1); \ - SWAP_HALVES(A0, A1); \ - } while((void)0, 0) - -#define BLAKE2_ROUND_1(A0, C0, B0, D0, A1, C1, B1, D1) \ - do { \ - SWAP_HALVES(A0, B0); \ - SWAP_HALVES(C0, D0); \ - SWAP_HALVES(A1, B1); \ - SWAP_HALVES(C1, D1); \ - BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1); \ - SWAP_HALVES(A0, B0); \ - SWAP_HALVES(C0, D0); \ - SWAP_HALVES(A1, B1); \ - SWAP_HALVES(C1, D1); \ - } while ((void)0, 0) - -#define BLAKE2_ROUND_2(A0, A1, B0, B1, C0, C1, D0, D1) \ - do { \ - SWAP_QUARTERS(A0, A1); \ - SWAP_QUARTERS(B0, B1); \ - SWAP_QUARTERS(C0, C1); \ - SWAP_QUARTERS(D0, D1); \ - BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1); \ - UNSWAP_QUARTERS(A0, A1); \ - UNSWAP_QUARTERS(B0, B1); \ - UNSWAP_QUARTERS(C0, C1); \ - UNSWAP_QUARTERS(D0, D1); \ - } while ((void)0, 0) - -#endif /* __AVX512F__ */ -#endif /* BLAKE_ROUND_MKA_OPT_H */ diff --git a/stratum/algos/blake2/blamka-round-ref.h.bak b/stratum/algos/blake2/blamka-round-ref.h.bak deleted file mode 100644 index b8f2cf471..000000000 --- a/stratum/algos/blake2/blamka-round-ref.h.bak +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Argon2 reference source code package - reference C implementations - * - * Copyright 2015 - * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves - * - * You may use this work under the terms of a Creative Commons CC0 1.0 - * License/Waiver or the Apache Public License 2.0, at your option. The terms of - * these licenses can be found at: - * - * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - * - * You should have received a copy of both of these licenses along with this - * software. If not, they may be obtained at the above URLs. - */ - -#ifndef BLAKE_ROUND_MKA_H -#define BLAKE_ROUND_MKA_H - -#include "blake2.h" -#include "blake2-impl.h" - -/* designed by the Lyra PHC team */ -static BLAKE2_INLINE uint64_t fBlaMka(uint64_t x, uint64_t y) { - const uint64_t m = UINT64_C(0xFFFFFFFF); - const uint64_t xy = (x & m) * (y & m); - return x + y + 2 * xy; -} - -#define G(a, b, c, d) \ - do { \ - a = fBlaMka(a, b); \ - d = rotr64(d ^ a, 32); \ - c = fBlaMka(c, d); \ - b = rotr64(b ^ c, 24); \ - a = fBlaMka(a, b); \ - d = rotr64(d ^ a, 16); \ - c = fBlaMka(c, d); \ - b = rotr64(b ^ c, 63); \ - } while ((void)0, 0) - -#define BLAKE2_ROUND_NOMSG(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, \ - v12, v13, v14, v15) \ - do { \ - G(v0, v4, v8, v12); \ - G(v1, v5, v9, v13); \ - G(v2, v6, v10, v14); \ - G(v3, v7, v11, v15); \ - G(v0, v5, v10, v15); \ - G(v1, v6, v11, v12); \ - G(v2, v7, v8, v13); \ - G(v3, v4, v9, v14); \ - } while ((void)0, 0) - -#endif diff --git a/stratum/algos/lyra2v3.c.bak b/stratum/algos/lyra2v3.c.bak deleted file mode 100644 index ee0aa80e5..000000000 --- a/stratum/algos/lyra2v3.c.bak +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * Copyright 2009 Colin Percival, 2011 ArtForz, 2013 Neisklar, 2014 James Lovejoy - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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. - * - * This file was originally written by Colin Percival as part of the Tarsnap - * online backup system. - */ - -#include -#include -#include -#include -#include "../sha3/sph_blake.h" -#include "../sha3/sph_cubehash.h" -#include "../sha3/sph_bmw.h" -#include "Lyra2.h" - -void lyra2v3_hash(const char* input, char* output, uint32_t len) -{ - uint32_t hashA[8], hashB[8]; - - sph_blake256_context ctx_blake; - sph_cubehash256_context ctx_cube; - sph_bmw256_context ctx_bmw; - - sph_blake256_set_rounds(14); - - sph_blake256_init(&ctx_blake); - sph_blake256(&ctx_blake, input, len); - sph_blake256_close(&ctx_blake, hashA); - - LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); - - sph_cubehash256_init(&ctx_cube); - sph_cubehash256(&ctx_cube, hashB, 32); - sph_cubehash256_close(&ctx_cube, hashA); - - LYRA2_3(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4); - - sph_bmw256_init(&ctx_bmw); - sph_bmw256(&ctx_bmw, hashB, 32); - sph_bmw256_close(&ctx_bmw, hashA); - - memcpy(output, hashA, 32); -} - diff --git a/stratum/algos/rfv2/rfv2_core.c.bak b/stratum/algos/rfv2/rfv2_core.c.bak deleted file mode 100644 index de37c2d10..000000000 --- a/stratum/algos/rfv2/rfv2_core.c.bak +++ /dev/null @@ -1,795 +0,0 @@ -// RainForest hash algorithm -// Author: Bill Schneider -// Created: Feb 13th, 2018 -// Updated: Apr 21th, 2019 -// -// RainForest uses native integer operations which are extremely fast on -// modern 64-bit processors, significantly slower on 32-bit processors such -// as GPUs, and extremely slow if at all implementable on FPGAs and ASICs. -// It makes an intensive use of the L1 cache to maintain a heavy intermediary -// state favoring modern CPUs compared to GPUs (small L1 cache shared by many -// shaders) or FPGAs (very hard to implement the required low-latency cache) -// when scanning ranges for nonces. In addition it exploit the perfectly -// defined precision loss of IEEE754 floating point conversion between int and -// double to make sure the implementation runs on a perfectly compliant stack -// and not on a simplified one like an inexpensive IP block. It also uses some -// floating point functions such as sin(), pow() and sqrt() which are available -// on any GPU but could be wrong if simplified. Finally, it uses 96 MB of work -// area per thread in order to incur a cost to highly parallel processors such -// as high-end GPUs. The purpose is to create a fair balance between all mining -// equipments, from mobile phones to extreme performance GPUs and to rule out -// farming factories relying on ASICs, FPGAs, or any other very expensive -// solution. The CRC32 instruction is used a lot as it is extremely fast on -// low-power ARM chips and allows such devices to rival high-end PCs mining -// performance. Note that CRC32 is not used for security at all, only to -// disturb data. -// -// Tests have shown that mid-range OpenCL GPUs can get the computation right -// but that low-end ones not implementing 64-bit floats in hardware and -// falling back to a simplified software stack can't get it right. It was -// also reported that building this code with -ffast-math results in invalid -// hashes, as predicted. -// -// Build instructions on Ubuntu 16.04 to 18.04 : -// - on x86: use gcc -lm -march=native or -maes to enable AES-NI -// - on ARMv8: use gcc -lm -march=native or -march=armv8-a+crypto+crc to enable -// CRC32 and AES extensions. -// -// Note: always use the same options to build all files! -// - -#include -#include -#include -#include "rfv2.h" - -// these archs are fine with unaligned reads -#if defined(__x86_64__)||defined(__aarch64__) -#define RF_UNALIGNED_LE64 -#define RF_UNALIGNED_LE32 -#elif defined(__i386__)||defined(__ARM_ARCH_7A__) -#define RF_UNALIGNED_LE32 -#endif - -#define RFV2_INIT_CRC 20180213 - -#ifndef RF_ALIGN -#ifdef _MSC_VER -#define RF_ALIGN(x) __declspec(align(x)) -#else -#define RF_ALIGN(x) __attribute__((aligned(x))) -#endif -#endif - -// for aes2r_encrypt() -#include "rf_aes2r.c" - -// for rf_crc32_32() -#include "rf_crc32.c" - -// this seems necessary only for gcc, otherwise hash is bogus -#ifdef _MSC_VER -typedef uint8_t rf_u8; -typedef uint16_t rf_u16; -typedef uint32_t rf_u32; -typedef uint64_t rf_u64; -#else -typedef __attribute__((may_alias)) uint8_t rf_u8; -typedef __attribute__((may_alias)) uint16_t rf_u16; -typedef __attribute__((may_alias)) uint32_t rf_u32; -typedef __attribute__((may_alias)) uint64_t rf_u64; -#endif - -#define RFV2_RAMBOX_HIST 1024 - -// number of loops run over the initial message. At 19 loops -// most runs are under 256 changes -#define RFV2_LOOPS 320 - -typedef union { - rf_u8 b[32]; - rf_u16 w[16]; - rf_u32 d[8]; - rf_u64 q[4]; -} rf_hash256_t; - -typedef struct RF_ALIGN(16) rfv2_ctx { - uint32_t word; // LE pending message - uint32_t len; // total message length - uint32_t crc; - uint32_t changes; // must remain lower than RFV2_RAMBOX_HIST - uint64_t *rambox; - uint32_t rb_o; // rambox offset - uint32_t rb_l; // rambox length - rf_hash256_t RF_ALIGN(32) hash; - uint32_t hist[RFV2_RAMBOX_HIST]; - uint64_t prev[RFV2_RAMBOX_HIST]; -} rfv2_ctx_t; - -// the table is used as an 8 bit-aligned array of uint64_t for the first word, -// and as a 16 bit-aligned array of uint64_t for the second word. It is filled -// with the sha256 of "RainForestProCpuAntiAsic", iterated over and over until -// the table is filled. The highest offset being ((uint16_t *)table)[255] we -// need to add 6 extra bytes at the end to read an uint64_t. Maybe calculated -// on a UNIX system with this loop : -// -// ref="RainForestProCpuAntiAsic" -// for ((i=0;i<18;i++)); do -// set $(echo -n $ref|sha256sum) -// echo $1|sed 's/\(..\)/0x\1,/g' -// ref=$(printf $(echo $1|sed 's/\(..\)/\\x\1/g')) -// done - -static const uint8_t rfv2_table[256 * 2 + 6] = { - 0x8e,0xc1,0xa8,0x04,0x38,0x78,0x7c,0x54,0x29,0x23,0x1b,0x78,0x9f,0xf9,0x27,0x54, - 0x11,0x78,0x95,0xb6,0xaf,0x78,0x45,0x16,0x2b,0x9e,0x91,0xe8,0x97,0x25,0xf8,0x63, - 0x82,0x56,0xcf,0x48,0x6f,0x82,0x14,0x0d,0x61,0xbe,0x47,0xd1,0x37,0xee,0x30,0xa9, - 0x28,0x1e,0x4b,0xbf,0x07,0xcd,0x41,0xdf,0x23,0x21,0x12,0xb8,0x81,0x99,0x1d,0xe6, - 0x68,0xcf,0xfa,0x2d,0x8e,0xb9,0x88,0xa7,0x15,0xce,0x9e,0x2f,0xeb,0x1b,0x0f,0x67, - 0x20,0x68,0x6c,0xa9,0x5d,0xc1,0x7c,0x76,0xdf,0xbd,0x98,0x61,0xb4,0x14,0x65,0x40, - 0x1e,0x72,0x51,0x74,0x93,0xd3,0xad,0xbe,0x46,0x0a,0x25,0xfb,0x6a,0x5e,0x1e,0x8a, - 0x5a,0x03,0x3c,0xab,0x12,0xc2,0xd4,0x07,0x91,0xab,0xc9,0xdf,0x92,0x2c,0x85,0x6a, - 0xa6,0x25,0x1e,0x66,0x50,0x26,0x4e,0xa8,0xbd,0xda,0x88,0x1b,0x95,0xd4,0x00,0xeb, - 0x0d,0x1c,0x9b,0x3c,0x86,0xc7,0xb2,0xdf,0xb4,0x5a,0x36,0x15,0x8e,0x04,0xd2,0x54, - 0x79,0xd2,0x3e,0x3d,0x99,0x50,0xa6,0x12,0x4c,0x32,0xc8,0x51,0x14,0x4d,0x4b,0x0e, - 0xbb,0x17,0x80,0x8f,0xa4,0xc4,0x99,0x72,0xd7,0x14,0x4b,0xef,0xed,0x14,0xe9,0x17, - 0xfa,0x9b,0x5d,0x37,0xd6,0x2f,0xef,0x02,0xd6,0x71,0x0a,0xbd,0xc5,0x40,0x11,0x90, - 0x90,0x4e,0xb4,0x4c,0x72,0x51,0x7a,0xd8,0xba,0x30,0x4d,0x8c,0xe2,0x11,0xbb,0x6d, - 0x4b,0xbc,0x6f,0x14,0x0c,0x9f,0xfa,0x5e,0x66,0x40,0x45,0xcb,0x7d,0x1b,0x3a,0xc5, - 0x5e,0x9c,0x1e,0xcc,0xbd,0x16,0x3b,0xcf,0xfb,0x2a,0xd2,0x08,0x2a,0xf8,0x3d,0x46, - 0x93,0x90,0xb3,0x66,0x81,0x34,0x7f,0x6d,0x9b,0x8c,0x99,0x03,0xc5,0x27,0xa3,0xd9, - 0xce,0x90,0x88,0x0f,0x55,0xc3,0xa1,0x60,0x53,0xc8,0x0d,0x25,0xae,0x61,0xd9,0x72, - 0x48,0x1d,0x6c,0x61,0xd2,0x87,0xdd,0x3d,0x23,0xf5,0xde,0x93,0x39,0x4c,0x43,0x9a, - 0xf9,0x37,0xf2,0x61,0xd7,0xf8,0xea,0x65,0xf0,0xf1,0xde,0x3f,0x05,0x57,0x83,0x81, - 0xde,0x02,0x62,0x49,0xd4,0x32,0x7e,0x4a,0xd4,0x9f,0x40,0x7e,0xb9,0x91,0xb1,0x35, - 0xf7,0x62,0x3f,0x65,0x9e,0x4d,0x2b,0x10,0xde,0xd4,0x77,0x64,0x0f,0x84,0xad,0x92, - 0xe7,0xa3,0x8a,0x10,0xc1,0x14,0xeb,0x57,0xc4,0xad,0x8e,0xc2,0xc7,0x32,0xa3,0x7e, - 0x50,0x1f,0x7c,0xbb,0x2e,0x5f,0xf5,0x18,0x22,0xea,0xec,0x9d,0xa4,0x77,0xcd,0x85, - 0x04,0x2f,0x20,0x61,0x72,0xa7,0x0c,0x92,0x06,0x4d,0x01,0x70,0x9b,0x35,0xa1,0x27, - 0x32,0x6e,0xb9,0x78,0xe0,0xaa,0x5f,0x91,0xa6,0x51,0xe3,0x63,0xf8,0x97,0x2f,0x60, - 0xd9,0xfb,0x15,0xe5,0x59,0xcf,0x31,0x3c,0x61,0xc7,0xb5,0x61,0x2a,0x6b,0xdd,0xd1, - 0x09,0x70,0xc0,0xcf,0x94,0x7a,0xcc,0x31,0x94,0xb1,0xa2,0xf6,0x95,0xc0,0x38,0x3d, - 0xef,0x19,0x30,0x70,0xdd,0x62,0x32,0x8f,0x7c,0x30,0xb9,0x18,0xf8,0xe7,0x8f,0x0a, - 0xaa,0xb6,0x00,0x86,0xf2,0xe0,0x30,0x5f,0xa2,0xe8,0x00,0x8e,0x05,0xa0,0x22,0x18, - 0x9f,0x83,0xd4,0x3a,0x85,0x10,0xb9,0x51,0x8d,0x07,0xf0,0xb3,0xcd,0x9b,0x55,0xa1, - 0x14,0xce,0x0f,0xb2,0xcf,0xb8,0xce,0x2d,0xe6,0xe8,0x35,0x32,0x1f,0x22,0xb5,0xec, - 0xd0,0xb9,0x72,0xa8,0xb4,0x97 - //,0x6e,0x0a,0x47,0xcd,0x5a,0xf0,0xdc,0xeb,0xfd,0x46, - //0xe5,0x6e,0x83,0xe6,0x1a,0xcc,0x4a,0x8b,0xa5,0x28,0x9e,0x50,0x48,0xa9,0xa2,0x6b, -}; - -// this is made of the last iteration of the rfv2_table (18th transformation) -static const uint8_t rfv2_iv[32] = { - 0x78,0xe9,0x90,0xd3,0xb3,0xc8,0x9b,0x7b,0x0a,0xc4,0x86,0x6e,0x4e,0x38,0xb3,0x6b, - 0x33,0x68,0x7c,0xed,0x73,0x35,0x4b,0x0a,0x97,0x25,0x4c,0x77,0x7a,0xaa,0x61,0x1b -}; - -// mix the current state with the crc and return the new crc -static inline uint32_t rf_crc32x4(rf_u32 *state, uint32_t crc) -{ - crc = state[0] = rf_crc32_32(crc, state[0]); - crc = state[1] = rf_crc32_32(crc, state[1]); - crc = state[2] = rf_crc32_32(crc, state[2]); - crc = state[3] = rf_crc32_32(crc, state[3]); - return crc; -} - -// add to _msg_ its own crc32. use -mcpu=cortex-a53+crc to enable native CRC -// instruction on ARM. -static inline uint64_t rf_add64_crc32(uint64_t msg) -{ - return msg + rf_crc32_64(0, msg); -} - -// read 64 bit from possibly unaligned memory address _p_ in little endian mode -static inline uint64_t rf_memr64(const uint8_t *p) -{ -#ifdef RF_UNALIGNED_LE64 - return *(uint64_t *)p; -#else - uint64_t ret; - int byte; - for (ret = byte = 0; byte < 8; byte++) - ret += (uint64_t)p[byte] << (byte * 8); - return ret; -#endif -} - -// return rainforest lower word entry for index -static inline uint64_t rf_wltable(uint8_t index) -{ - return rf_memr64(&rfv2_table[index]); -} - -// return rainforest upper word entry for _index_ -static inline uint64_t rf_whtable(uint8_t index) -{ - return rf_memr64(&rfv2_table[index * 2]); -} - -// rotate left vector _v_ by _bits_ bits -static inline uint64_t rf_rotl64(uint64_t v, uint64_t bits) -{ -#if !defined(RF_NOASM) && defined(__x86_64__) - __asm__("rol %1, %0" : "+r"(v) : "c"((uint8_t)bits)); -#else -#if !defined(__ARM_ARCH_8A) && !defined(__x86_64__) - bits &= 63; -#endif - v = (v << bits) | (v >> (-bits & 63)); -#endif - return v; -} - -// rotate right vector _v_ by _bits_ bits -static inline uint64_t rf_rotr64(uint64_t v, uint64_t bits) -{ -#if !defined(RF_NOASM) && defined(__x86_64__) - __asm__("ror %1, %0" : "+r"(v) : "c"((uint8_t)bits)); -#else -#if !defined(__ARM_ARCH_8A) && !defined(__x86_64__) - bits &= 63; -#endif - v = (v >> bits) | (v << (-bits & 63)); -#endif - return v; -} - -// reverse all bytes in the word _v_ -static inline uint64_t rf_bswap64(uint64_t v) -{ -#if !defined(RF_NOASM) && defined(__x86_64__) && !defined(_MSC_VER) - __asm__("bswapq %0":"+r"(v)); -#elif !defined(RF_NOASM) && defined(__aarch64__) - __asm__("rev %0,%0\n":"+r"(v)); -#else - v = ((v & 0xff00ff00ff00ff00ULL) >> 8) | ((v & 0x00ff00ff00ff00ffULL) << 8); - v = ((v & 0xffff0000ffff0000ULL) >> 16) | ((v & 0x0000ffff0000ffffULL) << 16); - v = (v >> 32) | (v << 32); -#endif - return v; -} - -// reverse all bits in the word _v_ -static inline uint64_t rf_revbit64(uint64_t v) -{ -#if !defined(RF_NOASM) && defined(__aarch64__) - __asm__ volatile("rbit %0, %1\n" : "=r"(v) : "r"(v)); -#else - v = ((v & 0xaaaaaaaaaaaaaaaaULL) >> 1) | ((v & 0x5555555555555555ULL) << 1); - v = ((v & 0xccccccccccccccccULL) >> 2) | ((v & 0x3333333333333333ULL) << 2); - v = ((v & 0xf0f0f0f0f0f0f0f0ULL) >> 4) | ((v & 0x0f0f0f0f0f0f0f0fULL) << 4); -#if !defined(RF_NOASM) && defined(__x86_64__) - __asm__("bswapq %0" : "=r"(v) : "0"(v)); -#else - v = ((v & 0xff00ff00ff00ff00ULL) >> 8) | ((v & 0x00ff00ff00ff00ffULL) << 8); - v = ((v & 0xffff0000ffff0000ULL) >> 16) | ((v & 0x0000ffff0000ffffULL) << 16); - v = (v >> 32) | (v << 32); -#endif -#endif - return v; -} - -#if !defined(__GNUC__) || (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 7) -#if !defined(__GNUC__) // also covers clang -int __builtin_clzll(uint64_t x) -{ - uint64_t y; - int n = 64; - - y = x >> 32; if (y) { x = y; n -= 32; } - y = x >> 16; if (y) { x = y; n -= 16; } - y = x >> 8; if (y) { x = y; n -= 8; } - y = x >> 4; if (y) { x = y; n -= 4; } - y = x >> 2; if (y) { x = y; n -= 2; } - y = x >> 1; if (y) { x = y; n -= 1; } - return n - x; -} - -#endif -static inline int __builtin_clrsbll(int64_t x) -{ - if (x < 0) - return __builtin_clzll(~(x << 1)); - else - return __builtin_clzll(x << 1); -} -#endif - -// write (_x_,_y_) at cell _cell_ for offset _ofs_ -static inline void rf_w128(uint64_t *cell, size_t ofs, uint64_t x, uint64_t y) -{ -#if !defined(RF_NOASM) && (defined(__ARM_ARCH_8A) || defined(__AARCH64EL__)) - // 128 bit at once is faster when exactly two parallelizable instructions are - // used between two calls to keep the pipe full. - __asm__ volatile("stp %0, %1, [%2,%3]\n\t" - : /* no output */ - : "r"(x), "r"(y), "r" (cell), "I" (ofs * 8)); -#else - cell[ofs + 0] = x; - cell[ofs + 1] = y; -#endif -} - -// lookup _old_ in _rambox_, update it and perform a substitution if a matching -// value is found. -static inline uint32_t rfv2_rambox(rfv2_ctx_t *ctx, uint64_t old) -{ - uint64_t *p, k; - uint32_t idx; - - k = old; - old = rf_add64_crc32(old); - old ^= rf_revbit64(k); - if (__builtin_clrsbll(old) > 3) { - idx = ctx->rb_o + old % ctx->rb_l; - p = &ctx->rambox[idx]; - k = *p; - old += rf_rotr64(k, (uint8_t)(old / ctx->rb_l)); - *p = old; - if (ctx->changes < RFV2_RAMBOX_HIST) { - ctx->hist[ctx->changes] = idx; - ctx->prev[ctx->changes] = k; - ctx->changes++; - } - } - return (uint32_t)old; -} - -// initialize the ram box -void rfv2_raminit(void *area) -{ - uint64_t pat1 = 0x0123456789ABCDEFULL; - uint64_t pat2 = 0xFEDCBA9876543210ULL; - uint64_t pat3; - uint32_t pos; - uint64_t *rambox = (uint64_t *)area; - - // Note: no need to mask the higher bits on armv8 nor x86 : - // - // From ARMv8's ref manual : - // The register that is specified for a shift can be 32-bit or - // 64-bit. The amount to be shifted can be specified either as - // an immediate, that is up to register size minus one, or by - // a register where the value is taken only from the bottom five - // (modulo-32) or six (modulo-64) bits. - // - // Here we rotate pat2 by pat1's bits and put it into pat1, and in - // parallel we rotate pat1 by pat2's bits and put it into pat2. Thus - // the two data blocks are exchanged in addition to being rotated. - // What is stored each time is the previous and the rotated blocks, - // which only requires one rotate and a register rename. - - for (pos = 0; pos < RFV2_RAMBOX_SIZE; pos += 16) { - pat3 = pat1; - pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x111; - rf_w128(rambox + pos, 0, pat1, pat3); - - pat3 = pat2; - pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x222; - rf_w128(rambox + pos, 2, pat2, pat3); - - pat3 = pat1; - pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x333; - rf_w128(rambox + pos, 4, pat1, pat3); - - pat3 = pat2; - pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x444; - rf_w128(rambox + pos, 6, pat2, pat3); - - pat3 = pat1; - pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x555; - rf_w128(rambox + pos, 8, pat1, pat3); - - pat3 = pat2; - pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x666; - rf_w128(rambox + pos, 10, pat2, pat3); - - pat3 = pat1; - pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x777; - rf_w128(rambox + pos, 12, pat1, pat3); - - pat3 = pat2; - pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x888; - rf_w128(rambox + pos, 14, pat2, pat3); - } -} - -#ifdef RF_DEBUG_RAMBOX -// verify the ram box -static void rfv2_ram_test(const void *area) -{ - uint64_t pat1 = 0x0123456789ABCDEFULL; - uint64_t pat2 = 0xFEDCBA9876543210ULL; - uint64_t pat3; - uint32_t pos; - const uint64_t *rambox = (const uint64_t *)area; - - // Note: no need to mask the higher bits on armv8 nor x86 : - // - // From ARMv8's ref manual : - // The register that is specified for a shift can be 32-bit or - // 64-bit. The amount to be shifted can be specified either as - // an immediate, that is up to register size minus one, or by - // a register where the value is taken only from the bottom five - // (modulo-32) or six (modulo-64) bits. - // - // Here we rotate pat2 by pat1's bits and put it into pat1, and in - // parallel we rotate pat1 by pat2's bits and put it into pat2. Thus - // the two data blocks are exchanged in addition to being rotated. - // What is stored each time is the previous and the rotated blocks, - // which only requires one rotate and a register rename. - - for (pos = 0; pos < RFV2_RAMBOX_SIZE; pos += 16) { - pat3 = pat1; - pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x111; - if (rambox[pos + 0] != pat1) - abort(); - - if (rambox[pos + 1] != pat3) - abort(); - - pat3 = pat2; - pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x222; - if (rambox[pos + 2] != pat2) - abort(); - - if (rambox[pos + 3] != pat3) - abort(); - - pat3 = pat1; - pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x333; - if (rambox[pos + 4] != pat1) - abort(); - - if (rambox[pos + 5] != pat3) - abort(); - - pat3 = pat2; - pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x444; - if (rambox[pos + 6] != pat2) - abort(); - - if (rambox[pos + 7] != pat3) - abort(); - - pat3 = pat1; - pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x555; - if (rambox[pos + 8] != pat1) - abort(); - - if (rambox[pos + 9] != pat3) - abort(); - - pat3 = pat2; - pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x666; - if (rambox[pos + 10] != pat2) - abort(); - - if (rambox[pos + 11] != pat3) - abort(); - - pat3 = pat1; - pat1 = rf_rotr64(pat2, (uint8_t)pat3) + 0x777; - if (rambox[pos + 12] != pat1) - abort(); - - if (rambox[pos + 13] != pat3) - abort(); - - pat3 = pat2; - pat2 = rf_rotr64(pat1, (uint8_t)pat3) + 0x888; - if (rambox[pos + 14] != pat2) - abort(); - - if (rambox[pos + 15] != pat3) - abort(); - } -} -#endif - -// mix each word with the precision lost from the other one when converting -// it to an IEEE754 double floating point number. -static inline void rfv2_mix_fp_loss(uint64_t *p, uint64_t *q) -{ - uint64_t p0, q0; - uint64_t lp, lq; - double fp, fq; - - p0 = *p; q0 = *q; - fp = p0; fq = q0; - lp = (uint64_t)fp ^ p0; lq = (uint64_t)fq ^ q0; - p0 += lq; q0 += lp; - *p = p0; *q = q0; -} - -// return p/q into p and rev(rev(q)+p) into q -static inline void rfv2_div_mod(uint64_t *p, uint64_t *q) -{ - uint64_t x = *p; - *p = x / *q; -#if !defined(RF_NOASM) && !defined(_MSC_VER) - __asm__ volatile("" :: "r"(*p)); // force to place the div first -#endif - *q = rf_revbit64(rf_revbit64(*q)+x); -} - -// exec the div/mod box. _v0_ and _v1_ must be aligned. -static inline void rfv2_divbox(rf_u64 *v0, rf_u64 *v1) -{ - uint64_t pl, ql, ph, qh; - - //---- low word ---- ---- high word ---- - pl = ~*v0; ph = ~*v1; - ql = rf_bswap64(*v0); qh = rf_bswap64(*v1); - rfv2_mix_fp_loss(&ql, &qh); - - if (!pl || !ql) { pl = ql = 0; } - else if (pl > ql) rfv2_div_mod(&pl, &ql); - else rfv2_div_mod(&ql, &pl); - - if (!ph || !qh) { ph = qh = 0; } - else if (ph > qh) rfv2_div_mod(&ph, &qh); - else rfv2_div_mod(&qh, &ph); - - pl += qh; ph += ql; - *v0 -= pl; *v1 -= ph; -} - -// exec the rotation/add box. _v0_ and _v1_ must be aligned. -static inline void rfv2_rotbox(rf_u64 *v0, rf_u64 *v1, uint8_t b0, uint8_t b1) -{ - uint64_t l, h; - - //---- low word ---- ---- high word ---- - l = *v0; h = *v1; - l = rf_rotr64(l, b0); h = rf_rotl64(h, b1); - rfv2_mix_fp_loss(&l, &h); - l += rf_wltable(b0); h += rf_whtable(b1); - b0 = (uint8_t)l; b1 = (uint8_t)h; - l = rf_rotl64(l, b1); h = rf_rotr64(h, b0); - rfv2_mix_fp_loss(&l, &h); - b0 = (uint8_t)l; b1 = (uint8_t)h; - l = rf_rotr64(l, b1); h = rf_rotl64(h, b0); - rfv2_mix_fp_loss(&l, &h); - *v0 = l; *v1 = h; -} - -// mix the current state with the current crc -static inline uint32_t rfv2_scramble(rfv2_ctx_t *ctx) -{ - return ctx->crc = rf_crc32x4(ctx->hash.d, ctx->crc); -} - -// mix the state with the crc and the pending text, and update the crc -static inline void rfv2_inject(rfv2_ctx_t *ctx) -{ - ctx->crc = - (ctx->len & 3) == 0 ? rf_crc32_32(rfv2_scramble(ctx), ctx->word): - (ctx->len & 3) == 3 ? rf_crc32_24(rfv2_scramble(ctx), ctx->word): - (ctx->len & 3) == 2 ? rf_crc32_16(rfv2_scramble(ctx), ctx->word): - rf_crc32_8(rfv2_scramble(ctx), ctx->word); - ctx->word = 0; -} - -// rotate the hash by 32 bits. Not using streaming instructions (SSE/NEON) is -// faster because the compiler can follow moves an use register renames. -static inline void rfv2_rot32x256(rf_hash256_t *hash) -{ -#if defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_ARCH_7A__) - uint32_t t0, t1, t2; - - t0 = hash->d[0]; - t1 = hash->d[1]; - t2 = hash->d[2]; - hash->d[1] = t0; - hash->d[2] = t1; - - t0 = hash->d[3]; - t1 = hash->d[4]; - hash->d[3] = t2; - hash->d[4] = t0; - - t2 = hash->d[5]; - t0 = hash->d[6]; - hash->d[5] = t1; - hash->d[6] = t2; - - t1 = hash->d[7]; - hash->d[7] = t0; - hash->d[0] = t1; -#else - uint32_t tmp = hash->d[7]; - - memmove(&hash->d[1], &hash->d[0], 28); - hash->d[0] = tmp; -#endif -} - -// encrypt the first 128 bits of the hash using the last 128 bits as the key -static inline void rfv2_aesenc(rfv2_ctx_t *ctx) -{ - aes2r_encrypt((uint8_t *)ctx->hash.b, (uint8_t *)ctx->hash.b + 16); -} - -// each new round consumes exactly 32 bits of text at once and perturbates -// 128 bits of output, 96 of which overlap with the previous round, and 32 -// of which are new. With 5 rounds or more each output bit depends on every -// input bit. -static inline void rfv2_one_round(rfv2_ctx_t *ctx) -{ - uint64_t carry; - - rfv2_rot32x256(&ctx->hash); - - carry = ((uint64_t)ctx->len << 32) + ctx->crc; - rfv2_scramble(ctx); - rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); - rfv2_scramble(ctx); - - carry = rfv2_rambox(ctx, carry); - rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry), (uint8_t)(carry >> 56)); - rfv2_scramble(ctx); - rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); - rfv2_scramble(ctx); - - carry = rfv2_rambox(ctx, carry); - rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 8), (uint8_t)(carry >> 48)); - rfv2_scramble(ctx); - rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); - rfv2_scramble(ctx); - - carry = rfv2_rambox(ctx, carry); - rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 16), (uint8_t)(carry >> 40)); - rfv2_scramble(ctx); - rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); - rfv2_scramble(ctx); - - carry = rfv2_rambox(ctx, carry); - rfv2_rotbox(ctx->hash.q, ctx->hash.q + 1, (uint8_t)(carry >> 24), (uint8_t)(carry >> 32)); - rfv2_scramble(ctx); - rfv2_divbox(ctx->hash.q, ctx->hash.q + 1); - rfv2_inject(ctx); - rfv2_aesenc(ctx); - rfv2_scramble(ctx); -} - -// initialize the hash state -static void rfv2_init(rfv2_ctx_t *ctx, uint32_t seed, void *rambox) -{ - memcpy(ctx->hash.b, rfv2_iv, sizeof(ctx->hash.b)); - ctx->crc = seed; - ctx->word = ctx->len = 0; - ctx->changes = 0; - ctx->rb_o = 0; - ctx->rb_l = RFV2_RAMBOX_SIZE; - ctx->rambox = (uint64_t *)rambox; -} - -// update the hash context _ctx_ with _len_ bytes from message _msg_ -static inline void rfv2_update(rfv2_ctx_t *ctx, const void *msg, size_t len) -{ - const uint8_t *msg8 = (uint8_t *)msg; - - while (len > 0) { -#ifdef RF_UNALIGNED_LE32 - if (!(ctx->len & 3) && len >= 4) { - ctx->word = *(uint32_t *)msg8; - ctx->len += 4; - rfv2_one_round(ctx); - msg8 += 4; - len -= 4; - continue; - } -#endif - ctx->word |= ((uint32_t)*msg8++) << (8 * (ctx->len++ & 3)); - len--; - if (!(ctx->len & 3)) - rfv2_one_round(ctx); - } -} - -// pad to the next 256-bit (32 bytes) boundary -static inline void rfv2_pad256(rfv2_ctx_t *ctx) -{ - const uint8_t pad256[32] = { 0, }; - uint32_t pad; - - pad = (32 - ctx->len) & 0xF; - if (pad) - rfv2_update(ctx, pad256, pad); -} - -// finalize the hash and copy the result into _out_ if not null (256 bits) -static inline void rfv2_final(void *out, rfv2_ctx_t *ctx) -{ - // always run 5 extra rounds to complete the last 128 bits. - // the 5th one is because the last processed block is only in - // the ctx and was not mixed yet. - rfv2_one_round(ctx); - rfv2_one_round(ctx); - rfv2_one_round(ctx); - rfv2_one_round(ctx); - rfv2_one_round(ctx); - - if (out) - memcpy(out, ctx->hash.b, 32); -} - -// apply a linear sine to a discrete integer to validate that the platform -// operates a 100% compliant FP stack. Non-IEEE754 FPU will fail to provide -// valid values for all inputs. In order to reduce the variations between -// large and small values, we offset the value and put it to power 1/2. We -// use sqrt(x) here instead of pow(x,0.5) because sqrt() usually is quite -// optimized on CPUs and GPUs for vector length calculations while pow() is -// generic and may be extremely slow. sqrt() on the other hand requires some -// extra work to implement right on FPGAs and ASICs. The operation simply -// becomes round(100*sqrt((sin(x/16)^3)+1)+1.5). -static uint8_t sin_scaled(unsigned int x) -{ - return round(100.0 * (sqrt(pow(sin(x / 16.0), 3) + 1.0)) + 1.5); -} - -// hash _len_ bytes from _in_ into _out_, using _seed_ -// _rambox_ must be either NULL or a pointer to an area RFV2_RAMBOX_SIZE*8 bytes -// long preinitialized with rfv2_rambox_init(). If _rambox_ is NULL but _rambox_template_ -// is set, it will be initialized from this rambox_template using memcpy(). -// The function returns 0 on success or -1 on allocation failure if rambox is -// NULL. -int rfv2_hash2(void *out, const void *in, size_t len, void *rambox, const void *rambox_template, uint32_t seed) -{ - rfv2_ctx_t ctx; - unsigned int loop, loops; - int alloc_rambox = (rambox == NULL); - uint32_t msgh; - - if (alloc_rambox) { - rambox = malloc(RFV2_RAMBOX_SIZE * 8); - if (rambox == NULL) - return -1; - - if (rambox_template) - memcpy(rambox, rambox_template, RFV2_RAMBOX_SIZE * 8); - else - rfv2_raminit(rambox); - } - - //rfv2_ram_test(rambox); - - rfv2_init(&ctx, seed, rambox); - msgh = rf_crc32_mem(0, in, len); - ctx.rb_o = msgh % (ctx.rb_l / 2); - ctx.rb_l = (ctx.rb_l / 2 - ctx.rb_o) * 2; - - loops = sin_scaled(msgh); - for (loop = 0; loop < loops; loop++) { - rfv2_update(&ctx, in, len); - // pad to the next 256 bit boundary - rfv2_pad256(&ctx); - } - - rfv2_final(out, &ctx); - - if (alloc_rambox) - free(rambox); - else if (ctx.changes == RFV2_RAMBOX_HIST) { - //printf("changes=%d\n", ctx.changes); - rfv2_raminit(rambox); - } - else if (ctx.changes > 0) { - //printf("changes=%d\n", ctx.changes); - loops = ctx.changes; - do { - loops--; - ctx.rambox[ctx.hist[loops]] = ctx.prev[loops]; - } while (loops); - //rfv2_ram_test(rambox); - } - return 0; -} - -// hash _len_ bytes from _in_ into _out_ -int rfv2_hash(void *out, const void *in, size_t len, void *rambox, const void *rambox_template) -{ - return rfv2_hash2(out, in, len, rambox, rambox_template, RFV2_INIT_CRC); -} diff --git a/stratum/algos/x16rv2.c.bak b/stratum/algos/x16rv2.c.bak deleted file mode 100644 index 788bd7f90..000000000 --- a/stratum/algos/x16rv2.c.bak +++ /dev/null @@ -1,199 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common.h" - -enum Algo { - BLAKE = 0, - BMW, - GROESTL, - JH, - KECCAK, - SKEIN, - LUFFA, - CUBEHASH, - SHAVITE, - SIMD, - ECHO, - HAMSI, - FUGUE, - SHABAL, - WHIRLPOOL, - SHA512, - HASH_FUNC_COUNT -}; - -static void getAlgoString(const uint8_t* prevblock, char *output) -{ - char *sptr = output; - - for (int j = 0; j < HASH_FUNC_COUNT; j++) { - char b = (15 - j) >> 1; // 16 ascii hex chars, reversed - uint8_t algoDigit = (j & 1) ? prevblock[b] & 0xF : prevblock[b] >> 4; - if (algoDigit >= 10) - sprintf(sptr, "%c", 'A' + (algoDigit - 10)); - else - sprintf(sptr, "%u", (uint32_t) algoDigit); - sptr++; - } - *sptr = '\0'; -} - -inline void padtiger512(uint32_t* hash) { - for (int i = (24/4); i < (64/4); i++) hash[i] = 0; -} - -void x16rv2_hash(const char* input, char* output, uint32_t len) -{ - uint32_t hash[64/4]; - char hashOrder[HASH_FUNC_COUNT + 1] = { 0 }; - - sph_blake512_context ctx_blake; - sph_bmw512_context ctx_bmw; - sph_groestl512_context ctx_groestl; - sph_skein512_context ctx_skein; - sph_jh512_context ctx_jh; - sph_keccak512_context ctx_keccak; - sph_luffa512_context ctx_luffa; - sph_cubehash512_context ctx_cubehash; - sph_shavite512_context ctx_shavite; - sph_simd512_context ctx_simd; - sph_echo512_context ctx_echo; - sph_hamsi512_context ctx_hamsi; - sph_fugue512_context ctx_fugue; - sph_shabal512_context ctx_shabal; - sph_whirlpool_context ctx_whirlpool; - sph_sha512_context ctx_sha512; - sph_tiger_context ctx_tiger; - - void *in = (void*) input; - int size = len; - - getAlgoString(&input[4], hashOrder); - - for (int i = 0; i < 16; i++) - { - const char elem = hashOrder[i]; - const uint8_t algo = elem >= 'A' ? elem - 'A' + 10 : elem - '0'; - - switch (algo) { - case BLAKE: - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, in, size); - sph_blake512_close(&ctx_blake, hash); - break; - case BMW: - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, in, size); - sph_bmw512_close(&ctx_bmw, hash); - break; - case GROESTL: - sph_groestl512_init(&ctx_groestl); - sph_groestl512(&ctx_groestl, in, size); - sph_groestl512_close(&ctx_groestl, hash); - break; - case SKEIN: - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, in, size); - sph_skein512_close(&ctx_skein, hash); - break; - case JH: - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, in, size); - sph_jh512_close(&ctx_jh, hash); - break; - case KECCAK: - sph_tiger_init(&ctx_tiger); - sph_tiger(&ctx_tiger, (const void*) in, size); - sph_tiger_close(&ctx_tiger, (void*) hash); - padtiger512(hash); - - sph_keccak512_init(&ctx_keccak); - sph_keccak512(&ctx_keccak, hash, 64); - sph_keccak512_close(&ctx_keccak, hash); - break; - case LUFFA: - sph_tiger_init(&ctx_tiger); - sph_tiger(&ctx_tiger, (const void*) in, size); - sph_tiger_close(&ctx_tiger, (void*) hash); - padtiger512(hash); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, hash, 64); - sph_luffa512_close(&ctx_luffa, hash); - break; - case CUBEHASH: - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, in, size); - sph_cubehash512_close(&ctx_cubehash, hash); - break; - case SHAVITE: - sph_shavite512_init(&ctx_shavite); - sph_shavite512(&ctx_shavite, in, size); - sph_shavite512_close(&ctx_shavite, hash); - break; - case SIMD: - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, in, size); - sph_simd512_close(&ctx_simd, hash); - break; - case ECHO: - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, in, size); - sph_echo512_close(&ctx_echo, hash); - break; - case HAMSI: - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, in, size); - sph_hamsi512_close(&ctx_hamsi, hash); - break; - case FUGUE: - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, in, size); - sph_fugue512_close(&ctx_fugue, hash); - break; - case SHABAL: - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, in, size); - sph_shabal512_close(&ctx_shabal, hash); - break; - case WHIRLPOOL: - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool(&ctx_whirlpool, in, size); - sph_whirlpool_close(&ctx_whirlpool, hash); - break; - case SHA512: - sph_tiger_init(&ctx_tiger); - sph_tiger(&ctx_tiger, (const void*) in, size); - sph_tiger_close(&ctx_tiger, (void*) hash); - padtiger512(hash); - - sph_sha512_init(&ctx_sha512); - sph_sha512(&ctx_sha512,(const void*) hash, 64); - sph_sha512_close(&ctx_sha512,(void*) hash); - break; - } - in = (void*) hash; - size = 64; - } - memcpy(output, hash, 32); -} diff --git a/stratum/algos/x22i.c.bak b/stratum/algos/x22i.c.bak deleted file mode 100644 index 02a1aa3d5..000000000 --- a/stratum/algos/x22i.c.bak +++ /dev/null @@ -1,146 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "SWIFFTX/SWIFFTX.h" -#include "gost.h" -#include "Lyra2.h" - -#include "common.h" - - -void x22i_hash(const char* input, char* output, uint32_t len) -{ - sph_blake512_context ctx_blake; - sph_bmw512_context ctx_bmw; - sph_groestl512_context ctx_groestl; - sph_skein512_context ctx_skein; - sph_jh512_context ctx_jh; - sph_keccak512_context ctx_keccak; - sph_luffa512_context ctx_luffa; - sph_cubehash512_context ctx_cubehash; - sph_shavite512_context ctx_shavite; - sph_simd512_context ctx_simd; - sph_echo512_context ctx_echo; - sph_hamsi512_context ctx_hamsi; - sph_fugue512_context ctx_fugue; - sph_shabal512_context ctx_shabal; - sph_whirlpool_context ctx_whirlpool; - sph_sha512_context ctx_sha512; - sph_haval256_5_context ctx_haval; - sph_tiger_context ctx_tiger; - sph_gost512_context ctx_gost; - sph_sha256_context ctx_sha; - - unsigned char _ALIGN(128) hash[64 * 4] = {0}; - unsigned char _ALIGN(128) hash2[64]; - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, input, len); - sph_blake512_close (&ctx_blake, hash); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, hash, 64); - sph_bmw512_close(&ctx_bmw, hash); - - sph_groestl512_init(&ctx_groestl); - sph_groestl512(&ctx_groestl, hash, 64); - sph_groestl512_close(&ctx_groestl, hash); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, hash, 64); - sph_skein512_close(&ctx_skein, hash); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, hash, 64); - sph_jh512_close(&ctx_jh, hash); - - sph_keccak512_init(&ctx_keccak); - sph_keccak512(&ctx_keccak, hash, 64); - sph_keccak512_close(&ctx_keccak, hash); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, hash, 64); - sph_luffa512_close (&ctx_luffa, hash); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, hash, 64); - sph_cubehash512_close(&ctx_cubehash, hash); - - sph_shavite512_init(&ctx_shavite); - sph_shavite512(&ctx_shavite, hash, 64); - sph_shavite512_close(&ctx_shavite, hash); - - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, hash, 64); - sph_simd512_close(&ctx_simd, hash); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, hash, 64); - sph_echo512_close(&ctx_echo, hash); - - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, hash, 64); - sph_hamsi512_close(&ctx_hamsi, hash); - - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, hash, 64); - sph_fugue512_close(&ctx_fugue, hash); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, (const void*) hash, 64); - sph_shabal512_close(&ctx_shabal, &hash[64]); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool (&ctx_whirlpool, (const void*) &hash[64], 64); - sph_whirlpool_close(&ctx_whirlpool, &hash[128]); - - sph_sha512_init(&ctx_sha512); - sph_sha512(&ctx_sha512,(const void*) &hash[128], 64); - sph_sha512_close(&ctx_sha512,(void*) &hash[192]); - - InitializeSWIFFTX(); - ComputeSingleSWIFFTX((unsigned char*)hash, (unsigned char*)hash2, false); - - memset(hash, 0, 64); - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval,(const void*) hash2, 64); - sph_haval256_5_close(&ctx_haval,hash); - - memset(hash2, 0, 64); - sph_tiger_init(&ctx_tiger); - sph_tiger (&ctx_tiger, (const void*) hash, 64); - sph_tiger_close(&ctx_tiger, (void*) hash2); - - memset(hash, 0, 64); - LYRA2((void*) hash, 32, (const void*) hash2, 32, (const void*) hash2, 32, 1, 4, 4); - - sph_gost512_init(&ctx_gost); - sph_gost512 (&ctx_gost, (const void*) hash, 64); - sph_gost512_close(&ctx_gost, (void*) hash); - - sph_sha256_init(&ctx_sha); - sph_sha256 (&ctx_sha, (const void*) hash, 64); - sph_sha256_close(&ctx_sha, (void*) hash); - - memcpy(output, hash, 32); -} diff --git a/stratum/algos/x22i.h.bak b/stratum/algos/x22i.h.bak deleted file mode 100644 index 502b8941f..000000000 --- a/stratum/algos/x22i.h.bak +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef X22I_H -#define X22I_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void x22i_hash(const char* input, char* output, uint32_t len); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/stratum/algos/x25x.c.bak b/stratum/algos/x25x.c.bak deleted file mode 100644 index 0b3076d11..000000000 --- a/stratum/algos/x25x.c.bak +++ /dev/null @@ -1,174 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "SWIFFTX/SWIFFTX.h" -#include "lane.h" -#include "gost.h" -#include "Lyra2.h" - -#include "common.h" - -void x25x_hash(const char* input, char* output, uint32_t len) -{ - sph_blake512_context ctx_blake; - sph_bmw512_context ctx_bmw; - sph_groestl512_context ctx_groestl; - sph_jh512_context ctx_jh; - sph_keccak512_context ctx_keccak; - sph_skein512_context ctx_skein; - sph_luffa512_context ctx_luffa; - sph_cubehash512_context ctx_cubehash; - sph_shavite512_context ctx_shavite; - sph_simd512_context ctx_simd; - sph_echo512_context ctx_echo; - sph_hamsi512_context ctx_hamsi; - sph_fugue512_context ctx_fugue; - sph_shabal512_context ctx_shabal; - sph_whirlpool_context ctx_whirlpool; - sph_sha512_context ctx_sha512; - sph_haval256_5_context ctx_haval; - sph_tiger_context ctx_tiger; - sph_gost512_context ctx_gost; - sph_sha256_context ctx_sha; - sph_panama_context ctx_panama; - -// unsigned char _ALIGN(128) hash[25][64] = { [0 ... 24] = { [0 ... 63] = 0 } }; - unsigned char _ALIGN(128) hash[25][64] = { 0 }; - - sph_blake512_init(&ctx_blake); - sph_blake512(&ctx_blake, input, len); - sph_blake512_close (&ctx_blake, &hash[0]); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512(&ctx_bmw, &hash[0], 64); - sph_bmw512_close(&ctx_bmw, &hash[1]); - - sph_groestl512_init(&ctx_groestl); - sph_groestl512(&ctx_groestl, &hash[1], 64); - sph_groestl512_close(&ctx_groestl, &hash[2]); - - sph_skein512_init(&ctx_skein); - sph_skein512(&ctx_skein, &hash[2], 64); - sph_skein512_close(&ctx_skein, &hash[3]); - - sph_jh512_init(&ctx_jh); - sph_jh512(&ctx_jh, &hash[3], 64); - sph_jh512_close(&ctx_jh, &hash[4]); - - sph_keccak512_init(&ctx_keccak); - sph_keccak512(&ctx_keccak, &hash[4], 64); - sph_keccak512_close(&ctx_keccak, &hash[5]); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512(&ctx_luffa, &hash[5], 64); - sph_luffa512_close (&ctx_luffa, &hash[6]); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, &hash[6], 64); - sph_cubehash512_close(&ctx_cubehash, &hash[7]); - - sph_shavite512_init(&ctx_shavite); - sph_shavite512(&ctx_shavite, &hash[7], 64); - sph_shavite512_close(&ctx_shavite, &hash[8]); - - sph_simd512_init(&ctx_simd); - sph_simd512(&ctx_simd, &hash[8], 64); - sph_simd512_close(&ctx_simd, &hash[9]); - - sph_echo512_init(&ctx_echo); - sph_echo512(&ctx_echo, &hash[9], 64); - sph_echo512_close(&ctx_echo, &hash[10]); - - sph_hamsi512_init(&ctx_hamsi); - sph_hamsi512(&ctx_hamsi, &hash[10], 64); - sph_hamsi512_close(&ctx_hamsi, &hash[11]); - - sph_fugue512_init(&ctx_fugue); - sph_fugue512(&ctx_fugue, &hash[11], 64); - sph_fugue512_close(&ctx_fugue, &hash[12]); - - sph_shabal512_init(&ctx_shabal); - sph_shabal512(&ctx_shabal, (const void*) &hash[12], 64); - sph_shabal512_close(&ctx_shabal, &hash[13]); - - sph_whirlpool_init(&ctx_whirlpool); - sph_whirlpool (&ctx_whirlpool, (const void*) &hash[13], 64); - sph_whirlpool_close(&ctx_whirlpool, &hash[14]); - - sph_sha512_init(&ctx_sha512); - sph_sha512(&ctx_sha512,(const void*) &hash[14], 64); - sph_sha512_close(&ctx_sha512,(void*) &hash[15]); - - unsigned char temp[SWIFFTX_OUTPUT_BLOCK_SIZE] = {0}; - InitializeSWIFFTX(); - ComputeSingleSWIFFTX((unsigned char*)&hash[12], temp, false); - memcpy((unsigned char*)&hash[16], temp, 64); - - sph_haval256_5_init(&ctx_haval); - sph_haval256_5(&ctx_haval,(const void*) &hash[16], 64); - sph_haval256_5_close(&ctx_haval,&hash[17]); - - sph_tiger_init(&ctx_tiger); - sph_tiger (&ctx_tiger, (const void*) &hash[17], 64); - sph_tiger_close(&ctx_tiger, (void*) &hash[18]); - - LYRA2((void*) &hash[19], 32, (const void*) &hash[18], 32, (const void*) &hash[18], 32, 1, 4, 4); - - sph_gost512_init(&ctx_gost); - sph_gost512 (&ctx_gost, (const void*) &hash[19], 64); - sph_gost512_close(&ctx_gost, (void*) &hash[20]); - - sph_sha256_init(&ctx_sha); - sph_sha256 (&ctx_sha, (const void*) &hash[20], 64); - sph_sha256_close(&ctx_sha, (void*) &hash[21]); - - sph_panama_init(&ctx_panama); - sph_panama (&ctx_panama, (const void*) &hash[21], 64 ); - sph_panama_close(&ctx_panama, (void*) &hash[22]); - - laneHash(512, (const BitSequence*) &hash[22], 512, (BitSequence*) &hash[23]); - - // NEW simple shuffle algorithm, instead of just reversing - #define X25X_SHUFFLE_BLOCKS (24 /* number of algos so far */ * 64 /* output bytes per algo */ / 2 /* block size */) - #define X25X_SHUFFLE_ROUNDS 12 - - static const uint16_t x25x_round_const[X25X_SHUFFLE_ROUNDS] = { - 0x142c, 0x5830, 0x678c, 0xe08c, - 0x3c67, 0xd50d, 0xb1d8, 0xecb2, - 0xd7ee, 0x6783, 0xfa6c, 0x4b9c - }; - - uint16_t* block_pointer = (uint16_t*)hash; - for (int r = 0; r < X25X_SHUFFLE_ROUNDS; r++) { - for (int i = 0; i < X25X_SHUFFLE_BLOCKS; i++) { - uint16_t block_value = block_pointer[X25X_SHUFFLE_BLOCKS - i - 1]; - block_pointer[i] ^= block_pointer[block_value % X25X_SHUFFLE_BLOCKS] + (x25x_round_const[r] << (i % 16)); - } - } - - blake2s_simple((uint8_t*)&hash[24], (const void*)(&hash[0]), 64 * 24); - - memcpy(output, &hash[24], 32); -} diff --git a/stratum/client.h.bak b/stratum/client.h.bak deleted file mode 100644 index 96701c255..000000000 --- a/stratum/client.h.bak +++ /dev/null @@ -1,169 +0,0 @@ - -//struct YAAMP_SOURCE -//{ -//public: -// int count; -// double speed; -// -// char ip[64]; -//}; - -struct YAAMP_ALGO -{ - char name[64]; - YAAMP_HASH_FUNCTION hash_function; - - double diff_multiplier; - double factor; - YAAMP_HASH_FUNCTION merkle_func; - - double profit; - double rent; - - bool overflow; -}; - -struct YAAMP_CLIENT_ALGO -{ - double factor; - YAAMP_ALGO *algo; -}; - -#define YAAMP_JOB_MAXHISTORY 16 - -#define MIN_ADDRESS_LEN 30 /* BTC len can be as few as 26 chars, but gen. 33 or 34 */ -#define MAX_ADDRESS_LEN 52 /* BITC */ - -class YAAMP_CLIENT: public YAAMP_OBJECT -{ -public: - YAAMP_SOCKET *sock; -// YAAMP_SOURCE *source; - - char notify_id[1024]; - int64_t reqid; // ask request id - - int created; - int last_best; - - bool reconnectable; - bool reconnecting; - - int userid; - int workerid; - int coinid; - bool logtraffic; - - int id_int; - const char *id_str; - - char version[1024]; - char username[1024]; - char password[1024]; - char worker[1024]; - - double difficulty_actual; - double difficulty_remote; - double difficulty_written; - bool difficulty_fixed; - - long long last_submit_time; - double shares_per_minute; - - char extranonce1[32]; - int extranonce2size; - - char extranonce1_default[32]; - int extranonce2size_default; - - char extranonce1_last[32]; - int extranonce2size_last; - - char extranonce1_reconnect[32]; - int extranonce2size_reconnect; - - bool extranonce_subscribe; - int submit_bad; - - double speed; - int extranonce1_id; - - int jobid_next; - int jobid_sent; - int jobid_locked; - - YAAMP_CLIENT_ALGO algos_subscribed[YAAMP_MAXALGOS]; - int job_history[YAAMP_JOB_MAXHISTORY]; - - int64_t shares; - int stats; - - int donation; - int broadcast_timeouts; -}; - -inline void client_delete(YAAMP_OBJECT *object) -{ - YAAMP_CLIENT *client = (YAAMP_CLIENT *)object; - if (object == NULL) return; - - socket_close(client->sock); - delete client; - - object = NULL; -} - -////////////////////////////////////////////////////////////////////////// - -YAAMP_CLIENT *client_find_notify_id(const char *notify_id, bool reconnecting); - -void get_next_extraonce1(char *extraonce1); -void get_random_key(char *key); - -void client_sort(); -void client_block_ip(YAAMP_CLIENT *client, const char *reason); -void client_block_ipset(YAAMP_CLIENT *client, const char *ipset_name); - -bool client_reset_multialgo(YAAMP_CLIENT *client, bool first); -bool client_initialize_multialgo(YAAMP_CLIENT *client); - -void client_add_job_history(YAAMP_CLIENT *client, int jobid); -bool client_find_job_history(YAAMP_CLIENT *client, int jobid, int startat=1); - -bool client_find_my_ip(const char *ip); - -////////////////////////////////////////////////////////////////////////// - -int client_send_difficulty(YAAMP_CLIENT *client, double difficulty); -double client_normalize_difficulty(double difficulty); - -void client_change_difficulty(YAAMP_CLIENT *client, double difficulty); -void client_record_difficulty(YAAMP_CLIENT *client); -void client_adjust_difficulty(YAAMP_CLIENT *client); - -void client_initialize_difficulty(YAAMP_CLIENT *client); - -////////////////////////////////////////////////////////////////////////// - -int client_call(YAAMP_CLIENT *client, const char *method, const char *format, ...); -int client_ask(YAAMP_CLIENT *client, const char *method, const char *format, ...); - -void client_dump_all(); - -int client_send_result(YAAMP_CLIENT *client, const char *format, ...); -int client_send_error(YAAMP_CLIENT *client, int error, const char *string); - -bool client_ask_stats(YAAMP_CLIENT *client); - -bool client_submit(YAAMP_CLIENT *client, json_value *json_params); - -int client_workers_count(YAAMP_CLIENT *client); -int client_workers_byaddress(const char *username); -bool client_auth_by_workers(YAAMP_CLIENT *client); - -void *client_thread(void *p); - -void db_check_user_input(char* input); - -//void source_prune(); - diff --git a/stratum/client_submit.cpp.bak b/stratum/client_submit.cpp.bak deleted file mode 100644 index a42059285..000000000 --- a/stratum/client_submit.cpp.bak +++ /dev/null @@ -1,569 +0,0 @@ - -#include "stratum.h" - -uint64_t lyra2z_height = 0; - -//#define MERKLE_DEBUGLOG -//#define DONTSUBMIT - -void build_submit_values(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, - const char *nonce1, const char *nonce2, const char *ntime, const char *nonce) -{ - sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); - int coinbase_len = strlen(submitvalues->coinbase); - - unsigned char coinbase_bin[1024]; - memset(coinbase_bin, 0, 1024); - binlify(coinbase_bin, submitvalues->coinbase); - - char doublehash[128]; - memset(doublehash, 0, 128); - - // some (old) wallet/algos need a simple SHA256 (blakecoin, whirlcoin, groestlcoin...) - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - if (g_current_algo->merkle_func) - merkle_hash = g_current_algo->merkle_func; - merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); - - string merkleroot = merkle_with_first(templ->txsteps, doublehash); - ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); - - if(templ->isbitcash) { - sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinforsubmitb1, nonce1, nonce2, templ->coinforsubmitb2); - } - -#ifdef MERKLE_DEBUGLOG - printf("merkle root %s\n", merkleroot.c_str()); -#endif - if (!strcmp(g_stratum_algo, "lbry")) { - sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - templ->claim_be, ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 112/4); - } else if (strlen(templ->extradata_be) == 128) { // LUX SC - sprintf(submitvalues->header, "%s%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - ntime, templ->nbits, nonce, templ->extradata_be); - ser_string_be(submitvalues->header, submitvalues->header_be, 36); // 80+64 / sizeof(u32) - } else if (templ->needpriceinfo) - { - sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 20); - sprintf(submitvalues->header_be, "%s%s", submitvalues->header_be, templ->priceinfo); - } else - { - sprintf(submitvalues->header, "%s%s%s%s%s%s", templ->version, templ->prevhash_be, submitvalues->merkleroot_be, - ntime, templ->nbits, nonce); - ser_string_be(submitvalues->header, submitvalues->header_be, 20); - } - - binlify(submitvalues->header_bin, submitvalues->header_be); - -// printf("%s\n", submitvalues->header_be); - int header_len = strlen(submitvalues->header)/2; - g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); - - hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); - string_be(submitvalues->hash_hex, submitvalues->hash_be); -} - -///////////////////////////////////////////// - -static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *out, - const char *ntime, const char *nonce, const char *nonce2, const char *vote, bool usegetwork) -{ - struct __attribute__((__packed__)) { - uint32_t version; - char prevblock[32]; - char merkleroot[32]; - char stakeroot[32]; - uint16_t votebits; - char finalstate[6]; - uint16_t voters; - uint8_t freshstake; - uint8_t revoc; - uint32_t poolsize; - uint32_t nbits; - uint64_t sbits; - uint32_t height; - uint32_t size; - uint32_t ntime; - uint32_t nonce; - unsigned char extra[32]; - uint32_t stakever; - uint32_t hashtag[3]; - } header; - - memcpy(&header, templ->header, sizeof(header)); - - memset(header.extra, 0, 32); - sscanf(nonce, "%08x", &header.nonce); - - if (strcmp(vote, "")) { - uint16_t votebits = 0; - sscanf(vote, "%04hx", &votebits); - header.votebits = (header.votebits & 1) | (votebits & 0xfffe); - } - - binlify(header.extra, nonce2); - - hexlify(out->header, (const unsigned char*) &header, 180); - memcpy(out->header_bin, &header, sizeof(header)); -} - -static void build_submit_values_decred(YAAMP_JOB_VALUES *submitvalues, YAAMP_JOB_TEMPLATE *templ, - const char *nonce1, const char *nonce2, const char *ntime, const char *nonce, const char *vote, bool usegetwork) -{ - if (!usegetwork) { - // not used yet - char doublehash[128] = { 0 }; - - sprintf(submitvalues->coinbase, "%s%s%s%s", templ->coinb1, nonce1, nonce2, templ->coinb2); - int coinbase_len = strlen(submitvalues->coinbase); - - unsigned char coinbase_bin[1024]; - memset(coinbase_bin, 0, 1024); - binlify(coinbase_bin, submitvalues->coinbase); - - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - if (g_current_algo->merkle_func) - merkle_hash = g_current_algo->merkle_func; - merkle_hash((char *)coinbase_bin, doublehash, coinbase_len/2); - - string merkleroot = merkle_with_first(templ->txsteps, doublehash); - ser_string_be(merkleroot.c_str(), submitvalues->merkleroot_be, 8); - -#ifdef MERKLE_DEBUGLOG - printf("merkle root %s\n", merkleroot.c_str()); -#endif - } - create_decred_header(templ, submitvalues, ntime, nonce, nonce2, vote, usegetwork); - - int header_len = strlen(submitvalues->header)/2; - g_current_algo->hash_function((char *)submitvalues->header_bin, (char *)submitvalues->hash_bin, header_len); - - hexlify(submitvalues->hash_hex, submitvalues->hash_bin, 32); - string_be(submitvalues->hash_hex, submitvalues->hash_be); -} - -///////////////////////////////////////////////////////////////////////////////// - -static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VALUES *submitvalues, - char *extranonce2, char *ntime, char *nonce, char *vote) -{ - YAAMP_COIND *coind = job->coind; - YAAMP_JOB_TEMPLATE *templ = job->templ; - - if(job->block_found) return; - if(job->deleted) return; - - uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); - uint64_t coin_target = decode_compact(templ->nbits); - if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - int block_size = YAAMP_SMALLBUFSIZE; - vector::const_iterator i; - - for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) - block_size += strlen((*i).c_str()); - - char *block_hex = (char *)malloc(block_size); - if(!block_hex) return; - - // do aux first - for(int i=0; iauxs_size; i++) - { - if(!templ->auxs[i]) continue; - YAAMP_COIND *coind_aux = templ->auxs[i]->coind; - - if(!coind_aux || !strcmp(coind->symbol, coind_aux->symbol2)) - continue; - - unsigned char target_aux[1024]; - binlify(target_aux, coind_aux->aux.target); - - uint64_t coin_target_aux = get_hash_difficulty(target_aux); - if(hash_int <= coin_target_aux) - { - memset(block_hex, 0, block_size); - - strcat(block_hex, submitvalues->coinbase); // parent coinbase - strcat(block_hex, submitvalues->hash_be); // parent hash - - ////////////////////////////////////////////////// parent merkle steps - - sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)templ->txsteps.size()); - - vector::const_iterator i; - for(i = templ->txsteps.begin(); i != templ->txsteps.end(); ++i) - sprintf(block_hex + strlen(block_hex), "%s", (*i).c_str()); - - strcat(block_hex, "00000000"); - - ////////////////////////////////////////////////// auxs merkle steps - - vector lresult = coind_aux_merkle_branch(templ->auxs, templ->auxs_size, coind_aux->aux.index); - sprintf(block_hex+strlen(block_hex), "%02x", (unsigned char)lresult.size()); - - for(i = lresult.begin(); i != lresult.end(); ++i) - sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); - - sprintf(block_hex+strlen(block_hex), "%02x000000", (unsigned char)coind_aux->aux.index); - - ////////////////////////////////////////////////// parent header - - strcat(block_hex, submitvalues->header_be); - - bool b = coind_submitgetauxblock(coind_aux, coind_aux->aux.hash, block_hex); - if(b) - { - debuglog("*** ACCEPTED %s %d (+1)\n", coind_aux->name, coind_aux->height); - - block_add(client->userid, client->workerid, coind_aux->id, coind_aux->height, target_to_diff(coin_target_aux), - target_to_diff(hash_int), coind_aux->aux.hash, "", 0); - } - - else - debuglog("%s %d REJECTED\n", coind_aux->name, coind_aux->height); - } - } - - if(hash_int <= coin_target) - { - char count_hex[8] = { 0 }; - if (templ->txcount <= 252) - sprintf(count_hex, "%02x", templ->txcount & 0xFF); - else - sprintf(count_hex, "fd%02x%02x", templ->txcount & 0xFF, templ->txcount >> 8); - - memset(block_hex, 0, block_size); - sprintf(block_hex, "%s%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); - - if (g_current_algo->name && !strcmp("jha", g_current_algo->name)) { - // block header of 88 bytes - sprintf(block_hex, "%s8400000008000000%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); - } - - vector::const_iterator i; - for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) - sprintf(block_hex+strlen(block_hex), "%s", (*i).c_str()); - - // POS coins need a zero byte appended to block, the daemon replaces it with the signature - if(coind->pos) - strcat(block_hex, "00"); - - if(!strcmp("DCR", coind->rpcencoding)) { - // submit the regenerated block header - char hex[384]; - hexlify(hex, submitvalues->header_bin, 180); - if (coind->usegetwork) - snprintf(block_hex, block_size, "%s8000000100000000000005a0", hex); - else - snprintf(block_hex, block_size, "%s", hex); - } - - bool b = coind_submit(coind, block_hex); - if(b) - { - debuglog("*** ACCEPTED %s %d (diff %g) by %s (id: %d)\n", coind->name, templ->height, - target_to_diff(hash_int), client->sock->ip, client->userid); - - job->block_found = true; - - char doublehash2[128]; - memset(doublehash2, 0, 128); - - YAAMP_HASH_FUNCTION merkle_hash = sha256_double_hash_hex; - //if (g_current_algo->merkle_func) - // merkle_hash = g_current_algo->merkle_func; - - merkle_hash((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - - char hash1[1024]; - memset(hash1, 0, 1024); - - string_be(doublehash2, hash1); - - if(coind->usegetwork && !strcmp("DCR", coind->rpcencoding)) { - // no merkle stuff - strcpy(hash1, submitvalues->hash_hex); - } - - block_add(client->userid, client->workerid, coind->id, templ->height, - target_to_diff(coin_target), target_to_diff(hash_int), - hash1, submitvalues->hash_be, templ->has_segwit_txs); - - if(!strcmp("DCR", coind->rpcencoding)) { - // delay between dcrd and dcrwallet - sleep(1); - } - - if(!strcmp(coind->lastnotifyhash,submitvalues->hash_be)) { - block_confirm(coind->id, submitvalues->hash_be); - } - - if (g_debuglog_hash) { - debuglog("--------------------------------------------------------------\n"); - debuglog("hash1 %s\n", hash1); - debuglog("hash2 %s\n", submitvalues->hash_be); - } - } - - else { - debuglog("*** REJECTED :( %s block %d %d txs\n", coind->name, templ->height, templ->txcount); - rejectlog("REJECTED %s block %d\n", coind->symbol, templ->height); - if (g_debuglog_hash) { - //debuglog("block %s\n", block_hex); - debuglog("--------------------------------------------------------------\n"); - } - } - } - - free(block_hex); -} - -bool dump_submit_debug(const char *title, YAAMP_CLIENT *client, YAAMP_JOB *job, char *extranonce2, char *ntime, char *nonce) -{ - debuglog("ERROR %s, %s subs %d, job %x, %s, id %x, %d, %s, %s %s\n", - title, client->sock->ip, client->extranonce_subscribe, job? job->id: 0, client->extranonce1, - client->extranonce1_id, client->extranonce2size, extranonce2, ntime, nonce); -} - -void client_submit_error(YAAMP_CLIENT *client, YAAMP_JOB *job, int id, const char *message, char *extranonce2, char *ntime, char *nonce) -{ -// if(job->templ->created+2 > time(NULL)) - if(job && job->deleted) - client_send_result(client, "true"); - - else - { - client_send_error(client, id, message); - share_add(client, job, false, extranonce2, ntime, nonce, 0, id); - - client->submit_bad++; - if (g_debuglog_hash) { - dump_submit_debug(message, client, job, extranonce2, ntime, nonce); - } - } - - object_unlock(job); -} - -static bool ntime_valid_range(const char ntimehex[]) -{ - time_t rawtime = 0; - uint32_t ntime = 0; - if (strlen(ntimehex) != 8) return false; - sscanf(ntimehex, "%8x", &ntime); - if (ntime < 0x5b000000 || ntime > 0x60000000) // 14 Jan 2021 - return false; - time(&rawtime); - return (abs(rawtime - ntime) < (30 * 60)); -} - -static bool valid_string_params(json_value *json_params) -{ - for(int p=0; p < json_params->u.array.length; p++) { - if (!json_is_string(json_params->u.array.values[p])) - return false; - } - return true; -} - -bool client_submit(YAAMP_CLIENT *client, json_value *json_params) -{ - // submit(worker_name, jobid, extranonce2, ntime, nonce): - if(json_params->u.array.length<5 || !valid_string_params(json_params)) { - debuglog("%s - %s bad message\n", client->username, client->sock->ip); - client->submit_bad++; - return false; - } - - char extranonce2[32] = { 0 }; - char extra[160] = { 0 }; - char nonce[80] = { 0 }; - char ntime[32] = { 0 }; - char vote[8] = { 0 }; - - if (strlen(json_params->u.array.values[1]->u.string.ptr) > 32) { - clientlog(client, "bad json, wrong jobid len"); - client->submit_bad++; - return false; - } - int jobid = htoi(json_params->u.array.values[1]->u.string.ptr); - - strncpy(extranonce2, json_params->u.array.values[2]->u.string.ptr, 31); - strncpy(ntime, json_params->u.array.values[3]->u.string.ptr, 31); - strncpy(nonce, json_params->u.array.values[4]->u.string.ptr, 31); - - string_lower(extranonce2); - string_lower(ntime); - string_lower(nonce); - - if (json_params->u.array.length == 6) { - if (strstr(g_stratum_algo, "phi")) { - // lux optional field, smart contral root hashes (not mandatory on shares submit) - strncpy(extra, json_params->u.array.values[5]->u.string.ptr, 128); - string_lower(extra); - } else { - // heavycoin vote - strncpy(vote, json_params->u.array.values[5]->u.string.ptr, 7); - string_lower(vote); - } - } - - if (g_debuglog_hash) { - debuglog("submit %s (uid %d) %d, %s, t=%s, n=%s, extra=%s\n", client->sock->ip, client->userid, - jobid, extranonce2, ntime, nonce, extra); - } - - YAAMP_JOB *job = (YAAMP_JOB *)object_find(&g_list_job, jobid, true); - if(!job) - { - client_submit_error(client, NULL, 21, "Invalid job id", extranonce2, ntime, nonce); - return true; - } - - if(job->deleted) - { - client_send_result(client, "true"); - object_unlock(job); - - return true; - } - - bool is_decred = job->coind && !strcmp("DCR", job->coind->rpcencoding); - - YAAMP_JOB_TEMPLATE *templ = job->templ; - - if(strlen(nonce) != YAAMP_NONCE_SIZE*2 || !ishexa(nonce, YAAMP_NONCE_SIZE*2)) { - client_submit_error(client, job, 20, "Invalid nonce size", extranonce2, ntime, nonce); - return true; - } - - if(strcmp(ntime, templ->ntime)) - { - if (!ishexa(ntime, 8) || !ntime_valid_range(ntime)) { - client_submit_error(client, job, 23, "Invalid time rolling", extranonce2, ntime, nonce); - return true; - } - // dont allow algos permutations change over time (can lead to different speeds) - if (!g_allow_rolltime) { - client_submit_error(client, job, 23, "Invalid ntime (rolling not allowed)", extranonce2, ntime, nonce); - return true; - } - } - - YAAMP_SHARE *share = share_find(job->id, extranonce2, ntime, nonce, client->extranonce1); - if(share) - { - client_submit_error(client, job, 22, "Duplicate share", extranonce2, ntime, nonce); - return true; - } - - if(strlen(extranonce2) != client->extranonce2size*2) - { - client_submit_error(client, job, 24, "Invalid extranonce2 size", extranonce2, ntime, nonce); - return true; - } - - // check if the submitted extranonce is valid - if(is_decred && client->extranonce2size > 4) { - char extra1_id[16], extra2_id[16]; - int cmpoft = client->extranonce2size*2 - 8; - strcpy(extra1_id, &client->extranonce1[cmpoft]); - strcpy(extra2_id, &extranonce2[cmpoft]); - int extradiff = (int) strcmp(extra2_id, extra1_id); - int extranull = (int) !strcmp(extra2_id, "00000000"); - if (extranull && client->extranonce2size > 8) - extranull = (int) !strcmp(&extranonce2[8], "00000000" "00000000"); - if (extranull) { - debuglog("extranonce %s is empty!, should be %s - %s\n", extranonce2, extra1_id, client->sock->ip); - client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); - return true; - } - if (extradiff) { - // some ccminer pre-release doesn't fill correctly the extranonce - client_submit_error(client, job, 27, "Invalid extranonce2 suffix", extranonce2, ntime, nonce); - socket_send(client->sock, "{\"id\":null,\"method\":\"mining.set_extranonce\",\"params\":[\"%s\",%d]}\n", - client->extranonce1, client->extranonce2size); - return true; - } - } - else if(!ishexa(extranonce2, client->extranonce2size*2)) { - client_submit_error(client, job, 27, "Invalid nonce2", extranonce2, ntime, nonce); - return true; - } - - /////////////////////////////////////////////////////////////////////////////////////////// - - YAAMP_JOB_VALUES submitvalues; - memset(&submitvalues, 0, sizeof(submitvalues)); - - if(is_decred) - build_submit_values_decred(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce, vote, true); - else - build_submit_values(&submitvalues, templ, client->extranonce1, extranonce2, ntime, nonce); - - if (templ->height && !strcmp(g_current_algo->name,"lyra2z")) { - lyra2z_height = templ->height; - } - - // minimum hash diff begins with 0000, for all... - uint8_t pfx = submitvalues.hash_bin[30] | submitvalues.hash_bin[31]; - if(pfx) { - if (g_debuglog_hash) { - debuglog("Possible %s error, hash starts with %02x%02x%02x%02x\n", g_current_algo->name, - (int) submitvalues.hash_bin[31], (int) submitvalues.hash_bin[30], - (int) submitvalues.hash_bin[29], (int) submitvalues.hash_bin[28]); - } - client_submit_error(client, job, 25, "Invalid share", extranonce2, ntime, nonce); - return true; - } - - uint64_t hash_int = get_hash_difficulty(submitvalues.hash_bin); - uint64_t user_target = diff_to_target(client->difficulty_actual); - uint64_t coin_target = decode_compact(templ->nbits); - if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; - - if (g_debuglog_hash) { - debuglog("%016llx actual\n", hash_int); - debuglog("%016llx target\n", user_target); - debuglog("%016llx coin\n", coin_target); - } - if(hash_int > user_target && hash_int > coin_target) - { - client_submit_error(client, job, 26, "Low difficulty share", extranonce2, ntime, nonce); - return true; - } - - if(job->coind) - client_do_submit(client, job, &submitvalues, extranonce2, ntime, nonce, vote); - else - remote_submit(client, job, &submitvalues, extranonce2, ntime, nonce); - - client_send_result(client, "true"); - client_record_difficulty(client); - client->submit_bad = 0; - client->shares++; - if (client->shares <= 200 && (client->shares % 50) == 0) { - // 4 records are enough per miner - if (!client_ask_stats(client)) client->stats = false; - } - - double share_diff = diff_to_target(hash_int); -// if (g_current_algo->diff_multiplier != 0) { -// share_diff = share_diff / g_current_algo->diff_multiplier; -// } - - if (g_debuglog_hash) { - // only log a few... - if (share_diff > (client->difficulty_actual * 16)) - debuglog("submit %s (uid %d) %d, %s, %s, %s, %.3f/%.3f\n", client->sock->ip, client->userid, - jobid, extranonce2, ntime, nonce, share_diff, client->difficulty_actual); - } - - share_add(client, job, true, extranonce2, ntime, nonce, share_diff, 0); - object_unlock(job); - - return true; -} diff --git a/stratum/coinbase.cpp.bak b/stratum/coinbase.cpp.bak deleted file mode 100644 index c3d2ffa33..000000000 --- a/stratum/coinbase.cpp.bak +++ /dev/null @@ -1,1483 +0,0 @@ - -// http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html - -// https://en.bitcoin.it/wiki/Merged_mining_specification#Merged_mining_coinbase - -#include "stratum.h" - -#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) - -static void encode_tx_value(char *encoded, json_int_t value) -{ - sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", - TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), - TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); -} - -static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(payee) >> 1) & 0xFF, payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - encode_tx_value(evalue, amount); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - -static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - encode_tx_value(evalue, amount); - sprintf(coinb2_part, "%s", script); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - -static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) -{ - int ol = strlen(data); - char evalue[32]; - - if(coind->p2sh_address && !key) { - p2sh_pack_tx(coind, data, amount, coind->script_pubkey); - return; - } - - encode_tx_value(evalue, amount); - sprintf(data+strlen(data), "%s", evalue); - - if(coind->pos && !key) - sprintf(data+strlen(data), "2321%sac", coind->pubkey); - - else - sprintf(data+strlen(data), "1976a914%s88ac", key? key: coind->script_pubkey); - -// debuglog("pack tx %s\n", data+ol); -// debuglog("pack tx %lld\n", amount); -} - -void coinbase_aux(YAAMP_JOB_TEMPLATE *templ, char *aux_script) -{ - vector hashlist = coind_aux_hashlist(templ->auxs, templ->auxs_size); - while(hashlist.size() > 1) - { - vector l; - for(int i = 0; i < hashlist.size()/2; i++) - { - string s = hashlist[i*2] + hashlist[i*2+1]; - - char bin[YAAMP_HASHLEN_BIN*2]; - char out[YAAMP_HASHLEN_STR]; - - binlify((unsigned char *)bin, s.c_str()); - sha256_double_hash_hex(bin, out, YAAMP_HASHLEN_BIN*2); - - l.push_back(out); - } - - hashlist = l; - } - - char merkle_hash[4*1024]; - memset(merkle_hash, 0, 4*1024); - string_be(hashlist[0].c_str(), merkle_hash); - - sprintf(aux_script+strlen(aux_script), "fabe6d6d%s%02x00000000000000", merkle_hash, templ->auxs_size); -// debuglog("aux_script is %s\n", aux_script); -} - -void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result) -{ - templ->isbitcash = false; - if(strcmp(coind->symbol, "BITC") == 0) { - char *params = (char *)malloc(4096); - if (params) { - unsigned char price_bin[1024]; - unsigned char pricehash_bin[1024]; - char pricehash_hex[1024]; - char pricehash_be[1024]; - - if (templ->needpriceinfo && strlen(templ->priceinfo) > 0 && strlen(templ->priceinfo) < 1000) { - binlify(price_bin, templ->priceinfo); - - int price_len = strlen(templ->priceinfo)/2; - sha256_double_hash((char *)price_bin, (char *)pricehash_bin, price_len); - - hexlify(pricehash_hex, pricehash_bin, 32); - string_be(pricehash_hex, pricehash_be); - - sprintf(params, "[\"%s\", %i, \"%s\"]", coind->wallet, templ->height, pricehash_be); - } else { - sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); - } - //std::cout << "Params:" << params << std::endl; - json_value *json = rpc_call(&coind->rpc, "createcoinbaseforaddress", params); - - free(params); - if (json) { - json_value *json_result = json_get_object(json, "result"); - if (json_result) { - sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbaseforhashpart1")); - templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; - sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbaseforhashpart2")); - - sprintf(templ->coinforsubmitb1, "%s", json_get_string(json_result, "coinbasepart1")); - templ->coinforsubmitb1[strlen(templ->coinforsubmitb1) - 16] = '\0'; - sprintf(templ->coinforsubmitb2, "%s", json_get_string(json_result, "coinbasepart2")); - templ->isbitcash = true; - } - } - } - return; - } - char eheight[32], etime[32]; - char entime[32] = { 0 }; - char commitment[128] = { 0 }; - - ser_number(templ->height, eheight); - ser_number(time(NULL), etime); - if(coind->pos) ser_string_be(templ->ntime, entime, 1); - - char eversion1[32] = "01000000"; - if(coind->txmessage) - strcpy(eversion1, "02000000"); - - const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); - if(coinbase_payload && strlen(coinbase_payload) > 0) - strcpy(eversion1, "03000500"); - - char script1[4*1024]; - sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - - char script2[32] = "746865706f6f6c2e6c6966655c30"; // "thepool.life\0" in hex ascii - - if(!coind->pos && !coind->isaux && templ->auxs_size) - coinbase_aux(templ, script2); - - int script_len = strlen(script1)/2 + strlen(script2)/2 + 8; - sprintf(templ->coinb1, "%s%s01" - "0000000000000000000000000000000000000000000000000000000000000000" - "ffffffff%02x%s", eversion1, entime, script_len, script1); - - sprintf(templ->coinb2, "%s00000000", script2); - - // segwit commitment, if needed - if (templ->has_segwit_txs) - sprintf(commitment, "0000000000000000%02x%s", (int) (strlen(coind->commitment)/2), coind->commitment); - - json_int_t available = templ->value; - - // sample coins using mandatory dev/foundation fees - if(strcmp(coind->symbol, "EGC") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 2; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); - } - else if(strcmp(coind->symbol, "DYN") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[3]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool dynode_enabled; - dynode_enabled = json_get_bool(json_result, "dynode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* dynode; - dynode = json_get_object(json_result, "dynode"); - if(!dynode && json_get_bool(json_result, "dynode_payments")) { - coind->oldmasternodes = true; - debuglog("%s is using old dynodes rpc keys\n", coind->symbol); - return; - } - - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock found %s %u\n", coind->symbol, payee, amount); - } - } - } - if (dynode_enabled && dynode) { - bool started; - started = json_get_bool(json_result, "dynode_payments_started"); - const char *payee = json_get_string(dynode, "payee"); - json_int_t amount = json_get_int(dynode, "amount"); - if (!payee) - debuglog("coinbase_create failed to get Dynode payee\n"); - - if (!amount) - debuglog("coinbase_create failed to get Dynode amount\n"); - - if (!started) - debuglog("coinbase_create failed to get Dynode started\n"); - - if (payee && amount && started) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s dynode found %s %u\n", coind->symbol, payee, amount); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "LTCR") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 10; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); - } - - else if(strcmp(coind->symbol, "GEEK") == 0) { - if (coind->charity_percent <= 0) - coind->charity_percent = 2.5; - if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "GRpdbSh3Z2FMjJH96CFPK5TzEb47Zg6FFR"); - } - - else if(strcmp(coind->symbol, "XZC") == 0) { - char script_payee[1024]; - bool znode_masternode_enabled = json_get_bool(json_result, "znode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "znode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("znode payee: %s\n", payee); - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); - job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); - base58_decode("aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD", script_payee); - job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); - base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); - job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); - base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); - job_pack_tx(coind, templ->coinb2, 3 * 100000000, script_payee); - base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); - job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - - else if(strcmp("DCR", coind->rpcencoding) == 0) { - coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 - coind->charity_percent = 0; - coind->charity_amount = available; - available *= coind->reward_mul; - if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) - sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); - } - - // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. - else if (strcmp(coind->symbol, "SMART") == 0) { - char script_payee[512] = { 0 }; - char payees[5]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //treasury 5000 * (143500/Blockheight) per block - int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); - json_int_t charity_amount = coinvalue * 0.95; - int blockRotation = templ->height - 95 * (templ->height/95); - if (blockRotation >= 0 && blockRotation <= 7) { - sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); - } - if (blockRotation >= 8 && blockRotation <= 15) { - sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); - } - if (blockRotation >= 16 && blockRotation <= 23) { - sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); - } - if (blockRotation >= 24 && blockRotation <= 38) { - sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); - } - if (blockRotation >= 39 && blockRotation <= 94) { - sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "HXX") == 0) { - char script_payee[1024]; - bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "xnode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "05"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); - job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "BZX") == 0) { - char script_payee[1024]; - bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "bznode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "04"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "03"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); - job_pack_tx(coind, templ->coinb2, 6.75 * 100000000, script_payee); - base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); - job_pack_tx(coind, templ->coinb2, 2.25 * 100000000, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "STAK") == 0) { - char script_payee[512] = { 0 }; - char payees[4]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - - //treasury 5% @ 10 STAK per block - json_int_t charity_amount = 50000000; - //testnet - //sprintf(coind->charity_address, "93ASJtDuVYVdKXemH9BrtSMscznvsp9stD"); - switch (templ->height % 4) { - case 0: sprintf(coind->charity_address, "3K3bPrW5h7DYEMp2RcXawTCXajcm4ZU9Zh"); - break; - case 1: sprintf(coind->charity_address, "33Ssxmn3ehVMgyxgegXhpLGSBpubPjLZQ6"); - break; - case 2: sprintf(coind->charity_address, "3HFPNAjesiBY5sSVUmuBFnMEGut69R49ca"); - break; - case 3: sprintf(coind->charity_address, "37jLjjfUXQU4bdqVzvpUXyzAqPQSmxyByi"); - break; - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - else if(strcmp(coind->symbol, "TUX") == 0) { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "donation_payee"); - if(payee != NULL){ - sprintf(coind->charity_address, "%s", payee); - } else { - sprintf(coind->charity_address, "%s", ""); - } - - if(strlen(coind->charity_address) > 0){ - char script_payee[1024]; - char charity_payee[256] = { 0 }; - sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "donation_amount"); - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - debuglog("pack tx %s\n", coinb2_part); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - } - else if(strcmp(coind->symbol, "PGN") == 0) { - bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); - json_value* founder = json_get_object(json_result, "founder"); - - if (!coind->hasmasternodes && founder_enabled && founder) { - char founder_payee[256] = { 0 }; - char founder_script[1024] = { 0}; - const char *payee = json_get_string(founder, "payee"); - bool founder_use_p2sh = (strcmp(coind->symbol, "PGN") == 0); - json_int_t amount = json_get_int(founder, "amount"); - if(payee && amount) { - if (payee) snprintf(founder_payee, 255, "%s", payee); - if (strlen(founder_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - base58_decode(founder_payee, founder_script); - available -= amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - if(founder_use_p2sh) { - p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); - } else { - job_pack_tx(coind, templ->coinb2, amount, founder_script); - } - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); - debuglog("%s founder script %s\n", coind->symbol,founder_script); - debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - - return; - } - } -} - - else if(strcmp(coind->symbol, "RITO") == 0) { - bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); - json_value* founder = json_get_object(json_result, "founder"); - - if (!coind->hasmasternodes && founder_enabled && founder) { - char founder_payee[256] = { 0 }; - char founder_script[1024] = { 0}; - const char *payee = json_get_string(founder, "payee"); - bool founder_use_p2sh = (strcmp(coind->symbol, "RITO") == 0); - json_int_t amount = json_get_int(founder, "amount"); - if(payee && amount) { - if (payee) snprintf(founder_payee, 255, "%s", payee); - if (strlen(founder_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - base58_decode(founder_payee, founder_script); - available -= amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - if(founder_use_p2sh) { - p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); - } else { - job_pack_tx(coind, templ->coinb2, amount, founder_script); - } - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); - debuglog("%s founder script %s\n", coind->symbol,founder_script); - debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - - return; - } - } -} - - // 2 txs are required on these coins, one for foundation (dev fees) - if(coind->charity_percent && !coind->hasmasternodes) - { - char script_payee[1024]; - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - - base58_decode(charity_payee, script_payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - if (charity_amount <= 0) - charity_amount = (available * coind->charity_percent) / 100; - - available -= charity_amount; - coind->charity_amount = charity_amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("INFO %s block available %f, charity %f miner %f\n", coind->symbol, - // (double) available/1e8, (double) charity_amount/1e8, coind->reward); - return; - } - - else if(coind->charity_amount && !strcmp("DCR", coind->rpcencoding)) - { - stratumlog("ERROR %s should not use coinbase (getwork only)!\n", coind->symbol); - coind->reward = (double)available/100000000; - return; - } - - // add IFX - if (strcmp(coind->symbol, "IFX") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // add GTM - if (strcmp(coind->symbol, "GTM") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // add GWAY - if (strcmp(coind->symbol, "GWAY") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - if (strcmp(coind->symbol, "AGM") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // add CRDS - if (strcmp(coind->symbol, "CRDS") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // add BMN - if (strcmp(coind->symbol, "BMN") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - //Add BNODE - if (strcmp(coind->symbol, "BNODE") == 0) - { - char script_dests[4096] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - - json_value* evolution = json_get_object(json_result, "evolution"); - bool evolution_enabled = json_get_bool(json_result, "evolution_payments_enforced"); - bool evolution_started = json_get_bool(json_result, "evolution_payments_started"); - if (evolution_enabled && evolution && evolution_started) { - if (json_is_array(evolution)) { - for(int i = 0; i < evolution->u.array.length; i++) { - const char *payee = json_get_string(evolution->u.array.values[i], "payee"); - const char *script = json_get_string(evolution->u.array.values[i], "script"); - json_int_t amount = json_get_int(evolution->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s evolution %s %u\n", coind->symbol, payee, amount); - } - } - } else { - const char *payee = json_get_string(evolution, "payee"); - json_int_t amount = json_get_int(evolution, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - } - - json_value* masternode = json_get_object(json_result, "masternode"); - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (masternode && started) { - if (json_is_array(masternode)) { - for(int i = 0; i < masternode->u.array.length; i++) { - const char *payee = json_get_string(masternode->u.array.values[i], "payee"); - const char *script = json_get_string(masternode->u.array.values[i], "script"); - json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); - } - } - } else { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - } - - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - //add GLT - else if(strcmp(coind->symbol, "GLT") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char script_treasury[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - json_value* masternode = json_get_object(json_result, "masternode"); - json_value* treasury = json_get_object(json_result, "treasury"); - bool treasury_enabled = true; - if(treasury_enabled && treasury) { - const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); - json_int_t amount = json_get_int(treasury, "amount"); - if (scriptPubKey && amount) { - npayees++; - available -= amount; - base58_decode(scriptPubKey, script_treasury); - job_pack_tx(coind, script_dests, amount, script_treasury); - //debuglog("%s treasury %u\n", coind->symbol, amount); - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - // Add DigitalNote[XDN] - if(strcmp(coind->symbol, "XDN") == 0) { - - // make sure we pay both mn and devops - bool founder_enabled = json_get_bool(json_result, "founder_reward_enforced"); - bool masternode_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (!founder_enabled || !masternode_enabled) - return; - - // founder/masternode vars - char founder_script[1024] = { 0}; - char masternode_script[1024] = { 0}; - char founder_payee[256] = { 0}; - char masternode_payee[256] = { 0}; - json_int_t part_amount = (5000000000); - json_int_t pool_amount = (5000000000*4); - json_value* founder = json_get_object(json_result, "founderreward"); - const char *payee1 = json_get_string(json_result, "payee"); - const char *payee2 = json_get_string(founder, "payee"); - - // mn script - snprintf(masternode_payee, 255, "%s", payee1); - base58_decode(masternode_payee, masternode_script); - available -= part_amount; - - // payee script - snprintf(founder_payee, 255, "%s", payee2); - base58_decode(founder_payee, founder_script); - available -= part_amount; - - // total outputs - strcat(templ->coinb2, "03"); - - // pack the tx - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, part_amount, founder_script); - job_pack_tx(coind, templ->coinb2, part_amount, masternode_script); - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - - if(strcmp(coind->symbol, "SIN") == 0) - { - int npayees = 1; - char payees[2]; - char sinpayee[256] = {0}; - char sinscript[1024] = {0}; - char devpayee[256] = {0}; - char devscript[1024] = {0}; - const char *devpayaddr = json_get_string(json_result, "payee"); - json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); - snprintf(devpayee, 255, "%s", devpayaddr); - base58_decode(devpayee, devscript); - npayees++; - - available -= devfee_amount; - const char* mnpayaddrs[7] = {0}; - json_value* masternodes = json_get_array(json_result, "masternode"); - json_int_t mnamounts[7] = {0}; - for(int i = 0; i < masternodes->u.array.length; i++) { - mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); - mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); - available -= mnamounts[i]; - npayees++; - } - - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); - for(int i = 0; i < masternodes->u.array.length; i++) { - snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); - base58_decode(sinpayee, sinscript); - job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); - } - - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available/100000000; - return; - } - - if(strcmp(coind->symbol, "BITC") == 0) - { - char *params = (char *)malloc(1024); - if (params) { - sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); - //std::cout << "Params:" << params << std::endl; - json_value *json = rpc_call(&coind->rpc, "createcoinbaseforaddress", params); - free(params); - if (json) { - json_value *json_result = json_get_object(json, "result"); - if (json_result) { - sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbasepart1")); - templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; - sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbasepart2")); - } - } - } - return; - } - - if(strcmp(coind->symbol, "XVC") == 0) - { - char charity_payee[256]; - json_value* incentive = json_get_object(json_result, "incentive"); - if (incentive) { - const char* payee = json_get_string(incentive, "address"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - - bool enforced = json_get_bool(incentive, "enforced"); - json_int_t charity_amount = json_get_int(incentive, "amount"); - if (enforced && charity_amount && strlen(charity_payee)) { - char script_payee[1024]; - base58_decode(charity_payee, script_payee); - - strcat(templ->coinb2, "02"); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - - coind->charity_amount = charity_amount; - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("XVC coinbase %ld (+%ld incentive to %s)\n", - // (long) available, (long) charity_amount, charity_payee); - return; - } - } - } - - // most recent masternodes rpc (DASH, SIB, MUE, DSR, GBX...) - if(coind->hasmasternodes && !coind->oldmasternodes) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; // addresses count - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "masternode"); - if(!masternode && json_get_bool(json_result, "masternode_payments")) { - coind->oldmasternodes = true; - debuglog("%s is using old masternodes rpc keys\n", coind->symbol); - return; - } - if(coind->charity_percent) { - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - else sprintf(charity_payee, "%s", coind->charity_address); - if (strlen(charity_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - json_int_t charity_amount = (available * coind->charity_percent) / 100; - npayees++; - available -= charity_amount; - coind->charity_amount = charity_amount; - base58_decode(charity_payee, script_payee); - job_pack_tx(coind, script_dests, charity_amount, script_payee); - } - // smart contracts balance refund, same format as DASH superblocks - json_value* screfund = json_get_array(json_result, "screfund"); - if(screfund && screfund->u.array.length) { - superblocks_enabled = true; - superblock = screfund; - } - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - const char *script = json_get_string(superblock->u.array.values[i], "script"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(superblock_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (masternode_enabled && masternode && started) { - if (json_is_array(masternode)) { - for(int i = 0; i < masternode->u.array.length; i++) { - const char *payee = json_get_string(masternode->u.array.values[i], "payee"); - const char *script = json_get_string(masternode->u.array.values[i], "script"); - json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); - } - } - } else { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - if(coinbase_payload && strlen(coinbase_payload) > 0) { - char coinbase_payload_size[18]; - ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload); - } - - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ARC") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "goldminenode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "goldminenode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - else if(strcmp(coind->symbol, "ENT") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "eternitynode_payments_enforced"); - bool superblocks_enabled = json_get_bool(json_result, "superblocks_enabled"); - json_value* superblock = json_get_array(json_result, "superblock"); - json_value* masternode = json_get_object(json_result, "eternitynode"); - if(superblocks_enabled && superblock) { - for(int i = 0; i < superblock->u.array.length; i++) { - const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s superblock %s %u\n", coind->symbol, payee, amount); - } - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - - else if(coind->hasmasternodes && coind->oldmasternodes) /* OLD DASH style */ - { - char charity_payee[256] = { 0 }; - const char *payee = json_get_string(json_result, "payee"); - if (payee) snprintf(charity_payee, 255, "%s", payee); - - json_int_t charity_amount = json_get_int(json_result, "payee_amount"); - bool charity_payments = json_get_bool(json_result, "masternode_payments"); - bool charity_enforce = json_get_bool(json_result, "enforce_masternode_payments"); - - if(strcmp(coind->symbol, "CRW") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - bool systemnodes_enabled = json_get_bool(json_result, "enforce_systemnode_payments"); - bool systemnodes = json_get_bool(json_result, "systemnodes"); - bool masternodes = json_get_bool(json_result, "masternodes"); - if(systemnodes_enabled && systemnodes) { - const char *payeeSN = json_get_string(json_result, "payeeSN"); - json_int_t payeeSN_amount = json_get_int(json_result, "payeeSN_amount"); - if (payeeSN && payeeSN_amount) { - npayees++; - available -= payeeSN_amount; - base58_decode(payeeSN, script_payee); - job_pack_tx(coind, script_dests, payeeSN_amount, script_payee); - //debuglog("%s systemnode %s %u\n", coind->symbol, payeeSN, payeeSN_amount); - } - } - if (masternodes_enabled && masternodes) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } - - if(charity_payments && charity_enforce) - { - char script_payee[256] = { 0 }; - base58_decode(charity_payee, script_payee); - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + node + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); // 2 outputs - } - - job_pack_tx(coind, templ->coinb2, charity_amount, script_payee); - available -= charity_amount; - - } else { - strcat(templ->coinb2, "01"); - } - } - - else if (templ->has_segwit_txs) { - strcat(templ->coinb2, "02"); - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "01"); - } - - job_pack_tx(coind, templ->coinb2, available, NULL); - - //if(coind->txmessage) - // strcat(templ->coinb2, "00"); - if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. - if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; -// debuglog("coinbase %f\n", coind->reward); - -// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); -// debuglog("coinb1 %s\n", templ->coinb1); -// debuglog("coinb2 %s\n", templ->coinb2); -} - - diff --git a/stratum/coind_template.cpp.bak b/stratum/coind_template.cpp.bak deleted file mode 100644 index 33ecc6259..000000000 --- a/stratum/coind_template.cpp.bak +++ /dev/null @@ -1,614 +0,0 @@ - -#include "stratum.h" - -void coind_getauxblock(YAAMP_COIND *coind) -{ - if(!coind->isaux) return; - - json_value *json = rpc_call(&coind->rpc, "getauxblock", "[]"); - if(!json) - { - coind_error(coind, "coind_getauxblock"); - return; - } - - json_value *json_result = json_get_object(json, "result"); - if(!json_result) - { - coind_error(coind, "coind_getauxblock"); - return; - } - -// coind->aux.height = coind->height+1; - coind->aux.chainid = json_get_int(json_result, "chainid"); - - const char *p = json_get_string(json_result, "target"); - if(p) strcpy(coind->aux.target, p); - - p = json_get_string(json_result, "hash"); - if(p) strcpy(coind->aux.hash, p); - -// if(strcmp(coind->symbol, "UNO") == 0) -// { -// string_be1(coind->aux.target); -// string_be1(coind->aux.hash); -// } - - json_value_free(json); -} - -YAAMP_JOB_TEMPLATE *coind_create_template_memorypool(YAAMP_COIND *coind) -{ - json_value *json = rpc_call(&coind->rpc, "getmemorypool"); - if(!json || json->type == json_null) - { - coind_error(coind, "getmemorypool"); - return NULL; - } - - json_value *json_result = json_get_object(json, "result"); - if(!json_result || json_result->type == json_null) - { - coind_error(coind, "getmemorypool"); - json_value_free(json); - - return NULL; - } - - YAAMP_JOB_TEMPLATE *templ = new YAAMP_JOB_TEMPLATE; - memset(templ, 0, sizeof(YAAMP_JOB_TEMPLATE)); - - templ->created = time(NULL); - templ->value = json_get_int(json_result, "coinbasevalue"); -// templ->height = json_get_int(json_result, "height"); - sprintf(templ->version, "%08x", (unsigned int)json_get_int(json_result, "version")); - sprintf(templ->ntime, "%08x", (unsigned int)json_get_int(json_result, "time")); - strcpy(templ->nbits, json_get_string(json_result, "bits")); - strcpy(templ->prevhash_hex, json_get_string(json_result, "previousblockhash")); - - json_value_free(json); - - json = rpc_call(&coind->rpc, "getmininginfo", "[]"); - if(!json || json->type == json_null) - { - coind_error(coind, "coind getmininginfo"); - return NULL; - } - - json_result = json_get_object(json, "result"); - if(!json_result || json_result->type == json_null) - { - coind_error(coind, "coind getmininginfo"); - json_value_free(json); - - return NULL; - } - - templ->height = json_get_int(json_result, "blocks")+1; - json_value_free(json); - - coind_getauxblock(coind); - - coind->usememorypool = true; - return templ; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////// - -static int decred_parse_header(YAAMP_JOB_TEMPLATE *templ, const char *header_hex, bool getwork) -{ - struct __attribute__((__packed__)) { - uint32_t version; - char prevblock[32]; - char merkleroot[32]; - char stakeroot[32]; - uint16_t votebits; - char finalstate[6]; - uint16_t voters; - uint8_t freshstake; - uint8_t revoc; - uint32_t poolsize; - uint32_t nbits; - uint64_t sbits; - uint32_t height; - uint32_t size; - uint32_t ntime; - uint32_t nonce; - unsigned char extra[32]; - uint32_t stakever; - uint32_t hashtag[3]; - } header; - - //debuglog("HEADER: %s\n", header_hex); - - binlify((unsigned char*) &header, header_hex); - - templ->height = header.height; - // reversed to tell its not a normal stratum coinbase - sprintf(templ->version, "%08x", getwork ? bswap32(header.version) : header.version); - sprintf(templ->ntime, "%08x", header.ntime); - sprintf(templ->nbits, "%08x", header.nbits); - - templ->prevhash_hex[64] = '\0'; - uint32_t* prev32 = (uint32_t*) header.prevblock; - for(int i=0; i < 8; i++) - sprintf(&templ->prevhash_hex[i*8], "%08x", getwork ? prev32[7-i] : bswap32(prev32[7-i])); - ser_string_be2(templ->prevhash_hex, templ->prevhash_be, 8); - - // store all other stuff - memcpy(templ->header, &header, sizeof(header)); - - return 0; -} - -// decred getwork over stratum -static YAAMP_JOB_TEMPLATE *decred_create_worktemplate(YAAMP_COIND *coind) -{ - char rpc_error[1024] = { 0 }; - #define GETWORK_RETRY_MAX 3 - int retry_cnt = GETWORK_RETRY_MAX; -retry: - json_value *gw = rpc_call(&coind->rpc, "getwork", "[]"); - if(!gw || json_is_null(gw)) { - usleep(500*YAAMP_MS); // too much connections ? no data received - if (--retry_cnt > 0) { - if (coind->rpc.curl) - rpc_curl_get_lasterr(rpc_error, 1023); - debuglog("%s getwork retry %d\n", coind->symbol, GETWORK_RETRY_MAX-retry_cnt); - goto retry; - } - debuglog("%s error getwork %s\n", coind->symbol, rpc_error); - return NULL; - } - json_value *gwr = json_get_object(gw, "result"); - if(!gwr) { - debuglog("%s no getwork json result!\n", coind->symbol); - return NULL; - } - else if (json_is_null(gwr)) { - json_value *jr = json_get_object(gw, "error"); - if (!jr || json_is_null(jr)) return NULL; - const char *err = json_get_string(jr, "message"); - if (err && !strcmp(err, "internal error")) { - usleep(500*YAAMP_MS); // not enough voters (testnet) - if (--retry_cnt > 0) { - goto retry; - } - debuglog("%s getwork failed after %d tries: %s\n", - coind->symbol, GETWORK_RETRY_MAX, err); - } - return NULL; - } - const char *header_hex = json_get_string(gwr, "data"); - if (!header_hex || !strlen(header_hex)) { - debuglog("%s no getwork data!\n", coind->symbol); - return NULL; - } - - YAAMP_JOB_TEMPLATE *templ = new YAAMP_JOB_TEMPLATE; - memset(templ, 0, sizeof(YAAMP_JOB_TEMPLATE)); - - templ->created = time(NULL); - - decred_parse_header(templ, header_hex, true); - json_value_free(gw); - - // bypass coinbase and merkle for now... send without nonce/extradata - const unsigned char *hdr = (unsigned char *) &templ->header[36]; - hexlify(templ->coinb1, hdr, 192 - 80); - const unsigned char *sfx = (unsigned char *) &templ->header[176]; - hexlify(templ->coinb2, sfx, 180 - 176); // stake version - - vector txhashes; - txhashes.push_back(""); - - templ->txmerkles[0] = 0; - templ->txcount = txhashes.size(); - templ->txsteps = merkle_steps(txhashes); - txhashes.clear(); - - return templ; -} - -// for future decred real stratum -static void decred_fix_template(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json) -{ - const char *header_hex = json_get_string(json, "header"); - if (!header_hex || !strlen(header_hex)) { - stratumlog("decred error, no block header in json!\n"); - return; - } - - // todo ? - // "mintime": 1455511962, - // "maxtime": 1455522081, - - decred_parse_header(templ, header_hex, false); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////// - -YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind) -{ - if(coind->usememorypool) - return coind_create_template_memorypool(coind); - - char params[512] = "[{}]"; - if(!strcmp(coind->symbol, "PPC")) strcpy(params, "[]"); - else if(g_stratum_segwit) strcpy(params, "[{\"rules\":[\"segwit\"]}]"); - - json_value *json = rpc_call(&coind->rpc, "getblocktemplate", params); - if(!json || json_is_null(json)) - { - // coind_error() reset auto_ready, and DCR gbt can fail - if (strcmp(coind->rpcencoding, "DCR") == 0) - debuglog("decred getblocktemplate failed\n"); - else - coind_error(coind, "getblocktemplate"); - return NULL; - } - - json_value *json_result = json_get_object(json, "result"); - if(!json_result || json_is_null(json_result)) - { - coind_error(coind, "getblocktemplate result"); - json_value_free(json); - return NULL; - } - - // segwit rule - json_value *json_rules = json_get_array(json_result, "rules"); - if(json_rules && !strlen(coind->witness_magic) && json_rules->u.array.length) { - for (int i=0; iu.array.length; i++) { - json_value *val = json_rules->u.array.values[i]; - if(!strcmp(val->u.string.ptr, "segwit")) { - const char *commitment = json_get_string(json_result, "default_witness_commitment"); - strcpy(coind->witness_magic, "aa21a9ed"); - if (commitment && strlen(commitment) > 12) { - strncpy(coind->witness_magic, &commitment[4], 8); - coind->witness_magic[8] = '\0'; - } - coind->usesegwit |= g_stratum_segwit; - if (coind->usesegwit) - debuglog("%s segwit enabled, magic %s\n", coind->symbol, coind->witness_magic); - break; - } - } - } - - json_value *json_tx = json_get_array(json_result, "transactions"); - if(!json_tx) - { - coind_error(coind, "getblocktemplate transactions"); - json_value_free(json); - return NULL; - } - - json_value *json_coinbaseaux = json_get_object(json_result, "coinbaseaux"); - if(!json_coinbaseaux && coind->isaux) - { - coind_error(coind, "getblocktemplate coinbaseaux"); - json_value_free(json); - return NULL; - } - - YAAMP_JOB_TEMPLATE *templ = new YAAMP_JOB_TEMPLATE; - memset(templ, 0, sizeof(YAAMP_JOB_TEMPLATE)); - - templ->created = time(NULL); - templ->value = json_get_int(json_result, "coinbasevalue"); - templ->height = json_get_int(json_result, "height"); - sprintf(templ->version, "%08x", (unsigned int)json_get_int(json_result, "version")); - sprintf(templ->ntime, "%08x", (unsigned int)json_get_int(json_result, "curtime")); - - const char *bits = json_get_string(json_result, "bits"); - strcpy(templ->nbits, bits ? bits : ""); - const char *prev = json_get_string(json_result, "previousblockhash"); - strcpy(templ->prevhash_hex, prev ? prev : ""); - const char *flags = json_get_string(json_coinbaseaux, "flags"); - strcpy(templ->flags, flags ? flags : ""); - - // LBC Claim Tree (with wallet gbt patch) - const char *claim = json_get_string(json_result, "claimtrie"); - if (claim) { - strcpy(templ->claim_hex, claim); - // debuglog("claimtrie: %s\n", templ->claim_hex); - } - else if (strcmp(coind->symbol, "LBC") == 0) { - json_value *json_claim = rpc_call(&coind->rpc, "getclaimtrie"); - if (!json_claim || json_claim->type != json_object) - return NULL; - json_value *json_cls = json_get_array(json_claim, "result"); - if (!json_cls || !json_is_array(json_cls)) - return NULL; - // get first claim "", seems the root - // if empty need 0000000000000000000000000000000000000000000000000000000000000001 - json_value *json_obj = json_cls->u.array.values[0]; - if (!json_obj || json_claim->type != json_object) - return NULL; - claim = json_get_string(json_obj, "hash"); - if (claim) { - strcpy(templ->claim_hex, claim); - debuglog("claim_hex: %s\n", templ->claim_hex); - } - } - - const char *sc_root = json_get_string(json_result, "stateroot"); - const char *sc_utxo = json_get_string(json_result, "utxoroot"); - if (sc_root && sc_utxo) { - // LUX Smart Contracts, 144-bytes block headers - strcpy(&templ->extradata_hex[ 0], sc_root); // 32-bytes hash (64 in hexa) - strcpy(&templ->extradata_hex[64], sc_utxo); // 32-bytes hash too - - // same weird byte order as previousblockhash field - ser_string_be2(sc_root, &templ->extradata_be[ 0], 8); - ser_string_be2(sc_utxo, &templ->extradata_be[64], 8); - } - - if (strcmp(coind->rpcencoding, "DCR") == 0) { - decred_fix_template(coind, templ, json_result); - } - - if (!templ->height || !templ->nbits || !strlen(templ->prevhash_hex)) { - stratumlog("%s warning, gbt incorrect : version=%s height=%d value=%d bits=%s time=%s prev=%s\n", - coind->symbol, templ->version, templ->height, templ->value, templ->nbits, templ->ntime, templ->prevhash_hex); - } - - // temporary hack, until wallet is fixed... - if (!strcmp(coind->symbol, "MBL")) { // MBL: chainid in version - unsigned int nVersion = (unsigned int)json_get_int(json_result, "version"); - if (nVersion & 0xFFFF0000UL == 0) { - nVersion |= (0x16UL << 16); - debuglog("%s version %s >> %08x\n", coind->symbol, templ->version, nVersion); - } - sprintf(templ->version, "%08x", nVersion); - } - -// debuglog("%s ntime %s\n", coind->symbol, templ->ntime); -// uint64_t target = decode_compact(json_get_string(json_result, "bits")); -// coind->difficulty = target_to_diff(target); - -// string_lower(templ->ntime); -// string_lower(templ->nbits); - -// char target[1024]; -// strcpy(target, json_get_string(json_result, "target")); -// uint64_t coin_target = decode_compact(templ->nbits); -// debuglog("nbits %s\n", templ->nbits); -// debuglog("target %s\n", target); -// debuglog("0000%016llx\n", coin_target); - - if(coind->isaux) - { - json_value_free(json); - coind_getauxblock(coind); - return templ; - } - - ////////////////////////////////////////////////////////////////////////////////////////// - - vector txhashes; - vector txids; - txhashes.push_back(""); - txids.push_back(""); - - templ->has_segwit_txs = false; - - templ->has_filtered_txs = false; - templ->filtered_txs_fee = 0; - - for(int i = 0; i < json_tx->u.array.length; i++) - { - const char *p = json_get_string(json_tx->u.array.values[i], "hash"); - char hash_be[256] = { 0 }; - - if (templ->has_filtered_txs) { - templ->filtered_txs_fee += json_get_int(json_tx->u.array.values[i], "fee"); - continue; - } - - string_be(p, hash_be); - txhashes.push_back(hash_be); - - const char *txid = json_get_string(json_tx->u.array.values[i], "txid"); - if(txid && strlen(txid)) { - char txid_be[256] = { 0 }; - string_be(txid, txid_be); - txids.push_back(txid_be); - if (strcmp(hash_be, txid_be)) { - templ->has_segwit_txs = true; // if not, its useless to generate a segwit block, bigger - } - } else { - templ->has_segwit_txs = false; // force disable if not supported (no txid fields) - } - - const char *d = json_get_string(json_tx->u.array.values[i], "data"); - templ->txdata.push_back(d); - - // if wanted, we can limit the count of txs to include - if (g_limit_txs_per_block && i >= g_limit_txs_per_block-2) { - debuglog("limiting block to %d first txs (of %d)\n", g_limit_txs_per_block, json_tx->u.array.length); - templ->has_filtered_txs = true; - } - } - - if (templ->has_filtered_txs) { - // coinbasevalue is a total with all tx fees, need to reduce it if some are skipped - templ->value -= templ->filtered_txs_fee; - } - - templ->txmerkles[0] = '\0'; - if(templ->has_segwit_txs) { - templ->txcount = txids.size(); - templ->txsteps = merkle_steps(txids); - } else { - templ->txcount = txhashes.size(); - templ->txsteps = merkle_steps(txhashes); - } - - if(templ->has_segwit_txs) { - // * We compute the witness hash (which is the hash including witnesses) of all the block's transactions, except the - // coinbase (where 0x0000....0000 is used instead). - // * The coinbase scriptWitness is a stack of a single 32-byte vector, containing a witness nonce (unconstrained). - // * We build a merkle tree with all those witness hashes as leaves (similar to the hashMerkleRoot in the block header). - // * There must be at least one output whose scriptPubKey is a single 36-byte push, the first 4 bytes (magic) of which are - // {0xaa, 0x21, 0xa9, 0xed}, and the following 32 bytes are SHA256^2(witness root, witness nonce). In case there are - /* - char bin[YAAMP_HASHLEN_BIN*2]; - char witness[128] = { 0 }; - vector mt_verify = merkle_steps(txhashes); - string witness_mt = merkle_with_first(mt_verify, "0000000000000000000000000000000000000000000000000000000000000000"); - mt_verify.clear(); - witness_mt = witness_mt + "0000000000000000000000000000000000000000000000000000000000000000"; - - binlify((unsigned char *)bin, witness_mt.c_str()); - sha256_double_hash_hex(bin, witness, YAAMP_HASHLEN_BIN*2); - - int clen = (int) (strlen(coind->witness_magic) + strlen(witness)); // 4 + 32 = 36 = 0x24 - sprintf(coind->commitment, "6a%02x%s%s", clen/2, coind->witness_magic, witness); - */ - // default commitment is already computed correctly - const char *commitment = json_get_string(json_result, "default_witness_commitment"); - if (commitment) { - sprintf(coind->commitment, "%s", commitment); - } else { - templ->has_segwit_txs = false; - } - } - - txhashes.clear(); - txids.clear(); - - vector::const_iterator i; - for(i = templ->txsteps.begin(); i != templ->txsteps.end(); ++i) - sprintf(templ->txmerkles + strlen(templ->txmerkles), "\"%s\",", (*i).c_str()); - - if(templ->txmerkles[0]) - templ->txmerkles[strlen(templ->txmerkles)-1] = 0; - -// debuglog("merkle transactions %d [%s]\n", templ->txcount, templ->txmerkles); - ser_string_be2(templ->prevhash_hex, templ->prevhash_be, 8); - - if(!strcmp(coind->symbol, "LBC")) - ser_string_be2(templ->claim_hex, templ->claim_be, 8); - - if(!coind->pos) - coind_aux_build_auxs(templ); - - coinbase_create(coind, templ, json_result); - json_value_free(json); - - return templ; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////// - -bool coind_create_job(YAAMP_COIND *coind, bool force) -{ -// debuglog("create job %s\n", coind->symbol); - - bool b = rpc_connected(&coind->rpc); - if(!b) return false; - - CommonLock(&coind->mutex); - - YAAMP_JOB_TEMPLATE *templ; - - // DCR gbt block header is not compatible with getwork submit, so... - - if (coind->usegetwork && strcmp(coind->rpcencoding, "DCR") == 0) - templ = decred_create_worktemplate(coind); - else - templ = coind_create_template(coind); - - if(!templ) - { - CommonUnlock(&coind->mutex); -// debuglog("%s: create job template failed!\n", coind->symbol); - return false; - } - - YAAMP_JOB *job_last = coind->job; - - if( !force && job_last && job_last->templ && job_last->templ->created + 45 > time(NULL) && - templ->height == job_last->templ->height && - templ->txcount == job_last->templ->txcount && - strcmp(templ->coinb2, job_last->templ->coinb2) == 0) - { -// debuglog("coind_create_job %s %d same template %x \n", coind->name, coind->height, coind->job->id); - if (templ->txcount) { - templ->txsteps.clear(); - templ->txdata.clear(); - } - delete templ; - - CommonUnlock(&coind->mutex); - return true; - } - - //////////////////////////////////////////////////////////////////////////////////////// - - int height = coind->height; - coind->height = templ->height-1; - - if(height > coind->height) - { - stratumlog("%s went from %d to %d\n", coind->name, height, coind->height); - // coind->auto_ready = false; - } - - if(height < coind->height && !coind->newblock) - { - if(coind->auto_ready && coind->notreportingcounter++ > 5) - stratumlog("%s %d not reporting\n", coind->name, coind->height); - } - - uint64_t coin_target = decode_compact(templ->nbits); - if (templ->nbits && !coin_target) coin_target = 0xFFFF000000000000ULL; // under decode_compact min diff - coind->difficulty = target_to_diff(coin_target); - -// stratumlog("%s %d diff %g %llx %s\n", coind->name, height, coind->difficulty, coin_target, templ->nbits); - - coind->newblock = false; - - //////////////////////////////////////////////////////////////////////////////////////// - - object_delete(coind->job); - - coind->job = new YAAMP_JOB; - memset(coind->job, 0, sizeof(YAAMP_JOB)); - - sprintf(coind->job->name, "%s", coind->symbol); - - coind->job->id = job_get_jobid(); - coind->job->templ = templ; - - coind->job->profit = coind_profitability(coind); - coind->job->maxspeed = coind_nethash(coind) * - (g_current_algo->profit? min(1.0, coind_profitability(coind)/g_current_algo->profit): 1); - - coind->job->coind = coind; - coind->job->remote = NULL; - - g_list_job.AddTail(coind->job); - CommonUnlock(&coind->mutex); - -// debuglog("coind_create_job %s %d new job %x\n", coind->name, coind->height, coind->job->id); - - return true; -} - - - - - - - - - - - - - - - diff --git a/stratum/config.sample/lyra2v3.conf.bak b/stratum/config.sample/lyra2v3.conf.bak deleted file mode 100644 index fdd0ff827..000000000 --- a/stratum/config.sample/lyra2v3.conf.bak +++ /dev/null @@ -1,15 +0,0 @@ -[TCP] -server = yaamp.com -port = 4433 -password = tu8tu5 - -[SQL] -host = yaampdb -database = yaamp -username = root -password = patofpaq - -[STRATUM] -algo = lyra2v3 -difficulty = 1 -max_ttf = 40000 diff --git a/stratum/config.sample/x25x.conf.bak b/stratum/config.sample/x25x.conf.bak deleted file mode 100644 index eb8e667ca..000000000 --- a/stratum/config.sample/x25x.conf.bak +++ /dev/null @@ -1,16 +0,0 @@ -[TCP] -server = yaamp.com -port = 3423 -password = tu8tu5 - -[SQL] -host = yaampdb -database = yaamp -username = root -password = patofpaq - -[STRATUM] -algo = x25x -difficulty = 0.008 -max_ttf = 50000 - diff --git a/stratum/job.h.bak b/stratum/job.h.bak deleted file mode 100644 index aef4bdbe1..000000000 --- a/stratum/job.h.bak +++ /dev/null @@ -1,139 +0,0 @@ - -#define MAX_AUXS 32 - -class YAAMP_REMOTE; -class YAAMP_COIND; -class YAAMP_COIND_AUX; - -struct YAAMP_JOB_VALUES -{ - char coinbase[4*1024]; - char merkleroot_be[1024]; - - char header[1024]; - char header_be[1024]; - unsigned char header_bin[1024]; - - char hash_hex[1024]; - char hash_be[1024]; - unsigned char hash_bin[1024]; -}; - -struct YAAMP_JOB_TEMPLATE -{ - int created; - char flags[64]; - - char prevhash_hex[512]; - char prevhash_be[512]; - - char extradata_hex[512]; - char extradata_be[512]; - - // todo: can use extra field - char claim_hex[128]; - char claim_be[128]; - - int txcount; - char txmerkles[YAAMP_SMALLBUFSIZE]; - - vector txsteps; - vector txdata; - - char version[32]; - char nbits[32]; - char ntime[32]; - - int height; - int target; - - json_int_t value; - - char coinb1[4*1024]; - char coinb2[4*1024]; - - char header[256]; - - bool has_segwit_txs; - - bool has_filtered_txs; - int filtered_txs_fee; - - int auxs_size; - YAAMP_COIND_AUX *auxs[MAX_AUXS]; -}; - -#define YAAMP_JOB_MAXSUBIDS 200 - -class YAAMP_JOB: public YAAMP_OBJECT -{ -public: - bool block_found; - char name[1024]; - - int count; - double speed; - - double maxspeed; - double profit; - - YAAMP_COIND *coind; // either one of them - YAAMP_REMOTE *remote; - YAAMP_JOB_TEMPLATE *templ; - - bool remote_subids[YAAMP_JOB_MAXSUBIDS]; -}; - -inline void job_delete(YAAMP_OBJECT *object) -{ - YAAMP_JOB *job = (YAAMP_JOB *)object; - if (!job) return; - if (job->templ && job->templ->txcount) { - job->templ->txsteps.clear(); - job->templ->txdata.clear(); - } - if (job->templ) delete job->templ; - delete job; -} - -///////////////////////////////////////////////////////////////////////////////////////////// - -int job_get_jobid(); - -void job_sort(); -void job_relock_clients(int jobid_old, int jobid_new); -void job_unlock_clients(YAAMP_JOB *job=NULL); -void job_assign_locked_clients(YAAMP_JOB *job); - -bool job_can_mine(YAAMP_JOB *job); -void job_reset_clients(YAAMP_JOB *job=NULL); -bool job_has_free_client(); - -//YAAMP_JOB_TEMPLATE *job_create_template(YAAMP_COIND *coind); -//void job_create_last(YAAMP_COIND *coind, bool force=false); - -///////////////////////// - -void job_send_jobid(YAAMP_CLIENT *client, int jobid); -void job_send_last(YAAMP_CLIENT *client); -void job_broadcast(YAAMP_JOB *job); - -///////////////////////// - -void *job_thread(void *p); -void job_signal(); -void job_update(); -void job_init(); - - -void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *json_result); - -vector coind_aux_hashlist(YAAMP_COIND_AUX **auxs, int size); -vector coind_aux_merkle_branch(YAAMP_COIND_AUX **auxs, int size, int index); -void coind_aux_build_auxs(YAAMP_JOB_TEMPLATE *templ); - - - - - - diff --git a/stratum/sha3/makefile.bak b/stratum/sha3/makefile.bak deleted file mode 100644 index 83363eba4..000000000 --- a/stratum/sha3/makefile.bak +++ /dev/null @@ -1,33 +0,0 @@ - -CC=gcc - -CFLAGS= -O3 -march=native -LDFLAGS=-O2 - -SOURCES=sph_jh.c sph_blake.c sph_bmw.c sph_groestl.c sph_skein.c sph_keccak.c sph_luffa.c sph_cubehash.c sph_shavite.c \ - sph_simd.c sph_echo.c sph_fugue.c sph_hamsi.c sph_shabal.c sph_whirlpool.c sph_sm3.c sph_streebog.c \ - sph_haval.c sph_hefty1.c sph_ripemd.c sph_sha2.c sph_sha2big.c sph_tiger.c sph_panama.c sph_radiogatun.c \ - blake2s.c - -OBJECTS=$(SOURCES:.c=.o) -OUTPUT=libhash.a - -all: $(SOURCES) $(OUTPUT) - -$(OUTPUT): $(OBJECTS) - ar rc $@ $(OBJECTS) - touch ../stratum.cpp - -.cpp.o: - $(CC) $(CFLAGS) -c $< - -.c.o: - $(CC) $(CFLAGS) -c $< - -blake2s.o: blake2s.c - $(CC) $(CFLAGS) -std=gnu99 -c $< - -clean: - rm *.o - - diff --git a/stratum/sha3/sph_panama.h.bak b/stratum/sha3/sph_panama.h.bak deleted file mode 100644 index ab44cece8..000000000 --- a/stratum/sha3/sph_panama.h.bak +++ /dev/null @@ -1,108 +0,0 @@ -/* $Id: sph_panama.h 154 2010-04-26 17:00:24Z tp $ */ -/** - * PANAMA interface. - * - * PANAMA has been published in: J. Daemen and C. Clapp, "Fast Hashing - * and Stream Encryption with PANAMA", Fast Software Encryption - - * FSE'98, LNCS 1372, Springer (1998), pp. 60--74. - * - * PANAMA is not fully defined with regards to endianness and related - * topics. This implementation follows strict little-endian conventions: - *
      - *
    • Each 32-byte input block is split into eight 32-bit words, the - * first (leftmost) word being numbered 0.
    • - *
    • Each such 32-bit word is decoded from memory in little-endian - * convention.
    • - *
    • The additional padding bit equal to "1" is added by considering - * the least significant bit in a byte to come first; practically, this - * means that a single byte of value 0x01 is appended to the (byte-oriented) - * message, and then 0 to 31 bytes of value 0x00.
    • - *
    • The output consists of eight 32-bit words; the word numbered 0 is - * written first (in leftmost position) and it is encoded in little-endian - * convention. - *
    - * With these conventions, PANAMA is sometimes known as "PANAMA-LE". The - * PANAMA reference implementation uses our conventions for input, but - * prescribes no convention for output. - * - * ==========================(LICENSE BEGIN)============================ - * - * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * ===========================(LICENSE END)============================= - * - * @file sph_panama.h - * @author Thomas Pornin - */ - #ifndef SPH_PANAMA_H__ -#define SPH_PANAMA_H__ - #include -#include "sph_types.h" - /** - * Output size (in bits) for PANAMA. - */ -#define SPH_SIZE_panama 256 - /** - * This structure is a context for PANAMA computations: it contains the - * intermediate values and some data from the last entered block. Once - * a PANAMA computation has been performed, the context can be reused for - * another computation. - * - * The contents of this structure are private. A running PANAMA computation - * can be cloned by copying the context (e.g. with a simple - * memcpy()). - */ -typedef struct { -#ifndef DOXYGEN_IGNORE - unsigned char data[32]; /* first field, for alignment */ - unsigned data_ptr; - sph_u32 buffer[32][8]; - unsigned buffer_ptr; - sph_u32 state[17]; -#endif -} sph_panama_context; - /** - * Initialize a PANAMA context. This process performs no memory allocation. - * - * @param cc the PANAMA context (pointer to a sph_panama_context) - */ -void sph_panama_init(void *cc); - /** - * Process some data bytes. It is acceptable that len is zero - * (in which case this function does nothing). - * - * @param cc the PANAMA context - * @param data the input data - * @param len the input data length (in bytes) - */ -void sph_panama(void *cc, const void *data, size_t len); - /** - * Terminate the current PANAMA computation and output the result into the - * provided buffer. The destination buffer must be wide enough to - * accomodate the result (32 bytes). The context is automatically - * reinitialized. - * - * @param cc the PANAMA context - * @param dst the destination buffer - */ -void sph_panama_close(void *cc, void *dst); - #endif diff --git a/web/keys.sample.php.bak b/web/keys.sample.php.bak deleted file mode 100644 index b621d713d..000000000 --- a/web/keys.sample.php.bak +++ /dev/null @@ -1,28 +0,0 @@ -'); - -/* Keys required to create/cancel orders and access your balances/deposit addresses */ -define('EXCH_BITTREX_SECRET', ''); -define('EXCH_BITSTAMP_SECRET',''); -define('EXCH_BITZ_SECRET',''); -define('EXCH_BITZ_TRADEPWD',''); -define('EXCH_BINANCE_SECRET', ''); -define('EXCH_BLEUTRADE_SECRET', ''); -define('EXCH_BTER_SECRET', ''); -define('EXCH_CCEX_SECRET', ''); -define('EXCH_CEXIO_SECRET', ''); -define('EXCH_COINMARKETS_PASS', ''); -define('EXCH_CRYPTOPIA_SECRET', ''); -define('EXCH_EMPOEX_SECKEY', ''); -define('EXCH_HITBTC_SECRET', ''); -define('EXCH_KRAKEN_SECRET',''); -define('EXCH_KUCOIN_SECRET', ''); -define('EXCH_LIVECOIN_SECRET', ''); -define('EXCH_NOVA_SECRET',''); -define('EXCH_POLONIEX_SECRET', ''); -define('EXCH_STOCKSEXCHANGE_SECRET', ''); -define('EXCH_YOBIT_SECRET', ''); -define('EXCH_ZEBITEX_SECRET', ''); diff --git a/web/serverconfig.sample.php.bak b/web/serverconfig.sample.php.bak deleted file mode 100644 index 6dddb4835..000000000 --- a/web/serverconfig.sample.php.bak +++ /dev/null @@ -1,97 +0,0 @@ - 0.3 -define('EXCH_AUTO_WITHDRAW', 0.3); - -// nicehash keys deposit account & amount to deposit at a time -define('NICEHASH_API_KEY','521c254d-8cc7-4319-83d2-ac6c604b5b49'); -define('NICEHASH_API_ID','9205'); -define('NICEHASH_DEPOSIT','3J9tapPoFCtouAZH7Th8HAPsD8aoykEHzk'); -define('NICEHASH_DEPOSIT_AMOUNT','0.01'); - - -$cold_wallet_table = array( - '1C23KmLeCaQSLLyKVykHEUse1R7jRDv9j9' => 0.10, -); - -// Sample fixed pool fees -$configFixedPoolFees = array( - 'zr5' => 2.0, - 'scrypt' => 20.0, - 'sha256' => 5.0, -); - -// Sample custom stratum ports -$configCustomPorts = array( -// 'x11' => 7000, -); - -// mBTC Coefs per algo (default is 1.0) -$configAlgoNormCoef = array( -// 'x11' => 5.0, -); - diff --git a/web/yaamp/commands/CoindbCommand.php.bak b/web/yaamp/commands/CoindbCommand.php.bak deleted file mode 100644 index 920fbf3fa..000000000 --- a/web/yaamp/commands/CoindbCommand.php.bak +++ /dev/null @@ -1,598 +0,0 @@ - - * yiimp coindb labels - * yiimp coindb icons - * - * - * @property string $help The command description. - * - */ -class CoindbCommand extends CConsoleCommand -{ - protected $basePath; - - /** - * Execute the action. - * @param array $args command line parameters specific for this command - * @return integer non zero application exit code after printing help - */ - public function run($args) - { - $runner=$this->getCommandRunner(); - $commands=$runner->commands; - - $root = realpath(Yii::app()->getBasePath().DIRECTORY_SEPARATOR.'..'); - $this->basePath = str_replace(DIRECTORY_SEPARATOR, '/', $root); - - if (!isset($args[0])) { - - echo "Yiimp coindb command\n"; - echo "Usage: yiimp coindb labels\n"; - echo " yiimp coindb icons\n"; - return 1; - - } elseif ($args[0] == 'labels') { - - $nbUpdated = $this->updateCryptopiaLabels(); - $nbUpdated += $this->updateCoinCapLabels(); - $nbUpdated += $this->updateLiveCoinLabels(); - $nbUpdated += $this->updateYiimpLabels("api.yiimp.eu"); - $nbUpdated += $this->updateFromJson(); - - echo "total updated: $nbUpdated\n"; - return 0; - - } elseif ($args[0] == 'icons') { - - $nbUpdated = $this->grabBterIcons(); - $nbUpdated += $this->grabCcexIcons(); - $nbUpdated += $this->grabCryptopiaIcons(); - $nbUpdated += $this->grabBittrexIcons(); // can be huge ones - $nbUpdated += $this->grabCoinExchangeIcons(); - $nbUpdated += $this->grabAlcurexIcons(); - $nbUpdated += $this->grabKuCoinIcons(); - $nbUpdated += $this->grabNovaIcons(); - - echo "total updated: $nbUpdated\n"; - return 0; - } - } - - /** - * Provides the command description. - * @return string the command description. - */ - public function getHelp() - { - return parent::getHelp().'coindb labels'; - } - - /** - * coincap.io api - */ - public static function getCoinCapData() - { - $json = file_get_contents('http://coincap.io/front'); - $data = json_decode($json,true); - $array = array(); - foreach ($data as $coin) { - $key = strtoupper($coin['short']); - if (empty($key)) continue; - $array[$key] = $coin; - } - return $array; - } - - public function updateCoinCapLabels() - { - $coins = new db_coins; - $nbUpdated = 0; - - $dataset = $coins->findAll(array( - 'condition'=>"name='unknown' OR name=symbol" - )); - - if (!empty($dataset)) - { - $json = self::getCoinCapData(); - if (empty($json)) return 0; - - foreach ($dataset as $coin) { - if ($coin->name == 'unknown' && isset($json[$coin->symbol])) { - $data = $json[$coin->symbol]; - if ($data['long'] != $coin->name) { - echo "{$coin->symbol}: {$data['long']}\n"; - $coin->name = trim($data['long']); - $nbUpdated += $coin->save(); - } - } - } - if ($nbUpdated) - echo "$nbUpdated coin labels updated from coincap.io\n"; - } - return $nbUpdated; - } - - /** - * Special for cryptopia coins - */ - protected function getCryptopiaCurrencies() - { - $array = array(); - require_once($this->basePath.'/yaamp/core/exchange/cryptopia.php'); - $data = cryptopia_api_query('GetCurrencies'); - - if (is_object($data) && !empty($data->Data)) - foreach ($data->Data as $coin) { - $key = strtoupper($coin->Symbol); - if (empty($key)) continue; - $array[$key] = $coin; - } - - return $array; - } - - public function updateCryptopiaLabels() - { - $coins = new db_coins; - $nbUpdated = 0; - - $dataset = $coins->findAll(array( - 'condition'=>"name=:u OR algo='' OR algo='scrypt'", - 'params'=>array(':u'=>'unknown') - )); - - if (!empty($dataset)) - { - $json = self::getCryptopiaCurrencies(); - - foreach ($dataset as $coin) { - if ($coin->name == 'unknown' && isset($json[$coin->symbol])) { - $cc = $json[$coin->symbol]; - if ($cc->Name != $coin->name) { - echo "{$coin->symbol}: {$cc->Name}\n"; - $coin->name = $cc->Name; - if ($cc->Algorithm != 'scrypt') - $coin->algo = strtolower($cc->Algorithm); - $nbUpdated += $coin->save(); - } - } - } - if ($nbUpdated) - echo "$nbUpdated coin labels updated from cryptopia\n"; - } - return $nbUpdated; - } - - public function updateLiveCoinLabels() - { - if (exchange_get('livecoin', 'disabled') == true) return 0; - - $coins = new db_coins; - $nbUpdated = 0; - - $dataset = $coins->findAll(array( - 'condition'=>"name='unknown' AND id IN (SELECT M.coinid FROM markets M WHERE M.name='livecoin')", - )); - - if (!empty($dataset)) - { - //echo count($dataset)." livecoin currencies without labels\n"; - $labels = array(); - $data = livecoin_api_query('info/coinInfo'); - if(objSafeVal($data,'success') !== true || !is_array($data->info)) return; - - foreach ($data->info as $c) { - $symbol = objSafeVal($c,'symbol',''); - $labels[$symbol] = objSafeVal($c,'name','unknown'); - } - - foreach ($dataset as $coin) { - if ($coin->name == 'unknown' && isset($labels[$coin->symbol])) { - $label = $labels[$coin->symbol]; - if ($label != $coin->name) { - echo "{$coin->symbol}: {$label}\n"; - $coin->name = $label; - $nbUpdated += $coin->save(); - } - } - } - if ($nbUpdated) - echo "$nbUpdated coin labels updated from livecoin coininfo\n"; - } - return $nbUpdated; - } - - public function updateYiimpLabels($pool) - { - $coins = new db_coins; - $nbUpdated = 0; $nbAlgos = 0; - - $dataset = $coins->findAll(array( - 'condition'=>"name=:u OR algo='' OR algo='scrypt'", - 'params'=>array(':u'=>'unknown') - )); - - if (!empty($dataset)) - { - $url = "http://{$pool}/api/currencies"; - $data = @ file_get_contents($url); - if (empty($data)) return 0; - $json = json_decode($data, true); - - if (!empty($json)) - foreach ($dataset as $coin) { - if (!isset($json[$coin->symbol])) continue; - $cc = $json[$coin->symbol]; - if ($coin->name == 'unknown') { - echo "{$coin->symbol}: {$cc['name']}\n"; - $coin->name = $cc['name']; - $nbUpdated += $coin->save(); - } - if (empty($cc['algo'])) continue; - if (empty($coin->algo) || $coin->algo != $cc['algo']) { - $coin->algo = strtolower($cc['algo']); - echo "{$coin->symbol}: algo set to {$cc['algo']}\n"; - $nbAlgos += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated labels and $nbAlgos algos updated from $pool\n"; - } - return $nbUpdated; - } - - /** - * To import from a json file placed in the sql/ folder - */ - public function updateFromJson() - { - $sqlFolder = $this->basePath.'/../sql/'; - $jsonFile = $sqlFolder.'labels.json'; - //$jsonFile = $sqlFolder.'yobit.txt'; - if (!file_exists($jsonFile)) - return 0; - - $nbUpdated = 0; - - $json = json_decode(file_get_contents($jsonFile), true); - /* - $json = array(); - $txt = explode("\n", file_get_contents($jsonFile)); - foreach ($txt as $line) - { - $cells = explode("\t", $line); - if (count($cells) < 2) continue; - $json[$cells[0]] = $cells[1]; - } - */ - if (!empty($json)) - { - $coins = new db_coins; - $dataset = $coins->findAll(array( - 'condition'=>"name=:u", - 'params'=>array(':u'=>'unknown') - )); - - if (!empty($dataset)) - foreach ($dataset as $coin) { - if (isset($json[$coin->symbol])) { - $name = $json[$coin->symbol]; - echo "{$coin->symbol}: {$name}\n"; - $coin->name = $name; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated coin labels updated from labels.json file\n"; - } - return $nbUpdated; - } - - /** - * Icon grabber - Bter - */ - public function grabBterIcons() - { - $url = 'http://bter.com/images/coin_icon/64/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='bter' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "bter: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($symbol).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $coin->symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from bter\n"; - return $nbUpdated; - } - - /** - * Icon grabber - Bittrex - */ - public function grabBittrexIcons() - { - $nbUpdated = 0; - $markets = bittrex_api_query('public/getmarkets'); - if (!is_object($markets) || !is_object($markets->result)) { - echo "bittrex api error\n"; - return $nbUpdated; - } - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='bittrex' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return $nbUpdated; - echo "bittrex: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - $url = ''; - foreach ($markets->result as $m) { - if ($m->MarketCurrency == $symbol) { - $url = $m->LogoUrl; - break; - } - } - if (empty($url)) continue; - try { - $data = @ file_get_contents($url); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - file_put_contents($local, $data); - $size = filesize($local); - if ($size > 0) { - if ($size > 100*1024) { - echo "warning: $symbol icon is huge, ".round($size/1024,1)." KB ($url)\n"; - unlink($local); - } else { - echo $symbol." icon found\n"; - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from bittrex\n"; - return $nbUpdated; - } - - /** - * Icon grabber - Ccex - */ - public function grabCcexIcons() - { - $url = 'http://c-cex.com/i/l/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='c-cex' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "c-cex: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($symbol).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from c-cex\n"; - return $nbUpdated; - } - - /** - * Icon grabber - Cryptopia (slow https) - */ - public function grabCryptopiaIcons() - { - $url = 'https://www.cryptopia.co.nz/Content/Images/Coins/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='cryptopia' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "cryptopia: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($symbol).'-medium.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 3000 || strstr($data, ' 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from cryptopia\n"; - return $nbUpdated; - } - - /** - * Icon grabber - CoinExchange - */ - public function grabCoinExchangeIcons() - { - $url = 'https://www.coinexchange.io/assets/currencies/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='coinexchange' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "coinexchange: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($coin->name).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from coinexchange\n"; - return $nbUpdated; - } - - /** - * Icon grabber - Alcurex - */ - public function grabAlcurexIcons() - { - $url = 'https://alcurex.com/CSS/img/coins/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='alcurex' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "alcurex: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->getOfficialSymbol(); - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtoupper($symbol).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from alcurex\n"; - return $nbUpdated; - } - - /** - * Icon grabber - KuCoin - */ - public function grabKuCoinIcons() - { - $url = 'https://assets.kucoin.com/www/1.2.0/assets/coins/';//QLC.png - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='kucoin' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "kucoin: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->getOfficialSymbol(); - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.$symbol.'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from kucoin\n"; - return $nbUpdated; - } - - /** - * Icon grabber - NovaExchange - */ - public function grabNovaIcons() - { - $url = 'http://novaexchange.com/static/symbols/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='nova' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "nova: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->getOfficialSymbol(); - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($symbol).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from novaexchange\n"; - return $nbUpdated; - } - -} diff --git a/web/yaamp/commands/ExchangeCommand.php.bak b/web/yaamp/commands/ExchangeCommand.php.bak deleted file mode 100644 index f7f92adf5..000000000 --- a/web/yaamp/commands/ExchangeCommand.php.bak +++ /dev/null @@ -1,242 +0,0 @@ - - * php web/yaamp/yiic.php exchange test - * - * - * @property string $help The command description. - * - */ -class ExchangeCommand extends CConsoleCommand -{ - protected $basePath; - - /** - * Execute the action. - * @param array $args command line parameters specific for this command - * @return integer non zero application exit code after printing help - */ - public function run($args) - { - $runner=$this->getCommandRunner(); - $commands=$runner->commands; - - $root = realpath(Yii::app()->getBasePath().DIRECTORY_SEPARATOR.'..'); - $this->basePath = str_replace(DIRECTORY_SEPARATOR, '/', $root); - - if (!isset($args[0]) || $args[0] == 'help') { - - echo "Yiimp exchange command\n"; - echo "Usage: yiimp exchange apitest\n"; - echo " yiimp exchange get \n"; - echo " yiimp exchange set \n"; - echo " yiimp exchange unset \n"; - echo " yiimp exchange settings \n"; - return 1; - - } else if ($args[0] == 'get') { - return $this->getExchangeSetting($args); - - } else if ($args[0] == 'set') { - return $this->setExchangeSetting($args); - - } else if ($args[0] == 'unset') { - return $this->unsetExchangeSetting($args); - - } else if ($args[0] == 'settings') { - return $this->listExchangeSettings($args); - - } else if ($args[0] == 'apitest') { - $this->testApiKeys(); - return 0; - } - } - - /** - * Provides the command description. - * @return string the command description. - */ - public function getHelp() - { - return $this->run(array('help')); - } - - public function getExchangeSetting($args) - { - if (count($args) < 3) - die("usage: yiimp exchange get \n"); - $exchange = $args[1]; - $key = $args[2]; - $value = exchange_get($exchange, $key); - echo "$value\n"; - return 0; - } - - public function setExchangeSetting($args) - { - if (count($args) < 4) - die("usage: yiimp exchange set \n"); - $exchange = $args[1]; - $key = $args[2]; - $value = $args[3]; - $keys = exchange_valid_keys($exchange); - if (!isset($keys[$key])) { - echo "error: key '$key' is not handled!\n"; - return 1; - } - $res = exchange_set($exchange, $key, $value); - $val = exchange_get($exchange, $key); - echo ($res ? "$exchange $key ".json_encode($val) : "error") . "\n"; - return 0; - } - - public function unsetExchangeSetting($args) - { - if (count($args) < 3) - die("usage: yiimp exchange unset \n"); - $exchange = $args[1]; - $key = $args[2]; - exchange_unset($exchange, $key); - echo "ok\n"; - return 0; - } - - public function listExchangeSettings($args) - { - if (count($args) < 2) - die("usage: yiimp exchange settings \n"); - $exchange = $args[1]; - $keys = exchange_valid_keys($exchange); - foreach ($keys as $key => $desc) { - $val = exchange_get($exchange, $key); - if ($val !== null) { - //echo "$desc\n"; - echo "$exchange $key ".json_encode($val)."\n"; - } - } - return 0; - } - - public function testApiKeys() - { - if (!empty(EXCH_BINANCE_KEY)) { - $balance = binance_api_user('account'); - if (!is_object($balance)) echo "binance error ".json_encode($balance)."\n"; - else { - $assets = $balance->balances; - foreach ($assets as $asset) { - if ($asset->asset == 'BTC') echo("binance: ".json_encode($asset)."\n"); - } - } - } - if (!empty(EXCH_BITSTAMP_KEY)) { - $balance = bitstamp_api_user('balance'); - if (!is_array($balance)) echo "bitstamp error ".json_encode($balance)."\n"; - else echo("bitstamp: ".json_encode($balance)."\n"); - } - if (!empty(EXCH_CEXIO_KEY)) { - $balance = cexio_api_user('balance'); - if (!is_array($balance)) echo "cexio error ".json_encode($balance)."\n"; - else echo("cexio: ".json_encode(arraySafeVal($balance,"BTC",$balance))."\n"); - } - if (!empty(EXCH_BITTREX_KEY)) { - $balance = bittrex_api_query('account/getbalance','¤cy=BTC'); - if (!is_object($balance)) echo "bittrex error\n"; - else echo("bittrex btc: ".json_encode($balance->result)."\n"); - } - if (!empty(EXCH_BITZ_KEY) && !empty(EXCH_BITZ_SECRET)) { - $bitz = new bitz(); - $balance = json_decode($bitz->getUserAssets())->data; - if (!is_object($balance)) echo "bitz error\n"; - else echo("bitz btc_total: ".json_encode($balance)."\n"); - } - if (!empty(EXCH_BLEUTRADE_KEY)) { - $balance = bleutrade_api_query('account/getbalances','¤cies=BTC'); - //$balance = bleutrade_api_query('account/getbalances'); - if (!is_object($balance)) echo "bleutrade error\n"; - else echo("bleutrade btc: ".json_encode($balance->result)."\n"); - } - if (!empty(EXCH_BTER_KEY)) { - $info = bter_api_user('getfunds'); - if (!$info || arraySafeVal($info,'result') != 'true' || !isset($info['available_funds'])) echo "bter error\n"; - else echo("bter available: ".json_encode($info['available_funds'])."\n"); - } - if (!empty(EXCH_CCEX_KEY)) { - $ccex = new CcexAPI; - $balances = $ccex->getBalances(); - if(!$balances || !isset($balances['result'])) { - // older api - $balances = $ccex->getBalance(); - if(!$balances || !isset($balances['return'])) echo "error\n"; - else echo("c-cex btc: ".json_encode($balances['return'][1])."\n"); - } - else echo("c-cex btc: ".json_encode($balances['result'][1])."\n"); - } - if (!empty(EXCH_COINMARKETS_USER)) { - $balances = coinsmarkets_api_user('gettradinginfo'); - if (!is_array($balances)) echo "coinsmarkets error ".json_encode($balances)."\n"; - else echo("coinsmarkets: ".json_encode($balances['return'])."\n"); - } - if (!empty(EXCH_CREX24_KEY)) { - $balance = crex24_api_user('account/balance',array('currency'=>'BTC')); - if (!is_array($balance)) echo "crex24 error ".json_encode($balance)."\n"; - else echo("crex24: ".json_encode($balance)."\n"); - } - if (!empty(EXCH_CRYPTOPIA_KEY)) { - $balance = cryptopia_api_user('GetBalance',array("Currency"=>"BTC")); - if (!is_object($balance)) echo("cryptopia error ".json_encode($balance)."\n"); - else echo("cryptopia btc: ".json_encode($balance->Data)."\n"); - } - if (!empty(EXCH_HITBTC_KEY)) { - $data = hitbtc_api_user('trading/balance'); - if (!is_object($data) || !isset($data->balance)) echo("hitbtc error ".json_encode($data)."\n"); - else foreach ($data->balance as $balance) { - if (objSafeVal($balance,'currency_code') == 'BTC') - echo("hitbtc btc: ".json_encode($balance)."\n"); - } - } - if (!empty(EXCH_KRAKEN_KEY)) { - $balance = kraken_api_user('Balance'); - echo("kraken btc: ".json_encode($balance)."\n"); - } - if (!empty(EXCH_KUCOIN_KEY) && !empty(EXCH_KUCOIN_PASSPHRASE)) { - $balance = kucoin_api_user('accounts',array('currency'=>'BTC')); - if (!is_object($balance) || !isset($balance->data)) echo "kucoin error ".json_encode($balance)."\n"; - else echo("kucoin: ".json_encode($balance->data)."\n"); - } - if (!empty(EXCH_LIVECOIN_KEY)) { - $livecoin = new LiveCoinApi; - $balance = $livecoin->getBalances('BTC'); - if (!$balance) echo("livecoin error\n"); - else echo("livecoin btc: ".json_encode($balance)."\n"); - // {"type":"available","currency":"BTC","value":0} - } - if (!empty(EXCH_NOVA_KEY)) { - $info = nova_api_user('getbalances'); - if (objSafeVal($info,'status','') != 'success' || !is_array($info->balances)) echo "nova error\n"; - else echo("nova btc: ".json_encode($info->balances[0])."\n"); - } - if(!empty(EXCH_POLONIEX_KEY)) { - $poloniex = new poloniex; - $balance = $poloniex->get_available_balances(); - echo("poloniex available : ".json_encode($balance)."\n"); - } - if (!empty(EXCH_STOCKSEXCHANGE_KEY)) { - // $info = stocksexchange_api_user('Deposit',array("currency"=>"BTC")); - $info = stocksexchange_api_user('GetInfo'); - if (!is_array($info) || arraySafeVal($info,'success') != 1) echo "stocksexchange error ".json_encode($info)."\n"; - else echo("stocksexchange: ".json_encode($info['data']['funds'])."\n"); - } - if (!empty(EXCH_YOBIT_KEY)) { - $info = yobit_api_query2('getInfo'); - if (!arraySafeVal($info,'success',0) || !is_array($info['return'])) echo "error\n"; - else echo("yobit btc: ".json_encode($info['return']['funds']['btc'])."\n"); - } - // only one secret key - $balance = empoex_api_user('account/balance','BTC'); - if ($balance) echo("empoex btc: ".json_encode($balance['available'])."\n"); - } -} diff --git a/web/yaamp/core/backend/coins.php.bak b/web/yaamp/core/backend/coins.php.bak deleted file mode 100644 index 11126716c..000000000 --- a/web/yaamp/core/backend/coins.php.bak +++ /dev/null @@ -1,313 +0,0 @@ -name"); - - $remote = new WalletRPC($coin); - - $info = $remote->getinfo(); - if(!$info && $coin->enable) - { - debuglog("{$coin->symbol} no getinfo answer, retrying..."); - sleep(3); - $info = $remote->getinfo(); - if (!$info) { - debuglog("{$coin->symbol} disabled, no answer after 2 attempts. {$remote->error}"); - $coin->enable = false; - $coin->connections = 0; - $coin->save(); - continue; - } - } - - // auto-enable if auto_ready is set - if($coin->auto_ready && !empty($info)) - $coin->enable = true; - else if (empty($info)) - continue; - - if ($debug) echo "{$coin->symbol}\n"; - - if(isset($info['difficulty'])) - $difficulty = $info['difficulty']; - else - $difficulty = $remote->getdifficulty(); - - if(is_array($difficulty)) { - $coin->difficulty = arraySafeVal($difficulty,'proof-of-work'); - $coin->difficulty_pos = arraySafeVal($difficulty,'proof-of-stake'); - } - else - $coin->difficulty = $difficulty; - - if($coin->algo == 'quark') - $coin->difficulty /= 0x100; - - if($coin->difficulty == 0) - $coin->difficulty = 1; - - $coin->errors = isset($info['errors'])? $info['errors']: ''; - $coin->txfee = isset($info['paytxfee'])? $info['paytxfee']: ''; - $coin->connections = isset($info['connections'])? $info['connections']: ''; - $coin->multialgos = (int) isset($info['pow_algo_id']); - $coin->balance = isset($info['balance'])? $info['balance']: 0; - $coin->stake = isset($info['stake'])? $info['stake'] : $coin->stake; - $coin->mint = dboscalar("select sum(amount) from blocks where coin_id=$coin->id and category='immature'"); - - if(empty($coin->master_wallet)) - { - if ($coin->rpcencoding == 'DCR' && empty($coin->account)) $coin->account = 'default'; - $coin->master_wallet = $remote->getaccountaddress($coin->account); - } - - if(empty($coin->rpcencoding)) - { - $difficulty = $remote->getdifficulty(); - if(is_array($difficulty)) - $coin->rpcencoding = 'POS'; - else if ($coin->symbol == 'DCR') - $coin->rpcencoding = 'DCR'; - else if ($coin->symbol == 'ETH') - $coin->rpcencoding = 'GETH'; - else if ($coin->symbol == 'NIRO') - $coin->rpcencoding = 'NIRO'; - else - $coin->rpcencoding = 'POW'; - } - - if($coin->hassubmitblock == NULL) - { - $remote->submitblock(''); - if(strcasecmp($remote->error, 'method not found') == 0) - $coin->hassubmitblock = false; - else - $coin->hassubmitblock = true; - } - - if($coin->auxpow == NULL) - { - $ret = $remote->getauxblock(); - - if(strcasecmp($remote->error, 'method not found') == 0) - $coin->auxpow = false; - else - $coin->auxpow = true; - } - -// if($coin->symbol != 'BTC') -// { -// if($coin->symbol == 'PPC') -// $template = $remote->getblocktemplate(''); -// else - $template = $remote->getblocktemplate('{}'); - - if($template && isset($template['coinbasevalue'])) - { - $coin->reward = $template['coinbasevalue']/100000000*$coin->reward_mul; - - if($coin->symbol == 'TAC' && isset($template['_V2'])) - $coin->charity_amount = $template['_V2']/100000000; - - if(isset($template['payee_amount']) && $coin->symbol != 'LIMX') { - $coin->charity_amount = doubleval($template['payee_amount'])/100000000; - $coin->reward -= $coin->charity_amount; - } - - else if(isset($template['masternode']) && arraySafeVal($template,'masternode_payments_enforced')) { - if (arraySafeVal($template,'masternode_payments_started')) - $coin->reward -= arraySafeVal($template['masternode'],'amount',0)/100000000; - $coin->hasmasternodes = true; - } - - else if($coin->symbol == 'XZC') { - // coinbasevalue here is the amount available for miners, not the full block amount - $coin->reward = arraySafeVal($template,'coinbasevalue')/100000000 * $coin->reward_mul; - $coin->charity_amount = $coin->reward * $coin->charity_percent / 100; - } - - else if(!empty($coin->charity_address)) { - if(!$coin->charity_amount) - $coin->reward -= $coin->reward * $coin->charity_percent / 100; - } - - if(isset($template['bits'])) - { - $target = decode_compact($template['bits']); - $coin->difficulty = target_to_diff($target); - } - } - - else if ($coin->rpcencoding == 'GETH' || $coin->rpcencoding == 'NIRO') - { - $coin->auto_ready = ($coin->connections > 0); - } - - else if(strcasecmp($remote->error, 'method not found') == 0) - { - $template = $remote->getmemorypool(); - if($template && isset($template['coinbasevalue'])) - { - $coin->usememorypool = true; - $coin->reward = $template['coinbasevalue']/100000000*$coin->reward_mul; - - if(isset($template['bits'])) - { - $target = decode_compact($template['bits']); - $coin->difficulty = target_to_diff($target); - } - } else { - $coin->auto_ready = false; - $coin->errors = $remote->error; - } - } - - else if ($coin->symbol == 'ZEC' || $coin->rpcencoding == 'ZEC') - { - if($template && isset($template['coinbasetxn'])) - { - // no coinbasevalue in ZEC blocktemplate :/ - $txn = $template['coinbasetxn']; - $coin->charity_amount = arraySafeVal($txn,'foundersreward',0)/100000000; - $coin->reward = $coin->charity_amount * 4 + arraySafeVal($txn,'fee',0)/100000000; - // getmininginfo show current diff, getinfo the last block one - $mininginfo = $remote->getmininginfo(); - $coin->difficulty = ArraySafeVal($mininginfo,'difficulty',$coin->difficulty); - //$target = decode_compact($template['bits']); - //$diff = target_to_diff($target); // seems not standard 0.358557563 vs 187989.937 in getmininginfo - //target 00000002c0930000000000000000000000000000000000000000000000000000 => 0.358557563 (bits 1d02c093) - //$diff = hash_to_difficulty($coin, $template['target']); - //debuglog("ZEC target {$template['bits']} -> $diff"); - } else { - $coin->auto_ready = false; - $coin->errors = $remote->error; - } - } - - else if ($coin->rpcencoding == 'DCR') - { - $wi = $remote->walletinfo(); - $coin->auto_ready = ($coin->connections > 0 && arraySafeVal($wi,"daemonconnected")); - if ($coin->auto_ready && arraySafeVal($wi,"unlocked",false) == false) { - debuglog($coin->symbol." wallet is not unlocked!"); - } - } - - else - { - $coin->auto_ready = false; - $coin->errors = $remote->error; - } - - if(strcasecmp($coin->errors, 'No more PoW blocks') == 0) - { - $coin->dontsell = true; - $coin->auto_ready = false; - } -// } - - if($coin->block_height != $info['blocks']) - { - $count = $info['blocks'] - $coin->block_height; - $ttf = $count > 0 ? (time() - $coin->last_network_found) / $count : 0; - - if(empty($coin->actual_ttf)) $coin->actual_ttf = $ttf; - - $coin->actual_ttf = percent_feedback($coin->actual_ttf, $ttf, 5); - $coin->last_network_found = time(); - } - - $coin->version = substr($info['version'], 0, 32); - $coin->block_height = $info['blocks']; - - if($coin->powend_height > 0 && $coin->block_height > $coin->powend_height) { - if ($coin->auto_ready) { - $coin->auto_ready = false; - $coin->errors = 'PoW end reached'; - } - } - - $coin->save(); - - if ($coin->available < 0 || $coin->cleared > $coin->balance) { - // can happen after a payout (waiting first confirmation) - BackendUpdatePoolBalances($coin->id); - } - // debuglog(" end $coin->name"); - - } - - $coins = getdbolist('db_coins', "enable order by auxpow desc"); - foreach($coins as $coin) - { - $coin = getdbo('db_coins', $coin->id); - if(!$coin) continue; - - if($coin->difficulty) - { - $coin->index_avg = $coin->reward * $coin->price * 10000 / $coin->difficulty; - if(!$coin->auxpow && $coin->rpcencoding == 'POW') - { - $indexaux = dboscalar("SELECT SUM(index_avg) FROM coins WHERE enable AND visible AND auto_ready AND auxpow AND algo='{$coin->algo}'"); - $coin->index_avg += $indexaux; - } - } - - if($coin->network_hash) { - $coin->network_ttf = intval($coin->difficulty * 0x100000000 / $coin->network_hash); - if($coin->network_ttf > 2147483647) $coin->network_ttf = 2147483647; - } - - if(isset($pool_rate[$coin->algo])) - $coin->pool_ttf = intval($coin->difficulty * 0x100000000 / $pool_rate[$coin->algo]); - if($coin->pool_ttf > 2147483647) $coin->pool_ttf = 2147483647; - - if(strstr($coin->image, 'http')) - { - $data = file_get_contents($coin->image); - $coin->image = "/images/coin-$coin->id.png"; - - @unlink(YAAMP_HTDOCS.$coin->image); - file_put_contents(YAAMP_HTDOCS.$coin->image, $data); - } - - $coin->save(); - } - - $d1 = microtime(true) - $t1; - controller()->memcache->add_monitoring_function(__METHOD__, $d1); -} - - - - diff --git a/web/yaamp/core/backend/markets.php.bak b/web/yaamp/core/backend/markets.php.bak deleted file mode 100644 index b7d6266c0..000000000 --- a/web/yaamp/core/backend/markets.php.bak +++ /dev/null @@ -1,2016 +0,0 @@ -symbol2'"); - if(!$coin) continue; - - $list = getdbolist('db_markets', "coinid=$coin->id"); - foreach($list as $market) - { - $market2 = getdbosql('db_markets', "coinid=$coin2->id and name='$market->name'"); - if(!$market2) continue; - - $market2->price = $market->price; - $market2->price2 = $market->price2; - $market2->deposit_address = $market->deposit_address; - $market2->pricetime = $market->pricetime; - - $market2->save(); - } - } - - $coins = getdbolist('db_coins', "installed and id in (select distinct coinid from markets)"); - foreach($coins as $coin) - { - if($coin->symbol=='BTC') { - $coin->price = 1; - $coin->price2 = 1; - $coin->save(); - continue; - } - - $market = getBestMarket($coin); - if($market) - { - $coin->price = $market->price*(1-YAAMP_FEES_EXCHANGE/100); - $coin->price2 = $market->price2; - - $base_coin = !empty($market->base_coin)? getdbosql('db_coins', "symbol='{$market->base_coin}'"): null; - if($base_coin) - { - $coin->price *= $base_coin->price; - $coin->price2 *= $base_coin->price; - } - } - else { - $coin->price = 0; - $coin->price2 = 0; - } - - $coin->save(); - dborun("UPDATE earnings SET price={$coin->price} WHERE status!=2 AND coinid={$coin->id}"); - dborun("UPDATE markets SET message=NULL WHERE disabled=0 AND message='disabled from settings'"); - } -} - -function BackendWatchMarkets($marketname=NULL) -{ - // temporary to fill new coin 'watch' field - if (defined('YIIMP_WATCH_CURRENCIES')) { - $watched = explode(',', YIIMP_WATCH_CURRENCIES); - foreach ($watched as $symbol) { - dborun("UPDATE coins SET watch=1 WHERE symbol=:sym", array(':sym'=>$symbol)); - } - } - - $coins = new db_coins; - $coins = $coins->findAllByAttributes(array('watch'=>1)); - foreach ($coins as $coin) - { - // track btc/usd for history analysis - if ($coin->symbol == 'BTC') { - if ($marketname) continue; - $mh = new db_market_history; - $mh->time = time(); - $mh->idcoin = $coin->id; - $mh->idmarket = NULL; - $mh->price = dboscalar("SELECT usdbtc FROM mining LIMIT 1"); - if (YIIMP_FIAT_ALTERNATIVE == 'EUR') - $mh->price2 = kraken_btceur(); - $mh->balance = dboscalar("SELECT SUM(balance) AS btc FROM balances"); - $mh->save(); - continue; - } else if ($coin->installed) { - // "yiimp" prices and balance history - $mh = new db_market_history; - $mh->time = time(); - $mh->idcoin = $coin->id; - $mh->idmarket = NULL; - $mh->price = $coin->price; - $mh->price2 = $coin->price2; - $mh->balance = $coin->balance; - $mh->save(); - } - - if ($coin->rpcencoding == 'DCR') { - // hack to store the locked balance history as a "stake" market - $remote = new WalletRPC($coin); - $stake = 0.; //(double) $remote->getbalance('*',0,'locked'); - $balances = $remote->getbalance('*',0); - if (isset($balances["balances"])) { - foreach ($balances["balances"] as $accb) { - $stake += (double) arraySafeVal($accb, 'lockedbytickets', 0); - } - } - $info = $remote->getstakeinfo(); - if (empty($remote->error) && isset($info['difficulty'])) - dborun("UPDATE markets SET balance=0, ontrade=:stake, balancetime=:time, - price=:ticketprice, price2=:live, pricetime=NULL WHERE coinid=:id AND name='stake'", array( - ':ticketprice'=>$info['difficulty'], ':live'=>$info['live'], ':stake'=>$stake, - ':id'=>$coin->id, ':time'=>time() - )); - } - - // user watched currencies - $markets = getdbolist('db_markets', "coinid={$coin->id} AND NOT disabled"); - foreach($markets as $market) { - if ($marketname && $market->name != $marketname) continue; - if (!empty($market->base_coin)) continue; // todo ? - if (empty($market->price)) continue; - $mh = new db_market_history; - $mh->time = time(); // max(intval($market->balancetime), intval($market->pricetime)); - $mh->idcoin = $coin->id; - $mh->idmarket = $market->id; - $mh->price = $market->price; - $mh->price2 = $market->price2; - $mh->balance = (double) ($market->balance) + (double) ($market->ontrade); - $mh->save(); - } - } -} - -function getBestMarket($coin) -{ - $market = NULL; - if ($coin->symbol == 'BTC') - return NULL; - - if (!empty($coin->symbol2)) { - $alt = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$coin->symbol2)); - if ($alt && $alt->symbol2 != $coin->symbol2) - return getBestMarket($alt); - } - - if (!empty($coin->market)) { - // get coin market first (if set) - if ($coin->market != 'BEST' && $coin->market != 'unknown') - $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND - NOT disabled AND IFNULL(deposit_address,'') != '' AND name=:name", - array(':name'=>$coin->market)); - else - // else take one of the big exchanges... - $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND - NOT disabled AND IFNULL(deposit_address,'') != '' AND - name IN ('poloniex','bittrex') ORDER BY priority DESC, price DESC"); - } - - if(!$market) { - $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND - NOT disabled AND IFNULL(deposit_address,'') != '' ORDER BY priority DESC, price DESC"); - } - - if (!$market && empty($coin->market)) { - debuglog("best market for {$coin->symbol} is unknown"); - $coin->market = 'unknown'; - $coin->save(); - } - - return $market; -} - -function AverageIncrement($value1, $value2) -{ - $percent = 80; - $value = ($value1*(100-$percent) + $value2*$percent) / 100; - - return $value; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -function updateBleutradeMarkets() -{ - $exchange = 'bleutrade'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = bleutrade_api_query('public/getcurrencies'); - if(!is_object($list)) return; - - foreach($list->result as $currency) - { - // debuglog($currency); - if($currency->Currency == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol='{$currency->Currency}'"); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} and name='$exchange'"); - if(!$market) continue; - - $market->txfee = $currency->TxFee; - if($market->disabled < 9) $market->disabled = !$currency->IsActive; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $market->save(); - - if($market->disabled) continue; - - sleep(1); - $pair = "{$symbol}_BTC"; - $ticker = bleutrade_api_query('public/getticker', '&market='.$pair); - if(!$ticker || !$ticker->success || !$ticker->result) continue; - - $price2 = ($ticker->result[0]->Bid+$ticker->result[0]->Ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->result[0]->Bid); - $market->pricetime = time(); - - if(!empty(EXCH_BLEUTRADE_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if(empty($market->deposit_address) && !$last_checked) - { - sleep(1); - $address = bleutrade_api_query('account/getdepositaddress', '¤cy='.$symbol); - if(is_object($address) && is_object($address->result)) { - $addr = $address->result->Address; - if (!empty($addr) && $addr != $market->deposit_address) { - $market->deposit_address = $addr; - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - } - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - - $market->save(); - -// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); - } - -} - - ///////////////////////////////////////////////////////////////////////////////////////////// - -function updateBitfinexMarkets() -{ - $exchange = 'bitfinex'; - if (exchange_get($exchange, 'disabled')) return; - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $count=0; - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - if (!($coin->installed || $coin->watch)) continue; - $symbol = $coin->getOfficialSymbol(); - $pair = strtolower($symbol).'btc'; - - $ticker = bitfinex_api_query('pubticker', $pair); - - $count++; - if ($count > 10) {sleep(10);$count=0;} // Rate limiting https://docs.bitfinex.com/docs/rest-general - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $pair = strtolower($symbol.$market->base_coin); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - -// if ($market->disabled < 9) { -// $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); -// $market->disabled = ($ticker->bid < $ticker->ask/2) && ($nbm > 1); -// } - - $price2 = ($ticker->bid+$ticker->ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->pricetime = time(); // $ticker->timestamp "2018-08-31T12:48:56Z" - $market->save(); - - if (empty($coin->price) && $ticker->ask) { - $coin->price = $market->price; - $coin->price2 = $price2; - $coin->save(); - } - //debuglog("$exchange: $pair price updated to {$market->price}"); - } -} - - ///////////////////////////////////////////////////////////////////////////////////////////// - -function updateBitzMarkets($force = false) -{ - $exchange = 'bitz'; - if (exchange_get($exchange, 'disabled')) return; - - $markets = bitz_api_query('tickerall'); - - foreach($markets as $c => $ticker) - { - $pairs = explode('_', $c); - $symbol = strtoupper(reset($pairs)); $base = end($pairs); - if($symbol == 'BTC' || $base != 'btc') continue; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - $coin = getdbosql('db_coins', "symbol='{$symbol}'"); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); - - if(!$market) continue; - $price2 = ($ticker->bidPrice + $ticker->askPrice)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bidPrice); - $market->pricetime = time(); - $market->priority = -1; - $market->txfee = 0.2; // trade pct - $market->save(); - // debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); - } -} - -///////////////////////////////////////////////////////////////////////////////////////////// - -function updateCryptoBridgeMarkets($force = false) -{ - $exchange = 'cryptobridge'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $result = cryptobridge_api_query('ticker'); - if(!is_array($result)) return; - - foreach($result as $ticker) - { - if (is_null(objSafeVal($ticker,'id'))) continue; - $pairs = explode('_', $ticker->id); - $symbol = reset($pairs); $base = end($pairs); - if($symbol == 'BTC' || $base != 'BTC') continue; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $coin = getdbosql('db_coins', "symbol='{$symbol}'"); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); - if(!$market) continue; - - $price2 = ($ticker->bid + $ticker->ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->pricetime = time(); - $market->priority = -1; - $market->txfee = 0.2; // trade pct - $market->save(); - - //debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); - } -} - -function updateEscoDexMarkets($force = false) -{ - $exchange = 'escodex'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - $result = escodex_api_query('ticker'); - if(!is_array($result)) return; - foreach($result as $ticker) - { - if (is_null(objSafeVal($ticker,'id'))) continue; - #$pairs = explode('_', $ticker->id); - $symbol = $ticker->quote; $base = $ticker->base; - if($symbol == 'BTC' || $base != 'BTC') continue; - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $coin = getdbosql('db_coins', "symbol='{$symbol}'"); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); - if(!$market) continue; - - $price2 = ($ticker->highest_bid + $ticker->lowest_ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->highest_bid); - $market->pricetime = time(); - $market->priority = -1; - $market->txfee = 0.2; // trade pct - $market->save(); - //debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); - if ((empty($coin->price))||(empty($coin->price2))) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->market = $exchange; - $coin->save(); - } - } -} - -///////////////////////////////////////////////////////////////////////////////////////////// - -function updateGateioMarkets($force = false) -{ - $exchange = 'gateio'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = gateio_api_query('tickers'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $dbpair = strtolower($symbol).'_btc'; - foreach ($markets as $pair => $ticker) { - if ($pair != $dbpair) continue; - $price2 = (doubleval($ticker['highestBid']) + doubleval($ticker['lowestAsk'])) / 2; - $market->price = AverageIncrement($market->price, doubleval($ticker['highestBid'])); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); - $market->priority = -1; - $market->txfee = 0.2; // trade pct - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->market = $exchange; - $coin->save(); - } - } - } -} - -///////////////////////////////////////////////////////////////////////////////////////////// - -function updateGraviexMarkets($force = false) -{ - $exchange = 'graviex'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = graviex_api_query('tickers'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $symbol = strtolower($symbol); - $dbpair = $symbol.'btc'; - foreach ($markets as $pair => $ticker) { - if ($pair != $dbpair) continue; - $price2 = ($ticker['ticker']['buy']+$ticker['ticker']['sell'])/2; - $market->price = AverageIncrement($market->price, $ticker['ticker']['buy']); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->market = $exchange; - $coin->save(); - } - } - } -} - -///////////////////////////////////////////////////////////////////////////////////////////// - -function updateKrakenMarkets($force = false) -{ - $exchange = 'kraken'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $result = kraken_api_query('AssetPairs'); - if(!is_array($result)) return; - - foreach($result as $pair => $data) - { - $pairs = explode('-', $pair); - $base = reset($pairs); $symbol = end($pairs); - if($symbol == 'BTC' || $base != 'BTC') continue; - if(in_array($symbol, array('GBP','CAD','EUR','USD','JPY'))) continue; - if(strpos($symbol,'.d') !== false) continue; - - $coin = getdbosql('db_coins', "symbol='{$symbol}'"); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - - $fees = reset($data['fees']); - $feepct = is_array($fees) ? end($fees) : null; - $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); - if(!$market) continue; - - $market->txfee = $feepct; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $market->save(); - if($market->disabled || $market->deleted) continue; - - sleep(1); - $ticker = kraken_api_query('Ticker', $symbol); - if(!is_array($ticker) || !isset($ticker[$pair])) continue; - - $ticker = arraySafeVal($ticker, $pair); - if(!is_array($ticker) || !isset($ticker['b'])) continue; - - $price1 = (double) $ticker['a'][0]; // a = ask - $price2 = (double) $ticker['b'][0]; // b = bid, c = last - - // Alt markets on kraken (LTC/DOGE/NMC) are "reversed" against BTC (1/x) - if ($price2 > $price1) { - $price = $price2 ? 1 / $price2 : 0; - $price2 = $price1 ? 1 / $price1 : 0; - } else { - $price = $price1 ? 1 / $price1 : 0; - $price2 = $price2 ? 1 / $price2 : 0; - } - - $market->price = AverageIncrement($market->price, $price); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); - - $market->save(); - } -} - -///////////////////////////////////////////////////////////////////////////////////////////// - -function updateBittrexMarkets($force = false) -{ - $exchange = 'bittrex'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = bittrex_api_query('public/getcurrencies'); - if(!is_object($list)) return; - foreach($list->result as $currency) - { - $market = objSafeVal($currency,'Currency',''); - if(empty($market) || $market == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$currency->Currency)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); - if(!$market) continue; - - $market->txfee = $currency->TxFee; // withdraw cost, not a percent! - $market->message = $currency->Notice; - if($market->disabled < 9) $market->disabled = !$currency->IsActive; - - $market->save(); - } - - sleep(1); - - $list = bittrex_api_query('public/getmarketsummaries'); - if(!is_object($list)) return; - - foreach($list->result as $m) - { - $a = explode('-', $m->MarketName); - if(!isset($a[1])) continue; - if($a[0] != 'BTC') continue; - $symbol = $a[1]; - if($symbol == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); - if(!$market) continue; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $price2 = ($m->Bid + $m->Ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $m->Bid); - $market->pricetime = time(); - $market->save(); - - // deposit address - if(!empty(EXCH_BITTREX_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if($force || (empty($market->deposit_address) && !$last_checked)) - { - $address = bittrex_api_query('account/getdepositaddress', "¤cy={$symbol}"); - if(is_object($address) && isset($address->result)) { - $addr = $address->result->Address; - if (!empty($addr) && $addr != $market->deposit_address) { - $market->deposit_address = $addr; - $market->save(); - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - } - } - } - cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 12*3600); - } - -// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); - } -} - -//////////////////////////////////////////////////////////////////////////////////// - -function updateCCexMarkets() -{ - $exchange = 'c-cex'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $ccex = new CcexAPI; - $list = $ccex->getMarketSummaries(); - if (!is_array($list)) return; - - foreach($list as $ticker) - { - if(!isset($ticker['MarketName'])) continue; - $e = explode('-', $ticker['MarketName']); - - $symbol = strtoupper($e[0]); - $base_symbol = strtoupper($e[1]); - - $sqlFilter = ''; - if ($base_symbol != 'BTC') { - // Only track ALT markets (LTC, DOGE) if the market record exists in the DB, sample market name "c-cex LTC" - $in_db = (int) dboscalar("SELECT count(M.id) FROM markets M INNER JOIN coins C ON C.id=M.coinid - WHERE C.installed AND C.symbol=:sym AND M.base_coin=:base", array(':sym'=>$symbol,':base'=>$base_symbol)); - if (!$in_db) continue; - $sqlFilter = "AND base_coin='$base_symbol'"; - } - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if (!$coin) continue; - if (!$coin->installed && !$coin->watch) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name LIKE '$exchange%' $sqlFilter"); - if (!$market) continue; - //if ($market->disabled < 9) $market->disabled = !$ticker['IsActive']; // only in GetMarkets() - if ($market->disabled < 9) $market->disabled = ($ticker['OpenBuyOrders'] <= 1); - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $market->save(); - - if ($market->disabled || $market->deleted) continue; - - $price2 = ($ticker['Bid']+$ticker['Ask'])/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker['Bid']); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2) && $base_symbol=='BTC') { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - - if(!empty(EXCH_CCEX_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if(empty($market->deposit_address) && !$last_checked) - { - sleep(1); - $address = $ccex->getDepositAddress($symbol); - if(!empty($address)) { - $addr = arraySafeVal($address,'return'); - if (!empty($addr) && $addr != $market->deposit_address) { - if (strpos($addr, 'Error') !== false) { - $market->message = $addr; - debuglog("$exchange: deposit address for $symbol returned $addr"); - } else { - $market->deposit_address = $addr; - $market->message = null; - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - } - $market->save(); - } - } - } - cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 24*3600); - } - -// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); - } -} - -//////////////////////////////////////////////////////////////////////////////////// - -function updatePoloniexMarkets() -{ - $exchange = 'poloniex'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $poloniex = new poloniex; - - $tickers = $poloniex->get_ticker(); - if(!is_array($tickers)) return; - - foreach($tickers as $symbol=>$ticker) - { - $a = explode('_', $symbol); - if(!isset($a[1])) continue; - if($a[0] != 'BTC') continue; - - $symbol = $a[1]; - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} and name='poloniex'"); - if(!$market) continue; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - } - - if($market->disabled || $market->deleted) continue; - - $price2 = ($ticker['highestBid']+$ticker['lowestAsk'])/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker['highestBid']); - $market->pricetime = time(); - - $market->save(); - - if(empty($market->deposit_address) && $coin->installed && !empty(EXCH_POLONIEX_KEY)) { - $last_checked = cache()->get($exchange.'-deposit_address-check'); - if (time() - $last_checked < 3600) { - // if still empty after get_deposit_addresses(), generate one - $poloniex->generate_address($coin->symbol); - sleep(1); - } - // empty address found, so force get_deposit_addresses check - cache()->set($exchange.'-deposit_address-check', 0, 10); - } - -// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); - } - - // deposit addresses - if(!empty(EXCH_POLONIEX_KEY)) - { - $list = array(); - $last_checked = cache()->get($exchange.'-deposit_address-check'); - if (!$last_checked) { - $list = $poloniex->get_deposit_addresses(); - if (!is_array($list)) return; - } - - foreach($list as $symbol=>$item) - { - if($symbol == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid=$coin->id and name='poloniex'"); - if(!$market) continue; - - if ($market->deposit_address != $item) { - $market->deposit_address = $item; - $market->save(); - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - } - } - cache()->set($exchange.'-deposit_address-check', time(), 12*3600); - } -} - -//////////////////////////////////////////////////////////////////////////////////// - -function updateYobitMarkets() -{ - $exchange = 'yobit'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $res = yobit_api_query('info'); - if(!is_object($res)) return; - - foreach($res->pairs as $i=>$item) - { - $e = explode('_', $i); - $symbol = strtoupper($e[0]); - $base_symbol = strtoupper($e[1]); - - if($symbol == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if(!$coin) continue; - - $sqlFilter = "AND IFNULL(base_coin,'')=''"; - if ($base_symbol != 'BTC') { - // Only track ALT markets (ETH, DOGE) if the market record exists in the DB, sample market name "yobit DOGE" - $in_db = (int) dboscalar("SELECT count(M.id) FROM markets M INNER JOIN coins C ON C.id=M.coinid ". - " WHERE C.installed AND C.symbol=:sym AND M.name LIKE '$exchange %' AND M.base_coin=:base", - array(':sym'=>$symbol,':base'=>$base_symbol) - ); - if (!$in_db) continue; - $sqlFilter = "AND base_coin='$base_symbol'"; - } - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name LIKE '$exchange%' $sqlFilter"); - if(!$market) continue; - - $market->txfee = objSafeVal($item,'fee',0.2); - if ($market->disabled < 9) $market->disabled = arraySafeVal($item,'hidden',0); - if (time() - $market->pricetime > 6*3600) $market->price = 0; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $market->save(); - - if ($market->deleted || $market->disabled) continue; - if (!$coin->installed && !$coin->watch) continue; - - $symbol = $coin->getOfficialSymbol(); - $pair = strtolower($symbol.'_'.$base_symbol); - - $ticker = yobit_api_query("ticker/$pair"); - if(!$ticker || objSafeVal($ticker,$pair) === NULL) continue; - if(objSafeVal($ticker->$pair,'buy') === NULL) { - debuglog("$exchange: invalid data received for $pair ticker"); - continue; - } - - $price2 = ($ticker->$pair->buy + $ticker->$pair->sell) / 2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->$pair->buy); - if ($ticker->$pair->buy < $market->price) $market->price = $ticker->$pair->buy; - $market->pricetime = time(); - $market->save(); - - if(!empty(EXCH_YOBIT_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if ($last_checked) continue; - - sleep(1); // for the api nonce - $address = yobit_api_query2('GetDepositAddress', array("coinName"=>$symbol)); - if (!empty($address) && isset($address['return']) && $address['success']) { - $addr = $address['return']['address']; - if (!empty($addr) && $addr != $market->deposit_address) { - $market->deposit_address = $addr; - debuglog("$exchange: deposit address for {$symbol} updated"); - $market->save(); - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - } -} - -// http://www.jubi.com/ ? -function updateJubiMarkets() -{ - $exchange = 'jubi'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $btc = jubi_api_query('ticker', "?coin=btc"); - if(!is_object($btc)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $ticker = jubi_api_query('ticker', "?coin=".strtolower($symbol)); - if(!$ticker || !is_object($ticker)) continue; - if(objSafeVal($ticker,'buy') === NULL) { - debuglog("$exchange: invalid data received for $symbol ticker"); - continue; - } - - if (isset($btc->sell) && $btc->sell != 0.) - $ticker->buy /= $btc->sell; - if (isset($btc->buy) && $btc->buy != 0.) - $ticker->sell /= $btc->buy; - - $price2 = ($ticker->buy+$ticker->sell)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->buy*0.95); - $market->pricetime = time(); - -// debuglog("jubi update $symbol: $market->price $market->price2"); - - $market->save(); - } -} - -function updateAlcurexMarkets() -{ - $exchange = 'alcurex'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $data = alcurex_api_query('market', "?info=on"); - if(!is_object($data)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - if (!$coin->installed && !$coin->watch) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = strtoupper($symbol).'_BTC'; - foreach ($data->MARKETS as $ticker) { - if ($ticker->Pair === $pair) { - $lpair = strtolower($pair); - $last = alcurex_api_query('market', "?pair=$lpair&last=last"); - if (is_object($last) && !empty($last->$lpair)) { - $last = $last->$lpair; - $market->price = AverageIncrement($market->price, $last->price); - $market->pricetime = time(); - $market->save(); - } - $last = alcurex_api_query('market', "?pair=$lpair&last=sell"); - if (is_object($last) && !empty($last->$lpair)) { - $last = $last->$lpair; - $market->price2 = AverageIncrement($market->price2, $last->price); - $market->pricetime = time(); - $market->save(); - } - if (empty($coin->price)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - //debuglog("$exchange: $pair price updated to {$market->price}"); - break; - } - } - } -} - -function updateCoinbeneMarkets() -{ - $exchange = 'coinbene'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $data = coinbene_api_query('market/ticker', 'symbol=all'); - $data = objSafeVal($data,'ticker'); - if(!is_array($data)) return; - - foreach($list as $market) { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = $symbol.'BTC'; - foreach($data as $ticker) { - if ($ticker->symbol != $pair) continue; - - $price2 = ($ticker->bid+$ticker->ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->pricetime = time(); - $market->save(); - - break; - } - } -} - -function updateCrex24Markets() -{ - $exchange = 'crex24'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $data = crex24_api_query('tickers'); - if(!is_array($data)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - $pair = strtoupper($symbol).'-BTC'; - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $pair = strtoupper($symbol.'-'.$market->base_coin); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - foreach ($data as $ticker) { - if ($ticker->instrument === $pair) { - if ($market->disabled < 9) { - $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); - $market->disabled = ($ticker->bid < $ticker->ask/2) && ($nbm > 1); - } - - $price2 = ($ticker->bid+$ticker->ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->pricetime = time(); // $ticker->timestamp "2018-08-31T12:48:56Z" - $market->save(); - - if (empty($coin->price) && $ticker->ask) { - $coin->price = $market->price; - $coin->price2 = $price2; - $coin->save(); - } - //debuglog("$exchange: $pair price updated to {$market->price}"); - break; - } - } - } -} - -function updateCryptopiaMarkets() -{ - $exchange = 'cryptopia'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $data = cryptopia_api_query('GetMarkets', 24); - if(!is_object($data)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - $pair = strtoupper($symbol).'/BTC'; - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $pair = strtoupper($symbol.'/'.$market->base_coin); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } else if ($market->message == 'disabled from settings') { - $market->disabled = 0; - $market->message = ''; - $market->save(); - } - - foreach ($data->Data as $ticker) { - if ($ticker->Label === $pair) { - - if ($market->disabled < 9) { - $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); - $market->disabled = ($ticker->BidPrice < $ticker->AskPrice/2) && ($nbm > 1); - } - - $price2 = ($ticker->BidPrice+$ticker->AskPrice)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->BidPrice*0.98); - $market->marketid = $ticker->TradePairId; - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price) && !$market->disabled && strpos($pair,'BTC')) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } -// debuglog("$exchange: $pair $market->price ".bitcoinvaluetoa($market->price2)); - break; - } - } - } - - if(empty(EXCH_CRYPTOPIA_KEY)) return; - - $last_checked = cache()->get($exchange.'-deposit_address-check'); - if ($last_checked) return; - - $addresses = array(); - sleep(1); - $query = cryptopia_api_user('GetBalance'); - if (is_object($query) && is_array($query->Data)) - foreach($query->Data as $balance) { - $addr = objSafeVal($balance,'Address'); - if (!empty($addr)) $addresses[$balance->Symbol] = $addr; - } - // for some reason, no more available in global GetBalance api - $needCurrencyQueries = empty($addresses); - - if (!empty($list)) - foreach($list as $market) { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - $addr = arraySafeVal($addresses, $symbol); - if ($needCurrencyQueries) { - if(!$coin->installed) continue; - sleep(2); - $query = cryptopia_api_user('GetDepositAddress', array('Currency'=>$symbol)); - $dep = objSafeVal($query,'Data'); - $addr = objSafeVal($dep,'Address'); - } - if (!empty($addr) && $market->deposit_address != $addr) { - debuglog("$exchange: deposit address for {$symbol} updated"); - $market->deposit_address = $addr; - $market->save(); - } - } - cache()->set($exchange.'-deposit_address-check', time(), 12*3600); -} - -function updateHitBTCMarkets() -{ - $exchange = 'hitbtc'; - if (exchange_get($exchange, 'disabled')) return; - - $markets = getdbolist('db_markets', "name LIKE '$exchange%'"); // allow "hitbtc LTC" - if(empty($markets)) return; - - $data = hitbtc_api_query('ticker','','array'); - if(!is_array($data) || empty($data)) return; - - foreach($markets as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $base = 'BTC'; - $symbol = $coin->getOfficialSymbol(); - $pair = strtoupper($symbol).$base; - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $base = $market->base_coin; - $pair = strtoupper($market->base_coin.$symbol); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - - if (market_get($exchange, $symbol, "disabled", false, $base)) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - foreach ($data as $p => $ticker) - { - if ($p === $pair) { - $price2 = ((double)$ticker['bid'] + (double)$ticker['ask'])/2; - $market->price = AverageIncrement($market->price, (double)$ticker['bid']); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); // $ticker->timestamp - $market->priority = -1; - $market->save(); - - if (empty($coin->price2) && strpos($pair,'BTC') !== false) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - //debuglog("$exchange: $pair $market->price ".bitcoinvaluetoa($market->price2)); - break; - } - } - - if(!empty(EXCH_HITBTC_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if($coin->installed && !$last_checked && empty($market->deposit_address)) - { - sleep(1); - $res = hitbtc_api_user('payment/address/'.$symbol); // GET method - if(is_object($res) && isset($res->address)) { - if (!empty($res->address)) { - $market->deposit_address = $res->address; - debuglog("$exchange: deposit address for {$symbol} updated"); - $market->save(); - if ($symbol == 'WAVES' || $symbol == 'LSK') // Wallet address + Public key - debuglog("$exchange: $symbol deposit address data: ".json_encode($res)); - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - } - } -} - -function updateNovaMarkets() -{ - $exchange = 'nova'; - if (exchange_get($exchange, 'disabled')) return; - - $markets = getdbolist('db_markets', "name LIKE '$exchange%'"); // allow "nova LTC" - if(empty($markets)) return; - - $data = nova_api_query('markets'); - if(!is_object($data) || $data->status != 'success' || !is_array($data->markets)) return; - - foreach($markets as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $base = 'BTC'; - $symbol = $coin->getOfficialSymbol(); - $pair = $base.'_'.strtoupper($symbol); - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $base = $market->base_coin; - $pair = strtoupper($market->base_coin.'_'.$symbol); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - - if (market_get($exchange, $symbol, "disabled", false, $base)) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - foreach ($data->markets as $ticker) { - if ($ticker->marketname === $pair) { - - $market->marketid = $ticker->marketid; - - if ($market->disabled < 9) { - $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); - $market->disabled = (floatval($ticker->volume24h) <= 0.005) && $nbm > 1; // in btc - } - - if (!$market->disabled) { - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->price2 = AverageIncrement($market->price2, $ticker->last_price); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2) && strpos($pair,'BTC') !== false) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } - break; - } - } - - if(!empty(EXCH_NOVA_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if(empty($market->deposit_address) && !$last_checked) - { - sleep(1); - $res = nova_api_user('getdepositaddress/'.$symbol); - if(objSafeVal($res,'status') == 'success') { - $addr = objSafeVal($res, 'address'); - if (!empty($addr)) { - $market->deposit_address = $addr; - // delimiter "::" for memo / payment id - $market->message = null; - debuglog("$exchange: deposit address for {$symbol} updated"); - $market->save(); - } else { - debuglog("$exchange: Failed to update $symbol deposit address, ".json_encode($res)); - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - } - } -} - -function updateBinanceMarkets() -{ - $exchange = 'binance'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $tickers = binance_api_query('ticker/allBookTickers'); - if(!is_array($tickers)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = $symbol.'BTC'; - foreach ($tickers as $ticker) { - if ($pair != $ticker->symbol) continue; - - $price2 = ($ticker->bidPrice+$ticker->askPrice)/2; - $market->price = AverageIncrement($market->price, $ticker->bidPrice); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); - if ($market->disabled < 9) $market->disabled = (floatval($ticker->bidQty) < 0.01); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } - } -} - -function updateBterMarkets() -{ - $exchange = 'bter'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = bter_api_query('tickers'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $dbpair = strtolower($symbol).'_btc'; - foreach ($markets as $pair => $ticker) { - if ($pair != $dbpair) continue; - - $market->price = AverageIncrement($market->price, $ticker['buy']); - $market->price2 = AverageIncrement($market->price2, $ticker['avg']); - $market->pricetime = time(); - if ($market->disabled < 9) $market->disabled = (floatval($ticker['vol_btc']) < 0.01); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } - } -} - -function updateEmpoexMarkets() -{ - $exchange = 'empoex'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = empoex_api_query('marketinfo'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = strtoupper($symbol).'-BTC'; - - foreach ($markets as $ticker) { - if ($ticker->pairname != $pair) continue; - - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->price2 = AverageIncrement($market->price2, $ticker->ask); - $market->pricetime = time(); - - if (floatval($ticker->base_volume_24hr) > 0.01) - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->market = 'empoex'; - $coin->save(); - } - } - } -} - -function updateKuCoinMarkets() -{ - $exchange = 'kucoin'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = kucoin_api_query('open/symbols','market=BTC'); - if(!kucoin_result_valid($markets) || empty($markets->data)) return; - - $coininfo = NULL; //kucoin_api_query('market/open/coins'); - if(!kucoin_result_valid($coininfo) || empty($coininfo->data)) { - $coininfo = NULL; - } - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = strtoupper($symbol).'-BTC'; - - foreach ($markets->data as $ticker) { - if ($ticker->symbol != $pair) continue; - if (objSafeVal($ticker,'buy',-1) == -1) continue; - - $market->price = AverageIncrement($market->price, $ticker->buy); - $market->price2 = AverageIncrement($market->price2, objSafeVal($ticker,'sell',$ticker->buy)); - if (!empty($coininfo)) foreach ($coininfo->data as $info) { - if ($info->coin == $symbol) { - //todo: $market->withdrawfee = $info->withdrawMinFee; - break; - } - } - $market->txfee = $ticker->feeRate * 100; // is 0.1% for trades (0.001) - $market->priority = -1; - $market->pricetime = time(); - - if (floatval($ticker->vol) > 0.01) - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } - } -} - -function updateLiveCoinMarkets() -{ - $exchange = 'livecoin'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = livecoin_api_query('exchange/ticker'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = strtoupper($symbol).'/BTC'; - - foreach ($markets as $ticker) { - if ($ticker->symbol != $pair) continue; - - $market->price = AverageIncrement($market->price, $ticker->best_bid); - $market->price2 = AverageIncrement($market->price2, $ticker->best_ask); - $market->txfee = 0.2; - $market->priority = 0; - $market->pricetime = time(); - - if (floatval($ticker->volume) > 0.01) - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - - if(!empty(EXCH_LIVECOIN_KEY) && $market->disabled == 0) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if(empty($market->deposit_address) && !$last_checked) - { - sleep(1); - $livecoin = new LiveCoinApi(); - $data = $livecoin->getDepositAddress($symbol); - if(!empty($data) && objSafeVal($data, 'wallet', '') != '') { - $addr = arraySafeVal($data, 'wallet'); - if (!empty($addr)) { - $market->deposit_address = $addr; - // delimiter "::" for memo / payment id - $market->message = null; - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - $market->save(); - } else { - debuglog("$exchange: Failed to update $symbol deposit address, ".json_decode($data)); - } - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - } - } -} - -function updateCoinExchangeMarkets() -{ - $exchange = 'coinexchange'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = coinexchange_api_query('getmarkets'); - if(!is_object($list)) return; - $markets = coinexchange_api_query('getmarketsummaries'); - if(!is_object($markets)) return; - foreach($list->result as $currency) - { - $symbol = objSafeVal($currency,'MarketAssetCode',''); - $exchid = objSafeVal($currency,'MarketID',0); - if(empty($symbol) || !$exchid || $symbol == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); - $base = objSafeVal($currency,'BaseCurrencyCode',''); - if ($base != 'BTC') { - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND base_coin=:base", array(':base'=>$base)); - } - if(!$market) continue; - - $symbol = $coin->getOfficialSymbol(); - if($market->disabled < 9) $market->disabled = !$currency->Active; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - if($currency->Active && $coin->enable) { - // check wallet status (deposit/withdrawals) - $status = coinexchange_api_query('getcurrency', 'ticker_code='.$symbol); - if(is_object($status) && is_object($status->result)) { - $res = $status->result; - if($market->disabled < 9) $market->disabled = (objSafeVal($res,'WalletStatus') == "offline"); - $market->message = $market->disabled ? $res->WalletStatus : ''; - //debuglog("$exchange: $symbol wallet is {$res->WalletStatus}"); - } - } - - $market->save(); - - if($market->disabled || $market->deleted) continue; - - foreach ($markets->result as $m) { - if ($m->MarketID == $exchid) { - $price2 = ((double) $m->BidPrice + (double) $m->AskPrice)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, (double) $m->BidPrice); - $market->pricetime = time(); - $market->marketid = $exchid; - $market->priority = -1; // not ready for trading - $market->save(); - //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - break; - } - } - } -} - -function updateCoinsMarketsMarkets() -{ - $exchange = 'coinsmarkets'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = coinsmarkets_api_query('apicoin'); - if(empty($list) || !is_array($list)) return; - foreach($list as $pair=>$data) - { - $e = explode('_', $pair); - $base = $e[0]; $symbol = strtoupper($e[1]); - //if($pair == 'DOG_BTC') todo: handle reverted DOG_BTC - if($base != 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); - if(!$market) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $price2 = ((double)$data['lowestAsk'] + (double)$data['highestBid'])/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, (double)$data['highestBid']); - $market->price = min($market->price, $market->price2); // reversed bid/ask ? - - $market->marketid = arraySafeVal($data,'id'); - $market->priority = -1; // not ready for trading - - if ($price2 < $market->price*2) { - // 24htrade field seems not filled in json - //if ($market->disabled == 1) $market->disabled = 0; - } else { - // reduce price2 - $market->price2 = AverageIncrement($market->price2, $market->price); - //if (!$market->disabled) $market->disabled = 1; - } - - //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } -} - -function updateStocksExchangeMarkets() -{ - $exchange = 'stocksexchange'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = stocksexchange_api_query('ticker'); - if(empty($list) || !is_array($list)) return; - foreach($list as $m) - { - $e = explode('_', $m->market_name); - $symbol = strtoupper($e[0]); $base = $e[1]; - if($base != 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); - if(!$market) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $market->disabled = ($m->bid == 0); - - $price2 = ((double)$m->ask + (double)$m->bid)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, (double)$m->bid); - $market->priority = -1; // not ready for trading - $market->txfee = $m->sell_fee_percent; - - //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); - $market->pricetime = time(); // $m->updated_time; - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } -} - -function updateTradeSatoshiMarkets() -{ - $exchange = 'tradesatoshi'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $data = tradesatoshi_api_query('getmarketsummaries'); - if(!is_object($data) || !$data->success || !is_array($data->result)) return; - foreach($data->result as $m) - { - $e = explode('_', $m->market); - $symbol = strtoupper($e[0]); $base = $e[1]; - if($base != 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); - if(!$market) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $market->disabled = ($m->openBuyOrders == 0); - - $price2 = ((double)$m->ask + (double)$m->bid)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, (double)$m->bid); - $market->priority = -1; // not ready for trading - - //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } -} - -// todo: store min/max txs limits -function updateShapeShiftMarkets() -{ - $exchange = 'shapeshift'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = shapeshift_api_query('marketinfo'); - if(!is_array($markets) || empty($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - if (market_get($exchange, $coin->symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $symbol = $coin->getOfficialSymbol(); - $pair = strtoupper($symbol).'_BTC'; - if (!empty($market->base_coin)) - $pair = strtoupper($symbol).'_'.strtoupper($market->base_coin); - - foreach ($markets as $ticker) { - if ($ticker['pair'] != $pair) continue; - - $market->price = AverageIncrement($market->price, $ticker['rate']); - $market->price2 = AverageIncrement($market->price2, $ticker['rate']); - $market->txfee = $ticker['minerFee'] * 100; - $market->pricetime = time(); - $market->priority = -1; // not ready for trading - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - //$coin->market = 'shapeshift'; - $coin->save(); - } - } - } -} - -// update other installed coins price from cryptonator -function updateOtherMarkets() -{ - $coins = getdbolist('db_coins', "installed AND IFNULL(price,0.0) = 0.0"); - foreach($coins as $coin) - { - $symbol = $coin->getOfficialSymbol(); - if (market_get("cryptonator", $coin->symbol, "disabled")) { - continue; - } - - $json = @ file_get_contents("https://www.cryptonator.com/api/full/".strtolower($symbol)."-btc"); - $object = json_decode($json); - if (empty($object)) continue; - - if (is_object($object) && isset($object->ticker)) { - $ticker = $object->ticker; - if ($ticker->target == 'BTC' && $ticker->volume > 1) { - $coin->price2 = $ticker->price; - $coin->price = AverageIncrement((float)$coin->price, (float)$coin->price2); - if ($coin->save()) { - debuglog("cryptonator: $symbol price set to ".bitcoinvaluetoa($coin->price)); - } - } - } - } -} diff --git a/web/yaamp/core/backend/rawcoins.php.bak b/web/yaamp/core/backend/rawcoins.php.bak deleted file mode 100644 index da4ada7b4..000000000 --- a/web/yaamp/core/backend/rawcoins.php.bak +++ /dev/null @@ -1,565 +0,0 @@ -result) && !empty($list->result)) - { - dborun("UPDATE markets SET deleted=true WHERE name='bittrex'"); - foreach($list->result as $currency) { - if ($currency->Currency == 'BTC') { - exchange_set('bittrex', 'withdraw_fee_btc', $currency->TxFee); - continue; - } - updateRawCoin('bittrex', $currency->Currency, $currency->CurrencyLong); - } - } - } - - if (!exchange_get('bitfinex', 'disabled')) { - $list = bitfinex_api_query('symbols'); - if(is_array($list) && !empty($list)) { - dborun("UPDATE markets SET deleted=true WHERE name='bitfinex'"); - foreach ($list as $pair) { - if (strpos($pair, 'usd') || !strpos($pair, 'btc')) continue; - $symbol = strtoupper(str_replace('btc', '', $pair)); - updateRawCoin('bitfinex', $symbol); - } - } - } - - if (!exchange_get('bitz', 'disabled')) { - $list = bitz_api_query('tickerall'); - if (!empty($list)) { - dborun("UPDATE markets SET deleted=true WHERE name='bitz'"); - foreach($list as $c => $ticker) { - $e = explode('_', $c); - if (strtoupper($e[1]) !== 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('bitz', $symbol); - } - } - } - - if (!exchange_get('bleutrade', 'disabled')) { - $list = bleutrade_api_query('public/getcurrencies'); - if(isset($list->result) && !empty($list->result)) - { - dborun("UPDATE markets SET deleted=true WHERE name='bleutrade'"); - foreach($list->result as $currency) { - if ($currency->Currency == 'BTC') { - exchange_set('bleutrade', 'withdraw_fee_btc', $currency->TxFee); - continue; - } - updateRawCoin('bleutrade', $currency->Currency, $currency->CurrencyLong); - } - } - } - - if (!exchange_get('coinbene', 'disabled')) { - $data = coinbene_api_query('market/symbol'); - $list = objSafeVal($data, 'symbol'); - if(is_array($list) && !empty($list)) { - dborun("UPDATE markets SET deleted=true WHERE name='coinbene'"); - foreach($list as $ticker) { - if ($ticker->quoteAsset != 'BTC') continue; - $symbol = $ticker->baseAsset; - updateRawCoin('coinbene', $symbol); - } - } - } - - if (!exchange_get('crex24', 'disabled')) { - $list = crex24_api_query('currencies'); - if(is_array($list) && !empty($list)) { - dborun("UPDATE markets SET deleted=true WHERE name='crex24'"); - foreach ($list as $currency) { - $symbol = objSafeVal($currency, 'symbol'); - $name = objSafeVal($currency, 'name'); - if ($currency->isFiat || $currency->isDelisted) continue; - updateRawCoin('crex24', $symbol, $name); - } - } - } - - if (!exchange_get('poloniex', 'disabled')) { - $poloniex = new poloniex; - $tickers = $poloniex->get_currencies(); - if (!$tickers) - $tickers = array(); - else - dborun("UPDATE markets SET deleted=true WHERE name='poloniex'"); - foreach($tickers as $symbol=>$ticker) - { - if(arraySafeVal($ticker,'disabled')) continue; - if(arraySafeVal($ticker,'delisted')) continue; - updateRawCoin('poloniex', $symbol); - } - } - - if (!exchange_get('c-cex', 'disabled')) { - $ccex = new CcexAPI; - $list = $ccex->getPairs(); - if($list) - { - sleep(1); - $names = $ccex->getCoinNames(); - - dborun("UPDATE markets SET deleted=true WHERE name='c-cex'"); - foreach($list as $item) - { - $e = explode('-', $item); - $symbol = strtoupper($e[0]); - - updateRawCoin('c-cex', $symbol, arraySafeVal($names, $e[0], 'unknown')); - } - } - } - - if (!exchange_get('bter', 'disabled')) { - $list = bter_api_query('marketlist'); - if(is_object($list) && is_array($list->data)) - { - dborun("UPDATE markets SET deleted=true WHERE name='bter'"); - foreach($list->data as $item) { - if (strtoupper($item->curr_b) !== 'BTC') - continue; - if (strpos($item->name, 'Asset') !== false) - continue; - if (strpos($item->name, 'BitShares') !== false && $item->symbol != 'BTS') - continue; - // ignore some dead coins and assets - if (in_array($item->symbol, array('BITGLD','DICE','ROX','TOKEN'))) - continue; - updateRawCoin('bter', $item->symbol, $item->name); - } - } - } - - if (!exchange_get('yobit', 'disabled')) { - $res = yobit_api_query('info'); - if($res) - { - dborun("UPDATE markets SET deleted=true WHERE name='yobit'"); - foreach($res->pairs as $i=>$item) - { - $e = explode('_', $i); - $symbol = strtoupper($e[0]); - updateRawCoin('yobit', $symbol); - } - } - } - - if (!exchange_get('coinexchange', 'disabled')) { - $list = coinexchange_api_query('getmarkets'); - if(isset($list->result) && !empty($list->result)) - { - dborun("UPDATE markets SET deleted=true WHERE name='coinexchange'"); - foreach($list->result as $item) { - if ($item->BaseCurrencyCode != 'BTC') - continue; - $symbol = $item->MarketAssetCode; - $label = objSafeVal($item, 'MarketAssetName'); - updateRawCoin('coinexchange', $symbol, $label); - } - } - } - - if (!exchange_get('coinsmarkets', 'disabled')) { - $list = coinsmarkets_api_query('apicoin'); - if(!empty($list) && is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='coinsmarkets'"); - foreach($list as $pair=>$data) { - $e = explode('_', $pair); - if ($e[0] != 'BTC') continue; - $symbol = strtoupper($e[1]); - updateRawCoin('coinsmarkets', $symbol); - } - } - } - - if (!exchange_get('cryptopia', 'disabled')) { - $list = cryptopia_api_query('GetMarkets'); - if(isset($list->Data)) - { - dborun("UPDATE markets SET deleted=true WHERE name='cryptopia'"); - foreach($list->Data as $item) { - $e = explode('/', $item->Label); - if (strtoupper($e[1]) !== 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('cryptopia', $symbol); - } - } - } - - if (!exchange_get('cryptobridge', 'disabled')) { - $list = cryptobridge_api_query('ticker'); - if(is_array($list) && !empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='cryptobridge'"); - foreach($list as $ticker) { - $e = explode('_', $ticker->id); - if (strtoupper($e[1]) !== 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('cryptobridge', $symbol); - } - } - } - - if (!exchange_get('escodex', 'disabled')) { - $list = escodex_api_query('ticker'); - if(is_array($list) && !empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='escodex'"); - foreach($list as $ticker) { - #debuglog (json_encode($ticker)); - if (strtoupper($ticker->base) !== 'BTC') - continue; - $symbol = strtoupper($ticker->quote); - updateRawCoin('escodex', $symbol); - } - } - } - - if (!exchange_get('hitbtc', 'disabled')) { - $list = hitbtc_api_query('symbols'); - if(is_object($list) && isset($list->symbols) && is_array($list->symbols)) - { - dborun("UPDATE markets SET deleted=true WHERE name='hitbtc'"); - foreach($list->symbols as $data) { - $base = strtoupper($data->currency); - if ($base != 'BTC') continue; - $symbol = strtoupper($data->commodity); - updateRawCoin('hitbtc', $symbol); - } - } - } - - if (!exchange_get('kraken', 'disabled')) { - $list = kraken_api_query('AssetPairs'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='kraken'"); - foreach($list as $pair => $item) { - $pairs = explode('-', $pair); - $base = reset($pairs); $symbol = end($pairs); - if($symbol == 'BTC' || $base != 'BTC') continue; - if(in_array($symbol, array('GBP','CAD','EUR','USD','JPY'))) continue; - if(strpos($symbol,'.d') !== false) continue; - $symbol = strtoupper($symbol); - updateRawCoin('kraken', $symbol); - } - } - } - - if (!exchange_get('alcurex', 'disabled')) { - $list = alcurex_api_query('market','?info=on'); - if(is_object($list) && isset($list->MARKETS)) - { - dborun("UPDATE markets SET deleted=true WHERE name='alcurex'"); - foreach($list->MARKETS as $item) { - $e = explode('_', $item->Pair); - $symbol = strtoupper($e[0]); - updateRawCoin('alcurex', $symbol); - } - } - } - - if (!exchange_get('binance', 'disabled')) { - $list = binance_api_query('ticker/allBookTickers'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='binance'"); - foreach($list as $ticker) { - $base = substr($ticker->symbol, -3, 3); - // XXXBTC XXXETH BTCUSDT (no separator!) - if ($base != 'BTC') continue; - $symbol = substr($ticker->symbol, 0, strlen($ticker->symbol)-3); - updateRawCoin('binance', $symbol); - } - } - } - - if (!exchange_get('gateio', 'disabled')) { - $json = gateio_api_query('marketlist'); - $list = arraySafeVal($json,'data'); - if(!empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='gateio'"); - foreach($list as $item) { - if ($item['curr_b'] != 'BTC') - continue; - $symbol = trim(strtoupper($item['symbol'])); - $name = trim($item['name']); - updateRawCoin('gateio', $symbol, $name); - } - } - } - - if (!exchange_get('nova', 'disabled')) { - $list = nova_api_query('markets'); - if(is_object($list) && !empty($list->markets)) - { - dborun("UPDATE markets SET deleted=true WHERE name='nova'"); - foreach($list->markets as $item) { - if ($item->basecurrency != 'BTC') - continue; - $symbol = strtoupper($item->currency); - updateRawCoin('nova', $symbol); - //debuglog("nova: $symbol"); - } - } - } - - if (!exchange_get('stocksexchange', 'disabled')) { - $list = stocksexchange_api_query('markets'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='stocksexchange'"); - foreach($list as $item) { - if ($item->partner != 'BTC') - continue; - if ($item->active == false) - continue; - $symbol = strtoupper($item->currency); - $name = trim($item->currency_long); - updateRawCoin('stocksexchange', $symbol, $name); - } - } - } - - if (!exchange_get('empoex', 'disabled')) { - $list = empoex_api_query('marketinfo'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='empoex'"); - foreach($list as $item) { - $e = explode('-', $item->pairname); - $base = strtoupper($e[1]); - if ($base != 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('empoex', $symbol); - } - } - } - - if (!exchange_get('kucoin', 'disabled')) { - $list = kucoin_api_query('currencies'); - if(kucoin_result_valid($list) && !empty($list->data)) - { - dborun("UPDATE markets SET deleted=true WHERE name='kucoin'"); - foreach($list->data as $item) { - $symbol = $item->name; - $name = $item->fullName; - updateRawCoin('kucoin', $symbol, $name); - } - } - } - - if (!exchange_get('livecoin', 'disabled')) { - $list = livecoin_api_query('exchange/ticker'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='livecoin'"); - foreach($list as $item) { - $e = explode('/', $item->symbol); - $base = strtoupper($e[1]); - if ($base != 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('livecoin', $symbol); - } - } - } - - if (!exchange_get('shapeshift', 'disabled')) { - $list = shapeshift_api_query('getcoins'); - if(is_array($list) && !empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='shapeshift'"); - foreach($list as $item) { - $status = $item['status']; - if ($status != 'available') continue; - $symbol = strtoupper($item['symbol']); - $name = trim($item['name']); - updateRawCoin('shapeshift', $symbol, $name); - //debuglog("shapeshift: $symbol $name"); - } - } - } - - if (!exchange_get('tradeogre', 'disabled')) { - $list = tradeogre_api_query('markets'); - if(is_array($list) && !empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='tradeogre'"); - foreach($list as $ticker) { - $symbol_index = key($ticker); - $e = explode('-', $symbol_index); - if (strtoupper($e[0]) !== 'BTC') - continue; - $symbol = strtoupper($e[1]); - updateRawCoin('tradeogre', $symbol); - } - } - } - - if (!exchange_get('tradesatoshi', 'disabled')) { - $data = tradesatoshi_api_query('getcurrencies'); - if(is_object($data) && !empty($data->result)) - { - dborun("UPDATE markets SET deleted=true WHERE name='tradesatoshi'"); - foreach($data->result as $item) { - $symbol = $item->currency; - $name = trim($item->currencyLong); - updateRawCoin('tradesatoshi', $symbol, $name); - } - } - } - - ////////////////////////////////////////////////////////// - - $markets = dbocolumn("SELECT DISTINCT name FROM markets"); - foreach ($markets as $exchange) { - if (exchange_get($exchange, 'disabled')) { - $res = dborun("UPDATE markets SET disabled=8 WHERE name='$exchange'"); - if(!$res) continue; - $coins = getdbolist('db_coins', "id IN (SELECT coinid FROM markets WHERE name='$exchange')"); - foreach($coins as $coin) { - // allow to track a single market on a disabled exchange (dev test) - if (market_get($exchange, $coin->getOfficialSymbol(), 'disabled', 1) == 0) { - $res -= dborun("UPDATE markets SET disabled=0 WHERE name='$exchange' AND coinid={$coin->id}"); - } - } - debuglog("$exchange: $res markets disabled from db settings"); - } else { - $res = dborun("UPDATE markets SET disabled=0 WHERE name='$exchange' AND disabled=8"); - if($res) debuglog("$exchange: $res markets re-enabled from db settings"); - } - } - - dborun("DELETE FROM markets WHERE deleted"); - - $list = getdbolist('db_coins', "not enable and not installed and id not in (select distinct coinid from markets)"); - foreach($list as $coin) - { - if ($coin->visible) - debuglog("{$coin->symbol} is no longer active"); - // todo: proper cleanup in all tables (like "yiimp coin SYM delete") - // if ($coin->symbol != 'BTC') - // $coin->delete(); - } -} - -function updateRawCoin($marketname, $symbol, $name='unknown') -{ - if($symbol == 'BTC') return; - - // Restrict $symbol and $name to strict defined set of characters (to protect from rogue exchange or DNS attack on exchange) - if (preg_match('/[^A-Za-z0-9_\$]/', $symbol)) { - debuglog("weird symbol $symbol from $marketname"); - return; - } - if (preg_match('/[^A-Za-z0-9_\$ ]/', $name)) { - debuglog("weird name $name for symbol $symbol from $marketname"); - return; - } - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if(!$coin && YAAMP_CREATE_NEW_COINS) - { - $algo = ''; - if ($marketname == 'cryptopia') { - // get coin label and algo (different api) - $labels = cryptopia_api_query('GetCurrencies'); - if (is_object($labels) && !empty($labels->Data)) { - foreach ($labels->Data as $coin) { - if ($coin->Symbol == $symbol) { - $name = $coin->Name; - $algo = strtolower($coin->Algorithm); - if ($algo == 'scrypt') $algo = ''; // cryptopia default generally wrong - break; - } - } - } - } - - if (in_array($marketname, array('nova','askcoin','binance','bitfinex','bitz','coinexchange','coinsmarkets','cryptobridge','hitbtc'))) { - // don't polute too much the db with new coins, its better from exchanges with labels - return; - } - - // some other to ignore... - if (in_array($marketname, array('crex24','escodex','yobit','coinbene','kucoin','tradesatoshi'))) - return; - - if (market_get($marketname, $symbol, "disabled")) { - return; - } - - debuglog("new coin $marketname $symbol $name"); - - $coin = new db_coins; - $coin->txmessage = true; - $coin->hassubmitblock = true; - $coin->name = $name; - $coin->algo = $algo; - $coin->symbol = $symbol; - $coin->created = time(); - $coin->save(); - - $url = getMarketUrl($coin, $marketname); - if (YAAMP_NOTIFY_NEW_COINS) - mail(YAAMP_ADMIN_EMAIL, "New coin $symbol", "new coin $symbol ($name) on $marketname\r\n\r\n$url"); - sleep(30); - } - - else if($coin && $coin->name == 'unknown' && $name != 'unknown') - { - $coin->name = $name; - $coin->save(); - } - - $list = getdbolist('db_coins', "symbol=:symbol or symbol2=:symbol", array(':symbol'=>$symbol)); - foreach($list as $coin) - { - $market = getdbosql('db_markets', "coinid=$coin->id and name='$marketname'"); - if(!$market) - { - $market = new db_markets; - $market->coinid = $coin->id; - $market->name = $marketname; - } - - $market->deleted = false; - $market->save(); - } - -} diff --git a/web/yaamp/core/backend/services.php.bak b/web/yaamp/core/backend/services.php.bak deleted file mode 100644 index 72ab645ea..000000000 --- a/web/yaamp/core/backend/services.php.bak +++ /dev/null @@ -1,242 +0,0 @@ -'scrypt', - 1=>'sha256', - 2=>'scryptn', - 3=>'x11', - 4=>'x13', - 5=>'keccak', - 6=>'x15', - 7=>'nist5', - 8=>'neoscrypt', - 9=>'lyra2', - 10=>'whirlx', - 11=>'qubit', - 12=>'quark', - // 13=>'Axiom', - 14=>'lyra2v2', // 14 = Lyra2REv2 - // 15=>'ScryptJaneNf16', // 15 = ScryptJaneNf16 - 16=>'blakecoin', // 16 = Blake256r8 - // 17=>'Blake256r14', - // 18=>'Blake256r8vnl', - // 19=>'Hodl', - // 20=>'DaggerHashimoto', - // 21=>'Decred', - // 22=>'CryptoNight', - 23=>'lbry', - 24=>'equihash', - // 25=>'Pascal', - 26=>'sib', // X11Gost - // 27=>'Sia', - 28=>'blake2s', - 29=>'skunk', - 30=>'lyra2v3', - ); - - $res = fetch_url('https://api.nicehash.com/api?method=stats.global.current'); - if(!$res) return; - - $a = json_decode($res); - if(!$a || !isset($a->result)) return; - - foreach($a->result->stats as $stat) - { - if($stat->price <= 0) continue; - if(!isset($table[$stat->algo])) continue; - $algo = $table[$stat->algo]; - - $service = getdbosql('db_services', "name='Nicehash' and algo=:algo", array(':algo'=>$algo)); - if(!$service) - { - $service = new db_services; - $service->name = 'Nicehash'; - $service->algo = $algo; - } - - $service->price = $stat->price/1000; - $service->speed = $stat->speed*1000000000; - $service->save(); - - $list = getdbolist('db_jobs', "percent>0 and algo=:algo and (host='stratum.westhash.com' or host='stratum.nicehash.com')", array(':algo'=>$algo)); - foreach($list as $job) - { - $job->price = round($service->price*1000*(100-$job->percent)/100, 2); - $job->save(); - } - } - - $list = getdbolist('db_renters', "custom_address is not null and custom_server is not null"); - foreach($list as $renter) - { - $res = fetch_url("https://$renter->custom_server/api?method=stats.provider&addr=$renter->custom_address"); - if(!$res) continue; - - $renter->custom_balance = 0; - $renter->custom_accept = 0; - $renter->custom_reject = 0; - - $a = json_decode($res); - foreach($a->result->stats as $stat) - { - if(!isset($table[$stat->algo])) continue; - $algo = $table[$stat->algo]; - - $renter->custom_balance += $stat->balance; - $renter->custom_accept += $stat->accepted_speed*1000000000; - } - - $renter->save(); - } - - /////////////////////////////////////////////////////////////////////////// - - // renting from nicehash - if (YAAMP_USE_NICEHASH_API != true) - return; - - $apikey = NICEHASH_API_KEY; - $apiid = NICEHASH_API_ID; - - $deposit = NICEHASH_DEPOSIT; - $amount = NICEHASH_DEPOSIT_AMOUNT; - - $res = fetch_url("https://api.nicehash.com/api?method=balance&id=$apiid&key=$apikey"); - debuglog($res); - - $a = json_decode($res); - $balance = $a->result->balance_confirmed; - - foreach($table as $i=>$algo) - { - $nicehash = getdbosql('db_nicehash', "algo=:algo", array(':algo'=>$algo)); - if(!$nicehash) - { - $nicehash = new db_nicehash; - $nicehash->active = false; - $nicehash->algo = $algo; - } - - if(!$nicehash->active) - { - if($nicehash->orderid) - { - $res = fetch_url("https://api.nicehash.com/api?method=orders.remove&id=$apiid&key=$apikey&location=0&algo=$i&order=$nicehash->orderid"); - debuglog($res); - - $nicehash->orderid = null; - } - - $nicehash->btc = null; - $nicehash->price = null; - $nicehash->speed = null; - $nicehash->last_decrease = null; - - $nicehash->save(); - continue; - } - - $price = dboscalar("select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $minprice = $price*0.5; - $setprice = $price*0.7; - $maxprice = $price*0.9; - $cancelprice = $price*1.1; - - $res = fetch_url("https://api.nicehash.com/api?method=orders.get&my&id=$apiid&key=$apikey&location=0&algo=$i"); - if(!$res) break; - - $a = json_decode($res); - if(count($a->result->orders) == 0) - { - if($balance < $amount) continue; - $port = getAlgoPort($algo); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.create&id=$apiid&key=$apikey&location=0&algo=$i&amount=$amount&price=$setprice&limit=0&pool_host=yaamp.com&pool_port=$port&pool_user=$deposit&pool_pass=xx"); - debuglog($res); - - $nicehash->last_decrease = time(); - $nicehash->save(); - - continue; - } - - $order = $a->result->orders[0]; - debuglog("$algo $order->price $minprice $setprice $maxprice $cancelprice"); - - $nicehash->orderid = $order->id; - $nicehash->btc = $order->btc_avail; - $nicehash->workers = $order->workers; - $nicehash->price = $order->price; - $nicehash->speed = $order->limit_speed; - $nicehash->accepted = $order->accepted_speed; - - if($order->price > $cancelprice && $order->workers > 0) - { - debuglog("* cancel order $algo"); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.remove&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id"); - debuglog($res); - } - - else if($order->price > $maxprice && $order->limit_speed == 0) - { - debuglog("* decrease speed $algo"); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.set.limit&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&limit=0.05"); - debuglog($res); - } - - else if($order->price > $maxprice && $nicehash->last_decrease+10*60 < time()) - { - debuglog("* decrease price $algo"); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.set.price.decrease&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id"); - debuglog($res); - - $nicehash->last_decrease = time(); - } - - else if($order->price < $minprice && $order->workers <= 0) - { - debuglog("* increase price $algo"); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.set.price&id=$apiid&key=$apikey&algo=$i&location=0&order=$order->id&price=$setprice"); - debuglog($res); - } - - else if($order->price < $maxprice && $order->limit_speed == 0.05) - { - debuglog("* increase speed $algo"); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.set.limit&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&limit=0"); - debuglog($res); - } - - else if($order->btc_avail < 0.00075000) - { - debuglog("* refilling order $order->id"); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.refill&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&amount=0.01"); - debuglog($res); - } - - $nicehash->save(); - } - -} - - - - - - - - diff --git a/web/yaamp/core/backend/system.php.bak b/web/yaamp/core/backend/system.php.bak deleted file mode 100644 index b70da2ce9..000000000 --- a/web/yaamp/core/backend/system.php.bak +++ /dev/null @@ -1,355 +0,0 @@ - $filename"); - shell_exec("$ziptool $filename &"); // compress then the .sql in background (db is no more locked) - } else { - // previous method (ok on small pools) - system("mysqldump -h $host -u$user -p$pass --skip-extended-insert $db | $ziptool > $filename$ext"); - } -} - -function BackendQuickClean() -{ - $coins = getdbolist('db_coins', "installed"); - - foreach($coins as $coin) - { - $delay = time() - 7*24*60*60; - - $id = dboscalar("select id from blocks where coin_id=$coin->id and time<$delay and - id not in (select blockid from earnings where coinid=$coin->id) - order by id desc limit 200, 1"); - - if($id) dborun("delete from blocks where coin_id=$coin->id and time<$delay and - id not in (select blockid from earnings where coinid=$coin->id) and id<$id"); - } - - dborun("delete from earnings where blockid in (select id from blocks where category='orphan')"); - dborun("delete from earnings where blockid not in (select id from blocks)"); - dborun("UPDATE blocks SET amount=0 WHERE category='orphan' AND amount>0"); -} - -function marketHistoryPrune($symbol="") -{ - $delay2M = settings_get("history_prune_delay", time() - 61*24*60*60); // 2 months - dborun("DELETE FROM market_history WHERE time < ".intval($delay2M)); - - // Prune records older than 1 week, one max per hour - $delay7D = time() - 7*24*60*60; - $sqlFilter = (!empty($symbol)) ? "AND C.symbol='$symbol'" : ''; - $prune = dbolist("SELECT idcoin, idmarket, - AVG(MH.price) AS price, AVG(MH.price2) AS price2, MAX(MH.balance) AS balance, - MIN(MH.id) AS firstid, COUNT(MH.id) AS nbrecords, (MH.time DIV 3600) AS ival - FROM market_history MH - INNER JOIN coins C ON C.id = MH.idcoin - WHERE MH.time < $delay7D $sqlFilter - GROUP BY MH.idcoin, MH.idmarket, ival - HAVING nbrecords > 1"); - - $nbDel = 0; $nbUpd = 0; - foreach ($prune as $row) { - if (empty($row['idmarket'])) - $sqlFilter = "idcoin=:idcoin AND idmarket IS NULL"; - else - $sqlFilter = "idcoin=:idcoin AND idmarket=".intval($row['idmarket']); - - $nbDel += dborun("DELETE FROM market_history WHERE $sqlFilter AND id != :firstid - AND (time DIV 3600) = :interval", array( - ':idcoin' => $row['idcoin'], - ':interval'=> $row['ival'], - ':firstid' => $row['firstid'], - )); - - $nbUpd += dborun("UPDATE market_history SET time=:interval, - balance=:balance, price=:price, price2=:price2 - WHERE id=:firstid", array( - ':interval' => (3600 * $row['ival']), - ':balance' => $row['balance'], - ':price' => $row['price'], ':price2' => $row['price2'], - ':firstid' => $row['firstid'], - )); - } - if ($nbDel) debuglog("history: $nbDel records pruned, $nbUpd updated $symbol"); -} - -function consolidateOldShares() -{ - $delay = time() - 24*60*60; // drop invalid shares not used anymore (24h graph only) - dborun("DELETE FROM shares WHERE time < $delay AND valid = 0"); - - $t1 = time() - 48*3600; - $list = dbolist("SELECT coinid, userid, workerid, algo, AVG(time) AS time, SUM(difficulty) AS difficulty, AVG(share_diff) AS share_diff ". - "FROM shares WHERE valid AND time < $t1 AND pid > 0 ". - "GROUP BY coinid, userid, workerid, algo ORDER BY coinid, userid"); - $pruned = 0; - foreach ($list as $row) { - $share = new db_shares; - $share->isNewRecord = true; - $share->coinid = $row['coinid']; - $share->userid = $row['userid']; - $share->workerid = $row['workerid']; - $share->algo = $row['algo']; - $share->time = (int) $row['time']; - $share->difficulty = $row['difficulty']; - $share->share_diff = $row['share_diff']; - $share->valid = 1; - $share->pid = 0; - if ($share->save()) { - $pruned += dborun("DELETE FROM shares WHERE userid=:userid AND coinid=:coinid AND workerid=:worker AND pid > 0 AND time < $t1", array( - ':userid' => $row['userid'], - ':coinid' => $row['coinid'], - ':worker' => $row['workerid'], - )); - } - } - if ($pruned) { - debuglog("$pruned old shares records were consolidated"); - } - return $pruned; -} - -function BackendCleanDatabase() -{ - marketHistoryPrune(); - - $delay = time() - 60*24*60*60; - dborun("DELETE from blocks where time<$delay"); - dborun("delete from hashstats where time<$delay"); - dborun("delete from payouts where time<$delay"); - dborun("delete from rentertxs where time<$delay"); - dborun("DELETE FROM shares WHERE time<$delay"); - - $delay = time() - 2*24*60*60; - dborun("delete from stats where time<$delay"); - dborun("delete from hashrate where time<$delay"); - dborun("delete from hashuser where time<$delay"); - dborun("delete from hashrenter where time<$delay"); - dborun("delete from balanceuser where time<$delay"); - dborun("delete from exchange where send_time<$delay"); - dborun("DELETE FROM shares WHERE time<$delay AND coinid NOT IN (select id from coins)"); - - consolidateOldShares(); - - $delay = time() - 12*60*60; - dborun("delete from earnings where status=2 and mature_time<$delay"); -} - -function BackendOptimizeTables() -{ - $list = dbolist("show tables"); - foreach($list as $item) - { - $tablename = $item['Tables_in_yaamp']; - dbolist("optimize table $tablename"); - - sleep(1); - } -} - -function BackendProcessList() -{ - $list = dbolist("show processlist"); - foreach($list as $item) - { - $conn = getdbo('db_connections', $item['Id']); - if(!$conn) - { - $conn = new db_connections; - $conn->id = $item['Id']; - $conn->user = $item['User']; - $conn->host = $item['Host']; - $conn->db = $item['db']; - $conn->created = time(); - } - - $conn->idle = $item['Time']; - $conn->last = time(); - - $conn->save(); - } - - $delay = time() - 5*60; - dborun("delete from connections where last<$delay"); -} - -function BackendRunCoinActions() -{ -// debuglog(__FUNCTION__); - -// $hostname = exec("hostname"); -// $server = getdbosql('db_servers', "name='$hostname'"); -// if(!$server) -// { -// $server = new db_servers; -// $server->name = $hostname; -// } - -// $server->uptime = exec("uptime"); -// $server->save(); - - ////////////////////////////////////////////////////////////////////////// - -// if($hostname == 'yaamp') -// { -// $mining = getdbosql('db_mining'); -// exec("pgrep stratum", $ids, $ret); - -// $mining->stratumids = implode(',', $ids); -// $mining->save(); -// } - - ///////////////////////////////////////////////////////////////////////////////////////////////// - -// $coins = getdbolist('db_coins'); -// foreach($coins as $coin) -// { -// if(empty($coin->action) || empty($coin->program) || empty($coin->conf_folder)) continue; -// $hostname = exec("hostname"); -// if($hostname != $coin->rpchost) continue; -// switch($coin->action) -// { -// case 1: -// debuglog("starting $coin->program"); - -// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; -// @unlink($debugfile); - -// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); -// $coin->enable = true; -// break; - -// case 2: -// debuglog("stopping $coin->program"); -// exec(YAAMP_BIN."/$coin->program stop"); -// break; - -// case 4: -// debuglog("restarting $coin->program"); -// exec(YAAMP_BIN."/$coin->program stop"); -// sleep(10); - -// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; -// @unlink($debugfile); - -// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); -// $coin->enable = true; -// break; - -// case 3: -// debuglog("reset blockchain $coin->conf_folder"); -// $folder = YAAMP_WALLETS."/$coin->conf_folder"; - -// // exec("rm {$folder}/blk*.dat"); -// exec("rm -fr {$folder}/database"); -// break; - -// case 5: -// $t = time(); -// $coin->rpcport = $coin->id*2+10240; -// $coin->rpcuser = 'yaamprpc'; -// $coin->rpcpasswd = md5("$t.$coin->id"); -// $coin->save(); - -// $configfile = YAAMP_WALLETS."/$coin->conf_folder/".substr($coin->conf_folder, 1).".conf"; -// debuglog("make config $configfile"); - -// $stratum_port = 3433; - -// if($coin->algo == 'sha256') -// $stratum_port = 3333; - -// else if($coin->algo == 'scrypt') -// $stratum_port = 3433; - -// else if($coin->algo == 'x11') -// $stratum_port = 3533; - -// else if($coin->algo == 'x13') -// $stratum_port = 3633; - -// else if($coin->algo == 'x14') -// $stratum_port = 3933; - -// else if($coin->algo == 'x15') -// $stratum_port = 3733; - -// else if($coin->algo == 'nist5') -// $stratum_port = 3833; - -// else if($coin->algo == 'quark') -// $stratum_port = 4033; - -// else if($coin->algo == 'fresh') -// $stratum_port = 4133; - -// else if($coin->algo == 'neoscrypt') -// $stratum_port = 4233; - -// else if($coin->algo == 'scryptn') -// $stratum_port = 4333; - -// else if($coin->algo == 'lyra2') -// $stratum_port = 4433; - -// else if($coin->algo == 'blake') -// $stratum_port = 4533; - -// // else if($coin->algo == 'keccak') -// // $stratum_port = 3933; - -// $data = "server=1\ndeamon=1\ngen=0\nrpcuser=$coin->rpcuser\nrpcpassword=$coin->rpcpasswd\nrpcport=$coin->rpcport\nrpcallowip=10.*.*.*\nblocknotify=".YAAMP_BIN."/blocknotify.sh --host yaamp --port $stratum_port --id $coin->id --block %s --password tu8tu5\n"; -// file_put_contents($configfile, $data); - -// debuglog("starting $coin->program"); - -// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; -// @unlink($debugfile); - -// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); -// $coin->enable = true; - -// break; -// } - -// $coin->action = null; -// $coin->save(); -// } - -// $filename = '/root/stratum/stratum.log'; -// $filesize = filesize($filename); - -// $oldsize = controller()->memcache->get('stratum_log_size'); -// if($oldsize == $filesize) return; - -// $file = fopen($filename, $r); -// if(!$file) return; - -// fseek($file, $oldsize); -// $data = fread($file, $filesize-$oldsize); -// fclose($file); - -// controller()->memcache->set('stratum_log_size', $filesize); -// system("echo \"$data\" | mail -s \"yiimp server\" ".YAAMP_ADMIN_EMAIL); -} - diff --git a/web/yaamp/core/common/libUtil.php.bak b/web/yaamp/core/common/libUtil.php.bak deleted file mode 100644 index 126c516fc..000000000 --- a/web/yaamp/core/common/libUtil.php.bak +++ /dev/null @@ -1,311 +0,0 @@ -= 1) $text = $text.' ====================='; - error_log("$t, $d - $text"); - - $global_lastlog = $t; -} - -// - -function LimitRequest($name, $limit=1) -{ - $t = controller()->memcache->get("yaamp-timestamp-$name-{$_SERVER['REMOTE_ADDR']}"); - $a = controller()->memcache->get("yaamp-average-$name-{$_SERVER['REMOTE_ADDR']}"); - - if(!$a || !$t) $a = $limit; - - else - { - $p = 33; - $a = ($a * (100-$p) + (microtime(true)-$t) * $p) / 100; - } - - if($a < $limit) return false; - - controller()->memcache->set("yaamp-timestamp-$name-{$_SERVER['REMOTE_ADDR']}", microtime(true), 300); - controller()->memcache->set("yaamp-average-$name-{$_SERVER['REMOTE_ADDR']}", $a, 300); - - return true; -} - -function getuserparam($address) -{ - if(empty($address)) return null; - - $address = trim(substr($address, 0, 52)); - $user = getdbosql('db_accounts', "username=:ad", array(':ad'=>$address)); - - return $user; -} - -function getrenterparam($address) -{ - if(empty($address)) return null; - - $address = trim(substr($address, 0, 35)); - $renter = getdbosql('db_renters', "address=:ad", array(':ad'=>$address)); - - return $renter; -} - -/////////////////////////////////////////////////////////// - -function GetSSModulePath($name) -{ - $result = findfile('yaamp/models', "/\/{$name}.php/"); - if(!$result) - $result = findfile('yaamp/modules', "/\/{$name}.php/"); - -// debuglog($result); - return $result; -} - -function findfile($path, $pattern) -{ - $result = null; - - $path = rtrim(str_replace("\\", "/", $path), '/') . '/*'; - foreach(glob($path) as $fullname) - { - if(is_dir($fullname)) - { - $result = findfile($fullname, $pattern); - if($result) break; - } - - else if(preg_match($pattern, $fullname)) - { - $result = $fullname; - break; - } - } - - return $result; -} - -function mydump($obj, $level=2) -{ - CVarDumper::dump($obj, $level, true); - echo "
    "; -} - -function mydumperror($obj, $level=2) -{ - CVarDumper::dumperror($obj, $level); -} - -function debuglog($string, $level=2) -{ - if(is_object($string)) - { - mydumperror($string, $level); - return; - } - - if(is_array($string)) - { - mydumperror($string, $level); - return; - } - - $now = now(); - if(!is_dir(YAAMP_LOGS)) mkdir(YAAMP_LOGS); - error_log("[$now] $string\n", 3, YAAMP_LOGS."/debug.log"); -} - -function echolog($string, $level=2) -{ - $now = now(); - echo "[$now] $string\n"; -} - -function rentallog($string) -{ - $now = now(); - if(!is_dir(YAAMP_LOGS)) mkdir(YAAMP_LOGS); - error_log("[$now] $string\n", 3, YAAMP_LOGS."/rental.log"); - - debuglog($string); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -function xmltoarray($xmlcontent) -{ - $xml = simplexml_load_string($xmlcontent); - $json = json_encode($xml); - $array = json_decode($json, true); - - return $array; -} - -function XssFilter($data) -{ - $data = str_replace(">", "", $data); - $data = str_replace("<", "", $data); - $data = str_replace("'", "", $data); - $data = str_replace('"', "", $data); -// $data = str_replace(".", "", $data); - $data = str_replace("\\", "", $data); - $data = str_replace("&", "", $data); - $data = str_replace(";", "", $data); - -// mydump($data); die; - return $data; -} - -function showDatetimePicker($model, $attribute, $options='') -{ - $name = "{$model->tableSchema->name}[{$attribute}]"; - $id = "{$model->tableSchema->name}_{$attribute}"; - - echo ""; - - echo ""; -} - -function showDatetimePicker2($name, $value, $options='', $callback='null') -{ - $id = $name; - echo ""; - - if(empty($value)) $value = $name; - echo ""; -} - -function showSubmitButton($name) -{ - echo "
    "; - echo CUFHtml::submitButton($name, array('id'=>'btnSubmit')); - echo "
    "; - echo ""; -} - -function InitMenuTabs($tabname) -{ - JavascriptReady("$('$tabname').tabs({ select: function(event, ui){ - window.location.replace(ui.tab.hash); return true;}});"); -} - -function fetch_url($url) -{ -// debuglog("fetch_url($url)"); - $buffer = ''; - - $file = @fopen($url, "r"); - if(!$file) return null; - - while(!feof($file)) - { - $line = fgets($file, 1024); - $buffer .= $line; - } - - fclose($file); - return $buffer; -} - -function gettempfile($ext) -{ - $phpsessid = session_id(); - $random = mt_rand(); - - $filename = SANSSPACE_TEMP."\\{$phpsessid}-{$random}{$ext}"; - return $filename; -} - -function make_bitly_url($url, $format = 'xml', $version = '2.0.1') -{ - $login = 'o_1uu6u4g2h4'; - $appkey = 'R_433ebafeb24374d6c183c0fcbcc01575'; - - $bitly = 'http://api.bit.ly/shorten?version='.$version.'&longUrl='.urlencode($url).'&login='.$login.'&apiKey='.$appkey.'&format='.$format; - $response = file_get_contents($bitly); -// debuglog($response); - - if(strtolower($format) == 'json') - { - $json = @json_decode($response,true); - return $json['results'][$url]['shortUrl']; - } - else //xml - { - $xml = simplexml_load_string($response); - return 'bit.ly/'.$xml->results->nodeKeyVal->hash; - } -} - -function resolveShortURL($url1) -{ - $ch = curl_init("$url1"); - - curl_setopt($ch, CURLOPT_HEADER, true); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_ENCODING , "deflate,gzip"); - - $http_data = curl_exec($ch); - $curl_info = curl_getinfo($ch); - $headers = substr($http_data, 0, $curl_info["header_size"]); - - preg_match("!\r\n(?:Location|URI): *(.*?) *\r\n!", $headers, $matches); - $url = $matches[1]; - -// debuglog(" short $url1 -> $url"); - return empty($url)? $url1: $url; -} - -function is_short_url($url) -{ - // 1. Overall URL length - May be a max of 30 charecters - if (strlen($url) > 30) return false; - - $parts = parse_url($url); - - // No query string & no fragment - if ($parts["query"] || $parts["fragment"]) return false; - - $path = $parts["path"]; - $pathParts = explode("/", $path); - - // 3. Number of '/' after protocol (http://) - Max 2 - if (count($pathParts) > 2) return false; - - // 2. URL length after last '/' - May be a max of 10 characters - $lastPath = array_pop($pathParts); - if (strlen($lastPath) > 12) return false; - - // 4. Max length of host - if (strlen($parts["host"]) > 10) return false; - - return true; -} diff --git a/web/yaamp/core/exchange/exchange.php.bak b/web/yaamp/core/exchange/exchange.php.bak deleted file mode 100644 index b53f3371e..000000000 --- a/web/yaamp/core/exchange/exchange.php.bak +++ /dev/null @@ -1,161 +0,0 @@ -getOfficialSymbol(); - $lowsymbol = strtolower($symbol); - $base = 'BTC'; - - $market = trim($marketName); - if (strpos($marketName, ' ')) { - $parts = explode(' ',$marketName); - $market = $parts[0]; - $base = $parts[1]; - if (empty($base)) { - debuglog("warning: invalid market name '$marketName'"); - $base = dboscalar( - "SELECT base_coin FROM markets WHERE coinid=:id AND name=:name", array( - ':id'=>$coin->id, ':name'=>$marketName, - )); - } - } - - $lowbase = strtolower($base); - - if($market == 'cryptowatch') { - $exchange = 'poloniex'; // default for big altcoins - // and for most big btc fiat prices : - if(in_array($symbol, array('EUR','CAD','GBP'))) - $exchange = 'kraken'; - elseif(in_array($symbol, array('AUD','CNY','JPY'))) - $exchange = 'quoine'; - elseif(in_array($symbol, array('USD'))) - $exchange = 'bitfinex'; - } - - if($market == 'alcurex') - $url = "https://alcurex.com/#{$symbol}-{$base}"; - else if($market == 'binance') - $url = "https://www.binance.com/trade.html?symbol={$symbol}_{$base}"; - else if($market == 'bittrex') - $url = "https://bittrex.com/Market/Index?MarketName={$base}-{$symbol}"; - else if($market == 'bitz') - $url = "https://www.bit-z.com/exchange/{$symbol}_{$base}"; - else if($market == 'poloniex') - $url = "https://poloniex.com/exchange#{$lowbase}_{$lowsymbol}"; - else if($market == 'bleutrade') - $url = "https://bleutrade.com/exchange/{$symbol}/{$base}"; - else if($market == 'cexio') - $url = "https://cex.io/trade/{$symbol}-{$base}"; - else if($market == 'coinbene') - $url = "https://www.coinbene.com/#/market?pairId={$symbol}{$base}"; - else if($market == 'coinexchange') - $url = "https://www.coinexchange.io/market/{$symbol}/{$base}"; - else if($market == 'coinsmarkets') - $url = "https://coinsmarkets.com/trade-{$base}-{$symbol}.htm"; - else if($market == 'crex24') - $url = "https://crex24.com/exchange/{$symbol}-{$base}"; - else if($market == 'cryptobridge') - $url = "https://wallet.crypto-bridge.org/market/BRIDGE.{$symbol}_BRIDGE.{$base}"; - else if($market == 'cryptopia') - $url = "https://www.cryptopia.co.nz/Exchange?market={$symbol}_{$base}"; - else if($market == 'cryptowatch') - $url = "https://cryptowat.ch/{$exchange}/{$lowbase}{$lowsymbol}"; - else if($market == 'c-cex') - $url = "https://c-cex.com/?p={$lowsymbol}-{$lowbase}"; - else if($market == 'empoex') - $url = "http://www.empoex.com/trade/{$symbol}-{$base}"; - else if($market == 'escodex') - $url = "https://wallet.escodex.com/market/ESCODEX.{$symbol}_ESCODEX.{$base}"; - else if($market == 'gateio') - $url = "https://gate.io/trade/{$symbol}_{$base}"; - else if($market == 'graviex') - $url = "https://graviex.net/markets/{$lowsymbol}{$lowbase}"; - else if($market == 'jubi') - $url = "http://jubi.com/coin/{$lowsymbol}"; - else if($market == 'hitbtc') - $url = "https://hitbtc.com/exchange/{$symbol}-to-{$base}"; - else if($market == 'kucoin') - $url = "https://www.kucoin.com/trade/{$symbol}-{$base}"; - else if($market == 'livecoin') - $url = "https://www.livecoin.net/trade/?currencyPair={$symbol}%2F{$base}"; - else if($market == 'nova') - $url = "https://novaexchange.com/market/{$base}_{$symbol}/"; - else if($market == 'stocksexchange') - $url = "https://stocks.exchange/trade/$symbol/$base"; - else if($market == 'tradesatoshi') - $url = "https://tradesatoshi.com/Exchange?market={$symbol}_{$base}"; - else if($market == 'yobit') - $url = "https://yobit.net/en/trade/{$symbol}/{$base}"; - else - $url = ""; - - return $url; -} - -// $market can be a db_markets or a string (symbol) -function exchange_update_market($exchange, $market) -{ - $fn_update = str_replace('-','',$exchange.'_update_market'); - if (function_exists($fn_update)) { - return $fn_update($market); - } else { - debuglog(__FUNCTION__.': '.$fn_update.'() not implemented'); - user()->setFlash('error', $fn_update.'() not yet implemented'); - return false; - } -} - -// used to manually update one market price -function exchange_update_market_by_id($idmarket) -{ - $market = getdbo('db_markets', $idmarket); - if (!$market) return false; - - return exchange_update_market($market->name, $market); -} diff --git a/web/yaamp/core/exchange/kucoin.php.bak b/web/yaamp/core/exchange/kucoin.php.bak deleted file mode 100644 index 474846c84..000000000 --- a/web/yaamp/core/exchange/kucoin.php.bak +++ /dev/null @@ -1,162 +0,0 @@ -data)) return false; - return true; -} - -// https://openapi-v2.kucoin.com/api/v1/symbols?market=BTC -// https://openapi-v2.kucoin.com/api/v1/currencies for labels - -function kucoin_api_query($method, $params='', $returnType='object') -{ - $exchange = 'kucoin'; - $url = "https://openapi-v2.kucoin.com/api/v1/$method"; - if (!empty($params)) $url .= "?$params"; - - $ch = curl_init($url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); - curl_setopt($ch, CURLOPT_TIMEOUT, 30); - curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; KuCoin API PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); - curl_setopt($ch, CURLOPT_ENCODING , ''); - //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - - $res = curl_exec($ch); - if($res === false) { - $e = curl_error($ch); - debuglog("$exchange: $method $e"); - curl_close($ch); - return false; - } - - if ($returnType == 'object') - $ret = json_decode($res); - else - $ret = json_decode($res,true); - - if(!is_object($ret) && !is_array($ret)) { - $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); - debuglog("$exchange: $method failed ($status) ".strip_data($res)); - } - curl_close($ch); - return $ret; -} - -// https://openapi-v2.kucoin.com/api/v1/deposit-addresses?currency= - -function kucoin_api_user($method, $params=NULL, $isPostMethod=false) -{ - $exchange = 'kucoin'; - require_once('/etc/yiimp/keys.php'); - if (!defined('EXCH_KUCOIN_SECRET')) define('EXCH_KUCOIN_SECRET', ''); - - if (empty(EXCH_KUCOIN_KEY) || empty(EXCH_KUCOIN_SECRET)) return false; - if (empty(EXCH_KUCOIN_PASSPHRASE)) return false; - - $api_host = 'https://openapi-v2.kucoin.com'; - $mt = explode(' ', microtime()); - $nonce = $mt[1].substr($mt[0], 2, 3); - $url = $endpoint = "/api/v1/$method"; - - if (empty($params)) $params = array(); - $query = http_build_query($params); - $body = ""; - if ($isPostMethod) - $body = json_encode($params); - else if (strlen($query)) { - $body = '?'.$query; - $url .= $body; - } - - $req = $isPostMethod ? "POST" : "GET"; - $tosign = "{$nonce}{$req}{$endpoint}{$body}"; - $hmac = hash_hmac('sha256', $tosign, EXCH_KUCOIN_SECRET, true); - - $headers = array( - 'Content-Type: application/json;charset=UTF-8', - 'KC-API-KEY: '.EXCH_KUCOIN_KEY, - 'KC-API-PASSPHRASE: '.EXCH_KUCOIN_PASSPHRASE, - 'KC-API-TIMESTAMP: '.$nonce, - 'KC-API-SIGN: '.base64_encode($hmac), - ); - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $api_host.$url); - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - if ($isPostMethod) { - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $params); - } - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); - curl_setopt($ch, CURLOPT_TIMEOUT, 30); - curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; KuCoin API PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); - curl_setopt($ch, CURLOPT_ENCODING , ''); - //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - //curl_setopt($ch, CURLOPT_VERBOSE, 1); - - $res = curl_exec($ch); - if($res === false) { - $e = curl_error($ch); - debuglog("$exchange: $method $e"); - curl_close($ch); - return false; - } - - $result = json_decode($res); - if(!is_object($result) && !is_array($result)) { - $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); - debuglog("$exchange: $method failed ($status) ".strip_data($res)); - } - - curl_close($ch); - - return $result; -} - -////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -// manual update of one market -function kucoin_update_market($market) -{ - $exchange = 'kucoin'; - if (is_string($market)) - { - $symbol = $market; - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) return false; - $pair = $symbol.'-BTC'; - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); - if(!$market) return false; - - } else if (is_object($market)) { - - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) return false; - $symbol = $coin->getOfficialSymbol(); - $pair = $symbol.'-BTC'; - if (!empty($market->base_coin)) $pair = $symbol.'-'.$market->base_coin; - } - - $t1 = microtime(true); - $query = kucoin_api_query('market/orderbook/level1','symbol='.$pair); - if(!kucoin_result_valid($query)) return false; - $ticker = $query->data; - - $price2 = ((double) $ticker->bestBid + (double)$ticker->bestAsk)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bestBid); - $market->pricetime = min(time(), 0 + $ticker->sequence); - $market->save(); - - $apims = round((microtime(true) - $t1)*1000,3); - user()->setFlash('message', "$exchange $symbol price updated in $apims ms"); - - return true; -} diff --git a/web/yaamp/core/functions/yaamp.php.bak b/web/yaamp/core/functions/yaamp.php.bak deleted file mode 100644 index 950b5900d..000000000 --- a/web/yaamp/core/functions/yaamp.php.bak +++ /dev/null @@ -1,721 +0,0 @@ - 1.0, - 'argon2d-crds' => 1.0, - 'argon2d-dyn' => 1.0, - 'argon2m' => 1.0, - 'argon2d-uis' => 1.0, - 'blake' => 1.0, - 'keccak' => 1.0, - 'lyra2' => 1.0, - 'lyra2v2' => 1.0, - 'lyra2v3' => 1.0, - 'myr-gr' => 1.0, - 'neoscrypt' => 1.0, - 'nist5' => 1.0, - 'quark' => 1.0, - 'qubit' => 1.0, - 'scrypt' => 1.0, - 'scryptn' => 1.0, - 'sha256' => 1.0, - 'skein' => 1.0, - 'skein2' => 1.0, - 'velvet' => 1.0, - 'whirlpool' => 1.0, - 'x11' => 1.0, - 'x13' => 1.0, - 'yescrypt' => 1.0, - 'yescryptR8' => 1.0, - 'yescryptR16' => 1.0, - 'yescryptR32' => 1.0, - 'zr5' => 1.0, - ); - - if(!isset($a[$algo])) - return 1.0; - - return $a[$algo]; -} - -function getAlgoColors($algo) -{ - $a = array( - 'a5a' => '#f0f0f0', - 'aergo' => '#e0d0e0', - 'allium' => '#80a0d0', - 'argon2' => '#e0d0e0', - 'argon2d-crds' => '#e0d0e0', - 'argon2d-dyn' => '#e0d0e0', - 'argon2m' => '#e0d0e0', - 'argon2d-uis' => '#e0d0e0', - 'balloon' => '#e0b0b0', - 'bastion' => '#e0b0b0', - 'bcd' => '#ffd880', - 'binarium-v1' => '#f0f0f0', - 'bitcore' => '#f790c0', - 'blake' => '#f0f0f0', - 'blake2b' => '#f2c81f', - 'blakecoin' => '#f0f0f0', - 'bmw512' => '#f0f0f0', - 'cuckoo' => '#d0a0a0', - 'c11' => '#a0a0d0', - 'decred' => '#f0f0f0', - 'deep' => '#e0ffff', - 'dmd-gr' => '#a0c0f0', - 'exosis' => '#49CCFE', - 'geek' => '#d0a0a0', - 'groestl' => '#d0a0a0', - 'hex' => '#c0f0c0', - 'hmq1725' => '#ffa0a0', - 'honeycomb' => '#c0f0c0', - 'hsr' => '#aa70ff', - 'jha' => '#a0d0c0', - 'keccak' => '#c0f0c0', - 'keccakc' => '#c0f0c0', - 'lbk3' => '#809aef', - 'lbry' => '#b0d0e0', - 'luffa' => '#a0c0c0', - 'lyra2' => '#80a0f0', - 'lyra2v2' => '#80c0f0', - 'lyra2v3' => '#80a0f0', - 'lyra2z330' => '#80b0f0', - 'lyra2vc0ban' => '#80c0f0', - 'lyra2z' => '#80b0f0', - 'lyra2zz' => '#80b0f0', - 'm7m' => '#d0a0a0', - 'myr-gr' => '#a0c0f0', - 'neoscrypt' => '#a0d0f0', - 'nist5' => '#c0e0e0', - 'penta' => '#80c0c0', - 'phi' => '#a0a0e0', - 'phi2' => '#a0a0e0', - 'phi1612' => '#a0a0e0', - 'polytimos' => '#dedefe', - 'quark' => '#c0c0c0', - 'qubit' => '#d0a0f0', - 'rainforest' => '#d0f0a0', - 'rfv2' => '#d0f0a0', - 'renesis' => '#f0b0a0', - 'scrypt' => '#c0c0e0', - 'scryptn' => '#d0d0d0', - 'sha256' => '#d0d0a0', - 'sha256q' => '#9696dd', - 'sha256t' => '#d0d0f0', - 'sib' => '#a0a0c0', - 'skein' => '#80a0a0', - 'skein2' => '#c8a060', - 'skunk' => '#dedefe', - 'sonoa' => '#dedefe', - 'timetravel' => '#f0b0d0', - 'tribus' => '#c0d0d0', - 'vanilla' => '#f0f0f0', - 'velvet' => '#aac0cc', - 'vitalium' => '#f0b0a0', - 'whirlpool' => '#d0e0e0', - 'x11' => '#f0f0a0', - 'x11evo' => '#c0f0c0', - 'x12' => '#ffe090', - 'x13' => '#ffd880', - 'x14' => '#f0c080', - 'x15' => '#f0b080', - 'x16r' => '#f0b080', - 'x16rv2' => '#f0b080', - 'x16rt' => '#f0b080', - 'x16s' => '#f0b080', - 'x17' => '#f0b0a0', - 'x18' => '#f0b0a0', - 'x20r' => '#f0b0a0', - 'x21s' => '#f0b0a0', - 'x22i' => '#f0a090', - 'x25x' => '#f0a090', - 'xevan' => '#f0b0a0', - 'yescrypt' => '#e0d0e0', - 'yescryptR8' => '#e0d0e0', - 'yescryptR16' => '#e2d0e2', - 'yescryptR32' => '#e2d0d2', - 'yespower' => '#e2d0d2', - 'yespowerR8' => '#e2d0d2', - 'yespowerR16' => '#e2d0d2', - 'yespowerR24' => '#e2d0d2', - 'yespowerR32' => '#e2d0d2', - 'zr5' => '#d0b0d0', - - 'MN' => '#ffffff', // MasterNode Earnings - 'PoS' => '#ffffff' // Stake - ); - - if(!isset($a[$algo])) - return '#ffffff'; - - return $a[$algo]; -} - -function getAlgoPort($algo) -{ - $a = array( - 'a5a' => 8633, - 'aergo' => 3691, - 'allium' => 4443, - 'argon2' => 4235, - 'argon2d-crds' => 4238, - 'argon2d-dyn' => 4239, - 'argon2m' => 4234, - 'argon2d-uis' => 4240, - 'balloon' => 5100, - 'bastion' => 6433, - 'bcd' => 3643, - 'binarium-v1' => 6666, - 'bitcore' => 3556, - 'blake' => 5733, - 'blake2b' => 5777, - 'blake2s' => 5766, - 'blakecoin' => 5743, - 'bmw512' => 5787, - 'c11' => 3573, - 'decred' => 3252, - 'deep' => 3535, - 'dmd-gr' => 5333, - 'exosis' => 3557, - 'geek' => 3692, - 'hex' => 5135, - 'hmq1725' => 3747, - 'honeycomb' => 7777, - 'hsr' => 7433, - 'jha' => 4633, - 'keccak' => 5133, - 'keccakc' => 5134, - 'lbk3' => 5522, - 'lbry' => 3334, - 'luffa' => 5933, - 'lyra2' => 4432, - 'lyra2v2' => 4533, - 'lyra2v3' => 4433, - 'lyra2vc0ban' => 4563, - 'lyra2z' => 4553, - 'lyra2z330' => 4555, - 'lyra2zz' => 4556, - 'm7m' => 6033, - 'myr-gr' => 5433, - 'neoscrypt' => 4233, - 'nist5' => 3833, - 'penta' => 5833, - 'phi' => 8333, - 'phi2' => 8332, - 'phi1612' => 8334, - 'polytimos' => 8463, - 'quark' => 4033, - 'qubit' => 4733, - 'renesis' => 5252, - 'rainforest' => 7443, - 'rfv2' => 8443, - 'scrypt' => 3433, - 'scryptn' => 4333, - 'sha256' => 3333, - 'sha256q' => 3337, - 'sha256t' => 3339, - 'sib' => 5033, - 'skein' => 4933, - 'skein2' => 5233, - 'skunk' => 8433, - 'sonoa' => 8733, - 'timetravel' => 3555, - 'tribus' => 8533, - 'vanilla' => 5755, - 'veltor' => 5034, - 'velvet' => 6133, - 'vitalium' => 3233, - 'whirlpool' => 4133, - 'x11' => 3533, - 'x11evo' => 3553, - 'x12' => 3233, - 'x13' => 3633, - 'x14' => 3933, - 'x15' => 3733, - 'x16r' => 3636, - 'x16rv2' => 3637, - 'x16rt' => 7220, - 'x16s' => 3663, - 'x17' => 3737, - 'x18' => 3738, - 'x20r' => 4300, - 'x21s' => 3224, - 'x22i' => 3223, - 'x25x' => 5633, - 'xevan' => 3739, - 'yescrypt' => 6233, - 'yescryptR8' => 6353, - 'yescryptR16' => 6333, - 'yescryptR32' => 6343, - 'yespower' => 6234, - 'yespowerR8' => 6235, - 'yespowerR16' => 6236, - 'yespowerR24' => 6237, - 'yespowerR32' => 6238, - 'zr5' => 5533, - //'groestl' => 5333, - // 5555 to 5683 reserved - ); - - global $configCustomPorts; - if(isset($configCustomPorts[$algo])) - return $configCustomPorts[$algo]; - - if(!isset($a[$algo])) - return 3033; - - return $a[$algo]; -} - -//////////////////////////////////////////////////////////////////////// - -function yaamp_fee($algo) -{ - $fee = controller()->memcache->get("yaamp_fee-$algo"); - if($fee && is_numeric($fee)) return (float) $fee; - -/* $norm = yaamp_get_algo_norm($algo); - if($norm == 0) $norm = 1; - - $hashrate = getdbosql('db_hashrate', "algo=:algo order by time desc", array(':algo'=>$algo)); - if(!$hashrate || !$hashrate->difficulty) return 1; - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_coinonly-$algo", - "select sum(difficulty) * $target / $interval / 1000 from shares where valid and time>$delay and algo=:algo and jobid=0", array(':algo'=>$algo)); - -// $fee = round(log($hashrate->hashrate * $norm / 1000000 / $hashrate->difficulty + 1), 1) + YAAMP_FEES_MINING; -// $fee = round(log($rate * $norm / 2000000 / $hashrate->difficulty + 1), 1) + YAAMP_FEES_MINING; -*/ - $fee = YAAMP_FEES_MINING; - - // local fees config - global $configFixedPoolFees; - if (isset($configFixedPoolFees[$algo])) { - $fee = (float) $configFixedPoolFees[$algo]; - } - - controller()->memcache->set("yaamp_fee-$algo", $fee); - return $fee; -} - -function take_yaamp_fee($v, $algo, $percent=-1) -{ - if ($percent == -1) $percent = yaamp_fee($algo); - - return $v - ($v * $percent / 100.0); -} - -function yaamp_hashrate_constant($algo=null) -{ - return pow(2, 42); // 0x400 00000000 -} - -function yaamp_hashrate_step() -{ - return 300; -} - -function yaamp_profitability($coin) -{ - if(!$coin->difficulty) return 0; - - $btcmhd = 20116.56761169 / $coin->difficulty * $coin->reward * $coin->price; - if(!$coin->auxpow && $coin->rpcencoding == 'POW') - { - $listaux = getdbolist('db_coins', "enable and visible and auto_ready and auxpow and algo='$coin->algo'"); - foreach($listaux as $aux) - { - if(!$aux->difficulty) continue; - - $btcmhdaux = 20116.56761169 / $aux->difficulty * $aux->reward * $aux->price; - $btcmhd += $btcmhdaux; - } - } - - $algo_unit_factor = yaamp_algo_mBTC_factor($coin->algo); - return $btcmhd * $algo_unit_factor; -} - -function yaamp_convert_amount_user($coin, $amount, $user) -{ - $refcoin = getdbo('db_coins', $user->coinid); - $value = 0.; - if (YAAMP_ALLOW_EXCHANGE) { - if(!$refcoin) $refcoin = getdbosql('db_coins', "symbol='BTC'"); - if(!$refcoin || $refcoin->price <= 0) return 0; - $value = $amount * $coin->price / $refcoin->price; - } else if ($coin->price && $refcoin && $refcoin->price > 0.) { - $value = $amount * $coin->price / $refcoin->price; - } else if ($coin->id == $user->coinid) { - $value = $amount; - } - return $value; -} - -function yaamp_convert_earnings_user($user, $status) -{ - $refcoin = getdbo('db_coins', $user->coinid); - $value = 0.; - if (YAAMP_ALLOW_EXCHANGE) { - if(!$refcoin) $refcoin = getdbosql('db_coins', "symbol='BTC'"); - if(!$refcoin || $refcoin->price <= 0) return 0; - $value = dboscalar("SELECT sum(amount*price) FROM earnings WHERE $status AND userid={$user->id}"); - $value = $value / $refcoin->price; - } else if ($refcoin && $refcoin->price > 0.) { - $value = dboscalar("SELECT sum(amount*price) FROM earnings WHERE $status AND userid={$user->id}"); - $value = $value / $refcoin->price; - } else if ($user->coinid) { - $value = dboscalar("SELECT sum(amount) FROM earnings WHERE $status AND userid={$user->id} AND coinid=".$user->coinid); - } - return $value; -} - -//////////////////////////////////////////////////////////////////////////////////////////// - -function yaamp_pool_rate($algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND algo=:algo", array(':algo'=>$algo)); - - return $rate; -} - -function yaamp_pool_rate_bad($algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_bad-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE not valid AND time>$delay AND algo=:algo", array(':algo'=>$algo)); - - return $rate; -} - -function yaamp_pool_rate_rentable($algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_rentable-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND extranonce1 AND time>$delay AND algo=:algo", array(':algo'=>$algo)); - - return $rate; -} - -function yaamp_user_rate($userid, $algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_user_rate-$userid-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); - - return $rate; -} - -function yaamp_user_rate_bad($userid, $algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $diff = (double) controller()->memcache->get_database_scalar("yaamp_user_diff_avg-$userid-$algo", - "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); - - $rate = controller()->memcache->get_database_scalar("yaamp_user_rate_bad-$userid-$algo", - "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM shares WHERE valid!=1 AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); - - return $rate; -} - -function yaamp_worker_rate($workerid, $algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_worker_rate-$workerid-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); - - return $rate; -} - -function yaamp_worker_rate_bad($workerid, $algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $diff = (double) controller()->memcache->get_database_scalar("yaamp_worker_diff_avg-$workerid-$algo", - "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); - - $rate = controller()->memcache->get_database_scalar("yaamp_worker_rate_bad-$workerid-$algo", - "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM shares WHERE valid!=1 AND time>$delay AND workerid=".$workerid); - - return empty($rate)? 0: $rate; -} - -function yaamp_worker_shares_bad($workerid, $algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = (int) controller()->memcache->get_database_scalar("yaamp_worker_shares_bad-$workerid-$algo", - "SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND workerid=".$workerid); - - return $rate; -} - -function yaamp_coin_rate($coinid) -{ - $coin = getdbo('db_coins', $coinid); - if(!$coin || !$coin->enable) return 0; - - $target = yaamp_hashrate_constant($coin->algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_coin_rate-$coinid", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND coinid=$coinid"); - - return $rate; -} - -function yaamp_rented_rate($algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_rented_rate-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE time>$delay AND algo=:algo AND jobid!=0 AND valid", array(':algo'=>$algo)); - - return $rate; -} - -function yaamp_job_rate($jobid) -{ - $job = getdbo('db_jobs', $jobid); - if(!$job) return 0; - - $target = yaamp_hashrate_constant($job->algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_job_rate-$jobid", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); - return $rate; -} - -function yaamp_job_rate_bad($jobid) -{ - $job = getdbo('db_jobs', $jobid); - if(!$job) return 0; - - $target = yaamp_hashrate_constant($job->algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $diff = (double) controller()->memcache->get_database_scalar("yaamp_job_diff_avg-$jobid", - "SELECT avg(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); - - $rate = controller()->memcache->get_database_scalar("yaamp_job_rate_bad-$jobid", - "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM jobsubmits WHERE valid!=1 AND time>$delay AND jobid=".$jobid); - - return $rate; -} - -////////////////////////////////////////////////////////////////////////////////////////////////////// - -function yaamp_pool_rate_pow($algo=null) -{ - if(!$algo) $algo = user()->getState('yaamp-algo'); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_pow-$algo", - "SELECT sum(shares.difficulty) * $target / $interval / 1000 FROM shares, coins - WHERE shares.valid AND shares.time>$delay AND shares.algo=:algo AND - shares.coinid=coins.id AND coins.rpcencoding='POW'", array(':algo'=>$algo)); - - return $rate; -} - -///////////////////////////////////////////////////////////////////////////////////////////// - -function yaamp_renter_account($renter) -{ - if(YAAMP_PRODUCTION) - return "renter-prod-$renter->id"; - else - return "renter-dev-$renter->id"; -} - -///////////////////////////////////////////////////////////////////////////////////////////// diff --git a/web/yaamp/core/trading/kucoin_trading.php.bak b/web/yaamp/core/trading/kucoin_trading.php.bak deleted file mode 100644 index dd331823a..000000000 --- a/web/yaamp/core/trading/kucoin_trading.php.bak +++ /dev/null @@ -1,71 +0,0 @@ -data)) - foreach($data->data as $balance) - { - if ($balance->coinType == 'BTC') { - if (is_object($savebalance)) { - $savebalance->balance = $balance->balance; - $savebalance->onsell = $balance->freezeBalance; - $savebalance->save(); - } - continue; - } - - if ($updatebalances) { - // store available balance in market table - $coins = getdbolist('db_coins', "symbol=:symbol OR symbol2=:symbol", - array(':symbol'=>$balance->coinType) - ); - if (empty($coins)) continue; - foreach ($coins as $coin) { - $market = getdbosql('db_markets', - "coinid=:coinid AND name='$exchange' ORDER BY balance" - , array(':coinid'=>$coin->id) - ); - if (!$market) continue; - $market->balance = $balance->balance; - $market->ontrade = $balance->freezeBalance; - $market->balancetime = time(); - $market->save(); - - $checked_today = cache()->get($exchange.'-deposit_address-check-'.$coin->symbol); - if ($coin->installed && !$checked_today) { - sleep(1); - $obj = kucoin_api_user("account/{$coin->symbol}/wallet/address"); - if (!kucoin_result_valid($obj)) continue; - $result = $obj->data; - $deposit_address = objSafeVal($result,'address'); - if (!empty($deposit_address) && $deposit_address != $market->deposit_address) { - debuglog("$exchange: updated {$coin->symbol} deposit address $deposit_address"); - $market->save(); - } - cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 24*3600); - } - } - } - } - - if (!YAAMP_ALLOW_EXCHANGE) return; - - // real trading, todo.. -} diff --git a/web/yaamp/core/trading/livecoin_trading.php.bak b/web/yaamp/core/trading/livecoin_trading.php.bak deleted file mode 100644 index 2eb5259a0..000000000 --- a/web/yaamp/core/trading/livecoin_trading.php.bak +++ /dev/null @@ -1,278 +0,0 @@ -cancelLimitOrder($pair, $id); - - if ($res->success === TRUE) { - $db_order = getdbosql( - 'db_orders', - 'market=:market AND uuid=:uuid', - array(':market'=>'livecoin', ':uuid'=>$id) - ); - - if ($db_order) { - $db_order->delete(); - } - } -} - -function doLiveCoinTrading($quick = false) -{ - $exchange = 'livecoin'; - $updatebalances = true; - - if (exchange_get($exchange, 'disabled')) { - return; - } - - $livecoin = new LiveCoinApi; - - $savebalance = getdbosql('db_balances', "name='$exchange'"); - if (is_object($savebalance)) { - $savebalance->balance = 0; - $savebalance->save(); - } else { - dborun("INSERT INTO balances (name,balance) VALUES ('$exchange',0)"); - return; - } - - $balances = $livecoin->getBalances(); - if (!$balances || !is_array($balances)) { - return; - } - - foreach ($balances as $balance) { - if ($balance->currency == 'BTC' && $balance->type == "available") { - if (!is_object($savebalance)) continue; - $savebalance->balance = $balance->value; - $savebalance->save(); - continue; - } - if ($balance->currency == 'BTC' && $balance->type == "trade") { - if (!is_object($savebalance)) continue; - $savebalance->onsell = $balance->value; - $savebalance->save(); - continue; - } - - if ($updatebalances) { - // store available balance in market table - $coins = getdbolist( - 'db_coins', - 'symbol=:symbol OR symbol2=:symbol', - array(':symbol'=>$balance->currency) - ); - - if (empty($coins)) { - continue; - } - - foreach ($coins as $coin) { - $market = getdbosql('db_markets', "coinid=:coinid AND name='$exchange'", array(':coinid'=>$coin->id)); - - if (!$market) { - continue; - } - - if ($balance->type == 'available') { - $market->balance = arraySafeVal($balance, 'value', 0.0); - $market->balancetime = time(); - $market->save(); - } elseif ($balance->type == 'trade') { - $market->ontrade = arraySafeVal($balance, 'value', 0.0); - $market->balancetime = time(); - $market->save(); - } - - } - } - } - - if (!YAAMP_ALLOW_EXCHANGE) { - return; - } - - $flushall = rand(0, 8) == 0; - if ($quick) { - $flushall = false; - } - $min_btc_trade = exchange_get($exchange, 'trade_min_btc', 0.0001); - - $min_btc_trade = exchange_get($exchange, 'trade_min_btc', 0.0001); - $sell_ask_pct = exchange_get($exchange, 'trade_sell_ask_pct', 1.05); - $cancel_ask_pct = exchange_get($exchange, 'trade_cancel_ask_pct', 1.20); - - // upgrade orders - $coins = getdbolist('db_coins', "enable=1 AND IFNULL(dontsell,0)=0 AND id IN (SELECT DISTINCT coinid FROM markets WHERE name='livecoin')"); - foreach ($coins as $coin) { - if ($coin->dontsell || $coin->symbol == 'BTC') { - continue; - } - - $pair = $coin->symbol.'/BTC'; - sleep(1); - $orders = $livecoin->getClientOrders($pair, 'OPEN'); - - if (isset($orders->data)) { - $order_data = $orders->data; - } else { - $order_data = array(); - } - - foreach ($order_data as $order) { - $uuid = $order->id; - $pair = $order->currencyPair; - sleep(1); - $ticker = $livecoin->getTickerInfo($pair); - - if (!is_object($ticker) || !$order->price) { - continue; - } - - if ($order->price > $cancel_ask_pct*$ticker->best_ask || $flushall) { - sleep(1); - doLiveCoinCancelOrder($pair, $uuid, $livecoin); - } else { - $db_order = getdbosql( - 'db_orders', - 'market=:market AND uuid=:uuid', - array(':market'=>'livecoin', ':uuid'=>$uuid) - ); - - if ($db_order) { - continue; - } - - $db_order = new db_orders; - $db_order->market = 'livecoin'; - $db_order->coinid = $coin->id; - $db_order->amount = $order->quantity; - $db_order->price = $order->price; - $db_order->ask = $ticker->best_ask; - $db_order->bid = $ticker->best_sell; - $db_order->uuid = $uuid; - $db_order->created = time(); - $db_order->save(); - } - } - $list = getdbolist('db_orders', "coinid=$coin->id and market='livecoin'"); - foreach ($list as $db_order) { - $found = false; - foreach ($order_data as $order) { - $uuid = $order->id; - if ($uuid == $db_order->uuid) { - $found = true; - break; - } - } - if (!$found) { - debuglog("LiveCoin: Deleting order $coin->name $db_order->amount"); - $db_order->delete(); - } - } - } - sleep(2); - - /* Update balances and sell */ - if (!$balances) { - return; - } - - foreach ($balances as $balance) { - if ($balance->type != 'available') { - continue; - } - - $amount = $balance->value; - $symbol = $balance->currency; - if ($symbol == 'BTC') { - continue; - } - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if (!$coin || $coin->dontsell) { - continue; - } - - $market2 = getdbosql('db_markets', "coinid={$coin->id} AND (name='bittrex' OR name='poloniex')"); - if ($market2) { - continue; - } - - $market = getdbosql('db_markets', "coinid=$coin->id and name='livecoin'"); - if ($market) { - $market->lasttraded = time(); - $market->save(); - } - - if ($amount*$coin->price < $min_btc_trade) { - continue; - } - - sleep(1); - - $pair = "$symbol/BTC"; - $ticker = $livecoin->getTickerInfo($pair); - if(!(isset($ticker->best_bid) && isset($ticker->best_ask))) continue; - if($coin->sellonbid) - $sellprice = bitcoinvaluetoa($ticker->best_bid); - else - $sellprice = bitcoinvaluetoa($ticker->best_ask * $sell_ask_pct); - - if ($amount*$sellprice > $min_btc_trade) { - debuglog("LiveCoin: Selling market $pair, $sellprice, $sellprice"); - sleep(1); - - $res = $livecoin->sellLimit($pair, $sellprice, $amount); - if (!($res->success === TRUE && $res->added === TRUE)) { - debuglog('LiveCoin: Sell failed'); - continue; - } - } - - $db_order = new db_orders; - $db_order->market = 'livecoin'; - $db_order->coinid = $coin->id; - $db_order->amount = $amount; - $db_order->price = $sellprice; - $db_order->ask = $ticker->best_ask; - $db_order->bid = $ticker->best_bid; - $db_order->uuid = $res->orderId; - $db_order->created = time(); - $db_order->save(); - } - - /* Withdrawals */ - $btcaddr = YAAMP_BTCADDRESS; - $withdraw_min = exchange_get($exchange, 'withdraw_min_btc', EXCH_AUTO_WITHDRAW); - $withdraw_fee = exchange_get($exchange, 'withdraw_fee_btc', 0.0005); - if (floatval($withdraw_min) > 0 && $savebalance->balance >= ($withdraw_min + $withdraw_fee)) { - $amount = $savebalance->balance - $withdraw_fee; - debuglog("$exchange: withdraw $amount BTC to $btcaddr"); - sleep(1); - $res = $livecoin->withdrawCoin($amount, 'BTC', $btcaddr); - debuglog("$exchange: withdraw ".json_encode($res)); - if (is_object($res)) { - $withdraw = new db_withdraws; - $withdraw->market = 'livecoin'; - $withdraw->address = $btcaddr; - $withdraw->amount = $amount; - $withdraw->time = time(); - $withdraw->uuid = $res->id; - $withdraw->save(); - $savebalance->balance = 0; - $savebalance->save(); - } else { - debuglog("$exchange: Withdraw Failed ".json_encode($res)); - } - } -} diff --git a/web/yaamp/core/trading/trading.php.bak b/web/yaamp/core/trading/trading.php.bak deleted file mode 100644 index 1dab4d7fe..000000000 --- a/web/yaamp/core/trading/trading.php.bak +++ /dev/null @@ -1,167 +0,0 @@ -market) - { - case 'yobit': - doYobitCancelOrder($order->uuid); - break; - case 'binance': - doBinanceCancelOrder($order->uuid); - break; - case 'c-cex': - doCCexCancelOrder($order->uuid); - break; - case 'bittrex': - doBittrexCancelOrder($order->uuid); - break; - case 'bleutrade': - doBleutradeCancelOrder($order->uuid); - break; - case 'crex24': - doCrex24CancelOrder($order->uuid); - break; - case 'cryptopia': - doCryptopiaCancelOrder($order->uuid); - break; - case 'hitbtc': - doHitBTCCancelOrder($order->uuid); - break; - case 'kucoin': - doKuCoinCancelOrder($order->uuid); - break; - case 'livecoin': - doLiveCoinCancelOrder($order->uuid); - break; - - } -} - -function runExchange($exchangeName=false) -{ - if (!empty($exchangeName)) - { - switch($exchangeName) - { - case 'alcurex': - //doAlcurexTrading(true); - updateAlcurexMarkets(); - break; - - case 'binance': - doBinanceTrading(true); - updateBinanceMarkets(); - break; - - case 'crex24': - doCrex24Trading(true); - updateCrex24Markets(); - break; - - case 'cryptopia': - doCryptopiaTrading(true); - updateCryptopiaMarkets(); - break; - - case 'cryptobridge': - updateCryptoBridgeMarkets(); - break; - - case 'bitstamp': - getBitstampBalances(); - break; - - case 'bittrex': - doBittrexTrading(true); - updateBittrexMarkets(); - break; - case 'bitz': - updateBitzMarkets(); - break; - - case 'cexio': - getCexIoBalances(); - break; - - case 'c-cex': - doCCexTrading(true); - updateCCexMarkets(); - break; - - case 'coinexchange': - updateCoinExchangeMarkets(); - break; - - case 'coinsmarkets': - doCoinsMarketsTrading(true); - updateCoinsMarketsMarkets(); - break; - - case 'empoex': - //doEmpoexTrading(true); - //updateEmpoexMarkets(); - break; - - case 'yobit': - doYobitTrading(true); - updateYobitMarkets(); - break; - - case 'bleutrade': - doBleutradeTrading(true); - updateBleutradeMarkets(); - break; - - case 'hitbtc': - doHitBTCTrading(true); - updateHitBTCMarkets(); - break; - - case 'kraken': - doKrakenTrading(true); - updateKrakenMarkets(); - break; - - case 'kucoin': - doKuCoinTrading(true); - updateKucoinMarkets(); - break; - - case 'livecoin': - doLiveCoinTrading(true); - updateLiveCoinMarkets(); - break; - - case 'nova': - doNovaTrading(true); - updateNovaMarkets(); - break; - - case 'poloniex': - doPoloniexTrading(true); - updatePoloniexMarkets(); - break; - - default: - debuglog(__FUNCTION__.' '.$exchangeName.' not implemented'); - } - } -} diff --git a/web/yaamp/defaultconfig.php.bak b/web/yaamp/defaultconfig.php.bak deleted file mode 100644 index 0674be94f..000000000 --- a/web/yaamp/defaultconfig.php.bak +++ /dev/null @@ -1,75 +0,0 @@ - 'Official Symbol', - 'auxpow' => 'AUX PoW', - 'dontsell' => 'Don\'t sell', - 'sellonbid' => 'Sell on Bid', - 'txfee' => 'Tx Fee', - 'program' => 'Process name', - 'conf_folder' => 'Conf. folder', - 'mature_blocks' => 'PoW Confirmations', - 'powend_height' => 'End of PoW', - 'rpchost' => 'RPC Host', - 'rpcport' => 'RPC Port', - 'rpcuser' => 'RPC User', - 'rpcpasswd' => 'RPC Password', - 'rpccurl' => 'RPC via curl', - 'rpcssl' => 'RPC SSL', - 'rpccert' => 'RPC Certificate', - 'serveruser' => 'Server user', - 'hasgetinfo' => 'Has getinfo', - 'hassubmitblock'=> 'Has submitblock', - 'hasmasternodes'=> 'Masternodes', - 'usesegwit' => 'Use segwit', - 'usefaucet' => 'Use Faucet', - 'market' => 'Preferred market', - 'rpcencoding' => 'RPC Type', - 'dedicatedport' => 'Dedicated Port', - 'specifications'=> 'AddNodes' - ); - } - - public function getOfficialSymbol() - { - if(!empty($this->symbol2)) - return $this->symbol2; - else - return $this->symbol; - } - - public function getSymbol_show() - { - // virtual property $coin->symbol_show - return $this->getOfficialSymbol(); - } - - public function deleteDeps() - { - $coin = $this; - $ids_query = "(SELECT id FROM accounts WHERE coinid=".$coin->id.")"; - - dborun("DELETE FROM balanceuser WHERE userid IN $ids_query"); - dborun("DELETE FROM hashuser WHERE userid IN $ids_query"); - dborun("DELETE FROM shares WHERE userid IN $ids_query"); - dborun("DELETE FROM workers WHERE userid IN $ids_query"); - dborun("DELETE FROM payouts WHERE account_id IN $ids_query"); - - dborun("DELETE FROM blocks WHERE coin_id=".$coin->id); - dborun("DELETE FROM shares WHERE coinid=".$coin->id); - dborun("DELETE FROM earnings WHERE coinid=".$coin->id); - dborun("DELETE FROM notifications WHERE idcoin=".$coin->id); - dborun("DELETE FROM market_history WHERE idcoin=".$coin->id); - dborun("DELETE FROM markets WHERE coinid=".$coin->id); - - dborun("DELETE FROM accounts WHERE coinid=".$coin->id); - } - - public function deleteWithDeps() - { - $this->deleteDeps(); - return $this->delete(); - } - - /** - * Link for txs - * @param string $label link content - * @param array $params 'height'=>123 or 'hash'=>'xxx' or 'txid'=>'xxx' - * @param array $htmlOptions target/title ... - */ - public function createExplorerLink($label, $params=array(), $htmlOptions=array(), $force=false) - { - if($this->id == 6 && isset($params['txid'])) { - // BTC txid - $url = 'https://blockchain.info/tx/'.$params['txid']; - $htmlOpts = array_merge(array('target'=>'_blank'), $htmlOptions); - return CHtml::link($label, $url, $htmlOpts); - } - else if (YIIMP_PUBLIC_EXPLORER || $force || user()->getState('yaamp_admin')) { - $urlParams = array_merge(array('id'=>$this->id), $params); - Yii::import('application.modules.explorer.ExplorerController'); - $url = ExplorerController::createUrl('/explorer', $urlParams); - return CHtml::link($label, trim($url,'?'), $htmlOptions); - } - return $label; - } - -} diff --git a/web/yaamp/modules/thread/CronjobController.php.bak b/web/yaamp/modules/thread/CronjobController.php.bak deleted file mode 100644 index 74f46e1d5..000000000 --- a/web/yaamp/modules/thread/CronjobController.php.bak +++ /dev/null @@ -1,221 +0,0 @@ -memcache->memcache, 'apache_locked'); - if($apache_locked) return; - - $b = preg_match('/load average: (.*)$/', $uptime, $m); - if(!$b) return; - - $e = explode(', ', $m[1]); - - $webserver = 'nginx'; - $res = exec("pgrep $webserver"); - $webserver_running = !empty($res); - - if($e[0] > 4 && $webserver_running) - { - debuglog('server overload!'); - // debuglog('stopping webserver'); - // system("service $webserver stop"); - sleep(1); - } - - else if(!$webserver_running) - { - debuglog('starting webserver'); - system("service $webserver start"); - } - } - - public function actionRunBlocks() - { -// screenlog(__FUNCTION__); - set_time_limit(0); - - $this->monitorApache(); - - $last_complete = memcache_get($this->memcache->memcache, "cronjob_block_time_start"); - if($last_complete+(5*60) < time()) - dborun("update jobs set active=false"); - BackendBlockFind1(); - if(!memcache_get($this->memcache->memcache, 'balances_locked')) { - BackendClearEarnings(); - } - BackendRentingUpdate(); - BackendProcessList(); - BackendBlocksUpdate(); - - memcache_set($this->memcache->memcache, "cronjob_block_time_start", time()); -// screenlog(__FUNCTION__.' done'); - } - - public function actionRunLoop2() - { -// screenlog(__FUNCTION__); - set_time_limit(0); - - $this->monitorApache(); - - BackendCoinsUpdate(); - BackendStatsUpdate(); - BackendUsersUpdate(); - - BackendUpdateServices(); - BackendUpdateDeposit(); - - MonitorBTC(); - - $last = memcache_get($this->memcache->memcache, 'last_renting_payout2'); - if($last + 5*60 < time() && !memcache_get($this->memcache->memcache, 'balances_locked')) - { - memcache_set($this->memcache->memcache, 'last_renting_payout2', time()); - BackendRentingPayout(); - } - - $last = memcache_get($this->memcache->memcache, 'last_stats2'); - if($last + 5*60 < time()) - { - memcache_set($this->memcache->memcache, 'last_stats2', time()); - BackendStatsUpdate2(); - } - - memcache_set($this->memcache->memcache, "cronjob_loop2_time_start", time()); -// screenlog(__FUNCTION__.' done'); - } - - public function actionRun() - { -// debuglog(__METHOD__); - set_time_limit(0); - -// BackendRunCoinActions(); - - $state = memcache_get($this->memcache->memcache, 'cronjob_main_state'); - if(!$state) $state = 0; - - memcache_set($this->memcache->memcache, 'cronjob_main_state', $state+1); - memcache_set($this->memcache->memcache, "cronjob_main_state_$state", 1); - - switch($state) - { - case 0: - updateRawcoins(); - - $btcusd = bitstamp_btcusd(); - if($btcusd) { - $mining = getdbosql('db_mining'); - if (!$mining) $mining = new db_mining; - $mining->usdbtc = $btcusd; - $mining->save(); - } - - break; - - case 1: - if(!YAAMP_PRODUCTION) break; - - getBitstampBalances(); - getCexIoBalances(); - doBittrexTrading(); - doCrex24Trading(); - doCryptopiaTrading(); - doKrakenTrading(); - doLiveCoinTrading(); - doPoloniexTrading(); - break; - - case 2: - if(!YAAMP_PRODUCTION) break; - - doBinanceTrading(); - doCCexTrading(); - doBleutradeTrading(); - doKuCoinTrading(); - doNovaTrading(); - doYobitTrading(); - doCoinsMarketsTrading(); - break; - - case 3: - BackendPricesUpdate(); - BackendWatchMarkets(); - break; - - case 4: - BackendBlocksUpdate(); - break; - - case 5: - TradingSellCoins(); - break; - - case 6: - BackendBlockFind2(); - BackendUpdatePoolBalances(); - break; - - case 7: - NotifyCheckRules(); - BenchUpdateChips(); - break; - - default: - memcache_set($this->memcache->memcache, 'cronjob_main_state', 0); - BackendQuickClean(); - - $t = memcache_get($this->memcache->memcache, "cronjob_main_start_time"); - $n = time(); - - memcache_set($this->memcache->memcache, "cronjob_main_time", $n-$t); - memcache_set($this->memcache->memcache, "cronjob_main_start_time", $n); - } - - debuglog(__METHOD__." $state"); - memcache_set($this->memcache->memcache, "cronjob_main_state_$state", 0); - - memcache_set($this->memcache->memcache, "cronjob_main_time_start", time()); - if(!YAAMP_PRODUCTION) return; - - /////////////////////////////////////////////////////////////////// - - $mining = getdbosql('db_mining'); - if($mining->last_payout + YAAMP_PAYMENTS_FREQ > time()) return; - - debuglog("--------------------------------------------------------"); - - $mining->last_payout = time(); - $mining->save(); - - memcache_set($this->memcache->memcache, 'apache_locked', true); - if(YAAMP_USE_NGINX) - system("service nginx stop"); - - sleep(10); - BackendDoBackup(); - memcache_set($this->memcache->memcache, 'apache_locked', false); - - // prevent user balances changes during payments (blocks thread) - memcache_set($this->memcache->memcache, 'balances_locked', true, 0, 300); - BackendPayments(); - memcache_set($this->memcache->memcache, 'balances_locked', false); - - BackendCleanDatabase(); - - // BackendOptimizeTables(); - debuglog('payments sequence done'); - } - -} - From bffff5c8ed388c4599c50927942f6ea8a770edea Mon Sep 17 00:00:00 2001 From: phm87 <31578435+phm87@users.noreply.github.com> Date: Sat, 14 Dec 2019 20:02:59 +0100 Subject: [PATCH 520/576] Update lyra2v3.c --- stratum/algos/lyra2v3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stratum/algos/lyra2v3.c b/stratum/algos/lyra2v3.c index ece25e762..efc5ee2ff 100644 --- a/stratum/algos/lyra2v3.c +++ b/stratum/algos/lyra2v3.c @@ -1,5 +1,6 @@ /*- - * Copyright(or left) 2019 YiiMP + * Copyright 2009 Colin Percival, 2011 ArtForz, 2013 Neisklar, 2014 James Lovejoy + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From d3dc17d5b23af4fb3f3ee5a1a109fe240432fce6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 2 Jan 2020 10:51:03 -0500 Subject: [PATCH 521/576] segwit change --- web/yaamp/core/backend/coins.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/web/yaamp/core/backend/coins.php b/web/yaamp/core/backend/coins.php index 16411eb6b..6b34f7c7e 100644 --- a/web/yaamp/core/backend/coins.php +++ b/web/yaamp/core/backend/coins.php @@ -125,12 +125,13 @@ function BackendCoinsUpdate() $coin->auxpow = true; } -// if($coin->symbol != 'BTC') -// { -// if($coin->symbol == 'PPC') -// $template = $remote->getblocktemplate(''); -// else + // Change for segwit + if($coin->usesegwit){ + $template = $remote->getblocktemplate('{"rules":["segwit"]}'); + }else{ $template = $remote->getblocktemplate('{}'); + } + // Change for segwit end if($template && isset($template['coinbasevalue'])) { From c17380637df77924d44ad83916693dbd7fab9079 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 01:28:55 -0500 Subject: [PATCH 522/576] Update coinbase.cpp --- stratum/coinbase.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 55981f746..e808513fe 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -833,6 +833,50 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } + if (strcmp(coind->symbol, "STRMS") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } + // add CRDS if (strcmp(coind->symbol, "CRDS") == 0) { From 5c03fe1eeef52447c96be7d184ffda9064461710 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 02:38:08 -0500 Subject: [PATCH 523/576] Update coinbase.cpp --- stratum/coinbase.cpp | 93 ++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index e808513fe..a9c9c89b4 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -181,6 +181,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); } + else if(strcmp(coind->symbol, "DYN") == 0) { char script_dests[2048] = { 0 }; @@ -481,6 +482,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + else if(strcmp(coind->symbol, "TUX") == 0) { char script_payee[1024]; char charity_payee[256] = { 0 }; @@ -529,6 +531,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } } + else if(strcmp(coind->symbol, "PGN") == 0) { bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); json_value* founder = json_get_object(json_result, "founder"); @@ -832,52 +835,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - - if (strcmp(coind->symbol, "STRMS") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // add CRDS + + // add CRDS if (strcmp(coind->symbol, "CRDS") == 0) { char payees[4]; @@ -1176,6 +1135,46 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } + if(strcmp(coind->symbol, "STRMS") == 0) + { + int npayees = 1; + char payees[2]; + char sinpayee[256] = {0}; + char sinscript[1024] = {0}; + char devpayee[256] = {0}; + char devscript[1024] = {0}; + const char *devpayaddr = json_get_string(json_result, "payee"); + json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); + snprintf(devpayee, 255, "%s", devpayaddr); + base58_decode(devpayee, devscript); + npayees++; + + available -= devfee_amount; + const char* mnpayaddrs[7] = {0}; + json_value* masternodes = json_get_array(json_result, "masternode"); + json_int_t mnamounts[7] = {0}; + for(int i = 0; i < masternodes->u.array.length; i++) { + mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); + mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); + available -= mnamounts[i]; + npayees++; + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); + for(int i = 0; i < masternodes->u.array.length; i++) { + snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); + base58_decode(sinpayee, sinscript); + job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); + } + + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000; + return; + } + if(strcmp(coind->symbol, "BITC") == 0) { char *params = (char *)malloc(1024); @@ -1519,7 +1518,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available/100000000*coind->reward_mul; // debuglog("coinbase %f\n", coind->reward); -// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); + debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } From b0e0965926e173ea6af263a8922347fcd0de67a3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 02:45:05 -0500 Subject: [PATCH 524/576] Update coinbase.cpp --- stratum/coinbase.cpp | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index a9c9c89b4..cb5cfe308 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1135,46 +1135,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - if(strcmp(coind->symbol, "STRMS") == 0) - { - int npayees = 1; - char payees[2]; - char sinpayee[256] = {0}; - char sinscript[1024] = {0}; - char devpayee[256] = {0}; - char devscript[1024] = {0}; - const char *devpayaddr = json_get_string(json_result, "payee"); - json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); - snprintf(devpayee, 255, "%s", devpayaddr); - base58_decode(devpayee, devscript); - npayees++; - - available -= devfee_amount; - const char* mnpayaddrs[7] = {0}; - json_value* masternodes = json_get_array(json_result, "masternode"); - json_int_t mnamounts[7] = {0}; - for(int i = 0; i < masternodes->u.array.length; i++) { - mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); - mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); - available -= mnamounts[i]; - npayees++; - } - - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); - for(int i = 0; i < masternodes->u.array.length; i++) { - snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); - base58_decode(sinpayee, sinscript); - job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); - } - - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available/100000000; - return; - } - if(strcmp(coind->symbol, "BITC") == 0) { char *params = (char *)malloc(1024); From 24ffc33bd9baf82d0c372a0bd1ab453fb6227db7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 04:04:46 -0500 Subject: [PATCH 525/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index cb5cfe308..3a3bfe5cb 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1472,6 +1472,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //if(coind->txmessage) // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. + if(strcmp(coind->symbol, "STRMS") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin strcat(templ->coinb2, "00000000"); // locktime From 08f52aacd0a65ad7d0bc6681f81616e6fc559dfb Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 04:12:17 -0500 Subject: [PATCH 526/576] Update coinbase.cpp --- stratum/coinbase.cpp | 46 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 3a3bfe5cb..acc1f5994 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -701,6 +701,51 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } + + // add STRM + if (strcmp(coind->symbol, "STRMS") == 0) +{ + char payees[4]; + int npayees = 1; + char script_dests[4096] = { 0 }; + // + json_value* founderreward = json_get_array(json_result, "founderreward"); + if (founderreward) + { + const char *payee = json_get_string(founderreward, "founderpayee"); + json_int_t amount = json_get_int(founderreward, "amount"); + if (payee && amount) + { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + json_value* masternode = json_get_object(json_result, "masternode"); + bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); + if (masternode_enabled && masternode) + { + bool started = json_get_bool(json_result, "masternode_payments_started"); + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (started && payee && amount) { + char script_payee[128] = { 0 }; + npayees++; + available -= amount; + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } + } + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + strcat(templ->coinb2, script_dests); + job_pack_tx(coind, templ->coinb2, available, NULL); + strcat(templ->coinb2, "00000000"); // locktime + coind->reward = (double)available / 100000000 * coind->reward_mul; + return; + } // add GTM if (strcmp(coind->symbol, "GTM") == 0) @@ -1472,7 +1517,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //if(coind->txmessage) // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. - if(strcmp(coind->symbol, "STRMS") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin strcat(templ->coinb2, "00000000"); // locktime From 0934b77f2be4fa57beb451ae473914601d2956ae Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 04:18:36 -0500 Subject: [PATCH 527/576] Update coinbase.cpp --- stratum/coinbase.cpp | 45 -------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index acc1f5994..753229647 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -702,51 +702,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - // add STRM - if (strcmp(coind->symbol, "STRMS") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - // add GTM if (strcmp(coind->symbol, "GTM") == 0) { From 7d0a246c5d6d5585a3ccd6c169e11731f14ca2dd Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 04:22:49 -0500 Subject: [PATCH 528/576] Update client_submit.cpp --- stratum/client_submit.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index affe411ee..cbdfd95ab 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -242,6 +242,16 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL // block header of 88 bytes sprintf(block_hex, "%s8400000008000000%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); } + + if(g_current_algo->name && !strcmp("STRMS", coind->symbol)) { + char head[168]; + char extra[10 * 1024]; + memset(head, 0, 168); + memset(extra, 0, 10 * 1024); + strncpy(head, block_hex, 160); + sprintf(extra, "%s", &block_hex[160]); + sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); + } vector::const_iterator i; for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) From b14249e3e610db497ee2e2ed1bc5f16e64606ae1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 04:26:36 -0500 Subject: [PATCH 529/576] Update client_submit.cpp --- stratum/client_submit.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index cbdfd95ab..fb4fcd492 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -243,15 +243,6 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL sprintf(block_hex, "%s8400000008000000%s%s", submitvalues->header_be, count_hex, submitvalues->coinbase); } - if(g_current_algo->name && !strcmp("STRMS", coind->symbol)) { - char head[168]; - char extra[10 * 1024]; - memset(head, 0, 168); - memset(extra, 0, 10 * 1024); - strncpy(head, block_hex, 160); - sprintf(extra, "%s", &block_hex[160]); - sprintf(block_hex, "%s0000000000000000000000000000000000000000000000000000000000000000%s", head, extra); - } vector::const_iterator i; for(i = templ->txdata.begin(); i != templ->txdata.end(); ++i) @@ -291,6 +282,11 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL // isnt perfect, but it works if(strcmp(coind->symbol, "SIN") == 0) x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); + + + // isnt perfect, but it works + if(strcmp(coind->symbol, "STRMS") == 0) + skunk_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); char hash1[1024]; memset(hash1, 0, 1024); From 4652a1f4d730236cb58b9aaf45300ecda974f2c8 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 18 Jan 2020 05:29:02 -0500 Subject: [PATCH 530/576] Update client_submit.cpp --- stratum/client_submit.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stratum/client_submit.cpp b/stratum/client_submit.cpp index fb4fcd492..36c15302e 100644 --- a/stratum/client_submit.cpp +++ b/stratum/client_submit.cpp @@ -282,11 +282,7 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL // isnt perfect, but it works if(strcmp(coind->symbol, "SIN") == 0) x22i_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); - - // isnt perfect, but it works - if(strcmp(coind->symbol, "STRMS") == 0) - skunk_hash_hex((char *)submitvalues->header_bin, doublehash2, strlen(submitvalues->header_be)/2); char hash1[1024]; memset(hash1, 0, 1024); From 10e06ff3d9e4c2706bb129bd96b12dffe9763ff8 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 23 Jan 2020 20:44:18 -0500 Subject: [PATCH 531/576] Update coin_results.php --- web/yaamp/modules/site/coin_results.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/coin_results.php b/web/yaamp/modules/site/coin_results.php index f25bb91a3..46b70a003 100644 --- a/web/yaamp/modules/site/coin_results.php +++ b/web/yaamp/modules/site/coin_results.php @@ -296,7 +296,7 @@ end; -$account = ''; +$account = '*'; if ($DCR || $DGB) $account = '*'; else if ($ETH) $account = $coin->master_wallet; From 12f1119e1b5c932999933bccd542bad66cf69bfb Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 23 Jan 2020 20:48:36 -0500 Subject: [PATCH 532/576] Update coin_results.php --- web/yaamp/modules/site/coin_results.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/coin_results.php b/web/yaamp/modules/site/coin_results.php index 46b70a003..f25bb91a3 100644 --- a/web/yaamp/modules/site/coin_results.php +++ b/web/yaamp/modules/site/coin_results.php @@ -296,7 +296,7 @@ end; -$account = '*'; +$account = ''; if ($DCR || $DGB) $account = '*'; else if ($ETH) $account = $coin->master_wallet; From e00f4c01de320b24827a7ed2c37e12334a2f0b3a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 23 Jan 2020 20:55:24 -0500 Subject: [PATCH 533/576] Update coin_results.php --- web/yaamp/modules/site/coin_results.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/yaamp/modules/site/coin_results.php b/web/yaamp/modules/site/coin_results.php index f25bb91a3..47f28a18a 100644 --- a/web/yaamp/modules/site/coin_results.php +++ b/web/yaamp/modules/site/coin_results.php @@ -300,6 +300,9 @@ if ($DCR || $DGB) $account = '*'; else if ($ETH) $account = $coin->master_wallet; +// If you are getting RPC Error: error -8: label argument must be a valid label name or "*", try this: +// if ($coin->symbol=="SYMBOL") $account ="*"; + $txs = $remote->listtransactions($account, $maxrows); if (empty($txs)) { From 1af0368d0fabe3c8f1b0e5519888cb5f65c0ae81 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 23 Jan 2020 20:57:07 -0500 Subject: [PATCH 534/576] Update coin_results.php --- web/yaamp/modules/site/coin_results.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/coin_results.php b/web/yaamp/modules/site/coin_results.php index 47f28a18a..29b010e41 100644 --- a/web/yaamp/modules/site/coin_results.php +++ b/web/yaamp/modules/site/coin_results.php @@ -301,7 +301,7 @@ else if ($ETH) $account = $coin->master_wallet; // If you are getting RPC Error: error -8: label argument must be a valid label name or "*", try this: -// if ($coin->symbol=="SYMBOL") $account ="*"; +// if ($coin->symbol=="SYMBOL") $account = "*"; $txs = $remote->listtransactions($account, $maxrows); From 043366753de61dfed9ddd7c22cd48de3266c4a56 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 18:50:33 -0500 Subject: [PATCH 535/576] Update remote.cpp --- stratum/remote.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratum/remote.cpp b/stratum/remote.cpp index b3e4ef1f0..b213353f1 100644 --- a/stratum/remote.cpp +++ b/stratum/remote.cpp @@ -214,7 +214,7 @@ void *remote_thread(void *p) else if(method) { -// debuglog(" * remote method %s\n", method); + debuglog(" * remote method %s\n", method); if(!strcmp(method, "mining.set_difficulty")) { if(json_params->u.array.values[0]->type == json_double) @@ -226,7 +226,7 @@ void *remote_thread(void *p) else if(json_params->u.array.values[0]->type == json_string) remote->difficulty_next = atof(json_params->u.array.values[0]->u.string.ptr); - // debuglog("remote difficulty %f\n", remote->difficulty_next); + debuglog("remote difficulty %f\n", remote->difficulty_next); } else if(!strcmp(method, "mining.set_extranonce")) From 550eca00072bb4f0ffc232130ebbfa66893590e3 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 18:59:58 -0500 Subject: [PATCH 536/576] Update remote.cpp --- stratum/remote.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stratum/remote.cpp b/stratum/remote.cpp index b213353f1..e8f3c41e3 100644 --- a/stratum/remote.cpp +++ b/stratum/remote.cpp @@ -203,12 +203,12 @@ void *remote_thread(void *p) { if(remote->submit_last) remote->submit_last->valid = false; -// json_value *json_error = json_get_array(json, "error"); -// if(json_error && json_error->type == json_array && json_error->u.array.length > 1) -// { -// debuglog("remote submit error JOB%d %d %s ***\n", remote->id, -// (int)json_error->u.array.values[0]->u.integer, json_error->u.array.values[1]->u.string.ptr); -// } + json_value *json_error = json_get_array(json, "error"); + if(json_error && json_error->type == json_array && json_error->u.array.length > 1) + { + debuglog("remote submit error JOB%d %d %s ***\n", remote->id, + (int)json_error->u.array.values[0]->u.integer, json_error->u.array.values[1]->u.string.ptr); + } } } From 8466fb8eeedeaff06ea198280603168f97ca37f7 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 19:11:24 -0500 Subject: [PATCH 537/576] Update remote.cpp --- stratum/remote.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stratum/remote.cpp b/stratum/remote.cpp index e8f3c41e3..b6b53dd95 100644 --- a/stratum/remote.cpp +++ b/stratum/remote.cpp @@ -57,8 +57,8 @@ void remote_close(YAAMP_REMOTE *remote) bool remote_connect(YAAMP_REMOTE *remote) { // if(!strcmp(remote->host, "yaamp.com")) return false; -// if(!strcmp(remote->host, "localhost")) return false; -// if(client_find_my_ip(remote->host)) return false; + if(!strcmp(remote->host, "localhost")) return false; + if(client_find_my_ip(remote->host)) return false; if(remote_connected(remote)) remote_close(remote); @@ -89,12 +89,12 @@ bool remote_connect(YAAMP_REMOTE *remote) return false; } -// int flags = fcntl(sock, F_GETFL, 0); -// fcntl(sock, F_SETFL, flags|O_NONBLOCK); + int flags = fcntl(sock, F_GETFL, 0); + fcntl(sock, F_SETFL, flags|O_NONBLOCK); remote->status = YAAMP_REMOTE_SUBSCRIBE; remote->sock = socket_initialize(sock); -// remote->updated = time(NULL); + remote->updated = time(NULL); debuglog("connected to %s:%d JOB%d\n", remote->host, remote->port, remote->id); return true; From 853a1fb5ea2e54cf5b7c064c336e66ed57a99bff Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 19:21:12 -0500 Subject: [PATCH 538/576] Update remote.cpp --- stratum/remote.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratum/remote.cpp b/stratum/remote.cpp index b6b53dd95..59ff20fcb 100644 --- a/stratum/remote.cpp +++ b/stratum/remote.cpp @@ -57,8 +57,8 @@ void remote_close(YAAMP_REMOTE *remote) bool remote_connect(YAAMP_REMOTE *remote) { // if(!strcmp(remote->host, "yaamp.com")) return false; - if(!strcmp(remote->host, "localhost")) return false; - if(client_find_my_ip(remote->host)) return false; +// if(!strcmp(remote->host, "localhost")) return false; +// if(client_find_my_ip(remote->host)) return false; if(remote_connected(remote)) remote_close(remote); From f028ce0c516070f655b7209f4d1e28bbf7dc5a78 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 19:28:40 -0500 Subject: [PATCH 539/576] Update remote.cpp --- stratum/remote.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/stratum/remote.cpp b/stratum/remote.cpp index 59ff20fcb..bd9d75e15 100644 --- a/stratum/remote.cpp +++ b/stratum/remote.cpp @@ -89,12 +89,12 @@ bool remote_connect(YAAMP_REMOTE *remote) return false; } - int flags = fcntl(sock, F_GETFL, 0); - fcntl(sock, F_SETFL, flags|O_NONBLOCK); +// int flags = fcntl(sock, F_GETFL, 0); +// fcntl(sock, F_SETFL, flags|O_NONBLOCK); remote->status = YAAMP_REMOTE_SUBSCRIBE; remote->sock = socket_initialize(sock); - remote->updated = time(NULL); +// remote->updated = time(NULL); debuglog("connected to %s:%d JOB%d\n", remote->host, remote->port, remote->id); return true; @@ -203,12 +203,12 @@ void *remote_thread(void *p) { if(remote->submit_last) remote->submit_last->valid = false; - json_value *json_error = json_get_array(json, "error"); - if(json_error && json_error->type == json_array && json_error->u.array.length > 1) - { - debuglog("remote submit error JOB%d %d %s ***\n", remote->id, - (int)json_error->u.array.values[0]->u.integer, json_error->u.array.values[1]->u.string.ptr); - } +// json_value *json_error = json_get_array(json, "error"); +// if(json_error && json_error->type == json_array && json_error->u.array.length > 1) +// { +// debuglog("remote submit error JOB%d %d %s ***\n", remote->id, +// (int)json_error->u.array.values[0]->u.integer, json_error->u.array.values[1]->u.string.ptr); +// } } } @@ -296,4 +296,3 @@ void *remote_thread(void *p) - From 6e3bca7413b732c3c8a311ccfbb2691ca3121433 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 20:24:20 -0500 Subject: [PATCH 540/576] Update Makefile --- stratum/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/Makefile b/stratum/Makefile index e12853841..faa318edc 100755 --- a/stratum/Makefile +++ b/stratum/Makefile @@ -6,7 +6,7 @@ SQLFLAGS= `mysql_config --cflags --libs` # Comment this line to disable address check on login, # if you use the auto exchange feature... -CFLAGS += -DNO_EXCHANGE +# CFLAGS += -DNO_EXCHANGE #CFLAGS=-c -O2 -I /usr/include/mysql LDFLAGS=-O2 `mysql_config --libs` From 69209902dd5c879109e1e89da086052dd61d0676 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 20:33:10 -0500 Subject: [PATCH 541/576] Update Makefile --- stratum/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/Makefile b/stratum/Makefile index faa318edc..e12853841 100755 --- a/stratum/Makefile +++ b/stratum/Makefile @@ -6,7 +6,7 @@ SQLFLAGS= `mysql_config --cflags --libs` # Comment this line to disable address check on login, # if you use the auto exchange feature... -# CFLAGS += -DNO_EXCHANGE +CFLAGS += -DNO_EXCHANGE #CFLAGS=-c -O2 -I /usr/include/mysql LDFLAGS=-O2 `mysql_config --libs` From ef487cab36c1476481b9d45f7ceae6bf3d6cf671 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 22:04:59 -0500 Subject: [PATCH 542/576] Update stratum.h --- stratum/stratum.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/stratum.h b/stratum/stratum.h index f1bca9cfe..d493dda34 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -204,6 +204,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/qubit.h" #include "algos/rainforest.h" #include "algos/rfv2.h" +#include "algos/sha256.h" #include "algos/sha256q.h" #include "algos/sha256t.h" #include "algos/sib.h" From 05f10a574f30dedb8a9293fe922ca7da464746e0 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sun, 26 Jan 2020 22:07:19 -0500 Subject: [PATCH 543/576] Update stratum.h --- stratum/stratum.h | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/stratum.h b/stratum/stratum.h index d493dda34..f1bca9cfe 100644 --- a/stratum/stratum.h +++ b/stratum/stratum.h @@ -204,7 +204,6 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len); #include "algos/qubit.h" #include "algos/rainforest.h" #include "algos/rfv2.h" -#include "algos/sha256.h" #include "algos/sha256q.h" #include "algos/sha256t.h" #include "algos/sib.h" From eb30402ecb9d61b94bc42c5fce2d29201c66cdb1 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 3 Feb 2020 13:37:54 -0500 Subject: [PATCH 544/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 753229647..07bb0dc54 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1478,7 +1478,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available/100000000*coind->reward_mul; // debuglog("coinbase %f\n", coind->reward); - debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); +// debuglog("coinbase %s: version %s, nbits %s, time %s\n", coind->symbol, templ->version, templ->nbits, templ->ntime); // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } From c470f55b9850378e54ea14074179d3b39e6559b6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 3 Feb 2020 13:42:35 -0500 Subject: [PATCH 545/576] Update remote.cpp --- stratum/remote.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/stratum/remote.cpp b/stratum/remote.cpp index bd9d75e15..e56ba501b 100644 --- a/stratum/remote.cpp +++ b/stratum/remote.cpp @@ -89,12 +89,12 @@ bool remote_connect(YAAMP_REMOTE *remote) return false; } -// int flags = fcntl(sock, F_GETFL, 0); -// fcntl(sock, F_SETFL, flags|O_NONBLOCK); + int flags = fcntl(sock, F_GETFL, 0); + fcntl(sock, F_SETFL, flags|O_NONBLOCK); remote->status = YAAMP_REMOTE_SUBSCRIBE; remote->sock = socket_initialize(sock); -// remote->updated = time(NULL); + remote->updated = time(NULL); debuglog("connected to %s:%d JOB%d\n", remote->host, remote->port, remote->id); return true; @@ -203,12 +203,12 @@ void *remote_thread(void *p) { if(remote->submit_last) remote->submit_last->valid = false; -// json_value *json_error = json_get_array(json, "error"); -// if(json_error && json_error->type == json_array && json_error->u.array.length > 1) -// { -// debuglog("remote submit error JOB%d %d %s ***\n", remote->id, -// (int)json_error->u.array.values[0]->u.integer, json_error->u.array.values[1]->u.string.ptr); -// } + json_value *json_error = json_get_array(json, "error"); + if(json_error && json_error->type == json_array && json_error->u.array.length > 1) + { + debuglog("remote submit error JOB%d %d %s ***\n", remote->id, + (int)json_error->u.array.values[0]->u.integer, json_error->u.array.values[1]->u.string.ptr); + } } } From c121ae17df838fe1111179bd8efdbdb7c032e00b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 3 Feb 2020 14:05:36 -0500 Subject: [PATCH 546/576] Update remote.cpp --- stratum/remote.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stratum/remote.cpp b/stratum/remote.cpp index e56ba501b..356d7c41f 100644 --- a/stratum/remote.cpp +++ b/stratum/remote.cpp @@ -89,12 +89,12 @@ bool remote_connect(YAAMP_REMOTE *remote) return false; } - int flags = fcntl(sock, F_GETFL, 0); - fcntl(sock, F_SETFL, flags|O_NONBLOCK); +// int flags = fcntl(sock, F_GETFL, 0); +// fcntl(sock, F_SETFL, flags|O_NONBLOCK); remote->status = YAAMP_REMOTE_SUBSCRIBE; remote->sock = socket_initialize(sock); - remote->updated = time(NULL); +// remote->updated = time(NULL); debuglog("connected to %s:%d JOB%d\n", remote->host, remote->port, remote->id); return true; @@ -295,4 +295,3 @@ void *remote_thread(void *p) - From d862445693a7c2c7bec30406e7e87001ef2046aa Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 3 Feb 2020 16:25:23 -0500 Subject: [PATCH 547/576] Update remote_template.cpp --- stratum/remote_template.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratum/remote_template.cpp b/stratum/remote_template.cpp index 6235b705a..4573e1680 100644 --- a/stratum/remote_template.cpp +++ b/stratum/remote_template.cpp @@ -15,8 +15,8 @@ void remote_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VALUES *submi uint64_t hash_int = get_hash_difficulty(submitvalues->hash_bin); uint64_t remote_target = diff_to_target(remote->difficulty_actual); -// debuglog("%016llx actual\n", hash_int); -// debuglog("%016llx target diff multiplier=%u\n", remote_target, g_current_algo->diff_multiplier); + debuglog("%016llx actual\n", hash_int); + debuglog("%016llx target diff multiplier=%u\n", remote_target, g_current_algo->diff_multiplier); if(hash_int > remote_target) return; remote->speed_avg += remote->difficulty_actual / g_current_algo->diff_multiplier * 42; From 88edbed57ca0db06a7e2cf7fd40d01df9d47788d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Fri, 7 Feb 2020 14:58:28 -0500 Subject: [PATCH 548/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 136 +++++++++++++++++++++-------- 1 file changed, 99 insertions(+), 37 deletions(-) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 0de0f1483..03f32f409 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -513,7 +513,7 @@ function yaamp_convert_earnings_user($user, $status) return $value; } -//////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////credits to Alexg for PHP code changes////////////////////////////////////////// function yaamp_pool_rate($algo=null) { @@ -533,12 +533,18 @@ function yaamp_pool_rate_bad($algo=null) { if(!$algo) $algo = user()->getState('yaamp-algo'); + $rate = controller()->memcache->get("yaamp_pool_rate_bad-$algo"); + if($rate === false) { + $target = yaamp_hashrate_constant($algo); $interval = yaamp_hashrate_step(); $delay = time()-$interval; - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_bad-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE not valid AND time>$delay AND algo=:algo", array(':algo'=>$algo)); + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE not valid AND time>$delay AND algo=:algo", array(':algo'=>$algo)); + $rate = $rate * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_pool_rate_bad-$algo", $rate, $t); + } return $rate; } @@ -547,12 +553,18 @@ function yaamp_pool_rate_rentable($algo=null) { if(!$algo) $algo = user()->getState('yaamp-algo'); + $rate = controller()->memcache->get("yaamp_pool_rate_rentable-$algo"); + if($rate === false) { + $target = yaamp_hashrate_constant($algo); $interval = yaamp_hashrate_step(); $delay = time()-$interval; - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_rentable-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND extranonce1 AND time>$delay AND algo=:algo", array(':algo'=>$algo)); + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND extranonce1 AND time>$delay AND algo=:algo", array(':algo'=>$algo)); + $rate = $rate * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_pool_rate_rentable-$algo", $rate, $t); + } return $rate; } @@ -561,12 +573,18 @@ function yaamp_user_rate($userid, $algo=null) { if(!$algo) $algo = user()->getState('yaamp-algo'); + $rate = controller()->memcache->get("yaamp_user_rate-$userid-$algo"); + if($rate === false) { + $target = yaamp_hashrate_constant($algo); $interval = yaamp_hashrate_step(); $delay = time()-$interval; - $rate = controller()->memcache->get_database_scalar("yaamp_user_rate-$userid-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); + $rate = $rate * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_user_rate-$userid-$algo", $rate, $t); + } return $rate; } @@ -575,6 +593,9 @@ function yaamp_user_rate_bad($userid, $algo=null) { if(!$algo) $algo = user()->getState('yaamp-algo'); + $rate = controller()->memcache->get("yaamp_user_rate_bad-$userid-$algo"); + if($rate === false) { + $target = yaamp_hashrate_constant($algo); $interval = yaamp_hashrate_step(); $delay = time()-$interval; @@ -582,8 +603,11 @@ function yaamp_user_rate_bad($userid, $algo=null) $diff = (double) controller()->memcache->get_database_scalar("yaamp_user_diff_avg-$userid-$algo", "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); - $rate = controller()->memcache->get_database_scalar("yaamp_user_rate_bad-$userid-$algo", - "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM shares WHERE valid!=1 AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); + $rate = dboscalar("SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); + $rate = $rate * $diff * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_user_rate_bad-$userid-$algo", $rate, $t); + } return $rate; } @@ -592,12 +616,18 @@ function yaamp_worker_rate($workerid, $algo=null) { if(!$algo) $algo = user()->getState('yaamp-algo'); + $rate = controller()->memcache->get("yaamp_worker_rate-$workerid-$algo"); + if($rate === false) { + $target = yaamp_hashrate_constant($algo); $interval = yaamp_hashrate_step(); $delay = time()-$interval; - $rate = controller()->memcache->get_database_scalar("yaamp_worker_rate-$workerid-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); + $rate = $rate * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_worker_rate-$workerid-$algo", $rate, $t); + } return $rate; } @@ -606,6 +636,9 @@ function yaamp_worker_rate_bad($workerid, $algo=null) { if(!$algo) $algo = user()->getState('yaamp-algo'); + $rate = controller()->memcache->get("yaamp_worker_rate_bad-$workerid-$algo"); + if($rate === false) { + $target = yaamp_hashrate_constant($algo); $interval = yaamp_hashrate_step(); $delay = time()-$interval; @@ -613,8 +646,12 @@ function yaamp_worker_rate_bad($workerid, $algo=null) $diff = (double) controller()->memcache->get_database_scalar("yaamp_worker_diff_avg-$workerid-$algo", "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); - $rate = controller()->memcache->get_database_scalar("yaamp_worker_rate_bad-$workerid-$algo", - "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM shares WHERE valid!=1 AND time>$delay AND workerid=".$workerid); + $rate = dboscalar("SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND workerid=".$workerid); + + $rate = $rate * $diff * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_worker_rate_bad-$workerid-$algo", $rate, $t); + } return empty($rate)? 0: $rate; } @@ -637,12 +674,18 @@ function yaamp_coin_rate($coinid) $coin = getdbo('db_coins', $coinid); if(!$coin || !$coin->enable) return 0; + $rate = controller()->memcache->get("yaamp_coin_rate-$coinid"); + if($rate === false) { + $target = yaamp_hashrate_constant($coin->algo); $interval = yaamp_hashrate_step(); $delay = time()-$interval; - $rate = controller()->memcache->get_database_scalar("yaamp_coin_rate-$coinid", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND coinid=$coinid"); + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND coinid=$coinid"); + $rate = $rate * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_coin_rate-$coinid", $rate, $t); + } return $rate; } @@ -651,46 +694,65 @@ function yaamp_rented_rate($algo=null) { if(!$algo) $algo = user()->getState('yaamp-algo'); + $rate = controller()->memcache->get("yaamp_rented_rate-$algo"); + if($rate === false) { + $target = yaamp_hashrate_constant($algo); $interval = yaamp_hashrate_step(); $delay = time()-$interval; - $rate = controller()->memcache->get_database_scalar("yaamp_rented_rate-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE time>$delay AND algo=:algo AND jobid!=0 AND valid", array(':algo'=>$algo)); + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE time>$delay AND algo=:algo AND jobid!=0 AND valid", array(':algo'=>$algo)); + $rate = $rate * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_rented_rate-$algo", $rate, $t); + } return $rate; } function yaamp_job_rate($jobid) { - $job = getdbo('db_jobs', $jobid); - if(!$job) return 0; - - $target = yaamp_hashrate_constant($job->algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; - - $rate = controller()->memcache->get_database_scalar("yaamp_job_rate-$jobid", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); - return $rate; + $job = getdbo('db_jobs', $jobid); + if(!$job) return 0; + + $rate = controller()->memcache->get("yaamp_job_rate-$jobid"); + if($rate === false) { + + $target = yaamp_hashrate_constant($job->algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; + + $rate = dboscalar("SELECT sum(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); + $rate = $rate * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_job_rate-$jobid", $rate, $t); + } + + return $rate; } function yaamp_job_rate_bad($jobid) { - $job = getdbo('db_jobs', $jobid); - if(!$job) return 0; + $job = getdbo('db_jobs', $jobid); + if(!$job) return 0; - $target = yaamp_hashrate_constant($job->algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $rate = controller()->memcache->get("yaamp_job_rate_bad-$jobid"); + if($rate === false) { - $diff = (double) controller()->memcache->get_database_scalar("yaamp_job_diff_avg-$jobid", - "SELECT avg(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); + $target = yaamp_hashrate_constant($job->algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; - $rate = controller()->memcache->get_database_scalar("yaamp_job_rate_bad-$jobid", - "SELECT ((count(id) * $diff) * $target / $interval / 1000) FROM jobsubmits WHERE valid!=1 AND time>$delay AND jobid=".$jobid); + $diff = (double) controller()->memcache->get_database_scalar("yaamp_job_diff_avg-$jobid", + "SELECT avg(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); - return $rate; + $rate = dboscalar("SELECT count(id) FROM jobsubmits WHERE valid!=1 AND time>$delay AND jobid=".$jobid); + $rate = $rate * $diff * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_job_rate_bad-$jobid", $rate, $t); + } + + return $rate; } ////////////////////////////////////////////////////////////////////////////////////////////////////// From 695d52e6fcd64ed9085913556650a7e15c39cc84 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 8 Feb 2020 02:41:40 -0500 Subject: [PATCH 549/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 07bb0dc54..095d3aa99 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1473,6 +1473,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + if(strcmp(coind->symbol, "DALC") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; From 97dab54833fa59d246591683ced49fe5cfe77f44 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Sat, 8 Feb 2020 02:47:58 -0500 Subject: [PATCH 550/576] Update coinbase.cpp --- stratum/coinbase.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 095d3aa99..07bb0dc54 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -1473,7 +1473,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - if(strcmp(coind->symbol, "DALC") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; From 283ef33b94af96bee7f9faaaace41cdfe6f8f5a6 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 17 Feb 2020 23:44:23 -0500 Subject: [PATCH 551/576] Update coinbase.cpp --- stratum/coinbase.cpp | 630 ++++++++++--------------------------------- 1 file changed, 141 insertions(+), 489 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 07bb0dc54..9bb6590fa 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -14,7 +14,7 @@ static void encode_tx_value(char *encoded, json_int_t value) TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); } -static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *payee) +static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *payee) { char evalue[32]; char coinb2_part[256]; @@ -27,19 +27,6 @@ static void p2sh_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char strcat(data, coinb2_part); } -static void script_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, const char *script) -{ - char evalue[32]; - char coinb2_part[256]; - char coinb2_len[4]; - encode_tx_value(evalue, amount); - sprintf(coinb2_part, "%s", script); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(data, evalue); - strcat(data, coinb2_len); - strcat(data, coinb2_part); -} - static void job_pack_tx(YAAMP_COIND *coind, char *data, json_int_t amount, char *key) { int ol = strlen(data); @@ -103,16 +90,16 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * unsigned char pricehash_bin[1024]; char pricehash_hex[1024]; char pricehash_be[1024]; - + if (templ->needpriceinfo && strlen(templ->priceinfo) > 0 && strlen(templ->priceinfo) < 1000) { binlify(price_bin, templ->priceinfo); - + int price_len = strlen(templ->priceinfo)/2; sha256_double_hash((char *)price_bin, (char *)pricehash_bin, price_len); hexlify(pricehash_hex, pricehash_bin, 32); string_be(pricehash_hex, pricehash_be); - + sprintf(params, "[\"%s\", %i, \"%s\"]", coind->wallet, templ->height, pricehash_be); } else { sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); @@ -127,7 +114,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbaseforhashpart1")); templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbaseforhashpart2")); - + sprintf(templ->coinforsubmitb1, "%s", json_get_string(json_result, "coinbasepart1")); templ->coinforsubmitb1[strlen(templ->coinforsubmitb1) - 16] = '\0'; sprintf(templ->coinforsubmitb2, "%s", json_get_string(json_result, "coinbasepart2")); @@ -137,6 +124,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } return; } + char eheight[32], etime[32]; char entime[32] = { 0 }; char commitment[128] = { 0 }; @@ -148,11 +136,11 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char eversion1[32] = "01000000"; if(coind->txmessage) strcpy(eversion1, "02000000"); - + const char *coinbase_payload = json_get_string(json_result, "coinbase_payload"); - if(coinbase_payload && strlen(coinbase_payload) > 0) + if (coinbase_payload && strlen(coinbase_payload) > 0) { strcpy(eversion1, "03000500"); - + } char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); @@ -181,7 +169,46 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); } - + if(strcmp(coind->symbol, "SIN") == 0) + { + int npayees = 1; + char payees[2]; + char sinpayee[256] = {0}; + char sinscript[1024] = {0}; + char devpayee[256] = {0}; + char devscript[1024] = {0}; + const char *devpayaddr = json_get_string(json_result, "payee"); + json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); + snprintf(devpayee, 255, "%s", devpayaddr); + base58_decode(devpayee, devscript); + npayees++; + + available -= devfee_amount; + const char* mnpayaddrs[7] = {0}; + json_value* masternodes = json_get_array(json_result, "masternode"); + json_int_t mnamounts[7] = {0}; + for(int i = 0; i < masternodes->u.array.length; i++) { + mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); + mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); + available -= mnamounts[i]; + npayees++; + } + + sprintf(payees, "%02x", npayees); + strcat(templ->coinb2, payees); + job_pack_tx(coind, templ->coinb2, available, NULL); + job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); + for(int i = 0; i < masternodes->u.array.length; i++) { + snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); + base58_decode(sinpayee, sinscript); + job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); + } + + strcat(templ->coinb2, "00000000"); + coind->reward = (double)available/100000000; + return; + } + else if(strcmp(coind->symbol, "DYN") == 0) { char script_dests[2048] = { 0 }; @@ -245,54 +272,39 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); return; } - else if(strcmp(coind->symbol, "LTCR") == 0) { if (coind->charity_percent <= 0) coind->charity_percent = 10; if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "BCDrF1hWdKTmrjXXVFTezPjKBmGigmaXg5"); } - - else if(strcmp(coind->symbol, "GEEK") == 0) { + else if(strcmp(coind->symbol, "XZC") == 0) { + char script_payee[1024]; if (coind->charity_percent <= 0) - coind->charity_percent = 2.5; + coind->charity_percent = 25; // wrong coinbase 40 instead of 40 + 10 = 50 + + json_int_t charity_amount = (available * coind->charity_percent) / 100; + if (strlen(coind->charity_address) == 0) - sprintf(coind->charity_address, "GRpdbSh3Z2FMjJH96CFPK5TzEb47Zg6FFR"); - } - - else if(strcmp(coind->symbol, "XZC") == 0) { - char script_payee[1024]; - bool znode_masternode_enabled = json_get_bool(json_result, "znode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "znode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("znode payee: %s\n", payee); - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); - job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); - base58_decode("aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD", script_payee); - job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); - base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); - job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); - base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); - job_pack_tx(coind, templ->coinb2, 3 * 100000000, script_payee); - base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); - job_pack_tx(coind, templ->coinb2, 1 * 100000000, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } + sprintf(coind->charity_address, "aHu897ivzmeFuLNB6956X6gyGeVNHUBRgD"); + strcat(templ->coinb2, "06"); + job_pack_tx(coind, templ->coinb2, available, NULL); + base58_decode("aCAgTPgtYcA4EysU4UKC86EQd5cTtHtCcr", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode(coind->charity_address, script_payee); // may change + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("aQ18FBVFtnueucZKeVg4srhmzbpAeb1KoN", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("a1HwTdCmQV3NspP2QqCGpehoFpi8NY4Zg3", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + base58_decode("a1kCCGddf5pMXSipLVD9hBG2MGGVNaJ15U", script_payee); + job_pack_tx(coind, templ->coinb2, charity_amount/5, script_payee); + strcat(templ->coinb2, "00000000"); // locktime + + coind->reward = (double)available/100000000*coind->reward_mul; + return; + } else if(strcmp("DCR", coind->rpcencoding) == 0) { coind->reward_mul = 6; // coinbase value is wrong, reward_mul should be 6 coind->charity_percent = 0; @@ -301,128 +313,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0 && !strcmp(coind->symbol, "DCR")) sprintf(coind->charity_address, "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"); } - - // THIS CODE FOR SMART IS NOT WORKING YET AND NEEDS WORK. BLOCKS GET REJECTED WITH MESSAGE NO FOUNDER REWARDS. - else if (strcmp(coind->symbol, "SMART") == 0) { - char script_payee[512] = { 0 }; - char payees[5]; - int npayees = (templ->has_segwit_txs) ? 2 : 1; - bool masternode_payments = json_get_bool(json_result, "masternode_payments"); - bool masternodes_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (masternodes_enabled && masternode_payments) { - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) - ++npayees; - } - //treasury 5000 * (143500/Blockheight) per block - int coinvalue = floor(0.5+((double)(5000 * 143500)/(templ->height +1))); - json_int_t charity_amount = coinvalue * 0.95; - int blockRotation = templ->height - 95 * (templ->height/95); - if (blockRotation >= 0 && blockRotation <= 7) { - sprintf(coind->charity_address, "Siim7T5zMH3he8xxtQzhmHs4CQSuMrCV1M"); - } - if (blockRotation >= 8 && blockRotation <= 15) { - sprintf(coind->charity_address, "SW2FbVaBhU1Www855V37auQzGQd8fuLR9x"); - } - if (blockRotation >= 16 && blockRotation <= 23) { - sprintf(coind->charity_address, "SPusYr5tUdUyRXevJg7pnCc9Sm4HEzaYZF"); - } - if (blockRotation >= 24 && blockRotation <= 38) { - sprintf(coind->charity_address, "SU5bKb35xUV8aHG5dNarWHB3HBVjcCRjYo"); - } - if (blockRotation >= 39 && blockRotation <= 94) { - sprintf(coind->charity_address, "SXun9XDHLdBhG4Yd1ueZfLfRpC9kZgwT1b"); - } - ++npayees; - available -= charity_amount; - base58_decode(coind->charity_address, script_payee); - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - if (templ->has_segwit_txs) strcat(templ->coinb2, commitment); - char echarity_amount[32]; - encode_tx_value(echarity_amount, charity_amount); - strcat(templ->coinb2, echarity_amount); - char coinb2_part[1024] = { 0 }; - char coinb2_len[3] = { 0 }; - sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee); - sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF); - strcat(templ->coinb2, coinb2_len); - strcat(templ->coinb2, coinb2_part); - if (masternodes_enabled && masternode_payments) { - //duplicated: revisit ++todo - const char *payee = json_get_string(json_result, "payee"); - json_int_t amount = json_get_int(json_result, "payee_amount"); - if (payee && amount) { - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "HXX") == 0) { - char script_payee[1024]; - bool znode_masternode_enabled = json_get_bool(json_result, "xnode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "xnode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "06"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "05"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - base58_decode("HE7NSv3jevUAPjwsLGpoYSz9ftzV9S36Xq", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - base58_decode("HNdzbEtifr2nTd3VBvUWqJLc35ZFXr2EYo", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - base58_decode("HG1utYiVhkgBNz5ezrVpsjABxmMdVdcQe5", script_payee); - job_pack_tx(coind, templ->coinb2, 0.1 * 100000000, script_payee); - base58_decode("H94j1zMAbWwHWcEq8hUogAMALpVzj34M6Q", script_payee); - job_pack_tx(coind, templ->coinb2, 0.3 * 100000000, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - - else if(strcmp(coind->symbol, "BZX") == 0) { - char script_payee[1024]; - bool znode_masternode_enabled = json_get_bool(json_result, "bznode_payments_started"); - if (znode_masternode_enabled == true) { - json_value* znode_masternode = json_get_object(json_result, "bznode"); - const char *payee = json_get_string(znode_masternode, "payee"); - json_int_t amount = json_get_int(znode_masternode, "amount"); - if (payee && amount) { - //debuglog("bznode payee: %s\n", payee); - strcat(templ->coinb2, "04"); - job_pack_tx(coind, templ->coinb2, available, NULL); - base58_decode(payee, script_payee); - job_pack_tx(coind, templ->coinb2, amount, script_payee); - } - } else { - strcat(templ->coinb2, "03"); - job_pack_tx(coind, templ->coinb2, available, NULL); - } - base58_decode("XWfdnGbXnBxeegrPJEvnYaNuwf6DXCruMX", script_payee); - job_pack_tx(coind, templ->coinb2, 6.75 * 100000000, script_payee); - base58_decode("XQ4WEZTFP83gVhhLBKavwopz7U84JucR8w", script_payee); - job_pack_tx(coind, templ->coinb2, 2.25 * 100000000, script_payee); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - else if(strcmp(coind->symbol, "STAK") == 0) { char script_payee[512] = { 0 }; char payees[4]; @@ -482,7 +372,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - else if(strcmp(coind->symbol, "TUX") == 0) { char script_payee[1024]; char charity_payee[256] = { 0 }; @@ -531,8 +420,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } } - - else if(strcmp(coind->symbol, "PGN") == 0) { + bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); json_value* founder = json_get_object(json_result, "founder"); @@ -568,52 +456,50 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * debuglog("%s founder script %s\n", coind->symbol,founder_script); debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - return; + return; } } -} + else if(strcmp(coind->symbol, "RITO") == 0) { bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); json_value* founder = json_get_object(json_result, "founder"); +if (!coind->hasmasternodes && founder_enabled && founder) { + char founder_payee[256] = { 0 }; + char founder_script[1024] = { 0}; + const char *payee = json_get_string(founder, "payee"); + bool founder_use_p2sh = (strcmp(coind->symbol, "RITO") == 0); + json_int_t amount = json_get_int(founder, "amount"); + if(payee && amount) { + if (payee) snprintf(founder_payee, 255, "%s", payee); + if (strlen(founder_payee) == 0) + stratumlog("ERROR %s has no charity_address set!\n", coind->name); + base58_decode(founder_payee, founder_script); + available -= amount; - if (!coind->hasmasternodes && founder_enabled && founder) { - char founder_payee[256] = { 0 }; - char founder_script[1024] = { 0}; - const char *payee = json_get_string(founder, "payee"); - bool founder_use_p2sh = (strcmp(coind->symbol, "RITO") == 0); - json_int_t amount = json_get_int(founder, "amount"); - if(payee && amount) { - if (payee) snprintf(founder_payee, 255, "%s", payee); - if (strlen(founder_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - base58_decode(founder_payee, founder_script); - available -= amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - if(founder_use_p2sh) { - p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); - } else { - job_pack_tx(coind, templ->coinb2, amount, founder_script); - } - strcat(templ->coinb2, "00000000"); // locktime + if (templ->has_segwit_txs) { + strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) + strcat(templ->coinb2, commitment); + } else { + strcat(templ->coinb2, "02"); + } + job_pack_tx(coind, templ->coinb2, available, NULL); + if(founder_use_p2sh) { + p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); + } else { + job_pack_tx(coind, templ->coinb2, amount, founder_script); + } + strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); - debuglog("%s founder script %s\n", coind->symbol,founder_script); - debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); + coind->reward = (double)available/100000000*coind->reward_mul; + debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); + debuglog("%s founder script %s\n", coind->symbol,founder_script); + debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - return; - } + return; } } - +} // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) { @@ -701,7 +587,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - + // add GTM if (strcmp(coind->symbol, "GTM") == 0) { @@ -747,51 +633,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - // add GWAY - if (strcmp(coind->symbol, "GWAY") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - + // add AGM if (strcmp(coind->symbol, "AGM") == 0) { char payees[4]; @@ -835,8 +677,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available / 100000000 * coind->reward_mul; return; } - - // add CRDS + + // add CRDS if (strcmp(coind->symbol, "CRDS") == 0) { char payees[4]; @@ -926,90 +768,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * return; } - //Add BNODE - if (strcmp(coind->symbol, "BNODE") == 0) - { - char script_dests[4096] = { 0 }; - char script_payee[128] = { 0 }; - char payees[4]; - int npayees = 1; - - json_value* evolution = json_get_object(json_result, "evolution"); - bool evolution_enabled = json_get_bool(json_result, "evolution_payments_enforced"); - bool evolution_started = json_get_bool(json_result, "evolution_payments_started"); - if (evolution_enabled && evolution && evolution_started) { - if (json_is_array(evolution)) { - for(int i = 0; i < evolution->u.array.length; i++) { - const char *payee = json_get_string(evolution->u.array.values[i], "payee"); - const char *script = json_get_string(evolution->u.array.values[i], "script"); - json_int_t amount = json_get_int(evolution->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s evolution %s %u\n", coind->symbol, payee, amount); - } - } - } else { - const char *payee = json_get_string(evolution, "payee"); - json_int_t amount = json_get_int(evolution, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - } - - json_value* masternode = json_get_object(json_result, "masternode"); - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (masternode && started) { - if (json_is_array(masternode)) { - for(int i = 0; i < masternode->u.array.length; i++) { - const char *payee = json_get_string(masternode->u.array.values[i], "payee"); - const char *script = json_get_string(masternode->u.array.values[i], "script"); - json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); - } - } - } else { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - } - - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - //add GLT else if(strcmp(coind->symbol, "GLT") == 0) { @@ -1052,108 +810,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); return; } - - // Add DigitalNote[XDN] - if(strcmp(coind->symbol, "XDN") == 0) { - - // make sure we pay both mn and devops - bool founder_enabled = json_get_bool(json_result, "founder_reward_enforced"); - bool masternode_enabled = json_get_bool(json_result, "enforce_masternode_payments"); - if (!founder_enabled || !masternode_enabled) - return; - - // founder/masternode vars - char founder_script[1024] = { 0}; - char masternode_script[1024] = { 0}; - char founder_payee[256] = { 0}; - char masternode_payee[256] = { 0}; - json_int_t part_amount = (5000000000); - json_int_t pool_amount = (5000000000*4); - json_value* founder = json_get_object(json_result, "founderreward"); - const char *payee1 = json_get_string(json_result, "payee"); - const char *payee2 = json_get_string(founder, "payee"); - - // mn script - snprintf(masternode_payee, 255, "%s", payee1); - base58_decode(masternode_payee, masternode_script); - available -= part_amount; - - // payee script - snprintf(founder_payee, 255, "%s", payee2); - base58_decode(founder_payee, founder_script); - available -= part_amount; - - // total outputs - strcat(templ->coinb2, "03"); - - // pack the tx - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, part_amount, founder_script); - job_pack_tx(coind, templ->coinb2, part_amount, masternode_script); - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available/100000000*coind->reward_mul; - return; - } - - if(strcmp(coind->symbol, "SIN") == 0) - { - int npayees = 1; - char payees[2]; - char sinpayee[256] = {0}; - char sinscript[1024] = {0}; - char devpayee[256] = {0}; - char devscript[1024] = {0}; - const char *devpayaddr = json_get_string(json_result, "payee"); - json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); - snprintf(devpayee, 255, "%s", devpayaddr); - base58_decode(devpayee, devscript); - npayees++; - - available -= devfee_amount; - const char* mnpayaddrs[7] = {0}; - json_value* masternodes = json_get_array(json_result, "masternode"); - json_int_t mnamounts[7] = {0}; - for(int i = 0; i < masternodes->u.array.length; i++) { - mnpayaddrs[i] = json_get_string(masternodes->u.array.values[i], "payee"); - mnamounts[i] = json_get_int(masternodes->u.array.values[i], "amount"); - available -= mnamounts[i]; - npayees++; - } - - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - job_pack_tx(coind, templ->coinb2, available, NULL); - job_pack_tx(coind, templ->coinb2, devfee_amount, devscript); - for(int i = 0; i < masternodes->u.array.length; i++) { - snprintf(sinpayee, 255, "%s", mnpayaddrs[i]); - base58_decode(sinpayee, sinscript); - job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); - } - - strcat(templ->coinb2, "00000000"); - coind->reward = (double)available/100000000; - return; - } - - if(strcmp(coind->symbol, "BITC") == 0) - { - char *params = (char *)malloc(1024); - if (params) { - sprintf(params, "[\"%s\", %i]", coind->wallet, templ->height); - //std::cout << "Params:" << params << std::endl; - json_value *json = rpc_call(&coind->rpc, "createcoinbaseforaddress", params); - free(params); - if (json) { - json_value *json_result = json_get_object(json, "result"); - if (json_result) { - sprintf(templ->coinb1, "%s", json_get_string(json_result, "coinbasepart1")); - templ->coinb1[strlen(templ->coinb1) - 16] = '\0'; - sprintf(templ->coinb2, "%s", json_get_string(json_result, "coinbasepart2")); - } - } - } - return; - } if(strcmp(coind->symbol, "XVC") == 0) { @@ -1223,14 +879,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if(superblocks_enabled && superblock) { for(int i = 0; i < superblock->u.array.length; i++) { const char *payee = json_get_string(superblock->u.array.values[i], "payee"); - const char *script = json_get_string(superblock->u.array.values[i], "script"); json_int_t amount = json_get_int(superblock->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { + if (payee && amount) { npayees++; available -= amount; base58_decode(payee, script_payee); @@ -1243,35 +893,29 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } } } - - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (masternode_enabled && masternode && started) { - if (json_is_array(masternode)) { + if (masternode_enabled && masternode) { + bool started = json_get_bool(json_result, "masternode_payments_started"); + if (json_is_array(masternode)) { for(int i = 0; i < masternode->u.array.length; i++) { const char *payee = json_get_string(masternode->u.array.values[i], "payee"); - const char *script = json_get_string(masternode->u.array.values[i], "script"); json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (!amount) continue; - if (script) { - npayees++; - available -= amount; - script_pack_tx(coind, script_dests, amount, script); - } else if (payee) { + if (payee && amount && started) { npayees++; available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else + const char *script = json_get_string(masternode->u.array.values[i], "script"); + if (script) { + p2sh_pack_tx(coind, script_dests, amount, script); + } else { + base58_decode(payee, script_payee); job_pack_tx(coind, script_dests, amount, script_payee); + } //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); } } } else { const char *payee = json_get_string(masternode, "payee"); json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { + if (payee && amount && started) { npayees++; available -= amount; base58_decode(payee, script_payee); @@ -1281,6 +925,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * else job_pack_tx(coind, script_dests, amount, script_payee); } + } } sprintf(payees, "%02x", npayees); @@ -1289,17 +934,24 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * strcat(templ->coinb2, script_dests); job_pack_tx(coind, templ->coinb2, available, NULL); strcat(templ->coinb2, "00000000"); // locktime - if(coinbase_payload && strlen(coinbase_payload) > 0) { - char coinbase_payload_size[18]; - ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload_size); - strcat(templ->coinb2, coinbase_payload); - } - coind->reward = (double)available/100000000*coind->reward_mul; //debuglog("%s total %u available %u\n", coind->symbol, templ->value, available); //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; + + // FIXME: it assumes that coinbase_payload length < 0xFD. + // Otherwise the full compactSize implementation is necessary. + if (coinbase_payload && strlen(coinbase_payload) > 0) { + unsigned int len = (strlen(coinbase_payload) >> 1) & 0xFF; + if (len < 0xFD) { + char cb_payload_len[4]; + sprintf(cb_payload_len, "%02x", len); + strcat(templ->coinb2, cb_payload_len); + strcat(templ->coinb2, coinbase_payload); + } else { + strcat(templ->coinb2, "00"); + } + } + return; } else if(strcmp(coind->symbol, "ARC") == 0) @@ -1472,7 +1124,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //if(coind->txmessage) // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. - if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; @@ -1482,4 +1135,3 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // debuglog("coinb1 %s\n", templ->coinb1); // debuglog("coinb2 %s\n", templ->coinb2); } - From d948c4e754ba4faaf7114eb3b6d901f33f5e6f82 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 18 Feb 2020 13:45:39 -0500 Subject: [PATCH 552/576] Update coinbase.cpp --- stratum/coinbase.cpp | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 9bb6590fa..cd53ed7ec 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -659,16 +659,37 @@ if (!coind->hasmasternodes && founder_enabled && founder) { if (masternode_enabled && masternode) { bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; + if (json_is_array(masternode)) { + for(int i = 0; i < masternode->u.array.length; i) { + const char *payee = json_get_string(masternode->u.array.values[i], "payee"); + json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); + if (payee && amount && started) { + npayees; available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } + const char *script = json_get_string(masternode->u.array.values[i], "script"); + if (script) { + p2sh_pack_tx(coind, script_dests, amount, script); + } else { + base58_decode(payee, script_payee); + job_pack_tx(coind, script_dests, amount, script_payee); + } +//debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); } +} + } else { + const char *payee = json_get_string(masternode, "payee"); + json_int_t amount = json_get_int(masternode, "amount"); + if (payee && amount && started) { + npayees; + available -= amount; + base58_decode(payee, script_payee); + bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); + if(masternode_use_p2sh) + p2sh_pack_tx(coind, script_dests, amount, script_payee); + else + job_pack_tx(coind, script_dests, amount, script_payee); +} + } sprintf(payees, "%02x", npayees); strcat(templ->coinb2, payees); strcat(templ->coinb2, script_dests); From 9c744e10d9660909abdaa6a11374e8b27722a176 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 18 Feb 2020 14:31:08 -0500 Subject: [PATCH 553/576] Update coinbase.cpp --- stratum/coinbase.cpp | 88 ++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index cd53ed7ec..d071919b6 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -464,7 +464,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * else if(strcmp(coind->symbol, "RITO") == 0) { bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); json_value* founder = json_get_object(json_result, "founder"); -if (!coind->hasmasternodes && founder_enabled && founder) { + if (!coind->hasmasternodes && founder_enabled && founder) { char founder_payee[256] = { 0 }; char founder_script[1024] = { 0}; const char *payee = json_get_string(founder, "payee"); @@ -633,49 +633,49 @@ if (!coind->hasmasternodes && founder_enabled && founder) { return; } - // add AGM - if (strcmp(coind->symbol, "AGM") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - if (json_is_array(masternode)) { - for(int i = 0; i < masternode->u.array.length; i) { - const char *payee = json_get_string(masternode->u.array.values[i], "payee"); - json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); - if (payee && amount && started) { - npayees; - available -= amount; - const char *script = json_get_string(masternode->u.array.values[i], "script"); - if (script) { - p2sh_pack_tx(coind, script_dests, amount, script); - } else { - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } -//debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); - } -} +// // add AGM +// if (strcmp(coind->symbol, "AGM") == 0) +// { +// char payees[4]; +// int npayees = 1; +// char script_dests[4096] = { 0 }; +// // +// json_value* founderreward = json_get_array(json_result, "founderreward"); +// if (founderreward) +// { +// const char *payee = json_get_string(founderreward, "founderpayee"); +// json_int_t amount = json_get_int(founderreward, "amount"); +// if (payee && amount) +// { +// char script_payee[128] = { 0 }; +// npayees++; +// available -= amount; +// base58_decode(payee, script_payee); +// job_pack_tx(coind, script_dests, amount, script_payee); +// } +// } +// json_value* masternode = json_get_object(json_result, "masternode"); +// bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); +// if (masternode_enabled && masternode) +// { +// bool started = json_get_bool(json_result, "masternode_payments_started"); +// if (json_is_array(masternode)) { +// for(int i = 0; i < masternode->u.array.length; i) { +// const char *payee = json_get_string(masternode->u.array.values[i], "payee"); +// json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); +// if (payee && amount && started) { +// npayees; +// available -= amount; +// const char *script = json_get_string(masternode->u.array.values[i], "script"); +// if (script) { +// p2sh_pack_tx(coind, script_dests, amount, script); +// } else { +// base58_decode(payee, script_payee); +// job_pack_tx(coind, script_dests, amount, script_payee); +// } +// //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); +// } +// } } else { const char *payee = json_get_string(masternode, "payee"); json_int_t amount = json_get_int(masternode, "amount"); From a4680b0ed7b87c86a4dea5b68f281353109fc847 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 20 Feb 2020 15:54:58 -0500 Subject: [PATCH 554/576] Update coinbase.cpp --- stratum/coinbase.cpp | 353 ++----------------------------------------- 1 file changed, 15 insertions(+), 338 deletions(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index d071919b6..046091a6f 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -141,6 +141,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (coinbase_payload && strlen(coinbase_payload) > 0) { strcpy(eversion1, "03000500"); } + char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); @@ -169,8 +170,10 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * if (strlen(coind->charity_address) == 0) sprintf(coind->charity_address, "EdFwYw4Mo2Zq6CFM2yNJgXvE2DTJxgdBRX"); } - if(strcmp(coind->symbol, "SIN") == 0) - { + + if(strcmp(coind->symbol, "SIN") == 0) { + + // these just get reused int npayees = 1; char payees[2]; char sinpayee[256] = {0}; @@ -179,11 +182,14 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char devscript[1024] = {0}; const char *devpayaddr = json_get_string(json_result, "payee"); json_int_t devfee_amount = json_get_int(json_result, "payee_amount"); + + // prepare devpay script snprintf(devpayee, 255, "%s", devpayaddr); base58_decode(devpayee, devscript); npayees++; - available -= devfee_amount; + + // masternode packs const char* mnpayaddrs[7] = {0}; json_value* masternodes = json_get_array(json_result, "masternode"); json_int_t mnamounts[7] = {0}; @@ -204,6 +210,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * job_pack_tx(coind, templ->coinb2, mnamounts[i], sinscript); } + // sequence strcat(templ->coinb2, "00000000"); coind->reward = (double)available/100000000; return; @@ -460,46 +467,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } } - - else if(strcmp(coind->symbol, "RITO") == 0) { - bool founder_enabled = json_get_bool(json_result, "founder_payments_started"); - json_value* founder = json_get_object(json_result, "founder"); - if (!coind->hasmasternodes && founder_enabled && founder) { - char founder_payee[256] = { 0 }; - char founder_script[1024] = { 0}; - const char *payee = json_get_string(founder, "payee"); - bool founder_use_p2sh = (strcmp(coind->symbol, "RITO") == 0); - json_int_t amount = json_get_int(founder, "amount"); - if(payee && amount) { - if (payee) snprintf(founder_payee, 255, "%s", payee); - if (strlen(founder_payee) == 0) - stratumlog("ERROR %s has no charity_address set!\n", coind->name); - base58_decode(founder_payee, founder_script); - available -= amount; - - if (templ->has_segwit_txs) { - strcat(templ->coinb2, "03"); // 3 outputs (nulldata + fees + miner) - strcat(templ->coinb2, commitment); - } else { - strcat(templ->coinb2, "02"); - } - job_pack_tx(coind, templ->coinb2, available, NULL); - if(founder_use_p2sh) { - p2sh_pack_tx(coind, templ->coinb2, amount, founder_script); - } else { - job_pack_tx(coind, templ->coinb2, amount, founder_script); - } - strcat(templ->coinb2, "00000000"); // locktime - - coind->reward = (double)available/100000000*coind->reward_mul; - debuglog("%s founder address %s, amount %lld\n", coind->symbol,founder_payee, amount); - debuglog("%s founder script %s\n", coind->symbol,founder_script); - debuglog("%s scripts %s\n", coind->symbol, templ->coinb2); - - return; - } -} -} // 2 txs are required on these coins, one for foundation (dev fees) if(coind->charity_percent && !coind->hasmasternodes) { @@ -542,295 +509,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * coind->reward = (double)available/100000000; return; } - - // add IFX - if (strcmp(coind->symbol, "IFX") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // add GTM - if (strcmp(coind->symbol, "GTM") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - -// // add AGM -// if (strcmp(coind->symbol, "AGM") == 0) -// { -// char payees[4]; -// int npayees = 1; -// char script_dests[4096] = { 0 }; -// // -// json_value* founderreward = json_get_array(json_result, "founderreward"); -// if (founderreward) -// { -// const char *payee = json_get_string(founderreward, "founderpayee"); -// json_int_t amount = json_get_int(founderreward, "amount"); -// if (payee && amount) -// { -// char script_payee[128] = { 0 }; -// npayees++; -// available -= amount; -// base58_decode(payee, script_payee); -// job_pack_tx(coind, script_dests, amount, script_payee); -// } -// } -// json_value* masternode = json_get_object(json_result, "masternode"); -// bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); -// if (masternode_enabled && masternode) -// { -// bool started = json_get_bool(json_result, "masternode_payments_started"); -// if (json_is_array(masternode)) { -// for(int i = 0; i < masternode->u.array.length; i) { -// const char *payee = json_get_string(masternode->u.array.values[i], "payee"); -// json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); -// if (payee && amount && started) { -// npayees; -// available -= amount; -// const char *script = json_get_string(masternode->u.array.values[i], "script"); -// if (script) { -// p2sh_pack_tx(coind, script_dests, amount, script); -// } else { -// base58_decode(payee, script_payee); -// job_pack_tx(coind, script_dests, amount, script_payee); -// } -// //debuglog("%s masternode %s %u\n", coind->symbol, payee, amount); -// } -// } - } else { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount && started) { - npayees; - available -= amount; - base58_decode(payee, script_payee); - bool masternode_use_p2sh = (strcmp(coind->symbol, "MAC") == 0); - if(masternode_use_p2sh) - p2sh_pack_tx(coind, script_dests, amount, script_payee); - else - job_pack_tx(coind, script_dests, amount, script_payee); -} - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // add CRDS - if (strcmp(coind->symbol, "CRDS") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - // add BMN - if (strcmp(coind->symbol, "BMN") == 0) -{ - char payees[4]; - int npayees = 1; - char script_dests[4096] = { 0 }; - // - json_value* founderreward = json_get_array(json_result, "founderreward"); - if (founderreward) - { - const char *payee = json_get_string(founderreward, "founderpayee"); - json_int_t amount = json_get_int(founderreward, "amount"); - if (payee && amount) - { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - json_value* masternode = json_get_object(json_result, "masternode"); - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - if (masternode_enabled && masternode) - { - bool started = json_get_bool(json_result, "masternode_payments_started"); - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (started && payee && amount) { - char script_payee[128] = { 0 }; - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available / 100000000 * coind->reward_mul; - return; - } - - //add GLT - else if(strcmp(coind->symbol, "GLT") == 0) - { - char script_dests[2048] = { 0 }; - char script_payee[128] = { 0 }; - char script_treasury[128] = { 0 }; - char payees[4]; - int npayees = 1; - bool masternode_enabled = json_get_bool(json_result, "masternode_payments_enforced"); - json_value* masternode = json_get_object(json_result, "masternode"); - json_value* treasury = json_get_object(json_result, "treasury"); - bool treasury_enabled = true; - if(treasury_enabled && treasury) { - const char *scriptPubKey = json_get_string(treasury, "scriptPubKey"); - json_int_t amount = json_get_int(treasury, "amount"); - if (scriptPubKey && amount) { - npayees++; - available -= amount; - base58_decode(scriptPubKey, script_treasury); - job_pack_tx(coind, script_dests, amount, script_treasury); - //debuglog("%s treasury %u\n", coind->symbol, amount); - } - } - if (masternode_enabled && masternode) { - const char *payee = json_get_string(masternode, "payee"); - json_int_t amount = json_get_int(masternode, "amount"); - if (payee && amount) { - npayees++; - available -= amount; - base58_decode(payee, script_payee); - job_pack_tx(coind, script_dests, amount, script_payee); - } - } - sprintf(payees, "%02x", npayees); - strcat(templ->coinb2, payees); - strcat(templ->coinb2, script_dests); - job_pack_tx(coind, templ->coinb2, available, NULL); - strcat(templ->coinb2, "00000000"); // locktime - coind->reward = (double)available/100000000*coind->reward_mul; - //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); - return; - } if(strcmp(coind->symbol, "XVC") == 0) { @@ -916,7 +594,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } if (masternode_enabled && masternode) { bool started = json_get_bool(json_result, "masternode_payments_started"); - if (json_is_array(masternode)) { + if (json_is_array(masternode)) { for(int i = 0; i < masternode->u.array.length; i++) { const char *payee = json_get_string(masternode->u.array.values[i], "payee"); json_int_t amount = json_get_int(masternode->u.array.values[i], "amount"); @@ -946,7 +624,6 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * else job_pack_tx(coind, script_dests, amount, script_payee); } - } } sprintf(payees, "%02x", npayees); @@ -971,8 +648,8 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * } else { strcat(templ->coinb2, "00"); } - } - return; + } + return; } else if(strcmp(coind->symbol, "ARC") == 0) @@ -1017,7 +694,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //debuglog("%s %d dests %s\n", coind->symbol, npayees, script_dests); return; } - + else if(strcmp(coind->symbol, "ENT") == 0) { char script_dests[2048] = { 0 }; @@ -1146,7 +823,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin - + strcat(templ->coinb2, "00000000"); // locktime coind->reward = (double)available/100000000*coind->reward_mul; From fb1088bd218c209625b0a3a1158fcc0a25de3d2b Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Thu, 20 Feb 2020 15:55:31 -0500 Subject: [PATCH 555/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 046091a6f..9e72f68a9 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -822,7 +822,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * //if(coind->txmessage) // strcat(templ->coinb2, "00"); if(strcmp(coind->symbol, "DEM") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes eMark. - if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin + if(strcmp(coind->symbol, "FLO") == 0){if(coind->txmessage){strcat(templ->coinb2, "00");}} //fixes FlorinCoin strcat(templ->coinb2, "00000000"); // locktime From 1acd971f4d912d22b6e52f9eac08d713fb40818a Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Mon, 9 Mar 2020 13:30:21 -0400 Subject: [PATCH 556/576] Update coinbase.cpp --- stratum/coinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/coinbase.cpp b/stratum/coinbase.cpp index 9e72f68a9..a74130998 100644 --- a/stratum/coinbase.cpp +++ b/stratum/coinbase.cpp @@ -145,7 +145,7 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value * char script1[4*1024]; sprintf(script1, "%s%s%s08", eheight, templ->flags, etime); - char script2[32] = "746865706f6f6c2e6c6966655c30"; // "thepool.life\0" in hex ascii + char script2[32] = "746865706f6f6c2e6c696665"; // "thepool.life" in hex ascii if(!coind->pos && !coind->isaux && templ->auxs_size) coinbase_aux(templ, script2); From 8c0334ca9e494ac36e846fe15d56d8d58458794e Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 10 Mar 2020 01:38:13 -0400 Subject: [PATCH 557/576] Update stratum.cpp --- stratum/stratum.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index ee527db6c..ef4271282 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -84,26 +84,7 @@ static void scrypt_hash(const char* input, char* output, uint32_t len) static void scryptn_hash(const char* input, char* output, uint32_t len) { - time_t time_table[][2] = - { - {2048, 1389306217}, - {4096, 1456415081}, - {8192, 1506746729}, - {16384, 1557078377}, - {32768, 1657741673}, - {65536, 1859068265}, - {131072, 2060394857}, - {262144, 1722307603}, - {524288, 1769642992}, - {0, 0}, - }; - - for(int i=0; time_table[i][0]; i++) - if(time(NULL) < time_table[i+1][1]) - { - scrypt_N_R_1_256(input, output, time_table[i][0], 1, len); - return; - } + scrypt_N_R_1_256(input, output, 2048, 1, len); } static void neoscrypt_hash(const char* input, char* output, uint32_t len) From 2e90eb35cab36ee3c4d4a7074025e2b89123da05 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 10 Mar 2020 01:42:25 -0400 Subject: [PATCH 558/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 03f32f409..fbd8a822c 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -112,12 +112,17 @@ function yaamp_get_algos() function yaamp_algo_mBTC_factor($algo) { switch($algo) { + case 'scryptn': case 'sha256': + return 1000000000; case 'sha256t': + case 'script': + return 1000000000; case 'sha256q': case 'blake': case 'blakecoin': case 'blake2s': + return 1000000; case 'blake2b': case 'decred': case 'keccak': From 43547cc06d4ec2998fff92dc7f381662dcee0367 Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 17 Mar 2020 19:10:52 -0400 Subject: [PATCH 559/576] Update mining.php --- web/yaamp/modules/site/mining.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/yaamp/modules/site/mining.php b/web/yaamp/modules/site/mining.php index 89fa54190..4d6d68985 100644 --- a/web/yaamp/modules/site/mining.php +++ b/web/yaamp/modules/site/mining.php @@ -43,7 +43,10 @@ $algo_unit = 'Mh'; $algo_factor = yaamp_algo_mBTC_factor($algo); -if ($algo_factor == 1000) $algo_unit = 'Gh'; +if ($algo_factor == 0.001) $algo_unit = 'Kh'; +if ($algo_factor == 1000) $algo_unit = 'Gh'; if ($algo_factor == 1000) $algo_unit = 'Gh'; +if ($algo_factor == 1000000) $algo_unit = 'Th'; +if ($algo_factor == 1000000000) $algo_unit = 'Ph'; echo << From fe237eb937fb9830c9fef86ecd5d39343ce1f64d Mon Sep 17 00:00:00 2001 From: "cryptopool.builders" <43019051+cryptopool-builders@users.noreply.github.com> Date: Tue, 17 Mar 2020 23:16:08 -0400 Subject: [PATCH 560/576] Update yaamp.php --- web/yaamp/core/functions/yaamp.php | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index fbd8a822c..769d9d647 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -12,10 +12,8 @@ function yaamp_get_algos() 'argon2d-dyn', 'argon2m', 'argon2d-uis', - 'balloon', 'bastion', 'bcd', - 'binarium-v1', 'bitcore', 'blake', 'blake2b', @@ -27,13 +25,12 @@ function yaamp_get_algos() 'deep', 'dmd-gr', 'exosis', + 'equihash', 'groestl', // dmd-gr -m 256 (deprecated) 'geek', 'hex', 'hmq1725', - 'honeycomb', 'hsr', - 'jha', 'keccak', 'keccakc', 'lbk3', @@ -50,7 +47,6 @@ function yaamp_get_algos() 'myr-gr', 'neoscrypt', 'nist5', - 'odo', 'penta', 'phi', 'phi2', @@ -59,7 +55,7 @@ function yaamp_get_algos() 'quark', 'qubit', 'rainforest', - 'rfv2', + 'randomx', 'scrypt', 'scryptn', 'sha256', @@ -88,7 +84,6 @@ function yaamp_get_algos() 'x16rt', 'x16s', 'x17', - 'x18', 'x20r', 'x21s', 'x22i', @@ -191,15 +186,14 @@ function getAlgoColors($algo) 'argon2d-dyn' => '#e0d0e0', 'argon2m' => '#e0d0e0', 'argon2d-uis' => '#e0d0e0', - 'balloon' => '#e0b0b0', 'bastion' => '#e0b0b0', 'bcd' => '#ffd880', - 'binarium-v1' => '#f0f0f0', 'bitcore' => '#f790c0', 'blake' => '#f0f0f0', 'blake2b' => '#f2c81f', 'blakecoin' => '#f0f0f0', 'bmw512' => '#f0f0f0', + 'equihash' => '#f0f0f0', 'cuckoo' => '#d0a0a0', 'c11' => '#a0a0d0', 'decred' => '#f0f0f0', @@ -210,9 +204,7 @@ function getAlgoColors($algo) 'groestl' => '#d0a0a0', 'hex' => '#c0f0c0', 'hmq1725' => '#ffa0a0', - 'honeycomb' => '#c0f0c0', 'hsr' => '#aa70ff', - 'jha' => '#a0d0c0', 'keccak' => '#c0f0c0', 'keccakc' => '#c0f0c0', 'lbk3' => '#809aef', @@ -229,7 +221,6 @@ function getAlgoColors($algo) 'myr-gr' => '#a0c0f0', 'neoscrypt' => '#a0d0f0', 'nist5' => '#c0e0e0', - 'odocrypt' => '#c0f0c0', 'penta' => '#80c0c0', 'phi' => '#a0a0e0', 'phi2' => '#a0a0e0', @@ -238,7 +229,7 @@ function getAlgoColors($algo) 'quark' => '#c0c0c0', 'qubit' => '#d0a0f0', 'rainforest' => '#d0f0a0', - 'rfv2' => '#d0f0a0', + 'randomx' => '#d0f0a0', 'renesis' => '#f0b0a0', 'scrypt' => '#c0c0e0', 'scryptn' => '#d0d0d0', @@ -305,10 +296,8 @@ function getAlgoPort($algo) 'argon2d-dyn' => 4239, 'argon2m' => 4234, 'argon2d-uis' => 4240, - 'balloon' => 5100, 'bastion' => 6433, 'bcd' => 3643, - 'binarium-v1' => 6666, 'bitcore' => 3556, 'blake' => 5733, 'blake2b' => 5777, @@ -319,13 +308,13 @@ function getAlgoPort($algo) 'decred' => 3252, 'deep' => 3535, 'dmd-gr' => 5333, + 'equihash' => 8888, 'exosis' => 3557, 'geek' => 3692, 'hex' => 5135, 'hmq1725' => 3747, 'honeycomb' => 7777, 'hsr' => 7433, - 'jha' => 4633, 'keccak' => 5133, 'keccakc' => 5134, 'lbk3' => 5522, @@ -341,7 +330,6 @@ function getAlgoPort($algo) 'm7m' => 6033, 'myr-gr' => 5433, 'neoscrypt' => 4233, - 'odocrypt' => 7777, 'nist5' => 3833, 'penta' => 5833, 'phi' => 8333, @@ -352,7 +340,7 @@ function getAlgoPort($algo) 'qubit' => 4733, 'renesis' => 5252, 'rainforest' => 7443, - 'rfv2' => 8443, + 'randomx' => 7444, 'scrypt' => 3433, 'scryptn' => 4333, 'sha256' => 3333, @@ -381,7 +369,6 @@ function getAlgoPort($algo) 'x16rt' => 7220, 'x16s' => 3663, 'x17' => 3737, - 'x18' => 3738, 'x20r' => 4300, 'x21s' => 3224, 'x22i' => 3223, From 3c91df906ee1c40b3715b9990beefe98214ea863 Mon Sep 17 00:00:00 2001 From: cryptopool Date: Fri, 20 Mar 2020 17:07:31 -0400 Subject: [PATCH 561/576] code cleanup code cleanup --- web/yaamp/commands/CoinCommand.php | 840 ++-- web/yaamp/commands/CoindbCommand.php | 1127 ++--- web/yaamp/core/backend/bench.php | 189 +- web/yaamp/core/backend/blocks.php | 883 ++-- web/yaamp/core/backend/clear.php | 96 +- web/yaamp/core/backend/coins.php | 599 ++- web/yaamp/core/backend/markets.php | 3740 +++++++++-------- web/yaamp/core/backend/notify.php | 285 +- web/yaamp/core/backend/payment.php | 635 ++- web/yaamp/core/backend/rawcoins.php | 1002 ++--- web/yaamp/core/backend/renting.php | 471 ++- web/yaamp/core/backend/sell.php | 229 +- web/yaamp/core/backend/services.php | 428 +- web/yaamp/core/backend/stats.php | 689 +-- web/yaamp/core/backend/system.php | 557 ++- web/yaamp/core/backend/users.php | 192 +- web/yaamp/core/common/libUtil.php | 368 +- web/yaamp/core/common/libdbo.php | 114 +- web/yaamp/core/common/system.php | 177 +- web/yaamp/core/common/util.php | 473 +-- web/yaamp/core/functions/admin.php | 119 +- web/yaamp/core/functions/yaamp.php | 1187 +++--- web/yaamp/modules/api/ApiController.php | 904 ++-- web/yaamp/modules/coin/index.php | 116 +- web/yaamp/modules/common/CommonController.php | 121 +- .../modules/explorer/ExplorerController.php | 326 +- web/yaamp/modules/explorer/block.php | 412 +- web/yaamp/modules/explorer/coin.php | 113 +- web/yaamp/modules/explorer/graph.php | 165 +- web/yaamp/modules/explorer/index.php | 122 +- web/yaamp/modules/explorer/peers.php | 26 +- web/yaamp/modules/explorer/tx.php | 45 +- web/yaamp/modules/explorer/util.php | 416 +- web/yaamp/modules/market/MarketController.php | 216 +- .../modules/renting/RentingController.php | 864 ++-- web/yaamp/modules/renting/admin.php | 131 +- .../modules/renting/all_orders_results.php | 88 +- web/yaamp/modules/renting/balance_results.php | 88 +- web/yaamp/modules/renting/create.php | 42 +- .../modules/renting/graph_job_results.php | 93 +- .../modules/renting/graph_price_results.php | 57 +- web/yaamp/modules/renting/index.php | 11 - web/yaamp/modules/renting/login.php | 48 +- web/yaamp/modules/renting/orders_results.php | 118 +- web/yaamp/modules/renting/settings.php | 8 +- web/yaamp/modules/renting/status_results.php | 116 +- web/yaamp/modules/renting/tx.php | 52 +- web/yaamp/modules/site/SiteController.php | 2493 +++++------ web/yaamp/modules/site/admin.php | 38 +- web/yaamp/modules/site/admin_results.php | 302 +- web/yaamp/modules/site/api.php | 40 +- web/yaamp/modules/site/balances.php | 8 +- web/yaamp/modules/site/balances_results.php | 123 +- web/yaamp/modules/site/benchmarks.php | 2 +- web/yaamp/modules/site/block.php | 3 - web/yaamp/modules/site/block_results.php | 160 +- web/yaamp/modules/site/bookmark.php | 14 +- web/yaamp/modules/site/botnets.php | 78 +- web/yaamp/modules/site/coin.php | 41 +- web/yaamp/modules/site/coin_console.php | 157 +- web/yaamp/modules/site/coin_market_graph.php | 2 +- web/yaamp/modules/site/coin_peers.php | 98 +- web/yaamp/modules/site/coin_results.php | 693 +-- web/yaamp/modules/site/coin_tickets.php | 409 +- web/yaamp/modules/site/coin_triggers.php | 80 +- web/yaamp/modules/site/common.php | 330 +- web/yaamp/modules/site/common_results.php | 799 ++-- web/yaamp/modules/site/connections.php | 7 - .../modules/site/connections_results.php | 39 +- web/yaamp/modules/site/earning.php | 11 +- web/yaamp/modules/site/earning_results.php | 187 +- web/yaamp/modules/site/emptymarkets.php | 31 +- web/yaamp/modules/site/exchange.php | 3 - web/yaamp/modules/site/exchange_results.php | 148 +- web/yaamp/modules/site/index.php | 240 +- web/yaamp/modules/site/memcached.php | 119 +- web/yaamp/modules/site/miners.php | 29 +- web/yaamp/modules/site/mining.php | 269 +- web/yaamp/modules/site/monsters.php | 138 +- web/yaamp/modules/site/multialgo.php | 12 +- web/yaamp/modules/site/payments.php | 20 +- web/yaamp/modules/site/payments_results.php | 178 +- .../modules/site/results/current_results.php | 295 +- .../modules/site/results/found_results.php | 174 +- .../site/results/graph_assets_results.php | 57 +- .../site/results/graph_earnings_results.php | 48 +- .../site/results/graph_hashrate_results.php | 51 +- .../site/results/graph_market_balance.php | 133 +- .../site/results/graph_market_prices.php | 67 +- .../site/results/graph_negative_results.php | 31 +- .../site/results/graph_price_results.php | 53 +- .../site/results/graph_profit_results.php | 21 +- .../site/results/graph_user_results.php | 97 +- .../modules/site/results/history_results.php | 249 +- .../modules/site/results/miners_results.php | 233 +- .../modules/site/results/mining_results.php | 347 +- .../site/results/user_earning_results.php | 153 +- .../site/results/wallet_graphs_results.php | 34 +- .../site/results/wallet_miners_results.php | 211 +- .../modules/site/results/wallet_results.php | 270 +- web/yaamp/modules/site/tx.php | 35 +- web/yaamp/modules/site/user.php | 14 +- web/yaamp/modules/site/user_results.php | 216 +- web/yaamp/modules/site/version.php | 13 +- web/yaamp/modules/site/version_results.php | 62 +- web/yaamp/modules/site/wallet.php | 551 +-- web/yaamp/modules/site/worker.php | 18 +- web/yaamp/modules/site/worker_results.php | 182 +- web/yaamp/modules/stats/StatsController.php | 112 +- web/yaamp/modules/stats/index.php | 91 +- .../modules/thread/CronjobController.php | 457 +- .../modules/trading/TradingController.php | 93 +- web/yaamp/modules/trading/index.php | 11 +- web/yaamp/modules/trading/mining_results.php | 307 +- web/yaamp/ui/lib/pageheader.php | 20 +- web/yaamp/ui/main.php | 116 +- 116 files changed, 16055 insertions(+), 15166 deletions(-) diff --git a/web/yaamp/commands/CoinCommand.php b/web/yaamp/commands/CoinCommand.php index 12e1a21d0..bbf8a8551 100644 --- a/web/yaamp/commands/CoinCommand.php +++ b/web/yaamp/commands/CoinCommand.php @@ -12,391 +12,459 @@ */ class CoinCommand extends CConsoleCommand { - protected $basePath; - - /** - * Execute the action. - * @param array $args command line parameters specific for this command - * @return integer non zero application exit code after printing help - */ - public function run($args) - { - $runner=$this->getCommandRunner(); - $commands=$runner->commands; - - $root = realpath(Yii::app()->getBasePath().DIRECTORY_SEPARATOR.'..'); - $this->basePath = str_replace(DIRECTORY_SEPARATOR, '/', $root); - - $symbol = arraySafeVal($args, 0); - - if (!isset($args[1]) || $args[1] == 'help') { - - echo "Yiimp coin command\n"; - echo "Usage: yiimp coin delete - to delete with all related records\n"; - echo " yiimp coin purge - to clean users and history \n"; - echo " yiimp coin diff - to check if wallet diff is standard\n"; - echo " yiimp coin blocktime - estimate the chain blocktime\n"; - echo " yiimp coin checkblocks - recheck confirmed blocks\n"; - echo " yiimp coin generated [height] - search blocks not notified, set height to fix\n"; - echo " yiimp coin get \n"; - echo " yiimp coin set \n"; - echo " yiimp coin unset \n"; - echo " yiimp coin settings\n"; - return 1; - - } else if ($args[1] == 'delete') { - return $this->deleteCoin($symbol); - - } else if ($args[1] == 'purge') { - return $this->purgeCoin($symbol); - - } else if ($args[1] == 'diff') { - return $this->checkMiningDiff($symbol); - - } else if ($args[1] == 'blocktime') { - return $this->estimateBlockTime($symbol); - - } else if ($args[1] == 'checkblocks') { - return $this->checkConfirmedBlocks($symbol); - - } else if ($args[1] == 'generated') { - $start_height = arraySafeVal($args, 2, 0); - // if start_height is set, it will create missed block(s) - return $this->listGeneratedTxs($symbol, $start_height); - - } else if ($args[1] == 'get') { - return $this->getCoinSetting($args); - - } else if ($args[1] == 'set') { - return $this->setCoinSetting($args); - - } else if ($args[1] == 'unset') { - return $this->unsetCoinSetting($args); - - } else if ($args[1] == 'settings') { - return $this->listCoinSettings($args); - } - } - - /** - * Provides the command description. - * @return string the command description. - */ - public function getHelp() - { - return $this->run(array('help')); - } - - private function checkSymbol($symbol) - { - return dboscalar("SELECT COUNT(*) FROM coins WHERE symbol=:symbol", - array(':symbol'=>$symbol)); - } - - /** - * Purge coin by symbol - */ - public function purgeCoin($symbol) - { - $coins = new db_coins; - - if (!$coins instanceof CActiveRecord) - return; - - $coin = $coins->find(array('condition'=>'symbol=:sym', 'params'=>array(':sym'=>$symbol))); - if ($coin) - { - $nbAccounts = getdbocount('db_accounts', "coinid=".$coin->id); - $coin->deleteDeps(); - - echo "coin ".$coin->symbol." purged\n"; - if ($nbAccounts) { - $nbAccounts -= getdbocount('db_accounts', "coinid=".$coin->id); - echo " $nbAccounts accounts deleted\n"; - } - } - } - - /** - * Delete (and purge) coin by symbol - */ - public function deleteCoin($symbol) - { - $coins = new db_coins; - - if (!$coins instanceof CActiveRecord) - return; - - $coin = $coins->find(array('condition'=>'symbol=:sym', 'params'=>array(':sym'=>$symbol))); - if ($coin) - { - $this->purgeCoin($symbol); - - $coin->installed=0; - $coin->enable=0; - $coin->save(); - - $coin->delete(); - echo "coin ".$coin->symbol." deleted\n"; - } - } - - //////////////////////////////////////////////////////////////////////////////////// - - /** - * Compare getminininginfo difficulty and computed one (from the target hash) - */ - public function checkMiningDiff($symbol) - { - $coins = new db_coins; - - if (!$coins instanceof CActiveRecord) - return; - - $coin = $coins->find(array('condition'=>'symbol=:sym', 'params'=>array(':sym'=>$symbol))); - if ($coin) - { - $remote = new WalletRPC($coin); - $tpl = $remote->getblocktemplate(); - $mnf = $remote->getmininginfo(); - if (empty($tpl)) die("error {$remote->error} ".json_encode($tpl)."\n"); - - $target = arraySafeVal($tpl,"target",""); - $computed_diff = hash_to_difficulty($coin,$target); - $wallet_diff = arraySafeVal($mnf,"difficulty",0); - $factor = $computed_diff ? round($wallet_diff/$computed_diff,3) : 'NaN'; - - echo $coin->symbol.": network=".Itoa2(arraySafeVal($mnf,"networkhashps",0)*1000, 3)."H/s\n". - "bits=".arraySafeVal($tpl,"bits","")." target=$target\n". - "difficulty=$wallet_diff hash_to_difficulty(target)=$computed_diff factor=$factor\n"; - } - } - - /** - * Extract/Compute the average block time of a block chain - */ - public function estimateBlockTime($symbol) - { - $coins = new db_coins; - - if (!$coins instanceof CActiveRecord) - return; - - $coin = $coins->find(array('condition'=>'symbol=:sym', 'params'=>array(':sym'=>$symbol))); - if ($coin) - { - $remote = new WalletRPC($coin); - $nfo = $remote->getinfo(); - if (empty($nfo)) die("error {$remote->error} ".json_encode($nfo)."\n"); - $height = arraySafeVal($nfo,"blocks",0); - - $hash = $remote->getblockhash($height-1024); - if (empty($hash)) die("error {$remote->error} ".json_encode($hash)."\n"); - $block = $remote->getblock($hash); - $time1 = arraySafeVal($block, 'time', 0); - - $hash = $remote->getblockhash($height-512); - if (empty($hash)) die("error {$remote->error} ".json_encode($hash)."\n"); - $block = $remote->getblock($hash); - $time2 = arraySafeVal($block, 'time', 0); - - $hash = $remote->getblockhash($height-128); - if (empty($hash)) die("error {$remote->error} ".json_encode($hash)."\n"); - $block = $remote->getblock($hash); - $time3 = arraySafeVal($block, 'time', 0); - - $hash = $remote->getblockhash($height); - if (empty($hash)) die("error {$remote->error} ".json_encode($hash)."\n"); - $block = $remote->getblock($hash); - $time = arraySafeVal($block, 'time', 0); - - $t = intval($coin->block_time); - $human_time = sprintf('%dmn%02d', ($t/60), ($t%60)); - echo $coin->symbol.": current block_time set in the db $human_time ($t sec) \n"; - - $t = round(($time - $time1) / 1024); - $human_time = sprintf('%dmn%02d', ($t/60), ($t%60)); - echo $coin->symbol.": avg time for the last 1024 blocks = $human_time ($t sec) \n"; - if (empty($coin->block_time) && $t > 10) { - $coin->block_time = $t; - $coin->save(); - echo $coin->symbol.": db block_time set to $t\n"; - } - $t = round(($time - $time2) / 512); - $human_time = sprintf('%dmn%02d', ($t/60), ($t%60)); - echo $coin->symbol.": avg time for the last 512 blocks = $human_time ($t sec) \n"; - $t = round(($time - $time3) / 128); - $human_time = sprintf('%dmn%02d', ($t/60), ($t%60)); - echo $coin->symbol.": avg time for the last 128 blocks = $human_time ($t sec) \n"; - } - } - - //////////////////////////////////////////////////////////////////////////////////// - - public function checkConfirmedBlocks($symbol) - { - $coin = getdbosql('db_coins', 'symbol=:sym', array(':sym'=>$symbol)); - if (!$coin) return -1; - $blocks = new db_blocks; - - $data = $blocks->findAll(array('condition'=>"coin_id=:id AND category='generate'", 'order'=>'height DESC', 'params'=>array(':id'=>$coin->id))); - //echo count($data)." confirmed blocks to check...\n"; - if (!$data || !count($data)) return 0; - - $remote = new WalletRPC($coin); - $nbReset = 0; $totAmount = 0.0; - - foreach ($data as $block) { - $b = $remote->getblock($block->blockhash); - $confs = arraySafeVal($b,'confirmations', 0); - if ($confs <= 0 || !$b) { - $date = strftime("%Y-%m-%d %H:%M", arraySafeVal($b,'time', $block->time)); - $height = arraySafeVal($b,'height', $block->height); - $conf2 = $coin->block_height - $height; - echo arraySafeVal($b,'height')." $confs/$conf2 $date\n"; - $totAmount += $block->amount; - $block->amount = 0; - $block->category = 'orphan'; - $nbReset += dborun('UPDATE earnings SET amount=0 WHERE blockid='.$block->id); - $block->save(); - } - } - if ($totAmount) { - echo "found $totAmount $symbol orphaned after confirmed status ($nbReset earnings reset)!\n"; - } else { - echo count($data)." confirmed blocks verified\n"; - } - return $nbReset; - } - - //////////////////////////////////////////////////////////////////////////////////// - - public function listGeneratedTxs($symbol,$start_height=0) - { - $coin = getdbosql('db_coins', 'symbol=:sym', array(':sym'=>$symbol)); - if (!$coin) return -1; - - $remote = new WalletRPC($coin); - $cur_height = $remote->getblockcount(); - if (!$cur_height) { - echo "unable to query current block height!\n"; - return 0; - } - - // note: rpc not compatible with decred - $txs = $remote->listtransactions($coin->account, 900); - if(!$txs || !is_array($txs)) { - echo "no txs found!\n"; - return 0; - } - - $nbOk = $nbMissed = 0; - foreach($txs as $tx) { - if ($tx['category'] == 'generate' || $tx['category'] == 'immature') { - $height = $cur_height - $tx['confirmations'] + 1; - if ($tx['confirmations'] < 3) continue; // let the backend detect them... - $block = getdbosql('db_blocks', "coin_id={$coin->id} AND height=$height"); - if ($block) { - if ($block->category == 'orphan') { - if ($start_height > 0 && $height >= $start_height) { - $block->category = 'new'; - if ($block->save()) echo "Fixed orphan block id {$block->id}\n"; - $nbOk++; - } else { - echo("warning: orphan block {$block->height} with confirmations!\n"); - $nbMissed++; - } - } else - $nbOk++; - } else { - $time = round($tx['time'] / 900) * 900; - if ($time < time() - 2 * 24 * 3600) continue; - echo strftime("%Y-%m-%d %H:%M", $tx['time'])." $time missed block $height : ".json_encode($tx)."\n"; - $data = getdbolist('db_hashuser','algo=:algo AND time='.$time, array(':algo'=>$coin->algo)); - $b = new db_blocks; - $b->coin_id = $coin->id; - $b->height = $height; - $b->time = $tx['time']; - $b->category = 'new'; - $b->algo = $coin->algo; - $b->blockhash = $tx['blockhash']; - $b->txhash = $tx['txid']; - $b->isNewRecord = true; - if ($start_height > 0 && $height >= $start_height) { - if ($b->save()) echo "Added new block id {$b->id}\n"; - } - $nbMissed++; - } - } - } - echo "$nbOk blocks checked, $nbMissed missed by the backend\n"; - return 0; - } - - //////////////////////////////////////////////////////////////////////////////////// - - public function getCoinSetting($args) - { - if (count($args) < 3) - die("usage: yiimp coin get \n"); - $symbol = $args[0]; - $key = $args[2]; - if (!$this->checkSymbol($symbol)) { - echo "error: symbol '$symbol' does not exist!\n"; - return 1; - } - $value = coin_get($symbol, $key); - echo "$value\n"; - return 0; - } - - public function setCoinSetting($args) - { - if (count($args) < 4) - die("usage: yiimp coin set \n"); - $symbol = $args[0]; - $key = $args[2]; - $value = $args[3]; - if (!$this->checkSymbol($symbol)) { - echo "error: symbol '$symbol' does not exist!\n"; - return 1; - } - $res = coin_set($symbol, $key, $value); - $val = coin_get($symbol, $key); - echo ($res ? "$symbol $exchange $key ".json_encode($val) : "error") . "\n"; - return 0; - } - - public function unsetCoinSetting($args) - { - if (count($args) < 3) - die("usage: yiimp coin unset \n"); - $symbol = $args[0]; - $key = $args[2]; - if (!$this->checkSymbol($symbol)) { - echo "error: symbol '$symbol' does not exist!\n"; - return 1; - } - coin_unset($symbol, $key); - echo "ok\n"; - return 0; - } - - public function listCoinSettings($args) - { - if (count($args) < 2) - die("usage: yiimp coin settings\n"); - $symbol = $args[0]; - if (!$this->checkSymbol($symbol)) { - echo "error: symbol '$symbol' does not exist!\n"; - return 1; - } - $keys = coin_settings_prefetch($symbol); - foreach ($keys as $key => $value) { - if ($key == $symbol) continue; - echo "$key ".json_encode($value)."\n"; - } - return 0; - } + protected $basePath; + + /** + * Execute the action. + * @param array $args command line parameters specific for this command + * @return integer non zero application exit code after printing help + */ + public function run($args) + { + $runner = $this->getCommandRunner(); + $commands = $runner->commands; + + $root = realpath(Yii::app()->getBasePath() . DIRECTORY_SEPARATOR . '..'); + $this->basePath = str_replace(DIRECTORY_SEPARATOR, '/', $root); + + $symbol = arraySafeVal($args, 0); + + if (!isset($args[1]) || $args[1] == 'help') + { + + echo "Yiimp coin command\n"; + echo "Usage: yiimp coin delete - to delete with all related records\n"; + echo " yiimp coin purge - to clean users and history \n"; + echo " yiimp coin diff - to check if wallet diff is standard\n"; + echo " yiimp coin blocktime - estimate the chain blocktime\n"; + echo " yiimp coin checkblocks - recheck confirmed blocks\n"; + echo " yiimp coin generated [height] - search blocks not notified, set height to fix\n"; + echo " yiimp coin get \n"; + echo " yiimp coin set \n"; + echo " yiimp coin unset \n"; + echo " yiimp coin settings\n"; + return 1; + + } + else if ($args[1] == 'delete') + { + return $this->deleteCoin($symbol); + + } + else if ($args[1] == 'purge') + { + return $this->purgeCoin($symbol); + + } + else if ($args[1] == 'diff') + { + return $this->checkMiningDiff($symbol); + + } + else if ($args[1] == 'blocktime') + { + return $this->estimateBlockTime($symbol); + + } + else if ($args[1] == 'checkblocks') + { + return $this->checkConfirmedBlocks($symbol); + + } + else if ($args[1] == 'generated') + { + $start_height = arraySafeVal($args, 2, 0); + // if start_height is set, it will create missed block(s) + return $this->listGeneratedTxs($symbol, $start_height); + + } + else if ($args[1] == 'get') + { + return $this->getCoinSetting($args); + + } + else if ($args[1] == 'set') + { + return $this->setCoinSetting($args); + + } + else if ($args[1] == 'unset') + { + return $this->unsetCoinSetting($args); + + } + else if ($args[1] == 'settings') + { + return $this->listCoinSettings($args); + } + } + + /** + * Provides the command description. + * @return string the command description. + */ + public function getHelp() + { + return $this->run(array( + 'help' + )); + } + + private function checkSymbol($symbol) + { + return dboscalar("SELECT COUNT(*) FROM coins WHERE symbol=:symbol", array( + ':symbol' => $symbol + )); + } + + /** + * Purge coin by symbol + */ + public function purgeCoin($symbol) + { + $coins = new db_coins; + + if (!$coins instanceof CActiveRecord) return; + + $coin = $coins->find(array( + 'condition' => 'symbol=:sym', + 'params' => array( + ':sym' => $symbol + ) + )); + if ($coin) + { + $nbAccounts = getdbocount('db_accounts', "coinid=" . $coin->id); + $coin->deleteDeps(); + + echo "coin " . $coin->symbol . " purged\n"; + if ($nbAccounts) + { + $nbAccounts -= getdbocount('db_accounts', "coinid=" . $coin->id); + echo " $nbAccounts accounts deleted\n"; + } + } + } + + /** + * Delete (and purge) coin by symbol + */ + public function deleteCoin($symbol) + { + $coins = new db_coins; + + if (!$coins instanceof CActiveRecord) return; + + $coin = $coins->find(array( + 'condition' => 'symbol=:sym', + 'params' => array( + ':sym' => $symbol + ) + )); + if ($coin) + { + $this->purgeCoin($symbol); + + $coin->installed = 0; + $coin->enable = 0; + $coin->save(); + + $coin->delete(); + echo "coin " . $coin->symbol . " deleted\n"; + } + } + + //////////////////////////////////////////////////////////////////////////////////// + + /** + * Compare getminininginfo difficulty and computed one (from the target hash) + */ + public function checkMiningDiff($symbol) + { + $coins = new db_coins; + + if (!$coins instanceof CActiveRecord) return; + + $coin = $coins->find(array( + 'condition' => 'symbol=:sym', + 'params' => array( + ':sym' => $symbol + ) + )); + if ($coin) + { + $remote = new WalletRPC($coin); + $tpl = $remote->getblocktemplate(); + $mnf = $remote->getmininginfo(); + if (empty($tpl)) die("error {$remote->error} " . json_encode($tpl) . "\n"); + + $target = arraySafeVal($tpl, "target", ""); + $computed_diff = hash_to_difficulty($coin, $target); + $wallet_diff = arraySafeVal($mnf, "difficulty", 0); + $factor = $computed_diff ? round($wallet_diff / $computed_diff, 3) : 'NaN'; + + echo $coin->symbol . ": network=" . Itoa2(arraySafeVal($mnf, "networkhashps", 0) * 1000, 3) . "H/s\n" . "bits=" . arraySafeVal($tpl, "bits", "") . " target=$target\n" . "difficulty=$wallet_diff hash_to_difficulty(target)=$computed_diff factor=$factor\n"; + } + } + + /** + * Extract/Compute the average block time of a block chain + */ + public function estimateBlockTime($symbol) + { + $coins = new db_coins; + + if (!$coins instanceof CActiveRecord) return; + + $coin = $coins->find(array( + 'condition' => 'symbol=:sym', + 'params' => array( + ':sym' => $symbol + ) + )); + if ($coin) + { + $remote = new WalletRPC($coin); + $nfo = $remote->getinfo(); + if (empty($nfo)) die("error {$remote->error} " . json_encode($nfo) . "\n"); + $height = arraySafeVal($nfo, "blocks", 0); + + $hash = $remote->getblockhash($height - 1024); + if (empty($hash)) die("error {$remote->error} " . json_encode($hash) . "\n"); + $block = $remote->getblock($hash); + $time1 = arraySafeVal($block, 'time', 0); + + $hash = $remote->getblockhash($height - 512); + if (empty($hash)) die("error {$remote->error} " . json_encode($hash) . "\n"); + $block = $remote->getblock($hash); + $time2 = arraySafeVal($block, 'time', 0); + + $hash = $remote->getblockhash($height - 128); + if (empty($hash)) die("error {$remote->error} " . json_encode($hash) . "\n"); + $block = $remote->getblock($hash); + $time3 = arraySafeVal($block, 'time', 0); + + $hash = $remote->getblockhash($height); + if (empty($hash)) die("error {$remote->error} " . json_encode($hash) . "\n"); + $block = $remote->getblock($hash); + $time = arraySafeVal($block, 'time', 0); + + $t = intval($coin->block_time); + $human_time = sprintf('%dmn%02d', ($t / 60) , ($t % 60)); + echo $coin->symbol . ": current block_time set in the db $human_time ($t sec) \n"; + + $t = round(($time - $time1) / 1024); + $human_time = sprintf('%dmn%02d', ($t / 60) , ($t % 60)); + echo $coin->symbol . ": avg time for the last 1024 blocks = $human_time ($t sec) \n"; + if (empty($coin->block_time) && $t > 10) + { + $coin->block_time = $t; + $coin->save(); + echo $coin->symbol . ": db block_time set to $t\n"; + } + $t = round(($time - $time2) / 512); + $human_time = sprintf('%dmn%02d', ($t / 60) , ($t % 60)); + echo $coin->symbol . ": avg time for the last 512 blocks = $human_time ($t sec) \n"; + $t = round(($time - $time3) / 128); + $human_time = sprintf('%dmn%02d', ($t / 60) , ($t % 60)); + echo $coin->symbol . ": avg time for the last 128 blocks = $human_time ($t sec) \n"; + } + } + + //////////////////////////////////////////////////////////////////////////////////// + public function checkConfirmedBlocks($symbol) + { + $coin = getdbosql('db_coins', 'symbol=:sym', array( + ':sym' => $symbol + )); + if (!$coin) return -1; + $blocks = new db_blocks; + + $data = $blocks->findAll(array( + 'condition' => "coin_id=:id AND category='generate'", + 'order' => 'height DESC', + 'params' => array( + ':id' => $coin->id + ) + )); + //echo count($data)." confirmed blocks to check...\n"; + if (!$data || !count($data)) return 0; + + $remote = new WalletRPC($coin); + $nbReset = 0; + $totAmount = 0.0; + + foreach ($data as $block) + { + $b = $remote->getblock($block->blockhash); + $confs = arraySafeVal($b, 'confirmations', 0); + if ($confs <= 0 || !$b) + { + $date = strftime("%Y-%m-%d %H:%M", arraySafeVal($b, 'time', $block->time)); + $height = arraySafeVal($b, 'height', $block->height); + $conf2 = $coin->block_height - $height; + echo arraySafeVal($b, 'height') . " $confs/$conf2 $date\n"; + $totAmount += $block->amount; + $block->amount = 0; + $block->category = 'orphan'; + $nbReset += dborun('UPDATE earnings SET amount=0 WHERE blockid=' . $block->id); + $block->save(); + } + } + if ($totAmount) + { + echo "found $totAmount $symbol orphaned after confirmed status ($nbReset earnings reset)!\n"; + } + else + { + echo count($data) . " confirmed blocks verified\n"; + } + return $nbReset; + } + + //////////////////////////////////////////////////////////////////////////////////// + public function listGeneratedTxs($symbol, $start_height = 0) + { + $coin = getdbosql('db_coins', 'symbol=:sym', array( + ':sym' => $symbol + )); + if (!$coin) return -1; + + $remote = new WalletRPC($coin); + $cur_height = $remote->getblockcount(); + if (!$cur_height) + { + echo "unable to query current block height!\n"; + return 0; + } + + // note: rpc not compatible with decred + $txs = $remote->listtransactions($coin->account, 900); + if (!$txs || !is_array($txs)) + { + echo "no txs found!\n"; + return 0; + } + + $nbOk = $nbMissed = 0; + foreach ($txs as $tx) + { + if ($tx['category'] == 'generate' || $tx['category'] == 'immature') + { + $height = $cur_height - $tx['confirmations'] + 1; + if ($tx['confirmations'] < 3) continue; // let the backend detect them... + $block = getdbosql('db_blocks', "coin_id={$coin->id} AND height=$height"); + if ($block) + { + if ($block->category == 'orphan') + { + if ($start_height > 0 && $height >= $start_height) + { + $block->category = 'new'; + if ($block->save()) echo "Fixed orphan block id {$block->id}\n"; + $nbOk++; + } + else + { + echo ("warning: orphan block {$block->height} with confirmations!\n"); + $nbMissed++; + } + } + else $nbOk++; + } + else + { + $time = round($tx['time'] / 900) * 900; + if ($time < time() - 2 * 24 * 3600) continue; + echo strftime("%Y-%m-%d %H:%M", $tx['time']) . " $time missed block $height : " . json_encode($tx) . "\n"; + $data = getdbolist('db_hashuser', 'algo=:algo AND time=' . $time, array( + ':algo' => $coin->algo + )); + $b = new db_blocks; + $b->coin_id = $coin->id; + $b->height = $height; + $b->time = $tx['time']; + $b->category = 'new'; + $b->algo = $coin->algo; + $b->blockhash = $tx['blockhash']; + $b->txhash = $tx['txid']; + $b->isNewRecord = true; + if ($start_height > 0 && $height >= $start_height) + { + if ($b->save()) echo "Added new block id {$b->id}\n"; + } + $nbMissed++; + } + } + } + echo "$nbOk blocks checked, $nbMissed missed by the backend\n"; + return 0; + } + + //////////////////////////////////////////////////////////////////////////////////// + public function getCoinSetting($args) + { + if (count($args) < 3) die("usage: yiimp coin get \n"); + $symbol = $args[0]; + $key = $args[2]; + if (!$this->checkSymbol($symbol)) + { + echo "error: symbol '$symbol' does not exist!\n"; + return 1; + } + $value = coin_get($symbol, $key); + echo "$value\n"; + return 0; + } + + public function setCoinSetting($args) + { + if (count($args) < 4) die("usage: yiimp coin set \n"); + $symbol = $args[0]; + $key = $args[2]; + $value = $args[3]; + if (!$this->checkSymbol($symbol)) + { + echo "error: symbol '$symbol' does not exist!\n"; + return 1; + } + $res = coin_set($symbol, $key, $value); + $val = coin_get($symbol, $key); + echo ($res ? "$symbol $exchange $key " . json_encode($val) : "error") . "\n"; + return 0; + } + + public function unsetCoinSetting($args) + { + if (count($args) < 3) die("usage: yiimp coin unset \n"); + $symbol = $args[0]; + $key = $args[2]; + if (!$this->checkSymbol($symbol)) + { + echo "error: symbol '$symbol' does not exist!\n"; + return 1; + } + coin_unset($symbol, $key); + echo "ok\n"; + return 0; + } + + public function listCoinSettings($args) + { + if (count($args) < 2) die("usage: yiimp coin settings\n"); + $symbol = $args[0]; + if (!$this->checkSymbol($symbol)) + { + echo "error: symbol '$symbol' does not exist!\n"; + return 1; + } + $keys = coin_settings_prefetch($symbol); + foreach ($keys as $key => $value) + { + if ($key == $symbol) continue; + echo "$key " . json_encode($value) . "\n"; + } + return 0; + } } diff --git a/web/yaamp/commands/CoindbCommand.php b/web/yaamp/commands/CoindbCommand.php index 619ddcd19..0b377c9ed 100644 --- a/web/yaamp/commands/CoindbCommand.php +++ b/web/yaamp/commands/CoindbCommand.php @@ -15,548 +15,589 @@ */ class CoindbCommand extends CConsoleCommand { - protected $basePath; - - /** - * Execute the action. - * @param array $args command line parameters specific for this command - * @return integer non zero application exit code after printing help - */ - public function run($args) - { - $runner=$this->getCommandRunner(); - $commands=$runner->commands; - - $root = realpath(Yii::app()->getBasePath().DIRECTORY_SEPARATOR.'..'); - $this->basePath = str_replace(DIRECTORY_SEPARATOR, '/', $root); - - if (!isset($args[0])) { - - echo "Yiimp coindb command\n"; - echo "Usage: yiimp coindb labels\n"; - echo " yiimp coindb icons\n"; - return 1; - - } elseif ($args[0] == 'labels') { - - $nbUpdated = $this->updateCryptopiaLabels(); - $nbUpdated += $this->updateCoinCapLabels(); - $nbUpdated += $this->updateLiveCoinLabels(); - $nbUpdated += $this->updateYiimpLabels("api.yiimp.eu"); - $nbUpdated += $this->updateFromJson(); - - echo "total updated: $nbUpdated\n"; - return 0; - - } elseif ($args[0] == 'icons') { - - $nbUpdated = $this->grabCcexIcons(); - $nbUpdated += $this->grabCryptopiaIcons(); - $nbUpdated += $this->grabBittrexIcons(); // can be huge ones - $nbUpdated += $this->grabCoinExchangeIcons(); - $nbUpdated += $this->grabAlcurexIcons(); - $nbUpdated += $this->grabKuCoinIcons(); - $nbUpdated += $this->grabNovaIcons(); - - echo "total updated: $nbUpdated\n"; - return 0; - } - } - - /** - * Provides the command description. - * @return string the command description. - */ - public function getHelp() - { - return parent::getHelp().'coindb labels'; - } - - /** - * coincap.io api - */ - public static function getCoinCapData() - { - $json = file_get_contents('http://coincap.io/front'); - $data = json_decode($json,true); - $array = array(); - foreach ($data as $coin) { - $key = strtoupper($coin['short']); - if (empty($key)) continue; - $array[$key] = $coin; - } - return $array; - } - - public function updateCoinCapLabels() - { - $coins = new db_coins; - $nbUpdated = 0; - - $dataset = $coins->findAll(array( - 'condition'=>"name='unknown' OR name=symbol" - )); - - if (!empty($dataset)) - { - $json = self::getCoinCapData(); - if (empty($json)) return 0; - - foreach ($dataset as $coin) { - if ($coin->name == 'unknown' && isset($json[$coin->symbol])) { - $data = $json[$coin->symbol]; - if ($data['long'] != $coin->name) { - echo "{$coin->symbol}: {$data['long']}\n"; - $coin->name = trim($data['long']); - $nbUpdated += $coin->save(); - } - } - } - if ($nbUpdated) - echo "$nbUpdated coin labels updated from coincap.io\n"; - } - return $nbUpdated; - } - - /** - * Special for cryptopia coins - */ - protected function getCryptopiaCurrencies() - { - $array = array(); - require_once($this->basePath.'/yaamp/core/exchange/cryptopia.php'); - $data = cryptopia_api_query('GetCurrencies'); - - if (is_object($data) && !empty($data->Data)) - foreach ($data->Data as $coin) { - $key = strtoupper($coin->Symbol); - if (empty($key)) continue; - $array[$key] = $coin; - } - - return $array; - } - - public function updateCryptopiaLabels() - { - $coins = new db_coins; - $nbUpdated = 0; - - $dataset = $coins->findAll(array( - 'condition'=>"name=:u OR algo='' OR algo='scrypt'", - 'params'=>array(':u'=>'unknown') - )); - - if (!empty($dataset)) - { - $json = self::getCryptopiaCurrencies(); - - foreach ($dataset as $coin) { - if ($coin->name == 'unknown' && isset($json[$coin->symbol])) { - $cc = $json[$coin->symbol]; - if ($cc->Name != $coin->name) { - echo "{$coin->symbol}: {$cc->Name}\n"; - $coin->name = $cc->Name; - if ($cc->Algorithm != 'scrypt') - $coin->algo = strtolower($cc->Algorithm); - $nbUpdated += $coin->save(); - } - } - } - if ($nbUpdated) - echo "$nbUpdated coin labels updated from cryptopia\n"; - } - return $nbUpdated; - } - - public function updateLiveCoinLabels() - { - if (exchange_get('livecoin', 'disabled') == true) return 0; - - $coins = new db_coins; - $nbUpdated = 0; - - $dataset = $coins->findAll(array( - 'condition'=>"name='unknown' AND id IN (SELECT M.coinid FROM markets M WHERE M.name='livecoin')", - )); - - if (!empty($dataset)) - { - //echo count($dataset)." livecoin currencies without labels\n"; - $labels = array(); - $data = livecoin_api_query('info/coinInfo'); - if(objSafeVal($data,'success') !== true || !is_array($data->info)) return; - - foreach ($data->info as $c) { - $symbol = objSafeVal($c,'symbol',''); - $labels[$symbol] = objSafeVal($c,'name','unknown'); - } - - foreach ($dataset as $coin) { - if ($coin->name == 'unknown' && isset($labels[$coin->symbol])) { - $label = $labels[$coin->symbol]; - if ($label != $coin->name) { - echo "{$coin->symbol}: {$label}\n"; - $coin->name = $label; - $nbUpdated += $coin->save(); - } - } - } - if ($nbUpdated) - echo "$nbUpdated coin labels updated from livecoin coininfo\n"; - } - return $nbUpdated; - } - - public function updateYiimpLabels($pool) - { - $coins = new db_coins; - $nbUpdated = 0; $nbAlgos = 0; - - $dataset = $coins->findAll(array( - 'condition'=>"name=:u OR algo='' OR algo='scrypt'", - 'params'=>array(':u'=>'unknown') - )); - - if (!empty($dataset)) - { - $url = "http://{$pool}/api/currencies"; - $data = @ file_get_contents($url); - if (empty($data)) return 0; - $json = json_decode($data, true); - - if (!empty($json)) - foreach ($dataset as $coin) { - if (!isset($json[$coin->symbol])) continue; - $cc = $json[$coin->symbol]; - if ($coin->name == 'unknown') { - echo "{$coin->symbol}: {$cc['name']}\n"; - $coin->name = $cc['name']; - $nbUpdated += $coin->save(); - } - if (empty($cc['algo'])) continue; - if (empty($coin->algo) || $coin->algo != $cc['algo']) { - $coin->algo = strtolower($cc['algo']); - echo "{$coin->symbol}: algo set to {$cc['algo']}\n"; - $nbAlgos += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated labels and $nbAlgos algos updated from $pool\n"; - } - return $nbUpdated; - } - - /** - * To import from a json file placed in the sql/ folder - */ - public function updateFromJson() - { - $sqlFolder = $this->basePath.'/../sql/'; - $jsonFile = $sqlFolder.'labels.json'; - //$jsonFile = $sqlFolder.'yobit.txt'; - if (!file_exists($jsonFile)) - return 0; - - $nbUpdated = 0; - - $json = json_decode(file_get_contents($jsonFile), true); - /* - $json = array(); - $txt = explode("\n", file_get_contents($jsonFile)); - foreach ($txt as $line) - { - $cells = explode("\t", $line); - if (count($cells) < 2) continue; - $json[$cells[0]] = $cells[1]; - } - */ - if (!empty($json)) - { - $coins = new db_coins; - $dataset = $coins->findAll(array( - 'condition'=>"name=:u", - 'params'=>array(':u'=>'unknown') - )); - - if (!empty($dataset)) - foreach ($dataset as $coin) { - if (isset($json[$coin->symbol])) { - $name = $json[$coin->symbol]; - echo "{$coin->symbol}: {$name}\n"; - $coin->name = $name; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated coin labels updated from labels.json file\n"; - } - return $nbUpdated; - } - - /** - * Icon grabber - Bittrex - */ - public function grabBittrexIcons() - { - $nbUpdated = 0; - $markets = bittrex_api_query('public/getmarkets'); - if (!is_object($markets) || !is_object($markets->result)) { - echo "bittrex api error\n"; - return $nbUpdated; - } - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='bittrex' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return $nbUpdated; - echo "bittrex: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - $url = ''; - foreach ($markets->result as $m) { - if ($m->MarketCurrency == $symbol) { - $url = $m->LogoUrl; - break; - } - } - if (empty($url)) continue; - try { - $data = @ file_get_contents($url); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - file_put_contents($local, $data); - $size = filesize($local); - if ($size > 0) { - if ($size > 100*1024) { - echo "warning: $symbol icon is huge, ".round($size/1024,1)." KB ($url)\n"; - unlink($local); - } else { - echo $symbol." icon found\n"; - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from bittrex\n"; - return $nbUpdated; - } - - /** - * Icon grabber - Ccex - */ - public function grabCcexIcons() - { - $url = 'http://c-cex.com/i/l/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='c-cex' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "c-cex: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($symbol).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from c-cex\n"; - return $nbUpdated; - } - - /** - * Icon grabber - Cryptopia (slow https) - */ - public function grabCryptopiaIcons() - { - $url = 'https://www.cryptopia.co.nz/Content/Images/Coins/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='cryptopia' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "cryptopia: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($symbol).'-medium.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 3000 || strstr($data, ' 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from cryptopia\n"; - return $nbUpdated; - } - - /** - * Icon grabber - CoinExchange - */ - public function grabCoinExchangeIcons() - { - $url = 'https://www.coinexchange.io/assets/currencies/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='coinexchange' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "coinexchange: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($coin->name).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from coinexchange\n"; - return $nbUpdated; - } - - /** - * Icon grabber - Alcurex - */ - public function grabAlcurexIcons() - { - $url = 'https://alcurex.com/CSS/img/coins/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='alcurex' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "alcurex: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->getOfficialSymbol(); - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtoupper($symbol).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from alcurex\n"; - return $nbUpdated; - } - - /** - * Icon grabber - KuCoin - */ - public function grabKuCoinIcons() - { - $url = 'https://assets.kucoin.com/www/coin/pc/';//GRIN.png - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='kucoin' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "kucoin: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->getOfficialSymbol(); - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.$symbol.'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from kucoin\n"; - return $nbUpdated; - } - - /** - * Icon grabber - NovaExchange - */ - public function grabNovaIcons() - { - $url = 'http://novaexchange.com/static/symbols/'; - $nbUpdated = 0; - $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id ". - "WHERE M.name='nova' AND IFNULL(coins.image,'') = ''"; - $coins = dbolist($sql); - if (empty($coins)) - return 0; - echo "nova: try to download new icons...\n"; - foreach ($coins as $coin) { - $coin = getdbo('db_coins', $coin["id"]); - $symbol = $coin->getOfficialSymbol(); - $local = $this->basePath."/images/coin-{$symbol}.png"; - try { - $data = @ file_get_contents($url.strtolower($symbol).'.png'); - } catch (Exception $e) { - continue; - } - if (strlen($data) < 2048) continue; - echo $symbol." icon found\n"; - file_put_contents($local, $data); - if (filesize($local) > 0) { - $coin->image = "/images/coin-{$symbol}.png"; - $nbUpdated += $coin->save(); - } - } - if ($nbUpdated) - echo "$nbUpdated icons downloaded from novaexchange\n"; - return $nbUpdated; - } + protected $basePath; + + /** + * Execute the action. + * @param array $args command line parameters specific for this command + * @return integer non zero application exit code after printing help + */ + public function run($args) + { + $runner = $this->getCommandRunner(); + $commands = $runner->commands; + + $root = realpath(Yii::app()->getBasePath() . DIRECTORY_SEPARATOR . '..'); + $this->basePath = str_replace(DIRECTORY_SEPARATOR, '/', $root); + + if (!isset($args[0])) + { + + echo "Yiimp coindb command\n"; + echo "Usage: yiimp coindb labels\n"; + echo " yiimp coindb icons\n"; + return 1; + + } + elseif ($args[0] == 'labels') + { + + $nbUpdated = $this->updateCryptopiaLabels(); + $nbUpdated += $this->updateCoinCapLabels(); + $nbUpdated += $this->updateLiveCoinLabels(); + $nbUpdated += $this->updateYiimpLabels("api.yiimp.eu"); + $nbUpdated += $this->updateFromJson(); + + echo "total updated: $nbUpdated\n"; + return 0; + + } + elseif ($args[0] == 'icons') + { + + $nbUpdated = $this->grabCcexIcons(); + $nbUpdated += $this->grabCryptopiaIcons(); + $nbUpdated += $this->grabBittrexIcons(); // can be huge ones + $nbUpdated += $this->grabCoinExchangeIcons(); + $nbUpdated += $this->grabAlcurexIcons(); + $nbUpdated += $this->grabKuCoinIcons(); + $nbUpdated += $this->grabNovaIcons(); + + echo "total updated: $nbUpdated\n"; + return 0; + } + } + + /** + * Provides the command description. + * @return string the command description. + */ + public function getHelp() + { + return parent::getHelp() . 'coindb labels'; + } + + /** + * coincap.io api + */ + public static function getCoinCapData() + { + $json = file_get_contents('http://coincap.io/front'); + $data = json_decode($json, true); + $array = array(); + foreach ($data as $coin) + { + $key = strtoupper($coin['short']); + if (empty($key)) continue; + $array[$key] = $coin; + } + return $array; + } + + public function updateCoinCapLabels() + { + $coins = new db_coins; + $nbUpdated = 0; + + $dataset = $coins->findAll(array( + 'condition' => "name='unknown' OR name=symbol" + )); + + if (!empty($dataset)) + { + $json = self::getCoinCapData(); + if (empty($json)) return 0; + + foreach ($dataset as $coin) + { + if ($coin->name == 'unknown' && isset($json[$coin->symbol])) + { + $data = $json[$coin->symbol]; + if ($data['long'] != $coin->name) + { + echo "{$coin->symbol}: {$data['long']}\n"; + $coin->name = trim($data['long']); + $nbUpdated += $coin->save(); + } + } + } + if ($nbUpdated) echo "$nbUpdated coin labels updated from coincap.io\n"; + } + return $nbUpdated; + } + + /** + * Special for cryptopia coins + */ + protected function getCryptopiaCurrencies() + { + $array = array(); + require_once ($this->basePath . '/yaamp/core/exchange/cryptopia.php'); + $data = cryptopia_api_query('GetCurrencies'); + + if (is_object($data) && !empty($data->Data)) foreach ($data->Data as $coin) + { + $key = strtoupper($coin->Symbol); + if (empty($key)) continue; + $array[$key] = $coin; + } + + return $array; + } + + public function updateCryptopiaLabels() + { + $coins = new db_coins; + $nbUpdated = 0; + + $dataset = $coins->findAll(array( + 'condition' => "name=:u OR algo='' OR algo='scrypt'", + 'params' => array( + ':u' => 'unknown' + ) + )); + + if (!empty($dataset)) + { + $json = self::getCryptopiaCurrencies(); + + foreach ($dataset as $coin) + { + if ($coin->name == 'unknown' && isset($json[$coin->symbol])) + { + $cc = $json[$coin->symbol]; + if ($cc->Name != $coin->name) + { + echo "{$coin->symbol}: {$cc->Name}\n"; + $coin->name = $cc->Name; + if ($cc->Algorithm != 'scrypt') $coin->algo = strtolower($cc->Algorithm); + $nbUpdated += $coin->save(); + } + } + } + if ($nbUpdated) echo "$nbUpdated coin labels updated from cryptopia\n"; + } + return $nbUpdated; + } + + public function updateLiveCoinLabels() + { + if (exchange_get('livecoin', 'disabled') == true) return 0; + + $coins = new db_coins; + $nbUpdated = 0; + + $dataset = $coins->findAll(array( + 'condition' => "name='unknown' AND id IN (SELECT M.coinid FROM markets M WHERE M.name='livecoin')", + )); + + if (!empty($dataset)) + { + //echo count($dataset)." livecoin currencies without labels\n"; + $labels = array(); + $data = livecoin_api_query('info/coinInfo'); + if (objSafeVal($data, 'success') !== true || !is_array($data->info)) return; + + foreach ($data->info as $c) + { + $symbol = objSafeVal($c, 'symbol', ''); + $labels[$symbol] = objSafeVal($c, 'name', 'unknown'); + } + + foreach ($dataset as $coin) + { + if ($coin->name == 'unknown' && isset($labels[$coin->symbol])) + { + $label = $labels[$coin->symbol]; + if ($label != $coin->name) + { + echo "{$coin->symbol}: {$label}\n"; + $coin->name = $label; + $nbUpdated += $coin->save(); + } + } + } + if ($nbUpdated) echo "$nbUpdated coin labels updated from livecoin coininfo\n"; + } + return $nbUpdated; + } + + public function updateYiimpLabels($pool) + { + $coins = new db_coins; + $nbUpdated = 0; + $nbAlgos = 0; + + $dataset = $coins->findAll(array( + 'condition' => "name=:u OR algo='' OR algo='scrypt'", + 'params' => array( + ':u' => 'unknown' + ) + )); + + if (!empty($dataset)) + { + $url = "http://{$pool}/api/currencies"; + $data = @file_get_contents($url); + if (empty($data)) return 0; + $json = json_decode($data, true); + + if (!empty($json)) foreach ($dataset as $coin) + { + if (!isset($json[$coin->symbol])) continue; + $cc = $json[$coin->symbol]; + if ($coin->name == 'unknown') + { + echo "{$coin->symbol}: {$cc['name']}\n"; + $coin->name = $cc['name']; + $nbUpdated += $coin->save(); + } + if (empty($cc['algo'])) continue; + if (empty($coin->algo) || $coin->algo != $cc['algo']) + { + $coin->algo = strtolower($cc['algo']); + echo "{$coin->symbol}: algo set to {$cc['algo']}\n"; + $nbAlgos += $coin->save(); + } + } + if ($nbUpdated) echo "$nbUpdated labels and $nbAlgos algos updated from $pool\n"; + } + return $nbUpdated; + } + + /** + * To import from a json file placed in the sql/ folder + */ + public function updateFromJson() + { + $sqlFolder = $this->basePath . '/../sql/'; + $jsonFile = $sqlFolder . 'labels.json'; + //$jsonFile = $sqlFolder.'yobit.txt'; + if (!file_exists($jsonFile)) return 0; + + $nbUpdated = 0; + + $json = json_decode(file_get_contents($jsonFile) , true); + /* + $json = array(); + $txt = explode("\n", file_get_contents($jsonFile)); + foreach ($txt as $line) + { + $cells = explode("\t", $line); + if (count($cells) < 2) continue; + $json[$cells[0]] = $cells[1]; + } + */ + if (!empty($json)) + { + $coins = new db_coins; + $dataset = $coins->findAll(array( + 'condition' => "name=:u", + 'params' => array( + ':u' => 'unknown' + ) + )); + + if (!empty($dataset)) foreach ($dataset as $coin) + { + if (isset($json[$coin->symbol])) + { + $name = $json[$coin->symbol]; + echo "{$coin->symbol}: {$name}\n"; + $coin->name = $name; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) echo "$nbUpdated coin labels updated from labels.json file\n"; + } + return $nbUpdated; + } + + /** + * Icon grabber - Bittrex + */ + public function grabBittrexIcons() + { + $nbUpdated = 0; + $markets = bittrex_api_query('public/getmarkets'); + if (!is_object($markets) || !is_object($markets->result)) + { + echo "bittrex api error\n"; + return $nbUpdated; + } + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='bittrex' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) return $nbUpdated; + echo "bittrex: try to download new icons...\n"; + foreach ($coins as $coin) + { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath . "/images/coin-{$symbol}.png"; + $url = ''; + foreach ($markets->result as $m) + { + if ($m->MarketCurrency == $symbol) + { + $url = $m->LogoUrl; + break; + } + } + if (empty($url)) continue; + try + { + $data = @file_get_contents($url); + } + catch(Exception $e) + { + continue; + } + if (strlen($data) < 2048) continue; + file_put_contents($local, $data); + $size = filesize($local); + if ($size > 0) + { + if ($size > 100 * 1024) + { + echo "warning: $symbol icon is huge, " . round($size / 1024, 1) . " KB ($url)\n"; + unlink($local); + } + else + { + echo $symbol . " icon found\n"; + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + } + if ($nbUpdated) echo "$nbUpdated icons downloaded from bittrex\n"; + return $nbUpdated; + } + + /** + * Icon grabber - Ccex + */ + public function grabCcexIcons() + { + $url = 'http://c-cex.com/i/l/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id WHERE M.name='c-cex' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) return 0; + echo "c-cex: try to download new icons...\n"; + foreach ($coins as $coin) + { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath . "/images/coin-{$symbol}.png"; + try + { + $data = @file_get_contents($url . strtolower($symbol) . '.png'); + } + catch(Exception $e) + { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol . " icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) + { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) echo "$nbUpdated icons downloaded from c-cex\n"; + return $nbUpdated; + } + + /** + * Icon grabber - Cryptopia (slow https) + */ + public function grabCryptopiaIcons() + { + $url = 'https://www.cryptopia.co.nz/Content/Images/Coins/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id " . "WHERE M.name='cryptopia' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) return 0; + echo "cryptopia: try to download new icons...\n"; + foreach ($coins as $coin) + { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath . "/images/coin-{$symbol}.png"; + try + { + $data = @file_get_contents($url . strtolower($symbol) . '-medium.png'); + } + catch(Exception $e) + { + continue; + } + if (strlen($data) < 3000 || strstr($data, ' 0) + { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) echo "$nbUpdated icons downloaded from cryptopia\n"; + return $nbUpdated; + } + + /** + * Icon grabber - CoinExchange + */ + public function grabCoinExchangeIcons() + { + $url = 'https://www.coinexchange.io/assets/currencies/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id " . "WHERE M.name='coinexchange' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) return 0; + echo "coinexchange: try to download new icons...\n"; + foreach ($coins as $coin) + { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + $local = $this->basePath . "/images/coin-{$symbol}.png"; + try + { + $data = @file_get_contents($url . strtolower($coin->name) . '.png'); + } + catch(Exception $e) + { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol . " icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) + { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) echo "$nbUpdated icons downloaded from coinexchange\n"; + return $nbUpdated; + } + + /** + * Icon grabber - Alcurex + */ + public function grabAlcurexIcons() + { + $url = 'https://alcurex.com/CSS/img/coins/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id " . "WHERE M.name='alcurex' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) return 0; + echo "alcurex: try to download new icons...\n"; + foreach ($coins as $coin) + { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->getOfficialSymbol(); + $local = $this->basePath . "/images/coin-{$symbol}.png"; + try + { + $data = @file_get_contents($url . strtoupper($symbol) . '.png'); + } + catch(Exception $e) + { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol . " icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) + { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) echo "$nbUpdated icons downloaded from alcurex\n"; + return $nbUpdated; + } + + /** + * Icon grabber - KuCoin + */ + public function grabKuCoinIcons() + { + $url = 'https://assets.kucoin.com/www/coin/pc/'; //GRIN.png + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id " . "WHERE M.name='kucoin' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) return 0; + echo "kucoin: try to download new icons...\n"; + foreach ($coins as $coin) + { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->getOfficialSymbol(); + $local = $this->basePath . "/images/coin-{$symbol}.png"; + try + { + $data = @file_get_contents($url . $symbol . '.png'); + } + catch(Exception $e) + { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol . " icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) + { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) echo "$nbUpdated icons downloaded from kucoin\n"; + return $nbUpdated; + } + + /** + * Icon grabber - NovaExchange + */ + public function grabNovaIcons() + { + $url = 'http://novaexchange.com/static/symbols/'; + $nbUpdated = 0; + $sql = "SELECT DISTINCT coins.id FROM coins INNER JOIN markets M ON M.coinid = coins.id " . "WHERE M.name='nova' AND IFNULL(coins.image,'') = ''"; + $coins = dbolist($sql); + if (empty($coins)) return 0; + echo "nova: try to download new icons...\n"; + foreach ($coins as $coin) + { + $coin = getdbo('db_coins', $coin["id"]); + $symbol = $coin->getOfficialSymbol(); + $local = $this->basePath . "/images/coin-{$symbol}.png"; + try + { + $data = @file_get_contents($url . strtolower($symbol) . '.png'); + } + catch(Exception $e) + { + continue; + } + if (strlen($data) < 2048) continue; + echo $symbol . " icon found\n"; + file_put_contents($local, $data); + if (filesize($local) > 0) + { + $coin->image = "/images/coin-{$symbol}.png"; + $nbUpdated += $coin->save(); + } + } + if ($nbUpdated) echo "$nbUpdated icons downloaded from novaexchange\n"; + return $nbUpdated; + } } diff --git a/web/yaamp/core/backend/bench.php b/web/yaamp/core/backend/bench.php index 54e4627c6..e8558984e 100644 --- a/web/yaamp/core/backend/bench.php +++ b/web/yaamp/core/backend/bench.php @@ -4,101 +4,118 @@ function BenchUpdateChips() { - require_once(app()->getModulePath().'/bench/functions.php'); + require_once(app()->getModulePath() . '/bench/functions.php'); - // some data cleanup tasks... - dborun("UPDATE benchmarks SET device=TRIM(device) WHERE type='cpu'"); - dborun("UPDATE benchmarks SET power=NULL WHERE power<=3"); - dborun("UPDATE benchmarks SET plimit=NULL WHERE plimit=0"); - dborun("UPDATE benchmarks SET freq=NULL WHERE freq=0"); - dborun("UPDATE benchmarks SET memf=NULL WHERE memf=0"); - dborun("UPDATE benchmarks SET realmemf=NULL WHERE realmemf<=100"); - dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200"); - // bug in nvml 378.x and 381.x (linux + win) fixed in 382.05 - dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200 AND driver LIKE '% 378.%'"); - dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200 AND driver LIKE '% 381.%'"); - // sanity check on long fields (no html wanted) - dborun("DELETE FROM benchmarks WHERE device LIKE '%<%' OR client LIKE '%<%'"); + // some data cleanup tasks... + dborun("UPDATE benchmarks SET device=TRIM(device) WHERE type='cpu'"); + dborun("UPDATE benchmarks SET power=NULL WHERE power<=3"); + dborun("UPDATE benchmarks SET plimit=NULL WHERE plimit=0"); + dborun("UPDATE benchmarks SET freq=NULL WHERE freq=0"); + dborun("UPDATE benchmarks SET memf=NULL WHERE memf=0"); + dborun("UPDATE benchmarks SET realmemf=NULL WHERE realmemf<=100"); + dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200"); + // bug in nvml 378.x and 381.x (linux + win) fixed in 382.05 + dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200 AND driver LIKE '% 378.%'"); + dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200 AND driver LIKE '% 381.%'"); + // sanity check on long fields (no html wanted) + dborun("DELETE FROM benchmarks WHERE device LIKE '%<%' OR client LIKE '%<%'"); - $benchs = getdbolist('db_benchmarks', "IFNULL(chip,'')=''"); - foreach ($benchs as $bench) { - if (empty($bench->vendorid) || empty($bench->device)) continue; + $benchs = getdbolist('db_benchmarks', "IFNULL(chip,'')=''"); + foreach ($benchs as $bench) { + if (empty($bench->vendorid) || empty($bench->device)) + continue; - if ($bench->algo == 'x16r') { // not constant, inaccurate - $bench->delete(); - continue; - } + if ($bench->algo == 'x16r') { // not constant, inaccurate + $bench->delete(); + continue; + } - $rawdata = json_encode($bench->attributes); - if (strpos($rawdata,"script")) { - debuglog("bench record deleted : $rawdata"); - $bench->delete(); - continue; - } + $rawdata = json_encode($bench->attributes); + if (strpos($rawdata, "script")) { + debuglog("bench record deleted : $rawdata"); + $bench->delete(); + continue; + } - $dups = getdbocount('db_benchmarks', "vendorid=:vid AND client=:client AND os=:os AND driver=:drv AND throughput=:thr AND userid=:uid", - array(':vid'=>$bench->vendorid, ':client'=>$bench->client, ':os'=>$bench->os, ':drv'=>$bench->driver,':thr'=>$bench->throughput,':uid'=>$bench->userid) - ); - if ($dups > 10 || round($bench->khps,3) == 0) { - //debuglog("bench: {$bench->device} ignored ($dups records already present)"); - $bench->delete(); - continue; - } + $dups = getdbocount('db_benchmarks', "vendorid=:vid AND client=:client AND os=:os AND driver=:drv AND throughput=:thr AND userid=:uid", array( + ':vid' => $bench->vendorid, + ':client' => $bench->client, + ':os' => $bench->os, + ':drv' => $bench->driver, + ':thr' => $bench->throughput, + ':uid' => $bench->userid + )); + if ($dups > 10 || round($bench->khps, 3) == 0) { + //debuglog("bench: {$bench->device} ignored ($dups records already present)"); + $bench->delete(); + continue; + } - $chip = getChipName($bench->attributes); - if (!empty($chip) && $chip != '-') { - $bench->chip = $chip; - $rates = dborow("SELECT AVG(khps) AS avg, COUNT(id) as cnt FROM benchmarks WHERE algo=:algo AND chip=:chip", - array(':algo'=>$bench->algo, ':chip'=>$chip) - ); - $avg = (double) $rates['avg']; - $cnt = intval($rates['cnt']); - if ($cnt > 250) { - $bench->delete(); - continue; - } elseif ($cnt > 5 && $bench->khps < $avg / 2) { - $user = getdbo('db_accounts', $bench->userid); - debuglog("bench: {$bench->device} ignored, bad {$bench->algo} hashrate {$bench->khps} kHs by {$user->username}"); - $bench->delete(); - continue; - } - if ($bench->chip == 'GPU' || $bench->chip == 'Graphics Device') { - $bench->delete(); - continue; - } - debuglog("bench: {$bench->device} ($chip)..."); - $bench->save(); - } - } + $chip = getChipName($bench->attributes); + if (!empty($chip) && $chip != '-') { + $bench->chip = $chip; + $rates = dborow("SELECT AVG(khps) AS avg, COUNT(id) as cnt FROM benchmarks WHERE algo=:algo AND chip=:chip", array( + ':algo' => $bench->algo, + ':chip' => $chip + )); + $avg = (double) $rates['avg']; + $cnt = intval($rates['cnt']); + if ($cnt > 250) { + $bench->delete(); + continue; + } elseif ($cnt > 5 && $bench->khps < $avg / 2) { + $user = getdbo('db_accounts', $bench->userid); + debuglog("bench: {$bench->device} ignored, bad {$bench->algo} hashrate {$bench->khps} kHs by {$user->username}"); + $bench->delete(); + continue; + } + if ($bench->chip == 'GPU' || $bench->chip == 'Graphics Device') { + $bench->delete(); + continue; + } + debuglog("bench: {$bench->device} ($chip)..."); + $bench->save(); + } + } - // add new chips - $rows = dbolist('SELECT DISTINCT B.chip, B.type FROM benchmarks B WHERE B.chip NOT IN ( - SELECT DISTINCT C.chip FROM bench_chips C WHERE C.devicetype = B.type - )'); + // add new chips + $rows = dbolist('SELECT DISTINCT B.chip, B.type FROM benchmarks B WHERE B.chip NOT IN ( + SELECT DISTINCT C.chip FROM bench_chips C WHERE C.devicetype = B.type + )'); - foreach ($rows as $row) { - if (empty($row['chip']) || empty($row['type'])) continue; - $chip = new db_bench_chips; - $chip->chip = $row['chip']; - $chip->devicetype = $row['type']; - if ($chip->insert()) { - debuglog("bench: added {$chip->devicetype} chip {$chip->chip}"); - dborun('UPDATE benchmarks SET idchip=:id WHERE chip=:chip AND type=:type', array( - ':id'=>$chip->id, ':chip'=>$row['chip'], ':type'=>$row['type'], - )); - } - } + foreach ($rows as $row) { + if (empty($row['chip']) || empty($row['type'])) + continue; + $chip = new db_bench_chips; + $chip->chip = $row['chip']; + $chip->devicetype = $row['type']; + if ($chip->insert()) { + debuglog("bench: added {$chip->devicetype} chip {$chip->chip}"); + dborun('UPDATE benchmarks SET idchip=:id WHERE chip=:chip AND type=:type', array( + ':id' => $chip->id, + ':chip' => $row['chip'], + ':type' => $row['type'] + )); + } + } - // update existing ones - $rows = dbolist('SELECT DISTINCT chip, type FROM benchmarks WHERE idchip IS NULL'); - foreach ($rows as $row) { - if (empty($row['chip']) || empty($row['type'])) continue; - $chip = getdbosql('db_bench_chips', 'chip=:name AND devicetype=:type', array(':name'=>$row['chip'], ':type'=>$row['type'])); - if (!$chip || !$chip->id) continue; - dborun('UPDATE benchmarks SET idchip=:id WHERE chip=:chip AND type=:type', array( - ':id'=>$chip->id, ':chip'=>$row['chip'], ':type'=>$row['type'], - )); - } + // update existing ones + $rows = dbolist('SELECT DISTINCT chip, type FROM benchmarks WHERE idchip IS NULL'); + foreach ($rows as $row) { + if (empty($row['chip']) || empty($row['type'])) + continue; + $chip = getdbosql('db_bench_chips', 'chip=:name AND devicetype=:type', array( + ':name' => $row['chip'], + ':type' => $row['type'] + )); + if (!$chip || !$chip->id) + continue; + dborun('UPDATE benchmarks SET idchip=:id WHERE chip=:chip AND type=:type', array( + ':id' => $chip->id, + ':chip' => $row['chip'], + ':type' => $row['type'] + )); + } } diff --git a/web/yaamp/core/backend/blocks.php b/web/yaamp/core/backend/blocks.php index d1e53eceb..84bca41b8 100644 --- a/web/yaamp/core/backend/blocks.php +++ b/web/yaamp/core/backend/blocks.php @@ -2,80 +2,97 @@ function BackendBlockNew($coin, $db_block) { -// debuglog("NEW BLOCK $coin->name $db_block->height"); - $reward = $db_block->amount; - if(!$reward || $db_block->algo == 'PoS' || $db_block->algo == 'MN') return; - if($db_block->category == 'stake' || $db_block->category == 'generated') return; - - $sqlCond = "valid = 1"; - if(!YAAMP_ALLOW_EXCHANGE) // only one coin mined - $sqlCond .= " AND coinid = ".intval($coin->id); - - $total_hash_power = dboscalar("SELECT SUM(difficulty) FROM shares WHERE $sqlCond AND algo=:algo", array(':algo'=>$coin->algo)); - if(!$total_hash_power) return; - - $list = dbolist("SELECT userid, SUM(difficulty) AS total FROM shares WHERE $sqlCond AND algo=:algo GROUP BY userid", - array(':algo'=>$coin->algo)); - - foreach($list as $item) - { - $hash_power = $item['total']; - if(!$hash_power) continue; - - $user = getdbo('db_accounts', $item['userid']); - if(!$user) continue; - - $amount = $reward * $hash_power / $total_hash_power; - if(!$user->no_fees) $amount = take_yaamp_fee($amount, $coin->algo); - if(!empty($user->donation)) { - $amount = take_yaamp_fee($amount, $coin->algo, $user->donation); - if ($amount <= 0) continue; - } - - $earning = new db_earnings; - $earning->userid = $user->id; - $earning->coinid = $coin->id; - $earning->blockid = $db_block->id; - $earning->create_time = $db_block->time; - $earning->amount = $amount; - $earning->price = $coin->price; - - if($db_block->category == 'generate') - { - $earning->mature_time = time(); - $earning->status = 1; - } - else // immature - $earning->status = 0; - - $ucoin = (object) dborow("SELECT algo,symbol FROM coins WHERE id=:id", array(':id'=>$user->coinid)); - if(!YAAMP_ALLOW_EXCHANGE && $ucoin && $ucoin->algo != $coin->algo) { - debuglog($coin->symbol.": invalid earning for {$user->username}, user coin is {$ucoin->symbol}"); - $earning->status = -1; - } - - if (!$earning->save()) - debuglog(__FUNCTION__.": Unable to insert earning!"); - - dborun('UPDATE accounts SET last_earning=:time WHERE id=:id', array(':id'=>$user->id, ':time'=>time())); - } - - $delay = time() - 5*60; - $sqlCond = "time < $delay"; - if(!YAAMP_ALLOW_EXCHANGE) // only one coin mined - $sqlCond .= " AND coinid = ".intval($coin->id); - - try { - dborun("DELETE FROM shares WHERE algo=:algo AND $sqlCond", array(':algo'=>$coin->algo)); - - } catch (CDbException $e) { - - debuglog("unable to delete shares $sqlCond retrying..."); - sleep(1); - dborun("DELETE FROM shares WHERE algo=:algo AND $sqlCond", array(':algo'=>$coin->algo)); - // [errorInfo] => array(0 => 'HY000', 1 => 1205, 2 => 'Lock wait timeout exceeded; try restarting transaction') - // [*:message] => 'CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' - } + // debuglog("NEW BLOCK $coin->name $db_block->height"); + $reward = $db_block->amount; + if (!$reward || $db_block->algo == 'PoS' || $db_block->algo == 'MN') + return; + if ($db_block->category == 'stake' || $db_block->category == 'generated') + return; + + $sqlCond = "valid = 1"; + if (!YAAMP_ALLOW_EXCHANGE) // only one coin mined + $sqlCond .= " AND coinid = " . intval($coin->id); + + $total_hash_power = dboscalar("SELECT SUM(difficulty) FROM shares WHERE $sqlCond AND algo=:algo", array( + ':algo' => $coin->algo + )); + if (!$total_hash_power) + return; + + $list = dbolist("SELECT userid, SUM(difficulty) AS total FROM shares WHERE $sqlCond AND algo=:algo GROUP BY userid", array( + ':algo' => $coin->algo + )); + + foreach ($list as $item) { + $hash_power = $item['total']; + if (!$hash_power) + continue; + + $user = getdbo('db_accounts', $item['userid']); + if (!$user) + continue; + + $amount = $reward * $hash_power / $total_hash_power; + if (!$user->no_fees) + $amount = take_yaamp_fee($amount, $coin->algo); + if (!empty($user->donation)) { + $amount = take_yaamp_fee($amount, $coin->algo, $user->donation); + if ($amount <= 0) + continue; + } + + $earning = new db_earnings; + $earning->userid = $user->id; + $earning->coinid = $coin->id; + $earning->blockid = $db_block->id; + $earning->create_time = $db_block->time; + $earning->amount = $amount; + $earning->price = $coin->price; + + if ($db_block->category == 'generate') { + $earning->mature_time = time(); + $earning->status = 1; + } else // immature + $earning->status = 0; + + $ucoin = (object) dborow("SELECT algo,symbol FROM coins WHERE id=:id", array( + ':id' => $user->coinid + )); + if (!YAAMP_ALLOW_EXCHANGE && $ucoin && $ucoin->algo != $coin->algo) { + debuglog($coin->symbol . ": invalid earning for {$user->username}, user coin is {$ucoin->symbol}"); + $earning->status = -1; + } + + if (!$earning->save()) + debuglog(__FUNCTION__ . ": Unable to insert earning!"); + + dborun('UPDATE accounts SET last_earning=:time WHERE id=:id', array( + ':id' => $user->id, + ':time' => time() + )); + } + + $delay = time() - 5 * 60; + $sqlCond = "time < $delay"; + if (!YAAMP_ALLOW_EXCHANGE) // only one coin mined + $sqlCond .= " AND coinid = " . intval($coin->id); + + try { + dborun("DELETE FROM shares WHERE algo=:algo AND $sqlCond", array( + ':algo' => $coin->algo + )); + + } + catch (CDbException $e) { + + debuglog("unable to delete shares $sqlCond retrying..."); + sleep(1); + dborun("DELETE FROM shares WHERE algo=:algo AND $sqlCond", array( + ':algo' => $coin->algo + )); + // [errorInfo] => array(0 => 'HY000', 1 => 1205, 2 => 'Lock wait timeout exceeded; try restarting transaction') + // [*:message] => 'CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' + } } ///////////////////////////////////////////////////////////////////////////////////////////////// @@ -83,90 +100,91 @@ function BackendBlockNew($coin, $db_block) function BackendBlockFind1($coinid = NULL) { - $sqlFilter = $coinid ? " AND coin_id=".intval($coinid) : ''; - -// debuglog(__METHOD__); - $list = getdbolist('db_blocks', "category='new' $sqlFilter ORDER BY time"); - foreach($list as $db_block) - { - $coin = getdbo('db_coins', $db_block->coin_id); - if(!$coin || !$db_block->coin_id) { - debuglog("warning: bad coin id {$db_block->coin_id} for block id {$db_block->id}!"); - $db_block->delete(); - continue; - } - if(!$coin->enable) continue; - if($coin->rpcencoding == 'DCR' && !$coin->auto_ready) continue; - - $dblock = getdbosql('db_blocks', "coin_id=:coinid AND blockhash=:hash AND height=:height AND id!=:blockid", - array(':coinid'=>$coin->id, ':hash'=>$db_block->blockhash, ':height'=>$db_block->height, ':blockid'=>$db_block->id) - ); - - if($dblock) { - debuglog("warning: Doubled {$coin->symbol} block found for block height {$db_block->height}!"); - $db_block->delete(); - continue; - } - - $db_block->category = 'orphan'; - $remote = new WalletRPC($coin); - - $block = $remote->getblock($db_block->blockhash); - $block_age = time() - $db_block->time; - if($coin->rpcencoding == 'DCR' && $block_age < 2000) { - // DCR generated blocks need some time to be accepted by the network (gettransaction) - if (!$block) continue; - $txid = $block['tx'][0]; - $tx = $remote->gettransaction($txid); - if (!$tx || !isset($tx['details'])) continue; - debuglog("{$coin->symbol} {$db_block->height} confirmed after ".$block_age." seconds"); - } - else if(!$block || !isset($block['tx']) || !isset($block['tx'][0])) - { - $db_block->amount = 0; - $db_block->save(); - debuglog("{$coin->symbol} orphan {$db_block->height} after ".(time() - $db_block->time)." seconds"); - continue; - } - else if ($coin->rpcencoding == 'POS' && arraySafeVal($block,'nonce') == 0) { - $db_block->category = 'stake'; - $db_block->save(); - continue; - } - - $tx = $remote->gettransaction($block['tx'][0]); - if(!$tx || !isset($tx['details']) || !isset($tx['details'][0])) - { - $db_block->amount = 0; - $db_block->save(); - continue; - } - - $db_block->txhash = $block['tx'][0]; - $db_block->category = 'immature'; //$tx['details'][0]['category']; - $db_block->amount = $tx['details'][0]['amount']; - $db_block->confirmations = $tx['confirmations']; - $db_block->price = $coin->price; - - // save worker to compute blocs found per worker (current workers stats) - // now made directly in stratum - require DB update 2015-09-20 - if (empty($db_block->workerid) && $db_block->userid > 0) { - $db_block->workerid = (int) dboscalar( - "SELECT workerid FROM shares WHERE userid=:user AND coinid=:coin AND valid=1 AND time <= :time ". - "ORDER BY difficulty DESC LIMIT 1", array( - ':user' => $db_block->userid, - ':coin' => $db_block->coin_id, - ':time' => $db_block->time - )); - if (!$db_block->workerid) $db_block->workerid = NULL; - } - - if (!$db_block->save()) - debuglog(__FUNCTION__.": unable to insert block!"); - - if($db_block->category != 'orphan') - BackendBlockNew($coin, $db_block); // will drop shares - } + $sqlFilter = $coinid ? " AND coin_id=" . intval($coinid) : ''; + + // debuglog(__METHOD__); + $list = getdbolist('db_blocks', "category='new' $sqlFilter ORDER BY time"); + foreach ($list as $db_block) { + $coin = getdbo('db_coins', $db_block->coin_id); + if (!$coin || !$db_block->coin_id) { + debuglog("warning: bad coin id {$db_block->coin_id} for block id {$db_block->id}!"); + $db_block->delete(); + continue; + } + if (!$coin->enable) + continue; + if ($coin->rpcencoding == 'DCR' && !$coin->auto_ready) + continue; + + $dblock = getdbosql('db_blocks', "coin_id=:coinid AND blockhash=:hash AND height=:height AND id!=:blockid", array( + ':coinid' => $coin->id, + ':hash' => $db_block->blockhash, + ':height' => $db_block->height, + ':blockid' => $db_block->id + )); + + if ($dblock) { + debuglog("warning: Doubled {$coin->symbol} block found for block height {$db_block->height}!"); + $db_block->delete(); + continue; + } + + $db_block->category = 'orphan'; + $remote = new WalletRPC($coin); + + $block = $remote->getblock($db_block->blockhash); + $block_age = time() - $db_block->time; + if ($coin->rpcencoding == 'DCR' && $block_age < 2000) { + // DCR generated blocks need some time to be accepted by the network (gettransaction) + if (!$block) + continue; + $txid = $block['tx'][0]; + $tx = $remote->gettransaction($txid); + if (!$tx || !isset($tx['details'])) + continue; + debuglog("{$coin->symbol} {$db_block->height} confirmed after " . $block_age . " seconds"); + } else if (!$block || !isset($block['tx']) || !isset($block['tx'][0])) { + $db_block->amount = 0; + $db_block->save(); + debuglog("{$coin->symbol} orphan {$db_block->height} after " . (time() - $db_block->time) . " seconds"); + continue; + } else if ($coin->rpcencoding == 'POS' && arraySafeVal($block, 'nonce') == 0) { + $db_block->category = 'stake'; + $db_block->save(); + continue; + } + + $tx = $remote->gettransaction($block['tx'][0]); + if (!$tx || !isset($tx['details']) || !isset($tx['details'][0])) { + $db_block->amount = 0; + $db_block->save(); + continue; + } + + $db_block->txhash = $block['tx'][0]; + $db_block->category = 'immature'; //$tx['details'][0]['category']; + $db_block->amount = $tx['details'][0]['amount']; + $db_block->confirmations = $tx['confirmations']; + $db_block->price = $coin->price; + + // save worker to compute blocs found per worker (current workers stats) + // now made directly in stratum - require DB update 2015-09-20 + if (empty($db_block->workerid) && $db_block->userid > 0) { + $db_block->workerid = (int) dboscalar("SELECT workerid FROM shares WHERE userid=:user AND coinid=:coin AND valid=1 AND time <= :time " . "ORDER BY difficulty DESC LIMIT 1", array( + ':user' => $db_block->userid, + ':coin' => $db_block->coin_id, + ':time' => $db_block->time + )); + if (!$db_block->workerid) + $db_block->workerid = NULL; + } + + if (!$db_block->save()) + debuglog(__FUNCTION__ . ": unable to insert block!"); + + if ($db_block->category != 'orphan') + BackendBlockNew($coin, $db_block); // will drop shares + } } ///////////////////////////////////////////////////////////////////////////////// @@ -174,128 +192,126 @@ function BackendBlockFind1($coinid = NULL) function BackendBlocksUpdate($coinid = NULL) { -// debuglog(__METHOD__); - $t1 = microtime(true); - - $sqlFilter = $coinid ? " AND coin_id=".intval($coinid) : ''; - - $list = getdbolist('db_blocks', "category IN ('immature','stake','orphan') $sqlFilter ORDER BY time"); - foreach($list as $block) - { - $coin = getdbo('db_coins', $block->coin_id); - if(!$block->coin_id || !$coin) { - debuglog("warning: bad coin id {$block->coin_id} for block id {$block->id}!"); - $block->delete(); - continue; - } - - if (!$coin->auto_ready || ($coin->target_height && $coin->target_height > $coin->block_height)) { - continue; - } - - $remote = new WalletRPC($coin); - if(empty($block->txhash)) - { - $blockext = $remote->getblock($block->blockhash); - - if ($coin->rpcencoding == 'POS' && arraySafeVal($blockext,'nonce') == 0) { - $block->category = 'stake'; - $block->save(); - } - - if(!$blockext || !isset($blockext['tx'][0])) continue; - - $block->txhash = $blockext['tx'][0]; - - if(empty($block->txhash)) continue; - } - - $tx = $remote->gettransaction($block->txhash); - if(!$tx && $block->category != 'orphan') { - if ($coin->enable) { - debuglog("{$coin->name} unable to find {$block->category} block {$block->height} tx {$block->txhash}!"); - // DCR orphaned confirmations are not(no more) -1! - if($coin->rpcencoding == 'DCR' && $block->category == 'immature' && $coin->auto_ready) { - $blockext = $remote->getblock($block->blockhash); - $conf = arraySafeVal($blockext,'confirmations',-1); - if ($conf == -1 || ($conf > 2 && arraySafeVal($blockext,'nextblockhash','') == '')) { - debuglog("{$coin->name} orphan block {$block->height} detected! (after $conf confirmations)"); - $block->confirmations = -1; - $block->amount = 0; - $block->category = 'orphan'; - $block->save(); - continue; - } - } - } - else if ((time() - $block->time) > (7 * 24 * 3600)) { - debuglog("{$coin->name} outdated immature block {$block->height} detected!"); - $block->category = 'orphan'; - } - $block->save(); - continue; - } - - if ($block->category == 'orphan') { - // LUX doing multiple reorg ? Only seen on this wallet - if ($coin->enable && (time() - $block->time) < 3600) { - $blockext = $remote->getblock($block->blockhash); - $conf = arraySafeVal($blockext,'confirmations',-1); - if ($conf > 2 && arraySafeVal($blockext,'nextblockhash','') != '') { - debuglog("{$coin->name} orphan block {$block->height} is not anymore! ($conf confirmations)"); - $block->category = 'new'; // will set amount and restore user earnings - $block->save(); - } - } - continue; - } - - $block->confirmations = $tx['confirmations']; - - $category = $block->category; - if($block->confirmations == -1 && $coin->enable && $coin->auto_ready) { - $category = 'orphan'; - $block->amount = 0; - } - - else if(isset($tx['details']) && isset($tx['details'][0])) - $category = $tx['details'][0]['category']; - - else if(isset($tx['category'])) - $category = $tx['category']; - - // PoS blocks - if ($block->category == 'stake') { - if ($category == 'generate') { - $block->category = 'generated'; - } else if ($category == 'orphan') { - $block->category = 'orphan'; - } - $block->save(); - continue; - } - - // PoW blocks - $block->category = $category; - $block->save(); - - if($category == 'generate') { - dborun("UPDATE earnings SET status=1, mature_time=UNIX_TIMESTAMP() WHERE blockid=".intval($block->id)." AND status!=-1"); - - // auto update mature_blocks - if ($block->confirmations > 0 && $block->confirmations < $coin->mature_blocks || empty($coin->mature_blocks)) { - $coin = getdbo('db_coins', $block->coin_id); // refresh coin data - debuglog("{$coin->symbol} mature_blocks updated to {$block->confirmations}"); - $coin->mature_blocks = $block->confirmations; - $coin->save(); - } - } - else if($category != 'immature') - dborun("DELETE FROM earnings WHERE blockid=".intval($block->id)." AND status!=-1"); - } - - $d1 = microtime(true) - $t1; - controller()->memcache->add_monitoring_function(__METHOD__, $d1); + // debuglog(__METHOD__); + $t1 = microtime(true); + + $sqlFilter = $coinid ? " AND coin_id=" . intval($coinid) : ''; + + $list = getdbolist('db_blocks', "category IN ('immature','stake','orphan') $sqlFilter ORDER BY time"); + foreach ($list as $block) { + $coin = getdbo('db_coins', $block->coin_id); + if (!$block->coin_id || !$coin) { + debuglog("warning: bad coin id {$block->coin_id} for block id {$block->id}!"); + $block->delete(); + continue; + } + + if (!$coin->auto_ready || ($coin->target_height && $coin->target_height > $coin->block_height)) { + continue; + } + + $remote = new WalletRPC($coin); + if (empty($block->txhash)) { + $blockext = $remote->getblock($block->blockhash); + + if ($coin->rpcencoding == 'POS' && arraySafeVal($blockext, 'nonce') == 0) { + $block->category = 'stake'; + $block->save(); + } + + if (!$blockext || !isset($blockext['tx'][0])) + continue; + + $block->txhash = $blockext['tx'][0]; + + if (empty($block->txhash)) + continue; + } + + $tx = $remote->gettransaction($block->txhash); + if (!$tx && $block->category != 'orphan') { + if ($coin->enable) { + debuglog("{$coin->name} unable to find {$block->category} block {$block->height} tx {$block->txhash}!"); + // DCR orphaned confirmations are not(no more) -1! + if ($coin->rpcencoding == 'DCR' && $block->category == 'immature' && $coin->auto_ready) { + $blockext = $remote->getblock($block->blockhash); + $conf = arraySafeVal($blockext, 'confirmations', -1); + if ($conf == -1 || ($conf > 2 && arraySafeVal($blockext, 'nextblockhash', '') == '')) { + debuglog("{$coin->name} orphan block {$block->height} detected! (after $conf confirmations)"); + $block->confirmations = -1; + $block->amount = 0; + $block->category = 'orphan'; + $block->save(); + continue; + } + } + } else if ((time() - $block->time) > (7 * 24 * 3600)) { + debuglog("{$coin->name} outdated immature block {$block->height} detected!"); + $block->category = 'orphan'; + } + $block->save(); + continue; + } + + if ($block->category == 'orphan') { + // LUX doing multiple reorg ? Only seen on this wallet + if ($coin->enable && (time() - $block->time) < 3600) { + $blockext = $remote->getblock($block->blockhash); + $conf = arraySafeVal($blockext, 'confirmations', -1); + if ($conf > 2 && arraySafeVal($blockext, 'nextblockhash', '') != '') { + debuglog("{$coin->name} orphan block {$block->height} is not anymore! ($conf confirmations)"); + $block->category = 'new'; // will set amount and restore user earnings + $block->save(); + } + } + continue; + } + + $block->confirmations = $tx['confirmations']; + + $category = $block->category; + if ($block->confirmations == -1 && $coin->enable && $coin->auto_ready) { + $category = 'orphan'; + $block->amount = 0; + } + + else if (isset($tx['details']) && isset($tx['details'][0])) + $category = $tx['details'][0]['category']; + + else if (isset($tx['category'])) + $category = $tx['category']; + + // PoS blocks + if ($block->category == 'stake') { + if ($category == 'generate') { + $block->category = 'generated'; + } else if ($category == 'orphan') { + $block->category = 'orphan'; + } + $block->save(); + continue; + } + + // PoW blocks + $block->category = $category; + $block->save(); + + if ($category == 'generate') { + dborun("UPDATE earnings SET status=1, mature_time=UNIX_TIMESTAMP() WHERE blockid=" . intval($block->id) . " AND status!=-1"); + + // auto update mature_blocks + if ($block->confirmations > 0 && $block->confirmations < $coin->mature_blocks || empty($coin->mature_blocks)) { + $coin = getdbo('db_coins', $block->coin_id); // refresh coin data + debuglog("{$coin->symbol} mature_blocks updated to {$block->confirmations}"); + $coin->mature_blocks = $block->confirmations; + $coin->save(); + } + } else if ($category != 'immature') + dborun("DELETE FROM earnings WHERE blockid=" . intval($block->id) . " AND status!=-1"); + } + + $d1 = microtime(true) - $t1; + controller()->memcache->add_monitoring_function(__METHOD__, $d1); } //////////////////////////////////////////////////////////////////////////////////////////// @@ -303,98 +319,107 @@ function BackendBlocksUpdate($coinid = NULL) function BackendBlockFind2($coinid = NULL) { - $t1 = microtime(true); - - $sqlFilter = $coinid ? "id=".intval($coinid) : 'enable=1'; - - $coins = getdbolist('db_coins', $sqlFilter); - foreach($coins as $coin) - { - if($coin->symbol == 'BTC') continue; - $remote = new WalletRPC($coin); - - $timerpc = microtime(true); - $mostrecent = 0; - if(empty($coin->lastblock)) $coin->lastblock = ''; - $list = $remote->listsinceblock($coin->lastblock); - $rpcdelay = microtime(true) - $timerpc; - if ($rpcdelay > 0.5) - screenlog(__FUNCTION__.": {$coin->symbol} listsinceblock took ".round($rpcdelay,3)." sec, ". - (is_array($list) ? count($list) : 0). "txs"); - if(!$list) continue; - - foreach($list['transactions'] as $transaction) - { - if(!isset($transaction['blockhash'])) continue; - if($transaction['time'] > time() - 5*60) continue; - if($transaction['time'] < time() - 60*60) continue; - if($transaction['category'] != 'generate' && $transaction['category'] != 'immature') continue; - - $blockext = $remote->getblock($transaction['blockhash']); - if(!$blockext) continue; - - $db_block = getdbosql('db_blocks', "coin_id=:id AND (blockhash=:hash OR height=:height)", - array(':id'=>$coin->id, ':hash'=>$transaction['blockhash'], ':height'=>$blockext['height']) - ); - if($db_block) continue; - - if ($coin->rpcencoding == 'DCR') - debuglog("{$coin->name} generated block {$blockext['height']} detected!"); - - if($transaction['time'] > $mostrecent) { - $coin = getdbo('db_coins', $coin->id); // refresh coin data - $coin->lastblock = $transaction['blockhash']; - $coin->save(); - $mostrecent = $transaction['time']; - } - - $db_block = new db_blocks; - $db_block->blockhash = $transaction['blockhash']; - $db_block->coin_id = $coin->id; - $db_block->category = 'immature'; //$transaction['category']; - $db_block->time = $transaction['time']; - $db_block->amount = $transaction['amount']; - $db_block->algo = $coin->algo; - - if (arraySafeVal($blockext,'nonce',0) != 0) { - $db_block->difficulty_user = hash_to_difficulty($coin, $transaction['blockhash']); - } else if ($coin->rpcencoding == 'POS') { - $db_block->category = 'stake'; - } - - // masternode earnings... - if (empty($db_block->userid) && $transaction['amount'] == 0 && $transaction['generated']) { - $db_block->algo = 'MN'; - $tx = $remote->getrawtransaction($transaction['txid'], 1); - - // assume the MN amount is in the last vout record (should check "addresses") - if (isset($tx['vout']) && !empty($tx['vout'])) { - $vout = end($tx['vout']); - $db_block->amount = $vout['value']; - debuglog("MN ".bitcoinvaluetoa($db_block->amount).' '.$coin->symbol.' ('.$blockext['height'].')'); - } - - if (!$coin->hasmasternodes) { - $coin = getdbo('db_coins', $coin->id); // refresh coin data - $coin->hasmasternodes = true; - $coin->save(); - } - } - - $db_block->confirmations = $transaction['confirmations']; - $db_block->height = $blockext['height']; - $db_block->difficulty = $blockext['difficulty']; - $db_block->price = $coin->price; - if (!$db_block->save()) - debuglog(__FUNCTION__.": unable to insert block!"); - - BackendBlockNew($coin, $db_block); - } // tx - } - - $d1 = microtime(true) - $t1; - controller()->memcache->add_monitoring_function(__FUNCTION__, $d1); - if ($d1 > 3.0) screenlog(__FUNCTION__.": took ".round($d1,3)." sec"); + $t1 = microtime(true); + + $sqlFilter = $coinid ? "id=" . intval($coinid) : 'enable=1'; + + $coins = getdbolist('db_coins', $sqlFilter); + foreach ($coins as $coin) { + if ($coin->symbol == 'BTC') + continue; + $remote = new WalletRPC($coin); + + $timerpc = microtime(true); + $mostrecent = 0; + if (empty($coin->lastblock)) + $coin->lastblock = ''; + $list = $remote->listsinceblock($coin->lastblock); + $rpcdelay = microtime(true) - $timerpc; + if ($rpcdelay > 0.5) + screenlog(__FUNCTION__ . ": {$coin->symbol} listsinceblock took " . round($rpcdelay, 3) . " sec, " . (is_array($list) ? count($list) : 0) . "txs"); + if (!$list) + continue; + + foreach ($list['transactions'] as $transaction) { + if (!isset($transaction['blockhash'])) + continue; + if ($transaction['time'] > time() - 5 * 60) + continue; + if ($transaction['time'] < time() - 60 * 60) + continue; + if ($transaction['category'] != 'generate' && $transaction['category'] != 'immature') + continue; + + $blockext = $remote->getblock($transaction['blockhash']); + if (!$blockext) + continue; + + $db_block = getdbosql('db_blocks', "coin_id=:id AND (blockhash=:hash OR height=:height)", array( + ':id' => $coin->id, + ':hash' => $transaction['blockhash'], + ':height' => $blockext['height'] + )); + if ($db_block) + continue; + + if ($coin->rpcencoding == 'DCR') + debuglog("{$coin->name} generated block {$blockext['height']} detected!"); + + if ($transaction['time'] > $mostrecent) { + $coin = getdbo('db_coins', $coin->id); // refresh coin data + $coin->lastblock = $transaction['blockhash']; + $coin->save(); + $mostrecent = $transaction['time']; + } + + $db_block = new db_blocks; + $db_block->blockhash = $transaction['blockhash']; + $db_block->coin_id = $coin->id; + $db_block->category = 'immature'; //$transaction['category']; + $db_block->time = $transaction['time']; + $db_block->amount = $transaction['amount']; + $db_block->algo = $coin->algo; + + if (arraySafeVal($blockext, 'nonce', 0) != 0) { + $db_block->difficulty_user = hash_to_difficulty($coin, $transaction['blockhash']); + } else if ($coin->rpcencoding == 'POS') { + $db_block->category = 'stake'; + } + + // masternode earnings... + if (empty($db_block->userid) && $transaction['amount'] == 0 && $transaction['generated']) { + $db_block->algo = 'MN'; + $tx = $remote->getrawtransaction($transaction['txid'], 1); + + // assume the MN amount is in the last vout record (should check "addresses") + if (isset($tx['vout']) && !empty($tx['vout'])) { + $vout = end($tx['vout']); + $db_block->amount = $vout['value']; + debuglog("MN " . bitcoinvaluetoa($db_block->amount) . ' ' . $coin->symbol . ' (' . $blockext['height'] . ')'); + } + + if (!$coin->hasmasternodes) { + $coin = getdbo('db_coins', $coin->id); // refresh coin data + $coin->hasmasternodes = true; + $coin->save(); + } + } + + $db_block->confirmations = $transaction['confirmations']; + $db_block->height = $blockext['height']; + $db_block->difficulty = $blockext['difficulty']; + $db_block->price = $coin->price; + if (!$db_block->save()) + debuglog(__FUNCTION__ . ": unable to insert block!"); + + BackendBlockNew($coin, $db_block); + } // tx + } + + $d1 = microtime(true) - $t1; + controller()->memcache->add_monitoring_function(__FUNCTION__, $d1); + if ($d1 > 3.0) + screenlog(__FUNCTION__ . ": took " . round($d1, 3) . " sec"); } //////////////////////////////////////////////////////////////////////////////////////////// @@ -402,74 +427,78 @@ function BackendBlockFind2($coinid = NULL) function BackendUpdatePoolBalances($coinid = NULL) { - $t1 = microtime(true); - - $sqlFilter = 'enable=1'; - - if ($coinid) { // used from wallet manual send - $sqlFilter = "id=".intval($coinid); - // refresh balance field from the wallet info - $coin = getdbo('db_coins', $coinid); - $remote = new WalletRPC($coin); - $info = $remote->getinfo(); - if(isset($info['balance'])) { - $coin->balance = $info['balance']; - $coin->save(); - } - } - - $coins = getdbolist('db_coins', $sqlFilter); - foreach($coins as $coin) - { - $coin->immature = (double) dboscalar("SELECT SUM(amount) FROM blocks WHERE category='immature' AND coin_id=".intval($coin->id)); - $coin->cleared = (double) dboscalar("SELECT SUM(balance) FROM accounts WHERE coinid=".intval($coin->id)); - $pending = (double) dboscalar("SELECT SUM(amount) FROM earnings WHERE status=1 AND coinid=".intval($coin->id)); // (to be cleared) - $coin->available = (double) $coin->balance - $coin->cleared - $pending; - //if ($pending) debuglog("{$coin->symbol} immature {$coin->immature}, cleared {$coin->cleared}, pending {$pending}, available {$coin->available}"); - $coin->save(); - } - - $d1 = microtime(true) - $t1; - controller()->memcache->add_monitoring_function(__FUNCTION__, $d1); - //debuglog(__FUNCTION__." took ".round($d1,3)." sec"); + $t1 = microtime(true); + + $sqlFilter = 'enable=1'; + + if ($coinid) { // used from wallet manual send + $sqlFilter = "id=" . intval($coinid); + // refresh balance field from the wallet info + $coin = getdbo('db_coins', $coinid); + $remote = new WalletRPC($coin); + $info = $remote->getinfo(); + if (isset($info['balance'])) { + $coin->balance = $info['balance']; + $coin->save(); + } + } + + $coins = getdbolist('db_coins', $sqlFilter); + foreach ($coins as $coin) { + $coin->immature = (double) dboscalar("SELECT SUM(amount) FROM blocks WHERE category='immature' AND coin_id=" . intval($coin->id)); + $coin->cleared = (double) dboscalar("SELECT SUM(balance) FROM accounts WHERE coinid=" . intval($coin->id)); + $pending = (double) dboscalar("SELECT SUM(amount) FROM earnings WHERE status=1 AND coinid=" . intval($coin->id)); // (to be cleared) + $coin->available = (double) $coin->balance - $coin->cleared - $pending; + //if ($pending) debuglog("{$coin->symbol} immature {$coin->immature}, cleared {$coin->cleared}, pending {$pending}, available {$coin->available}"); + $coin->save(); + } + + $d1 = microtime(true) - $t1; + controller()->memcache->add_monitoring_function(__FUNCTION__, $d1); + //debuglog(__FUNCTION__." took ".round($d1,3)." sec"); } //////////////////////////////////////////////////////////////////////////////////////////// function MonitorBTC() { -// debuglog(__FUNCTION__); + // debuglog(__FUNCTION__); - $coin = getdbosql('db_coins', "symbol='BTC'"); - if(!$coin) return; + $coin = getdbosql('db_coins', "symbol='BTC'"); + if (!$coin) + return; - $remote = new WalletRPC($coin); - if(!$remote) return; + $remote = new WalletRPC($coin); + if (!$remote) + return; - $mostrecent = 0; - if($coin->lastblock == null) $coin->lastblock = ''; - $list = $remote->listsinceblock($coin->lastblock); - if(!$list) return; + $mostrecent = 0; + if ($coin->lastblock == null) + $coin->lastblock = ''; + $list = $remote->listsinceblock($coin->lastblock); + if (!$list) + return; - $coin->lastblock = $list['lastblock']; - $coin->save(); + $coin->lastblock = $list['lastblock']; + $coin->save(); - foreach($list['transactions'] as $transaction) - { - if(!isset($transaction['blockhash'])) continue; - if($transaction['confirmations'] == 0) continue; - if($transaction['category'] != 'send') continue; - //if($transaction['fee'] != -0.0001) continue; + foreach ($list['transactions'] as $transaction) { + if (!isset($transaction['blockhash'])) + continue; + if ($transaction['confirmations'] == 0) + continue; + if ($transaction['category'] != 'send') + continue; + //if($transaction['fee'] != -0.0001) continue; - debuglog(__FUNCTION__); - debuglog($transaction); + debuglog(__FUNCTION__); + debuglog($transaction); - $txurl = "https://blockchain.info/tx/{$transaction['txid']}"; + $txurl = "https://blockchain.info/tx/{$transaction['txid']}"; - $b = mail(YAAMP_ADMIN_EMAIL, "withdraw {$transaction['amount']}", - "{$transaction['address']}"); + $b = mail(YAAMP_ADMIN_EMAIL, "withdraw {$transaction['amount']}", "{$transaction['address']}"); - if(!$b) debuglog('error sending email'); - } + if (!$b) + debuglog('error sending email'); + } } - diff --git a/web/yaamp/core/backend/clear.php b/web/yaamp/core/backend/clear.php index 0e64849fb..39e8a06db 100644 --- a/web/yaamp/core/backend/clear.php +++ b/web/yaamp/core/backend/clear.php @@ -2,54 +2,50 @@ function BackendClearEarnings($coinid = NULL) { -// debuglog(__FUNCTION__); - - if (YAAMP_ALLOW_EXCHANGE) - $delay = time() - (int) YAAMP_PAYMENTS_FREQ; - else - $delay = time() - (YAAMP_PAYMENTS_FREQ / 2); - $total_cleared = 0.0; - - $sqlFilter = $coinid ? " AND coinid=".intval($coinid) : ''; - - $list = getdbolist('db_earnings', "status=1 AND mature_time<$delay $sqlFilter"); - foreach($list as $earning) - { - $user = getdbo('db_accounts', $earning->userid); - if(!$user) - { - $earning->delete(); - continue; - } - - $coin = getdbo('db_coins', $earning->coinid); - if(!$coin) - { - $earning->delete(); - continue; - } - - $earning->status = 2; // cleared - $earning->price = $coin->price; - $earning->save(); - -// $refcoin = getdbo('db_coins', $user->coinid); -// if($refcoin && $refcoin->price<=0) continue; -// $value = $earning->amount * $coin->price / ($refcoin? $refcoin->price: 1); - - $value = yaamp_convert_amount_user($coin, $earning->amount, $user); - - if($user->coinid == 6 && !YAAMP_ALLOW_EXCHANGE) - continue; - - $user->balance += $value; - $user->save(); - - if($user->coinid == 6) - $total_cleared += $value; - } - - if($total_cleared>0) - debuglog("total cleared from mining $total_cleared BTC"); -} + // debuglog(__FUNCTION__); + + if (YAAMP_ALLOW_EXCHANGE) + $delay = time() - (int) YAAMP_PAYMENTS_FREQ; + else + $delay = time() - (YAAMP_PAYMENTS_FREQ / 2); + $total_cleared = 0.0; + + $sqlFilter = $coinid ? " AND coinid=" . intval($coinid) : ''; + + $list = getdbolist('db_earnings', "status=1 AND mature_time<$delay $sqlFilter"); + foreach ($list as $earning) { + $user = getdbo('db_accounts', $earning->userid); + if (!$user) { + $earning->delete(); + continue; + } + + $coin = getdbo('db_coins', $earning->coinid); + if (!$coin) { + $earning->delete(); + continue; + } + + $earning->status = 2; // cleared + $earning->price = $coin->price; + $earning->save(); + // $refcoin = getdbo('db_coins', $user->coinid); + // if($refcoin && $refcoin->price<=0) continue; + // $value = $earning->amount * $coin->price / ($refcoin? $refcoin->price: 1); + + $value = yaamp_convert_amount_user($coin, $earning->amount, $user); + + if ($user->coinid == 6 && !YAAMP_ALLOW_EXCHANGE) + continue; + + $user->balance += $value; + $user->save(); + + if ($user->coinid == 6) + $total_cleared += $value; + } + + if ($total_cleared > 0) + debuglog("total cleared from mining $total_cleared BTC"); +} diff --git a/web/yaamp/core/backend/coins.php b/web/yaamp/core/backend/coins.php index 6b34f7c7e..8a3e4be16 100644 --- a/web/yaamp/core/backend/coins.php +++ b/web/yaamp/core/backend/coins.php @@ -2,326 +2,305 @@ function percent_feedback($v, $n, $p) { - return ($v*(100-$p) + $n*$p) / 100; + return ($v * (100 - $p) + $n * $p) / 100; } function string_to_hashrate($s) { - $value = floatval(trim(preg_replace('/,/', '', $s))); + $value = floatval(trim(preg_replace('/,/', '', $s))); - if(stripos($s, 'kh/s')) $value *= 1000; - if(stripos($s, 'mh/s')) $value *= 1000000; - if(stripos($s, 'gh/s')) $value *= 1000000000; + if (stripos($s, 'kh/s')) + $value *= 1000; + if (stripos($s, 'mh/s')) + $value *= 1000000; + if (stripos($s, 'gh/s')) + $value *= 1000000000; - return $value; + return $value; } ///////////////////////////////////////////////////////////////////////////////////////////// function BackendCoinsUpdate() { - $debug = false; - -// debuglog(__FUNCTION__); - $t1 = microtime(true); - - $pool_rate = array(); - foreach(yaamp_get_algos() as $algo) - $pool_rate[$algo] = yaamp_pool_rate($algo); - - $coins = getdbolist('db_coins', "installed"); - foreach($coins as $coin) - { -// debuglog("doing $coin->name"); - - $remote = new WalletRPC($coin); - - $info = $remote->getinfo(); - if(!$info && $coin->enable) - { - debuglog("{$coin->symbol} no getinfo answer, retrying..."); - sleep(3); - $info = $remote->getinfo(); - if (!$info) { - debuglog("{$coin->symbol} disabled, no answer after 2 attempts. {$remote->error}"); - $coin->enable = false; - $coin->connections = 0; - $coin->save(); - continue; - } - } - - // auto-enable if auto_ready is set - if($coin->auto_ready && !empty($info)) - $coin->enable = true; - else if (empty($info)) - continue; - - if ($debug) echo "{$coin->symbol}\n"; - - if(isset($info['difficulty'])) - $difficulty = $info['difficulty']; - else - $difficulty = $remote->getdifficulty(); - - if(is_array($difficulty)) { - $coin->difficulty = arraySafeVal($difficulty,'proof-of-work'); - $coin->difficulty_pos = arraySafeVal($difficulty,'proof-of-stake'); - } - else - $coin->difficulty = $difficulty; - - if($coin->algo == 'quark') - $coin->difficulty /= 0x100; - - if($coin->difficulty == 0) - $coin->difficulty = 1; - - $coin->errors = isset($info['errors'])? $info['errors']: ''; - $coin->txfee = isset($info['paytxfee'])? $info['paytxfee']: ''; - $coin->connections = isset($info['connections'])? $info['connections']: ''; - $coin->multialgos = (int) isset($info['pow_algo_id']); - $coin->balance = isset($info['balance'])? $info['balance']: 0; - $coin->stake = isset($info['stake'])? $info['stake'] : $coin->stake; - $coin->mint = dboscalar("select sum(amount) from blocks where coin_id=$coin->id and category='immature'"); - - if(empty($coin->master_wallet)) - { - if ($coin->rpcencoding == 'DCR' && empty($coin->account)) $coin->account = 'default'; - $coin->master_wallet = $remote->getaccountaddress($coin->account); - } - - if(empty($coin->rpcencoding)) - { - $difficulty = $remote->getdifficulty(); - if(is_array($difficulty)) - $coin->rpcencoding = 'POS'; - else if ($coin->symbol == 'DCR') - $coin->rpcencoding = 'DCR'; - else if ($coin->symbol == 'ETH') - $coin->rpcencoding = 'GETH'; - else if ($coin->symbol == 'NIRO') - $coin->rpcencoding = 'NIRO'; - else - $coin->rpcencoding = 'POW'; - } - - if($coin->hassubmitblock == NULL) - { - $remote->submitblock(''); - if(strcasecmp($remote->error, 'method not found') == 0) - $coin->hassubmitblock = false; - else - $coin->hassubmitblock = true; - } - - if($coin->auxpow == NULL) - { - $ret = $remote->getauxblock(); - - if(strcasecmp($remote->error, 'method not found') == 0) - $coin->auxpow = false; - else - $coin->auxpow = true; - } - - // Change for segwit - if($coin->usesegwit){ - $template = $remote->getblocktemplate('{"rules":["segwit"]}'); - }else{ - $template = $remote->getblocktemplate('{}'); - } - // Change for segwit end - - if($template && isset($template['coinbasevalue'])) - { - $coin->reward = $template['coinbasevalue']/100000000*$coin->reward_mul; - - if($coin->symbol == 'TAC' && isset($template['_V2'])) - $coin->charity_amount = $template['_V2']/100000000; - - if(isset($template['payee_amount']) && $coin->symbol != 'LIMX') { - $coin->charity_amount = doubleval($template['payee_amount'])/100000000; - $coin->reward -= $coin->charity_amount; - } - - else if(isset($template['masternode']) && arraySafeVal($template,'masternode_payments_enforced')) { - if (arraySafeVal($template,'masternode_payments_started')) - $coin->reward -= arraySafeVal($template['masternode'],'amount',0)/100000000; - $coin->hasmasternodes = true; - } - - else if($coin->symbol == 'XZC') { - // coinbasevalue here is the amount available for miners, not the full block amount - $coin->reward = arraySafeVal($template,'coinbasevalue')/100000000 * $coin->reward_mul; - $coin->charity_amount = $coin->reward * $coin->charity_percent / 100; - } - - else if($coin->symbol == 'BNODE') - { - if(isset($template['masternode'])) - { - if (arraySafeVal($template,'masternode_payments_started')) - $coin->reward -= arraySafeVal($template['masternode'],'amount',0)/100000000; - } - if(isset($template['evolution'])) - { - $coin->reward -= arraySafeVal($template['evolution'],'amount',10000000)/100000000; - } - } - - else if(!empty($coin->charity_address)) { - if(!$coin->charity_amount) - $coin->reward -= $coin->reward * $coin->charity_percent / 100; - } - - if(isset($template['bits'])) - { - $target = decode_compact($template['bits']); - $coin->difficulty = target_to_diff($target); - } - } - - else if ($coin->rpcencoding == 'GETH' || $coin->rpcencoding == 'NIRO') - { - $coin->auto_ready = ($coin->connections > 0); - } - - else if(strcasecmp($remote->error, 'method not found') == 0) - { - $template = $remote->getmemorypool(); - if($template && isset($template['coinbasevalue'])) - { - $coin->usememorypool = true; - $coin->reward = $template['coinbasevalue']/100000000*$coin->reward_mul; - - if(isset($template['bits'])) - { - $target = decode_compact($template['bits']); - $coin->difficulty = target_to_diff($target); - } - } else { - $coin->auto_ready = false; - $coin->errors = $remote->error; - } - } - - else if ($coin->symbol == 'ZEC' || $coin->rpcencoding == 'ZEC') - { - if($template && isset($template['coinbasetxn'])) - { - // no coinbasevalue in ZEC blocktemplate :/ - $txn = $template['coinbasetxn']; - $coin->charity_amount = arraySafeVal($txn,'foundersreward',0)/100000000; - $coin->reward = $coin->charity_amount * 4 + arraySafeVal($txn,'fee',0)/100000000; - // getmininginfo show current diff, getinfo the last block one - $mininginfo = $remote->getmininginfo(); - $coin->difficulty = ArraySafeVal($mininginfo,'difficulty',$coin->difficulty); - //$target = decode_compact($template['bits']); - //$diff = target_to_diff($target); // seems not standard 0.358557563 vs 187989.937 in getmininginfo - //target 00000002c0930000000000000000000000000000000000000000000000000000 => 0.358557563 (bits 1d02c093) - //$diff = hash_to_difficulty($coin, $template['target']); - //debuglog("ZEC target {$template['bits']} -> $diff"); - } else { - $coin->auto_ready = false; - $coin->errors = $remote->error; - } - } - - else if ($coin->rpcencoding == 'DCR') - { - $wi = $remote->walletinfo(); - $coin->auto_ready = ($coin->connections > 0 && arraySafeVal($wi,"daemonconnected")); - if ($coin->auto_ready && arraySafeVal($wi,"unlocked",false) == false) { - debuglog($coin->symbol." wallet is not unlocked!"); - } - } - - else - { - $coin->auto_ready = false; - $coin->errors = $remote->error; - } - - if(strcasecmp($coin->errors, 'No more PoW blocks') == 0) - { - $coin->dontsell = true; - $coin->auto_ready = false; - } -// } - - if($coin->block_height != $info['blocks']) - { - $count = $info['blocks'] - $coin->block_height; - $ttf = $count > 0 ? (time() - $coin->last_network_found) / $count : 0; - - if(empty($coin->actual_ttf)) $coin->actual_ttf = $ttf; - - $coin->actual_ttf = percent_feedback($coin->actual_ttf, $ttf, 5); - $coin->last_network_found = time(); - } - - $coin->version = substr($info['version'], 0, 32); - $coin->block_height = $info['blocks']; - - if($coin->powend_height > 0 && $coin->block_height > $coin->powend_height) { - if ($coin->auto_ready) { - $coin->auto_ready = false; - $coin->errors = 'PoW end reached'; - } - } - - $coin->save(); - - if ($coin->available < 0 || $coin->cleared > $coin->balance) { - // can happen after a payout (waiting first confirmation) - BackendUpdatePoolBalances($coin->id); - } - // debuglog(" end $coin->name"); - - } - - $coins = getdbolist('db_coins', "enable order by auxpow desc"); - foreach($coins as $coin) - { - $coin = getdbo('db_coins', $coin->id); - if(!$coin) continue; - - if($coin->difficulty) - { - $coin->index_avg = $coin->reward * $coin->price * 10000 / $coin->difficulty; - if(!$coin->auxpow && $coin->rpcencoding == 'POW') - { - $indexaux = dboscalar("SELECT SUM(index_avg) FROM coins WHERE enable AND visible AND auto_ready AND auxpow AND algo='{$coin->algo}'"); - $coin->index_avg += $indexaux; - } - } - - if($coin->network_hash) { - $coin->network_ttf = intval($coin->difficulty * 0x100000000 / $coin->network_hash); - if($coin->network_ttf > 2147483647) $coin->network_ttf = 2147483647; - } - - if(isset($pool_rate[$coin->algo])) - $coin->pool_ttf = intval($coin->difficulty * 0x100000000 / $pool_rate[$coin->algo]); - if($coin->pool_ttf > 2147483647) $coin->pool_ttf = 2147483647; - - if(strstr($coin->image, 'http')) - { - $data = file_get_contents($coin->image); - $coin->image = "/images/coin-$coin->id.png"; - - @unlink(YAAMP_HTDOCS.$coin->image); - file_put_contents(YAAMP_HTDOCS.$coin->image, $data); - } - - $coin->save(); - } - - $d1 = microtime(true) - $t1; - controller()->memcache->add_monitoring_function(__METHOD__, $d1); + $debug = false; + + // debuglog(__FUNCTION__); + $t1 = microtime(true); + + $pool_rate = array(); + foreach (yaamp_get_algos() as $algo) + $pool_rate[$algo] = yaamp_pool_rate($algo); + + $coins = getdbolist('db_coins', "installed"); + foreach ($coins as $coin) { + // debuglog("doing $coin->name"); + + $remote = new WalletRPC($coin); + + $info = $remote->getinfo(); + if (!$info && $coin->enable) { + debuglog("{$coin->symbol} no getinfo answer, retrying..."); + sleep(3); + $info = $remote->getinfo(); + if (!$info) { + debuglog("{$coin->symbol} disabled, no answer after 2 attempts. {$remote->error}"); + $coin->enable = false; + $coin->connections = 0; + $coin->save(); + continue; + } + } + + // auto-enable if auto_ready is set + if ($coin->auto_ready && !empty($info)) + $coin->enable = true; + else if (empty($info)) + continue; + + if ($debug) + echo "{$coin->symbol}\n"; + + if (isset($info['difficulty'])) + $difficulty = $info['difficulty']; + else + $difficulty = $remote->getdifficulty(); + + if (is_array($difficulty)) { + $coin->difficulty = arraySafeVal($difficulty, 'proof-of-work'); + $coin->difficulty_pos = arraySafeVal($difficulty, 'proof-of-stake'); + } else + $coin->difficulty = $difficulty; + + if ($coin->algo == 'quark') + $coin->difficulty /= 0x100; + + if ($coin->difficulty == 0) + $coin->difficulty = 1; + + $coin->errors = isset($info['errors']) ? $info['errors'] : ''; + $coin->txfee = isset($info['paytxfee']) ? $info['paytxfee'] : ''; + $coin->connections = isset($info['connections']) ? $info['connections'] : ''; + $coin->multialgos = (int) isset($info['pow_algo_id']); + $coin->balance = isset($info['balance']) ? $info['balance'] : 0; + $coin->stake = isset($info['stake']) ? $info['stake'] : $coin->stake; + $coin->mint = dboscalar("select sum(amount) from blocks where coin_id=$coin->id and category='immature'"); + + if (empty($coin->master_wallet)) { + if ($coin->rpcencoding == 'DCR' && empty($coin->account)) + $coin->account = 'default'; + $coin->master_wallet = $remote->getaccountaddress($coin->account); + } + + if (empty($coin->rpcencoding)) { + $difficulty = $remote->getdifficulty(); + if (is_array($difficulty)) + $coin->rpcencoding = 'POS'; + else if ($coin->symbol == 'DCR') + $coin->rpcencoding = 'DCR'; + else if ($coin->symbol == 'ETH') + $coin->rpcencoding = 'GETH'; + else if ($coin->symbol == 'NIRO') + $coin->rpcencoding = 'NIRO'; + else + $coin->rpcencoding = 'POW'; + } + + if ($coin->hassubmitblock == NULL) { + $remote->submitblock(''); + if (strcasecmp($remote->error, 'method not found') == 0) + $coin->hassubmitblock = false; + else + $coin->hassubmitblock = true; + } + + if ($coin->auxpow == NULL) { + $ret = $remote->getauxblock(); + + if (strcasecmp($remote->error, 'method not found') == 0) + $coin->auxpow = false; + else + $coin->auxpow = true; + } + + // Change for segwit + if ($coin->usesegwit) { + $template = $remote->getblocktemplate('{"rules":["segwit"]}'); + } else { + $template = $remote->getblocktemplate('{}'); + } + // Change for segwit end + + if ($template && isset($template['coinbasevalue'])) { + $coin->reward = $template['coinbasevalue'] / 100000000 * $coin->reward_mul; + + if ($coin->symbol == 'TAC' && isset($template['_V2'])) + $coin->charity_amount = $template['_V2'] / 100000000; + + if (isset($template['payee_amount']) && $coin->symbol != 'LIMX') { + $coin->charity_amount = doubleval($template['payee_amount']) / 100000000; + $coin->reward -= $coin->charity_amount; + } + + else if (isset($template['masternode']) && arraySafeVal($template, 'masternode_payments_enforced')) { + if (arraySafeVal($template, 'masternode_payments_started')) + $coin->reward -= arraySafeVal($template['masternode'], 'amount', 0) / 100000000; + $coin->hasmasternodes = true; + } + + else if ($coin->symbol == 'XZC') { + // coinbasevalue here is the amount available for miners, not the full block amount + $coin->reward = arraySafeVal($template, 'coinbasevalue') / 100000000 * $coin->reward_mul; + $coin->charity_amount = $coin->reward * $coin->charity_percent / 100; + } + + else if ($coin->symbol == 'BNODE') { + if (isset($template['masternode'])) { + if (arraySafeVal($template, 'masternode_payments_started')) + $coin->reward -= arraySafeVal($template['masternode'], 'amount', 0) / 100000000; + } + if (isset($template['evolution'])) { + $coin->reward -= arraySafeVal($template['evolution'], 'amount', 10000000) / 100000000; + } + } + + else if (!empty($coin->charity_address)) { + if (!$coin->charity_amount) + $coin->reward -= $coin->reward * $coin->charity_percent / 100; + } + + if (isset($template['bits'])) { + $target = decode_compact($template['bits']); + $coin->difficulty = target_to_diff($target); + } + } + + else if ($coin->rpcencoding == 'GETH' || $coin->rpcencoding == 'NIRO') { + $coin->auto_ready = ($coin->connections > 0); + } + + else if (strcasecmp($remote->error, 'method not found') == 0) { + $template = $remote->getmemorypool(); + if ($template && isset($template['coinbasevalue'])) { + $coin->usememorypool = true; + $coin->reward = $template['coinbasevalue'] / 100000000 * $coin->reward_mul; + + if (isset($template['bits'])) { + $target = decode_compact($template['bits']); + $coin->difficulty = target_to_diff($target); + } + } else { + $coin->auto_ready = false; + $coin->errors = $remote->error; + } + } + + else if ($coin->symbol == 'ZEC' || $coin->rpcencoding == 'ZEC') { + if ($template && isset($template['coinbasetxn'])) { + // no coinbasevalue in ZEC blocktemplate :/ + $txn = $template['coinbasetxn']; + $coin->charity_amount = arraySafeVal($txn, 'foundersreward', 0) / 100000000; + $coin->reward = $coin->charity_amount * 4 + arraySafeVal($txn, 'fee', 0) / 100000000; + // getmininginfo show current diff, getinfo the last block one + $mininginfo = $remote->getmininginfo(); + $coin->difficulty = ArraySafeVal($mininginfo, 'difficulty', $coin->difficulty); + //$target = decode_compact($template['bits']); + //$diff = target_to_diff($target); // seems not standard 0.358557563 vs 187989.937 in getmininginfo + //target 00000002c0930000000000000000000000000000000000000000000000000000 => 0.358557563 (bits 1d02c093) + //$diff = hash_to_difficulty($coin, $template['target']); + //debuglog("ZEC target {$template['bits']} -> $diff"); + } else { + $coin->auto_ready = false; + $coin->errors = $remote->error; + } + } + + else if ($coin->rpcencoding == 'DCR') { + $wi = $remote->walletinfo(); + $coin->auto_ready = ($coin->connections > 0 && arraySafeVal($wi, "daemonconnected")); + if ($coin->auto_ready && arraySafeVal($wi, "unlocked", false) == false) { + debuglog($coin->symbol . " wallet is not unlocked!"); + } + } + + else { + $coin->auto_ready = false; + $coin->errors = $remote->error; + } + + if (strcasecmp($coin->errors, 'No more PoW blocks') == 0) { + $coin->dontsell = true; + $coin->auto_ready = false; + } + // } + + if ($coin->block_height != $info['blocks']) { + $count = $info['blocks'] - $coin->block_height; + $ttf = $count > 0 ? (time() - $coin->last_network_found) / $count : 0; + + if (empty($coin->actual_ttf)) + $coin->actual_ttf = $ttf; + + $coin->actual_ttf = percent_feedback($coin->actual_ttf, $ttf, 5); + $coin->last_network_found = time(); + } + + $coin->version = substr($info['version'], 0, 32); + $coin->block_height = $info['blocks']; + + if ($coin->powend_height > 0 && $coin->block_height > $coin->powend_height) { + if ($coin->auto_ready) { + $coin->auto_ready = false; + $coin->errors = 'PoW end reached'; + } + } + + $coin->save(); + + if ($coin->available < 0 || $coin->cleared > $coin->balance) { + // can happen after a payout (waiting first confirmation) + BackendUpdatePoolBalances($coin->id); + } + // debuglog(" end $coin->name"); + + } + + $coins = getdbolist('db_coins', "enable order by auxpow desc"); + foreach ($coins as $coin) { + $coin = getdbo('db_coins', $coin->id); + if (!$coin) + continue; + + if ($coin->difficulty) { + $coin->index_avg = $coin->reward * $coin->price * 10000 / $coin->difficulty; + if (!$coin->auxpow && $coin->rpcencoding == 'POW') { + $indexaux = dboscalar("SELECT SUM(index_avg) FROM coins WHERE enable AND visible AND auto_ready AND auxpow AND algo='{$coin->algo}'"); + $coin->index_avg += $indexaux; + } + } + + if ($coin->network_hash) { + $coin->network_ttf = intval($coin->difficulty * 0x100000000 / $coin->network_hash); + if ($coin->network_ttf > 2147483647) + $coin->network_ttf = 2147483647; + } + + if (isset($pool_rate[$coin->algo])) + $coin->pool_ttf = intval($coin->difficulty * 0x100000000 / $pool_rate[$coin->algo]); + if ($coin->pool_ttf > 2147483647) + $coin->pool_ttf = 2147483647; + + if (strstr($coin->image, 'http')) { + $data = file_get_contents($coin->image); + $coin->image = "/images/coin-$coin->id.png"; + + @unlink(YAAMP_HTDOCS . $coin->image); + file_put_contents(YAAMP_HTDOCS . $coin->image, $data); + } + + $coin->save(); + } + + $d1 = microtime(true) - $t1; + controller()->memcache->add_monitoring_function(__METHOD__, $d1); } - - - - diff --git a/web/yaamp/core/backend/markets.php b/web/yaamp/core/backend/markets.php index 0370d2c53..3a0ba856b 100644 --- a/web/yaamp/core/backend/markets.php +++ b/web/yaamp/core/backend/markets.php @@ -1,1922 +1,2114 @@ symbol2'"); - if(!$coin) continue; - - $list = getdbolist('db_markets', "coinid=$coin->id"); - foreach($list as $market) - { - $market2 = getdbosql('db_markets', "coinid=$coin2->id and name='$market->name'"); - if(!$market2) continue; - - $market2->price = $market->price; - $market2->price2 = $market->price2; - $market2->deposit_address = $market->deposit_address; - $market2->pricetime = $market->pricetime; - - $market2->save(); - } - } - - $coins = getdbolist('db_coins', "installed and id in (select distinct coinid from markets)"); - foreach($coins as $coin) - { - if($coin->symbol=='BTC') { - $coin->price = 1; - $coin->price2 = 1; - $coin->save(); - continue; - } - - $market = getBestMarket($coin); - if($market) - { - $coin->price = $market->price*(1-YAAMP_FEES_EXCHANGE/100); - $coin->price2 = $market->price2; - - $base_coin = !empty($market->base_coin)? getdbosql('db_coins', "symbol='{$market->base_coin}'"): null; - if($base_coin) - { - $coin->price *= $base_coin->price; - $coin->price2 *= $base_coin->price; - } - } - else { - $coin->price = 0; - $coin->price2 = 0; - } - - $coin->save(); - dborun("UPDATE earnings SET price={$coin->price} WHERE status!=2 AND coinid={$coin->id}"); - dborun("UPDATE markets SET message=NULL WHERE disabled=0 AND message='disabled from settings'"); - } + // debuglog(__FUNCTION__); + market_set_default('c-cex', 'DCR', 'disabled', true); // no deposit + market_set_default('yobit', 'DCR', 'disabled', true); // no withdraw + settings_prefetch_all(); + + updateBittrexMarkets(); + updateBitzMarkets(); + updatePoloniexMarkets(); + updateBleutradeMarkets(); + updateCryptoBridgeMarkets(); + updateEscoDexMarkets(); + updateGateioMarkets(); + updateGraviexMarkets(); + updateKrakenMarkets(); + updateKuCoinMarkets(); + updateCCexMarkets(); + updateCoinbeneMarkets(); + updateCrex24Markets(); + updateCryptopiaMarkets(); + updateHitBTCMarkets(); + updateYobitMarkets(); + updateAlcurexMarkets(); + updateBinanceMarkets(); + //updateEmpoexMarkets(); + updateJubiMarkets(); + updateLiveCoinMarkets(); + updateNovaMarkets(); + updateCoinExchangeMarkets(); + updateCoinsMarketsMarkets(); + updateStocksExchangeMarkets(); + updateTradeSatoshiMarkets(); + + updateShapeShiftMarkets(); + updateOtherMarkets(); + + $list2 = getdbolist('db_coins', "installed AND IFNULL(symbol2,'') != ''"); + foreach ($list2 as $coin2) + { + $coin = getdbosql('db_coins', "symbol='$coin2->symbol2'"); + if (!$coin) continue; + + $list = getdbolist('db_markets', "coinid=$coin->id"); + foreach ($list as $market) + { + $market2 = getdbosql('db_markets', "coinid=$coin2->id and name='$market->name'"); + if (!$market2) continue; + + $market2->price = $market->price; + $market2->price2 = $market->price2; + $market2->deposit_address = $market->deposit_address; + $market2->pricetime = $market->pricetime; + + $market2->save(); + } + } + + $coins = getdbolist('db_coins', "installed and id in (select distinct coinid from markets)"); + foreach ($coins as $coin) + { + if ($coin->symbol == 'BTC') + { + $coin->price = 1; + $coin->price2 = 1; + $coin->save(); + continue; + } + + $market = getBestMarket($coin); + if ($market) + { + $coin->price = $market->price * (1 - YAAMP_FEES_EXCHANGE / 100); + $coin->price2 = $market->price2; + + $base_coin = !empty($market->base_coin) ? getdbosql('db_coins', "symbol='{$market->base_coin}'") : null; + if ($base_coin) + { + $coin->price *= $base_coin->price; + $coin->price2 *= $base_coin->price; + } + } + else + { + $coin->price = 0; + $coin->price2 = 0; + } + + $coin->save(); + dborun("UPDATE earnings SET price={$coin->price} WHERE status!=2 AND coinid={$coin->id}"); + dborun("UPDATE markets SET message=NULL WHERE disabled=0 AND message='disabled from settings'"); + } } -function BackendWatchMarkets($marketname=NULL) +function BackendWatchMarkets($marketname = NULL) { - // temporary to fill new coin 'watch' field - if (defined('YIIMP_WATCH_CURRENCIES')) { - $watched = explode(',', YIIMP_WATCH_CURRENCIES); - foreach ($watched as $symbol) { - dborun("UPDATE coins SET watch=1 WHERE symbol=:sym", array(':sym'=>$symbol)); - } - } - - $coins = new db_coins; - $coins = $coins->findAllByAttributes(array('watch'=>1)); - foreach ($coins as $coin) - { - // track btc/usd for history analysis - if ($coin->symbol == 'BTC') { - if ($marketname) continue; - $mh = new db_market_history; - $mh->time = time(); - $mh->idcoin = $coin->id; - $mh->idmarket = NULL; - $mh->price = dboscalar("SELECT usdbtc FROM mining LIMIT 1"); - if (YIIMP_FIAT_ALTERNATIVE == 'EUR') - $mh->price2 = kraken_btceur(); - $mh->balance = dboscalar("SELECT SUM(balance) AS btc FROM balances"); - $mh->save(); - continue; - } else if ($coin->installed) { - // "yiimp" prices and balance history - $mh = new db_market_history; - $mh->time = time(); - $mh->idcoin = $coin->id; - $mh->idmarket = NULL; - $mh->price = $coin->price; - $mh->price2 = $coin->price2; - $mh->balance = $coin->balance; - $mh->save(); - } - - if ($coin->rpcencoding == 'DCR') { - // hack to store the locked balance history as a "stake" market - $remote = new WalletRPC($coin); - $stake = 0.; //(double) $remote->getbalance('*',0,'locked'); - $balances = $remote->getbalance('*',0); - if (isset($balances["balances"])) { - foreach ($balances["balances"] as $accb) { - $stake += (double) arraySafeVal($accb, 'lockedbytickets', 0); - } - } - $info = $remote->getstakeinfo(); - if (empty($remote->error) && isset($info['difficulty'])) - dborun("UPDATE markets SET balance=0, ontrade=:stake, balancetime=:time, + // temporary to fill new coin 'watch' field + if (defined('YIIMP_WATCH_CURRENCIES')) + { + $watched = explode(',', YIIMP_WATCH_CURRENCIES); + foreach ($watched as $symbol) + { + dborun("UPDATE coins SET watch=1 WHERE symbol=:sym", array( + ':sym' => $symbol + )); + } + } + + $coins = new db_coins; + $coins = $coins->findAllByAttributes(array( + 'watch' => 1 + )); + foreach ($coins as $coin) + { + // track btc/usd for history analysis + if ($coin->symbol == 'BTC') + { + if ($marketname) continue; + $mh = new db_market_history; + $mh->time = time(); + $mh->idcoin = $coin->id; + $mh->idmarket = NULL; + $mh->price = dboscalar("SELECT usdbtc FROM mining LIMIT 1"); + if (YIIMP_FIAT_ALTERNATIVE == 'EUR') $mh->price2 = kraken_btceur(); + $mh->balance = dboscalar("SELECT SUM(balance) AS btc FROM balances"); + $mh->save(); + continue; + } + else if ($coin->installed) + { + // "yiimp" prices and balance history + $mh = new db_market_history; + $mh->time = time(); + $mh->idcoin = $coin->id; + $mh->idmarket = NULL; + $mh->price = $coin->price; + $mh->price2 = $coin->price2; + $mh->balance = $coin->balance; + $mh->save(); + } + + if ($coin->rpcencoding == 'DCR') + { + // hack to store the locked balance history as a "stake" market + $remote = new WalletRPC($coin); + $stake = 0.; //(double) $remote->getbalance('*',0,'locked'); + $balances = $remote->getbalance('*', 0); + if (isset($balances["balances"])) + { + foreach ($balances["balances"] as $accb) + { + $stake += (double)arraySafeVal($accb, 'lockedbytickets', 0); + } + } + $info = $remote->getstakeinfo(); + if (empty($remote->error) && isset($info['difficulty'])) dborun("UPDATE markets SET balance=0, ontrade=:stake, balancetime=:time, price=:ticketprice, price2=:live, pricetime=NULL WHERE coinid=:id AND name='stake'", array( - ':ticketprice'=>$info['difficulty'], ':live'=>$info['live'], ':stake'=>$stake, - ':id'=>$coin->id, ':time'=>time() - )); - } - - // user watched currencies - $markets = getdbolist('db_markets', "coinid={$coin->id} AND NOT disabled"); - foreach($markets as $market) { - if ($marketname && $market->name != $marketname) continue; - if (!empty($market->base_coin)) continue; // todo ? - if (empty($market->price)) continue; - $mh = new db_market_history; - $mh->time = time(); // max(intval($market->balancetime), intval($market->pricetime)); - $mh->idcoin = $coin->id; - $mh->idmarket = $market->id; - $mh->price = $market->price; - $mh->price2 = $market->price2; - $mh->balance = (double) ($market->balance) + (double) ($market->ontrade); - $mh->save(); - } - } + ':ticketprice' => $info['difficulty'], + ':live' => $info['live'], + ':stake' => $stake, + ':id' => $coin->id, + ':time' => time() + )); + } + + // user watched currencies + $markets = getdbolist('db_markets', "coinid={$coin->id} AND NOT disabled"); + foreach ($markets as $market) + { + if ($marketname && $market->name != $marketname) continue; + if (!empty($market->base_coin)) continue; // todo ? + if (empty($market->price)) continue; + $mh = new db_market_history; + $mh->time = time(); // max(intval($market->balancetime), intval($market->pricetime)); + $mh->idcoin = $coin->id; + $mh->idmarket = $market->id; + $mh->price = $market->price; + $mh->price2 = $market->price2; + $mh->balance = (double)($market->balance) + (double)($market->ontrade); + $mh->save(); + } + } } function getBestMarket($coin) { - $market = NULL; - if ($coin->symbol == 'BTC') - return NULL; - - if (!empty($coin->symbol2)) { - $alt = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$coin->symbol2)); - if ($alt && $alt->symbol2 != $coin->symbol2) - return getBestMarket($alt); - } - - if (!empty($coin->market)) { - // get coin market first (if set) - if ($coin->market != 'BEST' && $coin->market != 'unknown') - $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND - NOT disabled AND IFNULL(deposit_address,'') != '' AND name=:name", - array(':name'=>$coin->market)); - else - // else take one of the big exchanges... - $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND + $market = NULL; + if ($coin->symbol == 'BTC') return NULL; + + if (!empty($coin->symbol2)) + { + $alt = getdbosql('db_coins', "symbol=:symbol", array( + ':symbol' => $coin->symbol2 + )); + if ($alt && $alt->symbol2 != $coin->symbol2) return getBestMarket($alt); + } + + if (!empty($coin->market)) + { + // get coin market first (if set) + if ($coin->market != 'BEST' && $coin->market != 'unknown') $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND + NOT disabled AND IFNULL(deposit_address,'') != '' AND name=:name", array( + ':name' => $coin->market + )); + else + // else take one of the big exchanges... + $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND NOT disabled AND IFNULL(deposit_address,'') != '' AND name IN ('poloniex','bittrex') ORDER BY priority DESC, price DESC"); - } + } - if(!$market) { - $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND + if (!$market) + { + $market = getdbosql('db_markets', "coinid={$coin->id} AND price!=0 AND NOT deleted AND NOT disabled AND IFNULL(deposit_address,'') != '' ORDER BY priority DESC, price DESC"); - } + } - if (!$market && empty($coin->market)) { - debuglog("best market for {$coin->symbol} is unknown"); - $coin->market = 'unknown'; - $coin->save(); - } + if (!$market && empty($coin->market)) + { + debuglog("best market for {$coin->symbol} is unknown"); + $coin->market = 'unknown'; + $coin->save(); + } - return $market; + return $market; } function AverageIncrement($value1, $value2) { - $percent = 80; - $value = ($value1*(100-$percent) + $value2*$percent) / 100; + $percent = 80; + $value = ($value1 * (100 - $percent) + $value2 * $percent) / 100; - return $value; + return $value; } /////////////////////////////////////////////////////////////////////////////////////////////////// - function updateBleutradeMarkets() { - $exchange = 'bleutrade'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = bleutrade_api_query('public/getcurrencies'); - if(!is_object($list)) return; - - foreach($list->result as $currency) - { - // debuglog($currency); - if($currency->Currency == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol='{$currency->Currency}'"); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} and name='$exchange'"); - if(!$market) continue; - - $market->txfee = $currency->TxFee; - if($market->disabled < 9) $market->disabled = !$currency->IsActive; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $market->save(); - - if($market->disabled) continue; - - sleep(1); - $pair = "{$symbol}_BTC"; - $ticker = bleutrade_api_query('public/getticker', '&market='.$pair); - if(!$ticker || !$ticker->success || !$ticker->result) continue; - - $price2 = ($ticker->result[0]->Bid+$ticker->result[0]->Ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->result[0]->Bid); - $market->pricetime = time(); - - if(!empty(EXCH_BLEUTRADE_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if(empty($market->deposit_address) && !$last_checked) - { - sleep(1); - $address = bleutrade_api_query('account/getdepositaddress', '¤cy='.$symbol); - if(is_object($address) && is_object($address->result)) { - $addr = $address->result->Address; - if (!empty($addr) && $addr != $market->deposit_address) { - $market->deposit_address = $addr; - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - } - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - - $market->save(); - -// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); - } + $exchange = 'bleutrade'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = bleutrade_api_query('public/getcurrencies'); + if (!is_object($list)) return; + + foreach ($list->result as $currency) + { + // debuglog($currency); + if ($currency->Currency == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol='{$currency->Currency}'"); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} and name='$exchange'"); + if (!$market) continue; + + $market->txfee = $currency->TxFee; + if ($market->disabled < 9) $market->disabled = !$currency->IsActive; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $market->save(); + + if ($market->disabled) continue; + + sleep(1); + $pair = "{$symbol}_BTC"; + $ticker = bleutrade_api_query('public/getticker', '&market=' . $pair); + if (!$ticker || !$ticker->success || !$ticker->result) continue; + + $price2 = ($ticker->result[0]->Bid + $ticker->result[0] + ->Ask) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->result[0] + ->Bid); + $market->pricetime = time(); + + if (!empty(EXCH_BLEUTRADE_KEY)) + { + $last_checked = cache()->get($exchange . '-deposit_address-check-' . $symbol); + if (empty($market->deposit_address) && !$last_checked) + { + sleep(1); + $address = bleutrade_api_query('account/getdepositaddress', '¤cy=' . $symbol); + if (is_object($address) && is_object($address->result)) + { + $addr = $address + ->result->Address; + if (!empty($addr) && $addr != $market->deposit_address) + { + $market->deposit_address = $addr; + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + } + } + } + cache() + ->set($exchange . '-deposit_address-check-' . $symbol, time() , 24 * 3600); + } + + $market->save(); + + // debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); + + } } - ///////////////////////////////////////////////////////////////////////////////////////////// - +///////////////////////////////////////////////////////////////////////////////////////////// function updateBitzMarkets($force = false) { - $exchange = 'bitz'; - if (exchange_get($exchange, 'disabled')) return; - - $markets = bitz_api_query('tickerall'); - - foreach($markets as $c => $ticker) - { - $pairs = explode('_', $c); - $symbol = strtoupper(reset($pairs)); $base = end($pairs); - if($symbol == 'BTC' || $base != 'btc') continue; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - $coin = getdbosql('db_coins', "symbol='{$symbol}'"); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); - - if(!$market) continue; - $price2 = ($ticker->bidPrice + $ticker->askPrice)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bidPrice); - $market->pricetime = time(); - $market->priority = -1; - $market->txfee = 0.2; // trade pct - $market->save(); - // debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); - } + $exchange = 'bitz'; + if (exchange_get($exchange, 'disabled')) return; + + $markets = bitz_api_query('tickerall'); + + foreach ($markets as $c => $ticker) + { + $pairs = explode('_', $c); + $symbol = strtoupper(reset($pairs)); + $base = end($pairs); + if ($symbol == 'BTC' || $base != 'btc') continue; + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + $coin = getdbosql('db_coins', "symbol='{$symbol}'"); + if (!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); + + if (!$market) continue; + $price2 = ($ticker->bidPrice + $ticker->askPrice) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bidPrice); + $market->pricetime = time(); + $market->priority = - 1; + $market->txfee = 0.2; // trade pct + $market->save(); + // debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); + + } } ///////////////////////////////////////////////////////////////////////////////////////////// - function updateCryptoBridgeMarkets($force = false) { - $exchange = 'cryptobridge'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $result = cryptobridge_api_query('ticker'); - if(!is_array($result)) return; - - foreach($result as $ticker) - { - if (is_null(objSafeVal($ticker,'id'))) continue; - $pairs = explode('_', $ticker->id); - $symbol = reset($pairs); $base = end($pairs); - if($symbol == 'BTC' || $base != 'BTC') continue; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $coin = getdbosql('db_coins', "symbol='{$symbol}'"); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); - if(!$market) continue; - - $price2 = ($ticker->bid + $ticker->ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->pricetime = time(); - $market->priority = -1; - $market->txfee = 0.2; // trade pct - $market->save(); - - //debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); - } + $exchange = 'cryptobridge'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $result = cryptobridge_api_query('ticker'); + if (!is_array($result)) return; + + foreach ($result as $ticker) + { + if (is_null(objSafeVal($ticker, 'id'))) continue; + $pairs = explode('_', $ticker->id); + $symbol = reset($pairs); + $base = end($pairs); + if ($symbol == 'BTC' || $base != 'BTC') continue; + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $coin = getdbosql('db_coins', "symbol='{$symbol}'"); + if (!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); + if (!$market) continue; + + $price2 = ($ticker->bid + $ticker->ask) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->pricetime = time(); + $market->priority = - 1; + $market->txfee = 0.2; // trade pct + $market->save(); + + //debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); + + } } function updateEscoDexMarkets($force = false) { - $exchange = 'escodex'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - $result = escodex_api_query('ticker'); - if(!is_array($result)) return; - foreach($result as $ticker) - { - if (is_null(objSafeVal($ticker,'id'))) continue; - #$pairs = explode('_', $ticker->id); - $symbol = $ticker->quote; $base = $ticker->base; - if($symbol == 'BTC' || $base != 'BTC') continue; - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $coin = getdbosql('db_coins', "symbol='{$symbol}'"); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); - if(!$market) continue; - - $price2 = ($ticker->highest_bid + $ticker->lowest_ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->highest_bid); - $market->pricetime = time(); - $market->priority = -1; - $market->txfee = 0.2; // trade pct - $market->save(); - //debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); - if ((empty($coin->price))||(empty($coin->price2))) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->market = $exchange; - $coin->save(); - } - } + $exchange = 'escodex'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + $result = escodex_api_query('ticker'); + if (!is_array($result)) return; + foreach ($result as $ticker) + { + if (is_null(objSafeVal($ticker, 'id'))) continue; + #$pairs = explode('_', $ticker->id); + $symbol = $ticker->quote; + $base = $ticker->base; + if ($symbol == 'BTC' || $base != 'BTC') continue; + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $coin = getdbosql('db_coins', "symbol='{$symbol}'"); + if (!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); + if (!$market) continue; + + $price2 = ($ticker->highest_bid + $ticker->lowest_ask) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->highest_bid); + $market->pricetime = time(); + $market->priority = - 1; + $market->txfee = 0.2; // trade pct + $market->save(); + //debuglog("$exchange: update $symbol: {$market->price} {$market->price2}"); + if ((empty($coin->price)) || (empty($coin->price2))) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->market = $exchange; + $coin->save(); + } + } } ///////////////////////////////////////////////////////////////////////////////////////////// - function updateGateioMarkets($force = false) { - $exchange = 'gateio'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = gateio_api_query('tickers'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $dbpair = strtolower($symbol).'_btc'; - foreach ($markets as $pair => $ticker) { - if ($pair != $dbpair) continue; - $price2 = (doubleval($ticker['highestBid']) + doubleval($ticker['lowestAsk'])) / 2; - $market->price = AverageIncrement($market->price, doubleval($ticker['highestBid'])); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); - $market->priority = -1; - $market->txfee = 0.2; // trade pct - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->market = $exchange; - $coin->save(); - } - } - } + $exchange = 'gateio'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = gateio_api_query('tickers'); + if (!is_array($markets)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $dbpair = strtolower($symbol) . '_btc'; + foreach ($markets as $pair => $ticker) + { + if ($pair != $dbpair) continue; + $price2 = (doubleval($ticker['highestBid']) + doubleval($ticker['lowestAsk'])) / 2; + $market->price = AverageIncrement($market->price, doubleval($ticker['highestBid'])); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); + $market->priority = - 1; + $market->txfee = 0.2; // trade pct + $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->market = $exchange; + $coin->save(); + } + } + } } ///////////////////////////////////////////////////////////////////////////////////////////// - function updateGraviexMarkets($force = false) { - $exchange = 'graviex'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = graviex_api_query('tickers'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $symbol = strtolower($symbol); - $dbpair = $symbol.'btc'; - foreach ($markets as $pair => $ticker) { - if ($pair != $dbpair) continue; - $price2 = ($ticker['ticker']['buy']+$ticker['ticker']['sell'])/2; - $market->price = AverageIncrement($market->price, $ticker['ticker']['buy']); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->market = $exchange; - $coin->save(); - } - } - } + $exchange = 'graviex'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = graviex_api_query('tickers'); + if (!is_array($markets)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $symbol = strtolower($symbol); + $dbpair = $symbol . 'btc'; + foreach ($markets as $pair => $ticker) + { + if ($pair != $dbpair) continue; + $price2 = ($ticker['ticker']['buy'] + $ticker['ticker']['sell']) / 2; + $market->price = AverageIncrement($market->price, $ticker['ticker']['buy']); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->market = $exchange; + $coin->save(); + } + } + } } ///////////////////////////////////////////////////////////////////////////////////////////// - function updateKrakenMarkets($force = false) { - $exchange = 'kraken'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $result = kraken_api_query('AssetPairs'); - if(!is_array($result)) return; - - foreach($result as $pair => $data) - { - $pairs = explode('-', $pair); - $base = reset($pairs); $symbol = end($pairs); - if($symbol == 'BTC' || $base != 'BTC') continue; - if(in_array($symbol, array('GBP','CAD','EUR','USD','JPY'))) continue; - if(strpos($symbol,'.d') !== false) continue; - - $coin = getdbosql('db_coins', "symbol='{$symbol}'"); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - - $fees = reset($data['fees']); - $feepct = is_array($fees) ? end($fees) : null; - $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); - if(!$market) continue; - - $market->txfee = $feepct; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $market->save(); - if($market->disabled || $market->deleted) continue; - - sleep(1); - $ticker = kraken_api_query('Ticker', $symbol); - if(!is_array($ticker) || !isset($ticker[$pair])) continue; - - $ticker = arraySafeVal($ticker, $pair); - if(!is_array($ticker) || !isset($ticker['b'])) continue; - - $price1 = (double) $ticker['a'][0]; // a = ask - $price2 = (double) $ticker['b'][0]; // b = bid, c = last - - // Alt markets on kraken (LTC/DOGE/NMC) are "reversed" against BTC (1/x) - if ($price2 > $price1) { - $price = $price2 ? 1 / $price2 : 0; - $price2 = $price1 ? 1 / $price1 : 0; - } else { - $price = $price1 ? 1 / $price1 : 0; - $price2 = $price2 ? 1 / $price2 : 0; - } - - $market->price = AverageIncrement($market->price, $price); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); - - $market->save(); - } + $exchange = 'kraken'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $result = kraken_api_query('AssetPairs'); + if (!is_array($result)) return; + + foreach ($result as $pair => $data) + { + $pairs = explode('-', $pair); + $base = reset($pairs); + $symbol = end($pairs); + if ($symbol == 'BTC' || $base != 'BTC') continue; + if (in_array($symbol, array( + 'GBP', + 'CAD', + 'EUR', + 'USD', + 'JPY' + ))) continue; + if (strpos($symbol, '.d') !== false) continue; + + $coin = getdbosql('db_coins', "symbol='{$symbol}'"); + if (!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + + $fees = reset($data['fees']); + $feepct = is_array($fees) ? end($fees) : null; + $market = getdbosql('db_markets', "coinid={$coin->id} and name='{$exchange}'"); + if (!$market) continue; + + $market->txfee = $feepct; + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $market->save(); + if ($market->disabled || $market->deleted) continue; + + sleep(1); + $ticker = kraken_api_query('Ticker', $symbol); + if (!is_array($ticker) || !isset($ticker[$pair])) continue; + + $ticker = arraySafeVal($ticker, $pair); + if (!is_array($ticker) || !isset($ticker['b'])) continue; + + $price1 = (double)$ticker['a'][0]; // a = ask + $price2 = (double)$ticker['b'][0]; // b = bid, c = last + // Alt markets on kraken (LTC/DOGE/NMC) are "reversed" against BTC (1/x) + if ($price2 > $price1) + { + $price = $price2 ? 1 / $price2 : 0; + $price2 = $price1 ? 1 / $price1 : 0; + } + else + { + $price = $price1 ? 1 / $price1 : 0; + $price2 = $price2 ? 1 / $price2 : 0; + } + + $market->price = AverageIncrement($market->price, $price); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); + + $market->save(); + } } ///////////////////////////////////////////////////////////////////////////////////////////// - function updateBittrexMarkets($force = false) { - $exchange = 'bittrex'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = bittrex_api_query('public/getcurrencies'); - if(!is_object($list)) return; - foreach($list->result as $currency) - { - $market = objSafeVal($currency,'Currency',''); - if(empty($market) || $market == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$currency->Currency)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); - if(!$market) continue; - - $market->txfee = $currency->TxFee; // withdraw cost, not a percent! - $market->message = $currency->Notice; - if($market->disabled < 9) $market->disabled = !$currency->IsActive; - - $market->save(); - } - - sleep(1); - - $list = bittrex_api_query('public/getmarketsummaries'); - if(!is_object($list)) return; - - foreach($list->result as $m) - { - $a = explode('-', $m->MarketName); - if(!isset($a[1])) continue; - if($a[0] != 'BTC') continue; - $symbol = $a[1]; - if($symbol == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); - if(!$market) continue; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $price2 = ($m->Bid + $m->Ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $m->Bid); - $market->pricetime = time(); - $market->save(); - - // deposit address - if(!empty(EXCH_BITTREX_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if($force || (empty($market->deposit_address) && !$last_checked)) - { - $address = bittrex_api_query('account/getdepositaddress', "¤cy={$symbol}"); - if(is_object($address) && isset($address->result)) { - $addr = $address->result->Address; - if (!empty($addr) && $addr != $market->deposit_address) { - $market->deposit_address = $addr; - $market->save(); - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - } - } - } - cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 12*3600); - } - -// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); - } + $exchange = 'bittrex'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = bittrex_api_query('public/getcurrencies'); + if (!is_object($list)) return; + foreach ($list->result as $currency) + { + $market = objSafeVal($currency, 'Currency', ''); + if (empty($market) || $market == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array( + ':sym' => $currency->Currency + )); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); + if (!$market) continue; + + $market->txfee = $currency->TxFee; // withdraw cost, not a percent! + $market->message = $currency->Notice; + if ($market->disabled < 9) $market->disabled = !$currency->IsActive; + + $market->save(); + } + + sleep(1); + + $list = bittrex_api_query('public/getmarketsummaries'); + if (!is_object($list)) return; + + foreach ($list->result as $m) + { + $a = explode('-', $m->MarketName); + if (!isset($a[1])) continue; + if ($a[0] != 'BTC') continue; + $symbol = $a[1]; + if ($symbol == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array( + ':sym' => $symbol + )); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange'"); + if (!$market) continue; + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $price2 = ($m->Bid + $m->Ask) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $m->Bid); + $market->pricetime = time(); + $market->save(); + + // deposit address + if (!empty(EXCH_BITTREX_KEY)) + { + $last_checked = cache()->get($exchange . '-deposit_address-check-' . $symbol); + if ($force || (empty($market->deposit_address) && !$last_checked)) + { + $address = bittrex_api_query('account/getdepositaddress', "¤cy={$symbol}"); + if (is_object($address) && isset($address->result)) + { + $addr = $address + ->result->Address; + if (!empty($addr) && $addr != $market->deposit_address) + { + $market->deposit_address = $addr; + $market->save(); + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + } + } + } + cache() + ->set($exchange . '-deposit_address-check-' . $coin->symbol, time() , 12 * 3600); + } + + // debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); + + } } //////////////////////////////////////////////////////////////////////////////////// - function updateCCexMarkets() { - $exchange = 'c-cex'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $ccex = new CcexAPI; - $list = $ccex->getMarketSummaries(); - if (!is_array($list)) return; - - foreach($list as $ticker) - { - if(!isset($ticker['MarketName'])) continue; - $e = explode('-', $ticker['MarketName']); - - $symbol = strtoupper($e[0]); - $base_symbol = strtoupper($e[1]); - - $sqlFilter = ''; - if ($base_symbol != 'BTC') { - // Only track ALT markets (LTC, DOGE) if the market record exists in the DB, sample market name "c-cex LTC" - $in_db = (int) dboscalar("SELECT count(M.id) FROM markets M INNER JOIN coins C ON C.id=M.coinid - WHERE C.installed AND C.symbol=:sym AND M.base_coin=:base", array(':sym'=>$symbol,':base'=>$base_symbol)); - if (!$in_db) continue; - $sqlFilter = "AND base_coin='$base_symbol'"; - } - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if (!$coin) continue; - if (!$coin->installed && !$coin->watch) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name LIKE '$exchange%' $sqlFilter"); - if (!$market) continue; - //if ($market->disabled < 9) $market->disabled = !$ticker['IsActive']; // only in GetMarkets() - if ($market->disabled < 9) $market->disabled = ($ticker['OpenBuyOrders'] <= 1); - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $market->save(); - - if ($market->disabled || $market->deleted) continue; - - $price2 = ($ticker['Bid']+$ticker['Ask'])/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker['Bid']); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2) && $base_symbol=='BTC') { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - - if(!empty(EXCH_CCEX_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if(empty($market->deposit_address) && !$last_checked) - { - sleep(1); - $address = $ccex->getDepositAddress($symbol); - if(!empty($address)) { - $addr = arraySafeVal($address,'return'); - if (!empty($addr) && $addr != $market->deposit_address) { - if (strpos($addr, 'Error') !== false) { - $market->message = $addr; - debuglog("$exchange: deposit address for $symbol returned $addr"); - } else { - $market->deposit_address = $addr; - $market->message = null; - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - } - $market->save(); - } - } - } - cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 24*3600); - } - -// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); - } + $exchange = 'c-cex'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $ccex = new CcexAPI; + $list = $ccex->getMarketSummaries(); + if (!is_array($list)) return; + + foreach ($list as $ticker) + { + if (!isset($ticker['MarketName'])) continue; + $e = explode('-', $ticker['MarketName']); + + $symbol = strtoupper($e[0]); + $base_symbol = strtoupper($e[1]); + + $sqlFilter = ''; + if ($base_symbol != 'BTC') + { + // Only track ALT markets (LTC, DOGE) if the market record exists in the DB, sample market name "c-cex LTC" + $in_db = (int)dboscalar("SELECT count(M.id) FROM markets M INNER JOIN coins C ON C.id=M.coinid + WHERE C.installed AND C.symbol=:sym AND M.base_coin=:base", array( + ':sym' => $symbol, + ':base' => $base_symbol + )); + if (!$in_db) continue; + $sqlFilter = "AND base_coin='$base_symbol'"; + } + + $coin = getdbosql('db_coins', "symbol=:symbol", array( + ':symbol' => $symbol + )); + if (!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name LIKE '$exchange%' $sqlFilter"); + if (!$market) continue; + //if ($market->disabled < 9) $market->disabled = !$ticker['IsActive']; // only in GetMarkets() + if ($market->disabled < 9) $market->disabled = ($ticker['OpenBuyOrders'] <= 1); + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $market->save(); + + if ($market->disabled || $market->deleted) continue; + + $price2 = ($ticker['Bid'] + $ticker['Ask']) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker['Bid']); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2) && $base_symbol == 'BTC') + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + + if (!empty(EXCH_CCEX_KEY)) + { + $last_checked = cache()->get($exchange . '-deposit_address-check-' . $symbol); + if (empty($market->deposit_address) && !$last_checked) + { + sleep(1); + $address = $ccex->getDepositAddress($symbol); + if (!empty($address)) + { + $addr = arraySafeVal($address, 'return'); + if (!empty($addr) && $addr != $market->deposit_address) + { + if (strpos($addr, 'Error') !== false) + { + $market->message = $addr; + debuglog("$exchange: deposit address for $symbol returned $addr"); + } + else + { + $market->deposit_address = $addr; + $market->message = null; + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + } + $market->save(); + } + } + } + cache() + ->set($exchange . '-deposit_address-check-' . $coin->symbol, time() , 24 * 3600); + } + + // debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); + + } } //////////////////////////////////////////////////////////////////////////////////// - function updatePoloniexMarkets() { - $exchange = 'poloniex'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $poloniex = new poloniex; - - $tickers = $poloniex->get_ticker(); - if(!is_array($tickers)) return; - - foreach($tickers as $symbol=>$ticker) - { - $a = explode('_', $symbol); - if(!isset($a[1])) continue; - if($a[0] != 'BTC') continue; - - $symbol = $a[1]; - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} and name='poloniex'"); - if(!$market) continue; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - } - - if($market->disabled || $market->deleted) continue; - - $price2 = ($ticker['highestBid']+$ticker['lowestAsk'])/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker['highestBid']); - $market->pricetime = time(); - - $market->save(); - - if(empty($market->deposit_address) && $coin->installed && !empty(EXCH_POLONIEX_KEY)) { - $last_checked = cache()->get($exchange.'-deposit_address-check'); - if (time() - $last_checked < 3600) { - // if still empty after get_deposit_addresses(), generate one - $poloniex->generate_address($coin->symbol); - sleep(1); - } - // empty address found, so force get_deposit_addresses check - cache()->set($exchange.'-deposit_address-check', 0, 10); - } - -// debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); - } - - // deposit addresses - if(!empty(EXCH_POLONIEX_KEY)) - { - $list = array(); - $last_checked = cache()->get($exchange.'-deposit_address-check'); - if (!$last_checked) { - $list = $poloniex->get_deposit_addresses(); - if (!is_array($list)) return; - } - - foreach($list as $symbol=>$item) - { - if($symbol == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid=$coin->id and name='poloniex'"); - if(!$market) continue; - - if ($market->deposit_address != $item) { - $market->deposit_address = $item; - $market->save(); - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - } - } - cache()->set($exchange.'-deposit_address-check', time(), 12*3600); - } + $exchange = 'poloniex'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $poloniex = new poloniex; + + $tickers = $poloniex->get_ticker(); + if (!is_array($tickers)) return; + + foreach ($tickers as $symbol => $ticker) + { + $a = explode('_', $symbol); + if (!isset($a[1])) continue; + if ($a[0] != 'BTC') continue; + + $symbol = $a[1]; + + $coin = getdbosql('db_coins', "symbol=:symbol", array( + ':symbol' => $symbol + )); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} and name='poloniex'"); + if (!$market) continue; + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + } + + if ($market->disabled || $market->deleted) continue; + + $price2 = ($ticker['highestBid'] + $ticker['lowestAsk']) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker['highestBid']); + $market->pricetime = time(); + + $market->save(); + + if (empty($market->deposit_address) && $coin->installed && !empty(EXCH_POLONIEX_KEY)) + { + $last_checked = cache()->get($exchange . '-deposit_address-check'); + if (time() - $last_checked < 3600) + { + // if still empty after get_deposit_addresses(), generate one + $poloniex->generate_address($coin->symbol); + sleep(1); + } + // empty address found, so force get_deposit_addresses check + cache() + ->set($exchange . '-deposit_address-check', 0, 10); + } + + // debuglog("$exchange: update $coin->symbol: $market->price $market->price2"); + + } + + // deposit addresses + if (!empty(EXCH_POLONIEX_KEY)) + { + $list = array(); + $last_checked = cache()->get($exchange . '-deposit_address-check'); + if (!$last_checked) + { + $list = $poloniex->get_deposit_addresses(); + if (!is_array($list)) return; + } + + foreach ($list as $symbol => $item) + { + if ($symbol == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:symbol", array( + ':symbol' => $symbol + )); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid=$coin->id and name='poloniex'"); + if (!$market) continue; + + if ($market->deposit_address != $item) + { + $market->deposit_address = $item; + $market->save(); + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + } + } + cache() + ->set($exchange . '-deposit_address-check', time() , 12 * 3600); + } } //////////////////////////////////////////////////////////////////////////////////// - function updateYobitMarkets() { - $exchange = 'yobit'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $res = yobit_api_query('info'); - if(!is_object($res)) return; - - foreach($res->pairs as $i=>$item) - { - $e = explode('_', $i); - $symbol = strtoupper($e[0]); - $base_symbol = strtoupper($e[1]); - - if($symbol == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if(!$coin) continue; - - $sqlFilter = "AND IFNULL(base_coin,'')=''"; - if ($base_symbol != 'BTC') { - // Only track ALT markets (ETH, DOGE) if the market record exists in the DB, sample market name "yobit DOGE" - $in_db = (int) dboscalar("SELECT count(M.id) FROM markets M INNER JOIN coins C ON C.id=M.coinid ". - " WHERE C.installed AND C.symbol=:sym AND M.name LIKE '$exchange %' AND M.base_coin=:base", - array(':sym'=>$symbol,':base'=>$base_symbol) - ); - if (!$in_db) continue; - $sqlFilter = "AND base_coin='$base_symbol'"; - } - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name LIKE '$exchange%' $sqlFilter"); - if(!$market) continue; - - $market->txfee = objSafeVal($item,'fee',0.2); - if ($market->disabled < 9) $market->disabled = arraySafeVal($item,'hidden',0); - if (time() - $market->pricetime > 6*3600) $market->price = 0; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - } - - $market->save(); - - if ($market->deleted || $market->disabled) continue; - if (!$coin->installed && !$coin->watch) continue; - - $symbol = $coin->getOfficialSymbol(); - $pair = strtolower($symbol.'_'.$base_symbol); - - $ticker = yobit_api_query("ticker/$pair"); - if(!$ticker || objSafeVal($ticker,$pair) === NULL) continue; - if(objSafeVal($ticker->$pair,'buy') === NULL) { - debuglog("$exchange: invalid data received for $pair ticker"); - continue; - } - - $price2 = ($ticker->$pair->buy + $ticker->$pair->sell) / 2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->$pair->buy); - if ($ticker->$pair->buy < $market->price) $market->price = $ticker->$pair->buy; - $market->pricetime = time(); - $market->save(); - - if(!empty(EXCH_YOBIT_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if ($last_checked) continue; - - sleep(1); // for the api nonce - $address = yobit_api_query2('GetDepositAddress', array("coinName"=>$symbol)); - if (!empty($address) && isset($address['return']) && $address['success']) { - $addr = $address['return']['address']; - if (!empty($addr) && $addr != $market->deposit_address) { - $market->deposit_address = $addr; - debuglog("$exchange: deposit address for {$symbol} updated"); - $market->save(); - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - } + $exchange = 'yobit'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $res = yobit_api_query('info'); + if (!is_object($res)) return; + + foreach ($res->pairs as $i => $item) + { + $e = explode('_', $i); + $symbol = strtoupper($e[0]); + $base_symbol = strtoupper($e[1]); + + if ($symbol == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:symbol", array( + ':symbol' => $symbol + )); + if (!$coin) continue; + + $sqlFilter = "AND IFNULL(base_coin,'')=''"; + if ($base_symbol != 'BTC') + { + // Only track ALT markets (ETH, DOGE) if the market record exists in the DB, sample market name "yobit DOGE" + $in_db = (int)dboscalar("SELECT count(M.id) FROM markets M INNER JOIN coins C ON C.id=M.coinid " . " WHERE C.installed AND C.symbol=:sym AND M.name LIKE '$exchange %' AND M.base_coin=:base", array( + ':sym' => $symbol, + ':base' => $base_symbol + )); + if (!$in_db) continue; + $sqlFilter = "AND base_coin='$base_symbol'"; + } + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name LIKE '$exchange%' $sqlFilter"); + if (!$market) continue; + + $market->txfee = objSafeVal($item, 'fee', 0.2); + if ($market->disabled < 9) $market->disabled = arraySafeVal($item, 'hidden', 0); + if (time() - $market->pricetime > 6 * 3600) $market->price = 0; + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + } + + $market->save(); + + if ($market->deleted || $market->disabled) continue; + if (!$coin->installed && !$coin->watch) continue; + + $symbol = $coin->getOfficialSymbol(); + $pair = strtolower($symbol . '_' . $base_symbol); + + $ticker = yobit_api_query("ticker/$pair"); + if (!$ticker || objSafeVal($ticker, $pair) === NULL) continue; + if (objSafeVal($ticker->$pair, 'buy') === NULL) + { + debuglog("$exchange: invalid data received for $pair ticker"); + continue; + } + + $price2 = ($ticker + ->$pair->buy + $ticker + ->$pair->sell) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker + ->$pair->buy); + if ($ticker + ->$pair->buy < $market->price) $market->price = $ticker + ->$pair->buy; + $market->pricetime = time(); + $market->save(); + + if (!empty(EXCH_YOBIT_KEY)) + { + $last_checked = cache()->get($exchange . '-deposit_address-check-' . $symbol); + if ($last_checked) continue; + + sleep(1); // for the api nonce + $address = yobit_api_query2('GetDepositAddress', array( + "coinName" => $symbol + )); + if (!empty($address) && isset($address['return']) && $address['success']) + { + $addr = $address['return']['address']; + if (!empty($addr) && $addr != $market->deposit_address) + { + $market->deposit_address = $addr; + debuglog("$exchange: deposit address for {$symbol} updated"); + $market->save(); + } + } + cache() + ->set($exchange . '-deposit_address-check-' . $symbol, time() , 24 * 3600); + } + } } // http://www.jubi.com/ ? function updateJubiMarkets() { - $exchange = 'jubi'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $btc = jubi_api_query('ticker', "?coin=btc"); - if(!is_object($btc)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $ticker = jubi_api_query('ticker', "?coin=".strtolower($symbol)); - if(!$ticker || !is_object($ticker)) continue; - if(objSafeVal($ticker,'buy') === NULL) { - debuglog("$exchange: invalid data received for $symbol ticker"); - continue; - } - - if (isset($btc->sell) && $btc->sell != 0.) - $ticker->buy /= $btc->sell; - if (isset($btc->buy) && $btc->buy != 0.) - $ticker->sell /= $btc->buy; - - $price2 = ($ticker->buy+$ticker->sell)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->buy*0.95); - $market->pricetime = time(); - -// debuglog("jubi update $symbol: $market->price $market->price2"); - - $market->save(); - } + $exchange = 'jubi'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $btc = jubi_api_query('ticker', "?coin=btc"); + if (!is_object($btc)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $ticker = jubi_api_query('ticker', "?coin=" . strtolower($symbol)); + if (!$ticker || !is_object($ticker)) continue; + if (objSafeVal($ticker, 'buy') === NULL) + { + debuglog("$exchange: invalid data received for $symbol ticker"); + continue; + } + + if (isset($btc->sell) && $btc->sell != 0.) $ticker->buy /= $btc->sell; + if (isset($btc->buy) && $btc->buy != 0.) $ticker->sell /= $btc->buy; + + $price2 = ($ticker->buy + $ticker->sell) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->buy * 0.95); + $market->pricetime = time(); + + // debuglog("jubi update $symbol: $market->price $market->price2"); + $market->save(); + } } function updateAlcurexMarkets() { - $exchange = 'alcurex'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $data = alcurex_api_query('market', "?info=on"); - if(!is_object($data)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - if (!$coin->installed && !$coin->watch) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = strtoupper($symbol).'_BTC'; - foreach ($data->MARKETS as $ticker) { - if ($ticker->Pair === $pair) { - $lpair = strtolower($pair); - $last = alcurex_api_query('market', "?pair=$lpair&last=last"); - if (is_object($last) && !empty($last->$lpair)) { - $last = $last->$lpair; - $market->price = AverageIncrement($market->price, $last->price); - $market->pricetime = time(); - $market->save(); - } - $last = alcurex_api_query('market', "?pair=$lpair&last=sell"); - if (is_object($last) && !empty($last->$lpair)) { - $last = $last->$lpair; - $market->price2 = AverageIncrement($market->price2, $last->price); - $market->pricetime = time(); - $market->save(); - } - if (empty($coin->price)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - //debuglog("$exchange: $pair price updated to {$market->price}"); - break; - } - } - } + $exchange = 'alcurex'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $data = alcurex_api_query('market', "?info=on"); + if (!is_object($data)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = strtoupper($symbol) . '_BTC'; + foreach ($data->MARKETS as $ticker) + { + if ($ticker->Pair === $pair) + { + $lpair = strtolower($pair); + $last = alcurex_api_query('market', "?pair=$lpair&last=last"); + if (is_object($last) && !empty($last->$lpair)) + { + $last = $last->$lpair; + $market->price = AverageIncrement($market->price, $last->price); + $market->pricetime = time(); + $market->save(); + } + $last = alcurex_api_query('market', "?pair=$lpair&last=sell"); + if (is_object($last) && !empty($last->$lpair)) + { + $last = $last->$lpair; + $market->price2 = AverageIncrement($market->price2, $last->price); + $market->pricetime = time(); + $market->save(); + } + if (empty($coin->price)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + //debuglog("$exchange: $pair price updated to {$market->price}"); + break; + } + } + } } function updateCoinbeneMarkets() { - $exchange = 'coinbene'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $data = coinbene_api_query('market/ticker', 'symbol=all'); - $data = objSafeVal($data,'ticker'); - if(!is_array($data)) return; - - foreach($list as $market) { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - if(!$coin->installed && !$coin->watch) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = $symbol.'BTC'; - foreach($data as $ticker) { - if ($ticker->symbol != $pair) continue; - - $price2 = ($ticker->bid+$ticker->ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->pricetime = time(); - $market->save(); - - break; - } - } + $exchange = 'coinbene'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $data = coinbene_api_query('market/ticker', 'symbol=all'); + $data = objSafeVal($data, 'ticker'); + if (!is_array($data)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + if (!$coin->installed && !$coin->watch) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = $symbol . 'BTC'; + foreach ($data as $ticker) + { + if ($ticker->symbol != $pair) continue; + + $price2 = ($ticker->bid + $ticker->ask) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->pricetime = time(); + $market->save(); + + break; + } + } } function updateCrex24Markets() { - $exchange = 'crex24'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $data = crex24_api_query('tickers'); - if(!is_array($data)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - $pair = strtoupper($symbol).'-BTC'; - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $pair = strtoupper($symbol.'-'.$market->base_coin); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - foreach ($data as $ticker) { - if ($ticker->instrument === $pair) { - if ($market->disabled < 9) { - $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); - $market->disabled = ($ticker->bid < $ticker->ask/2) && ($nbm > 1); - } - - $price2 = ($ticker->bid+$ticker->ask)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->pricetime = time(); // $ticker->timestamp "2018-08-31T12:48:56Z" - $market->save(); - - if (empty($coin->price) && $ticker->ask) { - $coin->price = $market->price; - $coin->price2 = $price2; - $coin->save(); - } - //debuglog("$exchange: $pair price updated to {$market->price}"); - break; - } - } - } + $exchange = 'crex24'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $data = crex24_api_query('tickers'); + if (!is_array($data)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + $pair = strtoupper($symbol) . '-BTC'; + + $sqlFilter = ''; + if (!empty($market->base_coin)) + { + $pair = strtoupper($symbol . '-' . $market->base_coin); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + foreach ($data as $ticker) + { + if ($ticker->instrument === $pair) + { + if ($market->disabled < 9) + { + $nbm = (int)dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); + $market->disabled = ($ticker->bid < $ticker->ask / 2) && ($nbm > 1); + } + + $price2 = ($ticker->bid + $ticker->ask) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->pricetime = time(); // $ticker->timestamp "2018-08-31T12:48:56Z" + $market->save(); + + if (empty($coin->price) && $ticker->ask) + { + $coin->price = $market->price; + $coin->price2 = $price2; + $coin->save(); + } + //debuglog("$exchange: $pair price updated to {$market->price}"); + break; + } + } + } } function updateCryptopiaMarkets() { - $exchange = 'cryptopia'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $data = cryptopia_api_query('GetMarkets', 24); - if(!is_object($data)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - $pair = strtoupper($symbol).'/BTC'; - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $pair = strtoupper($symbol.'/'.$market->base_coin); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } else if ($market->message == 'disabled from settings') { - $market->disabled = 0; - $market->message = ''; - $market->save(); - } - - foreach ($data->Data as $ticker) { - if ($ticker->Label === $pair) { - - if ($market->disabled < 9) { - $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); - $market->disabled = ($ticker->BidPrice < $ticker->AskPrice/2) && ($nbm > 1); - } - - $price2 = ($ticker->BidPrice+$ticker->AskPrice)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, $ticker->BidPrice*0.98); - $market->marketid = $ticker->TradePairId; - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price) && !$market->disabled && strpos($pair,'BTC')) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } -// debuglog("$exchange: $pair $market->price ".bitcoinvaluetoa($market->price2)); - break; - } - } - } - - if(empty(EXCH_CRYPTOPIA_KEY)) return; - - $last_checked = cache()->get($exchange.'-deposit_address-check'); - if ($last_checked) return; - - $addresses = array(); - sleep(1); - $query = cryptopia_api_user('GetBalance'); - if (is_object($query) && is_array($query->Data)) - foreach($query->Data as $balance) { - $addr = objSafeVal($balance,'Address'); - if (!empty($addr)) $addresses[$balance->Symbol] = $addr; - } - // for some reason, no more available in global GetBalance api - $needCurrencyQueries = empty($addresses); - - if (!empty($list)) - foreach($list as $market) { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - $addr = arraySafeVal($addresses, $symbol); - if ($needCurrencyQueries) { - if(!$coin->installed) continue; - sleep(2); - $query = cryptopia_api_user('GetDepositAddress', array('Currency'=>$symbol)); - $dep = objSafeVal($query,'Data'); - $addr = objSafeVal($dep,'Address'); - } - if (!empty($addr) && $market->deposit_address != $addr) { - debuglog("$exchange: deposit address for {$symbol} updated"); - $market->deposit_address = $addr; - $market->save(); - } - } - cache()->set($exchange.'-deposit_address-check', time(), 12*3600); + $exchange = 'cryptopia'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $data = cryptopia_api_query('GetMarkets', 24); + if (!is_object($data)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + $pair = strtoupper($symbol) . '/BTC'; + + $sqlFilter = ''; + if (!empty($market->base_coin)) + { + $pair = strtoupper($symbol . '/' . $market->base_coin); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + else if ($market->message == 'disabled from settings') + { + $market->disabled = 0; + $market->message = ''; + $market->save(); + } + + foreach ($data->Data as $ticker) + { + if ($ticker->Label === $pair) + { + + if ($market->disabled < 9) + { + $nbm = (int)dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); + $market->disabled = ($ticker->BidPrice < $ticker->AskPrice / 2) && ($nbm > 1); + } + + $price2 = ($ticker->BidPrice + $ticker->AskPrice) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, $ticker->BidPrice * 0.98); + $market->marketid = $ticker->TradePairId; + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price) && !$market->disabled && strpos($pair, 'BTC')) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + // debuglog("$exchange: $pair $market->price ".bitcoinvaluetoa($market->price2)); + break; + } + } + } + + if (empty(EXCH_CRYPTOPIA_KEY)) return; + + $last_checked = cache()->get($exchange . '-deposit_address-check'); + if ($last_checked) return; + + $addresses = array(); + sleep(1); + $query = cryptopia_api_user('GetBalance'); + if (is_object($query) && is_array($query->Data)) foreach ($query->Data as $balance) + { + $addr = objSafeVal($balance, 'Address'); + if (!empty($addr)) $addresses[$balance->Symbol] = $addr; + } + // for some reason, no more available in global GetBalance api + $needCurrencyQueries = empty($addresses); + + if (!empty($list)) foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + $addr = arraySafeVal($addresses, $symbol); + if ($needCurrencyQueries) + { + if (!$coin->installed) continue; + sleep(2); + $query = cryptopia_api_user('GetDepositAddress', array( + 'Currency' => $symbol + )); + $dep = objSafeVal($query, 'Data'); + $addr = objSafeVal($dep, 'Address'); + } + if (!empty($addr) && $market->deposit_address != $addr) + { + debuglog("$exchange: deposit address for {$symbol} updated"); + $market->deposit_address = $addr; + $market->save(); + } + } + cache() + ->set($exchange . '-deposit_address-check', time() , 12 * 3600); } function updateHitBTCMarkets() { - $exchange = 'hitbtc'; - if (exchange_get($exchange, 'disabled')) return; - - $markets = getdbolist('db_markets', "name LIKE '$exchange%'"); // allow "hitbtc LTC" - if(empty($markets)) return; - - $data = hitbtc_api_query('ticker','','array'); - if(!is_array($data) || empty($data)) return; - - foreach($markets as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $base = 'BTC'; - $symbol = $coin->getOfficialSymbol(); - $pair = strtoupper($symbol).$base; - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $base = $market->base_coin; - $pair = strtoupper($market->base_coin.$symbol); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - - if (market_get($exchange, $symbol, "disabled", false, $base)) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - foreach ($data as $p => $ticker) - { - if ($p === $pair) { - $price2 = ((double)$ticker['bid'] + (double)$ticker['ask'])/2; - $market->price = AverageIncrement($market->price, (double)$ticker['bid']); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); // $ticker->timestamp - $market->priority = -1; - $market->save(); - - if (empty($coin->price2) && strpos($pair,'BTC') !== false) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - //debuglog("$exchange: $pair $market->price ".bitcoinvaluetoa($market->price2)); - break; - } - } - - if(!empty(EXCH_HITBTC_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if($coin->installed && !$last_checked && empty($market->deposit_address)) - { - sleep(1); - $res = hitbtc_api_user('payment/address/'.$symbol); // GET method - if(is_object($res) && isset($res->address)) { - if (!empty($res->address)) { - $market->deposit_address = $res->address; - debuglog("$exchange: deposit address for {$symbol} updated"); - $market->save(); - if ($symbol == 'WAVES' || $symbol == 'LSK') // Wallet address + Public key - debuglog("$exchange: $symbol deposit address data: ".json_encode($res)); - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - } - } + $exchange = 'hitbtc'; + if (exchange_get($exchange, 'disabled')) return; + + $markets = getdbolist('db_markets', "name LIKE '$exchange%'"); // allow "hitbtc LTC" + if (empty($markets)) return; + + $data = hitbtc_api_query('ticker', '', 'array'); + if (!is_array($data) || empty($data)) return; + + foreach ($markets as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $base = 'BTC'; + $symbol = $coin->getOfficialSymbol(); + $pair = strtoupper($symbol) . $base; + + $sqlFilter = ''; + if (!empty($market->base_coin)) + { + $base = $market->base_coin; + $pair = strtoupper($market->base_coin . $symbol); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + + if (market_get($exchange, $symbol, "disabled", false, $base)) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + foreach ($data as $p => $ticker) + { + if ($p === $pair) + { + $price2 = ((double)$ticker['bid'] + (double)$ticker['ask']) / 2; + $market->price = AverageIncrement($market->price, (double)$ticker['bid']); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); // $ticker->timestamp + $market->priority = - 1; + $market->save(); + + if (empty($coin->price2) && strpos($pair, 'BTC') !== false) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + //debuglog("$exchange: $pair $market->price ".bitcoinvaluetoa($market->price2)); + break; + } + } + + if (!empty(EXCH_HITBTC_KEY)) + { + $last_checked = cache()->get($exchange . '-deposit_address-check-' . $symbol); + if ($coin->installed && !$last_checked && empty($market->deposit_address)) + { + sleep(1); + $res = hitbtc_api_user('payment/address/' . $symbol); // GET method + if (is_object($res) && isset($res->address)) + { + if (!empty($res->address)) + { + $market->deposit_address = $res->address; + debuglog("$exchange: deposit address for {$symbol} updated"); + $market->save(); + if ($symbol == 'WAVES' || $symbol == 'LSK') // Wallet address + Public key + debuglog("$exchange: $symbol deposit address data: " . json_encode($res)); + } + } + cache()->set($exchange . '-deposit_address-check-' . $symbol, time() , 24 * 3600); + } + } + } } function updateNovaMarkets() { - $exchange = 'nova'; - if (exchange_get($exchange, 'disabled')) return; - - $markets = getdbolist('db_markets', "name LIKE '$exchange%'"); // allow "nova LTC" - if(empty($markets)) return; - - $data = nova_api_query('markets'); - if(!is_object($data) || $data->status != 'success' || !is_array($data->markets)) return; - - foreach($markets as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $base = 'BTC'; - $symbol = $coin->getOfficialSymbol(); - $pair = $base.'_'.strtoupper($symbol); - - $sqlFilter = ''; - if (!empty($market->base_coin)) { - $base = $market->base_coin; - $pair = strtoupper($market->base_coin.'_'.$symbol); - $sqlFilter = "AND base_coin='{$market->base_coin}'"; - } - - if (market_get($exchange, $symbol, "disabled", false, $base)) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - foreach ($data->markets as $ticker) { - if ($ticker->marketname === $pair) { - - $market->marketid = $ticker->marketid; - - if ($market->disabled < 9) { - $nbm = (int) dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); - $market->disabled = (floatval($ticker->volume24h) <= 0.005) && $nbm > 1; // in btc - } - - if (!$market->disabled) { - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->price2 = AverageIncrement($market->price2, $ticker->last_price); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2) && strpos($pair,'BTC') !== false) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } - break; - } - } - - if(!empty(EXCH_NOVA_KEY)) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if(empty($market->deposit_address) && !$last_checked) - { - sleep(1); - $res = nova_api_user('getdepositaddress/'.$symbol); - if(objSafeVal($res,'status') == 'success') { - $addr = objSafeVal($res, 'address'); - if (!empty($addr)) { - $market->deposit_address = $addr; - // delimiter "::" for memo / payment id - $market->message = null; - debuglog("$exchange: deposit address for {$symbol} updated"); - $market->save(); - } else { - debuglog("$exchange: Failed to update $symbol deposit address, ".json_encode($res)); - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - } - } + $exchange = 'nova'; + if (exchange_get($exchange, 'disabled')) return; + + $markets = getdbolist('db_markets', "name LIKE '$exchange%'"); // allow "nova LTC" + if (empty($markets)) return; + + $data = nova_api_query('markets'); + if (!is_object($data) || $data->status != 'success' || !is_array($data->markets)) return; + + foreach ($markets as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $base = 'BTC'; + $symbol = $coin->getOfficialSymbol(); + $pair = $base . '_' . strtoupper($symbol); + + $sqlFilter = ''; + if (!empty($market->base_coin)) + { + $base = $market->base_coin; + $pair = strtoupper($market->base_coin . '_' . $symbol); + $sqlFilter = "AND base_coin='{$market->base_coin}'"; + } + + if (market_get($exchange, $symbol, "disabled", false, $base)) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + foreach ($data->markets as $ticker) + { + if ($ticker->marketname === $pair) + { + + $market->marketid = $ticker->marketid; + + if ($market->disabled < 9) + { + $nbm = (int)dboscalar("SELECT COUNT(id) FROM markets WHERE coinid={$coin->id} $sqlFilter"); + $market->disabled = (floatval($ticker->volume24h) <= 0.005) && $nbm > 1; // in btc + + } + + if (!$market->disabled) + { + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->price2 = AverageIncrement($market->price2, $ticker->last_price); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2) && strpos($pair, 'BTC') !== false) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } + break; + } + } + + if (!empty(EXCH_NOVA_KEY)) + { + $last_checked = cache()->get($exchange . '-deposit_address-check-' . $symbol); + if (empty($market->deposit_address) && !$last_checked) + { + sleep(1); + $res = nova_api_user('getdepositaddress/' . $symbol); + if (objSafeVal($res, 'status') == 'success') + { + $addr = objSafeVal($res, 'address'); + if (!empty($addr)) + { + $market->deposit_address = $addr; + // delimiter "::" for memo / payment id + $market->message = null; + debuglog("$exchange: deposit address for {$symbol} updated"); + $market->save(); + } + else + { + debuglog("$exchange: Failed to update $symbol deposit address, " . json_encode($res)); + } + } + cache()->set($exchange . '-deposit_address-check-' . $symbol, time() , 24 * 3600); + } + } + } } function updateBinanceMarkets() { - $exchange = 'binance'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $tickers = binance_api_query('ticker/allBookTickers'); - if(!is_array($tickers)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = $symbol.'BTC'; - foreach ($tickers as $ticker) { - if ($pair != $ticker->symbol) continue; - - $price2 = ($ticker->bidPrice+$ticker->askPrice)/2; - $market->price = AverageIncrement($market->price, $ticker->bidPrice); - $market->price2 = AverageIncrement($market->price2, $price2); - $market->pricetime = time(); - if ($market->disabled < 9) $market->disabled = (floatval($ticker->bidQty) < 0.01); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } - } + $exchange = 'binance'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $tickers = binance_api_query('ticker/allBookTickers'); + if (!is_array($tickers)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = $symbol . 'BTC'; + foreach ($tickers as $ticker) + { + if ($pair != $ticker->symbol) continue; + + $price2 = ($ticker->bidPrice + $ticker->askPrice) / 2; + $market->price = AverageIncrement($market->price, $ticker->bidPrice); + $market->price2 = AverageIncrement($market->price2, $price2); + $market->pricetime = time(); + if ($market->disabled < 9) $market->disabled = (floatval($ticker->bidQty) < 0.01); + $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } + } } function updateEmpoexMarkets() { - $exchange = 'empoex'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = empoex_api_query('marketinfo'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = strtoupper($symbol).'-BTC'; - - foreach ($markets as $ticker) { - if ($ticker->pairname != $pair) continue; - - $market->price = AverageIncrement($market->price, $ticker->bid); - $market->price2 = AverageIncrement($market->price2, $ticker->ask); - $market->pricetime = time(); - - if (floatval($ticker->base_volume_24hr) > 0.01) - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->market = 'empoex'; - $coin->save(); - } - } - } + $exchange = 'empoex'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = empoex_api_query('marketinfo'); + if (!is_array($markets)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = strtoupper($symbol) . '-BTC'; + + foreach ($markets as $ticker) + { + if ($ticker->pairname != $pair) continue; + + $market->price = AverageIncrement($market->price, $ticker->bid); + $market->price2 = AverageIncrement($market->price2, $ticker->ask); + $market->pricetime = time(); + + if (floatval($ticker->base_volume_24hr) > 0.01) $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->market = 'empoex'; + $coin->save(); + } + } + } } function updateKuCoinMarkets() { - $exchange = 'kucoin'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $symbols = kucoin_api_query('symbols','market=BTC'); - if(!kucoin_result_valid($symbols) || empty($symbols->data)) return; - - usleep(500); - $markets = kucoin_api_query('market/allTickers'); - if(!kucoin_result_valid($markets) || empty($markets->data)) return; - if(!isset($markets->data->ticker) || !is_array($markets->data->ticker)) return; - $tickers = $markets->data->ticker; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = strtoupper($symbol).'-BTC'; - - $enableTrading = false; - foreach ($symbols->data as $sym) { - if (objSafeVal($sym,'symbol') != $pair) continue; - $enableTrading = objSafeVal($sym,'enableTrading',false); - break; - } - - if ($market->disabled == $enableTrading) { - $market->disabled = (int) (!$enableTrading); - $market->save(); - if ($market->disabled) continue; - } - - foreach ($tickers as $ticker) { - if ($ticker->symbol != $pair) continue; - if (objSafeVal($ticker,'buy',-1) == -1) continue; - - $market->price = AverageIncrement($market->price, $ticker->buy); - $market->price2 = AverageIncrement($market->price2, objSafeVal($ticker,'sell',$ticker->buy)); - $market->priority = -1; - $market->pricetime = time(); - - if (floatval($ticker->vol) > 0.01) - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } - } + $exchange = 'kucoin'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $symbols = kucoin_api_query('symbols', 'market=BTC'); + if (!kucoin_result_valid($symbols) || empty($symbols->data)) return; + + usleep(500); + $markets = kucoin_api_query('market/allTickers'); + if (!kucoin_result_valid($markets) || empty($markets->data)) return; + if (!isset($markets + ->data + ->ticker) || !is_array($markets + ->data + ->ticker)) return; + $tickers = $markets + ->data->ticker; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = strtoupper($symbol) . '-BTC'; + + $enableTrading = false; + foreach ($symbols->data as $sym) + { + if (objSafeVal($sym, 'symbol') != $pair) continue; + $enableTrading = objSafeVal($sym, 'enableTrading', false); + break; + } + + if ($market->disabled == $enableTrading) + { + $market->disabled = (int)(!$enableTrading); + $market->save(); + if ($market->disabled) continue; + } + + foreach ($tickers as $ticker) + { + if ($ticker->symbol != $pair) continue; + if (objSafeVal($ticker, 'buy', -1) == - 1) continue; + + $market->price = AverageIncrement($market->price, $ticker->buy); + $market->price2 = AverageIncrement($market->price2, objSafeVal($ticker, 'sell', $ticker->buy)); + $market->priority = - 1; + $market->pricetime = time(); + + if (floatval($ticker->vol) > 0.01) $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } + } } function updateLiveCoinMarkets() { - $exchange = 'livecoin'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = livecoin_api_query('exchange/ticker'); - if(!is_array($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $pair = strtoupper($symbol).'/BTC'; - - foreach ($markets as $ticker) { - if ($ticker->symbol != $pair) continue; - - $market->price = AverageIncrement($market->price, $ticker->best_bid); - $market->price2 = AverageIncrement($market->price2, $ticker->best_ask); - $market->txfee = 0.2; - $market->priority = 0; - $market->pricetime = time(); - - if (floatval($ticker->volume) > 0.01) - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - - if(!empty(EXCH_LIVECOIN_KEY) && $market->disabled == 0) - { - $last_checked = cache()->get($exchange.'-deposit_address-check-'.$symbol); - if(empty($market->deposit_address) && !$last_checked) - { - sleep(1); - $livecoin = new LiveCoinApi(); - $data = $livecoin->getDepositAddress($symbol); - if(!empty($data) && objSafeVal($data, 'wallet', '') != '') { - $addr = arraySafeVal($data, 'wallet'); - if (!empty($addr)) { - $market->deposit_address = $addr; - // delimiter "::" for memo / payment id - $market->message = null; - debuglog("$exchange: deposit address for {$coin->symbol} updated"); - $market->save(); - } else { - debuglog("$exchange: Failed to update $symbol deposit address, ".json_decode($data)); - } - } - } - cache()->set($exchange.'-deposit_address-check-'.$symbol, time(), 24*3600); - } - } - } + $exchange = 'livecoin'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = livecoin_api_query('exchange/ticker'); + if (!is_array($markets)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $pair = strtoupper($symbol) . '/BTC'; + + foreach ($markets as $ticker) + { + if ($ticker->symbol != $pair) continue; + + $market->price = AverageIncrement($market->price, $ticker->best_bid); + $market->price2 = AverageIncrement($market->price2, $ticker->best_ask); + $market->txfee = 0.2; + $market->priority = 0; + $market->pricetime = time(); + + if (floatval($ticker->volume) > 0.01) $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + + if (!empty(EXCH_LIVECOIN_KEY) && $market->disabled == 0) + { + $last_checked = cache()->get($exchange . '-deposit_address-check-' . $symbol); + if (empty($market->deposit_address) && !$last_checked) + { + sleep(1); + $livecoin = new LiveCoinApi(); + $data = $livecoin->getDepositAddress($symbol); + if (!empty($data) && objSafeVal($data, 'wallet', '') != '') + { + $addr = arraySafeVal($data, 'wallet'); + if (!empty($addr)) + { + $market->deposit_address = $addr; + // delimiter "::" for memo / payment id + $market->message = null; + debuglog("$exchange: deposit address for {$coin->symbol} updated"); + $market->save(); + } + else + { + debuglog("$exchange: Failed to update $symbol deposit address, " . json_decode($data)); + } + } + } + cache()->set($exchange . '-deposit_address-check-' . $symbol, time() , 24 * 3600); + } + } + } } function updateCoinExchangeMarkets() { - $exchange = 'coinexchange'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = coinexchange_api_query('getmarkets'); - if(!is_object($list)) return; - $markets = coinexchange_api_query('getmarketsummaries'); - if(!is_object($markets)) return; - foreach($list->result as $currency) - { - $symbol = objSafeVal($currency,'MarketAssetCode',''); - $exchid = objSafeVal($currency,'MarketID',0); - if(empty($symbol) || !$exchid || $symbol == 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); - $base = objSafeVal($currency,'BaseCurrencyCode',''); - if ($base != 'BTC') { - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND base_coin=:base", array(':base'=>$base)); - } - if(!$market) continue; - - $symbol = $coin->getOfficialSymbol(); - if($market->disabled < 9) $market->disabled = !$currency->Active; - - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - if($currency->Active && $coin->enable) { - // check wallet status (deposit/withdrawals) - $status = coinexchange_api_query('getcurrency', 'ticker_code='.$symbol); - if(is_object($status) && is_object($status->result)) { - $res = $status->result; - if($market->disabled < 9) $market->disabled = (objSafeVal($res,'WalletStatus') == "offline"); - $market->message = $market->disabled ? $res->WalletStatus : ''; - //debuglog("$exchange: $symbol wallet is {$res->WalletStatus}"); - } - } - - $market->save(); - - if($market->disabled || $market->deleted) continue; - - foreach ($markets->result as $m) { - if ($m->MarketID == $exchid) { - $price2 = ((double) $m->BidPrice + (double) $m->AskPrice)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, (double) $m->BidPrice); - $market->pricetime = time(); - $market->marketid = $exchid; - $market->priority = -1; // not ready for trading - $market->save(); - //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - break; - } - } - } + $exchange = 'coinexchange'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = coinexchange_api_query('getmarkets'); + if (!is_object($list)) return; + $markets = coinexchange_api_query('getmarketsummaries'); + if (!is_object($markets)) return; + foreach ($list->result as $currency) + { + $symbol = objSafeVal($currency, 'MarketAssetCode', ''); + $exchid = objSafeVal($currency, 'MarketID', 0); + if (empty($symbol) || !$exchid || $symbol == 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array( + ':sym' => $symbol + )); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); + $base = objSafeVal($currency, 'BaseCurrencyCode', ''); + if ($base != 'BTC') + { + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND base_coin=:base", array( + ':base' => $base + )); + } + if (!$market) continue; + + $symbol = $coin->getOfficialSymbol(); + if ($market->disabled < 9) $market->disabled = !$currency->Active; + + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + if ($currency->Active && $coin->enable) + { + // check wallet status (deposit/withdrawals) + $status = coinexchange_api_query('getcurrency', 'ticker_code=' . $symbol); + if (is_object($status) && is_object($status->result)) + { + $res = $status->result; + if ($market->disabled < 9) $market->disabled = (objSafeVal($res, 'WalletStatus') == "offline"); + $market->message = $market->disabled ? $res->WalletStatus : ''; + //debuglog("$exchange: $symbol wallet is {$res->WalletStatus}"); + + } + } + + $market->save(); + + if ($market->disabled || $market->deleted) continue; + + foreach ($markets->result as $m) + { + if ($m->MarketID == $exchid) + { + $price2 = ((double)$m->BidPrice + (double)$m->AskPrice) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double)$m->BidPrice); + $market->pricetime = time(); + $market->marketid = $exchid; + $market->priority = - 1; // not ready for trading + $market->save(); + //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + break; + } + } + } } function updateCoinsMarketsMarkets() { - $exchange = 'coinsmarkets'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = coinsmarkets_api_query('apicoin'); - if(empty($list) || !is_array($list)) return; - foreach($list as $pair=>$data) - { - $e = explode('_', $pair); - $base = $e[0]; $symbol = strtoupper($e[1]); - //if($pair == 'DOG_BTC') todo: handle reverted DOG_BTC - if($base != 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); - if(!$market) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $price2 = ((double)$data['lowestAsk'] + (double)$data['highestBid'])/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, (double)$data['highestBid']); - $market->price = min($market->price, $market->price2); // reversed bid/ask ? - - $market->marketid = arraySafeVal($data,'id'); - $market->priority = -1; // not ready for trading - - if ($price2 < $market->price*2) { - // 24htrade field seems not filled in json - //if ($market->disabled == 1) $market->disabled = 0; - } else { - // reduce price2 - $market->price2 = AverageIncrement($market->price2, $market->price); - //if (!$market->disabled) $market->disabled = 1; - } - - //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } + $exchange = 'coinsmarkets'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = coinsmarkets_api_query('apicoin'); + if (empty($list) || !is_array($list)) return; + foreach ($list as $pair => $data) + { + $e = explode('_', $pair); + $base = $e[0]; + $symbol = strtoupper($e[1]); + //if($pair == 'DOG_BTC') todo: handle reverted DOG_BTC + if ($base != 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array( + ':sym' => $symbol + )); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); + if (!$market) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $price2 = ((double)$data['lowestAsk'] + (double)$data['highestBid']) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double)$data['highestBid']); + $market->price = min($market->price, $market->price2); // reversed bid/ask ? + $market->marketid = arraySafeVal($data, 'id'); + $market->priority = - 1; // not ready for trading + if ($price2 < $market->price * 2) + { + // 24htrade field seems not filled in json + //if ($market->disabled == 1) $market->disabled = 0; + + } + else + { + // reduce price2 + $market->price2 = AverageIncrement($market->price2, $market->price); + //if (!$market->disabled) $market->disabled = 1; + + } + + //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } } function updateStocksExchangeMarkets() { - $exchange = 'stocksexchange'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $list = stocksexchange_api_query('ticker'); - if(empty($list) || !is_array($list)) return; - foreach($list as $m) - { - $e = explode('_', $m->market_name); - $symbol = strtoupper($e[0]); $base = $e[1]; - if($base != 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); - if(!$market) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $market->disabled = ($m->bid == 0); - - $price2 = ((double)$m->ask + (double)$m->bid)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, (double)$m->bid); - $market->priority = -1; // not ready for trading - $market->txfee = $m->sell_fee_percent; - - //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); - $market->pricetime = time(); // $m->updated_time; - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } + $exchange = 'stocksexchange'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $list = stocksexchange_api_query('ticker'); + if (empty($list) || !is_array($list)) return; + foreach ($list as $m) + { + $e = explode('_', $m->market_name); + $symbol = strtoupper($e[0]); + $base = $e[1]; + if ($base != 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array( + ':sym' => $symbol + )); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); + if (!$market) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $market->disabled = ($m->bid == 0); + + $price2 = ((double)$m->ask + (double)$m->bid) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double)$m->bid); + $market->priority = - 1; // not ready for trading + $market->txfee = $m->sell_fee_percent; + + //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); + $market->pricetime = time(); // $m->updated_time; + $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } } function updateTradeSatoshiMarkets() { - $exchange = 'tradesatoshi'; - if (exchange_get($exchange, 'disabled')) return; - - $count = (int) dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); - if ($count == 0) return; - - $data = tradesatoshi_api_query('getmarketsummaries'); - if(!is_object($data) || !$data->success || !is_array($data->result)) return; - foreach($data->result as $m) - { - $e = explode('_', $m->market); - $symbol = strtoupper($e[0]); $base = $e[1]; - if($base != 'BTC') continue; - - $coin = getdbosql('db_coins', "symbol=:sym", array(':sym'=>$symbol)); - if(!$coin) continue; - - $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); - if(!$market) continue; - - $symbol = $coin->getOfficialSymbol(); - if (market_get($exchange, $symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $market->disabled = ($m->openBuyOrders == 0); - - $price2 = ((double)$m->ask + (double)$m->bid)/2; - $market->price2 = AverageIncrement($market->price2, $price2); - $market->price = AverageIncrement($market->price, (double)$m->bid); - $market->priority = -1; // not ready for trading - - //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); - $market->pricetime = time(); - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - $coin->save(); - } - } + $exchange = 'tradesatoshi'; + if (exchange_get($exchange, 'disabled')) return; + + $count = (int)dboscalar("SELECT count(id) FROM markets WHERE name LIKE '$exchange%'"); + if ($count == 0) return; + + $data = tradesatoshi_api_query('getmarketsummaries'); + if (!is_object($data) || !$data->success || !is_array($data->result)) return; + foreach ($data->result as $m) + { + $e = explode('_', $m->market); + $symbol = strtoupper($e[0]); + $base = $e[1]; + if ($base != 'BTC') continue; + + $coin = getdbosql('db_coins', "symbol=:sym", array( + ':sym' => $symbol + )); + if (!$coin) continue; + + $market = getdbosql('db_markets', "coinid={$coin->id} AND name='$exchange' AND IFNULL(base_coin,'') IN ('','BTC')"); + if (!$market) continue; + + $symbol = $coin->getOfficialSymbol(); + if (market_get($exchange, $symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $market->disabled = ($m->openBuyOrders == 0); + + $price2 = ((double)$m->ask + (double)$m->bid) / 2; + $market->price2 = AverageIncrement($market->price2, $price2); + $market->price = AverageIncrement($market->price, (double)$m->bid); + $market->priority = - 1; // not ready for trading + //debuglog("$exchange: $symbol price set to ".bitcoinvaluetoa($market->price)); + $market->pricetime = time(); + $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + $coin->save(); + } + } } // todo: store min/max txs limits function updateShapeShiftMarkets() { - $exchange = 'shapeshift'; - if (exchange_get($exchange, 'disabled')) return; - - $list = getdbolist('db_markets', "name LIKE '$exchange%'"); - if (empty($list)) return; - - $markets = shapeshift_api_query('marketinfo'); - if(!is_array($markets) || empty($markets)) return; - - foreach($list as $market) - { - $coin = getdbo('db_coins', $market->coinid); - if(!$coin) continue; - - if (market_get($exchange, $coin->symbol, "disabled")) { - $market->disabled = 1; - $market->message = 'disabled from settings'; - $market->save(); - continue; - } - - $symbol = $coin->getOfficialSymbol(); - $pair = strtoupper($symbol).'_BTC'; - if (!empty($market->base_coin)) - $pair = strtoupper($symbol).'_'.strtoupper($market->base_coin); - - foreach ($markets as $ticker) { - if ($ticker['pair'] != $pair) continue; - - $market->price = AverageIncrement($market->price, $ticker['rate']); - $market->price2 = AverageIncrement($market->price2, $ticker['rate']); - $market->txfee = $ticker['minerFee'] * 100; - $market->pricetime = time(); - $market->priority = -1; // not ready for trading - $market->save(); - - if (empty($coin->price2)) { - $coin->price = $market->price; - $coin->price2 = $market->price2; - //$coin->market = 'shapeshift'; - $coin->save(); - } - } - } + $exchange = 'shapeshift'; + if (exchange_get($exchange, 'disabled')) return; + + $list = getdbolist('db_markets', "name LIKE '$exchange%'"); + if (empty($list)) return; + + $markets = shapeshift_api_query('marketinfo'); + if (!is_array($markets) || empty($markets)) return; + + foreach ($list as $market) + { + $coin = getdbo('db_coins', $market->coinid); + if (!$coin) continue; + + if (market_get($exchange, $coin->symbol, "disabled")) + { + $market->disabled = 1; + $market->message = 'disabled from settings'; + $market->save(); + continue; + } + + $symbol = $coin->getOfficialSymbol(); + $pair = strtoupper($symbol) . '_BTC'; + if (!empty($market->base_coin)) $pair = strtoupper($symbol) . '_' . strtoupper($market->base_coin); + + foreach ($markets as $ticker) + { + if ($ticker['pair'] != $pair) continue; + + $market->price = AverageIncrement($market->price, $ticker['rate']); + $market->price2 = AverageIncrement($market->price2, $ticker['rate']); + $market->txfee = $ticker['minerFee'] * 100; + $market->pricetime = time(); + $market->priority = - 1; // not ready for trading + $market->save(); + + if (empty($coin->price2)) + { + $coin->price = $market->price; + $coin->price2 = $market->price2; + //$coin->market = 'shapeshift'; + $coin->save(); + } + } + } } // update other installed coins price from cryptonator function updateOtherMarkets() { - $coins = getdbolist('db_coins', "installed AND IFNULL(price,0.0) = 0.0"); - foreach($coins as $coin) - { - $symbol = $coin->getOfficialSymbol(); - if (market_get("cryptonator", $coin->symbol, "disabled")) { - continue; - } - - $json = @ file_get_contents("https://www.cryptonator.com/api/full/".strtolower($symbol)."-btc"); - $object = json_decode($json); - if (empty($object)) continue; - - if (is_object($object) && isset($object->ticker)) { - $ticker = $object->ticker; - if ($ticker->target == 'BTC' && $ticker->volume > 1) { - $coin->price2 = $ticker->price; - $coin->price = AverageIncrement((float)$coin->price, (float)$coin->price2); - if ($coin->save()) { - debuglog("cryptonator: $symbol price set to ".bitcoinvaluetoa($coin->price)); - } - } - } - } + $coins = getdbolist('db_coins', "installed AND IFNULL(price,0.0) = 0.0"); + foreach ($coins as $coin) + { + $symbol = $coin->getOfficialSymbol(); + if (market_get("cryptonator", $coin->symbol, "disabled")) + { + continue; + } + + $json = @file_get_contents("https://www.cryptonator.com/api/full/" . strtolower($symbol) . "-btc"); + $object = json_decode($json); + if (empty($object)) continue; + + if (is_object($object) && isset($object->ticker)) + { + $ticker = $object->ticker; + if ($ticker->target == 'BTC' && $ticker->volume > 1) + { + $coin->price2 = $ticker->price; + $coin->price = AverageIncrement((float)$coin->price, (float)$coin->price2); + if ($coin->save()) + { + debuglog("cryptonator: $symbol price set to " . bitcoinvaluetoa($coin->price)); + } + } + } + } } diff --git a/web/yaamp/core/backend/notify.php b/web/yaamp/core/backend/notify.php index 5e6e4d305..2695497ff 100644 --- a/web/yaamp/core/backend/notify.php +++ b/web/yaamp/core/backend/notify.php @@ -1,143 +1,148 @@ with('coin')->findAll( - "enabled AND lastchecked <= {$since} ". - " AND (nc.installed OR nc.enable OR nc.watch)" - ); - - foreach($notifications as $rule) - { - $coin = $rule->coin; - - $condw = explode(" ", $rule->conditiontype); - $field = $condw[0]; - if (count($condw) < 2) { - debuglog("notify: invalid conditiontype for {coin->symbol}, need at least one space like 'price >'"); - continue; - } - $comp = $condw[1]; - - $triggered = false; - if (array_key_exists($field, $rule->coin->attributes)) { - $value = $rule->coin->attributes[$field]; - $valref = $rule->conditionvalue; - switch ($comp) { - case '<': - $triggered = $value < $valref; - break; - case '>': - $triggered = $value > $valref; - break; - case '<=': - $triggered = $value <= $valref; - break; - case '>=': - $triggered = $value >= $valref; - break; - case '=': - case '==': - $triggered = $value == $valref; - break; - } - } else { - debuglog("notify: invalid field '{$field}' in conditiontype for {$coin->symbol}!"); - continue; - } - - if ($triggered && $rule->lasttriggered == $rule->lastchecked) { - // already notified - $rule->lasttriggered = $time; - $rule->lastchecked = $time; - $rule->save(); - continue; - } else { - $rule->lasttriggered = $triggered ? $time : 0; - $rule->lastchecked = $time; - $rule->save(); - } - - if (!$triggered) continue; - - $value = bitcoinvaluetoa($value); - debuglog("trigger: {$coin->symbol} {$rule->notifytype} {$rule->conditiontype} {$rule->conditionvalue} ({$value})"); - - switch ($rule->notifytype) - { - case 'email': - $subject = "[{$coin->symbol}] Trigger {$rule->conditiontype} {$rule->conditionvalue} ({$value})"; - - $message = "Description: {$rule->description}\n\n"; - - $message .= "Field: {$field}\n"; - $message .= "Value: {$value} at ".strftime("%Y-%m-%d %T %z", $time)."\n"; - - // replace some possible vars in message (description) - $message = str_replace('$X', $value, $message); - $message = str_replace('$F', $field, $message); - $message = str_replace('$T', $rule->conditiontype, $message); - $message = str_replace('$V', $rule->conditionvalue, $message); - $message = str_replace('$N', $coin->name, $message); - $message = str_replace('$SYM', $coin->symbol, $message); - $message = str_replace('$S2', $coin->symbol2, $message); - $message = str_replace('$A', $coin->master_wallet, $message); - - $dest = YAAMP_ADMIN_EMAIL; - if (!empty($rule->notifycmd) && strstr($rule->notifycmd, "@")) { - $dest = $rule->notifycmd; - } - - $res = mail($dest, $subject, $message); - if (!$res) - debuglog("notify: {$coin->symbol} unable to send mail to {$dest}!"); - break; - - case 'rpc': - - $command = $rule->notifycmd; - - // replace some possible vars in user command - $command = str_replace('$X', $value, $command); - $command = str_replace('$F', $field, $command); - $command = str_replace('$T', $rule->conditiontype, $command); - $command = str_replace('$V', $rule->conditionvalue, $command); - $command = str_replace('$N', $coin->name, $command); - $command = str_replace('$SYM', $coin->symbol, $command); - $command = str_replace('$S2', $coin->symbol2, $command); - $command = str_replace('$A', $coin->master_wallet, $command); - - $remote = new WalletRPC($coin); - - $res = $remote->execute($command); - if ($res === false) - debuglog("trigger: {$coin->symbol} rpc error '{$command}' {$remote->error}"); - else - debuglog("trigger: {$coin->symbol} rpc -> $res"); - break; - - case 'system': - - $command = $rule->notifycmd; - - // replace some possible vars in user command - $command = str_replace('$X', $value, $command); - $command = str_replace('$F', $field, $command); - $command = str_replace('$T', $rule->conditiontype, $command); - $command = str_replace('$V', $rule->conditionvalue, $command); - $command = str_replace('$N', $coin->name, $command); - $command = str_replace('$SYM', $coin->symbol, $command); - $command = str_replace('$S2', $coin->symbol2, $command); - $command = str_replace('$A', $coin->master_wallet, $command); - - $res = system($command); - if ($res === false) - debuglog("trigger: {$coin->symbol} unable to execute '{$command}'!"); - break; - } - } -} + $time = time(); + $since = $time - (10 * 60); // for later cmdline check, cron doesn't need that + $search = new db_notifications; + $notifications = $search->with('coin') + ->findAll("enabled AND lastchecked <= {$since} " . " AND (nc.installed OR nc.enable OR nc.watch)"); + + foreach ($notifications as $rule) + { + $coin = $rule->coin; + + $condw = explode(" ", $rule->conditiontype); + $field = $condw[0]; + if (count($condw) < 2) + { + debuglog("notify: invalid conditiontype for {coin->symbol}, need at least one space like 'price >'"); + continue; + } + $comp = $condw[1]; + + $triggered = false; + if (array_key_exists($field, $rule + ->coin + ->attributes)) + { + $value = $rule + ->coin + ->attributes[$field]; + $valref = $rule->conditionvalue; + switch ($comp) + { + case '<': + $triggered = $value < $valref; + break; + case '>': + $triggered = $value > $valref; + break; + case '<=': + $triggered = $value <= $valref; + break; + case '>=': + $triggered = $value >= $valref; + break; + case '=': + case '==': + $triggered = $value == $valref; + break; + } + } + else + { + debuglog("notify: invalid field '{$field}' in conditiontype for {$coin->symbol}!"); + continue; + } + + if ($triggered && $rule->lasttriggered == $rule->lastchecked) + { + // already notified + $rule->lasttriggered = $time; + $rule->lastchecked = $time; + $rule->save(); + continue; + } + else + { + $rule->lasttriggered = $triggered ? $time : 0; + $rule->lastchecked = $time; + $rule->save(); + } + + if (!$triggered) continue; + + $value = bitcoinvaluetoa($value); + debuglog("trigger: {$coin->symbol} {$rule->notifytype} {$rule->conditiontype} {$rule->conditionvalue} ({$value})"); + + switch ($rule->notifytype) + { + case 'email': + $subject = "[{$coin->symbol}] Trigger {$rule->conditiontype} {$rule->conditionvalue} ({$value})"; + + $message = "Description: {$rule->description}\n\n"; + + $message .= "Field: {$field}\n"; + $message .= "Value: {$value} at " . strftime("%Y-%m-%d %T %z", $time) . "\n"; + + // replace some possible vars in message (description) + $message = str_replace('$X', $value, $message); + $message = str_replace('$F', $field, $message); + $message = str_replace('$T', $rule->conditiontype, $message); + $message = str_replace('$V', $rule->conditionvalue, $message); + $message = str_replace('$N', $coin->name, $message); + $message = str_replace('$SYM', $coin->symbol, $message); + $message = str_replace('$S2', $coin->symbol2, $message); + $message = str_replace('$A', $coin->master_wallet, $message); + + $dest = YAAMP_ADMIN_EMAIL; + if (!empty($rule->notifycmd) && strstr($rule->notifycmd, "@")) + { + $dest = $rule->notifycmd; + } + + $res = mail($dest, $subject, $message); + if (!$res) debuglog("notify: {$coin->symbol} unable to send mail to {$dest}!"); + break; + + case 'rpc': + + $command = $rule->notifycmd; + + // replace some possible vars in user command + $command = str_replace('$X', $value, $command); + $command = str_replace('$F', $field, $command); + $command = str_replace('$T', $rule->conditiontype, $command); + $command = str_replace('$V', $rule->conditionvalue, $command); + $command = str_replace('$N', $coin->name, $command); + $command = str_replace('$SYM', $coin->symbol, $command); + $command = str_replace('$S2', $coin->symbol2, $command); + $command = str_replace('$A', $coin->master_wallet, $command); + + $remote = new WalletRPC($coin); + + $res = $remote->execute($command); + if ($res === false) debuglog("trigger: {$coin->symbol} rpc error '{$command}' {$remote->error}"); + else debuglog("trigger: {$coin->symbol} rpc -> $res"); + break; + + case 'system': + + $command = $rule->notifycmd; + + // replace some possible vars in user command + $command = str_replace('$X', $value, $command); + $command = str_replace('$F', $field, $command); + $command = str_replace('$T', $rule->conditiontype, $command); + $command = str_replace('$V', $rule->conditionvalue, $command); + $command = str_replace('$N', $coin->name, $command); + $command = str_replace('$SYM', $coin->symbol, $command); + $command = str_replace('$S2', $coin->symbol2, $command); + $command = str_replace('$A', $coin->master_wallet, $command); + + $res = system($command); + if ($res === false) debuglog("trigger: {$coin->symbol} unable to execute '{$command}'!"); + break; + } + } + } diff --git a/web/yaamp/core/backend/payment.php b/web/yaamp/core/backend/payment.php index 34ea90a62..2598bd6b3 100644 --- a/web/yaamp/core/backend/payment.php +++ b/web/yaamp/core/backend/payment.php @@ -2,337 +2,328 @@ function BackendPayments() { - // attempt to increase max execution time limit for the cron job - set_time_limit(300); + // attempt to increase max execution time limit for the cron job + set_time_limit(300); - $list = getdbolist('db_coins', "enable and id in (select distinct coinid from accounts)"); - foreach($list as $coin) - BackendCoinPayments($coin); + $list = getdbolist('db_coins', "enable and id in (select distinct coinid from accounts)"); + foreach ($list as $coin) + BackendCoinPayments($coin); - dborun("update accounts set balance=0 where coinid=0"); + dborun("update accounts set balance=0 where coinid=0"); } function BackendUserCancelFailedPayment($userid) { - $user = getdbo('db_accounts', intval($userid)); - if(!$user) return false; - - $amount_failed = 0.0; - $failed = getdbolist('db_payouts', "account_id=:uid AND IFNULL(tx,'') = ''", array(':uid'=>$user->id)); - if (!empty($failed)) { - foreach ($failed as $payout) { - $amount_failed += floatval($payout->amount); - $payout->delete(); - } - $user->balance += $amount_failed; - $user->save(); - return $amount_failed; - } - - return 0.0; + $user = getdbo('db_accounts', intval($userid)); + if (!$user) + return false; + + $amount_failed = 0.0; + $failed = getdbolist('db_payouts', "account_id=:uid AND IFNULL(tx,'') = ''", array( + ':uid' => $user->id + )); + if (!empty($failed)) { + foreach ($failed as $payout) { + $amount_failed += floatval($payout->amount); + $payout->delete(); + } + $user->balance += $amount_failed; + $user->save(); + return $amount_failed; + } + + return 0.0; } function BackendCoinPayments($coin) { -// debuglog("BackendCoinPayments $coin->symbol"); - $remote = new WalletRPC($coin); - - $info = $remote->getinfo(); - if(!$info) { - debuglog("payment: can't connect to {$coin->symbol} wallet"); - return; - } - - $txfee = floatval($coin->txfee); - $min_payout = max(floatval(YAAMP_PAYMENTS_MINI), floatval($coin->payout_min), $txfee); - - if(date("w", time()) == 0 && date("H", time()) > 18) { // sunday evening, minimum reduced - $min_payout = max($min_payout/10, $txfee); - if($coin->symbol == 'DCR') $min_payout = 0.01005; - } - - $users = getdbolist('db_accounts', "balance>$min_payout AND coinid={$coin->id} ORDER BY balance DESC"); - - // todo: enhance/detect payout_max from normal sendmany error - if($coin->symbol == 'BOD' || $coin->symbol == 'DIME' || $coin->symbol == 'BTCRY' || !empty($coin->payout_max)) - { - foreach($users as $user) - { - $user = getdbo('db_accounts', $user->id); - if(!$user) continue; - - $amount = $user->balance; - while($user->balance > $min_payout && $amount > $min_payout) - { - debuglog("$coin->symbol sendtoaddress $user->username $amount"); - if($coin->symbol == 'MBC') - $tx = $remote->sendtoaddress($user->username, round($amount, 4)); - else - $tx = $remote->sendtoaddress($user->username, round($amount, 8)); - if(!$tx) - { - $error = $remote->error; - debuglog("RPC $error, {$user->username}, $amount"); - if (stripos($error,'transaction too large') !== false || stripos($error,'invalid amount') !== false - || stripos($error,'insufficient funds') !== false || stripos($error,'transaction creation failed') !== false - ) { - $coin->payout_max = min((double) $amount, (double) $coin->payout_max); - $coin->save(); - $amount /= 2; - continue; - } - break; - } - - $payout = new db_payouts; - $payout->account_id = $user->id; - $payout->time = time(); - $payout->amount = bitcoinvaluetoa($amount); - $payout->fee = 0; - $payout->tx = $tx; - $payout->idcoin = $coin->id; - $payout->save(); - - $user->balance -= $amount; - $user->save(); - } - } - - debuglog("payment done"); - return; - } - - $total_to_pay = 0; - $addresses = array(); - - - if($coin->symbol == 'MBC') - foreach($users as $user) - { - $total_to_pay -= round($user->balance, 4); - $addresses[$user->username] = round($user->balance, 4); - } - else - foreach($users as $user) - { - $total_to_pay += round($user->balance, 8); - $addresses[$user->username] = round($user->balance, 8); - // transaction xxx has too many sigops: 1035 > 1000 - if ($coin->symbol == 'DCR' && count($addresses) > 990) { - debuglog("payment: more than 990 {$coin->symbol} users to pay, limit to top balances..."); - break; - } - } - - if(!$total_to_pay) - { - // debuglog("nothing to pay"); - return; - } - - $coef = 1.0; - if($info['balance']-$txfee < $total_to_pay && $coin->symbol!='BTC') - { - $msg = "$coin->symbol: insufficient funds for payment {$info['balance']} < $total_to_pay!"; - debuglog($msg); - send_email_alert('payouts', "$coin->symbol payout problem detected", $msg); - - $coef = 0.5; // so pay half for now... - $total_to_pay = $total_to_pay * $coef; - foreach ($addresses as $key => $val) { - $addresses[$key] = $val * $coef; - } - // still not possible, skip payment - if ($info['balance']-$txfee < $total_to_pay) - return; - } - - if($coin->symbol=='BTC') - { - global $cold_wallet_table; - - $balance = $info['balance']; - $stats = getdbosql('db_stats', "1 order by time desc"); - - $renter = dboscalar("select sum(balance) from renters"); - $pie = $balance - $total_to_pay - $renter - 1; - - debuglog("pie to split is $pie"); - if($pie>0) - { - foreach($cold_wallet_table as $coldwallet=>$percent) - { - $coldamount = round($pie * $percent, 8); - if($coldamount < $min_payout) break; - - debuglog("paying cold wallet $coldwallet $coldamount"); - - $addresses[$coldwallet] = $coldamount; - $total_to_pay += $coldamount; - } - } - } - - debuglog("paying $total_to_pay {$coin->symbol}"); - - $payouts = array(); - foreach($users as $user) - { - $user = getdbo('db_accounts', $user->id); - if(!$user) continue; - if(!isset($addresses[$user->username])) continue; - - $payment_amount = bitcoinvaluetoa($addresses[$user->username]); - - $payout = new db_payouts; - $payout->account_id = $user->id; - $payout->time = time(); - $payout->amount = $payment_amount; - $payout->fee = 0; - $payout->idcoin = $coin->id; - - if ($payout->save()) { - $payouts[$payout->id] = $user->id; - - $user->balance = bitcoinvaluetoa(floatval($user->balance) - $payment_amount); - $user->save(); - } - } - - // sometimes the wallet take too much time to answer, so use tx field to double check - set_time_limit(120); - - // default account - $account = $coin->account; - - if (!$coin->txmessage) - $tx = $remote->sendmany($account, $addresses); - else - $tx = $remote->sendmany($account, $addresses, 1, YAAMP_SITE_NAME); - - $errmsg = NULL; - if(!$tx) { - debuglog("sendmany: unable to send $total_to_pay {$remote->error} ".json_encode($addresses)); - $errmsg = $remote->error; - } - else if(!is_string($tx)) { - debuglog("sendmany: result is not a string tx=".json_encode($tx)); - $errmsg = json_encode($tx); - } - - // save processed payouts (tx) - foreach($payouts as $id => $uid) { - $payout = getdbo('db_payouts', $id); - if ($payout && $payout->id == $id) { - $payout->errmsg = $errmsg; - if (empty($errmsg)) { - $payout->tx = $tx; - $payout->completed = 1; - } - $payout->save(); - } else { - debuglog("payout $id for $uid not found!"); - } - } - - if (!empty($errmsg)) { - return; - } - - debuglog("{$coin->symbol} payment done"); - - sleep(2); - - // Search for previous payouts not executed (no tx) - $addresses = array(); $payouts = array(); - $mailmsg = ''; $mailwarn = ''; - foreach($users as $user) - { - $amount_failed = 0.0; - $failed = getdbolist('db_payouts', "account_id=:uid AND IFNULL(tx,'') = '' ORDER BY time", array(':uid'=>$user->id)); - if (!empty($failed)) { - if ($coin->symbol == 'CHC') { - // tx made but payment rpc timed out - foreach ($failed as $payout) $amount_failed += floatval($payout->amount); - $notice = "payment: Found buggy payout without tx for {$user->username}!! $amount_failed {$coin->symbol}"; - debuglog($notice); - $mailwarn .= "$notice\r\n"; - continue; - } - foreach ($failed as $payout) { - $amount_failed += floatval($payout->amount); - $payout->delete(); - } - if ($amount_failed > 0.0) { - debuglog("Found failed payment(s) for {$user->username}, $amount_failed {$coin->symbol}!"); - if ($coin->rpcencoding == 'DCR') { - $data = $remote->validateaddress($user->username); - if (!$data['isvalid']) { - debuglog("Found bad address {$user->username}!! ($amount_failed {$coin->symbol})"); - $user->is_locked = 1; - $user->save(); - continue; - } - } - $payout = new db_payouts; - $payout->account_id = $user->id; - $payout->time = time(); - $payout->amount = $amount_failed; - $payout->fee = 0; - $payout->idcoin = $coin->id; - if ($payout->save() && $amount_failed > $min_payout) { - $payouts[$payout->id] = $user->id; - $addresses[$user->username] = $amount_failed; - $mailmsg .= "{$amount_failed} {$coin->symbol} to {$user->username} - user id {$user->id}\n"; - } - } - } - } - - if (!empty($mailwarn)) { - send_email_alert('payouts', "{$coin->symbol} payout tx problems to check", - "$mailwarn\r\nCheck your wallet recent transactions to know if the payment was made, the RPC call timed out." - ); - } - - // redo failed payouts - if (!empty($addresses)) - { - if (!$coin->txmessage) - $tx = $remote->sendmany($account, $addresses); - else - $tx = $remote->sendmany($account, $addresses, 1, YAAMP_SITE_NAME." retry"); - - if(empty($tx)) { - debuglog($remote->error); - - foreach ($payouts as $id => $uid) { - $payout = getdbo('db_payouts', $id); - if ($payout && $payout->id == $id) { - $payout->errmsg = $remote->error; - $payout->save(); - } - } - - send_email_alert('payouts', "{$coin->symbol} payout problems detected\n {$remote->error}", $mailmsg); - - } else { - - foreach ($payouts as $id => $uid) { - $payout = getdbo('db_payouts', $id); - if ($payout && $payout->id == $id) { - $payout->tx = $tx; - $payout->save(); - } else { - debuglog("payout retry $id for $uid not found!"); - } - } - - $mailmsg .= "\ntxid $tx\n"; - send_email_alert('payouts', "{$coin->symbol} payout problems resolved", $mailmsg); - } - } + // debuglog("BackendCoinPayments $coin->symbol"); + $remote = new WalletRPC($coin); + + $info = $remote->getinfo(); + if (!$info) { + debuglog("payment: can't connect to {$coin->symbol} wallet"); + return; + } + + $txfee = floatval($coin->txfee); + $min_payout = max(floatval(YAAMP_PAYMENTS_MINI), floatval($coin->payout_min), $txfee); + + if (date("w", time()) == 0 && date("H", time()) > 18) { // sunday evening, minimum reduced + $min_payout = max($min_payout / 10, $txfee); + if ($coin->symbol == 'DCR') + $min_payout = 0.01005; + } + + $users = getdbolist('db_accounts', "balance>$min_payout AND coinid={$coin->id} ORDER BY balance DESC"); + + // todo: enhance/detect payout_max from normal sendmany error + if ($coin->symbol == 'BOD' || $coin->symbol == 'DIME' || $coin->symbol == 'BTCRY' || !empty($coin->payout_max)) { + foreach ($users as $user) { + $user = getdbo('db_accounts', $user->id); + if (!$user) + continue; + + $amount = $user->balance; + while ($user->balance > $min_payout && $amount > $min_payout) { + debuglog("$coin->symbol sendtoaddress $user->username $amount"); + if ($coin->symbol == 'MBC') + $tx = $remote->sendtoaddress($user->username, round($amount, 4)); + else + $tx = $remote->sendtoaddress($user->username, round($amount, 6)); + if (!$tx) { + $error = $remote->error; + debuglog("RPC $error, {$user->username}, $amount"); + if (stripos($error, 'transaction too large') !== false || stripos($error, 'invalid amount') !== false || stripos($error, 'insufficient funds') !== false || stripos($error, 'transaction creation failed') !== false) { + $coin->payout_max = min((double) $amount, (double) $coin->payout_max); + $coin->save(); + $amount /= 2; + continue; + } + break; + } + + $payout = new db_payouts; + $payout->account_id = $user->id; + $payout->time = time(); + $payout->amount = bitcoinvaluetoa($amount); + $payout->fee = 0; + $payout->tx = $tx; + $payout->idcoin = $coin->id; + $payout->save(); + + $user->balance -= $amount; + $user->save(); + } + } + + debuglog("payment done"); + return; + } + + $total_to_pay = 0; + $addresses = array(); + + + if ($coin->symbol == 'MBC') + foreach ($users as $user) { + $total_to_pay -= round($user->balance, 4); + $addresses[$user->username] = round($user->balance, 4); + } else + foreach ($users as $user) { + $total_to_pay += round($user->balance, 6); + $addresses[$user->username] = round($user->balance, 6); + // transaction xxx has too many sigops: 1035 > 1000 + if ($coin->symbol == 'DCR' && count($addresses) > 990) { + debuglog("payment: more than 990 {$coin->symbol} users to pay, limit to top balances..."); + break; + } + } + + if (!$total_to_pay) { + // debuglog("nothing to pay"); + return; + } + + $coef = 1.0; + if ($info['balance'] - $txfee < $total_to_pay && $coin->symbol != 'BTC') { + $msg = "$coin->symbol: insufficient funds for payment {$info['balance']} < $total_to_pay!"; + debuglog($msg); + send_email_alert('payouts', "$coin->symbol payout problem detected", $msg); + + $coef = 0.5; // so pay half for now... + $total_to_pay = $total_to_pay * $coef; + foreach ($addresses as $key => $val) { + $addresses[$key] = $val * $coef; + } + // still not possible, skip payment + if ($info['balance'] - $txfee < $total_to_pay) + return; + } + + if ($coin->symbol == 'BTC') { + global $cold_wallet_table; + + $balance = $info['balance']; + $stats = getdbosql('db_stats', "1 order by time desc"); + + $renter = dboscalar("select sum(balance) from renters"); + $pie = $balance - $total_to_pay - $renter - 1; + + debuglog("pie to split is $pie"); + if ($pie > 0) { + foreach ($cold_wallet_table as $coldwallet => $percent) { + $coldamount = round($pie * $percent, 6); + if ($coldamount < $min_payout) + break; + + debuglog("paying cold wallet $coldwallet $coldamount"); + + $addresses[$coldwallet] = $coldamount; + $total_to_pay += $coldamount; + } + } + } + + debuglog("paying $total_to_pay {$coin->symbol}"); + + $payouts = array(); + foreach ($users as $user) { + $user = getdbo('db_accounts', $user->id); + if (!$user) + continue; + if (!isset($addresses[$user->username])) + continue; + + $payment_amount = bitcoinvaluetoa($addresses[$user->username]); + + $payout = new db_payouts; + $payout->account_id = $user->id; + $payout->time = time(); + $payout->amount = $payment_amount; + $payout->fee = 0; + $payout->idcoin = $coin->id; + + if ($payout->save()) { + $payouts[$payout->id] = $user->id; + + $user->balance = bitcoinvaluetoa(floatval($user->balance) - $payment_amount); + $user->save(); + } + } + + // sometimes the wallet take too much time to answer, so use tx field to double check + set_time_limit(120); + + // default account + $account = $coin->account; + + if (!$coin->txmessage) + $tx = $remote->sendmany($account, $addresses); + else + $tx = $remote->sendmany($account, $addresses, 1, YAAMP_SITE_NAME); + + $errmsg = NULL; + if (!$tx) { + debuglog("sendmany: unable to send $total_to_pay {$remote->error} " . json_encode($addresses)); + $errmsg = $remote->error; + } else if (!is_string($tx)) { + debuglog("sendmany: result is not a string tx=" . json_encode($tx)); + $errmsg = json_encode($tx); + } + + // save processed payouts (tx) + foreach ($payouts as $id => $uid) { + $payout = getdbo('db_payouts', $id); + if ($payout && $payout->id == $id) { + $payout->errmsg = $errmsg; + if (empty($errmsg)) { + $payout->tx = $tx; + $payout->completed = 1; + } + $payout->save(); + } else { + debuglog("payout $id for $uid not found!"); + } + } + + if (!empty($errmsg)) { + return; + } + + debuglog("{$coin->symbol} payment done"); + + sleep(2); + + // Search for previous payouts not executed (no tx) + $addresses = array(); + $payouts = array(); + $mailmsg = ''; + $mailwarn = ''; + foreach ($users as $user) { + $amount_failed = 0.0; + $failed = getdbolist('db_payouts', "account_id=:uid AND IFNULL(tx,'') = '' ORDER BY time", array( + ':uid' => $user->id + )); + if (!empty($failed)) { + if ($coin->symbol == 'CHC') { + // tx made but payment rpc timed out + foreach ($failed as $payout) + $amount_failed += floatval($payout->amount); + $notice = "payment: Found buggy payout without tx for {$user->username}!! $amount_failed {$coin->symbol}"; + debuglog($notice); + $mailwarn .= "$notice\r\n"; + continue; + } + foreach ($failed as $payout) { + $amount_failed += floatval($payout->amount); + $payout->delete(); + } + if ($amount_failed > 0.0) { + debuglog("Found failed payment(s) for {$user->username}, $amount_failed {$coin->symbol}!"); + if ($coin->rpcencoding == 'DCR') { + $data = $remote->validateaddress($user->username); + if (!$data['isvalid']) { + debuglog("Found bad address {$user->username}!! ($amount_failed {$coin->symbol})"); + $user->is_locked = 1; + $user->save(); + continue; + } + } + $payout = new db_payouts; + $payout->account_id = $user->id; + $payout->time = time(); + $payout->amount = $amount_failed; + $payout->fee = 0; + $payout->idcoin = $coin->id; + if ($payout->save() && $amount_failed > $min_payout) { + $payouts[$payout->id] = $user->id; + $addresses[$user->username] = $amount_failed; + $mailmsg .= "{$amount_failed} {$coin->symbol} to {$user->username} - user id {$user->id}\n"; + } + } + } + } + + if (!empty($mailwarn)) { + send_email_alert('payouts', "{$coin->symbol} payout tx problems to check", "$mailwarn\r\nCheck your wallet recent transactions to know if the payment was made, the RPC call timed out."); + } + + // redo failed payouts + if (!empty($addresses)) { + if (!$coin->txmessage) + $tx = $remote->sendmany($account, $addresses); + else + $tx = $remote->sendmany($account, $addresses, 1, YAAMP_SITE_NAME . " retry"); + + if (empty($tx)) { + debuglog($remote->error); + + foreach ($payouts as $id => $uid) { + $payout = getdbo('db_payouts', $id); + if ($payout && $payout->id == $id) { + $payout->errmsg = $remote->error; + $payout->save(); + } + } + + send_email_alert('payouts', "{$coin->symbol} payout problems detected\n {$remote->error}", $mailmsg); + + } else { + + foreach ($payouts as $id => $uid) { + $payout = getdbo('db_payouts', $id); + if ($payout && $payout->id == $id) { + $payout->tx = $tx; + $payout->save(); + } else { + debuglog("payout retry $id for $uid not found!"); + } + } + + $mailmsg .= "\ntxid $tx\n"; + send_email_alert('payouts', "{$coin->symbol} payout problems resolved", $mailmsg); + } + } } - - diff --git a/web/yaamp/core/backend/rawcoins.php b/web/yaamp/core/backend/rawcoins.php index 34d976831..a8c62dd8f 100644 --- a/web/yaamp/core/backend/rawcoins.php +++ b/web/yaamp/core/backend/rawcoins.php @@ -5,503 +5,515 @@ */ function updateRawcoins() { -// debuglog(__FUNCTION__); - - exchange_set_default('alcurex', 'disabled', true); - exchange_set_default('binance', 'disabled', true); - exchange_set_default('empoex', 'disabled', true); - exchange_set_default('coinbene', 'disabled', true); - exchange_set_default('coinexchange', 'disabled', true); - exchange_set_default('coinsmarkets', 'disabled', true); - exchange_set_default('escodex', 'disabled', true); - exchange_set_default('gateio', 'disabled', true); - exchange_set_default('jubi', 'disabled', true); - exchange_set_default('nova', 'disabled', true); - exchange_set_default('stocksexchange', 'disabled', true); - exchange_set_default('tradesatoshi', 'disabled', true); - - settings_prefetch_all(); - - if (!exchange_get('bittrex', 'disabled')) { - $list = bittrex_api_query('public/getcurrencies'); - if(isset($list->result) && !empty($list->result)) - { - dborun("UPDATE markets SET deleted=true WHERE name='bittrex'"); - foreach($list->result as $currency) { - if ($currency->Currency == 'BTC') { - exchange_set('bittrex', 'withdraw_fee_btc', $currency->TxFee); - continue; - } - updateRawCoin('bittrex', $currency->Currency, $currency->CurrencyLong); - } - } - } - - if (!exchange_get('bitz', 'disabled')) { - $list = bitz_api_query('tickerall'); - if (!empty($list)) { - dborun("UPDATE markets SET deleted=true WHERE name='bitz'"); - foreach($list as $c => $ticker) { - $e = explode('_', $c); - if (strtoupper($e[1]) !== 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('bitz', $symbol); - } - } - } - - if (!exchange_get('bleutrade', 'disabled')) { - $list = bleutrade_api_query('public/getcurrencies'); - if(isset($list->result) && !empty($list->result)) - { - dborun("UPDATE markets SET deleted=true WHERE name='bleutrade'"); - foreach($list->result as $currency) { - if ($currency->Currency == 'BTC') { - exchange_set('bleutrade', 'withdraw_fee_btc', $currency->TxFee); - continue; - } - updateRawCoin('bleutrade', $currency->Currency, $currency->CurrencyLong); - } - } - } - - if (!exchange_get('coinbene', 'disabled')) { - $data = coinbene_api_query('market/symbol'); - $list = objSafeVal($data, 'symbol'); - if(is_array($list) && !empty($list)) { - dborun("UPDATE markets SET deleted=true WHERE name='coinbene'"); - foreach($list as $ticker) { - if ($ticker->quoteAsset != 'BTC') continue; - $symbol = $ticker->baseAsset; - updateRawCoin('coinbene', $symbol); - } - } - } - - if (!exchange_get('crex24', 'disabled')) { - $list = crex24_api_query('currencies'); - if(is_array($list) && !empty($list)) { - dborun("UPDATE markets SET deleted=true WHERE name='crex24'"); - foreach ($list as $currency) { - $symbol = objSafeVal($currency, 'symbol'); - $name = objSafeVal($currency, 'name'); - if ($currency->isFiat || $currency->isDelisted) continue; - updateRawCoin('crex24', $symbol, $name); - } - } - } - - if (!exchange_get('poloniex', 'disabled')) { - $poloniex = new poloniex; - $tickers = $poloniex->get_currencies(); - if (!$tickers) - $tickers = array(); - else - dborun("UPDATE markets SET deleted=true WHERE name='poloniex'"); - foreach($tickers as $symbol=>$ticker) - { - if(arraySafeVal($ticker,'disabled')) continue; - if(arraySafeVal($ticker,'delisted')) continue; - updateRawCoin('poloniex', $symbol); - } - } - - if (!exchange_get('c-cex', 'disabled')) { - $ccex = new CcexAPI; - $list = $ccex->getPairs(); - if($list) - { - sleep(1); - $names = $ccex->getCoinNames(); - - dborun("UPDATE markets SET deleted=true WHERE name='c-cex'"); - foreach($list as $item) - { - $e = explode('-', $item); - $symbol = strtoupper($e[0]); - - updateRawCoin('c-cex', $symbol, arraySafeVal($names, $e[0], 'unknown')); - } - } - } - - if (!exchange_get('yobit', 'disabled')) { - $res = yobit_api_query('info'); - if($res) - { - dborun("UPDATE markets SET deleted=true WHERE name='yobit'"); - foreach($res->pairs as $i=>$item) - { - $e = explode('_', $i); - $symbol = strtoupper($e[0]); - updateRawCoin('yobit', $symbol); - } - } - } - - if (!exchange_get('coinexchange', 'disabled')) { - $list = coinexchange_api_query('getmarkets'); - if(isset($list->result) && !empty($list->result)) - { - dborun("UPDATE markets SET deleted=true WHERE name='coinexchange'"); - foreach($list->result as $item) { - if ($item->BaseCurrencyCode != 'BTC') - continue; - $symbol = $item->MarketAssetCode; - $label = objSafeVal($item, 'MarketAssetName'); - updateRawCoin('coinexchange', $symbol, $label); - } - } - } - - if (!exchange_get('coinsmarkets', 'disabled')) { - $list = coinsmarkets_api_query('apicoin'); - if(!empty($list) && is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='coinsmarkets'"); - foreach($list as $pair=>$data) { - $e = explode('_', $pair); - if ($e[0] != 'BTC') continue; - $symbol = strtoupper($e[1]); - updateRawCoin('coinsmarkets', $symbol); - } - } - } - - if (!exchange_get('cryptopia', 'disabled')) { - $list = cryptopia_api_query('GetMarkets'); - if(isset($list->Data)) - { - dborun("UPDATE markets SET deleted=true WHERE name='cryptopia'"); - foreach($list->Data as $item) { - $e = explode('/', $item->Label); - if (strtoupper($e[1]) !== 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('cryptopia', $symbol); - } - } - } - - if (!exchange_get('cryptobridge', 'disabled')) { - $list = cryptobridge_api_query('ticker'); - if(is_array($list) && !empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='cryptobridge'"); - foreach($list as $ticker) { - $e = explode('_', $ticker->id); - if (strtoupper($e[1]) !== 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('cryptobridge', $symbol); - } - } - } - - if (!exchange_get('escodex', 'disabled')) { - $list = escodex_api_query('ticker'); - if(is_array($list) && !empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='escodex'"); - foreach($list as $ticker) { - #debuglog (json_encode($ticker)); - if (strtoupper($ticker->base) !== 'BTC') - continue; - $symbol = strtoupper($ticker->quote); - updateRawCoin('escodex', $symbol); - } - } - } - - if (!exchange_get('hitbtc', 'disabled')) { - $list = hitbtc_api_query('symbols'); - if(is_object($list) && isset($list->symbols) && is_array($list->symbols)) - { - dborun("UPDATE markets SET deleted=true WHERE name='hitbtc'"); - foreach($list->symbols as $data) { - $base = strtoupper($data->currency); - if ($base != 'BTC') continue; - $symbol = strtoupper($data->commodity); - updateRawCoin('hitbtc', $symbol); - } - } - } - - if (!exchange_get('kraken', 'disabled')) { - $list = kraken_api_query('AssetPairs'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='kraken'"); - foreach($list as $pair => $item) { - $pairs = explode('-', $pair); - $base = reset($pairs); $symbol = end($pairs); - if($symbol == 'BTC' || $base != 'BTC') continue; - if(in_array($symbol, array('GBP','CAD','EUR','USD','JPY'))) continue; - if(strpos($symbol,'.d') !== false) continue; - $symbol = strtoupper($symbol); - updateRawCoin('kraken', $symbol); - } - } - } - - if (!exchange_get('alcurex', 'disabled')) { - $list = alcurex_api_query('market','?info=on'); - if(is_object($list) && isset($list->MARKETS)) - { - dborun("UPDATE markets SET deleted=true WHERE name='alcurex'"); - foreach($list->MARKETS as $item) { - $e = explode('_', $item->Pair); - $symbol = strtoupper($e[0]); - updateRawCoin('alcurex', $symbol); - } - } - } - - if (!exchange_get('binance', 'disabled')) { - $list = binance_api_query('ticker/allBookTickers'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='binance'"); - foreach($list as $ticker) { - $base = substr($ticker->symbol, -3, 3); - // XXXBTC XXXETH BTCUSDT (no separator!) - if ($base != 'BTC') continue; - $symbol = substr($ticker->symbol, 0, strlen($ticker->symbol)-3); - updateRawCoin('binance', $symbol); - } - } - } - - if (!exchange_get('gateio', 'disabled')) { - $json = gateio_api_query('marketlist'); - $list = arraySafeVal($json,'data'); - if(!empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='gateio'"); - foreach($list as $item) { - if ($item['curr_b'] != 'BTC') - continue; - $symbol = trim(strtoupper($item['symbol'])); - $name = trim($item['name']); - updateRawCoin('gateio', $symbol, $name); - } - } - } - - if (!exchange_get('nova', 'disabled')) { - $list = nova_api_query('markets'); - if(is_object($list) && !empty($list->markets)) - { - dborun("UPDATE markets SET deleted=true WHERE name='nova'"); - foreach($list->markets as $item) { - if ($item->basecurrency != 'BTC') - continue; - $symbol = strtoupper($item->currency); - updateRawCoin('nova', $symbol); - //debuglog("nova: $symbol"); - } - } - } - - if (!exchange_get('stocksexchange', 'disabled')) { - $list = stocksexchange_api_query('markets'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='stocksexchange'"); - foreach($list as $item) { - if ($item->partner != 'BTC') - continue; - if ($item->active == false) - continue; - $symbol = strtoupper($item->currency); - $name = trim($item->currency_long); - updateRawCoin('stocksexchange', $symbol, $name); - } - } - } - - if (!exchange_get('empoex', 'disabled')) { - $list = empoex_api_query('marketinfo'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='empoex'"); - foreach($list as $item) { - $e = explode('-', $item->pairname); - $base = strtoupper($e[1]); - if ($base != 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('empoex', $symbol); - } - } - } - - if (!exchange_get('kucoin', 'disabled')) { - $list = kucoin_api_query('currencies'); - if(kucoin_result_valid($list) && !empty($list->data)) - { - dborun("UPDATE markets SET deleted=true WHERE name='kucoin'"); - foreach($list->data as $item) { - $symbol = $item->name; - $name = $item->fullName; - updateRawCoin('kucoin', $symbol, $name); - } - } - } - - if (!exchange_get('livecoin', 'disabled')) { - $list = livecoin_api_query('exchange/ticker'); - if(is_array($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='livecoin'"); - foreach($list as $item) { - $e = explode('/', $item->symbol); - $base = strtoupper($e[1]); - if ($base != 'BTC') - continue; - $symbol = strtoupper($e[0]); - updateRawCoin('livecoin', $symbol); - } - } - } - - if (!exchange_get('shapeshift', 'disabled')) { - $list = shapeshift_api_query('getcoins'); - if(is_array($list) && !empty($list)) - { - dborun("UPDATE markets SET deleted=true WHERE name='shapeshift'"); - foreach($list as $item) { - $status = $item['status']; - if ($status != 'available') continue; - $symbol = strtoupper($item['symbol']); - $name = trim($item['name']); - updateRawCoin('shapeshift', $symbol, $name); - //debuglog("shapeshift: $symbol $name"); - } - } - } - - if (!exchange_get('tradesatoshi', 'disabled')) { - $data = tradesatoshi_api_query('getcurrencies'); - if(is_object($data) && !empty($data->result)) - { - dborun("UPDATE markets SET deleted=true WHERE name='tradesatoshi'"); - foreach($data->result as $item) { - $symbol = $item->currency; - $name = trim($item->currencyLong); - updateRawCoin('tradesatoshi', $symbol, $name); - } - } - } - - ////////////////////////////////////////////////////////// - - $markets = dbocolumn("SELECT DISTINCT name FROM markets"); - foreach ($markets as $exchange) { - if (exchange_get($exchange, 'disabled')) { - $res = dborun("UPDATE markets SET disabled=8 WHERE name='$exchange'"); - if(!$res) continue; - $coins = getdbolist('db_coins', "id IN (SELECT coinid FROM markets WHERE name='$exchange')"); - foreach($coins as $coin) { - // allow to track a single market on a disabled exchange (dev test) - if (market_get($exchange, $coin->getOfficialSymbol(), 'disabled', 1) == 0) { - $res -= dborun("UPDATE markets SET disabled=0 WHERE name='$exchange' AND coinid={$coin->id}"); - } - } - debuglog("$exchange: $res markets disabled from db settings"); - } else { - $res = dborun("UPDATE markets SET disabled=0 WHERE name='$exchange' AND disabled=8"); - if($res) debuglog("$exchange: $res markets re-enabled from db settings"); - } - } - - dborun("DELETE FROM markets WHERE deleted"); - - $list = getdbolist('db_coins', "not enable and not installed and id not in (select distinct coinid from markets)"); - foreach($list as $coin) - { - if ($coin->visible) - debuglog("{$coin->symbol} is no longer active"); - // todo: proper cleanup in all tables (like "yiimp coin SYM delete") - // if ($coin->symbol != 'BTC') - // $coin->delete(); - } + // debuglog(__FUNCTION__); + + exchange_set_default('alcurex', 'disabled', true); + exchange_set_default('binance', 'disabled', true); + exchange_set_default('empoex', 'disabled', true); + exchange_set_default('coinbene', 'disabled', true); + exchange_set_default('coinexchange', 'disabled', true); + exchange_set_default('coinsmarkets', 'disabled', true); + exchange_set_default('escodex', 'disabled', true); + exchange_set_default('gateio', 'disabled', true); + exchange_set_default('jubi', 'disabled', true); + exchange_set_default('nova', 'disabled', true); + exchange_set_default('stocksexchange', 'disabled', true); + exchange_set_default('tradesatoshi', 'disabled', true); + + settings_prefetch_all(); + + if (!exchange_get('bittrex', 'disabled')) { + $list = bittrex_api_query('public/getcurrencies'); + if (isset($list->result) && !empty($list->result)) { + dborun("UPDATE markets SET deleted=true WHERE name='bittrex'"); + foreach ($list->result as $currency) { + if ($currency->Currency == 'BTC') { + exchange_set('bittrex', 'withdraw_fee_btc', $currency->TxFee); + continue; + } + updateRawCoin('bittrex', $currency->Currency, $currency->CurrencyLong); + } + } + } + + if (!exchange_get('bitz', 'disabled')) { + $list = bitz_api_query('tickerall'); + if (!empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='bitz'"); + foreach ($list as $c => $ticker) { + $e = explode('_', $c); + if (strtoupper($e[1]) !== 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('bitz', $symbol); + } + } + } + + if (!exchange_get('bleutrade', 'disabled')) { + $list = bleutrade_api_query('public/getcurrencies'); + if (isset($list->result) && !empty($list->result)) { + dborun("UPDATE markets SET deleted=true WHERE name='bleutrade'"); + foreach ($list->result as $currency) { + if ($currency->Currency == 'BTC') { + exchange_set('bleutrade', 'withdraw_fee_btc', $currency->TxFee); + continue; + } + updateRawCoin('bleutrade', $currency->Currency, $currency->CurrencyLong); + } + } + } + + if (!exchange_get('coinbene', 'disabled')) { + $data = coinbene_api_query('market/symbol'); + $list = objSafeVal($data, 'symbol'); + if (is_array($list) && !empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='coinbene'"); + foreach ($list as $ticker) { + if ($ticker->quoteAsset != 'BTC') + continue; + $symbol = $ticker->baseAsset; + updateRawCoin('coinbene', $symbol); + } + } + } + + if (!exchange_get('crex24', 'disabled')) { + $list = crex24_api_query('currencies'); + if (is_array($list) && !empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='crex24'"); + foreach ($list as $currency) { + $symbol = objSafeVal($currency, 'symbol'); + $name = objSafeVal($currency, 'name'); + if ($currency->isFiat || $currency->isDelisted) + continue; + updateRawCoin('crex24', $symbol, $name); + } + } + } + + if (!exchange_get('poloniex', 'disabled')) { + $poloniex = new poloniex; + $tickers = $poloniex->get_currencies(); + if (!$tickers) + $tickers = array(); + else + dborun("UPDATE markets SET deleted=true WHERE name='poloniex'"); + foreach ($tickers as $symbol => $ticker) { + if (arraySafeVal($ticker, 'disabled')) + continue; + if (arraySafeVal($ticker, 'delisted')) + continue; + updateRawCoin('poloniex', $symbol); + } + } + + if (!exchange_get('c-cex', 'disabled')) { + $ccex = new CcexAPI; + $list = $ccex->getPairs(); + if ($list) { + sleep(1); + $names = $ccex->getCoinNames(); + + dborun("UPDATE markets SET deleted=true WHERE name='c-cex'"); + foreach ($list as $item) { + $e = explode('-', $item); + $symbol = strtoupper($e[0]); + + updateRawCoin('c-cex', $symbol, arraySafeVal($names, $e[0], 'unknown')); + } + } + } + + if (!exchange_get('yobit', 'disabled')) { + $res = yobit_api_query('info'); + if ($res) { + dborun("UPDATE markets SET deleted=true WHERE name='yobit'"); + foreach ($res->pairs as $i => $item) { + $e = explode('_', $i); + $symbol = strtoupper($e[0]); + updateRawCoin('yobit', $symbol); + } + } + } + + if (!exchange_get('coinexchange', 'disabled')) { + $list = coinexchange_api_query('getmarkets'); + if (isset($list->result) && !empty($list->result)) { + dborun("UPDATE markets SET deleted=true WHERE name='coinexchange'"); + foreach ($list->result as $item) { + if ($item->BaseCurrencyCode != 'BTC') + continue; + $symbol = $item->MarketAssetCode; + $label = objSafeVal($item, 'MarketAssetName'); + updateRawCoin('coinexchange', $symbol, $label); + } + } + } + + if (!exchange_get('coinsmarkets', 'disabled')) { + $list = coinsmarkets_api_query('apicoin'); + if (!empty($list) && is_array($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='coinsmarkets'"); + foreach ($list as $pair => $data) { + $e = explode('_', $pair); + if ($e[0] != 'BTC') + continue; + $symbol = strtoupper($e[1]); + updateRawCoin('coinsmarkets', $symbol); + } + } + } + + if (!exchange_get('cryptopia', 'disabled')) { + $list = cryptopia_api_query('GetMarkets'); + if (isset($list->Data)) { + dborun("UPDATE markets SET deleted=true WHERE name='cryptopia'"); + foreach ($list->Data as $item) { + $e = explode('/', $item->Label); + if (strtoupper($e[1]) !== 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('cryptopia', $symbol); + } + } + } + + if (!exchange_get('cryptobridge', 'disabled')) { + $list = cryptobridge_api_query('ticker'); + if (is_array($list) && !empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='cryptobridge'"); + foreach ($list as $ticker) { + $e = explode('_', $ticker->id); + if (strtoupper($e[1]) !== 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('cryptobridge', $symbol); + } + } + } + + if (!exchange_get('escodex', 'disabled')) { + $list = escodex_api_query('ticker'); + if (is_array($list) && !empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='escodex'"); + foreach ($list as $ticker) { + #debuglog (json_encode($ticker)); + if (strtoupper($ticker->base) !== 'BTC') + continue; + $symbol = strtoupper($ticker->quote); + updateRawCoin('escodex', $symbol); + } + } + } + + if (!exchange_get('hitbtc', 'disabled')) { + $list = hitbtc_api_query('symbols'); + if (is_object($list) && isset($list->symbols) && is_array($list->symbols)) { + dborun("UPDATE markets SET deleted=true WHERE name='hitbtc'"); + foreach ($list->symbols as $data) { + $base = strtoupper($data->currency); + if ($base != 'BTC') + continue; + $symbol = strtoupper($data->commodity); + updateRawCoin('hitbtc', $symbol); + } + } + } + + if (!exchange_get('kraken', 'disabled')) { + $list = kraken_api_query('AssetPairs'); + if (is_array($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='kraken'"); + foreach ($list as $pair => $item) { + $pairs = explode('-', $pair); + $base = reset($pairs); + $symbol = end($pairs); + if ($symbol == 'BTC' || $base != 'BTC') + continue; + if (in_array($symbol, array( + 'GBP', + 'CAD', + 'EUR', + 'USD', + 'JPY' + ))) + continue; + if (strpos($symbol, '.d') !== false) + continue; + $symbol = strtoupper($symbol); + updateRawCoin('kraken', $symbol); + } + } + } + + if (!exchange_get('alcurex', 'disabled')) { + $list = alcurex_api_query('market', '?info=on'); + if (is_object($list) && isset($list->MARKETS)) { + dborun("UPDATE markets SET deleted=true WHERE name='alcurex'"); + foreach ($list->MARKETS as $item) { + $e = explode('_', $item->Pair); + $symbol = strtoupper($e[0]); + updateRawCoin('alcurex', $symbol); + } + } + } + + if (!exchange_get('binance', 'disabled')) { + $list = binance_api_query('ticker/allBookTickers'); + if (is_array($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='binance'"); + foreach ($list as $ticker) { + $base = substr($ticker->symbol, -3, 3); + // XXXBTC XXXETH BTCUSDT (no separator!) + if ($base != 'BTC') + continue; + $symbol = substr($ticker->symbol, 0, strlen($ticker->symbol) - 3); + updateRawCoin('binance', $symbol); + } + } + } + + if (!exchange_get('gateio', 'disabled')) { + $json = gateio_api_query('marketlist'); + $list = arraySafeVal($json, 'data'); + if (!empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='gateio'"); + foreach ($list as $item) { + if ($item['curr_b'] != 'BTC') + continue; + $symbol = trim(strtoupper($item['symbol'])); + $name = trim($item['name']); + updateRawCoin('gateio', $symbol, $name); + } + } + } + + if (!exchange_get('nova', 'disabled')) { + $list = nova_api_query('markets'); + if (is_object($list) && !empty($list->markets)) { + dborun("UPDATE markets SET deleted=true WHERE name='nova'"); + foreach ($list->markets as $item) { + if ($item->basecurrency != 'BTC') + continue; + $symbol = strtoupper($item->currency); + updateRawCoin('nova', $symbol); + //debuglog("nova: $symbol"); + } + } + } + + if (!exchange_get('stocksexchange', 'disabled')) { + $list = stocksexchange_api_query('markets'); + if (is_array($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='stocksexchange'"); + foreach ($list as $item) { + if ($item->partner != 'BTC') + continue; + if ($item->active == false) + continue; + $symbol = strtoupper($item->currency); + $name = trim($item->currency_long); + updateRawCoin('stocksexchange', $symbol, $name); + } + } + } + + if (!exchange_get('empoex', 'disabled')) { + $list = empoex_api_query('marketinfo'); + if (is_array($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='empoex'"); + foreach ($list as $item) { + $e = explode('-', $item->pairname); + $base = strtoupper($e[1]); + if ($base != 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('empoex', $symbol); + } + } + } + + if (!exchange_get('kucoin', 'disabled')) { + $list = kucoin_api_query('currencies'); + if (kucoin_result_valid($list) && !empty($list->data)) { + dborun("UPDATE markets SET deleted=true WHERE name='kucoin'"); + foreach ($list->data as $item) { + $symbol = $item->name; + $name = $item->fullName; + updateRawCoin('kucoin', $symbol, $name); + } + } + } + + if (!exchange_get('livecoin', 'disabled')) { + $list = livecoin_api_query('exchange/ticker'); + if (is_array($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='livecoin'"); + foreach ($list as $item) { + $e = explode('/', $item->symbol); + $base = strtoupper($e[1]); + if ($base != 'BTC') + continue; + $symbol = strtoupper($e[0]); + updateRawCoin('livecoin', $symbol); + } + } + } + + if (!exchange_get('shapeshift', 'disabled')) { + $list = shapeshift_api_query('getcoins'); + if (is_array($list) && !empty($list)) { + dborun("UPDATE markets SET deleted=true WHERE name='shapeshift'"); + foreach ($list as $item) { + $status = $item['status']; + if ($status != 'available') + continue; + $symbol = strtoupper($item['symbol']); + $name = trim($item['name']); + updateRawCoin('shapeshift', $symbol, $name); + //debuglog("shapeshift: $symbol $name"); + } + } + } + + if (!exchange_get('tradesatoshi', 'disabled')) { + $data = tradesatoshi_api_query('getcurrencies'); + if (is_object($data) && !empty($data->result)) { + dborun("UPDATE markets SET deleted=true WHERE name='tradesatoshi'"); + foreach ($data->result as $item) { + $symbol = $item->currency; + $name = trim($item->currencyLong); + updateRawCoin('tradesatoshi', $symbol, $name); + } + } + } + + ////////////////////////////////////////////////////////// + + $markets = dbocolumn("SELECT DISTINCT name FROM markets"); + foreach ($markets as $exchange) { + if (exchange_get($exchange, 'disabled')) { + $res = dborun("UPDATE markets SET disabled=8 WHERE name='$exchange'"); + if (!$res) + continue; + $coins = getdbolist('db_coins', "id IN (SELECT coinid FROM markets WHERE name='$exchange')"); + foreach ($coins as $coin) { + // allow to track a single market on a disabled exchange (dev test) + if (market_get($exchange, $coin->getOfficialSymbol(), 'disabled', 1) == 0) { + $res -= dborun("UPDATE markets SET disabled=0 WHERE name='$exchange' AND coinid={$coin->id}"); + } + } + debuglog("$exchange: $res markets disabled from db settings"); + } else { + $res = dborun("UPDATE markets SET disabled=0 WHERE name='$exchange' AND disabled=8"); + if ($res) + debuglog("$exchange: $res markets re-enabled from db settings"); + } + } + + dborun("DELETE FROM markets WHERE deleted"); + + $list = getdbolist('db_coins', "not enable and not installed and id not in (select distinct coinid from markets)"); + foreach ($list as $coin) { + if ($coin->visible) + debuglog("{$coin->symbol} is no longer active"); + // todo: proper cleanup in all tables (like "yiimp coin SYM delete") + // if ($coin->symbol != 'BTC') + // $coin->delete(); + } } -function updateRawCoin($marketname, $symbol, $name='unknown') +function updateRawCoin($marketname, $symbol, $name = 'unknown') { - if($symbol == 'BTC') return; - - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$symbol)); - if(!$coin && YAAMP_CREATE_NEW_COINS) - { - $algo = ''; - if ($marketname == 'cryptopia') { - // get coin label and algo (different api) - $labels = cryptopia_api_query('GetCurrencies'); - if (is_object($labels) && !empty($labels->Data)) { - foreach ($labels->Data as $coin) { - if ($coin->Symbol == $symbol) { - $name = $coin->Name; - $algo = strtolower($coin->Algorithm); - if ($algo == 'scrypt') $algo = ''; // cryptopia default generally wrong - break; - } - } - } - } - - if (in_array($marketname, array('nova','askcoin','binance','bitz','coinexchange','coinsmarkets','cryptobridge','hitbtc'))) { - // don't polute too much the db with new coins, its better from exchanges with labels - return; - } - - // some other to ignore... - if (in_array($marketname, array('crex24','escodex','yobit','coinbene','kucoin','tradesatoshi'))) - return; - - if (market_get($marketname, $symbol, "disabled")) { - return; - } - - debuglog("new coin $marketname $symbol $name"); - - $coin = new db_coins; - $coin->txmessage = true; - $coin->hassubmitblock = true; - $coin->name = $name; - $coin->algo = $algo; - $coin->symbol = $symbol; - $coin->created = time(); - $coin->save(); - - $url = getMarketUrl($coin, $marketname); - if (YAAMP_NOTIFY_NEW_COINS) - mail(YAAMP_ADMIN_EMAIL, "New coin $symbol", "new coin $symbol ($name) on $marketname\r\n\r\n$url"); - sleep(30); - } - - else if($coin && $coin->name == 'unknown' && $name != 'unknown') - { - $coin->name = $name; - $coin->save(); - } - - $list = getdbolist('db_coins', "symbol=:symbol or symbol2=:symbol", array(':symbol'=>$symbol)); - foreach($list as $coin) - { - $market = getdbosql('db_markets', "coinid=$coin->id and name='$marketname'"); - if(!$market) - { - $market = new db_markets; - $market->coinid = $coin->id; - $market->name = $marketname; - } - - $market->deleted = false; - $market->save(); - } + if ($symbol == 'BTC') + return; + + $coin = getdbosql('db_coins', "symbol=:symbol", array( + ':symbol' => $symbol + )); + if (!$coin && YAAMP_CREATE_NEW_COINS) { + $algo = ''; + if ($marketname == 'cryptopia') { + // get coin label and algo (different api) + $labels = cryptopia_api_query('GetCurrencies'); + if (is_object($labels) && !empty($labels->Data)) { + foreach ($labels->Data as $coin) { + if ($coin->Symbol == $symbol) { + $name = $coin->Name; + $algo = strtolower($coin->Algorithm); + if ($algo == 'scrypt') + $algo = ''; // cryptopia default generally wrong + break; + } + } + } + } + + if (in_array($marketname, array( + 'nova', + 'askcoin', + 'binance', + 'bitz', + 'coinexchange', + 'coinsmarkets', + 'cryptobridge', + 'hitbtc' + ))) { + // don't polute too much the db with new coins, its better from exchanges with labels + return; + } + + // some other to ignore... + if (in_array($marketname, array( + 'crex24', + 'escodex', + 'yobit', + 'coinbene', + 'kucoin', + 'tradesatoshi' + ))) + return; + + if (market_get($marketname, $symbol, "disabled")) { + return; + } + + debuglog("new coin $marketname $symbol $name"); + + $coin = new db_coins; + $coin->txmessage = true; + $coin->hassubmitblock = true; + $coin->name = $name; + $coin->algo = $algo; + $coin->symbol = $symbol; + $coin->created = time(); + $coin->save(); + + $url = getMarketUrl($coin, $marketname); + if (YAAMP_NOTIFY_NEW_COINS) + mail(YAAMP_ADMIN_EMAIL, "New coin $symbol", "new coin $symbol ($name) on $marketname\r\n\r\n$url"); + sleep(30); + } + + else if ($coin && $coin->name == 'unknown' && $name != 'unknown') { + $coin->name = $name; + $coin->save(); + } + + $list = getdbolist('db_coins', "symbol=:symbol or symbol2=:symbol", array( + ':symbol' => $symbol + )); + foreach ($list as $coin) { + $market = getdbosql('db_markets', "coinid=$coin->id and name='$marketname'"); + if (!$market) { + $market = new db_markets; + $market->coinid = $coin->id; + $market->name = $marketname; + } + + $market->deleted = false; + $market->save(); + } } - diff --git a/web/yaamp/core/backend/renting.php b/web/yaamp/core/backend/renting.php index a17ea016f..423cf914d 100644 --- a/web/yaamp/core/backend/renting.php +++ b/web/yaamp/core/backend/renting.php @@ -2,275 +2,296 @@ function BackendRentingUpdate() { -// debuglog(__FUNCTION__); - if(!YAAMP_RENTAL) - { - dborun("update jobs set active=false, ready=false"); - return; - } - - dborun("update jobs set active=false where not ready"); - foreach(yaamp_get_algos() as $algo) - { - $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - - dborun("update jobs set active=true where ready and price>$rent and algo=:algo", array(':algo'=>$algo)); - dborun("update jobs set active=false where active and price<$rent and algo=:algo", array(':algo'=>$algo)); - } - - $list = getdbolist('db_jobsubmits', "status=0"); - foreach($list as $submit) - { - $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$submit->algo)); - $amount = $rent * $submit->difficulty / 20116.56761169; - - $factor = yaamp_algo_mBTC_factor($submit->algo); // 1000 for sha256 - $amount /= $factor; - - $submit->amount = $amount - $amount*YAAMP_FEES_RENTING/100; - $submit->status = 1; - $submit->save(); - - $job = getdbo('db_jobs', $submit->jobid); - if(!$job) - { - $submit->delete(); - continue; - } - - $renter = getdbo('db_renters', $job->renterid); - if(!$renter) - { - $job->delete(); - $submit->delete(); - continue; - } - - $renter->balance -= $amount; - $renter->spent += $amount; - - if($renter->balance <= 0.00001000) - { - debuglog("resetting balance to 0, $renter->balance, $renter->id, $renter->address"); - $renter->balance = 0; - dborun("update jobs set active=false, ready=false where renterid=$renter->id"); - } - - $renter->updated = time(); - $renter->save(); - } - -// debuglog(__FUNCTION__); + // debuglog(__FUNCTION__); + if (!YAAMP_RENTAL) { + dborun("update jobs set active=false, ready=false"); + return; + } + + dborun("update jobs set active=false where not ready"); + foreach (yaamp_get_algos() as $algo) { + $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + + dborun("update jobs set active=true where ready and price>$rent and algo=:algo", array( + ':algo' => $algo + )); + dborun("update jobs set active=false where active and price<$rent and algo=:algo", array( + ':algo' => $algo + )); + } + + $list = getdbolist('db_jobsubmits', "status=0"); + foreach ($list as $submit) { + $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $submit->algo + )); + $amount = $rent * $submit->difficulty / 20116.56761169; + + $factor = yaamp_algo_mBTC_factor($submit->algo); // 1000 for sha256 + $amount /= $factor; + + $submit->amount = $amount - $amount * YAAMP_FEES_RENTING / 100; + $submit->status = 1; + $submit->save(); + + $job = getdbo('db_jobs', $submit->jobid); + if (!$job) { + $submit->delete(); + continue; + } + + $renter = getdbo('db_renters', $job->renterid); + if (!$renter) { + $job->delete(); + $submit->delete(); + continue; + } + + $renter->balance -= $amount; + $renter->spent += $amount; + + if ($renter->balance <= 0.00001000) { + debuglog("resetting balance to 0, $renter->balance, $renter->id, $renter->address"); + $renter->balance = 0; + dborun("update jobs set active=false, ready=false where renterid=$renter->id"); + } + + $renter->updated = time(); + $renter->save(); + } + + // debuglog(__FUNCTION__); } ////////////////////////////////////////////////////////////////////////////////////////////////////////// function BackendRentingPayout() { -// debuglog(__FUNCTION__); - - $total_cleared = 0; - foreach(yaamp_get_algos() as $algo) - { - $delay = time() - 5*60; - dborun("delete from jobsubmits where status=2 and algo=:algo and time<$delay", array(':algo'=>$algo)); - - $amount = dboscalar("select sum(amount) from jobsubmits where status=1 and algo=:algo", array(':algo'=>$algo)); - if($amount < 0.00002000) continue; - - dborun("update jobsubmits set status=2 where status=1 and algo=:algo", array(':algo'=>$algo)); - $total_cleared += $amount; - - $block = new db_blocks; - $block->coin_id = 0; - $block->time = time(); - $block->amount = $amount; - $block->price = 1; - $block->algo = $algo; - $block->category = 'generate'; - $block->save(); - - $total_hash_power = dboscalar("SELECT sum(difficulty) FROM shares where valid and algo=:algo", array(':algo'=>$algo)); - if(!$total_hash_power) continue; - - $list = dbolist("SELECT userid, sum(difficulty) as total FROM shares where valid and algo=:algo GROUP BY userid", array(':algo'=>$algo)); - foreach($list as $item) - { - $hash_power = $item['total']; - if(!$hash_power) continue; - - $user = getdbo('db_accounts', $item['userid']); - if(!$user) continue; - - $earning = new db_earnings; - $earning->userid = $user->id; - $earning->coinid = 0; - $earning->blockid = $block->id; - $earning->create_time = time(); - $earning->price = 1; - $earning->status = 2; // cleared - - $earning->amount = $amount * $hash_power / $total_hash_power; - if(!$user->no_fees) $earning->amount = take_yaamp_fee($earning->amount, $algo); - if(!empty($user->donation)) { - $earning->amount = take_yaamp_fee($earning->amount, $algo, $user->donation); - if ($earning->amount <= 0) continue; - } - - $earning->save(); - - $refcoin = getdbo('db_coins', $user->coinid); - $value = $earning->amount / (($refcoin && $refcoin->price2)? $refcoin->price2: 1); - - // $value = yaamp_convert_amount_user($coin, $earning->amount, $user); - - $user->last_earning = time(); - $user->balance += $value; - $user->save(); - } - - $delay = time() - 5*60; - dborun("delete from shares where algo=:algo and time<$delay", array(':algo'=>$algo)); - } - - if($total_cleared>0) - debuglog("total cleared from rental $total_cleared BTC"); + // debuglog(__FUNCTION__); + + $total_cleared = 0; + foreach (yaamp_get_algos() as $algo) { + $delay = time() - 5 * 60; + dborun("delete from jobsubmits where status=2 and algo=:algo and time<$delay", array( + ':algo' => $algo + )); + + $amount = dboscalar("select sum(amount) from jobsubmits where status=1 and algo=:algo", array( + ':algo' => $algo + )); + if ($amount < 0.00002000) + continue; + + dborun("update jobsubmits set status=2 where status=1 and algo=:algo", array( + ':algo' => $algo + )); + $total_cleared += $amount; + + $block = new db_blocks; + $block->coin_id = 0; + $block->time = time(); + $block->amount = $amount; + $block->price = 1; + $block->algo = $algo; + $block->category = 'generate'; + $block->save(); + + $total_hash_power = dboscalar("SELECT sum(difficulty) FROM shares where valid and algo=:algo", array( + ':algo' => $algo + )); + if (!$total_hash_power) + continue; + + $list = dbolist("SELECT userid, sum(difficulty) as total FROM shares where valid and algo=:algo GROUP BY userid", array( + ':algo' => $algo + )); + foreach ($list as $item) { + $hash_power = $item['total']; + if (!$hash_power) + continue; + + $user = getdbo('db_accounts', $item['userid']); + if (!$user) + continue; + + $earning = new db_earnings; + $earning->userid = $user->id; + $earning->coinid = 0; + $earning->blockid = $block->id; + $earning->create_time = time(); + $earning->price = 1; + $earning->status = 2; // cleared + + $earning->amount = $amount * $hash_power / $total_hash_power; + if (!$user->no_fees) + $earning->amount = take_yaamp_fee($earning->amount, $algo); + if (!empty($user->donation)) { + $earning->amount = take_yaamp_fee($earning->amount, $algo, $user->donation); + if ($earning->amount <= 0) + continue; + } + + $earning->save(); + + $refcoin = getdbo('db_coins', $user->coinid); + $value = $earning->amount / (($refcoin && $refcoin->price2) ? $refcoin->price2 : 1); + + // $value = yaamp_convert_amount_user($coin, $earning->amount, $user); + + $user->last_earning = time(); + $user->balance += $value; + $user->save(); + } + + $delay = time() - 5 * 60; + dborun("delete from shares where algo=:algo and time<$delay", array( + ':algo' => $algo + )); + } + + if ($total_cleared > 0) + debuglog("total cleared from rental $total_cleared BTC"); } //////////////////////////////////////////////////////////////////////////////// function BackendUpdateDeposit() { -// debuglog(__FUNCTION__); + // debuglog(__FUNCTION__); - $btc = getdbosql('db_coins', "symbol='BTC'"); - if(!$btc) return; + $btc = getdbosql('db_coins', "symbol='BTC'"); + if (!$btc) + return; - $remote = new WalletRPC($btc); + $remote = new WalletRPC($btc); + + $info = $remote->getinfo(); + if (!$info) + return; + if (!isset($info['blocks'])) + return; - $info = $remote->getinfo(); - if(!$info) return; - if(!isset($info['blocks'])) return; + $hash = $remote->getblockhash(intval($info['blocks'])); + if (!$hash) + return; - $hash = $remote->getblockhash(intval($info['blocks'])); - if(!$hash) return; + $block = $remote->getblock($hash); + if (!$block) + return; - $block = $remote->getblock($hash); - if(!$block) return; + if (!isset($block['time'])) + return; + if ($block['time'] + 30 * 60 < time()) + return; - if(!isset($block['time'])) return; - if($block['time'] + 30*60 < time()) return; + $list = $remote->listaccounts(1); + foreach ($list as $r => $a) { + if ($a == 0) + continue; - $list = $remote->listaccounts(1); - foreach($list as $r=>$a) - { - if($a == 0) continue; + $b = preg_match('/renter-prod-([0-9]+)/', $r, $m); + if (!$b) + continue; - $b = preg_match('/renter-prod-([0-9]+)/', $r, $m); - if(!$b) continue; + $renter = getdbo('db_renters', $m[1]); + if (!$renter) + continue; - $renter = getdbo('db_renters', $m[1]); - if(!$renter) continue; + $ts = $remote->listtransactions(yaamp_renter_account($renter), 1); + if (!$ts || !isset($ts[0])) + continue; - $ts = $remote->listtransactions(yaamp_renter_account($renter), 1); - if(!$ts || !isset($ts[0])) continue; + $moved = $remote->move(yaamp_renter_account($renter), '', $a); + if (!$moved) + continue; - $moved = $remote->move(yaamp_renter_account($renter), '', $a); - if(!$moved) continue; + debuglog("deposit $renter->id $renter->address, $a"); - debuglog("deposit $renter->id $renter->address, $a"); + $rentertx = new db_rentertxs; + $rentertx->renterid = $renter->id; + $rentertx->time = time(); + $rentertx->amount = $a; + $rentertx->type = 'deposit'; + $rentertx->tx = isset($ts[0]['txid']) ? $ts[0]['txid'] : ''; + $rentertx->save(); - $rentertx = new db_rentertxs; - $rentertx->renterid = $renter->id; - $rentertx->time = time(); - $rentertx->amount = $a; - $rentertx->type = 'deposit'; - $rentertx->tx = isset($ts[0]['txid'])? $ts[0]['txid']: ''; - $rentertx->save(); + $renter->unconfirmed = 0; + $renter->balance += $a; + $renter->updated = time(); + $renter->save(); + } - $renter->unconfirmed = 0; - $renter->balance += $a; - $renter->updated = time(); - $renter->save(); - } + $list = $remote->listaccounts(0); + foreach ($list as $r => $a) { + if ($a == 0) + continue; - $list = $remote->listaccounts(0); - foreach($list as $r=>$a) - { - if($a == 0) continue; + $b = preg_match('/renter-prod-([0-9]+)/', $r, $m); + if (!$b) + continue; - $b = preg_match('/renter-prod-([0-9]+)/', $r, $m); - if(!$b) continue; + $renter = getdbo('db_renters', $m[1]); + if (!$renter) + continue; - $renter = getdbo('db_renters', $m[1]); - if(!$renter) continue; + debuglog("unconfirmed $renter->id $renter->address, $a"); - debuglog("unconfirmed $renter->id $renter->address, $a"); + $renter->unconfirmed = $a; + $renter->updated = time(); + $renter->save(); + } - $renter->unconfirmed = $a; - $renter->updated = time(); - $renter->save(); - } + ///////////////////////////////////////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////////////////////////////////////// + $received1 = $remote->getbalance('bittrex', 1); //nicehash payments + if ($received1 > 0) { + $moved = $remote->move('bittrex', '', $received1); + debuglog("moved from bittrex $received1"); - $received1 = $remote->getbalance('bittrex', 1); //nicehash payments - if($received1>0) - { - $moved = $remote->move('bittrex', '', $received1); - debuglog("moved from bittrex $received1"); + dborun("update renters set balance=balance+$received1 where id=7"); + dborun("update renters set custom_start=custom_start+$received1 where id=7"); + } - dborun("update renters set balance=balance+$received1 where id=7"); - dborun("update renters set custom_start=custom_start+$received1 where id=7"); - } + ///////////////////////////////////////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////////////////////////////////////// + $fees = YAAMP_TXFEE_RENTING_WD; // 0.002 - $fees = YAAMP_TXFEE_RENTING_WD; // 0.002 + $list = getdbolist('db_rentertxs', "type='withdraw' and tx='scheduled'"); + foreach ($list as $tx) { + $renter = getdbo('db_renters', $tx->renterid); + if (!$renter) + continue; - $list = getdbolist('db_rentertxs', "type='withdraw' and tx='scheduled'"); - foreach($list as $tx) - { - $renter = getdbo('db_renters', $tx->renterid); - if(!$renter) continue; + // debuglog("$renter->balance < $tx->amount + $fees"); + $tx->amount = bitcoinvaluetoa(min($tx->amount, $renter->balance - $fees)); + if ($tx->amount < $fees * 2) { + $tx->tx = 'failed'; + $tx->save(); -// debuglog("$renter->balance < $tx->amount + $fees"); - $tx->amount = bitcoinvaluetoa(min($tx->amount, $renter->balance-$fees)); - if($tx->amount < $fees*2) - { - $tx->tx = 'failed'; - $tx->save(); + continue; + } - continue; - } + debuglog("withdraw send $renter->id $renter->address sendtoaddress($tx->address, $tx->amount)"); + $tx->tx = $remote->sendtoaddress($tx->address, round($tx->amount, 8)); - debuglog("withdraw send $renter->id $renter->address sendtoaddress($tx->address, $tx->amount)"); - $tx->tx = $remote->sendtoaddress($tx->address, round($tx->amount, 8)); + if (!$tx->tx) { + $tx->tx = 'failed'; + $tx->save(); - if(!$tx->tx) - { - $tx->tx = 'failed'; - $tx->save(); + continue; + } - continue; - } + $renter->balance -= $tx->amount + $fees; + $renter->balance = max($renter->balance, 0); - $renter->balance -= $tx->amount+$fees; - $renter->balance = max($renter->balance, 0); + dborun("update renters set balance=$renter->balance where id=$renter->id"); - dborun("update renters set balance=$renter->balance where id=$renter->id"); + $tx->save(); - $tx->save(); - - if($renter->balance <= 0.0001) - dborun("update jobs set active=false, ready=false where id=$renter->id"); - } + if ($renter->balance <= 0.0001) + dborun("update jobs set active=false, ready=false where id=$renter->id"); + } } - - - - - - - diff --git a/web/yaamp/core/backend/sell.php b/web/yaamp/core/backend/sell.php index 9dfdb4301..584e58def 100644 --- a/web/yaamp/core/backend/sell.php +++ b/web/yaamp/core/backend/sell.php @@ -4,125 +4,122 @@ function TradingSellCoins() { -// debuglog(__FUNCTION__); + // debuglog(__FUNCTION__); - $coins = getdbolist('db_coins', "enable and balance>0 and symbol!='BTC'"); - foreach($coins as $coin) sellCoinToExchange($coin); + $coins = getdbolist('db_coins', "enable and balance>0 and symbol!='BTC'"); + foreach ($coins as $coin) + sellCoinToExchange($coin); } function sellCoinToExchange($coin) { - if($coin->dontsell) return; - - $remote = new WalletRPC($coin); - - $info = $remote->getinfo(); - if(!$info || !$info['balance']) return false; - - if(!empty($coin->symbol2)) - { - $coin2 = getdbosql('db_coins', "symbol='$coin->symbol2'"); - if(!$coin2) return; - - $amount = $info['balance'] - $info['paytxfee']; - $amount *= 0.9; - -// debuglog("sending $amount $coin->symbol to main wallet"); - - $tx = $remote->sendtoaddress($coin2->master_wallet, $amount); -// if(!$tx) debuglog($remote->error); - - return; - } - - $market = getBestMarket($coin); - if(!$market) return; - - if($market->lastsent != null && $market->lastsent > $market->lasttraded) - { -// mail(YAAMP_ADMIN_EMAIL, "Late Transaction", "A previous transaction for $coin->name to $market->name has not been recieved."); -// debuglog("*** not sending $coin->name to $market->name. last tx is late ***"); - return; - } - - $deposit_address = $market->deposit_address; - $marketname = $market->name; - - if(empty($deposit_address)) return false; - $reserved1 = dboscalar("select sum(balance) from accounts where coinid=$coin->id"); - $reserved2 = dboscalar("select sum(amount*price) from earnings - where status!=2 and userid in (select id from accounts where coinid=$coin->id)"); - - $reserved = ($reserved1 + $reserved2) * 10; - $amount = $info['balance'] - $info['paytxfee'] - $reserved; - -// if($reserved>0) -// { -// debuglog("$reserved1 $reserved2 out of {$info['balance']}"); -// debuglog("reserving $reserved $coin->symbol out of $coin->balance, available $amount"); -// } - - if($amount < $coin->reward/4) - { - // debuglog("not enough $coin->symbol to sell $amount < $coin->reward /4"); - return false; - } - - $deposit_info = $remote->validateaddress($deposit_address); - if(!$deposit_info || !isset($deposit_info['isvalid']) || !$deposit_info['isvalid']) - { - debuglog("sell invalid address $deposit_address"); - return; - } - - $amount = round($amount, 8); -// debuglog("sending $amount $coin->symbol to $marketname, $deposit_address"); - -// sleep(1); - - $tx = $remote->sendtoaddress($deposit_address, $amount); - if(!$tx) - { - // debuglog($remote->error); - - if($coin->symbol == 'DIME') - $amount = min($amount, 10000000); - else if($coin->symbol == 'CNOTE') - $amount = min($amount, 10000); - else if($coin->symbol == 'SRC') - $amount = min($amount, 500); - else - $amount = round($amount * 0.99, 8); - -// debuglog("sending $amount $coin->symbol to $deposit_address"); - sleep(1); - - $tx = $remote->sendtoaddress($deposit_address, $amount); - if(!$tx) - { - debuglog("sending $amount $coin->symbol to $deposit_address"); - debuglog($remote->error); - return; - } - } - - if($tx) - { - $market->lastsent = time(); - $market->save(); - } - - $exchange = new db_exchange; - $exchange->market = $marketname; - $exchange->coinid = $coin->id; - $exchange->send_time = time(); - $exchange->quantity = $amount; - $exchange->price_estimate = $coin->price; - $exchange->status = 'waiting'; - $exchange->tx = $tx; - $exchange->save(); - - return; + if ($coin->dontsell) + return; + + $remote = new WalletRPC($coin); + + $info = $remote->getinfo(); + if (!$info || !$info['balance']) + return false; + + if (!empty($coin->symbol2)) { + $coin2 = getdbosql('db_coins', "symbol='$coin->symbol2'"); + if (!$coin2) + return; + + $amount = $info['balance'] - $info['paytxfee']; + $amount *= 0.9; + + // debuglog("sending $amount $coin->symbol to main wallet"); + + $tx = $remote->sendtoaddress($coin2->master_wallet, $amount); + // if(!$tx) debuglog($remote->error); + + return; + } + + $market = getBestMarket($coin); + if (!$market) + return; + + if ($market->lastsent != null && $market->lastsent > $market->lasttraded) { + // mail(YAAMP_ADMIN_EMAIL, "Late Transaction", "A previous transaction for $coin->name to $market->name has not been recieved."); + // debuglog("*** not sending $coin->name to $market->name. last tx is late ***"); + return; + } + + $deposit_address = $market->deposit_address; + $marketname = $market->name; + + if (empty($deposit_address)) + return false; + $reserved1 = dboscalar("select sum(balance) from accounts where coinid=$coin->id"); + $reserved2 = dboscalar("select sum(amount*price) from earnings + where status!=2 and userid in (select id from accounts where coinid=$coin->id)"); + + $reserved = ($reserved1 + $reserved2) * 10; + $amount = $info['balance'] - $info['paytxfee'] - $reserved; + + // if($reserved>0) + // { + // debuglog("$reserved1 $reserved2 out of {$info['balance']}"); + // debuglog("reserving $reserved $coin->symbol out of $coin->balance, available $amount"); + // } + + if ($amount < $coin->reward / 4) { + // debuglog("not enough $coin->symbol to sell $amount < $coin->reward /4"); + return false; + } + + $deposit_info = $remote->validateaddress($deposit_address); + if (!$deposit_info || !isset($deposit_info['isvalid']) || !$deposit_info['isvalid']) { + debuglog("sell invalid address $deposit_address"); + return; + } + + $amount = round($amount, 8); + // debuglog("sending $amount $coin->symbol to $marketname, $deposit_address"); + + // sleep(1); + + $tx = $remote->sendtoaddress($deposit_address, $amount); + if (!$tx) { + // debuglog($remote->error); + + if ($coin->symbol == 'DIME') + $amount = min($amount, 10000000); + else if ($coin->symbol == 'CNOTE') + $amount = min($amount, 10000); + else if ($coin->symbol == 'SRC') + $amount = min($amount, 500); + else + $amount = round($amount * 0.99, 8); + + // debuglog("sending $amount $coin->symbol to $deposit_address"); + sleep(1); + + $tx = $remote->sendtoaddress($deposit_address, $amount); + if (!$tx) { + debuglog("sending $amount $coin->symbol to $deposit_address"); + debuglog($remote->error); + return; + } + } + + if ($tx) { + $market->lastsent = time(); + $market->save(); + } + + $exchange = new db_exchange; + $exchange->market = $marketname; + $exchange->coinid = $coin->id; + $exchange->send_time = time(); + $exchange->quantity = $amount; + $exchange->price_estimate = $coin->price; + $exchange->status = 'waiting'; + $exchange->tx = $tx; + $exchange->save(); + + return; } - - diff --git a/web/yaamp/core/backend/services.php b/web/yaamp/core/backend/services.php index 60dfbd398..fd15860cb 100644 --- a/web/yaamp/core/backend/services.php +++ b/web/yaamp/core/backend/services.php @@ -3,239 +3,231 @@ /* NiceHash Stuff */ function BackendUpdateServices() { -// debuglog(__FUNCTION__); - - if (YAAMP_USE_NICEHASH_API != true) - return; - - $table = array( - 0=>'scrypt', - 1=>'sha256', - 2=>'scryptn', - 3=>'x11', - 4=>'x13', - 5=>'keccak', - 6=>'x15', - 7=>'nist5', - 8=>'neoscrypt', - 9=>'lyra2', - 10=>'whirlx', - 11=>'qubit', - 12=>'quark', - // 13=>'Axiom', - 14=>'lyra2v2', // 14 = Lyra2REv2 - // 15=>'ScryptJaneNf16', // 15 = ScryptJaneNf16 - 16=>'blakecoin', // 16 = Blake256r8 - // 17=>'Blake256r14', - // 18=>'Blake256r8vnl', - // 19=>'Hodl', - // 20=>'DaggerHashimoto', - // 21=>'Decred', - // 22=>'CryptoNight', - 23=>'lbry', - 24=>'equihash', - // 25=>'Pascal', - 26=>'sib', // X11Gost - // 27=>'Sia', - 28=>'blake2s', - 29=>'skunk', - ); - - $res = fetch_url('https://api.nicehash.com/api?method=stats.global.current'); - if(!$res) return; - - $a = json_decode($res); - if(!$a || !isset($a->result)) return; - - foreach($a->result->stats as $stat) - { - if($stat->price <= 0) continue; - if(!isset($table[$stat->algo])) continue; - $algo = $table[$stat->algo]; - - $service = getdbosql('db_services', "name='Nicehash' and algo=:algo", array(':algo'=>$algo)); - if(!$service) - { - $service = new db_services; - $service->name = 'Nicehash'; - $service->algo = $algo; - } - - $service->price = $stat->price/1000; - $service->speed = $stat->speed*1000000000; - $service->save(); - - $list = getdbolist('db_jobs', "percent>0 and algo=:algo and (host='stratum.westhash.com' or host='stratum.nicehash.com')", array(':algo'=>$algo)); - foreach($list as $job) - { - $job->price = round($service->price*1000*(100-$job->percent)/100, 2); - $job->save(); - } - } - - $list = getdbolist('db_renters', "custom_address is not null and custom_server is not null"); - foreach($list as $renter) - { - $res = fetch_url("https://$renter->custom_server/api?method=stats.provider&addr=$renter->custom_address"); - if(!$res) continue; - - $renter->custom_balance = 0; - $renter->custom_accept = 0; - $renter->custom_reject = 0; - - $a = json_decode($res); - foreach($a->result->stats as $stat) - { - if(!isset($table[$stat->algo])) continue; - $algo = $table[$stat->algo]; - - $renter->custom_balance += $stat->balance; - $renter->custom_accept += $stat->accepted_speed*1000000000; - } - - $renter->save(); - } - - /////////////////////////////////////////////////////////////////////////// - - // renting from nicehash - if (YAAMP_USE_NICEHASH_API != true) - return; - - $apikey = NICEHASH_API_KEY; - $apiid = NICEHASH_API_ID; - - $deposit = NICEHASH_DEPOSIT; - $amount = NICEHASH_DEPOSIT_AMOUNT; - - $res = fetch_url("https://api.nicehash.com/api?method=balance&id=$apiid&key=$apikey"); - debuglog($res); - - $a = json_decode($res); - $balance = $a->result->balance_confirmed; - - foreach($table as $i=>$algo) - { - $nicehash = getdbosql('db_nicehash', "algo=:algo", array(':algo'=>$algo)); - if(!$nicehash) - { - $nicehash = new db_nicehash; - $nicehash->active = false; - $nicehash->algo = $algo; - } - - if(!$nicehash->active) - { - if($nicehash->orderid) - { - $res = fetch_url("https://api.nicehash.com/api?method=orders.remove&id=$apiid&key=$apikey&location=0&algo=$i&order=$nicehash->orderid"); - debuglog($res); - - $nicehash->orderid = null; - } - - $nicehash->btc = null; - $nicehash->price = null; - $nicehash->speed = null; - $nicehash->last_decrease = null; - - $nicehash->save(); - continue; - } - - $price = dboscalar("select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $minprice = $price*0.5; - $setprice = $price*0.7; - $maxprice = $price*0.9; - $cancelprice = $price*1.1; - - $res = fetch_url("https://api.nicehash.com/api?method=orders.get&my&id=$apiid&key=$apikey&location=0&algo=$i"); - if(!$res) break; - - $a = json_decode($res); - if(count($a->result->orders) == 0) - { - if($balance < $amount) continue; - $port = getAlgoPort($algo); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.create&id=$apiid&key=$apikey&location=0&algo=$i&amount=$amount&price=$setprice&limit=0&pool_host=yaamp.com&pool_port=$port&pool_user=$deposit&pool_pass=xx"); - debuglog($res); - - $nicehash->last_decrease = time(); - $nicehash->save(); - - continue; - } - - $order = $a->result->orders[0]; - debuglog("$algo $order->price $minprice $setprice $maxprice $cancelprice"); - - $nicehash->orderid = $order->id; - $nicehash->btc = $order->btc_avail; - $nicehash->workers = $order->workers; - $nicehash->price = $order->price; - $nicehash->speed = $order->limit_speed; - $nicehash->accepted = $order->accepted_speed; + // debuglog(__FUNCTION__); + + if (YAAMP_USE_NICEHASH_API != true) + return; + + $table = array( + 0 => 'scrypt', + 1 => 'sha256', + 2 => 'scryptn', + 3 => 'x11', + 4 => 'x13', + 5 => 'keccak', + 6 => 'x15', + 7 => 'nist5', + 8 => 'neoscrypt', + 9 => 'lyra2', + 10 => 'whirlx', + 11 => 'qubit', + 12 => 'quark', + // 13=>'Axiom', + 14 => 'lyra2v2', // 14 = Lyra2REv2 + // 15=>'ScryptJaneNf16', // 15 = ScryptJaneNf16 + 16 => 'blakecoin', // 16 = Blake256r8 + // 17=>'Blake256r14', + // 18=>'Blake256r8vnl', + // 19=>'Hodl', + // 20=>'DaggerHashimoto', + // 21=>'Decred', + // 22=>'CryptoNight', + 23 => 'lbry', + 24 => 'equihash', + // 25=>'Pascal', + 26 => 'sib', // X11Gost + // 27=>'Sia', + 28 => 'blake2s', + 29 => 'skunk' + ); + + $res = fetch_url('https://api.nicehash.com/api?method=stats.global.current'); + if (!$res) + return; + + $a = json_decode($res); + if (!$a || !isset($a->result)) + return; + + foreach ($a->result->stats as $stat) { + if ($stat->price <= 0) + continue; + if (!isset($table[$stat->algo])) + continue; + $algo = $table[$stat->algo]; + + $service = getdbosql('db_services', "name='Nicehash' and algo=:algo", array( + ':algo' => $algo + )); + if (!$service) { + $service = new db_services; + $service->name = 'Nicehash'; + $service->algo = $algo; + } + + $service->price = $stat->price / 1000; + $service->speed = $stat->speed * 1000000000; + $service->save(); + + $list = getdbolist('db_jobs', "percent>0 and algo=:algo and (host='stratum.westhash.com' or host='stratum.nicehash.com')", array( + ':algo' => $algo + )); + foreach ($list as $job) { + $job->price = round($service->price * 1000 * (100 - $job->percent) / 100, 2); + $job->save(); + } + } + + $list = getdbolist('db_renters', "custom_address is not null and custom_server is not null"); + foreach ($list as $renter) { + $res = fetch_url("https://$renter->custom_server/api?method=stats.provider&addr=$renter->custom_address"); + if (!$res) + continue; + + $renter->custom_balance = 0; + $renter->custom_accept = 0; + $renter->custom_reject = 0; + + $a = json_decode($res); + foreach ($a->result->stats as $stat) { + if (!isset($table[$stat->algo])) + continue; + $algo = $table[$stat->algo]; + + $renter->custom_balance += $stat->balance; + $renter->custom_accept += $stat->accepted_speed * 1000000000; + } + + $renter->save(); + } + + /////////////////////////////////////////////////////////////////////////// + + // renting from nicehash + if (YAAMP_USE_NICEHASH_API != true) + return; + + $apikey = NICEHASH_API_KEY; + $apiid = NICEHASH_API_ID; + + $deposit = NICEHASH_DEPOSIT; + $amount = NICEHASH_DEPOSIT_AMOUNT; + + $res = fetch_url("https://api.nicehash.com/api?method=balance&id=$apiid&key=$apikey"); + debuglog($res); + + $a = json_decode($res); + $balance = $a->result->balance_confirmed; + + foreach ($table as $i => $algo) { + $nicehash = getdbosql('db_nicehash', "algo=:algo", array( + ':algo' => $algo + )); + if (!$nicehash) { + $nicehash = new db_nicehash; + $nicehash->active = false; + $nicehash->algo = $algo; + } + + if (!$nicehash->active) { + if ($nicehash->orderid) { + $res = fetch_url("https://api.nicehash.com/api?method=orders.remove&id=$apiid&key=$apikey&location=0&algo=$i&order=$nicehash->orderid"); + debuglog($res); + + $nicehash->orderid = null; + } + + $nicehash->btc = null; + $nicehash->price = null; + $nicehash->speed = null; + $nicehash->last_decrease = null; + + $nicehash->save(); + continue; + } + + $price = dboscalar("select price from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $minprice = $price * 0.5; + $setprice = $price * 0.7; + $maxprice = $price * 0.9; + $cancelprice = $price * 1.1; + + $res = fetch_url("https://api.nicehash.com/api?method=orders.get&my&id=$apiid&key=$apikey&location=0&algo=$i"); + if (!$res) + break; + + $a = json_decode($res); + if (count($a->result->orders) == 0) { + if ($balance < $amount) + continue; + $port = getAlgoPort($algo); - if($order->price > $cancelprice && $order->workers > 0) - { - debuglog("* cancel order $algo"); + $res = fetch_url("https://api.nicehash.com/api?method=orders.create&id=$apiid&key=$apikey&location=0&algo=$i&amount=$amount&price=$setprice&limit=0&pool_host=yaamp.com&pool_port=$port&pool_user=$deposit&pool_pass=xx"); + debuglog($res); + + $nicehash->last_decrease = time(); + $nicehash->save(); + + continue; + } - $res = fetch_url("https://api.nicehash.com/api?method=orders.remove&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id"); - debuglog($res); - } + $order = $a->result->orders[0]; + debuglog("$algo $order->price $minprice $setprice $maxprice $cancelprice"); - else if($order->price > $maxprice && $order->limit_speed == 0) - { - debuglog("* decrease speed $algo"); + $nicehash->orderid = $order->id; + $nicehash->btc = $order->btc_avail; + $nicehash->workers = $order->workers; + $nicehash->price = $order->price; + $nicehash->speed = $order->limit_speed; + $nicehash->accepted = $order->accepted_speed; - $res = fetch_url("https://api.nicehash.com/api?method=orders.set.limit&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&limit=0.05"); - debuglog($res); - } + if ($order->price > $cancelprice && $order->workers > 0) { + debuglog("* cancel order $algo"); - else if($order->price > $maxprice && $nicehash->last_decrease+10*60 < time()) - { - debuglog("* decrease price $algo"); + $res = fetch_url("https://api.nicehash.com/api?method=orders.remove&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id"); + debuglog($res); + } - $res = fetch_url("https://api.nicehash.com/api?method=orders.set.price.decrease&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id"); - debuglog($res); + else if ($order->price > $maxprice && $order->limit_speed == 0) { + debuglog("* decrease speed $algo"); - $nicehash->last_decrease = time(); - } - - else if($order->price < $minprice && $order->workers <= 0) - { - debuglog("* increase price $algo"); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.set.price&id=$apiid&key=$apikey&algo=$i&location=0&order=$order->id&price=$setprice"); - debuglog($res); - } - - else if($order->price < $maxprice && $order->limit_speed == 0.05) - { - debuglog("* increase speed $algo"); - - $res = fetch_url("https://api.nicehash.com/api?method=orders.set.limit&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&limit=0"); - debuglog($res); - } - - else if($order->btc_avail < 0.00075000) - { - debuglog("* refilling order $order->id"); + $res = fetch_url("https://api.nicehash.com/api?method=orders.set.limit&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&limit=0.05"); + debuglog($res); + } - $res = fetch_url("https://api.nicehash.com/api?method=orders.refill&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&amount=0.01"); - debuglog($res); - } + else if ($order->price > $maxprice && $nicehash->last_decrease + 10 * 60 < time()) { + debuglog("* decrease price $algo"); - $nicehash->save(); - } + $res = fetch_url("https://api.nicehash.com/api?method=orders.set.price.decrease&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id"); + debuglog($res); -} + $nicehash->last_decrease = time(); + } + else if ($order->price < $minprice && $order->workers <= 0) { + debuglog("* increase price $algo"); + $res = fetch_url("https://api.nicehash.com/api?method=orders.set.price&id=$apiid&key=$apikey&algo=$i&location=0&order=$order->id&price=$setprice"); + debuglog($res); + } + else if ($order->price < $maxprice && $order->limit_speed == 0.05) { + debuglog("* increase speed $algo"); + $res = fetch_url("https://api.nicehash.com/api?method=orders.set.limit&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&limit=0"); + debuglog($res); + } + else if ($order->btc_avail < 0.00075000) { + debuglog("* refilling order $order->id"); + $res = fetch_url("https://api.nicehash.com/api?method=orders.refill&id=$apiid&key=$apikey&location=0&algo=$i&order=$order->id&amount=0.01"); + debuglog($res); + } + $nicehash->save(); + } +} diff --git a/web/yaamp/core/backend/stats.php b/web/yaamp/core/backend/stats.php index 4d607cfc4..440e7cd2b 100644 --- a/web/yaamp/core/backend/stats.php +++ b/web/yaamp/core/backend/stats.php @@ -2,356 +2,375 @@ function BackendStatsUpdate() { -// debuglog(__FUNCTION__); -// $t1xx = microtime(true); - - $t = time()-2*60; - $idleing = array(); - - $list = getdbolist('db_stratums', "time<$t"); - foreach($list as $stratum) { - $idleing[$stratum->algo] = $stratum->algo; - } - - if(!empty($idleing)) { - //noisy... - //debuglog("stratum restarted: ".implode(', ',$idleing)); - //send_email_alert('stratums', "stratum restart", "stratum restart: ".implode(', ',$idleing)); - } - - dborun("DELETE FROM stratums WHERE time<$t"); - dborun("DELETE FROM workers WHERE pid NOT IN (SELECT pid FROM stratums)"); - - // todo: cleanup could be done once per day or week... - dborun("DELETE FROM hashstats WHERE IFNULL(hashrate,0) = 0 AND IFNULL(earnings,0) = 0"); - - ////////////////////////////////////////////////////////////////////////////////////////////////////// - // long term stats - - $tm = floor(time()/60/60)*60*60; - foreach(yaamp_get_algos() as $algo) - { - $pool_rate = yaamp_pool_rate($algo); - - $stats = getdbosql('db_hashstats', "time=$tm and algo=:algo", array(':algo'=>$algo)); - if(!$stats) - { - $stats = new db_hashstats; - $stats->time = $tm; - $stats->hashrate = $pool_rate; - $stats->algo = $algo; - $stats->earnings = null; - } - else - { - $percent = 1; - $stats->hashrate = round(($stats->hashrate*(100-$percent) + $pool_rate*$percent) / 100); - } - - $earnings = bitcoinvaluetoa(dboscalar( - "SELECT SUM(amount*price) FROM blocks WHERE algo=:algo AND time>$tm AND category!='orphan'", - array(':algo'=>$algo) - )); - - if (bitcoinvaluetoa($stats->earnings) != $earnings) { - debuglog("$algo earnings: $earnings BTC"); - $stats->earnings = $earnings; - } - - if (floatval($earnings) || $stats->hashrate) - $stats->save(); - } - - //////////////////////////////////////////////////////////////////////////////////////////////////// - // short term stats - - $step = 15; - $tm = floor(time()/$step/60)*$step*60; - - foreach(yaamp_get_algos() as $algo) - { - $stats = getdbosql('db_hashrate', "time=$tm and algo=:algo", array(':algo'=>$algo)); - if(!$stats) - { - $stats = new db_hashrate; - $stats->time = $tm; - $stats->hashrate = dboscalar("select hashrate from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $stats->hashrate_bad = 0; //dboscalar("select hashrate_bad from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $stats->price = dboscalar("select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $stats->rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $stats->algo = $algo; - } - - $pool_rate = yaamp_pool_rate($algo); - $stats->hashrate = $pool_rate; //round(($stats->hashrate*(100-$percent) + $pool_rate*$percent) / 100); - - $pool_rate_bad = yaamp_pool_rate_bad($algo); - $stats->hashrate_bad = $pool_rate_bad; //round(($stats->hashrate_bad*(100-$percent) + $pool_rate_bad*$percent) / 100); - - if($stats->hashrate < 1000) $stats->hashrate = 0; - - $t1 = time() - 5*60; - $total_rentable = dboscalar("select sum(difficulty) from shares where valid and extranonce1 and algo=:algo and time>$t1", array(':algo'=>$algo)); - $total_diff = dboscalar("select sum(difficulty) from shares where valid and algo=:algo and time>$t1", array(':algo'=>$algo)); - $total_rented = 0; - - if(!$total_diff) - { - $t1 = time() - 15*60; - $total_diff = dboscalar("select sum(difficulty) from shares where valid and algo=:algo and time>$t1", array(':algo'=>$algo)); - } - - if($total_diff > 0) - { - $price = 0; - $rent = 0; - - $list = dbolist("select coinid, sum(difficulty) as d from shares where valid and algo=:algo and time>$t1 group by coinid", array(':algo'=>$algo)); - foreach($list as $item) - { - if($item['coinid'] == 0) - { - if(!$total_rentable) continue; - $total_rented = $item['d']; - - $price += $stats->rent * $item['d'] / $total_diff; - $rent += $stats->rent * $item['d'] / $total_rentable; - } - else - { - $coin = getdbo('db_coins', $item['coinid']); - if(!$coin) continue; - - $btcghd = yaamp_profitability($coin); - - $price += $btcghd * $item['d'] / $total_diff; - $rent += $btcghd * $item['d'] / $total_diff; - } - } - - $percent = 33; - $rent = max($price, ($stats->rent*(100-$percent) + $rent*$percent) / 100); - - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - - $aa = $total_rentable * $target / $interval / 1000; - $bb = dboscalar("select sum(speed) from jobs where active and ready and price>$rent and algo=:algo", array(':algo'=>$algo)); - - if($total_rented*1.3 < $total_rentable || $bb > $aa) - $rent += $price*YAAMP_FEES_RENTING/100; - - else - $rent -= $price*YAAMP_FEES_RENTING/100; - - $stats->price = $price; - $stats->rent = $rent; - } - - else - { - $coin = getdbosql('db_coins', "enable and auto_ready and algo=:algo order by index_avg desc", array(':algo'=>$algo)); - if($coin) - { - $btcghd = yaamp_profitability($coin); - $stats->price = $btcghd; - $stats->rent = $stats->price + $stats->price * YAAMP_FEES_RENTING / 100; - } - } - - if(YAAMP_LIMIT_ESTIMATE) - { - $t1 = time() - 24*60*60; - $avg = dboscalar("select avg(price) from hashrate where time>$t1 and algo=:algo", array(':algo'=>$algo)); - if($avg) $stats->price = min($stats->price, $avg*1.5); - } - - $stats->difficulty = dboscalar("select sum(difficulty) from coins where enable and auto_ready and algo=:algo", array(':algo'=>$algo)); - $stats->save(); - } - - ////////////////////////////////////////////////////////////// - - $step = 15; - $tm = floor(time()/$step/60)*$step*60; - - $btc = getdbosql('db_coins', "symbol='BTC'"); - if (!$btc) $btc = json_decode('{"id": 6, "balance": 0}'); + // debuglog(__FUNCTION__); + // $t1xx = microtime(true); + + $t = time() - 2 * 60; + $idleing = array(); + + $list = getdbolist('db_stratums', "time<$t"); + foreach ($list as $stratum) { + $idleing[$stratum->algo] = $stratum->algo; + } + + if (!empty($idleing)) { + //noisy... + //debuglog("stratum restarted: ".implode(', ',$idleing)); + //send_email_alert('stratums', "stratum restart", "stratum restart: ".implode(', ',$idleing)); + } + + dborun("DELETE FROM stratums WHERE time<$t"); + dborun("DELETE FROM workers WHERE pid NOT IN (SELECT pid FROM stratums)"); + + // todo: cleanup could be done once per day or week... + dborun("DELETE FROM hashstats WHERE IFNULL(hashrate,0) = 0 AND IFNULL(earnings,0) = 0"); + + ////////////////////////////////////////////////////////////////////////////////////////////////////// + // long term stats + + $tm = floor(time() / 60 / 60) * 60 * 60; + foreach (yaamp_get_algos() as $algo) { + $pool_rate = yaamp_pool_rate($algo); + + $stats = getdbosql('db_hashstats', "time=$tm and algo=:algo", array( + ':algo' => $algo + )); + if (!$stats) { + $stats = new db_hashstats; + $stats->time = $tm; + $stats->hashrate = $pool_rate; + $stats->algo = $algo; + $stats->earnings = null; + } else { + $percent = 1; + $stats->hashrate = round(($stats->hashrate * (100 - $percent) + $pool_rate * $percent) / 100); + } + + $earnings = bitcoinvaluetoa(dboscalar("SELECT SUM(amount*price) FROM blocks WHERE algo=:algo AND time>$tm AND category!='orphan'", array( + ':algo' => $algo + ))); + + if (bitcoinvaluetoa($stats->earnings) != $earnings) { + debuglog("$algo earnings: $earnings BTC"); + $stats->earnings = $earnings; + } + + if (floatval($earnings) || $stats->hashrate) + $stats->save(); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // short term stats + + $step = 15; + $tm = floor(time() / $step / 60) * $step * 60; + + foreach (yaamp_get_algos() as $algo) { + $stats = getdbosql('db_hashrate', "time=$tm and algo=:algo", array( + ':algo' => $algo + )); + if (!$stats) { + $stats = new db_hashrate; + $stats->time = $tm; + $stats->hashrate = dboscalar("select hashrate from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $stats->hashrate_bad = 0; //dboscalar("select hashrate_bad from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); + $stats->price = dboscalar("select price from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $stats->rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $stats->algo = $algo; + } + + $pool_rate = yaamp_pool_rate($algo); + $stats->hashrate = $pool_rate; //round(($stats->hashrate*(100-$percent) + $pool_rate*$percent) / 100); + + $pool_rate_bad = yaamp_pool_rate_bad($algo); + $stats->hashrate_bad = $pool_rate_bad; //round(($stats->hashrate_bad*(100-$percent) + $pool_rate_bad*$percent) / 100); + + if ($stats->hashrate < 1000) + $stats->hashrate = 0; + + $t1 = time() - 5 * 60; + $total_rentable = dboscalar("select sum(difficulty) from shares where valid and extranonce1 and algo=:algo and time>$t1", array( + ':algo' => $algo + )); + $total_diff = dboscalar("select sum(difficulty) from shares where valid and algo=:algo and time>$t1", array( + ':algo' => $algo + )); + $total_rented = 0; + + if (!$total_diff) { + $t1 = time() - 15 * 60; + $total_diff = dboscalar("select sum(difficulty) from shares where valid and algo=:algo and time>$t1", array( + ':algo' => $algo + )); + } + + if ($total_diff > 0) { + $price = 0; + $rent = 0; + + $list = dbolist("select coinid, sum(difficulty) as d from shares where valid and algo=:algo and time>$t1 group by coinid", array( + ':algo' => $algo + )); + foreach ($list as $item) { + if ($item['coinid'] == 0) { + if (!$total_rentable) + continue; + $total_rented = $item['d']; + + $price += $stats->rent * $item['d'] / $total_diff; + $rent += $stats->rent * $item['d'] / $total_rentable; + } else { + $coin = getdbo('db_coins', $item['coinid']); + if (!$coin) + continue; + + $btcghd = yaamp_profitability($coin); + + $price += $btcghd * $item['d'] / $total_diff; + $rent += $btcghd * $item['d'] / $total_diff; + } + } + + $percent = 33; + $rent = max($price, ($stats->rent * (100 - $percent) + $rent * $percent) / 100); + + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + + $aa = $total_rentable * $target / $interval / 1000; + $bb = dboscalar("select sum(speed) from jobs where active and ready and price>$rent and algo=:algo", array( + ':algo' => $algo + )); + + if ($total_rented * 1.3 < $total_rentable || $bb > $aa) + $rent += $price * YAAMP_FEES_RENTING / 100; + + else + $rent -= $price * YAAMP_FEES_RENTING / 100; + + $stats->price = $price; + $stats->rent = $rent; + } + + else { + $coin = getdbosql('db_coins', "enable and auto_ready and algo=:algo order by index_avg desc", array( + ':algo' => $algo + )); + if ($coin) { + $btcghd = yaamp_profitability($coin); + $stats->price = $btcghd; + $stats->rent = $stats->price + $stats->price * YAAMP_FEES_RENTING / 100; + } + } + + if (YAAMP_LIMIT_ESTIMATE) { + $t1 = time() - 24 * 60 * 60; + $avg = dboscalar("select avg(price) from hashrate where time>$t1 and algo=:algo", array( + ':algo' => $algo + )); + if ($avg) + $stats->price = min($stats->price, $avg * 1.5); + } + + $stats->difficulty = dboscalar("select sum(difficulty) from coins where enable and auto_ready and algo=:algo", array( + ':algo' => $algo + )); + $stats->save(); + } + + ////////////////////////////////////////////////////////////// + + $step = 15; + $tm = floor(time() / $step / 60) * $step * 60; + + $btc = getdbosql('db_coins', "symbol='BTC'"); + if (!$btc) + $btc = json_decode('{"id": 6, "balance": 0}'); + + $topay = dboscalar("select sum(balance) from accounts where coinid=$btc->id"); //here: take other currencies too + $margin = $btc->balance - $topay; + + $balances = dboscalar("select sum(balance) from balances"); + $onsell = dboscalar("select sum(amount*bid) from orders"); + + $immature = dboscalar("select sum(amount*price) from earnings where status=0"); + $confirmed = dboscalar("select sum(amount*price) from earnings where status=1"); + + $wallets = dboscalar("select sum(balance*price) from coins where enable and symbol!='BTC'"); + $renters = dboscalar("select sum(balance) from renters"); + + $mints = dboscalar("select sum(mint*price) from coins where enable"); + $off = $mints - $immature; + + // debuglog("mint $mints $immature $off"); + + $total_profit = $btc->balance + $balances + $onsell + $wallets - $topay - $renters; + + $stats = getdbosql('db_stats', "time=$tm"); + if (!$stats) { + $stats = new db_stats; + $stats->time = $tm; + } + + $stats->profit = $total_profit; + $stats->wallet = $btc->balance; + $stats->wallets = $wallets; - $topay = dboscalar("select sum(balance) from accounts where coinid=$btc->id"); //here: take other currencies too - $margin = $btc->balance - $topay; + $stats->margin = $margin; + $stats->balances = $balances; + $stats->onsell = $onsell; - $balances = dboscalar("select sum(balance) from balances"); - $onsell = dboscalar("select sum(amount*bid) from orders"); + $stats->immature = $immature; + $stats->waiting = $confirmed; + $stats->renters = $renters; - $immature = dboscalar("select sum(amount*price) from earnings where status=0"); - $confirmed = dboscalar("select sum(amount*price) from earnings where status=1"); + $stats->save(); - $wallets = dboscalar("select sum(balance*price) from coins where enable and symbol!='BTC'"); - $renters = dboscalar("select sum(balance) from renters"); + ///////////////////////////////////////////////////////////////////////////// - $mints = dboscalar("select sum(mint*price) from coins where enable"); - $off = $mints-$immature; - -// debuglog("mint $mints $immature $off"); + foreach (yaamp_get_algos() as $algo) { + $factor = yaamp_get_algo_norm($algo); - $total_profit = $btc->balance + $balances + $onsell + $wallets - $topay - $renters; - - $stats = getdbosql('db_stats', "time=$tm"); - if(!$stats) - { - $stats = new db_stats; - $stats->time = $tm; - } + $dbalgo = getdbosql('db_algos', "name='$algo'"); + if (!$dbalgo) { + $dbalgo = new db_algos; + $dbalgo->name = $algo; + } - $stats->profit = $total_profit; - $stats->wallet = $btc->balance; - $stats->wallets = $wallets; + $dbalgo->profit = dboscalar("select price from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $dbalgo->rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); - $stats->margin = $margin; - $stats->balances = $balances; - $stats->onsell = $onsell; + $dbalgo->factor = $factor; + $dbalgo->save(); + } - $stats->immature = $immature; - $stats->waiting = $confirmed; - $stats->renters = $renters; - - $stats->save(); - - ///////////////////////////////////////////////////////////////////////////// - - foreach(yaamp_get_algos() as $algo) - { - $factor = yaamp_get_algo_norm($algo); - - $dbalgo = getdbosql('db_algos', "name='$algo'"); - if(!$dbalgo) - { - $dbalgo = new db_algos; - $dbalgo->name = $algo; - } - - $dbalgo->profit = dboscalar("select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $dbalgo->rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - - $dbalgo->factor = $factor; - $dbalgo->save(); - } - -// $d1 = microtime(true) - $t1xx; -// controller()->memcache->add_monitoring_function(__METHOD__, $d1); + // $d1 = microtime(true) - $t1xx; + // controller()->memcache->add_monitoring_function(__METHOD__, $d1); } function BackendStatsUpdate2() { -// debuglog('----------------------------------'); -// debuglog(__FUNCTION__); - - //////////////////////////////////////////////////////////////////////////////////////////////////// - - $step = 15; - $tm = floor(time()/$step/60)*$step*60; - - $list = dbolist("select userid, algo from shares where time>$tm group by userid, algo"); - foreach($list as $item) - { - $stats = getdbosql('db_hashuser', "time=$tm and algo=:algo and userid=:userid", - array(':algo'=>$item['algo'], ':userid'=>$item['userid'])); - if(!$stats) - { - $stats = new db_hashuser; - $stats->userid = $item['userid']; - $stats->time = $tm; - $stats->hashrate = dboscalar("select hashrate from hashuser where algo=:algo and userid=:userid order by time desc limit 1", - array(':algo'=>$item['algo'], ':userid'=>$item['userid'])); - $stats->hashrate_bad = 0; - $stats->algo = $item['algo']; - } - - $percent = 20; - $user_rate = yaamp_user_rate($item['userid'], $item['algo']); - - $stats->hashrate = round(($stats->hashrate*(100-$percent) + $user_rate*$percent) / 100); - if($stats->hashrate < 1000) $stats->hashrate = 0; - - $user_rate_bad = yaamp_user_rate_bad($item['userid'], $item['algo']); - - $stats->hashrate_bad = round(($stats->hashrate_bad*(100-$percent) + $user_rate_bad*$percent) / 100); - if($stats->hashrate_bad < 1000) $stats->hashrate_bad = 0; - - $stats->save(); - } - - //////////////////////////////////////////////////////////////////////////////////////////////////// - - $step = 15; - $tm = floor(time()/$step/60)*$step*60; + // debuglog('----------------------------------'); + // debuglog(__FUNCTION__); + + //////////////////////////////////////////////////////////////////////////////////////////////////// + + $step = 15; + $tm = floor(time() / $step / 60) * $step * 60; + + $list = dbolist("select userid, algo from shares where time>$tm group by userid, algo"); + foreach ($list as $item) { + $stats = getdbosql('db_hashuser', "time=$tm and algo=:algo and userid=:userid", array( + ':algo' => $item['algo'], + ':userid' => $item['userid'] + )); + if (!$stats) { + $stats = new db_hashuser; + $stats->userid = $item['userid']; + $stats->time = $tm; + $stats->hashrate = dboscalar("select hashrate from hashuser where algo=:algo and userid=:userid order by time desc limit 1", array( + ':algo' => $item['algo'], + ':userid' => $item['userid'] + )); + $stats->hashrate_bad = 0; + $stats->algo = $item['algo']; + } + + $percent = 20; + $user_rate = yaamp_user_rate($item['userid'], $item['algo']); + + $stats->hashrate = round(($stats->hashrate * (100 - $percent) + $user_rate * $percent) / 100); + if ($stats->hashrate < 1000) + $stats->hashrate = 0; + + $user_rate_bad = yaamp_user_rate_bad($item['userid'], $item['algo']); + + $stats->hashrate_bad = round(($stats->hashrate_bad * (100 - $percent) + $user_rate_bad * $percent) / 100); + if ($stats->hashrate_bad < 1000) + $stats->hashrate_bad = 0; + + $stats->save(); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + + $step = 15; + $tm = floor(time() / $step / 60) * $step * 60; + + $list = dbolist("select distinct jobid from jobsubmits where time>$tm"); + foreach ($list as $item) { + $jobid = $item['jobid']; + + $stats = getdbosql('db_hashrenter', "time=$tm and jobid=$jobid"); + if (!$stats) { + $stats = new db_hashrenter; + // $stats->renterid = ; + $stats->jobid = $item['jobid']; + $stats->time = $tm; + $stats->hashrate = dboscalar("select hashrate from hashrenter where jobid=:jobid order by time desc limit 1", array( + ':jobid' => $jobid + )); + $stats->hashrate_bad = 0; //dboscalar("select hashrate_bad from hashrenter where jobid=$jobid order by time desc limit 1"); + } + + $percent = 20; + $job_rate = yaamp_job_rate($jobid); + + $stats->hashrate = round(($stats->hashrate * (100 - $percent) + $job_rate * $percent) / 100); + if ($stats->hashrate < 1000) + $stats->hashrate = 0; + + $job_rate_bad = yaamp_job_rate_bad($jobid); + + $stats->hashrate_bad = round(($stats->hashrate_bad * (100 - $percent) + $job_rate_bad * $percent) / 100); + if ($stats->hashrate_bad < 1000) + $stats->hashrate_bad = 0; + + $stats->save(); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + + $tm = floor(time() / $step / 60) * $step * 60; + $d = time() - 24 * 60 * 60; + + $list = getdbolist('db_accounts', "balance>0 OR last_earning>$d"); + foreach ($list as $user) { + $stats = getdbosql('db_balanceuser', "time=$tm and userid=$user->id"); + if (!$stats) { + $stats = new db_balanceuser; + $stats->userid = $user->id; + $stats->time = $tm; + } + + // $refcoin = getdbo('db_coins', $user->coinid); + // if(!$refcoin) $refcoin = getdbosql('db_coins', "symbol='BTC'"); + // if(!$refcoin->price || !$refcoin->price2) continue; + + // $pending1 = dboscalar("select sum(amount*price) from earnings where coinid=$refcoin->id and status!=2 and userid=$user->id"); + // $pending2 = dboscalar("select sum(amount*price) from earnings where coinid!=$refcoin->id and status!=2 and userid=$user->id"); + + $stats->pending = yaamp_convert_earnings_user($user, "status!=2"); + $stats->pending = bitcoinvaluetoa($stats->pending); - $list = dbolist("select distinct jobid from jobsubmits where time>$tm"); - foreach($list as $item) - { - $jobid = $item['jobid']; - - $stats = getdbosql('db_hashrenter', "time=$tm and jobid=$jobid"); - if(!$stats) - { - $stats = new db_hashrenter; - // $stats->renterid = ; - $stats->jobid = $item['jobid']; - $stats->time = $tm; - $stats->hashrate = dboscalar("select hashrate from hashrenter where jobid=:jobid order by time desc limit 1", array(':jobid'=>$jobid)); - $stats->hashrate_bad = 0; //dboscalar("select hashrate_bad from hashrenter where jobid=$jobid order by time desc limit 1"); - } - - $percent = 20; - $job_rate = yaamp_job_rate($jobid); - - $stats->hashrate = round(($stats->hashrate*(100-$percent) + $job_rate*$percent) / 100); - if($stats->hashrate < 1000) $stats->hashrate = 0; - - $job_rate_bad = yaamp_job_rate_bad($jobid); - - $stats->hashrate_bad = round(($stats->hashrate_bad*(100-$percent) + $job_rate_bad*$percent) / 100); - if($stats->hashrate_bad < 1000) $stats->hashrate_bad = 0; - - $stats->save(); - } - - //////////////////////////////////////////////////////////////////////////////////////////////////// - - $tm = floor(time()/$step/60)*$step*60; - $d = time()-24*60*60; - - $list = getdbolist('db_accounts', "balance>0 OR last_earning>$d"); - foreach($list as $user) - { - $stats = getdbosql('db_balanceuser', "time=$tm and userid=$user->id"); - if(!$stats) - { - $stats = new db_balanceuser; - $stats->userid = $user->id; - $stats->time = $tm; - } - -// $refcoin = getdbo('db_coins', $user->coinid); -// if(!$refcoin) $refcoin = getdbosql('db_coins', "symbol='BTC'"); -// if(!$refcoin->price || !$refcoin->price2) continue; - -// $pending1 = dboscalar("select sum(amount*price) from earnings where coinid=$refcoin->id and status!=2 and userid=$user->id"); -// $pending2 = dboscalar("select sum(amount*price) from earnings where coinid!=$refcoin->id and status!=2 and userid=$user->id"); - - $stats->pending = yaamp_convert_earnings_user($user, "status!=2"); - $stats->pending = bitcoinvaluetoa($stats->pending); - - $stats->balance = $user->balance; - $stats->save(); - - $id = dboscalar("select id from earnings where userid=$user->id order by id desc limit 100, 1"); - if($id) dborun("delete from earnings where status=2 and userid=$user->id and id<$id"); - } + $stats->balance = $user->balance; + $stats->save(); + + $id = dboscalar("select id from earnings where userid=$user->id order by id desc limit 100, 1"); + if ($id) + dborun("delete from earnings where status=2 and userid=$user->id and id<$id"); + } } - - diff --git a/web/yaamp/core/backend/system.php b/web/yaamp/core/backend/system.php index 3a9e9e9ab..fae92d6ce 100644 --- a/web/yaamp/core/backend/system.php +++ b/web/yaamp/core/backend/system.php @@ -2,357 +2,356 @@ function BackendDoBackup() { - $d = date('Y-m-d-H', time()); - $filename = "/root/backup/yaamp-$d.sql"; - - if (is_readable("/usr/bin/xz")) { - $ziptool = "xz --threads=4"; $ext = ".xz"; - } else { - $ziptool = "gzip"; $ext = ".gz"; - } - - include_once("/etc/yiimp/keys.php"); - - $host = YAAMP_DBHOST; - $db = YAAMP_DBNAME; - - $user = YIIMP_MYSQLDUMP_USER; - $pass = YIIMP_MYSQLDUMP_PASS; - - $d = date('Y-m-d-H', time()); - $filename = YIIMP_MYSQLDUMP_PATH.DIRECTORY_SEPARATOR."$db-$d.sql"; - - if (1) { - // faster on huge databases if the disk is fast (nvme), reduce the db lock time - system("mysqldump -h $host -u$user -p$pass --skip-extended-insert $db > $filename"); - shell_exec("$ziptool $filename &"); // compress then the .sql in background (db is no more locked) - } else { - // previous method (ok on small pools) - system("mysqldump -h $host -u$user -p$pass --skip-extended-insert $db | $ziptool > $filename$ext"); - } + $d = date('Y-m-d-H', time()); + $filename = "/root/backup/yaamp-$d.sql"; + + if (is_readable("/usr/bin/xz")) { + $ziptool = "xz --threads=4"; + $ext = ".xz"; + } else { + $ziptool = "gzip"; + $ext = ".gz"; + } + + include_once("/etc/yiimp/keys.php"); + + $host = YAAMP_DBHOST; + $db = YAAMP_DBNAME; + + $user = YIIMP_MYSQLDUMP_USER; + $pass = YIIMP_MYSQLDUMP_PASS; + + $d = date('Y-m-d-H', time()); + $filename = YIIMP_MYSQLDUMP_PATH . DIRECTORY_SEPARATOR . "$db-$d.sql"; + + if (1) { + // faster on huge databases if the disk is fast (nvme), reduce the db lock time + system("mysqldump -h $host -u$user -p$pass --skip-extended-insert $db > $filename"); + shell_exec("$ziptool $filename &"); // compress then the .sql in background (db is no more locked) + } else { + // previous method (ok on small pools) + system("mysqldump -h $host -u$user -p$pass --skip-extended-insert $db | $ziptool > $filename$ext"); + } } function BackendQuickClean() { - $coins = getdbolist('db_coins', "installed"); + $coins = getdbolist('db_coins', "installed"); - foreach($coins as $coin) - { - $delay = time() - 7*24*60*60; + foreach ($coins as $coin) { + $delay = time() - 7 * 24 * 60 * 60; - $id = dboscalar("select id from blocks where coin_id=$coin->id and time<$delay and - id not in (select blockid from earnings where coinid=$coin->id) - order by id desc limit 200, 1"); + $id = dboscalar("select id from blocks where coin_id=$coin->id and time<$delay and + id not in (select blockid from earnings where coinid=$coin->id) + order by id desc limit 200, 1"); - if($id) dborun("delete from blocks where coin_id=$coin->id and time<$delay and - id not in (select blockid from earnings where coinid=$coin->id) and id<$id"); - } + if ($id) + dborun("delete from blocks where coin_id=$coin->id and time<$delay and + id not in (select blockid from earnings where coinid=$coin->id) and id<$id"); + } - dborun("delete from earnings where blockid in (select id from blocks where category='orphan')"); - dborun("delete from earnings where blockid not in (select id from blocks)"); - dborun("UPDATE blocks SET amount=0 WHERE category='orphan' AND amount>0"); + dborun("delete from earnings where blockid in (select id from blocks where category='orphan')"); + dborun("delete from earnings where blockid not in (select id from blocks)"); + dborun("UPDATE blocks SET amount=0 WHERE category='orphan' AND amount>0"); } -function marketHistoryPrune($symbol="") +function marketHistoryPrune($symbol = "") { - $delay2M = settings_get("history_prune_delay", time() - 61*24*60*60); // 2 months - dborun("DELETE FROM market_history WHERE time < ".intval($delay2M)); - - // Prune records older than 1 week, one max per hour - $delay7D = time() - 7*24*60*60; - $sqlFilter = (!empty($symbol)) ? "AND C.symbol='$symbol'" : ''; - $prune = dbolist("SELECT idcoin, idmarket, - AVG(MH.price) AS price, AVG(MH.price2) AS price2, MAX(MH.balance) AS balance, - MIN(MH.id) AS firstid, COUNT(MH.id) AS nbrecords, (MH.time DIV 3600) AS ival - FROM market_history MH - INNER JOIN coins C ON C.id = MH.idcoin - WHERE MH.time < $delay7D $sqlFilter - GROUP BY MH.idcoin, MH.idmarket, ival - HAVING nbrecords > 1"); - - $nbDel = 0; $nbUpd = 0; - foreach ($prune as $row) { - if (empty($row['idmarket'])) - $sqlFilter = "idcoin=:idcoin AND idmarket IS NULL"; - else - $sqlFilter = "idcoin=:idcoin AND idmarket=".intval($row['idmarket']); - - $nbDel += dborun("DELETE FROM market_history WHERE $sqlFilter AND id != :firstid - AND (time DIV 3600) = :interval", array( - ':idcoin' => $row['idcoin'], - ':interval'=> $row['ival'], - ':firstid' => $row['firstid'], - )); - - $nbUpd += dborun("UPDATE market_history SET time=:interval, - balance=:balance, price=:price, price2=:price2 - WHERE id=:firstid", array( - ':interval' => (3600 * $row['ival']), - ':balance' => $row['balance'], - ':price' => $row['price'], ':price2' => $row['price2'], - ':firstid' => $row['firstid'], - )); - } - if ($nbDel) debuglog("history: $nbDel records pruned, $nbUpd updated $symbol"); + $delay2M = settings_get("history_prune_delay", time() - 61 * 24 * 60 * 60); // 2 months + dborun("DELETE FROM market_history WHERE time < " . intval($delay2M)); + + // Prune records older than 1 week, one max per hour + $delay7D = time() - 7 * 24 * 60 * 60; + $sqlFilter = (!empty($symbol)) ? "AND C.symbol='$symbol'" : ''; + $prune = dbolist("SELECT idcoin, idmarket, + AVG(MH.price) AS price, AVG(MH.price2) AS price2, MAX(MH.balance) AS balance, + MIN(MH.id) AS firstid, COUNT(MH.id) AS nbrecords, (MH.time DIV 3600) AS ival + FROM market_history MH + INNER JOIN coins C ON C.id = MH.idcoin + WHERE MH.time < $delay7D $sqlFilter + GROUP BY MH.idcoin, MH.idmarket, ival + HAVING nbrecords > 1"); + + $nbDel = 0; + $nbUpd = 0; + foreach ($prune as $row) { + if (empty($row['idmarket'])) + $sqlFilter = "idcoin=:idcoin AND idmarket IS NULL"; + else + $sqlFilter = "idcoin=:idcoin AND idmarket=" . intval($row['idmarket']); + + $nbDel += dborun("DELETE FROM market_history WHERE $sqlFilter AND id != :firstid + AND (time DIV 3600) = :interval", array( + ':idcoin' => $row['idcoin'], + ':interval' => $row['ival'], + ':firstid' => $row['firstid'] + )); + + $nbUpd += dborun("UPDATE market_history SET time=:interval, + balance=:balance, price=:price, price2=:price2 + WHERE id=:firstid", array( + ':interval' => (3600 * $row['ival']), + ':balance' => $row['balance'], + ':price' => $row['price'], + ':price2' => $row['price2'], + ':firstid' => $row['firstid'] + )); + } + if ($nbDel) + debuglog("history: $nbDel records pruned, $nbUpd updated $symbol"); } function consolidateOldShares() { - $delay = time() - 24*60*60; // drop invalid shares not used anymore (24h graph only) - dborun("DELETE FROM shares WHERE time < $delay AND valid = 0"); - - $t1 = time() - 48*3600; - $list = dbolist("SELECT coinid, userid, workerid, algo, AVG(time) AS time, SUM(difficulty) AS difficulty, AVG(share_diff) AS share_diff ". - "FROM shares WHERE valid AND time < $t1 AND pid > 0 ". - "GROUP BY coinid, userid, workerid, algo ORDER BY coinid, userid"); - $pruned = 0; - foreach ($list as $row) { - $share = new db_shares; - $share->isNewRecord = true; - $share->coinid = $row['coinid']; - $share->userid = $row['userid']; - $share->workerid = $row['workerid']; - $share->algo = $row['algo']; - $share->time = (int) $row['time']; - $share->difficulty = $row['difficulty']; - $share->share_diff = $row['share_diff']; - $share->valid = 1; - $share->pid = 0; - if ($share->save()) { - $pruned += dborun("DELETE FROM shares WHERE userid=:userid AND coinid=:coinid AND workerid=:worker AND pid > 0 AND time < $t1", array( - ':userid' => $row['userid'], - ':coinid' => $row['coinid'], - ':worker' => $row['workerid'], - )); - } - } - if ($pruned) { - debuglog("$pruned old shares records were consolidated"); - } - return $pruned; + $delay = time() - 24 * 60 * 60; // drop invalid shares not used anymore (24h graph only) + dborun("DELETE FROM shares WHERE time < $delay AND valid = 0"); + + $t1 = time() - 48 * 3600; + $list = dbolist("SELECT coinid, userid, workerid, algo, AVG(time) AS time, SUM(difficulty) AS difficulty, AVG(share_diff) AS share_diff " . "FROM shares WHERE valid AND time < $t1 AND pid > 0 " . "GROUP BY coinid, userid, workerid, algo ORDER BY coinid, userid"); + $pruned = 0; + foreach ($list as $row) { + $share = new db_shares; + $share->isNewRecord = true; + $share->coinid = $row['coinid']; + $share->userid = $row['userid']; + $share->workerid = $row['workerid']; + $share->algo = $row['algo']; + $share->time = (int) $row['time']; + $share->difficulty = $row['difficulty']; + $share->share_diff = $row['share_diff']; + $share->valid = 1; + $share->pid = 0; + if ($share->save()) { + $pruned += dborun("DELETE FROM shares WHERE userid=:userid AND coinid=:coinid AND workerid=:worker AND pid > 0 AND time < $t1", array( + ':userid' => $row['userid'], + ':coinid' => $row['coinid'], + ':worker' => $row['workerid'] + )); + } + } + if ($pruned) { + debuglog("$pruned old shares records were consolidated"); + } + return $pruned; } function BackendCleanDatabase() { - marketHistoryPrune(); - - $delay = time() - 60*24*60*60; - dborun("DELETE from blocks where time<$delay"); - dborun("delete from hashstats where time<$delay"); - dborun("delete from payouts where time<$delay"); - dborun("delete from rentertxs where time<$delay"); - dborun("DELETE FROM shares WHERE time<$delay"); - - $delay = time() - 2*24*60*60; - dborun("delete from stats where time<$delay"); - dborun("delete from hashrate where time<$delay"); - dborun("delete from hashuser where time<$delay"); - dborun("delete from hashrenter where time<$delay"); - dborun("delete from balanceuser where time<$delay"); - dborun("delete from exchange where send_time<$delay"); - dborun("DELETE FROM shares WHERE time<$delay AND coinid NOT IN (select id from coins)"); - - consolidateOldShares(); - - $delay = time() - 12*60*60; - dborun("delete from earnings where status=2 and mature_time<$delay"); + marketHistoryPrune(); + + $delay = time() - 60 * 24 * 60 * 60; + dborun("DELETE from blocks where time<$delay"); + dborun("delete from hashstats where time<$delay"); + dborun("delete from payouts where time<$delay"); + dborun("delete from rentertxs where time<$delay"); + dborun("DELETE FROM shares WHERE time<$delay"); + + $delay = time() - 2 * 24 * 60 * 60; + dborun("delete from stats where time<$delay"); + dborun("delete from hashrate where time<$delay"); + dborun("delete from hashuser where time<$delay"); + dborun("delete from hashrenter where time<$delay"); + dborun("delete from balanceuser where time<$delay"); + dborun("delete from exchange where send_time<$delay"); + dborun("DELETE FROM shares WHERE time<$delay AND coinid NOT IN (select id from coins)"); + + consolidateOldShares(); + + $delay = time() - 12 * 60 * 60; + dborun("delete from earnings where status=2 and mature_time<$delay"); } function BackendOptimizeTables() { - $list = dbolist("show tables"); - foreach($list as $item) - { - $tablename = $item['Tables_in_yaamp']; - dbolist("optimize table $tablename"); - - sleep(1); - } + $list = dbolist("show tables"); + foreach ($list as $item) { + $tablename = $item['Tables_in_yaamp']; + dbolist("optimize table $tablename"); + + sleep(1); + } } function BackendProcessList() { - $list = dbolist("show processlist"); - foreach($list as $item) - { - $conn = getdbo('db_connections', $item['Id']); - if(!$conn) - { - $conn = new db_connections; - $conn->id = $item['Id']; - $conn->user = $item['User']; - $conn->host = $item['Host']; - $conn->db = $item['db']; - $conn->created = time(); - } - - $conn->idle = $item['Time']; - $conn->last = time(); - - $conn->save(); - } - - $delay = time() - 5*60; - dborun("delete from connections where last<$delay"); + $list = dbolist("show processlist"); + foreach ($list as $item) { + $conn = getdbo('db_connections', $item['Id']); + if (!$conn) { + $conn = new db_connections; + $conn->id = $item['Id']; + $conn->user = $item['User']; + $conn->host = $item['Host']; + $conn->db = $item['db']; + $conn->created = time(); + } + + $conn->idle = $item['Time']; + $conn->last = time(); + + $conn->save(); + } + + $delay = time() - 5 * 60; + dborun("delete from connections where last<$delay"); } function BackendRunCoinActions() { -// debuglog(__FUNCTION__); + // debuglog(__FUNCTION__); -// $hostname = exec("hostname"); -// $server = getdbosql('db_servers', "name='$hostname'"); -// if(!$server) -// { -// $server = new db_servers; -// $server->name = $hostname; -// } + // $hostname = exec("hostname"); + // $server = getdbosql('db_servers', "name='$hostname'"); + // if(!$server) + // { + // $server = new db_servers; + // $server->name = $hostname; + // } -// $server->uptime = exec("uptime"); -// $server->save(); + // $server->uptime = exec("uptime"); + // $server->save(); - ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// -// if($hostname == 'yaamp') -// { -// $mining = getdbosql('db_mining'); -// exec("pgrep stratum", $ids, $ret); + // if($hostname == 'yaamp') + // { + // $mining = getdbosql('db_mining'); + // exec("pgrep stratum", $ids, $ret); -// $mining->stratumids = implode(',', $ids); -// $mining->save(); -// } + // $mining->stratumids = implode(',', $ids); + // $mining->save(); + // } - ///////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////////////////////////// -// $coins = getdbolist('db_coins'); -// foreach($coins as $coin) -// { -// if(empty($coin->action) || empty($coin->program) || empty($coin->conf_folder)) continue; -// $hostname = exec("hostname"); -// if($hostname != $coin->rpchost) continue; -// switch($coin->action) -// { -// case 1: -// debuglog("starting $coin->program"); + // $coins = getdbolist('db_coins'); + // foreach($coins as $coin) + // { + // if(empty($coin->action) || empty($coin->program) || empty($coin->conf_folder)) continue; + // $hostname = exec("hostname"); + // if($hostname != $coin->rpchost) continue; + // switch($coin->action) + // { + // case 1: + // debuglog("starting $coin->program"); -// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; -// @unlink($debugfile); + // $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; + // @unlink($debugfile); -// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); -// $coin->enable = true; -// break; + // exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); + // $coin->enable = true; + // break; -// case 2: -// debuglog("stopping $coin->program"); -// exec(YAAMP_BIN."/$coin->program stop"); -// break; + // case 2: + // debuglog("stopping $coin->program"); + // exec(YAAMP_BIN."/$coin->program stop"); + // break; -// case 4: -// debuglog("restarting $coin->program"); -// exec(YAAMP_BIN."/$coin->program stop"); -// sleep(10); + // case 4: + // debuglog("restarting $coin->program"); + // exec(YAAMP_BIN."/$coin->program stop"); + // sleep(10); -// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; -// @unlink($debugfile); + // $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; + // @unlink($debugfile); -// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); -// $coin->enable = true; -// break; + // exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); + // $coin->enable = true; + // break; -// case 3: -// debuglog("reset blockchain $coin->conf_folder"); -// $folder = YAAMP_WALLETS."/$coin->conf_folder"; + // case 3: + // debuglog("reset blockchain $coin->conf_folder"); + // $folder = YAAMP_WALLETS."/$coin->conf_folder"; -// // exec("rm {$folder}/blk*.dat"); -// exec("rm -fr {$folder}/database"); -// break; + // // exec("rm {$folder}/blk*.dat"); + // exec("rm -fr {$folder}/database"); + // break; -// case 5: -// $t = time(); -// $coin->rpcport = $coin->id*2+10240; -// $coin->rpcuser = 'yaamprpc'; -// $coin->rpcpasswd = md5("$t.$coin->id"); -// $coin->save(); + // case 5: + // $t = time(); + // $coin->rpcport = $coin->id*2+10240; + // $coin->rpcuser = 'yaamprpc'; + // $coin->rpcpasswd = md5("$t.$coin->id"); + // $coin->save(); -// $configfile = YAAMP_WALLETS."/$coin->conf_folder/".substr($coin->conf_folder, 1).".conf"; -// debuglog("make config $configfile"); + // $configfile = YAAMP_WALLETS."/$coin->conf_folder/".substr($coin->conf_folder, 1).".conf"; + // debuglog("make config $configfile"); -// $stratum_port = 3433; + // $stratum_port = 3433; -// if($coin->algo == 'sha256') -// $stratum_port = 3333; + // if($coin->algo == 'sha256') + // $stratum_port = 3333; -// else if($coin->algo == 'scrypt') -// $stratum_port = 3433; + // else if($coin->algo == 'scrypt') + // $stratum_port = 3433; -// else if($coin->algo == 'x11') -// $stratum_port = 3533; + // else if($coin->algo == 'x11') + // $stratum_port = 3533; -// else if($coin->algo == 'x13') -// $stratum_port = 3633; + // else if($coin->algo == 'x13') + // $stratum_port = 3633; -// else if($coin->algo == 'x14') -// $stratum_port = 3933; + // else if($coin->algo == 'x14') + // $stratum_port = 3933; -// else if($coin->algo == 'x15') -// $stratum_port = 3733; + // else if($coin->algo == 'x15') + // $stratum_port = 3733; -// else if($coin->algo == 'nist5') -// $stratum_port = 3833; + // else if($coin->algo == 'nist5') + // $stratum_port = 3833; -// else if($coin->algo == 'quark') -// $stratum_port = 4033; + // else if($coin->algo == 'quark') + // $stratum_port = 4033; -// else if($coin->algo == 'fresh') -// $stratum_port = 4133; + // else if($coin->algo == 'fresh') + // $stratum_port = 4133; -// else if($coin->algo == 'neoscrypt') -// $stratum_port = 4233; + // else if($coin->algo == 'neoscrypt') + // $stratum_port = 4233; -// else if($coin->algo == 'scryptn') -// $stratum_port = 4333; + // else if($coin->algo == 'scryptn') + // $stratum_port = 4333; -// else if($coin->algo == 'lyra2') -// $stratum_port = 4433; + // else if($coin->algo == 'lyra2') + // $stratum_port = 4433; -// else if($coin->algo == 'blake') -// $stratum_port = 4533; + // else if($coin->algo == 'blake') + // $stratum_port = 4533; -// // else if($coin->algo == 'keccak') -// // $stratum_port = 3933; + // // else if($coin->algo == 'keccak') + // // $stratum_port = 3933; -// $data = "server=1\ndeamon=1\ngen=0\nrpcuser=$coin->rpcuser\nrpcpassword=$coin->rpcpasswd\nrpcport=$coin->rpcport\nrpcallowip=10.*.*.*\nblocknotify=".YAAMP_BIN."/blocknotify.sh --host yaamp --port $stratum_port --id $coin->id --block %s --password tu8tu5\n"; -// file_put_contents($configfile, $data); + // $data = "server=1\ndeamon=1\ngen=0\nrpcuser=$coin->rpcuser\nrpcpassword=$coin->rpcpasswd\nrpcport=$coin->rpcport\nrpcallowip=10.*.*.*\nblocknotify=".YAAMP_BIN."/blocknotify.sh --host yaamp --port $stratum_port --id $coin->id --block %s --password tu8tu5\n"; + // file_put_contents($configfile, $data); -// debuglog("starting $coin->program"); + // debuglog("starting $coin->program"); -// $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; -// @unlink($debugfile); + // $debugfile = YAAMP_WALLETS."/$coin->conf_folder/debug.log"; + // @unlink($debugfile); -// exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); -// $coin->enable = true; + // exec(YAAMP_BIN."/run-background.sh ".YAAMP_BIN."/$coin->program"); + // $coin->enable = true; -// break; -// } + // break; + // } -// $coin->action = null; -// $coin->save(); -// } + // $coin->action = null; + // $coin->save(); + // } -// $filename = '/root/stratum/stratum.log'; -// $filesize = filesize($filename); + // $filename = '/root/stratum/stratum.log'; + // $filesize = filesize($filename); -// $oldsize = controller()->memcache->get('stratum_log_size'); -// if($oldsize == $filesize) return; + // $oldsize = controller()->memcache->get('stratum_log_size'); + // if($oldsize == $filesize) return; -// $file = fopen($filename, $r); -// if(!$file) return; + // $file = fopen($filename, $r); + // if(!$file) return; -// fseek($file, $oldsize); -// $data = fread($file, $filesize-$oldsize); -// fclose($file); + // fseek($file, $oldsize); + // $data = fread($file, $filesize-$oldsize); + // fclose($file); -// controller()->memcache->set('stratum_log_size', $filesize); -// system("echo \"$data\" | mail -s \"yiimp server\" ".YAAMP_ADMIN_EMAIL); + // controller()->memcache->set('stratum_log_size', $filesize); + // system("echo \"$data\" | mail -s \"yiimp server\" ".YAAMP_ADMIN_EMAIL); } - diff --git a/web/yaamp/core/backend/users.php b/web/yaamp/core/backend/users.php index 443443d10..11499d358 100644 --- a/web/yaamp/core/backend/users.php +++ b/web/yaamp/core/backend/users.php @@ -2,103 +2,97 @@ function BackendUsersUpdate() { - $t1 = microtime(true); - - $list = getdbolist('db_accounts', "coinid IS NULL OR IFNULL(coinsymbol,'') != ''"); - foreach($list as $user) - { - $old_usercoinid = $user->coinid; - // debuglog("testing user $user->username, $user->coinsymbol"); - if(!empty($user->coinsymbol)) - { - $coin = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$user->coinsymbol)); - $user->coinsymbol = ''; - - if($coin) - { - if($user->coinid == $coin->id) - { - $user->save(); - continue; - } - - $remote = new WalletRPC($coin); - - $b = $remote->validateaddress($user->username); - if(arraySafeVal($b,'isvalid')) - { - $old_balance = $user->balance; - if($user->balance > 0) - { - $coinref = getdbo('db_coins', $user->coinid); - if(!$coinref) { - if (YAAMP_ALLOW_EXCHANGE) - $coinref = getdbosql('db_coins', "symbol='BTC'"); - else - continue; - } - - $user->balance = $user->balance * $coinref->price / $coin->price; - } - - $user->coinid = $coin->id; - $user->save(); - - debuglog("{$user->username} converted to {$user->balance} {$coin->symbol} (old: $old_balance)"); - continue; - } - } - } - - $user->coinid = 0; - - $order = YAAMP_ALLOW_EXCHANGE ? "difficulty" : "id"; - $coins = getdbolist('db_coins', "enable ORDER BY $order DESC"); - foreach($coins as $coin) - { - $remote = new WalletRPC($coin); - - $b = $remote->validateaddress($user->username); - if(!arraySafeVal($b,'isvalid')) continue; - - if ($old_usercoinid && $old_usercoinid != $coin->id) { - debuglog("{$user->username} set to {$coin->symbol}, balance {$user->balance} reset to 0"); - $user->balance = 0; - } - $user->coinid = $coin->id; - break; - } - - if (empty($user->coinid)) { - debuglog("{$user->hostaddr} - {$user->username} is an unknown address!"); - } - - $user->save(); - } - -// $delay=time()-60*60; -// $list = dborun("UPDATE coins SET dontsell=1 WHERE id in (SELECT coinid FROM accounts WHERE balance>0 OR last_earning>$delay GROUP BY coinid)"); -// $list = dborun("UPDATE coins SET dontsell=0 WHERE id not in (SELECT coinid FROM accounts WHERE balance>0 OR last_earning>$delay GROUP BY coinid)"); - - -// $list = getdbolist('db_workers', "dns is null"); -// foreach($list as $worker) -// { -// $worker->dns = $worker->ip; -// $res = system("resolveip $worker->ip"); - -// if($res) -// { -// $a = explode(' ', $res); -// if($a && isset($a[5])) -// $worker->dns = $a[5]; -// } - -// $worker->save(); -// } - - $d1 = microtime(true) - $t1; - controller()->memcache->add_monitoring_function(__METHOD__, $d1); + $t1 = microtime(true); + + $list = getdbolist('db_accounts', "coinid IS NULL OR IFNULL(coinsymbol,'') != ''"); + foreach ($list as $user) { + $old_usercoinid = $user->coinid; + // debuglog("testing user $user->username, $user->coinsymbol"); + if (!empty($user->coinsymbol)) { + $coin = getdbosql('db_coins', "symbol=:symbol", array( + ':symbol' => $user->coinsymbol + )); + $user->coinsymbol = ''; + + if ($coin) { + if ($user->coinid == $coin->id) { + $user->save(); + continue; + } + + $remote = new WalletRPC($coin); + + $b = $remote->validateaddress($user->username); + if (arraySafeVal($b, 'isvalid')) { + $old_balance = $user->balance; + if ($user->balance > 0) { + $coinref = getdbo('db_coins', $user->coinid); + if (!$coinref) { + if (YAAMP_ALLOW_EXCHANGE) + $coinref = getdbosql('db_coins', "symbol='BTC'"); + else + continue; + } + + $user->balance = $user->balance * $coinref->price / $coin->price; + } + + $user->coinid = $coin->id; + $user->save(); + + debuglog("{$user->username} converted to {$user->balance} {$coin->symbol} (old: $old_balance)"); + continue; + } + } + } + + $user->coinid = 0; + + $order = YAAMP_ALLOW_EXCHANGE ? "difficulty" : "id"; + $coins = getdbolist('db_coins', "enable ORDER BY $order DESC"); + foreach ($coins as $coin) { + $remote = new WalletRPC($coin); + + $b = $remote->validateaddress($user->username); + if (!arraySafeVal($b, 'isvalid')) + continue; + + if ($old_usercoinid && $old_usercoinid != $coin->id) { + debuglog("{$user->username} set to {$coin->symbol}, balance {$user->balance} reset to 0"); + $user->balance = 0; + } + $user->coinid = $coin->id; + break; + } + + if (empty($user->coinid)) { + debuglog("{$user->hostaddr} - {$user->username} is an unknown address!"); + } + + $user->save(); + } + + // $delay=time()-60*60; + // $list = dborun("UPDATE coins SET dontsell=1 WHERE id in (SELECT coinid FROM accounts WHERE balance>0 OR last_earning>$delay GROUP BY coinid)"); + // $list = dborun("UPDATE coins SET dontsell=0 WHERE id not in (SELECT coinid FROM accounts WHERE balance>0 OR last_earning>$delay GROUP BY coinid)"); + + + // $list = getdbolist('db_workers', "dns is null"); + // foreach($list as $worker) + // { + // $worker->dns = $worker->ip; + // $res = system("resolveip $worker->ip"); + + // if($res) + // { + // $a = explode(' ', $res); + // if($a && isset($a[5])) + // $worker->dns = $a[5]; + // } + + // $worker->save(); + // } + + $d1 = microtime(true) - $t1; + controller()->memcache->add_monitoring_function(__METHOD__, $d1); } - - diff --git a/web/yaamp/core/common/libUtil.php b/web/yaamp/core/common/libUtil.php index 22f0c29e6..450ee9069 100644 --- a/web/yaamp/core/common/libUtil.php +++ b/web/yaamp/core/common/libUtil.php @@ -1,174 +1,183 @@ = 1) $text = $text.' ====================='; - error_log("$t, $d - $text"); + if ($d >= 1) $text = $text . ' ====================='; + error_log("$t, $d - $text"); - $global_lastlog = $t; + $global_lastlog = $t; } // - -function LimitRequest($name, $limit=1) +function LimitRequest($name, $limit = 1) { - $t = controller()->memcache->get("yaamp-timestamp-$name-{$_SERVER['REMOTE_ADDR']}"); - $a = controller()->memcache->get("yaamp-average-$name-{$_SERVER['REMOTE_ADDR']}"); - - if(!$a || !$t) $a = $limit; - - else - { - $p = 33; - $a = ($a * (100-$p) + (microtime(true)-$t) * $p) / 100; - } - - if($a < $limit) return false; - - controller()->memcache->set("yaamp-timestamp-$name-{$_SERVER['REMOTE_ADDR']}", microtime(true), 300); - controller()->memcache->set("yaamp-average-$name-{$_SERVER['REMOTE_ADDR']}", $a, 300); - - return true; + $t = controller() + ->memcache + ->get("yaamp-timestamp-$name-{$_SERVER['REMOTE_ADDR']}"); + $a = controller() + ->memcache + ->get("yaamp-average-$name-{$_SERVER['REMOTE_ADDR']}"); + + if (!$a || !$t) $a = $limit; + + else + { + $p = 33; + $a = ($a * (100 - $p) + (microtime(true) - $t) * $p) / 100; + } + + if ($a < $limit) return false; + + controller() + ->memcache + ->set("yaamp-timestamp-$name-{$_SERVER['REMOTE_ADDR']}", microtime(true) , 300); + controller() + ->memcache + ->set("yaamp-average-$name-{$_SERVER['REMOTE_ADDR']}", $a, 300); + + return true; } function getuserparam($address) { - if(empty($address)) return null; + if (empty($address)) return null; - $address = trim(substr($address, 0, 98)); - $user = getdbosql('db_accounts', "username=:ad", array(':ad'=>$address)); + $address = trim(substr($address, 0, 98)); + $user = getdbosql('db_accounts', "username=:ad", array( + ':ad' => $address + )); - return $user; + return $user; } function getrenterparam($address) { - if(empty($address)) return null; + if (empty($address)) return null; - $address = trim(substr($address, 0, 98)); - $renter = getdbosql('db_renters', "address=:ad", array(':ad'=>$address)); + $address = trim(substr($address, 0, 98)); + $renter = getdbosql('db_renters', "address=:ad", array( + ':ad' => $address + )); - return $renter; + return $renter; } /////////////////////////////////////////////////////////// - function GetSSModulePath($name) { - $result = findfile('yaamp/models', "/\/{$name}.php/"); - if(!$result) - $result = findfile('yaamp/modules', "/\/{$name}.php/"); + $result = findfile('yaamp/models', "/\/{$name}.php/"); + if (!$result) $result = findfile('yaamp/modules', "/\/{$name}.php/"); -// debuglog($result); - return $result; + // debuglog($result); + return $result; } function findfile($path, $pattern) { - $result = null; - - $path = rtrim(str_replace("\\", "/", $path), '/') . '/*'; - foreach(glob($path) as $fullname) - { - if(is_dir($fullname)) - { - $result = findfile($fullname, $pattern); - if($result) break; - } - - else if(preg_match($pattern, $fullname)) - { - $result = $fullname; - break; - } - } - - return $result; + $result = null; + + $path = rtrim(str_replace("\\", "/", $path) , '/') . '/*'; + foreach (glob($path) as $fullname) + { + if (is_dir($fullname)) + { + $result = findfile($fullname, $pattern); + if ($result) break; + } + + else if (preg_match($pattern, $fullname)) + { + $result = $fullname; + break; + } + } + + return $result; } -function mydump($obj, $level=2) +function mydump($obj, $level = 2) { - CVarDumper::dump($obj, $level, true); - echo "
    "; + CVarDumper::dump($obj, $level, true); + echo "
    "; } -function mydumperror($obj, $level=2) +function mydumperror($obj, $level = 2) { - CVarDumper::dumperror($obj, $level); + CVarDumper::dumperror($obj, $level); } -function debuglog($string, $level=2) +function debuglog($string, $level = 2) { - if(is_object($string)) - { - mydumperror($string, $level); - return; - } - - if(is_array($string)) - { - mydumperror($string, $level); - return; - } - - $now = now(); - if(!is_dir(YAAMP_LOGS)) mkdir(YAAMP_LOGS); - error_log("[$now] $string\n", 3, YAAMP_LOGS."/debug.log"); + if (is_object($string)) + { + mydumperror($string, $level); + return; + } + + if (is_array($string)) + { + mydumperror($string, $level); + return; + } + + $now = now(); + if (!is_dir(YAAMP_LOGS)) mkdir(YAAMP_LOGS); + error_log("[$now] $string\n", 3, YAAMP_LOGS . "/debug.log"); } -function echolog($string, $level=2) +function echolog($string, $level = 2) { - $now = now(); - echo "[$now] $string\n"; + $now = now(); + echo "[$now] $string\n"; } function rentallog($string) { - $now = now(); - if(!is_dir(YAAMP_LOGS)) mkdir(YAAMP_LOGS); - error_log("[$now] $string\n", 3, YAAMP_LOGS."/rental.log"); + $now = now(); + if (!is_dir(YAAMP_LOGS)) mkdir(YAAMP_LOGS); + error_log("[$now] $string\n", 3, YAAMP_LOGS . "/rental.log"); - debuglog($string); + debuglog($string); } ///////////////////////////////////////////////////////////////////////////////////////// - function xmltoarray($xmlcontent) { - $xml = simplexml_load_string($xmlcontent); - $json = json_encode($xml); - $array = json_decode($json, true); + $xml = simplexml_load_string($xmlcontent); + $json = json_encode($xml); + $array = json_decode($json, true); - return $array; + return $array; } function XssFilter($data) { - $data = str_replace(">", "", $data); - $data = str_replace("<", "", $data); - $data = str_replace("'", "", $data); - $data = str_replace('"', "", $data); -// $data = str_replace(".", "", $data); - $data = str_replace("\\", "", $data); - $data = str_replace("&", "", $data); - $data = str_replace(";", "", $data); - -// mydump($data); die; - return $data; + $data = str_replace(">", "", $data); + $data = str_replace("<", "", $data); + $data = str_replace("'", "", $data); + $data = str_replace('"', "", $data); + // $data = str_replace(".", "", $data); + $data = str_replace("\\", "", $data); + $data = str_replace("&", "", $data); + $data = str_replace(";", "", $data); + + // mydump($data); die; + return $data; } -function showDatetimePicker($model, $attribute, $options='') +function showDatetimePicker($model, $attribute, $options = '') { - $name = "{$model->tableSchema->name}[{$attribute}]"; - $id = "{$model->tableSchema->name}_{$attribute}"; + $name = "{$model + ->tableSchema->name}[{$attribute}]"; + $id = "{$model + ->tableSchema->name}_{$attribute}"; - echo ""; - echo ""; } -function showDatetimePicker2($name, $value, $options='', $callback='null') +function showDatetimePicker2($name, $value, $options = '', $callback = 'null') { - $id = $name; - echo ""; - if(empty($value)) $value = $name; - echo ""; + if (empty($value)) $value = $name; + echo ""; } function showSubmitButton($name) { - echo "
    "; - echo CUFHtml::submitButton($name, array('id'=>'btnSubmit')); - echo "
    "; - echo ""; + echo "
    "; + echo CUFHtml::submitButton($name, array( + 'id' => 'btnSubmit' + )); + echo "
    "; + echo ""; } function InitMenuTabs($tabname) { - JavascriptReady("$('$tabname').tabs({ select: function(event, ui){ + JavascriptReady("$('$tabname').tabs({ select: function(event, ui){ window.location.replace(ui.tab.hash); return true;}});"); } function fetch_url($url) { -// debuglog("fetch_url($url)"); - $buffer = ''; + // debuglog("fetch_url($url)"); + $buffer = ''; - $file = @fopen($url, "r"); - if(!$file) return null; + $file = @fopen($url, "r"); + if (!$file) return null; - while(!feof($file)) - { - $line = fgets($file, 1024); - $buffer .= $line; - } + while (!feof($file)) + { + $line = fgets($file, 1024); + $buffer .= $line; + } - fclose($file); - return $buffer; + fclose($file); + return $buffer; } function gettempfile($ext) { - $phpsessid = session_id(); - $random = mt_rand(); + $phpsessid = session_id(); + $random = mt_rand(); - $filename = SANSSPACE_TEMP."\\{$phpsessid}-{$random}{$ext}"; - return $filename; + $filename = SANSSPACE_TEMP . "\\{$phpsessid}-{$random}{$ext}"; + return $filename; } function make_bitly_url($url, $format = 'xml', $version = '2.0.1') { - $login = 'o_1uu6u4g2h4'; - $appkey = 'R_433ebafeb24374d6c183c0fcbcc01575'; - - $bitly = 'http://api.bit.ly/shorten?version='.$version.'&longUrl='.urlencode($url).'&login='.$login.'&apiKey='.$appkey.'&format='.$format; - $response = file_get_contents($bitly); -// debuglog($response); - - if(strtolower($format) == 'json') - { - $json = @json_decode($response,true); - return $json['results'][$url]['shortUrl']; - } - else //xml - { - $xml = simplexml_load_string($response); - return 'bit.ly/'.$xml->results->nodeKeyVal->hash; - } + $login = 'o_1uu6u4g2h4'; + $appkey = 'R_433ebafeb24374d6c183c0fcbcc01575'; + + $bitly = 'http://api.bit.ly/shorten?version=' . $version . '&longUrl=' . urlencode($url) . '&login=' . $login . '&apiKey=' . $appkey . '&format=' . $format; + $response = file_get_contents($bitly); + // debuglog($response); + if (strtolower($format) == 'json') + { + $json = @json_decode($response, true); + return $json['results'][$url]['shortUrl']; + } + else + //xml + + { + $xml = simplexml_load_string($response); + return 'bit.ly/' . $xml + ->results + ->nodeKeyVal->hash; + } } function resolveShortURL($url1) { - $ch = curl_init("$url1"); + $ch = curl_init("$url1"); - curl_setopt($ch, CURLOPT_HEADER, true); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_ENCODING , "deflate,gzip"); + curl_setopt($ch, CURLOPT_HEADER, true); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_ENCODING, "deflate,gzip"); - $http_data = curl_exec($ch); - $curl_info = curl_getinfo($ch); - $headers = substr($http_data, 0, $curl_info["header_size"]); + $http_data = curl_exec($ch); + $curl_info = curl_getinfo($ch); + $headers = substr($http_data, 0, $curl_info["header_size"]); - preg_match("!\r\n(?:Location|URI): *(.*?) *\r\n!", $headers, $matches); - $url = $matches[1]; + preg_match("!\r\n(?:Location|URI): *(.*?) *\r\n!", $headers, $matches); + $url = $matches[1]; -// debuglog(" short $url1 -> $url"); - return empty($url)? $url1: $url; + // debuglog(" short $url1 -> $url"); + return empty($url) ? $url1 : $url; } function is_short_url($url) { - // 1. Overall URL length - May be a max of 30 charecters - if (strlen($url) > 30) return false; + // 1. Overall URL length - May be a max of 30 charecters + if (strlen($url) > 30) return false; - $parts = parse_url($url); + $parts = parse_url($url); - // No query string & no fragment - if ($parts["query"] || $parts["fragment"]) return false; + // No query string & no fragment + if ($parts["query"] || $parts["fragment"]) return false; - $path = $parts["path"]; - $pathParts = explode("/", $path); + $path = $parts["path"]; + $pathParts = explode("/", $path); - // 3. Number of '/' after protocol (http://) - Max 2 - if (count($pathParts) > 2) return false; + // 3. Number of '/' after protocol (http://) - Max 2 + if (count($pathParts) > 2) return false; - // 2. URL length after last '/' - May be a max of 10 characters - $lastPath = array_pop($pathParts); - if (strlen($lastPath) > 12) return false; + // 2. URL length after last '/' - May be a max of 10 characters + $lastPath = array_pop($pathParts); + if (strlen($lastPath) > 12) return false; - // 4. Max length of host - if (strlen($parts["host"]) > 10) return false; + // 4. Max length of host + if (strlen($parts["host"]) > 10) return false; - return true; + return true; } diff --git a/web/yaamp/core/common/libdbo.php b/web/yaamp/core/common/libdbo.php index f74d331b9..b4d238706 100644 --- a/web/yaamp/core/common/libdbo.php +++ b/web/yaamp/core/common/libdbo.php @@ -1,104 +1,106 @@ getTableSchema(); + $record = CActiveRecord::model($class); + $table = $record->getTableSchema(); + + $sql = "$table->primaryKey=:db_key"; + return $record->find($sql, array( + ':db_key' => $id + )); - $sql = "$table->primaryKey=:db_key"; - return $record->find($sql, array(':db_key'=>$id)); + // return $record->findByPk($id); -// return $record->findByPk($id); } -function getdbosql($class, $sql='1', $params=array()) +function getdbosql($class, $sql = '1', $params = array()) { -// debuglog("$class, $sql"); - return CActiveRecord::model($class)->find($sql, $params); + // debuglog("$class, $sql"); + return CActiveRecord::model($class)->find($sql, $params); } -function getdbolist($class, $sql='1', $params=array()) +function getdbolist($class, $sql = '1', $params = array()) { -// debuglog("sql $sql"); - return CActiveRecord::model($class)->findAll($sql, $params); + // debuglog("sql $sql"); + return CActiveRecord::model($class)->findAll($sql, $params); } -function getdbocount($class, $sql='1', $params=array()) +function getdbocount($class, $sql = '1', $params = array()) { -// debuglog("sql $sql"); - return CActiveRecord::model($class)->count($sql, $params); + // debuglog("sql $sql"); + return CActiveRecord::model($class)->count($sql, $params); } -function dborun($sql, $params=array()) +function dborun($sql, $params = array()) { - $command = app()->db->createCommand($sql); + $command = app() + ->db + ->createCommand($sql); - foreach($params as $name=>$value) - $command->bindValue($name, $value); + foreach ($params as $name => $value) $command->bindValue($name, $value); - return $command->execute(); + return $command->execute(); } -function dboscalar($sql, $params=array()) +function dboscalar($sql, $params = array()) { - $command = app()->db->createCommand($sql); + $command = app() + ->db + ->createCommand($sql); - foreach($params as $name=>$value) - $command->bindValue($name, $value); + foreach ($params as $name => $value) $command->bindValue($name, $value); - return $command->queryScalar(); + return $command->queryScalar(); } -function dborow($sql, $params=array()) +function dborow($sql, $params = array()) { - $command = app()->db->createCommand($sql); + $command = app() + ->db + ->createCommand($sql); - foreach($params as $name=>$value) - $command->bindValue($name, $value); + foreach ($params as $name => $value) $command->bindValue($name, $value); - return $command->queryRow(); + return $command->queryRow(); } -function dbocolumn($sql, $params=array()) +function dbocolumn($sql, $params = array()) { - $command = app()->db->createCommand($sql); + $command = app() + ->db + ->createCommand($sql); - foreach($params as $name=>$value) - $command->bindValue($name, $value); + foreach ($params as $name => $value) $command->bindValue($name, $value); - return $command->queryColumn(); + return $command->queryColumn(); } -function dbolist($sql, $params=array()) +function dbolist($sql, $params = array()) { - $command = app()->db->createCommand($sql); + $command = app() + ->db + ->createCommand($sql); - foreach($params as $name=>$value) - $command->bindValue($name, $value); + foreach ($params as $name => $value) $command->bindValue($name, $value); - return $command->queryAll(); + return $command->queryAll(); } function getdbolistWith($model, $with, $criteria) { - return CActiveRecord::model($model)->with($with)->findAll($criteria); + return CActiveRecord::model($model)->with($with)->findAll($criteria); } -function sqlQuote($value, $querytype='') +function sqlQuote($value, $querytype = '') { - $db = app()->db; - $quoted = $value; - - if ($querytype == '') - $quoted = $db->quoteValue($value); - elseif ($querytype == 'beginWith') - $quoted = $db->quoteValue($value.'%'); - elseif ($querytype == 'endWith') - $quoted = $db->quoteValue('%'.$value); - elseif ($querytype == 'contains') - $quoted = $db->quoteValue('%'.$value.'%'); - - return $quoted; + $db = app()->db; + $quoted = $value; + + if ($querytype == '') $quoted = $db->quoteValue($value); + elseif ($querytype == 'beginWith') $quoted = $db->quoteValue($value . '%'); + elseif ($querytype == 'endWith') $quoted = $db->quoteValue('%' . $value); + elseif ($querytype == 'contains') $quoted = $db->quoteValue('%' . $value . '%'); + + return $quoted; } diff --git a/web/yaamp/core/common/system.php b/web/yaamp/core/common/system.php index a666673ff..9a14d467f 100644 --- a/web/yaamp/core/common/system.php +++ b/web/yaamp/core/common/system.php @@ -1,66 +1,66 @@ memcache->get("last_email_sent_$name"); - if($last + $t*60 > time()) return; + // debuglog(__FUNCTION__); + $last = controller() + ->memcache + ->get("last_email_sent_$name"); + if ($last + $t * 60 > time()) return; - debuglog("mail('".YAAMP_ADMIN_EMAIL."', $title, ...)"); + debuglog("mail('" . YAAMP_ADMIN_EMAIL . "', $title, ...)"); - $b = mail(YAAMP_ADMIN_EMAIL, $title, $message); - if(!$b) debuglog('error sending email'); + $b = mail(YAAMP_ADMIN_EMAIL, $title, $message); + if (!$b) debuglog('error sending email'); - controller()->memcache->set("last_email_sent_$name", time()); + controller() + ->memcache + ->set("last_email_sent_$name", time()); } function dos_filesize($fn) { - return exec('FOR %A IN ("'.$fn.'") DO @ECHO %~zA'); + return exec('FOR %A IN ("' . $fn . '") DO @ECHO %~zA'); } ////////////////////////////////////////////////////////////// - function GetCpuLoad() { - $wmi = new COM("Winmgmts://"); - $result = $wmi->execquery("SELECT LoadPercentage FROM Win32_Processor"); + $wmi = new COM("Winmgmts://"); + $result = $wmi->execquery("SELECT LoadPercentage FROM Win32_Processor"); - $cpu_num = 0; - $load_total = 0; + $cpu_num = 0; + $load_total = 0; - foreach($result as $cpu) - { - $cpu_num++; - $load_total += $cpu->loadpercentage; - } + foreach ($result as $cpu) + { + $cpu_num++; + $load_total += $cpu->loadpercentage; + } - $load = round($load_total/$cpu_num); - return $load; + $load = round($load_total / $cpu_num); + return $load; } function GetNetworkLoad() { - $wmi = new COM("Winmgmts://"); - $allnets = $wmi->execquery("Select BytesTotalPersec From Win32_PerfFormattedData_Tcpip_NetworkInterface where BytesTotalPersec>1"); + $wmi = new COM("Winmgmts://"); + $allnets = $wmi->execquery("Select BytesTotalPersec From Win32_PerfFormattedData_Tcpip_NetworkInterface where BytesTotalPersec>1"); - $totalbps = 0; - foreach($allnets as $network) - { - $bps = $network->BytesTotalPersec*8; - $totalbps += $bps; - } + $totalbps = 0; + foreach ($allnets as $network) + { + $bps = $network->BytesTotalPersec * 8; + $totalbps += $bps; + } - return $totalbps; + return $totalbps; } function getclientip() { - if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) - return $_SERVER['HTTP_X_FORWARDED_FOR']; + if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) return $_SERVER['HTTP_X_FORWARDED_FOR']; - return $_SERVER['REMOTE_ADDR']; + return $_SERVER['REMOTE_ADDR']; } /** @@ -70,36 +70,36 @@ function getclientip() */ function get_ip_address() { - // check for shared internet/ISP IP - if (!empty($_SERVER['HTTP_CLIENT_IP']) && validate_ip($_SERVER['HTTP_CLIENT_IP'])) { - return $_SERVER['HTTP_CLIENT_IP']; - } - - // check for IPs passing through proxies - if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { - // check if multiple ips exist in var - if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) { - $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); - foreach ($iplist as $ip) { - if (validate_ip($ip)) - return $ip; - } - } else { - if (validate_ip($_SERVER['HTTP_X_FORWARDED_FOR'])) - return $_SERVER['HTTP_X_FORWARDED_FOR']; - } - } - if (!empty($_SERVER['HTTP_X_FORWARDED']) && validate_ip($_SERVER['HTTP_X_FORWARDED'])) - return $_SERVER['HTTP_X_FORWARDED']; - if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'])) - return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP']; - if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && validate_ip($_SERVER['HTTP_FORWARDED_FOR'])) - return $_SERVER['HTTP_FORWARDED_FOR']; - if (!empty($_SERVER['HTTP_FORWARDED']) && validate_ip($_SERVER['HTTP_FORWARDED'])) - return $_SERVER['HTTP_FORWARDED']; - - // return unreliable ip since all else failed - return $_SERVER['REMOTE_ADDR']; + // check for shared internet/ISP IP + if (!empty($_SERVER['HTTP_CLIENT_IP']) && validate_ip($_SERVER['HTTP_CLIENT_IP'])) + { + return $_SERVER['HTTP_CLIENT_IP']; + } + + // check for IPs passing through proxies + if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) + { + // check if multiple ips exist in var + if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) + { + $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); + foreach ($iplist as $ip) + { + if (validate_ip($ip)) return $ip; + } + } + else + { + if (validate_ip($_SERVER['HTTP_X_FORWARDED_FOR'])) return $_SERVER['HTTP_X_FORWARDED_FOR']; + } + } + if (!empty($_SERVER['HTTP_X_FORWARDED']) && validate_ip($_SERVER['HTTP_X_FORWARDED'])) return $_SERVER['HTTP_X_FORWARDED']; + if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'])) return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP']; + if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && validate_ip($_SERVER['HTTP_FORWARDED_FOR'])) return $_SERVER['HTTP_FORWARDED_FOR']; + if (!empty($_SERVER['HTTP_FORWARDED']) && validate_ip($_SERVER['HTTP_FORWARDED'])) return $_SERVER['HTTP_FORWARDED']; + + // return unreliable ip since all else failed + return $_SERVER['REMOTE_ADDR']; } /** @@ -108,28 +108,27 @@ function get_ip_address() */ function validate_ip($ip) { - if (strtolower($ip) === 'unknown') - return false; - - // generate ipv4 network address - $ip = ip2long($ip); - - // if the ip is set and not equivalent to 255.255.255.255 - if ($ip !== false && $ip !== -1) { - // make sure to get unsigned long representation of ip - // due to discrepancies between 32 and 64 bit OSes and - // signed numbers (ints default to signed in PHP) - $ip = sprintf('%u', $ip); - // do private network range checking - if ($ip >= 0 && $ip <= 50331647) return false; - if ($ip >= 167772160 && $ip <= 184549375) return false; - if ($ip >= 2130706432 && $ip <= 2147483647) return false; - if ($ip >= 2851995648 && $ip <= 2852061183) return false; - if ($ip >= 2886729728 && $ip <= 2887778303) return false; - if ($ip >= 3221225984 && $ip <= 3221226239) return false; - if ($ip >= 3232235520 && $ip <= 3232301055) return false; - if ($ip >= 4294967040) return false; - } - return true; + if (strtolower($ip) === 'unknown') return false; + + // generate ipv4 network address + $ip = ip2long($ip); + + // if the ip is set and not equivalent to 255.255.255.255 + if ($ip !== false && $ip !== - 1) + { + // make sure to get unsigned long representation of ip + // due to discrepancies between 32 and 64 bit OSes and + // signed numbers (ints default to signed in PHP) + $ip = sprintf('%u', $ip); + // do private network range checking + if ($ip >= 0 && $ip <= 50331647) return false; + if ($ip >= 167772160 && $ip <= 184549375) return false; + if ($ip >= 2130706432 && $ip <= 2147483647) return false; + if ($ip >= 2851995648 && $ip <= 2852061183) return false; + if ($ip >= 2886729728 && $ip <= 2887778303) return false; + if ($ip >= 3221225984 && $ip <= 3221226239) return false; + if ($ip >= 3232235520 && $ip <= 3232301055) return false; + if ($ip >= 4294967040) return false; + } + return true; } - diff --git a/web/yaamp/core/common/util.php b/web/yaamp/core/common/util.php index 999d89748..f56160682 100644 --- a/web/yaamp/core/common/util.php +++ b/web/yaamp/core/common/util.php @@ -1,369 +1,370 @@ getController(); + return app()->getController(); } function cache() { - if (app() instanceof CConsoleApplication) - return app()->cache; + if (app() instanceof CConsoleApplication) return app()->cache; - return app()->getController()->memcache; + return app() + ->getController()->memcache; } -function objSafeVal($obj,$key,$default=NULL) +function objSafeVal($obj, $key, $default = NULL) { - if (is_object($obj) && property_exists($obj,$key)) - return $obj->$key; - elseif (is_array($obj)) - return arraySafeVal($obj,$key,$default); - return $default; + if (is_object($obj) && property_exists($obj, $key)) return $obj->$key; + elseif (is_array($obj)) return arraySafeVal($obj, $key, $default); + return $default; } -function arraySafeVal($arr,$key,$default=NULL) +function arraySafeVal($arr, $key, $default = NULL) { - if (is_array($arr) && isset($arr[$key])) - return $arr[$key]; - elseif (is_object($arr)) - return objSafeVal($arr,$key,$default); - return $default; + if (is_array($arr) && isset($arr[$key])) return $arr[$key]; + elseif (is_object($arr)) return objSafeVal($arr, $key, $default); + return $default; } -function getparam($p,$default='') +function getparam($p, $default = '') { - return isset($_REQUEST[$p]) ? $_REQUEST[$p] : $default; + return isset($_REQUEST[$p]) ? $_REQUEST[$p] : $default; } -function gethexparam($p,$default='') +function gethexparam($p, $default = '') { - $str = getparam($p, NULL); - $hex = (is_string($str) && ctype_xdigit($str)) ? $str : $default; - return $hex; + $str = getparam($p, NULL); + $hex = (is_string($str) && ctype_xdigit($str)) ? $str : $default; + return $hex; } -function getiparam($p,$default=0) +function getiparam($p, $default = 0) { - // workaround for yii default /route/ .... - if ($p == 'id') { - $id = isset($_REQUEST[$p]) ? $_REQUEST[$p] : $default; - if (!$id) { - $url = explode('/', $_SERVER['REQUEST_URI']); - $id = array_pop($url); - } - return (int) $id; - } - return isset($_REQUEST[$p]) ? intval($_REQUEST[$p]) : $default; + // workaround for yii default /route/ .... + if ($p == 'id') + { + $id = isset($_REQUEST[$p]) ? $_REQUEST[$p] : $default; + if (!$id) + { + $url = explode('/', $_SERVER['REQUEST_URI']); + $id = array_pop($url); + } + return (int)$id; + } + return isset($_REQUEST[$p]) ? intval($_REQUEST[$p]) : $default; } function getalgoparam() { - $algo = strip_tags(substr(getparam('algo'), 0, 32)); - return $algo; + $algo = strip_tags(substr(getparam('algo') , 0, 32)); + return $algo; } ////////////////////////////////////////////////////// - function downloadFile($url, &$size) { - $data = file_get_contents($url); - $tempname = gettempfile('.ext'); + $data = file_get_contents($url); + $tempname = gettempfile('.ext'); - file_put_contents($tempname, $data); - $size = dos_filesize($tempname); + file_put_contents($tempname, $data); + $size = dos_filesize($tempname); - unlink($tempname); - return $data; + unlink($tempname); + return $data; } function getServerName() { - if(strpos($_SERVER['SERVER_NAME'], ':')) - return substr($_SERVER['SERVER_NAME'], 0, strpos($_SERVER['SERVER_NAME'], ':')); + if (strpos($_SERVER['SERVER_NAME'], ':')) return substr($_SERVER['SERVER_NAME'], 0, strpos($_SERVER['SERVER_NAME'], ':')); - return $_SERVER['SERVER_NAME']; + return $_SERVER['SERVER_NAME']; } function getFullServerName() { - if(isset($_SERVER['HTTPS']) && !strcasecmp($_SERVER['HTTPS'], 'on')) - $protocol = 'https'; - else - $protocol = 'http'; + if (isset($_SERVER['HTTPS']) && !strcasecmp($_SERVER['HTTPS'], 'on')) $protocol = 'https'; + else $protocol = 'http'; - return $protocol.'://'.$_SERVER['HTTP_HOST']; + return $protocol . '://' . $_SERVER['HTTP_HOST']; } /////////////////// - function getClientPlatform() { - $agent = $_SERVER['HTTP_USER_AGENT']; - $bname = 'Unknown'; - $platform = 'Unknown'; - $version= ""; + $agent = $_SERVER['HTTP_USER_AGENT']; + $bname = 'Unknown'; + $platform = 'Unknown'; + $version = ""; - if(preg_match('/ipad/i', $agent)) - $platform = 'Ipad'; + if (preg_match('/ipad/i', $agent)) $platform = 'Ipad'; - else if(preg_match('/iphone/i', $agent)) - $platform = 'Iphone'; + else if (preg_match('/iphone/i', $agent)) $platform = 'Iphone'; - else if(preg_match('/android/i', $agent)) - $platform = 'Android'; + else if (preg_match('/android/i', $agent)) $platform = 'Android'; - else if(preg_match('/linux/i', $agent)) - $platform = 'Linux'; + else if (preg_match('/linux/i', $agent)) $platform = 'Linux'; - elseif(preg_match('/macintosh|mac os x/i', $agent)) - $platform = 'Mac'; + elseif (preg_match('/macintosh|mac os x/i', $agent)) $platform = 'Mac'; - elseif(preg_match('/windows|win32/i', $agent)) - $platform = 'Windows'; + elseif (preg_match('/windows|win32/i', $agent)) $platform = 'Windows'; ////////////////////////////////////////////////////////////////////// - - if(preg_match('/MSIE/i',$agent) && !preg_match('/Opera/i',$agent)) + if (preg_match('/MSIE/i', $agent) && !preg_match('/Opera/i', $agent)) { $bname = 'Internet Explorer'; $ub = "MSIE"; } - elseif(preg_match('/Firefox/i',$agent)) + elseif (preg_match('/Firefox/i', $agent)) { $bname = 'Firefox'; $ub = "Firefox"; } - elseif(preg_match('/Chrome/i',$agent)) + elseif (preg_match('/Chrome/i', $agent)) { $bname = 'Chrome'; $ub = "Chrome"; } - elseif(preg_match('/Safari/i',$agent)) + elseif (preg_match('/Safari/i', $agent)) { $bname = 'Safari'; $ub = "Safari"; } - elseif(preg_match('/Opera/i',$agent)) + elseif (preg_match('/Opera/i', $agent)) { $bname = 'Opera'; $ub = "Opera"; } - elseif(preg_match('/Netscape/i',$agent)) + elseif (preg_match('/Netscape/i', $agent)) { $bname = 'Netscape'; $ub = "Netscape"; } // finally get the correct version number - $known = array('Version', $ub, 'other'); - $pattern = '#(?' . join('|', $known) . ')[/ ]+(?[0-9.|a-zA-Z.]*)#'; + $known = array( + 'Version', + $ub, + 'other' + ); + $pattern = '#(?' . join('|', $known) . ')[/ ]+(?[0-9.|a-zA-Z.]*)#'; - preg_match_all($pattern, $agent, $matches); + preg_match_all($pattern, $agent, $matches); // see how many we have $i = count($matches['browser']); - if ($i != 1) { + if ($i != 1) + { //we will have two since we are not using 'other' argument yet //see if version is before or after the name - if (strripos($agent,"Version") < strripos($agent,$ub)){ - $version= $matches['version'][0]; + if (strripos($agent, "Version") < strripos($agent, $ub)) + { + $version = $matches['version'][0]; } - else { - $version= $matches['version'][1]; + else + { + $version = $matches['version'][1]; } } - else { - $version= $matches['version'][0]; + else + { + $version = $matches['version'][0]; } // check if we have a number - if ($version==null || $version=="") {$version="?";} + if ($version == null || $version == "") + { + $version = "?"; + } return "$platform, $bname $version"; } function IsMobileDevice() { - $agent = $_SERVER['HTTP_USER_AGENT']; + $agent = $_SERVER['HTTP_USER_AGENT']; - return preg_match('/ipad/i', $agent) || - preg_match('/iphone/i', $agent) || - preg_match('/android/i', $agent); + return preg_match('/ipad/i', $agent) || preg_match('/iphone/i', $agent) || preg_match('/android/i', $agent); } -function file_get_contents_curl($url, $user=null) +function file_get_contents_curl($url, $user = null) { - $ch = curl_init($url); - - if($user) - { - $a = explode(',', $user->access_token); - $oauth_token = $a[0]; - $oauth_token_secret = $a[1]; - - $oauth = array( - 'oauth_consumer_key' => CONSUMER_KEY, - 'oauth_nonce' => md5(microtime().mt_rand()), - 'oauth_signature_method' => 'HMAC-SHA1', - 'oauth_timestamp' => time(), - 'oauth_token' => $oauth_token, - 'oauth_version' => '1.0'); - - $base_info = buildBaseString($url, 'POST', $oauth); - $composite_key = rawurlencode(CONSUMER_SECRET).'&'.rawurlencode($oauth_token_secret); - $oauth['oauth_signature'] = base64_encode(hash_hmac('sha1', $base_info, $composite_key, true)); - $header = buildAuthorizationHeader($oauth); - - // debuglog($header); - curl_setopt($ch, CURLOPT_HTTPHEADER, array($header)); - } - - $maxallowed = 64*1024; - $totalread = 0; - $data = ''; - - $callback = function($ch, $text) use(&$data, &$maxallowed, &$totalread) - { - $data .= $text; - $count = strlen($text); - $totalread += $count; - - if($totalread >= $maxallowed || stristr($data, '')) - return 0; - - return $count; - }; - - curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Tweetshow 2.1)'); - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); - - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); - curl_setopt($ch, CURLOPT_TIMEOUT, 20); - curl_setopt($ch, CURLOPT_ENCODING , "deflate,gzip"); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($ch, CURLOPT_WRITEFUNCTION, $callback); - - curl_exec($ch); - curl_close($ch); - -// debuglog(" total read $totalread, ".strlen($data)); - return $data; + $ch = curl_init($url); + + if ($user) + { + $a = explode(',', $user->access_token); + $oauth_token = $a[0]; + $oauth_token_secret = $a[1]; + + $oauth = array( + 'oauth_consumer_key' => CONSUMER_KEY, + 'oauth_nonce' => md5(microtime() . mt_rand()) , + 'oauth_signature_method' => 'HMAC-SHA1', + 'oauth_timestamp' => time() , + 'oauth_token' => $oauth_token, + 'oauth_version' => '1.0' + ); + + $base_info = buildBaseString($url, 'POST', $oauth); + $composite_key = rawurlencode(CONSUMER_SECRET) . '&' . rawurlencode($oauth_token_secret); + $oauth['oauth_signature'] = base64_encode(hash_hmac('sha1', $base_info, $composite_key, true)); + $header = buildAuthorizationHeader($oauth); + + // debuglog($header); + curl_setopt($ch, CURLOPT_HTTPHEADER, array( + $header + )); + } + + $maxallowed = 64 * 1024; + $totalread = 0; + $data = ''; + + $callback = function ($ch, $text) use (&$data, &$maxallowed, &$totalread) + { + $data .= $text; + $count = strlen($text); + $totalread += $count; + + if ($totalread >= $maxallowed || stristr($data, '')) return 0; + + return $count; + }; + + curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Tweetshow 2.1)'); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); + curl_setopt($ch, CURLOPT_TIMEOUT, 20); + curl_setopt($ch, CURLOPT_ENCODING, "deflate,gzip"); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_WRITEFUNCTION, $callback); + + curl_exec($ch); + curl_close($ch); + + // debuglog(" total read $totalread, ".strlen($data)); + return $data; } function force_wordbreak($text, $max) { - $last = 0; - for($i=0; $i $max) - { - $text = substr_replace($text, ' ', $i, 0); - $i++; - $last = $i; - } - } - - return $text; -} + $last = 0; + for ($i = 0;$i < strlen($text);$i++) + { + if ($text[$i] == ' ') $last = $i; + else if ($i - $last > $max) + { + $text = substr_replace($text, ' ', $i, 0); + $i++; + $last = $i; + } + } -///////////////////////////////////////////////////////////////////////// + return $text; +} +///////////////////////////////////////////////////////////////////////// function adjust_background_color($color) { - sscanf($color, "%x", $rgb); - $r = ($rgb >> 16) & 0xFF; - $g = ($rgb >> 8) & 0xFF; - $b = $rgb & 0xFF; - $limit1 = 0xf4; - if($r < $limit1) $r = $limit1-($limit1 - $r)/16; - if($g < $limit1) $g = $limit1-($limit1 - $g)/16; - if($b < $limit1) $b = $limit1-($limit1 - $b)/32; - $color1 = ($r << 16) + ($g << 8) + $b; - $color1 = sprintf("%x", $color1); - return $color1; + sscanf($color, "%x", $rgb); + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + $limit1 = 0xf4; + if ($r < $limit1) $r = $limit1 - ($limit1 - $r) / 16; + if ($g < $limit1) $g = $limit1 - ($limit1 - $g) / 16; + if ($b < $limit1) $b = $limit1 - ($limit1 - $b) / 32; + $color1 = ($r << 16) + ($g << 8) + $b; + $color1 = sprintf("%x", $color1); + return $color1; } function adjust_foreground_color($color) { - sscanf($color, "%x", $rgb); - $r = ($rgb >> 16) & 0xFF; - $g = ($rgb >> 8) & 0xFF; - $b = $rgb & 0xFF; - $limit2 = 0x33; - if($r > $limit2) $r = $limit2; - if($g > $limit2) $g = $limit2; - if($b > $limit2) $b = $limit2; - $color2 = ($r << 16) + ($g << 8) + $b; - $color2 = sprintf("%x", $color2); - return $color2; + sscanf($color, "%x", $rgb); + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + $limit2 = 0x33; + if ($r > $limit2) $r = $limit2; + if ($g > $limit2) $g = $limit2; + if ($b > $limit2) $b = $limit2; + $color2 = ($r << 16) + ($g << 8) + $b; + $color2 = sprintf("%x", $color2); + return $color2; } function changeColor($user) { - if(!$user) return; + if (!$user) return; - $color = $user->profile_background_color; - sscanf($color, "%x", $rgb); + $color = $user->profile_background_color; + sscanf($color, "%x", $rgb); - $r = ($rgb >> 16) & 0xFF; - $g = ($rgb >> 8) & 0xFF; - $b = $rgb & 0xFF; + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; - $r = $r * 5/6; - $g = $g * 5/6; - $b = $b * 5/6; + $r = $r * 5 / 6; + $g = $g * 5 / 6; + $b = $b * 5 / 6; - $color2 = ($r << 16) + ($g << 8) + $b; - $color2 = sprintf("%x", $color2); + $color2 = ($r << 16) + ($g << 8) + $b; + $color2 = sprintf("%x", $color2); - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } class RecursiveDOMIterator implements RecursiveIterator { - protected $_position; - protected $_nodeList; - public function __construct(DOMNode $domNode) - { - $this->_position = 0; - $this->_nodeList = $domNode->childNodes; - } - public function getChildren() { return new self($this->current()); } - public function key() { return $this->_position; } - public function next() { $this->_position++; } - public function rewind() { $this->_position = 0; } - public function valid() - { - return $this->_position < $this->_nodeList->length; - } - public function hasChildren() - { - return $this->current()->hasChildNodes(); - } - public function current() - { - return $this->_nodeList->item($this->_position); - } + protected $_position; + protected $_nodeList; + public function __construct(DOMNode $domNode) + { + $this->_position = 0; + $this->_nodeList = $domNode->childNodes; + } + public function getChildren() + { + return new self($this->current()); + } + public function key() + { + return $this->_position; + } + public function next() + { + $this->_position++; + } + public function rewind() + { + $this->_position = 0; + } + public function valid() + { + return $this->_position < $this + ->_nodeList->length; + } + public function hasChildren() + { + return $this->current() + ->hasChildNodes(); + } + public function current() + { + return $this + ->_nodeList + ->item($this->_position); + } } - - - - - - - diff --git a/web/yaamp/core/functions/admin.php b/web/yaamp/core/functions/admin.php index baa65c511..30f099a18 100644 --- a/web/yaamp/core/functions/admin.php +++ b/web/yaamp/core/functions/admin.php @@ -4,7 +4,7 @@ function getAdminSideBarLinks() { -$links = <<Exchanges  Botnets  Users  @@ -14,48 +14,59 @@ function getAdminSideBarLinks() Payments  Big Miners  end; - return $links; + return $links; } // shared by wallet "tabs", to move in another php file... -function getAdminWalletLinks($coin, $info=NULL, $src='wallet') +function getAdminWalletLinks($coin, $info = NULL, $src = 'wallet') { - $html = CHtml::link("COIN PROPERTIES", '/site/update?id='.$coin->id); - if($info) { - $html .= ' || '.$coin->createExplorerLink("EXPLORER"); - $html .= ' || '.CHtml::link("PEERS", '/site/peers?id='.$coin->id); - if (YAAMP_ADMIN_WEBCONSOLE) - $html .= ' || '.CHtml::link("CONSOLE", '/site/console?id='.$coin->id); - $html .= ' || '.CHtml::link("TRIGGERS", '/site/triggers?id='.$coin->id); - if ($src != 'wallet') - $html .= ' || '.CHtml::link("{$coin->symbol}", '/site/coin?id='.$coin->id); - } - - if(!$info && $coin->enable) - $html .= '
    '.CHtml::link("STOP COIND", '/site/stopcoin?id='.$coin->id); - - if($coin->auto_ready) - $html .= '
    '.CHtml::link("UNSET AUTO", '/site/unsetauto?id='.$coin->id); - else - $html .= '
    '.CHtml::link("SET AUTO", '/site/setauto?id='.$coin->id); - - $html .= '
    '; - - if(!empty($coin->link_bitcointalk)) - $html .= CHtml::link('forum', $coin->link_bitcointalk, array('target'=>'_blank')).' '; - - if(!empty($coin->link_github)) - $html .= CHtml::link('git', $coin->link_github, array('target'=>'_blank')).' '; - - if(!empty($coin->link_site)) - $html .= CHtml::link('site', $coin->link_site, array('target'=>'_blank')).' '; - - if(!empty($coin->link_explorer)) - $html .= CHtml::link('chain', $coin->link_explorer, array('target'=>'_blank','title'=>'External Blockchain Explorer')).' '; - - $html .= CHtml::link('google', 'http://google.com/search?q='.urlencode($coin->name.' '.$coin->symbol.' bitcointalk'), array('target'=>'_blank')); - - return $html; + $html = CHtml::link("COIN PROPERTIES", '/site/update?id=' . $coin->id); + if ($info) { + $html .= ' || ' . $coin->createExplorerLink("EXPLORER"); + $html .= ' || ' . CHtml::link("PEERS", '/site/peers?id=' . $coin->id); + if (YAAMP_ADMIN_WEBCONSOLE) + $html .= ' || ' . CHtml::link("CONSOLE", '/site/console?id=' . $coin->id); + $html .= ' || ' . CHtml::link("TRIGGERS", '/site/triggers?id=' . $coin->id); + if ($src != 'wallet') + $html .= ' || ' . CHtml::link("{$coin->symbol}", '/site/coin?id=' . $coin->id); + } + + if (!$info && $coin->enable) + $html .= '
    ' . CHtml::link("STOP COIND", '/site/stopcoin?id=' . $coin->id); + + if ($coin->auto_ready) + $html .= '
    ' . CHtml::link("UNSET AUTO", '/site/unsetauto?id=' . $coin->id); + else + $html .= '
    ' . CHtml::link("SET AUTO", '/site/setauto?id=' . $coin->id); + + $html .= '
    '; + + if (!empty($coin->link_bitcointalk)) + $html .= CHtml::link('forum', $coin->link_bitcointalk, array( + 'target' => '_blank' + )) . ' '; + + if (!empty($coin->link_github)) + $html .= CHtml::link('git', $coin->link_github, array( + 'target' => '_blank' + )) . ' '; + + if (!empty($coin->link_site)) + $html .= CHtml::link('site', $coin->link_site, array( + 'target' => '_blank' + )) . ' '; + + if (!empty($coin->link_explorer)) + $html .= CHtml::link('chain', $coin->link_explorer, array( + 'target' => '_blank', + 'title' => 'External Blockchain Explorer' + )) . ' '; + + $html .= CHtml::link('google', 'http://google.com/search?q=' . urlencode($coin->name . ' ' . $coin->symbol . ' bitcointalk'), array( + 'target' => '_blank' + )); + + return $html; } ///////////////////////////////////////////////////////////////////////////////////////////// @@ -63,28 +74,28 @@ function getAdminWalletLinks($coin, $info=NULL, $src='wallet') // Check if $IP is in $CIDR range function ipCIDRCheck($IP, $CIDR) { - list($net, $mask) = explode('/', $CIDR); + list($net, $mask) = explode('/', $CIDR); - $ip_net = ip2long($net); - $ip_mask = ~((1 << (32 - $mask)) - 1); + $ip_net = ip2long($net); + $ip_mask = ~((1 << (32 - $mask)) - 1); - $ip_ip = ip2long($IP); - $ip_ip_net = $ip_ip & $ip_mask; + $ip_ip = ip2long($IP); + $ip_ip_net = $ip_ip & $ip_mask; - return ($ip_ip_net === $ip_net); + return ($ip_ip_net === $ip_net); } function isAdminIP($ip) { - foreach(explode(',', YAAMP_ADMIN_IP) as $range) - { - if (strpos($range, '/')) { - if(ipCIDRCheck($ip, $range) === true) return true; - } else if ($range === $ip) { - return true; - } - } - return false; + foreach (explode(',', YAAMP_ADMIN_IP) as $range) { + if (strpos($range, '/')) { + if (ipCIDRCheck($ip, $range) === true) + return true; + } else if ($range === $ip) { + return true; + } + } + return false; } ///////////////////////////////////////////////////////////////////////////////////////////// diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index 769d9d647..a0811aeb3 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -2,745 +2,780 @@ function yaamp_get_algos() { - /* Toggle Site Algos Here */ - return array( - 'a5a', - 'aergo', - 'allium', - 'argon2', - 'argon2d-crds', - 'argon2d-dyn', - 'argon2m', - 'argon2d-uis', - 'bastion', - 'bcd', - 'bitcore', - 'blake', - 'blake2b', - 'blake2s', - 'bmw512', - 'blakecoin', - 'c11', - 'decred', - 'deep', - 'dmd-gr', - 'exosis', - 'equihash', - 'groestl', // dmd-gr -m 256 (deprecated) - 'geek', - 'hex', - 'hmq1725', - 'hsr', - 'keccak', - 'keccakc', - 'lbk3', - 'lbry', - 'luffa', - 'lyra2', - 'lyra2v2', - 'lyra2v3', - 'lyra2vc0ban', - 'lyra2z', - 'lyra2zz', - 'lyra2z330', - 'm7m', - 'myr-gr', - 'neoscrypt', - 'nist5', - 'penta', - 'phi', - 'phi2', - 'phi1612', - 'polytimos', - 'quark', - 'qubit', - 'rainforest', - 'randomx', - 'scrypt', - 'scryptn', - 'sha256', - 'sha256q', - 'sha256t', - 'sib', - 'skein', - 'skein2', - 'skunk', - 'sonoa', - 'timetravel', - 'tribus', - 'vanilla', - 'veltor', - 'velvet', - 'vitalium', - 'whirlpool', - 'x11', - 'x11evo', - 'x12', - 'x13', - 'x14', - 'x15', - 'x16r', - 'x16rv2', - 'x16rt', - 'x16s', - 'x17', - 'x20r', - 'x21s', - 'x22i', - 'x25x', - 'xevan', - 'yescrypt', - 'yescryptR8', - 'yescryptR16', - 'yescryptR32', - 'yespower', - 'yespowerR8', - 'yespowerR16', - 'yespowerR24', - 'yespowerR32', - 'zr5', - ); + /* Toggle Site Algos Here */ + return array( + 'a5a', + 'aergo', + 'allium', + 'argon2', + 'argon2d-crds', + 'argon2d-dyn', + 'argon2m', + 'argon2d-uis', + 'balloon', + 'bastion', + 'bcd', + 'binarium-v1', + 'bitcore', + 'blake', + 'blake2b', + 'blake2s', + 'bmw512', + 'blakecoin', + 'c11', + 'decred', + 'deep', + 'dmd-gr', + 'exosis', + 'groestl', // dmd-gr -m 256 (deprecated) + 'geek', + 'hex', + 'hmq1725', + 'honeycomb', + 'hsr', + 'jha', + 'keccak', + 'keccakc', + 'lbk3', + 'lbry', + 'luffa', + 'lyra2', + 'lyra2v2', + 'lyra2v3', + 'lyra2vc0ban', + 'lyra2z', + 'lyra2zz', + 'lyra2z330', + 'm7m', + 'myr-gr', + 'neoscrypt', + 'nist5', + 'odo', + 'penta', + 'phi', + 'phi2', + 'phi1612', + 'polytimos', + 'quark', + 'qubit', + 'rainforest', + 'rfv2', + 'scrypt', + 'scryptn', + 'sha256', + 'sha256q', + 'sha256t', + 'sib', + 'skein', + 'skein2', + 'skunk', + 'sonoa', + 'timetravel', + 'tribus', + 'vanilla', + 'veltor', + 'velvet', + 'vitalium', + 'whirlpool', + 'x11', + 'x11evo', + 'x12', + 'x13', + 'x14', + 'x15', + 'x16r', + 'x16rv2', + 'x16rt', + 'x16s', + 'x17', + 'x18', + 'x20r', + 'x21s', + 'x22i', + 'x25x', + 'xevan', + 'yescrypt', + 'yescryptR8', + 'yescryptR16', + 'yescryptR32', + 'yespower', + 'yespowerR8', + 'yespowerR16', + 'yespowerR24', + 'yespowerR32', + 'zr5' + ); } // Used for graphs and 24h profit // GH/s for fast algos like sha256 function yaamp_algo_mBTC_factor($algo) { - switch($algo) { - case 'scryptn': - case 'sha256': - return 1000000000; - case 'sha256t': - case 'script': - return 1000000000; - case 'sha256q': - case 'blake': - case 'blakecoin': - case 'blake2s': - return 1000000; - case 'blake2b': - case 'decred': - case 'keccak': - case 'keccakc': - case 'lbry': - case 'vanilla': - return 1000; - default: - return 1; - } + switch ($algo) { + case 'sha256': + case 'sha256t': + case 'sha256q': + case 'blake': + case 'blakecoin': + case 'blake2s': + case 'blake2b': + case 'decred': + case 'keccak': + case 'keccakc': + case 'lbry': + case 'vanilla': + return 1000; + default: + return 1; + } } // mBTC coef per algo function yaamp_get_algo_norm($algo) { - global $configAlgoNormCoef; - if (isset($configAlgoNormCoef[$algo])) - return (float) $configAlgoNormCoef[$algo]; - - $a = array( - 'argon2' => 1.0, - 'argon2d-crds' => 1.0, - 'argon2d-dyn' => 1.0, - 'argon2m' => 1.0, - 'argon2d-uis' => 1.0, - 'blake' => 1.0, - 'keccak' => 1.0, - 'lyra2' => 1.0, - 'lyra2v2' => 1.0, - 'lyra2v3' => 1.0, - 'myr-gr' => 1.0, - 'neoscrypt' => 1.0, - 'nist5' => 1.0, - 'quark' => 1.0, - 'qubit' => 1.0, - 'scrypt' => 1.0, - 'scryptn' => 1.0, - 'sha256' => 1.0, - 'skein' => 1.0, - 'skein2' => 1.0, - 'velvet' => 1.0, - 'whirlpool' => 1.0, - 'x11' => 1.0, - 'x13' => 1.0, - 'yescrypt' => 1.0, - 'yescryptR8' => 1.0, - 'yescryptR16' => 1.0, - 'yescryptR32' => 1.0, - 'zr5' => 1.0, - ); - - if(!isset($a[$algo])) - return 1.0; - - return $a[$algo]; + global $configAlgoNormCoef; + if (isset($configAlgoNormCoef[$algo])) + return (float) $configAlgoNormCoef[$algo]; + + $a = array( + 'argon2' => 1.0, + 'argon2d-crds' => 1.0, + 'argon2d-dyn' => 1.0, + 'argon2m' => 1.0, + 'argon2d-uis' => 1.0, + 'blake' => 1.0, + 'keccak' => 1.0, + 'lyra2' => 1.0, + 'lyra2v2' => 1.0, + 'lyra2v3' => 1.0, + 'myr-gr' => 1.0, + 'neoscrypt' => 1.0, + 'nist5' => 1.0, + 'quark' => 1.0, + 'qubit' => 1.0, + 'scrypt' => 1.0, + 'scryptn' => 1.0, + 'sha256' => 1.0, + 'skein' => 1.0, + 'skein2' => 1.0, + 'velvet' => 1.0, + 'whirlpool' => 1.0, + 'x11' => 1.0, + 'x13' => 1.0, + 'yescrypt' => 1.0, + 'yescryptR8' => 1.0, + 'yescryptR16' => 1.0, + 'yescryptR32' => 1.0, + 'zr5' => 1.0 + ); + + if (!isset($a[$algo])) + return 1.0; + + return $a[$algo]; } function getAlgoColors($algo) { - $a = array( - 'a5a' => '#f0f0f0', - 'aergo' => '#e0d0e0', - 'allium' => '#80a0d0', - 'argon2' => '#e0d0e0', - 'argon2d-crds' => '#e0d0e0', - 'argon2d-dyn' => '#e0d0e0', - 'argon2m' => '#e0d0e0', - 'argon2d-uis' => '#e0d0e0', - 'bastion' => '#e0b0b0', - 'bcd' => '#ffd880', - 'bitcore' => '#f790c0', - 'blake' => '#f0f0f0', - 'blake2b' => '#f2c81f', - 'blakecoin' => '#f0f0f0', - 'bmw512' => '#f0f0f0', - 'equihash' => '#f0f0f0', - 'cuckoo' => '#d0a0a0', - 'c11' => '#a0a0d0', - 'decred' => '#f0f0f0', - 'deep' => '#e0ffff', - 'dmd-gr' => '#a0c0f0', - 'exosis' => '#49CCFE', - 'geek' => '#d0a0a0', - 'groestl' => '#d0a0a0', - 'hex' => '#c0f0c0', - 'hmq1725' => '#ffa0a0', - 'hsr' => '#aa70ff', - 'keccak' => '#c0f0c0', - 'keccakc' => '#c0f0c0', - 'lbk3' => '#809aef', - 'lbry' => '#b0d0e0', - 'luffa' => '#a0c0c0', - 'lyra2' => '#80a0f0', - 'lyra2v2' => '#80c0f0', - 'lyra2v3' => '#80a0f0', - 'lyra2z330' => '#80b0f0', - 'lyra2vc0ban' => '#80c0f0', - 'lyra2z' => '#80b0f0', - 'lyra2zz' => '#80b0f0', - 'm7m' => '#d0a0a0', - 'myr-gr' => '#a0c0f0', - 'neoscrypt' => '#a0d0f0', - 'nist5' => '#c0e0e0', - 'penta' => '#80c0c0', - 'phi' => '#a0a0e0', - 'phi2' => '#a0a0e0', - 'phi1612' => '#a0a0e0', - 'polytimos' => '#dedefe', - 'quark' => '#c0c0c0', - 'qubit' => '#d0a0f0', - 'rainforest' => '#d0f0a0', - 'randomx' => '#d0f0a0', - 'renesis' => '#f0b0a0', - 'scrypt' => '#c0c0e0', - 'scryptn' => '#d0d0d0', - 'sha256' => '#d0d0a0', - 'sha256q' => '#9696dd', - 'sha256t' => '#d0d0f0', - 'sib' => '#a0a0c0', - 'skein' => '#80a0a0', - 'skein2' => '#c8a060', - 'skunk' => '#dedefe', - 'sonoa' => '#dedefe', - 'timetravel' => '#f0b0d0', - 'tribus' => '#c0d0d0', - 'vanilla' => '#f0f0f0', - 'velvet' => '#aac0cc', - 'vitalium' => '#f0b0a0', - 'whirlpool' => '#d0e0e0', - 'x11' => '#f0f0a0', - 'x11evo' => '#c0f0c0', - 'x12' => '#ffe090', - 'x13' => '#ffd880', - 'x14' => '#f0c080', - 'x15' => '#f0b080', - 'x16r' => '#f0b080', - 'x16rv2' => '#f0b080', - 'x16rt' => '#f0b080', - 'x16s' => '#f0b080', - 'x17' => '#f0b0a0', - 'x18' => '#f0b0a0', - 'x20r' => '#f0b0a0', - 'x21s' => '#f0b0a0', - 'x22i' => '#f0a090', - 'x25x' => '#f0a090', - 'xevan' => '#f0b0a0', - 'yescrypt' => '#e0d0e0', - 'yescryptR8' => '#e0d0e0', - 'yescryptR16' => '#e2d0e2', - 'yescryptR32' => '#e2d0d2', - 'yespower' => '#e2d0d2', - 'yespowerR8' => '#e2d0d2', - 'yespowerR16' => '#e2d0d2', - 'yespowerR24' => '#e2d0d2', - 'yespowerR32' => '#e2d0d2', - 'zr5' => '#d0b0d0', - - 'MN' => '#ffffff', // MasterNode Earnings - 'PoS' => '#ffffff' // Stake - ); - - if(!isset($a[$algo])) - return '#ffffff'; - - return $a[$algo]; + $a = array( + 'a5a' => '#f0f0f0', + 'aergo' => '#e0d0e0', + 'allium' => '#80a0d0', + 'argon2' => '#e0d0e0', + 'argon2d-crds' => '#e0d0e0', + 'argon2d-dyn' => '#e0d0e0', + 'argon2m' => '#e0d0e0', + 'argon2d-uis' => '#e0d0e0', + 'balloon' => '#e0b0b0', + 'bastion' => '#e0b0b0', + 'bcd' => '#ffd880', + 'binarium-v1' => '#f0f0f0', + 'bitcore' => '#f790c0', + 'blake' => '#f0f0f0', + 'blake2b' => '#f2c81f', + 'blakecoin' => '#f0f0f0', + 'bmw512' => '#f0f0f0', + 'cuckoo' => '#d0a0a0', + 'c11' => '#a0a0d0', + 'decred' => '#f0f0f0', + 'deep' => '#e0ffff', + 'dmd-gr' => '#a0c0f0', + 'exosis' => '#49CCFE', + 'geek' => '#d0a0a0', + 'groestl' => '#d0a0a0', + 'hex' => '#c0f0c0', + 'hmq1725' => '#ffa0a0', + 'honeycomb' => '#c0f0c0', + 'hsr' => '#aa70ff', + 'jha' => '#a0d0c0', + 'keccak' => '#c0f0c0', + 'keccakc' => '#c0f0c0', + 'lbk3' => '#809aef', + 'lbry' => '#b0d0e0', + 'luffa' => '#a0c0c0', + 'lyra2' => '#80a0f0', + 'lyra2v2' => '#80c0f0', + 'lyra2v3' => '#80a0f0', + 'lyra2z330' => '#80b0f0', + 'lyra2vc0ban' => '#80c0f0', + 'lyra2z' => '#80b0f0', + 'lyra2zz' => '#80b0f0', + 'm7m' => '#d0a0a0', + 'myr-gr' => '#a0c0f0', + 'neoscrypt' => '#a0d0f0', + 'nist5' => '#c0e0e0', + 'odocrypt' => '#c0f0c0', + 'penta' => '#80c0c0', + 'phi' => '#a0a0e0', + 'phi2' => '#a0a0e0', + 'phi1612' => '#a0a0e0', + 'polytimos' => '#dedefe', + 'quark' => '#c0c0c0', + 'qubit' => '#d0a0f0', + 'rainforest' => '#d0f0a0', + 'rfv2' => '#d0f0a0', + 'renesis' => '#f0b0a0', + 'scrypt' => '#c0c0e0', + 'scryptn' => '#d0d0d0', + 'sha256' => '#d0d0a0', + 'sha256q' => '#9696dd', + 'sha256t' => '#d0d0f0', + 'sib' => '#a0a0c0', + 'skein' => '#80a0a0', + 'skein2' => '#c8a060', + 'skunk' => '#dedefe', + 'sonoa' => '#dedefe', + 'timetravel' => '#f0b0d0', + 'tribus' => '#c0d0d0', + 'vanilla' => '#f0f0f0', + 'velvet' => '#aac0cc', + 'vitalium' => '#f0b0a0', + 'whirlpool' => '#d0e0e0', + 'x11' => '#f0f0a0', + 'x11evo' => '#c0f0c0', + 'x12' => '#ffe090', + 'x13' => '#ffd880', + 'x14' => '#f0c080', + 'x15' => '#f0b080', + 'x16r' => '#f0b080', + 'x16rv2' => '#f0b080', + 'x16rt' => '#f0b080', + 'x16s' => '#f0b080', + 'x17' => '#f0b0a0', + 'x18' => '#f0b0a0', + 'x20r' => '#f0b0a0', + 'x21s' => '#f0b0a0', + 'x22i' => '#f0a090', + 'x25x' => '#f0a090', + 'xevan' => '#f0b0a0', + 'yescrypt' => '#e0d0e0', + 'yescryptR8' => '#e0d0e0', + 'yescryptR16' => '#e2d0e2', + 'yescryptR32' => '#e2d0d2', + 'yespower' => '#e2d0d2', + 'yespowerR8' => '#e2d0d2', + 'yespowerR16' => '#e2d0d2', + 'yespowerR24' => '#e2d0d2', + 'yespowerR32' => '#e2d0d2', + 'zr5' => '#d0b0d0', + + 'MN' => '#ffffff', // MasterNode Earnings + 'PoS' => '#ffffff' // Stake + ); + + if (!isset($a[$algo])) + return '#ffffff'; + + return $a[$algo]; } function getAlgoPort($algo) { - $a = array( - 'a5a' => 8633, - 'aergo' => 3691, - 'allium' => 4443, - 'argon2' => 4235, - 'argon2d-crds' => 4238, - 'argon2d-dyn' => 4239, - 'argon2m' => 4234, - 'argon2d-uis' => 4240, - 'bastion' => 6433, - 'bcd' => 3643, - 'bitcore' => 3556, - 'blake' => 5733, - 'blake2b' => 5777, - 'blake2s' => 5766, - 'blakecoin' => 5743, - 'bmw512' => 5787, - 'c11' => 3573, - 'decred' => 3252, - 'deep' => 3535, - 'dmd-gr' => 5333, - 'equihash' => 8888, - 'exosis' => 3557, - 'geek' => 3692, - 'hex' => 5135, - 'hmq1725' => 3747, - 'honeycomb' => 7777, - 'hsr' => 7433, - 'keccak' => 5133, - 'keccakc' => 5134, - 'lbk3' => 5522, - 'lbry' => 3334, - 'luffa' => 5933, - 'lyra2' => 4432, - 'lyra2v2' => 4533, - 'lyra2v3' => 4433, - 'lyra2vc0ban' => 4563, - 'lyra2z' => 4553, - 'lyra2z330' => 4555, - 'lyra2zz' => 4556, - 'm7m' => 6033, - 'myr-gr' => 5433, - 'neoscrypt' => 4233, - 'nist5' => 3833, - 'penta' => 5833, - 'phi' => 8333, - 'phi2' => 8332, - 'phi1612' => 8334, - 'polytimos' => 8463, - 'quark' => 4033, - 'qubit' => 4733, - 'renesis' => 5252, - 'rainforest' => 7443, - 'randomx' => 7444, - 'scrypt' => 3433, - 'scryptn' => 4333, - 'sha256' => 3333, - 'sha256q' => 3337, - 'sha256t' => 3339, - 'sib' => 5033, - 'skein' => 4933, - 'skein2' => 5233, - 'skunk' => 8433, - 'sonoa' => 8733, - 'timetravel' => 3555, - 'tribus' => 8533, - 'vanilla' => 5755, - 'veltor' => 5034, - 'velvet' => 6133, - 'vitalium' => 3233, - 'whirlpool' => 4133, - 'x11' => 3533, - 'x11evo' => 3553, - 'x12' => 3233, - 'x13' => 3633, - 'x14' => 3933, - 'x15' => 3733, - 'x16r' => 3636, - 'x16rv2' => 3637, - 'x16rt' => 7220, - 'x16s' => 3663, - 'x17' => 3737, - 'x20r' => 4300, - 'x21s' => 3224, - 'x22i' => 3223, - 'x25x' => 5633, - 'xevan' => 3739, - 'yescrypt' => 6233, - 'yescryptR8' => 6353, - 'yescryptR16' => 6333, - 'yescryptR32' => 6343, - 'yespower' => 6234, - 'yespowerR8' => 6235, - 'yespowerR16' => 6236, - 'yespowerR24' => 6237, - 'yespowerR32' => 6238, - 'zr5' => 5533, - //'groestl' => 5333, - // 5555 to 5683 reserved - ); - - global $configCustomPorts; - if(isset($configCustomPorts[$algo])) - return $configCustomPorts[$algo]; - - if(!isset($a[$algo])) - return 3033; - - return $a[$algo]; + $a = array( + 'a5a' => 8633, + 'aergo' => 3691, + 'allium' => 4443, + 'argon2' => 4235, + 'argon2d-crds' => 4238, + 'argon2d-dyn' => 4239, + 'argon2m' => 4234, + 'argon2d-uis' => 4240, + 'balloon' => 5100, + 'bastion' => 6433, + 'bcd' => 3643, + 'binarium-v1' => 6666, + 'bitcore' => 3556, + 'blake' => 5733, + 'blake2b' => 5777, + 'blake2s' => 5766, + 'blakecoin' => 5743, + 'bmw512' => 5787, + 'c11' => 3573, + 'decred' => 3252, + 'deep' => 3535, + 'dmd-gr' => 5333, + 'exosis' => 3557, + 'geek' => 3692, + 'hex' => 5135, + 'hmq1725' => 3747, + 'honeycomb' => 7777, + 'hsr' => 7433, + 'jha' => 4633, + 'keccak' => 5133, + 'keccakc' => 5134, + 'lbk3' => 5522, + 'lbry' => 3334, + 'luffa' => 5933, + 'lyra2' => 4432, + 'lyra2v2' => 4533, + 'lyra2v3' => 4433, + 'lyra2vc0ban' => 4563, + 'lyra2z' => 4553, + 'lyra2z330' => 4555, + 'lyra2zz' => 4556, + 'm7m' => 6033, + 'myr-gr' => 5433, + 'neoscrypt' => 4233, + 'odocrypt' => 7777, + 'nist5' => 3833, + 'penta' => 5833, + 'phi' => 8333, + 'phi2' => 8332, + 'phi1612' => 8334, + 'polytimos' => 8463, + 'quark' => 4033, + 'qubit' => 4733, + 'renesis' => 5252, + 'rainforest' => 7443, + 'rfv2' => 8443, + 'scrypt' => 3433, + 'scryptn' => 4333, + 'sha256' => 3333, + 'sha256q' => 3337, + 'sha256t' => 3339, + 'sib' => 5033, + 'skein' => 4933, + 'skein2' => 5233, + 'skunk' => 8433, + 'sonoa' => 8733, + 'timetravel' => 3555, + 'tribus' => 8533, + 'vanilla' => 5755, + 'veltor' => 5034, + 'velvet' => 6133, + 'vitalium' => 3233, + 'whirlpool' => 4133, + 'x11' => 3533, + 'x11evo' => 3553, + 'x12' => 3233, + 'x13' => 3633, + 'x14' => 3933, + 'x15' => 3733, + 'x16r' => 3636, + 'x16rv2' => 3637, + 'x16rt' => 7220, + 'x16s' => 3663, + 'x17' => 3737, + 'x18' => 3738, + 'x20r' => 4300, + 'x21s' => 3224, + 'x22i' => 3223, + 'x25x' => 5633, + 'xevan' => 3739, + 'yescrypt' => 6233, + 'yescryptR8' => 6353, + 'yescryptR16' => 6333, + 'yescryptR32' => 6343, + 'yespower' => 6234, + 'yespowerR8' => 6235, + 'yespowerR16' => 6236, + 'yespowerR24' => 6237, + 'yespowerR32' => 6238, + 'zr5' => 5533 + //'groestl' => 5333, + // 5555 to 5683 reserved + ); + + global $configCustomPorts; + if (isset($configCustomPorts[$algo])) + return $configCustomPorts[$algo]; + + if (!isset($a[$algo])) + return 3033; + + return $a[$algo]; } //////////////////////////////////////////////////////////////////////// function yaamp_fee($algo) { - $fee = controller()->memcache->get("yaamp_fee-$algo"); - if($fee && is_numeric($fee)) return (float) $fee; + $fee = controller()->memcache->get("yaamp_fee-$algo"); + if ($fee && is_numeric($fee)) + return (float) $fee; -/* $norm = yaamp_get_algo_norm($algo); - if($norm == 0) $norm = 1; + /* $norm = yaamp_get_algo_norm($algo); + if($norm == 0) $norm = 1; - $hashrate = getdbosql('db_hashrate', "algo=:algo order by time desc", array(':algo'=>$algo)); - if(!$hashrate || !$hashrate->difficulty) return 1; + $hashrate = getdbosql('db_hashrate', "algo=:algo order by time desc", array(':algo'=>$algo)); + if(!$hashrate || !$hashrate->difficulty) return 1; - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time()-$interval; - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_coinonly-$algo", - "select sum(difficulty) * $target / $interval / 1000 from shares where valid and time>$delay and algo=:algo and jobid=0", array(':algo'=>$algo)); + $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_coinonly-$algo", + "select sum(difficulty) * $target / $interval / 1000 from shares where valid and time>$delay and algo=:algo and jobid=0", array(':algo'=>$algo)); -// $fee = round(log($hashrate->hashrate * $norm / 1000000 / $hashrate->difficulty + 1), 1) + YAAMP_FEES_MINING; -// $fee = round(log($rate * $norm / 2000000 / $hashrate->difficulty + 1), 1) + YAAMP_FEES_MINING; -*/ - $fee = YAAMP_FEES_MINING; + // $fee = round(log($hashrate->hashrate * $norm / 1000000 / $hashrate->difficulty + 1), 1) + YAAMP_FEES_MINING; + // $fee = round(log($rate * $norm / 2000000 / $hashrate->difficulty + 1), 1) + YAAMP_FEES_MINING; + */ + $fee = YAAMP_FEES_MINING; - // local fees config - global $configFixedPoolFees; - if (isset($configFixedPoolFees[$algo])) { - $fee = (float) $configFixedPoolFees[$algo]; - } + // local fees config + global $configFixedPoolFees; + if (isset($configFixedPoolFees[$algo])) { + $fee = (float) $configFixedPoolFees[$algo]; + } - controller()->memcache->set("yaamp_fee-$algo", $fee); - return $fee; + controller()->memcache->set("yaamp_fee-$algo", $fee); + return $fee; } -function take_yaamp_fee($v, $algo, $percent=-1) +function take_yaamp_fee($v, $algo, $percent = -1) { - if ($percent == -1) $percent = yaamp_fee($algo); + if ($percent == -1) + $percent = yaamp_fee($algo); - return $v - ($v * $percent / 100.0); + return $v - ($v * $percent / 100.0); } -function yaamp_hashrate_constant($algo=null) +function yaamp_hashrate_constant($algo = null) { - return pow(2, 42); // 0x400 00000000 + return pow(2, 42); // 0x400 00000000 } function yaamp_hashrate_step() { - return 300; + return 300; } function yaamp_profitability($coin) { - if(!$coin->difficulty) return 0; - - $btcmhd = 20116.56761169 / $coin->difficulty * $coin->reward * $coin->price; - if(!$coin->auxpow && $coin->rpcencoding == 'POW') - { - $listaux = getdbolist('db_coins', "enable and visible and auto_ready and auxpow and algo='$coin->algo'"); - foreach($listaux as $aux) - { - if(!$aux->difficulty) continue; - - $btcmhdaux = 20116.56761169 / $aux->difficulty * $aux->reward * $aux->price; - $btcmhd += $btcmhdaux; - } - } - - $algo_unit_factor = yaamp_algo_mBTC_factor($coin->algo); - return $btcmhd * $algo_unit_factor; + if (!$coin->difficulty) + return 0; + + $btcmhd = 20116.56761169 / $coin->difficulty * $coin->reward * $coin->price; + if (!$coin->auxpow && $coin->rpcencoding == 'POW') { + $listaux = getdbolist('db_coins', "enable and visible and auto_ready and auxpow and algo='$coin->algo'"); + foreach ($listaux as $aux) { + if (!$aux->difficulty) + continue; + + $btcmhdaux = 20116.56761169 / $aux->difficulty * $aux->reward * $aux->price; + $btcmhd += $btcmhdaux; + } + } + + $algo_unit_factor = yaamp_algo_mBTC_factor($coin->algo); + return $btcmhd * $algo_unit_factor; } function yaamp_convert_amount_user($coin, $amount, $user) { - $refcoin = getdbo('db_coins', $user->coinid); - $value = 0.; - if (YAAMP_ALLOW_EXCHANGE) { - if(!$refcoin) $refcoin = getdbosql('db_coins', "symbol='BTC'"); - if(!$refcoin || $refcoin->price <= 0) return 0; - $value = $amount * $coin->price / $refcoin->price; - } else if ($coin->price && $refcoin && $refcoin->price > 0.) { - $value = $amount * $coin->price / $refcoin->price; - } else if ($coin->id == $user->coinid) { - $value = $amount; - } - return $value; + $refcoin = getdbo('db_coins', $user->coinid); + $value = 0.; + if (YAAMP_ALLOW_EXCHANGE) { + if (!$refcoin) + $refcoin = getdbosql('db_coins', "symbol='BTC'"); + if (!$refcoin || $refcoin->price <= 0) + return 0; + $value = $amount * $coin->price / $refcoin->price; + } else if ($coin->price && $refcoin && $refcoin->price > 0.) { + $value = $amount * $coin->price / $refcoin->price; + } else if ($coin->id == $user->coinid) { + $value = $amount; + } + return $value; } function yaamp_convert_earnings_user($user, $status) { - $refcoin = getdbo('db_coins', $user->coinid); - $value = 0.; - if (YAAMP_ALLOW_EXCHANGE) { - if(!$refcoin) $refcoin = getdbosql('db_coins', "symbol='BTC'"); - if(!$refcoin || $refcoin->price <= 0) return 0; - $value = dboscalar("SELECT sum(amount*price) FROM earnings WHERE $status AND userid={$user->id}"); - $value = $value / $refcoin->price; - } else if ($refcoin && $refcoin->price > 0.) { - $value = dboscalar("SELECT sum(amount*price) FROM earnings WHERE $status AND userid={$user->id}"); - $value = $value / $refcoin->price; - } else if ($user->coinid) { - $value = dboscalar("SELECT sum(amount) FROM earnings WHERE $status AND userid={$user->id} AND coinid=".$user->coinid); - } - return $value; + $refcoin = getdbo('db_coins', $user->coinid); + $value = 0.; + if (YAAMP_ALLOW_EXCHANGE) { + if (!$refcoin) + $refcoin = getdbosql('db_coins', "symbol='BTC'"); + if (!$refcoin || $refcoin->price <= 0) + return 0; + $value = dboscalar("SELECT sum(amount*price) FROM earnings WHERE $status AND userid={$user->id}"); + $value = $value / $refcoin->price; + } else if ($refcoin && $refcoin->price > 0.) { + $value = dboscalar("SELECT sum(amount*price) FROM earnings WHERE $status AND userid={$user->id}"); + $value = $value / $refcoin->price; + } else if ($user->coinid) { + $value = dboscalar("SELECT sum(amount) FROM earnings WHERE $status AND userid={$user->id} AND coinid=" . $user->coinid); + } + return $value; } //////////////////////////////credits to Alexg for PHP code changes////////////////////////////////////////// -function yaamp_pool_rate($algo=null) +function yaamp_pool_rate($algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate-$algo", - "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND algo=:algo", array(':algo'=>$algo)); + $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate-$algo", "SELECT (sum(difficulty) * $target / $interval / 1000) FROM shares WHERE valid AND time>$delay AND algo=:algo", array( + ':algo' => $algo + )); - return $rate; + return $rate; } -function yaamp_pool_rate_bad($algo=null) +function yaamp_pool_rate_bad($algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); $rate = controller()->memcache->get("yaamp_pool_rate_bad-$algo"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE not valid AND time>$delay AND algo=:algo", array(':algo'=>$algo)); - $rate = $rate * $target / $interval / 1000; - $t = 30; + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE not valid AND time>$delay AND algo=:algo", array( + ':algo' => $algo + )); + $rate = $rate * $target / $interval / 1000; + $t = 30; controller()->memcache->set("yaamp_pool_rate_bad-$algo", $rate, $t); } - return $rate; + return $rate; } -function yaamp_pool_rate_rentable($algo=null) +function yaamp_pool_rate_rentable($algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); $rate = controller()->memcache->get("yaamp_pool_rate_rentable-$algo"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND extranonce1 AND time>$delay AND algo=:algo", array(':algo'=>$algo)); - $rate = $rate * $target / $interval / 1000; - $t = 30; + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND extranonce1 AND time>$delay AND algo=:algo", array( + ':algo' => $algo + )); + $rate = $rate * $target / $interval / 1000; + $t = 30; controller()->memcache->set("yaamp_pool_rate_rentable-$algo", $rate, $t); } - return $rate; + return $rate; } -function yaamp_user_rate($userid, $algo=null) +function yaamp_user_rate($userid, $algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); $rate = controller()->memcache->get("yaamp_user_rate-$userid-$algo"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); - $rate = $rate * $target / $interval / 1000; - $t = 30; + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array( + ':algo' => $algo + )); + $rate = $rate * $target / $interval / 1000; + $t = 30; controller()->memcache->set("yaamp_user_rate-$userid-$algo", $rate, $t); } - return $rate; + return $rate; } -function yaamp_user_rate_bad($userid, $algo=null) +function yaamp_user_rate_bad($userid, $algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); $rate = controller()->memcache->get("yaamp_user_rate_bad-$userid-$algo"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $diff = (double) controller()->memcache->get_database_scalar("yaamp_user_diff_avg-$userid-$algo", - "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); + $diff = (double) controller()->memcache->get_database_scalar("yaamp_user_diff_avg-$userid-$algo", "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND userid=$userid AND algo=:algo", array( + ':algo' => $algo + )); - $rate = dboscalar("SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND userid=$userid AND algo=:algo", array(':algo'=>$algo)); - $rate = $rate * $diff * $target / $interval / 1000; - $t = 30; + $rate = dboscalar("SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND userid=$userid AND algo=:algo", array( + ':algo' => $algo + )); + $rate = $rate * $diff * $target / $interval / 1000; + $t = 30; controller()->memcache->set("yaamp_user_rate_bad-$userid-$algo", $rate, $t); } - return $rate; + return $rate; } -function yaamp_worker_rate($workerid, $algo=null) +function yaamp_worker_rate($workerid, $algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); $rate = controller()->memcache->get("yaamp_worker_rate-$workerid-$algo"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); - $rate = $rate * $target / $interval / 1000; - $t = 30; + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND workerid=" . $workerid); + $rate = $rate * $target / $interval / 1000; + $t = 30; controller()->memcache->set("yaamp_worker_rate-$workerid-$algo", $rate, $t); } - return $rate; + return $rate; } -function yaamp_worker_rate_bad($workerid, $algo=null) +function yaamp_worker_rate_bad($workerid, $algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); $rate = controller()->memcache->get("yaamp_worker_rate_bad-$workerid-$algo"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $diff = (double) controller()->memcache->get_database_scalar("yaamp_worker_diff_avg-$workerid-$algo", - "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND workerid=".$workerid); + $diff = (double) controller()->memcache->get_database_scalar("yaamp_worker_diff_avg-$workerid-$algo", "SELECT avg(difficulty) FROM shares WHERE valid AND time>$delay AND workerid=" . $workerid); - $rate = dboscalar("SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND workerid=".$workerid); + $rate = dboscalar("SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND workerid=" . $workerid); - $rate = $rate * $diff * $target / $interval / 1000; - $t = 30; + $rate = $rate * $diff * $target / $interval / 1000; + $t = 30; controller()->memcache->set("yaamp_worker_rate_bad-$workerid-$algo", $rate, $t); } - return empty($rate)? 0: $rate; + return empty($rate) ? 0 : $rate; } -function yaamp_worker_shares_bad($workerid, $algo=null) +function yaamp_worker_shares_bad($workerid, $algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = (int) controller()->memcache->get_database_scalar("yaamp_worker_shares_bad-$workerid-$algo", - "SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND workerid=".$workerid); + $rate = (int) controller()->memcache->get_database_scalar("yaamp_worker_shares_bad-$workerid-$algo", "SELECT count(id) FROM shares WHERE valid!=1 AND time>$delay AND workerid=" . $workerid); - return $rate; + return $rate; } function yaamp_coin_rate($coinid) { - $coin = getdbo('db_coins', $coinid); - if(!$coin || !$coin->enable) return 0; + $coin = getdbo('db_coins', $coinid); + if (!$coin || !$coin->enable) + return 0; $rate = controller()->memcache->get("yaamp_coin_rate-$coinid"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($coin->algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($coin->algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND coinid=$coinid"); - $rate = $rate * $target / $interval / 1000; - $t = 30; + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE valid AND time>$delay AND coinid=$coinid"); + $rate = $rate * $target / $interval / 1000; + $t = 30; controller()->memcache->set("yaamp_coin_rate-$coinid", $rate, $t); } - return $rate; + return $rate; } -function yaamp_rented_rate($algo=null) +function yaamp_rented_rate($algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); $rate = controller()->memcache->get("yaamp_rented_rate-$algo"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE time>$delay AND algo=:algo AND jobid!=0 AND valid", array(':algo'=>$algo)); - $rate = $rate * $target / $interval / 1000; - $t = 30; - controller()->memcache->set("yaamp_rented_rate-$algo", $rate, $t); + $rate = dboscalar("SELECT sum(difficulty) FROM shares WHERE time>$delay AND algo=:algo AND jobid!=0 AND valid", array( + ':algo' => $algo + )); + $rate = $rate * $target / $interval / 1000; + $t = 30; + controller()->memcache->set("yaamp_rented_rate-$algo", $rate, $t); } - return $rate; + return $rate; } function yaamp_job_rate($jobid) { $job = getdbo('db_jobs', $jobid); - if(!$job) return 0; + if (!$job) + return 0; $rate = controller()->memcache->get("yaamp_job_rate-$jobid"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($job->algo); + $target = yaamp_hashrate_constant($job->algo); $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $delay = time() - $interval; - $rate = dboscalar("SELECT sum(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); + $rate = dboscalar("SELECT sum(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=" . $jobid); $rate = $rate * $target / $interval / 1000; - $t = 30; + $t = 30; controller()->memcache->set("yaamp_job_rate-$jobid", $rate, $t); } - + return $rate; } function yaamp_job_rate_bad($jobid) { $job = getdbo('db_jobs', $jobid); - if(!$job) return 0; + if (!$job) + return 0; $rate = controller()->memcache->get("yaamp_job_rate_bad-$jobid"); - if($rate === false) { + if ($rate === false) { - $target = yaamp_hashrate_constant($job->algo); + $target = yaamp_hashrate_constant($job->algo); $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $delay = time() - $interval; - $diff = (double) controller()->memcache->get_database_scalar("yaamp_job_diff_avg-$jobid", - "SELECT avg(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=".$jobid); + $diff = (double) controller()->memcache->get_database_scalar("yaamp_job_diff_avg-$jobid", "SELECT avg(difficulty) FROM jobsubmits WHERE valid AND time>$delay AND jobid=" . $jobid); - $rate = dboscalar("SELECT count(id) FROM jobsubmits WHERE valid!=1 AND time>$delay AND jobid=".$jobid); + $rate = dboscalar("SELECT count(id) FROM jobsubmits WHERE valid!=1 AND time>$delay AND jobid=" . $jobid); $rate = $rate * $diff * $target / $interval / 1000; - $t = 30; + $t = 30; controller()->memcache->set("yaamp_job_rate_bad-$jobid", $rate, $t); } @@ -749,30 +784,32 @@ function yaamp_job_rate_bad($jobid) ////////////////////////////////////////////////////////////////////////////////////////////////////// -function yaamp_pool_rate_pow($algo=null) +function yaamp_pool_rate_pow($algo = null) { - if(!$algo) $algo = user()->getState('yaamp-algo'); + if (!$algo) + $algo = user()->getState('yaamp-algo'); - $target = yaamp_hashrate_constant($algo); - $interval = yaamp_hashrate_step(); - $delay = time()-$interval; + $target = yaamp_hashrate_constant($algo); + $interval = yaamp_hashrate_step(); + $delay = time() - $interval; - $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_pow-$algo", - "SELECT sum(shares.difficulty) * $target / $interval / 1000 FROM shares, coins - WHERE shares.valid AND shares.time>$delay AND shares.algo=:algo AND - shares.coinid=coins.id AND coins.rpcencoding='POW'", array(':algo'=>$algo)); + $rate = controller()->memcache->get_database_scalar("yaamp_pool_rate_pow-$algo", "SELECT sum(shares.difficulty) * $target / $interval / 1000 FROM shares, coins + WHERE shares.valid AND shares.time>$delay AND shares.algo=:algo AND + shares.coinid=coins.id AND coins.rpcencoding='POW'", array( + ':algo' => $algo + )); - return $rate; + return $rate; } ///////////////////////////////////////////////////////////////////////////////////////////// function yaamp_renter_account($renter) { - if(YAAMP_PRODUCTION) - return "renter-prod-$renter->id"; - else - return "renter-dev-$renter->id"; + if (YAAMP_PRODUCTION) + return "renter-prod-$renter->id"; + else + return "renter-dev-$renter->id"; } ///////////////////////////////////////////////////////////////////////////////////////////// diff --git a/web/yaamp/modules/api/ApiController.php b/web/yaamp/modules/api/ApiController.php index 54da82e4f..d6b896900 100644 --- a/web/yaamp/modules/api/ApiController.php +++ b/web/yaamp/modules/api/ApiController.php @@ -2,442 +2,474 @@ class ApiController extends CommonController { - public $defaultAction='status'; + public $defaultAction = 'status'; - ///////////////////////////////////////////////// - - public function actionStatus() - { - $client_ip = arraySafeVal($_SERVER,'REMOTE_ADDR'); - $whitelisted = isAdminIP($client_ip); - if (!$whitelisted && is_file(YAAMP_LOGS.'/overloaded')) { - header('HTTP/1.0 503 Disabled, server overloaded'); - return; - } - if(!$whitelisted && !LimitRequest('api-status', 10)) { - return; - } - - $json = controller()->memcache->get("api_status"); - - if (!empty($json)) { - echo $json; - return; - } - - $stats = array(); - foreach(yaamp_get_algos() as $i=>$algo) - { - $coins = (int) controller()->memcache->get_database_count_ex("api_status_coins-$algo", - 'db_coins', "enable and visible and auto_ready and algo=:algo", array(':algo'=>$algo)); - - if (!$coins) continue; - - $workers = (int) controller()->memcache->get_database_scalar("api_status_workers-$algo", - "select COUNT(id) FROM workers WHERE algo=:algo", - array(':algo'=>$algo) - ); - - $hashrate = controller()->memcache->get_database_scalar("api_status_hashrate-$algo", - "select hashrate from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - - $price = controller()->memcache->get_database_scalar("api_status_price-$algo", - "select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - - $price = bitcoinvaluetoa(take_yaamp_fee($price/1000, $algo)); - - $rental = controller()->memcache->get_database_scalar("api_status_rental-$algo", - "select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - - $rental = bitcoinvaluetoa($rental); - - $t = time() - 24*60*60; - - $avgprice = controller()->memcache->get_database_scalar("api_status_avgprice-$algo", - "select avg(price) from hashrate where algo=:algo and time>$t", array(':algo'=>$algo)); - - $avgprice = bitcoinvaluetoa(take_yaamp_fee($avgprice/1000, $algo)); - - $total1 = controller()->memcache->get_database_scalar("api_status_total-$algo", - "select sum(amount*price) from blocks where category!='orphan' and time>$t and algo=:algo", array(':algo'=>$algo)); - - $hashrate1 = (double) controller()->memcache->get_database_scalar("api_status_avghashrate-$algo", - "select avg(hashrate) from hashrate where time>$t and algo=:algo", array(':algo'=>$algo)); - - $algo_unit_factor = yaamp_algo_mBTC_factor($algo); - $btcmhday1 = $hashrate1 > 0 ? mbitcoinvaluetoa($total1 / $hashrate1 * 1000000 * 1000 * $algo_unit_factor) : 0; - - $fees = yaamp_fee($algo); - $port = getAlgoPort($algo); - - $stat = array( - "name" => $algo, - "port" => (int) $port, - "coins" => $coins, - "fees" => (double) $fees, - "hashrate" => (double) $hashrate, - "workers" => (int) $workers, - "estimate_current" => $price, - "estimate_last24h" => $avgprice, - "actual_last24h" => $btcmhday1, - "mbtc_mh_factor" => $algo_unit_factor, - "hashrate_last24h" => (double) $hashrate1, - ); - if(YAAMP_RENTAL) { - $stat["rental_current"] = $rental; - } - - $stats[$algo] = $stat; - } - - ksort($stats); - - $json = json_encode($stats); - echo $json; - - controller()->memcache->set("api_status", $json, 30, MEMCACHE_COMPRESSED); - } - - public function actionCurrencies() - { - $client_ip = arraySafeVal($_SERVER,'REMOTE_ADDR'); - $whitelisted = isAdminIP($client_ip); - if (!$whitelisted && is_file(YAAMP_LOGS.'/overloaded')) { - header('HTTP/1.0 503 Disabled, server overloaded'); - return; - } - if(!$whitelisted && !LimitRequest('api-currencies', 10)) { - return; - } - - $json = controller()->memcache->get("api_currencies"); - if (empty($json)) { - - $data = array(); - $coins = getdbolist('db_coins', "enable AND visible AND auto_ready AND IFNULL(algo,'PoS')!='PoS' ORDER BY symbol"); - foreach ($coins as $coin) - { - $symbol = $coin->symbol; - - $last = dborow("SELECT height, time FROM blocks ". - "WHERE coin_id=:id AND category IN ('immature','generate') ORDER BY height DESC LIMIT 1", - array(':id'=>$coin->id) - ); - $lastblock = (int) arraySafeVal($last,'height'); - $timesincelast = $timelast = (int) arraySafeVal($last,'time'); - if ($timelast > 0) $timesincelast = time() - $timelast; - - $workers = (int) dboscalar("SELECT count(W.userid) AS workers FROM workers W ". - "INNER JOIN accounts A ON A.id = W.userid ". - "WHERE W.algo=:algo AND A.coinid IN (:id, 6)", // 6: btc id - array(':algo'=>$coin->algo, ':id'=>$coin->id) - ); - - $since = $timelast ? $timelast : time() - 60*60; - $shares = dborow("SELECT count(id) AS shares, SUM(difficulty) AS coin_hr FROM shares WHERE time>$since AND algo=:algo AND coinid IN (0,:id)", - array(':id'=>$coin->id,':algo'=>$coin->algo) - ); - - $t24 = time() - 24*60*60; - $res24h = controller()->memcache->get_database_row("history_item2-{$coin->id}-{$coin->algo}", - "SELECT COUNT(id) as a, SUM(amount*price) as b FROM blocks ". - "WHERE coin_id=:id AND NOT category IN ('orphan','stake','generated') AND time>$t24 AND algo=:algo", - array(':id'=>$coin->id, ':algo'=>$coin->algo) - ); - - // Coin hashrate, we only store the hashrate per algo in the db, - // we need to compute the % of the coin compared to others with the same algo - if ($workers > 0) { - - $algohr = (double) dboscalar("SELECT SUM(difficulty) AS algo_hr FROM shares WHERE time>$since AND algo=:algo",array(':algo'=>$coin->algo)); - $factor = ($algohr > 0 && !empty($shares)) ? (double) $shares['coin_hr'] / $algohr : 1.; - $algo_hashrate = controller()->memcache->get_database_scalar("api_status_hashrate-{$coin->algo}", - "SELECT hashrate FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array(':algo'=>$coin->algo) - ); - - } else { - $factor = $algo_hashrate = 0; - } - - $btcmhd = yaamp_profitability($coin); - $btcmhd = mbitcoinvaluetoa($btcmhd); - - //Add network hash difficulty and symbol - $min_ttf = $coin->network_ttf>0? min($coin->actual_ttf, $coin->network_ttf): $coin->actual_ttf; - $network_hash = $coin->difficulty * 0x100000000 / ($min_ttf? $min_ttf: 60); - - $data[$symbol] = array( - 'algo' => $coin->algo, - 'port' => getAlgoPort($coin->algo), - 'name' => $coin->name, - 'reward' => $coin->reward, - 'height' => (int) $coin->block_height, - 'difficulty' => $coin->difficulty, - 'workers' => $workers, - 'shares' => (int) arraySafeVal($shares,'shares'), - 'hashrate' => round($factor * $algo_hashrate), - 'network_hashrate' => $network_hash, - 'estimate' => $btcmhd, - //'percent' => round($factor * 100, 1), - '24h_blocks' => (int) arraySafeVal($res24h,'a'), - '24h_btc' => round(arraySafeVal($res24h,'b',0), 8), - 'lastblock' => $lastblock, - 'timesincelast' => $timesincelast, - ); - - if (!empty($coin->symbol2)) - $data[$symbol]['symbol'] = $coin->symbol2; - } - $json = json_encode($data); - controller()->memcache->set("api_currencies", $json, 15, MEMCACHE_COMPRESSED); - } - - echo str_replace("},","},\n", $json); - } - - public function actionWallet() - { - if(!LimitRequest('api-wallet', 10)) { - return; - } - if (is_file(YAAMP_LOGS.'/overloaded')) { - header('HTTP/1.0 503 Disabled, server overloaded'); - return; - } - $wallet = getparam('address'); - - $user = getuserparam($wallet); - if(!$user || $user->is_locked) return; - - $total_unsold = yaamp_convert_earnings_user($user, "status!=2"); - - $t = time() - 24*60*60; - $total_paid = bitcoinvaluetoa(controller()->memcache->get_database_scalar("api_wallet_paid-".$user->id, - "SELECT SUM(amount) FROM payouts WHERE time >= $t AND account_id=".$user->id)); - - $balance = bitcoinvaluetoa($user->balance); - $total_unpaid = bitcoinvaluetoa($balance + $total_unsold); - $total_earned = bitcoinvaluetoa($total_unpaid + $total_paid); - - $coin = getdbo('db_coins', $user->coinid); - if(!$coin) return; - - echo "{"; - echo "\"currency\": \"{$coin->symbol}\", "; - echo "\"unsold\": $total_unsold, "; - echo "\"balance\": $balance, "; - echo "\"unpaid\": $total_unpaid, "; - echo "\"paid24h\": $total_paid, "; - echo "\"total\": $total_earned"; - echo "}"; - } - - public function actionWalletEx() - { - $wallet = getparam('address'); - if (is_file(YAAMP_LOGS.'/overloaded')) { - header('HTTP/1.0 503 Disabled, server overloaded'); - return; - } - if(!LimitRequest('api-wallet', 60)) { - return; - } - - $user = getuserparam($wallet); - if(!$user || $user->is_locked) return; - - $total_unsold = yaamp_convert_earnings_user($user, "status!=2"); - - $t = time() - 24*60*60; - $total_paid = bitcoinvaluetoa(controller()->memcache->get_database_scalar("api_wallet_paid-".$user->id, - "SELECT SUM(amount) FROM payouts WHERE time >= $t AND account_id=".$user->id)); - - $balance = bitcoinvaluetoa($user->balance); - $total_unpaid = bitcoinvaluetoa($balance + $total_unsold); - $total_earned = bitcoinvaluetoa($total_unpaid + $total_paid); - - $coin = getdbo('db_coins', $user->coinid); - if(!$coin) return; - - echo "{"; - echo "\"currency\": ".json_encode($coin->symbol).", "; - echo "\"unsold\": $total_unsold, "; - echo "\"balance\": $balance, "; - echo "\"unpaid\": $total_unpaid, "; - echo "\"paid24h\": $total_paid, "; - echo "\"total\": $total_earned, "; - - echo "\"miners\": "; - echo "["; - - $workers = getdbolist('db_workers', "userid={$user->id} ORDER BY password"); - foreach($workers as $i=>$worker) - { - $user_rate1 = yaamp_worker_rate($worker->id, $worker->algo); - $user_rate1_bad = yaamp_worker_rate_bad($worker->id, $worker->algo); - - if($i) echo ", "; - - echo "{"; - echo "\"version\": ".json_encode($worker->version).", "; - echo "\"password\": ".json_encode($worker->password).", "; - echo "\"ID\": ".json_encode($worker->worker).", "; - echo "\"algo\": \"{$worker->algo}\", "; - echo "\"difficulty\": ".doubleval($worker->difficulty).", "; - echo "\"subscribe\": ".intval($worker->subscribe).", "; - echo "\"accepted\": ".round($user_rate1,3).", "; - echo "\"rejected\": ".round($user_rate1_bad,3); - echo "}"; - } - - echo "]"; - - if(YAAMP_API_PAYOUTS) - { - $json_payouts = controller()->memcache->get("api_payouts-".$user->id); - if (empty($json_payouts)) { - $json_payouts = ",\"payouts\": "; - $json_payouts .= "["; - $list = getdbolist('db_payouts', "account_id={$user->id} AND completed>0 AND tx IS NOT NULL AND time >= ".(time() - YAAMP_API_PAYOUTS_PERIOD)." ORDER BY time DESC"); - foreach($list as $j => $payout) - { - if($j) $json_payouts .= ", "; - $json_payouts .= "{"; - $json_payouts .= "\"time\": ".(0 + $payout->time).","; - $json_payouts .= "\"amount\": \"{$payout->amount}\","; - $json_payouts .= "\"tx\": \"{$payout->tx}\""; - $json_payouts .= "}"; - } - $json_payouts .= "]"; - controller()->memcache->set("api_payouts-".$user->id, $json_payouts, 60, MEMCACHE_COMPRESSED); - } - echo str_replace("},","},\n", $json_payouts); - } - - echo "}"; - } - - ///////////////////////////////////////////////// - - public function actionRental() - { - if(!LimitRequest('api-rental', 10)) return; - if(!YAAMP_RENTAL) return; - - $key = getparam('key'); - $renter = getdbosql('db_renters', "apikey=:apikey", array(':apikey'=>$key)); - if(!$renter) return; - - $balance = bitcoinvaluetoa($renter->balance); - $unconfirmed = bitcoinvaluetoa($renter->unconfirmed); - - echo "{"; - echo "\"balance\": $balance, "; - echo "\"unconfirmed\": $unconfirmed, "; - - echo "\"jobs\": ["; - $list = getdbolist('db_jobs', "renterid=$renter->id"); - foreach($list as $i=>$job) - { - if($i) echo ", "; - - $hashrate = yaamp_job_rate($job->id); - $hashrate_bad = yaamp_job_rate_bad($job->id); - - echo '{'; - echo "\"jobid\": \"$job->id\", "; - echo "\"algo\": \"$job->algo\", "; - echo "\"price\": \"$job->price\", "; - echo "\"hashrate\": \"$job->speed\", "; - echo "\"server\": \"$job->host\", "; - echo "\"port\": \"$job->port\", "; - echo "\"username\": \"$job->username\", "; - echo "\"password\": \"$job->password\", "; - echo "\"started\": \"$job->ready\", "; - echo "\"active\": \"$job->active\", "; - echo "\"accepted\": \"$hashrate\", "; - echo "\"rejected\": \"$hashrate_bad\", "; - echo "\"diff\": \"$job->difficulty\""; - - echo '}'; - } - - echo "]}"; - } - - public function actionRental_price() - { - if(!YAAMP_RENTAL) return; - - $key = getparam('key'); - $renter = getdbosql('db_renters', "apikey=:apikey", array(':apikey'=>$key)); - if(!$renter) return; - - $jobid = getparam('jobid'); - $price = getparam('price'); - - $job = getdbo('db_jobs', $jobid); - if($job->renterid != $renter->id) return; - - $job->price = $price; - $job->time = time(); - $job->save(); - } - - public function actionRental_hashrate() - { - if(!YAAMP_RENTAL) return; - - $key = getparam('key'); - $renter = getdbosql('db_renters', "apikey=:apikey", array(':apikey'=>$key)); - if(!$renter) return; - - $jobid = getparam('jobid'); - $hashrate = getparam('hashrate'); - - $job = getdbo('db_jobs', $jobid); - if($job->renterid != $renter->id) return; - - $job->speed = $hashrate; - $job->time = time(); - $job->save(); - } - - public function actionRental_start() - { - if(!YAAMP_RENTAL) return; - - $key = getparam('key'); - $renter = getdbosql('db_renters', "apikey=:apikey", array(':apikey'=>$key)); - if(!$renter || $renter->balance<=0) return; - - $jobid = getparam('jobid'); - - $job = getdbo('db_jobs', $jobid); - if($job->renterid != $renter->id) return; - - $job->ready = true; - $job->time = time(); - $job->save(); - } - - public function actionRental_stop() - { - if(!YAAMP_RENTAL) return; - - $key = getparam('key'); - $renter = getdbosql('db_renters', "apikey=:apikey", array(':apikey'=>$key)); - if(!$renter) return; - - $jobid = getparam('jobid'); - - $job = getdbo('db_jobs', $jobid); - if($job->renterid != $renter->id) return; - - $job->ready = false; - $job->time = time(); - $job->save(); - } + ///////////////////////////////////////////////// + + public function actionStatus() + { + $client_ip = arraySafeVal($_SERVER, 'REMOTE_ADDR'); + $whitelisted = isAdminIP($client_ip); + if (!$whitelisted && is_file(YAAMP_LOGS . '/overloaded')) { + header('HTTP/1.0 503 Disabled, server overloaded'); + return; + } + if (!$whitelisted && !LimitRequest('api-status', 10)) { + return; + } + + $json = controller()->memcache->get("api_status"); + + if (!empty($json)) { + echo $json; + return; + } + + $stats = array(); + foreach (yaamp_get_algos() as $i => $algo) { + $coins = (int) controller()->memcache->get_database_count_ex("api_status_coins-$algo", 'db_coins', "enable and visible and auto_ready and algo=:algo", array( + ':algo' => $algo + )); + + if (!$coins) + continue; + + $workers = (int) controller()->memcache->get_database_scalar("api_status_workers-$algo", "select COUNT(id) FROM workers WHERE algo=:algo", array( + ':algo' => $algo + )); + + $hashrate = controller()->memcache->get_database_scalar("api_status_hashrate-$algo", "select hashrate from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + + $price = controller()->memcache->get_database_scalar("api_status_price-$algo", "select price from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + + $price = bitcoinvaluetoa(take_yaamp_fee($price / 1000, $algo)); + + $rental = controller()->memcache->get_database_scalar("api_status_rental-$algo", "select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + + $rental = bitcoinvaluetoa($rental); + + $t = time() - 24 * 60 * 60; + + $avgprice = controller()->memcache->get_database_scalar("api_status_avgprice-$algo", "select avg(price) from hashrate where algo=:algo and time>$t", array( + ':algo' => $algo + )); + + $avgprice = bitcoinvaluetoa(take_yaamp_fee($avgprice / 1000, $algo)); + + $total1 = controller()->memcache->get_database_scalar("api_status_total-$algo", "select sum(amount*price) from blocks where category!='orphan' and time>$t and algo=:algo", array( + ':algo' => $algo + )); + + $hashrate1 = (double) controller()->memcache->get_database_scalar("api_status_avghashrate-$algo", "select avg(hashrate) from hashrate where time>$t and algo=:algo", array( + ':algo' => $algo + )); + + $algo_unit_factor = yaamp_algo_mBTC_factor($algo); + $btcmhday1 = $hashrate1 > 0 ? mbitcoinvaluetoa($total1 / $hashrate1 * 1000000 * 1000 * $algo_unit_factor) : 0; + + $fees = yaamp_fee($algo); + $port = getAlgoPort($algo); + + $stat = array( + "name" => $algo, + "port" => (int) $port, + "coins" => $coins, + "fees" => (double) $fees, + "hashrate" => (double) $hashrate, + "workers" => (int) $workers, + "estimate_current" => $price, + "estimate_last24h" => $avgprice, + "actual_last24h" => $btcmhday1, + "mbtc_mh_factor" => $algo_unit_factor, + "hashrate_last24h" => (double) $hashrate1 + ); + if (YAAMP_RENTAL) { + $stat["rental_current"] = $rental; + } + + $stats[$algo] = $stat; + } + + ksort($stats); + + $json = json_encode($stats); + echo $json; + + controller()->memcache->set("api_status", $json, 30, MEMCACHE_COMPRESSED); + } + + public function actionCurrencies() + { + $client_ip = arraySafeVal($_SERVER, 'REMOTE_ADDR'); + $whitelisted = isAdminIP($client_ip); + if (!$whitelisted && is_file(YAAMP_LOGS . '/overloaded')) { + header('HTTP/1.0 503 Disabled, server overloaded'); + return; + } + if (!$whitelisted && !LimitRequest('api-currencies', 10)) { + return; + } + + $json = controller()->memcache->get("api_currencies"); + if (empty($json)) { + + $data = array(); + $coins = getdbolist('db_coins', "enable AND visible AND auto_ready AND IFNULL(algo,'PoS')!='PoS' ORDER BY symbol"); + foreach ($coins as $coin) { + $symbol = $coin->symbol; + + $last = dborow("SELECT height, time FROM blocks " . "WHERE coin_id=:id AND category IN ('immature','generate') ORDER BY height DESC LIMIT 1", array( + ':id' => $coin->id + )); + $lastblock = (int) arraySafeVal($last, 'height'); + $timesincelast = $timelast = (int) arraySafeVal($last, 'time'); + if ($timelast > 0) + $timesincelast = time() - $timelast; + + $workers = (int) dboscalar("SELECT count(W.userid) AS workers FROM workers W " . "INNER JOIN accounts A ON A.id = W.userid " . "WHERE W.algo=:algo AND A.coinid IN (:id, 6)", // 6: btc id + array( + ':algo' => $coin->algo, + ':id' => $coin->id + )); + + $since = $timelast ? $timelast : time() - 60 * 60; + $shares = dborow("SELECT count(id) AS shares, SUM(difficulty) AS coin_hr FROM shares WHERE time>$since AND algo=:algo AND coinid IN (0,:id)", array( + ':id' => $coin->id, + ':algo' => $coin->algo + )); + + $t24 = time() - 24 * 60 * 60; + $res24h = controller()->memcache->get_database_row("history_item2-{$coin->id}-{$coin->algo}", "SELECT COUNT(id) as a, SUM(amount*price) as b FROM blocks " . "WHERE coin_id=:id AND NOT category IN ('orphan','stake','generated') AND time>$t24 AND algo=:algo", array( + ':id' => $coin->id, + ':algo' => $coin->algo + )); + + // Coin hashrate, we only store the hashrate per algo in the db, + // we need to compute the % of the coin compared to others with the same algo + if ($workers > 0) { + + $algohr = (double) dboscalar("SELECT SUM(difficulty) AS algo_hr FROM shares WHERE time>$since AND algo=:algo", array( + ':algo' => $coin->algo + )); + $factor = ($algohr > 0 && !empty($shares)) ? (double) $shares['coin_hr'] / $algohr : 1.; + $algo_hashrate = controller()->memcache->get_database_scalar("api_status_hashrate-{$coin->algo}", "SELECT hashrate FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array( + ':algo' => $coin->algo + )); + + } else { + $factor = $algo_hashrate = 0; + } + + $btcmhd = yaamp_profitability($coin); + $btcmhd = mbitcoinvaluetoa($btcmhd); + + //Add network hash difficulty and symbol + $min_ttf = $coin->network_ttf > 0 ? min($coin->actual_ttf, $coin->network_ttf) : $coin->actual_ttf; + $network_hash = $coin->difficulty * 0x100000000 / ($min_ttf ? $min_ttf : 60); + + $data[$symbol] = array( + 'algo' => $coin->algo, + 'port' => getAlgoPort($coin->algo), + 'name' => $coin->name, + 'reward' => $coin->reward, + 'height' => (int) $coin->block_height, + 'difficulty' => $coin->difficulty, + 'workers' => $workers, + 'shares' => (int) arraySafeVal($shares, 'shares'), + 'hashrate' => round($factor * $algo_hashrate), + 'network_hashrate' => $network_hash, + 'estimate' => $btcmhd, + //'percent' => round($factor * 100, 1), + '24h_blocks' => (int) arraySafeVal($res24h, 'a'), + '24h_btc' => round(arraySafeVal($res24h, 'b', 0), 8), + 'lastblock' => $lastblock, + 'timesincelast' => $timesincelast + ); + + if (!empty($coin->symbol2)) + $data[$symbol]['symbol'] = $coin->symbol2; + } + $json = json_encode($data); + controller()->memcache->set("api_currencies", $json, 15, MEMCACHE_COMPRESSED); + } + + echo str_replace("},", "},\n", $json); + } + + public function actionWallet() + { + if (!LimitRequest('api-wallet', 10)) { + return; + } + if (is_file(YAAMP_LOGS . '/overloaded')) { + header('HTTP/1.0 503 Disabled, server overloaded'); + return; + } + $wallet = getparam('address'); + + $user = getuserparam($wallet); + if (!$user || $user->is_locked) + return; + + $total_unsold = yaamp_convert_earnings_user($user, "status!=2"); + + $t = time() - 24 * 60 * 60; + $total_paid = bitcoinvaluetoa(controller()->memcache->get_database_scalar("api_wallet_paid-" . $user->id, "SELECT SUM(amount) FROM payouts WHERE time >= $t AND account_id=" . $user->id)); + + $balance = bitcoinvaluetoa($user->balance); + $total_unpaid = bitcoinvaluetoa($balance + $total_unsold); + $total_earned = bitcoinvaluetoa($total_unpaid + $total_paid); + + $coin = getdbo('db_coins', $user->coinid); + if (!$coin) + return; + + echo "{"; + echo "\"currency\": \"{$coin->symbol}\", "; + echo "\"unsold\": $total_unsold, "; + echo "\"balance\": $balance, "; + echo "\"unpaid\": $total_unpaid, "; + echo "\"paid24h\": $total_paid, "; + echo "\"total\": $total_earned"; + echo "}"; + } + + public function actionWalletEx() + { + $wallet = getparam('address'); + if (is_file(YAAMP_LOGS . '/overloaded')) { + header('HTTP/1.0 503 Disabled, server overloaded'); + return; + } + if (!LimitRequest('api-wallet', 60)) { + return; + } + + $user = getuserparam($wallet); + if (!$user || $user->is_locked) + return; + + $total_unsold = yaamp_convert_earnings_user($user, "status!=2"); + + $t = time() - 24 * 60 * 60; + $total_paid = bitcoinvaluetoa(controller()->memcache->get_database_scalar("api_wallet_paid-" . $user->id, "SELECT SUM(amount) FROM payouts WHERE time >= $t AND account_id=" . $user->id)); + + $balance = bitcoinvaluetoa($user->balance); + $total_unpaid = bitcoinvaluetoa($balance + $total_unsold); + $total_earned = bitcoinvaluetoa($total_unpaid + $total_paid); + + $coin = getdbo('db_coins', $user->coinid); + if (!$coin) + return; + + echo "{"; + echo "\"currency\": " . json_encode($coin->symbol) . ", "; + echo "\"unsold\": $total_unsold, "; + echo "\"balance\": $balance, "; + echo "\"unpaid\": $total_unpaid, "; + echo "\"paid24h\": $total_paid, "; + echo "\"total\": $total_earned, "; + + echo "\"miners\": "; + echo "["; + + $workers = getdbolist('db_workers', "userid={$user->id} ORDER BY password"); + foreach ($workers as $i => $worker) { + $user_rate1 = yaamp_worker_rate($worker->id, $worker->algo); + $user_rate1_bad = yaamp_worker_rate_bad($worker->id, $worker->algo); + + if ($i) + echo ", "; + + echo "{"; + echo "\"version\": " . json_encode($worker->version) . ", "; + echo "\"password\": " . json_encode($worker->password) . ", "; + echo "\"ID\": " . json_encode($worker->worker) . ", "; + echo "\"algo\": \"{$worker->algo}\", "; + echo "\"difficulty\": " . doubleval($worker->difficulty) . ", "; + echo "\"subscribe\": " . intval($worker->subscribe) . ", "; + echo "\"accepted\": " . round($user_rate1, 3) . ", "; + echo "\"rejected\": " . round($user_rate1_bad, 3); + echo "}"; + } + + echo "]"; + + if (YAAMP_API_PAYOUTS) { + $json_payouts = controller()->memcache->get("api_payouts-" . $user->id); + if (empty($json_payouts)) { + $json_payouts = ",\"payouts\": "; + $json_payouts .= "["; + $list = getdbolist('db_payouts', "account_id={$user->id} AND completed>0 AND tx IS NOT NULL AND time >= " . (time() - YAAMP_API_PAYOUTS_PERIOD) . " ORDER BY time DESC"); + foreach ($list as $j => $payout) { + if ($j) + $json_payouts .= ", "; + $json_payouts .= "{"; + $json_payouts .= "\"time\": " . (0 + $payout->time) . ","; + $json_payouts .= "\"amount\": \"{$payout->amount}\","; + $json_payouts .= "\"tx\": \"{$payout->tx}\""; + $json_payouts .= "}"; + } + $json_payouts .= "]"; + controller()->memcache->set("api_payouts-" . $user->id, $json_payouts, 60, MEMCACHE_COMPRESSED); + } + echo str_replace("},", "},\n", $json_payouts); + } + + echo "}"; + } + + ///////////////////////////////////////////////// + + public function actionRental() + { + if (!LimitRequest('api-rental', 10)) + return; + if (!YAAMP_RENTAL) + return; + + $key = getparam('key'); + $renter = getdbosql('db_renters', "apikey=:apikey", array( + ':apikey' => $key + )); + if (!$renter) + return; + + $balance = bitcoinvaluetoa($renter->balance); + $unconfirmed = bitcoinvaluetoa($renter->unconfirmed); + + echo "{"; + echo "\"balance\": $balance, "; + echo "\"unconfirmed\": $unconfirmed, "; + + echo "\"jobs\": ["; + $list = getdbolist('db_jobs', "renterid=$renter->id"); + foreach ($list as $i => $job) { + if ($i) + echo ", "; + + $hashrate = yaamp_job_rate($job->id); + $hashrate_bad = yaamp_job_rate_bad($job->id); + + echo '{'; + echo "\"jobid\": \"$job->id\", "; + echo "\"algo\": \"$job->algo\", "; + echo "\"price\": \"$job->price\", "; + echo "\"hashrate\": \"$job->speed\", "; + echo "\"server\": \"$job->host\", "; + echo "\"port\": \"$job->port\", "; + echo "\"username\": \"$job->username\", "; + echo "\"password\": \"$job->password\", "; + echo "\"started\": \"$job->ready\", "; + echo "\"active\": \"$job->active\", "; + echo "\"accepted\": \"$hashrate\", "; + echo "\"rejected\": \"$hashrate_bad\", "; + echo "\"diff\": \"$job->difficulty\""; + + echo '}'; + } + + echo "]}"; + } + + public function actionRental_price() + { + if (!YAAMP_RENTAL) + return; + + $key = getparam('key'); + $renter = getdbosql('db_renters', "apikey=:apikey", array( + ':apikey' => $key + )); + if (!$renter) + return; + + $jobid = getparam('jobid'); + $price = getparam('price'); + + $job = getdbo('db_jobs', $jobid); + if ($job->renterid != $renter->id) + return; + + $job->price = $price; + $job->time = time(); + $job->save(); + } + + public function actionRental_hashrate() + { + if (!YAAMP_RENTAL) + return; + + $key = getparam('key'); + $renter = getdbosql('db_renters', "apikey=:apikey", array( + ':apikey' => $key + )); + if (!$renter) + return; + + $jobid = getparam('jobid'); + $hashrate = getparam('hashrate'); + + $job = getdbo('db_jobs', $jobid); + if ($job->renterid != $renter->id) + return; + + $job->speed = $hashrate; + $job->time = time(); + $job->save(); + } + + public function actionRental_start() + { + if (!YAAMP_RENTAL) + return; + + $key = getparam('key'); + $renter = getdbosql('db_renters', "apikey=:apikey", array( + ':apikey' => $key + )); + if (!$renter || $renter->balance <= 0) + return; + + $jobid = getparam('jobid'); + + $job = getdbo('db_jobs', $jobid); + if ($job->renterid != $renter->id) + return; + + $job->ready = true; + $job->time = time(); + $job->save(); + } + + public function actionRental_stop() + { + if (!YAAMP_RENTAL) + return; + + $key = getparam('key'); + $renter = getdbosql('db_renters', "apikey=:apikey", array( + ':apikey' => $key + )); + if (!$renter) + return; + + $jobid = getparam('jobid'); + + $job = getdbo('db_jobs', $jobid); + if ($job->renterid != $renter->id) + return; + + $job->ready = false; + $job->time = time(); + $job->save(); + } } - diff --git a/web/yaamp/modules/coin/index.php b/web/yaamp/modules/coin/index.php index b6252a391..76f0555e5 100644 --- a/web/yaamp/modules/coin/index.php +++ b/web/yaamp/modules/coin/index.php @@ -14,17 +14,17 @@ end; showTableSorter('maintable', "{ - tableClass: 'dataGrid', - textExtraction: { - 6: function(node, table, n) { return $(node).attr('data'); } - }, - widgets: ['zebra','filter'], - widgetOptions: { - filter_external: '.search', - filter_columnFilters: false, - filter_childRows : true, - filter_ignoreCase: true - } + tableClass: 'dataGrid', + textExtraction: { + 6: function(node, table, n) { return $(node).attr('data'); } + }, + widgets: ['zebra','filter'], + widgetOptions: { + filter_external: '.search', + filter_columnFilters: false, + filter_childRows : true, + filter_ignoreCase: true + } }"); echo << end; -$total_active = 0; +$total_active = 0; $total_installed = 0; $coins = getdbolist('db_coins', "1 ORDER BY created DESC"); -foreach($coins as $coin) -{ -// if($coin->symbol == 'BTC') continue; - if($coin->enable) $total_active++; - if($coin->installed) $total_installed++; +foreach ($coins as $coin) { + // if($coin->symbol == 'BTC') continue; + if ($coin->enable) + $total_active++; + if ($coin->installed) + $total_installed++; - $coin->errors = substr($coin->errors, 0, 30); - $coin->version = substr($coin->version, 0, 20); - $difficulty = Itoa2($coin->difficulty, 3); - $created = datetoa2($coin->created); + $coin->errors = substr($coin->errors, 0, 30); + $coin->version = substr($coin->version, 0, 20); + $difficulty = Itoa2($coin->difficulty, 3); + $created = datetoa2($coin->created); - echo ''; - echo ''; + echo ''; + echo ''; - echo ''.$coin->name.''; + echo '' . $coin->name . ''; - if($this->admin) - echo "$coin->symbol"; - else - echo "$coin->symbol"; + if ($this->admin) + echo "$coin->symbol"; + else + echo "$coin->symbol"; - echo "$coin->algo"; + echo "$coin->algo"; - if($coin->enable) - echo "running"; + if ($coin->enable) + echo "running"; - else if($coin->installed) - echo "installed"; + else if ($coin->installed) + echo "installed"; - else - echo ""; + else + echo ""; - echo "$coin->version"; - echo ''.$created.''; + echo "$coin->version"; + echo '' . $created . ''; -// echo "$difficulty"; - echo ''.$coin->block_height.''; + // echo "$difficulty"; + echo '' . $coin->block_height . ''; - echo "$coin->errors"; - echo ""; + echo "$coin->errors"; + echo ""; - if(!empty($coin->link_bitcointalk)) - echo "forum "; + if (!empty($coin->link_bitcointalk)) + echo "forum "; - if(!empty($coin->link_github)) - echo "git "; + if (!empty($coin->link_github)) + echo "git "; -// if(!empty($coin->link_explorer)) -// echo "expl "; + // if(!empty($coin->link_explorer)) + // echo "expl "; - echo "google "; + echo "google "; -// if(!empty($coin->link_exchange)) -// echo "exch "; + // if(!empty($coin->link_exchange)) + // echo "exch "; - $list2 = getdbolist('db_markets', "coinid=$coin->id"); - foreach($list2 as $market) - { - $url = getMarketUrl($coin, $market->name); - echo "$market->name "; - } + $list2 = getdbolist('db_markets', "coinid=$coin->id"); + foreach ($list2 as $market) { + $url = getMarketUrl($coin, $market->name); + echo "$market->name "; + } - echo ""; - echo ""; + echo ""; + echo ""; } echo ""; diff --git a/web/yaamp/modules/common/CommonController.php b/web/yaamp/modules/common/CommonController.php index 1466ac729..baaef7b21 100644 --- a/web/yaamp/modules/common/CommonController.php +++ b/web/yaamp/modules/common/CommonController.php @@ -1,63 +1,68 @@ admin; } - - protected function elapsedTime() - { - $t2 = microtime(true); - return ($t2 - $this->t1); - } - - protected function beforeAction($action) - { - // debuglog("before action ".$action->getId()); - - $this->memcache = new YaampMemcache; - $this->t1 = microtime(true); - - if(user()->getState('yaamp_admin')) { - $this->admin = true; - $client_ip = arraySafeVal($_SERVER,'REMOTE_ADDR'); - if (!isAdminIP($client_ip)) { - user()->setState('yaamp_admin', false); - debuglog("admin attempt from $client_ip"); - $this->admin = false; - } - } - - $algo = user()->getState('yaamp-algo'); - if(!$algo) user()->setState('yaamp-algo', YAAMP_DEFAULT_ALGO); - - return true; - } - - protected function afterAction($action) - { - // debuglog("after action ".$action->getId()); - - $d1 = $this->elapsedTime(); - - $url = "$this->id/{$this->action->id}"; - $this->memcache->add_monitoring_function($url, $d1); - } - - public function actionMaintenance() - { - $this->render('maintenance'); - } - - public function goback($count=-1) - { - Javascript("window.history.go($count);"); - die; - } + public $memcache; + public $t1; -} + // read-only via getAdmin() + private $admin = false; + protected function getAdmin() + { + return $this->admin; + } + + protected function elapsedTime() + { + $t2 = microtime(true); + return ($t2 - $this->t1); + } + + protected function beforeAction($action) + { + // debuglog("before action ".$action->getId()); + $this->memcache = new YaampMemcache; + $this->t1 = microtime(true); + + if (user() + ->getState('yaamp_admin')) + { + $this->admin = true; + $client_ip = arraySafeVal($_SERVER, 'REMOTE_ADDR'); + if (!isAdminIP($client_ip)) + { + user()->setState('yaamp_admin', false); + debuglog("admin attempt from $client_ip"); + $this->admin = false; + } + } + + $algo = user()->getState('yaamp-algo'); + if (!$algo) user()->setState('yaamp-algo', YAAMP_DEFAULT_ALGO); + return true; + } + + protected function afterAction($action) + { + // debuglog("after action ".$action->getId()); + $d1 = $this->elapsedTime(); + + $url = "$this->id/{$this + ->action->id}"; + $this + ->memcache + ->add_monitoring_function($url, $d1); + } + + public function actionMaintenance() + { + $this->render('maintenance'); + } + + public function goback($count = - 1) + { + Javascript("window.history.go($count);"); + die; + } + +} diff --git a/web/yaamp/modules/explorer/ExplorerController.php b/web/yaamp/modules/explorer/ExplorerController.php index cfa192539..3e1c71804 100644 --- a/web/yaamp/modules/explorer/ExplorerController.php +++ b/web/yaamp/modules/explorer/ExplorerController.php @@ -1,161 +1,177 @@ forward('id'); - } - elseif (strlen($actionID) <= 6 && !isset($_REQUEST['id'])) { - $coin = getdbosql('db_coins', "symbol=:symbol", array( - ':symbol'=>strtoupper($actionID) - )); - if ($coin && ($coin->visible || $this->admin)) { - if (!empty($_POST)) { - $_GET['SYM'] = $coin->symbol; - $this->forward('search'); - } - $_REQUEST['id'] = $coin->id; - $this->forward('id'); - } - } - } - return parent::run($actionID); - } - - ///////////////////////////////////////////////// - - // Hide coin id from explorer links... created by createUrl() - public function createUrl($route,$params=array(),$ampersand='&') - { - if ($route == '/explorer' && isset($params['id'])) { - $coin = getdbo('db_coins', intval($params['id'])); - if ($coin && $coin->visible && !is_numeric($coin->symbol)) { - unset($params['id']); - $route = '/explorer/'.$coin->symbol.'?'.http_build_query($params,'',$ampersand); - $params = array(); - } - } - return parent::createUrl($route, $params, $ampersand); - } - - ///////////////////////////////////////////////// - - public function actionIndex() - { - if(isset($_COOKIE['mainbtc'])) return; - if(!LimitRequest('explorer')) return; - - $id = getiparam('id'); - $coin = getdbo('db_coins', $id); - if($coin && $coin->no_explorer) { - $link = $coin->link_explorer; - //$txid = gethexparam('txid'); - //$hash = gethexparam('hash'); - //if (!empty($txid)) $link .= 'tx/'.$txid; - //elseif (!empty($hash)) $link .= 'block/'.$hash; - die("Block explorer disabled, please use $link"); - } - $height = getiparam('height'); - if($coin && intval($height)>0) - { - $remote = new WalletRPC($coin); - $hash = $remote->getblockhash(intval($height)); - } else { - $hash = gethexparam('hash'); - } - - $txid = gethexparam('txid'); - $q = gethexparam('q'); - if (strlen($q) >= 32 && ctype_xdigit($q)) { - $remote = new WalletRPC($coin); - $block = $remote->getblock($q); - if ($block) { - $hash = $q; - $height = objSafeVal($hash, 'height'); - } else { - $txid = $q; - } - } - - if($coin && !empty($txid)) - { - $remote = new WalletRPC($coin); - $tx = $remote->getrawtransaction($txid, 1); - if (!$tx) $tx = $remote->gettransaction($txid); - - $hash = arraySafeVal($tx,'blockhash'); - } - - if($coin && !empty($hash)) - $this->render('block', array('coin'=>$coin, 'hash'=>$hash)); - - else if($coin) - $this->render('coin', array('coin'=>$coin)); - - else - $this->render('index'); - } - - // alias... - public function actionId() - { - return $this->actionIndex(); - } - - // redirect POST request with url cleanup... - public function actionSearch() - { - $height = getiparam('height'); - $txid = gethexparam('txid'); - $hash = gethexparam('hash'); - $q = gethexparam('q'); - if (isset($_GET['SYM'])) { - // only for visible coins - $url = "/explorer/".$_GET['SYM']."?"; - } else if (isset($_GET['id'])) { - // only for hidden coins - $url = "/explorer/".$_GET['id']."?"; - } - if (!empty($height)) $url .= "&height=$height"; - if (!empty($txid)) $url .= "&txid=$txid"; - if (!empty($hash)) $url .= "&hash=$hash"; - if (!empty($q)) $url .= "&q=$q"; - - return $this->redirect(str_replace('?&', '?', $url)); - } - - /** - * Difficulty Graph - */ - public function actionGraph() - { - $id = getiparam('id'); - $coin = getdbo('db_coins', $id); - if ($coin) - $this->renderPartial('graph', array('coin'=>$coin)); - else - echo "[]"; - } - - /** - * Public nodes - */ - public function actionPeers() - { - $id = getiparam('id'); - $coin = getdbo('db_coins', $id); - if ($coin) - $this->renderPartial('peers', array('coin'=>$coin)); - } + public $defaultAction = 'index'; + + ///////////////////////////////////////////////// + public function run($actionID) + { + // Forward the url /explorer/BTC to the BTC block explorer + if (!empty($actionID)) + { + if (is_numeric($actionID) && isset($_REQUEST['id'])) + { + $this->forward('id'); + } + elseif (strlen($actionID) <= 6 && !isset($_REQUEST['id'])) + { + $coin = getdbosql('db_coins', "symbol=:symbol", array( + ':symbol' => strtoupper($actionID) + )); + if ($coin && ($coin->visible || $this->admin)) + { + if (!empty($_POST)) + { + $_GET['SYM'] = $coin->symbol; + $this->forward('search'); + } + $_REQUEST['id'] = $coin->id; + $this->forward('id'); + } + } + } + return parent::run($actionID); + } + + ///////////////////////////////////////////////// + // Hide coin id from explorer links... created by createUrl() + public function createUrl($route, $params = array() , $ampersand = '&') + { + if ($route == '/explorer' && isset($params['id'])) + { + $coin = getdbo('db_coins', intval($params['id'])); + if ($coin && $coin->visible && !is_numeric($coin->symbol)) + { + unset($params['id']); + $route = '/explorer/' . $coin->symbol . '?' . http_build_query($params, '', $ampersand); + $params = array(); + } + } + return parent::createUrl($route, $params, $ampersand); + } + + ///////////////////////////////////////////////// + public function actionIndex() + { + if (isset($_COOKIE['mainbtc'])) return; + if (!LimitRequest('explorer')) return; + + $id = getiparam('id'); + $coin = getdbo('db_coins', $id); + if ($coin && $coin->no_explorer) + { + $link = $coin->link_explorer; + //$txid = gethexparam('txid'); + //$hash = gethexparam('hash'); + //if (!empty($txid)) $link .= 'tx/'.$txid; + //elseif (!empty($hash)) $link .= 'block/'.$hash; + die("Block explorer disabled, please use $link"); + } + $height = getiparam('height'); + if ($coin && intval($height) > 0) + { + $remote = new WalletRPC($coin); + $hash = $remote->getblockhash(intval($height)); + } + else + { + $hash = gethexparam('hash'); + } + + $txid = gethexparam('txid'); + $q = gethexparam('q'); + if (strlen($q) >= 32 && ctype_xdigit($q)) + { + $remote = new WalletRPC($coin); + $block = $remote->getblock($q); + if ($block) + { + $hash = $q; + $height = objSafeVal($hash, 'height'); + } + else + { + $txid = $q; + } + } + + if ($coin && !empty($txid)) + { + $remote = new WalletRPC($coin); + $tx = $remote->getrawtransaction($txid, 1); + if (!$tx) $tx = $remote->gettransaction($txid); + + $hash = arraySafeVal($tx, 'blockhash'); + } + + if ($coin && !empty($hash)) $this->render('block', array( + 'coin' => $coin, + 'hash' => $hash + )); + + else if ($coin) $this->render('coin', array( + 'coin' => $coin + )); + + else $this->render('index'); + } + + // alias... + public function actionId() + { + return $this->actionIndex(); + } + + // redirect POST request with url cleanup... + public function actionSearch() + { + $height = getiparam('height'); + $txid = gethexparam('txid'); + $hash = gethexparam('hash'); + $q = gethexparam('q'); + if (isset($_GET['SYM'])) + { + // only for visible coins + $url = "/explorer/" . $_GET['SYM'] . "?"; + } + else if (isset($_GET['id'])) + { + // only for hidden coins + $url = "/explorer/" . $_GET['id'] . "?"; + } + if (!empty($height)) $url .= "&height=$height"; + if (!empty($txid)) $url .= "&txid=$txid"; + if (!empty($hash)) $url .= "&hash=$hash"; + if (!empty($q)) $url .= "&q=$q"; + + return $this->redirect(str_replace('?&', '?', $url)); + } + + /** + * Difficulty Graph + */ + public function actionGraph() + { + $id = getiparam('id'); + $coin = getdbo('db_coins', $id); + if ($coin) $this->renderPartial('graph', array( + 'coin' => $coin + )); + else echo "[]"; + } + + /** + * Public nodes + */ + public function actionPeers() + { + $id = getiparam('id'); + $coin = getdbo('db_coins', $id); + if ($coin) $this->renderPartial('peers', array( + 'coin' => $coin + )); + } } diff --git a/web/yaamp/modules/explorer/block.php b/web/yaamp/modules/explorer/block.php index e1521b1f3..2db62e849 100644 --- a/web/yaamp/modules/explorer/block.php +++ b/web/yaamp/modules/explorer/block.php @@ -1,14 +1,12 @@ pageTitle = $coin->name." block explorer"; +$this->pageTitle = $coin->name . " block explorer"; $txid = getparam('txid'); $q = getparam('q'); if (!empty($q) && ctype_xdigit($q)) $txid = $q; elseif (empty($txid)) $txid = 'txid not set'; // prevent highlight - echo << function toggleRaw(el) { @@ -54,69 +52,72 @@ function toggleRaw(el) { END; -////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////// function colorizeJson($json) { - $json = str_replace('"', '"', $json); - // strings - $res = preg_match_all("# "([^&]+)"([,\s])#", $json, $matches); - if ($res) foreach($matches[1] as $n=>$m) { - $sfx = $matches[2][$n]; - $class = ''; - if (strlen($m) == 64 && ctype_xdigit($m)) $class = 'hash'; - if (strlen($m) == 34 && ctype_alnum($m)) $class = 'addr'; - if (strlen($m) == 35 && ctype_alnum($m)) $class = 'addr'; - if (strlen($m) > 160 && ctype_alnum($m)) $class = 'data'; - if ($class == '' && strlen($m) < 64 && ctype_xdigit($m)) $class = 'hexa'; - $json = str_replace(' "'.$m.""".$sfx, ' "'.$m.'"'.$sfx, $json); - } - // keys - $res = preg_match_all("#"([^&]+)":#", $json, $matches); - if ($res) foreach($matches[1] as $n=>$m) { - $json = str_replace('"'.$m.""", '"'.$m.'"', $json); - } - // humanize timestamps like "blocktime": 1462359961, - $res = preg_match_all("#: ([0-9]{10})([,\s])#", $json, $matches); - if ($res) foreach($matches[1] as $n=>$m) { - $ts = intval($m); - if ($ts > 1400000000 && $ts < 1600000000) { - $sfx = $matches[2][$n]; - $date = strftime("%Y-%m-%d %T %z", $ts); - $json = str_replace(' '.$m.$sfx, ' "'.$date.'"'.$sfx, $json); - } - } - // numeric - $res = preg_match_all("#: ([e\-\.0-9]+)([,\s])#", $json, $matches); - if ($res) foreach($matches[1] as $n=>$m) { - $sfx = $matches[2][$n]; - $json = str_replace(' '.$m.$sfx, ' '.$m.''.$sfx, $json); - } - $json = preg_replace('#\[\s+\]#', '[]', $json); - $json = str_replace('[', '[', $json); - $json = str_replace(']', ']', $json); - $json = str_replace('{', '{', $json); - $json = str_replace('}', '}', $json); - return $json; + $json = str_replace('"', '"', $json); + // strings + $res = preg_match_all("# "([^&]+)"([,\s])#", $json, $matches); + if ($res) foreach ($matches[1] as $n => $m) + { + $sfx = $matches[2][$n]; + $class = ''; + if (strlen($m) == 64 && ctype_xdigit($m)) $class = 'hash'; + if (strlen($m) == 34 && ctype_alnum($m)) $class = 'addr'; + if (strlen($m) == 35 && ctype_alnum($m)) $class = 'addr'; + if (strlen($m) > 160 && ctype_alnum($m)) $class = 'data'; + if ($class == '' && strlen($m) < 64 && ctype_xdigit($m)) $class = 'hexa'; + $json = str_replace(' "' . $m . """ . $sfx, ' "' . $m . '"' . $sfx, $json); + } + // keys + $res = preg_match_all("#"([^&]+)":#", $json, $matches); + if ($res) foreach ($matches[1] as $n => $m) + { + $json = str_replace('"' . $m . """, '"' . $m . '"', $json); + } + // humanize timestamps like "blocktime": 1462359961, + $res = preg_match_all("#: ([0-9]{10})([,\s])#", $json, $matches); + if ($res) foreach ($matches[1] as $n => $m) + { + $ts = intval($m); + if ($ts > 1400000000 && $ts < 1600000000) + { + $sfx = $matches[2][$n]; + $date = strftime("%Y-%m-%d %T %z", $ts); + $json = str_replace(' ' . $m . $sfx, ' "' . $date . '"' . $sfx, $json); + } + } + // numeric + $res = preg_match_all("#: ([e\-\.0-9]+)([,\s])#", $json, $matches); + if ($res) foreach ($matches[1] as $n => $m) + { + $sfx = $matches[2][$n]; + $json = str_replace(' ' . $m . $sfx, ' ' . $m . '' . $sfx, $json); + } + $json = preg_replace('#\[\s+\]#', '[]', $json); + $json = str_replace('[', '[', $json); + $json = str_replace(']', ']', $json); + $json = str_replace('{', '{', $json); + $json = str_replace('}', '}', $json); + return $json; } function simplifyscript($script) { - $script = preg_replace("/[0-9a-f]+ OP_DROP ?/","", $script); - $script = preg_replace("/OP_NOP ?/","", $script); - return trim($script); + $script = preg_replace("/[0-9a-f]+ OP_DROP ?/", "", $script); + $script = preg_replace("/OP_NOP ?/", "", $script); + return trim($script); } /////////////////////////////////////////////////////////////////////////////////////////////// - $remote = new WalletRPC($coin); $block = $remote->getblock($hash); -if(!$block) return; +if (!$block) return; //debuglog($block); - $d = date('Y-m-d H:i:s', $block['time']); -$confirms = isset($block['confirmations'])? $block['confirmations']: ''; +$confirms = isset($block['confirmations']) ? $block['confirmations'] : ''; $txcount = count($block['tx']); $version = dechex($block['version']); @@ -125,49 +126,44 @@ function simplifyscript($script) echo ''; echo ''; -echo ''; -echo ''; +echo ''; +echo ''; echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; - -if(isset($block['flags'])) - echo ''; - -if(isset($block['previousblockhash']) && $coin->algo == 'x16r') { - echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; + +if (isset($block['flags'])) echo ''; + +if (isset($block['previousblockhash']) && $coin->algo == 'x16r') +{ + echo ''; } -if(isset($block['previousblockhash'])) - echo ''; +if (isset($block['previousblockhash'])) echo ''; -if(isset($block['nextblockhash'])) - echo ''; +if (isset($block['nextblockhash'])) echo ''; -echo ''; +echo ''; -echo ''; +echo ''; echo "
    Coin:'.$coin->createExplorerLink($coin->name).'
    Blockhash:'.$hash.'
    Coin:' . $coin->createExplorerLink($coin->name) . '
    Blockhash:' . $hash . '
    Confirmations:'.$confirms.'
    Height:'.$block['height'].'
    Time:'.$d.' ('.$block['time'].')'.'
    Difficulty:'.$block['difficulty'].'
    Bits:'.$block['bits'].'
    Nonce:'.$nonce.'
    Version:'.$version.'
    Size:'.$block['size'].' bytes
    Flags:'.$block['flags'].'
    Hash order:'. - substr($block['previousblockhash'], -16). - '
    Confirmations:' . $confirms . '
    Height:' . $block['height'] . '
    Time:' . $d . ' (' . $block['time'] . ')' . '
    Difficulty:' . $block['difficulty'] . '
    Bits:' . $block['bits'] . '
    Nonce:' . $nonce . '
    Version:' . $version . '
    Size:' . $block['size'] . ' bytes
    Flags:' . $block['flags'] . '
    Hash order:' . substr($block['previousblockhash'], -16) . '
    Previous Hash:'. - $coin->createExplorerLink($block['previousblockhash'], array('hash'=>$block['previousblockhash'])). - '
    Previous Hash:' . $coin->createExplorerLink($block['previousblockhash'], array( + 'hash' => $block['previousblockhash'] +)) . '
    Next Hash:'. - $coin->createExplorerLink($block['nextblockhash'], array('hash'=>$block['nextblockhash'])). - '
    Next Hash:' . $coin->createExplorerLink($block['nextblockhash'], array( + 'hash' => $block['nextblockhash'] +)) . '
    Merkle Root:'.$block['merkleroot'].'
    Merkle Root:' . $block['merkleroot'] . '
    Transactions:'.$txcount.'
    Transactions:' . $txcount . '

    "; //////////////////////////////////////////////////////////////////////////////// - echo << @@ -183,140 +179,141 @@ function simplifyscript($script) end; + $ntx = 0; -foreach($block['tx'] as $txhash) +foreach ($block['tx'] as $txhash) { - $ntx++; - $tx = $remote->getrawtransaction($txhash, 1); - if(!$tx && ($ntx == 1 || $txid == $txhash)) { - // some transactions are not found directly with getrawtransaction - $tx = $remote->gettransaction($txhash); - if ($tx && isset($tx['hex'])) { - $hex = $tx['hex']; - $tx = $remote->decoderawtransaction($hex); - $tx['hex'] = $hex; - } else { - continue; - } - } - if(!$tx) continue; - - $valuetx = 0; - foreach($tx['vout'] as $vout) - $valuetx += $vout['value']; - - echo ''; - echo ''.$ntx.''; - echo ''.$tx['txid'].''; - $size = (strlen($tx['hex'])/2); - echo "$size"; - echo "$valuetx"; - - echo ""; - $segwit = false; - foreach($tx['vin'] as $vin) { - if(isset($vin['coinbase'])) - echo "Generation"; - if(isset($vin['txinwitness'])) - $segwit = true; - } - if($segwit) - echo ' '; - echo ""; - - echo ""; - $nvout = count($tx['vout']);; - if ($nvout > 500) echo "Too much addresses to display ($nvout)"; - else - foreach($tx['vout'] as $vout) - { - $value = $vout['value']; - if ($value == 0) continue; - - if(isset($vout['scriptPubKey']['addresses'][0])) - echo ''.$vout['scriptPubKey']['addresses'][0]." ($value)"; - else - echo "($value)"; - - echo '
    '; - } - echo ""; - - echo '
    '; - unset($tx['hex']); - echo ($nvout > 500) ? 'truncated' : colorizeJson(json_encode($tx, 128)); - echo '
    '; - - echo ""; - - if ($ntx > 100) { - echo 'Too much transations to display...'; - break; - } + $ntx++; + $tx = $remote->getrawtransaction($txhash, 1); + if (!$tx && ($ntx == 1 || $txid == $txhash)) + { + // some transactions are not found directly with getrawtransaction + $tx = $remote->gettransaction($txhash); + if ($tx && isset($tx['hex'])) + { + $hex = $tx['hex']; + $tx = $remote->decoderawtransaction($hex); + $tx['hex'] = $hex; + } + else + { + continue; + } + } + if (!$tx) continue; + + $valuetx = 0; + foreach ($tx['vout'] as $vout) $valuetx += $vout['value']; + + echo ''; + echo '' . $ntx . ''; + echo '' . $tx['txid'] . ''; + $size = (strlen($tx['hex']) / 2); + echo "$size"; + echo "$valuetx"; + + echo ""; + $segwit = false; + foreach ($tx['vin'] as $vin) + { + if (isset($vin['coinbase'])) echo "Generation"; + if (isset($vin['txinwitness'])) $segwit = true; + } + if ($segwit) echo ' '; + echo ""; + + echo ""; + $nvout = count($tx['vout']);; + if ($nvout > 500) echo "Too much addresses to display ($nvout)"; + else foreach ($tx['vout'] as $vout) + { + $value = $vout['value']; + if ($value == 0) continue; + + if (isset($vout['scriptPubKey']['addresses'][0])) echo '' . $vout['scriptPubKey']['addresses'][0] . " ($value)"; + else echo "($value)"; + + echo '
    '; + } + echo ""; + + echo '
    '; + unset($tx['hex']); + echo ($nvout > 500) ? 'truncated' : colorizeJson(json_encode($tx, 128)); + echo '
    '; + + echo ""; + + if ($ntx > 100) + { + echo 'Too much transations to display...'; + break; + } } -if ($coin->rpcencoding == 'DCR' && isset($block['stx'])) { - - echo ''; - echo 'Stake'; - echo ''; - - $ntx = 0; - foreach($block['stx'] as $txhash) - { - $ntx++; - $stx = $remote->getrawtransaction($txhash, 1); - if(!$stx) continue; - - $valuetx = 0; - foreach($stx['vout'] as $vout) - $valuetx += $vout['value']; - - echo ''; - echo ''.$ntx.''; - echo ''.$stx['txid'].''; - $size = (strlen($stx['hex'])/2); - echo "$size"; - echo "$valuetx"; - - echo ""; - if(isset($stx['vout'][0]['scriptPubKey']) && arraySafeVal($stx['vout'][0]['scriptPubKey'],'type') == 'stakesubmission') - echo "Ticket"; - else foreach($stx['vin'] as $vin) { - if (arraySafeVal($vin,'blockheight') > 0) { - echo $coin->createExplorerLink($vin['blockheight'], array('height'=>$vin['blockheight'])); - echo '
    '; - } - } - echo ""; - - echo ""; - foreach($stx['vout'] as $vout) - { - $value = $vout['value']; - if ($value == 0) continue; - - if(isset($vout['scriptPubKey']['addresses'][0])) - echo ''.$vout['scriptPubKey']['addresses'][0]." ($value)"; - else - echo "($value)"; - - echo '
    '; - } - echo ""; - - echo '
    '; - unset($stx['hex']); - echo colorizeJson(json_encode($stx, 128)); - echo '
    '; - - echo ''; - } +if ($coin->rpcencoding == 'DCR' && isset($block['stx'])) +{ + + echo ''; + echo 'Stake'; + echo ''; + + $ntx = 0; + foreach ($block['stx'] as $txhash) + { + $ntx++; + $stx = $remote->getrawtransaction($txhash, 1); + if (!$stx) continue; + + $valuetx = 0; + foreach ($stx['vout'] as $vout) $valuetx += $vout['value']; + + echo ''; + echo '' . $ntx . ''; + echo '' . $stx['txid'] . ''; + $size = (strlen($stx['hex']) / 2); + echo "$size"; + echo "$valuetx"; + + echo ""; + if (isset($stx['vout'][0]['scriptPubKey']) && arraySafeVal($stx['vout'][0]['scriptPubKey'], 'type') == 'stakesubmission') echo "Ticket"; + else foreach ($stx['vin'] as $vin) + { + if (arraySafeVal($vin, 'blockheight') > 0) + { + echo $coin->createExplorerLink($vin['blockheight'], array( + 'height' => $vin['blockheight'] + )); + echo '
    '; + } + } + echo ""; + + echo ""; + foreach ($stx['vout'] as $vout) + { + $value = $vout['value']; + if ($value == 0) continue; + + if (isset($vout['scriptPubKey']['addresses'][0])) echo '' . $vout['scriptPubKey']['addresses'][0] . " ($value)"; + else echo "($value)"; + + echo '
    '; + } + echo ""; + + echo '
    '; + unset($stx['hex']); + echo colorizeJson(json_encode($stx, 128)); + echo '
    '; + + echo ''; + } } echo ''; -$actionUrl = $coin->visible ? '/explorer/'.$coin->symbol : '/explorer/search?id='.$coin->id; +$actionUrl = $coin->visible ? '/explorer/' . $coin->symbol : '/explorer/search?id=' . $coin->id; echo << @@ -326,8 +323,7 @@ function simplifyscript($script) end; + echo '









    '; echo '









    '; echo '









    '; - - diff --git a/web/yaamp/modules/explorer/coin.php b/web/yaamp/modules/explorer/coin.php index ce724c797..8abdf9d68 100644 --- a/web/yaamp/modules/explorer/coin.php +++ b/web/yaamp/modules/explorer/coin.php @@ -1,14 +1,13 @@ goback(); JavascriptFile("/extensions/jqplot/jquery.jqplot.js"); JavascriptFile("/extensions/jqplot/plugins/jqplot.dateAxisRenderer.js"); JavascriptFile("/extensions/jqplot/plugins/jqplot.highlighter.js"); -$this->pageTitle = $coin->name." block explorer"; +$this->pageTitle = $coin->name . " block explorer"; -$start = (int) getiparam('start'); +$start = (int)getiparam('start'); echo << @@ -25,13 +24,14 @@ END; + // version is used for multi algo coins // but each coin use different values... $multiAlgos = $coin->multialgos || versionToAlgo($coin, 0) !== false; echo '
    '; echo '
    '; -echo '
    '.$coin->name.' Explorer
    '; +echo '
    ' . $coin->name . ' Explorer
    '; echo '
    '; echo ''; @@ -50,59 +50,63 @@ echo ""; $remote = new WalletRPC($coin); -if (!$start || $start > $coin->block_height) - $start = $coin->block_height; -for($i = $start; $i > max(1, $start-21); $i--) +if (!$start || $start > $coin->block_height) $start = $coin->block_height; +for ($i = $start;$i > max(1, $start - 21);$i--) { - $hash = $remote->getblockhash($i); - if(!$hash) continue; - - $block = $remote->getblock($hash); - if(!$block) continue; - - $d = datetoa2($block['time']); - $confirms = isset($block['confirmations'])? $block['confirmations']: ''; - $tx = count($block['tx']); - $diff = $block['difficulty']; - $algo = versionToAlgo($coin, $block['version']); - $type = ''; - if (arraySafeval($block,'nonce',0) > 0) $type = 'PoW'; - else if (isset($block['auxpow'])) $type = 'Aux'; - else if (isset($block['mint']) || strstr(arraySafeVal($block,'flags',''), 'proof-of-stake')) $type = 'PoS'; - - // nonce 256bits - if ($type == '' && $coin->symbol=='ZEC') $type = 'PoW'; - -// debuglog($block); - echo ''; - echo ''; - - echo ''; - - echo ''; - echo ''; - if ($multiAlgos) echo ""; - echo ''; - echo ''; - - echo ''; - - echo ""; + $hash = $remote->getblockhash($i); + if (!$hash) continue; + + $block = $remote->getblock($hash); + if (!$block) continue; + + $d = datetoa2($block['time']); + $confirms = isset($block['confirmations']) ? $block['confirmations'] : ''; + $tx = count($block['tx']); + $diff = $block['difficulty']; + $algo = versionToAlgo($coin, $block['version']); + $type = ''; + if (arraySafeval($block, 'nonce', 0) > 0) $type = 'PoW'; + else if (isset($block['auxpow'])) $type = 'Aux'; + else if (isset($block['mint']) || strstr(arraySafeVal($block, 'flags', '') , 'proof-of-stake')) $type = 'PoS'; + + // nonce 256bits + if ($type == '' && $coin->symbol == 'ZEC') $type = 'PoW'; + + // debuglog($block); + echo ''; + echo ''; + + echo ''; + + echo ''; + echo ''; + if ($multiAlgos) echo ""; + echo ''; + echo ''; + + echo ''; + + echo ""; } echo "
    '.$d.''.$coin->createExplorerLink($i, array('height'=>$i)).''.$diff.''.$type.'$algo'.$tx.''.$confirms.''; - echo $coin->createExplorerLink($hash, array('hash'=>$hash)); - echo '
    ' . $d . '' . $coin->createExplorerLink($i, array( + 'height' => $i + )) . '' . $diff . '' . $type . '$algo' . $tx . '' . $confirms . ''; + echo $coin->createExplorerLink($hash, array( + 'hash' => $hash + )); + echo '
    "; $pager = ''; -if ($start <= $coin->block_height - 20) - $pager = $coin->createExplorerLink('<< Prev', array('start'=>min($coin->block_height,$start+20))); -if ($start != $coin->block_height) - $pager .= '  '.$coin->createExplorerLink('Now'); -if ($start > 20) - $pager .= '  '.$coin->createExplorerLink('Next >>', array('start'=>max(1,$start-20))); +if ($start <= $coin->block_height - 20) $pager = $coin->createExplorerLink('<< Prev', array( + 'start' => min($coin->block_height, $start + 20) +)); +if ($start != $coin->block_height) $pager .= '  ' . $coin->createExplorerLink('Now'); +if ($start > 20) $pager .= '  ' . $coin->createExplorerLink('Next >>', array( + 'start' => max(1, $start - 20) +)); -$actionUrl = $coin->visible ? '/explorer/'.$coin->symbol : '/explorer/search?id='.$coin->id; +$actionUrl = $coin->visible ? '/explorer/' . $coin->symbol : '/explorer/search?id=' . $coin->id; echo <<$pager
    @@ -115,8 +119,8 @@
    end; -if ($start != $coin->block_height) - return; + +if ($start != $coin->block_height) return; echo << @@ -210,6 +214,9 @@ function diff_graph_data(data) end; -app()->clientScript->registerScript('graph'," + +app() + ->clientScript + ->registerScript('graph', " graph_refresh(); ", CClientScript::POS_READY); diff --git a/web/yaamp/modules/explorer/graph.php b/web/yaamp/modules/explorer/graph.php index 5a69f792f..94a7c92ae 100644 --- a/web/yaamp/modules/explorer/graph.php +++ b/web/yaamp/modules/explorer/graph.php @@ -1,74 +1,101 @@ memcache->get("yiimp-explorer-diff-".$coin->symbol); - -if (empty($json)) { - - // version is used in multi algo coins - $multiAlgos = versionToAlgo($coin, 0) !== false; - - $series['diff'] = array(); - $tm = 0; - - $remote = new WalletRPC($coin); - for($i = $coin->block_height; $i > max(0, $coin->block_height-500); $i--) - { - $hash = $remote->getblockhash($i); - if(!$hash) continue; - - $block = $remote->getblock($hash); - if(!$block) continue; - - // only graph PoW blocks - if (!arraySafeval($block,'nonce',0) && !arraySafeval($block,'auxpow',0)) continue; - - $n++; - - $tm = $block['time']; - $dt = date('Y-m-d H:i:s', $tm); - $diff = floatval($block['difficulty']); - $vers = $block['version']; - $algo = versionToAlgo($coin, $vers); - - if (!$multiAlgos) { - $maxdiff = max($diff, $maxdiff); - $series['diff'][$n] = array($dt, $diff, $block['height']); - } else if ($coin->algo == $algo) { - $maxdiff = max($diff, $maxdiff); - $series[$algo][$n] = array($dt, $diff, $block['height']); - } - } - - // User blocks - if ($tm) { - $sql = "SELECT id, height, IFNULL(difficulty_user, difficulty) AS diff, time FROM blocks". - " WHERE coin_id=:coin AND algo = :algo AND time >= :tm ORDER BY id"; - $rows = dbolist($sql, array(':coin'=>$coin->id, ':algo'=>$coin->algo, ':tm'=>intval($tm))); - - $n = 0; - foreach ($rows as $row) { - $diff = floatval($row['diff']); - if ($maxdiff && $diff > ($maxdiff*1.5)) $diff = $maxdiff*1.5; - $tm = $row['time']; - $dt = date('Y-m-d H:i:s', $tm); - $series['user'][$n] = array($dt, $diff, $row['diff'], $row['height']); - $n++; - } - } - - $json = ''; - foreach ($series as $algo => $data) { - if (empty($data)) continue; - $values = array_values($data); - $json .= json_encode($values).','; - } - $json = rtrim($json, ','); - - // memcache the data - controller()->memcache->set("yiimp-explorer-diff-".$coin->symbol, $json, 120); +$n = 0; +$maxdiff = 0.0; + +$json = controller() + ->memcache + ->get("yiimp-explorer-diff-" . $coin->symbol); + +if (empty($json)) +{ + + // version is used in multi algo coins + $multiAlgos = versionToAlgo($coin, 0) !== false; + + $series['diff'] = array(); + $tm = 0; + + $remote = new WalletRPC($coin); + for ($i = $coin->block_height;$i > max(0, $coin->block_height - 500);$i--) + { + $hash = $remote->getblockhash($i); + if (!$hash) continue; + + $block = $remote->getblock($hash); + if (!$block) continue; + + // only graph PoW blocks + if (!arraySafeval($block, 'nonce', 0) && !arraySafeval($block, 'auxpow', 0)) continue; + + $n++; + + $tm = $block['time']; + $dt = date('Y-m-d H:i:s', $tm); + $diff = floatval($block['difficulty']); + $vers = $block['version']; + $algo = versionToAlgo($coin, $vers); + + if (!$multiAlgos) + { + $maxdiff = max($diff, $maxdiff); + $series['diff'][$n] = array( + $dt, + $diff, + $block['height'] + ); + } + else if ($coin->algo == $algo) + { + $maxdiff = max($diff, $maxdiff); + $series[$algo][$n] = array( + $dt, + $diff, + $block['height'] + ); + } + } + + // User blocks + if ($tm) + { + $sql = "SELECT id, height, IFNULL(difficulty_user, difficulty) AS diff, time FROM blocks" . " WHERE coin_id=:coin AND algo = :algo AND time >= :tm ORDER BY id"; + $rows = dbolist($sql, array( + ':coin' => $coin->id, + ':algo' => $coin->algo, + ':tm' => intval($tm) + )); + + $n = 0; + foreach ($rows as $row) + { + $diff = floatval($row['diff']); + if ($maxdiff && $diff > ($maxdiff * 1.5)) $diff = $maxdiff * 1.5; + $tm = $row['time']; + $dt = date('Y-m-d H:i:s', $tm); + $series['user'][$n] = array( + $dt, + $diff, + $row['diff'], + $row['height'] + ); + $n++; + } + } + + $json = ''; + foreach ($series as $algo => $data) + { + if (empty($data)) continue; + $values = array_values($data); + $json .= json_encode($values) . ','; + } + $json = rtrim($json, ','); + + // memcache the data + controller() + ->memcache + ->set("yiimp-explorer-diff-" . $coin->symbol, $json, 120); } echo "[$json]"; diff --git a/web/yaamp/modules/explorer/index.php b/web/yaamp/modules/explorer/index.php index b064a836f..d27b69da0 100644 --- a/web/yaamp/modules/explorer/index.php +++ b/web/yaamp/modules/explorer/index.php @@ -1,5 +1,4 @@ end; + showTableSorter('maintable', "{ tableClass: 'dataGrid2', textExtraction: { @@ -47,61 +47,74 @@ function wallet_peers(id) end; + $list = getdbolist('db_coins', "enable and visible order by name"); -foreach($list as $coin) +foreach ($list as $coin) { - if($coin->symbol == 'BTC') continue; - if(!empty($coin->symbol2)) continue; - - $coin->version = formatWalletVersion($coin); - - //if (!$coin->network_hash) - $coin->network_hash = controller()->memcache->get("yiimp-nethashrate-{$coin->symbol}"); - if (!$coin->network_hash) { - $remote = new WalletRPC($coin); - if ($remote) - $info = $remote->getmininginfo(); - if (isset($info['networkhashps'])) { - $coin->network_hash = $info['networkhashps']; - controller()->memcache->set("yiimp-nethashrate-{$coin->symbol}", $info['networkhashps'], 60); - } - else if (isset($info['netmhashps'])) { - $coin->network_hash = floatval($info['netmhashps']) * 1e6; - controller()->memcache->set("yiimp-nethashrate-{$coin->symbol}", $coin->network_hash, 60); - } - } - - $difficulty = Itoa2($coin->difficulty, 3); - $nethash_sfx = $coin->network_hash? strtoupper(Itoa2($coin->network_hash)).'H/s': ''; - - echo ''; - echo ''; - - echo ''.$coin->createExplorerLink($coin->name).''; - echo ''.$coin->symbol.''; - - echo ''.$coin->algo.''; - echo ''.$coin->version.''; - - echo ''.$coin->block_height.''; - $diffnote = ''; - if ($coin->algo == 'equihash' || $coin->algo == 'quark') $diffnote = '*'; - echo ''.$difficulty.$diffnote.''; - $cnx_class = (intval($coin->connections) > 3) ? '' : 'low'; - $peers_link = CHtml::link($coin->connections, "javascript:wallet_peers({$coin->id});", array('class'=>$cnx_class)); - echo ''.$peers_link.''; - echo ''.$nethash_sfx.''; - - echo ""; - - if(!empty($coin->link_bitcointalk)) - echo CHtml::link('forum', $coin->link_bitcointalk, array('target'=>'_blank')); - - elseif(!empty($coin->link_site)) - echo CHtml::link('site', $coin->link_site, array('target'=>'_blank')); - - echo ""; - echo ""; + if ($coin->symbol == 'BTC') continue; + if (!empty($coin->symbol2)) continue; + + $coin->version = formatWalletVersion($coin); + + //if (!$coin->network_hash) + $coin->network_hash = controller() + ->memcache + ->get("yiimp-nethashrate-{$coin->symbol}"); + if (!$coin->network_hash) + { + $remote = new WalletRPC($coin); + if ($remote) $info = $remote->getmininginfo(); + if (isset($info['networkhashps'])) + { + $coin->network_hash = $info['networkhashps']; + controller() + ->memcache + ->set("yiimp-nethashrate-{$coin->symbol}", $info['networkhashps'], 60); + } + else if (isset($info['netmhashps'])) + { + $coin->network_hash = floatval($info['netmhashps']) * 1e6; + controller() + ->memcache + ->set("yiimp-nethashrate-{$coin->symbol}", $coin->network_hash, 60); + } + } + + $difficulty = Itoa2($coin->difficulty, 3); + $nethash_sfx = $coin->network_hash ? strtoupper(Itoa2($coin->network_hash)) . 'H/s' : ''; + + echo ''; + echo ''; + + echo '' . $coin->createExplorerLink($coin->name) . ''; + echo '' . $coin->symbol . ''; + + echo '' . $coin->algo . ''; + echo '' . $coin->version . ''; + + echo '' . $coin->block_height . ''; + $diffnote = ''; + if ($coin->algo == 'equihash' || $coin->algo == 'quark') $diffnote = '*'; + echo '' . $difficulty . $diffnote . ''; + $cnx_class = (intval($coin->connections) > 3) ? '' : 'low'; + $peers_link = CHtml::link($coin->connections, "javascript:wallet_peers({$coin->id});", array( + 'class' => $cnx_class + )); + echo '' . $peers_link . ''; + echo '' . $nethash_sfx . ''; + + echo ""; + + if (!empty($coin->link_bitcointalk)) echo CHtml::link('forum', $coin->link_bitcointalk, array( + 'target' => '_blank' + )); + + elseif (!empty($coin->link_site)) echo CHtml::link('site', $coin->link_site, array( + 'target' => '_blank' + )); + + echo ""; + echo ""; } echo <<








    end; - diff --git a/web/yaamp/modules/explorer/peers.php b/web/yaamp/modules/explorer/peers.php index 9db0e51ed..c05cbe9f0 100644 --- a/web/yaamp/modules/explorer/peers.php +++ b/web/yaamp/modules/explorer/peers.php @@ -1,16 +1,14 @@ goback(); -require dirname(__FILE__).'/../../ui/lib/pageheader.php'; +require dirname(__FILE__) . '/../../ui/lib/pageheader.php'; -$this->pageTitle = 'Peers - '.$coin->name; +$this->pageTitle = 'Peers - ' . $coin->name; $remote = new WalletRPC($coin); $info = $remote->getinfo(); ////////////////////////////////////////////////////////////////////////////////////// - echo << body { margin: 4px; } @@ -22,30 +20,30 @@
    end; + $addnode = array(); $version = ''; $localheight = arraySafeVal($info, 'blocks'); $list = $remote->getpeerinfo(); -if(!empty($list)) -foreach($list as $peer) +if (!empty($list)) foreach ($list as $peer) { - $node = arraySafeVal($peer,'addr'); - if (strstr($node,'127.0.0.1')) continue; - if (strstr($node,'192.168.')) continue; - if (strstr($node,'yiimp')) continue; + $node = arraySafeVal($peer, 'addr'); + if (strstr($node, '127.0.0.1')) continue; + if (strstr($node, '192.168.')) continue; + if (strstr($node, 'yiimp')) continue; - $addnode[] = ($coin->rpcencoding=='DCR' ? 'addpeer=' : 'addnode=') . $node; + $addnode[] = ($coin->rpcencoding == 'DCR' ? 'addpeer=' : 'addnode=') . $node; - $peerver = trim(arraySafeVal($peer,'subver'),'/'); - $version = max($version, $peerver); + $peerver = trim(arraySafeVal($peer, 'subver') , '/'); + $version = max($version, $peerver); } asort($addnode); echo '
    ';
    -echo implode("\n",$addnode);
    +echo implode("\n", $addnode);
     echo '
    '; echo '
    '; diff --git a/web/yaamp/modules/explorer/tx.php b/web/yaamp/modules/explorer/tx.php index fea0305e3..145ca0ddc 100644 --- a/web/yaamp/modules/explorer/tx.php +++ b/web/yaamp/modules/explorer/tx.php @@ -1,8 +1,7 @@ goback(); -$this->pageTitle = $coin->name." block explorer"; +$this->pageTitle = $coin->name . " block explorer"; $remote = new WalletRPC($coin); @@ -31,47 +30,46 @@ END; + $tx = $remote->getrawtransaction($txhash, 1); -if(!$tx) continue; +if (!$tx) continue; $valuetx = 0; -foreach($tx['vout'] as $vout) - $valuetx += $vout['value']; +foreach ($tx['vout'] as $vout) $valuetx += $vout['value']; -$coinUrl = $this->createUrl('/explorer', array('id'=>$coin->id)); +$coinUrl = $this->createUrl('/explorer', array( + 'id' => $coin->id +)); echo ''; -echo ''.CHtml::link($tx['txid'], $coinUrl.'txid='.$tx['txid']).''; -echo ''.$valuetx.''; +echo '' . CHtml::link($tx['txid'], $coinUrl . 'txid=' . $tx['txid']) . ''; +echo '' . $valuetx . ''; echo ""; -foreach($tx['vin'] as $vin) +foreach ($tx['vin'] as $vin) { - if(isset($vin['coinbase'])) - echo "Generation"; + if (isset($vin['coinbase'])) echo "Generation"; } echo ""; echo ""; -foreach($tx['vout'] as $vout) +foreach ($tx['vout'] as $vout) { - $value = $vout['value']; + $value = $vout['value']; - if(isset($vout['scriptPubKey']['addresses'][0])) - echo ''.$vout['scriptPubKey']['addresses'][0]." ($value)"; - else - echo "($value)"; + if (isset($vout['scriptPubKey']['addresses'][0])) echo '' . $vout['scriptPubKey']['addresses'][0] . " ($value)"; + else echo "($value)"; - echo '
    '; + echo '
    '; } echo ""; echo ""; echo ""; -$actionUrl = $coin->visible ? '/explorer/'.$coin->symbol : '/explorer/search?id='.$coin->id; +$actionUrl = $coin->visible ? '/explorer/' . $coin->symbol : '/explorer/search?id=' . $coin->id; echo << @@ -81,14 +79,7 @@ end; + echo '









    '; echo '









    '; echo '









    '; - - - - - - - - diff --git a/web/yaamp/modules/explorer/util.php b/web/yaamp/modules/explorer/util.php index 5d197cfc6..7e3628528 100644 --- a/web/yaamp/modules/explorer/util.php +++ b/web/yaamp/modules/explorer/util.php @@ -1,213 +1,289 @@ hexdec($addressversion)) - { - return false; - } - $check=substr($addr,0,strlen($addr)-8); - $check=pack("H*" , $check); - $check=strtoupper(hash("sha256",hash("sha256",$check,true))); - $check=substr($check,0,8); - return $check==substr($addr,strlen($addr)-8); + $addr = decodeBase58($addr); + if (strlen($addr) != 50) + { + return false; + } + $version = substr($addr, 0, 2); + if (hexdec($version) > hexdec($addressversion)) + { + return false; + } + $check = substr($addr, 0, strlen($addr) - 8); + $check = pack("H*", $check); + $check = strtoupper(hash("sha256", hash("sha256", $check, true))); + $check = substr($check, 0, 8); + return $check == substr($addr, strlen($addr) - 8); } function hash160($data) { - $data=pack("H*" , $data); - return strtoupper(hash("ripemd160",hash("sha256",$data,true))); + $data = pack("H*", $data); + return strtoupper(hash("ripemd160", hash("sha256", $data, true))); } function pubKeyToAddress($pubkey) { - return hash160ToAddress(hash160($pubkey)); + return hash160ToAddress(hash160($pubkey)); } function remove0x($string) { - if(substr($string,0,2)=="0x"||substr($string,0,2)=="0X") - { - $string=substr($string,2); - } - return $string; + if (substr($string, 0, 2) == "0x" || substr($string, 0, 2) == "0X") + { + $string = substr($string, 2); + } + return $string; } // version is used for multi algo coins function versionToAlgo($coin, $version) { - // could be filled by block json (chain analysis) - $algos['MYR'] = array( - 0=>'sha256', 1=>'scrypt', 2=>'myr-gr', 3=>'skein', 4=>'qubit', 5=>'yescrypt' - ); - $algos['DGB'] = array( - 0=>'scrypt', 1=>'sha256', 2=>'myr-gr', 3=>'skein', 4=>'qubit' - ); - $algos['AUR'] = array( - 0=>'sha256', 1=>'scrypt', 2=>'myr-gr', 3=>'skein', 4=>'qubit' - ); - $algos['DGC'] = array( - 0=>'scrypt', 1=>'sha256', 2=>'x11' - ); - $algos['DUO'] = array( - 0=>'sha256', 1=>'scrypt' - ); - $algos['J'] = array( - 2 =>'sha256', 3=>'x11', 4=>'x13', 5=>'x15', 6=>'scrypt', - 7 =>'nist5', 8 =>'myr-gr', 9=>'penta', 10=>'whirlpool', - 11=>'luffa', 12=>'keccak', 13=>'quark', 15=>'bastion' - ); - $algos['GCH'] = array( - 0=>'x12', 1=>'x11', 2=>'x13', 3=>'sha256', 4=>'blake2s' - ); - $algos['GLT'] = array( - 0=>'sha256', 1=>'scrypt', 2=>'x11', 3=>'neoscrypt', 4=>'equihash', 5=>'yescrypt', 6=>'hmq1725', - 7=>'xevan', 8=>'nist5', 9=>'bitcore', 10=>'pawelhash', 11=>'x13', 12=>'x14', 13=>'x15', 14=>'x17', - 15=>'lyra2v2', 16=>'blake2s', 17=>'blake2b', 18=>'astralhash', 19=>'padihash', 20=>'jeonghash', - 21=>'keccak', 22=>'zhash', 23=>'globalhash', 24=>'skein', 25=>'myr-gr', 26=>'qubit', 27=>'skunk', - 28=>'quark', 29=>'x16r' - ); - $algos['RICHX'] = array( - 0=>'sha256', 1=>'scrypt', 2=>'myr-gr', 3=>'skein', 4=>'qubit' - ); - $algos['SFR'] = array( - 0=>'sha256', 1=>'scrypt', 2=>'myr-gr', 3=>'x11', 4=>'blake' - ); - $algos['UIS'] = array( - 0=>'lyra2v2', 1=>'skein', 2=>'qubit', 3=>'yescrypt', 4=>'x11' - ); - $algos['XVG'] = array( - 0=>'scrypt', 1=>'scrypt', 2=>'myr-gr', 3=>'x17', 4=>'blake2s', 10=>'lyra2v2', - ); - $algos['XSH'] = array( - 0=>'scrypt', 1=>'scrypt', 2=>'myr-gr', 3=>'x17', 4=>'blake2s', 10=>'lyra2v2', 11=>'x16s', - ); - $algos['ARG'] = array( - 0=>'sha256', 1=>'scrypt', 2=>'lyra2v2', 3=>'myr-gr', 4=>'argon2d', 5=>'yescrypt', - ); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - - if ($symbol == 'J') - return arraySafeVal($algos[$symbol], $version, ''); - else if($symbol == 'GCH') - return arraySafeVal($algos[$symbol], ($version - 9), ''); - else if($symbol == 'XVG') - return arraySafeVal($algos[$symbol], ($version >> 11), 'scrypt'); - else if($symbol == 'XSH') - return arraySafeVal($algos[$symbol], (($version-536870000) >> 11), 'scrypt'); - else if (isset($algos[$symbol])) - return arraySafeVal($algos[$symbol], ($version >> 9) & 7, ''); - return false; + // could be filled by block json (chain analysis) + $algos['MYR'] = array( + 0 => 'sha256', + 1 => 'scrypt', + 2 => 'myr-gr', + 3 => 'skein', + 4 => 'qubit', + 5 => 'yescrypt' + ); + $algos['DGB'] = array( + 0 => 'scrypt', + 1 => 'sha256', + 2 => 'myr-gr', + 3 => 'skein', + 4 => 'qubit' + ); + $algos['AUR'] = array( + 0 => 'sha256', + 1 => 'scrypt', + 2 => 'myr-gr', + 3 => 'skein', + 4 => 'qubit' + ); + $algos['DGC'] = array( + 0 => 'scrypt', + 1 => 'sha256', + 2 => 'x11' + ); + $algos['DUO'] = array( + 0 => 'sha256', + 1 => 'scrypt' + ); + $algos['J'] = array( + 2 => 'sha256', + 3 => 'x11', + 4 => 'x13', + 5 => 'x15', + 6 => 'scrypt', + 7 => 'nist5', + 8 => 'myr-gr', + 9 => 'penta', + 10 => 'whirlpool', + 11 => 'luffa', + 12 => 'keccak', + 13 => 'quark', + 15 => 'bastion' + ); + $algos['GCH'] = array( + 0 => 'x12', + 1 => 'x11', + 2 => 'x13', + 3 => 'sha256', + 4 => 'blake2s' + ); + $algos['GLT'] = array( + 0 => 'sha256', + 1 => 'scrypt', + 2 => 'x11', + 3 => 'neoscrypt', + 4 => 'equihash', + 5 => 'yescrypt', + 6 => 'hmq1725', + 7 => 'xevan', + 8 => 'nist5', + 9 => 'bitcore', + 10 => 'pawelhash', + 11 => 'x13', + 12 => 'x14', + 13 => 'x15', + 14 => 'x17', + 15 => 'lyra2v2', + 16 => 'blake2s', + 17 => 'blake2b', + 18 => 'astralhash', + 19 => 'padihash', + 20 => 'jeonghash', + 21 => 'keccak', + 22 => 'zhash', + 23 => 'globalhash', + 24 => 'skein', + 25 => 'myr-gr', + 26 => 'qubit', + 27 => 'skunk', + 28 => 'quark', + 29 => 'x16r' + ); + $algos['RICHX'] = array( + 0 => 'sha256', + 1 => 'scrypt', + 2 => 'myr-gr', + 3 => 'skein', + 4 => 'qubit' + ); + $algos['SFR'] = array( + 0 => 'sha256', + 1 => 'scrypt', + 2 => 'myr-gr', + 3 => 'x11', + 4 => 'blake' + ); + $algos['UIS'] = array( + 0 => 'lyra2v2', + 1 => 'skein', + 2 => 'qubit', + 3 => 'yescrypt', + 4 => 'x11' + ); + $algos['XVG'] = array( + 0 => 'scrypt', + 1 => 'scrypt', + 2 => 'myr-gr', + 3 => 'x17', + 4 => 'blake2s', + 10 => 'lyra2v2', + ); + $algos['XSH'] = array( + 0 => 'scrypt', + 1 => 'scrypt', + 2 => 'myr-gr', + 3 => 'x17', + 4 => 'blake2s', + 10 => 'lyra2v2', + 11 => 'x16s', + ); + $algos['ARG'] = array( + 0 => 'sha256', + 1 => 'scrypt', + 2 => 'lyra2v2', + 3 => 'myr-gr', + 4 => 'argon2d', + 5 => 'yescrypt', + ); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) $symbol = $coin->symbol2; + + if ($symbol == 'J') return arraySafeVal($algos[$symbol], $version, ''); + else if ($symbol == 'GCH') return arraySafeVal($algos[$symbol], ($version - 9) , ''); + else if ($symbol == 'XVG') return arraySafeVal($algos[$symbol], ($version >> 11) , 'scrypt'); + else if ($symbol == 'XSH') return arraySafeVal($algos[$symbol], (($version - 536870000) >> 11) , 'scrypt'); + else if (isset($algos[$symbol])) return arraySafeVal($algos[$symbol], ($version >> 9) & 7, ''); + return false; } diff --git a/web/yaamp/modules/market/MarketController.php b/web/yaamp/modules/market/MarketController.php index 5b111584f..fd2415532 100644 --- a/web/yaamp/modules/market/MarketController.php +++ b/web/yaamp/modules/market/MarketController.php @@ -1,104 +1,122 @@ admin) return; - - $market = getdbo('db_markets', getiparam('id')); - if(!$market) { - user()->setFlash('error', "invalid market"); - $this->goback(); - return; - } - $coin = getdbo('db_coins', $market->coinid); - - if(isset($_POST['db_markets'])) - { - $market->setAttributes($_POST['db_markets'], false); - if($market->save()) - $this->redirect(array('site/coin', 'id'=>$coin->id)); - } - - $this->render('update', array('market'=>$market, 'coin'=>$coin)); - } - - public function actionEnable() - { - if(!$this->admin) return; - - $enable = (int) getiparam('en'); - $market = getdbo('db_markets', getiparam('id')); - if($market) { - $market->disabled = $enable ? 0 : 9; - $market->save(); - } - $this->goback(); - } - - public function actionDelete() - { - if(!$this->admin) return; - - $market = getdbo('db_markets', getiparam('id')); - if($market) $market->delete(); - $this->goback(); - } - - public function actionSellto() - { - if(!$this->admin) return; - - $market = getdbo('db_markets', getiparam('id')); - if(!$market) { - user()->setFlash('error', "invalid market"); - $this->goback(); - return; - } - $coin = getdbo('db_coins', $market->coinid); - $amount = getparam('amount'); - - $remote = new WalletRPC($coin); - - $info = $remote->getinfo(); - if(!$info || !$info['balance']) return false; - - $deposit_info = $remote->validateaddress($market->deposit_address); - if(!$deposit_info || !isset($deposit_info['isvalid']) || !$deposit_info['isvalid']) - { - user()->setFlash('error', "invalid address $coin->name, $market->deposit_address"); - $this->redirect(array('site/coin', 'id'=>$coin->id)); - } - - $amount = min($amount, $info['balance'] - $info['paytxfee']); -// $amount = max($amount, $info['balance'] - $info['paytxfee']); - $amount = round($amount, 8); - - debuglog("selling ($market->deposit_address, $amount)"); - - $tx = $remote->sendtoaddress($market->deposit_address, $amount); - if(!$tx) - { - user()->setFlash('error', $remote->error); - $this->redirect(array('site/coin', 'id'=>$coin->id)); - } else { - $market->lastsent = time(); - $market->save(); - BackendUpdatePoolBalances($coin->id); - } - - $exchange = new db_exchange; - $exchange->market = $market->name; - $exchange->coinid = $coin->id; - $exchange->send_time = time(); - $exchange->quantity = $amount; - $exchange->price_estimate = $coin->price; - $exchange->status = 'waiting'; - $exchange->tx = $tx; - $exchange->save(); - - $this->redirect(array('site/coin', 'id'=>$coin->id)); - } + public function actionUpdate() + { + if (!$this->admin) return; + + $market = getdbo('db_markets', getiparam('id')); + if (!$market) + { + user()->setFlash('error', "invalid market"); + $this->goback(); + return; + } + $coin = getdbo('db_coins', $market->coinid); + + if (isset($_POST['db_markets'])) + { + $market->setAttributes($_POST['db_markets'], false); + if ($market->save()) $this->redirect(array( + 'site/coin', + 'id' => $coin->id + )); + } + + $this->render('update', array( + 'market' => $market, + 'coin' => $coin + )); + } + + public function actionEnable() + { + if (!$this->admin) return; + + $enable = (int)getiparam('en'); + $market = getdbo('db_markets', getiparam('id')); + if ($market) + { + $market->disabled = $enable ? 0 : 9; + $market->save(); + } + $this->goback(); + } + + public function actionDelete() + { + if (!$this->admin) return; + + $market = getdbo('db_markets', getiparam('id')); + if ($market) $market->delete(); + $this->goback(); + } + + public function actionSellto() + { + if (!$this->admin) return; + + $market = getdbo('db_markets', getiparam('id')); + if (!$market) + { + user()->setFlash('error', "invalid market"); + $this->goback(); + return; + } + $coin = getdbo('db_coins', $market->coinid); + $amount = getparam('amount'); + + $remote = new WalletRPC($coin); + + $info = $remote->getinfo(); + if (!$info || !$info['balance']) return false; + + $deposit_info = $remote->validateaddress($market->deposit_address); + if (!$deposit_info || !isset($deposit_info['isvalid']) || !$deposit_info['isvalid']) + { + user()->setFlash('error', "invalid address $coin->name, $market->deposit_address"); + $this->redirect(array( + 'site/coin', + 'id' => $coin->id + )); + } + + $amount = min($amount, $info['balance'] - $info['paytxfee']); + // $amount = max($amount, $info['balance'] - $info['paytxfee']); + $amount = round($amount, 8); + + debuglog("selling ($market->deposit_address, $amount)"); + + $tx = $remote->sendtoaddress($market->deposit_address, $amount); + if (!$tx) + { + user()->setFlash('error', $remote->error); + $this->redirect(array( + 'site/coin', + 'id' => $coin->id + )); + } + else + { + $market->lastsent = time(); + $market->save(); + BackendUpdatePoolBalances($coin->id); + } + + $exchange = new db_exchange; + $exchange->market = $market->name; + $exchange->coinid = $coin->id; + $exchange->send_time = time(); + $exchange->quantity = $amount; + $exchange->price_estimate = $coin->price; + $exchange->status = 'waiting'; + $exchange->tx = $tx; + $exchange->save(); + + $this->redirect(array( + 'site/coin', + 'id' => $coin->id + )); + } } diff --git a/web/yaamp/modules/renting/RentingController.php b/web/yaamp/modules/renting/RentingController.php index 6d3baf01f..c10a1ec0c 100644 --- a/web/yaamp/modules/renting/RentingController.php +++ b/web/yaamp/modules/renting/RentingController.php @@ -1,360 +1,372 @@ array( - 'class'=>'CCaptchaAction', - 'backColor'=>0xeeeeee, - ), - ); - } - - private function verifyparam() - { - $deposit = user()->getState('yaamp-deposit'); - $address = getparam('address'); - - if(!$this->admin && $deposit != $address) - return false; - - return true; - } - - public function actionLogin() - { - $deposit = isset($_POST['deposit_address'])? substr($_POST['deposit_address'], 0, 35): ''; - $password = isset($_POST['deposit_password'])? substr($_POST['deposit_password'], 0, 64): ''; - - $renter = getdbosql('db_renters', "address=:address", array(':address'=>$deposit)); - if(!$renter) - { - $this->render('login'); - return; - } - - if(md5($password) != $renter->password && (!empty($renter->password) || !empty($password))) - { - user()->setFlash('error', "Login failed."); - $this->render('login'); - return; - } - - user()->setState('yaamp-deposit', $renter->address); - $this->redirect("/renting"); - } - - public function actionIndex() - { - $deposit = user()->getState('yaamp-deposit'); - if(!$deposit && !$this->admin) - { - $this->render('login'); - return; - } - - $address = getparam('address'); - if($this->admin && !empty($address)) - { - $deposit = $address; - user()->setState('yaamp-deposit', $deposit); - } - - $renter = getdbosql('db_renters', "address=:deposit", array(':deposit'=>$deposit)); - if(!$renter) - { - $this->render('login'); - return; - } - - $changed = false; - if(isset($_POST['deposit_email'])) - { - $renter->email = $_POST['deposit_email']; - $changed = true; - } - - if(isset($_POST['deposit_password']) && !empty($_POST['deposit_password'])) - { - if($_POST['deposit_password'] == $_POST['deposit_confirm']) - { - $renter->password = md5($_POST['deposit_password']); - $changed = true; - } - else - { - user()->setFlash('error', "Confirm different from password."); - $this->goback(); - - return; - } - } - - if($changed) - { - debuglog("saving renter {$_SERVER['REMOTE_ADDR']} $renter->address"); - - dborun("update renters set email=:email, password=:password where id=$renter->id", - array(':email'=>$renter->email, ':password'=>$renter->password)); - -// $renter->save(); - - user()->setFlash('message', "Settings saved."); - $this->redirect("/renting"); - } - - $this->render('index', array('renter'=>$renter)); - } - - public function actionSettings() - { - $this->render('settings'); - } - - public function actionAdmin() - { - if(!$this->admin) return; - $this->render('admin'); - } - - public function actionCreate() - { - $this->render('create'); - } - - public function actionLogout() - { - user()->setState('yaamp-deposit', ''); - $this->redirect('/renting'); - } - - public function actionTx() - { - $this->renderPartial('tx'); - } - - //////////////////////////////////////////////////////////////////////////////////////////////////// - - public function actionJobs_stop() - { - $job = getdbo('db_jobs', getiparam('id')); - - $renter = getdbo('db_renters', $job->renterid); - if(!$renter || $renter->address != user()->getState('yaamp-deposit')) $this->goback(); - - $job->active = false; - $job->ready = false; - $job->time = time(); -// $job->difficulty = null; - $job->save(); - - $this->goback(); - } - - public function actionJobs_start() - { - $job = getdbo('db_jobs', getiparam('id')); -// if($job->algo == 'sha256') $this->goback(); - - $renter = getdbo('db_renters', $job->renterid); - if(!$renter || $renter->balance<=0.00001000 || $renter->address != user()->getState('yaamp-deposit')) $this->goback(); - - $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$job->algo)); - if($job->price > $rent) $job->active = true; - - $job->ready = true; - $job->time = time(); -// $job->difficulty = null; - $job->save(); - - $this->goback(); - } - - public function actionJobs_startall() - { - $deposit = user()->getState('yaamp-deposit'); - $renter = getrenterparam($deposit); - if(!$renter || $renter->balance<=0.00001000) $this->goback(); - - $list = getdbolist('db_jobs', "renterid=$renter->id"); - foreach($list as $job) - { - $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$job->algo)); - if($job->price > $rent) $job->active = true; - - $job->ready = true; - $job->time = time(); - $job->save(); - } - - $this->goback(); - } - - public function actionJobs_stopall() - { - $deposit = user()->getState('yaamp-deposit'); - $renter = getrenterparam($deposit); - if(!$renter) $this->goback(); - - $list = getdbolist('db_jobs', "renterid=$renter->id"); - foreach($list as $job) - { - $job->active = false; - $job->ready = false; - $job->time = time(); - $job->save(); - } - - $this->goback(); - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - - public function actionBalance_results() - { - if(!$this->verifyparam()) return; - $this->renderPartial('balance_results'); - } - - public function actionOrders_results() - { - if(!$this->verifyparam()) return; - $this->renderPartial('orders_results'); - } - - public function actionAll_orders_results() - { - $this->renderPartial('all_orders_results'); - } - - public function actionGraph_job_results() - { - $this->renderPartial('graph_job_results'); - } - - public function actionStatus_results() - { - $this->renderPartial('status_results'); - } - - public function actionGraph_price_results() - { - $this->renderPartial('graph_price_results'); - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - - public function actionOrderDelete() - { - $job = getdbo('db_jobs', getiparam('id')); - if(!$job) return; - - $renter = getdbo('db_renters', $job->renterid); - if(!$renter || $renter->address != user()->getState('yaamp-deposit')) return; - - $job->delete(); - $this->redirect("/renting?address=$renter->address"); - } - - public function actionOrderSave() - { - $renter = getdbo('db_renters', XssFilter(''.getparam('order_renterid'))); - if(!$renter || $renter->address != user()->getState('yaamp-deposit')) return; - - $job = getdbo('db_jobs', XssFilter(''.getparam('order_id'))); - if(!$job) - { - $job = new db_jobs; - $job->renterid = getparam('order_renterid'); - } - - $job->algo = getparam('order_algo'); - $job->username = getparam('order_username'); - $job->password = getparam('order_password'); - $job->percent = getparam('order_percent'); - $job->price = getparam('order_price'); - $job->speed = getparam('order_speed')*1000000; - - if( empty($job->algo) || empty($job->username) || empty($job->password) || empty($job->price) || - empty($job->speed) || empty(''.getparam('order_address')) || empty(''.getparam('order_host'))) - { - $this->redirect('/renting'); - return; - } - - if($job->speed<100000) - { - $this->redirect('/renting'); - return; - } - - $host = str_replace('stratum+tcp://', '', getparam('order_host')); - $a = explode(':', $host); - if(!isset($a[0]) || !isset($a[1])) - { - user()->setFlash('error', "invalid server url"); - $this->redirect('/renting'); - return; - } - - $job->host = trim($a[0]); - $job->port = intval($a[1]); - - if(stripos($job->host, YAAMP_STRATUM_URL) !== false) { - user()->setFlash('error', "invalid server url"); - $this->redirect('/renting'); - return; - } - - $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$job->algo)); - - if($job->price > $rent && $job->ready) - $job->active = true; - - else if($job->price < $rent) - $job->active = false; - - $job->time = time(); -// $job->difficulty = null; - $job->save(); - - $this->redirect("/renting?address=".getparam('order_address')); - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - - public function actionOrderDialog() - { - $renter = getrenterparam(''.getparam('address')); - if(!$renter) return; - - $a = YAAMP_DEFAULT_ALGO; - $server = ''; - $username = ''; - $password = 'xx'; - $percent = ''; - $price = ''; - $speed = ''; - $id = 0; - - $job = getdbo('db_jobs', getiparam('id')); - if($job) - { - $id = $job->id; - $a = $job->algo; - $server = "$job->host:$job->port"; - $username = $job->username; - $password = $job->password; - $percent = $job->percent; - $price = mbitcoinvaluetoa($job->price); - $speed = $job->speed/1000000; - } - - echo << array( + 'class' => 'CCaptchaAction', + 'backColor' => 0xeeeeee, + ) , + ); + } + + private function verifyparam() + { + $deposit = user()->getState('yaamp-deposit'); + $address = getparam('address'); + + if (!$this->admin && $deposit != $address) return false; + + return true; + } + + public function actionLogin() + { + $deposit = isset($_POST['deposit_address']) ? substr($_POST['deposit_address'], 0, 35) : ''; + $password = isset($_POST['deposit_password']) ? substr($_POST['deposit_password'], 0, 64) : ''; + + $renter = getdbosql('db_renters', "address=:address", array( + ':address' => $deposit + )); + if (!$renter) + { + $this->render('login'); + return; + } + + if (md5($password) != $renter->password && (!empty($renter->password) || !empty($password))) + { + user()->setFlash('error', "Login failed."); + $this->render('login'); + return; + } + + user() + ->setState('yaamp-deposit', $renter->address); + $this->redirect("/renting"); + } + + public function actionIndex() + { + $deposit = user()->getState('yaamp-deposit'); + if (!$deposit && !$this->admin) + { + $this->render('login'); + return; + } + + $address = getparam('address'); + if ($this->admin && !empty($address)) + { + $deposit = $address; + user()->setState('yaamp-deposit', $deposit); + } + + $renter = getdbosql('db_renters', "address=:deposit", array( + ':deposit' => $deposit + )); + if (!$renter) + { + $this->render('login'); + return; + } + + $changed = false; + if (isset($_POST['deposit_email'])) + { + $renter->email = $_POST['deposit_email']; + $changed = true; + } + + if (isset($_POST['deposit_password']) && !empty($_POST['deposit_password'])) + { + if ($_POST['deposit_password'] == $_POST['deposit_confirm']) + { + $renter->password = md5($_POST['deposit_password']); + $changed = true; + } + else + { + user()->setFlash('error', "Confirm different from password."); + $this->goback(); + + return; + } + } + + if ($changed) + { + debuglog("saving renter {$_SERVER['REMOTE_ADDR']} $renter->address"); + + dborun("update renters set email=:email, password=:password where id=$renter->id", array( + ':email' => $renter->email, + ':password' => $renter->password + )); + + // $renter->save(); + user() + ->setFlash('message', "Settings saved."); + $this->redirect("/renting"); + } + + $this->render('index', array( + 'renter' => $renter + )); + } + + public function actionSettings() + { + $this->render('settings'); + } + + public function actionAdmin() + { + if (!$this->admin) return; + $this->render('admin'); + } + + public function actionCreate() + { + $this->render('create'); + } + + public function actionLogout() + { + user() + ->setState('yaamp-deposit', ''); + $this->redirect('/renting'); + } + + public function actionTx() + { + $this->renderPartial('tx'); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + public function actionJobs_stop() + { + $job = getdbo('db_jobs', getiparam('id')); + + $renter = getdbo('db_renters', $job->renterid); + if (!$renter || $renter->address != user() + ->getState('yaamp-deposit')) $this->goback(); + + $job->active = false; + $job->ready = false; + $job->time = time(); + // $job->difficulty = null; + $job->save(); + + $this->goback(); + } + + public function actionJobs_start() + { + $job = getdbo('db_jobs', getiparam('id')); + // if($job->algo == 'sha256') $this->goback(); + $renter = getdbo('db_renters', $job->renterid); + if (!$renter || $renter->balance <= 0.00001000 || $renter->address != user() + ->getState('yaamp-deposit')) $this->goback(); + + $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $job->algo + )); + if ($job->price > $rent) $job->active = true; + + $job->ready = true; + $job->time = time(); + // $job->difficulty = null; + $job->save(); + + $this->goback(); + } + + public function actionJobs_startall() + { + $deposit = user()->getState('yaamp-deposit'); + $renter = getrenterparam($deposit); + if (!$renter || $renter->balance <= 0.00001000) $this->goback(); + + $list = getdbolist('db_jobs', "renterid=$renter->id"); + foreach ($list as $job) + { + $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $job->algo + )); + if ($job->price > $rent) $job->active = true; + + $job->ready = true; + $job->time = time(); + $job->save(); + } + + $this->goback(); + } + + public function actionJobs_stopall() + { + $deposit = user()->getState('yaamp-deposit'); + $renter = getrenterparam($deposit); + if (!$renter) $this->goback(); + + $list = getdbolist('db_jobs', "renterid=$renter->id"); + foreach ($list as $job) + { + $job->active = false; + $job->ready = false; + $job->time = time(); + $job->save(); + } + + $this->goback(); + } + + ///////////////////////////////////////////////////////////////////////////////////////////// + public function actionBalance_results() + { + if (!$this->verifyparam()) return; + $this->renderPartial('balance_results'); + } + + public function actionOrders_results() + { + if (!$this->verifyparam()) return; + $this->renderPartial('orders_results'); + } + + public function actionAll_orders_results() + { + $this->renderPartial('all_orders_results'); + } + + public function actionGraph_job_results() + { + $this->renderPartial('graph_job_results'); + } + + public function actionStatus_results() + { + $this->renderPartial('status_results'); + } + + public function actionGraph_price_results() + { + $this->renderPartial('graph_price_results'); + } + + ///////////////////////////////////////////////////////////////////////////////////////////// + public function actionOrderDelete() + { + $job = getdbo('db_jobs', getiparam('id')); + if (!$job) return; + + $renter = getdbo('db_renters', $job->renterid); + if (!$renter || $renter->address != user() + ->getState('yaamp-deposit')) return; + + $job->delete(); + $this->redirect("/renting?address=$renter->address"); + } + + public function actionOrderSave() + { + $renter = getdbo('db_renters', XssFilter('' . getparam('order_renterid'))); + if (!$renter || $renter->address != user() + ->getState('yaamp-deposit')) return; + + $job = getdbo('db_jobs', XssFilter('' . getparam('order_id'))); + if (!$job) + { + $job = new db_jobs; + $job->renterid = getparam('order_renterid'); + } + + $job->algo = getparam('order_algo'); + $job->username = getparam('order_username'); + $job->password = getparam('order_password'); + $job->percent = getparam('order_percent'); + $job->price = getparam('order_price'); + $job->speed = getparam('order_speed') * 1000000; + + if (empty($job->algo) || empty($job->username) || empty($job->password) || empty($job->price) || empty($job->speed) || empty('' . getparam('order_address')) || empty('' . getparam('order_host'))) + { + $this->redirect('/renting'); + return; + } + + if ($job->speed < 100000) + { + $this->redirect('/renting'); + return; + } + + $host = str_replace('stratum+tcp://', '', getparam('order_host')); + $a = explode(':', $host); + if (!isset($a[0]) || !isset($a[1])) + { + user()->setFlash('error', "invalid server url"); + $this->redirect('/renting'); + return; + } + + $job->host = trim($a[0]); + $job->port = intval($a[1]); + + if (stripos($job->host, YAAMP_STRATUM_URL) !== false) + { + user() + ->setFlash('error', "invalid server url"); + $this->redirect('/renting'); + return; + } + + $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $job->algo + )); + + if ($job->price > $rent && $job->ready) $job->active = true; + + else if ($job->price < $rent) $job->active = false; + + $job->time = time(); + // $job->difficulty = null; + $job->save(); + + $this->redirect("/renting?address=" . getparam('order_address')); + } + + ///////////////////////////////////////////////////////////////////////////////////////////// + public function actionOrderDialog() + { + $renter = getrenterparam('' . getparam('address')); + if (!$renter) return; + + $a = YAAMP_DEFAULT_ALGO; + $server = ''; + $username = ''; + $password = 'xx'; + $percent = ''; + $price = ''; + $speed = ''; + $id = 0; + + $job = getdbo('db_jobs', getiparam('id')); + if ($job) + { + $id = $job->id; + $a = $job->algo; + $server = "$job->host:$job->port"; + $username = $job->username; + $password = $job->password; + $percent = $job->percent; + $price = mbitcoinvaluetoa($job->price); + $speed = $job->speed / 1000000; + } + + echo << @@ -366,16 +378,17 @@ public function actionOrderDialog() Algo: Username: @@ -384,90 +397,81 @@ public function actionOrderDialog() Max Hashrate
    (Mh/s): end; - if(controller()->admin) - echo "Percent:"; - echo ""; - } + if (controller()->admin) echo "Percent:"; - ////////////////////////////////////////////////////////////////////////////////////////////////////////// + echo ""; + } - public function actionResetSpent() - { - $renter = getrenterparam(''.getparam('address')); - if(!$renter) return; + ////////////////////////////////////////////////////////////////////////////////////////////////////////// + public function actionResetSpent() + { + $renter = getrenterparam('' . getparam('address')); + if (!$renter) return; - $renter->custom_start = 0; - $renter->spent = $renter->custom_balance; + $renter->custom_start = 0; + $renter->spent = $renter->custom_balance; - $renter->save(); - $this->goback(); - } + $renter->save(); + $this->goback(); + } - public function actionWithdraw() - { - $fees = YAAMP_TXFEE_RENTING_WD; // 0.002 + public function actionWithdraw() + { + $fees = YAAMP_TXFEE_RENTING_WD; // 0.002 + $deposit = user()->getState('yaamp-deposit'); + if (!$deposit) + { + $this->render('login'); + return; + } - $deposit = user()->getState('yaamp-deposit'); - if(!$deposit) - { - $this->render('login'); - return; - } + $renter = getrenterparam($deposit); + if (!$renter) + { + $this->render('login'); + return; + } - $renter = getrenterparam($deposit); - if(!$renter) - { - $this->render('login'); - return; - } + $amount = getparam('withdraw_amount'); + $address = getparam('withdraw_address'); - $amount = getparam('withdraw_amount'); - $address = getparam('withdraw_address'); + $amount = floatval(bitcoinvaluetoa(min($amount, $renter->balance - $fees))); + if ($amount < YAAMP_PAYMENTS_MINI) // 0.001 - $amount = floatval(bitcoinvaluetoa(min($amount, $renter->balance-$fees))); - if($amount < YAAMP_PAYMENTS_MINI) // 0.001 - { - user()->setFlash('error', 'Minimum withdraw is '.YAAMP_PAYMENTS_MINI); - $this->redirect("/renting"); - return; - } + { + user()->setFlash('error', 'Minimum withdraw is ' . YAAMP_PAYMENTS_MINI); + $this->redirect("/renting"); + return; + } - $coin = getdbosql('db_coins', "symbol='BTC'"); - if(!$coin) return; + $coin = getdbosql('db_coins', "symbol='BTC'"); + if (!$coin) return; - $remote = new WalletRPC($coin); + $remote = new WalletRPC($coin); - $res = $remote->validateaddress($address); - if(!$res || !isset($res['isvalid']) || !$res['isvalid']) - { - user()->setFlash('error', 'Invalid address'); - $this->redirect("/renting"); + $res = $remote->validateaddress($address); + if (!$res || !isset($res['isvalid']) || !$res['isvalid']) + { + user()->setFlash('error', 'Invalid address'); + $this->redirect("/renting"); - return; - } + return; + } - $rentertx = new db_rentertxs; - $rentertx->renterid = $renter->id; - $rentertx->time = time(); - $rentertx->amount = $amount; - $rentertx->type = 'withdraw'; - $rentertx->address = $address; - $rentertx->tx = 'scheduled'; - $rentertx->save(); + $rentertx = new db_rentertxs; + $rentertx->renterid = $renter->id; + $rentertx->time = time(); + $rentertx->amount = $amount; + $rentertx->type = 'withdraw'; + $rentertx->address = $address; + $rentertx->tx = 'scheduled'; + $rentertx->save(); - debuglog("withdraw scheduled $renter->id $renter->address, $amount to $address"); + debuglog("withdraw scheduled $renter->id $renter->address, $amount to $address"); - user()->setFlash('message', "withdraw scheduled"); - $this->redirect("/renting"); - } + user()->setFlash('message', "withdraw scheduled"); + $this->redirect("/renting"); + } } - - - - - - - - diff --git a/web/yaamp/modules/renting/admin.php b/web/yaamp/modules/renting/admin.php index 66594f1c6..d40d6cd84 100644 --- a/web/yaamp/modules/renting/admin.php +++ b/web/yaamp/modules/renting/admin.php @@ -1,12 +1,10 @@ getState('yaamp-deposit'); echo "refresh
    "; //////////////////////////////////////////////////////////////////////////////////////////////////////// - $list = getdbolist('db_rentertxs', "1 order by time desc limit 10"); -if(count($list) == 0) return; +if (count($list) == 0) return; echo ""; @@ -21,39 +19,37 @@ echo ""; echo ""; -foreach($list as $tx) +foreach ($list as $tx) { - $d = datetoa2($tx->time); - $amount = bitcoinvaluetoa($tx->amount); + $d = datetoa2($tx->time); + $amount = bitcoinvaluetoa($tx->amount); - $renter = getdbo('db_renters', $tx->renterid); - if(!$renter) continue; + $renter = getdbo('db_renters', $tx->renterid); + if (!$renter) continue; - echo ""; + echo ""; - echo ""; - echo ""; + echo ""; + echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; - if(strlen($tx->tx) > 32) - { - $tx_show = substr($tx->tx, 0, 36).'...'; - $txurl = "https://blockchain.info/tx/$tx->tx"; - echo ""; - } - else - echo ""; + if (strlen($tx->tx) > 32) + { + $tx_show = substr($tx->tx, 0, 36) . '...'; + $txurl = "https://blockchain.info/tx/$tx->tx"; + echo ""; + } + else echo ""; - echo ""; + echo ""; } echo "
    $renter->id$renter->address$renter->id$renter->address$d ago$tx->type$amount$d ago$tx->type$amount$tx_show$tx->tx$tx_show$tx->tx

    "; ///////////////////////////////////////////////////////////////////////////////////////////////////////// - echo "
    "; echo ""; echo ""; @@ -69,31 +65,28 @@ echo ""; $list = getdbolist('db_renters', "balance>0 order by balance desc"); -foreach($list as $renter) +foreach ($list as $renter) { - $count = dboscalar("select count(*) from jobs where renterid=$renter->id"); - $active = dboscalar("select count(*) from jobs where renterid=$renter->id and active"); - - if($deposit == $renter->address) - echo ""; - else - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + $count = dboscalar("select count(*) from jobs where renterid=$renter->id"); + $active = dboscalar("select count(*) from jobs where renterid=$renter->id and active"); + + if ($deposit == $renter->address) echo ""; + else echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; } echo "
    $renter->id$renter->address$renter->email$renter->spent$renter->balance$renter->unconfirmed$count$active
    $renter->id$renter->address$renter->email$renter->spent$renter->balance$renter->unconfirmed$count$active
    "; ///////////////////////////////////////////////////////////////////////////// - echo "
    "; echo ""; echo ""; @@ -112,37 +105,33 @@ echo ""; $list = getdbolist('db_jobs', "ready"); -foreach($list as $job) +foreach ($list as $job) { - $hashrate = yaamp_job_rate($job->id); - $hashrate = $hashrate? Itoa2($hashrate).'h/s': ''; - - $speed = Itoa2($job->speed).'h/s'; - - $renter = getdbo('db_renters', $job->renterid); - if(!$renter) continue; - - if($deposit == $renter->address) - echo ""; - else - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + $hashrate = yaamp_job_rate($job->id); + $hashrate = $hashrate ? Itoa2($hashrate) . 'h/s' : ''; + + $speed = Itoa2($job->speed) . 'h/s'; + + $renter = getdbo('db_renters', $job->renterid); + if (!$renter) continue; + + if ($deposit == $renter->address) echo ""; + else echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; } echo "
    $job->renterid$job->id$renter->address$job->algo$job->host:$job->port$job->price$speed$hashrate$job->difficulty$job->ready$job->active
    $job->renterid$job->id$renter->address$job->algo$job->host:$job->port$job->price$speed$hashrate$job->difficulty$job->ready$job->active
    "; echo "









    "; - - diff --git a/web/yaamp/modules/renting/all_orders_results.php b/web/yaamp/modules/renting/all_orders_results.php index 249be8f84..581608be9 100644 --- a/web/yaamp/modules/renting/all_orders_results.php +++ b/web/yaamp/modules/renting/all_orders_results.php @@ -1,11 +1,12 @@ getState('yaamp-algo'); -$rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$defaultalgo)); +$rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $defaultalgo +)); $rent = mbitcoinvaluetoa($rent); -$renter = getrenterparam(''.getparam('address')); +$renter = getrenterparam('' . getparam('address')); echo "
    "; echo "
    All started jobs ($defaultalgo) - Current Price $rent
    "; @@ -25,55 +26,52 @@ echo ""; echo ""; -$list = getdbolist('db_jobs', "ready and algo=:algo order by price desc, time", array(':algo'=>$defaultalgo)); -foreach($list as $job) +$list = getdbolist('db_jobs', "ready and algo=:algo order by price desc, time", array( + ':algo' => $defaultalgo +)); +foreach ($list as $job) { - $hashrate_bad = yaamp_job_rate_bad($job->id); - $hashrate = yaamp_job_rate($job->id)+$hashrate_bad; - - $title_percent = ''; - if($hashrate_bad) - { - $percent = round($hashrate_bad/$hashrate*100, 1).'%'; - $hashrate_bad = Itoa2($hashrate_bad).'h/s'; + $hashrate_bad = yaamp_job_rate_bad($job->id); + $hashrate = yaamp_job_rate($job->id) + $hashrate_bad; - $title_percent = "Rejected $hashrate_bad ($percent)"; - } + $title_percent = ''; + if ($hashrate_bad) + { + $percent = round($hashrate_bad / $hashrate * 100, 1) . '%'; + $hashrate_bad = Itoa2($hashrate_bad) . 'h/s'; - $hashrate = $hashrate? Itoa2($hashrate).'h/s': ''; - $maxhash = $job->speed? Itoa2($job->speed).'h/s': ''; + $title_percent = "Rejected $hashrate_bad ($percent)"; + } - $title = controller()->admin? "-o stratum+tcp://$job->host:$job->port -u $job->username -p $job->password": ''; + $hashrate = $hashrate ? Itoa2($hashrate) . 'h/s' : ''; + $maxhash = $job->speed ? Itoa2($job->speed) . 'h/s' : ''; - $servername = substr($job->host, 0, 22); - $price = mbitcoinvaluetoa($job->price); + $title = controller()->admin ? "-o stratum+tcp://$job->host:$job->port -u $job->username -p $job->password" : ''; - $diff = $job->difficulty>0? round($job->difficulty, 3): ''; - $d = datetoa2($job->time); + $servername = substr($job->host, 0, 22); + $price = mbitcoinvaluetoa($job->price); - if($job->active) - echo ""; - else - echo ""; + $diff = $job->difficulty > 0 ? round($job->difficulty, 3) : ''; + $d = datetoa2($job->time); - if($renter && $renter->id == $job->renterid) - echo "$job->host"; - else - echo ""; + if ($job->active) echo ""; + else echo ""; -// echo "$d"; -// echo "$job->algo"; + if ($renter && $renter->id == $job->renterid) echo "$job->host"; + else echo ""; - echo "$price"; - echo "$maxhash"; - echo "$hashrate"; - echo "$diff"; - echo ""; + // echo "$d"; + // echo "$job->algo"; + echo "$price"; + echo "$maxhash"; + echo "$hashrate"; + echo "$diff"; + echo ""; - $style_ext = ''; //$job->active? 'background-color: #dfd;': ''; - echo ""; - echo "
    "; - echo ""; + $style_ext = ''; //$job->active? 'background-color: #dfd;': ''; + echo ""; + echo "
    "; + echo ""; } echo ""; @@ -85,11 +83,3 @@ echo "
    "; echo "

    "; - - - - - - - - diff --git a/web/yaamp/modules/renting/balance_results.php b/web/yaamp/modules/renting/balance_results.php index 66f99e3a9..39323bd4a 100644 --- a/web/yaamp/modules/renting/balance_results.php +++ b/web/yaamp/modules/renting/balance_results.php @@ -1,14 +1,12 @@ "; echo "
    Deposit $renter->address
    "; echo "
    "; -if(!YAAMP_RENTAL) - echo "

    Renting is temporarily disabled.

    "; +if (!YAAMP_RENTAL) echo "

    Renting is temporarily disabled.

    "; echo ""; @@ -19,38 +17,36 @@ echo ""; echo ""; -if($renter->balance>=0.001) - echo ""; -else if($renter->balance>0) - echo ""; +if ($renter->balance >= 0.001) echo ""; +else if ($renter->balance > 0) echo ""; echo ""; -if($unconfirmed > 0) +if ($unconfirmed > 0) { - echo ""; + echo ""; } -if(controller()->admin) +if (controller()->admin) { - echo " + echo ""; - if($renter->id == 7) - { -// $balance = $renter->custom_balance - $renter->custom_start; - $profit = $renter->custom_start + $renter->custom_balance - $spent; + if ($renter->id == 7) + { + // $balance = $renter->custom_balance - $renter->custom_start; + $profit = $renter->custom_start + $renter->custom_balance - $spent; - $start = bitcoinvaluetoa($renter->custom_start); - $balance = bitcoinvaluetoa($renter->custom_balance); - $profit = bitcoinvaluetoa($profit); + $start = bitcoinvaluetoa($renter->custom_start); + $balance = bitcoinvaluetoa($renter->custom_balance); + $profit = bitcoinvaluetoa($profit); - echo ""; - echo ""; - echo ""; - } + echo ""; + echo ""; + echo ""; + } } echo "
    Deposit Address$renter->address
    Balance$balance BTC(withdraw minimum 0.001)(withdraw minimum 0.001)
    Unconfirmed$unconfirmed BTC"; - echo " (waiting for 1 confirmation)"; - echo "
    Unconfirmed$unconfirmed BTC"; + echo " (waiting for 1 confirmation)"; + echo "
    Spent$spent BTC
    Spent$spent BTC
    Received$start BTC
    Unpaid$balance BTC
    Profit$profit BTC
    Received$start BTC
    Unpaid$balance BTC
    Profit$profit BTC

    "; @@ -61,9 +57,8 @@ echo "

    "; //////////////////////////////////////////////////////////////////////////////////////////////////////// - $list = getdbolist('db_rentertxs', "renterid=$renter->id order by time desc limit 5"); -if(count($list) == 0) return; +if (count($list) == 0) return; echo "
    "; echo "
    Last 5 transactions $renter->address
    "; @@ -80,36 +75,29 @@ echo ""; echo ""; -foreach($list as $tx) +foreach ($list as $tx) { - $d = datetoa2($tx->time); - $amount = bitcoinvaluetoa($tx->amount); + $d = datetoa2($tx->time); + $amount = bitcoinvaluetoa($tx->amount); - echo ""; + echo ""; - echo "$d ago"; - echo "$tx->type"; - echo "$amount"; + echo "$d ago"; + echo "$tx->type"; + echo "$amount"; - if(strlen($tx->tx) > 32) - { - $tx_show = substr($tx->tx, 0, 36).'...'; - $txurl = "https://blockchain.info/tx/$tx->tx"; - echo "$tx_show"; - } - else - echo "$tx->tx"; + if (strlen($tx->tx) > 32) + { + $tx_show = substr($tx->tx, 0, 36) . '...'; + $txurl = "https://blockchain.info/tx/$tx->tx"; + echo "$tx_show"; + } + else echo "$tx->tx"; - echo ""; + echo ""; } echo "
    "; echo "
    "; echo "
    "; - - - - - - diff --git a/web/yaamp/modules/renting/create.php b/web/yaamp/modules/renting/create.php index 55de45f0a..446dd8bac 100644 --- a/web/yaamp/modules/renting/create.php +++ b/web/yaamp/modules/renting/create.php @@ -1,23 +1,22 @@ redirect('/renting'); - return; + controller()->redirect('/renting'); + return; } -$captcha = new CCaptchaAction(controller(), 'captcha'); +$captcha = new CCaptchaAction(controller() , 'captcha'); $b = $captcha->validate($code, false); -if(!$b) +if (!$b) { - controller()->redirect('/renting'); - return; + controller()->redirect('/renting'); + return; } // get a new btc address $btc = getdbosql('db_coins', "symbol='BTC'"); -if(!$btc) return; +if (!$btc) return; $remote = new WalletRPC($btc); $renter = new db_renters; @@ -31,24 +30,23 @@ $renter = getdbo('db_renters', $renter->id); $renter->address = $remote->getaccountaddress(yaamp_renter_account($renter)); -$renter->apikey = hash("sha256", $renter->address.time().rand()); +$renter->apikey = hash("sha256", $renter->address . time() . rand()); $renter->save(); -$received1 = $remote->getbalance(yaamp_renter_account($renter), 1); -if($received1>0) +$received1 = $remote->getbalance(yaamp_renter_account($renter) , 1); +if ($received1 > 0) { - $moved = $remote->move(yaamp_renter_account($renter), '', $received1); - debuglog("create new renter, moving initial $received1"); + $moved = $remote->move(yaamp_renter_account($renter) , '', $received1); + debuglog("create new renter, moving initial $received1"); } -$raw_recents = isset($_COOKIE['deposits'])? explode("|", $_COOKIE['deposits']): array(); +$raw_recents = isset($_COOKIE['deposits']) ? explode("|", $_COOKIE['deposits']) : array(); $recents = array(); -foreach($raw_recents as $addr) $recents[$addr] = $addr; -$recents[$renter->address] = $renter->address; -setcookie('deposits', implode("|", $recents), time()+60*60*24*30, '/'); +foreach ($raw_recents as $addr) $recents[$addr] = $addr; +$recents[$renter + ->address] = $renter->address; +setcookie('deposits', implode("|", $recents) , time() + 60 * 60 * 24 * 30, '/'); user()->setState('yaamp-deposit', $renter->address); -controller()->redirect('settings'); - - - +controller() + ->redirect('settings'); diff --git a/web/yaamp/modules/renting/graph_job_results.php b/web/yaamp/modules/renting/graph_job_results.php index 6005ee984..cf88055bc 100644 --- a/web/yaamp/modules/renting/graph_job_results.php +++ b/web/yaamp/modules/renting/graph_job_results.php @@ -1,74 +1,79 @@ $t and jobid=:jobid order by time", array(':jobid'=>$jobid)); +$stats = getdbolist('db_hashrenter', "time>$t and jobid=:jobid order by time", array( + ':jobid' => $jobid +)); $averages = array(); echo '[['; -for($i = $t+$step, $j = 0; $i < time(); $i += $step) +for ($i = $t + $step, $j = 0;$i < time();$i += $step) { - if($i != $t+$step) echo ','; - $m = 0; + if ($i != $t + $step) echo ','; + $m = 0; + + if ($i + $step >= time()) + { + $m = round(yaamp_job_rate($jobid) / 1000000, 3); + // debuglog("last $m"); - if($i + $step >= time()) - { - $m = round(yaamp_job_rate($jobid)/1000000, 3); - // debuglog("last $m"); - } + } - else if(isset($stats[$j]) && $i > $stats[$j]->time) - { - $m = round($stats[$j]->hashrate/1000000, 3); - $j++; - } + else if (isset($stats[$j]) && $i > $stats[$j]->time) + { + $m = round($stats[$j]->hashrate / 1000000, 3); + $j++; + } - $d = date('Y-m-d H:i:s', $i); - echo "[\"$d\",$m]"; + $d = date('Y-m-d H:i:s', $i); + echo "[\"$d\",$m]"; - $averages[] = array($d, $m); + $averages[] = array( + $d, + $m + ); } echo '],['; $average = $averages[0][1]; -foreach($averages as $i=>$n) +foreach ($averages as $i => $n) { - if($i) echo ','; + if ($i) echo ','; - $average = ($average*(100-$percent) + $n[1]*$percent) / 100; - $m = round($average, 3); + $average = ($average * (100 - $percent) + $n[1] * $percent) / 100; + $m = round($average, 3); - echo "[\"{$n[0]}\",$m]"; + echo "[\"{$n[0]}\",$m]"; } echo '],['; -for($i = $t+$step, $j = 0; $i < time(); $i += $step) +for ($i = $t + $step, $j = 0;$i < time();$i += $step) { - if($i != $t+$step) echo ','; - $m = 0; - - if($i + $step >= time()) - { - $m = round(yaamp_user_rate_bad($jobid)/1000000, 3); - // debuglog("last $m"); - } - - else if(isset($stats[$j]) && $i > $stats[$j]->time) - { - $m = round($stats[$j]->hashrate_bad/1000000, 3); - $j++; - } - - $d = date('Y-m-d H:i:s', $i); - echo "[\"$d\",$m]"; + if ($i != $t + $step) echo ','; + $m = 0; + + if ($i + $step >= time()) + { + $m = round(yaamp_user_rate_bad($jobid) / 1000000, 3); + // debuglog("last $m"); + + } + + else if (isset($stats[$j]) && $i > $stats[$j]->time) + { + $m = round($stats[$j]->hashrate_bad / 1000000, 3); + $j++; + } + + $d = date('Y-m-d H:i:s', $i); + echo "[\"$d\",$m]"; } echo ']]'; - diff --git a/web/yaamp/modules/renting/graph_price_results.php b/web/yaamp/modules/renting/graph_price_results.php index 1b696fd69..d226ad0b4 100644 --- a/web/yaamp/modules/renting/graph_price_results.php +++ b/web/yaamp/modules/renting/graph_price_results.php @@ -1,54 +1,55 @@ getState('yaamp-algo'); -$step = 15*60; -$t = time() - 24*60*60; +$step = 15 * 60; +$t = time() - 24 * 60 * 60; -$stats = getdbolist('db_hashrate', "time>$t and algo=:algo order by time", array(':algo'=>$algo)); +$stats = getdbolist('db_hashrate', "time>$t and algo=:algo order by time", array( + ':algo' => $algo +)); $averages = array(); echo '[['; -for($i = 0; $i < 95-count($stats); $i++) +for ($i = 0;$i < 95 - count($stats);$i++) { - $d = date('Y-m-d H:i:s', $t); - echo "[\"$d\",0],"; - - $t += $step; - $averages[] = array($d, 0); + $d = date('Y-m-d H:i:s', $t); + echo "[\"$d\",0],"; + + $t += $step; + $averages[] = array( + $d, + 0 + ); } -foreach($stats as $i=>$n) +foreach ($stats as $i => $n) { - $m = $n->rent; - if($m == null) $m=0; - if($i) echo ','; + $m = $n->rent; + if ($m == null) $m = 0; + if ($i) echo ','; - $d = date('Y-m-d H:i:s', $n->time); - echo "[\"$d\",$m]"; + $d = date('Y-m-d H:i:s', $n->time); + echo "[\"$d\",$m]"; - $averages[] = array($d, $m); + $averages[] = array( + $d, + $m + ); } echo '],['; $average = $averages[0][1]; -foreach($averages as $i=>$n) +foreach ($averages as $i => $n) { - if($i) echo ','; + if ($i) echo ','; - $average = ($average*(100-$percent) + $n[1]*$percent) / 100; - $m = round($average, 5); + $average = ($average * (100 - $percent) + $n[1] * $percent) / 100; + $m = round($average, 5); - echo "[\"{$n[0]}\",$m]"; + echo "[\"{$n[0]}\",$m]"; } echo ']]'; - - - - - - diff --git a/web/yaamp/modules/renting/index.php b/web/yaamp/modules/renting/index.php index 7cb068895..8292ea233 100644 --- a/web/yaamp/modules/renting/index.php +++ b/web/yaamp/modules/renting/index.php @@ -1,5 +1,4 @@ getState('yaamp-algo'); JavascriptFile("/extensions/jqplot/jquery.jqplot.js"); @@ -306,13 +305,3 @@ function yaamp_withdraw() END; - - - - - - - - - - diff --git a/web/yaamp/modules/renting/login.php b/web/yaamp/modules/renting/login.php index e7ad453a4..c1f646a09 100644 --- a/web/yaamp/modules/renting/login.php +++ b/web/yaamp/modules/renting/login.php @@ -1,5 +1,4 @@ getState('yaamp-algo'); JavascriptFile("/extensions/jqplot/jquery.jqplot.js"); @@ -12,9 +11,10 @@ $this->widget('UniForm'); $address = getparam('address'); -if($address == 0) $address = ''; -if (!empty($address) && preg_match('/[^A-Za-z0-9]/', $address)) { - die; +if ($address == 0) $address = ''; +if (!empty($address) && preg_match('/[^A-Za-z0-9]/', $address)) +{ + die; } echo <<Renting is temporarily disabled.

    "; + +if (!YAAMP_RENTAL) echo "

    Renting is temporarily disabled.

    "; echo <<You need to login to access the renting area.

    @@ -60,27 +60,28 @@ end; -$recents = isset($_COOKIE['deposits'])? explode("|", $_COOKIE['deposits']): array(); -if(controller()->admin || sizeof($recents) < 10) - echo ""; +$recents = isset($_COOKIE['deposits']) ? explode("|", $_COOKIE['deposits']) : array(); + +if (controller()->admin || sizeof($recents) < 10) echo ""; echo "

    "; echo ""; -foreach($recents as $address) +foreach ($recents as $address) { - if(empty($address)) continue; - - $renter = getdbosql('db_renters', "address=:address", array(':address'=>$address)); - if(!$renter) continue; -// debuglog($address); - - echo ""; - echo ""; + if (empty($address)) continue; + + $renter = getdbosql('db_renters', "address=:address", array( + ':address' => $address + )); + if (!$renter) continue; + // debuglog($address); + echo ""; + echo ""; } echo "
    "; - echo ""; - echo "$address
    "; + echo ""; + echo "$address

    "; @@ -233,10 +234,3 @@ function deposit_create() end; - - - - - - - diff --git a/web/yaamp/modules/renting/orders_results.php b/web/yaamp/modules/renting/orders_results.php index fe7c4d43a..3f4b99321 100644 --- a/web/yaamp/modules/renting/orders_results.php +++ b/web/yaamp/modules/renting/orders_results.php @@ -1,7 +1,6 @@ "; echo "
    Jobs $renter->address
    "; @@ -24,88 +23,81 @@ echo ""; $list = getdbolist('db_jobs', "renterid=$renter->id order by algo, price desc"); -foreach($list as $job) +foreach ($list as $job) { - $hashrate_bad = yaamp_job_rate_bad($job->id); - $hashrate = yaamp_job_rate($job->id)+$hashrate_bad; + $hashrate_bad = yaamp_job_rate_bad($job->id); + $hashrate = yaamp_job_rate($job->id) + $hashrate_bad; - $title_percent = ''; - if($hashrate_bad) - { - $percent = 100; - if ($hashrate) - $percent = round($hashrate_bad/$hashrate * 100, 1).'%'; - $hashrate_bad = Itoa2($hashrate_bad).'h/s'; + $title_percent = ''; + if ($hashrate_bad) + { + $percent = 100; + if ($hashrate) $percent = round($hashrate_bad / $hashrate * 100, 1) . '%'; + $hashrate_bad = Itoa2($hashrate_bad) . 'h/s'; - $title_percent = "Rejected $hashrate_bad ($percent)"; - } + $title_percent = "Rejected $hashrate_bad ($percent)"; + } - $hashrate = $hashrate? Itoa2($hashrate).'h/s': ''; + $hashrate = $hashrate ? Itoa2($hashrate) . 'h/s' : ''; - $maxhash = $job->speed? Itoa2($job->speed).'h/s': ''; - $title = "-o stratum+tcp://$job->host:$job->port -u $job->username -p $job->password"; + $maxhash = $job->speed ? Itoa2($job->speed) . 'h/s' : ''; + $title = "-o stratum+tcp://$job->host:$job->port -u $job->username -p $job->password"; - $servername = substr($job->host, 0, 22); - $price = mbitcoinvaluetoa($job->price); + $servername = substr($job->host, 0, 22); + $price = mbitcoinvaluetoa($job->price); - $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$job->algo)); - $rent = mbitcoinvaluetoa($rent); + $rent = dboscalar("select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $job->algo + )); + $rent = mbitcoinvaluetoa($rent); - $diff = $job->difficulty>0? round($job->difficulty, 3): ''; + $diff = $job->difficulty > 0 ? round($job->difficulty, 3) : ''; - if($job->active) - echo ""; - else - echo ""; + if ($job->active) echo ""; + else echo ""; - echo " + echo " "; - $p = $job->percent? "($job->percent%)": ''; - - echo "$servername"; - echo "$job->algo"; - echo "$price $p"; -// echo "$rent"; - echo "$maxhash"; - echo "$hashrate"; - echo "$diff"; + $p = $job->percent ? "($job->percent%)" : ''; - echo ""; + echo "$servername"; + echo "$job->algo"; + echo "$price $p"; + // echo "$rent"; + echo "$maxhash"; + echo "$hashrate"; + echo "$diff"; - if(YAAMP_RENTAL) - { - if($job->ready) - echo ""; - else - echo ""; - } + echo ""; - echo "  "; - echo ""; + if (YAAMP_RENTAL) + { + if ($job->ready) echo ""; + else echo ""; + } - echo ""; + echo "  "; + echo ""; - $style_ext = ''; //$job->active? 'background-color: #dfd;': ''; + echo ""; - echo ""; - echo "
    "; - echo ""; + $style_ext = ''; //$job->active? 'background-color: #dfd;': ''; + echo ""; + echo "
    "; + echo ""; } echo ""; -if(count($list) > 20 && !controller()->admin) - ; -else if($renter->balance > 0) - echo "
    "; -else - echo "

    You have to fund your account by sending bitcoin to your deposit address before you can start creating mining jobs.

    "; +if (count($list) > 20 && !controller()->admin); +else if ($renter->balance > 0) echo "
    "; +else echo "

    You have to fund your account by sending bitcoin to your deposit address before you can start creating mining jobs.

    "; -if(YAAMP_RENTAL) +if (YAAMP_RENTAL) { -echo " "; -echo " "; + echo " "; + echo " "; } echo "

    "; @@ -126,7 +118,3 @@ echo "
    "; echo "
    "; - - - - diff --git a/web/yaamp/modules/renting/settings.php b/web/yaamp/modules/renting/settings.php index 67225852b..4ba7098d5 100644 --- a/web/yaamp/modules/renting/settings.php +++ b/web/yaamp/modules/renting/settings.php @@ -1,5 +1,4 @@ getState('yaamp-algo'); JavascriptFile("/extensions/jqplot/jquery.jqplot.js"); @@ -12,7 +11,7 @@ $this->widget('UniForm'); $renter = getrenterparam(user()->getState('yaamp-deposit')); -if(!$renter) return; +if (!$renter) return; echo << @@ -149,8 +148,3 @@ function graph_init_price(data) end; - - - - - diff --git a/web/yaamp/modules/renting/status_results.php b/web/yaamp/modules/renting/status_results.php index d9fa8cc14..184d1c2c9 100644 --- a/web/yaamp/modules/renting/status_results.php +++ b/web/yaamp/modules/renting/status_results.php @@ -1,5 +1,4 @@ getState('yaamp-algo'); echo "
    "; @@ -23,68 +22,79 @@ echo ""; $algos = array(); -foreach(yaamp_get_algos() as $algo) +foreach (yaamp_get_algos() as $algo) { - $algo_norm = yaamp_get_algo_norm($algo); + $algo_norm = yaamp_get_algo_norm($algo); - $price = controller()->memcache->get_database_scalar("current_price-$algo", - "select price from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); + $price = controller() + ->memcache + ->get_database_scalar("current_price-$algo", "select price from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); - $norm = $price*$algo_norm; - $norm = take_yaamp_fee($norm, $algo); + $norm = $price * $algo_norm; + $norm = take_yaamp_fee($norm, $algo); - $algos[] = array($norm, $algo); + $algos[] = array( + $norm, + $algo + ); } function cmp($a, $b) { - return $a[0] < $b[0]; + return $a[0] < $b[0]; } usort($algos, 'cmp'); -foreach($algos as $item) +foreach ($algos as $item) { - $norm = $item[0]; - $algo = $item[1]; - - $count1 = getdbocount('db_jobs', "algo=:algo and ready and active", array(':algo'=>$algo)); - $count2 = getdbocount('db_jobs', "algo=:algo and ready", array(':algo'=>$algo)); - - $total = yaamp_pool_rate($algo); - $hashrate = yaamp_pool_rate_rentable($algo); - $hashrate_jobs = yaamp_rented_rate($algo); - - $hashrate = min($total, $hashrate); - $hashrate_jobs = min($hashrate, $hashrate_jobs); - - $available = $hashrate - $hashrate_jobs; - $percent = $hashrate_jobs && $hashrate? '('.round($hashrate_jobs/$hashrate*100, 1).'%)': ''; - - $hashrate_jobs = $hashrate_jobs>0? Itoa2($hashrate_jobs).'h/s': ''; - $available = $available>0? Itoa2($available).'h/s': ''; - $hashrate = $hashrate>0? Itoa2($hashrate).'h/s': ''; - $total = $total>0? Itoa2($total).'h/s': ''; - - $renting = controller()->memcache->get_database_scalar("current_renting-$algo", - "select rent from hashrate where algo=:algo order by time desc limit 1", array(':algo'=>$algo)); - $renting = mbitcoinvaluetoa($renting); - - if($defaultalgo == $algo) - echo ""; - else - echo ""; - - echo "$algo"; - echo "$count1 / $count2"; -// echo "$total"; - echo "$hashrate"; - echo "$hashrate_jobs"; - echo "$percent"; - echo "$available"; -// echo "$price"; - echo "$renting"; - echo ""; + $norm = $item[0]; + $algo = $item[1]; + + $count1 = getdbocount('db_jobs', "algo=:algo and ready and active", array( + ':algo' => $algo + )); + $count2 = getdbocount('db_jobs', "algo=:algo and ready", array( + ':algo' => $algo + )); + + $total = yaamp_pool_rate($algo); + $hashrate = yaamp_pool_rate_rentable($algo); + $hashrate_jobs = yaamp_rented_rate($algo); + + $hashrate = min($total, $hashrate); + $hashrate_jobs = min($hashrate, $hashrate_jobs); + + $available = $hashrate - $hashrate_jobs; + $percent = $hashrate_jobs && $hashrate ? '(' . round($hashrate_jobs / $hashrate * 100, 1) . '%)' : ''; + + $hashrate_jobs = $hashrate_jobs > 0 ? Itoa2($hashrate_jobs) . 'h/s' : ''; + $available = $available > 0 ? Itoa2($available) . 'h/s' : ''; + $hashrate = $hashrate > 0 ? Itoa2($hashrate) . 'h/s' : ''; + $total = $total > 0 ? Itoa2($total) . 'h/s' : ''; + + $renting = controller() + ->memcache + ->get_database_scalar("current_renting-$algo", "select rent from hashrate where algo=:algo order by time desc limit 1", array( + ':algo' => $algo + )); + $renting = mbitcoinvaluetoa($renting); + + if ($defaultalgo == $algo) echo ""; + else echo ""; + + echo "$algo"; + echo "$count1 / $count2"; + // echo "$total"; + echo "$hashrate"; + echo "$hashrate_jobs"; + echo "$percent"; + echo "$available"; + // echo "$price"; + echo "$renting"; + echo ""; } echo ""; @@ -95,9 +105,3 @@ function cmp($a, $b)

    "; echo "

    "; - - - - - - diff --git a/web/yaamp/modules/renting/tx.php b/web/yaamp/modules/renting/tx.php index 28eea68ad..cc21df2a3 100644 --- a/web/yaamp/modules/renting/tx.php +++ b/web/yaamp/modules/renting/tx.php @@ -1,9 +1,8 @@ pageTitle = "$renter->address | yiimp"; @@ -22,44 +21,41 @@ echo ""; $btc = getdbosql('db_coins', "symbol='BTC'"); -if(!$btc) return; +if (!$btc) return; $remote = new WalletRPC($btc); -$ts = $remote->listtransactions(yaamp_renter_account($renter), 10); +$ts = $remote->listtransactions(yaamp_renter_account($renter) , 10); $res_array = array(); -foreach($ts as $val) +foreach ($ts as $val) { - $t = $val['time']; - if($t<$renter->created) continue; - $res_array[$t] = $val; + $t = $val['time']; + if ($t < $renter->created) continue; + $res_array[$t] = $val; } krsort($res_array); $total = 0; -foreach($res_array as $transaction) +foreach ($res_array as $transaction) { - if($transaction['category'] != 'receive') continue; - $d = datetoa2($transaction['time']); + if ($transaction['category'] != 'receive') continue; + $d = datetoa2($transaction['time']); - echo ""; - echo "$d"; - echo "{$transaction['amount']}"; + echo ""; + echo "$d"; + echo "{$transaction['amount']}"; - if(isset($transaction['confirmations'])) - echo "{$transaction['confirmations']}"; - else - echo ""; + if (isset($transaction['confirmations'])) echo "{$transaction['confirmations']}"; + else echo ""; - echo ""; - if(isset($transaction['txid'])) - echo "{$transaction['txid']}"; + echo ""; + if (isset($transaction['txid'])) echo "{$transaction['txid']}"; - echo ""; - echo ""; + echo ""; + echo ""; - $total += $transaction['amount']; + $total += $transaction['amount']; } echo ""; @@ -68,7 +64,3 @@ echo "
    "; echo "
    "; - - - - diff --git a/web/yaamp/modules/site/SiteController.php b/web/yaamp/modules/site/SiteController.php index 80cf6a54c..7f87b6017 100644 --- a/web/yaamp/modules/site/SiteController.php +++ b/web/yaamp/modules/site/SiteController.php @@ -2,1194 +2,1309 @@ class SiteController extends CommonController { - public $defaultAction='index'; - - /////////////////////////////////////////////////// - // Security Note: You can rename this action as you - // want, to customize the admin entrance url... - // - public function actionAdminRights() - { - $client_ip = arraySafeVal($_SERVER,'REMOTE_ADDR'); - $valid = isAdminIP($client_ip); - - if (arraySafeVal($_SERVER,'HTTP_X_FORWARDED_FOR','') != '') { - debuglog("admin access attempt via IP spoofing!"); - $valid = false; - } - - if ($valid) - debuglog("admin connect from $client_ip"); - else - debuglog("admin connect failure from $client_ip"); - - user()->setState('yaamp_admin', $valid); - - $this->redirect("/site/common"); - } - - ///////////////////////////////////////////////// - - public function actionCreate() - { - if(!$this->admin) return; - - $coin = new db_coins; - $coin->txmessage = true; - $coin->created = time(); - $coin->index_avg = 1; - $coin->difficulty = 1; - $coin->installed = 1; - $coin->visible = 1; - - // $coin->deposit_minimum = 1; - $coin->lastblock = ''; - - if(isset($_POST['db_coins'])) - { - $coin->setAttributes($_POST['db_coins'], false); - if($coin->save()) - $this->redirect(array('admin')); - } - - $this->render('coin_form', array('update'=>false, 'coin'=>$coin)); - } - - public function actionUpdate() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - $txfee = $coin->txfee; - - if($coin && isset($_POST['db_coins'])) - { - $coin->setScenario('update'); - $coin->setAttributes($_POST['db_coins'], false); - - if($coin->save()) - { - if($txfee != $coin->txfee) - { - $remote = new WalletRPC($coin); - $remote->settxfee($coin->txfee); - } - $this->redirect(array('coin', 'id'=>$coin->id)); - // $this->goback(); - } - } - - $this->render('coin_form', array('update'=>true, 'coin'=>$coin)); - } - - ///////////////////////////////////////////////// - - public function actionPeers() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if (!$coin) { - $this->goback(); - } - - $this->render('coin_peers', array('coin'=>$coin)); - } - - public function actionPeerRemove() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - $node = getparam('node'); - if ($coin && $node) { - $remote = new WalletRPC($coin); - if ($coin->rpcencoding == 'DCR') { - $res = $remote->node('disconnect', $node); - if (!$res) $res = $remote->node('remove', $node); - $remote->error = false; // ignore - } else { - $res = $remote->addnode($node, 'remove'); - } - if (!$res && $remote->error) { - user()->setFlash('error', "$node ".$remote->error); - } - } - $this->goback(); - } - - public function actionPeerAdd() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - $node = arraySafeVal($_POST, 'node'); - if ($coin && $node) { - $remote = new WalletRPC($coin); - if ($coin->rpcencoding == 'DCR') { - $remote->addnode($node, 'add'); - usleep(500*1000); - $remote->node('connect', $node); - sleep(1); - } else { - $res = $remote->addnode($node, 'add'); - if (!$res) { - user()->setFlash('error', "$node ".$remote->error); - } else { - sleep(1); - } - } - } - $this->goback(); - } - - ///////////////////////////////////////////////// - - public function actionTickets() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if (!$coin) { - $this->goback(); - } - - $this->render('coin_tickets', array('coin'=>$coin)); - } - - public function actionTicketBuy() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - $spendlimit = (double) arraySafeVal($_POST, 'spendlimit'); - $quantity = (int) arraySafeVal($_POST, 'quantity'); - if ($coin && $spendlimit) { - $remote = new WalletRPC($coin); - if ($quantity <= 1) - $res = $remote->purchaseticket($coin->account, $spendlimit); - else - $res = $remote->purchaseticket($coin->account, $spendlimit, 1, $coin->master_wallet, $quantity); - if ($res === false) - user()->setFlash('error', $remote->error); - else - user()->setFlash('message', is_string($res) ? "ticket txid: $res" : json_encode($res)); - } - $this->goback(); - } - - ///////////////////////////////////////////////// - - public function actionBookmarkAdd() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if ($coin) { - $bookmark = new db_bookmarks; - $bookmark->isNewRecord = true; - $bookmark->idcoin = $coin->id; - if (isset($_POST['db_bookmarks'])) { - $bookmark->setAttributes($_POST['db_bookmarks'], false); - if($bookmark->save()) - $this->redirect(array('/site/coin', 'id'=>$coin->id)); - } - $this->render('bookmark', array('bookmark'=>$bookmark, 'coin'=>$coin)); - } else { - $this->goback(); - } - } - - public function actionBookmarkDel() - { - if(!$this->admin) return; - $bookmark = getdbo('db_bookmarks', getiparam('id')); - if ($bookmark) { - $bookmark->delete(); - } - $this->goback(); - } - - public function actionBookmarkEdit() - { - if(!$this->admin) return; - $bookmark = getdbo('db_bookmarks', getiparam('id')); - if($bookmark) { - $coin = getdbo('db_coins', $bookmark->idcoin); - if ($coin && isset($_POST['db_bookmarks'])) { - $bookmark->setAttributes($_POST['db_bookmarks'], false); - if($bookmark->save()) - $this->redirect(array('/site/coin', 'id'=>$coin->id)); - } - $this->render('bookmark', array('bookmark'=>$bookmark, 'coin'=>$coin)); - } else { - user()->setFlash('error', "invalid bookmark"); - $this->goback(); - } - } - - public function actionBookmarkSend() - { - if(!$this->admin) return; - - $bookmark = getdbo('db_bookmarks', getiparam('id')); - if($bookmark) { - $coin = getdbo('db_coins', $bookmark->idcoin); - $amount = getparam('amount'); - - $remote = new WalletRPC($coin); - - $info = $remote->getinfo(); - if(!$info || !$info['balance']) return false; - - $deposit_info = $remote->validateaddress($bookmark->address); - if(!$deposit_info || !isset($deposit_info['isvalid']) || !$deposit_info['isvalid']) { - user()->setFlash('error', "invalid address for {$coin->name}, {$bookmark->address}"); - $this->redirect(array('site/coin', 'id'=>$coin->id)); - } - - $amount = min($amount, $info['balance'] - $info['paytxfee']); - $amount = round($amount, 8); - - $tx = $remote->sendtoaddress($bookmark->address, $amount); - if(!$tx) { - debuglog("unable to send $amount {$coin->symbol} to bookmark {$bookmark->address}"); - debuglog($remote->error); - user()->setFlash('error', $remote->error); - $this->redirect(array('site/coin', 'id'=>$coin->id)); - } else { - debuglog("sent $amount {$coin->symbol} to bookmark {$bookmark->address}"); - $bookmark->lastused = time(); - $bookmark->save(); - BackendUpdatePoolBalances($coin->id); - } - } - - $this->redirect(array('site/coin', 'id'=>$coin->id)); - } - - ///////////////////////////////////////////////// - - public function actionConsole() - { - if(!$this->admin || !YAAMP_ADMIN_WEBCONSOLE) return; - $coin = getdbo('db_coins', getiparam('id')); - if (!$coin) { - $this->goback(); - } - - $this->render('coin_console', array( - 'coin'=>$coin, - 'query'=>arraySafeVal($_POST,'query'), - )); - } - - ///////////////////////////////////////////////// - - public function actionTriggers() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if (!$coin) { - $this->goback(); - } - - $this->render('coin_triggers', array( - 'coin'=>$coin, - )); - } - - public function actionTriggerEnable() - { - if(!$this->admin) return; - $rule = getdbo('db_notifications', getiparam('id')); - if ($rule) { - $rule->enabled = (int) getiparam('en'); - $rule->save(); - } - - $this->goback(); - } - - public function actionTriggerReset() - { - if(!$this->admin) return; - $rule = getdbo('db_notifications', getiparam('id')); - if ($rule) { - $rule->lasttriggered = 0; - $rule->save(); - } - - $this->goback(); - } - - public function actionTriggerDel() - { - if(!$this->admin) return; - $rule = getdbo('db_notifications', getiparam('id')); - if ($rule) { - $rule->delete(); - } - - $this->goback(); - } - - public function actionTriggerAdd() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if (!$coin) { - $this->goback(); - } - - $valid = true; - $rule = new db_notifications; - $rule->idcoin = $coin->id; - $rule->notifytype = $_POST['notifytype']; - $rule->conditiontype = $_POST['conditiontype']; - $rule->conditionvalue = $_POST['conditionvalue']; - $rule->notifycmd = $_POST['notifycmd']; - $rule->description = $_POST['description']; - $rule->enabled = 1; - $rule->lastchecked = 0; // time - $rule->lasttriggered = 0; - - $words = explode(' ', $rule->conditiontype); - if (count($words) < 2) { - user()->setFlash('error', "missing space in condition, sample : 'balance <' 5"); - $valid = false; - } - if ($valid) { - $rule->save(); - } - - $this->goback(); - } - - ///////////////////////////////////////////////// - - public function actionBotnets() - { - if(!$this->admin) return; - - $this->render('botnets'); - } - - ///////////////////////////////////////////////// - - public function actionIndex() - { - if(isset($_GET['address'])) - $this->render('wallet'); - else - $this->render('index'); - } - - public function actionApi() - { - $this->render('api'); - } - - public function actionBenchmarks() - { - $this->render('benchmarks'); - } - - public function actionDiff() - { - $this->render('diff'); - } - - public function actionMultialgo() - { - $this->render('multialgo'); - } - - public function actionMining() - { - $this->render('mining'); - } - - public function actionMiners() - { - $this->render('miners'); - } - - ///////////////////////////////// - - protected function renderPartialAlgoMemcached($partial, $cachetime=15) - { - $algo = user()->getState('yaamp-algo'); - $memcache = controller()->memcache->memcache; - $memkey = $algo.'_'.str_replace('/','_',$partial); - $html = controller()->memcache->get($memkey); - - if (!empty($html)) { - echo $html; - return; - } - - ob_start(); - ob_implicit_flush(false); - $this->renderPartial($partial); - $html = ob_get_clean(); - echo $html; - - controller()->memcache->set($memkey, $html, $cachetime, MEMCACHE_COMPRESSED); - } - - // Pool Status : public right panel with all algos and live stats - public function actionCurrent_results() - { - $this->renderPartialAlgoMemcached('results/current_results', 30); - } - - // Home Tab : Pool Stats (algo) on the bottom right - public function actionHistory_results() - { - $this->renderPartialAlgoMemcached('results/history_results'); - } - - // Pool Tab : Top left panel with estimated profit per coin - public function actionMining_results() - { - if ($this->admin) - $this->renderPartial('results/mining_results'); - else - $this->renderPartialAlgoMemcached('results/mining_results'); - } - - public function actionMiners_results() - { - if ($this->admin) - $this->renderPartial('results/miners_results'); - else - $this->renderPartialAlgoMemcached('results/miners_results'); - } - - // Pool tab: graph algo pool hashrate (json data) - public function actionGraph_hashrate_results() - { - $this->renderPartialAlgoMemcached('results/graph_hashrate_results'); - } - - // Pool tab: graph algo estimate history (json data) - public function actionGraph_price_results() - { - $this->renderPartialAlgoMemcached('results/graph_price_results'); - } - - // Pool tab: last 50 blocks - public function actionFound_results() - { - $this->renderPartialAlgoMemcached('results/found_results'); - } - - public function actionWallet_results() - { - $this->renderPartial('results/wallet_results'); - } - - public function actionWallet_miners_results() - { - $this->renderPartial('results/wallet_miners_results'); - } - - public function actionWallet_graphs_results() - { - $this->renderPartial('results/wallet_graphs_results'); - } - - public function actionGraph_earnings_results() - { - $this->renderPartial('results/graph_earnings_results'); - } - - public function actionUser_earning_results() - { - $this->renderPartial('results/user_earning_results'); - } - - public function actionGraph_user_results() - { - $this->renderPartial('results/graph_user_results'); - } - - public function actionGraph_assets_results() - { - $this->renderPartial('results/graph_assets_results'); - } - - public function actionGraph_negative_results() - { - $this->renderPartial('results/graph_negative_results'); - } - - public function actionGraph_profit_results() - { - $this->renderPartial('results/graph_profit_results'); - } - - public function actionTitle_results() - { - $user = getuserparam(getparam('address')); - if($user) - { - $balance = bitcoinvaluetoa($user->balance); - $coin = getdbo('db_coins', $user->coinid); - - if($coin) - echo "$balance $coin->symbol - ".YAAMP_SITE_NAME; - else - echo "$balance - ".YAAMP_SITE_NAME; - } - else - echo YAAMP_SITE_URL; - } - - ///////////////////////////////////////////////// - - public function actionGraphMarketPrices() - { - if (!$this->admin) return; - $this->renderPartial('results/graph_market_prices', array('id'=> getiparam('id'))); - } - - public function actionGraphMarketBalance() - { - if (!$this->admin) return; - $this->renderPartial('results/graph_market_balance', array('id'=> getiparam('id'))); - } - - ///////////////////////////////////////////////// - - public function actionAbout() - { - $this->render('about'); - } - - public function actionTerms() - { - $this->render('terms'); - } - - ///////////////////////////////////////////////// - - public function actionAdmin() - { - if(!$this->admin) return; - $this->render('admin'); - } - - public function actionAdmin_results() - { - if(!$this->admin) return; - $this->renderPartial('admin_results'); - } - - ///////////////////////////////////////////////// - - public function actionConnections() - { - if(!$this->admin) return; - $this->render('connections'); - } - - public function actionConnections_results() - { - if(!$this->admin) return; - $this->renderPartial('connections_results'); - } - - ///////////////////////////////////////////////// - - public function actionBlock() - { - $this->render('block'); - } - - public function actionBlock_results() - { - $this->renderPartial('block_results'); - } - - ///////////////////////////////////////////////// - - public function actionEarning() - { - if(!$this->admin) return; - $this->render('earning'); - } - - public function actionEarning_results() - { - if(!$this->admin) return; - $this->renderPartial('earning_results'); - } - - // called from the wallet - public function actionClearearnings() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if ($coin) { - BackendClearEarnings($coin->id); - } - $this->goback(); - } - - // called from the earnings page - public function actionClearearning() - { - if(!$this->admin) return; - $earning = getdbo('db_earnings', getiparam('id')); - if ($earning && $earning->status == 0) { - $earning->delete(); - } - $this->goback(); - } - - ///////////////////////////////////////////////// - - public function actionPayments() - { - if(!$this->admin) return; - $this->render('payments'); - } - - public function actionPayments_results() - { - if(!$this->admin) return; - $this->renderPartial('payments_results'); - } - - public function actionCancelUserPayment() - { - if(!$this->admin) return; - $user = getdbo('db_accounts', getiparam('id')); - if ($user) { - BackendUserCancelFailedPayment($user->id); - } - $this->goback(); - } - - public function actionCancelUsersPayment() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if ($coin) { - $amount_failed = 0.0; $cnt = 0; - $time = time() - (48 * 3600); - $failed = getdbolist('db_payouts', "idcoin=:id AND IFNULL(tx,'') = '' AND time>$time", array(':id'=>$coin->id)); - if (!empty($failed)) { - foreach ($failed as $payout) { - $user = getdbo('db_accounts', $payout->account_id); - if ($user) { - $user->balance += floatval($payout->amount); - if ($user->save()) { - $amount_failed += floatval($payout->amount); - $cnt++; - } - } - $payout->delete(); - } - user()->setFlash('message', "Restored $cnt failed txs to user balances, $amount_failed {$coin->symbol}"); - } else { - user()->setFlash('message', 'No failed txs found'); - } - } else { - user()->setFlash('error', 'Invalid coin id!'); - } - $this->goback(); - } - - ///////////////////////////////////////////////// - - public function actionUser() - { - if(!$this->admin) return; - $this->render('user'); - } - - public function actionUser_results() - { - if(!$this->admin) return; - $this->renderPartial('user_results'); - } - - ///////////////////////////////////////////////// - - public function actionWorker() - { - if(!$this->admin) return; - $this->render('worker'); - } - - public function actionWorker_results() - { - if(!$this->admin) return; - $this->renderPartial('worker_results'); - } - - ///////////////////////////////////////////////// - - public function actionVersion() - { - if(!$this->admin) return; - $this->render('version'); - } - - public function actionVersion_results() - { - if(!$this->admin) return; - $this->renderPartial('version_results'); - } - - ///////////////////////////////////////////////// - - public function actionCommon() - { - if(!$this->admin) return; - $this->render('common'); - } - - public function actionCommon_results() - { - if(!$this->admin) return; - $this->renderPartial('common_results'); - } - - ///////////////////////////////////////////////// - - public function actionBalances() - { - if(!$this->admin) return; - $this->render('balances'); - } - - public function actionBalances_results() - { - if(!$this->admin) return; - $this->renderPartial('balances_results'); - } - - public function actionBalanceUpdate() - { - if(!$this->admin) return; - $id = getiparam('market'); - $market = getdbo('db_markets', $id); - if ($market) { - exchange_update_market_by_id($id); - $this->redirect(array('/site/balances', 'exch'=>$market->name)); - } else { - $this->goback(); - } - } - - ///////////////////////////////////////////////// - - public function actionExchange() - { - if(!$this->admin) return; - $this->render('exchange'); - } - - public function actionExchange_results() - { - if(!$this->admin) return; - $this->renderPartial('exchange_results'); - } - - ///////////////////////////////////////////////// - - public function actionCoin() - { - if(!$this->admin) return; - $this->render('coin'); - } - - public function actionCoin_results() - { - if(!$this->admin) return; - $this->renderPartial('coin_results'); - } - - public function actionMemcached() - { - if(!$this->admin) return; - $this->render('memcached'); - } - - public function actionMonsters() - { - if(!$this->admin) return; - $this->render('monsters'); - } - - public function actionEmptyMarkets() - { - if(!$this->admin) return; - $this->render('emptymarkets'); - } - - ////////////////////////////////////////////////////////////////////////////////////// - - public function actionTx() - { - $this->renderPartial('tx'); - } - - ////////////////////////////////////////////////////////////////////////////////////// - - public function actionResetBlockchain() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - $coin->action = 3; - $coin->save(); - - $this->redirect("/site/coin?id=$coin->id"); - } - - ////////////////////////////////////////////////////////////////////////////////////// - - public function actionRestartCoin() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - - $coin->action = 4; - $coin->enable = false; - $coin->auto_ready = false; - $coin->installed = true; - $coin->connections = 0; - $coin->save(); - - $this->redirect('/site/admin'); - // $this->goback(); - } - - public function actionStartCoin() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - - $coin->action = 1; - $coin->enable = true; - $coin->auto_ready = false; - $coin->installed = true; - $coin->connections = 0; - $coin->save(); - - $this->redirect('/site/admin'); - // $this->goback(); - } - - public function actionStopCoin() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - - $coin->action = 2; - $coin->enable = false; - $coin->auto_ready = false; - $coin->connections = 0; - $coin->save(); - - $this->redirect('/site/admin'); - // $this->goback(); - } - - public function actionMakeConfigfile() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - - $coin->action = 5; - $coin->installed = true; - $coin->save(); - - $this->redirect('/site/admin'); - // $this->goback(); - } - - ////////////////////////////////////////////////////////////////////////////////////// - - public function actionSetauto() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - - $coin->auto_ready = true; - $coin->save(); - - $this->redirect('/site/admin'); - // $this->goback(); - } - - public function actionUnsetauto() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - - $coin->auto_ready = false; - $coin->save(); - - $this->redirect('/site/admin'); - // $this->goback(); - } - - ////////////////////////////////////////////////////////////////////////////////////////////////// - - public function actionBanUser() - { - if(!$this->admin) return; - - $user = getdbo('db_accounts', getiparam('id')); - if($user) { - $user->is_locked = true; - $user->balance = 0; - $user->save(); - } - - $this->goback(); - } - - public function actionBlockuser() - { - if(!$this->admin) return; - - $wallet = getparam('wallet'); - $user = getuserparam($wallet); - if($user) { - $user->is_locked = true; - $user->save(); - } - - $this->goback(); - } - - public function actionUnblockuser() - { - if(!$this->admin) return; - - $wallet = getparam('wallet'); - $user = getuserparam($wallet); - if($user) { - $user->is_locked = false; - $user->save(); - } - - $this->goback(); - } - - public function actionLoguser() - { - if(!$this->admin) return; - - $user = getdbo('db_accounts', getiparam('id')); - if($user) { - $user->logtraffic = getiparam('en'); - $user->save(); - } - - $this->goback(); - } - - ////////////////////////////////////////////////////////////////////////////////////////////////// - - // called from the wallet - public function actionPayuserscoin() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if($coin) { - BackendCoinPayments($coin); - } - $this->goback(); - } - - // called from the wallet - public function actionCheckblocks() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if($coin) { - BackendBlockFind1($coin->id); - BackendBlocksUpdate($coin->id); - BackendBlockFind2($coin->id); - BackendUpdatePoolBalances($coin->id); - } - $this->goback(); - } - - //// - - // called from the wallet - public function actionDeleteEarnings() - { - if(!$this->admin) return; - $coin = getdbo('db_coins', getiparam('id')); - if($coin) { - dborun("DELETE FROM earnings WHERE coinid={$coin->id}"); - } - $this->goback(); - } - - // called from the earnings page - public function actionDeleteEarning() - { - if(!$this->admin) return; - $earning = getdbo('db_earnings', getiparam('id')); - if($earning) { - $earning->delete(); - } - $this->goback(); - } - - ////////////////////////////////////////////////////////////////////////////////////////////////// - - public function actionDeleteExchange() - { - if(!$this->admin) return; - $exchange = getdbo('db_exchange', getiparam('id')); - if ($exchange) { - $exchange->status = 'deleted'; - $exchange->price = 0; - $exchange->receive_time = time(); - $exchange->save(); - } - $this->goback(); - } - - public function actionClearMarket() - { - if(!$this->admin) return; - $market = getdbo('db_markets', getiparam('id')); - if($market) { - $market->lastsent = null; - $market->save(); - } - $this->goback(); - } - - // called from the dashboard page - public function actionClearorder() - { - if(!$this->admin) return; - $order = getdbo('db_orders', getiparam('id')); - if ($order) { - $order->delete(); - } - $this->goback(); - } - - public function actionCancelorder() - { - if(!$this->admin) return; - $order = getdbo('db_orders', getiparam('id')); - - cancelExchangeOrder($order); - - $this->goback(); - } - - //////////////////////////////////////////////////////////////////////////////////////// - - public function actionAlgo() - { - $algo = getalgoparam(); - $a = getdbosql('db_algos', "name=:name", array(':name'=>$algo)); - - if($a) - user()->setState('yaamp-algo', $a->name); - else - user()->setState('yaamp-algo', 'all'); - - $route = getparam('r'); - if (!empty($route)) - $this->redirect($route); - else - $this->goback(); - } - - public function actionGomining() - { - $algo = getalgoparam(); - if ($algo == 'all') { - return; - } - user()->setState('yaamp-algo', $algo); - $this->redirect("/site/mining"); - } - - public function actionUpdatePrice() - { - if(!$this->admin) return; - BackendPricesUpdate(); - $this->goback(); - } - - public function actionUninstallCoin() - { - if(!$this->admin) return; - - $coin = getdbo('db_coins', getiparam('id')); - if($coin) - { - // dborun("delete from blocks where coin_id=$coin->id"); - dborun("delete from exchange where coinid=$coin->id"); - dborun("delete from earnings where coinid=$coin->id"); - // dborun("delete from markets where coinid=$coin->id"); - dborun("delete from orders where coinid=$coin->id"); - dborun("delete from shares where coinid=$coin->id"); - - $coin->enable = false; - $coin->installed = false; - $coin->auto_ready = false; - $coin->master_wallet = null; - $coin->mint = 0; - $coin->balance = 0; - $coin->save(); - } - - $this->redirect("/site/admin"); - } - - public function actionOptimize() - { - BackendOptimizeTables(); - $this->goback(); - } - - public function actionRunExchange() - { - if(!$this->admin) return; - - $id = getiparam('id'); - $balance = getdbo('db_balances', $id); - - if($balance) - runExchange($balance->name); - - $tm = round($this->elapsedTime(), 3); - - if ($balance) - debuglog("runexchange done ({$balance->name}) {$tm} sec"); - else - debuglog("runexchange failed (no id!)"); - - $this->redirect("/site/common"); - } - - public function actionEval() - { -// if(!$this->admin) return; - -// $param = getparam('param'); -// if($param) eval($param); -// else $param = ''; - -// $this->render('eval', array('param'=>$param)); - } - - public function actionMainbtc() - { - debuglog(__METHOD__); - setcookie('mainbtc', '1', time()+60*60*24, '/'); - } + public $defaultAction = 'index'; + + /////////////////////////////////////////////////// + // Security Note: You can rename this action as you + // want, to customize the admin entrance url... + // + public function actionAdminRights() + { + $client_ip = arraySafeVal($_SERVER, 'REMOTE_ADDR'); + $valid = isAdminIP($client_ip); + + if (arraySafeVal($_SERVER, 'HTTP_X_FORWARDED_FOR', '') != '') { + debuglog("admin access attempt via IP spoofing!"); + $valid = false; + } + + if ($valid) + debuglog("admin connect from $client_ip"); + else + debuglog("admin connect failure from $client_ip"); + + user()->setState('yaamp_admin', $valid); + + $this->redirect("/site/common"); + } + + ///////////////////////////////////////////////// + + public function actionCreate() + { + if (!$this->admin) + return; + + $coin = new db_coins; + $coin->txmessage = true; + $coin->created = time(); + $coin->index_avg = 1; + $coin->difficulty = 1; + $coin->installed = 1; + $coin->visible = 1; + + // $coin->deposit_minimum = 1; + $coin->lastblock = ''; + + if (isset($_POST['db_coins'])) { + $coin->setAttributes($_POST['db_coins'], false); + if ($coin->save()) + $this->redirect(array( + 'admin' + )); + } + + $this->render('coin_form', array( + 'update' => false, + 'coin' => $coin + )); + } + + public function actionUpdate() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + $txfee = $coin->txfee; + + if ($coin && isset($_POST['db_coins'])) { + $coin->setScenario('update'); + $coin->setAttributes($_POST['db_coins'], false); + + if ($coin->save()) { + if ($txfee != $coin->txfee) { + $remote = new WalletRPC($coin); + $remote->settxfee($coin->txfee); + } + $this->redirect(array( + 'coin', + 'id' => $coin->id + )); + // $this->goback(); + } + } + + $this->render('coin_form', array( + 'update' => true, + 'coin' => $coin + )); + } + + ///////////////////////////////////////////////// + + public function actionPeers() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if (!$coin) { + $this->goback(); + } + + $this->render('coin_peers', array( + 'coin' => $coin + )); + } + + public function actionPeerRemove() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + $node = getparam('node'); + if ($coin && $node) { + $remote = new WalletRPC($coin); + if ($coin->rpcencoding == 'DCR') { + $res = $remote->node('disconnect', $node); + if (!$res) + $res = $remote->node('remove', $node); + $remote->error = false; // ignore + } else { + $res = $remote->addnode($node, 'remove'); + } + if (!$res && $remote->error) { + user()->setFlash('error', "$node " . $remote->error); + } + } + $this->goback(); + } + + public function actionPeerAdd() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + $node = arraySafeVal($_POST, 'node'); + if ($coin && $node) { + $remote = new WalletRPC($coin); + if ($coin->rpcencoding == 'DCR') { + $remote->addnode($node, 'add'); + usleep(500 * 1000); + $remote->node('connect', $node); + sleep(1); + } else { + $res = $remote->addnode($node, 'add'); + if (!$res) { + user()->setFlash('error', "$node " . $remote->error); + } else { + sleep(1); + } + } + } + $this->goback(); + } + + ///////////////////////////////////////////////// + + public function actionTickets() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if (!$coin) { + $this->goback(); + } + + $this->render('coin_tickets', array( + 'coin' => $coin + )); + } + + public function actionTicketBuy() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + $spendlimit = (double) arraySafeVal($_POST, 'spendlimit'); + $quantity = (int) arraySafeVal($_POST, 'quantity'); + if ($coin && $spendlimit) { + $remote = new WalletRPC($coin); + if ($quantity <= 1) + $res = $remote->purchaseticket($coin->account, $spendlimit); + else + $res = $remote->purchaseticket($coin->account, $spendlimit, 1, $coin->master_wallet, $quantity); + if ($res === false) + user()->setFlash('error', $remote->error); + else + user()->setFlash('message', is_string($res) ? "ticket txid: $res" : json_encode($res)); + } + $this->goback(); + } + + ///////////////////////////////////////////////// + + public function actionBookmarkAdd() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if ($coin) { + $bookmark = new db_bookmarks; + $bookmark->isNewRecord = true; + $bookmark->idcoin = $coin->id; + if (isset($_POST['db_bookmarks'])) { + $bookmark->setAttributes($_POST['db_bookmarks'], false); + if ($bookmark->save()) + $this->redirect(array( + '/site/coin', + 'id' => $coin->id + )); + } + $this->render('bookmark', array( + 'bookmark' => $bookmark, + 'coin' => $coin + )); + } else { + $this->goback(); + } + } + + public function actionBookmarkDel() + { + if (!$this->admin) + return; + $bookmark = getdbo('db_bookmarks', getiparam('id')); + if ($bookmark) { + $bookmark->delete(); + } + $this->goback(); + } + + public function actionBookmarkEdit() + { + if (!$this->admin) + return; + $bookmark = getdbo('db_bookmarks', getiparam('id')); + if ($bookmark) { + $coin = getdbo('db_coins', $bookmark->idcoin); + if ($coin && isset($_POST['db_bookmarks'])) { + $bookmark->setAttributes($_POST['db_bookmarks'], false); + if ($bookmark->save()) + $this->redirect(array( + '/site/coin', + 'id' => $coin->id + )); + } + $this->render('bookmark', array( + 'bookmark' => $bookmark, + 'coin' => $coin + )); + } else { + user()->setFlash('error', "invalid bookmark"); + $this->goback(); + } + } + + public function actionBookmarkSend() + { + if (!$this->admin) + return; + + $bookmark = getdbo('db_bookmarks', getiparam('id')); + if ($bookmark) { + $coin = getdbo('db_coins', $bookmark->idcoin); + $amount = getparam('amount'); + + $remote = new WalletRPC($coin); + + $info = $remote->getinfo(); + if (!$info || !$info['balance']) + return false; + + $deposit_info = $remote->validateaddress($bookmark->address); + if (!$deposit_info || !isset($deposit_info['isvalid']) || !$deposit_info['isvalid']) { + user()->setFlash('error', "invalid address for {$coin->name}, {$bookmark->address}"); + $this->redirect(array( + 'site/coin', + 'id' => $coin->id + )); + } + + $amount = min($amount, $info['balance'] - $info['paytxfee']); + $amount = round($amount, 8); + + $tx = $remote->sendtoaddress($bookmark->address, $amount); + if (!$tx) { + debuglog("unable to send $amount {$coin->symbol} to bookmark {$bookmark->address}"); + debuglog($remote->error); + user()->setFlash('error', $remote->error); + $this->redirect(array( + 'site/coin', + 'id' => $coin->id + )); + } else { + debuglog("sent $amount {$coin->symbol} to bookmark {$bookmark->address}"); + $bookmark->lastused = time(); + $bookmark->save(); + BackendUpdatePoolBalances($coin->id); + } + } + + $this->redirect(array( + 'site/coin', + 'id' => $coin->id + )); + } + + ///////////////////////////////////////////////// + + public function actionConsole() + { + if (!$this->admin || !YAAMP_ADMIN_WEBCONSOLE) + return; + $coin = getdbo('db_coins', getiparam('id')); + if (!$coin) { + $this->goback(); + } + + $this->render('coin_console', array( + 'coin' => $coin, + 'query' => arraySafeVal($_POST, 'query') + )); + } + + ///////////////////////////////////////////////// + + public function actionTriggers() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if (!$coin) { + $this->goback(); + } + + $this->render('coin_triggers', array( + 'coin' => $coin + )); + } + + public function actionTriggerEnable() + { + if (!$this->admin) + return; + $rule = getdbo('db_notifications', getiparam('id')); + if ($rule) { + $rule->enabled = (int) getiparam('en'); + $rule->save(); + } + + $this->goback(); + } + + public function actionTriggerReset() + { + if (!$this->admin) + return; + $rule = getdbo('db_notifications', getiparam('id')); + if ($rule) { + $rule->lasttriggered = 0; + $rule->save(); + } + + $this->goback(); + } + + public function actionTriggerDel() + { + if (!$this->admin) + return; + $rule = getdbo('db_notifications', getiparam('id')); + if ($rule) { + $rule->delete(); + } + + $this->goback(); + } + + public function actionTriggerAdd() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if (!$coin) { + $this->goback(); + } + + $valid = true; + $rule = new db_notifications; + $rule->idcoin = $coin->id; + $rule->notifytype = $_POST['notifytype']; + $rule->conditiontype = $_POST['conditiontype']; + $rule->conditionvalue = $_POST['conditionvalue']; + $rule->notifycmd = $_POST['notifycmd']; + $rule->description = $_POST['description']; + $rule->enabled = 1; + $rule->lastchecked = 0; // time + $rule->lasttriggered = 0; + + $words = explode(' ', $rule->conditiontype); + if (count($words) < 2) { + user()->setFlash('error', "missing space in condition, sample : 'balance <' 5"); + $valid = false; + } + if ($valid) { + $rule->save(); + } + + $this->goback(); + } + + ///////////////////////////////////////////////// + + public function actionBotnets() + { + if (!$this->admin) + return; + + $this->render('botnets'); + } + + ///////////////////////////////////////////////// + + public function actionIndex() + { + if (isset($_GET['address'])) + $this->render('wallet'); + else + $this->render('index'); + } + + public function actionApi() + { + $this->render('api'); + } + + public function actionBenchmarks() + { + $this->render('benchmarks'); + } + + public function actionDiff() + { + $this->render('diff'); + } + + public function actionMultialgo() + { + $this->render('multialgo'); + } + + public function actionMining() + { + $this->render('mining'); + } + + public function actionMiners() + { + $this->render('miners'); + } + + ///////////////////////////////// + + protected function renderPartialAlgoMemcached($partial, $cachetime = 15) + { + $algo = user()->getState('yaamp-algo'); + $memcache = controller()->memcache->memcache; + $memkey = $algo . '_' . str_replace('/', '_', $partial); + $html = controller()->memcache->get($memkey); + + if (!empty($html)) { + echo $html; + return; + } + + ob_start(); + ob_implicit_flush(false); + $this->renderPartial($partial); + $html = ob_get_clean(); + echo $html; + + controller()->memcache->set($memkey, $html, $cachetime, MEMCACHE_COMPRESSED); + } + + // Pool Status : public right panel with all algos and live stats + public function actionCurrent_results() + { + $this->renderPartialAlgoMemcached('results/current_results', 30); + } + + // Home Tab : Pool Stats (algo) on the bottom right + public function actionHistory_results() + { + $this->renderPartialAlgoMemcached('results/history_results'); + } + + // Pool Tab : Top left panel with estimated profit per coin + public function actionMining_results() + { + if ($this->admin) + $this->renderPartial('results/mining_results'); + else + $this->renderPartialAlgoMemcached('results/mining_results'); + } + + public function actionMiners_results() + { + if ($this->admin) + $this->renderPartial('results/miners_results'); + else + $this->renderPartialAlgoMemcached('results/miners_results'); + } + + // Pool tab: graph algo pool hashrate (json data) + public function actionGraph_hashrate_results() + { + $this->renderPartialAlgoMemcached('results/graph_hashrate_results'); + } + + // Pool tab: graph algo estimate history (json data) + public function actionGraph_price_results() + { + $this->renderPartialAlgoMemcached('results/graph_price_results'); + } + + // Pool tab: last 50 blocks + public function actionFound_results() + { + $this->renderPartialAlgoMemcached('results/found_results'); + } + + public function actionWallet_results() + { + $this->renderPartial('results/wallet_results'); + } + + public function actionWallet_miners_results() + { + $this->renderPartial('results/wallet_miners_results'); + } + + public function actionWallet_graphs_results() + { + $this->renderPartial('results/wallet_graphs_results'); + } + + public function actionGraph_earnings_results() + { + $this->renderPartial('results/graph_earnings_results'); + } + + public function actionUser_earning_results() + { + $this->renderPartial('results/user_earning_results'); + } + + public function actionGraph_user_results() + { + $this->renderPartial('results/graph_user_results'); + } + + public function actionGraph_assets_results() + { + $this->renderPartial('results/graph_assets_results'); + } + + public function actionGraph_negative_results() + { + $this->renderPartial('results/graph_negative_results'); + } + + public function actionGraph_profit_results() + { + $this->renderPartial('results/graph_profit_results'); + } + + public function actionTitle_results() + { + $user = getuserparam(getparam('address')); + if ($user) { + $balance = bitcoinvaluetoa($user->balance); + $coin = getdbo('db_coins', $user->coinid); + + if ($coin) + echo "$balance $coin->symbol - " . YAAMP_SITE_NAME; + else + echo "$balance - " . YAAMP_SITE_NAME; + } else + echo YAAMP_SITE_URL; + } + + ///////////////////////////////////////////////// + + public function actionGraphMarketPrices() + { + if (!$this->admin) + return; + $this->renderPartial('results/graph_market_prices', array( + 'id' => getiparam('id') + )); + } + + public function actionGraphMarketBalance() + { + if (!$this->admin) + return; + $this->renderPartial('results/graph_market_balance', array( + 'id' => getiparam('id') + )); + } + + ///////////////////////////////////////////////// + + public function actionAbout() + { + $this->render('about'); + } + + public function actionTerms() + { + $this->render('terms'); + } + + ///////////////////////////////////////////////// + + public function actionAdmin() + { + if (!$this->admin) + return; + $this->render('admin'); + } + + public function actionAdmin_results() + { + if (!$this->admin) + return; + $this->renderPartial('admin_results'); + } + + ///////////////////////////////////////////////// + + public function actionConnections() + { + if (!$this->admin) + return; + $this->render('connections'); + } + + public function actionConnections_results() + { + if (!$this->admin) + return; + $this->renderPartial('connections_results'); + } + + ///////////////////////////////////////////////// + + public function actionBlock() + { + $this->render('block'); + } + + public function actionBlock_results() + { + $this->renderPartial('block_results'); + } + + ///////////////////////////////////////////////// + + public function actionEarning() + { + if (!$this->admin) + return; + $this->render('earning'); + } + + public function actionEarning_results() + { + if (!$this->admin) + return; + $this->renderPartial('earning_results'); + } + + // called from the wallet + public function actionClearearnings() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if ($coin) { + BackendClearEarnings($coin->id); + } + $this->goback(); + } + + // called from the earnings page + public function actionClearearning() + { + if (!$this->admin) + return; + $earning = getdbo('db_earnings', getiparam('id')); + if ($earning && $earning->status == 0) { + $earning->delete(); + } + $this->goback(); + } + + ///////////////////////////////////////////////// + + public function actionPayments() + { + if (!$this->admin) + return; + $this->render('payments'); + } + + public function actionPayments_results() + { + if (!$this->admin) + return; + $this->renderPartial('payments_results'); + } + + public function actionCancelUserPayment() + { + if (!$this->admin) + return; + $user = getdbo('db_accounts', getiparam('id')); + if ($user) { + BackendUserCancelFailedPayment($user->id); + } + $this->goback(); + } + + public function actionCancelUsersPayment() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if ($coin) { + $amount_failed = 0.0; + $cnt = 0; + $time = time() - (48 * 3600); + $failed = getdbolist('db_payouts', "idcoin=:id AND IFNULL(tx,'') = '' AND time>$time", array( + ':id' => $coin->id + )); + if (!empty($failed)) { + foreach ($failed as $payout) { + $user = getdbo('db_accounts', $payout->account_id); + if ($user) { + $user->balance += floatval($payout->amount); + if ($user->save()) { + $amount_failed += floatval($payout->amount); + $cnt++; + } + } + $payout->delete(); + } + user()->setFlash('message', "Restored $cnt failed txs to user balances, $amount_failed {$coin->symbol}"); + } else { + user()->setFlash('message', 'No failed txs found'); + } + } else { + user()->setFlash('error', 'Invalid coin id!'); + } + $this->goback(); + } + + ///////////////////////////////////////////////// + + public function actionUser() + { + if (!$this->admin) + return; + $this->render('user'); + } + + public function actionUser_results() + { + if (!$this->admin) + return; + $this->renderPartial('user_results'); + } + + ///////////////////////////////////////////////// + + public function actionWorker() + { + if (!$this->admin) + return; + $this->render('worker'); + } + + public function actionWorker_results() + { + if (!$this->admin) + return; + $this->renderPartial('worker_results'); + } + + ///////////////////////////////////////////////// + + public function actionVersion() + { + if (!$this->admin) + return; + $this->render('version'); + } + + public function actionVersion_results() + { + if (!$this->admin) + return; + $this->renderPartial('version_results'); + } + + ///////////////////////////////////////////////// + + public function actionCommon() + { + if (!$this->admin) + return; + $this->render('common'); + } + + public function actionCommon_results() + { + if (!$this->admin) + return; + $this->renderPartial('common_results'); + } + + ///////////////////////////////////////////////// + + public function actionBalances() + { + if (!$this->admin) + return; + $this->render('balances'); + } + + public function actionBalances_results() + { + if (!$this->admin) + return; + $this->renderPartial('balances_results'); + } + + public function actionBalanceUpdate() + { + if (!$this->admin) + return; + $id = getiparam('market'); + $market = getdbo('db_markets', $id); + if ($market) { + exchange_update_market_by_id($id); + $this->redirect(array( + '/site/balances', + 'exch' => $market->name + )); + } else { + $this->goback(); + } + } + + ///////////////////////////////////////////////// + + public function actionExchange() + { + if (!$this->admin) + return; + $this->render('exchange'); + } + + public function actionExchange_results() + { + if (!$this->admin) + return; + $this->renderPartial('exchange_results'); + } + + ///////////////////////////////////////////////// + + public function actionCoin() + { + if (!$this->admin) + return; + $this->render('coin'); + } + + public function actionCoin_results() + { + if (!$this->admin) + return; + $this->renderPartial('coin_results'); + } + + public function actionMemcached() + { + if (!$this->admin) + return; + $this->render('memcached'); + } + + public function actionMonsters() + { + if (!$this->admin) + return; + $this->render('monsters'); + } + + public function actionEmptyMarkets() + { + if (!$this->admin) + return; + $this->render('emptymarkets'); + } + + ////////////////////////////////////////////////////////////////////////////////////// + + public function actionTx() + { + $this->renderPartial('tx'); + } + + ////////////////////////////////////////////////////////////////////////////////////// + + public function actionResetBlockchain() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + $coin->action = 3; + $coin->save(); + + $this->redirect("/site/coin?id=$coin->id"); + } + + ////////////////////////////////////////////////////////////////////////////////////// + + public function actionRestartCoin() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + + $coin->action = 4; + $coin->enable = false; + $coin->auto_ready = false; + $coin->installed = true; + $coin->connections = 0; + $coin->save(); + + $this->redirect('/site/admin'); + // $this->goback(); + } + + public function actionStartCoin() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + + $coin->action = 1; + $coin->enable = true; + $coin->auto_ready = false; + $coin->installed = true; + $coin->connections = 0; + $coin->save(); + + $this->redirect('/site/admin'); + // $this->goback(); + } + + public function actionStopCoin() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + + $coin->action = 2; + $coin->enable = false; + $coin->auto_ready = false; + $coin->connections = 0; + $coin->save(); + + $this->redirect('/site/admin'); + // $this->goback(); + } + + public function actionMakeConfigfile() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + + $coin->action = 5; + $coin->installed = true; + $coin->save(); + + $this->redirect('/site/admin'); + // $this->goback(); + } + + ////////////////////////////////////////////////////////////////////////////////////// + + public function actionSetauto() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + + $coin->auto_ready = true; + $coin->save(); + + $this->redirect('/site/admin'); + // $this->goback(); + } + + public function actionUnsetauto() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + + $coin->auto_ready = false; + $coin->save(); + + $this->redirect('/site/admin'); + // $this->goback(); + } + + ////////////////////////////////////////////////////////////////////////////////////////////////// + + public function actionBanUser() + { + if (!$this->admin) + return; + + $user = getdbo('db_accounts', getiparam('id')); + if ($user) { + $user->is_locked = true; + $user->balance = 0; + $user->save(); + } + + $this->goback(); + } + + public function actionBlockuser() + { + if (!$this->admin) + return; + + $wallet = getparam('wallet'); + $user = getuserparam($wallet); + if ($user) { + $user->is_locked = true; + $user->save(); + } + + $this->goback(); + } + + public function actionUnblockuser() + { + if (!$this->admin) + return; + + $wallet = getparam('wallet'); + $user = getuserparam($wallet); + if ($user) { + $user->is_locked = false; + $user->save(); + } + + $this->goback(); + } + + public function actionLoguser() + { + if (!$this->admin) + return; + + $user = getdbo('db_accounts', getiparam('id')); + if ($user) { + $user->logtraffic = getiparam('en'); + $user->save(); + } + + $this->goback(); + } + + ////////////////////////////////////////////////////////////////////////////////////////////////// + + // called from the wallet + public function actionPayuserscoin() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if ($coin) { + BackendCoinPayments($coin); + } + $this->goback(); + } + + // called from the wallet + public function actionCheckblocks() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if ($coin) { + BackendBlockFind1($coin->id); + BackendBlocksUpdate($coin->id); + BackendBlockFind2($coin->id); + BackendUpdatePoolBalances($coin->id); + } + $this->goback(); + } + + //// + + // called from the wallet + public function actionDeleteEarnings() + { + if (!$this->admin) + return; + $coin = getdbo('db_coins', getiparam('id')); + if ($coin) { + dborun("DELETE FROM earnings WHERE coinid={$coin->id}"); + } + $this->goback(); + } + + // called from the earnings page + public function actionDeleteEarning() + { + if (!$this->admin) + return; + $earning = getdbo('db_earnings', getiparam('id')); + if ($earning) { + $earning->delete(); + } + $this->goback(); + } + + ////////////////////////////////////////////////////////////////////////////////////////////////// + + public function actionDeleteExchange() + { + if (!$this->admin) + return; + $exchange = getdbo('db_exchange', getiparam('id')); + if ($exchange) { + $exchange->status = 'deleted'; + $exchange->price = 0; + $exchange->receive_time = time(); + $exchange->save(); + } + $this->goback(); + } + + public function actionClearMarket() + { + if (!$this->admin) + return; + $market = getdbo('db_markets', getiparam('id')); + if ($market) { + $market->lastsent = null; + $market->save(); + } + $this->goback(); + } + + // called from the dashboard page + public function actionClearorder() + { + if (!$this->admin) + return; + $order = getdbo('db_orders', getiparam('id')); + if ($order) { + $order->delete(); + } + $this->goback(); + } + + public function actionCancelorder() + { + if (!$this->admin) + return; + $order = getdbo('db_orders', getiparam('id')); + + cancelExchangeOrder($order); + + $this->goback(); + } + + //////////////////////////////////////////////////////////////////////////////////////// + + public function actionAlgo() + { + $algo = getalgoparam(); + $a = getdbosql('db_algos', "name=:name", array( + ':name' => $algo + )); + + if ($a) + user()->setState('yaamp-algo', $a->name); + else + user()->setState('yaamp-algo', 'all'); + + $route = getparam('r'); + if (!empty($route)) + $this->redirect($route); + else + $this->goback(); + } + + public function actionGomining() + { + $algo = getalgoparam(); + if ($algo == 'all') { + return; + } + user()->setState('yaamp-algo', $algo); + $this->redirect("/site/mining"); + } + + public function actionUpdatePrice() + { + if (!$this->admin) + return; + BackendPricesUpdate(); + $this->goback(); + } + + public function actionUninstallCoin() + { + if (!$this->admin) + return; + + $coin = getdbo('db_coins', getiparam('id')); + if ($coin) { + // dborun("delete from blocks where coin_id=$coin->id"); + dborun("delete from exchange where coinid=$coin->id"); + dborun("delete from earnings where coinid=$coin->id"); + // dborun("delete from markets where coinid=$coin->id"); + dborun("delete from orders where coinid=$coin->id"); + dborun("delete from shares where coinid=$coin->id"); + + $coin->enable = false; + $coin->installed = false; + $coin->auto_ready = false; + $coin->master_wallet = null; + $coin->mint = 0; + $coin->balance = 0; + $coin->save(); + } + + $this->redirect("/site/admin"); + } + + public function actionOptimize() + { + BackendOptimizeTables(); + $this->goback(); + } + + public function actionRunExchange() + { + if (!$this->admin) + return; + + $id = getiparam('id'); + $balance = getdbo('db_balances', $id); + + if ($balance) + runExchange($balance->name); + + $tm = round($this->elapsedTime(), 3); + + if ($balance) + debuglog("runexchange done ({$balance->name}) {$tm} sec"); + else + debuglog("runexchange failed (no id!)"); + + $this->redirect("/site/common"); + } + + public function actionEval() + { + // if(!$this->admin) return; + + // $param = getparam('param'); + // if($param) eval($param); + // else $param = ''; + + // $this->render('eval', array('param'=>$param)); + } + + public function actionMainbtc() + { + debuglog(__METHOD__); + setcookie('mainbtc', '1', time() + 60 * 60 * 24, '/'); + } } diff --git a/web/yaamp/modules/site/admin.php b/web/yaamp/modules/site/admin.php index 92620c64b..911945697 100644 --- a/web/yaamp/modules/site/admin.php +++ b/web/yaamp/modules/site/admin.php @@ -17,8 +17,8 @@ end; $serverlist = dbolist("SELECT DISTINCT rpchost FROM coins WHERE installed=1 ORDER BY rpchost"); -foreach ($serverlist as $srv) { - echo ''; +foreach ($serverlist as $srv) { + echo ''; } echo << end; - - diff --git a/web/yaamp/modules/site/admin_results.php b/web/yaamp/modules/site/admin_results.php index 4d253081a..412177039 100644 --- a/web/yaamp/modules/site/admin_results.php +++ b/web/yaamp/modules/site/admin_results.php @@ -1,11 +1,12 @@ ${1}', $html); - return $html; +function valuetocell($amount) +{ + $html = $amount ? bitcoinvaluetoa($amount) : '-'; + //$html = rtrim($html,'0'); + //$html = rtrim($html,'.'); + $html = preg_replace('/([0]+)$/', '${1}', $html); + return $html; } ///////////////////////////////////////////////////////////////////////////////////// @@ -25,12 +26,12 @@ function valuetocell($amount) { tableClass: "dataGrid", widgets: ["zebra","filter","Storage","saveSort"], widgetOptions: { - saveSort: true, - filter_saveFilters: true, - filter_external: ".search", - filter_columnFilters: false, - filter_childRows : true, - filter_ignoreCase: true + saveSort: true, + filter_saveFilters: true, + filter_external: ".search", + filter_columnFilters: false, + filter_childRows : true, + filter_ignoreCase: true }}'); echo <<$server)); -} -else - $coins = getdbolist('db_coins', "(installed OR enable OR watch) ORDER BY algo, index_avg DESC"); +if (!empty($server)) { + $coins = getdbolist('db_coins', "(installed OR enable OR watch) AND rpchost=:server ORDER BY algo, index_avg DESC", array( + ':server' => $server + )); +} else + $coins = getdbolist('db_coins', "(installed OR enable OR watch) ORDER BY algo, index_avg DESC"); $mining = getdbosql('db_mining'); -foreach($coins as $coin) -{ - echo ''; - - $lowsymbol = strtolower($coin->symbol); - echo ''; - - $algo_color = getAlgoColors($coin->algo); - echo ''; - - if(!$coin->enable) echo ''; - else if($coin->auto_ready) echo 'A'; - else echo 'D'; - - if($coin->visible) echo 'V'; - else echo 'H'; - - if($coin->auxpow) echo 'X'; - else echo ' '; - - echo '
    '; - - if($coin->rpccurl) echo 'C'; - else echo ' '; - - if($coin->rpcssl) echo 'S'; - else echo ' '; - - if($coin->watch) echo 'W'; - else echo ' '; - - if($coin->block_height < $coin->target_height) { - $percent = round($coin->block_height*100/$coin->target_height, 1); - echo '
    '.$percent.'%'; - } - - echo ""; - $version = formatWalletVersion($coin); - if (!empty($coin->symbol2)) $version .= " ({$coin->symbol2})"; - - echo "$coin->name ($coin->symbol) -
    $version"; - - echo "$coin->rpchost:$coin->rpcport"; - if($coin->connections) echo " ($coin->connections)"; - echo "
    $coin->rpcencoding   ($coin->algo)  "; - - $difficulty = Itoa2($coin->difficulty, 3); - if ($difficulty > 1e20) $difficulty = ' '; - - if(!empty($coin->errors)) - echo ''.$difficulty.'
    '.$coin->block_height.''; - else - echo ''.$difficulty.'
    '.$coin->block_height.''; - - $btcmhd = yaamp_profitability($coin); - $btcmhd = mbitcoinvaluetoa($btcmhd); - - $h = $coin->block_height-100; - $ss1 = dboscalar("SELECT count(*) FROM blocks WHERE coin_id={$coin->id} AND height>=$h AND category!='orphan'"); - $ss2 = dboscalar("SELECT count(*) FROM blocks WHERE coin_id={$coin->id} AND height>=$h AND category='orphan'"); - - $percent_pool1 = $ss1? $ss1.'%': ''; - $percent_pool2 = $ss2? $ss2.'%': ''; - -// $network_ttf = $coin->network_ttf? sectoa($coin->network_ttf): ''; -// $actual_ttf = $coin->actual_ttf? sectoa($coin->actual_ttf): ''; -// $pool_ttf = $coin->pool_ttf? sectoa($coin->pool_ttf): ''; -// echo "$network_ttf
    $actual_ttf"; -// echo "$pool_ttf
    "; - - echo ''; - if($ss1 > 50) - echo ''.$btcmhd.'
    '.$percent_pool1.''; - else - echo ''.$btcmhd.'
    '.$percent_pool1; - echo ' '.$percent_pool2.''; - - $price = bitcoinvaluetoa($coin->price); - $price2 = bitcoinvaluetoa($coin->price2); - - if($coin->dontsell && YAAMP_ALLOW_EXCHANGE) - echo "$price
    $price2"; - else - echo "$price
    $price2"; - -// $stakebtc = bitcoinvaluetoa($coin->stake*$coin->price); -// if ($coin->stake) -// echo ''.$coin->stake.'
    '.$stakebtc.''; -// else -// echo ''; - - $cell = valuetocell($coin->mint).'
    '.valuetocell($coin->cleared); - - if($coin->balance+$coin->mint < $coin->cleared) - echo ''.$cell.''; - else - echo ''.$cell.''; - - $cell = valuetocell($coin->balance).'
    '.valuetocell($coin->available); - echo ''.$cell.''; - - $btc = bitcoinvaluetoa($coin->balance * $coin->price); - $available = bitcoinvaluetoa($coin->available * $coin->price); - echo ''.$btc.'
    '.$available.''; - - $fiat = round($coin->balance * $coin->price * $mining->usdbtc, 2). ' $'; - $available = round($coin->available * $coin->price * $mining->usdbtc, 2). ' $'; - echo ''.$fiat.'
    '.$available.''; - - $marketname = ''; - $bestmarket = getBestMarket($coin); - if($bestmarket) $marketname = $bestmarket->name; - - echo "$coin->reward
    $marketname"; - - echo ""; +foreach ($coins as $coin) { + echo ''; + + $lowsymbol = strtolower($coin->symbol); + echo ''; + + $algo_color = getAlgoColors($coin->algo); + echo ''; + + if (!$coin->enable) + echo ''; + else if ($coin->auto_ready) + echo 'A'; + else + echo 'D'; + + if ($coin->visible) + echo 'V'; + else + echo 'H'; + + if ($coin->auxpow) + echo 'X'; + else + echo ' '; + + echo '
    '; + + if ($coin->rpccurl) + echo 'C'; + else + echo ' '; + + if ($coin->rpcssl) + echo 'S'; + else + echo ' '; + + if ($coin->watch) + echo 'W'; + else + echo ' '; + + if ($coin->block_height < $coin->target_height) { + $percent = round($coin->block_height * 100 / $coin->target_height, 1); + echo '
    ' . $percent . '%'; + } + + echo ""; + $version = formatWalletVersion($coin); + if (!empty($coin->symbol2)) + $version .= " ({$coin->symbol2})"; + + echo "$coin->name ($coin->symbol) +
    $version"; + + echo "$coin->rpchost:$coin->rpcport"; + if ($coin->connections) + echo " ($coin->connections)"; + echo "
    $coin->rpcencoding   ($coin->algo)  "; + + $difficulty = Itoa2($coin->difficulty, 3); + if ($difficulty > 1e20) + $difficulty = ' '; + + if (!empty($coin->errors)) + echo '' . $difficulty . '
    ' . $coin->block_height . ''; + else + echo '' . $difficulty . '
    ' . $coin->block_height . ''; + + $btcmhd = yaamp_profitability($coin); + $btcmhd = mbitcoinvaluetoa($btcmhd); + + $h = $coin->block_height - 100; + $ss1 = dboscalar("SELECT count(*) FROM blocks WHERE coin_id={$coin->id} AND height>=$h AND category!='orphan'"); + $ss2 = dboscalar("SELECT count(*) FROM blocks WHERE coin_id={$coin->id} AND height>=$h AND category='orphan'"); + + $percent_pool1 = $ss1 ? $ss1 . '%' : ''; + $percent_pool2 = $ss2 ? $ss2 . '%' : ''; + + // $network_ttf = $coin->network_ttf? sectoa($coin->network_ttf): ''; + // $actual_ttf = $coin->actual_ttf? sectoa($coin->actual_ttf): ''; + // $pool_ttf = $coin->pool_ttf? sectoa($coin->pool_ttf): ''; + // echo "$network_ttf
    $actual_ttf"; + // echo "$pool_ttf
    "; + + echo ''; + if ($ss1 > 50) + echo '' . $btcmhd . '
    ' . $percent_pool1 . ''; + else + echo '' . $btcmhd . '
    ' . $percent_pool1; + echo ' ' . $percent_pool2 . ''; + + $price = bitcoinvaluetoa($coin->price); + $price2 = bitcoinvaluetoa($coin->price2); + + if ($coin->dontsell && YAAMP_ALLOW_EXCHANGE) + echo "$price
    $price2"; + else + echo "$price
    $price2"; + + // $stakebtc = bitcoinvaluetoa($coin->stake*$coin->price); + // if ($coin->stake) + // echo ''.$coin->stake.'
    '.$stakebtc.''; + // else + // echo ''; + + $cell = valuetocell($coin->mint) . '
    ' . valuetocell($coin->cleared); + + if ($coin->balance + $coin->mint < $coin->cleared) + echo '' . $cell . ''; + else + echo '' . $cell . ''; + + $cell = valuetocell($coin->balance) . '
    ' . valuetocell($coin->available); + echo '' . $cell . ''; + + $btc = bitcoinvaluetoa($coin->balance * $coin->price); + $available = bitcoinvaluetoa($coin->available * $coin->price); + echo '' . $btc . '
    ' . $available . ''; + + $fiat = round($coin->balance * $coin->price * $mining->usdbtc, 2) . ' $'; + $available = round($coin->available * $coin->price * $mining->usdbtc, 2) . ' $'; + echo '' . $fiat . '
    ' . $available . ''; + + $marketname = ''; + $bestmarket = getBestMarket($coin); + if ($bestmarket) + $marketname = $bestmarket->name; + + echo "$coin->reward
    $marketname"; + + echo ""; } $total = count($coins); echo ''; -echo ''.$total.' wallets'; +echo '' . $total . ' wallets'; echo ''; ////////////////////////////////////////// echo "
    "; - - - - - - - - - - - - - diff --git a/web/yaamp/modules/site/api.php b/web/yaamp/modules/site/api.php index 01c4f8bc2..12a041e6d 100644 --- a/web/yaamp/modules/site/api.php +++ b/web/yaamp/modules/site/api.php @@ -10,7 +10,7 @@ request:

    - http:///api/wallet?address=WALLET_ADDRESS

    + http:///api/wallet?address=WALLET_ADDRESS

    result:
    @@ -25,7 +25,7 @@
     
     request:
     

    - http:///api/walletEx?address=WALLET_ADDRESS

    + http:///api/walletEx?address=WALLET_ADDRESS

    result:
    @@ -45,24 +45,25 @@
     		"accepted": 82463372.083,
     		"rejected": 0
     	}]
    -
    +
     	,"payouts":[{
     		"time": 1529860641,
     		"amount": "0.001",
     		"tx": "transaction_id_of_the_payout"
     	}]
    -
    +
     }
     

    Pool Status

    request:

    - http:///api/status

    + http:///api/status

    result:
    @@ -88,7 +89,8 @@
     
     request:
     

    - http:///api/currencies

    + http:///api/currencies

    result:
    @@ -111,13 +113,14 @@
     }
     
    - +

    Rental Status

    request:

    - http:///api/rental?key=API_KEY

    + http:///api/rental?key=API_KEY

    result:
    @@ -154,7 +157,8 @@
     
     request:
     

    - http:///api/rental_price?key=API_KEY&jobid=xx&price=xx

    + http:///api/rental_price?key=API_KEY&jobid=xx&price=xx

    @@ -164,7 +168,8 @@ request:

    - http:///api/rental_hashrate?key=API_KEY&jobid=xx&hashrate=xx

    + http:///api/rental_hashrate?key=API_KEY&jobid=xx&hashrate=xx

    @@ -172,7 +177,8 @@ request:

    - http:///api/rental_start?key=API_KEY&jobid=xx

    + http:///api/rental_start?key=API_KEY&jobid=xx

    @@ -180,11 +186,13 @@ request:

    - http:///api/rental_stop?key=API_KEY&jobid=xx

    + http:///api/rental_stop?key=API_KEY&jobid=xx

    - +

    @@ -199,5 +207,3 @@ - - diff --git a/web/yaamp/modules/site/balances.php b/web/yaamp/modules/site/balances.php index 6facf77c8..2d561bdfd 100644 --- a/web/yaamp/modules/site/balances.php +++ b/web/yaamp/modules/site/balances.php @@ -1,5 +1,4 @@ '; + var url = '/site/balances_results?exch='; clearTimeout(main_timeout); $.get(url, '', main_ready).error(main_error); } @@ -43,5 +42,6 @@ function main_refresh() clientScript->registerScript('init', 'main_refresh();', CClientScript::POS_READY); \ No newline at end of file +app() + ->clientScript + ->registerScript('init', 'main_refresh();', CClientScript::POS_READY); diff --git a/web/yaamp/modules/site/balances_results.php b/web/yaamp/modules/site/balances_results.php index 452d39077..d6dfde540 100644 --- a/web/yaamp/modules/site/balances_results.php +++ b/web/yaamp/modules/site/balances_results.php @@ -1,9 +1,11 @@ $exch)); +$markets = getdbolist('db_markets', "name=:exch ORDER BY ((balance+ontrade)*price) DESC", array( + ':exch' => $exch +)); ////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -41,59 +43,66 @@ $totals_trade = $totals = $totals_usd = 0; $outdated = time() - 24 * 3600; -$symbols = array(); - -foreach($markets as $market) -{ - if ($market->pricetime == 0) continue; - $balance = $market->balance; - $balance += $market->ontrade; - if ($balance*$market->price2 < 200*1e-8) continue; - - $coin = getdbo('db_coins', $market->coinid); - $coinimg = CHtml::image($coin->image, $coin->symbol, array('width'=>'16')); - $symbol = $coin->symbol; - if (!empty($coin->symbol2)) $symbol = $coin->symbol2; - - if (arraySafeVal($symbols, $symbol)) continue; // prevent dups - $symbols[$symbol] = 1; - - $marketurl = getMarketUrl($coin, $market->name); - - echo ""; - - $btime = $market->balancetime ? datetoa2($market->balancetime). ' ago' : 'never'; - $ptime = $market->pricetime ? datetoa2($market->pricetime). ' ago' : 'never'; - $price = $market->price? bitcoinvaluetoa($market->price): bitcoinvaluetoa($coin->price); - $price2 = $market->price2? bitcoinvaluetoa($market->price2): bitcoinvaluetoa($coin->price2); - $ontrade= $market->ontrade ? $market->ontrade : '-'; - $total = bitcoinvaluetoa($balance*$price); - $total_usd = round($balance*$price * $mining->usdbtc,2); - - $tdclass = $market->disabled ? 'disabled' : ''; - - echo ''.$coinimg.''; - echo ''.$symbol.""; - echo ''.$market->name.''; - echo ''.$price.''; - echo ''.$price2.''; - echo ''.$ptime.''; - echo ''.$ontrade.''; - echo ''.$balance.''; - echo $total>0.1? "$total": "$total"; - echo $total>0.1? "$total_usd": ''.sprintf('%.2f',$total_usd).''; - echo ''.$btime.''; - echo ''.$market->deposit_address.''; - $disabled = $market->disabled > 0 ? 'market disabled ('.$market->disabled.')' : 'OK'; - if (!$coin->enable) $disabled = "coin disabled"; - echo ''.$disabled.''; - - echo 'update ticker'; - - $totals_trade += $market->ontrade*$price; - $totals += $total; $totals_usd += $total_usd; - - echo ""; +$symbols = array(); + +foreach ($markets as $market) { + if ($market->pricetime == 0) + continue; + $balance = $market->balance; + $balance += $market->ontrade; + if ($balance * $market->price2 < 200 * 1e-8) + continue; + + $coin = getdbo('db_coins', $market->coinid); + $coinimg = CHtml::image($coin->image, $coin->symbol, array( + 'width' => '16' + )); + $symbol = $coin->symbol; + if (!empty($coin->symbol2)) + $symbol = $coin->symbol2; + + if (arraySafeVal($symbols, $symbol)) + continue; // prevent dups + $symbols[$symbol] = 1; + + $marketurl = getMarketUrl($coin, $market->name); + + echo ""; + + $btime = $market->balancetime ? datetoa2($market->balancetime) . ' ago' : 'never'; + $ptime = $market->pricetime ? datetoa2($market->pricetime) . ' ago' : 'never'; + $price = $market->price ? bitcoinvaluetoa($market->price) : bitcoinvaluetoa($coin->price); + $price2 = $market->price2 ? bitcoinvaluetoa($market->price2) : bitcoinvaluetoa($coin->price2); + $ontrade = $market->ontrade ? $market->ontrade : '-'; + $total = bitcoinvaluetoa($balance * $price); + $total_usd = round($balance * $price * $mining->usdbtc, 2); + + $tdclass = $market->disabled ? 'disabled' : ''; + + echo '' . $coinimg . ''; + echo '' . $symbol . ""; + echo '' . $market->name . ''; + echo '' . $price . ''; + echo '' . $price2 . ''; + echo '' . $ptime . ''; + echo '' . $ontrade . ''; + echo '' . $balance . ''; + echo $total > 0.1 ? "$total" : "$total"; + echo $total > 0.1 ? "$total_usd" : '' . sprintf('%.2f', $total_usd) . ''; + echo '' . $btime . ''; + echo '' . $market->deposit_address . ''; + $disabled = $market->disabled > 0 ? 'market disabled (' . $market->disabled . ')' : 'OK'; + if (!$coin->enable) + $disabled = "coin disabled"; + echo '' . $disabled . ''; + + echo 'update ticker'; + + $totals_trade += $market->ontrade * $price; + $totals += $total; + $totals_usd += $total_usd; + + echo ""; } echo ""; @@ -101,8 +110,8 @@ echo ''; echo 'Total'; -echo ''.bitcoinvaluetoa($totals).''; -echo ''.round($totals_usd,2).''; +echo '' . bitcoinvaluetoa($totals) . ''; +echo '' . round($totals_usd, 2) . ''; echo ''; echo ''; echo ''; diff --git a/web/yaamp/modules/site/benchmarks.php b/web/yaamp/modules/site/benchmarks.php index 13f7b66de..77992ddbb 100644 --- a/web/yaamp/modules/site/benchmarks.php +++ b/web/yaamp/modules/site/benchmarks.php @@ -7,7 +7,7 @@

    cryptopool.builders now allow users to share their ccminer (1.7.6+) device hashrate, more supported miners will come later.

    --o stratum+tcp://:<PORT> -a <algo> -u <wallet_adress> -p stats
    +-o stratum+tcp://:<PORT> -a <algo> -u <wallet_adress> -p stats
     

    diff --git a/web/yaamp/modules/site/block.php b/web/yaamp/modules/site/block.php index 963a8e260..5ade74ecc 100644 --- a/web/yaamp/modules/site/block.php +++ b/web/yaamp/modules/site/block.php @@ -1,5 +1,4 @@ end; - - diff --git a/web/yaamp/modules/site/block_results.php b/web/yaamp/modules/site/block_results.php index fe2145482..0d7374bbd 100644 --- a/web/yaamp/modules/site/block_results.php +++ b/web/yaamp/modules/site/block_results.php @@ -1,10 +1,11 @@ $id)); +$id = (int)getiparam('id'); +$db_blocks = getdbolist('db_blocks', "coin_id=:id order by time desc limit 250", array( + ':id' => $id +)); $coin = getdbo('db_coins', $id); showTableSorter('maintable', "{ @@ -48,87 +49,80 @@ end; -foreach($db_blocks as $db_block) -{ - if(!$db_block->coin_id) continue; - - if(!$coin) continue; - - if($db_block->category == 'stake' && !$this->admin) continue; - if($db_block->category == 'generated' && !$this->admin) continue; // mature stake income - -// $remote = new WalletRPC($coin); - -// $blockext = $remote->getblock($db_block->blockhash); -// $tx = $remote->gettransaction($blockext['tx'][0]); - -// $db_block->category = $tx['details'][0]['category']; - - if($db_block->category == 'immature') - echo ""; - else - echo ""; - - echo ''; - - $flags = $db_block->segwit ? ' ' : ''; - - echo ''; - if ($this->admin) - echo ''.$coin->name.''; - else - echo ''.$coin->name.''; - echo ' ('.$coin->symbol.')'.$flags.''; - -// $db_block->confirmations = $blockext['confirmations']; -// $db_block->save(); - $d = datetoa2($db_block->time); - echo ''.$d.' ago'; - echo ''.$coin->createExplorerLink($db_block->height, array('height'=>$db_block->height)).''; - echo ''.$db_block->amount.''; - echo ''; - - if($db_block->category == 'orphan') - echo "Orphan"; - - else if($db_block->category == 'immature') { - $eta = ''; - if ($coin->block_time && $coin->mature_blocks) { - $t = (int) ($coin->mature_blocks - $db_block->confirmations) * $coin->block_time; - $eta = "ETA: ".sprintf('%dh %02dmn', ($t/3600), ($t/60)%60); - } - echo "Immature ({$db_block->confirmations})"; - } - - else if($db_block->category == 'generate') - echo 'Confirmed'; - - else if($db_block->category == 'stake') - echo "Stake ({$db_block->confirmations})"; - - else if($db_block->category == 'generated') - echo 'Stake'; - - echo ""; - - echo ''.round_difficulty($db_block->difficulty).''; - $diff_user = $db_block->difficulty_user; - if (!$diff_user && substr($db_block->blockhash,0,4) == '0000') - $diff_user = hash_to_difficulty($coin, $db_block->blockhash); - echo ''.round_difficulty($diff_user).''; - - $finder = ''; - if (!empty($db_block->userid)) { - $user = getdbo('db_accounts', $db_block->userid); - $finder = $user ? substr($user->username, 0, 7).'...' : ''; - } - echo ''.$finder.''; - echo ''; - echo $coin->createExplorerLink($db_block->blockhash, array('hash'=>$db_block->blockhash)); - echo ""; - echo ""; +foreach ($db_blocks as $db_block) +{ + if (!$db_block->coin_id) continue; + + if (!$coin) continue; + + if ($db_block->category == 'stake' && !$this->admin) continue; + if ($db_block->category == 'generated' && !$this->admin) continue; // mature stake income + // $remote = new WalletRPC($coin); + // $blockext = $remote->getblock($db_block->blockhash); + // $tx = $remote->gettransaction($blockext['tx'][0]); + // $db_block->category = $tx['details'][0]['category']; + if ($db_block->category == 'immature') echo ""; + else echo ""; + + echo ''; + + $flags = $db_block->segwit ? ' ' : ''; + + echo ''; + if ($this->admin) echo '' . $coin->name . ''; + else echo '' . $coin->name . ''; + echo ' (' . $coin->symbol . ')' . $flags . ''; + + // $db_block->confirmations = $blockext['confirmations']; + // $db_block->save(); + $d = datetoa2($db_block->time); + echo '' . $d . ' ago'; + echo '' . $coin->createExplorerLink($db_block->height, array( + 'height' => $db_block->height + )) . ''; + echo '' . $db_block->amount . ''; + echo ''; + + if ($db_block->category == 'orphan') echo "Orphan"; + + else if ($db_block->category == 'immature') + { + $eta = ''; + if ($coin->block_time && $coin->mature_blocks) + { + $t = (int)($coin->mature_blocks - $db_block->confirmations) * $coin->block_time; + $eta = "ETA: " . sprintf('%dh %02dmn', ($t / 3600) , ($t / 60) % 60); + } + echo "Immature ({$db_block->confirmations})"; + } + + else if ($db_block->category == 'generate') echo 'Confirmed'; + + else if ($db_block->category == 'stake') echo "Stake ({$db_block->confirmations})"; + + else if ($db_block->category == 'generated') echo 'Stake'; + + echo ""; + + echo '' . round_difficulty($db_block->difficulty) . ''; + $diff_user = $db_block->difficulty_user; + if (!$diff_user && substr($db_block->blockhash, 0, 4) == '0000') $diff_user = hash_to_difficulty($coin, $db_block->blockhash); + echo '' . round_difficulty($diff_user) . ''; + + $finder = ''; + if (!empty($db_block->userid)) + { + $user = getdbo('db_accounts', $db_block->userid); + $finder = $user ? substr($user->username, 0, 7) . '...' : ''; + } + echo '' . $finder . ''; + echo ''; + echo $coin->createExplorerLink($db_block->blockhash, array( + 'hash' => $db_block->blockhash + )); + echo ""; + echo ""; } echo ""; - diff --git a/web/yaamp/modules/site/bookmark.php b/web/yaamp/modules/site/bookmark.php index 03b8cb649..75893ebea 100644 --- a/web/yaamp/modules/site/bookmark.php +++ b/web/yaamp/modules/site/bookmark.php @@ -1,7 +1,5 @@ id}'>{$coin->name} "; echo "Bookmark: $bookmark->label
    "; @@ -9,17 +7,23 @@ echo CUFHtml::beginForm(); echo CUFHtml::errorSummary($bookmark); -echo CUFHtml::openTag('fieldset', array('class'=>'inlineLabels')); +echo CUFHtml::openTag('fieldset', array( + 'class' => 'inlineLabels' +)); echo CUFHtml::openActiveCtrlHolder($bookmark, 'label'); echo CUFHtml::activeLabelEx($bookmark, 'label'); -echo CUFHtml::activeTextField($bookmark, 'label', array('maxlength'=>32)); +echo CUFHtml::activeTextField($bookmark, 'label', array( + 'maxlength' => 32 +)); echo "

    .

    "; echo CUFHtml::closeCtrlHolder(); echo CUFHtml::openActiveCtrlHolder($bookmark, 'address'); echo CUFHtml::activeLabelEx($bookmark, 'address'); -echo CUFHtml::activeTextField($bookmark, 'address', array('maxlength'=>128)); +echo CUFHtml::activeTextField($bookmark, 'address', array( + 'maxlength' => 128 +)); echo "

    .

    "; echo CUFHtml::closeCtrlHolder(); diff --git a/web/yaamp/modules/site/botnets.php b/web/yaamp/modules/site/botnets.php index b2c9c05c9..1f97a0c0d 100644 --- a/web/yaamp/modules/site/botnets.php +++ b/web/yaamp/modules/site/botnets.php @@ -1,11 +1,9 @@ pageTitle = 'Botnets'; -echo getAdminSideBarLinks().'

    '; +echo getAdminSideBarLinks() . '

    '; ////////////////////////////////////////////////////////////////////////////////////// - JavascriptFile("/yaamp/ui/js/jquery.metadata.js"); JavascriptFile("/yaamp/ui/js/jquery.tablesorter.widgets.js"); @@ -17,6 +15,7 @@ end; + showTableSorter('maintable', "{ tableClass: 'dataGrid', textExtraction: { @@ -45,63 +44,60 @@ end; -$botnets = dbolist("SELECT userid, algo, pid, max(time) AS time, count(userid) AS workers, count(DISTINCT ip) AS ips, max(version) AS version ". - " FROM workers GROUP BY userid, algo, pid HAVING ips > 10 ORDER BY ips DESC" -); -if(!empty($botnets)) -foreach($botnets as $botnet) +$botnets = dbolist("SELECT userid, algo, pid, max(time) AS time, count(userid) AS workers, count(DISTINCT ip) AS ips, max(version) AS version " . " FROM workers GROUP BY userid, algo, pid HAVING ips > 10 ORDER BY ips DESC"); + +if (!empty($botnets)) foreach ($botnets as $botnet) { - if (!$botnet['userid']) continue; + if (!$botnet['userid']) continue; - $user = getdbo('db_accounts', $botnet['userid']); - if (!$user) continue; + $user = getdbo('db_accounts', $botnet['userid']); + if (!$user) continue; - $coin = getdbo('db_coins', $user->coinid); - if (!$coin) continue; + $coin = getdbo('db_coins', $user->coinid); + if (!$coin) continue; - $coinsym = $coin->symbol; - $coinimg = CHtml::image($coin->image, $coin->symbol, array('width'=>'16')); - $coinlink = CHtml::link($coin->name, '/site/coin?id='.$coin->id); + $coinsym = $coin->symbol; + $coinimg = CHtml::image($coin->image, $coin->symbol, array( + 'width' => '16' + )); + $coinlink = CHtml::link($coin->name, '/site/coin?id=' . $coin->id); - $d = datetoa2($botnet['time']); + $d = datetoa2($botnet['time']); - echo ''; + echo ''; - echo ''.$coinimg.''; - echo ''.$coinsym.''; - echo ''.$botnet['algo'].''; - echo ''.CHtml::link($user->username, '/?address='.$user->username).''; - echo ''.$d.''; - echo ''.$botnet['pid'].''; - echo ''.$botnet['ips'].''; - echo ''.$botnet['workers'].''; - echo ''.$botnet['version'].''; + echo '' . $coinimg . ''; + echo '' . $coinsym . ''; + echo '' . $botnet['algo'] . ''; + echo '' . CHtml::link($user->username, '/?address=' . $user->username) . ''; + echo '' . $d . ''; + echo '' . $botnet['pid'] . ''; + echo '' . $botnet['ips'] . ''; + echo '' . $botnet['workers'] . ''; + echo '' . $botnet['version'] . ''; - echo ''; + echo ''; - if ($user->logtraffic) - echo 'unwatch '; - else - echo 'watch '; + if ($user->logtraffic) echo 'unwatch '; + else echo 'watch '; - if ($user->is_locked) - echo 'unblock '; - else - echo 'block '; + if ($user->is_locked) echo 'unblock '; + else echo 'block '; - echo 'BAN'; + echo 'BAN'; - echo ''; + echo ''; - echo ''; + echo ''; } echo ''; echo ''; -if(empty($botnets)) { - echo ''."No botnets detected".''; +if (empty($botnets)) +{ + echo '' . "No botnets detected" . ''; } echo ''; diff --git a/web/yaamp/modules/site/coin.php b/web/yaamp/modules/site/coin.php index 9431db201..8edfdfa44 100644 --- a/web/yaamp/modules/site/coin.php +++ b/web/yaamp/modules/site/coin.php @@ -1,36 +1,37 @@ goback(); +if (!$coin) +{ + $this->goback(); } -$this->pageTitle = 'Wallet - '.$coin->symbol; +$this->pageTitle = 'Wallet - ' . $coin->symbol; // force a refresh after 10mn to prevent memory leaks in chrome -app()->clientScript->registerMetaTag('600', null, 'refresh'); +app() + ->clientScript + ->registerMetaTag('600', null, 'refresh'); -if (!empty($coin->algo) && $coin->algo != 'PoS') - user()->setState('yaamp-algo', $coin->algo); +if (!empty($coin->algo) && $coin->algo != 'PoS') user() + ->setState('yaamp-algo', $coin->algo); $remote = new WalletRPC($coin); $info = $remote->getinfo(); $sellamount = $coin->balance; //if ($info) $sellamount = floatval($sellamount) - arraySafeVal($info, "paytxfee") * 3; - -echo getAdminSideBarLinks().'

    '; +echo getAdminSideBarLinks() . '

    '; echo getAdminWalletLinks($coin, $info, 'wallet'); -$maxrows = arraySafeVal($_REQUEST,'rows', 500); -$since = arraySafeVal($_REQUEST,'since', time() - (7*24*3600)); // one week - +$maxrows = arraySafeVal($_REQUEST, 'rows', 500); +$since = arraySafeVal($_REQUEST, 'since', time() - (7 * 24 * 3600)); // one week echo '
    '; -app()->clientScript->registerCoreScript('jquery.ui'); // dialog - -/* +app() + ->clientScript + ->registerCoreScript('jquery.ui'); // dialog +/* echo "
    MAKE CONFIG & START"; if($info) @@ -154,11 +155,15 @@ function showSellAmountDialog(marketname, address, marketid, bookmarkid) END; + JavascriptReady("main_refresh();"); -if ($coin->watch) { - $this->renderPartial('coin_market_graph', array('coin'=>$coin)); - JavascriptReady("$(window).resize(graph_resized);"); +if ($coin->watch) +{ + $this->renderPartial('coin_market_graph', array( + 'coin' => $coin + )); + JavascriptReady("$(window).resize(graph_resized);"); } ////////////////////////////////////////////////////////////////////////////////////// diff --git a/web/yaamp/modules/site/coin_console.php b/web/yaamp/modules/site/coin_console.php index cffe37cd4..9e336d40f 100644 --- a/web/yaamp/modules/site/coin_console.php +++ b/web/yaamp/modules/site/coin_console.php @@ -1,64 +1,74 @@ goback(); -$this->pageTitle = 'Console - '.$coin->symbol; +if (!$coin) + $this->goback(); +$this->pageTitle = 'Console - ' . $coin->symbol; $remote = new WalletRPC($coin); -echo getAdminSideBarLinks().'

    '; +echo getAdminSideBarLinks() . '

    '; $info = $remote->getinfo(); if (!$info) { - echo $remote->error; - return; + echo $remote->error; + return; } -echo getAdminWalletLinks($coin, $info, 'console').'

    '; +echo getAdminWalletLinks($coin, $info, 'console') . '

    '; ////////////////////////////////////////////////////////////////////////////////////// function colorizeJson($json) { - $json = str_replace('"', '"', $json); - // strings - $res = preg_match_all("# "([^&]+)"([,\s])#", $json, $matches); - if ($res) foreach($matches[1] as $n=>$m) { - $sfx = $matches[2][$n]; - $class = ''; - if (strlen($m) == 64 && ctype_xdigit($m)) $class = 'hash'; - if (strlen($m) == 34 && ctype_alnum($m)) $class = 'addr'; - if (strlen($m) == 35 && ctype_alnum($m)) $class = 'addr'; - if (strlen($m) > 160 && ctype_alnum($m)) $class = 'data'; - if ($class == '' && strlen($m) < 64 && ctype_xdigit($m)) $class = 'hexa'; - $json = str_replace(' "'.$m.""".$sfx, ' "'.$m.'"'.$sfx, $json); - } - // keys - $res = preg_match_all("#"([^&]+)":#", $json, $matches); - if ($res) foreach($matches[1] as $n=>$m) { - $json = str_replace('"'.$m.""", '"'.$m.'"', $json); - } - // humanize timestamps like "blocktime": 1462359961, - $res = preg_match_all("#: ([0-9]{10})([,\s])#", $json, $matches); - if ($res) foreach($matches[1] as $n=>$m) { - $ts = intval($m); - if ($ts > 1400000000 && $ts < 1600000000) { - $sfx = $matches[2][$n]; - $date = strftime("%Y-%m-%d %T %z", $ts); - $json = str_replace(' '.$m.$sfx, ' "'.$date.'"'.$sfx, $json); - } - } - // numeric - $res = preg_match_all("#: ([e\-\.0-9]+)([,\s])#", $json, $matches); - if ($res) foreach($matches[1] as $n=>$m) { - $sfx = $matches[2][$n]; - $json = str_replace(' '.$m.$sfx, ' '.$m.''.$sfx, $json); - } - $json = preg_replace('#\[\s+\]#', '[]', $json); - $json = str_replace('[', '[', $json); - $json = str_replace(']', ']', $json); - $json = str_replace('{', '{', $json); - $json = str_replace('}', '}', $json); - return $json; + $json = str_replace('"', '"', $json); + // strings + $res = preg_match_all("# "([^&]+)"([,\s])#", $json, $matches); + if ($res) + foreach ($matches[1] as $n => $m) { + $sfx = $matches[2][$n]; + $class = ''; + if (strlen($m) == 64 && ctype_xdigit($m)) + $class = 'hash'; + if (strlen($m) == 34 && ctype_alnum($m)) + $class = 'addr'; + if (strlen($m) == 35 && ctype_alnum($m)) + $class = 'addr'; + if (strlen($m) > 160 && ctype_alnum($m)) + $class = 'data'; + if ($class == '' && strlen($m) < 64 && ctype_xdigit($m)) + $class = 'hexa'; + $json = str_replace(' "' . $m . """ . $sfx, ' "' . $m . '"' . $sfx, $json); + } + // keys + $res = preg_match_all("#"([^&]+)":#", $json, $matches); + if ($res) + foreach ($matches[1] as $n => $m) { + $json = str_replace('"' . $m . """, '"' . $m . '"', $json); + } + // humanize timestamps like "blocktime": 1462359961, + $res = preg_match_all("#: ([0-9]{10})([,\s])#", $json, $matches); + if ($res) + foreach ($matches[1] as $n => $m) { + $ts = intval($m); + if ($ts > 1400000000 && $ts < 1600000000) { + $sfx = $matches[2][$n]; + $date = strftime("%Y-%m-%d %T %z", $ts); + $json = str_replace(' ' . $m . $sfx, ' "' . $date . '"' . $sfx, $json); + } + } + // numeric + $res = preg_match_all("#: ([e\-\.0-9]+)([,\s])#", $json, $matches); + if ($res) + foreach ($matches[1] as $n => $m) { + $sfx = $matches[2][$n]; + $json = str_replace(' ' . $m . $sfx, ' ' . $m . '' . $sfx, $json); + } + $json = preg_replace('#\[\s+\]#', '[]', $json); + $json = str_replace('[', '[', $json); + $json = str_replace(']', ']', $json); + $json = str_replace('{', '{', $json); + $json = str_replace('}', '}', $json); + return $json; } ////////////////////////////////////////////////////////////////////////////////////// @@ -68,34 +78,34 @@ function colorizeJson($json) echo << function main_resize() { - var w = 0 + jQuery('div.form').width(); - var wpx = (w - 100).toString() + 'px'; - jQuery('.main-text-input').css({width: wpx}); + var w = 0 + jQuery('div.form').width(); + var wpx = (w - 100).toString() + 'px'; + jQuery('.main-text-input').css({width: wpx}); } var lazyLinks; function main_json_links() { - if (lazyLinks) clearTimeout(lazyLinks); - jQuery('s.addr').each(function(n) { - var el = $(this); - var addr = el[0].innerText; - var link = '' + addr + ''; - el.html(link); - }); - jQuery('s.hash').each(function(n) { - var el = $(this); - var hash = el[0].innerText; - var link = '' + hash + ''; - el.html(link); - }); + if (lazyLinks) clearTimeout(lazyLinks); + jQuery('s.addr').each(function(n) { + var el = $(this); + var addr = el[0].innerText; + var link = '' + addr + ''; + el.html(link); + }); + jQuery('s.hash').each(function(n) { + var el = $(this); + var hash = el[0].innerText; + var link = '' + hash + ''; + el.html(link); + }); } end; + showTableSorter('maintable', "{ tableClass: 'dataGrid', textExtraction: { @@ -56,37 +56,39 @@ end; + $notifications = getdbolist('db_notifications', "idcoin={$coin->id}"); -foreach($notifications as $rule) +foreach ($notifications as $rule) { - if ($rule->enabled) - $operations = 'disable'; - else - $operations = 'enable'; - $operations .= ' delete'; - - if ($rule->lasttriggered && $rule->lasttriggered == $rule->lastchecked) { - $status = 'Triggered'; - $operations = 'reset'.' '.$operations; - } else { - $status = ''; - } - - $description = $rule->description; - if (!empty($description) && !empty($rule->notifycmd)) $description .= '
    '; - $description .= ''.$rule->notifycmd.''; - - echo ''; - - echo ''.$rule->notifytype.''; - echo ''.$rule->conditiontype.''; - echo ''.$rule->conditionvalue.''; - echo ''.$description.''; - echo ''.$status.''; - echo ''.datetoa2($rule->lastchecked).''; - echo ''.$operations.''; - - echo ""; + if ($rule->enabled) $operations = 'disable'; + else $operations = 'enable'; + $operations .= ' delete'; + + if ($rule->lasttriggered && $rule->lasttriggered == $rule->lastchecked) + { + $status = 'Triggered'; + $operations = 'reset' . ' ' . $operations; + } + else + { + $status = ''; + } + + $description = $rule->description; + if (!empty($description) && !empty($rule->notifycmd)) $description .= '
    '; + $description .= '' . $rule->notifycmd . ''; + + echo ''; + + echo '' . $rule->notifytype . ''; + echo '' . $rule->conditiontype . ''; + echo '' . $rule->conditionvalue . ''; + echo '' . $description . ''; + echo '' . $status . ''; + echo '' . datetoa2($rule->lastchecked) . ''; + echo '' . $operations . ''; + + echo ""; } echo '
    '; @@ -127,4 +129,6 @@ end; -?> \ No newline at end of file + + +?> diff --git a/web/yaamp/modules/site/common.php b/web/yaamp/modules/site/common.php index 244057aee..f4cb79812 100644 --- a/web/yaamp/modules/site/common.php +++ b/web/yaamp/modules/site/common.php @@ -15,9 +15,13 @@ Memcache  Connections  - + Rental  - +
    @@ -29,198 +33,190 @@



















    - - - - diff --git a/web/yaamp/modules/site/common_results.php b/web/yaamp/modules/site/common_results.php index 88abe8b11..3b4f0e60a 100644 --- a/web/yaamp/modules/site/common_results.php +++ b/web/yaamp/modules/site/common_results.php @@ -17,11 +17,11 @@ tableClass: "dataGrid", widgets: ["Storage","saveSort"], textExtraction: { - 1: function(node, table, cellIndex) { return $(node).attr("data"); }, - 5: function(node, table, cellIndex) { return $(node).attr("data"); } + 1: function(node, table, cellIndex) { return $(node).attr("data"); }, + 5: function(node, table, cellIndex) { return $(node).attr("data"); } }, widgetOptions: { - saveSort: true + saveSort: true }}'); echo << end; -$total_coins = 0; -$total_workers = 0; -$total_hashrate = 0; +$total_coins = 0; +$total_workers = 0; +$total_hashrate = 0; $total_hashrate_bad = 0; $algos = array(); -foreach(yaamp_get_algos() as $algo) -{ - $algo_norm = yaamp_get_algo_norm($algo); +foreach (yaamp_get_algos() as $algo) { + $algo_norm = yaamp_get_algo_norm($algo); - $t = time() - 48*60*60; - $price = controller()->memcache->get_database_scalar("current_price-$algo", - "SELECT price FROM hashrate WHERE algo=:algo AND time>$t ORDER BY time DESC LIMIT 1", array(':algo'=>$algo)); + $t = time() - 48 * 60 * 60; + $price = controller()->memcache->get_database_scalar("current_price-$algo", "SELECT price FROM hashrate WHERE algo=:algo AND time>$t ORDER BY time DESC LIMIT 1", array( + ':algo' => $algo + )); - $norm = $price*$algo_norm; - $norm = take_yaamp_fee($norm, $algo); + $norm = $price * $algo_norm; + $norm = take_yaamp_fee($norm, $algo); - $algos[] = array($norm, $algo); + $algos[] = array( + $norm, + $algo + ); } function cmp($a, $b) { - return $a[0] < $b[0]; + return $a[0] < $b[0]; } usort($algos, 'cmp'); -foreach($algos as $item) -{ - $norm = $item[0]; - $algo = $item[1]; - - $algo_color = getAlgoColors($algo); - $algo_norm = yaamp_get_algo_norm($algo); - - $coins = getdbocount('db_coins', "enable AND auto_ready AND algo=:algo", array(':algo'=>$algo)); - $count = getdbocount('db_workers', "algo=:algo", array(':algo'=>$algo)); - - $total_coins += $coins; - $total_workers += $count; - - $t1 = time() - 24*60*60; - $total1 = dboscalar("SELECT sum(amount*price) FROM blocks WHERE category!='orphan' AND time>$t1 AND algo=:algo", array(':algo'=>$algo)); - if (!$coins && !$total1) continue; - $hashrate1 = dboscalar("SELECT avg(hashrate) FROM hashrate WHERE time>$t1 AND algo=:algo", array(':algo'=>$algo)); - - $hashrate = dboscalar("SELECT hashrate FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array(':algo'=>$algo)); - $hashrate_bad = dboscalar("SELECT hashrate_bad FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array(':algo'=>$algo)); - $bad = ($hashrate+$hashrate_bad)? round($hashrate_bad * 100 / ($hashrate+$hashrate_bad), 1): ''; - - $total_hashrate += $hashrate; - $total_hashrate_bad += $hashrate_bad; - - $hashrate_sfx = $hashrate? Itoa2($hashrate).'h/s': '-'; - $hashrate_bad = $hashrate_bad? Itoa2($hashrate_bad).'h/s': '-'; - - $hashrate_jobs = yaamp_rented_rate($algo); - $hashrate_jobs = $hashrate_jobs>0? Itoa2($hashrate_jobs).'h/s': ''; - - $price = dboscalar("SELECT price FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array(':algo'=>$algo)); - $price = $price? mbitcoinvaluetoa($price): '-'; - - $rent = dboscalar("SELECT rent FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array(':algo'=>$algo)); - $rent = $rent? mbitcoinvaluetoa($rent): '-'; - - $norm = mbitcoinvaluetoa($norm); - - $t = time() - 24*60*60; - $avgprice = dboscalar("SELECT avg(price) FROM hashrate WHERE algo=:algo AND time>$t", array(':algo'=>$algo)); - $avgprice = $avgprice? mbitcoinvaluetoa(take_yaamp_fee($avgprice, $algo)): '-'; - - $algo_unit_factor = yaamp_algo_mBTC_factor($algo); - $btcmhday1 = $hashrate1 != 0? mbitcoinvaluetoa($total1 / $hashrate1 * 1000000 * 1000 * $algo_unit_factor): '-'; - - $fees = yaamp_fee($algo); - - // todo: show per port data ? - $stratum = getdbosql('db_stratums', "algo=:algo ORDER BY started DESC", array(':algo'=>$algo)); - $isup = Booltoa($stratum); - $time = $isup ? datetoa2($stratum->started) : ''; - $ts = $isup ? datetoa2($stratum->started) : ''; - - echo ''; - echo ''; - echo CHtml::link($algo, '/site/gomining?algo='.$algo); - echo ''; - echo ''.$isup.' '.$time.''; - echo ''.(empty($coins) ? '-' : $coins).''; - echo ''.(empty($count) ? '-' : $count).''; - echo ''.(empty($fees) ? '-' : "$fees %").''; - echo ''.$hashrate_sfx.''; - echo ''.$hashrate_jobs.''; - - if ($bad > 10) - echo ''.$bad.'%'; - else if($bad > 5) - echo ''.$bad.'%'; - else - echo ''.(empty($bad) ? '-' : "$bad %").''; - - if ($norm>0) - echo ''.($price == 0.0 ? '-' : $price).''; - else - echo ''.($price == 0.0 ? '-' : $price).''; - - echo ''.$rent.''; - - // Norm - echo ''.($norm == 0.0 ? '-' : $norm).''; - - // 24E - echo ''.($avgprice == 0.0 ? '-' : $avgprice).''; - - // 24A - $style = ''; - if ($btcmhday1 != '-') - { - $avgprice = (double) $avgprice; - $btcmhd = (double) $btcmhday1; - - if($btcmhd > $avgprice*1.1) - $style = 'color: white; background-color: #5cb85c;'; - else if($btcmhd*1.3 < $avgprice) - $style = 'color: white; background-color: #d9534f;'; - else if($btcmhd*1.2 < $avgprice) - $style = 'color: white; background-color: #e4804e;'; - else if($btcmhd*1.1 < $avgprice) - $style = 'color: white; background-color: #f0ad4e;'; - } - echo ''.$btcmhday1.''; - - echo ''; +foreach ($algos as $item) { + $norm = $item[0]; + $algo = $item[1]; + + $algo_color = getAlgoColors($algo); + $algo_norm = yaamp_get_algo_norm($algo); + + $coins = getdbocount('db_coins', "enable AND auto_ready AND algo=:algo", array( + ':algo' => $algo + )); + $count = getdbocount('db_workers', "algo=:algo", array( + ':algo' => $algo + )); + + $total_coins += $coins; + $total_workers += $count; + + $t1 = time() - 24 * 60 * 60; + $total1 = dboscalar("SELECT sum(amount*price) FROM blocks WHERE category!='orphan' AND time>$t1 AND algo=:algo", array( + ':algo' => $algo + )); + if (!$coins && !$total1) + continue; + $hashrate1 = dboscalar("SELECT avg(hashrate) FROM hashrate WHERE time>$t1 AND algo=:algo", array( + ':algo' => $algo + )); + + $hashrate = dboscalar("SELECT hashrate FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array( + ':algo' => $algo + )); + $hashrate_bad = dboscalar("SELECT hashrate_bad FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array( + ':algo' => $algo + )); + $bad = ($hashrate + $hashrate_bad) ? round($hashrate_bad * 100 / ($hashrate + $hashrate_bad), 1) : ''; + + $total_hashrate += $hashrate; + $total_hashrate_bad += $hashrate_bad; + + $hashrate_sfx = $hashrate ? Itoa2($hashrate) . 'h/s' : '-'; + $hashrate_bad = $hashrate_bad ? Itoa2($hashrate_bad) . 'h/s' : '-'; + + $hashrate_jobs = yaamp_rented_rate($algo); + $hashrate_jobs = $hashrate_jobs > 0 ? Itoa2($hashrate_jobs) . 'h/s' : ''; + + $price = dboscalar("SELECT price FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array( + ':algo' => $algo + )); + $price = $price ? mbitcoinvaluetoa($price) : '-'; + + $rent = dboscalar("SELECT rent FROM hashrate WHERE algo=:algo ORDER BY time DESC LIMIT 1", array( + ':algo' => $algo + )); + $rent = $rent ? mbitcoinvaluetoa($rent) : '-'; + + $norm = mbitcoinvaluetoa($norm); + + $t = time() - 24 * 60 * 60; + $avgprice = dboscalar("SELECT avg(price) FROM hashrate WHERE algo=:algo AND time>$t", array( + ':algo' => $algo + )); + $avgprice = $avgprice ? mbitcoinvaluetoa(take_yaamp_fee($avgprice, $algo)) : '-'; + + $algo_unit_factor = yaamp_algo_mBTC_factor($algo); + $btcmhday1 = $hashrate1 != 0 ? mbitcoinvaluetoa($total1 / $hashrate1 * 1000000 * 1000 * $algo_unit_factor) : '-'; + + $fees = yaamp_fee($algo); + + // todo: show per port data ? + $stratum = getdbosql('db_stratums', "algo=:algo ORDER BY started DESC", array( + ':algo' => $algo + )); + $isup = Booltoa($stratum); + $time = $isup ? datetoa2($stratum->started) : ''; + $ts = $isup ? datetoa2($stratum->started) : ''; + + echo ''; + echo ''; + echo CHtml::link($algo, '/site/gomining?algo=' . $algo); + echo ''; + echo '' . $isup . ' ' . $time . ''; + echo '' . (empty($coins) ? '-' : $coins) . ''; + echo '' . (empty($count) ? '-' : $count) . ''; + echo '' . (empty($fees) ? '-' : "$fees %") . ''; + echo '' . $hashrate_sfx . ''; + echo '' . $hashrate_jobs . ''; + + if ($bad > 10) + echo '' . $bad . '%'; + else if ($bad > 5) + echo '' . $bad . '%'; + else + echo '' . (empty($bad) ? '-' : "$bad %") . ''; + + if ($norm > 0) + echo '' . ($price == 0.0 ? '-' : $price) . ''; + else + echo '' . ($price == 0.0 ? '-' : $price) . ''; + + echo '' . $rent . ''; + + // Norm + echo '' . ($norm == 0.0 ? '-' : $norm) . ''; + + // 24E + echo '' . ($avgprice == 0.0 ? '-' : $avgprice) . ''; + + // 24A + $style = ''; + if ($btcmhday1 != '-') { + $avgprice = (double) $avgprice; + $btcmhd = (double) $btcmhday1; + + if ($btcmhd > $avgprice * 1.1) + $style = 'color: white; background-color: #5cb85c;'; + else if ($btcmhd * 1.3 < $avgprice) + $style = 'color: white; background-color: #d9534f;'; + else if ($btcmhd * 1.2 < $avgprice) + $style = 'color: white; background-color: #e4804e;'; + else if ($btcmhd * 1.1 < $avgprice) + $style = 'color: white; background-color: #f0ad4e;'; + } + echo '' . $btcmhday1 . ''; + + echo ''; } echo ''; -$bad = ($total_hashrate+$total_hashrate_bad)? round($total_hashrate_bad * 100 / ($total_hashrate+$total_hashrate_bad), 1): ''; -$total_hashrate = Itoa2($total_hashrate).'h/s'; +$bad = ($total_hashrate + $total_hashrate_bad) ? round($total_hashrate_bad * 100 / ($total_hashrate + $total_hashrate_bad), 1) : ''; +$total_hashrate = Itoa2($total_hashrate) . 'h/s'; echo ''; echo ''; -echo ''.$total_coins.''; -echo ''.$total_workers.''; +echo '' . $total_coins . ''; +echo '' . $total_workers . ''; echo ''; -echo ''.$total_hashrate.''; +echo '' . $total_hashrate . ''; echo ''; -echo ''.($bad ? $bad.'%' : '').''; +echo '' . ($bad ? $bad . '%' : '') . ''; echo ''; echo ''; echo ''; @@ -201,10 +223,11 @@ function cmp($a, $b) /////////////////////////////////////////////////////////////////////////////////////////////////////// -$markets = getdbolist('db_balances', "1 order by name"); -$salebalances = array(); $alt_balances = array(); +$markets = getdbolist('db_balances', "1 order by name"); +$salebalances = array(); +$alt_balances = array(); $total_onsell = $total_altcoins = 0.0; -$total_usd = $total_total = $total_balance = 0.0; +$total_usd = $total_total = $total_balance = 0.0; echo ''; echo ''; @@ -212,8 +235,8 @@ function cmp($a, $b) echo ''; echo ''; -foreach($markets as $market) - echo ''; +foreach ($markets as $market) + echo ''; echo ''; @@ -223,130 +246,126 @@ function cmp($a, $b) // ---------------------------------------------------------------------------------------------------- echo ''; -foreach($markets as $market) -{ - $balance = bitcoinvaluetoa($market->balance); - - if($balance > 0.250) - echo ''; - else if($balance > 0.200) - echo ''; - else if($balance == 0.0) - echo ''; - else - echo ''; - - $total_balance += $balance; +foreach ($markets as $market) { + $balance = bitcoinvaluetoa($market->balance); + + if ($balance > 0.250) + echo ''; + else if ($balance > 0.200) + echo ''; + else if ($balance == 0.0) + echo ''; + else + echo ''; + + $total_balance += $balance; } $total_balance = bitcoinvaluetoa($total_balance); -echo ''; +echo ''; echo ''; // ---------------------------------------------------------------------------------------------------- echo ''; if (YAAMP_ALLOW_EXCHANGE) { - // yaamp mode - foreach($markets as $market) { - $exchange = $market->name; - $onsell = bitcoinvaluetoa(dboscalar("SELECT sum(amount*bid) FROM orders WHERE market='$exchange'")); - $salebalances[$exchange] = $onsell; - - if($onsell > 0.2) - echo ''; - else if($onsell > 0.1) - echo ''; - else if($onsell == 0.0) - echo ''; - else - echo ''; - - $total_onsell += $onsell; - } + // yaamp mode + foreach ($markets as $market) { + $exchange = $market->name; + $onsell = bitcoinvaluetoa(dboscalar("SELECT sum(amount*bid) FROM orders WHERE market='$exchange'")); + $salebalances[$exchange] = $onsell; + + if ($onsell > 0.2) + echo ''; + else if ($onsell > 0.1) + echo ''; + else if ($onsell == 0.0) + echo ''; + else + echo ''; + + $total_onsell += $onsell; + } } else { - // yiimp mode - $ontrade = dbolist("SELECT name, onsell FROM balances B ORDER by name"); - foreach($ontrade as $row) { - $exchange = $row['name']; - $onsell = bitcoinvaluetoa($row['onsell']); - $salebalances[$exchange] = $onsell; + // yiimp mode + $ontrade = dbolist("SELECT name, onsell FROM balances B ORDER by name"); + foreach ($ontrade as $row) { + $exchange = $row['name']; + $onsell = bitcoinvaluetoa($row['onsell']); + $salebalances[$exchange] = $onsell; - echo ''; + echo ''; - $total_onsell += (double) $onsell; - } + $total_onsell += (double) $onsell; + } } $total_onsell = bitcoinvaluetoa($total_onsell); -echo ''; +echo ''; echo ''; // ---------------------------------------------------------------------------------------------------- -$t = time() - 48*60*60; +$t = time() - 48 * 60 * 60; $altmarkets = dbolist(" - SELECT B.name, SUM((M.balance+M.ontrade)*M.price) AS balance - FROM balances B LEFT JOIN markets M ON M.name = B.name - WHERE IFNULL(M.base_coin,'BTC') IN ('','BTC') AND IFNULL(M.deleted,0)=0 - GROUP BY B.name ORDER BY B.name + SELECT B.name, SUM((M.balance+M.ontrade)*M.price) AS balance + FROM balances B LEFT JOIN markets M ON M.name = B.name + WHERE IFNULL(M.base_coin,'BTC') IN ('','BTC') AND IFNULL(M.deleted,0)=0 + GROUP BY B.name ORDER BY B.name "); echo ''; -foreach($altmarkets as $row) -{ - $balance = bitcoinvaluetoa($row['balance']); - $exchange = $row['name']; - if($balance == 0.0) { - echo ''; - } else { - // to prevent duplicates on multi-algo coins, ignore symbols with a "-" - $balance = dboscalar(" - SELECT SUM((M.balance+M.ontrade)*M.price) FROM markets M INNER JOIN coins C on C.id = M.coinid - WHERE M.name='$exchange' AND IFNULL(M.deleted,0)=0 AND INSTR(C.symbol,'-')=0 - "); - $balance = bitcoinvaluetoa($balance); - echo ''; - } - $alt_balances[$exchange] = $balance; - $total_altcoins += $balance; +foreach ($altmarkets as $row) { + $balance = bitcoinvaluetoa($row['balance']); + $exchange = $row['name']; + if ($balance == 0.0) { + echo ''; + } else { + // to prevent duplicates on multi-algo coins, ignore symbols with a "-" + $balance = dboscalar(" + SELECT SUM((M.balance+M.ontrade)*M.price) FROM markets M INNER JOIN coins C on C.id = M.coinid + WHERE M.name='$exchange' AND IFNULL(M.deleted,0)=0 AND INSTR(C.symbol,'-')=0 + "); + $balance = bitcoinvaluetoa($balance); + echo ''; + } + $alt_balances[$exchange] = $balance; + $total_altcoins += $balance; } $total_altcoins = bitcoinvaluetoa($total_altcoins); -echo ''; +echo ''; echo ''; // ---------------------------------------------------------------------------------------------------- echo ''; echo ''; -foreach($markets as $market) -{ - $total = $market->balance + arraySafeVal($alt_balances,$market->name,0) + arraySafeVal($salebalances,$market->name,0); +foreach ($markets as $market) { + $total = $market->balance + arraySafeVal($alt_balances, $market->name, 0) + arraySafeVal($salebalances, $market->name, 0); - echo ''; - $total_total += $total; + echo ''; + $total_total += $total; } $total_total = bitcoinvaluetoa($total_total); -echo ''; +echo ''; echo ''; // ---------------------------------------------------------------------------------------------------- echo ''; -foreach($markets as $market) -{ - $total = $market->balance + arraySafeVal($alt_balances,$market->name,0) + arraySafeVal($salebalances,$market->name,0); - $usd = $total * $mining->usdbtc; +foreach ($markets as $market) { + $total = $market->balance + arraySafeVal($alt_balances, $market->name, 0) + arraySafeVal($salebalances, $market->name, 0); + $usd = $total * $mining->usdbtc; - echo ''; - $total_usd += $usd; + echo ''; + $total_usd += $usd; } -echo ''; +echo ''; echo ''; echo ''; @@ -354,8 +373,8 @@ function cmp($a, $b) ////////////////////////////////////////////////////////////////////////////////////////////////// -$minsent = time()-2*60*60; -$list = getdbolist('db_markets', "lastsent<$minsent and lastsent>lasttraded order by lastsent"); +$minsent = time() - 2 * 60 * 60; +$list = getdbolist('db_markets', "lastsent<$minsent and lastsent>lasttraded order by lastsent"); echo '
    '.$market->name.'' . $market->name . 'Total
    BTC'.$balance.''.$balance.'-'.$balance.'' . $balance . '' . $balance . '-' . $balance . ''.$total_balance.'' . $total_balance . '
    orders'.$onsell.''.$onsell.'-'.$onsell.'' . $onsell . '' . $onsell . '-' . $onsell . ''.($onsell == 0 ? '-' : $onsell).'' . ($onsell == 0 ? '-' : $onsell) . ''.$total_onsell.'' . $total_onsell . '
    other-'.$balance.'-' . $balance . ''.$total_altcoins.'' . $total_altcoins . '
    Total'.($total > 0.0 ? bitcoinvaluetoa($total) : '-').'' . ($total > 0.0 ? bitcoinvaluetoa($total) : '-') . ''.$total_total.'' . $total_total . '
    USD'.($usd > 0.0 ? round($usd,2) : '-').'' . ($usd > 0.0 ? round($usd, 2) : '-') . ''.round($total_usd,2).' $' . round($total_usd, 2) . ' $
    '; echo ''; @@ -370,30 +389,29 @@ function cmp($a, $b) echo ''; echo ''; -foreach($list as $market) -{ - $price = bitcoinvaluetoa($market->price); - $coin = getdbo('db_coins', $market->coinid); +foreach ($list as $market) { + $price = bitcoinvaluetoa($market->price); + $coin = getdbo('db_coins', $market->coinid); - $marketurl = getMarketUrl($coin, $market->name); + $marketurl = getMarketUrl($coin, $market->name); -// echo ''; - $algo_color = getAlgoColors($coin->algo); - echo ''; + // echo ''; + $algo_color = getAlgoColors($coin->algo); + echo ''; - echo ''; - echo ''; + echo ''; + echo ''; - echo ''; + echo ''; - $sent = datetoa2($market->lastsent); - $traded = datetoa2($market->lasttraded); + $sent = datetoa2($market->lastsent); + $traded = datetoa2($market->lasttraded); - echo ''; - echo ''; + echo ''; + echo ''; - echo ''; - echo ''; + echo ''; + echo ''; } echo '
    '.$coin->name.' ('.$coin->symbol.')' . $coin->name . ' (' . $coin->symbol . ')'.$market->name.'' . $market->name . ''.$sent.' ago'.$traded.' ago' . $sent . ' ago' . $traded . ' agoclear
    clear

    '; @@ -419,59 +437,59 @@ function cmp($a, $b) echo ''; $totalvalue = 0; -$totalbid = 0; - -foreach($orders as $order) -{ - $coin = getdbo('db_coins', $order->coinid); - if(!$coin) continue; - - $marketurl = getMarketUrl($coin, $order->market); - - $algo_color = getAlgoColors($coin->algo); - echo ''; - - $created = datetoa2($order->created). ' ago'; - $price = $order->price? bitcoinvaluetoa($order->price): ''; - - $price = bitcoinvaluetoa($order->price); - $bid = bitcoinvaluetoa($order->bid); - $value = bitcoinvaluetoa($order->amount*$order->price); - $bidvalue = bitcoinvaluetoa($order->amount*$order->bid); - $totalvalue += $value; - $totalbid += $bidvalue; - $bidpercent = $value>0? round(($value-$bidvalue)/$value*100, 1): 0; - $amount = round($order->amount, 3); - - echo ''; - echo ''.$coin->name.''; - echo ''.$order->market.''; - - echo ''.$created.''; - echo ''.$amount.''; - echo ''.$price.''; - echo ''."$bid ({$bidpercent}%)".''; - echo $bidvalue>0.01? ''.$bidvalue.'': ''.$bidvalue.''; - - echo ''; - echo 'cancel '; - echo 'clear '; -// echo 'sell'; - echo ''; - echo ''; +$totalbid = 0; + +foreach ($orders as $order) { + $coin = getdbo('db_coins', $order->coinid); + if (!$coin) + continue; + + $marketurl = getMarketUrl($coin, $order->market); + + $algo_color = getAlgoColors($coin->algo); + echo ''; + + $created = datetoa2($order->created) . ' ago'; + $price = $order->price ? bitcoinvaluetoa($order->price) : ''; + + $price = bitcoinvaluetoa($order->price); + $bid = bitcoinvaluetoa($order->bid); + $value = bitcoinvaluetoa($order->amount * $order->price); + $bidvalue = bitcoinvaluetoa($order->amount * $order->bid); + $totalvalue += $value; + $totalbid += $bidvalue; + $bidpercent = $value > 0 ? round(($value - $bidvalue) / $value * 100, 1) : 0; + $amount = round($order->amount, 3); + + echo ''; + echo '' . $coin->name . ''; + echo '' . $order->market . ''; + + echo '' . $created . ''; + echo '' . $amount . ''; + echo '' . $price . ''; + echo '' . "$bid ({$bidpercent}%)" . ''; + echo $bidvalue > 0.01 ? '' . $bidvalue . '' : '' . $bidvalue . ''; + + echo ''; + echo 'cancel '; + echo 'clear '; + // echo 'sell'; + echo ''; + echo ''; } -$bidpercent = $totalvalue>0? round(($totalvalue-$totalbid)/$totalvalue*100, 1): ''; +$bidpercent = $totalvalue > 0 ? round(($totalvalue - $totalbid) / $totalvalue * 100, 1) : ''; if ($totalvalue) { -echo ''; -echo ''; -echo 'Total'; -echo ''; -echo ''.$totalvalue.''; -echo ''."$totalbid ({$bidpercent}%)"; -echo ''; -echo ''; + echo ''; + echo ''; + echo 'Total'; + echo ''; + echo '' . $totalvalue . ''; + echo '' . "$totalbid ({$bidpercent}%)"; + echo ''; + echo ''; } echo '
    '; @@ -484,79 +502,78 @@ function cmp($a, $b) function cronstate2text($state) { - switch($state - 1) - { - case 0: - return 'new coins'; - case 1: - return 'trade'; - case 2: - return 'trade2'; - case 3: - return 'prices'; - case 4: - return 'blocks'; - case 5: - return 'sell'; - case 6: - return 'find2'; - case 7: - return 'notify'; - default: - return ''; - } + switch ($state - 1) { + case 0: + return 'new coins'; + case 1: + return 'trade'; + case 2: + return 'trade2'; + case 3: + return 'prices'; + case 4: + return 'blocks'; + case 5: + return 'sell'; + case 6: + return 'find2'; + case 7: + return 'notify'; + default: + return ''; + } } $state_main = (int) $this->memcache->get('cronjob_main_state'); -$btc = getdbosql('db_coins', "symbol='BTC'"); -if (!$btc) $btc = json_decode('{"id": 6, "balance": 0}'); +$btc = getdbosql('db_coins', "symbol='BTC'"); +if (!$btc) + $btc = json_decode('{"id": 6, "balance": 0}'); echo ''; -for($i=0; $i<10; $i++) -{ - if($i != $state_main-1 && $state_main>0) - { - $state = $this->memcache->get("cronjob_main_state_$i"); - if($state) echo "main $i "; - } +for ($i = 0; $i < 10; $i++) { + if ($i != $state_main - 1 && $state_main > 0) { + $state = $this->memcache->get("cronjob_main_state_$i"); + if ($state) + echo "main $i "; + } } echo ''; -$block_time = sectoa(time()-$this->memcache->get("cronjob_block_time_start")); -$loop2_time = sectoa(time()-$this->memcache->get("cronjob_loop2_time_start")); -$main_time2 = sectoa(time()-$this->memcache->get("cronjob_main_time_start")); +$block_time = sectoa(time() - $this->memcache->get("cronjob_block_time_start")); +$loop2_time = sectoa(time() - $this->memcache->get("cronjob_loop2_time_start")); +$main_time2 = sectoa(time() - $this->memcache->get("cronjob_main_time_start")); $main_time = sectoa($this->memcache->get("cronjob_main_time")); $main_text = cronstate2text($state_main); echo "*** main ($main_time) $state_main $main_text ($main_time2), loop2 ($loop2_time), block ($block_time)
    "; -$topay = dboscalar("select sum(balance) from accounts where coinid=$btc->id"); //here: take other currencies too +$topay = dboscalar("select sum(balance) from accounts where coinid=$btc->id"); //here: take other currencies too $topay2 = bitcoinvaluetoa(dboscalar("select sum(balance) from accounts where coinid=$btc->id and balance>0.001")); $renter = dboscalar("select sum(balance) from renters"); -$stats = getdbosql('db_stats', "1 order by time desc"); +$stats = getdbosql('db_stats', "1 order by time desc"); $margin2 = bitcoinvaluetoa($btc->balance - $topay - $renter + $stats->balances + $stats->onsell + $stats->wallets); $margin = bitcoinvaluetoa($btc->balance - $topay - $renter); -$topay = bitcoinvaluetoa($topay); +$topay = bitcoinvaluetoa($topay); $renter = bitcoinvaluetoa($renter); $immature = dboscalar("select sum(amount*price) from earnings where status=0"); -$mints = dboscalar("select sum(mint*price) from coins where enable"); -$off = $mints-$immature; +$mints = dboscalar("select sum(mint*price) from coins where enable"); +$off = $mints - $immature; $immature = bitcoinvaluetoa($immature); -$mints = bitcoinvaluetoa($mints); -$off = bitcoinvaluetoa($off); +$mints = bitcoinvaluetoa($mints); +$off = bitcoinvaluetoa($off); $btcaddr = YAAMP_BTCADDRESS; //'14LS7Uda6EZGXLtRrFEZ2kWmarrxobkyu9'; -echo 'Bitstamp '.$mining->usdbtc.', '; -echo 'wallet '.$btc->balance.', next payout '.$topay2.'
    '; +echo 'Bitstamp ' . $mining->usdbtc . ', '; +echo 'wallet ' . $btc->balance . ', next payout ' . $topay2 . '
    '; echo "pay $topay, renter $renter, marg $margin, $margin2
    "; echo "mint $mints immature $immature off $off
    "; @@ -586,74 +603,71 @@ function cronstate2text($state) echo ''; echo ''; -foreach($db_blocks as $db_block) -{ - $d = datetoa2($db_block->time); - if(!$db_block->coin_id) - { - if (!$showrental) - continue; - - $reward = bitcoinvaluetoa($db_block->amount); - - $algo_color = getAlgoColors($db_block->algo); - echo ''; - echo ''; - echo 'Rental ('.$db_block->algo.')'; - echo '$reward BTC'; - echo ''; - echo ''; - echo ''.$d.' ago'; - echo ''; - echo 'Confirmed'; - echo ''; - echo ''; - continue; - } - - $coin = getdbo('db_coins', $db_block->coin_id); - if(!$coin) - { - debuglog("coin not found {$db_block->coin_id}"); - continue; - } - - $height = number_format($db_block->height, 0, '.', ' '); - $diff = Itoa2($db_block->difficulty, 3); - - $algo_color = getAlgoColors($coin->algo); - echo ''; - echo ''; - $flags = $db_block->segwit ? ' ' : ''; - echo ''.$coin->name.''.$flags.''; - - echo ''.$db_block->amount.' '.$coin->symbol.''; - echo ''.$diff.''; - - echo ''.$height.''; - echo ''.$d.' ago'; - echo ''; - - if($db_block->category == 'orphan') - echo 'Orphan'; - - else if($db_block->category == 'immature') - echo 'Immature ('.$db_block->confirmations.')'; - - else if($db_block->category == 'stake') - echo 'Stake ('.$db_block->confirmations.')'; - - else if($db_block->category == 'generated') - echo 'Confirmed'; - - else if($db_block->category == 'generate') - echo 'Confirmed'; - - else if($db_block->category == 'new') - echo 'New'; - - echo ''; - echo ''; +foreach ($db_blocks as $db_block) { + $d = datetoa2($db_block->time); + if (!$db_block->coin_id) { + if (!$showrental) + continue; + + $reward = bitcoinvaluetoa($db_block->amount); + + $algo_color = getAlgoColors($db_block->algo); + echo ''; + echo ''; + echo 'Rental (' . $db_block->algo . ')'; + echo '$reward BTC'; + echo ''; + echo ''; + echo '' . $d . ' ago'; + echo ''; + echo 'Confirmed'; + echo ''; + echo ''; + continue; + } + + $coin = getdbo('db_coins', $db_block->coin_id); + if (!$coin) { + debuglog("coin not found {$db_block->coin_id}"); + continue; + } + + $height = number_format($db_block->height, 0, '.', ' '); + $diff = Itoa2($db_block->difficulty, 3); + + $algo_color = getAlgoColors($coin->algo); + echo ''; + echo ''; + $flags = $db_block->segwit ? ' ' : ''; + echo '' . $coin->name . '' . $flags . ''; + + echo '' . $db_block->amount . ' ' . $coin->symbol . ''; + echo '' . $diff . ''; + + echo '' . $height . ''; + echo '' . $d . ' ago'; + echo ''; + + if ($db_block->category == 'orphan') + echo 'Orphan'; + + else if ($db_block->category == 'immature') + echo 'Immature (' . $db_block->confirmations . ')'; + + else if ($db_block->category == 'stake') + echo 'Stake (' . $db_block->confirmations . ')'; + + else if ($db_block->category == 'generated') + echo 'Confirmed'; + + else if ($db_block->category == 'generate') + echo 'Confirmed'; + + else if ($db_block->category == 'new') + echo 'New'; + + echo ''; + echo ''; } @@ -663,11 +677,14 @@ function cronstate2text($state) ?> - + - - + diff --git a/web/yaamp/modules/site/connections.php b/web/yaamp/modules/site/connections.php index 6751b8d09..247ec7042 100644 --- a/web/yaamp/modules/site/connections.php +++ b/web/yaamp/modules/site/connections.php @@ -1,5 +1,4 @@ end; - - - - - - diff --git a/web/yaamp/modules/site/connections_results.php b/web/yaamp/modules/site/connections_results.php index 3429f35ea..09c7251a5 100644 --- a/web/yaamp/modules/site/connections_results.php +++ b/web/yaamp/modules/site/connections_results.php @@ -1,5 +1,4 @@ "; echo ""; -foreach($list as $conn) +foreach ($list as $conn) { - echo ""; - - $d1 = sectoa($conn->idle); - $d2 = datetoa2($conn->created); - $d3 = datetoa2($conn->last); - $b = Booltoa($conn->last == $last); - - echo "$conn->id"; - echo "$conn->user"; - echo "$conn->host"; - echo "$conn->db"; - echo "$d1"; - echo "$d2"; - echo "$d3"; - echo "$b"; - - echo ""; + echo ""; + + $d1 = sectoa($conn->idle); + $d2 = datetoa2($conn->created); + $d3 = datetoa2($conn->last); + $b = Booltoa($conn->last == $last); + + echo "$conn->id"; + echo "$conn->user"; + echo "$conn->host"; + echo "$conn->db"; + echo "$d1"; + echo "$d2"; + echo "$d3"; + echo "$b"; + + echo ""; } echo "
    "; -echo count($list)." connections to the database
    "; +echo count($list) . " connections to the database
    "; diff --git a/web/yaamp/modules/site/earning.php b/web/yaamp/modules/site/earning.php index 49520136b..5823f511c 100644 --- a/web/yaamp/modules/site/earning.php +++ b/web/yaamp/modules/site/earning.php @@ -2,9 +2,10 @@ echo getAdminSideBarLinks(); $coin_id = getiparam('id'); -if ($coin_id) { - $coin = getdbo('db_coins', $coin_id); - $this->pageTitle = 'Earnings - '.$coin->symbol; +if ($coin_id) +{ + $coin = getdbo('db_coins', $coin_id); + $this->pageTitle = 'Earnings - ' . $coin->symbol; } JavascriptFile("/yaamp/ui/js/jquery.metadata.js"); @@ -32,7 +33,8 @@ function main_error() function main_refresh() { - var url = '/site/earning_results?id='; + var url = '/site/earning_results?id='; var minh = $(window).height() - 150; $('#main_results').css({'min-height': minh + 'px'}); @@ -43,5 +45,4 @@ function main_refresh() @@ -16,6 +15,7 @@ end; + $coin_id = getiparam('id'); $saveSort = $coin_id ? 'false' : 'true'; @@ -53,106 +53,115 @@ end; + $coin_id = getiparam('id'); -$sqlFilter = $coin_id ? "AND coinid={$coin_id}": ''; +$sqlFilter = $coin_id ? "AND coinid={$coin_id}" : ''; $limit = $coin_id ? '' : 'LIMIT 1500'; $earnings = getdbolist('db_earnings', "status!=2 $sqlFilter ORDER BY create_time DESC $limit"); -$total = 0.; $total_btc = 0.; $totalimmat = 0.; $totalfees = 0.; $totalstake = 0.; +$total = 0.; +$total_btc = 0.; +$totalimmat = 0.; +$totalfees = 0.; +$totalstake = 0.; -foreach($earnings as $earning) +foreach ($earnings as $earning) { -// if(!$earning) debuglog($earning); - $coin = getdbo('db_coins', $earning->coinid); - if(!$coin) continue; - - $user = getdbo('db_accounts', $earning->userid); - if(!$user) continue; - - $block = getdbo('db_blocks', $earning->blockid); - if(!$block) continue; - - $t1 = datetoa2($earning->create_time). ' ago'; - $t2 = datetoa2($earning->mature_time); - if ($t2) $t2 = '+'.$t2; - - $coinimg = CHtml::image($coin->image, $coin->symbol, array('width'=>'16')); - $coinlink = CHtml::link($coin->name, '/site/coin?id='.$coin->id); - - echo ''; - echo "$coinimg"; - echo "$coinlink ($coin->symbol_show)"; - echo ''.$user->username.''; - echo ''.bitcoinvaluetoa($earning->amount).''; - echo ''.bitcoinvaluetoa($earning->amount * $earning->price).''; - echo ''.$block->height.''; - echo ''."$block->category ($block->confirmations)"; - echo ''."$t1 $t2"; - - echo ''; - echo 'clear '; - echo 'delete'; - echo ''; - -// echo "$earning->tx"; - echo ""; - -// if($block->category == 'generate' && $earning->status == 0) -// { -// $earning->status = 1; -// $earning->mature_time = time()-100*60; -// $earning->save(); -// } - - if($block->category == 'immature') { - $total += (double) $earning->amount; - $total_btc += (double) $earning->amount * $earning->price; - $totalimmat += (double) $earning->amount; - } - if($block->category == 'generate') { - $total += (double) $earning->amount; // "Exchange" state - $total_btc += (double) $earning->amount * $earning->price; - } - else if($block->category == 'stake' || $block->category == 'generated') { - $totalstake += (double) $earning->amount; - } + // if(!$earning) debuglog($earning); + $coin = getdbo('db_coins', $earning->coinid); + if (!$coin) continue; + + $user = getdbo('db_accounts', $earning->userid); + if (!$user) continue; + + $block = getdbo('db_blocks', $earning->blockid); + if (!$block) continue; + + $t1 = datetoa2($earning->create_time) . ' ago'; + $t2 = datetoa2($earning->mature_time); + if ($t2) $t2 = '+' . $t2; + + $coinimg = CHtml::image($coin->image, $coin->symbol, array( + 'width' => '16' + )); + $coinlink = CHtml::link($coin->name, '/site/coin?id=' . $coin->id); + + echo ''; + echo "$coinimg"; + echo "$coinlink ($coin->symbol_show)"; + echo '' . $user->username . ''; + echo '' . bitcoinvaluetoa($earning->amount) . ''; + echo '' . bitcoinvaluetoa($earning->amount * $earning->price) . ''; + echo '' . $block->height . ''; + echo '' . "$block->category ($block->confirmations)"; + echo '' . "$t1 $t2"; + + echo ''; + echo 'clear '; + echo 'delete'; + echo ''; + + // echo "$earning->tx"; + echo ""; + + // if($block->category == 'generate' && $earning->status == 0) + // { + // $earning->status = 1; + // $earning->mature_time = time()-100*60; + // $earning->save(); + // } + if ($block->category == 'immature') + { + $total += (double)$earning->amount; + $total_btc += (double)$earning->amount * $earning->price; + $totalimmat += (double)$earning->amount; + } + if ($block->category == 'generate') + { + $total += (double)$earning->amount; // "Exchange" state + $total_btc += (double)$earning->amount * $earning->price; + } + else if ($block->category == 'stake' || $block->category == 'generated') + { + $totalstake += (double)$earning->amount; + } } echo ''; echo ''; -echo count($earnings).' records'; +echo count($earnings) . ' records'; if (count($earnings) >= 1000) echo " ($limit)"; echo ''; echo ''; -if ($coin_id) { - $coin = getdbo('db_coins', $coin_id); - if (!$coin) exit; - $symbol = $coin->symbol; - $feepct = yaamp_fee($coin->algo); - $totalfees = ($total / ((100 - $feepct) / 100.)) - $total; - - $cleared = dboscalar("SELECT SUM(balance) FROM accounts WHERE coinid={$coin->id}"); - - echo '
    '; - - echo ''; - echo '"; - echo '"; - //echo '"; - echo '"; - if ($coin->rpcencoding == 'POS') - echo '"; - echo '
    Immature'.bitcoinvaluetoa($totalimmat)." $symbol
    Total owed'.bitcoinvaluetoa($total)." $symbol
    Total BTC'.bitcoinvaluetoa($total_btc)." BTC
    Pool Fees '.round($feepct,1).'%'.bitcoinvaluetoa($totalfees)." $symbol
    Stake'.bitcoinvaluetoa($totalstake)." $symbol
    '; - - echo ''; - echo '"; - echo '"; - $exchange = $total - $totalimmat; - echo ''; - echo '"; - echo '
    Balance'.bitcoinvaluetoa($coin->balance)." $symbol
    Cleared'.bitcoinvaluetoa($cleared)." $symbol
    Available'.bitcoinvaluetoa($coin->balance - $exchange - $cleared)." $symbol
    '; - - echo '
    '; -} \ No newline at end of file +if ($coin_id) +{ + $coin = getdbo('db_coins', $coin_id); + if (!$coin) exit; + $symbol = $coin->symbol; + $feepct = yaamp_fee($coin->algo); + $totalfees = ($total / ((100 - $feepct) / 100.)) - $total; + + $cleared = dboscalar("SELECT SUM(balance) FROM accounts WHERE coinid={$coin->id}"); + + echo '
    '; + + echo ''; + echo '"; + echo '"; + //echo '"; + echo '"; + if ($coin->rpcencoding == 'POS') echo '"; + echo '
    Immature' . bitcoinvaluetoa($totalimmat) . " $symbol
    Total owed' . bitcoinvaluetoa($total) . " $symbol
    Total BTC'.bitcoinvaluetoa($total_btc)." BTC
    Pool Fees ' . round($feepct, 1) . '%' . bitcoinvaluetoa($totalfees) . " $symbol
    Stake' . bitcoinvaluetoa($totalstake) . " $symbol
    '; + + echo ''; + echo '"; + echo '"; + $exchange = $total - $totalimmat; + echo ''; + echo '"; + echo '
    Balance' . bitcoinvaluetoa($coin->balance) . " $symbol
    Cleared' . bitcoinvaluetoa($cleared) . " $symbol
    Available' . bitcoinvaluetoa($coin->balance - $exchange - $cleared) . " $symbol
    '; + + echo '
    '; +} diff --git a/web/yaamp/modules/site/emptymarkets.php b/web/yaamp/modules/site/emptymarkets.php index 7070b8cd4..3cb606b65 100644 --- a/web/yaamp/modules/site/emptymarkets.php +++ b/web/yaamp/modules/site/emptymarkets.php @@ -1,5 +1,4 @@ end; + showTableSorter('maintable', "{ tableClass: 'dataGrid', headers: { 0: { sorter: false} }, @@ -40,26 +40,27 @@ (markets.deposit_address IS NULL OR (markets.message is not null and markets.message!='')) ORDER BY coins.id DESC, markets.id DESC"); -if (!empty($list)) -foreach($list as $item) +if (!empty($list)) foreach ($list as $item) { - $coin = getdbo('db_coins', $item['coinid']); - $market = getdbo('db_markets', $item['marketid']); + $coin = getdbo('db_coins', $item['coinid']); + $market = getdbo('db_markets', $item['marketid']); - $coinimg = CHtml::image($coin->image, $coin->symbol, array('width'=>'16')); + $coinimg = CHtml::image($coin->image, $coin->symbol, array( + 'width' => '16' + )); - echo ""; - echo "{$coinimg}"; - echo "$coin->name"; - echo "$market->name"; - echo "".bitcoinvaluetoa($market->price).""; - echo "$market->message"; - echo "$market->deposit_address"; - echo ""; + echo ""; + echo "{$coinimg}"; + echo "$coin->name"; + echo "$market->name"; + echo "" . bitcoinvaluetoa($market->price) . ""; + echo "$market->message"; + echo "$market->deposit_address"; + echo ""; } echo ""; echo '









    '; -echo 'Note: this table displays the enabled coin markets which does not have a deposit address (or have a message set)'; \ No newline at end of file +echo 'Note: this table displays the enabled coin markets which does not have a deposit address (or have a message set)'; diff --git a/web/yaamp/modules/site/exchange.php b/web/yaamp/modules/site/exchange.php index 0fb8e7d1d..6ff63bfe1 100644 --- a/web/yaamp/modules/site/exchange.php +++ b/web/yaamp/modules/site/exchange.php @@ -39,6 +39,3 @@ function main_refresh() } - - - diff --git a/web/yaamp/modules/site/exchange_results.php b/web/yaamp/modules/site/exchange_results.php index 54b64b732..ff5ddcf9d 100644 --- a/web/yaamp/modules/site/exchange_results.php +++ b/web/yaamp/modules/site/exchange_results.php @@ -1,5 +1,4 @@ "; @@ -21,43 +20,45 @@ $totalvalue = 0; $totalbid = 0; -foreach($orders as $order) +foreach ($orders as $order) { - $coin = getdbo('db_coins', $order->coinid); - $marketurl = getMarketUrl($coin, $order->market); - $coinimg = CHtml::image($coin->image, $coin->symbol, array('width'=>'16')); - - echo ""; - - $created = datetoa2($order->created). ' ago'; - $price = $order->price? bitcoinvaluetoa($order->price): ''; - - $price = bitcoinvaluetoa($order->price); - $bid = bitcoinvaluetoa($order->bid); - $value = bitcoinvaluetoa($order->amount*$order->price); - $bidvalue = bitcoinvaluetoa($order->amount*$order->bid); - $totalvalue += $value; - $totalbid += $bidvalue; - $bidpercent = $value>0? round(($value-$bidvalue)/$value*100, 1): 0; - - echo ''; - echo ""; - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - echo $bidvalue>0.01? "": ""; - -// echo ""; - echo ""; + $coin = getdbo('db_coins', $order->coinid); + $marketurl = getMarketUrl($coin, $order->market); + $coinimg = CHtml::image($coin->image, $coin->symbol, array( + 'width' => '16' + )); + + echo ""; + + $created = datetoa2($order->created) . ' ago'; + $price = $order->price ? bitcoinvaluetoa($order->price) : ''; + + $price = bitcoinvaluetoa($order->price); + $bid = bitcoinvaluetoa($order->bid); + $value = bitcoinvaluetoa($order->amount * $order->price); + $bidvalue = bitcoinvaluetoa($order->amount * $order->bid); + $totalvalue += $value; + $totalbid += $bidvalue; + $bidpercent = $value > 0 ? round(($value - $bidvalue) / $value * 100, 1) : 0; + + echo ''; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + echo $bidvalue > 0.01 ? "" : ""; + + // echo ""; + echo ""; } -$bidpercent = $totalvalue? round(($totalvalue-$totalbid)/$totalvalue*100, 1): ''; +$bidpercent = $totalvalue ? round(($totalvalue - $totalbid) / $totalvalue * 100, 1) : ''; echo ""; echo ""; @@ -71,10 +72,8 @@ echo "
    '.$coinimg.'$coin->name ($coin->symbol)$order->market$created$order->amount$price$bid ({$bidpercent}%)$bidvalue$bidvalue"; -// echo "[cancel] "; -// echo "[sell]"; -// echo "
    ' . $coinimg . '$coin->name ($coin->symbol)$order->market$created$order->amount$price$bid ({$bidpercent}%)$bidvalue$bidvalue"; + // echo "[cancel] "; + // echo "[sell]"; + // echo "
    "; ////////////////////////////////////////////////////////////////////////////////////////////////////////////// - $exchanges = getdbolist('db_exchange', "1 order by send_time desc limit 150"); //$exchanges = getdbolist('db_exchange', "status='waiting' order by send_time desc"); - echo "
    "; echo ""; echo ""; @@ -90,45 +89,44 @@ echo ""; echo ""; -foreach($exchanges as $exchange) +foreach ($exchanges as $exchange) { - $coin = getdbo('db_coins', $exchange->coinid); - $lowsymbol = strtolower($coin->symbol); - $coinimg = CHtml::image($coin->image, $coin->symbol, array('width'=>'16')); - - $marketurl = getMarketUrl($coin, $exchange->market); - - if($exchange->status == 'waiting') - echo ""; - else - echo ""; - - $sent = datetoa2($exchange->send_time). ' ago'; - $received = $exchange->receive_time? sectoa($exchange->receive_time-$exchange->send_time): ''; - $price = $exchange->price? bitcoinvaluetoa($exchange->price): bitcoinvaluetoa($coin->price); - $estimate = bitcoinvaluetoa($exchange->price_estimate); - $total = $exchange->price? bitcoinvaluetoa($exchange->quantity*$exchange->price): bitcoinvaluetoa($exchange->quantity*$coin->price); - - echo ''; - echo '"; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo $total>0.01? "": ""; - - echo ""; - echo ""; + $coin = getdbo('db_coins', $exchange->coinid); + $lowsymbol = strtolower($coin->symbol); + $coinimg = CHtml::image($coin->image, $coin->symbol, array( + 'width' => '16' + )); + + $marketurl = getMarketUrl($coin, $exchange->market); + + if ($exchange->status == 'waiting') echo ""; + else echo ""; + + $sent = datetoa2($exchange->send_time) . ' ago'; + $received = $exchange->receive_time ? sectoa($exchange->receive_time - $exchange->send_time) : ''; + $price = $exchange->price ? bitcoinvaluetoa($exchange->price) : bitcoinvaluetoa($coin->price); + $estimate = bitcoinvaluetoa($exchange->price_estimate); + $total = $exchange->price ? bitcoinvaluetoa($exchange->quantity * $exchange->price) : bitcoinvaluetoa($exchange->quantity * $coin->price); + + echo ''; + echo '"; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo $total > 0.01 ? "" : ""; + + echo ""; + echo ""; } echo "
    '.$coinimg.''."$coin->name ($coin->symbol)'.$exchange->market.''.$sent.''.$exchange->quantity.''.$estimate.''.$price.'$total$total"; - - if($exchange->status == 'waiting') - { - // echo "[clear]"; - echo "[del]"; - } - - echo "
    ' . $coinimg . '' . "$coin->name ($coin->symbol)' . $exchange->market . '' . $sent . '' . $exchange->quantity . '' . $estimate . '' . $price . '$total$total"; + + if ($exchange->status == 'waiting') + { + // echo "[clear]"; + echo "[del]"; + } + + echo "
    "; - diff --git a/web/yaamp/modules/site/index.php b/web/yaamp/modules/site/index.php index 8c18194bb..312dfe950 100644 --- a/web/yaamp/modules/site/index.php +++ b/web/yaamp/modules/site/index.php @@ -1,5 +1,4 @@ getState('yaamp-algo'); JavascriptFile("/extensions/jqplot/jquery.jqplot.js"); @@ -12,15 +11,15 @@ $height = '240px'; $min_payout = floatval(YAAMP_PAYMENTS_MINI); -$min_sunday = $min_payout/10; +$min_sunday = $min_payout / 10; -$payout_freq = (YAAMP_PAYMENTS_FREQ / 3600)." hours"; +$payout_freq = (YAAMP_PAYMENTS_FREQ / 3600) . " hours"; ?> + padding: 10px; margin-left: 20px; margin-right: 20px; margin-top: 15px; cursor: pointer; display: none;' + onclick='auto_page_resume();' align=center> + Auto refresh is paused - Click to resume
    "; echo ""; -if (!empty($res)) -foreach($res as $item) +if (!empty($res)) foreach ($res as $item) { -// debuglog("$i => $n"); - - $url = $item[0]; - $n = $item[1]; - $d = round($item[2], 3); - $avg = round($item[3], 3); - - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + // debuglog("$i => $n"); + $url = $item[0]; + $n = $item[1]; + $d = round($item[2], 3); + $avg = round($item[3], 3); + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; } echo "
    @@ -39,7 +38,7 @@
  •  
  • No registration is required, we do payouts in the currency you mine. Use your wallet address as the username.
  •  
  • -
  • Payouts are made automatically every for all balances above , or on Sunday.
  • +
  • Payouts are made automatically every for all balances above , or on Sunday.
  • For some coins, there is an initial delay before the first payout, please wait at least 6 hours before asking for support.
  • Blocks are distributed proportionally among valid submitted shares.
  • @@ -49,83 +48,144 @@
    - +
    How to mine with domain
    -
      - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
      StratumCoinWallet AddressRigName
      - - - - - - - - - -

      -a xevan -o stratum+tcp://mine.thepool.life:4533 -u . -p c=SAP

      -
      Stratum LocationCoinWallet AddressRig Name
      + + + + + + + + + + + +

      -a -o stratum+tcp://stratum.domain:0000 -u . -p c=

      +
      - -
    • <WALLET_ADDRESS> can be one of any currency we mine or a BTC address.
    • - -
    • <WALLET_ADDRESS> should be valid for the currency you mine. DO NOT USE a BTC address here, the auto exchange is disabled!
    • - -
    • As optional password, you can use -p c=<SYMBOL> if yiimp does not set the currency correctly on the Wallet page.
    • -
    • See the "Pool Status" area on the right for PORT numbers. Algorithms without associated coins are disabled.
    • - +
        +
      • <WALLET_ADDRESS> must be valid for the currency you mine. DO NOT USE a BTC address here, the auto exchange is disabled on these stratums!
      • + +
      • See the "domain coins" area on the right for PORT numbers. You may mine any coin regardless if the coin is enabled or not for autoexchange. Payouts will only be made in that coins currency.
      • +
      • Payouts are made automatically every hour for all balances above , or on Sunday.

      • -

    - +
    -
    Site Links
    +
    domain Links

    @@ -167,62 +227,62 @@ function page_refresh() { - pool_current_refresh(); - pool_history_refresh(); + pool_current_refresh(); + pool_history_refresh(); } function select_algo(algo) { - window.location.href = '/site/algo?algo='+algo+'&r=/'; + window.location.href = '/site/algo?algo='+algo+'&r=/'; } //////////////////////////////////////////////////// function pool_current_ready(data) { - $('#pool_current_results').html(data); + $('#pool_current_results').html(data); } function pool_current_refresh() { - var url = "/site/current_results"; - $.get(url, '', pool_current_ready); + var url = "/site/current_results"; + $.get(url, '', pool_current_ready); } //////////////////////////////////////////////////// function pool_history_ready(data) { - $('#pool_history_results').html(data); + $('#pool_history_results').html(data); } function pool_history_refresh() { - var url = "/site/history_results"; - $.get(url, '', pool_history_ready); + var url = "/site/history_results"; + $.get(url, '', pool_history_ready); } diff --git a/web/yaamp/modules/site/memcached.php b/web/yaamp/modules/site/memcached.php index a1252a68a..1c27c4820 100644 --- a/web/yaamp/modules/site/memcached.php +++ b/web/yaamp/modules/site/memcached.php @@ -1,59 +1,70 @@ refresh
    "; -$a = controller()->memcache->memcache->get( 'url-map'); +$a = controller() + ->memcache + ->memcache + ->get('url-map'); function printStats($stat) { - echo "
    "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - - $percCacheHit=((real)$stat["get_hits"]/ (real)$stat["cmd_get"] *100); - $percCacheHit=round($percCacheHit,3); - $percCacheMiss=100-$percCacheHit; - - echo ""; - echo ""; - - $MBRead= (real)$stat["bytes_read"]/(1024*1024); - - echo ""; - $MBWrite=(real) $stat["bytes_written"]/(1024*1024) ; - echo ""; - $MBSize=(real) $stat["limit_maxbytes"]/(1024*1024) ; - echo ""; - echo ""; - echo "
    Memcache Server version ".$stat["version"]."
    Process id of this server process".$stat["pid"]."
    Server uptime ".$stat["uptime"]." seconds
    Accumulated user time for this process".round($stat["rusage_user"],1)." seconds
    Accumulated system time for this process".round($stat["rusage_system"],1)." seconds
    Total number of items stored by this server start".$stat["total_items"]."
    Number of open connections ".$stat["curr_connections"]."
    Total number of connections opened since server start".$stat["total_connections"]."
    Number of connection structures allocated by the server".$stat["connection_structures"]."
    Cumulative number of retrieval requests".$stat["cmd_get"]."
    Cumulative number of storage requests".$stat["cmd_set"]."
    Number of keys that have been requested and found".$stat["get_hits"]." ($percCacheHit%)
    Number of items that have been requested and not found".$stat["get_misses"]." ($percCacheMiss%)
    Total number of bytes read by this server from network".$MBRead." MB
    Total number of bytes sent by this server to network".$MBWrite." MB
    Size allowed to use for storage".$MBSize." MB
    Items removed from cache to free memory for new items".$stat["evictions"]."
    "; + echo "
    "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + $percCacheHit = ((real)$stat["get_hits"] / (real)$stat["cmd_get"] * 100); + $percCacheHit = round($percCacheHit, 3); + $percCacheMiss = 100 - $percCacheHit; + + echo ""; + echo ""; + + $MBRead = (real)$stat["bytes_read"] / (1024 * 1024); + + echo ""; + $MBWrite = (real)$stat["bytes_written"] / (1024 * 1024); + echo ""; + $MBSize = (real)$stat["limit_maxbytes"] / (1024 * 1024); + echo ""; + echo ""; + echo "
    Memcache Server version " . $stat["version"] . "
    Process id of this server process" . $stat["pid"] . "
    Server uptime " . $stat["uptime"] . " seconds
    Accumulated user time for this process" . round($stat["rusage_user"], 1) . " seconds
    Accumulated system time for this process" . round($stat["rusage_system"], 1) . " seconds
    Total number of items stored by this server start" . $stat["total_items"] . "
    Number of open connections " . $stat["curr_connections"] . "
    Total number of connections opened since server start" . $stat["total_connections"] . "
    Number of connection structures allocated by the server" . $stat["connection_structures"] . "
    Cumulative number of retrieval requests" . $stat["cmd_get"] . "
    Cumulative number of storage requests" . $stat["cmd_set"] . "
    Number of keys that have been requested and found" . $stat["get_hits"] . " ($percCacheHit%)
    Number of items that have been requested and not found" . $stat["get_misses"] . " ($percCacheMiss%)
    Total number of bytes read by this server from network" . $MBRead . " MB
    Total number of bytes sent by this server to network" . $MBWrite . " MB
    Size allowed to use for storage" . $MBSize . " MB
    Items removed from cache to free memory for new items" . $stat["evictions"] . "
    "; } -printStats($this->memcache->memcache->getStats()); +printStats($this + ->memcache + ->memcache + ->getStats()); $res = array(); function cmp($a, $b) { - return $a[2] < $b[2]; + return $a[2] < $b[2]; } -if (!empty($a)) -foreach($a as $url=>$n) +if (!empty($a)) foreach ($a as $url => $n) { - $d = $this->memcache->get("$url-time"); - $avg = $d/$n; - - $res[] = array($url, $n, $d, $avg); + $d = $this + ->memcache + ->get("$url-time"); + $avg = $d / $n; + + $res[] = array( + $url, + $n, + $d, + $avg + ); } usort($res, 'cmp'); @@ -69,22 +80,20 @@ function cmp($a, $b) echo "
    $url$n$d$avg
    $url$n$d$avg
    "; diff --git a/web/yaamp/modules/site/miners.php b/web/yaamp/modules/site/miners.php index c72df2992..0c4371b3e 100644 --- a/web/yaamp/modules/site/miners.php +++ b/web/yaamp/modules/site/miners.php @@ -13,9 +13,9 @@ echo <<