```
It was my fault.
```

`G`

it is a point on the elliptic curve. It means `G`

have a number for `X`

and another for `Y`

. so unzipped G in `Secp256k1`

it is `G(x,y)`

:

```
- Uncompressed form (prefix 04)
04 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798
483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8
X = 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798
Y = 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8
```

Y `04`

to show this is an uncompressed way of `G`

.

This point is `Base point`

or `Generator point`

which used in `k=K*G.`

`*`

it's not like `*`

in math like `2*2 = 4`

. It is `a sign`

to display one of the curved operators.

We have 3 operators on a curve:

```
-Addition
-Negation
-Doubling
```

It is also to add two points. According to we have a point like `P1(x1,x2)`

and another point like `Q1(x2,y2)`

so we can't use `2+2 = 4`

, we need some other calculation to `P+Q.`

The result of `P+Q`

is another point on the curve that we can call it `R`

.

`Doubling`

it is twice a point on the curve, and the result of this is also a point on the curve.

so `P+P=R.`

When we say `k*G`

, we want `multiple`

our `private key`

to `a point on the curve`

.

We need to do this:

Convert our `private key`

to `binary base`

.

With a for in all the bits we begin to verify:

For each of these bits we do some `doublePoint`

Y `addPoints`

.

This is a predefined role and we have to follow it.

But how can we calculate a `addition`

two point?

```
λ = ( yq – yp ) / ( xq – xp)
xR = λ2 – xp – xq
yR = λ(xp – xR) – yP
```

With this. first we need to calculate `λ`

is ours `slope`

.

Then we can calculate our x and y for a new point. and the result is our

```
p+q = R
```

and what about `doubling`

?:

```
λ = (3x2) +a / (2y)
xR = λ2 - 2x
yR = λ(x - xR) – y
```

with these, we can now calculate `K=k * G`

.

There are many other tips to calculate `Public key`

since `Private key`

.

This is a good implementation in `PHP`

:

https://github.com/BitcoinPHP/BitcoinECDSA.php/blob/master/src/BitcoinPHP/BitcoinECDSA/BitcoinECDSA.php#L350