This commit is contained in:
Jay D Dee
2023-10-25 20:36:20 -04:00
parent 31c4dedf59
commit 160608cce5
180 changed files with 10318 additions and 13097 deletions

View File

@@ -204,11 +204,11 @@ int scanhash_c11_8way( struct work *work, uint32_t max_nonce,
const __m512i eight = _mm512_set1_epi64( 8 );
const bool bench = opt_benchmark;
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 ) );
edata[0] = v128_swap64_32( casti_m128i( pdata, 0 ) );
edata[1] = v128_swap64_32( casti_m128i( pdata, 1 ) );
edata[2] = v128_swap64_32( casti_m128i( pdata, 2 ) );
edata[3] = v128_swap64_32( casti_m128i( pdata, 3 ) );
edata[4] = v128_swap64_32( casti_m128i( pdata, 4 ) );
mm512_intrlv80_8x64( vdata, edata );
*noncev = _mm512_add_epi32( *noncev, _mm512_set_epi32(
@@ -372,11 +372,11 @@ int scanhash_c11_4way( struct work *work, uint32_t max_nonce,
const __m256i four = _mm256_set1_epi64x( 4 );
const bool bench = opt_benchmark;
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 ) );
edata[0] = v128_swap64_32( casti_m128i( pdata, 0 ) );
edata[1] = v128_swap64_32( casti_m128i( pdata, 1 ) );
edata[2] = v128_swap64_32( casti_m128i( pdata, 2 ) );
edata[3] = v128_swap64_32( casti_m128i( pdata, 3 ) );
edata[4] = v128_swap64_32( casti_m128i( pdata, 4 ) );
mm256_intrlv80_4x64( vdata, edata );

View File

@@ -13,13 +13,12 @@
#include "algo/skein/sph_skein.h"
#include "algo/shavite/sph_shavite.h"
#include "algo/cubehash/cubehash_sse2.h"
#include "algo/simd/nist.h"
#if defined(__aarch64__)
#include "algo/luffa/sph_luffa.h"
#include "algo/simd/sph_simd.h"
#else
#include "algo/luffa/luffa_for_sse2.h"
#include "algo/simd/nist.h"
#endif
#include "algo/luffa/luffa_for_sse2.h"
#if defined(__AES__)
#include "algo/echo/aes_ni/hash_api.h"
#include "algo/groestl/aes_ni/hash-groestl.h"
@@ -41,14 +40,14 @@ typedef struct {
sph_jh512_context jh;
sph_keccak512_context keccak;
sph_skein512_context skein;
#if defined(__aarch64__)
sph_luffa512_context luffa;
#else
hashState_luffa luffa;
#endif
hashState_luffa luffa;
cubehashParam cube;
sph_shavite512_context shavite;
#if defined(__aarch64__)
sph_simd512_context simd;
#else
hashState_sd simd;
#endif
} c11_ctx_holder;
c11_ctx_holder c11_ctx __attribute__ ((aligned (64)));
@@ -67,14 +66,14 @@ void init_c11_ctx()
sph_skein512_init( &c11_ctx.skein );
sph_jh512_init( &c11_ctx.jh );
sph_keccak512_init( &c11_ctx.keccak );
#if defined(__aarch64__)
sph_luffa512_init( &c11_ctx.luffa );
#else
init_luffa( &c11_ctx.luffa, 512 );
#endif
cubehashInit( &c11_ctx.cube, 512, 16, 32 );
sph_shavite512_init( &c11_ctx.shavite );
#if defined(__aarch64__)
sph_simd512_init( &c11_ctx.simd );
#else
init_sd( &c11_ctx.simd, 512 );
#endif
}
void c11_hash( void *output, const void *input )
@@ -106,22 +105,20 @@ void c11_hash( void *output, const void *input )
sph_skein512( &ctx.skein, (const void*) hash, 64 );
sph_skein512_close( &ctx.skein, hash );
#if defined(__aarch64__)
sph_luffa512(&ctx.luffa, (const void*) hash, 64);
sph_luffa512_close(&ctx.luffa, hash);
#else
update_and_final_luffa( &ctx.luffa, (BitSequence*)hash,
(const BitSequence*)hash, 64 );
#endif
update_and_final_luffa( &ctx.luffa, hash, hash, 64 );
cubehashUpdateDigest( &ctx.cube, (byte*)hash,
(const byte*)hash, 64 );
cubehashUpdateDigest( &ctx.cube, hash, hash, 64 );
sph_shavite512( &ctx.shavite, hash, 64);
sph_shavite512_close( &ctx.shavite, hash);
update_final_sd( &ctx.simd, (BitSequence *)hash,
(const BitSequence *)hash, 512 );
#if defined(__aarch64__)
sph_simd512(&ctx.simd, (const void*) hash, 64);
sph_simd512_close(&ctx.simd, hash);
#else
update_final_sd( &ctx.simd, (BitSequence *)hash,
(const BitSequence *)hash, 512 );
#endif
#if defined(__AES__)
update_final_echo ( &ctx.echo, (BitSequence *)hash,

View File

@@ -17,11 +17,7 @@
#else
#include "algo/groestl/sph_groestl.h"
#endif
#if defined(__aarch64__)
#include "algo/luffa/sph_luffa.h"
#else
#include "algo/luffa/luffa_for_sse2.h"
#endif
#include "algo/luffa/luffa_for_sse2.h"
static __thread uint32_t s_ntime = UINT32_MAX;
static __thread int permutation[TT8_FUNC_COUNT] = { 0 };
@@ -32,11 +28,7 @@ typedef struct {
sph_skein512_context skein;
sph_jh512_context jh;
sph_keccak512_context keccak;
#if defined(__aarch64__)
sph_luffa512_context luffa;
#else
hashState_luffa luffa;
#endif
cubehashParam cube;
#ifdef __AES__
hashState_groestl groestl;
@@ -55,11 +47,7 @@ void init_tt8_ctx()
sph_skein512_init( &tt_ctx.skein );
sph_jh512_init( &tt_ctx.jh );
sph_keccak512_init( &tt_ctx.keccak );
#if defined(__aarch64__)
sph_luffa512_init( &tt_ctx.luffa );
#else
init_luffa( &tt_ctx.luffa, 512 );
#endif
cubehashInit( &tt_ctx.cube, 512, 16, 32 );
#ifdef __AES__
init_groestl( &tt_ctx.groestl, 64 );
@@ -183,25 +171,14 @@ void timetravel_hash(void *output, const void *input)
case 6:
if ( i == 0 )
{
#if defined(__aarch64__)
memcpy( &ctx.luffa, &tt_mid.luffa, sizeof tt_mid.luffa );
sph_luffa512( &ctx.luffa, input + 64, 16 );
sph_luffa512_close( &ctx.luffa, hashB );
#else
memcpy( &ctx.luffa, &tt_mid.luffa, sizeof tt_mid.luffa );
update_and_final_luffa( &ctx.luffa, hashB,
input + 64, 16 );
#endif
}
else
{
#if defined(__aarch64__)
sph_luffa512( &ctx.luffa, hashA, dataLen );
sph_luffa512_close( &ctx.luffa, hashB );
#else
update_and_final_luffa( &ctx.luffa, hashB,
hashA, dataLen );
#endif
}
break;
case 7:
@@ -287,11 +264,7 @@ int scanhash_timetravel( struct work *work, uint32_t max_nonce,
break;
case 6:
memcpy( &tt_mid.luffa, &tt_ctx.luffa, sizeof(tt_mid.luffa ) );
#if defined(__aarch64__)
sph_luffa512( &tt_mid.luffa, endiandata, 64 );
#else
update_luffa( &tt_mid.luffa, endiandata, 64 );
#endif
break;
case 7:
memcpy( &tt_mid.cube, &tt_ctx.cube, sizeof(tt_mid.cube ) );

View File

@@ -13,17 +13,17 @@
#include "algo/skein/sph_skein.h"
#include "algo/cubehash/cubehash_sse2.h"
#include "algo/shavite/sph_shavite.h"
#include "algo/simd/nist.h"
#if defined(__aarch64__)
#include "algo/simd/sph_simd.h"
#else
#include "algo/simd/nist.h"
#endif
#ifdef __AES__
#include "algo/groestl/aes_ni/hash-groestl.h"
#else
#include "algo/groestl/sph_groestl.h"
#endif
#if defined(__aarch64__)
#include "algo/luffa/sph_luffa.h"
#else
#include "algo/luffa/luffa_for_sse2.h"
#endif
static __thread uint32_t s_ntime = UINT32_MAX;
static __thread int permutation[TT10_FUNC_COUNT] = { 0 };
@@ -34,14 +34,14 @@ typedef struct {
sph_skein512_context skein;
sph_jh512_context jh;
sph_keccak512_context keccak;
#if defined(__aarch64__)
sph_luffa512_context luffa;
#else
hashState_luffa luffa;
#endif
cubehashParam cube;
sph_shavite512_context shavite;
hashState_sd simd;
#if defined(__aarch64__)
sph_simd512_context simd;
#else
hashState_sd simd;
#endif
#ifdef __AES__
hashState_groestl groestl;
#else
@@ -59,14 +59,14 @@ void init_tt10_ctx()
sph_skein512_init( &tt10_ctx.skein );
sph_jh512_init( &tt10_ctx.jh );
sph_keccak512_init( &tt10_ctx.keccak );
#if defined(__aarch64__)
sph_luffa512_init( &tt10_ctx.luffa );
#else
init_luffa( &tt10_ctx.luffa, 512 );
#endif
cubehashInit( &tt10_ctx.cube, 512, 16, 32 );
sph_shavite512_init( &tt10_ctx.shavite );
init_sd( &tt10_ctx.simd, 512 );
#if defined(__aarch64__)
sph_simd512_init( &tt10_ctx.simd );
#else
init_sd( &tt10_ctx.simd, 512 );
#endif
#ifdef __AES__
init_groestl( &tt10_ctx.groestl, 64 );
#else
@@ -189,38 +189,23 @@ void timetravel10_hash(void *output, const void *input)
case 6:
if ( i == 0 )
{
#if defined(__aarch64__)
memcpy( &ctx.luffa, &tt10_mid.luffa, sizeof tt10_mid.luffa );
sph_luffa512( &ctx.luffa, input + 64, 16 );
sph_luffa512_close( &ctx.luffa, hashB );
#else
memcpy( &ctx.luffa, &tt10_mid.luffa, sizeof tt10_mid.luffa );
update_and_final_luffa( &ctx.luffa, (BitSequence*)hashB,
(const BitSequence *)input + 64, 16 );
#endif
update_and_final_luffa( &ctx.luffa, hashB, input + 64, 16 );
}
else
{
#if defined(__aarch64__)
sph_luffa512( &ctx.luffa, hashA, dataLen );
sph_luffa512_close( &ctx.luffa, hashB );
#else
update_and_final_luffa( &ctx.luffa, (BitSequence*)hashB,
(const BitSequence *)hashA, dataLen );
#endif
update_and_final_luffa( &ctx.luffa, hashB, hashA, dataLen );
}
break;
case 7:
if ( i == 0 )
{
memcpy( &ctx.cube, &tt10_mid.cube, sizeof tt10_mid.cube );
cubehashUpdateDigest( &ctx.cube, (byte*)hashB,
(const byte*)input + midlen, tail );
cubehashUpdateDigest( &ctx.cube, hashB, input + midlen, tail );
}
else
{
cubehashUpdateDigest( &ctx.cube, (byte*)hashB, (const byte*)hashA,
dataLen );
cubehashUpdateDigest( &ctx.cube, hashB, hashA, dataLen );
}
break;
case 8:
@@ -240,13 +225,23 @@ void timetravel10_hash(void *output, const void *input)
if ( i == 0 )
{
memcpy( &ctx.simd, &tt10_mid.simd, sizeof tt10_mid.simd );
#if defined(__aarch64__)
sph_simd512(&ctx.simd, (const void*) input + midlen, tail );
sph_simd512_close(&ctx.simd, hash);
#else
update_final_sd( &ctx.simd, (BitSequence *)hashB,
(const BitSequence *)input + midlen, tail*8 );
#endif
}
else
{
update_final_sd( &ctx.simd, (BitSequence *)hashB,
(const BitSequence *)hashA, dataLen*8 );
#if defined(__aarch64__)
sph_simd512(&ctx.simd, (const void*) hash, 64);
sph_simd512_close(&ctx.simd, hash);
#else
update_sd( &ctx.simd, (const BitSequence *)hashA, dataLen*8 );
final_sd( &ctx.simd, (BitSequence *)hashB );
#endif
}
break;
default:
@@ -320,15 +315,11 @@ int scanhash_timetravel10( struct work *work, uint32_t max_nonce,
break;
case 6:
memcpy( &tt10_mid.luffa, &tt10_ctx.luffa, sizeof(tt10_mid.luffa ) );
#if defined(__aarch64__)
sph_luffa512( &tt10_mid.luffa, endiandata, 64 );
#else
update_luffa( &tt10_mid.luffa, (const BitSequence*)endiandata, 64 );
#endif
update_luffa( &tt10_mid.luffa, endiandata, 64 );
break;
case 7:
memcpy( &tt10_mid.cube, &tt10_ctx.cube, sizeof(tt10_mid.cube ) );
cubehashUpdate( &tt10_mid.cube, (const byte*)endiandata, 64 );
cubehashUpdate( &tt10_mid.cube, endiandata, 64 );
break;
case 8:
memcpy( &tt10_mid.shavite, &tt10_ctx.shavite, sizeof(tt10_mid.shavite ) );
@@ -336,7 +327,12 @@ int scanhash_timetravel10( struct work *work, uint32_t max_nonce,
break;
case 9:
memcpy( &tt10_mid.simd, &tt10_ctx.simd, sizeof(tt10_mid.simd ) );
#if defined(__aarch64__)
sph_simd512( &tt10_mid.simd, (const void*) endiandata, 64 );
sph_simd512_close( &tt10_mid.simd, hash);
#else
update_sd( &tt10_mid.simd, (const BitSequence *)endiandata, 512 );
#endif
break;
default:
break;

View File

@@ -269,11 +269,11 @@ int scanhash_x11_8way( struct work *work, uint32_t max_nonce,
const __m512i eight = _mm512_set1_epi64( 8 );
// 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 ) );
edata[0] = v128_swap64_32( casti_v128( pdata, 0 ) );
edata[1] = v128_swap64_32( casti_v128( pdata, 1 ) );
edata[2] = v128_swap64_32( casti_v128( pdata, 2 ) );
edata[3] = v128_swap64_32( casti_v128( pdata, 3 ) );
edata[4] = v128_swap64_32( casti_v128( pdata, 4 ) );
mm512_intrlv80_8x64( vdata, edata );
*noncev = _mm512_add_epi32( *noncev, _mm512_set_epi32(

View File

@@ -14,8 +14,6 @@
#include "algo/skein/sph_skein.h"
#include "algo/shavite/sph_shavite.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"
@@ -23,12 +21,14 @@
#include "algo/groestl/sph_groestl.h"
#include "algo/echo/sph_echo.h"
#endif
#include "algo/luffa/luffa_for_sse2.h"
#if defined(__aarch64__)
#include "algo/luffa/sph_luffa.h"
#include "algo/simd/sph_simd.h"
#else
#include "algo/luffa/luffa_for_sse2.h"
#include "algo/simd/nist.h"
#endif
typedef struct {
sph_blake512_context blake;
sph_bmw512_context bmw;
@@ -42,14 +42,14 @@ typedef struct {
sph_jh512_context jh;
sph_keccak512_context keccak;
sph_skein512_context skein;
#if defined(__aarch64__)
sph_luffa512_context luffa;
#else
hashState_luffa luffa;
#endif
hashState_luffa luffa;
cubehashParam cube;
sph_shavite512_context shavite;
#if defined(__aarch64__)
sph_simd512_context simd;
#else
hashState_sd simd;
#endif
} x11_ctx_holder;
x11_ctx_holder x11_ctx;
@@ -68,14 +68,14 @@ void init_x11_ctx()
sph_skein512_init( &x11_ctx.skein );
sph_jh512_init( &x11_ctx.jh );
sph_keccak512_init( &x11_ctx.keccak );
#if defined(__aarch64__)
sph_luffa512_init( &x11_ctx.luffa );
#else
init_luffa( &x11_ctx.luffa, 512 );
#endif
cubehashInit( &x11_ctx.cube, 512, 16, 32 );
sph_shavite512_init( &x11_ctx.shavite );
#if defined(__aarch64__)
sph_simd512_init( &x11_ctx.simd );
#else
init_sd( &x11_ctx.simd, 512 );
#endif
}
void x11_hash( void *state, const void *input )
@@ -109,23 +109,23 @@ void x11_hash( void *state, const void *input )
sph_keccak512( &ctx.keccak, (const void*) hash, 64 );
sph_keccak512_close( &ctx.keccak, hash );
update_luffa( &ctx.luffa, hash, 64 );
final_luffa( &ctx.luffa, hash );
cubehashUpdate( &ctx.cube, hash, 64 );
cubehashDigest( &ctx.cube, hash );
sph_shavite512( &ctx.shavite, hash, 64 );
sph_shavite512_close( &ctx.shavite, hash );
#if defined(__aarch64__)
sph_luffa512(&ctx.luffa, (const void*) hash, 64);
sph_luffa512_close(&ctx.luffa, hash);
sph_simd512(&ctx.simd, (const void*) hash, 64);
sph_simd512_close(&ctx.simd, hash);
#else
update_luffa( &ctx.luffa, (const BitSequence*)hash, 64 );
final_luffa( &ctx.luffa, (BitSequence*)hash );
update_final_sd( &ctx.simd, (BitSequence *)hash,
(const BitSequence *)hash, 512 );
#endif
cubehashUpdate( &ctx.cube, (const byte*) hash, 64 );
cubehashDigest( &ctx.cube, (byte*)hash );
sph_shavite512( &ctx.shavite, hash, 64 );
sph_shavite512_close( &ctx.shavite, hash );
update_sd( &ctx.simd, (const BitSequence *)hash, 512 );
final_sd( &ctx.simd, (BitSequence *)hash );
#if defined(__AES__)
update_final_echo ( &ctx.echo, (BitSequence *)hash,
(const BitSequence *)hash, 512 );

View File

@@ -20,12 +20,12 @@
#include "algo/echo/sph_echo.h"
#endif
#include "algo/cubehash/cubehash_sse2.h"
#include "algo/simd/nist.h"
#if defined(__aarch64__)
#include "algo/luffa/sph_luffa.h"
#include "algo/simd/sph_simd.h"
#else
#include "algo/luffa/luffa_for_sse2.h"
#include "algo/simd/nist.h"
#endif
#include "algo/luffa/luffa_for_sse2.h"
typedef struct {
#ifdef __AES__
@@ -35,13 +35,13 @@ typedef struct {
sph_groestl512_context groestl;
sph_echo512_context echo;
#endif
#if defined(__aarch64__)
sph_luffa512_context luffa;
#else
hashState_luffa luffa;
#endif
hashState_luffa luffa;
cubehashParam cube;
hashState_sd simd;
#if defined(__aarch64__)
sph_simd512_context simd;
#else
hashState_sd simd;
#endif
sph_blake512_context blake;
sph_bmw512_context bmw;
sph_skein512_context skein;
@@ -61,13 +61,13 @@ void init_x11evo_ctx()
sph_groestl512_init( &x11evo_ctx.groestl );
sph_echo512_init( &x11evo_ctx.echo );
#endif
#if defined(__aarch64__)
sph_luffa512_init( &x11evo_ctx.luffa );
#else
init_luffa( &x11evo_ctx.luffa, 512 );
#endif
cubehashInit( &x11evo_ctx.cube, 512, 16, 32 );
#if defined(__aarch64__)
sph_simd512_init( &x11evo_ctx.simd );
#else
init_sd( &x11evo_ctx.simd, 512 );
#endif
sph_blake512_init( &x11evo_ctx.blake );
sph_bmw512_init( &x11evo_ctx.bmw );
sph_skein512_init( &x11evo_ctx.skein );
@@ -136,25 +136,23 @@ void x11evo_hash( void *state, const void *input )
sph_keccak512_close( &ctx.keccak, (char*)hash );
break;
case 6:
#if defined(__aarch64__)
sph_luffa512(&ctx.luffa, (const void*) hash, 64);
sph_luffa512_close(&ctx.luffa, hash);
#else
update_and_final_luffa( &ctx.luffa, (char*)hash,
(const char*)hash, 64 );
#endif
update_and_final_luffa( &ctx.luffa, hash, hash, 64 );
break;
case 7:
cubehashUpdateDigest( &ctx.cube, (char*)hash,
(const char*)hash, 64 );
cubehashUpdateDigest( &ctx.cube, hash, hash, 64 );
break;
case 8:
sph_shavite512( &ctx.shavite, (char*)hash, size );
sph_shavite512_close( &ctx.shavite, (char*)hash );
break;
case 9:
update_final_sd( &ctx.simd, (char*)hash, (const char*)hash, 512 );
break;
#if defined(__aarch64__)
sph_simd512(&ctx.simd, (const void*) hash, 64);
sph_simd512_close(&ctx.simd, hash);
#else
update_final_sd( &ctx.simd, (char*)hash, (const char*)hash, 512 );
#endif
break;
case 10:
#ifdef __AES__
update_final_echo( &ctx.echo, (char*)hash,

View File

@@ -13,8 +13,13 @@
#include "algo/keccak/sph_keccak.h"
#include "algo/skein/sph_skein.h"
#include "algo/shavite/sph_shavite.h"
#include "algo/luffa/luffa_for_sse2.h"
#include "algo/cubehash/cubehash_sse2.h"
#if defined(__aarch64__)
#include "algo/simd/sph_simd.h"
#else
#include "algo/simd/nist.h"
#endif
#if defined(__AES__)
#include "algo/echo/aes_ni/hash_api.h"
@@ -23,11 +28,6 @@
#include "algo/groestl/sph_groestl.h"
#include "algo/echo/sph_echo.h"
#endif
#if defined(__aarch64__)
#include "algo/luffa/sph_luffa.h"
#else
#include "algo/luffa/luffa_for_sse2.h"
#endif
typedef struct {
sph_blake512_context blake;
@@ -42,14 +42,14 @@ typedef struct {
sph_jh512_context jh;
sph_keccak512_context keccak;
sph_skein512_context skein;
#if defined(__aarch64__)
sph_luffa512_context luffa;
#else
hashState_luffa luffa;
#endif
cubehashParam cube;
sph_shavite512_context shavite;
hashState_sd simd;
#if defined(__aarch64__)
sph_simd512_context simd;
#else
hashState_sd simd;
#endif
sph_gost512_context gost;
} x11gost_ctx_holder;
@@ -71,13 +71,13 @@ void init_x11gost_ctx()
sph_keccak512_init( &x11gost_ctx.keccak );
sph_gost512_init( &x11gost_ctx.gost );
sph_shavite512_init( &x11gost_ctx.shavite );
#if defined(__aarch64__)
sph_luffa512_init(&x11gost_ctx.luffa );
#else
init_luffa( &x11gost_ctx.luffa, 512 );
#endif
cubehashInit( &x11gost_ctx.cube, 512, 16, 32 );
init_sd( &x11gost_ctx.simd, 512 );
#if defined(__aarch64__)
sph_simd512_init(&x11gost_ctx.simd);
#else
init_sd( &x11gost_ctx.simd, 512 );
#endif
}
void x11gost_hash(void *output, const void *input)
@@ -114,23 +114,20 @@ void x11gost_hash(void *output, const void *input)
sph_gost512( &ctx.gost, hash, 64 );
sph_gost512_close( &ctx.gost, hash );
#if defined(__aarch64__)
sph_luffa512_init(&ctx.luffa );
sph_luffa512(&ctx.luffa, (const void*) hash, 64);
sph_luffa512_close(&ctx.luffa, hash);
#else
update_and_final_luffa( &ctx.luffa, (BitSequence*)hash,
(const BitSequence*)hash, 64 );
#endif
update_and_final_luffa( &ctx.luffa, hash, hash, 64 );
cubehashUpdateDigest( &ctx.cube, (byte*) hash,
(const byte*)hash, 64 );
cubehashUpdateDigest( &ctx.cube, hash, hash, 64 );
sph_shavite512( &ctx.shavite, hash, 64 );
sph_shavite512_close( &ctx.shavite, hash );
#if defined(__aarch64__)
sph_simd512 (&ctx.simd, hash, 64);
sph_simd512_close(&ctx.simd, hash);
#else
update_final_sd( &ctx.simd, (BitSequence *)hash,
(const BitSequence *)hash, 512 );
(const BitSequence *)hash, 512 );
#endif
#if defined(__AES__)
update_final_echo ( &ctx.echo, (BitSequence *)hash,