Refreshable White-Box Adapters: Cheap Key Rotation for Plug-In Security Modules

Plug-in security is built on a promise: you can add, remove, or update a defense without touching the system it protects. Semantic communication systems — transmitters and receivers that send compact learned features instead of raw bits — now ship defenses this way: a pair of small neural networks that encrypt and decrypt the features under a negotiated key, a bolt-on perturbation module that confuses eavesdroppers, or a gating network that routes each message to the right specialized codec (SemProtector, Paired Adversarial Residual Networks, MoE-SemCom). But every one of these modules assumes the device running it is honest. On an untrusted phone, VR client, or IoT node, an attacker with administrative control can dump memory and read the negotiated key or copy the adapter weights in milliseconds — exactly the setting that motivates weak white-box security, which restructures software so a secret key never appears as a standalone string during execution (FPL, White-Box IBS).

The catch is that the two fields pull in opposite directions on time. Modular systems want hot-swap agility: a reinforcement-learning controller in Diffusion-enabled Secure Semantic Communication re-adapts its defense in 0.15 seconds when channel conditions change. White-box protection, by contrast, is a compile-time affair: fusing a fresh key into lookup tables takes roughly 4360ms in the IEEE P1363 white-box signature scheme (White-Box IBS), and the fusing is redone from scratch for every new key. Nobody has built a key-fused module whose key can change on an untrusted device at the timescale the modular world demands. This proposal argues the tension is not intrinsic: separate the structure of the protected computation (fused once, slowly) from the key-bearing state (carried in masked shares that can be re-randomized cheaply), and rotation becomes a linear refresh instead of a multi-second recompile.

Core Claim

We propose refreshable white-box adapters: small neural security modules, in the mold of SemProtector's encryption pair or the paired residual networks, in which the session key never materializes as a string. Instead the key is held as hybrid shares using the $(n,d)$-masking construction of A White-Box Masking Scheme Resisting Computational and Algebraic Attacks: the sensitive value $x$ is split into $n$ linear shares

$$x = x_0 \oplus x_1 \oplus \dots \oplus x_{n-1}, \qquad x_0 = y_0 \cdot y_1 \cdots y_d,$$

where the first share is further decomposed into a product of $d$ non-linear factors, and the adapter's table lookups and convolutions operate directly on shares. The key insight we exploit is that the expensive part — the non-linear decomposition that defeats algebraic cryptanalysis — depends only on the degree $d$, not on the key value. Therefore rotating the key does not require refusing and regenerating tables (the 4360ms path of White-Box IBS); it requires only re-randomizing shares, $x_i' = x_i \oplus r_i$ with $\bigoplus_i r_i = 0$, which is a handful of XOR operations per share. The claimed result: white-box extraction resistance comparable to static table fusion, with key rotation two to three orders of magnitude cheaper.

Two honest boundaries frame the claim. First, weak white-box security does not stop code lifting — an attacker can still copy the whole adapter and run it as an oracle, a limitation the IEEE P1363 scheme itself acknowledges (White-Box IBS) and FPL's space-hardness metric only partially addresses for block ciphers (FPL). We treat lifting as detectable rather than preventable: a lifted adapter should carry an attribution watermark in the AquaLoRA style (AquaLoRA), which reported 91.86% average bit-extraction accuracy across community Stable Diffusion models. Second, the masking scheme we build on assumes an untampered internal randomness source for share refresh — an assumption the original authors flag as exposed in a truly hostile host, and which we study rather than assume away.

Research Program

The work has three parts: a construction, a rotation protocol whose safety we can measure, and a security analysis against the strongest published gray-box attacks.

