Skip to main content
Springer Nature - PMC COVID-19 Collection logoLink to Springer Nature - PMC COVID-19 Collection
. 2020 Jun 6;12167:254–269. doi: 10.1007/978-3-030-51054-1_15

Formal Proof of the Group Law for Edwards Elliptic Curves

Thomas Hales 10,, Rodrigo Raya 11
Editors: Nicolas Peltier8, Viorica Sofronie-Stokkermans9
PMCID: PMC7324045

Abstract

This article gives an elementary computational proof of the group law for Edwards elliptic curves. The associative law is expressed as a polynomial identity over the integers that is directly checked by polynomial division. Unlike other proofs, no preliminaries such as intersection numbers, Bézout’s theorem, projective geometry, divisors, or Riemann Roch are required. The proof of the group law has been formalized in the Isabelle/HOL proof assistant.

Introduction

Elliptic curve cryptography is a cornerstone of mathematical cryptography. Many cryptographic algorithms (such as the Diffie-Hellman key exchange algorithm which inaugurated public key cryptography) were first developed in the context of the arithmetic of finite fields. The preponderance of finite-field cryptographic algorithms have now been translated to an elliptic curve counterpart. Elliptic curve algorithms encompass many of the fundamental cryptographic primitives: pseudo-random number generation, digital signatures, integer factorization algorithms, and public key exchange.

One advantage of elliptic curve cryptography over finite-field cryptography is that elliptic curve algorithms typically obtain the same level of security with smaller keys than finite-field algorithms. This often means more efficient algorithms.

Elliptic curve cryptography is the subject of major international cryptographic standards (such as NIST). Elliptic curve cryptography has been implemented in widely distributed software such as NaCl [BLS12]. Elliptic curve algorithms appear in nearly ubiquitous software applications such as web browsers and digital currencies.

The same elliptic curve can be presented in different ways by polynomial equations. The different presentations are known variously as the Weierstrass curve (y2=cubic inx), Jacobi curve (y2=quartic inx), and Edwards curve (discussed below).

The set of points on an elliptic curve forms an abelian group. Explicit formulas for addition are given in detail below. The Weierstrass curve is the most familiar presentation of an elliptic curve, but it suffers from the shortcoming that the group law is not given by a uniform formula on all inputs. For example, special treatment must be given to the point at infinity and to point doubling: P2P. Exceptional cases are bad; they are the source of hazards such as side-channel attacks (timing attacks) by adversaries and implementation bugs [BJ02].

Edwards curves have been widely promoted for cryptographic algorithms because their addition law avoids exceptional cases and their hazards. Every elliptic curve (in characteristic different from 2) is isomorphic to an elliptic curve in Edwards form (possibly after passing to a quadratic extension). Thus, there is little loss of generality in considering elliptic curves in Edwards form. For most cryptographic applications, Edwards curves suffice.

The original contributions of this article are both mathematical and formal. Our proof that elliptic curve addition satisfies the axioms of an abelian group is new (but see the literature survey below for prior work). Our proofs were designed with formalization specifically in mind. To our knowledge, our proof of associativity in Sect. 3.3 is the most elementary proof that exists anywhere in the published literature (in a large mathematical literature on elliptic curves extending back to Euler’s work on elliptic integrals). Our proof avoids the usual machinery found in proofs of associativity (such as intersection numbers, Bézout’s theorem, projective geometry, divisors, or Riemann Roch). Our algebraic manipulations require little more than multivariate polynomial division with remainders, even avoiding Gröbner bases in most places. Based on this elementary proof, we give a formal proof in the Isabelle/HOL proof assistant that every Edwards elliptic curve (in characteristic other than 2) satisfies the axioms of an abelian group.1

It is natural to ask whether the proof of the associative law also avoids exceptional cases (encountered in Weierstrass curves) when expressed in terms of Edwards curves. Indeed, this article gives a two-line proof of the associative law for so-called complete Edwards curves that avoids case splits and all the usual machinery.

By bringing significant simplification to the fundamental proofs in cryptography, our paper opens the way for the formalization of elliptic curve cryptography in many proof assistants. Because of its extreme simplicity, we hope that our approach might be widely replicated and translated into many different proof assistants.

