[论文解读] Leveraging Intel SGX to Create a Nondisclosure Cryptographic library
本文提出了一种安全的密码学库,利用 Intel SGX 在硬件强制的飞地(enclaves)中隔离并保护密码学密钥,确保机密性和完整性。通过在 SGX 飞地中执行加密操作(如 SHA-256、HMAC-SHA-256 和 AES-ECB/CBC),系统即使在操作系统或应用程序被攻破的情况下也能防止密钥暴露,从而实现最小化的可信计算基,并提供了开源的 PoC 代码。
Enforcing integrity and confidentiality of users' application code and data is a challenging mission that any software developer working on an online production grade service is facing. Since cryptology is not a widely understood subject, people on the cutting edge of research and industry are always seeking for new technologies to naturally expand the security of their programs and systems. Intel Software Guard Extension (Intel SGX) is an Intel technology for developers who are looking to protect their software binaries from plausible attacks using hardware instructions. The Intel SGX puts sensitive code and data into CPU-hardened protected regions called enclaves. In this project we leverage the Intel SGX to produce a secure cryptographic library which keeps the generated keys inside an enclave restricting use and dissemination of confidential cryptographic keys. Using enclaves to store the keys we maintain a small Trusted Computing Base (TCB) where we also perform computation on temporary buffers to and from untrusted application code. As a proof of concept, we implemented hashes and symmetric encryption algorithms inside the enclave where we stored hashes, Initialization Vectors (IVs) and random keys and open sourced the code (https://github.com/hmofrad/CryptoEnclave).
研究动机与目标
- 解决在不受信任的软件环境中保护密码学密钥免于暴露的挑战。
- 通过将敏感的密码学操作隔离在 Intel SGX 飞地中,减少可信计算基(TCB)。
- 在不将密钥暴露给主机操作系统或应用程序的前提下,实现安全的密码学操作(如哈希、对称加密)。
- 提供一个可投入生产的开源密码学库,抽象密码学复杂性,同时强制保证密钥机密性。
- 为未来实现支持相互认证和密钥交换的可信飞间通信奠定基础。
提出的方法
- 使用 Intel SGX 创建隔离的、由 CPU 保护的内存区域(飞地),在其中执行密码学函数并安全存储密钥。
- 使用 Intel SGX SDK 和 LibTomCrypt 库在飞地中实现密码学原 primitive —— SHA-256、HMAC-SHA-256、AES-ECB 和 AES-CBC。
- 将数据和密钥的访问限制在飞地边界,确保密钥永远不会离开受保护的内存区域。
- 使用远程和本地证明机制验证飞地的完整性并认证执行环境。
- 通过仅将受信任代码限制为飞地及其密码学操作,设计最小化的可信计算基。
- 使用密封存储和安全的入口/出口点,控制不受信任的应用程序代码与飞地之间的数据流。
实验结果
研究问题
- RQ1如何在不受信任的执行环境中保护密码学密钥不被泄露?
- RQ2Intel SGX 是否可以有效用于构建一个最小化、安全的密码学库,并实现强密钥机密性?
- RQ3哪些密码学操作可以被安全且高效地隔离在 SGX 飞地中,同时保持性能和可用性?
- RQ4在使用硬件辅助保护构建密码学库时,如何最小化可信计算基?
- RQ5在潜在不安全的通道上(甚至在同一台机器上)实现安全的飞间通信以进行密钥交换和数据传输,存在哪些实际挑战和限制?
主要发现
- 该实现成功地在 Intel SGX 飞地中保护了密码学密钥,确保其永远不会暴露给主机操作系统或不受信任的应用程序。
- 该库支持四种核心密码学功能:SHA-256、HMAC-SHA-256、AES-ECB 和 AES-CBC,支持 128 位、192 位和 256 位密钥。
- 通过在硬件保护的飞地中隔离密钥生成、存储和操作,系统实现了强大的机密性和完整性保证。
- 使用 LibTomCrypt 使得系统具备模块化和可扩展性,可轻松通过少量代码更改支持未来新增的密码学算法。
- 开源的代码库(可在 GitHub 上获取)为将基于飞地的密码学集成到实际应用中,提供了可投入生产的、安全的基础。
- 作者指出,未来工作必须解决在潜在不安全的通道上实现飞间间安全、经过认证的通信问题,即使这些飞地位于同一台机器上。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。