From "Mastering Bitcoin: Programming the Open Blockchain 3d edition, Ch4" :

All addresses based on hash functions are theoretically vulnerable to an attacker independently finding the same input that produced the hash function output (com‐ mitment). In the case of Bitcoin, if they find the input the same way the original user did, they’ll know the user’s private key and be able to spend that user’s bitcoins.

Bitcoin uses elliptic curve arithmetics for private and public keys, the only thing which is hashed is a public key, so the best thing we can reveal is a public key, isn't it? (I'm not considering P2SH)
Or we can somehow get a private key with successful collision attack?

1 Answer 1


If the attacker just tries random public keys and guesses the correct one, they obviously won't be able to spend the funds. What they can do is try random private keys and derive the public keys from those, then if they're successful they'll have the private key as well. In any case, Bitcoin keys and addresses are large enough that brute-forcing them should be infeasible.

Side note, what's being descibed here is called a preimage attack, which is not the same as a collision attack.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.