Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: coinscashout on February 07, 2016, 06:31:11 PM



Title: In theory would a rainbow table...
Post by: coinscashout on February 07, 2016, 06:31:11 PM
In theory if I had collated all the data of all the nonces and headers to give the correct hash and created a rainbow table for this, would it be faster to go into the table and lookup the nonce or brute force it still? If, so approximately you be able to tell me how much faster?


Title: Re: In theory would a rainbow table...
Post by: achow101 on February 07, 2016, 06:51:42 PM
In theory if I had collated all the data of all the nonces and headers to give the correct hash and created a rainbow table for this, would it be faster to go into the table and lookup the nonce or brute force it still? If, so approximately you be able to tell me how much faster?
It would not since the header for every block is unique. It contains a field for the merkle root, the hash of all of the transactions included in the block. Since it is not possible to have the same transaction included in multiple blocks, the merkle root will always be different. Furthermore the block includes a timestamp, and that timestamp is always different for every block.


Title: Re: In theory would a rainbow table...
Post by: coinscashout on March 30, 2016, 02:47:06 PM
Thanks very helpful info


Title: Re: In theory would a rainbow table...
Post by: DannyHamilton on March 30, 2016, 07:37:57 PM
The block (including nonce) is 80 bytes (640 bits) long.

If you wanted to create a rainbow table of hashes of every possible block and nonce, you would need to create a table with:

2^640 = 4.56 X 10192 values.

There isn't enough time left before the heat death of the universe for you to create that many hashes.
There isn't enough digital storage available to store all these hashes even if you had access to every drive and chip in the world.
There isn't enough time energy left in the sun to power the computing chips you'd need to create that many hashes.


Title: Re: In theory would a rainbow table...
Post by: Sukrim on April 02, 2016, 10:21:53 PM
Well, that wasn't the question...

Lookup likely would be done in constant time (the space for headers is immensely large but not infinite, so you can know how big it is in theory and design your lookup function for it), it would depend on how long lookups take on that impossibly large dataset compared to hashing. There's no way to know, since there's no way to build such a system in the first place.

If you want, you can create CRC32-coin or something along these lines with tiny headers to find out for yourself if lookup or hashing is faster, but it would be difficult to generalize this to BTC. Also (since it doesn't make sense to even try it) your findings won't help anyways.