Published Literature

A number of our calculations are reworkings of calculations found in Edwards, Bernstein, Lange et al. [Edw07], [BBJ+08], [BL07]. A geometric interpretation of addition for Edwards elliptic curves appears in [ALNR11].

Working with the Weierstrass form of the curve, Friedl was the first to give a proof of the associative law of elliptic curves in a computer algebra system (in Cocoa using Gröbner bases) [Fri98, Fri17]. He writes, “The verification of some identities took several hours on a modern computer; this proof could not have been carried out before the 1980s.” These identities were later formalized in Coq with runtime one minute and 20 s [The07]. A non-computational Coq formalization based on the Picard group appears in [BS14]. By shifting to Edwards curves, we have eliminated case splits and significantly improved the speed of the computational proof.

An earlier unpublished note contains more detailed motivation, geometric interpretation, pedagogical notes, and expanded proofs [Hal16]. The earlier version does not include formalization in Isabelle/HOL. Our formalization uncovered and corrected some errors in the ideal membership problems in [Hal16] (reaffirming the pervasive conclusion that formalization catches errors that mathematicians miss).

Other formalizations of elliptic curve cryptography are found in Coq and ACL2 by different methods [Rus17]. After we posted our work to the arXiv, another formalization was given in Coq along our same idea [Erb17, EPG+17]. It goes further by including formalization of implementation of code, but it falls short of our work by not including the far more challenging and interesting case of projective curves.

We do not attempt to survey the various formalizations of cryptographic algorithms built on top of elliptic curves. Because of the critical importance of cryptography to the security industry, the formalization of cryptographic algorithms is rightfully a priority within the formalization community.

Group Axioms

This section gives an elementary proof of the group axioms for addition on Edwards curves (Theorem 1). We include proofs, because our approach is not previously published.

Our definition of Edwards curve is more inclusive than definitions stated elsewhere. Most writers prefer to restrict to curves of genus one and generally call a curve with c1 a twisted Edwards curve. We have interchanged the x and y coordinates on the Edwards curve to make it consistent with the group law on the circle.

Rings and Homomorphisms

In this section, we work algebraically over an arbitrary field k. We assume a basic background in abstract algebra at the level of a first course (rings, fields, homomorphisms, and kernels). We set things up in a way that all of the main identities to be proved are identities of polynomials with integer coefficients.

All rings are assumed to be commutatative with identity 10. If R is an integral domain and if δR, then we write R[1δ] for the localization of R with respect to the multiplicative set S={1,δ,δ2,}; that is, the set of fractions with numerators in R and denominators in S. We will need the well-known fact that if ϕ:RA is a ring homomorphism sending δ to a unit in A, then ϕ extends uniquely to a map R[1δ]A that maps a fraction r/δi to ϕ(r)ϕ(δi)-1.

Lemma 1

(kernel property). Suppose that an identity r=r1e1+r2e2++rkek holds in a commutative ring R. If ϕ:RA is a ring homomorphism such that ϕ(ei)=0 for all i, then ϕ(r)=0.

Proof

ϕ(r)=i=1kϕ(ri)ϕ(ei)=0.    

We use the following rings: R0:=Z[c,d] and Rn:=R0[x1,y1,,xn,yn]. We introduce the polynomial for the Edwards curve. Let

e(x,y)=x2+cy2-1-dx2y2R0[x,y]. 1

We write ei=e(xi,yi) for the image of the polynomial in Rj, for ij, under xxi and yyi. Set δx=δ- and δy=δ+, where

δ±(x1,y1,x2,y2)=1±dx1y1x2y2and
δ(x1,y1,x2,y2)=δxδyR2.

We write δij for its image of δ under (x1,y1,x2,y2)(xi,yi,xj,yj). So, δ=δ12.

Inverse and Closure

We write zi=(xi,yi). We define a pair of rational functions that we denote using the symbol 0:

z10z2=x1x2-cy1y21-dx1x2y1y2,x1y2+y1x21+dx1x2y1y2R2[1δ]×R2[1δ]. 2

