Skip to main content
QUICK REVIEW

[Paper Review] Elasticlave: An Efficient Memory Model for Enclaves

Jason Zhijingcheng Yu, Shweta Shinde|arXiv (Cornell University)|Oct 16, 2020
Security and Verification in ComputingComputer Science37 references7 citations
TL;DR

Elasticlave proposes a flexible, secure memory model for trusted execution environments (TEEs) that enables enclaves to selectively and temporarily share memory with each other and the OS, eliminating costly data copy operations. Evaluated on an RTL-designed RISC-V core, Elasticlave achieves 1–2 orders of magnitude performance improvement over the spatial isolation model while maintaining equivalent security guarantees and a small trusted computing base (TCB < 7,000 LoC).

ABSTRACT

Trusted-execution environments (TEE), like Intel SGX, isolate user-space applications into secure enclaves without trusting the OS. Thus, TEEs reduce the trusted computing base, but add one to two orders of magnitude slow-down. The performance cost stems from a strict memory model, which we call the spatial isolation model, where enclaves cannot share memory regions with each other. In this work, we present Elasticlave---a new TEE memory model that allows enclaves to selectively and temporarily share memory with other enclaves and the OS. Elasticlave eliminates the need for expensive data copy operations, while offering the same level of application-desired security as possible with the spatial model. We prototype Elasticlave design on an RTL-designed cycle-level RISC-V core and observe 1 to 2 orders of magnitude performance improvements over the spatial model implemented with the same processor configuration. Elasticlave has a small TCB. We find that its performance characteristics and hardware area footprint scale well with the number of shared memory regions it is configured to support.

Motivation & Objective

  • Address the performance bottleneck in existing TEEs, such as Intel SGX, caused by the spatial isolation memory model that mandates expensive data copying for inter-enclave communication.
  • Overcome the rigidity of the spatial isolation model, which forces static division of memory into public and private regions, limiting compatibility with common data processing patterns.
  • Design a memory model that allows dynamic, fine-grained permission control over shared memory regions between enclaves and the OS, without relying on a trusted OS as an intermediary.
  • Ensure strong security guarantees—preventing privilege escalation, TOCTOU attacks, and unauthorized access—despite untrusted OS and potentially compromised enclaves.
  • Minimize the trusted computing base (TCB) and hardware complexity while enabling efficient, scalable memory sharing across multiple regions.

Proposed method

  • Introduce a new memory model, Elasticlave, that relaxes the spatial isolation model by allowing enclaves to share memory regions with configurable, time-varying permissions.
  • Design a permission specification mechanism that enables non-compromised enclaves to enforce sequences of access control changes on shared regions, ensuring application-level security policies are enforced.
  • Implement the model on an open-source, RTL-level RISC-V processor at 800 MHz, using a cycle-accurate simulator to evaluate performance and hardware cost.
  • Integrate Elasticlave with existing TEE mechanisms such as page-level protection and memory encryption, ensuring confidentiality and integrity of shared data.
  • Use a minimal TCB (<7,000 LoC) and optimize for low hardware overhead, with area impact of ~1% per 8 Physical Memory Protection (PMP) entries.
  • Evaluate the design using synthetic and real-world benchmarks to measure performance gains and scalability across varying numbers of shared memory regions.

Experimental results

Research questions

  • RQ1Can a TEE memory model be designed to allow secure, dynamic memory sharing between enclaves and the OS without relying on expensive data copies?
  • RQ2How can strong security guarantees be maintained when relaxing the spatial isolation model, especially in the presence of untrusted OS and potentially compromised enclaves?
  • RQ3What is the performance overhead of enabling shared memory in TEEs, and how does it scale with the number of shared regions and context switches?
  • RQ4Can the TCB and hardware complexity be kept minimal while supporting flexible, fine-grained memory sharing in a secure manner?
  • RQ5To what extent can Elasticlave improve performance over existing spatial isolation models without sacrificing application-desired security?

Key findings

  • Elasticlave achieves 1–2 orders of magnitude performance improvement over the spatial isolation model on the same RISC-V processor configuration, with measured speedups of 10× to 100×.
  • The performance overhead is primarily driven by the number of enclave-to-enclave context switches, not by the size of shared data, indicating efficient scaling with communication frequency.
  • The hardware area footprint increases by approximately 1% per 8 PMP entries, demonstrating strong scalability with the number of shared memory regions.
  • Critical path delay and register pressure remain unchanged, indicating minimal impact on processor timing and resource utilization.
  • The TCB is kept small at under 7,000 lines of code, confirming that the design does not significantly expand the trusted computing base.
  • The design successfully eliminates the need for expensive data copy operations between private and public memory regions, directly addressing a major performance bottleneck in current TEEs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.