Guide Cybersecurity 7 min read

Rainbow and SIKE broken on ordinary computers, and a timing leak in Kyber’s reference code

Rainbow and SIKE, two candidates in NIST’s post-quantum competition, were broken in 2022 on a laptop and a single server core. Kyber, standardised as ML-KEM, was not broken; its reference code leaked through the timing of one division. We timed that kind of division on an Apple M4, with dummy numbers.

Kenji Tanaka
Developer Tools & Cloud Analyst · Singapore
Published 29 Nov 2026, 11:50 PM (SGT)
Share:
A close view of a silver stopwatch dial marked in seconds, its small inner dial reading from 5 to 30.
Photo by Sadia on Pixabay
Advertisement

Key points

  • Rainbow and SIKE were broken in 2022 on ordinary computers. Rainbow’s second-round level 1 key fell in about 53 hours on an eight-core laptop; SIKE’s level 1 key fell in about ten minutes on one core of a Xeon server chip.
  • Rainbow was a third-round finalist, and the laptop broke its earlier parameters. SIKE was an alternate that had advanced to a fourth round. NIST dropped both.
  • KyberSlash was a timing leak in several Kyber implementations, the reference code included. The reference code was patched in December 2023 and other libraries over the following months. Its paper does not say Kyber or ML-KEM is broken. Four of its ten authors are at NTU.
  • On our Apple M4, the hardware divide took 1.10–1.12 times as long for numbers near 2³¹ as for small ones, over six to nine runs per setup. In both Kyber-shaped ranges there was no difference (0.994–1.009). This is not an Apple vulnerability.
  • A 2024 paper claimed a polynomial-time quantum algorithm for the learning with errors problem, for certain parameters. The author’s own note of 18 April 2024 says the claim does not hold.

Post-quantum cryptography is the family of public-key schemes meant to survive a large quantum computer, and NIST chose its standards through a competition run in rounds. In 2023 the reference code of Kyber, its pick for establishing keys and now called ML-KEM, was found to leak secrets through the time one division took. We timed that kind of division on an Apple M4 with dummy numbers. Numbers near 2³¹ took 1.10 to 1.12 times as long as small ones, and numbers in Kyber’s range took the same time. Two other candidates were broken outright in 2022 on ordinary computers, Rainbow on a laptop and SIKE on one server core.

RainbowSIKEKyberSlash
What failedThe schemeThe schemeImplementations
NIST status thenRound-3 finalistRound-3 alternate, then round 4Selected; FIPS 203 later
Parameters attackedSL 1, second roundSIKEp434, level 1Kyber512 and Kyber768
MachineLaptop, Intel i9-10885HOne Intel Xeon E5-2630v2 coreRaspberry Pi 2, Cortex-M4, Cortex-A55
Time the paper gives53 hours on averageAbout ten minutesHours (A7) or minutes (M4)
OutcomeNot advanced (IR 8413)“eliminated” (IR 8545)Reference code patched, December 2023

Rainbow fell in a weekend against its earlier parameters

Ward Beullens of IBM Research Zurich posted the attack as ePrint 2022/214, received 25 February 2022 (UTC). Rainbow was then one of three signature finalists in NIST IR 8309. Its abstract names the target, a key “for the SL 1 parameters of the second-round submission”, Rainbow’s lowest security level as it stood in round 2, recovered “after on average 53 hours (one weekend)” on a standard laptop. That laptop ran 8 cores of an Intel i9-10885H at 2.5 GHz. One guess takes 3 hours 32 minutes and succeeds about once in 15 tries, hence the average; his own run needed 20 attempts.

The finalist parameters were not attacked in practice. For the third-round SL 1 set, Beullens estimates “a factor 2⁸ more effort”. NIST’s IR 8413 said the attack made an attack on Rainbow-I practical, and went on, “Therefore, NIST decided not to advance Rainbow.”

