I apologize in advance if this question has been answered already. However, I have not been able to find an existing answer - despite the case being pretty simple and common I imagine. Perhaps there is some terminology that I do not know making me miss the obvious.
So here goes:
Assume we repeatedly SHA256-hash a "secret" value concatenated with different numbers and let an adversary know the hashed values and the concatenated number for each hashed value.
For instance:
Let's say the secret is "Pa55word", then we hash the following values and let the adversary know the integer and hashed value for each hash:
Pa55word0,
Pa55word1,
Pa55word2,
Pa55word3...
Then - my question is - if the adversary gains an advantage of finding the secret when knowing part of the hashed value and the hash for several different instances. Is he in a better situation than knowing a single instance where he knows part of the clear-text and the hash.
Or, simply, is the scheme secure?
The actual use case involves a callback mechanism over the internet.
What I am trying to accomplish is verifying that a received callback message corresponds to an outstanding request without performing a lookup in a database for an id. The hope is that this will make the system more resilient to denial-of-service attacks.
– Thomas Sylvest Nov 30 '21 at 09:18