title: Difference between breaking the one way hash property by _brute force_ and proving collision
body: <p>For any Hash function, conceptually speaking or otherwise, What is the difference between aforementioned 2 operations. I have approached the problem in the following manner:</p>
  
  <pre><code>H=hash(someplaintext)
  n=0
  while 1:
      if hash(str(n))==H:
          print n
      n+=1
  </code></pre>
  
  <p>Both the properties could be proven this way, is there something wrong? Ignore the efficiency, memory usage or any such property. Please answer my question, strictly on the basis of correctness</p>