Is there a way to somewhat decrypt a SHA-256 hash, provided that the initial string was also a SHA-256 hash?

If not, could anyone link me to a rainbow table containing some of the $16^{64}$ possible hashes?

  • 1
    $\begingroup$ Firstly, SHA-256 isn't an encryption scheme so the verb 'decrypt' isn't appropriate here. I think you mean finding the plaintext which gives the hash value. Secondly, a hash value computed with SHA-256 is composed of 256bits so all the possible values are all the 256-bit words (note that $16^{64} = 2 ^{4\times64} = 2^{256} $). $\endgroup$
    – Raoul722
    Feb 28 '16 at 16:23

Assuming that by 'decrypt' you mean finding the preimage, this is not possible in general. The fact that you know the hash input is a 256-bit value does not help you in any way.

A rainbow table could cover only a tiny portion of the $2^{256}$ possible inputs. Something like $2^{80}$ hashes would be on the upper end, if not beyond, a feasible amount of work if someone really wanted to be able to crack such hashes. A random 256-bit value would have only abut a $2^{-176}$ chance of being in it, meaning no hash you encountered in practice would be found.

If you know something else, like that the input to the original SHA-256 iteration was a low entropy password, you could be able to mount an attack. Then you would essentially be attacking SHA-256d instead.


the sha256 is a one way function, so you can not do the inverse. hash functions must satisfy two properties the first is a one way function so calculating f-1 is mathematically impossible. the second propriety is you can not find collusion means two plaintext giving the same sha256 hash value(mathematically is possible but not programmatically). if you arrive to break one of this two properties we have to find a new hash function. that was the case for md5 and now all suggest to not use it. Regards


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.