简体   繁体   中英

Retrieve a sha256 from another sha256

I have a project where we are supposed to find a sha256 from another sha256.

For example we have

hash1 = "45f1bc22c29626c6db37d483273afbe0f6c434de02fe86229d50c9e71ed144fc"

and we would have to find

hash0 = "5495a885b7f445a198cc5b67a517a0e0536792ab3e7ead18a12c75f8310a9b89"

hash1 is just the hash0 used in a sha256 function.

Initially, I went on to redo every possibility of sha256 but it may do a lot and take a lot of time. If you have any idea how I could do this, even see if it's possible?

It's impossible, hashes can't be inverted, regardless if they're hashes of hashes or of other content. You could try all the combinations, sure, knowing that the source is a 256-bit sequence, but this is practically prohibitive, although there's always a possibility of 1 out of 2^256 that you guess it at the first try:-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM