Pre-Image Resistance of repeated, patterned SHA2-256 digests Suppose $H = \operatorname{SHA2-256}$.

Let $H_1 = H(\text{“Alpha1”})$.

Let $H_2 = H(\text{“Alpha2”})$.

…

Let $H_N = H(\text{“AlphaN”})$.

So all these digests are based off a common pre-image post-fixed with the index.

Question 1: Does knowing the values $H_1, \dotsc, H_N$ and the length of common pre-image substring "Alpha" leak any information about "Alpha"?

Question 2: Would double-hashing make any significant difference to pre-image security? E.g.: $H_i = H(H(\text{“Alpha”} \mathbin\| i))$
Question 1: Does knowing the values $H_1, \dotsc, H_N$ and the length of common pre-image substring "Alpha" leak any information about "Alpha"?


Only in the sense that it enables an adversary to test a guess for what the string might be.  In particular, suppose the random variable $X$ has some probability distribution as far as you know.  Knowing what $H(X \mathbin\| i)$ is narrows down the probability distribution on $X$ a great deal—possibly even to a unique value—and enables you to test a guess which you might not be able to do without knowing $H(X \mathbin\| i)$, but there's no way known to search for what $X$ might be cheaper than brute force.

Of course, if $X$ is simply (say) uniformly distributed among the English names for Greek letters—Alpha, Beta, Gamma, etc.—then the brute force search is already pretty cheap!  Any security arises from a distribution with many more possibilities and much lower probabilities than $1/24$.


  Question 2: Would double-hashing make any significant difference to pre-image security? E.g.: $H_i = H(H(\text{“Alpha”} \mathbin\| i))$


No; at most, it would slightly raise the false positive rate for a search.