“can be performed in practice by anyone with a decent laptop and some patience (or luck)” Ward Beullens, on the second-round parameters, ePrint 2022/214

SIKE needed ten minutes on a Xeon server core

Wouter Castryck and Thomas Decru of KU Leuven posted ePrint 2022/975 on 30 July 2022 (UTC). SIKE was never a finalist. IR 8309 made it a third-round alternate, and IR 8413 moved it to a fourth round. The current version, last revised 15 May 2023, says its Magma implementation “breaks SIKEp434, which aims at security level 1, in about ten minutes on a single core”, a core of an Intel Xeon E5-2630v2 server chip.

The “about one hour” in much 2022 coverage is the first version, marked preliminary, run on the same Xeon. The later text, run in version V2.27-5 of Magma, a computer-algebra system, credits a fine-tuning of its Magma code by Steel and an update to Magma’s field arithmetic, and says the initial timings “were slower by factors 4 to 8, roughly”. NIST’s IR 8545 of March 2025 says SIKE “has been eliminated from the NIST PQC project”, and that the attacks “do not apply to many other isogeny-based cryptographic schemes”.

KyberSlash leaked through a division in the reference code

Kyber is a lattice scheme, standardised as ML-KEM in FIPS 203 in August 2024; our guide to NIST’s three post-quantum standards covers its sizes and parameter sets. ePrint 2024/1049, by Daniel J. Bernstein and nine co-authors, reports “two timing vulnerabilities in several implementations (including the official reference code)”. Four of the ten, Shivam Bhasin, Anupam Chattopadhyay, Tee Kiah Chia and Prasanna Ravi, are at Temasek Labs at Nanyang Technological University (NTU).

The leak sat in lines that divided a secret value by the public constant 3329, and on some chips a divide instruction’s time depends on its input. On a Cortex-M4, the paper’s Table 4 gives 3 cycles for numerators from 1 to 2¹¹ − 1 and 5 from there to 2¹⁵ − 1. Against the November 2023 reference code, the authors recovered keys in 10 of 10 experiments on a Raspberry Pi 2 (Kyber512, within 2 to 4 hours) and on a Cortex-M4 (Kyber768, within 4 minutes), plus one Cortex-A55 run.

Advertisement

By the authors’ timeline, the reference code was patched on 1 December 2023. On 30 December, Ravi and Matthias J. Kannwischer announced further secret-input divisions, KyberSlash2, patched in the reference code that day. The KyberSlash site speaks of software libraries that “leak secret information into timing”.

Timeline: Rainbow a finalist and SIKE an alternate, July 2020; Rainbow attack, February 2022; Rainbow dropped, July 2022; SIKE attack, July 2022, revised May 2023; Kyber reference code patched 1 and 30 December 2023; Chen paper and note, April 2024; FIPS 203, August 2024; SIKE eliminated, March 2025.
Each date is from the paper, NIST report or authors’ page named in the text. RECATOOLS, from the sources cited

Compiler flags decide whether a divide instruction appears

Compilers usually turn division by a constant into a multiply and a shift. The paper found that gcc’s -Os, which optimises for size, “generally disables the conversion of divisions into multiplications”; its note that the divide is absent at -O0 to -O3 concerns gcc 14.1 on x86-64. We compiled the same expression with Apple clang 21.0.0 for arm64 at six levels, compiling only.

Apple clang 21.0.0, arm64, 29 Nov 2026 (trimmed)
clang -Oz -S -o - expr.c
mov   w9, #3329
udiv  w8, w8, w9
clang -O2 -S -o - expr.c
movk  w9, #19, lsl #16
umull x8, w8, w9

The hardware divide instruction, udiv, appeared at -O0 and -Oz only. At -O1, -O2, -O3 and -Os, clang emitted a multiply. So Apple clang’s size flag kept the multiply, and its stricter size setting brought the divide back. We have no gcc installed, so this does not confirm the paper’s result; it shows the same behaviour on another compiler, visible only in the assembly.

