Leakage Domain Randomization: From Pre-Silicon Simulation to Physical Traces

When a cryptographic chip runs, its power consumption and electromagnetic emissions leak information about the secret key: every bit that flips inside the chip draws a small pulse of current, so a trace of the chip's power over time is a noisy fingerprint of the secret data being processed. Deep learning profiling attacks exploit this — a neural network is trained on traces from a fully controlled "clone" device whose key is known, then extracts the key from a victim device. But the clone is not the victim: microscopic manufacturing differences between chips make the trained attack degrade sharply, a problem the side-channel literature calls the portability gap SoK: Deep Learning-based Physical Side-channel Analysis. Worse, before a chip is fabricated there is no clone at all, only simulation — and robotics learned long ago that policies optimized in simulation exploit simulator inaccuracies and fail on real hardware, the sim-to-real gap Using inaccurate models in reinforcement learning.

The hardware-security field has independently rediscovered both halves of this problem. Pre-silicon tools such as RTL-PSC: Automated Power Side-Channel Leakage Assessment at Register-Transfer Level estimate leakage from simulated switching activity, but cannot model physical glitches, parasitics, or clock artifacts — and never train an attack model meant to run on physical traces. Chameleon: A Dataset for Segmenting and Attacking Obfuscated Power Traces in Side-Channel Analysis shows the failure mode from the other side: attack models trained under the standard synthetic noise recipes (add Gaussian noise, add random time shifts) collapse against real hardware hiding countermeasures, with dynamic frequency scaling driving a CNN attack to a 0.7% success rate. Neither line builds a bridge. This proposal imports the machinery that robotics developed precisely for this structure — domain randomization over physical parameters during training, followed by calibration against a handful of real measurements — and applies it to side-channel profiling, so that an attack or security assessment trained on simulated pre-silicon traces transfers to fabricated silicon.

Core Claim

The claim is that the pre-silicon-to-silicon gap in side-channel analysis is a sim-to-real gap in the exact technical sense, and that the two remedies that work for robots — randomizing the physical parameters of the simulator during training, then grounding the simulator to a few real traces — will close it. Concretely: a profiling network trained on traces from a leakage-parameterized simulator, in which glitch timing skews, parasitic coupling strengths, and noise levels are drawn from wide distributions, will (a) attack physical traces it has never seen with far fewer real calibration traces than plain fine-tuning requires, and (b) succeed on the physically obfuscated cases, like dynamic frequency scaling, where synthetic-noise training fails outright.

The closest existing work stops short of this. PROACT - Physical Attack Resistance of Cryptographic Algorithms and Circuits with Reduced Time to Market builds pre-silicon leakage simulation (the ABBY framework, validated against FPGA measurements) but treats it purely as an evaluation tool; it explicitly does not study whether models trained on simulated traces can be adapted to physical devices using transfer techniques. RTL-PSC computes divergence metrics on simulated toggles, never a transferable attack model. Chameleon documents that synthetic obfuscation models fail, but develops no method to bridge them. The SoK names the portability gap but never connects it to the sim-to-real literature. What is missing — and what this proposal builds — is the transfer method itself.

Research Program

The first deliverable is a leakage-parameterized simulator: a fast trace generator that sits between RTL simulation and physics. It takes the per-net toggle activity that RTL-PSC already extracts (via SAIF files) and composes it into a synthetic power trace under a vector of physical parameters $\theta$:

$$\hat{p}_\theta(t) \;=\; \sum_i \alpha_i\, a_i(t) \;+\; \sum_{(i,j)} \beta_{ij}\, g_{ij}\big(t;\, \delta_{ij}\big) \;+\; \eta_\sigma(t)$$

Here $a_i(t)$ is the toggle activity of net $i$ from RTL simulation; $g_{ij}(t;\delta_{ij})$ is a spurious glitch pulse fired when nets $i$ and $j$ switch with arrival skew $\delta_{ij}$ — the phenomenon that Effect of glitches against masked AES S-box implementation and countermeasure showed breaks masking in real silicon; $\alpha_i$ and $\beta_{ij}$ are coupling gains standing in for parasitic capacitance and routing effects; and $\eta_\sigma$ is measurement noise. The physical ranges of the glitch skews $\delta$ and the leakage magnitudes are anchored to the SPICE-level numbers that paper reports (leakage differences of roughly 25–90 μA across architectures), so the randomization covers physically plausible silicon rather than arbitrary noise.

