← Enrique BarschkisArticles / 2026

Elliptic Curve Discrete Logarithms

Ah, discrete logarithms, my favorite mathematical and computational problem. People often look down at this problem, most people I have met describe it as a rather bland and boring problem. I guess they are right in a sense, but what makes this problem so special to me is that together with RSA it makes up 99% of all internet traffic encryption. This is why I believe this is one of the most important problems in all of mathematics, just because we have grown so dependent on it. Now before I go on a rant, it is important that you, the reader, to actually understand what this problem is even about. For the sake of argument, let's take another equally important problem in cryptography: Integer Factorization. Now this is pretty easy to understand. So it is very easy to multiply $3$ and $5$ and then see that that equals 15, but how do we efficiently do it the other way around? Based off of $15$, how do I know what it's factors are? This is a very good example of a one-way function. Discrete logarithms on the other hand ask, given \(Q=kG\), where \(k\) is the secret scalar or in other words our private key, \(G\) is the generator point, which is a public point that is chosen together with the curve, which also creates a cyclic subgroup of large order (in most cases a large prime order), \(Q\) is the public point, which also serves as our public key. Seems simple enough right? Well not really. Regular logarithms are pretty easy, but doing the same thing on a finite group like integers modulo a prime p or in this case points on a elliptic curve is hard, like really hard. In this article, I will mostly focus on the elliptic curve variant. The hard question now is, how do we get \(k\) while only knowing \(Q\), \(G\) and the curve parameters? Brute-forcing every possible point on the cyclic group costs \(O(n)\) in the worst case (where \(n\) is the order of the subgroup made by \(G\)).

Drag to pan. Use + / − to zoom, or the arrow keys when the plot is focused.

Curve explorer

There is a really cool algorithm developed by John Pollard (no, not the spy) which very cleverly achieves a complexity of \(O(\sqrt n)\) via a pseudorandom walk through the group using the birthday paradox to find collisions between previously found points, which in turn give us algebraic relations that allow us to recover \(k\) in \(O(\sqrt n)\) ops (Pollards wrote a very nice article about it 50 years later, check it out!). This is a very crude explanation, which doesn't go into all the details, but as far as we know this is the best general-purpose algorithm for arbitrary discrete logarithms. There is also BSGS which deterministically recovers the discrete log in \(O(\sqrt n)\) but with way higher memory requirements than Pollard's algorithm(s), it is basically a meet-in-the-middle algorithm. And then there is index calculus, and that is where things get really interesting. The rough idea uses the same general concept as number field sieves for integer factorization but applies it to our problem. It exploits certain properties of the group/curve and by doing that we can actually, very cheaply, generate large amounts of informative relations that decompose over a chosen factor base. This constrains the desired discrete logarithm, allowing us to recover it in subexponential-time in some cases. Now this attack is very effective if you are in a favorable regime, but then again, you aren't always in a favorable regime where getting those relations is easy. Because of that people got to brainstorming and thinking about ideas on how we can still achieve index calculus, even if we are not in a favorable regime. Then, some 22 years ago, Igor Semaev came up with a approach using Summation Polynomials, transforming the problem of relation generation into that of a point decomposition problem. For the past year or so, I have been tinkering with these Summation Polynomials, but (un)fortunately the general case remains exponential and even proven to be NP-complete (unders some assumptions). So the quest for a new index calculus algorithm is still our northern star, but until we find a way to efficiently find informative relations that decompose over a small factor base, this still seems to be a very hard problem.

However on discrete logarithms over finite fields it is very different story. Usually these finite fields have a lot of exploitable structure making index calculus applicable. Unlike the elliptic curve variants, where you lose the favorable notion of smoothness and factorization structure necessary for efficient algorithms, finite fields are mostly smooth, which allows us to express many field elements as products of elements from our small factor base. More specifically the finite field's polynomial representation actually allows us to very efficiently test and find smooth and informative relations. The big exceptions of course are, if the curve has other exploitable structures, like curves with extension fields, anomalous curves or some hyperelliptic curves/jacobians of growing genus. This is why for the most applications of elliptic curves in cryptography, we choose extremely large (usually $256$-bit) prime-field curves over \(F_p\), along with large embedding degrees to thwart MOV attacks. My question, for which I have gotten quite the pushback, is what happens if there is some structure that might have hidden right beneath our noses that might just give an attacker an edge? Is relation access perhaps way easier than previously thought? What about cover attacks? Can we perhaps move the problem to a regime where it is easy?

As you probably noticed, I have been researching this problem way more that I should have. But I guess it is just my nature to obsess on very specific questions for years at a time. Another thing that should not go without mention is the quantum aspect. Since in 1994, a certain Peter Shor discovered that integer factorization as well as discrete logarithm problems naturally reduce to period finding problems which quantum computers could solve in polynomial-time (in this case very fast). Since then, there have been countless optimizations of this algorithm. My good friend Bartosz Naskręcki has actually made a lot of progress on that front, so if you are interested in these types of circuit optimization using AI research agents, I really recommend checking out his results over at https://ecdsa.fail/ ! However I would not get too excited about this, until now the biggest number factored by Quantum Computers using Shor's algorithm is 21. We are decades away from a machine that is fault tolerant enough to run it. Heck, we don't even have the storage capabilities for such large integers on existing machines, let alone do arithmetic on them. Something I also noticed, is that because RSA has way larger key sizes, the arithmetic needed to perform Shor's on it will take way longer to be reliably doable on the machines than doing the EC modular arithmetic for breaking ECC. So while ECC has shorter keys, perhaps that wasn't such a good idea in the long run. I am betting that ECC will be broken before RSA using QCs.