On Thursday, August 20, 2015, Mark Rotteveel <m...@lawinegevaar.nl> wrote:

> On Wed, 19 Aug 2015 18:17:03 -0400, James Starkey <j...@jimstarkey.net
> <javascript:;>>
> wrote:
> > A "better" hashing algorithm has no signficant effect.  The difference
> in
> > security between a 20 byte hash and a 64 byte hash is 1 / 2^128, a
> number
> > so small that there isn't enough computer memory on earth to hold it in
> > decimal format.  Please think about that.
>
> How do you arrive at that number?
>
>
>
SHA1 produces a 160 bit hash or 2^160 possible values.  To search the hash
space, on average you have to try half of these, or 2^159 probles.  A
decimal digit requires about three and a half bits, so round that up to
four.  So expressing the number of probes in decimal (or hex) would require
2^155 digits.  If we assume there are four billion computers on earth.
That means that each computer would need to store 2^123 digits.   A
gigabyte is 2^9, so each compuer would have to have 2^114 GB of memory.

The probability of breaking the hash is the reciprical of that number,
which will have approximately that number of zeros after the decinal
point.  For convenience, lets assume that the probability of guessing a
SHA-256 hash is zero, so the difference between SHA-1 and SHA-256 is the
same as the probablity of guessing a SHA-1 hash, which is a number too
small to be expressed except exponentially.

>
>


-- 
Jim Starkey
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to