Need help for implementing Equihash algorithm

So, I understand that the first step is generating 2^21 hashes, each is 25 bytes long.

How do I generate them?

Are you trying to write an implementation? If so, I suggest studying an existing implementation first, perhaps this one (note: I haven’t reviewed that particular piece of code; if someone provides a better example implementation, I’m happy to replace this link.)

If you’re just trying to understand it:

The first step is generate the work so that there’s something to put through the algorithm. (The work contains things like the previous block’s hask, the Merkle root of the newly proposed block, etc.)

Then you use the BLAKE2b hash function on that work 1,048,576 times, with each result being a string 50 bytes long. (That’s 2^20 times.)

Next, you split all of those in half, so that you have 2,097,152 strings that are 25 bytes each. (That’s 2^21 strings.)

I am trying to implement it myself.

I don’t understand how can a blake2b return 50 bytes, when blake2b returns 32 bytes
as seen here Blake2b wiki

It says in the BLAKE2b wiki page that the algorithm “can output digests from 1 up to 64 bytes for BLAKE2b.”

I don’t see where you’re getting 32 from. Perhpas you’re mis-reading the upper limit for BLAKE2s as applying to BLAKE2b?

If you look at the pseudocode for BLAKE2b on that page, note:

cbHashLen: Number, (1..64) Desired hash length in bytes