arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.04600cs.CR
收藏

Util::Lookup:利用加密库中的密钥解码

Util::Lookup: Exploiting key decoding in cryptographic libraries

Florian Sieck, Sebastian Berndt, Jan Wichelmann, Thomas Eisenbarth

AI总结:

本文揭示加密库 base64/PEM 密钥解码实用函数的缓存侧信道泄露,并结合 SGX 攻击与并行 extend-and-prune,实现单轨迹推断及中等成本完整 RSA 私钥恢复。

摘要:

加密库的实现长期受到严格审查,因为其依赖秘密的执行行为可能被微架构侧信道攻击利用。为防止意外泄露,大多数库已转向加密原语的常数时间实现。也有工作致力于认证可用于敏感领域的库,例如 Microsoft CNG 和 Botan,并特别关注其泄露行为。在本文中,我们表明这些库中一个常见疏漏是 utility functions(实用函数)的存在:它们处理机密信息,因而也可能泄露机密信息。我们分析了多个广泛使用的加密库中 base64 解码函数的可利用性。加载以 PEM 格式存储的密钥时会使用 base64 解码。我们表明,即使这些库运行在可信执行环境中,这些函数本身也会泄露足够的信息。事实上,我们表明,针对 LVI 等瞬态执行攻击的最新对策反而缓解了对所观察到的微弱泄露的利用难度,使我们能够仅凭单条轨迹就稳健推断出关于 RSA 私钥的足够信息。我们提出了一种完整攻击,包括广泛的库分析、针对 SGX enclave 的高分辨率末级缓存攻击,以及 extend-and-prune 方法的完全并行化实现,从而能够以中等成本完成完整密钥恢复。

英文摘要:

Implementations of cryptographic libraries have been scrutinized for secret-dependent execution behavior exploitable by microarchitectural side-channel attacks. To prevent unintended leakages, most libraries moved to constant-time implementations of cryptographic primitives. There have also been efforts to certify libraries for use in sensitive areas, like Microsoft CNG and Botan, with specific attention to leakage behavior. In this work, we show that a common oversight in these libraries is the existence of \emph{utility functions}, which handle and thus possibly leak confidential information. We analyze the exploitability of base64 decoding functions across several widely used cryptographic libraries. Base64 decoding is used when loading keys stored in PEM format. We show that these functions by themselves leak sufficient information even if libraries are executed in trusted execution environments. In fact, we show that recent countermeasures to transient execution attacks such as LVI \emph{ease} the exploitability of the observed faint leakages, allowing us to robustly infer sufficient information about RSA private keys \emph{with a single trace}. We present a complete attack, including a broad library analysis, a high-resolution last level cache attack on SGX enclaves, and a fully parallelized implementation of the extend-and-prune approach that allows a complete key recovery at medium costs.

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

↑