Curves

Everything in ronkathon (and much of modern day cryptography) works with elliptic curves as primitives. Simply put, an elliptic curve is a curve defined by the equation where and are constants that define the curve. When working over a finite field so that , we put to denote the set of points on the curve over the field . It turns out that the set of points forms a group under a certain operation called point addition. This group, in at least certain cases, is discrete logarithm hard, which is the basis for much of modern day cryptography.

Curve Group and Pluto Curve

For the sake of ronkathon, we use a specific curve which we affectionately call the "Pluto Curve." Our equation is: and we work with the field and where . Predominantly, we use the extension since we need this for the Tate pairing operation. We refer to as the PlutoBaseField and as the PlutoBaseFieldExtension within ronkathon. From which, we also use the terminology of PlutoCurve to refer to and PlutoExtendedCurve to refer to .

We also define a CurveGroup, an extension of FiniteGroup trait representing the group law of the curve.

Type B curve and type 1 pairing

Investigating our curve and choice of field, we find that the curve is Type B since:

  • It is of the form ;
  • ; It follows that is supersingular which implies that the PlutoCurve has order (number of points) and PlutoExtendedCurve has order . Finally, the embedding degree of the curve is .
  • This curve has a 17-torsion subgroup calculated as largest prime factor of order of curve 102 = 17.2.3.

Since, the curve is supersingular, this allows us to define the type-1 Tate pairing in a convenient manner, where both , i.e. the base field subgroup of r-torsion subgroup.

In particular, we can pick to be the -torsion subgroup of PlutoCurve where is the scalar field of the curve. Note that is valid since and (Balasubramanian-Koblitz theorem).

In this case, we pick and define our pairing as: where is the Tate pairing and is the map where is a primitive cube root of unity. This is due to the fact that is the distortion map that maps a factor of (which is the -torsion group) to the other.

Pairing and Miller's algorithm

Let's dive a little bit deeper into divisors, and miller's algorithm.

Divisors essentially are just a way to represent zeroes and poles of a rational function. We are interested in divisors of functions evaluated on Elliptic curves, i.e. .

For example: let's take a function with , it's divisor is written as and it has a zero of order 3 at and a pole of order 3 at , thus, .

For an elliptic curve, a line usually intersects the curve at 3 points , then the divisor is written as . Note all of these divisors are degree-zero divisors as sum of their multiplicities is 0. There's another concept called support of divisor = .

Now, we have most of the things we need to represent tate pairing:

where is a rational function with and is the divisor equivalent to .

Miller's algorithm

can be calculated as where is the line from and , and is the vertical line going from . Both of these lines are used in chord-and-tangent rule in Elliptic curve group addition law.

Usual naive way is impractical on where , and thus, for practical pairings, Miller's algorithm is used that has time complexity, and uses an algorithm similar to double-and-add algorithm.

Helpful Definitions

Here are a few related definitions that might be helpful to understand the curve and the pairing.

roots of unity

the root of unity in is some number such that , For example in our field scaler field the roots of unity are .

-torsion

-torsion points are points for some point so that has order or is a factor of . The set of r-torsion points in is denoted . If is the algebraic closure of then the number of r-torsion points in is the number of points in .

  • Security note: If and are not co-prime then the discrete log is solvable in linear time with something called an anomaly attack.

Frobenius endomorphism

Curve endomorphisms are maps that take points in one a curve subgroup and map them to themselves. An example is point addition and point doubling. The Frobenius endomorphism denoted takes points in and maps them .

For higher powers of the map you write .

Trace Map

This then allows us to define the trace map which takes points in and maps them to

Since in our parameters we get .

Trace Zero Subgroup: The set of points of trace zero is a cyclic group of order , and every  satisfies  .

Quadratic Non Residue

A Quadratic Non-residue is a number that, cannot be expressed as a square of any other number. In other words, for a given modulus , a number is a quadratic non-residue if there is no number a satisfying the congruence (mod n).

An example of quadratic non-residues would be the number 2 in modulo 3, 4, or 5. In these cases, there is no integer that we can square and then divide by the given modulus to get a remainder of 2.

References

Note that most of these are gross over-simplification of actual concepts and we advise you to refer to these references for further clarifications.