# A.12 Examples for Chapter 21

# Example 40

All of the elliptic curves we work with in this chapter are elliptic curves $\text{mod}n$. However, it is helpful to use the graphs of elliptic curves with real numbers in order to visualize what is happening with the addition law, for example, even though such pictures do not exist $\text{mod}n$. Therefore, let’s graph the elliptic curve ${y}^{2}=x(x-1)(x+1)$. We’ll specify that $-1\le x\le 3$ and $-y\le y\le 5$:

In[1]:= `ContourPlot[$\mathrm{y}\stackrel{\u02c6}{\phantom{\mathrm{a}}}2$ == x*(x - 1)*(x + 1), {x, -1, 3 }, {y, -5, 5 }]`

# Example 41

Add the points (1, 3) and (3, 5) on the elliptic curve ${y}^{2}\equiv {x}^{3}+24x+13\text{}(\text{mod}\text{}29)$.

In[2]:= `addell[ {1, 3 }, {3, 5 }, ...`

Get *Introduction to Cryptography with Coding Theory, 3rd Edition* now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.