[Paper Review] A Holistic Approach for Trustworthy Distributed Systems with WebAssembly and TEEs
This paper presents a holistic, portable, and fully attested publish/subscribe middleware system that leverages WebAssembly (Wasm) and Trusted Execution Environments (TEEs) like Intel SGX to secure distributed communication in cloud-edge environments. By compiling a standard MQTT broker and TLS library into Wasm and executing them within SGX enclaves, the system enables mutual attestation via an extended TLS protocol that preserves attestation proof privacy, achieving 1.55× lower message throughput compared to native execution while providing strong security and portability guarantees.
Ethereum is the dominant blockchain ecosystem capable of executing Turing-complete smart contracts. Rollups gained significant traction as the primary layer 2 (L2) solution meant to bring horizontal scalability to the main Ethereum network (L1). A core component of any rollup is the sequencer, which creates new L2 blocks to be submitted in rollup batches to L1. In most of the current rollup architectures, this component is centralised. As a result, these designs are prone to inconspicuous censorship practices by the sequencer. Trusted execution environments (TEEs) can guarantee the integrity of various sequencer components, which is instrumental in addressing censorship. However, the reaction of the system design to censorship attempts depends on where a TEE is integrated and which components it protects. In particular, this reaction is limited in the case of a monolithic TEE-protected sequencer design. Proposer-Builder Separation (PBS) is a non-monolithic paradigm adopted on L1, which separates the production of blocks from proposing them for inclusion in the blockchain. Recently, PBS has been considered for integration with L2 sequencers, with an impact on alleviating censorship. In this paper, we explore the design space of TEE-integrating PBS and non-PBS sequencer variants. First, we introduce a formal framework for the censorship actions that captures the specificity of the L2 sequencer. Then, we analyse to what extent the different designs address these censorship actions. Our main contribution is a novel design variation that allows for a precise observation of censored transactions. In the presence of TEEs, in a PBS setting, we demonstrate this precise observability, which is necessary to enable resilience to censorship.
Motivation & Objective
- To address the lack of standardized, portable, and secure communication protocols in distributed pub/sub systems across heterogeneous cloud-edge environments.
- To overcome the complexity and vendor lock-in of TEE-specific application development by using WebAssembly as a portable compilation target.
- To enable confidential and authenticated communication in pub/sub systems by extending TLS to securely exchange attestation evidence without exposing sensitive information.
- To provide a fully functional, open-source prototype of a Wasm-compiled, TEE-protected MQTT broker with end-to-end security and performance evaluation.
Proposed method
- Compiling a standard MQTT broker and a TLS library into WebAssembly to enable portable execution across diverse hardware platforms.
- Executing the Wasm modules within Intel SGX enclaves to enforce hardware-protected isolation and confidentiality of data in use.
- Extending the TLS 1.3 handshake with custom extension points to embed and verify remote attestation evidence while preserving privacy of the evidence through encryption.
- Using ECDH and PSK-based TLS handshakes to evaluate performance trade-offs under different security configurations.
- Leveraging Mosquitto’s broker bridge feature to distribute load and improve system scalability in multi-broker deployments.
- Instrumenting the Wasm runtime to monitor enclave transitions (OCALLs) and analyze performance bottlenecks related to system calls and memory copying.
Experimental results
Research questions
- RQ1Can WebAssembly be effectively used to build portable, secure, and efficient pub/sub systems that run within TEEs across diverse hardware platforms?
- RQ2How can mutual attestation be securely integrated into standard communication protocols like TLS without compromising privacy or standard compliance?
- RQ3What is the performance overhead of combining WebAssembly, TEEs, and attestation in a real-world pub/sub broker implementation?
- RQ4To what extent can existing pub/sub systems be extended with TEE and Wasm support using minimal code changes?
Key findings
- The system achieves a 1.55× decrease in message throughput when using a trusted broker (Wasm-SGX) compared to native execution, demonstrating a manageable performance cost for strong security guarantees.
- The overhead from incorporating attestation into the TLS handshake is 1.87× (ECDH) and 4.33× (PSK) compared to non-attested variants, with saturation occurring at 15 new ECDH connections per second.
- The Wasm and Wasm-SGX variants scale well under increasing message rates, with performance degradation primarily due to frequent enclave transitions (OCALLs) during network I/O operations.
- The system saturates at 25 publishers for Wasm-SGX, 30 for Wasm, and beyond 55 for native execution, indicating that broker bridging can extend scalability.
- The use of ECDH-based TLS with attestation incurs higher overhead than PSK-based TLS, suggesting PSK may be more suitable for high-throughput scenarios.
- The implementation successfully terminates TLS channels within the TEE and protects private keys, preventing leakage and ensuring the authenticity of the executing code.
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.