Secure Content-Based Routing Using Intel Software Guard Extensions

Rafael Pires, Marcelo Pasin, Pascal Felber, Christof Fetzer

TL;DR

This paper introduces SCBR, a novel content-based routing (CBR) system that leverages Intel's Software Guard Extensions (SGX) to protect sensitive data within secure enclaves. By performing matching operations inside these hardware-protected enclaves, SCBR achieves privacy-preserving routing with minimal performance overhead, outperforming existing software-only privacy solutions.

What Problem Does This Paper Address?

Content-based routing (CBR) is a powerful communication paradigm that decouples data producers from consumers, routing messages based on their content. However, its widespread adoption, especially in cloud environments, is hindered by significant privacy concerns. CBR routers need to inspect both message content and consumer subscriptions to perform routing. This is a major barrier for organizations dealing with sensitive data, such as financial markets, where both data and subscription details must remain confidential. Existing privacy-preserving solutions often suffer from prohibitive performance costs (e.g., homomorphic encryption) or limited functionality (e.g., specialized encryption schemes).

Methods

The core of SCBR's innovation lies in its use of Intel Software Guard Extensions (SGX). SGX allows applications to create secure "enclaves" within the processor, shielding code and data from the operating system, hypervisor, and even physical attacks. SCBR implements its CBR engine within such an SGX enclave.

Key aspects of their approach include:

  • Enclave-based Processing: All sensitive CBR operations, including matching publications against subscriptions, are performed inside the SGX enclave. Data is encrypted when outside the enclave and decrypted only within its secure boundary.
  • Secure Key Exchange: A protocol is proposed for securely exchanging cryptographic keys between data producers, consumers, and the SGX-protected routing engine.
  • Efficient Matching: Leveraging the ability to process data in plaintext within the enclave, SCBR can utilize efficient, state-of-the-art matching algorithms, including those that exploit subscription containment for performance gains.
  • Encrypted Publications and Subscriptions: Publications and subscriptions are encrypted before being sent to the routing engine, ensuring confidentiality even from the infrastructure provider.

Datasets

The paper utilizes workloads adapted from previous research [4], consisting of approximately 250,000 real-world stock quote entries collected over five years from Yahoo! Finance. These entries, with 8-11 attributes, were used to generate synthetic subscription datasets. The datasets vary in the proportion of equality predicates, subscription value distributions, and the number of attributes, aiming to simulate diverse real-world scenarios.

Key Insights and Ideas

  • Hardware-Assisted Privacy is Viable for CBR: The paper demonstrates that modern Trusted Execution Environments (TEEs) like SGX can effectively address the privacy challenges in CBR without crippling performance.
  • Enclave Overhead is Manageable: The performance overhead introduced by SGX enclaves for CBR operations is shown to be relatively small and often negligible compared to the benefits of secure processing, especially when compared to software-only privacy solutions.
  • Paging is the Major Bottleneck: The most significant performance degradation occurs when the enclave's memory footprint exceeds the Enclave Page Cache (EPC) limit, leading to frequent page faults and data swapping to untrusted main memory. This highlights the importance of optimizing memory usage within enclaves.
  • SGX Offers a Sweet Spot: SCBR finds a balance between the strong security guarantees of hardware enclaves and the performance of plaintext processing, offering a compelling alternative to computationally expensive cryptographic methods.

Key Results

  • Limited Encryption Overhead: Encryption and decryption using AES-CTR added a small, nearly constant overhead of less than 5µs, which is negligible compared to matching times for large datasets.
  • Enclave Overhead: The overhead from running the filter inside an enclave reached nearly 40% for the largest subscription sets, primarily due to cache misses.
  • SGX vs. ASPE: SCBR consistently outperformed a software-only ASPE-based alternative, especially as the subscription database grew. SGX's performance remained significantly better as long as memory usage stayed below the EPC limit.
  • Paging Impact: When exceeding the EPC limit (around 90 MB), performance degraded drastically. Registering a subscription inside the enclave took up to 18 times longer than outside when the database size reached 213 MB, demonstrating the critical impact of paging.

Limitations and Future Work

  • EPC Memory Limit: The primary limitation identified is the fixed size of the Enclave Page Cache (EPC), which can lead to significant performance penalties when exceeded.
  • Future Work: The authors suggest several avenues for future research:
  • Optimizing Memory Footprint: Developing strategies to minimize memory usage within enclaves, such as intelligently splitting containment trees between enclaved and external memory.
  • Reducing Enclave Entries/Exits: Optimizing the interaction with the operating system and exploring techniques like message batching or moving more OS operations into the enclave.
  • Hardware Evolution: Anticipating future hardware improvements in SGX that might increase EPC size or improve memory hierarchy management.
  • Horizontal Scalability: Addressing scalability limitations by distributing the workload across multiple SGX-enabled nodes.

Summary updated

Abstract

Content-based routing (CBR) is a powerful model that supports scalable asynchronous communication among large sets of geographically distributed nodes. Yet, preserving privacy represents a major limitation for the wide adoption of CBR, notably when the routers are located in public clouds. Indeed, a CBR router must see the content of the messages sent by data producers, as well as the filters (or subscriptions) registered by data consumers. This represents a major deterrent for companies for which data is a key asset, as for instance in the case of financial markets or to conduct sensitive business-to-business transactions. While there exists some techniques for privacy-preserving computation, they are either prohibitively slow or too limited to be usable in real systems. In this paper, we follow a different strategy by taking advantage of trusted hardware extensions that have just been introduced in off-the-shelf processors and provide a trusted execution environment. We exploit Intel's new software guard extensions (SGX) to implement a CBR engine in a secure enclave. Thanks to the hardware-based trusted execution environment (TEE), the compute-intensive CBR operations can operate on decrypted data shielded by the enclave and leverage efficient matching algorithms. Extensive experimental evaluation shows that SGX adds only limited overhead to insecure plaintext matching outside secure enclaves while providing much better performance and more powerful filtering capabilities than alternative software-only solutions. To the best of our knowledge, this work is the first to demonstrate the practical benefits of SGX for privacy-preserving CBR.
BibTeX
@inproceedings{pires2016secure,
  author = {Rafael Pires and Marcelo Pasin and Pascal Felber and Christof Fetzer},
  title = {{Secure Content-Based Routing Using Intel Software Guard Extensions}},
  booktitle = {Middleware},
  year = {2016},
  url = {https://openreview.net/forum?id=SayaUukvPbz},
}
Figure