There should be presented a bit simplistic theory from the so-called “algebraic structures” before showing method of implementing elliptic curves on digital devices.
So what is this algebraic structure? This is a non-empty set with at least one operation in this set: . What can contain such a set? Numbers, colors, cities etc:
. What can this operation be like? Addition, multiplication, but also returning a city lying between two selected cities:
.
For the needs of EC, we will consider structures with finite sets with two-arguments operation or two two-arguments operations: or
.
If the structure meets the following requirements:
- operation
is associative:
- set A has a identity element e for operation
:
- each element
from set A have it’s inverse element
:
we can call this kind of algebraic structure a group.
Additionally, if the operation is commutative for each
:
, then this group is called an commutative or abelian group.
There are two ways of group’s write:
- additive: G = {A, +}, where the identity element is presented as ‘0’ and the inverse element of a as -a (like in ‘traditional’ adding)
- multiplicative: G = {A,
}, where the identity element is presented as ‘1’, and the inverse element of a as
(like in ‘traditional’ multiplication).
If element A which is not a identity element is selected from the set A, which will be used to the following operations: , it creates a subset
(
– H is subset of G) which with
operation is a subgroup that is called a cyclic group, and
is a generator of this group. The set H can be also two-element
, and exactly a set G (H = G). So the whole group G is a cyclic group, if there is at least one element
, from which any other element of the group can be created:
(additive write) or
(multiplicative write).
If a set of all points lying on a certain elliptical curve is taken and as a set EC and addition of two of these points will be marked as + operation (described in the previous section), then G = {EC, +} is an abelian group. A point g is also selected for creating a cyclic sub-group H = {ECH, +}.
And that’s all to show how elliptic curves work as a theory, however, this is not enough yet to show the way the EC is implemented.
If the structure meets the following requirements:
- structure
is an abelian group (commutative)
- structure
(without a identity element of group
) is also an abelian group (commutative)
- operation
is distributive over
:
and
this is the structure we call the field and, for simplicity, we write K = {A, +, }.
Let’s now look back at the EC chart from the previous section:
The graph consists of two X, Y coordinates on which the real numbers are located. Real numbers can be added and multiplied. If an algebraic structure consisting of an infinite set of real numbers, additions and multiplication is constructed, it will turn out that such a structure is a field. Thus, it can be seen that the EC lies on a dimensional space over field.
We know that the field of real numbers is not suitable for implementation on digital devices due to its infinite number of elements and the need for infinite accuracy of calculations. So what field can we use? It turns out that there are two types of finite fields that are ideally suited for the software and hardware implementation. In the nearest parts, we will deal with fields for software implementation.