ECSC 2026: an 8193rd root and a Tupperware full of stickers
At ECSC 2026 we couldn’t use AI assistance. No LLMs, no Google AI Overview, no screen recordings to conveniently ask something about afterward. Just us, the challenges, the documentation, and whatever we remembered how to do.
I realized fairly quickly that I had forgotten how to write Sage.
Which sounds like a stupid thing to discover at a cybersecurity competition, and it was embarrassing because I knew what mathematical objects I wanted but kept forgetting the exact way to create them or ask them for things. Sage documentation is also, in certain places, wonderfully determined not to help you. I would get the shape of the solution into my head, try to express it, encounter some tiny missing piece of syntax, start looking for it, forget which intermediate object I was trying to construct and have to work backward again. It was frustrating in a very ordinary way I hadn’t felt for a while.
I also kind of loved it. Being properly stuck, without the reflex of sending the error to a model and getting a plausible repair in fifteen seconds, is an interesting thing to have to get used to again. Although I’m not sure I would have picked a timed cryptography task as the ideal occasion.
We were in Bochum for ECSC 2026. I spent a lot of the competition with people from the Swiss team whom I’d met in Poland the year before, and quite a lot of time on two cryptography tasks which had very different endings.
securehash
Here’s the beginning of the first one:
p = 10**9 + 7
def enc(a, b):
n = len(a)
res = [0] * n
for i in range(n):
for j in range(n):
res[(i + j) % n] = (res[(i + j) % n] + a[i] * b[j]) % p
return res
def securehash(a):
res = a
for _ in range(8192):
res = enc(res, a)
return res
32 characters go in. 32 elements modulo come out. The enc function is cyclic convolution, which I recognized almost immediately, and naturally my brain went convolution, enormous amount of repeated multiplication, frequency domain, NTT, something something. I hadn’t actually done much with number theoretic transforms before. I knew enough about the convolution theorem to convince myself the right representation would make this easy. Take an appropriate root in the frequency domain, reverse the transform, done. Right????
I spent something like three hours learning about the NTT.
Most of the papers I found were about making polynomial multiplication efficient, with beautiful explanations of roots of unity and transform algorithms and all sorts of things which weren’t helping me invert the actual function. I was learning good mathematics and making almost no progress on the challenge, which is an excellent thing to notice while the clock is running.
The crucial structure was there in the wraparound indexing. If the original 32 input characters are coefficients of
then enc multiplies polynomials in the quotient ring
Each loop iteration multiplies the current state by the original ; it isn’t repeated squaring. So after 8192 iterations the output is
The 32-point transform I’d pictured doesn’t exist conveniently over the base field because doesn’t divide , and going into extension fields doesn’t make the root choices vanish. At some point I had to confront the polynomial directly. I knew this was probably where I’d have to go; I just wanted the other approach to work so badly that I kept reading NTT papers for ages.
A hundred thousand is a perfectly fine number
Factor the modulus:
The irreducible factors are pairwise coprime over , so by the Chinese remainder theorem the large quotient ring decomposes into smaller field components. In each one you can ask for the rd roots of the corresponding output. Sage knows how to enumerate those. Then you have to put the pieces back together, accounting for the possibility of multiple roots in each factor.
Given and , the usual CRT idempotent is
so one choice of local roots reconstructs a candidate
You can do this for every combination. There were on the order of one hundred thousand candidates, which is a lot to look at by hand and not remotely a problem for a computer. I filtered the coefficients to printable characters and checked the exponentiation again for anything that survived.
F = GF(10**9 + 7)
R = PolynomialRing(F, "x")
x = R.gen()
M = x**32 - 1
factors = [f for f, _ in M.factor()]
# Enumerate the 8193rd roots in each factor field,
# lift them with CRT idempotents, combine the choices,
# and check printable candidates against the given hash.
The actual solve script is less neat than the explanation in my head was, which is appropriate considering the amount of time I spent looking up how to make finite-field extensions in Sage. I was so aware of knowing the mathematics more clearly than the language I was using to express it. I don’t think that’s a bad experience to have, actually. It just felt rather awful at the time.
C20. Again.
Last year at ECSC I spent eight hours staring at Heavensent and got nowhere useful. This year I had another eight hours for attack/defence and somehow ended up with C20, a service involving fully homomorphic encryption, lattice cryptography, zero-knowledge proofs, a WebAssembly frontend and compiled C, because apparently I have a particular attraction to challenges containing as many separate unfamiliar systems as physically possible.
Most of the team was busy on other services, so I was doing C20 on my own. My reasoning at the start was basically that none of the other services had such enormous crypto vibes, so surely this was the one with the interesting cryptographic weakness, and there must be some attack in the FHE or the proof system. Then I spent hours trying to work out how everything connected.
I found traces of Microsoft SEAL. I couldn’t convince myself I understood whether the library was being used unchanged or adapted. I went through the .so, got lost in the codebase, started reading about LWE because I thought there was something hidden in the encryption, tried to reconstruct the flow of the service, and kept reaching the stage of thinking I almost knew where to look before finding another layer. It’s a horrible feeling when you’ve devoted most of the day to a problem and haven’t even managed to establish which part of the thing you’re supposed to be attacking. At some point I looked up and realized the competition clock had almost emptied again.
I didn’t solve C20. Nobody solved it during the round, as far as I know.
Afterward we talked with zeski, the author, and he explained some of the intended routes. I’m recording that here because it’s interesting, although these were explanations we got after the competition. One approach was to construct a malicious ciphertext with abnormally low noise and use the /roll decryption behaviour to extract information, related to chosen-ciphertext attacks on homomorphic encryption. Encrypting an ordinary zero wouldn’t do the job; the encryption routine adds its usual noise. You needed to make the ciphertext yourself. The eventual patch checked for requests with suspicious noise distributions.
And the shared object had three separate proof-forgery bugs, according to the author: one in an sumcheck, one in an sumcheck, and one in Merkle verification. One of them was apparently something like forty lines of Python to exploit. I remember being both very relieved that reversing the binary hadn’t been a total waste and deeply annoyed that I’d spent hours circling the system without locating one of those paths.
I’d still love to go through the full challenge carefully, with several days and the source. It would be a really good way to learn the things I was trying to learn under pressure. Eight hours is not a lot of time to become acquainted with an unfamiliar proof system and several cryptographic libraries. I did it anyway. Twice, if you count Heavensent.
We went looking for Tupperware
The competition was also full of much better uses of time.
The German team organized a sticker hunt around Bochum, with clues embedded in their team video. The idea was essentially geocaching for stickers: look carefully at the video, find a location somewhere in the city, locate a little hidden container. I spent time with friends from the Swiss team walking around Bochum, pausing and replaying pieces of the video, trying to work out where someone might have hidden a Tupperware box full of stickers. We got first blood on one of the locations. I was ridiculously pleased. It was a tiny, goofy achievement which I probably enjoyed more than several serious ones.
And telephones as a service returned. One of our juniors spent what felt like the whole attack/defence round talking to other teams on the phone while I was staring at C20. I think one of us had the more social eight hours.
I remember the people much more than I remember the competition timetable. The Swiss friends I’d made the previous year, hanging out in Bochum, the sticker nonsense, the conversations afterward about the crypto challenges and how nobody knew what was going on. I also remember the awful little moment of having to admit to myself that I’d become dependent on AI for so much routine coding syntax. The competition forced me to sit there with the documentation and work through the details on my own, and I was embarrassed by how rusty that felt.
I think I needed that experience. I just wish I hadn’t chosen an eight-hour cryptographic nightmare as the place to get it.