论文标题

用刀片自动消除来自加密代码的投机泄漏

Automatically Eliminating Speculative Leaks from Cryptographic Code with Blade

论文作者

Vassena, Marco, Disselkoen, Craig, Gleissenthall, Klaus V., Cauligi, Sunjay, Kici, Rami Gökhan, Jhala, Ranjit, Tullsen, Dean, Stefan, Deian

论文摘要

我们介绍了Blade,这是一种新的方法,可以自动有效地消除加密代码中的投机性泄漏。刀片建立在以下见解的基础上:要通过猜测停止泄漏,就足够$ \ textit {cut} $来自表达的数据流,这些dataflow从表达式中提出了秘密($ \ textit {sources {sources} $),而不是通过缓存($ \ textit {sinks} $)泄漏它们的人,而不是预见aptogulation aptogether。我们在$ \ textIt {static type system} $中形式化了这个见解,该(1)将每个表达式键入$ \ textIt {transient} $,即可能包含投机性的秘密,或者是$ \ textit {stable} $,(2)要求通过$ \ textit probine textions stit stitt st Statt sink {sink sink {2)刀片依靠新的新抽象原始性,$ \ textbf {protect} $,以阻止颗粒状的猜测。我们使用现有的体系结构机制对$ \ TextBf {procept} $实现,并展示Blade的类型系统如何自动合成$ \ textit {minimal} $ $ \ textbf {protect} $的数量,以消除投机性泄漏。我们在Cranelift WebAssembly编译器中实施刀片,并通过修复加密原始术的几种经过验证但脆弱的WebAssembly实现来评估我们的方法。我们发现,刀片可以修复通过投机$ \ textit {自动} $泄漏的现有程序,而无需用户干预,即使使用栅栏实现$ \ textbf {protect} $,也可以修复$ \ textit {有效} $。

We introduce BLADE, a new approach to automatically and efficiently eliminate speculative leaks from cryptographic code. BLADE is built on the insight that to stop leaks via speculation, it suffices to $\textit{cut}$ the dataflow from expressions that speculatively introduce secrets ($\textit{sources}$) to those that leak them through the cache ($\textit{sinks}$), rather than prohibit speculation altogether. We formalize this insight in a $\textit{static type system}$ that (1) types each expression as either $\textit{transient}$, i.e., possibly containing speculative secrets or as being $\textit{stable}$, and (2) prohibits speculative leaks by requiring that all $\textit{sink}$ expressions are stable. BLADE relies on a new new abstract primitive, $\textbf{protect}$, to halt speculation at fine granularity. We formalize and implement $\textbf{protect}$ using existing architectural mechanisms, and show how BLADE's type system can automatically synthesize a $\textit{minimal}$ number of $\textbf{protect}$s to provably eliminate speculative leaks. We implement BLADE in the Cranelift WebAssembly compiler and evaluate our approach by repairing several verified, yet vulnerable WebAssembly implementations of cryptographic primitives. We find that Blade can fix existing programs that leak via speculation $\textit{automatically}$, without user intervention, and $\textit{efficiently}$ even when using fences to implement $\textbf{protect}$.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源