[REBOL] Re: Question about checksum/secure
From: brett:codeconscious at: 20-Nov-2001 1:49
Thanks Holger and Ladislav,
> No, hashing is a many-to-one operation, mapping from an infinite space
> (arbitrarily long string series) to a finite space (string series of
> length 20), so there always has to be the chance of collisions.
>
> The chance of a collision is very small though, especially if you
> deal with a small number of values, say, less than a billion billion
> billion :-). For any two arbitrary strings to have the same checksum
> the chance is 1/(2^160). For at least one collision among n strings
> the chance is n/(2^160) (for n <= 2^160, obviously).
Hm a billion billion billion, guess it will be a while before my hardward
threatens that, however I suppose some rarely used collision detection is in
order.
Next (and hopefully last) question then is, is the checksum/secure method
something that could change?
I was thinking of using it for example to generate a filename by doing
checksum/secure on the content of a text file, but I think the question is
useful for understanding encryption keys as well.
Many thanks.
Brett.