To protect cryptographic implementations from side-channel vulnerabilities, developers must adopt constant-time programming practices. As these can be error-prone, many side-channel detection tools have been proposed. Despite this, such vulnerabilities are still manually found in cryptographic libraries. While a recent paper by Jancar et al. shows that developers rarely perform side-channel detection, it is unclear if existing detection tools could have found these vulnerabilities in the first place. To answer this question, we surveyed the literature to build a classification of 34 side-channel detection frameworks. The classification we offer compares multiple criteria, including the methods used, the scalability of the analysis or the threat model considered. We then built a unified common benchmark of representative cryptographic operations on a selection of 5 promising detection tools. This benchmark allows us to better compare the capabilities of each tool, and the scalability of their analysis. Additionally, we offer a classification of recently published side-channel vulnerabilities. We then test each of the selected tools on benchmarks reproducing a subset of these vulnerabilities as well as the context in which they appear. We find that existing tools can struggle to find vulnerabilities for a variety of reasons, mainly the lack of support for SIMD instructions, implicit flows, and internal secret generation. Based on our findings, we develop a set of recommendations for the research community and cryptographic library developers, with the goal to improve the effectiveness of side-channel detection tools.
翻译:为保护密码实现免受侧信道漏洞威胁,开发者必须采用恒定时间编程实践。由于此类实践易出错,已有大量侧信道检测工具被提出。尽管如此,密码库中的此类漏洞仍需人工发现。Jancar等人最近的论文表明开发者鲜少进行侧信道检测,但现有检测工具是否原本就能发现这些漏洞尚不明确。为解答此问题,我们通过文献调研构建了34个侧信道检测框架的分类体系。该分类从多个维度进行对比,包括所采用方法、分析可扩展性及威胁模型设计等。随后,我们选取5种有前景的检测工具,针对代表性密码运算构建统一基准测试集。该基准测试使我们能更好地比较各工具的能力及分析可扩展性。此外,我们还对近期公开的侧信道漏洞进行了分类。通过复现其中部分漏洞及其实际出现场景的基准测试,我们对各选工具进行了验证。研究发现现有工具难以发现漏洞的原因多样,主要在于缺乏对SIMD指令、隐式数据流及内部密钥生成的支持。基于研究结果,我们针对研究界与密码库开发者提出改进侧信道检测工具有效性的建议。