Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion stratum/algos/yescrypt-opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions stratum/algos/yescrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
1 change: 1 addition & 0 deletions stratum/algos/yescrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
15 changes: 15 additions & 0 deletions stratum/config.sample/yescryptR16.conf
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions stratum/stratum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
4 changes: 4 additions & 0 deletions web/yaamp/core/functions/yaamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function yaamp_get_algos()
'veltor',
'velvet',
'yescrypt',
'yescryptR16',
'whirlpool',
'zr5',
);
Expand Down Expand Up @@ -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,
);

Expand Down Expand Up @@ -171,6 +173,7 @@ function getAlgoColors($algo)
'velvet' => '#aac0cc',
'whirlpool' => '#d0e0e0',
'yescrypt' => '#e0d0e0',
'yescryptR16' => '#e2d0e2',
'zr5' => '#d0b0d0',

'MN' => '#ffffff', // MasterNode Earnings
Expand Down Expand Up @@ -235,6 +238,7 @@ function getAlgoPort($algo)
'veltor' => 5034,
'velvet' => 6133,
'yescrypt' => 6233,
'yescryptR16' => 6333,
'bastion' => 6433,
'hsr' => 7433,
'phi' => 8333,
Expand Down