When specialized to c=1 and d=0, the polynomial e(x,y)=x2+y2-1 reduces to a circle, and (2) reduces to the standard group law on a circle. Commutativity is a consequence of the subscript symmetry 12 evident in the pair of rational functions:

z10z2=z20z1.

If ϕ:R2[1δ]A is a ring homomorphism, we also write P10P2A2 for the image of z10z2. We write e(Pi)A for the image of ei=e(zi) under ϕ. We often mark the image r¯=ϕ(r) of an element with a bar accent.

Let ι(zi)=ι(xi,yi)=(xi,-yi). The involution ziι(zi) gives us an inverse with properties developed below.

There is an obvious identity element (1, 0), expressed as follows. Under a homomorphism ϕ:R2[1δ]A, mapping z1P and z2(1,0), we have

P0(1,0)=P. 3

Lemma 2

(inverse). Let ϕ:R2[1δ]A, with z1P, z2ι(P). If e(P)=0, then P0ι(P)=(1,0).

Proof

Plug P=(a,b) and ιP=(a,-b) into (2) and use e(P)=0.    

Lemma 3

(closure under addition). Let ϕ:R2[1δ]A with ziPi. If e(P1)=e(P2)=0, then

e(P10P2)=0.

Proof

This proof serves as a model for several proofs that are based on multivariate polynomial division. We write

e(z10z2)=rδ2,

for some polynomial rR2. It is enough to show that ϕ(r)=0. Polynomial division gives

r=r1e1+r2e2, 4

for some polynomials riR2. Concretely, the polynomials ri are obtained as the output of the one-line Mathematica command

PolynomialReduce[r,{e1,e2},{x1,x2,y1,y2}].

The result now follows from the kernel property and (4); e(P1)=e(P2)=0 implies ϕ(r)=0, giving e(P10P2)=0.    

Mathematica’s PolynomialReduce is an implementation of a naive multivariate division algorithm [CLO92]. In particular, our approach does not require the use of Gröbner bases until Sect. 5.3. We write

rrmodS,

where r-r is a rational function and S is a set of polynomials, to indicate that the numerator of r-r has zero remainder when reduced by polynomial division with respect to S using PolynomialReduce. We also require the denominator of r-r to be invertible in the localized polynomial ring. The zero remainder will give ϕ(r)=ϕ(r) in each application. We extend the notation to n-tuples

(r1,,rn)(r1,,rn)modS,

to mean ririmodS for each i. Using this approach, most of the proofs in this article almost write themselves.

Associativity

This next step (associativity) is generally considered the hardest part of the verification of the group law on curves. Our proof is two lines and requires little more than polynomial division. The polynomials δx,δy appear as denominators in the addition rule. The polynomial denominators Δx,Δy that appear when we add twice are more involved. Specifically, let (x3,y3)=(x1,y1)0(x2,y2), let (x1,y1)=(x2,y2)0(x3,y3), and set

Δx=δx(x3,y3,x3,y3)δx(x1,y1,x1,y1)δ12δ23R3.

Define Δy analogously.

Lemma 4

(generic associativity). Let ϕ:R3[1ΔxΔy]A be a homomorphism with ziPi. If e(P1)=e(P2)=e(P3)=0, then

(P10P2)0P3=P10(P20P3).

Proof

By polynomial division in the ring R3[1ΔxΔy]

((x1,y1)0(x2,y2))0(x3,y3)(x1,y1)0((x2,y2)0(x3,y3))mod{e1,e2,e3}.

   

Group Law for Affine Curves

Lemma 5

(affine closure). Let ϕ:R2k be a homomorphism into a field k. If ϕ(δ)=e(P1)=e(P2)=0, then either d¯ or c¯d¯ is a nonzero square in k.

The lemma is sometimes called completeness, in conflict with the usual definition of complete varieties in algebraic geometry. To avoid possible confusion, we avoid this terminology. We use the lemma in contrapositive form to give conditions on d¯ and c¯d¯ that imply ϕ(δ)0.

Proof

Let r=(1-cdy12y22)(1-dy12x22). We have

