mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 09:27:25 +00:00
yescryptR16 algo (#217)
Algo yescryptR16 for Yenten [YTN] https://bitcointalk.org/?topic=2329470.0 stratum changes from https://github.com/bubasik/yiimp
This commit is contained in:
parent
a79e21491a
commit
d69d3ce3fc
6 changed files with 31 additions and 1 deletions
|
@ -942,7 +942,12 @@ yescrypt_kdf(const yescrypt_shared_t * shared, yescrypt_local_t * local,
|
|||
{
|
||||
HMAC_SHA256_CTX_Y ctx;
|
||||
HMAC_SHA256_Init_Y(&ctx, buf, buflen);
|
||||
HMAC_SHA256_Update_Y(&ctx, salt, saltlen);
|
||||
if (r == 16) { // yescryptR16
|
||||
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 */
|
||||
|
|
|
@ -364,3 +364,7 @@ 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 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);
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ extern "C" {
|
|||
#include <stdlib.h> /* for size_t */
|
||||
|
||||
void yescrypt_hash(const char* input, char* output, uint32_t len);
|
||||
void yescryptR16_hash(const char* input, char* output, uint32_t len);
|
||||
|
||||
/**
|
||||
* crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen):
|
||||
|
|
15
stratum/config.sample/yescryptR16.conf
Normal file
15
stratum/config.sample/yescryptR16.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
[TCP]
|
||||
server = yaamp.com
|
||||
port = 6333
|
||||
password = tu8tu5
|
||||
|
||||
[SQL]
|
||||
host = yaampdb
|
||||
database = yaamp
|
||||
username = root
|
||||
password = patofpaq
|
||||
|
||||
[STRATUM]
|
||||
algo = yescryptR16
|
||||
difficulty = 2
|
||||
max_ttf = 400000000
|
|
@ -150,6 +150,7 @@ YAAMP_ALGO g_algos[] =
|
|||
{"penta", penta_hash, 1, 0, 0},
|
||||
{"skein2", skein2_hash, 1, 0, 0},
|
||||
{"yescrypt", yescrypt_hash, 0x10000, 0, 0},
|
||||
{"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 },
|
||||
{"zr5", zr5_hash, 1, 0, 0},
|
||||
|
||||
{"hive", hive_hash, 0x10000, 0, 0},
|
||||
|
|
|
@ -55,6 +55,7 @@ function yaamp_get_algos()
|
|||
'veltor',
|
||||
'velvet',
|
||||
'yescrypt',
|
||||
'yescryptR16',
|
||||
'whirlpool',
|
||||
'zr5',
|
||||
);
|
||||
|
@ -109,6 +110,7 @@ function yaamp_get_algo_norm($algo)
|
|||
'velvet' => 1.0,
|
||||
'whirlpool' => 1.0,
|
||||
'yescrypt' => 1.0,
|
||||
'yescryptR16' => 1.0,
|
||||
'zr5' => 1.0,
|
||||
);
|
||||
|
||||
|
@ -171,6 +173,7 @@ function getAlgoColors($algo)
|
|||
'velvet' => '#aac0cc',
|
||||
'whirlpool' => '#d0e0e0',
|
||||
'yescrypt' => '#e0d0e0',
|
||||
'yescryptR16' => '#e2d0e2',
|
||||
'zr5' => '#d0b0d0',
|
||||
|
||||
'MN' => '#ffffff', // MasterNode Earnings
|
||||
|
@ -235,6 +238,7 @@ function getAlgoPort($algo)
|
|||
'veltor' => 5034,
|
||||
'velvet' => 6133,
|
||||
'yescrypt' => 6233,
|
||||
'yescryptR16' => 6333,
|
||||
'bastion' => 6433,
|
||||
'hsr' => 7433,
|
||||
'phi' => 8333,
|
||||
|
|
Loading…
Add table
Reference in a new issue