A Lightweight White-Box Symmetric Encryption Algorithm against Node Capture for WSNs †
Abstract
:1. Introduction
- ●
- Low memory requirements.
- ●
- Low computational costs.
- ●
- Node-compromise resilience.
- (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)
- (6)
- Comparisons with other methods are extended and refined.
2. Review of White-Box Encryption Algorithms
3. A New White-Box SMS4 Encryption Algorithm
3.1. The SMS4 Block Cipher
3.2. Components of the White-Box Encryption Algorithm
- (1)
- Distinct representations of the cipher, especially the S-Box, are used in every T-Box table. Hence, we get more than times work factor than when only using the standard representation.
- (2)
- External encodings are used to protect the first round and the last round. Otherwise these two rounds were ‘naked’ and cast effect would help an attacker to break the white-box implementation more easily.
- (3)
- We transform the output mixing mappings of T-Box tables from linear mappings into affine mappings. This transformation would offer times work factor with the cost of 32 times 32-bit exclusive or (XOR).
3.3. The Complete White-Box Encryption Algorithm
Algorithm 1 SMS4W[K] (on input X): |
(1) (X0, X1, X2, X3) ← X |
(2) i ← 0 |
(3) n ← 1 |
(4) Zn ← Li,n (Xi+n) |
(5) n ← n + 1 |
(6) if (n <= 3) goto(4); else goto(7) |
(7) Z ← Z1 ⊕ Z2 ⊕ Z3 |
(8) Xi+4 ← TBoxi (Z) ⊕ αi ⊕ (Xi ∙ Qi) |
(9) i ← i + 1; |
(10) if (i < 32) goto(3) else goto(11) |
(11) Y ← (X32, X33, X34, X35) |
(12) output Y |
4. Analysis of the Algorithm
4.1. Security Measurement in White-Box Attack Context
4.2. Size and Efficiency
Operation | Number of Operations | Formula |
---|---|---|
Multiplication table lookup | 214 | 128 × 32 × 4 |
Byte addition | 0.875 × 210 | 128 × 7 |
(single) Bit addition | 3 × 212 | 128 × 32 × 3 |
T-Box Table lookup | ≈3 × 25 | 32 × 3 |
5. Improvements of the Algorithm
5.1. Security-Efficiency Trade-Off
5.2. A Strong Version Using Non-Standard S-Boxes
6. Comparisons with Other Methods
Algorithm | Total Size of the Lookup Tables | Efficiency | Attack | |
---|---|---|---|---|
Table Lookup and XOR | Matrix Multiplication | |||
White-box DES [1] | 4.5 MB | 192 | 0 | in [2,3,4] |
White-box DES [5] | 2.3 MB | 384 | 0 | in [3,4] |
White-box AES [6] | 752 KB | 3104 | 0 | in [7,8] |
White-box AES [9] | 20502 KB | 120 | 11 (256 × 256) | in [10] |
White-box AES [11] | 752 KB | 3104 | 0 | in [12] |
White-box SMS4 [13] | 148.625 KB | 96 | 160 (32 × 32) | in [15] |
The proposed white-box SMS4 algorithm | 144.125 KB | 372 | 128 (32 × 32) | Unknown |
The proposed aggressive white-box SMS4 algorithm | 108.1 KB | 264 | 96 (32 × 32) | Unknown |
The proposed strong white-box SMS4 algorithm | 144.125 KB | 372 | 128 (32 × 32) | Unknown |
7. Security against White-Box Attacks and Side-Channel Attacks
7.1. Threat Models and the Crux of Secure Implementations
7.2. Against known White-Box Attacks
Attack | Target | Base Algorithm | Direct Applicability | Potential Threat | ||||
---|---|---|---|---|---|---|---|---|
<1> | <2> | <3> | <4> | <5> | <6> | |||
[2] | [1] | DES | No | No | No | No | No | No |
[3] | [5] | DES | No | No | No | No | No | No |
[4] | [5] | DES | No | No | No | No | No | No |
[7] | [6] | AES | No | No | No | No | No | No |
[16] | white-box implementation for any SLT network cipher (using the design approach in [6]) | SLT network cipher | No | No | No | No | No | No |
[10] | [9] | AES | No | No | No | Yes | Yes | No |
[15] | [13] | SMS4 | No | No | No | Yes | Yes | No |
- (1)
- Obtain leaked information about the linear input encoding.
- (2)
- Find the desired linear equivalence and obtain the full linear input encoding.
- (3)
- Extract a 32-bit round key.
- (4)
- Extract four consecutive rounds and obtain the cryptographic key.
- (5)
- Extract the external input and output encodings.
- (1)
- Combine parts 2 and 3 of a round with part 1 of the next round and eliminating tabulating encodings between these two consecutive rounds.
- (2)
- Recover the linear part of each affine transformation.
- (3)
- Apply differential analysis to S-Boxes.
- (4)
- Recover the constant part of each affine transformation by solving equations.
- (5)
- Extract the round key from the implementation by solving matrix equations.
- (1)
- to perform the basic attack process that is introduced above,
- (2)
- to guess all the dual components in a round,
- (3)
- for the total 32 rounds.
7.3. Against known Side-Channel Attacks
8. Conclusions and Future Work
Acknowledgments
Author Contributions
Conflicts of Interest
References
- Laurent, E.; Virgil, D.G. A key-management scheme for distributed sensor networks. 2002. [Google Scholar] [CrossRef]
- Patrick, T.; Li, M.; Radha, P. Mitigation of Control Channel Jamming under Node Capture Attacks. IEEE Trans. Mob. Comput. 2009, 8, 1221–1234. [Google Scholar] [CrossRef]
- Tanya, R.; Shiuhpyng, S.; Shankar, S. Taxonomy of Security Attacks in Sensor Networks and Countermeasures. In Proceedings of the first IEEE International Conference on System Integration and Reliability Improvements, Hanoi, Vietnam, 13–15 December 2006; p. 94.
- Yum, D.H.; Lee, P.J. Exact Formulae for Resilience in Random Key Predistribution Schemes. IEEE Trans. Wirel. Commun. 2012, 11, 1638–1642. [Google Scholar] [CrossRef]
- Stanley, C.; Philip, A.E.; Harold, J.; Paul, C.V.O. A White-Box DES Implementation for DRM Applications; Carleton University: Ottawa, ON, Canada, 2002; pp. 1–15. [Google Scholar]
- Stanley, C.; Philip, A.E.; Harold, J.; Paul, C.V.O. White-Box Cryptography and an AES Implementation; Springer: Berlin/Heidelberg, Germany, 2002; pp. 250–270. [Google Scholar]
- Hamilton, E.L.; William, D.N. Clarifying Obfuscation: Improving the Security of White-Box DES. IEEE Comput. Soc. 2005, 679–684. [Google Scholar]
- Xiao, Y.; Lai, X. A Secure Implementation of White-Box AES. In Proceedings of the 2nd International Conference on Computer Science and its Applications, 2009 (CSA’09), Jeju, Korea, 10–12 December 2009; pp. 1–6.
- Karroumi, M. Protecting White-Box AES with Dual Ciphers. In Information Security and Cryptology—ICISC 2010; Rhee, K.-H., Nyang, D., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6829, pp. 278–291. [Google Scholar]
- Xiao, Y.; Lai, X. White-Box Cryptography and a White-Box Implementation of the SMS4 Algorithm; Shanghai Jiaotong University: Shanghai, China, 2009; pp. 24–34. [Google Scholar]
- Billet, O.; Gilbert, H.; Ech-Chatbi, C. Cryptanalysis of a White Box AES Implementation. In Selected Areas in Cryptography; Handschuh, H., Hasan, M.A., Eds.; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3357, pp. 227–240. [Google Scholar]
- Michiels, W.; Gorissen, P.; Hollmann, H.D.L. Cryptanalysis of a Generic Class of White-Box Implementations; Springer: Berlin/Heidelberg, Germany, 2008; pp. 414–428. [Google Scholar]
- De Mulder, Y.; Roelse, P.; Preneel, B. Cryptanalysis of the Xiao–Lai White-Box AES Implementation. In Selected Areas in Cryptography; Knudsen, L., Wu, H., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; Volume 7707, pp. 34–49. [Google Scholar]
- Shi, Y.; He, Z. A lightweight white-box symmetric encryption algorithm against node capture for WSNs. In Proceedings of 2014 IEEE Wireless Communications and Networking Conference (WCNC), Istanbul, Turkey, 6–9 April 2014; pp. 3058–3063.
- Matthias, J.; Dan, B.; Edward, W.F. Attacking an Obfuscated Cipher by Injecting Faults; Springer: Berlin/Heidelberg, Germany, 2002; pp. 16–31. [Google Scholar]
- Brecht, W.; Wil, M.; Paul, G.; Bart, P. Cryptanalysis of White-Box DES Implementations with Arbitrary External Encodings; Springer: Berlin/Heidelberg, Germany, 2007; pp. 264–277. [Google Scholar]
- Goubin, L.; Masereel, J.-M.; Quisquater, M. Cryptanalysis of White Box DES Implementations; Springer: Berlin/Heidelberg, Germany, 2007; pp. 278–295. [Google Scholar]
- Tolhuizen, L. Improved cryptanalysis of an AES implementation. In Proceedings of the 33rd WIC Symposium on Information Theory in the Benelux, Boekelo, The Netherlands, 24–25 May 2012.
- Shi, Y.; Lin, J.; Zhang, C. A White-Box Encryption Algorithm for Computing with Mobile Agents. J. Internet Technol. 2011, 12, 981–994. [Google Scholar]
- Hohl, F. Time Limited Blackbox Security: Protecting Mobile Agents from Malicious Hosts. In Mobile Agents and Security; Vigna, G., Ed.; Springer: Berlin/Heidelberg, Germany, 1998; Volume 1419, pp. 92–113. [Google Scholar]
- Biryukov, A.; Cannière, C.D.; Braeken, A.; Preneel, B. A Toolbox for Cryptanalysis: Linear and Affine Equivalence Algorithms; Springer: Berlin/Heidelberg, Germany, 2003; pp. 33–50. [Google Scholar]
- Lepoint, T.; Rivain, M.; de Mulder, Y.; Roelse, P.; Preneel, B. Two Attacks on a White-Box AES Implementation. In Selected Areas in Cryptography—SAC 2013; Lange, T., Lauter, K., Lisoněk, P., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; pp. 265–285. [Google Scholar]
- Lin, T.; Lai, X. Efficient attack to white-box SMS4 implementation. J. Softw. 2013, 24, 2238–2249. (In Chinese) [Google Scholar] [CrossRef]
- Diffie, W.; Ledin, G. SMS4 Encryption Algorithm for Wireless Networks. IACR Cryptol. ePrint Arch. 2008, 2008, 329. [Google Scholar]
- Liu, F.; Ji, W.; Hu, L.; Ding, J.; Lv, S.; Pyshkin, A.; Weinmann, R.-P. Analysis of the SMS4 Block Cipher. In Information Security and Privacy; Pieprzyk, J., Ghodosi, H., Dawson, E., Eds.; Springer: Berlin/Heidelberg, Germany, 2007; Volume 4586, pp. 158–170. [Google Scholar]
- Barkan, E.; Biham, E. In How Many Ways Can You Write Rijndael? In Advances in Cryptology—ASIACRYPT 2002; Zheng, Y., Ed.; Springer: Berlin/Heidelberg, Germany, 2002; Volume 2501, pp. 160–175. [Google Scholar]
- Raddum, H. More Dual Rijndaels. In Advanced Encryption Standard—AES; Dobbertin, H., Rijmen, V., Sowa, A., Eds.; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3373, pp. 142–147. [Google Scholar]
- Park, J.-Y.; Yi, O.; Choi, J.-S. Methods for practical whitebox cryptography. In Proceedings of the 2010 International Conference on Information and Communication Technology Convergence (ICTC), Jeju, Korea, 17–19 November 2010; pp. 474–479.
- Adler, R.; Flanigan, M.; Huang, J.; Kling, R.; Kushalnagar, N.; Nachman, L.; Wan, C.-Y.; Yarvis, M. Intel Mote 2: An advanced platform for demanding sensor network applications. In Proceedings of the 3rd International Conference on Embedded Networked Sensor Systems, San Diego, CA, USA, 2–4 November 2005; ACM: New York, NY, USA, 2005; pp. 298–298. [Google Scholar]
- Kim, T.; Kim, J.; Hong, S.; Sung, J. Linear and Difierential Cryptanalysis of Reduced SMS4 Block Cipher. IACR Cryptol. ePrint Arch. 2008, 281. [Google Scholar]
- Etrog, J.; Robshaw, M.B. The Cryptanalysis of Reduced-Round SMS4. In Selected Areas in Cryptography; Avanzi, R., Keliher, L., Sica, F., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5381, pp. 51–65. [Google Scholar]
- Zhang, W.; Wu, W.; Feng, D.; Su, B. Some New Observations on the SMS4 Block Cipher in the Chinese WAPI Standard. In Information Security Practice and Experience; Bao, F., Li, H., Wang, G., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5451, pp. 324–335. [Google Scholar]
- Su, B.-Z.; Wu, W.-L.; Zhang, W.-T. Security of the SMS4 Block Cipher against Differential Cryptanalysis. J. Comput. Sci. Technol. 2011, 26, 130–138. [Google Scholar] [CrossRef]
- Toz, D.; Dunkelman, O. Analysis of Two Attacks on Reduced-Round Versions of the SMS4. In Information and Communications Security; Chen, L., Ryan, M., Wang, G., Eds.; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5308, pp. 141–156. [Google Scholar]
- Choy, J.; Yap, H.; Khoo, K. An Analysis of the Compact XSL Attack on BES and Embedded SMS4. In Cryptology and Network Security; Garay, J., Miyaji, A., Otsuka, A., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5888, pp. 103–118. [Google Scholar]
- Erickson, J.; Ding, J.; Christensen, C. Algebraic Cryptanalysis of SMS4: Gröbner Basis Attack and SAT Attack Compared. In Information, Security and Cryptology—ICISC 2009; Lee, D., Hong, S., Eds.; Springer: Berlin/Heidelberg, Germany, 2010; Volume 5984, pp. 73–86. [Google Scholar]
- Wyseur, B. White-Box Cryptography. Available online: http://summerschool08.iaik.tugraz.at/slides/Brecht_wbc1_crete_final.pdf (accessed on 12 May 2015).
- Li, W.; Gu, D.; Wang, Y. Differential fault analysis on the contracting UFN structure, with application to SMS4 and MacGuffin. J. Syst. Softw. 2009, 82, 346–354. [Google Scholar] [CrossRef]
- Zhao, X.-J.; Wang, T.; Zheng, Y.-Y. Cache timing attack on SMS4. J. Commun. 2010, 6, 016. [Google Scholar]
- Wang, S.; Gu, D.; Liu, J.; Guo, Z.; Wang, W.; Bao, S. A Power Analysis on SMS4 Using the Chosen Plaintext Method. In Proceedings of the 2013 9th International Conference on Computational Intelligence and Security (CIS), Leshan, China, 14–15 December 2013; pp. 748–752.
© 2015 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Shi, Y.; Wei, W.; He, Z. A Lightweight White-Box Symmetric Encryption Algorithm against Node Capture for WSNs. Sensors 2015, 15, 11928-11952. https://doi.org/10.3390/s150511928
Shi Y, Wei W, He Z. A Lightweight White-Box Symmetric Encryption Algorithm against Node Capture for WSNs. Sensors. 2015; 15(5):11928-11952. https://doi.org/10.3390/s150511928
Chicago/Turabian StyleShi, Yang, Wujing Wei, and Zongjian He. 2015. "A Lightweight White-Box Symmetric Encryption Algorithm against Node Capture for WSNs" Sensors 15, no. 5: 11928-11952. https://doi.org/10.3390/s150511928
APA StyleShi, Y., Wei, W., & He, Z. (2015). A Lightweight White-Box Symmetric Encryption Algorithm against Node Capture for WSNs. Sensors, 15(5), 11928-11952. https://doi.org/10.3390/s150511928