Papers
Topics
Authors
Recent
Search
2000 character limit reached

Machine-Checked Cardinality Bounds for Masked Barrett Reduction: A 1-Bit Side-Channel Leakage Barrier in Post-Quantum Cryptographic Hardware

Published 27 Apr 2026 in cs.CR | (2604.24670v2)

Abstract: Barrett reduction is the nonlinear core of every practical NTT-based post-quantum cryptography implementation. Existing composition frameworks (ISW, t-SNI, PINI, DOM) address Boolean masking over GF(2); none provides a machine-checked characterization of Barrett's leakage under first-order arithmetic masking and the first-order probing model over prime fields. Building on our prior series, QANARY [15], partial-NTT-masking margins [14], algebraic foundations [16], and butterfly composition [18], we close this gap. We prove a trichotomy: for any $q > 0$ and shift $s$, the Barrett internal wire map $f_x(m) = ((x + 2s - m) \bmod 2s) \bmod q$ has preimage cardinality in ${0, 1, 2}$, never more. We call this the 1-Bit Barrier: max-multiplicity 2 implies at most 1 bit of min-entropy loss per internal wire, universal over all moduli. The count-zero cases, unreachable output values, reveal that actual leakage is often strictly less than 1 bit, making the bound conservative. We introduce PF-PINI (Prime-Field PINI): Barrett satisfies PF-PINI(2); the Cooley-Tukey butterfly satisfies PF-PINI(1). We observe (not yet proved) that with fresh inter-stage masking, the composed pipeline has max-multiplicity $\max(k_1, k_2)$, so the 1-Bit Barrier propagates. The trichotomy, the PF-PINI instantiations, and cardinality results are machine-checked in Lean 4 with Mathlib: 12 proved results, zero sorry, universal over all $q > 0$ (the min-entropy bound follows by standard definitions). Adams Bridge lacks fresh inter-stage masking, violating PF-PINI composition and explaining why Papers 1 [15] and 2 [14] found vulnerabilities. NIST IR 8547 recommends formal methods for PQC implementation validation. The 1-Bit Barrier provides the first universal machine-checked cardinality bound for masked Barrett reduction in ML-KEM (FIPS 203) and ML-DSA (FIPS 204), with a corresponding 1-bit leakage interpretation.

Authors (2)

Summary

  • The paper formalizes a trichotomy theorem proving that every internal Barrett wire leaks at most 1 bit, providing concrete min-entropy bounds for ML-KEM and ML-DSA.
  • It employs Lean 4 to machine-check twelve kernel-level theorems, ensuring universal coverage across all modulus parameters and a verifiable security guarantee.
  • It introduces the PF-PINI framework that offers compositional leakage bounds for arithmetic masking, directly aiding certification and robust implementation in PQC hardware.

Machine-Checked Cardinality Bounds for Masked Barrett Reduction: Formal Security Guarantees Against Side-Channel Leakage in PQC Hardware

Context and Motivation

Barrett reduction is a fundamental nonlinear primitive in NTT-based post-quantum cryptography (PQC) hardware, pivotal for implementing ML-KEM and ML-DSA in accordance with NIST standards. Ensuring first-order side-channel resistance via arithmetic masking is critical for certification and deployment. Prior compositional security frameworks (ISW, t-SNI, PINI, DOM) predominantly focus on Boolean masking over GF(2), lacking machine-checked universality and direct applicability to nonlinear gadgets like Barrett reduction over Zq\mathbb{Z}_q under the first-order probing model. This paper explicitly addresses this gap by delivering universal, machine-checked leakage bounds for masked Barrett reduction.

Main Contributions

The central result is a trichotomy theorem for Barrett’s internal wire map, establishing that for any modulus q>0q > 0 and shift parameter ss, the map from mask to observed wire value—the function fx(m)=((x+2sm)mod2s)modqf_x(m) = ((x + 2^s - m) \bmod 2^s) \bmod q—has preimage cardinality strictly in {0,1,2}\{0,1,2\}. This trichotomy is fully formalized in Lean 4 with Mathlib, yielding twelve kernel-verified theorems and constructions, zero sorry, and universal coverage.

