[Paper Review] Securing the Storage Data Path with SGX Enclaves
This paper evaluates the performance of using Intel SGX enclaves to secure data-at-rest encryption in storage systems, demonstrating that with careful configuration—especially optimal buffer sizes and efficient crypto libraries—SGX can achieve 90–99% of native performance. The study reveals that while SGX enables high-throughput encryption, performance is highly sensitive to implementation details like thread count, memory access patterns, and ECALL overhead.
We explore the use of SGX enclaves as a means to improve the security of handling keys and data in storage systems. We study two main configurations for SGX computations, as they apply to performing data-at-rest encryption in a storage system. The first configuration aims to protect the encryption keys used in the encryption process. The second configuration aims to protect both the encryption keys and the data, thus providing end-to-end security of the entire data path. Our main contribution is an evaluation of the viability of SGX for data-at-rest encryption from a performance perspective and an understanding of the details that go into using enclaves in a performance sensitive environment. Our tests paint a complex picture: On the one hand SGX can indeed achieve high encryption and decryption throughput, comparable to running without SGX. On the other hand, there are many subtleties to achieving such performance and careful design choices and testing are required.
Motivation & Objective
- To assess the viability of using Intel SGX enclaves to secure the data-at-rest encryption path in storage systems.
- To identify performance bottlenecks and design trade-offs when running cryptographic operations inside SGX enclaves.
- To determine whether enclave-based encryption can achieve throughput comparable to untrusted execution in performance-sensitive storage workloads.
- To understand the impact of system-level factors such as buffer size, multi-threading, and memory access patterns on enclave performance.
Proposed method
- Implemented two SGX enclave configurations: one protecting only encryption keys, and another securing both keys and data end-to-end.
- Conducted micro-benchmarks measuring encryption throughput across varying buffer sizes, thread counts, and memory access patterns (regular vs. encrypted memory).
- Used the Opaque crypto library (ported to SGX) for high-performance encryption, avoiding suboptimal default libraries.
- Ran tests with warm-up and cool-down phases to ensure stable, fully utilized system measurements across 1–8 threads.
- Measured performance in both untrusted (native) and trusted (SGX enclave) execution modes under identical workloads.
- Analyzed the impact of ECALL context switches, cache misses, and EPC paging on throughput, particularly in encrypted memory scenarios.
Experimental results
Research questions
- RQ1Can SGX enclaves achieve high-throughput data-at-rest encryption comparable to native execution without enclaves?
- RQ2How do buffer size, thread count, and memory access patterns affect encryption performance inside SGX enclaves?
- RQ3What are the primary performance bottlenecks in enclave-based encryption, such as ECALL overhead or cache misses?
- RQ4To what extent does running in encrypted memory (EPC) degrade performance compared to regular memory?
- RQ5How do design choices—like crypto library selection and multi-threading strategy—influence the final throughput in SGX?
Key findings
- With optimal buffer sizes (e.g., 512KB–1MB), SGX enclaves achieved 90–99% of the throughput of native execution for key protection and end-to-end encryption.
- Multi-threaded performance dropped significantly when buffer sizes exceeded 1MB due to cache misses, affecting both untrusted and trusted execution.
- Running in encrypted memory (EPC) introduced a ~10% performance loss at 4 threads compared to untrusted execution, even with optimal buffer sizes.
- Smaller buffers led to high ECALL overhead, while larger buffers caused cache thrashing, creating a narrow 'sweet spot' for optimal performance.
- The performance gap between trusted and untrusted execution was most pronounced in encrypted memory, where EPC paging and memory encryption added latency.
- No single configuration worked universally—performance was highly sensitive to system load, thread count, and background work, making prediction without testing nearly impossible.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.