# Hessian form of an elliptic curve

In geometry, the Hessian curve is a plane curve similar to folium of Descartes. It is named after the German mathematician Otto Hesse. This curve was suggested for application in elliptic curve cryptography, because arithmetic in this curve representation is faster and needs less memory than arithmetic in standard Weierstrass form.

## Definition

Let $K$ be a field and consider an elliptic curve $E$ in the following special case of Weierstrass form over $K$: $Y^{2}+a_{1}XY+a_{3}Y=X^{3}$ where the curve has discriminant $\Delta =\left(a_{3}^{3}\left(a_{1}^{3}-27a_{3}\right)\right)=a_{3}^{3}\delta .$ Then the point $P=(0,0)$ has order 3.
To prove that $P=(0,0)$ has order 3, note that the tangent to $E$ at $P$ is the line $Y=0$ which intersects $E$ with multiplicity 3 at $P$.
Conversely, given a point $P$ of order 3 on an elliptic curve $E$ both defined over a field $K$ one can put the curve into Weierstrass form with $P=(0,0)$ so that the tangent at $P$ is the line $Y=0$. Then the equation of the curve is $Y^{2}+a_{1}XY+a_{3}Y=X^{3}$ with $a_{1},a_{3}\in K$.
To obtain the Hessian curve, it is necessary to do the following transformation:
First let $\mu$ denote a root of the polynomial $T^{3}-\delta T^{2}+{\delta ^{2} \over 3}T+a_{3}\delta ^{2}=0.$
Then $\mu ={\delta -a_{1}\delta ^{2/3} \over 3}.$
Note that if $K$ has a finite field of order $q\equiv 2{\pmod {3}}$, then every element of $K$ has a unique cube root; in general, $\mu$ lies in an extension field of K.
Now by defining the following value D=(μ−δ)/μ {\textstyle D={\frac {(\mu -\delta )}{\mu }}} another curve, C, is obtained, that is birationally equivalent to E:
$C:x^{3}+y^{3}+z^{3}=3Dxyz$
which is called cubic Hessian form (in projective coordinates) $C:x^{3}+y^{3}+1=3Dxy$
in the affine plane (satisfying x=X/Z {\textstyle x={\frac {X}{Z}}} and y=Y/Z {\textstyle y={\frac {Y}{Z}}}).
Furthermore, $D^{3}\neq 1$ (otherwise, the curve would be singular).
Starting from the Hessian curve, a birationally equivalent Weierstrass equation is given by $v^{2}=u^{3}-27D\left(D^{3}+8\right)u+54\left(D^{6}-20D^{3}-8\right),$ under the transformations: $(x,y)=\left(\eta \left(u+9D^{2}\right),-1+\eta \left(3D^{3}-Dx-12\right)\right)$ and $(u,v)=\left(-9D^{2}+\varepsilon x,3\varepsilon \left(y-1\right)\right)$ where:
$\eta ={\frac {6\left(D^{3}-1\right)\left(v+9D^{3}-3Du-36\right)}{\left(u+9D^{2}\right)^{3}+\left(3D^{3}-Du-12\right)^{3}}}$ and $\varepsilon ={\frac {12\left(D^{3}-1\right)}{Dx+y+1}}$

## Group law

It is interesting to analyze the group law of the elliptic curve, defining the addition and doubling formulas (because the SPA and DPA attacks are based on the running time of these operations). Furthermore, in this case, we only need to use the same procedure to compute the addition, doubling or subtraction of points to get efficient results, as said above. In general, the group law is defined in the following way: if three points lie in the same line then they sum up to zero. So, by this property, the group laws are different for every curve.
In this case, the correct way is to use the Cauchy-Desboves´ formulas, obtaining the point at infinity θ = (1 : −1 : 0), that is, the neutral element (the inverse of θ is θ again). Let P = (x$_1$, y$_1$) be a point on the curve. The line $y=-x+(x_{1}+y_{1})$ contains the point P and the point at infinity θ. Therefore, −P is the third point of the intersection of this line with the curve. Intersecting the elliptic curve with the line, the following condition is obtained $x_{2}-(x_{1}+y_{1})\cdot x+x_{1}\cdot y_{1}=\theta$
Since $x_{1}+y_{1}+D$ is non zero (because D$^3$ is distinct to 1), the x-coordinate of −P is y$_1$ and the y-coordinate of −P is x$_1$ , i.e., $-P=(y_{1},x_{1})$ or in projective coordinates $-P=(Y_{1}:X_{1}:Z_{1})$.
In some application of elliptic curve cryptography and the elliptic curve method of factorization (ECM) it is necessary to compute the scalar multiplications of P, say [n]P for some integer n, and they are based on the double-and-add method; these operations need the addition and doubling formulas.
Doubling
Now, if $P=(X_{1}:Y_{1}:Z_{1})$ is a point on the elliptic curve, it is possible to define a "doubling" operation using Cauchy-Desboves´ formulae:
$[2]P=\left(Y_{1}\cdot \left(X_{1}^{3}-Z_{1}^{3}\right):X_{1}\cdot \left(Z_{1}^{3}-Y_{1}^{3}\right):Z_{1}\cdot \left(Y_{1}^{3}-X_{1}^{3}\right)\right)$
Addition
In the same way, for two different points, say $P=(X_{1}:Y_{1}:Z_{1})$ and $Q=(X_{2}:Y_{2}:Z_{2})$, it is possible to define the addition formula. Let R denote the sum of these points, R = P + Q, then its coordinates are given by:
$R=\left(Y_{1}^{2}\cdot X_{2}\cdot Z_{2}-Y_{2}^{2}\cdot X_{1}\cdot Z_{1}:X_{1}^{2}\cdot Y_{2}\cdot Z_{2}-X_{2}^{2}\cdot Y_{1}\cdot Z_{1}:Z_{1}^{2}\cdot X_{2}\cdot Y_{2}-Z_{2}^{2}\cdot X_{1}\cdot Y_{1}\right)$

