# C.11 Examples for Chapter 21

# Example 40

We want to graph the elliptic curve ${y}^{2}=x(x-1)(x+1)$.

First, we create a string $v$ that contains the equation we wish to graph.

`>> v=’y^2 - x*(x-1)*(x+1)’;`

Next we use the *ezplot* command to plot the elliptic curve.

`>> ezplot(v,[-1,3,-5,5])`

The plot appears in Figure C.1. The use of $[-1\text{,}\text{}3\text{,}\text{}-5\text{,}\text{}5]$ in the preceding command is to define the limits of the $x$-axis and $y$-axis in the plot.

# Example 41

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

`>> addell([1,3],[3,5],24,13,29)`

`ans =`

`26 1`

You can ...

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.