This commit is contained in:
Jay D Dee
2023-10-06 22:18:09 -04:00
parent bc5a5c6df8
commit 31c4dedf59
144 changed files with 5931 additions and 3746 deletions

View File

@@ -56,21 +56,20 @@ void deep_hash(void *output, const void *input)
const int midlen = 64; // bytes
const int tail = 80 - midlen; // 16
memcpy( &ctx.luffa, &deep_luffa_mid, sizeof deep_luffa_mid );
update_and_final_luffa( &ctx.luffa, (BitSequence*)hash,
(const BitSequence*)input + midlen, tail );
update_and_final_luffa( &ctx.luffa, hash,
input + midlen, tail );
cubehashUpdateDigest( &ctx.cubehash, (byte*)hash,
(const byte*) hash,64);
cubehashUpdateDigest( &ctx.cubehash, hash,
hash,64);
#ifdef __AES__
update_final_echo ( &ctx.echo, (BitSequence *) hash,
(const BitSequence *) hash, 512);
update_final_echo ( &ctx.echo, hash,
hash, 512);
#else
sph_echo512 (&ctx.echo, (const void*) hash, 64);
sph_echo512_close(&ctx.echo, (void*) hash);
#endif
asm volatile ("emms");
memcpy(output, hash, 32);
}

View File

@@ -82,7 +82,6 @@ void qubit_hash(void *output, const void *input)
sph_echo512_close(&ctx.echo, (void*) hash);
#endif
asm volatile ("emms");
memcpy(output, hash, 32);
}