# Given a sha-512 hash of a value picked at random from the $2^{128}$ key space, how hard would it be to recover the original value?

More specifically is it reasonable to assume that someone with the resources of a state actor can feasibly compute a rainbow table of all the sha-512 hashes of values within the $2^{128}$ key space?

Am I correct in assuming that the most efficient attack in this case would be to compute a rainbow table, given that sha-512 doesn't have any known vulnerabilities?

• Well, one would need $2^{128}$ evaluations of SHA-512 and that is considered infeasible for now... – SEJPM Mar 18 '17 at 11:09

The answer, as SEJPM pointed out, is "no, a work effort one the order of $2^{128}$ SHA-512 computations would be infeasible, even by a three letter agency".