Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When a server is under attack, it send the client the following data:

  1. Nonce - a byte array of Y length
  2. 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.

  1. Is this construction safe?
  2. What should be the ideal length of Nonce?
  3. Does anything change if the length of the Nonce is the same length of the hash's block length?
  4. What hash function would be ideal in this scenario?
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.