C.11 Examples for Chapter 21

Example 40

We want to graph the elliptic curve y2=x(x1)(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, 3, 5, 5] in the preceding command is to define the limits of the x-axis and y-axis in the plot.

Figure C.1 Graph of the Elliptic Curve y2=x(x1)(x+1).

A graph plots an oval shaped curve at the left along with an elliptic curve pointing towards right.

Example 41

Add the points (1,3) and (3,5) on the elliptic curve y2x3+24x+13(mod29).

>> 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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.