Can i reverse sha256 hash like 2nd hash to 1st hash ?
2nd hash is generated by sha256(1) so is it possible to reverse to 1st hash ?
In short, as of 2019, NO.
Cryptographic Hash functions are, in short, one-way deterministic but random functions. Deterministic means the same input has always the same output and the random in the sense that the output is unpredictable.
In Cryptography, we consider the security of hash functions by
x'
such that h(x') = y
when given any y for which a corresponding input is not known.x
, to find a 2nd-preimage x' != x
such that h(x) = h(x')
.x
, x'
which hash to the same output, i.e., such that h(x) = h(x')
.What you are looking for is the preimage. There are cryptographic hash functions like MD4 and SHA-1 for those collisions are found. But all of them are still have pre and 2nd-preimage resistance.
For Sha256 there are no known pre-secondary yet collision attacks. It is considered a secure hash function.
You may find some rainbow tables for SHA-256 that may include your hash values but probably not since the space is too big to cover.