Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 1
    I don't think this answers the question, because OP explicitly asked about generating a string that results in the same hash, so HASH2 != HASH contradicts the assumption of the OP. OP also didn't mention simply reverting the sequence of operations of the hashing algorithm. Commented Aug 12, 2020 at 9:01
  • @RaimundKrämer It answers the part where the OP wants to generate the string by simply reversing the operations of the hashing function. You and I understand that this is not possible - that the only way to generate such a string is by trying all possible strings until you find one with the same hash. The OP doesn't understand that there can be algorithms that are not reversible even when you reverse the operations of the algorithm. Commented Aug 12, 2020 at 9:06
  • 3
    SHA256(REVERSE_SHA256("Some hash")) has to be "Some hash" by definition. You can't say that SHA256(REVERSE_SHA256(HASH)) != HASH because then your REVERSE_SHA256 function is broken (as in, not working). Commented Aug 12, 2020 at 14:11
  • What would it possibly mean for a function to be "one-way"? Non-injective? Non-injective functions don't fix OP's question. Commented Aug 13, 2020 at 9:40
  • @user253751 That's the whole point of my answer. That constructing a reverse function as proposed by the OP will not work - IE the reverse function is necessarily broken. The OP assumes that there is a way to reverse the hash by reverse engineering the mechanics behind generating the hash. I'm attempting to show that for some algorithms - especially algorithms we consider cryptographic hash functions, such reverse engineering leads to nonsense results. Commented Aug 14, 2020 at 6:10