An elementary refutation of ETH

One month ago both Anthropic and OpenAI posted proofs that the exponential time hypothesis (ETH) is false. I wrote about these proofs here.

Noam Mazor and Rafael Pass have posted a new proof. Their 18-page paper begins:

We here provide an alternative elementary and self-contained proof for the refutation of ETH.

The paper concludes with the following:

AI Statement. OpenAI ChatGPT (Astra) was used extensively to study, learn about the problem, and explore candidate constructions. While the main ideas underlying the constructions and abstractions are due to the authors, ChatGPT was invaluable in exploring definitions and proof approaches, and in formalizing proof ideas and sketches. ChatGPT was also used to assist with writing and to provide feedback on the manuscript and its presentation.

 

Cryptography in the Age of AI

There is speculation that AI labs are sitting on cryptography results that are too dangerous to publish. One bit of evidence for this suspicion is that cryptography is conspicuously missing from the list of areas of math that have published AI-assisted proofs recently. But supporting evidence is not proof.

It is well known that public key cryptography based on the difficulty of factoring integers or on the difficulty of the discrete logarithm problem will break if and when a cryptographically relevant quantum computer is constructed. But what if someone discovers radically more efficient classical algorithms that break public key cryptography?

Ian Cassels once said:

Cryptography is a mixture of mathematics and muddle, and without the muddle the mathematics can be used against you.

Variations on RSA and ECC have lots of mathematical structure that could be exploited by someone with access to a quantum computer, or possibly by a mathematical discovery. Symmetric encryption algorithms (such as AES) and secure hashing algorithms (such as SHA256) have a high ratio of muddle to mathematics, and few people believe the security of these algorithms is threatened by quantum computers or mathematical breakthroughs.

Lattice-based cryptography also has a lot of mathematical structure, but is believed to be immune to attacks from quantum computers. I don’t see why it should be immune to new mathematical discoveries.

Maybe one of the big AI labs has discovered a way to break public key cryptography and is keeping it under wraps, but here’s a reason to think this might not be the case: proving a widely-believed theorem, such as the Riemann Hypothesis, will not break encryption. A cryptographic attack requires a new idea, not confirmation that an old idea is correct. AI may very well assist someone in coming up with a new encryption-breaking idea, but that requires more creativity than settling conjectures.

Related posts

Taxis and hash functions

In 2014 New York City released dump of trip and fare logs from NYC taxis in the previous year. In an attempt to protect privacy, the taxi license numbers and medallion numbers were hashed using the MD5 hash function.

If you’re familiar with secure has functions, your first reaction might be that the problem with the scenario above is that NYC used a hash function that had been shown to be broken a decade earlier. But that was not the problem.

MD5 was considered broken in 2004 because someone showed how to create a hash collision, not because one can calculate a preimage. It’s easy to create two messages that have the same MD5 hash value. However, if you have a message m with hash MD5(m) = h, it is still not practical to infer m from h in general. However, if you know that your message m comes from a fairly small set, such as the set of all NYC taxi license numbers, you can hash them all and see which one hashes to h. This would be true for a more secure hash function like SHA-256 just as much as for MD5.

The root of the problem was that the hash function was known. If the city had used a keyed hash, this would have prevented anyone from simply hashing all the license and medallion numbers. If they had chosen a random number and concatenated it to each value before hashing, this would have prevented an attacker from creating a lookup table, even using MD5. There may have been other privacy problems with the data, but this particular line of attack would have been blocked.

Related posts

Peeking inside the bash rabbit hole

I have much bigger issues to be concerned with than saving a few seconds of typing with obscure bash features. But precisely because I have bigger issues on my plate, it’s fun to take a moment and solve some little tangible problem.

The shell !$ saves the last part of the latest command. (Mnemonic: bang often refers to commands, such as !! to redo the previous command, and cash often refers to the last of something, such as the end of a line in a regular expression.)

This comes in handy, for example, when you copy a file to a directory and then want to cd into that directory.

cp myfile /big/long/path
cd !$

The !$ variable is fragile, however. The sequence of commands

