Is there any bias in certain parts of the hash? E.g., first n
bits are more/less unique than the last/middle n
bits? Is there any particular property of any group of bits that makes it more/less unique?
-
$\begingroup$ Possible duplicate crypto.stackexchange.com/questions/3153/… $\endgroup$– mikeazoDec 6, 2014 at 11:10
-
$\begingroup$ @mikeazo Eh, how do you recon that this is a dupe of that? Are you pointing to the right question? $\endgroup$– Maarten Bodewes ♦Dec 6, 2014 at 12:04
-
$\begingroup$ @owlstead, okay maybe it would have been better to say related, but the answer to this follows directly from the other. If any set of bits is as secure as any other, then no group of bits is more/less unique. $\endgroup$– mikeazoDec 6, 2014 at 12:07
-
2$\begingroup$ @mikeazo I guess that kind of remark could be an important part of an answer. But for anybody not directly into attacks on SHA - such as me - it certainly does not answer the question. $\endgroup$– Maarten Bodewes ♦Dec 6, 2014 at 12:12
-
$\begingroup$ Interesting question. I look at a lot of a breviated Git commit hashes (typically the first 8 hex digits of an sha1 digest), and they occasionally contain no symbols other than [0-9] (that is, no [a-f]). By purely random chance, the odds of this are (10/16)^8, about 2.4%, but sometimes I have the impression that they're more common than this. Probably my perception is distorted. $\endgroup$– Dan LenskiSep 5, 2022 at 5:05
1 Answer
Yes in a sense in terms of the Hamming weight/Hamming distance. This relates to how the changes of one bit or series of bits affect others. While there is also an avalanche effect counteracting many n string bits attacks, Hamming dictates some attacks to be more successful on certain n bit strings and thus certain n bit strings more vulnerable to exploits:
http://people.csail.mit.edu/yiqun/SHA1AttackProceedingVersion.pdf
http://www.sciencedirect.com/science/article/pii/S0166218X02005887