The construction converts an existing plug-in module — we will use SemProtector's SEC/SDC convolutional pair (SemProtector) and the paired residual transmitter/receiver of Paired Adversarial Residual Networks — into a share-domain implementation. The network weights themselves become public-ish structure; the negotiated key exists only as $(n,d)$ shares consumed by masked XOR/AND gadgets adapted to the module's arithmetic (the masking paper instantiates such gadgets for AES's bitwise operations at roughly 30,808 gates per round, versus upwards of 200,000 for prior combined schemes — a cost profile we expect to carry over, since the gadget count scales with sensitive-bit operations, not with the cipher). The design question is where to place the mask boundary in a neural pipeline: masking every intermediate activation would be ruinously expensive, so we must identify the minimal set of key-dependent intermediates whose exposure enables reconstruction, and mask only those. We expect this to be a small, structured set — key-schedule analogues and the first layer mixing key into features — but verifying that is itself a contribution.

The rotation protocol is where the new attack surface lives. A naive design downloads the new key in the clear, masks it, and discards the plaintext — but on a white-box host the plaintext key exists in registers during that window, and an attacker who can also inject faults (Attacking an Obfuscated Cipher by Injecting Faults, which extracted a full obfuscated-DES key in just a few dozen deterministic bit-flips) can freeze the device inside the window. We therefore study multi-round share-wise delivery: the new key arrives as separately delivered share deltas across many interactions, spaced so that no single point in time contains enough information to reconstruct the key, with each round's residue erased before the next arrives. The measurable quantity is the reconstruction probability of a tracing adversary as a function of rounds, and the latency budget: our target is rotation in tens of milliseconds, comparable to the 0.15s adaptation timescale that Diffusion-enabled Secure Semantic Communication treats as real-time, and far below the 4360ms full-recompile cost of White-Box IBS.

The analysis side runs the published gray-box attack suite against our adapters. The decisive benchmark is ADCA (Revisiting the Computation Analysis against Internal Encodings in White-Box Implementations), which broke 6 of 7 random-encoding cases and 11 of 14 non-linear mixed cases in $2^{21.32}$ to $2^{24.07}$ operations using 9 to 247 traces, failing only against degree-7 encodings, across 1,000 random replicates. Because ADCA defeats every non-linear encoding of degree $\le 6$, our share decomposition must be evaluated at $d \ge 7$ equivalent algebraic complexity, and the trace counts we survive become the headline security metric. We will additionally run DCA and differential fault injection during both steady state and the rotation window, since fault attacks are precisely what multi-round delivery is designed to defeat.

Proposed Experiments

We evaluate on the benchmarks used by the source systems themselves: MNIST and CIFAR-10 for the SemProtector-style secrecy and fidelity trade-offs, SST-2 for the integrity setting, and the white-box trace-analysis methodology of the ADCA paper (refined DIBO structures, 1,000 random configurations) for the security evaluation. Five experiments, each with a pre-registered pass condition.

The first experiment establishes that the problem is real. We place SemProtector's encryption pair on a simulated untrusted host and give an attacker memory dumps, execution traces, and fault injection. SemProtector reports that on MNIST an eavesdropper's model-inversion success drops from 98.3% to 13.4% when the module is active — but that figure assumes the key stays secret. Our hypothesis: once the key is dumped from RAM, the attacker re-encrypts or decrypts freely and inversion success returns to near the unprotected 98.3%, collapsing the defense. The same test against the paired residual receiver, whose defense survives only if the perturbation stream remains unpredictable, should show similar collapse once the receiver weights are lifted.

The second experiment builds the share-domain adapter and checks that the defense and the fidelity survive translation. Metrics and reference points from the source papers: authorized-receiver PSNR on MNIST (SemProtector reports a drop from 27.88 to 23.77 when all modules are active, with SSIM above 0.92), and for the residual-pair setting Bob's MSE staying below 0.03 at 10dB SNR using only 10% of signal power as adversarial perturbation (Paired Adversarial Residual Networks). Pass condition: within a small margin of the unmasked module on both fidelity metrics, while Eve's inversion success stays near the protected 13.4% figure without any key ever being recoverable from a full-memory dump.

The third experiment is the security evaluation: DCA, spectral analysis, and ADCA against the masked adapter across share counts $n$ and decomposition degrees $d$, following the ADCA paper's 1,000-replicate protocol, plus fault injection in the DFA style. The decisive comparison is against the attack's published strength — ADCA breaks degree-6 encodings and fails at degree 7 — so the pass condition is that no configuration we deploy is broken within the trace budget the paper reports (up to 247 traces) at feasible time complexity. We will also report the gadget overhead against the masking paper's 30,808-gates-per-AES-round reference point, since cost is the price of the degree.

The fourth experiment measures agility. We rotate keys at varying frequencies and compare rotation latency against two published anchors: the 4360ms one-time key-table generation of the white-box IBS scheme, re-incurred on every rotation in the recompile-everything approach, and the 0.15s adaptation time of the DDPG controller in Diffusion-enabled Secure Semantic Communication. Pass condition: rotation below 50ms at comparable protection level, with defense quality (Eve suppression, Bob fidelity) unchanged across thousands of consecutive rotations.

The fifth experiment attacks the rotation itself. A tracing-and-faulting adversary observes the device during key change under both naive download-then-mask and multi-round share-wise delivery, and we plot full-key reconstruction probability against number of delivery rounds and against the attacker's fault budget. This experiment also probes the randomness assumption flagged as open in the masking literature: we repeat it with the host's randomness source degraded or biased, and report honestly whether refresh security degrades — if it does, device-bound entropy derivation becomes the follow-on problem rather than a hidden assumption.

Baselines

The naive reference point is the existing modular system used as-is on an untrusted device: SemProtector's SemEryp with the negotiated key stored in plain memory (SemProtector). It is the right "do nothing" baseline because it is the current state of modular security integration and its published numbers — inversion success 98.3% unprotected versus 13.4% protected on MNIST — define both the defense quality we must preserve and the failure we predict under a white-box host. We will run it under the same simulated adversary, same datasets, and same compute, and beating it means simply keeping the 13.4% figure in the white-box setting, where we expect the baseline to fail back toward 98.3%.

The strongest existing competitor is full table-fusion with recompilation: refitting the module's key into lookup tables from scratch at every rotation, exactly as the IEEE P1363 white-box scheme's WhiteBoxKeyGen does for signing keys, at roughly 4360ms per key generation with 11ms steady-state signing (White-Box IBS). This is the strongest competitor because it buys genuine extraction resistance through a proven mechanism, and our claim is only that we match its resistance far more cheaply at rotation time. Fairness requires giving it the same tuning budget and evaluating it under the identical ADCA and fault-injection attack suite; beating it means indistinguishable extraction resistance (same broken/unbroken outcomes at the same trace budgets) with rotation latency at least two orders of magnitude lower, and no rotation window in which the key is reconstructable.

The key ablation is linear-only masking: the same adapter with $d = 1$ shares, i.e., the standard linear secret sharing the masking literature explicitly warns about (A White-Box Masking Scheme Resisting Computational and Algebraic Attacks), which states that linear sharing is solved by linear algebra regardless of share count, and which ADCA broke with as few as 9 traces at degree 1 (Revisiting the Computation Analysis). This ablation isolates the non-linear decomposition as the ingredient doing the security work: if the $(n,d)$ construction survives where the $(n,1)$ construction falls at the same share count and overhead, the claim is supported; if both fall, the rotation story is moot and the negative result is itself worth reporting.

A secondary baseline, run on the lifting question only, is the watermark-only defense of AquaLoRA (AquaLoRA), which embeds a 48-bit identity in U-Net weights with 91.86% average bit-extraction accuracy and zero inference overhead. It competes only on provenance after theft, not on confidentiality, so the comparison is scoped: we measure whether a lifted copy of our adapter retains a detectable watermark at comparable accuracy, treating attribution as a complement rather than a substitute.

Why not just…?

Why not just run the module in a hardware enclave (TEE/TPM)? For hardware that has one, this is the right answer and our proposal loses to it. The deployment regime is the problem: the white-box threat literature in this file is motivated by low-cost IoT clients, third-party mobile apps, and user-controlled VR hardware where enclaves are absent or themselves untrusted (Eye Tracking Data Collection Protocol for VR). Enclaves also impose memory and interface constraints that sit badly with high-dimensional neural modules — the same mismatch that pushed the SURE repair system away from generic secure computation (Pin the Tail on the Model). We position the construction for the enclave-free tier only, and our experiments say so explicitly.

Why not just bake the defense into the base model with end-to-end adversarial training? This abandons modularity, and the modular literature documents what it costs: monolithic models degrade to roughly 40% accuracy under concurrent heterogeneous attacks where a modular expert-routing design holds roughly 80% (MoE-SemCom), and retraining at every threat shift is the exact expenditure plug-in modules exist to avoid (Paired Adversarial Residual Networks). More to the point, it does not answer the white-box question at all: a co-trained defense still needs its key or weights resident in plain memory on the untrusted host, so experiment one would collapse it the same way.

Why not just accept the multi-second recompile on every key change? This is the most serious alternative, because it is safe and already demonstrated. The answer is empirical, and if it goes the other way we will report it: the modular regime's own published adaptation timescale is 0.15 seconds (Diffusion-enabled Secure Semantic Communication), and a 4360ms recompile per rotation cannot track a threat environment that shifts on that clock. There is also a subtler exposure: recompilation requires the fresh key to pass through the device in deliverable form, so the recompile path has its own rotation window — our fifth experiment attacks both designs symmetrically, and if the recompile path under share-wise delivery turns out equally safe and the latency cost is acceptable in practice, the honest conclusion is that refreshable masking is unnecessary, which would be a useful finding about where the agility–overhead tension actually binds.

Why not just obfuscate the code and hide the key with standard software protections? The cryptanalysis literature in this file rules it out with numbers: a commercial lookup-table-obfuscated DES fell to deterministic fault injection in just a few dozen operations (Attacking an Obfuscated Cipher by Injecting Faults), and although general de-obfuscation is NP-hard, heuristic obfuscation offers no trace-analysis resistance at all. Our experiments include the same fault-injection adversary, so this alternative is tested rather than dismissed.

Why not just wrap every update in generic secure two-party computation? Cost. Benchmarking in the SURE work shows generic optimized 2PC needed over 100 hours for a 32-layer repair that a refactored modular protocol completed in 16.77 seconds — a four-to-five order-of-magnitude gap (Pin the Tail on the Model). Interactive low-latency key rotation on edge hardware is far outside that budget.

Decisive Checks

The proposal stands or falls on three numbers. If a full-memory-dump-plus-trace adversary cannot extract a usable key from the refreshable adapter under the ADCA protocol (trace budget up to 247, replicates 1,000, degrees tested through 7 and above), while the unmodified SemProtector baseline loses its key and its 13.4% inversion protection; if authorized fidelity stays within the PSNR/SSIM envelope the source systems report (PSNR near 23.77 with modules active, SSIM above 0.92 on MNIST); and if key rotation completes in tens of milliseconds with the rotation-window reconstruction probability driven to negligible levels by multi-round delivery — then the agility–overhead tension identified here is dissolved in practice, and white-box resistance becomes a property modular systems can adopt without giving up the hot-swap behavior that defines them.