diff --git a/stratum/algos/makefile b/stratum/algos/makefile index 4d049db..950ec2b 100644 --- a/stratum/algos/makefile +++ b/stratum/algos/makefile @@ -19,7 +19,7 @@ SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2z.c Sponge.c \ m7m.c magimath.cpp velvet.c \ argon2a.c ar2/blake2b.c ar2/argon2.c ar2/ref.c ar2/cores.c ar2/ar2-scrypt-jane.c \ hive.c pomelo.c \ - phi.c skunk.c sib.c veltor.c gost.c x11evo.c + phi.c polytimos.c skunk.c sib.c veltor.c gost.c x11evo.c OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o) OUTPUT=libalgos.a diff --git a/stratum/algos/polytimos.c b/stratum/algos/polytimos.c new file mode 100644 index 0000000..808042d --- /dev/null +++ b/stratum/algos/polytimos.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "gost.h" + +#include "common.h" + +void polytimos_hash(const char *input, char* output, uint32_t len) +{ + uint32_t _ALIGN(64) hash[16]; + + sph_skein512_context ctx_skein; + sph_shabal512_context ctx_shabal; + sph_echo512_context ctx_echo; + sph_luffa512_context ctx_luffa; + sph_fugue512_context ctx_fugue; + sph_gost512_context ctx_gost; + + sph_skein512_init(&ctx_skein); + sph_skein512(&ctx_skein, input, 80); + sph_skein512_close(&ctx_skein, (void*) hash); + + sph_shabal512_init(&ctx_shabal); + sph_shabal512(&ctx_shabal, hash, 64); + sph_shabal512_close(&ctx_shabal, hash); + + sph_echo512_init(&ctx_echo); + sph_echo512(&ctx_echo, hash, 64); + sph_echo512_close(&ctx_echo, hash); + + sph_luffa512_init(&ctx_luffa); + sph_luffa512(&ctx_luffa, hash, 64); + sph_luffa512_close(&ctx_luffa, 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, (const void*) hash, 64); + sph_gost512_close(&ctx_gost, (void*) hash); + + memcpy(output, hash, 32); +} + diff --git a/stratum/algos/polytimos.h b/stratum/algos/polytimos.h new file mode 100644 index 0000000..ec89cd3 --- /dev/null +++ b/stratum/algos/polytimos.h @@ -0,0 +1,16 @@ +#ifndef POLYTIMOS_H +#define POLYTIMOS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +void polytimos_hash(const char* input, char* output, uint32_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/stratum/config.sample/polytimos.conf b/stratum/config.sample/polytimos.conf new file mode 100644 index 0000000..d64975c --- /dev/null +++ b/stratum/config.sample/polytimos.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 8463 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = polytimos +difficulty = 0.125 +max_ttf = 40000 + diff --git a/stratum/stratum.cpp b/stratum/stratum.cpp index 1c87f99..77afcbc 100644 --- a/stratum/stratum.cpp +++ b/stratum/stratum.cpp @@ -135,6 +135,7 @@ YAAMP_ALGO g_algos[] = {"tribus", tribus_hash, 1, 0, 0}, {"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex }, {"phi", phi_hash, 1, 0, 0}, + {"polytimos", polytimos_hash, 1, 0, 0}, {"skunk", skunk_hash, 1, 0, 0}, {"bmw", bmw_hash, 1, 0, 0}, diff --git a/stratum/stratum.h b/stratum/stratum.h index 6ff448a..aacec49 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/sib.h" #include "algos/m7m.h" #include "algos/phi.h" +#include "algos/polytimos.h" #include "algos/tribus.h" #include "algos/veltor.h" #include "algos/velvet.h" diff --git a/web/yaamp/core/functions/yaamp.php b/web/yaamp/core/functions/yaamp.php index c57cbba..208a363 100755 --- a/web/yaamp/core/functions/yaamp.php +++ b/web/yaamp/core/functions/yaamp.php @@ -153,6 +153,7 @@ function getAlgoColors($algo) 'lyra2v2' => '#80c0f0', 'lyra2z' => '#80b0f0', 'phi' => '#a0a0e0', + 'polytimos' => '#dedefe', 'sib' => '#a0a0c0', 'skein' => '#80a0a0', 'skein2' => '#c8a060', @@ -230,6 +231,7 @@ function getAlgoPort($algo) 'bastion' => 6433, 'hsr' => 7433, 'phi' => 8333, + 'polytimos' => 8463, 'skunk' => 8433, 'tribus' => 8533, );