## Algorithms and examples

There is one algorithm that can be used to add two different points or to double; it is given by Joye and Quisquater. Then, the following result gives the possibility the obtain the doubling operation by the addition:
Proposition. Let P = (X,Y,Z) be a point on a Hessian elliptic curve E(K). Then:
| $2(X:Y:Z)=(Z:X:Y)+(Y:Z:X)$ | (2) |
Furthermore, we have (Z:X:Y) ≠ (Y:Z:X).
Finally, contrary to other parameterizations, there is no subtraction to compute the negation of a point. Hence, this addition algorithm can also be used for subtracting two points P = (X$_1$:Y$_1$:Z$_1$) and Q = (X$_2$:Y$_2$:Z$_2$) on a Hessian elliptic curve:
| $(X_{1}:Y_{1}:Z_{1})-(X_{2}:Y_{2}:Z_{2})=(X_{1}:Y_{1}:Z_{1})+(Y_{2}:X_{2}:Z_{2})$ | (3) |
To sum up, by adapting the order of the inputs according to equation (2) or (3), the addition algorithm presented above can be used indifferently for: Adding 2 (diff.) points, Doubling a point and Subtracting 2 points with only 12 multiplications and 7 auxiliary variables including the 3 result variables. Before the invention of Edwards curves, these results represent the fastest known method for implementing the elliptic curve scalar multiplication towards resistance against side-channel attacks.
For some algorithms protection against side-channel attacks is not necessary. So, for these doublings can be faster. Since there are many algorithms, only the best for the addition and doubling formulas is given here, with one example for each one:

### Addition

Let P$_1$ = (X$_1$:Y$_1$:Z$_1$) and P$_2$ = (X$_2$:Y$_2$:Z$_2$) be two points distinct to θ. Assuming that Z$_1$ = Z$_2$ = 1 then the algorithm is given by:
A = X$_1$ Y$_2$
B = Y$_1$ X$_2$
    X$_3$ = B Y$_1$-Y$_2$ A
    Y$_3$ = X$_1$ A-B X$_2$
    Z$_3$ = Y$_2$ X$_2$-X$_1$ Y$_1$
The cost needed is 8 multiplications and 3 additions readdition cost of 7 multiplications and 3 additions, depending on the first point.

#### Example

Given the following points in the curve for d = −1 P$_1$ = (1:0:−1) and P$_2$ = (0:−1:1), then if P$_3$ = P$_1$ + P$_2$ we have:
    X$_3$ = 0 − 1 = −1
    Y$_3$ = −1−0 = −1
    Z$_3$ = 0 − 0 = 0
Then: P$_3$ = (−1:−1:0)

### Doubling

Let P = (X$_1$ : Y$_1$ : Z$_1$) be a point, then the doubling formula is given by:
* A = X$_1$$^2$
* B = Y$_1$$^2$
* D = A + B
* G = (X$_1$ + Y$_1$)$^2$ − D
* X$_3$ = (2Y$_1$ − G) × (X$_1$ + A + 1)
* Y$_3$ = (G − 2X$_1$) × (Y$_1$ + B + 1)
* Z$_3$ = (X$_1$ − Y$_1$) × (G + 2D)
The cost of this algorithm is three multiplications + three squarings + 11 additions + 3×2.

#### Example

If $P=(-1:-1:1)$ is a point over the Hessian curve with parameter d = −1, then the coordinates of $2P=(X:Y:Z)$ are given by:
X = (2 . (−1) − 2) (−1 + 1 + 1) = −4
Y = (−4 − 2 . (−1)) ((−1) + 1 + 1) = −2
Z = (−1 − (−1)) ((−4) + 2 . 2) = 0
That is, $2P=(-4:-2:0)$

## Extended coordinates

There is another coordinates system with which a Hessian curve can be represented; these new coordinates are called extended coordinates. They can speed up the addition and doubling. To have more information about operations with the extended coordinates see:
http://hyperelliptic.org/EFD/g1p/auto-hessian-extended.html#addition-add-20080225-hwcd
$x$ and $y$ are represented by $X,Y,Z,XX,YY,ZZ,XY,YZ,XZ$ satisfying the following equations:
* $x=X/Z$
* $y=Y/Z$
* $XX=X\cdot X$
* $YY=Y\cdot Y$
* $ZZ=Z\cdot Z$
* $XY=2\cdot X\cdot Y$
* $YZ=2\cdot Y\cdot Z$
* $XZ=2\cdot X\cdot Z$