PQ-WB-KEM: White-Box ML-KEM-768 1.0
PQ-WB-KEM: Toward a White-Box Construction of ML-KEM-768 with Arithmetic Masking for M2M Communications - Mathematics (MDPI)
Loading...
Searching...
No Matches
White-Box ML-KEM — Experiment Results Summary

Study: White-Box Constructions for ML-KEM (PQ-WB-KEM): a two-construction design space Target: ML-KEM-768 (FIPS 203), 3-share arithmetic masking over Z_q (q = 3329) Author: Uğur Coruh Manifest: experiment_summary.json (regenerated by code/python/run_all.py)

‍Operand domain. The ML-KEM base multiply operates in the NTT domain, so its secret operand is shat = NTT(s), which is full-range over Z_q (a CBD-small coefficient-domain s does not stay small under the NTT). All measurements below use the real full-range shat and two verified lookup-only constructions: A (shared full multiply table) and B (baked per-component tables).

Key Results

White-box base-multiply table storage (measured, <tt>whitebox_reference.json</tt>)

  • Naive full pair-product tabulation: ~10^5 TB (impractical baseline).
  • Construction A (shared full q x q multiply table): 22.16 MB, secret-independent, shared across all components and all k polynomials.
  • Construction B (baked per-component tables, k=3): 7.67 MB, the fixed secret baked into per-component q-entry tables.
  • Both are verified against the reference base multiply on the full-range shat (5000 trials, all 128 components, k=3).
  • With the measured 3.41 MB nonlinear-encoding sublayer (whitebox_encoded.json): measured protected core A 25.57 MB / B 11.08 MB. A hardened deployment adds estimated shuffling/support tables. The measured base tables are about 11,600× (A) and 33,400× (B) smaller than the 256 GB HFE white-box.

DCA resistance (<tt>dca_simulation.json</tt>, <tt>share_statistics.json</tt>)

Unmasked correct-key correlation ρ ≈ 0.85 (attack succeeds). Three-share masked ρ_max ≈ 0.011 at 10,000 traces — near the 1/√N ≈ 0.01 sampling-noise floor and below the max wrong-key correlation (0.031), so the attack fails (Hamming-weight leakage model, not real hardware traces). Share statistics: chi-square uniformity p ≈ 0.50; share/secret and masked-output correlations (0.037 / 0.023) sit at the noise floor.

Algebraic countermeasure (<tt>whitebox_encoded.json</tt>)

On the full-range shat, the plain linear-solve recovers the secret from unencoded intermediates (128/128); against the encoding-unaware (mixing-aware) attacker it fails (0/128) at a measured 3.41 MB encoding cost; the encoding-aware sanity attacker recovers (128/128). This is an empirical negative result for the tested attacker, not a proof — a BGE-style structural recovery of the encodings is open.

White-box overhead (<tt>primitive_bench_*.json</tt>, <tt>overhead_calculation.json</tt>)

Native protected/direct base-multiply ratio (construction B, table + 3-share masking): x86-64 ≈ 4.30×, aarch64/QEMU ≈ 2.85× (functional emulation; ratio is the comparable metric). Embedded deployment is DRAM-bound (7.67 MB > cache; working-set sweep DRAM/L1 ≈ 71× per random access), giving a projected ~47× (B) decapsulation overhead (native 4.30× × ~11× embedded cache; the ~17× figure — ~1.55× RNG-excluded masking floor × ~11× — is the explicitly-labeled lower bound; Construction A is not projected); against the 0.213 ms x86-64 host baseline this is a projected ~10 ms (B) protected decapsulation. Only decapsulation is protected.

Concrete security estimates (<tt>concrete_security_bounds.json</tt>, 3-share)

Channel Estimated security Notes
DCA resistance ~2^12 10,000-trace ρ = 0.011 near the noise floor; 1/ρ^2 estimate, not a proof
Table footprint A ~2^24.6 / B ~2^23.4 Byte-reads to COPY the core: a size, not an extraction cost and not a bound. Table size is NOT a security parameter here – the measured extraction budget is 1,536 B (B) and zero (A), independent of the footprint (entry_determinacy.json).
Timing structural constant-time no secret-dependent branches; cache-line constant-time not claimed

Output Files

File Description Source
baseline_benchmark.json Reference ML-KEM-768 timing (x86-64) baseline_benchmark.py
arm64_benchmark.json Archived aarch64/QEMU liboqs ML-KEM-768 timing (regenerable on an x86-64 host with the aarch64 cross-toolchain and QEMU via code/c/build_arm64_benchmark.sh) archived measurement (not produced by baseline_benchmark.py)
whitebox_reference.json Base-multiply constructions A/B: correctness, footprint, overhead whitebox_reference.py
whitebox_encoded.json Encoding sublayer + algebraic attack (full-range secret) whitebox_encoded.py
dca_simulation.json DCA resistance simulation (full-range secret) dca_simulation.py
share_statistics.json Masking share statistics share_statistics.py
overhead_calculation.json White-box overhead projection overhead_calculation.py
scaling_analysis.json 512/768/1024 scaling projections scaling_analysis.py
entry_determinacy.json Entry-determinacy dichotomy (d, M* budgets, PRF control) entry_determinacy.py
table_extraction_witness.json Extraction witness on the repo's own builders table_extraction_witness.py
encoding_layer_entropy.json Encoding sublayer: storage vs entropy encoding_layer_entropy.py
concrete_security_bounds.json Bit-security estimates (A/B) concrete_security_bounds.py
algebraic_attack_analysis.json Algebraic attack resistance algebraic_attack_analysis.py
ntt_verification.json Symbolic NTT verification sage/ntt_verification.sage
primitive_bench_x86.json, primitive_bench_aarch64_qemu.json, cache_effect.json C micro-benchmarks (construction B) c/primitive_bench.c, c/cache_effect.c
wallclock_statistics_windows.json, wallclock_statistics_wsl.json Wall-clock overhead mean ± 95% CI (N=20, per environment) wallclock_ci.py
experiment_summary.json Aggregate run manifest run_all.py

Regenerate all results with python code/python/run_all.py (plus the two C benchmarks).