Abstract
Differential Power Analysis (DPA) has been an active area of research for the past two decades to study the attacks for extracting secret information from cryptographic implementations through power measurements and their defenses. The research on power side-channels have so far predominantly focused on analyzing implementations of ciphers such as AES, DES, RSA, and recently post-quantum cryptography primitives (e.g., lattices). Meanwhile, machine-learning applications are becoming ubiquitous with several scenarios where the Machine Learning Models are Intellectual Properties requiring confidentiality. Expanding side-channel analysis to Machine Learning Model extraction, however, is largely unexplored. This paper expands the DPA framework to neural-network classifiers. First, it shows DPA attacks during inference to extract the secret model parameters such as weights and biases of a neural network. Second, it proposes the first countermeasures against these attacks by augmenting masking. The resulting design uses novel masked components such as masked adder trees for fully-connected layers and masked Rectifier Linear Units for activation functions. On a SAKURA-X FPGA board, experiments show that the first-order DPA attacks on the unprotected implementation can succeed with only 200 traces and our protection respectively increases the latency and area-cost by 2.8× and 2.3×.
Introduction
Machine Learning (ML) models, particularly the specific weights and biases fine-tuned during expensive training, represent significant Intellectual Property (IP). While security research often focuses on adversarial examples or data privacy, the physical vulnerability of the hardware running these models is often overlooked. Differential Power Analysis (DPA) allows an attacker with physical access to monitor power consumption and extract secret parameters, similar to how cryptographic keys are stolen from embedded devices. This paper introduces MaskedNet, the first hardware inference engine designed to protect these "secrets" from power side-channel attacks.
MaskedNet Architecture and Defense Mechanisms
The researchers developed MaskedNet by adapting cryptographic masking techniques to machine learning hardware. They focused on Binarized Neural Networks (BNNs) due to their efficiency on edge devices. The core of the defense lies in three primary techniques:
- Arithmetic Masking for Adder Trees: Every input and weight is split into two randomized "shares." The hardware processes these shares independently, ensuring that instantaneous power consumption is statistically independent of the actual secret value.
- Masked Activation Functions: A novel chain of masked Look-Up Tables (LUTs) allows the hardware to perform sign-bit activation without ever unmasking the secret data.
- Hybrid Hiding (WDDL): To address information leakage from the "sign bit" in standard arithmetic, the design incorporates Wave Differential Dynamic Logic (WDDL) to equalize power consumption for critical logic paths.
Experimental Results
The implementation was evaluated on a SAKURA-X FPGA using the MNIST dataset. The BNN architecture consisted of three fully-connected hidden layers of 1024 neurons each.
Vulnerability and Protection
On an unprotected implementation, secret model weights were successfully extracted using only 200 power traces. This is demonstrated by significant correlation peaks in the Pearson Correlation analysis, where peaks above the noise floor indicate successful leakage of information.
With MaskedNet's protections enabled, first-order DPA attacks failed even after 100,000 traces, representing a massive increase in the effort required for an attacker. This security comes at a cost: latency increased by 2.8× and silicon area (LUT/FF usage) by approximately 2.3×. For high-security applications where model IP is worth millions, this is a highly acceptable trade-off.
Conclusion
MaskedNet demonstrates that ML models can and should be protected with the same rigor as cryptographic keys. By adapting masking and hiding techniques to neural network hardware, the authors provide a robust defense against power side-channel attacks, securing valuable model IP at a manageable hardware overhead. Future work will explore scaling these protections to non-binary networks and defending against higher-order attacks.
Summary updated