cp myfile /big/long/path
ls
cd !$

won’t work because after running ls the variable !$ now contains “ls” rather than “/big/long/path”.

There are two ways to fix this. In the previous example you could change the last command to

cd !-2:$

This says go back two commands (!-2) and extract (:) the last argument ($).

Another possibility is

cd !cp:$

This says to pull up the most recent command that started with “cp” (!cp) and extract the last argument.

This only scratches the surface of conveniences bash offers. To learn about similar features, search on “history expansion” or “event designators.”

Because bash offers so many shortcuts, it’s hard to learn any of them from reading the manual: nothing will stick. It reminds me of when I was in Paris and had one hour to see the Louvre. I should have meandered around a room or two and been content with that. Instead, I blitzed through the museum. I wanted to “see the Louvre” but I didn’t really see anything.

Working around a strange Python problem

A Python script that worked a few days ago wouldn’t work today. I suspect it might have something to do with my updating everything I could think of in response to recent security breaches.

I got an error message that said

error: The script contains multiple PEP 723 metadata blocks

I searched on what that means, then took out the blank line in my header

#!/usr/bin/env -S uv run --script

# /// script
# dependencies = ["pyperclip"]
# ///

but I still got the same error message.

The script in question copies miscellaneous snippets of text to the clipboard for me. One of those snippets is the header block that uv requires. The script contains the header block marker # ///, and that was the source of the problem.

According to Grok

The PEP 723 parser is purely textual (it uses a regex that scans the whole file). It does not understand Python syntax, so the # /// sequences inside your triple-quoted string are treated as a second metadata block.

It suggested changing my quoted string to use # / / / and then take out the extra spaces:

"""#!/usr/bin/env -S uv run --script
# / / / script
# dependencies = ["numpy", "matplotlib"]
# / / /
import numpy as np
import matplotlib.pyplot as plt
""".replace("# / / /", "# ///")

This is a dirty hack, but it works.

A frivolous problem with a deeper lesson

About 14% of English words can be spelled by stringing together chemical symbols. For example, sarcasm can be written

S Ar Ca Sm

using the symbols for sulfur, argon, calcium, and samarium.

How would you write a program to determine whether a word can be written by stringing together chemical element abbreviations ignoring case? Obviously this isn’t a practical problem, but it illustrates a practical problem.

You could solve the problem with a regular expression:

(h|he|li|be|b|c|n|o|f|ne|na|mg|al|si| … |og)+

This solution could either be very efficient or very inefficient, depending on the inner workings of the software used to match the regular expression.

A DFA (deterministic finite automata) regular expression engine would find a match, or report failure, linear time, i.e. the execution time would be proportional to the length of the string being matched. An engine that uses backtracking (informally called an “NFA engine”) could take exponential time. (The classical Thompson simulation of an NFA itself runs in O(mn) time; the exponential behavior comes from the backtracking search strategy.)

The root of the problem is the ambiguity in dividing words into single letters or pairs of letters.

Many two-letter chemical symbols are made of letters that are themselves chemical symbols. For example, the symbol for cobalt, Co, consists of the symbols for carbon, C, and oxygen, O. A traditional NFA regular expression engine uses backtracking and could take exponentially long to test whether the word

cococo…j

matches a regular expression for concatenated chemical symbols. If there are n copies of co, the engine would try all 2n possibilities of treating each pair as either co (cobalt) or c o (carbon oxygen).

A DFA regular expression engine always runs in O(n) time, while a traditional backtracking engine can take exponential time. So why ever use a backtracking engine? Because such an engine can match more advanced patterns such as Perl regular expressions (which are not “regular” expressions in the original meaning of the term). Newer engines have added safeguards to eliminate or at least reduce the chance of running into catastrophic backtracking.

A 50-year-old computer-assisted proof

The idea of using computers to assist with proofs is not new. The first major computer-assisted proof was published in 1976, the proof of the four color theorem by Kenneth Appel and Wolfgang Haken. The authors reduced the proof of the four color theorem to verifying calculations on 1,834 configurations, each checked by a computer program.

