<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Side-channel Resistant Implementations of a Novel Lightweight Authenticated Cipher with Application to Hardware Security</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>06/22/2021</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10299085</idno>
					<idno type="doi">10.1145/3453688.3461761</idno>
					<title level='j'>GLSVLSI '21: Proceedings of the 2021 on Great Lakes Symposium on VLSI</title>
<idno></idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Abubakr Abdulgadir</author><author>Sammy Lin</author><author>Farnoud Farahmand</author><author>Jens-Peter Kaps</author><author>Kris Gaj</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Lightweight authenticated ciphers are crucial in many resource-constrained applications, including hardware security. To protect Intellectual Property (IPs) from theft and reverse-engineering, multiple obfuscation methods have been developed. An essential component of such schemes is the need for secrecy and authenticity of the obfuscation keys. Such keys may need to be exchanged through the unprotected channels, and their recovery attempted using side-channel attacks. However, the use of the current AES-GCM standard to protected key exchange requires a substantial area and power overhead. NIST is currently coordinating a standardization process to select lightweight algorithms for resource-constrained applications. Although security against cryptanalysis is paramount, cost, performance, and resistance to side-channel attacks are among the most important selection criteria. Since the cost of protection against side-channel attacks is a function of the algorithm, quantifying this cost is necessary for estimating its cost and performance in real-world applications. In this work, we investigate side-channel resistant lightweight implementations of an authenticated cipher TinyJAMBU, one of ten finalists in the current NIST LWC standardization process. Our results demonstrate that these implementations achieve robust security against side-channel attacks while keeping the area and power consumption significantly lower than it is possible using the current standards.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">INTRODUCTION</head><p>To protect the intellectual property (IP) from being reverse engineered and misused by any participant of the manufacturing supply chain, various forms of hardware obfuscation have been developed. Obfuscation is the process of hiding the true functionality of an integrated circuit (IC). This functionality remains incorrect without the knowledge of a special key called an obfuscation key. The obfuscation key needs to be protected using cryptographic methods when this key is sent from the Authentication Server to an obfuscated IC during activation. The role of the Authentication Server can also be played by a trusted chip physically attached to an untrusted chip during packaging in the trusted facility. In <ref type="bibr">[2]</ref>, Communication and Obfuscation Management Architecture (COMA) has been proposed to handle secure and efficient distribution of obfuscation keys. The crucial component of this architecture is a hardware implementation of an authenticated cipher protected against side-channel attacks. This authenticated cipher must be trusted, but its implementation should introduce the smallest possible overhead in terms of area and power. In cryptography, trust comes from standardization. Until now, the only standardized authenticated cipher suitable for the protection of obfuscation keys is AES-GCM.</p><p>However, in 2018, as a response to the increasing need for lightweight cryptography (LWC) solutions, the U.S. National Institute of Standards and Technology (NIST) started an effort to select and standardize additional algorithms. In March 2021, NIST announced ten algorithms as finalists of this process. For such a selection process, security and software efficiency are usually the major criteria in the first rounds, with concentration shifting toward hardware and security against side-channel analysis (SCA) in the final rounds. One of the finalists that distinguished itself from others in terms of the minimal area, power, and energy usage is TinyJAMBU <ref type="bibr">[13]</ref>.</p><p>In this paper, we investigate the suitability and advantages of using TinyJAMBU instead of AES-GCM to protect obfuscation keys. As a part of this evaluation, we develop the first reported hardware implementation of TinyJAMBU protected against sidechannel attacks (SCAs).</p><p>One of the most serious SCAs is Differential Power Analysis (DPA) <ref type="bibr">[11]</ref>. In this attack, an adversary collects several power traces from the device performing a cryptographic function and uses statistical distinguishers to reveal sensitive information such as secret keys. First-order DPA exploits leakage that appears in the first-order statistical moment. On the other hand, high-order DPA uses leakage in high-order statistical moments. Implementations protected against dth-order DPA can be broken using d+1-order DPA. However, the number of leakage traces needed increases exponentially with respect to d <ref type="bibr">[4]</ref>.</p><p>The power and the practicality of DPA fueled a focus on countermeasures since the time the attack was published. Among existing countermeasures, masking style countermeasures, such as Threshold Implementations (TI) <ref type="bibr">[15]</ref> and Domain Oriented Masking (DOM) <ref type="bibr">[9]</ref>, are provably secure under certain assumptions. In this work, we utilize the DOM scheme, which can be used to implement ciphers that are synthesizable for an arbitrary protection order. This is useful in providing flexible designs that adapt to the needs of applications with different levels of security and, at the same time, maintain a single code base.</p><p>In particular, we present a flexible SCA-protected hardware design of TinyJAMBU that can be synthesized for arbitrary order of protection utilizing the DOM countermeasure. The implementations can trade area for performance. We then show the advantages of this solution, as compared to the use of the existing standard AES-GCM, to protect obfuscation keys in COMA.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">BACKGROUND 2.1 TinyJAMBU</head><p>TinyJAMBU <ref type="bibr">[17]</ref> is a NIST LWC finalist designed to perform authenticated encryption. TinyJAMBU is a lightweight variant of JAMBU, a CAESAR Round-3 candidate that has a small footprint.</p><p>Figure <ref type="figure">1</ref> shows the data flow in TinyJAMBU. The TinyJAMBU-128 variant has a 128-bit state and uses a 128-bit key, 96-bit nonce, and 64-bit tag. The data (associated data and plaintext/ciphertext) is processed in 32-bit blocks. To update its state, TinyJAMBU uses a keyed permutation based on a Nonlinear Shift Register (NLFSR) as shown in Figure <ref type="figure">2</ref>. To perform the permutation, the NLFSR is updated by calculating the feedback bit(s) as a function of the state and the key. Then the state register is shifted to the right. Depending on how the permutation is implemented, multiple feedback bits can be calculated in parallel.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Domain Oriented Masking</head><p>Hardware implementations of cryptography can leak information as a result of glitches <ref type="bibr">[12]</ref>. The Domain-Oriented Masking (DOM) <ref type="bibr">[10]</ref> countermeasure is designed to provide security in the presence of glitches, and, at the same time, implementations can be synthesized for arbitrary order of protection.</p><p>Similar to traditional Boolean masking, sensitive data is split into shares. For example &#119909; is split into &#119909; 0 and &#119909; 1 , such that &#119909; = &#119909; 0 &#8853; &#119909; 1 . DOM, however, introduces the concept of share domains, where each share of a variable is associated with a domain. For example, &#119909; 0 and &#119910; 0 can be associated with Domain0 and &#119909; 1 and &#119910; 1 can be associated with Domain1. The data in each domain is kept independent from other domains. If data from different domains must mix (e.g., in non-linear operations), precautions are taken to preserve the Independence. These precautions include adding randomness and using synchronization registers to stop glitches.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">METHODOLOGY</head><p>We used the unprotected hardware implementation of TinyJAMBU at <ref type="bibr">[3]</ref> as baseline to implement our SCA-resistant implementation. This design uses the RTL methodology which provides cycleaccurate operation simplifying side-channel protection. We employ the DOM countermeasure to build a TinyJAMBU implementation that can be synthesized for arbitrary order of protection only by setting a single configuration parameter d.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Unprotected Implementation</head><p>The lightweight hardware implementation of TinyJAMBU at <ref type="bibr">[3]</ref> has a very small footprint requiring only 591 LUTs in Artix7 FPGA and at the same time provides a throughput of 250 Mbps. Our hypothesis, which is later confirmed by concrete results, is that we can implement high-order DPA resistant implementations of TinyJAMBU and still keep the implementation lightweight.</p><p>The baseline implementation is fully compatible with the LWC Hardware API. This enables direct comparison with other LWC candidates that adhere to the same API. Data communication with the outside world is performed in 32-bit words, which are equal to the block size, yielding an efficient design. The CipherCore is composed of a datapath, shown in Figure <ref type="figure">3</ref>, which handles all computations, and a control Finite State Machine (FSM), which sequences the operations and controls data communication. The NLFSR is designed to be capable of computing between 1 and 32 feedback bits in one clock cycle. This value can be selected during synthesis using a parameter N. The implementation works as follows: The key is accepted 32-bits at a time and stored internally in a shift register. Afterward, the nonce is accepted, and the initialization phase is completed. The associated data is absorbed in 32-bits and used to update the state. On encryption, the plaintext is absorbed and, at the same time, the ciphertext is generated. Finally the tag is generated. When performing decryption, the ciphertext is absorbed and plaintext is produced. Finally, the tag is calculated and compared to the expected tag, and the status code is emitted based on the comparison outcome.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Protected Implementations</head><p>Building on the unprotected design described above, we developed a protected design that can be synthesized for arbitrary order of protection using the DOM countermeasure. Our protected design is parameterized by two synthesis parameters d and N, denoting the order of protection and the number of feedback bits computed in parallel, respectively. This highly flexible design with two degrees of freedom can be synthesized to cater to various applications with different security, cost, and performance requirements and at the same time maintained in a single code base.</p><p>Figure <ref type="figure">4</ref> depicts the datapath of a first-order protected implementation. The NLFSR_pr unit is the protected version of the NLFSR used for the permutation. Depending on the protection order, the state register is duplicated as needed and also the logic needed to compute the feedback bits. The rest of the datapath, which is responsible for implementing the mode of operation and performs data selection (multiplexing), FrameBits bit addition, etc., is denoted TinyJAMBU_ops in Figure <ref type="figure">4</ref>. This component is duplicated &#119889; + 1 times, with each instance residing in a separate domain. Note that constants (FrameBits and partial block length) are added to the state only in Domain0 to avoid negating the operation.</p><p>To provide the random bits required for the DOM countermeasure, we utilize a Pseudo-Random Number Generator (PRNG) based on Trivium <ref type="bibr">[6]</ref> which is seeded using data provided through the RDI port.   Figure <ref type="figure">5</ref> shows the block diagram of a second-order protected NLFSR. This component is critical since the only non-linear component in TinyJAMBU is DOM_NAND in the NLFSR. We instantiate a DOM-dep multiplier <ref type="bibr">[9]</ref> that can be synthesized for arbitrary order instead of the AND gates in the unprotected design. We utilized the DOM-dep multiplier to avoid any leakage related to dependently The operation of the protected implementation is as follows: The state is cleared, and the seed is accepted from the RDI port and stored in a Serial-In Parallel-Out (SIPO) shift register. The PRNG is seeded and allowed to be initialized. Once the PRNG is ready, the input is accepted, and the operation proceeds similarly as in the unprotected design discussed above. The main exception is that data shares are processed in parallel by logic residing in separate domains.</p><p>Processing the shares in parallel means that the number of clock cycles to process a block remains the same as the protection order d increases, and the throughput may only be affected by minor variation in the maximum frequency of the implementation.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">RESULTS</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Countermeasure Verification</head><p>To validate the SCA resistance of our protected implementations, we utilized the Test-vector Leakage Assessment methodology (TVLA) <ref type="bibr">[8]</ref> which is widely used to determine if a cryptographic device is leaking information without performing attacks. Techniques from <ref type="bibr">[16]</ref> were utilized to perform high-order TVLA. We adopt a threshold of | &#119905; |&gt; 4.5, which indicates that DUT leaks information at a confidence level of 99.999%. We utilized the Flexible Opensource workBench fOr Side-channel analysis (FOBOS) <ref type="bibr">[1]</ref> platform, and the DUT was instantiated in a NewAE CW305 board, which is a low-noise SCA target board that uses Artix-7 (xc7a100tftg256-3) FPGA. The DUT power consumption is measured at the output of the CW305's Low-Noise Amplifier (LNA), that amplifies the voltage drop across the on-board 0.1 &#937; shunt resistor. We clocked the DUT with a low frequency of 1.25 MHz to avoid signal distortion seen at high frequencies when power consumption at adjacent clock cycles interferes with each other. A USB3-based oscilloscope (Picoscope 5000) was used to collect traces at a sampling rate of 125 MS/s and 8-bit sample resolution.</p><p>TVLA results are shown in Figure <ref type="figure">6</ref>. For the unprotected baseline design, the t values exceed the threshold, which indicates a significant leakage as expected. This leakage is observed even at only 10,000 traces. On the other hand, the TVLA for the first and secondorder protected implementations show no observable leakage even when 1 million traces are analyzed, confirming the validity of our countermeasure implementation.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Cost of Protection</head><p>It is expected that protection against side-channel analysis will come at a price in area, performance, and power consumption. Quantifying this cost is critical for a fair evaluation of candidates since the cost of protection varies among candidates. To assess the cost of protection, we benchmarked various variants of our TinyJAMBU implementation in FPGA. The benchmarking results are listed in Table <ref type="table">1</ref>. Multiple variants up to the third order of protection, with a combination of N=8, 16, and 32 are shown. Each TinyJAMBU variant in Table <ref type="table">1</ref> is parameterized with two parameters; d and N that correspond to the order of protection and the number of feedback bits calculated in parallel, respectively. For example, TinyJAMBU-d2-N32 is a second-order implementation that updates 32 bits in parallel. Table <ref type="table">1</ref> abbreviations are Max Freq. (Maximum Frequency), TP (Throughput), TP Ratio (Throughput Ratio), LUT (Lookup Table ) and Rand. Bits (Random Bits). The throughput is calculated for encryption of long messages in Mbps. We benchmarked the variants in Xilinx Artix-7 FPGA using Vivado 2020.1 for synthesis and implementation. Minerva <ref type="bibr">[7]</ref> was used to search for optimized tool settings for the maximum frequency.</p><p>We further compare with results from <ref type="bibr">[5]</ref>, where side-channel resistant variants of NIST LWC candidates COMET-CHAM and SCHWAEMM were reported. Comparison with these results can be done directly since the implementations conform to the LWC Hardware API, and results were reported for Xilinx Artix-7 FPGA. Further, the PRNG footprint is not calculated as a part of the area. We follow the same approach since there are various trade-offs in the implementation of PRNGs, which are beyond the scope of this work. Instead of reporting the PRNG area, we provide the number of bits required to calculate the N feedback bits. Each variant in Table <ref type="table">1</ref> is also compared against its unprotected baseline variant by providing the throughput and area ratios. It can be shown from Table1 that TinyJAMBU is flexible and can be efficiently protected against side-channel analysis. Also, due to its small footprint and the small size of non-linearity, one can implement high-order variants that can fit in small FPGAs. For example, the third-order TinyJAMBU-d3-N32 can easily fit in small Xilinx FPGAs such as Artix7-xc7a12tcsg325, which has 8000 LUTs. Below, we discuss our observations;</p><p>&#8226; Since we process shares in parallel, the throughput of our TinyJAMBU implementations is not significantly affected by increasing the order of protection. As shown in table <ref type="table">1</ref>, cycles per block remain the same. A minor reduction in maximum frequency as the order of protection increases is responsible for the throughput reduction. &#8226; Due to the synchronization registers in the protected NAND gates, we update the state after two clock cycles. This causes the permutation to take twice the number of clock cycles compared to the unprotected variant. Pipelining may be used to reduce the number clock cycles at the expense of increasing the number of registers.   &#8226; Due to the small size of a non-linear component, the cost of protection is low. For example, the area of the first-order variant TinyJAMBU-d1-N32 is only 2.14&#215; the unprotected baseline variant. It is noteworthy that the control logic and constant additions in the datapath are not duplicated in the protected design. &#8226; Our first-order TinyJAMBU-d1-N32 is only 15% the area of the first-order COMET-CHAM reported in <ref type="bibr">[5]</ref>, however, it can provide 2.7&#215; the throughput. &#8226; Although first-order SCHWAEMM-KSA is 2&#215; faster than our first-order TinyJAMBU-d1-N32, it has roughly 10&#215; the area. Its 12,531 LUTs size may not be suitable for small FPGAs used in lightweight applications.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Power and Energy Estimation</head><p>Power consumption and energy per bit are critical considerations for lightweight applications, especially for battery-powered devices. We provide average dynamic power and energy per bit (E/bit) estimations for Xilinx Artix7-xc7a100tftg256-3 FPGA in Table <ref type="table">3</ref>. We utilized Xeda <ref type="bibr">[14]</ref>, which provides an abstraction layer to run flows on different Electronic Design Automation (EDA) tools. In our case, Xilinx Vivado 2020.1 was run by Xeda to perform power estimation.</p><p>For result accuracy, we performed vector-based estimation, and the Switching Activity Interchange format (SAIF) files were generated by encrypting 1536 bytes of plaintext using post-route timing simulation. Average dynamic power has been estimated at 10, 50, and 100 MHz. As expected, the average dynamic power and E/bit increase as the order of protection increases. For the same variant, </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4">Use in COMA</head><p>In Table <ref type="table">2</ref>, we compare the resource utilization of three different instantiations of COMA based on three authenticated ciphers AES-GCM, ACORN, and TinyJAMBU. Out of these ciphers: AES-GCM is an existing standard; ACORN has been a second choice for use case 1, Lightweight Applications, in the CAESAR cryptographic contest conducted in the period 2014-2019; and TinyJAMBU is a finalist of the NIST LWC standardization process, currently in progress.</p><p>AEAD_EXT represents an SCA-protected implementation of an authenticated cipher, RNG is a random number generator, and the row Others covers the remaining components of COMA, described in detail in <ref type="bibr">[2]</ref>. The notation &lt;Cipher 1&gt;+&lt;Cipher 2&gt; means that &lt;Cipher 1&gt; is used for authenticated encryption and &lt;Cipher 2&gt; for the construction of a pseudorandom part of RNG (necessary to reach the required speed). The version of TinyJAMBU used to generate results for this table is TinyJAMBU-d1-N32, with the firstorder DPA countermeasures, processing 32 bits in parallel. The obtained results clearly demonstrate that the solution based on TinyJAMBU+Trivium outperforms the solution based on existing standards, AES-GCM+AES-CTR, in terms of resource utilization. In particular, for AEAD_EXT, the usage of LUTs is reduced by a factor of 2.2 and the usage of flip-flops by a factor of 3.8. When all other components, except a PUF, are taken into account, the corresponding ratios are 1.7 and 1.9. The solution based on ACORN+Trivium has slightly smaller resource utilization, but ACORN is not any longer considered for standardization due to the security concerns and long initialization time. As a result, TinyJAMBU emerges as a strong contender for protecting obfuscation keys during secure activation of integrated circuits.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">CONCLUSIONS AND FUTURE WORK</head><p>In this work, we present a design space exploration study for sidechannel resistant hardware implementations of TinyJAMBU. To achieve this goal, we implemented a flexible design that can be synthesized for an arbitrary order of protection. The implementations can trade performance for the area by configuring the level of parallelism. This design with two degrees of freedom is flexible and can be easily adapted for applications with different security, cost, and performance trade-offs. The security of our implementations has been verified up to the second order using the TVLA methodology. The benchmarking results on Xilinx Artix7 FPGA show that one can instantiate high-order implementations of TinyJAMBU in small FPGAs. Concretely, our third-order TinyJAMBU-d3-N32 variant is only 2842 LUTs and can easily fit in small FPGAs. Our conclusion is that TinyJAMBU is suitable for producing lightweight side-channel-resistant implementations of authenticated encryption. In particular, it can be used for high-speed and low-overhead protection of obfuscation keys in hardware security applications. The evaluation of other protection schemes and quantifying the associated cost and performance will be interesting for future work.</p></div></body>
		</text>
</TEI>
