arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.13506cs.CRcs.SE
收藏

迈向常数时间密码学实现的高效验证

Towards Efficient Verification of Constant-Time Cryptographic Implementations

Luwei Cai, Fu Song, Taolue Chen

AI总结:

本文提出结合IFDS轻量污点分析、精确污点分析与自组合程序安全性验证的实用方法,并实现为工具CT-Prover,高效验证密码学实现的常数时间性,发现开源SSL库新漏洞且性能显著优于现有工具。

摘要:

时间侧信道攻击利用依赖于秘密的执行时间来完全或部分恢复密码学实现中的秘密,对软件安全构成严重威胁。常数时间编程规范是对抗时间侧信道攻击的一种有效的基于软件的应对措施,但开发常数时间实现却具有挑战性且容易出错。当前的验证方法和工具在实际应用于生产软件时存在可扩展性和精度问题。在本文中,我们基于污点分析与自组合程序安全性验证的新型协同作用,提出了实用的验证方法。具体而言,我们首先使用基于IFDS的轻量级污点分析来证明大量潜在的(时间)侧信道源实际上不会泄露秘密。然后,我们借助精确的污点分析和安全性验证方法来确定剩余的潜在侧信道源是否真的会泄露秘密。这些方法包括对原始程序及其布尔抽象进行污点导向的半叉积构造,以及程序的污点导向自组合。我们的方法已实现为一个跨平台且全自动化的工具CT-Prover。实验证实了它在验证来自现代密码学和SSL/TLS库的真实世界基准方面的效率和有效性。特别是,CT-Prover识别出了开源SSL库(例如Mbed SSL、BearSSL)中新的、已确认的漏洞,并显著优于最先进的工具。

英文摘要:

Timing side-channel attacks exploit secret-dependent execution time to fully or partially recover secrets of cryptographic implementations, posing a severe threat to software security. Constant-time programming discipline is an effective software-based countermeasure against timing side-channel attacks, but developing constant-time implementations turns out to be challenging and error-prone. Current verification approaches/tools suffer from scalability and precision issues when applied to production software in practice. In this paper, we put forward practical verification approaches based on a novel synergy of taint analysis and safety verification of self-composed programs. Specifically, we first use an IFDS-based lightweight taint analysis to prove that a large number of potential (timing) side-channel sources do not actually leak secrets. We then resort to a precise taint analysis and a safety verification approach to determine whether the remaining potential side-channel sources can actually leak secrets. These include novel constructions of taint-directed semi-cross-product of the original program and its Boolean abstraction, and a taint-directed self-composition of the program. Our approach is implemented as a cross-platform and fully automated tool CT-Prover. The experiments confirm its efficiency and effectiveness in verifying real-world benchmarks from modern cryptographic and SSL/TLS libraries. In particular, CT-Prover identify new, confirmed vulnerabilities of open-source SSL libraries (e.g., Mbed SSL, BearSSL) and significantly outperforms the state-of-the-art tools.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