Abstract
Proposed in CT-RSA’2017, WEM is a family of white-box block ciphers based on the Even-Mansour structure and AES. Due to its elegant structure and impressive performance, WEM is a prominent primitive in white-box cryptography-oriented scenarios like digital rights management (DRM) and mobile payment. In this paper, we focus on the black-box key-recovery security of reduced-round WEM-8, one of the main instances in the WEM family, with the aim of gaining an intensive understanding of the security of WEM. Potential weaknesses of WEM-8 are explored, and a new approach to improving the efficiency of integral attacks is introduced, which constructs equations from the constant property, instead of the balance property. Aided by these observations, new competitive key-recovery attacks with lower time/data/memory complexity on reduced-round WEM-8 are proposed. In particular, the improved attack on 4-round WEM-8 requires only \(2^8\) adaptively chosen ciphertexts, whereas the current best attack has the data complexity of \(2^{40}\) chosen plaintexts. The results in this work show the effectiveness of the constant property in enhancing integral attacks and can inspire novel techniques in key-recovery attacks against other (white-box) block ciphers.









Similar content being viewed by others
Notes
The abbreviation ‘WEM-16W’ is not explicitly introduced in [10] but is introduced here to denote the white-box instance WEM(128,16,12,AES-128,5) for brevity.
In the original paper of WEM [10], it is not stated whether the number of rounds of the first and second round-reduced AES is one and two or two and one for \(R^3\). Here we set the mode of \(R^3\) as ‘2+1’ and \(R^5\) as ‘2+3’, whereas it will be shown that the attack results are independent of the modes. More details are remarked in Sects. 3.3 and 5.3.
We consider the 256 plaintexts in the coset \({\mathcal {V}} \oplus a\) as 127 mutually disjoint pairs and construct equations from \((c^0,c^1),(c^2,c^3), \ldots , (c^{254},c^{255})\). Note that we can also construct equations from \((c^0,c^1), (c^1,c^2), \ldots , (c^{254},c^{255})\). Whereas, our experiment showed that this could not increase the rank of the equation system. Furthermore, the rank could not reach 254 if fewer equations are selected.
References
Bai K., Wu C.: A secure white-box SM4 implementation. Secur. Commun. Netw. 9(10), 996–1006 (2016).
Bard G.V.: Achieving a log(\(n\)) speed up for boolean matrix operations and calculating the complexity of the dense linear algebra step of algebraic stream cipher attacks and of integer factorization methods (2006). http://eprint.iacr.org/2006/163.
Billet O., Gilbert H., Ech-Chatbi C.: Cryptanalysis of a white box AES implementation. In: Handschuh H., Hasan M.A. (eds.) Selected Areas in Cryptography, pp. 227–240. Springer, Berlin (2005).
Biryukov A., Shamir A.: Structural cryptanalysis of SASAS. In: Pfitzmann B. (ed.) Advances in Cryptology—EUROCRYPT 2001, pp. 395–405. Springer, Berlin (2001).
Biryukov A., Udovenko A.: Attacks and countermeasures for white-box designs. In: Peyrin T., Galbraith S. (eds.) Advances in Cryptology—ASIACRYPT 2018, pp. 373–402. Springer International Publishing, Cham (2018).
Biryukov A., Bouillaguet C., Khovratovich D.: Cryptographic schemes based on the ASASA structure: black-box, white-box, and public-key (extended abstract). In: Sarkar P., Iwata T. (eds.) Advances in Cryptology—ASIACRYPT 2014, pp. 63–84. Springer, Berlin Heidelberg, Berlin, Heidelberg (2014).
Bogdanov, A., Isobe, T.: White-box cryptography revisited: space-hard ciphers. In: Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, pp. 1058–1069. ACM, New York (2015)
Bogdanov A., Isobe T., Tischhauser E.: Towards practical whitebox cryptography: optimizing efficiency and space hardness. In: Cheon J.H., Takagi T. (eds.) Advances in Cryptology—ASIACRYPT 2016, pp. 126–158. Springer, Berlin (2016).
Bos J.W., Hubain C., Michiels W., Teuwen P.: Differential computation analysis: hiding your white-box designs is not enough. In: Gierlichs B., Poschmann A.Y. (eds.) Cryptographic Hardware and Embedded Systems–CHES 2016, pp. 215–236. Springer, Berlin (2016).
Cho J., Choi K.Y., Dinur I., Dunkelman O., Keller N., Moon D., Veidberg A.: WEM: a new family of white-box block ciphers based on the Even-Mansour construction. In: Handschuh H. (ed.) Topics in Cryptology—CT-RSA 2017, pp. 293–308. Springer International Publishing, Cham (2017).
Chow S., Eisen P., Johnson H., Van Oorschot P.C.: White-box cryptography and an AES implementation. In: Nyberg K., Heys H. (eds.) Selected Areas in Cryptography, pp. 250–270. Springer, Berlin (2003).
Chow S., Eisen P., Johnson H., Van Oorschot P.C.: A white-box DES implementation for DRM applications. In: Feigenbaum J. (ed.) Digital Rights Management, pp. 1–15. Springer, Berlin (2003).
Daemen J., Rijmen V.: Understanding two-round differentials in AES. In: De Prisco R., Yung M. (eds.) Security and Cryptography for Networks, pp. 78–94. Springer, Berlin (2006).
Daemen J., Rijmen V.: The Design of Rijndael: The Advanced Encryption Standard (AES). Springer, Berlin (2020).
Daemen J., Knudsen L., Rijmen V.: The block cipher Square. In: Biham E. (ed.) Fast Software Encryption, pp. 149–165. Springer, Berlin (1997).
Even S., Mansour Y.: A construction of a cipher from a single pseudorandom permutation. J. Cryptol. 10(3), 151–161 (1997).
Fouque P.A., Karpman P., Kirchner P., Minaud B.: Efficient and provable white-box primitives. In: Cheon J.H., Takagi T. (eds.) Advances in Cryptology—ASIACRYPT 2016, pp. 159–188. Springer, Berlin (2016).
Gilbert H., Plût J., Treger J.: Key-recovery attack on the ASASA cryptosystem with expanding s-boxes. In: Gennaro R., Robshaw M. (eds.) Advances in Cryptology—CRYPTO 2015, pp. 475–490. Springer, Berlin (2015).
Goubin L., Rivain M., Wang J.: Defeating state-of-the-art white-box countermeasures with advanced gray-box attacks. IACR Trans. Cryptogr. Hardw. Embed. Syst. 2020(3), 454–482 (2020).
Grassi L.: Mixcolumns properties and attacks on (round-reduced) AES with a single secret s-box. In: Smart N.P. (ed.) Topics in Cryptology—CT-RSA 2018, pp. 243–263. Springer International Publishing, Cham (2018).
Grassi L., Rechberger C., Ronjom S.: Subspace trail cryptanalysis and its applications to AES. IACR Trans. Symmetric Cryptol. 2016(2), 192–225 (2016)
Hu Y., Zhang Y., Xiao G.: Integral cryptanalysis of SAFER+. Electron. Lett. 35(17), 1458–1459 (1999).
Knudsen L., Wagner D.: Integral cryptanalysis. In: Daemen J., Rijmen V. (eds.) Fast Software Encryption, pp. 112–127. Springer, Berlin (2002).
Kwon J., Lee B., Lee J., Moon D.: FPL: white-box secure block cipher using parallel table look-ups. In: Jarecki S. (ed.) Topics in Cryptology—CT-RSA 2020, pp. 106–128. Springer International Publishing, Cham (2020).
Lin T., Lai X., Xue W., Jia Y.: A new Feistel-type white-box encryption scheme. J. Comput. Sci. Technol. 32(2), 386–395 (2017).
Lucks S.: The saturation attack—a bait for Twofish. In: Matsui M. (ed.) Fast Software Encryption, pp. 1–15. Springer, Berlin (2002).
Minaud B., Derbez P., Fouque P.A., Karpman P.: Key-recovery attacks on ASASA. J. Cryptol. 31(3), 845–884 (2018).
Rønjom S., Bardeh N.G., Helleseth T.: Yoyo tricks with AES. In: Takagi T., Peyrin T. (eds.) Advances in Cryptology—ASIACRYPT 2017, pp. 217–243. Springer International Publishing, Cham (2017).
Seker O., Eisenbarth T., Liskiewicz M.: A white-box masking scheme resisting computational and algebraic attacks. IACR Trans. Cryptogr. Hardw. Embed. Syst. 2021(2), 61–105 (2021).
Sun B., Liu M., Guo J., Qu L., Rijmen V.: New insights on AES-like SPN ciphers. In: Robshaw M., Katz J. (eds.) Advances in Cryptology—CRYPTO 2016, pp. 605–624. Springer, Berlin (2016).
Tiessen T., Knudsen L.R., Kölbl S., Lauridsen M.M.: Security of the AES with a secret s-box. In: Leander G. (ed.) Fast Software Encryption, pp. 175–189. Springer, Berlin (2015).
Wyseur B., Michiels W., Gorissen P., Preneel B.: Cryptanalysis of white-box DES implementations with arbitrary external encodings. In: Adams C., Miri A., Wiener M. (eds.) Selected Areas in Cryptography, pp. 264–277. Springer, Berlin (2007).
Xiao Y., Lai X.: A secure implementation of white-box AES. In: 2009 2nd International Conference on Computer Science and Its Applications, pp. 1–6. IEEE, New Jersey (2009).
Acknowledgements
We would like to thank Vincent Rijmen for helpful discussions in the early stage of this work when the first author was visiting KU Leuven and the anonymous reviewers for their valuable comments and suggestions.
Author information
Authors and Affiliations
Corresponding authors
Ethics declarations
Conflict of interest
The authors declare that they have no conflicts of interest.
Additional information
Communicated by M. Naya-Plasencia.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This work was supported by National Key R &D Program of China (Grant No. 2017YFB0802000), National Natural Science Foundations of China (Grant Nos. 61972457, 61902303, and U19B2021), National Cryptography Development Fund of China (Grant Nos. MMJJ20170104 and MMJJ20180219), Key Research and Development Program of Shaanxi (Grant No. 2020ZDLGY08-04), Guangxi Key Laboratory of Cryptography and Information Security (No. GCIS202125), and Natural Science Basic Research Program of Shaanxi (Program Nos. 2020JQ-832 and 2021JM-126)
Appendix A: Improved Gauss elimination of matrices over \({\mathbb {F}}_{2^8}\)
Appendix A: Improved Gauss elimination of matrices over \({\mathbb {F}}_{2^8}\)
To solve an equation system over \({\mathbb {F}}_{2^8}\), the Gauss elimination method is required. We introduce the general Gauss elimination (Algorithm 5) and propose an improved version (Algorithm 6) on an \(m \times n\) matrix over \({\mathbb {F}}_{2^8}\). The time complexity is estimated by counting the number of additions and multiplications respectively.
In Algorithm 5, n multiplications are required respectively in lines 3 and 5, and n additions are required in line 5. Hence, the total number of additions and multiplications are \(n^2(m - 1)\) and \(n^2m\) respectively.
Algorithm 6 takes Algorithm 7 (GenerateTable) as a subroutine, which is to compute i times an n-dimensional vector \(\varvec{v}\) for \(i \in [0, 255]\) and return the results as a table T sorted by gray codes. Lines 2-5 are to calculate \(2^i\) times \(\varvec{v}\) for \(i \in [0, 7]\), which costs 7n multiplications. In lines 6-13, we compute T with the help of a property of gray codes—the gray codes \(g_0\) and \(g_1\) of two consecutive numbers only differ in one bit, i.e. the d-th bit position. Thus, we have \(g_1 = 2^d \oplus g_0\), which implies that \( g_1 \cdot \varvec{v} = 2^d \cdot \varvec{v} \oplus g_0 \cdot \varvec{v}\). As we compute T row by row, we can always get row i of T by adding row d of \(T_b\) to row \(i - 1\) of T. As a result, Algorithm 7 (GenerateTable) requires 254n additions and 7n multiplications. In Algorithm 6, an inverse gray code is needed to look up the table, but the cost is negligible. To sum up, Algorithm 6 requires \(\left( 254n + (m - 1)n \right) \cdot n\) additions and \(8n^2\) multiplications. We regard the expense of multiplying by \(\mathtt {2}\) as two additions. Then, the total complexity is \((277 + m)n^2\) additions. In the 3- and 4-round key-recovery attacks on WEM-8, \(m=2^9\) and \(n=2^8\). Consequently, the time complexity of our improved Gauss elimination method is approximately \(2^{26}\) additions, i.e., \(2^{26}\) steps.



Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Liu, J., Wang, D., Hu, Y. et al. Improved key-recovery attacks on reduced-round WEM-8. Des. Codes Cryptogr. 90, 2419–2448 (2022). https://doi.org/10.1007/s10623-022-01089-1
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10623-022-01089-1