mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v23.5
This commit is contained in:
@@ -17,8 +17,11 @@
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/luffa/luffa_for_sse2.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#include "algo/simd/nist.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"
|
||||
#include "algo/groestl/aes_ni/hash-groestl.h"
|
||||
@@ -43,7 +46,11 @@ typedef struct {
|
||||
hashState_luffa luffa;
|
||||
cubehashParam cube;
|
||||
sph_shavite512_context shavite;
|
||||
#if defined(__aarch64__)
|
||||
sph_simd512_context simd;
|
||||
#else
|
||||
hashState_sd simd;
|
||||
#endif
|
||||
sm3_ctx_t sm3;
|
||||
sph_hamsi512_context hamsi;
|
||||
sph_fugue512_context fugue;
|
||||
@@ -68,7 +75,11 @@ void init_x13sm3_ctx()
|
||||
init_luffa( &hsr_ctx.luffa,512 );
|
||||
cubehashInit( &hsr_ctx.cube,512,16,32 );
|
||||
sph_shavite512_init( &hsr_ctx.shavite );
|
||||
#if defined(__aarch64__)
|
||||
sph_simd512_init( &hsr_ctx.simd );
|
||||
#else
|
||||
init_sd( &hsr_ctx.simd,512 );
|
||||
#endif
|
||||
sm3_init( &hsr_ctx.sm3 );
|
||||
sph_hamsi512_init( &hsr_ctx.hamsi );
|
||||
sph_fugue512_init( &hsr_ctx.fugue );
|
||||
@@ -105,22 +116,20 @@ void x13sm3_hash(void *output, const void *input)
|
||||
sph_keccak512( &ctx.keccak, (const void*) hash, 64 );
|
||||
sph_keccak512_close( &ctx.keccak, hash );
|
||||
|
||||
update_and_final_luffa( &ctx.luffa, hash, hash, 64 );
|
||||
|
||||
//--- luffa7
|
||||
update_and_final_luffa( &ctx.luffa, (BitSequence*)hash,
|
||||
(const BitSequence*)hash, 64 );
|
||||
cubehashUpdateDigest( &ctx.cube, hash, hash, 64 );
|
||||
|
||||
// 8 Cube
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*) hash,
|
||||
(const byte*)hash, 64 );
|
||||
|
||||
// 9 Shavite
|
||||
sph_shavite512( &ctx.shavite, hash, 64);
|
||||
sph_shavite512( &ctx.shavite, hash, 64);
|
||||
sph_shavite512_close( &ctx.shavite, hash);
|
||||
|
||||
// 10 Simd
|
||||
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
|
||||
|
||||
//11---echo---
|
||||
#ifdef __AES__
|
||||
|
||||
Reference in New Issue
Block a user