from Hacker News

Ask HN: Is there a string which MD5 Sum is all 0xffffffffffff?

by gizmore on 4/23/23, 3:27 PM with 16 comments

  • by lphillips0825 on 4/23/23, 5:27 PM

    Assuming you meant a 128-bit hash with all bits set to '1' (i.e., '0xffffffffffffffffffffffffffffffff'), it would still be extremely difficult, if not practically impossible, to find a string that hashes to this specific value. The MD5 algorithm is designed to produce seemingly random output for small changes in input, and there are no known methods to easily reverse-engineer an MD5 hash.

    That being said, MD5 is no longer considered cryptographically secure due to vulnerabilities discovered over the years, such as hash collisions. But finding a specific hash, like the one you mentioned, would still require a brute-force attack or an advanced cryptanalytic method, neither of which is guaranteed to succeed.

  • by klyrs on 4/23/23, 4:12 PM

    Simple answer: of course there is. The real challenge is finding such strings.

    If I wanted to know the answer to that question, I'd first search some precomputed rainbow tables to see if anybody's gotten lucky:

    http://project-rainbowcrack.com/table.htm

  • by hospitalhusband on 4/23/23, 4:06 PM

    There's an infinite number of those strings, but barring an edge case in the md5 algorithm, none are known.
  • by mdaniel on 4/23/23, 4:41 PM

    I tried seeing if there were any references in log files or forum questions to that, but the bad news is that your specific hash is also what one would get from an "invalid" hash, same as asking about the magic string "00000000000000000000000000000000"
  • by fnordpiglet on 4/23/23, 6:16 PM

    This is essentially what crypto mining is, FWIW
  • by natas on 4/23/23, 8:37 PM

    how many cpus or gpus would it take to find the answer within 1 year?
  • by lagrange77 on 4/23/23, 4:00 PM

    Sounds like a NP problem.