polytimos algo

This commit is contained in:
Tanguy Pruvot 2017-11-16 08:53:48 +01:00
parent a1d3ecd0da
commit bfd614859f
7 changed files with 89 additions and 1 deletions

View file

@ -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

52
stratum/algos/polytimos.c Normal file
View file

@ -0,0 +1,52 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <sha3/sph_skein.h>
#include <sha3/sph_shabal.h>
#include <sha3/sph_echo.h>
#include <sha3/sph_luffa.h>
#include <sha3/sph_fugue.h>
#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);
}

16
stratum/algos/polytimos.h Normal file
View file

@ -0,0 +1,16 @@
#ifndef POLYTIMOS_H
#define POLYTIMOS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
void polytimos_hash(const char* input, char* output, uint32_t len);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -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

View file

@ -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},

View file

@ -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"

View file

@ -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,
);