title: Reversing SHA-1 or MD5 given (small) input length without brute force
body: <p>I recall hearing that some weaknesses were discovered with SHA-1 making it easier to find the plaintext input given the output hash. I also know that MD5 has been determined to be weak for some applications. I'm trying to create a program to demonstrate the different complexities of 2 approaches: a brute force search to find the input, and an exploitation of a weakness in SHA-1 or MD5 to find the input.</p>
  
  <p>The plaintext inputs will be of length &lt;4 and will consist of only A-Z, so brute force isn't impractical.  </p>
  
  <p>My questions are:<br>
  Is there a C/C++ implementation to reverse SHA-1 by exploiting the weaknesses?<br>
  Is there a C/C++ implementation to reverse MD5 by exploiting the weakness?</p>
  
  <p>My current feeling is that any approach to exploitation of the weakness will not have enough of a difference in time-complexity to demonstrate a benefit for such a small sample size.</p>