Skip to main content
2 of 6
added 392 characters in body
Mike Edward Moras
  • 18.2k
  • 12
  • 88
  • 242

If you wrote a reversible SHA-256 algorithm, how many "metadata" bits would be required for reversability?

If you would write such an algo, it would not be SHA-256 anymore. Also, it would lose its cryptographic usefulness.

SHA-256 is a non-reversible, one-way compression function. Voiding the non-reversability would void the core functionality that makes SHA-256 a cryptographically secure hash.

In the end you would end up having a non-lossy, two-way compression function — and a bad one too as it would waste too much space compared to simple compression functions like (for example) ZIP.

Also, since the goal ends up right there, it is not about cryptography anymore… rendering any further discussion about your idea off-topic.

Besides that, your question seems to try work around something which has been asked several times before. For example, see Would it be possible to generate the original data from a SHA-512 checksum?. So, in a broad sense your question is even a duplicate.

Mike Edward Moras
  • 18.2k
  • 12
  • 88
  • 242