r=d2y12y22x22e1+(1-dy12)δ-dy12e2. 5

This forces ϕ(r)=0, which by the form of r implies that c¯d¯ or d¯ is a nonzero square.    

We are ready to state and prove one of the main results of this article. This group law is expressed generally enough to include the group law on the circle and ellipse as a special case d¯=0.

Theorem 1

(group law). Let k be a field, let c¯k be a square, and let d¯k×2. Then

C={Pk2e(P)=0}

is an abelian group with binary operation 0.

Proof

This follows directly from the earlier results. For example, to check associativity of P10P20P3, where PiC, we define a homomorphism ϕ:R3k sending ziPi and (c,d)(c¯,d¯). By a repeated use of the affine closure lemma, ϕ(ΔyΔx) is nonzero and invertible in the field k. The universal property of localization extends ϕ to a homomorphism ϕ:R3[1ΔyΔx]k. By the associativity lemma applied to ϕ, we obtain the associativity for these three (arbitrary) elements of C. The other group axioms follow similarly from the lemmas on closure, inverse, and affine closure.    

The Mathematica calculations in this section are fast. For example, the associativity certificate takes about 0.12 s to compute on a 2.13 GHz processor.

Formalization in Isabelle/HOL

In this section, we describe the proof implementation in Isabelle/HOL. We have formalized the two main theorems (Theorem 1 and Theorem 2). Formalization uses two different locales: one for the affine and one for the projective case. (The projective case will be discussed in Sect. 5.)

Let k be the underlying curve field. k is introduced as the type class field with the assumption that 20 (characteristic different from 2). This is not included in the simplification set, but used when needed during the proof. The formalized theorem is slightly less general than then informal statement, because of this restriction.

Affine Edwards Curves

The formal proof fixes the curve parameters c,dk (dropping the bar accents from notation). The group addition 0 (of Eq. 2) can be written as in Fig. 1. In Isabelle’s division ring theory, the result of division by zero is defined as zero. This has no impact on validity of final results, but gives cleaner simplifications in some proofs.

Fig. 1.

Fig. 1.

Definition of 0 in Isabelle/HOL

Most of the proofs in this section are straight-forward. The only difficulty was to combine the Mathematica certificates of computation, into a single process in Isabelle.

In Fig. 2, we show an excerpt of the proof of associativity. We use the following abbreviations:

ei=xi2+cyi2-1-dxi2yi2

where ei=0, since the involved points lie on the curve and

gxpoly=((p10p2)0p3-p10(p2p3))1Δx

which stands for a normalized version of the associativity law after clearing denominators. We say that points are summable, if the rational functions defining their sum have nonzero denominators. Since the points pi are assumed to be summable, Δx0. As a consequence, the property stated in Fig. 2 immediately implies that associativity holds in the first component of the addition.

Fig. 2.

Fig. 2.

An excerpt of the proof of associativity

Briefly, the proof unfolds the relevant definitions and then normalizes to clear denominators. The remaining terms of Δx are then distributed over addends. The unfolding and normalization of addends is repeated in the lemmas simp1gx and simp2gx. Finally, the resulting polynomial identity is proved using the algebra method. Note that no computation was required from an external tool.

The rewrite tactic, which can modify a goal with various rewrite rules in various locations (specified with a pattern), is used to normalized terms [NT14]. Rewriting in the denominators is sufficient for our needs.

For proving the resulting polynomial expression, the algebra proof method is used [CW07, Cha08, Wen19]. Given ei(x),pij(x),ai(x)R[x1,,xn], where R is a commutative ring and x=(x1,,xn), the method verifies formulas

x.i=1Lei(x)=0y.i=1Mai(x)=j=1Npij(x)yj

The method is complete for such formulas that hold over all commutative rings with unit [Har07].

Group Law for Projective Edwards Curves

By proving the group laws for a large class of elliptic curves, Theorem 1 is sufficiently general for many applications to cryptography. Nevertheless, to achieve full generality, we push forward.

This section shows how to remove the restriction d¯k×2 that appears in the group law in the previous section. By removing this restriction, we obtain a new proof of the group law for all elliptic curves in characteristics different from 2. Unfortunately, in this section, some case-by-case arguments are needed, but no hard cases are hidden from the reader. The level of exposition here is less elementary than in the previous section. Again, we include proofs, because our approach is designed with formalization in mind and has not been previously published.

The basic idea of our construction is that the projective curve E is obtained by gluing two affine curves Eaff together. The associative property for E is a consequence of the associative property on affine pieces Eaff, which can be expressed as polynomial identities.

Definitions

In this section, we assume that c0 and that c and d are both squares. Let t2=d/c. By a change of variable yy/c, the Edwards curve takes the form

e(x,y)=x2+y2-1-t2x2y2. 6

We assume t21. Note if t2=1, then the curve degenerates to a product of intersecting lines, which cannot be a group. We also assume that t0, which only excludes the circle, which has already been fully treated. Shifting notation for this new setting, let

R0=Z[t,1t2-1,1t],Rn=R0[x1,y1,,xn,yn].

As before, we write ei=e(zi), zi=(xi,yi), and e(Pi)=ϕ(ei) when a homomorphism ϕ is given.

Define rotation by ρ(x,y)=(-y,x) and inversion τ by

τ(x,y)=(1/(tx),1/(ty)).

Let G be the abelian group of order eight generated by ρ and τ.

Extended Addition

We extend the binary operation 0 using the automorphism τ. We also write δ0 for δ, ν0 for ν and so forth.

Set

z11z2:=τ((τz1)0z2)=x1y1-x2y2x2y1-x1y2,x1y1+x2y2x1x2+y1y2=(ν1xδ1x,ν1yδ1y) 7

in R2[1δ1]2 where δ1=δ1xδ1y.

We have the following easy identities of rational functions that are proved by simplification of rational functions:

inversion invariance:τ(z1)iz2=z1iτz2; 8
rotation invariance:ρ(z1)iz2=ρ(z1iz2);δi(z1,ρz2)=±δi(z1,z2); 9
inverses forσ=τ,ρ:ισ(z1)=σ-1ι(z1);ι(z1iz2)=(ιz1)i(ιz2). 10
coherence:z10z2z11z2mod{e1,e2};e(z11z2)0mod{e1,e2}. 11

The first identity of (11) inverts δ0δ1, and the second inverts δ1. Proofs of (11) use polynomial division.

Projective Curve and Dichotomy

Let k be a field of characteristic different from two. We let Eaff be the set of zeros of Eq. (6) in k2. Let EEaff be the subset of Eaff with nonzero coordinates x,y0.

We construct the projective Edwards curve E by taking two copies of Eaff, glued along E by isomorphism τ. We write [P,i]E, with iZ/2Z=F2, for the image of PEaff in E using the ith copy of Eaff. The gluing condition gives for PE:

[P,i]=[τP,i+1]. 12

The group G acts on the set E, specified on generators ρ,τ by ρ[P,i]=[ρ(P),i] and τ[P,i]=[P,i+1].

We define addition on E by

[P,i][Q,j]=[PQ,i+j],ifδ(P,Q)0,F2 13

We will show that the addition is well-defined, is defined for all pairs of points in E, and that it gives a group law with identity element [(1, 0), 0]. The inverse is [P,i][ιP,i], which is well-defined by the inverse rules (10).

Lemma 6

G acts without fixed point on E. That is, gP=P implies that g=1GG.

Proof

Write P=(x,y). If g=ρk1G, then gP=P implies that 2x=2y=0 and x=y=0 (if the characteristic is not two), which is not a point on the curve. If g=τρk, then the fixed-point condition gP=P leads to 2txy=0 or tx2=ty2=±1. Then e(x,y)=2(±1-t)/t0, and again P is not a point on the curve.    

The domain of i is

Eaff,i:={(P,Q)Eaff2δi(P,Q)0}.

Whenever we write PiQ, it is always accompanied by the implicit assertion of summability; that is, (P,Q)Eaff,i.

There is a group isomorphism ρEaff\E given by

gg(1,0){±(1,0),±(0,1)}=Eaff\E.

Lemma 7

(dichotomy). Let P,QEaff. Then either PE and Q=gιP for some gτρ, or (P,Q)Eaff,i for some i. Moreover, assume that PiQ=(1,0) for some i, then Q=ιP.

Proof

We start with the first claim. We analyze the denominators in the formulas for i. We have (P,Q)Eaff,0 for all P or QEaff\E. That case completed, we may assume that P,QE. Assuming

δ0(P,Q)=δ0x(P,Q)δ0y(P,Q)=0,andδ1(P,Q)=δ1x(P,Q)δ1y(P,Q)=0,

we show that Q=gιP for some gτρ. Replacing Q by ρQ if needed, which exchanges δ0xδ0y, we may assume that δ0x(P,Q)=0. Set τQ=Q0=(a0,b0) and P=(a1,b1).

We claim that

(a0,b0){±(b1,a1)}ριP. 14

We describe the main polynomial identity that must be verified. Write δ,δ+,δ- for x0y0δ0x, tx0y0δ1x, and tx0y0δ1y respectively, each evaluated at (P,τ(Q0))=(x1,y1,1/(tx0),1/(ty0)). The nonzero factors x0y0 and tx0y0 have been included to clear denominators, leaving us with polynomials.

We have two cases ±, according to δ±=0. In each case, let

graphic file with name 501052_1_En_15_Equ45_HTML.gif

We have

(x02-y12,y02-x12,x0y0-x1y1)(0,0,0)modS+(2x0y0(x02-y12),2(1-t2)x0y0(y02-x12),x0y0-x1y1)(0,0,0)modS-. 15

In fact, δ=x0y0-x1y1, so that the ideal membership for this polynomial is immediate. The factors 2, 1-t2, and x0y0 are nonzero and can be removed from the left-hand side. These equations then immediately yield (a0,b0)=±(b1,a1). This gives the needed identity: τQ=Q0=(a0,b0)=gιP, for some gρ. Then Q=τgιP.

The second statement of the lemma has a similar proof. Polynomial division gives for iF2:

graphic file with name 501052_1_En_15_Equ46_HTML.gif

In fact, both x1-x2 and y1+y2 (which specify the condition Q=ιP) are already members of the Gröbner basis. The fresh variables qx,qy force the denominators δix and δiy to be invertible. Here the equations νiy=νix-δix=0 specify the sum (1,0)=(νix/δix,νiy/δiy) of Q and P.    

Lemma 8

(covering). The rule (13) defining assigns at least one value for every pair of points in E.

Proof

If Q=τρkιP, then τQ does not have the form τρkιP because the action of G is fixed-point free. By dichotomy,

[P,i][Q,j]=[PτQ,i+j+1] 16

works for some . Otherwise, by dichotomy PQ is defined for some .    

Lemma 9

(well-defined). Addition given by (13) on E is well-defined.

Proof

The right-hand side of (13) is well-defined by coherence (11), provided we show well-definedness across gluings (12). We use dichotomy. If Q=τρkιP, then by an easy simplification of polynomials,

δ0(z,τρkιz)=δ1(z,τρkιz)=0.

so that only one rule (16) for applies (up to coherence (11) and inversion (8)), making it necessarily well-defined. Otherwise, coherence (11), inversion (8), and (7)) give when [Q,j]=[τQ,j+1]:

[PkτQ,i+j+1]=[τ(PkτQ),i+j]=[Pk+1Q,i+j]=[PQ,i+j].

   

Group Law

Theorem 2

E is an abelian group.

Proof

We have already shown the existence of an identity and inverse.

We prove associativity. Both sides of the associativity identity are clearly invariant under shifts [P,i][P,i+j] of the indices. Thus, it is enough to show

[P,0]([Q,0][R,0])=([P,0][Q,0])[R,0].

By polynomial division, we have the following associativity identities

(z1kz2)z3z1i(z2jz3)mod{e1,e2,e3} 17

in the appropriate localizations, for i,j,k,F2.

Note that (g[P1,i])[P2,j]=g([P1,i][P2,j]) for gG, as can easily be checked on generators g=τ,ρ of G, using dichotomy, (13), and (9). We use this to cancel group elements g from both sides of equations without further comment.

We claim that

([P,0][Q,0])[ιQ,0]=[P,0]. 18

The special case Q=τρkι(P) is easy. We reduce the claim to the case where PQτρkQ, by applying τ to both sides of (18) and replacing P with τP if necessary. Then by dichotomy, the left-hand side simplifies by affine associativity 17 to give the claim.

Finally, we have general associativity by repeated use of dichotomy, which reduces in each case to (17) or (18).    

Formalization in Isabelle/HOL of Projective Edwards Curves

Following the change of variables performed in Sect. 5.1, it is assumed that c=1 and d=t2 where t-1,0,1. The resulting formalization is more challenging. In the following, some key insights are emphasized.

Gröbner Basis. The proof of Lemma 7 (dichotomy) requires solving particular instances of the ideal membership problem. Formalization caught and corrected some ideal membership errors in [Hal16], which resulted from an incorrect interpretation of computer algebra calculations. For instance, a goal

r1r2r3r4.y02-x12=r1e(x0,y0)+r2e(x1,y1)+r3δ+r4δ-

(derived from [Hal16]) had to be corrected to

r1r2r3r4.2x0y0(y02-x12)=r1e(x0,y0)+r2e(x1,y1)+r3δ+r4δ-

to prove (15). In another subcase, it was necessary to strengthen the hypothesis δ+=0 to δ-0. Eventually, after some reworking, algebra solved the required ideal membership problems.

Definition of the Group Addition. We defined the addition in three stages. This is convenient for some lemmas like covering (Lemma 8). First, we define the addition on projective points (Fig. 3). Then, we add two classes of points by applying the basic addition to any pair of points coming from each class. Finally, we apply the gluing relation and obtain as a result a set of classes with a unique element, which is then defined as the resulting class (Fig. 4).

Fig. 3.

Fig. 3.

Definition of on points

Fig. 4.

Fig. 4.

Definition of on classes

The definitions use Isabelle’s ability to encode partial functions. However, it is possible to obtain an equivalent definition more suitable for execution. In particular, it is easy to compute the gluing relation (see lemmas e_proj_elim_1, e_proj_elim_2 and e_proj_aff in the formalization scripts).

Finally, since projective addition works with classes, we had to show that its definition does not depend on the representative used.

Proof of Associativity. During formalization, we found several relations between δ expressions (see Table 1). While they were proven in order to show associativity, the upper group can rather be used to establish the independence of class representative and the lower group is crucial to establish the associativity law.

Table 1.

List of δ relations

graphic file with name 501052_1_En_15_Tab1_HTML.jpg

In particular, the lower part of the table is fundamental to the formal proof of Eq. (18). In more detail, the formal proof development showed that it was necessary to perform a dichotomy (Lemma 7) three times. The first dichotomy is performed on P, Q. The non-summable case was easy. Therefore, we set R=PQ. On each of the resulting branches, a dichotomy on R, ιQ is performed. This time the summable cases were easy, but the non-summable case required a third dichotomy on R,τιQ. The non-summable case was solved using the no-fixed-point theorem but for the summable subcases the following expression is obtained:

([P,0][Q,0])[τιQ,0]=[(PQ)τιQ,0]

Here we cannot invoke associativity because Q, τιQ are non-summable (lemma not_add_self). Instead, we use the equations from the lower part of the table and the hypothesis of the second dichotomy to get a contradiction.

Conclusion

We have shown that Isabelle can encompass the process of defining, computing and certifying intensive algebraic calculations. The encoding in a proof-assistant allows a better comprehension of the methods used and helps to clarify its structure.

Footnotes

Contributor Information

Nicolas Peltier, Email: nicolas.peltier@univ-grenoble-alpes.fr.

Viorica Sofronie-Stokkermans, Email: sofronie@uni-koblenz.de.

Thomas Hales, Email: hales@pitt.edu.

References

  • [ALNR11].Arene C, Lange T, Naehrig M, Ritzenthaler C. Faster computation of the Tate pairing. J. Number Theory. 2011;131(5):842–857. doi: 10.1016/j.jnt.2010.05.013. [DOI] [Google Scholar]
  • [BBJ+08].Bernstein DJ, Birkner P, Joye M, Lange T, Peters C. Twisted Edwards curves. In: Vaudenay S, editor. Progress in Cryptology – AFRICACRYPT 2008; Heidelberg: Springer; 2008. pp. 389–405. [Google Scholar]
  • [BJ02].Brier É, Joye M. Weierstraß elliptic curves and side-channel attacks. In: Naccache D, Paillier P, editors. Public Key Cryptography; Heidelberg: Springer; 2002. pp. 335–345. [Google Scholar]
  • [BL07].Bernstein DJ, Lange T. Faster addition and doubling on elliptic curves. In: Kurosawa K, editor. Advances in Cryptology – ASIACRYPT 2007; Heidelberg: Springer; 2007. pp. 29–50. [Google Scholar]
  • [BLS12].Bernstein DJ, Lange T, Schwabe P. The security impact of a new cryptographic library. In: Hevia A, Neven G, editors. Progress in Cryptology – LATINCRYPT 2012; Heidelberg: Springer; 2012. pp. 159–176. [Google Scholar]
  • [BS14].Bartzia E-I, Strub P-Y. A formal library for elliptic curves in the Coq proof assistant. In: Klein G, Gamboa R, editors. Interactive Theorem Proving; Cham: Springer; 2014. pp. 77–92. [Google Scholar]
  • [Cha08].Chaieb, A.: Automated methods for formal proofs in simple arithmetics and algebra. Ph.D. thesis, Technische Universität München (2008)
  • [CLO92].Cox D, Little J, O’Shea D. Ideals, Varieties, and Algorithms. New York: Springer; 1992. [Google Scholar]
  • [CW07].Chaieb A, Wenzel M. Context aware calculation and deduction. In: Kauers M, Kerber M, Miner R, Windsteiger W, editors. Towards Mechanized Mathematical Assistants; Heidelberg: Springer; 2007. pp. 27–39. [Google Scholar]
  • [Edw07].Edwards H. A normal form for elliptic curves. Bull. Am. Math. Soc. 2007;44(3):393–422. doi: 10.1090/S0273-0979-07-01153-6. [DOI] [Google Scholar]
  • [EPG+17].Erbsen, A., Philipoom, J., Gross, J., Sloan, R., Chlipala, A.: Systematic generation of fast elliptic curve cryptography implementations. Technical report, MIT, Cambridge, MA, USA (2017)
  • [Erb17].Erbsen, A.: Crafting certified elliptic curve cryptography implementations in Coq. Ph.D. thesis, Massachusetts Institute of Technology (2017)
  • [Fri98].Friedl, S.: An elementary proof of the group law for elliptic curves. The Group Law on Elliptic Curves (1998)
  • [Fri17].Friedl S. An elementary proof of the group law for elliptic curves. Groups Complex. Cryptol. 2017;9(2):117–123. [Google Scholar]
  • [Hal16].Hales, T.: The group law for Edwards curves. arXiv preprint arXiv:1610.05278 (2016)
  • [Har07].Harrison J. Automating elementary number-theoretic proofs using Gröbner bases. In: Pfenning F, editor. Automated Deduction – CADE-21; Heidelberg: Springer; 2007. pp. 51–66. [Google Scholar]
  • [NT14].Noschinski, L., Traut, C.: Pattern-based subterm selection in Isabelle. In: Proceedings of Isabelle Workshop (2014)
  • [Rus17].Russinoff, D.M.: A computationally surveyable proof of the group properties of an elliptic curve. arXiv preprint arXiv:1705.01226 (2017)
  • [The07].Théry L, Hanrot G. Primality proving with elliptic curves. In: Schneider K, Brandt J, editors. Theorem Proving in Higher Order Logics; Heidelberg: Springer; 2007. pp. 319–333. [Google Scholar]
  • [Wen19].Wenzel, M.: The Isabelle/Isar reference manual (2019)

Articles from Automated Reasoning are provided here courtesy of Nature Publishing Group

RESOURCES