I was looking into cryptonight algo (through tsiv code)... so basically it is just jackpotcoin first version (the buggy one) ?
seriously?
cryptonight_keccakf((uint64_t*)&state->hs, 24);
switch( state->hs.b[0] & 3 ) {
case 0:
cn_blake((const uint8_t *)state, 200, (uint8_t *)hash);
break;
case 1:
cn_groestl((const BitSequence *)state, 200, (BitSequence *)hash);
break;
case 2:
cn_jh((const BitSequence *)state, 200, (BitSequence *)hash);
break;
case 3:
cn_skein((const BitSequence *)state, 200, (BitSequence *)hash);
break;
default:
break;
}
and jackpotcoin (ok there is may-be more round...)
KECCAK512_80(HASH.U8);
uint rounds = HASH.U4[0x00] & 0x00000007U;
for (uint i = 0; i < 8; i++) {
if (i < rounds) {
uint method = HASH.U4[0x00] & 0x00000003U;
if (method == 0) { BLAKE512(HASH.U8); }
else if (method == 1) { GROESTL512(HASH.U8, LT0, LT1, LT2, LT3, LT4, LT5, LT6, LT7); }
else if (method == 2) { JH512(HASH.U8); }
else if (method == 3) { SKEIN512(HASH.U8); }
}
}