Re: hash of a string is the same string?
- From: countableinfinity@xxxxxxxxx
- Date: Mon, 12 Jan 2009 03:36:35 -0800 (PST)
so, it means it is known whether a fixed point exists for md5, sha1
and other algorithms? no research has been done in this field? any
pointers?
On Jan 12, 12:33 pm, Ilmari Karonen <usen...@xxxxxxxxxxxxxx> wrote:
On 2009-01-12, countableinfin...@xxxxxxxxx <countableinfin...@xxxxxxxxx> wrote:
Is it possible that the md5 or sha1 hash of a string is the same
string? i.e. hash of s = s?
For a randomly chosen n-bit hash, the probability that there is no
string that hashes to itself is (1 - 1/2^n)^(2^n), which approaches
1/e =~ 0.367879441171442 for sufficently large n. In practice, even n
= 10 is enough to get within 99.95% of that value.
I don't think there's any known reason to expect either MD5 or SHA1 to
behave in a manner different from a randomly chosen hash of the same
length in this respect. So for each of them, the probability of there
being at least one string that hashes to itself, purely by chance, is
about 63.21%.
I'm not aware of any such string being found for either MD5 or SHA1.
Of course, if one was found, the probability for that particular hash
would become 100%.
--
Ilmari Karonen
To reply by e-mail, please replace ".invalid" with ".net" in address.
.
- Follow-Ups:
- Re: hash of a string is the same string?
- From: Unruh
- Re: hash of a string is the same string?
- References:
- hash of a string is the same string?
- From: countableinfinity
- Re: hash of a string is the same string?
- From: Ilmari Karonen
- hash of a string is the same string?
- Prev by Date: Re: hash of a string is the same string?
- Next by Date: Re: hash of a string is the same string?
- Previous by thread: Re: hash of a string is the same string?
- Next by thread: Re: hash of a string is the same string?
- Index(es):
Relevant Pages
|