Post
Topic
Board Development & Technical Discussion
Re: I need a guiding hand to explain me elliptic curve cryptography
by
pooya87
on 04/10/2020, 11:54:38 UTC
There are two things here: reversing hash to "a message", and reversing a hash to "the message". Depending on "the message", it is way more impossible than just "a message".
The point pooya is making is that finding a collision is not the same as reversing the process. The input to SHA256 can be any message up to around 2 million terabytes. The output will always be 32 bytes. Therefore there are potentially million of messages which will give the same output. Even if you could search the entire space and find all the inputs which match a hash, you still haven't reversed the process.
exactly, this.
additionally on topic of addresses even if you were able find a collision (i believe the correct term is second-preimage attack) it may not even start with 0x02/0x03 to begin being a valid public key or start with those bytes but be a valid point on curve.

So, we could view that hash as 80-bit input 80-bit output one.
just because some bits are zero doesn't mean your output size is smaller. it is still 32 bytes or 256 bits. and on top of that you still have to compute and do the same exact work to find those bits too and make sure they are zero.

Quote
Reversing p2pkh is way more complex - if we view transformation from private key to public key as a hash function, then we have a sequence of 3 hash funcs., the first one being the most complex, but aslo the lousiest.
again you can't view them as the same. they are very different.