1-Bit Barrier: The maximal preimage cardinality implies a min-entropy bound: for every internal Barrett wire, the adversary learns no more than 1 bit per observation. Precisely, H(outputx)log2(q)1H_\infty(\text{output}|x) \geq \log_2(q) - 1, meaning leakage is universally capped at 1 bit per wire. For ML-KEM (q=3329q=3329) and ML-DSA (q=8,380,417q=8,380,417), this gives concrete lower bounds of 10.70 and 21.99 bits per wire, respectively.

PF-PINI Framework: The paper introduces Prime-Field PINI (PF-PINI), a gadget-level leakage bound framework for modular arithmetic circuits. Barrett reduction satisfies PF-PINI(2); butterfly stages are PF-PINI(1). The pipeline composition observation (not yet formally proved) predicts that with fresh inter-stage masking, the worst-case per-wire leakage is governed by max(k1,k2)\max(k_1, k_2), propagating the 1-Bit Barrier throughout the NTT pipeline.

Technical Results

Algebraic Structure of Barrett Reduction

Barrett reduction’s two-branch structure under masking—mm falling into either q>0q > 00 or q>0q > 01 (with q>0q > 02)—is key to bounding leakage. Each branch is affine in q>0q > 03, preserving injectivity within its domain, thus tightly controlling output multiplicities. The theorem chain formalizes:

  • For any q>0q > 04, only two candidate masks (q>0q > 05, q>0q > 06) can produce q>0q > 07.
  • The preimage set has cardinality at most two.
  • Zero-multiplicity output values occur, reducing adversarial distinguishing power.

These results are not only clean algebraically but universally quantified for all q>0q > 08, all q>0q > 09.

Min-Entropy Implications and Tightness

The leakage bound is tight: there exist ss0 where both candidates are feasible, and two masks collide, realizing the 1-bit leakage floor. However, the actual leakage is typically strictly less than 1 bit due to count-zero support gaps—output values that are entirely unreachable for certain secrets. This conservative bounding is suitable for hardware certification as it accommodates real-world parameter drift and future modulus expansions.

PF-PINI and Compositional Security

PF-PINI formalizes per-wire cardinality bounds in arithmetic masking—Barrett (PF-PINI(2)), butterfly (PF-PINI(1)). Composing stages with fresh masks theoretically limits pipeline wire leakage to the largest per-stage parameter. Adams Bridge, which omits fresh masking between NTT rounds, fails to uphold this compositional bound and suffers from compounded multiplicities leading to increased attack surface and empirically observed vulnerabilities.

Practical and Theoretical Implications

Certification and Implementation Portability

The universal machine-checked 1-bit bound for masked Barrett reduction is directly actionable for FIPS 140-3 certification: designers need not re-prove leakage bounds for new parameter sets or future modulus updates. Implementations verified against the 1-Bit Barrier can be ported across PQC standards, underpinning robust hardware IP design.

Toolchain Trust

All proofs are kernel-verified in Lean 4 (no sorry, no native_decide); the artifact is self-contained and reproducible. The formalization separates definition and proof for hardware-faithful arithmetic and abstract algebraic structure, facilitating integration with RTL implementations and industrial certification processes.

Future Directions

Key future work includes formalizing the secret-dependent support gap formula, completing PF-PINI pipeline composition proofs, integrating algebraic bounds with information-theoretic formalizations once Mathlib provides entropy/mutual information primitives, extending analysis to higher-order masking and other modular reduction algorithms (Montgomery, schoolbook), and bridging direct equivalence between hardware-faithful and algebraic definitions.

Adams Bridge Case Analysis

Adams Bridge’s vulnerabilities are precisely classified: intra-stage failures (converging shares without intermediate masking) allow structural and belief-propagation attacks, while inter-stage omission of fresh masking nullifies PF-PINI pipeline security, leading to fundamentally increased leakage. The trichotomy theorem rigorously bounds the leakage for all identified insecure Barrett wires and directly corroborates prior empirical and analytic findings.

Conclusion

This work provides the first universal, machine-checked cardinality and min-entropy bound for masked Barrett reduction in post-quantum cryptographic hardware. By formalizing the two-branch structure and precisely characterizing leakage per internal wire, it elevates hardware masking verification to a certifiable, parameter-independent standard. The PF-PINI framework and pipeline composability observations build a foundation for future compositional proofs and cross-standard portability. These results are critical for hardware designers, certification authorities, and cryptographic toolchain developers seeking provable guarantees against side-channel attacks in PQC implementations.

References

See (2604.24670) for the complete citation list and Lean 4 artifact availability.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.