scieee AI-readable full text Open interactive document viewer

Logic Minimization and Wide Fan-In Issues in DPL-Based Cryptocircuits Against Power Analysis Attacks

Tena Sánchez, Erica; Acosta Jiménez, Antonio José

Abstract

This paper discusses the use of logic minimization techniques and wide fan-in primitives and how the design and evaluation of combinational blocks for full-custom dual-precharge-logic-based cryptocircuits affect security, power consumption, and hardware resources. Generalized procedures for obtaining optimized solutions were developed and applied to the gate-level design of substitution boxes, widely used in block ciphers, using sense-amplifier–based logic in a 90-nm technology. The security of several proposals was evaluated with simulation-based correlation power analysis attacks, using the secret key measurements to disclosure metric. The simulation results showed increased security-power-delay figures for our proposals and, surprisingly, indicated that those solutions which minimized area occupation were both the most secure and the most power-efficient.

Full text

Depósito de investigación de la Universidad de Sevilla https://idus.us.es/ Esta es la versión aceptada del artículo publicado en: This is a accepted manuscript of a paper published in: International Journal of Circuit Theory and Applications (2019) vol.47 n.2 DOI: 10.1002/cta.2587 Copyright: 1999-2025 John Wiley & Sons El acceso a la versión publicada del artículo puede requerir la suscripción de la revista. Access to the published version may require subscription. “This is the peer reviewed version of the following article: Tena-Sánchez, E.; Acosta, Antonio J.: Logic minimization and wide fan-in issues in DPL-based cryptocircuits against power analysis attacks: from International Journal of Circuit Theory and Applications (2019), vol 47, n.2, pp. 238-253 which has been published in final form at https:// doi.org/10.1002/cta.2587. This article may be used for non-commercial purposes in accordance with Wiley Terms and Conditions for Use of Self-Archived Versions. This article may not be enhanced, enriched or otherwise transformed into a derivative work, without express permission from Wiley or by statutory rights under applicable legislation. Copyright notices must not be removed, obscured or modified. The article must be linked to Wiley’s version of record on Wiley Online Library and any embedding, framing or otherwise making available the article or pages thereof by third parties from platforms, services and websites other than Wiley Online Library must be prohibited." Received DD MM 2018; Revised DD MM 2018; Accepted DD MM 2018 DOI: xxx/xxxx ARTICLE TYPE Logic Minimization and Wide Fan-In Issues in DPL-Based Cryptocircuits Against Power Analysis Attacks Erica Tena-Sánchez* | Antonio J. Acosta † ∗,†Instituto de Microelectrónica de Sevilla (IMSE-CNM), CSIC/Universidad de Sevilla. Correspondence *Erica Tena-Sánchez, Email: [email protected] †Antonio J. Acosta, Email: [email protected] Email: [email protected] Summary This paper discusses the use of logic minimization techniques and wide fan-in primitives, and how the design and evaluation of combinational blocks for full-custom Dual-Precharge-Logic-based cryptocircuits affect security, power consumption and hardware resources. Generalized procedures for obtaining optimized solutions were developed and applied to the gate-level design of Substitution Boxes, widely used in block ciphers, using Sense-Amplifier Based Logic in a 90nm technology. The security of several proposals was evaluated with simulation-based Correlation Power Analysis attacks, using the secret key Measurements To Disclosure metric. The simulation results showed increased Security-Power-Delay figures for our proposals and, surprisingly, indicated that those solutions which minimized area occupation were both the most secure and the most power-efficient. KEYWORDS: Side-channel attacks, information security, logic design, optimization, cryptography, full-custom, dual precharge logic (DPL). 1 INTRODUCTION In a society where privacy is considered an inalienable personal right, security issues are today crucial in all Information and Communication Technology domains (the Internet of Things (IoT)1, e-health, e-commerce, privacy communications, etc.). Broadly speaking, security encompasses numerous fields, ranging from secure protocol access at software level to hardware identification for authenticated services. In applications with enormous limitations in achievable power and bandwidth, especially IoT nodes, security issues will necessarily focus on hardware, and the physical implementation of encryption mechanisms will therefore be the most efficient solution for incorporating competent security at node level2. Consequently, two different, highly demanding requirements combine in the same hardware platform: power-efficient solutions and the hardware implementation of encryption algorithms, with ASIC-based lightweight cryptography being the most suitable solution3. Within this realistic scenario, the proposal of secure primitives for cryptocircuit design and the search for a way to combine them to implement an efficient, secure cryptographic algorithm is particularly attractive. Commonly used electronic devices like smart-cards, ID-cards, smartphones, IoT nodes, etc., need embedded hardwaresoftware encryption technology to guarantee security. Encryption security is typically based on mathematically secure algorithms, designed to produce a ciphertext, invulnerable to mathematical attack, from a plaintext4. But even when such theoretical security is achieved, it has been shown that the physical implementation of the encryption algorithm leaks side-channel information that can be used by an attacker to reveal the secret key5. 2E. Tena-Sánchez and A. J. Acosta These attacks which exploit physical leakage are known as Side Channel Attacks (SCAs)5,6,7,8,9. SCAs use certain physical information such as time delay6, power consumption7or electromagnetic radiation8to reveal secret information. Of the known SCAs, Power Analysis (PA) attacks use the cryptographic device’s dependence on power consumption when processing data during encryption to reveal the secret key. The most powerful attacks are Differential/Correlation Power Analysis (DPA/CPA) attacks, due to their simplicity and effectiveness. A huge effort has been made in recent years to design and analyze the security of lightweight cryptographic algorithm implementations incorporating countermeasures against SCAs10,11,12. Despite the enormous range of countermeasures that have been developed, it is clear that additional work is required to provide more secure, more power-efficient solutions. When designing lightweight cryptocircuits, security and performance should be successfully maximized at a reasonable cost. However, although it is easy to meet any two of these three challenges - security, performance and cost - it is very difficult to meet all three at the same time. 1.1 Previous Work Since the first DPA was carried out in 19997, dozens of countermeasures have been proposed to deal with this type of intrusion, focusing on everything from algorithms to layout. The use of countermeasures at an algorithmic level is difficult because a secure implementation’s high dependency on a specific cryptographic algorithm makes them very specific and difficult to automate. Some approaches are presented in13,14. At circuit level, there are two main options that are independent of the specific algorithm used. One is the use of gatelevel mask circuits (𝑀𝑎𝑠𝑘𝑖𝑛𝑔) studied in15,16, where the designer tries to remove the data dependency on power consumption using a mask mixed with an intermediate value of the processed data. The other alternative is ℎ𝑖𝑑𝑖𝑛𝑔 17,18,19,20,21,22,23, where the Dual-Precharge-Logic (DPL) circuit implementation theoretically has the same power consumption regardless of the data being processed, in such a way that the power consumed does not reveal information about the secret key. The correlation between power consumption and processed data is reduced through constant inter-cycle power consumption. Work in17 described how constant instantaneous intra-cycle power consumption was achieved using a randomized delay assignment as a source of randomness, demonstrating that the immunity of a cryptographic circuit against PA attacks increases with misalignment between different output node transitions. In a physical implementation of a cryptographic device, output signals do not switch simultaneously because each transition takes place at a time that depends on factors such as input occurrences and slopes, routing and output capacitances, gate size and number of gates per path, and input data. Propagation delay and power consumption are therefore both data-dependent and implementation-dependent. Regarding the amount of power consumed in each output transition, security is achieved if the power consumption of the gates is the same regardless of the processed data. The variation in delay produced by using logic minimization techniques and different fan-in and fan-out gates to spread the signal switching for each operation can modify the security level achieved for each implementation, as stated in17. Since output node transition misalignment due to logic minimization techniques or to the use of different fan-in/out gates does not change the energy consumed per cycle, it can be added to other circuit countermeasures creating a stronger barrier against PA attacks. The most effective techniques targeting constant inter-cycle power consumption are DPL-based techniques24. DPL gates always compute the output and its complementary values, with exactly one output node transition in all the clock cycles. The same power consumption is therefore achieved in all the clock cycles regardless of the data being processed. The most useful DPL technique based on standard cells is the WDDL technique18. If they are correctly designed, full-custom techniques give the best results in terms of security and performance, and also at layout level25. Such logic styles comprise a DPDN block, performing the logic function, and a differential pull-up network (DPUN) alternating between precharge and evaluation phases, as shown in Fig.1 . They simultaneously provide both the true and the complemented output in every transition with one charging event, but care must be taken to ensure that the same charge is used in every transition. Representative examples of full-custom DPL techniques include Dynamic Current Mode Logic (DyCML)19, Low-Swing Current Mode Logic (LSCML)20, Sense Amplifier Based Logic (SABL)21, Three-Phase Dual-Rail Pre-Charge Logic (TPDL)22 and Delay-Based Dual-Rail Precharge Logic (DDPL)23. TDPL and DDPL are insensitive to unbalanced routing capacitances23, but TDPL needs a third clock phase22 and DDPL needs a timing codification scheme requiring precise delay generation23. SABL is a differential logic style with one charge event and uniform capacitance charges. It produces better results because its internal structure eliminates the influence of internal capacitances better than the reduced output swing in DyCML and LSCML26,27. Furthermore, the static power consumption of CMLs makes them unsuitable for low-power applications. Table 1 shows the number of transistors used in the DPUN and the main drawbacks of each logic style, confirming SABL as the DPL style offering E. Tena-Sánchez and A. J. Acosta 3 FIGURE 1 Simplified DPL schematic. FIGURE 2 DPUN schematic for SABL logic style21. TABLE 1 Transistor count for the DPUN and drawbacks of Full-Custom secure DPL techniques DPUN #transistors in DPUN Drawbacks TDPL22 14 Needs a third clock phase. Generation and routing of additional control signal. DDPL23 8 Need of level converters and precise timing. SABL21 12 Sensible to unbalanced outputs. DyCML19 13 Sensible to unbalanced outputs. Reduced output swing. LSCML20 13 Sensible to unbalanced outputs. Reduced output swing the best trade-off in hardware resources, power and security, especially if balanced outputs are provided. Although DDPL and TDPL can provide higher security levels, their overhead in complexity makes it recommendable to use SABL as the benchmark technique25. Fig. 2 shows the structure of the SABL logic style, detailing the DPUN block. SABL works as follows: the clocked PMOS transistors (T6 and T8) in the DPUN are ON in the precharge phase (𝑐𝑙𝑘=0), T11 being OFF, with setting 𝑞𝑞 = 11 (𝑄𝑄 = 00). In the evaluation phase (𝑐𝑙𝑘=1), the sources of NMOS transistors T7 and T10 are grounded through a discharge path in the DPDN and the switching action of transistor T12, which is always ON, making the logic function at the output dependent on the input values. The specific features that make SABL resistant to CPA are i) the presence of the clocked bottom transistor T11, ii) full symmetry in DPUN and iii) DPDN outputs not connected to the gates of the output inverters (T1/T2 and T3/T4). This last feature makes SABL superior to other, simpler symmetric differential structures21,27. 1.2 Paper Contribution This paper’s contribution to low-power security is to provide PA attack prevention hardware solutions which use logic minimization to spread switching, producing lower costs and enhanced performance-security figures. The contribution is based on circuit techniques that improve security levels against SCAs in full-custom implementations incorporating DPL styles24. It provides mechanisms for designing wide fan-in gates and analyzes the effect of logic optimization in combinational functions within cryptographic algorithms. The methods proposed, although applied to SABL gates, can easily be extended to any full-custom DPL style, since the only things affected are the DPDN block and the interconnection of complete gates. The principal contributions, then, are: •Extension of the methodology described in26 for designing wide fan-in gates with optimized DPDN in full-custom differential DPL gates, considering AND/NAND and XOR/XNOR SABL21 gates as demonstrative vehicles. 4E. Tena-Sánchez and A. J. Acosta •Application of different logic minimization strategies in combinational cryptocircuits, analyzing how switching spreading affects the security of the solutions, evaluating cost, performance and vulnerability, and particularizing in Substitution Boxes (Sboxes). •Evaluation by electrical simulation of proposals designed in a TSMC 90nm technology, measuring their resilience against SCAs by performing CPA attacks. The paper is organized as follows. Section 2 presents the proposed design methodology and simulation results for multipleinput DPDN in wide fan-in DPL gates. Section 3 describes the application of logic minimization to the design of optimized Sboxes. Section 4 presents the results obtained and analyzes the impact of the proposed techniques on the security of the implementations, with CPA attacks being performed on optimized Sboxes. Finally, the conclusions are given in Section 5. 2 DESIGN METHODOLOGY FOR GENERIC WIDE FAN-IN DPDN IN DPL GATES The methodology proposed in this section for designing wide fan-in DPDN blocks is generic and applicable to any full-custom DPL style. To achieve a DPDN fully operative for secure applications, the following requirements must be fulfilled26: i) the DPDN must be fully symmetrical regardless of input values, here, symmetry means that all the paths from 𝑤and 𝑤to ground must have the same transistor count and the same equivalent resistance and capacitance in every node, so that the gate can operate with a constant delay (𝑅𝐶 value), regardless of the input values; and ii) it must be ensured that all the internal nodes of the DPDN are connected to one of the module output nodes, 𝑤or 𝑤. Although the implementation of generic DPDN trees for differential gates with more than two inputs is well established28, its application for secure cryptohardware implementations is not quite so straightforward, because the effect on security has not really been well analyzed. To address this, this paper presents an extension of the methodologies described in26 to implement wide fan-in digital gates for CPA resistant circuits using an SABL logic style like DPUN. Without loss of generality, we used XOR/XNOR and AND/NAND gates as design vehicles, since they are capable of incorporating additional SABL enhanced security improvement mechanisms like those presented in25. Fig.3 -a and Fig.4 -a show the XOR/NOR and AND/NAND fully-symmetric DPDN for 2-input gates. Application of the guidelines established in26, yields a possible implementation of 3-input gates, shown in Fig.3 -b and Fig.4 -b, the extension to n-input DPDN being quite straightforward. It is clear that once a new input is added, the number of cascade transistors duplicates that of the lower level, fulfilling symmetry requirements. The total number of transistors used to implement the SABL structure, excluding the DPDN network transistors, was 12 (in Fig.2 , T1-T10 and T12 for DPUN and T11 to connect the DPDN to ground). With the proposed scheme, the total number of transistors used to implement an n-input gate can be obtained by applying the following equation: 𝑁𝑜.𝑇 𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 = 12 + 𝑛 ∑ 𝑖=1 2𝑖(1) Gate performance is strongly influenced by the width and number of the transistors in series in each differential branch of the DPDN. As stated in28, once a new input is added, the width of the DPDN’s transistors should be scaled accordingly, to keep the gate delay constant in comparison with a less-input gate. This means that if the transistor dimensions remain constant when the number of transistors in series in the differential branches is increased, the gate delay increases too. Since operating speed is not the biggest challenge in cryptographic applications, we considered a constant transistor width as new inputs are added in wide fan-in gates. For high-speed applications, scaling can easily be optimized. It can be concluded from eq.1 that the number of transistors of any XOR/XNOR or AND/NAND gate increases exponentially with the number of inputs. Table 2 shows the number of transistors used in the DPDN and the total count of transistors per gate depending on the number of inputs. However, this technique poses a problem regarding the area occupied by wide fan-in gates and the suitability of such gates for cryptographic applications. The issue is: when is it profitable to use wide fan-in gates instead of a combination of smaller fan-in gates? To determine the optimum implementation of secure DPL-based cryptocircuits using wide fan-in gates, in terms of area, delay and power consumption, different implementation options were studied for canonical functions AND/NAND or XOR/XNOR, depending on the number of input ports, comparing the performance and transistor count when implementing a single gate and when combining smaller fan-in gates thanks to the associative property of AND and XOR functions. The results obtained are E. Tena-Sánchez and A. J. Acosta 5 AAA B B w w AAA BB w w AA B C B C w = AB + AB w = AB + AB w = ABC + ABC + ABC + ABC w = ABC + ABC + ABC + ABC a) b) m m FIGURE 3 a) 2-input and b) 3-input XOR/XNOR DPDN schematics. AAA B B w w AAA BB AA B C B C w = AB w = A + B = AB + AB + AB w = ABC w = ABC + ABC + ABC + ABC + ABC + ABC + ABC ww a) b) m m FIGURE 4 a) 2-input and b) 3-input AND/NAND DPDN schematics. TABLE 2 Transistor count for single gates Gate DPDN Total 2-Input 6 18 3-Input 14 26 4-Input 30 42 5-Input 62 74 6-Input 126 138 presented in Fig. 5 , where different implementation options for different fan-in gates are shown considering 2/3/4-input gates. A number of fan-ins above 5 is excluded for two reasons. Firstly, a high number of transistors would be required (74 for 5-input vs 52-72 for 2/3/4-input combinations, in Table 2 and Fig. 5 respectively), and secondly, a DPDN with more than 4 transistors in series degrades performance considerably28. The number of transistors, average delay in the evaluation phase, average power consumption measured at 500 MHz clock frequency and the Power-Delay-Product (PDP - the lower the PDP, the better the power consumption-delay ratio) values for all the selected implementations of gates were measured via electrical simulations in a 1.2V, 90nm TSMC technology implementation for the XOR/XNOR and AND/NAND SABL gates. The results for 2/3/4 AND and XOR operations are shown in Table 3 , and partially included in Fig. 5 . As can be seen in Table 3 , delay, power and PDP increase with the number of inputs, as expected. The best values are for single gates, with 3 (case 3-b) or 4 (case 4-c) fan-ins. In the latter case, the reduction in PDP was 22% with regard to case 4-b, which had 2 transistors more. When implementing more than 4-input functions, however, the results in Fig. 5 show different power, delay and PDP values depending on the number of levels and the combination of the 2/3/4- input gates used. As our main priorities were area and power reduction rather than delay according to area occupation, the best solution for each case is highlighted in Fig. 5 . 6E. Tena-Sánchez and A. J. Acosta in1 in2 in3 in1 in2 in3 out out 2IN 2IN 3IN 4IN in1 in2 in3 in4 out 2IN 2IN 2IN 2IN in1 in2 in3 in4 out in5 2IN 2IN in5 out in1 in2 in3 3IN in4 in5 out in1 in2 in3 3IN in4 3IN 2IN in5 in5 out in1 in2 in3 3IN in4 3IN in6 3IN in7 4-Input Function 3-Input Function 5-Input Function 6-Input Function 7-Input Function a) 36 trans. PDPAND=4.09 (fJ) PDPXOR=3.71 (fJ) in1 in2 in3 in4 4IN out b) 26 trans. PDPAND=2.12 (fJ) PDPXOR=2.07 (fJ) a) 54 trans. PDPAND=6.37 (fJ) PDPXOR=5.81 (fJ) b) 44 trans. PDPAND=5.93 (fJ) PDPXOR=5.60 (fJ) c) 42 trans. PDPAND=4.57 (fJ) PDPXOR=4.51 (fJ) a) 72 trans. PDPAND=12.84 (fJ) | PDPXOR=11.73 (fJ) b) 62 trans. PDPAND=8.89 (fJ) | PDPXOR=8.40(fJ) c) 52 trans. PDPAND=8.48 (fJ) | PDPXOR=8.30 (fJ) d) 60 trans. PDPAND=10.10 (fJ)| PDPXOR=9.72 (fJ) a) 90 trans. PDPAND=16.05 (fJ) PDPXOR=14.66 (fJ) b) 80 trans. PDPAND=11.57 (fJ) PDPXOR=10.89 (fJ) c) 70 trans. PDPAND=9.73 (fJ) PDPXOR=9.32 (fJ) d)78 trans. PDPAND=13.65 (fJ) PDPXOR=13.04 (fJ) e) 68 trans. PDPAND=12.93 (fJ) PDPXOR=12.71 (fJ) a) 108 trans. PDPAND=19.26 (fJ) PDPXOR=17.59 (fJ) b) 98 trans. PDPAND=19.94 (fJ) PDPXOR=18.63 (fJ) c) 88 trans. PDPAND=17.37 (fJ) PDPXOR=16.44 (fJ) d) 78 trans. PDPAND=12.72 (fJ) PDPXOR=12.44 (fJ) e) 84 trans. PDPAND=18.29 (fJ) PDPXOR=18.05 (fJ) 2IN 2IN 2IN in1 in2 in3 in4 out in1 in2 in3 3IN in4 out 2IN 2IN 2IN in1 in2 in3 in4 out 2IN in5 in6 3IN 2IN in5 out in1 in2 in3 3IN in4 3IN in6 2IN 2IN 2IN in1 in2 in3 in4 out 2IN in5 in6 2IN 4IN in1 in2 in3 in4 outin5 3IN in6 4IN in1 in2 in3 in4 out 2IN 2IN in5 in6 2IN 2IN 2IN 2IN in1 in2 in3 in4 out 2IN in5 in6 2IN in7 2IN 2IN in2 in3 in4 2IN in5 in6 3IN in1 2IN out in7 2IN in5 in1 in2 in3 3IN in4 3IN in6 2IN out in7 4IN in1 in2 in3 in4 out in5 in6 in7 4IN FIGURE 5 Different implementations posibilities of +2-input logic functions using 2/3/4-input gates. The area-optimized solutions are highlighted. For implementations with more than 4 fan-ins, the best option is to use a two-level cascade of 3/4-input gates, which offers a trade-off between delay and power consumption depending on the combination of gates used. In the case of a 6-input function, for instance, the smallest 68-transistor implementation using 4-input and 3-input gates (e) is not the one with the best PDP value. This is because the delay is much higher than in case (c), which corresponds to a 70-transistor implementation using 3-input and 2-input gates. However, power consumption in case (e) was 12% lower than that in case (c), so the PDP is worse than in case (c). Since in secure applications the lowest possible area and power consumption take priority over high operating frequencies, the option chosen for the 6-input gate implementation was (e). For 7-input functions, the option with fewer transistors and less PDP coincides in case (d). Finally, Table 4 shows the different gates selected for optimum implementation (2, 3 or 4 fan-in gates) and the total number of transistors used for each implementation up to 7-input gates. It is important to note that the best solutions up to 7-input gates are implemented at two logic levels, using 3/4-input gates, but excluding 2-input gates, except for 2-input functions. 3 IMPACT OF LOGIC OPTIMIZATION TECHNIQUES ON CRYPTOGRAPHIC IMPLEMENTATIONS Logic optimization procedures can usually be followed by most EDA synthesis tools that optimize power-area-delay figures for general purpose ASICs. However, design optimization of full-custom DPL circuits is not possible in EDA tools and, more E. Tena-Sánchez and A. J. Acosta 7 TABLE 3 Characterization results of different cases in Fig.5 for AND/NAND and XOR/XNOR SABL gates in a 90nm TSMC technology. Gate Fan-in Case Trans. Avg. Delay (𝑝s) Avg. Power (𝜇W) PDP (𝑓J) AND 2 a) 18 210 5.094 1.070 3a) 36 402 10.176 4.088 b) 26 317 6.695 2.119 4 a) 54 420 15.167 6.370 b) 44 508 11.669 5.929 c) 42 487 9.382 4.573 XOR 2 a) 18 200 4.887 0.977 3a) 36 380 9.764 3.710 b) 26 310 6.689 2.074 4 a) 54 400 14.525 5.810 b) 44 490 11.424 5.598 c) 42 480 9.403 4.513 TABLE 4 Final transistor count for gates Gate 2-In Gates 3-In Gates 4-In Gates No. of Transistors 2-Input 1 0 0 18 3-Input 0 1 0 26 4-Input 0 0 1 42 5-Input 0 2 0 52 6-Input 0 1 1 68 7-Input 0 3 0 78 importantly, such tools do not consider the most important aspect that needs to be addressed in cryptocircuits: security. Habitually used optimization techniques may have negative or positive effects on the security of the implemented functions against SCAs. As stated in17, multibit CPA attacks focus on the power consumption caused by the simultaneous switching of multiple output signals. Increased misalignment in the output arrivals may therefore increase the security of the circuit against that kind of attack. As logic minimization techniques and the use of wide fan-in gates can vary the data propagation delays and power consumption of the resultant circuit, both effects were analyzed independently. 3.1 Effects of Logic Minimization Logic minimization of multiple-input, multiple-output combinational functions can be performed considering outputs independently, as shown in Fig.6 -a, or combining outputs, as shown in Fig.6 -b. In the latter case, the two marked gates in case 𝑎are shared, producing the marked gate in case 𝑏. Dynamic power consumption (𝑃) of a given gate can be approximated by: 𝑃=𝛼⋅𝐶𝐿⋅𝑓𝐶𝐿𝐾 ⋅𝑉 𝑑𝑑2(2) where 𝛼is the switching activity, 𝐶𝐿the load capacitance, 𝑓𝐶𝐿𝐾 the clock frequency and 𝑉 𝑑𝑑 the supply voltage. Comparing power consumption in the examples in Fig.6 -a and 6 -b, both 𝑓𝐶𝐿𝐾 ,𝑉 𝑑𝑑 are the same. Since both implementations use DPL 8E. Tena-Sánchez and A. J. Acosta AND AND XOR y0 y1 AND AND SHARING XOR AND AND XOR x1 x2 x3 x4 y0 x1 x2 x3 x4 x5 x6 x7 x8 y1 AND AND XOR B x1 x2 x1 x0 XOR y2 AND x1 x0 AND AND x5 x6 x7 x8 XOR y2 B B’ a) b) FIGURE 6 Logic minimization example. AND AND XOR y0 y1 AND AND x1 x2 x3 x4 x5 x6 x8 x9 F AND AND XOR x1 x2 x1 x0 XOR y2 a) b) AND AND XOR AND3 AND x1 x2 x3 x4 x5 x6 x7 x8 F’ AND AND XOR x1 x2 x1 x0 XOR y2 AND x7 G x7 FAN-IN y0 y1 H H FIGURE 7 Wide fan-in example. gates, 𝛼= 1.𝐶𝐿is thus the only parameter affecting power that depends on the implementation. The total power consumption of the implementation in Fig.6 -a gives eq. 3: 𝑃𝑎= 2 ⋅𝑃𝐵+𝑃𝑟𝑒𝑠𝑡 (3) being in case of Figure 6 -b: 𝑃𝑏=𝑃𝐵′+𝑃𝑟𝑒𝑠𝑡 (4) where 𝑃𝐵,𝑃𝐵′, and 𝑃𝑟𝑒𝑠𝑡 are the power consumption values for gates 𝐵,𝐵′and all the others, respectively. Power consumption after logic minimization is lower if 𝑃𝐵′<2⋅𝑃𝐵. Since the increment in 𝐶𝐿for 𝐵′output is lower than the power gain after removing one gate, power is reduced after logic minimization. Propagation delay (𝑡𝑝) is directly proportional to 𝐶𝐿, depending on the input capacitance of the next stage, parasitic drain/bulk and wiring capacitances. As the 𝐵′gate in case 𝑏feeds two XOR gates, while the two 𝐵gates in case 𝑎feed one XOR gate, the delay at 𝐵′is higher than at 𝐵because 𝐶𝐿_𝐵′> 𝐶𝐿_𝐵. This means that, in case 𝑎, outputs 𝑦0_𝑎,𝑦1_𝑎and 𝑦2_𝑎switch simultaneously (𝑡𝑝𝑦0_𝑎≈𝑡𝑝𝑦1_𝑎≈𝑡𝑝𝑦2_𝑎), while, in case 𝑏, outputs 𝑦0_𝑏and 𝑦1_𝑏switch later than 𝑦2_𝑏, with 𝑡𝑝𝑦0_𝑏≈𝑡𝑝𝑦1_𝑏> 𝑡𝑝𝑦2_𝑏. Whenever the use of logic minimization techniques produce misalignment in the output signals - that is to say, where the CPA attack is focused - the security level of the resulting circuit will be increased. The higher the number of unsynchronized output signals, the less effective the attacks will be, thus making the circuit more resilient to CPA attacks17. 3.2 Wide Fan-In Effects To quantify the use of different fan-in gates, let us start by analyzing power consumption in cases 𝑎and 𝑏in Fig. 7 . Dynamic power consumption in case 𝑎can be approximated as: 𝑃𝑎=𝑃𝐹+𝑃𝐺+𝑃𝑟𝑒𝑠𝑡 (5) being in case 𝑏: 𝑃𝑏=𝑃𝐹′+𝑃𝑟𝑒𝑠𝑡 (6) where 𝑃𝐹,𝑃𝐺,𝑃𝐹′and 𝑃𝑟𝑒𝑠𝑡 are the power consumption of gates 𝐹,𝐺,𝐹′and all the others, respectively. This means that 𝑃𝑎> 𝑃𝑏if 𝑃𝐹+𝑃𝐺> 𝑃𝐹′. As demonstrated in Section 2, the power consumption of a 3-input operation is lower when using a 3-input gate instead of a combination of two 2-input gates. Using wide fan-in gates therefore reduces power consumption. Analysis of the propagation delay shows that 𝑦0and 𝑦1switch simultaneously in both cases, 𝑎and 𝑏, (𝑡𝑝𝑦0_𝑎≈𝑡𝑝𝑦1_𝑎≈ 𝑡𝑝𝑦0_𝑏≈𝑡𝑝𝑦1_𝑏). With 𝑦2we lead to different propagation delays. For case 𝑎: 𝑡𝑝𝑦2_𝑎=𝑡𝑝𝐹+𝑡𝑝𝐺+𝑡𝑝𝐻(7) E. Tena-Sánchez and A. J. Acosta 15 References 1. R. Mahmoud, T. Yousuf, F. Aloul, and I. Zualkernan, "Internet of things (IoT) security: Current status, challenges and prospective measures”, In 10th International Conference for Internet Technology and Secured Transactions (ICITST’15), pp. 336-341, Dec. 2015. 2. A. Shahverdi, M. Taha and T. Eisenbarth, "Lightweight Side Channel Resistance: Threshold Implementations of Simon," In IEEE Transactions on Computers, vol. 66, no. 4, pp. 661-671, April 2017. 3. J. M. Mora-Gutiérrez, C. J. Jiménez-Fernández, and M. Valencia-Barrero, "Trivium hardware implementations for power reduction", Int. Journal on Circuit Theory and Applications, vol. 45, no. 2, pp. 188-198, Feb. 2017. 4. B. Schneier, Applied Cryptography: Protocols, Algorithms, and Source Code in C, Wiley, 2nd edition, 1996. 5. S. Mangard, E. Oswald, and T. Popp, Power Analysis Attacks: Revealing the Secrets of Smart Cards, Springer, 2007. 6. P. Kocher, "Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, Other Systems", Proc. of International Cryptology Conference (CRYPTO’96), pp. 104-113, 1996. 7. P. Kocher, J. Jaffe, and B. Jun, "Differential Power Analysis", Proc. of International Cryptology Conference (CRYPTO’99), pp. 388-397, 1999. 8. Y. Hayashi, N. Homma, T. Mizuki, T. Aoki, H. Sone, L. Sauvage, and J.L. Danger, "Analysis of Electromagnetic Information Leakage From Cryptographic Devices With Different Physical Structures", IEEE Transactions on Electromagnetic Compatibility, vol. 55, no. 3, pp. 571-580, Jun. 2013. 9. D. Bellizia, M. Djukanovic, G. Scotti, and A. Trifiletti, "Template attacks exploiting static power and application to CMOS lightweight crypto-hardware", Int. Journal on Circuit Theory and Applications, vol. 45, no. 2, pp. 229-241, Feb. 2017. 10. A. J. Acosta, T. Addabbo, and E. Tena-Sánchez, "Embedded electronic circuits for cryptography, hardware security and true random number generation: an overview”, Int. Journal on Circuit Theory and Applications, vol. 45, no. 2, pp. 145-169, Feb. 2017. 11. K. Mai, "Side Channel Attacks and Countermeasures", In: Tehranipoor M., Wang C. (eds) Introduction to Hardware Security and Trust, Springer, New York, 2012. 12. T. Güneysu, and A. Moradi. "Generic side-channel countermeasures for reconfigurable devices", International Workshop on Cryptographic Hardware and Embedded Systems (CHES’11), pp. 33-48, 2011. 13. L. Goubin, and J. Patarin, "DES and differential power analysis the "duplication" method". In International Workshop on Cryptographic Hardware and Embedded Systems (CHES’99), pp. 158-172, Aug. 1999. 14. M. L. Akkar, and C. Giraud, "An implementation of DES and AES, secure against some attacks”, In International Workshop on Cryptographic Hardware and Embedded Systems (CHES’01), pp. 309-318, May 2001. 15. O. Reparaz, B. Bilgin, S. Nikova, B. Gierlichs, and I. Verbauwhede, "Consolidating masking schemes”, In Annual Cryptology Conference, pp. 764-783, Aug. 2015. 16. X. Duan, Q. Cui, S. Wang, H. Fang and G. She, "Differential power analysis attack and efficient countermeasures on PRESENT", IEEE International Conference on Communication Software and Networks (ICCSN’16), pp. 8-12, 2016. 17. I. Levi, O. Keren, and A. Fish, "Data-dependent delays as a barrier against power attacks," IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 62, no. 8, pp. 2069-2078, 2015. 18. K. Tiri, and I. Verbauwhede, "A logic level design methodology for a secure DPA resistant ASIC or FPGA implementation," Proc. of Design, Automation & Test in Europe Conference & Exhibition (DATE’04), pp. 246-251, 2004. 19. M. W. Allam, and M. I. Elmasry, "Dynamic current mode logic (DyCML): A new low-power high-performance logic style", IEEE Journal of Solid-State Circuits, vol. 36, no. 3, pp. 550-558, Mar. 2001. 16 E. Tena-Sánchez and A. J. Acosta 20. I. Hassoune, F. Macé, D. Flandre, and J.-D. Legat, "Low-swing current mode logic (LSCML): A new logic style for secure and robust smart cards against power analysis attacks", Microelectronics Journal, vol. 37, no. 9, pp. 997-1006, Sept. 2006. 21. K. Tiri, M. Akmal, and I. Verbauwhede, "A Dynamic and Differential CMOS Logic with Signal Independent Power Consumption to Withstand Differential Power Analysis on Smart Cards", Proc. of European Solid-State Circuits Conference (ESSCIRC’02), pp. 403-406, 2002. 22. M. Bucci, L. Giancane, R. Luzzi, and A. Trifiletti, "Three-phase dual-rail pre-charge logic", Proc. of International Workshop on Cryptographic Hardware and Embedded Systems (CHES’06), pp. 232-241, 2006. 23. M. Bucci, L. Giancane, R. Luzzi, G. Scotti, and A. Trifiletti, "Delay-Based Dual-Rail Precharge Logic", IEEE Transactions on Very Large Scale Integration (VLSI) Systems, vol. 19, no.7, pp. 1147-1153, July 2011. 24. D. Suzuki, and M. Saeki. "Security Evaluation of DPA Countermeasures Using Dual-Rail Pre-charge Logic Style," Proc. of International Workshop on Cryptographic Hardware and Embedded Systems (CHES’06), pp. 255-269, 2006. 25. E. Tena-Sánchez, J. Castro, and A. J. Acosta, "A Methodology for Optimized Design of Secure Differential Logic Gates for DPA Resistant Circuits," IEEE Journal on Emerging and Selected Topics in Circuits and Systems, vol. 4, no. 2, pp. 203-215, Jun. 2014. 26. K. Tiri, and I. Verbauwhede. "Design method for constant power consumption of differential logic circuits."Proc. of Design, Automation & Test in Europe Conference & Exhibition (DATE’05), pp.628-633, 2005. 27. F. Macé, F-X. Standaert, and J-J. Quisquater, "Information Theoretic Evaluation of Side-Channel Resistant Logic Styles", Proc. of International Workshop on Cryptographic Hardware and Embedded Systems (CHES’07), pp 427-442, 2007. 28. K. M. Chu and D. L. Pulfrey, "Design procedures for differential cascode voltage switch circuits", IEEE Journal of Solid- State Circuits, vol. 21, no. 6, pp. 1082-1087, Dec. 1986. 29. Third Generation Partnership Project, "3GPP TS 35.202 version 7.0.0 Release 6, Specification of the 3GPP confidentiality and integrity algorithms; Document 2: KASUMI specification", ETSI/SAGE, 2007. 30. E. Tena-Sánchez, A. J. Acosta, and J. Núñez, "Secure Cryptographic Hardware Implementation Issues for High-Performance Applications", Int. Workshop on Power and Timing Modeling, Optimization and Simulation (PATMOS’16), Sept. 2016. 31. K. Tiri, D. Hwang, A. Hodjat, B. C. Lai, S. Yang, P. Schaumont, and I. Verbauwhede, "Prototype IC with WDDL and differential Routing - DPA resistance assessment," Proc. of International Workshop on Cryptographic Hardware and Embedded Systems (CHES’05) , pp. 354-365, 2005.