I'm trying to understand the basics for elliptic curve cryptography. From my understanding, going from the generator point $G$ to $2G$ requires taking the line tangent at point $G$, finding the intersection to the curve, and then reflecting over the x-axis.
I'm going through this example. I'll write it out here also:
The elliptic curve is:
$$y^2 \equiv x^3 + 2x + 2\ (\bmod 17\ )$$
$$G = (5,1)$$
So the gradient can be computed using implicit differentiation. I understand why it is defined as being:
$$s = \frac{3x_G^2 + a}{2y_G}$$
Here, this would be:
$$s \equiv \frac{3(5^2) + 2}{2(1)} $$
Therefore I would think the slope tangent to the graph at the generator point is $38.5$, but the lecturer converts this to being $13\ (\bmod 17\ )$ using the extended Euclidean algorithm. But the slope of the line tangent to the graph is actually $38.5$. Plotting with a slope of 38.5 is shown below:
So I'm curious why they use $13$ instead of $38.5$ if the latter is the slope tangent to the graph?