SHA-512 partial preimage I was looking at how SHA-512 works, and I have a question. Imagine I want an input $N$ of 512 bits whose hash in hexadecimal starts with the digits 12345678. How could I determine an input $N$ to get that hash output?
As far as we know, SHA512 acts like a random function.  So, the only way we know to find a preimage whose hash starts with 0x12345678, is to go through distinct preimages, and hash each one until we find one that starts with 0x12345678.

If the output of SHA512 is equidistributed (and we have no reason to believe it isn't), then the probability of any hash starting with 0x12345678 is $2^{-32}$, hence the expected number of hashes you would need to perform is $2^{32}$, which is an achievable work effort.