I’m trying to understand how equihash works as much in detail as possible. I analyzed so the “official” implementation (here the link). However I cannot understand why, after generating each blake2b hash, a right shift operation is performed every 32 bits.
I put here the code;
My doubt is in row 74 where each block of the tuple is right shifted 32 - n / (k + 1) bits. Why is it correct?
When the collisions are resolved, blocks are XORed generating a new tupleList. Neveretheless, in this way, if I have correctly understood, in each step of the algorithm, every n/(k+1) bits are not considered sequentially.
I try to make an example:
On each step I’m interested in the next 20 bits i.e. bits from 0 to 19 on first step, 0 to 39 on second etc.
In this algorithm it seems to me that in the first step are considered bits from 0 to 19, 32 to 52 on second etc because the shift register operation cut off the bits from 20 to 31