Cryptography Reference
In-Depth Information
| Type notebook() for the GUI, and license() for information.
|
Let's enter the elliptic curve E 1 : y 2 = x 3
58447 x + 3954150 of Example
9.3. The vector represents the coecients [ a 1 ,a 2 ,a 3 ,a 4 ,a 6 ] in generalized
Weierstrass form. Unless otherwise specified, the curve is over the rational
numbers.
sage: E1 = EllipticCurve([ 0, 0, 0, -58347, 3954150 ])
To find out what E 1 is:
sage: E1
Elliptic Curve defined by y ˆ 2=x ˆ 3 - 58347*x + 3954150 over
Rational Field
Let's also define E 2 : y 2 = x 3 + 73. Here we use the shortened form of the
coecient vector [ a 4 ,a 6 ] corresponding to (nongeneralized) Weierstrass form.
sage: E2 = EllipticCurve([ 0, 73 ]);
Let's add the points (2 , 9) and (3 , 10) on E 2 :
sage: E2([2,9]) + E2([3, 10])
(-4 : -3 : 1)
Note that the answer is in projective coordinates. We could have done the
computation with one or both points in projective coordinates. For example:
sage: E2([2,9]) + E2([3, 10, 1])
(-4 : -3 : 1)
The identity element of E 2 is
sage: E2(0)
(0 : 1 : 0)
We can also define a point:
sage: S = E2([2,9]) + E2([3, 10])
To find out what S is:
sage: S
(-4 : -3 : 1)
The computer remembers that S lies on E 2 , so we can add it to another
point on E 2 :
sage: S + E2([2, 9])
(6 : -17 : 1)
To find the 3rd multiple of the point (2 , 9) on E 2 :
sage: 3*E2([2,9])
(5111/625 : -389016/15625 : 1)
To find the torsion subgroup of E 1 ( Q ):
sage: E1.torsion subgroup()
Torsion Subgroup isomorphic to Multiplicative Abelian Group
 
Search WWH ::




Custom Search