On 10/15/09 11:17 AM, Lori Alt wrote: > >> Also, in ZFS today block checksums are used for integrity protection, >> not for block equality comparisons. The fact that here blocks would not >> be compared for actual equality does worry me somewhat. >> >> > > I presented the question :"Are SHA256 questions good enough to > establish block equality?" to Jeff Bonwick. His answer: > >> Yes. Collision probability is 10-77, i.e. 77 nines. Nothing else >> in a computer is even close to that reliable.
Note that the probability of a collision also depends on the number of blocks in the stream. For example, one would need to do 2^128 SHA256 digests to get a probability of a collision > 0.5. There is a nice table at http://en.wikipedia.org/wiki/Birthday_paradox#Probability_table that gives the upper bound on the number of blocks to achieve a given probability. I would agree that this is a reliable way to establish block equality given the number of blocks needed for even a probability of 10^-18. Regards, -Krishna