The second deliverable is the two-stage transfer recipe. Stage one is domain randomization in the robotics sense Learning Dexterous In-Hand Manipulation: during training, $\theta$ is redrawn per-trace from distributions wide enough to cover inter-die process, voltage, and temperature variation, plus clock-frequency modulation and delay insertion matching the Chameleon countermeasure modes. The intuition, proven out on the Shadow Hand, is that the network learns the invariant structure — which nets toggle when the S-box output is computed — rather than one chip's signature. Stage two is grounding, in the spirit of Abbeel et al., who showed a simulator need not be globally accurate: fitting a time-dependent bias to a handful of real trajectories sufficed to recover 88–97% tracking improvements on a physical RC car in as few as 5 real runs. Here, a small number $K$ of real traces from the target is used to infer a posterior over $\theta$ — following the posterior-inference approach of Neural Posterior Domain Randomization — rather than to retrain the network. The attack model itself stays frozen; only the simulator's physical parameters are fitted. This is the key design difference from fine-tuning, and it is what should make the method data-efficient: the real traces constrain a low-dimensional physical explanation of the mismatch instead of updating millions of network weights.

A third, lighter thread treats the sample-complexity view: State Revisit and Re-explore: Bridging Sim-to-Real Gaps in Offline-and-Online Reinforcement Learning with An Imperfect Simulator proved that naive exploration in an imperfect simulator costs samples exponentially; the analogous question here is how the number of real traces needed for calibration scales with randomization width, which we will measure directly.

Baselines

The naive reference point is doing nothing about the gap: train the profiling network on clean simulated traces (toggle counts composed with a single fixed $\theta$) and attack the physical device zero-shot. This isolates how large the pre-silicon-to-silicon gap actually is on our hardware, and we expect it to fail in the way Chameleon documented.

The strongest existing-method baseline is the standard practice Chameleon criticizes but everyone still uses: synthetic noise augmentation, where the simulated traces are post-processed with Gaussian noise and random time shifts before training. This is the de facto approach across the datasets cataloged in the SoK, and Chameleon's own numbers define the bar it fails to clear — a CNN trained this way needed only 14 traces on the clean BASE sub-dataset but 104 under chaffing, and dropped to a 0.7% success rate under dynamic frequency scaling. Beating this baseline means reaching key disclosure on the DFS sub-dataset with a practical trace count where the reported result is 0.7% success.

The second serious competitor is fine-tuning: take the simulated-trained network and continue training on $K$ real labeled traces from the target. This is the honest threat, because it uses exactly the same real-trace budget as our calibration stage. It will be run with the identical architecture, identical compute, and identical tuning budget (fixed random-search sweeps over learning rate and schedule, with total training capped at the scale of the single-GPU budget that A Simple Transformer Pipeline for Full-Key Side-Channel Attacks on Uncropped Datasets reports — 3.34 hours on one A6000 for ASCADv1f, so dozens of runs are affordable). Our method beats it only if, at equal $K$, the calibrated model reaches key disclosure with fewer traces; if fine-tuning matches us at $K = 10$ traces, the proposal's practical value collapses to the pre-tape-out regime where no real traces exist at all, and we will say so plainly.

The upper bound is full physical profiling: a network trained directly on real traces from the target device itself, Chameleon-style. The Chameleon CNN's 14-trace disclosure on BASE is the reference point for "you already own the device" performance; our method cannot beat this and is not meant to — it is meant to approach it while using orders of magnitude fewer physical traces. As an architecture control we use the transformer pipeline of Gammell and Roy, which reports a Minimum Traces to Disclosure of 1.000 on both ASCADv1f and ASCADv1r and 99.97% accuracy on ASCADv1r Byte 2, so that any difference between methods is attributable to the transfer recipe, not the network.

Finally, the ablation that isolates the key ingredient: the same frozen network trained with randomization but calibrated by fine-tuning weights instead of fitting $\theta$, and trained without randomization but with $\theta$-calibration. This separates the contribution of the randomized training distribution from the contribution of the low-dimensional physical calibration.

Why not just…?

