The code is correct. This is the block of code from master-0.9.0.1 and from latest out of Lyra2's github.
//================================ Setup Phase =============================//
//Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits
ptrWord = wholeMatrix;
for (i = 0; i < nBlocksInput; i++) {
absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil)
ptrWord += BLOCK_LEN_BLAKE2_SAFE_BYTES; //goes to next block of pad(pwd || salt || basil)
}
So, ptrWord moves to a new 64byte block of the wholeMatrix which gets XORd against state in absorbBlockBlake2Safe.
I'm not sure where you got this code: ptrWord = &wholeMatrix[0]; but that is not what is implemented.
a432511
We are looking into this and evaluating the impact. This was written by the authors of the Lyra2 algorithm, so we are trying to contact them as well.
Cheers,
a432511
DEV,i found a bug in lyra2.c
please check this code
//================================ Setup Phase =============================//
//Absorbing salt, password and basil: this is the only place in which the block length is hard-coded to 512 bits
ptrWord = &wholeMatrix[0];
for (i = 0; i < nBlocksInput; i++) {
absorbBlockBlake2Safe(state, ptrWord); //absorbs each block of pad(pwd || salt || basil)
ptrWord += BLOCK_LEN_BLAKE2_SAFE_BYTES; //goes to next block of pad(pwd || salt || basil)
-------------------------------------------------------
BLOCK_LEN_BLAKE2_SAFE_BYTES is 64
the problem is
ptrWord is a 64 bit pointer,but the line ,it add 64,means it add 64*64=4096 bit=512 byte,
so ,the next round ,all ptrWord is zero,
that means Concatenates the basil and padding are not used!!!!!!
you must change BLOCK_LEN_BLAKE2_SAFE_BYTES to BLOCK_LEN_BLAKE2_SAFE_INT64