When a server is under attack, it send the client the following data:
- Nonce - a byte array of Y length
- Hash - the hash digest of the puzzle solution
The client has to find X such as Hash(Nonce||Counter) = Hash where Counter is a 32-bit integer value starting from 0.
The client has to return the correct Counter to the server.
- Is this construction safe?
- What should be the ideal length of Nonce?
- Does anything change if the length of the Nonce is the same length of the hash's block length?
- What hash function would be ideal in this scenario?