Why not just fine-tune the detector on real traces? This is the real threat, and we treat it as a first-class baseline rather than arguing around it. The case for our method rests on two facts: the SoK's portability gap shows that even networks trained on a physical clone degrade on the target, so raw fine-tuning is fighting the same distribution shift from a worse starting point; and Abbeel et al. showed that fitting a small set of physical parameters to a handful of real executions can be dramatically more sample-efficient than re-optimizing a policy. But if the equal-budget experiment shows fine-tuning matching calibration at $K \le 10$, the honest conclusion is that the contribution narrows to zero-real-trace pre-silicon triage — still useful, since no silicon exists before tape-out, but a smaller claim than proposed. The trace-budget curves in the experiments section are designed to settle exactly this.

Why not just add more synthetic noise to the simulated traces? Because the evidence says this specific recipe fails against physical deformations, not just noise levels: Chameleon's central finding is that models trained under artificial Gaussian noise and uniform shifts collapse against real hardware hiding techniques, with dynamic frequency scaling — a non-linear clock deformation, not an amplitude change — driving the CNN to 0.7% success. Our randomization deliberately includes the structural parameters (glitch skews, per-net coupling gains, clock modulation) that amplitude noise cannot represent. We still run this baseline, because if heavier synthetic noise did close the gap, the whole apparatus of $\theta$-calibration would be unnecessary, and the field should know that.

Why not just use a more accurate simulator — gate-level or SPICE? The cost and the ceiling are both documented. RTL-PSC reports gate-level assessment of AES-GF took roughly 31 hours versus 46 minutes at RTL (a 42x speedup), and even that only achieves >80% Pearson correlation with physical SAKURA-G traces — useful for ranking designs, not for generating the thousands of diverse training traces domain randomization needs. And the glitches paper is explicit that even transistor-level SPICE misses manufacturing variation, substrate noise, and supply ripple. There is also a deeper point from the robotics side: Abbeel et al. demonstrated that local grounding around observed executions beats global simulator accuracy for transfer. Fidelity is not the bottleneck; coverage of the deformation family is.

Proposed Experiments and Decisive Checks

The experimental platform is fixed by the existing benchmarks. The main arena is the Chameleon dataset (over 600 GB of physically acquired traces from a RISC-V SoC on FPGA, across BASE, DFS, RD, MRP, and CHF sub-datasets), because it is the only resource in the literature that pairs real hardware hiding countermeasures with ground-truth operation boundaries — and DFS is the case where everything else fails. The simulated side is generated from the same SoC's RTL using our leakage-parameterized generator. The secondary arena is the PROACT dual-Ibex platform with AES, Ascon, and Xoodyak coprocessors, where we can acquire fresh physical traces and test the portability gap directly across boards and, if available, across FPGA chips of the same model.

The primary experiment is the trace-budget curve: for $K \in \{0, 1, 5, 10, 50, 100\}$ real traces used for adaptation, plot Guessing Entropy and Success Rate versus attack traces, for (i) zero-shot randomized, (ii) randomized plus $\theta$-calibration, (iii) randomized plus weight fine-tuning, (iv) noise-augmented training plus the same adaptations, and (v) full physical profiling as the ceiling. The decisive readouts are three: whether the randomized-plus-calibrated model reaches key disclosure on Chameleon DFS at a practical trace count, where the reported synthetic-trained result is 0.7% success; whether it matches fine-tuning at small $K$; and how the gap to the physical-profiling ceiling (14 traces on BASE, 104 on CHF) shrinks with $K$.

The second experiment tests the portability gap as a sim-to-real statement: calibrate on traces from one board, attack a second board of the same design, and compare against a physically-trained model transferred the same way — the setting the SoK cataloged as failing today. The third is a physical-plausibility audit rather than a benchmark: the calibrated $\theta$ should reproduce RTL-PSC's reported >80% correlation between simulated and SAKURA-G physical traces without being fit to it, and the inferred glitch skews should fall in physically sensible ranges relative to the SPICE-derived magnitudes (leakage differences on the order of tens of μA) from the glitches paper. A calibrated simulator that only fits the traces through unphysical parameters would be curve-fitting, not grounding.

We state the main limitation up front: all available physical traces come from FPGA implementations, and PROACT itself acknowledges that FPGA routing capacitance and jitter differ from custom ASICs — the final silicon gap remains untestable until an ASIC tape-out exists. The FPGA-to-FPGA portability setting is the honest first instantiation, and the calibrated-simulator methodology is precisely the instrument that should make the eventual FPGA-to-ASIC step measurable.