A Lightweight White-Box Symmetric Encryption Algorithm Against Node Capture for Wsns †
Total Page:16
File Type:pdf, Size:1020Kb
Sensors 2015, 15, 11928-11952; doi:10.3390/s150511928 OPEN ACCESS sensors ISSN 1424-8220 www.mdpi.com/journal/sensors Article A Lightweight White-Box Symmetric Encryption Algorithm † against Node Capture for WSNs Yang Shi, Wujing Wei and Zongjian He * School of Software Engineering, Tongji University, No.4800 Cao’An Highway, Shanghai 201804, China; E-Mails: [email protected] (Y.S.); [email protected] (W.W.) † This paper is an extended version of the paper entitled “A Lightweight White-box Symmetric Encryption Algorithm against Node Capture for WSNs”, presented at IEEE WCNC 2014, Istanbul, Turkey, 6–9 April 2014. * Author to whom correspondence should be addressed; E-Mail: [email protected]; Tel./Fax: +86-21-6958-9840. Academic Editor: Leonhard M. Reindl Received: 26 February 2015 / Accepted: 8 May 2015 / Published: 21 May 2015 Abstract: Wireless Sensor Networks (WSNs) are often deployed in hostile environments and, thus, nodes can be potentially captured by an adversary. This is a typical white-box attack context, i.e., the adversary may have total visibility of the implementation of the build-in cryptosystem and full control over its execution platform. Handling white-box attacks in a WSN scenario is a challenging task. Existing encryption algorithms for white-box attack contexts require large memory footprint and, hence, are not applicable for wireless sensor networks scenarios. As a countermeasure against the threat in this context, in this paper, we propose a class of lightweight secure implementations of the symmetric encryption algorithm SMS4. The basic idea of our approach is to merge several steps of the round function of SMS4 into table lookups, blended by randomly generated mixing bijections. Therefore, the size of the implementations are significantly reduced while keeping the same security efficiency. The security and efficiency of the proposed solutions are theoretically analyzed. Evaluation shows our solutions satisfy the requirement of sensor nodes in terms of limited memory size and low computational costs. Keywords: wireless sensor networks; white-box attack contexts; node capture; symmetric encryption algorithms Sensors 2015, 15 11929 1. Introduction Wireless Sensor Networks (WSNs) are often deployed in hostile environments such as wide forests and public parking lots. In addition, data are transmitted using wireless networks over the air. Therefore, security measures such as how to prevent eavesdropping of private information are critical. Furthermore, the sensor nodes are also subject to be captured and surreptitiously used by an adversary [1,2]. If a WSN node is captured by an adversary, the adversary can then easily extract cryptographic primitives and obtain unlimited access to the information stored in the node’s memory chips, with the potential to cause substantial damage to the entire system. This process can be achieved by using reverse engineering followed by probing techniques that require access to the chip level components of the device [3,4]. Symmetric encryption is one of the most important cryptographic primitives. Unfortunately, the standard design and implementation of symmetric encryption algorithms are not intended to be applied in environments where their execution could be observed. In fact, standard cryptographic models assume that endpoints (e.g., hosts or sensor nodes) can be fully trusted. However, if the endpoints are deployed in potentially hostile environments and are captured, the cryptographic keys may be directly visible to the attackers. By actively monitoring standard cryptographic functions or memory dumps, attackers are able to extract the keys. This is a critical security risk for the WSN system. To build a secure system based on WSNs, we must come up with a countermeasure against the threat of node capture. From the viewpoint of security research, an outdoor WSN node captured by an attacker is in a typical white-box attack context (WBAC). As is well known, secure computing in a white-box attack context is very challenging, because WBAC assumes that fully-privileged attackers share the same host with cryptographic software, and have complete access to the implementation of the cryptographic algorithms. What is worse, dynamic execution (with instantiated cryptographic keys) can also be observed; and the internal details of cryptographic algorithms are completely visible and alterable [5,6]. The objective of this work is to design a novel lightweight symmetric encryption algorithm for wireless sensor networks against node capture attacks. With the help of our algorithm, even though the sensor nodes are captured by an adversary, i.e., in a typical white-box context, the cryptographic keys are still safe and cannot be compromised. In recent years, researchers have proposed some white-box encryption algorithms that intend to provide practical protection for software implemented on a non-trustable host. However, they cannot be directly applied for WSN nodes. This is because existing algorithms have strong requirements in terms of memory footprint and computation power. Unfortunately, the sensor nodes in WSN are a typical resource-constrained environment. The limited memory and CPU resource cannot afford to run the existing algorithms. For example, almost all of existing white-box encryption algorithms, such as [5–9], require at least 752 KB of memory to store lookup tables, but the size of the internal memory of a node is usually only 512 KB or even less, which is a crucial restriction of white-box encryption algorithms. To the best of our knowledge, there is only one published white-box encryption algorithm with small size of lookup table [10]. It needs only about 148.625 KB to store the static data. However, this white-box encryption algorithm can still be improved in both security and complexity. Motivated by the security challenge of node capture on resource limited nodes of sensor networks, we provide a lightweight white-box encryption algorithm for symmetric cryptography primitives to prevent Sensors 2015, 15 11930 node capture attacks. The white-box encryption algorithm can maintain a relatively high security level in white-box attack contexts. The design objectives of our algorithm are as follows: ● Low memory requirements. ● Low computational costs. ● Node-compromise resilience. The contribution of this paper can be summarized as follows: We propose a class of white-box encryption algorithms that obfuscates the block cipher SMS4, which is immune from various attack methods in the black-box model. Secondly, new obfuscation techniques are used to enhance the difficulty of attack. Therefore, our algorithms are also immune from the three known effective attack methods [11–13] against white-box encryption algorithms based on the substitution permutation network. Finally, intensive security analysis and measurement of the proposed algorithms are also provided. The remainder of this paper is organized as follows: First, a brief review of existing white-box encryption algorithms is presented in Section 2. Then, the design of a new white-box symmetric encryption algorithm is provided in Section 3. The time complexity, size and security of our algorithm are then analyzed in Section 4. Two methods for further improvement of the white-box SMS4 are discussed in Section 5. In Section 6, we compare the proposed algorithms with existing ones to demonstrate its advantages. In Section 7, we analyze why the proposed algorithms are secure against white-box attacks and side-channel attacks. Finally, the article concludes with a discussion of the findings. Note that the terms “white-box encryption algorithm” and “white-box implementation of an encryption algorithm” are used interchangeably throughout the paper. Note that this paper is an extended version of [14]. A summary of differences of this paper and the previous version is as follows. (1) The (conference version of the) white-box SMS4 algorithm is slightly revised to improve the performance. (2) Two new methods on further improve the white-box SMS4 are provided in Section 5. One is about security-efficiency trade-off and an aggressive implementation for performance sensitive scenarios, the other is about a strong implementation using non-standard S-Boxes for security sensitive scenarios. The strong white-box SMS4 is immune from all known attacks and possible adaptations. (3) A new section “7. Security against white-box attacks and side-channel attacks” is added. Analyses on security against known white-box attacks are extended, especially on an attack that is published after the conference paper is accepted. Analyses on security against side-channel attacks are included in this version. (4) To further explain existing research on design and implementation of white-box encryption algorithms, we added a new section “2. Review on White-box Encryption Algorithms”. Results of corresponding cryptanalysis are also presented in this section. (5) In Section 3, we fleshed out the description of the white-box SMS4 algorithm. Some figures (Figures 1–4) are provided to make the description more clear than the conference version. (6) Comparisons with other methods are extended and refined. Sensors 2015, 15 11931 2. Review of White-Box Encryption Algorithms Existing research on white-box cryptography has focused on white-box implementations of classical symmetric encryption algorithms, such as DES and AES. Chow et al. [5] proposed a white-box implementation of DES by interleaving affine transformations and using de-linearization techniques.