Permalink
Browse files

Add yescryptR32 (#247)

  • Loading branch information...
exmac authored and tpruvot committed Mar 19, 2018
1 parent 77e2624 commit 1b3f15fef3c42379cd3955d1ea1216167cc5e38d
@@ -942,6 +942,9 @@ yescrypt_kdf(const yescrypt_shared_t * shared, yescrypt_local_t * local,
{
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);
}
View
@@ -368,3 +368,8 @@ 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);
}
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);
}
View
@@ -40,6 +40,7 @@ extern "C" {
void yescrypt_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);
/**
* crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen):
@@ -0,0 +1,15 @@
[TCP]
server = yaamp.com
port = 6343
password = tu8tu5
[SQL]
host = yaampdb
database = yaamp
username = root
password = patofpaq
[STRATUM]
algo = yescryptR32
difficulty = 1
max_ttf = 400000000
View
@@ -165,6 +165,7 @@ YAAMP_ALGO g_algos[] =
{"skein2", skein2_hash, 1, 0, 0},
{"yescrypt", yescrypt_hash, 0x10000, 0, 0},
{"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 },
{"yescryptR32", yescryptR32_hash, 0x10000, 0, 0 },
{"zr5", zr5_hash, 1, 0, 0},
{"a5a", a5a_hash, 0x10000, 0, 0},
@@ -58,6 +58,7 @@ function yaamp_get_algos()
'velvet',
'yescrypt',
'yescryptR16',
'yescryptR32',
'whirlpool',
'zr5',
);
@@ -113,6 +114,7 @@ function yaamp_get_algo_norm($algo)
'whirlpool' => 1.0,
'yescrypt' => 1.0,
'yescryptR16' => 1.0,
'yescryptR32' => 1.0,
'zr5' => 1.0,
);
@@ -178,6 +180,7 @@ function getAlgoColors($algo)
'whirlpool' => '#d0e0e0',
'yescrypt' => '#e0d0e0',
'yescryptR16' => '#e2d0e2',
'yescryptR32' => '#e2d0d2',
'zr5' => '#d0b0d0',
'MN' => '#ffffff', // MasterNode Earnings
@@ -244,6 +247,7 @@ function getAlgoPort($algo)
'velvet' => 6133,
'yescrypt' => 6233,
'yescryptR16' => 6333,
'yescryptR32' => 6343,
'bastion' => 6433,
'hsr' => 7433,
'phi' => 8333,

0 comments on commit 1b3f15f

Please sign in to comment.