About two weeks ago, Levent Alpöge announced that he had found a proof of the Generalized Riemann Hypothesis, sharing a Lean proof which verified in several different kernels against the previously vetted formalization of the Generalized Riemann Hypothesis.
There is a whole laundry list of things to talk about this proof and how it was conceived, mainly from the perspective of philosophy of mathematics, which I will completely skip over for this blog post. Instead, I wanted to address a question I’ve seen multiple times now on what this result means for cryptography.
The short answer is: nothing at all. The longer answer is this blog post.
The answer will take us on a meandering path through three different subfields of mathematics, the AAA of number theory. Analytic number theory, algebraic number theory and arithmetic number theory, and how they relate and, more importantly, don’t relate to each other.
Analytic number theory
We start with analytic number theory, that is, the field that houses the Riemann zeta function. Grossly oversimplified, analytic number theory is the study of said zeta function, so we won’t get around defining it.
For s > 1, ζ is defined as
For example
If you seen this formula before (it’s a common example for convergent series), you might not be that surprised about π showing up in the answer. If you are, this Three Blue One Brown video does a better job at explaining it then I ever could so watch it instead. Given that evaluating this function at one value requires already a full YouTube video, you might already see that it only gets worse from here. In fact, we only have explicit value for ζ for the even integer values of s.
So why is ζ interesting? For that, we need to follow Euler’s footsteps and factor:
Where is the set of all primes.
To see why, let’s look at a single factor . We can expand this as a geometric series and obtain
Multiplying this series over all primes, while waving away any potential concerns about convergence, this just is a sum of all possible prime powers multiplied in every which way. Integers can be factored into prime powers every which way, so indeed we get back to a sum over , or
where we started.
Now you might see prime numbers showing up in the equation and be getting vaguely number theoretical vibes from it, but so far, we haven’t even really started with the analytic part. Granted, we are using infinite series, which are purview of analysis, but really what we want to use in analysis are functions, differentiable as much as possible. We also would really like some complex numbers in the whole thing to actually get things properly analytic.
We can extend ζ to all complex numbers s with real part bigger than 1, without a problem. Well, with the slight problem of having to take complex powers, but since our basis are positive integers, we can do so without breaking anything. But what we really want is a function that is defined on the entire complex plane, and as soon as s approaches 1, things blow up and our series starts diverging. If we want to go further, we cannot stay with our original definition.
But we do have a function that is complex differentiable on an open set, and complex functions are weird. As soon as you can differentiate them once (on an open set), you can differentiate them as many times as you want. More than that, you get to immediately extend their domain to the entire complex plane, sans a few finite points. The details here are fascinating, and completely out of scope for this blog.
But importantly, this gives us a definition for ζ that extends to the entire complex plane, except for the point s = 1, which will be the one finite point that we can’t define things for. Importantly, this extended version of ζ does no longer use the infinite series we used to originally define it with, and even though it turns out that , it is wrong to say that this implies something about the sum of all integers.
But importantly, once we have this function, we can do proper analysis, calculate various integrals, define a bunch of related functions and so on.
The most important theorem we get out of all this is the prime number theorem, proven by Hadamard and Poussin in 1896. It states that the number of primes below a bound x is roughly . More precisely, it uses a function called Li, which is defined as
However, this function has the same asymptotic as . This is important to cryptography for one reason: It tells you that you can rejection sample prime numbers, and how many iterations of sampling you should expect, in other words, it tells you how long RSA key generation takes.
So if that is the result from 1896, what is the Riemann Hypothesis about? It turns out, when proving this prime number theorem, you need at one point use the fact that ζ does not have any zeroes with real part 1. Zeros and poles (the thing at s = 1) are special to complex functions, and knowing where they are gives you a lot of control over all the integrals that lead to the prime number theorem.
Given how important those locations of zeroes are, the Riemann hypothesis is, unsurprisingly, related to them. It states that all non-trivial zeroes have real part exactly 1/2. As mentioned, knowing that their real part is below 1 was what proved the prime number theorem, so surely the Riemann hypothesis must have some amazing consequences, right?
Well, kinda. It is important, for various follow-up results, but the main result is making the approximation of the number of primes with Li tighter. So when it comes to how it affects cryptography, I guess it gives you tighter estimates for how long RSA key generation takes. You know, in case your benchmarking tools are broken.
Important takeaway: Analytic number theory deals with complex valued functions, integrals and (Dirichlet) series that happen to have to do with prime numbers.
Algebraic Number Theory
So so far, we have dealt with the old fashioned primes, as we know and love them. But really it’s time for something new, something shinier. New Primes. More Primes. Better Primes. Ideal Primes.
Welcome to algebraic number theory, where we make our own integers.
To talk about algebraic number theory is to talk about number fields. The basic principle is familiar, if you know about complex numbers or finite fields: Number fields are field extensions of the rational numbers. That means, you take an irreducible polynomial f, and look at the polynomials over the rational numbers modulo f, in other words .
This means many things that are generally a thing in field extensions, such as minimal polynomials, norms, traces, and so on are going to be relevant for number fields as well. For the following tangent, we will need the minimal polynomial and the norm of a field extension. I will introduce them rather briefly here, but I have an upcoming blog post that will go in greater depth.
The minimal polynomial is the polynomial over the base field (in our case, the rational numbers) of minimal degree, that has a given element as a root. It has to exist for any algebraic field extension (which is just the name for field extensions constructed from irreducible polynomials as we do here): Given some element , we can look at the sequence
, at some index, these elements will become a linearly dependent set, since
, is a finite dimensional vector space over
(think of K as polynomials below the degree of f to see why). But a linear dependence relation of powers of
is just saying that there is a polynomial in
that equals zero. And of these polynomials, one will have the smallest degree, which we call the minimal polynomial.
To understand the norm of an element , we need to consider the map
, which multiplies an element x with our fixed element
. If we consider K as a vector space again, then we see that, due to the properties of multiplication, this is a linear map. So we consider it as a matrix. The norm of an element is the determinant of this matrix. It also happens to show up as the constant coefficient in
‘s minimal polynomial (assuming the minimal polynomial has leading coefficient 1, which we will do a lot).
However other than being a field extension is about where the similarities between number fields and other field extensions end. Where there is only one extension to the real numbers, and where a finite field is fully described (up to isomorphism) by the number of elements it has, number fields are different. Even just number fields of degree two, i.e. fields of the form , can have entire books written about them. For d < 0 (so called imaginary quadratic number fields), these fields surprisingly enough are related to super-singular elliptic curve of SQISign fame.
One reason number fields are more complicated than other field extensions is that they have integers inside of them.
The maximal order in a number field (which is a lattice, but not to be confused with the lattice, which is an order), also known as the number field integers, is the set of all elements of a number field, which have a minimal polynomial that is normed (i.e. has leading coefficient 1) and have only integer coefficient otherwise. At first this definition might feel a bit overly complicated, after all, couldn’t we just use for the integers in
, but it turns out that this depends a lot on f, and doesn’t work at all in many cases, so we need this slightly cumbersome definition with minimal polynomials.
Number field integers in general behave like integers. Most importantly, as mentioned, they form a lattice, i.e. a free, finitely generated -module (as established in previous blog posts of mine, this is just a fancy way of saying vector space, but for rings, that doesn’t do weird ring shit). They are closed under addition, subtraction, and multiplication, but not division, so they form a ring, and particularly, a ring extension of
.
This ring is really useful and the main topic in the study of algebraic number theory. It first really made a showing when Gabriel Lamé first proved Fermat’s Last Theorem in 1847, by using the unique factorization of integers in a number field. If that last sentence didn’t quite seem correct to you, then that is because shortly after, a German mathematician named Ernst Kummer, pointed out a slight problem with this proof, bringing much sadness to Lamé: There is no unique factorization in number field orders. (This part of the story works far better in German, because “Kummer” is the German word for sadness. In English you’ll just have imagine that I made a hilarious pun here).
To see why, we can use at the number field . In other words, the rational numbers, plus some element
that has the property
, and everything combination of
and rational numbers that arise from field operations, pretty much like the complex numbers, but with -5 instead of -1. The integers
in this number field turn out to be
, making all that jammering about how maximal orders are not just what happens when you replace the
with a
a bit pointless.
Let’s look at 6 in this number field. , as you might recall from grade school. But also, in a session which your grade school teacher probably skipped over,
. So far, this is not yet terrible news for Lamé: It could be that e.g.
divides 2, or at least that some other number divides both of them. This is where the norm comes into play. For K, the norm is defined as
. So
. As a determinant, the norm is multiplicative, and indeed the norm of 6 is 36, which, if your grade school teachers wasn’t such a slacker, you probably remember to be both
and
. However, this multiplicativity would also mean that any non-trivial common factor of say 2 and
would have to have norm 2 (non-trivial here meaning not having an inverse, so, for this number field, not being 1 or -1). And there is no number field integer with norm 2, since this norm is always positive, and jumps right from 1 to 4 followed by 5, 6, and 9 in possible values. The same is true for a common factor with 3, as that would have to have norm 3, yet another unattainable value.
So 6 has two different, non-trivial factorizations, making them rather non-unique, bringing great sadness to Lamé (there’s the non-pun again).
So not an ideal situation. And I promised you ideal numbers. So Kummer, finally lending himself to a pun that works in English as well, invented just those ideal numbers. Usually shortened to ideals. An ideal is a subgroup of a ring, that is closed under multiplication with any ring element, i.e. for any , we have
. For any element a in R, we can create the ideal
, so any element (or number) in R corresponds to an ideal (number). This is not a 1-1 relation though, as a and -a generate the same ideal. More generally, if u is an invertable element, a so called unit, then a and ua generate the same ideal. Ideals can be multiplied, and it turns out that they are indeed ideals in that the ideals of a number field order can be decomposed uniquely into certain ideals we call prime ideals again, repairing the whole unique factorization debacle, and giving another example that the important part of a proof is not necessarily being correct, but understanding the subject well enough to be able to point out where the proof is incorrect, and in the process build a beautiful theory far richer than the original problem one tried to solve. (Yes, this is a not very subtle callout).
This brings me to the final tangent on algebraic number theory, explaining why 1 is not a prime, which we can now do. First we go back to our example of the non-uniquely factorable 6. The ideal factorization in this case is , with all the factors being prime ideals. But we haven’t defined what a prime ideal is yet. For that, we need to first look at 2. As we established with all the norm shenanigans 2 cannot be written as a product of two non-units, i.e. its only factors are 1 and itself, so to speak (it’s a bit awkward because -1 is now there as well, and negative numbers aren’t really a thing, so we need to say non-units, but ah well). But if we called it prime, it would be weird, because we want primes to be the first elements, the unique ingredients in the factorization of a number. So we want call 2 a prime in K, we call it irreducible, to show its inferior status. For a prime number, we instead use the definition that if p divides a product ab, then p either divides a or p divides b. Oh and we need p to not be a unit. So we still didn’t make things better with respect of 1 not being a prime, we just discriminate against units, seemingly still without a good reason, since 1 divides not just one, but both factors of any product, so if anything it should be a super mega duper prime, right?
Well, let’s look at the definition of prime ideals, maybe that is less discriminatory. An ideal is called prime, if it is not the unit ideal (1), and if for any product
, we have either
or
. So we replaced divisibility with element membership, which kind of makes sense with how we defined ideals, but we still, seemingly out of pure malice, bar 1, or its ideal equivalent, the unit ideal, from being a prime ideal.
No, to understand why 1 is not a prime, we need to look at the complement of prime ideals. If and
, then by the definition of prime ideals,
. In other words, the complement of a prime ideal is a multiplicatively closed set. But for multiplicatively closed sets, it would make sense if all (finite) products of elements of the set end up in the set again. We know this is the case for products with 2 factors. It’s also trivially true for products with one factor. We can use induction to show that it is true for all products with any finite number of factors greater than 2.
This leaves us with products with 0 factors, the empty product. The empty product is always 1. It has to be, to make our induction work. If you like writing code, this is just setting the loop variable n to 0 in this code snippet
NumberFieldInteger a = 1;for (int 0; i < n; i++) { a *= factors[i];}return a;
which has to return 1, the value we needed to initialize our accumulator variable with in order to make sense.
So every multiplicatively closed set has to contain 1 in order to contain the empty product, otherwise it would not truly contain all possible (finite) products of its elements.
But if the complement of a prime ideal is a multiplicatively closed set, and every multiplicatively closed set contains 1, then no prime ideal can be allowed to contain 1. But the unit ideal does contain 1, so it cannot be prime for our definitions to make our life easier down the line. And the unit ideal is the ideal that is generated from 1, so 1 can therefore also not be a prime.
Somehow your grade school teacher probably also didn’t tell you this when you asked them why 1 is not a prime, when it clearly only has itself and 1 as divisors.
There is a lot more to talk about with algebraic number theory. For example, I managed to write all this without mentioning Évariste Galois even once. Which is probably a crime in several jurisdictions, so I shall remedy that with this mention of that little radical and his radicals. I won’t go into Galois theory though, since what I actually wanted to talk about was how the Riemann hypothesis does not have much impact on cryptography, and I’m way, way off track already. But very very high level, Galois theory does link group theory to field extensions, and in particular number fields make full use of them. Probably. We don’t actually know, this is an open conjecture.
Arithmetic Number Theory
So if that was algebraic number theory, what on Earth is arithmetic number theory? Actually I cheated a little bit, and have already mixed some arithmetic number theory in the algebraic number theory section. In particular, I’ve calculated the norm of various elements, and factored an ideal. Arithmetic number theory is just that: Actually calculating the objects that algebraic number theory studies, usually with a computer. This is finally where this blog post touches on cryptography. We use number fields extensively in both the construction of cryptographic primitives and attacks on others. For example, Module Learning With Errors is the extension of Learning With Errors to number field integers and the General Number Field Sieve is the best currently publicly known attack against RSA. But in all these cases, a computer needs to actually honor its name and compute. And for that it needs algorithms, which tell you how to compute things. And mathematicians call algorithms that tell you how to compute things Arithmetic, so arithmetic number theory it is.
Conclusions
Cryptography mainly revolves around arithmetic number theory, the art of computing values in algebraic number theory. The Riemann Hypothesis instead, lives in the world of analytic number theory, which is concerned with functions and integrals and infinities and convergence, very detrimental to the finiteness and computability of arithmetic number theory. This is not to say that these analytic and algebraic number theory are completely non-overlapping, there is a lot of ways that they influence each other, but generally they tend to be relatively distant, and be practiced by different specialists within mathematics.
And lastly, it needs to be noted that a proof merely tells you whether or not a certain statement is true. If you have plenty of data to already suggest that the statement is true (as we did with Riemann), then the proof barely tells you new information from an epistemological sense, doubly so if the proof you produce is mathslop, that too few humans are willing to subject themselves to in order to understand it. So yeah, the Riemann Hypothesis has very little to do with cryptography, other than it being a result in a field twice removed.