Controller–Datapath Aware Verification of Masked Hardware Generated via High-Level Synthesis

Nilotpola Sarma, Vaishali Ghanshyam Chaudhuri, Chandan Karfa · 2026

Read Controller–Datapath Aware Verification of Masked Hardware Generated via High-Level Synthesis by Nilotpola Sarma, Vaishali Ghanshyam Chaudhuri, Chandan Karfa (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-18939.txt.

Introduction

Sarma and co-authors present a tool to check the safety of masked crypto hardware built by high-level synthesis. Masking guards chips against power-based side attacks. Synthesis tools were not built for security, so their tweaks can open leaks. Past checkers raise false alarms on shared control paths in such designs. Their tool checks the design state by state to avoid those false alarms. It correctly checks standard crypto tests, including cascaded masked parts and a masked PRESENT S-box.

Catalog record

CREATORNilotpola Sarma, Vaishali Ghanshyam Chaudhuri, Chandan Karfa
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE57803
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.18939

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Controller–Datapath Aware Verification of Masked Hardware Generated via High-Level Synthesis Nilotpola Sarma, Vaishali Ghanshyam Chaudhuri, Chandan Karfa Abstract Masking is a countermeasure against Power Side-Channel Attacks (PSCAs) in both software and hardware implementations of cryptographic algorithms. Compared to software masking, implementing masked hardware is time-consuming and error prone. Recent approaches, therefore, rely on High-Level Synthesis (HLS) tools to automatically generate masked Register-Transfer Level (RTL) hardware from verified masked software, significantly reducing design effort. Since HLS was never developed for security, HLS optimizations may impact PSCA security of the generated RTL. As a result, verifying the PSCA-security of HLS-generated masked RTL is crucial. Existing hardware masking verification tools can verify masked hardware, but may produce false positives when applied to HLS-generated designs with controller–datapath architectures obtained due to resource-shared datapath obtained via HLS. This work proposes a hardware masking verification strategy for HLS-generated masked hardware. Our toolflow MaskedHLSVerif, performs state-wise formal verification of controller–datapath RTL obtained via HLS, thereby avoiding false positives caused by resource-shared datapaths. Our tool flow correctly verifies standard cryptographic benchmarks, consisting of cascaded masked gadgets and the PRESENT S-box masked with gadgets, where existing tools like REBECCA [ 1 ] reports false positives. The proposed tool-flow is able to detect masking flaws induced by HLS-optimizations as well. I Introduction Embedded devices implementing a cryptographic algorithm are susceptible to Power Side-Channel Attacks (PSCAs) [ 2 ] , where an attacker uses the target device’s power consumption information to extract the secret values processed by the underlying cryptographic algorithm. Masking [ 3 ] is a common countermeasure against PSCAs. Masking splits the secret information processed in the algorithm into random shares. Thereafter, execution proceeds by processing these shares independently, taking care to re-randomize computations that cause their recombination. Masking can be applied at the hardware [ 3 ] and software levels [ 4 ] . In addition to ensuring the correct and independent sharing of intermediate computations as required by software masking, hardware masking must also be resistant to glitches and transitions [ 5 ] . Also, masking in general, is applied manually by careful examination of design parameters. Thus masking a cryptographic hardware requires expertise across cryptography, digital design, design optimization and verification. There are several valid masked versions of any cryptographic design for a given security order, differing in the latency and number of random bits needed for re-masking [ 6 , 7 , 8 ] . Most of these optimizations are design-specific [ 9 ] and masking-scheme specific [ 8 ] . Therefore, manually masking a design is time-consuming and error prone. High-Level Synthesis (HLS) tools automatically convert a C specification to Register-Transfer Level (RTL) and optimize latency and/or area in significantly less time [ 10 ] . HLS can automatically generate an RTL masked design in Verilog or VHDL from a masked software specification of a cryptographic algorithm. Thus, given the difficulty of manually masking hardware, recent trends focus on using HLS to generate masked hardware from masked software [ 11 , 12 ] . This results in reduced design time, enabling Design-Space Exploration (DSE). However, HLS was never developed with security in mind [ 13 ] . The objective of HLS is to generate a functionally correct and efficient implementation. As a result, several scenarios have been discovered where the HLS optimizations have led to PSCA-vulnerabilities in the synthesized design [ 11 , 12 ] while keeping the functional correctness intact. These optimizations are driven by a target latency or resource constraint provided by the user during synthesis. They may also be automatically applied by the HLS tool without any user provided directives. A few such optimizations are expression-balancing, re-association, etc. It may be noted that there are many such optimizations and their consequence on the PSCA-security of HLS-generated masked hardware is yet to be explored. Therefore, it is necessary to verify the PSCA-security of HLS-generated masked hardware. There are many existing hardware masking verification tools that can verify the PSCA security of masked designs [ 1 , 14 , 15 , 16 , 17 ] . We tried to use them to verify the security of HLS-generated masked hardware, albeit unsuccessfully. This is due to the unique datapath generated by HLS. Given a time-division multiplexed datapath (for resource-sharing) generated by HLS under a resource constraint, many combinations of the datapath operations will likely never be executed. When an existing formal verification tool is used to verify such a datapath, it will end up checking the security for all these possible combinations, including those that are never going to get executed. Thus, there will be false positives and, hence, inaccurate security estimation of the design. To the best of our knowledge, verification of HLS generated masked designs was never addressed in any previous formal verification tools for masked hardware. Moreover, the State-Of-The-Art (SOTA) tools fail to verify them and produces false-positive results. In this work, we demonstrate how we came up with a tool-flow for verifying HLS-generated masked hardware and overcame this problem. This toolflow proposed the usage of SOTA tools in a way that could verify HLS-generated masked hardware without the aforementioned false positives by abstracting out the active datapath at each state of the design’s Finite State Machine (FSM). Specifically, the contributions of our work are as follows: • We identified the limitations of the SOTA hardware masking verification tools in verifying HLS generated masked hardware. • We have discussed the impact of optimizations of various steps of HLS on the security of masked hardware. • We developed a formal verification method, MaskedHLSVerif that can verify the correctness of masking security of HLS generated hardware. • A thorough experiment with six benchmark including cascaded AND gadgets and PRESENT cipher’s S-box masked with gadgets, demonstrate the usefulness of our method. Our verification method can correctly identify masking flaws due to HLS-induced optimizations. The rest of the paper is organized as follows: The motivation of work with example is presented in Section II . The background and related work are discussed in Section III . The impact of HLS on masking security is given in Section IV . Our verification method is presented in Section V . Detailed experimental results are given in Section VI . The paper is concluded in Section VII . II Motivation Formal verification tools for masked hardware [ 1 , 16 ] abstract away control flow and conservatively assume that all syntactically possible dataflow paths may be active. Thus they check all possible input combinations to every operator in the design at each clock cycle. For HLS-generated masked designs, the scheduling of operations (which operation is executed in each clock cycle) are decided by resource constraints, which enable HLS to share hardware resources (such as multipliers) across multiple operations scheduled in different clock cycles. Thus, not all datapath paths are active at every clock. Fig. 1 : Motivating example for state-based verification of masked hardware Consider the masked multiplier in Figure 1 , synthesized with a resource constraint of two multipliers. The four multiplications required by the masking scheme are distributed across two cycles, and multiplexers supply the appropriate input pairs in each state. For example, the valid input pairs for the multiplier MULT2 are only (a_{0},b_{0}) and (a_{1},b_{1})

Read the complete text