Prime-Field PINI: Machine-Checked Composition Theorems for Post-Quantum NTT Masking
This paper presents the first machine-checked composition theorems for arithmetic masking over prime fields, proving that fresh random masking between pipeline stages ensures security independence from prior stages and using these formal results to diagnose a critical inter-stage masking flaw in Microsoft's Adams Bridge PQC accelerator.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to send a secret message through a factory assembly line. The message is sensitive, so you don't want anyone watching the line to figure out what it is. To protect it, you break the message into pieces and mix each piece with a random "noise" (a mask) before it moves to the next station. This is called masking.
In the world of computer security, there are two main types of noise:
- Boolean Noise: Like flipping switches (on/off). We already have a perfect rulebook for how to stack these switches safely.
- Arithmetic Noise: Like adding numbers on a clock (where 12 + 1 = 1). This is what modern "Post-Quantum" cryptography uses. Until now, we didn't have a rulebook for stacking these number-based masks safely.
This paper provides that missing rulebook. Here is the story of what they found, explained simply.
1. The Problem: The "Leaky" Middle
Imagine a two-step factory line:
- Station A: Takes your secret, adds some noise, and passes it along.
- Station B: Takes what Station A passed, adds more noise, and sends the final result.
The researchers discovered a dangerous flaw in how these stations were connected in a famous Microsoft security chip (called "Adams Bridge").
In the flawed design, Station A passed its noisy result directly to Station B. Because of how the math works (specifically a step called "Barrett reduction," which is like a complex way of doing division), the "noise" coming out of Station A wasn't perfectly random. It had a pattern.
The Analogy: Imagine Station A is a blender. It mixes your secret with ice. But because of the way the blades spin, the ice chunks coming out are slightly uneven—some spots have more ice, some have less. If a spy (a hacker) stands right between Station A and Station B and counts the ice chunks, they can guess part of your secret. This is called a Side-Channel Attack.
2. The Solution: The "Fresh Mask" (The Renewal Argument)
The paper's big "Aha!" moment is surprisingly simple. They proved that if you insert a fresh, brand-new random mask between Station A and Station B, the problem disappears instantly.
The Analogy:
- Without the fix: Station A hands a slightly uneven pile of ice to Station B. Station B tries to fix it, but the unevenness is already baked in.
- With the fix: Station A hands its uneven pile to a "Reset Button." This button dumps the pile into a giant, perfectly mixed bucket of fresh water (the new mask). Now, when Station B takes a scoop from that bucket, it is perfectly random again.
The paper proves mathematically that this fresh mask completely erases the memory of Station A. It doesn't matter if Station A was messy or perfect; once the fresh mask is applied, the wire connecting to Station B is perfectly uniform. The security of the whole line then depends only on how good Station B is.
3. The "1-Bit Barrier"
The researchers found that for the specific math used in these chips (Barrett reduction), the noise is never perfectly random on its own. It has a "leak" of up to 1 bit of information.
- Think of it like a coin that is slightly weighted. It's not a fair coin; it lands on "Heads" slightly more often.
- This isn't a mistake in the design; it's a fundamental property of the math. The paper calls this the "1-Bit Barrier."
- However, the paper proves that if you use the "Fresh Mask" trick between stages, that 1-bit leak is hidden inside the fresh noise and becomes useless to a spy.
4. The Proof: Machine-Checked
The authors didn't just write this down on paper; they used a computer program called Lean 4 to check every single step of their logic.
- They wrote 18 specific proofs.
- The computer verified them all with zero errors and zero "I'll do this later" notes (called "sorry stubs").
- This means the math is rock-solid. It's not just a theory; it's a verified fact.
5. The Diagnosis: Why Microsoft's Chip Was Vulnerable
The team applied their new rulebook to Microsoft's "Adams Bridge" chip.
- The Finding: The chip had two stages (Butterfly and Barrett) but no fresh mask between them.
- The Result: The wire connecting these two stages was "leaky." It wasn't uniform. This confirmed why other researchers had already successfully hacked this chip using power analysis (measuring electricity usage).
- The Fix: The paper prescribes a simple fix: Add one extra random number generator and one subtraction step between the stages. This makes the intermediate wire perfectly safe.
Summary
This paper solves a missing piece of the puzzle for secure computer chips.
- The Problem: When chaining math operations together, the "noise" used to hide secrets can get messy and leak information in the middle.
- The Fix: Insert a fresh, random "reset" between every step.
- The Proof: They used a computer to prove that this reset makes the middle wire perfectly safe, regardless of how messy the first step was.
- The Application: They showed exactly why a famous Microsoft chip was vulnerable and how to fix it with a simple architectural change.
In short: If you want to hide a secret through a multi-step process, don't just rely on the first step's disguise. Throw in a fresh disguise between every step, and the secret stays safe.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.