示例#1
0
void init_x12_4way_ctx()
{
     blake512_4way_init( &x12_4way_ctx.blake );
     bmw512_4way_init( &x12_4way_ctx.bmw );
     init_groestl( &x12_4way_ctx.groestl, 64 );
     skein512_4way_init( &x12_4way_ctx.skein );
     jh512_4way_init( &x12_4way_ctx.jh );
     keccak512_4way_init( &x12_4way_ctx.keccak );
     luffa_2way_init( &x12_4way_ctx.luffa, 512 );
     cubehashInit( &x12_4way_ctx.cube, 512, 16, 32 );
     sph_shavite512_init( &x12_4way_ctx.shavite );
     simd_2way_init( &x12_4way_ctx.simd, 512 );
     init_echo( &x12_4way_ctx.echo, 512 );
     hamsi512_4way_init( &x12_4way_ctx.hamsi );
//     sph_fugue512_init( &x12_4way_ctx.fugue );
};
示例#2
0
void init_qubit_ctx()
{
#ifdef LUFFA_SSE2_BROKEN
        sph_luffa512_init(&qubit_ctx.luffa);
#else
        init_luffa(&qubit_ctx.luffa,512);
#endif
        cubehashInit(&qubit_ctx.cubehash,512,16,32);
        sph_shavite512_init(&qubit_ctx.shavite);
        init_sd(&qubit_ctx.simd,512);
#ifdef NO_AES_NI
        sph_echo512_init(&qubit_ctx.echo);
#else
        init_echo(&qubit_ctx.echo, 512);
#endif
};
示例#3
0
void init_x14_ctx()
{
#ifdef NO_AES_NI
        sph_groestl512_init(&x14_ctx.groestl);
        sph_echo512_init(&x14_ctx.echo);
#else
        init_echo(&x14_ctx.echo, 512);
        init_groestl(&x14_ctx.groestl);
#endif
        init_luffa(&x14_ctx.luffa,512);
        cubehashInit(&x14_ctx.cubehash,512,16,32);
        sph_shavite512_init(&x14_ctx.shavite);
        init_sd(&x14_ctx.simd,512);
        sph_hamsi512_init(&x14_ctx.hamsi);
        sph_fugue512_init(&x14_ctx.fugue);
        sph_shabal512_init(&x14_ctx.shabal);
};
void init_Xhash_contexts(){

	//---luffa---
	init_luffa(&base_contexts.luffa,512);
	//--ch sse2---
	cubehashInit(&base_contexts.cubehash,512,16,32);
	//-------
	sph_shavite512_init(&base_contexts.shavite1);
	//---echo sphlib or AESNI-----------
	#ifdef AES_NI
  	init_echo(&base_contexts.echo1, 512);
	#else
	sph_echo512_init(&base_contexts.echo1);
	#endif
	//---local simd var ---
	init_sd(&base_contexts.ctx_simd1,512);
}