This commit is contained in:
Jay D Dee
2023-09-28 18:43:18 -04:00
parent be88afc349
commit bc5a5c6df8
88 changed files with 5526 additions and 3361 deletions

View File

@@ -3,7 +3,7 @@
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "algo/blake/blake-hash-4way.h"
#include "algo/blake/blake512-hash.h"
#include "algo/bmw/bmw-hash-4way.h"
#include "algo/groestl/aes_ni/hash-groestl.h"
#include "algo/skein/skein-hash-4way.h"

View File

@@ -3,7 +3,7 @@
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "algo/blake/blake-hash-4way.h"
#include "algo/blake/blake512-hash.h"
#include "algo/bmw/bmw-hash-4way.h"
#include "algo/groestl/aes_ni/hash-groestl.h"
#include "algo/skein/skein-hash-4way.h"
@@ -27,6 +27,431 @@
#include "algo/haval/haval-hash-4way.h"
#include "algo/sha/sha512-hash.h"
#if defined(X17_16X32)
union _x17_16way_context_overlay
{
blake512_8way_context blake;
bmw512_8way_context bmw;
skein512_8way_context skein;
jh512_8way_context jh;
keccak512_8way_context keccak;
luffa_4way_context luffa;
cube_4way_2buf_context cube;
#if defined(__VAES__)
groestl512_4way_context groestl;
shavite512_4way_context shavite;
echo_4way_context echo;
#else
hashState_groestl groestl;
sph_shavite512_context shavite;
hashState_echo echo;
#endif
simd_4way_context simd;
hamsi512_8way_context hamsi;
// hamsi512_16x32_context hamsi;
hashState_fugue fugue;
shabal512_16way_context shabal;
sph_whirlpool_context whirlpool;
sha512_8way_context sha512;
haval256_5_16way_context haval;
} __attribute__ ((aligned (64)));
typedef union _x17_16way_context_overlay x17_16way_context_overlay;
static __thread __m512i x17_16way_midstate[16] __attribute__((aligned(64)));
static __thread blake512_8way_context blake512_8way_ctx __attribute__((aligned(64)));
int x17_16way_hash( void *state, const __m512i nonceA, const __m512i nonceB,
int thr_id )
{
uint64_t vhashA[8*16] __attribute__ ((aligned (128)));
uint64_t vhashB[8*8] __attribute__ ((aligned (64)));
uint64_t vhashC[8*4] __attribute__ ((aligned (64)));
uint64_t vhashD[8*4] __attribute__ ((aligned (64)));
uint64_t hash00[8] __attribute__ ((aligned (32)));
uint64_t hash01[8] __attribute__ ((aligned (32)));
uint64_t hash02[8] __attribute__ ((aligned (32)));
uint64_t hash03[8] __attribute__ ((aligned (32)));
uint64_t hash04[8] __attribute__ ((aligned (32)));
uint64_t hash05[8] __attribute__ ((aligned (32)));
uint64_t hash06[8] __attribute__ ((aligned (32)));
uint64_t hash07[8] __attribute__ ((aligned (32)));
uint64_t hash08[8] __attribute__ ((aligned (32)));
uint64_t hash09[8] __attribute__ ((aligned (32)));
uint64_t hash10[8] __attribute__ ((aligned (32)));
uint64_t hash11[8] __attribute__ ((aligned (32)));
uint64_t hash12[8] __attribute__ ((aligned (32)));
uint64_t hash13[8] __attribute__ ((aligned (32)));
uint64_t hash14[8] __attribute__ ((aligned (32)));
uint64_t hash15[8] __attribute__ ((aligned (32)));
x17_16way_context_overlay ctx;
memcpy( &ctx.blake, &blake512_8way_ctx, sizeof (blake512_8way_ctx) );
blake512_8way_final_le( &blake512_8way_ctx, vhashA, nonceA,
x17_16way_midstate );
blake512_8way_final_le( &ctx.blake, vhashB, nonceB,
x17_16way_midstate );
bmw512_8way_full( &ctx.bmw, vhashA, vhashA, 64 );
bmw512_8way_full( &ctx.bmw, vhashB, vhashB, 64 );
#if defined(__VAES__)
rintrlv_8x64_4x128( vhashC, vhashD, vhashA, 512 );
groestl512_4way_full( &ctx.groestl, vhashC, vhashC, 64 );
groestl512_4way_full( &ctx.groestl, vhashD, vhashD, 64 );
rintrlv_4x128_8x64( vhashA, vhashC, vhashD, 512 );
rintrlv_8x64_4x128( vhashC, vhashD, vhashB, 512 );
groestl512_4way_full( &ctx.groestl, vhashC, vhashC, 64 );
groestl512_4way_full( &ctx.groestl, vhashD, vhashD, 64 );
rintrlv_4x128_8x64( vhashA, vhashC, vhashD, 512 );
#else
dintrlv_8x64_512( hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07, vhashA );
dintrlv_8x64_512( hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15, vhashB );
groestl512_full( &ctx.groestl, (char*)hash00, (char*)hash00, 512 );
groestl512_full( &ctx.groestl, (char*)hash01, (char*)hash01, 512 );
groestl512_full( &ctx.groestl, (char*)hash02, (char*)hash02, 512 );
groestl512_full( &ctx.groestl, (char*)hash03, (char*)hash03, 512 );
groestl512_full( &ctx.groestl, (char*)hash04, (char*)hash04, 512 );
groestl512_full( &ctx.groestl, (char*)hash05, (char*)hash05, 512 );
groestl512_full( &ctx.groestl, (char*)hash06, (char*)hash06, 512 );
groestl512_full( &ctx.groestl, (char*)hash07, (char*)hash07, 512 );
groestl512_full( &ctx.groestl, (char*)hash08, (char*)hash08, 512 );
groestl512_full( &ctx.groestl, (char*)hash09, (char*)hash09, 512 );
groestl512_full( &ctx.groestl, (char*)hash10, (char*)hash10, 512 );
groestl512_full( &ctx.groestl, (char*)hash11, (char*)hash11, 512 );
groestl512_full( &ctx.groestl, (char*)hash12, (char*)hash12, 512 );
groestl512_full( &ctx.groestl, (char*)hash13, (char*)hash13, 512 );
groestl512_full( &ctx.groestl, (char*)hash14, (char*)hash14, 512 );
groestl512_full( &ctx.groestl, (char*)hash15, (char*)hash15, 512 );
intrlv_8x64_512( vhashA, hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07 );
intrlv_8x64_512( vhashB, hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15 );
#endif
skein512_8way_full( &ctx.skein, vhashA, vhashA, 64 );
skein512_8way_full( &ctx.skein, vhashB, vhashB, 64 );
jh512_8way_init( &ctx.jh );
jh512_8way_update( &ctx.jh, vhashA, 64 );
jh512_8way_close( &ctx.jh, vhashA );
jh512_8way_init( &ctx.jh );
jh512_8way_update( &ctx.jh, vhashB, 64 );
jh512_8way_close( &ctx.jh, vhashB );
keccak512_8way_init( &ctx.keccak );
keccak512_8way_update( &ctx.keccak, vhashA, 64 );
keccak512_8way_close( &ctx.keccak, vhashA );
keccak512_8way_init( &ctx.keccak );
keccak512_8way_update( &ctx.keccak, vhashB, 64 );
keccak512_8way_close( &ctx.keccak, vhashB );
//
rintrlv_8x64_4x128( vhashC, vhashD, vhashA, 512 );
luffa512_4way_full( &ctx.luffa, vhashC, vhashC, 64 );
luffa512_4way_full( &ctx.luffa, vhashD, vhashD, 64 );
cube_4way_2buf_full( &ctx.cube, vhashC, vhashD, 512, vhashC, vhashD, 64 );
#if defined(__VAES__)
shavite512_4way_full( &ctx.shavite, vhashC, vhashC, 64 );
shavite512_4way_full( &ctx.shavite, vhashD, vhashD, 64 );
#else
dintrlv_4x128_512( hash00, hash01, hash02, hash03, vhashC );
dintrlv_4x128_512( hash04, hash05, hash06, hash07, vhashD );
shavite512_full( &ctx.shavite, hash00, hash00, 64 );
shavite512_full( &ctx.shavite, hash01, hash01, 64 );
shavite512_full( &ctx.shavite, hash02, hash02, 64 );
shavite512_full( &ctx.shavite, hash03, hash03, 64 );
shavite512_full( &ctx.shavite, hash04, hash04, 64 );
shavite512_full( &ctx.shavite, hash05, hash05, 64 );
shavite512_full( &ctx.shavite, hash06, hash06, 64 );
shavite512_full( &ctx.shavite, hash07, hash07, 64 );
intrlv_4x128_512( vhashC, hash00, hash01, hash02, hash03 );
intrlv_4x128_512( vhashD, hash04, hash05, hash06, hash07 );
#endif
simd512_4way_full( &ctx.simd, vhashC, vhashC, 64 );
simd512_4way_full( &ctx.simd, vhashD, vhashD, 64 );
#if defined(__VAES__)
echo_4way_full( &ctx.echo, vhashC, 512, vhashC, 64 );
echo_4way_full( &ctx.echo, vhashD, 512, vhashD, 64 );
rintrlv_4x128_8x64( vhashA, vhashC, vhashD, 512 );
#else
dintrlv_4x128_512( hash00, hash01, hash02, hash03, vhashC );
dintrlv_4x128_512( hash04, hash05, hash06, hash07, vhashD );
echo_full( &ctx.echo, (BitSequence *)hash00, 512,
(const BitSequence *)hash00, 64 );
echo_full( &ctx.echo, (BitSequence *)hash01, 512,
(const BitSequence *)hash01, 64 );
echo_full( &ctx.echo, (BitSequence *)hash02, 512,
(const BitSequence *)hash02, 64 );
echo_full( &ctx.echo, (BitSequence *)hash03, 512,
(const BitSequence *)hash03, 64 );
echo_full( &ctx.echo, (BitSequence *)hash04, 512,
(const BitSequence *)hash04, 64 );
echo_full( &ctx.echo, (BitSequence *)hash05, 512,
(const BitSequence *)hash05, 64 );
echo_full( &ctx.echo, (BitSequence *)hash06, 512,
(const BitSequence *)hash06, 64 );
echo_full( &ctx.echo, (BitSequence *)hash07, 512,
(const BitSequence *)hash07, 64 );
intrlv_8x64_512( vhashA, hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07 );
#endif
//
rintrlv_8x64_4x128( vhashC, vhashD, vhashB, 512 );
luffa512_4way_full( &ctx.luffa, vhashC, vhashC, 64 );
luffa512_4way_full( &ctx.luffa, vhashD, vhashD, 64 );
cube_4way_2buf_full( &ctx.cube, vhashC, vhashD, 512, vhashC, vhashD, 64 );
#if defined(__VAES__)
shavite512_4way_full( &ctx.shavite, vhashC, vhashC, 64 );
shavite512_4way_full( &ctx.shavite, vhashD, vhashD, 64 );
#else
dintrlv_4x128_512( hash08, hash09, hash10, hash11, vhashC );
dintrlv_4x128_512( hash12, hash13, hash14, hash15, vhashD );
shavite512_full( &ctx.shavite, hash08, hash08, 64 );
shavite512_full( &ctx.shavite, hash09, hash09, 64 );
shavite512_full( &ctx.shavite, hash10, hash10, 64 );
shavite512_full( &ctx.shavite, hash11, hash11, 64 );
shavite512_full( &ctx.shavite, hash12, hash12, 64 );
shavite512_full( &ctx.shavite, hash13, hash13, 64 );
shavite512_full( &ctx.shavite, hash14, hash14, 64 );
shavite512_full( &ctx.shavite, hash15, hash15, 64 );
intrlv_4x128_512( vhashC, hash08, hash09, hash10, hash11 );
intrlv_4x128_512( vhashD, hash12, hash13, hash14, hash15 );
#endif
simd512_4way_full( &ctx.simd, vhashC, vhashC, 64 );
simd512_4way_full( &ctx.simd, vhashD, vhashD, 64 );
#if defined(__VAES__)
echo_4way_full( &ctx.echo, vhashC, 512, vhashC, 64 );
echo_4way_full( &ctx.echo, vhashD, 512, vhashD, 64 );
rintrlv_4x128_8x64( vhashB, vhashC, vhashD, 512 );
#else
dintrlv_4x128_512( hash08, hash09, hash10, hash11, vhashC );
dintrlv_4x128_512( hash12, hash13, hash14, hash15, vhashD );
echo_full( &ctx.echo, (BitSequence *)hash08, 512,
(const BitSequence *)hash08, 64 );
echo_full( &ctx.echo, (BitSequence *)hash09, 512,
(const BitSequence *)hash09, 64 );
echo_full( &ctx.echo, (BitSequence *)hash10, 512,
(const BitSequence *)hash10, 64 );
echo_full( &ctx.echo, (BitSequence *)hash11, 512,
(const BitSequence *)hash11, 64 );
echo_full( &ctx.echo, (BitSequence *)hash12, 512,
(const BitSequence *)hash12, 64 );
echo_full( &ctx.echo, (BitSequence *)hash13, 512,
(const BitSequence *)hash13, 64 );
echo_full( &ctx.echo, (BitSequence *)hash14, 512,
(const BitSequence *)hash14, 64 );
echo_full( &ctx.echo, (BitSequence *)hash15, 512,
(const BitSequence *)hash15, 64 );
intrlv_8x64_512( vhashB, hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15 );
#endif
//
/*
intrlv_16x32( vhashA, hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07,
hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15, 512 );
hamsi512_16x32_full( &ctx.hamsi, vhashA, vhashA, 64 );
dintrlv_16x32( hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07,
hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15, vhashA, 512 );
*/
hamsi512_8way_init( &ctx.hamsi );
hamsi512_8way_update( &ctx.hamsi, vhashA, 64 );
hamsi512_8way_close( &ctx.hamsi, vhashA );
dintrlv_8x64_512( hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07, vhashA );
hamsi512_8way_init( &ctx.hamsi );
hamsi512_8way_update( &ctx.hamsi, vhashB, 64 );
hamsi512_8way_close( &ctx.hamsi, vhashB );
dintrlv_8x64_512( hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15, vhashB );
fugue512_full( &ctx.fugue, hash00, hash00, 64 );
fugue512_full( &ctx.fugue, hash01, hash01, 64 );
fugue512_full( &ctx.fugue, hash02, hash02, 64 );
fugue512_full( &ctx.fugue, hash03, hash03, 64 );
fugue512_full( &ctx.fugue, hash04, hash04, 64 );
fugue512_full( &ctx.fugue, hash05, hash05, 64 );
fugue512_full( &ctx.fugue, hash06, hash06, 64 );
fugue512_full( &ctx.fugue, hash07, hash07, 64 );
fugue512_full( &ctx.fugue, hash08, hash08, 64 );
fugue512_full( &ctx.fugue, hash09, hash09, 64 );
fugue512_full( &ctx.fugue, hash10, hash10, 64 );
fugue512_full( &ctx.fugue, hash11, hash11, 64 );
fugue512_full( &ctx.fugue, hash12, hash12, 64 );
fugue512_full( &ctx.fugue, hash13, hash13, 64 );
fugue512_full( &ctx.fugue, hash14, hash14, 64 );
fugue512_full( &ctx.fugue, hash15, hash15, 64 );
intrlv_16x32_512( vhashA, hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07,
hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15 );
shabal512_16way_init( &ctx.shabal );
shabal512_16way_update( &ctx.shabal, vhashA, 64 );
shabal512_16way_close( &ctx.shabal, vhashA );
dintrlv_16x32_512( hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07,
hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15, vhashA );
sph_whirlpool512_full( &ctx.whirlpool, hash00, hash00, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash01, hash01, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash02, hash02, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash03, hash03, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash04, hash04, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash05, hash05, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash06, hash06, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash07, hash07, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash08, hash08, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash09, hash09, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash10, hash10, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash11, hash11, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash12, hash12, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash13, hash13, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash14, hash14, 64 );
sph_whirlpool512_full( &ctx.whirlpool, hash15, hash15, 64 );
intrlv_8x64_512( vhashA, hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07 );
intrlv_8x64_512( vhashB, hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15 );
sha512_8way_init( &ctx.sha512 );
sha512_8way_update( &ctx.sha512, vhashA, 64 );
sha512_8way_close( &ctx.sha512, vhashA );
sha512_8way_init( &ctx.sha512 );
sha512_8way_update( &ctx.sha512, vhashB, 64 );
sha512_8way_close( &ctx.sha512, vhashB );
dintrlv_8x64_512( hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07, vhashA );
dintrlv_8x64_512( hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15, vhashB );
intrlv_16x32_512( vhashA, hash00, hash01, hash02, hash03,
hash04, hash05, hash06, hash07,
hash08, hash09, hash10, hash11,
hash12, hash13, hash14, hash15 );
haval256_5_16way_init( &ctx.haval );
haval256_5_16way_update( &ctx.haval, vhashA, 64 );
haval256_5_16way_close( &ctx.haval, state );
return 1;
}
int scanhash_x17_16way( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr )
{
uint32_t hash32[8*16] __attribute__ ((aligned (128)));
uint32_t vdata[20*8] __attribute__ ((aligned (64)));
uint32_t lane_hash[8] __attribute__ ((aligned (64)));
__m128i edata[5] __attribute__ ((aligned (64)));
uint32_t *pdata = work->data;
const uint32_t *ptarget = work->target;
uint32_t *hash32_d7 = &(hash32[7*16]);
const uint32_t targ32_d7 = ptarget[7];
const uint32_t first_nonce = pdata[19];
const uint32_t last_nonce = max_nonce - 8;
__m512i nonceA, nonceB;
uint32_t n = first_nonce;
const int thr_id = mythr->id;
const __m512i sixteen = v512_64( 16 );
const bool bench = opt_benchmark;
// convert LE32 to LE64
edata[0] = mm128_swap64_32( casti_m128i( pdata, 0 ) );
edata[1] = mm128_swap64_32( casti_m128i( pdata, 1 ) );
edata[2] = mm128_swap64_32( casti_m128i( pdata, 2 ) );
edata[3] = mm128_swap64_32( casti_m128i( pdata, 3 ) );
edata[4] = mm128_swap64_32( casti_m128i( pdata, 4 ) );
mm512_intrlv80_8x64( vdata, edata );
blake512_8way_prehash_le( &blake512_8way_ctx, x17_16way_midstate, vdata );
nonceA = _mm512_add_epi32( casti_m512i( vdata, 9 ),
_mm512_set_epi64( 7, 6, 5, 4, 3, 2, 1, 0 ) );
nonceB = _mm512_add_epi32( nonceA, v512_64( 8 ) );
do
{
if ( likely( x17_16way_hash( hash32, nonceA, nonceB, thr_id ) ) )
for ( int lane = 0; lane < 16; lane++ )
if ( unlikely( ( hash32_d7[ lane ] <= targ32_d7 ) ) )
{
extr_lane_16x32( lane_hash, hash32, lane, 256 );
if ( likely( valid_hash( lane_hash, ptarget ) && !bench ) )
{
pdata[19] = n + lane;
submit_solution( work, lane_hash, mythr );
}
}
nonceA = _mm512_add_epi32( nonceA, sixteen );
nonceB = _mm512_add_epi32( nonceB, sixteen );
n += 16;
} while ( likely( ( n < last_nonce ) && !work_restart[thr_id].restart ) );
pdata[19] = n;
*hashes_done = n - first_nonce;
return 0;
}
#endif
#if defined(X17_8WAY)
union _x17_8way_context_overlay

