PAMS: Pre-Aligned Modulus Switching for Exact Second-Order Masked ML-KEM Ciphertext Verification in Hardware
ML-KEM decapsulation (FIPS 203) re-encrypts the recovered message and accepts the received ciphertext only if the re-encryption matches it exactly. Because this check operates on secret-dependent intermediates, side-channel protected implementations must evaluate it on masked data. The comparison is not linear in the arithmetic shares, so in hardware it requires protected nonlinear gadgets and a supply of fresh randomness every cycle. We present PAMS (pre-aligned modulus switching), a datapath for the exact masked comparison Compressd(x) = c for all ML-KEM compression widths d ∈ {4, 5, 10, 11}.PAMS combines three published ingredients into a protected datapath that, to our knowledge, has not been described before: share-wise modulus switching with an integer error bound, a precision of ⌈log2(3q)⌉ = 14 bits, and public interval anchoring with a per-coefficient public threshold. Every share is switched to one fixed 14-bit representation for all four widths. The decision becomes a single masked comparison against a public threshold. We implement PAMS as a three-share, second-order, HPC2-based RTL lane at one coefficient per cycle. We compare it with the strongest conventional exact lane we could construct, the Simple method with the same gadget, flow and generic optimizations. In Nangate45 synthesis and seeded OpenROAD place-and-route, PAMS needs 29.8 % fewer secure gadgets (40 vs. 57) and 29.8 % fewer fresh random bits per cycle (120 vs. 171). The lane (not a complete ML-KEM accelerator) uses 19.5 % less routed standard-cell area and 18.5 % less estimated die area. Clock periods are comparable; no general speed advantage is demonstrated. We establish second-order security in the glitch-robust probing model via trivial PINI composition: every nonlinear operation is instantiated as a SILVER-verified glitch-robust 2-PINI HPC2 gadget, and structural netlist checks confirm strict share-domain isolation and single-use randomness wiring across all synthesized and routed netlists. Complementary gate-level PROLEAD simulations, with glitches and transitions enabled, show no confirmed first or second-order leakage. The argument is conditional on fresh uniform randomness and canonical uniform input sharings; transition robustness, randomness generation and physical leakage are treated separately. All results are EDA-tool estimates for a verification subsystem, not silicon measurements.
Authors
- Skyler Lee (ORCID: https://orcid.org/0009-0004-1823-4013)
Publication Details
- Journal
- Figshare
- Published
- 2026-11-28
- DOI
- https://doi.org/10.6084/m9.figshare.35145565
- Primary Topic
- Cryptographic Implementations and Security
- Type
- preprint