tags:

views:

79

answers:

4

how hard is it to find x where sha1(x) = x? where x is the form of 'c999303647068a6abaca25717850c26c9cd0d89c'

i think the fact that there are sha1 collisions make this possible, but, how easy (or hard) is it to find an example?

A: 

SHA1 Collisions can be Found in 2^63 Operations. I would say its rather hard. You could go about brut forcing it. Get the book applied cryptography and sit down for a read. Look into the Birthday Paradox, which can be used to find collisions.

CrazyDart
And as a general rule, a hash collision to a perfectly secure hash should take 2^(n/2) attempts (eg: a perfectly secure SHA1 would require 2^80 attempts because it has 160 bits). See: [Birthday attack](http://en.wikipedia.org/wiki/Birthday_attack)
NullUserException
bday paradox can be used to find arbitrary collisions within the hash domain. It does not transfer information on finding a seed for a particular hash
Eric
+3  A: 

Read Cryptanalysis of SHA-1 on Wikipedia. There's more information than you need on that article and its references combined.

Edit:

how hard is it to find x where sha1(x) = x?

Such an attack is known as a preimage attack and finding such an x is usually much harder than a general collision attack, i.e. finding arbitrary x1 and x2 such that sha(x1) = sha(x2).

casablanca
A: 

The one most important reason for existence of cryptographic hash functions (of which SHA family functions are) is to make finding inputs corresponding to a given digest difficult. A cryptographic hash function producing N-bit digests is considered good if to find a matching input one must perform 2^N/2 operations in average, that is, no other way than brute-force is reliably possible.

usta
A: 

So you are searching for mathematical invariant for SHA1 transformation. invariant subspace problem. :-)

yadab