forked from manfromafar/yiimp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters