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 , Jacobi curve , 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: . 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 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 . If R is an integral domain and if , then we write for the localization of R with respect to the multiplicative set ; that is, the set of fractions with numerators in R and denominators in S. We will need the well-known fact that if is a ring homomorphism sending to a unit in A, then extends uniquely to a map that maps a fraction to .
Lemma 1
(kernel property). Suppose that an identity holds in a commutative ring R. If is a ring homomorphism such that for all i, then .
Proof
We use the following rings: and . We introduce the polynomial for the Edwards curve. Let
| 1 |
We write for the image of the polynomial in , for , under and . Set and , where
We write for its image of under . So, .
Inverse and Closure
We write . We define a pair of rational functions that we denote using the symbol :
| 2 |
When specialized to and , the polynomial reduces to a circle, and (2) reduces to the standard group law on a circle. Commutativity is a consequence of the subscript symmetry evident in the pair of rational functions:
If is a ring homomorphism, we also write for the image of . We write for the image of under . We often mark the image of an element with a bar accent.
Let . The involution gives us an inverse with properties developed below.
There is an obvious identity element (1, 0), expressed as follows. Under a homomorphism , mapping and , we have
| 3 |
Lemma 2
(inverse). Let , with , . If , then .
Proof
Plug and into (2) and use .
Lemma 3
(closure under addition). Let with . If , then
Proof
This proof serves as a model for several proofs that are based on multivariate polynomial division. We write
for some polynomial . It is enough to show that . Polynomial division gives
| 4 |
for some polynomials . Concretely, the polynomials are obtained as the output of the one-line Mathematica command
The result now follows from the kernel property and (4); implies , giving .
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
where is a rational function and S is a set of polynomials, to indicate that the numerator of has zero remainder when reduced by polynomial division with respect to S using PolynomialReduce. We also require the denominator of to be invertible in the localized polynomial ring. The zero remainder will give in each application. We extend the notation to n-tuples
to mean 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 appear as denominators in the addition rule. The polynomial denominators that appear when we add twice are more involved. Specifically, let , let , and set
Define analogously.
Lemma 4
(generic associativity). Let be a homomorphism with . If , then
Proof
By polynomial division in the ring
Group Law for Affine Curves
Lemma 5
(affine closure). Let be a homomorphism into a field k. If , then either or 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 and that imply .
Proof
Let . We have
| 5 |
This forces , which by the form of r implies that or 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 .
Theorem 1
(group law). Let k be a field, let be a square, and let . Then
is an abelian group with binary operation .
Proof
This follows directly from the earlier results. For example, to check associativity of , where , we define a homomorphism sending and . By a repeated use of the affine closure lemma, is nonzero and invertible in the field k. The universal property of localization extends to a homomorphism . 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 (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 (dropping the bar accents from notation). The group addition (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.
Definition of 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:
where , since the involved points lie on the curve and
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 are assumed to be summable, . As a consequence, the property stated in Fig. 2 immediately implies that associativity holds in the first component of the addition.
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 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 , where R is a commutative ring and , the method verifies formulas
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 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 together. The associative property for E is a consequence of the associative property on affine pieces , which can be expressed as polynomial identities.
Definitions
In this section, we assume that and that c and d are both squares. Let . By a change of variable , the Edwards curve takes the form
| 6 |
We assume . Note if , then the curve degenerates to a product of intersecting lines, which cannot be a group. We also assume that , which only excludes the circle, which has already been fully treated. Shifting notation for this new setting, let
As before, we write , , and when a homomorphism is given.
Define rotation by and inversion by
Let G be the abelian group of order eight generated by and .
Extended Addition
We extend the binary operation using the automorphism . We also write for , for and so forth.
Set
| 7 |
in where .
We have the following easy identities of rational functions that are proved by simplification of rational functions:
| 8 |
| 9 |
| 10 |
| 11 |
The first identity of (11) inverts , and the second inverts . Proofs of (11) use polynomial division.
Projective Curve and Dichotomy
Let k be a field of characteristic different from two. We let be the set of zeros of Eq. (6) in . Let be the subset of with nonzero coordinates .
We construct the projective Edwards curve E by taking two copies of , glued along by isomorphism . We write , with , for the image of in E using the ith copy of . The gluing condition gives for :
| 12 |
The group G acts on the set E, specified on generators by and .
We define addition on E by
| 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 , which is well-defined by the inverse rules (10).
Lemma 6
G acts without fixed point on . That is, implies that .
Proof
Write . If , then implies that and (if the characteristic is not two), which is not a point on the curve. If , then the fixed-point condition leads to or . Then , and again P is not a point on the curve.
The domain of is
Whenever we write , it is always accompanied by the implicit assertion of summability; that is, .
There is a group isomorphism given by
Lemma 7
(dichotomy). Let . Then either and for some , or for some i. Moreover, assume that for some i, then .
Proof
We start with the first claim. We analyze the denominators in the formulas for . We have for all P or . That case completed, we may assume that . Assuming
we show that for some . Replacing Q by if needed, which exchanges , we may assume that . Set and .
We claim that
| 14 |
We describe the main polynomial identity that must be verified. Write for , , and respectively, each evaluated at . The nonzero factors and have been included to clear denominators, leaving us with polynomials.
We have two cases ±, according to . In each case, let
We have
| 15 |
In fact, , so that the ideal membership for this polynomial is immediate. The factors 2, , and are nonzero and can be removed from the left-hand side. These equations then immediately yield . This gives the needed identity: , for some . Then .
The second statement of the lemma has a similar proof. Polynomial division gives for :
In fact, both and (which specify the condition ) are already members of the Gröbner basis. The fresh variables force the denominators and to be invertible. Here the equations specify the sum 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 , then does not have the form because the action of G is fixed-point free. By dichotomy,
| 16 |
works for some . Otherwise, by dichotomy 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 , then by an easy simplification of polynomials,
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 :
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 of the indices. Thus, it is enough to show
By polynomial division, we have the following associativity identities
| 17 |
in the appropriate localizations, for .
Note that for , as can easily be checked on generators 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
| 18 |
The special case is easy. We reduce the claim to the case where , by applying to both sides of (18) and replacing P with 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 and where . 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
(derived from [Hal16]) had to be corrected to
to prove (15). In another subcase, it was necessary to strengthen the hypothesis to . 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.
Definition of on points
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

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 . On each of the resulting branches, a dichotomy on R, is performed. This time the summable cases were easy, but the non-summable case required a third dichotomy on . The non-summable case was solved using the no-fixed-point theorem but for the summable subcases the following expression is obtained:
Here we cannot invoke associativity because 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
Mathematica calculations are available at https://github.com/thalesant/publications-of-thomas-hales/tree/master/cryptography/group_law_edwards.
The Isabelle/HOL formalization is available at https://github.com/rjraya/Isabelle/blob/master/curves/Hales.thy.
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)



