mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.23.4
This commit is contained in:
@@ -9,12 +9,16 @@
|
||||
#include "algo/skein/sph_skein.h"
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#include "algo/fugue//sph_fugue.h"
|
||||
#include "algo/luffa/luffa_for_sse2.h"
|
||||
#include "algo/shabal/sph_shabal.h"
|
||||
#include "algo/gost/sph_gost.h"
|
||||
#ifdef __AES__
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#endif
|
||||
#if defined(__aarch64__)
|
||||
#include "algo/luffa/sph_luffa.h"
|
||||
#else
|
||||
#include "algo/luffa/luffa_for_sse2.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
sph_skein512_context skein;
|
||||
@@ -24,7 +28,11 @@ typedef struct {
|
||||
#else
|
||||
sph_echo512_context echo;
|
||||
#endif
|
||||
#if defined(__aarch64__)
|
||||
sph_luffa512_context luffa;
|
||||
#else
|
||||
hashState_luffa luffa;
|
||||
#endif
|
||||
sph_fugue512_context fugue;
|
||||
sph_gost512_context gost;
|
||||
} poly_ctx_holder;
|
||||
@@ -40,7 +48,11 @@ void init_polytimos_ctx()
|
||||
#else
|
||||
sph_echo512_init(&poly_ctx.echo);
|
||||
#endif
|
||||
#if defined(__aarch64__)
|
||||
sph_luffa512_init(&poly_ctx.luffa );
|
||||
#else
|
||||
init_luffa( &poly_ctx.luffa, 512 );
|
||||
#endif
|
||||
sph_fugue512_init(&poly_ctx.fugue);
|
||||
sph_gost512_init(&poly_ctx.gost);
|
||||
}
|
||||
@@ -65,8 +77,13 @@ void polytimos_hash(void *output, const void *input)
|
||||
sph_echo512_close(&ctx.echo, hashA);
|
||||
#endif
|
||||
|
||||
update_and_final_luffa( &ctx.luffa, (BitSequence*)hashA,
|
||||
(const BitSequence*)hashA, 64 );
|
||||
#if defined(__aarch64__)
|
||||
sph_luffa512(&ctx.luffa, (const void*) hashA, 64);
|
||||
sph_luffa512_close(&ctx.luffa, hashA);
|
||||
#else
|
||||
update_and_final_luffa( &ctx.luffa, hashA,
|
||||
hashA, 64 );
|
||||
#endif
|
||||
|
||||
sph_fugue512(&ctx.fugue, hashA, 64);
|
||||
sph_fugue512_close(&ctx.fugue, hashA);
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#include "algo/shavite/sph_shavite.h"
|
||||
#include "algo/hamsi/sph_hamsi.h"
|
||||
#include "algo/shabal/sph_shabal.h"
|
||||
#include "algo/luffa/luffa_for_sse2.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#include "algo/simd/nist.h"
|
||||
#if defined(__AES__)
|
||||
@@ -26,6 +25,11 @@
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#include "algo/fugue/sph_fugue.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,7 +46,11 @@ 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;
|
||||
@@ -68,7 +76,11 @@ void init_x14_ctx()
|
||||
sph_skein512_init( &x14_ctx.skein );
|
||||
sph_jh512_init( &x14_ctx.jh );
|
||||
sph_keccak512_init( &x14_ctx.keccak );
|
||||
#if defined(__aarch64__)
|
||||
sph_luffa512_init( &x14_ctx.luffa );
|
||||
#else
|
||||
init_luffa( &x14_ctx.luffa,512 );
|
||||
#endif
|
||||
cubehashInit( &x14_ctx.cube,512,16,32 );
|
||||
sph_shavite512_init( &x14_ctx.shavite );
|
||||
init_sd( &x14_ctx.simd,512 );
|
||||
@@ -105,8 +117,13 @@ void x14hash(void *output, const void *input)
|
||||
sph_keccak512( &ctx.keccak, (const void*) hash, 64 );
|
||||
sph_keccak512_close( &ctx.keccak, 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
|
||||
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*) hash,
|
||||
(const byte*)hash, 64 );
|
||||
|
Reference in New Issue
Block a user