View File

@@ -2,7 +2,10 @@
bool register_x17_algo( algo_gate_t* gate )
{
#if defined (X17_8WAY)
#if defined (X17_16X32)
gate->scanhash = (void*)&scanhash_x17_16way;
// gate->hash = (void*)&x17_16way_hash;
#elif defined (X17_8WAY)
gate->scanhash = (void*)&scanhash_x17_8way;
gate->hash = (void*)&x17_8way_hash;
#elif defined (X17_4WAY)

View File

@@ -6,13 +6,21 @@
#if defined(__AVX512F__) && defined(__AVX512VL__) && defined(__AVX512DQ__) && defined(__AVX512BW__)
#define X17_8WAY 1
#define X17_16X32 1
#elif defined(__AVX2__) && defined(__AES__)
#define X17_4WAY 1
#define X17_8X32 1
#endif
bool register_x17_algo( algo_gate_t* gate );
#if defined(X17_8WAY)
#if defined(X17_8WAY) || defined(X17_16X32)
int scanhash_x17_16way( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );
//int x17_16way_hash( void *state, const void *input, int thr_id );
int scanhash_x17_8way( struct work *work, uint32_t max_nonce,
uint64_t *hashes_done, struct thr_info *mythr );

View File

@@ -6,7 +6,7 @@
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "algo/blake/sph_blake.h"
#include "algo/blake/blake512-hash.h"
#include "algo/bmw/sph_bmw.h"
#include "algo/jh/sph_jh.h"
#include "algo/keccak/sph_keccak.h"
@@ -32,8 +32,8 @@
union _x17_context_overlay
{
sph_blake512_context blake;
sph_bmw512_context bmw;
blake512_context blake;
sph_bmw512_context bmw;
#if defined(__AES__)
hashState_groestl groestl;
hashState_echo echo;
@@ -60,13 +60,10 @@ typedef union _x17_context_overlay x17_context_overlay;
int x17_hash(void *output, const void *input, int thr_id )
{
// unsigned char hash[64 * 4] __attribute__((aligned(64))) = {0};
unsigned char hash[64] __attribute__((aligned(64)));
x17_context_overlay ctx;
sph_blake512_init(&ctx.blake);
sph_blake512(&ctx.blake, input, 80);
sph_blake512_close(&ctx.blake, hash);
blake512_full( &ctx.blake, hash, input, 80 );
sph_bmw512_init(&ctx.bmw);
sph_bmw512(&ctx.bmw, (const void*) hash, 64);
@@ -95,19 +92,15 @@ int x17_hash(void *output, const void *input, int thr_id )
luffa_full( &ctx.luffa, (BitSequence*)hash, 512,
(const BitSequence*)hash, 64 );
// 8 Cube
cubehash_full( &ctx.cube, (byte*) hash, 512, (const byte*)hash, 64 );
// 9 Shavite
sph_shavite512_init( &ctx.shavite );
sph_shavite512( &ctx.shavite, hash, 64);
sph_shavite512_close( &ctx.shavite, hash);
// 10 Simd
simd_full( &ctx.simd, (BitSequence*)hash,
(const BitSequence*)hash, 512 );
//11---echo---
#if defined(__AES__)
echo_full( &ctx.echo, (BitSequence *)hash, 512,
(const BitSequence *)hash, 64 );
@@ -117,25 +110,20 @@ int x17_hash(void *output, const void *input, int thr_id )
sph_echo512_close( &ctx.echo, hash );
#endif
// X13 algos
// 12 Hamsi
sph_hamsi512_init( &ctx.hamsi );
sph_hamsi512( &ctx.hamsi, hash, 64 );
sph_hamsi512_close( &ctx.hamsi, hash );
// 13 Fugue
#if defined(__AES__)
fugue512_full( &ctx.fugue, hash, hash, 64 );
#else
sph_fugue512_full( &ctx.fugue, hash, hash, 64 );
#endif
// X14 Shabal
sph_shabal512_init( &ctx.shabal );
sph_shabal512(&ctx.shabal, hash, 64);
sph_shabal512_close( &ctx.shabal, hash );
// X15 Whirlpool
sph_whirlpool_init( &ctx.whirlpool );
sph_whirlpool( &ctx.whirlpool, hash, 64 );
sph_whirlpool_close( &ctx.whirlpool, hash );

View File

@@ -3,7 +3,7 @@
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "algo/blake/blake-hash-4way.h"
#include "algo/blake/blake512-hash.h"
#include "algo/bmw/bmw-hash-4way.h"
#include "algo/groestl/aes_ni/hash-groestl.h"
#include "algo/jh/jh-hash-4way.h"