Skip to content

Commit 5151271

Browse files
committed
ec arithmetic additions
1 parent f08f04d commit 5151271

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/source/ec_arithmetic.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,16 @@ code:
4747
.. tip::
4848

4949
You can also use :py:class:`~ecdsa.curves.Curve` to get the curve
50-
parameters from a PEM or DER file. Or use the
50+
parameters from a PEM or DER file. You can also use
51+
:py:func:`~ecdsa.curves.curve_by_name` to get a curve by specifying its
52+
name.
53+
Or use the
5154
:py:func:`~ecdsa.curves.find_curve` to get a curve by specifying its
5255
ASN.1 object identifier (OID).
5356

57+
Affine coordinates
58+
------------------
59+
5460
After taking hold of curve parameters you can create a point on the
5561
curve. The :py:class:`~ecdsa.ellipticcurve.Point` uses affine coordinates,
5662
i.e. the :math:`x` and :math:`y` from the curve equation directly.
@@ -82,6 +88,8 @@ methods of the object:
8288
8389
print("x: {0}, y: {1}".format(point_c.x(), point_c.y()))
8490
91+
Projective coordinates
92+
----------------------
8593

8694
When using the Jacobi coordinates, the point is defined by 3 integers,
8795
which are related to the :math:`x` and :math:`y` in the following way:
@@ -123,3 +131,7 @@ the regular implementation:
123131
124132
point_c = point_a + point_b
125133
print("x: {0}, y: {1}".format(point_c.x(), point_c.y()))
134+
135+
All the other operations, like scalar multiplication or point addition work
136+
on projective points the same as with affine representation, but they
137+
are much more effective computationally.

0 commit comments

Comments
 (0)