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.
翻译:加密图书馆的实施已被仔细检查,以发现通过微科学剖析侧通道攻击可以利用的秘密执行行为。为了防止意外渗漏,大多数图书馆都迁移到不断执行加密原始物的加密系统。还努力认证图书馆,以便在敏感地区使用,如微软 CNG和Botan,特别注意渗漏行为。在这项工作中,我们显示这些图书馆的共同监督是存在\emph{功用功能},这些功能处理并因此可能泄露机密信息。我们分析若干广泛使用的加密图书馆中基础64解密功能的可应用性。在装装PEM格式的钥匙时,使用基础64解码。我们表明,即使图书馆是在可信任的执行环境中执行,这些功能本身也会泄漏足够的信息。事实上,我们表明,最近对LVI\emph{seb}等静态执行攻击的应对措施是可利用性微微泄漏的功能,从而使我们能够强有力地推断出有关RSA私人钥匙的足够信息。我们展示了几个广泛使用的加密图书馆的可应用性。我们展示了一个完整的攻击性攻击性,包括广泛和平行的中央图书馆的回收成本。