The proof was simplified over the years, and formalized in Coq in 2005. Everyone is satisfied that the theorem is true, but there has never been a satisfying proof, one that a human could read and say “I see now why any map can be colored using only four colors.” And there may never be one, but see this post for a contrary prediction.

The IBM mainframe that ran the calculations completing the proof of the four color theorem did not generate the proof. It simply executed the FORTRAN program that Haken and Appel (and Koch [1]) gave it.

I don’t see the recent proof of finite-time blowup for solutions to the Navier-Stokes equations as entirely different. Computers did higher-level tasks for the OpenAI team than the mainframe did for Haken and Appel, and these tasks were not as directly programmed as the tasks that were given to the mainframe, but still machines do what they are told to do.

Related posts

[1] John A. Koch was a programmer who worked on the four color proof with Haken and Appel. I don’t know how much credit he deserves, but I suspect it may be more than he was given.

Computing a lower bound on matrix rank

Suppose you want to know the rank of an n × n matrix A, the number of linearly independent rows of A, or equivalently the number of linearly independent columns. There are at least three difficulties.

Difficulties in computing rank

First of all, rank is not a continuous function of a matrix. Since rank is an integer, an arbitrarily small change in the matrix could cause a discrete change in the rank [1]. A small error in computing A could produce a matrix with a different rank.

Second, finding the rank takes O(n³) operations, which may or may not be an issue depending on context.

Third, you may not have the matrix A in an explicit form. Maybe you’re able to compute products Av for vectors v but it’s not practical to form the entire matrix A.

Rank-trace inequality

If you don’t need to know the rank of A per se, but only need to know whether it is above a certain size, a lower bound on the rank may enough.

Suppose A is a Hermitian matrix. If A is real, this means A is symmetric. If A is complex, this means A equals its conjugate transpose. Then the rank-trace inequality says

\operatorname{rank}(A)\ge\frac{(\operatorname{tr} A)^2}{\operatorname{tr}(A^2)}
The quantity on the right hand side is known as the stable rank of A. It’s not a rank in any algebraic sense, but it gives a lower bound on rank. And it solves the three problems listed above. See the next post for a proof of the rank-trace theorem.

Stability

First of all, trace is a continuous function of a matrix, and so stable rank is also a continuous function of a matrix, provided the denominator isn’t zero. A small change to a matrix only makes a small change to its stable rank. That’s why stable rank is called stable.

Efficiency

Second, although computing rank takes O(n³) operations, computing stable rank takes only O(n²) operations, though this isn’t immediately obvious.

The trace of A takes n operations: simply sum the elements on the diagonal of A. But how do you take the trace of A²? Squaring A takes n³ operations, and so if you had to square A to find the trace of A² the rank-trace inequality would have no efficiency advantage over finding the rank of A. But you can compute the trace of A² via

\operatorname{tr}(A^2) = \sum_{i=1}^n \sum_{j=1}^n |a_{ij}|^2

Formation

Now suppose you don’t have the matrix A per se but you do have a way of probing A, computing the product of vectors with A. Maybe A is too large to fit into memory, or explicitly computing the elements of A would take too long.

There are Monte Carlo algorithms for estimating the traces of A and A² that could be used together to estimate the stable rank of A.

Demonstration

The following Python code illustrates the discussion above.

import numpy as np

np.random.seed(20260904)
n = 5
B = np.random.randn(n, n)
A = B.T @ B + 1e-8 * np.eye(n)  # Gram matrix plus a tiny shift => SPD

rank_A = np.linalg.matrix_rank(A)
tr_A = np.trace(A)
tr_A2 = np.trace(A @ A) # matrix product 
sum_sq = np.sum(A * A) # element-by-element product
stable_rank = (tr_A ** 2) / tr_A2

print(f"A =\n{A}\n")
print(f"rank(A)              = {rank_A}")
print(f"tr(A)                = {tr_A:.12f}")
print(f"tr(A^2) direct       = {tr_A2:.12f}")
print(f"tr(A^2) indirect     = {sum_sq:.12f}")
print(f"stable rank          = {stable_rank:.12f}")

