And why someone can't simply divide 3G with G and get the 3?
Because this operation isn't defined on elliptic curves, most specially in a curve defined over a discreet field, this leads to the "discreet logarithm problem" that are an unsolved problem so far.
if you are using a curve over, let's say, the real numbers set, you can calculate it. But for cripto, usually the curves are defined over a set mod(p).
secp256k1 is defined over the set mod(p), where p is:
p = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F
p = 2256 - 232 - 29 - 28 - 27 - 26 - 24 - 1
Yes but if the first G is randomly chosen and the coordinates of public key are given to someone he can't prove he owns the public key, even if he has the private key. The G is something unknown, meaning that he can't start our `painting` if he only has the number we multiply G. This is what I don't get...
G is just a convention, for the point where the calculations begins. There is some optimizations that can be done, but in general terms, every point on the curve can be a generator point. For computing a given public key, just take the secret and multiply it for G. Your result is the public key.
Elliptic curve cryptographic (or ECC) assumes that when you have a curve defined over a discreet set of numbers, is impossible to do the inverse operations (subtraction and division), because to do so, you need compute something called a
discrete logarithm(
DL).
Your computer can calculate logarithm over the real numbers set because there is a serie, called Taylor Serie that is a numerical approximation of the result (i.e gives the sabe output to a given input). But this series are ONLY defined over real numbers, and without a method to compute it, the only way to solve is via brute force.
We use brute force methods for solve small logarithms or to factor small number, but for really big numbers, like 2¹²³, this method keeps useless. This makes the safety of ECC and RSA respectively.
And because it, we can easily calculate the public key via multiply (no DL here), but we can't make the inverse, find out the private key from the public (a DL need to be solved).
Maybe you can thought whether there is some way to solve DL. Yes, there is! But with digital computer and numbers in a big order (2²⁵⁶) it will take forever. (Pollard's Kangaroo is an example)
[moderator's note: consecutive posts merged]