Which has a higher computational cost, to find the private key associated with a signature, or, a pre-image of a sha256 hash?


From a theoretical point of view

  • A preimage attack over sha256 has an order of about 2^256 operations, ie there's no know attack.

  • Now you do not need to find "the" private key, but any private key that generates the same address will work. So about 2^160 operations.

Operations over elliptic curves generally do not have hardware support. For sha256 you have bitcoin miners that have asic implementations of sha256.


There are no known ways to reverse hash functions. The only thing that can be accomplished with some hash functions is to create a collision - two inputs resulting in the same hash result. Usefulness (for attacks) of this is quite questionable.

So it all boils down to how easy it is to bruteforce an input which results in the desired hash. So, how fast is it to create a hash from an input to compare to.

I can't tell you how fast different hashes are but it also probably depends on used hardware - some are better suited for some things. In any case, I can assure you it's hard to find a matching input.

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.