[论文解读] A Holistic Approach for Trustworthy Distributed Systems with WebAssembly and TEEs
本文提出了一种整体性、可移植且完全可验证的发布/订阅中间件系统,利用WebAssembly(Wasm)和可信执行环境(TEEs)如Intel SGX,以保护云边环境中的分布式通信。通过将标准MQTT代理和TLS库编译为Wasm,并在SGX飞地内执行,该系统实现了通过扩展TLS协议进行相互认证,同时保护认证证明的隐私,与原生执行相比消息吞吐量降低了1.55倍,但提供了强大的安全性和可移植性保证。
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.
研究动机与目标
- 解决异构云边环境中分布式发布/订阅系统缺乏标准化、可移植且安全的通信协议的问题。
- 通过将WebAssembly作为可移植的编译目标,克服TEE特定应用开发的复杂性和厂商锁定问题。
- 通过扩展TLS以安全交换认证凭证,实现在发布/订阅系统中实现机密性和认证通信,同时不暴露敏感信息。
- 提供一个完全功能的开源原型,即Wasm编译、TEE保护的MQTT代理,具备端到端安全性和性能评估。
提出的方法
- 将标准MQTT代理和TLS库编译为WebAssembly,以实现在多种硬件平台上的可移植执行。
- 在Intel SGX飞地中执行Wasm模块,以强制实施硬件保护的隔离和使用中数据的机密性。
- 扩展TLS 1.3握手过程,通过自定义扩展点嵌入并验证远程认证凭证,同时通过加密保护凭证的隐私。
- 使用ECDH和PSK-based TLS握手,评估不同安全配置下的性能权衡。
- 利用Mosquitto代理桥接功能,在多代理部署中分发负载,提升系统可扩展性。
- 对Wasm运行时进行插桩,以监控飞地转换(OCALLs)并分析与系统调用和内存复制相关的性能瓶颈。
实验结果
研究问题
- RQ1WebAssembly能否有效用于构建可在异构硬件平台上运行于TEEs内的可移植、安全且高效的发布/订阅系统?
- RQ2如何在不损害隐私或标准合规性的前提下,将相互认证安全地集成到标准通信协议(如TLS)中?
- RQ3在真实世界的发布/订阅代理实现中,结合WebAssembly、TEEs和认证机制的性能开销如何?
- RQ4在现有发布/订阅系统中,通过最小代码修改添加TEE和Wasm支持的扩展程度如何?
主要发现
- 与原生执行相比,使用可信代理(Wasm-SGX)时消息吞吐量降低了1.55倍,表明强安全保证下的性能成本是可接受的。
- 与非认证变体相比,将认证集成到TLS握手中的开销为1.87倍(ECDH)和4.33倍(PSK),且在每秒15个新ECDH连接时达到饱和。
- Wasm和Wasm-SGX变体在消息速率增加时表现出良好的可扩展性,性能下降主要源于网络I/O操作期间频繁的飞地转换(OCALLs)。
- 系统在Wasm-SGX下饱和于25个发布者,Wasm下为30个,原生执行下超过55个,表明代理桥接可显著提升可扩展性。
- 使用ECDH的TLS结合认证带来的开销高于PSK的TLS,表明PSK可能更适合高吞吐量场景。
- 该实现成功在TEE内终止TLS通道并保护私钥,防止泄露,确保执行代码的真实性。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。