This paper tackles the problem of designing efficient binary-level verification for a subset of information flow properties encompassing constant-time and secret-erasure. These properties are crucial for cryptographic implementations, but are generally not preserved by compilers. Our proposal builds on relational symbolic execution enhanced with new optimizations dedicated to information flow and binary-level analysis, yielding a dramatic improvement over prior work based on symbolic execution. We implement a prototype, Binsec/Rel, for bug-finding and bounded-verification of constant-time and secret-erasure, and perform extensive experiments on a set of 338 cryptographic implementations, demonstrating the benefits of our approach. Using Binsec/Rel, we also automate two prior manual studies on preservation of constant-time and secret-erasure by compilers for a total of 4148 and 1156 binaries respectively. Interestingly, our analysis highlights incorrect usages of volatile data pointer for secret erasure and shows that scrubbing mechanisms based on volatile function pointers can introduce additional register spilling which might break secret-erasure. We also discovered that gcc -O0 and backend passes of clang introduce violations of constant-time in implementations that were previously deemed secure by a state-of-the-art constant-time verification tool operating at LLVM level, showing the importance of reasoning at binary-level.
翻译:本文处理设计一套信息流动属性的高效二进制核查问题,包括固定时间和秘密封闭。这些属性对于加密实施至关重要,但一般不由汇编者保存。我们的提案建立在通过信息流动和二进制分析的新优化而加强关系象征性执行的基础上,从而大大改进了以前基于象征性执行的工作。我们实施了一个原型,即Binsec/Rel,用于对固定时间和秘密渗透进行错误调查并进行密封核查,并对一套338加密实施系统进行广泛的实验,以展示我们方法的好处。我们还利用Binsec/Rel,将关于保存信息流动和二进制分析的新优化加强关系性象征性执行,从而大大改进以往基于象征性执行的工作。我们的分析突出了对不稳定数据点的错误使用,以进行秘密清除,并表明基于不稳定功能点的清理机制可以引入更多的登记册泄漏,从而打破保密。我们还发现,在Binserc/Rel,我们使用Benc, 和后期的硬性硬性记录,在前一阶段展示了安全性记录的重要性。