Mitigating Randomness Leakage in SM2 White-Box Implementations via Trusted Execution Environments
Hongyu Zhu, Yubo Song, Yang Li, Weiqiang Luo, Jianwei Tian, Fangliao Yang, Wenchang Liu, Yi Gong, Ding Li · Electronics · 2025
White-box cryptography plays a vital role in untrusted environments where attackers can fully access the execution process and potentially expose cryptographic keys. It secures keys by embedding them within complex and obfuscated transformations, such as lookup tables and algebraic manipulations. However, existing white-box protection schemes for SM2 signatures face vulnerabilities, notably random number leakage, which compromises key security and diminishes overall effectiveness. This paper proposes an improved white-box implementation of the SM2 signature computation leveraging a Trusted Execution Environment (TEE) architecture. The scheme employs three substitution tables for SM2 key generation and signature processes, orchestrated by a random bit string k. The k value and lookup operations are securely isolated within the TEE, effectively mitigating the risk of k leakage and enhancing overall security. Experimental results show our scheme enhances security, reduces storage, and improves performance over standard SM2 signature processing, validating its efficacy with TEE and substitution tables in untrusted environments.