mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.15.0
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "algo/jh/jh-hash-4way.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#include "algo/cubehash/cube-hash-2way.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#include "algo/gost/sph_gost.h"
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#if defined(__VAES__)
|
||||
@@ -20,7 +20,7 @@ typedef struct {
|
||||
skein512_8way_context skein;
|
||||
jh512_8way_context jh;
|
||||
cube_4way_context cube;
|
||||
sph_fugue512_context fugue;
|
||||
hashState_fugue fugue;
|
||||
sph_gost512_context gost;
|
||||
#if defined(__VAES__)
|
||||
echo_4way_context echo;
|
||||
@@ -36,7 +36,7 @@ void init_phi1612_8way_ctx()
|
||||
skein512_8way_init( &phi1612_8way_ctx.skein );
|
||||
jh512_8way_init( &phi1612_8way_ctx.jh );
|
||||
cube_4way_init( &phi1612_8way_ctx.cube, 512, 16, 32 );
|
||||
sph_fugue512_init( &phi1612_8way_ctx.fugue );
|
||||
fugue512_Init( &phi1612_8way_ctx.fugue, 512 );
|
||||
sph_gost512_init( &phi1612_8way_ctx.gost );
|
||||
#if defined(__VAES__)
|
||||
echo_4way_init( &phi1612_8way_ctx.echo, 512 );
|
||||
@@ -79,29 +79,14 @@ void phi1612_8way_hash( void *state, const void *input )
|
||||
dintrlv_4x128_512( hash4, hash5, hash6, hash7, vhash );
|
||||
|
||||
// Fugue
|
||||
sph_fugue512( &ctx.fugue, hash0, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash0 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash1, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash1 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash2, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash2 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash3, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash3 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash4, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash4 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash5, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash5 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash6, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash6 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash7, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash7 );
|
||||
fugue512_full( &ctx.fugue, hash0, hash0, 64 );
|
||||
fugue512_full( &ctx.fugue, hash1, hash1, 64 );
|
||||
fugue512_full( &ctx.fugue, hash2, hash2, 64 );
|
||||
fugue512_full( &ctx.fugue, hash3, hash3, 64 );
|
||||
fugue512_full( &ctx.fugue, hash4, hash4, 64 );
|
||||
fugue512_full( &ctx.fugue, hash5, hash5, 64 );
|
||||
fugue512_full( &ctx.fugue, hash6, hash6, 64 );
|
||||
fugue512_full( &ctx.fugue, hash7, hash7, 64 );
|
||||
|
||||
// Gost
|
||||
sph_gost512( &ctx.gost, hash0, 64 );
|
||||
@@ -223,7 +208,7 @@ typedef struct {
|
||||
skein512_4way_context skein;
|
||||
jh512_4way_context jh;
|
||||
cubehashParam cube;
|
||||
sph_fugue512_context fugue;
|
||||
hashState_fugue fugue;
|
||||
sph_gost512_context gost;
|
||||
hashState_echo echo;
|
||||
} phi1612_4way_ctx_holder;
|
||||
@@ -235,7 +220,6 @@ void init_phi1612_4way_ctx()
|
||||
skein512_4way_init( &phi1612_4way_ctx.skein );
|
||||
jh512_4way_init( &phi1612_4way_ctx.jh );
|
||||
cubehashInit( &phi1612_4way_ctx.cube, 512, 16, 32 );
|
||||
sph_fugue512_init( &phi1612_4way_ctx.fugue );
|
||||
sph_gost512_init( &phi1612_4way_ctx.gost );
|
||||
init_echo( &phi1612_4way_ctx.echo, 512 );
|
||||
};
|
||||
@@ -275,17 +259,10 @@ void phi1612_4way_hash( void *state, const void *input )
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*)hash3, (const byte*) hash3, 64 );
|
||||
|
||||
// Fugue
|
||||
sph_fugue512( &ctx.fugue, hash0, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash0 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash1, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash1 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash2, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash2 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash3, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash3 );
|
||||
fugue512_full( &ctx.fugue, hash0, hash0, 64 );
|
||||
fugue512_full( &ctx.fugue, hash1, hash1, 64 );
|
||||
fugue512_full( &ctx.fugue, hash2, hash2, 64 );
|
||||
fugue512_full( &ctx.fugue, hash3, hash3, 64 );
|
||||
|
||||
// Gost
|
||||
sph_gost512( &ctx.gost, hash0, 64 );
|
||||
|
||||
@@ -8,24 +8,28 @@
|
||||
#include <stdio.h>
|
||||
#include "algo/gost/sph_gost.h"
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#include "algo/skein/sph_skein.h"
|
||||
#include "algo/jh/sph_jh.h"
|
||||
#ifdef __AES__
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#else
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
sph_skein512_context skein;
|
||||
sph_jh512_context jh;
|
||||
cubehashParam cube;
|
||||
sph_fugue512_context fugue;
|
||||
sph_gost512_context gost;
|
||||
#ifdef __AES__
|
||||
hashState_echo echo;
|
||||
hashState_fugue fugue;
|
||||
#else
|
||||
sph_echo512_context echo;
|
||||
sph_fugue512_context fugue;
|
||||
#endif
|
||||
} phi_ctx_holder;
|
||||
|
||||
@@ -42,8 +46,10 @@ void init_phi1612_ctx()
|
||||
sph_gost512_init( &phi_ctx.gost );
|
||||
#ifdef __AES__
|
||||
init_echo( &phi_ctx.echo, 512 );
|
||||
fugue512_Init( &phi_ctx.fugue, 512 );
|
||||
#else
|
||||
sph_echo512_init( &phi_ctx.echo );
|
||||
sph_fugue512_init( &phi_ctx.fugue );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -69,8 +75,13 @@ void phi1612_hash(void *output, const void *input)
|
||||
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*) hash, (const byte*)hash, 64 );
|
||||
|
||||
#if defined(__AES__)
|
||||
fugue512_Update( &ctx.fugue, hash, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash );
|
||||
#else
|
||||
sph_fugue512( &ctx.fugue, (const void*)hash, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, (void*)hash );
|
||||
#endif
|
||||
|
||||
sph_gost512( &ctx.gost, hash, 64 );
|
||||
sph_gost512_close( &ctx.gost, hash );
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include "algo/skein/skein-hash-4way.h"
|
||||
#include "algo/gost/sph_gost.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#include "algo/cubehash/cube-hash-2way.h"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
typedef struct {
|
||||
skein512_8way_context skein;
|
||||
cube_4way_context cube;
|
||||
sph_fugue512_context fugue;
|
||||
hashState_fugue fugue;
|
||||
sph_gost512_context gost;
|
||||
} skunk_8way_ctx_holder;
|
||||
|
||||
@@ -46,29 +46,15 @@ void skunk_8way_hash( void *output, const void *input )
|
||||
cube_4way_init( &ctx.cube, 512, 16, 32 );
|
||||
cube_4way_update_close( &ctx.cube, vhash, vhash, 64 );
|
||||
dintrlv_4x128_512( hash4, hash5, hash6, hash7, vhash );
|
||||
|
||||
sph_fugue512( &ctx.fugue, hash0, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash0 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash1, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash1 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash2, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash2 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash3, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash3 );
|
||||
sph_fugue512( &ctx.fugue, hash4, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash4 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash5, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash5 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash6, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash6 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash7, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash7 );
|
||||
|
||||
fugue512_full( &ctx.fugue, hash0, hash0, 64 );
|
||||
fugue512_full( &ctx.fugue, hash1, hash1, 64 );
|
||||
fugue512_full( &ctx.fugue, hash2, hash2, 64 );
|
||||
fugue512_full( &ctx.fugue, hash3, hash3, 64 );
|
||||
fugue512_full( &ctx.fugue, hash4, hash4, 64 );
|
||||
fugue512_full( &ctx.fugue, hash5, hash5, 64 );
|
||||
fugue512_full( &ctx.fugue, hash6, hash6, 64 );
|
||||
fugue512_full( &ctx.fugue, hash7, hash7, 64 );
|
||||
|
||||
sph_gost512( &ctx.gost, hash0, 64 );
|
||||
sph_gost512_close( &ctx.gost, output );
|
||||
@@ -140,7 +126,6 @@ bool skunk_8way_thread_init()
|
||||
{
|
||||
skein512_8way_init( &skunk_8way_ctx.skein );
|
||||
cube_4way_init( &skunk_8way_ctx.cube, 512, 16, 32 );
|
||||
sph_fugue512_init( &skunk_8way_ctx.fugue );
|
||||
sph_gost512_init( &skunk_8way_ctx.gost );
|
||||
return true;
|
||||
}
|
||||
@@ -150,7 +135,7 @@ bool skunk_8way_thread_init()
|
||||
typedef struct {
|
||||
skein512_4way_context skein;
|
||||
cubehashParam cube;
|
||||
sph_fugue512_context fugue;
|
||||
hashState_fugue fugue;
|
||||
sph_gost512_context gost;
|
||||
} skunk_4way_ctx_holder;
|
||||
|
||||
@@ -178,17 +163,10 @@ void skunk_4way_hash( void *output, const void *input )
|
||||
memcpy( &ctx.cube, &skunk_4way_ctx.cube, sizeof(cubehashParam) );
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*)hash3, (const byte*) hash3, 64 );
|
||||
|
||||
sph_fugue512( &ctx.fugue, hash0, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash0 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash1, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash1 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash2, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash2 );
|
||||
sph_fugue512_init( &ctx.fugue );
|
||||
sph_fugue512( &ctx.fugue, hash3, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash3 );
|
||||
fugue512_full( &ctx.fugue, hash0, hash0, 64 );
|
||||
fugue512_full( &ctx.fugue, hash1, hash1, 64 );
|
||||
fugue512_full( &ctx.fugue, hash2, hash2, 64 );
|
||||
fugue512_full( &ctx.fugue, hash3, hash3, 64 );
|
||||
|
||||
sph_gost512( &ctx.gost, hash0, 64 );
|
||||
sph_gost512_close( &ctx.gost, hash0 );
|
||||
@@ -252,7 +230,6 @@ bool skunk_4way_thread_init()
|
||||
{
|
||||
skein512_4way_init( &skunk_4way_ctx.skein );
|
||||
cubehashInit( &skunk_4way_ctx.cube, 512, 16, 32 );
|
||||
sph_fugue512_init( &skunk_4way_ctx.fugue );
|
||||
sph_gost512_init( &skunk_4way_ctx.gost );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
bool register_skunk_algo( algo_gate_t* gate )
|
||||
{
|
||||
gate->optimizations = SSE2_OPT | AVX2_OPT | AVX512_OPT;
|
||||
gate->optimizations = SSE2_OPT | AVX2_OPT | AVX512_OPT | AES_OPT;
|
||||
#if defined (SKUNK_8WAY)
|
||||
gate->miner_thread_init = (void*)&skunk_8way_thread_init;
|
||||
gate->scanhash = (void*)&scanhash_skunk_8way;
|
||||
|
||||
@@ -8,13 +8,21 @@
|
||||
#include <stdio.h>
|
||||
#include "algo/gost/sph_gost.h"
|
||||
#include "algo/skein/sph_skein.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#if defined(__AES__)
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#else
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
sph_skein512_context skein;
|
||||
cubehashParam cube;
|
||||
#if defined(__AES__)
|
||||
hashState_fugue fugue;
|
||||
#else
|
||||
sph_fugue512_context fugue;
|
||||
#endif
|
||||
sph_gost512_context gost;
|
||||
} skunk_ctx_holder;
|
||||
|
||||
@@ -32,8 +40,13 @@ void skunkhash( void *output, const void *input )
|
||||
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*) hash, (const byte*)hash, 64 );
|
||||
|
||||
#if defined(__AES__)
|
||||
fugue512_Update( &ctx.fugue, hash, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash );
|
||||
#else
|
||||
sph_fugue512( &ctx.fugue, hash, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash );
|
||||
#endif
|
||||
|
||||
sph_gost512( &ctx.gost, hash, 64 );
|
||||
sph_gost512_close( &ctx.gost, hash );
|
||||
@@ -87,8 +100,12 @@ bool skunk_thread_init()
|
||||
{
|
||||
sph_skein512_init( &skunk_ctx.skein );
|
||||
cubehashInit( &skunk_ctx.cube, 512, 16, 32 );
|
||||
sph_fugue512_init( &skunk_ctx.fugue );
|
||||
sph_gost512_init( &skunk_ctx.gost );
|
||||
#if defined(__AES__)
|
||||
fugue512_Init( &skunk_ctx.fugue, 512 );
|
||||
#else
|
||||
sph_fugue512_init( &skunk_ctx.fugue );
|
||||
#endif
|
||||
sph_gost512_init( &skunk_ctx.gost );
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "algo/simd/simd-hash-2way.h"
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#include "algo/hamsi/hamsi-hash-4way.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#if defined(__VAES__)
|
||||
#include "algo/groestl/groestl512-hash-4way.h"
|
||||
#include "algo/shavite/shavite-hash-4way.h"
|
||||
@@ -35,7 +35,7 @@ typedef struct {
|
||||
cube_4way_context cube;
|
||||
simd_4way_context simd;
|
||||
hamsi512_8way_context hamsi;
|
||||
sph_fugue512_context fugue;
|
||||
hashState_fugue fugue;
|
||||
#if defined(__VAES__)
|
||||
groestl512_4way_context groestl;
|
||||
shavite512_4way_context shavite;
|
||||
@@ -60,7 +60,7 @@ void init_x13_8way_ctx()
|
||||
cube_4way_init( &x13_8way_ctx.cube, 512, 16, 32 );
|
||||
simd_4way_init( &x13_8way_ctx.simd, 512 );
|
||||
hamsi512_8way_init( &x13_8way_ctx.hamsi );
|
||||
sph_fugue512_init( &x13_8way_ctx.fugue );
|
||||
fugue512_Init( &x13_8way_ctx.fugue, 512 );
|
||||
#if defined(__VAES__)
|
||||
groestl512_4way_init( &x13_8way_ctx.groestl, 64 );
|
||||
shavite512_4way_init( &x13_8way_ctx.shavite );
|
||||
@@ -255,29 +255,29 @@ void x13_8way_hash( void *state, const void *input )
|
||||
vhash );
|
||||
|
||||
// 13 Fugue serial
|
||||
sph_fugue512( &ctx.fugue, hash0, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash0 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash1, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash1 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash2, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash2 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash3, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash3 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash4, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash4 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash5, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash5 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash6, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash6 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash7, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash7 );
|
||||
fugue512_Update( &ctx.fugue, hash0, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash0 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash1, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash1 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash2, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash2 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash3, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash3 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash4, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash4 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash5, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash5 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash6, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash6 );
|
||||
memcpy( &ctx.fugue, &x13_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash7, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash7 );
|
||||
|
||||
memcpy( state, hash0, 32 );
|
||||
memcpy( state+ 32, hash1, 32 );
|
||||
@@ -344,7 +344,7 @@ typedef struct {
|
||||
simd_2way_context simd;
|
||||
hashState_echo echo;
|
||||
hamsi512_4way_context hamsi;
|
||||
sph_fugue512_context fugue;
|
||||
hashState_fugue fugue;
|
||||
} x13_4way_ctx_holder;
|
||||
|
||||
x13_4way_ctx_holder x13_4way_ctx __attribute__ ((aligned (64)));
|
||||
@@ -363,7 +363,7 @@ void init_x13_4way_ctx()
|
||||
simd_2way_init( &x13_4way_ctx.simd, 512 );
|
||||
init_echo( &x13_4way_ctx.echo, 512 );
|
||||
hamsi512_4way_init( &x13_4way_ctx.hamsi );
|
||||
sph_fugue512_init( &x13_4way_ctx.fugue );
|
||||
fugue512_Init( &x13_4way_ctx.fugue, 512 );
|
||||
};
|
||||
|
||||
void x13_4way_hash( void *state, const void *input )
|
||||
@@ -477,17 +477,17 @@ void x13_4way_hash( void *state, const void *input )
|
||||
dintrlv_4x64( hash0, hash1, hash2, hash3, vhash, 512 );
|
||||
|
||||
// 13 Fugue serial
|
||||
sph_fugue512( &ctx.fugue, hash0, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash0 );
|
||||
memcpy( &ctx.fugue, &x13_4way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash1, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash1 );
|
||||
memcpy( &ctx.fugue, &x13_4way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash2, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash2 );
|
||||
memcpy( &ctx.fugue, &x13_4way_ctx.fugue, sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash3, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash3 );
|
||||
fugue512_Update( &ctx.fugue, hash0, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash0 );
|
||||
memcpy( &ctx.fugue, &x13_4way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash1, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash1 );
|
||||
memcpy( &ctx.fugue, &x13_4way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash2, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash2 );
|
||||
memcpy( &ctx.fugue, &x13_4way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash3, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash3 );
|
||||
|
||||
memcpy( state, hash0, 32 );
|
||||
memcpy( state+32, hash1, 32 );
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "algo/skein/sph_skein.h"
|
||||
#include "algo/shavite/sph_shavite.h"
|
||||
#include "algo/hamsi/sph_hamsi.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/luffa/luffa_for_sse2.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#include "algo/simd/nist.h"
|
||||
@@ -21,9 +20,11 @@
|
||||
#if defined(__AES__)
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#include "algo/groestl/aes_ni/hash-groestl.h"
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#else
|
||||
#include "algo/groestl/sph_groestl.h"
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@@ -32,9 +33,11 @@ typedef struct {
|
||||
#if defined(__AES__)
|
||||
hashState_echo echo;
|
||||
hashState_groestl groestl;
|
||||
hashState_fugue fugue;
|
||||
#else
|
||||
sph_groestl512_context groestl;
|
||||
sph_echo512_context echo;
|
||||
sph_fugue512_context fugue;
|
||||
#endif
|
||||
sph_jh512_context jh;
|
||||
sph_keccak512_context keccak;
|
||||
@@ -44,7 +47,6 @@ typedef struct {
|
||||
sph_shavite512_context shavite;
|
||||
hashState_sd simd;
|
||||
sph_hamsi512_context hamsi;
|
||||
sph_fugue512_context fugue;
|
||||
} x13_ctx_holder;
|
||||
|
||||
x13_ctx_holder x13_ctx;
|
||||
@@ -56,9 +58,11 @@ void init_x13_ctx()
|
||||
#if defined(__AES__)
|
||||
init_groestl( &x13_ctx.groestl, 64 );
|
||||
init_echo( &x13_ctx.echo, 512 );
|
||||
fugue512_Init( &x13_ctx.fugue, 512 );
|
||||
#else
|
||||
sph_groestl512_init( &x13_ctx.groestl );
|
||||
sph_echo512_init( &x13_ctx.echo );
|
||||
sph_fugue512_init( &x13_ctx.fugue );
|
||||
#endif
|
||||
sph_skein512_init( &x13_ctx.skein );
|
||||
sph_jh512_init( &x13_ctx.jh );
|
||||
@@ -68,7 +72,6 @@ void init_x13_ctx()
|
||||
sph_shavite512_init( &x13_ctx.shavite );
|
||||
init_sd( &x13_ctx.simd, 512 );
|
||||
sph_hamsi512_init( &x13_ctx.hamsi );
|
||||
sph_fugue512_init( &x13_ctx.fugue );
|
||||
};
|
||||
|
||||
void x13hash(void *output, const void *input)
|
||||
@@ -84,11 +87,9 @@ void x13hash(void *output, const void *input)
|
||||
sph_bmw512_close( &ctx.bmw, hash );
|
||||
|
||||
#if defined(__AES__)
|
||||
init_groestl( &ctx.groestl, 64 );
|
||||
update_and_final_groestl( &ctx.groestl, (char*)hash,
|
||||
(const char*)hash, 512 );
|
||||
#else
|
||||
sph_groestl512_init( &ctx.groestl );
|
||||
sph_groestl512( &ctx.groestl, hash, 64 );
|
||||
sph_groestl512_close( &ctx.groestl, hash );
|
||||
#endif
|
||||
@@ -125,8 +126,13 @@ void x13hash(void *output, const void *input)
|
||||
sph_hamsi512( &ctx.hamsi, hash, 64 );
|
||||
sph_hamsi512_close( &ctx.hamsi, hash );
|
||||
|
||||
#if defined(__AES__)
|
||||
fugue512_Update( &ctx.fugue, hash, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash );
|
||||
#else
|
||||
sph_fugue512( &ctx.fugue, hash, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash );
|
||||
sph_fugue512_close( &ctx.fugue, hash );
|
||||
#endif
|
||||
|
||||
memcpy( output, hash, 32 );
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#include "algo/sm3/sm3-hash-4way.h"
|
||||
#include "algo/hamsi/hamsi-hash-4way.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#if defined(__VAES__)
|
||||
#include "algo/groestl/groestl512-hash-4way.h"
|
||||
#include "algo/shavite/shavite-hash-4way.h"
|
||||
@@ -35,7 +35,7 @@ typedef struct {
|
||||
simd_4way_context simd;
|
||||
sm3_8way_ctx_t sm3;
|
||||
hamsi512_8way_context hamsi;
|
||||
sph_fugue512_context fugue;
|
||||
hashState_fugue fugue;
|
||||
#if defined(__VAES__)
|
||||
groestl512_4way_context groestl;
|
||||
shavite512_4way_context shavite;
|
||||
@@ -61,7 +61,7 @@ void init_x13bcd_8way_ctx()
|
||||
simd_4way_init( &x13bcd_8way_ctx.simd, 512 );
|
||||
sm3_8way_init( &x13bcd_8way_ctx.sm3 );
|
||||
hamsi512_8way_init( &x13bcd_8way_ctx.hamsi );
|
||||
sph_fugue512_init( &x13bcd_8way_ctx.fugue );
|
||||
fugue512_Init( &x13bcd_8way_ctx.fugue, 512 );
|
||||
#if defined(__VAES__)
|
||||
groestl512_4way_init( &x13bcd_8way_ctx.groestl, 64 );
|
||||
shavite512_4way_init( &x13bcd_8way_ctx.shavite );
|
||||
@@ -257,36 +257,30 @@ void x13bcd_8way_hash( void *state, const void *input )
|
||||
hash4, hash5, hash6, hash7, vhash );
|
||||
|
||||
// Fugue serial
|
||||
sph_fugue512( &ctx.fugue, hash0, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, state );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash1, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, state+32 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash2, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, state+64 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash3, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, state+96 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash4, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, state+128 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash5, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, state+160 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash6, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, state+192 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash7, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, state+224 );
|
||||
fugue512_Update( &ctx.fugue, hash0, 512 );
|
||||
fugue512_Final( &ctx.fugue, state );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash1, 512 );
|
||||
fugue512_Final( &ctx.fugue, state+32 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash2, 512 );
|
||||
fugue512_Final( &ctx.fugue, state+64 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash3, 512 );
|
||||
fugue512_Final( &ctx.fugue, state+96 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash4, 512 );
|
||||
fugue512_Final( &ctx.fugue, state+128 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash5, 512 );
|
||||
fugue512_Final( &ctx.fugue, state+160 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash6, 512 );
|
||||
fugue512_Final( &ctx.fugue, state+192 );
|
||||
memcpy( &ctx.fugue, &x13bcd_8way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash7, 512 );
|
||||
fugue512_Final( &ctx.fugue, state+224 );
|
||||
|
||||
}
|
||||
|
||||
int scanhash_x13bcd_8way( struct work *work, uint32_t max_nonce,
|
||||
@@ -346,7 +340,7 @@ typedef struct {
|
||||
hashState_echo echo;
|
||||
sm3_4way_ctx_t sm3;
|
||||
hamsi512_4way_context hamsi;
|
||||
sph_fugue512_context fugue;
|
||||
hashState_fugue fugue;
|
||||
} x13bcd_4way_ctx_holder;
|
||||
|
||||
x13bcd_4way_ctx_holder x13bcd_4way_ctx __attribute__ ((aligned (64)));
|
||||
@@ -366,7 +360,7 @@ void init_x13bcd_4way_ctx()
|
||||
init_echo( &x13bcd_4way_ctx.echo, 512 );
|
||||
sm3_4way_init( &x13bcd_4way_ctx.sm3 );
|
||||
hamsi512_4way_init( &x13bcd_4way_ctx.hamsi );
|
||||
sph_fugue512_init( &x13bcd_4way_ctx.fugue );
|
||||
fugue512_Init( &x13bcd_4way_ctx.fugue, 512 );
|
||||
};
|
||||
|
||||
void x13bcd_4way_hash( void *state, const void *input )
|
||||
@@ -489,20 +483,17 @@ void x13bcd_4way_hash( void *state, const void *input )
|
||||
dintrlv_4x64( hash0, hash1, hash2, hash3, vhash, 512 );
|
||||
|
||||
// Fugue serial
|
||||
sph_fugue512( &ctx.fugue, hash0, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash0 );
|
||||
memcpy( &ctx.fugue, &x13bcd_4way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash1, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash1 );
|
||||
memcpy( &ctx.fugue, &x13bcd_4way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash2, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash2 );
|
||||
memcpy( &ctx.fugue, &x13bcd_4way_ctx.fugue,
|
||||
sizeof(sph_fugue512_context) );
|
||||
sph_fugue512( &ctx.fugue, hash3, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash3 );
|
||||
fugue512_Update( &ctx.fugue, hash0, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash0 );
|
||||
memcpy( &ctx.fugue, &x13bcd_4way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash1, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash1 );
|
||||
memcpy( &ctx.fugue, &x13bcd_4way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash2, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash2 );
|
||||
memcpy( &ctx.fugue, &x13bcd_4way_ctx.fugue, sizeof(hashState_fugue) );
|
||||
fugue512_Update( &ctx.fugue, hash3, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash3 );
|
||||
|
||||
memcpy( state, hash0, 32 );
|
||||
memcpy( state+32, hash1, 32 );
|
||||
|
||||
@@ -14,16 +14,17 @@
|
||||
#include "algo/skein/sph_skein.h"
|
||||
#include "algo/shavite/sph_shavite.h"
|
||||
#include "algo/hamsi/sph_hamsi.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#include "algo/simd/nist.h"
|
||||
|
||||
#if defined(__AES__)
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#include "algo/groestl/aes_ni/hash-groestl.h"
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#else
|
||||
#include "algo/groestl/sph_groestl.h"
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@@ -32,9 +33,11 @@ typedef struct {
|
||||
#if defined(__AES__)
|
||||
hashState_echo echo;
|
||||
hashState_groestl groestl;
|
||||
hashState_fugue fugue;
|
||||
#else
|
||||
sph_groestl512_context groestl;
|
||||
sph_echo512_context echo;
|
||||
sph_fugue512_context fugue;
|
||||
#endif
|
||||
sph_jh512_context jh;
|
||||
sph_keccak512_context keccak;
|
||||
@@ -43,7 +46,6 @@ typedef struct {
|
||||
sph_shavite512_context shavite;
|
||||
hashState_sd simd;
|
||||
sph_hamsi512_context hamsi;
|
||||
sph_fugue512_context fugue;
|
||||
sm3_ctx_t sm3;
|
||||
} x13bcd_ctx_holder;
|
||||
|
||||
@@ -56,9 +58,11 @@ void init_x13bcd_ctx()
|
||||
#if defined(__AES__)
|
||||
init_groestl( &x13bcd_ctx.groestl, 64 );
|
||||
init_echo( &x13bcd_ctx.echo, 512 );
|
||||
fugue512_Init( &x13bcd_ctx.fugue, 512 );
|
||||
#else
|
||||
sph_groestl512_init( &x13bcd_ctx.groestl );
|
||||
sph_echo512_init( &x13bcd_ctx.echo );
|
||||
sph_fugue512_init( &x13bcd_ctx.fugue );
|
||||
#endif
|
||||
sph_skein512_init( &x13bcd_ctx.skein );
|
||||
sph_jh512_init( &x13bcd_ctx.jh );
|
||||
@@ -68,7 +72,6 @@ void init_x13bcd_ctx()
|
||||
init_sd( &x13bcd_ctx.simd,512 );
|
||||
sm3_init( &x13bcd_ctx.sm3 );
|
||||
sph_hamsi512_init( &x13bcd_ctx.hamsi );
|
||||
sph_fugue512_init( &x13bcd_ctx.fugue );
|
||||
};
|
||||
|
||||
void x13bcd_hash(void *output, const void *input)
|
||||
@@ -129,8 +132,13 @@ void x13bcd_hash(void *output, const void *input)
|
||||
sph_hamsi512( &ctx.hamsi, hash, 64 );
|
||||
sph_hamsi512_close( &ctx.hamsi, hash );
|
||||
|
||||
#if defined(__AES__)
|
||||
fugue512_Update( &ctx.fugue, hash, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash );
|
||||
#else
|
||||
sph_fugue512( &ctx.fugue, hash, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash );
|
||||
#endif
|
||||
|
||||
memcpy( output, hash, 32 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user