The code above produces the output below.

A =
[[ 1.09945682  0.4899665   0.98901845  0.66983113 -1.35006341]
 [ 0.4899665   0.98531254  0.35067791  0.89757603 -0.72037507]
 [ 0.98901845  0.35067791  4.31233926  0.94556225 -0.54819048]
 [ 0.66983113  0.89757603  0.94556225  1.3494295  -1.33840786]
 [-1.35006341 -0.72037507 -0.54819048 -1.33840786  3.54858332]]

rank(A)              = 5
tr(A)                = 11.295121449420
tr(A^2) direct       = 51.035447533673
tr(A^2) indirect     = 51.035447533673
stable rank          = 2.499826585688

[1] Topological argument: A map from a connected space (such as ℝn×n) onto a discrete space (such as ℤ) cannot be continuous, otherwise the inverse images of the points in the range would partition the connected space into disjoint open sets, violating the definition of a connected space.

New RSA number factored

Eric Lu announced on X today that he has factored RSA-260, a number N with 260 digits (862 bits) that is the product of two large primes [1].

RSA numbers are challenge problems posed to gauge the security of RSA encryption, which rests on the difficulty of factoring large numbers [2]. The naming scheme is confusing because RSA-n might have n digits or n bits. For example, RSA-768 is smaller than RSA-260 because the former has 768 bits and the latter has 260 digits.

RSA-260 is the largest RSA number factored so far. What does the news of its factorization say about the security of RSA?

Based on equations here, an RSA key with 862 bits would have a security level of 74 bits, i.e. the same security level as symmetric encryption with a 74-bit key. The minimum recommended RSA key size now is 2048 bits, which has a security level of 107 bits.

Security levels are on a logarithmic scale: each additional bit of security doubles the effort required to break the encryption by brute force. So breaking a 2048-bit RSA key would take 234, roughly 1010, times more effort than factoring RSA-260. All this depends on numerous assumptions, such as the state of factorization algorithms and the non-existence of CRQC [3].

Update: A week after the initial announcement, Eric Lu released an article explaining how he factored RSA-260. He says “In total, I estimate that this factorization cost about 4,900 GPU-days, or 13.5 GPU-years, which is about $400k at current market prices.”

Related posts

[1] N = pq = 22112825529529666435281085255026230927612089502470015394413748319128822941402001986512729726569746599085900330031400051170742204560859276357953757185954298838958709229238491006703034124620545784566413664540684214361293017694020846391065875914794251435144458199

p = 4397328654844826923795068102505872571721883526553349659561256924505973939597593482272505698004801207988043088656411102133523080581

q = 5028695206842569864686141618253083416610081090075366674776775706538324961364412200138116378509733307971876652984898985905923678379

[2] The ability to efficiently factor large primes would break RSA. It’s possible that there’s a way to break RSA without being able to factor large numbers. More on that here.

[3] Cryptographically-relevant quantum computer. Quantum computers exist, but so far they’re cryptographically irrelevant. So far quantum computers cannot factor 21 without cheating.

Patented application of linear algebra

I just found out Brian Beckman and I got a patent on work we did for GSI Technology [1]. Nearly all the work I do is under an NDA, so I don’t often get a chance to talk about my projects. This work is public now that it’s in a patent; I suppose it has been public since the application was published.

Brian did most of the work on the project. My contribution was to mathematically formalize low-level operations on sheets of bits using linear algebra over a binary field. Lots of Hadamard products and outer products, if I remember correctly. When you can reduce computations to algebra, you can prove that a sequence of operations is correct, and you can find optimizations by simplifying expressions.

The patent mentions a programming language called Tartan. I suggested calling it plaid because it used matrices with mask patterns that reminded me of a plaid pattern, and Brian countered saying we should call it Tartan. I like that name better.

Figure 5B from patent

Figure 5B from the patent.

[1] Brian Beckman and John D. Cook. Compiler for a parallel processor. U.S. Patent 12,717,871 B2. Applicant/Assignee: GSI Technology Inc., Sunnyvale, CA.