mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.15.3
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include "algo/hamsi/sph_hamsi.h"
|
||||
#include "algo/shabal/sph_shabal.h"
|
||||
#include "algo/whirlpool/sph_whirlpool.h"
|
||||
#include <openssl/sha.h>
|
||||
#include "algo/sha/sph_sha2.h"
|
||||
#include "algo/haval/sph-haval.h"
|
||||
#include "algo/tiger/sph_tiger.h"
|
||||
#include "algo/lyra2/lyra2.h"
|
||||
@@ -56,11 +56,11 @@ union _x25x_context_overlay
|
||||
sph_hamsi512_context hamsi;
|
||||
sph_shabal512_context shabal;
|
||||
sph_whirlpool_context whirlpool;
|
||||
SHA512_CTX sha512;
|
||||
sph_sha512_context sha512;
|
||||
sph_haval256_5_context haval;
|
||||
sph_tiger_context tiger;
|
||||
sph_gost512_context gost;
|
||||
SHA256_CTX sha256;
|
||||
sph_sha256_context sha256;
|
||||
sph_panama_context panama;
|
||||
blake2s_state blake2s;
|
||||
};
|
||||
@@ -71,13 +71,13 @@ int x25x_hash( void *output, const void *input, int thrid )
|
||||
unsigned char hash[25][64] __attribute__((aligned(64))) = {0};
|
||||
x25x_context_overlay ctx;
|
||||
|
||||
sph_blake512_init(&ctx.blake);
|
||||
sph_blake512(&ctx.blake, input, 80);
|
||||
sph_blake512_close(&ctx.blake, &hash[0] );
|
||||
sph_blake512_init(&ctx.blake);
|
||||
sph_blake512(&ctx.blake, input, 80);
|
||||
sph_blake512_close(&ctx.blake, &hash[0] );
|
||||
|
||||
sph_bmw512_init(&ctx.bmw);
|
||||
sph_bmw512(&ctx.bmw, (const void*) &hash[0], 64);
|
||||
sph_bmw512_close(&ctx.bmw, &hash[1]);
|
||||
sph_bmw512_init(&ctx.bmw);
|
||||
sph_bmw512(&ctx.bmw, (const void*) &hash[0], 64);
|
||||
sph_bmw512_close(&ctx.bmw, &hash[1]);
|
||||
|
||||
#if defined(__AES__)
|
||||
init_groestl( &ctx.groestl, 64 );
|
||||
@@ -89,17 +89,17 @@ int x25x_hash( void *output, const void *input, int thrid )
|
||||
sph_groestl512_close( &ctx.groestl, &hash[2] );
|
||||
#endif
|
||||
|
||||
sph_skein512_init(&ctx.skein);
|
||||
sph_skein512(&ctx.skein, (const void*) &hash[2], 64);
|
||||
sph_skein512_close(&ctx.skein, &hash[3]);
|
||||
sph_skein512_init(&ctx.skein);
|
||||
sph_skein512(&ctx.skein, (const void*) &hash[2], 64);
|
||||
sph_skein512_close(&ctx.skein, &hash[3]);
|
||||
|
||||
sph_jh512_init(&ctx.jh);
|
||||
sph_jh512(&ctx.jh, (const void*) &hash[3], 64);
|
||||
sph_jh512_close(&ctx.jh, &hash[4]);
|
||||
sph_jh512_init(&ctx.jh);
|
||||
sph_jh512(&ctx.jh, (const void*) &hash[3], 64);
|
||||
sph_jh512_close(&ctx.jh, &hash[4]);
|
||||
|
||||
sph_keccak512_init(&ctx.keccak);
|
||||
sph_keccak512(&ctx.keccak, (const void*) &hash[4], 64);
|
||||
sph_keccak512_close(&ctx.keccak, &hash[5]);
|
||||
sph_keccak512_init(&ctx.keccak);
|
||||
sph_keccak512(&ctx.keccak, (const void*) &hash[4], 64);
|
||||
sph_keccak512_close(&ctx.keccak, &hash[5]);
|
||||
|
||||
if ( work_restart[thrid].restart ) return 0;
|
||||
|
||||
@@ -111,9 +111,9 @@ int x25x_hash( void *output, const void *input, int thrid )
|
||||
cubehashUpdateDigest( &ctx.cube, (byte*) &hash[7],
|
||||
(const byte*)&hash[6], 64 );
|
||||
|
||||
sph_shavite512_init(&ctx.shavite);
|
||||
sph_shavite512(&ctx.shavite, (const void*) &hash[7], 64);
|
||||
sph_shavite512_close(&ctx.shavite, &hash[8]);
|
||||
sph_shavite512_init(&ctx.shavite);
|
||||
sph_shavite512(&ctx.shavite, (const void*) &hash[7], 64);
|
||||
sph_shavite512_close(&ctx.shavite, &hash[8]);
|
||||
|
||||
init_sd( &ctx.simd, 512 );
|
||||
update_final_sd( &ctx.simd, (BitSequence*)&hash[9],
|
||||
@@ -132,51 +132,51 @@ int x25x_hash( void *output, const void *input, int thrid )
|
||||
if ( work_restart[thrid].restart ) return 0;
|
||||
|
||||
sph_hamsi512_init(&ctx.hamsi);
|
||||
sph_hamsi512(&ctx.hamsi, (const void*) &hash[10], 64);
|
||||
sph_hamsi512_close(&ctx.hamsi, &hash[11]);
|
||||
sph_hamsi512(&ctx.hamsi, (const void*) &hash[10], 64);
|
||||
sph_hamsi512_close(&ctx.hamsi, &hash[11]);
|
||||
|
||||
#if defined(__AES__)
|
||||
fugue512_full( &ctx.fugue, &hash[12], &hash[11], 64 );
|
||||
fugue512_full( &ctx.fugue, &hash[12], &hash[11], 64 );
|
||||
#else
|
||||
sph_fugue512_init(&ctx.fugue);
|
||||
sph_fugue512(&ctx.fugue, (const void*) &hash[11], 64);
|
||||
sph_fugue512_close(&ctx.fugue, &hash[12]);
|
||||
sph_fugue512_init(&ctx.fugue);
|
||||
sph_fugue512(&ctx.fugue, (const void*) &hash[11], 64);
|
||||
sph_fugue512_close(&ctx.fugue, &hash[12]);
|
||||
#endif
|
||||
|
||||
sph_shabal512_init(&ctx.shabal);
|
||||
sph_shabal512(&ctx.shabal, (const void*) &hash[12], 64);
|
||||
sph_shabal512_close(&ctx.shabal, &hash[13]);
|
||||
sph_shabal512_init(&ctx.shabal);
|
||||
sph_shabal512(&ctx.shabal, (const void*) &hash[12], 64);
|
||||
sph_shabal512_close(&ctx.shabal, &hash[13]);
|
||||
|
||||
sph_whirlpool_init(&ctx.whirlpool);
|
||||
sph_whirlpool (&ctx.whirlpool, (const void*) &hash[13], 64);
|
||||
sph_whirlpool_close(&ctx.whirlpool, &hash[14]);
|
||||
sph_whirlpool_init(&ctx.whirlpool);
|
||||
sph_whirlpool (&ctx.whirlpool, (const void*) &hash[13], 64);
|
||||
sph_whirlpool_close(&ctx.whirlpool, &hash[14]);
|
||||
|
||||
SHA512_Init( &ctx.sha512 );
|
||||
SHA512_Update( &ctx.sha512, (const void*) &hash[14], 64);
|
||||
SHA512_Final( (void*) &hash[15], &ctx.sha512 );
|
||||
sph_sha512_init( &ctx.sha512 );
|
||||
sph_sha512( &ctx.sha512, &hash[14], 64 );
|
||||
sph_sha512_close( &ctx.sha512, &hash[15] );
|
||||
|
||||
ComputeSingleSWIFFTX((unsigned char*)&hash[12], (unsigned char*)&hash[16]);
|
||||
|
||||
sph_haval256_5_init(&ctx.haval);
|
||||
sph_haval256_5(&ctx.haval,(const void*) &hash[16], 64);
|
||||
sph_haval256_5_close(&ctx.haval,&hash[17]);
|
||||
sph_haval256_5_init(&ctx.haval);
|
||||
sph_haval256_5(&ctx.haval,(const void*) &hash[16], 64);
|
||||
sph_haval256_5_close(&ctx.haval,&hash[17]);
|
||||
|
||||
if ( work_restart[thrid].restart ) return 0;
|
||||
|
||||
sph_tiger_init(&ctx.tiger);
|
||||
sph_tiger (&ctx.tiger, (const void*) &hash[17], 64);
|
||||
sph_tiger_close(&ctx.tiger, (void*) &hash[18]);
|
||||
sph_tiger_init(&ctx.tiger);
|
||||
sph_tiger (&ctx.tiger, (const void*) &hash[17], 64);
|
||||
sph_tiger_close(&ctx.tiger, (void*) &hash[18]);
|
||||
|
||||
LYRA2RE( (void*)&hash[19], 32, (const void*)&hash[18], 32,
|
||||
LYRA2RE( (void*)&hash[19], 32, (const void*)&hash[18], 32,
|
||||
(const void*)&hash[18], 32, 1, 4, 4 );
|
||||
|
||||
sph_gost512_init(&ctx.gost);
|
||||
sph_gost512 (&ctx.gost, (const void*) &hash[19], 64);
|
||||
sph_gost512_close(&ctx.gost, (void*) &hash[20]);
|
||||
sph_gost512_init(&ctx.gost);
|
||||
sph_gost512 (&ctx.gost, (const void*) &hash[19], 64);
|
||||
sph_gost512_close(&ctx.gost, (void*) &hash[20]);
|
||||
|
||||
SHA256_Init( &ctx.sha256 );
|
||||
SHA256_Update( &ctx.sha256, (const void*) &hash[20], 64 );
|
||||
SHA256_Final( (unsigned char*) &hash[21], &ctx.sha256 );
|
||||
sph_sha256_init( &ctx.sha256 );
|
||||
sph_sha256( &ctx.sha256, &hash[20], 64 );
|
||||
sph_sha256_close( &ctx.sha256, &hash[21] );
|
||||
|
||||
sph_panama_init(&ctx.panama);
|
||||
sph_panama (&ctx.panama, (const void*) &hash[21], 64 );
|
||||
|
||||
Reference in New Issue
Block a user