MemJam:一种针对常数时间密码实现的虚假依赖攻击
MemJam: A False Dependency Attack against Constant-Time Crypto Implementations
摘要:
缓存攻击利用密码实现的内存访问模式。常数时间实现技术已经成为对抗缓存定时攻击的一种不可或缺的工具。这些技术设计密码操作的存储器访问以遵循统一的密钥独立模式。但是,恒定时间行为取决于底层架构,后者可能非常复杂,并且经常包含未发布的功能。CacheBleed攻击的目标是缓存库冲突,从而使微架构侧信道对手只能观察具有缓存行粒度的内存的假设无效。在这项工作中,我们提出MemJam,一个侧信道攻击,利用错误的内存读写后的依赖关系,并提供了一个高品质的内部缓存级定时通道。作为概念验证,我们演示了对AES的恒定时间实现以及当前英特尔集成性能原语(Intel IPP)加密库中带缓存保护的SM4实现的首次密钥恢复攻击。此外,我们通过在使用前述AES的恒定时间实现来执行加密的飞地上再现AES密钥恢复结果,来展示对SGX的第一次内部高速缓存级定时攻击。我们的研究结果表明,我们不仅可以使用这个侧通道,有效地攻击内存依赖的密码操作,但也绕过建议的保护。与CacheBleed相比,它仅限于旧一代处理器,MemJam是第一个适用于所有主要英特尔处理器的内部缓存级别攻击,包括支持SGX扩展的最新一代处理器。
英文摘要:
Cache attacks exploit memory access patterns of cryptographic implementations. Constant-Time implementation techniques have become an indispensable tool in fighting cache timing attacks. These techniques engineer the memory accesses of cryptographic operations to follow a uniform key independent pattern. However, the constant-time behavior is dependent on the underlying architecture, which can be highly complex and often incorporates unpublished features. CacheBleed attack targets cache bank conflicts and thereby invalidates the assumption that microarchitectural side-channel adversaries can only observe memory with cache line granularity. In this work, we propose MemJam, a side-channel attack that exploits false dependency of memory read-after-write and provides a high quality intra cache level timing channel. As a proof of concept, we demonstrate the first key recovery attacks on a constant-time implementation of AES, and a SM4 implementation with cache protection in the current Intel Integrated Performance Primitives (Intel IPP) cryptographic library. Further, we demonstrate the first intra cache level timing attack on SGX by reproducing the AES key recovery results on an enclave that performs encryption using the aforementioned constant-time implementation of AES. Our results show that we can not only use this side channel to efficiently attack memory dependent cryptographic operations but also to bypass proposed protections. Compared to CacheBleed, which is limited to older processor generations, MemJam is the first intra cache level attack applicable to all major Intel processors including the latest generations that support the SGX extension.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。