A shrinking algorithm for SHA256 rainbow tables

I am doing a sha256 hack project using rainbow tables. I am trying to attack 8 digit alphanumeric sequences. I understand exactly how rainbow tables work and how chains should be created and stored. However, I don't understand how to get the cut function to form the chains. I searched for it and thought about it for hours with no results. So what is a good chain shortening function and how can it prove that it covers all 8-digit alphanumeric sequences.

+3


source to share


1 answer


There are 10 ^ 9 different 8-digit sequences. There are 1,073,741,824 possible values ​​for the first 30 bits of the SHA256 hash value. So one sane approach is to extract those 30 bits and use that modulo 10 ^ 9 number as your reduction function:

R(hash) = hash[0:30] % 10^9

      



It is unlikely that this actually covers all 8-digit sequences, but in practice it should be good enough due to the supposed "random" properties of SHA256. There is a slight bias towards numbers <= 2 ^ 30 - 10 ^ 9 though due to modulus.

+3


source







All Articles