Our M4 slowed only on numbers Kyber never divides

The test is harmless arithmetic, with no key, no Kyber code and no ciphertext. It times 1,000,000 divisions by 3329 in a chain, each waiting on the one before. One version forces the M4’s hardware divide, udiv. The control gets the same answer with a multiply and a shift, which we checked against true division for every number below 2³¹. Each run reports the median of 31 rounds for a small and a large class of numbers, six or nine runs per setup, under two protocols, one interleaving the classes.

The machine was an Apple M4 on macOS 26.7.2, built with Apple clang 21.0.0 at -O2, on 29 November 2026 between 21:07 and 21:17 SGT. It was not idle; the 1-minute load average read 1.74 to 2.03 across the 42 batches reported here. Three further runs switched on Arm’s Data Independent Timing (DIT) setting. We did not check what that setting covers, so those runs are left out of every figure, dot and download here.

Dot strips of per-run timing ratios. For 0–6657 against numbers near 2³¹, udiv runs sit at 1.102–1.120. In the Kyber-like range and the KyberSlash1 range, udiv runs sit at 0.994–1.009, on top of the multiply-shift control at about 1.00.
Each dot is one run. Apple M4, macOS 26.7.2, Apple clang 21.0.0 -O2, 29 November 2026, 1-minute load 1.74–2.03. RECATOOLS, measured 29 November 2026

With 0–6657 against 2³⁰ to 2³¹ − 1, the hardware divide took 1.10–1.12 times as long for the large class under both protocols, about 0.21–0.26 ns more per iteration. The control stayed between 0.995 and 1.01 in every range.

The Kyber-shaped ranges were 0–255 against 4096–6657, and even numbers from the FAQ’s KyberSlash1 range, 1664–2046 against 6144–8320. In both, the hardware divide gave 0.994–1.009, about the control’s own spread. On the paper’s Cortex-M4 the first pair would fall on different cycle counts.

Not an Apple vulnerability

On this M4 the divide slowed only for numbers near 2³¹, which Kyber’s division never sees. Both Kyber-shaped ranges took the same time. We measured two input classes on one chip, so this says nothing about ML-KEM on Apple hardware beyond those numbers.

Download

Our division timings, by range and protocol

Ten rows: each range, protocol and method with six or nine runs, the spread of small and large medians in ns, the ratio range and the 1-minute load during the runs. Apple M4, 29 November 2026.

CSV · 1.3 KB

Download the CSV — Our division timings, by range and protocol (CSV)

A quantum lattice claim its author says does not hold

On 10 April 2024 (UTC), Yilei Chen of Tsinghua University, Shanghai Artificial Intelligence Laboratory and Shanghai Qi Zhi Institute posted ePrint 2024/555, Quantum Algorithms for Lattice Problems. The abstract claims “a polynomial time quantum algorithm for solving the learning with errors problem (LWE) with certain polynomial modulus-noise ratios”. Our toy lattice guide works a small LWE example by hand.

The same page carries the author’s note of 18 April. Step 9 of the algorithm “contains a bug, which I don’t know how to fix”, it says, and the claim of a polynomial-time quantum algorithm for LWE with polynomial modulus-noise ratios “does not hold”. The paper stays listed, last revised 19 April 2024. What a large quantum computer would threaten is the subject of our guide to what Shor’s algorithm actually breaks.

Advertisement
Kenji Tanaka
Developer Tools & Cloud Analyst · Singapore

Kenji Tanaka covers developer tools, cloud platforms, DevOps, CI/CD, and software supply-chain topics for RECATOOLS.

View author profile → · Editorial policy

About this byline Kenji Tanaka is a RECATOOLS editorial persona for developer tools, cloud, DevOps, and software supply-chain coverage. Articles are produced and reviewed under RECATOOLS editorial supervision.

Corrections policy

Go further

More from Cybersecurity

Advertisement
Advertisement